diff --git a/.github/classifier.yml b/.github/classifier.yml new file mode 100644 index 0000000000000..eba62b735d8d4 --- /dev/null +++ b/.github/classifier.yml @@ -0,0 +1,45 @@ +{ + perform: true, + alwaysRequireAssignee: false, + labelsRequiringAssignee: [ feature-request ], + autoAssignees: { + accessibility: [], + api: [], + css-less-sass: [], + debug: [ weinand ], + editor: [], + editor-brackets: [], + editor-clipboard: [], + editor-colors: [], + editor-contrib: [], + editor-core: [], + editor-find-widget: [], + editor-folding: [], + editor-ime: [], + editor-indentation: [], + editor-input: [], + editor-minimap: [], + editor-multicursor: [], + editor-wrapping: [], + emmet: [ ramya-rao-a ], + error-list: [], + extensions: [], + git: [ joaomoreno ], + hot-exit: [ Tyriar ], + html: [], + i18n: [], + install-update: [], + integrated-terminal: [ Tyriar ], + javascript: [], + json: [], + languages basic: [], + markdown: [], + perf-profile: [], + php: [ roblourens ], + search: [ roblourens ], + snippets: [ jrieken ], + tasks: [], + typescript: [], + workbench: [ bpasero ], + } +} diff --git a/.github/copycat.yml b/.github/copycat.yml new file mode 100644 index 0000000000000..eccccc16b007d --- /dev/null +++ b/.github/copycat.yml @@ -0,0 +1,5 @@ +{ + perform: true, + target_owner: 'chrmarti', + target_repo: 'testissues' +} \ No newline at end of file diff --git a/.github/insiders.yml b/.github/insiders.yml new file mode 100644 index 0000000000000..28192b556e5b9 --- /dev/null +++ b/.github/insiders.yml @@ -0,0 +1,4 @@ +{ + insidersLabel: 'insiders', + perform: true +} \ No newline at end of file diff --git a/.github/needs_more_info.yml b/.github/needs_more_info.yml new file mode 100644 index 0000000000000..934e98898d42d --- /dev/null +++ b/.github/needs_more_info.yml @@ -0,0 +1,6 @@ +{ + daysUntilClose: 7, + needsMoreInfoLabel: 'needs more info', + perform: true, + closeComment: 'This issue has been closed automatically because it needs more information and has not had recent activity. Please refer to our [guidelines](https://github.com/Microsoft/vscode/blob/master/CONTRIBUTING.md) for filing issues. Thank you for your contributions.' +} diff --git a/.github/new_release.yml b/.github/new_release.yml new file mode 100644 index 0000000000000..fb42f94b09526 --- /dev/null +++ b/.github/new_release.yml @@ -0,0 +1,5 @@ +{ + newReleaseLabel: 'new release', + newReleases: ['1.14'], + perform: true +} \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index cb7e8ac93232b..e590f6b9e270d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,7 +44,7 @@ script: - gulp electron --silent - gulp compile --silent --max_old_space_size=4096 - gulp optimize-vscode --silent --max_old_space_size=4096 - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./scripts/test.sh --coverage; else ./scripts/test.sh; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./scripts/test.sh --coverage --reporter dot; else ./scripts/test.sh --reporter dot; fi - ./scripts/test-integration.sh after_success: diff --git a/.vscode/launch.json b/.vscode/launch.json index 7e923598730fd..39b72b995a8b4 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,34 +1,6 @@ { "version": "0.1.0", "configurations": [ - { - "type": "node", - "request": "launch", - "name": "Unit Tests", - "protocol": "legacy", - "program": "${workspaceRoot}/node_modules/mocha/bin/_mocha", - "runtimeExecutable": "${workspaceRoot}/.build/electron/Code - OSS.app/Contents/MacOS/Electron", - "windows": { - "runtimeExecutable": "${workspaceRoot}/.build/electron/Code - OSS.exe" - }, - "linux": { - "runtimeExecutable": "${workspaceRoot}/.build/electron/code-oss" - }, - "stopOnEntry": false, - "args": [ - "--timeout", - "2000" - ], - "cwd": "${workspaceRoot}", - "env": { - "ELECTRON_RUN_AS_NODE": "true" - }, - "sourceMaps": true, - "outFiles": [ - "${workspaceRoot}/out/**/*.js" - ], - "preLaunchTask": "electron" - }, { "type": "node", "request": "launch", @@ -46,7 +18,6 @@ "name": "Attach to Extension Host", "protocol": "legacy", "port": 5870, - "sourceMaps": true, "restart": true, "outFiles": [ "${workspaceRoot}/out/**/*.js" @@ -58,7 +29,6 @@ "name": "Attach to Shared Process", "protocol": "legacy", "port": 5871, - "sourceMaps": true, "outFiles": [ "${workspaceRoot}/out/**/*.js" ] @@ -69,7 +39,6 @@ "protocol": "legacy", "name": "Attach to Search process", "port": 7890, - "sourceMaps": true, "outFiles": [ "${workspaceRoot}/out/**/*.js" ] @@ -80,7 +49,6 @@ "name": "Attach to CLI Process", "protocol": "legacy", "port": 5874, - "sourceMaps": true, "outFiles": [ "${workspaceRoot}/out/**/*.js" ] @@ -91,7 +59,6 @@ "name": "Attach to Main Process", "protocol": "legacy", "port": 5875, - "sourceMaps": true, "outFiles": [ "${workspaceRoot}/out/**/*.js" ] @@ -106,7 +73,6 @@ "--extensionDevelopmentPath=${workspaceRoot}/extensions/vscode-api-tests", "--extensionTestsPath=${workspaceRoot}/extensions/vscode-api-tests/out" ], - "sourceMaps": true, "outFiles": [ "${workspaceRoot}/out/**/*.js" ] @@ -121,7 +87,6 @@ "--extensionDevelopmentPath=${workspaceRoot}/extensions/vscode-colorize-tests", "--extensionTestsPath=${workspaceRoot}/extensions/vscode-colorize-tests/out" ], - "sourceMaps": true, "outFiles": [ "${workspaceRoot}/out/**/*.js" ] @@ -159,10 +124,45 @@ "program": "${workspaceRoot}/extensions/git/node_modules/mocha/bin/_mocha", "stopOnEntry": false, "cwd": "${workspaceRoot}/extensions/git", - "sourceMaps": true, "outFiles": [ "${workspaceRoot}/extensions/git/out/**/*.js" ] + }, + { + "name": "Attach to TS Server", + "type": "node", + "request": "attach", + "port": 5859, + "protocol": "legacy", + "outFiles": [ + "${workspaceRoot}/extensions/node_modules/typescript/lib/**/*.js" + ] + }, + { + "type": "node", + "request": "launch", + "name": "Unit Tests", + "protocol": "legacy", + "program": "${workspaceRoot}/node_modules/mocha/bin/_mocha", + "runtimeExecutable": "${workspaceRoot}/.build/electron/Code - OSS.app/Contents/MacOS/Electron", + "windows": { + "runtimeExecutable": "${workspaceRoot}/.build/electron/Code - OSS.exe" + }, + "linux": { + "runtimeExecutable": "${workspaceRoot}/.build/electron/code-oss" + }, + "stopOnEntry": false, + "args": [ + "--timeout", + "2000" + ], + "cwd": "${workspaceRoot}", + "env": { + "ELECTRON_RUN_AS_NODE": "true" + }, + "outFiles": [ + "${workspaceRoot}/out/**/*.js" + ] } ], "compounds": [ diff --git a/.vscode/settings.json b/.vscode/settings.json index ee2a86a54f53f..ed5e39baa7fb2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,7 +6,9 @@ ".git": true, ".build": true, "**/.DS_Store": true, - "build/**/*.js": { "when": "$(basename).ts" } + "build/**/*.js": { + "when": "$(basename).ts" + } }, "search.exclude": { "**/node_modules": true, @@ -17,7 +19,6 @@ "extensions/**/out/**": true }, "tslint.enable": true, - "tslint.rulesDirectory": "build/lib/tslint", "lcov.path": [ "./.build/coverage/lcov.info", "./.build/coverage-single/lcov.info" @@ -31,4 +32,4 @@ } } ] -} \ No newline at end of file +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json index a52055b963655..6e47f7a368448 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,23 +1,15 @@ { - "version": "0.1.0", - "windows": { - "command": ".\\node_modules\\.bin\\gulp" - }, - "osx": { - "command": "./node_modules/.bin/gulp" - }, - "linux": { - "command": "./node_modules/.bin/gulp" - }, - "isShellCommand": true, + "version": "2.0.0", "tasks": [ { - "taskName": "watch", - "args": [ - "--no-color" - ], - "isBuildCommand": true, + "type": "npm", + "script": "watch", + "label": "Build VS Code", + "group": "build", "isBackground": true, + "presentation": { + "reveal": "never" + }, "problemMatcher": { "owner": "typescript", "applyTo": "closedDocuments", @@ -30,45 +22,43 @@ "location": 2, "message": 3 }, - "watching": { + "background": { "beginsPattern": "Starting compilation", "endsPattern": "Finished compilation" } } }, { - "taskName": "tslint", - "args": [], - "problemMatcher": { - "owner": "tslint", - "fileLocation": [ - "relative", - "${workspaceRoot}" - ], - "severity": "warning", - "pattern": { - "regexp": "(.*)\\[(\\d+),\\s(\\d+)\\]:\\s(.*)$", // (.*)\[(\d+), (\d+)\]: (.*) - "file": 1, - "line": 2, - "column": 3, - "message": 4 - } + "type": "gulp", + "task": "tslint", + "label": "Run tslint", + "problemMatcher": ["$tslint4"] + }, + { + "taskName": "Run tests", + "type": "shell", + "command": "./scripts/test.sh", + "windows": { + "command": ".\\scripts\\test.bat" + }, + "group": "test", + "presentation": { + "echo": true, + "reveal": "always" } }, { - "taskName": "test", - "args": [ - "--no-color" - ], - "showOutput": "always", - "isTestCommand": true + "taskName": "Run Dev", + "type": "shell", + "command": "./scripts/code.sh", + "windows": { + "command": ".\\scripts\\code.bat" + } }, { - "taskName": "electron", - "args": [ - "--no-color" - ], - "showOutput": "never" + "type": "gulp", + "task": "electron", + "label": "Download electron" } ] } \ No newline at end of file diff --git a/OSSREADME.json b/OSSREADME.json index 82ae97d75a72e..aaad59a74e1dc 100644 --- a/OSSREADME.json +++ b/OSSREADME.json @@ -678,5 +678,104 @@ "That's all there is to it!" ], "isProd": true +}, +{ + "isLicense": true, + "name": "@types/node", + "repositoryURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped", + "license": "MIT", + "licenseDetail": [ + "This project is licensed under the MIT license.", + "Copyrights are respective of each contributor listed at the beginning of each definition file.", + "", + "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." + ], + "isProd": true +}, +{ + "isLicense": true, + "name": "jsonfile", + "repositoryURL": "https+ssh://git@github.com/jprichardson/node-jsonfile", + "license": "MIT", + "licenseDetail": [ + "(The MIT License)", + "", + "Copyright (c) 2012-2015, JP Richardson ", + "", + "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." + ], + "isProd": true +}, +{ + "isLicense": true, + "name": "string_decoder", + "repositoryURL": "https://github.com/rvagg/string_decoder", + "license": "MIT", + "licenseDetail": [ + "The MIT License (MIT)", + "", + "Node.js is licensed for use as follows:", + "", + "\"\"\"", + "Copyright Node.js contributors. All rights reserved.", + "", + "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.", + "\"\"\"", + "", + "This license applies to parts of Node.js originating from the", + "https://github.com/joyent/node repository:", + "", + "\"\"\"", + "Copyright Joyent, Inc. and other Node contributors. All rights reserved.", + "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.", + "\"\"\"" + ], + "isProd": true } ] diff --git a/ThirdPartyNotices.txt b/ThirdPartyNotices.txt index 7291abaeecdcf..39dd6514fac91 100644 --- a/ThirdPartyNotices.txt +++ b/ThirdPartyNotices.txt @@ -1,5 +1,3 @@ -===================BEGIN GENERATOR LOG -===================END GENERATOR LOG microsoft-vscode THIRD-PARTY SOFTWARE NOTICES AND INFORMATION @@ -7,64 +5,62 @@ Do Not Translate or Localize This project incorporates components from the projects listed below. The original copyright notices and the licenses under which Microsoft received such components are set forth below. Microsoft reserves all rights not expressly granted herein, whether by implication, estoppel or otherwise. -1. atom/language-c version 0.51.3 (https://github.com/atom/language-c) +1. atom/language-c (https://github.com/atom/language-c) 2. atom/language-clojure (https://github.com/atom/language-clojure) 3. atom/language-coffee-script (https://github.com/atom/language-coffee-script) 4. atom/language-css (https://github.com/atom/language-css) -5. atom/language-objective-c (https://github.com/atom/language-objective-c) -6. atom/language-sass version 0.52.0 (https://github.com/atom/language-sass) -7. atom/language-xml (https://github.com/atom/language-xml) -8. Benvie/JavaScriptNext.tmLanguage (https://github.com/Benvie/JavaScriptNext.tmLanguage) -9. chjj-marked version 0.3.2 (https://github.com/npmcomponent/chjj-marked) -10. chriskempson/tomorrow-theme (https://github.com/chriskempson/tomorrow-theme) -11. Colorsublime-Themes version 0.1.0 (https://github.com/Colorsublime/Colorsublime-Themes) -12. daaain/Handlebars (https://github.com/daaain/Handlebars) -13. davidrios/jade-tmbundle (https://github.com/davidrios/jade-tmbundle) -14. definitelytyped (https://github.com/DefinitelyTyped/DefinitelyTyped) -15. demyte/language-cshtml (https://github.com/demyte/language-cshtml) -16. dotnet/csharp-tmLanguage version 0.1.0 (https://github.com/dotnet/csharp-tmLanguage) -17. freebroccolo/atom-language-swift (https://github.com/freebroccolo/atom-language-swift) -18. HTML 5.1 W3C Working Draft version 08 October 2015 (http://www.w3.org/TR/2015/WD-html51-20151008/) -19. Ionic documentation version 1.2.4 (https://github.com/driftyco/ionic-site) -20. ionide/ionide-fsgrammar (https://github.com/ionide/ionide-fsgrammar) -21. js-beautify version 1.6.8 (https://github.com/beautify-web/js-beautify) -22. Jxck/assert version 1.0.0 (https://github.com/Jxck/assert) -23. language-docker (https://github.com/docker/docker) -24. language-go version 0.39.0 (https://github.com/atom/language-go) -25. language-less (https://github.com/atom/language-less) -26. language-php (https://github.com/atom/language-php) -27. language-rust version 0.4.9 (https://github.com/zargony/atom-language-rust) -28. MagicStack/MagicPython (https://github.com/MagicStack/MagicPython) -29. Microsoft/TypeScript-TmLanguage version 0.0.1 (https://github.com/Microsoft/TypeScript-TmLanguage) -30. octicons-code version 3.1.0 (https://octicons.github.com) -31. octicons-font version 3.1.0 (https://octicons.github.com) -32. seti-ui version 0.1.0 (https://github.com/jesseweed/seti-ui) -33. shaders-tmLanguage version 0.1.0 (https://github.com/tgjones/shaders-tmLanguage) -34. string_scorer version 0.1.20 (https://github.com/joshaven/string_score) -35. sublimehq/Packages (https://github.com/sublimehq/Packages) -36. SublimeText/PowerShell (https://github.com/SublimeText/PowerShell) -37. textmate/asp.vb.net.tmbundle (https://github.com/textmate/asp.vb.net.tmbundle) -38. textmate/c.tmbundle (https://github.com/textmate/c.tmbundle) -39. textmate/diff.tmbundle (https://github.com/textmate/diff.tmbundle) -40. textmate/git.tmbundle (https://github.com/textmate/git.tmbundle) -41. textmate/groovy.tmbundle (https://github.com/textmate/groovy.tmbundle) -42. textmate/html.tmbundle (https://github.com/textmate/html.tmbundle) -43. textmate/ini.tmbundle (https://github.com/textmate/ini.tmbundle) -44. textmate/java.tmbundle (https://github.com/textmate/java.tmbundle) -45. textmate/javadoc.tmbundle (https://github.com/textmate/javadoc.tmbundle) -46. textmate/javascript.tmbundle (https://github.com/textmate/javascript.tmbundle) -47. textmate/lua.tmbundle (https://github.com/textmate/lua.tmbundle) -48. textmate/make.tmbundle (https://github.com/textmate/make.tmbundle) -49. textmate/markdown.tmbundle (https://github.com/textmate/markdown.tmbundle) -50. textmate/perl.tmbundle (https://github.com/textmate/perl.tmbundle) -51. textmate/r.tmbundle (https://github.com/textmate/r.tmbundle) -52. textmate/ruby.tmbundle (https://github.com/textmate/ruby.tmbundle) -53. textmate/shellscript.tmbundle (https://github.com/textmate/shellscript.tmbundle) -54. textmate/sql.tmbundle (https://github.com/textmate/sql.tmbundle) -55. textmate/yaml.tmbundle (https://github.com/textmate/yaml.tmbundle) -56. typescript-legacy version 1.5 (https://github.com/Microsoft/TypeScript) -57. TypeScript-TmLanguage version 0.1.8 (https://github.com/Microsoft/TypeScript-TmLanguage) -58. vscode-swift version 0.0.1 (https://github.com/owensd/vscode-swift) +5. atom/language-java (https://github.com/atom/language-java) +6. atom/language-objective-c (https://github.com/atom/language-objective-c) +7. atom/language-sass version 0.52.0 (https://github.com/atom/language-sass) +8. atom/language-xml (https://github.com/atom/language-xml) +9. Benvie/JavaScriptNext.tmLanguage (https://github.com/Benvie/JavaScriptNext.tmLanguage) +10. chjj-marked version 0.3.6 (https://github.com/npmcomponent/chjj-marked) +11. chriskempson/tomorrow-theme (https://github.com/chriskempson/tomorrow-theme) +12. Colorsublime-Themes version 0.1.0 (https://github.com/Colorsublime/Colorsublime-Themes) +13. daaain/Handlebars (https://github.com/daaain/Handlebars) +14. davidrios/jade-tmbundle (https://github.com/davidrios/jade-tmbundle) +15. definitelytyped (https://github.com/DefinitelyTyped/DefinitelyTyped) +16. demyte/language-cshtml (https://github.com/demyte/language-cshtml) +17. dotnet/csharp-tmLanguage version 0.1.0 (https://github.com/dotnet/csharp-tmLanguage) +18. freebroccolo/atom-language-swift (https://github.com/freebroccolo/atom-language-swift) +19. HTML 5.1 W3C Working Draft version 08 October 2015 (http://www.w3.org/TR/2015/WD-html51-20151008/) +20. Ionic documentation version 1.2.4 (https://github.com/ionic-team/ionic-site) +21. ionide/ionide-fsgrammar (https://github.com/ionide/ionide-fsgrammar) +22. js-beautify version 1.6.8 (https://github.com/beautify-web/js-beautify) +23. Jxck/assert version 1.0.0 (https://github.com/Jxck/assert) +24. language-docker (https://github.com/moby/moby) +25. language-go version 0.39.0 (https://github.com/atom/language-go) +26. language-less (https://github.com/atom/language-less) +27. language-php (https://github.com/atom/language-php) +28. language-rust version 0.4.9 (https://github.com/zargony/atom-language-rust) +29. MagicStack/MagicPython (https://github.com/MagicStack/MagicPython) +30. Microsoft/TypeScript-TmLanguage version 0.0.1 (https://github.com/Microsoft/TypeScript-TmLanguage) +31. octicons-code version 3.1.0 (https://octicons.github.com) +32. octicons-font version 3.1.0 (https://octicons.github.com) +33. seti-ui version 0.1.0 (https://github.com/jesseweed/seti-ui) +34. shaders-tmLanguage version 0.1.0 (https://github.com/tgjones/shaders-tmLanguage) +35. string_scorer version 0.1.20 (https://github.com/joshaven/string_score) +36. sublimehq/Packages (https://github.com/sublimehq/Packages) +37. SublimeText/PowerShell (https://github.com/SublimeText/PowerShell) +38. textmate/asp.vb.net.tmbundle (https://github.com/textmate/asp.vb.net.tmbundle) +39. textmate/c.tmbundle (https://github.com/textmate/c.tmbundle) +40. textmate/diff.tmbundle (https://github.com/textmate/diff.tmbundle) +41. textmate/git.tmbundle (https://github.com/textmate/git.tmbundle) +42. textmate/groovy.tmbundle (https://github.com/textmate/groovy.tmbundle) +43. textmate/html.tmbundle (https://github.com/textmate/html.tmbundle) +44. textmate/ini.tmbundle (https://github.com/textmate/ini.tmbundle) +45. textmate/javascript.tmbundle (https://github.com/textmate/javascript.tmbundle) +46. textmate/lua.tmbundle (https://github.com/textmate/lua.tmbundle) +47. textmate/make.tmbundle (https://github.com/textmate/make.tmbundle) +48. textmate/markdown.tmbundle (https://github.com/textmate/markdown.tmbundle) +49. textmate/perl.tmbundle (https://github.com/textmate/perl.tmbundle) +50. textmate/r.tmbundle (https://github.com/textmate/r.tmbundle) +51. textmate/ruby.tmbundle (https://github.com/textmate/ruby.tmbundle) +52. textmate/shellscript.tmbundle (https://github.com/textmate/shellscript.tmbundle) +53. textmate/sql.tmbundle (https://github.com/textmate/sql.tmbundle) +54. textmate/yaml.tmbundle (https://github.com/textmate/yaml.tmbundle) +55. TypeScript-TmLanguage version 0.1.8 (https://github.com/Microsoft/TypeScript-TmLanguage) +56. vscode-swift version 0.0.1 (https://github.com/owensd/vscode-swift) %% atom/language-c NOTICES AND INFORMATION BEGIN HERE @@ -248,6 +244,43 @@ suitability for any purpose. ========================================= END OF atom/language-css NOTICES AND INFORMATION +%% atom/language-java NOTICES AND INFORMATION BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2014 GitHub Inc. + +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. + + +This package was derived from a TextMate bundle located at +https://github.com/textmate/java.tmbundle and distributed under the following +license, located in `README.mdown`: + +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. +========================================= +END OF atom/language-java NOTICES AND INFORMATION + %% atom/language-objective-c NOTICES AND INFORMATION BEGIN HERE ========================================= The MIT License (MIT) @@ -1138,7 +1171,7 @@ END OF language-rust NOTICES AND INFORMATION ========================================= The MIT License -Copyright (c) 2015 MagicStack Inc. http://magic.io +Copyright (c) 2015-present MagicStack Inc. http://magic.io Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -1703,42 +1736,6 @@ to the base-name name of the original file, and an extension of txt, html, or si ========================================= END OF textmate/ini.tmbundle NOTICES AND INFORMATION -%% textmate/java.tmbundle NOTICES AND INFORMATION BEGIN HERE -========================================= -Copyright (c) textmate-java.tmbundle project authors - -If not otherwise specified (see below), files in this repository fall under the following license: - -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. - -An exception is made for files in readable text which contain their own license information, -or files where an accompanying file exists (in the same directory) with a "-license" suffix added -to the base-name name of the original file, and an extension of txt, html, or similar. For example -"tidy" is accompanied by "tidy-license.txt". -========================================= -END OF textmate/java.tmbundle NOTICES AND INFORMATION - -%% textmate/javadoc.tmbundle NOTICES AND INFORMATION BEGIN HERE -========================================= -Copyright (c) textmate-javadoc.tmbundle project authors - -If not otherwise specified (see below), files in this repository fall under the following license: - -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. - -An exception is made for files in readable text which contain their own license information, -or files where an accompanying file exists (in the same directory) with a "-license" suffix added -to the base-name name of the original file, and an extension of txt, html, or similar. For example -"tidy" is accompanied by "tidy-license.txt". -========================================= -END OF textmate/javadoc.tmbundle NOTICES AND INFORMATION - %% textmate/javascript.tmbundle NOTICES AND INFORMATION BEGIN HERE ========================================= Copyright (c) textmate-javascript.tmbundle project authors @@ -1919,68 +1916,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SO ========================================= END OF textmate/yaml.tmbundle NOTICES AND INFORMATION -%% typescript-legacy NOTICES AND INFORMATION BEGIN HERE -========================================= -Copyright (c) Microsoft Corporation. All rights reserved. - -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS -========================================= -END OF typescript-legacy NOTICES AND INFORMATION - %% TypeScript-TmLanguage NOTICES AND INFORMATION BEGIN HERE ========================================= Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/appveyor.yml b/appveyor.yml index c18b32095bf3f..49e80fed313b4 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,7 +4,7 @@ environment: install: - ps: Install-Product node 7.4.0 x64 - - npm install -g npm --silent + - npm install -g npm@4 --silent - npm install -g gulp mocha --silent build_script: diff --git a/build/gulpfile.editor.js b/build/gulpfile.editor.js index 698941ad456f8..4c0857170689e 100644 --- a/build/gulpfile.editor.js +++ b/build/gulpfile.editor.js @@ -38,7 +38,6 @@ var editorResources = [ '!out-build/vs/base/browser/ui/splitview/**/*', '!out-build/vs/base/browser/ui/toolbar/**/*', '!out-build/vs/base/browser/ui/octiconLabel/**/*', - '!out-build/vs/editor/contrib/defineKeybinding/**/*', '!out-build/vs/workbench/**', '!**/test/**' ]; diff --git a/build/gulpfile.hygiene.js b/build/gulpfile.hygiene.js index 480077c58cfcd..a729078205539 100644 --- a/build/gulpfile.hygiene.js +++ b/build/gulpfile.hygiene.js @@ -9,6 +9,7 @@ const gulp = require('gulp'); const filter = require('gulp-filter'); const es = require('event-stream'); const gulptslint = require('gulp-tslint'); +const gulpeslint = require('gulp-eslint'); const tsfmt = require('typescript-formatter'); const tslint = require('tslint'); @@ -40,13 +41,17 @@ const eolFilter = [ '!**/*.{svg,exe,png,bmp,scpt,bat,cmd,cur,ttf,woff,eot}', '!build/{lib,tslintRules}/**/*.js', '!build/monaco/**', - '!build/win32/**' + '!build/win32/**', + '!build/**/*.sh', + '!build/tfs/**/*.js', + '!**/Dockerfile' ]; const indentationFilter = [ '**', '!ThirdPartyNotices.txt', '!**/*.md', + '!**/*.ps1', '!**/*.template', '!**/*.yml', '!**/lib/**', @@ -86,13 +91,27 @@ const copyrightFilter = [ '!**/*.xpm', '!**/*.opts', '!**/*.disabled', + '!build/**/*.init', '!resources/win32/bin/code.js', '!extensions/markdown/media/tomorrow.css', '!extensions/html/server/src/modes/typescript/*' ]; +const eslintFilter = [ + 'src/**/*.js', + '!src/vs/loader.js', + '!src/vs/css.js', + '!src/vs/nls.js', + '!src/vs/css.build.js', + '!src/vs/nls.build.js', + '!src/**/winjs.base.raw.js', + '!src/**/raw.marked.js', + '!**/test/**' +]; + const tslintFilter = [ 'src/**/*.ts', + 'test/**/*.ts', 'extensions/**/*.ts', '!**/fixtures/**', '!**/typings/**', @@ -120,6 +139,14 @@ function reportFailures(failures) { }); } +gulp.task('eslint', () => { + return gulp.src(all, { base: '.' }) + .pipe(filter(eslintFilter)) + .pipe(gulpeslint('src/.eslintrc')) + .pipe(gulpeslint.formatEach('compact')) + .pipe(gulpeslint.failAfterError()); +}); + gulp.task('tslint', () => { const options = { summarizeFailureOutput: true }; @@ -172,7 +199,6 @@ const hygiene = exports.hygiene = (some, options) => { }); const formatting = es.map(function (file, cb) { - tsfmt.processString(file.path, file.contents.toString('utf8'), { verify: true, tsfmt: true, @@ -205,17 +231,27 @@ const hygiene = exports.hygiene = (some, options) => { this.emit('data', file); }); - return gulp.src(some || all, { base: '.' }) + const result = gulp.src(some || all, { base: '.' }) .pipe(filter(f => !f.stat.isDirectory())) .pipe(filter(eolFilter)) .pipe(options.skipEOL ? es.through() : eol) .pipe(filter(indentationFilter)) .pipe(indentation) .pipe(filter(copyrightFilter)) - .pipe(copyrights) + .pipe(copyrights); + + const typescript = result .pipe(filter(tslintFilter)) .pipe(formatting) - .pipe(tsl) + .pipe(tsl); + + const javascript = result + .pipe(filter(eslintFilter)) + .pipe(gulpeslint('src/.eslintrc')) + .pipe(gulpeslint.formatEach('compact')) + .pipe(gulpeslint.failAfterError()); + + return es.merge(typescript, javascript) .pipe(es.through(null, function () { if (errorCount > 0) { this.emit('error', 'Hygiene failed with ' + errorCount + ' errors. Check \'build/gulpfile.hygiene.js\'.'); diff --git a/build/gulpfile.js b/build/gulpfile.js deleted file mode 100644 index c0a5700ec1f56..0000000000000 --- a/build/gulpfile.js +++ /dev/null @@ -1,28 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -var gulp = require('gulp'); -var tsb = require('gulp-tsb'); -var util = require('./lib/util'); -var watcher = require('./lib/watch'); -var assign = require('object-assign'); - -var compilation = tsb.create(assign({ verbose: true }, require('./tsconfig.json').compilerOptions)); - -gulp.task('compile', function() { - return gulp.src('**/*.ts', { base: '.' }) - .pipe(compilation()) - .pipe(gulp.dest('')); -}); - -gulp.task('watch', function() { - var src = gulp.src('**/*.ts', { base: '.' }); - - return watcher('**/*.ts', { base: '.' }) - .pipe(util.incremental(compilation, src)) - .pipe(gulp.dest('')); -}); - -gulp.task('default', ['compile']); diff --git a/build/gulpfile.mixin.js b/build/gulpfile.mixin.js index 0a80a8a0337a3..abf3ce4a90cc2 100644 --- a/build/gulpfile.mixin.js +++ b/build/gulpfile.mixin.js @@ -48,32 +48,16 @@ gulp.task('mixin', function () { .pipe(util.rebase(1)); if (quality) { - const build = all.pipe(filter('build/**')); const productJsonFilter = filter('product.json', { restore: true }); - const arch = process.env.VSCODE_ELECTRON_PLATFORM || process.arch; - - const vsdaFilter = (function () { - const filter = []; - if (process.platform !== 'win32') { filter.push('!**/vsda_win32.node'); } - if (process.platform !== 'darwin') { filter.push('!**/vsda_darwin.node'); } - if (process.platform !== 'linux' || arch !== 'x64') { filter.push('!**/vsda_linux64.node'); } - if (process.platform !== 'linux' || arch === 'x64') { filter.push('!**/vsda_linux32.node'); } - - return filter; - })(); - const mixin = all - .pipe(filter(['quality/' + quality + '/**'].concat(vsdaFilter))) + .pipe(filter(['quality/' + quality + '/**'])) .pipe(util.rebase(2)) .pipe(productJsonFilter) .pipe(buffer()) - .pipe(json(function (patch) { - const original = require('../product.json'); - return assign(original, patch); - })) + .pipe(json(o => assign({}, require('../product.json'), o))) .pipe(productJsonFilter.restore); - all = es.merge(build, mixin); + all = es.merge(mixin); } return all diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index e86050d59b4dd..1eaf03b6ec4e9 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -30,9 +30,13 @@ const product = require('../product.json'); const shrinkwrap = require('../npm-shrinkwrap.json'); const crypto = require('crypto'); const i18n = require('./lib/i18n'); +const glob = require('glob'); +const os = require('os'); +const cp = require('child_process'); +const productDependencies = Object.keys(product.dependencies || {}); const dependencies = Object.keys(shrinkwrap.dependencies) - .concat(Array.isArray(product.extraNodeModules) ? product.extraNodeModules : []); // additional dependencies from our product configuration + .concat(productDependencies); // additional dependencies from our product configuration const baseModules = Object.keys(process.binding('natives')).filter(n => !/^_|\//.test(n)); const nodeModules = ['electron', 'original-fs'] .concat(dependencies) @@ -41,8 +45,13 @@ const nodeModules = ['electron', 'original-fs'] // Build const builtInExtensions = [ - { name: 'ms-vscode.node-debug', version: '1.12.13' }, - { name: 'ms-vscode.node-debug2', version: '1.12.4' } + { name: 'ms-vscode.node-debug', version: '1.14.8' }, + { name: 'ms-vscode.node-debug2', version: '1.14.4' } +]; + +const excludedExtensions = [ + 'vscode-api-tests', + 'vscode-colorize-tests' ]; const vscodeEntryPoints = _.flatten([ @@ -59,13 +68,13 @@ const vscodeResources = [ 'out-build/bootstrap-amd.js', 'out-build/paths.js', 'out-build/vs/**/*.{svg,png,cur,html}', + 'out-build/vs/base/node/startupTimers.js', 'out-build/vs/base/node/{stdForkStart.js,terminateProcess.sh}', 'out-build/vs/base/browser/ui/octiconLabel/octicons/**', 'out-build/vs/workbench/browser/media/*-theme.css', 'out-build/vs/workbench/electron-browser/bootstrap/**', 'out-build/vs/workbench/parts/debug/**/*.json', 'out-build/vs/workbench/parts/execution/**/*.scpt', - 'out-build/vs/workbench/parts/git/**/*.sh', 'out-build/vs/workbench/parts/html/browser/webview-pre.js', 'out-build/vs/**/markdown.css', 'out-build/vs/workbench/parts/tasks/**/*.json', @@ -83,6 +92,11 @@ const BUNDLED_FILE_HEADER = [ ' *--------------------------------------------------------*/' ].join('\n'); +var languages = ['chs', 'cht', 'jpn', 'kor', 'deu', 'fra', 'esn', 'rus', 'ita']; +if (process.env.VSCODE_QUALITY !== 'stable') { + languages = languages.concat(['ptb', 'hun', 'trk']); // Add languages requested by the community to non-stable builds +} + gulp.task('clean-optimized-vscode', util.rimraf('out-vscode')); gulp.task('optimize-vscode', ['clean-optimized-vscode', 'compile-build', 'compile-extensions-build'], common.optimizeTask({ entryPoints: vscodeEntryPoints, @@ -90,7 +104,8 @@ gulp.task('optimize-vscode', ['clean-optimized-vscode', 'compile-build', 'compil resources: vscodeResources, loaderConfig: common.loaderConfig(nodeModules), header: BUNDLED_FILE_HEADER, - out: 'out-vscode' + out: 'out-vscode', + languages: languages })); @@ -116,11 +131,13 @@ const config = { darwinIcon: 'resources/darwin/code.icns', darwinBundleIdentifier: product.darwinBundleIdentifier, darwinApplicationCategoryType: 'public.app-category.developer-tools', + darwinHelpBookFolder: 'VS Code HelpBook', + darwinHelpBookName: 'VS Code HelpBook', darwinBundleDocumentTypes: [{ name: product.nameLong + ' document', role: 'Editor', ostypes: ["TEXT", "utxt", "TUTX", "****"], - extensions: ["ascx", "asp", "aspx", "bash", "bash_login", "bash_logout", "bash_profile", "bashrc", "bat", "bowerrc", "c", "cc", "clj", "cljs", "cljx", "clojure", "cmd", "coffee", "config", "cpp", "cs", "cshtml", "csproj", "css", "csx", "ctp", "cxx", "dockerfile", "dot", "dtd", "editorconfig", "edn", "eyaml", "eyml", "fs", "fsi", "fsscript", "fsx", "gemspec", "gitattributes", "gitconfig", "gitignore", "go", "h", "handlebars", "hbs", "hh", "hpp", "htm", "html", "hxx", "ini", "jade", "jav", "java", "js", "jscsrc", "jshintrc", "jshtm", "json", "jsp", "less", "lua", "m", "makefile", "markdown", "md", "mdoc", "mdown", "mdtext", "mdtxt", "mdwn", "mkd", "mkdn", "ml", "mli", "php", "phtml", "pl", "pl6", "pm", "pm6", "pod", "pp", "profile", "properties", "ps1", "psd1", "psgi", "psm1", "py", "r", "rb", "rhistory", "rprofile", "rs", "rt", "scss", "sh", "shtml", "sql", "svg", "svgz", "t", "ts", "txt", "vb", "wxi", "wxl", "wxs", "xaml", "xml", "yaml", "yml", "zlogin", "zlogout", "zprofile", "zsh", "zshenv", "zshrc"], + extensions: ["ascx", "asp", "aspx", "bash", "bash_login", "bash_logout", "bash_profile", "bashrc", "bat", "bowerrc", "c", "cc", "clj", "cljs", "cljx", "clojure", "cmd", "coffee", "config", "cpp", "cs", "cshtml", "csproj", "css", "csx", "ctp", "cxx", "dockerfile", "dot", "dtd", "editorconfig", "edn", "eyaml", "eyml", "fs", "fsi", "fsscript", "fsx", "gemspec", "gitattributes", "gitconfig", "gitignore", "go", "h", "handlebars", "hbs", "hh", "hpp", "htm", "html", "hxx", "ini", "jade", "jav", "java", "js", "jscsrc", "jshintrc", "jshtm", "json", "jsp", "less", "lua", "m", "makefile", "markdown", "md", "mdoc", "mdown", "mdtext", "mdtxt", "mdwn", "mkd", "mkdn", "ml", "mli", "php", "phtml", "pl", "pl6", "pm", "pm6", "pod", "pp", "profile", "properties", "ps1", "psd1", "psgi", "psm1", "py", "r", "rb", "rhistory", "rprofile", "rs", "rt", "scss", "sh", "shtml", "sql", "svg", "svgz", "t", "ts", "txt", "vb", "wxi", "wxl", "wxs", "xaml", "xcodeproj", "xcworkspace", "xml", "yaml", "yml", "zlogin", "zlogout", "zprofile", "zsh", "zshenv", "zshrc"], iconFile: 'resources/darwin/code_file.icns' }], darwinBundleURLTypes: [{ @@ -131,25 +148,32 @@ const config = { darwinCredits: darwinCreditsTemplate ? new Buffer(darwinCreditsTemplate({ commit: commit, date: new Date().toISOString() })) : void 0, linuxExecutableName: product.applicationName, winIcon: 'resources/win32/code.ico', - token: process.env['GITHUB_TOKEN'] || void 0 + token: process.env['VSCODE_MIXIN_PASSWORD'] || process.env['GITHUB_TOKEN'] || void 0, + repo: product.electronRepository || void 0 }; -gulp.task('clean-electron', util.rimraf('.build/electron')); +function getElectron(arch) { + return () => { + const electronOpts = _.extend({}, config, { + platform: process.platform, + arch, + ffmpegChromium: true, + keepDefaultApp: true + }); + + return gulp.src('package.json') + .pipe(json({ name: product.nameShort })) + .pipe(electron(electronOpts)) + .pipe(filter(['**', '!**/app/package.json'])) + .pipe(vfs.dest('.build/electron')); + }; +} -gulp.task('electron', ['clean-electron'], () => { - const platform = process.platform; - const arch = process.env.VSCODE_ELECTRON_PLATFORM || (platform === 'win32' ? 'ia32' : process.arch); - const opts = _.extend({}, config, { platform, arch, ffmpegChromium: true, keepDefaultApp: true }); - const name = product.nameShort; - - return gulp.src('package.json') - .pipe(json({ name })) - .pipe(electron(opts)) - .pipe(filter(['**', '!**/app/package.json'])) - .pipe(vfs.dest('.build/electron')); -}); +gulp.task('clean-electron', util.rimraf('.build/electron')); +gulp.task('electron', ['clean-electron'], getElectron(process.arch)); +gulp.task('electron-ia32', ['clean-electron'], getElectron('ia32')); +gulp.task('electron-x64', ['clean-electron'], getElectron('x64')); -const languages = ['chs', 'cht', 'jpn', 'kor', 'deu', 'fra', 'esn', 'rus', 'ita']; /** * Compute checksums for some files. @@ -190,7 +214,6 @@ function packageTask(platform, arch, opts) { const destination = path.join(path.dirname(root), 'VSCode') + (platform ? '-' + platform : '') + (arch ? '-' + arch : ''); platform = platform || process.platform; - arch = platform === 'win32' ? 'ia32' : arch; return () => { const out = opts.minified ? 'out-vscode-min' : 'out-vscode'; @@ -199,47 +222,49 @@ function packageTask(platform, arch, opts) { 'vs/workbench/electron-browser/workbench.main.js', 'vs/workbench/electron-browser/workbench.main.css', 'vs/workbench/electron-browser/bootstrap/index.html', - 'vs/workbench/electron-browser/bootstrap/index.js' + 'vs/workbench/electron-browser/bootstrap/index.js', + 'vs/workbench/electron-browser/bootstrap/preload.js' ]); const src = gulp.src(out + '/**', { base: '.' }) .pipe(rename(function (path) { path.dirname = path.dirname.replace(new RegExp('^' + out), 'out'); })) .pipe(util.setExecutableBit(['**/*.sh'])); - const extensionsList = [ - 'extensions/*/**', - '!extensions/*/src/**', - '!extensions/*/out/**/test/**', - '!extensions/*/test/**', - '!extensions/*/build/**', - '!extensions/**/node_modules/@types/**', - '!extensions/*/{client,server}/src/**', - '!extensions/*/{client,server}/test/**', - '!extensions/*/{client,server}/out/**/test/**', - '!extensions/*/{client,server}/out/**/typings/**', - '!extensions/**/.vscode/**', - '!extensions/**/tsconfig.json', - '!extensions/typescript/bin/**', - '!extensions/vscode-api-tests/**', - '!extensions/vscode-colorize-tests/**', - ...builtInExtensions.map(e => `!extensions/${e.name}/**`) - ]; - - const nlsFilter = filter('**/*.nls.json', { restore: true }); - const extensions = gulp.src(extensionsList, { base: '.' }) - // TODO@Dirk: this filter / buffer is here to make sure the nls.json files are buffered - .pipe(nlsFilter) - .pipe(buffer()) - .pipe(nlsDev.createAdditionalLanguageFiles(languages, path.join(__dirname, '..', 'i18n'))) - .pipe(nlsFilter.restore); + const root = path.resolve(path.join(__dirname, '..')); + const localExtensionDescriptions = glob.sync('extensions/*/package.json') + .map(manifestPath => { + const extensionPath = path.dirname(path.join(root, manifestPath)); + const extensionName = path.basename(extensionPath); + return { name: extensionName, path: extensionPath }; + }) + .filter(({ name }) => excludedExtensions.indexOf(name) === -1) + .filter(({ name }) => builtInExtensions.every(b => b.name !== name)); + + const localExtensions = es.merge(...localExtensionDescriptions.map(extension => { + const nlsFilter = filter('**/*.nls.json', { restore: true }); + + return ext.fromLocal(extension.path) + .pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`)) + // // TODO@Dirk: this filter / buffer is here to make sure the nls.json files are buffered + .pipe(nlsFilter) + .pipe(buffer()) + .pipe(nlsDev.createAdditionalLanguageFiles(languages, path.join(__dirname, '..', 'i18n'))) + .pipe(nlsFilter.restore); + })); + + const localExtensionDependencies = gulp.src('extensions/node_modules/**', { base: '.' }); const marketplaceExtensions = es.merge(...builtInExtensions.map(extension => { - return ext.src(extension.name, extension.version) + return ext.fromMarketplace(extension.name, extension.version) .pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`)); })); - const sources = es.merge(src, extensions, marketplaceExtensions) - .pipe(filter(['**', '!**/*.js.map'])); + const sources = es.merge( + src, + localExtensions, + localExtensionDependencies, + marketplaceExtensions + ).pipe(filter(['**', '!**/*.js.map'])); let version = packageJson.version; const quality = product.quality; @@ -266,14 +291,16 @@ function packageTask(platform, arch, opts) { const deps = gulp.src(depsSrc, { base: '.', dot: true }) .pipe(util.cleanNodeModule('fsevents', ['binding.gyp', 'fsevents.cc', 'build/**', 'src/**', 'test/**'], ['**/*.node'])) - .pipe(util.cleanNodeModule('oniguruma', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node'])) + .pipe(util.cleanNodeModule('oniguruma', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node', 'src/*.js'])) .pipe(util.cleanNodeModule('windows-mutex', ['binding.gyp', 'build/**', 'src/**'], ['**/*.node'])) .pipe(util.cleanNodeModule('native-keymap', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node'])) .pipe(util.cleanNodeModule('jschardet', ['dist/**'])) .pipe(util.cleanNodeModule('windows-foreground-love', ['binding.gyp', 'build/**', 'src/**'], ['**/*.node'])) .pipe(util.cleanNodeModule('gc-signals', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node', 'src/index.js'])) .pipe(util.cleanNodeModule('v8-profiler', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node', 'src/index.js'])) - .pipe(util.cleanNodeModule('node-pty', ['binding.gyp', 'build/**', 'src/**', 'tools/**'], ['build/Release/**'])); + .pipe(util.cleanNodeModule('node-pty', ['binding.gyp', 'build/**', 'src/**', 'tools/**'], ['build/Release/**'])) + .pipe(util.cleanNodeModule('nsfw', ['binding.gyp', 'build/**', 'src/**', 'openpa/**', 'includes/**'], ['**/*.node', '**/*.a'])) + .pipe(util.cleanNodeModule('vsda', ['binding.gyp', 'README.md', 'build/**', '*.bat', '*.sh', '*.cpp', '*.h'], ['build/Release/vsda.node'])); let all = es.merge( packageJsonStream, @@ -323,24 +350,80 @@ function packageTask(platform, arch, opts) { const buildRoot = path.dirname(root); -gulp.task('clean-vscode-win32', util.rimraf(path.join(buildRoot, 'VSCode-win32'))); +gulp.task('clean-vscode-win32-ia32', util.rimraf(path.join(buildRoot, 'VSCode-win32-ia32'))); +gulp.task('clean-vscode-win32-x64', util.rimraf(path.join(buildRoot, 'VSCode-win32-x64'))); gulp.task('clean-vscode-darwin', util.rimraf(path.join(buildRoot, 'VSCode-darwin'))); gulp.task('clean-vscode-linux-ia32', util.rimraf(path.join(buildRoot, 'VSCode-linux-ia32'))); gulp.task('clean-vscode-linux-x64', util.rimraf(path.join(buildRoot, 'VSCode-linux-x64'))); gulp.task('clean-vscode-linux-arm', util.rimraf(path.join(buildRoot, 'VSCode-linux-arm'))); -gulp.task('vscode-win32', ['optimize-vscode', 'clean-vscode-win32'], packageTask('win32')); +gulp.task('vscode-win32-ia32', ['optimize-vscode', 'clean-vscode-win32-ia32'], packageTask('win32', 'ia32')); +gulp.task('vscode-win32-x64', ['optimize-vscode', 'clean-vscode-win32-x64'], packageTask('win32', 'x64')); gulp.task('vscode-darwin', ['optimize-vscode', 'clean-vscode-darwin'], packageTask('darwin')); gulp.task('vscode-linux-ia32', ['optimize-vscode', 'clean-vscode-linux-ia32'], packageTask('linux', 'ia32')); gulp.task('vscode-linux-x64', ['optimize-vscode', 'clean-vscode-linux-x64'], packageTask('linux', 'x64')); gulp.task('vscode-linux-arm', ['optimize-vscode', 'clean-vscode-linux-arm'], packageTask('linux', 'arm')); -gulp.task('vscode-win32-min', ['minify-vscode', 'clean-vscode-win32'], packageTask('win32', null, { minified: true })); +gulp.task('vscode-win32-ia32-min', ['minify-vscode', 'clean-vscode-win32-ia32'], packageTask('win32', 'ia32', { minified: true })); +gulp.task('vscode-win32-x64-min', ['minify-vscode', 'clean-vscode-win32-x64'], packageTask('win32', 'x64', { minified: true })); gulp.task('vscode-darwin-min', ['minify-vscode', 'clean-vscode-darwin'], packageTask('darwin', null, { minified: true })); gulp.task('vscode-linux-ia32-min', ['minify-vscode', 'clean-vscode-linux-ia32'], packageTask('linux', 'ia32', { minified: true })); gulp.task('vscode-linux-x64-min', ['minify-vscode', 'clean-vscode-linux-x64'], packageTask('linux', 'x64', { minified: true })); gulp.task('vscode-linux-arm-min', ['minify-vscode', 'clean-vscode-linux-arm'], packageTask('linux', 'arm', { minified: true })); +// --- v8 snapshots --- + +function snapshotTask(platform, arch) { + + const destination = path.join(path.dirname(root), 'VSCode') + (platform ? '-' + platform : '') + (arch ? '-' + arch : ''); + + let command = path.join(process.cwd(), 'node_modules/.bin/mksnapshot'); + let loaderInputFilepath; + let startupBlobFilepath; + + if (platform === 'darwin') { + loaderInputFilepath = path.join(destination, 'Code - OSS.app/Contents/Resources/app/out/vs/loader.js'); + startupBlobFilepath = path.join(destination, 'Code - OSS.app/Contents/Frameworks/Electron Framework.framework/Resources/snapshot_blob.bin') + + } else if (platform === 'win32') { + command = `${command}.cmd`; + loaderInputFilepath = path.join(destination, 'resources/app/out/vs/loader.js'); + startupBlobFilepath = path.join(destination, 'snapshot_blob.bin') + + } else if (platform === 'linux') { + // TODO + return () => { }; + } + + return () => { + const inputFile = fs.readFileSync(loaderInputFilepath); + const wrappedInputFile = ` + var Monaco_Loader_Init; + (function() { + var doNotInitLoader = true; + ${inputFile.toString()}; + Monaco_Loader_Init = function() { + AMDLoader.init(); + CSSLoaderPlugin.init(); + NLSLoaderPlugin.init(); + + return define; + } + })(); + `; + const wrappedInputFilepath = path.join(os.tmpdir(), 'wrapped-loader.js'); + console.log(wrappedInputFilepath); + fs.writeFileSync(wrappedInputFilepath, wrappedInputFile); + + cp.execFileSync(command, [wrappedInputFilepath, `--startup_blob`, startupBlobFilepath]); + } +} + +gulp.task('vscode-darwin-snapshots', ['vscode-darwin-min'], snapshotTask('darwin', undefined)); +gulp.task('vscode-win32-ia32-snapshots', ['vscode-win32-ia32'], snapshotTask('win32', 'ia32')); +gulp.task('vscode-win32-x64-snapshots', ['vscode-win32-x64'], snapshotTask('win32', 'x64')); + + // Transifex Localizations const vscodeLanguages = [ 'zh-hans', @@ -351,7 +434,10 @@ const vscodeLanguages = [ 'fr', 'es', 'ru', - 'it' + 'it', + 'pt-br', + 'hu', + 'tr' ]; const setupDefaultLanguages = [ 'zh-hans', @@ -363,7 +449,7 @@ const apiHostname = process.env.TRANSIFEX_API_URL; const apiName = process.env.TRANSIFEX_API_NAME; const apiToken = process.env.TRANSIFEX_API_TOKEN; -gulp.task('vscode-translations-push', ['optimize-vscode'], function() { +gulp.task('vscode-translations-push', ['optimize-vscode'], function () { const pathToMetadata = './out-vscode/nls.metadata.json'; const pathToExtensions = './extensions/**/*.nls.json'; const pathToSetup = 'build/win32/**/{Default.isl,messages.en.isl}'; @@ -375,7 +461,7 @@ gulp.task('vscode-translations-push', ['optimize-vscode'], function() { ).pipe(i18n.pushXlfFiles(apiHostname, apiName, apiToken)); }); -gulp.task('vscode-translations-pull', function() { +gulp.task('vscode-translations-pull', function () { return es.merge( i18n.pullXlfFiles('vscode-editor', apiHostname, apiName, apiToken, vscodeLanguages), i18n.pullXlfFiles('vscode-workbench', apiHostname, apiName, apiToken, vscodeLanguages), @@ -384,7 +470,7 @@ gulp.task('vscode-translations-pull', function() { ).pipe(vfs.dest('../vscode-localization')); }); -gulp.task('vscode-translations-import', function() { +gulp.task('vscode-translations-import', function () { return gulp.src('../vscode-localization/**/*.xlf').pipe(i18n.prepareJsonFiles()).pipe(vfs.dest('./i18n')); }); diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js index cc8f75a0c9c80..54c73a538c207 100644 --- a/build/gulpfile.vscode.linux.js +++ b/build/gulpfile.vscode.linux.js @@ -259,20 +259,16 @@ gulp.task('clean-vscode-linux-ia32-rpm', util.rimraf('.build/linux/rpm/i386')); gulp.task('clean-vscode-linux-x64-rpm', util.rimraf('.build/linux/rpm/x86_64')); gulp.task('clean-vscode-linux-arm-rpm', util.rimraf('.build/linux/rpm/armhf')); -// TODO@joao TODO@daniel -// commented out the dependencies to the actual building of VS Code -// we gotta make sure those targets run before these run, in our TFS builds - -gulp.task('vscode-linux-ia32-prepare-deb', ['clean-vscode-linux-ia32-deb'/*, 'vscode-linux-ia32-min'*/], prepareDebPackage('ia32')); -gulp.task('vscode-linux-x64-prepare-deb', ['clean-vscode-linux-x64-deb'/*, 'vscode-linux-x64-min'*/], prepareDebPackage('x64')); -gulp.task('vscode-linux-arm-prepare-deb', ['clean-vscode-linux-arm-deb'/*, 'vscode-linux-arm-min'*/], prepareDebPackage('arm')); +gulp.task('vscode-linux-ia32-prepare-deb', ['clean-vscode-linux-ia32-deb'], prepareDebPackage('ia32')); +gulp.task('vscode-linux-x64-prepare-deb', ['clean-vscode-linux-x64-deb'], prepareDebPackage('x64')); +gulp.task('vscode-linux-arm-prepare-deb', ['clean-vscode-linux-arm-deb'], prepareDebPackage('arm')); gulp.task('vscode-linux-ia32-build-deb', ['vscode-linux-ia32-prepare-deb'], buildDebPackage('ia32')); gulp.task('vscode-linux-x64-build-deb', ['vscode-linux-x64-prepare-deb'], buildDebPackage('x64')); gulp.task('vscode-linux-arm-build-deb', ['vscode-linux-arm-prepare-deb'], buildDebPackage('arm')); -gulp.task('vscode-linux-ia32-prepare-rpm', ['clean-vscode-linux-ia32-rpm'/*, 'vscode-linux-ia32-min'*/], prepareRpmPackage('ia32')); -gulp.task('vscode-linux-x64-prepare-rpm', ['clean-vscode-linux-x64-rpm'/*, 'vscode-linux-x64-min'*/], prepareRpmPackage('x64')); -gulp.task('vscode-linux-arm-prepare-rpm', ['clean-vscode-linux-arm-rpm'/*, 'vscode-linux-arm-min'*/], prepareRpmPackage('arm')); +gulp.task('vscode-linux-ia32-prepare-rpm', ['clean-vscode-linux-ia32-rpm'], prepareRpmPackage('ia32')); +gulp.task('vscode-linux-x64-prepare-rpm', ['clean-vscode-linux-x64-rpm'], prepareRpmPackage('x64')); +gulp.task('vscode-linux-arm-prepare-rpm', ['clean-vscode-linux-arm-rpm'], prepareRpmPackage('arm')); gulp.task('vscode-linux-ia32-build-rpm', ['vscode-linux-ia32-prepare-rpm'], buildRpmPackage('ia32')); gulp.task('vscode-linux-x64-build-rpm', ['vscode-linux-x64-prepare-rpm'], buildRpmPackage('x64')); gulp.task('vscode-linux-arm-build-rpm', ['vscode-linux-arm-prepare-rpm'], buildRpmPackage('arm')); @@ -281,9 +277,9 @@ gulp.task('clean-vscode-linux-ia32-flatpak', util.rimraf('.build/linux/flatpak/i gulp.task('clean-vscode-linux-x64-flatpak', util.rimraf('.build/linux/flatpak/x86_64')); gulp.task('clean-vscode-linux-arm-flatpak', util.rimraf('.build/linux/flatpak/arm')); -gulp.task('vscode-linux-ia32-prepare-flatpak', ['clean-vscode-linux-ia32-flatpak'/*, 'vscode-linux-ia32-min'*/], prepareFlatpak('ia32')); -gulp.task('vscode-linux-x64-prepare-flatpak', ['clean-vscode-linux-x64-flatpak'/*, 'vscode-linux-x64-min'*/], prepareFlatpak('x64')); -gulp.task('vscode-linux-arm-prepare-flatpak', ['clean-vscode-linux-arm-flatpak'/*, 'vscode-linux-arm-min'*/], prepareFlatpak('arm')); +gulp.task('vscode-linux-ia32-prepare-flatpak', ['clean-vscode-linux-ia32-flatpak'], prepareFlatpak('ia32')); +gulp.task('vscode-linux-x64-prepare-flatpak', ['clean-vscode-linux-x64-flatpak'], prepareFlatpak('x64')); +gulp.task('vscode-linux-arm-prepare-flatpak', ['clean-vscode-linux-arm-flatpak'], prepareFlatpak('arm')); gulp.task('vscode-linux-ia32-flatpak', ['vscode-linux-ia32-prepare-flatpak'], buildFlatpak('ia32')); gulp.task('vscode-linux-x64-flatpak', ['vscode-linux-x64-prepare-flatpak'], buildFlatpak('x64')); diff --git a/build/gulpfile.vscode.win32.js b/build/gulpfile.vscode.win32.js index 427e4e525384e..8630284bc1f63 100644 --- a/build/gulpfile.vscode.win32.js +++ b/build/gulpfile.vscode.win32.js @@ -9,12 +9,16 @@ const gulp = require('gulp'); const path = require('path'); const assert = require('assert'); const cp = require('child_process'); +const _7z = require('7zip')['7z']; const util = require('./lib/util'); const pkg = require('../package.json'); const product = require('../product.json'); const repoPath = path.dirname(__dirname); -const buildPath = path.join(path.dirname(repoPath), 'VSCode-win32'); +const buildPath = arch => path.join(path.dirname(repoPath), `VSCode-win32-${arch}`); +const zipDir = arch => path.join(repoPath, '.build', `win32-${arch}`, 'archive'); +const zipPath = arch => path.join(zipDir(arch), `VSCode-win32-${arch}.zip`); +const setupDir = arch => path.join(repoPath, '.build', `win32-${arch}`, 'setup'); const issPath = path.join(__dirname, 'win32', 'code.iss'); const innoSetupPath = path.join(path.dirname(path.dirname(require.resolve('innosetup-compiler'))), 'bin', 'ISCC.exe'); @@ -24,9 +28,9 @@ function packageInnoSetup(iss, options, cb) { const definitions = options.definitions || {}; const keys = Object.keys(definitions); - keys.forEach(key => assert(typeof definitions[key] === 'string', `Missing value for '${ key }' in Inno Setup package step`)); + keys.forEach(key => assert(typeof definitions[key] === 'string', `Missing value for '${key}' in Inno Setup package step`)); - const defs = keys.map(key => `/d${ key }=${ definitions[key] }`); + const defs = keys.map(key => `/d${key}=${definitions[key]}`); const args = [iss].concat(defs); cp.spawn(innoSetupPath, args, { stdio: 'inherit' }) @@ -34,26 +38,55 @@ function packageInnoSetup(iss, options, cb) { .on('exit', () => cb(null)); } -function buildWin32Setup(cb) { - const definitions = { - NameLong: product.nameLong, - NameShort: product.nameShort, - DirName: product.win32DirName, - Version: pkg.version, - RawVersion: pkg.version.replace(/-\w+$/, ''), - NameVersion: product.win32NameVersion, - ExeBasename: product.nameShort, - RegValueName: product.win32RegValueName, - ShellNameShort: product.win32ShellNameShort, - AppMutex: product.win32MutexName, - AppId: product.win32AppId, - AppUserId: product.win32AppUserModelId, - SourceDir: buildPath, - RepoDir: repoPath +function buildWin32Setup(arch) { + return cb => { + const ia32AppId = product.win32AppId; + const x64AppId = product.win32x64AppId; + + const definitions = { + NameLong: product.nameLong, + NameShort: product.nameShort, + DirName: product.win32DirName, + Version: pkg.version, + RawVersion: pkg.version.replace(/-\w+$/, ''), + NameVersion: product.win32NameVersion, + ExeBasename: product.nameShort, + RegValueName: product.win32RegValueName, + ShellNameShort: product.win32ShellNameShort, + AppMutex: product.win32MutexName, + Arch: arch, + AppId: arch === 'ia32' ? ia32AppId : x64AppId, + IncompatibleAppId: arch === 'ia32' ? x64AppId : ia32AppId, + AppUserId: product.win32AppUserModelId, + ArchitecturesAllowed: arch === 'ia32' ? '' : 'x64', + ArchitecturesInstallIn64BitMode: arch === 'ia32' ? '' : 'x64', + SourceDir: buildPath(arch), + RepoDir: repoPath, + OutputDir: setupDir(arch) + }; + + packageInnoSetup(issPath, { definitions }, cb); }; +} + +gulp.task('clean-vscode-win32-ia32-setup', util.rimraf(setupDir('ia32'))); +gulp.task('vscode-win32-ia32-setup', ['clean-vscode-win32-ia32-setup'], buildWin32Setup('ia32')); - packageInnoSetup(issPath, { definitions }, cb); +gulp.task('clean-vscode-win32-x64-setup', util.rimraf(setupDir('x64'))); +gulp.task('vscode-win32-x64-setup', ['clean-vscode-win32-x64-setup'], buildWin32Setup('x64')); + +function archiveWin32Setup(arch) { + return cb => { + const args = ['a', '-tzip', zipPath(arch), '.', '-r']; + + cp.spawn(_7z, args, { stdio: 'inherit', cwd: buildPath(arch) }) + .on('error', cb) + .on('exit', () => cb(null)); + }; } -gulp.task('clean-vscode-win32-setup', util.rimraf('.build/win32/setup')); -gulp.task('vscode-win32-setup', ['clean-vscode-win32-setup'], buildWin32Setup); +gulp.task('clean-vscode-win32-ia32-archive', util.rimraf(zipDir('ia32'))); +gulp.task('vscode-win32-ia32-archive', ['clean-vscode-win32-ia32-archive'], archiveWin32Setup('ia32')); + +gulp.task('clean-vscode-win32-x64-archive', util.rimraf(zipDir('x64'))); +gulp.task('vscode-win32-x64-archive', ['clean-vscode-win32-x64-archive'], archiveWin32Setup('x64')); diff --git a/build/lib/bundle.js b/build/lib/bundle.js index 4046bdcb5c61f..89c5b9b50bd51 100644 --- a/build/lib/bundle.js +++ b/build/lib/bundle.js @@ -1,453 +1,456 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var fs = require("fs"); -var path = require("path"); -var vm = require("vm"); -/** - * Bundle `entryPoints` given config `config`. - */ -function bundle(entryPoints, config, callback) { - var entryPointsMap = {}; - entryPoints.forEach(function (module) { - entryPointsMap[module.name] = module; - }); - var allMentionedModulesMap = {}; - entryPoints.forEach(function (module) { - allMentionedModulesMap[module.name] = true; - (module.include || []).forEach(function (includedModule) { - allMentionedModulesMap[includedModule] = true; - }); - (module.exclude || []).forEach(function (excludedModule) { - allMentionedModulesMap[excludedModule] = true; - }); - }); - var code = require('fs').readFileSync(path.join(__dirname, '../../src/vs/loader.js')); - var r = vm.runInThisContext('(function(require, module, exports) { ' + code + '\n});'); - var loaderModule = { exports: {} }; - r.call({}, require, loaderModule, loaderModule.exports); - var loader = loaderModule.exports; - config.isBuild = true; - loader.config(config); - loader(['require'], function (localRequire) { - var resolvePath = function (path) { - var r = localRequire.toUrl(path); - if (!/\.js/.test(r)) { - return r + '.js'; - } - return r; - }; - for (var moduleId in entryPointsMap) { - var entryPoint = entryPointsMap[moduleId]; - if (entryPoint.append) { - entryPoint.append = entryPoint.append.map(resolvePath); - } - if (entryPoint.prepend) { - entryPoint.prepend = entryPoint.prepend.map(resolvePath); - } - } - }); - loader(Object.keys(allMentionedModulesMap), function () { - var modules = loader.getBuildInfo(); - var partialResult = emitEntryPoints(modules, entryPointsMap); - var cssInlinedResources = loader('vs/css').getInlinedResources(); - callback(null, { - files: partialResult.files, - cssInlinedResources: cssInlinedResources, - bundleData: partialResult.bundleData - }); - }, function (err) { return callback(err, null); }); -} -exports.bundle = bundle; -function emitEntryPoints(modules, entryPoints) { - var modulesMap = {}; - modules.forEach(function (m) { - modulesMap[m.id] = m; - }); - var modulesGraph = {}; - modules.forEach(function (m) { - modulesGraph[m.id] = m.dependencies; - }); - var sortedModules = topologicalSort(modulesGraph); - var result = []; - var usedPlugins = {}; - var bundleData = { - graph: modulesGraph, - bundles: {} - }; - Object.keys(entryPoints).forEach(function (moduleToBundle) { - var info = entryPoints[moduleToBundle]; - var rootNodes = [moduleToBundle].concat(info.include || []); - var allDependencies = visit(rootNodes, modulesGraph); - var excludes = ['require', 'exports', 'module'].concat(info.exclude || []); - excludes.forEach(function (excludeRoot) { - var allExcludes = visit([excludeRoot], modulesGraph); - Object.keys(allExcludes).forEach(function (exclude) { - delete allDependencies[exclude]; - }); - }); - var includedModules = sortedModules.filter(function (module) { - return allDependencies[module]; - }); - bundleData.bundles[moduleToBundle] = includedModules; - var res = emitEntryPoint(modulesMap, modulesGraph, moduleToBundle, includedModules, info.prepend, info.append, info.dest); - result = result.concat(res.files); - for (var pluginName in res.usedPlugins) { - usedPlugins[pluginName] = usedPlugins[pluginName] || res.usedPlugins[pluginName]; - } - }); - Object.keys(usedPlugins).forEach(function (pluginName) { - var plugin = usedPlugins[pluginName]; - if (typeof plugin.finishBuild === 'function') { - var write = function (filename, contents) { - result.push({ - dest: filename, - sources: [{ - path: null, - contents: contents - }] - }); - }; - plugin.finishBuild(write); - } - }); - return { - // TODO@TS 2.1.2 - files: extractStrings(/*removeDuplicateTSBoilerplate(*/ result /*)*/), - bundleData: bundleData - }; -} -function extractStrings(destFiles) { - var parseDefineCall = function (moduleMatch, depsMatch) { - var module = moduleMatch.replace(/^"|"$/g, ''); - var deps = depsMatch.split(','); - deps = deps.map(function (dep) { - dep = dep.trim(); - dep = dep.replace(/^"|"$/g, ''); - dep = dep.replace(/^'|'$/g, ''); - var prefix = null; - var _path = null; - var pieces = dep.split('!'); - if (pieces.length > 1) { - prefix = pieces[0] + '!'; - _path = pieces[1]; - } - else { - prefix = ''; - _path = pieces[0]; - } - if (/^\.\//.test(_path) || /^\.\.\//.test(_path)) { - var res = path.join(path.dirname(module), _path).replace(/\\/g, '/'); - return prefix + res; - } - return prefix + _path; - }); - return { - module: module, - deps: deps - }; - }; - destFiles.forEach(function (destFile, index) { - if (!/\.js$/.test(destFile.dest)) { - return; - } - if (/\.nls\.js$/.test(destFile.dest)) { - return; - } - // Do one pass to record the usage counts for each module id - var useCounts = {}; - destFile.sources.forEach(function (source) { - var matches = source.contents.match(/define\(("[^"]+"),\s*\[(((, )?("|')[^"']+("|'))+)\]/); - if (!matches) { - return; - } - var defineCall = parseDefineCall(matches[1], matches[2]); - useCounts[defineCall.module] = (useCounts[defineCall.module] || 0) + 1; - defineCall.deps.forEach(function (dep) { - useCounts[dep] = (useCounts[dep] || 0) + 1; - }); - }); - var sortedByUseModules = Object.keys(useCounts); - sortedByUseModules.sort(function (a, b) { - return useCounts[b] - useCounts[a]; - }); - var replacementMap = {}; - sortedByUseModules.forEach(function (module, index) { - replacementMap[module] = index; - }); - destFile.sources.forEach(function (source) { - source.contents = source.contents.replace(/define\(("[^"]+"),\s*\[(((, )?("|')[^"']+("|'))+)\]/, function (_, moduleMatch, depsMatch) { - var defineCall = parseDefineCall(moduleMatch, depsMatch); - return "define(__m[" + replacementMap[defineCall.module] + "/*" + defineCall.module + "*/], __M([" + defineCall.deps.map(function (dep) { return replacementMap[dep] + '/*' + dep + '*/'; }).join(',') + "])"; - }); - }); - destFile.sources.unshift({ - path: null, - contents: [ - '(function() {', - "var __m = " + JSON.stringify(sortedByUseModules) + ";", - "var __M = function(deps) {", - " var result = [];", - " for (var i = 0, len = deps.length; i < len; i++) {", - " result[i] = __m[deps[i]];", - " }", - " return result;", - "};" - ].join('\n') - }); - destFile.sources.push({ - path: null, - contents: '}).call(this);' - }); - }); - return destFiles; -} -function removeDuplicateTSBoilerplate(destFiles) { - // Taken from typescript compiler => emitFiles - var BOILERPLATE = [ - { start: /^var __extends/, end: /^};$/ }, - { start: /^var __assign/, end: /^};$/ }, - { start: /^var __decorate/, end: /^};$/ }, - { start: /^var __metadata/, end: /^};$/ }, - { start: /^var __param/, end: /^};$/ }, - { start: /^var __awaiter/, end: /^};$/ }, - ]; - destFiles.forEach(function (destFile) { - var SEEN_BOILERPLATE = []; - destFile.sources.forEach(function (source) { - var lines = source.contents.split(/\r\n|\n|\r/); - var newLines = []; - var IS_REMOVING_BOILERPLATE = false, END_BOILERPLATE; - for (var i = 0; i < lines.length; i++) { - var line = lines[i]; - if (IS_REMOVING_BOILERPLATE) { - newLines.push(''); - if (END_BOILERPLATE.test(line)) { - IS_REMOVING_BOILERPLATE = false; - } - } - else { - for (var j = 0; j < BOILERPLATE.length; j++) { - var boilerplate = BOILERPLATE[j]; - if (boilerplate.start.test(line)) { - if (SEEN_BOILERPLATE[j]) { - IS_REMOVING_BOILERPLATE = true; - END_BOILERPLATE = boilerplate.end; - } - else { - SEEN_BOILERPLATE[j] = true; - } - } - } - if (IS_REMOVING_BOILERPLATE) { - newLines.push(''); - } - else { - newLines.push(line); - } - } - } - source.contents = newLines.join('\n'); - }); - }); - return destFiles; -} -function emitEntryPoint(modulesMap, deps, entryPoint, includedModules, prepend, append, dest) { - if (!dest) { - dest = entryPoint + '.js'; - } - var mainResult = { - sources: [], - dest: dest - }, results = [mainResult]; - var usedPlugins = {}; - var getLoaderPlugin = function (pluginName) { - if (!usedPlugins[pluginName]) { - usedPlugins[pluginName] = modulesMap[pluginName].exports; - } - return usedPlugins[pluginName]; - }; - includedModules.forEach(function (c) { - var bangIndex = c.indexOf('!'); - if (bangIndex >= 0) { - var pluginName = c.substr(0, bangIndex); - var plugin = getLoaderPlugin(pluginName); - mainResult.sources.push(emitPlugin(entryPoint, plugin, pluginName, c.substr(bangIndex + 1))); - return; - } - var module = modulesMap[c]; - if (module.path === 'empty:') { - return; - } - var contents = readFileAndRemoveBOM(module.path); - if (module.shim) { - mainResult.sources.push(emitShimmedModule(c, deps[c], module.shim, module.path, contents)); - } - else { - mainResult.sources.push(emitNamedModule(c, deps[c], module.defineLocation, module.path, contents)); - } - }); - Object.keys(usedPlugins).forEach(function (pluginName) { - var plugin = usedPlugins[pluginName]; - if (typeof plugin.writeFile === 'function') { - var req = (function () { - throw new Error('no-no!'); - }); - req.toUrl = function (something) { return something; }; - var write = function (filename, contents) { - results.push({ - dest: filename, - sources: [{ - path: null, - contents: contents - }] - }); - }; - plugin.writeFile(pluginName, entryPoint, req, write, {}); - } - }); - var toIFile = function (path) { - var contents = readFileAndRemoveBOM(path); - return { - path: path, - contents: contents - }; - }; - var toPrepend = (prepend || []).map(toIFile); - var toAppend = (append || []).map(toIFile); - mainResult.sources = toPrepend.concat(mainResult.sources).concat(toAppend); - return { - files: results, - usedPlugins: usedPlugins - }; -} -function readFileAndRemoveBOM(path) { - var BOM_CHAR_CODE = 65279; - var contents = fs.readFileSync(path, 'utf8'); - // Remove BOM - if (contents.charCodeAt(0) === BOM_CHAR_CODE) { - contents = contents.substring(1); - } - return contents; -} -function emitPlugin(entryPoint, plugin, pluginName, moduleName) { - var result = ''; - if (typeof plugin.write === 'function') { - var write = (function (what) { - result += what; - }); - write.getEntryPoint = function () { - return entryPoint; - }; - write.asModule = function (moduleId, code) { - code = code.replace(/^define\(/, 'define("' + moduleId + '",'); - result += code; - }; - plugin.write(pluginName, moduleName, write); - } - return { - path: null, - contents: result - }; -} -function emitNamedModule(moduleId, myDeps, defineCallPosition, path, contents) { - // `defineCallPosition` is the position in code: |define() - var defineCallOffset = positionToOffset(contents, defineCallPosition.line, defineCallPosition.col); - // `parensOffset` is the position in code: define|() - var parensOffset = contents.indexOf('(', defineCallOffset); - var insertStr = '"' + moduleId + '", '; - return { - path: path, - contents: contents.substr(0, parensOffset + 1) + insertStr + contents.substr(parensOffset + 1) - }; -} -function emitShimmedModule(moduleId, myDeps, factory, path, contents) { - var strDeps = (myDeps.length > 0 ? '"' + myDeps.join('", "') + '"' : ''); - var strDefine = 'define("' + moduleId + '", [' + strDeps + '], ' + factory + ');'; - return { - path: path, - contents: contents + '\n;\n' + strDefine - }; -} -/** - * Convert a position (line:col) to (offset) in string `str` - */ -function positionToOffset(str, desiredLine, desiredCol) { - if (desiredLine === 1) { - return desiredCol - 1; - } - var line = 1, lastNewLineOffset = -1; - do { - if (desiredLine === line) { - return lastNewLineOffset + 1 + desiredCol - 1; - } - lastNewLineOffset = str.indexOf('\n', lastNewLineOffset + 1); - line++; - } while (lastNewLineOffset >= 0); - return -1; -} -/** - * Return a set of reachable nodes in `graph` starting from `rootNodes` - */ -function visit(rootNodes, graph) { - var result = {}, queue = rootNodes; - rootNodes.forEach(function (node) { - result[node] = true; - }); - while (queue.length > 0) { - var el = queue.shift(); - var myEdges = graph[el] || []; - myEdges.forEach(function (toNode) { - if (!result[toNode]) { - result[toNode] = true; - queue.push(toNode); - } - }); - } - return result; -} -/** - * Perform a topological sort on `graph` - */ -function topologicalSort(graph) { - var allNodes = {}, outgoingEdgeCount = {}, inverseEdges = {}; - Object.keys(graph).forEach(function (fromNode) { - allNodes[fromNode] = true; - outgoingEdgeCount[fromNode] = graph[fromNode].length; - graph[fromNode].forEach(function (toNode) { - allNodes[toNode] = true; - outgoingEdgeCount[toNode] = outgoingEdgeCount[toNode] || 0; - inverseEdges[toNode] = inverseEdges[toNode] || []; - inverseEdges[toNode].push(fromNode); - }); - }); - // https://en.wikipedia.org/wiki/Topological_sorting - var S = [], L = []; - Object.keys(allNodes).forEach(function (node) { - if (outgoingEdgeCount[node] === 0) { - delete outgoingEdgeCount[node]; - S.push(node); - } - }); - while (S.length > 0) { - // Ensure the exact same order all the time with the same inputs - S.sort(); - var n = S.shift(); - L.push(n); - var myInverseEdges = inverseEdges[n] || []; - myInverseEdges.forEach(function (m) { - outgoingEdgeCount[m]--; - if (outgoingEdgeCount[m] === 0) { - delete outgoingEdgeCount[m]; - S.push(m); - } - }); - } - if (Object.keys(outgoingEdgeCount).length > 0) { - throw new Error('Cannot do topological sort on cyclic graph, remaining nodes: ' + Object.keys(outgoingEdgeCount)); - } - return L; -} +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +var fs = require("fs"); +var path = require("path"); +var vm = require("vm"); +/** + * Bundle `entryPoints` given config `config`. + */ +function bundle(entryPoints, config, callback) { + var entryPointsMap = {}; + entryPoints.forEach(function (module) { + entryPointsMap[module.name] = module; + }); + var allMentionedModulesMap = {}; + entryPoints.forEach(function (module) { + allMentionedModulesMap[module.name] = true; + (module.include || []).forEach(function (includedModule) { + allMentionedModulesMap[includedModule] = true; + }); + (module.exclude || []).forEach(function (excludedModule) { + allMentionedModulesMap[excludedModule] = true; + }); + }); + var code = require('fs').readFileSync(path.join(__dirname, '../../src/vs/loader.js')); + var r = vm.runInThisContext('(function(require, module, exports) { ' + code + '\n});'); + var loaderModule = { exports: {} }; + r.call({}, require, loaderModule, loaderModule.exports); + var loader = loaderModule.exports; + config.isBuild = true; + config.paths = config.paths || {}; + config.paths['vs/nls'] = 'out-build/vs/nls.build'; + config.paths['vs/css'] = 'out-build/vs/css.build'; + loader.config(config); + loader(['require'], function (localRequire) { + var resolvePath = function (path) { + var r = localRequire.toUrl(path); + if (!/\.js/.test(r)) { + return r + '.js'; + } + return r; + }; + for (var moduleId in entryPointsMap) { + var entryPoint = entryPointsMap[moduleId]; + if (entryPoint.append) { + entryPoint.append = entryPoint.append.map(resolvePath); + } + if (entryPoint.prepend) { + entryPoint.prepend = entryPoint.prepend.map(resolvePath); + } + } + }); + loader(Object.keys(allMentionedModulesMap), function () { + var modules = loader.getBuildInfo(); + var partialResult = emitEntryPoints(modules, entryPointsMap); + var cssInlinedResources = loader('vs/css').getInlinedResources(); + callback(null, { + files: partialResult.files, + cssInlinedResources: cssInlinedResources, + bundleData: partialResult.bundleData + }); + }, function (err) { return callback(err, null); }); +} +exports.bundle = bundle; +function emitEntryPoints(modules, entryPoints) { + var modulesMap = {}; + modules.forEach(function (m) { + modulesMap[m.id] = m; + }); + var modulesGraph = {}; + modules.forEach(function (m) { + modulesGraph[m.id] = m.dependencies; + }); + var sortedModules = topologicalSort(modulesGraph); + var result = []; + var usedPlugins = {}; + var bundleData = { + graph: modulesGraph, + bundles: {} + }; + Object.keys(entryPoints).forEach(function (moduleToBundle) { + var info = entryPoints[moduleToBundle]; + var rootNodes = [moduleToBundle].concat(info.include || []); + var allDependencies = visit(rootNodes, modulesGraph); + var excludes = ['require', 'exports', 'module'].concat(info.exclude || []); + excludes.forEach(function (excludeRoot) { + var allExcludes = visit([excludeRoot], modulesGraph); + Object.keys(allExcludes).forEach(function (exclude) { + delete allDependencies[exclude]; + }); + }); + var includedModules = sortedModules.filter(function (module) { + return allDependencies[module]; + }); + bundleData.bundles[moduleToBundle] = includedModules; + var res = emitEntryPoint(modulesMap, modulesGraph, moduleToBundle, includedModules, info.prepend, info.append, info.dest); + result = result.concat(res.files); + for (var pluginName in res.usedPlugins) { + usedPlugins[pluginName] = usedPlugins[pluginName] || res.usedPlugins[pluginName]; + } + }); + Object.keys(usedPlugins).forEach(function (pluginName) { + var plugin = usedPlugins[pluginName]; + if (typeof plugin.finishBuild === 'function') { + var write = function (filename, contents) { + result.push({ + dest: filename, + sources: [{ + path: null, + contents: contents + }] + }); + }; + plugin.finishBuild(write); + } + }); + return { + // TODO@TS 2.1.2 + files: extractStrings(removeDuplicateTSBoilerplate(result)), + bundleData: bundleData + }; +} +function extractStrings(destFiles) { + var parseDefineCall = function (moduleMatch, depsMatch) { + var module = moduleMatch.replace(/^"|"$/g, ''); + var deps = depsMatch.split(','); + deps = deps.map(function (dep) { + dep = dep.trim(); + dep = dep.replace(/^"|"$/g, ''); + dep = dep.replace(/^'|'$/g, ''); + var prefix = null; + var _path = null; + var pieces = dep.split('!'); + if (pieces.length > 1) { + prefix = pieces[0] + '!'; + _path = pieces[1]; + } + else { + prefix = ''; + _path = pieces[0]; + } + if (/^\.\//.test(_path) || /^\.\.\//.test(_path)) { + var res = path.join(path.dirname(module), _path).replace(/\\/g, '/'); + return prefix + res; + } + return prefix + _path; + }); + return { + module: module, + deps: deps + }; + }; + destFiles.forEach(function (destFile, index) { + if (!/\.js$/.test(destFile.dest)) { + return; + } + if (/\.nls\.js$/.test(destFile.dest)) { + return; + } + // Do one pass to record the usage counts for each module id + var useCounts = {}; + destFile.sources.forEach(function (source) { + var matches = source.contents.match(/define\(("[^"]+"),\s*\[(((, )?("|')[^"']+("|'))+)\]/); + if (!matches) { + return; + } + var defineCall = parseDefineCall(matches[1], matches[2]); + useCounts[defineCall.module] = (useCounts[defineCall.module] || 0) + 1; + defineCall.deps.forEach(function (dep) { + useCounts[dep] = (useCounts[dep] || 0) + 1; + }); + }); + var sortedByUseModules = Object.keys(useCounts); + sortedByUseModules.sort(function (a, b) { + return useCounts[b] - useCounts[a]; + }); + var replacementMap = {}; + sortedByUseModules.forEach(function (module, index) { + replacementMap[module] = index; + }); + destFile.sources.forEach(function (source) { + source.contents = source.contents.replace(/define\(("[^"]+"),\s*\[(((, )?("|')[^"']+("|'))+)\]/, function (_, moduleMatch, depsMatch) { + var defineCall = parseDefineCall(moduleMatch, depsMatch); + return "define(__m[" + replacementMap[defineCall.module] + "/*" + defineCall.module + "*/], __M([" + defineCall.deps.map(function (dep) { return replacementMap[dep] + '/*' + dep + '*/'; }).join(',') + "])"; + }); + }); + destFile.sources.unshift({ + path: null, + contents: [ + '(function() {', + "var __m = " + JSON.stringify(sortedByUseModules) + ";", + "var __M = function(deps) {", + " var result = [];", + " for (var i = 0, len = deps.length; i < len; i++) {", + " result[i] = __m[deps[i]];", + " }", + " return result;", + "};" + ].join('\n') + }); + destFile.sources.push({ + path: null, + contents: '}).call(this);' + }); + }); + return destFiles; +} +function removeDuplicateTSBoilerplate(destFiles) { + // Taken from typescript compiler => emitFiles + var BOILERPLATE = [ + { start: /^var __extends/, end: /^}\)\(\);$/ }, + { start: /^var __assign/, end: /^};$/ }, + { start: /^var __decorate/, end: /^};$/ }, + { start: /^var __metadata/, end: /^};$/ }, + { start: /^var __param/, end: /^};$/ }, + { start: /^var __awaiter/, end: /^};$/ }, + ]; + destFiles.forEach(function (destFile) { + var SEEN_BOILERPLATE = []; + destFile.sources.forEach(function (source) { + var lines = source.contents.split(/\r\n|\n|\r/); + var newLines = []; + var IS_REMOVING_BOILERPLATE = false, END_BOILERPLATE; + for (var i = 0; i < lines.length; i++) { + var line = lines[i]; + if (IS_REMOVING_BOILERPLATE) { + newLines.push(''); + if (END_BOILERPLATE.test(line)) { + IS_REMOVING_BOILERPLATE = false; + } + } + else { + for (var j = 0; j < BOILERPLATE.length; j++) { + var boilerplate = BOILERPLATE[j]; + if (boilerplate.start.test(line)) { + if (SEEN_BOILERPLATE[j]) { + IS_REMOVING_BOILERPLATE = true; + END_BOILERPLATE = boilerplate.end; + } + else { + SEEN_BOILERPLATE[j] = true; + } + } + } + if (IS_REMOVING_BOILERPLATE) { + newLines.push(''); + } + else { + newLines.push(line); + } + } + } + source.contents = newLines.join('\n'); + }); + }); + return destFiles; +} +function emitEntryPoint(modulesMap, deps, entryPoint, includedModules, prepend, append, dest) { + if (!dest) { + dest = entryPoint + '.js'; + } + var mainResult = { + sources: [], + dest: dest + }, results = [mainResult]; + var usedPlugins = {}; + var getLoaderPlugin = function (pluginName) { + if (!usedPlugins[pluginName]) { + usedPlugins[pluginName] = modulesMap[pluginName].exports; + } + return usedPlugins[pluginName]; + }; + includedModules.forEach(function (c) { + var bangIndex = c.indexOf('!'); + if (bangIndex >= 0) { + var pluginName = c.substr(0, bangIndex); + var plugin = getLoaderPlugin(pluginName); + mainResult.sources.push(emitPlugin(entryPoint, plugin, pluginName, c.substr(bangIndex + 1))); + return; + } + var module = modulesMap[c]; + if (module.path === 'empty:') { + return; + } + var contents = readFileAndRemoveBOM(module.path); + if (module.shim) { + mainResult.sources.push(emitShimmedModule(c, deps[c], module.shim, module.path, contents)); + } + else { + mainResult.sources.push(emitNamedModule(c, deps[c], module.defineLocation, module.path, contents)); + } + }); + Object.keys(usedPlugins).forEach(function (pluginName) { + var plugin = usedPlugins[pluginName]; + if (typeof plugin.writeFile === 'function') { + var req = (function () { + throw new Error('no-no!'); + }); + req.toUrl = function (something) { return something; }; + var write = function (filename, contents) { + results.push({ + dest: filename, + sources: [{ + path: null, + contents: contents + }] + }); + }; + plugin.writeFile(pluginName, entryPoint, req, write, {}); + } + }); + var toIFile = function (path) { + var contents = readFileAndRemoveBOM(path); + return { + path: path, + contents: contents + }; + }; + var toPrepend = (prepend || []).map(toIFile); + var toAppend = (append || []).map(toIFile); + mainResult.sources = toPrepend.concat(mainResult.sources).concat(toAppend); + return { + files: results, + usedPlugins: usedPlugins + }; +} +function readFileAndRemoveBOM(path) { + var BOM_CHAR_CODE = 65279; + var contents = fs.readFileSync(path, 'utf8'); + // Remove BOM + if (contents.charCodeAt(0) === BOM_CHAR_CODE) { + contents = contents.substring(1); + } + return contents; +} +function emitPlugin(entryPoint, plugin, pluginName, moduleName) { + var result = ''; + if (typeof plugin.write === 'function') { + var write = (function (what) { + result += what; + }); + write.getEntryPoint = function () { + return entryPoint; + }; + write.asModule = function (moduleId, code) { + code = code.replace(/^define\(/, 'define("' + moduleId + '",'); + result += code; + }; + plugin.write(pluginName, moduleName, write); + } + return { + path: null, + contents: result + }; +} +function emitNamedModule(moduleId, myDeps, defineCallPosition, path, contents) { + // `defineCallPosition` is the position in code: |define() + var defineCallOffset = positionToOffset(contents, defineCallPosition.line, defineCallPosition.col); + // `parensOffset` is the position in code: define|() + var parensOffset = contents.indexOf('(', defineCallOffset); + var insertStr = '"' + moduleId + '", '; + return { + path: path, + contents: contents.substr(0, parensOffset + 1) + insertStr + contents.substr(parensOffset + 1) + }; +} +function emitShimmedModule(moduleId, myDeps, factory, path, contents) { + var strDeps = (myDeps.length > 0 ? '"' + myDeps.join('", "') + '"' : ''); + var strDefine = 'define("' + moduleId + '", [' + strDeps + '], ' + factory + ');'; + return { + path: path, + contents: contents + '\n;\n' + strDefine + }; +} +/** + * Convert a position (line:col) to (offset) in string `str` + */ +function positionToOffset(str, desiredLine, desiredCol) { + if (desiredLine === 1) { + return desiredCol - 1; + } + var line = 1, lastNewLineOffset = -1; + do { + if (desiredLine === line) { + return lastNewLineOffset + 1 + desiredCol - 1; + } + lastNewLineOffset = str.indexOf('\n', lastNewLineOffset + 1); + line++; + } while (lastNewLineOffset >= 0); + return -1; +} +/** + * Return a set of reachable nodes in `graph` starting from `rootNodes` + */ +function visit(rootNodes, graph) { + var result = {}, queue = rootNodes; + rootNodes.forEach(function (node) { + result[node] = true; + }); + while (queue.length > 0) { + var el = queue.shift(); + var myEdges = graph[el] || []; + myEdges.forEach(function (toNode) { + if (!result[toNode]) { + result[toNode] = true; + queue.push(toNode); + } + }); + } + return result; +} +/** + * Perform a topological sort on `graph` + */ +function topologicalSort(graph) { + var allNodes = {}, outgoingEdgeCount = {}, inverseEdges = {}; + Object.keys(graph).forEach(function (fromNode) { + allNodes[fromNode] = true; + outgoingEdgeCount[fromNode] = graph[fromNode].length; + graph[fromNode].forEach(function (toNode) { + allNodes[toNode] = true; + outgoingEdgeCount[toNode] = outgoingEdgeCount[toNode] || 0; + inverseEdges[toNode] = inverseEdges[toNode] || []; + inverseEdges[toNode].push(fromNode); + }); + }); + // https://en.wikipedia.org/wiki/Topological_sorting + var S = [], L = []; + Object.keys(allNodes).forEach(function (node) { + if (outgoingEdgeCount[node] === 0) { + delete outgoingEdgeCount[node]; + S.push(node); + } + }); + while (S.length > 0) { + // Ensure the exact same order all the time with the same inputs + S.sort(); + var n = S.shift(); + L.push(n); + var myInverseEdges = inverseEdges[n] || []; + myInverseEdges.forEach(function (m) { + outgoingEdgeCount[m]--; + if (outgoingEdgeCount[m] === 0) { + delete outgoingEdgeCount[m]; + S.push(m); + } + }); + } + if (Object.keys(outgoingEdgeCount).length > 0) { + throw new Error('Cannot do topological sort on cyclic graph, remaining nodes: ' + Object.keys(outgoingEdgeCount)); + } + return L; +} diff --git a/build/lib/bundle.ts b/build/lib/bundle.ts index 748acd6e30841..e188ce44de1d7 100644 --- a/build/lib/bundle.ts +++ b/build/lib/bundle.ts @@ -91,6 +91,7 @@ interface IPartialBundleResult { export interface ILoaderConfig { isBuild?: boolean; + paths?: { [path: string]: any; }; } /** @@ -121,6 +122,9 @@ export function bundle(entryPoints: IEntryPoint[], config: ILoaderConfig, callba var loader: any = loaderModule.exports; config.isBuild = true; + config.paths = config.paths || {}; + config.paths['vs/nls'] = 'out-build/vs/nls.build'; + config.paths['vs/css'] = 'out-build/vs/css.build'; loader.config(config); loader(['require'], (localRequire) => { @@ -227,7 +231,7 @@ function emitEntryPoints(modules: IBuildModuleInfo[], entryPoints: IEntryPointMa return { // TODO@TS 2.1.2 - files: extractStrings(/*removeDuplicateTSBoilerplate(*/result/*)*/), + files: extractStrings(removeDuplicateTSBoilerplate(result)), bundleData: bundleData }; } @@ -329,7 +333,7 @@ function extractStrings(destFiles: IConcatFile[]): IConcatFile[] { function removeDuplicateTSBoilerplate(destFiles: IConcatFile[]): IConcatFile[] { // Taken from typescript compiler => emitFiles let BOILERPLATE = [ - { start: /^var __extends/, end: /^};$/ }, + { start: /^var __extends/, end: /^}\)\(\);$/ }, { start: /^var __assign/, end: /^};$/ }, { start: /^var __decorate/, end: /^};$/ }, { start: /^var __metadata/, end: /^};$/ }, diff --git a/build/lib/compilation.js b/build/lib/compilation.js index e49862b47782d..715ceeb4ede77 100644 --- a/build/lib/compilation.js +++ b/build/lib/compilation.js @@ -1,171 +1,170 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; -Object.defineProperty(exports, "__esModule", { value: true }); -var gulp = require("gulp"); -var tsb = require("gulp-tsb"); -var es = require("event-stream"); -var watch = require('./watch'); -var nls = require("./nls"); -var util = require("./util"); -var reporter_1 = require("./reporter"); -var path = require("path"); -var bom = require("gulp-bom"); -var sourcemaps = require("gulp-sourcemaps"); -var _ = require("underscore"); -var monacodts = require("../monaco/api"); -var fs = require("fs"); -var reporter = reporter_1.createReporter(); -var rootDir = path.join(__dirname, '../../src'); -var options = require('../../src/tsconfig.json').compilerOptions; -options.verbose = false; -options.sourceMap = true; -options.rootDir = rootDir; -options.sourceRoot = util.toFileUri(rootDir); -function createCompile(build, emitError) { - var opts = _.clone(options); - opts.inlineSources = !!build; - opts.noFilesystemLookup = true; - var ts = tsb.create(opts, null, null, function (err) { return reporter(err.toString()); }); - return function (token) { - var utf8Filter = util.filter(function (data) { return /(\/|\\)test(\/|\\).*utf8/.test(data.path); }); - var tsFilter = util.filter(function (data) { return /\.ts$/.test(data.path); }); - var noDeclarationsFilter = util.filter(function (data) { return !(/\.d\.ts$/.test(data.path)); }); - var input = es.through(); - var output = input - .pipe(utf8Filter) - .pipe(bom()) - .pipe(utf8Filter.restore) - .pipe(tsFilter) - .pipe(util.loadSourcemaps()) - .pipe(ts(token)) - .pipe(build ? reloadTypeScriptNodeModule() : es.through()) - .pipe(noDeclarationsFilter) - .pipe(build ? nls() : es.through()) - .pipe(noDeclarationsFilter.restore) - .pipe(sourcemaps.write('.', { - addComment: false, - includeContent: !!build, - sourceRoot: options.sourceRoot - })) - .pipe(tsFilter.restore) - .pipe(reporter.end(emitError)); - return es.duplex(input, output); - }; -} -function compileTask(out, build) { - return function () { - var compile = createCompile(build, true); - var src = es.merge(gulp.src('src/**', { base: 'src' }), gulp.src('node_modules/typescript/lib/lib.d.ts'), gulp.src('node_modules/@types/**/index.d.ts')); - return src - .pipe(compile()) - .pipe(gulp.dest(out)) - .pipe(monacodtsTask(out, false)); - }; -} -exports.compileTask = compileTask; -function watchTask(out, build) { - return function () { - var compile = createCompile(build); - var src = es.merge(gulp.src('src/**', { base: 'src' }), gulp.src('node_modules/typescript/lib/lib.d.ts'), gulp.src('node_modules/@types/**/index.d.ts')); - var watchSrc = watch('src/**', { base: 'src' }); - return watchSrc - .pipe(util.incremental(compile, src, true)) - .pipe(gulp.dest(out)) - .pipe(monacodtsTask(out, true)); - }; -} -exports.watchTask = watchTask; -function reloadTypeScriptNodeModule() { - var util = require('gulp-util'); - function log(message) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } - util.log.apply(util, [util.colors.cyan('[memory watch dog]'), message].concat(rest)); - } - function heapUsed() { - return (process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2) + ' MB'; - } - return es.through(function (data) { - this.emit('data', data); - }, function () { - log('memory usage after compilation finished: ' + heapUsed()); - // It appears we are running into some variant of - // https://bugs.chromium.org/p/v8/issues/detail?id=2073 - // - // Even though all references are dropped, some - // optimized methods in the TS compiler end up holding references - // to the entire TypeScript language host (>600MB) - // - // The idea is to force v8 to drop references to these - // optimized methods, by "reloading" the typescript node module - log('Reloading typescript node module...'); - var resolvedName = require.resolve('typescript'); - var originalModule = require.cache[resolvedName]; - delete require.cache[resolvedName]; - var newExports = require('typescript'); - require.cache[resolvedName] = originalModule; - for (var prop in newExports) { - if (newExports.hasOwnProperty(prop)) { - originalModule.exports[prop] = newExports[prop]; - } - } - log('typescript node module reloaded.'); - this.emit('end'); - }); -} -function monacodtsTask(out, isWatch) { - var neededFiles = {}; - monacodts.getFilesToWatch(out).forEach(function (filePath) { - filePath = path.normalize(filePath); - neededFiles[filePath] = true; - }); - var inputFiles = {}; - for (var filePath in neededFiles) { - if (/\bsrc(\/|\\)vs\b/.test(filePath)) { - // This file is needed from source => simply read it now - inputFiles[filePath] = fs.readFileSync(filePath).toString(); - } - } - var setInputFile = function (filePath, contents) { - if (inputFiles[filePath] === contents) { - // no change - return; - } - inputFiles[filePath] = contents; - var neededInputFilesCount = Object.keys(neededFiles).length; - var availableInputFilesCount = Object.keys(inputFiles).length; - if (neededInputFilesCount === availableInputFilesCount) { - run(); - } - }; - var run = function () { - var result = monacodts.run(out, inputFiles); - if (!result.isTheSame) { - if (isWatch) { - fs.writeFileSync(result.filePath, result.content); - } - else { - resultStream.emit('error', 'monaco.d.ts is no longer up to date. Please run gulp watch and commit the new file.'); - } - } - }; - var resultStream; - if (isWatch) { - watch('build/monaco/*').pipe(es.through(function () { - run(); - })); - } - resultStream = es.through(function (data) { - var filePath = path.normalize(data.path); - if (neededFiles[filePath]) { - setInputFile(filePath, data.contents.toString()); - } - this.emit('data', data); - }); - return resultStream; -} +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +var gulp = require("gulp"); +var tsb = require("gulp-tsb"); +var es = require("event-stream"); +var watch = require('./watch'); +var nls = require("./nls"); +var util = require("./util"); +var reporter_1 = require("./reporter"); +var path = require("path"); +var bom = require("gulp-bom"); +var sourcemaps = require("gulp-sourcemaps"); +var _ = require("underscore"); +var monacodts = require("../monaco/api"); +var fs = require("fs"); +var reporter = reporter_1.createReporter(); +var rootDir = path.join(__dirname, '../../src'); +var options = require('../../src/tsconfig.json').compilerOptions; +options.verbose = false; +options.sourceMap = true; +options.rootDir = rootDir; +options.sourceRoot = util.toFileUri(rootDir); +function createCompile(build, emitError) { + var opts = _.clone(options); + opts.inlineSources = !!build; + opts.noFilesystemLookup = true; + var ts = tsb.create(opts, null, null, function (err) { return reporter(err.toString()); }); + return function (token) { + var utf8Filter = util.filter(function (data) { return /(\/|\\)test(\/|\\).*utf8/.test(data.path); }); + var tsFilter = util.filter(function (data) { return /\.ts$/.test(data.path); }); + var noDeclarationsFilter = util.filter(function (data) { return !(/\.d\.ts$/.test(data.path)); }); + var input = es.through(); + var output = input + .pipe(utf8Filter) + .pipe(bom()) + .pipe(utf8Filter.restore) + .pipe(tsFilter) + .pipe(util.loadSourcemaps()) + .pipe(ts(token)) + .pipe(noDeclarationsFilter) + .pipe(build ? nls() : es.through()) + .pipe(noDeclarationsFilter.restore) + .pipe(sourcemaps.write('.', { + addComment: false, + includeContent: !!build, + sourceRoot: options.sourceRoot + })) + .pipe(tsFilter.restore) + .pipe(reporter.end(emitError)); + return es.duplex(input, output); + }; +} +function compileTask(out, build) { + return function () { + var compile = createCompile(build, true); + var src = es.merge(gulp.src('src/**', { base: 'src' }), gulp.src('node_modules/typescript/lib/lib.d.ts')); + return src + .pipe(compile()) + .pipe(gulp.dest(out)) + .pipe(monacodtsTask(out, false)); + }; +} +exports.compileTask = compileTask; +function watchTask(out, build) { + return function () { + var compile = createCompile(build); + var src = es.merge(gulp.src('src/**', { base: 'src' }), gulp.src('node_modules/typescript/lib/lib.d.ts')); + var watchSrc = watch('src/**', { base: 'src' }); + return watchSrc + .pipe(util.incremental(compile, src, true)) + .pipe(gulp.dest(out)) + .pipe(monacodtsTask(out, true)); + }; +} +exports.watchTask = watchTask; +function reloadTypeScriptNodeModule() { + var util = require('gulp-util'); + function log(message) { + var rest = []; + for (var _i = 1; _i < arguments.length; _i++) { + rest[_i - 1] = arguments[_i]; + } + util.log.apply(util, [util.colors.cyan('[memory watch dog]'), message].concat(rest)); + } + function heapUsed() { + return (process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2) + ' MB'; + } + return es.through(function (data) { + this.emit('data', data); + }, function () { + log('memory usage after compilation finished: ' + heapUsed()); + // It appears we are running into some variant of + // https://bugs.chromium.org/p/v8/issues/detail?id=2073 + // + // Even though all references are dropped, some + // optimized methods in the TS compiler end up holding references + // to the entire TypeScript language host (>600MB) + // + // The idea is to force v8 to drop references to these + // optimized methods, by "reloading" the typescript node module + log('Reloading typescript node module...'); + var resolvedName = require.resolve('typescript'); + var originalModule = require.cache[resolvedName]; + delete require.cache[resolvedName]; + var newExports = require('typescript'); + require.cache[resolvedName] = originalModule; + for (var prop in newExports) { + if (newExports.hasOwnProperty(prop)) { + originalModule.exports[prop] = newExports[prop]; + } + } + log('typescript node module reloaded.'); + this.emit('end'); + }); +} +function monacodtsTask(out, isWatch) { + var neededFiles = {}; + monacodts.getFilesToWatch(out).forEach(function (filePath) { + filePath = path.normalize(filePath); + neededFiles[filePath] = true; + }); + var inputFiles = {}; + for (var filePath in neededFiles) { + if (/\bsrc(\/|\\)vs\b/.test(filePath)) { + // This file is needed from source => simply read it now + inputFiles[filePath] = fs.readFileSync(filePath).toString(); + } + } + var setInputFile = function (filePath, contents) { + if (inputFiles[filePath] === contents) { + // no change + return; + } + inputFiles[filePath] = contents; + var neededInputFilesCount = Object.keys(neededFiles).length; + var availableInputFilesCount = Object.keys(inputFiles).length; + if (neededInputFilesCount === availableInputFilesCount) { + run(); + } + }; + var run = function () { + var result = monacodts.run(out, inputFiles); + if (!result.isTheSame) { + if (isWatch) { + fs.writeFileSync(result.filePath, result.content); + } + else { + resultStream.emit('error', 'monaco.d.ts is no longer up to date. Please run gulp watch and commit the new file.'); + } + } + }; + var resultStream; + if (isWatch) { + watch('build/monaco/*').pipe(es.through(function () { + run(); + })); + } + resultStream = es.through(function (data) { + var filePath = path.normalize(data.path); + if (neededFiles[filePath]) { + setInputFile(filePath, data.contents.toString()); + } + this.emit('data', data); + }); + return resultStream; +} diff --git a/build/lib/compilation.ts b/build/lib/compilation.ts index e347cc07d5a41..f1ca31f36e8fb 100644 --- a/build/lib/compilation.ts +++ b/build/lib/compilation.ts @@ -49,7 +49,7 @@ function createCompile(build: boolean, emitError?: boolean): (token?: util.ICanc .pipe(tsFilter) .pipe(util.loadSourcemaps()) .pipe(ts(token)) - .pipe(build ? reloadTypeScriptNodeModule() : es.through()) + // .pipe(build ? reloadTypeScriptNodeModule() : es.through()) .pipe(noDeclarationsFilter) .pipe(build ? nls() : es.through()) .pipe(noDeclarationsFilter.restore) @@ -73,7 +73,6 @@ export function compileTask(out: string, build: boolean): () => NodeJS.ReadWrite const src = es.merge( gulp.src('src/**', { base: 'src' }), gulp.src('node_modules/typescript/lib/lib.d.ts'), - gulp.src('node_modules/@types/**/index.d.ts') ); return src @@ -91,7 +90,6 @@ export function watchTask(out: string, build: boolean): () => NodeJS.ReadWriteSt const src = es.merge( gulp.src('src/**', { base: 'src' }), gulp.src('node_modules/typescript/lib/lib.d.ts'), - gulp.src('node_modules/@types/**/index.d.ts') ); const watchSrc = watch('src/**', { base: 'src' }); diff --git a/build/lib/extensions.js b/build/lib/extensions.js index e0a0d72788361..7989297a9470b 100644 --- a/build/lib/extensions.js +++ b/build/lib/extensions.js @@ -1,96 +1,117 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var event_stream_1 = require("event-stream"); -var assign = require("object-assign"); -var remote = require("gulp-remote-src"); -var flatmap = require('gulp-flatmap'); -var vzip = require('gulp-vinyl-zip'); -var filter = require('gulp-filter'); -var rename = require('gulp-rename'); -var util = require('gulp-util'); -var buffer = require('gulp-buffer'); -var json = require('gulp-json-editor'); -function error(err) { - var result = event_stream_1.through(); - setTimeout(function () { return result.emit('error', err); }); - return result; -} -var baseHeaders = { - 'X-Market-Client-Id': 'VSCode Build', - 'User-Agent': 'VSCode Build', -}; -function src(extensionName, version) { - var filterType = 7; - var value = extensionName; - var criterium = { filterType: filterType, value: value }; - var criteria = [criterium]; - var pageNumber = 1; - var pageSize = 1; - var sortBy = 0; - var sortOrder = 0; - var flags = 0x1 | 0x2 | 0x80; - var assetTypes = ['Microsoft.VisualStudio.Services.VSIXPackage']; - var filters = [{ criteria: criteria, pageNumber: pageNumber, pageSize: pageSize, sortBy: sortBy, sortOrder: sortOrder }]; - var body = JSON.stringify({ filters: filters, assetTypes: assetTypes, flags: flags }); - var headers = assign({}, baseHeaders, { - 'Content-Type': 'application/json', - 'Accept': 'application/json;api-version=3.0-preview.1', - 'Content-Length': body.length - }); - var options = { - base: 'https://marketplace.visualstudio.com/_apis/public/gallery', - requestOptions: { - method: 'POST', - gzip: true, - headers: headers, - body: body - } - }; - return remote('/extensionquery', options) - .pipe(flatmap(function (stream, f) { - var rawResult = f.contents.toString('utf8'); - var result = JSON.parse(rawResult); - var extension = result.results[0].extensions[0]; - if (!extension) { - return error("No such extension: " + extension); - } - var metadata = { - id: extension.extensionId, - publisherId: extension.publisher, - publisherDisplayName: extension.publisher.displayName - }; - var extensionVersion = extension.versions.filter(function (v) { return v.version === version; })[0]; - if (!extensionVersion) { - return error("No such extension version: " + extensionName + " @ " + version); - } - var asset = extensionVersion.files.filter(function (f) { return f.assetType === 'Microsoft.VisualStudio.Services.VSIXPackage'; })[0]; - if (!asset) { - return error("No VSIX found for extension version: " + extensionName + " @ " + version); - } - util.log('Downloading extension:', util.colors.yellow(extensionName + "@" + version), '...'); - var options = { - base: asset.source, - requestOptions: { - gzip: true, - headers: baseHeaders - } - }; - return remote('', options) - .pipe(flatmap(function (stream) { - var packageJsonFilter = filter('package.json', { restore: true }); - return stream - .pipe(vzip.src()) - .pipe(filter('extension/**')) - .pipe(rename(function (p) { return p.dirname = p.dirname.replace(/^extension\/?/, ''); })) - .pipe(packageJsonFilter) - .pipe(buffer()) - .pipe(json({ __metadata: metadata })) - .pipe(packageJsonFilter.restore); - })); - })); -} -exports.src = src; +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +var es = require("event-stream"); +var assign = require("object-assign"); +var remote = require("gulp-remote-src"); +var flatmap = require('gulp-flatmap'); +var vzip = require('gulp-vinyl-zip'); +var filter = require('gulp-filter'); +var rename = require('gulp-rename'); +var util = require('gulp-util'); +var buffer = require('gulp-buffer'); +var json = require('gulp-json-editor'); +var fs = require("fs"); +var path = require("path"); +var vsce = require("vsce"); +var File = require("vinyl"); +function fromLocal(extensionPath) { + var result = es.through(); + vsce.listFiles({ cwd: extensionPath }) + .then(function (fileNames) { + var files = fileNames + .map(function (fileName) { return path.join(extensionPath, fileName); }) + .map(function (filePath) { return new File({ + path: filePath, + base: extensionPath, + contents: fs.createReadStream(filePath) + }); }); + es.readArray(files).pipe(result); + }) + .catch(function (err) { return result.emit('error', err); }); + return result; +} +exports.fromLocal = fromLocal; +function error(err) { + var result = es.through(); + setTimeout(function () { return result.emit('error', err); }); + return result; +} +var baseHeaders = { + 'X-Market-Client-Id': 'VSCode Build', + 'User-Agent': 'VSCode Build', +}; +function fromMarketplace(extensionName, version) { + var filterType = 7; + var value = extensionName; + var criterium = { filterType: filterType, value: value }; + var criteria = [criterium]; + var pageNumber = 1; + var pageSize = 1; + var sortBy = 0; + var sortOrder = 0; + var flags = 0x1 | 0x2 | 0x80; + var assetTypes = ['Microsoft.VisualStudio.Services.VSIXPackage']; + var filters = [{ criteria: criteria, pageNumber: pageNumber, pageSize: pageSize, sortBy: sortBy, sortOrder: sortOrder }]; + var body = JSON.stringify({ filters: filters, assetTypes: assetTypes, flags: flags }); + var headers = assign({}, baseHeaders, { + 'Content-Type': 'application/json', + 'Accept': 'application/json;api-version=3.0-preview.1', + 'Content-Length': body.length + }); + var options = { + base: 'https://marketplace.visualstudio.com/_apis/public/gallery', + requestOptions: { + method: 'POST', + gzip: true, + headers: headers, + body: body + } + }; + return remote('/extensionquery', options) + .pipe(flatmap(function (stream, f) { + var rawResult = f.contents.toString('utf8'); + var result = JSON.parse(rawResult); + var extension = result.results[0].extensions[0]; + if (!extension) { + return error("No such extension: " + extension); + } + var metadata = { + id: extension.extensionId, + publisherId: extension.publisher, + publisherDisplayName: extension.publisher.displayName + }; + var extensionVersion = extension.versions.filter(function (v) { return v.version === version; })[0]; + if (!extensionVersion) { + return error("No such extension version: " + extensionName + " @ " + version); + } + var asset = extensionVersion.files.filter(function (f) { return f.assetType === 'Microsoft.VisualStudio.Services.VSIXPackage'; })[0]; + if (!asset) { + return error("No VSIX found for extension version: " + extensionName + " @ " + version); + } + util.log('Downloading extension:', util.colors.yellow(extensionName + "@" + version), '...'); + var options = { + base: asset.source, + requestOptions: { + gzip: true, + headers: baseHeaders + } + }; + return remote('', options) + .pipe(flatmap(function (stream) { + var packageJsonFilter = filter('package.json', { restore: true }); + return stream + .pipe(vzip.src()) + .pipe(filter('extension/**')) + .pipe(rename(function (p) { return p.dirname = p.dirname.replace(/^extension\/?/, ''); })) + .pipe(packageJsonFilter) + .pipe(buffer()) + .pipe(json({ __metadata: metadata })) + .pipe(packageJsonFilter.restore); + })); + })); +} +exports.fromMarketplace = fromMarketplace; diff --git a/build/lib/extensions.ts b/build/lib/extensions.ts index 7955c55eac073..17349f7ee940f 100644 --- a/build/lib/extensions.ts +++ b/build/lib/extensions.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { through } from 'event-stream'; +import * as es from 'event-stream'; import { Stream } from 'stream'; import assign = require('object-assign'); import remote = require('gulp-remote-src'); @@ -14,9 +14,33 @@ const rename = require('gulp-rename'); const util = require('gulp-util'); const buffer = require('gulp-buffer'); const json = require('gulp-json-editor'); +import * as fs from 'fs'; +import * as path from 'path'; +import * as vsce from 'vsce'; +import * as File from 'vinyl'; + +export function fromLocal(extensionPath: string): Stream { + const result = es.through(); + + vsce.listFiles({ cwd: extensionPath }) + .then(fileNames => { + const files = fileNames + .map(fileName => path.join(extensionPath, fileName)) + .map(filePath => new File({ + path: filePath, + base: extensionPath, + contents: fs.createReadStream(filePath) as any + })); + + es.readArray(files).pipe(result); + }) + .catch(err => result.emit('error', err)); + + return result; +} function error(err: any): Stream { - const result = through(); + const result = es.through(); setTimeout(() => result.emit('error', err)); return result; } @@ -26,7 +50,7 @@ const baseHeaders = { 'User-Agent': 'VSCode Build', }; -export function src(extensionName: string, version: string): Stream { +export function fromMarketplace(extensionName: string, version: string): Stream { const filterType = 7; const value = extensionName; const criterium = { filterType, value }; diff --git a/build/lib/git.js b/build/lib/git.js index 8b31b9a2e0f0e..e9a571b7c9b04 100644 --- a/build/lib/git.js +++ b/build/lib/git.js @@ -1,53 +1,53 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; -Object.defineProperty(exports, "__esModule", { value: true }); -var path = require("path"); -var fs = require("fs"); -/** - * Returns the sha1 commit version of a repository or undefined in case of failure. - */ -function getVersion(repo) { - var git = path.join(repo, '.git'); - var headPath = path.join(git, 'HEAD'); - var head; - try { - head = fs.readFileSync(headPath, 'utf8').trim(); - } - catch (e) { - return void 0; - } - if (/^[0-9a-f]{40}$/i.test(head)) { - return head; - } - var refMatch = /^ref: (.*)$/.exec(head); - if (!refMatch) { - return void 0; - } - var ref = refMatch[1]; - var refPath = path.join(git, ref); - try { - return fs.readFileSync(refPath, 'utf8').trim(); - } - catch (e) { - // noop - } - var packedRefsPath = path.join(git, 'packed-refs'); - var refsRaw; - try { - refsRaw = fs.readFileSync(packedRefsPath, 'utf8').trim(); - } - catch (e) { - return void 0; - } - var refsRegex = /^([0-9a-f]{40})\s+(.+)$/gm; - var refsMatch; - var refs = {}; - while (refsMatch = refsRegex.exec(refsRaw)) { - refs[refsMatch[2]] = refsMatch[1]; - } - return refs[ref]; -} -exports.getVersion = getVersion; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +var path = require("path"); +var fs = require("fs"); +/** + * Returns the sha1 commit version of a repository or undefined in case of failure. + */ +function getVersion(repo) { + var git = path.join(repo, '.git'); + var headPath = path.join(git, 'HEAD'); + var head; + try { + head = fs.readFileSync(headPath, 'utf8').trim(); + } + catch (e) { + return void 0; + } + if (/^[0-9a-f]{40}$/i.test(head)) { + return head; + } + var refMatch = /^ref: (.*)$/.exec(head); + if (!refMatch) { + return void 0; + } + var ref = refMatch[1]; + var refPath = path.join(git, ref); + try { + return fs.readFileSync(refPath, 'utf8').trim(); + } + catch (e) { + // noop + } + var packedRefsPath = path.join(git, 'packed-refs'); + var refsRaw; + try { + refsRaw = fs.readFileSync(packedRefsPath, 'utf8').trim(); + } + catch (e) { + return void 0; + } + var refsRegex = /^([0-9a-f]{40})\s+(.+)$/gm; + var refsMatch; + var refs = {}; + while (refsMatch = refsRegex.exec(refsRaw)) { + refs[refsMatch[2]] = refsMatch[1]; + } + return refs[ref]; +} +exports.getVersion = getVersion; diff --git a/build/lib/i18n.js b/build/lib/i18n.js index e0bfbe4b98779..c602385de748d 100644 --- a/build/lib/i18n.js +++ b/build/lib/i18n.js @@ -1,1049 +1,1001 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var path = require("path"); -var fs = require("fs"); -var event_stream_1 = require("event-stream"); -var File = require("vinyl"); -var Is = require("is"); -var xml2js = require("xml2js"); -var glob = require("glob"); -var http = require("http"); -var util = require('gulp-util'); -var iconv = require('iconv-lite'); -function log(message) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } - util.log.apply(util, [util.colors.green('[i18n]'), message].concat(rest)); -} -var LocalizeInfo; -(function (LocalizeInfo) { - function is(value) { - var candidate = value; - return Is.defined(candidate) && Is.string(candidate.key) && (Is.undef(candidate.comment) || (Is.array(candidate.comment) && candidate.comment.every(function (element) { return Is.string(element); }))); - } - LocalizeInfo.is = is; -})(LocalizeInfo || (LocalizeInfo = {})); -var BundledFormat; -(function (BundledFormat) { - function is(value) { - if (Is.undef(value)) { - return false; - } - var candidate = value; - var length = Object.keys(value).length; - return length === 3 && Is.defined(candidate.keys) && Is.defined(candidate.messages) && Is.defined(candidate.bundles); - } - BundledFormat.is = is; -})(BundledFormat || (BundledFormat = {})); -var PackageJsonFormat; -(function (PackageJsonFormat) { - function is(value) { - if (Is.undef(value) || !Is.object(value)) { - return false; - } - return Object.keys(value).every(function (key) { - var element = value[key]; - return Is.string(element) || (Is.object(element) && Is.defined(element.message) && Is.defined(element.comment)); - }); - } - PackageJsonFormat.is = is; -})(PackageJsonFormat || (PackageJsonFormat = {})); -var ModuleJsonFormat; -(function (ModuleJsonFormat) { - function is(value) { - var candidate = value; - return Is.defined(candidate) - && Is.array(candidate.messages) && candidate.messages.every(function (message) { return Is.string(message); }) - && Is.array(candidate.keys) && candidate.keys.every(function (key) { return Is.string(key) || LocalizeInfo.is(key); }); - } - ModuleJsonFormat.is = is; -})(ModuleJsonFormat || (ModuleJsonFormat = {})); -var Line = (function () { - function Line(indent) { - if (indent === void 0) { indent = 0; } - this.indent = indent; - this.buffer = []; - if (indent > 0) { - this.buffer.push(new Array(indent + 1).join(' ')); - } - } - Line.prototype.append = function (value) { - this.buffer.push(value); - return this; - }; - Line.prototype.toString = function () { - return this.buffer.join(''); - }; - return Line; -}()); -exports.Line = Line; -var TextModel = (function () { - function TextModel(contents) { - this._lines = contents.split(/\r\n|\r|\n/); - } - Object.defineProperty(TextModel.prototype, "lines", { - get: function () { - return this._lines; - }, - enumerable: true, - configurable: true - }); - return TextModel; -}()); -var XLF = (function () { - function XLF(project) { - this.project = project; - this.buffer = []; - this.files = Object.create(null); - } - XLF.prototype.toString = function () { - this.appendHeader(); - for (var file in this.files) { - this.appendNewLine("", 2); - for (var _i = 0, _a = this.files[file]; _i < _a.length; _i++) { - var item = _a[_i]; - this.addStringItem(item); - } - this.appendNewLine('', 2); - } - this.appendFooter(); - return this.buffer.join('\r\n'); - }; - XLF.prototype.addFile = function (original, keys, messages) { - this.files[original] = []; - var existingKeys = []; - for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { - var key = keys_1[_i]; - // Ignore duplicate keys because Transifex does not populate those with translated values. - if (existingKeys.indexOf(key) !== -1) { - continue; - } - existingKeys.push(key); - var message = encodeEntities(messages[keys.indexOf(key)]); - var comment = undefined; - // Check if the message contains description (if so, it becomes an object type in JSON) - if (Is.string(key)) { - this.files[original].push({ id: key, message: message, comment: comment }); - } - else { - if (key['comment'] && key['comment'].length > 0) { - comment = key['comment'].map(function (comment) { return encodeEntities(comment); }).join('\r\n'); - } - this.files[original].push({ id: key['key'], message: message, comment: comment }); - } - } - }; - XLF.prototype.addStringItem = function (item) { - if (!item.id || !item.message) { - throw new Error('No item ID or value specified.'); - } - this.appendNewLine("", 4); - this.appendNewLine("" + item.message + "", 6); - if (item.comment) { - this.appendNewLine("" + item.comment + "", 6); - } - this.appendNewLine('', 4); - }; - XLF.prototype.appendHeader = function () { - this.appendNewLine('', 0); - this.appendNewLine('', 0); - }; - XLF.prototype.appendFooter = function () { - this.appendNewLine('', 0); - }; - XLF.prototype.appendNewLine = function (content, indent) { - var line = new Line(indent); - line.append(content); - this.buffer.push(line.toString()); - }; - return XLF; -}()); -XLF.parse = function (xlfString) { - return new Promise(function (resolve, reject) { - var parser = new xml2js.Parser(); - var files = []; - parser.parseString(xlfString, function (err, result) { - if (err) { - reject("Failed to parse XLIFF string. " + err); - } - var fileNodes = result['xliff']['file']; - if (!fileNodes) { - reject('XLIFF file does not contain "xliff" or "file" node(s) required for parsing.'); - } - fileNodes.forEach(function (file) { - var originalFilePath = file.$.original; - if (!originalFilePath) { - reject('XLIFF file node does not contain original attribute to determine the original location of the resource file.'); - } - var language = file.$['target-language'].toLowerCase(); - if (!language) { - reject('XLIFF file node does not contain target-language attribute to determine translated language.'); - } - var messages = {}; - var transUnits = file.body[0]['trans-unit']; - transUnits.forEach(function (unit) { - var key = unit.$.id; - if (!unit.target) { - return; // No translation available - } - var val = unit.target.toString(); - if (key && val) { - messages[key] = decodeEntities(val); - } - else { - reject('XLIFF file does not contain full localization data. ID or target translation for one of the trans-unit nodes is not present.'); - } - }); - files.push({ messages: messages, originalFilePath: originalFilePath, language: language }); - }); - resolve(files); - }); - }); -}; -exports.XLF = XLF; -var vscodeLanguages = [ - 'chs', - 'cht', - 'jpn', - 'kor', - 'deu', - 'fra', - 'esn', - 'rus', - 'ita' -]; -var iso639_3_to_2 = { - 'chs': 'zh-cn', - 'cht': 'zh-tw', - 'csy': 'cs-cz', - 'deu': 'de', - 'enu': 'en', - 'esn': 'es', - 'fra': 'fr', - 'hun': 'hu', - 'ita': 'it', - 'jpn': 'ja', - 'kor': 'ko', - 'nld': 'nl', - 'plk': 'pl', - 'ptb': 'pt-br', - 'ptg': 'pt', - 'rus': 'ru', - 'sve': 'sv-se', - 'trk': 'tr' -}; -/** - * Used to map Transifex to VS Code language code representation. - */ -var iso639_2_to_3 = { - 'zh-hans': 'chs', - 'zh-hant': 'cht', - 'cs-cz': 'csy', - 'de': 'deu', - 'en': 'enu', - 'es': 'esn', - 'fr': 'fra', - 'hu': 'hun', - 'it': 'ita', - 'ja': 'jpn', - 'ko': 'kor', - 'nl': 'nld', - 'pl': 'plk', - 'pt-br': 'ptb', - 'pt': 'ptg', - 'ru': 'rus', - 'sv-se': 'sve', - 'tr': 'trk' -}; -function sortLanguages(directoryNames) { - return directoryNames.map(function (dirName) { - var lower = dirName.toLowerCase(); - return { - name: lower, - iso639_2: iso639_3_to_2[lower] - }; - }).sort(function (a, b) { - if (!a.iso639_2 && !b.iso639_2) { - return 0; - } - if (!a.iso639_2) { - return -1; - } - if (!b.iso639_2) { - return 1; - } - return a.iso639_2 < b.iso639_2 ? -1 : (a.iso639_2 > b.iso639_2 ? 1 : 0); - }); -} -function stripComments(content) { - /** - * First capturing group matches double quoted string - * Second matches single quotes string - * Third matches block comments - * Fourth matches line comments - */ - var regexp = /("(?:[^\\\"]*(?:\\.)?)*")|('(?:[^\\\']*(?:\\.)?)*')|(\/\*(?:\r?\n|.)*?\*\/)|(\/{2,}.*?(?:(?:\r?\n)|$))/g; - var result = content.replace(regexp, function (match, m1, m2, m3, m4) { - // Only one of m1, m2, m3, m4 matches - if (m3) { - // A block comment. Replace with nothing - return ''; - } - else if (m4) { - // A line comment. If it ends in \r?\n then keep it. - var length_1 = m4.length; - if (length_1 > 2 && m4[length_1 - 1] === '\n') { - return m4[length_1 - 2] === '\r' ? '\r\n' : '\n'; - } - else { - return ''; - } - } - else { - // We match a string - return match; - } - }); - return result; -} -function escapeCharacters(value) { - var result = []; - for (var i = 0; i < value.length; i++) { - var ch = value.charAt(i); - switch (ch) { - case '\'': - result.push('\\\''); - break; - case '"': - result.push('\\"'); - break; - case '\\': - result.push('\\\\'); - break; - case '\n': - result.push('\\n'); - break; - case '\r': - result.push('\\r'); - break; - case '\t': - result.push('\\t'); - break; - case '\b': - result.push('\\b'); - break; - case '\f': - result.push('\\f'); - break; - default: - result.push(ch); - } - } - return result.join(''); -} -function processCoreBundleFormat(fileHeader, json, emitter) { - var keysSection = json.keys; - var messageSection = json.messages; - var bundleSection = json.bundles; - var statistics = Object.create(null); - var total = 0; - var defaultMessages = Object.create(null); - var modules = Object.keys(keysSection); - modules.forEach(function (module) { - var keys = keysSection[module]; - var messages = messageSection[module]; - if (!messages || keys.length !== messages.length) { - emitter.emit('error', "Message for module " + module + " corrupted. Mismatch in number of keys and messages."); - return; - } - var messageMap = Object.create(null); - defaultMessages[module] = messageMap; - keys.map(function (key, i) { - total++; - if (Is.string(key)) { - messageMap[key] = messages[i]; - } - else { - messageMap[key.key] = messages[i]; - } - }); - }); - var languageDirectory = path.join(__dirname, '..', '..', 'i18n'); - var languages = sortLanguages(fs.readdirSync(languageDirectory).filter(function (item) { return fs.statSync(path.join(languageDirectory, item)).isDirectory(); })); - languages.forEach(function (language) { - if (!language.iso639_2) { - return; - } - if (process.env['VSCODE_BUILD_VERBOSE']) { - log("Generating nls bundles for: " + language.iso639_2); - } - statistics[language.iso639_2] = 0; - var localizedModules = Object.create(null); - var cwd = path.join(languageDirectory, language.name, 'src'); - modules.forEach(function (module) { - var order = keysSection[module]; - var i18nFile = path.join(cwd, module) + '.i18n.json'; - var messages = null; - if (fs.existsSync(i18nFile)) { - var content = stripComments(fs.readFileSync(i18nFile, 'utf8')); - messages = JSON.parse(content); - } - else { - if (process.env['VSCODE_BUILD_VERBOSE']) { - log("No localized messages found for module " + module + ". Using default messages."); - } - messages = defaultMessages[module]; - statistics[language.iso639_2] = statistics[language.iso639_2] + Object.keys(messages).length; - } - var localizedMessages = []; - order.forEach(function (keyInfo) { - var key = null; - if (Is.string(keyInfo)) { - key = keyInfo; - } - else { - key = keyInfo.key; - } - var message = messages[key]; - if (!message) { - if (process.env['VSCODE_BUILD_VERBOSE']) { - log("No localized message found for key " + key + " in module " + module + ". Using default message."); - } - message = defaultMessages[module][key]; - statistics[language.iso639_2] = statistics[language.iso639_2] + 1; - } - localizedMessages.push(message); - }); - localizedModules[module] = localizedMessages; - }); - Object.keys(bundleSection).forEach(function (bundle) { - var modules = bundleSection[bundle]; - var contents = [ - fileHeader, - "define(\"" + bundle + ".nls." + language.iso639_2 + "\", {" - ]; - modules.forEach(function (module, index) { - contents.push("\t\"" + module + "\": ["); - var messages = localizedModules[module]; - if (!messages) { - emitter.emit('error', "Didn't find messages for module " + module + "."); - return; - } - messages.forEach(function (message, index) { - contents.push("\t\t\"" + escapeCharacters(message) + (index < messages.length ? '",' : '"')); - }); - contents.push(index < modules.length - 1 ? '\t],' : '\t]'); - }); - contents.push('});'); - emitter.emit('data', new File({ path: bundle + '.nls.' + language.iso639_2 + '.js', contents: new Buffer(contents.join('\n'), 'utf-8') })); - }); - }); - Object.keys(statistics).forEach(function (key) { - var value = statistics[key]; - log(key + " has " + value + " untranslated strings."); - }); - vscodeLanguages.forEach(function (language) { - var iso639_2 = iso639_3_to_2[language]; - if (!iso639_2) { - log("\tCouldn't find iso639 2 mapping for language " + language + ". Using default language instead."); - } - else { - var stats = statistics[iso639_2]; - if (Is.undef(stats)) { - log("\tNo translations found for language " + language + ". Using default language instead."); - } - } - }); -} -function processNlsFiles(opts) { - return event_stream_1.through(function (file) { - var fileName = path.basename(file.path); - if (fileName === 'nls.metadata.json') { - var json = null; - if (file.isBuffer()) { - json = JSON.parse(file.contents.toString('utf8')); - } - else { - this.emit('error', "Failed to read component file: " + file.relative); - } - if (BundledFormat.is(json)) { - processCoreBundleFormat(opts.fileHeader, json, this); - } - } - this.emit('data', file); - }); -} -exports.processNlsFiles = processNlsFiles; -function prepareXlfFiles(projectName, extensionName) { - return event_stream_1.through(function (file) { - if (!file.isBuffer()) { - throw new Error("Failed to read component file: " + file.relative); - } - var extension = path.extname(file.path); - if (extension === '.json') { - var json = JSON.parse(file.contents.toString('utf8')); - if (BundledFormat.is(json)) { - importBundleJson(file, json, this); - } - else if (PackageJsonFormat.is(json) || ModuleJsonFormat.is(json)) { - importModuleOrPackageJson(file, json, projectName, this, extensionName); - } - else { - throw new Error("JSON format cannot be deduced for " + file.relative + "."); - } - } - else if (extension === '.isl') { - importIsl(file, this); - } - }); -} -exports.prepareXlfFiles = prepareXlfFiles; -var editorProject = 'vscode-editor', workbenchProject = 'vscode-workbench', extensionsProject = 'vscode-extensions', setupProject = 'vscode-setup'; -/** - * Ensure to update those arrays when new resources are pushed to Transifex. - * Used because Transifex does not have API method to pull all project resources. - */ -var editorResources = [ - { name: 'vs/platform', project: editorProject }, - { name: 'vs/editor/contrib', project: editorProject }, - { name: 'vs/editor', project: editorProject }, - { name: 'vs/base', project: editorProject } -]; -var workbenchResources = [ - { name: 'vs/code', project: workbenchProject }, - { name: 'vs/workbench', project: workbenchProject }, - { name: 'vs/workbench/parts/cli', project: workbenchProject }, - { name: 'vs/workbench/parts/codeEditor', project: workbenchProject }, - { name: 'vs/workbench/parts/debug', project: workbenchProject }, - { name: 'vs/workbench/parts/emmet', project: workbenchProject }, - { name: 'vs/workbench/parts/execution', project: workbenchProject }, - { name: 'vs/workbench/parts/explorers', project: workbenchProject }, - { name: 'vs/workbench/parts/extensions', project: workbenchProject }, - { name: 'vs/workbench/parts/feedback', project: workbenchProject }, - { name: 'vs/workbench/parts/files', project: workbenchProject }, - { name: 'vs/workbench/parts/git', project: workbenchProject }, - { name: 'vs/workbench/parts/html', project: workbenchProject }, - { name: 'vs/workbench/parts/markers', project: workbenchProject }, - { name: 'vs/workbench/parts/nps', project: workbenchProject }, - { name: 'vs/workbench/parts/output', project: workbenchProject }, - { name: 'vs/workbench/parts/performance', project: workbenchProject }, - { name: 'vs/workbench/parts/preferences', project: workbenchProject }, - { name: 'vs/workbench/parts/quickopen', project: workbenchProject }, - { name: 'vs/workbench/parts/scm', project: workbenchProject }, - { name: 'vs/workbench/parts/search', project: workbenchProject }, - { name: 'vs/workbench/parts/snippets', project: workbenchProject }, - { name: 'vs/workbench/parts/tasks', project: workbenchProject }, - { name: 'vs/workbench/parts/terminal', project: workbenchProject }, - { name: 'vs/workbench/parts/themes', project: workbenchProject }, - { name: 'vs/workbench/parts/trust', project: workbenchProject }, - { name: 'vs/workbench/parts/update', project: workbenchProject }, - { name: 'vs/workbench/parts/watermark', project: workbenchProject }, - { name: 'vs/workbench/parts/welcome', project: workbenchProject }, - { name: 'vs/workbench/services/configuration', project: workbenchProject }, - { name: 'vs/workbench/services/editor', project: workbenchProject }, - { name: 'vs/workbench/services/files', project: workbenchProject }, - { name: 'vs/workbench/services/keybinding', project: workbenchProject }, - { name: 'vs/workbench/services/message', project: workbenchProject }, - { name: 'vs/workbench/services/mode', project: workbenchProject }, - { name: 'vs/workbench/services/textfile', project: workbenchProject }, - { name: 'vs/workbench/services/themes', project: workbenchProject }, - { name: 'setup_messages', project: workbenchProject } -]; -function getResource(sourceFile) { - var resource; - if (sourceFile.startsWith('vs/platform')) { - return { name: 'vs/platform', project: editorProject }; - } - else if (sourceFile.startsWith('vs/editor/contrib')) { - return { name: 'vs/editor/contrib', project: editorProject }; - } - else if (sourceFile.startsWith('vs/editor')) { - return { name: 'vs/editor', project: editorProject }; - } - else if (sourceFile.startsWith('vs/base')) { - return { name: 'vs/base', project: editorProject }; - } - else if (sourceFile.startsWith('vs/code')) { - return { name: 'vs/code', project: workbenchProject }; - } - else if (sourceFile.startsWith('vs/workbench/parts')) { - resource = sourceFile.split('/', 4).join('/'); - return { name: resource, project: workbenchProject }; - } - else if (sourceFile.startsWith('vs/workbench/services')) { - resource = sourceFile.split('/', 4).join('/'); - return { name: resource, project: workbenchProject }; - } - else if (sourceFile.startsWith('vs/workbench')) { - return { name: 'vs/workbench', project: workbenchProject }; - } - throw new Error("Could not identify the XLF bundle for " + sourceFile); -} -exports.getResource = getResource; -function importBundleJson(file, json, stream) { - var bundleXlfs = Object.create(null); - for (var source in json.keys) { - var projectResource = getResource(source); - var resource = projectResource.name; - var project = projectResource.project; - var keys = json.keys[source]; - var messages = json.messages[source]; - if (keys.length !== messages.length) { - throw new Error("There is a mismatch between keys and messages in " + file.relative); - } - var xlf = bundleXlfs[resource] ? bundleXlfs[resource] : bundleXlfs[resource] = new XLF(project); - xlf.addFile('src/' + source, keys, messages); - } - for (var resource in bundleXlfs) { - var newFilePath = bundleXlfs[resource].project + "/" + resource.replace(/\//g, '_') + ".xlf"; - var xlfFile = new File({ path: newFilePath, contents: new Buffer(bundleXlfs[resource].toString(), 'utf-8') }); - stream.emit('data', xlfFile); - } -} -// Keeps existing XLF instances and a state of how many files were already processed for faster file emission -var extensions = Object.create(null); -function importModuleOrPackageJson(file, json, projectName, stream, extensionName) { - if (ModuleJsonFormat.is(json) && json['keys'].length !== json['messages'].length) { - throw new Error("There is a mismatch between keys and messages in " + file.relative); - } - // Prepare the source path for attribute in XLF & extract messages from JSON - var formattedSourcePath = file.relative.replace(/\\/g, '/'); - var messages = Object.keys(json).map(function (key) { return json[key].toString(); }); - // Stores the amount of localization files to be transformed to XLF before the emission - var localizationFilesCount, originalFilePath; - // If preparing XLF for external extension, then use different glob pattern and source path - if (extensionName) { - localizationFilesCount = glob.sync('**/*.nls.json').length; - originalFilePath = "" + formattedSourcePath.substr(0, formattedSourcePath.length - '.nls.json'.length); - } - else { - // Used for vscode/extensions folder - extensionName = formattedSourcePath.split('/')[0]; - localizationFilesCount = glob.sync("./extensions/" + extensionName + "/**/*.nls.json").length; - originalFilePath = "extensions/" + formattedSourcePath.substr(0, formattedSourcePath.length - '.nls.json'.length); - } - var extension = extensions[extensionName] ? - extensions[extensionName] : extensions[extensionName] = { xlf: new XLF(projectName), processed: 0 }; - if (ModuleJsonFormat.is(json)) { - extension.xlf.addFile(originalFilePath, json['keys'], json['messages']); - } - else { - extension.xlf.addFile(originalFilePath, Object.keys(json), messages); - } - // Check if XLF is populated with file nodes to emit it - if (++extensions[extensionName].processed === localizationFilesCount) { - var newFilePath = path.join(projectName, extensionName + '.xlf'); - var xlfFile = new File({ path: newFilePath, contents: new Buffer(extension.xlf.toString(), 'utf-8') }); - stream.emit('data', xlfFile); - } -} -function importIsl(file, stream) { - var projectName, resourceFile; - if (path.basename(file.path) === 'Default.isl') { - projectName = setupProject; - resourceFile = 'setup_default.xlf'; - } - else { - projectName = workbenchProject; - resourceFile = 'setup_messages.xlf'; - } - var xlf = new XLF(projectName), keys = [], messages = []; - var model = new TextModel(file.contents.toString()); - var inMessageSection = false; - model.lines.forEach(function (line) { - if (line.length === 0) { - return; - } - var firstChar = line.charAt(0); - switch (firstChar) { - case ';': - // Comment line; - return; - case '[': - inMessageSection = '[Messages]' === line || '[CustomMessages]' === line; - return; - } - if (!inMessageSection) { - return; - } - var sections = line.split('='); - if (sections.length !== 2) { - throw new Error("Badly formatted message found: " + line); - } - else { - var key = sections[0]; - var value = sections[1]; - if (key.length > 0 && value.length > 0) { - keys.push(key); - messages.push(value); - } - } - }); - var originalPath = file.path.substring(file.cwd.length + 1, file.path.split('.')[0].length).replace(/\\/g, '/'); - xlf.addFile(originalPath, keys, messages); - // Emit only upon all ISL files combined into single XLF instance - var newFilePath = path.join(projectName, resourceFile); - var xlfFile = new File({ path: newFilePath, contents: new Buffer(xlf.toString(), 'utf-8') }); - stream.emit('data', xlfFile); -} -function pushXlfFiles(apiHostname, username, password) { - var tryGetPromises = []; - var updateCreatePromises = []; - return event_stream_1.through(function (file) { - var project = path.dirname(file.relative); - var fileName = path.basename(file.path); - var slug = fileName.substr(0, fileName.length - '.xlf'.length); - var credentials = username + ":" + password; - // Check if resource already exists, if not, then create it. - var promise = tryGetResource(project, slug, apiHostname, credentials); - tryGetPromises.push(promise); - promise.then(function (exists) { - if (exists) { - promise = updateResource(project, slug, file, apiHostname, credentials); - } - else { - promise = createResource(project, slug, file, apiHostname, credentials); - } - updateCreatePromises.push(promise); - }); - }, function () { - var _this = this; - // End the pipe only after all the communication with Transifex API happened - Promise.all(tryGetPromises).then(function () { - Promise.all(updateCreatePromises).then(function () { - _this.emit('end'); - }).catch(function (reason) { throw new Error(reason); }); - }).catch(function (reason) { throw new Error(reason); }); - }); -} -exports.pushXlfFiles = pushXlfFiles; -function tryGetResource(project, slug, apiHostname, credentials) { - return new Promise(function (resolve, reject) { - var options = { - hostname: apiHostname, - path: "/api/2/project/" + project + "/resource/" + slug + "/?details", - auth: credentials, - method: 'GET' - }; - var request = http.request(options, function (response) { - if (response.statusCode === 404) { - resolve(false); - } - else if (response.statusCode === 200) { - resolve(true); - } - else { - reject("Failed to query resource " + project + "/" + slug + ". Response: " + response.statusCode + " " + response.statusMessage); - } - }); - request.on('error', function (err) { - reject("Failed to get " + project + "/" + slug + " on Transifex: " + err); - }); - request.end(); - }); -} -function createResource(project, slug, xlfFile, apiHostname, credentials) { - return new Promise(function (resolve, reject) { - var data = JSON.stringify({ - 'content': xlfFile.contents.toString(), - 'name': slug, - 'slug': slug, - 'i18n_type': 'XLIFF' - }); - var options = { - hostname: apiHostname, - path: "/api/2/project/" + project + "/resources", - headers: { - 'Content-Type': 'application/json', - 'Content-Length': Buffer.byteLength(data) - }, - auth: credentials, - method: 'POST' - }; - var request = http.request(options, function (res) { - if (res.statusCode === 201) { - log("Resource " + project + "/" + slug + " successfully created on Transifex."); - } - else { - reject("Something went wrong in the request creating " + slug + " in " + project + ". " + res.statusCode); - } - }); - request.on('error', function (err) { - reject("Failed to create " + project + "/" + slug + " on Transifex: " + err); - }); - request.write(data); - request.end(); - }); -} -/** - * The following link provides information about how Transifex handles updates of a resource file: - * https://dev.befoolish.co/tx-docs/public/projects/updating-content#what-happens-when-you-update-files - */ -function updateResource(project, slug, xlfFile, apiHostname, credentials) { - return new Promise(function (resolve, reject) { - var data = JSON.stringify({ content: xlfFile.contents.toString() }); - var options = { - hostname: apiHostname, - path: "/api/2/project/" + project + "/resource/" + slug + "/content", - headers: { - 'Content-Type': 'application/json', - 'Content-Length': Buffer.byteLength(data) - }, - auth: credentials, - method: 'PUT' - }; - var request = http.request(options, function (res) { - if (res.statusCode === 200) { - res.setEncoding('utf8'); - var responseBuffer_1 = ''; - res.on('data', function (chunk) { - responseBuffer_1 += chunk; - }); - res.on('end', function () { - var response = JSON.parse(responseBuffer_1); - log("Resource " + project + "/" + slug + " successfully updated on Transifex. Strings added: " + response.strings_added + ", updated: " + response.strings_added + ", deleted: " + response.strings_added); - resolve(); - }); - } - else { - reject("Something went wrong in the request updating " + slug + " in " + project + ". " + res.statusCode); - } - }); - request.on('error', function (err) { - reject("Failed to update " + project + "/" + slug + " on Transifex: " + err); - }); - request.write(data); - request.end(); - }); -} -function obtainProjectResources(projectName) { - var resources = []; - if (projectName === editorProject) { - resources = editorResources; - } - else if (projectName === workbenchProject) { - resources = workbenchResources; - } - else if (projectName === extensionsProject) { - var extensionsToLocalize = glob.sync('./extensions/**/*.nls.json').map(function (extension) { return extension.split('/')[2]; }); - var resourcesToPull_1 = []; - extensionsToLocalize.forEach(function (extension) { - if (resourcesToPull_1.indexOf(extension) === -1) { - resourcesToPull_1.push(extension); - resources.push({ name: extension, project: projectName }); - } - }); - } - else if (projectName === setupProject) { - resources.push({ name: 'setup_default', project: setupProject }); - } - return resources; -} -function pullXlfFiles(projectName, apiHostname, username, password, languages, resources) { - if (!resources) { - resources = obtainProjectResources(projectName); - } - if (!resources) { - throw new Error('Transifex projects and resources must be defined to be able to pull translations from Transifex.'); - } - var credentials = username + ":" + password; - var expectedTranslationsCount = languages.length * resources.length; - var translationsRetrieved = 0, called = false; - return event_stream_1.readable(function (count, callback) { - // Mark end of stream when all resources were retrieved - if (translationsRetrieved === expectedTranslationsCount) { - return this.emit('end'); - } - if (!called) { - called = true; - var stream_1 = this; - // Retrieve XLF files from main projects - languages.map(function (language) { - resources.map(function (resource) { - retrieveResource(language, resource, apiHostname, credentials).then(function (file) { - stream_1.emit('data', file); - translationsRetrieved++; - }).catch(function (error) { throw new Error(error); }); - }); - }); - } - callback(); - }); -} -exports.pullXlfFiles = pullXlfFiles; -function retrieveResource(language, resource, apiHostname, credentials) { - return new Promise(function (resolve, reject) { - var slug = resource.name.replace(/\//g, '_'); - var project = resource.project; - var iso639 = language.toLowerCase(); - var options = { - hostname: apiHostname, - path: "/api/2/project/" + project + "/resource/" + slug + "/translation/" + iso639 + "?file&mode=onlyreviewed", - auth: credentials, - method: 'GET' - }; - var request = http.request(options, function (res) { - var xlfBuffer = []; - res.on('data', function (chunk) { return xlfBuffer.push(chunk); }); - res.on('end', function () { - if (res.statusCode === 200) { - resolve(new File({ contents: Buffer.concat(xlfBuffer), path: project + "/" + iso639_2_to_3[language] + "/" + slug + ".xlf" })); - } - reject(slug + " in " + project + " returned no data. Response code: " + res.statusCode + "."); - }); - }); - request.on('error', function (err) { - reject("Failed to query resource " + slug + " with the following error: " + err); - }); - request.end(); - }); -} -function prepareJsonFiles() { - var parsePromises = []; - return event_stream_1.through(function (xlf) { - var stream = this; - var parsePromise = XLF.parse(xlf.contents.toString()); - parsePromises.push(parsePromise); - parsePromise.then(function (resolvedFiles) { - resolvedFiles.forEach(function (file) { - var messages = file.messages, translatedFile; - // ISL file path always starts with 'build/' - if (file.originalFilePath.startsWith('build/')) { - var defaultLanguages = { 'zh-hans': true, 'zh-hant': true, 'ko': true }; - if (path.basename(file.originalFilePath) === 'Default' && !defaultLanguages[file.language]) { - return; - } - translatedFile = createIslFile('..', file.originalFilePath, messages, iso639_2_to_3[file.language]); - } - else { - translatedFile = createI18nFile(iso639_2_to_3[file.language], file.originalFilePath, messages); - } - stream.emit('data', translatedFile); - }); - }, function (rejectReason) { - throw new Error("XLF parsing error: " + rejectReason); - }); - }, function () { - var _this = this; - Promise.all(parsePromises) - .then(function () { _this.emit('end'); }) - .catch(function (reason) { throw new Error(reason); }); - }); -} -exports.prepareJsonFiles = prepareJsonFiles; -function createI18nFile(base, originalFilePath, messages) { - var content = [ - '/*---------------------------------------------------------------------------------------------', - ' * Copyright (c) Microsoft Corporation. All rights reserved.', - ' * Licensed under the MIT License. See License.txt in the project root for license information.', - ' *--------------------------------------------------------------------------------------------*/', - '// Do not edit this file. It is machine generated.' - ].join('\n') + '\n' + JSON.stringify(messages, null, '\t').replace(/\r\n/g, '\n'); - return new File({ - path: path.join(base, originalFilePath + '.i18n.json'), - contents: new Buffer(content, 'utf8') - }); -} -var languageNames = { - 'chs': 'Simplified Chinese', - 'cht': 'Traditional Chinese', - 'kor': 'Korean' -}; -var languageIds = { - 'chs': '$0804', - 'cht': '$0404', - 'kor': '$0412' -}; -var encodings = { - 'chs': 'CP936', - 'cht': 'CP950', - 'jpn': 'CP932', - 'kor': 'CP949', - 'deu': 'CP1252', - 'fra': 'CP1252', - 'esn': 'CP1252', - 'rus': 'CP1251', - 'ita': 'CP1252' -}; -function createIslFile(base, originalFilePath, messages, language) { - var content = []; - var originalContent; - if (path.basename(originalFilePath) === 'Default') { - originalContent = new TextModel(fs.readFileSync(originalFilePath + '.isl', 'utf8')); - } - else { - originalContent = new TextModel(fs.readFileSync(originalFilePath + '.en.isl', 'utf8')); - } - originalContent.lines.forEach(function (line) { - if (line.length > 0) { - var firstChar = line.charAt(0); - if (firstChar === '[' || firstChar === ';') { - if (line === '; *** Inno Setup version 5.5.3+ English messages ***') { - content.push("; *** Inno Setup version 5.5.3+ " + languageNames[language] + " messages ***"); - } - else { - content.push(line); - } - } - else { - var sections = line.split('='); - var key = sections[0]; - var translated = line; - if (key) { - if (key === 'LanguageName') { - translated = key + "=" + languageNames[language]; - } - else if (key === 'LanguageID') { - translated = key + "=" + languageIds[language]; - } - else if (key === 'LanguageCodePage') { - translated = key + "=" + encodings[language].substr(2); - } - else { - var translatedMessage = messages[key]; - if (translatedMessage) { - translated = key + "=" + translatedMessage; - } - } - } - content.push(translated); - } - } - }); - var tag = iso639_3_to_2[language]; - var basename = path.basename(originalFilePath); - var filePath = path.join(base, path.dirname(originalFilePath), basename) + "." + tag + ".isl"; - return new File({ - path: filePath, - contents: iconv.encode(new Buffer(content.join('\r\n'), 'utf8'), encodings[language]) - }); -} -function encodeEntities(value) { - var result = []; - for (var i = 0; i < value.length; i++) { - var ch = value[i]; - switch (ch) { - case '<': - result.push('<'); - break; - case '>': - result.push('>'); - break; - case '&': - result.push('&'); - break; - default: - result.push(ch); - } - } - return result.join(''); -} -function decodeEntities(value) { - return value.replace(/</g, '<').replace(/>/g, '>').replace(/&/g, '&'); -} +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +var path = require("path"); +var fs = require("fs"); +var event_stream_1 = require("event-stream"); +var File = require("vinyl"); +var Is = require("is"); +var xml2js = require("xml2js"); +var glob = require("glob"); +var https = require("https"); +var util = require('gulp-util'); +var iconv = require('iconv-lite'); +function log(message) { + var rest = []; + for (var _i = 1; _i < arguments.length; _i++) { + rest[_i - 1] = arguments[_i]; + } + util.log.apply(util, [util.colors.green('[i18n]'), message].concat(rest)); +} +var LocalizeInfo; +(function (LocalizeInfo) { + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.key) && (Is.undef(candidate.comment) || (Is.array(candidate.comment) && candidate.comment.every(function (element) { return Is.string(element); }))); + } + LocalizeInfo.is = is; +})(LocalizeInfo || (LocalizeInfo = {})); +var BundledFormat; +(function (BundledFormat) { + function is(value) { + if (Is.undef(value)) { + return false; + } + var candidate = value; + var length = Object.keys(value).length; + return length === 3 && Is.defined(candidate.keys) && Is.defined(candidate.messages) && Is.defined(candidate.bundles); + } + BundledFormat.is = is; +})(BundledFormat || (BundledFormat = {})); +var PackageJsonFormat; +(function (PackageJsonFormat) { + function is(value) { + if (Is.undef(value) || !Is.object(value)) { + return false; + } + return Object.keys(value).every(function (key) { + var element = value[key]; + return Is.string(element) || (Is.object(element) && Is.defined(element.message) && Is.defined(element.comment)); + }); + } + PackageJsonFormat.is = is; +})(PackageJsonFormat || (PackageJsonFormat = {})); +var ModuleJsonFormat; +(function (ModuleJsonFormat) { + function is(value) { + var candidate = value; + return Is.defined(candidate) + && Is.array(candidate.messages) && candidate.messages.every(function (message) { return Is.string(message); }) + && Is.array(candidate.keys) && candidate.keys.every(function (key) { return Is.string(key) || LocalizeInfo.is(key); }); + } + ModuleJsonFormat.is = is; +})(ModuleJsonFormat || (ModuleJsonFormat = {})); +var Line = (function () { + function Line(indent) { + if (indent === void 0) { indent = 0; } + this.indent = indent; + this.buffer = []; + if (indent > 0) { + this.buffer.push(new Array(indent + 1).join(' ')); + } + } + Line.prototype.append = function (value) { + this.buffer.push(value); + return this; + }; + Line.prototype.toString = function () { + return this.buffer.join(''); + }; + return Line; +}()); +exports.Line = Line; +var TextModel = (function () { + function TextModel(contents) { + this._lines = contents.split(/\r\n|\r|\n/); + } + Object.defineProperty(TextModel.prototype, "lines", { + get: function () { + return this._lines; + }, + enumerable: true, + configurable: true + }); + return TextModel; +}()); +var XLF = (function () { + function XLF(project) { + this.project = project; + this.buffer = []; + this.files = Object.create(null); + } + XLF.prototype.toString = function () { + this.appendHeader(); + for (var file in this.files) { + this.appendNewLine("", 2); + for (var _i = 0, _a = this.files[file]; _i < _a.length; _i++) { + var item = _a[_i]; + this.addStringItem(item); + } + this.appendNewLine('', 2); + } + this.appendFooter(); + return this.buffer.join('\r\n'); + }; + XLF.prototype.addFile = function (original, keys, messages) { + this.files[original] = []; + var existingKeys = []; + for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { + var key = keys_1[_i]; + // Ignore duplicate keys because Transifex does not populate those with translated values. + if (existingKeys.indexOf(key) !== -1) { + continue; + } + existingKeys.push(key); + var message = encodeEntities(messages[keys.indexOf(key)]); + var comment = undefined; + // Check if the message contains description (if so, it becomes an object type in JSON) + if (Is.string(key)) { + this.files[original].push({ id: key, message: message, comment: comment }); + } + else { + if (key['comment'] && key['comment'].length > 0) { + comment = key['comment'].map(function (comment) { return encodeEntities(comment); }).join('\r\n'); + } + this.files[original].push({ id: key['key'], message: message, comment: comment }); + } + } + }; + XLF.prototype.addStringItem = function (item) { + if (!item.id || !item.message) { + throw new Error('No item ID or value specified.'); + } + this.appendNewLine("", 4); + this.appendNewLine("" + item.message + "", 6); + if (item.comment) { + this.appendNewLine("" + item.comment + "", 6); + } + this.appendNewLine('', 4); + }; + XLF.prototype.appendHeader = function () { + this.appendNewLine('', 0); + this.appendNewLine('', 0); + }; + XLF.prototype.appendFooter = function () { + this.appendNewLine('', 0); + }; + XLF.prototype.appendNewLine = function (content, indent) { + var line = new Line(indent); + line.append(content); + this.buffer.push(line.toString()); + }; + return XLF; +}()); +XLF.parse = function (xlfString) { + return new Promise(function (resolve, reject) { + var parser = new xml2js.Parser(); + var files = []; + parser.parseString(xlfString, function (err, result) { + if (err) { + reject("Failed to parse XLIFF string. " + err); + } + var fileNodes = result['xliff']['file']; + if (!fileNodes) { + reject('XLIFF file does not contain "xliff" or "file" node(s) required for parsing.'); + } + fileNodes.forEach(function (file) { + var originalFilePath = file.$.original; + if (!originalFilePath) { + reject('XLIFF file node does not contain original attribute to determine the original location of the resource file.'); + } + var language = file.$['target-language'].toLowerCase(); + if (!language) { + reject('XLIFF file node does not contain target-language attribute to determine translated language.'); + } + var messages = {}; + var transUnits = file.body[0]['trans-unit']; + transUnits.forEach(function (unit) { + var key = unit.$.id; + if (!unit.target) { + return; // No translation available + } + var val = unit.target.toString(); + if (key && val) { + messages[key] = decodeEntities(val); + } + else { + reject('XLIFF file does not contain full localization data. ID or target translation for one of the trans-unit nodes is not present.'); + } + }); + files.push({ messages: messages, originalFilePath: originalFilePath, language: language }); + }); + resolve(files); + }); + }); +}; +exports.XLF = XLF; +var iso639_3_to_2 = { + 'chs': 'zh-cn', + 'cht': 'zh-tw', + 'csy': 'cs-cz', + 'deu': 'de', + 'enu': 'en', + 'esn': 'es', + 'fra': 'fr', + 'hun': 'hu', + 'ita': 'it', + 'jpn': 'ja', + 'kor': 'ko', + 'nld': 'nl', + 'plk': 'pl', + 'ptb': 'pt-br', + 'ptg': 'pt', + 'rus': 'ru', + 'sve': 'sv-se', + 'trk': 'tr' +}; +/** + * Used to map Transifex to VS Code language code representation. + */ +var iso639_2_to_3 = { + 'zh-hans': 'chs', + 'zh-hant': 'cht', + 'cs-cz': 'csy', + 'de': 'deu', + 'en': 'enu', + 'es': 'esn', + 'fr': 'fra', + 'hu': 'hun', + 'it': 'ita', + 'ja': 'jpn', + 'ko': 'kor', + 'nl': 'nld', + 'pl': 'plk', + 'pt-br': 'ptb', + 'pt': 'ptg', + 'ru': 'rus', + 'sv-se': 'sve', + 'tr': 'trk' +}; +function sortLanguages(directoryNames) { + return directoryNames.map(function (dirName) { + var lower = dirName.toLowerCase(); + return { + name: lower, + iso639_2: iso639_3_to_2[lower] + }; + }).sort(function (a, b) { + if (!a.iso639_2 && !b.iso639_2) { + return 0; + } + if (!a.iso639_2) { + return -1; + } + if (!b.iso639_2) { + return 1; + } + return a.iso639_2 < b.iso639_2 ? -1 : (a.iso639_2 > b.iso639_2 ? 1 : 0); + }); +} +function stripComments(content) { + /** + * First capturing group matches double quoted string + * Second matches single quotes string + * Third matches block comments + * Fourth matches line comments + */ + var regexp = /("(?:[^\\\"]*(?:\\.)?)*")|('(?:[^\\\']*(?:\\.)?)*')|(\/\*(?:\r?\n|.)*?\*\/)|(\/{2,}.*?(?:(?:\r?\n)|$))/g; + var result = content.replace(regexp, function (match, m1, m2, m3, m4) { + // Only one of m1, m2, m3, m4 matches + if (m3) { + // A block comment. Replace with nothing + return ''; + } + else if (m4) { + // A line comment. If it ends in \r?\n then keep it. + var length_1 = m4.length; + if (length_1 > 2 && m4[length_1 - 1] === '\n') { + return m4[length_1 - 2] === '\r' ? '\r\n' : '\n'; + } + else { + return ''; + } + } + else { + // We match a string + return match; + } + }); + return result; +} +function escapeCharacters(value) { + var result = []; + for (var i = 0; i < value.length; i++) { + var ch = value.charAt(i); + switch (ch) { + case '\'': + result.push('\\\''); + break; + case '"': + result.push('\\"'); + break; + case '\\': + result.push('\\\\'); + break; + case '\n': + result.push('\\n'); + break; + case '\r': + result.push('\\r'); + break; + case '\t': + result.push('\\t'); + break; + case '\b': + result.push('\\b'); + break; + case '\f': + result.push('\\f'); + break; + default: + result.push(ch); + } + } + return result.join(''); +} +function processCoreBundleFormat(fileHeader, languages, json, emitter) { + var keysSection = json.keys; + var messageSection = json.messages; + var bundleSection = json.bundles; + var statistics = Object.create(null); + var total = 0; + var defaultMessages = Object.create(null); + var modules = Object.keys(keysSection); + modules.forEach(function (module) { + var keys = keysSection[module]; + var messages = messageSection[module]; + if (!messages || keys.length !== messages.length) { + emitter.emit('error', "Message for module " + module + " corrupted. Mismatch in number of keys and messages."); + return; + } + var messageMap = Object.create(null); + defaultMessages[module] = messageMap; + keys.map(function (key, i) { + total++; + if (Is.string(key)) { + messageMap[key] = messages[i]; + } + else { + messageMap[key.key] = messages[i]; + } + }); + }); + var languageDirectory = path.join(__dirname, '..', '..', 'i18n'); + var languageDirs; + if (languages) { + languageDirs = sortLanguages(languages); + } + else { + languageDirs = sortLanguages(fs.readdirSync(languageDirectory).filter(function (item) { return fs.statSync(path.join(languageDirectory, item)).isDirectory(); })); + } + languageDirs.forEach(function (language) { + if (!language.iso639_2) { + return; + } + if (process.env['VSCODE_BUILD_VERBOSE']) { + log("Generating nls bundles for: " + language.iso639_2); + } + statistics[language.iso639_2] = 0; + var localizedModules = Object.create(null); + var cwd = path.join(languageDirectory, language.name, 'src'); + modules.forEach(function (module) { + var order = keysSection[module]; + var i18nFile = path.join(cwd, module) + '.i18n.json'; + var messages = null; + if (fs.existsSync(i18nFile)) { + var content = stripComments(fs.readFileSync(i18nFile, 'utf8')); + messages = JSON.parse(content); + } + else { + if (process.env['VSCODE_BUILD_VERBOSE']) { + log("No localized messages found for module " + module + ". Using default messages."); + } + messages = defaultMessages[module]; + statistics[language.iso639_2] = statistics[language.iso639_2] + Object.keys(messages).length; + } + var localizedMessages = []; + order.forEach(function (keyInfo) { + var key = null; + if (Is.string(keyInfo)) { + key = keyInfo; + } + else { + key = keyInfo.key; + } + var message = messages[key]; + if (!message) { + if (process.env['VSCODE_BUILD_VERBOSE']) { + log("No localized message found for key " + key + " in module " + module + ". Using default message."); + } + message = defaultMessages[module][key]; + statistics[language.iso639_2] = statistics[language.iso639_2] + 1; + } + localizedMessages.push(message); + }); + localizedModules[module] = localizedMessages; + }); + Object.keys(bundleSection).forEach(function (bundle) { + var modules = bundleSection[bundle]; + var contents = [ + fileHeader, + "define(\"" + bundle + ".nls." + language.iso639_2 + "\", {" + ]; + modules.forEach(function (module, index) { + contents.push("\t\"" + module + "\": ["); + var messages = localizedModules[module]; + if (!messages) { + emitter.emit('error', "Didn't find messages for module " + module + "."); + return; + } + messages.forEach(function (message, index) { + contents.push("\t\t\"" + escapeCharacters(message) + (index < messages.length ? '",' : '"')); + }); + contents.push(index < modules.length - 1 ? '\t],' : '\t]'); + }); + contents.push('});'); + emitter.emit('data', new File({ path: bundle + '.nls.' + language.iso639_2 + '.js', contents: new Buffer(contents.join('\n'), 'utf-8') })); + }); + }); + Object.keys(statistics).forEach(function (key) { + var value = statistics[key]; + log(key + " has " + value + " untranslated strings."); + }); + languageDirs.forEach(function (dir) { + var language = dir.name; + var iso639_2 = iso639_3_to_2[language]; + if (!iso639_2) { + log("\tCouldn't find iso639 2 mapping for language " + language + ". Using default language instead."); + } + else { + var stats = statistics[iso639_2]; + if (Is.undef(stats)) { + log("\tNo translations found for language " + language + ". Using default language instead."); + } + } + }); +} +function processNlsFiles(opts) { + return event_stream_1.through(function (file) { + var fileName = path.basename(file.path); + if (fileName === 'nls.metadata.json') { + var json = null; + if (file.isBuffer()) { + json = JSON.parse(file.contents.toString('utf8')); + } + else { + this.emit('error', "Failed to read component file: " + file.relative); + } + if (BundledFormat.is(json)) { + processCoreBundleFormat(opts.fileHeader, opts.languages, json, this); + } + } + this.emit('data', file); + }); +} +exports.processNlsFiles = processNlsFiles; +function prepareXlfFiles(projectName, extensionName) { + return event_stream_1.through(function (file) { + if (!file.isBuffer()) { + throw new Error("Failed to read component file: " + file.relative); + } + var extension = path.extname(file.path); + if (extension === '.json') { + var json = JSON.parse(file.contents.toString('utf8')); + if (BundledFormat.is(json)) { + importBundleJson(file, json, this); + } + else if (PackageJsonFormat.is(json) || ModuleJsonFormat.is(json)) { + importModuleOrPackageJson(file, json, projectName, this, extensionName); + } + else { + throw new Error("JSON format cannot be deduced for " + file.relative + "."); + } + } + else if (extension === '.isl') { + importIsl(file, this); + } + }); +} +exports.prepareXlfFiles = prepareXlfFiles; +var editorProject = 'vscode-editor', workbenchProject = 'vscode-workbench', extensionsProject = 'vscode-extensions', setupProject = 'vscode-setup'; +function getResource(sourceFile) { + var resource; + if (/^vs\/platform/.test(sourceFile)) { + return { name: 'vs/platform', project: editorProject }; + } + else if (/^vs\/editor\/contrib/.test(sourceFile)) { + return { name: 'vs/editor/contrib', project: editorProject }; + } + else if (/^vs\/editor/.test(sourceFile)) { + return { name: 'vs/editor', project: editorProject }; + } + else if (/^vs\/base/.test(sourceFile)) { + return { name: 'vs/base', project: editorProject }; + } + else if (/^vs\/code/.test(sourceFile)) { + return { name: 'vs/code', project: workbenchProject }; + } + else if (/^vs\/workbench\/parts/.test(sourceFile)) { + resource = sourceFile.split('/', 4).join('/'); + return { name: resource, project: workbenchProject }; + } + else if (/^vs\/workbench\/services/.test(sourceFile)) { + resource = sourceFile.split('/', 4).join('/'); + return { name: resource, project: workbenchProject }; + } + else if (/^vs\/workbench/.test(sourceFile)) { + return { name: 'vs/workbench', project: workbenchProject }; + } + throw new Error("Could not identify the XLF bundle for " + sourceFile); +} +exports.getResource = getResource; +function importBundleJson(file, json, stream) { + var bundleXlfs = Object.create(null); + for (var source in json.keys) { + var projectResource = getResource(source); + var resource = projectResource.name; + var project = projectResource.project; + var keys = json.keys[source]; + var messages = json.messages[source]; + if (keys.length !== messages.length) { + throw new Error("There is a mismatch between keys and messages in " + file.relative); + } + var xlf = bundleXlfs[resource] ? bundleXlfs[resource] : bundleXlfs[resource] = new XLF(project); + xlf.addFile('src/' + source, keys, messages); + } + for (var resource in bundleXlfs) { + var newFilePath = bundleXlfs[resource].project + "/" + resource.replace(/\//g, '_') + ".xlf"; + var xlfFile = new File({ path: newFilePath, contents: new Buffer(bundleXlfs[resource].toString(), 'utf-8') }); + stream.emit('data', xlfFile); + } +} +// Keeps existing XLF instances and a state of how many files were already processed for faster file emission +var extensions = Object.create(null); +function importModuleOrPackageJson(file, json, projectName, stream, extensionName) { + if (ModuleJsonFormat.is(json) && json['keys'].length !== json['messages'].length) { + throw new Error("There is a mismatch between keys and messages in " + file.relative); + } + // Prepare the source path for attribute in XLF & extract messages from JSON + var formattedSourcePath = file.relative.replace(/\\/g, '/'); + var messages = Object.keys(json).map(function (key) { return json[key].toString(); }); + // Stores the amount of localization files to be transformed to XLF before the emission + var localizationFilesCount, originalFilePath; + // If preparing XLF for external extension, then use different glob pattern and source path + if (extensionName) { + localizationFilesCount = glob.sync('**/*.nls.json').length; + originalFilePath = "" + formattedSourcePath.substr(0, formattedSourcePath.length - '.nls.json'.length); + } + else { + // Used for vscode/extensions folder + extensionName = formattedSourcePath.split('/')[0]; + localizationFilesCount = glob.sync("./extensions/" + extensionName + "/**/*.nls.json").length; + originalFilePath = "extensions/" + formattedSourcePath.substr(0, formattedSourcePath.length - '.nls.json'.length); + } + var extension = extensions[extensionName] ? + extensions[extensionName] : extensions[extensionName] = { xlf: new XLF(projectName), processed: 0 }; + // .nls.json can come with empty array of keys and messages, check for it + if (ModuleJsonFormat.is(json) && json.keys.length !== 0) { + extension.xlf.addFile(originalFilePath, json.keys, json.messages); + } + else if (PackageJsonFormat.is(json) && Object.keys(json).length !== 0) { + extension.xlf.addFile(originalFilePath, Object.keys(json), messages); + } + // Check if XLF is populated with file nodes to emit it + if (++extensions[extensionName].processed === localizationFilesCount) { + var newFilePath = path.join(projectName, extensionName + '.xlf'); + var xlfFile = new File({ path: newFilePath, contents: new Buffer(extension.xlf.toString(), 'utf-8') }); + stream.emit('data', xlfFile); + } +} +function importIsl(file, stream) { + var projectName, resourceFile; + if (path.basename(file.path) === 'Default.isl') { + projectName = setupProject; + resourceFile = 'setup_default.xlf'; + } + else { + projectName = workbenchProject; + resourceFile = 'setup_messages.xlf'; + } + var xlf = new XLF(projectName), keys = [], messages = []; + var model = new TextModel(file.contents.toString()); + var inMessageSection = false; + model.lines.forEach(function (line) { + if (line.length === 0) { + return; + } + var firstChar = line.charAt(0); + switch (firstChar) { + case ';': + // Comment line; + return; + case '[': + inMessageSection = '[Messages]' === line || '[CustomMessages]' === line; + return; + } + if (!inMessageSection) { + return; + } + var sections = line.split('='); + if (sections.length !== 2) { + throw new Error("Badly formatted message found: " + line); + } + else { + var key = sections[0]; + var value = sections[1]; + if (key.length > 0 && value.length > 0) { + keys.push(key); + messages.push(value); + } + } + }); + var originalPath = file.path.substring(file.cwd.length + 1, file.path.split('.')[0].length).replace(/\\/g, '/'); + xlf.addFile(originalPath, keys, messages); + // Emit only upon all ISL files combined into single XLF instance + var newFilePath = path.join(projectName, resourceFile); + var xlfFile = new File({ path: newFilePath, contents: new Buffer(xlf.toString(), 'utf-8') }); + stream.emit('data', xlfFile); +} +function pushXlfFiles(apiHostname, username, password) { + var tryGetPromises = []; + var updateCreatePromises = []; + return event_stream_1.through(function (file) { + var project = path.dirname(file.relative); + var fileName = path.basename(file.path); + var slug = fileName.substr(0, fileName.length - '.xlf'.length); + var credentials = username + ":" + password; + // Check if resource already exists, if not, then create it. + var promise = tryGetResource(project, slug, apiHostname, credentials); + tryGetPromises.push(promise); + promise.then(function (exists) { + if (exists) { + promise = updateResource(project, slug, file, apiHostname, credentials); + } + else { + promise = createResource(project, slug, file, apiHostname, credentials); + } + updateCreatePromises.push(promise); + }); + }, function () { + var _this = this; + // End the pipe only after all the communication with Transifex API happened + Promise.all(tryGetPromises).then(function () { + Promise.all(updateCreatePromises).then(function () { + _this.emit('end'); + }).catch(function (reason) { throw new Error(reason); }); + }).catch(function (reason) { throw new Error(reason); }); + }); +} +exports.pushXlfFiles = pushXlfFiles; +function tryGetResource(project, slug, apiHostname, credentials) { + return new Promise(function (resolve, reject) { + var options = { + hostname: apiHostname, + path: "/api/2/project/" + project + "/resource/" + slug + "/?details", + auth: credentials, + method: 'GET' + }; + var request = https.request(options, function (response) { + if (response.statusCode === 404) { + resolve(false); + } + else if (response.statusCode === 200) { + resolve(true); + } + else { + reject("Failed to query resource " + project + "/" + slug + ". Response: " + response.statusCode + " " + response.statusMessage); + } + }); + request.on('error', function (err) { + reject("Failed to get " + project + "/" + slug + " on Transifex: " + err); + }); + request.end(); + }); +} +function createResource(project, slug, xlfFile, apiHostname, credentials) { + return new Promise(function (resolve, reject) { + var data = JSON.stringify({ + 'content': xlfFile.contents.toString(), + 'name': slug, + 'slug': slug, + 'i18n_type': 'XLIFF' + }); + var options = { + hostname: apiHostname, + path: "/api/2/project/" + project + "/resources", + headers: { + 'Content-Type': 'application/json', + 'Content-Length': Buffer.byteLength(data) + }, + auth: credentials, + method: 'POST' + }; + var request = https.request(options, function (res) { + if (res.statusCode === 201) { + log("Resource " + project + "/" + slug + " successfully created on Transifex."); + } + else { + reject("Something went wrong in the request creating " + slug + " in " + project + ". " + res.statusCode); + } + }); + request.on('error', function (err) { + reject("Failed to create " + project + "/" + slug + " on Transifex: " + err); + }); + request.write(data); + request.end(); + }); +} +/** + * The following link provides information about how Transifex handles updates of a resource file: + * https://dev.befoolish.co/tx-docs/public/projects/updating-content#what-happens-when-you-update-files + */ +function updateResource(project, slug, xlfFile, apiHostname, credentials) { + return new Promise(function (resolve, reject) { + var data = JSON.stringify({ content: xlfFile.contents.toString() }); + var options = { + hostname: apiHostname, + path: "/api/2/project/" + project + "/resource/" + slug + "/content", + headers: { + 'Content-Type': 'application/json', + 'Content-Length': Buffer.byteLength(data) + }, + auth: credentials, + method: 'PUT' + }; + var request = https.request(options, function (res) { + if (res.statusCode === 200) { + res.setEncoding('utf8'); + var responseBuffer_1 = ''; + res.on('data', function (chunk) { + responseBuffer_1 += chunk; + }); + res.on('end', function () { + var response = JSON.parse(responseBuffer_1); + log("Resource " + project + "/" + slug + " successfully updated on Transifex. Strings added: " + response.strings_added + ", updated: " + response.strings_added + ", deleted: " + response.strings_added); + resolve(); + }); + } + else { + reject("Something went wrong in the request updating " + slug + " in " + project + ". " + res.statusCode); + } + }); + request.on('error', function (err) { + reject("Failed to update " + project + "/" + slug + " on Transifex: " + err); + }); + request.write(data); + request.end(); + }); +} +function obtainProjectResources(projectName) { + var resources = []; + if (projectName === editorProject) { + var json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'); + resources = JSON.parse(json).editor; + } + else if (projectName === workbenchProject) { + var json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'); + resources = JSON.parse(json).workbench; + } + else if (projectName === extensionsProject) { + var extensionsToLocalize = glob.sync('./extensions/**/*.nls.json').map(function (extension) { return extension.split('/')[2]; }); + var resourcesToPull_1 = []; + extensionsToLocalize.forEach(function (extension) { + if (resourcesToPull_1.indexOf(extension) === -1) { + resourcesToPull_1.push(extension); + resources.push({ name: extension, project: projectName }); + } + }); + } + else if (projectName === setupProject) { + resources.push({ name: 'setup_default', project: setupProject }); + } + return resources; +} +function pullXlfFiles(projectName, apiHostname, username, password, languages, resources) { + if (!resources) { + resources = obtainProjectResources(projectName); + } + if (!resources) { + throw new Error('Transifex projects and resources must be defined to be able to pull translations from Transifex.'); + } + var credentials = username + ":" + password; + var expectedTranslationsCount = languages.length * resources.length; + var translationsRetrieved = 0, called = false; + return event_stream_1.readable(function (count, callback) { + // Mark end of stream when all resources were retrieved + if (translationsRetrieved === expectedTranslationsCount) { + return this.emit('end'); + } + if (!called) { + called = true; + var stream_1 = this; + // Retrieve XLF files from main projects + languages.map(function (language) { + resources.map(function (resource) { + retrieveResource(language, resource, apiHostname, credentials).then(function (file) { + stream_1.emit('data', file); + translationsRetrieved++; + }).catch(function (error) { throw new Error(error); }); + }); + }); + } + callback(); + }); +} +exports.pullXlfFiles = pullXlfFiles; +function retrieveResource(language, resource, apiHostname, credentials) { + return new Promise(function (resolve, reject) { + var slug = resource.name.replace(/\//g, '_'); + var project = resource.project; + var iso639 = language.toLowerCase(); + var options = { + hostname: apiHostname, + path: "/api/2/project/" + project + "/resource/" + slug + "/translation/" + iso639 + "?file&mode=onlyreviewed", + auth: credentials, + method: 'GET' + }; + var request = https.request(options, function (res) { + var xlfBuffer = []; + res.on('data', function (chunk) { return xlfBuffer.push(chunk); }); + res.on('end', function () { + if (res.statusCode === 200) { + resolve(new File({ contents: Buffer.concat(xlfBuffer), path: project + "/" + iso639_2_to_3[language] + "/" + slug + ".xlf" })); + } + reject(slug + " in " + project + " returned no data. Response code: " + res.statusCode + "."); + }); + }); + request.on('error', function (err) { + reject("Failed to query resource " + slug + " with the following error: " + err); + }); + request.end(); + }); +} +function prepareJsonFiles() { + var parsePromises = []; + return event_stream_1.through(function (xlf) { + var stream = this; + var parsePromise = XLF.parse(xlf.contents.toString()); + parsePromises.push(parsePromise); + parsePromise.then(function (resolvedFiles) { + resolvedFiles.forEach(function (file) { + var messages = file.messages, translatedFile; + // ISL file path always starts with 'build/' + if (/^build\//.test(file.originalFilePath)) { + var defaultLanguages = { 'zh-hans': true, 'zh-hant': true, 'ko': true }; + if (path.basename(file.originalFilePath) === 'Default' && !defaultLanguages[file.language]) { + return; + } + translatedFile = createIslFile('..', file.originalFilePath, messages, iso639_2_to_3[file.language]); + } + else { + translatedFile = createI18nFile(iso639_2_to_3[file.language], file.originalFilePath, messages); + } + stream.emit('data', translatedFile); + }); + }, function (rejectReason) { + throw new Error("XLF parsing error: " + rejectReason); + }); + }, function () { + var _this = this; + Promise.all(parsePromises) + .then(function () { _this.emit('end'); }) + .catch(function (reason) { throw new Error(reason); }); + }); +} +exports.prepareJsonFiles = prepareJsonFiles; +function createI18nFile(base, originalFilePath, messages) { + var content = [ + '/*---------------------------------------------------------------------------------------------', + ' * Copyright (c) Microsoft Corporation. All rights reserved.', + ' * Licensed under the MIT License. See License.txt in the project root for license information.', + ' *--------------------------------------------------------------------------------------------*/', + '// Do not edit this file. It is machine generated.' + ].join('\n') + '\n' + JSON.stringify(messages, null, '\t').replace(/\r\n/g, '\n'); + return new File({ + path: path.join(base, originalFilePath + '.i18n.json'), + contents: new Buffer(content, 'utf8') + }); +} +var languageNames = { + 'chs': 'Simplified Chinese', + 'cht': 'Traditional Chinese', + 'kor': 'Korean' +}; +var languageIds = { + 'chs': '$0804', + 'cht': '$0404', + 'kor': '$0412' +}; +var encodings = { + 'chs': 'CP936', + 'cht': 'CP950', + 'jpn': 'CP932', + 'kor': 'CP949', + 'deu': 'CP1252', + 'fra': 'CP1252', + 'esn': 'CP1252', + 'rus': 'CP1251', + 'ita': 'CP1252', + 'ptb': 'CP1252', + 'hun': 'CP1250', + 'trk': 'CP1254' +}; +function createIslFile(base, originalFilePath, messages, language) { + var content = []; + var originalContent; + if (path.basename(originalFilePath) === 'Default') { + originalContent = new TextModel(fs.readFileSync(originalFilePath + '.isl', 'utf8')); + } + else { + originalContent = new TextModel(fs.readFileSync(originalFilePath + '.en.isl', 'utf8')); + } + originalContent.lines.forEach(function (line) { + if (line.length > 0) { + var firstChar = line.charAt(0); + if (firstChar === '[' || firstChar === ';') { + if (line === '; *** Inno Setup version 5.5.3+ English messages ***') { + content.push("; *** Inno Setup version 5.5.3+ " + languageNames[language] + " messages ***"); + } + else { + content.push(line); + } + } + else { + var sections = line.split('='); + var key = sections[0]; + var translated = line; + if (key) { + if (key === 'LanguageName') { + translated = key + "=" + languageNames[language]; + } + else if (key === 'LanguageID') { + translated = key + "=" + languageIds[language]; + } + else if (key === 'LanguageCodePage') { + translated = key + "=" + encodings[language].substr(2); + } + else { + var translatedMessage = messages[key]; + if (translatedMessage) { + translated = key + "=" + translatedMessage; + } + } + } + content.push(translated); + } + } + }); + var tag = iso639_3_to_2[language]; + var basename = path.basename(originalFilePath); + var filePath = path.join(base, path.dirname(originalFilePath), basename) + "." + tag + ".isl"; + return new File({ + path: filePath, + contents: iconv.encode(new Buffer(content.join('\r\n'), 'utf8'), encodings[language]) + }); +} +function encodeEntities(value) { + var result = []; + for (var i = 0; i < value.length; i++) { + var ch = value[i]; + switch (ch) { + case '<': + result.push('<'); + break; + case '>': + result.push('>'); + break; + case '&': + result.push('&'); + break; + default: + result.push(ch); + } + } + return result.join(''); +} +function decodeEntities(value) { + return value.replace(/</g, '<').replace(/>/g, '>').replace(/&/g, '&'); +} diff --git a/build/lib/i18n.resources.json b/build/lib/i18n.resources.json new file mode 100644 index 0000000000000..40b4073e40329 --- /dev/null +++ b/build/lib/i18n.resources.json @@ -0,0 +1,194 @@ +{ + "editor": [ + { + "name": "vs/platform", + "project": "vscode-editor" + }, + { + "name": "vs/editor/contrib", + "project": "vscode-editor" + }, + { + "name": "vs/editor", + "project": "vscode-editor" + }, + { + "name": "vs/base", + "project": "vscode-editor" + } + ], + "workbench": [ + { + "name": "vs/code", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/cli", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/codeEditor", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/debug", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/emmet", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/execution", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/explorers", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/extensions", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/feedback", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/files", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/html", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/markers", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/nps", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/output", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/performance", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/preferences", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/quickopen", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/relauncher", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/scm", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/search", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/snippets", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/surveys", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/tasks", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/terminal", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/themes", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/trust", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/update", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/views", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/watermark", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/welcome", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/services/configuration", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/services/crashReporter", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/services/editor", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/services/files", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/services/keybinding", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/services/message", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/services/mode", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/services/progress", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/services/textfile", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/services/themes", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/services/textMate", + "project": "vscode-workbench" + }, + { + "name": "setup_messages", + "project": "vscode-workbench" + } + ] +} \ No newline at end of file diff --git a/build/lib/i18n.ts b/build/lib/i18n.ts index 434d3301752df..abfe57c8afc95 100644 --- a/build/lib/i18n.ts +++ b/build/lib/i18n.ts @@ -12,7 +12,7 @@ import File = require('vinyl'); import * as Is from 'is'; import * as xml2js from 'xml2js'; import * as glob from 'glob'; -import * as http from 'http'; +import * as https from 'https'; var util = require('gulp-util'); var iconv = require('iconv-lite'); @@ -140,23 +140,23 @@ class TextModel { } export class XLF { - private buffer: string[]; + private buffer: string[]; private files: Map; - constructor(public project: string) { - this.buffer = []; + constructor(public project: string) { + this.buffer = []; this.files = Object.create(null); } - public toString(): string { - this.appendHeader(); + public toString(): string { + this.appendHeader(); for (let file in this.files) { this.appendNewLine(``, 2); for (let item of this.files[file]) { this.addStringItem(item); } - this.appendNewLine('', 2); + this.appendNewLine('', 2); } this.appendFooter(); @@ -190,43 +190,43 @@ export class XLF { } } - private addStringItem(item: Item): void { - if (!item.id || !item.message) { - throw new Error('No item ID or value specified.'); - } + private addStringItem(item: Item): void { + if (!item.id || !item.message) { + throw new Error('No item ID or value specified.'); + } - this.appendNewLine(``, 4); - this.appendNewLine(`${item.message}`, 6); + this.appendNewLine(``, 4); + this.appendNewLine(`${item.message}`, 6); - if (item.comment) { - this.appendNewLine(`${item.comment}`, 6); - } + if (item.comment) { + this.appendNewLine(`${item.comment}`, 6); + } - this.appendNewLine('', 4); + this.appendNewLine('', 4); } - private appendHeader(): void { - this.appendNewLine('', 0); - this.appendNewLine('', 0); + private appendHeader(): void { + this.appendNewLine('', 0); + this.appendNewLine('', 0); } - private appendFooter(): void { - this.appendNewLine('', 0); - } + private appendFooter(): void { + this.appendNewLine('', 0); + } - private appendNewLine(content: string, indent?: number): void { - let line = new Line(indent); - line.append(content); - this.buffer.push(line.toString()); - } + private appendNewLine(content: string, indent?: number): void { + let line = new Line(indent); + line.append(content); + this.buffer.push(line.toString()); + } - static parse = function(xlfString: string) : Promise { + static parse = function (xlfString: string): Promise { return new Promise((resolve, reject) => { let parser = new xml2js.Parser(); let files: { messages: Map, originalFilePath: string, language: string }[] = []; - parser.parseString(xlfString, function(err, result) { + parser.parseString(xlfString, function (err, result) { if (err) { reject(`Failed to parse XLIFF string. ${err}`); } @@ -272,18 +272,6 @@ export class XLF { }; } -const vscodeLanguages: string[] = [ - 'chs', - 'cht', - 'jpn', - 'kor', - 'deu', - 'fra', - 'esn', - 'rus', - 'ita' -]; - const iso639_3_to_2: Map = { 'chs': 'zh-cn', 'cht': 'zh-tw', @@ -372,7 +360,7 @@ function stripComments(content: string): string { // A line comment. If it ends in \r?\n then keep it. let length = m4.length; if (length > 2 && m4[length - 1] === '\n') { - return m4[length - 2] === '\r' ? '\r\n': '\n'; + return m4[length - 2] === '\r' ? '\r\n' : '\n'; } else { return ''; } @@ -384,11 +372,11 @@ function stripComments(content: string): string { return result; } -function escapeCharacters(value:string):string { - var result:string[] = []; +function escapeCharacters(value: string): string { + var result: string[] = []; for (var i = 0; i < value.length; i++) { var ch = value.charAt(i); - switch(ch) { + switch (ch) { case '\'': result.push('\\\''); break; @@ -420,7 +408,7 @@ function escapeCharacters(value:string):string { return result.join(''); } -function processCoreBundleFormat(fileHeader:string, json: BundledFormat, emitter: any) { +function processCoreBundleFormat(fileHeader: string, languages: string[], json: BundledFormat, emitter: any) { let keysSection = json.keys; let messageSection = json.messages; let bundleSection = json.bundles; @@ -450,8 +438,13 @@ function processCoreBundleFormat(fileHeader:string, json: BundledFormat, emitter }); let languageDirectory = path.join(__dirname, '..', '..', 'i18n'); - let languages = sortLanguages(fs.readdirSync(languageDirectory).filter((item) => fs.statSync(path.join(languageDirectory, item)).isDirectory())); - languages.forEach((language) => { + let languageDirs; + if (languages) { + languageDirs = sortLanguages(languages); + } else { + languageDirs = sortLanguages(fs.readdirSync(languageDirectory).filter((item) => fs.statSync(path.join(languageDirectory, item)).isDirectory())); + } + languageDirs.forEach((language) => { if (!language.iso639_2) { return; } @@ -511,19 +504,20 @@ function processCoreBundleFormat(fileHeader:string, json: BundledFormat, emitter return; } messages.forEach((message, index) => { - contents.push(`\t\t"${escapeCharacters(message)}${index < messages.length ? '",': '"'}`); + contents.push(`\t\t"${escapeCharacters(message)}${index < messages.length ? '",' : '"'}`); }); contents.push(index < modules.length - 1 ? '\t],' : '\t]'); }); contents.push('});'); - emitter.emit('data', new File( { path: bundle + '.nls.' + language.iso639_2 + '.js', contents: new Buffer(contents.join('\n'), 'utf-8') })); + emitter.emit('data', new File({ path: bundle + '.nls.' + language.iso639_2 + '.js', contents: new Buffer(contents.join('\n'), 'utf-8') })); }); }); Object.keys(statistics).forEach(key => { let value = statistics[key]; log(`${key} has ${value} untranslated strings.`); }); - vscodeLanguages.forEach(language => { + languageDirs.forEach(dir => { + const language = dir.name; let iso639_2 = iso639_3_to_2[language]; if (!iso639_2) { log(`\tCouldn't find iso639 2 mapping for language ${language}. Using default language instead.`); @@ -536,8 +530,8 @@ function processCoreBundleFormat(fileHeader:string, json: BundledFormat, emitter }); } -export function processNlsFiles(opts:{fileHeader:string;}): ThroughStream { - return through(function(file: File) { +export function processNlsFiles(opts: { fileHeader: string; languages: string[] }): ThroughStream { + return through(function (file: File) { let fileName = path.basename(file.path); if (fileName === 'nls.metadata.json') { let json = null; @@ -547,7 +541,7 @@ export function processNlsFiles(opts:{fileHeader:string;}): ThroughStream { this.emit('error', `Failed to read component file: ${file.relative}`); } if (BundledFormat.is(json)) { - processCoreBundleFormat(opts.fileHeader, json, this); + processCoreBundleFormat(opts.fileHeader, opts.languages, json, this); } } this.emit('data', file); @@ -584,81 +578,30 @@ const editorProject: string = 'vscode-editor', extensionsProject: string = 'vscode-extensions', setupProject: string = 'vscode-setup'; -/** - * Ensure to update those arrays when new resources are pushed to Transifex. - * Used because Transifex does not have API method to pull all project resources. - */ -const editorResources: Resource[] = [ - { name: 'vs/platform', project: editorProject }, - { name: 'vs/editor/contrib', project: editorProject }, - { name: 'vs/editor', project: editorProject }, - { name: 'vs/base', project: editorProject } -]; -const workbenchResources: Resource[] = [ - { name: 'vs/code', project: workbenchProject }, - { name: 'vs/workbench', project: workbenchProject }, - { name: 'vs/workbench/parts/cli', project: workbenchProject }, - { name: 'vs/workbench/parts/codeEditor', project: workbenchProject }, - { name: 'vs/workbench/parts/debug', project: workbenchProject }, - { name: 'vs/workbench/parts/emmet', project: workbenchProject }, - { name: 'vs/workbench/parts/execution', project: workbenchProject }, - { name: 'vs/workbench/parts/explorers', project: workbenchProject }, - { name: 'vs/workbench/parts/extensions', project: workbenchProject }, - { name: 'vs/workbench/parts/feedback', project: workbenchProject }, - { name: 'vs/workbench/parts/files', project: workbenchProject }, - { name: 'vs/workbench/parts/git', project: workbenchProject }, - { name: 'vs/workbench/parts/html', project: workbenchProject }, - { name: 'vs/workbench/parts/markers', project: workbenchProject }, - { name: 'vs/workbench/parts/nps', project: workbenchProject }, - { name: 'vs/workbench/parts/output', project: workbenchProject }, - { name: 'vs/workbench/parts/performance', project: workbenchProject }, - { name: 'vs/workbench/parts/preferences', project: workbenchProject }, - { name: 'vs/workbench/parts/quickopen', project: workbenchProject }, - { name: 'vs/workbench/parts/scm', project: workbenchProject }, - { name: 'vs/workbench/parts/search', project: workbenchProject }, - { name: 'vs/workbench/parts/snippets', project: workbenchProject }, - { name: 'vs/workbench/parts/tasks', project: workbenchProject }, - { name: 'vs/workbench/parts/terminal', project: workbenchProject }, - { name: 'vs/workbench/parts/themes', project: workbenchProject }, - { name: 'vs/workbench/parts/trust', project: workbenchProject }, - { name: 'vs/workbench/parts/update', project: workbenchProject }, - { name: 'vs/workbench/parts/watermark', project: workbenchProject }, - { name: 'vs/workbench/parts/welcome', project: workbenchProject }, - { name: 'vs/workbench/services/configuration', project: workbenchProject }, - { name: 'vs/workbench/services/editor', project: workbenchProject }, - { name: 'vs/workbench/services/files', project: workbenchProject }, - { name: 'vs/workbench/services/keybinding', project: workbenchProject }, - { name: 'vs/workbench/services/message', project: workbenchProject }, - { name: 'vs/workbench/services/mode', project: workbenchProject }, - { name: 'vs/workbench/services/textfile', project: workbenchProject }, - { name: 'vs/workbench/services/themes', project: workbenchProject }, - { name: 'setup_messages', project: workbenchProject } -]; - export function getResource(sourceFile: string): Resource { let resource: string; - if (sourceFile.startsWith('vs/platform')) { + if (/^vs\/platform/.test(sourceFile)) { return { name: 'vs/platform', project: editorProject }; - } else if (sourceFile.startsWith('vs/editor/contrib')) { + } else if (/^vs\/editor\/contrib/.test(sourceFile)) { return { name: 'vs/editor/contrib', project: editorProject }; - } else if (sourceFile.startsWith('vs/editor')) { + } else if (/^vs\/editor/.test(sourceFile)) { return { name: 'vs/editor', project: editorProject }; - } else if (sourceFile.startsWith('vs/base')) { + } else if (/^vs\/base/.test(sourceFile)) { return { name: 'vs/base', project: editorProject }; - } else if (sourceFile.startsWith('vs/code')) { + } else if (/^vs\/code/.test(sourceFile)) { return { name: 'vs/code', project: workbenchProject }; - } else if (sourceFile.startsWith('vs/workbench/parts')) { + } else if (/^vs\/workbench\/parts/.test(sourceFile)) { resource = sourceFile.split('/', 4).join('/'); return { name: resource, project: workbenchProject }; - } else if (sourceFile.startsWith('vs/workbench/services')) { + } else if (/^vs\/workbench\/services/.test(sourceFile)) { resource = sourceFile.split('/', 4).join('/'); return { name: resource, project: workbenchProject }; - } else if (sourceFile.startsWith('vs/workbench')) { + } else if (/^vs\/workbench/.test(sourceFile)) { return { name: 'vs/workbench', project: workbenchProject }; } - throw new Error (`Could not identify the XLF bundle for ${sourceFile}`); + throw new Error(`Could not identify the XLF bundle for ${sourceFile}`); } @@ -682,7 +625,7 @@ function importBundleJson(file: File, json: BundledFormat, stream: ThroughStream for (let resource in bundleXlfs) { const newFilePath = `${bundleXlfs[resource].project}/${resource.replace(/\//g, '_')}.xlf`; - const xlfFile = new File({ path: newFilePath, contents: new Buffer(bundleXlfs[resource].toString(), 'utf-8')}); + const xlfFile = new File({ path: newFilePath, contents: new Buffer(bundleXlfs[resource].toString(), 'utf-8') }); stream.emit('data', xlfFile); } } @@ -715,16 +658,17 @@ function importModuleOrPackageJson(file: File, json: ModuleJsonFormat | PackageJ let extension = extensions[extensionName] ? extensions[extensionName] : extensions[extensionName] = { xlf: new XLF(projectName), processed: 0 }; - if (ModuleJsonFormat.is(json)) { - extension.xlf.addFile(originalFilePath, json['keys'], json['messages']); - } else { + // .nls.json can come with empty array of keys and messages, check for it + if (ModuleJsonFormat.is(json) && json.keys.length !== 0) { + extension.xlf.addFile(originalFilePath, json.keys, json.messages); + } else if (PackageJsonFormat.is(json) && Object.keys(json).length !== 0) { extension.xlf.addFile(originalFilePath, Object.keys(json), messages); } // Check if XLF is populated with file nodes to emit it if (++extensions[extensionName].processed === localizationFilesCount) { const newFilePath = path.join(projectName, extensionName + '.xlf'); - const xlfFile = new File({ path: newFilePath, contents: new Buffer(extension.xlf.toString(), 'utf-8')}); + const xlfFile = new File({ path: newFilePath, contents: new Buffer(extension.xlf.toString(), 'utf-8') }); stream.emit('data', xlfFile); } } @@ -775,12 +719,12 @@ function importIsl(file: File, stream: ThroughStream) { } }); - const originalPath = file.path.substring(file.cwd.length+1, file.path.split('.')[0].length).replace(/\\/g, '/'); + const originalPath = file.path.substring(file.cwd.length + 1, file.path.split('.')[0].length).replace(/\\/g, '/'); xlf.addFile(originalPath, keys, messages); // Emit only upon all ISL files combined into single XLF instance const newFilePath = path.join(projectName, resourceFile); - const xlfFile = new File({ path: newFilePath, contents: new Buffer(xlf.toString(), 'utf-8')}); + const xlfFile = new File({ path: newFilePath, contents: new Buffer(xlf.toString(), 'utf-8') }); stream.emit('data', xlfFile); } @@ -788,7 +732,7 @@ export function pushXlfFiles(apiHostname: string, username: string, password: st let tryGetPromises = []; let updateCreatePromises = []; - return through(function(file: File) { + return through(function (file: File) { const project = path.dirname(file.relative); const fileName = path.basename(file.path); const slug = fileName.substr(0, fileName.length - '.xlf'.length); @@ -806,7 +750,7 @@ export function pushXlfFiles(apiHostname: string, username: string, password: st updateCreatePromises.push(promise); }); - }, function() { + }, function () { // End the pipe only after all the communication with Transifex API happened Promise.all(tryGetPromises).then(() => { Promise.all(updateCreatePromises).then(() => { @@ -825,7 +769,7 @@ function tryGetResource(project: string, slug: string, apiHostname: string, cred method: 'GET' }; - const request = http.request(options, (response) => { + const request = https.request(options, (response) => { if (response.statusCode === 404) { resolve(false); } else if (response.statusCode === 200) { @@ -861,7 +805,7 @@ function createResource(project: string, slug: string, xlfFile: File, apiHostnam method: 'POST' }; - let request = http.request(options, (res) => { + let request = https.request(options, (res) => { if (res.statusCode === 201) { log(`Resource ${project}/${slug} successfully created on Transifex.`); } else { @@ -881,7 +825,7 @@ function createResource(project: string, slug: string, xlfFile: File, apiHostnam * The following link provides information about how Transifex handles updates of a resource file: * https://dev.befoolish.co/tx-docs/public/projects/updating-content#what-happens-when-you-update-files */ -function updateResource(project: string, slug: string, xlfFile: File, apiHostname: string, credentials: string) : Promise { +function updateResource(project: string, slug: string, xlfFile: File, apiHostname: string, credentials: string): Promise { return new Promise((resolve, reject) => { const data = JSON.stringify({ content: xlfFile.contents.toString() }); const options = { @@ -895,7 +839,7 @@ function updateResource(project: string, slug: string, xlfFile: File, apiHostnam method: 'PUT' }; - let request = http.request(options, (res) => { + let request = https.request(options, (res) => { if (res.statusCode === 200) { res.setEncoding('utf8'); @@ -925,9 +869,11 @@ function obtainProjectResources(projectName: string): Resource[] { let resources: Resource[] = []; if (projectName === editorProject) { - resources = editorResources; + const json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'); + resources = JSON.parse(json).editor; } else if (projectName === workbenchProject) { - resources = workbenchResources; + const json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'); + resources = JSON.parse(json).workbench; } else if (projectName === extensionsProject) { let extensionsToLocalize: string[] = glob.sync('./extensions/**/*.nls.json').map(extension => extension.split('/')[2]); let resourcesToPull: string[] = []; @@ -957,7 +903,7 @@ export function pullXlfFiles(projectName: string, apiHostname: string, username: let expectedTranslationsCount = languages.length * resources.length; let translationsRetrieved = 0, called = false; - return readable(function(count, callback) { + return readable(function (count, callback) { // Mark end of stream when all resources were retrieved if (translationsRetrieved === expectedTranslationsCount) { return this.emit('end'); @@ -968,8 +914,8 @@ export function pullXlfFiles(projectName: string, apiHostname: string, username: const stream = this; // Retrieve XLF files from main projects - languages.map(function(language) { - resources.map(function(resource) { + languages.map(function (language) { + resources.map(function (resource) { retrieveResource(language, resource, apiHostname, credentials).then((file: File) => { stream.emit('data', file); translationsRetrieved++; @@ -994,15 +940,15 @@ function retrieveResource(language: string, resource: Resource, apiHostname, cre method: 'GET' }; - let request = http.request(options, (res) => { - let xlfBuffer: Buffer[] = []; - res.on('data', (chunk) => xlfBuffer.push(chunk)); - res.on('end', () => { - if (res.statusCode === 200) { - resolve(new File({ contents: Buffer.concat(xlfBuffer), path: `${project}/${iso639_2_to_3[language]}/${slug}.xlf` })); - } - reject(`${slug} in ${project} returned no data. Response code: ${res.statusCode}.`); - }); + let request = https.request(options, (res) => { + let xlfBuffer: Buffer[] = []; + res.on('data', (chunk: Buffer) => xlfBuffer.push(chunk)); + res.on('end', () => { + if (res.statusCode === 200) { + resolve(new File({ contents: Buffer.concat(xlfBuffer), path: `${project}/${iso639_2_to_3[language]}/${slug}.xlf` })); + } + reject(`${slug} in ${project} returned no data. Response code: ${res.statusCode}.`); + }); }); request.on('error', (err) => { reject(`Failed to query resource ${slug} with the following error: ${err}`); @@ -1014,17 +960,17 @@ function retrieveResource(language: string, resource: Resource, apiHostname, cre export function prepareJsonFiles(): ThroughStream { let parsePromises: Promise[] = []; - return through(function(xlf: File) { + return through(function (xlf: File) { let stream = this; let parsePromise = XLF.parse(xlf.contents.toString()); parsePromises.push(parsePromise); parsePromise.then( - function(resolvedFiles) { + function (resolvedFiles) { resolvedFiles.forEach(file => { let messages = file.messages, translatedFile; // ISL file path always starts with 'build/' - if (file.originalFilePath.startsWith('build/')) { + if (/^build\//.test(file.originalFilePath)) { const defaultLanguages = { 'zh-hans': true, 'zh-hant': true, 'ko': true }; if (path.basename(file.originalFilePath) === 'Default' && !defaultLanguages[file.language]) { return; @@ -1038,11 +984,11 @@ export function prepareJsonFiles(): ThroughStream { stream.emit('data', translatedFile); }); }, - function(rejectReason) { + function (rejectReason) { throw new Error(`XLF parsing error: ${rejectReason}`); } ); - }, function() { + }, function () { Promise.all(parsePromises) .then(() => { this.emit('end'); }) .catch(reason => { throw new Error(reason); }); @@ -1086,7 +1032,10 @@ const encodings: Map = { 'fra': 'CP1252', 'esn': 'CP1252', 'rus': 'CP1251', - 'ita': 'CP1252' + 'ita': 'CP1252', + 'ptb': 'CP1252', + 'hun': 'CP1250', + 'trk': 'CP1254' }; function createIslFile(base: string, originalFilePath: string, messages: Map, language: string): File { @@ -1162,6 +1111,6 @@ function encodeEntities(value: string): string { return result.join(''); } -function decodeEntities(value:string): string { +function decodeEntities(value: string): string { return value.replace(/</g, '<').replace(/>/g, '>').replace(/&/g, '&'); } \ No newline at end of file diff --git a/build/lib/nls.js b/build/lib/nls.js index e695200d1bde4..99a77feb182c2 100644 --- a/build/lib/nls.js +++ b/build/lib/nls.js @@ -1,355 +1,359 @@ -"use strict"; -var ts = require("./typescript/typescriptServices"); -var lazy = require("lazy.js"); -var event_stream_1 = require("event-stream"); -var File = require("vinyl"); -var sm = require("source-map"); -var assign = require("object-assign"); -var path = require("path"); -var CollectStepResult; -(function (CollectStepResult) { - CollectStepResult[CollectStepResult["Yes"] = 0] = "Yes"; - CollectStepResult[CollectStepResult["YesAndRecurse"] = 1] = "YesAndRecurse"; - CollectStepResult[CollectStepResult["No"] = 2] = "No"; - CollectStepResult[CollectStepResult["NoAndRecurse"] = 3] = "NoAndRecurse"; -})(CollectStepResult || (CollectStepResult = {})); -function collect(node, fn) { - var result = []; - function loop(node) { - var stepResult = fn(node); - if (stepResult === CollectStepResult.Yes || stepResult === CollectStepResult.YesAndRecurse) { - result.push(node); - } - if (stepResult === CollectStepResult.YesAndRecurse || stepResult === CollectStepResult.NoAndRecurse) { - ts.forEachChild(node, loop); - } - } - loop(node); - return result; -} -function clone(object) { - var result = {}; - for (var id in object) { - result[id] = object[id]; - } - return result; -} -function template(lines) { - var indent = '', wrap = ''; - if (lines.length > 1) { - indent = '\t'; - wrap = '\n'; - } - return "/*---------------------------------------------------------\n * Copyright (C) Microsoft Corporation. All rights reserved.\n *--------------------------------------------------------*/\ndefine([], [" + (wrap + lines.map(function (l) { return indent + l; }).join(',\n') + wrap) + "]);"; -} -/** - * Returns a stream containing the patched JavaScript and source maps. - */ -function nls() { - var input = event_stream_1.through(); - var output = input.pipe(event_stream_1.through(function (f) { - var _this = this; - if (!f.sourceMap) { - return this.emit('error', new Error("File " + f.relative + " does not have sourcemaps.")); - } - var source = f.sourceMap.sources[0]; - if (!source) { - return this.emit('error', new Error("File " + f.relative + " does not have a source in the source map.")); - } - var root = f.sourceMap.sourceRoot; - if (root) { - source = path.join(root, source); - } - var typescript = f.sourceMap.sourcesContent[0]; - if (!typescript) { - return this.emit('error', new Error("File " + f.relative + " does not have the original content in the source map.")); - } - nls.patchFiles(f, typescript).forEach(function (f) { return _this.emit('data', f); }); - })); - return event_stream_1.duplex(input, output); -} -function isImportNode(node) { - return node.kind === 212 /* ImportDeclaration */ || node.kind === 211 /* ImportEqualsDeclaration */; -} -(function (nls_1) { - function fileFrom(file, contents, path) { - if (path === void 0) { path = file.path; } - return new File({ - contents: new Buffer(contents), - base: file.base, - cwd: file.cwd, - path: path - }); - } - nls_1.fileFrom = fileFrom; - function mappedPositionFrom(source, lc) { - return { source: source, line: lc.line + 1, column: lc.character }; - } - nls_1.mappedPositionFrom = mappedPositionFrom; - function lcFrom(position) { - return { line: position.line - 1, character: position.column }; - } - nls_1.lcFrom = lcFrom; - var SingleFileServiceHost = (function () { - function SingleFileServiceHost(options, filename, contents) { - var _this = this; - this.options = options; - this.filename = filename; - this.getCompilationSettings = function () { return _this.options; }; - this.getScriptFileNames = function () { return [_this.filename]; }; - this.getScriptVersion = function () { return '1'; }; - this.getScriptSnapshot = function (name) { return name === _this.filename ? _this.file : _this.lib; }; - this.getCurrentDirectory = function () { return ''; }; - this.getDefaultLibFileName = function () { return 'lib.d.ts'; }; - this.file = ts.ScriptSnapshot.fromString(contents); - this.lib = ts.ScriptSnapshot.fromString(''); - } - return SingleFileServiceHost; - }()); - nls_1.SingleFileServiceHost = SingleFileServiceHost; - function isCallExpressionWithinTextSpanCollectStep(textSpan, node) { - if (!ts.textSpanContainsTextSpan({ start: node.pos, length: node.end - node.pos }, textSpan)) { - return CollectStepResult.No; - } - return node.kind === 160 /* CallExpression */ ? CollectStepResult.YesAndRecurse : CollectStepResult.NoAndRecurse; - } - function analyze(contents, options) { - if (options === void 0) { options = {}; } - var filename = 'file.ts'; - var serviceHost = new SingleFileServiceHost(assign(clone(options), { noResolve: true }), filename, contents); - var service = ts.createLanguageService(serviceHost); - var sourceFile = service.getSourceFile(filename); - // all imports - var imports = lazy(collect(sourceFile, function (n) { return isImportNode(n) ? CollectStepResult.YesAndRecurse : CollectStepResult.NoAndRecurse; })); - // import nls = require('vs/nls'); - var importEqualsDeclarations = imports - .filter(function (n) { return n.kind === 211 /* ImportEqualsDeclaration */; }) - .map(function (n) { return n; }) - .filter(function (d) { return d.moduleReference.kind === 222 /* ExternalModuleReference */; }) - .filter(function (d) { return d.moduleReference.expression.getText() === '\'vs/nls\''; }); - // import ... from 'vs/nls'; - var importDeclarations = imports - .filter(function (n) { return n.kind === 212 /* ImportDeclaration */; }) - .map(function (n) { return n; }) - .filter(function (d) { return d.moduleSpecifier.kind === 8 /* StringLiteral */; }) - .filter(function (d) { return d.moduleSpecifier.getText() === '\'vs/nls\''; }) - .filter(function (d) { return !!d.importClause && !!d.importClause.namedBindings; }); - var nlsExpressions = importEqualsDeclarations - .map(function (d) { return d.moduleReference.expression; }) - .concat(importDeclarations.map(function (d) { return d.moduleSpecifier; })) - .map(function (d) { return ({ - start: ts.getLineAndCharacterOfPosition(sourceFile, d.getStart()), - end: ts.getLineAndCharacterOfPosition(sourceFile, d.getEnd()) - }); }); - // `nls.localize(...)` calls - var nlsLocalizeCallExpressions = importDeclarations - .filter(function (d) { return d.importClause.namedBindings.kind === 214 /* NamespaceImport */; }) - .map(function (d) { return d.importClause.namedBindings.name; }) - .concat(importEqualsDeclarations.map(function (d) { return d.name; })) - .map(function (n) { return service.getReferencesAtPosition(filename, n.pos + 1); }) - .flatten() - .filter(function (r) { return !r.isWriteAccess; }) - .map(function (r) { return collect(sourceFile, function (n) { return isCallExpressionWithinTextSpanCollectStep(r.textSpan, n); }); }) - .map(function (a) { return lazy(a).last(); }) - .filter(function (n) { return !!n; }) - .map(function (n) { return n; }) - .filter(function (n) { return n.expression.kind === 158 /* PropertyAccessExpression */ && n.expression.name.getText() === 'localize'; }); - // `localize` named imports - var allLocalizeImportDeclarations = importDeclarations - .filter(function (d) { return d.importClause.namedBindings.kind === 215 /* NamedImports */; }) - .map(function (d) { return d.importClause.namedBindings.elements; }) - .flatten(); - // `localize` read-only references - var localizeReferences = allLocalizeImportDeclarations - .filter(function (d) { return d.name.getText() === 'localize'; }) - .map(function (n) { return service.getReferencesAtPosition(filename, n.pos + 1); }) - .flatten() - .filter(function (r) { return !r.isWriteAccess; }); - // custom named `localize` read-only references - var namedLocalizeReferences = allLocalizeImportDeclarations - .filter(function (d) { return d.propertyName && d.propertyName.getText() === 'localize'; }) - .map(function (n) { return service.getReferencesAtPosition(filename, n.name.pos + 1); }) - .flatten() - .filter(function (r) { return !r.isWriteAccess; }); - // find the deepest call expressions AST nodes that contain those references - var localizeCallExpressions = localizeReferences - .concat(namedLocalizeReferences) - .map(function (r) { return collect(sourceFile, function (n) { return isCallExpressionWithinTextSpanCollectStep(r.textSpan, n); }); }) - .map(function (a) { return lazy(a).last(); }) - .filter(function (n) { return !!n; }) - .map(function (n) { return n; }); - // collect everything - var localizeCalls = nlsLocalizeCallExpressions - .concat(localizeCallExpressions) - .map(function (e) { return e.arguments; }) - .filter(function (a) { return a.length > 1; }) - .sort(function (a, b) { return a[0].getStart() - b[0].getStart(); }) - .map(function (a) { return ({ - keySpan: { start: ts.getLineAndCharacterOfPosition(sourceFile, a[0].getStart()), end: ts.getLineAndCharacterOfPosition(sourceFile, a[0].getEnd()) }, - key: a[0].getText(), - valueSpan: { start: ts.getLineAndCharacterOfPosition(sourceFile, a[1].getStart()), end: ts.getLineAndCharacterOfPosition(sourceFile, a[1].getEnd()) }, - value: a[1].getText() - }); }); - return { - localizeCalls: localizeCalls.toArray(), - nlsExpressions: nlsExpressions.toArray() - }; - } - nls_1.analyze = analyze; - var TextModel = (function () { - function TextModel(contents) { - var regex = /\r\n|\r|\n/g; - var index = 0; - var match; - this.lines = []; - this.lineEndings = []; - while (match = regex.exec(contents)) { - this.lines.push(contents.substring(index, match.index)); - this.lineEndings.push(match[0]); - index = regex.lastIndex; - } - if (contents.length > 0) { - this.lines.push(contents.substring(index, contents.length)); - this.lineEndings.push(''); - } - } - TextModel.prototype.get = function (index) { - return this.lines[index]; - }; - TextModel.prototype.set = function (index, line) { - this.lines[index] = line; - }; - Object.defineProperty(TextModel.prototype, "lineCount", { - get: function () { - return this.lines.length; - }, - enumerable: true, - configurable: true - }); - /** - * Applies patch(es) to the model. - * Multiple patches must be ordered. - * Does not support patches spanning multiple lines. - */ - TextModel.prototype.apply = function (patch) { - var startLineNumber = patch.span.start.line; - var endLineNumber = patch.span.end.line; - var startLine = this.lines[startLineNumber] || ''; - var endLine = this.lines[endLineNumber] || ''; - this.lines[startLineNumber] = [ - startLine.substring(0, patch.span.start.character), - patch.content, - endLine.substring(patch.span.end.character) - ].join(''); - for (var i = startLineNumber + 1; i <= endLineNumber; i++) { - this.lines[i] = ''; - } - }; - TextModel.prototype.toString = function () { - return lazy(this.lines).zip(this.lineEndings) - .flatten().toArray().join(''); - }; - return TextModel; - }()); - nls_1.TextModel = TextModel; - function patchJavascript(patches, contents, moduleId) { - var model = new nls.TextModel(contents); - // patch the localize calls - lazy(patches).reverse().each(function (p) { return model.apply(p); }); - // patch the 'vs/nls' imports - var firstLine = model.get(0); - var patchedFirstLine = firstLine.replace(/(['"])vs\/nls\1/g, "$1vs/nls!" + moduleId + "$1"); - model.set(0, patchedFirstLine); - return model.toString(); - } - nls_1.patchJavascript = patchJavascript; - function patchSourcemap(patches, rsm, smc) { - var smg = new sm.SourceMapGenerator({ - file: rsm.file, - sourceRoot: rsm.sourceRoot - }); - patches = patches.reverse(); - var currentLine = -1; - var currentLineDiff = 0; - var source = null; - smc.eachMapping(function (m) { - var patch = patches[patches.length - 1]; - var original = { line: m.originalLine, column: m.originalColumn }; - var generated = { line: m.generatedLine, column: m.generatedColumn }; - if (currentLine !== generated.line) { - currentLineDiff = 0; - } - currentLine = generated.line; - generated.column += currentLineDiff; - if (patch && m.generatedLine - 1 === patch.span.end.line && m.generatedColumn === patch.span.end.character) { - var originalLength = patch.span.end.character - patch.span.start.character; - var modifiedLength = patch.content.length; - var lengthDiff = modifiedLength - originalLength; - currentLineDiff += lengthDiff; - generated.column += lengthDiff; - patches.pop(); - } - source = rsm.sourceRoot ? path.relative(rsm.sourceRoot, m.source) : m.source; - source = source.replace(/\\/g, '/'); - smg.addMapping({ source: source, name: m.name, original: original, generated: generated }); - }, null, sm.SourceMapConsumer.GENERATED_ORDER); - if (source) { - smg.setSourceContent(source, smc.sourceContentFor(source)); - } - return JSON.parse(smg.toString()); - } - nls_1.patchSourcemap = patchSourcemap; - function patch(moduleId, typescript, javascript, sourcemap) { - var _a = analyze(typescript), localizeCalls = _a.localizeCalls, nlsExpressions = _a.nlsExpressions; - if (localizeCalls.length === 0) { - return { javascript: javascript, sourcemap: sourcemap }; - } - var nlsKeys = template(localizeCalls.map(function (lc) { return lc.key; })); - var nls = template(localizeCalls.map(function (lc) { return lc.value; })); - var smc = new sm.SourceMapConsumer(sourcemap); - var positionFrom = mappedPositionFrom.bind(null, sourcemap.sources[0]); - var i = 0; - // build patches - var patches = lazy(localizeCalls) - .map(function (lc) { return ([ - { range: lc.keySpan, content: '' + (i++) }, - { range: lc.valueSpan, content: 'null' } - ]); }) - .flatten() - .map(function (c) { - var start = lcFrom(smc.generatedPositionFor(positionFrom(c.range.start))); - var end = lcFrom(smc.generatedPositionFor(positionFrom(c.range.end))); - return { span: { start: start, end: end }, content: c.content }; - }) - .toArray(); - javascript = patchJavascript(patches, javascript, moduleId); - // since imports are not within the sourcemap information, - // we must do this MacGyver style - if (nlsExpressions.length) { - javascript = javascript.replace(/^define\(.*$/m, function (line) { - return line.replace(/(['"])vs\/nls\1/g, "$1vs/nls!" + moduleId + "$1"); - }); - } - sourcemap = patchSourcemap(patches, sourcemap, smc); - return { javascript: javascript, sourcemap: sourcemap, nlsKeys: nlsKeys, nls: nls }; - } - nls_1.patch = patch; - function patchFiles(javascriptFile, typescript) { - // hack? - var moduleId = javascriptFile.relative - .replace(/\.js$/, '') - .replace(/\\/g, '/'); - var _a = patch(moduleId, typescript, javascriptFile.contents.toString(), javascriptFile.sourceMap), javascript = _a.javascript, sourcemap = _a.sourcemap, nlsKeys = _a.nlsKeys, nls = _a.nls; - var result = [fileFrom(javascriptFile, javascript)]; - result[0].sourceMap = sourcemap; - if (nlsKeys) { - result.push(fileFrom(javascriptFile, nlsKeys, javascriptFile.path.replace(/\.js$/, '.nls.keys.js'))); - } - if (nls) { - result.push(fileFrom(javascriptFile, nls, javascriptFile.path.replace(/\.js$/, '.nls.js'))); - } - return result; - } - nls_1.patchFiles = patchFiles; -})(nls || (nls = {})); -module.exports = nls; +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +var ts = require("typescript"); +var lazy = require("lazy.js"); +var event_stream_1 = require("event-stream"); +var File = require("vinyl"); +var sm = require("source-map"); +var assign = require("object-assign"); +var path = require("path"); +var CollectStepResult; +(function (CollectStepResult) { + CollectStepResult[CollectStepResult["Yes"] = 0] = "Yes"; + CollectStepResult[CollectStepResult["YesAndRecurse"] = 1] = "YesAndRecurse"; + CollectStepResult[CollectStepResult["No"] = 2] = "No"; + CollectStepResult[CollectStepResult["NoAndRecurse"] = 3] = "NoAndRecurse"; +})(CollectStepResult || (CollectStepResult = {})); +function collect(node, fn) { + var result = []; + function loop(node) { + var stepResult = fn(node); + if (stepResult === CollectStepResult.Yes || stepResult === CollectStepResult.YesAndRecurse) { + result.push(node); + } + if (stepResult === CollectStepResult.YesAndRecurse || stepResult === CollectStepResult.NoAndRecurse) { + ts.forEachChild(node, loop); + } + } + loop(node); + return result; +} +function clone(object) { + var result = {}; + for (var id in object) { + result[id] = object[id]; + } + return result; +} +function template(lines) { + var indent = '', wrap = ''; + if (lines.length > 1) { + indent = '\t'; + wrap = '\n'; + } + return "/*---------------------------------------------------------\n * Copyright (C) Microsoft Corporation. All rights reserved.\n *--------------------------------------------------------*/\ndefine([], [" + (wrap + lines.map(function (l) { return indent + l; }).join(',\n') + wrap) + "]);"; +} +/** + * Returns a stream containing the patched JavaScript and source maps. + */ +function nls() { + var input = event_stream_1.through(); + var output = input.pipe(event_stream_1.through(function (f) { + var _this = this; + if (!f.sourceMap) { + return this.emit('error', new Error("File " + f.relative + " does not have sourcemaps.")); + } + var source = f.sourceMap.sources[0]; + if (!source) { + return this.emit('error', new Error("File " + f.relative + " does not have a source in the source map.")); + } + var root = f.sourceMap.sourceRoot; + if (root) { + source = path.join(root, source); + } + var typescript = f.sourceMap.sourcesContent[0]; + if (!typescript) { + return this.emit('error', new Error("File " + f.relative + " does not have the original content in the source map.")); + } + nls.patchFiles(f, typescript).forEach(function (f) { return _this.emit('data', f); }); + })); + return event_stream_1.duplex(input, output); +} +function isImportNode(node) { + return node.kind === ts.SyntaxKind.ImportDeclaration || node.kind === ts.SyntaxKind.ImportEqualsDeclaration; +} +(function (nls_1) { + function fileFrom(file, contents, path) { + if (path === void 0) { path = file.path; } + return new File({ + contents: new Buffer(contents), + base: file.base, + cwd: file.cwd, + path: path + }); + } + nls_1.fileFrom = fileFrom; + function mappedPositionFrom(source, lc) { + return { source: source, line: lc.line + 1, column: lc.character }; + } + nls_1.mappedPositionFrom = mappedPositionFrom; + function lcFrom(position) { + return { line: position.line - 1, character: position.column }; + } + nls_1.lcFrom = lcFrom; + var SingleFileServiceHost = (function () { + function SingleFileServiceHost(options, filename, contents) { + var _this = this; + this.options = options; + this.filename = filename; + this.getCompilationSettings = function () { return _this.options; }; + this.getScriptFileNames = function () { return [_this.filename]; }; + this.getScriptVersion = function () { return '1'; }; + this.getScriptSnapshot = function (name) { return name === _this.filename ? _this.file : _this.lib; }; + this.getCurrentDirectory = function () { return ''; }; + this.getDefaultLibFileName = function () { return 'lib.d.ts'; }; + this.file = ts.ScriptSnapshot.fromString(contents); + this.lib = ts.ScriptSnapshot.fromString(''); + } + return SingleFileServiceHost; + }()); + nls_1.SingleFileServiceHost = SingleFileServiceHost; + function isCallExpressionWithinTextSpanCollectStep(textSpan, node) { + if (!ts.textSpanContainsTextSpan({ start: node.pos, length: node.end - node.pos }, textSpan)) { + return CollectStepResult.No; + } + return node.kind === ts.SyntaxKind.CallExpression ? CollectStepResult.YesAndRecurse : CollectStepResult.NoAndRecurse; + } + function analyze(contents, options) { + if (options === void 0) { options = {}; } + var filename = 'file.ts'; + var serviceHost = new SingleFileServiceHost(assign(clone(options), { noResolve: true }), filename, contents); + var service = ts.createLanguageService(serviceHost); + var sourceFile = ts.createSourceFile(filename, contents, ts.ScriptTarget.ES5, true); + // all imports + var imports = lazy(collect(sourceFile, function (n) { return isImportNode(n) ? CollectStepResult.YesAndRecurse : CollectStepResult.NoAndRecurse; })); + // import nls = require('vs/nls'); + var importEqualsDeclarations = imports + .filter(function (n) { return n.kind === ts.SyntaxKind.ImportEqualsDeclaration; }) + .map(function (n) { return n; }) + .filter(function (d) { return d.moduleReference.kind === ts.SyntaxKind.ExternalModuleReference; }) + .filter(function (d) { return d.moduleReference.expression.getText() === '\'vs/nls\''; }); + // import ... from 'vs/nls'; + var importDeclarations = imports + .filter(function (n) { return n.kind === ts.SyntaxKind.ImportDeclaration; }) + .map(function (n) { return n; }) + .filter(function (d) { return d.moduleSpecifier.kind === ts.SyntaxKind.StringLiteral; }) + .filter(function (d) { return d.moduleSpecifier.getText() === '\'vs/nls\''; }) + .filter(function (d) { return !!d.importClause && !!d.importClause.namedBindings; }); + var nlsExpressions = importEqualsDeclarations + .map(function (d) { return d.moduleReference.expression; }) + .concat(importDeclarations.map(function (d) { return d.moduleSpecifier; })) + .map(function (d) { return ({ + start: ts.getLineAndCharacterOfPosition(sourceFile, d.getStart()), + end: ts.getLineAndCharacterOfPosition(sourceFile, d.getEnd()) + }); }); + // `nls.localize(...)` calls + var nlsLocalizeCallExpressions = importDeclarations + .filter(function (d) { return d.importClause.namedBindings.kind === ts.SyntaxKind.NamespaceImport; }) + .map(function (d) { return d.importClause.namedBindings.name; }) + .concat(importEqualsDeclarations.map(function (d) { return d.name; })) + .map(function (n) { return service.getReferencesAtPosition(filename, n.pos + 1); }) + .flatten() + .filter(function (r) { return !r.isWriteAccess; }) + .map(function (r) { return collect(sourceFile, function (n) { return isCallExpressionWithinTextSpanCollectStep(r.textSpan, n); }); }) + .map(function (a) { return lazy(a).last(); }) + .filter(function (n) { return !!n; }) + .map(function (n) { return n; }) + .filter(function (n) { return n.expression.kind === ts.SyntaxKind.PropertyAccessExpression && n.expression.name.getText() === 'localize'; }); + // `localize` named imports + var allLocalizeImportDeclarations = importDeclarations + .filter(function (d) { return d.importClause.namedBindings.kind === ts.SyntaxKind.NamedImports; }) + .map(function (d) { return d.importClause.namedBindings.elements; }) + .flatten(); + // `localize` read-only references + var localizeReferences = allLocalizeImportDeclarations + .filter(function (d) { return d.name.getText() === 'localize'; }) + .map(function (n) { return service.getReferencesAtPosition(filename, n.pos + 1); }) + .flatten() + .filter(function (r) { return !r.isWriteAccess; }); + // custom named `localize` read-only references + var namedLocalizeReferences = allLocalizeImportDeclarations + .filter(function (d) { return d.propertyName && d.propertyName.getText() === 'localize'; }) + .map(function (n) { return service.getReferencesAtPosition(filename, n.name.pos + 1); }) + .flatten() + .filter(function (r) { return !r.isWriteAccess; }); + // find the deepest call expressions AST nodes that contain those references + var localizeCallExpressions = localizeReferences + .concat(namedLocalizeReferences) + .map(function (r) { return collect(sourceFile, function (n) { return isCallExpressionWithinTextSpanCollectStep(r.textSpan, n); }); }) + .map(function (a) { return lazy(a).last(); }) + .filter(function (n) { return !!n; }) + .map(function (n) { return n; }); + // collect everything + var localizeCalls = nlsLocalizeCallExpressions + .concat(localizeCallExpressions) + .map(function (e) { return e.arguments; }) + .filter(function (a) { return a.length > 1; }) + .sort(function (a, b) { return a[0].getStart() - b[0].getStart(); }) + .map(function (a) { return ({ + keySpan: { start: ts.getLineAndCharacterOfPosition(sourceFile, a[0].getStart()), end: ts.getLineAndCharacterOfPosition(sourceFile, a[0].getEnd()) }, + key: a[0].getText(), + valueSpan: { start: ts.getLineAndCharacterOfPosition(sourceFile, a[1].getStart()), end: ts.getLineAndCharacterOfPosition(sourceFile, a[1].getEnd()) }, + value: a[1].getText() + }); }); + return { + localizeCalls: localizeCalls.toArray(), + nlsExpressions: nlsExpressions.toArray() + }; + } + nls_1.analyze = analyze; + var TextModel = (function () { + function TextModel(contents) { + var regex = /\r\n|\r|\n/g; + var index = 0; + var match; + this.lines = []; + this.lineEndings = []; + while (match = regex.exec(contents)) { + this.lines.push(contents.substring(index, match.index)); + this.lineEndings.push(match[0]); + index = regex.lastIndex; + } + if (contents.length > 0) { + this.lines.push(contents.substring(index, contents.length)); + this.lineEndings.push(''); + } + } + TextModel.prototype.get = function (index) { + return this.lines[index]; + }; + TextModel.prototype.set = function (index, line) { + this.lines[index] = line; + }; + Object.defineProperty(TextModel.prototype, "lineCount", { + get: function () { + return this.lines.length; + }, + enumerable: true, + configurable: true + }); + /** + * Applies patch(es) to the model. + * Multiple patches must be ordered. + * Does not support patches spanning multiple lines. + */ + TextModel.prototype.apply = function (patch) { + var startLineNumber = patch.span.start.line; + var endLineNumber = patch.span.end.line; + var startLine = this.lines[startLineNumber] || ''; + var endLine = this.lines[endLineNumber] || ''; + this.lines[startLineNumber] = [ + startLine.substring(0, patch.span.start.character), + patch.content, + endLine.substring(patch.span.end.character) + ].join(''); + for (var i = startLineNumber + 1; i <= endLineNumber; i++) { + this.lines[i] = ''; + } + }; + TextModel.prototype.toString = function () { + return lazy(this.lines).zip(this.lineEndings) + .flatten().toArray().join(''); + }; + return TextModel; + }()); + nls_1.TextModel = TextModel; + function patchJavascript(patches, contents, moduleId) { + var model = new nls.TextModel(contents); + // patch the localize calls + lazy(patches).reverse().each(function (p) { return model.apply(p); }); + // patch the 'vs/nls' imports + var firstLine = model.get(0); + var patchedFirstLine = firstLine.replace(/(['"])vs\/nls\1/g, "$1vs/nls!" + moduleId + "$1"); + model.set(0, patchedFirstLine); + return model.toString(); + } + nls_1.patchJavascript = patchJavascript; + function patchSourcemap(patches, rsm, smc) { + var smg = new sm.SourceMapGenerator({ + file: rsm.file, + sourceRoot: rsm.sourceRoot + }); + patches = patches.reverse(); + var currentLine = -1; + var currentLineDiff = 0; + var source = null; + smc.eachMapping(function (m) { + var patch = patches[patches.length - 1]; + var original = { line: m.originalLine, column: m.originalColumn }; + var generated = { line: m.generatedLine, column: m.generatedColumn }; + if (currentLine !== generated.line) { + currentLineDiff = 0; + } + currentLine = generated.line; + generated.column += currentLineDiff; + if (patch && m.generatedLine - 1 === patch.span.end.line && m.generatedColumn === patch.span.end.character) { + var originalLength = patch.span.end.character - patch.span.start.character; + var modifiedLength = patch.content.length; + var lengthDiff = modifiedLength - originalLength; + currentLineDiff += lengthDiff; + generated.column += lengthDiff; + patches.pop(); + } + source = rsm.sourceRoot ? path.relative(rsm.sourceRoot, m.source) : m.source; + source = source.replace(/\\/g, '/'); + smg.addMapping({ source: source, name: m.name, original: original, generated: generated }); + }, null, sm.SourceMapConsumer.GENERATED_ORDER); + if (source) { + smg.setSourceContent(source, smc.sourceContentFor(source)); + } + return JSON.parse(smg.toString()); + } + nls_1.patchSourcemap = patchSourcemap; + function patch(moduleId, typescript, javascript, sourcemap) { + var _a = analyze(typescript), localizeCalls = _a.localizeCalls, nlsExpressions = _a.nlsExpressions; + if (localizeCalls.length === 0) { + return { javascript: javascript, sourcemap: sourcemap }; + } + var nlsKeys = template(localizeCalls.map(function (lc) { return lc.key; })); + var nls = template(localizeCalls.map(function (lc) { return lc.value; })); + var smc = new sm.SourceMapConsumer(sourcemap); + var positionFrom = mappedPositionFrom.bind(null, sourcemap.sources[0]); + var i = 0; + // build patches + var patches = lazy(localizeCalls) + .map(function (lc) { return ([ + { range: lc.keySpan, content: '' + (i++) }, + { range: lc.valueSpan, content: 'null' } + ]); }) + .flatten() + .map(function (c) { + var start = lcFrom(smc.generatedPositionFor(positionFrom(c.range.start))); + var end = lcFrom(smc.generatedPositionFor(positionFrom(c.range.end))); + return { span: { start: start, end: end }, content: c.content }; + }) + .toArray(); + javascript = patchJavascript(patches, javascript, moduleId); + // since imports are not within the sourcemap information, + // we must do this MacGyver style + if (nlsExpressions.length) { + javascript = javascript.replace(/^define\(.*$/m, function (line) { + return line.replace(/(['"])vs\/nls\1/g, "$1vs/nls!" + moduleId + "$1"); + }); + } + sourcemap = patchSourcemap(patches, sourcemap, smc); + return { javascript: javascript, sourcemap: sourcemap, nlsKeys: nlsKeys, nls: nls }; + } + nls_1.patch = patch; + function patchFiles(javascriptFile, typescript) { + // hack? + var moduleId = javascriptFile.relative + .replace(/\.js$/, '') + .replace(/\\/g, '/'); + var _a = patch(moduleId, typescript, javascriptFile.contents.toString(), javascriptFile.sourceMap), javascript = _a.javascript, sourcemap = _a.sourcemap, nlsKeys = _a.nlsKeys, nls = _a.nls; + var result = [fileFrom(javascriptFile, javascript)]; + result[0].sourceMap = sourcemap; + if (nlsKeys) { + result.push(fileFrom(javascriptFile, nlsKeys, javascriptFile.path.replace(/\.js$/, '.nls.keys.js'))); + } + if (nls) { + result.push(fileFrom(javascriptFile, nls, javascriptFile.path.replace(/\.js$/, '.nls.js'))); + } + return result; + } + nls_1.patchFiles = patchFiles; +})(nls || (nls = {})); +module.exports = nls; diff --git a/build/lib/nls.ts b/build/lib/nls.ts index 9fdc15dd0e751..fcba7ac6e5e20 100644 --- a/build/lib/nls.ts +++ b/build/lib/nls.ts @@ -1,4 +1,9 @@ -import * as ts from './typescript/typescriptServices'; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as ts from 'typescript'; import * as lazy from 'lazy.js'; import { duplex, through } from 'event-stream'; import File = require('vinyl'); @@ -171,7 +176,7 @@ module nls { const filename = 'file.ts'; const serviceHost = new SingleFileServiceHost(assign(clone(options), { noResolve: true }), filename, contents); const service = ts.createLanguageService(serviceHost); - const sourceFile = service.getSourceFile(filename); + const sourceFile = ts.createSourceFile(filename, contents, ts.ScriptTarget.ES5, true); // all imports const imports = lazy(collect(sourceFile, n => isImportNode(n) ? CollectStepResult.YesAndRecurse : CollectStepResult.NoAndRecurse)); diff --git a/build/lib/optimize.js b/build/lib/optimize.js index 9ff371cda9a89..390538190a4b7 100644 --- a/build/lib/optimize.js +++ b/build/lib/optimize.js @@ -1,235 +1,239 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; -Object.defineProperty(exports, "__esModule", { value: true }); -var path = require("path"); -var gulp = require("gulp"); -var sourcemaps = require("gulp-sourcemaps"); -var filter = require("gulp-filter"); -var minifyCSS = require("gulp-cssnano"); -var uglify = require("gulp-uglify"); -var es = require("event-stream"); -var concat = require("gulp-concat"); -var VinylFile = require("vinyl"); -var bundle = require("./bundle"); -var util = require("./util"); -var i18n = require("./i18n"); -var gulpUtil = require("gulp-util"); -var flatmap = require("gulp-flatmap"); -var pump = require("pump"); -var REPO_ROOT_PATH = path.join(__dirname, '../..'); -function log(prefix, message) { - gulpUtil.log(gulpUtil.colors.cyan('[' + prefix + ']'), message); -} -function loaderConfig(emptyPaths) { - var result = { - paths: { - 'vs': 'out-build/vs', - 'vscode': 'empty:' - }, - nodeModules: emptyPaths || [] - }; - result['vs/css'] = { inlineResources: true }; - return result; -} -exports.loaderConfig = loaderConfig; -var IS_OUR_COPYRIGHT_REGEXP = /Copyright \(C\) Microsoft Corporation/i; -function loader(bundledFileHeader, bundleLoader) { - var sources = [ - 'out-build/vs/loader.js' - ]; - if (bundleLoader) { - sources = sources.concat([ - 'out-build/vs/css.js', - 'out-build/vs/nls.js' - ]); - } - var isFirst = true; - return (gulp - .src(sources, { base: 'out-build' }) - .pipe(es.through(function (data) { - if (isFirst) { - isFirst = false; - this.emit('data', new VinylFile({ - path: 'fake', - base: '', - contents: new Buffer(bundledFileHeader) - })); - this.emit('data', data); - } - else { - this.emit('data', data); - } - })) - .pipe(util.loadSourcemaps()) - .pipe(concat('vs/loader.js')) - .pipe(es.mapSync(function (f) { - f.sourceMap.sourceRoot = util.toFileUri(path.join(REPO_ROOT_PATH, 'src')); - return f; - }))); -} -function toConcatStream(bundledFileHeader, sources, dest) { - var useSourcemaps = /\.js$/.test(dest) && !/\.nls\.js$/.test(dest); - // If a bundle ends up including in any of the sources our copyright, then - // insert a fake source at the beginning of each bundle with our copyright - var containsOurCopyright = false; - for (var i = 0, len = sources.length; i < len; i++) { - var fileContents = sources[i].contents; - if (IS_OUR_COPYRIGHT_REGEXP.test(fileContents)) { - containsOurCopyright = true; - break; - } - } - if (containsOurCopyright) { - sources.unshift({ - path: null, - contents: bundledFileHeader - }); - } - var treatedSources = sources.map(function (source) { - var root = source.path ? REPO_ROOT_PATH.replace(/\\/g, '/') : ''; - var base = source.path ? root + '/out-build' : ''; - return new VinylFile({ - path: source.path ? root + '/' + source.path.replace(/\\/g, '/') : 'fake', - base: base, - contents: new Buffer(source.contents) - }); - }); - return es.readArray(treatedSources) - .pipe(useSourcemaps ? util.loadSourcemaps() : es.through()) - .pipe(concat(dest)); -} -function toBundleStream(bundledFileHeader, bundles) { - return es.merge(bundles.map(function (bundle) { - return toConcatStream(bundledFileHeader, bundle.sources, bundle.dest); - })); -} -function optimizeTask(opts) { - var entryPoints = opts.entryPoints; - var otherSources = opts.otherSources; - var resources = opts.resources; - var loaderConfig = opts.loaderConfig; - var bundledFileHeader = opts.header; - var bundleLoader = (typeof opts.bundleLoader === 'undefined' ? true : opts.bundleLoader); - var out = opts.out; - return function () { - var bundlesStream = es.through(); // this stream will contain the bundled files - var resourcesStream = es.through(); // this stream will contain the resources - var bundleInfoStream = es.through(); // this stream will contain bundleInfo.json - bundle.bundle(entryPoints, loaderConfig, function (err, result) { - if (err) { - return bundlesStream.emit('error', JSON.stringify(err)); - } - toBundleStream(bundledFileHeader, result.files).pipe(bundlesStream); - // Remove css inlined resources - var filteredResources = resources.slice(); - result.cssInlinedResources.forEach(function (resource) { - if (process.env['VSCODE_BUILD_VERBOSE']) { - log('optimizer', 'excluding inlined: ' + resource); - } - filteredResources.push('!' + resource); - }); - gulp.src(filteredResources, { base: 'out-build' }).pipe(resourcesStream); - var bundleInfoArray = []; - if (opts.bundleInfo) { - bundleInfoArray.push(new VinylFile({ - path: 'bundleInfo.json', - base: '.', - contents: new Buffer(JSON.stringify(result.bundleData, null, '\t')) - })); - } - es.readArray(bundleInfoArray).pipe(bundleInfoStream); - }); - var otherSourcesStream = es.through(); - var otherSourcesStreamArr = []; - gulp.src(otherSources, { base: 'out-build' }) - .pipe(es.through(function (data) { - otherSourcesStreamArr.push(toConcatStream(bundledFileHeader, [data], data.relative)); - }, function () { - if (!otherSourcesStreamArr.length) { - setTimeout(function () { otherSourcesStream.emit('end'); }, 0); - } - else { - es.merge(otherSourcesStreamArr).pipe(otherSourcesStream); - } - })); - var result = es.merge(loader(bundledFileHeader, bundleLoader), bundlesStream, otherSourcesStream, resourcesStream, bundleInfoStream); - return result - .pipe(sourcemaps.write('./', { - sourceRoot: null, - addComment: true, - includeContent: true - })) - .pipe(i18n.processNlsFiles({ - fileHeader: bundledFileHeader - })) - .pipe(gulp.dest(out)); - }; -} -exports.optimizeTask = optimizeTask; -; -/** - * Wrap around uglify and allow the preserveComments function - * to have a file "context" to include our copyright only once per file. - */ -function uglifyWithCopyrights() { - var preserveComments = function (f) { - return function (node, comment) { - var text = comment.value; - var type = comment.type; - if (/@minifier_do_not_preserve/.test(text)) { - return false; - } - var isOurCopyright = IS_OUR_COPYRIGHT_REGEXP.test(text); - if (isOurCopyright) { - if (f.__hasOurCopyright) { - return false; - } - f.__hasOurCopyright = true; - return true; - } - if ('comment2' === type) { - // check for /*!. Note that text doesn't contain leading /* - return (text.length > 0 && text[0] === '!') || /@preserve|license|@cc_on|copyright/i.test(text); - } - else if ('comment1' === type) { - return /license|copyright/i.test(text); - } - return false; - }; - }; - var input = es.through(); - var output = input - .pipe(flatmap(function (stream, f) { - return stream.pipe(uglify({ - preserveComments: preserveComments(f), - output: { - // linux tfs build agent is crashing, does this help?§ - max_line_len: 3200000 - } - })); - })); - return es.duplex(input, output); -} -function minifyTask(src, sourceMapBaseUrl) { - var sourceMappingURL = sourceMapBaseUrl && (function (f) { return sourceMapBaseUrl + "/" + f.relative + ".map"; }); - return function (cb) { - var jsFilter = filter('**/*.js', { restore: true }); - var cssFilter = filter('**/*.css', { restore: true }); - pump(gulp.src([src + '/**', '!' + src + '/**/*.map']), jsFilter, sourcemaps.init({ loadMaps: true }), uglifyWithCopyrights(), jsFilter.restore, cssFilter, minifyCSS({ reduceIdents: false }), cssFilter.restore, sourcemaps.write('./', { - sourceMappingURL: sourceMappingURL, - sourceRoot: null, - includeContent: true, - addComment: true - }), gulp.dest(src + '-min'), function (err) { - if (err instanceof uglify.GulpUglifyError) { - console.error("Uglify error in '" + (err.cause && err.cause.filename) + "'"); - } - cb(err); - }); - }; -} -exports.minifyTask = minifyTask; -; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +var path = require("path"); +var gulp = require("gulp"); +var sourcemaps = require("gulp-sourcemaps"); +var filter = require("gulp-filter"); +var minifyCSS = require("gulp-cssnano"); +var uglify = require("gulp-uglify"); +var composer = require("gulp-uglify/composer"); +var uglifyes = require("uglify-es"); +var es = require("event-stream"); +var concat = require("gulp-concat"); +var VinylFile = require("vinyl"); +var bundle = require("./bundle"); +var util = require("./util"); +var i18n = require("./i18n"); +var gulpUtil = require("gulp-util"); +var flatmap = require("gulp-flatmap"); +var pump = require("pump"); +var REPO_ROOT_PATH = path.join(__dirname, '../..'); +function log(prefix, message) { + gulpUtil.log(gulpUtil.colors.cyan('[' + prefix + ']'), message); +} +function loaderConfig(emptyPaths) { + var result = { + paths: { + 'vs': 'out-build/vs', + 'vscode': 'empty:' + }, + nodeModules: emptyPaths || [] + }; + result['vs/css'] = { inlineResources: true }; + return result; +} +exports.loaderConfig = loaderConfig; +var IS_OUR_COPYRIGHT_REGEXP = /Copyright \(C\) Microsoft Corporation/i; +function loader(bundledFileHeader, bundleLoader) { + var sources = [ + 'out-build/vs/loader.js' + ]; + if (bundleLoader) { + sources = sources.concat([ + 'out-build/vs/css.js', + 'out-build/vs/nls.js' + ]); + } + var isFirst = true; + return (gulp + .src(sources, { base: 'out-build' }) + .pipe(es.through(function (data) { + if (isFirst) { + isFirst = false; + this.emit('data', new VinylFile({ + path: 'fake', + base: '', + contents: new Buffer(bundledFileHeader) + })); + this.emit('data', data); + } + else { + this.emit('data', data); + } + })) + .pipe(util.loadSourcemaps()) + .pipe(concat('vs/loader.js')) + .pipe(es.mapSync(function (f) { + f.sourceMap.sourceRoot = util.toFileUri(path.join(REPO_ROOT_PATH, 'src')); + return f; + }))); +} +function toConcatStream(bundledFileHeader, sources, dest) { + var useSourcemaps = /\.js$/.test(dest) && !/\.nls\.js$/.test(dest); + // If a bundle ends up including in any of the sources our copyright, then + // insert a fake source at the beginning of each bundle with our copyright + var containsOurCopyright = false; + for (var i = 0, len = sources.length; i < len; i++) { + var fileContents = sources[i].contents; + if (IS_OUR_COPYRIGHT_REGEXP.test(fileContents)) { + containsOurCopyright = true; + break; + } + } + if (containsOurCopyright) { + sources.unshift({ + path: null, + contents: bundledFileHeader + }); + } + var treatedSources = sources.map(function (source) { + var root = source.path ? REPO_ROOT_PATH.replace(/\\/g, '/') : ''; + var base = source.path ? root + '/out-build' : ''; + return new VinylFile({ + path: source.path ? root + '/' + source.path.replace(/\\/g, '/') : 'fake', + base: base, + contents: new Buffer(source.contents) + }); + }); + return es.readArray(treatedSources) + .pipe(useSourcemaps ? util.loadSourcemaps() : es.through()) + .pipe(concat(dest)); +} +function toBundleStream(bundledFileHeader, bundles) { + return es.merge(bundles.map(function (bundle) { + return toConcatStream(bundledFileHeader, bundle.sources, bundle.dest); + })); +} +function optimizeTask(opts) { + var entryPoints = opts.entryPoints; + var otherSources = opts.otherSources; + var resources = opts.resources; + var loaderConfig = opts.loaderConfig; + var bundledFileHeader = opts.header; + var bundleLoader = (typeof opts.bundleLoader === 'undefined' ? true : opts.bundleLoader); + var out = opts.out; + return function () { + var bundlesStream = es.through(); // this stream will contain the bundled files + var resourcesStream = es.through(); // this stream will contain the resources + var bundleInfoStream = es.through(); // this stream will contain bundleInfo.json + bundle.bundle(entryPoints, loaderConfig, function (err, result) { + if (err) { + return bundlesStream.emit('error', JSON.stringify(err)); + } + toBundleStream(bundledFileHeader, result.files).pipe(bundlesStream); + // Remove css inlined resources + var filteredResources = resources.slice(); + result.cssInlinedResources.forEach(function (resource) { + if (process.env['VSCODE_BUILD_VERBOSE']) { + log('optimizer', 'excluding inlined: ' + resource); + } + filteredResources.push('!' + resource); + }); + gulp.src(filteredResources, { base: 'out-build' }).pipe(resourcesStream); + var bundleInfoArray = []; + if (opts.bundleInfo) { + bundleInfoArray.push(new VinylFile({ + path: 'bundleInfo.json', + base: '.', + contents: new Buffer(JSON.stringify(result.bundleData, null, '\t')) + })); + } + es.readArray(bundleInfoArray).pipe(bundleInfoStream); + }); + var otherSourcesStream = es.through(); + var otherSourcesStreamArr = []; + gulp.src(otherSources, { base: 'out-build' }) + .pipe(es.through(function (data) { + otherSourcesStreamArr.push(toConcatStream(bundledFileHeader, [data], data.relative)); + }, function () { + if (!otherSourcesStreamArr.length) { + setTimeout(function () { otherSourcesStream.emit('end'); }, 0); + } + else { + es.merge(otherSourcesStreamArr).pipe(otherSourcesStream); + } + })); + var result = es.merge(loader(bundledFileHeader, bundleLoader), bundlesStream, otherSourcesStream, resourcesStream, bundleInfoStream); + return result + .pipe(sourcemaps.write('./', { + sourceRoot: null, + addComment: true, + includeContent: true + })) + .pipe(i18n.processNlsFiles({ + fileHeader: bundledFileHeader, + languages: opts.languages + })) + .pipe(gulp.dest(out)); + }; +} +exports.optimizeTask = optimizeTask; +; +/** + * Wrap around uglify and allow the preserveComments function + * to have a file "context" to include our copyright only once per file. + */ +function uglifyWithCopyrights() { + var preserveComments = function (f) { + return function (node, comment) { + var text = comment.value; + var type = comment.type; + if (/@minifier_do_not_preserve/.test(text)) { + return false; + } + var isOurCopyright = IS_OUR_COPYRIGHT_REGEXP.test(text); + if (isOurCopyright) { + if (f.__hasOurCopyright) { + return false; + } + f.__hasOurCopyright = true; + return true; + } + if ('comment2' === type) { + // check for /*!. Note that text doesn't contain leading /* + return (text.length > 0 && text[0] === '!') || /@preserve|license|@cc_on|copyright/i.test(text); + } + else if ('comment1' === type) { + return /license|copyright/i.test(text); + } + return false; + }; + }; + var minify = composer(uglifyes); + var input = es.through(); + var output = input + .pipe(flatmap(function (stream, f) { + return stream.pipe(minify({ + output: { + comments: preserveComments(f), + // linux tfs build agent is crashing, does this help?§ + max_line_len: 3200000 + } + })); + })); + return es.duplex(input, output); +} +function minifyTask(src, sourceMapBaseUrl) { + var sourceMappingURL = sourceMapBaseUrl && (function (f) { return sourceMapBaseUrl + "/" + f.relative + ".map"; }); + return function (cb) { + var jsFilter = filter('**/*.js', { restore: true }); + var cssFilter = filter('**/*.css', { restore: true }); + pump(gulp.src([src + '/**', '!' + src + '/**/*.map']), jsFilter, sourcemaps.init({ loadMaps: true }), uglifyWithCopyrights(), jsFilter.restore, cssFilter, minifyCSS({ reduceIdents: false }), cssFilter.restore, sourcemaps.write('./', { + sourceMappingURL: sourceMappingURL, + sourceRoot: null, + includeContent: true, + addComment: true + }), gulp.dest(src + '-min'), function (err) { + if (err instanceof uglify.GulpUglifyError) { + console.error("Uglify error in '" + (err.cause && err.cause.filename) + "'"); + } + cb(err); + }); + }; +} +exports.minifyTask = minifyTask; +; diff --git a/build/lib/optimize.ts b/build/lib/optimize.ts index 9dbaead5f7952..083ed0e5860fa 100644 --- a/build/lib/optimize.ts +++ b/build/lib/optimize.ts @@ -11,6 +11,8 @@ import * as sourcemaps from 'gulp-sourcemaps'; import * as filter from 'gulp-filter'; import * as minifyCSS from 'gulp-cssnano'; import * as uglify from 'gulp-uglify'; +import * as composer from 'gulp-uglify/composer'; +import * as uglifyes from 'uglify-es'; import * as es from 'event-stream'; import * as concat from 'gulp-concat'; import * as VinylFile from 'vinyl'; @@ -158,6 +160,10 @@ export interface IOptimizeTaskOpts { * (out folder name) */ out: string; + /** + * (languages to process) + */ + languages: string[]; } export function optimizeTask(opts: IOptimizeTaskOpts): () => NodeJS.ReadWriteStream { const entryPoints = opts.entryPoints; @@ -228,7 +234,8 @@ export function optimizeTask(opts: IOptimizeTaskOpts): () => NodeJS.ReadWriteStr includeContent: true })) .pipe(i18n.processNlsFiles({ - fileHeader: bundledFileHeader + fileHeader: bundledFileHeader, + languages: opts.languages })) .pipe(gulp.dest(out)); }; @@ -271,12 +278,13 @@ function uglifyWithCopyrights(): NodeJS.ReadWriteStream { }; }; + const minify = composer(uglifyes); const input = es.through(); const output = input .pipe(flatmap((stream, f) => { - return stream.pipe(uglify({ - preserveComments: preserveComments(f), + return stream.pipe(minify({ output: { + comments: preserveComments(f), // linux tfs build agent is crashing, does this help?§ max_line_len: 3200000 } diff --git a/build/lib/reporter.js b/build/lib/reporter.js index e7eb9fc2aa5a0..a1df81a6573db 100644 --- a/build/lib/reporter.js +++ b/build/lib/reporter.js @@ -1,83 +1,83 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; -Object.defineProperty(exports, "__esModule", { value: true }); -var es = require("event-stream"); -var _ = require("underscore"); -var util = require("gulp-util"); -var fs = require("fs"); -var path = require("path"); -var allErrors = []; -var startTime = null; -var count = 0; -function onStart() { - if (count++ > 0) { - return; - } - startTime = new Date().getTime(); - util.log("Starting " + util.colors.green('compilation') + "..."); -} -function onEnd() { - if (--count > 0) { - return; - } - log(); -} -var buildLogPath = path.join(path.dirname(path.dirname(__dirname)), '.build', 'log'); -try { - fs.mkdirSync(path.dirname(buildLogPath)); -} -catch (err) { - // ignore -} -function log() { - var errors = _.flatten(allErrors); - errors.map(function (err) { return util.log(util.colors.red('Error') + ": " + err); }); - var regex = /^([^(]+)\((\d+),(\d+)\): (.*)$/; - var messages = errors - .map(function (err) { return regex.exec(err); }) - .filter(function (match) { return !!match; }) - .map(function (_a) { - var path = _a[1], line = _a[2], column = _a[3], message = _a[4]; - return ({ path: path, line: Number.parseInt(line), column: Number.parseInt(column), message: message }); - }); - try { - fs.writeFileSync(buildLogPath, JSON.stringify(messages)); - } - catch (err) { - //noop - } - util.log("Finished " + util.colors.green('compilation') + " with " + errors.length + " errors after " + util.colors.magenta((new Date().getTime() - startTime) + ' ms')); -} -function createReporter() { - var errors = []; - allErrors.push(errors); - var ReportFunc = (function () { - function ReportFunc(err) { - errors.push(err); - } - ReportFunc.hasErrors = function () { - return errors.length > 0; - }; - ReportFunc.end = function (emitError) { - errors.length = 0; - onStart(); - return es.through(null, function () { - onEnd(); - if (emitError && errors.length > 0) { - log(); - this.emit('error'); - } - else { - this.emit('end'); - } - }); - }; - return ReportFunc; - }()); - return ReportFunc; -} -exports.createReporter = createReporter; -; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +var es = require("event-stream"); +var _ = require("underscore"); +var util = require("gulp-util"); +var fs = require("fs"); +var path = require("path"); +var allErrors = []; +var startTime = null; +var count = 0; +function onStart() { + if (count++ > 0) { + return; + } + startTime = new Date().getTime(); + util.log("Starting " + util.colors.green('compilation') + "..."); +} +function onEnd() { + if (--count > 0) { + return; + } + log(); +} +var buildLogPath = path.join(path.dirname(path.dirname(__dirname)), '.build', 'log'); +try { + fs.mkdirSync(path.dirname(buildLogPath)); +} +catch (err) { + // ignore +} +function log() { + var errors = _.flatten(allErrors); + errors.map(function (err) { return util.log(util.colors.red('Error') + ": " + err); }); + var regex = /^([^(]+)\((\d+),(\d+)\): (.*)$/; + var messages = errors + .map(function (err) { return regex.exec(err); }) + .filter(function (match) { return !!match; }) + .map(function (_a) { + var path = _a[1], line = _a[2], column = _a[3], message = _a[4]; + return ({ path: path, line: parseInt(line), column: parseInt(column), message: message }); + }); + try { + fs.writeFileSync(buildLogPath, JSON.stringify(messages)); + } + catch (err) { + //noop + } + util.log("Finished " + util.colors.green('compilation') + " with " + errors.length + " errors after " + util.colors.magenta((new Date().getTime() - startTime) + ' ms')); +} +function createReporter() { + var errors = []; + allErrors.push(errors); + var ReportFunc = (function () { + function ReportFunc(err) { + errors.push(err); + } + ReportFunc.hasErrors = function () { + return errors.length > 0; + }; + ReportFunc.end = function (emitError) { + errors.length = 0; + onStart(); + return es.through(null, function () { + onEnd(); + if (emitError && errors.length > 0) { + log(); + this.emit('error'); + } + else { + this.emit('end'); + } + }); + }; + return ReportFunc; + }()); + return ReportFunc; +} +exports.createReporter = createReporter; +; diff --git a/build/lib/reporter.ts b/build/lib/reporter.ts index a61db94128931..e072a60bbfdf0 100644 --- a/build/lib/reporter.ts +++ b/build/lib/reporter.ts @@ -48,7 +48,7 @@ function log(): void { const messages = errors .map(err => regex.exec(err)) .filter(match => !!match) - .map(([, path, line, column, message]) => ({ path, line: Number.parseInt(line), column: Number.parseInt(column), message })); + .map(([, path, line, column, message]) => ({ path, line: parseInt(line), column: parseInt(column), message })); try { diff --git a/build/lib/test/i18n.test.js b/build/lib/test/i18n.test.js index 03f84214b8c53..17d5a3fcbf91d 100644 --- a/build/lib/test/i18n.test.js +++ b/build/lib/test/i18n.test.js @@ -1,40 +1,40 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var assert = require("assert"); -var i18n = require("../i18n"); -suite('XLF Parser Tests', function () { - var sampleXlf = 'Key #1Key #2 &'; - var sampleTranslatedXlf = 'Key #1Кнопка #1Key #2 &Кнопка #2 &'; - var originalFilePath = 'vs/base/common/keybinding'; - var keys = ['key1', 'key2']; - var messages = ['Key #1', 'Key #2 &']; - var translatedMessages = { key1: 'Кнопка #1', key2: 'Кнопка #2 &' }; - test('Keys & messages to XLF conversion', function () { - var xlf = new i18n.XLF('vscode-workbench'); - xlf.addFile(originalFilePath, keys, messages); - var xlfString = xlf.toString(); - assert.strictEqual(xlfString.replace(/\s{2,}/g, ''), sampleXlf); - }); - test('XLF to keys & messages conversion', function () { - i18n.XLF.parse(sampleTranslatedXlf).then(function (resolvedFiles) { - assert.deepEqual(resolvedFiles[0].messages, translatedMessages); - assert.strictEqual(resolvedFiles[0].originalFilePath, originalFilePath); - }); - }); - test('JSON file source path to Transifex resource match', function () { - var editorProject = 'vscode-editor', workbenchProject = 'vscode-workbench'; - var platform = { name: 'vs/platform', project: editorProject }, editorContrib = { name: 'vs/editor/contrib', project: editorProject }, editor = { name: 'vs/editor', project: editorProject }, base = { name: 'vs/base', project: editorProject }, code = { name: 'vs/code', project: workbenchProject }, workbenchParts = { name: 'vs/workbench/parts/html', project: workbenchProject }, workbenchServices = { name: 'vs/workbench/services/files', project: workbenchProject }, workbench = { name: 'vs/workbench', project: workbenchProject }; - assert.deepEqual(i18n.getResource('vs/platform/actions/browser/menusExtensionPoint'), platform); - assert.deepEqual(i18n.getResource('vs/editor/contrib/clipboard/browser/clipboard'), editorContrib); - assert.deepEqual(i18n.getResource('vs/editor/common/modes/modesRegistry'), editor); - assert.deepEqual(i18n.getResource('vs/base/common/errorMessage'), base); - assert.deepEqual(i18n.getResource('vs/code/electron-main/window'), code); - assert.deepEqual(i18n.getResource('vs/workbench/parts/html/browser/webview'), workbenchParts); - assert.deepEqual(i18n.getResource('vs/workbench/services/files/node/fileService'), workbenchServices); - assert.deepEqual(i18n.getResource('vs/workbench/browser/parts/panel/panelActions'), workbench); - }); -}); +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +var assert = require("assert"); +var i18n = require("../i18n"); +suite('XLF Parser Tests', function () { + var sampleXlf = 'Key #1Key #2 &'; + var sampleTranslatedXlf = 'Key #1Кнопка #1Key #2 &Кнопка #2 &'; + var originalFilePath = 'vs/base/common/keybinding'; + var keys = ['key1', 'key2']; + var messages = ['Key #1', 'Key #2 &']; + var translatedMessages = { key1: 'Кнопка #1', key2: 'Кнопка #2 &' }; + test('Keys & messages to XLF conversion', function () { + var xlf = new i18n.XLF('vscode-workbench'); + xlf.addFile(originalFilePath, keys, messages); + var xlfString = xlf.toString(); + assert.strictEqual(xlfString.replace(/\s{2,}/g, ''), sampleXlf); + }); + test('XLF to keys & messages conversion', function () { + i18n.XLF.parse(sampleTranslatedXlf).then(function (resolvedFiles) { + assert.deepEqual(resolvedFiles[0].messages, translatedMessages); + assert.strictEqual(resolvedFiles[0].originalFilePath, originalFilePath); + }); + }); + test('JSON file source path to Transifex resource match', function () { + var editorProject = 'vscode-editor', workbenchProject = 'vscode-workbench'; + var platform = { name: 'vs/platform', project: editorProject }, editorContrib = { name: 'vs/editor/contrib', project: editorProject }, editor = { name: 'vs/editor', project: editorProject }, base = { name: 'vs/base', project: editorProject }, code = { name: 'vs/code', project: workbenchProject }, workbenchParts = { name: 'vs/workbench/parts/html', project: workbenchProject }, workbenchServices = { name: 'vs/workbench/services/files', project: workbenchProject }, workbench = { name: 'vs/workbench', project: workbenchProject }; + assert.deepEqual(i18n.getResource('vs/platform/actions/browser/menusExtensionPoint'), platform); + assert.deepEqual(i18n.getResource('vs/editor/contrib/clipboard/browser/clipboard'), editorContrib); + assert.deepEqual(i18n.getResource('vs/editor/common/modes/modesRegistry'), editor); + assert.deepEqual(i18n.getResource('vs/base/common/errorMessage'), base); + assert.deepEqual(i18n.getResource('vs/code/electron-main/window'), code); + assert.deepEqual(i18n.getResource('vs/workbench/parts/html/browser/webview'), workbenchParts); + assert.deepEqual(i18n.getResource('vs/workbench/services/files/node/fileService'), workbenchServices); + assert.deepEqual(i18n.getResource('vs/workbench/browser/parts/panel/panelActions'), workbench); + }); +}); diff --git a/build/lib/tslint/allowAsyncRule.js b/build/lib/tslint/allowAsyncRule.js index cdd121e00dbdf..ee2a652e3c90f 100644 --- a/build/lib/tslint/allowAsyncRule.js +++ b/build/lib/tslint/allowAsyncRule.js @@ -1,59 +1,59 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var ts = require("typescript"); -var Lint = require("tslint"); -var Rule = (function (_super) { - __extends(Rule, _super); - function Rule() { - return _super !== null && _super.apply(this, arguments) || this; - } - Rule.prototype.apply = function (sourceFile) { - var allowed = this.getOptions().ruleArguments[0]; - return this.applyWithWalker(new AsyncRuleWalker(sourceFile, this.getOptions(), allowed)); - }; - return Rule; -}(Lint.Rules.AbstractRule)); -exports.Rule = Rule; -var AsyncRuleWalker = (function (_super) { - __extends(AsyncRuleWalker, _super); - function AsyncRuleWalker(file, opts, allowed) { - var _this = _super.call(this, file, opts) || this; - _this.allowed = allowed; - return _this; - } - AsyncRuleWalker.prototype.visitMethodDeclaration = function (node) { - this.visitFunctionLikeDeclaration(node); - }; - AsyncRuleWalker.prototype.visitFunctionDeclaration = function (node) { - this.visitFunctionLikeDeclaration(node); - }; - AsyncRuleWalker.prototype.visitFunctionLikeDeclaration = function (node) { - var _this = this; - var flags = ts.getCombinedModifierFlags(node); - if (!(flags & ts.ModifierFlags.Async)) { - return; - } - var path = node.getSourceFile().path; - var pathParts = path.split(/\\|\//); - if (pathParts.some(function (part) { return _this.allowed.some(function (allowed) { return part === allowed; }); })) { - return; - } - var message = "You are not allowed to use async function in this layer. Allowed layers are: [" + this.allowed + "]"; - this.addFailureAtNode(node, message); - }; - return AsyncRuleWalker; -}(Lint.RuleWalker)); +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var ts = require("typescript"); +var Lint = require("tslint"); +var Rule = (function (_super) { + __extends(Rule, _super); + function Rule() { + return _super !== null && _super.apply(this, arguments) || this; + } + Rule.prototype.apply = function (sourceFile) { + var allowed = this.getOptions().ruleArguments[0]; + return this.applyWithWalker(new AsyncRuleWalker(sourceFile, this.getOptions(), allowed)); + }; + return Rule; +}(Lint.Rules.AbstractRule)); +exports.Rule = Rule; +var AsyncRuleWalker = (function (_super) { + __extends(AsyncRuleWalker, _super); + function AsyncRuleWalker(file, opts, allowed) { + var _this = _super.call(this, file, opts) || this; + _this.allowed = allowed; + return _this; + } + AsyncRuleWalker.prototype.visitMethodDeclaration = function (node) { + this.visitFunctionLikeDeclaration(node); + }; + AsyncRuleWalker.prototype.visitFunctionDeclaration = function (node) { + this.visitFunctionLikeDeclaration(node); + }; + AsyncRuleWalker.prototype.visitFunctionLikeDeclaration = function (node) { + var _this = this; + var flags = ts.getCombinedModifierFlags(node); + if (!(flags & ts.ModifierFlags.Async)) { + return; + } + var path = node.getSourceFile().path; + var pathParts = path.split(/\\|\//); + if (pathParts.some(function (part) { return _this.allowed.some(function (allowed) { return part === allowed; }); })) { + return; + } + var message = "You are not allowed to use async function in this layer. Allowed layers are: [" + this.allowed + "]"; + this.addFailureAtNode(node, message); + }; + return AsyncRuleWalker; +}(Lint.RuleWalker)); diff --git a/build/lib/tslint/allowAsyncRule.ts b/build/lib/tslint/allowAsyncRule.ts index 6506929cb9b7f..e61765bf53d5b 100644 --- a/build/lib/tslint/allowAsyncRule.ts +++ b/build/lib/tslint/allowAsyncRule.ts @@ -34,7 +34,7 @@ class AsyncRuleWalker extends Lint.RuleWalker { return; } - const path = node.getSourceFile().path; + const path = (node.getSourceFile() as any).path; const pathParts = path.split(/\\|\//); if (pathParts.some(part => this.allowed.some(allowed => part === allowed))) { diff --git a/build/lib/tslint/duplicateImportsRule.js b/build/lib/tslint/duplicateImportsRule.js index d63cb42a5d26f..c3e96b8e4122c 100644 --- a/build/lib/tslint/duplicateImportsRule.js +++ b/build/lib/tslint/duplicateImportsRule.js @@ -1,50 +1,50 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var path_1 = require("path"); -var Lint = require("tslint"); -var Rule = (function (_super) { - __extends(Rule, _super); - function Rule() { - return _super !== null && _super.apply(this, arguments) || this; - } - Rule.prototype.apply = function (sourceFile) { - return this.applyWithWalker(new ImportPatterns(sourceFile, this.getOptions())); - }; - return Rule; -}(Lint.Rules.AbstractRule)); -exports.Rule = Rule; -var ImportPatterns = (function (_super) { - __extends(ImportPatterns, _super); - function ImportPatterns(file, opts) { - var _this = _super.call(this, file, opts) || this; - _this.imports = Object.create(null); - return _this; - } - ImportPatterns.prototype.visitImportDeclaration = function (node) { - var path = node.moduleSpecifier.getText(); - // remove quotes - path = path.slice(1, -1); - if (path[0] === '.') { - path = path_1.join(path_1.dirname(node.getSourceFile().fileName), path); - } - if (this.imports[path]) { - this.addFailure(this.createFailure(node.getStart(), node.getWidth(), "Duplicate imports for '" + path + "'.")); - } - this.imports[path] = true; - }; - return ImportPatterns; -}(Lint.RuleWalker)); +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var path_1 = require("path"); +var Lint = require("tslint"); +var Rule = (function (_super) { + __extends(Rule, _super); + function Rule() { + return _super !== null && _super.apply(this, arguments) || this; + } + Rule.prototype.apply = function (sourceFile) { + return this.applyWithWalker(new ImportPatterns(sourceFile, this.getOptions())); + }; + return Rule; +}(Lint.Rules.AbstractRule)); +exports.Rule = Rule; +var ImportPatterns = (function (_super) { + __extends(ImportPatterns, _super); + function ImportPatterns(file, opts) { + var _this = _super.call(this, file, opts) || this; + _this.imports = Object.create(null); + return _this; + } + ImportPatterns.prototype.visitImportDeclaration = function (node) { + var path = node.moduleSpecifier.getText(); + // remove quotes + path = path.slice(1, -1); + if (path[0] === '.') { + path = path_1.join(path_1.dirname(node.getSourceFile().fileName), path); + } + if (this.imports[path]) { + this.addFailure(this.createFailure(node.getStart(), node.getWidth(), "Duplicate imports for '" + path + "'.")); + } + this.imports[path] = true; + }; + return ImportPatterns; +}(Lint.RuleWalker)); diff --git a/build/lib/tslint/importPatternsRule.js b/build/lib/tslint/importPatternsRule.js index f79ffca616567..5f11b0944efbb 100644 --- a/build/lib/tslint/importPatternsRule.js +++ b/build/lib/tslint/importPatternsRule.js @@ -1,57 +1,82 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var Lint = require("tslint"); -var minimatch = require("minimatch"); -var Rule = (function (_super) { - __extends(Rule, _super); - function Rule() { - return _super !== null && _super.apply(this, arguments) || this; - } - Rule.prototype.apply = function (sourceFile) { - var configs = this.getOptions().ruleArguments; - for (var _i = 0, configs_1 = configs; _i < configs_1.length; _i++) { - var config = configs_1[_i]; - if (minimatch(sourceFile.fileName, config.target)) { - return this.applyWithWalker(new ImportPatterns(sourceFile, this.getOptions(), config)); - } - } - return []; - }; - return Rule; -}(Lint.Rules.AbstractRule)); -exports.Rule = Rule; -var ImportPatterns = (function (_super) { - __extends(ImportPatterns, _super); - function ImportPatterns(file, opts, _config) { - var _this = _super.call(this, file, opts) || this; - _this._config = _config; - return _this; - } - ImportPatterns.prototype.visitImportDeclaration = function (node) { - var path = node.moduleSpecifier.getText(); - // remove quotes - path = path.slice(1, -1); - // ignore relative paths - if (path[0] === '.') { - return; - } - if (!minimatch(path, this._config.restrictions)) { - this.addFailure(this.createFailure(node.getStart(), node.getWidth(), "Imports violates '" + this._config.restrictions + "'-restriction.")); - } - }; - return ImportPatterns; -}(Lint.RuleWalker)); +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var ts = require("typescript"); +var Lint = require("tslint"); +var minimatch = require("minimatch"); +var path_1 = require("path"); +var Rule = (function (_super) { + __extends(Rule, _super); + function Rule() { + return _super !== null && _super.apply(this, arguments) || this; + } + Rule.prototype.apply = function (sourceFile) { + var configs = this.getOptions().ruleArguments; + for (var _i = 0, configs_1 = configs; _i < configs_1.length; _i++) { + var config = configs_1[_i]; + if (minimatch(sourceFile.fileName, config.target)) { + return this.applyWithWalker(new ImportPatterns(sourceFile, this.getOptions(), config)); + } + } + return []; + }; + return Rule; +}(Lint.Rules.AbstractRule)); +exports.Rule = Rule; +var ImportPatterns = (function (_super) { + __extends(ImportPatterns, _super); + function ImportPatterns(file, opts, _config) { + var _this = _super.call(this, file, opts) || this; + _this._config = _config; + return _this; + } + ImportPatterns.prototype.visitImportEqualsDeclaration = function (node) { + if (node.moduleReference.kind === ts.SyntaxKind.ExternalModuleReference) { + this._validateImport(node.moduleReference.expression.getText(), node); + } + }; + ImportPatterns.prototype.visitImportDeclaration = function (node) { + this._validateImport(node.moduleSpecifier.getText(), node); + }; + ImportPatterns.prototype._validateImport = function (path, node) { + // remove quotes + path = path.slice(1, -1); + // resolve relative paths + if (path[0] === '.') { + path = path_1.join(this.getSourceFile().fileName, path); + } + var restrictions; + if (typeof this._config.restrictions === 'string') { + restrictions = [this._config.restrictions]; + } + else { + restrictions = this._config.restrictions; + } + var matched = false; + for (var _i = 0, restrictions_1 = restrictions; _i < restrictions_1.length; _i++) { + var pattern = restrictions_1[_i]; + if (minimatch(path, pattern)) { + matched = true; + break; + } + } + if (!matched) { + // None of the restrictions matched + this.addFailure(this.createFailure(node.getStart(), node.getWidth(), "Imports violates '" + restrictions.join(' or ') + "' restrictions. See https://github.com/Microsoft/vscode/wiki/Code-Organization")); + } + }; + return ImportPatterns; +}(Lint.RuleWalker)); diff --git a/build/lib/tslint/importPatternsRule.ts b/build/lib/tslint/importPatternsRule.ts index 469ceec743cc8..4c267fb24d979 100644 --- a/build/lib/tslint/importPatternsRule.ts +++ b/build/lib/tslint/importPatternsRule.ts @@ -6,10 +6,11 @@ import * as ts from 'typescript'; import * as Lint from 'tslint'; import * as minimatch from 'minimatch'; +import { join } from 'path'; interface ImportPatternsConfig { target: string; - restrictions: string; + restrictions: string | string[]; } export class Rule extends Lint.Rules.AbstractRule { @@ -34,19 +35,43 @@ class ImportPatterns extends Lint.RuleWalker { super(file, opts); } + protected visitImportEqualsDeclaration(node: ts.ImportEqualsDeclaration): void { + if (node.moduleReference.kind === ts.SyntaxKind.ExternalModuleReference) { + this._validateImport(node.moduleReference.expression.getText(), node); + } + } + protected visitImportDeclaration(node: ts.ImportDeclaration): void { - let path = node.moduleSpecifier.getText(); + this._validateImport(node.moduleSpecifier.getText(), node); + } + private _validateImport(path: string, node: ts.Node): void { // remove quotes path = path.slice(1, -1); - // ignore relative paths + // resolve relative paths if (path[0] === '.') { - return; + path = join(this.getSourceFile().fileName, path); + } + + let restrictions: string[]; + if (typeof this._config.restrictions === 'string') { + restrictions = [this._config.restrictions]; + } else { + restrictions = this._config.restrictions; + } + + let matched = false; + for (const pattern of restrictions) { + if (minimatch(path, pattern)) { + matched = true; + break; + } } - if (!minimatch(path, this._config.restrictions)) { - this.addFailure(this.createFailure(node.getStart(), node.getWidth(), `Imports violates '${this._config.restrictions}'-restriction.`)); + if (!matched) { + // None of the restrictions matched + this.addFailure(this.createFailure(node.getStart(), node.getWidth(), `Imports violates '${restrictions.join(' or ')}' restrictions. See https://github.com/Microsoft/vscode/wiki/Code-Organization`)); } } } diff --git a/build/lib/tslint/layeringRule.js b/build/lib/tslint/layeringRule.js index 0d5b3771e3c78..31b19f3fb10ce 100644 --- a/build/lib/tslint/layeringRule.js +++ b/build/lib/tslint/layeringRule.js @@ -1,85 +1,93 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var Lint = require("tslint"); -var path_1 = require("path"); -var Rule = (function (_super) { - __extends(Rule, _super); - function Rule() { - return _super !== null && _super.apply(this, arguments) || this; - } - Rule.prototype.apply = function (sourceFile) { - var parts = path_1.dirname(sourceFile.fileName).split(/\\|\//); - var ruleArgs = this.getOptions().ruleArguments[0]; - var config; - for (var i = parts.length - 1; i >= 0; i--) { - if (ruleArgs[parts[i]]) { - config = { - allowed: new Set(ruleArgs[parts[i]]).add(parts[i]), - disallowed: new Set() - }; - Object.keys(ruleArgs).forEach(function (key) { - if (!config.allowed.has(key)) { - config.disallowed.add(key); - } - }); - break; - } - } - if (!config) { - return []; - } - return this.applyWithWalker(new LayeringRule(sourceFile, config, this.getOptions())); - }; - return Rule; -}(Lint.Rules.AbstractRule)); -exports.Rule = Rule; -var LayeringRule = (function (_super) { - __extends(LayeringRule, _super); - function LayeringRule(file, config, opts) { - var _this = _super.call(this, file, opts) || this; - _this._config = config; - return _this; - } - LayeringRule.prototype.visitImportDeclaration = function (node) { - var path = node.moduleSpecifier.getText(); - // remove quotes - path = path.slice(1, -1); - if (path[0] === '.') { - path = path_1.join(path_1.dirname(node.getSourceFile().fileName), path); - } - var parts = path_1.dirname(path).split(/\\|\//); - for (var i = parts.length - 1; i >= 0; i--) { - var part = parts[i]; - if (this._config.allowed.has(part)) { - // GOOD - same layer - return; - } - if (this._config.disallowed.has(part)) { - // BAD - wrong layer - var message = "Bad layering. You are not allowed to access '" + part + "' from here, allowed layers are: [" + LayeringRule._print(this._config.allowed) + "]"; - this.addFailure(this.createFailure(node.getStart(), node.getWidth(), message)); - return; - } - } - }; - LayeringRule._print = function (set) { - var r = []; - set.forEach(function (e) { return r.push(e); }); - return r.join(', '); - }; - return LayeringRule; -}(Lint.RuleWalker)); +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var ts = require("typescript"); +var Lint = require("tslint"); +var path_1 = require("path"); +var Rule = (function (_super) { + __extends(Rule, _super); + function Rule() { + return _super !== null && _super.apply(this, arguments) || this; + } + Rule.prototype.apply = function (sourceFile) { + var parts = path_1.dirname(sourceFile.fileName).split(/\\|\//); + var ruleArgs = this.getOptions().ruleArguments[0]; + var config; + for (var i = parts.length - 1; i >= 0; i--) { + if (ruleArgs[parts[i]]) { + config = { + allowed: new Set(ruleArgs[parts[i]]).add(parts[i]), + disallowed: new Set() + }; + Object.keys(ruleArgs).forEach(function (key) { + if (!config.allowed.has(key)) { + config.disallowed.add(key); + } + }); + break; + } + } + if (!config) { + return []; + } + return this.applyWithWalker(new LayeringRule(sourceFile, config, this.getOptions())); + }; + return Rule; +}(Lint.Rules.AbstractRule)); +exports.Rule = Rule; +var LayeringRule = (function (_super) { + __extends(LayeringRule, _super); + function LayeringRule(file, config, opts) { + var _this = _super.call(this, file, opts) || this; + _this._config = config; + return _this; + } + LayeringRule.prototype.visitImportEqualsDeclaration = function (node) { + if (node.moduleReference.kind === ts.SyntaxKind.ExternalModuleReference) { + this._validateImport(node.moduleReference.expression.getText(), node); + } + }; + LayeringRule.prototype.visitImportDeclaration = function (node) { + this._validateImport(node.moduleSpecifier.getText(), node); + }; + LayeringRule.prototype._validateImport = function (path, node) { + // remove quotes + path = path.slice(1, -1); + if (path[0] === '.') { + path = path_1.join(path_1.dirname(node.getSourceFile().fileName), path); + } + var parts = path_1.dirname(path).split(/\\|\//); + for (var i = parts.length - 1; i >= 0; i--) { + var part = parts[i]; + if (this._config.allowed.has(part)) { + // GOOD - same layer + return; + } + if (this._config.disallowed.has(part)) { + // BAD - wrong layer + var message = "Bad layering. You are not allowed to access '" + part + "' from here, allowed layers are: [" + LayeringRule._print(this._config.allowed) + "]"; + this.addFailure(this.createFailure(node.getStart(), node.getWidth(), message)); + return; + } + } + }; + LayeringRule._print = function (set) { + var r = []; + set.forEach(function (e) { return r.push(e); }); + return r.join(', '); + }; + return LayeringRule; +}(Lint.RuleWalker)); diff --git a/build/lib/tslint/layeringRule.ts b/build/lib/tslint/layeringRule.ts index c6e34623b2b1d..8217f11d92303 100644 --- a/build/lib/tslint/layeringRule.ts +++ b/build/lib/tslint/layeringRule.ts @@ -51,9 +51,17 @@ class LayeringRule extends Lint.RuleWalker { this._config = config; } + protected visitImportEqualsDeclaration(node: ts.ImportEqualsDeclaration): void { + if (node.moduleReference.kind === ts.SyntaxKind.ExternalModuleReference) { + this._validateImport(node.moduleReference.expression.getText(), node); + } + } + protected visitImportDeclaration(node: ts.ImportDeclaration): void { - let path = node.moduleSpecifier.getText(); + this._validateImport(node.moduleSpecifier.getText(), node); + } + private _validateImport(path: string, node: ts.Node): void { // remove quotes path = path.slice(1, -1); diff --git a/build/lib/tslint/noUnexternalizedStringsRule.js b/build/lib/tslint/noUnexternalizedStringsRule.js index 657c5f8a870a1..d6edfc0570a73 100644 --- a/build/lib/tslint/noUnexternalizedStringsRule.js +++ b/build/lib/tslint/noUnexternalizedStringsRule.js @@ -1,177 +1,177 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var ts = require("typescript"); -var Lint = require("tslint"); -/** - * Implementation of the no-unexternalized-strings rule. - */ -var Rule = (function (_super) { - __extends(Rule, _super); - function Rule() { - return _super !== null && _super.apply(this, arguments) || this; - } - Rule.prototype.apply = function (sourceFile) { - return this.applyWithWalker(new NoUnexternalizedStringsRuleWalker(sourceFile, this.getOptions())); - }; - return Rule; -}(Lint.Rules.AbstractRule)); -exports.Rule = Rule; -function isStringLiteral(node) { - return node && node.kind === ts.SyntaxKind.StringLiteral; -} -function isObjectLiteral(node) { - return node && node.kind === ts.SyntaxKind.ObjectLiteralExpression; -} -function isPropertyAssignment(node) { - return node && node.kind === ts.SyntaxKind.PropertyAssignment; -} -var NoUnexternalizedStringsRuleWalker = (function (_super) { - __extends(NoUnexternalizedStringsRuleWalker, _super); - function NoUnexternalizedStringsRuleWalker(file, opts) { - var _this = _super.call(this, file, opts) || this; - _this.signatures = Object.create(null); - _this.ignores = Object.create(null); - _this.messageIndex = undefined; - _this.keyIndex = undefined; - _this.usedKeys = Object.create(null); - var options = _this.getOptions(); - var first = options && options.length > 0 ? options[0] : null; - if (first) { - if (Array.isArray(first.signatures)) { - first.signatures.forEach(function (signature) { return _this.signatures[signature] = true; }); - } - if (Array.isArray(first.ignores)) { - first.ignores.forEach(function (ignore) { return _this.ignores[ignore] = true; }); - } - if (typeof first.messageIndex !== 'undefined') { - _this.messageIndex = first.messageIndex; - } - if (typeof first.keyIndex !== 'undefined') { - _this.keyIndex = first.keyIndex; - } - } - return _this; - } - NoUnexternalizedStringsRuleWalker.prototype.visitSourceFile = function (node) { - var _this = this; - _super.prototype.visitSourceFile.call(this, node); - Object.keys(this.usedKeys).forEach(function (key) { - var occurences = _this.usedKeys[key]; - if (occurences.length > 1) { - occurences.forEach(function (occurence) { - _this.addFailure((_this.createFailure(occurence.key.getStart(), occurence.key.getWidth(), "Duplicate key " + occurence.key.getText() + " with different message value."))); - }); - } - }); - }; - NoUnexternalizedStringsRuleWalker.prototype.visitStringLiteral = function (node) { - this.checkStringLiteral(node); - _super.prototype.visitStringLiteral.call(this, node); - }; - NoUnexternalizedStringsRuleWalker.prototype.checkStringLiteral = function (node) { - var text = node.getText(); - var doubleQuoted = text.length >= 2 && text[0] === NoUnexternalizedStringsRuleWalker.DOUBLE_QUOTE && text[text.length - 1] === NoUnexternalizedStringsRuleWalker.DOUBLE_QUOTE; - var info = this.findDescribingParent(node); - // Ignore strings in import and export nodes. - if (info && info.ignoreUsage) { - return; - } - var callInfo = info ? info.callInfo : null; - var functionName = callInfo ? callInfo.callExpression.expression.getText() : null; - if (functionName && this.ignores[functionName]) { - return; - } - if (doubleQuoted && (!callInfo || callInfo.argIndex === -1 || !this.signatures[functionName])) { - var s = node.getText(); - var replacement = new Lint.Replacement(node.getStart(), node.getWidth(), "nls.localize('KEY-" + s.substring(1, s.length - 1) + "', " + s + ")"); - var fix = new Lint.Fix('Unexternalitzed string', [replacement]); - this.addFailure(this.createFailure(node.getStart(), node.getWidth(), "Unexternalized string found: " + node.getText(), fix)); - return; - } - // We have a single quoted string outside a localize function name. - if (!doubleQuoted && !this.signatures[functionName]) { - return; - } - // We have a string that is a direct argument into the localize call. - var keyArg = callInfo.argIndex === this.keyIndex - ? callInfo.callExpression.arguments[this.keyIndex] - : null; - if (keyArg) { - if (isStringLiteral(keyArg)) { - this.recordKey(keyArg, this.messageIndex ? callInfo.callExpression.arguments[this.messageIndex] : undefined); - } - else if (isObjectLiteral(keyArg)) { - for (var i = 0; i < keyArg.properties.length; i++) { - var property = keyArg.properties[i]; - if (isPropertyAssignment(property)) { - var name_1 = property.name.getText(); - if (name_1 === 'key') { - var initializer = property.initializer; - if (isStringLiteral(initializer)) { - this.recordKey(initializer, this.messageIndex ? callInfo.callExpression.arguments[this.messageIndex] : undefined); - } - break; - } - } - } - } - } - var messageArg = callInfo.argIndex === this.messageIndex - ? callInfo.callExpression.arguments[this.messageIndex] - : null; - if (messageArg && messageArg !== node) { - this.addFailure(this.createFailure(messageArg.getStart(), messageArg.getWidth(), "Message argument to '" + callInfo.callExpression.expression.getText() + "' must be a string literal.")); - return; - } - }; - NoUnexternalizedStringsRuleWalker.prototype.recordKey = function (keyNode, messageNode) { - var text = keyNode.getText(); - var occurences = this.usedKeys[text]; - if (!occurences) { - occurences = []; - this.usedKeys[text] = occurences; - } - if (messageNode) { - if (occurences.some(function (pair) { return pair.message ? pair.message.getText() === messageNode.getText() : false; })) { - return; - } - } - occurences.push({ key: keyNode, message: messageNode }); - }; - NoUnexternalizedStringsRuleWalker.prototype.findDescribingParent = function (node) { - var parent; - while ((parent = node.parent)) { - var kind = parent.kind; - if (kind === ts.SyntaxKind.CallExpression) { - var callExpression = parent; - return { callInfo: { callExpression: callExpression, argIndex: callExpression.arguments.indexOf(node) } }; - } - else if (kind === ts.SyntaxKind.ImportEqualsDeclaration || kind === ts.SyntaxKind.ImportDeclaration || kind === ts.SyntaxKind.ExportDeclaration) { - return { ignoreUsage: true }; - } - else if (kind === ts.SyntaxKind.VariableDeclaration || kind === ts.SyntaxKind.FunctionDeclaration || kind === ts.SyntaxKind.PropertyDeclaration - || kind === ts.SyntaxKind.MethodDeclaration || kind === ts.SyntaxKind.VariableDeclarationList || kind === ts.SyntaxKind.InterfaceDeclaration - || kind === ts.SyntaxKind.ClassDeclaration || kind === ts.SyntaxKind.EnumDeclaration || kind === ts.SyntaxKind.ModuleDeclaration - || kind === ts.SyntaxKind.TypeAliasDeclaration || kind === ts.SyntaxKind.SourceFile) { - return null; - } - node = parent; - } - }; - return NoUnexternalizedStringsRuleWalker; -}(Lint.RuleWalker)); -NoUnexternalizedStringsRuleWalker.DOUBLE_QUOTE = '"'; +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var ts = require("typescript"); +var Lint = require("tslint"); +/** + * Implementation of the no-unexternalized-strings rule. + */ +var Rule = (function (_super) { + __extends(Rule, _super); + function Rule() { + return _super !== null && _super.apply(this, arguments) || this; + } + Rule.prototype.apply = function (sourceFile) { + return this.applyWithWalker(new NoUnexternalizedStringsRuleWalker(sourceFile, this.getOptions())); + }; + return Rule; +}(Lint.Rules.AbstractRule)); +exports.Rule = Rule; +function isStringLiteral(node) { + return node && node.kind === ts.SyntaxKind.StringLiteral; +} +function isObjectLiteral(node) { + return node && node.kind === ts.SyntaxKind.ObjectLiteralExpression; +} +function isPropertyAssignment(node) { + return node && node.kind === ts.SyntaxKind.PropertyAssignment; +} +var NoUnexternalizedStringsRuleWalker = (function (_super) { + __extends(NoUnexternalizedStringsRuleWalker, _super); + function NoUnexternalizedStringsRuleWalker(file, opts) { + var _this = _super.call(this, file, opts) || this; + _this.signatures = Object.create(null); + _this.ignores = Object.create(null); + _this.messageIndex = undefined; + _this.keyIndex = undefined; + _this.usedKeys = Object.create(null); + var options = _this.getOptions(); + var first = options && options.length > 0 ? options[0] : null; + if (first) { + if (Array.isArray(first.signatures)) { + first.signatures.forEach(function (signature) { return _this.signatures[signature] = true; }); + } + if (Array.isArray(first.ignores)) { + first.ignores.forEach(function (ignore) { return _this.ignores[ignore] = true; }); + } + if (typeof first.messageIndex !== 'undefined') { + _this.messageIndex = first.messageIndex; + } + if (typeof first.keyIndex !== 'undefined') { + _this.keyIndex = first.keyIndex; + } + } + return _this; + } + NoUnexternalizedStringsRuleWalker.prototype.visitSourceFile = function (node) { + var _this = this; + _super.prototype.visitSourceFile.call(this, node); + Object.keys(this.usedKeys).forEach(function (key) { + var occurrences = _this.usedKeys[key]; + if (occurrences.length > 1) { + occurrences.forEach(function (occurrence) { + _this.addFailure((_this.createFailure(occurrence.key.getStart(), occurrence.key.getWidth(), "Duplicate key " + occurrence.key.getText() + " with different message value."))); + }); + } + }); + }; + NoUnexternalizedStringsRuleWalker.prototype.visitStringLiteral = function (node) { + this.checkStringLiteral(node); + _super.prototype.visitStringLiteral.call(this, node); + }; + NoUnexternalizedStringsRuleWalker.prototype.checkStringLiteral = function (node) { + var text = node.getText(); + var doubleQuoted = text.length >= 2 && text[0] === NoUnexternalizedStringsRuleWalker.DOUBLE_QUOTE && text[text.length - 1] === NoUnexternalizedStringsRuleWalker.DOUBLE_QUOTE; + var info = this.findDescribingParent(node); + // Ignore strings in import and export nodes. + if (info && info.ignoreUsage) { + return; + } + var callInfo = info ? info.callInfo : null; + var functionName = callInfo ? callInfo.callExpression.expression.getText() : null; + if (functionName && this.ignores[functionName]) { + return; + } + if (doubleQuoted && (!callInfo || callInfo.argIndex === -1 || !this.signatures[functionName])) { + var s = node.getText(); + var replacement = new Lint.Replacement(node.getStart(), node.getWidth(), "nls.localize('KEY-" + s.substring(1, s.length - 1) + "', " + s + ")"); + var fix = new Lint.Fix('Unexternalitzed string', [replacement]); + this.addFailure(this.createFailure(node.getStart(), node.getWidth(), "Unexternalized string found: " + node.getText(), fix)); + return; + } + // We have a single quoted string outside a localize function name. + if (!doubleQuoted && !this.signatures[functionName]) { + return; + } + // We have a string that is a direct argument into the localize call. + var keyArg = callInfo.argIndex === this.keyIndex + ? callInfo.callExpression.arguments[this.keyIndex] + : null; + if (keyArg) { + if (isStringLiteral(keyArg)) { + this.recordKey(keyArg, this.messageIndex ? callInfo.callExpression.arguments[this.messageIndex] : undefined); + } + else if (isObjectLiteral(keyArg)) { + for (var i = 0; i < keyArg.properties.length; i++) { + var property = keyArg.properties[i]; + if (isPropertyAssignment(property)) { + var name_1 = property.name.getText(); + if (name_1 === 'key') { + var initializer = property.initializer; + if (isStringLiteral(initializer)) { + this.recordKey(initializer, this.messageIndex ? callInfo.callExpression.arguments[this.messageIndex] : undefined); + } + break; + } + } + } + } + } + var messageArg = callInfo.argIndex === this.messageIndex + ? callInfo.callExpression.arguments[this.messageIndex] + : null; + if (messageArg && messageArg !== node) { + this.addFailure(this.createFailure(messageArg.getStart(), messageArg.getWidth(), "Message argument to '" + callInfo.callExpression.expression.getText() + "' must be a string literal.")); + return; + } + }; + NoUnexternalizedStringsRuleWalker.prototype.recordKey = function (keyNode, messageNode) { + var text = keyNode.getText(); + var occurrences = this.usedKeys[text]; + if (!occurrences) { + occurrences = []; + this.usedKeys[text] = occurrences; + } + if (messageNode) { + if (occurrences.some(function (pair) { return pair.message ? pair.message.getText() === messageNode.getText() : false; })) { + return; + } + } + occurrences.push({ key: keyNode, message: messageNode }); + }; + NoUnexternalizedStringsRuleWalker.prototype.findDescribingParent = function (node) { + var parent; + while ((parent = node.parent)) { + var kind = parent.kind; + if (kind === ts.SyntaxKind.CallExpression) { + var callExpression = parent; + return { callInfo: { callExpression: callExpression, argIndex: callExpression.arguments.indexOf(node) } }; + } + else if (kind === ts.SyntaxKind.ImportEqualsDeclaration || kind === ts.SyntaxKind.ImportDeclaration || kind === ts.SyntaxKind.ExportDeclaration) { + return { ignoreUsage: true }; + } + else if (kind === ts.SyntaxKind.VariableDeclaration || kind === ts.SyntaxKind.FunctionDeclaration || kind === ts.SyntaxKind.PropertyDeclaration + || kind === ts.SyntaxKind.MethodDeclaration || kind === ts.SyntaxKind.VariableDeclarationList || kind === ts.SyntaxKind.InterfaceDeclaration + || kind === ts.SyntaxKind.ClassDeclaration || kind === ts.SyntaxKind.EnumDeclaration || kind === ts.SyntaxKind.ModuleDeclaration + || kind === ts.SyntaxKind.TypeAliasDeclaration || kind === ts.SyntaxKind.SourceFile) { + return null; + } + node = parent; + } + }; + return NoUnexternalizedStringsRuleWalker; +}(Lint.RuleWalker)); +NoUnexternalizedStringsRuleWalker.DOUBLE_QUOTE = '"'; diff --git a/build/lib/tslint/noUnexternalizedStringsRule.ts b/build/lib/tslint/noUnexternalizedStringsRule.ts index d7a2d8ca10015..cbe457c5be5ca 100644 --- a/build/lib/tslint/noUnexternalizedStringsRule.ts +++ b/build/lib/tslint/noUnexternalizedStringsRule.ts @@ -82,10 +82,10 @@ class NoUnexternalizedStringsRuleWalker extends Lint.RuleWalker { protected visitSourceFile(node: ts.SourceFile): void { super.visitSourceFile(node); Object.keys(this.usedKeys).forEach(key => { - let occurences = this.usedKeys[key]; - if (occurences.length > 1) { - occurences.forEach(occurence => { - this.addFailure((this.createFailure(occurence.key.getStart(), occurence.key.getWidth(), `Duplicate key ${occurence.key.getText()} with different message value.`))); + let occurrences = this.usedKeys[key]; + if (occurrences.length > 1) { + occurrences.forEach(occurrence => { + this.addFailure((this.createFailure(occurrence.key.getStart(), occurrence.key.getWidth(), `Duplicate key ${occurrence.key.getText()} with different message value.`))); }); } }); @@ -157,17 +157,17 @@ class NoUnexternalizedStringsRuleWalker extends Lint.RuleWalker { private recordKey(keyNode: ts.StringLiteral, messageNode: ts.Node) { let text = keyNode.getText(); - let occurences: KeyMessagePair[] = this.usedKeys[text]; - if (!occurences) { - occurences = []; - this.usedKeys[text] = occurences; + let occurrences: KeyMessagePair[] = this.usedKeys[text]; + if (!occurrences) { + occurrences = []; + this.usedKeys[text] = occurrences; } if (messageNode) { - if (occurences.some(pair => pair.message ? pair.message.getText() === messageNode.getText() : false)) { + if (occurrences.some(pair => pair.message ? pair.message.getText() === messageNode.getText() : false)) { return; } } - occurences.push({ key: keyNode, message: messageNode }); + occurrences.push({ key: keyNode, message: messageNode }); } private findDescribingParent(node: ts.Node): { callInfo?: { callExpression: ts.CallExpression, argIndex: number }, ignoreUsage?: boolean; } { diff --git a/build/lib/tslint/translationRemindRule.js b/build/lib/tslint/translationRemindRule.js new file mode 100644 index 0000000000000..d0ed1a024038d --- /dev/null +++ b/build/lib/tslint/translationRemindRule.js @@ -0,0 +1,79 @@ +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Lint = require("tslint"); +var fs = require("fs"); +var Rule = (function (_super) { + __extends(Rule, _super); + function Rule() { + return _super !== null && _super.apply(this, arguments) || this; + } + Rule.prototype.apply = function (sourceFile) { + return this.applyWithWalker(new TranslationRemindRuleWalker(sourceFile, this.getOptions())); + }; + return Rule; +}(Lint.Rules.AbstractRule)); +exports.Rule = Rule; +var TranslationRemindRuleWalker = (function (_super) { + __extends(TranslationRemindRuleWalker, _super); + function TranslationRemindRuleWalker(file, opts) { + return _super.call(this, file, opts) || this; + } + TranslationRemindRuleWalker.prototype.visitImportDeclaration = function (node) { + var declaration = node.moduleSpecifier.getText(); + if (declaration !== "'" + TranslationRemindRuleWalker.NLS_MODULE + "'") { + return; + } + this.visitImportLikeDeclaration(node); + }; + TranslationRemindRuleWalker.prototype.visitImportEqualsDeclaration = function (node) { + var reference = node.moduleReference.getText(); + if (reference !== "require('" + TranslationRemindRuleWalker.NLS_MODULE + "')") { + return; + } + this.visitImportLikeDeclaration(node); + }; + TranslationRemindRuleWalker.prototype.visitImportLikeDeclaration = function (node) { + var currentFile = node.getSourceFile().fileName; + var matchService = currentFile.match(/vs\/workbench\/services\/\w+/); + var matchPart = currentFile.match(/vs\/workbench\/parts\/\w+/); + if (!matchService && !matchPart) { + return; + } + var resource = matchService ? matchService[0] : matchPart[0]; + var resourceDefined = false; + var json; + try { + json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'); + } + catch (e) { + console.error('[translation-remind rule]: File with resources to pull from Transifex was not found. Aborting translation resource check for newly defined workbench part/service.'); + return; + } + var workbenchResources = JSON.parse(json).workbench; + workbenchResources.forEach(function (existingResource) { + if (existingResource.name === resource) { + resourceDefined = true; + return; + } + }); + if (!resourceDefined) { + this.addFailureAtNode(node, "Please add '" + resource + "' to ./builds/lib/i18n.resources.json file to use translations here."); + } + }; + return TranslationRemindRuleWalker; +}(Lint.RuleWalker)); +TranslationRemindRuleWalker.NLS_MODULE = 'vs/nls'; diff --git a/build/lib/tslint/translationRemindRule.ts b/build/lib/tslint/translationRemindRule.ts new file mode 100644 index 0000000000000..6bc2a191619e5 --- /dev/null +++ b/build/lib/tslint/translationRemindRule.ts @@ -0,0 +1,73 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as ts from 'typescript'; +import * as Lint from 'tslint'; +import * as fs from 'fs'; + +export class Rule extends Lint.Rules.AbstractRule { + public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { + return this.applyWithWalker(new TranslationRemindRuleWalker(sourceFile, this.getOptions())); + } +} + +class TranslationRemindRuleWalker extends Lint.RuleWalker { + + private static NLS_MODULE: string = 'vs/nls'; + + constructor(file: ts.SourceFile, opts: Lint.IOptions) { + super(file, opts); + } + + protected visitImportDeclaration(node: ts.ImportDeclaration): void { + const declaration = node.moduleSpecifier.getText(); + if (declaration !== `'${TranslationRemindRuleWalker.NLS_MODULE}'`) { + return; + } + + this.visitImportLikeDeclaration(node); + } + + protected visitImportEqualsDeclaration(node: ts.ImportEqualsDeclaration): void { + const reference = node.moduleReference.getText(); + if (reference !== `require('${TranslationRemindRuleWalker.NLS_MODULE}')`) { + return; + } + + this.visitImportLikeDeclaration(node); + } + + private visitImportLikeDeclaration(node: ts.ImportDeclaration | ts.ImportEqualsDeclaration) { + const currentFile = node.getSourceFile().fileName; + const matchService = currentFile.match(/vs\/workbench\/services\/\w+/); + const matchPart = currentFile.match(/vs\/workbench\/parts\/\w+/); + if (!matchService && !matchPart) { + return; + } + + const resource = matchService ? matchService[0] : matchPart[0]; + let resourceDefined = false; + + let json; + try { + json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'); + } catch (e) { + console.error('[translation-remind rule]: File with resources to pull from Transifex was not found. Aborting translation resource check for newly defined workbench part/service.'); + return; + } + const workbenchResources = JSON.parse(json).workbench; + + workbenchResources.forEach(existingResource => { + if (existingResource.name === resource) { + resourceDefined = true; + return; + } + }); + + if (!resourceDefined) { + this.addFailureAtNode(node, `Please add '${resource}' to ./builds/lib/i18n.resources.json file to use translations here.`); + } + } +} diff --git a/build/lib/typescript/OSSREADME.json b/build/lib/typescript/OSSREADME.json deleted file mode 100644 index 6fa824225ad45..0000000000000 --- a/build/lib/typescript/OSSREADME.json +++ /dev/null @@ -1,70 +0,0 @@ -// ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS: -[ - { - "name": "typescript-legacy", - "version": "1.5", - "license": "Apache2", - "repositoryURL": "https://github.com/Microsoft/TypeScript", - // Reason: LICENSE file does not include Copyright statement - "licenseDetail": [ - "Copyright (c) Microsoft Corporation. All rights reserved. ", - "", - "Apache License", - "", - "Version 2.0, January 2004", - "", - "http://www.apache.org/licenses/", - "", - "TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION", - "", - "1. Definitions.", - "", - "\"License\" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.", - "", - "\"Licensor\" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.", - "", - "\"Legal Entity\" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, \"control\" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.", - "", - "\"You\" (or \"Your\") shall mean an individual or Legal Entity exercising permissions granted by this License.", - "", - "\"Source\" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.", - "", - "\"Object\" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.", - "", - "\"Work\" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).", - "", - "\"Derivative Works\" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.", - "", - "\"Contribution\" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, \"submitted\" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as \"Not a Contribution.\"", - "", - "\"Contributor\" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.", - "", - "2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.", - "", - "3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.", - "", - "4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:", - "", - "You must give any other recipients of the Work or Derivative Works a copy of this License; and", - "", - "You must cause any modified files to carry prominent notices stating that You changed the files; and", - "", - "You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and", - "", - "If the Work includes a \"NOTICE\" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.", - "", - "5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.", - "", - "6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.", - "", - "7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.", - "", - "8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.", - "", - "9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.", - "", - "END OF TERMS AND CONDITIONS" - ], - "isDev": true - } -] \ No newline at end of file diff --git a/build/lib/typescript/typescriptServices.d.ts b/build/lib/typescript/typescriptServices.d.ts deleted file mode 100644 index 9b5cf8c4d50ff..0000000000000 --- a/build/lib/typescript/typescriptServices.d.ts +++ /dev/null @@ -1,1994 +0,0 @@ -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ - -declare module ts { - interface Map { - [index: string]: T; - } - interface FileMap { - get(fileName: string): T; - set(fileName: string, value: T): void; - contains(fileName: string): boolean; - remove(fileName: string): void; - forEachValue(f: (v: T) => void): void; - } - interface TextRange { - pos: number; - end: number; - } - const enum SyntaxKind { - Unknown = 0, - EndOfFileToken = 1, - SingleLineCommentTrivia = 2, - MultiLineCommentTrivia = 3, - NewLineTrivia = 4, - WhitespaceTrivia = 5, - ConflictMarkerTrivia = 6, - NumericLiteral = 7, - StringLiteral = 8, - RegularExpressionLiteral = 9, - NoSubstitutionTemplateLiteral = 10, - TemplateHead = 11, - TemplateMiddle = 12, - TemplateTail = 13, - OpenBraceToken = 14, - CloseBraceToken = 15, - OpenParenToken = 16, - CloseParenToken = 17, - OpenBracketToken = 18, - CloseBracketToken = 19, - DotToken = 20, - DotDotDotToken = 21, - SemicolonToken = 22, - CommaToken = 23, - LessThanToken = 24, - GreaterThanToken = 25, - LessThanEqualsToken = 26, - GreaterThanEqualsToken = 27, - EqualsEqualsToken = 28, - ExclamationEqualsToken = 29, - EqualsEqualsEqualsToken = 30, - ExclamationEqualsEqualsToken = 31, - EqualsGreaterThanToken = 32, - PlusToken = 33, - MinusToken = 34, - AsteriskToken = 35, - SlashToken = 36, - PercentToken = 37, - PlusPlusToken = 38, - MinusMinusToken = 39, - LessThanLessThanToken = 40, - GreaterThanGreaterThanToken = 41, - GreaterThanGreaterThanGreaterThanToken = 42, - AmpersandToken = 43, - BarToken = 44, - CaretToken = 45, - ExclamationToken = 46, - TildeToken = 47, - AmpersandAmpersandToken = 48, - BarBarToken = 49, - QuestionToken = 50, - ColonToken = 51, - AtToken = 52, - EqualsToken = 53, - PlusEqualsToken = 54, - MinusEqualsToken = 55, - AsteriskEqualsToken = 56, - SlashEqualsToken = 57, - PercentEqualsToken = 58, - LessThanLessThanEqualsToken = 59, - GreaterThanGreaterThanEqualsToken = 60, - GreaterThanGreaterThanGreaterThanEqualsToken = 61, - AmpersandEqualsToken = 62, - BarEqualsToken = 63, - CaretEqualsToken = 64, - Identifier = 65, - BreakKeyword = 66, - CaseKeyword = 67, - CatchKeyword = 68, - ClassKeyword = 69, - ConstKeyword = 70, - ContinueKeyword = 71, - DebuggerKeyword = 72, - DefaultKeyword = 73, - DeleteKeyword = 74, - DoKeyword = 75, - ElseKeyword = 76, - EnumKeyword = 77, - ExportKeyword = 78, - ExtendsKeyword = 79, - FalseKeyword = 80, - FinallyKeyword = 81, - ForKeyword = 82, - FunctionKeyword = 83, - IfKeyword = 84, - ImportKeyword = 85, - InKeyword = 86, - InstanceOfKeyword = 87, - NewKeyword = 88, - NullKeyword = 89, - ReturnKeyword = 90, - SuperKeyword = 91, - SwitchKeyword = 92, - ThisKeyword = 93, - ThrowKeyword = 94, - TrueKeyword = 95, - TryKeyword = 96, - TypeOfKeyword = 97, - VarKeyword = 98, - VoidKeyword = 99, - WhileKeyword = 100, - WithKeyword = 101, - ImplementsKeyword = 102, - InterfaceKeyword = 103, - LetKeyword = 104, - PackageKeyword = 105, - PrivateKeyword = 106, - ProtectedKeyword = 107, - PublicKeyword = 108, - StaticKeyword = 109, - YieldKeyword = 110, - AsKeyword = 111, - AnyKeyword = 112, - BooleanKeyword = 113, - ConstructorKeyword = 114, - DeclareKeyword = 115, - GetKeyword = 116, - IsKeyword = 117, - ModuleKeyword = 118, - NamespaceKeyword = 119, - RequireKeyword = 120, - NumberKeyword = 121, - SetKeyword = 122, - StringKeyword = 123, - SymbolKeyword = 124, - TypeKeyword = 125, - FromKeyword = 126, - OfKeyword = 127, - QualifiedName = 128, - ComputedPropertyName = 129, - TypeParameter = 130, - Parameter = 131, - Decorator = 132, - PropertySignature = 133, - PropertyDeclaration = 134, - MethodSignature = 135, - MethodDeclaration = 136, - Constructor = 137, - GetAccessor = 138, - SetAccessor = 139, - CallSignature = 140, - ConstructSignature = 141, - IndexSignature = 142, - TypePredicate = 143, - TypeReference = 144, - FunctionType = 145, - ConstructorType = 146, - TypeQuery = 147, - TypeLiteral = 148, - ArrayType = 149, - TupleType = 150, - UnionType = 151, - ParenthesizedType = 152, - ObjectBindingPattern = 153, - ArrayBindingPattern = 154, - BindingElement = 155, - ArrayLiteralExpression = 156, - ObjectLiteralExpression = 157, - PropertyAccessExpression = 158, - ElementAccessExpression = 159, - CallExpression = 160, - NewExpression = 161, - TaggedTemplateExpression = 162, - TypeAssertionExpression = 163, - ParenthesizedExpression = 164, - FunctionExpression = 165, - ArrowFunction = 166, - DeleteExpression = 167, - TypeOfExpression = 168, - VoidExpression = 169, - PrefixUnaryExpression = 170, - PostfixUnaryExpression = 171, - BinaryExpression = 172, - ConditionalExpression = 173, - TemplateExpression = 174, - YieldExpression = 175, - SpreadElementExpression = 176, - ClassExpression = 177, - OmittedExpression = 178, - ExpressionWithTypeArguments = 179, - TemplateSpan = 180, - SemicolonClassElement = 181, - Block = 182, - VariableStatement = 183, - EmptyStatement = 184, - ExpressionStatement = 185, - IfStatement = 186, - DoStatement = 187, - WhileStatement = 188, - ForStatement = 189, - ForInStatement = 190, - ForOfStatement = 191, - ContinueStatement = 192, - BreakStatement = 193, - ReturnStatement = 194, - WithStatement = 195, - SwitchStatement = 196, - LabeledStatement = 197, - ThrowStatement = 198, - TryStatement = 199, - DebuggerStatement = 200, - VariableDeclaration = 201, - VariableDeclarationList = 202, - FunctionDeclaration = 203, - ClassDeclaration = 204, - InterfaceDeclaration = 205, - TypeAliasDeclaration = 206, - EnumDeclaration = 207, - ModuleDeclaration = 208, - ModuleBlock = 209, - CaseBlock = 210, - ImportEqualsDeclaration = 211, - ImportDeclaration = 212, - ImportClause = 213, - NamespaceImport = 214, - NamedImports = 215, - ImportSpecifier = 216, - ExportAssignment = 217, - ExportDeclaration = 218, - NamedExports = 219, - ExportSpecifier = 220, - MissingDeclaration = 221, - ExternalModuleReference = 222, - CaseClause = 223, - DefaultClause = 224, - HeritageClause = 225, - CatchClause = 226, - PropertyAssignment = 227, - ShorthandPropertyAssignment = 228, - EnumMember = 229, - SourceFile = 230, - JSDocTypeExpression = 231, - JSDocAllType = 232, - JSDocUnknownType = 233, - JSDocArrayType = 234, - JSDocUnionType = 235, - JSDocTupleType = 236, - JSDocNullableType = 237, - JSDocNonNullableType = 238, - JSDocRecordType = 239, - JSDocRecordMember = 240, - JSDocTypeReference = 241, - JSDocOptionalType = 242, - JSDocFunctionType = 243, - JSDocVariadicType = 244, - JSDocConstructorType = 245, - JSDocThisType = 246, - JSDocComment = 247, - JSDocTag = 248, - JSDocParameterTag = 249, - JSDocReturnTag = 250, - JSDocTypeTag = 251, - JSDocTemplateTag = 252, - SyntaxList = 253, - Count = 254, - FirstAssignment = 53, - LastAssignment = 64, - FirstReservedWord = 66, - LastReservedWord = 101, - FirstKeyword = 66, - LastKeyword = 127, - FirstFutureReservedWord = 102, - LastFutureReservedWord = 110, - FirstTypeNode = 144, - LastTypeNode = 152, - FirstPunctuation = 14, - LastPunctuation = 64, - FirstToken = 0, - LastToken = 127, - FirstTriviaToken = 2, - LastTriviaToken = 6, - FirstLiteralToken = 7, - LastLiteralToken = 10, - FirstTemplateToken = 10, - LastTemplateToken = 13, - FirstBinaryOperator = 24, - LastBinaryOperator = 64, - FirstNode = 128, - } - const enum NodeFlags { - Export = 1, - Ambient = 2, - Public = 16, - Private = 32, - Protected = 64, - Static = 128, - Default = 256, - MultiLine = 512, - Synthetic = 1024, - DeclarationFile = 2048, - Let = 4096, - Const = 8192, - OctalLiteral = 16384, - Namespace = 32768, - ExportContext = 65536, - Modifier = 499, - AccessibilityModifier = 112, - BlockScoped = 12288, - } - interface Node extends TextRange { - kind: SyntaxKind; - flags: NodeFlags; - decorators?: NodeArray; - modifiers?: ModifiersArray; - parent?: Node; - } - interface NodeArray extends Array, TextRange { - hasTrailingComma?: boolean; - } - interface ModifiersArray extends NodeArray { - flags: number; - } - interface Identifier extends PrimaryExpression { - text: string; - originalKeywordKind?: SyntaxKind; - } - interface QualifiedName extends Node { - left: EntityName; - right: Identifier; - } - type EntityName = Identifier | QualifiedName; - type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName | BindingPattern; - interface Declaration extends Node { - _declarationBrand: any; - name?: DeclarationName; - } - interface ComputedPropertyName extends Node { - expression: Expression; - } - interface Decorator extends Node { - expression: LeftHandSideExpression; - } - interface TypeParameterDeclaration extends Declaration { - name: Identifier; - constraint?: TypeNode; - expression?: Expression; - } - interface SignatureDeclaration extends Declaration { - typeParameters?: NodeArray; - parameters: NodeArray; - type?: TypeNode; - } - interface VariableDeclaration extends Declaration { - parent?: VariableDeclarationList; - name: Identifier | BindingPattern; - type?: TypeNode; - initializer?: Expression; - } - interface VariableDeclarationList extends Node { - declarations: NodeArray; - } - interface ParameterDeclaration extends Declaration { - dotDotDotToken?: Node; - name: Identifier | BindingPattern; - questionToken?: Node; - type?: TypeNode; - initializer?: Expression; - } - interface BindingElement extends Declaration { - propertyName?: Identifier; - dotDotDotToken?: Node; - name: Identifier | BindingPattern; - initializer?: Expression; - } - interface PropertyDeclaration extends Declaration, ClassElement { - name: DeclarationName; - questionToken?: Node; - type?: TypeNode; - initializer?: Expression; - } - interface ObjectLiteralElement extends Declaration { - _objectLiteralBrandBrand: any; - } - interface PropertyAssignment extends ObjectLiteralElement { - _propertyAssignmentBrand: any; - name: DeclarationName; - questionToken?: Node; - initializer: Expression; - } - interface ShorthandPropertyAssignment extends ObjectLiteralElement { - name: Identifier; - questionToken?: Node; - } - interface VariableLikeDeclaration extends Declaration { - propertyName?: Identifier; - dotDotDotToken?: Node; - name: DeclarationName; - questionToken?: Node; - type?: TypeNode; - initializer?: Expression; - } - interface BindingPattern extends Node { - elements: NodeArray; - } - /** - * Several node kinds share function-like features such as a signature, - * a name, and a body. These nodes should extend FunctionLikeDeclaration. - * Examples: - * FunctionDeclaration - * MethodDeclaration - * AccessorDeclaration - */ - interface FunctionLikeDeclaration extends SignatureDeclaration { - _functionLikeDeclarationBrand: any; - asteriskToken?: Node; - questionToken?: Node; - body?: Block | Expression; - } - interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { - name?: Identifier; - body?: Block; - } - interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { - body?: Block; - } - interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { - body?: Block; - } - interface SemicolonClassElement extends ClassElement { - _semicolonClassElementBrand: any; - } - interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { - _accessorDeclarationBrand: any; - body: Block; - } - interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { - _indexSignatureDeclarationBrand: any; - } - interface TypeNode extends Node { - _typeNodeBrand: any; - } - interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration { - _functionOrConstructorTypeNodeBrand: any; - } - interface TypeReferenceNode extends TypeNode { - typeName: EntityName; - typeArguments?: NodeArray; - } - interface TypePredicateNode extends TypeNode { - parameterName: Identifier; - type: TypeNode; - } - interface TypeQueryNode extends TypeNode { - exprName: EntityName; - } - interface TypeLiteralNode extends TypeNode, Declaration { - members: NodeArray; - } - interface ArrayTypeNode extends TypeNode { - elementType: TypeNode; - } - interface TupleTypeNode extends TypeNode { - elementTypes: NodeArray; - } - interface UnionTypeNode extends TypeNode { - types: NodeArray; - } - interface ParenthesizedTypeNode extends TypeNode { - type: TypeNode; - } - interface StringLiteral extends LiteralExpression, TypeNode { - _stringLiteralBrand: any; - } - interface Expression extends Node { - _expressionBrand: any; - contextualType?: Type; - } - interface UnaryExpression extends Expression { - _unaryExpressionBrand: any; - } - interface PrefixUnaryExpression extends UnaryExpression { - operator: SyntaxKind; - operand: UnaryExpression; - } - interface PostfixUnaryExpression extends PostfixExpression { - operand: LeftHandSideExpression; - operator: SyntaxKind; - } - interface PostfixExpression extends UnaryExpression { - _postfixExpressionBrand: any; - } - interface LeftHandSideExpression extends PostfixExpression { - _leftHandSideExpressionBrand: any; - } - interface MemberExpression extends LeftHandSideExpression { - _memberExpressionBrand: any; - } - interface PrimaryExpression extends MemberExpression { - _primaryExpressionBrand: any; - } - interface DeleteExpression extends UnaryExpression { - expression: UnaryExpression; - } - interface TypeOfExpression extends UnaryExpression { - expression: UnaryExpression; - } - interface VoidExpression extends UnaryExpression { - expression: UnaryExpression; - } - interface YieldExpression extends Expression { - asteriskToken?: Node; - expression?: Expression; - } - interface BinaryExpression extends Expression { - left: Expression; - operatorToken: Node; - right: Expression; - } - interface ConditionalExpression extends Expression { - condition: Expression; - questionToken: Node; - whenTrue: Expression; - colonToken: Node; - whenFalse: Expression; - } - interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { - name?: Identifier; - body: Block | Expression; - } - interface ArrowFunction extends Expression, FunctionLikeDeclaration { - equalsGreaterThanToken: Node; - } - interface LiteralExpression extends PrimaryExpression { - text: string; - isUnterminated?: boolean; - hasExtendedUnicodeEscape?: boolean; - } - interface TemplateExpression extends PrimaryExpression { - head: LiteralExpression; - templateSpans: NodeArray; - } - interface TemplateSpan extends Node { - expression: Expression; - literal: LiteralExpression; - } - interface ParenthesizedExpression extends PrimaryExpression { - expression: Expression; - } - interface ArrayLiteralExpression extends PrimaryExpression { - elements: NodeArray; - } - interface SpreadElementExpression extends Expression { - expression: Expression; - } - interface ObjectLiteralExpression extends PrimaryExpression, Declaration { - properties: NodeArray; - } - interface PropertyAccessExpression extends MemberExpression { - expression: LeftHandSideExpression; - dotToken: Node; - name: Identifier; - } - interface ElementAccessExpression extends MemberExpression { - expression: LeftHandSideExpression; - argumentExpression?: Expression; - } - interface CallExpression extends LeftHandSideExpression { - expression: LeftHandSideExpression; - typeArguments?: NodeArray; - arguments: NodeArray; - } - interface ExpressionWithTypeArguments extends TypeNode { - expression: LeftHandSideExpression; - typeArguments?: NodeArray; - } - interface NewExpression extends CallExpression, PrimaryExpression { - } - interface TaggedTemplateExpression extends MemberExpression { - tag: LeftHandSideExpression; - template: LiteralExpression | TemplateExpression; - } - type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression; - interface TypeAssertion extends UnaryExpression { - type: TypeNode; - expression: UnaryExpression; - } - interface Statement extends Node { - _statementBrand: any; - } - interface Block extends Statement { - statements: NodeArray; - } - interface VariableStatement extends Statement { - declarationList: VariableDeclarationList; - } - interface ExpressionStatement extends Statement { - expression: Expression; - } - interface IfStatement extends Statement { - expression: Expression; - thenStatement: Statement; - elseStatement?: Statement; - } - interface IterationStatement extends Statement { - statement: Statement; - } - interface DoStatement extends IterationStatement { - expression: Expression; - } - interface WhileStatement extends IterationStatement { - expression: Expression; - } - interface ForStatement extends IterationStatement { - initializer?: VariableDeclarationList | Expression; - condition?: Expression; - incrementor?: Expression; - } - interface ForInStatement extends IterationStatement { - initializer: VariableDeclarationList | Expression; - expression: Expression; - } - interface ForOfStatement extends IterationStatement { - initializer: VariableDeclarationList | Expression; - expression: Expression; - } - interface BreakOrContinueStatement extends Statement { - label?: Identifier; - } - interface ReturnStatement extends Statement { - expression?: Expression; - } - interface WithStatement extends Statement { - expression: Expression; - statement: Statement; - } - interface SwitchStatement extends Statement { - expression: Expression; - caseBlock: CaseBlock; - } - interface CaseBlock extends Node { - clauses: NodeArray; - } - interface CaseClause extends Node { - expression?: Expression; - statements: NodeArray; - } - interface DefaultClause extends Node { - statements: NodeArray; - } - type CaseOrDefaultClause = CaseClause | DefaultClause; - interface LabeledStatement extends Statement { - label: Identifier; - statement: Statement; - } - interface ThrowStatement extends Statement { - expression: Expression; - } - interface TryStatement extends Statement { - tryBlock: Block; - catchClause?: CatchClause; - finallyBlock?: Block; - } - interface CatchClause extends Node { - variableDeclaration: VariableDeclaration; - block: Block; - } - interface ClassLikeDeclaration extends Declaration { - name?: Identifier; - typeParameters?: NodeArray; - heritageClauses?: NodeArray; - members: NodeArray; - } - interface ClassDeclaration extends ClassLikeDeclaration, Statement { - } - interface ClassExpression extends ClassLikeDeclaration, PrimaryExpression { - } - interface ClassElement extends Declaration { - _classElementBrand: any; - } - interface InterfaceDeclaration extends Declaration, Statement { - name: Identifier; - typeParameters?: NodeArray; - heritageClauses?: NodeArray; - members: NodeArray; - } - interface HeritageClause extends Node { - token: SyntaxKind; - types?: NodeArray; - } - interface TypeAliasDeclaration extends Declaration, Statement { - name: Identifier; - typeParameters?: NodeArray; - type: TypeNode; - } - interface EnumMember extends Declaration { - name: DeclarationName; - initializer?: Expression; - } - interface EnumDeclaration extends Declaration, Statement { - name: Identifier; - members: NodeArray; - } - interface ModuleDeclaration extends Declaration, Statement { - name: Identifier | LiteralExpression; - body: ModuleBlock | ModuleDeclaration; - } - interface ModuleBlock extends Node, Statement { - statements: NodeArray; - } - interface ImportEqualsDeclaration extends Declaration, Statement { - name: Identifier; - moduleReference: EntityName | ExternalModuleReference; - } - interface ExternalModuleReference extends Node { - expression?: Expression; - } - interface ImportDeclaration extends Statement { - importClause?: ImportClause; - moduleSpecifier: Expression; - } - interface ImportClause extends Declaration { - name?: Identifier; - namedBindings?: NamespaceImport | NamedImports; - } - interface NamespaceImport extends Declaration { - name: Identifier; - } - interface ExportDeclaration extends Declaration, Statement { - exportClause?: NamedExports; - moduleSpecifier?: Expression; - } - interface NamedImportsOrExports extends Node { - elements: NodeArray; - } - type NamedImports = NamedImportsOrExports; - type NamedExports = NamedImportsOrExports; - interface ImportOrExportSpecifier extends Declaration { - propertyName?: Identifier; - name: Identifier; - } - type ImportSpecifier = ImportOrExportSpecifier; - type ExportSpecifier = ImportOrExportSpecifier; - interface ExportAssignment extends Declaration, Statement { - isExportEquals?: boolean; - expression: Expression; - } - interface FileReference extends TextRange { - fileName: string; - } - interface CommentRange extends TextRange { - hasTrailingNewLine?: boolean; - kind: SyntaxKind; - } - interface JSDocTypeExpression extends Node { - type: JSDocType; - } - interface JSDocType extends TypeNode { - _jsDocTypeBrand: any; - } - interface JSDocAllType extends JSDocType { - _JSDocAllTypeBrand: any; - } - interface JSDocUnknownType extends JSDocType { - _JSDocUnknownTypeBrand: any; - } - interface JSDocArrayType extends JSDocType { - elementType: JSDocType; - } - interface JSDocUnionType extends JSDocType { - types: NodeArray; - } - interface JSDocTupleType extends JSDocType { - types: NodeArray; - } - interface JSDocNonNullableType extends JSDocType { - type: JSDocType; - } - interface JSDocNullableType extends JSDocType { - type: JSDocType; - } - interface JSDocRecordType extends JSDocType, TypeLiteralNode { - members: NodeArray; - } - interface JSDocTypeReference extends JSDocType { - name: EntityName; - typeArguments: NodeArray; - } - interface JSDocOptionalType extends JSDocType { - type: JSDocType; - } - interface JSDocFunctionType extends JSDocType, SignatureDeclaration { - parameters: NodeArray; - type: JSDocType; - } - interface JSDocVariadicType extends JSDocType { - type: JSDocType; - } - interface JSDocConstructorType extends JSDocType { - type: JSDocType; - } - interface JSDocThisType extends JSDocType { - type: JSDocType; - } - interface JSDocRecordMember extends PropertyDeclaration { - name: Identifier | LiteralExpression; - type?: JSDocType; - } - interface JSDocComment extends Node { - tags: NodeArray; - } - interface JSDocTag extends Node { - atToken: Node; - tagName: Identifier; - } - interface JSDocTemplateTag extends JSDocTag { - typeParameters: NodeArray; - } - interface JSDocReturnTag extends JSDocTag { - typeExpression: JSDocTypeExpression; - } - interface JSDocTypeTag extends JSDocTag { - typeExpression: JSDocTypeExpression; - } - interface JSDocParameterTag extends JSDocTag { - preParameterName?: Identifier; - typeExpression?: JSDocTypeExpression; - postParameterName?: Identifier; - isBracketed: boolean; - } - interface SourceFile extends Declaration { - statements: NodeArray; - endOfFileToken: Node; - fileName: string; - text: string; - amdDependencies: { - path: string; - name: string; - }[]; - moduleName: string; - referencedFiles: FileReference[]; - /** - * lib.d.ts should have a reference comment like - * - * /// - * - * If any other file has this comment, it signals not to include lib.d.ts - * because this containing file is intended to act as a default library. - */ - hasNoDefaultLib: boolean; - languageVersion: ScriptTarget; - } - interface ScriptReferenceHost { - getCompilerOptions(): CompilerOptions; - getSourceFile(fileName: string): SourceFile; - getCurrentDirectory(): string; - } - interface ParseConfigHost { - readDirectory(rootDir: string, extension: string, exclude: string[]): string[]; - } - interface WriteFileCallback { - (fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; - } - interface Program extends ScriptReferenceHost { - /** - * Get a list of files in the program - */ - getSourceFiles(): SourceFile[]; - /** - * Emits the JavaScript and declaration files. If targetSourceFile is not specified, then - * the JavaScript and declaration files will be produced for all the files in this program. - * If targetSourceFile is specified, then only the JavaScript and declaration for that - * specific file will be generated. - * - * If writeFile is not specified then the writeFile callback from the compiler host will be - * used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter - * will be invoked when writing the JavaScript and declaration files. - */ - emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback): EmitResult; - getSyntacticDiagnostics(sourceFile?: SourceFile): Diagnostic[]; - getGlobalDiagnostics(): Diagnostic[]; - getSemanticDiagnostics(sourceFile?: SourceFile): Diagnostic[]; - getDeclarationDiagnostics(sourceFile?: SourceFile): Diagnostic[]; - /** - * Gets a type checker that can be used to semantically analyze source fils in the program. - */ - getTypeChecker(): TypeChecker; - } - interface SourceMapSpan { - /** Line number in the .js file. */ - emittedLine: number; - /** Column number in the .js file. */ - emittedColumn: number; - /** Line number in the .ts file. */ - sourceLine: number; - /** Column number in the .ts file. */ - sourceColumn: number; - /** Optional name (index into names array) associated with this span. */ - nameIndex?: number; - /** .ts file (index into sources array) associated with this span */ - sourceIndex: number; - } - interface SourceMapData { - sourceMapFilePath: string; - jsSourceMappingURL: string; - sourceMapFile: string; - sourceMapSourceRoot: string; - sourceMapSources: string[]; - sourceMapSourcesContent?: string[]; - inputSourceFileNames: string[]; - sourceMapNames?: string[]; - sourceMapMappings: string; - sourceMapDecodedMappings: SourceMapSpan[]; - } - /** Return code used by getEmitOutput function to indicate status of the function */ - enum ExitStatus { - Success = 0, - DiagnosticsPresent_OutputsSkipped = 1, - DiagnosticsPresent_OutputsGenerated = 2, - } - interface EmitResult { - emitSkipped: boolean; - diagnostics: Diagnostic[]; - } - interface TypeCheckerHost { - getCompilerOptions(): CompilerOptions; - getSourceFiles(): SourceFile[]; - getSourceFile(fileName: string): SourceFile; - } - interface TypeChecker { - getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; - getDeclaredTypeOfSymbol(symbol: Symbol): Type; - getPropertiesOfType(type: Type): Symbol[]; - getPropertyOfType(type: Type, propertyName: string): Symbol; - getSignaturesOfType(type: Type, kind: SignatureKind): Signature[]; - getIndexTypeOfType(type: Type, kind: IndexKind): Type; - getReturnTypeOfSignature(signature: Signature): Type; - getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; - getSymbolAtLocation(node: Node): Symbol; - getShorthandAssignmentValueSymbol(location: Node): Symbol; - getTypeAtLocation(node: Node): Type; - typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; - symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; - getSymbolDisplayBuilder(): SymbolDisplayBuilder; - getFullyQualifiedName(symbol: Symbol): string; - getAugmentedPropertiesOfType(type: Type): Symbol[]; - getRootSymbols(symbol: Symbol): Symbol[]; - getContextualType(node: Expression): Type; - getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; - getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; - isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; - isUndefinedSymbol(symbol: Symbol): boolean; - isArgumentsSymbol(symbol: Symbol): boolean; - getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; - isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; - getAliasedSymbol(symbol: Symbol): Symbol; - getExportsOfModule(moduleSymbol: Symbol): Symbol[]; - } - interface SymbolDisplayBuilder { - buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void; - buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void; - buildDisplayForParametersAndDelimiters(parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildDisplayForTypeParametersAndDelimiters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildReturnTypeDisplay(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - } - interface SymbolWriter { - writeKeyword(text: string): void; - writeOperator(text: string): void; - writePunctuation(text: string): void; - writeSpace(text: string): void; - writeStringLiteral(text: string): void; - writeParameter(text: string): void; - writeSymbol(text: string, symbol: Symbol): void; - writeLine(): void; - increaseIndent(): void; - decreaseIndent(): void; - clear(): void; - trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void; - } - const enum TypeFormatFlags { - None = 0, - WriteArrayAsGenericType = 1, - UseTypeOfFunction = 2, - NoTruncation = 4, - WriteArrowStyleSignature = 8, - WriteOwnNameForAnyLike = 16, - WriteTypeArgumentsOfSignature = 32, - InElementType = 64, - UseFullyQualifiedType = 128, - } - const enum SymbolFormatFlags { - None = 0, - WriteTypeParametersOrArguments = 1, - UseOnlyExternalAliasing = 2, - } - interface TypePredicate { - parameterName: string; - parameterIndex: number; - type: Type; - } - const enum SymbolFlags { - None = 0, - FunctionScopedVariable = 1, - BlockScopedVariable = 2, - Property = 4, - EnumMember = 8, - Function = 16, - Class = 32, - Interface = 64, - ConstEnum = 128, - RegularEnum = 256, - ValueModule = 512, - NamespaceModule = 1024, - TypeLiteral = 2048, - ObjectLiteral = 4096, - Method = 8192, - Constructor = 16384, - GetAccessor = 32768, - SetAccessor = 65536, - Signature = 131072, - TypeParameter = 262144, - TypeAlias = 524288, - ExportValue = 1048576, - ExportType = 2097152, - ExportNamespace = 4194304, - Alias = 8388608, - Instantiated = 16777216, - Merged = 33554432, - Transient = 67108864, - Prototype = 134217728, - UnionProperty = 268435456, - Optional = 536870912, - ExportStar = 1073741824, - Enum = 384, - Variable = 3, - Value = 107455, - Type = 793056, - Namespace = 1536, - Module = 1536, - Accessor = 98304, - FunctionScopedVariableExcludes = 107454, - BlockScopedVariableExcludes = 107455, - ParameterExcludes = 107455, - PropertyExcludes = 107455, - EnumMemberExcludes = 107455, - FunctionExcludes = 106927, - ClassExcludes = 899583, - InterfaceExcludes = 792992, - RegularEnumExcludes = 899327, - ConstEnumExcludes = 899967, - ValueModuleExcludes = 106639, - NamespaceModuleExcludes = 0, - MethodExcludes = 99263, - GetAccessorExcludes = 41919, - SetAccessorExcludes = 74687, - TypeParameterExcludes = 530912, - TypeAliasExcludes = 793056, - AliasExcludes = 8388608, - ModuleMember = 8914931, - ExportHasLocal = 944, - HasExports = 1952, - HasMembers = 6240, - BlockScoped = 418, - PropertyOrAccessor = 98308, - Export = 7340032, - } - interface Symbol { - flags: SymbolFlags; - name: string; - declarations?: Declaration[]; - valueDeclaration?: Declaration; - members?: SymbolTable; - exports?: SymbolTable; - } - interface SymbolTable { - [index: string]: Symbol; - } - const enum TypeFlags { - Any = 1, - String = 2, - Number = 4, - Boolean = 8, - Void = 16, - Undefined = 32, - Null = 64, - Enum = 128, - StringLiteral = 256, - TypeParameter = 512, - Class = 1024, - Interface = 2048, - Reference = 4096, - Tuple = 8192, - Union = 16384, - Anonymous = 32768, - Instantiated = 65536, - ObjectLiteral = 262144, - ESSymbol = 2097152, - StringLike = 258, - NumberLike = 132, - ObjectType = 48128, - } - interface Type { - flags: TypeFlags; - symbol?: Symbol; - } - interface StringLiteralType extends Type { - text: string; - } - interface ObjectType extends Type { - } - interface InterfaceType extends ObjectType { - typeParameters: TypeParameter[]; - outerTypeParameters: TypeParameter[]; - localTypeParameters: TypeParameter[]; - } - interface InterfaceTypeWithBaseTypes extends InterfaceType { - baseTypes: ObjectType[]; - } - interface InterfaceTypeWithDeclaredMembers extends InterfaceType { - declaredProperties: Symbol[]; - declaredCallSignatures: Signature[]; - declaredConstructSignatures: Signature[]; - declaredStringIndexType: Type; - declaredNumberIndexType: Type; - } - interface TypeReference extends ObjectType { - target: GenericType; - typeArguments: Type[]; - } - interface GenericType extends InterfaceType, TypeReference { - } - interface TupleType extends ObjectType { - elementTypes: Type[]; - baseArrayType: TypeReference; - } - interface UnionType extends Type { - types: Type[]; - } - interface TypeParameter extends Type { - constraint: Type; - } - const enum SignatureKind { - Call = 0, - Construct = 1, - } - interface Signature { - declaration: SignatureDeclaration; - typeParameters: TypeParameter[]; - parameters: Symbol[]; - typePredicate?: TypePredicate; - } - const enum IndexKind { - String = 0, - Number = 1, - } - interface DiagnosticMessage { - key: string; - category: DiagnosticCategory; - code: number; - } - /** - * A linked list of formatted diagnostic messages to be used as part of a multiline message. - * It is built from the bottom up, leaving the head to be the "main" diagnostic. - * While it seems that DiagnosticMessageChain is structurally similar to DiagnosticMessage, - * the difference is that messages are all preformatted in DMC. - */ - interface DiagnosticMessageChain { - messageText: string; - category: DiagnosticCategory; - code: number; - next?: DiagnosticMessageChain; - } - interface Diagnostic { - file: SourceFile; - start: number; - length: number; - messageText: string | DiagnosticMessageChain; - category: DiagnosticCategory; - code: number; - } - enum DiagnosticCategory { - Warning = 0, - Error = 1, - Message = 2, - } - interface CompilerOptions { - allowNonTsExtensions?: boolean; - charset?: string; - declaration?: boolean; - dependency?: boolean; - diagnostics?: boolean; - emitBOM?: boolean; - help?: boolean; - inlineSourceMap?: boolean; - inlineSources?: boolean; - listFiles?: boolean; - locale?: string; - mapRoot?: string; - module?: ModuleKind; - newLine?: NewLineKind; - noEmit?: boolean; - noEmitHelpers?: boolean; - noEmitOnError?: boolean; - noErrorTruncation?: boolean; - noImplicitAny?: boolean; - noLib?: boolean; - noResolve?: boolean; - out?: string; - outDir?: string; - preserveConstEnums?: boolean; - project?: string; - removeComments?: boolean; - rootDir?: string; - sourceMap?: boolean; - sourceRoot?: string; - suppressImplicitAnyIndexErrors?: boolean; - target?: ScriptTarget; - version?: boolean; - watch?: boolean; - isolatedModules?: boolean; - experimentalDecorators?: boolean; - emitDecoratorMetadata?: boolean; - [option: string]: string | number | boolean; - } - const enum ModuleKind { - None = 0, - CommonJS = 1, - AMD = 2, - UMD = 3, - System = 4, - } - const enum NewLineKind { - CarriageReturnLineFeed = 0, - LineFeed = 1, - } - interface LineAndCharacter { - line: number; - character: number; - } - const enum ScriptTarget { - ES3 = 0, - ES5 = 1, - ES6 = 2, - Latest = 2, - } - interface ParsedCommandLine { - options: CompilerOptions; - fileNames: string[]; - errors: Diagnostic[]; - } - interface CancellationToken { - isCancellationRequested(): boolean; - } - interface CompilerHost { - getSourceFile(fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; - getDefaultLibFileName(options: CompilerOptions): string; - getCancellationToken?(): CancellationToken; - writeFile: WriteFileCallback; - getCurrentDirectory(): string; - getCanonicalFileName(fileName: string): string; - useCaseSensitiveFileNames(): boolean; - getNewLine(): string; - } - interface TextSpan { - start: number; - length: number; - } - interface TextChangeRange { - span: TextSpan; - newLength: number; - } -} -declare module ts { - interface System { - args: string[]; - newLine: string; - useCaseSensitiveFileNames: boolean; - write(s: string): void; - readFile(path: string, encoding?: string): string; - writeFile(path: string, data: string, writeByteOrderMark?: boolean): void; - watchFile?(path: string, callback: (path: string) => void): FileWatcher; - resolvePath(path: string): string; - fileExists(path: string): boolean; - directoryExists(path: string): boolean; - createDirectory(path: string): void; - getExecutingFilePath(): string; - getCurrentDirectory(): string; - readDirectory(path: string, extension?: string, exclude?: string[]): string[]; - getMemoryUsage?(): number; - exit(exitCode?: number): void; - } - interface FileWatcher { - close(): void; - } - var sys: System; -} -declare module ts { - interface ErrorCallback { - (message: DiagnosticMessage, length: number): void; - } - interface Scanner { - getStartPos(): number; - getToken(): SyntaxKind; - getTextPos(): number; - getTokenPos(): number; - getTokenText(): string; - getTokenValue(): string; - hasExtendedUnicodeEscape(): boolean; - hasPrecedingLineBreak(): boolean; - isIdentifier(): boolean; - isReservedWord(): boolean; - isUnterminated(): boolean; - reScanGreaterToken(): SyntaxKind; - reScanSlashToken(): SyntaxKind; - reScanTemplateToken(): SyntaxKind; - scan(): SyntaxKind; - setText(text: string, start?: number, length?: number): void; - setOnError(onError: ErrorCallback): void; - setScriptTarget(scriptTarget: ScriptTarget): void; - setTextPos(textPos: number): void; - lookAhead(callback: () => T): T; - tryScan(callback: () => T): T; - } - function tokenToString(t: SyntaxKind): string; - function getPositionOfLineAndCharacter(sourceFile: SourceFile, line: number, character: number): number; - function getLineAndCharacterOfPosition(sourceFile: SourceFile, position: number): LineAndCharacter; - function isWhiteSpace(ch: number): boolean; - function isLineBreak(ch: number): boolean; - function getLeadingCommentRanges(text: string, pos: number): CommentRange[]; - function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; - function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; - function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; -} -declare module ts { - function getDefaultLibFileName(options: CompilerOptions): string; - function textSpanEnd(span: TextSpan): number; - function textSpanIsEmpty(span: TextSpan): boolean; - function textSpanContainsPosition(span: TextSpan, position: number): boolean; - function textSpanContainsTextSpan(span: TextSpan, other: TextSpan): boolean; - function textSpanOverlapsWith(span: TextSpan, other: TextSpan): boolean; - function textSpanOverlap(span1: TextSpan, span2: TextSpan): TextSpan; - function textSpanIntersectsWithTextSpan(span: TextSpan, other: TextSpan): boolean; - function textSpanIntersectsWith(span: TextSpan, start: number, length: number): boolean; - function textSpanIntersectsWithPosition(span: TextSpan, position: number): boolean; - function textSpanIntersection(span1: TextSpan, span2: TextSpan): TextSpan; - function createTextSpan(start: number, length: number): TextSpan; - function createTextSpanFromBounds(start: number, end: number): TextSpan; - function textChangeRangeNewSpan(range: TextChangeRange): TextSpan; - function textChangeRangeIsUnchanged(range: TextChangeRange): boolean; - function createTextChangeRange(span: TextSpan, newLength: number): TextChangeRange; - let unchangedTextChangeRange: TextChangeRange; - /** - * Called to merge all the changes that occurred across several versions of a script snapshot - * into a single change. i.e. if a user keeps making successive edits to a script we will - * have a text change from V1 to V2, V2 to V3, ..., Vn. - * - * This function will then merge those changes into a single change range valid between V1 and - * Vn. - */ - function collapseTextChangeRangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange; - function getTypeParameterOwner(d: Declaration): Declaration; -} -declare module ts { - function getNodeConstructor(kind: SyntaxKind): new () => Node; - function createNode(kind: SyntaxKind): Node; - function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodeArray?: (nodes: Node[]) => T): T; - function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean): SourceFile; - function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; -} -declare module ts { - /** The version of the TypeScript compiler release */ - const version: string; - function findConfigFile(searchPath: string): string; - function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost; - function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile): Diagnostic[]; - function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string; - function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost): Program; -} -declare module ts { - function parseCommandLine(commandLine: string[]): ParsedCommandLine; - /** - * Read tsconfig.json file - * @param fileName The path to the config file - */ - function readConfigFile(fileName: string): { - config?: any; - error?: Diagnostic; - }; - /** - * Parse the text of the tsconfig.json file - * @param fileName The path to the config file - * @param jsonText The text of the config file - */ - function parseConfigFileText(fileName: string, jsonText: string): { - config?: any; - error?: Diagnostic; - }; - /** - * Parse the contents of a config file (tsconfig.json). - * @param json The contents of the config file to parse - * @param basePath A root directory to resolve relative path entries in the config - * file to. e.g. outDir - */ - function parseConfigFile(json: any, host: ParseConfigHost, basePath: string): ParsedCommandLine; -} -declare module ts { - /** The version of the language service API */ - let servicesVersion: string; - interface Node { - getSourceFile(): SourceFile; - getChildCount(sourceFile?: SourceFile): number; - getChildAt(index: number, sourceFile?: SourceFile): Node; - getChildren(sourceFile?: SourceFile): Node[]; - getStart(sourceFile?: SourceFile): number; - getFullStart(): number; - getEnd(): number; - getWidth(sourceFile?: SourceFile): number; - getFullWidth(): number; - getLeadingTriviaWidth(sourceFile?: SourceFile): number; - getFullText(sourceFile?: SourceFile): string; - getText(sourceFile?: SourceFile): string; - getFirstToken(sourceFile?: SourceFile): Node; - getLastToken(sourceFile?: SourceFile): Node; - } - interface Symbol { - getFlags(): SymbolFlags; - getName(): string; - getDeclarations(): Declaration[]; - getDocumentationComment(): SymbolDisplayPart[]; - } - interface Type { - getFlags(): TypeFlags; - getSymbol(): Symbol; - getProperties(): Symbol[]; - getProperty(propertyName: string): Symbol; - getApparentProperties(): Symbol[]; - getCallSignatures(): Signature[]; - getConstructSignatures(): Signature[]; - getStringIndexType(): Type; - getNumberIndexType(): Type; - } - interface Signature { - getDeclaration(): SignatureDeclaration; - getTypeParameters(): Type[]; - getParameters(): Symbol[]; - getReturnType(): Type; - getDocumentationComment(): SymbolDisplayPart[]; - } - interface SourceFile { - getLineAndCharacterOfPosition(pos: number): LineAndCharacter; - getLineStarts(): number[]; - getPositionOfLineAndCharacter(line: number, character: number): number; - update(newText: string, textChangeRange: TextChangeRange): SourceFile; - } - /** - * Represents an immutable snapshot of a script at a specified time.Once acquired, the - * snapshot is observably immutable. i.e. the same calls with the same parameters will return - * the same values. - */ - interface IScriptSnapshot { - /** Gets a portion of the script snapshot specified by [start, end). */ - getText(start: number, end: number): string; - /** Gets the length of this script snapshot. */ - getLength(): number; - /** - * Gets the TextChangeRange that describe how the text changed between this text and - * an older version. This information is used by the incremental parser to determine - * what sections of the script need to be re-parsed. 'undefined' can be returned if the - * change range cannot be determined. However, in that case, incremental parsing will - * not happen and the entire document will be re - parsed. - */ - getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange; - } - module ScriptSnapshot { - function fromString(text: string): IScriptSnapshot; - } - interface PreProcessedFileInfo { - referencedFiles: FileReference[]; - importedFiles: FileReference[]; - isLibFile: boolean; - } - interface LanguageServiceHost { - getCompilationSettings(): CompilerOptions; - getNewLine?(): string; - getProjectVersion?(): string; - getScriptFileNames(): string[]; - getScriptVersion(fileName: string): string; - getScriptSnapshot(fileName: string): IScriptSnapshot; - getLocalizedDiagnosticMessages?(): any; - getCancellationToken?(): CancellationToken; - getCurrentDirectory(): string; - getDefaultLibFileName(options: CompilerOptions): string; - log?(s: string): void; - trace?(s: string): void; - error?(s: string): void; - useCaseSensitiveFileNames?(): boolean; - } - interface LanguageService { - cleanupSemanticCache(): void; - getSyntacticDiagnostics(fileName: string): Diagnostic[]; - getSemanticDiagnostics(fileName: string): Diagnostic[]; - getCompilerOptionsDiagnostics(): Diagnostic[]; - /** - * @deprecated Use getEncodedSyntacticClassifications instead. - */ - getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; - /** - * @deprecated Use getEncodedSemanticClassifications instead. - */ - getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; - getEncodedSyntacticClassifications(fileName: string, span: TextSpan): Classifications; - getEncodedSemanticClassifications(fileName: string, span: TextSpan): Classifications; - getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; - getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; - getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; - getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; - getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan; - getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems; - getRenameInfo(fileName: string, position: number): RenameInfo; - findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): RenameLocation[]; - getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; - getTypeDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; - getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[]; - findReferences(fileName: string, position: number): ReferencedSymbol[]; - getDocumentHighlights(fileName: string, position: number, filesToSearch: string[]): DocumentHighlights[]; - /** @deprecated */ - getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[]; - getNavigateToItems(searchValue: string, maxResultCount?: number): NavigateToItem[]; - getNavigationBarItems(fileName: string): NavigationBarItem[]; - getOutliningSpans(fileName: string): OutliningSpan[]; - getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; - getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; - getIndentationAtPosition(fileName: string, position: number, options: EditorOptions): number; - getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[]; - getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[]; - getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[]; - getEmitOutput(fileName: string): EmitOutput; - getProgram(): Program; - getSourceFile(fileName: string): SourceFile; - dispose(): void; - } - interface Classifications { - spans: number[]; - endOfLineState: EndOfLineState; - } - interface ClassifiedSpan { - textSpan: TextSpan; - classificationType: string; - } - interface NavigationBarItem { - text: string; - kind: string; - kindModifiers: string; - spans: TextSpan[]; - childItems: NavigationBarItem[]; - indent: number; - bolded: boolean; - grayed: boolean; - } - interface TodoCommentDescriptor { - text: string; - priority: number; - } - interface TodoComment { - descriptor: TodoCommentDescriptor; - message: string; - position: number; - } - class TextChange { - span: TextSpan; - newText: string; - } - interface RenameLocation { - textSpan: TextSpan; - fileName: string; - } - interface ReferenceEntry { - textSpan: TextSpan; - fileName: string; - isWriteAccess: boolean; - } - interface DocumentHighlights { - fileName: string; - highlightSpans: HighlightSpan[]; - } - module HighlightSpanKind { - const none: string; - const definition: string; - const reference: string; - const writtenReference: string; - } - interface HighlightSpan { - textSpan: TextSpan; - kind: string; - } - interface NavigateToItem { - name: string; - kind: string; - kindModifiers: string; - matchKind: string; - isCaseSensitive: boolean; - fileName: string; - textSpan: TextSpan; - containerName: string; - containerKind: string; - } - interface EditorOptions { - IndentSize: number; - TabSize: number; - NewLineCharacter: string; - ConvertTabsToSpaces: boolean; - } - interface FormatCodeOptions extends EditorOptions { - InsertSpaceAfterCommaDelimiter: boolean; - InsertSpaceAfterSemicolonInForStatements: boolean; - InsertSpaceBeforeAndAfterBinaryOperators: boolean; - InsertSpaceAfterKeywordsInControlFlowStatements: boolean; - InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; - InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; - PlaceOpenBraceOnNewLineForFunctions: boolean; - PlaceOpenBraceOnNewLineForControlBlocks: boolean; - [s: string]: boolean | number | string; - } - interface DefinitionInfo { - fileName: string; - textSpan: TextSpan; - kind: string; - name: string; - containerKind: string; - containerName: string; - } - interface ReferencedSymbol { - definition: DefinitionInfo; - references: ReferenceEntry[]; - } - enum SymbolDisplayPartKind { - aliasName = 0, - className = 1, - enumName = 2, - fieldName = 3, - interfaceName = 4, - keyword = 5, - lineBreak = 6, - numericLiteral = 7, - stringLiteral = 8, - localName = 9, - methodName = 10, - moduleName = 11, - operator = 12, - parameterName = 13, - propertyName = 14, - punctuation = 15, - space = 16, - text = 17, - typeParameterName = 18, - enumMemberName = 19, - functionName = 20, - regularExpressionLiteral = 21, - } - interface SymbolDisplayPart { - text: string; - kind: string; - } - interface QuickInfo { - kind: string; - kindModifiers: string; - textSpan: TextSpan; - displayParts: SymbolDisplayPart[]; - documentation: SymbolDisplayPart[]; - } - interface RenameInfo { - canRename: boolean; - localizedErrorMessage: string; - displayName: string; - fullDisplayName: string; - kind: string; - kindModifiers: string; - triggerSpan: TextSpan; - } - interface SignatureHelpParameter { - name: string; - documentation: SymbolDisplayPart[]; - displayParts: SymbolDisplayPart[]; - isOptional: boolean; - } - /** - * Represents a single signature to show in signature help. - * The id is used for subsequent calls into the language service to ask questions about the - * signature help item in the context of any documents that have been updated. i.e. after - * an edit has happened, while signature help is still active, the host can ask important - * questions like 'what parameter is the user currently contained within?'. - */ - interface SignatureHelpItem { - isVariadic: boolean; - prefixDisplayParts: SymbolDisplayPart[]; - suffixDisplayParts: SymbolDisplayPart[]; - separatorDisplayParts: SymbolDisplayPart[]; - parameters: SignatureHelpParameter[]; - documentation: SymbolDisplayPart[]; - } - /** - * Represents a set of signature help items, and the preferred item that should be selected. - */ - interface SignatureHelpItems { - items: SignatureHelpItem[]; - applicableSpan: TextSpan; - selectedItemIndex: number; - argumentIndex: number; - argumentCount: number; - } - interface CompletionInfo { - isMemberCompletion: boolean; - isNewIdentifierLocation: boolean; - entries: CompletionEntry[]; - } - interface CompletionEntry { - name: string; - kind: string; - kindModifiers: string; - sortText: string; - } - interface CompletionEntryDetails { - name: string; - kind: string; - kindModifiers: string; - displayParts: SymbolDisplayPart[]; - documentation: SymbolDisplayPart[]; - } - interface OutliningSpan { - /** The span of the document to actually collapse. */ - textSpan: TextSpan; - /** The span of the document to display when the user hovers over the collapsed span. */ - hintSpan: TextSpan; - /** The text to display in the editor for the collapsed region. */ - bannerText: string; - /** - * Whether or not this region should be automatically collapsed when - * the 'Collapse to Definitions' command is invoked. - */ - autoCollapse: boolean; - } - interface EmitOutput { - outputFiles: OutputFile[]; - emitSkipped: boolean; - } - const enum OutputFileType { - JavaScript = 0, - SourceMap = 1, - Declaration = 2, - } - interface OutputFile { - name: string; - writeByteOrderMark: boolean; - text: string; - } - const enum EndOfLineState { - None = 0, - InMultiLineCommentTrivia = 1, - InSingleQuoteStringLiteral = 2, - InDoubleQuoteStringLiteral = 3, - InTemplateHeadOrNoSubstitutionTemplate = 4, - InTemplateMiddleOrTail = 5, - InTemplateSubstitutionPosition = 6, - } - enum TokenClass { - Punctuation = 0, - Keyword = 1, - Operator = 2, - Comment = 3, - Whitespace = 4, - Identifier = 5, - NumberLiteral = 6, - StringLiteral = 7, - RegExpLiteral = 8, - } - interface ClassificationResult { - finalLexState: EndOfLineState; - entries: ClassificationInfo[]; - } - interface ClassificationInfo { - length: number; - classification: TokenClass; - } - interface Classifier { - /** - * Gives lexical classifications of tokens on a line without any syntactic context. - * For instance, a token consisting of the text 'string' can be either an identifier - * named 'string' or the keyword 'string', however, because this classifier is not aware, - * it relies on certain heuristics to give acceptable results. For classifications where - * speed trumps accuracy, this function is preferable; however, for true accuracy, the - * syntactic classifier is ideal. In fact, in certain editing scenarios, combining the - * lexical, syntactic, and semantic classifiers may issue the best user experience. - * - * @param text The text of a line to classify. - * @param lexState The state of the lexical classifier at the end of the previous line. - * @param syntacticClassifierAbsent Whether the client is *not* using a syntactic classifier. - * If there is no syntactic classifier (syntacticClassifierAbsent=true), - * certain heuristics may be used in its place; however, if there is a - * syntactic classifier (syntacticClassifierAbsent=false), certain - * classifications which may be incorrectly categorized will be given - * back as Identifiers in order to allow the syntactic classifier to - * subsume the classification. - * @deprecated Use getLexicalClassifications instead. - */ - getClassificationsForLine(text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean): ClassificationResult; - getEncodedLexicalClassifications(text: string, endOfLineState: EndOfLineState, syntacticClassifierAbsent: boolean): Classifications; - } - /** - * The document registry represents a store of SourceFile objects that can be shared between - * multiple LanguageService instances. A LanguageService instance holds on the SourceFile (AST) - * of files in the context. - * SourceFile objects account for most of the memory usage by the language service. Sharing - * the same DocumentRegistry instance between different instances of LanguageService allow - * for more efficient memory utilization since all projects will share at least the library - * file (lib.d.ts). - * - * A more advanced use of the document registry is to serialize sourceFile objects to disk - * and re-hydrate them when needed. - * - * To create a default DocumentRegistry, use createDocumentRegistry to create one, and pass it - * to all subsequent createLanguageService calls. - */ - interface DocumentRegistry { - /** - * Request a stored SourceFile with a given fileName and compilationSettings. - * The first call to acquire will call createLanguageServiceSourceFile to generate - * the SourceFile if was not found in the registry. - * - * @param fileName The name of the file requested - * @param compilationSettings Some compilation settings like target affects the - * shape of a the resulting SourceFile. This allows the DocumentRegistry to store - * multiple copies of the same file for different compilation settings. - * @parm scriptSnapshot Text of the file. Only used if the file was not found - * in the registry and a new one was created. - * @parm version Current version of the file. Only used if the file was not found - * in the registry and a new one was created. - */ - acquireDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string): SourceFile; - /** - * Request an updated version of an already existing SourceFile with a given fileName - * and compilationSettings. The update will in-turn call updateLanguageServiceSourceFile - * to get an updated SourceFile. - * - * @param fileName The name of the file requested - * @param compilationSettings Some compilation settings like target affects the - * shape of a the resulting SourceFile. This allows the DocumentRegistry to store - * multiple copies of the same file for different compilation settings. - * @param scriptSnapshot Text of the file. - * @param version Current version of the file. - */ - updateDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string): SourceFile; - /** - * Informs the DocumentRegistry that a file is not needed any longer. - * - * Note: It is not allowed to call release on a SourceFile that was not acquired from - * this registry originally. - * - * @param fileName The name of the file to be released - * @param compilationSettings The compilation settings used to acquire the file - */ - releaseDocument(fileName: string, compilationSettings: CompilerOptions): void; - } - module ScriptElementKind { - const unknown: string; - const warning: string; - const keyword: string; - const scriptElement: string; - const moduleElement: string; - const classElement: string; - const interfaceElement: string; - const typeElement: string; - const enumElement: string; - const variableElement: string; - const localVariableElement: string; - const functionElement: string; - const localFunctionElement: string; - const memberFunctionElement: string; - const memberGetAccessorElement: string; - const memberSetAccessorElement: string; - const memberVariableElement: string; - const constructorImplementationElement: string; - const callSignatureElement: string; - const indexSignatureElement: string; - const constructSignatureElement: string; - const parameterElement: string; - const typeParameterElement: string; - const primitiveType: string; - const label: string; - const alias: string; - const constElement: string; - const letElement: string; - } - module ScriptElementKindModifier { - const none: string; - const publicMemberModifier: string; - const privateMemberModifier: string; - const protectedMemberModifier: string; - const exportedModifier: string; - const ambientModifier: string; - const staticModifier: string; - } - class ClassificationTypeNames { - static comment: string; - static identifier: string; - static keyword: string; - static numericLiteral: string; - static operator: string; - static stringLiteral: string; - static whiteSpace: string; - static text: string; - static punctuation: string; - static className: string; - static enumName: string; - static interfaceName: string; - static moduleName: string; - static typeParameterName: string; - static typeAliasName: string; - static parameterName: string; - static docCommentTagName: string; - } - const enum ClassificationType { - comment = 1, - identifier = 2, - keyword = 3, - numericLiteral = 4, - operator = 5, - stringLiteral = 6, - regularExpressionLiteral = 7, - whiteSpace = 8, - text = 9, - punctuation = 10, - className = 11, - enumName = 12, - interfaceName = 13, - moduleName = 14, - typeParameterName = 15, - typeAliasName = 16, - parameterName = 17, - docCommentTagName = 18, - } - interface DisplayPartsSymbolWriter extends SymbolWriter { - displayParts(): SymbolDisplayPart[]; - } - function displayPartsToString(displayParts: SymbolDisplayPart[]): string; - function getDefaultCompilerOptions(): CompilerOptions; - class OperationCanceledException { - } - class CancellationTokenObject { - private cancellationToken; - static None: CancellationTokenObject; - constructor(cancellationToken: CancellationToken); - isCancellationRequested(): boolean; - throwIfCancellationRequested(): void; - } - function transpile(input: string, compilerOptions?: CompilerOptions, fileName?: string, diagnostics?: Diagnostic[], moduleName?: string): string; - function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean): SourceFile; - let disableIncrementalParsing: boolean; - function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; - function createDocumentRegistry(useCaseSensitiveFileNames?: boolean): DocumentRegistry; - function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; - function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry): LanguageService; - function createClassifier(): Classifier; - /** - * Get the path of the default library file (lib.d.ts) as distributed with the typescript - * node package. - * The functionality is not supported if the ts module is consumed outside of a node module. - */ - function getDefaultLibFilePath(options: CompilerOptions): string; -} -export = ts; \ No newline at end of file diff --git a/build/lib/typescript/typescriptServices.js b/build/lib/typescript/typescriptServices.js deleted file mode 100644 index 349ff6ad391a5..0000000000000 --- a/build/lib/typescript/typescriptServices.js +++ /dev/null @@ -1,44323 +0,0 @@ -var ts; -(function (ts) { - // token > SyntaxKind.Identifer => token is a keyword - (function (SyntaxKind) { - SyntaxKind[SyntaxKind["Unknown"] = 0] = "Unknown"; - SyntaxKind[SyntaxKind["EndOfFileToken"] = 1] = "EndOfFileToken"; - SyntaxKind[SyntaxKind["SingleLineCommentTrivia"] = 2] = "SingleLineCommentTrivia"; - SyntaxKind[SyntaxKind["MultiLineCommentTrivia"] = 3] = "MultiLineCommentTrivia"; - SyntaxKind[SyntaxKind["NewLineTrivia"] = 4] = "NewLineTrivia"; - SyntaxKind[SyntaxKind["WhitespaceTrivia"] = 5] = "WhitespaceTrivia"; - // We detect and provide better error recovery when we encounter a git merge marker. This - // allows us to edit files with git-conflict markers in them in a much more pleasant manner. - SyntaxKind[SyntaxKind["ConflictMarkerTrivia"] = 6] = "ConflictMarkerTrivia"; - // Literals - SyntaxKind[SyntaxKind["NumericLiteral"] = 7] = "NumericLiteral"; - SyntaxKind[SyntaxKind["StringLiteral"] = 8] = "StringLiteral"; - SyntaxKind[SyntaxKind["RegularExpressionLiteral"] = 9] = "RegularExpressionLiteral"; - SyntaxKind[SyntaxKind["NoSubstitutionTemplateLiteral"] = 10] = "NoSubstitutionTemplateLiteral"; - // Pseudo-literals - SyntaxKind[SyntaxKind["TemplateHead"] = 11] = "TemplateHead"; - SyntaxKind[SyntaxKind["TemplateMiddle"] = 12] = "TemplateMiddle"; - SyntaxKind[SyntaxKind["TemplateTail"] = 13] = "TemplateTail"; - // Punctuation - SyntaxKind[SyntaxKind["OpenBraceToken"] = 14] = "OpenBraceToken"; - SyntaxKind[SyntaxKind["CloseBraceToken"] = 15] = "CloseBraceToken"; - SyntaxKind[SyntaxKind["OpenParenToken"] = 16] = "OpenParenToken"; - SyntaxKind[SyntaxKind["CloseParenToken"] = 17] = "CloseParenToken"; - SyntaxKind[SyntaxKind["OpenBracketToken"] = 18] = "OpenBracketToken"; - SyntaxKind[SyntaxKind["CloseBracketToken"] = 19] = "CloseBracketToken"; - SyntaxKind[SyntaxKind["DotToken"] = 20] = "DotToken"; - SyntaxKind[SyntaxKind["DotDotDotToken"] = 21] = "DotDotDotToken"; - SyntaxKind[SyntaxKind["SemicolonToken"] = 22] = "SemicolonToken"; - SyntaxKind[SyntaxKind["CommaToken"] = 23] = "CommaToken"; - SyntaxKind[SyntaxKind["LessThanToken"] = 24] = "LessThanToken"; - SyntaxKind[SyntaxKind["GreaterThanToken"] = 25] = "GreaterThanToken"; - SyntaxKind[SyntaxKind["LessThanEqualsToken"] = 26] = "LessThanEqualsToken"; - SyntaxKind[SyntaxKind["GreaterThanEqualsToken"] = 27] = "GreaterThanEqualsToken"; - SyntaxKind[SyntaxKind["EqualsEqualsToken"] = 28] = "EqualsEqualsToken"; - SyntaxKind[SyntaxKind["ExclamationEqualsToken"] = 29] = "ExclamationEqualsToken"; - SyntaxKind[SyntaxKind["EqualsEqualsEqualsToken"] = 30] = "EqualsEqualsEqualsToken"; - SyntaxKind[SyntaxKind["ExclamationEqualsEqualsToken"] = 31] = "ExclamationEqualsEqualsToken"; - SyntaxKind[SyntaxKind["EqualsGreaterThanToken"] = 32] = "EqualsGreaterThanToken"; - SyntaxKind[SyntaxKind["PlusToken"] = 33] = "PlusToken"; - SyntaxKind[SyntaxKind["MinusToken"] = 34] = "MinusToken"; - SyntaxKind[SyntaxKind["AsteriskToken"] = 35] = "AsteriskToken"; - SyntaxKind[SyntaxKind["SlashToken"] = 36] = "SlashToken"; - SyntaxKind[SyntaxKind["PercentToken"] = 37] = "PercentToken"; - SyntaxKind[SyntaxKind["PlusPlusToken"] = 38] = "PlusPlusToken"; - SyntaxKind[SyntaxKind["MinusMinusToken"] = 39] = "MinusMinusToken"; - SyntaxKind[SyntaxKind["LessThanLessThanToken"] = 40] = "LessThanLessThanToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanToken"] = 41] = "GreaterThanGreaterThanToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanToken"] = 42] = "GreaterThanGreaterThanGreaterThanToken"; - SyntaxKind[SyntaxKind["AmpersandToken"] = 43] = "AmpersandToken"; - SyntaxKind[SyntaxKind["BarToken"] = 44] = "BarToken"; - SyntaxKind[SyntaxKind["CaretToken"] = 45] = "CaretToken"; - SyntaxKind[SyntaxKind["ExclamationToken"] = 46] = "ExclamationToken"; - SyntaxKind[SyntaxKind["TildeToken"] = 47] = "TildeToken"; - SyntaxKind[SyntaxKind["AmpersandAmpersandToken"] = 48] = "AmpersandAmpersandToken"; - SyntaxKind[SyntaxKind["BarBarToken"] = 49] = "BarBarToken"; - SyntaxKind[SyntaxKind["QuestionToken"] = 50] = "QuestionToken"; - SyntaxKind[SyntaxKind["ColonToken"] = 51] = "ColonToken"; - SyntaxKind[SyntaxKind["AtToken"] = 52] = "AtToken"; - // Assignments - SyntaxKind[SyntaxKind["EqualsToken"] = 53] = "EqualsToken"; - SyntaxKind[SyntaxKind["PlusEqualsToken"] = 54] = "PlusEqualsToken"; - SyntaxKind[SyntaxKind["MinusEqualsToken"] = 55] = "MinusEqualsToken"; - SyntaxKind[SyntaxKind["AsteriskEqualsToken"] = 56] = "AsteriskEqualsToken"; - SyntaxKind[SyntaxKind["SlashEqualsToken"] = 57] = "SlashEqualsToken"; - SyntaxKind[SyntaxKind["PercentEqualsToken"] = 58] = "PercentEqualsToken"; - SyntaxKind[SyntaxKind["LessThanLessThanEqualsToken"] = 59] = "LessThanLessThanEqualsToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanEqualsToken"] = 60] = "GreaterThanGreaterThanEqualsToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanEqualsToken"] = 61] = "GreaterThanGreaterThanGreaterThanEqualsToken"; - SyntaxKind[SyntaxKind["AmpersandEqualsToken"] = 62] = "AmpersandEqualsToken"; - SyntaxKind[SyntaxKind["BarEqualsToken"] = 63] = "BarEqualsToken"; - SyntaxKind[SyntaxKind["CaretEqualsToken"] = 64] = "CaretEqualsToken"; - // Identifiers - SyntaxKind[SyntaxKind["Identifier"] = 65] = "Identifier"; - // Reserved words - SyntaxKind[SyntaxKind["BreakKeyword"] = 66] = "BreakKeyword"; - SyntaxKind[SyntaxKind["CaseKeyword"] = 67] = "CaseKeyword"; - SyntaxKind[SyntaxKind["CatchKeyword"] = 68] = "CatchKeyword"; - SyntaxKind[SyntaxKind["ClassKeyword"] = 69] = "ClassKeyword"; - SyntaxKind[SyntaxKind["ConstKeyword"] = 70] = "ConstKeyword"; - SyntaxKind[SyntaxKind["ContinueKeyword"] = 71] = "ContinueKeyword"; - SyntaxKind[SyntaxKind["DebuggerKeyword"] = 72] = "DebuggerKeyword"; - SyntaxKind[SyntaxKind["DefaultKeyword"] = 73] = "DefaultKeyword"; - SyntaxKind[SyntaxKind["DeleteKeyword"] = 74] = "DeleteKeyword"; - SyntaxKind[SyntaxKind["DoKeyword"] = 75] = "DoKeyword"; - SyntaxKind[SyntaxKind["ElseKeyword"] = 76] = "ElseKeyword"; - SyntaxKind[SyntaxKind["EnumKeyword"] = 77] = "EnumKeyword"; - SyntaxKind[SyntaxKind["ExportKeyword"] = 78] = "ExportKeyword"; - SyntaxKind[SyntaxKind["ExtendsKeyword"] = 79] = "ExtendsKeyword"; - SyntaxKind[SyntaxKind["FalseKeyword"] = 80] = "FalseKeyword"; - SyntaxKind[SyntaxKind["FinallyKeyword"] = 81] = "FinallyKeyword"; - SyntaxKind[SyntaxKind["ForKeyword"] = 82] = "ForKeyword"; - SyntaxKind[SyntaxKind["FunctionKeyword"] = 83] = "FunctionKeyword"; - SyntaxKind[SyntaxKind["IfKeyword"] = 84] = "IfKeyword"; - SyntaxKind[SyntaxKind["ImportKeyword"] = 85] = "ImportKeyword"; - SyntaxKind[SyntaxKind["InKeyword"] = 86] = "InKeyword"; - SyntaxKind[SyntaxKind["InstanceOfKeyword"] = 87] = "InstanceOfKeyword"; - SyntaxKind[SyntaxKind["NewKeyword"] = 88] = "NewKeyword"; - SyntaxKind[SyntaxKind["NullKeyword"] = 89] = "NullKeyword"; - SyntaxKind[SyntaxKind["ReturnKeyword"] = 90] = "ReturnKeyword"; - SyntaxKind[SyntaxKind["SuperKeyword"] = 91] = "SuperKeyword"; - SyntaxKind[SyntaxKind["SwitchKeyword"] = 92] = "SwitchKeyword"; - SyntaxKind[SyntaxKind["ThisKeyword"] = 93] = "ThisKeyword"; - SyntaxKind[SyntaxKind["ThrowKeyword"] = 94] = "ThrowKeyword"; - SyntaxKind[SyntaxKind["TrueKeyword"] = 95] = "TrueKeyword"; - SyntaxKind[SyntaxKind["TryKeyword"] = 96] = "TryKeyword"; - SyntaxKind[SyntaxKind["TypeOfKeyword"] = 97] = "TypeOfKeyword"; - SyntaxKind[SyntaxKind["VarKeyword"] = 98] = "VarKeyword"; - SyntaxKind[SyntaxKind["VoidKeyword"] = 99] = "VoidKeyword"; - SyntaxKind[SyntaxKind["WhileKeyword"] = 100] = "WhileKeyword"; - SyntaxKind[SyntaxKind["WithKeyword"] = 101] = "WithKeyword"; - // Strict mode reserved words - SyntaxKind[SyntaxKind["ImplementsKeyword"] = 102] = "ImplementsKeyword"; - SyntaxKind[SyntaxKind["InterfaceKeyword"] = 103] = "InterfaceKeyword"; - SyntaxKind[SyntaxKind["LetKeyword"] = 104] = "LetKeyword"; - SyntaxKind[SyntaxKind["PackageKeyword"] = 105] = "PackageKeyword"; - SyntaxKind[SyntaxKind["PrivateKeyword"] = 106] = "PrivateKeyword"; - SyntaxKind[SyntaxKind["ProtectedKeyword"] = 107] = "ProtectedKeyword"; - SyntaxKind[SyntaxKind["PublicKeyword"] = 108] = "PublicKeyword"; - SyntaxKind[SyntaxKind["StaticKeyword"] = 109] = "StaticKeyword"; - SyntaxKind[SyntaxKind["YieldKeyword"] = 110] = "YieldKeyword"; - // Contextual keywords - SyntaxKind[SyntaxKind["AsKeyword"] = 111] = "AsKeyword"; - SyntaxKind[SyntaxKind["AnyKeyword"] = 112] = "AnyKeyword"; - SyntaxKind[SyntaxKind["BooleanKeyword"] = 113] = "BooleanKeyword"; - SyntaxKind[SyntaxKind["ConstructorKeyword"] = 114] = "ConstructorKeyword"; - SyntaxKind[SyntaxKind["DeclareKeyword"] = 115] = "DeclareKeyword"; - SyntaxKind[SyntaxKind["GetKeyword"] = 116] = "GetKeyword"; - SyntaxKind[SyntaxKind["IsKeyword"] = 117] = "IsKeyword"; - SyntaxKind[SyntaxKind["ModuleKeyword"] = 118] = "ModuleKeyword"; - SyntaxKind[SyntaxKind["NamespaceKeyword"] = 119] = "NamespaceKeyword"; - SyntaxKind[SyntaxKind["RequireKeyword"] = 120] = "RequireKeyword"; - SyntaxKind[SyntaxKind["NumberKeyword"] = 121] = "NumberKeyword"; - SyntaxKind[SyntaxKind["SetKeyword"] = 122] = "SetKeyword"; - SyntaxKind[SyntaxKind["StringKeyword"] = 123] = "StringKeyword"; - SyntaxKind[SyntaxKind["SymbolKeyword"] = 124] = "SymbolKeyword"; - SyntaxKind[SyntaxKind["TypeKeyword"] = 125] = "TypeKeyword"; - SyntaxKind[SyntaxKind["FromKeyword"] = 126] = "FromKeyword"; - SyntaxKind[SyntaxKind["OfKeyword"] = 127] = "OfKeyword"; - // Parse tree nodes - // Names - SyntaxKind[SyntaxKind["QualifiedName"] = 128] = "QualifiedName"; - SyntaxKind[SyntaxKind["ComputedPropertyName"] = 129] = "ComputedPropertyName"; - // Signature elements - SyntaxKind[SyntaxKind["TypeParameter"] = 130] = "TypeParameter"; - SyntaxKind[SyntaxKind["Parameter"] = 131] = "Parameter"; - SyntaxKind[SyntaxKind["Decorator"] = 132] = "Decorator"; - // TypeMember - SyntaxKind[SyntaxKind["PropertySignature"] = 133] = "PropertySignature"; - SyntaxKind[SyntaxKind["PropertyDeclaration"] = 134] = "PropertyDeclaration"; - SyntaxKind[SyntaxKind["MethodSignature"] = 135] = "MethodSignature"; - SyntaxKind[SyntaxKind["MethodDeclaration"] = 136] = "MethodDeclaration"; - SyntaxKind[SyntaxKind["Constructor"] = 137] = "Constructor"; - SyntaxKind[SyntaxKind["GetAccessor"] = 138] = "GetAccessor"; - SyntaxKind[SyntaxKind["SetAccessor"] = 139] = "SetAccessor"; - SyntaxKind[SyntaxKind["CallSignature"] = 140] = "CallSignature"; - SyntaxKind[SyntaxKind["ConstructSignature"] = 141] = "ConstructSignature"; - SyntaxKind[SyntaxKind["IndexSignature"] = 142] = "IndexSignature"; - // Type - SyntaxKind[SyntaxKind["TypePredicate"] = 143] = "TypePredicate"; - SyntaxKind[SyntaxKind["TypeReference"] = 144] = "TypeReference"; - SyntaxKind[SyntaxKind["FunctionType"] = 145] = "FunctionType"; - SyntaxKind[SyntaxKind["ConstructorType"] = 146] = "ConstructorType"; - SyntaxKind[SyntaxKind["TypeQuery"] = 147] = "TypeQuery"; - SyntaxKind[SyntaxKind["TypeLiteral"] = 148] = "TypeLiteral"; - SyntaxKind[SyntaxKind["ArrayType"] = 149] = "ArrayType"; - SyntaxKind[SyntaxKind["TupleType"] = 150] = "TupleType"; - SyntaxKind[SyntaxKind["UnionType"] = 151] = "UnionType"; - SyntaxKind[SyntaxKind["ParenthesizedType"] = 152] = "ParenthesizedType"; - // Binding patterns - SyntaxKind[SyntaxKind["ObjectBindingPattern"] = 153] = "ObjectBindingPattern"; - SyntaxKind[SyntaxKind["ArrayBindingPattern"] = 154] = "ArrayBindingPattern"; - SyntaxKind[SyntaxKind["BindingElement"] = 155] = "BindingElement"; - // Expression - SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 156] = "ArrayLiteralExpression"; - SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 157] = "ObjectLiteralExpression"; - SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 158] = "PropertyAccessExpression"; - SyntaxKind[SyntaxKind["ElementAccessExpression"] = 159] = "ElementAccessExpression"; - SyntaxKind[SyntaxKind["CallExpression"] = 160] = "CallExpression"; - SyntaxKind[SyntaxKind["NewExpression"] = 161] = "NewExpression"; - SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 162] = "TaggedTemplateExpression"; - SyntaxKind[SyntaxKind["TypeAssertionExpression"] = 163] = "TypeAssertionExpression"; - SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 164] = "ParenthesizedExpression"; - SyntaxKind[SyntaxKind["FunctionExpression"] = 165] = "FunctionExpression"; - SyntaxKind[SyntaxKind["ArrowFunction"] = 166] = "ArrowFunction"; - SyntaxKind[SyntaxKind["DeleteExpression"] = 167] = "DeleteExpression"; - SyntaxKind[SyntaxKind["TypeOfExpression"] = 168] = "TypeOfExpression"; - SyntaxKind[SyntaxKind["VoidExpression"] = 169] = "VoidExpression"; - SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 170] = "PrefixUnaryExpression"; - SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 171] = "PostfixUnaryExpression"; - SyntaxKind[SyntaxKind["BinaryExpression"] = 172] = "BinaryExpression"; - SyntaxKind[SyntaxKind["ConditionalExpression"] = 173] = "ConditionalExpression"; - SyntaxKind[SyntaxKind["TemplateExpression"] = 174] = "TemplateExpression"; - SyntaxKind[SyntaxKind["YieldExpression"] = 175] = "YieldExpression"; - SyntaxKind[SyntaxKind["SpreadElementExpression"] = 176] = "SpreadElementExpression"; - SyntaxKind[SyntaxKind["ClassExpression"] = 177] = "ClassExpression"; - SyntaxKind[SyntaxKind["OmittedExpression"] = 178] = "OmittedExpression"; - SyntaxKind[SyntaxKind["ExpressionWithTypeArguments"] = 179] = "ExpressionWithTypeArguments"; - // Misc - SyntaxKind[SyntaxKind["TemplateSpan"] = 180] = "TemplateSpan"; - SyntaxKind[SyntaxKind["SemicolonClassElement"] = 181] = "SemicolonClassElement"; - // Element - SyntaxKind[SyntaxKind["Block"] = 182] = "Block"; - SyntaxKind[SyntaxKind["VariableStatement"] = 183] = "VariableStatement"; - SyntaxKind[SyntaxKind["EmptyStatement"] = 184] = "EmptyStatement"; - SyntaxKind[SyntaxKind["ExpressionStatement"] = 185] = "ExpressionStatement"; - SyntaxKind[SyntaxKind["IfStatement"] = 186] = "IfStatement"; - SyntaxKind[SyntaxKind["DoStatement"] = 187] = "DoStatement"; - SyntaxKind[SyntaxKind["WhileStatement"] = 188] = "WhileStatement"; - SyntaxKind[SyntaxKind["ForStatement"] = 189] = "ForStatement"; - SyntaxKind[SyntaxKind["ForInStatement"] = 190] = "ForInStatement"; - SyntaxKind[SyntaxKind["ForOfStatement"] = 191] = "ForOfStatement"; - SyntaxKind[SyntaxKind["ContinueStatement"] = 192] = "ContinueStatement"; - SyntaxKind[SyntaxKind["BreakStatement"] = 193] = "BreakStatement"; - SyntaxKind[SyntaxKind["ReturnStatement"] = 194] = "ReturnStatement"; - SyntaxKind[SyntaxKind["WithStatement"] = 195] = "WithStatement"; - SyntaxKind[SyntaxKind["SwitchStatement"] = 196] = "SwitchStatement"; - SyntaxKind[SyntaxKind["LabeledStatement"] = 197] = "LabeledStatement"; - SyntaxKind[SyntaxKind["ThrowStatement"] = 198] = "ThrowStatement"; - SyntaxKind[SyntaxKind["TryStatement"] = 199] = "TryStatement"; - SyntaxKind[SyntaxKind["DebuggerStatement"] = 200] = "DebuggerStatement"; - SyntaxKind[SyntaxKind["VariableDeclaration"] = 201] = "VariableDeclaration"; - SyntaxKind[SyntaxKind["VariableDeclarationList"] = 202] = "VariableDeclarationList"; - SyntaxKind[SyntaxKind["FunctionDeclaration"] = 203] = "FunctionDeclaration"; - SyntaxKind[SyntaxKind["ClassDeclaration"] = 204] = "ClassDeclaration"; - SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 205] = "InterfaceDeclaration"; - SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 206] = "TypeAliasDeclaration"; - SyntaxKind[SyntaxKind["EnumDeclaration"] = 207] = "EnumDeclaration"; - SyntaxKind[SyntaxKind["ModuleDeclaration"] = 208] = "ModuleDeclaration"; - SyntaxKind[SyntaxKind["ModuleBlock"] = 209] = "ModuleBlock"; - SyntaxKind[SyntaxKind["CaseBlock"] = 210] = "CaseBlock"; - SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 211] = "ImportEqualsDeclaration"; - SyntaxKind[SyntaxKind["ImportDeclaration"] = 212] = "ImportDeclaration"; - SyntaxKind[SyntaxKind["ImportClause"] = 213] = "ImportClause"; - SyntaxKind[SyntaxKind["NamespaceImport"] = 214] = "NamespaceImport"; - SyntaxKind[SyntaxKind["NamedImports"] = 215] = "NamedImports"; - SyntaxKind[SyntaxKind["ImportSpecifier"] = 216] = "ImportSpecifier"; - SyntaxKind[SyntaxKind["ExportAssignment"] = 217] = "ExportAssignment"; - SyntaxKind[SyntaxKind["ExportDeclaration"] = 218] = "ExportDeclaration"; - SyntaxKind[SyntaxKind["NamedExports"] = 219] = "NamedExports"; - SyntaxKind[SyntaxKind["ExportSpecifier"] = 220] = "ExportSpecifier"; - SyntaxKind[SyntaxKind["MissingDeclaration"] = 221] = "MissingDeclaration"; - // Module references - SyntaxKind[SyntaxKind["ExternalModuleReference"] = 222] = "ExternalModuleReference"; - // Clauses - SyntaxKind[SyntaxKind["CaseClause"] = 223] = "CaseClause"; - SyntaxKind[SyntaxKind["DefaultClause"] = 224] = "DefaultClause"; - SyntaxKind[SyntaxKind["HeritageClause"] = 225] = "HeritageClause"; - SyntaxKind[SyntaxKind["CatchClause"] = 226] = "CatchClause"; - // Property assignments - SyntaxKind[SyntaxKind["PropertyAssignment"] = 227] = "PropertyAssignment"; - SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 228] = "ShorthandPropertyAssignment"; - // Enum - SyntaxKind[SyntaxKind["EnumMember"] = 229] = "EnumMember"; - // Top-level nodes - SyntaxKind[SyntaxKind["SourceFile"] = 230] = "SourceFile"; - // JSDoc nodes. - SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 231] = "JSDocTypeExpression"; - // The * type. - SyntaxKind[SyntaxKind["JSDocAllType"] = 232] = "JSDocAllType"; - // The ? type. - SyntaxKind[SyntaxKind["JSDocUnknownType"] = 233] = "JSDocUnknownType"; - SyntaxKind[SyntaxKind["JSDocArrayType"] = 234] = "JSDocArrayType"; - SyntaxKind[SyntaxKind["JSDocUnionType"] = 235] = "JSDocUnionType"; - SyntaxKind[SyntaxKind["JSDocTupleType"] = 236] = "JSDocTupleType"; - SyntaxKind[SyntaxKind["JSDocNullableType"] = 237] = "JSDocNullableType"; - SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 238] = "JSDocNonNullableType"; - SyntaxKind[SyntaxKind["JSDocRecordType"] = 239] = "JSDocRecordType"; - SyntaxKind[SyntaxKind["JSDocRecordMember"] = 240] = "JSDocRecordMember"; - SyntaxKind[SyntaxKind["JSDocTypeReference"] = 241] = "JSDocTypeReference"; - SyntaxKind[SyntaxKind["JSDocOptionalType"] = 242] = "JSDocOptionalType"; - SyntaxKind[SyntaxKind["JSDocFunctionType"] = 243] = "JSDocFunctionType"; - SyntaxKind[SyntaxKind["JSDocVariadicType"] = 244] = "JSDocVariadicType"; - SyntaxKind[SyntaxKind["JSDocConstructorType"] = 245] = "JSDocConstructorType"; - SyntaxKind[SyntaxKind["JSDocThisType"] = 246] = "JSDocThisType"; - SyntaxKind[SyntaxKind["JSDocComment"] = 247] = "JSDocComment"; - SyntaxKind[SyntaxKind["JSDocTag"] = 248] = "JSDocTag"; - SyntaxKind[SyntaxKind["JSDocParameterTag"] = 249] = "JSDocParameterTag"; - SyntaxKind[SyntaxKind["JSDocReturnTag"] = 250] = "JSDocReturnTag"; - SyntaxKind[SyntaxKind["JSDocTypeTag"] = 251] = "JSDocTypeTag"; - SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 252] = "JSDocTemplateTag"; - // Synthesized list - SyntaxKind[SyntaxKind["SyntaxList"] = 253] = "SyntaxList"; - // Enum value count - SyntaxKind[SyntaxKind["Count"] = 254] = "Count"; - // Markers - SyntaxKind[SyntaxKind["FirstAssignment"] = 53] = "FirstAssignment"; - SyntaxKind[SyntaxKind["LastAssignment"] = 64] = "LastAssignment"; - SyntaxKind[SyntaxKind["FirstReservedWord"] = 66] = "FirstReservedWord"; - SyntaxKind[SyntaxKind["LastReservedWord"] = 101] = "LastReservedWord"; - SyntaxKind[SyntaxKind["FirstKeyword"] = 66] = "FirstKeyword"; - SyntaxKind[SyntaxKind["LastKeyword"] = 127] = "LastKeyword"; - SyntaxKind[SyntaxKind["FirstFutureReservedWord"] = 102] = "FirstFutureReservedWord"; - SyntaxKind[SyntaxKind["LastFutureReservedWord"] = 110] = "LastFutureReservedWord"; - SyntaxKind[SyntaxKind["FirstTypeNode"] = 144] = "FirstTypeNode"; - SyntaxKind[SyntaxKind["LastTypeNode"] = 152] = "LastTypeNode"; - SyntaxKind[SyntaxKind["FirstPunctuation"] = 14] = "FirstPunctuation"; - SyntaxKind[SyntaxKind["LastPunctuation"] = 64] = "LastPunctuation"; - SyntaxKind[SyntaxKind["FirstToken"] = 0] = "FirstToken"; - SyntaxKind[SyntaxKind["LastToken"] = 127] = "LastToken"; - SyntaxKind[SyntaxKind["FirstTriviaToken"] = 2] = "FirstTriviaToken"; - SyntaxKind[SyntaxKind["LastTriviaToken"] = 6] = "LastTriviaToken"; - SyntaxKind[SyntaxKind["FirstLiteralToken"] = 7] = "FirstLiteralToken"; - SyntaxKind[SyntaxKind["LastLiteralToken"] = 10] = "LastLiteralToken"; - SyntaxKind[SyntaxKind["FirstTemplateToken"] = 10] = "FirstTemplateToken"; - SyntaxKind[SyntaxKind["LastTemplateToken"] = 13] = "LastTemplateToken"; - SyntaxKind[SyntaxKind["FirstBinaryOperator"] = 24] = "FirstBinaryOperator"; - SyntaxKind[SyntaxKind["LastBinaryOperator"] = 64] = "LastBinaryOperator"; - SyntaxKind[SyntaxKind["FirstNode"] = 128] = "FirstNode"; - })(ts.SyntaxKind || (ts.SyntaxKind = {})); - var SyntaxKind = ts.SyntaxKind; - (function (NodeFlags) { - NodeFlags[NodeFlags["Export"] = 1] = "Export"; - NodeFlags[NodeFlags["Ambient"] = 2] = "Ambient"; - NodeFlags[NodeFlags["Public"] = 16] = "Public"; - NodeFlags[NodeFlags["Private"] = 32] = "Private"; - NodeFlags[NodeFlags["Protected"] = 64] = "Protected"; - NodeFlags[NodeFlags["Static"] = 128] = "Static"; - NodeFlags[NodeFlags["Default"] = 256] = "Default"; - NodeFlags[NodeFlags["MultiLine"] = 512] = "MultiLine"; - NodeFlags[NodeFlags["Synthetic"] = 1024] = "Synthetic"; - NodeFlags[NodeFlags["DeclarationFile"] = 2048] = "DeclarationFile"; - NodeFlags[NodeFlags["Let"] = 4096] = "Let"; - NodeFlags[NodeFlags["Const"] = 8192] = "Const"; - NodeFlags[NodeFlags["OctalLiteral"] = 16384] = "OctalLiteral"; - NodeFlags[NodeFlags["Namespace"] = 32768] = "Namespace"; - NodeFlags[NodeFlags["ExportContext"] = 65536] = "ExportContext"; - NodeFlags[NodeFlags["Modifier"] = 499] = "Modifier"; - NodeFlags[NodeFlags["AccessibilityModifier"] = 112] = "AccessibilityModifier"; - NodeFlags[NodeFlags["BlockScoped"] = 12288] = "BlockScoped"; - })(ts.NodeFlags || (ts.NodeFlags = {})); - var NodeFlags = ts.NodeFlags; - /* @internal */ - (function (ParserContextFlags) { - ParserContextFlags[ParserContextFlags["None"] = 0] = "None"; - // Set if this node was parsed in strict mode. Used for grammar error checks, as well as - // checking if the node can be reused in incremental settings. - ParserContextFlags[ParserContextFlags["StrictMode"] = 1] = "StrictMode"; - // If this node was parsed in a context where 'in-expressions' are not allowed. - ParserContextFlags[ParserContextFlags["DisallowIn"] = 2] = "DisallowIn"; - // If this node was parsed in the 'yield' context created when parsing a generator. - ParserContextFlags[ParserContextFlags["Yield"] = 4] = "Yield"; - // If this node was parsed in the parameters of a generator. - ParserContextFlags[ParserContextFlags["GeneratorParameter"] = 8] = "GeneratorParameter"; - // If this node was parsed as part of a decorator - ParserContextFlags[ParserContextFlags["Decorator"] = 16] = "Decorator"; - // If the parser encountered an error when parsing the code that created this node. Note - // the parser only sets this directly on the node it creates right after encountering the - // error. - ParserContextFlags[ParserContextFlags["ThisNodeHasError"] = 32] = "ThisNodeHasError"; - // This node was parsed in a JavaScript file and can be processed differently. For example - // its type can be specified usign a JSDoc comment. - ParserContextFlags[ParserContextFlags["JavaScriptFile"] = 64] = "JavaScriptFile"; - // Context flags set directly by the parser. - ParserContextFlags[ParserContextFlags["ParserGeneratedFlags"] = 63] = "ParserGeneratedFlags"; - // Context flags computed by aggregating child flags upwards. - // Used during incremental parsing to determine if this node or any of its children had an - // error. Computed only once and then cached. - ParserContextFlags[ParserContextFlags["ThisNodeOrAnySubNodesHasError"] = 128] = "ThisNodeOrAnySubNodesHasError"; - // Used to know if we've computed data from children and cached it in this node. - ParserContextFlags[ParserContextFlags["HasAggregatedChildData"] = 256] = "HasAggregatedChildData"; - })(ts.ParserContextFlags || (ts.ParserContextFlags = {})); - var ParserContextFlags = ts.ParserContextFlags; - /* @internal */ - (function (RelationComparisonResult) { - RelationComparisonResult[RelationComparisonResult["Succeeded"] = 1] = "Succeeded"; - RelationComparisonResult[RelationComparisonResult["Failed"] = 2] = "Failed"; - RelationComparisonResult[RelationComparisonResult["FailedAndReported"] = 3] = "FailedAndReported"; - })(ts.RelationComparisonResult || (ts.RelationComparisonResult = {})); - var RelationComparisonResult = ts.RelationComparisonResult; - /** Return code used by getEmitOutput function to indicate status of the function */ - (function (ExitStatus) { - // Compiler ran successfully. Either this was a simple do-nothing compilation (for example, - // when -version or -help was provided, or this was a normal compilation, no diagnostics - // were produced, and all outputs were generated successfully. - ExitStatus[ExitStatus["Success"] = 0] = "Success"; - // Diagnostics were produced and because of them no code was generated. - ExitStatus[ExitStatus["DiagnosticsPresent_OutputsSkipped"] = 1] = "DiagnosticsPresent_OutputsSkipped"; - // Diagnostics were produced and outputs were generated in spite of them. - ExitStatus[ExitStatus["DiagnosticsPresent_OutputsGenerated"] = 2] = "DiagnosticsPresent_OutputsGenerated"; - })(ts.ExitStatus || (ts.ExitStatus = {})); - var ExitStatus = ts.ExitStatus; - (function (TypeFormatFlags) { - TypeFormatFlags[TypeFormatFlags["None"] = 0] = "None"; - TypeFormatFlags[TypeFormatFlags["WriteArrayAsGenericType"] = 1] = "WriteArrayAsGenericType"; - TypeFormatFlags[TypeFormatFlags["UseTypeOfFunction"] = 2] = "UseTypeOfFunction"; - TypeFormatFlags[TypeFormatFlags["NoTruncation"] = 4] = "NoTruncation"; - TypeFormatFlags[TypeFormatFlags["WriteArrowStyleSignature"] = 8] = "WriteArrowStyleSignature"; - TypeFormatFlags[TypeFormatFlags["WriteOwnNameForAnyLike"] = 16] = "WriteOwnNameForAnyLike"; - TypeFormatFlags[TypeFormatFlags["WriteTypeArgumentsOfSignature"] = 32] = "WriteTypeArgumentsOfSignature"; - TypeFormatFlags[TypeFormatFlags["InElementType"] = 64] = "InElementType"; - TypeFormatFlags[TypeFormatFlags["UseFullyQualifiedType"] = 128] = "UseFullyQualifiedType"; - })(ts.TypeFormatFlags || (ts.TypeFormatFlags = {})); - var TypeFormatFlags = ts.TypeFormatFlags; - (function (SymbolFormatFlags) { - SymbolFormatFlags[SymbolFormatFlags["None"] = 0] = "None"; - // Write symbols's type argument if it is instantiated symbol - // eg. class C { p: T } <-- Show p as C.p here - // var a: C; - // var p = a.p; <--- Here p is property of C so show it as C.p instead of just C.p - SymbolFormatFlags[SymbolFormatFlags["WriteTypeParametersOrArguments"] = 1] = "WriteTypeParametersOrArguments"; - // Use only external alias information to get the symbol name in the given context - // eg. module m { export class c { } } import x = m.c; - // When this flag is specified m.c will be used to refer to the class instead of alias symbol x - SymbolFormatFlags[SymbolFormatFlags["UseOnlyExternalAliasing"] = 2] = "UseOnlyExternalAliasing"; - })(ts.SymbolFormatFlags || (ts.SymbolFormatFlags = {})); - var SymbolFormatFlags = ts.SymbolFormatFlags; - /* @internal */ - (function (SymbolAccessibility) { - SymbolAccessibility[SymbolAccessibility["Accessible"] = 0] = "Accessible"; - SymbolAccessibility[SymbolAccessibility["NotAccessible"] = 1] = "NotAccessible"; - SymbolAccessibility[SymbolAccessibility["CannotBeNamed"] = 2] = "CannotBeNamed"; - })(ts.SymbolAccessibility || (ts.SymbolAccessibility = {})); - var SymbolAccessibility = ts.SymbolAccessibility; - (function (SymbolFlags) { - SymbolFlags[SymbolFlags["None"] = 0] = "None"; - SymbolFlags[SymbolFlags["FunctionScopedVariable"] = 1] = "FunctionScopedVariable"; - SymbolFlags[SymbolFlags["BlockScopedVariable"] = 2] = "BlockScopedVariable"; - SymbolFlags[SymbolFlags["Property"] = 4] = "Property"; - SymbolFlags[SymbolFlags["EnumMember"] = 8] = "EnumMember"; - SymbolFlags[SymbolFlags["Function"] = 16] = "Function"; - SymbolFlags[SymbolFlags["Class"] = 32] = "Class"; - SymbolFlags[SymbolFlags["Interface"] = 64] = "Interface"; - SymbolFlags[SymbolFlags["ConstEnum"] = 128] = "ConstEnum"; - SymbolFlags[SymbolFlags["RegularEnum"] = 256] = "RegularEnum"; - SymbolFlags[SymbolFlags["ValueModule"] = 512] = "ValueModule"; - SymbolFlags[SymbolFlags["NamespaceModule"] = 1024] = "NamespaceModule"; - SymbolFlags[SymbolFlags["TypeLiteral"] = 2048] = "TypeLiteral"; - SymbolFlags[SymbolFlags["ObjectLiteral"] = 4096] = "ObjectLiteral"; - SymbolFlags[SymbolFlags["Method"] = 8192] = "Method"; - SymbolFlags[SymbolFlags["Constructor"] = 16384] = "Constructor"; - SymbolFlags[SymbolFlags["GetAccessor"] = 32768] = "GetAccessor"; - SymbolFlags[SymbolFlags["SetAccessor"] = 65536] = "SetAccessor"; - SymbolFlags[SymbolFlags["Signature"] = 131072] = "Signature"; - SymbolFlags[SymbolFlags["TypeParameter"] = 262144] = "TypeParameter"; - SymbolFlags[SymbolFlags["TypeAlias"] = 524288] = "TypeAlias"; - SymbolFlags[SymbolFlags["ExportValue"] = 1048576] = "ExportValue"; - SymbolFlags[SymbolFlags["ExportType"] = 2097152] = "ExportType"; - SymbolFlags[SymbolFlags["ExportNamespace"] = 4194304] = "ExportNamespace"; - SymbolFlags[SymbolFlags["Alias"] = 8388608] = "Alias"; - SymbolFlags[SymbolFlags["Instantiated"] = 16777216] = "Instantiated"; - SymbolFlags[SymbolFlags["Merged"] = 33554432] = "Merged"; - SymbolFlags[SymbolFlags["Transient"] = 67108864] = "Transient"; - SymbolFlags[SymbolFlags["Prototype"] = 134217728] = "Prototype"; - SymbolFlags[SymbolFlags["UnionProperty"] = 268435456] = "UnionProperty"; - SymbolFlags[SymbolFlags["Optional"] = 536870912] = "Optional"; - SymbolFlags[SymbolFlags["ExportStar"] = 1073741824] = "ExportStar"; - SymbolFlags[SymbolFlags["Enum"] = 384] = "Enum"; - SymbolFlags[SymbolFlags["Variable"] = 3] = "Variable"; - SymbolFlags[SymbolFlags["Value"] = 107455] = "Value"; - SymbolFlags[SymbolFlags["Type"] = 793056] = "Type"; - SymbolFlags[SymbolFlags["Namespace"] = 1536] = "Namespace"; - SymbolFlags[SymbolFlags["Module"] = 1536] = "Module"; - SymbolFlags[SymbolFlags["Accessor"] = 98304] = "Accessor"; - // Variables can be redeclared, but can not redeclare a block-scoped declaration with the - // same name, or any other value that is not a variable, e.g. ValueModule or Class - SymbolFlags[SymbolFlags["FunctionScopedVariableExcludes"] = 107454] = "FunctionScopedVariableExcludes"; - // Block-scoped declarations are not allowed to be re-declared - // they can not merge with anything in the value space - SymbolFlags[SymbolFlags["BlockScopedVariableExcludes"] = 107455] = "BlockScopedVariableExcludes"; - SymbolFlags[SymbolFlags["ParameterExcludes"] = 107455] = "ParameterExcludes"; - SymbolFlags[SymbolFlags["PropertyExcludes"] = 107455] = "PropertyExcludes"; - SymbolFlags[SymbolFlags["EnumMemberExcludes"] = 107455] = "EnumMemberExcludes"; - SymbolFlags[SymbolFlags["FunctionExcludes"] = 106927] = "FunctionExcludes"; - SymbolFlags[SymbolFlags["ClassExcludes"] = 899583] = "ClassExcludes"; - SymbolFlags[SymbolFlags["InterfaceExcludes"] = 792992] = "InterfaceExcludes"; - SymbolFlags[SymbolFlags["RegularEnumExcludes"] = 899327] = "RegularEnumExcludes"; - SymbolFlags[SymbolFlags["ConstEnumExcludes"] = 899967] = "ConstEnumExcludes"; - SymbolFlags[SymbolFlags["ValueModuleExcludes"] = 106639] = "ValueModuleExcludes"; - SymbolFlags[SymbolFlags["NamespaceModuleExcludes"] = 0] = "NamespaceModuleExcludes"; - SymbolFlags[SymbolFlags["MethodExcludes"] = 99263] = "MethodExcludes"; - SymbolFlags[SymbolFlags["GetAccessorExcludes"] = 41919] = "GetAccessorExcludes"; - SymbolFlags[SymbolFlags["SetAccessorExcludes"] = 74687] = "SetAccessorExcludes"; - SymbolFlags[SymbolFlags["TypeParameterExcludes"] = 530912] = "TypeParameterExcludes"; - SymbolFlags[SymbolFlags["TypeAliasExcludes"] = 793056] = "TypeAliasExcludes"; - SymbolFlags[SymbolFlags["AliasExcludes"] = 8388608] = "AliasExcludes"; - SymbolFlags[SymbolFlags["ModuleMember"] = 8914931] = "ModuleMember"; - SymbolFlags[SymbolFlags["ExportHasLocal"] = 944] = "ExportHasLocal"; - SymbolFlags[SymbolFlags["HasExports"] = 1952] = "HasExports"; - SymbolFlags[SymbolFlags["HasMembers"] = 6240] = "HasMembers"; - SymbolFlags[SymbolFlags["BlockScoped"] = 418] = "BlockScoped"; - SymbolFlags[SymbolFlags["PropertyOrAccessor"] = 98308] = "PropertyOrAccessor"; - SymbolFlags[SymbolFlags["Export"] = 7340032] = "Export"; - /* @internal */ - // The set of things we consider semantically classifiable. Used to speed up the LS during - // classification. - SymbolFlags[SymbolFlags["Classifiable"] = 788448] = "Classifiable"; - })(ts.SymbolFlags || (ts.SymbolFlags = {})); - var SymbolFlags = ts.SymbolFlags; - /* @internal */ - (function (NodeCheckFlags) { - NodeCheckFlags[NodeCheckFlags["TypeChecked"] = 1] = "TypeChecked"; - NodeCheckFlags[NodeCheckFlags["LexicalThis"] = 2] = "LexicalThis"; - NodeCheckFlags[NodeCheckFlags["CaptureThis"] = 4] = "CaptureThis"; - NodeCheckFlags[NodeCheckFlags["EmitExtends"] = 8] = "EmitExtends"; - NodeCheckFlags[NodeCheckFlags["SuperInstance"] = 16] = "SuperInstance"; - NodeCheckFlags[NodeCheckFlags["SuperStatic"] = 32] = "SuperStatic"; - NodeCheckFlags[NodeCheckFlags["ContextChecked"] = 64] = "ContextChecked"; - // Values for enum members have been computed, and any errors have been reported for them. - NodeCheckFlags[NodeCheckFlags["EnumValuesComputed"] = 128] = "EnumValuesComputed"; - NodeCheckFlags[NodeCheckFlags["BlockScopedBindingInLoop"] = 256] = "BlockScopedBindingInLoop"; - NodeCheckFlags[NodeCheckFlags["EmitDecorate"] = 512] = "EmitDecorate"; - NodeCheckFlags[NodeCheckFlags["EmitParam"] = 1024] = "EmitParam"; - NodeCheckFlags[NodeCheckFlags["LexicalModuleMergesWithClass"] = 2048] = "LexicalModuleMergesWithClass"; - })(ts.NodeCheckFlags || (ts.NodeCheckFlags = {})); - var NodeCheckFlags = ts.NodeCheckFlags; - (function (TypeFlags) { - TypeFlags[TypeFlags["Any"] = 1] = "Any"; - TypeFlags[TypeFlags["String"] = 2] = "String"; - TypeFlags[TypeFlags["Number"] = 4] = "Number"; - TypeFlags[TypeFlags["Boolean"] = 8] = "Boolean"; - TypeFlags[TypeFlags["Void"] = 16] = "Void"; - TypeFlags[TypeFlags["Undefined"] = 32] = "Undefined"; - TypeFlags[TypeFlags["Null"] = 64] = "Null"; - TypeFlags[TypeFlags["Enum"] = 128] = "Enum"; - TypeFlags[TypeFlags["StringLiteral"] = 256] = "StringLiteral"; - TypeFlags[TypeFlags["TypeParameter"] = 512] = "TypeParameter"; - TypeFlags[TypeFlags["Class"] = 1024] = "Class"; - TypeFlags[TypeFlags["Interface"] = 2048] = "Interface"; - TypeFlags[TypeFlags["Reference"] = 4096] = "Reference"; - TypeFlags[TypeFlags["Tuple"] = 8192] = "Tuple"; - TypeFlags[TypeFlags["Union"] = 16384] = "Union"; - TypeFlags[TypeFlags["Anonymous"] = 32768] = "Anonymous"; - TypeFlags[TypeFlags["Instantiated"] = 65536] = "Instantiated"; - /* @internal */ - TypeFlags[TypeFlags["FromSignature"] = 131072] = "FromSignature"; - TypeFlags[TypeFlags["ObjectLiteral"] = 262144] = "ObjectLiteral"; - /* @internal */ - TypeFlags[TypeFlags["ContainsUndefinedOrNull"] = 524288] = "ContainsUndefinedOrNull"; - /* @internal */ - TypeFlags[TypeFlags["ContainsObjectLiteral"] = 1048576] = "ContainsObjectLiteral"; - TypeFlags[TypeFlags["ESSymbol"] = 2097152] = "ESSymbol"; - /* @internal */ - TypeFlags[TypeFlags["Intrinsic"] = 2097279] = "Intrinsic"; - /* @internal */ - TypeFlags[TypeFlags["Primitive"] = 2097662] = "Primitive"; - TypeFlags[TypeFlags["StringLike"] = 258] = "StringLike"; - TypeFlags[TypeFlags["NumberLike"] = 132] = "NumberLike"; - TypeFlags[TypeFlags["ObjectType"] = 48128] = "ObjectType"; - /* @internal */ - TypeFlags[TypeFlags["RequiresWidening"] = 1572864] = "RequiresWidening"; - })(ts.TypeFlags || (ts.TypeFlags = {})); - var TypeFlags = ts.TypeFlags; - (function (SignatureKind) { - SignatureKind[SignatureKind["Call"] = 0] = "Call"; - SignatureKind[SignatureKind["Construct"] = 1] = "Construct"; - })(ts.SignatureKind || (ts.SignatureKind = {})); - var SignatureKind = ts.SignatureKind; - (function (IndexKind) { - IndexKind[IndexKind["String"] = 0] = "String"; - IndexKind[IndexKind["Number"] = 1] = "Number"; - })(ts.IndexKind || (ts.IndexKind = {})); - var IndexKind = ts.IndexKind; - (function (DiagnosticCategory) { - DiagnosticCategory[DiagnosticCategory["Warning"] = 0] = "Warning"; - DiagnosticCategory[DiagnosticCategory["Error"] = 1] = "Error"; - DiagnosticCategory[DiagnosticCategory["Message"] = 2] = "Message"; - })(ts.DiagnosticCategory || (ts.DiagnosticCategory = {})); - var DiagnosticCategory = ts.DiagnosticCategory; - (function (ModuleKind) { - ModuleKind[ModuleKind["None"] = 0] = "None"; - ModuleKind[ModuleKind["CommonJS"] = 1] = "CommonJS"; - ModuleKind[ModuleKind["AMD"] = 2] = "AMD"; - ModuleKind[ModuleKind["UMD"] = 3] = "UMD"; - ModuleKind[ModuleKind["System"] = 4] = "System"; - })(ts.ModuleKind || (ts.ModuleKind = {})); - var ModuleKind = ts.ModuleKind; - (function (NewLineKind) { - NewLineKind[NewLineKind["CarriageReturnLineFeed"] = 0] = "CarriageReturnLineFeed"; - NewLineKind[NewLineKind["LineFeed"] = 1] = "LineFeed"; - })(ts.NewLineKind || (ts.NewLineKind = {})); - var NewLineKind = ts.NewLineKind; - (function (ScriptTarget) { - ScriptTarget[ScriptTarget["ES3"] = 0] = "ES3"; - ScriptTarget[ScriptTarget["ES5"] = 1] = "ES5"; - ScriptTarget[ScriptTarget["ES6"] = 2] = "ES6"; - ScriptTarget[ScriptTarget["Latest"] = 2] = "Latest"; - })(ts.ScriptTarget || (ts.ScriptTarget = {})); - var ScriptTarget = ts.ScriptTarget; - /* @internal */ - (function (CharacterCodes) { - CharacterCodes[CharacterCodes["nullCharacter"] = 0] = "nullCharacter"; - CharacterCodes[CharacterCodes["maxAsciiCharacter"] = 127] = "maxAsciiCharacter"; - CharacterCodes[CharacterCodes["lineFeed"] = 10] = "lineFeed"; - CharacterCodes[CharacterCodes["carriageReturn"] = 13] = "carriageReturn"; - CharacterCodes[CharacterCodes["lineSeparator"] = 8232] = "lineSeparator"; - CharacterCodes[CharacterCodes["paragraphSeparator"] = 8233] = "paragraphSeparator"; - CharacterCodes[CharacterCodes["nextLine"] = 133] = "nextLine"; - // Unicode 3.0 space characters - CharacterCodes[CharacterCodes["space"] = 32] = "space"; - CharacterCodes[CharacterCodes["nonBreakingSpace"] = 160] = "nonBreakingSpace"; - CharacterCodes[CharacterCodes["enQuad"] = 8192] = "enQuad"; - CharacterCodes[CharacterCodes["emQuad"] = 8193] = "emQuad"; - CharacterCodes[CharacterCodes["enSpace"] = 8194] = "enSpace"; - CharacterCodes[CharacterCodes["emSpace"] = 8195] = "emSpace"; - CharacterCodes[CharacterCodes["threePerEmSpace"] = 8196] = "threePerEmSpace"; - CharacterCodes[CharacterCodes["fourPerEmSpace"] = 8197] = "fourPerEmSpace"; - CharacterCodes[CharacterCodes["sixPerEmSpace"] = 8198] = "sixPerEmSpace"; - CharacterCodes[CharacterCodes["figureSpace"] = 8199] = "figureSpace"; - CharacterCodes[CharacterCodes["punctuationSpace"] = 8200] = "punctuationSpace"; - CharacterCodes[CharacterCodes["thinSpace"] = 8201] = "thinSpace"; - CharacterCodes[CharacterCodes["hairSpace"] = 8202] = "hairSpace"; - CharacterCodes[CharacterCodes["zeroWidthSpace"] = 8203] = "zeroWidthSpace"; - CharacterCodes[CharacterCodes["narrowNoBreakSpace"] = 8239] = "narrowNoBreakSpace"; - CharacterCodes[CharacterCodes["ideographicSpace"] = 12288] = "ideographicSpace"; - CharacterCodes[CharacterCodes["mathematicalSpace"] = 8287] = "mathematicalSpace"; - CharacterCodes[CharacterCodes["ogham"] = 5760] = "ogham"; - CharacterCodes[CharacterCodes["_"] = 95] = "_"; - CharacterCodes[CharacterCodes["$"] = 36] = "$"; - CharacterCodes[CharacterCodes["_0"] = 48] = "_0"; - CharacterCodes[CharacterCodes["_1"] = 49] = "_1"; - CharacterCodes[CharacterCodes["_2"] = 50] = "_2"; - CharacterCodes[CharacterCodes["_3"] = 51] = "_3"; - CharacterCodes[CharacterCodes["_4"] = 52] = "_4"; - CharacterCodes[CharacterCodes["_5"] = 53] = "_5"; - CharacterCodes[CharacterCodes["_6"] = 54] = "_6"; - CharacterCodes[CharacterCodes["_7"] = 55] = "_7"; - CharacterCodes[CharacterCodes["_8"] = 56] = "_8"; - CharacterCodes[CharacterCodes["_9"] = 57] = "_9"; - CharacterCodes[CharacterCodes["a"] = 97] = "a"; - CharacterCodes[CharacterCodes["b"] = 98] = "b"; - CharacterCodes[CharacterCodes["c"] = 99] = "c"; - CharacterCodes[CharacterCodes["d"] = 100] = "d"; - CharacterCodes[CharacterCodes["e"] = 101] = "e"; - CharacterCodes[CharacterCodes["f"] = 102] = "f"; - CharacterCodes[CharacterCodes["g"] = 103] = "g"; - CharacterCodes[CharacterCodes["h"] = 104] = "h"; - CharacterCodes[CharacterCodes["i"] = 105] = "i"; - CharacterCodes[CharacterCodes["j"] = 106] = "j"; - CharacterCodes[CharacterCodes["k"] = 107] = "k"; - CharacterCodes[CharacterCodes["l"] = 108] = "l"; - CharacterCodes[CharacterCodes["m"] = 109] = "m"; - CharacterCodes[CharacterCodes["n"] = 110] = "n"; - CharacterCodes[CharacterCodes["o"] = 111] = "o"; - CharacterCodes[CharacterCodes["p"] = 112] = "p"; - CharacterCodes[CharacterCodes["q"] = 113] = "q"; - CharacterCodes[CharacterCodes["r"] = 114] = "r"; - CharacterCodes[CharacterCodes["s"] = 115] = "s"; - CharacterCodes[CharacterCodes["t"] = 116] = "t"; - CharacterCodes[CharacterCodes["u"] = 117] = "u"; - CharacterCodes[CharacterCodes["v"] = 118] = "v"; - CharacterCodes[CharacterCodes["w"] = 119] = "w"; - CharacterCodes[CharacterCodes["x"] = 120] = "x"; - CharacterCodes[CharacterCodes["y"] = 121] = "y"; - CharacterCodes[CharacterCodes["z"] = 122] = "z"; - CharacterCodes[CharacterCodes["A"] = 65] = "A"; - CharacterCodes[CharacterCodes["B"] = 66] = "B"; - CharacterCodes[CharacterCodes["C"] = 67] = "C"; - CharacterCodes[CharacterCodes["D"] = 68] = "D"; - CharacterCodes[CharacterCodes["E"] = 69] = "E"; - CharacterCodes[CharacterCodes["F"] = 70] = "F"; - CharacterCodes[CharacterCodes["G"] = 71] = "G"; - CharacterCodes[CharacterCodes["H"] = 72] = "H"; - CharacterCodes[CharacterCodes["I"] = 73] = "I"; - CharacterCodes[CharacterCodes["J"] = 74] = "J"; - CharacterCodes[CharacterCodes["K"] = 75] = "K"; - CharacterCodes[CharacterCodes["L"] = 76] = "L"; - CharacterCodes[CharacterCodes["M"] = 77] = "M"; - CharacterCodes[CharacterCodes["N"] = 78] = "N"; - CharacterCodes[CharacterCodes["O"] = 79] = "O"; - CharacterCodes[CharacterCodes["P"] = 80] = "P"; - CharacterCodes[CharacterCodes["Q"] = 81] = "Q"; - CharacterCodes[CharacterCodes["R"] = 82] = "R"; - CharacterCodes[CharacterCodes["S"] = 83] = "S"; - CharacterCodes[CharacterCodes["T"] = 84] = "T"; - CharacterCodes[CharacterCodes["U"] = 85] = "U"; - CharacterCodes[CharacterCodes["V"] = 86] = "V"; - CharacterCodes[CharacterCodes["W"] = 87] = "W"; - CharacterCodes[CharacterCodes["X"] = 88] = "X"; - CharacterCodes[CharacterCodes["Y"] = 89] = "Y"; - CharacterCodes[CharacterCodes["Z"] = 90] = "Z"; - CharacterCodes[CharacterCodes["ampersand"] = 38] = "ampersand"; - CharacterCodes[CharacterCodes["asterisk"] = 42] = "asterisk"; - CharacterCodes[CharacterCodes["at"] = 64] = "at"; - CharacterCodes[CharacterCodes["backslash"] = 92] = "backslash"; - CharacterCodes[CharacterCodes["backtick"] = 96] = "backtick"; - CharacterCodes[CharacterCodes["bar"] = 124] = "bar"; - CharacterCodes[CharacterCodes["caret"] = 94] = "caret"; - CharacterCodes[CharacterCodes["closeBrace"] = 125] = "closeBrace"; - CharacterCodes[CharacterCodes["closeBracket"] = 93] = "closeBracket"; - CharacterCodes[CharacterCodes["closeParen"] = 41] = "closeParen"; - CharacterCodes[CharacterCodes["colon"] = 58] = "colon"; - CharacterCodes[CharacterCodes["comma"] = 44] = "comma"; - CharacterCodes[CharacterCodes["dot"] = 46] = "dot"; - CharacterCodes[CharacterCodes["doubleQuote"] = 34] = "doubleQuote"; - CharacterCodes[CharacterCodes["equals"] = 61] = "equals"; - CharacterCodes[CharacterCodes["exclamation"] = 33] = "exclamation"; - CharacterCodes[CharacterCodes["greaterThan"] = 62] = "greaterThan"; - CharacterCodes[CharacterCodes["hash"] = 35] = "hash"; - CharacterCodes[CharacterCodes["lessThan"] = 60] = "lessThan"; - CharacterCodes[CharacterCodes["minus"] = 45] = "minus"; - CharacterCodes[CharacterCodes["openBrace"] = 123] = "openBrace"; - CharacterCodes[CharacterCodes["openBracket"] = 91] = "openBracket"; - CharacterCodes[CharacterCodes["openParen"] = 40] = "openParen"; - CharacterCodes[CharacterCodes["percent"] = 37] = "percent"; - CharacterCodes[CharacterCodes["plus"] = 43] = "plus"; - CharacterCodes[CharacterCodes["question"] = 63] = "question"; - CharacterCodes[CharacterCodes["semicolon"] = 59] = "semicolon"; - CharacterCodes[CharacterCodes["singleQuote"] = 39] = "singleQuote"; - CharacterCodes[CharacterCodes["slash"] = 47] = "slash"; - CharacterCodes[CharacterCodes["tilde"] = 126] = "tilde"; - CharacterCodes[CharacterCodes["backspace"] = 8] = "backspace"; - CharacterCodes[CharacterCodes["formFeed"] = 12] = "formFeed"; - CharacterCodes[CharacterCodes["byteOrderMark"] = 65279] = "byteOrderMark"; - CharacterCodes[CharacterCodes["tab"] = 9] = "tab"; - CharacterCodes[CharacterCodes["verticalTab"] = 11] = "verticalTab"; - })(ts.CharacterCodes || (ts.CharacterCodes = {})); - var CharacterCodes = ts.CharacterCodes; -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - // Ternary values are defined such that - // x & y is False if either x or y is False. - // x & y is Maybe if either x or y is Maybe, but neither x or y is False. - // x & y is True if both x and y are True. - // x | y is False if both x and y are False. - // x | y is Maybe if either x or y is Maybe, but neither x or y is True. - // x | y is True if either x or y is True. - (function (Ternary) { - Ternary[Ternary["False"] = 0] = "False"; - Ternary[Ternary["Maybe"] = 1] = "Maybe"; - Ternary[Ternary["True"] = -1] = "True"; - })(ts.Ternary || (ts.Ternary = {})); - var Ternary = ts.Ternary; - function createFileMap(getCanonicalFileName) { - var files = {}; - return { - get: get, - set: set, - contains: contains, - remove: remove, - forEachValue: forEachValueInMap - }; - function set(fileName, value) { - files[normalizeKey(fileName)] = value; - } - function get(fileName) { - return files[normalizeKey(fileName)]; - } - function contains(fileName) { - return hasProperty(files, normalizeKey(fileName)); - } - function remove(fileName) { - var key = normalizeKey(fileName); - delete files[key]; - } - function forEachValueInMap(f) { - forEachValue(files, f); - } - function normalizeKey(key) { - return getCanonicalFileName(normalizeSlashes(key)); - } - } - ts.createFileMap = createFileMap; - (function (Comparison) { - Comparison[Comparison["LessThan"] = -1] = "LessThan"; - Comparison[Comparison["EqualTo"] = 0] = "EqualTo"; - Comparison[Comparison["GreaterThan"] = 1] = "GreaterThan"; - })(ts.Comparison || (ts.Comparison = {})); - var Comparison = ts.Comparison; - function forEach(array, callback) { - if (array) { - for (var i = 0, len = array.length; i < len; i++) { - var result = callback(array[i], i); - if (result) { - return result; - } - } - } - return undefined; - } - ts.forEach = forEach; - function contains(array, value) { - if (array) { - for (var _i = 0; _i < array.length; _i++) { - var v = array[_i]; - if (v === value) { - return true; - } - } - } - return false; - } - ts.contains = contains; - function indexOf(array, value) { - if (array) { - for (var i = 0, len = array.length; i < len; i++) { - if (array[i] === value) { - return i; - } - } - } - return -1; - } - ts.indexOf = indexOf; - function countWhere(array, predicate) { - var count = 0; - if (array) { - for (var _i = 0; _i < array.length; _i++) { - var v = array[_i]; - if (predicate(v)) { - count++; - } - } - } - return count; - } - ts.countWhere = countWhere; - function filter(array, f) { - var result; - if (array) { - result = []; - for (var _i = 0; _i < array.length; _i++) { - var item = array[_i]; - if (f(item)) { - result.push(item); - } - } - } - return result; - } - ts.filter = filter; - function map(array, f) { - var result; - if (array) { - result = []; - for (var _i = 0; _i < array.length; _i++) { - var v = array[_i]; - result.push(f(v)); - } - } - return result; - } - ts.map = map; - function concatenate(array1, array2) { - if (!array2 || !array2.length) - return array1; - if (!array1 || !array1.length) - return array2; - return array1.concat(array2); - } - ts.concatenate = concatenate; - function deduplicate(array) { - var result; - if (array) { - result = []; - for (var _i = 0; _i < array.length; _i++) { - var item = array[_i]; - if (!contains(result, item)) { - result.push(item); - } - } - } - return result; - } - ts.deduplicate = deduplicate; - function sum(array, prop) { - var result = 0; - for (var _i = 0; _i < array.length; _i++) { - var v = array[_i]; - result += v[prop]; - } - return result; - } - ts.sum = sum; - function addRange(to, from) { - if (to && from) { - for (var _i = 0; _i < from.length; _i++) { - var v = from[_i]; - to.push(v); - } - } - } - ts.addRange = addRange; - function rangeEquals(array1, array2, pos, end) { - while (pos < end) { - if (array1[pos] !== array2[pos]) { - return false; - } - pos++; - } - return true; - } - ts.rangeEquals = rangeEquals; - /** - * Returns the last element of an array if non-empty, undefined otherwise. - */ - function lastOrUndefined(array) { - if (array.length === 0) { - return undefined; - } - return array[array.length - 1]; - } - ts.lastOrUndefined = lastOrUndefined; - function binarySearch(array, value) { - var low = 0; - var high = array.length - 1; - while (low <= high) { - var middle = low + ((high - low) >> 1); - var midValue = array[middle]; - if (midValue === value) { - return middle; - } - else if (midValue > value) { - high = middle - 1; - } - else { - low = middle + 1; - } - } - return ~low; - } - ts.binarySearch = binarySearch; - function reduceLeft(array, f, initial) { - if (array) { - var count = array.length; - if (count > 0) { - var pos = 0; - var result = arguments.length <= 2 ? array[pos++] : initial; - while (pos < count) { - result = f(result, array[pos++]); - } - return result; - } - } - return initial; - } - ts.reduceLeft = reduceLeft; - function reduceRight(array, f, initial) { - if (array) { - var pos = array.length - 1; - if (pos >= 0) { - var result = arguments.length <= 2 ? array[pos--] : initial; - while (pos >= 0) { - result = f(result, array[pos--]); - } - return result; - } - } - return initial; - } - ts.reduceRight = reduceRight; - var hasOwnProperty = Object.prototype.hasOwnProperty; - function hasProperty(map, key) { - return hasOwnProperty.call(map, key); - } - ts.hasProperty = hasProperty; - function getProperty(map, key) { - return hasOwnProperty.call(map, key) ? map[key] : undefined; - } - ts.getProperty = getProperty; - function isEmpty(map) { - for (var id in map) { - if (hasProperty(map, id)) { - return false; - } - } - return true; - } - ts.isEmpty = isEmpty; - function clone(object) { - var result = {}; - for (var id in object) { - result[id] = object[id]; - } - return result; - } - ts.clone = clone; - function extend(first, second) { - var result = {}; - for (var id in first) { - result[id] = first[id]; - } - for (var id in second) { - if (!hasProperty(result, id)) { - result[id] = second[id]; - } - } - return result; - } - ts.extend = extend; - function forEachValue(map, callback) { - var result; - for (var id in map) { - if (result = callback(map[id])) - break; - } - return result; - } - ts.forEachValue = forEachValue; - function forEachKey(map, callback) { - var result; - for (var id in map) { - if (result = callback(id)) - break; - } - return result; - } - ts.forEachKey = forEachKey; - function lookUp(map, key) { - return hasProperty(map, key) ? map[key] : undefined; - } - ts.lookUp = lookUp; - function copyMap(source, target) { - for (var p in source) { - target[p] = source[p]; - } - } - ts.copyMap = copyMap; - /** - * Creates a map from the elements of an array. - * - * @param array the array of input elements. - * @param makeKey a function that produces a key for a given element. - * - * This function makes no effort to avoid collisions; if any two elements produce - * the same key with the given 'makeKey' function, then the element with the higher - * index in the array will be the one associated with the produced key. - */ - function arrayToMap(array, makeKey) { - var result = {}; - forEach(array, function (value) { - result[makeKey(value)] = value; - }); - return result; - } - ts.arrayToMap = arrayToMap; - function memoize(callback) { - var value; - return function () { - if (callback) { - value = callback(); - callback = undefined; - } - return value; - }; - } - ts.memoize = memoize; - function formatStringFromArgs(text, args, baseIndex) { - baseIndex = baseIndex || 0; - return text.replace(/{(\d+)}/g, function (match, index) { return args[+index + baseIndex]; }); - } - ts.localizedDiagnosticMessages = undefined; - function getLocaleSpecificMessage(message) { - return ts.localizedDiagnosticMessages && ts.localizedDiagnosticMessages[message] - ? ts.localizedDiagnosticMessages[message] - : message; - } - ts.getLocaleSpecificMessage = getLocaleSpecificMessage; - function createFileDiagnostic(file, start, length, message) { - var end = start + length; - Debug.assert(start >= 0, "start must be non-negative, is " + start); - Debug.assert(length >= 0, "length must be non-negative, is " + length); - if (file) { - Debug.assert(start <= file.text.length, "start must be within the bounds of the file. " + start + " > " + file.text.length); - Debug.assert(end <= file.text.length, "end must be the bounds of the file. " + end + " > " + file.text.length); - } - var text = getLocaleSpecificMessage(message.key); - if (arguments.length > 4) { - text = formatStringFromArgs(text, arguments, 4); - } - return { - file: file, - start: start, - length: length, - messageText: text, - category: message.category, - code: message.code - }; - } - ts.createFileDiagnostic = createFileDiagnostic; - function createCompilerDiagnostic(message) { - var text = getLocaleSpecificMessage(message.key); - if (arguments.length > 1) { - text = formatStringFromArgs(text, arguments, 1); - } - return { - file: undefined, - start: undefined, - length: undefined, - messageText: text, - category: message.category, - code: message.code - }; - } - ts.createCompilerDiagnostic = createCompilerDiagnostic; - function chainDiagnosticMessages(details, message) { - var text = getLocaleSpecificMessage(message.key); - if (arguments.length > 2) { - text = formatStringFromArgs(text, arguments, 2); - } - return { - messageText: text, - category: message.category, - code: message.code, - next: details - }; - } - ts.chainDiagnosticMessages = chainDiagnosticMessages; - function concatenateDiagnosticMessageChains(headChain, tailChain) { - Debug.assert(!headChain.next); - headChain.next = tailChain; - return headChain; - } - ts.concatenateDiagnosticMessageChains = concatenateDiagnosticMessageChains; - function compareValues(a, b) { - if (a === b) - return 0 /* EqualTo */; - if (a === undefined) - return -1 /* LessThan */; - if (b === undefined) - return 1 /* GreaterThan */; - return a < b ? -1 /* LessThan */ : 1 /* GreaterThan */; - } - ts.compareValues = compareValues; - function getDiagnosticFileName(diagnostic) { - return diagnostic.file ? diagnostic.file.fileName : undefined; - } - function compareDiagnostics(d1, d2) { - return compareValues(getDiagnosticFileName(d1), getDiagnosticFileName(d2)) || - compareValues(d1.start, d2.start) || - compareValues(d1.length, d2.length) || - compareValues(d1.code, d2.code) || - compareMessageText(d1.messageText, d2.messageText) || - 0 /* EqualTo */; - } - ts.compareDiagnostics = compareDiagnostics; - function compareMessageText(text1, text2) { - while (text1 && text2) { - // We still have both chains. - var string1 = typeof text1 === "string" ? text1 : text1.messageText; - var string2 = typeof text2 === "string" ? text2 : text2.messageText; - var res = compareValues(string1, string2); - if (res) { - return res; - } - text1 = typeof text1 === "string" ? undefined : text1.next; - text2 = typeof text2 === "string" ? undefined : text2.next; - } - if (!text1 && !text2) { - // if the chains are done, then these messages are the same. - return 0 /* EqualTo */; - } - // We still have one chain remaining. The shorter chain should come first. - return text1 ? 1 /* GreaterThan */ : -1 /* LessThan */; - } - function sortAndDeduplicateDiagnostics(diagnostics) { - return deduplicateSortedDiagnostics(diagnostics.sort(compareDiagnostics)); - } - ts.sortAndDeduplicateDiagnostics = sortAndDeduplicateDiagnostics; - function deduplicateSortedDiagnostics(diagnostics) { - if (diagnostics.length < 2) { - return diagnostics; - } - var newDiagnostics = [diagnostics[0]]; - var previousDiagnostic = diagnostics[0]; - for (var i = 1; i < diagnostics.length; i++) { - var currentDiagnostic = diagnostics[i]; - var isDupe = compareDiagnostics(currentDiagnostic, previousDiagnostic) === 0 /* EqualTo */; - if (!isDupe) { - newDiagnostics.push(currentDiagnostic); - previousDiagnostic = currentDiagnostic; - } - } - return newDiagnostics; - } - ts.deduplicateSortedDiagnostics = deduplicateSortedDiagnostics; - function normalizeSlashes(path) { - return path.replace(/\\/g, "/"); - } - ts.normalizeSlashes = normalizeSlashes; - // Returns length of path root (i.e. length of "/", "x:/", "//server/share/, file:///user/files") - function getRootLength(path) { - if (path.charCodeAt(0) === 47 /* slash */) { - if (path.charCodeAt(1) !== 47 /* slash */) - return 1; - var p1 = path.indexOf("/", 2); - if (p1 < 0) - return 2; - var p2 = path.indexOf("/", p1 + 1); - if (p2 < 0) - return p1 + 1; - return p2 + 1; - } - if (path.charCodeAt(1) === 58 /* colon */) { - if (path.charCodeAt(2) === 47 /* slash */) - return 3; - return 2; - } - // Per RFC 1738 'file' URI schema has the shape file:/// - // if is omitted then it is assumed that host value is 'localhost', - // however slash after the omitted is not removed. - // file:///folder1/file1 - this is a correct URI - // file://folder2/file2 - this is an incorrect URI - if (path.lastIndexOf("file:///", 0) === 0) { - return "file:///".length; - } - var idx = path.indexOf('://'); - if (idx !== -1) { - return idx + "://".length; - } - return 0; - } - ts.getRootLength = getRootLength; - ts.directorySeparator = "/"; - function getNormalizedParts(normalizedSlashedPath, rootLength) { - var parts = normalizedSlashedPath.substr(rootLength).split(ts.directorySeparator); - var normalized = []; - for (var _i = 0; _i < parts.length; _i++) { - var part = parts[_i]; - if (part !== ".") { - if (part === ".." && normalized.length > 0 && lastOrUndefined(normalized) !== "..") { - normalized.pop(); - } - else { - // A part may be an empty string (which is 'falsy') if the path had consecutive slashes, - // e.g. "path//file.ts". Drop these before re-joining the parts. - if (part) { - normalized.push(part); - } - } - } - } - return normalized; - } - function normalizePath(path) { - path = normalizeSlashes(path); - var rootLength = getRootLength(path); - var normalized = getNormalizedParts(path, rootLength); - return path.substr(0, rootLength) + normalized.join(ts.directorySeparator); - } - ts.normalizePath = normalizePath; - function getDirectoryPath(path) { - return path.substr(0, Math.max(getRootLength(path), path.lastIndexOf(ts.directorySeparator))); - } - ts.getDirectoryPath = getDirectoryPath; - function isUrl(path) { - return path && !isRootedDiskPath(path) && path.indexOf("://") !== -1; - } - ts.isUrl = isUrl; - function isRootedDiskPath(path) { - return getRootLength(path) !== 0; - } - ts.isRootedDiskPath = isRootedDiskPath; - function normalizedPathComponents(path, rootLength) { - var normalizedParts = getNormalizedParts(path, rootLength); - return [path.substr(0, rootLength)].concat(normalizedParts); - } - function getNormalizedPathComponents(path, currentDirectory) { - path = normalizeSlashes(path); - var rootLength = getRootLength(path); - if (rootLength == 0) { - // If the path is not rooted it is relative to current directory - path = combinePaths(normalizeSlashes(currentDirectory), path); - rootLength = getRootLength(path); - } - return normalizedPathComponents(path, rootLength); - } - ts.getNormalizedPathComponents = getNormalizedPathComponents; - function getNormalizedAbsolutePath(fileName, currentDirectory) { - return getNormalizedPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory)); - } - ts.getNormalizedAbsolutePath = getNormalizedAbsolutePath; - function getNormalizedPathFromPathComponents(pathComponents) { - if (pathComponents && pathComponents.length) { - return pathComponents[0] + pathComponents.slice(1).join(ts.directorySeparator); - } - } - ts.getNormalizedPathFromPathComponents = getNormalizedPathFromPathComponents; - function getNormalizedPathComponentsOfUrl(url) { - // Get root length of http://www.website.com/folder1/foler2/ - // In this example the root is: http://www.website.com/ - // normalized path components should be ["http://www.website.com/", "folder1", "folder2"] - var urlLength = url.length; - // Initial root length is http:// part - var rootLength = url.indexOf("://") + "://".length; - while (rootLength < urlLength) { - // Consume all immediate slashes in the protocol - // eg.initial rootlength is just file:// but it needs to consume another "/" in file:/// - if (url.charCodeAt(rootLength) === 47 /* slash */) { - rootLength++; - } - else { - // non slash character means we continue proceeding to next component of root search - break; - } - } - // there are no parts after http:// just return current string as the pathComponent - if (rootLength === urlLength) { - return [url]; - } - // Find the index of "/" after website.com so the root can be http://www.website.com/ (from existing http://) - var indexOfNextSlash = url.indexOf(ts.directorySeparator, rootLength); - if (indexOfNextSlash !== -1) { - // Found the "/" after the website.com so the root is length of http://www.website.com/ - // and get components afetr the root normally like any other folder components - rootLength = indexOfNextSlash + 1; - return normalizedPathComponents(url, rootLength); - } - else { - // Can't find the host assume the rest of the string as component - // but make sure we append "/" to it as root is not joined using "/" - // eg. if url passed in was http://website.com we want to use root as [http://website.com/] - // so that other path manipulations will be correct and it can be merged with relative paths correctly - return [url + ts.directorySeparator]; - } - } - function getNormalizedPathOrUrlComponents(pathOrUrl, currentDirectory) { - if (isUrl(pathOrUrl)) { - return getNormalizedPathComponentsOfUrl(pathOrUrl); - } - else { - return getNormalizedPathComponents(pathOrUrl, currentDirectory); - } - } - function getRelativePathToDirectoryOrUrl(directoryPathOrUrl, relativeOrAbsolutePath, currentDirectory, getCanonicalFileName, isAbsolutePathAnUrl) { - var pathComponents = getNormalizedPathOrUrlComponents(relativeOrAbsolutePath, currentDirectory); - var directoryComponents = getNormalizedPathOrUrlComponents(directoryPathOrUrl, currentDirectory); - if (directoryComponents.length > 1 && lastOrUndefined(directoryComponents) === "") { - // If the directory path given was of type test/cases/ then we really need components of directory to be only till its name - // that is ["test", "cases", ""] needs to be actually ["test", "cases"] - directoryComponents.length--; - } - // Find the component that differs - for (var joinStartIndex = 0; joinStartIndex < pathComponents.length && joinStartIndex < directoryComponents.length; joinStartIndex++) { - if (getCanonicalFileName(directoryComponents[joinStartIndex]) !== getCanonicalFileName(pathComponents[joinStartIndex])) { - break; - } - } - // Get the relative path - if (joinStartIndex) { - var relativePath = ""; - var relativePathComponents = pathComponents.slice(joinStartIndex, pathComponents.length); - for (; joinStartIndex < directoryComponents.length; joinStartIndex++) { - if (directoryComponents[joinStartIndex] !== "") { - relativePath = relativePath + ".." + ts.directorySeparator; - } - } - return relativePath + relativePathComponents.join(ts.directorySeparator); - } - // Cant find the relative path, get the absolute path - var absolutePath = getNormalizedPathFromPathComponents(pathComponents); - if (isAbsolutePathAnUrl && isRootedDiskPath(absolutePath)) { - absolutePath = "file:///" + absolutePath; - } - return absolutePath; - } - ts.getRelativePathToDirectoryOrUrl = getRelativePathToDirectoryOrUrl; - function getBaseFileName(path) { - var i = path.lastIndexOf(ts.directorySeparator); - return i < 0 ? path : path.substring(i + 1); - } - ts.getBaseFileName = getBaseFileName; - function combinePaths(path1, path2) { - if (!(path1 && path1.length)) - return path2; - if (!(path2 && path2.length)) - return path1; - if (getRootLength(path2) !== 0) - return path2; - if (path1.charAt(path1.length - 1) === ts.directorySeparator) - return path1 + path2; - return path1 + ts.directorySeparator + path2; - } - ts.combinePaths = combinePaths; - function fileExtensionIs(path, extension) { - var pathLen = path.length; - var extLen = extension.length; - return pathLen > extLen && path.substr(pathLen - extLen, extLen) === extension; - } - ts.fileExtensionIs = fileExtensionIs; - /** - * List of supported extensions in order of file resolution precedence. - */ - ts.supportedExtensions = [".ts", ".d.ts"]; - var extensionsToRemove = [".d.ts", ".ts", ".js"]; - function removeFileExtension(path) { - for (var _i = 0; _i < extensionsToRemove.length; _i++) { - var ext = extensionsToRemove[_i]; - if (fileExtensionIs(path, ext)) { - return path.substr(0, path.length - ext.length); - } - } - return path; - } - ts.removeFileExtension = removeFileExtension; - var backslashOrDoubleQuote = /[\"\\]/g; - var escapedCharsRegExp = /[\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; - var escapedCharsMap = { - "\0": "\\0", - "\t": "\\t", - "\v": "\\v", - "\f": "\\f", - "\b": "\\b", - "\r": "\\r", - "\n": "\\n", - "\\": "\\\\", - "\"": "\\\"", - "\u2028": "\\u2028", - "\u2029": "\\u2029", - "\u0085": "\\u0085" // nextLine - }; - function Symbol(flags, name) { - this.flags = flags; - this.name = name; - this.declarations = undefined; - } - function Type(checker, flags) { - this.flags = flags; - } - function Signature(checker) { - } - ts.objectAllocator = { - getNodeConstructor: function (kind) { - function Node() { - } - Node.prototype = { - kind: kind, - pos: 0, - end: 0, - flags: 0, - parent: undefined - }; - return Node; - }, - getSymbolConstructor: function () { return Symbol; }, - getTypeConstructor: function () { return Type; }, - getSignatureConstructor: function () { return Signature; } - }; - (function (AssertionLevel) { - AssertionLevel[AssertionLevel["None"] = 0] = "None"; - AssertionLevel[AssertionLevel["Normal"] = 1] = "Normal"; - AssertionLevel[AssertionLevel["Aggressive"] = 2] = "Aggressive"; - AssertionLevel[AssertionLevel["VeryAggressive"] = 3] = "VeryAggressive"; - })(ts.AssertionLevel || (ts.AssertionLevel = {})); - var AssertionLevel = ts.AssertionLevel; - var Debug; - (function (Debug) { - var currentAssertionLevel = 0 /* None */; - function shouldAssert(level) { - return currentAssertionLevel >= level; - } - Debug.shouldAssert = shouldAssert; - function assert(expression, message, verboseDebugInfo) { - if (!expression) { - var verboseDebugString = ""; - if (verboseDebugInfo) { - verboseDebugString = "\r\nVerbose Debug Information: " + verboseDebugInfo(); - } - throw new Error("Debug Failure. False expression: " + (message || "") + verboseDebugString); - } - } - Debug.assert = assert; - function fail(message) { - Debug.assert(false, message); - } - Debug.fail = fail; - })(Debug = ts.Debug || (ts.Debug = {})); -})(ts || (ts = {})); -/// -var ts; -(function (ts) { - ts.sys = (function () { - function getWScriptSystem() { - var fso = new ActiveXObject("Scripting.FileSystemObject"); - var fileStream = new ActiveXObject("ADODB.Stream"); - fileStream.Type = 2 /*text*/; - var binaryStream = new ActiveXObject("ADODB.Stream"); - binaryStream.Type = 1 /*binary*/; - var args = []; - for (var i = 0; i < WScript.Arguments.length; i++) { - args[i] = WScript.Arguments.Item(i); - } - function readFile(fileName, encoding) { - if (!fso.FileExists(fileName)) { - return undefined; - } - fileStream.Open(); - try { - if (encoding) { - fileStream.Charset = encoding; - fileStream.LoadFromFile(fileName); - } - else { - // Load file and read the first two bytes into a string with no interpretation - fileStream.Charset = "x-ansi"; - fileStream.LoadFromFile(fileName); - var bom = fileStream.ReadText(2) || ""; - // Position must be at 0 before encoding can be changed - fileStream.Position = 0; - // [0xFF,0xFE] and [0xFE,0xFF] mean utf-16 (little or big endian), otherwise default to utf-8 - fileStream.Charset = bom.length >= 2 && (bom.charCodeAt(0) === 0xFF && bom.charCodeAt(1) === 0xFE || bom.charCodeAt(0) === 0xFE && bom.charCodeAt(1) === 0xFF) ? "unicode" : "utf-8"; - } - // ReadText method always strips byte order mark from resulting string - return fileStream.ReadText(); - } - catch (e) { - throw e; - } - finally { - fileStream.Close(); - } - } - function writeFile(fileName, data, writeByteOrderMark) { - fileStream.Open(); - binaryStream.Open(); - try { - // Write characters in UTF-8 encoding - fileStream.Charset = "utf-8"; - fileStream.WriteText(data); - // If we don't want the BOM, then skip it by setting the starting location to 3 (size of BOM). - // If not, start from position 0, as the BOM will be added automatically when charset==utf8. - if (writeByteOrderMark) { - fileStream.Position = 0; - } - else { - fileStream.Position = 3; - } - fileStream.CopyTo(binaryStream); - binaryStream.SaveToFile(fileName, 2 /*overwrite*/); - } - finally { - binaryStream.Close(); - fileStream.Close(); - } - } - function getCanonicalPath(path) { - return path.toLowerCase(); - } - function getNames(collection) { - var result = []; - for (var e = new Enumerator(collection); !e.atEnd(); e.moveNext()) { - result.push(e.item().Name); - } - return result.sort(); - } - function readDirectory(path, extension, exclude) { - var result = []; - exclude = ts.map(exclude, function (s) { return getCanonicalPath(ts.combinePaths(path, s)); }); - visitDirectory(path); - return result; - function visitDirectory(path) { - var folder = fso.GetFolder(path || "."); - var files = getNames(folder.files); - for (var _i = 0; _i < files.length; _i++) { - var current = files[_i]; - var name_1 = ts.combinePaths(path, current); - if ((!extension || ts.fileExtensionIs(name_1, extension)) && !ts.contains(exclude, getCanonicalPath(name_1))) { - result.push(name_1); - } - } - var subfolders = getNames(folder.subfolders); - for (var _a = 0; _a < subfolders.length; _a++) { - var current = subfolders[_a]; - var name_2 = ts.combinePaths(path, current); - if (!ts.contains(exclude, getCanonicalPath(name_2))) { - visitDirectory(name_2); - } - } - } - } - return { - args: args, - newLine: "\r\n", - useCaseSensitiveFileNames: false, - write: function (s) { - WScript.StdOut.Write(s); - }, - readFile: readFile, - writeFile: writeFile, - resolvePath: function (path) { - return fso.GetAbsolutePathName(path); - }, - fileExists: function (path) { - return fso.FileExists(path); - }, - directoryExists: function (path) { - return fso.FolderExists(path); - }, - createDirectory: function (directoryName) { - if (!this.directoryExists(directoryName)) { - fso.CreateFolder(directoryName); - } - }, - getExecutingFilePath: function () { - return WScript.ScriptFullName; - }, - getCurrentDirectory: function () { - return new ActiveXObject("WScript.Shell").CurrentDirectory; - }, - readDirectory: readDirectory, - exit: function (exitCode) { - try { - WScript.Quit(exitCode); - } - catch (e) { - } - } - }; - } - function getNodeSystem() { - var _fs = require("fs"); - var _path = require("path"); - var _os = require('os'); - var platform = _os.platform(); - // win32\win64 are case insensitive platforms, MacOS (darwin) by default is also case insensitive - var useCaseSensitiveFileNames = platform !== "win32" && platform !== "win64" && platform !== "darwin"; - function readFile(fileName, encoding) { - if (!_fs.existsSync(fileName)) { - return undefined; - } - var buffer = _fs.readFileSync(fileName); - var len = buffer.length; - if (len >= 2 && buffer[0] === 0xFE && buffer[1] === 0xFF) { - // Big endian UTF-16 byte order mark detected. Since big endian is not supported by node.js, - // flip all byte pairs and treat as little endian. - len &= ~1; - for (var i = 0; i < len; i += 2) { - var temp = buffer[i]; - buffer[i] = buffer[i + 1]; - buffer[i + 1] = temp; - } - return buffer.toString("utf16le", 2); - } - if (len >= 2 && buffer[0] === 0xFF && buffer[1] === 0xFE) { - // Little endian UTF-16 byte order mark detected - return buffer.toString("utf16le", 2); - } - if (len >= 3 && buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) { - // UTF-8 byte order mark detected - return buffer.toString("utf8", 3); - } - // Default is UTF-8 with no byte order mark - return buffer.toString("utf8"); - } - function writeFile(fileName, data, writeByteOrderMark) { - // If a BOM is required, emit one - if (writeByteOrderMark) { - data = '\uFEFF' + data; - } - _fs.writeFileSync(fileName, data, "utf8"); - } - function getCanonicalPath(path) { - return useCaseSensitiveFileNames ? path.toLowerCase() : path; - } - function readDirectory(path, extension, exclude) { - var result = []; - exclude = ts.map(exclude, function (s) { return getCanonicalPath(ts.combinePaths(path, s)); }); - visitDirectory(path); - return result; - function visitDirectory(path) { - var files = _fs.readdirSync(path || ".").sort(); - var directories = []; - for (var _i = 0; _i < files.length; _i++) { - var current = files[_i]; - var name = ts.combinePaths(path, current); - if (!ts.contains(exclude, getCanonicalPath(name))) { - var stat = _fs.statSync(name); - if (stat.isFile()) { - if (!extension || ts.fileExtensionIs(name, extension)) { - result.push(name); - } - } - else if (stat.isDirectory()) { - directories.push(name); - } - } - } - for (var _a = 0; _a < directories.length; _a++) { - var current = directories[_a]; - visitDirectory(current); - } - } - } - return { - args: process.argv.slice(2), - newLine: _os.EOL, - useCaseSensitiveFileNames: useCaseSensitiveFileNames, - write: function (s) { - // 1 is a standard descriptor for stdout - _fs.writeSync(1, s); - }, - readFile: readFile, - writeFile: writeFile, - watchFile: function (fileName, callback) { - // watchFile polls a file every 250ms, picking up file notifications. - _fs.watchFile(fileName, { persistent: true, interval: 250 }, fileChanged); - return { - close: function () { _fs.unwatchFile(fileName, fileChanged); } - }; - function fileChanged(curr, prev) { - if (+curr.mtime <= +prev.mtime) { - return; - } - callback(fileName); - } - ; - }, - resolvePath: function (path) { - return _path.resolve(path); - }, - fileExists: function (path) { - return _fs.existsSync(path); - }, - directoryExists: function (path) { - return _fs.existsSync(path) && _fs.statSync(path).isDirectory(); - }, - createDirectory: function (directoryName) { - if (!this.directoryExists(directoryName)) { - _fs.mkdirSync(directoryName); - } - }, - getExecutingFilePath: function () { - return __filename; - }, - getCurrentDirectory: function () { - return process.cwd(); - }, - readDirectory: readDirectory, - getMemoryUsage: function () { - if (global.gc) { - global.gc(); - } - return process.memoryUsage().heapUsed; - }, - exit: function (exitCode) { - process.exit(exitCode); - } - }; - } - if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") { - return getWScriptSystem(); - } - else if (typeof module !== "undefined" && module.exports) { - return getNodeSystem(); - } - else { - return undefined; // Unsupported host - } - })(); -})(ts || (ts = {})); -// -/// -/* @internal */ -var ts; -(function (ts) { - ts.Diagnostics = { - Unterminated_string_literal: { code: 1002, category: ts.DiagnosticCategory.Error, key: "Unterminated string literal." }, - Identifier_expected: { code: 1003, category: ts.DiagnosticCategory.Error, key: "Identifier expected." }, - _0_expected: { code: 1005, category: ts.DiagnosticCategory.Error, key: "'{0}' expected." }, - A_file_cannot_have_a_reference_to_itself: { code: 1006, category: ts.DiagnosticCategory.Error, key: "A file cannot have a reference to itself." }, - Trailing_comma_not_allowed: { code: 1009, category: ts.DiagnosticCategory.Error, key: "Trailing comma not allowed." }, - Asterisk_Slash_expected: { code: 1010, category: ts.DiagnosticCategory.Error, key: "'*/' expected." }, - Unexpected_token: { code: 1012, category: ts.DiagnosticCategory.Error, key: "Unexpected token." }, - A_rest_parameter_must_be_last_in_a_parameter_list: { code: 1014, category: ts.DiagnosticCategory.Error, key: "A rest parameter must be last in a parameter list." }, - Parameter_cannot_have_question_mark_and_initializer: { code: 1015, category: ts.DiagnosticCategory.Error, key: "Parameter cannot have question mark and initializer." }, - A_required_parameter_cannot_follow_an_optional_parameter: { code: 1016, category: ts.DiagnosticCategory.Error, key: "A required parameter cannot follow an optional parameter." }, - An_index_signature_cannot_have_a_rest_parameter: { code: 1017, category: ts.DiagnosticCategory.Error, key: "An index signature cannot have a rest parameter." }, - An_index_signature_parameter_cannot_have_an_accessibility_modifier: { code: 1018, category: ts.DiagnosticCategory.Error, key: "An index signature parameter cannot have an accessibility modifier." }, - An_index_signature_parameter_cannot_have_a_question_mark: { code: 1019, category: ts.DiagnosticCategory.Error, key: "An index signature parameter cannot have a question mark." }, - An_index_signature_parameter_cannot_have_an_initializer: { code: 1020, category: ts.DiagnosticCategory.Error, key: "An index signature parameter cannot have an initializer." }, - An_index_signature_must_have_a_type_annotation: { code: 1021, category: ts.DiagnosticCategory.Error, key: "An index signature must have a type annotation." }, - An_index_signature_parameter_must_have_a_type_annotation: { code: 1022, category: ts.DiagnosticCategory.Error, key: "An index signature parameter must have a type annotation." }, - An_index_signature_parameter_type_must_be_string_or_number: { code: 1023, category: ts.DiagnosticCategory.Error, key: "An index signature parameter type must be 'string' or 'number'." }, - A_class_or_interface_declaration_can_only_have_one_extends_clause: { code: 1024, category: ts.DiagnosticCategory.Error, key: "A class or interface declaration can only have one 'extends' clause." }, - An_extends_clause_must_precede_an_implements_clause: { code: 1025, category: ts.DiagnosticCategory.Error, key: "An 'extends' clause must precede an 'implements' clause." }, - A_class_can_only_extend_a_single_class: { code: 1026, category: ts.DiagnosticCategory.Error, key: "A class can only extend a single class." }, - A_class_declaration_can_only_have_one_implements_clause: { code: 1027, category: ts.DiagnosticCategory.Error, key: "A class declaration can only have one 'implements' clause." }, - Accessibility_modifier_already_seen: { code: 1028, category: ts.DiagnosticCategory.Error, key: "Accessibility modifier already seen." }, - _0_modifier_must_precede_1_modifier: { code: 1029, category: ts.DiagnosticCategory.Error, key: "'{0}' modifier must precede '{1}' modifier." }, - _0_modifier_already_seen: { code: 1030, category: ts.DiagnosticCategory.Error, key: "'{0}' modifier already seen." }, - _0_modifier_cannot_appear_on_a_class_element: { code: 1031, category: ts.DiagnosticCategory.Error, key: "'{0}' modifier cannot appear on a class element." }, - An_interface_declaration_cannot_have_an_implements_clause: { code: 1032, category: ts.DiagnosticCategory.Error, key: "An interface declaration cannot have an 'implements' clause." }, - super_must_be_followed_by_an_argument_list_or_member_access: { code: 1034, category: ts.DiagnosticCategory.Error, key: "'super' must be followed by an argument list or member access." }, - Only_ambient_modules_can_use_quoted_names: { code: 1035, category: ts.DiagnosticCategory.Error, key: "Only ambient modules can use quoted names." }, - Statements_are_not_allowed_in_ambient_contexts: { code: 1036, category: ts.DiagnosticCategory.Error, key: "Statements are not allowed in ambient contexts." }, - A_declare_modifier_cannot_be_used_in_an_already_ambient_context: { code: 1038, category: ts.DiagnosticCategory.Error, key: "A 'declare' modifier cannot be used in an already ambient context." }, - Initializers_are_not_allowed_in_ambient_contexts: { code: 1039, category: ts.DiagnosticCategory.Error, key: "Initializers are not allowed in ambient contexts." }, - _0_modifier_cannot_appear_on_a_module_element: { code: 1044, category: ts.DiagnosticCategory.Error, key: "'{0}' modifier cannot appear on a module element." }, - A_declare_modifier_cannot_be_used_with_an_interface_declaration: { code: 1045, category: ts.DiagnosticCategory.Error, key: "A 'declare' modifier cannot be used with an interface declaration." }, - A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file: { code: 1046, category: ts.DiagnosticCategory.Error, key: "A 'declare' modifier is required for a top level declaration in a .d.ts file." }, - A_rest_parameter_cannot_be_optional: { code: 1047, category: ts.DiagnosticCategory.Error, key: "A rest parameter cannot be optional." }, - A_rest_parameter_cannot_have_an_initializer: { code: 1048, category: ts.DiagnosticCategory.Error, key: "A rest parameter cannot have an initializer." }, - A_set_accessor_must_have_exactly_one_parameter: { code: 1049, category: ts.DiagnosticCategory.Error, key: "A 'set' accessor must have exactly one parameter." }, - A_set_accessor_cannot_have_an_optional_parameter: { code: 1051, category: ts.DiagnosticCategory.Error, key: "A 'set' accessor cannot have an optional parameter." }, - A_set_accessor_parameter_cannot_have_an_initializer: { code: 1052, category: ts.DiagnosticCategory.Error, key: "A 'set' accessor parameter cannot have an initializer." }, - A_set_accessor_cannot_have_rest_parameter: { code: 1053, category: ts.DiagnosticCategory.Error, key: "A 'set' accessor cannot have rest parameter." }, - A_get_accessor_cannot_have_parameters: { code: 1054, category: ts.DiagnosticCategory.Error, key: "A 'get' accessor cannot have parameters." }, - Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: { code: 1056, category: ts.DiagnosticCategory.Error, key: "Accessors are only available when targeting ECMAScript 5 and higher." }, - Enum_member_must_have_initializer: { code: 1061, category: ts.DiagnosticCategory.Error, key: "Enum member must have initializer." }, - An_export_assignment_cannot_be_used_in_a_namespace: { code: 1063, category: ts.DiagnosticCategory.Error, key: "An export assignment cannot be used in a namespace." }, - Ambient_enum_elements_can_only_have_integer_literal_initializers: { code: 1066, category: ts.DiagnosticCategory.Error, key: "Ambient enum elements can only have integer literal initializers." }, - Unexpected_token_A_constructor_method_accessor_or_property_was_expected: { code: 1068, category: ts.DiagnosticCategory.Error, key: "Unexpected token. A constructor, method, accessor, or property was expected." }, - A_declare_modifier_cannot_be_used_with_an_import_declaration: { code: 1079, category: ts.DiagnosticCategory.Error, key: "A 'declare' modifier cannot be used with an import declaration." }, - Invalid_reference_directive_syntax: { code: 1084, category: ts.DiagnosticCategory.Error, key: "Invalid 'reference' directive syntax." }, - Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher: { code: 1085, category: ts.DiagnosticCategory.Error, key: "Octal literals are not available when targeting ECMAScript 5 and higher." }, - An_accessor_cannot_be_declared_in_an_ambient_context: { code: 1086, category: ts.DiagnosticCategory.Error, key: "An accessor cannot be declared in an ambient context." }, - _0_modifier_cannot_appear_on_a_constructor_declaration: { code: 1089, category: ts.DiagnosticCategory.Error, key: "'{0}' modifier cannot appear on a constructor declaration." }, - _0_modifier_cannot_appear_on_a_parameter: { code: 1090, category: ts.DiagnosticCategory.Error, key: "'{0}' modifier cannot appear on a parameter." }, - Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement: { code: 1091, category: ts.DiagnosticCategory.Error, key: "Only a single variable declaration is allowed in a 'for...in' statement." }, - Type_parameters_cannot_appear_on_a_constructor_declaration: { code: 1092, category: ts.DiagnosticCategory.Error, key: "Type parameters cannot appear on a constructor declaration." }, - Type_annotation_cannot_appear_on_a_constructor_declaration: { code: 1093, category: ts.DiagnosticCategory.Error, key: "Type annotation cannot appear on a constructor declaration." }, - An_accessor_cannot_have_type_parameters: { code: 1094, category: ts.DiagnosticCategory.Error, key: "An accessor cannot have type parameters." }, - A_set_accessor_cannot_have_a_return_type_annotation: { code: 1095, category: ts.DiagnosticCategory.Error, key: "A 'set' accessor cannot have a return type annotation." }, - An_index_signature_must_have_exactly_one_parameter: { code: 1096, category: ts.DiagnosticCategory.Error, key: "An index signature must have exactly one parameter." }, - _0_list_cannot_be_empty: { code: 1097, category: ts.DiagnosticCategory.Error, key: "'{0}' list cannot be empty." }, - Type_parameter_list_cannot_be_empty: { code: 1098, category: ts.DiagnosticCategory.Error, key: "Type parameter list cannot be empty." }, - Type_argument_list_cannot_be_empty: { code: 1099, category: ts.DiagnosticCategory.Error, key: "Type argument list cannot be empty." }, - Invalid_use_of_0_in_strict_mode: { code: 1100, category: ts.DiagnosticCategory.Error, key: "Invalid use of '{0}' in strict mode." }, - with_statements_are_not_allowed_in_strict_mode: { code: 1101, category: ts.DiagnosticCategory.Error, key: "'with' statements are not allowed in strict mode." }, - delete_cannot_be_called_on_an_identifier_in_strict_mode: { code: 1102, category: ts.DiagnosticCategory.Error, key: "'delete' cannot be called on an identifier in strict mode." }, - A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: { code: 1104, category: ts.DiagnosticCategory.Error, key: "A 'continue' statement can only be used within an enclosing iteration statement." }, - A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement: { code: 1105, category: ts.DiagnosticCategory.Error, key: "A 'break' statement can only be used within an enclosing iteration or switch statement." }, - Jump_target_cannot_cross_function_boundary: { code: 1107, category: ts.DiagnosticCategory.Error, key: "Jump target cannot cross function boundary." }, - A_return_statement_can_only_be_used_within_a_function_body: { code: 1108, category: ts.DiagnosticCategory.Error, key: "A 'return' statement can only be used within a function body." }, - Expression_expected: { code: 1109, category: ts.DiagnosticCategory.Error, key: "Expression expected." }, - Type_expected: { code: 1110, category: ts.DiagnosticCategory.Error, key: "Type expected." }, - A_class_member_cannot_be_declared_optional: { code: 1112, category: ts.DiagnosticCategory.Error, key: "A class member cannot be declared optional." }, - A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: { code: 1113, category: ts.DiagnosticCategory.Error, key: "A 'default' clause cannot appear more than once in a 'switch' statement." }, - Duplicate_label_0: { code: 1114, category: ts.DiagnosticCategory.Error, key: "Duplicate label '{0}'" }, - A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: { code: 1115, category: ts.DiagnosticCategory.Error, key: "A 'continue' statement can only jump to a label of an enclosing iteration statement." }, - A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement: { code: 1116, category: ts.DiagnosticCategory.Error, key: "A 'break' statement can only jump to a label of an enclosing statement." }, - An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode: { code: 1117, category: ts.DiagnosticCategory.Error, key: "An object literal cannot have multiple properties with the same name in strict mode." }, - An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name: { code: 1118, category: ts.DiagnosticCategory.Error, key: "An object literal cannot have multiple get/set accessors with the same name." }, - An_object_literal_cannot_have_property_and_accessor_with_the_same_name: { code: 1119, category: ts.DiagnosticCategory.Error, key: "An object literal cannot have property and accessor with the same name." }, - An_export_assignment_cannot_have_modifiers: { code: 1120, category: ts.DiagnosticCategory.Error, key: "An export assignment cannot have modifiers." }, - Octal_literals_are_not_allowed_in_strict_mode: { code: 1121, category: ts.DiagnosticCategory.Error, key: "Octal literals are not allowed in strict mode." }, - A_tuple_type_element_list_cannot_be_empty: { code: 1122, category: ts.DiagnosticCategory.Error, key: "A tuple type element list cannot be empty." }, - Variable_declaration_list_cannot_be_empty: { code: 1123, category: ts.DiagnosticCategory.Error, key: "Variable declaration list cannot be empty." }, - Digit_expected: { code: 1124, category: ts.DiagnosticCategory.Error, key: "Digit expected." }, - Hexadecimal_digit_expected: { code: 1125, category: ts.DiagnosticCategory.Error, key: "Hexadecimal digit expected." }, - Unexpected_end_of_text: { code: 1126, category: ts.DiagnosticCategory.Error, key: "Unexpected end of text." }, - Invalid_character: { code: 1127, category: ts.DiagnosticCategory.Error, key: "Invalid character." }, - Declaration_or_statement_expected: { code: 1128, category: ts.DiagnosticCategory.Error, key: "Declaration or statement expected." }, - Statement_expected: { code: 1129, category: ts.DiagnosticCategory.Error, key: "Statement expected." }, - case_or_default_expected: { code: 1130, category: ts.DiagnosticCategory.Error, key: "'case' or 'default' expected." }, - Property_or_signature_expected: { code: 1131, category: ts.DiagnosticCategory.Error, key: "Property or signature expected." }, - Enum_member_expected: { code: 1132, category: ts.DiagnosticCategory.Error, key: "Enum member expected." }, - Type_reference_expected: { code: 1133, category: ts.DiagnosticCategory.Error, key: "Type reference expected." }, - Variable_declaration_expected: { code: 1134, category: ts.DiagnosticCategory.Error, key: "Variable declaration expected." }, - Argument_expression_expected: { code: 1135, category: ts.DiagnosticCategory.Error, key: "Argument expression expected." }, - Property_assignment_expected: { code: 1136, category: ts.DiagnosticCategory.Error, key: "Property assignment expected." }, - Expression_or_comma_expected: { code: 1137, category: ts.DiagnosticCategory.Error, key: "Expression or comma expected." }, - Parameter_declaration_expected: { code: 1138, category: ts.DiagnosticCategory.Error, key: "Parameter declaration expected." }, - Type_parameter_declaration_expected: { code: 1139, category: ts.DiagnosticCategory.Error, key: "Type parameter declaration expected." }, - Type_argument_expected: { code: 1140, category: ts.DiagnosticCategory.Error, key: "Type argument expected." }, - String_literal_expected: { code: 1141, category: ts.DiagnosticCategory.Error, key: "String literal expected." }, - Line_break_not_permitted_here: { code: 1142, category: ts.DiagnosticCategory.Error, key: "Line break not permitted here." }, - or_expected: { code: 1144, category: ts.DiagnosticCategory.Error, key: "'{' or ';' expected." }, - Modifiers_not_permitted_on_index_signature_members: { code: 1145, category: ts.DiagnosticCategory.Error, key: "Modifiers not permitted on index signature members." }, - Declaration_expected: { code: 1146, category: ts.DiagnosticCategory.Error, key: "Declaration expected." }, - Import_declarations_in_a_namespace_cannot_reference_a_module: { code: 1147, category: ts.DiagnosticCategory.Error, key: "Import declarations in a namespace cannot reference a module." }, - Cannot_compile_modules_unless_the_module_flag_is_provided: { code: 1148, category: ts.DiagnosticCategory.Error, key: "Cannot compile modules unless the '--module' flag is provided." }, - File_name_0_differs_from_already_included_file_name_1_only_in_casing: { code: 1149, category: ts.DiagnosticCategory.Error, key: "File name '{0}' differs from already included file name '{1}' only in casing" }, - new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead: { code: 1150, category: ts.DiagnosticCategory.Error, key: "'new T[]' cannot be used to create an array. Use 'new Array()' instead." }, - var_let_or_const_expected: { code: 1152, category: ts.DiagnosticCategory.Error, key: "'var', 'let' or 'const' expected." }, - let_declarations_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1153, category: ts.DiagnosticCategory.Error, key: "'let' declarations are only available when targeting ECMAScript 6 and higher." }, - const_declarations_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1154, category: ts.DiagnosticCategory.Error, key: "'const' declarations are only available when targeting ECMAScript 6 and higher." }, - const_declarations_must_be_initialized: { code: 1155, category: ts.DiagnosticCategory.Error, key: "'const' declarations must be initialized" }, - const_declarations_can_only_be_declared_inside_a_block: { code: 1156, category: ts.DiagnosticCategory.Error, key: "'const' declarations can only be declared inside a block." }, - let_declarations_can_only_be_declared_inside_a_block: { code: 1157, category: ts.DiagnosticCategory.Error, key: "'let' declarations can only be declared inside a block." }, - Unterminated_template_literal: { code: 1160, category: ts.DiagnosticCategory.Error, key: "Unterminated template literal." }, - Unterminated_regular_expression_literal: { code: 1161, category: ts.DiagnosticCategory.Error, key: "Unterminated regular expression literal." }, - An_object_member_cannot_be_declared_optional: { code: 1162, category: ts.DiagnosticCategory.Error, key: "An object member cannot be declared optional." }, - A_yield_expression_is_only_allowed_in_a_generator_body: { code: 1163, category: ts.DiagnosticCategory.Error, key: "A 'yield' expression is only allowed in a generator body." }, - Computed_property_names_are_not_allowed_in_enums: { code: 1164, category: ts.DiagnosticCategory.Error, key: "Computed property names are not allowed in enums." }, - A_computed_property_name_in_an_ambient_context_must_directly_refer_to_a_built_in_symbol: { code: 1165, category: ts.DiagnosticCategory.Error, key: "A computed property name in an ambient context must directly refer to a built-in symbol." }, - A_computed_property_name_in_a_class_property_declaration_must_directly_refer_to_a_built_in_symbol: { code: 1166, category: ts.DiagnosticCategory.Error, key: "A computed property name in a class property declaration must directly refer to a built-in symbol." }, - Computed_property_names_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1167, category: ts.DiagnosticCategory.Error, key: "Computed property names are only available when targeting ECMAScript 6 and higher." }, - A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol: { code: 1168, category: ts.DiagnosticCategory.Error, key: "A computed property name in a method overload must directly refer to a built-in symbol." }, - A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol: { code: 1169, category: ts.DiagnosticCategory.Error, key: "A computed property name in an interface must directly refer to a built-in symbol." }, - A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol: { code: 1170, category: ts.DiagnosticCategory.Error, key: "A computed property name in a type literal must directly refer to a built-in symbol." }, - A_comma_expression_is_not_allowed_in_a_computed_property_name: { code: 1171, category: ts.DiagnosticCategory.Error, key: "A comma expression is not allowed in a computed property name." }, - extends_clause_already_seen: { code: 1172, category: ts.DiagnosticCategory.Error, key: "'extends' clause already seen." }, - extends_clause_must_precede_implements_clause: { code: 1173, category: ts.DiagnosticCategory.Error, key: "'extends' clause must precede 'implements' clause." }, - Classes_can_only_extend_a_single_class: { code: 1174, category: ts.DiagnosticCategory.Error, key: "Classes can only extend a single class." }, - implements_clause_already_seen: { code: 1175, category: ts.DiagnosticCategory.Error, key: "'implements' clause already seen." }, - Interface_declaration_cannot_have_implements_clause: { code: 1176, category: ts.DiagnosticCategory.Error, key: "Interface declaration cannot have 'implements' clause." }, - Binary_digit_expected: { code: 1177, category: ts.DiagnosticCategory.Error, key: "Binary digit expected." }, - Octal_digit_expected: { code: 1178, category: ts.DiagnosticCategory.Error, key: "Octal digit expected." }, - Unexpected_token_expected: { code: 1179, category: ts.DiagnosticCategory.Error, key: "Unexpected token. '{' expected." }, - Property_destructuring_pattern_expected: { code: 1180, category: ts.DiagnosticCategory.Error, key: "Property destructuring pattern expected." }, - Array_element_destructuring_pattern_expected: { code: 1181, category: ts.DiagnosticCategory.Error, key: "Array element destructuring pattern expected." }, - A_destructuring_declaration_must_have_an_initializer: { code: 1182, category: ts.DiagnosticCategory.Error, key: "A destructuring declaration must have an initializer." }, - Destructuring_declarations_are_not_allowed_in_ambient_contexts: { code: 1183, category: ts.DiagnosticCategory.Error, key: "Destructuring declarations are not allowed in ambient contexts." }, - An_implementation_cannot_be_declared_in_ambient_contexts: { code: 1184, category: ts.DiagnosticCategory.Error, key: "An implementation cannot be declared in ambient contexts." }, - Modifiers_cannot_appear_here: { code: 1184, category: ts.DiagnosticCategory.Error, key: "Modifiers cannot appear here." }, - Merge_conflict_marker_encountered: { code: 1185, category: ts.DiagnosticCategory.Error, key: "Merge conflict marker encountered." }, - A_rest_element_cannot_have_an_initializer: { code: 1186, category: ts.DiagnosticCategory.Error, key: "A rest element cannot have an initializer." }, - A_parameter_property_may_not_be_a_binding_pattern: { code: 1187, category: ts.DiagnosticCategory.Error, key: "A parameter property may not be a binding pattern." }, - Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement: { code: 1188, category: ts.DiagnosticCategory.Error, key: "Only a single variable declaration is allowed in a 'for...of' statement." }, - The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer: { code: 1189, category: ts.DiagnosticCategory.Error, key: "The variable declaration of a 'for...in' statement cannot have an initializer." }, - The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer: { code: 1190, category: ts.DiagnosticCategory.Error, key: "The variable declaration of a 'for...of' statement cannot have an initializer." }, - An_import_declaration_cannot_have_modifiers: { code: 1191, category: ts.DiagnosticCategory.Error, key: "An import declaration cannot have modifiers." }, - Module_0_has_no_default_export: { code: 1192, category: ts.DiagnosticCategory.Error, key: "Module '{0}' has no default export." }, - An_export_declaration_cannot_have_modifiers: { code: 1193, category: ts.DiagnosticCategory.Error, key: "An export declaration cannot have modifiers." }, - Export_declarations_are_not_permitted_in_a_namespace: { code: 1194, category: ts.DiagnosticCategory.Error, key: "Export declarations are not permitted in a namespace." }, - Catch_clause_variable_name_must_be_an_identifier: { code: 1195, category: ts.DiagnosticCategory.Error, key: "Catch clause variable name must be an identifier." }, - Catch_clause_variable_cannot_have_a_type_annotation: { code: 1196, category: ts.DiagnosticCategory.Error, key: "Catch clause variable cannot have a type annotation." }, - Catch_clause_variable_cannot_have_an_initializer: { code: 1197, category: ts.DiagnosticCategory.Error, key: "Catch clause variable cannot have an initializer." }, - An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive: { code: 1198, category: ts.DiagnosticCategory.Error, key: "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive." }, - Unterminated_Unicode_escape_sequence: { code: 1199, category: ts.DiagnosticCategory.Error, key: "Unterminated Unicode escape sequence." }, - Line_terminator_not_permitted_before_arrow: { code: 1200, category: ts.DiagnosticCategory.Error, key: "Line terminator not permitted before arrow." }, - Import_assignment_cannot_be_used_when_targeting_ECMAScript_6_or_higher_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_or_import_d_from_mod_instead: { code: 1202, category: ts.DiagnosticCategory.Error, key: "Import assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"' or 'import d from \"mod\"' instead." }, - Export_assignment_cannot_be_used_when_targeting_ECMAScript_6_or_higher_Consider_using_export_default_instead: { code: 1203, category: ts.DiagnosticCategory.Error, key: "Export assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'export default' instead." }, - Cannot_compile_modules_into_commonjs_amd_system_or_umd_when_targeting_ES6_or_higher: { code: 1204, category: ts.DiagnosticCategory.Error, key: "Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher." }, - Decorators_are_only_available_when_targeting_ECMAScript_5_and_higher: { code: 1205, category: ts.DiagnosticCategory.Error, key: "Decorators are only available when targeting ECMAScript 5 and higher." }, - Decorators_are_not_valid_here: { code: 1206, category: ts.DiagnosticCategory.Error, key: "Decorators are not valid here." }, - Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: { code: 1207, category: ts.DiagnosticCategory.Error, key: "Decorators cannot be applied to multiple get/set accessors of the same name." }, - Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided: { code: 1208, category: ts.DiagnosticCategory.Error, key: "Cannot compile namespaces when the '--isolatedModules' flag is provided." }, - Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided: { code: 1209, category: ts.DiagnosticCategory.Error, key: "Ambient const enums are not allowed when the '--isolatedModules' flag is provided." }, - Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode: { code: 1210, category: ts.DiagnosticCategory.Error, key: "Invalid use of '{0}'. Class definitions are automatically in strict mode." }, - A_class_declaration_without_the_default_modifier_must_have_a_name: { code: 1211, category: ts.DiagnosticCategory.Error, key: "A class declaration without the 'default' modifier must have a name" }, - Identifier_expected_0_is_a_reserved_word_in_strict_mode: { code: 1212, category: ts.DiagnosticCategory.Error, key: "Identifier expected. '{0}' is a reserved word in strict mode" }, - Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: { code: 1213, category: ts.DiagnosticCategory.Error, key: "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode." }, - Type_expected_0_is_a_reserved_word_in_strict_mode: { code: 1215, category: ts.DiagnosticCategory.Error, key: "Type expected. '{0}' is a reserved word in strict mode" }, - Type_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: { code: 1216, category: ts.DiagnosticCategory.Error, key: "Type expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode." }, - Export_assignment_is_not_supported_when_module_flag_is_system: { code: 1218, category: ts.DiagnosticCategory.Error, key: "Export assignment is not supported when '--module' flag is 'system'." }, - Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Specify_experimentalDecorators_to_remove_this_warning: { code: 1219, category: ts.DiagnosticCategory.Error, key: "Experimental support for decorators is a feature that is subject to change in a future release. Specify '--experimentalDecorators' to remove this warning." }, - Generators_are_only_available_when_targeting_ECMAScript_6_or_higher: { code: 1220, category: ts.DiagnosticCategory.Error, key: "Generators are only available when targeting ECMAScript 6 or higher." }, - Generators_are_not_allowed_in_an_ambient_context: { code: 1221, category: ts.DiagnosticCategory.Error, key: "Generators are not allowed in an ambient context." }, - An_overload_signature_cannot_be_declared_as_a_generator: { code: 1222, category: ts.DiagnosticCategory.Error, key: "An overload signature cannot be declared as a generator." }, - _0_tag_already_specified: { code: 1223, category: ts.DiagnosticCategory.Error, key: "'{0}' tag already specified." }, - Signature_0_must_have_a_type_predicate: { code: 1224, category: ts.DiagnosticCategory.Error, key: "Signature '{0}' must have a type predicate." }, - Cannot_find_parameter_0: { code: 1225, category: ts.DiagnosticCategory.Error, key: "Cannot find parameter '{0}'." }, - Type_predicate_0_is_not_assignable_to_1: { code: 1226, category: ts.DiagnosticCategory.Error, key: "Type predicate '{0}' is not assignable to '{1}'." }, - Parameter_0_is_not_in_the_same_position_as_parameter_1: { code: 1227, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' is not in the same position as parameter '{1}'." }, - A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods: { code: 1228, category: ts.DiagnosticCategory.Error, key: "A type predicate is only allowed in return type position for functions and methods." }, - A_type_predicate_cannot_reference_a_rest_parameter: { code: 1229, category: ts.DiagnosticCategory.Error, key: "A type predicate cannot reference a rest parameter." }, - A_type_predicate_cannot_reference_element_0_in_a_binding_pattern: { code: 1230, category: ts.DiagnosticCategory.Error, key: "A type predicate cannot reference element '{0}' in a binding pattern." }, - An_export_assignment_can_only_be_used_in_a_module: { code: 1231, category: ts.DiagnosticCategory.Error, key: "An export assignment can only be used in a module." }, - An_import_declaration_can_only_be_used_in_a_namespace_or_module: { code: 1232, category: ts.DiagnosticCategory.Error, key: "An import declaration can only be used in a namespace or module." }, - An_export_declaration_can_only_be_used_in_a_module: { code: 1233, category: ts.DiagnosticCategory.Error, key: "An export declaration can only be used in a module." }, - An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file: { code: 1234, category: ts.DiagnosticCategory.Error, key: "An ambient module declaration is only allowed at the top level in a file." }, - A_namespace_declaration_is_only_allowed_in_a_namespace_or_module: { code: 1235, category: ts.DiagnosticCategory.Error, key: "A namespace declaration is only allowed in a namespace or module." }, - Duplicate_identifier_0: { code: 2300, category: ts.DiagnosticCategory.Error, key: "Duplicate identifier '{0}'." }, - Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: ts.DiagnosticCategory.Error, key: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." }, - Static_members_cannot_reference_class_type_parameters: { code: 2302, category: ts.DiagnosticCategory.Error, key: "Static members cannot reference class type parameters." }, - Circular_definition_of_import_alias_0: { code: 2303, category: ts.DiagnosticCategory.Error, key: "Circular definition of import alias '{0}'." }, - Cannot_find_name_0: { code: 2304, category: ts.DiagnosticCategory.Error, key: "Cannot find name '{0}'." }, - Module_0_has_no_exported_member_1: { code: 2305, category: ts.DiagnosticCategory.Error, key: "Module '{0}' has no exported member '{1}'." }, - File_0_is_not_a_module: { code: 2306, category: ts.DiagnosticCategory.Error, key: "File '{0}' is not a module." }, - Cannot_find_module_0: { code: 2307, category: ts.DiagnosticCategory.Error, key: "Cannot find module '{0}'." }, - A_module_cannot_have_more_than_one_export_assignment: { code: 2308, category: ts.DiagnosticCategory.Error, key: "A module cannot have more than one export assignment." }, - An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements: { code: 2309, category: ts.DiagnosticCategory.Error, key: "An export assignment cannot be used in a module with other exported elements." }, - Type_0_recursively_references_itself_as_a_base_type: { code: 2310, category: ts.DiagnosticCategory.Error, key: "Type '{0}' recursively references itself as a base type." }, - A_class_may_only_extend_another_class: { code: 2311, category: ts.DiagnosticCategory.Error, key: "A class may only extend another class." }, - An_interface_may_only_extend_a_class_or_another_interface: { code: 2312, category: ts.DiagnosticCategory.Error, key: "An interface may only extend a class or another interface." }, - Constraint_of_a_type_parameter_cannot_reference_any_type_parameter_from_the_same_type_parameter_list: { code: 2313, category: ts.DiagnosticCategory.Error, key: "Constraint of a type parameter cannot reference any type parameter from the same type parameter list." }, - Generic_type_0_requires_1_type_argument_s: { code: 2314, category: ts.DiagnosticCategory.Error, key: "Generic type '{0}' requires {1} type argument(s)." }, - Type_0_is_not_generic: { code: 2315, category: ts.DiagnosticCategory.Error, key: "Type '{0}' is not generic." }, - Global_type_0_must_be_a_class_or_interface_type: { code: 2316, category: ts.DiagnosticCategory.Error, key: "Global type '{0}' must be a class or interface type." }, - Global_type_0_must_have_1_type_parameter_s: { code: 2317, category: ts.DiagnosticCategory.Error, key: "Global type '{0}' must have {1} type parameter(s)." }, - Cannot_find_global_type_0: { code: 2318, category: ts.DiagnosticCategory.Error, key: "Cannot find global type '{0}'." }, - Named_property_0_of_types_1_and_2_are_not_identical: { code: 2319, category: ts.DiagnosticCategory.Error, key: "Named property '{0}' of types '{1}' and '{2}' are not identical." }, - Interface_0_cannot_simultaneously_extend_types_1_and_2: { code: 2320, category: ts.DiagnosticCategory.Error, key: "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'." }, - Excessive_stack_depth_comparing_types_0_and_1: { code: 2321, category: ts.DiagnosticCategory.Error, key: "Excessive stack depth comparing types '{0}' and '{1}'." }, - Type_0_is_not_assignable_to_type_1: { code: 2322, category: ts.DiagnosticCategory.Error, key: "Type '{0}' is not assignable to type '{1}'." }, - Property_0_is_missing_in_type_1: { code: 2324, category: ts.DiagnosticCategory.Error, key: "Property '{0}' is missing in type '{1}'." }, - Property_0_is_private_in_type_1_but_not_in_type_2: { code: 2325, category: ts.DiagnosticCategory.Error, key: "Property '{0}' is private in type '{1}' but not in type '{2}'." }, - Types_of_property_0_are_incompatible: { code: 2326, category: ts.DiagnosticCategory.Error, key: "Types of property '{0}' are incompatible." }, - Property_0_is_optional_in_type_1_but_required_in_type_2: { code: 2327, category: ts.DiagnosticCategory.Error, key: "Property '{0}' is optional in type '{1}' but required in type '{2}'." }, - Types_of_parameters_0_and_1_are_incompatible: { code: 2328, category: ts.DiagnosticCategory.Error, key: "Types of parameters '{0}' and '{1}' are incompatible." }, - Index_signature_is_missing_in_type_0: { code: 2329, category: ts.DiagnosticCategory.Error, key: "Index signature is missing in type '{0}'." }, - Index_signatures_are_incompatible: { code: 2330, category: ts.DiagnosticCategory.Error, key: "Index signatures are incompatible." }, - this_cannot_be_referenced_in_a_module_or_namespace_body: { code: 2331, category: ts.DiagnosticCategory.Error, key: "'this' cannot be referenced in a module or namespace body." }, - this_cannot_be_referenced_in_current_location: { code: 2332, category: ts.DiagnosticCategory.Error, key: "'this' cannot be referenced in current location." }, - this_cannot_be_referenced_in_constructor_arguments: { code: 2333, category: ts.DiagnosticCategory.Error, key: "'this' cannot be referenced in constructor arguments." }, - this_cannot_be_referenced_in_a_static_property_initializer: { code: 2334, category: ts.DiagnosticCategory.Error, key: "'this' cannot be referenced in a static property initializer." }, - super_can_only_be_referenced_in_a_derived_class: { code: 2335, category: ts.DiagnosticCategory.Error, key: "'super' can only be referenced in a derived class." }, - super_cannot_be_referenced_in_constructor_arguments: { code: 2336, category: ts.DiagnosticCategory.Error, key: "'super' cannot be referenced in constructor arguments." }, - Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors: { code: 2337, category: ts.DiagnosticCategory.Error, key: "Super calls are not permitted outside constructors or in nested functions inside constructors" }, - super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class: { code: 2338, category: ts.DiagnosticCategory.Error, key: "'super' property access is permitted only in a constructor, member function, or member accessor of a derived class" }, - Property_0_does_not_exist_on_type_1: { code: 2339, category: ts.DiagnosticCategory.Error, key: "Property '{0}' does not exist on type '{1}'." }, - Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword: { code: 2340, category: ts.DiagnosticCategory.Error, key: "Only public and protected methods of the base class are accessible via the 'super' keyword" }, - Property_0_is_private_and_only_accessible_within_class_1: { code: 2341, category: ts.DiagnosticCategory.Error, key: "Property '{0}' is private and only accessible within class '{1}'." }, - An_index_expression_argument_must_be_of_type_string_number_symbol_or_any: { code: 2342, category: ts.DiagnosticCategory.Error, key: "An index expression argument must be of type 'string', 'number', 'symbol, or 'any'." }, - Type_0_does_not_satisfy_the_constraint_1: { code: 2344, category: ts.DiagnosticCategory.Error, key: "Type '{0}' does not satisfy the constraint '{1}'." }, - Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: { code: 2345, category: ts.DiagnosticCategory.Error, key: "Argument of type '{0}' is not assignable to parameter of type '{1}'." }, - Supplied_parameters_do_not_match_any_signature_of_call_target: { code: 2346, category: ts.DiagnosticCategory.Error, key: "Supplied parameters do not match any signature of call target." }, - Untyped_function_calls_may_not_accept_type_arguments: { code: 2347, category: ts.DiagnosticCategory.Error, key: "Untyped function calls may not accept type arguments." }, - Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: { code: 2348, category: ts.DiagnosticCategory.Error, key: "Value of type '{0}' is not callable. Did you mean to include 'new'?" }, - Cannot_invoke_an_expression_whose_type_lacks_a_call_signature: { code: 2349, category: ts.DiagnosticCategory.Error, key: "Cannot invoke an expression whose type lacks a call signature." }, - Only_a_void_function_can_be_called_with_the_new_keyword: { code: 2350, category: ts.DiagnosticCategory.Error, key: "Only a void function can be called with the 'new' keyword." }, - Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature: { code: 2351, category: ts.DiagnosticCategory.Error, key: "Cannot use 'new' with an expression whose type lacks a call or construct signature." }, - Neither_type_0_nor_type_1_is_assignable_to_the_other: { code: 2352, category: ts.DiagnosticCategory.Error, key: "Neither type '{0}' nor type '{1}' is assignable to the other." }, - No_best_common_type_exists_among_return_expressions: { code: 2354, category: ts.DiagnosticCategory.Error, key: "No best common type exists among return expressions." }, - A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_or_consist_of_a_single_throw_statement: { code: 2355, category: ts.DiagnosticCategory.Error, key: "A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement." }, - An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type: { code: 2356, category: ts.DiagnosticCategory.Error, key: "An arithmetic operand must be of type 'any', 'number' or an enum type." }, - The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer: { code: 2357, category: ts.DiagnosticCategory.Error, key: "The operand of an increment or decrement operator must be a variable, property or indexer." }, - The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2358, category: ts.DiagnosticCategory.Error, key: "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter." }, - The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type: { code: 2359, category: ts.DiagnosticCategory.Error, key: "The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type." }, - The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol: { code: 2360, category: ts.DiagnosticCategory.Error, key: "The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'." }, - The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2361, category: ts.DiagnosticCategory.Error, key: "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter" }, - The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2362, category: ts.DiagnosticCategory.Error, key: "The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." }, - The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2363, category: ts.DiagnosticCategory.Error, key: "The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." }, - Invalid_left_hand_side_of_assignment_expression: { code: 2364, category: ts.DiagnosticCategory.Error, key: "Invalid left-hand side of assignment expression." }, - Operator_0_cannot_be_applied_to_types_1_and_2: { code: 2365, category: ts.DiagnosticCategory.Error, key: "Operator '{0}' cannot be applied to types '{1}' and '{2}'." }, - Type_parameter_name_cannot_be_0: { code: 2368, category: ts.DiagnosticCategory.Error, key: "Type parameter name cannot be '{0}'" }, - A_parameter_property_is_only_allowed_in_a_constructor_implementation: { code: 2369, category: ts.DiagnosticCategory.Error, key: "A parameter property is only allowed in a constructor implementation." }, - A_rest_parameter_must_be_of_an_array_type: { code: 2370, category: ts.DiagnosticCategory.Error, key: "A rest parameter must be of an array type." }, - A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation: { code: 2371, category: ts.DiagnosticCategory.Error, key: "A parameter initializer is only allowed in a function or constructor implementation." }, - Parameter_0_cannot_be_referenced_in_its_initializer: { code: 2372, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' cannot be referenced in its initializer." }, - Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it: { code: 2373, category: ts.DiagnosticCategory.Error, key: "Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it." }, - Duplicate_string_index_signature: { code: 2374, category: ts.DiagnosticCategory.Error, key: "Duplicate string index signature." }, - Duplicate_number_index_signature: { code: 2375, category: ts.DiagnosticCategory.Error, key: "Duplicate number index signature." }, - A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties: { code: 2376, category: ts.DiagnosticCategory.Error, key: "A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties." }, - Constructors_for_derived_classes_must_contain_a_super_call: { code: 2377, category: ts.DiagnosticCategory.Error, key: "Constructors for derived classes must contain a 'super' call." }, - A_get_accessor_must_return_a_value_or_consist_of_a_single_throw_statement: { code: 2378, category: ts.DiagnosticCategory.Error, key: "A 'get' accessor must return a value or consist of a single 'throw' statement." }, - Getter_and_setter_accessors_do_not_agree_in_visibility: { code: 2379, category: ts.DiagnosticCategory.Error, key: "Getter and setter accessors do not agree in visibility." }, - get_and_set_accessor_must_have_the_same_type: { code: 2380, category: ts.DiagnosticCategory.Error, key: "'get' and 'set' accessor must have the same type." }, - A_signature_with_an_implementation_cannot_use_a_string_literal_type: { code: 2381, category: ts.DiagnosticCategory.Error, key: "A signature with an implementation cannot use a string literal type." }, - Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature: { code: 2382, category: ts.DiagnosticCategory.Error, key: "Specialized overload signature is not assignable to any non-specialized signature." }, - Overload_signatures_must_all_be_exported_or_not_exported: { code: 2383, category: ts.DiagnosticCategory.Error, key: "Overload signatures must all be exported or not exported." }, - Overload_signatures_must_all_be_ambient_or_non_ambient: { code: 2384, category: ts.DiagnosticCategory.Error, key: "Overload signatures must all be ambient or non-ambient." }, - Overload_signatures_must_all_be_public_private_or_protected: { code: 2385, category: ts.DiagnosticCategory.Error, key: "Overload signatures must all be public, private or protected." }, - Overload_signatures_must_all_be_optional_or_required: { code: 2386, category: ts.DiagnosticCategory.Error, key: "Overload signatures must all be optional or required." }, - Function_overload_must_be_static: { code: 2387, category: ts.DiagnosticCategory.Error, key: "Function overload must be static." }, - Function_overload_must_not_be_static: { code: 2388, category: ts.DiagnosticCategory.Error, key: "Function overload must not be static." }, - Function_implementation_name_must_be_0: { code: 2389, category: ts.DiagnosticCategory.Error, key: "Function implementation name must be '{0}'." }, - Constructor_implementation_is_missing: { code: 2390, category: ts.DiagnosticCategory.Error, key: "Constructor implementation is missing." }, - Function_implementation_is_missing_or_not_immediately_following_the_declaration: { code: 2391, category: ts.DiagnosticCategory.Error, key: "Function implementation is missing or not immediately following the declaration." }, - Multiple_constructor_implementations_are_not_allowed: { code: 2392, category: ts.DiagnosticCategory.Error, key: "Multiple constructor implementations are not allowed." }, - Duplicate_function_implementation: { code: 2393, category: ts.DiagnosticCategory.Error, key: "Duplicate function implementation." }, - Overload_signature_is_not_compatible_with_function_implementation: { code: 2394, category: ts.DiagnosticCategory.Error, key: "Overload signature is not compatible with function implementation." }, - Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local: { code: 2395, category: ts.DiagnosticCategory.Error, key: "Individual declarations in merged declaration {0} must be all exported or all local." }, - Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters: { code: 2396, category: ts.DiagnosticCategory.Error, key: "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters." }, - Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference: { code: 2399, category: ts.DiagnosticCategory.Error, key: "Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference." }, - Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference: { code: 2400, category: ts.DiagnosticCategory.Error, key: "Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference." }, - Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference: { code: 2401, category: ts.DiagnosticCategory.Error, key: "Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference." }, - Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference: { code: 2402, category: ts.DiagnosticCategory.Error, key: "Expression resolves to '_super' that compiler uses to capture base class reference." }, - Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2: { code: 2403, category: ts.DiagnosticCategory.Error, key: "Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'." }, - The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation: { code: 2404, category: ts.DiagnosticCategory.Error, key: "The left-hand side of a 'for...in' statement cannot use a type annotation." }, - The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any: { code: 2405, category: ts.DiagnosticCategory.Error, key: "The left-hand side of a 'for...in' statement must be of type 'string' or 'any'." }, - Invalid_left_hand_side_in_for_in_statement: { code: 2406, category: ts.DiagnosticCategory.Error, key: "Invalid left-hand side in 'for...in' statement." }, - The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2407, category: ts.DiagnosticCategory.Error, key: "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter." }, - Setters_cannot_return_a_value: { code: 2408, category: ts.DiagnosticCategory.Error, key: "Setters cannot return a value." }, - Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: { code: 2409, category: ts.DiagnosticCategory.Error, key: "Return type of constructor signature must be assignable to the instance type of the class" }, - All_symbols_within_a_with_block_will_be_resolved_to_any: { code: 2410, category: ts.DiagnosticCategory.Error, key: "All symbols within a 'with' block will be resolved to 'any'." }, - Property_0_of_type_1_is_not_assignable_to_string_index_type_2: { code: 2411, category: ts.DiagnosticCategory.Error, key: "Property '{0}' of type '{1}' is not assignable to string index type '{2}'." }, - Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2: { code: 2412, category: ts.DiagnosticCategory.Error, key: "Property '{0}' of type '{1}' is not assignable to numeric index type '{2}'." }, - Numeric_index_type_0_is_not_assignable_to_string_index_type_1: { code: 2413, category: ts.DiagnosticCategory.Error, key: "Numeric index type '{0}' is not assignable to string index type '{1}'." }, - Class_name_cannot_be_0: { code: 2414, category: ts.DiagnosticCategory.Error, key: "Class name cannot be '{0}'" }, - Class_0_incorrectly_extends_base_class_1: { code: 2415, category: ts.DiagnosticCategory.Error, key: "Class '{0}' incorrectly extends base class '{1}'." }, - Class_static_side_0_incorrectly_extends_base_class_static_side_1: { code: 2417, category: ts.DiagnosticCategory.Error, key: "Class static side '{0}' incorrectly extends base class static side '{1}'." }, - Type_name_0_in_extends_clause_does_not_reference_constructor_function_for_0: { code: 2419, category: ts.DiagnosticCategory.Error, key: "Type name '{0}' in extends clause does not reference constructor function for '{0}'." }, - Class_0_incorrectly_implements_interface_1: { code: 2420, category: ts.DiagnosticCategory.Error, key: "Class '{0}' incorrectly implements interface '{1}'." }, - A_class_may_only_implement_another_class_or_interface: { code: 2422, category: ts.DiagnosticCategory.Error, key: "A class may only implement another class or interface." }, - Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: { code: 2423, category: ts.DiagnosticCategory.Error, key: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor." }, - Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property: { code: 2424, category: ts.DiagnosticCategory.Error, key: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property." }, - Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2425, category: ts.DiagnosticCategory.Error, key: "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function." }, - Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2426, category: ts.DiagnosticCategory.Error, key: "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function." }, - Interface_name_cannot_be_0: { code: 2427, category: ts.DiagnosticCategory.Error, key: "Interface name cannot be '{0}'" }, - All_declarations_of_an_interface_must_have_identical_type_parameters: { code: 2428, category: ts.DiagnosticCategory.Error, key: "All declarations of an interface must have identical type parameters." }, - Interface_0_incorrectly_extends_interface_1: { code: 2430, category: ts.DiagnosticCategory.Error, key: "Interface '{0}' incorrectly extends interface '{1}'." }, - Enum_name_cannot_be_0: { code: 2431, category: ts.DiagnosticCategory.Error, key: "Enum name cannot be '{0}'" }, - In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: { code: 2432, category: ts.DiagnosticCategory.Error, key: "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element." }, - A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: { code: 2433, category: ts.DiagnosticCategory.Error, key: "A namespace declaration cannot be in a different file from a class or function with which it is merged" }, - A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: { code: 2434, category: ts.DiagnosticCategory.Error, key: "A namespace declaration cannot be located prior to a class or function with which it is merged" }, - Ambient_modules_cannot_be_nested_in_other_modules: { code: 2435, category: ts.DiagnosticCategory.Error, key: "Ambient modules cannot be nested in other modules." }, - Ambient_module_declaration_cannot_specify_relative_module_name: { code: 2436, category: ts.DiagnosticCategory.Error, key: "Ambient module declaration cannot specify relative module name." }, - Module_0_is_hidden_by_a_local_declaration_with_the_same_name: { code: 2437, category: ts.DiagnosticCategory.Error, key: "Module '{0}' is hidden by a local declaration with the same name" }, - Import_name_cannot_be_0: { code: 2438, category: ts.DiagnosticCategory.Error, key: "Import name cannot be '{0}'" }, - Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name: { code: 2439, category: ts.DiagnosticCategory.Error, key: "Import or export declaration in an ambient module declaration cannot reference module through relative module name." }, - Import_declaration_conflicts_with_local_declaration_of_0: { code: 2440, category: ts.DiagnosticCategory.Error, key: "Import declaration conflicts with local declaration of '{0}'" }, - Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module: { code: 2441, category: ts.DiagnosticCategory.Error, key: "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module." }, - Types_have_separate_declarations_of_a_private_property_0: { code: 2442, category: ts.DiagnosticCategory.Error, key: "Types have separate declarations of a private property '{0}'." }, - Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2: { code: 2443, category: ts.DiagnosticCategory.Error, key: "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'." }, - Property_0_is_protected_in_type_1_but_public_in_type_2: { code: 2444, category: ts.DiagnosticCategory.Error, key: "Property '{0}' is protected in type '{1}' but public in type '{2}'." }, - Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses: { code: 2445, category: ts.DiagnosticCategory.Error, key: "Property '{0}' is protected and only accessible within class '{1}' and its subclasses." }, - Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1: { code: 2446, category: ts.DiagnosticCategory.Error, key: "Property '{0}' is protected and only accessible through an instance of class '{1}'." }, - The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead: { code: 2447, category: ts.DiagnosticCategory.Error, key: "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead." }, - Block_scoped_variable_0_used_before_its_declaration: { code: 2448, category: ts.DiagnosticCategory.Error, key: "Block-scoped variable '{0}' used before its declaration." }, - The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant: { code: 2449, category: ts.DiagnosticCategory.Error, key: "The operand of an increment or decrement operator cannot be a constant." }, - Left_hand_side_of_assignment_expression_cannot_be_a_constant: { code: 2450, category: ts.DiagnosticCategory.Error, key: "Left-hand side of assignment expression cannot be a constant." }, - Cannot_redeclare_block_scoped_variable_0: { code: 2451, category: ts.DiagnosticCategory.Error, key: "Cannot redeclare block-scoped variable '{0}'." }, - An_enum_member_cannot_have_a_numeric_name: { code: 2452, category: ts.DiagnosticCategory.Error, key: "An enum member cannot have a numeric name." }, - The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly: { code: 2453, category: ts.DiagnosticCategory.Error, key: "The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly." }, - Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0: { code: 2455, category: ts.DiagnosticCategory.Error, key: "Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'." }, - Type_alias_0_circularly_references_itself: { code: 2456, category: ts.DiagnosticCategory.Error, key: "Type alias '{0}' circularly references itself." }, - Type_alias_name_cannot_be_0: { code: 2457, category: ts.DiagnosticCategory.Error, key: "Type alias name cannot be '{0}'" }, - An_AMD_module_cannot_have_multiple_name_assignments: { code: 2458, category: ts.DiagnosticCategory.Error, key: "An AMD module cannot have multiple name assignments." }, - Type_0_has_no_property_1_and_no_string_index_signature: { code: 2459, category: ts.DiagnosticCategory.Error, key: "Type '{0}' has no property '{1}' and no string index signature." }, - Type_0_has_no_property_1: { code: 2460, category: ts.DiagnosticCategory.Error, key: "Type '{0}' has no property '{1}'." }, - Type_0_is_not_an_array_type: { code: 2461, category: ts.DiagnosticCategory.Error, key: "Type '{0}' is not an array type." }, - A_rest_element_must_be_last_in_an_array_destructuring_pattern: { code: 2462, category: ts.DiagnosticCategory.Error, key: "A rest element must be last in an array destructuring pattern" }, - A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature: { code: 2463, category: ts.DiagnosticCategory.Error, key: "A binding pattern parameter cannot be optional in an implementation signature." }, - A_computed_property_name_must_be_of_type_string_number_symbol_or_any: { code: 2464, category: ts.DiagnosticCategory.Error, key: "A computed property name must be of type 'string', 'number', 'symbol', or 'any'." }, - this_cannot_be_referenced_in_a_computed_property_name: { code: 2465, category: ts.DiagnosticCategory.Error, key: "'this' cannot be referenced in a computed property name." }, - super_cannot_be_referenced_in_a_computed_property_name: { code: 2466, category: ts.DiagnosticCategory.Error, key: "'super' cannot be referenced in a computed property name." }, - A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type: { code: 2467, category: ts.DiagnosticCategory.Error, key: "A computed property name cannot reference a type parameter from its containing type." }, - Cannot_find_global_value_0: { code: 2468, category: ts.DiagnosticCategory.Error, key: "Cannot find global value '{0}'." }, - The_0_operator_cannot_be_applied_to_type_symbol: { code: 2469, category: ts.DiagnosticCategory.Error, key: "The '{0}' operator cannot be applied to type 'symbol'." }, - Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object: { code: 2470, category: ts.DiagnosticCategory.Error, key: "'Symbol' reference does not refer to the global Symbol constructor object." }, - A_computed_property_name_of_the_form_0_must_be_of_type_symbol: { code: 2471, category: ts.DiagnosticCategory.Error, key: "A computed property name of the form '{0}' must be of type 'symbol'." }, - Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher: { code: 2472, category: ts.DiagnosticCategory.Error, key: "Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher." }, - Enum_declarations_must_all_be_const_or_non_const: { code: 2473, category: ts.DiagnosticCategory.Error, key: "Enum declarations must all be const or non-const." }, - In_const_enum_declarations_member_initializer_must_be_constant_expression: { code: 2474, category: ts.DiagnosticCategory.Error, key: "In 'const' enum declarations member initializer must be constant expression." }, - const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment: { code: 2475, category: ts.DiagnosticCategory.Error, key: "'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment." }, - A_const_enum_member_can_only_be_accessed_using_a_string_literal: { code: 2476, category: ts.DiagnosticCategory.Error, key: "A const enum member can only be accessed using a string literal." }, - const_enum_member_initializer_was_evaluated_to_a_non_finite_value: { code: 2477, category: ts.DiagnosticCategory.Error, key: "'const' enum member initializer was evaluated to a non-finite value." }, - const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN: { code: 2478, category: ts.DiagnosticCategory.Error, key: "'const' enum member initializer was evaluated to disallowed value 'NaN'." }, - Property_0_does_not_exist_on_const_enum_1: { code: 2479, category: ts.DiagnosticCategory.Error, key: "Property '{0}' does not exist on 'const' enum '{1}'." }, - let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: { code: 2480, category: ts.DiagnosticCategory.Error, key: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." }, - Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: { code: 2481, category: ts.DiagnosticCategory.Error, key: "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'." }, - The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: { code: 2483, category: ts.DiagnosticCategory.Error, key: "The left-hand side of a 'for...of' statement cannot use a type annotation." }, - Export_declaration_conflicts_with_exported_declaration_of_0: { code: 2484, category: ts.DiagnosticCategory.Error, key: "Export declaration conflicts with exported declaration of '{0}'" }, - The_left_hand_side_of_a_for_of_statement_cannot_be_a_previously_defined_constant: { code: 2485, category: ts.DiagnosticCategory.Error, key: "The left-hand side of a 'for...of' statement cannot be a previously defined constant." }, - The_left_hand_side_of_a_for_in_statement_cannot_be_a_previously_defined_constant: { code: 2486, category: ts.DiagnosticCategory.Error, key: "The left-hand side of a 'for...in' statement cannot be a previously defined constant." }, - Invalid_left_hand_side_in_for_of_statement: { code: 2487, category: ts.DiagnosticCategory.Error, key: "Invalid left-hand side in 'for...of' statement." }, - Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator: { code: 2488, category: ts.DiagnosticCategory.Error, key: "Type must have a '[Symbol.iterator]()' method that returns an iterator." }, - An_iterator_must_have_a_next_method: { code: 2489, category: ts.DiagnosticCategory.Error, key: "An iterator must have a 'next()' method." }, - The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property: { code: 2490, category: ts.DiagnosticCategory.Error, key: "The type returned by the 'next()' method of an iterator must have a 'value' property." }, - The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern: { code: 2491, category: ts.DiagnosticCategory.Error, key: "The left-hand side of a 'for...in' statement cannot be a destructuring pattern." }, - Cannot_redeclare_identifier_0_in_catch_clause: { code: 2492, category: ts.DiagnosticCategory.Error, key: "Cannot redeclare identifier '{0}' in catch clause" }, - Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2: { code: 2493, category: ts.DiagnosticCategory.Error, key: "Tuple type '{0}' with length '{1}' cannot be assigned to tuple with length '{2}'." }, - Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher: { code: 2494, category: ts.DiagnosticCategory.Error, key: "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher." }, - Type_0_is_not_an_array_type_or_a_string_type: { code: 2495, category: ts.DiagnosticCategory.Error, key: "Type '{0}' is not an array type or a string type." }, - The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression: { code: 2496, category: ts.DiagnosticCategory.Error, key: "The 'arguments' object cannot be referenced in an arrow function in ES3 and ES5. Consider using a standard function expression." }, - Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct: { code: 2497, category: ts.DiagnosticCategory.Error, key: "Module '{0}' resolves to a non-module entity and cannot be imported using this construct." }, - Module_0_uses_export_and_cannot_be_used_with_export_Asterisk: { code: 2498, category: ts.DiagnosticCategory.Error, key: "Module '{0}' uses 'export =' and cannot be used with 'export *'." }, - An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments: { code: 2499, category: ts.DiagnosticCategory.Error, key: "An interface can only extend an identifier/qualified-name with optional type arguments." }, - A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments: { code: 2500, category: ts.DiagnosticCategory.Error, key: "A class can only implement an identifier/qualified-name with optional type arguments." }, - A_rest_element_cannot_contain_a_binding_pattern: { code: 2501, category: ts.DiagnosticCategory.Error, key: "A rest element cannot contain a binding pattern." }, - _0_is_referenced_directly_or_indirectly_in_its_own_type_annotation: { code: 2502, category: ts.DiagnosticCategory.Error, key: "'{0}' is referenced directly or indirectly in its own type annotation." }, - Cannot_find_namespace_0: { code: 2503, category: ts.DiagnosticCategory.Error, key: "Cannot find namespace '{0}'." }, - No_best_common_type_exists_among_yield_expressions: { code: 2504, category: ts.DiagnosticCategory.Error, key: "No best common type exists among yield expressions." }, - A_generator_cannot_have_a_void_type_annotation: { code: 2505, category: ts.DiagnosticCategory.Error, key: "A generator cannot have a 'void' type annotation." }, - Import_declaration_0_is_using_private_name_1: { code: 4000, category: ts.DiagnosticCategory.Error, key: "Import declaration '{0}' is using private name '{1}'." }, - Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: ts.DiagnosticCategory.Error, key: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, - Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: ts.DiagnosticCategory.Error, key: "Type parameter '{0}' of exported interface has or is using private name '{1}'." }, - Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4006, category: ts.DiagnosticCategory.Error, key: "Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'." }, - Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4008, category: ts.DiagnosticCategory.Error, key: "Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'." }, - Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: { code: 4010, category: ts.DiagnosticCategory.Error, key: "Type parameter '{0}' of public static method from exported class has or is using private name '{1}'." }, - Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: { code: 4012, category: ts.DiagnosticCategory.Error, key: "Type parameter '{0}' of public method from exported class has or is using private name '{1}'." }, - Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: { code: 4014, category: ts.DiagnosticCategory.Error, key: "Type parameter '{0}' of method from exported interface has or is using private name '{1}'." }, - Type_parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4016, category: ts.DiagnosticCategory.Error, key: "Type parameter '{0}' of exported function has or is using private name '{1}'." }, - Implements_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4019, category: ts.DiagnosticCategory.Error, key: "Implements clause of exported class '{0}' has or is using private name '{1}'." }, - Extends_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4020, category: ts.DiagnosticCategory.Error, key: "Extends clause of exported class '{0}' has or is using private name '{1}'." }, - Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: { code: 4022, category: ts.DiagnosticCategory.Error, key: "Extends clause of exported interface '{0}' has or is using private name '{1}'." }, - Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4023, category: ts.DiagnosticCategory.Error, key: "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named." }, - Exported_variable_0_has_or_is_using_name_1_from_private_module_2: { code: 4024, category: ts.DiagnosticCategory.Error, key: "Exported variable '{0}' has or is using name '{1}' from private module '{2}'." }, - Exported_variable_0_has_or_is_using_private_name_1: { code: 4025, category: ts.DiagnosticCategory.Error, key: "Exported variable '{0}' has or is using private name '{1}'." }, - Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4026, category: ts.DiagnosticCategory.Error, key: "Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named." }, - Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4027, category: ts.DiagnosticCategory.Error, key: "Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'." }, - Public_static_property_0_of_exported_class_has_or_is_using_private_name_1: { code: 4028, category: ts.DiagnosticCategory.Error, key: "Public static property '{0}' of exported class has or is using private name '{1}'." }, - Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4029, category: ts.DiagnosticCategory.Error, key: "Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named." }, - Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4030, category: ts.DiagnosticCategory.Error, key: "Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'." }, - Public_property_0_of_exported_class_has_or_is_using_private_name_1: { code: 4031, category: ts.DiagnosticCategory.Error, key: "Public property '{0}' of exported class has or is using private name '{1}'." }, - Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4032, category: ts.DiagnosticCategory.Error, key: "Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'." }, - Property_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4033, category: ts.DiagnosticCategory.Error, key: "Property '{0}' of exported interface has or is using private name '{1}'." }, - Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4034, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public static property setter from exported class has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_name_1: { code: 4035, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public static property setter from exported class has or is using private name '{1}'." }, - Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4036, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public property setter from exported class has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_name_1: { code: 4037, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public property setter from exported class has or is using private name '{1}'." }, - Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4038, category: ts.DiagnosticCategory.Error, key: "Return type of public static property getter from exported class has or is using name '{0}' from external module {1} but cannot be named." }, - Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4039, category: ts.DiagnosticCategory.Error, key: "Return type of public static property getter from exported class has or is using name '{0}' from private module '{1}'." }, - Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_name_0: { code: 4040, category: ts.DiagnosticCategory.Error, key: "Return type of public static property getter from exported class has or is using private name '{0}'." }, - Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4041, category: ts.DiagnosticCategory.Error, key: "Return type of public property getter from exported class has or is using name '{0}' from external module {1} but cannot be named." }, - Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4042, category: ts.DiagnosticCategory.Error, key: "Return type of public property getter from exported class has or is using name '{0}' from private module '{1}'." }, - Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_name_0: { code: 4043, category: ts.DiagnosticCategory.Error, key: "Return type of public property getter from exported class has or is using private name '{0}'." }, - Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4044, category: ts.DiagnosticCategory.Error, key: "Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'." }, - Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0: { code: 4045, category: ts.DiagnosticCategory.Error, key: "Return type of constructor signature from exported interface has or is using private name '{0}'." }, - Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4046, category: ts.DiagnosticCategory.Error, key: "Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'." }, - Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0: { code: 4047, category: ts.DiagnosticCategory.Error, key: "Return type of call signature from exported interface has or is using private name '{0}'." }, - Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4048, category: ts.DiagnosticCategory.Error, key: "Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'." }, - Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0: { code: 4049, category: ts.DiagnosticCategory.Error, key: "Return type of index signature from exported interface has or is using private name '{0}'." }, - Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4050, category: ts.DiagnosticCategory.Error, key: "Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named." }, - Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4051, category: ts.DiagnosticCategory.Error, key: "Return type of public static method from exported class has or is using name '{0}' from private module '{1}'." }, - Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0: { code: 4052, category: ts.DiagnosticCategory.Error, key: "Return type of public static method from exported class has or is using private name '{0}'." }, - Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4053, category: ts.DiagnosticCategory.Error, key: "Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named." }, - Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4054, category: ts.DiagnosticCategory.Error, key: "Return type of public method from exported class has or is using name '{0}' from private module '{1}'." }, - Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0: { code: 4055, category: ts.DiagnosticCategory.Error, key: "Return type of public method from exported class has or is using private name '{0}'." }, - Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4056, category: ts.DiagnosticCategory.Error, key: "Return type of method from exported interface has or is using name '{0}' from private module '{1}'." }, - Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0: { code: 4057, category: ts.DiagnosticCategory.Error, key: "Return type of method from exported interface has or is using private name '{0}'." }, - Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4058, category: ts.DiagnosticCategory.Error, key: "Return type of exported function has or is using name '{0}' from external module {1} but cannot be named." }, - Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1: { code: 4059, category: ts.DiagnosticCategory.Error, key: "Return type of exported function has or is using name '{0}' from private module '{1}'." }, - Return_type_of_exported_function_has_or_is_using_private_name_0: { code: 4060, category: ts.DiagnosticCategory.Error, key: "Return type of exported function has or is using private name '{0}'." }, - Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4061, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named." }, - Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4062, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1: { code: 4063, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of constructor from exported class has or is using private name '{1}'." }, - Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4064, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4065, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'." }, - Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4066, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4067, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of call signature from exported interface has or is using private name '{1}'." }, - Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4068, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named." }, - Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4069, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: { code: 4070, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public static method from exported class has or is using private name '{1}'." }, - Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4071, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named." }, - Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4072, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: { code: 4073, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public method from exported class has or is using private name '{1}'." }, - Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4074, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: { code: 4075, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of method from exported interface has or is using private name '{1}'." }, - Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4076, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named." }, - Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: { code: 4077, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4078, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of exported function has or is using private name '{1}'." }, - Exported_type_alias_0_has_or_is_using_private_name_1: { code: 4081, category: ts.DiagnosticCategory.Error, key: "Exported type alias '{0}' has or is using private name '{1}'." }, - Default_export_of_the_module_has_or_is_using_private_name_0: { code: 4082, category: ts.DiagnosticCategory.Error, key: "Default export of the module has or is using private name '{0}'." }, - Loop_contains_block_scoped_variable_0_referenced_by_a_function_in_the_loop_This_is_only_supported_in_ECMAScript_6_or_higher: { code: 4091, category: ts.DiagnosticCategory.Error, key: "Loop contains block-scoped variable '{0}' referenced by a function in the loop. This is only supported in ECMAScript 6 or higher." }, - The_current_host_does_not_support_the_0_option: { code: 5001, category: ts.DiagnosticCategory.Error, key: "The current host does not support the '{0}' option." }, - Cannot_find_the_common_subdirectory_path_for_the_input_files: { code: 5009, category: ts.DiagnosticCategory.Error, key: "Cannot find the common subdirectory path for the input files." }, - Cannot_read_file_0_Colon_1: { code: 5012, category: ts.DiagnosticCategory.Error, key: "Cannot read file '{0}': {1}" }, - Unsupported_file_encoding: { code: 5013, category: ts.DiagnosticCategory.Error, key: "Unsupported file encoding." }, - Failed_to_parse_file_0_Colon_1: { code: 5014, category: ts.DiagnosticCategory.Error, key: "Failed to parse file '{0}': {1}." }, - Unknown_compiler_option_0: { code: 5023, category: ts.DiagnosticCategory.Error, key: "Unknown compiler option '{0}'." }, - Compiler_option_0_requires_a_value_of_type_1: { code: 5024, category: ts.DiagnosticCategory.Error, key: "Compiler option '{0}' requires a value of type {1}." }, - Could_not_write_file_0_Colon_1: { code: 5033, category: ts.DiagnosticCategory.Error, key: "Could not write file '{0}': {1}" }, - Option_mapRoot_cannot_be_specified_without_specifying_sourceMap_option: { code: 5038, category: ts.DiagnosticCategory.Error, key: "Option 'mapRoot' cannot be specified without specifying 'sourceMap' option." }, - Option_sourceRoot_cannot_be_specified_without_specifying_sourceMap_option: { code: 5039, category: ts.DiagnosticCategory.Error, key: "Option 'sourceRoot' cannot be specified without specifying 'sourceMap' option." }, - Option_noEmit_cannot_be_specified_with_option_out_or_outDir: { code: 5040, category: ts.DiagnosticCategory.Error, key: "Option 'noEmit' cannot be specified with option 'out' or 'outDir'." }, - Option_noEmit_cannot_be_specified_with_option_declaration: { code: 5041, category: ts.DiagnosticCategory.Error, key: "Option 'noEmit' cannot be specified with option 'declaration'." }, - Option_project_cannot_be_mixed_with_source_files_on_a_command_line: { code: 5042, category: ts.DiagnosticCategory.Error, key: "Option 'project' cannot be mixed with source files on a command line." }, - Option_sourceMap_cannot_be_specified_with_option_isolatedModules: { code: 5043, category: ts.DiagnosticCategory.Error, key: "Option 'sourceMap' cannot be specified with option 'isolatedModules'." }, - Option_declaration_cannot_be_specified_with_option_isolatedModules: { code: 5044, category: ts.DiagnosticCategory.Error, key: "Option 'declaration' cannot be specified with option 'isolatedModules'." }, - Option_noEmitOnError_cannot_be_specified_with_option_isolatedModules: { code: 5045, category: ts.DiagnosticCategory.Error, key: "Option 'noEmitOnError' cannot be specified with option 'isolatedModules'." }, - Option_out_cannot_be_specified_with_option_isolatedModules: { code: 5046, category: ts.DiagnosticCategory.Error, key: "Option 'out' cannot be specified with option 'isolatedModules'." }, - Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES6_or_higher: { code: 5047, category: ts.DiagnosticCategory.Error, key: "Option 'isolatedModules' can only be used when either option'--module' is provided or option 'target' is 'ES6' or higher." }, - Option_sourceMap_cannot_be_specified_with_option_inlineSourceMap: { code: 5048, category: ts.DiagnosticCategory.Error, key: "Option 'sourceMap' cannot be specified with option 'inlineSourceMap'." }, - Option_sourceRoot_cannot_be_specified_with_option_inlineSourceMap: { code: 5049, category: ts.DiagnosticCategory.Error, key: "Option 'sourceRoot' cannot be specified with option 'inlineSourceMap'." }, - Option_mapRoot_cannot_be_specified_with_option_inlineSourceMap: { code: 5050, category: ts.DiagnosticCategory.Error, key: "Option 'mapRoot' cannot be specified with option 'inlineSourceMap'." }, - Option_inlineSources_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided: { code: 5051, category: ts.DiagnosticCategory.Error, key: "Option 'inlineSources' can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided." }, - Concatenate_and_emit_output_to_single_file: { code: 6001, category: ts.DiagnosticCategory.Message, key: "Concatenate and emit output to single file." }, - Generates_corresponding_d_ts_file: { code: 6002, category: ts.DiagnosticCategory.Message, key: "Generates corresponding '.d.ts' file." }, - Specifies_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: { code: 6003, category: ts.DiagnosticCategory.Message, key: "Specifies the location where debugger should locate map files instead of generated locations." }, - Specifies_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: { code: 6004, category: ts.DiagnosticCategory.Message, key: "Specifies the location where debugger should locate TypeScript files instead of source locations." }, - Watch_input_files: { code: 6005, category: ts.DiagnosticCategory.Message, key: "Watch input files." }, - Redirect_output_structure_to_the_directory: { code: 6006, category: ts.DiagnosticCategory.Message, key: "Redirect output structure to the directory." }, - Do_not_erase_const_enum_declarations_in_generated_code: { code: 6007, category: ts.DiagnosticCategory.Message, key: "Do not erase const enum declarations in generated code." }, - Do_not_emit_outputs_if_any_errors_were_reported: { code: 6008, category: ts.DiagnosticCategory.Message, key: "Do not emit outputs if any errors were reported." }, - Do_not_emit_comments_to_output: { code: 6009, category: ts.DiagnosticCategory.Message, key: "Do not emit comments to output." }, - Do_not_emit_outputs: { code: 6010, category: ts.DiagnosticCategory.Message, key: "Do not emit outputs." }, - Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES6_experimental: { code: 6015, category: ts.DiagnosticCategory.Message, key: "Specify ECMAScript target version: 'ES3' (default), 'ES5', or 'ES6' (experimental)" }, - Specify_module_code_generation_Colon_commonjs_amd_system_or_umd: { code: 6016, category: ts.DiagnosticCategory.Message, key: "Specify module code generation: 'commonjs', 'amd', 'system' or 'umd'" }, - Print_this_message: { code: 6017, category: ts.DiagnosticCategory.Message, key: "Print this message." }, - Print_the_compiler_s_version: { code: 6019, category: ts.DiagnosticCategory.Message, key: "Print the compiler's version." }, - Compile_the_project_in_the_given_directory: { code: 6020, category: ts.DiagnosticCategory.Message, key: "Compile the project in the given directory." }, - Syntax_Colon_0: { code: 6023, category: ts.DiagnosticCategory.Message, key: "Syntax: {0}" }, - options: { code: 6024, category: ts.DiagnosticCategory.Message, key: "options" }, - file: { code: 6025, category: ts.DiagnosticCategory.Message, key: "file" }, - Examples_Colon_0: { code: 6026, category: ts.DiagnosticCategory.Message, key: "Examples: {0}" }, - Options_Colon: { code: 6027, category: ts.DiagnosticCategory.Message, key: "Options:" }, - Version_0: { code: 6029, category: ts.DiagnosticCategory.Message, key: "Version {0}" }, - Insert_command_line_options_and_files_from_a_file: { code: 6030, category: ts.DiagnosticCategory.Message, key: "Insert command line options and files from a file." }, - File_change_detected_Starting_incremental_compilation: { code: 6032, category: ts.DiagnosticCategory.Message, key: "File change detected. Starting incremental compilation..." }, - KIND: { code: 6034, category: ts.DiagnosticCategory.Message, key: "KIND" }, - FILE: { code: 6035, category: ts.DiagnosticCategory.Message, key: "FILE" }, - VERSION: { code: 6036, category: ts.DiagnosticCategory.Message, key: "VERSION" }, - LOCATION: { code: 6037, category: ts.DiagnosticCategory.Message, key: "LOCATION" }, - DIRECTORY: { code: 6038, category: ts.DiagnosticCategory.Message, key: "DIRECTORY" }, - Compilation_complete_Watching_for_file_changes: { code: 6042, category: ts.DiagnosticCategory.Message, key: "Compilation complete. Watching for file changes." }, - Generates_corresponding_map_file: { code: 6043, category: ts.DiagnosticCategory.Message, key: "Generates corresponding '.map' file." }, - Compiler_option_0_expects_an_argument: { code: 6044, category: ts.DiagnosticCategory.Error, key: "Compiler option '{0}' expects an argument." }, - Unterminated_quoted_string_in_response_file_0: { code: 6045, category: ts.DiagnosticCategory.Error, key: "Unterminated quoted string in response file '{0}'." }, - Argument_for_module_option_must_be_commonjs_amd_system_or_umd: { code: 6046, category: ts.DiagnosticCategory.Error, key: "Argument for '--module' option must be 'commonjs', 'amd', 'system' or 'umd'." }, - Argument_for_target_option_must_be_ES3_ES5_or_ES6: { code: 6047, category: ts.DiagnosticCategory.Error, key: "Argument for '--target' option must be 'ES3', 'ES5', or 'ES6'." }, - Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: { code: 6048, category: ts.DiagnosticCategory.Error, key: "Locale must be of the form or -. For example '{0}' or '{1}'." }, - Unsupported_locale_0: { code: 6049, category: ts.DiagnosticCategory.Error, key: "Unsupported locale '{0}'." }, - Unable_to_open_file_0: { code: 6050, category: ts.DiagnosticCategory.Error, key: "Unable to open file '{0}'." }, - Corrupted_locale_file_0: { code: 6051, category: ts.DiagnosticCategory.Error, key: "Corrupted locale file {0}." }, - Raise_error_on_expressions_and_declarations_with_an_implied_any_type: { code: 6052, category: ts.DiagnosticCategory.Message, key: "Raise error on expressions and declarations with an implied 'any' type." }, - File_0_not_found: { code: 6053, category: ts.DiagnosticCategory.Error, key: "File '{0}' not found." }, - File_0_has_unsupported_extension_The_only_supported_extensions_are_1: { code: 6054, category: ts.DiagnosticCategory.Error, key: "File '{0}' has unsupported extension. The only supported extensions are {1}." }, - Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: { code: 6055, category: ts.DiagnosticCategory.Message, key: "Suppress noImplicitAny errors for indexing objects lacking index signatures." }, - Do_not_emit_declarations_for_code_that_has_an_internal_annotation: { code: 6056, category: ts.DiagnosticCategory.Message, key: "Do not emit declarations for code that has an '@internal' annotation." }, - Preserve_new_lines_when_emitting_code: { code: 6057, category: ts.DiagnosticCategory.Message, key: "Preserve new-lines when emitting code." }, - Specifies_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir: { code: 6058, category: ts.DiagnosticCategory.Message, key: "Specifies the root directory of input files. Use to control the output directory structure with --outDir." }, - File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files: { code: 6059, category: ts.DiagnosticCategory.Error, key: "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files." }, - Specifies_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix: { code: 6060, category: ts.DiagnosticCategory.Message, key: "Specifies the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)." }, - NEWLINE: { code: 6061, category: ts.DiagnosticCategory.Message, key: "NEWLINE" }, - Argument_for_newLine_option_must_be_CRLF_or_LF: { code: 6062, category: ts.DiagnosticCategory.Error, key: "Argument for '--newLine' option must be 'CRLF' or 'LF'." }, - Option_experimentalDecorators_must_also_be_specified_when_option_emitDecoratorMetadata_is_specified: { code: 6064, category: ts.DiagnosticCategory.Error, key: "Option 'experimentalDecorators' must also be specified when option 'emitDecoratorMetadata' is specified." }, - Enables_experimental_support_for_ES7_decorators: { code: 6065, category: ts.DiagnosticCategory.Message, key: "Enables experimental support for ES7 decorators." }, - Enables_experimental_support_for_emitting_type_metadata_for_decorators: { code: 6066, category: ts.DiagnosticCategory.Message, key: "Enables experimental support for emitting type metadata for decorators." }, - Variable_0_implicitly_has_an_1_type: { code: 7005, category: ts.DiagnosticCategory.Error, key: "Variable '{0}' implicitly has an '{1}' type." }, - Parameter_0_implicitly_has_an_1_type: { code: 7006, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' implicitly has an '{1}' type." }, - Member_0_implicitly_has_an_1_type: { code: 7008, category: ts.DiagnosticCategory.Error, key: "Member '{0}' implicitly has an '{1}' type." }, - new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type: { code: 7009, category: ts.DiagnosticCategory.Error, key: "'new' expression, whose target lacks a construct signature, implicitly has an 'any' type." }, - _0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: { code: 7010, category: ts.DiagnosticCategory.Error, key: "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type." }, - Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: { code: 7011, category: ts.DiagnosticCategory.Error, key: "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type." }, - Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: { code: 7013, category: ts.DiagnosticCategory.Error, key: "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type." }, - Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation: { code: 7016, category: ts.DiagnosticCategory.Error, key: "Property '{0}' implicitly has type 'any', because its 'set' accessor lacks a type annotation." }, - Index_signature_of_object_type_implicitly_has_an_any_type: { code: 7017, category: ts.DiagnosticCategory.Error, key: "Index signature of object type implicitly has an 'any' type." }, - Object_literal_s_property_0_implicitly_has_an_1_type: { code: 7018, category: ts.DiagnosticCategory.Error, key: "Object literal's property '{0}' implicitly has an '{1}' type." }, - Rest_parameter_0_implicitly_has_an_any_type: { code: 7019, category: ts.DiagnosticCategory.Error, key: "Rest parameter '{0}' implicitly has an 'any[]' type." }, - Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: { code: 7020, category: ts.DiagnosticCategory.Error, key: "Call signature, which lacks return-type annotation, implicitly has an 'any' return type." }, - _0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer: { code: 7022, category: ts.DiagnosticCategory.Error, key: "'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer." }, - _0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7023, category: ts.DiagnosticCategory.Error, key: "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." }, - Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7024, category: ts.DiagnosticCategory.Error, key: "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." }, - Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type: { code: 7025, category: ts.DiagnosticCategory.Error, key: "Generator implicitly has type '{0}' because it does not yield any values. Consider supplying a return type." }, - You_cannot_rename_this_element: { code: 8000, category: ts.DiagnosticCategory.Error, key: "You cannot rename this element." }, - You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: { code: 8001, category: ts.DiagnosticCategory.Error, key: "You cannot rename elements that are defined in the standard TypeScript library." }, - import_can_only_be_used_in_a_ts_file: { code: 8002, category: ts.DiagnosticCategory.Error, key: "'import ... =' can only be used in a .ts file." }, - export_can_only_be_used_in_a_ts_file: { code: 8003, category: ts.DiagnosticCategory.Error, key: "'export=' can only be used in a .ts file." }, - type_parameter_declarations_can_only_be_used_in_a_ts_file: { code: 8004, category: ts.DiagnosticCategory.Error, key: "'type parameter declarations' can only be used in a .ts file." }, - implements_clauses_can_only_be_used_in_a_ts_file: { code: 8005, category: ts.DiagnosticCategory.Error, key: "'implements clauses' can only be used in a .ts file." }, - interface_declarations_can_only_be_used_in_a_ts_file: { code: 8006, category: ts.DiagnosticCategory.Error, key: "'interface declarations' can only be used in a .ts file." }, - module_declarations_can_only_be_used_in_a_ts_file: { code: 8007, category: ts.DiagnosticCategory.Error, key: "'module declarations' can only be used in a .ts file." }, - type_aliases_can_only_be_used_in_a_ts_file: { code: 8008, category: ts.DiagnosticCategory.Error, key: "'type aliases' can only be used in a .ts file." }, - _0_can_only_be_used_in_a_ts_file: { code: 8009, category: ts.DiagnosticCategory.Error, key: "'{0}' can only be used in a .ts file." }, - types_can_only_be_used_in_a_ts_file: { code: 8010, category: ts.DiagnosticCategory.Error, key: "'types' can only be used in a .ts file." }, - type_arguments_can_only_be_used_in_a_ts_file: { code: 8011, category: ts.DiagnosticCategory.Error, key: "'type arguments' can only be used in a .ts file." }, - parameter_modifiers_can_only_be_used_in_a_ts_file: { code: 8012, category: ts.DiagnosticCategory.Error, key: "'parameter modifiers' can only be used in a .ts file." }, - property_declarations_can_only_be_used_in_a_ts_file: { code: 8014, category: ts.DiagnosticCategory.Error, key: "'property declarations' can only be used in a .ts file." }, - enum_declarations_can_only_be_used_in_a_ts_file: { code: 8015, category: ts.DiagnosticCategory.Error, key: "'enum declarations' can only be used in a .ts file." }, - type_assertion_expressions_can_only_be_used_in_a_ts_file: { code: 8016, category: ts.DiagnosticCategory.Error, key: "'type assertion expressions' can only be used in a .ts file." }, - decorators_can_only_be_used_in_a_ts_file: { code: 8017, category: ts.DiagnosticCategory.Error, key: "'decorators' can only be used in a .ts file." }, - Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clauses: { code: 9002, category: ts.DiagnosticCategory.Error, key: "Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses." }, - class_expressions_are_not_currently_supported: { code: 9003, category: ts.DiagnosticCategory.Error, key: "'class' expressions are not currently supported." } - }; -})(ts || (ts = {})); -/// -/// -var ts; -(function (ts) { - var textToToken = { - "any": 112 /* AnyKeyword */, - "as": 111 /* AsKeyword */, - "boolean": 113 /* BooleanKeyword */, - "break": 66 /* BreakKeyword */, - "case": 67 /* CaseKeyword */, - "catch": 68 /* CatchKeyword */, - "class": 69 /* ClassKeyword */, - "continue": 71 /* ContinueKeyword */, - "const": 70 /* ConstKeyword */, - "constructor": 114 /* ConstructorKeyword */, - "debugger": 72 /* DebuggerKeyword */, - "declare": 115 /* DeclareKeyword */, - "default": 73 /* DefaultKeyword */, - "delete": 74 /* DeleteKeyword */, - "do": 75 /* DoKeyword */, - "else": 76 /* ElseKeyword */, - "enum": 77 /* EnumKeyword */, - "export": 78 /* ExportKeyword */, - "extends": 79 /* ExtendsKeyword */, - "false": 80 /* FalseKeyword */, - "finally": 81 /* FinallyKeyword */, - "for": 82 /* ForKeyword */, - "from": 126 /* FromKeyword */, - "function": 83 /* FunctionKeyword */, - "get": 116 /* GetKeyword */, - "if": 84 /* IfKeyword */, - "implements": 102 /* ImplementsKeyword */, - "import": 85 /* ImportKeyword */, - "in": 86 /* InKeyword */, - "instanceof": 87 /* InstanceOfKeyword */, - "interface": 103 /* InterfaceKeyword */, - "is": 117 /* IsKeyword */, - "let": 104 /* LetKeyword */, - "module": 118 /* ModuleKeyword */, - "namespace": 119 /* NamespaceKeyword */, - "new": 88 /* NewKeyword */, - "null": 89 /* NullKeyword */, - "number": 121 /* NumberKeyword */, - "package": 105 /* PackageKeyword */, - "private": 106 /* PrivateKeyword */, - "protected": 107 /* ProtectedKeyword */, - "public": 108 /* PublicKeyword */, - "require": 120 /* RequireKeyword */, - "return": 90 /* ReturnKeyword */, - "set": 122 /* SetKeyword */, - "static": 109 /* StaticKeyword */, - "string": 123 /* StringKeyword */, - "super": 91 /* SuperKeyword */, - "switch": 92 /* SwitchKeyword */, - "symbol": 124 /* SymbolKeyword */, - "this": 93 /* ThisKeyword */, - "throw": 94 /* ThrowKeyword */, - "true": 95 /* TrueKeyword */, - "try": 96 /* TryKeyword */, - "type": 125 /* TypeKeyword */, - "typeof": 97 /* TypeOfKeyword */, - "var": 98 /* VarKeyword */, - "void": 99 /* VoidKeyword */, - "while": 100 /* WhileKeyword */, - "with": 101 /* WithKeyword */, - "yield": 110 /* YieldKeyword */, - "of": 127 /* OfKeyword */, - "{": 14 /* OpenBraceToken */, - "}": 15 /* CloseBraceToken */, - "(": 16 /* OpenParenToken */, - ")": 17 /* CloseParenToken */, - "[": 18 /* OpenBracketToken */, - "]": 19 /* CloseBracketToken */, - ".": 20 /* DotToken */, - "...": 21 /* DotDotDotToken */, - ";": 22 /* SemicolonToken */, - ",": 23 /* CommaToken */, - "<": 24 /* LessThanToken */, - ">": 25 /* GreaterThanToken */, - "<=": 26 /* LessThanEqualsToken */, - ">=": 27 /* GreaterThanEqualsToken */, - "==": 28 /* EqualsEqualsToken */, - "!=": 29 /* ExclamationEqualsToken */, - "===": 30 /* EqualsEqualsEqualsToken */, - "!==": 31 /* ExclamationEqualsEqualsToken */, - "=>": 32 /* EqualsGreaterThanToken */, - "+": 33 /* PlusToken */, - "-": 34 /* MinusToken */, - "*": 35 /* AsteriskToken */, - "/": 36 /* SlashToken */, - "%": 37 /* PercentToken */, - "++": 38 /* PlusPlusToken */, - "--": 39 /* MinusMinusToken */, - "<<": 40 /* LessThanLessThanToken */, - ">>": 41 /* GreaterThanGreaterThanToken */, - ">>>": 42 /* GreaterThanGreaterThanGreaterThanToken */, - "&": 43 /* AmpersandToken */, - "|": 44 /* BarToken */, - "^": 45 /* CaretToken */, - "!": 46 /* ExclamationToken */, - "~": 47 /* TildeToken */, - "&&": 48 /* AmpersandAmpersandToken */, - "||": 49 /* BarBarToken */, - "?": 50 /* QuestionToken */, - ":": 51 /* ColonToken */, - "=": 53 /* EqualsToken */, - "+=": 54 /* PlusEqualsToken */, - "-=": 55 /* MinusEqualsToken */, - "*=": 56 /* AsteriskEqualsToken */, - "/=": 57 /* SlashEqualsToken */, - "%=": 58 /* PercentEqualsToken */, - "<<=": 59 /* LessThanLessThanEqualsToken */, - ">>=": 60 /* GreaterThanGreaterThanEqualsToken */, - ">>>=": 61 /* GreaterThanGreaterThanGreaterThanEqualsToken */, - "&=": 62 /* AmpersandEqualsToken */, - "|=": 63 /* BarEqualsToken */, - "^=": 64 /* CaretEqualsToken */, - "@": 52 /* AtToken */ - }; - /* - As per ECMAScript Language Specification 3th Edition, Section 7.6: Identifiers - IdentifierStart :: - Can contain Unicode 3.0.0 categories: - Uppercase letter (Lu), - Lowercase letter (Ll), - Titlecase letter (Lt), - Modifier letter (Lm), - Other letter (Lo), or - Letter number (Nl). - IdentifierPart :: = - Can contain IdentifierStart + Unicode 3.0.0 categories: - Non-spacing mark (Mn), - Combining spacing mark (Mc), - Decimal number (Nd), or - Connector punctuation (Pc). - - Codepoint ranges for ES3 Identifiers are extracted from the Unicode 3.0.0 specification at: - http://www.unicode.org/Public/3.0-Update/UnicodeData-3.0.0.txt - */ - var unicodeES3IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1610, 1649, 1747, 1749, 1749, 1765, 1766, 1786, 1788, 1808, 1808, 1810, 1836, 1920, 1957, 2309, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2784, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3294, 3294, 3296, 3297, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3424, 3425, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3805, 3840, 3840, 3904, 3911, 3913, 3946, 3976, 3979, 4096, 4129, 4131, 4135, 4137, 4138, 4176, 4181, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6067, 6176, 6263, 6272, 6312, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8319, 8319, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12346, 12353, 12436, 12445, 12446, 12449, 12538, 12540, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65138, 65140, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; - var unicodeES3IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 768, 846, 864, 866, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1155, 1158, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1441, 1443, 1465, 1467, 1469, 1471, 1471, 1473, 1474, 1476, 1476, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1621, 1632, 1641, 1648, 1747, 1749, 1756, 1759, 1768, 1770, 1773, 1776, 1788, 1808, 1836, 1840, 1866, 1920, 1968, 2305, 2307, 2309, 2361, 2364, 2381, 2384, 2388, 2392, 2403, 2406, 2415, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2492, 2494, 2500, 2503, 2504, 2507, 2509, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2562, 2562, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2649, 2652, 2654, 2654, 2662, 2676, 2689, 2691, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2784, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2876, 2883, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2913, 2918, 2927, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3031, 3031, 3047, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3168, 3169, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3297, 3302, 3311, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3390, 3395, 3398, 3400, 3402, 3405, 3415, 3415, 3424, 3425, 3430, 3439, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3805, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3946, 3953, 3972, 3974, 3979, 3984, 3991, 3993, 4028, 4038, 4038, 4096, 4129, 4131, 4135, 4137, 4138, 4140, 4146, 4150, 4153, 4160, 4169, 4176, 4185, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 4969, 4977, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6099, 6112, 6121, 6160, 6169, 6176, 6263, 6272, 6313, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8255, 8256, 8319, 8319, 8400, 8412, 8417, 8417, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12346, 12353, 12436, 12441, 12442, 12445, 12446, 12449, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65056, 65059, 65075, 65076, 65101, 65103, 65136, 65138, 65140, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65381, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; - /* - As per ECMAScript Language Specification 5th Edition, Section 7.6: ISyntaxToken Names and Identifiers - IdentifierStart :: - Can contain Unicode 6.2 categories: - Uppercase letter (Lu), - Lowercase letter (Ll), - Titlecase letter (Lt), - Modifier letter (Lm), - Other letter (Lo), or - Letter number (Nl). - IdentifierPart :: - Can contain IdentifierStart + Unicode 6.2 categories: - Non-spacing mark (Mn), - Combining spacing mark (Mc), - Decimal number (Nd), - Connector punctuation (Pc), - , or - . - - Codepoint ranges for ES5 Identifiers are extracted from the Unicode 6.2 specification at: - http://www.unicode.org/Public/6.2.0/ucd/UnicodeData.txt - */ - var unicodeES5IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2208, 2208, 2210, 2220, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425, 2431, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6000, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516, 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409, 7413, 7414, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; - var unicodeES5IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1520, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2048, 2093, 2112, 2139, 2208, 2208, 2210, 2220, 2276, 2302, 2304, 2403, 2406, 2415, 2417, 2423, 2425, 2431, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3161, 3168, 3171, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3396, 3398, 3400, 3402, 3406, 3415, 3415, 3424, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6000, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6176, 6263, 6272, 6314, 6320, 6389, 6400, 6428, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6617, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7376, 7378, 7380, 7414, 7424, 7654, 7676, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8205, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 11823, 11823, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12442, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42647, 42655, 42737, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43047, 43072, 43123, 43136, 43204, 43216, 43225, 43232, 43255, 43259, 43259, 43264, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43643, 43648, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65062, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; - function lookupInUnicodeMap(code, map) { - // Bail out quickly if it couldn't possibly be in the map. - if (code < map[0]) { - return false; - } - // Perform binary search in one of the Unicode range maps - var lo = 0; - var hi = map.length; - var mid; - while (lo + 1 < hi) { - mid = lo + (hi - lo) / 2; - // mid has to be even to catch a range's beginning - mid -= mid % 2; - if (map[mid] <= code && code <= map[mid + 1]) { - return true; - } - if (code < map[mid]) { - hi = mid; - } - else { - lo = mid + 2; - } - } - return false; - } - /* @internal */ function isUnicodeIdentifierStart(code, languageVersion) { - return languageVersion >= 1 /* ES5 */ ? - lookupInUnicodeMap(code, unicodeES5IdentifierStart) : - lookupInUnicodeMap(code, unicodeES3IdentifierStart); - } - ts.isUnicodeIdentifierStart = isUnicodeIdentifierStart; - function isUnicodeIdentifierPart(code, languageVersion) { - return languageVersion >= 1 /* ES5 */ ? - lookupInUnicodeMap(code, unicodeES5IdentifierPart) : - lookupInUnicodeMap(code, unicodeES3IdentifierPart); - } - function makeReverseMap(source) { - var result = []; - for (var name_3 in source) { - if (source.hasOwnProperty(name_3)) { - result[source[name_3]] = name_3; - } - } - return result; - } - var tokenStrings = makeReverseMap(textToToken); - function tokenToString(t) { - return tokenStrings[t]; - } - ts.tokenToString = tokenToString; - /* @internal */ - function stringToToken(s) { - return textToToken[s]; - } - ts.stringToToken = stringToToken; - /* @internal */ - function computeLineStarts(text) { - var result = new Array(); - var pos = 0; - var lineStart = 0; - while (pos < text.length) { - var ch = text.charCodeAt(pos++); - switch (ch) { - case 13 /* carriageReturn */: - if (text.charCodeAt(pos) === 10 /* lineFeed */) { - pos++; - } - case 10 /* lineFeed */: - result.push(lineStart); - lineStart = pos; - break; - default: - if (ch > 127 /* maxAsciiCharacter */ && isLineBreak(ch)) { - result.push(lineStart); - lineStart = pos; - } - break; - } - } - result.push(lineStart); - return result; - } - ts.computeLineStarts = computeLineStarts; - function getPositionOfLineAndCharacter(sourceFile, line, character) { - return computePositionOfLineAndCharacter(getLineStarts(sourceFile), line, character); - } - ts.getPositionOfLineAndCharacter = getPositionOfLineAndCharacter; - /* @internal */ - function computePositionOfLineAndCharacter(lineStarts, line, character) { - ts.Debug.assert(line >= 0 && line < lineStarts.length); - return lineStarts[line] + character; - } - ts.computePositionOfLineAndCharacter = computePositionOfLineAndCharacter; - /* @internal */ - function getLineStarts(sourceFile) { - return sourceFile.lineMap || (sourceFile.lineMap = computeLineStarts(sourceFile.text)); - } - ts.getLineStarts = getLineStarts; - /* @internal */ - function computeLineAndCharacterOfPosition(lineStarts, position) { - var lineNumber = ts.binarySearch(lineStarts, position); - if (lineNumber < 0) { - // If the actual position was not found, - // the binary search returns the negative value of the next line start - // e.g. if the line starts at [5, 10, 23, 80] and the position requested was 20 - // then the search will return -2 - lineNumber = ~lineNumber - 1; - } - return { - line: lineNumber, - character: position - lineStarts[lineNumber] - }; - } - ts.computeLineAndCharacterOfPosition = computeLineAndCharacterOfPosition; - function getLineAndCharacterOfPosition(sourceFile, position) { - return computeLineAndCharacterOfPosition(getLineStarts(sourceFile), position); - } - ts.getLineAndCharacterOfPosition = getLineAndCharacterOfPosition; - var hasOwnProperty = Object.prototype.hasOwnProperty; - function isWhiteSpace(ch) { - // Note: nextLine is in the Zs space, and should be considered to be a whitespace. - // It is explicitly not a line-break as it isn't in the exact set specified by EcmaScript. - return ch === 32 /* space */ || - ch === 9 /* tab */ || - ch === 11 /* verticalTab */ || - ch === 12 /* formFeed */ || - ch === 160 /* nonBreakingSpace */ || - ch === 133 /* nextLine */ || - ch === 5760 /* ogham */ || - ch >= 8192 /* enQuad */ && ch <= 8203 /* zeroWidthSpace */ || - ch === 8239 /* narrowNoBreakSpace */ || - ch === 8287 /* mathematicalSpace */ || - ch === 12288 /* ideographicSpace */ || - ch === 65279 /* byteOrderMark */; - } - ts.isWhiteSpace = isWhiteSpace; - function isLineBreak(ch) { - // ES5 7.3: - // The ECMAScript line terminator characters are listed in Table 3. - // Table 3: Line Terminator Characters - // Code Unit Value Name Formal Name - // \u000A Line Feed - // \u000D Carriage Return - // \u2028 Line separator - // \u2029 Paragraph separator - // Only the characters in Table 3 are treated as line terminators. Other new line or line - // breaking characters are treated as white space but not as line terminators. - return ch === 10 /* lineFeed */ || - ch === 13 /* carriageReturn */ || - ch === 8232 /* lineSeparator */ || - ch === 8233 /* paragraphSeparator */; - } - ts.isLineBreak = isLineBreak; - function isDigit(ch) { - return ch >= 48 /* _0 */ && ch <= 57 /* _9 */; - } - /* @internal */ - function isOctalDigit(ch) { - return ch >= 48 /* _0 */ && ch <= 55 /* _7 */; - } - ts.isOctalDigit = isOctalDigit; - /* @internal */ - function skipTrivia(text, pos, stopAfterLineBreak) { - while (true) { - var ch = text.charCodeAt(pos); - switch (ch) { - case 13 /* carriageReturn */: - if (text.charCodeAt(pos + 1) === 10 /* lineFeed */) { - pos++; - } - case 10 /* lineFeed */: - pos++; - if (stopAfterLineBreak) { - return pos; - } - continue; - case 9 /* tab */: - case 11 /* verticalTab */: - case 12 /* formFeed */: - case 32 /* space */: - pos++; - continue; - case 47 /* slash */: - if (text.charCodeAt(pos + 1) === 47 /* slash */) { - pos += 2; - while (pos < text.length) { - if (isLineBreak(text.charCodeAt(pos))) { - break; - } - pos++; - } - continue; - } - if (text.charCodeAt(pos + 1) === 42 /* asterisk */) { - pos += 2; - while (pos < text.length) { - if (text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) { - pos += 2; - break; - } - pos++; - } - continue; - } - break; - case 60 /* lessThan */: - case 61 /* equals */: - case 62 /* greaterThan */: - if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos); - continue; - } - break; - default: - if (ch > 127 /* maxAsciiCharacter */ && (isWhiteSpace(ch) || isLineBreak(ch))) { - pos++; - continue; - } - break; - } - return pos; - } - } - ts.skipTrivia = skipTrivia; - // All conflict markers consist of the same character repeated seven times. If it is - // a <<<<<<< or >>>>>>> marker then it is also followd by a space. - var mergeConflictMarkerLength = "<<<<<<<".length; - function isConflictMarkerTrivia(text, pos) { - ts.Debug.assert(pos >= 0); - // Conflict markers must be at the start of a line. - if (pos === 0 || isLineBreak(text.charCodeAt(pos - 1))) { - var ch = text.charCodeAt(pos); - if ((pos + mergeConflictMarkerLength) < text.length) { - for (var i = 0, n = mergeConflictMarkerLength; i < n; i++) { - if (text.charCodeAt(pos + i) !== ch) { - return false; - } - } - return ch === 61 /* equals */ || - text.charCodeAt(pos + mergeConflictMarkerLength) === 32 /* space */; - } - } - return false; - } - function scanConflictMarkerTrivia(text, pos, error) { - if (error) { - error(ts.Diagnostics.Merge_conflict_marker_encountered, mergeConflictMarkerLength); - } - var ch = text.charCodeAt(pos); - var len = text.length; - if (ch === 60 /* lessThan */ || ch === 62 /* greaterThan */) { - while (pos < len && !isLineBreak(text.charCodeAt(pos))) { - pos++; - } - } - else { - ts.Debug.assert(ch === 61 /* equals */); - // Consume everything from the start of the mid-conlict marker to the start of the next - // end-conflict marker. - while (pos < len) { - var ch_1 = text.charCodeAt(pos); - if (ch_1 === 62 /* greaterThan */ && isConflictMarkerTrivia(text, pos)) { - break; - } - pos++; - } - } - return pos; - } - // Extract comments from the given source text starting at the given position. If trailing is - // false, whitespace is skipped until the first line break and comments between that location - // and the next token are returned.If trailing is true, comments occurring between the given - // position and the next line break are returned.The return value is an array containing a - // TextRange for each comment. Single-line comment ranges include the beginning '//' characters - // but not the ending line break. Multi - line comment ranges include the beginning '/* and - // ending '*/' characters.The return value is undefined if no comments were found. - function getCommentRanges(text, pos, trailing) { - var result; - var collecting = trailing || pos === 0; - while (true) { - var ch = text.charCodeAt(pos); - switch (ch) { - case 13 /* carriageReturn */: - if (text.charCodeAt(pos + 1) === 10 /* lineFeed */) { - pos++; - } - case 10 /* lineFeed */: - pos++; - if (trailing) { - return result; - } - collecting = true; - if (result && result.length) { - ts.lastOrUndefined(result).hasTrailingNewLine = true; - } - continue; - case 9 /* tab */: - case 11 /* verticalTab */: - case 12 /* formFeed */: - case 32 /* space */: - pos++; - continue; - case 47 /* slash */: - var nextChar = text.charCodeAt(pos + 1); - var hasTrailingNewLine = false; - if (nextChar === 47 /* slash */ || nextChar === 42 /* asterisk */) { - var kind = nextChar === 47 /* slash */ ? 2 /* SingleLineCommentTrivia */ : 3 /* MultiLineCommentTrivia */; - var startPos = pos; - pos += 2; - if (nextChar === 47 /* slash */) { - while (pos < text.length) { - if (isLineBreak(text.charCodeAt(pos))) { - hasTrailingNewLine = true; - break; - } - pos++; - } - } - else { - while (pos < text.length) { - if (text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) { - pos += 2; - break; - } - pos++; - } - } - if (collecting) { - if (!result) { - result = []; - } - result.push({ pos: startPos, end: pos, hasTrailingNewLine: hasTrailingNewLine, kind: kind }); - } - continue; - } - break; - default: - if (ch > 127 /* maxAsciiCharacter */ && (isWhiteSpace(ch) || isLineBreak(ch))) { - if (result && result.length && isLineBreak(ch)) { - ts.lastOrUndefined(result).hasTrailingNewLine = true; - } - pos++; - continue; - } - break; - } - return result; - } - } - function getLeadingCommentRanges(text, pos) { - return getCommentRanges(text, pos, false); - } - ts.getLeadingCommentRanges = getLeadingCommentRanges; - function getTrailingCommentRanges(text, pos) { - return getCommentRanges(text, pos, true); - } - ts.getTrailingCommentRanges = getTrailingCommentRanges; - function isIdentifierStart(ch, languageVersion) { - return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || - ch === 36 /* $ */ || ch === 95 /* _ */ || - ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierStart(ch, languageVersion); - } - ts.isIdentifierStart = isIdentifierStart; - function isIdentifierPart(ch, languageVersion) { - return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || - ch >= 48 /* _0 */ && ch <= 57 /* _9 */ || ch === 36 /* $ */ || ch === 95 /* _ */ || - ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierPart(ch, languageVersion); - } - ts.isIdentifierPart = isIdentifierPart; - /* @internal */ - // Creates a scanner over a (possibly unspecified) range of a piece of text. - function createScanner(languageVersion, skipTrivia, text, onError, start, length) { - // Current position (end position of text of current token) - var pos; - // end of text - var end; - // Start position of whitespace before current token - var startPos; - // Start position of text of current token - var tokenPos; - var token; - var tokenValue; - var precedingLineBreak; - var hasExtendedUnicodeEscape; - var tokenIsUnterminated; - setText(text, start, length); - return { - getStartPos: function () { return startPos; }, - getTextPos: function () { return pos; }, - getToken: function () { return token; }, - getTokenPos: function () { return tokenPos; }, - getTokenText: function () { return text.substring(tokenPos, pos); }, - getTokenValue: function () { return tokenValue; }, - hasExtendedUnicodeEscape: function () { return hasExtendedUnicodeEscape; }, - hasPrecedingLineBreak: function () { return precedingLineBreak; }, - isIdentifier: function () { return token === 65 /* Identifier */ || token > 101 /* LastReservedWord */; }, - isReservedWord: function () { return token >= 66 /* FirstReservedWord */ && token <= 101 /* LastReservedWord */; }, - isUnterminated: function () { return tokenIsUnterminated; }, - reScanGreaterToken: reScanGreaterToken, - reScanSlashToken: reScanSlashToken, - reScanTemplateToken: reScanTemplateToken, - scan: scan, - setText: setText, - setScriptTarget: setScriptTarget, - setOnError: setOnError, - setTextPos: setTextPos, - tryScan: tryScan, - lookAhead: lookAhead - }; - function error(message, length) { - if (onError) { - onError(message, length || 0); - } - } - function isIdentifierStart(ch) { - return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || - ch === 36 /* $ */ || ch === 95 /* _ */ || - ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierStart(ch, languageVersion); - } - function isIdentifierPart(ch) { - return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || - ch >= 48 /* _0 */ && ch <= 57 /* _9 */ || ch === 36 /* $ */ || ch === 95 /* _ */ || - ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierPart(ch, languageVersion); - } - function scanNumber() { - var start = pos; - while (isDigit(text.charCodeAt(pos))) - pos++; - if (text.charCodeAt(pos) === 46 /* dot */) { - pos++; - while (isDigit(text.charCodeAt(pos))) - pos++; - } - var end = pos; - if (text.charCodeAt(pos) === 69 /* E */ || text.charCodeAt(pos) === 101 /* e */) { - pos++; - if (text.charCodeAt(pos) === 43 /* plus */ || text.charCodeAt(pos) === 45 /* minus */) - pos++; - if (isDigit(text.charCodeAt(pos))) { - pos++; - while (isDigit(text.charCodeAt(pos))) - pos++; - end = pos; - } - else { - error(ts.Diagnostics.Digit_expected); - } - } - return +(text.substring(start, end)); - } - function scanOctalDigits() { - var start = pos; - while (isOctalDigit(text.charCodeAt(pos))) { - pos++; - } - return +(text.substring(start, pos)); - } - /** - * Scans the given number of hexadecimal digits in the text, - * returning -1 if the given number is unavailable. - */ - function scanExactNumberOfHexDigits(count) { - return scanHexDigits(count, false); - } - /** - * Scans as many hexadecimal digits as are available in the text, - * returning -1 if the given number of digits was unavailable. - */ - function scanMinimumNumberOfHexDigits(count) { - return scanHexDigits(count, true); - } - function scanHexDigits(minCount, scanAsManyAsPossible) { - var digits = 0; - var value = 0; - while (digits < minCount || scanAsManyAsPossible) { - var ch = text.charCodeAt(pos); - if (ch >= 48 /* _0 */ && ch <= 57 /* _9 */) { - value = value * 16 + ch - 48 /* _0 */; - } - else if (ch >= 65 /* A */ && ch <= 70 /* F */) { - value = value * 16 + ch - 65 /* A */ + 10; - } - else if (ch >= 97 /* a */ && ch <= 102 /* f */) { - value = value * 16 + ch - 97 /* a */ + 10; - } - else { - break; - } - pos++; - digits++; - } - if (digits < minCount) { - value = -1; - } - return value; - } - function scanString() { - var quote = text.charCodeAt(pos++); - var result = ""; - var start = pos; - while (true) { - if (pos >= end) { - result += text.substring(start, pos); - tokenIsUnterminated = true; - error(ts.Diagnostics.Unterminated_string_literal); - break; - } - var ch = text.charCodeAt(pos); - if (ch === quote) { - result += text.substring(start, pos); - pos++; - break; - } - if (ch === 92 /* backslash */) { - result += text.substring(start, pos); - result += scanEscapeSequence(); - start = pos; - continue; - } - if (isLineBreak(ch)) { - result += text.substring(start, pos); - tokenIsUnterminated = true; - error(ts.Diagnostics.Unterminated_string_literal); - break; - } - pos++; - } - return result; - } - /** - * Sets the current 'tokenValue' and returns a NoSubstitutionTemplateLiteral or - * a literal component of a TemplateExpression. - */ - function scanTemplateAndSetTokenValue() { - var startedWithBacktick = text.charCodeAt(pos) === 96 /* backtick */; - pos++; - var start = pos; - var contents = ""; - var resultingToken; - while (true) { - if (pos >= end) { - contents += text.substring(start, pos); - tokenIsUnterminated = true; - error(ts.Diagnostics.Unterminated_template_literal); - resultingToken = startedWithBacktick ? 10 /* NoSubstitutionTemplateLiteral */ : 13 /* TemplateTail */; - break; - } - var currChar = text.charCodeAt(pos); - // '`' - if (currChar === 96 /* backtick */) { - contents += text.substring(start, pos); - pos++; - resultingToken = startedWithBacktick ? 10 /* NoSubstitutionTemplateLiteral */ : 13 /* TemplateTail */; - break; - } - // '${' - if (currChar === 36 /* $ */ && pos + 1 < end && text.charCodeAt(pos + 1) === 123 /* openBrace */) { - contents += text.substring(start, pos); - pos += 2; - resultingToken = startedWithBacktick ? 11 /* TemplateHead */ : 12 /* TemplateMiddle */; - break; - } - // Escape character - if (currChar === 92 /* backslash */) { - contents += text.substring(start, pos); - contents += scanEscapeSequence(); - start = pos; - continue; - } - // Speculated ECMAScript 6 Spec 11.8.6.1: - // and LineTerminatorSequences are normalized to for Template Values - if (currChar === 13 /* carriageReturn */) { - contents += text.substring(start, pos); - pos++; - if (pos < end && text.charCodeAt(pos) === 10 /* lineFeed */) { - pos++; - } - contents += "\n"; - start = pos; - continue; - } - pos++; - } - ts.Debug.assert(resultingToken !== undefined); - tokenValue = contents; - return resultingToken; - } - function scanEscapeSequence() { - pos++; - if (pos >= end) { - error(ts.Diagnostics.Unexpected_end_of_text); - return ""; - } - var ch = text.charCodeAt(pos++); - switch (ch) { - case 48 /* _0 */: - return "\0"; - case 98 /* b */: - return "\b"; - case 116 /* t */: - return "\t"; - case 110 /* n */: - return "\n"; - case 118 /* v */: - return "\v"; - case 102 /* f */: - return "\f"; - case 114 /* r */: - return "\r"; - case 39 /* singleQuote */: - return "\'"; - case 34 /* doubleQuote */: - return "\""; - case 117 /* u */: - // '\u{DDDDDDDD}' - if (pos < end && text.charCodeAt(pos) === 123 /* openBrace */) { - hasExtendedUnicodeEscape = true; - pos++; - return scanExtendedUnicodeEscape(); - } - // '\uDDDD' - return scanHexadecimalEscape(4); - case 120 /* x */: - // '\xDD' - return scanHexadecimalEscape(2); - // when encountering a LineContinuation (i.e. a backslash and a line terminator sequence), - // the line terminator is interpreted to be "the empty code unit sequence". - case 13 /* carriageReturn */: - if (pos < end && text.charCodeAt(pos) === 10 /* lineFeed */) { - pos++; - } - // fall through - case 10 /* lineFeed */: - case 8232 /* lineSeparator */: - case 8233 /* paragraphSeparator */: - return ""; - default: - return String.fromCharCode(ch); - } - } - function scanHexadecimalEscape(numDigits) { - var escapedValue = scanExactNumberOfHexDigits(numDigits); - if (escapedValue >= 0) { - return String.fromCharCode(escapedValue); - } - else { - error(ts.Diagnostics.Hexadecimal_digit_expected); - return ""; - } - } - function scanExtendedUnicodeEscape() { - var escapedValue = scanMinimumNumberOfHexDigits(1); - var isInvalidExtendedEscape = false; - // Validate the value of the digit - if (escapedValue < 0) { - error(ts.Diagnostics.Hexadecimal_digit_expected); - isInvalidExtendedEscape = true; - } - else if (escapedValue > 0x10FFFF) { - error(ts.Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive); - isInvalidExtendedEscape = true; - } - if (pos >= end) { - error(ts.Diagnostics.Unexpected_end_of_text); - isInvalidExtendedEscape = true; - } - else if (text.charCodeAt(pos) == 125 /* closeBrace */) { - // Only swallow the following character up if it's a '}'. - pos++; - } - else { - error(ts.Diagnostics.Unterminated_Unicode_escape_sequence); - isInvalidExtendedEscape = true; - } - if (isInvalidExtendedEscape) { - return ""; - } - return utf16EncodeAsString(escapedValue); - } - // Derived from the 10.1.1 UTF16Encoding of the ES6 Spec. - function utf16EncodeAsString(codePoint) { - ts.Debug.assert(0x0 <= codePoint && codePoint <= 0x10FFFF); - if (codePoint <= 65535) { - return String.fromCharCode(codePoint); - } - var codeUnit1 = Math.floor((codePoint - 65536) / 1024) + 0xD800; - var codeUnit2 = ((codePoint - 65536) % 1024) + 0xDC00; - return String.fromCharCode(codeUnit1, codeUnit2); - } - // Current character is known to be a backslash. Check for Unicode escape of the form '\uXXXX' - // and return code point value if valid Unicode escape is found. Otherwise return -1. - function peekUnicodeEscape() { - if (pos + 5 < end && text.charCodeAt(pos + 1) === 117 /* u */) { - var start_1 = pos; - pos += 2; - var value = scanExactNumberOfHexDigits(4); - pos = start_1; - return value; - } - return -1; - } - function scanIdentifierParts() { - var result = ""; - var start = pos; - while (pos < end) { - var ch = text.charCodeAt(pos); - if (isIdentifierPart(ch)) { - pos++; - } - else if (ch === 92 /* backslash */) { - ch = peekUnicodeEscape(); - if (!(ch >= 0 && isIdentifierPart(ch))) { - break; - } - result += text.substring(start, pos); - result += String.fromCharCode(ch); - // Valid Unicode escape is always six characters - pos += 6; - start = pos; - } - else { - break; - } - } - result += text.substring(start, pos); - return result; - } - function getIdentifierToken() { - // Reserved words are between 2 and 11 characters long and start with a lowercase letter - var len = tokenValue.length; - if (len >= 2 && len <= 11) { - var ch = tokenValue.charCodeAt(0); - if (ch >= 97 /* a */ && ch <= 122 /* z */ && hasOwnProperty.call(textToToken, tokenValue)) { - return token = textToToken[tokenValue]; - } - } - return token = 65 /* Identifier */; - } - function scanBinaryOrOctalDigits(base) { - ts.Debug.assert(base !== 2 || base !== 8, "Expected either base 2 or base 8"); - var value = 0; - // For counting number of digits; Valid binaryIntegerLiteral must have at least one binary digit following B or b. - // Similarly valid octalIntegerLiteral must have at least one octal digit following o or O. - var numberOfDigits = 0; - while (true) { - var ch = text.charCodeAt(pos); - var valueOfCh = ch - 48 /* _0 */; - if (!isDigit(ch) || valueOfCh >= base) { - break; - } - value = value * base + valueOfCh; - pos++; - numberOfDigits++; - } - // Invalid binaryIntegerLiteral or octalIntegerLiteral - if (numberOfDigits === 0) { - return -1; - } - return value; - } - function scan() { - startPos = pos; - hasExtendedUnicodeEscape = false; - precedingLineBreak = false; - tokenIsUnterminated = false; - while (true) { - tokenPos = pos; - if (pos >= end) { - return token = 1 /* EndOfFileToken */; - } - var ch = text.charCodeAt(pos); - switch (ch) { - case 10 /* lineFeed */: - case 13 /* carriageReturn */: - precedingLineBreak = true; - if (skipTrivia) { - pos++; - continue; - } - else { - if (ch === 13 /* carriageReturn */ && pos + 1 < end && text.charCodeAt(pos + 1) === 10 /* lineFeed */) { - // consume both CR and LF - pos += 2; - } - else { - pos++; - } - return token = 4 /* NewLineTrivia */; - } - case 9 /* tab */: - case 11 /* verticalTab */: - case 12 /* formFeed */: - case 32 /* space */: - if (skipTrivia) { - pos++; - continue; - } - else { - while (pos < end && isWhiteSpace(text.charCodeAt(pos))) { - pos++; - } - return token = 5 /* WhitespaceTrivia */; - } - case 33 /* exclamation */: - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 31 /* ExclamationEqualsEqualsToken */; - } - return pos += 2, token = 29 /* ExclamationEqualsToken */; - } - return pos++, token = 46 /* ExclamationToken */; - case 34 /* doubleQuote */: - case 39 /* singleQuote */: - tokenValue = scanString(); - return token = 8 /* StringLiteral */; - case 96 /* backtick */: - return token = scanTemplateAndSetTokenValue(); - case 37 /* percent */: - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 58 /* PercentEqualsToken */; - } - return pos++, token = 37 /* PercentToken */; - case 38 /* ampersand */: - if (text.charCodeAt(pos + 1) === 38 /* ampersand */) { - return pos += 2, token = 48 /* AmpersandAmpersandToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 62 /* AmpersandEqualsToken */; - } - return pos++, token = 43 /* AmpersandToken */; - case 40 /* openParen */: - return pos++, token = 16 /* OpenParenToken */; - case 41 /* closeParen */: - return pos++, token = 17 /* CloseParenToken */; - case 42 /* asterisk */: - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 56 /* AsteriskEqualsToken */; - } - return pos++, token = 35 /* AsteriskToken */; - case 43 /* plus */: - if (text.charCodeAt(pos + 1) === 43 /* plus */) { - return pos += 2, token = 38 /* PlusPlusToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 54 /* PlusEqualsToken */; - } - return pos++, token = 33 /* PlusToken */; - case 44 /* comma */: - return pos++, token = 23 /* CommaToken */; - case 45 /* minus */: - if (text.charCodeAt(pos + 1) === 45 /* minus */) { - return pos += 2, token = 39 /* MinusMinusToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 55 /* MinusEqualsToken */; - } - return pos++, token = 34 /* MinusToken */; - case 46 /* dot */: - if (isDigit(text.charCodeAt(pos + 1))) { - tokenValue = "" + scanNumber(); - return token = 7 /* NumericLiteral */; - } - if (text.charCodeAt(pos + 1) === 46 /* dot */ && text.charCodeAt(pos + 2) === 46 /* dot */) { - return pos += 3, token = 21 /* DotDotDotToken */; - } - return pos++, token = 20 /* DotToken */; - case 47 /* slash */: - // Single-line comment - if (text.charCodeAt(pos + 1) === 47 /* slash */) { - pos += 2; - while (pos < end) { - if (isLineBreak(text.charCodeAt(pos))) { - break; - } - pos++; - } - if (skipTrivia) { - continue; - } - else { - return token = 2 /* SingleLineCommentTrivia */; - } - } - // Multi-line comment - if (text.charCodeAt(pos + 1) === 42 /* asterisk */) { - pos += 2; - var commentClosed = false; - while (pos < end) { - var ch_2 = text.charCodeAt(pos); - if (ch_2 === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) { - pos += 2; - commentClosed = true; - break; - } - if (isLineBreak(ch_2)) { - precedingLineBreak = true; - } - pos++; - } - if (!commentClosed) { - error(ts.Diagnostics.Asterisk_Slash_expected); - } - if (skipTrivia) { - continue; - } - else { - tokenIsUnterminated = !commentClosed; - return token = 3 /* MultiLineCommentTrivia */; - } - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 57 /* SlashEqualsToken */; - } - return pos++, token = 36 /* SlashToken */; - case 48 /* _0 */: - if (pos + 2 < end && (text.charCodeAt(pos + 1) === 88 /* X */ || text.charCodeAt(pos + 1) === 120 /* x */)) { - pos += 2; - var value = scanMinimumNumberOfHexDigits(1); - if (value < 0) { - error(ts.Diagnostics.Hexadecimal_digit_expected); - value = 0; - } - tokenValue = "" + value; - return token = 7 /* NumericLiteral */; - } - else if (pos + 2 < end && (text.charCodeAt(pos + 1) === 66 /* B */ || text.charCodeAt(pos + 1) === 98 /* b */)) { - pos += 2; - var value = scanBinaryOrOctalDigits(2); - if (value < 0) { - error(ts.Diagnostics.Binary_digit_expected); - value = 0; - } - tokenValue = "" + value; - return token = 7 /* NumericLiteral */; - } - else if (pos + 2 < end && (text.charCodeAt(pos + 1) === 79 /* O */ || text.charCodeAt(pos + 1) === 111 /* o */)) { - pos += 2; - var value = scanBinaryOrOctalDigits(8); - if (value < 0) { - error(ts.Diagnostics.Octal_digit_expected); - value = 0; - } - tokenValue = "" + value; - return token = 7 /* NumericLiteral */; - } - // Try to parse as an octal - if (pos + 1 < end && isOctalDigit(text.charCodeAt(pos + 1))) { - tokenValue = "" + scanOctalDigits(); - return token = 7 /* NumericLiteral */; - } - // This fall-through is a deviation from the EcmaScript grammar. The grammar says that a leading zero - // can only be followed by an octal digit, a dot, or the end of the number literal. However, we are being - // permissive and allowing decimal digits of the form 08* and 09* (which many browsers also do). - case 49 /* _1 */: - case 50 /* _2 */: - case 51 /* _3 */: - case 52 /* _4 */: - case 53 /* _5 */: - case 54 /* _6 */: - case 55 /* _7 */: - case 56 /* _8 */: - case 57 /* _9 */: - tokenValue = "" + scanNumber(); - return token = 7 /* NumericLiteral */; - case 58 /* colon */: - return pos++, token = 51 /* ColonToken */; - case 59 /* semicolon */: - return pos++, token = 22 /* SemicolonToken */; - case 60 /* lessThan */: - if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos, error); - if (skipTrivia) { - continue; - } - else { - return token = 6 /* ConflictMarkerTrivia */; - } - } - if (text.charCodeAt(pos + 1) === 60 /* lessThan */) { - if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 59 /* LessThanLessThanEqualsToken */; - } - return pos += 2, token = 40 /* LessThanLessThanToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 26 /* LessThanEqualsToken */; - } - return pos++, token = 24 /* LessThanToken */; - case 61 /* equals */: - if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos, error); - if (skipTrivia) { - continue; - } - else { - return token = 6 /* ConflictMarkerTrivia */; - } - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 30 /* EqualsEqualsEqualsToken */; - } - return pos += 2, token = 28 /* EqualsEqualsToken */; - } - if (text.charCodeAt(pos + 1) === 62 /* greaterThan */) { - return pos += 2, token = 32 /* EqualsGreaterThanToken */; - } - return pos++, token = 53 /* EqualsToken */; - case 62 /* greaterThan */: - if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos, error); - if (skipTrivia) { - continue; - } - else { - return token = 6 /* ConflictMarkerTrivia */; - } - } - return pos++, token = 25 /* GreaterThanToken */; - case 63 /* question */: - return pos++, token = 50 /* QuestionToken */; - case 91 /* openBracket */: - return pos++, token = 18 /* OpenBracketToken */; - case 93 /* closeBracket */: - return pos++, token = 19 /* CloseBracketToken */; - case 94 /* caret */: - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 64 /* CaretEqualsToken */; - } - return pos++, token = 45 /* CaretToken */; - case 123 /* openBrace */: - return pos++, token = 14 /* OpenBraceToken */; - case 124 /* bar */: - if (text.charCodeAt(pos + 1) === 124 /* bar */) { - return pos += 2, token = 49 /* BarBarToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 63 /* BarEqualsToken */; - } - return pos++, token = 44 /* BarToken */; - case 125 /* closeBrace */: - return pos++, token = 15 /* CloseBraceToken */; - case 126 /* tilde */: - return pos++, token = 47 /* TildeToken */; - case 64 /* at */: - return pos++, token = 52 /* AtToken */; - case 92 /* backslash */: - var cookedChar = peekUnicodeEscape(); - if (cookedChar >= 0 && isIdentifierStart(cookedChar)) { - pos += 6; - tokenValue = String.fromCharCode(cookedChar) + scanIdentifierParts(); - return token = getIdentifierToken(); - } - error(ts.Diagnostics.Invalid_character); - return pos++, token = 0 /* Unknown */; - default: - if (isIdentifierStart(ch)) { - pos++; - while (pos < end && isIdentifierPart(ch = text.charCodeAt(pos))) - pos++; - tokenValue = text.substring(tokenPos, pos); - if (ch === 92 /* backslash */) { - tokenValue += scanIdentifierParts(); - } - return token = getIdentifierToken(); - } - else if (isWhiteSpace(ch)) { - pos++; - continue; - } - else if (isLineBreak(ch)) { - precedingLineBreak = true; - pos++; - continue; - } - error(ts.Diagnostics.Invalid_character); - return pos++, token = 0 /* Unknown */; - } - } - } - function reScanGreaterToken() { - if (token === 25 /* GreaterThanToken */) { - if (text.charCodeAt(pos) === 62 /* greaterThan */) { - if (text.charCodeAt(pos + 1) === 62 /* greaterThan */) { - if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 61 /* GreaterThanGreaterThanGreaterThanEqualsToken */; - } - return pos += 2, token = 42 /* GreaterThanGreaterThanGreaterThanToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 60 /* GreaterThanGreaterThanEqualsToken */; - } - return pos++, token = 41 /* GreaterThanGreaterThanToken */; - } - if (text.charCodeAt(pos) === 61 /* equals */) { - return pos++, token = 27 /* GreaterThanEqualsToken */; - } - } - return token; - } - function reScanSlashToken() { - if (token === 36 /* SlashToken */ || token === 57 /* SlashEqualsToken */) { - var p = tokenPos + 1; - var inEscape = false; - var inCharacterClass = false; - while (true) { - // If we reach the end of a file, or hit a newline, then this is an unterminated - // regex. Report error and return what we have so far. - if (p >= end) { - tokenIsUnterminated = true; - error(ts.Diagnostics.Unterminated_regular_expression_literal); - break; - } - var ch = text.charCodeAt(p); - if (isLineBreak(ch)) { - tokenIsUnterminated = true; - error(ts.Diagnostics.Unterminated_regular_expression_literal); - break; - } - if (inEscape) { - // Parsing an escape character; - // reset the flag and just advance to the next char. - inEscape = false; - } - else if (ch === 47 /* slash */ && !inCharacterClass) { - // A slash within a character class is permissible, - // but in general it signals the end of the regexp literal. - p++; - break; - } - else if (ch === 91 /* openBracket */) { - inCharacterClass = true; - } - else if (ch === 92 /* backslash */) { - inEscape = true; - } - else if (ch === 93 /* closeBracket */) { - inCharacterClass = false; - } - p++; - } - while (p < end && isIdentifierPart(text.charCodeAt(p))) { - p++; - } - pos = p; - tokenValue = text.substring(tokenPos, pos); - token = 9 /* RegularExpressionLiteral */; - } - return token; - } - /** - * Unconditionally back up and scan a template expression portion. - */ - function reScanTemplateToken() { - ts.Debug.assert(token === 15 /* CloseBraceToken */, "'reScanTemplateToken' should only be called on a '}'"); - pos = tokenPos; - return token = scanTemplateAndSetTokenValue(); - } - function speculationHelper(callback, isLookahead) { - var savePos = pos; - var saveStartPos = startPos; - var saveTokenPos = tokenPos; - var saveToken = token; - var saveTokenValue = tokenValue; - var savePrecedingLineBreak = precedingLineBreak; - var result = callback(); - // If our callback returned something 'falsy' or we're just looking ahead, - // then unconditionally restore us to where we were. - if (!result || isLookahead) { - pos = savePos; - startPos = saveStartPos; - tokenPos = saveTokenPos; - token = saveToken; - tokenValue = saveTokenValue; - precedingLineBreak = savePrecedingLineBreak; - } - return result; - } - function lookAhead(callback) { - return speculationHelper(callback, true); - } - function tryScan(callback) { - return speculationHelper(callback, false); - } - function setText(newText, start, length) { - text = newText || ""; - end = length === undefined ? text.length : start + length; - setTextPos(start || 0); - } - function setOnError(errorCallback) { - onError = errorCallback; - } - function setScriptTarget(scriptTarget) { - languageVersion = scriptTarget; - } - function setTextPos(textPos) { - ts.Debug.assert(textPos >= 0); - pos = textPos; - startPos = textPos; - tokenPos = textPos; - token = 0 /* Unknown */; - precedingLineBreak = false; - tokenValue = undefined; - hasExtendedUnicodeEscape = false; - tokenIsUnterminated = false; - } - } - ts.createScanner = createScanner; -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - ts.bindTime = 0; - (function (ModuleInstanceState) { - ModuleInstanceState[ModuleInstanceState["NonInstantiated"] = 0] = "NonInstantiated"; - ModuleInstanceState[ModuleInstanceState["Instantiated"] = 1] = "Instantiated"; - ModuleInstanceState[ModuleInstanceState["ConstEnumOnly"] = 2] = "ConstEnumOnly"; - })(ts.ModuleInstanceState || (ts.ModuleInstanceState = {})); - var ModuleInstanceState = ts.ModuleInstanceState; - function getModuleInstanceState(node) { - // A module is uninstantiated if it contains only - // 1. interface declarations, type alias declarations - if (node.kind === 205 /* InterfaceDeclaration */ || node.kind === 206 /* TypeAliasDeclaration */) { - return 0 /* NonInstantiated */; - } - else if (ts.isConstEnumDeclaration(node)) { - return 2 /* ConstEnumOnly */; - } - else if ((node.kind === 212 /* ImportDeclaration */ || node.kind === 211 /* ImportEqualsDeclaration */) && !(node.flags & 1 /* Export */)) { - return 0 /* NonInstantiated */; - } - else if (node.kind === 209 /* ModuleBlock */) { - var state = 0 /* NonInstantiated */; - ts.forEachChild(node, function (n) { - switch (getModuleInstanceState(n)) { - case 0 /* NonInstantiated */: - // child is non-instantiated - continue searching - return false; - case 2 /* ConstEnumOnly */: - // child is const enum only - record state and continue searching - state = 2 /* ConstEnumOnly */; - return false; - case 1 /* Instantiated */: - // child is instantiated - record state and stop - state = 1 /* Instantiated */; - return true; - } - }); - return state; - } - else if (node.kind === 208 /* ModuleDeclaration */) { - return getModuleInstanceState(node.body); - } - else { - return 1 /* Instantiated */; - } - } - ts.getModuleInstanceState = getModuleInstanceState; - var ContainerFlags; - (function (ContainerFlags) { - // The current node is not a container, and no container manipulation should happen before - // recursing into it. - ContainerFlags[ContainerFlags["None"] = 0] = "None"; - // The current node is a container. It should be set as the current container (and block- - // container) before recursing into it. The current node does not have locals. Examples: - // - // Classes, ObjectLiterals, TypeLiterals, Interfaces... - ContainerFlags[ContainerFlags["IsContainer"] = 1] = "IsContainer"; - // The current node is a block-scoped-container. It should be set as the current block- - // container before recursing into it. Examples: - // - // Blocks (when not parented by functions), Catch clauses, For/For-in/For-of statements... - ContainerFlags[ContainerFlags["IsBlockScopedContainer"] = 2] = "IsBlockScopedContainer"; - ContainerFlags[ContainerFlags["HasLocals"] = 4] = "HasLocals"; - // If the current node is a container that also container that also contains locals. Examples: - // - // Functions, Methods, Modules, Source-files. - ContainerFlags[ContainerFlags["IsContainerWithLocals"] = 5] = "IsContainerWithLocals"; - })(ContainerFlags || (ContainerFlags = {})); - function bindSourceFile(file) { - var start = new Date().getTime(); - bindSourceFileWorker(file); - ts.bindTime += new Date().getTime() - start; - } - ts.bindSourceFile = bindSourceFile; - function bindSourceFileWorker(file) { - var parent; - var container; - var blockScopeContainer; - var lastContainer; - var symbolCount = 0; - var Symbol = ts.objectAllocator.getSymbolConstructor(); - var classifiableNames = {}; - if (!file.locals) { - bind(file); - file.symbolCount = symbolCount; - file.classifiableNames = classifiableNames; - } - return; - function createSymbol(flags, name) { - symbolCount++; - return new Symbol(flags, name); - } - function addDeclarationToSymbol(symbol, node, symbolFlags) { - symbol.flags |= symbolFlags; - node.symbol = symbol; - if (!symbol.declarations) { - symbol.declarations = []; - } - symbol.declarations.push(node); - if (symbolFlags & 1952 /* HasExports */ && !symbol.exports) { - symbol.exports = {}; - } - if (symbolFlags & 6240 /* HasMembers */ && !symbol.members) { - symbol.members = {}; - } - if (symbolFlags & 107455 /* Value */ && !symbol.valueDeclaration) { - symbol.valueDeclaration = node; - } - } - // Should not be called on a declaration with a computed property name, - // unless it is a well known Symbol. - function getDeclarationName(node) { - if (node.name) { - if (node.kind === 208 /* ModuleDeclaration */ && node.name.kind === 8 /* StringLiteral */) { - return '"' + node.name.text + '"'; - } - if (node.name.kind === 129 /* ComputedPropertyName */) { - var nameExpression = node.name.expression; - ts.Debug.assert(ts.isWellKnownSymbolSyntactically(nameExpression)); - return ts.getPropertyNameForKnownSymbolName(nameExpression.name.text); - } - return node.name.text; - } - switch (node.kind) { - case 137 /* Constructor */: - return "__constructor"; - case 145 /* FunctionType */: - case 140 /* CallSignature */: - return "__call"; - case 146 /* ConstructorType */: - case 141 /* ConstructSignature */: - return "__new"; - case 142 /* IndexSignature */: - return "__index"; - case 218 /* ExportDeclaration */: - return "__export"; - case 217 /* ExportAssignment */: - return node.isExportEquals ? "export=" : "default"; - case 203 /* FunctionDeclaration */: - case 204 /* ClassDeclaration */: - return node.flags & 256 /* Default */ ? "default" : undefined; - } - } - function getDisplayName(node) { - return node.name ? ts.declarationNameToString(node.name) : getDeclarationName(node); - } - function declareSymbol(symbolTable, parent, node, includes, excludes) { - ts.Debug.assert(!ts.hasDynamicName(node)); - // The exported symbol for an export default function/class node is always named "default" - var name = node.flags & 256 /* Default */ && parent ? "default" : getDeclarationName(node); - var symbol; - if (name !== undefined) { - // Check and see if the symbol table already has a symbol with this name. If not, - // create a new symbol with this name and add it to the table. Note that we don't - // give the new symbol any flags *yet*. This ensures that it will not conflict - // witht he 'excludes' flags we pass in. - // - // If we do get an existing symbol, see if it conflicts with the new symbol we're - // creating. For example, a 'var' symbol and a 'class' symbol will conflict within - // the same symbol table. If we have a conflict, report the issue on each - // declaration we have for this symbol, and then create a new symbol for this - // declaration. - // - // If we created a new symbol, either because we didn't have a symbol with this name - // in the symbol table, or we conflicted with an existing symbol, then just add this - // node as the sole declaration of the new symbol. - // - // Otherwise, we'll be merging into a compatible existing symbol (for example when - // you have multiple 'vars' with the same name in the same container). In this case - // just add this node into the declarations list of the symbol. - symbol = ts.hasProperty(symbolTable, name) - ? symbolTable[name] - : (symbolTable[name] = createSymbol(0 /* None */, name)); - if (name && (includes & 788448 /* Classifiable */)) { - classifiableNames[name] = name; - } - if (symbol.flags & excludes) { - if (node.name) { - node.name.parent = node; - } - // Report errors every position with duplicate declaration - // Report errors on previous encountered declarations - var message = symbol.flags & 2 /* BlockScopedVariable */ - ? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0 - : ts.Diagnostics.Duplicate_identifier_0; - ts.forEach(symbol.declarations, function (declaration) { - file.bindDiagnostics.push(ts.createDiagnosticForNode(declaration.name || declaration, message, getDisplayName(declaration))); - }); - file.bindDiagnostics.push(ts.createDiagnosticForNode(node.name || node, message, getDisplayName(node))); - symbol = createSymbol(0 /* None */, name); - } - } - else { - symbol = createSymbol(0 /* None */, "__missing"); - } - addDeclarationToSymbol(symbol, node, includes); - symbol.parent = parent; - return symbol; - } - function declareModuleMember(node, symbolFlags, symbolExcludes) { - var hasExportModifier = ts.getCombinedNodeFlags(node) & 1 /* Export */; - if (symbolFlags & 8388608 /* Alias */) { - if (node.kind === 220 /* ExportSpecifier */ || (node.kind === 211 /* ImportEqualsDeclaration */ && hasExportModifier)) { - return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - } - else { - return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes); - } - } - else { - // Exported module members are given 2 symbols: A local symbol that is classified with an ExportValue, - // ExportType, or ExportContainer flag, and an associated export symbol with all the correct flags set - // on it. There are 2 main reasons: - // - // 1. We treat locals and exports of the same name as mutually exclusive within a container. - // That means the binder will issue a Duplicate Identifier error if you mix locals and exports - // with the same name in the same container. - // TODO: Make this a more specific error and decouple it from the exclusion logic. - // 2. When we checkIdentifier in the checker, we set its resolved symbol to the local symbol, - // but return the export symbol (by calling getExportSymbolOfValueSymbolIfExported). That way - // when the emitter comes back to it, it knows not to qualify the name if it was found in a containing scope. - if (hasExportModifier || container.flags & 65536 /* ExportContext */) { - var exportKind = (symbolFlags & 107455 /* Value */ ? 1048576 /* ExportValue */ : 0) | - (symbolFlags & 793056 /* Type */ ? 2097152 /* ExportType */ : 0) | - (symbolFlags & 1536 /* Namespace */ ? 4194304 /* ExportNamespace */ : 0); - var local = declareSymbol(container.locals, undefined, node, exportKind, symbolExcludes); - local.exportSymbol = declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - node.localSymbol = local; - return local; - } - else { - return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes); - } - } - } - // All container nodes are kept on a linked list in declaration order. This list is used by - // the getLocalNameOfContainer function in the type checker to validate that the local name - // used for a container is unique. - function bindChildren(node) { - // Before we recurse into a node's chilren, we first save the existing parent, container - // and block-container. Then after we pop out of processing the children, we restore - // these saved values. - var saveParent = parent; - var saveContainer = container; - var savedBlockScopeContainer = blockScopeContainer; - // This node will now be set as the parent of all of its children as we recurse into them. - parent = node; - // Depending on what kind of node this is, we may have to adjust the current container - // and block-container. If the current node is a container, then it is automatically - // considered the current block-container as well. Also, for containers that we know - // may contain locals, we proactively initialize the .locals field. We do this because - // it's highly likely that the .locals will be needed to place some child in (for example, - // a parameter, or variable declaration). - // - // However, we do not proactively create the .locals for block-containers because it's - // totally normal and common for block-containers to never actually have a block-scoped - // variable in them. We don't want to end up allocating an object for every 'block' we - // run into when most of them won't be necessary. - // - // Finally, if this is a block-container, then we clear out any existing .locals object - // it may contain within it. This happens in incremental scenarios. Because we can be - // reusing a node from a previous compilation, that node may have had 'locals' created - // for it. We must clear this so we don't accidently move any stale data forward from - // a previous compilation. - var containerFlags = getContainerFlags(node); - if (containerFlags & 1 /* IsContainer */) { - container = blockScopeContainer = node; - if (containerFlags & 4 /* HasLocals */) { - container.locals = {}; - } - addToContainerChain(container); - } - else if (containerFlags & 2 /* IsBlockScopedContainer */) { - blockScopeContainer = node; - blockScopeContainer.locals = undefined; - } - ts.forEachChild(node, bind); - container = saveContainer; - parent = saveParent; - blockScopeContainer = savedBlockScopeContainer; - } - function getContainerFlags(node) { - switch (node.kind) { - case 177 /* ClassExpression */: - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - case 207 /* EnumDeclaration */: - case 148 /* TypeLiteral */: - case 157 /* ObjectLiteralExpression */: - return 1 /* IsContainer */; - case 140 /* CallSignature */: - case 141 /* ConstructSignature */: - case 142 /* IndexSignature */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 203 /* FunctionDeclaration */: - case 137 /* Constructor */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 145 /* FunctionType */: - case 146 /* ConstructorType */: - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - case 208 /* ModuleDeclaration */: - case 230 /* SourceFile */: - case 206 /* TypeAliasDeclaration */: - return 5 /* IsContainerWithLocals */; - case 226 /* CatchClause */: - case 189 /* ForStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - case 210 /* CaseBlock */: - return 2 /* IsBlockScopedContainer */; - case 182 /* Block */: - // do not treat blocks directly inside a function as a block-scoped-container. - // Locals that reside in this block should go to the function locals. Othewise 'x' - // would not appear to be a redeclaration of a block scoped local in the following - // example: - // - // function foo() { - // var x; - // let x; - // } - // - // If we placed 'var x' into the function locals and 'let x' into the locals of - // the block, then there would be no collision. - // - // By not creating a new block-scoped-container here, we ensure that both 'var x' - // and 'let x' go into the Function-container's locals, and we do get a collision - // conflict. - return ts.isFunctionLike(node.parent) ? 0 /* None */ : 2 /* IsBlockScopedContainer */; - } - return 0 /* None */; - } - function addToContainerChain(next) { - if (lastContainer) { - lastContainer.nextContainer = next; - } - lastContainer = next; - } - function declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes) { - // Just call this directly so that the return type of this function stays "void". - declareSymbolAndAddToSymbolTableWorker(node, symbolFlags, symbolExcludes); - } - function declareSymbolAndAddToSymbolTableWorker(node, symbolFlags, symbolExcludes) { - switch (container.kind) { - // Modules, source files, and classes need specialized handling for how their - // members are declared (for example, a member of a class will go into a specific - // symbol table depending on if it is static or not). We defer to specialized - // handlers to take care of declaring these child members. - case 208 /* ModuleDeclaration */: - return declareModuleMember(node, symbolFlags, symbolExcludes); - case 230 /* SourceFile */: - return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 177 /* ClassExpression */: - case 204 /* ClassDeclaration */: - return declareClassMember(node, symbolFlags, symbolExcludes); - case 207 /* EnumDeclaration */: - return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 148 /* TypeLiteral */: - case 157 /* ObjectLiteralExpression */: - case 205 /* InterfaceDeclaration */: - // Interface/Object-types always have their children added to the 'members' of - // their container. They are only accessible through an instance of their - // container, and are never in scope otherwise (even inside the body of the - // object / type / interface declaring them). An exception is type parameters, - // which are in scope without qualification (similar to 'locals'). - return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 145 /* FunctionType */: - case 146 /* ConstructorType */: - case 140 /* CallSignature */: - case 141 /* ConstructSignature */: - case 142 /* IndexSignature */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 137 /* Constructor */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - case 206 /* TypeAliasDeclaration */: - // All the children of these container types are never visible through another - // symbol (i.e. through another symbol's 'exports' or 'members'). Instead, - // they're only accessed 'lexically' (i.e. from code that exists underneath - // their container in the tree. To accomplish this, we simply add their declared - // symbol to the 'locals' of the container. These symbols can then be found as - // the type checker walks up the containers, checking them for matching names. - return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes); - } - } - function declareClassMember(node, symbolFlags, symbolExcludes) { - return node.flags & 128 /* Static */ - ? declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes) - : declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - } - function declareSourceFileMember(node, symbolFlags, symbolExcludes) { - return ts.isExternalModule(file) - ? declareModuleMember(node, symbolFlags, symbolExcludes) - : declareSymbol(file.locals, undefined, node, symbolFlags, symbolExcludes); - } - function isAmbientContext(node) { - while (node) { - if (node.flags & 2 /* Ambient */) { - return true; - } - node = node.parent; - } - return false; - } - function hasExportDeclarations(node) { - var body = node.kind === 230 /* SourceFile */ ? node : node.body; - if (body.kind === 230 /* SourceFile */ || body.kind === 209 /* ModuleBlock */) { - for (var _i = 0, _a = body.statements; _i < _a.length; _i++) { - var stat = _a[_i]; - if (stat.kind === 218 /* ExportDeclaration */ || stat.kind === 217 /* ExportAssignment */) { - return true; - } - } - } - return false; - } - function setExportContextFlag(node) { - // A declaration source file or ambient module declaration that contains no export declarations (but possibly regular - // declarations with export modifiers) is an export context in which declarations are implicitly exported. - if (isAmbientContext(node) && !hasExportDeclarations(node)) { - node.flags |= 65536 /* ExportContext */; - } - else { - node.flags &= ~65536 /* ExportContext */; - } - } - function bindModuleDeclaration(node) { - setExportContextFlag(node); - if (node.name.kind === 8 /* StringLiteral */) { - declareSymbolAndAddToSymbolTable(node, 512 /* ValueModule */, 106639 /* ValueModuleExcludes */); - } - else { - var state = getModuleInstanceState(node); - if (state === 0 /* NonInstantiated */) { - declareSymbolAndAddToSymbolTable(node, 1024 /* NamespaceModule */, 0 /* NamespaceModuleExcludes */); - } - else { - declareSymbolAndAddToSymbolTable(node, 512 /* ValueModule */, 106639 /* ValueModuleExcludes */); - var currentModuleIsConstEnumOnly = state === 2 /* ConstEnumOnly */; - if (node.symbol.constEnumOnlyModule === undefined) { - // non-merged case - use the current state - node.symbol.constEnumOnlyModule = currentModuleIsConstEnumOnly; - } - else { - // merged case: module is const enum only if all its pieces are non-instantiated or const enum - node.symbol.constEnumOnlyModule = node.symbol.constEnumOnlyModule && currentModuleIsConstEnumOnly; - } - } - } - } - function bindFunctionOrConstructorType(node) { - // For a given function symbol "<...>(...) => T" we want to generate a symbol identical - // to the one we would get for: { <...>(...): T } - // - // We do that by making an anonymous type literal symbol, and then setting the function - // symbol as its sole member. To the rest of the system, this symbol will be indistinguishable - // from an actual type literal symbol you would have gotten had you used the long form. - var symbol = createSymbol(131072 /* Signature */, getDeclarationName(node)); - addDeclarationToSymbol(symbol, node, 131072 /* Signature */); - var typeLiteralSymbol = createSymbol(2048 /* TypeLiteral */, "__type"); - addDeclarationToSymbol(typeLiteralSymbol, node, 2048 /* TypeLiteral */); - typeLiteralSymbol.members = (_a = {}, _a[symbol.name] = symbol, _a); - var _a; - } - function bindAnonymousDeclaration(node, symbolFlags, name) { - var symbol = createSymbol(symbolFlags, name); - addDeclarationToSymbol(symbol, node, symbolFlags); - } - function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { - switch (blockScopeContainer.kind) { - case 208 /* ModuleDeclaration */: - declareModuleMember(node, symbolFlags, symbolExcludes); - break; - case 230 /* SourceFile */: - if (ts.isExternalModule(container)) { - declareModuleMember(node, symbolFlags, symbolExcludes); - break; - } - // fall through. - default: - if (!blockScopeContainer.locals) { - blockScopeContainer.locals = {}; - addToContainerChain(blockScopeContainer); - } - declareSymbol(blockScopeContainer.locals, undefined, node, symbolFlags, symbolExcludes); - } - } - function bindBlockScopedVariableDeclaration(node) { - bindBlockScopedDeclaration(node, 2 /* BlockScopedVariable */, 107455 /* BlockScopedVariableExcludes */); - } - function getDestructuringParameterName(node) { - return "__" + ts.indexOf(node.parent.parameters, node); - } - function bind(node) { - node.parent = parent; - // First we bind declaration nodes to a symbol if possible. We'll both create a symbol - // and then potentially add the symbol to an appropriate symbol table. Possible - // destination symbol tables are: - // - // 1) The 'exports' table of the current container's symbol. - // 2) The 'members' table of the current container's symbol. - // 3) The 'locals' table of the current container. - // - // However, not all symbols will end up in any of these tables. 'Anonymous' symbols - // (like TypeLiterals for example) will not be put in any table. - bindWorker(node); - // Then we recurse into the children of the node to bind them as well. For certain - // symbols we do specialized work when we recurse. For example, we'll keep track of - // the current 'container' node when it changes. This helps us know which symbol table - // a local should go into for example. - bindChildren(node); - } - function bindWorker(node) { - switch (node.kind) { - case 130 /* TypeParameter */: - return declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 530912 /* TypeParameterExcludes */); - case 131 /* Parameter */: - return bindParameter(node); - case 201 /* VariableDeclaration */: - case 155 /* BindingElement */: - return bindVariableDeclarationOrBindingElement(node); - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - return bindPropertyOrMethodOrAccessor(node, 4 /* Property */ | (node.questionToken ? 536870912 /* Optional */ : 0 /* None */), 107455 /* PropertyExcludes */); - case 227 /* PropertyAssignment */: - case 228 /* ShorthandPropertyAssignment */: - return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 107455 /* PropertyExcludes */); - case 229 /* EnumMember */: - return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 107455 /* EnumMemberExcludes */); - case 140 /* CallSignature */: - case 141 /* ConstructSignature */: - case 142 /* IndexSignature */: - return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */); - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - // If this is an ObjectLiteralExpression method, then it sits in the same space - // as other properties in the object literal. So we use SymbolFlags.PropertyExcludes - // so that it will conflict with any other object literal members with the same - // name. - return bindPropertyOrMethodOrAccessor(node, 8192 /* Method */ | (node.questionToken ? 536870912 /* Optional */ : 0 /* None */), ts.isObjectLiteralMethod(node) ? 107455 /* PropertyExcludes */ : 99263 /* MethodExcludes */); - case 203 /* FunctionDeclaration */: - return declareSymbolAndAddToSymbolTable(node, 16 /* Function */, 106927 /* FunctionExcludes */); - case 137 /* Constructor */: - return declareSymbolAndAddToSymbolTable(node, 16384 /* Constructor */, 0 /* None */); - case 138 /* GetAccessor */: - return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 41919 /* GetAccessorExcludes */); - case 139 /* SetAccessor */: - return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 74687 /* SetAccessorExcludes */); - case 145 /* FunctionType */: - case 146 /* ConstructorType */: - return bindFunctionOrConstructorType(node); - case 148 /* TypeLiteral */: - return bindAnonymousDeclaration(node, 2048 /* TypeLiteral */, "__type"); - case 157 /* ObjectLiteralExpression */: - return bindAnonymousDeclaration(node, 4096 /* ObjectLiteral */, "__object"); - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - return bindAnonymousDeclaration(node, 16 /* Function */, "__function"); - case 177 /* ClassExpression */: - case 204 /* ClassDeclaration */: - return bindClassLikeDeclaration(node); - case 205 /* InterfaceDeclaration */: - return bindBlockScopedDeclaration(node, 64 /* Interface */, 792992 /* InterfaceExcludes */); - case 206 /* TypeAliasDeclaration */: - return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 793056 /* TypeAliasExcludes */); - case 207 /* EnumDeclaration */: - return bindEnumDeclaration(node); - case 208 /* ModuleDeclaration */: - return bindModuleDeclaration(node); - case 211 /* ImportEqualsDeclaration */: - case 214 /* NamespaceImport */: - case 216 /* ImportSpecifier */: - case 220 /* ExportSpecifier */: - return declareSymbolAndAddToSymbolTable(node, 8388608 /* Alias */, 8388608 /* AliasExcludes */); - case 213 /* ImportClause */: - return bindImportClause(node); - case 218 /* ExportDeclaration */: - return bindExportDeclaration(node); - case 217 /* ExportAssignment */: - return bindExportAssignment(node); - case 230 /* SourceFile */: - return bindSourceFileIfExternalModule(); - } - } - function bindSourceFileIfExternalModule() { - setExportContextFlag(file); - if (ts.isExternalModule(file)) { - bindAnonymousDeclaration(file, 512 /* ValueModule */, '"' + ts.removeFileExtension(file.fileName) + '"'); - } - } - function bindExportAssignment(node) { - if (!container.symbol || !container.symbol.exports) { - // Export assignment in some sort of block construct - bindAnonymousDeclaration(node, 8388608 /* Alias */, getDeclarationName(node)); - } - else if (node.expression.kind === 65 /* Identifier */) { - // An export default clause with an identifier exports all meanings of that identifier - declareSymbol(container.symbol.exports, container.symbol, node, 8388608 /* Alias */, 107455 /* PropertyExcludes */ | 8388608 /* AliasExcludes */); - } - else { - // An export default clause with an expression exports a value - declareSymbol(container.symbol.exports, container.symbol, node, 4 /* Property */, 107455 /* PropertyExcludes */ | 8388608 /* AliasExcludes */); - } - } - function bindExportDeclaration(node) { - if (!container.symbol || !container.symbol.exports) { - // Export * in some sort of block construct - bindAnonymousDeclaration(node, 1073741824 /* ExportStar */, getDeclarationName(node)); - } - else if (!node.exportClause) { - // All export * declarations are collected in an __export symbol - declareSymbol(container.symbol.exports, container.symbol, node, 1073741824 /* ExportStar */, 0 /* None */); - } - } - function bindImportClause(node) { - if (node.name) { - declareSymbolAndAddToSymbolTable(node, 8388608 /* Alias */, 8388608 /* AliasExcludes */); - } - } - function bindClassLikeDeclaration(node) { - if (node.kind === 204 /* ClassDeclaration */) { - bindBlockScopedDeclaration(node, 32 /* Class */, 899583 /* ClassExcludes */); - } - else { - bindAnonymousDeclaration(node, 32 /* Class */, "__class"); - } - var symbol = node.symbol; - // TypeScript 1.0 spec (April 2014): 8.4 - // Every class automatically contains a static property member named 'prototype', the - // type of which is an instantiation of the class type with type Any supplied as a type - // argument for each type parameter. It is an error to explicitly declare a static - // property member with the name 'prototype'. - // - // Note: we check for this here because this class may be merging into a module. The - // module might have an exported variable called 'prototype'. We can't allow that as - // that would clash with the built-in 'prototype' for the class. - var prototypeSymbol = createSymbol(4 /* Property */ | 134217728 /* Prototype */, "prototype"); - if (ts.hasProperty(symbol.exports, prototypeSymbol.name)) { - if (node.name) { - node.name.parent = node; - } - file.bindDiagnostics.push(ts.createDiagnosticForNode(symbol.exports[prototypeSymbol.name].declarations[0], ts.Diagnostics.Duplicate_identifier_0, prototypeSymbol.name)); - } - symbol.exports[prototypeSymbol.name] = prototypeSymbol; - prototypeSymbol.parent = symbol; - } - function bindEnumDeclaration(node) { - return ts.isConst(node) - ? bindBlockScopedDeclaration(node, 128 /* ConstEnum */, 899967 /* ConstEnumExcludes */) - : bindBlockScopedDeclaration(node, 256 /* RegularEnum */, 899327 /* RegularEnumExcludes */); - } - function bindVariableDeclarationOrBindingElement(node) { - if (!ts.isBindingPattern(node.name)) { - if (ts.isBlockOrCatchScoped(node)) { - bindBlockScopedVariableDeclaration(node); - } - else if (ts.isParameterDeclaration(node)) { - // It is safe to walk up parent chain to find whether the node is a destructing parameter declaration - // because its parent chain has already been set up, since parents are set before descending into children. - // - // If node is a binding element in parameter declaration, we need to use ParameterExcludes. - // Using ParameterExcludes flag allows the compiler to report an error on duplicate identifiers in Parameter Declaration - // For example: - // function foo([a,a]) {} // Duplicate Identifier error - // function bar(a,a) {} // Duplicate Identifier error, parameter declaration in this case is handled in bindParameter - // // which correctly set excluded symbols - declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 107455 /* ParameterExcludes */); - } - else { - declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 107454 /* FunctionScopedVariableExcludes */); - } - } - } - function bindParameter(node) { - if (ts.isBindingPattern(node.name)) { - bindAnonymousDeclaration(node, 1 /* FunctionScopedVariable */, getDestructuringParameterName(node)); - } - else { - declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 107455 /* ParameterExcludes */); - } - // If this is a property-parameter, then also declare the property symbol into the - // containing class. - if (node.flags & 112 /* AccessibilityModifier */ && - node.parent.kind === 137 /* Constructor */ && - (node.parent.parent.kind === 204 /* ClassDeclaration */ || node.parent.parent.kind === 177 /* ClassExpression */)) { - var classDeclaration = node.parent.parent; - declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4 /* Property */, 107455 /* PropertyExcludes */); - } - } - function bindPropertyOrMethodOrAccessor(node, symbolFlags, symbolExcludes) { - return ts.hasDynamicName(node) - ? bindAnonymousDeclaration(node, symbolFlags, "__computed") - : declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes); - } - } -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - function getDeclarationOfKind(symbol, kind) { - var declarations = symbol.declarations; - for (var _i = 0; _i < declarations.length; _i++) { - var declaration = declarations[_i]; - if (declaration.kind === kind) { - return declaration; - } - } - return undefined; - } - ts.getDeclarationOfKind = getDeclarationOfKind; - // Pool writers to avoid needing to allocate them for every symbol we write. - var stringWriters = []; - function getSingleLineStringWriter() { - if (stringWriters.length == 0) { - var str = ""; - var writeText = function (text) { return str += text; }; - return { - string: function () { return str; }, - writeKeyword: writeText, - writeOperator: writeText, - writePunctuation: writeText, - writeSpace: writeText, - writeStringLiteral: writeText, - writeParameter: writeText, - writeSymbol: writeText, - // Completely ignore indentation for string writers. And map newlines to - // a single space. - writeLine: function () { return str += " "; }, - increaseIndent: function () { }, - decreaseIndent: function () { }, - clear: function () { return str = ""; }, - trackSymbol: function () { } - }; - } - return stringWriters.pop(); - } - ts.getSingleLineStringWriter = getSingleLineStringWriter; - function releaseStringWriter(writer) { - writer.clear(); - stringWriters.push(writer); - } - ts.releaseStringWriter = releaseStringWriter; - function getFullWidth(node) { - return node.end - node.pos; - } - ts.getFullWidth = getFullWidth; - // Returns true if this node contains a parse error anywhere underneath it. - function containsParseError(node) { - aggregateChildData(node); - return (node.parserContextFlags & 128 /* ThisNodeOrAnySubNodesHasError */) !== 0; - } - ts.containsParseError = containsParseError; - function aggregateChildData(node) { - if (!(node.parserContextFlags & 256 /* HasAggregatedChildData */)) { - // A node is considered to contain a parse error if: - // a) the parser explicitly marked that it had an error - // b) any of it's children reported that it had an error. - var thisNodeOrAnySubNodesHasError = ((node.parserContextFlags & 32 /* ThisNodeHasError */) !== 0) || - ts.forEachChild(node, containsParseError); - // If so, mark ourselves accordingly. - if (thisNodeOrAnySubNodesHasError) { - node.parserContextFlags |= 128 /* ThisNodeOrAnySubNodesHasError */; - } - // Also mark that we've propogated the child information to this node. This way we can - // always consult the bit directly on this node without needing to check its children - // again. - node.parserContextFlags |= 256 /* HasAggregatedChildData */; - } - } - function getSourceFileOfNode(node) { - while (node && node.kind !== 230 /* SourceFile */) { - node = node.parent; - } - return node; - } - ts.getSourceFileOfNode = getSourceFileOfNode; - function getStartPositionOfLine(line, sourceFile) { - ts.Debug.assert(line >= 0); - return ts.getLineStarts(sourceFile)[line]; - } - ts.getStartPositionOfLine = getStartPositionOfLine; - // This is a useful function for debugging purposes. - function nodePosToString(node) { - var file = getSourceFileOfNode(node); - var loc = ts.getLineAndCharacterOfPosition(file, node.pos); - return file.fileName + "(" + (loc.line + 1) + "," + (loc.character + 1) + ")"; - } - ts.nodePosToString = nodePosToString; - function getStartPosOfNode(node) { - return node.pos; - } - ts.getStartPosOfNode = getStartPosOfNode; - // Returns true if this node is missing from the actual source code. 'missing' is different - // from 'undefined/defined'. When a node is undefined (which can happen for optional nodes - // in the tree), it is definitel missing. HOwever, a node may be defined, but still be - // missing. This happens whenever the parser knows it needs to parse something, but can't - // get anything in the source code that it expects at that location. For example: - // - // let a: ; - // - // Here, the Type in the Type-Annotation is not-optional (as there is a colon in the source - // code). So the parser will attempt to parse out a type, and will create an actual node. - // However, this node will be 'missing' in the sense that no actual source-code/tokens are - // contained within it. - function nodeIsMissing(node) { - if (!node) { - return true; - } - return node.pos === node.end && node.kind !== 1 /* EndOfFileToken */; - } - ts.nodeIsMissing = nodeIsMissing; - function nodeIsPresent(node) { - return !nodeIsMissing(node); - } - ts.nodeIsPresent = nodeIsPresent; - function getTokenPosOfNode(node, sourceFile) { - // With nodes that have no width (i.e. 'Missing' nodes), we actually *don't* - // want to skip trivia because this will launch us forward to the next token. - if (nodeIsMissing(node)) { - return node.pos; - } - return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); - } - ts.getTokenPosOfNode = getTokenPosOfNode; - function getNonDecoratorTokenPosOfNode(node, sourceFile) { - if (nodeIsMissing(node) || !node.decorators) { - return getTokenPosOfNode(node, sourceFile); - } - return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.decorators.end); - } - ts.getNonDecoratorTokenPosOfNode = getNonDecoratorTokenPosOfNode; - function getSourceTextOfNodeFromSourceFile(sourceFile, node) { - if (nodeIsMissing(node)) { - return ""; - } - var text = sourceFile.text; - return text.substring(ts.skipTrivia(text, node.pos), node.end); - } - ts.getSourceTextOfNodeFromSourceFile = getSourceTextOfNodeFromSourceFile; - function getTextOfNodeFromSourceText(sourceText, node) { - if (nodeIsMissing(node)) { - return ""; - } - return sourceText.substring(ts.skipTrivia(sourceText, node.pos), node.end); - } - ts.getTextOfNodeFromSourceText = getTextOfNodeFromSourceText; - function getTextOfNode(node) { - return getSourceTextOfNodeFromSourceFile(getSourceFileOfNode(node), node); - } - ts.getTextOfNode = getTextOfNode; - // Add an extra underscore to identifiers that start with two underscores to avoid issues with magic names like '__proto__' - function escapeIdentifier(identifier) { - return identifier.length >= 2 && identifier.charCodeAt(0) === 95 /* _ */ && identifier.charCodeAt(1) === 95 /* _ */ ? "_" + identifier : identifier; - } - ts.escapeIdentifier = escapeIdentifier; - // Remove extra underscore from escaped identifier - function unescapeIdentifier(identifier) { - return identifier.length >= 3 && identifier.charCodeAt(0) === 95 /* _ */ && identifier.charCodeAt(1) === 95 /* _ */ && identifier.charCodeAt(2) === 95 /* _ */ ? identifier.substr(1) : identifier; - } - ts.unescapeIdentifier = unescapeIdentifier; - // Make an identifier from an external module name by extracting the string after the last "/" and replacing - // all non-alphanumeric characters with underscores - function makeIdentifierFromModuleName(moduleName) { - return ts.getBaseFileName(moduleName).replace(/\W/g, "_"); - } - ts.makeIdentifierFromModuleName = makeIdentifierFromModuleName; - function isBlockOrCatchScoped(declaration) { - return (getCombinedNodeFlags(declaration) & 12288 /* BlockScoped */) !== 0 || - isCatchClauseVariableDeclaration(declaration); - } - ts.isBlockOrCatchScoped = isBlockOrCatchScoped; - // Gets the nearest enclosing block scope container that has the provided node - // as a descendant, that is not the provided node. - function getEnclosingBlockScopeContainer(node) { - var current = node.parent; - while (current) { - if (isFunctionLike(current)) { - return current; - } - switch (current.kind) { - case 230 /* SourceFile */: - case 210 /* CaseBlock */: - case 226 /* CatchClause */: - case 208 /* ModuleDeclaration */: - case 189 /* ForStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - return current; - case 182 /* Block */: - // function block is not considered block-scope container - // see comment in binder.ts: bind(...), case for SyntaxKind.Block - if (!isFunctionLike(current.parent)) { - return current; - } - } - current = current.parent; - } - } - ts.getEnclosingBlockScopeContainer = getEnclosingBlockScopeContainer; - function isCatchClauseVariableDeclaration(declaration) { - return declaration && - declaration.kind === 201 /* VariableDeclaration */ && - declaration.parent && - declaration.parent.kind === 226 /* CatchClause */; - } - ts.isCatchClauseVariableDeclaration = isCatchClauseVariableDeclaration; - // Return display name of an identifier - // Computed property names will just be emitted as "[]", where is the source - // text of the expression in the computed property. - function declarationNameToString(name) { - return getFullWidth(name) === 0 ? "(Missing)" : getTextOfNode(name); - } - ts.declarationNameToString = declarationNameToString; - function createDiagnosticForNode(node, message, arg0, arg1, arg2) { - var sourceFile = getSourceFileOfNode(node); - var span = getErrorSpanForNode(sourceFile, node); - return ts.createFileDiagnostic(sourceFile, span.start, span.length, message, arg0, arg1, arg2); - } - ts.createDiagnosticForNode = createDiagnosticForNode; - function createDiagnosticForNodeFromMessageChain(node, messageChain) { - var sourceFile = getSourceFileOfNode(node); - var span = getErrorSpanForNode(sourceFile, node); - return { - file: sourceFile, - start: span.start, - length: span.length, - code: messageChain.code, - category: messageChain.category, - messageText: messageChain.next ? messageChain : messageChain.messageText - }; - } - ts.createDiagnosticForNodeFromMessageChain = createDiagnosticForNodeFromMessageChain; - function getSpanOfTokenAtPosition(sourceFile, pos) { - var scanner = ts.createScanner(sourceFile.languageVersion, true, sourceFile.text, undefined, pos); - scanner.scan(); - var start = scanner.getTokenPos(); - return ts.createTextSpanFromBounds(start, scanner.getTextPos()); - } - ts.getSpanOfTokenAtPosition = getSpanOfTokenAtPosition; - function getErrorSpanForNode(sourceFile, node) { - var errorNode = node; - switch (node.kind) { - case 230 /* SourceFile */: - var pos_1 = ts.skipTrivia(sourceFile.text, 0, false); - if (pos_1 === sourceFile.text.length) { - // file is empty - return span for the beginning of the file - return ts.createTextSpan(0, 0); - } - return getSpanOfTokenAtPosition(sourceFile, pos_1); - // This list is a work in progress. Add missing node kinds to improve their error - // spans. - case 201 /* VariableDeclaration */: - case 155 /* BindingElement */: - case 204 /* ClassDeclaration */: - case 177 /* ClassExpression */: - case 205 /* InterfaceDeclaration */: - case 208 /* ModuleDeclaration */: - case 207 /* EnumDeclaration */: - case 229 /* EnumMember */: - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - errorNode = node.name; - break; - } - if (errorNode === undefined) { - // If we don't have a better node, then just set the error on the first token of - // construct. - return getSpanOfTokenAtPosition(sourceFile, node.pos); - } - var pos = nodeIsMissing(errorNode) - ? errorNode.pos - : ts.skipTrivia(sourceFile.text, errorNode.pos); - return ts.createTextSpanFromBounds(pos, errorNode.end); - } - ts.getErrorSpanForNode = getErrorSpanForNode; - function isExternalModule(file) { - return file.externalModuleIndicator !== undefined; - } - ts.isExternalModule = isExternalModule; - function isDeclarationFile(file) { - return (file.flags & 2048 /* DeclarationFile */) !== 0; - } - ts.isDeclarationFile = isDeclarationFile; - function isConstEnumDeclaration(node) { - return node.kind === 207 /* EnumDeclaration */ && isConst(node); - } - ts.isConstEnumDeclaration = isConstEnumDeclaration; - function walkUpBindingElementsAndPatterns(node) { - while (node && (node.kind === 155 /* BindingElement */ || isBindingPattern(node))) { - node = node.parent; - } - return node; - } - // Returns the node flags for this node and all relevant parent nodes. This is done so that - // nodes like variable declarations and binding elements can returned a view of their flags - // that includes the modifiers from their container. i.e. flags like export/declare aren't - // stored on the variable declaration directly, but on the containing variable statement - // (if it has one). Similarly, flags for let/const are store on the variable declaration - // list. By calling this function, all those flags are combined so that the client can treat - // the node as if it actually had those flags. - function getCombinedNodeFlags(node) { - node = walkUpBindingElementsAndPatterns(node); - var flags = node.flags; - if (node.kind === 201 /* VariableDeclaration */) { - node = node.parent; - } - if (node && node.kind === 202 /* VariableDeclarationList */) { - flags |= node.flags; - node = node.parent; - } - if (node && node.kind === 183 /* VariableStatement */) { - flags |= node.flags; - } - return flags; - } - ts.getCombinedNodeFlags = getCombinedNodeFlags; - function isConst(node) { - return !!(getCombinedNodeFlags(node) & 8192 /* Const */); - } - ts.isConst = isConst; - function isLet(node) { - return !!(getCombinedNodeFlags(node) & 4096 /* Let */); - } - ts.isLet = isLet; - function isPrologueDirective(node) { - return node.kind === 185 /* ExpressionStatement */ && node.expression.kind === 8 /* StringLiteral */; - } - ts.isPrologueDirective = isPrologueDirective; - function getLeadingCommentRangesOfNode(node, sourceFileOfNode) { - // If parameter/type parameter, the prev token trailing comments are part of this node too - if (node.kind === 131 /* Parameter */ || node.kind === 130 /* TypeParameter */) { - // e.g. (/** blah */ a, /** blah */ b); - // e.g.: ( - // /** blah */ a, - // /** blah */ b); - return ts.concatenate(ts.getTrailingCommentRanges(sourceFileOfNode.text, node.pos), ts.getLeadingCommentRanges(sourceFileOfNode.text, node.pos)); - } - else { - return ts.getLeadingCommentRanges(sourceFileOfNode.text, node.pos); - } - } - ts.getLeadingCommentRangesOfNode = getLeadingCommentRangesOfNode; - function getJsDocComments(node, sourceFileOfNode) { - return ts.filter(getLeadingCommentRangesOfNode(node, sourceFileOfNode), isJsDocComment); - function isJsDocComment(comment) { - // True if the comment starts with '/**' but not if it is '/**/' - return sourceFileOfNode.text.charCodeAt(comment.pos + 1) === 42 /* asterisk */ && - sourceFileOfNode.text.charCodeAt(comment.pos + 2) === 42 /* asterisk */ && - sourceFileOfNode.text.charCodeAt(comment.pos + 3) !== 47 /* slash */; - } - } - ts.getJsDocComments = getJsDocComments; - ts.fullTripleSlashReferencePathRegEx = /^(\/\/\/\s*/; - function isTypeNode(node) { - if (144 /* FirstTypeNode */ <= node.kind && node.kind <= 152 /* LastTypeNode */) { - return true; - } - switch (node.kind) { - case 112 /* AnyKeyword */: - case 121 /* NumberKeyword */: - case 123 /* StringKeyword */: - case 113 /* BooleanKeyword */: - case 124 /* SymbolKeyword */: - return true; - case 99 /* VoidKeyword */: - return node.parent.kind !== 169 /* VoidExpression */; - case 8 /* StringLiteral */: - // Specialized signatures can have string literals as their parameters' type names - return node.parent.kind === 131 /* Parameter */; - case 179 /* ExpressionWithTypeArguments */: - return true; - // Identifiers and qualified names may be type nodes, depending on their context. Climb - // above them to find the lowest container - case 65 /* Identifier */: - // If the identifier is the RHS of a qualified name, then it's a type iff its parent is. - if (node.parent.kind === 128 /* QualifiedName */ && node.parent.right === node) { - node = node.parent; - } - else if (node.parent.kind === 158 /* PropertyAccessExpression */ && node.parent.name === node) { - node = node.parent; - } - // fall through - case 128 /* QualifiedName */: - case 158 /* PropertyAccessExpression */: - // At this point, node is either a qualified name or an identifier - ts.Debug.assert(node.kind === 65 /* Identifier */ || node.kind === 128 /* QualifiedName */ || node.kind === 158 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isTypeNode'."); - var parent_1 = node.parent; - if (parent_1.kind === 147 /* TypeQuery */) { - return false; - } - // Do not recursively call isTypeNode on the parent. In the example: - // - // let a: A.B.C; - // - // Calling isTypeNode would consider the qualified name A.B a type node. Only C or - // A.B.C is a type node. - if (144 /* FirstTypeNode */ <= parent_1.kind && parent_1.kind <= 152 /* LastTypeNode */) { - return true; - } - switch (parent_1.kind) { - case 179 /* ExpressionWithTypeArguments */: - return true; - case 130 /* TypeParameter */: - return node === parent_1.constraint; - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 131 /* Parameter */: - case 201 /* VariableDeclaration */: - return node === parent_1.type; - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - case 137 /* Constructor */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - return node === parent_1.type; - case 140 /* CallSignature */: - case 141 /* ConstructSignature */: - case 142 /* IndexSignature */: - return node === parent_1.type; - case 163 /* TypeAssertionExpression */: - return node === parent_1.type; - case 160 /* CallExpression */: - case 161 /* NewExpression */: - return parent_1.typeArguments && ts.indexOf(parent_1.typeArguments, node) >= 0; - case 162 /* TaggedTemplateExpression */: - // TODO (drosen): TaggedTemplateExpressions may eventually support type arguments. - return false; - } - } - return false; - } - ts.isTypeNode = isTypeNode; - // Warning: This has the same semantics as the forEach family of functions, - // in that traversal terminates in the event that 'visitor' supplies a truthy value. - function forEachReturnStatement(body, visitor) { - return traverse(body); - function traverse(node) { - switch (node.kind) { - case 194 /* ReturnStatement */: - return visitor(node); - case 210 /* CaseBlock */: - case 182 /* Block */: - case 186 /* IfStatement */: - case 187 /* DoStatement */: - case 188 /* WhileStatement */: - case 189 /* ForStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - case 195 /* WithStatement */: - case 196 /* SwitchStatement */: - case 223 /* CaseClause */: - case 224 /* DefaultClause */: - case 197 /* LabeledStatement */: - case 199 /* TryStatement */: - case 226 /* CatchClause */: - return ts.forEachChild(node, traverse); - } - } - } - ts.forEachReturnStatement = forEachReturnStatement; - function forEachYieldExpression(body, visitor) { - return traverse(body); - function traverse(node) { - switch (node.kind) { - case 175 /* YieldExpression */: - visitor(node); - var operand = node.expression; - if (operand) { - traverse(operand); - } - case 207 /* EnumDeclaration */: - case 205 /* InterfaceDeclaration */: - case 208 /* ModuleDeclaration */: - case 206 /* TypeAliasDeclaration */: - case 204 /* ClassDeclaration */: - // These are not allowed inside a generator now, but eventually they may be allowed - // as local types. Regardless, any yield statements contained within them should be - // skipped in this traversal. - return; - default: - if (isFunctionLike(node)) { - var name_4 = node.name; - if (name_4 && name_4.kind === 129 /* ComputedPropertyName */) { - // Note that we will not include methods/accessors of a class because they would require - // first descending into the class. This is by design. - traverse(name_4.expression); - return; - } - } - else if (!isTypeNode(node)) { - // This is the general case, which should include mostly expressions and statements. - // Also includes NodeArrays. - ts.forEachChild(node, traverse); - } - } - } - } - ts.forEachYieldExpression = forEachYieldExpression; - function isVariableLike(node) { - if (node) { - switch (node.kind) { - case 155 /* BindingElement */: - case 229 /* EnumMember */: - case 131 /* Parameter */: - case 227 /* PropertyAssignment */: - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 228 /* ShorthandPropertyAssignment */: - case 201 /* VariableDeclaration */: - return true; - } - } - return false; - } - ts.isVariableLike = isVariableLike; - function isAccessor(node) { - if (node) { - switch (node.kind) { - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - return true; - } - } - return false; - } - ts.isAccessor = isAccessor; - function isClassLike(node) { - if (node) { - return node.kind === 204 /* ClassDeclaration */ || node.kind === 177 /* ClassExpression */; - } - } - ts.isClassLike = isClassLike; - function isFunctionLike(node) { - if (node) { - switch (node.kind) { - case 137 /* Constructor */: - case 165 /* FunctionExpression */: - case 203 /* FunctionDeclaration */: - case 166 /* ArrowFunction */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 140 /* CallSignature */: - case 141 /* ConstructSignature */: - case 142 /* IndexSignature */: - case 145 /* FunctionType */: - case 146 /* ConstructorType */: - return true; - } - } - return false; - } - ts.isFunctionLike = isFunctionLike; - function isFunctionBlock(node) { - return node && node.kind === 182 /* Block */ && isFunctionLike(node.parent); - } - ts.isFunctionBlock = isFunctionBlock; - function isObjectLiteralMethod(node) { - return node && node.kind === 136 /* MethodDeclaration */ && node.parent.kind === 157 /* ObjectLiteralExpression */; - } - ts.isObjectLiteralMethod = isObjectLiteralMethod; - function getContainingFunction(node) { - while (true) { - node = node.parent; - if (!node || isFunctionLike(node)) { - return node; - } - } - } - ts.getContainingFunction = getContainingFunction; - function getThisContainer(node, includeArrowFunctions) { - while (true) { - node = node.parent; - if (!node) { - return undefined; - } - switch (node.kind) { - case 129 /* ComputedPropertyName */: - // If the grandparent node is an object literal (as opposed to a class), - // then the computed property is not a 'this' container. - // A computed property name in a class needs to be a this container - // so that we can error on it. - if (node.parent.parent.kind === 204 /* ClassDeclaration */) { - return node; - } - // If this is a computed property, then the parent should not - // make it a this container. The parent might be a property - // in an object literal, like a method or accessor. But in order for - // such a parent to be a this container, the reference must be in - // the *body* of the container. - node = node.parent; - break; - case 132 /* Decorator */: - // Decorators are always applied outside of the body of a class or method. - if (node.parent.kind === 131 /* Parameter */ && isClassElement(node.parent.parent)) { - // If the decorator's parent is a Parameter, we resolve the this container from - // the grandparent class declaration. - node = node.parent.parent; - } - else if (isClassElement(node.parent)) { - // If the decorator's parent is a class element, we resolve the 'this' container - // from the parent class declaration. - node = node.parent; - } - break; - case 166 /* ArrowFunction */: - if (!includeArrowFunctions) { - continue; - } - // Fall through - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - case 208 /* ModuleDeclaration */: - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 137 /* Constructor */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 207 /* EnumDeclaration */: - case 230 /* SourceFile */: - return node; - } - } - } - ts.getThisContainer = getThisContainer; - function getSuperContainer(node, includeFunctions) { - while (true) { - node = node.parent; - if (!node) - return node; - switch (node.kind) { - case 129 /* ComputedPropertyName */: - // If the grandparent node is an object literal (as opposed to a class), - // then the computed property is not a 'super' container. - // A computed property name in a class needs to be a super container - // so that we can error on it. - if (node.parent.parent.kind === 204 /* ClassDeclaration */) { - return node; - } - // If this is a computed property, then the parent should not - // make it a super container. The parent might be a property - // in an object literal, like a method or accessor. But in order for - // such a parent to be a super container, the reference must be in - // the *body* of the container. - node = node.parent; - break; - case 132 /* Decorator */: - // Decorators are always applied outside of the body of a class or method. - if (node.parent.kind === 131 /* Parameter */ && isClassElement(node.parent.parent)) { - // If the decorator's parent is a Parameter, we resolve the this container from - // the grandparent class declaration. - node = node.parent.parent; - } - else if (isClassElement(node.parent)) { - // If the decorator's parent is a class element, we resolve the 'this' container - // from the parent class declaration. - node = node.parent; - } - break; - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - if (!includeFunctions) { - continue; - } - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 137 /* Constructor */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - return node; - } - } - } - ts.getSuperContainer = getSuperContainer; - function getInvokedExpression(node) { - if (node.kind === 162 /* TaggedTemplateExpression */) { - return node.tag; - } - // Will either be a CallExpression or NewExpression. - return node.expression; - } - ts.getInvokedExpression = getInvokedExpression; - function nodeCanBeDecorated(node) { - switch (node.kind) { - case 204 /* ClassDeclaration */: - // classes are valid targets - return true; - case 134 /* PropertyDeclaration */: - // property declarations are valid if their parent is a class declaration. - return node.parent.kind === 204 /* ClassDeclaration */; - case 131 /* Parameter */: - // if the parameter's parent has a body and its grandparent is a class declaration, this is a valid target; - return node.parent.body && node.parent.parent.kind === 204 /* ClassDeclaration */; - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 136 /* MethodDeclaration */: - // if this method has a body and its parent is a class declaration, this is a valid target. - return node.body && node.parent.kind === 204 /* ClassDeclaration */; - } - return false; - } - ts.nodeCanBeDecorated = nodeCanBeDecorated; - function nodeIsDecorated(node) { - switch (node.kind) { - case 204 /* ClassDeclaration */: - if (node.decorators) { - return true; - } - return false; - case 134 /* PropertyDeclaration */: - case 131 /* Parameter */: - if (node.decorators) { - return true; - } - return false; - case 138 /* GetAccessor */: - if (node.body && node.decorators) { - return true; - } - return false; - case 136 /* MethodDeclaration */: - case 139 /* SetAccessor */: - if (node.body && node.decorators) { - return true; - } - return false; - } - return false; - } - ts.nodeIsDecorated = nodeIsDecorated; - function childIsDecorated(node) { - switch (node.kind) { - case 204 /* ClassDeclaration */: - return ts.forEach(node.members, nodeOrChildIsDecorated); - case 136 /* MethodDeclaration */: - case 139 /* SetAccessor */: - return ts.forEach(node.parameters, nodeIsDecorated); - } - return false; - } - ts.childIsDecorated = childIsDecorated; - function nodeOrChildIsDecorated(node) { - return nodeIsDecorated(node) || childIsDecorated(node); - } - ts.nodeOrChildIsDecorated = nodeOrChildIsDecorated; - function isExpression(node) { - switch (node.kind) { - case 93 /* ThisKeyword */: - case 91 /* SuperKeyword */: - case 89 /* NullKeyword */: - case 95 /* TrueKeyword */: - case 80 /* FalseKeyword */: - case 9 /* RegularExpressionLiteral */: - case 156 /* ArrayLiteralExpression */: - case 157 /* ObjectLiteralExpression */: - case 158 /* PropertyAccessExpression */: - case 159 /* ElementAccessExpression */: - case 160 /* CallExpression */: - case 161 /* NewExpression */: - case 162 /* TaggedTemplateExpression */: - case 163 /* TypeAssertionExpression */: - case 164 /* ParenthesizedExpression */: - case 165 /* FunctionExpression */: - case 177 /* ClassExpression */: - case 166 /* ArrowFunction */: - case 169 /* VoidExpression */: - case 167 /* DeleteExpression */: - case 168 /* TypeOfExpression */: - case 170 /* PrefixUnaryExpression */: - case 171 /* PostfixUnaryExpression */: - case 172 /* BinaryExpression */: - case 173 /* ConditionalExpression */: - case 176 /* SpreadElementExpression */: - case 174 /* TemplateExpression */: - case 10 /* NoSubstitutionTemplateLiteral */: - case 178 /* OmittedExpression */: - case 175 /* YieldExpression */: - return true; - case 128 /* QualifiedName */: - while (node.parent.kind === 128 /* QualifiedName */) { - node = node.parent; - } - return node.parent.kind === 147 /* TypeQuery */; - case 65 /* Identifier */: - if (node.parent.kind === 147 /* TypeQuery */) { - return true; - } - // fall through - case 7 /* NumericLiteral */: - case 8 /* StringLiteral */: - var parent_2 = node.parent; - switch (parent_2.kind) { - case 201 /* VariableDeclaration */: - case 131 /* Parameter */: - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 229 /* EnumMember */: - case 227 /* PropertyAssignment */: - case 155 /* BindingElement */: - return parent_2.initializer === node; - case 185 /* ExpressionStatement */: - case 186 /* IfStatement */: - case 187 /* DoStatement */: - case 188 /* WhileStatement */: - case 194 /* ReturnStatement */: - case 195 /* WithStatement */: - case 196 /* SwitchStatement */: - case 223 /* CaseClause */: - case 198 /* ThrowStatement */: - case 196 /* SwitchStatement */: - return parent_2.expression === node; - case 189 /* ForStatement */: - var forStatement = parent_2; - return (forStatement.initializer === node && forStatement.initializer.kind !== 202 /* VariableDeclarationList */) || - forStatement.condition === node || - forStatement.incrementor === node; - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - var forInStatement = parent_2; - return (forInStatement.initializer === node && forInStatement.initializer.kind !== 202 /* VariableDeclarationList */) || - forInStatement.expression === node; - case 163 /* TypeAssertionExpression */: - return node === parent_2.expression; - case 180 /* TemplateSpan */: - return node === parent_2.expression; - case 129 /* ComputedPropertyName */: - return node === parent_2.expression; - case 132 /* Decorator */: - return true; - default: - if (isExpression(parent_2)) { - return true; - } - } - } - return false; - } - ts.isExpression = isExpression; - function isInstantiatedModule(node, preserveConstEnums) { - var moduleState = ts.getModuleInstanceState(node); - return moduleState === 1 /* Instantiated */ || - (preserveConstEnums && moduleState === 2 /* ConstEnumOnly */); - } - ts.isInstantiatedModule = isInstantiatedModule; - function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 211 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 222 /* ExternalModuleReference */; - } - ts.isExternalModuleImportEqualsDeclaration = isExternalModuleImportEqualsDeclaration; - function getExternalModuleImportEqualsDeclarationExpression(node) { - ts.Debug.assert(isExternalModuleImportEqualsDeclaration(node)); - return node.moduleReference.expression; - } - ts.getExternalModuleImportEqualsDeclarationExpression = getExternalModuleImportEqualsDeclarationExpression; - function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 211 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 222 /* ExternalModuleReference */; - } - ts.isInternalModuleImportEqualsDeclaration = isInternalModuleImportEqualsDeclaration; - function getExternalModuleName(node) { - if (node.kind === 212 /* ImportDeclaration */) { - return node.moduleSpecifier; - } - if (node.kind === 211 /* ImportEqualsDeclaration */) { - var reference = node.moduleReference; - if (reference.kind === 222 /* ExternalModuleReference */) { - return reference.expression; - } - } - if (node.kind === 218 /* ExportDeclaration */) { - return node.moduleSpecifier; - } - } - ts.getExternalModuleName = getExternalModuleName; - function hasQuestionToken(node) { - if (node) { - switch (node.kind) { - case 131 /* Parameter */: - return node.questionToken !== undefined; - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - return node.questionToken !== undefined; - case 228 /* ShorthandPropertyAssignment */: - case 227 /* PropertyAssignment */: - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - return node.questionToken !== undefined; - } - } - return false; - } - ts.hasQuestionToken = hasQuestionToken; - function isJSDocConstructSignature(node) { - return node.kind === 243 /* JSDocFunctionType */ && - node.parameters.length > 0 && - node.parameters[0].type.kind === 245 /* JSDocConstructorType */; - } - ts.isJSDocConstructSignature = isJSDocConstructSignature; - function getJSDocTag(node, kind) { - if (node && node.jsDocComment) { - for (var _i = 0, _a = node.jsDocComment.tags; _i < _a.length; _i++) { - var tag = _a[_i]; - if (tag.kind === kind) { - return tag; - } - } - } - } - function getJSDocTypeTag(node) { - return getJSDocTag(node, 251 /* JSDocTypeTag */); - } - ts.getJSDocTypeTag = getJSDocTypeTag; - function getJSDocReturnTag(node) { - return getJSDocTag(node, 250 /* JSDocReturnTag */); - } - ts.getJSDocReturnTag = getJSDocReturnTag; - function getJSDocTemplateTag(node) { - return getJSDocTag(node, 252 /* JSDocTemplateTag */); - } - ts.getJSDocTemplateTag = getJSDocTemplateTag; - function getCorrespondingJSDocParameterTag(parameter) { - if (parameter.name && parameter.name.kind === 65 /* Identifier */) { - // If it's a parameter, see if the parent has a jsdoc comment with an @param - // annotation. - var parameterName = parameter.name.text; - var docComment = parameter.parent.jsDocComment; - if (docComment) { - return ts.forEach(docComment.tags, function (t) { - if (t.kind === 249 /* JSDocParameterTag */) { - var parameterTag = t; - var name_5 = parameterTag.preParameterName || parameterTag.postParameterName; - if (name_5.text === parameterName) { - return t; - } - } - }); - } - } - } - ts.getCorrespondingJSDocParameterTag = getCorrespondingJSDocParameterTag; - function hasRestParameter(s) { - return isRestParameter(ts.lastOrUndefined(s.parameters)); - } - ts.hasRestParameter = hasRestParameter; - function isRestParameter(node) { - if (node) { - if (node.parserContextFlags & 64 /* JavaScriptFile */) { - if (node.type && node.type.kind === 244 /* JSDocVariadicType */) { - return true; - } - var paramTag = getCorrespondingJSDocParameterTag(node); - if (paramTag && paramTag.typeExpression) { - return paramTag.typeExpression.type.kind === 244 /* JSDocVariadicType */; - } - } - return node.dotDotDotToken !== undefined; - } - return false; - } - ts.isRestParameter = isRestParameter; - function isLiteralKind(kind) { - return 7 /* FirstLiteralToken */ <= kind && kind <= 10 /* LastLiteralToken */; - } - ts.isLiteralKind = isLiteralKind; - function isTextualLiteralKind(kind) { - return kind === 8 /* StringLiteral */ || kind === 10 /* NoSubstitutionTemplateLiteral */; - } - ts.isTextualLiteralKind = isTextualLiteralKind; - function isTemplateLiteralKind(kind) { - return 10 /* FirstTemplateToken */ <= kind && kind <= 13 /* LastTemplateToken */; - } - ts.isTemplateLiteralKind = isTemplateLiteralKind; - function isBindingPattern(node) { - return !!node && (node.kind === 154 /* ArrayBindingPattern */ || node.kind === 153 /* ObjectBindingPattern */); - } - ts.isBindingPattern = isBindingPattern; - function isInAmbientContext(node) { - while (node) { - if (node.flags & (2 /* Ambient */ | 2048 /* DeclarationFile */)) { - return true; - } - node = node.parent; - } - return false; - } - ts.isInAmbientContext = isInAmbientContext; - function isDeclaration(node) { - switch (node.kind) { - case 166 /* ArrowFunction */: - case 155 /* BindingElement */: - case 204 /* ClassDeclaration */: - case 137 /* Constructor */: - case 207 /* EnumDeclaration */: - case 229 /* EnumMember */: - case 220 /* ExportSpecifier */: - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - case 138 /* GetAccessor */: - case 213 /* ImportClause */: - case 211 /* ImportEqualsDeclaration */: - case 216 /* ImportSpecifier */: - case 205 /* InterfaceDeclaration */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 208 /* ModuleDeclaration */: - case 214 /* NamespaceImport */: - case 131 /* Parameter */: - case 227 /* PropertyAssignment */: - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 139 /* SetAccessor */: - case 228 /* ShorthandPropertyAssignment */: - case 206 /* TypeAliasDeclaration */: - case 130 /* TypeParameter */: - case 201 /* VariableDeclaration */: - return true; - } - return false; - } - ts.isDeclaration = isDeclaration; - function isStatement(n) { - switch (n.kind) { - case 193 /* BreakStatement */: - case 192 /* ContinueStatement */: - case 200 /* DebuggerStatement */: - case 187 /* DoStatement */: - case 185 /* ExpressionStatement */: - case 184 /* EmptyStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - case 189 /* ForStatement */: - case 186 /* IfStatement */: - case 197 /* LabeledStatement */: - case 194 /* ReturnStatement */: - case 196 /* SwitchStatement */: - case 94 /* ThrowKeyword */: - case 199 /* TryStatement */: - case 183 /* VariableStatement */: - case 188 /* WhileStatement */: - case 195 /* WithStatement */: - case 217 /* ExportAssignment */: - return true; - default: - return false; - } - } - ts.isStatement = isStatement; - function isClassElement(n) { - switch (n.kind) { - case 137 /* Constructor */: - case 134 /* PropertyDeclaration */: - case 136 /* MethodDeclaration */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 135 /* MethodSignature */: - case 142 /* IndexSignature */: - return true; - default: - return false; - } - } - ts.isClassElement = isClassElement; - // True if the given identifier, string literal, or number literal is the name of a declaration node - function isDeclarationName(name) { - if (name.kind !== 65 /* Identifier */ && name.kind !== 8 /* StringLiteral */ && name.kind !== 7 /* NumericLiteral */) { - return false; - } - var parent = name.parent; - if (parent.kind === 216 /* ImportSpecifier */ || parent.kind === 220 /* ExportSpecifier */) { - if (parent.propertyName) { - return true; - } - } - if (isDeclaration(parent)) { - return parent.name === name; - } - return false; - } - ts.isDeclarationName = isDeclarationName; - // An alias symbol is created by one of the following declarations: - // import = ... - // import from ... - // import * as from ... - // import { x as } from ... - // export { x as } from ... - // export = ... - // export default ... - function isAliasSymbolDeclaration(node) { - return node.kind === 211 /* ImportEqualsDeclaration */ || - node.kind === 213 /* ImportClause */ && !!node.name || - node.kind === 214 /* NamespaceImport */ || - node.kind === 216 /* ImportSpecifier */ || - node.kind === 220 /* ExportSpecifier */ || - node.kind === 217 /* ExportAssignment */ && node.expression.kind === 65 /* Identifier */; - } - ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration; - function getClassExtendsHeritageClauseElement(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 79 /* ExtendsKeyword */); - return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined; - } - ts.getClassExtendsHeritageClauseElement = getClassExtendsHeritageClauseElement; - function getClassImplementsHeritageClauseElements(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 102 /* ImplementsKeyword */); - return heritageClause ? heritageClause.types : undefined; - } - ts.getClassImplementsHeritageClauseElements = getClassImplementsHeritageClauseElements; - function getInterfaceBaseTypeNodes(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 79 /* ExtendsKeyword */); - return heritageClause ? heritageClause.types : undefined; - } - ts.getInterfaceBaseTypeNodes = getInterfaceBaseTypeNodes; - function getHeritageClause(clauses, kind) { - if (clauses) { - for (var _i = 0; _i < clauses.length; _i++) { - var clause = clauses[_i]; - if (clause.token === kind) { - return clause; - } - } - } - return undefined; - } - ts.getHeritageClause = getHeritageClause; - function tryResolveScriptReference(host, sourceFile, reference) { - if (!host.getCompilerOptions().noResolve) { - var referenceFileName = ts.isRootedDiskPath(reference.fileName) ? reference.fileName : ts.combinePaths(ts.getDirectoryPath(sourceFile.fileName), reference.fileName); - referenceFileName = ts.getNormalizedAbsolutePath(referenceFileName, host.getCurrentDirectory()); - return host.getSourceFile(referenceFileName); - } - } - ts.tryResolveScriptReference = tryResolveScriptReference; - function getAncestor(node, kind) { - while (node) { - if (node.kind === kind) { - return node; - } - node = node.parent; - } - return undefined; - } - ts.getAncestor = getAncestor; - function getFileReferenceFromReferencePath(comment, commentRange) { - var simpleReferenceRegEx = /^\/\/\/\s*/gim; - if (simpleReferenceRegEx.exec(comment)) { - if (isNoDefaultLibRegEx.exec(comment)) { - return { - isNoDefaultLib: true - }; - } - else { - var matchResult = ts.fullTripleSlashReferencePathRegEx.exec(comment); - if (matchResult) { - var start = commentRange.pos; - var end = commentRange.end; - return { - fileReference: { - pos: start, - end: end, - fileName: matchResult[3] - }, - isNoDefaultLib: false - }; - } - else { - return { - diagnosticMessage: ts.Diagnostics.Invalid_reference_directive_syntax, - isNoDefaultLib: false - }; - } - } - } - return undefined; - } - ts.getFileReferenceFromReferencePath = getFileReferenceFromReferencePath; - function isKeyword(token) { - return 66 /* FirstKeyword */ <= token && token <= 127 /* LastKeyword */; - } - ts.isKeyword = isKeyword; - function isTrivia(token) { - return 2 /* FirstTriviaToken */ <= token && token <= 6 /* LastTriviaToken */; - } - ts.isTrivia = isTrivia; - /** - * A declaration has a dynamic name if both of the following are true: - * 1. The declaration has a computed property name - * 2. The computed name is *not* expressed as Symbol., where name - * is a property of the Symbol constructor that denotes a built in - * Symbol. - */ - function hasDynamicName(declaration) { - return declaration.name && - declaration.name.kind === 129 /* ComputedPropertyName */ && - !isWellKnownSymbolSyntactically(declaration.name.expression); - } - ts.hasDynamicName = hasDynamicName; - /** - * Checks if the expression is of the form: - * Symbol.name - * where Symbol is literally the word "Symbol", and name is any identifierName - */ - function isWellKnownSymbolSyntactically(node) { - return node.kind === 158 /* PropertyAccessExpression */ && isESSymbolIdentifier(node.expression); - } - ts.isWellKnownSymbolSyntactically = isWellKnownSymbolSyntactically; - function getPropertyNameForPropertyNameNode(name) { - if (name.kind === 65 /* Identifier */ || name.kind === 8 /* StringLiteral */ || name.kind === 7 /* NumericLiteral */) { - return name.text; - } - if (name.kind === 129 /* ComputedPropertyName */) { - var nameExpression = name.expression; - if (isWellKnownSymbolSyntactically(nameExpression)) { - var rightHandSideName = nameExpression.name.text; - return getPropertyNameForKnownSymbolName(rightHandSideName); - } - } - return undefined; - } - ts.getPropertyNameForPropertyNameNode = getPropertyNameForPropertyNameNode; - function getPropertyNameForKnownSymbolName(symbolName) { - return "__@" + symbolName; - } - ts.getPropertyNameForKnownSymbolName = getPropertyNameForKnownSymbolName; - /** - * Includes the word "Symbol" with unicode escapes - */ - function isESSymbolIdentifier(node) { - return node.kind === 65 /* Identifier */ && node.text === "Symbol"; - } - ts.isESSymbolIdentifier = isESSymbolIdentifier; - function isModifier(token) { - switch (token) { - case 108 /* PublicKeyword */: - case 106 /* PrivateKeyword */: - case 107 /* ProtectedKeyword */: - case 109 /* StaticKeyword */: - case 78 /* ExportKeyword */: - case 115 /* DeclareKeyword */: - case 70 /* ConstKeyword */: - case 73 /* DefaultKeyword */: - return true; - } - return false; - } - ts.isModifier = isModifier; - function isParameterDeclaration(node) { - var root = getRootDeclaration(node); - return root.kind === 131 /* Parameter */; - } - ts.isParameterDeclaration = isParameterDeclaration; - function getRootDeclaration(node) { - while (node.kind === 155 /* BindingElement */) { - node = node.parent.parent; - } - return node; - } - ts.getRootDeclaration = getRootDeclaration; - function nodeStartsNewLexicalEnvironment(n) { - return isFunctionLike(n) || n.kind === 208 /* ModuleDeclaration */ || n.kind === 230 /* SourceFile */; - } - ts.nodeStartsNewLexicalEnvironment = nodeStartsNewLexicalEnvironment; - function nodeIsSynthesized(node) { - return node.pos === -1; - } - ts.nodeIsSynthesized = nodeIsSynthesized; - function createSynthesizedNode(kind, startsOnNewLine) { - var node = ts.createNode(kind); - node.pos = -1; - node.end = -1; - node.startsOnNewLine = startsOnNewLine; - return node; - } - ts.createSynthesizedNode = createSynthesizedNode; - function createSynthesizedNodeArray() { - var array = []; - array.pos = -1; - array.end = -1; - return array; - } - ts.createSynthesizedNodeArray = createSynthesizedNodeArray; - function createDiagnosticCollection() { - var nonFileDiagnostics = []; - var fileDiagnostics = {}; - var diagnosticsModified = false; - var modificationCount = 0; - return { - add: add, - getGlobalDiagnostics: getGlobalDiagnostics, - getDiagnostics: getDiagnostics, - getModificationCount: getModificationCount - }; - function getModificationCount() { - return modificationCount; - } - function add(diagnostic) { - var diagnostics; - if (diagnostic.file) { - diagnostics = fileDiagnostics[diagnostic.file.fileName]; - if (!diagnostics) { - diagnostics = []; - fileDiagnostics[diagnostic.file.fileName] = diagnostics; - } - } - else { - diagnostics = nonFileDiagnostics; - } - diagnostics.push(diagnostic); - diagnosticsModified = true; - modificationCount++; - } - function getGlobalDiagnostics() { - sortAndDeduplicate(); - return nonFileDiagnostics; - } - function getDiagnostics(fileName) { - sortAndDeduplicate(); - if (fileName) { - return fileDiagnostics[fileName] || []; - } - var allDiagnostics = []; - function pushDiagnostic(d) { - allDiagnostics.push(d); - } - ts.forEach(nonFileDiagnostics, pushDiagnostic); - for (var key in fileDiagnostics) { - if (ts.hasProperty(fileDiagnostics, key)) { - ts.forEach(fileDiagnostics[key], pushDiagnostic); - } - } - return ts.sortAndDeduplicateDiagnostics(allDiagnostics); - } - function sortAndDeduplicate() { - if (!diagnosticsModified) { - return; - } - diagnosticsModified = false; - nonFileDiagnostics = ts.sortAndDeduplicateDiagnostics(nonFileDiagnostics); - for (var key in fileDiagnostics) { - if (ts.hasProperty(fileDiagnostics, key)) { - fileDiagnostics[key] = ts.sortAndDeduplicateDiagnostics(fileDiagnostics[key]); - } - } - } - } - ts.createDiagnosticCollection = createDiagnosticCollection; - // This consists of the first 19 unprintable ASCII characters, canonical escapes, lineSeparator, - // paragraphSeparator, and nextLine. The latter three are just desirable to suppress new lines in - // the language service. These characters should be escaped when printing, and if any characters are added, - // the map below must be updated. Note that this regexp *does not* include the 'delete' character. - // There is no reason for this other than that JSON.stringify does not handle it either. - var escapedCharsRegExp = /[\\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; - var escapedCharsMap = { - "\0": "\\0", - "\t": "\\t", - "\v": "\\v", - "\f": "\\f", - "\b": "\\b", - "\r": "\\r", - "\n": "\\n", - "\\": "\\\\", - "\"": "\\\"", - "\u2028": "\\u2028", - "\u2029": "\\u2029", - "\u0085": "\\u0085" // nextLine - }; - /** - * Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2), - * but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine) - * Note that this doesn't actually wrap the input in double quotes. - */ - function escapeString(s) { - s = escapedCharsRegExp.test(s) ? s.replace(escapedCharsRegExp, getReplacement) : s; - return s; - function getReplacement(c) { - return escapedCharsMap[c] || get16BitUnicodeEscapeSequence(c.charCodeAt(0)); - } - } - ts.escapeString = escapeString; - function get16BitUnicodeEscapeSequence(charCode) { - var hexCharCode = charCode.toString(16).toUpperCase(); - var paddedHexCode = ("0000" + hexCharCode).slice(-4); - return "\\u" + paddedHexCode; - } - var nonAsciiCharacters = /[^\u0000-\u007F]/g; - function escapeNonAsciiCharacters(s) { - // Replace non-ASCII characters with '\uNNNN' escapes if any exist. - // Otherwise just return the original string. - return nonAsciiCharacters.test(s) ? - s.replace(nonAsciiCharacters, function (c) { return get16BitUnicodeEscapeSequence(c.charCodeAt(0)); }) : - s; - } - ts.escapeNonAsciiCharacters = escapeNonAsciiCharacters; - var indentStrings = ["", " "]; - function getIndentString(level) { - if (indentStrings[level] === undefined) { - indentStrings[level] = getIndentString(level - 1) + indentStrings[1]; - } - return indentStrings[level]; - } - ts.getIndentString = getIndentString; - function getIndentSize() { - return indentStrings[1].length; - } - ts.getIndentSize = getIndentSize; - function createTextWriter(newLine) { - var output = ""; - var indent = 0; - var lineStart = true; - var lineCount = 0; - var linePos = 0; - function write(s) { - if (s && s.length) { - if (lineStart) { - output += getIndentString(indent); - lineStart = false; - } - output += s; - } - } - function rawWrite(s) { - if (s !== undefined) { - if (lineStart) { - lineStart = false; - } - output += s; - } - } - function writeLiteral(s) { - if (s && s.length) { - write(s); - var lineStartsOfS = ts.computeLineStarts(s); - if (lineStartsOfS.length > 1) { - lineCount = lineCount + lineStartsOfS.length - 1; - linePos = output.length - s.length + ts.lastOrUndefined(lineStartsOfS); - } - } - } - function writeLine() { - if (!lineStart) { - output += newLine; - lineCount++; - linePos = output.length; - lineStart = true; - } - } - function writeTextOfNode(sourceFile, node) { - write(getSourceTextOfNodeFromSourceFile(sourceFile, node)); - } - return { - write: write, - rawWrite: rawWrite, - writeTextOfNode: writeTextOfNode, - writeLiteral: writeLiteral, - writeLine: writeLine, - increaseIndent: function () { return indent++; }, - decreaseIndent: function () { return indent--; }, - getIndent: function () { return indent; }, - getTextPos: function () { return output.length; }, - getLine: function () { return lineCount + 1; }, - getColumn: function () { return lineStart ? indent * getIndentSize() + 1 : output.length - linePos + 1; }, - getText: function () { return output; } - }; - } - ts.createTextWriter = createTextWriter; - function getOwnEmitOutputFilePath(sourceFile, host, extension) { - var compilerOptions = host.getCompilerOptions(); - var emitOutputFilePathWithoutExtension; - if (compilerOptions.outDir) { - emitOutputFilePathWithoutExtension = ts.removeFileExtension(getSourceFilePathInNewDir(sourceFile, host, compilerOptions.outDir)); - } - else { - emitOutputFilePathWithoutExtension = ts.removeFileExtension(sourceFile.fileName); - } - return emitOutputFilePathWithoutExtension + extension; - } - ts.getOwnEmitOutputFilePath = getOwnEmitOutputFilePath; - function getSourceFilePathInNewDir(sourceFile, host, newDirPath) { - var sourceFilePath = ts.getNormalizedAbsolutePath(sourceFile.fileName, host.getCurrentDirectory()); - sourceFilePath = sourceFilePath.replace(host.getCommonSourceDirectory(), ""); - return ts.combinePaths(newDirPath, sourceFilePath); - } - ts.getSourceFilePathInNewDir = getSourceFilePathInNewDir; - function writeFile(host, diagnostics, fileName, data, writeByteOrderMark) { - host.writeFile(fileName, data, writeByteOrderMark, function (hostErrorMessage) { - diagnostics.push(ts.createCompilerDiagnostic(ts.Diagnostics.Could_not_write_file_0_Colon_1, fileName, hostErrorMessage)); - }); - } - ts.writeFile = writeFile; - function getLineOfLocalPosition(currentSourceFile, pos) { - return ts.getLineAndCharacterOfPosition(currentSourceFile, pos).line; - } - ts.getLineOfLocalPosition = getLineOfLocalPosition; - function getFirstConstructorWithBody(node) { - return ts.forEach(node.members, function (member) { - if (member.kind === 137 /* Constructor */ && nodeIsPresent(member.body)) { - return member; - } - }); - } - ts.getFirstConstructorWithBody = getFirstConstructorWithBody; - function shouldEmitToOwnFile(sourceFile, compilerOptions) { - if (!isDeclarationFile(sourceFile)) { - if ((isExternalModule(sourceFile) || !compilerOptions.out)) { - // 1. in-browser single file compilation scenario - // 2. non .js file - return compilerOptions.isolatedModules || !ts.fileExtensionIs(sourceFile.fileName, ".js"); - } - return false; - } - return false; - } - ts.shouldEmitToOwnFile = shouldEmitToOwnFile; - function getAllAccessorDeclarations(declarations, accessor) { - var firstAccessor; - var secondAccessor; - var getAccessor; - var setAccessor; - if (hasDynamicName(accessor)) { - firstAccessor = accessor; - if (accessor.kind === 138 /* GetAccessor */) { - getAccessor = accessor; - } - else if (accessor.kind === 139 /* SetAccessor */) { - setAccessor = accessor; - } - else { - ts.Debug.fail("Accessor has wrong kind"); - } - } - else { - ts.forEach(declarations, function (member) { - if ((member.kind === 138 /* GetAccessor */ || member.kind === 139 /* SetAccessor */) - && (member.flags & 128 /* Static */) === (accessor.flags & 128 /* Static */)) { - var memberName = getPropertyNameForPropertyNameNode(member.name); - var accessorName = getPropertyNameForPropertyNameNode(accessor.name); - if (memberName === accessorName) { - if (!firstAccessor) { - firstAccessor = member; - } - else if (!secondAccessor) { - secondAccessor = member; - } - if (member.kind === 138 /* GetAccessor */ && !getAccessor) { - getAccessor = member; - } - if (member.kind === 139 /* SetAccessor */ && !setAccessor) { - setAccessor = member; - } - } - } - }); - } - return { - firstAccessor: firstAccessor, - secondAccessor: secondAccessor, - getAccessor: getAccessor, - setAccessor: setAccessor - }; - } - ts.getAllAccessorDeclarations = getAllAccessorDeclarations; - function emitNewLineBeforeLeadingComments(currentSourceFile, writer, node, leadingComments) { - // If the leading comments start on different line than the start of node, write new line - if (leadingComments && leadingComments.length && node.pos !== leadingComments[0].pos && - getLineOfLocalPosition(currentSourceFile, node.pos) !== getLineOfLocalPosition(currentSourceFile, leadingComments[0].pos)) { - writer.writeLine(); - } - } - ts.emitNewLineBeforeLeadingComments = emitNewLineBeforeLeadingComments; - function emitComments(currentSourceFile, writer, comments, trailingSeparator, newLine, writeComment) { - var emitLeadingSpace = !trailingSeparator; - ts.forEach(comments, function (comment) { - if (emitLeadingSpace) { - writer.write(" "); - emitLeadingSpace = false; - } - writeComment(currentSourceFile, writer, comment, newLine); - if (comment.hasTrailingNewLine) { - writer.writeLine(); - } - else if (trailingSeparator) { - writer.write(" "); - } - else { - // Emit leading space to separate comment during next comment emit - emitLeadingSpace = true; - } - }); - } - ts.emitComments = emitComments; - function writeCommentRange(currentSourceFile, writer, comment, newLine) { - if (currentSourceFile.text.charCodeAt(comment.pos + 1) === 42 /* asterisk */) { - var firstCommentLineAndCharacter = ts.getLineAndCharacterOfPosition(currentSourceFile, comment.pos); - var lineCount = ts.getLineStarts(currentSourceFile).length; - var firstCommentLineIndent; - for (var pos = comment.pos, currentLine = firstCommentLineAndCharacter.line; pos < comment.end; currentLine++) { - var nextLineStart = (currentLine + 1) === lineCount - ? currentSourceFile.text.length + 1 - : getStartPositionOfLine(currentLine + 1, currentSourceFile); - if (pos !== comment.pos) { - // If we are not emitting first line, we need to write the spaces to adjust the alignment - if (firstCommentLineIndent === undefined) { - firstCommentLineIndent = calculateIndent(getStartPositionOfLine(firstCommentLineAndCharacter.line, currentSourceFile), comment.pos); - } - // These are number of spaces writer is going to write at current indent - var currentWriterIndentSpacing = writer.getIndent() * getIndentSize(); - // Number of spaces we want to be writing - // eg: Assume writer indent - // module m { - // /* starts at character 9 this is line 1 - // * starts at character pos 4 line --1 = 8 - 8 + 3 - // More left indented comment */ --2 = 8 - 8 + 2 - // class c { } - // } - // module m { - // /* this is line 1 -- Assume current writer indent 8 - // * line --3 = 8 - 4 + 5 - // More right indented comment */ --4 = 8 - 4 + 11 - // class c { } - // } - var spacesToEmit = currentWriterIndentSpacing - firstCommentLineIndent + calculateIndent(pos, nextLineStart); - if (spacesToEmit > 0) { - var numberOfSingleSpacesToEmit = spacesToEmit % getIndentSize(); - var indentSizeSpaceString = getIndentString((spacesToEmit - numberOfSingleSpacesToEmit) / getIndentSize()); - // Write indent size string ( in eg 1: = "", 2: "" , 3: string with 8 spaces 4: string with 12 spaces - writer.rawWrite(indentSizeSpaceString); - // Emit the single spaces (in eg: 1: 3 spaces, 2: 2 spaces, 3: 1 space, 4: 3 spaces) - while (numberOfSingleSpacesToEmit) { - writer.rawWrite(" "); - numberOfSingleSpacesToEmit--; - } - } - else { - // No spaces to emit write empty string - writer.rawWrite(""); - } - } - // Write the comment line text - writeTrimmedCurrentLine(pos, nextLineStart); - pos = nextLineStart; - } - } - else { - // Single line comment of style //.... - writer.write(currentSourceFile.text.substring(comment.pos, comment.end)); - } - function writeTrimmedCurrentLine(pos, nextLineStart) { - var end = Math.min(comment.end, nextLineStart - 1); - var currentLineText = currentSourceFile.text.substring(pos, end).replace(/^\s+|\s+$/g, ''); - if (currentLineText) { - // trimmed forward and ending spaces text - writer.write(currentLineText); - if (end !== comment.end) { - writer.writeLine(); - } - } - else { - // Empty string - make sure we write empty line - writer.writeLiteral(newLine); - } - } - function calculateIndent(pos, end) { - var currentLineIndent = 0; - for (; pos < end && ts.isWhiteSpace(currentSourceFile.text.charCodeAt(pos)); pos++) { - if (currentSourceFile.text.charCodeAt(pos) === 9 /* tab */) { - // Tabs = TabSize = indent size and go to next tabStop - currentLineIndent += getIndentSize() - (currentLineIndent % getIndentSize()); - } - else { - // Single space - currentLineIndent++; - } - } - return currentLineIndent; - } - } - ts.writeCommentRange = writeCommentRange; - function modifierToFlag(token) { - switch (token) { - case 109 /* StaticKeyword */: return 128 /* Static */; - case 108 /* PublicKeyword */: return 16 /* Public */; - case 107 /* ProtectedKeyword */: return 64 /* Protected */; - case 106 /* PrivateKeyword */: return 32 /* Private */; - case 78 /* ExportKeyword */: return 1 /* Export */; - case 115 /* DeclareKeyword */: return 2 /* Ambient */; - case 70 /* ConstKeyword */: return 8192 /* Const */; - case 73 /* DefaultKeyword */: return 256 /* Default */; - } - return 0; - } - ts.modifierToFlag = modifierToFlag; - function isLeftHandSideExpression(expr) { - if (expr) { - switch (expr.kind) { - case 158 /* PropertyAccessExpression */: - case 159 /* ElementAccessExpression */: - case 161 /* NewExpression */: - case 160 /* CallExpression */: - case 162 /* TaggedTemplateExpression */: - case 156 /* ArrayLiteralExpression */: - case 164 /* ParenthesizedExpression */: - case 157 /* ObjectLiteralExpression */: - case 177 /* ClassExpression */: - case 165 /* FunctionExpression */: - case 65 /* Identifier */: - case 9 /* RegularExpressionLiteral */: - case 7 /* NumericLiteral */: - case 8 /* StringLiteral */: - case 10 /* NoSubstitutionTemplateLiteral */: - case 174 /* TemplateExpression */: - case 80 /* FalseKeyword */: - case 89 /* NullKeyword */: - case 93 /* ThisKeyword */: - case 95 /* TrueKeyword */: - case 91 /* SuperKeyword */: - return true; - } - } - return false; - } - ts.isLeftHandSideExpression = isLeftHandSideExpression; - function isAssignmentOperator(token) { - return token >= 53 /* FirstAssignment */ && token <= 64 /* LastAssignment */; - } - ts.isAssignmentOperator = isAssignmentOperator; - // Returns false if this heritage clause element's expression contains something unsupported - // (i.e. not a name or dotted name). - function isSupportedExpressionWithTypeArguments(node) { - return isSupportedExpressionWithTypeArgumentsRest(node.expression); - } - ts.isSupportedExpressionWithTypeArguments = isSupportedExpressionWithTypeArguments; - function isSupportedExpressionWithTypeArgumentsRest(node) { - if (node.kind === 65 /* Identifier */) { - return true; - } - else if (node.kind === 158 /* PropertyAccessExpression */) { - return isSupportedExpressionWithTypeArgumentsRest(node.expression); - } - else { - return false; - } - } - function isRightSideOfQualifiedNameOrPropertyAccess(node) { - return (node.parent.kind === 128 /* QualifiedName */ && node.parent.right === node) || - (node.parent.kind === 158 /* PropertyAccessExpression */ && node.parent.name === node); - } - ts.isRightSideOfQualifiedNameOrPropertyAccess = isRightSideOfQualifiedNameOrPropertyAccess; - function getLocalSymbolForExportDefault(symbol) { - return symbol && symbol.valueDeclaration && (symbol.valueDeclaration.flags & 256 /* Default */) ? symbol.valueDeclaration.localSymbol : undefined; - } - ts.getLocalSymbolForExportDefault = getLocalSymbolForExportDefault; - function isJavaScript(fileName) { - return ts.fileExtensionIs(fileName, ".js"); - } - ts.isJavaScript = isJavaScript; - /** - * Replace each instance of non-ascii characters by one, two, three, or four escape sequences - * representing the UTF-8 encoding of the character, and return the expanded char code list. - */ - function getExpandedCharCodes(input) { - var output = []; - var length = input.length; - var leadSurrogate = undefined; - for (var i = 0; i < length; i++) { - var charCode = input.charCodeAt(i); - // handel utf8 - if (charCode < 0x80) { - output.push(charCode); - } - else if (charCode < 0x800) { - output.push((charCode >> 6) | 192); - output.push((charCode & 63) | 128); - } - else if (charCode < 0x10000) { - output.push((charCode >> 12) | 224); - output.push(((charCode >> 6) & 63) | 128); - output.push((charCode & 63) | 128); - } - else if (charCode < 0x20000) { - output.push((charCode >> 18) | 240); - output.push(((charCode >> 12) & 63) | 128); - output.push(((charCode >> 6) & 63) | 128); - output.push((charCode & 63) | 128); - } - else { - ts.Debug.assert(false, "Unexpected code point"); - } - } - return output; - } - var base64Digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - /** - * Converts a string to a base-64 encoded ASCII string. - */ - function convertToBase64(input) { - var result = ""; - var charCodes = getExpandedCharCodes(input); - var i = 0; - var length = charCodes.length; - var byte1, byte2, byte3, byte4; - while (i < length) { - // Convert every 6-bits in the input 3 character points - // into a base64 digit - byte1 = charCodes[i] >> 2; - byte2 = (charCodes[i] & 3) << 4 | charCodes[i + 1] >> 4; - byte3 = (charCodes[i + 1] & 15) << 2 | charCodes[i + 2] >> 6; - byte4 = charCodes[i + 2] & 63; - // We are out of characters in the input, set the extra - // digits to 64 (padding character). - if (i + 1 >= length) { - byte3 = byte4 = 64; - } - else if (i + 2 >= length) { - byte4 = 64; - } - // Write to the ouput - result += base64Digits.charAt(byte1) + base64Digits.charAt(byte2) + base64Digits.charAt(byte3) + base64Digits.charAt(byte4); - i += 3; - } - return result; - } - ts.convertToBase64 = convertToBase64; - var carriageReturnLineFeed = "\r\n"; - var lineFeed = "\n"; - function getNewLineCharacter(options) { - if (options.newLine === 0 /* CarriageReturnLineFeed */) { - return carriageReturnLineFeed; - } - else if (options.newLine === 1 /* LineFeed */) { - return lineFeed; - } - else if (ts.sys) { - return ts.sys.newLine; - } - return carriageReturnLineFeed; - } - ts.getNewLineCharacter = getNewLineCharacter; -})(ts || (ts = {})); -var ts; -(function (ts) { - function getDefaultLibFileName(options) { - return options.target === 2 /* ES6 */ ? "lib.es6.d.ts" : "lib.d.ts"; - } - ts.getDefaultLibFileName = getDefaultLibFileName; - function textSpanEnd(span) { - return span.start + span.length; - } - ts.textSpanEnd = textSpanEnd; - function textSpanIsEmpty(span) { - return span.length === 0; - } - ts.textSpanIsEmpty = textSpanIsEmpty; - function textSpanContainsPosition(span, position) { - return position >= span.start && position < textSpanEnd(span); - } - ts.textSpanContainsPosition = textSpanContainsPosition; - // Returns true if 'span' contains 'other'. - function textSpanContainsTextSpan(span, other) { - return other.start >= span.start && textSpanEnd(other) <= textSpanEnd(span); - } - ts.textSpanContainsTextSpan = textSpanContainsTextSpan; - function textSpanOverlapsWith(span, other) { - var overlapStart = Math.max(span.start, other.start); - var overlapEnd = Math.min(textSpanEnd(span), textSpanEnd(other)); - return overlapStart < overlapEnd; - } - ts.textSpanOverlapsWith = textSpanOverlapsWith; - function textSpanOverlap(span1, span2) { - var overlapStart = Math.max(span1.start, span2.start); - var overlapEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2)); - if (overlapStart < overlapEnd) { - return createTextSpanFromBounds(overlapStart, overlapEnd); - } - return undefined; - } - ts.textSpanOverlap = textSpanOverlap; - function textSpanIntersectsWithTextSpan(span, other) { - return other.start <= textSpanEnd(span) && textSpanEnd(other) >= span.start; - } - ts.textSpanIntersectsWithTextSpan = textSpanIntersectsWithTextSpan; - function textSpanIntersectsWith(span, start, length) { - var end = start + length; - return start <= textSpanEnd(span) && end >= span.start; - } - ts.textSpanIntersectsWith = textSpanIntersectsWith; - function textSpanIntersectsWithPosition(span, position) { - return position <= textSpanEnd(span) && position >= span.start; - } - ts.textSpanIntersectsWithPosition = textSpanIntersectsWithPosition; - function textSpanIntersection(span1, span2) { - var intersectStart = Math.max(span1.start, span2.start); - var intersectEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2)); - if (intersectStart <= intersectEnd) { - return createTextSpanFromBounds(intersectStart, intersectEnd); - } - return undefined; - } - ts.textSpanIntersection = textSpanIntersection; - function createTextSpan(start, length) { - if (start < 0) { - throw new Error("start < 0"); - } - if (length < 0) { - throw new Error("length < 0"); - } - return { start: start, length: length }; - } - ts.createTextSpan = createTextSpan; - function createTextSpanFromBounds(start, end) { - return createTextSpan(start, end - start); - } - ts.createTextSpanFromBounds = createTextSpanFromBounds; - function textChangeRangeNewSpan(range) { - return createTextSpan(range.span.start, range.newLength); - } - ts.textChangeRangeNewSpan = textChangeRangeNewSpan; - function textChangeRangeIsUnchanged(range) { - return textSpanIsEmpty(range.span) && range.newLength === 0; - } - ts.textChangeRangeIsUnchanged = textChangeRangeIsUnchanged; - function createTextChangeRange(span, newLength) { - if (newLength < 0) { - throw new Error("newLength < 0"); - } - return { span: span, newLength: newLength }; - } - ts.createTextChangeRange = createTextChangeRange; - ts.unchangedTextChangeRange = createTextChangeRange(createTextSpan(0, 0), 0); - /** - * Called to merge all the changes that occurred across several versions of a script snapshot - * into a single change. i.e. if a user keeps making successive edits to a script we will - * have a text change from V1 to V2, V2 to V3, ..., Vn. - * - * This function will then merge those changes into a single change range valid between V1 and - * Vn. - */ - function collapseTextChangeRangesAcrossMultipleVersions(changes) { - if (changes.length === 0) { - return ts.unchangedTextChangeRange; - } - if (changes.length === 1) { - return changes[0]; - } - // We change from talking about { { oldStart, oldLength }, newLength } to { oldStart, oldEnd, newEnd } - // as it makes things much easier to reason about. - var change0 = changes[0]; - var oldStartN = change0.span.start; - var oldEndN = textSpanEnd(change0.span); - var newEndN = oldStartN + change0.newLength; - for (var i = 1; i < changes.length; i++) { - var nextChange = changes[i]; - // Consider the following case: - // i.e. two edits. The first represents the text change range { { 10, 50 }, 30 }. i.e. The span starting - // at 10, with length 50 is reduced to length 30. The second represents the text change range { { 30, 30 }, 40 }. - // i.e. the span starting at 30 with length 30 is increased to length 40. - // - // 0 10 20 30 40 50 60 70 80 90 100 - // ------------------------------------------------------------------------------------------------------- - // | / - // | /---- - // T1 | /---- - // | /---- - // | /---- - // ------------------------------------------------------------------------------------------------------- - // | \ - // | \ - // T2 | \ - // | \ - // | \ - // ------------------------------------------------------------------------------------------------------- - // - // Merging these turns out to not be too difficult. First, determining the new start of the change is trivial - // it's just the min of the old and new starts. i.e.: - // - // 0 10 20 30 40 50 60 70 80 90 100 - // ------------------------------------------------------------*------------------------------------------ - // | / - // | /---- - // T1 | /---- - // | /---- - // | /---- - // ----------------------------------------$-------------------$------------------------------------------ - // . | \ - // . | \ - // T2 . | \ - // . | \ - // . | \ - // ----------------------------------------------------------------------*-------------------------------- - // - // (Note the dots represent the newly inferrred start. - // Determining the new and old end is also pretty simple. Basically it boils down to paying attention to the - // absolute positions at the asterixes, and the relative change between the dollar signs. Basically, we see - // which if the two $'s precedes the other, and we move that one forward until they line up. in this case that - // means: - // - // 0 10 20 30 40 50 60 70 80 90 100 - // --------------------------------------------------------------------------------*---------------------- - // | / - // | /---- - // T1 | /---- - // | /---- - // | /---- - // ------------------------------------------------------------$------------------------------------------ - // . | \ - // . | \ - // T2 . | \ - // . | \ - // . | \ - // ----------------------------------------------------------------------*-------------------------------- - // - // In other words (in this case), we're recognizing that the second edit happened after where the first edit - // ended with a delta of 20 characters (60 - 40). Thus, if we go back in time to where the first edit started - // that's the same as if we started at char 80 instead of 60. - // - // As it so happens, the same logic applies if the second edit precedes the first edit. In that case rahter - // than pusing the first edit forward to match the second, we'll push the second edit forward to match the - // first. - // - // In this case that means we have { oldStart: 10, oldEnd: 80, newEnd: 70 } or, in TextChangeRange - // semantics: { { start: 10, length: 70 }, newLength: 60 } - // - // The math then works out as follows. - // If we have { oldStart1, oldEnd1, newEnd1 } and { oldStart2, oldEnd2, newEnd2 } then we can compute the - // final result like so: - // - // { - // oldStart3: Min(oldStart1, oldStart2), - // oldEnd3 : Max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1)), - // newEnd3 : Max(newEnd2, newEnd2 + (newEnd1 - oldEnd2)) - // } - var oldStart1 = oldStartN; - var oldEnd1 = oldEndN; - var newEnd1 = newEndN; - var oldStart2 = nextChange.span.start; - var oldEnd2 = textSpanEnd(nextChange.span); - var newEnd2 = oldStart2 + nextChange.newLength; - oldStartN = Math.min(oldStart1, oldStart2); - oldEndN = Math.max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1)); - newEndN = Math.max(newEnd2, newEnd2 + (newEnd1 - oldEnd2)); - } - return createTextChangeRange(createTextSpanFromBounds(oldStartN, oldEndN), newEndN - oldStartN); - } - ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions; - function getTypeParameterOwner(d) { - if (d && d.kind === 130 /* TypeParameter */) { - for (var current = d; current; current = current.parent) { - if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 205 /* InterfaceDeclaration */) { - return current; - } - } - } - } - ts.getTypeParameterOwner = getTypeParameterOwner; -})(ts || (ts = {})); -/// -/// -var ts; -(function (ts) { - var nodeConstructors = new Array(254 /* Count */); - /* @internal */ ts.parseTime = 0; - function getNodeConstructor(kind) { - return nodeConstructors[kind] || (nodeConstructors[kind] = ts.objectAllocator.getNodeConstructor(kind)); - } - ts.getNodeConstructor = getNodeConstructor; - function createNode(kind) { - return new (getNodeConstructor(kind))(); - } - ts.createNode = createNode; - function visitNode(cbNode, node) { - if (node) { - return cbNode(node); - } - } - function visitNodeArray(cbNodes, nodes) { - if (nodes) { - return cbNodes(nodes); - } - } - function visitEachNode(cbNode, nodes) { - if (nodes) { - for (var _i = 0; _i < nodes.length; _i++) { - var node = nodes[_i]; - var result = cbNode(node); - if (result) { - return result; - } - } - } - } - // Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes - // stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise, - // embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns - // a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned. - function forEachChild(node, cbNode, cbNodeArray) { - if (!node) { - return; - } - // The visitXXX functions could be written as local functions that close over the cbNode and cbNodeArray - // callback parameters, but that causes a closure allocation for each invocation with noticeable effects - // on performance. - var visitNodes = cbNodeArray ? visitNodeArray : visitEachNode; - var cbNodes = cbNodeArray || cbNode; - switch (node.kind) { - case 128 /* QualifiedName */: - return visitNode(cbNode, node.left) || - visitNode(cbNode, node.right); - case 130 /* TypeParameter */: - return visitNode(cbNode, node.name) || - visitNode(cbNode, node.constraint) || - visitNode(cbNode, node.expression); - case 131 /* Parameter */: - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 227 /* PropertyAssignment */: - case 228 /* ShorthandPropertyAssignment */: - case 201 /* VariableDeclaration */: - case 155 /* BindingElement */: - return visitNodes(cbNodes, node.decorators) || - visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.propertyName) || - visitNode(cbNode, node.dotDotDotToken) || - visitNode(cbNode, node.name) || - visitNode(cbNode, node.questionToken) || - visitNode(cbNode, node.type) || - visitNode(cbNode, node.initializer); - case 145 /* FunctionType */: - case 146 /* ConstructorType */: - case 140 /* CallSignature */: - case 141 /* ConstructSignature */: - case 142 /* IndexSignature */: - return visitNodes(cbNodes, node.decorators) || - visitNodes(cbNodes, node.modifiers) || - visitNodes(cbNodes, node.typeParameters) || - visitNodes(cbNodes, node.parameters) || - visitNode(cbNode, node.type); - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 137 /* Constructor */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 165 /* FunctionExpression */: - case 203 /* FunctionDeclaration */: - case 166 /* ArrowFunction */: - return visitNodes(cbNodes, node.decorators) || - visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.asteriskToken) || - visitNode(cbNode, node.name) || - visitNode(cbNode, node.questionToken) || - visitNodes(cbNodes, node.typeParameters) || - visitNodes(cbNodes, node.parameters) || - visitNode(cbNode, node.type) || - visitNode(cbNode, node.equalsGreaterThanToken) || - visitNode(cbNode, node.body); - case 144 /* TypeReference */: - return visitNode(cbNode, node.typeName) || - visitNodes(cbNodes, node.typeArguments); - case 143 /* TypePredicate */: - return visitNode(cbNode, node.parameterName) || - visitNode(cbNode, node.type); - case 147 /* TypeQuery */: - return visitNode(cbNode, node.exprName); - case 148 /* TypeLiteral */: - return visitNodes(cbNodes, node.members); - case 149 /* ArrayType */: - return visitNode(cbNode, node.elementType); - case 150 /* TupleType */: - return visitNodes(cbNodes, node.elementTypes); - case 151 /* UnionType */: - return visitNodes(cbNodes, node.types); - case 152 /* ParenthesizedType */: - return visitNode(cbNode, node.type); - case 153 /* ObjectBindingPattern */: - case 154 /* ArrayBindingPattern */: - return visitNodes(cbNodes, node.elements); - case 156 /* ArrayLiteralExpression */: - return visitNodes(cbNodes, node.elements); - case 157 /* ObjectLiteralExpression */: - return visitNodes(cbNodes, node.properties); - case 158 /* PropertyAccessExpression */: - return visitNode(cbNode, node.expression) || - visitNode(cbNode, node.dotToken) || - visitNode(cbNode, node.name); - case 159 /* ElementAccessExpression */: - return visitNode(cbNode, node.expression) || - visitNode(cbNode, node.argumentExpression); - case 160 /* CallExpression */: - case 161 /* NewExpression */: - return visitNode(cbNode, node.expression) || - visitNodes(cbNodes, node.typeArguments) || - visitNodes(cbNodes, node.arguments); - case 162 /* TaggedTemplateExpression */: - return visitNode(cbNode, node.tag) || - visitNode(cbNode, node.template); - case 163 /* TypeAssertionExpression */: - return visitNode(cbNode, node.type) || - visitNode(cbNode, node.expression); - case 164 /* ParenthesizedExpression */: - return visitNode(cbNode, node.expression); - case 167 /* DeleteExpression */: - return visitNode(cbNode, node.expression); - case 168 /* TypeOfExpression */: - return visitNode(cbNode, node.expression); - case 169 /* VoidExpression */: - return visitNode(cbNode, node.expression); - case 170 /* PrefixUnaryExpression */: - return visitNode(cbNode, node.operand); - case 175 /* YieldExpression */: - return visitNode(cbNode, node.asteriskToken) || - visitNode(cbNode, node.expression); - case 171 /* PostfixUnaryExpression */: - return visitNode(cbNode, node.operand); - case 172 /* BinaryExpression */: - return visitNode(cbNode, node.left) || - visitNode(cbNode, node.operatorToken) || - visitNode(cbNode, node.right); - case 173 /* ConditionalExpression */: - return visitNode(cbNode, node.condition) || - visitNode(cbNode, node.questionToken) || - visitNode(cbNode, node.whenTrue) || - visitNode(cbNode, node.colonToken) || - visitNode(cbNode, node.whenFalse); - case 176 /* SpreadElementExpression */: - return visitNode(cbNode, node.expression); - case 182 /* Block */: - case 209 /* ModuleBlock */: - return visitNodes(cbNodes, node.statements); - case 230 /* SourceFile */: - return visitNodes(cbNodes, node.statements) || - visitNode(cbNode, node.endOfFileToken); - case 183 /* VariableStatement */: - return visitNodes(cbNodes, node.decorators) || - visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.declarationList); - case 202 /* VariableDeclarationList */: - return visitNodes(cbNodes, node.declarations); - case 185 /* ExpressionStatement */: - return visitNode(cbNode, node.expression); - case 186 /* IfStatement */: - return visitNode(cbNode, node.expression) || - visitNode(cbNode, node.thenStatement) || - visitNode(cbNode, node.elseStatement); - case 187 /* DoStatement */: - return visitNode(cbNode, node.statement) || - visitNode(cbNode, node.expression); - case 188 /* WhileStatement */: - return visitNode(cbNode, node.expression) || - visitNode(cbNode, node.statement); - case 189 /* ForStatement */: - return visitNode(cbNode, node.initializer) || - visitNode(cbNode, node.condition) || - visitNode(cbNode, node.incrementor) || - visitNode(cbNode, node.statement); - case 190 /* ForInStatement */: - return visitNode(cbNode, node.initializer) || - visitNode(cbNode, node.expression) || - visitNode(cbNode, node.statement); - case 191 /* ForOfStatement */: - return visitNode(cbNode, node.initializer) || - visitNode(cbNode, node.expression) || - visitNode(cbNode, node.statement); - case 192 /* ContinueStatement */: - case 193 /* BreakStatement */: - return visitNode(cbNode, node.label); - case 194 /* ReturnStatement */: - return visitNode(cbNode, node.expression); - case 195 /* WithStatement */: - return visitNode(cbNode, node.expression) || - visitNode(cbNode, node.statement); - case 196 /* SwitchStatement */: - return visitNode(cbNode, node.expression) || - visitNode(cbNode, node.caseBlock); - case 210 /* CaseBlock */: - return visitNodes(cbNodes, node.clauses); - case 223 /* CaseClause */: - return visitNode(cbNode, node.expression) || - visitNodes(cbNodes, node.statements); - case 224 /* DefaultClause */: - return visitNodes(cbNodes, node.statements); - case 197 /* LabeledStatement */: - return visitNode(cbNode, node.label) || - visitNode(cbNode, node.statement); - case 198 /* ThrowStatement */: - return visitNode(cbNode, node.expression); - case 199 /* TryStatement */: - return visitNode(cbNode, node.tryBlock) || - visitNode(cbNode, node.catchClause) || - visitNode(cbNode, node.finallyBlock); - case 226 /* CatchClause */: - return visitNode(cbNode, node.variableDeclaration) || - visitNode(cbNode, node.block); - case 132 /* Decorator */: - return visitNode(cbNode, node.expression); - case 204 /* ClassDeclaration */: - case 177 /* ClassExpression */: - return visitNodes(cbNodes, node.decorators) || - visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.name) || - visitNodes(cbNodes, node.typeParameters) || - visitNodes(cbNodes, node.heritageClauses) || - visitNodes(cbNodes, node.members); - case 205 /* InterfaceDeclaration */: - return visitNodes(cbNodes, node.decorators) || - visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.name) || - visitNodes(cbNodes, node.typeParameters) || - visitNodes(cbNodes, node.heritageClauses) || - visitNodes(cbNodes, node.members); - case 206 /* TypeAliasDeclaration */: - return visitNodes(cbNodes, node.decorators) || - visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.name) || - visitNodes(cbNodes, node.typeParameters) || - visitNode(cbNode, node.type); - case 207 /* EnumDeclaration */: - return visitNodes(cbNodes, node.decorators) || - visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.name) || - visitNodes(cbNodes, node.members); - case 229 /* EnumMember */: - return visitNode(cbNode, node.name) || - visitNode(cbNode, node.initializer); - case 208 /* ModuleDeclaration */: - return visitNodes(cbNodes, node.decorators) || - visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.name) || - visitNode(cbNode, node.body); - case 211 /* ImportEqualsDeclaration */: - return visitNodes(cbNodes, node.decorators) || - visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.name) || - visitNode(cbNode, node.moduleReference); - case 212 /* ImportDeclaration */: - return visitNodes(cbNodes, node.decorators) || - visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.importClause) || - visitNode(cbNode, node.moduleSpecifier); - case 213 /* ImportClause */: - return visitNode(cbNode, node.name) || - visitNode(cbNode, node.namedBindings); - case 214 /* NamespaceImport */: - return visitNode(cbNode, node.name); - case 215 /* NamedImports */: - case 219 /* NamedExports */: - return visitNodes(cbNodes, node.elements); - case 218 /* ExportDeclaration */: - return visitNodes(cbNodes, node.decorators) || - visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.exportClause) || - visitNode(cbNode, node.moduleSpecifier); - case 216 /* ImportSpecifier */: - case 220 /* ExportSpecifier */: - return visitNode(cbNode, node.propertyName) || - visitNode(cbNode, node.name); - case 217 /* ExportAssignment */: - return visitNodes(cbNodes, node.decorators) || - visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.expression); - case 174 /* TemplateExpression */: - return visitNode(cbNode, node.head) || visitNodes(cbNodes, node.templateSpans); - case 180 /* TemplateSpan */: - return visitNode(cbNode, node.expression) || visitNode(cbNode, node.literal); - case 129 /* ComputedPropertyName */: - return visitNode(cbNode, node.expression); - case 225 /* HeritageClause */: - return visitNodes(cbNodes, node.types); - case 179 /* ExpressionWithTypeArguments */: - return visitNode(cbNode, node.expression) || - visitNodes(cbNodes, node.typeArguments); - case 222 /* ExternalModuleReference */: - return visitNode(cbNode, node.expression); - case 221 /* MissingDeclaration */: - return visitNodes(cbNodes, node.decorators); - case 231 /* JSDocTypeExpression */: - return visitNode(cbNode, node.type); - case 235 /* JSDocUnionType */: - return visitNodes(cbNodes, node.types); - case 236 /* JSDocTupleType */: - return visitNodes(cbNodes, node.types); - case 234 /* JSDocArrayType */: - return visitNode(cbNode, node.elementType); - case 238 /* JSDocNonNullableType */: - return visitNode(cbNode, node.type); - case 237 /* JSDocNullableType */: - return visitNode(cbNode, node.type); - case 239 /* JSDocRecordType */: - return visitNodes(cbNodes, node.members); - case 241 /* JSDocTypeReference */: - return visitNode(cbNode, node.name) || - visitNodes(cbNodes, node.typeArguments); - case 242 /* JSDocOptionalType */: - return visitNode(cbNode, node.type); - case 243 /* JSDocFunctionType */: - return visitNodes(cbNodes, node.parameters) || - visitNode(cbNode, node.type); - case 244 /* JSDocVariadicType */: - return visitNode(cbNode, node.type); - case 245 /* JSDocConstructorType */: - return visitNode(cbNode, node.type); - case 246 /* JSDocThisType */: - return visitNode(cbNode, node.type); - case 240 /* JSDocRecordMember */: - return visitNode(cbNode, node.name) || - visitNode(cbNode, node.type); - case 247 /* JSDocComment */: - return visitNodes(cbNodes, node.tags); - case 249 /* JSDocParameterTag */: - return visitNode(cbNode, node.preParameterName) || - visitNode(cbNode, node.typeExpression) || - visitNode(cbNode, node.postParameterName); - case 250 /* JSDocReturnTag */: - return visitNode(cbNode, node.typeExpression); - case 251 /* JSDocTypeTag */: - return visitNode(cbNode, node.typeExpression); - case 252 /* JSDocTemplateTag */: - return visitNodes(cbNodes, node.typeParameters); - } - } - ts.forEachChild = forEachChild; - function createSourceFile(fileName, sourceText, languageVersion, setParentNodes) { - if (setParentNodes === void 0) { setParentNodes = false; } - var start = new Date().getTime(); - var result = Parser.parseSourceFile(fileName, sourceText, languageVersion, undefined, setParentNodes); - ts.parseTime += new Date().getTime() - start; - return result; - } - ts.createSourceFile = createSourceFile; - // Produces a new SourceFile for the 'newText' provided. The 'textChangeRange' parameter - // indicates what changed between the 'text' that this SourceFile has and the 'newText'. - // The SourceFile will be created with the compiler attempting to reuse as many nodes from - // this file as possible. - // - // Note: this function mutates nodes from this SourceFile. That means any existing nodes - // from this SourceFile that are being held onto may change as a result (including - // becoming detached from any SourceFile). It is recommended that this SourceFile not - // be used once 'update' is called on it. - function updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks) { - return IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks); - } - ts.updateSourceFile = updateSourceFile; - /* @internal */ - function parseIsolatedJSDocComment(content, start, length) { - return Parser.JSDocParser.parseIsolatedJSDocComment(content, start, length); - } - ts.parseIsolatedJSDocComment = parseIsolatedJSDocComment; - /* @internal */ - // Exposed only for testing. - function parseJSDocTypeExpressionForTests(content, start, length) { - return Parser.JSDocParser.parseJSDocTypeExpressionForTests(content, start, length); - } - ts.parseJSDocTypeExpressionForTests = parseJSDocTypeExpressionForTests; - // Implement the parser as a singleton module. We do this for perf reasons because creating - // parser instances can actually be expensive enough to impact us on projects with many source - // files. - var Parser; - (function (Parser) { - // Share a single scanner across all calls to parse a source file. This helps speed things - // up by avoiding the cost of creating/compiling scanners over and over again. - var scanner = ts.createScanner(2 /* Latest */, true); - var disallowInAndDecoratorContext = 2 /* DisallowIn */ | 16 /* Decorator */; - var sourceFile; - var parseDiagnostics; - var syntaxCursor; - var token; - var sourceText; - var nodeCount; - var identifiers; - var identifierCount; - var parsingContext; - // Flags that dictate what parsing context we're in. For example: - // Whether or not we are in strict parsing mode. All that changes in strict parsing mode is - // that some tokens that would be considered identifiers may be considered keywords. - // - // When adding more parser context flags, consider which is the more common case that the - // flag will be in. This should be the 'false' state for that flag. The reason for this is - // that we don't store data in our nodes unless the value is in the *non-default* state. So, - // for example, more often than code 'allows-in' (or doesn't 'disallow-in'). We opt for - // 'disallow-in' set to 'false'. Otherwise, if we had 'allowsIn' set to 'true', then almost - // all nodes would need extra state on them to store this info. - // - // Note: 'allowIn' and 'allowYield' track 1:1 with the [in] and [yield] concepts in the ES6 - // grammar specification. - // - // An important thing about these context concepts. By default they are effectively inherited - // while parsing through every grammar production. i.e. if you don't change them, then when - // you parse a sub-production, it will have the same context values as the parent production. - // This is great most of the time. After all, consider all the 'expression' grammar productions - // and how nearly all of them pass along the 'in' and 'yield' context values: - // - // EqualityExpression[In, Yield] : - // RelationalExpression[?In, ?Yield] - // EqualityExpression[?In, ?Yield] == RelationalExpression[?In, ?Yield] - // EqualityExpression[?In, ?Yield] != RelationalExpression[?In, ?Yield] - // EqualityExpression[?In, ?Yield] === RelationalExpression[?In, ?Yield] - // EqualityExpression[?In, ?Yield] !== RelationalExpression[?In, ?Yield] - // - // Where you have to be careful is then understanding what the points are in the grammar - // where the values are *not* passed along. For example: - // - // SingleNameBinding[Yield,GeneratorParameter] - // [+GeneratorParameter]BindingIdentifier[Yield] Initializer[In]opt - // [~GeneratorParameter]BindingIdentifier[?Yield]Initializer[In, ?Yield]opt - // - // Here this is saying that if the GeneratorParameter context flag is set, that we should - // explicitly set the 'yield' context flag to false before calling into the BindingIdentifier - // and we should explicitly unset the 'yield' context flag before calling into the Initializer. - // production. Conversely, if the GeneratorParameter context flag is not set, then we - // should leave the 'yield' context flag alone. - // - // Getting this all correct is tricky and requires careful reading of the grammar to - // understand when these values should be changed versus when they should be inherited. - // - // Note: it should not be necessary to save/restore these flags during speculative/lookahead - // parsing. These context flags are naturally stored and restored through normal recursive - // descent parsing and unwinding. - var contextFlags; - // Whether or not we've had a parse error since creating the last AST node. If we have - // encountered an error, it will be stored on the next AST node we create. Parse errors - // can be broken down into three categories: - // - // 1) An error that occurred during scanning. For example, an unterminated literal, or a - // character that was completely not understood. - // - // 2) A token was expected, but was not present. This type of error is commonly produced - // by the 'parseExpected' function. - // - // 3) A token was present that no parsing function was able to consume. This type of error - // only occurs in the 'abortParsingListOrMoveToNextToken' function when the parser - // decides to skip the token. - // - // In all of these cases, we want to mark the next node as having had an error before it. - // With this mark, we can know in incremental settings if this node can be reused, or if - // we have to reparse it. If we don't keep this information around, we may just reuse the - // node. in that event we would then not produce the same errors as we did before, causing - // significant confusion problems. - // - // Note: it is necessary that this value be saved/restored during speculative/lookahead - // parsing. During lookahead parsing, we will often create a node. That node will have - // this value attached, and then this value will be set back to 'false'. If we decide to - // rewind, we must get back to the same value we had prior to the lookahead. - // - // Note: any errors at the end of the file that do not precede a regular node, should get - // attached to the EOF token. - var parseErrorBeforeNextFinishedNode = false; - function parseSourceFile(fileName, _sourceText, languageVersion, _syntaxCursor, setParentNodes) { - initializeState(fileName, _sourceText, languageVersion, _syntaxCursor); - var result = parseSourceFileWorker(fileName, languageVersion, setParentNodes); - clearState(); - return result; - } - Parser.parseSourceFile = parseSourceFile; - function initializeState(fileName, _sourceText, languageVersion, _syntaxCursor) { - sourceText = _sourceText; - syntaxCursor = _syntaxCursor; - parseDiagnostics = []; - parsingContext = 0; - identifiers = {}; - identifierCount = 0; - nodeCount = 0; - contextFlags = ts.isJavaScript(fileName) ? 64 /* JavaScriptFile */ : 0 /* None */; - parseErrorBeforeNextFinishedNode = false; - // Initialize and prime the scanner before parsing the source elements. - scanner.setText(sourceText); - scanner.setOnError(scanError); - scanner.setScriptTarget(languageVersion); - } - function clearState() { - // Clear out the text the scanner is pointing at, so it doesn't keep anything alive unnecessarily. - scanner.setText(""); - scanner.setOnError(undefined); - // Clear any data. We don't want to accidently hold onto it for too long. - parseDiagnostics = undefined; - sourceFile = undefined; - identifiers = undefined; - syntaxCursor = undefined; - sourceText = undefined; - } - function parseSourceFileWorker(fileName, languageVersion, setParentNodes) { - sourceFile = createSourceFile(fileName, languageVersion); - // Prime the scanner. - token = nextToken(); - processReferenceComments(sourceFile); - sourceFile.statements = parseList(0 /* SourceElements */, true, parseStatement); - ts.Debug.assert(token === 1 /* EndOfFileToken */); - sourceFile.endOfFileToken = parseTokenNode(); - setExternalModuleIndicator(sourceFile); - sourceFile.nodeCount = nodeCount; - sourceFile.identifierCount = identifierCount; - sourceFile.identifiers = identifiers; - sourceFile.parseDiagnostics = parseDiagnostics; - if (setParentNodes) { - fixupParentReferences(sourceFile); - } - // If this is a javascript file, proactively see if we can get JSDoc comments for - // relevant nodes in the file. We'll use these to provide typing informaion if they're - // available. - if (ts.isJavaScript(fileName)) { - addJSDocComments(); - } - return sourceFile; - } - function addJSDocComments() { - forEachChild(sourceFile, visit); - return; - function visit(node) { - // Add additional cases as necessary depending on how we see JSDoc comments used - // in the wild. - switch (node.kind) { - case 183 /* VariableStatement */: - case 203 /* FunctionDeclaration */: - case 131 /* Parameter */: - addJSDocComment(node); - } - forEachChild(node, visit); - } - } - function addJSDocComment(node) { - var comments = ts.getLeadingCommentRangesOfNode(node, sourceFile); - if (comments) { - for (var _i = 0; _i < comments.length; _i++) { - var comment = comments[_i]; - var jsDocComment = JSDocParser.parseJSDocComment(node, comment.pos, comment.end - comment.pos); - if (jsDocComment) { - node.jsDocComment = jsDocComment; - } - } - } - } - function fixupParentReferences(sourceFile) { - // normally parent references are set during binding. However, for clients that only need - // a syntax tree, and no semantic features, then the binding process is an unnecessary - // overhead. This functions allows us to set all the parents, without all the expense of - // binding. - var parent = sourceFile; - forEachChild(sourceFile, visitNode); - return; - function visitNode(n) { - // walk down setting parents that differ from the parent we think it should be. This - // allows us to quickly bail out of setting parents for subtrees during incremental - // parsing - if (n.parent !== parent) { - n.parent = parent; - var saveParent = parent; - parent = n; - forEachChild(n, visitNode); - parent = saveParent; - } - } - } - Parser.fixupParentReferences = fixupParentReferences; - function createSourceFile(fileName, languageVersion) { - var sourceFile = createNode(230 /* SourceFile */, 0); - sourceFile.pos = 0; - sourceFile.end = sourceText.length; - sourceFile.text = sourceText; - sourceFile.bindDiagnostics = []; - sourceFile.languageVersion = languageVersion; - sourceFile.fileName = ts.normalizePath(fileName); - sourceFile.flags = ts.fileExtensionIs(sourceFile.fileName, ".d.ts") ? 2048 /* DeclarationFile */ : 0; - return sourceFile; - } - function setContextFlag(val, flag) { - if (val) { - contextFlags |= flag; - } - else { - contextFlags &= ~flag; - } - } - function setStrictModeContext(val) { - setContextFlag(val, 1 /* StrictMode */); - } - function setDisallowInContext(val) { - setContextFlag(val, 2 /* DisallowIn */); - } - function setYieldContext(val) { - setContextFlag(val, 4 /* Yield */); - } - function setGeneratorParameterContext(val) { - setContextFlag(val, 8 /* GeneratorParameter */); - } - function setDecoratorContext(val) { - setContextFlag(val, 16 /* Decorator */); - } - function doOutsideOfContext(flags, func) { - var currentContextFlags = contextFlags & flags; - if (currentContextFlags) { - setContextFlag(false, currentContextFlags); - var result = func(); - setContextFlag(true, currentContextFlags); - return result; - } - // no need to do anything special as we are not in any of the requested contexts - return func(); - } - function allowInAnd(func) { - if (contextFlags & 2 /* DisallowIn */) { - setDisallowInContext(false); - var result = func(); - setDisallowInContext(true); - return result; - } - // no need to do anything special if 'in' is already allowed. - return func(); - } - function disallowInAnd(func) { - if (contextFlags & 2 /* DisallowIn */) { - // no need to do anything special if 'in' is already disallowed. - return func(); - } - setDisallowInContext(true); - var result = func(); - setDisallowInContext(false); - return result; - } - function doInYieldContext(func) { - if (contextFlags & 4 /* Yield */) { - // no need to do anything special if we're already in the [Yield] context. - return func(); - } - setYieldContext(true); - var result = func(); - setYieldContext(false); - return result; - } - function doOutsideOfYieldContext(func) { - if (contextFlags & 4 /* Yield */) { - setYieldContext(false); - var result = func(); - setYieldContext(true); - return result; - } - // no need to do anything special if we're not in the [Yield] context. - return func(); - } - function doInDecoratorContext(func) { - if (contextFlags & 16 /* Decorator */) { - // no need to do anything special if we're already in the [Decorator] context. - return func(); - } - setDecoratorContext(true); - var result = func(); - setDecoratorContext(false); - return result; - } - function inYieldContext() { - return (contextFlags & 4 /* Yield */) !== 0; - } - function inStrictModeContext() { - return (contextFlags & 1 /* StrictMode */) !== 0; - } - function inGeneratorParameterContext() { - return (contextFlags & 8 /* GeneratorParameter */) !== 0; - } - function inDisallowInContext() { - return (contextFlags & 2 /* DisallowIn */) !== 0; - } - function inDecoratorContext() { - return (contextFlags & 16 /* Decorator */) !== 0; - } - function parseErrorAtCurrentToken(message, arg0) { - var start = scanner.getTokenPos(); - var length = scanner.getTextPos() - start; - parseErrorAtPosition(start, length, message, arg0); - } - function parseErrorAtPosition(start, length, message, arg0) { - // Don't report another error if it would just be at the same position as the last error. - var lastError = ts.lastOrUndefined(parseDiagnostics); - if (!lastError || start !== lastError.start) { - parseDiagnostics.push(ts.createFileDiagnostic(sourceFile, start, length, message, arg0)); - } - // Mark that we've encountered an error. We'll set an appropriate bit on the next - // node we finish so that it can't be reused incrementally. - parseErrorBeforeNextFinishedNode = true; - } - function scanError(message, length) { - var pos = scanner.getTextPos(); - parseErrorAtPosition(pos, length || 0, message); - } - function getNodePos() { - return scanner.getStartPos(); - } - function getNodeEnd() { - return scanner.getStartPos(); - } - function nextToken() { - return token = scanner.scan(); - } - function getTokenPos(pos) { - return ts.skipTrivia(sourceText, pos); - } - function reScanGreaterToken() { - return token = scanner.reScanGreaterToken(); - } - function reScanSlashToken() { - return token = scanner.reScanSlashToken(); - } - function reScanTemplateToken() { - return token = scanner.reScanTemplateToken(); - } - function speculationHelper(callback, isLookAhead) { - // Keep track of the state we'll need to rollback to if lookahead fails (or if the - // caller asked us to always reset our state). - var saveToken = token; - var saveParseDiagnosticsLength = parseDiagnostics.length; - var saveParseErrorBeforeNextFinishedNode = parseErrorBeforeNextFinishedNode; - // Note: it is not actually necessary to save/restore the context flags here. That's - // because the saving/restorating of these flags happens naturally through the recursive - // descent nature of our parser. However, we still store this here just so we can - // assert that that invariant holds. - var saveContextFlags = contextFlags; - // If we're only looking ahead, then tell the scanner to only lookahead as well. - // Otherwise, if we're actually speculatively parsing, then tell the scanner to do the - // same. - var result = isLookAhead - ? scanner.lookAhead(callback) - : scanner.tryScan(callback); - ts.Debug.assert(saveContextFlags === contextFlags); - // If our callback returned something 'falsy' or we're just looking ahead, - // then unconditionally restore us to where we were. - if (!result || isLookAhead) { - token = saveToken; - parseDiagnostics.length = saveParseDiagnosticsLength; - parseErrorBeforeNextFinishedNode = saveParseErrorBeforeNextFinishedNode; - } - return result; - } - // Invokes the provided callback then unconditionally restores the parser to the state it - // was in immediately prior to invoking the callback. The result of invoking the callback - // is returned from this function. - function lookAhead(callback) { - return speculationHelper(callback, true); - } - // Invokes the provided callback. If the callback returns something falsy, then it restores - // the parser to the state it was in immediately prior to invoking the callback. If the - // callback returns something truthy, then the parser state is not rolled back. The result - // of invoking the callback is returned from this function. - function tryParse(callback) { - return speculationHelper(callback, false); - } - // Ignore strict mode flag because we will report an error in type checker instead. - function isIdentifier() { - if (token === 65 /* Identifier */) { - return true; - } - // If we have a 'yield' keyword, and we're in the [yield] context, then 'yield' is - // considered a keyword and is not an identifier. - if (token === 110 /* YieldKeyword */ && inYieldContext()) { - return false; - } - return token > 101 /* LastReservedWord */; - } - function parseExpected(kind, diagnosticMessage) { - if (token === kind) { - nextToken(); - return true; - } - // Report specific message if provided with one. Otherwise, report generic fallback message. - if (diagnosticMessage) { - parseErrorAtCurrentToken(diagnosticMessage); - } - else { - parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(kind)); - } - return false; - } - function parseOptional(t) { - if (token === t) { - nextToken(); - return true; - } - return false; - } - function parseOptionalToken(t) { - if (token === t) { - return parseTokenNode(); - } - return undefined; - } - function parseExpectedToken(t, reportAtCurrentPosition, diagnosticMessage, arg0) { - return parseOptionalToken(t) || - createMissingNode(t, reportAtCurrentPosition, diagnosticMessage, arg0); - } - function parseTokenNode() { - var node = createNode(token); - nextToken(); - return finishNode(node); - } - function canParseSemicolon() { - // If there's a real semicolon, then we can always parse it out. - if (token === 22 /* SemicolonToken */) { - return true; - } - // We can parse out an optional semicolon in ASI cases in the following cases. - return token === 15 /* CloseBraceToken */ || token === 1 /* EndOfFileToken */ || scanner.hasPrecedingLineBreak(); - } - function parseSemicolon() { - if (canParseSemicolon()) { - if (token === 22 /* SemicolonToken */) { - // consume the semicolon if it was explicitly provided. - nextToken(); - } - return true; - } - else { - return parseExpected(22 /* SemicolonToken */); - } - } - function createNode(kind, pos) { - nodeCount++; - var node = new (nodeConstructors[kind] || (nodeConstructors[kind] = ts.objectAllocator.getNodeConstructor(kind)))(); - if (!(pos >= 0)) { - pos = scanner.getStartPos(); - } - node.pos = pos; - node.end = pos; - return node; - } - function finishNode(node, end) { - node.end = end === undefined ? scanner.getStartPos() : end; - if (contextFlags) { - node.parserContextFlags = contextFlags; - } - // Keep track on the node if we encountered an error while parsing it. If we did, then - // we cannot reuse the node incrementally. Once we've marked this node, clear out the - // flag so that we don't mark any subsequent nodes. - if (parseErrorBeforeNextFinishedNode) { - parseErrorBeforeNextFinishedNode = false; - node.parserContextFlags |= 32 /* ThisNodeHasError */; - } - return node; - } - function createMissingNode(kind, reportAtCurrentPosition, diagnosticMessage, arg0) { - if (reportAtCurrentPosition) { - parseErrorAtPosition(scanner.getStartPos(), 0, diagnosticMessage, arg0); - } - else { - parseErrorAtCurrentToken(diagnosticMessage, arg0); - } - var result = createNode(kind, scanner.getStartPos()); - result.text = ""; - return finishNode(result); - } - function internIdentifier(text) { - text = ts.escapeIdentifier(text); - return ts.hasProperty(identifiers, text) ? identifiers[text] : (identifiers[text] = text); - } - // An identifier that starts with two underscores has an extra underscore character prepended to it to avoid issues - // with magic property names like '__proto__'. The 'identifiers' object is used to share a single string instance for - // each identifier in order to reduce memory consumption. - function createIdentifier(isIdentifier, diagnosticMessage) { - identifierCount++; - if (isIdentifier) { - var node = createNode(65 /* Identifier */); - // Store original token kind if it is not just an Identifier so we can report appropriate error later in type checker - if (token !== 65 /* Identifier */) { - node.originalKeywordKind = token; - } - node.text = internIdentifier(scanner.getTokenValue()); - nextToken(); - return finishNode(node); - } - return createMissingNode(65 /* Identifier */, false, diagnosticMessage || ts.Diagnostics.Identifier_expected); - } - function parseIdentifier(diagnosticMessage) { - return createIdentifier(isIdentifier(), diagnosticMessage); - } - function parseIdentifierName() { - return createIdentifier(isIdentifierOrKeyword()); - } - function isLiteralPropertyName() { - return isIdentifierOrKeyword() || - token === 8 /* StringLiteral */ || - token === 7 /* NumericLiteral */; - } - function parsePropertyNameWorker(allowComputedPropertyNames) { - if (token === 8 /* StringLiteral */ || token === 7 /* NumericLiteral */) { - return parseLiteralNode(true); - } - if (allowComputedPropertyNames && token === 18 /* OpenBracketToken */) { - return parseComputedPropertyName(); - } - return parseIdentifierName(); - } - function parsePropertyName() { - return parsePropertyNameWorker(true); - } - function parseSimplePropertyName() { - return parsePropertyNameWorker(false); - } - function isSimplePropertyName() { - return token === 8 /* StringLiteral */ || token === 7 /* NumericLiteral */ || isIdentifierOrKeyword(); - } - function parseComputedPropertyName() { - // PropertyName[Yield,GeneratorParameter] : - // LiteralPropertyName - // [+GeneratorParameter] ComputedPropertyName - // [~GeneratorParameter] ComputedPropertyName[?Yield] - // - // ComputedPropertyName[Yield] : - // [ AssignmentExpression[In, ?Yield] ] - // - var node = createNode(129 /* ComputedPropertyName */); - parseExpected(18 /* OpenBracketToken */); - // We parse any expression (including a comma expression). But the grammar - // says that only an assignment expression is allowed, so the grammar checker - // will error if it sees a comma expression. - var yieldContext = inYieldContext(); - if (inGeneratorParameterContext()) { - setYieldContext(false); - } - node.expression = allowInAnd(parseExpression); - if (inGeneratorParameterContext()) { - setYieldContext(yieldContext); - } - parseExpected(19 /* CloseBracketToken */); - return finishNode(node); - } - function parseContextualModifier(t) { - return token === t && tryParse(nextTokenCanFollowModifier); - } - function nextTokenCanFollowModifier() { - if (token === 70 /* ConstKeyword */) { - // 'const' is only a modifier if followed by 'enum'. - return nextToken() === 77 /* EnumKeyword */; - } - if (token === 78 /* ExportKeyword */) { - nextToken(); - if (token === 73 /* DefaultKeyword */) { - return lookAhead(nextTokenIsClassOrFunction); - } - return token !== 35 /* AsteriskToken */ && token !== 14 /* OpenBraceToken */ && canFollowModifier(); - } - if (token === 73 /* DefaultKeyword */) { - return nextTokenIsClassOrFunction(); - } - nextToken(); - return canFollowModifier(); - } - function parseAnyContextualModifier() { - return ts.isModifier(token) && tryParse(nextTokenCanFollowModifier); - } - function canFollowModifier() { - return token === 18 /* OpenBracketToken */ - || token === 14 /* OpenBraceToken */ - || token === 35 /* AsteriskToken */ - || isLiteralPropertyName(); - } - function nextTokenIsClassOrFunction() { - nextToken(); - return token === 69 /* ClassKeyword */ || token === 83 /* FunctionKeyword */; - } - // True if positioned at the start of a list element - function isListElement(parsingContext, inErrorRecovery) { - var node = currentNode(parsingContext); - if (node) { - return true; - } - switch (parsingContext) { - case 0 /* SourceElements */: - case 1 /* BlockStatements */: - case 3 /* SwitchClauseStatements */: - // If we're in error recovery, then we don't want to treat ';' as an empty statement. - // The problem is that ';' can show up in far too many contexts, and if we see one - // and assume it's a statement, then we may bail out inappropriately from whatever - // we're parsing. For example, if we have a semicolon in the middle of a class, then - // we really don't want to assume the class is over and we're on a statement in the - // outer module. We just want to consume and move on. - return !(token === 22 /* SemicolonToken */ && inErrorRecovery) && isStartOfStatement(); - case 2 /* SwitchClauses */: - return token === 67 /* CaseKeyword */ || token === 73 /* DefaultKeyword */; - case 4 /* TypeMembers */: - return isStartOfTypeMember(); - case 5 /* ClassMembers */: - // We allow semicolons as class elements (as specified by ES6) as long as we're - // not in error recovery. If we're in error recovery, we don't want an errant - // semicolon to be treated as a class member (since they're almost always used - // for statements. - return lookAhead(isClassMemberStart) || (token === 22 /* SemicolonToken */ && !inErrorRecovery); - case 6 /* EnumMembers */: - // Include open bracket computed properties. This technically also lets in indexers, - // which would be a candidate for improved error reporting. - return token === 18 /* OpenBracketToken */ || isLiteralPropertyName(); - case 12 /* ObjectLiteralMembers */: - return token === 18 /* OpenBracketToken */ || token === 35 /* AsteriskToken */ || isLiteralPropertyName(); - case 9 /* ObjectBindingElements */: - return isLiteralPropertyName(); - case 7 /* HeritageClauseElement */: - // If we see { } then only consume it as an expression if it is followed by , or { - // That way we won't consume the body of a class in its heritage clause. - if (token === 14 /* OpenBraceToken */) { - return lookAhead(isValidHeritageClauseObjectLiteral); - } - if (!inErrorRecovery) { - return isStartOfLeftHandSideExpression() && !isHeritageClauseExtendsOrImplementsKeyword(); - } - else { - // If we're in error recovery we tighten up what we're willing to match. - // That way we don't treat something like "this" as a valid heritage clause - // element during recovery. - return isIdentifier() && !isHeritageClauseExtendsOrImplementsKeyword(); - } - case 8 /* VariableDeclarations */: - return isIdentifierOrPattern(); - case 10 /* ArrayBindingElements */: - return token === 23 /* CommaToken */ || token === 21 /* DotDotDotToken */ || isIdentifierOrPattern(); - case 15 /* TypeParameters */: - return isIdentifier(); - case 11 /* ArgumentExpressions */: - case 13 /* ArrayLiteralMembers */: - return token === 23 /* CommaToken */ || token === 21 /* DotDotDotToken */ || isStartOfExpression(); - case 14 /* Parameters */: - return isStartOfParameter(); - case 16 /* TypeArguments */: - case 17 /* TupleElementTypes */: - return token === 23 /* CommaToken */ || isStartOfType(); - case 18 /* HeritageClauses */: - return isHeritageClause(); - case 19 /* ImportOrExportSpecifiers */: - return isIdentifierOrKeyword(); - case 20 /* JSDocFunctionParameters */: - case 21 /* JSDocTypeArguments */: - case 23 /* JSDocTupleTypes */: - return JSDocParser.isJSDocType(); - case 22 /* JSDocRecordMembers */: - return isSimplePropertyName(); - } - ts.Debug.fail("Non-exhaustive case in 'isListElement'."); - } - function isValidHeritageClauseObjectLiteral() { - ts.Debug.assert(token === 14 /* OpenBraceToken */); - if (nextToken() === 15 /* CloseBraceToken */) { - // if we see "extends {}" then only treat the {} as what we're extending (and not - // the class body) if we have: - // - // extends {} { - // extends {}, - // extends {} extends - // extends {} implements - var next = nextToken(); - return next === 23 /* CommaToken */ || next === 14 /* OpenBraceToken */ || next === 79 /* ExtendsKeyword */ || next === 102 /* ImplementsKeyword */; - } - return true; - } - function nextTokenIsIdentifier() { - nextToken(); - return isIdentifier(); - } - function isHeritageClauseExtendsOrImplementsKeyword() { - if (token === 102 /* ImplementsKeyword */ || - token === 79 /* ExtendsKeyword */) { - return lookAhead(nextTokenIsStartOfExpression); - } - return false; - } - function nextTokenIsStartOfExpression() { - nextToken(); - return isStartOfExpression(); - } - // True if positioned at a list terminator - function isListTerminator(kind) { - if (token === 1 /* EndOfFileToken */) { - // Being at the end of the file ends all lists. - return true; - } - switch (kind) { - case 1 /* BlockStatements */: - case 2 /* SwitchClauses */: - case 4 /* TypeMembers */: - case 5 /* ClassMembers */: - case 6 /* EnumMembers */: - case 12 /* ObjectLiteralMembers */: - case 9 /* ObjectBindingElements */: - case 19 /* ImportOrExportSpecifiers */: - return token === 15 /* CloseBraceToken */; - case 3 /* SwitchClauseStatements */: - return token === 15 /* CloseBraceToken */ || token === 67 /* CaseKeyword */ || token === 73 /* DefaultKeyword */; - case 7 /* HeritageClauseElement */: - return token === 14 /* OpenBraceToken */ || token === 79 /* ExtendsKeyword */ || token === 102 /* ImplementsKeyword */; - case 8 /* VariableDeclarations */: - return isVariableDeclaratorListTerminator(); - case 15 /* TypeParameters */: - // Tokens other than '>' are here for better error recovery - return token === 25 /* GreaterThanToken */ || token === 16 /* OpenParenToken */ || token === 14 /* OpenBraceToken */ || token === 79 /* ExtendsKeyword */ || token === 102 /* ImplementsKeyword */; - case 11 /* ArgumentExpressions */: - // Tokens other than ')' are here for better error recovery - return token === 17 /* CloseParenToken */ || token === 22 /* SemicolonToken */; - case 13 /* ArrayLiteralMembers */: - case 17 /* TupleElementTypes */: - case 10 /* ArrayBindingElements */: - return token === 19 /* CloseBracketToken */; - case 14 /* Parameters */: - // Tokens other than ')' and ']' (the latter for index signatures) are here for better error recovery - return token === 17 /* CloseParenToken */ || token === 19 /* CloseBracketToken */ /*|| token === SyntaxKind.OpenBraceToken*/; - case 16 /* TypeArguments */: - // Tokens other than '>' are here for better error recovery - return token === 25 /* GreaterThanToken */ || token === 16 /* OpenParenToken */; - case 18 /* HeritageClauses */: - return token === 14 /* OpenBraceToken */ || token === 15 /* CloseBraceToken */; - case 20 /* JSDocFunctionParameters */: - return token === 17 /* CloseParenToken */ || token === 51 /* ColonToken */ || token === 15 /* CloseBraceToken */; - case 21 /* JSDocTypeArguments */: - return token === 25 /* GreaterThanToken */ || token === 15 /* CloseBraceToken */; - case 23 /* JSDocTupleTypes */: - return token === 19 /* CloseBracketToken */ || token === 15 /* CloseBraceToken */; - case 22 /* JSDocRecordMembers */: - return token === 15 /* CloseBraceToken */; - } - } - function isVariableDeclaratorListTerminator() { - // If we can consume a semicolon (either explicitly, or with ASI), then consider us done - // with parsing the list of variable declarators. - if (canParseSemicolon()) { - return true; - } - // in the case where we're parsing the variable declarator of a 'for-in' statement, we - // are done if we see an 'in' keyword in front of us. Same with for-of - if (isInOrOfKeyword(token)) { - return true; - } - // ERROR RECOVERY TWEAK: - // For better error recovery, if we see an '=>' then we just stop immediately. We've got an - // arrow function here and it's going to be very unlikely that we'll resynchronize and get - // another variable declaration. - if (token === 32 /* EqualsGreaterThanToken */) { - return true; - } - // Keep trying to parse out variable declarators. - return false; - } - // True if positioned at element or terminator of the current list or any enclosing list - function isInSomeParsingContext() { - for (var kind = 0; kind < 24 /* Count */; kind++) { - if (parsingContext & (1 << kind)) { - if (isListElement(kind, true) || isListTerminator(kind)) { - return true; - } - } - } - return false; - } - // Parses a list of elements - function parseList(kind, checkForStrictMode, parseElement) { - var saveParsingContext = parsingContext; - parsingContext |= 1 << kind; - var result = []; - result.pos = getNodePos(); - var savedStrictModeContext = inStrictModeContext(); - while (!isListTerminator(kind)) { - if (isListElement(kind, false)) { - var element = parseListElement(kind, parseElement); - result.push(element); - // test elements only if we are not already in strict mode - if (checkForStrictMode && !inStrictModeContext()) { - if (ts.isPrologueDirective(element)) { - if (isUseStrictPrologueDirective(element)) { - setStrictModeContext(true); - checkForStrictMode = false; - } - } - else { - checkForStrictMode = false; - } - } - continue; - } - if (abortParsingListOrMoveToNextToken(kind)) { - break; - } - } - setStrictModeContext(savedStrictModeContext); - result.end = getNodeEnd(); - parsingContext = saveParsingContext; - return result; - } - /// Should be called only on prologue directives (isPrologueDirective(node) should be true) - function isUseStrictPrologueDirective(node) { - ts.Debug.assert(ts.isPrologueDirective(node)); - var nodeText = ts.getTextOfNodeFromSourceText(sourceText, node.expression); - // Note: the node text must be exactly "use strict" or 'use strict'. It is not ok for the - // string to contain unicode escapes (as per ES5). - return nodeText === '"use strict"' || nodeText === "'use strict'"; - } - function parseListElement(parsingContext, parseElement) { - var node = currentNode(parsingContext); - if (node) { - return consumeNode(node); - } - return parseElement(); - } - function currentNode(parsingContext) { - // If there is an outstanding parse error that we've encountered, but not attached to - // some node, then we cannot get a node from the old source tree. This is because we - // want to mark the next node we encounter as being unusable. - // - // Note: This may be too conservative. Perhaps we could reuse the node and set the bit - // on it (or its leftmost child) as having the error. For now though, being conservative - // is nice and likely won't ever affect perf. - if (parseErrorBeforeNextFinishedNode) { - return undefined; - } - if (!syntaxCursor) { - // if we don't have a cursor, we could never return a node from the old tree. - return undefined; - } - var node = syntaxCursor.currentNode(scanner.getStartPos()); - // Can't reuse a missing node. - if (ts.nodeIsMissing(node)) { - return undefined; - } - // Can't reuse a node that intersected the change range. - if (node.intersectsChange) { - return undefined; - } - // Can't reuse a node that contains a parse error. This is necessary so that we - // produce the same set of errors again. - if (ts.containsParseError(node)) { - return undefined; - } - // We can only reuse a node if it was parsed under the same strict mode that we're - // currently in. i.e. if we originally parsed a node in non-strict mode, but then - // the user added 'using strict' at the top of the file, then we can't use that node - // again as the presense of strict mode may cause us to parse the tokens in the file - // differetly. - // - // Note: we *can* reuse tokens when the strict mode changes. That's because tokens - // are unaffected by strict mode. It's just the parser will decide what to do with it - // differently depending on what mode it is in. - // - // This also applies to all our other context flags as well. - var nodeContextFlags = node.parserContextFlags & 63 /* ParserGeneratedFlags */; - if (nodeContextFlags !== contextFlags) { - return undefined; - } - // Ok, we have a node that looks like it could be reused. Now verify that it is valid - // in the currest list parsing context that we're currently at. - if (!canReuseNode(node, parsingContext)) { - return undefined; - } - return node; - } - function consumeNode(node) { - // Move the scanner so it is after the node we just consumed. - scanner.setTextPos(node.end); - nextToken(); - return node; - } - function canReuseNode(node, parsingContext) { - switch (parsingContext) { - case 5 /* ClassMembers */: - return isReusableClassMember(node); - case 2 /* SwitchClauses */: - return isReusableSwitchClause(node); - case 0 /* SourceElements */: - case 1 /* BlockStatements */: - case 3 /* SwitchClauseStatements */: - return isReusableStatement(node); - case 6 /* EnumMembers */: - return isReusableEnumMember(node); - case 4 /* TypeMembers */: - return isReusableTypeMember(node); - case 8 /* VariableDeclarations */: - return isReusableVariableDeclaration(node); - case 14 /* Parameters */: - return isReusableParameter(node); - // Any other lists we do not care about reusing nodes in. But feel free to add if - // you can do so safely. Danger areas involve nodes that may involve speculative - // parsing. If speculative parsing is involved with the node, then the range the - // parser reached while looking ahead might be in the edited range (see the example - // in canReuseVariableDeclaratorNode for a good case of this). - case 18 /* HeritageClauses */: - // This would probably be safe to reuse. There is no speculative parsing with - // heritage clauses. - case 15 /* TypeParameters */: - // This would probably be safe to reuse. There is no speculative parsing with - // type parameters. Note that that's because type *parameters* only occur in - // unambiguous *type* contexts. While type *arguments* occur in very ambiguous - // *expression* contexts. - case 17 /* TupleElementTypes */: - // This would probably be safe to reuse. There is no speculative parsing with - // tuple types. - // Technically, type argument list types are probably safe to reuse. While - // speculative parsing is involved with them (since type argument lists are only - // produced from speculative parsing a < as a type argument list), we only have - // the types because speculative parsing succeeded. Thus, the lookahead never - // went past the end of the list and rewound. - case 16 /* TypeArguments */: - // Note: these are almost certainly not safe to ever reuse. Expressions commonly - // need a large amount of lookahead, and we should not reuse them as they may - // have actually intersected the edit. - case 11 /* ArgumentExpressions */: - // This is not safe to reuse for the same reason as the 'AssignmentExpression' - // cases. i.e. a property assignment may end with an expression, and thus might - // have lookahead far beyond it's old node. - case 12 /* ObjectLiteralMembers */: - // This is probably not safe to reuse. There can be speculative parsing with - // type names in a heritage clause. There can be generic names in the type - // name list, and there can be left hand side expressions (which can have type - // arguments.) - case 7 /* HeritageClauseElement */: - } - return false; - } - function isReusableClassMember(node) { - if (node) { - switch (node.kind) { - case 137 /* Constructor */: - case 142 /* IndexSignature */: - case 136 /* MethodDeclaration */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 134 /* PropertyDeclaration */: - case 181 /* SemicolonClassElement */: - return true; - } - } - return false; - } - function isReusableSwitchClause(node) { - if (node) { - switch (node.kind) { - case 223 /* CaseClause */: - case 224 /* DefaultClause */: - return true; - } - } - return false; - } - function isReusableStatement(node) { - if (node) { - switch (node.kind) { - case 203 /* FunctionDeclaration */: - case 183 /* VariableStatement */: - case 182 /* Block */: - case 186 /* IfStatement */: - case 185 /* ExpressionStatement */: - case 198 /* ThrowStatement */: - case 194 /* ReturnStatement */: - case 196 /* SwitchStatement */: - case 193 /* BreakStatement */: - case 192 /* ContinueStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - case 189 /* ForStatement */: - case 188 /* WhileStatement */: - case 195 /* WithStatement */: - case 184 /* EmptyStatement */: - case 199 /* TryStatement */: - case 197 /* LabeledStatement */: - case 187 /* DoStatement */: - case 200 /* DebuggerStatement */: - case 212 /* ImportDeclaration */: - case 211 /* ImportEqualsDeclaration */: - case 218 /* ExportDeclaration */: - case 217 /* ExportAssignment */: - case 208 /* ModuleDeclaration */: - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - case 207 /* EnumDeclaration */: - case 206 /* TypeAliasDeclaration */: - return true; - } - } - return false; - } - function isReusableEnumMember(node) { - return node.kind === 229 /* EnumMember */; - } - function isReusableTypeMember(node) { - if (node) { - switch (node.kind) { - case 141 /* ConstructSignature */: - case 135 /* MethodSignature */: - case 142 /* IndexSignature */: - case 133 /* PropertySignature */: - case 140 /* CallSignature */: - return true; - } - } - return false; - } - function isReusableVariableDeclaration(node) { - if (node.kind !== 201 /* VariableDeclaration */) { - return false; - } - // Very subtle incremental parsing bug. Consider the following code: - // - // let v = new List < A, B - // - // This is actually legal code. It's a list of variable declarators "v = new List() - // - // then we have a problem. "v = new List= 0) { - // Always preserve a trailing comma by marking it on the NodeArray - result.hasTrailingComma = true; - } - result.end = getNodeEnd(); - parsingContext = saveParsingContext; - return result; - } - function createMissingList() { - var pos = getNodePos(); - var result = []; - result.pos = pos; - result.end = pos; - return result; - } - function parseBracketedList(kind, parseElement, open, close) { - if (parseExpected(open)) { - var result = parseDelimitedList(kind, parseElement); - parseExpected(close); - return result; - } - return createMissingList(); - } - // The allowReservedWords parameter controls whether reserved words are permitted after the first dot - function parseEntityName(allowReservedWords, diagnosticMessage) { - var entity = parseIdentifier(diagnosticMessage); - while (parseOptional(20 /* DotToken */)) { - var node = createNode(128 /* QualifiedName */, entity.pos); - node.left = entity; - node.right = parseRightSideOfDot(allowReservedWords); - entity = finishNode(node); - } - return entity; - } - function parseRightSideOfDot(allowIdentifierNames) { - // Technically a keyword is valid here as all identifiers and keywords are identifier names. - // However, often we'll encounter this in error situations when the identifier or keyword - // is actually starting another valid construct. - // - // So, we check for the following specific case: - // - // name. - // identifierOrKeyword identifierNameOrKeyword - // - // Note: the newlines are important here. For example, if that above code - // were rewritten into: - // - // name.identifierOrKeyword - // identifierNameOrKeyword - // - // Then we would consider it valid. That's because ASI would take effect and - // the code would be implicitly: "name.identifierOrKeyword; identifierNameOrKeyword". - // In the first case though, ASI will not take effect because there is not a - // line terminator after the identifier or keyword. - if (scanner.hasPrecedingLineBreak() && isIdentifierOrKeyword()) { - var matchesPattern = lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); - if (matchesPattern) { - // Report that we need an identifier. However, report it right after the dot, - // and not on the next token. This is because the next token might actually - // be an identifier and the error would be quite confusing. - return createMissingNode(65 /* Identifier */, true, ts.Diagnostics.Identifier_expected); - } - } - return allowIdentifierNames ? parseIdentifierName() : parseIdentifier(); - } - function parseTemplateExpression() { - var template = createNode(174 /* TemplateExpression */); - template.head = parseLiteralNode(); - ts.Debug.assert(template.head.kind === 11 /* TemplateHead */, "Template head has wrong token kind"); - var templateSpans = []; - templateSpans.pos = getNodePos(); - do { - templateSpans.push(parseTemplateSpan()); - } while (ts.lastOrUndefined(templateSpans).literal.kind === 12 /* TemplateMiddle */); - templateSpans.end = getNodeEnd(); - template.templateSpans = templateSpans; - return finishNode(template); - } - function parseTemplateSpan() { - var span = createNode(180 /* TemplateSpan */); - span.expression = allowInAnd(parseExpression); - var literal; - if (token === 15 /* CloseBraceToken */) { - reScanTemplateToken(); - literal = parseLiteralNode(); - } - else { - literal = parseExpectedToken(13 /* TemplateTail */, false, ts.Diagnostics._0_expected, ts.tokenToString(15 /* CloseBraceToken */)); - } - span.literal = literal; - return finishNode(span); - } - function parseLiteralNode(internName) { - var node = createNode(token); - var text = scanner.getTokenValue(); - node.text = internName ? internIdentifier(text) : text; - if (scanner.hasExtendedUnicodeEscape()) { - node.hasExtendedUnicodeEscape = true; - } - if (scanner.isUnterminated()) { - node.isUnterminated = true; - } - var tokenPos = scanner.getTokenPos(); - nextToken(); - finishNode(node); - // Octal literals are not allowed in strict mode or ES5 - // Note that theoretically the following condition would hold true literals like 009, - // which is not octal.But because of how the scanner separates the tokens, we would - // never get a token like this. Instead, we would get 00 and 9 as two separate tokens. - // We also do not need to check for negatives because any prefix operator would be part of a - // parent unary expression. - if (node.kind === 7 /* NumericLiteral */ - && sourceText.charCodeAt(tokenPos) === 48 /* _0 */ - && ts.isOctalDigit(sourceText.charCodeAt(tokenPos + 1))) { - node.flags |= 16384 /* OctalLiteral */; - } - return node; - } - // TYPES - function parseTypeReferenceOrTypePredicate() { - var typeName = parseEntityName(false, ts.Diagnostics.Type_expected); - if (typeName.kind === 65 /* Identifier */ && token === 117 /* IsKeyword */ && !scanner.hasPrecedingLineBreak()) { - nextToken(); - var node_1 = createNode(143 /* TypePredicate */, typeName.pos); - node_1.parameterName = typeName; - node_1.type = parseType(); - return finishNode(node_1); - } - var node = createNode(144 /* TypeReference */, typeName.pos); - node.typeName = typeName; - if (!scanner.hasPrecedingLineBreak() && token === 24 /* LessThanToken */) { - node.typeArguments = parseBracketedList(16 /* TypeArguments */, parseType, 24 /* LessThanToken */, 25 /* GreaterThanToken */); - } - return finishNode(node); - } - function parseTypeQuery() { - var node = createNode(147 /* TypeQuery */); - parseExpected(97 /* TypeOfKeyword */); - node.exprName = parseEntityName(true); - return finishNode(node); - } - function parseTypeParameter() { - var node = createNode(130 /* TypeParameter */); - node.name = parseIdentifier(); - if (parseOptional(79 /* ExtendsKeyword */)) { - // It's not uncommon for people to write improper constraints to a generic. If the - // user writes a constraint that is an expression and not an actual type, then parse - // it out as an expression (so we can recover well), but report that a type is needed - // instead. - if (isStartOfType() || !isStartOfExpression()) { - node.constraint = parseType(); - } - else { - // It was not a type, and it looked like an expression. Parse out an expression - // here so we recover well. Note: it is important that we call parseUnaryExpression - // and not parseExpression here. If the user has: - // - // - // - // We do *not* want to consume the > as we're consuming the expression for "". - node.expression = parseUnaryExpressionOrHigher(); - } - } - return finishNode(node); - } - function parseTypeParameters() { - if (token === 24 /* LessThanToken */) { - return parseBracketedList(15 /* TypeParameters */, parseTypeParameter, 24 /* LessThanToken */, 25 /* GreaterThanToken */); - } - } - function parseParameterType() { - if (parseOptional(51 /* ColonToken */)) { - return token === 8 /* StringLiteral */ - ? parseLiteralNode(true) - : parseType(); - } - return undefined; - } - function isStartOfParameter() { - return token === 21 /* DotDotDotToken */ || isIdentifierOrPattern() || ts.isModifier(token) || token === 52 /* AtToken */; - } - function setModifiers(node, modifiers) { - if (modifiers) { - node.flags |= modifiers.flags; - node.modifiers = modifiers; - } - } - function parseParameter() { - var node = createNode(131 /* Parameter */); - node.decorators = parseDecorators(); - setModifiers(node, parseModifiers()); - node.dotDotDotToken = parseOptionalToken(21 /* DotDotDotToken */); - // SingleNameBinding[Yield,GeneratorParameter] : See 13.2.3 - // [+GeneratorParameter]BindingIdentifier[Yield]Initializer[In]opt - // [~GeneratorParameter]BindingIdentifier[?Yield]Initializer[In, ?Yield]opt - node.name = inGeneratorParameterContext() ? doInYieldContext(parseIdentifierOrPattern) : parseIdentifierOrPattern(); - if (ts.getFullWidth(node.name) === 0 && node.flags === 0 && ts.isModifier(token)) { - // in cases like - // 'use strict' - // function foo(static) - // isParameter('static') === true, because of isModifier('static') - // however 'static' is not a legal identifier in a strict mode. - // so result of this function will be ParameterDeclaration (flags = 0, name = missing, type = undefined, initializer = undefined) - // and current token will not change => parsing of the enclosing parameter list will last till the end of time (or OOM) - // to avoid this we'll advance cursor to the next token. - nextToken(); - } - node.questionToken = parseOptionalToken(50 /* QuestionToken */); - node.type = parseParameterType(); - node.initializer = inGeneratorParameterContext() ? doOutsideOfYieldContext(parseParameterInitializer) : parseParameterInitializer(); - // Do not check for initializers in an ambient context for parameters. This is not - // a grammar error because the grammar allows arbitrary call signatures in - // an ambient context. - // It is actually not necessary for this to be an error at all. The reason is that - // function/constructor implementations are syntactically disallowed in ambient - // contexts. In addition, parameter initializers are semantically disallowed in - // overload signatures. So parameter initializers are transitively disallowed in - // ambient contexts. - return finishNode(node); - } - function parseParameterInitializer() { - return parseInitializer(true); - } - function fillSignature(returnToken, yieldAndGeneratorParameterContext, requireCompleteParameterList, signature) { - var returnTokenRequired = returnToken === 32 /* EqualsGreaterThanToken */; - signature.typeParameters = parseTypeParameters(); - signature.parameters = parseParameterList(yieldAndGeneratorParameterContext, requireCompleteParameterList); - if (returnTokenRequired) { - parseExpected(returnToken); - signature.type = parseType(); - } - else if (parseOptional(returnToken)) { - signature.type = parseType(); - } - } - // Note: after careful analysis of the grammar, it does not appear to be possible to - // have 'Yield' And 'GeneratorParameter' not in sync. i.e. any production calling - // this FormalParameters production either always sets both to true, or always sets - // both to false. As such we only have a single parameter to represent both. - function parseParameterList(yieldAndGeneratorParameterContext, requireCompleteParameterList) { - // FormalParameters[Yield,GeneratorParameter] : - // ... - // - // FormalParameter[Yield,GeneratorParameter] : - // BindingElement[?Yield, ?GeneratorParameter] - // - // BindingElement[Yield, GeneratorParameter ] : See 13.2.3 - // SingleNameBinding[?Yield, ?GeneratorParameter] - // [+GeneratorParameter]BindingPattern[?Yield, GeneratorParameter]Initializer[In]opt - // [~GeneratorParameter]BindingPattern[?Yield]Initializer[In, ?Yield]opt - // - // SingleNameBinding[Yield, GeneratorParameter] : See 13.2.3 - // [+GeneratorParameter]BindingIdentifier[Yield]Initializer[In]opt - // [~GeneratorParameter]BindingIdentifier[?Yield]Initializer[In, ?Yield]opt - if (parseExpected(16 /* OpenParenToken */)) { - var savedYieldContext = inYieldContext(); - var savedGeneratorParameterContext = inGeneratorParameterContext(); - setYieldContext(yieldAndGeneratorParameterContext); - setGeneratorParameterContext(yieldAndGeneratorParameterContext); - var result = parseDelimitedList(14 /* Parameters */, parseParameter); - setYieldContext(savedYieldContext); - setGeneratorParameterContext(savedGeneratorParameterContext); - if (!parseExpected(17 /* CloseParenToken */) && requireCompleteParameterList) { - // Caller insisted that we had to end with a ) We didn't. So just return - // undefined here. - return undefined; - } - return result; - } - // We didn't even have an open paren. If the caller requires a complete parameter list, - // we definitely can't provide that. However, if they're ok with an incomplete one, - // then just return an empty set of parameters. - return requireCompleteParameterList ? undefined : createMissingList(); - } - function parseTypeMemberSemicolon() { - // We allow type members to be separated by commas or (possibly ASI) semicolons. - // First check if it was a comma. If so, we're done with the member. - if (parseOptional(23 /* CommaToken */)) { - return; - } - // Didn't have a comma. We must have a (possible ASI) semicolon. - parseSemicolon(); - } - function parseSignatureMember(kind) { - var node = createNode(kind); - if (kind === 141 /* ConstructSignature */) { - parseExpected(88 /* NewKeyword */); - } - fillSignature(51 /* ColonToken */, false, false, node); - parseTypeMemberSemicolon(); - return finishNode(node); - } - function isIndexSignature() { - if (token !== 18 /* OpenBracketToken */) { - return false; - } - return lookAhead(isUnambiguouslyIndexSignature); - } - function isUnambiguouslyIndexSignature() { - // The only allowed sequence is: - // - // [id: - // - // However, for error recovery, we also check the following cases: - // - // [... - // [id, - // [id?, - // [id?: - // [id?] - // [public id - // [private id - // [protected id - // [] - // - nextToken(); - if (token === 21 /* DotDotDotToken */ || token === 19 /* CloseBracketToken */) { - return true; - } - if (ts.isModifier(token)) { - nextToken(); - if (isIdentifier()) { - return true; - } - } - else if (!isIdentifier()) { - return false; - } - else { - // Skip the identifier - nextToken(); - } - // A colon signifies a well formed indexer - // A comma should be a badly formed indexer because comma expressions are not allowed - // in computed properties. - if (token === 51 /* ColonToken */ || token === 23 /* CommaToken */) { - return true; - } - // Question mark could be an indexer with an optional property, - // or it could be a conditional expression in a computed property. - if (token !== 50 /* QuestionToken */) { - return false; - } - // If any of the following tokens are after the question mark, it cannot - // be a conditional expression, so treat it as an indexer. - nextToken(); - return token === 51 /* ColonToken */ || token === 23 /* CommaToken */ || token === 19 /* CloseBracketToken */; - } - function parseIndexSignatureDeclaration(fullStart, decorators, modifiers) { - var node = createNode(142 /* IndexSignature */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - node.parameters = parseBracketedList(14 /* Parameters */, parseParameter, 18 /* OpenBracketToken */, 19 /* CloseBracketToken */); - node.type = parseTypeAnnotation(); - parseTypeMemberSemicolon(); - return finishNode(node); - } - function parsePropertyOrMethodSignature() { - var fullStart = scanner.getStartPos(); - var name = parsePropertyName(); - var questionToken = parseOptionalToken(50 /* QuestionToken */); - if (token === 16 /* OpenParenToken */ || token === 24 /* LessThanToken */) { - var method = createNode(135 /* MethodSignature */, fullStart); - method.name = name; - method.questionToken = questionToken; - // Method signatues don't exist in expression contexts. So they have neither - // [Yield] nor [GeneratorParameter] - fillSignature(51 /* ColonToken */, false, false, method); - parseTypeMemberSemicolon(); - return finishNode(method); - } - else { - var property = createNode(133 /* PropertySignature */, fullStart); - property.name = name; - property.questionToken = questionToken; - property.type = parseTypeAnnotation(); - parseTypeMemberSemicolon(); - return finishNode(property); - } - } - function isStartOfTypeMember() { - switch (token) { - case 16 /* OpenParenToken */: - case 24 /* LessThanToken */: - case 18 /* OpenBracketToken */: - return true; - default: - if (ts.isModifier(token)) { - var result = lookAhead(isStartOfIndexSignatureDeclaration); - if (result) { - return result; - } - } - return isLiteralPropertyName() && lookAhead(isTypeMemberWithLiteralPropertyName); - } - } - function isStartOfIndexSignatureDeclaration() { - while (ts.isModifier(token)) { - nextToken(); - } - return isIndexSignature(); - } - function isTypeMemberWithLiteralPropertyName() { - nextToken(); - return token === 16 /* OpenParenToken */ || - token === 24 /* LessThanToken */ || - token === 50 /* QuestionToken */ || - token === 51 /* ColonToken */ || - canParseSemicolon(); - } - function parseTypeMember() { - switch (token) { - case 16 /* OpenParenToken */: - case 24 /* LessThanToken */: - return parseSignatureMember(140 /* CallSignature */); - case 18 /* OpenBracketToken */: - // Indexer or computed property - return isIndexSignature() - ? parseIndexSignatureDeclaration(scanner.getStartPos(), undefined, undefined) - : parsePropertyOrMethodSignature(); - case 88 /* NewKeyword */: - if (lookAhead(isStartOfConstructSignature)) { - return parseSignatureMember(141 /* ConstructSignature */); - } - // fall through. - case 8 /* StringLiteral */: - case 7 /* NumericLiteral */: - return parsePropertyOrMethodSignature(); - default: - // Index declaration as allowed as a type member. But as per the grammar, - // they also allow modifiers. So we have to check for an index declaration - // that might be following modifiers. This ensures that things work properly - // when incrementally parsing as the parser will produce the Index declaration - // if it has the same text regardless of whether it is inside a class or an - // object type. - if (ts.isModifier(token)) { - var result = tryParse(parseIndexSignatureWithModifiers); - if (result) { - return result; - } - } - if (isIdentifierOrKeyword()) { - return parsePropertyOrMethodSignature(); - } - } - } - function parseIndexSignatureWithModifiers() { - var fullStart = scanner.getStartPos(); - var decorators = parseDecorators(); - var modifiers = parseModifiers(); - return isIndexSignature() - ? parseIndexSignatureDeclaration(fullStart, decorators, modifiers) - : undefined; - } - function isStartOfConstructSignature() { - nextToken(); - return token === 16 /* OpenParenToken */ || token === 24 /* LessThanToken */; - } - function parseTypeLiteral() { - var node = createNode(148 /* TypeLiteral */); - node.members = parseObjectTypeMembers(); - return finishNode(node); - } - function parseObjectTypeMembers() { - var members; - if (parseExpected(14 /* OpenBraceToken */)) { - members = parseList(4 /* TypeMembers */, false, parseTypeMember); - parseExpected(15 /* CloseBraceToken */); - } - else { - members = createMissingList(); - } - return members; - } - function parseTupleType() { - var node = createNode(150 /* TupleType */); - node.elementTypes = parseBracketedList(17 /* TupleElementTypes */, parseType, 18 /* OpenBracketToken */, 19 /* CloseBracketToken */); - return finishNode(node); - } - function parseParenthesizedType() { - var node = createNode(152 /* ParenthesizedType */); - parseExpected(16 /* OpenParenToken */); - node.type = parseType(); - parseExpected(17 /* CloseParenToken */); - return finishNode(node); - } - function parseFunctionOrConstructorType(kind) { - var node = createNode(kind); - if (kind === 146 /* ConstructorType */) { - parseExpected(88 /* NewKeyword */); - } - fillSignature(32 /* EqualsGreaterThanToken */, false, false, node); - return finishNode(node); - } - function parseKeywordAndNoDot() { - var node = parseTokenNode(); - return token === 20 /* DotToken */ ? undefined : node; - } - function parseNonArrayType() { - switch (token) { - case 112 /* AnyKeyword */: - case 123 /* StringKeyword */: - case 121 /* NumberKeyword */: - case 113 /* BooleanKeyword */: - case 124 /* SymbolKeyword */: - // If these are followed by a dot, then parse these out as a dotted type reference instead. - var node = tryParse(parseKeywordAndNoDot); - return node || parseTypeReferenceOrTypePredicate(); - case 99 /* VoidKeyword */: - return parseTokenNode(); - case 97 /* TypeOfKeyword */: - return parseTypeQuery(); - case 14 /* OpenBraceToken */: - return parseTypeLiteral(); - case 18 /* OpenBracketToken */: - return parseTupleType(); - case 16 /* OpenParenToken */: - return parseParenthesizedType(); - default: - return parseTypeReferenceOrTypePredicate(); - } - } - function isStartOfType() { - switch (token) { - case 112 /* AnyKeyword */: - case 123 /* StringKeyword */: - case 121 /* NumberKeyword */: - case 113 /* BooleanKeyword */: - case 124 /* SymbolKeyword */: - case 99 /* VoidKeyword */: - case 97 /* TypeOfKeyword */: - case 14 /* OpenBraceToken */: - case 18 /* OpenBracketToken */: - case 24 /* LessThanToken */: - case 88 /* NewKeyword */: - return true; - case 16 /* OpenParenToken */: - // Only consider '(' the start of a type if followed by ')', '...', an identifier, a modifier, - // or something that starts a type. We don't want to consider things like '(1)' a type. - return lookAhead(isStartOfParenthesizedOrFunctionType); - default: - return isIdentifier(); - } - } - function isStartOfParenthesizedOrFunctionType() { - nextToken(); - return token === 17 /* CloseParenToken */ || isStartOfParameter() || isStartOfType(); - } - function parseArrayTypeOrHigher() { - var type = parseNonArrayType(); - while (!scanner.hasPrecedingLineBreak() && parseOptional(18 /* OpenBracketToken */)) { - parseExpected(19 /* CloseBracketToken */); - var node = createNode(149 /* ArrayType */, type.pos); - node.elementType = type; - type = finishNode(node); - } - return type; - } - function parseUnionTypeOrHigher() { - var type = parseArrayTypeOrHigher(); - if (token === 44 /* BarToken */) { - var types = [type]; - types.pos = type.pos; - while (parseOptional(44 /* BarToken */)) { - types.push(parseArrayTypeOrHigher()); - } - types.end = getNodeEnd(); - var node = createNode(151 /* UnionType */, type.pos); - node.types = types; - type = finishNode(node); - } - return type; - } - function isStartOfFunctionType() { - if (token === 24 /* LessThanToken */) { - return true; - } - return token === 16 /* OpenParenToken */ && lookAhead(isUnambiguouslyStartOfFunctionType); - } - function isUnambiguouslyStartOfFunctionType() { - nextToken(); - if (token === 17 /* CloseParenToken */ || token === 21 /* DotDotDotToken */) { - // ( ) - // ( ... - return true; - } - if (isIdentifier() || ts.isModifier(token)) { - nextToken(); - if (token === 51 /* ColonToken */ || token === 23 /* CommaToken */ || - token === 50 /* QuestionToken */ || token === 53 /* EqualsToken */ || - isIdentifier() || ts.isModifier(token)) { - // ( id : - // ( id , - // ( id ? - // ( id = - // ( modifier id - return true; - } - if (token === 17 /* CloseParenToken */) { - nextToken(); - if (token === 32 /* EqualsGreaterThanToken */) { - // ( id ) => - return true; - } - } - } - return false; - } - function parseType() { - // The rules about 'yield' only apply to actual code/expression contexts. They don't - // apply to 'type' contexts. So we disable these parameters here before moving on. - var savedYieldContext = inYieldContext(); - var savedGeneratorParameterContext = inGeneratorParameterContext(); - setYieldContext(false); - setGeneratorParameterContext(false); - var result = parseTypeWorker(); - setYieldContext(savedYieldContext); - setGeneratorParameterContext(savedGeneratorParameterContext); - return result; - } - function parseTypeWorker() { - if (isStartOfFunctionType()) { - return parseFunctionOrConstructorType(145 /* FunctionType */); - } - if (token === 88 /* NewKeyword */) { - return parseFunctionOrConstructorType(146 /* ConstructorType */); - } - return parseUnionTypeOrHigher(); - } - function parseTypeAnnotation() { - return parseOptional(51 /* ColonToken */) ? parseType() : undefined; - } - // EXPRESSIONS - function isStartOfLeftHandSideExpression() { - switch (token) { - case 93 /* ThisKeyword */: - case 91 /* SuperKeyword */: - case 89 /* NullKeyword */: - case 95 /* TrueKeyword */: - case 80 /* FalseKeyword */: - case 7 /* NumericLiteral */: - case 8 /* StringLiteral */: - case 10 /* NoSubstitutionTemplateLiteral */: - case 11 /* TemplateHead */: - case 16 /* OpenParenToken */: - case 18 /* OpenBracketToken */: - case 14 /* OpenBraceToken */: - case 83 /* FunctionKeyword */: - case 69 /* ClassKeyword */: - case 88 /* NewKeyword */: - case 36 /* SlashToken */: - case 57 /* SlashEqualsToken */: - case 65 /* Identifier */: - return true; - default: - return isIdentifier(); - } - } - function isStartOfExpression() { - if (isStartOfLeftHandSideExpression()) { - return true; - } - switch (token) { - case 33 /* PlusToken */: - case 34 /* MinusToken */: - case 47 /* TildeToken */: - case 46 /* ExclamationToken */: - case 74 /* DeleteKeyword */: - case 97 /* TypeOfKeyword */: - case 99 /* VoidKeyword */: - case 38 /* PlusPlusToken */: - case 39 /* MinusMinusToken */: - case 24 /* LessThanToken */: - case 110 /* YieldKeyword */: - // Yield always starts an expression. Either it is an identifier (in which case - // it is definitely an expression). Or it's a keyword (either because we're in - // a generator, or in strict mode (or both)) and it started a yield expression. - return true; - default: - // Error tolerance. If we see the start of some binary operator, we consider - // that the start of an expression. That way we'll parse out a missing identifier, - // give a good message about an identifier being missing, and then consume the - // rest of the binary expression. - if (isBinaryOperator()) { - return true; - } - return isIdentifier(); - } - } - function isStartOfExpressionStatement() { - // As per the grammar, none of '{' or 'function' or 'class' can start an expression statement. - return token !== 14 /* OpenBraceToken */ && - token !== 83 /* FunctionKeyword */ && - token !== 69 /* ClassKeyword */ && - token !== 52 /* AtToken */ && - isStartOfExpression(); - } - function parseExpression() { - // Expression[in]: - // AssignmentExpression[in] - // Expression[in] , AssignmentExpression[in] - // clear the decorator context when parsing Expression, as it should be unambiguous when parsing a decorator - var saveDecoratorContext = inDecoratorContext(); - if (saveDecoratorContext) { - setDecoratorContext(false); - } - var expr = parseAssignmentExpressionOrHigher(); - var operatorToken; - while ((operatorToken = parseOptionalToken(23 /* CommaToken */))) { - expr = makeBinaryExpression(expr, operatorToken, parseAssignmentExpressionOrHigher()); - } - if (saveDecoratorContext) { - setDecoratorContext(true); - } - return expr; - } - function parseInitializer(inParameter) { - if (token !== 53 /* EqualsToken */) { - // It's not uncommon during typing for the user to miss writing the '=' token. Check if - // there is no newline after the last token and if we're on an expression. If so, parse - // this as an equals-value clause with a missing equals. - // NOTE: There are two places where we allow equals-value clauses. The first is in a - // variable declarator. The second is with a parameter. For variable declarators - // it's more likely that a { would be a allowed (as an object literal). While this - // is also allowed for parameters, the risk is that we consume the { as an object - // literal when it really will be for the block following the parameter. - if (scanner.hasPrecedingLineBreak() || (inParameter && token === 14 /* OpenBraceToken */) || !isStartOfExpression()) { - // preceding line break, open brace in a parameter (likely a function body) or current token is not an expression - - // do not try to parse initializer - return undefined; - } - } - // Initializer[In, Yield] : - // = AssignmentExpression[?In, ?Yield] - parseExpected(53 /* EqualsToken */); - return parseAssignmentExpressionOrHigher(); - } - function parseAssignmentExpressionOrHigher() { - // AssignmentExpression[in,yield]: - // 1) ConditionalExpression[?in,?yield] - // 2) LeftHandSideExpression = AssignmentExpression[?in,?yield] - // 3) LeftHandSideExpression AssignmentOperator AssignmentExpression[?in,?yield] - // 4) ArrowFunctionExpression[?in,?yield] - // 5) [+Yield] YieldExpression[?In] - // - // Note: for ease of implementation we treat productions '2' and '3' as the same thing. - // (i.e. they're both BinaryExpressions with an assignment operator in it). - // First, do the simple check if we have a YieldExpression (production '5'). - if (isYieldExpression()) { - return parseYieldExpression(); - } - // Then, check if we have an arrow function (production '4') that starts with a parenthesized - // parameter list. If we do, we must *not* recurse for productions 1, 2 or 3. An ArrowFunction is - // not a LeftHandSideExpression, nor does it start a ConditionalExpression. So we are done - // with AssignmentExpression if we see one. - var arrowExpression = tryParseParenthesizedArrowFunctionExpression(); - if (arrowExpression) { - return arrowExpression; - } - // Now try to see if we're in production '1', '2' or '3'. A conditional expression can - // start with a LogicalOrExpression, while the assignment productions can only start with - // LeftHandSideExpressions. - // - // So, first, we try to just parse out a BinaryExpression. If we get something that is a - // LeftHandSide or higher, then we can try to parse out the assignment expression part. - // Otherwise, we try to parse out the conditional expression bit. We want to allow any - // binary expression here, so we pass in the 'lowest' precedence here so that it matches - // and consumes anything. - var expr = parseBinaryExpressionOrHigher(0); - // To avoid a look-ahead, we did not handle the case of an arrow function with a single un-parenthesized - // parameter ('x => ...') above. We handle it here by checking if the parsed expression was a single - // identifier and the current token is an arrow. - if (expr.kind === 65 /* Identifier */ && token === 32 /* EqualsGreaterThanToken */) { - return parseSimpleArrowFunctionExpression(expr); - } - // Now see if we might be in cases '2' or '3'. - // If the expression was a LHS expression, and we have an assignment operator, then - // we're in '2' or '3'. Consume the assignment and return. - // - // Note: we call reScanGreaterToken so that we get an appropriately merged token - // for cases like > > = becoming >>= - if (ts.isLeftHandSideExpression(expr) && ts.isAssignmentOperator(reScanGreaterToken())) { - return makeBinaryExpression(expr, parseTokenNode(), parseAssignmentExpressionOrHigher()); - } - // It wasn't an assignment or a lambda. This is a conditional expression: - return parseConditionalExpressionRest(expr); - } - function isYieldExpression() { - if (token === 110 /* YieldKeyword */) { - // If we have a 'yield' keyword, and htis is a context where yield expressions are - // allowed, then definitely parse out a yield expression. - if (inYieldContext()) { - return true; - } - if (inStrictModeContext()) { - // If we're in strict mode, then 'yield' is a keyword, could only ever start - // a yield expression. - return true; - } - // We're in a context where 'yield expr' is not allowed. However, if we can - // definitely tell that the user was trying to parse a 'yield expr' and not - // just a normal expr that start with a 'yield' identifier, then parse out - // a 'yield expr'. We can then report an error later that they are only - // allowed in generator expressions. - // - // for example, if we see 'yield(foo)', then we'll have to treat that as an - // invocation expression of something called 'yield'. However, if we have - // 'yield foo' then that is not legal as a normal expression, so we can - // definitely recognize this as a yield expression. - // - // for now we just check if the next token is an identifier. More heuristics - // can be added here later as necessary. We just need to make sure that we - // don't accidently consume something legal. - return lookAhead(nextTokenIsIdentifierOnSameLine); - } - return false; - } - function nextTokenIsIdentifierOnSameLine() { - nextToken(); - return !scanner.hasPrecedingLineBreak() && isIdentifier(); - } - function parseYieldExpression() { - var node = createNode(175 /* YieldExpression */); - // YieldExpression[In] : - // yield - // yield [no LineTerminator here] [Lexical goal InputElementRegExp]AssignmentExpression[?In, Yield] - // yield [no LineTerminator here] * [Lexical goal InputElementRegExp]AssignmentExpression[?In, Yield] - nextToken(); - if (!scanner.hasPrecedingLineBreak() && - (token === 35 /* AsteriskToken */ || isStartOfExpression())) { - node.asteriskToken = parseOptionalToken(35 /* AsteriskToken */); - node.expression = parseAssignmentExpressionOrHigher(); - return finishNode(node); - } - else { - // if the next token is not on the same line as yield. or we don't have an '*' or - // the start of an expressin, then this is just a simple "yield" expression. - return finishNode(node); - } - } - function parseSimpleArrowFunctionExpression(identifier) { - ts.Debug.assert(token === 32 /* EqualsGreaterThanToken */, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); - var node = createNode(166 /* ArrowFunction */, identifier.pos); - var parameter = createNode(131 /* Parameter */, identifier.pos); - parameter.name = identifier; - finishNode(parameter); - node.parameters = [parameter]; - node.parameters.pos = parameter.pos; - node.parameters.end = parameter.end; - node.equalsGreaterThanToken = parseExpectedToken(32 /* EqualsGreaterThanToken */, false, ts.Diagnostics._0_expected, "=>"); - node.body = parseArrowFunctionExpressionBody(); - return finishNode(node); - } - function tryParseParenthesizedArrowFunctionExpression() { - var triState = isParenthesizedArrowFunctionExpression(); - if (triState === 0 /* False */) { - // It's definitely not a parenthesized arrow function expression. - return undefined; - } - // If we definitely have an arrow function, then we can just parse one, not requiring a - // following => or { token. Otherwise, we *might* have an arrow function. Try to parse - // it out, but don't allow any ambiguity, and return 'undefined' if this could be an - // expression instead. - var arrowFunction = triState === 1 /* True */ - ? parseParenthesizedArrowFunctionExpressionHead(true) - : tryParse(parsePossibleParenthesizedArrowFunctionExpressionHead); - if (!arrowFunction) { - // Didn't appear to actually be a parenthesized arrow function. Just bail out. - return undefined; - } - // If we have an arrow, then try to parse the body. Even if not, try to parse if we - // have an opening brace, just in case we're in an error state. - var lastToken = token; - arrowFunction.equalsGreaterThanToken = parseExpectedToken(32 /* EqualsGreaterThanToken */, false, ts.Diagnostics._0_expected, "=>"); - arrowFunction.body = (lastToken === 32 /* EqualsGreaterThanToken */ || lastToken === 14 /* OpenBraceToken */) - ? parseArrowFunctionExpressionBody() - : parseIdentifier(); - return finishNode(arrowFunction); - } - // True -> We definitely expect a parenthesized arrow function here. - // False -> There *cannot* be a parenthesized arrow function here. - // Unknown -> There *might* be a parenthesized arrow function here. - // Speculatively look ahead to be sure, and rollback if not. - function isParenthesizedArrowFunctionExpression() { - if (token === 16 /* OpenParenToken */ || token === 24 /* LessThanToken */) { - return lookAhead(isParenthesizedArrowFunctionExpressionWorker); - } - if (token === 32 /* EqualsGreaterThanToken */) { - // ERROR RECOVERY TWEAK: - // If we see a standalone => try to parse it as an arrow function expression as that's - // likely what the user intended to write. - return 1 /* True */; - } - // Definitely not a parenthesized arrow function. - return 0 /* False */; - } - function isParenthesizedArrowFunctionExpressionWorker() { - var first = token; - var second = nextToken(); - if (first === 16 /* OpenParenToken */) { - if (second === 17 /* CloseParenToken */) { - // Simple cases: "() =>", "(): ", and "() {". - // This is an arrow function with no parameters. - // The last one is not actually an arrow function, - // but this is probably what the user intended. - var third = nextToken(); - switch (third) { - case 32 /* EqualsGreaterThanToken */: - case 51 /* ColonToken */: - case 14 /* OpenBraceToken */: - return 1 /* True */; - default: - return 0 /* False */; - } - } - // If encounter "([" or "({", this could be the start of a binding pattern. - // Examples: - // ([ x ]) => { } - // ({ x }) => { } - // ([ x ]) - // ({ x }) - if (second === 18 /* OpenBracketToken */ || second === 14 /* OpenBraceToken */) { - return 2 /* Unknown */; - } - // Simple case: "(..." - // This is an arrow function with a rest parameter. - if (second === 21 /* DotDotDotToken */) { - return 1 /* True */; - } - // If we had "(" followed by something that's not an identifier, - // then this definitely doesn't look like a lambda. - // Note: we could be a little more lenient and allow - // "(public" or "(private". These would not ever actually be allowed, - // but we could provide a good error message instead of bailing out. - if (!isIdentifier()) { - return 0 /* False */; - } - // If we have something like "(a:", then we must have a - // type-annotated parameter in an arrow function expression. - if (nextToken() === 51 /* ColonToken */) { - return 1 /* True */; - } - // This *could* be a parenthesized arrow function. - // Return Unknown to let the caller know. - return 2 /* Unknown */; - } - else { - ts.Debug.assert(first === 24 /* LessThanToken */); - // If we have "<" not followed by an identifier, - // then this definitely is not an arrow function. - if (!isIdentifier()) { - return 0 /* False */; - } - // This *could* be a parenthesized arrow function. - return 2 /* Unknown */; - } - } - function parsePossibleParenthesizedArrowFunctionExpressionHead() { - return parseParenthesizedArrowFunctionExpressionHead(false); - } - function parseParenthesizedArrowFunctionExpressionHead(allowAmbiguity) { - var node = createNode(166 /* ArrowFunction */); - // Arrow functions are never generators. - // - // If we're speculatively parsing a signature for a parenthesized arrow function, then - // we have to have a complete parameter list. Otherwise we might see something like - // a => (b => c) - // And think that "(b =>" was actually a parenthesized arrow function with a missing - // close paren. - fillSignature(51 /* ColonToken */, false, !allowAmbiguity, node); - // If we couldn't get parameters, we definitely could not parse out an arrow function. - if (!node.parameters) { - return undefined; - } - // Parsing a signature isn't enough. - // Parenthesized arrow signatures often look like other valid expressions. - // For instance: - // - "(x = 10)" is an assignment expression parsed as a signature with a default parameter value. - // - "(x,y)" is a comma expression parsed as a signature with two parameters. - // - "a ? (b): c" will have "(b):" parsed as a signature with a return type annotation. - // - // So we need just a bit of lookahead to ensure that it can only be a signature. - if (!allowAmbiguity && token !== 32 /* EqualsGreaterThanToken */ && token !== 14 /* OpenBraceToken */) { - // Returning undefined here will cause our caller to rewind to where we started from. - return undefined; - } - return node; - } - function parseArrowFunctionExpressionBody() { - if (token === 14 /* OpenBraceToken */) { - return parseFunctionBlock(false, false); - } - if (token !== 22 /* SemicolonToken */ && - token !== 83 /* FunctionKeyword */ && - token !== 69 /* ClassKeyword */ && - isStartOfStatement() && - !isStartOfExpressionStatement()) { - // Check if we got a plain statement (i.e. no expression-statements, no function/class expressions/declarations) - // - // Here we try to recover from a potential error situation in the case where the - // user meant to supply a block. For example, if the user wrote: - // - // a => - // let v = 0; - // } - // - // they may be missing an open brace. Check to see if that's the case so we can - // try to recover better. If we don't do this, then the next close curly we see may end - // up preemptively closing the containing construct. - // - // Note: even when 'ignoreMissingOpenBrace' is passed as true, parseBody will still error. - return parseFunctionBlock(false, true); - } - return parseAssignmentExpressionOrHigher(); - } - function parseConditionalExpressionRest(leftOperand) { - // Note: we are passed in an expression which was produced from parseBinaryExpressionOrHigher. - var questionToken = parseOptionalToken(50 /* QuestionToken */); - if (!questionToken) { - return leftOperand; - } - // Note: we explicitly 'allowIn' in the whenTrue part of the condition expression, and - // we do not that for the 'whenFalse' part. - var node = createNode(173 /* ConditionalExpression */, leftOperand.pos); - node.condition = leftOperand; - node.questionToken = questionToken; - node.whenTrue = doOutsideOfContext(disallowInAndDecoratorContext, parseAssignmentExpressionOrHigher); - node.colonToken = parseExpectedToken(51 /* ColonToken */, false, ts.Diagnostics._0_expected, ts.tokenToString(51 /* ColonToken */)); - node.whenFalse = parseAssignmentExpressionOrHigher(); - return finishNode(node); - } - function parseBinaryExpressionOrHigher(precedence) { - var leftOperand = parseUnaryExpressionOrHigher(); - return parseBinaryExpressionRest(precedence, leftOperand); - } - function isInOrOfKeyword(t) { - return t === 86 /* InKeyword */ || t === 127 /* OfKeyword */; - } - function parseBinaryExpressionRest(precedence, leftOperand) { - while (true) { - // We either have a binary operator here, or we're finished. We call - // reScanGreaterToken so that we merge token sequences like > and = into >= - reScanGreaterToken(); - var newPrecedence = getBinaryOperatorPrecedence(); - // Check the precedence to see if we should "take" this operator - if (newPrecedence <= precedence) { - break; - } - if (token === 86 /* InKeyword */ && inDisallowInContext()) { - break; - } - leftOperand = makeBinaryExpression(leftOperand, parseTokenNode(), parseBinaryExpressionOrHigher(newPrecedence)); - } - return leftOperand; - } - function isBinaryOperator() { - if (inDisallowInContext() && token === 86 /* InKeyword */) { - return false; - } - return getBinaryOperatorPrecedence() > 0; - } - function getBinaryOperatorPrecedence() { - switch (token) { - case 49 /* BarBarToken */: - return 1; - case 48 /* AmpersandAmpersandToken */: - return 2; - case 44 /* BarToken */: - return 3; - case 45 /* CaretToken */: - return 4; - case 43 /* AmpersandToken */: - return 5; - case 28 /* EqualsEqualsToken */: - case 29 /* ExclamationEqualsToken */: - case 30 /* EqualsEqualsEqualsToken */: - case 31 /* ExclamationEqualsEqualsToken */: - return 6; - case 24 /* LessThanToken */: - case 25 /* GreaterThanToken */: - case 26 /* LessThanEqualsToken */: - case 27 /* GreaterThanEqualsToken */: - case 87 /* InstanceOfKeyword */: - case 86 /* InKeyword */: - return 7; - case 40 /* LessThanLessThanToken */: - case 41 /* GreaterThanGreaterThanToken */: - case 42 /* GreaterThanGreaterThanGreaterThanToken */: - return 8; - case 33 /* PlusToken */: - case 34 /* MinusToken */: - return 9; - case 35 /* AsteriskToken */: - case 36 /* SlashToken */: - case 37 /* PercentToken */: - return 10; - } - // -1 is lower than all other precedences. Returning it will cause binary expression - // parsing to stop. - return -1; - } - function makeBinaryExpression(left, operatorToken, right) { - var node = createNode(172 /* BinaryExpression */, left.pos); - node.left = left; - node.operatorToken = operatorToken; - node.right = right; - return finishNode(node); - } - function parsePrefixUnaryExpression() { - var node = createNode(170 /* PrefixUnaryExpression */); - node.operator = token; - nextToken(); - node.operand = parseUnaryExpressionOrHigher(); - return finishNode(node); - } - function parseDeleteExpression() { - var node = createNode(167 /* DeleteExpression */); - nextToken(); - node.expression = parseUnaryExpressionOrHigher(); - return finishNode(node); - } - function parseTypeOfExpression() { - var node = createNode(168 /* TypeOfExpression */); - nextToken(); - node.expression = parseUnaryExpressionOrHigher(); - return finishNode(node); - } - function parseVoidExpression() { - var node = createNode(169 /* VoidExpression */); - nextToken(); - node.expression = parseUnaryExpressionOrHigher(); - return finishNode(node); - } - function parseUnaryExpressionOrHigher() { - switch (token) { - case 33 /* PlusToken */: - case 34 /* MinusToken */: - case 47 /* TildeToken */: - case 46 /* ExclamationToken */: - case 38 /* PlusPlusToken */: - case 39 /* MinusMinusToken */: - return parsePrefixUnaryExpression(); - case 74 /* DeleteKeyword */: - return parseDeleteExpression(); - case 97 /* TypeOfKeyword */: - return parseTypeOfExpression(); - case 99 /* VoidKeyword */: - return parseVoidExpression(); - case 24 /* LessThanToken */: - return parseTypeAssertion(); - default: - return parsePostfixExpressionOrHigher(); - } - } - function parsePostfixExpressionOrHigher() { - var expression = parseLeftHandSideExpressionOrHigher(); - ts.Debug.assert(ts.isLeftHandSideExpression(expression)); - if ((token === 38 /* PlusPlusToken */ || token === 39 /* MinusMinusToken */) && !scanner.hasPrecedingLineBreak()) { - var node = createNode(171 /* PostfixUnaryExpression */, expression.pos); - node.operand = expression; - node.operator = token; - nextToken(); - return finishNode(node); - } - return expression; - } - function parseLeftHandSideExpressionOrHigher() { - // Original Ecma: - // LeftHandSideExpression: See 11.2 - // NewExpression - // CallExpression - // - // Our simplification: - // - // LeftHandSideExpression: See 11.2 - // MemberExpression - // CallExpression - // - // See comment in parseMemberExpressionOrHigher on how we replaced NewExpression with - // MemberExpression to make our lives easier. - // - // to best understand the below code, it's important to see how CallExpression expands - // out into its own productions: - // - // CallExpression: - // MemberExpression Arguments - // CallExpression Arguments - // CallExpression[Expression] - // CallExpression.IdentifierName - // super ( ArgumentListopt ) - // super.IdentifierName - // - // Because of the recursion in these calls, we need to bottom out first. There are two - // bottom out states we can run into. Either we see 'super' which must start either of - // the last two CallExpression productions. Or we have a MemberExpression which either - // completes the LeftHandSideExpression, or starts the beginning of the first four - // CallExpression productions. - var expression = token === 91 /* SuperKeyword */ - ? parseSuperExpression() - : parseMemberExpressionOrHigher(); - // Now, we *may* be complete. However, we might have consumed the start of a - // CallExpression. As such, we need to consume the rest of it here to be complete. - return parseCallExpressionRest(expression); - } - function parseMemberExpressionOrHigher() { - // Note: to make our lives simpler, we decompose the the NewExpression productions and - // place ObjectCreationExpression and FunctionExpression into PrimaryExpression. - // like so: - // - // PrimaryExpression : See 11.1 - // this - // Identifier - // Literal - // ArrayLiteral - // ObjectLiteral - // (Expression) - // FunctionExpression - // new MemberExpression Arguments? - // - // MemberExpression : See 11.2 - // PrimaryExpression - // MemberExpression[Expression] - // MemberExpression.IdentifierName - // - // CallExpression : See 11.2 - // MemberExpression - // CallExpression Arguments - // CallExpression[Expression] - // CallExpression.IdentifierName - // - // Technically this is ambiguous. i.e. CallExpression defines: - // - // CallExpression: - // CallExpression Arguments - // - // If you see: "new Foo()" - // - // Then that could be treated as a single ObjectCreationExpression, or it could be - // treated as the invocation of "new Foo". We disambiguate that in code (to match - // the original grammar) by making sure that if we see an ObjectCreationExpression - // we always consume arguments if they are there. So we treat "new Foo()" as an - // object creation only, and not at all as an invocation) Another way to think - // about this is that for every "new" that we see, we will consume an argument list if - // it is there as part of the *associated* object creation node. Any additional - // argument lists we see, will become invocation expressions. - // - // Because there are no other places in the grammar now that refer to FunctionExpression - // or ObjectCreationExpression, it is safe to push down into the PrimaryExpression - // production. - // - // Because CallExpression and MemberExpression are left recursive, we need to bottom out - // of the recursion immediately. So we parse out a primary expression to start with. - var expression = parsePrimaryExpression(); - return parseMemberExpressionRest(expression); - } - function parseSuperExpression() { - var expression = parseTokenNode(); - if (token === 16 /* OpenParenToken */ || token === 20 /* DotToken */) { - return expression; - } - // If we have seen "super" it must be followed by '(' or '.'. - // If it wasn't then just try to parse out a '.' and report an error. - var node = createNode(158 /* PropertyAccessExpression */, expression.pos); - node.expression = expression; - node.dotToken = parseExpectedToken(20 /* DotToken */, false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); - node.name = parseRightSideOfDot(true); - return finishNode(node); - } - function parseTypeAssertion() { - var node = createNode(163 /* TypeAssertionExpression */); - parseExpected(24 /* LessThanToken */); - node.type = parseType(); - parseExpected(25 /* GreaterThanToken */); - node.expression = parseUnaryExpressionOrHigher(); - return finishNode(node); - } - function parseMemberExpressionRest(expression) { - while (true) { - var dotToken = parseOptionalToken(20 /* DotToken */); - if (dotToken) { - var propertyAccess = createNode(158 /* PropertyAccessExpression */, expression.pos); - propertyAccess.expression = expression; - propertyAccess.dotToken = dotToken; - propertyAccess.name = parseRightSideOfDot(true); - expression = finishNode(propertyAccess); - continue; - } - // when in the [Decorator] context, we do not parse ElementAccess as it could be part of a ComputedPropertyName - if (!inDecoratorContext() && parseOptional(18 /* OpenBracketToken */)) { - var indexedAccess = createNode(159 /* ElementAccessExpression */, expression.pos); - indexedAccess.expression = expression; - // It's not uncommon for a user to write: "new Type[]". - // Check for that common pattern and report a better error message. - if (token !== 19 /* CloseBracketToken */) { - indexedAccess.argumentExpression = allowInAnd(parseExpression); - if (indexedAccess.argumentExpression.kind === 8 /* StringLiteral */ || indexedAccess.argumentExpression.kind === 7 /* NumericLiteral */) { - var literal = indexedAccess.argumentExpression; - literal.text = internIdentifier(literal.text); - } - } - parseExpected(19 /* CloseBracketToken */); - expression = finishNode(indexedAccess); - continue; - } - if (token === 10 /* NoSubstitutionTemplateLiteral */ || token === 11 /* TemplateHead */) { - var tagExpression = createNode(162 /* TaggedTemplateExpression */, expression.pos); - tagExpression.tag = expression; - tagExpression.template = token === 10 /* NoSubstitutionTemplateLiteral */ - ? parseLiteralNode() - : parseTemplateExpression(); - expression = finishNode(tagExpression); - continue; - } - return expression; - } - } - function parseCallExpressionRest(expression) { - while (true) { - expression = parseMemberExpressionRest(expression); - if (token === 24 /* LessThanToken */) { - // See if this is the start of a generic invocation. If so, consume it and - // keep checking for postfix expressions. Otherwise, it's just a '<' that's - // part of an arithmetic expression. Break out so we consume it higher in the - // stack. - var typeArguments = tryParse(parseTypeArgumentsInExpression); - if (!typeArguments) { - return expression; - } - var callExpr = createNode(160 /* CallExpression */, expression.pos); - callExpr.expression = expression; - callExpr.typeArguments = typeArguments; - callExpr.arguments = parseArgumentList(); - expression = finishNode(callExpr); - continue; - } - else if (token === 16 /* OpenParenToken */) { - var callExpr = createNode(160 /* CallExpression */, expression.pos); - callExpr.expression = expression; - callExpr.arguments = parseArgumentList(); - expression = finishNode(callExpr); - continue; - } - return expression; - } - } - function parseArgumentList() { - parseExpected(16 /* OpenParenToken */); - var result = parseDelimitedList(11 /* ArgumentExpressions */, parseArgumentExpression); - parseExpected(17 /* CloseParenToken */); - return result; - } - function parseTypeArgumentsInExpression() { - if (!parseOptional(24 /* LessThanToken */)) { - return undefined; - } - var typeArguments = parseDelimitedList(16 /* TypeArguments */, parseType); - if (!parseExpected(25 /* GreaterThanToken */)) { - // If it doesn't have the closing > then it's definitely not an type argument list. - return undefined; - } - // If we have a '<', then only parse this as a arugment list if the type arguments - // are complete and we have an open paren. if we don't, rewind and return nothing. - return typeArguments && canFollowTypeArgumentsInExpression() - ? typeArguments - : undefined; - } - function canFollowTypeArgumentsInExpression() { - switch (token) { - case 16 /* OpenParenToken */: // foo( - // this case are the only case where this token can legally follow a type argument - // list. So we definitely want to treat this as a type arg list. - case 20 /* DotToken */: // foo. - case 17 /* CloseParenToken */: // foo) - case 19 /* CloseBracketToken */: // foo] - case 51 /* ColonToken */: // foo: - case 22 /* SemicolonToken */: // foo; - case 50 /* QuestionToken */: // foo? - case 28 /* EqualsEqualsToken */: // foo == - case 30 /* EqualsEqualsEqualsToken */: // foo === - case 29 /* ExclamationEqualsToken */: // foo != - case 31 /* ExclamationEqualsEqualsToken */: // foo !== - case 48 /* AmpersandAmpersandToken */: // foo && - case 49 /* BarBarToken */: // foo || - case 45 /* CaretToken */: // foo ^ - case 43 /* AmpersandToken */: // foo & - case 44 /* BarToken */: // foo | - case 15 /* CloseBraceToken */: // foo } - case 1 /* EndOfFileToken */: - // these cases can't legally follow a type arg list. However, they're not legal - // expressions either. The user is probably in the middle of a generic type. So - // treat it as such. - return true; - case 23 /* CommaToken */: // foo, - case 14 /* OpenBraceToken */: // foo { - // We don't want to treat these as type arguments. Otherwise we'll parse this - // as an invocation expression. Instead, we want to parse out the expression - // in isolation from the type arguments. - default: - // Anything else treat as an expression. - return false; - } - } - function parsePrimaryExpression() { - switch (token) { - case 7 /* NumericLiteral */: - case 8 /* StringLiteral */: - case 10 /* NoSubstitutionTemplateLiteral */: - return parseLiteralNode(); - case 93 /* ThisKeyword */: - case 91 /* SuperKeyword */: - case 89 /* NullKeyword */: - case 95 /* TrueKeyword */: - case 80 /* FalseKeyword */: - return parseTokenNode(); - case 16 /* OpenParenToken */: - return parseParenthesizedExpression(); - case 18 /* OpenBracketToken */: - return parseArrayLiteralExpression(); - case 14 /* OpenBraceToken */: - return parseObjectLiteralExpression(); - case 69 /* ClassKeyword */: - return parseClassExpression(); - case 83 /* FunctionKeyword */: - return parseFunctionExpression(); - case 88 /* NewKeyword */: - return parseNewExpression(); - case 36 /* SlashToken */: - case 57 /* SlashEqualsToken */: - if (reScanSlashToken() === 9 /* RegularExpressionLiteral */) { - return parseLiteralNode(); - } - break; - case 11 /* TemplateHead */: - return parseTemplateExpression(); - } - return parseIdentifier(ts.Diagnostics.Expression_expected); - } - function parseParenthesizedExpression() { - var node = createNode(164 /* ParenthesizedExpression */); - parseExpected(16 /* OpenParenToken */); - node.expression = allowInAnd(parseExpression); - parseExpected(17 /* CloseParenToken */); - return finishNode(node); - } - function parseSpreadElement() { - var node = createNode(176 /* SpreadElementExpression */); - parseExpected(21 /* DotDotDotToken */); - node.expression = parseAssignmentExpressionOrHigher(); - return finishNode(node); - } - function parseArgumentOrArrayLiteralElement() { - return token === 21 /* DotDotDotToken */ ? parseSpreadElement() : - token === 23 /* CommaToken */ ? createNode(178 /* OmittedExpression */) : - parseAssignmentExpressionOrHigher(); - } - function parseArgumentExpression() { - return doOutsideOfContext(disallowInAndDecoratorContext, parseArgumentOrArrayLiteralElement); - } - function parseArrayLiteralExpression() { - var node = createNode(156 /* ArrayLiteralExpression */); - parseExpected(18 /* OpenBracketToken */); - if (scanner.hasPrecedingLineBreak()) - node.flags |= 512 /* MultiLine */; - node.elements = parseDelimitedList(13 /* ArrayLiteralMembers */, parseArgumentOrArrayLiteralElement); - parseExpected(19 /* CloseBracketToken */); - return finishNode(node); - } - function tryParseAccessorDeclaration(fullStart, decorators, modifiers) { - if (parseContextualModifier(116 /* GetKeyword */)) { - return parseAccessorDeclaration(138 /* GetAccessor */, fullStart, decorators, modifiers); - } - else if (parseContextualModifier(122 /* SetKeyword */)) { - return parseAccessorDeclaration(139 /* SetAccessor */, fullStart, decorators, modifiers); - } - return undefined; - } - function parseObjectLiteralElement() { - var fullStart = scanner.getStartPos(); - var decorators = parseDecorators(); - var modifiers = parseModifiers(); - var accessor = tryParseAccessorDeclaration(fullStart, decorators, modifiers); - if (accessor) { - return accessor; - } - var asteriskToken = parseOptionalToken(35 /* AsteriskToken */); - var tokenIsIdentifier = isIdentifier(); - var nameToken = token; - var propertyName = parsePropertyName(); - // Disallowing of optional property assignments happens in the grammar checker. - var questionToken = parseOptionalToken(50 /* QuestionToken */); - if (asteriskToken || token === 16 /* OpenParenToken */ || token === 24 /* LessThanToken */) { - return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, propertyName, questionToken); - } - // Parse to check if it is short-hand property assignment or normal property assignment - if ((token === 23 /* CommaToken */ || token === 15 /* CloseBraceToken */) && tokenIsIdentifier) { - var shorthandDeclaration = createNode(228 /* ShorthandPropertyAssignment */, fullStart); - shorthandDeclaration.name = propertyName; - shorthandDeclaration.questionToken = questionToken; - return finishNode(shorthandDeclaration); - } - else { - var propertyAssignment = createNode(227 /* PropertyAssignment */, fullStart); - propertyAssignment.name = propertyName; - propertyAssignment.questionToken = questionToken; - parseExpected(51 /* ColonToken */); - propertyAssignment.initializer = allowInAnd(parseAssignmentExpressionOrHigher); - return finishNode(propertyAssignment); - } - } - function parseObjectLiteralExpression() { - var node = createNode(157 /* ObjectLiteralExpression */); - parseExpected(14 /* OpenBraceToken */); - if (scanner.hasPrecedingLineBreak()) { - node.flags |= 512 /* MultiLine */; - } - node.properties = parseDelimitedList(12 /* ObjectLiteralMembers */, parseObjectLiteralElement, true); - parseExpected(15 /* CloseBraceToken */); - return finishNode(node); - } - function parseFunctionExpression() { - // GeneratorExpression : - // function * BindingIdentifier[Yield]opt (FormalParameters[Yield, GeneratorParameter]) { GeneratorBody[Yield] } - // FunctionExpression: - // function BindingIdentifieropt(FormalParameters) { FunctionBody } - var saveDecoratorContext = inDecoratorContext(); - if (saveDecoratorContext) { - setDecoratorContext(false); - } - var node = createNode(165 /* FunctionExpression */); - parseExpected(83 /* FunctionKeyword */); - node.asteriskToken = parseOptionalToken(35 /* AsteriskToken */); - node.name = node.asteriskToken ? doInYieldContext(parseOptionalIdentifier) : parseOptionalIdentifier(); - fillSignature(51 /* ColonToken */, !!node.asteriskToken, false, node); - node.body = parseFunctionBlock(!!node.asteriskToken, false); - if (saveDecoratorContext) { - setDecoratorContext(true); - } - return finishNode(node); - } - function parseOptionalIdentifier() { - return isIdentifier() ? parseIdentifier() : undefined; - } - function parseNewExpression() { - var node = createNode(161 /* NewExpression */); - parseExpected(88 /* NewKeyword */); - node.expression = parseMemberExpressionOrHigher(); - node.typeArguments = tryParse(parseTypeArgumentsInExpression); - if (node.typeArguments || token === 16 /* OpenParenToken */) { - node.arguments = parseArgumentList(); - } - return finishNode(node); - } - // STATEMENTS - function parseBlock(ignoreMissingOpenBrace, checkForStrictMode, diagnosticMessage) { - var node = createNode(182 /* Block */); - if (parseExpected(14 /* OpenBraceToken */, diagnosticMessage) || ignoreMissingOpenBrace) { - node.statements = parseList(1 /* BlockStatements */, checkForStrictMode, parseStatement); - parseExpected(15 /* CloseBraceToken */); - } - else { - node.statements = createMissingList(); - } - return finishNode(node); - } - function parseFunctionBlock(allowYield, ignoreMissingOpenBrace, diagnosticMessage) { - var savedYieldContext = inYieldContext(); - setYieldContext(allowYield); - // We may be in a [Decorator] context when parsing a function expression or - // arrow function. The body of the function is not in [Decorator] context. - var saveDecoratorContext = inDecoratorContext(); - if (saveDecoratorContext) { - setDecoratorContext(false); - } - var block = parseBlock(ignoreMissingOpenBrace, true, diagnosticMessage); - if (saveDecoratorContext) { - setDecoratorContext(true); - } - setYieldContext(savedYieldContext); - return block; - } - function parseEmptyStatement() { - var node = createNode(184 /* EmptyStatement */); - parseExpected(22 /* SemicolonToken */); - return finishNode(node); - } - function parseIfStatement() { - var node = createNode(186 /* IfStatement */); - parseExpected(84 /* IfKeyword */); - parseExpected(16 /* OpenParenToken */); - node.expression = allowInAnd(parseExpression); - parseExpected(17 /* CloseParenToken */); - node.thenStatement = parseStatement(); - node.elseStatement = parseOptional(76 /* ElseKeyword */) ? parseStatement() : undefined; - return finishNode(node); - } - function parseDoStatement() { - var node = createNode(187 /* DoStatement */); - parseExpected(75 /* DoKeyword */); - node.statement = parseStatement(); - parseExpected(100 /* WhileKeyword */); - parseExpected(16 /* OpenParenToken */); - node.expression = allowInAnd(parseExpression); - parseExpected(17 /* CloseParenToken */); - // From: https://mail.mozilla.org/pipermail/es-discuss/2011-August/016188.html - // 157 min --- All allen at wirfs-brock.com CONF --- "do{;}while(false)false" prohibited in - // spec but allowed in consensus reality. Approved -- this is the de-facto standard whereby - // do;while(0)x will have a semicolon inserted before x. - parseOptional(22 /* SemicolonToken */); - return finishNode(node); - } - function parseWhileStatement() { - var node = createNode(188 /* WhileStatement */); - parseExpected(100 /* WhileKeyword */); - parseExpected(16 /* OpenParenToken */); - node.expression = allowInAnd(parseExpression); - parseExpected(17 /* CloseParenToken */); - node.statement = parseStatement(); - return finishNode(node); - } - function parseForOrForInOrForOfStatement() { - var pos = getNodePos(); - parseExpected(82 /* ForKeyword */); - parseExpected(16 /* OpenParenToken */); - var initializer = undefined; - if (token !== 22 /* SemicolonToken */) { - if (token === 98 /* VarKeyword */ || token === 104 /* LetKeyword */ || token === 70 /* ConstKeyword */) { - initializer = parseVariableDeclarationList(true); - } - else { - initializer = disallowInAnd(parseExpression); - } - } - var forOrForInOrForOfStatement; - if (parseOptional(86 /* InKeyword */)) { - var forInStatement = createNode(190 /* ForInStatement */, pos); - forInStatement.initializer = initializer; - forInStatement.expression = allowInAnd(parseExpression); - parseExpected(17 /* CloseParenToken */); - forOrForInOrForOfStatement = forInStatement; - } - else if (parseOptional(127 /* OfKeyword */)) { - var forOfStatement = createNode(191 /* ForOfStatement */, pos); - forOfStatement.initializer = initializer; - forOfStatement.expression = allowInAnd(parseAssignmentExpressionOrHigher); - parseExpected(17 /* CloseParenToken */); - forOrForInOrForOfStatement = forOfStatement; - } - else { - var forStatement = createNode(189 /* ForStatement */, pos); - forStatement.initializer = initializer; - parseExpected(22 /* SemicolonToken */); - if (token !== 22 /* SemicolonToken */ && token !== 17 /* CloseParenToken */) { - forStatement.condition = allowInAnd(parseExpression); - } - parseExpected(22 /* SemicolonToken */); - if (token !== 17 /* CloseParenToken */) { - forStatement.incrementor = allowInAnd(parseExpression); - } - parseExpected(17 /* CloseParenToken */); - forOrForInOrForOfStatement = forStatement; - } - forOrForInOrForOfStatement.statement = parseStatement(); - return finishNode(forOrForInOrForOfStatement); - } - function parseBreakOrContinueStatement(kind) { - var node = createNode(kind); - parseExpected(kind === 193 /* BreakStatement */ ? 66 /* BreakKeyword */ : 71 /* ContinueKeyword */); - if (!canParseSemicolon()) { - node.label = parseIdentifier(); - } - parseSemicolon(); - return finishNode(node); - } - function parseReturnStatement() { - var node = createNode(194 /* ReturnStatement */); - parseExpected(90 /* ReturnKeyword */); - if (!canParseSemicolon()) { - node.expression = allowInAnd(parseExpression); - } - parseSemicolon(); - return finishNode(node); - } - function parseWithStatement() { - var node = createNode(195 /* WithStatement */); - parseExpected(101 /* WithKeyword */); - parseExpected(16 /* OpenParenToken */); - node.expression = allowInAnd(parseExpression); - parseExpected(17 /* CloseParenToken */); - node.statement = parseStatement(); - return finishNode(node); - } - function parseCaseClause() { - var node = createNode(223 /* CaseClause */); - parseExpected(67 /* CaseKeyword */); - node.expression = allowInAnd(parseExpression); - parseExpected(51 /* ColonToken */); - node.statements = parseList(3 /* SwitchClauseStatements */, false, parseStatement); - return finishNode(node); - } - function parseDefaultClause() { - var node = createNode(224 /* DefaultClause */); - parseExpected(73 /* DefaultKeyword */); - parseExpected(51 /* ColonToken */); - node.statements = parseList(3 /* SwitchClauseStatements */, false, parseStatement); - return finishNode(node); - } - function parseCaseOrDefaultClause() { - return token === 67 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause(); - } - function parseSwitchStatement() { - var node = createNode(196 /* SwitchStatement */); - parseExpected(92 /* SwitchKeyword */); - parseExpected(16 /* OpenParenToken */); - node.expression = allowInAnd(parseExpression); - parseExpected(17 /* CloseParenToken */); - var caseBlock = createNode(210 /* CaseBlock */, scanner.getStartPos()); - parseExpected(14 /* OpenBraceToken */); - caseBlock.clauses = parseList(2 /* SwitchClauses */, false, parseCaseOrDefaultClause); - parseExpected(15 /* CloseBraceToken */); - node.caseBlock = finishNode(caseBlock); - return finishNode(node); - } - function parseThrowStatement() { - // ThrowStatement[Yield] : - // throw [no LineTerminator here]Expression[In, ?Yield]; - // Because of automatic semicolon insertion, we need to report error if this - // throw could be terminated with a semicolon. Note: we can't call 'parseExpression' - // directly as that might consume an expression on the following line. - // We just return 'undefined' in that case. The actual error will be reported in the - // grammar walker. - var node = createNode(198 /* ThrowStatement */); - parseExpected(94 /* ThrowKeyword */); - node.expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd(parseExpression); - parseSemicolon(); - return finishNode(node); - } - // TODO: Review for error recovery - function parseTryStatement() { - var node = createNode(199 /* TryStatement */); - parseExpected(96 /* TryKeyword */); - node.tryBlock = parseBlock(false, false); - node.catchClause = token === 68 /* CatchKeyword */ ? parseCatchClause() : undefined; - // If we don't have a catch clause, then we must have a finally clause. Try to parse - // one out no matter what. - if (!node.catchClause || token === 81 /* FinallyKeyword */) { - parseExpected(81 /* FinallyKeyword */); - node.finallyBlock = parseBlock(false, false); - } - return finishNode(node); - } - function parseCatchClause() { - var result = createNode(226 /* CatchClause */); - parseExpected(68 /* CatchKeyword */); - if (parseExpected(16 /* OpenParenToken */)) { - result.variableDeclaration = parseVariableDeclaration(); - } - parseExpected(17 /* CloseParenToken */); - result.block = parseBlock(false, false); - return finishNode(result); - } - function parseDebuggerStatement() { - var node = createNode(200 /* DebuggerStatement */); - parseExpected(72 /* DebuggerKeyword */); - parseSemicolon(); - return finishNode(node); - } - function parseExpressionOrLabeledStatement() { - // Avoiding having to do the lookahead for a labeled statement by just trying to parse - // out an expression, seeing if it is identifier and then seeing if it is followed by - // a colon. - var fullStart = scanner.getStartPos(); - var expression = allowInAnd(parseExpression); - if (expression.kind === 65 /* Identifier */ && parseOptional(51 /* ColonToken */)) { - var labeledStatement = createNode(197 /* LabeledStatement */, fullStart); - labeledStatement.label = expression; - labeledStatement.statement = parseStatement(); - return finishNode(labeledStatement); - } - else { - var expressionStatement = createNode(185 /* ExpressionStatement */, fullStart); - expressionStatement.expression = expression; - parseSemicolon(); - return finishNode(expressionStatement); - } - } - function isIdentifierOrKeyword() { - return token >= 65 /* Identifier */; - } - function nextTokenIsIdentifierOrKeywordOnSameLine() { - nextToken(); - return isIdentifierOrKeyword() && !scanner.hasPrecedingLineBreak(); - } - function isDeclaration() { - while (true) { - switch (token) { - case 98 /* VarKeyword */: - case 104 /* LetKeyword */: - case 70 /* ConstKeyword */: - case 83 /* FunctionKeyword */: - case 69 /* ClassKeyword */: - case 77 /* EnumKeyword */: - return true; - // 'declare', 'module', 'namespace', 'interface'* and 'type' are all legal JavaScript identifiers; - // however, an identifier cannot be followed by another identifier on the same line. This is what we - // count on to parse out the respective declarations. For instance, we exploit this to say that - // - // namespace n - // - // can be none other than the beginning of a namespace declaration, but need to respect that JavaScript sees - // - // namespace - // n - // - // as the identifier 'namespace' on one line followed by the identifier 'n' on another. - // We need to look one token ahead to see if it permissible to try parsing a declaration. - // - // *Note*: 'interface' is actually a strict mode reserved word. So while - // - // "use strict" - // interface - // I {} - // - // could be legal, it would add complexity for very little gain. - case 103 /* InterfaceKeyword */: - case 125 /* TypeKeyword */: - return nextTokenIsIdentifierOnSameLine(); - case 118 /* ModuleKeyword */: - case 119 /* NamespaceKeyword */: - return nextTokenIsIdentifierOrStringLiteralOnSameLine(); - case 115 /* DeclareKeyword */: - nextToken(); - // ASI takes effect for this modifier. - if (scanner.hasPrecedingLineBreak()) { - return false; - } - continue; - case 85 /* ImportKeyword */: - nextToken(); - return token === 8 /* StringLiteral */ || token === 35 /* AsteriskToken */ || - token === 14 /* OpenBraceToken */ || isIdentifierOrKeyword(); - case 78 /* ExportKeyword */: - nextToken(); - if (token === 53 /* EqualsToken */ || token === 35 /* AsteriskToken */ || - token === 14 /* OpenBraceToken */ || token === 73 /* DefaultKeyword */) { - return true; - } - continue; - case 108 /* PublicKeyword */: - case 106 /* PrivateKeyword */: - case 107 /* ProtectedKeyword */: - case 109 /* StaticKeyword */: - nextToken(); - continue; - default: - return false; - } - } - } - function isStartOfDeclaration() { - return lookAhead(isDeclaration); - } - function isStartOfStatement() { - switch (token) { - case 52 /* AtToken */: - case 22 /* SemicolonToken */: - case 14 /* OpenBraceToken */: - case 98 /* VarKeyword */: - case 104 /* LetKeyword */: - case 83 /* FunctionKeyword */: - case 69 /* ClassKeyword */: - case 77 /* EnumKeyword */: - case 84 /* IfKeyword */: - case 75 /* DoKeyword */: - case 100 /* WhileKeyword */: - case 82 /* ForKeyword */: - case 71 /* ContinueKeyword */: - case 66 /* BreakKeyword */: - case 90 /* ReturnKeyword */: - case 101 /* WithKeyword */: - case 92 /* SwitchKeyword */: - case 94 /* ThrowKeyword */: - case 96 /* TryKeyword */: - case 72 /* DebuggerKeyword */: - // 'catch' and 'finally' do not actually indicate that the code is part of a statement, - // however, we say they are here so that we may gracefully parse them and error later. - case 68 /* CatchKeyword */: - case 81 /* FinallyKeyword */: - return true; - case 70 /* ConstKeyword */: - case 78 /* ExportKeyword */: - case 85 /* ImportKeyword */: - return isStartOfDeclaration(); - case 115 /* DeclareKeyword */: - case 103 /* InterfaceKeyword */: - case 118 /* ModuleKeyword */: - case 119 /* NamespaceKeyword */: - case 125 /* TypeKeyword */: - // When these don't start a declaration, they're an identifier in an expression statement - return true; - case 108 /* PublicKeyword */: - case 106 /* PrivateKeyword */: - case 107 /* ProtectedKeyword */: - case 109 /* StaticKeyword */: - // When these don't start a declaration, they may be the start of a class member if an identifier - // immediately follows. Otherwise they're an identifier in an expression statement. - return isStartOfDeclaration() || !lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); - default: - return isStartOfExpression(); - } - } - function nextTokenIsIdentifierOrStartOfDestructuringOnTheSameLine() { - nextToken(); - return !scanner.hasPrecedingLineBreak() && - (isIdentifier() || token === 14 /* OpenBraceToken */ || token === 18 /* OpenBracketToken */); - } - function isLetDeclaration() { - // It is let declaration if in strict mode or next token is identifier\open bracket\open curly on same line. - // otherwise it needs to be treated like identifier - return inStrictModeContext() || lookAhead(nextTokenIsIdentifierOrStartOfDestructuringOnTheSameLine); - } - function parseStatement() { - switch (token) { - case 22 /* SemicolonToken */: - return parseEmptyStatement(); - case 14 /* OpenBraceToken */: - return parseBlock(false, false); - case 98 /* VarKeyword */: - return parseVariableStatement(scanner.getStartPos(), undefined, undefined); - case 104 /* LetKeyword */: - if (isLetDeclaration()) { - return parseVariableStatement(scanner.getStartPos(), undefined, undefined); - } - break; - case 83 /* FunctionKeyword */: - return parseFunctionDeclaration(scanner.getStartPos(), undefined, undefined); - case 69 /* ClassKeyword */: - return parseClassDeclaration(scanner.getStartPos(), undefined, undefined); - case 84 /* IfKeyword */: - return parseIfStatement(); - case 75 /* DoKeyword */: - return parseDoStatement(); - case 100 /* WhileKeyword */: - return parseWhileStatement(); - case 82 /* ForKeyword */: - return parseForOrForInOrForOfStatement(); - case 71 /* ContinueKeyword */: - return parseBreakOrContinueStatement(192 /* ContinueStatement */); - case 66 /* BreakKeyword */: - return parseBreakOrContinueStatement(193 /* BreakStatement */); - case 90 /* ReturnKeyword */: - return parseReturnStatement(); - case 101 /* WithKeyword */: - return parseWithStatement(); - case 92 /* SwitchKeyword */: - return parseSwitchStatement(); - case 94 /* ThrowKeyword */: - return parseThrowStatement(); - case 96 /* TryKeyword */: - // Include 'catch' and 'finally' for error recovery. - case 68 /* CatchKeyword */: - case 81 /* FinallyKeyword */: - return parseTryStatement(); - case 72 /* DebuggerKeyword */: - return parseDebuggerStatement(); - case 52 /* AtToken */: - return parseDeclaration(); - case 103 /* InterfaceKeyword */: - case 125 /* TypeKeyword */: - case 118 /* ModuleKeyword */: - case 119 /* NamespaceKeyword */: - case 115 /* DeclareKeyword */: - case 70 /* ConstKeyword */: - case 77 /* EnumKeyword */: - case 78 /* ExportKeyword */: - case 85 /* ImportKeyword */: - case 106 /* PrivateKeyword */: - case 107 /* ProtectedKeyword */: - case 108 /* PublicKeyword */: - case 109 /* StaticKeyword */: - if (isStartOfDeclaration()) { - return parseDeclaration(); - } - break; - } - return parseExpressionOrLabeledStatement(); - } - function parseDeclaration() { - var fullStart = getNodePos(); - var decorators = parseDecorators(); - var modifiers = parseModifiers(); - switch (token) { - case 98 /* VarKeyword */: - case 104 /* LetKeyword */: - case 70 /* ConstKeyword */: - return parseVariableStatement(fullStart, decorators, modifiers); - case 83 /* FunctionKeyword */: - return parseFunctionDeclaration(fullStart, decorators, modifiers); - case 69 /* ClassKeyword */: - return parseClassDeclaration(fullStart, decorators, modifiers); - case 103 /* InterfaceKeyword */: - return parseInterfaceDeclaration(fullStart, decorators, modifiers); - case 125 /* TypeKeyword */: - return parseTypeAliasDeclaration(fullStart, decorators, modifiers); - case 77 /* EnumKeyword */: - return parseEnumDeclaration(fullStart, decorators, modifiers); - case 118 /* ModuleKeyword */: - case 119 /* NamespaceKeyword */: - return parseModuleDeclaration(fullStart, decorators, modifiers); - case 85 /* ImportKeyword */: - return parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers); - case 78 /* ExportKeyword */: - nextToken(); - return token === 73 /* DefaultKeyword */ || token === 53 /* EqualsToken */ ? - parseExportAssignment(fullStart, decorators, modifiers) : - parseExportDeclaration(fullStart, decorators, modifiers); - default: - if (decorators) { - // We reached this point because we encountered decorators and/or modifiers and assumed a declaration - // would follow. For recovery and error reporting purposes, return an incomplete declaration. - var node = createMissingNode(221 /* MissingDeclaration */, true, ts.Diagnostics.Declaration_expected); - node.pos = fullStart; - node.decorators = decorators; - setModifiers(node, modifiers); - return finishNode(node); - } - } - } - function nextTokenIsIdentifierOrStringLiteralOnSameLine() { - nextToken(); - return !scanner.hasPrecedingLineBreak() && (isIdentifier() || token === 8 /* StringLiteral */); - } - function parseFunctionBlockOrSemicolon(isGenerator, diagnosticMessage) { - if (token !== 14 /* OpenBraceToken */ && canParseSemicolon()) { - parseSemicolon(); - return; - } - return parseFunctionBlock(isGenerator, false, diagnosticMessage); - } - // DECLARATIONS - function parseArrayBindingElement() { - if (token === 23 /* CommaToken */) { - return createNode(178 /* OmittedExpression */); - } - var node = createNode(155 /* BindingElement */); - node.dotDotDotToken = parseOptionalToken(21 /* DotDotDotToken */); - node.name = parseIdentifierOrPattern(); - node.initializer = parseInitializer(false); - return finishNode(node); - } - function parseObjectBindingElement() { - var node = createNode(155 /* BindingElement */); - // TODO(andersh): Handle computed properties - var tokenIsIdentifier = isIdentifier(); - var propertyName = parsePropertyName(); - if (tokenIsIdentifier && token !== 51 /* ColonToken */) { - node.name = propertyName; - } - else { - parseExpected(51 /* ColonToken */); - node.propertyName = propertyName; - node.name = parseIdentifierOrPattern(); - } - node.initializer = parseInitializer(false); - return finishNode(node); - } - function parseObjectBindingPattern() { - var node = createNode(153 /* ObjectBindingPattern */); - parseExpected(14 /* OpenBraceToken */); - node.elements = parseDelimitedList(9 /* ObjectBindingElements */, parseObjectBindingElement); - parseExpected(15 /* CloseBraceToken */); - return finishNode(node); - } - function parseArrayBindingPattern() { - var node = createNode(154 /* ArrayBindingPattern */); - parseExpected(18 /* OpenBracketToken */); - node.elements = parseDelimitedList(10 /* ArrayBindingElements */, parseArrayBindingElement); - parseExpected(19 /* CloseBracketToken */); - return finishNode(node); - } - function isIdentifierOrPattern() { - return token === 14 /* OpenBraceToken */ || token === 18 /* OpenBracketToken */ || isIdentifier(); - } - function parseIdentifierOrPattern() { - if (token === 18 /* OpenBracketToken */) { - return parseArrayBindingPattern(); - } - if (token === 14 /* OpenBraceToken */) { - return parseObjectBindingPattern(); - } - return parseIdentifier(); - } - function parseVariableDeclaration() { - var node = createNode(201 /* VariableDeclaration */); - node.name = parseIdentifierOrPattern(); - node.type = parseTypeAnnotation(); - if (!isInOrOfKeyword(token)) { - node.initializer = parseInitializer(false); - } - return finishNode(node); - } - function parseVariableDeclarationList(inForStatementInitializer) { - var node = createNode(202 /* VariableDeclarationList */); - switch (token) { - case 98 /* VarKeyword */: - break; - case 104 /* LetKeyword */: - node.flags |= 4096 /* Let */; - break; - case 70 /* ConstKeyword */: - node.flags |= 8192 /* Const */; - break; - default: - ts.Debug.fail(); - } - nextToken(); - // The user may have written the following: - // - // for (let of X) { } - // - // In this case, we want to parse an empty declaration list, and then parse 'of' - // as a keyword. The reason this is not automatic is that 'of' is a valid identifier. - // So we need to look ahead to determine if 'of' should be treated as a keyword in - // this context. - // The checker will then give an error that there is an empty declaration list. - if (token === 127 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { - node.declarations = createMissingList(); - } - else { - var savedDisallowIn = inDisallowInContext(); - setDisallowInContext(inForStatementInitializer); - node.declarations = parseDelimitedList(8 /* VariableDeclarations */, parseVariableDeclaration); - setDisallowInContext(savedDisallowIn); - } - return finishNode(node); - } - function canFollowContextualOfKeyword() { - return nextTokenIsIdentifier() && nextToken() === 17 /* CloseParenToken */; - } - function parseVariableStatement(fullStart, decorators, modifiers) { - var node = createNode(183 /* VariableStatement */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - node.declarationList = parseVariableDeclarationList(false); - parseSemicolon(); - return finishNode(node); - } - function parseFunctionDeclaration(fullStart, decorators, modifiers) { - var node = createNode(203 /* FunctionDeclaration */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - parseExpected(83 /* FunctionKeyword */); - node.asteriskToken = parseOptionalToken(35 /* AsteriskToken */); - node.name = node.flags & 256 /* Default */ ? parseOptionalIdentifier() : parseIdentifier(); - fillSignature(51 /* ColonToken */, !!node.asteriskToken, false, node); - node.body = parseFunctionBlockOrSemicolon(!!node.asteriskToken, ts.Diagnostics.or_expected); - return finishNode(node); - } - function parseConstructorDeclaration(pos, decorators, modifiers) { - var node = createNode(137 /* Constructor */, pos); - node.decorators = decorators; - setModifiers(node, modifiers); - parseExpected(114 /* ConstructorKeyword */); - fillSignature(51 /* ColonToken */, false, false, node); - node.body = parseFunctionBlockOrSemicolon(false, ts.Diagnostics.or_expected); - return finishNode(node); - } - function parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, diagnosticMessage) { - var method = createNode(136 /* MethodDeclaration */, fullStart); - method.decorators = decorators; - setModifiers(method, modifiers); - method.asteriskToken = asteriskToken; - method.name = name; - method.questionToken = questionToken; - fillSignature(51 /* ColonToken */, !!asteriskToken, false, method); - method.body = parseFunctionBlockOrSemicolon(!!asteriskToken, diagnosticMessage); - return finishNode(method); - } - function parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken) { - var property = createNode(134 /* PropertyDeclaration */, fullStart); - property.decorators = decorators; - setModifiers(property, modifiers); - property.name = name; - property.questionToken = questionToken; - property.type = parseTypeAnnotation(); - // For instance properties specifically, since they are evaluated inside the constructor, - // we do *not * want to parse yield expressions, so we specifically turn the yield context - // off. The grammar would look something like this: - // - // MemberVariableDeclaration[Yield]: - // AccessibilityModifier_opt PropertyName TypeAnnotation_opt Initialiser_opt[In]; - // AccessibilityModifier_opt static_opt PropertyName TypeAnnotation_opt Initialiser_opt[In, ?Yield]; - // - // The checker may still error in the static case to explicitly disallow the yield expression. - property.initializer = modifiers && modifiers.flags & 128 /* Static */ - ? allowInAnd(parseNonParameterInitializer) - : doOutsideOfContext(4 /* Yield */ | 2 /* DisallowIn */, parseNonParameterInitializer); - parseSemicolon(); - return finishNode(property); - } - function parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers) { - var asteriskToken = parseOptionalToken(35 /* AsteriskToken */); - var name = parsePropertyName(); - // Note: this is not legal as per the grammar. But we allow it in the parser and - // report an error in the grammar checker. - var questionToken = parseOptionalToken(50 /* QuestionToken */); - if (asteriskToken || token === 16 /* OpenParenToken */ || token === 24 /* LessThanToken */) { - return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, ts.Diagnostics.or_expected); - } - else { - return parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken); - } - } - function parseNonParameterInitializer() { - return parseInitializer(false); - } - function parseAccessorDeclaration(kind, fullStart, decorators, modifiers) { - var node = createNode(kind, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - node.name = parsePropertyName(); - fillSignature(51 /* ColonToken */, false, false, node); - node.body = parseFunctionBlockOrSemicolon(false); - return finishNode(node); - } - function isClassMemberModifier(idToken) { - switch (idToken) { - case 108 /* PublicKeyword */: - case 106 /* PrivateKeyword */: - case 107 /* ProtectedKeyword */: - case 109 /* StaticKeyword */: - return true; - default: - return false; - } - } - function isClassMemberStart() { - var idToken; - if (token === 52 /* AtToken */) { - return true; - } - // Eat up all modifiers, but hold on to the last one in case it is actually an identifier. - while (ts.isModifier(token)) { - idToken = token; - // If the idToken is a class modifier (protected, private, public, and static), it is - // certain that we are starting to parse class member. This allows better error recovery - // Example: - // public foo() ... // true - // public @dec blah ... // true; we will then report an error later - // export public ... // true; we will then report an error later - if (isClassMemberModifier(idToken)) { - return true; - } - nextToken(); - } - if (token === 35 /* AsteriskToken */) { - return true; - } - // Try to get the first property-like token following all modifiers. - // This can either be an identifier or the 'get' or 'set' keywords. - if (isLiteralPropertyName()) { - idToken = token; - nextToken(); - } - // Index signatures and computed properties are class members; we can parse. - if (token === 18 /* OpenBracketToken */) { - return true; - } - // If we were able to get any potential identifier... - if (idToken !== undefined) { - // If we have a non-keyword identifier, or if we have an accessor, then it's safe to parse. - if (!ts.isKeyword(idToken) || idToken === 122 /* SetKeyword */ || idToken === 116 /* GetKeyword */) { - return true; - } - // If it *is* a keyword, but not an accessor, check a little farther along - // to see if it should actually be parsed as a class member. - switch (token) { - case 16 /* OpenParenToken */: // Method declaration - case 24 /* LessThanToken */: // Generic Method declaration - case 51 /* ColonToken */: // Type Annotation for declaration - case 53 /* EqualsToken */: // Initializer for declaration - case 50 /* QuestionToken */: - return true; - default: - // Covers - // - Semicolons (declaration termination) - // - Closing braces (end-of-class, must be declaration) - // - End-of-files (not valid, but permitted so that it gets caught later on) - // - Line-breaks (enabling *automatic semicolon insertion*) - return canParseSemicolon(); - } - } - return false; - } - function parseDecorators() { - var decorators; - while (true) { - var decoratorStart = getNodePos(); - if (!parseOptional(52 /* AtToken */)) { - break; - } - if (!decorators) { - decorators = []; - decorators.pos = scanner.getStartPos(); - } - var decorator = createNode(132 /* Decorator */, decoratorStart); - decorator.expression = doInDecoratorContext(parseLeftHandSideExpressionOrHigher); - decorators.push(finishNode(decorator)); - } - if (decorators) { - decorators.end = getNodeEnd(); - } - return decorators; - } - function parseModifiers() { - var flags = 0; - var modifiers; - while (true) { - var modifierStart = scanner.getStartPos(); - var modifierKind = token; - if (!parseAnyContextualModifier()) { - break; - } - if (!modifiers) { - modifiers = []; - modifiers.pos = modifierStart; - } - flags |= ts.modifierToFlag(modifierKind); - modifiers.push(finishNode(createNode(modifierKind, modifierStart))); - } - if (modifiers) { - modifiers.flags = flags; - modifiers.end = scanner.getStartPos(); - } - return modifiers; - } - function parseClassElement() { - if (token === 22 /* SemicolonToken */) { - var result = createNode(181 /* SemicolonClassElement */); - nextToken(); - return finishNode(result); - } - var fullStart = getNodePos(); - var decorators = parseDecorators(); - var modifiers = parseModifiers(); - var accessor = tryParseAccessorDeclaration(fullStart, decorators, modifiers); - if (accessor) { - return accessor; - } - if (token === 114 /* ConstructorKeyword */) { - return parseConstructorDeclaration(fullStart, decorators, modifiers); - } - if (isIndexSignature()) { - return parseIndexSignatureDeclaration(fullStart, decorators, modifiers); - } - // It is very important that we check this *after* checking indexers because - // the [ token can start an index signature or a computed property name - if (isIdentifierOrKeyword() || - token === 8 /* StringLiteral */ || - token === 7 /* NumericLiteral */ || - token === 35 /* AsteriskToken */ || - token === 18 /* OpenBracketToken */) { - return parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers); - } - if (decorators) { - // treat this as a property declaration with a missing name. - var name_6 = createMissingNode(65 /* Identifier */, true, ts.Diagnostics.Declaration_expected); - return parsePropertyDeclaration(fullStart, decorators, modifiers, name_6, undefined); - } - // 'isClassMemberStart' should have hinted not to attempt parsing. - ts.Debug.fail("Should not have attempted to parse class member declaration."); - } - function parseClassExpression() { - return parseClassDeclarationOrExpression( - /*fullStart*/ scanner.getStartPos(), - /*decorators*/ undefined, - /*modifiers*/ undefined, 177 /* ClassExpression */); - } - function parseClassDeclaration(fullStart, decorators, modifiers) { - return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 204 /* ClassDeclaration */); - } - function parseClassDeclarationOrExpression(fullStart, decorators, modifiers, kind) { - // In ES6 specification, All parts of a ClassDeclaration or a ClassExpression are strict mode code - var savedStrictModeContext = inStrictModeContext(); - setStrictModeContext(true); - var node = createNode(kind, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - parseExpected(69 /* ClassKeyword */); - node.name = parseOptionalIdentifier(); - node.typeParameters = parseTypeParameters(); - node.heritageClauses = parseHeritageClauses(true); - if (parseExpected(14 /* OpenBraceToken */)) { - // ClassTail[Yield,GeneratorParameter] : See 14.5 - // [~GeneratorParameter]ClassHeritage[?Yield]opt { ClassBody[?Yield]opt } - // [+GeneratorParameter] ClassHeritageopt { ClassBodyopt } - node.members = inGeneratorParameterContext() - ? doOutsideOfYieldContext(parseClassMembers) - : parseClassMembers(); - parseExpected(15 /* CloseBraceToken */); - } - else { - node.members = createMissingList(); - } - var finishedNode = finishNode(node); - setStrictModeContext(savedStrictModeContext); - return finishedNode; - } - function parseHeritageClauses(isClassHeritageClause) { - // ClassTail[Yield,GeneratorParameter] : See 14.5 - // [~GeneratorParameter]ClassHeritage[?Yield]opt { ClassBody[?Yield]opt } - // [+GeneratorParameter] ClassHeritageopt { ClassBodyopt } - if (isHeritageClause()) { - return isClassHeritageClause && inGeneratorParameterContext() - ? doOutsideOfYieldContext(parseHeritageClausesWorker) - : parseHeritageClausesWorker(); - } - return undefined; - } - function parseHeritageClausesWorker() { - return parseList(18 /* HeritageClauses */, false, parseHeritageClause); - } - function parseHeritageClause() { - if (token === 79 /* ExtendsKeyword */ || token === 102 /* ImplementsKeyword */) { - var node = createNode(225 /* HeritageClause */); - node.token = token; - nextToken(); - node.types = parseDelimitedList(7 /* HeritageClauseElement */, parseExpressionWithTypeArguments); - return finishNode(node); - } - return undefined; - } - function parseExpressionWithTypeArguments() { - var node = createNode(179 /* ExpressionWithTypeArguments */); - node.expression = parseLeftHandSideExpressionOrHigher(); - if (token === 24 /* LessThanToken */) { - node.typeArguments = parseBracketedList(16 /* TypeArguments */, parseType, 24 /* LessThanToken */, 25 /* GreaterThanToken */); - } - return finishNode(node); - } - function isHeritageClause() { - return token === 79 /* ExtendsKeyword */ || token === 102 /* ImplementsKeyword */; - } - function parseClassMembers() { - return parseList(5 /* ClassMembers */, false, parseClassElement); - } - function parseInterfaceDeclaration(fullStart, decorators, modifiers) { - var node = createNode(205 /* InterfaceDeclaration */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - parseExpected(103 /* InterfaceKeyword */); - node.name = parseIdentifier(); - node.typeParameters = parseTypeParameters(); - node.heritageClauses = parseHeritageClauses(false); - node.members = parseObjectTypeMembers(); - return finishNode(node); - } - function parseTypeAliasDeclaration(fullStart, decorators, modifiers) { - var node = createNode(206 /* TypeAliasDeclaration */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - parseExpected(125 /* TypeKeyword */); - node.name = parseIdentifier(); - node.typeParameters = parseTypeParameters(); - parseExpected(53 /* EqualsToken */); - node.type = parseType(); - parseSemicolon(); - return finishNode(node); - } - // In an ambient declaration, the grammar only allows integer literals as initializers. - // In a non-ambient declaration, the grammar allows uninitialized members only in a - // ConstantEnumMemberSection, which starts at the beginning of an enum declaration - // or any time an integer literal initializer is encountered. - function parseEnumMember() { - var node = createNode(229 /* EnumMember */, scanner.getStartPos()); - node.name = parsePropertyName(); - node.initializer = allowInAnd(parseNonParameterInitializer); - return finishNode(node); - } - function parseEnumDeclaration(fullStart, decorators, modifiers) { - var node = createNode(207 /* EnumDeclaration */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - parseExpected(77 /* EnumKeyword */); - node.name = parseIdentifier(); - if (parseExpected(14 /* OpenBraceToken */)) { - node.members = parseDelimitedList(6 /* EnumMembers */, parseEnumMember); - parseExpected(15 /* CloseBraceToken */); - } - else { - node.members = createMissingList(); - } - return finishNode(node); - } - function parseModuleBlock() { - var node = createNode(209 /* ModuleBlock */, scanner.getStartPos()); - if (parseExpected(14 /* OpenBraceToken */)) { - node.statements = parseList(1 /* BlockStatements */, false, parseStatement); - parseExpected(15 /* CloseBraceToken */); - } - else { - node.statements = createMissingList(); - } - return finishNode(node); - } - function parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags) { - var node = createNode(208 /* ModuleDeclaration */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - node.flags |= flags; - node.name = parseIdentifier(); - node.body = parseOptional(20 /* DotToken */) - ? parseModuleOrNamespaceDeclaration(getNodePos(), undefined, undefined, 1 /* Export */) - : parseModuleBlock(); - return finishNode(node); - } - function parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers) { - var node = createNode(208 /* ModuleDeclaration */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - node.name = parseLiteralNode(true); - node.body = parseModuleBlock(); - return finishNode(node); - } - function parseModuleDeclaration(fullStart, decorators, modifiers) { - var flags = modifiers ? modifiers.flags : 0; - if (parseOptional(119 /* NamespaceKeyword */)) { - flags |= 32768 /* Namespace */; - } - else { - parseExpected(118 /* ModuleKeyword */); - if (token === 8 /* StringLiteral */) { - return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers); - } - } - return parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags); - } - function isExternalModuleReference() { - return token === 120 /* RequireKeyword */ && - lookAhead(nextTokenIsOpenParen); - } - function nextTokenIsOpenParen() { - return nextToken() === 16 /* OpenParenToken */; - } - function nextTokenIsCommaOrFromKeyword() { - nextToken(); - return token === 23 /* CommaToken */ || - token === 126 /* FromKeyword */; - } - function parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers) { - parseExpected(85 /* ImportKeyword */); - var afterImportPos = scanner.getStartPos(); - var identifier; - if (isIdentifier()) { - identifier = parseIdentifier(); - if (token !== 23 /* CommaToken */ && token !== 126 /* FromKeyword */) { - // ImportEquals declaration of type: - // import x = require("mod"); or - // import x = M.x; - var importEqualsDeclaration = createNode(211 /* ImportEqualsDeclaration */, fullStart); - importEqualsDeclaration.decorators = decorators; - setModifiers(importEqualsDeclaration, modifiers); - importEqualsDeclaration.name = identifier; - parseExpected(53 /* EqualsToken */); - importEqualsDeclaration.moduleReference = parseModuleReference(); - parseSemicolon(); - return finishNode(importEqualsDeclaration); - } - } - // Import statement - var importDeclaration = createNode(212 /* ImportDeclaration */, fullStart); - importDeclaration.decorators = decorators; - setModifiers(importDeclaration, modifiers); - // ImportDeclaration: - // import ImportClause from ModuleSpecifier ; - // import ModuleSpecifier; - if (identifier || - token === 35 /* AsteriskToken */ || - token === 14 /* OpenBraceToken */) { - importDeclaration.importClause = parseImportClause(identifier, afterImportPos); - parseExpected(126 /* FromKeyword */); - } - importDeclaration.moduleSpecifier = parseModuleSpecifier(); - parseSemicolon(); - return finishNode(importDeclaration); - } - function parseImportClause(identifier, fullStart) { - //ImportClause: - // ImportedDefaultBinding - // NameSpaceImport - // NamedImports - // ImportedDefaultBinding, NameSpaceImport - // ImportedDefaultBinding, NamedImports - var importClause = createNode(213 /* ImportClause */, fullStart); - if (identifier) { - // ImportedDefaultBinding: - // ImportedBinding - importClause.name = identifier; - } - // If there was no default import or if there is comma token after default import - // parse namespace or named imports - if (!importClause.name || - parseOptional(23 /* CommaToken */)) { - importClause.namedBindings = token === 35 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(215 /* NamedImports */); - } - return finishNode(importClause); - } - function parseModuleReference() { - return isExternalModuleReference() - ? parseExternalModuleReference() - : parseEntityName(false); - } - function parseExternalModuleReference() { - var node = createNode(222 /* ExternalModuleReference */); - parseExpected(120 /* RequireKeyword */); - parseExpected(16 /* OpenParenToken */); - node.expression = parseModuleSpecifier(); - parseExpected(17 /* CloseParenToken */); - return finishNode(node); - } - function parseModuleSpecifier() { - // We allow arbitrary expressions here, even though the grammar only allows string - // literals. We check to ensure that it is only a string literal later in the grammar - // walker. - var result = parseExpression(); - // Ensure the string being required is in our 'identifier' table. This will ensure - // that features like 'find refs' will look inside this file when search for its name. - if (result.kind === 8 /* StringLiteral */) { - internIdentifier(result.text); - } - return result; - } - function parseNamespaceImport() { - // NameSpaceImport: - // * as ImportedBinding - var namespaceImport = createNode(214 /* NamespaceImport */); - parseExpected(35 /* AsteriskToken */); - parseExpected(111 /* AsKeyword */); - namespaceImport.name = parseIdentifier(); - return finishNode(namespaceImport); - } - function parseNamedImportsOrExports(kind) { - var node = createNode(kind); - // NamedImports: - // { } - // { ImportsList } - // { ImportsList, } - // ImportsList: - // ImportSpecifier - // ImportsList, ImportSpecifier - node.elements = parseBracketedList(19 /* ImportOrExportSpecifiers */, kind === 215 /* NamedImports */ ? parseImportSpecifier : parseExportSpecifier, 14 /* OpenBraceToken */, 15 /* CloseBraceToken */); - return finishNode(node); - } - function parseExportSpecifier() { - return parseImportOrExportSpecifier(220 /* ExportSpecifier */); - } - function parseImportSpecifier() { - return parseImportOrExportSpecifier(216 /* ImportSpecifier */); - } - function parseImportOrExportSpecifier(kind) { - var node = createNode(kind); - // ImportSpecifier: - // BindingIdentifier - // IdentifierName as BindingIdentifier - // ExportSpecififer: - // IdentifierName - // IdentifierName as IdentifierName - var checkIdentifierIsKeyword = ts.isKeyword(token) && !isIdentifier(); - var checkIdentifierStart = scanner.getTokenPos(); - var checkIdentifierEnd = scanner.getTextPos(); - var identifierName = parseIdentifierName(); - if (token === 111 /* AsKeyword */) { - node.propertyName = identifierName; - parseExpected(111 /* AsKeyword */); - checkIdentifierIsKeyword = ts.isKeyword(token) && !isIdentifier(); - checkIdentifierStart = scanner.getTokenPos(); - checkIdentifierEnd = scanner.getTextPos(); - node.name = parseIdentifierName(); - } - else { - node.name = identifierName; - } - if (kind === 216 /* ImportSpecifier */ && checkIdentifierIsKeyword) { - // Report error identifier expected - parseErrorAtPosition(checkIdentifierStart, checkIdentifierEnd - checkIdentifierStart, ts.Diagnostics.Identifier_expected); - } - return finishNode(node); - } - function parseExportDeclaration(fullStart, decorators, modifiers) { - var node = createNode(218 /* ExportDeclaration */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - if (parseOptional(35 /* AsteriskToken */)) { - parseExpected(126 /* FromKeyword */); - node.moduleSpecifier = parseModuleSpecifier(); - } - else { - node.exportClause = parseNamedImportsOrExports(219 /* NamedExports */); - if (parseOptional(126 /* FromKeyword */)) { - node.moduleSpecifier = parseModuleSpecifier(); - } - } - parseSemicolon(); - return finishNode(node); - } - function parseExportAssignment(fullStart, decorators, modifiers) { - var node = createNode(217 /* ExportAssignment */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - if (parseOptional(53 /* EqualsToken */)) { - node.isExportEquals = true; - } - else { - parseExpected(73 /* DefaultKeyword */); - } - node.expression = parseAssignmentExpressionOrHigher(); - parseSemicolon(); - return finishNode(node); - } - function processReferenceComments(sourceFile) { - var triviaScanner = ts.createScanner(sourceFile.languageVersion, false, sourceText); - var referencedFiles = []; - var amdDependencies = []; - var amdModuleName; - // Keep scanning all the leading trivia in the file until we get to something that - // isn't trivia. Any single line comment will be analyzed to see if it is a - // reference comment. - while (true) { - var kind = triviaScanner.scan(); - if (kind === 5 /* WhitespaceTrivia */ || kind === 4 /* NewLineTrivia */ || kind === 3 /* MultiLineCommentTrivia */) { - continue; - } - if (kind !== 2 /* SingleLineCommentTrivia */) { - break; - } - var range = { pos: triviaScanner.getTokenPos(), end: triviaScanner.getTextPos(), kind: triviaScanner.getToken() }; - var comment = sourceText.substring(range.pos, range.end); - var referencePathMatchResult = ts.getFileReferenceFromReferencePath(comment, range); - if (referencePathMatchResult) { - var fileReference = referencePathMatchResult.fileReference; - sourceFile.hasNoDefaultLib = referencePathMatchResult.isNoDefaultLib; - var diagnosticMessage = referencePathMatchResult.diagnosticMessage; - if (fileReference) { - referencedFiles.push(fileReference); - } - if (diagnosticMessage) { - parseDiagnostics.push(ts.createFileDiagnostic(sourceFile, range.pos, range.end - range.pos, diagnosticMessage)); - } - } - else { - var amdModuleNameRegEx = /^\/\/\/\s*".length; - return parseErrorAtPosition(start, end - start, ts.Diagnostics.Type_argument_list_cannot_be_empty); - } - } - function parseQualifiedName(left) { - var result = createNode(128 /* QualifiedName */, left.pos); - result.left = left; - result.right = parseIdentifierName(); - return finishNode(result); - } - function parseJSDocRecordType() { - var result = createNode(239 /* JSDocRecordType */); - nextToken(); - result.members = parseDelimitedList(22 /* JSDocRecordMembers */, parseJSDocRecordMember); - checkForTrailingComma(result.members); - parseExpected(15 /* CloseBraceToken */); - return finishNode(result); - } - function parseJSDocRecordMember() { - var result = createNode(240 /* JSDocRecordMember */); - result.name = parseSimplePropertyName(); - if (token === 51 /* ColonToken */) { - nextToken(); - result.type = parseJSDocType(); - } - return finishNode(result); - } - function parseJSDocNonNullableType() { - var result = createNode(238 /* JSDocNonNullableType */); - nextToken(); - result.type = parseJSDocType(); - return finishNode(result); - } - function parseJSDocTupleType() { - var result = createNode(236 /* JSDocTupleType */); - nextToken(); - result.types = parseDelimitedList(23 /* JSDocTupleTypes */, parseJSDocType); - checkForTrailingComma(result.types); - parseExpected(19 /* CloseBracketToken */); - return finishNode(result); - } - function checkForTrailingComma(list) { - if (parseDiagnostics.length === 0 && list.hasTrailingComma) { - var start = list.end - ",".length; - parseErrorAtPosition(start, ",".length, ts.Diagnostics.Trailing_comma_not_allowed); - } - } - function parseJSDocUnionType() { - var result = createNode(235 /* JSDocUnionType */); - nextToken(); - result.types = parseJSDocTypeList(parseJSDocType()); - parseExpected(17 /* CloseParenToken */); - return finishNode(result); - } - function parseJSDocTypeList(firstType) { - ts.Debug.assert(!!firstType); - var types = []; - types.pos = firstType.pos; - types.push(firstType); - while (parseOptional(44 /* BarToken */)) { - types.push(parseJSDocType()); - } - types.end = scanner.getStartPos(); - return types; - } - function parseJSDocAllType() { - var result = createNode(232 /* JSDocAllType */); - nextToken(); - return finishNode(result); - } - function parseJSDocUnknownOrNullableType() { - var pos = scanner.getStartPos(); - // skip the ? - nextToken(); - // Need to lookahead to decide if this is a nullable or unknown type. - // Here are cases where we'll pick the unknown type: - // - // Foo(?, - // { a: ? } - // Foo(?) - // Foo - // Foo(?= - // (?| - if (token === 23 /* CommaToken */ || - token === 15 /* CloseBraceToken */ || - token === 17 /* CloseParenToken */ || - token === 25 /* GreaterThanToken */ || - token === 53 /* EqualsToken */ || - token === 44 /* BarToken */) { - var result = createNode(233 /* JSDocUnknownType */, pos); - return finishNode(result); - } - else { - var result = createNode(237 /* JSDocNullableType */, pos); - result.type = parseJSDocType(); - return finishNode(result); - } - } - function parseIsolatedJSDocComment(content, start, length) { - initializeState("file.js", content, 2 /* Latest */, undefined); - var jsDocComment = parseJSDocComment(undefined, start, length); - var diagnostics = parseDiagnostics; - clearState(); - return jsDocComment ? { jsDocComment: jsDocComment, diagnostics: diagnostics } : undefined; - } - JSDocParser.parseIsolatedJSDocComment = parseIsolatedJSDocComment; - function parseJSDocComment(parent, start, length) { - var comment = parseJSDocCommentWorker(start, length); - if (comment) { - fixupParentReferences(comment); - comment.parent = parent; - } - return comment; - } - JSDocParser.parseJSDocComment = parseJSDocComment; - function parseJSDocCommentWorker(start, length) { - var content = sourceText; - start = start || 0; - var end = length === undefined ? content.length : start + length; - length = end - start; - ts.Debug.assert(start >= 0); - ts.Debug.assert(start <= end); - ts.Debug.assert(end <= content.length); - var tags; - var pos; - // NOTE(cyrusn): This is essentially a handwritten scanner for JSDocComments. I - // considered using an actual Scanner, but this would complicate things. The - // scanner would need to know it was in a Doc Comment. Otherwise, it would then - // produce comments *inside* the doc comment. In the end it was just easier to - // write a simple scanner rather than go that route. - if (length >= "/** */".length) { - if (content.charCodeAt(start) === 47 /* slash */ && - content.charCodeAt(start + 1) === 42 /* asterisk */ && - content.charCodeAt(start + 2) === 42 /* asterisk */ && - content.charCodeAt(start + 3) !== 42 /* asterisk */) { - // Initially we can parse out a tag. We also have seen a starting asterisk. - // This is so that /** * @type */ doesn't parse. - var canParseTag = true; - var seenAsterisk = true; - for (pos = start + "/**".length; pos < end;) { - var ch = content.charCodeAt(pos); - pos++; - if (ch === 64 /* at */ && canParseTag) { - parseTag(); - // Once we parse out a tag, we cannot keep parsing out tags on this line. - canParseTag = false; - continue; - } - if (ts.isLineBreak(ch)) { - // After a line break, we can parse a tag, and we haven't seen as asterisk - // on the next line yet. - canParseTag = true; - seenAsterisk = false; - continue; - } - if (ts.isWhiteSpace(ch)) { - // Whitespace doesn't affect any of our parsing. - continue; - } - // Ignore the first asterisk on a line. - if (ch === 42 /* asterisk */) { - if (seenAsterisk) { - // If we've already seen an asterisk, then we can no longer parse a tag - // on this line. - canParseTag = false; - } - seenAsterisk = true; - continue; - } - // Anything else is doc comment text. We can't do anything with it. Because it - // wasn't a tag, we can no longer parse a tag on this line until we hit the next - // line break. - canParseTag = false; - } - } - } - return createJSDocComment(); - function createJSDocComment() { - if (!tags) { - return undefined; - } - var result = createNode(247 /* JSDocComment */, start); - result.tags = tags; - return finishNode(result, end); - } - function skipWhitespace() { - while (pos < end && ts.isWhiteSpace(content.charCodeAt(pos))) { - pos++; - } - } - function parseTag() { - ts.Debug.assert(content.charCodeAt(pos - 1) === 64 /* at */); - var atToken = createNode(52 /* AtToken */, pos - 1); - atToken.end = pos; - var startPos = pos; - var tagName = scanIdentifier(); - if (!tagName) { - return; - } - var tag = handleTag(atToken, tagName) || handleUnknownTag(atToken, tagName); - addTag(tag); - } - function handleTag(atToken, tagName) { - if (tagName) { - switch (tagName.text) { - case "param": - return handleParamTag(atToken, tagName); - case "return": - case "returns": - return handleReturnTag(atToken, tagName); - case "template": - return handleTemplateTag(atToken, tagName); - case "type": - return handleTypeTag(atToken, tagName); - } - } - return undefined; - } - function handleUnknownTag(atToken, tagName) { - var result = createNode(248 /* JSDocTag */, atToken.pos); - result.atToken = atToken; - result.tagName = tagName; - return finishNode(result, pos); - } - function addTag(tag) { - if (tag) { - if (!tags) { - tags = []; - tags.pos = tag.pos; - } - tags.push(tag); - tags.end = tag.end; - } - } - function tryParseTypeExpression() { - skipWhitespace(); - if (content.charCodeAt(pos) !== 123 /* openBrace */) { - return undefined; - } - var typeExpression = parseJSDocTypeExpression(pos, end - pos); - pos = typeExpression.end; - return typeExpression; - } - function handleParamTag(atToken, tagName) { - var typeExpression = tryParseTypeExpression(); - skipWhitespace(); - var name; - var isBracketed; - if (content.charCodeAt(pos) === 91 /* openBracket */) { - pos++; - skipWhitespace(); - name = scanIdentifier(); - isBracketed = true; - } - else { - name = scanIdentifier(); - } - if (!name) { - parseErrorAtPosition(pos, 0, ts.Diagnostics.Identifier_expected); - return undefined; - } - var preName, postName; - if (typeExpression) { - postName = name; - } - else { - preName = name; - } - if (!typeExpression) { - typeExpression = tryParseTypeExpression(); - } - var result = createNode(249 /* JSDocParameterTag */, atToken.pos); - result.atToken = atToken; - result.tagName = tagName; - result.preParameterName = preName; - result.typeExpression = typeExpression; - result.postParameterName = postName; - result.isBracketed = isBracketed; - return finishNode(result, pos); - } - function handleReturnTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 250 /* JSDocReturnTag */; })) { - parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); - } - var result = createNode(250 /* JSDocReturnTag */, atToken.pos); - result.atToken = atToken; - result.tagName = tagName; - result.typeExpression = tryParseTypeExpression(); - return finishNode(result, pos); - } - function handleTypeTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 251 /* JSDocTypeTag */; })) { - parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); - } - var result = createNode(251 /* JSDocTypeTag */, atToken.pos); - result.atToken = atToken; - result.tagName = tagName; - result.typeExpression = tryParseTypeExpression(); - return finishNode(result, pos); - } - function handleTemplateTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 252 /* JSDocTemplateTag */; })) { - parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); - } - var typeParameters = []; - typeParameters.pos = pos; - while (true) { - skipWhitespace(); - var startPos = pos; - var name_7 = scanIdentifier(); - if (!name_7) { - parseErrorAtPosition(startPos, 0, ts.Diagnostics.Identifier_expected); - return undefined; - } - var typeParameter = createNode(130 /* TypeParameter */, name_7.pos); - typeParameter.name = name_7; - finishNode(typeParameter, pos); - typeParameters.push(typeParameter); - skipWhitespace(); - if (content.charCodeAt(pos) !== 44 /* comma */) { - break; - } - pos++; - } - typeParameters.end = pos; - var result = createNode(252 /* JSDocTemplateTag */, atToken.pos); - result.atToken = atToken; - result.tagName = tagName; - result.typeParameters = typeParameters; - return finishNode(result, pos); - } - function scanIdentifier() { - var startPos = pos; - for (; pos < end; pos++) { - var ch = content.charCodeAt(pos); - if (pos === startPos && ts.isIdentifierStart(ch, 2 /* Latest */)) { - continue; - } - else if (pos > startPos && ts.isIdentifierPart(ch, 2 /* Latest */)) { - continue; - } - break; - } - if (startPos === pos) { - return undefined; - } - var result = createNode(65 /* Identifier */, startPos); - result.text = content.substring(startPos, pos); - return finishNode(result, pos); - } - } - JSDocParser.parseJSDocCommentWorker = parseJSDocCommentWorker; - })(JSDocParser = Parser.JSDocParser || (Parser.JSDocParser = {})); - })(Parser || (Parser = {})); - var IncrementalParser; - (function (IncrementalParser) { - function updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks) { - aggressiveChecks = aggressiveChecks || ts.Debug.shouldAssert(2 /* Aggressive */); - checkChangeRange(sourceFile, newText, textChangeRange, aggressiveChecks); - if (ts.textChangeRangeIsUnchanged(textChangeRange)) { - // if the text didn't change, then we can just return our current source file as-is. - return sourceFile; - } - if (sourceFile.statements.length === 0) { - // If we don't have any statements in the current source file, then there's no real - // way to incrementally parse. So just do a full parse instead. - return Parser.parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion, undefined, true); - } - // Make sure we're not trying to incrementally update a source file more than once. Once - // we do an update the original source file is considered unusbale from that point onwards. - // - // This is because we do incremental parsing in-place. i.e. we take nodes from the old - // tree and give them new positions and parents. From that point on, trusting the old - // tree at all is not possible as far too much of it may violate invariants. - var incrementalSourceFile = sourceFile; - ts.Debug.assert(!incrementalSourceFile.hasBeenIncrementallyParsed); - incrementalSourceFile.hasBeenIncrementallyParsed = true; - var oldText = sourceFile.text; - var syntaxCursor = createSyntaxCursor(sourceFile); - // Make the actual change larger so that we know to reparse anything whose lookahead - // might have intersected the change. - var changeRange = extendToAffectedRange(sourceFile, textChangeRange); - checkChangeRange(sourceFile, newText, changeRange, aggressiveChecks); - // Ensure that extending the affected range only moved the start of the change range - // earlier in the file. - ts.Debug.assert(changeRange.span.start <= textChangeRange.span.start); - ts.Debug.assert(ts.textSpanEnd(changeRange.span) === ts.textSpanEnd(textChangeRange.span)); - ts.Debug.assert(ts.textSpanEnd(ts.textChangeRangeNewSpan(changeRange)) === ts.textSpanEnd(ts.textChangeRangeNewSpan(textChangeRange))); - // The is the amount the nodes after the edit range need to be adjusted. It can be - // positive (if the edit added characters), negative (if the edit deleted characters) - // or zero (if this was a pure overwrite with nothing added/removed). - var delta = ts.textChangeRangeNewSpan(changeRange).length - changeRange.span.length; - // If we added or removed characters during the edit, then we need to go and adjust all - // the nodes after the edit. Those nodes may move forward (if we inserted chars) or they - // may move backward (if we deleted chars). - // - // Doing this helps us out in two ways. First, it means that any nodes/tokens we want - // to reuse are already at the appropriate position in the new text. That way when we - // reuse them, we don't have to figure out if they need to be adjusted. Second, it makes - // it very easy to determine if we can reuse a node. If the node's position is at where - // we are in the text, then we can reuse it. Otherwise we can't. If the node's position - // is ahead of us, then we'll need to rescan tokens. If the node's position is behind - // us, then we'll need to skip it or crumble it as appropriate - // - // We will also adjust the positions of nodes that intersect the change range as well. - // By doing this, we ensure that all the positions in the old tree are consistent, not - // just the positions of nodes entirely before/after the change range. By being - // consistent, we can then easily map from positions to nodes in the old tree easily. - // - // Also, mark any syntax elements that intersect the changed span. We know, up front, - // that we cannot reuse these elements. - updateTokenPositionsAndMarkElements(incrementalSourceFile, changeRange.span.start, ts.textSpanEnd(changeRange.span), ts.textSpanEnd(ts.textChangeRangeNewSpan(changeRange)), delta, oldText, newText, aggressiveChecks); - // Now that we've set up our internal incremental state just proceed and parse the - // source file in the normal fashion. When possible the parser will retrieve and - // reuse nodes from the old tree. - // - // Note: passing in 'true' for setNodeParents is very important. When incrementally - // parsing, we will be reusing nodes from the old tree, and placing it into new - // parents. If we don't set the parents now, we'll end up with an observably - // inconsistent tree. Setting the parents on the new tree should be very fast. We - // will immediately bail out of walking any subtrees when we can see that their parents - // are already correct. - var result = Parser.parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion, syntaxCursor, true); - return result; - } - IncrementalParser.updateSourceFile = updateSourceFile; - function moveElementEntirelyPastChangeRange(element, isArray, delta, oldText, newText, aggressiveChecks) { - if (isArray) { - visitArray(element); - } - else { - visitNode(element); - } - return; - function visitNode(node) { - if (aggressiveChecks && shouldCheckNode(node)) { - var text = oldText.substring(node.pos, node.end); - } - // Ditch any existing LS children we may have created. This way we can avoid - // moving them forward. - if (node._children) { - node._children = undefined; - } - if (node.jsDocComment) { - node.jsDocComment = undefined; - } - node.pos += delta; - node.end += delta; - if (aggressiveChecks && shouldCheckNode(node)) { - ts.Debug.assert(text === newText.substring(node.pos, node.end)); - } - forEachChild(node, visitNode, visitArray); - checkNodePositions(node, aggressiveChecks); - } - function visitArray(array) { - array._children = undefined; - array.pos += delta; - array.end += delta; - for (var _i = 0; _i < array.length; _i++) { - var node = array[_i]; - visitNode(node); - } - } - } - function shouldCheckNode(node) { - switch (node.kind) { - case 8 /* StringLiteral */: - case 7 /* NumericLiteral */: - case 65 /* Identifier */: - return true; - } - return false; - } - function adjustIntersectingElement(element, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta) { - ts.Debug.assert(element.end >= changeStart, "Adjusting an element that was entirely before the change range"); - ts.Debug.assert(element.pos <= changeRangeOldEnd, "Adjusting an element that was entirely after the change range"); - ts.Debug.assert(element.pos <= element.end); - // We have an element that intersects the change range in some way. It may have its - // start, or its end (or both) in the changed range. We want to adjust any part - // that intersects such that the final tree is in a consistent state. i.e. all - // chlidren have spans within the span of their parent, and all siblings are ordered - // properly. - // We may need to update both the 'pos' and the 'end' of the element. - // If the 'pos' is before the start of the change, then we don't need to touch it. - // If it isn't, then the 'pos' must be inside the change. How we update it will - // depend if delta is positive or negative. If delta is positive then we have - // something like: - // - // -------------------AAA----------------- - // -------------------BBBCCCCCCC----------------- - // - // In this case, we consider any node that started in the change range to still be - // starting at the same position. - // - // however, if the delta is negative, then we instead have something like this: - // - // -------------------XXXYYYYYYY----------------- - // -------------------ZZZ----------------- - // - // In this case, any element that started in the 'X' range will keep its position. - // However any element htat started after that will have their pos adjusted to be - // at the end of the new range. i.e. any node that started in the 'Y' range will - // be adjusted to have their start at the end of the 'Z' range. - // - // The element will keep its position if possible. Or Move backward to the new-end - // if it's in the 'Y' range. - element.pos = Math.min(element.pos, changeRangeNewEnd); - // If the 'end' is after the change range, then we always adjust it by the delta - // amount. However, if the end is in the change range, then how we adjust it - // will depend on if delta is positive or negative. If delta is positive then we - // have something like: - // - // -------------------AAA----------------- - // -------------------BBBCCCCCCC----------------- - // - // In this case, we consider any node that ended inside the change range to keep its - // end position. - // - // however, if the delta is negative, then we instead have something like this: - // - // -------------------XXXYYYYYYY----------------- - // -------------------ZZZ----------------- - // - // In this case, any element that ended in the 'X' range will keep its position. - // However any element htat ended after that will have their pos adjusted to be - // at the end of the new range. i.e. any node that ended in the 'Y' range will - // be adjusted to have their end at the end of the 'Z' range. - if (element.end >= changeRangeOldEnd) { - // Element ends after the change range. Always adjust the end pos. - element.end += delta; - } - else { - // Element ends in the change range. The element will keep its position if - // possible. Or Move backward to the new-end if it's in the 'Y' range. - element.end = Math.min(element.end, changeRangeNewEnd); - } - ts.Debug.assert(element.pos <= element.end); - if (element.parent) { - ts.Debug.assert(element.pos >= element.parent.pos); - ts.Debug.assert(element.end <= element.parent.end); - } - } - function checkNodePositions(node, aggressiveChecks) { - if (aggressiveChecks) { - var pos = node.pos; - forEachChild(node, function (child) { - ts.Debug.assert(child.pos >= pos); - pos = child.end; - }); - ts.Debug.assert(pos <= node.end); - } - } - function updateTokenPositionsAndMarkElements(sourceFile, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta, oldText, newText, aggressiveChecks) { - visitNode(sourceFile); - return; - function visitNode(child) { - ts.Debug.assert(child.pos <= child.end); - if (child.pos > changeRangeOldEnd) { - // Node is entirely past the change range. We need to move both its pos and - // end, forward or backward appropriately. - moveElementEntirelyPastChangeRange(child, false, delta, oldText, newText, aggressiveChecks); - return; - } - // Check if the element intersects the change range. If it does, then it is not - // reusable. Also, we'll need to recurse to see what constituent portions we may - // be able to use. - var fullEnd = child.end; - if (fullEnd >= changeStart) { - child.intersectsChange = true; - child._children = undefined; - // Adjust the pos or end (or both) of the intersecting element accordingly. - adjustIntersectingElement(child, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta); - forEachChild(child, visitNode, visitArray); - checkNodePositions(child, aggressiveChecks); - return; - } - // Otherwise, the node is entirely before the change range. No need to do anything with it. - ts.Debug.assert(fullEnd < changeStart); - } - function visitArray(array) { - ts.Debug.assert(array.pos <= array.end); - if (array.pos > changeRangeOldEnd) { - // Array is entirely after the change range. We need to move it, and move any of - // its children. - moveElementEntirelyPastChangeRange(array, true, delta, oldText, newText, aggressiveChecks); - return; - } - // Check if the element intersects the change range. If it does, then it is not - // reusable. Also, we'll need to recurse to see what constituent portions we may - // be able to use. - var fullEnd = array.end; - if (fullEnd >= changeStart) { - array.intersectsChange = true; - array._children = undefined; - // Adjust the pos or end (or both) of the intersecting array accordingly. - adjustIntersectingElement(array, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta); - for (var _i = 0; _i < array.length; _i++) { - var node = array[_i]; - visitNode(node); - } - return; - } - // Otherwise, the array is entirely before the change range. No need to do anything with it. - ts.Debug.assert(fullEnd < changeStart); - } - } - function extendToAffectedRange(sourceFile, changeRange) { - // Consider the following code: - // void foo() { /; } - // - // If the text changes with an insertion of / just before the semicolon then we end up with: - // void foo() { //; } - // - // If we were to just use the changeRange a is, then we would not rescan the { token - // (as it does not intersect the actual original change range). Because an edit may - // change the token touching it, we actually need to look back *at least* one token so - // that the prior token sees that change. - var maxLookahead = 1; - var start = changeRange.span.start; - // the first iteration aligns us with the change start. subsequent iteration move us to - // the left by maxLookahead tokens. We only need to do this as long as we're not at the - // start of the tree. - for (var i = 0; start > 0 && i <= maxLookahead; i++) { - var nearestNode = findNearestNodeStartingBeforeOrAtPosition(sourceFile, start); - ts.Debug.assert(nearestNode.pos <= start); - var position = nearestNode.pos; - start = Math.max(0, position - 1); - } - var finalSpan = ts.createTextSpanFromBounds(start, ts.textSpanEnd(changeRange.span)); - var finalLength = changeRange.newLength + (changeRange.span.start - start); - return ts.createTextChangeRange(finalSpan, finalLength); - } - function findNearestNodeStartingBeforeOrAtPosition(sourceFile, position) { - var bestResult = sourceFile; - var lastNodeEntirelyBeforePosition; - forEachChild(sourceFile, visit); - if (lastNodeEntirelyBeforePosition) { - var lastChildOfLastEntireNodeBeforePosition = getLastChild(lastNodeEntirelyBeforePosition); - if (lastChildOfLastEntireNodeBeforePosition.pos > bestResult.pos) { - bestResult = lastChildOfLastEntireNodeBeforePosition; - } - } - return bestResult; - function getLastChild(node) { - while (true) { - var lastChild = getLastChildWorker(node); - if (lastChild) { - node = lastChild; - } - else { - return node; - } - } - } - function getLastChildWorker(node) { - var last = undefined; - forEachChild(node, function (child) { - if (ts.nodeIsPresent(child)) { - last = child; - } - }); - return last; - } - function visit(child) { - if (ts.nodeIsMissing(child)) { - // Missing nodes are effectively invisible to us. We never even consider them - // When trying to find the nearest node before us. - return; - } - // If the child intersects this position, then this node is currently the nearest - // node that starts before the position. - if (child.pos <= position) { - if (child.pos >= bestResult.pos) { - // This node starts before the position, and is closer to the position than - // the previous best node we found. It is now the new best node. - bestResult = child; - } - // Now, the node may overlap the position, or it may end entirely before the - // position. If it overlaps with the position, then either it, or one of its - // children must be the nearest node before the position. So we can just - // recurse into this child to see if we can find something better. - if (position < child.end) { - // The nearest node is either this child, or one of the children inside - // of it. We've already marked this child as the best so far. Recurse - // in case one of the children is better. - forEachChild(child, visit); - // Once we look at the children of this node, then there's no need to - // continue any further. - return true; - } - else { - ts.Debug.assert(child.end <= position); - // The child ends entirely before this position. Say you have the following - // (where $ is the position) - // - // ? $ : <...> <...> - // - // We would want to find the nearest preceding node in "complex expr 2". - // To support that, we keep track of this node, and once we're done searching - // for a best node, we recurse down this node to see if we can find a good - // result in it. - // - // This approach allows us to quickly skip over nodes that are entirely - // before the position, while still allowing us to find any nodes in the - // last one that might be what we want. - lastNodeEntirelyBeforePosition = child; - } - } - else { - ts.Debug.assert(child.pos > position); - // We're now at a node that is entirely past the position we're searching for. - // This node (and all following nodes) could never contribute to the result, - // so just skip them by returning 'true' here. - return true; - } - } - } - function checkChangeRange(sourceFile, newText, textChangeRange, aggressiveChecks) { - var oldText = sourceFile.text; - if (textChangeRange) { - ts.Debug.assert((oldText.length - textChangeRange.span.length + textChangeRange.newLength) === newText.length); - if (aggressiveChecks || ts.Debug.shouldAssert(3 /* VeryAggressive */)) { - var oldTextPrefix = oldText.substr(0, textChangeRange.span.start); - var newTextPrefix = newText.substr(0, textChangeRange.span.start); - ts.Debug.assert(oldTextPrefix === newTextPrefix); - var oldTextSuffix = oldText.substring(ts.textSpanEnd(textChangeRange.span), oldText.length); - var newTextSuffix = newText.substring(ts.textSpanEnd(ts.textChangeRangeNewSpan(textChangeRange)), newText.length); - ts.Debug.assert(oldTextSuffix === newTextSuffix); - } - } - } - function createSyntaxCursor(sourceFile) { - var currentArray = sourceFile.statements; - var currentArrayIndex = 0; - ts.Debug.assert(currentArrayIndex < currentArray.length); - var current = currentArray[currentArrayIndex]; - var lastQueriedPosition = -1 /* Value */; - return { - currentNode: function (position) { - // Only compute the current node if the position is different than the last time - // we were asked. The parser commonly asks for the node at the same position - // twice. Once to know if can read an appropriate list element at a certain point, - // and then to actually read and consume the node. - if (position !== lastQueriedPosition) { - // Much of the time the parser will need the very next node in the array that - // we just returned a node from.So just simply check for that case and move - // forward in the array instead of searching for the node again. - if (current && current.end === position && currentArrayIndex < (currentArray.length - 1)) { - currentArrayIndex++; - current = currentArray[currentArrayIndex]; - } - // If we don't have a node, or the node we have isn't in the right position, - // then try to find a viable node at the position requested. - if (!current || current.pos !== position) { - findHighestListElementThatStartsAtPosition(position); - } - } - // Cache this query so that we don't do any extra work if the parser calls back - // into us. Note: this is very common as the parser will make pairs of calls like - // 'isListElement -> parseListElement'. If we were unable to find a node when - // called with 'isListElement', we don't want to redo the work when parseListElement - // is called immediately after. - lastQueriedPosition = position; - // Either we don'd have a node, or we have a node at the position being asked for. - ts.Debug.assert(!current || current.pos === position); - return current; - } - }; - // Finds the highest element in the tree we can find that starts at the provided position. - // The element must be a direct child of some node list in the tree. This way after we - // return it, we can easily return its next sibling in the list. - function findHighestListElementThatStartsAtPosition(position) { - // Clear out any cached state about the last node we found. - currentArray = undefined; - currentArrayIndex = -1 /* Value */; - current = undefined; - // Recurse into the source file to find the highest node at this position. - forEachChild(sourceFile, visitNode, visitArray); - return; - function visitNode(node) { - if (position >= node.pos && position < node.end) { - // Position was within this node. Keep searching deeper to find the node. - forEachChild(node, visitNode, visitArray); - // don't procede any futher in the search. - return true; - } - // position wasn't in this node, have to keep searching. - return false; - } - function visitArray(array) { - if (position >= array.pos && position < array.end) { - // position was in this array. Search through this array to see if we find a - // viable element. - for (var i = 0, n = array.length; i < n; i++) { - var child = array[i]; - if (child) { - if (child.pos === position) { - // Found the right node. We're done. - currentArray = array; - currentArrayIndex = i; - current = child; - return true; - } - else { - if (child.pos < position && position < child.end) { - // Position in somewhere within this child. Search in it and - // stop searching in this array. - forEachChild(child, visitNode, visitArray); - return true; - } - } - } - } - } - // position wasn't in this array, have to keep searching. - return false; - } - } - } - var InvalidPosition; - (function (InvalidPosition) { - InvalidPosition[InvalidPosition["Value"] = -1] = "Value"; - })(InvalidPosition || (InvalidPosition = {})); - })(IncrementalParser || (IncrementalParser = {})); -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var nextSymbolId = 1; - var nextNodeId = 1; - var nextMergeId = 1; - function getNodeId(node) { - if (!node.id) - node.id = nextNodeId++; - return node.id; - } - ts.getNodeId = getNodeId; - ts.checkTime = 0; - function getSymbolId(symbol) { - if (!symbol.id) { - symbol.id = nextSymbolId++; - } - return symbol.id; - } - ts.getSymbolId = getSymbolId; - function createTypeChecker(host, produceDiagnostics) { - var Symbol = ts.objectAllocator.getSymbolConstructor(); - var Type = ts.objectAllocator.getTypeConstructor(); - var Signature = ts.objectAllocator.getSignatureConstructor(); - var typeCount = 0; - var emptyArray = []; - var emptySymbols = {}; - var compilerOptions = host.getCompilerOptions(); - var languageVersion = compilerOptions.target || 0 /* ES3 */; - var emitResolver = createResolver(); - var undefinedSymbol = createSymbol(4 /* Property */ | 67108864 /* Transient */, "undefined"); - var argumentsSymbol = createSymbol(4 /* Property */ | 67108864 /* Transient */, "arguments"); - var checker = { - getNodeCount: function () { return ts.sum(host.getSourceFiles(), "nodeCount"); }, - getIdentifierCount: function () { return ts.sum(host.getSourceFiles(), "identifierCount"); }, - getSymbolCount: function () { return ts.sum(host.getSourceFiles(), "symbolCount"); }, - getTypeCount: function () { return typeCount; }, - isUndefinedSymbol: function (symbol) { return symbol === undefinedSymbol; }, - isArgumentsSymbol: function (symbol) { return symbol === argumentsSymbol; }, - getDiagnostics: getDiagnostics, - getGlobalDiagnostics: getGlobalDiagnostics, - getTypeOfSymbolAtLocation: getTypeOfSymbolAtLocation, - getDeclaredTypeOfSymbol: getDeclaredTypeOfSymbol, - getPropertiesOfType: getPropertiesOfType, - getPropertyOfType: getPropertyOfType, - getSignaturesOfType: getSignaturesOfType, - getIndexTypeOfType: getIndexTypeOfType, - getReturnTypeOfSignature: getReturnTypeOfSignature, - getSymbolsInScope: getSymbolsInScope, - getSymbolAtLocation: getSymbolAtLocation, - getShorthandAssignmentValueSymbol: getShorthandAssignmentValueSymbol, - getTypeAtLocation: getTypeAtLocation, - typeToString: typeToString, - getSymbolDisplayBuilder: getSymbolDisplayBuilder, - symbolToString: symbolToString, - getAugmentedPropertiesOfType: getAugmentedPropertiesOfType, - getRootSymbols: getRootSymbols, - getContextualType: getContextualType, - getFullyQualifiedName: getFullyQualifiedName, - getResolvedSignature: getResolvedSignature, - getConstantValue: getConstantValue, - isValidPropertyAccess: isValidPropertyAccess, - getSignatureFromDeclaration: getSignatureFromDeclaration, - isImplementationOfOverload: isImplementationOfOverload, - getAliasedSymbol: resolveAlias, - getEmitResolver: getEmitResolver, - getExportsOfModule: getExportsOfModuleAsArray - }; - var unknownSymbol = createSymbol(4 /* Property */ | 67108864 /* Transient */, "unknown"); - var resolvingSymbol = createSymbol(67108864 /* Transient */, "__resolving__"); - var anyType = createIntrinsicType(1 /* Any */, "any"); - var stringType = createIntrinsicType(2 /* String */, "string"); - var numberType = createIntrinsicType(4 /* Number */, "number"); - var booleanType = createIntrinsicType(8 /* Boolean */, "boolean"); - var esSymbolType = createIntrinsicType(2097152 /* ESSymbol */, "symbol"); - var voidType = createIntrinsicType(16 /* Void */, "void"); - var undefinedType = createIntrinsicType(32 /* Undefined */ | 524288 /* ContainsUndefinedOrNull */, "undefined"); - var nullType = createIntrinsicType(64 /* Null */ | 524288 /* ContainsUndefinedOrNull */, "null"); - var unknownType = createIntrinsicType(1 /* Any */, "unknown"); - var circularType = createIntrinsicType(1 /* Any */, "__circular__"); - var emptyObjectType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); - var emptyGenericType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); - emptyGenericType.instantiations = {}; - var anyFunctionType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); - var noConstraintType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); - var anySignature = createSignature(undefined, undefined, emptyArray, anyType, undefined, 0, false, false); - var unknownSignature = createSignature(undefined, undefined, emptyArray, unknownType, undefined, 0, false, false); - var globals = {}; - var globalESSymbolConstructorSymbol; - var globalObjectType; - var globalFunctionType; - var globalArrayType; - var globalStringType; - var globalNumberType; - var globalBooleanType; - var globalRegExpType; - var globalTemplateStringsArrayType; - var globalESSymbolType; - var globalIterableType; - var globalIteratorType; - var globalIterableIteratorType; - var anyArrayType; - var getGlobalClassDecoratorType; - var getGlobalParameterDecoratorType; - var getGlobalPropertyDecoratorType; - var getGlobalMethodDecoratorType; - var tupleTypes = {}; - var unionTypes = {}; - var stringLiteralTypes = {}; - var emitExtends = false; - var emitDecorate = false; - var emitParam = false; - var resolutionTargets = []; - var resolutionResults = []; - var mergedSymbols = []; - var symbolLinks = []; - var nodeLinks = []; - var potentialThisCollisions = []; - var diagnostics = ts.createDiagnosticCollection(); - var primitiveTypeInfo = { - "string": { - type: stringType, - flags: 258 /* StringLike */ - }, - "number": { - type: numberType, - flags: 132 /* NumberLike */ - }, - "boolean": { - type: booleanType, - flags: 8 /* Boolean */ - }, - "symbol": { - type: esSymbolType, - flags: 2097152 /* ESSymbol */ - } - }; - function getEmitResolver(sourceFile) { - // Ensure we have all the type information in place for this file so that all the - // emitter questions of this resolver will return the right information. - getDiagnostics(sourceFile); - return emitResolver; - } - function error(location, message, arg0, arg1, arg2) { - var diagnostic = location - ? ts.createDiagnosticForNode(location, message, arg0, arg1, arg2) - : ts.createCompilerDiagnostic(message, arg0, arg1, arg2); - diagnostics.add(diagnostic); - } - function createSymbol(flags, name) { - return new Symbol(flags, name); - } - function getExcludedSymbolFlags(flags) { - var result = 0; - if (flags & 2 /* BlockScopedVariable */) - result |= 107455 /* BlockScopedVariableExcludes */; - if (flags & 1 /* FunctionScopedVariable */) - result |= 107454 /* FunctionScopedVariableExcludes */; - if (flags & 4 /* Property */) - result |= 107455 /* PropertyExcludes */; - if (flags & 8 /* EnumMember */) - result |= 107455 /* EnumMemberExcludes */; - if (flags & 16 /* Function */) - result |= 106927 /* FunctionExcludes */; - if (flags & 32 /* Class */) - result |= 899583 /* ClassExcludes */; - if (flags & 64 /* Interface */) - result |= 792992 /* InterfaceExcludes */; - if (flags & 256 /* RegularEnum */) - result |= 899327 /* RegularEnumExcludes */; - if (flags & 128 /* ConstEnum */) - result |= 899967 /* ConstEnumExcludes */; - if (flags & 512 /* ValueModule */) - result |= 106639 /* ValueModuleExcludes */; - if (flags & 8192 /* Method */) - result |= 99263 /* MethodExcludes */; - if (flags & 32768 /* GetAccessor */) - result |= 41919 /* GetAccessorExcludes */; - if (flags & 65536 /* SetAccessor */) - result |= 74687 /* SetAccessorExcludes */; - if (flags & 262144 /* TypeParameter */) - result |= 530912 /* TypeParameterExcludes */; - if (flags & 524288 /* TypeAlias */) - result |= 793056 /* TypeAliasExcludes */; - if (flags & 8388608 /* Alias */) - result |= 8388608 /* AliasExcludes */; - return result; - } - function recordMergedSymbol(target, source) { - if (!source.mergeId) - source.mergeId = nextMergeId++; - mergedSymbols[source.mergeId] = target; - } - function cloneSymbol(symbol) { - var result = createSymbol(symbol.flags | 33554432 /* Merged */, symbol.name); - result.declarations = symbol.declarations.slice(0); - result.parent = symbol.parent; - if (symbol.valueDeclaration) - result.valueDeclaration = symbol.valueDeclaration; - if (symbol.constEnumOnlyModule) - result.constEnumOnlyModule = true; - if (symbol.members) - result.members = cloneSymbolTable(symbol.members); - if (symbol.exports) - result.exports = cloneSymbolTable(symbol.exports); - recordMergedSymbol(result, symbol); - return result; - } - function mergeSymbol(target, source) { - if (!(target.flags & getExcludedSymbolFlags(source.flags))) { - if (source.flags & 512 /* ValueModule */ && target.flags & 512 /* ValueModule */ && target.constEnumOnlyModule && !source.constEnumOnlyModule) { - // reset flag when merging instantiated module into value module that has only const enums - target.constEnumOnlyModule = false; - } - target.flags |= source.flags; - if (!target.valueDeclaration && source.valueDeclaration) - target.valueDeclaration = source.valueDeclaration; - ts.forEach(source.declarations, function (node) { - target.declarations.push(node); - }); - if (source.members) { - if (!target.members) - target.members = {}; - mergeSymbolTable(target.members, source.members); - } - if (source.exports) { - if (!target.exports) - target.exports = {}; - mergeSymbolTable(target.exports, source.exports); - } - recordMergedSymbol(target, source); - } - else { - var message = target.flags & 2 /* BlockScopedVariable */ || source.flags & 2 /* BlockScopedVariable */ - ? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0 : ts.Diagnostics.Duplicate_identifier_0; - ts.forEach(source.declarations, function (node) { - error(node.name ? node.name : node, message, symbolToString(source)); - }); - ts.forEach(target.declarations, function (node) { - error(node.name ? node.name : node, message, symbolToString(source)); - }); - } - } - function cloneSymbolTable(symbolTable) { - var result = {}; - for (var id in symbolTable) { - if (ts.hasProperty(symbolTable, id)) { - result[id] = symbolTable[id]; - } - } - return result; - } - function mergeSymbolTable(target, source) { - for (var id in source) { - if (ts.hasProperty(source, id)) { - if (!ts.hasProperty(target, id)) { - target[id] = source[id]; - } - else { - var symbol = target[id]; - if (!(symbol.flags & 33554432 /* Merged */)) { - target[id] = symbol = cloneSymbol(symbol); - } - mergeSymbol(symbol, source[id]); - } - } - } - } - function getSymbolLinks(symbol) { - if (symbol.flags & 67108864 /* Transient */) - return symbol; - var id = getSymbolId(symbol); - return symbolLinks[id] || (symbolLinks[id] = {}); - } - function getNodeLinks(node) { - var nodeId = getNodeId(node); - return nodeLinks[nodeId] || (nodeLinks[nodeId] = {}); - } - function getSourceFile(node) { - return ts.getAncestor(node, 230 /* SourceFile */); - } - function isGlobalSourceFile(node) { - return node.kind === 230 /* SourceFile */ && !ts.isExternalModule(node); - } - function getSymbol(symbols, name, meaning) { - if (meaning && ts.hasProperty(symbols, name)) { - var symbol = symbols[name]; - ts.Debug.assert((symbol.flags & 16777216 /* Instantiated */) === 0, "Should never get an instantiated symbol here."); - if (symbol.flags & meaning) { - return symbol; - } - if (symbol.flags & 8388608 /* Alias */) { - var target = resolveAlias(symbol); - // Unknown symbol means an error occurred in alias resolution, treat it as positive answer to avoid cascading errors - if (target === unknownSymbol || target.flags & meaning) { - return symbol; - } - } - } - // return undefined if we can't find a symbol. - } - /** Returns true if node1 is defined before node 2**/ - function isDefinedBefore(node1, node2) { - var file1 = ts.getSourceFileOfNode(node1); - var file2 = ts.getSourceFileOfNode(node2); - if (file1 === file2) { - return node1.pos <= node2.pos; - } - if (!compilerOptions.out) { - return true; - } - var sourceFiles = host.getSourceFiles(); - return sourceFiles.indexOf(file1) <= sourceFiles.indexOf(file2); - } - // Resolve a given name for a given meaning at a given location. An error is reported if the name was not found and - // the nameNotFoundMessage argument is not undefined. Returns the resolved symbol, or undefined if no symbol with - // the given name can be found. - function resolveName(location, name, meaning, nameNotFoundMessage, nameArg) { - var result; - var lastLocation; - var propertyWithInvalidInitializer; - var errorLocation = location; - var grandparent; - loop: while (location) { - // Locals of a source file are not in scope (because they get merged into the global symbol table) - if (location.locals && !isGlobalSourceFile(location)) { - if (result = getSymbol(location.locals, name, meaning)) { - // Type parameters of a function are in scope in the entire function declaration, including the parameter - // list and return type. However, local types are only in scope in the function body. - if (!(meaning & 793056 /* Type */) || - !(result.flags & (793056 /* Type */ & ~262144 /* TypeParameter */)) || - !ts.isFunctionLike(location) || - lastLocation === location.body) { - break loop; - } - result = undefined; - } - } - switch (location.kind) { - case 230 /* SourceFile */: - if (!ts.isExternalModule(location)) - break; - case 208 /* ModuleDeclaration */: - if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8914931 /* ModuleMember */)) { - if (result.flags & meaning || !(result.flags & 8388608 /* Alias */ && getDeclarationOfAliasSymbol(result).kind === 220 /* ExportSpecifier */)) { - break loop; - } - result = undefined; - } - else if (location.kind === 230 /* SourceFile */ || - (location.kind === 208 /* ModuleDeclaration */ && location.name.kind === 8 /* StringLiteral */)) { - result = getSymbolOfNode(location).exports["default"]; - var localSymbol = ts.getLocalSymbolForExportDefault(result); - if (result && localSymbol && (result.flags & meaning) && localSymbol.name === name) { - break loop; - } - result = undefined; - } - break; - case 207 /* EnumDeclaration */: - if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8 /* EnumMember */)) { - break loop; - } - break; - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - // TypeScript 1.0 spec (April 2014): 8.4.1 - // Initializer expressions for instance member variables are evaluated in the scope - // of the class constructor body but are not permitted to reference parameters or - // local variables of the constructor. This effectively means that entities from outer scopes - // by the same name as a constructor parameter or local variable are inaccessible - // in initializer expressions for instance member variables. - if (location.parent.kind === 204 /* ClassDeclaration */ && !(location.flags & 128 /* Static */)) { - var ctor = findConstructorDeclaration(location.parent); - if (ctor && ctor.locals) { - if (getSymbol(ctor.locals, name, meaning & 107455 /* Value */)) { - // Remember the property node, it will be used later to report appropriate error - propertyWithInvalidInitializer = location; - } - } - } - break; - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - if (result = getSymbol(getSymbolOfNode(location).members, name, meaning & 793056 /* Type */)) { - if (lastLocation && lastLocation.flags & 128 /* Static */) { - // TypeScript 1.0 spec (April 2014): 3.4.1 - // The scope of a type parameter extends over the entire declaration with which the type - // parameter list is associated, with the exception of static member declarations in classes. - error(errorLocation, ts.Diagnostics.Static_members_cannot_reference_class_type_parameters); - return undefined; - } - break loop; - } - break; - // It is not legal to reference a class's own type parameters from a computed property name that - // belongs to the class. For example: - // - // function foo() { return '' } - // class C { // <-- Class's own type parameter T - // [foo()]() { } // <-- Reference to T from class's own computed property - // } - // - case 129 /* ComputedPropertyName */: - grandparent = location.parent.parent; - if (grandparent.kind === 204 /* ClassDeclaration */ || grandparent.kind === 205 /* InterfaceDeclaration */) { - // A reference to this grandparent's type parameters would be an error - if (result = getSymbol(getSymbolOfNode(grandparent).members, name, meaning & 793056 /* Type */)) { - error(errorLocation, ts.Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); - return undefined; - } - } - break; - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 137 /* Constructor */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 203 /* FunctionDeclaration */: - case 166 /* ArrowFunction */: - if (meaning & 3 /* Variable */ && name === "arguments") { - result = argumentsSymbol; - break loop; - } - break; - case 165 /* FunctionExpression */: - if (meaning & 3 /* Variable */ && name === "arguments") { - result = argumentsSymbol; - break loop; - } - if (meaning & 16 /* Function */) { - var functionName = location.name; - if (functionName && name === functionName.text) { - result = location.symbol; - break loop; - } - } - break; - case 177 /* ClassExpression */: - if (meaning & 32 /* Class */) { - var className = location.name; - if (className && name === className.text) { - result = location.symbol; - break loop; - } - } - break; - case 132 /* Decorator */: - // Decorators are resolved at the class declaration. Resolving at the parameter - // or member would result in looking up locals in the method. - // - // function y() {} - // class C { - // method(@y x, y) {} // <-- decorator y should be resolved at the class declaration, not the parameter. - // } - // - if (location.parent && location.parent.kind === 131 /* Parameter */) { - location = location.parent; - } - // - // function y() {} - // class C { - // @y method(x, y) {} // <-- decorator y should be resolved at the class declaration, not the method. - // } - // - if (location.parent && ts.isClassElement(location.parent)) { - location = location.parent; - } - break; - } - lastLocation = location; - location = location.parent; - } - if (!result) { - result = getSymbol(globals, name, meaning); - } - if (!result) { - if (nameNotFoundMessage) { - error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg)); - } - return undefined; - } - // Perform extra checks only if error reporting was requested - if (nameNotFoundMessage) { - if (propertyWithInvalidInitializer) { - // We have a match, but the reference occurred within a property initializer and the identifier also binds - // to a local variable in the constructor where the code will be emitted. - var propertyName = propertyWithInvalidInitializer.name; - error(errorLocation, ts.Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, ts.declarationNameToString(propertyName), typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg)); - return undefined; - } - if (result.flags & 2 /* BlockScopedVariable */) { - checkResolvedBlockScopedVariable(result, errorLocation); - } - } - return result; - } - function checkResolvedBlockScopedVariable(result, errorLocation) { - ts.Debug.assert((result.flags & 2 /* BlockScopedVariable */) !== 0); - // Block-scoped variables cannot be used before their definition - var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) ? d : undefined; }); - ts.Debug.assert(declaration !== undefined, "Block-scoped variable declaration is undefined"); - // first check if usage is lexically located after the declaration - var isUsedBeforeDeclaration = !isDefinedBefore(declaration, errorLocation); - if (!isUsedBeforeDeclaration) { - // lexical check succeeded however code still can be illegal. - // - block scoped variables cannot be used in its initializers - // let x = x; // illegal but usage is lexically after definition - // - in ForIn/ForOf statements variable cannot be contained in expression part - // for (let x in x) - // for (let x of x) - // climb up to the variable declaration skipping binding patterns - var variableDeclaration = ts.getAncestor(declaration, 201 /* VariableDeclaration */); - var container = ts.getEnclosingBlockScopeContainer(variableDeclaration); - if (variableDeclaration.parent.parent.kind === 183 /* VariableStatement */ || - variableDeclaration.parent.parent.kind === 189 /* ForStatement */) { - // variable statement/for statement case, - // use site should not be inside variable declaration (initializer of declaration or binding element) - isUsedBeforeDeclaration = isSameScopeDescendentOf(errorLocation, variableDeclaration, container); - } - else if (variableDeclaration.parent.parent.kind === 191 /* ForOfStatement */ || - variableDeclaration.parent.parent.kind === 190 /* ForInStatement */) { - // ForIn/ForOf case - use site should not be used in expression part - var expression = variableDeclaration.parent.parent.expression; - isUsedBeforeDeclaration = isSameScopeDescendentOf(errorLocation, expression, container); - } - } - if (isUsedBeforeDeclaration) { - error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(declaration.name)); - } - } - /* Starting from 'initial' node walk up the parent chain until 'stopAt' node is reached. - * If at any point current node is equal to 'parent' node - return true. - * Return false if 'stopAt' node is reached or isFunctionLike(current) === true. - */ - function isSameScopeDescendentOf(initial, parent, stopAt) { - if (!parent) { - return false; - } - for (var current = initial; current && current !== stopAt && !ts.isFunctionLike(current); current = current.parent) { - if (current === parent) { - return true; - } - } - return false; - } - function getAnyImportSyntax(node) { - if (ts.isAliasSymbolDeclaration(node)) { - if (node.kind === 211 /* ImportEqualsDeclaration */) { - return node; - } - while (node && node.kind !== 212 /* ImportDeclaration */) { - node = node.parent; - } - return node; - } - } - function getDeclarationOfAliasSymbol(symbol) { - return ts.forEach(symbol.declarations, function (d) { return ts.isAliasSymbolDeclaration(d) ? d : undefined; }); - } - function getTargetOfImportEqualsDeclaration(node) { - if (node.moduleReference.kind === 222 /* ExternalModuleReference */) { - return resolveExternalModuleSymbol(resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node))); - } - return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, node); - } - function getTargetOfImportClause(node) { - var moduleSymbol = resolveExternalModuleName(node, node.parent.moduleSpecifier); - if (moduleSymbol) { - var exportDefaultSymbol = resolveSymbol(moduleSymbol.exports["default"]); - if (!exportDefaultSymbol) { - error(node.name, ts.Diagnostics.Module_0_has_no_default_export, symbolToString(moduleSymbol)); - } - return exportDefaultSymbol; - } - } - function getTargetOfNamespaceImport(node) { - var moduleSpecifier = node.parent.parent.moduleSpecifier; - return resolveESModuleSymbol(resolveExternalModuleName(node, moduleSpecifier), moduleSpecifier); - } - function getMemberOfModuleVariable(moduleSymbol, name) { - if (moduleSymbol.flags & 3 /* Variable */) { - var typeAnnotation = moduleSymbol.valueDeclaration.type; - if (typeAnnotation) { - return getPropertyOfType(getTypeFromTypeNode(typeAnnotation), name); - } - } - } - // This function creates a synthetic symbol that combines the value side of one symbol with the - // type/namespace side of another symbol. Consider this example: - // - // declare module graphics { - // interface Point { - // x: number; - // y: number; - // } - // } - // declare var graphics: { - // Point: new (x: number, y: number) => graphics.Point; - // } - // declare module "graphics" { - // export = graphics; - // } - // - // An 'import { Point } from "graphics"' needs to create a symbol that combines the value side 'Point' - // property with the type/namespace side interface 'Point'. - function combineValueAndTypeSymbols(valueSymbol, typeSymbol) { - if (valueSymbol.flags & (793056 /* Type */ | 1536 /* Namespace */)) { - return valueSymbol; - } - var result = createSymbol(valueSymbol.flags | typeSymbol.flags, valueSymbol.name); - result.declarations = ts.concatenate(valueSymbol.declarations, typeSymbol.declarations); - result.parent = valueSymbol.parent || typeSymbol.parent; - if (valueSymbol.valueDeclaration) - result.valueDeclaration = valueSymbol.valueDeclaration; - if (typeSymbol.members) - result.members = typeSymbol.members; - if (valueSymbol.exports) - result.exports = valueSymbol.exports; - return result; - } - function getExportOfModule(symbol, name) { - if (symbol.flags & 1536 /* Module */) { - var exports = getExportsOfSymbol(symbol); - if (ts.hasProperty(exports, name)) { - return resolveSymbol(exports[name]); - } - } - } - function getPropertyOfVariable(symbol, name) { - if (symbol.flags & 3 /* Variable */) { - var typeAnnotation = symbol.valueDeclaration.type; - if (typeAnnotation) { - return resolveSymbol(getPropertyOfType(getTypeFromTypeNode(typeAnnotation), name)); - } - } - } - function getExternalModuleMember(node, specifier) { - var moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier); - var targetSymbol = resolveESModuleSymbol(moduleSymbol, node.moduleSpecifier); - if (targetSymbol) { - var name_8 = specifier.propertyName || specifier.name; - if (name_8.text) { - var symbolFromModule = getExportOfModule(targetSymbol, name_8.text); - var symbolFromVariable = getPropertyOfVariable(targetSymbol, name_8.text); - var symbol = symbolFromModule && symbolFromVariable ? - combineValueAndTypeSymbols(symbolFromVariable, symbolFromModule) : - symbolFromModule || symbolFromVariable; - if (!symbol) { - error(name_8, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(moduleSymbol), ts.declarationNameToString(name_8)); - } - return symbol; - } - } - } - function getTargetOfImportSpecifier(node) { - return getExternalModuleMember(node.parent.parent.parent, node); - } - function getTargetOfExportSpecifier(node) { - return node.parent.parent.moduleSpecifier ? - getExternalModuleMember(node.parent.parent, node) : - resolveEntityName(node.propertyName || node.name, 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */); - } - function getTargetOfExportAssignment(node) { - return resolveEntityName(node.expression, 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */); - } - function getTargetOfAliasDeclaration(node) { - switch (node.kind) { - case 211 /* ImportEqualsDeclaration */: - return getTargetOfImportEqualsDeclaration(node); - case 213 /* ImportClause */: - return getTargetOfImportClause(node); - case 214 /* NamespaceImport */: - return getTargetOfNamespaceImport(node); - case 216 /* ImportSpecifier */: - return getTargetOfImportSpecifier(node); - case 220 /* ExportSpecifier */: - return getTargetOfExportSpecifier(node); - case 217 /* ExportAssignment */: - return getTargetOfExportAssignment(node); - } - } - function resolveSymbol(symbol) { - return symbol && symbol.flags & 8388608 /* Alias */ && !(symbol.flags & (107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */)) ? resolveAlias(symbol) : symbol; - } - function resolveAlias(symbol) { - ts.Debug.assert((symbol.flags & 8388608 /* Alias */) !== 0, "Should only get Alias here."); - var links = getSymbolLinks(symbol); - if (!links.target) { - links.target = resolvingSymbol; - var node = getDeclarationOfAliasSymbol(symbol); - var target = getTargetOfAliasDeclaration(node); - if (links.target === resolvingSymbol) { - links.target = target || unknownSymbol; - } - else { - error(node, ts.Diagnostics.Circular_definition_of_import_alias_0, symbolToString(symbol)); - } - } - else if (links.target === resolvingSymbol) { - links.target = unknownSymbol; - } - return links.target; - } - function markExportAsReferenced(node) { - var symbol = getSymbolOfNode(node); - var target = resolveAlias(symbol); - if (target) { - var markAlias = (target === unknownSymbol && compilerOptions.isolatedModules) || - (target !== unknownSymbol && (target.flags & 107455 /* Value */) && !isConstEnumOrConstEnumOnlyModule(target)); - if (markAlias) { - markAliasSymbolAsReferenced(symbol); - } - } - } - // When an alias symbol is referenced, we need to mark the entity it references as referenced and in turn repeat that until - // we reach a non-alias or an exported entity (which is always considered referenced). We do this by checking the target of - // the alias as an expression (which recursively takes us back here if the target references another alias). - function markAliasSymbolAsReferenced(symbol) { - var links = getSymbolLinks(symbol); - if (!links.referenced) { - links.referenced = true; - var node = getDeclarationOfAliasSymbol(symbol); - if (node.kind === 217 /* ExportAssignment */) { - // export default - checkExpressionCached(node.expression); - } - else if (node.kind === 220 /* ExportSpecifier */) { - // export { } or export { as foo } - checkExpressionCached(node.propertyName || node.name); - } - else if (ts.isInternalModuleImportEqualsDeclaration(node)) { - // import foo = - checkExpressionCached(node.moduleReference); - } - } - } - // This function is only for imports with entity names - function getSymbolOfPartOfRightHandSideOfImportEquals(entityName, importDeclaration) { - if (!importDeclaration) { - importDeclaration = ts.getAncestor(entityName, 211 /* ImportEqualsDeclaration */); - ts.Debug.assert(importDeclaration !== undefined); - } - // There are three things we might try to look for. In the following examples, - // the search term is enclosed in |...|: - // - // import a = |b|; // Namespace - // import a = |b.c|; // Value, type, namespace - // import a = |b.c|.d; // Namespace - if (entityName.kind === 65 /* Identifier */ && ts.isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { - entityName = entityName.parent; - } - // Check for case 1 and 3 in the above example - if (entityName.kind === 65 /* Identifier */ || entityName.parent.kind === 128 /* QualifiedName */) { - return resolveEntityName(entityName, 1536 /* Namespace */); - } - else { - // Case 2 in above example - // entityName.kind could be a QualifiedName or a Missing identifier - ts.Debug.assert(entityName.parent.kind === 211 /* ImportEqualsDeclaration */); - return resolveEntityName(entityName, 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */); - } - } - function getFullyQualifiedName(symbol) { - return symbol.parent ? getFullyQualifiedName(symbol.parent) + "." + symbolToString(symbol) : symbolToString(symbol); - } - // Resolves a qualified name and any involved aliases - function resolveEntityName(name, meaning) { - if (ts.nodeIsMissing(name)) { - return undefined; - } - var symbol; - if (name.kind === 65 /* Identifier */) { - var message = meaning === 1536 /* Namespace */ ? ts.Diagnostics.Cannot_find_namespace_0 : ts.Diagnostics.Cannot_find_name_0; - symbol = resolveName(name, name.text, meaning, message, name); - if (!symbol) { - return undefined; - } - } - else if (name.kind === 128 /* QualifiedName */ || name.kind === 158 /* PropertyAccessExpression */) { - var left = name.kind === 128 /* QualifiedName */ ? name.left : name.expression; - var right = name.kind === 128 /* QualifiedName */ ? name.right : name.name; - var namespace = resolveEntityName(left, 1536 /* Namespace */); - if (!namespace || namespace === unknownSymbol || ts.nodeIsMissing(right)) { - return undefined; - } - symbol = getSymbol(getExportsOfSymbol(namespace), right.text, meaning); - if (!symbol) { - error(right, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(namespace), ts.declarationNameToString(right)); - return undefined; - } - } - else { - ts.Debug.fail("Unknown entity name kind."); - } - ts.Debug.assert((symbol.flags & 16777216 /* Instantiated */) === 0, "Should never get an instantiated symbol here."); - return symbol.flags & meaning ? symbol : resolveAlias(symbol); - } - function isExternalModuleNameRelative(moduleName) { - // TypeScript 1.0 spec (April 2014): 11.2.1 - // An external module name is "relative" if the first term is "." or "..". - return moduleName.substr(0, 2) === "./" || moduleName.substr(0, 3) === "../" || moduleName.substr(0, 2) === ".\\" || moduleName.substr(0, 3) === "..\\"; - } - function resolveExternalModuleName(location, moduleReferenceExpression) { - if (moduleReferenceExpression.kind !== 8 /* StringLiteral */) { - return; - } - var moduleReferenceLiteral = moduleReferenceExpression; - var searchPath = ts.getDirectoryPath(getSourceFile(location).fileName); - // Module names are escaped in our symbol table. However, string literal values aren't. - // Escape the name in the "require(...)" clause to ensure we find the right symbol. - var moduleName = ts.escapeIdentifier(moduleReferenceLiteral.text); - if (!moduleName) - return; - var isRelative = isExternalModuleNameRelative(moduleName); - if (!isRelative) { - var symbol = getSymbol(globals, '"' + moduleName + '"', 512 /* ValueModule */); - if (symbol) { - return symbol; - } - } - var fileName; - var sourceFile; - while (true) { - fileName = ts.normalizePath(ts.combinePaths(searchPath, moduleName)); - sourceFile = ts.forEach(ts.supportedExtensions, function (extension) { return host.getSourceFile(fileName + extension); }); - if (sourceFile || isRelative) { - break; - } - var parentPath = ts.getDirectoryPath(searchPath); - if (parentPath === searchPath) { - break; - } - searchPath = parentPath; - } - if (sourceFile) { - if (sourceFile.symbol) { - return sourceFile.symbol; - } - error(moduleReferenceLiteral, ts.Diagnostics.File_0_is_not_a_module, sourceFile.fileName); - return; - } - error(moduleReferenceLiteral, ts.Diagnostics.Cannot_find_module_0, moduleName); - } - // An external module with an 'export =' declaration resolves to the target of the 'export =' declaration, - // and an external module with no 'export =' declaration resolves to the module itself. - function resolveExternalModuleSymbol(moduleSymbol) { - return moduleSymbol && resolveSymbol(moduleSymbol.exports["export="]) || moduleSymbol; - } - // An external module with an 'export =' declaration may be referenced as an ES6 module provided the 'export =' - // references a symbol that is at least declared as a module or a variable. The target of the 'export =' may - // combine other declarations with the module or variable (e.g. a class/module, function/module, interface/variable). - function resolveESModuleSymbol(moduleSymbol, moduleReferenceExpression) { - var symbol = resolveExternalModuleSymbol(moduleSymbol); - if (symbol && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */))) { - error(moduleReferenceExpression, ts.Diagnostics.Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct, symbolToString(moduleSymbol)); - symbol = undefined; - } - return symbol; - } - function getExportAssignmentSymbol(moduleSymbol) { - return moduleSymbol.exports["export="]; - } - function getExportsOfModuleAsArray(moduleSymbol) { - return symbolsToArray(getExportsOfModule(moduleSymbol)); - } - function getExportsOfSymbol(symbol) { - return symbol.flags & 1536 /* Module */ ? getExportsOfModule(symbol) : symbol.exports || emptySymbols; - } - function getExportsOfModule(moduleSymbol) { - var links = getSymbolLinks(moduleSymbol); - return links.resolvedExports || (links.resolvedExports = getExportsForModule(moduleSymbol)); - } - function extendExportSymbols(target, source) { - for (var id in source) { - if (id !== "default" && !ts.hasProperty(target, id)) { - target[id] = source[id]; - } - } - } - function getExportsForModule(moduleSymbol) { - var result; - var visitedSymbols = []; - visit(moduleSymbol); - return result || moduleSymbol.exports; - // The ES6 spec permits export * declarations in a module to circularly reference the module itself. For example, - // module 'a' can 'export * from "b"' and 'b' can 'export * from "a"' without error. - function visit(symbol) { - if (symbol && symbol.flags & 1952 /* HasExports */ && !ts.contains(visitedSymbols, symbol)) { - visitedSymbols.push(symbol); - if (symbol !== moduleSymbol) { - if (!result) { - result = cloneSymbolTable(moduleSymbol.exports); - } - extendExportSymbols(result, symbol.exports); - } - // All export * declarations are collected in an __export symbol by the binder - var exportStars = symbol.exports["__export"]; - if (exportStars) { - for (var _i = 0, _a = exportStars.declarations; _i < _a.length; _i++) { - var node = _a[_i]; - visit(resolveExternalModuleName(node, node.moduleSpecifier)); - } - } - } - } - } - function getMergedSymbol(symbol) { - var merged; - return symbol && symbol.mergeId && (merged = mergedSymbols[symbol.mergeId]) ? merged : symbol; - } - function getSymbolOfNode(node) { - return getMergedSymbol(node.symbol); - } - function getParentOfSymbol(symbol) { - return getMergedSymbol(symbol.parent); - } - function getExportSymbolOfValueSymbolIfExported(symbol) { - return symbol && (symbol.flags & 1048576 /* ExportValue */) !== 0 - ? getMergedSymbol(symbol.exportSymbol) - : symbol; - } - function symbolIsValue(symbol) { - // If it is an instantiated symbol, then it is a value if the symbol it is an - // instantiation of is a value. - if (symbol.flags & 16777216 /* Instantiated */) { - return symbolIsValue(getSymbolLinks(symbol).target); - } - // If the symbol has the value flag, it is trivially a value. - if (symbol.flags & 107455 /* Value */) { - return true; - } - // If it is an alias, then it is a value if the symbol it resolves to is a value. - if (symbol.flags & 8388608 /* Alias */) { - return (resolveAlias(symbol).flags & 107455 /* Value */) !== 0; - } - return false; - } - function findConstructorDeclaration(node) { - var members = node.members; - for (var _i = 0; _i < members.length; _i++) { - var member = members[_i]; - if (member.kind === 137 /* Constructor */ && ts.nodeIsPresent(member.body)) { - return member; - } - } - } - function createType(flags) { - var result = new Type(checker, flags); - result.id = typeCount++; - return result; - } - function createIntrinsicType(kind, intrinsicName) { - var type = createType(kind); - type.intrinsicName = intrinsicName; - return type; - } - function createObjectType(kind, symbol) { - var type = createType(kind); - type.symbol = symbol; - return type; - } - // A reserved member name starts with two underscores, but the third character cannot be an underscore - // or the @ symbol. A third underscore indicates an escaped form of an identifer that started - // with at least two underscores. The @ character indicates that the name is denoted by a well known ES - // Symbol instance. - function isReservedMemberName(name) { - return name.charCodeAt(0) === 95 /* _ */ && - name.charCodeAt(1) === 95 /* _ */ && - name.charCodeAt(2) !== 95 /* _ */ && - name.charCodeAt(2) !== 64 /* at */; - } - function getNamedMembers(members) { - var result; - for (var id in members) { - if (ts.hasProperty(members, id)) { - if (!isReservedMemberName(id)) { - if (!result) - result = []; - var symbol = members[id]; - if (symbolIsValue(symbol)) { - result.push(symbol); - } - } - } - } - return result || emptyArray; - } - function setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexType, numberIndexType) { - type.members = members; - type.properties = getNamedMembers(members); - type.callSignatures = callSignatures; - type.constructSignatures = constructSignatures; - if (stringIndexType) - type.stringIndexType = stringIndexType; - if (numberIndexType) - type.numberIndexType = numberIndexType; - return type; - } - function createAnonymousType(symbol, members, callSignatures, constructSignatures, stringIndexType, numberIndexType) { - return setObjectTypeMembers(createObjectType(32768 /* Anonymous */, symbol), members, callSignatures, constructSignatures, stringIndexType, numberIndexType); - } - function forEachSymbolTableInScope(enclosingDeclaration, callback) { - var result; - for (var location_1 = enclosingDeclaration; location_1; location_1 = location_1.parent) { - // Locals of a source file are not in scope (because they get merged into the global symbol table) - if (location_1.locals && !isGlobalSourceFile(location_1)) { - if (result = callback(location_1.locals)) { - return result; - } - } - switch (location_1.kind) { - case 230 /* SourceFile */: - if (!ts.isExternalModule(location_1)) { - break; - } - case 208 /* ModuleDeclaration */: - if (result = callback(getSymbolOfNode(location_1).exports)) { - return result; - } - break; - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - if (result = callback(getSymbolOfNode(location_1).members)) { - return result; - } - break; - } - } - return callback(globals); - } - function getQualifiedLeftMeaning(rightMeaning) { - // If we are looking in value space, the parent meaning is value, other wise it is namespace - return rightMeaning === 107455 /* Value */ ? 107455 /* Value */ : 1536 /* Namespace */; - } - function getAccessibleSymbolChain(symbol, enclosingDeclaration, meaning, useOnlyExternalAliasing) { - function getAccessibleSymbolChainFromSymbolTable(symbols) { - function canQualifySymbol(symbolFromSymbolTable, meaning) { - // If the symbol is equivalent and doesn't need further qualification, this symbol is accessible - if (!needsQualification(symbolFromSymbolTable, enclosingDeclaration, meaning)) { - return true; - } - // If symbol needs qualification, make sure that parent is accessible, if it is then this symbol is accessible too - var accessibleParent = getAccessibleSymbolChain(symbolFromSymbolTable.parent, enclosingDeclaration, getQualifiedLeftMeaning(meaning), useOnlyExternalAliasing); - return !!accessibleParent; - } - function isAccessible(symbolFromSymbolTable, resolvedAliasSymbol) { - if (symbol === (resolvedAliasSymbol || symbolFromSymbolTable)) { - // if the symbolFromSymbolTable is not external module (it could be if it was determined as ambient external module and would be in globals table) - // and if symbolfrom symbolTable or alias resolution matches the symbol, - // check the symbol can be qualified, it is only then this symbol is accessible - return !ts.forEach(symbolFromSymbolTable.declarations, hasExternalModuleSymbol) && - canQualifySymbol(symbolFromSymbolTable, meaning); - } - } - // If symbol is directly available by its name in the symbol table - if (isAccessible(ts.lookUp(symbols, symbol.name))) { - return [symbol]; - } - // Check if symbol is any of the alias - return ts.forEachValue(symbols, function (symbolFromSymbolTable) { - if (symbolFromSymbolTable.flags & 8388608 /* Alias */ && symbolFromSymbolTable.name !== "export=") { - if (!useOnlyExternalAliasing || - // Is this external alias, then use it to name - ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) { - var resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable); - if (isAccessible(symbolFromSymbolTable, resolveAlias(symbolFromSymbolTable))) { - return [symbolFromSymbolTable]; - } - // Look in the exported members, if we can find accessibleSymbolChain, symbol is accessible using this chain - // but only if the symbolFromSymbolTable can be qualified - var accessibleSymbolsFromExports = resolvedImportedSymbol.exports ? getAccessibleSymbolChainFromSymbolTable(resolvedImportedSymbol.exports) : undefined; - if (accessibleSymbolsFromExports && canQualifySymbol(symbolFromSymbolTable, getQualifiedLeftMeaning(meaning))) { - return [symbolFromSymbolTable].concat(accessibleSymbolsFromExports); - } - } - } - }); - } - if (symbol) { - return forEachSymbolTableInScope(enclosingDeclaration, getAccessibleSymbolChainFromSymbolTable); - } - } - function needsQualification(symbol, enclosingDeclaration, meaning) { - var qualify = false; - forEachSymbolTableInScope(enclosingDeclaration, function (symbolTable) { - // If symbol of this name is not available in the symbol table we are ok - if (!ts.hasProperty(symbolTable, symbol.name)) { - // Continue to the next symbol table - return false; - } - // If the symbol with this name is present it should refer to the symbol - var symbolFromSymbolTable = symbolTable[symbol.name]; - if (symbolFromSymbolTable === symbol) { - // No need to qualify - return true; - } - // Qualify if the symbol from symbol table has same meaning as expected - symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 /* Alias */) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; - if (symbolFromSymbolTable.flags & meaning) { - qualify = true; - return true; - } - // Continue to the next symbol table - return false; - }); - return qualify; - } - function isSymbolAccessible(symbol, enclosingDeclaration, meaning) { - if (symbol && enclosingDeclaration && !(symbol.flags & 262144 /* TypeParameter */)) { - var initialSymbol = symbol; - var meaningToLook = meaning; - while (symbol) { - // Symbol is accessible if it by itself is accessible - var accessibleSymbolChain = getAccessibleSymbolChain(symbol, enclosingDeclaration, meaningToLook, false); - if (accessibleSymbolChain) { - var hasAccessibleDeclarations = hasVisibleDeclarations(accessibleSymbolChain[0]); - if (!hasAccessibleDeclarations) { - return { - accessibility: 1 /* NotAccessible */, - errorSymbolName: symbolToString(initialSymbol, enclosingDeclaration, meaning), - errorModuleName: symbol !== initialSymbol ? symbolToString(symbol, enclosingDeclaration, 1536 /* Namespace */) : undefined - }; - } - return hasAccessibleDeclarations; - } - // If we haven't got the accessible symbol, it doesn't mean the symbol is actually inaccessible. - // It could be a qualified symbol and hence verify the path - // e.g.: - // module m { - // export class c { - // } - // } - // let x: typeof m.c - // In the above example when we start with checking if typeof m.c symbol is accessible, - // we are going to see if c can be accessed in scope directly. - // But it can't, hence the accessible is going to be undefined, but that doesn't mean m.c is inaccessible - // It is accessible if the parent m is accessible because then m.c can be accessed through qualification - meaningToLook = getQualifiedLeftMeaning(meaning); - symbol = getParentOfSymbol(symbol); - } - // This could be a symbol that is not exported in the external module - // or it could be a symbol from different external module that is not aliased and hence cannot be named - var symbolExternalModule = ts.forEach(initialSymbol.declarations, getExternalModuleContainer); - if (symbolExternalModule) { - var enclosingExternalModule = getExternalModuleContainer(enclosingDeclaration); - if (symbolExternalModule !== enclosingExternalModule) { - // name from different external module that is not visible - return { - accessibility: 2 /* CannotBeNamed */, - errorSymbolName: symbolToString(initialSymbol, enclosingDeclaration, meaning), - errorModuleName: symbolToString(symbolExternalModule) - }; - } - } - // Just a local name that is not accessible - return { - accessibility: 1 /* NotAccessible */, - errorSymbolName: symbolToString(initialSymbol, enclosingDeclaration, meaning) - }; - } - return { accessibility: 0 /* Accessible */ }; - function getExternalModuleContainer(declaration) { - for (; declaration; declaration = declaration.parent) { - if (hasExternalModuleSymbol(declaration)) { - return getSymbolOfNode(declaration); - } - } - } - } - function hasExternalModuleSymbol(declaration) { - return (declaration.kind === 208 /* ModuleDeclaration */ && declaration.name.kind === 8 /* StringLiteral */) || - (declaration.kind === 230 /* SourceFile */ && ts.isExternalModule(declaration)); - } - function hasVisibleDeclarations(symbol) { - var aliasesToMakeVisible; - if (ts.forEach(symbol.declarations, function (declaration) { return !getIsDeclarationVisible(declaration); })) { - return undefined; - } - return { accessibility: 0 /* Accessible */, aliasesToMakeVisible: aliasesToMakeVisible }; - function getIsDeclarationVisible(declaration) { - if (!isDeclarationVisible(declaration)) { - // Mark the unexported alias as visible if its parent is visible - // because these kind of aliases can be used to name types in declaration file - var anyImportSyntax = getAnyImportSyntax(declaration); - if (anyImportSyntax && - !(anyImportSyntax.flags & 1 /* Export */) && - isDeclarationVisible(anyImportSyntax.parent)) { - getNodeLinks(declaration).isVisible = true; - if (aliasesToMakeVisible) { - if (!ts.contains(aliasesToMakeVisible, anyImportSyntax)) { - aliasesToMakeVisible.push(anyImportSyntax); - } - } - else { - aliasesToMakeVisible = [anyImportSyntax]; - } - return true; - } - // Declaration is not visible - return false; - } - return true; - } - } - function isEntityNameVisible(entityName, enclosingDeclaration) { - // get symbol of the first identifier of the entityName - var meaning; - if (entityName.parent.kind === 147 /* TypeQuery */) { - // Typeof value - meaning = 107455 /* Value */ | 1048576 /* ExportValue */; - } - else if (entityName.kind === 128 /* QualifiedName */ || entityName.kind === 158 /* PropertyAccessExpression */ || - entityName.parent.kind === 211 /* ImportEqualsDeclaration */) { - // Left identifier from type reference or TypeAlias - // Entity name of the import declaration - meaning = 1536 /* Namespace */; - } - else { - // Type Reference or TypeAlias entity = Identifier - meaning = 793056 /* Type */; - } - var firstIdentifier = getFirstIdentifier(entityName); - var symbol = resolveName(enclosingDeclaration, firstIdentifier.text, meaning, undefined, undefined); - // Verify if the symbol is accessible - return (symbol && hasVisibleDeclarations(symbol)) || { - accessibility: 1 /* NotAccessible */, - errorSymbolName: ts.getTextOfNode(firstIdentifier), - errorNode: firstIdentifier - }; - } - function writeKeyword(writer, kind) { - writer.writeKeyword(ts.tokenToString(kind)); - } - function writePunctuation(writer, kind) { - writer.writePunctuation(ts.tokenToString(kind)); - } - function writeSpace(writer) { - writer.writeSpace(" "); - } - function symbolToString(symbol, enclosingDeclaration, meaning) { - var writer = ts.getSingleLineStringWriter(); - getSymbolDisplayBuilder().buildSymbolDisplay(symbol, writer, enclosingDeclaration, meaning); - var result = writer.string(); - ts.releaseStringWriter(writer); - return result; - } - function signatureToString(signature, enclosingDeclaration, flags) { - var writer = ts.getSingleLineStringWriter(); - getSymbolDisplayBuilder().buildSignatureDisplay(signature, writer, enclosingDeclaration, flags); - var result = writer.string(); - ts.releaseStringWriter(writer); - return result; - } - function typeToString(type, enclosingDeclaration, flags) { - var writer = ts.getSingleLineStringWriter(); - getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags); - var result = writer.string(); - ts.releaseStringWriter(writer); - var maxLength = compilerOptions.noErrorTruncation || flags & 4 /* NoTruncation */ ? undefined : 100; - if (maxLength && result.length >= maxLength) { - result = result.substr(0, maxLength - "...".length) + "..."; - } - return result; - } - function getTypeAliasForTypeLiteral(type) { - if (type.symbol && type.symbol.flags & 2048 /* TypeLiteral */) { - var node = type.symbol.declarations[0].parent; - while (node.kind === 152 /* ParenthesizedType */) { - node = node.parent; - } - if (node.kind === 206 /* TypeAliasDeclaration */) { - return getSymbolOfNode(node); - } - } - return undefined; - } - // This is for caching the result of getSymbolDisplayBuilder. Do not access directly. - var _displayBuilder; - function getSymbolDisplayBuilder() { - /** - * Writes only the name of the symbol out to the writer. Uses the original source text - * for the name of the symbol if it is available to match how the user inputted the name. - */ - function appendSymbolNameOnly(symbol, writer) { - if (symbol.declarations && symbol.declarations.length > 0) { - var declaration = symbol.declarations[0]; - if (declaration.name) { - writer.writeSymbol(ts.declarationNameToString(declaration.name), symbol); - return; - } - } - writer.writeSymbol(symbol.name, symbol); - } - /** - * Enclosing declaration is optional when we don't want to get qualified name in the enclosing declaration scope - * Meaning needs to be specified if the enclosing declaration is given - */ - function buildSymbolDisplay(symbol, writer, enclosingDeclaration, meaning, flags, typeFlags) { - var parentSymbol; - function appendParentTypeArgumentsAndSymbolName(symbol) { - if (parentSymbol) { - // Write type arguments of instantiated class/interface here - if (flags & 1 /* WriteTypeParametersOrArguments */) { - if (symbol.flags & 16777216 /* Instantiated */) { - buildDisplayForTypeArgumentsAndDelimiters(getTypeParametersOfClassOrInterface(parentSymbol), symbol.mapper, writer, enclosingDeclaration); - } - else { - buildTypeParameterDisplayFromSymbol(parentSymbol, writer, enclosingDeclaration); - } - } - writePunctuation(writer, 20 /* DotToken */); - } - parentSymbol = symbol; - appendSymbolNameOnly(symbol, writer); - } - // Let the writer know we just wrote out a symbol. The declaration emitter writer uses - // this to determine if an import it has previously seen (and not written out) needs - // to be written to the file once the walk of the tree is complete. - // - // NOTE(cyrusn): This approach feels somewhat unfortunate. A simple pass over the tree - // up front (for example, during checking) could determine if we need to emit the imports - // and we could then access that data during declaration emit. - writer.trackSymbol(symbol, enclosingDeclaration, meaning); - function walkSymbol(symbol, meaning) { - if (symbol) { - var accessibleSymbolChain = getAccessibleSymbolChain(symbol, enclosingDeclaration, meaning, !!(flags & 2 /* UseOnlyExternalAliasing */)); - if (!accessibleSymbolChain || - needsQualification(accessibleSymbolChain[0], enclosingDeclaration, accessibleSymbolChain.length === 1 ? meaning : getQualifiedLeftMeaning(meaning))) { - // Go up and add our parent. - walkSymbol(getParentOfSymbol(accessibleSymbolChain ? accessibleSymbolChain[0] : symbol), getQualifiedLeftMeaning(meaning)); - } - if (accessibleSymbolChain) { - for (var _i = 0; _i < accessibleSymbolChain.length; _i++) { - var accessibleSymbol = accessibleSymbolChain[_i]; - appendParentTypeArgumentsAndSymbolName(accessibleSymbol); - } - } - else { - // If we didn't find accessible symbol chain for this symbol, break if this is external module - if (!parentSymbol && ts.forEach(symbol.declarations, hasExternalModuleSymbol)) { - return; - } - // if this is anonymous type break - if (symbol.flags & 2048 /* TypeLiteral */ || symbol.flags & 4096 /* ObjectLiteral */) { - return; - } - appendParentTypeArgumentsAndSymbolName(symbol); - } - } - } - // Get qualified name if the symbol is not a type parameter - // and there is an enclosing declaration or we specifically - // asked for it - var isTypeParameter = symbol.flags & 262144 /* TypeParameter */; - var typeFormatFlag = 128 /* UseFullyQualifiedType */ & typeFlags; - if (!isTypeParameter && (enclosingDeclaration || typeFormatFlag)) { - walkSymbol(symbol, meaning); - return; - } - return appendParentTypeArgumentsAndSymbolName(symbol); - } - function buildTypeDisplay(type, writer, enclosingDeclaration, globalFlags, symbolStack) { - var globalFlagsToPass = globalFlags & 16 /* WriteOwnNameForAnyLike */; - return writeType(type, globalFlags); - function writeType(type, flags) { - // Write undefined/null type as any - if (type.flags & 2097279 /* Intrinsic */) { - // Special handling for unknown / resolving types, they should show up as any and not unknown or __resolving - writer.writeKeyword(!(globalFlags & 16 /* WriteOwnNameForAnyLike */) && isTypeAny(type) - ? "any" - : type.intrinsicName); - } - else if (type.flags & 4096 /* Reference */) { - writeTypeReference(type, flags); - } - else if (type.flags & (1024 /* Class */ | 2048 /* Interface */ | 128 /* Enum */ | 512 /* TypeParameter */)) { - // The specified symbol flags need to be reinterpreted as type flags - buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, 793056 /* Type */, 0 /* None */, flags); - } - else if (type.flags & 8192 /* Tuple */) { - writeTupleType(type); - } - else if (type.flags & 16384 /* Union */) { - writeUnionType(type, flags); - } - else if (type.flags & 32768 /* Anonymous */) { - writeAnonymousType(type, flags); - } - else if (type.flags & 256 /* StringLiteral */) { - writer.writeStringLiteral(type.text); - } - else { - // Should never get here - // { ... } - writePunctuation(writer, 14 /* OpenBraceToken */); - writeSpace(writer); - writePunctuation(writer, 21 /* DotDotDotToken */); - writeSpace(writer); - writePunctuation(writer, 15 /* CloseBraceToken */); - } - } - function writeTypeList(types, union) { - for (var i = 0; i < types.length; i++) { - if (i > 0) { - if (union) { - writeSpace(writer); - } - writePunctuation(writer, union ? 44 /* BarToken */ : 23 /* CommaToken */); - writeSpace(writer); - } - writeType(types[i], union ? 64 /* InElementType */ : 0 /* None */); - } - } - function writeSymbolTypeReference(symbol, typeArguments, pos, end) { - // Unnamed function expressions, arrow functions, and unnamed class expressions have reserved names that - // we don't want to display - if (!isReservedMemberName(symbol.name)) { - buildSymbolDisplay(symbol, writer, enclosingDeclaration, 793056 /* Type */); - } - if (pos < end) { - writePunctuation(writer, 24 /* LessThanToken */); - writeType(typeArguments[pos++], 0 /* None */); - while (pos < end) { - writePunctuation(writer, 23 /* CommaToken */); - writeSpace(writer); - writeType(typeArguments[pos++], 0 /* None */); - } - writePunctuation(writer, 25 /* GreaterThanToken */); - } - } - function writeTypeReference(type, flags) { - var typeArguments = type.typeArguments; - if (type.target === globalArrayType && !(flags & 1 /* WriteArrayAsGenericType */)) { - writeType(typeArguments[0], 64 /* InElementType */); - writePunctuation(writer, 18 /* OpenBracketToken */); - writePunctuation(writer, 19 /* CloseBracketToken */); - } - else { - // Write the type reference in the format f.g.C where A and B are type arguments - // for outer type parameters, and f and g are the respective declaring containers of those - // type parameters. - var outerTypeParameters = type.target.outerTypeParameters; - var i = 0; - if (outerTypeParameters) { - var length_1 = outerTypeParameters.length; - while (i < length_1) { - // Find group of type arguments for type parameters with the same declaring container. - var start = i; - var parent_3 = getParentSymbolOfTypeParameter(outerTypeParameters[i]); - do { - i++; - } while (i < length_1 && getParentSymbolOfTypeParameter(outerTypeParameters[i]) === parent_3); - // When type parameters are their own type arguments for the whole group (i.e. we have - // the default outer type arguments), we don't show the group. - if (!ts.rangeEquals(outerTypeParameters, typeArguments, start, i)) { - writeSymbolTypeReference(parent_3, typeArguments, start, i); - writePunctuation(writer, 20 /* DotToken */); - } - } - } - writeSymbolTypeReference(type.symbol, typeArguments, i, typeArguments.length); - } - } - function writeTupleType(type) { - writePunctuation(writer, 18 /* OpenBracketToken */); - writeTypeList(type.elementTypes, false); - writePunctuation(writer, 19 /* CloseBracketToken */); - } - function writeUnionType(type, flags) { - if (flags & 64 /* InElementType */) { - writePunctuation(writer, 16 /* OpenParenToken */); - } - writeTypeList(type.types, true); - if (flags & 64 /* InElementType */) { - writePunctuation(writer, 17 /* CloseParenToken */); - } - } - function writeAnonymousType(type, flags) { - var symbol = type.symbol; - if (symbol) { - // Always use 'typeof T' for type of class, enum, and module objects - if (symbol.flags & (32 /* Class */ | 384 /* Enum */ | 512 /* ValueModule */)) { - writeTypeofSymbol(type, flags); - } - else if (shouldWriteTypeOfFunctionSymbol()) { - writeTypeofSymbol(type, flags); - } - else if (ts.contains(symbolStack, symbol)) { - // If type is an anonymous type literal in a type alias declaration, use type alias name - var typeAlias = getTypeAliasForTypeLiteral(type); - if (typeAlias) { - // The specified symbol flags need to be reinterpreted as type flags - buildSymbolDisplay(typeAlias, writer, enclosingDeclaration, 793056 /* Type */, 0 /* None */, flags); - } - else { - // Recursive usage, use any - writeKeyword(writer, 112 /* AnyKeyword */); - } - } - else { - // Since instantiations of the same anonymous type have the same symbol, tracking symbols instead - // of types allows us to catch circular references to instantiations of the same anonymous type - if (!symbolStack) { - symbolStack = []; - } - symbolStack.push(symbol); - writeLiteralType(type, flags); - symbolStack.pop(); - } - } - else { - // Anonymous types with no symbol are never circular - writeLiteralType(type, flags); - } - function shouldWriteTypeOfFunctionSymbol() { - var isStaticMethodSymbol = !!(symbol.flags & 8192 /* Method */ && - ts.forEach(symbol.declarations, function (declaration) { return declaration.flags & 128 /* Static */; })); - var isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && - (symbol.parent || - ts.forEach(symbol.declarations, function (declaration) { - return declaration.parent.kind === 230 /* SourceFile */ || declaration.parent.kind === 209 /* ModuleBlock */; - })); - if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { - // typeof is allowed only for static/non local functions - return !!(flags & 2 /* UseTypeOfFunction */) || - (ts.contains(symbolStack, symbol)); // it is type of the symbol uses itself recursively - } - } - } - function writeTypeofSymbol(type, typeFormatFlags) { - writeKeyword(writer, 97 /* TypeOfKeyword */); - writeSpace(writer); - buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, 107455 /* Value */, 0 /* None */, typeFormatFlags); - } - function getIndexerParameterName(type, indexKind, fallbackName) { - var declaration = getIndexDeclarationOfSymbol(type.symbol, indexKind); - if (!declaration) { - // declaration might not be found if indexer was added from the contextual type. - // in this case use fallback name - return fallbackName; - } - ts.Debug.assert(declaration.parameters.length !== 0); - return ts.declarationNameToString(declaration.parameters[0].name); - } - function writeLiteralType(type, flags) { - var resolved = resolveObjectOrUnionTypeMembers(type); - if (!resolved.properties.length && !resolved.stringIndexType && !resolved.numberIndexType) { - if (!resolved.callSignatures.length && !resolved.constructSignatures.length) { - writePunctuation(writer, 14 /* OpenBraceToken */); - writePunctuation(writer, 15 /* CloseBraceToken */); - return; - } - if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) { - if (flags & 64 /* InElementType */) { - writePunctuation(writer, 16 /* OpenParenToken */); - } - buildSignatureDisplay(resolved.callSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 8 /* WriteArrowStyleSignature */, symbolStack); - if (flags & 64 /* InElementType */) { - writePunctuation(writer, 17 /* CloseParenToken */); - } - return; - } - if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) { - if (flags & 64 /* InElementType */) { - writePunctuation(writer, 16 /* OpenParenToken */); - } - writeKeyword(writer, 88 /* NewKeyword */); - writeSpace(writer); - buildSignatureDisplay(resolved.constructSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 8 /* WriteArrowStyleSignature */, symbolStack); - if (flags & 64 /* InElementType */) { - writePunctuation(writer, 17 /* CloseParenToken */); - } - return; - } - } - writePunctuation(writer, 14 /* OpenBraceToken */); - writer.writeLine(); - writer.increaseIndent(); - for (var _i = 0, _a = resolved.callSignatures; _i < _a.length; _i++) { - var signature = _a[_i]; - buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, symbolStack); - writePunctuation(writer, 22 /* SemicolonToken */); - writer.writeLine(); - } - for (var _b = 0, _c = resolved.constructSignatures; _b < _c.length; _b++) { - var signature = _c[_b]; - writeKeyword(writer, 88 /* NewKeyword */); - writeSpace(writer); - buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, symbolStack); - writePunctuation(writer, 22 /* SemicolonToken */); - writer.writeLine(); - } - if (resolved.stringIndexType) { - // [x: string]: - writePunctuation(writer, 18 /* OpenBracketToken */); - writer.writeParameter(getIndexerParameterName(resolved, 0 /* String */, "x")); - writePunctuation(writer, 51 /* ColonToken */); - writeSpace(writer); - writeKeyword(writer, 123 /* StringKeyword */); - writePunctuation(writer, 19 /* CloseBracketToken */); - writePunctuation(writer, 51 /* ColonToken */); - writeSpace(writer); - writeType(resolved.stringIndexType, 0 /* None */); - writePunctuation(writer, 22 /* SemicolonToken */); - writer.writeLine(); - } - if (resolved.numberIndexType) { - // [x: number]: - writePunctuation(writer, 18 /* OpenBracketToken */); - writer.writeParameter(getIndexerParameterName(resolved, 1 /* Number */, "x")); - writePunctuation(writer, 51 /* ColonToken */); - writeSpace(writer); - writeKeyword(writer, 121 /* NumberKeyword */); - writePunctuation(writer, 19 /* CloseBracketToken */); - writePunctuation(writer, 51 /* ColonToken */); - writeSpace(writer); - writeType(resolved.numberIndexType, 0 /* None */); - writePunctuation(writer, 22 /* SemicolonToken */); - writer.writeLine(); - } - for (var _d = 0, _e = resolved.properties; _d < _e.length; _d++) { - var p = _e[_d]; - var t = getTypeOfSymbol(p); - if (p.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(t).length) { - var signatures = getSignaturesOfType(t, 0 /* Call */); - for (var _f = 0; _f < signatures.length; _f++) { - var signature = signatures[_f]; - buildSymbolDisplay(p, writer); - if (p.flags & 536870912 /* Optional */) { - writePunctuation(writer, 50 /* QuestionToken */); - } - buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, symbolStack); - writePunctuation(writer, 22 /* SemicolonToken */); - writer.writeLine(); - } - } - else { - buildSymbolDisplay(p, writer); - if (p.flags & 536870912 /* Optional */) { - writePunctuation(writer, 50 /* QuestionToken */); - } - writePunctuation(writer, 51 /* ColonToken */); - writeSpace(writer); - writeType(t, 0 /* None */); - writePunctuation(writer, 22 /* SemicolonToken */); - writer.writeLine(); - } - } - writer.decreaseIndent(); - writePunctuation(writer, 15 /* CloseBraceToken */); - } - } - function buildTypeParameterDisplayFromSymbol(symbol, writer, enclosingDeclaraiton, flags) { - var targetSymbol = getTargetSymbol(symbol); - if (targetSymbol.flags & 32 /* Class */ || targetSymbol.flags & 64 /* Interface */) { - buildDisplayForTypeParametersAndDelimiters(getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol), writer, enclosingDeclaraiton, flags); - } - } - function buildTypeParameterDisplay(tp, writer, enclosingDeclaration, flags, symbolStack) { - appendSymbolNameOnly(tp.symbol, writer); - var constraint = getConstraintOfTypeParameter(tp); - if (constraint) { - writeSpace(writer); - writeKeyword(writer, 79 /* ExtendsKeyword */); - writeSpace(writer); - buildTypeDisplay(constraint, writer, enclosingDeclaration, flags, symbolStack); - } - } - function buildParameterDisplay(p, writer, enclosingDeclaration, flags, symbolStack) { - var parameterNode = p.valueDeclaration; - if (ts.isRestParameter(parameterNode)) { - writePunctuation(writer, 21 /* DotDotDotToken */); - } - appendSymbolNameOnly(p, writer); - if (isOptionalParameter(parameterNode)) { - writePunctuation(writer, 50 /* QuestionToken */); - } - writePunctuation(writer, 51 /* ColonToken */); - writeSpace(writer); - buildTypeDisplay(getTypeOfSymbol(p), writer, enclosingDeclaration, flags, symbolStack); - } - function buildDisplayForTypeParametersAndDelimiters(typeParameters, writer, enclosingDeclaration, flags, symbolStack) { - if (typeParameters && typeParameters.length) { - writePunctuation(writer, 24 /* LessThanToken */); - for (var i = 0; i < typeParameters.length; i++) { - if (i > 0) { - writePunctuation(writer, 23 /* CommaToken */); - writeSpace(writer); - } - buildTypeParameterDisplay(typeParameters[i], writer, enclosingDeclaration, flags, symbolStack); - } - writePunctuation(writer, 25 /* GreaterThanToken */); - } - } - function buildDisplayForTypeArgumentsAndDelimiters(typeParameters, mapper, writer, enclosingDeclaration, flags, symbolStack) { - if (typeParameters && typeParameters.length) { - writePunctuation(writer, 24 /* LessThanToken */); - for (var i = 0; i < typeParameters.length; i++) { - if (i > 0) { - writePunctuation(writer, 23 /* CommaToken */); - writeSpace(writer); - } - buildTypeDisplay(mapper(typeParameters[i]), writer, enclosingDeclaration, 0 /* None */); - } - writePunctuation(writer, 25 /* GreaterThanToken */); - } - } - function buildDisplayForParametersAndDelimiters(parameters, writer, enclosingDeclaration, flags, symbolStack) { - writePunctuation(writer, 16 /* OpenParenToken */); - for (var i = 0; i < parameters.length; i++) { - if (i > 0) { - writePunctuation(writer, 23 /* CommaToken */); - writeSpace(writer); - } - buildParameterDisplay(parameters[i], writer, enclosingDeclaration, flags, symbolStack); - } - writePunctuation(writer, 17 /* CloseParenToken */); - } - function buildReturnTypeDisplay(signature, writer, enclosingDeclaration, flags, symbolStack) { - if (flags & 8 /* WriteArrowStyleSignature */) { - writeSpace(writer); - writePunctuation(writer, 32 /* EqualsGreaterThanToken */); - } - else { - writePunctuation(writer, 51 /* ColonToken */); - } - writeSpace(writer); - buildTypeDisplay(getReturnTypeOfSignature(signature), writer, enclosingDeclaration, flags, symbolStack); - } - function buildSignatureDisplay(signature, writer, enclosingDeclaration, flags, symbolStack) { - if (signature.target && (flags & 32 /* WriteTypeArgumentsOfSignature */)) { - // Instantiated signature, write type arguments instead - // This is achieved by passing in the mapper separately - buildDisplayForTypeArgumentsAndDelimiters(signature.target.typeParameters, signature.mapper, writer, enclosingDeclaration); - } - else { - buildDisplayForTypeParametersAndDelimiters(signature.typeParameters, writer, enclosingDeclaration, flags, symbolStack); - } - buildDisplayForParametersAndDelimiters(signature.parameters, writer, enclosingDeclaration, flags, symbolStack); - buildReturnTypeDisplay(signature, writer, enclosingDeclaration, flags, symbolStack); - } - return _displayBuilder || (_displayBuilder = { - symbolToString: symbolToString, - typeToString: typeToString, - buildSymbolDisplay: buildSymbolDisplay, - buildTypeDisplay: buildTypeDisplay, - buildTypeParameterDisplay: buildTypeParameterDisplay, - buildParameterDisplay: buildParameterDisplay, - buildDisplayForParametersAndDelimiters: buildDisplayForParametersAndDelimiters, - buildDisplayForTypeParametersAndDelimiters: buildDisplayForTypeParametersAndDelimiters, - buildDisplayForTypeArgumentsAndDelimiters: buildDisplayForTypeArgumentsAndDelimiters, - buildTypeParameterDisplayFromSymbol: buildTypeParameterDisplayFromSymbol, - buildSignatureDisplay: buildSignatureDisplay, - buildReturnTypeDisplay: buildReturnTypeDisplay - }); - } - function isDeclarationVisible(node) { - function getContainingExternalModule(node) { - for (; node; node = node.parent) { - if (node.kind === 208 /* ModuleDeclaration */) { - if (node.name.kind === 8 /* StringLiteral */) { - return node; - } - } - else if (node.kind === 230 /* SourceFile */) { - return ts.isExternalModule(node) ? node : undefined; - } - } - ts.Debug.fail("getContainingModule cant reach here"); - } - function isUsedInExportAssignment(node) { - // Get source File and see if it is external module and has export assigned symbol - var externalModule = getContainingExternalModule(node); - var exportAssignmentSymbol; - var resolvedExportSymbol; - if (externalModule) { - // This is export assigned symbol node - var externalModuleSymbol = getSymbolOfNode(externalModule); - exportAssignmentSymbol = getExportAssignmentSymbol(externalModuleSymbol); - var symbolOfNode = getSymbolOfNode(node); - if (isSymbolUsedInExportAssignment(symbolOfNode)) { - return true; - } - // if symbolOfNode is alias declaration, resolve the symbol declaration and check - if (symbolOfNode.flags & 8388608 /* Alias */) { - return isSymbolUsedInExportAssignment(resolveAlias(symbolOfNode)); - } - } - // Check if the symbol is used in export assignment - function isSymbolUsedInExportAssignment(symbol) { - if (exportAssignmentSymbol === symbol) { - return true; - } - if (exportAssignmentSymbol && !!(exportAssignmentSymbol.flags & 8388608 /* Alias */)) { - // if export assigned symbol is alias declaration, resolve the alias - resolvedExportSymbol = resolvedExportSymbol || resolveAlias(exportAssignmentSymbol); - if (resolvedExportSymbol === symbol) { - return true; - } - // Container of resolvedExportSymbol is visible - return ts.forEach(resolvedExportSymbol.declarations, function (current) { - while (current) { - if (current === node) { - return true; - } - current = current.parent; - } - }); - } - } - } - function determineIfDeclarationIsVisible() { - switch (node.kind) { - case 155 /* BindingElement */: - return isDeclarationVisible(node.parent.parent); - case 201 /* VariableDeclaration */: - if (ts.isBindingPattern(node.name) && - !node.name.elements.length) { - // If the binding pattern is empty, this variable declaration is not visible - return false; - } - // Otherwise fall through - case 208 /* ModuleDeclaration */: - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - case 206 /* TypeAliasDeclaration */: - case 203 /* FunctionDeclaration */: - case 207 /* EnumDeclaration */: - case 211 /* ImportEqualsDeclaration */: - var parent_4 = getDeclarationContainer(node); - // If the node is not exported or it is not ambient module element (except import declaration) - if (!(ts.getCombinedNodeFlags(node) & 1 /* Export */) && - !(node.kind !== 211 /* ImportEqualsDeclaration */ && parent_4.kind !== 230 /* SourceFile */ && ts.isInAmbientContext(parent_4))) { - return isGlobalSourceFile(parent_4); - } - // Exported members/ambient module elements (exception import declaration) are visible if parent is visible - return isDeclarationVisible(parent_4); - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - if (node.flags & (32 /* Private */ | 64 /* Protected */)) { - // Private/protected properties/methods are not visible - return false; - } - // Public properties/methods are visible if its parents are visible, so let it fall into next case statement - case 137 /* Constructor */: - case 141 /* ConstructSignature */: - case 140 /* CallSignature */: - case 142 /* IndexSignature */: - case 131 /* Parameter */: - case 209 /* ModuleBlock */: - case 145 /* FunctionType */: - case 146 /* ConstructorType */: - case 148 /* TypeLiteral */: - case 144 /* TypeReference */: - case 149 /* ArrayType */: - case 150 /* TupleType */: - case 151 /* UnionType */: - case 152 /* ParenthesizedType */: - return isDeclarationVisible(node.parent); - // Default binding, import specifier and namespace import is visible - // only on demand so by default it is not visible - case 213 /* ImportClause */: - case 214 /* NamespaceImport */: - case 216 /* ImportSpecifier */: - return false; - // Type parameters are always visible - case 130 /* TypeParameter */: - // Source file is always visible - case 230 /* SourceFile */: - return true; - // Export assignements do not create name bindings outside the module - case 217 /* ExportAssignment */: - return false; - default: - ts.Debug.fail("isDeclarationVisible unknown: SyntaxKind: " + node.kind); - } - } - if (node) { - var links = getNodeLinks(node); - if (links.isVisible === undefined) { - links.isVisible = !!determineIfDeclarationIsVisible(); - } - return links.isVisible; - } - } - function collectLinkedAliases(node) { - var exportSymbol; - if (node.parent && node.parent.kind === 217 /* ExportAssignment */) { - exportSymbol = resolveName(node.parent, node.text, 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */, ts.Diagnostics.Cannot_find_name_0, node); - } - else if (node.parent.kind === 220 /* ExportSpecifier */) { - exportSymbol = getTargetOfExportSpecifier(node.parent); - } - var result = []; - if (exportSymbol) { - buildVisibleNodeList(exportSymbol.declarations); - } - return result; - function buildVisibleNodeList(declarations) { - ts.forEach(declarations, function (declaration) { - getNodeLinks(declaration).isVisible = true; - var resultNode = getAnyImportSyntax(declaration) || declaration; - if (!ts.contains(result, resultNode)) { - result.push(resultNode); - } - if (ts.isInternalModuleImportEqualsDeclaration(declaration)) { - // Add the referenced top container visible - var internalModuleReference = declaration.moduleReference; - var firstIdentifier = getFirstIdentifier(internalModuleReference); - var importSymbol = resolveName(declaration, firstIdentifier.text, 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */, ts.Diagnostics.Cannot_find_name_0, firstIdentifier); - buildVisibleNodeList(importSymbol.declarations); - } - }); - } - } - // Push an entry on the type resolution stack. If an entry with the given target is not already on the stack, - // a new entry with that target and an associated result value of true is pushed on the stack, and the value - // true is returned. Otherwise, a circularity has occurred and the result values of the existing entry and - // all entries pushed after it are changed to false, and the value false is returned. The target object provides - // a unique identity for a particular type resolution result: Symbol instances are used to track resolution of - // SymbolLinks.type, SymbolLinks instances are used to track resolution of SymbolLinks.declaredType, and - // Signature instances are used to track resolution of Signature.resolvedReturnType. - function pushTypeResolution(target) { - var i = 0; - var count = resolutionTargets.length; - while (i < count && resolutionTargets[i] !== target) { - i++; - } - if (i < count) { - do { - resolutionResults[i++] = false; - } while (i < count); - return false; - } - resolutionTargets.push(target); - resolutionResults.push(true); - return true; - } - // Pop an entry from the type resolution stack and return its associated result value. The result value will - // be true if no circularities were detected, or false if a circularity was found. - function popTypeResolution() { - resolutionTargets.pop(); - return resolutionResults.pop(); - } - function getDeclarationContainer(node) { - node = ts.getRootDeclaration(node); - // Parent chain: - // VaribleDeclaration -> VariableDeclarationList -> VariableStatement -> 'Declaration Container' - return node.kind === 201 /* VariableDeclaration */ ? node.parent.parent.parent : node.parent; - } - function getTypeOfPrototypeProperty(prototype) { - // TypeScript 1.0 spec (April 2014): 8.4 - // Every class automatically contains a static property member named 'prototype', - // the type of which is an instantiation of the class type with type Any supplied as a type argument for each type parameter. - // It is an error to explicitly declare a static property member with the name 'prototype'. - var classType = getDeclaredTypeOfSymbol(prototype.parent); - return classType.typeParameters ? createTypeReference(classType, ts.map(classType.typeParameters, function (_) { return anyType; })) : classType; - } - // Return the type of the given property in the given type, or undefined if no such property exists - function getTypeOfPropertyOfType(type, name) { - var prop = getPropertyOfType(type, name); - return prop ? getTypeOfSymbol(prop) : undefined; - } - function isTypeAny(type) { - return type && (type.flags & 1 /* Any */) !== 0; - } - // Return the inferred type for a binding element - function getTypeForBindingElement(declaration) { - var pattern = declaration.parent; - var parentType = getTypeForVariableLikeDeclaration(pattern.parent); - // If parent has the unknown (error) type, then so does this binding element - if (parentType === unknownType) { - return unknownType; - } - // If no type was specified or inferred for parent, or if the specified or inferred type is any, - // infer from the initializer of the binding element if one is present. Otherwise, go with the - // undefined or any type of the parent. - if (!parentType || isTypeAny(parentType)) { - if (declaration.initializer) { - return checkExpressionCached(declaration.initializer); - } - return parentType; - } - var type; - if (pattern.kind === 153 /* ObjectBindingPattern */) { - // Use explicitly specified property name ({ p: xxx } form), or otherwise the implied name ({ p } form) - var name_9 = declaration.propertyName || declaration.name; - // Use type of the specified property, or otherwise, for a numeric name, the type of the numeric index signature, - // or otherwise the type of the string index signature. - type = getTypeOfPropertyOfType(parentType, name_9.text) || - isNumericLiteralName(name_9.text) && getIndexTypeOfType(parentType, 1 /* Number */) || - getIndexTypeOfType(parentType, 0 /* String */); - if (!type) { - error(name_9, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(parentType), ts.declarationNameToString(name_9)); - return unknownType; - } - } - else { - // This elementType will be used if the specific property corresponding to this index is not - // present (aka the tuple element property). This call also checks that the parentType is in - // fact an iterable or array (depending on target language). - var elementType = checkIteratedTypeOrElementType(parentType, pattern, false); - if (!declaration.dotDotDotToken) { - if (isTypeAny(elementType)) { - return elementType; - } - // Use specific property type when parent is a tuple or numeric index type when parent is an array - var propName = "" + ts.indexOf(pattern.elements, declaration); - type = isTupleLikeType(parentType) - ? getTypeOfPropertyOfType(parentType, propName) - : elementType; - if (!type) { - if (isTupleType(parentType)) { - error(declaration, ts.Diagnostics.Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2, typeToString(parentType), parentType.elementTypes.length, pattern.elements.length); - } - else { - error(declaration, ts.Diagnostics.Type_0_has_no_property_1, typeToString(parentType), propName); - } - return unknownType; - } - } - else { - // Rest element has an array type with the same element type as the parent type - type = createArrayType(elementType); - } - } - return type; - } - // Return the inferred type for a variable, parameter, or property declaration - function getTypeForVariableLikeDeclaration(declaration) { - // A variable declared in a for..in statement is always of type any - if (declaration.parent.parent.kind === 190 /* ForInStatement */) { - return anyType; - } - if (declaration.parent.parent.kind === 191 /* ForOfStatement */) { - // checkRightHandSideOfForOf will return undefined if the for-of expression type was - // missing properties/signatures required to get its iteratedType (like - // [Symbol.iterator] or next). This may be because we accessed properties from anyType, - // or it may have led to an error inside getElementTypeOfIterable. - return checkRightHandSideOfForOf(declaration.parent.parent.expression) || anyType; - } - if (ts.isBindingPattern(declaration.parent)) { - return getTypeForBindingElement(declaration); - } - // Use type from type annotation if one is present - if (declaration.type) { - return getTypeFromTypeNode(declaration.type); - } - if (declaration.kind === 131 /* Parameter */) { - var func = declaration.parent; - // For a parameter of a set accessor, use the type of the get accessor if one is present - if (func.kind === 139 /* SetAccessor */ && !ts.hasDynamicName(func)) { - var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 138 /* GetAccessor */); - if (getter) { - return getReturnTypeOfSignature(getSignatureFromDeclaration(getter)); - } - } - // Use contextual parameter type if one is available - var type = getContextuallyTypedParameterType(declaration); - if (type) { - return type; - } - } - // Use the type of the initializer expression if one is present - if (declaration.initializer) { - return checkExpressionCached(declaration.initializer); - } - // If it is a short-hand property assignment, use the type of the identifier - if (declaration.kind === 228 /* ShorthandPropertyAssignment */) { - return checkIdentifier(declaration.name); - } - // No type specified and nothing can be inferred - return undefined; - } - // Return the type implied by a binding pattern element. This is the type of the initializer of the element if - // one is present. Otherwise, if the element is itself a binding pattern, it is the type implied by the binding - // pattern. Otherwise, it is the type any. - function getTypeFromBindingElement(element) { - if (element.initializer) { - return getWidenedType(checkExpressionCached(element.initializer)); - } - if (ts.isBindingPattern(element.name)) { - return getTypeFromBindingPattern(element.name); - } - return anyType; - } - // Return the type implied by an object binding pattern - function getTypeFromObjectBindingPattern(pattern) { - var members = {}; - ts.forEach(pattern.elements, function (e) { - var flags = 4 /* Property */ | 67108864 /* Transient */ | (e.initializer ? 536870912 /* Optional */ : 0); - var name = e.propertyName || e.name; - var symbol = createSymbol(flags, name.text); - symbol.type = getTypeFromBindingElement(e); - members[symbol.name] = symbol; - }); - return createAnonymousType(undefined, members, emptyArray, emptyArray, undefined, undefined); - } - // Return the type implied by an array binding pattern - function getTypeFromArrayBindingPattern(pattern) { - var hasSpreadElement = false; - var elementTypes = []; - ts.forEach(pattern.elements, function (e) { - elementTypes.push(e.kind === 178 /* OmittedExpression */ || e.dotDotDotToken ? anyType : getTypeFromBindingElement(e)); - if (e.dotDotDotToken) { - hasSpreadElement = true; - } - }); - if (!elementTypes.length) { - return languageVersion >= 2 /* ES6 */ ? createIterableType(anyType) : anyArrayType; - } - else if (hasSpreadElement) { - var unionOfElements = getUnionType(elementTypes); - return languageVersion >= 2 /* ES6 */ ? createIterableType(unionOfElements) : createArrayType(unionOfElements); - } - // If the pattern has at least one element, and no rest element, then it should imply a tuple type. - return createTupleType(elementTypes); - } - // Return the type implied by a binding pattern. This is the type implied purely by the binding pattern itself - // and without regard to its context (i.e. without regard any type annotation or initializer associated with the - // declaration in which the binding pattern is contained). For example, the implied type of [x, y] is [any, any] - // and the implied type of { x, y: z = 1 } is { x: any; y: number; }. The type implied by a binding pattern is - // used as the contextual type of an initializer associated with the binding pattern. Also, for a destructuring - // parameter with no type annotation or initializer, the type implied by the binding pattern becomes the type of - // the parameter. - function getTypeFromBindingPattern(pattern) { - return pattern.kind === 153 /* ObjectBindingPattern */ - ? getTypeFromObjectBindingPattern(pattern) - : getTypeFromArrayBindingPattern(pattern); - } - // Return the type associated with a variable, parameter, or property declaration. In the simple case this is the type - // specified in a type annotation or inferred from an initializer. However, in the case of a destructuring declaration it - // is a bit more involved. For example: - // - // var [x, s = ""] = [1, "one"]; - // - // Here, the array literal [1, "one"] is contextually typed by the type [any, string], which is the implied type of the - // binding pattern [x, s = ""]. Because the contextual type is a tuple type, the resulting type of [1, "one"] is the - // tuple type [number, string]. Thus, the type inferred for 'x' is number and the type inferred for 's' is string. - function getWidenedTypeForVariableLikeDeclaration(declaration, reportErrors) { - var type = getTypeForVariableLikeDeclaration(declaration); - if (type) { - if (reportErrors) { - reportErrorsFromWidening(declaration, type); - } - // During a normal type check we'll never get to here with a property assignment (the check of the containing - // object literal uses a different path). We exclude widening only so that language services and type verification - // tools see the actual type. - return declaration.kind !== 227 /* PropertyAssignment */ ? getWidenedType(type) : type; - } - // If no type was specified and nothing could be inferred, and if the declaration specifies a binding pattern, use - // the type implied by the binding pattern - if (ts.isBindingPattern(declaration.name)) { - return getTypeFromBindingPattern(declaration.name); - } - // Rest parameters default to type any[], other parameters default to type any - type = declaration.dotDotDotToken ? anyArrayType : anyType; - // Report implicit any errors unless this is a private property within an ambient declaration - if (reportErrors && compilerOptions.noImplicitAny) { - var root = ts.getRootDeclaration(declaration); - if (!isPrivateWithinAmbient(root) && !(root.kind === 131 /* Parameter */ && isPrivateWithinAmbient(root.parent))) { - reportImplicitAnyError(declaration, type); - } - } - return type; - } - function getTypeOfVariableOrParameterOrProperty(symbol) { - var links = getSymbolLinks(symbol); - if (!links.type) { - // Handle prototype property - if (symbol.flags & 134217728 /* Prototype */) { - return links.type = getTypeOfPrototypeProperty(symbol); - } - // Handle catch clause variables - var declaration = symbol.valueDeclaration; - if (declaration.parent.kind === 226 /* CatchClause */) { - return links.type = anyType; - } - // Handle export default expressions - if (declaration.kind === 217 /* ExportAssignment */) { - return links.type = checkExpression(declaration.expression); - } - // Handle variable, parameter or property - if (!pushTypeResolution(symbol)) { - return unknownType; - } - var type = getWidenedTypeForVariableLikeDeclaration(declaration, true); - if (!popTypeResolution()) { - if (symbol.valueDeclaration.type) { - // Variable has type annotation that circularly references the variable itself - type = unknownType; - error(symbol.valueDeclaration, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); - } - else { - // Variable has initializer that circularly references the variable itself - type = anyType; - if (compilerOptions.noImplicitAny) { - error(symbol.valueDeclaration, ts.Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, symbolToString(symbol)); - } - } - } - links.type = type; - } - return links.type; - } - function getSetAccessorTypeAnnotationNode(accessor) { - return accessor && accessor.parameters.length > 0 && accessor.parameters[0].type; - } - function getAnnotatedAccessorType(accessor) { - if (accessor) { - if (accessor.kind === 138 /* GetAccessor */) { - return accessor.type && getTypeFromTypeNode(accessor.type); - } - else { - var setterTypeAnnotation = getSetAccessorTypeAnnotationNode(accessor); - return setterTypeAnnotation && getTypeFromTypeNode(setterTypeAnnotation); - } - } - return undefined; - } - function getTypeOfAccessors(symbol) { - var links = getSymbolLinks(symbol); - if (!links.type) { - if (!pushTypeResolution(symbol)) { - return unknownType; - } - var getter = ts.getDeclarationOfKind(symbol, 138 /* GetAccessor */); - var setter = ts.getDeclarationOfKind(symbol, 139 /* SetAccessor */); - var type; - // First try to see if the user specified a return type on the get-accessor. - var getterReturnType = getAnnotatedAccessorType(getter); - if (getterReturnType) { - type = getterReturnType; - } - else { - // If the user didn't specify a return type, try to use the set-accessor's parameter type. - var setterParameterType = getAnnotatedAccessorType(setter); - if (setterParameterType) { - type = setterParameterType; - } - else { - // If there are no specified types, try to infer it from the body of the get accessor if it exists. - if (getter && getter.body) { - type = getReturnTypeFromBody(getter); - } - else { - if (compilerOptions.noImplicitAny) { - error(setter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation, symbolToString(symbol)); - } - type = anyType; - } - } - } - if (!popTypeResolution()) { - type = anyType; - if (compilerOptions.noImplicitAny) { - var getter_1 = ts.getDeclarationOfKind(symbol, 138 /* GetAccessor */); - error(getter_1, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol)); - } - } - links.type = type; - } - return links.type; - } - function getTypeOfFuncClassEnumModule(symbol) { - var links = getSymbolLinks(symbol); - if (!links.type) { - links.type = createObjectType(32768 /* Anonymous */, symbol); - } - return links.type; - } - function getTypeOfEnumMember(symbol) { - var links = getSymbolLinks(symbol); - if (!links.type) { - links.type = getDeclaredTypeOfEnum(getParentOfSymbol(symbol)); - } - return links.type; - } - function getTypeOfAlias(symbol) { - var links = getSymbolLinks(symbol); - if (!links.type) { - var targetSymbol = resolveAlias(symbol); - // It only makes sense to get the type of a value symbol. If the result of resolving - // the alias is not a value, then it has no type. To get the type associated with a - // type symbol, call getDeclaredTypeOfSymbol. - // This check is important because without it, a call to getTypeOfSymbol could end - // up recursively calling getTypeOfAlias, causing a stack overflow. - links.type = targetSymbol.flags & 107455 /* Value */ - ? getTypeOfSymbol(targetSymbol) - : unknownType; - } - return links.type; - } - function getTypeOfInstantiatedSymbol(symbol) { - var links = getSymbolLinks(symbol); - if (!links.type) { - links.type = instantiateType(getTypeOfSymbol(links.target), links.mapper); - } - return links.type; - } - function getTypeOfSymbol(symbol) { - if (symbol.flags & 16777216 /* Instantiated */) { - return getTypeOfInstantiatedSymbol(symbol); - } - if (symbol.flags & (3 /* Variable */ | 4 /* Property */)) { - return getTypeOfVariableOrParameterOrProperty(symbol); - } - if (symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 384 /* Enum */ | 512 /* ValueModule */)) { - return getTypeOfFuncClassEnumModule(symbol); - } - if (symbol.flags & 8 /* EnumMember */) { - return getTypeOfEnumMember(symbol); - } - if (symbol.flags & 98304 /* Accessor */) { - return getTypeOfAccessors(symbol); - } - if (symbol.flags & 8388608 /* Alias */) { - return getTypeOfAlias(symbol); - } - return unknownType; - } - function getTargetType(type) { - return type.flags & 4096 /* Reference */ ? type.target : type; - } - function hasBaseType(type, checkBase) { - return check(type); - function check(type) { - var target = getTargetType(type); - return target === checkBase || ts.forEach(getBaseTypes(target), check); - } - } - // Appends the type parameters given by a list of declarations to a set of type parameters and returns the resulting set. - // The function allocates a new array if the input type parameter set is undefined, but otherwise it modifies the set - // in-place and returns the same array. - function appendTypeParameters(typeParameters, declarations) { - for (var _i = 0; _i < declarations.length; _i++) { - var declaration = declarations[_i]; - var tp = getDeclaredTypeOfTypeParameter(getSymbolOfNode(declaration)); - if (!typeParameters) { - typeParameters = [tp]; - } - else if (!ts.contains(typeParameters, tp)) { - typeParameters.push(tp); - } - } - return typeParameters; - } - // Appends the outer type parameters of a node to a set of type parameters and returns the resulting set. The function - // allocates a new array if the input type parameter set is undefined, but otherwise it modifies the set in-place and - // returns the same array. - function appendOuterTypeParameters(typeParameters, node) { - while (true) { - node = node.parent; - if (!node) { - return typeParameters; - } - if (node.kind === 204 /* ClassDeclaration */ || node.kind === 203 /* FunctionDeclaration */ || - node.kind === 165 /* FunctionExpression */ || node.kind === 136 /* MethodDeclaration */ || - node.kind === 166 /* ArrowFunction */) { - var declarations = node.typeParameters; - if (declarations) { - return appendTypeParameters(appendOuterTypeParameters(typeParameters, node), declarations); - } - } - } - } - // The outer type parameters are those defined by enclosing generic classes, methods, or functions. - function getOuterTypeParametersOfClassOrInterface(symbol) { - var kind = symbol.flags & 32 /* Class */ ? 204 /* ClassDeclaration */ : 205 /* InterfaceDeclaration */; - return appendOuterTypeParameters(undefined, ts.getDeclarationOfKind(symbol, kind)); - } - // The local type parameters are the combined set of type parameters from all declarations of the class, - // interface, or type alias. - function getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol) { - var result; - for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { - var node = _a[_i]; - if (node.kind === 205 /* InterfaceDeclaration */ || node.kind === 204 /* ClassDeclaration */ || node.kind === 206 /* TypeAliasDeclaration */) { - var declaration = node; - if (declaration.typeParameters) { - result = appendTypeParameters(result, declaration.typeParameters); - } - } - } - return result; - } - // The full set of type parameters for a generic class or interface type consists of its outer type parameters plus - // its locally declared type parameters. - function getTypeParametersOfClassOrInterface(symbol) { - return ts.concatenate(getOuterTypeParametersOfClassOrInterface(symbol), getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol)); - } - function getBaseTypes(type) { - var typeWithBaseTypes = type; - if (!typeWithBaseTypes.baseTypes) { - if (type.symbol.flags & 32 /* Class */) { - resolveBaseTypesOfClass(typeWithBaseTypes); - } - else if (type.symbol.flags & 64 /* Interface */) { - resolveBaseTypesOfInterface(typeWithBaseTypes); - } - else { - ts.Debug.fail("type must be class or interface"); - } - } - return typeWithBaseTypes.baseTypes; - } - function resolveBaseTypesOfClass(type) { - type.baseTypes = []; - var declaration = ts.getDeclarationOfKind(type.symbol, 204 /* ClassDeclaration */); - var baseTypeNode = ts.getClassExtendsHeritageClauseElement(declaration); - if (baseTypeNode) { - var baseType = getTypeFromTypeNode(baseTypeNode); - if (baseType !== unknownType) { - if (getTargetType(baseType).flags & 1024 /* Class */) { - if (type !== baseType && !hasBaseType(baseType, type)) { - type.baseTypes.push(baseType); - } - else { - error(declaration, ts.Diagnostics.Type_0_recursively_references_itself_as_a_base_type, typeToString(type, undefined, 1 /* WriteArrayAsGenericType */)); - } - } - else { - error(baseTypeNode, ts.Diagnostics.A_class_may_only_extend_another_class); - } - } - } - } - function resolveBaseTypesOfInterface(type) { - type.baseTypes = []; - for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) { - var declaration = _a[_i]; - if (declaration.kind === 205 /* InterfaceDeclaration */ && ts.getInterfaceBaseTypeNodes(declaration)) { - for (var _b = 0, _c = ts.getInterfaceBaseTypeNodes(declaration); _b < _c.length; _b++) { - var node = _c[_b]; - var baseType = getTypeFromTypeNode(node); - if (baseType !== unknownType) { - if (getTargetType(baseType).flags & (1024 /* Class */ | 2048 /* Interface */)) { - if (type !== baseType && !hasBaseType(baseType, type)) { - type.baseTypes.push(baseType); - } - else { - error(declaration, ts.Diagnostics.Type_0_recursively_references_itself_as_a_base_type, typeToString(type, undefined, 1 /* WriteArrayAsGenericType */)); - } - } - else { - error(node, ts.Diagnostics.An_interface_may_only_extend_a_class_or_another_interface); - } - } - } - } - } - } - function getDeclaredTypeOfClassOrInterface(symbol) { - var links = getSymbolLinks(symbol); - if (!links.declaredType) { - var kind = symbol.flags & 32 /* Class */ ? 1024 /* Class */ : 2048 /* Interface */; - var type = links.declaredType = createObjectType(kind, symbol); - var outerTypeParameters = getOuterTypeParametersOfClassOrInterface(symbol); - var localTypeParameters = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol); - if (outerTypeParameters || localTypeParameters) { - type.flags |= 4096 /* Reference */; - type.typeParameters = ts.concatenate(outerTypeParameters, localTypeParameters); - type.outerTypeParameters = outerTypeParameters; - type.localTypeParameters = localTypeParameters; - type.instantiations = {}; - type.instantiations[getTypeListId(type.typeParameters)] = type; - type.target = type; - type.typeArguments = type.typeParameters; - } - } - return links.declaredType; - } - function getDeclaredTypeOfTypeAlias(symbol) { - var links = getSymbolLinks(symbol); - if (!links.declaredType) { - // Note that we use the links object as the target here because the symbol object is used as the unique - // identity for resolution of the 'type' property in SymbolLinks. - if (!pushTypeResolution(links)) { - return unknownType; - } - var declaration = ts.getDeclarationOfKind(symbol, 206 /* TypeAliasDeclaration */); - var type = getTypeFromTypeNode(declaration.type); - if (popTypeResolution()) { - links.typeParameters = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol); - if (links.typeParameters) { - // Initialize the instantiation cache for generic type aliases. The declared type corresponds to - // an instantiation of the type alias with the type parameters supplied as type arguments. - links.instantiations = {}; - links.instantiations[getTypeListId(links.typeParameters)] = type; - } - } - else { - type = unknownType; - error(declaration.name, ts.Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); - } - links.declaredType = type; - } - return links.declaredType; - } - function getDeclaredTypeOfEnum(symbol) { - var links = getSymbolLinks(symbol); - if (!links.declaredType) { - var type = createType(128 /* Enum */); - type.symbol = symbol; - links.declaredType = type; - } - return links.declaredType; - } - function getDeclaredTypeOfTypeParameter(symbol) { - var links = getSymbolLinks(symbol); - if (!links.declaredType) { - var type = createType(512 /* TypeParameter */); - type.symbol = symbol; - if (!ts.getDeclarationOfKind(symbol, 130 /* TypeParameter */).constraint) { - type.constraint = noConstraintType; - } - links.declaredType = type; - } - return links.declaredType; - } - function getDeclaredTypeOfAlias(symbol) { - var links = getSymbolLinks(symbol); - if (!links.declaredType) { - links.declaredType = getDeclaredTypeOfSymbol(resolveAlias(symbol)); - } - return links.declaredType; - } - function getDeclaredTypeOfSymbol(symbol) { - ts.Debug.assert((symbol.flags & 16777216 /* Instantiated */) === 0); - if (symbol.flags & (32 /* Class */ | 64 /* Interface */)) { - return getDeclaredTypeOfClassOrInterface(symbol); - } - if (symbol.flags & 524288 /* TypeAlias */) { - return getDeclaredTypeOfTypeAlias(symbol); - } - if (symbol.flags & 384 /* Enum */) { - return getDeclaredTypeOfEnum(symbol); - } - if (symbol.flags & 262144 /* TypeParameter */) { - return getDeclaredTypeOfTypeParameter(symbol); - } - if (symbol.flags & 8388608 /* Alias */) { - return getDeclaredTypeOfAlias(symbol); - } - return unknownType; - } - function createSymbolTable(symbols) { - var result = {}; - for (var _i = 0; _i < symbols.length; _i++) { - var symbol = symbols[_i]; - result[symbol.name] = symbol; - } - return result; - } - function createInstantiatedSymbolTable(symbols, mapper) { - var result = {}; - for (var _i = 0; _i < symbols.length; _i++) { - var symbol = symbols[_i]; - result[symbol.name] = instantiateSymbol(symbol, mapper); - } - return result; - } - function addInheritedMembers(symbols, baseSymbols) { - for (var _i = 0; _i < baseSymbols.length; _i++) { - var s = baseSymbols[_i]; - if (!ts.hasProperty(symbols, s.name)) { - symbols[s.name] = s; - } - } - } - function addInheritedSignatures(signatures, baseSignatures) { - if (baseSignatures) { - for (var _i = 0; _i < baseSignatures.length; _i++) { - var signature = baseSignatures[_i]; - signatures.push(signature); - } - } - } - function resolveDeclaredMembers(type) { - if (!type.declaredProperties) { - var symbol = type.symbol; - type.declaredProperties = getNamedMembers(symbol.members); - type.declaredCallSignatures = getSignaturesOfSymbol(symbol.members["__call"]); - type.declaredConstructSignatures = getSignaturesOfSymbol(symbol.members["__new"]); - type.declaredStringIndexType = getIndexTypeOfSymbol(symbol, 0 /* String */); - type.declaredNumberIndexType = getIndexTypeOfSymbol(symbol, 1 /* Number */); - } - return type; - } - function resolveClassOrInterfaceMembers(type) { - var target = resolveDeclaredMembers(type); - var members = target.symbol.members; - var callSignatures = target.declaredCallSignatures; - var constructSignatures = target.declaredConstructSignatures; - var stringIndexType = target.declaredStringIndexType; - var numberIndexType = target.declaredNumberIndexType; - var baseTypes = getBaseTypes(target); - if (baseTypes.length) { - members = createSymbolTable(target.declaredProperties); - for (var _i = 0; _i < baseTypes.length; _i++) { - var baseType = baseTypes[_i]; - addInheritedMembers(members, getPropertiesOfObjectType(baseType)); - callSignatures = ts.concatenate(callSignatures, getSignaturesOfType(baseType, 0 /* Call */)); - constructSignatures = ts.concatenate(constructSignatures, getSignaturesOfType(baseType, 1 /* Construct */)); - stringIndexType = stringIndexType || getIndexTypeOfType(baseType, 0 /* String */); - numberIndexType = numberIndexType || getIndexTypeOfType(baseType, 1 /* Number */); - } - } - setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexType, numberIndexType); - } - function resolveTypeReferenceMembers(type) { - var target = resolveDeclaredMembers(type.target); - var mapper = createTypeMapper(target.typeParameters, type.typeArguments); - var members = createInstantiatedSymbolTable(target.declaredProperties, mapper); - var callSignatures = instantiateList(target.declaredCallSignatures, mapper, instantiateSignature); - var constructSignatures = instantiateList(target.declaredConstructSignatures, mapper, instantiateSignature); - var stringIndexType = target.declaredStringIndexType ? instantiateType(target.declaredStringIndexType, mapper) : undefined; - var numberIndexType = target.declaredNumberIndexType ? instantiateType(target.declaredNumberIndexType, mapper) : undefined; - ts.forEach(getBaseTypes(target), function (baseType) { - var instantiatedBaseType = instantiateType(baseType, mapper); - addInheritedMembers(members, getPropertiesOfObjectType(instantiatedBaseType)); - callSignatures = ts.concatenate(callSignatures, getSignaturesOfType(instantiatedBaseType, 0 /* Call */)); - constructSignatures = ts.concatenate(constructSignatures, getSignaturesOfType(instantiatedBaseType, 1 /* Construct */)); - stringIndexType = stringIndexType || getIndexTypeOfType(instantiatedBaseType, 0 /* String */); - numberIndexType = numberIndexType || getIndexTypeOfType(instantiatedBaseType, 1 /* Number */); - }); - setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexType, numberIndexType); - } - function createSignature(declaration, typeParameters, parameters, resolvedReturnType, typePredicate, minArgumentCount, hasRestParameter, hasStringLiterals) { - var sig = new Signature(checker); - sig.declaration = declaration; - sig.typeParameters = typeParameters; - sig.parameters = parameters; - sig.resolvedReturnType = resolvedReturnType; - sig.typePredicate = typePredicate; - sig.minArgumentCount = minArgumentCount; - sig.hasRestParameter = hasRestParameter; - sig.hasStringLiterals = hasStringLiterals; - return sig; - } - function cloneSignature(sig) { - return createSignature(sig.declaration, sig.typeParameters, sig.parameters, sig.resolvedReturnType, sig.typePredicate, sig.minArgumentCount, sig.hasRestParameter, sig.hasStringLiterals); - } - function getDefaultConstructSignatures(classType) { - var baseTypes = getBaseTypes(classType); - if (baseTypes.length) { - var baseType = baseTypes[0]; - var baseSignatures = getSignaturesOfType(getTypeOfSymbol(baseType.symbol), 1 /* Construct */); - return ts.map(baseSignatures, function (baseSignature) { - var signature = baseType.flags & 4096 /* Reference */ ? - getSignatureInstantiation(baseSignature, baseType.typeArguments) : cloneSignature(baseSignature); - signature.typeParameters = classType.localTypeParameters; - signature.resolvedReturnType = classType; - return signature; - }); - } - return [createSignature(undefined, classType.localTypeParameters, emptyArray, classType, undefined, 0, false, false)]; - } - function createTupleTypeMemberSymbols(memberTypes) { - var members = {}; - for (var i = 0; i < memberTypes.length; i++) { - var symbol = createSymbol(4 /* Property */ | 67108864 /* Transient */, "" + i); - symbol.type = memberTypes[i]; - members[i] = symbol; - } - return members; - } - function resolveTupleTypeMembers(type) { - var arrayType = resolveObjectOrUnionTypeMembers(createArrayType(getUnionType(type.elementTypes))); - var members = createTupleTypeMemberSymbols(type.elementTypes); - addInheritedMembers(members, arrayType.properties); - setObjectTypeMembers(type, members, arrayType.callSignatures, arrayType.constructSignatures, arrayType.stringIndexType, arrayType.numberIndexType); - } - function signatureListsIdentical(s, t) { - if (s.length !== t.length) { - return false; - } - for (var i = 0; i < s.length; i++) { - if (!compareSignatures(s[i], t[i], false, compareTypes)) { - return false; - } - } - return true; - } - // If the lists of call or construct signatures in the given types are all identical except for return types, - // and if none of the signatures are generic, return a list of signatures that has substitutes a union of the - // return types of the corresponding signatures in each resulting signature. - function getUnionSignatures(types, kind) { - var signatureLists = ts.map(types, function (t) { return getSignaturesOfType(t, kind); }); - var signatures = signatureLists[0]; - for (var _i = 0; _i < signatures.length; _i++) { - var signature = signatures[_i]; - if (signature.typeParameters) { - return emptyArray; - } - } - for (var i_1 = 1; i_1 < signatureLists.length; i_1++) { - if (!signatureListsIdentical(signatures, signatureLists[i_1])) { - return emptyArray; - } - } - var result = ts.map(signatures, cloneSignature); - for (var i = 0; i < result.length; i++) { - var s = result[i]; - // Clear resolved return type we possibly got from cloneSignature - s.resolvedReturnType = undefined; - s.unionSignatures = ts.map(signatureLists, function (signatures) { return signatures[i]; }); - } - return result; - } - function getUnionIndexType(types, kind) { - var indexTypes = []; - for (var _i = 0; _i < types.length; _i++) { - var type = types[_i]; - var indexType = getIndexTypeOfType(type, kind); - if (!indexType) { - return undefined; - } - indexTypes.push(indexType); - } - return getUnionType(indexTypes); - } - function resolveUnionTypeMembers(type) { - // The members and properties collections are empty for union types. To get all properties of a union - // type use getPropertiesOfType (only the language service uses this). - var callSignatures = getUnionSignatures(type.types, 0 /* Call */); - var constructSignatures = getUnionSignatures(type.types, 1 /* Construct */); - var stringIndexType = getUnionIndexType(type.types, 0 /* String */); - var numberIndexType = getUnionIndexType(type.types, 1 /* Number */); - setObjectTypeMembers(type, emptySymbols, callSignatures, constructSignatures, stringIndexType, numberIndexType); - } - function resolveAnonymousTypeMembers(type) { - var symbol = type.symbol; - var members; - var callSignatures; - var constructSignatures; - var stringIndexType; - var numberIndexType; - if (symbol.flags & 2048 /* TypeLiteral */) { - members = symbol.members; - callSignatures = getSignaturesOfSymbol(members["__call"]); - constructSignatures = getSignaturesOfSymbol(members["__new"]); - stringIndexType = getIndexTypeOfSymbol(symbol, 0 /* String */); - numberIndexType = getIndexTypeOfSymbol(symbol, 1 /* Number */); - } - else { - // Combinations of function, class, enum and module - members = emptySymbols; - callSignatures = emptyArray; - constructSignatures = emptyArray; - if (symbol.flags & 1952 /* HasExports */) { - members = getExportsOfSymbol(symbol); - } - if (symbol.flags & (16 /* Function */ | 8192 /* Method */)) { - callSignatures = getSignaturesOfSymbol(symbol); - } - if (symbol.flags & 32 /* Class */) { - var classType = getDeclaredTypeOfClassOrInterface(symbol); - constructSignatures = getSignaturesOfSymbol(symbol.members["__constructor"]); - if (!constructSignatures.length) { - constructSignatures = getDefaultConstructSignatures(classType); - } - var baseTypes = getBaseTypes(classType); - if (baseTypes.length) { - members = createSymbolTable(getNamedMembers(members)); - addInheritedMembers(members, getPropertiesOfObjectType(getTypeOfSymbol(baseTypes[0].symbol))); - } - } - stringIndexType = undefined; - numberIndexType = (symbol.flags & 384 /* Enum */) ? stringType : undefined; - } - setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexType, numberIndexType); - } - function resolveObjectOrUnionTypeMembers(type) { - if (!type.members) { - if (type.flags & (1024 /* Class */ | 2048 /* Interface */)) { - resolveClassOrInterfaceMembers(type); - } - else if (type.flags & 32768 /* Anonymous */) { - resolveAnonymousTypeMembers(type); - } - else if (type.flags & 8192 /* Tuple */) { - resolveTupleTypeMembers(type); - } - else if (type.flags & 16384 /* Union */) { - resolveUnionTypeMembers(type); - } - else { - resolveTypeReferenceMembers(type); - } - } - return type; - } - // Return properties of an object type or an empty array for other types - function getPropertiesOfObjectType(type) { - if (type.flags & 48128 /* ObjectType */) { - return resolveObjectOrUnionTypeMembers(type).properties; - } - return emptyArray; - } - // If the given type is an object type and that type has a property by the given name, return - // the symbol for that property. Otherwise return undefined. - function getPropertyOfObjectType(type, name) { - if (type.flags & 48128 /* ObjectType */) { - var resolved = resolveObjectOrUnionTypeMembers(type); - if (ts.hasProperty(resolved.members, name)) { - var symbol = resolved.members[name]; - if (symbolIsValue(symbol)) { - return symbol; - } - } - } - } - function getPropertiesOfUnionType(type) { - var result = []; - ts.forEach(getPropertiesOfType(type.types[0]), function (prop) { - var unionProp = getPropertyOfUnionType(type, prop.name); - if (unionProp) { - result.push(unionProp); - } - }); - return result; - } - function getPropertiesOfType(type) { - type = getApparentType(type); - return type.flags & 16384 /* Union */ ? getPropertiesOfUnionType(type) : getPropertiesOfObjectType(type); - } - // For a type parameter, return the base constraint of the type parameter. For the string, number, - // boolean, and symbol primitive types, return the corresponding object types. Otherwise return the - // type itself. Note that the apparent type of a union type is the union type itself. - function getApparentType(type) { - if (type.flags & 16384 /* Union */) { - type = getReducedTypeOfUnionType(type); - } - if (type.flags & 512 /* TypeParameter */) { - do { - type = getConstraintOfTypeParameter(type); - } while (type && type.flags & 512 /* TypeParameter */); - if (!type) { - type = emptyObjectType; - } - } - if (type.flags & 258 /* StringLike */) { - type = globalStringType; - } - else if (type.flags & 132 /* NumberLike */) { - type = globalNumberType; - } - else if (type.flags & 8 /* Boolean */) { - type = globalBooleanType; - } - else if (type.flags & 2097152 /* ESSymbol */) { - type = globalESSymbolType; - } - return type; - } - function createUnionProperty(unionType, name) { - var types = unionType.types; - var props; - for (var _i = 0; _i < types.length; _i++) { - var current = types[_i]; - var type = getApparentType(current); - if (type !== unknownType) { - var prop = getPropertyOfType(type, name); - if (!prop || getDeclarationFlagsFromSymbol(prop) & (32 /* Private */ | 64 /* Protected */)) { - return undefined; - } - if (!props) { - props = [prop]; - } - else { - props.push(prop); - } - } - } - var propTypes = []; - var declarations = []; - for (var _a = 0; _a < props.length; _a++) { - var prop = props[_a]; - if (prop.declarations) { - declarations.push.apply(declarations, prop.declarations); - } - propTypes.push(getTypeOfSymbol(prop)); - } - var result = createSymbol(4 /* Property */ | 67108864 /* Transient */ | 268435456 /* UnionProperty */, name); - result.unionType = unionType; - result.declarations = declarations; - result.type = getUnionType(propTypes); - return result; - } - function getPropertyOfUnionType(type, name) { - var properties = type.resolvedProperties || (type.resolvedProperties = {}); - if (ts.hasProperty(properties, name)) { - return properties[name]; - } - var property = createUnionProperty(type, name); - if (property) { - properties[name] = property; - } - return property; - } - // Return the symbol for the property with the given name in the given type. Creates synthetic union properties when - // necessary, maps primitive types and type parameters are to their apparent types, and augments with properties from - // Object and Function as appropriate. - function getPropertyOfType(type, name) { - type = getApparentType(type); - if (type.flags & 48128 /* ObjectType */) { - var resolved = resolveObjectOrUnionTypeMembers(type); - if (ts.hasProperty(resolved.members, name)) { - var symbol = resolved.members[name]; - if (symbolIsValue(symbol)) { - return symbol; - } - } - if (resolved === anyFunctionType || resolved.callSignatures.length || resolved.constructSignatures.length) { - var symbol = getPropertyOfObjectType(globalFunctionType, name); - if (symbol) { - return symbol; - } - } - return getPropertyOfObjectType(globalObjectType, name); - } - if (type.flags & 16384 /* Union */) { - return getPropertyOfUnionType(type, name); - } - return undefined; - } - function getSignaturesOfObjectOrUnionType(type, kind) { - if (type.flags & (48128 /* ObjectType */ | 16384 /* Union */)) { - var resolved = resolveObjectOrUnionTypeMembers(type); - return kind === 0 /* Call */ ? resolved.callSignatures : resolved.constructSignatures; - } - return emptyArray; - } - // Return the signatures of the given kind in the given type. Creates synthetic union signatures when necessary and - // maps primitive types and type parameters are to their apparent types. - function getSignaturesOfType(type, kind) { - return getSignaturesOfObjectOrUnionType(getApparentType(type), kind); - } - function typeHasCallOrConstructSignatures(type) { - var apparentType = getApparentType(type); - if (apparentType.flags & (48128 /* ObjectType */ | 16384 /* Union */)) { - var resolved = resolveObjectOrUnionTypeMembers(type); - return resolved.callSignatures.length > 0 - || resolved.constructSignatures.length > 0; - } - return false; - } - function getIndexTypeOfObjectOrUnionType(type, kind) { - if (type.flags & (48128 /* ObjectType */ | 16384 /* Union */)) { - var resolved = resolveObjectOrUnionTypeMembers(type); - return kind === 0 /* String */ ? resolved.stringIndexType : resolved.numberIndexType; - } - } - // Return the index type of the given kind in the given type. Creates synthetic union index types when necessary and - // maps primitive types and type parameters are to their apparent types. - function getIndexTypeOfType(type, kind) { - return getIndexTypeOfObjectOrUnionType(getApparentType(type), kind); - } - // Return list of type parameters with duplicates removed (duplicate identifier errors are generated in the actual - // type checking functions). - function getTypeParametersFromDeclaration(typeParameterDeclarations) { - var result = []; - ts.forEach(typeParameterDeclarations, function (node) { - var tp = getDeclaredTypeOfTypeParameter(node.symbol); - if (!ts.contains(result, tp)) { - result.push(tp); - } - }); - return result; - } - function symbolsToArray(symbols) { - var result = []; - for (var id in symbols) { - if (!isReservedMemberName(id)) { - result.push(symbols[id]); - } - } - return result; - } - function isOptionalParameter(node) { - return ts.hasQuestionToken(node) || !!node.initializer; - } - function getSignatureFromDeclaration(declaration) { - var links = getNodeLinks(declaration); - if (!links.resolvedSignature) { - var classType = declaration.kind === 137 /* Constructor */ ? getDeclaredTypeOfClassOrInterface(declaration.parent.symbol) : undefined; - var typeParameters = classType ? classType.localTypeParameters : - declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) : undefined; - var parameters = []; - var hasStringLiterals = false; - var minArgumentCount = -1; - for (var i = 0, n = declaration.parameters.length; i < n; i++) { - var param = declaration.parameters[i]; - parameters.push(param.symbol); - if (param.type && param.type.kind === 8 /* StringLiteral */) { - hasStringLiterals = true; - } - if (minArgumentCount < 0) { - if (param.initializer || param.questionToken || param.dotDotDotToken) { - minArgumentCount = i; - } - } - } - if (minArgumentCount < 0) { - minArgumentCount = declaration.parameters.length; - } - var returnType; - var typePredicate; - if (classType) { - returnType = classType; - } - else if (declaration.type) { - returnType = getTypeFromTypeNode(declaration.type); - if (declaration.type.kind === 143 /* TypePredicate */) { - var typePredicateNode = declaration.type; - typePredicate = { - parameterName: typePredicateNode.parameterName ? typePredicateNode.parameterName.text : undefined, - parameterIndex: typePredicateNode.parameterName ? getTypePredicateParameterIndex(declaration.parameters, typePredicateNode.parameterName) : undefined, - type: getTypeFromTypeNode(typePredicateNode.type) - }; - } - } - else { - // TypeScript 1.0 spec (April 2014): - // If only one accessor includes a type annotation, the other behaves as if it had the same type annotation. - if (declaration.kind === 138 /* GetAccessor */ && !ts.hasDynamicName(declaration)) { - var setter = ts.getDeclarationOfKind(declaration.symbol, 139 /* SetAccessor */); - returnType = getAnnotatedAccessorType(setter); - } - if (!returnType && ts.nodeIsMissing(declaration.body)) { - returnType = anyType; - } - } - links.resolvedSignature = createSignature(declaration, typeParameters, parameters, returnType, typePredicate, minArgumentCount, ts.hasRestParameter(declaration), hasStringLiterals); - } - return links.resolvedSignature; - } - function getSignaturesOfSymbol(symbol) { - if (!symbol) - return emptyArray; - var result = []; - for (var i = 0, len = symbol.declarations.length; i < len; i++) { - var node = symbol.declarations[i]; - switch (node.kind) { - case 145 /* FunctionType */: - case 146 /* ConstructorType */: - case 203 /* FunctionDeclaration */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 137 /* Constructor */: - case 140 /* CallSignature */: - case 141 /* ConstructSignature */: - case 142 /* IndexSignature */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - // Don't include signature if node is the implementation of an overloaded function. A node is considered - // an implementation node if it has a body and the previous node is of the same kind and immediately - // precedes the implementation node (i.e. has the same parent and ends where the implementation starts). - if (i > 0 && node.body) { - var previous = symbol.declarations[i - 1]; - if (node.parent === previous.parent && node.kind === previous.kind && node.pos === previous.end) { - break; - } - } - result.push(getSignatureFromDeclaration(node)); - } - } - return result; - } - function getReturnTypeOfSignature(signature) { - if (!signature.resolvedReturnType) { - if (!pushTypeResolution(signature)) { - return unknownType; - } - var type; - if (signature.target) { - type = instantiateType(getReturnTypeOfSignature(signature.target), signature.mapper); - } - else if (signature.unionSignatures) { - type = getUnionType(ts.map(signature.unionSignatures, getReturnTypeOfSignature)); - } - else { - type = getReturnTypeFromBody(signature.declaration); - } - if (!popTypeResolution()) { - type = anyType; - if (compilerOptions.noImplicitAny) { - var declaration = signature.declaration; - if (declaration.name) { - error(declaration.name, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, ts.declarationNameToString(declaration.name)); - } - else { - error(declaration, ts.Diagnostics.Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions); - } - } - } - signature.resolvedReturnType = type; - } - return signature.resolvedReturnType; - } - function getRestTypeOfSignature(signature) { - if (signature.hasRestParameter) { - var type = getTypeOfSymbol(ts.lastOrUndefined(signature.parameters)); - if (type.flags & 4096 /* Reference */ && type.target === globalArrayType) { - return type.typeArguments[0]; - } - } - return anyType; - } - function getSignatureInstantiation(signature, typeArguments) { - return instantiateSignature(signature, createTypeMapper(signature.typeParameters, typeArguments), true); - } - function getErasedSignature(signature) { - if (!signature.typeParameters) - return signature; - if (!signature.erasedSignatureCache) { - if (signature.target) { - signature.erasedSignatureCache = instantiateSignature(getErasedSignature(signature.target), signature.mapper); - } - else { - signature.erasedSignatureCache = instantiateSignature(signature, createTypeEraser(signature.typeParameters), true); - } - } - return signature.erasedSignatureCache; - } - function getOrCreateTypeFromSignature(signature) { - // There are two ways to declare a construct signature, one is by declaring a class constructor - // using the constructor keyword, and the other is declaring a bare construct signature in an - // object type literal or interface (using the new keyword). Each way of declaring a constructor - // will result in a different declaration kind. - if (!signature.isolatedSignatureType) { - var isConstructor = signature.declaration.kind === 137 /* Constructor */ || signature.declaration.kind === 141 /* ConstructSignature */; - var type = createObjectType(32768 /* Anonymous */ | 131072 /* FromSignature */); - type.members = emptySymbols; - type.properties = emptyArray; - type.callSignatures = !isConstructor ? [signature] : emptyArray; - type.constructSignatures = isConstructor ? [signature] : emptyArray; - signature.isolatedSignatureType = type; - } - return signature.isolatedSignatureType; - } - function getIndexSymbol(symbol) { - return symbol.members["__index"]; - } - function getIndexDeclarationOfSymbol(symbol, kind) { - var syntaxKind = kind === 1 /* Number */ ? 121 /* NumberKeyword */ : 123 /* StringKeyword */; - var indexSymbol = getIndexSymbol(symbol); - if (indexSymbol) { - var len = indexSymbol.declarations.length; - for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) { - var decl = _a[_i]; - var node = decl; - if (node.parameters.length === 1) { - var parameter = node.parameters[0]; - if (parameter && parameter.type && parameter.type.kind === syntaxKind) { - return node; - } - } - } - } - return undefined; - } - function getIndexTypeOfSymbol(symbol, kind) { - var declaration = getIndexDeclarationOfSymbol(symbol, kind); - return declaration - ? declaration.type ? getTypeFromTypeNode(declaration.type) : anyType - : undefined; - } - function getConstraintOfTypeParameter(type) { - if (!type.constraint) { - if (type.target) { - var targetConstraint = getConstraintOfTypeParameter(type.target); - type.constraint = targetConstraint ? instantiateType(targetConstraint, type.mapper) : noConstraintType; - } - else { - type.constraint = getTypeFromTypeNode(ts.getDeclarationOfKind(type.symbol, 130 /* TypeParameter */).constraint); - } - } - return type.constraint === noConstraintType ? undefined : type.constraint; - } - function getParentSymbolOfTypeParameter(typeParameter) { - return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 130 /* TypeParameter */).parent); - } - function getTypeListId(types) { - switch (types.length) { - case 1: - return "" + types[0].id; - case 2: - return types[0].id + "," + types[1].id; - default: - var result = ""; - for (var i = 0; i < types.length; i++) { - if (i > 0) { - result += ","; - } - result += types[i].id; - } - return result; - } - } - // This function is used to propagate widening flags when creating new object types references and union types. - // It is only necessary to do so if a constituent type might be the undefined type, the null type, or the type - // of an object literal (since those types have widening related information we need to track). - function getWideningFlagsOfTypes(types) { - var result = 0; - for (var _i = 0; _i < types.length; _i++) { - var type = types[_i]; - result |= type.flags; - } - return result & 1572864 /* RequiresWidening */; - } - function createTypeReference(target, typeArguments) { - var id = getTypeListId(typeArguments); - var type = target.instantiations[id]; - if (!type) { - var flags = 4096 /* Reference */ | getWideningFlagsOfTypes(typeArguments); - type = target.instantiations[id] = createObjectType(flags, target.symbol); - type.target = target; - type.typeArguments = typeArguments; - } - return type; - } - function isTypeParameterReferenceIllegalInConstraint(typeReferenceNode, typeParameterSymbol) { - var links = getNodeLinks(typeReferenceNode); - if (links.isIllegalTypeReferenceInConstraint !== undefined) { - return links.isIllegalTypeReferenceInConstraint; - } - // bubble up to the declaration - var currentNode = typeReferenceNode; - // forEach === exists - while (!ts.forEach(typeParameterSymbol.declarations, function (d) { return d.parent === currentNode.parent; })) { - currentNode = currentNode.parent; - } - // if last step was made from the type parameter this means that path has started somewhere in constraint which is illegal - links.isIllegalTypeReferenceInConstraint = currentNode.kind === 130 /* TypeParameter */; - return links.isIllegalTypeReferenceInConstraint; - } - function checkTypeParameterHasIllegalReferencesInConstraint(typeParameter) { - var typeParameterSymbol; - function check(n) { - if (n.kind === 144 /* TypeReference */ && n.typeName.kind === 65 /* Identifier */) { - var links = getNodeLinks(n); - if (links.isIllegalTypeReferenceInConstraint === undefined) { - var symbol = resolveName(typeParameter, n.typeName.text, 793056 /* Type */, undefined, undefined); - if (symbol && (symbol.flags & 262144 /* TypeParameter */)) { - // TypeScript 1.0 spec (April 2014): 3.4.1 - // Type parameters declared in a particular type parameter list - // may not be referenced in constraints in that type parameter list - // symbol.declaration.parent === typeParameter.parent - // -> typeParameter and symbol.declaration originate from the same type parameter list - // -> illegal for all declarations in symbol - // forEach === exists - links.isIllegalTypeReferenceInConstraint = ts.forEach(symbol.declarations, function (d) { return d.parent == typeParameter.parent; }); - } - } - if (links.isIllegalTypeReferenceInConstraint) { - error(typeParameter, ts.Diagnostics.Constraint_of_a_type_parameter_cannot_reference_any_type_parameter_from_the_same_type_parameter_list); - } - } - ts.forEachChild(n, check); - } - if (typeParameter.constraint) { - typeParameterSymbol = getSymbolOfNode(typeParameter); - check(typeParameter.constraint); - } - } - // Get type from reference to class or interface - function getTypeFromClassOrInterfaceReference(node, symbol) { - var type = getDeclaredTypeOfSymbol(symbol); - var typeParameters = type.localTypeParameters; - if (typeParameters) { - if (!node.typeArguments || node.typeArguments.length !== typeParameters.length) { - error(node, ts.Diagnostics.Generic_type_0_requires_1_type_argument_s, typeToString(type, undefined, 1 /* WriteArrayAsGenericType */), typeParameters.length); - return unknownType; - } - // In a type reference, the outer type parameters of the referenced class or interface are automatically - // supplied as type arguments and the type reference only specifies arguments for the local type parameters - // of the class or interface. - return createTypeReference(type, ts.concatenate(type.outerTypeParameters, ts.map(node.typeArguments, getTypeFromTypeNode))); - } - if (node.typeArguments) { - error(node, ts.Diagnostics.Type_0_is_not_generic, typeToString(type)); - return unknownType; - } - return type; - } - // Get type from reference to type alias. When a type alias is generic, the declared type of the type alias may include - // references to the type parameters of the alias. We replace those with the actual type arguments by instantiating the - // declared type. Instantiations are cached using the type identities of the type arguments as the key. - function getTypeFromTypeAliasReference(node, symbol) { - var type = getDeclaredTypeOfSymbol(symbol); - var links = getSymbolLinks(symbol); - var typeParameters = links.typeParameters; - if (typeParameters) { - if (!node.typeArguments || node.typeArguments.length !== typeParameters.length) { - error(node, ts.Diagnostics.Generic_type_0_requires_1_type_argument_s, symbolToString(symbol), typeParameters.length); - return unknownType; - } - var typeArguments = ts.map(node.typeArguments, getTypeFromTypeNode); - var id = getTypeListId(typeArguments); - return links.instantiations[id] || (links.instantiations[id] = instantiateType(type, createTypeMapper(typeParameters, typeArguments))); - } - if (node.typeArguments) { - error(node, ts.Diagnostics.Type_0_is_not_generic, symbolToString(symbol)); - return unknownType; - } - return type; - } - // Get type from reference to named type that cannot be generic (enum or type parameter) - function getTypeFromNonGenericTypeReference(node, symbol) { - if (symbol.flags & 262144 /* TypeParameter */ && isTypeParameterReferenceIllegalInConstraint(node, symbol)) { - // TypeScript 1.0 spec (April 2014): 3.4.1 - // Type parameters declared in a particular type parameter list - // may not be referenced in constraints in that type parameter list - // Implementation: such type references are resolved to 'unknown' type that usually denotes error - return unknownType; - } - if (node.typeArguments) { - error(node, ts.Diagnostics.Type_0_is_not_generic, symbolToString(symbol)); - return unknownType; - } - return getDeclaredTypeOfSymbol(symbol); - } - function getTypeFromTypeReference(node) { - var links = getNodeLinks(node); - if (!links.resolvedType) { - // We only support expressions that are simple qualified names. For other expressions this produces undefined. - var typeNameOrExpression = node.kind === 144 /* TypeReference */ ? node.typeName : - ts.isSupportedExpressionWithTypeArguments(node) ? node.expression : - undefined; - var symbol = typeNameOrExpression && resolveEntityName(typeNameOrExpression, 793056 /* Type */) || unknownSymbol; - var type = symbol === unknownSymbol ? unknownType : - symbol.flags & (32 /* Class */ | 64 /* Interface */) ? getTypeFromClassOrInterfaceReference(node, symbol) : - symbol.flags & 524288 /* TypeAlias */ ? getTypeFromTypeAliasReference(node, symbol) : - getTypeFromNonGenericTypeReference(node, symbol); - // Cache both the resolved symbol and the resolved type. The resolved symbol is needed in when we check the - // type reference in checkTypeReferenceOrExpressionWithTypeArguments. - links.resolvedSymbol = symbol; - links.resolvedType = type; - } - return links.resolvedType; - } - function getTypeFromTypeQueryNode(node) { - var links = getNodeLinks(node); - if (!links.resolvedType) { - // TypeScript 1.0 spec (April 2014): 3.6.3 - // The expression is processed as an identifier expression (section 4.3) - // or property access expression(section 4.10), - // the widened type(section 3.9) of which becomes the result. - links.resolvedType = getWidenedType(checkExpressionOrQualifiedName(node.exprName)); - } - return links.resolvedType; - } - function getTypeOfGlobalSymbol(symbol, arity) { - function getTypeDeclaration(symbol) { - var declarations = symbol.declarations; - for (var _i = 0; _i < declarations.length; _i++) { - var declaration = declarations[_i]; - switch (declaration.kind) { - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - case 207 /* EnumDeclaration */: - return declaration; - } - } - } - if (!symbol) { - return arity ? emptyGenericType : emptyObjectType; - } - var type = getDeclaredTypeOfSymbol(symbol); - if (!(type.flags & 48128 /* ObjectType */)) { - error(getTypeDeclaration(symbol), ts.Diagnostics.Global_type_0_must_be_a_class_or_interface_type, symbol.name); - return arity ? emptyGenericType : emptyObjectType; - } - if ((type.typeParameters ? type.typeParameters.length : 0) !== arity) { - error(getTypeDeclaration(symbol), ts.Diagnostics.Global_type_0_must_have_1_type_parameter_s, symbol.name, arity); - return arity ? emptyGenericType : emptyObjectType; - } - return type; - } - function getGlobalValueSymbol(name) { - return getGlobalSymbol(name, 107455 /* Value */, ts.Diagnostics.Cannot_find_global_value_0); - } - function getGlobalTypeSymbol(name) { - return getGlobalSymbol(name, 793056 /* Type */, ts.Diagnostics.Cannot_find_global_type_0); - } - function getGlobalSymbol(name, meaning, diagnostic) { - return resolveName(undefined, name, meaning, diagnostic, name); - } - function getGlobalType(name, arity) { - if (arity === void 0) { arity = 0; } - return getTypeOfGlobalSymbol(getGlobalTypeSymbol(name), arity); - } - function getGlobalESSymbolConstructorSymbol() { - return globalESSymbolConstructorSymbol || (globalESSymbolConstructorSymbol = getGlobalValueSymbol("Symbol")); - } - /** - * Instantiates a global type that is generic with some element type, and returns that instantiation. - */ - function createTypeFromGenericGlobalType(genericGlobalType, elementType) { - return genericGlobalType !== emptyGenericType ? createTypeReference(genericGlobalType, [elementType]) : emptyObjectType; - } - function createIterableType(elementType) { - return createTypeFromGenericGlobalType(globalIterableType, elementType); - } - function createIterableIteratorType(elementType) { - return createTypeFromGenericGlobalType(globalIterableIteratorType, elementType); - } - function createArrayType(elementType) { - return createTypeFromGenericGlobalType(globalArrayType, elementType); - } - function getTypeFromArrayTypeNode(node) { - var links = getNodeLinks(node); - if (!links.resolvedType) { - links.resolvedType = createArrayType(getTypeFromTypeNode(node.elementType)); - } - return links.resolvedType; - } - function createTupleType(elementTypes) { - var id = getTypeListId(elementTypes); - var type = tupleTypes[id]; - if (!type) { - type = tupleTypes[id] = createObjectType(8192 /* Tuple */); - type.elementTypes = elementTypes; - } - return type; - } - function getTypeFromTupleTypeNode(node) { - var links = getNodeLinks(node); - if (!links.resolvedType) { - links.resolvedType = createTupleType(ts.map(node.elementTypes, getTypeFromTypeNode)); - } - return links.resolvedType; - } - function addTypeToSortedSet(sortedSet, type) { - if (type.flags & 16384 /* Union */) { - addTypesToSortedSet(sortedSet, type.types); - } - else { - var i = 0; - var id = type.id; - while (i < sortedSet.length && sortedSet[i].id < id) { - i++; - } - if (i === sortedSet.length || sortedSet[i].id !== id) { - sortedSet.splice(i, 0, type); - } - } - } - function addTypesToSortedSet(sortedTypes, types) { - for (var _i = 0; _i < types.length; _i++) { - var type = types[_i]; - addTypeToSortedSet(sortedTypes, type); - } - } - function isSubtypeOfAny(candidate, types) { - for (var _i = 0; _i < types.length; _i++) { - var type = types[_i]; - if (candidate !== type && isTypeSubtypeOf(candidate, type)) { - return true; - } - } - return false; - } - function removeSubtypes(types) { - var i = types.length; - while (i > 0) { - i--; - if (isSubtypeOfAny(types[i], types)) { - types.splice(i, 1); - } - } - } - function containsTypeAny(types) { - for (var _i = 0; _i < types.length; _i++) { - var type = types[_i]; - if (isTypeAny(type)) { - return true; - } - } - return false; - } - function removeAllButLast(types, typeToRemove) { - var i = types.length; - while (i > 0 && types.length > 1) { - i--; - if (types[i] === typeToRemove) { - types.splice(i, 1); - } - } - } - // The noSubtypeReduction flag is there because it isn't possible to always do subtype reduction. The flag - // is true when creating a union type from a type node and when instantiating a union type. In both of those - // cases subtype reduction has to be deferred to properly support recursive union types. For example, a - // type alias of the form "type Item = string | (() => Item)" cannot be reduced during its declaration. - function getUnionType(types, noSubtypeReduction) { - if (types.length === 0) { - return emptyObjectType; - } - var sortedTypes = []; - addTypesToSortedSet(sortedTypes, types); - if (noSubtypeReduction) { - if (containsTypeAny(sortedTypes)) { - return anyType; - } - removeAllButLast(sortedTypes, undefinedType); - removeAllButLast(sortedTypes, nullType); - } - else { - removeSubtypes(sortedTypes); - } - if (sortedTypes.length === 1) { - return sortedTypes[0]; - } - var id = getTypeListId(sortedTypes); - var type = unionTypes[id]; - if (!type) { - type = unionTypes[id] = createObjectType(16384 /* Union */ | getWideningFlagsOfTypes(sortedTypes)); - type.types = sortedTypes; - type.reducedType = noSubtypeReduction ? undefined : type; - } - return type; - } - // Subtype reduction is basically an optimization we do to avoid excessively large union types, which take longer - // to process and look strange in quick info and error messages. Semantically there is no difference between the - // reduced type and the type itself. So, when we detect a circularity we simply say that the reduced type is the - // type itself. - function getReducedTypeOfUnionType(type) { - if (!type.reducedType) { - type.reducedType = circularType; - var reducedType = getUnionType(type.types, false); - if (type.reducedType === circularType) { - type.reducedType = reducedType; - } - } - else if (type.reducedType === circularType) { - type.reducedType = type; - } - return type.reducedType; - } - function getTypeFromUnionTypeNode(node) { - var links = getNodeLinks(node); - if (!links.resolvedType) { - links.resolvedType = getUnionType(ts.map(node.types, getTypeFromTypeNode), true); - } - return links.resolvedType; - } - function getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node) { - var links = getNodeLinks(node); - if (!links.resolvedType) { - // Deferred resolution of members is handled by resolveObjectTypeMembers - links.resolvedType = createObjectType(32768 /* Anonymous */, node.symbol); - } - return links.resolvedType; - } - function getStringLiteralType(node) { - if (ts.hasProperty(stringLiteralTypes, node.text)) { - return stringLiteralTypes[node.text]; - } - var type = stringLiteralTypes[node.text] = createType(256 /* StringLiteral */); - type.text = ts.getTextOfNode(node); - return type; - } - function getTypeFromStringLiteral(node) { - var links = getNodeLinks(node); - if (!links.resolvedType) { - links.resolvedType = getStringLiteralType(node); - } - return links.resolvedType; - } - function getTypeFromTypeNode(node) { - switch (node.kind) { - case 112 /* AnyKeyword */: - return anyType; - case 123 /* StringKeyword */: - return stringType; - case 121 /* NumberKeyword */: - return numberType; - case 113 /* BooleanKeyword */: - return booleanType; - case 124 /* SymbolKeyword */: - return esSymbolType; - case 99 /* VoidKeyword */: - return voidType; - case 8 /* StringLiteral */: - return getTypeFromStringLiteral(node); - case 144 /* TypeReference */: - return getTypeFromTypeReference(node); - case 143 /* TypePredicate */: - return booleanType; - case 179 /* ExpressionWithTypeArguments */: - return getTypeFromTypeReference(node); - case 147 /* TypeQuery */: - return getTypeFromTypeQueryNode(node); - case 149 /* ArrayType */: - return getTypeFromArrayTypeNode(node); - case 150 /* TupleType */: - return getTypeFromTupleTypeNode(node); - case 151 /* UnionType */: - return getTypeFromUnionTypeNode(node); - case 152 /* ParenthesizedType */: - return getTypeFromTypeNode(node.type); - case 145 /* FunctionType */: - case 146 /* ConstructorType */: - case 148 /* TypeLiteral */: - return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); - // This function assumes that an identifier or qualified name is a type expression - // Callers should first ensure this by calling isTypeNode - case 65 /* Identifier */: - case 128 /* QualifiedName */: - var symbol = getSymbolInfo(node); - return symbol && getDeclaredTypeOfSymbol(symbol); - default: - return unknownType; - } - } - function instantiateList(items, mapper, instantiator) { - if (items && items.length) { - var result = []; - for (var _i = 0; _i < items.length; _i++) { - var v = items[_i]; - result.push(instantiator(v, mapper)); - } - return result; - } - return items; - } - function createUnaryTypeMapper(source, target) { - return function (t) { return t === source ? target : t; }; - } - function createBinaryTypeMapper(source1, target1, source2, target2) { - return function (t) { return t === source1 ? target1 : t === source2 ? target2 : t; }; - } - function createTypeMapper(sources, targets) { - switch (sources.length) { - case 1: return createUnaryTypeMapper(sources[0], targets[0]); - case 2: return createBinaryTypeMapper(sources[0], targets[0], sources[1], targets[1]); - } - return function (t) { - for (var i = 0; i < sources.length; i++) { - if (t === sources[i]) { - return targets[i]; - } - } - return t; - }; - } - function createUnaryTypeEraser(source) { - return function (t) { return t === source ? anyType : t; }; - } - function createBinaryTypeEraser(source1, source2) { - return function (t) { return t === source1 || t === source2 ? anyType : t; }; - } - function createTypeEraser(sources) { - switch (sources.length) { - case 1: return createUnaryTypeEraser(sources[0]); - case 2: return createBinaryTypeEraser(sources[0], sources[1]); - } - return function (t) { - for (var _i = 0; _i < sources.length; _i++) { - var source = sources[_i]; - if (t === source) { - return anyType; - } - } - return t; - }; - } - function createInferenceMapper(context) { - return function (t) { - for (var i = 0; i < context.typeParameters.length; i++) { - if (t === context.typeParameters[i]) { - context.inferences[i].isFixed = true; - return getInferredType(context, i); - } - } - return t; - }; - } - function identityMapper(type) { - return type; - } - function combineTypeMappers(mapper1, mapper2) { - return function (t) { return instantiateType(mapper1(t), mapper2); }; - } - function instantiateTypeParameter(typeParameter, mapper) { - var result = createType(512 /* TypeParameter */); - result.symbol = typeParameter.symbol; - if (typeParameter.constraint) { - result.constraint = instantiateType(typeParameter.constraint, mapper); - } - else { - result.target = typeParameter; - result.mapper = mapper; - } - return result; - } - function instantiateSignature(signature, mapper, eraseTypeParameters) { - var freshTypeParameters; - var freshTypePredicate; - if (signature.typeParameters && !eraseTypeParameters) { - freshTypeParameters = instantiateList(signature.typeParameters, mapper, instantiateTypeParameter); - mapper = combineTypeMappers(createTypeMapper(signature.typeParameters, freshTypeParameters), mapper); - } - if (signature.typePredicate) { - freshTypePredicate = { - parameterName: signature.typePredicate.parameterName, - parameterIndex: signature.typePredicate.parameterIndex, - type: instantiateType(signature.typePredicate.type, mapper) - }; - } - var result = createSignature(signature.declaration, freshTypeParameters, instantiateList(signature.parameters, mapper, instantiateSymbol), signature.resolvedReturnType ? instantiateType(signature.resolvedReturnType, mapper) : undefined, freshTypePredicate, signature.minArgumentCount, signature.hasRestParameter, signature.hasStringLiterals); - result.target = signature; - result.mapper = mapper; - return result; - } - function instantiateSymbol(symbol, mapper) { - if (symbol.flags & 16777216 /* Instantiated */) { - var links = getSymbolLinks(symbol); - // If symbol being instantiated is itself a instantiation, fetch the original target and combine the - // type mappers. This ensures that original type identities are properly preserved and that aliases - // always reference a non-aliases. - symbol = links.target; - mapper = combineTypeMappers(links.mapper, mapper); - } - // Keep the flags from the symbol we're instantiating. Mark that is instantiated, and - // also transient so that we can just store data on it directly. - var result = createSymbol(16777216 /* Instantiated */ | 67108864 /* Transient */ | symbol.flags, symbol.name); - result.declarations = symbol.declarations; - result.parent = symbol.parent; - result.target = symbol; - result.mapper = mapper; - if (symbol.valueDeclaration) { - result.valueDeclaration = symbol.valueDeclaration; - } - return result; - } - function instantiateAnonymousType(type, mapper) { - // Mark the anonymous type as instantiated such that our infinite instantiation detection logic can recognize it - var result = createObjectType(32768 /* Anonymous */ | 65536 /* Instantiated */, type.symbol); - result.properties = instantiateList(getPropertiesOfObjectType(type), mapper, instantiateSymbol); - result.members = createSymbolTable(result.properties); - result.callSignatures = instantiateList(getSignaturesOfType(type, 0 /* Call */), mapper, instantiateSignature); - result.constructSignatures = instantiateList(getSignaturesOfType(type, 1 /* Construct */), mapper, instantiateSignature); - var stringIndexType = getIndexTypeOfType(type, 0 /* String */); - var numberIndexType = getIndexTypeOfType(type, 1 /* Number */); - if (stringIndexType) - result.stringIndexType = instantiateType(stringIndexType, mapper); - if (numberIndexType) - result.numberIndexType = instantiateType(numberIndexType, mapper); - return result; - } - function instantiateType(type, mapper) { - if (mapper !== identityMapper) { - if (type.flags & 512 /* TypeParameter */) { - return mapper(type); - } - if (type.flags & 32768 /* Anonymous */) { - return type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) ? - instantiateAnonymousType(type, mapper) : type; - } - if (type.flags & 4096 /* Reference */) { - return createTypeReference(type.target, instantiateList(type.typeArguments, mapper, instantiateType)); - } - if (type.flags & 8192 /* Tuple */) { - return createTupleType(instantiateList(type.elementTypes, mapper, instantiateType)); - } - if (type.flags & 16384 /* Union */) { - return getUnionType(instantiateList(type.types, mapper, instantiateType), true); - } - } - return type; - } - // Returns true if the given expression contains (at any level of nesting) a function or arrow expression - // that is subject to contextual typing. - function isContextSensitive(node) { - ts.Debug.assert(node.kind !== 136 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); - switch (node.kind) { - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - return isContextSensitiveFunctionLikeDeclaration(node); - case 157 /* ObjectLiteralExpression */: - return ts.forEach(node.properties, isContextSensitive); - case 156 /* ArrayLiteralExpression */: - return ts.forEach(node.elements, isContextSensitive); - case 173 /* ConditionalExpression */: - return isContextSensitive(node.whenTrue) || - isContextSensitive(node.whenFalse); - case 172 /* BinaryExpression */: - return node.operatorToken.kind === 49 /* BarBarToken */ && - (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 227 /* PropertyAssignment */: - return isContextSensitive(node.initializer); - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - return isContextSensitiveFunctionLikeDeclaration(node); - case 164 /* ParenthesizedExpression */: - return isContextSensitive(node.expression); - } - return false; - } - function isContextSensitiveFunctionLikeDeclaration(node) { - return !node.typeParameters && node.parameters.length && !ts.forEach(node.parameters, function (p) { return p.type; }); - } - function getTypeWithoutConstructors(type) { - if (type.flags & 48128 /* ObjectType */) { - var resolved = resolveObjectOrUnionTypeMembers(type); - if (resolved.constructSignatures.length) { - var result = createObjectType(32768 /* Anonymous */, type.symbol); - result.members = resolved.members; - result.properties = resolved.properties; - result.callSignatures = resolved.callSignatures; - result.constructSignatures = emptyArray; - type = result; - } - } - return type; - } - // TYPE CHECKING - var subtypeRelation = {}; - var assignableRelation = {}; - var identityRelation = {}; - function isTypeIdenticalTo(source, target) { - return checkTypeRelatedTo(source, target, identityRelation, undefined); - } - function compareTypes(source, target) { - return checkTypeRelatedTo(source, target, identityRelation, undefined) ? -1 /* True */ : 0 /* False */; - } - function isTypeSubtypeOf(source, target) { - return checkTypeSubtypeOf(source, target, undefined); - } - function isTypeAssignableTo(source, target) { - return checkTypeAssignableTo(source, target, undefined); - } - function checkTypeSubtypeOf(source, target, errorNode, headMessage, containingMessageChain) { - return checkTypeRelatedTo(source, target, subtypeRelation, errorNode, headMessage, containingMessageChain); - } - function checkTypeAssignableTo(source, target, errorNode, headMessage) { - return checkTypeRelatedTo(source, target, assignableRelation, errorNode, headMessage); - } - function isSignatureAssignableTo(source, target) { - var sourceType = getOrCreateTypeFromSignature(source); - var targetType = getOrCreateTypeFromSignature(target); - return checkTypeRelatedTo(sourceType, targetType, assignableRelation, undefined); - } - function checkTypeRelatedTo(source, target, relation, errorNode, headMessage, containingMessageChain) { - var errorInfo; - var sourceStack; - var targetStack; - var maybeStack; - var expandingFlags; - var depth = 0; - var overflow = false; - var elaborateErrors = false; - ts.Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking"); - var result = isRelatedTo(source, target, errorNode !== undefined, headMessage); - if (overflow) { - error(errorNode, ts.Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target)); - } - else if (errorInfo) { - // If we already computed this relation, but in a context where we didn't want to report errors (e.g. overload resolution), - // then we'll only have a top-level error (e.g. 'Class X does not implement interface Y') without any details. If this happened, - // request a recompuation to get a complete error message. This will be skipped if we've already done this computation in a context - // where errors were being reported. - if (errorInfo.next === undefined) { - errorInfo = undefined; - elaborateErrors = true; - isRelatedTo(source, target, errorNode !== undefined, headMessage); - } - if (containingMessageChain) { - errorInfo = ts.concatenateDiagnosticMessageChains(containingMessageChain, errorInfo); - } - diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(errorNode, errorInfo)); - } - return result !== 0 /* False */; - function reportError(message, arg0, arg1, arg2) { - errorInfo = ts.chainDiagnosticMessages(errorInfo, message, arg0, arg1, arg2); - } - // Compare two types and return - // Ternary.True if they are related with no assumptions, - // Ternary.Maybe if they are related with assumptions of other relationships, or - // Ternary.False if they are not related. - function isRelatedTo(source, target, reportErrors, headMessage) { - var result; - // both types are the same - covers 'they are the same primitive type or both are Any' or the same type parameter cases - if (source === target) - return -1 /* True */; - if (relation !== identityRelation) { - if (isTypeAny(target)) - return -1 /* True */; - if (source === undefinedType) - return -1 /* True */; - if (source === nullType && target !== undefinedType) - return -1 /* True */; - if (source.flags & 128 /* Enum */ && target === numberType) - return -1 /* True */; - if (source.flags & 256 /* StringLiteral */ && target === stringType) - return -1 /* True */; - if (relation === assignableRelation) { - if (isTypeAny(source)) - return -1 /* True */; - if (source === numberType && target.flags & 128 /* Enum */) - return -1 /* True */; - } - } - var saveErrorInfo = errorInfo; - if (source.flags & 16384 /* Union */ || target.flags & 16384 /* Union */) { - if (relation === identityRelation) { - if (source.flags & 16384 /* Union */ && target.flags & 16384 /* Union */) { - if (result = unionTypeRelatedToUnionType(source, target)) { - if (result &= unionTypeRelatedToUnionType(target, source)) { - return result; - } - } - } - else if (source.flags & 16384 /* Union */) { - if (result = unionTypeRelatedToType(source, target, reportErrors)) { - return result; - } - } - else { - if (result = unionTypeRelatedToType(target, source, reportErrors)) { - return result; - } - } - } - else { - if (source.flags & 16384 /* Union */) { - if (result = unionTypeRelatedToType(source, target, reportErrors)) { - return result; - } - } - else { - if (result = typeRelatedToUnionType(source, target, reportErrors)) { - return result; - } - } - } - } - else if (source.flags & 512 /* TypeParameter */ && target.flags & 512 /* TypeParameter */) { - if (result = typeParameterRelatedTo(source, target, reportErrors)) { - return result; - } - } - else if (source.flags & 4096 /* Reference */ && target.flags & 4096 /* Reference */ && source.target === target.target) { - // We have type references to same target type, see if relationship holds for all type arguments - if (result = typesRelatedTo(source.typeArguments, target.typeArguments, reportErrors)) { - return result; - } - } - // Even if relationship doesn't hold for unions, type parameters, or generic type references, - // it may hold in a structural comparison. - // Report structural errors only if we haven't reported any errors yet - var reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo; - // identity relation does not use apparent type - var sourceOrApparentType = relation === identityRelation ? source : getApparentType(source); - if (sourceOrApparentType.flags & 48128 /* ObjectType */ && target.flags & 48128 /* ObjectType */) { - if (result = objectTypeRelatedTo(sourceOrApparentType, target, reportStructuralErrors)) { - errorInfo = saveErrorInfo; - return result; - } - } - else if (source.flags & 512 /* TypeParameter */ && sourceOrApparentType.flags & 16384 /* Union */) { - // We clear the errors first because the following check often gives a better error than - // the union comparison above if it is applicable. - errorInfo = saveErrorInfo; - if (result = isRelatedTo(sourceOrApparentType, target, reportErrors)) { - return result; - } - } - if (reportErrors) { - headMessage = headMessage || ts.Diagnostics.Type_0_is_not_assignable_to_type_1; - var sourceType = typeToString(source); - var targetType = typeToString(target); - if (sourceType === targetType) { - sourceType = typeToString(source, undefined, 128 /* UseFullyQualifiedType */); - targetType = typeToString(target, undefined, 128 /* UseFullyQualifiedType */); - } - reportError(headMessage, sourceType, targetType); - } - return 0 /* False */; - } - function unionTypeRelatedToUnionType(source, target) { - var result = -1 /* True */; - var sourceTypes = source.types; - for (var _i = 0; _i < sourceTypes.length; _i++) { - var sourceType = sourceTypes[_i]; - var related = typeRelatedToUnionType(sourceType, target, false); - if (!related) { - return 0 /* False */; - } - result &= related; - } - return result; - } - function typeRelatedToUnionType(source, target, reportErrors) { - var targetTypes = target.types; - for (var i = 0, len = targetTypes.length; i < len; i++) { - var related = isRelatedTo(source, targetTypes[i], reportErrors && i === len - 1); - if (related) { - return related; - } - } - return 0 /* False */; - } - function unionTypeRelatedToType(source, target, reportErrors) { - var result = -1 /* True */; - var sourceTypes = source.types; - for (var _i = 0; _i < sourceTypes.length; _i++) { - var sourceType = sourceTypes[_i]; - var related = isRelatedTo(sourceType, target, reportErrors); - if (!related) { - return 0 /* False */; - } - result &= related; - } - return result; - } - function typesRelatedTo(sources, targets, reportErrors) { - var result = -1 /* True */; - for (var i = 0, len = sources.length; i < len; i++) { - var related = isRelatedTo(sources[i], targets[i], reportErrors); - if (!related) { - return 0 /* False */; - } - result &= related; - } - return result; - } - function typeParameterRelatedTo(source, target, reportErrors) { - if (relation === identityRelation) { - if (source.symbol.name !== target.symbol.name) { - return 0 /* False */; - } - // covers case when both type parameters does not have constraint (both equal to noConstraintType) - if (source.constraint === target.constraint) { - return -1 /* True */; - } - if (source.constraint === noConstraintType || target.constraint === noConstraintType) { - return 0 /* False */; - } - return isRelatedTo(source.constraint, target.constraint, reportErrors); - } - else { - while (true) { - var constraint = getConstraintOfTypeParameter(source); - if (constraint === target) - return -1 /* True */; - if (!(constraint && constraint.flags & 512 /* TypeParameter */)) - break; - source = constraint; - } - return 0 /* False */; - } - } - // Determine if two object types are related by structure. First, check if the result is already available in the global cache. - // Second, check if we have already started a comparison of the given two types in which case we assume the result to be true. - // Third, check if both types are part of deeply nested chains of generic type instantiations and if so assume the types are - // equal and infinitely expanding. Fourth, if we have reached a depth of 100 nested comparisons, assume we have runaway recursion - // and issue an error. Otherwise, actually compare the structure of the two types. - function objectTypeRelatedTo(source, target, reportErrors) { - if (overflow) { - return 0 /* False */; - } - var id = relation !== identityRelation || source.id < target.id ? source.id + "," + target.id : target.id + "," + source.id; - var related = relation[id]; - //let related: RelationComparisonResult = undefined; // relation[id]; - if (related !== undefined) { - // If we computed this relation already and it was failed and reported, or if we're not being asked to elaborate - // errors, we can use the cached value. Otherwise, recompute the relation - if (!elaborateErrors || (related === 3 /* FailedAndReported */)) { - return related === 1 /* Succeeded */ ? -1 /* True */ : 0 /* False */; - } - } - if (depth > 0) { - for (var i = 0; i < depth; i++) { - // If source and target are already being compared, consider them related with assumptions - if (maybeStack[i][id]) { - return 1 /* Maybe */; - } - } - if (depth === 100) { - overflow = true; - return 0 /* False */; - } - } - else { - sourceStack = []; - targetStack = []; - maybeStack = []; - expandingFlags = 0; - } - sourceStack[depth] = source; - targetStack[depth] = target; - maybeStack[depth] = {}; - maybeStack[depth][id] = 1 /* Succeeded */; - depth++; - var saveExpandingFlags = expandingFlags; - if (!(expandingFlags & 1) && isDeeplyNestedGeneric(source, sourceStack, depth)) - expandingFlags |= 1; - if (!(expandingFlags & 2) && isDeeplyNestedGeneric(target, targetStack, depth)) - expandingFlags |= 2; - var result; - if (expandingFlags === 3) { - result = 1 /* Maybe */; - } - else { - result = propertiesRelatedTo(source, target, reportErrors); - if (result) { - result &= signaturesRelatedTo(source, target, 0 /* Call */, reportErrors); - if (result) { - result &= signaturesRelatedTo(source, target, 1 /* Construct */, reportErrors); - if (result) { - result &= stringIndexTypesRelatedTo(source, target, reportErrors); - if (result) { - result &= numberIndexTypesRelatedTo(source, target, reportErrors); - } - } - } - } - } - expandingFlags = saveExpandingFlags; - depth--; - if (result) { - var maybeCache = maybeStack[depth]; - // If result is definitely true, copy assumptions to global cache, else copy to next level up - var destinationCache = (result === -1 /* True */ || depth === 0) ? relation : maybeStack[depth - 1]; - ts.copyMap(maybeCache, destinationCache); - } - else { - // A false result goes straight into global cache (when something is false under assumptions it - // will also be false without assumptions) - relation[id] = reportErrors ? 3 /* FailedAndReported */ : 2 /* Failed */; - } - return result; - } - function propertiesRelatedTo(source, target, reportErrors) { - if (relation === identityRelation) { - return propertiesIdenticalTo(source, target); - } - var result = -1 /* True */; - var properties = getPropertiesOfObjectType(target); - var requireOptionalProperties = relation === subtypeRelation && !(source.flags & 262144 /* ObjectLiteral */); - for (var _i = 0; _i < properties.length; _i++) { - var targetProp = properties[_i]; - var sourceProp = getPropertyOfType(source, targetProp.name); - if (sourceProp !== targetProp) { - if (!sourceProp) { - if (!(targetProp.flags & 536870912 /* Optional */) || requireOptionalProperties) { - if (reportErrors) { - reportError(ts.Diagnostics.Property_0_is_missing_in_type_1, symbolToString(targetProp), typeToString(source)); - } - return 0 /* False */; - } - } - else if (!(targetProp.flags & 134217728 /* Prototype */)) { - var sourceFlags = getDeclarationFlagsFromSymbol(sourceProp); - var targetFlags = getDeclarationFlagsFromSymbol(targetProp); - if (sourceFlags & 32 /* Private */ || targetFlags & 32 /* Private */) { - if (sourceProp.valueDeclaration !== targetProp.valueDeclaration) { - if (reportErrors) { - if (sourceFlags & 32 /* Private */ && targetFlags & 32 /* Private */) { - reportError(ts.Diagnostics.Types_have_separate_declarations_of_a_private_property_0, symbolToString(targetProp)); - } - else { - reportError(ts.Diagnostics.Property_0_is_private_in_type_1_but_not_in_type_2, symbolToString(targetProp), typeToString(sourceFlags & 32 /* Private */ ? source : target), typeToString(sourceFlags & 32 /* Private */ ? target : source)); - } - } - return 0 /* False */; - } - } - else if (targetFlags & 64 /* Protected */) { - var sourceDeclaredInClass = sourceProp.parent && sourceProp.parent.flags & 32 /* Class */; - var sourceClass = sourceDeclaredInClass ? getDeclaredTypeOfSymbol(sourceProp.parent) : undefined; - var targetClass = getDeclaredTypeOfSymbol(targetProp.parent); - if (!sourceClass || !hasBaseType(sourceClass, targetClass)) { - if (reportErrors) { - reportError(ts.Diagnostics.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2, symbolToString(targetProp), typeToString(sourceClass || source), typeToString(targetClass)); - } - return 0 /* False */; - } - } - else if (sourceFlags & 64 /* Protected */) { - if (reportErrors) { - reportError(ts.Diagnostics.Property_0_is_protected_in_type_1_but_public_in_type_2, symbolToString(targetProp), typeToString(source), typeToString(target)); - } - return 0 /* False */; - } - var related = isRelatedTo(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp), reportErrors); - if (!related) { - if (reportErrors) { - reportError(ts.Diagnostics.Types_of_property_0_are_incompatible, symbolToString(targetProp)); - } - return 0 /* False */; - } - result &= related; - if (sourceProp.flags & 536870912 /* Optional */ && !(targetProp.flags & 536870912 /* Optional */)) { - // TypeScript 1.0 spec (April 2014): 3.8.3 - // S is a subtype of a type T, and T is a supertype of S if ... - // S' and T are object types and, for each member M in T.. - // M is a property and S' contains a property N where - // if M is a required property, N is also a required property - // (M - property in T) - // (N - property in S) - if (reportErrors) { - reportError(ts.Diagnostics.Property_0_is_optional_in_type_1_but_required_in_type_2, symbolToString(targetProp), typeToString(source), typeToString(target)); - } - return 0 /* False */; - } - } - } - } - return result; - } - function propertiesIdenticalTo(source, target) { - var sourceProperties = getPropertiesOfObjectType(source); - var targetProperties = getPropertiesOfObjectType(target); - if (sourceProperties.length !== targetProperties.length) { - return 0 /* False */; - } - var result = -1 /* True */; - for (var _i = 0; _i < sourceProperties.length; _i++) { - var sourceProp = sourceProperties[_i]; - var targetProp = getPropertyOfObjectType(target, sourceProp.name); - if (!targetProp) { - return 0 /* False */; - } - var related = compareProperties(sourceProp, targetProp, isRelatedTo); - if (!related) { - return 0 /* False */; - } - result &= related; - } - return result; - } - function signaturesRelatedTo(source, target, kind, reportErrors) { - if (relation === identityRelation) { - return signaturesIdenticalTo(source, target, kind); - } - if (target === anyFunctionType || source === anyFunctionType) { - return -1 /* True */; - } - var sourceSignatures = getSignaturesOfType(source, kind); - var targetSignatures = getSignaturesOfType(target, kind); - var result = -1 /* True */; - var saveErrorInfo = errorInfo; - outer: for (var _i = 0; _i < targetSignatures.length; _i++) { - var t = targetSignatures[_i]; - if (!t.hasStringLiterals || target.flags & 131072 /* FromSignature */) { - var localErrors = reportErrors; - for (var _a = 0; _a < sourceSignatures.length; _a++) { - var s = sourceSignatures[_a]; - if (!s.hasStringLiterals || source.flags & 131072 /* FromSignature */) { - var related = signatureRelatedTo(s, t, localErrors); - if (related) { - result &= related; - errorInfo = saveErrorInfo; - continue outer; - } - // Only report errors from the first failure - localErrors = false; - } - } - return 0 /* False */; - } - } - return result; - } - function signatureRelatedTo(source, target, reportErrors) { - if (source === target) { - return -1 /* True */; - } - if (!target.hasRestParameter && source.minArgumentCount > target.parameters.length) { - return 0 /* False */; - } - var sourceMax = source.parameters.length; - var targetMax = target.parameters.length; - var checkCount; - if (source.hasRestParameter && target.hasRestParameter) { - checkCount = sourceMax > targetMax ? sourceMax : targetMax; - sourceMax--; - targetMax--; - } - else if (source.hasRestParameter) { - sourceMax--; - checkCount = targetMax; - } - else if (target.hasRestParameter) { - targetMax--; - checkCount = sourceMax; - } - else { - checkCount = sourceMax < targetMax ? sourceMax : targetMax; - } - // Spec 1.0 Section 3.8.3 & 3.8.4: - // M and N (the signatures) are instantiated using type Any as the type argument for all type parameters declared by M and N - source = getErasedSignature(source); - target = getErasedSignature(target); - var result = -1 /* True */; - for (var i = 0; i < checkCount; i++) { - var s_1 = i < sourceMax ? getTypeOfSymbol(source.parameters[i]) : getRestTypeOfSignature(source); - var t_1 = i < targetMax ? getTypeOfSymbol(target.parameters[i]) : getRestTypeOfSignature(target); - var saveErrorInfo = errorInfo; - var related = isRelatedTo(s_1, t_1, reportErrors); - if (!related) { - related = isRelatedTo(t_1, s_1, false); - if (!related) { - if (reportErrors) { - reportError(ts.Diagnostics.Types_of_parameters_0_and_1_are_incompatible, source.parameters[i < sourceMax ? i : sourceMax].name, target.parameters[i < targetMax ? i : targetMax].name); - } - return 0 /* False */; - } - errorInfo = saveErrorInfo; - } - result &= related; - } - if (source.typePredicate && target.typePredicate) { - var hasDifferentParameterIndex = source.typePredicate.parameterIndex !== target.typePredicate.parameterIndex; - var hasDifferentTypes; - if (hasDifferentParameterIndex || - (hasDifferentTypes = !isTypeIdenticalTo(source.typePredicate.type, target.typePredicate.type))) { - if (reportErrors) { - var sourceParamText = source.typePredicate.parameterName; - var targetParamText = target.typePredicate.parameterName; - var sourceTypeText = typeToString(source.typePredicate.type); - var targetTypeText = typeToString(target.typePredicate.type); - if (hasDifferentParameterIndex) { - reportError(ts.Diagnostics.Parameter_0_is_not_in_the_same_position_as_parameter_1, sourceParamText, targetParamText); - } - else if (hasDifferentTypes) { - reportError(ts.Diagnostics.Type_0_is_not_assignable_to_type_1, sourceTypeText, targetTypeText); - } - reportError(ts.Diagnostics.Type_predicate_0_is_not_assignable_to_1, sourceParamText + " is " + sourceTypeText, targetParamText + " is " + targetTypeText); - } - return 0 /* False */; - } - } - else if (!source.typePredicate && target.typePredicate) { - if (reportErrors) { - reportError(ts.Diagnostics.Signature_0_must_have_a_type_predicate, signatureToString(source)); - } - return 0 /* False */; - } - var t = getReturnTypeOfSignature(target); - if (t === voidType) - return result; - var s = getReturnTypeOfSignature(source); - return result & isRelatedTo(s, t, reportErrors); - } - function signaturesIdenticalTo(source, target, kind) { - var sourceSignatures = getSignaturesOfType(source, kind); - var targetSignatures = getSignaturesOfType(target, kind); - if (sourceSignatures.length !== targetSignatures.length) { - return 0 /* False */; - } - var result = -1 /* True */; - for (var i = 0, len = sourceSignatures.length; i < len; ++i) { - var related = compareSignatures(sourceSignatures[i], targetSignatures[i], true, isRelatedTo); - if (!related) { - return 0 /* False */; - } - result &= related; - } - return result; - } - function stringIndexTypesRelatedTo(source, target, reportErrors) { - if (relation === identityRelation) { - return indexTypesIdenticalTo(0 /* String */, source, target); - } - var targetType = getIndexTypeOfType(target, 0 /* String */); - if (targetType) { - var sourceType = getIndexTypeOfType(source, 0 /* String */); - if (!sourceType) { - if (reportErrors) { - reportError(ts.Diagnostics.Index_signature_is_missing_in_type_0, typeToString(source)); - } - return 0 /* False */; - } - var related = isRelatedTo(sourceType, targetType, reportErrors); - if (!related) { - if (reportErrors) { - reportError(ts.Diagnostics.Index_signatures_are_incompatible); - } - return 0 /* False */; - } - return related; - } - return -1 /* True */; - } - function numberIndexTypesRelatedTo(source, target, reportErrors) { - if (relation === identityRelation) { - return indexTypesIdenticalTo(1 /* Number */, source, target); - } - var targetType = getIndexTypeOfType(target, 1 /* Number */); - if (targetType) { - var sourceStringType = getIndexTypeOfType(source, 0 /* String */); - var sourceNumberType = getIndexTypeOfType(source, 1 /* Number */); - if (!(sourceStringType || sourceNumberType)) { - if (reportErrors) { - reportError(ts.Diagnostics.Index_signature_is_missing_in_type_0, typeToString(source)); - } - return 0 /* False */; - } - var related; - if (sourceStringType && sourceNumberType) { - // If we know for sure we're testing both string and numeric index types then only report errors from the second one - related = isRelatedTo(sourceStringType, targetType, false) || isRelatedTo(sourceNumberType, targetType, reportErrors); - } - else { - related = isRelatedTo(sourceStringType || sourceNumberType, targetType, reportErrors); - } - if (!related) { - if (reportErrors) { - reportError(ts.Diagnostics.Index_signatures_are_incompatible); - } - return 0 /* False */; - } - return related; - } - return -1 /* True */; - } - function indexTypesIdenticalTo(indexKind, source, target) { - var targetType = getIndexTypeOfType(target, indexKind); - var sourceType = getIndexTypeOfType(source, indexKind); - if (!sourceType && !targetType) { - return -1 /* True */; - } - if (sourceType && targetType) { - return isRelatedTo(sourceType, targetType); - } - return 0 /* False */; - } - } - // Return true if the given type is part of a deeply nested chain of generic instantiations. We consider this to be the case - // when structural type comparisons have been started for 10 or more instantiations of the same generic type. It is possible, - // though highly unlikely, for this test to be true in a situation where a chain of instantiations is not infinitely expanding. - // Effectively, we will generate a false positive when two types are structurally equal to at least 10 levels, but unequal at - // some level beyond that. - function isDeeplyNestedGeneric(type, stack, depth) { - // We track type references (created by createTypeReference) and instantiated types (created by instantiateType) - if (type.flags & (4096 /* Reference */ | 65536 /* Instantiated */) && depth >= 5) { - var symbol = type.symbol; - var count = 0; - for (var i = 0; i < depth; i++) { - var t = stack[i]; - if (t.flags & (4096 /* Reference */ | 65536 /* Instantiated */) && t.symbol === symbol) { - count++; - if (count >= 5) - return true; - } - } - } - return false; - } - function isPropertyIdenticalTo(sourceProp, targetProp) { - return compareProperties(sourceProp, targetProp, compareTypes) !== 0 /* False */; - } - function compareProperties(sourceProp, targetProp, compareTypes) { - // Two members are considered identical when - // - they are public properties with identical names, optionality, and types, - // - they are private or protected properties originating in the same declaration and having identical types - if (sourceProp === targetProp) { - return -1 /* True */; - } - var sourcePropAccessibility = getDeclarationFlagsFromSymbol(sourceProp) & (32 /* Private */ | 64 /* Protected */); - var targetPropAccessibility = getDeclarationFlagsFromSymbol(targetProp) & (32 /* Private */ | 64 /* Protected */); - if (sourcePropAccessibility !== targetPropAccessibility) { - return 0 /* False */; - } - if (sourcePropAccessibility) { - if (getTargetSymbol(sourceProp) !== getTargetSymbol(targetProp)) { - return 0 /* False */; - } - } - else { - if ((sourceProp.flags & 536870912 /* Optional */) !== (targetProp.flags & 536870912 /* Optional */)) { - return 0 /* False */; - } - } - return compareTypes(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp)); - } - function compareSignatures(source, target, compareReturnTypes, compareTypes) { - if (source === target) { - return -1 /* True */; - } - if (source.parameters.length !== target.parameters.length || - source.minArgumentCount !== target.minArgumentCount || - source.hasRestParameter !== target.hasRestParameter) { - return 0 /* False */; - } - var result = -1 /* True */; - if (source.typeParameters && target.typeParameters) { - if (source.typeParameters.length !== target.typeParameters.length) { - return 0 /* False */; - } - for (var i = 0, len = source.typeParameters.length; i < len; ++i) { - var related = compareTypes(source.typeParameters[i], target.typeParameters[i]); - if (!related) { - return 0 /* False */; - } - result &= related; - } - } - else if (source.typeParameters || target.typeParameters) { - return 0 /* False */; - } - // Spec 1.0 Section 3.8.3 & 3.8.4: - // M and N (the signatures) are instantiated using type Any as the type argument for all type parameters declared by M and N - source = getErasedSignature(source); - target = getErasedSignature(target); - for (var i = 0, len = source.parameters.length; i < len; i++) { - var s = source.hasRestParameter && i === len - 1 ? getRestTypeOfSignature(source) : getTypeOfSymbol(source.parameters[i]); - var t = target.hasRestParameter && i === len - 1 ? getRestTypeOfSignature(target) : getTypeOfSymbol(target.parameters[i]); - var related = compareTypes(s, t); - if (!related) { - return 0 /* False */; - } - result &= related; - } - if (compareReturnTypes) { - result &= compareTypes(getReturnTypeOfSignature(source), getReturnTypeOfSignature(target)); - } - return result; - } - function isSupertypeOfEach(candidate, types) { - for (var _i = 0; _i < types.length; _i++) { - var type = types[_i]; - if (candidate !== type && !isTypeSubtypeOf(type, candidate)) - return false; - } - return true; - } - function getCommonSupertype(types) { - return ts.forEach(types, function (t) { return isSupertypeOfEach(t, types) ? t : undefined; }); - } - function reportNoCommonSupertypeError(types, errorLocation, errorMessageChainHead) { - // The downfallType/bestSupertypeDownfallType is the first type that caused a particular candidate - // to not be the common supertype. So if it weren't for this one downfallType (and possibly others), - // the type in question could have been the common supertype. - var bestSupertype; - var bestSupertypeDownfallType; - var bestSupertypeScore = 0; - for (var i = 0; i < types.length; i++) { - var score = 0; - var downfallType = undefined; - for (var j = 0; j < types.length; j++) { - if (isTypeSubtypeOf(types[j], types[i])) { - score++; - } - else if (!downfallType) { - downfallType = types[j]; - } - } - ts.Debug.assert(!!downfallType, "If there is no common supertype, each type should have a downfallType"); - if (score > bestSupertypeScore) { - bestSupertype = types[i]; - bestSupertypeDownfallType = downfallType; - bestSupertypeScore = score; - } - // types.length - 1 is the maximum score, given that getCommonSupertype returned false - if (bestSupertypeScore === types.length - 1) { - break; - } - } - // In the following errors, the {1} slot is before the {0} slot because checkTypeSubtypeOf supplies the - // subtype as the first argument to the error - checkTypeSubtypeOf(bestSupertypeDownfallType, bestSupertype, errorLocation, ts.Diagnostics.Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0, errorMessageChainHead); - } - function isArrayType(type) { - return type.flags & 4096 /* Reference */ && type.target === globalArrayType; - } - function isArrayLikeType(type) { - // A type is array-like if it is not the undefined or null type and if it is assignable to any[] - return !(type.flags & (32 /* Undefined */ | 64 /* Null */)) && isTypeAssignableTo(type, anyArrayType); - } - function isTupleLikeType(type) { - return !!getPropertyOfType(type, "0"); - } - /** - * Check if a Type was written as a tuple type literal. - * Prefer using isTupleLikeType() unless the use of `elementTypes` is required. - */ - function isTupleType(type) { - return (type.flags & 8192 /* Tuple */) && !!type.elementTypes; - } - function getWidenedTypeOfObjectLiteral(type) { - var properties = getPropertiesOfObjectType(type); - var members = {}; - ts.forEach(properties, function (p) { - var propType = getTypeOfSymbol(p); - var widenedType = getWidenedType(propType); - if (propType !== widenedType) { - var symbol = createSymbol(p.flags | 67108864 /* Transient */, p.name); - symbol.declarations = p.declarations; - symbol.parent = p.parent; - symbol.type = widenedType; - symbol.target = p; - if (p.valueDeclaration) - symbol.valueDeclaration = p.valueDeclaration; - p = symbol; - } - members[p.name] = p; - }); - var stringIndexType = getIndexTypeOfType(type, 0 /* String */); - var numberIndexType = getIndexTypeOfType(type, 1 /* Number */); - if (stringIndexType) - stringIndexType = getWidenedType(stringIndexType); - if (numberIndexType) - numberIndexType = getWidenedType(numberIndexType); - return createAnonymousType(type.symbol, members, emptyArray, emptyArray, stringIndexType, numberIndexType); - } - function getWidenedType(type) { - if (type.flags & 1572864 /* RequiresWidening */) { - if (type.flags & (32 /* Undefined */ | 64 /* Null */)) { - return anyType; - } - if (type.flags & 262144 /* ObjectLiteral */) { - return getWidenedTypeOfObjectLiteral(type); - } - if (type.flags & 16384 /* Union */) { - return getUnionType(ts.map(type.types, getWidenedType)); - } - if (isArrayType(type)) { - return createArrayType(getWidenedType(type.typeArguments[0])); - } - } - return type; - } - function reportWideningErrorsInType(type) { - if (type.flags & 16384 /* Union */) { - var errorReported = false; - ts.forEach(type.types, function (t) { - if (reportWideningErrorsInType(t)) { - errorReported = true; - } - }); - return errorReported; - } - if (isArrayType(type)) { - return reportWideningErrorsInType(type.typeArguments[0]); - } - if (type.flags & 262144 /* ObjectLiteral */) { - var errorReported = false; - ts.forEach(getPropertiesOfObjectType(type), function (p) { - var t = getTypeOfSymbol(p); - if (t.flags & 524288 /* ContainsUndefinedOrNull */) { - if (!reportWideningErrorsInType(t)) { - error(p.valueDeclaration, ts.Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, p.name, typeToString(getWidenedType(t))); - } - errorReported = true; - } - }); - return errorReported; - } - return false; - } - function reportImplicitAnyError(declaration, type) { - var typeAsString = typeToString(getWidenedType(type)); - var diagnostic; - switch (declaration.kind) { - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - diagnostic = ts.Diagnostics.Member_0_implicitly_has_an_1_type; - break; - case 131 /* Parameter */: - diagnostic = declaration.dotDotDotToken ? - ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : - ts.Diagnostics.Parameter_0_implicitly_has_an_1_type; - break; - case 203 /* FunctionDeclaration */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - if (!declaration.name) { - error(declaration, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); - return; - } - diagnostic = ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type; - break; - default: - diagnostic = ts.Diagnostics.Variable_0_implicitly_has_an_1_type; - } - error(declaration, diagnostic, ts.declarationNameToString(declaration.name), typeAsString); - } - function reportErrorsFromWidening(declaration, type) { - if (produceDiagnostics && compilerOptions.noImplicitAny && type.flags & 524288 /* ContainsUndefinedOrNull */) { - // Report implicit any error within type if possible, otherwise report error on declaration - if (!reportWideningErrorsInType(type)) { - reportImplicitAnyError(declaration, type); - } - } - } - function forEachMatchingParameterType(source, target, callback) { - var sourceMax = source.parameters.length; - var targetMax = target.parameters.length; - var count; - if (source.hasRestParameter && target.hasRestParameter) { - count = sourceMax > targetMax ? sourceMax : targetMax; - sourceMax--; - targetMax--; - } - else if (source.hasRestParameter) { - sourceMax--; - count = targetMax; - } - else if (target.hasRestParameter) { - targetMax--; - count = sourceMax; - } - else { - count = sourceMax < targetMax ? sourceMax : targetMax; - } - for (var i = 0; i < count; i++) { - var s = i < sourceMax ? getTypeOfSymbol(source.parameters[i]) : getRestTypeOfSignature(source); - var t = i < targetMax ? getTypeOfSymbol(target.parameters[i]) : getRestTypeOfSignature(target); - callback(s, t); - } - } - function createInferenceContext(typeParameters, inferUnionTypes) { - var inferences = []; - for (var _i = 0; _i < typeParameters.length; _i++) { - var unused = typeParameters[_i]; - inferences.push({ primary: undefined, secondary: undefined, isFixed: false }); - } - return { - typeParameters: typeParameters, - inferUnionTypes: inferUnionTypes, - inferences: inferences, - inferredTypes: new Array(typeParameters.length) - }; - } - function inferTypes(context, source, target) { - var sourceStack; - var targetStack; - var depth = 0; - var inferiority = 0; - inferFromTypes(source, target); - function isInProcess(source, target) { - for (var i = 0; i < depth; i++) { - if (source === sourceStack[i] && target === targetStack[i]) { - return true; - } - } - return false; - } - function inferFromTypes(source, target) { - if (source === anyFunctionType) { - return; - } - if (target.flags & 512 /* TypeParameter */) { - // If target is a type parameter, make an inference - var typeParameters = context.typeParameters; - for (var i = 0; i < typeParameters.length; i++) { - if (target === typeParameters[i]) { - var inferences = context.inferences[i]; - if (!inferences.isFixed) { - // Any inferences that are made to a type parameter in a union type are inferior - // to inferences made to a flat (non-union) type. This is because if we infer to - // T | string[], we really don't know if we should be inferring to T or not (because - // the correct constituent on the target side could be string[]). Therefore, we put - // such inferior inferences into a secondary bucket, and only use them if the primary - // bucket is empty. - var candidates = inferiority ? - inferences.secondary || (inferences.secondary = []) : - inferences.primary || (inferences.primary = []); - if (!ts.contains(candidates, source)) { - candidates.push(source); - } - } - return; - } - } - } - else if (source.flags & 4096 /* Reference */ && target.flags & 4096 /* Reference */ && source.target === target.target) { - // If source and target are references to the same generic type, infer from type arguments - var sourceTypes = source.typeArguments; - var targetTypes = target.typeArguments; - for (var i = 0; i < sourceTypes.length; i++) { - inferFromTypes(sourceTypes[i], targetTypes[i]); - } - } - else if (target.flags & 16384 /* Union */) { - var targetTypes = target.types; - var typeParameterCount = 0; - var typeParameter; - // First infer to each type in union that isn't a type parameter - for (var _i = 0; _i < targetTypes.length; _i++) { - var t = targetTypes[_i]; - if (t.flags & 512 /* TypeParameter */ && ts.contains(context.typeParameters, t)) { - typeParameter = t; - typeParameterCount++; - } - else { - inferFromTypes(source, t); - } - } - // If union contains a single naked type parameter, make a secondary inference to that type parameter - if (typeParameterCount === 1) { - inferiority++; - inferFromTypes(source, typeParameter); - inferiority--; - } - } - else if (source.flags & 16384 /* Union */) { - // Source is a union type, infer from each consituent type - var sourceTypes = source.types; - for (var _a = 0; _a < sourceTypes.length; _a++) { - var sourceType = sourceTypes[_a]; - inferFromTypes(sourceType, target); - } - } - else if (source.flags & 48128 /* ObjectType */ && (target.flags & (4096 /* Reference */ | 8192 /* Tuple */) || - (target.flags & 32768 /* Anonymous */) && target.symbol && target.symbol.flags & (8192 /* Method */ | 2048 /* TypeLiteral */))) { - // If source is an object type, and target is a type reference, a tuple type, the type of a method, or a type literal, infer from members - if (isInProcess(source, target)) { - return; - } - if (isDeeplyNestedGeneric(source, sourceStack, depth) && isDeeplyNestedGeneric(target, targetStack, depth)) { - return; - } - if (depth === 0) { - sourceStack = []; - targetStack = []; - } - sourceStack[depth] = source; - targetStack[depth] = target; - depth++; - inferFromProperties(source, target); - inferFromSignatures(source, target, 0 /* Call */); - inferFromSignatures(source, target, 1 /* Construct */); - inferFromIndexTypes(source, target, 0 /* String */, 0 /* String */); - inferFromIndexTypes(source, target, 1 /* Number */, 1 /* Number */); - inferFromIndexTypes(source, target, 0 /* String */, 1 /* Number */); - depth--; - } - } - function inferFromProperties(source, target) { - var properties = getPropertiesOfObjectType(target); - for (var _i = 0; _i < properties.length; _i++) { - var targetProp = properties[_i]; - var sourceProp = getPropertyOfObjectType(source, targetProp.name); - if (sourceProp) { - inferFromTypes(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp)); - } - } - } - function inferFromSignatures(source, target, kind) { - var sourceSignatures = getSignaturesOfType(source, kind); - var targetSignatures = getSignaturesOfType(target, kind); - var sourceLen = sourceSignatures.length; - var targetLen = targetSignatures.length; - var len = sourceLen < targetLen ? sourceLen : targetLen; - for (var i = 0; i < len; i++) { - inferFromSignature(getErasedSignature(sourceSignatures[sourceLen - len + i]), getErasedSignature(targetSignatures[targetLen - len + i])); - } - } - function inferFromSignature(source, target) { - forEachMatchingParameterType(source, target, inferFromTypes); - if (source.typePredicate && target.typePredicate) { - if (target.typePredicate.parameterIndex === source.typePredicate.parameterIndex) { - // Return types from type predicates are treated as booleans. In order to infer types - // from type predicates we would need to infer using the type within the type predicate - // (i.e. 'Foo' from 'x is Foo'). - inferFromTypes(source.typePredicate.type, target.typePredicate.type); - } - } - else { - inferFromTypes(getReturnTypeOfSignature(source), getReturnTypeOfSignature(target)); - } - } - function inferFromIndexTypes(source, target, sourceKind, targetKind) { - var targetIndexType = getIndexTypeOfType(target, targetKind); - if (targetIndexType) { - var sourceIndexType = getIndexTypeOfType(source, sourceKind); - if (sourceIndexType) { - inferFromTypes(sourceIndexType, targetIndexType); - } - } - } - } - function getInferenceCandidates(context, index) { - var inferences = context.inferences[index]; - return inferences.primary || inferences.secondary || emptyArray; - } - function getInferredType(context, index) { - var inferredType = context.inferredTypes[index]; - var inferenceSucceeded; - if (!inferredType) { - var inferences = getInferenceCandidates(context, index); - if (inferences.length) { - // Infer widened union or supertype, or the unknown type for no common supertype - var unionOrSuperType = context.inferUnionTypes ? getUnionType(inferences) : getCommonSupertype(inferences); - inferredType = unionOrSuperType ? getWidenedType(unionOrSuperType) : unknownType; - inferenceSucceeded = !!unionOrSuperType; - } - else { - // Infer the empty object type when no inferences were made. It is important to remember that - // in this case, inference still succeeds, meaning there is no error for not having inference - // candidates. An inference error only occurs when there are *conflicting* candidates, i.e. - // candidates with no common supertype. - inferredType = emptyObjectType; - inferenceSucceeded = true; - } - // Only do the constraint check if inference succeeded (to prevent cascading errors) - if (inferenceSucceeded) { - var constraint = getConstraintOfTypeParameter(context.typeParameters[index]); - inferredType = constraint && !isTypeAssignableTo(inferredType, constraint) ? constraint : inferredType; - } - else if (context.failedTypeParameterIndex === undefined || context.failedTypeParameterIndex > index) { - // If inference failed, it is necessary to record the index of the failed type parameter (the one we are on). - // It might be that inference has already failed on a later type parameter on a previous call to inferTypeArguments. - // So if this failure is on preceding type parameter, this type parameter is the new failure index. - context.failedTypeParameterIndex = index; - } - context.inferredTypes[index] = inferredType; - } - return inferredType; - } - function getInferredTypes(context) { - for (var i = 0; i < context.inferredTypes.length; i++) { - getInferredType(context, i); - } - return context.inferredTypes; - } - function hasAncestor(node, kind) { - return ts.getAncestor(node, kind) !== undefined; - } - // EXPRESSION TYPE CHECKING - function getResolvedSymbol(node) { - var links = getNodeLinks(node); - if (!links.resolvedSymbol) { - links.resolvedSymbol = (!ts.nodeIsMissing(node) && resolveName(node, node.text, 107455 /* Value */ | 1048576 /* ExportValue */, ts.Diagnostics.Cannot_find_name_0, node)) || unknownSymbol; - } - return links.resolvedSymbol; - } - function isInTypeQuery(node) { - // TypeScript 1.0 spec (April 2014): 3.6.3 - // A type query consists of the keyword typeof followed by an expression. - // The expression is restricted to a single identifier or a sequence of identifiers separated by periods - while (node) { - switch (node.kind) { - case 147 /* TypeQuery */: - return true; - case 65 /* Identifier */: - case 128 /* QualifiedName */: - node = node.parent; - continue; - default: - return false; - } - } - ts.Debug.fail("should not get here"); - } - // For a union type, remove all constituent types that are of the given type kind (when isOfTypeKind is true) - // or not of the given type kind (when isOfTypeKind is false) - function removeTypesFromUnionType(type, typeKind, isOfTypeKind, allowEmptyUnionResult) { - if (type.flags & 16384 /* Union */) { - var types = type.types; - if (ts.forEach(types, function (t) { return !!(t.flags & typeKind) === isOfTypeKind; })) { - // Above we checked if we have anything to remove, now use the opposite test to do the removal - var narrowedType = getUnionType(ts.filter(types, function (t) { return !(t.flags & typeKind) === isOfTypeKind; })); - if (allowEmptyUnionResult || narrowedType !== emptyObjectType) { - return narrowedType; - } - } - } - else if (allowEmptyUnionResult && !!(type.flags & typeKind) === isOfTypeKind) { - // Use getUnionType(emptyArray) instead of emptyObjectType in case the way empty union types - // are represented ever changes. - return getUnionType(emptyArray); - } - return type; - } - function hasInitializer(node) { - return !!(node.initializer || ts.isBindingPattern(node.parent) && hasInitializer(node.parent.parent)); - } - // Check if a given variable is assigned within a given syntax node - function isVariableAssignedWithin(symbol, node) { - var links = getNodeLinks(node); - if (links.assignmentChecks) { - var cachedResult = links.assignmentChecks[symbol.id]; - if (cachedResult !== undefined) { - return cachedResult; - } - } - else { - links.assignmentChecks = {}; - } - return links.assignmentChecks[symbol.id] = isAssignedIn(node); - function isAssignedInBinaryExpression(node) { - if (node.operatorToken.kind >= 53 /* FirstAssignment */ && node.operatorToken.kind <= 64 /* LastAssignment */) { - var n = node.left; - while (n.kind === 164 /* ParenthesizedExpression */) { - n = n.expression; - } - if (n.kind === 65 /* Identifier */ && getResolvedSymbol(n) === symbol) { - return true; - } - } - return ts.forEachChild(node, isAssignedIn); - } - function isAssignedInVariableDeclaration(node) { - if (!ts.isBindingPattern(node.name) && getSymbolOfNode(node) === symbol && hasInitializer(node)) { - return true; - } - return ts.forEachChild(node, isAssignedIn); - } - function isAssignedIn(node) { - switch (node.kind) { - case 172 /* BinaryExpression */: - return isAssignedInBinaryExpression(node); - case 201 /* VariableDeclaration */: - case 155 /* BindingElement */: - return isAssignedInVariableDeclaration(node); - case 153 /* ObjectBindingPattern */: - case 154 /* ArrayBindingPattern */: - case 156 /* ArrayLiteralExpression */: - case 157 /* ObjectLiteralExpression */: - case 158 /* PropertyAccessExpression */: - case 159 /* ElementAccessExpression */: - case 160 /* CallExpression */: - case 161 /* NewExpression */: - case 163 /* TypeAssertionExpression */: - case 164 /* ParenthesizedExpression */: - case 170 /* PrefixUnaryExpression */: - case 167 /* DeleteExpression */: - case 168 /* TypeOfExpression */: - case 169 /* VoidExpression */: - case 171 /* PostfixUnaryExpression */: - case 173 /* ConditionalExpression */: - case 176 /* SpreadElementExpression */: - case 182 /* Block */: - case 183 /* VariableStatement */: - case 185 /* ExpressionStatement */: - case 186 /* IfStatement */: - case 187 /* DoStatement */: - case 188 /* WhileStatement */: - case 189 /* ForStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - case 194 /* ReturnStatement */: - case 195 /* WithStatement */: - case 196 /* SwitchStatement */: - case 223 /* CaseClause */: - case 224 /* DefaultClause */: - case 197 /* LabeledStatement */: - case 198 /* ThrowStatement */: - case 199 /* TryStatement */: - case 226 /* CatchClause */: - return ts.forEachChild(node, isAssignedIn); - } - return false; - } - } - function resolveLocation(node) { - // Resolve location from top down towards node if it is a context sensitive expression - // That helps in making sure not assigning types as any when resolved out of order - var containerNodes = []; - for (var parent_5 = node.parent; parent_5; parent_5 = parent_5.parent) { - if ((ts.isExpression(parent_5) || ts.isObjectLiteralMethod(node)) && - isContextSensitive(parent_5)) { - containerNodes.unshift(parent_5); - } - } - ts.forEach(containerNodes, function (node) { getTypeOfNode(node); }); - } - function getSymbolAtLocation(node) { - resolveLocation(node); - return getSymbolInfo(node); - } - function getTypeAtLocation(node) { - resolveLocation(node); - return getTypeOfNode(node); - } - function getTypeOfSymbolAtLocation(symbol, node) { - resolveLocation(node); - // Get the narrowed type of symbol at given location instead of just getting - // the type of the symbol. - // eg. - // function foo(a: string | number) { - // if (typeof a === "string") { - // a/**/ - // } - // } - // getTypeOfSymbol for a would return type of parameter symbol string | number - // Unless we provide location /**/, checker wouldn't know how to narrow the type - // By using getNarrowedTypeOfSymbol would return string since it would be able to narrow - // it by typeguard in the if true condition - return getNarrowedTypeOfSymbol(symbol, node); - } - // Get the narrowed type of a given symbol at a given location - function getNarrowedTypeOfSymbol(symbol, node) { - var type = getTypeOfSymbol(symbol); - // Only narrow when symbol is variable of type any or an object, union, or type parameter type - if (node && symbol.flags & 3 /* Variable */) { - if (isTypeAny(type) || type.flags & (48128 /* ObjectType */ | 16384 /* Union */ | 512 /* TypeParameter */)) { - loop: while (node.parent) { - var child = node; - node = node.parent; - var narrowedType = type; - switch (node.kind) { - case 186 /* IfStatement */: - // In a branch of an if statement, narrow based on controlling expression - if (child !== node.expression) { - narrowedType = narrowType(type, node.expression, child === node.thenStatement); - } - break; - case 173 /* ConditionalExpression */: - // In a branch of a conditional expression, narrow based on controlling condition - if (child !== node.condition) { - narrowedType = narrowType(type, node.condition, child === node.whenTrue); - } - break; - case 172 /* BinaryExpression */: - // In the right operand of an && or ||, narrow based on left operand - if (child === node.right) { - if (node.operatorToken.kind === 48 /* AmpersandAmpersandToken */) { - narrowedType = narrowType(type, node.left, true); - } - else if (node.operatorToken.kind === 49 /* BarBarToken */) { - narrowedType = narrowType(type, node.left, false); - } - } - break; - case 230 /* SourceFile */: - case 208 /* ModuleDeclaration */: - case 203 /* FunctionDeclaration */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 137 /* Constructor */: - // Stop at the first containing function or module declaration - break loop; - } - // Use narrowed type if construct contains no assignments to variable - if (narrowedType !== type) { - if (isVariableAssignedWithin(symbol, node)) { - break; - } - type = narrowedType; - } - } - } - } - return type; - function narrowTypeByEquality(type, expr, assumeTrue) { - // Check that we have 'typeof ' on the left and string literal on the right - if (expr.left.kind !== 168 /* TypeOfExpression */ || expr.right.kind !== 8 /* StringLiteral */) { - return type; - } - var left = expr.left; - var right = expr.right; - if (left.expression.kind !== 65 /* Identifier */ || getResolvedSymbol(left.expression) !== symbol) { - return type; - } - var typeInfo = primitiveTypeInfo[right.text]; - if (expr.operatorToken.kind === 31 /* ExclamationEqualsEqualsToken */) { - assumeTrue = !assumeTrue; - } - if (assumeTrue) { - // Assumed result is true. If check was not for a primitive type, remove all primitive types - if (!typeInfo) { - return removeTypesFromUnionType(type, 258 /* StringLike */ | 132 /* NumberLike */ | 8 /* Boolean */ | 2097152 /* ESSymbol */, - /*isOfTypeKind*/ true, false); - } - // Check was for a primitive type, return that primitive type if it is a subtype - if (isTypeSubtypeOf(typeInfo.type, type)) { - return typeInfo.type; - } - // Otherwise, remove all types that aren't of the primitive type kind. This can happen when the type is - // union of enum types and other types. - return removeTypesFromUnionType(type, typeInfo.flags, false, false); - } - else { - // Assumed result is false. If check was for a primitive type, remove that primitive type - if (typeInfo) { - return removeTypesFromUnionType(type, typeInfo.flags, true, false); - } - // Otherwise we don't have enough information to do anything. - return type; - } - } - function narrowTypeByAnd(type, expr, assumeTrue) { - if (assumeTrue) { - // The assumed result is true, therefore we narrow assuming each operand to be true. - return narrowType(narrowType(type, expr.left, true), expr.right, true); - } - else { - // The assumed result is false. This means either the first operand was false, or the first operand was true - // and the second operand was false. We narrow with those assumptions and union the two resulting types. - return getUnionType([ - narrowType(type, expr.left, false), - narrowType(narrowType(type, expr.left, true), expr.right, false) - ]); - } - } - function narrowTypeByOr(type, expr, assumeTrue) { - if (assumeTrue) { - // The assumed result is true. This means either the first operand was true, or the first operand was false - // and the second operand was true. We narrow with those assumptions and union the two resulting types. - return getUnionType([ - narrowType(type, expr.left, true), - narrowType(narrowType(type, expr.left, false), expr.right, true) - ]); - } - else { - // The assumed result is false, therefore we narrow assuming each operand to be false. - return narrowType(narrowType(type, expr.left, false), expr.right, false); - } - } - function narrowTypeByInstanceof(type, expr, assumeTrue) { - // Check that type is not any, assumed result is true, and we have variable symbol on the left - if (isTypeAny(type) || !assumeTrue || expr.left.kind !== 65 /* Identifier */ || getResolvedSymbol(expr.left) !== symbol) { - return type; - } - // Check that right operand is a function type with a prototype property - var rightType = checkExpression(expr.right); - if (!isTypeSubtypeOf(rightType, globalFunctionType)) { - return type; - } - var targetType; - var prototypeProperty = getPropertyOfType(rightType, "prototype"); - if (prototypeProperty) { - // Target type is type of the prototype property - var prototypePropertyType = getTypeOfSymbol(prototypeProperty); - if (!isTypeAny(prototypePropertyType)) { - targetType = prototypePropertyType; - } - } - if (!targetType) { - // Target type is type of construct signature - var constructSignatures; - if (rightType.flags & 2048 /* Interface */) { - constructSignatures = resolveDeclaredMembers(rightType).declaredConstructSignatures; - } - else if (rightType.flags & 32768 /* Anonymous */) { - constructSignatures = getSignaturesOfType(rightType, 1 /* Construct */); - } - if (constructSignatures && constructSignatures.length) { - targetType = getUnionType(ts.map(constructSignatures, function (signature) { return getReturnTypeOfSignature(getErasedSignature(signature)); })); - } - } - if (targetType) { - return getNarrowedType(type, targetType); - } - return type; - } - function getNarrowedType(originalType, narrowedTypeCandidate) { - // Narrow to the target type if it's a subtype of the current type - if (isTypeSubtypeOf(narrowedTypeCandidate, originalType)) { - return narrowedTypeCandidate; - } - // If the current type is a union type, remove all constituents that aren't subtypes of the target. - if (originalType.flags & 16384 /* Union */) { - return getUnionType(ts.filter(originalType.types, function (t) { return isTypeSubtypeOf(t, narrowedTypeCandidate); })); - } - return originalType; - } - function narrowTypeByTypePredicate(type, expr, assumeTrue) { - if (type.flags & 1 /* Any */) { - return type; - } - var signature = getResolvedSignature(expr); - if (signature.typePredicate && - getSymbolAtLocation(expr.arguments[signature.typePredicate.parameterIndex]) === symbol) { - if (!assumeTrue) { - if (type.flags & 16384 /* Union */) { - return getUnionType(ts.filter(type.types, function (t) { return !isTypeSubtypeOf(t, signature.typePredicate.type); })); - } - return type; - } - return getNarrowedType(type, signature.typePredicate.type); - } - return type; - } - // Narrow the given type based on the given expression having the assumed boolean value. The returned type - // will be a subtype or the same type as the argument. - function narrowType(type, expr, assumeTrue) { - switch (expr.kind) { - case 160 /* CallExpression */: - return narrowTypeByTypePredicate(type, expr, assumeTrue); - case 164 /* ParenthesizedExpression */: - return narrowType(type, expr.expression, assumeTrue); - case 172 /* BinaryExpression */: - var operator = expr.operatorToken.kind; - if (operator === 30 /* EqualsEqualsEqualsToken */ || operator === 31 /* ExclamationEqualsEqualsToken */) { - return narrowTypeByEquality(type, expr, assumeTrue); - } - else if (operator === 48 /* AmpersandAmpersandToken */) { - return narrowTypeByAnd(type, expr, assumeTrue); - } - else if (operator === 49 /* BarBarToken */) { - return narrowTypeByOr(type, expr, assumeTrue); - } - else if (operator === 87 /* InstanceOfKeyword */) { - return narrowTypeByInstanceof(type, expr, assumeTrue); - } - break; - case 170 /* PrefixUnaryExpression */: - if (expr.operator === 46 /* ExclamationToken */) { - return narrowType(type, expr.operand, !assumeTrue); - } - break; - } - return type; - } - } - function checkIdentifier(node) { - var symbol = getResolvedSymbol(node); - // As noted in ECMAScript 6 language spec, arrow functions never have an arguments objects. - // Although in down-level emit of arrow function, we emit it using function expression which means that - // arguments objects will be bound to the inner object; emitting arrow function natively in ES6, arguments objects - // will be bound to non-arrow function that contain this arrow function. This results in inconsistent behavior. - // To avoid that we will give an error to users if they use arguments objects in arrow function so that they - // can explicitly bound arguments objects - if (symbol === argumentsSymbol && ts.getContainingFunction(node).kind === 166 /* ArrowFunction */ && languageVersion < 2 /* ES6 */) { - error(node, ts.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); - } - if (symbol.flags & 8388608 /* Alias */ && !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) { - markAliasSymbolAsReferenced(symbol); - } - checkCollisionWithCapturedSuperVariable(node, node); - checkCollisionWithCapturedThisVariable(node, node); - checkBlockScopedBindingCapturedInLoop(node, symbol); - return getNarrowedTypeOfSymbol(getExportSymbolOfValueSymbolIfExported(symbol), node); - } - function isInsideFunction(node, threshold) { - var current = node; - while (current && current !== threshold) { - if (ts.isFunctionLike(current)) { - return true; - } - current = current.parent; - } - return false; - } - function checkBlockScopedBindingCapturedInLoop(node, symbol) { - if (languageVersion >= 2 /* ES6 */ || - (symbol.flags & 2 /* BlockScopedVariable */) === 0 || - symbol.valueDeclaration.parent.kind === 226 /* CatchClause */) { - return; - } - // - check if binding is used in some function - // (stop the walk when reaching container of binding declaration) - // - if first check succeeded - check if variable is declared inside the loop - // nesting structure: - // (variable declaration or binding element) -> variable declaration list -> container - var container = symbol.valueDeclaration; - while (container.kind !== 202 /* VariableDeclarationList */) { - container = container.parent; - } - // get the parent of variable declaration list - container = container.parent; - if (container.kind === 183 /* VariableStatement */) { - // if parent is variable statement - get its parent - container = container.parent; - } - var inFunction = isInsideFunction(node.parent, container); - var current = container; - while (current && !ts.nodeStartsNewLexicalEnvironment(current)) { - if (isIterationStatement(current, false)) { - if (inFunction) { - grammarErrorOnFirstToken(current, ts.Diagnostics.Loop_contains_block_scoped_variable_0_referenced_by_a_function_in_the_loop_This_is_only_supported_in_ECMAScript_6_or_higher, ts.declarationNameToString(node)); - } - // mark value declaration so during emit they can have a special handling - getNodeLinks(symbol.valueDeclaration).flags |= 256 /* BlockScopedBindingInLoop */; - break; - } - current = current.parent; - } - } - function captureLexicalThis(node, container) { - var classNode = container.parent && container.parent.kind === 204 /* ClassDeclaration */ ? container.parent : undefined; - getNodeLinks(node).flags |= 2 /* LexicalThis */; - if (container.kind === 134 /* PropertyDeclaration */ || container.kind === 137 /* Constructor */) { - getNodeLinks(classNode).flags |= 4 /* CaptureThis */; - } - else { - getNodeLinks(container).flags |= 4 /* CaptureThis */; - } - } - function checkThisExpression(node) { - // Stop at the first arrow function so that we can - // tell whether 'this' needs to be captured. - var container = ts.getThisContainer(node, true); - var needToCaptureLexicalThis = false; - // Now skip arrow functions to get the "real" owner of 'this'. - if (container.kind === 166 /* ArrowFunction */) { - container = ts.getThisContainer(container, false); - // When targeting es6, arrow function lexically bind "this" so we do not need to do the work of binding "this" in emitted code - needToCaptureLexicalThis = (languageVersion < 2 /* ES6 */); - } - switch (container.kind) { - case 208 /* ModuleDeclaration */: - error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); - // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks - break; - case 207 /* EnumDeclaration */: - error(node, ts.Diagnostics.this_cannot_be_referenced_in_current_location); - // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks - break; - case 137 /* Constructor */: - if (isInConstructorArgumentInitializer(node, container)) { - error(node, ts.Diagnostics.this_cannot_be_referenced_in_constructor_arguments); - } - break; - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - if (container.flags & 128 /* Static */) { - error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer); - } - break; - case 129 /* ComputedPropertyName */: - error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_computed_property_name); - break; - } - if (needToCaptureLexicalThis) { - captureLexicalThis(node, container); - } - var classNode = container.parent && container.parent.kind === 204 /* ClassDeclaration */ ? container.parent : undefined; - if (classNode) { - var symbol = getSymbolOfNode(classNode); - return container.flags & 128 /* Static */ ? getTypeOfSymbol(symbol) : getDeclaredTypeOfSymbol(symbol); - } - return anyType; - } - function isInConstructorArgumentInitializer(node, constructorDecl) { - for (var n = node; n && n !== constructorDecl; n = n.parent) { - if (n.kind === 131 /* Parameter */) { - return true; - } - } - return false; - } - function checkSuperExpression(node) { - var isCallExpression = node.parent.kind === 160 /* CallExpression */ && node.parent.expression === node; - var enclosingClass = ts.getAncestor(node, 204 /* ClassDeclaration */); - var baseClass; - if (enclosingClass && ts.getClassExtendsHeritageClauseElement(enclosingClass)) { - var classType = getDeclaredTypeOfSymbol(getSymbolOfNode(enclosingClass)); - var baseTypes = getBaseTypes(classType); - baseClass = baseTypes.length && baseTypes[0]; - } - if (!baseClass) { - error(node, ts.Diagnostics.super_can_only_be_referenced_in_a_derived_class); - return unknownType; - } - var container = ts.getSuperContainer(node, true); - if (container) { - var canUseSuperExpression = false; - var needToCaptureLexicalThis; - if (isCallExpression) { - // TS 1.0 SPEC (April 2014): 4.8.1 - // Super calls are only permitted in constructors of derived classes - canUseSuperExpression = container.kind === 137 /* Constructor */; - } - else { - // TS 1.0 SPEC (April 2014) - // 'super' property access is allowed - // - In a constructor, instance member function, instance member accessor, or instance member variable initializer where this references a derived class instance - // - In a static member function or static member accessor - // super property access might appear in arrow functions with arbitrary deep nesting - needToCaptureLexicalThis = false; - while (container && container.kind === 166 /* ArrowFunction */) { - container = ts.getSuperContainer(container, true); - needToCaptureLexicalThis = languageVersion < 2 /* ES6 */; - } - // topmost container must be something that is directly nested in the class declaration - if (container && container.parent && container.parent.kind === 204 /* ClassDeclaration */) { - if (container.flags & 128 /* Static */) { - canUseSuperExpression = - container.kind === 136 /* MethodDeclaration */ || - container.kind === 135 /* MethodSignature */ || - container.kind === 138 /* GetAccessor */ || - container.kind === 139 /* SetAccessor */; - } - else { - canUseSuperExpression = - container.kind === 136 /* MethodDeclaration */ || - container.kind === 135 /* MethodSignature */ || - container.kind === 138 /* GetAccessor */ || - container.kind === 139 /* SetAccessor */ || - container.kind === 134 /* PropertyDeclaration */ || - container.kind === 133 /* PropertySignature */ || - container.kind === 137 /* Constructor */; - } - } - } - if (canUseSuperExpression) { - var returnType; - if ((container.flags & 128 /* Static */) || isCallExpression) { - getNodeLinks(node).flags |= 32 /* SuperStatic */; - returnType = getTypeOfSymbol(baseClass.symbol); - } - else { - getNodeLinks(node).flags |= 16 /* SuperInstance */; - returnType = baseClass; - } - if (container.kind === 137 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { - // issue custom error message for super property access in constructor arguments (to be aligned with old compiler) - error(node, ts.Diagnostics.super_cannot_be_referenced_in_constructor_arguments); - returnType = unknownType; - } - if (!isCallExpression && needToCaptureLexicalThis) { - // call expressions are allowed only in constructors so they should always capture correct 'this' - // super property access expressions can also appear in arrow functions - - // in this case they should also use correct lexical this - captureLexicalThis(node.parent, container); - } - return returnType; - } - } - if (container && container.kind === 129 /* ComputedPropertyName */) { - error(node, ts.Diagnostics.super_cannot_be_referenced_in_a_computed_property_name); - } - else if (isCallExpression) { - error(node, ts.Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors); - } - else { - error(node, ts.Diagnostics.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class); - } - return unknownType; - } - // Return contextual type of parameter or undefined if no contextual type is available - function getContextuallyTypedParameterType(parameter) { - if (isFunctionExpressionOrArrowFunction(parameter.parent)) { - var func = parameter.parent; - if (isContextSensitive(func)) { - var contextualSignature = getContextualSignature(func); - if (contextualSignature) { - var funcHasRestParameters = ts.hasRestParameter(func); - var len = func.parameters.length - (funcHasRestParameters ? 1 : 0); - var indexOfParameter = ts.indexOf(func.parameters, parameter); - if (indexOfParameter < len) { - return getTypeAtPosition(contextualSignature, indexOfParameter); - } - // If last parameter is contextually rest parameter get its type - if (indexOfParameter === (func.parameters.length - 1) && - funcHasRestParameters && contextualSignature.hasRestParameter && func.parameters.length >= contextualSignature.parameters.length) { - return getTypeOfSymbol(ts.lastOrUndefined(contextualSignature.parameters)); - } - } - } - } - return undefined; - } - // In a variable, parameter or property declaration with a type annotation, the contextual type of an initializer - // expression is the type of the variable, parameter or property. Otherwise, in a parameter declaration of a - // contextually typed function expression, the contextual type of an initializer expression is the contextual type - // of the parameter. Otherwise, in a variable or parameter declaration with a binding pattern name, the contextual - // type of an initializer expression is the type implied by the binding pattern. - function getContextualTypeForInitializerExpression(node) { - var declaration = node.parent; - if (node === declaration.initializer) { - if (declaration.type) { - return getTypeFromTypeNode(declaration.type); - } - if (declaration.kind === 131 /* Parameter */) { - var type = getContextuallyTypedParameterType(declaration); - if (type) { - return type; - } - } - if (ts.isBindingPattern(declaration.name)) { - return getTypeFromBindingPattern(declaration.name); - } - } - return undefined; - } - function getContextualTypeForReturnExpression(node) { - var func = ts.getContainingFunction(node); - if (func && !func.asteriskToken) { - return getContextualReturnType(func); - } - return undefined; - } - function getContextualTypeForYieldOperand(node) { - var func = ts.getContainingFunction(node); - if (func) { - var contextualReturnType = getContextualReturnType(func); - if (contextualReturnType) { - return node.asteriskToken - ? contextualReturnType - : getElementTypeOfIterableIterator(contextualReturnType); - } - } - return undefined; - } - function getContextualReturnType(functionDecl) { - // If the containing function has a return type annotation, is a constructor, or is a get accessor whose - // corresponding set accessor has a type annotation, return statements in the function are contextually typed - if (functionDecl.type || - functionDecl.kind === 137 /* Constructor */ || - functionDecl.kind === 138 /* GetAccessor */ && getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 139 /* SetAccessor */))) { - return getReturnTypeOfSignature(getSignatureFromDeclaration(functionDecl)); - } - // Otherwise, if the containing function is contextually typed by a function type with exactly one call signature - // and that call signature is non-generic, return statements are contextually typed by the return type of the signature - var signature = getContextualSignatureForFunctionLikeDeclaration(functionDecl); - if (signature) { - return getReturnTypeOfSignature(signature); - } - return undefined; - } - // In a typed function call, an argument or substitution expression is contextually typed by the type of the corresponding parameter. - function getContextualTypeForArgument(callTarget, arg) { - var args = getEffectiveCallArguments(callTarget); - var argIndex = ts.indexOf(args, arg); - if (argIndex >= 0) { - var signature = getResolvedSignature(callTarget); - return getTypeAtPosition(signature, argIndex); - } - return undefined; - } - function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { - if (template.parent.kind === 162 /* TaggedTemplateExpression */) { - return getContextualTypeForArgument(template.parent, substitutionExpression); - } - return undefined; - } - function getContextualTypeForBinaryOperand(node) { - var binaryExpression = node.parent; - var operator = binaryExpression.operatorToken.kind; - if (operator >= 53 /* FirstAssignment */ && operator <= 64 /* LastAssignment */) { - // In an assignment expression, the right operand is contextually typed by the type of the left operand. - if (node === binaryExpression.right) { - return checkExpression(binaryExpression.left); - } - } - else if (operator === 49 /* BarBarToken */) { - // When an || expression has a contextual type, the operands are contextually typed by that type. When an || - // expression has no contextual type, the right operand is contextually typed by the type of the left operand. - var type = getContextualType(binaryExpression); - if (!type && node === binaryExpression.right) { - type = checkExpression(binaryExpression.left); - } - return type; - } - return undefined; - } - // Apply a mapping function to a contextual type and return the resulting type. If the contextual type - // is a union type, the mapping function is applied to each constituent type and a union of the resulting - // types is returned. - function applyToContextualType(type, mapper) { - if (!(type.flags & 16384 /* Union */)) { - return mapper(type); - } - var types = type.types; - var mappedType; - var mappedTypes; - for (var _i = 0; _i < types.length; _i++) { - var current = types[_i]; - var t = mapper(current); - if (t) { - if (!mappedType) { - mappedType = t; - } - else if (!mappedTypes) { - mappedTypes = [mappedType, t]; - } - else { - mappedTypes.push(t); - } - } - } - return mappedTypes ? getUnionType(mappedTypes) : mappedType; - } - function getTypeOfPropertyOfContextualType(type, name) { - return applyToContextualType(type, function (t) { - var prop = getPropertyOfObjectType(t, name); - return prop ? getTypeOfSymbol(prop) : undefined; - }); - } - function getIndexTypeOfContextualType(type, kind) { - return applyToContextualType(type, function (t) { return getIndexTypeOfObjectOrUnionType(t, kind); }); - } - // Return true if the given contextual type is a tuple-like type - function contextualTypeIsTupleLikeType(type) { - return !!(type.flags & 16384 /* Union */ ? ts.forEach(type.types, isTupleLikeType) : isTupleLikeType(type)); - } - // Return true if the given contextual type provides an index signature of the given kind - function contextualTypeHasIndexSignature(type, kind) { - return !!(type.flags & 16384 /* Union */ ? ts.forEach(type.types, function (t) { return getIndexTypeOfObjectOrUnionType(t, kind); }) : getIndexTypeOfObjectOrUnionType(type, kind)); - } - // In an object literal contextually typed by a type T, the contextual type of a property assignment is the type of - // the matching property in T, if one exists. Otherwise, it is the type of the numeric index signature in T, if one - // exists. Otherwise, it is the type of the string index signature in T, if one exists. - function getContextualTypeForObjectLiteralMethod(node) { - ts.Debug.assert(ts.isObjectLiteralMethod(node)); - if (isInsideWithStatementBody(node)) { - // We cannot answer semantic questions within a with block, do not proceed any further - return undefined; - } - return getContextualTypeForObjectLiteralElement(node); - } - function getContextualTypeForObjectLiteralElement(element) { - var objectLiteral = element.parent; - var type = getContextualType(objectLiteral); - if (type) { - if (!ts.hasDynamicName(element)) { - // For a (non-symbol) computed property, there is no reason to look up the name - // in the type. It will just be "__computed", which does not appear in any - // SymbolTable. - var symbolName = getSymbolOfNode(element).name; - var propertyType = getTypeOfPropertyOfContextualType(type, symbolName); - if (propertyType) { - return propertyType; - } - } - return isNumericName(element.name) && getIndexTypeOfContextualType(type, 1 /* Number */) || - getIndexTypeOfContextualType(type, 0 /* String */); - } - return undefined; - } - // In an array literal contextually typed by a type T, the contextual type of an element expression at index N is - // the type of the property with the numeric name N in T, if one exists. Otherwise, if T has a numeric index signature, - // it is the type of the numeric index signature in T. Otherwise, in ES6 and higher, the contextual type is the iterated - // type of T. - function getContextualTypeForElementExpression(node) { - var arrayLiteral = node.parent; - var type = getContextualType(arrayLiteral); - if (type) { - var index = ts.indexOf(arrayLiteral.elements, node); - return getTypeOfPropertyOfContextualType(type, "" + index) - || getIndexTypeOfContextualType(type, 1 /* Number */) - || (languageVersion >= 2 /* ES6 */ ? getElementTypeOfIterable(type, undefined) : undefined); - } - return undefined; - } - // In a contextually typed conditional expression, the true/false expressions are contextually typed by the same type. - function getContextualTypeForConditionalOperand(node) { - var conditional = node.parent; - return node === conditional.whenTrue || node === conditional.whenFalse ? getContextualType(conditional) : undefined; - } - // Return the contextual type for a given expression node. During overload resolution, a contextual type may temporarily - // be "pushed" onto a node using the contextualType property. - function getContextualType(node) { - if (isInsideWithStatementBody(node)) { - // We cannot answer semantic questions within a with block, do not proceed any further - return undefined; - } - if (node.contextualType) { - return node.contextualType; - } - var parent = node.parent; - switch (parent.kind) { - case 201 /* VariableDeclaration */: - case 131 /* Parameter */: - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 155 /* BindingElement */: - return getContextualTypeForInitializerExpression(node); - case 166 /* ArrowFunction */: - case 194 /* ReturnStatement */: - return getContextualTypeForReturnExpression(node); - case 175 /* YieldExpression */: - return getContextualTypeForYieldOperand(parent); - case 160 /* CallExpression */: - case 161 /* NewExpression */: - return getContextualTypeForArgument(parent, node); - case 163 /* TypeAssertionExpression */: - return getTypeFromTypeNode(parent.type); - case 172 /* BinaryExpression */: - return getContextualTypeForBinaryOperand(node); - case 227 /* PropertyAssignment */: - return getContextualTypeForObjectLiteralElement(parent); - case 156 /* ArrayLiteralExpression */: - return getContextualTypeForElementExpression(node); - case 173 /* ConditionalExpression */: - return getContextualTypeForConditionalOperand(node); - case 180 /* TemplateSpan */: - ts.Debug.assert(parent.parent.kind === 174 /* TemplateExpression */); - return getContextualTypeForSubstitutionExpression(parent.parent, node); - case 164 /* ParenthesizedExpression */: - return getContextualType(parent); - } - return undefined; - } - // If the given type is an object or union type, if that type has a single signature, and if - // that signature is non-generic, return the signature. Otherwise return undefined. - function getNonGenericSignature(type) { - var signatures = getSignaturesOfObjectOrUnionType(type, 0 /* Call */); - if (signatures.length === 1) { - var signature = signatures[0]; - if (!signature.typeParameters) { - return signature; - } - } - } - function isFunctionExpressionOrArrowFunction(node) { - return node.kind === 165 /* FunctionExpression */ || node.kind === 166 /* ArrowFunction */; - } - function getContextualSignatureForFunctionLikeDeclaration(node) { - // Only function expressions, arrow functions, and object literal methods are contextually typed. - return isFunctionExpressionOrArrowFunction(node) || ts.isObjectLiteralMethod(node) - ? getContextualSignature(node) - : undefined; - } - // Return the contextual signature for a given expression node. A contextual type provides a - // contextual signature if it has a single call signature and if that call signature is non-generic. - // If the contextual type is a union type, get the signature from each type possible and if they are - // all identical ignoring their return type, the result is same signature but with return type as - // union type of return types from these signatures - function getContextualSignature(node) { - ts.Debug.assert(node.kind !== 136 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); - var type = ts.isObjectLiteralMethod(node) - ? getContextualTypeForObjectLiteralMethod(node) - : getContextualType(node); - if (!type) { - return undefined; - } - if (!(type.flags & 16384 /* Union */)) { - return getNonGenericSignature(type); - } - var signatureList; - var types = type.types; - for (var _i = 0; _i < types.length; _i++) { - var current = types[_i]; - // The signature set of all constituent type with call signatures should match - // So number of signatures allowed is either 0 or 1 - if (signatureList && - getSignaturesOfObjectOrUnionType(current, 0 /* Call */).length > 1) { - return undefined; - } - var signature = getNonGenericSignature(current); - if (signature) { - if (!signatureList) { - // This signature will contribute to contextual union signature - signatureList = [signature]; - } - else if (!compareSignatures(signatureList[0], signature, false, compareTypes)) { - // Signatures aren't identical, do not use - return undefined; - } - else { - // Use this signature for contextual union signature - signatureList.push(signature); - } - } - } - // Result is union of signatures collected (return type is union of return types of this signature set) - var result; - if (signatureList) { - result = cloneSignature(signatureList[0]); - // Clear resolved return type we possibly got from cloneSignature - result.resolvedReturnType = undefined; - result.unionSignatures = signatureList; - } - return result; - } - // Presence of a contextual type mapper indicates inferential typing, except the identityMapper object is - // used as a special marker for other purposes. - function isInferentialContext(mapper) { - return mapper && mapper !== identityMapper; - } - // A node is an assignment target if it is on the left hand side of an '=' token, if it is parented by a property - // assignment in an object literal that is an assignment target, or if it is parented by an array literal that is - // an assignment target. Examples include 'a = xxx', '{ p: a } = xxx', '[{ p: a}] = xxx'. - function isAssignmentTarget(node) { - var parent = node.parent; - if (parent.kind === 172 /* BinaryExpression */ && parent.operatorToken.kind === 53 /* EqualsToken */ && parent.left === node) { - return true; - } - if (parent.kind === 227 /* PropertyAssignment */) { - return isAssignmentTarget(parent.parent); - } - if (parent.kind === 156 /* ArrayLiteralExpression */) { - return isAssignmentTarget(parent); - } - return false; - } - function checkSpreadElementExpression(node, contextualMapper) { - // It is usually not safe to call checkExpressionCached if we can be contextually typing. - // You can tell that we are contextually typing because of the contextualMapper parameter. - // While it is true that a spread element can have a contextual type, it does not do anything - // with this type. It is neither affected by it, nor does it propagate it to its operand. - // So the fact that contextualMapper is passed is not important, because the operand of a spread - // element is not contextually typed. - var arrayOrIterableType = checkExpressionCached(node.expression, contextualMapper); - return checkIteratedTypeOrElementType(arrayOrIterableType, node.expression, false); - } - function checkArrayLiteral(node, contextualMapper) { - var elements = node.elements; - if (!elements.length) { - return createArrayType(undefinedType); - } - var hasSpreadElement = false; - var elementTypes = []; - var inDestructuringPattern = isAssignmentTarget(node); - for (var _i = 0; _i < elements.length; _i++) { - var e = elements[_i]; - if (inDestructuringPattern && e.kind === 176 /* SpreadElementExpression */) { - // Given the following situation: - // var c: {}; - // [...c] = ["", 0]; - // - // c is represented in the tree as a spread element in an array literal. - // But c really functions as a rest element, and its purpose is to provide - // a contextual type for the right hand side of the assignment. Therefore, - // instead of calling checkExpression on "...c", which will give an error - // if c is not iterable/array-like, we need to act as if we are trying to - // get the contextual element type from it. So we do something similar to - // getContextualTypeForElementExpression, which will crucially not error - // if there is no index type / iterated type. - var restArrayType = checkExpression(e.expression, contextualMapper); - var restElementType = getIndexTypeOfType(restArrayType, 1 /* Number */) || - (languageVersion >= 2 /* ES6 */ ? getElementTypeOfIterable(restArrayType, undefined) : undefined); - if (restElementType) { - elementTypes.push(restElementType); - } - } - else { - var type = checkExpression(e, contextualMapper); - elementTypes.push(type); - } - hasSpreadElement = hasSpreadElement || e.kind === 176 /* SpreadElementExpression */; - } - if (!hasSpreadElement) { - var contextualType = getContextualType(node); - if (contextualType && contextualTypeIsTupleLikeType(contextualType) || inDestructuringPattern) { - return createTupleType(elementTypes); - } - } - return createArrayType(getUnionType(elementTypes)); - } - function isNumericName(name) { - return name.kind === 129 /* ComputedPropertyName */ ? isNumericComputedName(name) : isNumericLiteralName(name.text); - } - function isNumericComputedName(name) { - // It seems odd to consider an expression of type Any to result in a numeric name, - // but this behavior is consistent with checkIndexedAccess - return isTypeAnyOrAllConstituentTypesHaveKind(checkComputedPropertyName(name), 132 /* NumberLike */); - } - function isTypeAnyOrAllConstituentTypesHaveKind(type, kind) { - return isTypeAny(type) || allConstituentTypesHaveKind(type, kind); - } - function isNumericLiteralName(name) { - // The intent of numeric names is that - // - they are names with text in a numeric form, and that - // - setting properties/indexing with them is always equivalent to doing so with the numeric literal 'numLit', - // acquired by applying the abstract 'ToNumber' operation on the name's text. - // - // The subtlety is in the latter portion, as we cannot reliably say that anything that looks like a numeric literal is a numeric name. - // In fact, it is the case that the text of the name must be equal to 'ToString(numLit)' for this to hold. - // - // Consider the property name '"0xF00D"'. When one indexes with '0xF00D', they are actually indexing with the value of 'ToString(0xF00D)' - // according to the ECMAScript specification, so it is actually as if the user indexed with the string '"61453"'. - // Thus, the text of all numeric literals equivalent to '61543' such as '0xF00D', '0xf00D', '0170015', etc. are not valid numeric names - // because their 'ToString' representation is not equal to their original text. - // This is motivated by ECMA-262 sections 9.3.1, 9.8.1, 11.1.5, and 11.2.1. - // - // Here, we test whether 'ToString(ToNumber(name))' is exactly equal to 'name'. - // The '+' prefix operator is equivalent here to applying the abstract ToNumber operation. - // Applying the 'toString()' method on a number gives us the abstract ToString operation on a number. - // - // Note that this accepts the values 'Infinity', '-Infinity', and 'NaN', and that this is intentional. - // This is desired behavior, because when indexing with them as numeric entities, you are indexing - // with the strings '"Infinity"', '"-Infinity"', and '"NaN"' respectively. - return (+name).toString() === name; - } - function checkComputedPropertyName(node) { - var links = getNodeLinks(node.expression); - if (!links.resolvedType) { - links.resolvedType = checkExpression(node.expression); - // This will allow types number, string, symbol or any. It will also allow enums, the unknown - // type, and any union of these types (like string | number). - if (!isTypeAnyOrAllConstituentTypesHaveKind(links.resolvedType, 132 /* NumberLike */ | 258 /* StringLike */ | 2097152 /* ESSymbol */)) { - error(node, ts.Diagnostics.A_computed_property_name_must_be_of_type_string_number_symbol_or_any); - } - else { - checkThatExpressionIsProperSymbolReference(node.expression, links.resolvedType, true); - } - } - return links.resolvedType; - } - function checkObjectLiteral(node, contextualMapper) { - // Grammar checking - checkGrammarObjectLiteralExpression(node); - var propertiesTable = {}; - var propertiesArray = []; - var contextualType = getContextualType(node); - var typeFlags; - for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { - var memberDecl = _a[_i]; - var member = memberDecl.symbol; - if (memberDecl.kind === 227 /* PropertyAssignment */ || - memberDecl.kind === 228 /* ShorthandPropertyAssignment */ || - ts.isObjectLiteralMethod(memberDecl)) { - var type = void 0; - if (memberDecl.kind === 227 /* PropertyAssignment */) { - type = checkPropertyAssignment(memberDecl, contextualMapper); - } - else if (memberDecl.kind === 136 /* MethodDeclaration */) { - type = checkObjectLiteralMethod(memberDecl, contextualMapper); - } - else { - ts.Debug.assert(memberDecl.kind === 228 /* ShorthandPropertyAssignment */); - type = checkExpression(memberDecl.name, contextualMapper); - } - typeFlags |= type.flags; - var prop = createSymbol(4 /* Property */ | 67108864 /* Transient */ | member.flags, member.name); - prop.declarations = member.declarations; - prop.parent = member.parent; - if (member.valueDeclaration) { - prop.valueDeclaration = member.valueDeclaration; - } - prop.type = type; - prop.target = member; - member = prop; - } - else { - // TypeScript 1.0 spec (April 2014) - // A get accessor declaration is processed in the same manner as - // an ordinary function declaration(section 6.1) with no parameters. - // A set accessor declaration is processed in the same manner - // as an ordinary function declaration with a single parameter and a Void return type. - ts.Debug.assert(memberDecl.kind === 138 /* GetAccessor */ || memberDecl.kind === 139 /* SetAccessor */); - checkAccessorDeclaration(memberDecl); - } - if (!ts.hasDynamicName(memberDecl)) { - propertiesTable[member.name] = member; - } - propertiesArray.push(member); - } - var stringIndexType = getIndexType(0 /* String */); - var numberIndexType = getIndexType(1 /* Number */); - var result = createAnonymousType(node.symbol, propertiesTable, emptyArray, emptyArray, stringIndexType, numberIndexType); - result.flags |= 262144 /* ObjectLiteral */ | 1048576 /* ContainsObjectLiteral */ | (typeFlags & 524288 /* ContainsUndefinedOrNull */); - return result; - function getIndexType(kind) { - if (contextualType && contextualTypeHasIndexSignature(contextualType, kind)) { - var propTypes = []; - for (var i = 0; i < propertiesArray.length; i++) { - var propertyDecl = node.properties[i]; - if (kind === 0 /* String */ || isNumericName(propertyDecl.name)) { - // Do not call getSymbolOfNode(propertyDecl), as that will get the - // original symbol for the node. We actually want to get the symbol - // created by checkObjectLiteral, since that will be appropriately - // contextually typed and resolved. - var type = getTypeOfSymbol(propertiesArray[i]); - if (!ts.contains(propTypes, type)) { - propTypes.push(type); - } - } - } - var result_1 = propTypes.length ? getUnionType(propTypes) : undefinedType; - typeFlags |= result_1.flags; - return result_1; - } - return undefined; - } - } - // If a symbol is a synthesized symbol with no value declaration, we assume it is a property. Example of this are the synthesized - // '.prototype' property as well as synthesized tuple index properties. - function getDeclarationKindFromSymbol(s) { - return s.valueDeclaration ? s.valueDeclaration.kind : 134 /* PropertyDeclaration */; - } - function getDeclarationFlagsFromSymbol(s) { - return s.valueDeclaration ? ts.getCombinedNodeFlags(s.valueDeclaration) : s.flags & 134217728 /* Prototype */ ? 16 /* Public */ | 128 /* Static */ : 0; - } - function checkClassPropertyAccess(node, left, type, prop) { - var flags = getDeclarationFlagsFromSymbol(prop); - // Public properties are always accessible - if (!(flags & (32 /* Private */ | 64 /* Protected */))) { - return; - } - // Property is known to be private or protected at this point - // Get the declaring and enclosing class instance types - var enclosingClassDeclaration = ts.getAncestor(node, 204 /* ClassDeclaration */); - var enclosingClass = enclosingClassDeclaration ? getDeclaredTypeOfSymbol(getSymbolOfNode(enclosingClassDeclaration)) : undefined; - var declaringClass = getDeclaredTypeOfSymbol(prop.parent); - // Private property is accessible if declaring and enclosing class are the same - if (flags & 32 /* Private */) { - if (declaringClass !== enclosingClass) { - error(node, ts.Diagnostics.Property_0_is_private_and_only_accessible_within_class_1, symbolToString(prop), typeToString(declaringClass)); - } - return; - } - // Property is known to be protected at this point - // All protected properties of a supertype are accessible in a super access - if (left.kind === 91 /* SuperKeyword */) { - return; - } - // A protected property is accessible in the declaring class and classes derived from it - if (!enclosingClass || !hasBaseType(enclosingClass, declaringClass)) { - error(node, ts.Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, symbolToString(prop), typeToString(declaringClass)); - return; - } - // No further restrictions for static properties - if (flags & 128 /* Static */) { - return; - } - // An instance property must be accessed through an instance of the enclosing class - if (!(getTargetType(type).flags & (1024 /* Class */ | 2048 /* Interface */) && hasBaseType(type, enclosingClass))) { - error(node, ts.Diagnostics.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1, symbolToString(prop), typeToString(enclosingClass)); - } - } - function checkPropertyAccessExpression(node) { - return checkPropertyAccessExpressionOrQualifiedName(node, node.expression, node.name); - } - function checkQualifiedName(node) { - return checkPropertyAccessExpressionOrQualifiedName(node, node.left, node.right); - } - function checkPropertyAccessExpressionOrQualifiedName(node, left, right) { - var type = checkExpressionOrQualifiedName(left); - if (isTypeAny(type)) { - return type; - } - var apparentType = getApparentType(getWidenedType(type)); - if (apparentType === unknownType) { - // handle cases when type is Type parameter with invalid constraint - return unknownType; - } - var prop = getPropertyOfType(apparentType, right.text); - if (!prop) { - if (right.text) { - error(right, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.declarationNameToString(right), typeToString(type)); - } - return unknownType; - } - getNodeLinks(node).resolvedSymbol = prop; - if (prop.parent && prop.parent.flags & 32 /* Class */) { - // TS 1.0 spec (April 2014): 4.8.2 - // - In a constructor, instance member function, instance member accessor, or - // instance member variable initializer where this references a derived class instance, - // a super property access is permitted and must specify a public instance member function of the base class. - // - In a static member function or static member accessor - // where this references the constructor function object of a derived class, - // a super property access is permitted and must specify a public static member function of the base class. - if (left.kind === 91 /* SuperKeyword */ && getDeclarationKindFromSymbol(prop) !== 136 /* MethodDeclaration */) { - error(right, ts.Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword); - } - else { - checkClassPropertyAccess(node, left, type, prop); - } - } - return getTypeOfSymbol(prop); - } - function isValidPropertyAccess(node, propertyName) { - var left = node.kind === 158 /* PropertyAccessExpression */ - ? node.expression - : node.left; - var type = checkExpressionOrQualifiedName(left); - if (type !== unknownType && !isTypeAny(type)) { - var prop = getPropertyOfType(getWidenedType(type), propertyName); - if (prop && prop.parent && prop.parent.flags & 32 /* Class */) { - if (left.kind === 91 /* SuperKeyword */ && getDeclarationKindFromSymbol(prop) !== 136 /* MethodDeclaration */) { - return false; - } - else { - var modificationCount = diagnostics.getModificationCount(); - checkClassPropertyAccess(node, left, type, prop); - return diagnostics.getModificationCount() === modificationCount; - } - } - } - return true; - } - function checkIndexedAccess(node) { - // Grammar checking - if (!node.argumentExpression) { - var sourceFile = getSourceFile(node); - if (node.parent.kind === 161 /* NewExpression */ && node.parent.expression === node) { - var start = ts.skipTrivia(sourceFile.text, node.expression.end); - var end = node.end; - grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead); - } - else { - var start = node.end - "]".length; - var end = node.end; - grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.Expression_expected); - } - } - // Obtain base constraint such that we can bail out if the constraint is an unknown type - var objectType = getApparentType(checkExpression(node.expression)); - var indexType = node.argumentExpression ? checkExpression(node.argumentExpression) : unknownType; - if (objectType === unknownType) { - return unknownType; - } - var isConstEnum = isConstEnumObjectType(objectType); - if (isConstEnum && - (!node.argumentExpression || node.argumentExpression.kind !== 8 /* StringLiteral */)) { - error(node.argumentExpression, ts.Diagnostics.A_const_enum_member_can_only_be_accessed_using_a_string_literal); - return unknownType; - } - // TypeScript 1.0 spec (April 2014): 4.10 Property Access - // - If IndexExpr is a string literal or a numeric literal and ObjExpr's apparent type has a property with the name - // given by that literal(converted to its string representation in the case of a numeric literal), the property access is of the type of that property. - // - Otherwise, if ObjExpr's apparent type has a numeric index signature and IndexExpr is of type Any, the Number primitive type, or an enum type, - // the property access is of the type of that index signature. - // - Otherwise, if ObjExpr's apparent type has a string index signature and IndexExpr is of type Any, the String or Number primitive type, or an enum type, - // the property access is of the type of that index signature. - // - Otherwise, if IndexExpr is of type Any, the String or Number primitive type, or an enum type, the property access is of type Any. - // See if we can index as a property. - if (node.argumentExpression) { - var name_10 = getPropertyNameForIndexedAccess(node.argumentExpression, indexType); - if (name_10 !== undefined) { - var prop = getPropertyOfType(objectType, name_10); - if (prop) { - getNodeLinks(node).resolvedSymbol = prop; - return getTypeOfSymbol(prop); - } - else if (isConstEnum) { - error(node.argumentExpression, ts.Diagnostics.Property_0_does_not_exist_on_const_enum_1, name_10, symbolToString(objectType.symbol)); - return unknownType; - } - } - } - // Check for compatible indexer types. - if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 258 /* StringLike */ | 132 /* NumberLike */ | 2097152 /* ESSymbol */)) { - // Try to use a number indexer. - if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 132 /* NumberLike */)) { - var numberIndexType = getIndexTypeOfType(objectType, 1 /* Number */); - if (numberIndexType) { - return numberIndexType; - } - } - // Try to use string indexing. - var stringIndexType = getIndexTypeOfType(objectType, 0 /* String */); - if (stringIndexType) { - return stringIndexType; - } - // Fall back to any. - if (compilerOptions.noImplicitAny && !compilerOptions.suppressImplicitAnyIndexErrors && !isTypeAny(objectType)) { - error(node, ts.Diagnostics.Index_signature_of_object_type_implicitly_has_an_any_type); - } - return anyType; - } - // REVIEW: Users should know the type that was actually used. - error(node, ts.Diagnostics.An_index_expression_argument_must_be_of_type_string_number_symbol_or_any); - return unknownType; - } - /** - * If indexArgumentExpression is a string literal or number literal, returns its text. - * If indexArgumentExpression is a well known symbol, returns the property name corresponding - * to this symbol, as long as it is a proper symbol reference. - * Otherwise, returns undefined. - */ - function getPropertyNameForIndexedAccess(indexArgumentExpression, indexArgumentType) { - if (indexArgumentExpression.kind === 8 /* StringLiteral */ || indexArgumentExpression.kind === 7 /* NumericLiteral */) { - return indexArgumentExpression.text; - } - if (checkThatExpressionIsProperSymbolReference(indexArgumentExpression, indexArgumentType, false)) { - var rightHandSideName = indexArgumentExpression.name.text; - return ts.getPropertyNameForKnownSymbolName(rightHandSideName); - } - return undefined; - } - /** - * A proper symbol reference requires the following: - * 1. The property access denotes a property that exists - * 2. The expression is of the form Symbol. - * 3. The property access is of the primitive type symbol. - * 4. Symbol in this context resolves to the global Symbol object - */ - function checkThatExpressionIsProperSymbolReference(expression, expressionType, reportError) { - if (expressionType === unknownType) { - // There is already an error, so no need to report one. - return false; - } - if (!ts.isWellKnownSymbolSyntactically(expression)) { - return false; - } - // Make sure the property type is the primitive symbol type - if ((expressionType.flags & 2097152 /* ESSymbol */) === 0) { - if (reportError) { - error(expression, ts.Diagnostics.A_computed_property_name_of_the_form_0_must_be_of_type_symbol, ts.getTextOfNode(expression)); - } - return false; - } - // The name is Symbol., so make sure Symbol actually resolves to the - // global Symbol object - var leftHandSide = expression.expression; - var leftHandSideSymbol = getResolvedSymbol(leftHandSide); - if (!leftHandSideSymbol) { - return false; - } - var globalESSymbol = getGlobalESSymbolConstructorSymbol(); - if (!globalESSymbol) { - // Already errored when we tried to look up the symbol - return false; - } - if (leftHandSideSymbol !== globalESSymbol) { - if (reportError) { - error(leftHandSide, ts.Diagnostics.Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object); - } - return false; - } - return true; - } - function resolveUntypedCall(node) { - if (node.kind === 162 /* TaggedTemplateExpression */) { - checkExpression(node.template); - } - else { - ts.forEach(node.arguments, function (argument) { - checkExpression(argument); - }); - } - return anySignature; - } - function resolveErrorCall(node) { - resolveUntypedCall(node); - return unknownSignature; - } - // Re-order candidate signatures into the result array. Assumes the result array to be empty. - // The candidate list orders groups in reverse, but within a group signatures are kept in declaration order - // A nit here is that we reorder only signatures that belong to the same symbol, - // so order how inherited signatures are processed is still preserved. - // interface A { (x: string): void } - // interface B extends A { (x: 'foo'): string } - // let b: B; - // b('foo') // <- here overloads should be processed as [(x:'foo'): string, (x: string): void] - function reorderCandidates(signatures, result) { - var lastParent; - var lastSymbol; - var cutoffIndex = 0; - var index; - var specializedIndex = -1; - var spliceIndex; - ts.Debug.assert(!result.length); - for (var _i = 0; _i < signatures.length; _i++) { - var signature = signatures[_i]; - var symbol = signature.declaration && getSymbolOfNode(signature.declaration); - var parent_6 = signature.declaration && signature.declaration.parent; - if (!lastSymbol || symbol === lastSymbol) { - if (lastParent && parent_6 === lastParent) { - index++; - } - else { - lastParent = parent_6; - index = cutoffIndex; - } - } - else { - // current declaration belongs to a different symbol - // set cutoffIndex so re-orderings in the future won't change result set from 0 to cutoffIndex - index = cutoffIndex = result.length; - lastParent = parent_6; - } - lastSymbol = symbol; - // specialized signatures always need to be placed before non-specialized signatures regardless - // of the cutoff position; see GH#1133 - if (signature.hasStringLiterals) { - specializedIndex++; - spliceIndex = specializedIndex; - // The cutoff index always needs to be greater than or equal to the specialized signature index - // in order to prevent non-specialized signatures from being added before a specialized - // signature. - cutoffIndex++; - } - else { - spliceIndex = index; - } - result.splice(spliceIndex, 0, signature); - } - } - function getSpreadArgumentIndex(args) { - for (var i = 0; i < args.length; i++) { - if (args[i].kind === 176 /* SpreadElementExpression */) { - return i; - } - } - return -1; - } - function hasCorrectArity(node, args, signature) { - var adjustedArgCount; // Apparent number of arguments we will have in this call - var typeArguments; // Type arguments (undefined if none) - var callIsIncomplete; // In incomplete call we want to be lenient when we have too few arguments - if (node.kind === 162 /* TaggedTemplateExpression */) { - var tagExpression = node; - // Even if the call is incomplete, we'll have a missing expression as our last argument, - // so we can say the count is just the arg list length - adjustedArgCount = args.length; - typeArguments = undefined; - if (tagExpression.template.kind === 174 /* TemplateExpression */) { - // If a tagged template expression lacks a tail literal, the call is incomplete. - // Specifically, a template only can end in a TemplateTail or a Missing literal. - var templateExpression = tagExpression.template; - var lastSpan = ts.lastOrUndefined(templateExpression.templateSpans); - ts.Debug.assert(lastSpan !== undefined); // we should always have at least one span. - callIsIncomplete = ts.nodeIsMissing(lastSpan.literal) || !!lastSpan.literal.isUnterminated; - } - else { - // If the template didn't end in a backtick, or its beginning occurred right prior to EOF, - // then this might actually turn out to be a TemplateHead in the future; - // so we consider the call to be incomplete. - var templateLiteral = tagExpression.template; - ts.Debug.assert(templateLiteral.kind === 10 /* NoSubstitutionTemplateLiteral */); - callIsIncomplete = !!templateLiteral.isUnterminated; - } - } - else { - var callExpression = node; - if (!callExpression.arguments) { - // This only happens when we have something of the form: 'new C' - ts.Debug.assert(callExpression.kind === 161 /* NewExpression */); - return signature.minArgumentCount === 0; - } - // For IDE scenarios we may have an incomplete call, so a trailing comma is tantamount to adding another argument. - adjustedArgCount = callExpression.arguments.hasTrailingComma ? args.length + 1 : args.length; - // If we are missing the close paren, the call is incomplete. - callIsIncomplete = callExpression.arguments.end === callExpression.end; - typeArguments = callExpression.typeArguments; - } - // If the user supplied type arguments, but the number of type arguments does not match - // the declared number of type parameters, the call has an incorrect arity. - var hasRightNumberOfTypeArgs = !typeArguments || - (signature.typeParameters && typeArguments.length === signature.typeParameters.length); - if (!hasRightNumberOfTypeArgs) { - return false; - } - // If spread arguments are present, check that they correspond to a rest parameter. If so, no - // further checking is necessary. - var spreadArgIndex = getSpreadArgumentIndex(args); - if (spreadArgIndex >= 0) { - return signature.hasRestParameter && spreadArgIndex >= signature.parameters.length - 1; - } - // Too many arguments implies incorrect arity. - if (!signature.hasRestParameter && adjustedArgCount > signature.parameters.length) { - return false; - } - // If the call is incomplete, we should skip the lower bound check. - var hasEnoughArguments = adjustedArgCount >= signature.minArgumentCount; - return callIsIncomplete || hasEnoughArguments; - } - // If type has a single call signature and no other members, return that signature. Otherwise, return undefined. - function getSingleCallSignature(type) { - if (type.flags & 48128 /* ObjectType */) { - var resolved = resolveObjectOrUnionTypeMembers(type); - if (resolved.callSignatures.length === 1 && resolved.constructSignatures.length === 0 && - resolved.properties.length === 0 && !resolved.stringIndexType && !resolved.numberIndexType) { - return resolved.callSignatures[0]; - } - } - return undefined; - } - // Instantiate a generic signature in the context of a non-generic signature (section 3.8.5 in TypeScript spec) - function instantiateSignatureInContextOf(signature, contextualSignature, contextualMapper) { - var context = createInferenceContext(signature.typeParameters, true); - forEachMatchingParameterType(contextualSignature, signature, function (source, target) { - // Type parameters from outer context referenced by source type are fixed by instantiation of the source type - inferTypes(context, instantiateType(source, contextualMapper), target); - }); - return getSignatureInstantiation(signature, getInferredTypes(context)); - } - function inferTypeArguments(signature, args, excludeArgument, context) { - var typeParameters = signature.typeParameters; - var inferenceMapper = createInferenceMapper(context); - // Clear out all the inference results from the last time inferTypeArguments was called on this context - for (var i = 0; i < typeParameters.length; i++) { - // As an optimization, we don't have to clear (and later recompute) inferred types - // for type parameters that have already been fixed on the previous call to inferTypeArguments. - // It would be just as correct to reset all of them. But then we'd be repeating the same work - // for the type parameters that were fixed, namely the work done by getInferredType. - if (!context.inferences[i].isFixed) { - context.inferredTypes[i] = undefined; - } - } - // On this call to inferTypeArguments, we may get more inferences for certain type parameters that were not - // fixed last time. This means that a type parameter that failed inference last time may succeed this time, - // or vice versa. Therefore, the failedTypeParameterIndex is useless if it points to an unfixed type parameter, - // because it may change. So here we reset it. However, getInferredType will not revisit any type parameters - // that were previously fixed. So if a fixed type parameter failed previously, it will fail again because - // it will contain the exact same set of inferences. So if we reset the index from a fixed type parameter, - // we will lose information that we won't recover this time around. - if (context.failedTypeParameterIndex !== undefined && !context.inferences[context.failedTypeParameterIndex].isFixed) { - context.failedTypeParameterIndex = undefined; - } - // We perform two passes over the arguments. In the first pass we infer from all arguments, but use - // wildcards for all context sensitive function expressions. - for (var i = 0; i < args.length; i++) { - var arg = args[i]; - if (arg.kind !== 178 /* OmittedExpression */) { - var paramType = getTypeAtPosition(signature, i); - var argType = void 0; - if (i === 0 && args[i].parent.kind === 162 /* TaggedTemplateExpression */) { - argType = globalTemplateStringsArrayType; - } - else { - // For context sensitive arguments we pass the identityMapper, which is a signal to treat all - // context sensitive function expressions as wildcards - var mapper = excludeArgument && excludeArgument[i] !== undefined ? identityMapper : inferenceMapper; - argType = checkExpressionWithContextualType(arg, paramType, mapper); - } - inferTypes(context, argType, paramType); - } - } - // In the second pass we visit only context sensitive arguments, and only those that aren't excluded, this - // time treating function expressions normally (which may cause previously inferred type arguments to be fixed - // as we construct types for contextually typed parameters) - if (excludeArgument) { - for (var i = 0; i < args.length; i++) { - // No need to check for omitted args and template expressions, their exlusion value is always undefined - if (excludeArgument[i] === false) { - var arg = args[i]; - var paramType = getTypeAtPosition(signature, i); - inferTypes(context, checkExpressionWithContextualType(arg, paramType, inferenceMapper), paramType); - } - } - } - getInferredTypes(context); - } - function checkTypeArguments(signature, typeArguments, typeArgumentResultTypes, reportErrors) { - var typeParameters = signature.typeParameters; - var typeArgumentsAreAssignable = true; - for (var i = 0; i < typeParameters.length; i++) { - var typeArgNode = typeArguments[i]; - var typeArgument = getTypeFromTypeNode(typeArgNode); - // Do not push on this array! It has a preallocated length - typeArgumentResultTypes[i] = typeArgument; - if (typeArgumentsAreAssignable /* so far */) { - var constraint = getConstraintOfTypeParameter(typeParameters[i]); - if (constraint) { - typeArgumentsAreAssignable = checkTypeAssignableTo(typeArgument, constraint, reportErrors ? typeArgNode : undefined, ts.Diagnostics.Type_0_does_not_satisfy_the_constraint_1); - } - } - } - return typeArgumentsAreAssignable; - } - function checkApplicableSignature(node, args, signature, relation, excludeArgument, reportErrors) { - for (var i = 0; i < args.length; i++) { - var arg = args[i]; - if (arg.kind !== 178 /* OmittedExpression */) { - // Check spread elements against rest type (from arity check we know spread argument corresponds to a rest parameter) - var paramType = getTypeAtPosition(signature, i); - // A tagged template expression provides a special first argument, and string literals get string literal types - // unless we're reporting errors - var argType = i === 0 && node.kind === 162 /* TaggedTemplateExpression */ - ? globalTemplateStringsArrayType - : arg.kind === 8 /* StringLiteral */ && !reportErrors - ? getStringLiteralType(arg) - : checkExpressionWithContextualType(arg, paramType, excludeArgument && excludeArgument[i] ? identityMapper : undefined); - // Use argument expression as error location when reporting errors - if (!checkTypeRelatedTo(argType, paramType, relation, reportErrors ? arg : undefined, ts.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1)) { - return false; - } - } - } - return true; - } - /** - * Returns the effective arguments for an expression that works like a function invocation. - * - * If 'node' is a CallExpression or a NewExpression, then its argument list is returned. - * If 'node' is a TaggedTemplateExpression, a new argument list is constructed from the substitution - * expressions, where the first element of the list is the template for error reporting purposes. - */ - function getEffectiveCallArguments(node) { - var args; - if (node.kind === 162 /* TaggedTemplateExpression */) { - var template = node.template; - args = [template]; - if (template.kind === 174 /* TemplateExpression */) { - ts.forEach(template.templateSpans, function (span) { - args.push(span.expression); - }); - } - } - else { - args = node.arguments || emptyArray; - } - return args; - } - /** - * In a 'super' call, type arguments are not provided within the CallExpression node itself. - * Instead, they must be fetched from the class declaration's base type node. - * - * If 'node' is a 'super' call (e.g. super(...), new super(...)), then we attempt to fetch - * the type arguments off the containing class's first heritage clause (if one exists). Note that if - * type arguments are supplied on the 'super' call, they are ignored (though this is syntactically incorrect). - * - * In all other cases, the call's explicit type arguments are returned. - */ - function getEffectiveTypeArguments(callExpression) { - if (callExpression.expression.kind === 91 /* SuperKeyword */) { - var containingClass = ts.getAncestor(callExpression, 204 /* ClassDeclaration */); - var baseClassTypeNode = containingClass && ts.getClassExtendsHeritageClauseElement(containingClass); - return baseClassTypeNode && baseClassTypeNode.typeArguments; - } - else { - // Ordinary case - simple function invocation. - return callExpression.typeArguments; - } - } - function resolveCall(node, signatures, candidatesOutArray) { - var isTaggedTemplate = node.kind === 162 /* TaggedTemplateExpression */; - var typeArguments; - if (!isTaggedTemplate) { - typeArguments = getEffectiveTypeArguments(node); - // We already perform checking on the type arguments on the class declaration itself. - if (node.expression.kind !== 91 /* SuperKeyword */) { - ts.forEach(typeArguments, checkSourceElement); - } - } - var candidates = candidatesOutArray || []; - // reorderCandidates fills up the candidates array directly - reorderCandidates(signatures, candidates); - if (!candidates.length) { - error(node, ts.Diagnostics.Supplied_parameters_do_not_match_any_signature_of_call_target); - return resolveErrorCall(node); - } - var args = getEffectiveCallArguments(node); - // The following applies to any value of 'excludeArgument[i]': - // - true: the argument at 'i' is susceptible to a one-time permanent contextual typing. - // - undefined: the argument at 'i' is *not* susceptible to permanent contextual typing. - // - false: the argument at 'i' *was* and *has been* permanently contextually typed. - // - // The idea is that we will perform type argument inference & assignability checking once - // without using the susceptible parameters that are functions, and once more for each of those - // parameters, contextually typing each as we go along. - // - // For a tagged template, then the first argument be 'undefined' if necessary - // because it represents a TemplateStringsArray. - var excludeArgument; - for (var i = isTaggedTemplate ? 1 : 0; i < args.length; i++) { - if (isContextSensitive(args[i])) { - if (!excludeArgument) { - excludeArgument = new Array(args.length); - } - excludeArgument[i] = true; - } - } - // The following variables are captured and modified by calls to chooseOverload. - // If overload resolution or type argument inference fails, we want to report the - // best error possible. The best error is one which says that an argument was not - // assignable to a parameter. This implies that everything else about the overload - // was fine. So if there is any overload that is only incorrect because of an - // argument, we will report an error on that one. - // - // function foo(s: string) {} - // function foo(n: number) {} // Report argument error on this overload - // function foo() {} - // foo(true); - // - // If none of the overloads even made it that far, there are two possibilities. - // There was a problem with type arguments for some overload, in which case - // report an error on that. Or none of the overloads even had correct arity, - // in which case give an arity error. - // - // function foo(x: T, y: T) {} // Report type argument inference error - // function foo() {} - // foo(0, true); - // - var candidateForArgumentError; - var candidateForTypeArgumentError; - var resultOfFailedInference; - var result; - // Section 4.12.1: - // if the candidate list contains one or more signatures for which the type of each argument - // expression is a subtype of each corresponding parameter type, the return type of the first - // of those signatures becomes the return type of the function call. - // Otherwise, the return type of the first signature in the candidate list becomes the return - // type of the function call. - // - // Whether the call is an error is determined by assignability of the arguments. The subtype pass - // is just important for choosing the best signature. So in the case where there is only one - // signature, the subtype pass is useless. So skipping it is an optimization. - if (candidates.length > 1) { - result = chooseOverload(candidates, subtypeRelation); - } - if (!result) { - // Reinitialize these pointers for round two - candidateForArgumentError = undefined; - candidateForTypeArgumentError = undefined; - resultOfFailedInference = undefined; - result = chooseOverload(candidates, assignableRelation); - } - if (result) { - return result; - } - // No signatures were applicable. Now report errors based on the last applicable signature with - // no arguments excluded from assignability checks. - // If candidate is undefined, it means that no candidates had a suitable arity. In that case, - // skip the checkApplicableSignature check. - if (candidateForArgumentError) { - // excludeArgument is undefined, in this case also equivalent to [undefined, undefined, ...] - // The importance of excludeArgument is to prevent us from typing function expression parameters - // in arguments too early. If possible, we'd like to only type them once we know the correct - // overload. However, this matters for the case where the call is correct. When the call is - // an error, we don't need to exclude any arguments, although it would cause no harm to do so. - checkApplicableSignature(node, args, candidateForArgumentError, assignableRelation, undefined, true); - } - else if (candidateForTypeArgumentError) { - if (!isTaggedTemplate && typeArguments) { - checkTypeArguments(candidateForTypeArgumentError, typeArguments, [], true); - } - else { - ts.Debug.assert(resultOfFailedInference.failedTypeParameterIndex >= 0); - var failedTypeParameter = candidateForTypeArgumentError.typeParameters[resultOfFailedInference.failedTypeParameterIndex]; - var inferenceCandidates = getInferenceCandidates(resultOfFailedInference, resultOfFailedInference.failedTypeParameterIndex); - var diagnosticChainHead = ts.chainDiagnosticMessages(undefined, ts.Diagnostics.The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly, typeToString(failedTypeParameter)); - reportNoCommonSupertypeError(inferenceCandidates, node.expression || node.tag, diagnosticChainHead); - } - } - else { - error(node, ts.Diagnostics.Supplied_parameters_do_not_match_any_signature_of_call_target); - } - // No signature was applicable. We have already reported the errors for the invalid signature. - // If this is a type resolution session, e.g. Language Service, try to get better information that anySignature. - // Pick the first candidate that matches the arity. This way we can get a contextual type for cases like: - // declare function f(a: { xa: number; xb: number; }); - // f({ | - if (!produceDiagnostics) { - for (var _i = 0; _i < candidates.length; _i++) { - var candidate = candidates[_i]; - if (hasCorrectArity(node, args, candidate)) { - return candidate; - } - } - } - return resolveErrorCall(node); - function chooseOverload(candidates, relation) { - for (var _i = 0; _i < candidates.length; _i++) { - var originalCandidate = candidates[_i]; - if (!hasCorrectArity(node, args, originalCandidate)) { - continue; - } - var candidate = void 0; - var typeArgumentsAreValid = void 0; - var inferenceContext = originalCandidate.typeParameters - ? createInferenceContext(originalCandidate.typeParameters, false) - : undefined; - while (true) { - candidate = originalCandidate; - if (candidate.typeParameters) { - var typeArgumentTypes = void 0; - if (typeArguments) { - typeArgumentTypes = new Array(candidate.typeParameters.length); - typeArgumentsAreValid = checkTypeArguments(candidate, typeArguments, typeArgumentTypes, false); - } - else { - inferTypeArguments(candidate, args, excludeArgument, inferenceContext); - typeArgumentsAreValid = inferenceContext.failedTypeParameterIndex === undefined; - typeArgumentTypes = inferenceContext.inferredTypes; - } - if (!typeArgumentsAreValid) { - break; - } - candidate = getSignatureInstantiation(candidate, typeArgumentTypes); - } - if (!checkApplicableSignature(node, args, candidate, relation, excludeArgument, false)) { - break; - } - var index = excludeArgument ? ts.indexOf(excludeArgument, true) : -1; - if (index < 0) { - return candidate; - } - excludeArgument[index] = false; - } - // A post-mortem of this iteration of the loop. The signature was not applicable, - // so we want to track it as a candidate for reporting an error. If the candidate - // had no type parameters, or had no issues related to type arguments, we can - // report an error based on the arguments. If there was an issue with type - // arguments, then we can only report an error based on the type arguments. - if (originalCandidate.typeParameters) { - var instantiatedCandidate = candidate; - if (typeArgumentsAreValid) { - candidateForArgumentError = instantiatedCandidate; - } - else { - candidateForTypeArgumentError = originalCandidate; - if (!typeArguments) { - resultOfFailedInference = inferenceContext; - } - } - } - else { - ts.Debug.assert(originalCandidate === candidate); - candidateForArgumentError = originalCandidate; - } - } - return undefined; - } - } - function resolveCallExpression(node, candidatesOutArray) { - if (node.expression.kind === 91 /* SuperKeyword */) { - var superType = checkSuperExpression(node.expression); - if (superType !== unknownType) { - return resolveCall(node, getSignaturesOfType(superType, 1 /* Construct */), candidatesOutArray); - } - return resolveUntypedCall(node); - } - var funcType = checkExpression(node.expression); - var apparentType = getApparentType(funcType); - if (apparentType === unknownType) { - // Another error has already been reported - return resolveErrorCall(node); - } - // Technically, this signatures list may be incomplete. We are taking the apparent type, - // but we are not including call signatures that may have been added to the Object or - // Function interface, since they have none by default. This is a bit of a leap of faith - // that the user will not add any. - var callSignatures = getSignaturesOfType(apparentType, 0 /* Call */); - var constructSignatures = getSignaturesOfType(apparentType, 1 /* Construct */); - // TS 1.0 spec: 4.12 - // If FuncExpr is of type Any, or of an object type that has no call or construct signatures - // but is a subtype of the Function interface, the call is an untyped function call. In an - // untyped function call no TypeArgs are permitted, Args can be any argument list, no contextual - // types are provided for the argument expressions, and the result is always of type Any. - // We exclude union types because we may have a union of function types that happen to have - // no common signatures. - if (isTypeAny(funcType) || (!callSignatures.length && !constructSignatures.length && !(funcType.flags & 16384 /* Union */) && isTypeAssignableTo(funcType, globalFunctionType))) { - // The unknownType indicates that an error already occured (and was reported). No - // need to report another error in this case. - if (funcType !== unknownType && node.typeArguments) { - error(node, ts.Diagnostics.Untyped_function_calls_may_not_accept_type_arguments); - } - return resolveUntypedCall(node); - } - // If FuncExpr's apparent type(section 3.8.1) is a function type, the call is a typed function call. - // TypeScript employs overload resolution in typed function calls in order to support functions - // with multiple call signatures. - if (!callSignatures.length) { - if (constructSignatures.length) { - error(node, ts.Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, typeToString(funcType)); - } - else { - error(node, ts.Diagnostics.Cannot_invoke_an_expression_whose_type_lacks_a_call_signature); - } - return resolveErrorCall(node); - } - return resolveCall(node, callSignatures, candidatesOutArray); - } - function resolveNewExpression(node, candidatesOutArray) { - if (node.arguments && languageVersion < 1 /* ES5 */) { - var spreadIndex = getSpreadArgumentIndex(node.arguments); - if (spreadIndex >= 0) { - error(node.arguments[spreadIndex], ts.Diagnostics.Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher); - } - } - var expressionType = checkExpression(node.expression); - // If ConstructExpr's apparent type(section 3.8.1) is an object type with one or - // more construct signatures, the expression is processed in the same manner as a - // function call, but using the construct signatures as the initial set of candidate - // signatures for overload resolution. The result type of the function call becomes - // the result type of the operation. - expressionType = getApparentType(expressionType); - if (expressionType === unknownType) { - // Another error has already been reported - return resolveErrorCall(node); - } - // TS 1.0 spec: 4.11 - // If ConstructExpr is of type Any, Args can be any argument - // list and the result of the operation is of type Any. - if (isTypeAny(expressionType)) { - if (node.typeArguments) { - error(node, ts.Diagnostics.Untyped_function_calls_may_not_accept_type_arguments); - } - return resolveUntypedCall(node); - } - // Technically, this signatures list may be incomplete. We are taking the apparent type, - // but we are not including construct signatures that may have been added to the Object or - // Function interface, since they have none by default. This is a bit of a leap of faith - // that the user will not add any. - var constructSignatures = getSignaturesOfType(expressionType, 1 /* Construct */); - if (constructSignatures.length) { - return resolveCall(node, constructSignatures, candidatesOutArray); - } - // If ConstructExpr's apparent type is an object type with no construct signatures but - // one or more call signatures, the expression is processed as a function call. A compile-time - // error occurs if the result of the function call is not Void. The type of the result of the - // operation is Any. - var callSignatures = getSignaturesOfType(expressionType, 0 /* Call */); - if (callSignatures.length) { - var signature = resolveCall(node, callSignatures, candidatesOutArray); - if (getReturnTypeOfSignature(signature) !== voidType) { - error(node, ts.Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword); - } - return signature; - } - error(node, ts.Diagnostics.Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature); - return resolveErrorCall(node); - } - function resolveTaggedTemplateExpression(node, candidatesOutArray) { - var tagType = checkExpression(node.tag); - var apparentType = getApparentType(tagType); - if (apparentType === unknownType) { - // Another error has already been reported - return resolveErrorCall(node); - } - var callSignatures = getSignaturesOfType(apparentType, 0 /* Call */); - if (isTypeAny(tagType) || (!callSignatures.length && !(tagType.flags & 16384 /* Union */) && isTypeAssignableTo(tagType, globalFunctionType))) { - return resolveUntypedCall(node); - } - if (!callSignatures.length) { - error(node, ts.Diagnostics.Cannot_invoke_an_expression_whose_type_lacks_a_call_signature); - return resolveErrorCall(node); - } - return resolveCall(node, callSignatures, candidatesOutArray); - } - // candidatesOutArray is passed by signature help in the language service, and collectCandidates - // must fill it up with the appropriate candidate signatures - function getResolvedSignature(node, candidatesOutArray) { - var links = getNodeLinks(node); - // If getResolvedSignature has already been called, we will have cached the resolvedSignature. - // However, it is possible that either candidatesOutArray was not passed in the first time, - // or that a different candidatesOutArray was passed in. Therefore, we need to redo the work - // to correctly fill the candidatesOutArray. - if (!links.resolvedSignature || candidatesOutArray) { - links.resolvedSignature = anySignature; - if (node.kind === 160 /* CallExpression */) { - links.resolvedSignature = resolveCallExpression(node, candidatesOutArray); - } - else if (node.kind === 161 /* NewExpression */) { - links.resolvedSignature = resolveNewExpression(node, candidatesOutArray); - } - else if (node.kind === 162 /* TaggedTemplateExpression */) { - links.resolvedSignature = resolveTaggedTemplateExpression(node, candidatesOutArray); - } - else { - ts.Debug.fail("Branch in 'getResolvedSignature' should be unreachable."); - } - } - return links.resolvedSignature; - } - function checkCallExpression(node) { - // Grammar checking; stop grammar-checking if checkGrammarTypeArguments return true - checkGrammarTypeArguments(node, node.typeArguments) || checkGrammarArguments(node, node.arguments); - var signature = getResolvedSignature(node); - if (node.expression.kind === 91 /* SuperKeyword */) { - return voidType; - } - if (node.kind === 161 /* NewExpression */) { - var declaration = signature.declaration; - if (declaration && - declaration.kind !== 137 /* Constructor */ && - declaration.kind !== 141 /* ConstructSignature */ && - declaration.kind !== 146 /* ConstructorType */) { - // When resolved signature is a call signature (and not a construct signature) the result type is any - if (compilerOptions.noImplicitAny) { - error(node, ts.Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type); - } - return anyType; - } - } - return getReturnTypeOfSignature(signature); - } - function checkTaggedTemplateExpression(node) { - return getReturnTypeOfSignature(getResolvedSignature(node)); - } - function checkTypeAssertion(node) { - var exprType = checkExpression(node.expression); - var targetType = getTypeFromTypeNode(node.type); - if (produceDiagnostics && targetType !== unknownType) { - var widenedType = getWidenedType(exprType); - if (!(isTypeAssignableTo(targetType, widenedType))) { - checkTypeAssignableTo(exprType, targetType, node, ts.Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other); - } - } - return targetType; - } - function getTypeAtPosition(signature, pos) { - return signature.hasRestParameter ? - pos < signature.parameters.length - 1 ? getTypeOfSymbol(signature.parameters[pos]) : getRestTypeOfSignature(signature) : - pos < signature.parameters.length ? getTypeOfSymbol(signature.parameters[pos]) : anyType; - } - function assignContextualParameterTypes(signature, context, mapper) { - var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); - for (var i = 0; i < len; i++) { - var parameter = signature.parameters[i]; - var links = getSymbolLinks(parameter); - links.type = instantiateType(getTypeAtPosition(context, i), mapper); - } - if (signature.hasRestParameter && context.hasRestParameter && signature.parameters.length >= context.parameters.length) { - var parameter = ts.lastOrUndefined(signature.parameters); - var links = getSymbolLinks(parameter); - links.type = instantiateType(getTypeOfSymbol(ts.lastOrUndefined(context.parameters)), mapper); - } - } - function getReturnTypeFromBody(func, contextualMapper) { - var contextualSignature = getContextualSignatureForFunctionLikeDeclaration(func); - if (!func.body) { - return unknownType; - } - var type; - if (func.body.kind !== 182 /* Block */) { - type = checkExpressionCached(func.body, contextualMapper); - } - else { - var types; - var funcIsGenerator = !!func.asteriskToken; - if (funcIsGenerator) { - types = checkAndAggregateYieldOperandTypes(func.body, contextualMapper); - if (types.length === 0) { - var iterableIteratorAny = createIterableIteratorType(anyType); - if (compilerOptions.noImplicitAny) { - error(func.asteriskToken, ts.Diagnostics.Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type, typeToString(iterableIteratorAny)); - } - return iterableIteratorAny; - } - } - else { - types = checkAndAggregateReturnExpressionTypes(func.body, contextualMapper); - if (types.length === 0) { - return voidType; - } - } - // When yield/return statements are contextually typed we allow the return type to be a union type. - // Otherwise we require the yield/return expressions to have a best common supertype. - type = contextualSignature ? getUnionType(types) : getCommonSupertype(types); - if (!type) { - if (funcIsGenerator) { - error(func, ts.Diagnostics.No_best_common_type_exists_among_yield_expressions); - return createIterableIteratorType(unknownType); - } - else { - error(func, ts.Diagnostics.No_best_common_type_exists_among_return_expressions); - return unknownType; - } - } - if (funcIsGenerator) { - type = createIterableIteratorType(type); - } - } - if (!contextualSignature) { - reportErrorsFromWidening(func, type); - } - return getWidenedType(type); - } - function checkAndAggregateYieldOperandTypes(body, contextualMapper) { - var aggregatedTypes = []; - ts.forEachYieldExpression(body, function (yieldExpression) { - var expr = yieldExpression.expression; - if (expr) { - var type = checkExpressionCached(expr, contextualMapper); - if (yieldExpression.asteriskToken) { - // A yield* expression effectively yields everything that its operand yields - type = checkElementTypeOfIterable(type, yieldExpression.expression); - } - if (!ts.contains(aggregatedTypes, type)) { - aggregatedTypes.push(type); - } - } - }); - return aggregatedTypes; - } - function checkAndAggregateReturnExpressionTypes(body, contextualMapper) { - var aggregatedTypes = []; - ts.forEachReturnStatement(body, function (returnStatement) { - var expr = returnStatement.expression; - if (expr) { - var type = checkExpressionCached(expr, contextualMapper); - if (!ts.contains(aggregatedTypes, type)) { - aggregatedTypes.push(type); - } - } - }); - return aggregatedTypes; - } - function bodyContainsAReturnStatement(funcBody) { - return ts.forEachReturnStatement(funcBody, function (returnStatement) { - return true; - }); - } - function bodyContainsSingleThrowStatement(body) { - return (body.statements.length === 1) && (body.statements[0].kind === 198 /* ThrowStatement */); - } - // TypeScript Specification 1.0 (6.3) - July 2014 - // An explicitly typed function whose return type isn't the Void or the Any type - // must have at least one return statement somewhere in its body. - // An exception to this rule is if the function implementation consists of a single 'throw' statement. - function checkIfNonVoidFunctionHasReturnExpressionsOrSingleThrowStatment(func, returnType) { - if (!produceDiagnostics) { - return; - } - // Functions that return 'void' or 'any' don't need any return expressions. - if (returnType === voidType || isTypeAny(returnType)) { - return; - } - // If all we have is a function signature, or an arrow function with an expression body, then there is nothing to check. - if (ts.nodeIsMissing(func.body) || func.body.kind !== 182 /* Block */) { - return; - } - var bodyBlock = func.body; - // Ensure the body has at least one return expression. - if (bodyContainsAReturnStatement(bodyBlock)) { - return; - } - // If there are no return expressions, then we need to check if - // the function body consists solely of a throw statement; - // this is to make an exception for unimplemented functions. - if (bodyContainsSingleThrowStatement(bodyBlock)) { - return; - } - // This function does not conform to the specification. - error(func.type, ts.Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_or_consist_of_a_single_throw_statement); - } - function checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper) { - ts.Debug.assert(node.kind !== 136 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); - // Grammar checking - var hasGrammarError = checkGrammarDeclarationNameInStrictMode(node) || checkGrammarFunctionLikeDeclaration(node); - if (!hasGrammarError && node.kind === 165 /* FunctionExpression */) { - checkGrammarFunctionName(node.name) || checkGrammarForGenerator(node); - } - // The identityMapper object is used to indicate that function expressions are wildcards - if (contextualMapper === identityMapper && isContextSensitive(node)) { - return anyFunctionType; - } - var links = getNodeLinks(node); - var type = getTypeOfSymbol(node.symbol); - // Check if function expression is contextually typed and assign parameter types if so - if (!(links.flags & 64 /* ContextChecked */)) { - var contextualSignature = getContextualSignature(node); - // If a type check is started at a function expression that is an argument of a function call, obtaining the - // contextual type may recursively get back to here during overload resolution of the call. If so, we will have - // already assigned contextual types. - if (!(links.flags & 64 /* ContextChecked */)) { - links.flags |= 64 /* ContextChecked */; - if (contextualSignature) { - var signature = getSignaturesOfType(type, 0 /* Call */)[0]; - if (isContextSensitive(node)) { - assignContextualParameterTypes(signature, contextualSignature, contextualMapper || identityMapper); - } - if (!node.type && !signature.resolvedReturnType) { - var returnType = getReturnTypeFromBody(node, contextualMapper); - if (!signature.resolvedReturnType) { - signature.resolvedReturnType = returnType; - } - } - } - checkSignatureDeclaration(node); - } - } - if (produceDiagnostics && node.kind !== 136 /* MethodDeclaration */ && node.kind !== 135 /* MethodSignature */) { - checkCollisionWithCapturedSuperVariable(node, node.name); - checkCollisionWithCapturedThisVariable(node, node.name); - } - return type; - } - function checkFunctionExpressionOrObjectLiteralMethodBody(node) { - ts.Debug.assert(node.kind !== 136 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); - if (node.type && !node.asteriskToken) { - checkIfNonVoidFunctionHasReturnExpressionsOrSingleThrowStatment(node, getTypeFromTypeNode(node.type)); - } - if (node.body) { - if (!node.type) { - // There are some checks that are only performed in getReturnTypeFromBody, that may produce errors - // we need. An example is the noImplicitAny errors resulting from widening the return expression - // of a function. Because checking of function expression bodies is deferred, there was never an - // appropriate time to do this during the main walk of the file (see the comment at the top of - // checkFunctionExpressionBodies). So it must be done now. - getReturnTypeOfSignature(getSignatureFromDeclaration(node)); - } - if (node.body.kind === 182 /* Block */) { - checkSourceElement(node.body); - } - else { - var exprType = checkExpression(node.body); - if (node.type) { - checkTypeAssignableTo(exprType, getTypeFromTypeNode(node.type), node.body, undefined); - } - checkFunctionExpressionBodies(node.body); - } - } - } - function checkArithmeticOperandType(operand, type, diagnostic) { - if (!isTypeAnyOrAllConstituentTypesHaveKind(type, 132 /* NumberLike */)) { - error(operand, diagnostic); - return false; - } - return true; - } - function checkReferenceExpression(n, invalidReferenceMessage, constantVariableMessage) { - function findSymbol(n) { - var symbol = getNodeLinks(n).resolvedSymbol; - // Because we got the symbol from the resolvedSymbol property, it might be of kind - // SymbolFlags.ExportValue. In this case it is necessary to get the actual export - // symbol, which will have the correct flags set on it. - return symbol && getExportSymbolOfValueSymbolIfExported(symbol); - } - function isReferenceOrErrorExpression(n) { - // TypeScript 1.0 spec (April 2014): - // Expressions are classified as values or references. - // References are the subset of expressions that are permitted as the target of an assignment. - // Specifically, references are combinations of identifiers(section 4.3), parentheses(section 4.7), - // and property accesses(section 4.10). - // All other expression constructs described in this chapter are classified as values. - switch (n.kind) { - case 65 /* Identifier */: { - var symbol = findSymbol(n); - // TypeScript 1.0 spec (April 2014): 4.3 - // An identifier expression that references a variable or parameter is classified as a reference. - // An identifier expression that references any other kind of entity is classified as a value(and therefore cannot be the target of an assignment). - return !symbol || symbol === unknownSymbol || symbol === argumentsSymbol || (symbol.flags & 3 /* Variable */) !== 0; - } - case 158 /* PropertyAccessExpression */: { - var symbol = findSymbol(n); - // TypeScript 1.0 spec (April 2014): 4.10 - // A property access expression is always classified as a reference. - // NOTE (not in spec): assignment to enum members should not be allowed - return !symbol || symbol === unknownSymbol || (symbol.flags & ~8 /* EnumMember */) !== 0; - } - case 159 /* ElementAccessExpression */: - // old compiler doesn't check indexed assess - return true; - case 164 /* ParenthesizedExpression */: - return isReferenceOrErrorExpression(n.expression); - default: - return false; - } - } - function isConstVariableReference(n) { - switch (n.kind) { - case 65 /* Identifier */: - case 158 /* PropertyAccessExpression */: { - var symbol = findSymbol(n); - return symbol && (symbol.flags & 3 /* Variable */) !== 0 && (getDeclarationFlagsFromSymbol(symbol) & 8192 /* Const */) !== 0; - } - case 159 /* ElementAccessExpression */: { - var index = n.argumentExpression; - var symbol = findSymbol(n.expression); - if (symbol && index && index.kind === 8 /* StringLiteral */) { - var name_11 = index.text; - var prop = getPropertyOfType(getTypeOfSymbol(symbol), name_11); - return prop && (prop.flags & 3 /* Variable */) !== 0 && (getDeclarationFlagsFromSymbol(prop) & 8192 /* Const */) !== 0; - } - return false; - } - case 164 /* ParenthesizedExpression */: - return isConstVariableReference(n.expression); - default: - return false; - } - } - if (!isReferenceOrErrorExpression(n)) { - error(n, invalidReferenceMessage); - return false; - } - if (isConstVariableReference(n)) { - error(n, constantVariableMessage); - return false; - } - return true; - } - function checkDeleteExpression(node) { - // Grammar checking - if (node.parserContextFlags & 1 /* StrictMode */ && node.expression.kind === 65 /* Identifier */) { - // When a delete operator occurs within strict mode code, a SyntaxError is thrown if its - // UnaryExpression is a direct reference to a variable, function argument, or function name - grammarErrorOnNode(node.expression, ts.Diagnostics.delete_cannot_be_called_on_an_identifier_in_strict_mode); - } - var operandType = checkExpression(node.expression); - return booleanType; - } - function checkTypeOfExpression(node) { - var operandType = checkExpression(node.expression); - return stringType; - } - function checkVoidExpression(node) { - var operandType = checkExpression(node.expression); - return undefinedType; - } - function checkPrefixUnaryExpression(node) { - // Grammar checking - // The identifier eval or arguments may not appear as the LeftHandSideExpression of an - // Assignment operator(11.13) or of a PostfixExpression(11.3) or as the UnaryExpression - // operated upon by a Prefix Increment(11.4.4) or a Prefix Decrement(11.4.5) operator - if ((node.operator === 38 /* PlusPlusToken */ || node.operator === 39 /* MinusMinusToken */)) { - checkGrammarEvalOrArgumentsInStrictMode(node, node.operand); - } - var operandType = checkExpression(node.operand); - switch (node.operator) { - case 33 /* PlusToken */: - case 34 /* MinusToken */: - case 47 /* TildeToken */: - if (someConstituentTypeHasKind(operandType, 2097152 /* ESSymbol */)) { - error(node.operand, ts.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, ts.tokenToString(node.operator)); - } - return numberType; - case 46 /* ExclamationToken */: - return booleanType; - case 38 /* PlusPlusToken */: - case 39 /* MinusMinusToken */: - var ok = checkArithmeticOperandType(node.operand, operandType, ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type); - if (ok) { - // run check only if former checks succeeded to avoid reporting cascading errors - checkReferenceExpression(node.operand, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant); - } - return numberType; - } - return unknownType; - } - function checkPostfixUnaryExpression(node) { - // Grammar checking - // The identifier eval or arguments may not appear as the LeftHandSideExpression of an - // Assignment operator(11.13) or of a PostfixExpression(11.3) or as the UnaryExpression - // operated upon by a Prefix Increment(11.4.4) or a Prefix Decrement(11.4.5) operator. - checkGrammarEvalOrArgumentsInStrictMode(node, node.operand); - var operandType = checkExpression(node.operand); - var ok = checkArithmeticOperandType(node.operand, operandType, ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type); - if (ok) { - // run check only if former checks succeeded to avoid reporting cascading errors - checkReferenceExpression(node.operand, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant); - } - return numberType; - } - // Just like isTypeOfKind below, except that it returns true if *any* constituent - // has this kind. - function someConstituentTypeHasKind(type, kind) { - if (type.flags & kind) { - return true; - } - if (type.flags & 16384 /* Union */) { - var types = type.types; - for (var _i = 0; _i < types.length; _i++) { - var current = types[_i]; - if (current.flags & kind) { - return true; - } - } - return false; - } - return false; - } - // Return true if type has the given flags, or is a union type composed of types that all have those flags. - function allConstituentTypesHaveKind(type, kind) { - if (type.flags & kind) { - return true; - } - if (type.flags & 16384 /* Union */) { - var types = type.types; - for (var _i = 0; _i < types.length; _i++) { - var current = types[_i]; - if (!(current.flags & kind)) { - return false; - } - } - return true; - } - return false; - } - function isConstEnumObjectType(type) { - return type.flags & (48128 /* ObjectType */ | 32768 /* Anonymous */) && type.symbol && isConstEnumSymbol(type.symbol); - } - function isConstEnumSymbol(symbol) { - return (symbol.flags & 128 /* ConstEnum */) !== 0; - } - function checkInstanceOfExpression(node, leftType, rightType) { - // TypeScript 1.0 spec (April 2014): 4.15.4 - // The instanceof operator requires the left operand to be of type Any, an object type, or a type parameter type, - // and the right operand to be of type Any or a subtype of the 'Function' interface type. - // The result is always of the Boolean primitive type. - // NOTE: do not raise error if leftType is unknown as related error was already reported - if (allConstituentTypesHaveKind(leftType, 2097662 /* Primitive */)) { - error(node.left, ts.Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); - } - // NOTE: do not raise error if right is unknown as related error was already reported - if (!(isTypeAny(rightType) || isTypeSubtypeOf(rightType, globalFunctionType))) { - error(node.right, ts.Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type); - } - return booleanType; - } - function checkInExpression(node, leftType, rightType) { - // TypeScript 1.0 spec (April 2014): 4.15.5 - // The in operator requires the left operand to be of type Any, the String primitive type, or the Number primitive type, - // and the right operand to be of type Any, an object type, or a type parameter type. - // The result is always of the Boolean primitive type. - if (!isTypeAnyOrAllConstituentTypesHaveKind(leftType, 258 /* StringLike */ | 132 /* NumberLike */ | 2097152 /* ESSymbol */)) { - error(node.left, ts.Diagnostics.The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol); - } - if (!isTypeAnyOrAllConstituentTypesHaveKind(rightType, 48128 /* ObjectType */ | 512 /* TypeParameter */)) { - error(node.right, ts.Diagnostics.The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); - } - return booleanType; - } - function checkObjectLiteralAssignment(node, sourceType, contextualMapper) { - var properties = node.properties; - for (var _i = 0; _i < properties.length; _i++) { - var p = properties[_i]; - if (p.kind === 227 /* PropertyAssignment */ || p.kind === 228 /* ShorthandPropertyAssignment */) { - // TODO(andersh): Computed property support - var name_12 = p.name; - var type = isTypeAny(sourceType) - ? sourceType - : getTypeOfPropertyOfType(sourceType, name_12.text) || - isNumericLiteralName(name_12.text) && getIndexTypeOfType(sourceType, 1 /* Number */) || - getIndexTypeOfType(sourceType, 0 /* String */); - if (type) { - checkDestructuringAssignment(p.initializer || name_12, type); - } - else { - error(name_12, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(sourceType), ts.declarationNameToString(name_12)); - } - } - else { - error(p, ts.Diagnostics.Property_assignment_expected); - } - } - return sourceType; - } - function checkArrayLiteralAssignment(node, sourceType, contextualMapper) { - // This elementType will be used if the specific property corresponding to this index is not - // present (aka the tuple element property). This call also checks that the parentType is in - // fact an iterable or array (depending on target language). - var elementType = checkIteratedTypeOrElementType(sourceType, node, false) || unknownType; - var elements = node.elements; - for (var i = 0; i < elements.length; i++) { - var e = elements[i]; - if (e.kind !== 178 /* OmittedExpression */) { - if (e.kind !== 176 /* SpreadElementExpression */) { - var propName = "" + i; - var type = isTypeAny(sourceType) - ? sourceType - : isTupleLikeType(sourceType) - ? getTypeOfPropertyOfType(sourceType, propName) - : elementType; - if (type) { - checkDestructuringAssignment(e, type, contextualMapper); - } - else { - if (isTupleType(sourceType)) { - error(e, ts.Diagnostics.Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2, typeToString(sourceType), sourceType.elementTypes.length, elements.length); - } - else { - error(e, ts.Diagnostics.Type_0_has_no_property_1, typeToString(sourceType), propName); - } - } - } - else { - if (i < elements.length - 1) { - error(e, ts.Diagnostics.A_rest_element_must_be_last_in_an_array_destructuring_pattern); - } - else { - var restExpression = e.expression; - if (restExpression.kind === 172 /* BinaryExpression */ && restExpression.operatorToken.kind === 53 /* EqualsToken */) { - error(restExpression.operatorToken, ts.Diagnostics.A_rest_element_cannot_have_an_initializer); - } - else { - checkDestructuringAssignment(restExpression, createArrayType(elementType), contextualMapper); - } - } - } - } - } - return sourceType; - } - function checkDestructuringAssignment(target, sourceType, contextualMapper) { - if (target.kind === 172 /* BinaryExpression */ && target.operatorToken.kind === 53 /* EqualsToken */) { - checkBinaryExpression(target, contextualMapper); - target = target.left; - } - if (target.kind === 157 /* ObjectLiteralExpression */) { - return checkObjectLiteralAssignment(target, sourceType, contextualMapper); - } - if (target.kind === 156 /* ArrayLiteralExpression */) { - return checkArrayLiteralAssignment(target, sourceType, contextualMapper); - } - return checkReferenceAssignment(target, sourceType, contextualMapper); - } - function checkReferenceAssignment(target, sourceType, contextualMapper) { - var targetType = checkExpression(target, contextualMapper); - if (checkReferenceExpression(target, ts.Diagnostics.Invalid_left_hand_side_of_assignment_expression, ts.Diagnostics.Left_hand_side_of_assignment_expression_cannot_be_a_constant)) { - checkTypeAssignableTo(sourceType, targetType, target, undefined); - } - return sourceType; - } - function checkBinaryExpression(node, contextualMapper) { - // Grammar checking - if (ts.isLeftHandSideExpression(node.left) && ts.isAssignmentOperator(node.operatorToken.kind)) { - // ECMA 262 (Annex C) The identifier eval or arguments may not appear as the LeftHandSideExpression of an - // Assignment operator(11.13) or of a PostfixExpression(11.3) - checkGrammarEvalOrArgumentsInStrictMode(node, node.left); - } - var operator = node.operatorToken.kind; - if (operator === 53 /* EqualsToken */ && (node.left.kind === 157 /* ObjectLiteralExpression */ || node.left.kind === 156 /* ArrayLiteralExpression */)) { - return checkDestructuringAssignment(node.left, checkExpression(node.right, contextualMapper), contextualMapper); - } - var leftType = checkExpression(node.left, contextualMapper); - var rightType = checkExpression(node.right, contextualMapper); - switch (operator) { - case 35 /* AsteriskToken */: - case 56 /* AsteriskEqualsToken */: - case 36 /* SlashToken */: - case 57 /* SlashEqualsToken */: - case 37 /* PercentToken */: - case 58 /* PercentEqualsToken */: - case 34 /* MinusToken */: - case 55 /* MinusEqualsToken */: - case 40 /* LessThanLessThanToken */: - case 59 /* LessThanLessThanEqualsToken */: - case 41 /* GreaterThanGreaterThanToken */: - case 60 /* GreaterThanGreaterThanEqualsToken */: - case 42 /* GreaterThanGreaterThanGreaterThanToken */: - case 61 /* GreaterThanGreaterThanGreaterThanEqualsToken */: - case 44 /* BarToken */: - case 63 /* BarEqualsToken */: - case 45 /* CaretToken */: - case 64 /* CaretEqualsToken */: - case 43 /* AmpersandToken */: - case 62 /* AmpersandEqualsToken */: - // TypeScript 1.0 spec (April 2014): 4.15.1 - // These operators require their operands to be of type Any, the Number primitive type, - // or an enum type. Operands of an enum type are treated - // as having the primitive type Number. If one operand is the null or undefined value, - // it is treated as having the type of the other operand. - // The result is always of the Number primitive type. - if (leftType.flags & (32 /* Undefined */ | 64 /* Null */)) - leftType = rightType; - if (rightType.flags & (32 /* Undefined */ | 64 /* Null */)) - rightType = leftType; - var suggestedOperator; - // if a user tries to apply a bitwise operator to 2 boolean operands - // try and return them a helpful suggestion - if ((leftType.flags & 8 /* Boolean */) && - (rightType.flags & 8 /* Boolean */) && - (suggestedOperator = getSuggestedBooleanOperator(node.operatorToken.kind)) !== undefined) { - error(node, ts.Diagnostics.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead, ts.tokenToString(node.operatorToken.kind), ts.tokenToString(suggestedOperator)); - } - else { - // otherwise just check each operand separately and report errors as normal - var leftOk = checkArithmeticOperandType(node.left, leftType, ts.Diagnostics.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type); - var rightOk = checkArithmeticOperandType(node.right, rightType, ts.Diagnostics.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type); - if (leftOk && rightOk) { - checkAssignmentOperator(numberType); - } - } - return numberType; - case 33 /* PlusToken */: - case 54 /* PlusEqualsToken */: - // TypeScript 1.0 spec (April 2014): 4.15.2 - // The binary + operator requires both operands to be of the Number primitive type or an enum type, - // or at least one of the operands to be of type Any or the String primitive type. - // If one operand is the null or undefined value, it is treated as having the type of the other operand. - if (leftType.flags & (32 /* Undefined */ | 64 /* Null */)) - leftType = rightType; - if (rightType.flags & (32 /* Undefined */ | 64 /* Null */)) - rightType = leftType; - var resultType; - if (allConstituentTypesHaveKind(leftType, 132 /* NumberLike */) && allConstituentTypesHaveKind(rightType, 132 /* NumberLike */)) { - // Operands of an enum type are treated as having the primitive type Number. - // If both operands are of the Number primitive type, the result is of the Number primitive type. - resultType = numberType; - } - else { - if (allConstituentTypesHaveKind(leftType, 258 /* StringLike */) || allConstituentTypesHaveKind(rightType, 258 /* StringLike */)) { - // If one or both operands are of the String primitive type, the result is of the String primitive type. - resultType = stringType; - } - else if (isTypeAny(leftType) || isTypeAny(rightType)) { - // Otherwise, the result is of type Any. - // NOTE: unknown type here denotes error type. Old compiler treated this case as any type so do we. - resultType = leftType === unknownType || rightType === unknownType ? unknownType : anyType; - } - // Symbols are not allowed at all in arithmetic expressions - if (resultType && !checkForDisallowedESSymbolOperand(operator)) { - return resultType; - } - } - if (!resultType) { - reportOperatorError(); - return anyType; - } - if (operator === 54 /* PlusEqualsToken */) { - checkAssignmentOperator(resultType); - } - return resultType; - case 24 /* LessThanToken */: - case 25 /* GreaterThanToken */: - case 26 /* LessThanEqualsToken */: - case 27 /* GreaterThanEqualsToken */: - if (!checkForDisallowedESSymbolOperand(operator)) { - return booleanType; - } - // Fall through - case 28 /* EqualsEqualsToken */: - case 29 /* ExclamationEqualsToken */: - case 30 /* EqualsEqualsEqualsToken */: - case 31 /* ExclamationEqualsEqualsToken */: - if (!isTypeAssignableTo(leftType, rightType) && !isTypeAssignableTo(rightType, leftType)) { - reportOperatorError(); - } - return booleanType; - case 87 /* InstanceOfKeyword */: - return checkInstanceOfExpression(node, leftType, rightType); - case 86 /* InKeyword */: - return checkInExpression(node, leftType, rightType); - case 48 /* AmpersandAmpersandToken */: - return rightType; - case 49 /* BarBarToken */: - return getUnionType([leftType, rightType]); - case 53 /* EqualsToken */: - checkAssignmentOperator(rightType); - return rightType; - case 23 /* CommaToken */: - return rightType; - } - // Return true if there was no error, false if there was an error. - function checkForDisallowedESSymbolOperand(operator) { - var offendingSymbolOperand = someConstituentTypeHasKind(leftType, 2097152 /* ESSymbol */) ? node.left : - someConstituentTypeHasKind(rightType, 2097152 /* ESSymbol */) ? node.right : - undefined; - if (offendingSymbolOperand) { - error(offendingSymbolOperand, ts.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, ts.tokenToString(operator)); - return false; - } - return true; - } - function getSuggestedBooleanOperator(operator) { - switch (operator) { - case 44 /* BarToken */: - case 63 /* BarEqualsToken */: - return 49 /* BarBarToken */; - case 45 /* CaretToken */: - case 64 /* CaretEqualsToken */: - return 31 /* ExclamationEqualsEqualsToken */; - case 43 /* AmpersandToken */: - case 62 /* AmpersandEqualsToken */: - return 48 /* AmpersandAmpersandToken */; - default: - return undefined; - } - } - function checkAssignmentOperator(valueType) { - if (produceDiagnostics && operator >= 53 /* FirstAssignment */ && operator <= 64 /* LastAssignment */) { - // TypeScript 1.0 spec (April 2014): 4.17 - // An assignment of the form - // VarExpr = ValueExpr - // requires VarExpr to be classified as a reference - // A compound assignment furthermore requires VarExpr to be classified as a reference (section 4.1) - // and the type of the non - compound operation to be assignable to the type of VarExpr. - var ok = checkReferenceExpression(node.left, ts.Diagnostics.Invalid_left_hand_side_of_assignment_expression, ts.Diagnostics.Left_hand_side_of_assignment_expression_cannot_be_a_constant); - // Use default messages - if (ok) { - // to avoid cascading errors check assignability only if 'isReference' check succeeded and no errors were reported - checkTypeAssignableTo(valueType, leftType, node.left, undefined); - } - } - } - function reportOperatorError() { - error(node, ts.Diagnostics.Operator_0_cannot_be_applied_to_types_1_and_2, ts.tokenToString(node.operatorToken.kind), typeToString(leftType), typeToString(rightType)); - } - } - function isYieldExpressionInClass(node) { - var current = node; - var parent = node.parent; - while (parent) { - if (ts.isFunctionLike(parent) && current === parent.body) { - return false; - } - else if (current.kind === 204 /* ClassDeclaration */ || current.kind === 177 /* ClassExpression */) { - return true; - } - current = parent; - parent = parent.parent; - } - return false; - } - function checkYieldExpression(node) { - // Grammar checking - if (!(node.parserContextFlags & 4 /* Yield */) || isYieldExpressionInClass(node)) { - grammarErrorOnFirstToken(node, ts.Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body); - } - if (node.expression) { - var func = ts.getContainingFunction(node); - // If the user's code is syntactically correct, the func should always have a star. After all, - // we are in a yield context. - if (func && func.asteriskToken) { - var expressionType = checkExpressionCached(node.expression, undefined); - var expressionElementType; - var nodeIsYieldStar = !!node.asteriskToken; - if (nodeIsYieldStar) { - expressionElementType = checkElementTypeOfIterable(expressionType, node.expression); - } - // There is no point in doing an assignability check if the function - // has no explicit return type because the return type is directly computed - // from the yield expressions. - if (func.type) { - var signatureElementType = getElementTypeOfIterableIterator(getTypeFromTypeNode(func.type)) || anyType; - if (nodeIsYieldStar) { - checkTypeAssignableTo(expressionElementType, signatureElementType, node.expression, undefined); - } - else { - checkTypeAssignableTo(expressionType, signatureElementType, node.expression, undefined); - } - } - } - } - // Both yield and yield* expressions have type 'any' - return anyType; - } - function checkConditionalExpression(node, contextualMapper) { - checkExpression(node.condition); - var type1 = checkExpression(node.whenTrue, contextualMapper); - var type2 = checkExpression(node.whenFalse, contextualMapper); - return getUnionType([type1, type2]); - } - function checkTemplateExpression(node) { - // We just want to check each expressions, but we are unconcerned with - // the type of each expression, as any value may be coerced into a string. - // It is worth asking whether this is what we really want though. - // A place where we actually *are* concerned with the expressions' types are - // in tagged templates. - ts.forEach(node.templateSpans, function (templateSpan) { - checkExpression(templateSpan.expression); - }); - return stringType; - } - function checkExpressionWithContextualType(node, contextualType, contextualMapper) { - var saveContextualType = node.contextualType; - node.contextualType = contextualType; - var result = checkExpression(node, contextualMapper); - node.contextualType = saveContextualType; - return result; - } - function checkExpressionCached(node, contextualMapper) { - var links = getNodeLinks(node); - if (!links.resolvedType) { - links.resolvedType = checkExpression(node, contextualMapper); - } - return links.resolvedType; - } - function checkPropertyAssignment(node, contextualMapper) { - // Do not use hasDynamicName here, because that returns false for well known symbols. - // We want to perform checkComputedPropertyName for all computed properties, including - // well known symbols. - if (node.name.kind === 129 /* ComputedPropertyName */) { - checkComputedPropertyName(node.name); - } - return checkExpression(node.initializer, contextualMapper); - } - function checkObjectLiteralMethod(node, contextualMapper) { - // Grammar checking - checkGrammarMethod(node); - // Do not use hasDynamicName here, because that returns false for well known symbols. - // We want to perform checkComputedPropertyName for all computed properties, including - // well known symbols. - if (node.name.kind === 129 /* ComputedPropertyName */) { - checkComputedPropertyName(node.name); - } - var uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper); - return instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, contextualMapper); - } - function instantiateTypeWithSingleGenericCallSignature(node, type, contextualMapper) { - if (contextualMapper && contextualMapper !== identityMapper) { - var signature = getSingleCallSignature(type); - if (signature && signature.typeParameters) { - var contextualType = getContextualType(node); - if (contextualType) { - var contextualSignature = getSingleCallSignature(contextualType); - if (contextualSignature && !contextualSignature.typeParameters) { - return getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, contextualMapper)); - } - } - } - } - return type; - } - function checkExpression(node, contextualMapper) { - checkGrammarIdentifierInStrictMode(node); - return checkExpressionOrQualifiedName(node, contextualMapper); - } - // Checks an expression and returns its type. The contextualMapper parameter serves two purposes: When - // contextualMapper is not undefined and not equal to the identityMapper function object it indicates that the - // expression is being inferentially typed (section 4.12.2 in spec) and provides the type mapper to use in - // conjunction with the generic contextual type. When contextualMapper is equal to the identityMapper function - // object, it serves as an indicator that all contained function and arrow expressions should be considered to - // have the wildcard function type; this form of type check is used during overload resolution to exclude - // contextually typed function and arrow expressions in the initial phase. - function checkExpressionOrQualifiedName(node, contextualMapper) { - var type; - if (node.kind == 128 /* QualifiedName */) { - type = checkQualifiedName(node); - } - else { - var uninstantiatedType = checkExpressionWorker(node, contextualMapper); - type = instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, contextualMapper); - } - if (isConstEnumObjectType(type)) { - // enum object type for const enums are only permitted in: - // - 'left' in property access - // - 'object' in indexed access - // - target in rhs of import statement - var ok = (node.parent.kind === 158 /* PropertyAccessExpression */ && node.parent.expression === node) || - (node.parent.kind === 159 /* ElementAccessExpression */ && node.parent.expression === node) || - ((node.kind === 65 /* Identifier */ || node.kind === 128 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node)); - if (!ok) { - error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment); - } - } - return type; - } - function checkNumericLiteral(node) { - // Grammar checking - checkGrammarNumericLiteral(node); - return numberType; - } - function checkExpressionWorker(node, contextualMapper) { - switch (node.kind) { - case 65 /* Identifier */: - return checkIdentifier(node); - case 93 /* ThisKeyword */: - return checkThisExpression(node); - case 91 /* SuperKeyword */: - return checkSuperExpression(node); - case 89 /* NullKeyword */: - return nullType; - case 95 /* TrueKeyword */: - case 80 /* FalseKeyword */: - return booleanType; - case 7 /* NumericLiteral */: - return checkNumericLiteral(node); - case 174 /* TemplateExpression */: - return checkTemplateExpression(node); - case 8 /* StringLiteral */: - case 10 /* NoSubstitutionTemplateLiteral */: - return stringType; - case 9 /* RegularExpressionLiteral */: - return globalRegExpType; - case 156 /* ArrayLiteralExpression */: - return checkArrayLiteral(node, contextualMapper); - case 157 /* ObjectLiteralExpression */: - return checkObjectLiteral(node, contextualMapper); - case 158 /* PropertyAccessExpression */: - return checkPropertyAccessExpression(node); - case 159 /* ElementAccessExpression */: - return checkIndexedAccess(node); - case 160 /* CallExpression */: - case 161 /* NewExpression */: - return checkCallExpression(node); - case 162 /* TaggedTemplateExpression */: - return checkTaggedTemplateExpression(node); - case 163 /* TypeAssertionExpression */: - return checkTypeAssertion(node); - case 164 /* ParenthesizedExpression */: - return checkExpression(node.expression, contextualMapper); - case 177 /* ClassExpression */: - return checkClassExpression(node); - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - return checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper); - case 168 /* TypeOfExpression */: - return checkTypeOfExpression(node); - case 167 /* DeleteExpression */: - return checkDeleteExpression(node); - case 169 /* VoidExpression */: - return checkVoidExpression(node); - case 170 /* PrefixUnaryExpression */: - return checkPrefixUnaryExpression(node); - case 171 /* PostfixUnaryExpression */: - return checkPostfixUnaryExpression(node); - case 172 /* BinaryExpression */: - return checkBinaryExpression(node, contextualMapper); - case 173 /* ConditionalExpression */: - return checkConditionalExpression(node, contextualMapper); - case 176 /* SpreadElementExpression */: - return checkSpreadElementExpression(node, contextualMapper); - case 178 /* OmittedExpression */: - return undefinedType; - case 175 /* YieldExpression */: - return checkYieldExpression(node); - } - return unknownType; - } - // DECLARATION AND STATEMENT TYPE CHECKING - function checkTypeParameter(node) { - checkGrammarDeclarationNameInStrictMode(node); - // Grammar Checking - if (node.expression) { - grammarErrorOnFirstToken(node.expression, ts.Diagnostics.Type_expected); - } - checkSourceElement(node.constraint); - if (produceDiagnostics) { - checkTypeParameterHasIllegalReferencesInConstraint(node); - checkTypeNameIsReserved(node.name, ts.Diagnostics.Type_parameter_name_cannot_be_0); - } - // TODO: Check multiple declarations are identical - } - function checkParameter(node) { - // Grammar checking - // It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs as the - // Identifier in a PropertySetParameterList of a PropertyAssignment that is contained in strict code - // or if its FunctionBody is strict code(11.1.5). - // It is a SyntaxError if the identifier eval or arguments appears within a FormalParameterList of a - // strict mode FunctionLikeDeclaration or FunctionExpression(13.1) - // Grammar checking - checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarEvalOrArgumentsInStrictMode(node, node.name); - checkVariableLikeDeclaration(node); - var func = ts.getContainingFunction(node); - if (node.flags & 112 /* AccessibilityModifier */) { - func = ts.getContainingFunction(node); - if (!(func.kind === 137 /* Constructor */ && ts.nodeIsPresent(func.body))) { - error(node, ts.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); - } - } - if (node.questionToken && ts.isBindingPattern(node.name) && func.body) { - error(node, ts.Diagnostics.A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature); - } - // Only check rest parameter type if it's not a binding pattern. Since binding patterns are - // not allowed in a rest parameter, we already have an error from checkGrammarParameterList. - if (node.dotDotDotToken && !ts.isBindingPattern(node.name) && !isArrayType(getTypeOfSymbol(node.symbol))) { - error(node, ts.Diagnostics.A_rest_parameter_must_be_of_an_array_type); - } - } - function isSyntacticallyValidGenerator(node) { - if (!node.asteriskToken || !node.body) { - return false; - } - return node.kind === 136 /* MethodDeclaration */ || - node.kind === 203 /* FunctionDeclaration */ || - node.kind === 165 /* FunctionExpression */; - } - function getTypePredicateParameterIndex(parameterList, parameter) { - if (parameterList) { - for (var i = 0; i < parameterList.length; i++) { - var param = parameterList[i]; - if (param.name.kind === 65 /* Identifier */ && - param.name.text === parameter.text) { - return i; - } - } - } - return -1; - } - function isInLegalTypePredicatePosition(node) { - switch (node.parent.kind) { - case 166 /* ArrowFunction */: - case 140 /* CallSignature */: - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - case 145 /* FunctionType */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - return node === node.parent.type; - } - return false; - } - function checkSignatureDeclaration(node) { - // Grammar checking - if (node.kind === 142 /* IndexSignature */) { - checkGrammarIndexSignature(node); - } - else if (node.kind === 145 /* FunctionType */ || node.kind === 203 /* FunctionDeclaration */ || node.kind === 146 /* ConstructorType */ || - node.kind === 140 /* CallSignature */ || node.kind === 137 /* Constructor */ || - node.kind === 141 /* ConstructSignature */) { - checkGrammarFunctionLikeDeclaration(node); - } - checkTypeParameters(node.typeParameters); - ts.forEach(node.parameters, checkParameter); - if (node.type) { - if (node.type.kind === 143 /* TypePredicate */) { - var typePredicate = getSignatureFromDeclaration(node).typePredicate; - var typePredicateNode = node.type; - if (isInLegalTypePredicatePosition(typePredicateNode)) { - if (typePredicate.parameterIndex >= 0) { - if (node.parameters[typePredicate.parameterIndex].dotDotDotToken) { - error(typePredicateNode.parameterName, ts.Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); - } - else { - checkTypeAssignableTo(typePredicate.type, getTypeAtLocation(node.parameters[typePredicate.parameterIndex]), typePredicateNode.type); - } - } - else if (typePredicateNode.parameterName) { - var hasReportedError = false; - for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) { - var param = _a[_i]; - if (hasReportedError) { - break; - } - if (param.name.kind === 153 /* ObjectBindingPattern */ || - param.name.kind === 154 /* ArrayBindingPattern */) { - (function checkBindingPattern(pattern) { - for (var _i = 0, _a = pattern.elements; _i < _a.length; _i++) { - var element = _a[_i]; - if (element.name.kind === 65 /* Identifier */ && - element.name.text === typePredicate.parameterName) { - error(typePredicateNode.parameterName, ts.Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, typePredicate.parameterName); - hasReportedError = true; - break; - } - else if (element.name.kind === 154 /* ArrayBindingPattern */ || - element.name.kind === 153 /* ObjectBindingPattern */) { - checkBindingPattern(element.name); - } - } - })(param.name); - } - } - if (!hasReportedError) { - error(typePredicateNode.parameterName, ts.Diagnostics.Cannot_find_parameter_0, typePredicate.parameterName); - } - } - } - else { - error(typePredicateNode, ts.Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); - } - } - else { - checkSourceElement(node.type); - } - } - if (produceDiagnostics) { - checkCollisionWithArgumentsInGeneratedCode(node); - if (compilerOptions.noImplicitAny && !node.type) { - switch (node.kind) { - case 141 /* ConstructSignature */: - error(node, ts.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); - break; - case 140 /* CallSignature */: - error(node, ts.Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); - break; - } - } - if (node.type) { - if (languageVersion >= 2 /* ES6 */ && isSyntacticallyValidGenerator(node)) { - var returnType = getTypeFromTypeNode(node.type); - if (returnType === voidType) { - error(node.type, ts.Diagnostics.A_generator_cannot_have_a_void_type_annotation); - } - else { - var generatorElementType = getElementTypeOfIterableIterator(returnType) || anyType; - var iterableIteratorInstantiation = createIterableIteratorType(generatorElementType); - // Naively, one could check that IterableIterator is assignable to the return type annotation. - // However, that would not catch the error in the following case. - // - // interface BadGenerator extends Iterable, Iterator { } - // function* g(): BadGenerator { } // Iterable and Iterator have different types! - // - checkTypeAssignableTo(iterableIteratorInstantiation, returnType, node.type); - } - } - } - } - checkSpecializedSignatureDeclaration(node); - } - function checkTypeForDuplicateIndexSignatures(node) { - if (node.kind === 205 /* InterfaceDeclaration */) { - var nodeSymbol = getSymbolOfNode(node); - // in case of merging interface declaration it is possible that we'll enter this check procedure several times for every declaration - // to prevent this run check only for the first declaration of a given kind - if (nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) { - return; - } - } - // TypeScript 1.0 spec (April 2014) - // 3.7.4: An object type can contain at most one string index signature and one numeric index signature. - // 8.5: A class declaration can have at most one string index member declaration and one numeric index member declaration - var indexSymbol = getIndexSymbol(getSymbolOfNode(node)); - if (indexSymbol) { - var seenNumericIndexer = false; - var seenStringIndexer = false; - for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) { - var decl = _a[_i]; - var declaration = decl; - if (declaration.parameters.length === 1 && declaration.parameters[0].type) { - switch (declaration.parameters[0].type.kind) { - case 123 /* StringKeyword */: - if (!seenStringIndexer) { - seenStringIndexer = true; - } - else { - error(declaration, ts.Diagnostics.Duplicate_string_index_signature); - } - break; - case 121 /* NumberKeyword */: - if (!seenNumericIndexer) { - seenNumericIndexer = true; - } - else { - error(declaration, ts.Diagnostics.Duplicate_number_index_signature); - } - break; - } - } - } - } - } - function checkPropertyDeclaration(node) { - // Grammar checking - checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarProperty(node) || checkGrammarComputedPropertyName(node.name); - checkVariableLikeDeclaration(node); - } - function checkMethodDeclaration(node) { - // Grammar checking - checkGrammarMethod(node) || checkGrammarComputedPropertyName(node.name); - // Grammar checking for modifiers is done inside the function checkGrammarFunctionLikeDeclaration - checkFunctionLikeDeclaration(node); - } - function checkConstructorDeclaration(node) { - // Grammar check on signature of constructor and modifier of the constructor is done in checkSignatureDeclaration function. - checkSignatureDeclaration(node); - // Grammar check for checking only related to constructoDeclaration - checkGrammarConstructorTypeParameters(node) || checkGrammarConstructorTypeAnnotation(node); - checkSourceElement(node.body); - var symbol = getSymbolOfNode(node); - var firstDeclaration = ts.getDeclarationOfKind(symbol, node.kind); - // Only type check the symbol once - if (node === firstDeclaration) { - checkFunctionOrConstructorSymbol(symbol); - } - // exit early in the case of signature - super checks are not relevant to them - if (ts.nodeIsMissing(node.body)) { - return; - } - if (!produceDiagnostics) { - return; - } - function isSuperCallExpression(n) { - return n.kind === 160 /* CallExpression */ && n.expression.kind === 91 /* SuperKeyword */; - } - function containsSuperCall(n) { - if (isSuperCallExpression(n)) { - return true; - } - switch (n.kind) { - case 165 /* FunctionExpression */: - case 203 /* FunctionDeclaration */: - case 166 /* ArrowFunction */: - case 157 /* ObjectLiteralExpression */: return false; - default: return ts.forEachChild(n, containsSuperCall); - } - } - function markThisReferencesAsErrors(n) { - if (n.kind === 93 /* ThisKeyword */) { - error(n, ts.Diagnostics.this_cannot_be_referenced_in_current_location); - } - else if (n.kind !== 165 /* FunctionExpression */ && n.kind !== 203 /* FunctionDeclaration */) { - ts.forEachChild(n, markThisReferencesAsErrors); - } - } - function isInstancePropertyWithInitializer(n) { - return n.kind === 134 /* PropertyDeclaration */ && - !(n.flags & 128 /* Static */) && - !!n.initializer; - } - // TS 1.0 spec (April 2014): 8.3.2 - // Constructors of classes with no extends clause may not contain super calls, whereas - // constructors of derived classes must contain at least one super call somewhere in their function body. - if (ts.getClassExtendsHeritageClauseElement(node.parent)) { - if (containsSuperCall(node.body)) { - // The first statement in the body of a constructor must be a super call if both of the following are true: - // - The containing class is a derived class. - // - The constructor declares parameter properties - // or the containing class declares instance member variables with initializers. - var superCallShouldBeFirst = ts.forEach(node.parent.members, isInstancePropertyWithInitializer) || - ts.forEach(node.parameters, function (p) { return p.flags & (16 /* Public */ | 32 /* Private */ | 64 /* Protected */); }); - if (superCallShouldBeFirst) { - var statements = node.body.statements; - if (!statements.length || statements[0].kind !== 185 /* ExpressionStatement */ || !isSuperCallExpression(statements[0].expression)) { - error(node, ts.Diagnostics.A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties); - } - else { - // In such a required super call, it is a compile-time error for argument expressions to reference this. - markThisReferencesAsErrors(statements[0].expression); - } - } - } - else { - error(node, ts.Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call); - } - } - } - function checkAccessorDeclaration(node) { - if (produceDiagnostics) { - // Grammar checking accessors - checkGrammarFunctionLikeDeclaration(node) || checkGrammarAccessor(node) || checkGrammarComputedPropertyName(node.name); - if (node.kind === 138 /* GetAccessor */) { - if (!ts.isInAmbientContext(node) && ts.nodeIsPresent(node.body) && !(bodyContainsAReturnStatement(node.body) || bodyContainsSingleThrowStatement(node.body))) { - error(node.name, ts.Diagnostics.A_get_accessor_must_return_a_value_or_consist_of_a_single_throw_statement); - } - } - if (!ts.hasDynamicName(node)) { - // TypeScript 1.0 spec (April 2014): 8.4.3 - // Accessors for the same member name must specify the same accessibility. - var otherKind = node.kind === 138 /* GetAccessor */ ? 139 /* SetAccessor */ : 138 /* GetAccessor */; - var otherAccessor = ts.getDeclarationOfKind(node.symbol, otherKind); - if (otherAccessor) { - if (((node.flags & 112 /* AccessibilityModifier */) !== (otherAccessor.flags & 112 /* AccessibilityModifier */))) { - error(node.name, ts.Diagnostics.Getter_and_setter_accessors_do_not_agree_in_visibility); - } - var currentAccessorType = getAnnotatedAccessorType(node); - var otherAccessorType = getAnnotatedAccessorType(otherAccessor); - // TypeScript 1.0 spec (April 2014): 4.5 - // If both accessors include type annotations, the specified types must be identical. - if (currentAccessorType && otherAccessorType) { - if (!isTypeIdenticalTo(currentAccessorType, otherAccessorType)) { - error(node, ts.Diagnostics.get_and_set_accessor_must_have_the_same_type); - } - } - } - } - getTypeOfAccessors(getSymbolOfNode(node)); - } - checkFunctionLikeDeclaration(node); - } - function checkMissingDeclaration(node) { - checkDecorators(node); - } - function checkTypeReferenceNode(node) { - checkGrammarTypeReferenceInStrictMode(node.typeName); - return checkTypeReferenceOrExpressionWithTypeArguments(node); - } - function checkExpressionWithTypeArguments(node) { - checkGrammarExpressionWithTypeArgumentsInStrictMode(node.expression); - return checkTypeReferenceOrExpressionWithTypeArguments(node); - } - function checkTypeReferenceOrExpressionWithTypeArguments(node) { - // Grammar checking - checkGrammarTypeArguments(node, node.typeArguments); - var type = getTypeFromTypeReference(node); - if (type !== unknownType && node.typeArguments) { - // Do type argument local checks only if referenced type is successfully resolved - var symbol = getNodeLinks(node).resolvedSymbol; - var typeParameters = symbol.flags & 524288 /* TypeAlias */ ? getSymbolLinks(symbol).typeParameters : type.target.localTypeParameters; - var len = node.typeArguments.length; - for (var i = 0; i < len; i++) { - checkSourceElement(node.typeArguments[i]); - var constraint = getConstraintOfTypeParameter(typeParameters[i]); - if (produceDiagnostics && constraint) { - var typeArgument = type.typeArguments[i]; - checkTypeAssignableTo(typeArgument, constraint, node, ts.Diagnostics.Type_0_does_not_satisfy_the_constraint_1); - } - } - } - } - function checkTypeQuery(node) { - getTypeFromTypeQueryNode(node); - } - function checkTypeLiteral(node) { - ts.forEach(node.members, checkSourceElement); - if (produceDiagnostics) { - var type = getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); - checkIndexConstraints(type); - checkTypeForDuplicateIndexSignatures(node); - } - } - function checkArrayType(node) { - checkSourceElement(node.elementType); - } - function checkTupleType(node) { - // Grammar checking - var hasErrorFromDisallowedTrailingComma = checkGrammarForDisallowedTrailingComma(node.elementTypes); - if (!hasErrorFromDisallowedTrailingComma && node.elementTypes.length === 0) { - grammarErrorOnNode(node, ts.Diagnostics.A_tuple_type_element_list_cannot_be_empty); - } - ts.forEach(node.elementTypes, checkSourceElement); - } - function checkUnionType(node) { - ts.forEach(node.types, checkSourceElement); - } - function isPrivateWithinAmbient(node) { - return (node.flags & 32 /* Private */) && ts.isInAmbientContext(node); - } - function checkSpecializedSignatureDeclaration(signatureDeclarationNode) { - if (!produceDiagnostics) { - return; - } - var signature = getSignatureFromDeclaration(signatureDeclarationNode); - if (!signature.hasStringLiterals) { - return; - } - // TypeScript 1.0 spec (April 2014): 3.7.2.2 - // Specialized signatures are not permitted in conjunction with a function body - if (ts.nodeIsPresent(signatureDeclarationNode.body)) { - error(signatureDeclarationNode, ts.Diagnostics.A_signature_with_an_implementation_cannot_use_a_string_literal_type); - return; - } - // TypeScript 1.0 spec (April 2014): 3.7.2.4 - // Every specialized call or construct signature in an object type must be assignable - // to at least one non-specialized call or construct signature in the same object type - var signaturesToCheck; - // Unnamed (call\construct) signatures in interfaces are inherited and not shadowed so examining just node symbol won't give complete answer. - // Use declaring type to obtain full list of signatures. - if (!signatureDeclarationNode.name && signatureDeclarationNode.parent && signatureDeclarationNode.parent.kind === 205 /* InterfaceDeclaration */) { - ts.Debug.assert(signatureDeclarationNode.kind === 140 /* CallSignature */ || signatureDeclarationNode.kind === 141 /* ConstructSignature */); - var signatureKind = signatureDeclarationNode.kind === 140 /* CallSignature */ ? 0 /* Call */ : 1 /* Construct */; - var containingSymbol = getSymbolOfNode(signatureDeclarationNode.parent); - var containingType = getDeclaredTypeOfSymbol(containingSymbol); - signaturesToCheck = getSignaturesOfType(containingType, signatureKind); - } - else { - signaturesToCheck = getSignaturesOfSymbol(getSymbolOfNode(signatureDeclarationNode)); - } - for (var _i = 0; _i < signaturesToCheck.length; _i++) { - var otherSignature = signaturesToCheck[_i]; - if (!otherSignature.hasStringLiterals && isSignatureAssignableTo(signature, otherSignature)) { - return; - } - } - error(signatureDeclarationNode, ts.Diagnostics.Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature); - } - function getEffectiveDeclarationFlags(n, flagsToCheck) { - var flags = ts.getCombinedNodeFlags(n); - if (n.parent.kind !== 205 /* InterfaceDeclaration */ && ts.isInAmbientContext(n)) { - if (!(flags & 2 /* Ambient */)) { - // It is nested in an ambient context, which means it is automatically exported - flags |= 1 /* Export */; - } - flags |= 2 /* Ambient */; - } - return flags & flagsToCheck; - } - function checkFunctionOrConstructorSymbol(symbol) { - if (!produceDiagnostics) { - return; - } - function getCanonicalOverload(overloads, implementation) { - // Consider the canonical set of flags to be the flags of the bodyDeclaration or the first declaration - // Error on all deviations from this canonical set of flags - // The caveat is that if some overloads are defined in lib.d.ts, we don't want to - // report the errors on those. To achieve this, we will say that the implementation is - // the canonical signature only if it is in the same container as the first overload - var implementationSharesContainerWithFirstOverload = implementation !== undefined && implementation.parent === overloads[0].parent; - return implementationSharesContainerWithFirstOverload ? implementation : overloads[0]; - } - function checkFlagAgreementBetweenOverloads(overloads, implementation, flagsToCheck, someOverloadFlags, allOverloadFlags) { - // Error if some overloads have a flag that is not shared by all overloads. To find the - // deviations, we XOR someOverloadFlags with allOverloadFlags - var someButNotAllOverloadFlags = someOverloadFlags ^ allOverloadFlags; - if (someButNotAllOverloadFlags !== 0) { - var canonicalFlags = getEffectiveDeclarationFlags(getCanonicalOverload(overloads, implementation), flagsToCheck); - ts.forEach(overloads, function (o) { - var deviation = getEffectiveDeclarationFlags(o, flagsToCheck) ^ canonicalFlags; - if (deviation & 1 /* Export */) { - error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_exported_or_not_exported); - } - else if (deviation & 2 /* Ambient */) { - error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient); - } - else if (deviation & (32 /* Private */ | 64 /* Protected */)) { - error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_public_private_or_protected); - } - }); - } - } - function checkQuestionTokenAgreementBetweenOverloads(overloads, implementation, someHaveQuestionToken, allHaveQuestionToken) { - if (someHaveQuestionToken !== allHaveQuestionToken) { - var canonicalHasQuestionToken = ts.hasQuestionToken(getCanonicalOverload(overloads, implementation)); - ts.forEach(overloads, function (o) { - var deviation = ts.hasQuestionToken(o) !== canonicalHasQuestionToken; - if (deviation) { - error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_optional_or_required); - } - }); - } - } - var flagsToCheck = 1 /* Export */ | 2 /* Ambient */ | 32 /* Private */ | 64 /* Protected */; - var someNodeFlags = 0; - var allNodeFlags = flagsToCheck; - var someHaveQuestionToken = false; - var allHaveQuestionToken = true; - var hasOverloads = false; - var bodyDeclaration; - var lastSeenNonAmbientDeclaration; - var previousDeclaration; - var declarations = symbol.declarations; - var isConstructor = (symbol.flags & 16384 /* Constructor */) !== 0; - function reportImplementationExpectedError(node) { - if (node.name && ts.nodeIsMissing(node.name)) { - return; - } - var seen = false; - var subsequentNode = ts.forEachChild(node.parent, function (c) { - if (seen) { - return c; - } - else { - seen = c === node; - } - }); - if (subsequentNode) { - if (subsequentNode.kind === node.kind) { - var errorNode_1 = subsequentNode.name || subsequentNode; - // TODO(jfreeman): These are methods, so handle computed name case - if (node.name && subsequentNode.name && node.name.text === subsequentNode.name.text) { - // the only situation when this is possible (same kind\same name but different symbol) - mixed static and instance class members - ts.Debug.assert(node.kind === 136 /* MethodDeclaration */ || node.kind === 135 /* MethodSignature */); - ts.Debug.assert((node.flags & 128 /* Static */) !== (subsequentNode.flags & 128 /* Static */)); - var diagnostic = node.flags & 128 /* Static */ ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static; - error(errorNode_1, diagnostic); - return; - } - else if (ts.nodeIsPresent(subsequentNode.body)) { - error(errorNode_1, ts.Diagnostics.Function_implementation_name_must_be_0, ts.declarationNameToString(node.name)); - return; - } - } - } - var errorNode = node.name || node; - if (isConstructor) { - error(errorNode, ts.Diagnostics.Constructor_implementation_is_missing); - } - else { - error(errorNode, ts.Diagnostics.Function_implementation_is_missing_or_not_immediately_following_the_declaration); - } - } - // when checking exported function declarations across modules check only duplicate implementations - // names and consistency of modifiers are verified when we check local symbol - var isExportSymbolInsideModule = symbol.parent && symbol.parent.flags & 1536 /* Module */; - var duplicateFunctionDeclaration = false; - var multipleConstructorImplementation = false; - for (var _i = 0; _i < declarations.length; _i++) { - var current = declarations[_i]; - var node = current; - var inAmbientContext = ts.isInAmbientContext(node); - var inAmbientContextOrInterface = node.parent.kind === 205 /* InterfaceDeclaration */ || node.parent.kind === 148 /* TypeLiteral */ || inAmbientContext; - if (inAmbientContextOrInterface) { - // check if declarations are consecutive only if they are non-ambient - // 1. ambient declarations can be interleaved - // i.e. this is legal - // declare function foo(); - // declare function bar(); - // declare function foo(); - // 2. mixing ambient and non-ambient declarations is a separate error that will be reported - do not want to report an extra one - previousDeclaration = undefined; - } - if (node.kind === 203 /* FunctionDeclaration */ || node.kind === 136 /* MethodDeclaration */ || node.kind === 135 /* MethodSignature */ || node.kind === 137 /* Constructor */) { - var currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); - someNodeFlags |= currentNodeFlags; - allNodeFlags &= currentNodeFlags; - someHaveQuestionToken = someHaveQuestionToken || ts.hasQuestionToken(node); - allHaveQuestionToken = allHaveQuestionToken && ts.hasQuestionToken(node); - if (ts.nodeIsPresent(node.body) && bodyDeclaration) { - if (isConstructor) { - multipleConstructorImplementation = true; - } - else { - duplicateFunctionDeclaration = true; - } - } - else if (!isExportSymbolInsideModule && previousDeclaration && previousDeclaration.parent === node.parent && previousDeclaration.end !== node.pos) { - reportImplementationExpectedError(previousDeclaration); - } - if (ts.nodeIsPresent(node.body)) { - if (!bodyDeclaration) { - bodyDeclaration = node; - } - } - else { - hasOverloads = true; - } - previousDeclaration = node; - if (!inAmbientContextOrInterface) { - lastSeenNonAmbientDeclaration = node; - } - } - } - if (multipleConstructorImplementation) { - ts.forEach(declarations, function (declaration) { - error(declaration, ts.Diagnostics.Multiple_constructor_implementations_are_not_allowed); - }); - } - if (duplicateFunctionDeclaration) { - ts.forEach(declarations, function (declaration) { - error(declaration.name, ts.Diagnostics.Duplicate_function_implementation); - }); - } - if (!isExportSymbolInsideModule && lastSeenNonAmbientDeclaration && !lastSeenNonAmbientDeclaration.body) { - reportImplementationExpectedError(lastSeenNonAmbientDeclaration); - } - if (hasOverloads) { - checkFlagAgreementBetweenOverloads(declarations, bodyDeclaration, flagsToCheck, someNodeFlags, allNodeFlags); - checkQuestionTokenAgreementBetweenOverloads(declarations, bodyDeclaration, someHaveQuestionToken, allHaveQuestionToken); - if (bodyDeclaration) { - var signatures = getSignaturesOfSymbol(symbol); - var bodySignature = getSignatureFromDeclaration(bodyDeclaration); - // If the implementation signature has string literals, we will have reported an error in - // checkSpecializedSignatureDeclaration - if (!bodySignature.hasStringLiterals) { - // TypeScript 1.0 spec (April 2014): 6.1 - // If a function declaration includes overloads, the overloads determine the call - // signatures of the type given to the function object - // and the function implementation signature must be assignable to that type - // - // TypeScript 1.0 spec (April 2014): 3.8.4 - // Note that specialized call and construct signatures (section 3.7.2.4) are not significant when determining assignment compatibility - // Consider checking against specialized signatures too. Not doing so creates a type hole: - // - // function g(x: "hi", y: boolean); - // function g(x: string, y: {}); - // function g(x: string, y: string) { } - // - // The implementation is completely unrelated to the specialized signature, yet we do not check this. - for (var _a = 0; _a < signatures.length; _a++) { - var signature = signatures[_a]; - if (!signature.hasStringLiterals && !isSignatureAssignableTo(bodySignature, signature)) { - error(signature.declaration, ts.Diagnostics.Overload_signature_is_not_compatible_with_function_implementation); - break; - } - } - } - } - } - } - function checkExportsOnMergedDeclarations(node) { - if (!produceDiagnostics) { - return; - } - // Exports should be checked only if enclosing module contains both exported and non exported declarations. - // In case if all declarations are non-exported check is unnecessary. - // if localSymbol is defined on node then node itself is exported - check is required - var symbol = node.localSymbol; - if (!symbol) { - // local symbol is undefined => this declaration is non-exported. - // however symbol might contain other declarations that are exported - symbol = getSymbolOfNode(node); - if (!(symbol.flags & 7340032 /* Export */)) { - // this is a pure local symbol (all declarations are non-exported) - no need to check anything - return; - } - } - // run the check only for the first declaration in the list - if (ts.getDeclarationOfKind(symbol, node.kind) !== node) { - return; - } - // we use SymbolFlags.ExportValue, SymbolFlags.ExportType and SymbolFlags.ExportNamespace - // to denote disjoint declarationSpaces (without making new enum type). - var exportedDeclarationSpaces = 0; - var nonExportedDeclarationSpaces = 0; - ts.forEach(symbol.declarations, function (d) { - var declarationSpaces = getDeclarationSpaces(d); - if (getEffectiveDeclarationFlags(d, 1 /* Export */)) { - exportedDeclarationSpaces |= declarationSpaces; - } - else { - nonExportedDeclarationSpaces |= declarationSpaces; - } - }); - var commonDeclarationSpace = exportedDeclarationSpaces & nonExportedDeclarationSpaces; - if (commonDeclarationSpace) { - // declaration spaces for exported and non-exported declarations intersect - ts.forEach(symbol.declarations, function (d) { - if (getDeclarationSpaces(d) & commonDeclarationSpace) { - error(d.name, ts.Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, ts.declarationNameToString(d.name)); - } - }); - } - function getDeclarationSpaces(d) { - switch (d.kind) { - case 205 /* InterfaceDeclaration */: - return 2097152 /* ExportType */; - case 208 /* ModuleDeclaration */: - return d.name.kind === 8 /* StringLiteral */ || ts.getModuleInstanceState(d) !== 0 /* NonInstantiated */ - ? 4194304 /* ExportNamespace */ | 1048576 /* ExportValue */ - : 4194304 /* ExportNamespace */; - case 204 /* ClassDeclaration */: - case 207 /* EnumDeclaration */: - return 2097152 /* ExportType */ | 1048576 /* ExportValue */; - case 211 /* ImportEqualsDeclaration */: - var result = 0; - var target = resolveAlias(getSymbolOfNode(d)); - ts.forEach(target.declarations, function (d) { result |= getDeclarationSpaces(d); }); - return result; - default: - return 1048576 /* ExportValue */; - } - } - } - /** Check a decorator */ - function checkDecorator(node) { - var expression = node.expression; - var exprType = checkExpression(expression); - switch (node.parent.kind) { - case 204 /* ClassDeclaration */: - var classSymbol = getSymbolOfNode(node.parent); - var classConstructorType = getTypeOfSymbol(classSymbol); - var classDecoratorType = instantiateSingleCallFunctionType(getGlobalClassDecoratorType(), [classConstructorType]); - checkTypeAssignableTo(exprType, classDecoratorType, node); - break; - case 134 /* PropertyDeclaration */: - checkTypeAssignableTo(exprType, getGlobalPropertyDecoratorType(), node); - break; - case 136 /* MethodDeclaration */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - var methodType = getTypeOfNode(node.parent); - var methodDecoratorType = instantiateSingleCallFunctionType(getGlobalMethodDecoratorType(), [methodType]); - checkTypeAssignableTo(exprType, methodDecoratorType, node); - break; - case 131 /* Parameter */: - checkTypeAssignableTo(exprType, getGlobalParameterDecoratorType(), node); - break; - } - } - /** Checks a type reference node as an expression. */ - function checkTypeNodeAsExpression(node) { - // When we are emitting type metadata for decorators, we need to try to check the type - // as if it were an expression so that we can emit the type in a value position when we - // serialize the type metadata. - if (node && node.kind === 144 /* TypeReference */) { - var type = getTypeFromTypeNode(node); - var shouldCheckIfUnknownType = type === unknownType && compilerOptions.isolatedModules; - if (!type || (!shouldCheckIfUnknownType && type.flags & (2097279 /* Intrinsic */ | 132 /* NumberLike */ | 258 /* StringLike */))) { - return; - } - if (shouldCheckIfUnknownType || type.symbol.valueDeclaration) { - checkExpressionOrQualifiedName(node.typeName); - } - } - } - /** - * Checks the type annotation of an accessor declaration or property declaration as - * an expression if it is a type reference to a type with a value declaration. - */ - function checkTypeAnnotationAsExpression(node) { - switch (node.kind) { - case 134 /* PropertyDeclaration */: - checkTypeNodeAsExpression(node.type); - break; - case 131 /* Parameter */: - checkTypeNodeAsExpression(node.type); - break; - case 136 /* MethodDeclaration */: - checkTypeNodeAsExpression(node.type); - break; - case 138 /* GetAccessor */: - checkTypeNodeAsExpression(node.type); - break; - case 139 /* SetAccessor */: - checkTypeNodeAsExpression(getSetAccessorTypeAnnotationNode(node)); - break; - } - } - /** Checks the type annotation of the parameters of a function/method or the constructor of a class as expressions */ - function checkParameterTypeAnnotationsAsExpressions(node) { - // ensure all type annotations with a value declaration are checked as an expression - for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) { - var parameter = _a[_i]; - checkTypeAnnotationAsExpression(parameter); - } - } - /** Check the decorators of a node */ - function checkDecorators(node) { - if (!node.decorators) { - return; - } - // skip this check for nodes that cannot have decorators. These should have already had an error reported by - // checkGrammarDecorators. - if (!ts.nodeCanBeDecorated(node)) { - return; - } - if (!compilerOptions.experimentalDecorators) { - error(node, ts.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Specify_experimentalDecorators_to_remove_this_warning); - } - if (compilerOptions.emitDecoratorMetadata) { - // we only need to perform these checks if we are emitting serialized type metadata for the target of a decorator. - switch (node.kind) { - case 204 /* ClassDeclaration */: - var constructor = ts.getFirstConstructorWithBody(node); - if (constructor) { - checkParameterTypeAnnotationsAsExpressions(constructor); - } - break; - case 136 /* MethodDeclaration */: - checkParameterTypeAnnotationsAsExpressions(node); - // fall-through - case 139 /* SetAccessor */: - case 138 /* GetAccessor */: - case 134 /* PropertyDeclaration */: - case 131 /* Parameter */: - checkTypeAnnotationAsExpression(node); - break; - } - } - emitDecorate = true; - if (node.kind === 131 /* Parameter */) { - emitParam = true; - } - ts.forEach(node.decorators, checkDecorator); - } - function checkFunctionDeclaration(node) { - if (produceDiagnostics) { - checkFunctionLikeDeclaration(node) || - checkGrammarFunctionName(node.name) || - checkGrammarForGenerator(node); - checkCollisionWithCapturedSuperVariable(node, node.name); - checkCollisionWithCapturedThisVariable(node, node.name); - checkCollisionWithRequireExportsInGeneratedCode(node, node.name); - } - } - function checkFunctionLikeDeclaration(node) { - checkGrammarDeclarationNameInStrictMode(node); - checkDecorators(node); - checkSignatureDeclaration(node); - // Do not use hasDynamicName here, because that returns false for well known symbols. - // We want to perform checkComputedPropertyName for all computed properties, including - // well known symbols. - if (node.name && node.name.kind === 129 /* ComputedPropertyName */) { - // This check will account for methods in class/interface declarations, - // as well as accessors in classes/object literals - checkComputedPropertyName(node.name); - } - if (!ts.hasDynamicName(node)) { - // first we want to check the local symbol that contain this declaration - // - if node.localSymbol !== undefined - this is current declaration is exported and localSymbol points to the local symbol - // - if node.localSymbol === undefined - this node is non-exported so we can just pick the result of getSymbolOfNode - var symbol = getSymbolOfNode(node); - var localSymbol = node.localSymbol || symbol; - var firstDeclaration = ts.getDeclarationOfKind(localSymbol, node.kind); - // Only type check the symbol once - if (node === firstDeclaration) { - checkFunctionOrConstructorSymbol(localSymbol); - } - if (symbol.parent) { - // run check once for the first declaration - if (ts.getDeclarationOfKind(symbol, node.kind) === node) { - // run check on export symbol to check that modifiers agree across all exported declarations - checkFunctionOrConstructorSymbol(symbol); - } - } - } - checkSourceElement(node.body); - if (node.type && !isAccessor(node.kind) && !node.asteriskToken) { - checkIfNonVoidFunctionHasReturnExpressionsOrSingleThrowStatment(node, getTypeFromTypeNode(node.type)); - } - if (produceDiagnostics && !node.type) { - // Report an implicit any error if there is no body, no explicit return type, and node is not a private method - // in an ambient context - if (compilerOptions.noImplicitAny && ts.nodeIsMissing(node.body) && !isPrivateWithinAmbient(node)) { - reportImplicitAnyError(node, anyType); - } - if (node.asteriskToken && ts.nodeIsPresent(node.body)) { - // A generator with a body and no type annotation can still cause errors. It can error if the - // yielded values have no common supertype, or it can give an implicit any error if it has no - // yielded values. The only way to trigger these errors is to try checking its return type. - getReturnTypeOfSignature(getSignatureFromDeclaration(node)); - } - } - } - function checkBlock(node) { - // Grammar checking for SyntaxKind.Block - if (node.kind === 182 /* Block */) { - checkGrammarStatementInAmbientContext(node); - } - ts.forEach(node.statements, checkSourceElement); - if (ts.isFunctionBlock(node) || node.kind === 209 /* ModuleBlock */) { - checkFunctionExpressionBodies(node); - } - } - function checkCollisionWithArgumentsInGeneratedCode(node) { - // no rest parameters \ declaration context \ overload - no codegen impact - if (!ts.hasRestParameter(node) || ts.isInAmbientContext(node) || ts.nodeIsMissing(node.body)) { - return; - } - ts.forEach(node.parameters, function (p) { - if (p.name && !ts.isBindingPattern(p.name) && p.name.text === argumentsSymbol.name) { - error(p, ts.Diagnostics.Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters); - } - }); - } - function needCollisionCheckForIdentifier(node, identifier, name) { - if (!(identifier && identifier.text === name)) { - return false; - } - if (node.kind === 134 /* PropertyDeclaration */ || - node.kind === 133 /* PropertySignature */ || - node.kind === 136 /* MethodDeclaration */ || - node.kind === 135 /* MethodSignature */ || - node.kind === 138 /* GetAccessor */ || - node.kind === 139 /* SetAccessor */) { - // it is ok to have member named '_super' or '_this' - member access is always qualified - return false; - } - if (ts.isInAmbientContext(node)) { - // ambient context - no codegen impact - return false; - } - var root = ts.getRootDeclaration(node); - if (root.kind === 131 /* Parameter */ && ts.nodeIsMissing(root.parent.body)) { - // just an overload - no codegen impact - return false; - } - return true; - } - function checkCollisionWithCapturedThisVariable(node, name) { - if (needCollisionCheckForIdentifier(node, name, "_this")) { - potentialThisCollisions.push(node); - } - } - // this function will run after checking the source file so 'CaptureThis' is correct for all nodes - function checkIfThisIsCapturedInEnclosingScope(node) { - var current = node; - while (current) { - if (getNodeCheckFlags(current) & 4 /* CaptureThis */) { - var isDeclaration_1 = node.kind !== 65 /* Identifier */; - if (isDeclaration_1) { - error(node.name, ts.Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference); - } - else { - error(node, ts.Diagnostics.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference); - } - return; - } - current = current.parent; - } - } - function checkCollisionWithCapturedSuperVariable(node, name) { - if (!needCollisionCheckForIdentifier(node, name, "_super")) { - return; - } - // bubble up and find containing type - var enclosingClass = ts.getAncestor(node, 204 /* ClassDeclaration */); - // if containing type was not found or it is ambient - exit (no codegen) - if (!enclosingClass || ts.isInAmbientContext(enclosingClass)) { - return; - } - if (ts.getClassExtendsHeritageClauseElement(enclosingClass)) { - var isDeclaration_2 = node.kind !== 65 /* Identifier */; - if (isDeclaration_2) { - error(node, ts.Diagnostics.Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference); - } - else { - error(node, ts.Diagnostics.Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference); - } - } - } - function checkCollisionWithRequireExportsInGeneratedCode(node, name) { - if (!needCollisionCheckForIdentifier(node, name, "require") && !needCollisionCheckForIdentifier(node, name, "exports")) { - return; - } - // Uninstantiated modules shouldnt do this check - if (node.kind === 208 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { - return; - } - // In case of variable declaration, node.parent is variable statement so look at the variable statement's parent - var parent = getDeclarationContainer(node); - if (parent.kind === 230 /* SourceFile */ && ts.isExternalModule(parent)) { - // If the declaration happens to be in external module, report error that require and exports are reserved keywords - error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, ts.declarationNameToString(name), ts.declarationNameToString(name)); - } - } - function checkVarDeclaredNamesNotShadowed(node) { - // - ScriptBody : StatementList - // It is a Syntax Error if any element of the LexicallyDeclaredNames of StatementList - // also occurs in the VarDeclaredNames of StatementList. - // - Block : { StatementList } - // It is a Syntax Error if any element of the LexicallyDeclaredNames of StatementList - // also occurs in the VarDeclaredNames of StatementList. - // Variable declarations are hoisted to the top of their function scope. They can shadow - // block scoped declarations, which bind tighter. this will not be flagged as duplicate definition - // by the binder as the declaration scope is different. - // A non-initialized declaration is a no-op as the block declaration will resolve before the var - // declaration. the problem is if the declaration has an initializer. this will act as a write to the - // block declared value. this is fine for let, but not const. - // Only consider declarations with initializers, uninitialized let declarations will not - // step on a let/const variable. - // Do not consider let and const declarations, as duplicate block-scoped declarations - // are handled by the binder. - // We are only looking for let declarations that step on let\const declarations from a - // different scope. e.g.: - // { - // const x = 0; // localDeclarationSymbol obtained after name resolution will correspond to this declaration - // let x = 0; // symbol for this declaration will be 'symbol' - // } - // skip block-scoped variables and parameters - if ((ts.getCombinedNodeFlags(node) & 12288 /* BlockScoped */) !== 0 || ts.isParameterDeclaration(node)) { - return; - } - // skip variable declarations that don't have initializers - // NOTE: in ES6 spec initializer is required in variable declarations where name is binding pattern - // so we'll always treat binding elements as initialized - if (node.kind === 201 /* VariableDeclaration */ && !node.initializer) { - return; - } - var symbol = getSymbolOfNode(node); - if (symbol.flags & 1 /* FunctionScopedVariable */) { - var localDeclarationSymbol = resolveName(node, node.name.text, 3 /* Variable */, undefined, undefined); - if (localDeclarationSymbol && - localDeclarationSymbol !== symbol && - localDeclarationSymbol.flags & 2 /* BlockScopedVariable */) { - if (getDeclarationFlagsFromSymbol(localDeclarationSymbol) & 12288 /* BlockScoped */) { - var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 202 /* VariableDeclarationList */); - var container = varDeclList.parent.kind === 183 /* VariableStatement */ && varDeclList.parent.parent - ? varDeclList.parent.parent - : undefined; - // names of block-scoped and function scoped variables can collide only - // if block scoped variable is defined in the function\module\source file scope (because of variable hoisting) - var namesShareScope = container && - (container.kind === 182 /* Block */ && ts.isFunctionLike(container.parent) || - container.kind === 209 /* ModuleBlock */ || - container.kind === 208 /* ModuleDeclaration */ || - container.kind === 230 /* SourceFile */); - // here we know that function scoped variable is shadowed by block scoped one - // if they are defined in the same scope - binder has already reported redeclaration error - // otherwise if variable has an initializer - show error that initialization will fail - // since LHS will be block scoped name instead of function scoped - if (!namesShareScope) { - var name_13 = symbolToString(localDeclarationSymbol); - error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name_13, name_13); - } - } - } - } - } - // Check that a parameter initializer contains no references to parameters declared to the right of itself - function checkParameterInitializer(node) { - if (ts.getRootDeclaration(node).kind !== 131 /* Parameter */) { - return; - } - var func = ts.getContainingFunction(node); - visit(node.initializer); - function visit(n) { - if (n.kind === 65 /* Identifier */) { - var referencedSymbol = getNodeLinks(n).resolvedSymbol; - // check FunctionLikeDeclaration.locals (stores parameters\function local variable) - // if it contains entry with a specified name and if this entry matches the resolved symbol - if (referencedSymbol && referencedSymbol !== unknownSymbol && getSymbol(func.locals, referencedSymbol.name, 107455 /* Value */) === referencedSymbol) { - if (referencedSymbol.valueDeclaration.kind === 131 /* Parameter */) { - if (referencedSymbol.valueDeclaration === node) { - error(n, ts.Diagnostics.Parameter_0_cannot_be_referenced_in_its_initializer, ts.declarationNameToString(node.name)); - return; - } - if (referencedSymbol.valueDeclaration.pos < node.pos) { - // legal case - parameter initializer references some parameter strictly on left of current parameter declaration - return; - } - } - error(n, ts.Diagnostics.Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it, ts.declarationNameToString(node.name), ts.declarationNameToString(n)); - } - } - else { - ts.forEachChild(n, visit); - } - } - } - // Check variable, parameter, or property declaration - function checkVariableLikeDeclaration(node) { - checkGrammarDeclarationNameInStrictMode(node); - checkDecorators(node); - checkSourceElement(node.type); - // For a computed property, just check the initializer and exit - // Do not use hasDynamicName here, because that returns false for well known symbols. - // We want to perform checkComputedPropertyName for all computed properties, including - // well known symbols. - if (node.name.kind === 129 /* ComputedPropertyName */) { - checkComputedPropertyName(node.name); - if (node.initializer) { - checkExpressionCached(node.initializer); - } - } - // For a binding pattern, check contained binding elements - if (ts.isBindingPattern(node.name)) { - ts.forEach(node.name.elements, checkSourceElement); - } - // For a parameter declaration with an initializer, error and exit if the containing function doesn't have a body - if (node.initializer && ts.getRootDeclaration(node).kind === 131 /* Parameter */ && ts.nodeIsMissing(ts.getContainingFunction(node).body)) { - error(node, ts.Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation); - return; - } - // For a binding pattern, validate the initializer and exit - if (ts.isBindingPattern(node.name)) { - if (node.initializer) { - checkTypeAssignableTo(checkExpressionCached(node.initializer), getWidenedTypeForVariableLikeDeclaration(node), node, undefined); - checkParameterInitializer(node); - } - return; - } - var symbol = getSymbolOfNode(node); - var type = getTypeOfVariableOrParameterOrProperty(symbol); - if (node === symbol.valueDeclaration) { - // Node is the primary declaration of the symbol, just validate the initializer - if (node.initializer) { - checkTypeAssignableTo(checkExpressionCached(node.initializer), type, node, undefined); - checkParameterInitializer(node); - } - } - else { - // Node is a secondary declaration, check that type is identical to primary declaration and check that - // initializer is consistent with type associated with the node - var declarationType = getWidenedTypeForVariableLikeDeclaration(node); - if (type !== unknownType && declarationType !== unknownType && !isTypeIdenticalTo(type, declarationType)) { - error(node.name, ts.Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2, ts.declarationNameToString(node.name), typeToString(type), typeToString(declarationType)); - } - if (node.initializer) { - checkTypeAssignableTo(checkExpressionCached(node.initializer), declarationType, node, undefined); - } - } - if (node.kind !== 134 /* PropertyDeclaration */ && node.kind !== 133 /* PropertySignature */) { - // We know we don't have a binding pattern or computed name here - checkExportsOnMergedDeclarations(node); - if (node.kind === 201 /* VariableDeclaration */ || node.kind === 155 /* BindingElement */) { - checkVarDeclaredNamesNotShadowed(node); - } - checkCollisionWithCapturedSuperVariable(node, node.name); - checkCollisionWithCapturedThisVariable(node, node.name); - checkCollisionWithRequireExportsInGeneratedCode(node, node.name); - } - } - function checkVariableDeclaration(node) { - checkGrammarVariableDeclaration(node); - return checkVariableLikeDeclaration(node); - } - function checkBindingElement(node) { - checkGrammarBindingElement(node); - return checkVariableLikeDeclaration(node); - } - function checkVariableStatement(node) { - // Grammar checking - checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarVariableDeclarationList(node.declarationList) || checkGrammarForDisallowedLetOrConstStatement(node); - ts.forEach(node.declarationList.declarations, checkSourceElement); - } - function checkGrammarDisallowedModifiersInBlockOrObjectLiteralExpression(node) { - if (node.modifiers) { - if (inBlockOrObjectLiteralExpression(node)) { - return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); - } - } - } - function inBlockOrObjectLiteralExpression(node) { - while (node) { - if (node.kind === 182 /* Block */ || node.kind === 157 /* ObjectLiteralExpression */) { - return true; - } - node = node.parent; - } - } - function checkExpressionStatement(node) { - // Grammar checking - checkGrammarStatementInAmbientContext(node); - checkExpression(node.expression); - } - function checkIfStatement(node) { - // Grammar checking - checkGrammarStatementInAmbientContext(node); - checkExpression(node.expression); - checkSourceElement(node.thenStatement); - checkSourceElement(node.elseStatement); - } - function checkDoStatement(node) { - // Grammar checking - checkGrammarStatementInAmbientContext(node); - checkSourceElement(node.statement); - checkExpression(node.expression); - } - function checkWhileStatement(node) { - // Grammar checking - checkGrammarStatementInAmbientContext(node); - checkExpression(node.expression); - checkSourceElement(node.statement); - } - function checkForStatement(node) { - // Grammar checking - if (!checkGrammarStatementInAmbientContext(node)) { - if (node.initializer && node.initializer.kind == 202 /* VariableDeclarationList */) { - checkGrammarVariableDeclarationList(node.initializer); - } - } - if (node.initializer) { - if (node.initializer.kind === 202 /* VariableDeclarationList */) { - ts.forEach(node.initializer.declarations, checkVariableDeclaration); - } - else { - checkExpression(node.initializer); - } - } - if (node.condition) - checkExpression(node.condition); - if (node.incrementor) - checkExpression(node.incrementor); - checkSourceElement(node.statement); - } - function checkForOfStatement(node) { - checkGrammarForInOrForOfStatement(node); - // Check the LHS and RHS - // If the LHS is a declaration, just check it as a variable declaration, which will in turn check the RHS - // via checkRightHandSideOfForOf. - // If the LHS is an expression, check the LHS, as a destructuring assignment or as a reference. - // Then check that the RHS is assignable to it. - if (node.initializer.kind === 202 /* VariableDeclarationList */) { - checkForInOrForOfVariableDeclaration(node); - } - else { - var varExpr = node.initializer; - var iteratedType = checkRightHandSideOfForOf(node.expression); - // There may be a destructuring assignment on the left side - if (varExpr.kind === 156 /* ArrayLiteralExpression */ || varExpr.kind === 157 /* ObjectLiteralExpression */) { - // iteratedType may be undefined. In this case, we still want to check the structure of - // varExpr, in particular making sure it's a valid LeftHandSideExpression. But we'd like - // to short circuit the type relation checking as much as possible, so we pass the unknownType. - checkDestructuringAssignment(varExpr, iteratedType || unknownType); - } - else { - var leftType = checkExpression(varExpr); - checkReferenceExpression(varExpr, ts.Diagnostics.Invalid_left_hand_side_in_for_of_statement, - /*constantVariableMessage*/ ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_be_a_previously_defined_constant); - // iteratedType will be undefined if the rightType was missing properties/signatures - // required to get its iteratedType (like [Symbol.iterator] or next). This may be - // because we accessed properties from anyType, or it may have led to an error inside - // getElementTypeOfIterable. - if (iteratedType) { - checkTypeAssignableTo(iteratedType, leftType, varExpr, undefined); - } - } - } - checkSourceElement(node.statement); - } - function checkForInStatement(node) { - // Grammar checking - checkGrammarForInOrForOfStatement(node); - // TypeScript 1.0 spec (April 2014): 5.4 - // In a 'for-in' statement of the form - // for (let VarDecl in Expr) Statement - // VarDecl must be a variable declaration without a type annotation that declares a variable of type Any, - // and Expr must be an expression of type Any, an object type, or a type parameter type. - if (node.initializer.kind === 202 /* VariableDeclarationList */) { - var variable = node.initializer.declarations[0]; - if (variable && ts.isBindingPattern(variable.name)) { - error(variable.name, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); - } - checkForInOrForOfVariableDeclaration(node); - } - else { - // In a 'for-in' statement of the form - // for (Var in Expr) Statement - // Var must be an expression classified as a reference of type Any or the String primitive type, - // and Expr must be an expression of type Any, an object type, or a type parameter type. - var varExpr = node.initializer; - var leftType = checkExpression(varExpr); - if (varExpr.kind === 156 /* ArrayLiteralExpression */ || varExpr.kind === 157 /* ObjectLiteralExpression */) { - error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); - } - else if (!isTypeAnyOrAllConstituentTypesHaveKind(leftType, 258 /* StringLike */)) { - error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any); - } - else { - // run check only former check succeeded to avoid cascading errors - checkReferenceExpression(varExpr, ts.Diagnostics.Invalid_left_hand_side_in_for_in_statement, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_previously_defined_constant); - } - } - var rightType = checkExpression(node.expression); - // unknownType is returned i.e. if node.expression is identifier whose name cannot be resolved - // in this case error about missing name is already reported - do not report extra one - if (!isTypeAnyOrAllConstituentTypesHaveKind(rightType, 48128 /* ObjectType */ | 512 /* TypeParameter */)) { - error(node.expression, ts.Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter); - } - checkSourceElement(node.statement); - } - function checkForInOrForOfVariableDeclaration(iterationStatement) { - var variableDeclarationList = iterationStatement.initializer; - // checkGrammarForInOrForOfStatement will check that there is exactly one declaration. - if (variableDeclarationList.declarations.length >= 1) { - var decl = variableDeclarationList.declarations[0]; - checkVariableDeclaration(decl); - } - } - function checkRightHandSideOfForOf(rhsExpression) { - var expressionType = getTypeOfExpression(rhsExpression); - return checkIteratedTypeOrElementType(expressionType, rhsExpression, true); - } - function checkIteratedTypeOrElementType(inputType, errorNode, allowStringInput) { - if (isTypeAny(inputType)) { - return inputType; - } - if (languageVersion >= 2 /* ES6 */) { - return checkElementTypeOfIterable(inputType, errorNode); - } - if (allowStringInput) { - return checkElementTypeOfArrayOrString(inputType, errorNode); - } - if (isArrayLikeType(inputType)) { - var indexType = getIndexTypeOfType(inputType, 1 /* Number */); - if (indexType) { - return indexType; - } - } - error(errorNode, ts.Diagnostics.Type_0_is_not_an_array_type, typeToString(inputType)); - return unknownType; - } - /** - * When errorNode is undefined, it means we should not report any errors. - */ - function checkElementTypeOfIterable(iterable, errorNode) { - var elementType = getElementTypeOfIterable(iterable, errorNode); - // Now even though we have extracted the iteratedType, we will have to validate that the type - // passed in is actually an Iterable. - if (errorNode && elementType) { - checkTypeAssignableTo(iterable, createIterableType(elementType), errorNode); - } - return elementType || anyType; - } - /** - * We want to treat type as an iterable, and get the type it is an iterable of. The iterable - * must have the following structure (annotated with the names of the variables below): - * - * { // iterable - * [Symbol.iterator]: { // iteratorFunction - * (): Iterator - * } - * } - * - * T is the type we are after. At every level that involves analyzing return types - * of signatures, we union the return types of all the signatures. - * - * Another thing to note is that at any step of this process, we could run into a dead end, - * meaning either the property is missing, or we run into the anyType. If either of these things - * happens, we return undefined to signal that we could not find the iterated type. If a property - * is missing, and the previous step did not result in 'any', then we also give an error if the - * caller requested it. Then the caller can decide what to do in the case where there is no iterated - * type. This is different from returning anyType, because that would signify that we have matched the - * whole pattern and that T (above) is 'any'. - */ - function getElementTypeOfIterable(type, errorNode) { - if (isTypeAny(type)) { - return undefined; - } - var typeAsIterable = type; - if (!typeAsIterable.iterableElementType) { - // As an optimization, if the type is instantiated directly using the globalIterableType (Iterable), - // then just grab its type argument. - if ((type.flags & 4096 /* Reference */) && type.target === globalIterableType) { - typeAsIterable.iterableElementType = type.typeArguments[0]; - } - else { - var iteratorFunction = getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("iterator")); - if (isTypeAny(iteratorFunction)) { - return undefined; - } - var iteratorFunctionSignatures = iteratorFunction ? getSignaturesOfType(iteratorFunction, 0 /* Call */) : emptyArray; - if (iteratorFunctionSignatures.length === 0) { - if (errorNode) { - error(errorNode, ts.Diagnostics.Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator); - } - return undefined; - } - typeAsIterable.iterableElementType = getElementTypeOfIterator(getUnionType(ts.map(iteratorFunctionSignatures, getReturnTypeOfSignature)), errorNode); - } - } - return typeAsIterable.iterableElementType; - } - /** - * This function has very similar logic as getElementTypeOfIterable, except that it operates on - * Iterators instead of Iterables. Here is the structure: - * - * { // iterator - * next: { // iteratorNextFunction - * (): { // iteratorNextResult - * value: T // iteratorNextValue - * } - * } - * } - * - */ - function getElementTypeOfIterator(type, errorNode) { - if (isTypeAny(type)) { - return undefined; - } - var typeAsIterator = type; - if (!typeAsIterator.iteratorElementType) { - // As an optimization, if the type is instantiated directly using the globalIteratorType (Iterator), - // then just grab its type argument. - if ((type.flags & 4096 /* Reference */) && type.target === globalIteratorType) { - typeAsIterator.iteratorElementType = type.typeArguments[0]; - } - else { - var iteratorNextFunction = getTypeOfPropertyOfType(type, "next"); - if (isTypeAny(iteratorNextFunction)) { - return undefined; - } - var iteratorNextFunctionSignatures = iteratorNextFunction ? getSignaturesOfType(iteratorNextFunction, 0 /* Call */) : emptyArray; - if (iteratorNextFunctionSignatures.length === 0) { - if (errorNode) { - error(errorNode, ts.Diagnostics.An_iterator_must_have_a_next_method); - } - return undefined; - } - var iteratorNextResult = getUnionType(ts.map(iteratorNextFunctionSignatures, getReturnTypeOfSignature)); - if (isTypeAny(iteratorNextResult)) { - return undefined; - } - var iteratorNextValue = getTypeOfPropertyOfType(iteratorNextResult, "value"); - if (!iteratorNextValue) { - if (errorNode) { - error(errorNode, ts.Diagnostics.The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property); - } - return undefined; - } - typeAsIterator.iteratorElementType = iteratorNextValue; - } - } - return typeAsIterator.iteratorElementType; - } - function getElementTypeOfIterableIterator(type) { - if (isTypeAny(type)) { - return undefined; - } - // As an optimization, if the type is instantiated directly using the globalIterableIteratorType (IterableIterator), - // then just grab its type argument. - if ((type.flags & 4096 /* Reference */) && type.target === globalIterableIteratorType) { - return type.typeArguments[0]; - } - return getElementTypeOfIterable(type, undefined) || - getElementTypeOfIterator(type, undefined); - } - /** - * This function does the following steps: - * 1. Break up arrayOrStringType (possibly a union) into its string constituents and array constituents. - * 2. Take the element types of the array constituents. - * 3. Return the union of the element types, and string if there was a string constitutent. - * - * For example: - * string -> string - * number[] -> number - * string[] | number[] -> string | number - * string | number[] -> string | number - * string | string[] | number[] -> string | number - * - * It also errors if: - * 1. Some constituent is neither a string nor an array. - * 2. Some constituent is a string and target is less than ES5 (because in ES3 string is not indexable). - */ - function checkElementTypeOfArrayOrString(arrayOrStringType, errorNode) { - ts.Debug.assert(languageVersion < 2 /* ES6 */); - // After we remove all types that are StringLike, we will know if there was a string constituent - // based on whether the remaining type is the same as the initial type. - var arrayType = removeTypesFromUnionType(arrayOrStringType, 258 /* StringLike */, true, true); - var hasStringConstituent = arrayOrStringType !== arrayType; - var reportedError = false; - if (hasStringConstituent) { - if (languageVersion < 1 /* ES5 */) { - error(errorNode, ts.Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher); - reportedError = true; - } - // Now that we've removed all the StringLike types, if no constituents remain, then the entire - // arrayOrStringType was a string. - if (arrayType === emptyObjectType) { - return stringType; - } - } - if (!isArrayLikeType(arrayType)) { - if (!reportedError) { - // Which error we report depends on whether there was a string constituent. For example, - // if the input type is number | string, we want to say that number is not an array type. - // But if the input was just number, we want to say that number is not an array type - // or a string type. - var diagnostic = hasStringConstituent - ? ts.Diagnostics.Type_0_is_not_an_array_type - : ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type; - error(errorNode, diagnostic, typeToString(arrayType)); - } - return hasStringConstituent ? stringType : unknownType; - } - var arrayElementType = getIndexTypeOfType(arrayType, 1 /* Number */) || unknownType; - if (hasStringConstituent) { - // This is just an optimization for the case where arrayOrStringType is string | string[] - if (arrayElementType.flags & 258 /* StringLike */) { - return stringType; - } - return getUnionType([arrayElementType, stringType]); - } - return arrayElementType; - } - function checkBreakOrContinueStatement(node) { - // Grammar checking - checkGrammarStatementInAmbientContext(node) || checkGrammarBreakOrContinueStatement(node); - // TODO: Check that target label is valid - } - function isGetAccessorWithAnnotatatedSetAccessor(node) { - return !!(node.kind === 138 /* GetAccessor */ && getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 139 /* SetAccessor */))); - } - function checkReturnStatement(node) { - // Grammar checking - if (!checkGrammarStatementInAmbientContext(node)) { - var functionBlock = ts.getContainingFunction(node); - if (!functionBlock) { - grammarErrorOnFirstToken(node, ts.Diagnostics.A_return_statement_can_only_be_used_within_a_function_body); - } - } - if (node.expression) { - var func = ts.getContainingFunction(node); - if (func) { - var signature = getSignatureFromDeclaration(func); - var returnType = getReturnTypeOfSignature(signature); - var exprType = checkExpressionCached(node.expression); - if (func.asteriskToken) { - // A generator does not need its return expressions checked against its return type. - // Instead, the yield expressions are checked against the element type. - // TODO: Check return expressions of generators when return type tracking is added - // for generators. - return; - } - if (func.kind === 139 /* SetAccessor */) { - error(node.expression, ts.Diagnostics.Setters_cannot_return_a_value); - } - else if (func.kind === 137 /* Constructor */) { - if (!isTypeAssignableTo(exprType, returnType)) { - error(node.expression, ts.Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); - } - } - else if (func.type || isGetAccessorWithAnnotatatedSetAccessor(func) || signature.typePredicate) { - checkTypeAssignableTo(exprType, returnType, node.expression, undefined); - } - } - } - } - function checkWithStatement(node) { - // Grammar checking for withStatement - if (!checkGrammarStatementInAmbientContext(node)) { - if (node.parserContextFlags & 1 /* StrictMode */) { - grammarErrorOnFirstToken(node, ts.Diagnostics.with_statements_are_not_allowed_in_strict_mode); - } - } - checkExpression(node.expression); - error(node.expression, ts.Diagnostics.All_symbols_within_a_with_block_will_be_resolved_to_any); - } - function checkSwitchStatement(node) { - // Grammar checking - checkGrammarStatementInAmbientContext(node); - var firstDefaultClause; - var hasDuplicateDefaultClause = false; - var expressionType = checkExpression(node.expression); - ts.forEach(node.caseBlock.clauses, function (clause) { - // Grammar check for duplicate default clauses, skip if we already report duplicate default clause - if (clause.kind === 224 /* DefaultClause */ && !hasDuplicateDefaultClause) { - if (firstDefaultClause === undefined) { - firstDefaultClause = clause; - } - else { - var sourceFile = ts.getSourceFileOfNode(node); - var start = ts.skipTrivia(sourceFile.text, clause.pos); - var end = clause.statements.length > 0 ? clause.statements[0].pos : clause.end; - grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement); - hasDuplicateDefaultClause = true; - } - } - if (produceDiagnostics && clause.kind === 223 /* CaseClause */) { - var caseClause = clause; - // TypeScript 1.0 spec (April 2014):5.9 - // In a 'switch' statement, each 'case' expression must be of a type that is assignable to or from the type of the 'switch' expression. - var caseType = checkExpression(caseClause.expression); - if (!isTypeAssignableTo(expressionType, caseType)) { - // check 'expressionType isAssignableTo caseType' failed, try the reversed check and report errors if it fails - checkTypeAssignableTo(caseType, expressionType, caseClause.expression, undefined); - } - } - ts.forEach(clause.statements, checkSourceElement); - }); - } - function checkLabeledStatement(node) { - // Grammar checking - if (!checkGrammarStatementInAmbientContext(node)) { - var current = node.parent; - while (current) { - if (ts.isFunctionLike(current)) { - break; - } - if (current.kind === 197 /* LabeledStatement */ && current.label.text === node.label.text) { - var sourceFile = ts.getSourceFileOfNode(node); - grammarErrorOnNode(node.label, ts.Diagnostics.Duplicate_label_0, ts.getTextOfNodeFromSourceText(sourceFile.text, node.label)); - break; - } - current = current.parent; - } - } - // ensure that label is unique - checkSourceElement(node.statement); - } - function checkThrowStatement(node) { - // Grammar checking - if (!checkGrammarStatementInAmbientContext(node)) { - if (node.expression === undefined) { - grammarErrorAfterFirstToken(node, ts.Diagnostics.Line_break_not_permitted_here); - } - } - if (node.expression) { - checkExpression(node.expression); - } - } - function checkTryStatement(node) { - // Grammar checking - checkGrammarStatementInAmbientContext(node); - checkBlock(node.tryBlock); - var catchClause = node.catchClause; - if (catchClause) { - // Grammar checking - if (catchClause.variableDeclaration) { - if (catchClause.variableDeclaration.name.kind !== 65 /* Identifier */) { - grammarErrorOnFirstToken(catchClause.variableDeclaration.name, ts.Diagnostics.Catch_clause_variable_name_must_be_an_identifier); - } - else if (catchClause.variableDeclaration.type) { - grammarErrorOnFirstToken(catchClause.variableDeclaration.type, ts.Diagnostics.Catch_clause_variable_cannot_have_a_type_annotation); - } - else if (catchClause.variableDeclaration.initializer) { - grammarErrorOnFirstToken(catchClause.variableDeclaration.initializer, ts.Diagnostics.Catch_clause_variable_cannot_have_an_initializer); - } - else { - var identifierName = catchClause.variableDeclaration.name.text; - var locals = catchClause.block.locals; - if (locals && ts.hasProperty(locals, identifierName)) { - var localSymbol = locals[identifierName]; - if (localSymbol && (localSymbol.flags & 2 /* BlockScopedVariable */) !== 0) { - grammarErrorOnNode(localSymbol.valueDeclaration, ts.Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause, identifierName); - } - } - // It is a SyntaxError if a TryStatement with a Catch occurs within strict code and the Identifier of the - // Catch production is eval or arguments - checkGrammarEvalOrArgumentsInStrictMode(node, catchClause.variableDeclaration.name); - } - } - checkBlock(catchClause.block); - } - if (node.finallyBlock) { - checkBlock(node.finallyBlock); - } - } - function checkIndexConstraints(type) { - var declaredNumberIndexer = getIndexDeclarationOfSymbol(type.symbol, 1 /* Number */); - var declaredStringIndexer = getIndexDeclarationOfSymbol(type.symbol, 0 /* String */); - var stringIndexType = getIndexTypeOfType(type, 0 /* String */); - var numberIndexType = getIndexTypeOfType(type, 1 /* Number */); - if (stringIndexType || numberIndexType) { - ts.forEach(getPropertiesOfObjectType(type), function (prop) { - var propType = getTypeOfSymbol(prop); - checkIndexConstraintForProperty(prop, propType, type, declaredStringIndexer, stringIndexType, 0 /* String */); - checkIndexConstraintForProperty(prop, propType, type, declaredNumberIndexer, numberIndexType, 1 /* Number */); - }); - if (type.flags & 1024 /* Class */ && type.symbol.valueDeclaration.kind === 204 /* ClassDeclaration */) { - var classDeclaration = type.symbol.valueDeclaration; - for (var _i = 0, _a = classDeclaration.members; _i < _a.length; _i++) { - var member = _a[_i]; - // Only process instance properties with computed names here. - // Static properties cannot be in conflict with indexers, - // and properties with literal names were already checked. - if (!(member.flags & 128 /* Static */) && ts.hasDynamicName(member)) { - var propType = getTypeOfSymbol(member.symbol); - checkIndexConstraintForProperty(member.symbol, propType, type, declaredStringIndexer, stringIndexType, 0 /* String */); - checkIndexConstraintForProperty(member.symbol, propType, type, declaredNumberIndexer, numberIndexType, 1 /* Number */); - } - } - } - } - var errorNode; - if (stringIndexType && numberIndexType) { - errorNode = declaredNumberIndexer || declaredStringIndexer; - // condition 'errorNode === undefined' may appear if types does not declare nor string neither number indexer - if (!errorNode && (type.flags & 2048 /* Interface */)) { - var someBaseTypeHasBothIndexers = ts.forEach(getBaseTypes(type), function (base) { return getIndexTypeOfType(base, 0 /* String */) && getIndexTypeOfType(base, 1 /* Number */); }); - errorNode = someBaseTypeHasBothIndexers ? undefined : type.symbol.declarations[0]; - } - } - if (errorNode && !isTypeAssignableTo(numberIndexType, stringIndexType)) { - error(errorNode, ts.Diagnostics.Numeric_index_type_0_is_not_assignable_to_string_index_type_1, typeToString(numberIndexType), typeToString(stringIndexType)); - } - function checkIndexConstraintForProperty(prop, propertyType, containingType, indexDeclaration, indexType, indexKind) { - if (!indexType) { - return; - } - // index is numeric and property name is not valid numeric literal - if (indexKind === 1 /* Number */ && !isNumericName(prop.valueDeclaration.name)) { - return; - } - // perform property check if property or indexer is declared in 'type' - // this allows to rule out cases when both property and indexer are inherited from the base class - var errorNode; - if (prop.valueDeclaration.name.kind === 129 /* ComputedPropertyName */ || prop.parent === containingType.symbol) { - errorNode = prop.valueDeclaration; - } - else if (indexDeclaration) { - errorNode = indexDeclaration; - } - else if (containingType.flags & 2048 /* Interface */) { - // for interfaces property and indexer might be inherited from different bases - // check if any base class already has both property and indexer. - // check should be performed only if 'type' is the first type that brings property\indexer together - var someBaseClassHasBothPropertyAndIndexer = ts.forEach(getBaseTypes(containingType), function (base) { return getPropertyOfObjectType(base, prop.name) && getIndexTypeOfType(base, indexKind); }); - errorNode = someBaseClassHasBothPropertyAndIndexer ? undefined : containingType.symbol.declarations[0]; - } - if (errorNode && !isTypeAssignableTo(propertyType, indexType)) { - var errorMessage = indexKind === 0 /* String */ - ? ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_string_index_type_2 - : ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2; - error(errorNode, errorMessage, symbolToString(prop), typeToString(propertyType), typeToString(indexType)); - } - } - } - function checkTypeNameIsReserved(name, message) { - // TS 1.0 spec (April 2014): 3.6.1 - // The predefined type keywords are reserved and cannot be used as names of user defined types. - switch (name.text) { - case "any": - case "number": - case "boolean": - case "string": - case "symbol": - case "void": - error(name, message, name.text); - } - } - // Check each type parameter and check that list has no duplicate type parameter declarations - function checkTypeParameters(typeParameterDeclarations) { - if (typeParameterDeclarations) { - for (var i = 0, n = typeParameterDeclarations.length; i < n; i++) { - var node = typeParameterDeclarations[i]; - checkTypeParameter(node); - if (produceDiagnostics) { - for (var j = 0; j < i; j++) { - if (typeParameterDeclarations[j].symbol === node.symbol) { - error(node.name, ts.Diagnostics.Duplicate_identifier_0, ts.declarationNameToString(node.name)); - } - } - } - } - } - } - function checkClassExpression(node) { - grammarErrorOnNode(node, ts.Diagnostics.class_expressions_are_not_currently_supported); - ts.forEach(node.members, checkSourceElement); - return unknownType; - } - function checkClassDeclaration(node) { - checkGrammarDeclarationNameInStrictMode(node); - // Grammar checking - if (!node.name && !(node.flags & 256 /* Default */)) { - grammarErrorOnFirstToken(node, ts.Diagnostics.A_class_declaration_without_the_default_modifier_must_have_a_name); - } - checkGrammarClassDeclarationHeritageClauses(node); - checkDecorators(node); - if (node.name) { - checkTypeNameIsReserved(node.name, ts.Diagnostics.Class_name_cannot_be_0); - checkCollisionWithCapturedThisVariable(node, node.name); - checkCollisionWithRequireExportsInGeneratedCode(node, node.name); - } - checkTypeParameters(node.typeParameters); - checkExportsOnMergedDeclarations(node); - var symbol = getSymbolOfNode(node); - var type = getDeclaredTypeOfSymbol(symbol); - var staticType = getTypeOfSymbol(symbol); - var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node); - if (baseTypeNode) { - if (!ts.isSupportedExpressionWithTypeArguments(baseTypeNode)) { - error(baseTypeNode.expression, ts.Diagnostics.Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clauses); - } - emitExtends = emitExtends || !ts.isInAmbientContext(node); - checkExpressionWithTypeArguments(baseTypeNode); - } - var baseTypes = getBaseTypes(type); - if (baseTypes.length) { - if (produceDiagnostics) { - var baseType = baseTypes[0]; - checkTypeAssignableTo(type, baseType, node.name || node, ts.Diagnostics.Class_0_incorrectly_extends_base_class_1); - var staticBaseType = getTypeOfSymbol(baseType.symbol); - checkTypeAssignableTo(staticType, getTypeWithoutConstructors(staticBaseType), node.name || node, ts.Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1); - if (baseType.symbol !== resolveEntityName(baseTypeNode.expression, 107455 /* Value */)) { - error(baseTypeNode, ts.Diagnostics.Type_name_0_in_extends_clause_does_not_reference_constructor_function_for_0, typeToString(baseType)); - } - checkKindsOfPropertyMemberOverrides(type, baseType); - } - } - if (baseTypes.length || (baseTypeNode && compilerOptions.isolatedModules)) { - // Check that base type can be evaluated as expression - checkExpressionOrQualifiedName(baseTypeNode.expression); - } - var implementedTypeNodes = ts.getClassImplementsHeritageClauseElements(node); - if (implementedTypeNodes) { - ts.forEach(implementedTypeNodes, function (typeRefNode) { - if (!ts.isSupportedExpressionWithTypeArguments(typeRefNode)) { - error(typeRefNode.expression, ts.Diagnostics.A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments); - } - checkExpressionWithTypeArguments(typeRefNode); - if (produceDiagnostics) { - var t = getTypeFromTypeNode(typeRefNode); - if (t !== unknownType) { - var declaredType = (t.flags & 4096 /* Reference */) ? t.target : t; - if (declaredType.flags & (1024 /* Class */ | 2048 /* Interface */)) { - checkTypeAssignableTo(type, t, node.name || node, ts.Diagnostics.Class_0_incorrectly_implements_interface_1); - } - else { - error(typeRefNode, ts.Diagnostics.A_class_may_only_implement_another_class_or_interface); - } - } - } - }); - } - ts.forEach(node.members, checkSourceElement); - if (produceDiagnostics) { - checkIndexConstraints(type); - checkTypeForDuplicateIndexSignatures(node); - } - } - function getTargetSymbol(s) { - // if symbol is instantiated its flags are not copied from the 'target' - // so we'll need to get back original 'target' symbol to work with correct set of flags - return s.flags & 16777216 /* Instantiated */ ? getSymbolLinks(s).target : s; - } - function checkKindsOfPropertyMemberOverrides(type, baseType) { - // TypeScript 1.0 spec (April 2014): 8.2.3 - // A derived class inherits all members from its base class it doesn't override. - // Inheritance means that a derived class implicitly contains all non - overridden members of the base class. - // Both public and private property members are inherited, but only public property members can be overridden. - // A property member in a derived class is said to override a property member in a base class - // when the derived class property member has the same name and kind(instance or static) - // as the base class property member. - // The type of an overriding property member must be assignable(section 3.8.4) - // to the type of the overridden property member, or otherwise a compile - time error occurs. - // Base class instance member functions can be overridden by derived class instance member functions, - // but not by other kinds of members. - // Base class instance member variables and accessors can be overridden by - // derived class instance member variables and accessors, but not by other kinds of members. - // NOTE: assignability is checked in checkClassDeclaration - var baseProperties = getPropertiesOfObjectType(baseType); - for (var _i = 0; _i < baseProperties.length; _i++) { - var baseProperty = baseProperties[_i]; - var base = getTargetSymbol(baseProperty); - if (base.flags & 134217728 /* Prototype */) { - continue; - } - var derived = getTargetSymbol(getPropertyOfObjectType(type, base.name)); - if (derived) { - var baseDeclarationFlags = getDeclarationFlagsFromSymbol(base); - var derivedDeclarationFlags = getDeclarationFlagsFromSymbol(derived); - if ((baseDeclarationFlags & 32 /* Private */) || (derivedDeclarationFlags & 32 /* Private */)) { - // either base or derived property is private - not override, skip it - continue; - } - if ((baseDeclarationFlags & 128 /* Static */) !== (derivedDeclarationFlags & 128 /* Static */)) { - // value of 'static' is not the same for properties - not override, skip it - continue; - } - if ((base.flags & derived.flags & 8192 /* Method */) || ((base.flags & 98308 /* PropertyOrAccessor */) && (derived.flags & 98308 /* PropertyOrAccessor */))) { - // method is overridden with method or property/accessor is overridden with property/accessor - correct case - continue; - } - var errorMessage = void 0; - if (base.flags & 8192 /* Method */) { - if (derived.flags & 98304 /* Accessor */) { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor; - } - else { - ts.Debug.assert((derived.flags & 4 /* Property */) !== 0); - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property; - } - } - else if (base.flags & 4 /* Property */) { - ts.Debug.assert((derived.flags & 8192 /* Method */) !== 0); - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function; - } - else { - ts.Debug.assert((base.flags & 98304 /* Accessor */) !== 0); - ts.Debug.assert((derived.flags & 8192 /* Method */) !== 0); - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function; - } - error(derived.valueDeclaration.name, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type)); - } - } - } - function isAccessor(kind) { - return kind === 138 /* GetAccessor */ || kind === 139 /* SetAccessor */; - } - function areTypeParametersIdentical(list1, list2) { - if (!list1 && !list2) { - return true; - } - if (!list1 || !list2 || list1.length !== list2.length) { - return false; - } - // TypeScript 1.0 spec (April 2014): - // When a generic interface has multiple declarations, all declarations must have identical type parameter - // lists, i.e. identical type parameter names with identical constraints in identical order. - for (var i = 0, len = list1.length; i < len; i++) { - var tp1 = list1[i]; - var tp2 = list2[i]; - if (tp1.name.text !== tp2.name.text) { - return false; - } - if (!tp1.constraint && !tp2.constraint) { - continue; - } - if (!tp1.constraint || !tp2.constraint) { - return false; - } - if (!isTypeIdenticalTo(getTypeFromTypeNode(tp1.constraint), getTypeFromTypeNode(tp2.constraint))) { - return false; - } - } - return true; - } - function checkInheritedPropertiesAreIdentical(type, typeNode) { - var baseTypes = getBaseTypes(type); - if (baseTypes.length < 2) { - return true; - } - var seen = {}; - ts.forEach(resolveDeclaredMembers(type).declaredProperties, function (p) { seen[p.name] = { prop: p, containingType: type }; }); - var ok = true; - for (var _i = 0; _i < baseTypes.length; _i++) { - var base = baseTypes[_i]; - var properties = getPropertiesOfObjectType(base); - for (var _a = 0; _a < properties.length; _a++) { - var prop = properties[_a]; - if (!ts.hasProperty(seen, prop.name)) { - seen[prop.name] = { prop: prop, containingType: base }; - } - else { - var existing = seen[prop.name]; - var isInheritedProperty = existing.containingType !== type; - if (isInheritedProperty && !isPropertyIdenticalTo(existing.prop, prop)) { - ok = false; - var typeName1 = typeToString(existing.containingType); - var typeName2 = typeToString(base); - var errorInfo = ts.chainDiagnosticMessages(undefined, ts.Diagnostics.Named_property_0_of_types_1_and_2_are_not_identical, symbolToString(prop), typeName1, typeName2); - errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Interface_0_cannot_simultaneously_extend_types_1_and_2, typeToString(type), typeName1, typeName2); - diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(typeNode, errorInfo)); - } - } - } - } - return ok; - } - function checkInterfaceDeclaration(node) { - // Grammar checking - checkGrammarDeclarationNameInStrictMode(node) || checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarInterfaceDeclaration(node); - checkTypeParameters(node.typeParameters); - if (produceDiagnostics) { - checkTypeNameIsReserved(node.name, ts.Diagnostics.Interface_name_cannot_be_0); - checkExportsOnMergedDeclarations(node); - var symbol = getSymbolOfNode(node); - var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 205 /* InterfaceDeclaration */); - if (symbol.declarations.length > 1) { - if (node !== firstInterfaceDecl && !areTypeParametersIdentical(firstInterfaceDecl.typeParameters, node.typeParameters)) { - error(node.name, ts.Diagnostics.All_declarations_of_an_interface_must_have_identical_type_parameters); - } - } - // Only check this symbol once - if (node === firstInterfaceDecl) { - var type = getDeclaredTypeOfSymbol(symbol); - // run subsequent checks only if first set succeeded - if (checkInheritedPropertiesAreIdentical(type, node.name)) { - ts.forEach(getBaseTypes(type), function (baseType) { - checkTypeAssignableTo(type, baseType, node.name, ts.Diagnostics.Interface_0_incorrectly_extends_interface_1); - }); - checkIndexConstraints(type); - } - } - } - ts.forEach(ts.getInterfaceBaseTypeNodes(node), function (heritageElement) { - if (!ts.isSupportedExpressionWithTypeArguments(heritageElement)) { - error(heritageElement.expression, ts.Diagnostics.An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments); - } - checkExpressionWithTypeArguments(heritageElement); - }); - ts.forEach(node.members, checkSourceElement); - if (produceDiagnostics) { - checkTypeForDuplicateIndexSignatures(node); - } - } - function checkTypeAliasDeclaration(node) { - // Grammar checking - checkGrammarDecorators(node) || checkGrammarModifiers(node); - checkTypeNameIsReserved(node.name, ts.Diagnostics.Type_alias_name_cannot_be_0); - checkSourceElement(node.type); - } - function computeEnumMemberValues(node) { - var nodeLinks = getNodeLinks(node); - if (!(nodeLinks.flags & 128 /* EnumValuesComputed */)) { - var enumSymbol = getSymbolOfNode(node); - var enumType = getDeclaredTypeOfSymbol(enumSymbol); - var autoValue = 0; - var ambient = ts.isInAmbientContext(node); - var enumIsConst = ts.isConst(node); - ts.forEach(node.members, function (member) { - if (member.name.kind !== 129 /* ComputedPropertyName */ && isNumericLiteralName(member.name.text)) { - error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name); - } - var initializer = member.initializer; - if (initializer) { - autoValue = getConstantValueForEnumMemberInitializer(initializer); - if (autoValue === undefined) { - if (enumIsConst) { - error(initializer, ts.Diagnostics.In_const_enum_declarations_member_initializer_must_be_constant_expression); - } - else if (!ambient) { - // Only here do we need to check that the initializer is assignable to the enum type. - // If it is a constant value (not undefined), it is syntactically constrained to be a number. - // Also, we do not need to check this for ambients because there is already - // a syntax error if it is not a constant. - checkTypeAssignableTo(checkExpression(initializer), enumType, initializer, undefined); - } - } - else if (enumIsConst) { - if (isNaN(autoValue)) { - error(initializer, ts.Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN); - } - else if (!isFinite(autoValue)) { - error(initializer, ts.Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value); - } - } - } - else if (ambient && !enumIsConst) { - autoValue = undefined; - } - if (autoValue !== undefined) { - getNodeLinks(member).enumMemberValue = autoValue++; - } - }); - nodeLinks.flags |= 128 /* EnumValuesComputed */; - } - function getConstantValueForEnumMemberInitializer(initializer) { - return evalConstant(initializer); - function evalConstant(e) { - switch (e.kind) { - case 170 /* PrefixUnaryExpression */: - var value = evalConstant(e.operand); - if (value === undefined) { - return undefined; - } - switch (e.operator) { - case 33 /* PlusToken */: return value; - case 34 /* MinusToken */: return -value; - case 47 /* TildeToken */: return ~value; - } - return undefined; - case 172 /* BinaryExpression */: - var left = evalConstant(e.left); - if (left === undefined) { - return undefined; - } - var right = evalConstant(e.right); - if (right === undefined) { - return undefined; - } - switch (e.operatorToken.kind) { - case 44 /* BarToken */: return left | right; - case 43 /* AmpersandToken */: return left & right; - case 41 /* GreaterThanGreaterThanToken */: return left >> right; - case 42 /* GreaterThanGreaterThanGreaterThanToken */: return left >>> right; - case 40 /* LessThanLessThanToken */: return left << right; - case 45 /* CaretToken */: return left ^ right; - case 35 /* AsteriskToken */: return left * right; - case 36 /* SlashToken */: return left / right; - case 33 /* PlusToken */: return left + right; - case 34 /* MinusToken */: return left - right; - case 37 /* PercentToken */: return left % right; - } - return undefined; - case 7 /* NumericLiteral */: - return +e.text; - case 164 /* ParenthesizedExpression */: - return evalConstant(e.expression); - case 65 /* Identifier */: - case 159 /* ElementAccessExpression */: - case 158 /* PropertyAccessExpression */: - var member = initializer.parent; - var currentType = getTypeOfSymbol(getSymbolOfNode(member.parent)); - var enumType; - var propertyName; - if (e.kind === 65 /* Identifier */) { - // unqualified names can refer to member that reside in different declaration of the enum so just doing name resolution won't work. - // instead pick current enum type and later try to fetch member from the type - enumType = currentType; - propertyName = e.text; - } - else { - var expression; - if (e.kind === 159 /* ElementAccessExpression */) { - if (e.argumentExpression === undefined || - e.argumentExpression.kind !== 8 /* StringLiteral */) { - return undefined; - } - expression = e.expression; - propertyName = e.argumentExpression.text; - } - else { - expression = e.expression; - propertyName = e.name.text; - } - // expression part in ElementAccess\PropertyAccess should be either identifier or dottedName - var current = expression; - while (current) { - if (current.kind === 65 /* Identifier */) { - break; - } - else if (current.kind === 158 /* PropertyAccessExpression */) { - current = current.expression; - } - else { - return undefined; - } - } - enumType = checkExpression(expression); - // allow references to constant members of other enums - if (!(enumType.symbol && (enumType.symbol.flags & 384 /* Enum */))) { - return undefined; - } - } - if (propertyName === undefined) { - return undefined; - } - var property = getPropertyOfObjectType(enumType, propertyName); - if (!property || !(property.flags & 8 /* EnumMember */)) { - return undefined; - } - var propertyDecl = property.valueDeclaration; - // self references are illegal - if (member === propertyDecl) { - return undefined; - } - // illegal case: forward reference - if (!isDefinedBefore(propertyDecl, member)) { - return undefined; - } - return getNodeLinks(propertyDecl).enumMemberValue; - } - } - } - } - function checkEnumDeclaration(node) { - if (!produceDiagnostics) { - return; - } - // Grammar checking - checkGrammarDeclarationNameInStrictMode(node) || checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarEnumDeclaration(node); - checkTypeNameIsReserved(node.name, ts.Diagnostics.Enum_name_cannot_be_0); - checkCollisionWithCapturedThisVariable(node, node.name); - checkCollisionWithRequireExportsInGeneratedCode(node, node.name); - checkExportsOnMergedDeclarations(node); - computeEnumMemberValues(node); - var enumIsConst = ts.isConst(node); - if (compilerOptions.isolatedModules && enumIsConst && ts.isInAmbientContext(node)) { - error(node.name, ts.Diagnostics.Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided); - } - // Spec 2014 - Section 9.3: - // It isn't possible for one enum declaration to continue the automatic numbering sequence of another, - // and when an enum type has multiple declarations, only one declaration is permitted to omit a value - // for the first member. - // - // Only perform this check once per symbol - var enumSymbol = getSymbolOfNode(node); - var firstDeclaration = ts.getDeclarationOfKind(enumSymbol, node.kind); - if (node === firstDeclaration) { - if (enumSymbol.declarations.length > 1) { - // check that const is placed\omitted on all enum declarations - ts.forEach(enumSymbol.declarations, function (decl) { - if (ts.isConstEnumDeclaration(decl) !== enumIsConst) { - error(decl.name, ts.Diagnostics.Enum_declarations_must_all_be_const_or_non_const); - } - }); - } - var seenEnumMissingInitialInitializer = false; - ts.forEach(enumSymbol.declarations, function (declaration) { - // return true if we hit a violation of the rule, false otherwise - if (declaration.kind !== 207 /* EnumDeclaration */) { - return false; - } - var enumDeclaration = declaration; - if (!enumDeclaration.members.length) { - return false; - } - var firstEnumMember = enumDeclaration.members[0]; - if (!firstEnumMember.initializer) { - if (seenEnumMissingInitialInitializer) { - error(firstEnumMember.name, ts.Diagnostics.In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element); - } - else { - seenEnumMissingInitialInitializer = true; - } - } - }); - } - } - function getFirstNonAmbientClassOrFunctionDeclaration(symbol) { - var declarations = symbol.declarations; - for (var _i = 0; _i < declarations.length; _i++) { - var declaration = declarations[_i]; - if ((declaration.kind === 204 /* ClassDeclaration */ || - (declaration.kind === 203 /* FunctionDeclaration */ && ts.nodeIsPresent(declaration.body))) && - !ts.isInAmbientContext(declaration)) { - return declaration; - } - } - return undefined; - } - function inSameLexicalScope(node1, node2) { - var container1 = ts.getEnclosingBlockScopeContainer(node1); - var container2 = ts.getEnclosingBlockScopeContainer(node2); - if (isGlobalSourceFile(container1)) { - return isGlobalSourceFile(container2); - } - else if (isGlobalSourceFile(container2)) { - return false; - } - else { - return container1 === container2; - } - } - function checkModuleDeclaration(node) { - if (produceDiagnostics) { - // Grammar checking - var isAmbientExternalModule = node.name.kind === 8 /* StringLiteral */; - var contextErrorMessage = isAmbientExternalModule - ? ts.Diagnostics.An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file - : ts.Diagnostics.A_namespace_declaration_is_only_allowed_in_a_namespace_or_module; - if (checkGrammarModuleElementContext(node, contextErrorMessage)) { - // If we hit a module declaration in an illegal context, just bail out to avoid cascading errors. - return; - } - if (!checkGrammarDeclarationNameInStrictMode(node) && !checkGrammarDecorators(node) && !checkGrammarModifiers(node)) { - if (!ts.isInAmbientContext(node) && node.name.kind === 8 /* StringLiteral */) { - grammarErrorOnNode(node.name, ts.Diagnostics.Only_ambient_modules_can_use_quoted_names); - } - } - checkCollisionWithCapturedThisVariable(node, node.name); - checkCollisionWithRequireExportsInGeneratedCode(node, node.name); - checkExportsOnMergedDeclarations(node); - var symbol = getSymbolOfNode(node); - // The following checks only apply on a non-ambient instantiated module declaration. - if (symbol.flags & 512 /* ValueModule */ - && symbol.declarations.length > 1 - && !ts.isInAmbientContext(node) - && ts.isInstantiatedModule(node, compilerOptions.preserveConstEnums || compilerOptions.isolatedModules)) { - var firstNonAmbientClassOrFunc = getFirstNonAmbientClassOrFunctionDeclaration(symbol); - if (firstNonAmbientClassOrFunc) { - if (ts.getSourceFileOfNode(node) !== ts.getSourceFileOfNode(firstNonAmbientClassOrFunc)) { - error(node.name, ts.Diagnostics.A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged); - } - else if (node.pos < firstNonAmbientClassOrFunc.pos) { - error(node.name, ts.Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged); - } - } - // if the module merges with a class declaration in the same lexical scope, - // we need to track this to ensure the correct emit. - var mergedClass = ts.getDeclarationOfKind(symbol, 204 /* ClassDeclaration */); - if (mergedClass && - inSameLexicalScope(node, mergedClass)) { - getNodeLinks(node).flags |= 2048 /* LexicalModuleMergesWithClass */; - } - } - // Checks for ambient external modules. - if (isAmbientExternalModule) { - if (!isGlobalSourceFile(node.parent)) { - error(node.name, ts.Diagnostics.Ambient_modules_cannot_be_nested_in_other_modules); - } - if (isExternalModuleNameRelative(node.name.text)) { - error(node.name, ts.Diagnostics.Ambient_module_declaration_cannot_specify_relative_module_name); - } - } - } - checkSourceElement(node.body); - } - function getFirstIdentifier(node) { - while (true) { - if (node.kind === 128 /* QualifiedName */) { - node = node.left; - } - else if (node.kind === 158 /* PropertyAccessExpression */) { - node = node.expression; - } - else { - break; - } - } - ts.Debug.assert(node.kind === 65 /* Identifier */); - return node; - } - function checkExternalImportOrExportDeclaration(node) { - var moduleName = ts.getExternalModuleName(node); - if (!ts.nodeIsMissing(moduleName) && moduleName.kind !== 8 /* StringLiteral */) { - error(moduleName, ts.Diagnostics.String_literal_expected); - return false; - } - var inAmbientExternalModule = node.parent.kind === 209 /* ModuleBlock */ && node.parent.parent.name.kind === 8 /* StringLiteral */; - if (node.parent.kind !== 230 /* SourceFile */ && !inAmbientExternalModule) { - error(moduleName, node.kind === 218 /* ExportDeclaration */ ? - ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : - ts.Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); - return false; - } - if (inAmbientExternalModule && isExternalModuleNameRelative(moduleName.text)) { - // TypeScript 1.0 spec (April 2013): 12.1.6 - // An ExternalImportDeclaration in an AmbientExternalModuleDeclaration may reference - // other external modules only through top - level external module names. - // Relative external module names are not permitted. - error(node, ts.Diagnostics.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name); - return false; - } - return true; - } - function checkAliasSymbol(node) { - var symbol = getSymbolOfNode(node); - var target = resolveAlias(symbol); - if (target !== unknownSymbol) { - var excludedMeanings = (symbol.flags & 107455 /* Value */ ? 107455 /* Value */ : 0) | - (symbol.flags & 793056 /* Type */ ? 793056 /* Type */ : 0) | - (symbol.flags & 1536 /* Namespace */ ? 1536 /* Namespace */ : 0); - if (target.flags & excludedMeanings) { - var message = node.kind === 220 /* ExportSpecifier */ ? - ts.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : - ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; - error(node, message, symbolToString(symbol)); - } - } - } - function checkImportBinding(node) { - checkCollisionWithCapturedThisVariable(node, node.name); - checkCollisionWithRequireExportsInGeneratedCode(node, node.name); - checkAliasSymbol(node); - } - function checkImportDeclaration(node) { - if (checkGrammarModuleElementContext(node, ts.Diagnostics.An_import_declaration_can_only_be_used_in_a_namespace_or_module)) { - // If we hit an import declaration in an illegal context, just bail out to avoid cascading errors. - return; - } - if (!checkGrammarImportDeclarationNameInStrictMode(node) && !checkGrammarDecorators(node) && !checkGrammarModifiers(node) && (node.flags & 499 /* Modifier */)) { - grammarErrorOnFirstToken(node, ts.Diagnostics.An_import_declaration_cannot_have_modifiers); - } - if (checkExternalImportOrExportDeclaration(node)) { - var importClause = node.importClause; - if (importClause) { - if (importClause.name) { - checkImportBinding(importClause); - } - if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 214 /* NamespaceImport */) { - checkImportBinding(importClause.namedBindings); - } - else { - ts.forEach(importClause.namedBindings.elements, checkImportBinding); - } - } - } - } - } - function checkImportEqualsDeclaration(node) { - if (checkGrammarModuleElementContext(node, ts.Diagnostics.An_import_declaration_can_only_be_used_in_a_namespace_or_module)) { - // If we hit an import declaration in an illegal context, just bail out to avoid cascading errors. - return; - } - checkGrammarDeclarationNameInStrictMode(node) || checkGrammarDecorators(node) || checkGrammarModifiers(node); - if (ts.isInternalModuleImportEqualsDeclaration(node) || checkExternalImportOrExportDeclaration(node)) { - checkImportBinding(node); - if (node.flags & 1 /* Export */) { - markExportAsReferenced(node); - } - if (ts.isInternalModuleImportEqualsDeclaration(node)) { - var target = resolveAlias(getSymbolOfNode(node)); - if (target !== unknownSymbol) { - if (target.flags & 107455 /* Value */) { - // Target is a value symbol, check that it is not hidden by a local declaration with the same name - var moduleName = getFirstIdentifier(node.moduleReference); - if (!(resolveEntityName(moduleName, 107455 /* Value */ | 1536 /* Namespace */).flags & 1536 /* Namespace */)) { - error(moduleName, ts.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, ts.declarationNameToString(moduleName)); - } - } - if (target.flags & 793056 /* Type */) { - checkTypeNameIsReserved(node.name, ts.Diagnostics.Import_name_cannot_be_0); - } - } - } - else { - if (languageVersion >= 2 /* ES6 */) { - // Import equals declaration is deprecated in es6 or above - grammarErrorOnNode(node, ts.Diagnostics.Import_assignment_cannot_be_used_when_targeting_ECMAScript_6_or_higher_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_or_import_d_from_mod_instead); - } - } - } - } - function checkExportDeclaration(node) { - if (checkGrammarModuleElementContext(node, ts.Diagnostics.An_export_declaration_can_only_be_used_in_a_module)) { - // If we hit an export in an illegal context, just bail out to avoid cascading errors. - return; - } - if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node) && (node.flags & 499 /* Modifier */)) { - grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_declaration_cannot_have_modifiers); - } - if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { - if (node.exportClause) { - // export { x, y } - // export { x, y } from "foo" - ts.forEach(node.exportClause.elements, checkExportSpecifier); - var inAmbientExternalModule = node.parent.kind === 209 /* ModuleBlock */ && node.parent.parent.name.kind === 8 /* StringLiteral */; - if (node.parent.kind !== 230 /* SourceFile */ && !inAmbientExternalModule) { - error(node, ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); - } - } - else { - // export * from "foo" - var moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier); - if (moduleSymbol && moduleSymbol.exports["export="]) { - error(node.moduleSpecifier, ts.Diagnostics.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk, symbolToString(moduleSymbol)); - } - } - } - } - function checkGrammarModuleElementContext(node, errorMessage) { - if (node.parent.kind !== 230 /* SourceFile */ && node.parent.kind !== 209 /* ModuleBlock */ && node.parent.kind !== 208 /* ModuleDeclaration */) { - return grammarErrorOnFirstToken(node, errorMessage); - } - } - function checkExportSpecifier(node) { - checkAliasSymbol(node); - if (!node.parent.parent.moduleSpecifier) { - markExportAsReferenced(node); - } - } - function checkExportAssignment(node) { - if (checkGrammarModuleElementContext(node, ts.Diagnostics.An_export_assignment_can_only_be_used_in_a_module)) { - // If we hit an export assignment in an illegal context, just bail out to avoid cascading errors. - return; - } - var container = node.parent.kind === 230 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 208 /* ModuleDeclaration */ && container.name.kind === 65 /* Identifier */) { - error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); - return; - } - // Grammar checking - if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node) && (node.flags & 499 /* Modifier */)) { - grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_assignment_cannot_have_modifiers); - } - if (node.expression.kind === 65 /* Identifier */) { - markExportAsReferenced(node); - } - else { - checkExpressionCached(node.expression); - } - checkExternalModuleExports(container); - if (node.isExportEquals && !ts.isInAmbientContext(node)) { - if (languageVersion >= 2 /* ES6 */) { - // export assignment is deprecated in es6 or above - grammarErrorOnNode(node, ts.Diagnostics.Export_assignment_cannot_be_used_when_targeting_ECMAScript_6_or_higher_Consider_using_export_default_instead); - } - else if (compilerOptions.module === 4 /* System */) { - // system modules does not support export assignment - grammarErrorOnNode(node, ts.Diagnostics.Export_assignment_is_not_supported_when_module_flag_is_system); - } - } - } - function getModuleStatements(node) { - if (node.kind === 230 /* SourceFile */) { - return node.statements; - } - if (node.kind === 208 /* ModuleDeclaration */ && node.body.kind === 209 /* ModuleBlock */) { - return node.body.statements; - } - return emptyArray; - } - function hasExportedMembers(moduleSymbol) { - for (var id in moduleSymbol.exports) { - if (id !== "export=") { - return true; - } - } - return false; - } - function checkExternalModuleExports(node) { - var moduleSymbol = getSymbolOfNode(node); - var links = getSymbolLinks(moduleSymbol); - if (!links.exportsChecked) { - var exportEqualsSymbol = moduleSymbol.exports["export="]; - if (exportEqualsSymbol && hasExportedMembers(moduleSymbol)) { - var declaration = getDeclarationOfAliasSymbol(exportEqualsSymbol) || exportEqualsSymbol.valueDeclaration; - error(declaration, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); - } - links.exportsChecked = true; - } - } - function checkTypePredicate(node) { - if (!isInLegalTypePredicatePosition(node)) { - error(node, ts.Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); - } - } - function checkSourceElement(node) { - if (!node) - return; - switch (node.kind) { - case 130 /* TypeParameter */: - return checkTypeParameter(node); - case 131 /* Parameter */: - return checkParameter(node); - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - return checkPropertyDeclaration(node); - case 145 /* FunctionType */: - case 146 /* ConstructorType */: - case 140 /* CallSignature */: - case 141 /* ConstructSignature */: - return checkSignatureDeclaration(node); - case 142 /* IndexSignature */: - return checkSignatureDeclaration(node); - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - return checkMethodDeclaration(node); - case 137 /* Constructor */: - return checkConstructorDeclaration(node); - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - return checkAccessorDeclaration(node); - case 144 /* TypeReference */: - return checkTypeReferenceNode(node); - case 143 /* TypePredicate */: - return checkTypePredicate(node); - case 147 /* TypeQuery */: - return checkTypeQuery(node); - case 148 /* TypeLiteral */: - return checkTypeLiteral(node); - case 149 /* ArrayType */: - return checkArrayType(node); - case 150 /* TupleType */: - return checkTupleType(node); - case 151 /* UnionType */: - return checkUnionType(node); - case 152 /* ParenthesizedType */: - return checkSourceElement(node.type); - case 203 /* FunctionDeclaration */: - return checkFunctionDeclaration(node); - case 182 /* Block */: - case 209 /* ModuleBlock */: - return checkBlock(node); - case 183 /* VariableStatement */: - return checkVariableStatement(node); - case 185 /* ExpressionStatement */: - return checkExpressionStatement(node); - case 186 /* IfStatement */: - return checkIfStatement(node); - case 187 /* DoStatement */: - return checkDoStatement(node); - case 188 /* WhileStatement */: - return checkWhileStatement(node); - case 189 /* ForStatement */: - return checkForStatement(node); - case 190 /* ForInStatement */: - return checkForInStatement(node); - case 191 /* ForOfStatement */: - return checkForOfStatement(node); - case 192 /* ContinueStatement */: - case 193 /* BreakStatement */: - return checkBreakOrContinueStatement(node); - case 194 /* ReturnStatement */: - return checkReturnStatement(node); - case 195 /* WithStatement */: - return checkWithStatement(node); - case 196 /* SwitchStatement */: - return checkSwitchStatement(node); - case 197 /* LabeledStatement */: - return checkLabeledStatement(node); - case 198 /* ThrowStatement */: - return checkThrowStatement(node); - case 199 /* TryStatement */: - return checkTryStatement(node); - case 201 /* VariableDeclaration */: - return checkVariableDeclaration(node); - case 155 /* BindingElement */: - return checkBindingElement(node); - case 204 /* ClassDeclaration */: - return checkClassDeclaration(node); - case 205 /* InterfaceDeclaration */: - return checkInterfaceDeclaration(node); - case 206 /* TypeAliasDeclaration */: - return checkTypeAliasDeclaration(node); - case 207 /* EnumDeclaration */: - return checkEnumDeclaration(node); - case 208 /* ModuleDeclaration */: - return checkModuleDeclaration(node); - case 212 /* ImportDeclaration */: - return checkImportDeclaration(node); - case 211 /* ImportEqualsDeclaration */: - return checkImportEqualsDeclaration(node); - case 218 /* ExportDeclaration */: - return checkExportDeclaration(node); - case 217 /* ExportAssignment */: - return checkExportAssignment(node); - case 184 /* EmptyStatement */: - checkGrammarStatementInAmbientContext(node); - return; - case 200 /* DebuggerStatement */: - checkGrammarStatementInAmbientContext(node); - return; - case 221 /* MissingDeclaration */: - return checkMissingDeclaration(node); - } - } - // Function expression bodies are checked after all statements in the enclosing body. This is to ensure - // constructs like the following are permitted: - // let foo = function () { - // let s = foo(); - // return "hello"; - // } - // Here, performing a full type check of the body of the function expression whilst in the process of - // determining the type of foo would cause foo to be given type any because of the recursive reference. - // Delaying the type check of the body ensures foo has been assigned a type. - function checkFunctionExpressionBodies(node) { - switch (node.kind) { - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - ts.forEach(node.parameters, checkFunctionExpressionBodies); - checkFunctionExpressionOrObjectLiteralMethodBody(node); - break; - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - ts.forEach(node.decorators, checkFunctionExpressionBodies); - ts.forEach(node.parameters, checkFunctionExpressionBodies); - if (ts.isObjectLiteralMethod(node)) { - checkFunctionExpressionOrObjectLiteralMethodBody(node); - } - break; - case 137 /* Constructor */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 203 /* FunctionDeclaration */: - ts.forEach(node.parameters, checkFunctionExpressionBodies); - break; - case 195 /* WithStatement */: - checkFunctionExpressionBodies(node.expression); - break; - case 132 /* Decorator */: - case 131 /* Parameter */: - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 153 /* ObjectBindingPattern */: - case 154 /* ArrayBindingPattern */: - case 155 /* BindingElement */: - case 156 /* ArrayLiteralExpression */: - case 157 /* ObjectLiteralExpression */: - case 227 /* PropertyAssignment */: - case 158 /* PropertyAccessExpression */: - case 159 /* ElementAccessExpression */: - case 160 /* CallExpression */: - case 161 /* NewExpression */: - case 162 /* TaggedTemplateExpression */: - case 174 /* TemplateExpression */: - case 180 /* TemplateSpan */: - case 163 /* TypeAssertionExpression */: - case 164 /* ParenthesizedExpression */: - case 168 /* TypeOfExpression */: - case 169 /* VoidExpression */: - case 167 /* DeleteExpression */: - case 170 /* PrefixUnaryExpression */: - case 171 /* PostfixUnaryExpression */: - case 172 /* BinaryExpression */: - case 173 /* ConditionalExpression */: - case 176 /* SpreadElementExpression */: - case 182 /* Block */: - case 209 /* ModuleBlock */: - case 183 /* VariableStatement */: - case 185 /* ExpressionStatement */: - case 186 /* IfStatement */: - case 187 /* DoStatement */: - case 188 /* WhileStatement */: - case 189 /* ForStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - case 192 /* ContinueStatement */: - case 193 /* BreakStatement */: - case 194 /* ReturnStatement */: - case 196 /* SwitchStatement */: - case 210 /* CaseBlock */: - case 223 /* CaseClause */: - case 224 /* DefaultClause */: - case 197 /* LabeledStatement */: - case 198 /* ThrowStatement */: - case 199 /* TryStatement */: - case 226 /* CatchClause */: - case 201 /* VariableDeclaration */: - case 202 /* VariableDeclarationList */: - case 204 /* ClassDeclaration */: - case 207 /* EnumDeclaration */: - case 229 /* EnumMember */: - case 217 /* ExportAssignment */: - case 230 /* SourceFile */: - ts.forEachChild(node, checkFunctionExpressionBodies); - break; - } - } - function checkSourceFile(node) { - var start = new Date().getTime(); - checkSourceFileWorker(node); - ts.checkTime += new Date().getTime() - start; - } - // Fully type check a source file and collect the relevant diagnostics. - function checkSourceFileWorker(node) { - var links = getNodeLinks(node); - if (!(links.flags & 1 /* TypeChecked */)) { - // Check whether the file has declared it is the default lib, - // and whether the user has specifically chosen to avoid checking it. - if (node.isDefaultLib && compilerOptions.skipDefaultLibCheck) { - return; - } - // Grammar checking - checkGrammarSourceFile(node); - emitExtends = false; - emitDecorate = false; - emitParam = false; - potentialThisCollisions.length = 0; - ts.forEach(node.statements, checkSourceElement); - checkFunctionExpressionBodies(node); - if (ts.isExternalModule(node)) { - checkExternalModuleExports(node); - } - if (potentialThisCollisions.length) { - ts.forEach(potentialThisCollisions, checkIfThisIsCapturedInEnclosingScope); - potentialThisCollisions.length = 0; - } - if (emitExtends) { - links.flags |= 8 /* EmitExtends */; - } - if (emitDecorate) { - links.flags |= 512 /* EmitDecorate */; - } - if (emitParam) { - links.flags |= 1024 /* EmitParam */; - } - links.flags |= 1 /* TypeChecked */; - } - } - function getDiagnostics(sourceFile) { - throwIfNonDiagnosticsProducing(); - if (sourceFile) { - checkSourceFile(sourceFile); - return diagnostics.getDiagnostics(sourceFile.fileName); - } - ts.forEach(host.getSourceFiles(), checkSourceFile); - return diagnostics.getDiagnostics(); - } - function getGlobalDiagnostics() { - throwIfNonDiagnosticsProducing(); - return diagnostics.getGlobalDiagnostics(); - } - function throwIfNonDiagnosticsProducing() { - if (!produceDiagnostics) { - throw new Error("Trying to get diagnostics from a type checker that does not produce them."); - } - } - // Language service support - function isInsideWithStatementBody(node) { - if (node) { - while (node.parent) { - if (node.parent.kind === 195 /* WithStatement */ && node.parent.statement === node) { - return true; - } - node = node.parent; - } - } - return false; - } - function getSymbolsInScope(location, meaning) { - var symbols = {}; - var memberFlags = 0; - if (isInsideWithStatementBody(location)) { - // We cannot answer semantic questions within a with block, do not proceed any further - return []; - } - populateSymbols(); - return symbolsToArray(symbols); - function populateSymbols() { - while (location) { - if (location.locals && !isGlobalSourceFile(location)) { - copySymbols(location.locals, meaning); - } - switch (location.kind) { - case 230 /* SourceFile */: - if (!ts.isExternalModule(location)) { - break; - } - case 208 /* ModuleDeclaration */: - copySymbols(getSymbolOfNode(location).exports, meaning & 8914931 /* ModuleMember */); - break; - case 207 /* EnumDeclaration */: - copySymbols(getSymbolOfNode(location).exports, meaning & 8 /* EnumMember */); - break; - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - if (!(memberFlags & 128 /* Static */)) { - copySymbols(getSymbolOfNode(location).members, meaning & 793056 /* Type */); - } - break; - case 165 /* FunctionExpression */: - if (location.name) { - copySymbol(location.symbol, meaning); - } - break; - } - memberFlags = location.flags; - location = location.parent; - } - copySymbols(globals, meaning); - } - // Returns 'true' if we should stop processing symbols. - function copySymbol(symbol, meaning) { - if (symbol.flags & meaning) { - var id = symbol.name; - if (!isReservedMemberName(id) && !ts.hasProperty(symbols, id)) { - symbols[id] = symbol; - } - } - } - function copySymbols(source, meaning) { - if (meaning) { - for (var id in source) { - if (ts.hasProperty(source, id)) { - copySymbol(source[id], meaning); - } - } - } - } - if (isInsideWithStatementBody(location)) { - // We cannot answer semantic questions within a with block, do not proceed any further - return []; - } - while (location) { - if (location.locals && !isGlobalSourceFile(location)) { - copySymbols(location.locals, meaning); - } - switch (location.kind) { - case 230 /* SourceFile */: - if (!ts.isExternalModule(location)) - break; - case 208 /* ModuleDeclaration */: - copySymbols(getSymbolOfNode(location).exports, meaning & 8914931 /* ModuleMember */); - break; - case 207 /* EnumDeclaration */: - copySymbols(getSymbolOfNode(location).exports, meaning & 8 /* EnumMember */); - break; - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - if (!(memberFlags & 128 /* Static */)) { - copySymbols(getSymbolOfNode(location).members, meaning & 793056 /* Type */); - } - break; - case 165 /* FunctionExpression */: - if (location.name) { - copySymbol(location.symbol, meaning); - } - break; - } - memberFlags = location.flags; - location = location.parent; - } - copySymbols(globals, meaning); - return symbolsToArray(symbols); - } - function isTypeDeclarationName(name) { - return name.kind == 65 /* Identifier */ && - isTypeDeclaration(name.parent) && - name.parent.name === name; - } - function isTypeDeclaration(node) { - switch (node.kind) { - case 130 /* TypeParameter */: - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - case 206 /* TypeAliasDeclaration */: - case 207 /* EnumDeclaration */: - return true; - } - } - // True if the given identifier is part of a type reference - function isTypeReferenceIdentifier(entityName) { - var node = entityName; - while (node.parent && node.parent.kind === 128 /* QualifiedName */) { - node = node.parent; - } - return node.parent && node.parent.kind === 144 /* TypeReference */; - } - function isHeritageClauseElementIdentifier(entityName) { - var node = entityName; - while (node.parent && node.parent.kind === 158 /* PropertyAccessExpression */) { - node = node.parent; - } - return node.parent && node.parent.kind === 179 /* ExpressionWithTypeArguments */; - } - function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) { - while (nodeOnRightSide.parent.kind === 128 /* QualifiedName */) { - nodeOnRightSide = nodeOnRightSide.parent; - } - if (nodeOnRightSide.parent.kind === 211 /* ImportEqualsDeclaration */) { - return nodeOnRightSide.parent.moduleReference === nodeOnRightSide && nodeOnRightSide.parent; - } - if (nodeOnRightSide.parent.kind === 217 /* ExportAssignment */) { - return nodeOnRightSide.parent.expression === nodeOnRightSide && nodeOnRightSide.parent; - } - return undefined; - } - function isInRightSideOfImportOrExportAssignment(node) { - return getLeftSideOfImportEqualsOrExportAssignment(node) !== undefined; - } - function getSymbolOfEntityNameOrPropertyAccessExpression(entityName) { - if (ts.isDeclarationName(entityName)) { - return getSymbolOfNode(entityName.parent); - } - if (entityName.parent.kind === 217 /* ExportAssignment */) { - return resolveEntityName(entityName, - /*all meanings*/ 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */ | 8388608 /* Alias */); - } - if (entityName.kind !== 158 /* PropertyAccessExpression */) { - if (isInRightSideOfImportOrExportAssignment(entityName)) { - // Since we already checked for ExportAssignment, this really could only be an Import - return getSymbolOfPartOfRightHandSideOfImportEquals(entityName); - } - } - if (ts.isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { - entityName = entityName.parent; - } - if (isHeritageClauseElementIdentifier(entityName)) { - var meaning = entityName.parent.kind === 179 /* ExpressionWithTypeArguments */ ? 793056 /* Type */ : 1536 /* Namespace */; - meaning |= 8388608 /* Alias */; - return resolveEntityName(entityName, meaning); - } - else if (ts.isExpression(entityName)) { - if (ts.nodeIsMissing(entityName)) { - // Missing entity name. - return undefined; - } - if (entityName.kind === 65 /* Identifier */) { - // Include aliases in the meaning, this ensures that we do not follow aliases to where they point and instead - // return the alias symbol. - var meaning = 107455 /* Value */ | 8388608 /* Alias */; - return resolveEntityName(entityName, meaning); - } - else if (entityName.kind === 158 /* PropertyAccessExpression */) { - var symbol = getNodeLinks(entityName).resolvedSymbol; - if (!symbol) { - checkPropertyAccessExpression(entityName); - } - return getNodeLinks(entityName).resolvedSymbol; - } - else if (entityName.kind === 128 /* QualifiedName */) { - var symbol = getNodeLinks(entityName).resolvedSymbol; - if (!symbol) { - checkQualifiedName(entityName); - } - return getNodeLinks(entityName).resolvedSymbol; - } - } - else if (isTypeReferenceIdentifier(entityName)) { - var meaning = entityName.parent.kind === 144 /* TypeReference */ ? 793056 /* Type */ : 1536 /* Namespace */; - // Include aliases in the meaning, this ensures that we do not follow aliases to where they point and instead - // return the alias symbol. - meaning |= 8388608 /* Alias */; - return resolveEntityName(entityName, meaning); - } - // Do we want to return undefined here? - return undefined; - } - function getSymbolInfo(node) { - if (isInsideWithStatementBody(node)) { - // We cannot answer semantic questions within a with block, do not proceed any further - return undefined; - } - if (ts.isDeclarationName(node)) { - // This is a declaration, call getSymbolOfNode - return getSymbolOfNode(node.parent); - } - if (node.kind === 65 /* Identifier */ && isInRightSideOfImportOrExportAssignment(node)) { - return node.parent.kind === 217 /* ExportAssignment */ - ? getSymbolOfEntityNameOrPropertyAccessExpression(node) - : getSymbolOfPartOfRightHandSideOfImportEquals(node); - } - switch (node.kind) { - case 65 /* Identifier */: - case 158 /* PropertyAccessExpression */: - case 128 /* QualifiedName */: - return getSymbolOfEntityNameOrPropertyAccessExpression(node); - case 93 /* ThisKeyword */: - case 91 /* SuperKeyword */: - var type = checkExpression(node); - return type.symbol; - case 114 /* ConstructorKeyword */: - // constructor keyword for an overload, should take us to the definition if it exist - var constructorDeclaration = node.parent; - if (constructorDeclaration && constructorDeclaration.kind === 137 /* Constructor */) { - return constructorDeclaration.parent.symbol; - } - return undefined; - case 8 /* StringLiteral */: - // External module name in an import declaration - var moduleName; - if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) && - ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) || - ((node.parent.kind === 212 /* ImportDeclaration */ || node.parent.kind === 218 /* ExportDeclaration */) && - node.parent.moduleSpecifier === node)) { - return resolveExternalModuleName(node, node); - } - // Intentional fall-through - case 7 /* NumericLiteral */: - // index access - if (node.parent.kind == 159 /* ElementAccessExpression */ && node.parent.argumentExpression === node) { - var objectType = checkExpression(node.parent.expression); - if (objectType === unknownType) - return undefined; - var apparentType = getApparentType(objectType); - if (apparentType === unknownType) - return undefined; - return getPropertyOfType(apparentType, node.text); - } - break; - } - return undefined; - } - function getShorthandAssignmentValueSymbol(location) { - // The function returns a value symbol of an identifier in the short-hand property assignment. - // This is necessary as an identifier in short-hand property assignment can contains two meaning: - // property name and property value. - if (location && location.kind === 228 /* ShorthandPropertyAssignment */) { - return resolveEntityName(location.name, 107455 /* Value */); - } - return undefined; - } - function getTypeOfNode(node) { - if (isInsideWithStatementBody(node)) { - // We cannot answer semantic questions within a with block, do not proceed any further - return unknownType; - } - if (ts.isTypeNode(node)) { - return getTypeFromTypeNode(node); - } - if (ts.isExpression(node)) { - return getTypeOfExpression(node); - } - if (isTypeDeclaration(node)) { - // In this case, we call getSymbolOfNode instead of getSymbolInfo because it is a declaration - var symbol = getSymbolOfNode(node); - return getDeclaredTypeOfSymbol(symbol); - } - if (isTypeDeclarationName(node)) { - var symbol = getSymbolInfo(node); - return symbol && getDeclaredTypeOfSymbol(symbol); - } - if (ts.isDeclaration(node)) { - // In this case, we call getSymbolOfNode instead of getSymbolInfo because it is a declaration - var symbol = getSymbolOfNode(node); - return getTypeOfSymbol(symbol); - } - if (ts.isDeclarationName(node)) { - var symbol = getSymbolInfo(node); - return symbol && getTypeOfSymbol(symbol); - } - if (isInRightSideOfImportOrExportAssignment(node)) { - var symbol = getSymbolInfo(node); - var declaredType = symbol && getDeclaredTypeOfSymbol(symbol); - return declaredType !== unknownType ? declaredType : getTypeOfSymbol(symbol); - } - return unknownType; - } - function getTypeOfExpression(expr) { - if (ts.isRightSideOfQualifiedNameOrPropertyAccess(expr)) { - expr = expr.parent; - } - return checkExpression(expr); - } - // Return the list of properties of the given type, augmented with properties from Function - // if the type has call or construct signatures - function getAugmentedPropertiesOfType(type) { - type = getApparentType(type); - var propsByName = createSymbolTable(getPropertiesOfType(type)); - if (getSignaturesOfType(type, 0 /* Call */).length || getSignaturesOfType(type, 1 /* Construct */).length) { - ts.forEach(getPropertiesOfType(globalFunctionType), function (p) { - if (!ts.hasProperty(propsByName, p.name)) { - propsByName[p.name] = p; - } - }); - } - return getNamedMembers(propsByName); - } - function getRootSymbols(symbol) { - if (symbol.flags & 268435456 /* UnionProperty */) { - var symbols = []; - var name_14 = symbol.name; - ts.forEach(getSymbolLinks(symbol).unionType.types, function (t) { - symbols.push(getPropertyOfType(t, name_14)); - }); - return symbols; - } - else if (symbol.flags & 67108864 /* Transient */) { - var target = getSymbolLinks(symbol).target; - if (target) { - return [target]; - } - } - return [symbol]; - } - // Emitter support - // When resolved as an expression identifier, if the given node references an exported entity, return the declaration - // node of the exported entity's container. Otherwise, return undefined. - function getReferencedExportContainer(node) { - var symbol = getReferencedValueSymbol(node); - if (symbol) { - if (symbol.flags & 1048576 /* ExportValue */) { - // If we reference an exported entity within the same module declaration, then whether - // we prefix depends on the kind of entity. SymbolFlags.ExportHasLocal encompasses all the - // kinds that we do NOT prefix. - var exportSymbol = getMergedSymbol(symbol.exportSymbol); - if (exportSymbol.flags & 944 /* ExportHasLocal */) { - return undefined; - } - symbol = exportSymbol; - } - var parentSymbol = getParentOfSymbol(symbol); - if (parentSymbol) { - if (parentSymbol.flags & 512 /* ValueModule */ && parentSymbol.valueDeclaration.kind === 230 /* SourceFile */) { - return parentSymbol.valueDeclaration; - } - for (var n = node.parent; n; n = n.parent) { - if ((n.kind === 208 /* ModuleDeclaration */ || n.kind === 207 /* EnumDeclaration */) && getSymbolOfNode(n) === parentSymbol) { - return n; - } - } - } - } - } - // When resolved as an expression identifier, if the given node references an import, return the declaration of - // that import. Otherwise, return undefined. - function getReferencedImportDeclaration(node) { - var symbol = getReferencedValueSymbol(node); - return symbol && symbol.flags & 8388608 /* Alias */ ? getDeclarationOfAliasSymbol(symbol) : undefined; - } - function isStatementWithLocals(node) { - switch (node.kind) { - case 182 /* Block */: - case 210 /* CaseBlock */: - case 189 /* ForStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - return true; - } - return false; - } - function isNestedRedeclarationSymbol(symbol) { - if (symbol.flags & 418 /* BlockScoped */) { - var links = getSymbolLinks(symbol); - if (links.isNestedRedeclaration === undefined) { - var container = ts.getEnclosingBlockScopeContainer(symbol.valueDeclaration); - links.isNestedRedeclaration = isStatementWithLocals(container) && - !!resolveName(container.parent, symbol.name, 107455 /* Value */, undefined, undefined); - } - return links.isNestedRedeclaration; - } - return false; - } - // When resolved as an expression identifier, if the given node references a nested block scoped entity with - // a name that hides an existing name, return the declaration of that entity. Otherwise, return undefined. - function getReferencedNestedRedeclaration(node) { - var symbol = getReferencedValueSymbol(node); - return symbol && isNestedRedeclarationSymbol(symbol) ? symbol.valueDeclaration : undefined; - } - // Return true if the given node is a declaration of a nested block scoped entity with a name that hides an - // existing name. - function isNestedRedeclaration(node) { - return isNestedRedeclarationSymbol(getSymbolOfNode(node)); - } - function isValueAliasDeclaration(node) { - switch (node.kind) { - case 211 /* ImportEqualsDeclaration */: - case 213 /* ImportClause */: - case 214 /* NamespaceImport */: - case 216 /* ImportSpecifier */: - case 220 /* ExportSpecifier */: - return isAliasResolvedToValue(getSymbolOfNode(node)); - case 218 /* ExportDeclaration */: - var exportClause = node.exportClause; - return exportClause && ts.forEach(exportClause.elements, isValueAliasDeclaration); - case 217 /* ExportAssignment */: - return node.expression && node.expression.kind === 65 /* Identifier */ ? isAliasResolvedToValue(getSymbolOfNode(node)) : true; - } - return false; - } - function isTopLevelValueImportEqualsWithEntityName(node) { - if (node.parent.kind !== 230 /* SourceFile */ || !ts.isInternalModuleImportEqualsDeclaration(node)) { - // parent is not source file or it is not reference to internal module - return false; - } - var isValue = isAliasResolvedToValue(getSymbolOfNode(node)); - return isValue && node.moduleReference && !ts.nodeIsMissing(node.moduleReference); - } - function isAliasResolvedToValue(symbol) { - var target = resolveAlias(symbol); - if (target === unknownSymbol && compilerOptions.isolatedModules) { - return true; - } - // const enums and modules that contain only const enums are not considered values from the emit perespective - return target !== unknownSymbol && target && target.flags & 107455 /* Value */ && !isConstEnumOrConstEnumOnlyModule(target); - } - function isConstEnumOrConstEnumOnlyModule(s) { - return isConstEnumSymbol(s) || s.constEnumOnlyModule; - } - function isReferencedAliasDeclaration(node, checkChildren) { - if (ts.isAliasSymbolDeclaration(node)) { - var symbol = getSymbolOfNode(node); - if (getSymbolLinks(symbol).referenced) { - return true; - } - } - if (checkChildren) { - return ts.forEachChild(node, function (node) { return isReferencedAliasDeclaration(node, checkChildren); }); - } - return false; - } - function isImplementationOfOverload(node) { - if (ts.nodeIsPresent(node.body)) { - var symbol = getSymbolOfNode(node); - var signaturesOfSymbol = getSignaturesOfSymbol(symbol); - // If this function body corresponds to function with multiple signature, it is implementation of overload - // e.g.: function foo(a: string): string; - // function foo(a: number): number; - // function foo(a: any) { // This is implementation of the overloads - // return a; - // } - return signaturesOfSymbol.length > 1 || - // If there is single signature for the symbol, it is overload if that signature isn't coming from the node - // e.g.: function foo(a: string): string; - // function foo(a: any) { // This is implementation of the overloads - // return a; - // } - (signaturesOfSymbol.length === 1 && signaturesOfSymbol[0].declaration !== node); - } - return false; - } - function getNodeCheckFlags(node) { - return getNodeLinks(node).flags; - } - function getEnumMemberValue(node) { - computeEnumMemberValues(node.parent); - return getNodeLinks(node).enumMemberValue; - } - function getConstantValue(node) { - if (node.kind === 229 /* EnumMember */) { - return getEnumMemberValue(node); - } - var symbol = getNodeLinks(node).resolvedSymbol; - if (symbol && (symbol.flags & 8 /* EnumMember */)) { - // inline property\index accesses only for const enums - if (ts.isConstEnumDeclaration(symbol.valueDeclaration.parent)) { - return getEnumMemberValue(symbol.valueDeclaration); - } - } - return undefined; - } - /** Serializes an EntityName (with substitutions) to an appropriate JS constructor value. Used by the __metadata decorator. */ - function serializeEntityName(node, fallbackPath) { - if (node.kind === 65 /* Identifier */) { - // TODO(ron.buckton): The getExpressionNameSubstitution function has been removed, but calling it - // here has no effect anyway as an identifier in a type name is not an expression. - // var substitution = getExpressionNameSubstitution(node, getGeneratedNameForNode); - // var text = substitution || (node).text; - var text = node.text; - if (fallbackPath) { - fallbackPath.push(text); - } - else { - return text; - } - } - else { - var left = serializeEntityName(node.left, fallbackPath); - var right = serializeEntityName(node.right, fallbackPath); - if (!fallbackPath) { - return left + "." + right; - } - } - } - /** Serializes a TypeReferenceNode to an appropriate JS constructor value. Used by the __metadata decorator. */ - function serializeTypeReferenceNode(node) { - // serialization of a TypeReferenceNode uses the following rules: - // - // * The serialized type of a TypeReference that is `void` is "void 0". - // * The serialized type of a TypeReference that is a `boolean` is "Boolean". - // * The serialized type of a TypeReference that is an enum or `number` is "Number". - // * The serialized type of a TypeReference that is a string literal or `string` is "String". - // * The serialized type of a TypeReference that is a tuple is "Array". - // * The serialized type of a TypeReference that is a `symbol` is "Symbol". - // * The serialized type of a TypeReference with a value declaration is its entity name. - // * The serialized type of a TypeReference with a call or construct signature is "Function". - // * The serialized type of any other type is "Object". - var type = getTypeFromTypeNode(node); - if (type.flags & 16 /* Void */) { - return "void 0"; - } - else if (type.flags & 8 /* Boolean */) { - return "Boolean"; - } - else if (type.flags & 132 /* NumberLike */) { - return "Number"; - } - else if (type.flags & 258 /* StringLike */) { - return "String"; - } - else if (type.flags & 8192 /* Tuple */) { - return "Array"; - } - else if (type.flags & 2097152 /* ESSymbol */) { - return "Symbol"; - } - else if (type === unknownType) { - var fallbackPath = []; - serializeEntityName(node.typeName, fallbackPath); - return fallbackPath; - } - else if (type.symbol && type.symbol.valueDeclaration) { - return serializeEntityName(node.typeName); - } - else if (typeHasCallOrConstructSignatures(type)) { - return "Function"; - } - return "Object"; - } - /** Serializes a TypeNode to an appropriate JS constructor value. Used by the __metadata decorator. */ - function serializeTypeNode(node) { - // serialization of a TypeNode uses the following rules: - // - // * The serialized type of `void` is "void 0" (undefined). - // * The serialized type of a parenthesized type is the serialized type of its nested type. - // * The serialized type of a Function or Constructor type is "Function". - // * The serialized type of an Array or Tuple type is "Array". - // * The serialized type of `boolean` is "Boolean". - // * The serialized type of `string` or a string-literal type is "String". - // * The serialized type of a type reference is handled by `serializeTypeReferenceNode`. - // * The serialized type of any other type node is "Object". - if (node) { - switch (node.kind) { - case 99 /* VoidKeyword */: - return "void 0"; - case 152 /* ParenthesizedType */: - return serializeTypeNode(node.type); - case 145 /* FunctionType */: - case 146 /* ConstructorType */: - return "Function"; - case 149 /* ArrayType */: - case 150 /* TupleType */: - return "Array"; - case 113 /* BooleanKeyword */: - return "Boolean"; - case 123 /* StringKeyword */: - case 8 /* StringLiteral */: - return "String"; - case 121 /* NumberKeyword */: - return "Number"; - case 144 /* TypeReference */: - return serializeTypeReferenceNode(node); - case 147 /* TypeQuery */: - case 148 /* TypeLiteral */: - case 151 /* UnionType */: - case 112 /* AnyKeyword */: - break; - default: - ts.Debug.fail("Cannot serialize unexpected type node."); - break; - } - } - return "Object"; - } - /** Serializes the type of a declaration to an appropriate JS constructor value. Used by the __metadata decorator for a class member. */ - function serializeTypeOfNode(node) { - // serialization of the type of a declaration uses the following rules: - // - // * The serialized type of a ClassDeclaration is "Function" - // * The serialized type of a ParameterDeclaration is the serialized type of its type annotation. - // * The serialized type of a PropertyDeclaration is the serialized type of its type annotation. - // * The serialized type of an AccessorDeclaration is the serialized type of the return type annotation of its getter or parameter type annotation of its setter. - // * The serialized type of any other FunctionLikeDeclaration is "Function". - // * The serialized type of any other node is "void 0". - // - // For rules on serializing type annotations, see `serializeTypeNode`. - switch (node.kind) { - case 204 /* ClassDeclaration */: return "Function"; - case 134 /* PropertyDeclaration */: return serializeTypeNode(node.type); - case 131 /* Parameter */: return serializeTypeNode(node.type); - case 138 /* GetAccessor */: return serializeTypeNode(node.type); - case 139 /* SetAccessor */: return serializeTypeNode(getSetAccessorTypeAnnotationNode(node)); - } - if (ts.isFunctionLike(node)) { - return "Function"; - } - return "void 0"; - } - /** Serializes the parameter types of a function or the constructor of a class. Used by the __metadata decorator for a method or set accessor. */ - function serializeParameterTypesOfNode(node) { - // serialization of parameter types uses the following rules: - // - // * If the declaration is a class, the parameters of the first constructor with a body are used. - // * If the declaration is function-like and has a body, the parameters of the function are used. - // - // For the rules on serializing the type of each parameter declaration, see `serializeTypeOfDeclaration`. - if (node) { - var valueDeclaration; - if (node.kind === 204 /* ClassDeclaration */) { - valueDeclaration = ts.getFirstConstructorWithBody(node); - } - else if (ts.isFunctionLike(node) && ts.nodeIsPresent(node.body)) { - valueDeclaration = node; - } - if (valueDeclaration) { - var result; - var parameters = valueDeclaration.parameters; - var parameterCount = parameters.length; - if (parameterCount > 0) { - result = new Array(parameterCount); - for (var i = 0; i < parameterCount; i++) { - if (parameters[i].dotDotDotToken) { - var parameterType = parameters[i].type; - if (parameterType.kind === 149 /* ArrayType */) { - parameterType = parameterType.elementType; - } - else if (parameterType.kind === 144 /* TypeReference */ && parameterType.typeArguments && parameterType.typeArguments.length === 1) { - parameterType = parameterType.typeArguments[0]; - } - else { - parameterType = undefined; - } - result[i] = serializeTypeNode(parameterType); - } - else { - result[i] = serializeTypeOfNode(parameters[i]); - } - } - return result; - } - } - } - return emptyArray; - } - /** Serializes the return type of function. Used by the __metadata decorator for a method. */ - function serializeReturnTypeOfNode(node) { - if (node && ts.isFunctionLike(node)) { - return serializeTypeNode(node.type); - } - return "void 0"; - } - function writeTypeOfDeclaration(declaration, enclosingDeclaration, flags, writer) { - // Get type of the symbol if this is the valid symbol otherwise get type at location - var symbol = getSymbolOfNode(declaration); - var type = symbol && !(symbol.flags & (2048 /* TypeLiteral */ | 131072 /* Signature */)) - ? getTypeOfSymbol(symbol) - : unknownType; - getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags); - } - function writeReturnTypeOfSignatureDeclaration(signatureDeclaration, enclosingDeclaration, flags, writer) { - var signature = getSignatureFromDeclaration(signatureDeclaration); - getSymbolDisplayBuilder().buildTypeDisplay(getReturnTypeOfSignature(signature), writer, enclosingDeclaration, flags); - } - function writeTypeOfExpression(expr, enclosingDeclaration, flags, writer) { - var type = getTypeOfExpression(expr); - getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags); - } - function hasGlobalName(name) { - return ts.hasProperty(globals, name); - } - function getReferencedValueSymbol(reference) { - return getNodeLinks(reference).resolvedSymbol || - resolveName(reference, reference.text, 107455 /* Value */ | 1048576 /* ExportValue */ | 8388608 /* Alias */, - /*nodeNotFoundMessage*/ undefined, undefined); - } - function getReferencedValueDeclaration(reference) { - ts.Debug.assert(!ts.nodeIsSynthesized(reference)); - var symbol = getReferencedValueSymbol(reference); - return symbol && getExportSymbolOfValueSymbolIfExported(symbol).valueDeclaration; - } - function getBlockScopedVariableId(n) { - ts.Debug.assert(!ts.nodeIsSynthesized(n)); - var isVariableDeclarationOrBindingElement = n.parent.kind === 155 /* BindingElement */ || (n.parent.kind === 201 /* VariableDeclaration */ && n.parent.name === n); - var symbol = (isVariableDeclarationOrBindingElement ? getSymbolOfNode(n.parent) : undefined) || - getNodeLinks(n).resolvedSymbol || - resolveName(n, n.text, 107455 /* Value */ | 8388608 /* Alias */, undefined, undefined); - var isLetOrConst = symbol && - (symbol.flags & 2 /* BlockScopedVariable */) && - symbol.valueDeclaration.parent.kind !== 226 /* CatchClause */; - if (isLetOrConst) { - // side-effect of calling this method: - // assign id to symbol if it was not yet set - getSymbolLinks(symbol); - return symbol.id; - } - return undefined; - } - function instantiateSingleCallFunctionType(functionType, typeArguments) { - if (functionType === unknownType) { - return unknownType; - } - var signature = getSingleCallSignature(functionType); - if (!signature) { - return unknownType; - } - var instantiatedSignature = getSignatureInstantiation(signature, typeArguments); - return getOrCreateTypeFromSignature(instantiatedSignature); - } - function createResolver() { - return { - getReferencedExportContainer: getReferencedExportContainer, - getReferencedImportDeclaration: getReferencedImportDeclaration, - getReferencedNestedRedeclaration: getReferencedNestedRedeclaration, - isNestedRedeclaration: isNestedRedeclaration, - isValueAliasDeclaration: isValueAliasDeclaration, - hasGlobalName: hasGlobalName, - isReferencedAliasDeclaration: isReferencedAliasDeclaration, - getNodeCheckFlags: getNodeCheckFlags, - isTopLevelValueImportEqualsWithEntityName: isTopLevelValueImportEqualsWithEntityName, - isDeclarationVisible: isDeclarationVisible, - isImplementationOfOverload: isImplementationOfOverload, - writeTypeOfDeclaration: writeTypeOfDeclaration, - writeReturnTypeOfSignatureDeclaration: writeReturnTypeOfSignatureDeclaration, - writeTypeOfExpression: writeTypeOfExpression, - isSymbolAccessible: isSymbolAccessible, - isEntityNameVisible: isEntityNameVisible, - getConstantValue: getConstantValue, - collectLinkedAliases: collectLinkedAliases, - getBlockScopedVariableId: getBlockScopedVariableId, - getReferencedValueDeclaration: getReferencedValueDeclaration, - serializeTypeOfNode: serializeTypeOfNode, - serializeParameterTypesOfNode: serializeParameterTypesOfNode, - serializeReturnTypeOfNode: serializeReturnTypeOfNode - }; - } - function initializeTypeChecker() { - // Bind all source files and propagate errors - ts.forEach(host.getSourceFiles(), function (file) { - ts.bindSourceFile(file); - }); - // Initialize global symbol table - ts.forEach(host.getSourceFiles(), function (file) { - if (!ts.isExternalModule(file)) { - mergeSymbolTable(globals, file.locals); - } - }); - // Initialize special symbols - getSymbolLinks(undefinedSymbol).type = undefinedType; - getSymbolLinks(argumentsSymbol).type = getGlobalType("IArguments"); - getSymbolLinks(unknownSymbol).type = unknownType; - globals[undefinedSymbol.name] = undefinedSymbol; - // Initialize special types - globalArrayType = getGlobalType("Array", 1); - globalObjectType = getGlobalType("Object"); - globalFunctionType = getGlobalType("Function"); - globalStringType = getGlobalType("String"); - globalNumberType = getGlobalType("Number"); - globalBooleanType = getGlobalType("Boolean"); - globalRegExpType = getGlobalType("RegExp"); - getGlobalClassDecoratorType = ts.memoize(function () { return getGlobalType("ClassDecorator"); }); - getGlobalPropertyDecoratorType = ts.memoize(function () { return getGlobalType("PropertyDecorator"); }); - getGlobalMethodDecoratorType = ts.memoize(function () { return getGlobalType("MethodDecorator"); }); - getGlobalParameterDecoratorType = ts.memoize(function () { return getGlobalType("ParameterDecorator"); }); - // If we're in ES6 mode, load the TemplateStringsArray. - // Otherwise, default to 'unknown' for the purposes of type checking in LS scenarios. - if (languageVersion >= 2 /* ES6 */) { - globalTemplateStringsArrayType = getGlobalType("TemplateStringsArray"); - globalESSymbolType = getGlobalType("Symbol"); - globalESSymbolConstructorSymbol = getGlobalValueSymbol("Symbol"); - globalIterableType = getGlobalType("Iterable", 1); - globalIteratorType = getGlobalType("Iterator", 1); - globalIterableIteratorType = getGlobalType("IterableIterator", 1); - } - else { - globalTemplateStringsArrayType = unknownType; - // Consider putting Symbol interface in lib.d.ts. On the plus side, putting it in lib.d.ts would make it - // extensible for Polyfilling Symbols. But putting it into lib.d.ts could also break users that have - // a global Symbol already, particularly if it is a class. - globalESSymbolType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); - globalESSymbolConstructorSymbol = undefined; - globalIterableType = emptyGenericType; - globalIteratorType = emptyGenericType; - globalIterableIteratorType = emptyGenericType; - } - anyArrayType = createArrayType(anyType); - } - // GRAMMAR CHECKING - function isReservedWordInStrictMode(node) { - // Check that originalKeywordKind is less than LastFutureReservedWord to see if an Identifier is a strict-mode reserved word - return (node.parserContextFlags & 1 /* StrictMode */) && - (102 /* FirstFutureReservedWord */ <= node.originalKeywordKind && node.originalKeywordKind <= 110 /* LastFutureReservedWord */); - } - function reportStrictModeGrammarErrorInClassDeclaration(identifier, message, arg0, arg1, arg2) { - // We are checking if this name is inside class declaration or class expression (which are under class definitions inside ES6 spec.) - // if so, we would like to give more explicit invalid usage error. - if (ts.getAncestor(identifier, 204 /* ClassDeclaration */) || ts.getAncestor(identifier, 177 /* ClassExpression */)) { - return grammarErrorOnNode(identifier, message, arg0); - } - return false; - } - function checkGrammarImportDeclarationNameInStrictMode(node) { - // Check if the import declaration used strict-mode reserved word in its names bindings - if (node.importClause) { - var impotClause = node.importClause; - if (impotClause.namedBindings) { - var nameBindings = impotClause.namedBindings; - if (nameBindings.kind === 214 /* NamespaceImport */) { - var name_15 = nameBindings.name; - if (isReservedWordInStrictMode(name_15)) { - var nameText = ts.declarationNameToString(name_15); - return grammarErrorOnNode(name_15, ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode, nameText); - } - } - else if (nameBindings.kind === 215 /* NamedImports */) { - var reportError = false; - for (var _i = 0, _a = nameBindings.elements; _i < _a.length; _i++) { - var element = _a[_i]; - var name_16 = element.name; - if (isReservedWordInStrictMode(name_16)) { - var nameText = ts.declarationNameToString(name_16); - reportError = reportError || grammarErrorOnNode(name_16, ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode, nameText); - } - } - return reportError; - } - } - } - return false; - } - function checkGrammarDeclarationNameInStrictMode(node) { - var name = node.name; - if (name && name.kind === 65 /* Identifier */ && isReservedWordInStrictMode(name)) { - var nameText = ts.declarationNameToString(name); - switch (node.kind) { - case 131 /* Parameter */: - case 201 /* VariableDeclaration */: - case 203 /* FunctionDeclaration */: - case 130 /* TypeParameter */: - case 155 /* BindingElement */: - case 205 /* InterfaceDeclaration */: - case 206 /* TypeAliasDeclaration */: - case 207 /* EnumDeclaration */: - return checkGrammarIdentifierInStrictMode(name); - case 204 /* ClassDeclaration */: - // Report an error if the class declaration uses strict-mode reserved word. - return grammarErrorOnNode(name, ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode, nameText); - case 208 /* ModuleDeclaration */: - // Report an error if the module declaration uses strict-mode reserved word. - // TODO(yuisu): fix this when having external module in strict mode - return grammarErrorOnNode(name, ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode, nameText); - case 211 /* ImportEqualsDeclaration */: - // TODO(yuisu): fix this when having external module in strict mode - return grammarErrorOnNode(name, ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode, nameText); - } - } - return false; - } - function checkGrammarTypeReferenceInStrictMode(typeName) { - // Check if the type reference is using strict mode keyword - // Example: - // class C { - // foo(x: public){} // Error. - // } - if (typeName.kind === 65 /* Identifier */) { - checkGrammarTypeNameInStrictMode(typeName); - } - else if (typeName.kind === 128 /* QualifiedName */) { - // Walk from right to left and report a possible error at each Identifier in QualifiedName - // Example: - // x1: public.private.package // error at public and private - checkGrammarTypeNameInStrictMode(typeName.right); - checkGrammarTypeReferenceInStrictMode(typeName.left); - } - } - // This function will report an error for every identifier in property access expression - // whether it violates strict mode reserved words. - // Example: - // public // error at public - // public.private.package // error at public - // B.private.B // no error - function checkGrammarExpressionWithTypeArgumentsInStrictMode(expression) { - // Example: - // class C extends public // error at public - if (expression && expression.kind === 65 /* Identifier */) { - return checkGrammarIdentifierInStrictMode(expression); - } - else if (expression && expression.kind === 158 /* PropertyAccessExpression */) { - // Walk from left to right in PropertyAccessExpression until we are at the left most expression - // in PropertyAccessExpression. According to grammar production of MemberExpression, - // the left component expression is a PrimaryExpression (i.e. Identifier) while the other - // component after dots can be IdentifierName. - checkGrammarExpressionWithTypeArgumentsInStrictMode(expression.expression); - } - } - // The function takes an identifier itself or an expression which has SyntaxKind.Identifier. - function checkGrammarIdentifierInStrictMode(node, nameText) { - if (node && node.kind === 65 /* Identifier */ && isReservedWordInStrictMode(node)) { - if (!nameText) { - nameText = ts.declarationNameToString(node); - } - // TODO (yuisu): Fix when module is a strict mode - var errorReport = reportStrictModeGrammarErrorInClassDeclaration(node, ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode, nameText) || - grammarErrorOnNode(node, ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode, nameText); - return errorReport; - } - return false; - } - // The function takes an identifier when uses as a typeName in TypeReferenceNode - function checkGrammarTypeNameInStrictMode(node) { - if (node && node.kind === 65 /* Identifier */ && isReservedWordInStrictMode(node)) { - var nameText = ts.declarationNameToString(node); - // TODO (yuisu): Fix when module is a strict mode - var errorReport = reportStrictModeGrammarErrorInClassDeclaration(node, ts.Diagnostics.Type_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode, nameText) || - grammarErrorOnNode(node, ts.Diagnostics.Type_expected_0_is_a_reserved_word_in_strict_mode, nameText); - return errorReport; - } - return false; - } - function checkGrammarDecorators(node) { - if (!node.decorators) { - return false; - } - if (!ts.nodeCanBeDecorated(node)) { - return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_are_not_valid_here); - } - else if (languageVersion < 1 /* ES5 */) { - return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_are_only_available_when_targeting_ECMAScript_5_and_higher); - } - else if (node.kind === 138 /* GetAccessor */ || node.kind === 139 /* SetAccessor */) { - var accessors = ts.getAllAccessorDeclarations(node.parent.members, node); - if (accessors.firstAccessor.decorators && node === accessors.secondAccessor) { - return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name); - } - } - return false; - } - function checkGrammarModifiers(node) { - switch (node.kind) { - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 137 /* Constructor */: - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 142 /* IndexSignature */: - case 208 /* ModuleDeclaration */: - case 212 /* ImportDeclaration */: - case 211 /* ImportEqualsDeclaration */: - case 218 /* ExportDeclaration */: - case 217 /* ExportAssignment */: - case 131 /* Parameter */: - break; - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - case 183 /* VariableStatement */: - case 203 /* FunctionDeclaration */: - case 206 /* TypeAliasDeclaration */: - if (node.modifiers && node.parent.kind !== 209 /* ModuleBlock */ && node.parent.kind !== 230 /* SourceFile */) { - return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); - } - break; - case 207 /* EnumDeclaration */: - if (node.modifiers && (node.modifiers.length > 1 || node.modifiers[0].kind !== 70 /* ConstKeyword */) && - node.parent.kind !== 209 /* ModuleBlock */ && node.parent.kind !== 230 /* SourceFile */) { - return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); - } - break; - default: - return false; - } - if (!node.modifiers) { - return; - } - var lastStatic, lastPrivate, lastProtected, lastDeclare; - var flags = 0; - for (var _i = 0, _a = node.modifiers; _i < _a.length; _i++) { - var modifier = _a[_i]; - switch (modifier.kind) { - case 108 /* PublicKeyword */: - case 107 /* ProtectedKeyword */: - case 106 /* PrivateKeyword */: - var text = void 0; - if (modifier.kind === 108 /* PublicKeyword */) { - text = "public"; - } - else if (modifier.kind === 107 /* ProtectedKeyword */) { - text = "protected"; - lastProtected = modifier; - } - else { - text = "private"; - lastPrivate = modifier; - } - if (flags & 112 /* AccessibilityModifier */) { - return grammarErrorOnNode(modifier, ts.Diagnostics.Accessibility_modifier_already_seen); - } - else if (flags & 128 /* Static */) { - return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "static"); - } - else if (node.parent.kind === 209 /* ModuleBlock */ || node.parent.kind === 230 /* SourceFile */) { - return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_element, text); - } - flags |= ts.modifierToFlag(modifier.kind); - break; - case 109 /* StaticKeyword */: - if (flags & 128 /* Static */) { - return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "static"); - } - else if (node.parent.kind === 209 /* ModuleBlock */ || node.parent.kind === 230 /* SourceFile */) { - return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_element, "static"); - } - else if (node.kind === 131 /* Parameter */) { - return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static"); - } - flags |= 128 /* Static */; - lastStatic = modifier; - break; - case 78 /* ExportKeyword */: - if (flags & 1 /* Export */) { - return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "export"); - } - else if (flags & 2 /* Ambient */) { - return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "export", "declare"); - } - else if (node.parent.kind === 204 /* ClassDeclaration */) { - return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "export"); - } - else if (node.kind === 131 /* Parameter */) { - return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export"); - } - flags |= 1 /* Export */; - break; - case 115 /* DeclareKeyword */: - if (flags & 2 /* Ambient */) { - return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "declare"); - } - else if (node.parent.kind === 204 /* ClassDeclaration */) { - return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "declare"); - } - else if (node.kind === 131 /* Parameter */) { - return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare"); - } - else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 209 /* ModuleBlock */) { - return grammarErrorOnNode(modifier, ts.Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); - } - flags |= 2 /* Ambient */; - lastDeclare = modifier; - break; - } - } - if (node.kind === 137 /* Constructor */) { - if (flags & 128 /* Static */) { - return grammarErrorOnNode(lastStatic, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static"); - } - else if (flags & 64 /* Protected */) { - return grammarErrorOnNode(lastProtected, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "protected"); - } - else if (flags & 32 /* Private */) { - return grammarErrorOnNode(lastPrivate, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "private"); - } - } - else if ((node.kind === 212 /* ImportDeclaration */ || node.kind === 211 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { - return grammarErrorOnNode(lastDeclare, ts.Diagnostics.A_declare_modifier_cannot_be_used_with_an_import_declaration, "declare"); - } - else if (node.kind === 131 /* Parameter */ && (flags & 112 /* AccessibilityModifier */) && ts.isBindingPattern(node.name)) { - return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_may_not_be_a_binding_pattern); - } - } - function checkGrammarForDisallowedTrailingComma(list) { - if (list && list.hasTrailingComma) { - var start = list.end - ",".length; - var end = list.end; - var sourceFile = ts.getSourceFileOfNode(list[0]); - return grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.Trailing_comma_not_allowed); - } - } - function checkGrammarTypeParameterList(node, typeParameters, file) { - if (checkGrammarForDisallowedTrailingComma(typeParameters)) { - return true; - } - if (typeParameters && typeParameters.length === 0) { - var start = typeParameters.pos - "<".length; - var end = ts.skipTrivia(file.text, typeParameters.end) + ">".length; - return grammarErrorAtPos(file, start, end - start, ts.Diagnostics.Type_parameter_list_cannot_be_empty); - } - } - function checkGrammarParameterList(parameters) { - if (checkGrammarForDisallowedTrailingComma(parameters)) { - return true; - } - var seenOptionalParameter = false; - var parameterCount = parameters.length; - for (var i = 0; i < parameterCount; i++) { - var parameter = parameters[i]; - if (parameter.dotDotDotToken) { - if (i !== (parameterCount - 1)) { - return grammarErrorOnNode(parameter.dotDotDotToken, ts.Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list); - } - if (ts.isBindingPattern(parameter.name)) { - return grammarErrorOnNode(parameter.name, ts.Diagnostics.A_rest_element_cannot_contain_a_binding_pattern); - } - if (parameter.questionToken) { - return grammarErrorOnNode(parameter.questionToken, ts.Diagnostics.A_rest_parameter_cannot_be_optional); - } - if (parameter.initializer) { - return grammarErrorOnNode(parameter.name, ts.Diagnostics.A_rest_parameter_cannot_have_an_initializer); - } - } - else if (parameter.questionToken || parameter.initializer) { - seenOptionalParameter = true; - if (parameter.questionToken && parameter.initializer) { - return grammarErrorOnNode(parameter.name, ts.Diagnostics.Parameter_cannot_have_question_mark_and_initializer); - } - } - else { - if (seenOptionalParameter) { - return grammarErrorOnNode(parameter.name, ts.Diagnostics.A_required_parameter_cannot_follow_an_optional_parameter); - } - } - } - } - function checkGrammarFunctionLikeDeclaration(node) { - // Prevent cascading error by short-circuit - var file = ts.getSourceFileOfNode(node); - return checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarTypeParameterList(node, node.typeParameters, file) || - checkGrammarParameterList(node.parameters) || checkGrammarArrowFunction(node, file); - } - function checkGrammarArrowFunction(node, file) { - if (node.kind === 166 /* ArrowFunction */) { - var arrowFunction = node; - var startLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.pos).line; - var endLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.end).line; - if (startLine !== endLine) { - return grammarErrorOnNode(arrowFunction.equalsGreaterThanToken, ts.Diagnostics.Line_terminator_not_permitted_before_arrow); - } - } - return false; - } - function checkGrammarIndexSignatureParameters(node) { - var parameter = node.parameters[0]; - if (node.parameters.length !== 1) { - if (parameter) { - return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_must_have_exactly_one_parameter); - } - else { - return grammarErrorOnNode(node, ts.Diagnostics.An_index_signature_must_have_exactly_one_parameter); - } - } - if (parameter.dotDotDotToken) { - return grammarErrorOnNode(parameter.dotDotDotToken, ts.Diagnostics.An_index_signature_cannot_have_a_rest_parameter); - } - if (parameter.flags & 499 /* Modifier */) { - return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_cannot_have_an_accessibility_modifier); - } - if (parameter.questionToken) { - return grammarErrorOnNode(parameter.questionToken, ts.Diagnostics.An_index_signature_parameter_cannot_have_a_question_mark); - } - if (parameter.initializer) { - return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_cannot_have_an_initializer); - } - if (!parameter.type) { - return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_must_have_a_type_annotation); - } - if (parameter.type.kind !== 123 /* StringKeyword */ && parameter.type.kind !== 121 /* NumberKeyword */) { - return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_string_or_number); - } - if (!node.type) { - return grammarErrorOnNode(node, ts.Diagnostics.An_index_signature_must_have_a_type_annotation); - } - } - function checkGrammarForIndexSignatureModifier(node) { - if (node.flags & 499 /* Modifier */) { - grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_not_permitted_on_index_signature_members); - } - } - function checkGrammarIndexSignature(node) { - // Prevent cascading error by short-circuit - return checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarIndexSignatureParameters(node) || checkGrammarForIndexSignatureModifier(node); - } - function checkGrammarForAtLeastOneTypeArgument(node, typeArguments) { - if (typeArguments && typeArguments.length === 0) { - var sourceFile = ts.getSourceFileOfNode(node); - var start = typeArguments.pos - "<".length; - var end = ts.skipTrivia(sourceFile.text, typeArguments.end) + ">".length; - return grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.Type_argument_list_cannot_be_empty); - } - } - function checkGrammarTypeArguments(node, typeArguments) { - return checkGrammarForDisallowedTrailingComma(typeArguments) || - checkGrammarForAtLeastOneTypeArgument(node, typeArguments); - } - function checkGrammarForOmittedArgument(node, arguments) { - if (arguments) { - var sourceFile = ts.getSourceFileOfNode(node); - for (var _i = 0; _i < arguments.length; _i++) { - var arg = arguments[_i]; - if (arg.kind === 178 /* OmittedExpression */) { - return grammarErrorAtPos(sourceFile, arg.pos, 0, ts.Diagnostics.Argument_expression_expected); - } - } - } - } - function checkGrammarArguments(node, arguments) { - return checkGrammarForDisallowedTrailingComma(arguments) || - checkGrammarForOmittedArgument(node, arguments); - } - function checkGrammarHeritageClause(node) { - var types = node.types; - if (checkGrammarForDisallowedTrailingComma(types)) { - return true; - } - if (types && types.length === 0) { - var listType = ts.tokenToString(node.token); - var sourceFile = ts.getSourceFileOfNode(node); - return grammarErrorAtPos(sourceFile, types.pos, 0, ts.Diagnostics._0_list_cannot_be_empty, listType); - } - } - function checkGrammarClassDeclarationHeritageClauses(node) { - var seenExtendsClause = false; - var seenImplementsClause = false; - if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node) && node.heritageClauses) { - for (var _i = 0, _a = node.heritageClauses; _i < _a.length; _i++) { - var heritageClause = _a[_i]; - if (heritageClause.token === 79 /* ExtendsKeyword */) { - if (seenExtendsClause) { - return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.extends_clause_already_seen); - } - if (seenImplementsClause) { - return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.extends_clause_must_precede_implements_clause); - } - if (heritageClause.types.length > 1) { - return grammarErrorOnFirstToken(heritageClause.types[1], ts.Diagnostics.Classes_can_only_extend_a_single_class); - } - seenExtendsClause = true; - } - else { - ts.Debug.assert(heritageClause.token === 102 /* ImplementsKeyword */); - if (seenImplementsClause) { - return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.implements_clause_already_seen); - } - seenImplementsClause = true; - } - // Grammar checking heritageClause inside class declaration - checkGrammarHeritageClause(heritageClause); - } - } - } - function checkGrammarInterfaceDeclaration(node) { - var seenExtendsClause = false; - if (node.heritageClauses) { - for (var _i = 0, _a = node.heritageClauses; _i < _a.length; _i++) { - var heritageClause = _a[_i]; - if (heritageClause.token === 79 /* ExtendsKeyword */) { - if (seenExtendsClause) { - return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.extends_clause_already_seen); - } - seenExtendsClause = true; - } - else { - ts.Debug.assert(heritageClause.token === 102 /* ImplementsKeyword */); - return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.Interface_declaration_cannot_have_implements_clause); - } - // Grammar checking heritageClause inside class declaration - checkGrammarHeritageClause(heritageClause); - } - } - return false; - } - function checkGrammarComputedPropertyName(node) { - // If node is not a computedPropertyName, just skip the grammar checking - if (node.kind !== 129 /* ComputedPropertyName */) { - return false; - } - var computedPropertyName = node; - if (computedPropertyName.expression.kind === 172 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 23 /* CommaToken */) { - return grammarErrorOnNode(computedPropertyName.expression, ts.Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name); - } - } - function checkGrammarForGenerator(node) { - if (node.asteriskToken) { - ts.Debug.assert(node.kind === 203 /* FunctionDeclaration */ || - node.kind === 165 /* FunctionExpression */ || - node.kind === 136 /* MethodDeclaration */); - if (ts.isInAmbientContext(node)) { - return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_not_allowed_in_an_ambient_context); - } - if (!node.body) { - return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.An_overload_signature_cannot_be_declared_as_a_generator); - } - if (languageVersion < 2 /* ES6 */) { - return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_only_available_when_targeting_ECMAScript_6_or_higher); - } - } - } - function checkGrammarFunctionName(name) { - // It is a SyntaxError if the identifier eval or arguments appears within a FormalParameterList of a strict mode FunctionDeclaration or FunctionExpression (13.1)) - return checkGrammarEvalOrArgumentsInStrictMode(name, name); - } - function checkGrammarForInvalidQuestionMark(node, questionToken, message) { - if (questionToken) { - return grammarErrorOnNode(questionToken, message); - } - } - function checkGrammarObjectLiteralExpression(node) { - var seen = {}; - var Property = 1; - var GetAccessor = 2; - var SetAccesor = 4; - var GetOrSetAccessor = GetAccessor | SetAccesor; - var inStrictMode = (node.parserContextFlags & 1 /* StrictMode */) !== 0; - for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { - var prop = _a[_i]; - var name_17 = prop.name; - if (prop.kind === 178 /* OmittedExpression */ || - name_17.kind === 129 /* ComputedPropertyName */) { - // If the name is not a ComputedPropertyName, the grammar checking will skip it - checkGrammarComputedPropertyName(name_17); - continue; - } - // ECMA-262 11.1.5 Object Initialiser - // If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true - // a.This production is contained in strict code and IsDataDescriptor(previous) is true and - // IsDataDescriptor(propId.descriptor) is true. - // b.IsDataDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true. - // c.IsAccessorDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true. - // d.IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true - // and either both previous and propId.descriptor have[[Get]] fields or both previous and propId.descriptor have[[Set]] fields - var currentKind = void 0; - if (prop.kind === 227 /* PropertyAssignment */ || prop.kind === 228 /* ShorthandPropertyAssignment */) { - // Grammar checking for computedPropertName and shorthandPropertyAssignment - checkGrammarForInvalidQuestionMark(prop, prop.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional); - if (name_17.kind === 7 /* NumericLiteral */) { - checkGrammarNumericLiteral(name_17); - } - currentKind = Property; - } - else if (prop.kind === 136 /* MethodDeclaration */) { - currentKind = Property; - } - else if (prop.kind === 138 /* GetAccessor */) { - currentKind = GetAccessor; - } - else if (prop.kind === 139 /* SetAccessor */) { - currentKind = SetAccesor; - } - else { - ts.Debug.fail("Unexpected syntax kind:" + prop.kind); - } - if (!ts.hasProperty(seen, name_17.text)) { - seen[name_17.text] = currentKind; - } - else { - var existingKind = seen[name_17.text]; - if (currentKind === Property && existingKind === Property) { - if (inStrictMode) { - grammarErrorOnNode(name_17, ts.Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode); - } - } - else if ((currentKind & GetOrSetAccessor) && (existingKind & GetOrSetAccessor)) { - if (existingKind !== GetOrSetAccessor && currentKind !== existingKind) { - seen[name_17.text] = currentKind | existingKind; - } - else { - return grammarErrorOnNode(name_17, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name); - } - } - else { - return grammarErrorOnNode(name_17, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name); - } - } - } - } - function checkGrammarForInOrForOfStatement(forInOrOfStatement) { - if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) { - return true; - } - if (forInOrOfStatement.initializer.kind === 202 /* VariableDeclarationList */) { - var variableList = forInOrOfStatement.initializer; - if (!checkGrammarVariableDeclarationList(variableList)) { - if (variableList.declarations.length > 1) { - var diagnostic = forInOrOfStatement.kind === 190 /* ForInStatement */ - ? ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement - : ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; - return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic); - } - var firstDeclaration = variableList.declarations[0]; - if (firstDeclaration.initializer) { - var diagnostic = forInOrOfStatement.kind === 190 /* ForInStatement */ - ? ts.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer - : ts.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; - return grammarErrorOnNode(firstDeclaration.name, diagnostic); - } - if (firstDeclaration.type) { - var diagnostic = forInOrOfStatement.kind === 190 /* ForInStatement */ - ? ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation - : ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; - return grammarErrorOnNode(firstDeclaration, diagnostic); - } - } - } - return false; - } - function checkGrammarAccessor(accessor) { - var kind = accessor.kind; - if (languageVersion < 1 /* ES5 */) { - return grammarErrorOnNode(accessor.name, ts.Diagnostics.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher); - } - else if (ts.isInAmbientContext(accessor)) { - return grammarErrorOnNode(accessor.name, ts.Diagnostics.An_accessor_cannot_be_declared_in_an_ambient_context); - } - else if (accessor.body === undefined) { - return grammarErrorAtPos(ts.getSourceFileOfNode(accessor), accessor.end - 1, ";".length, ts.Diagnostics._0_expected, "{"); - } - else if (accessor.typeParameters) { - return grammarErrorOnNode(accessor.name, ts.Diagnostics.An_accessor_cannot_have_type_parameters); - } - else if (kind === 138 /* GetAccessor */ && accessor.parameters.length) { - return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_get_accessor_cannot_have_parameters); - } - else if (kind === 139 /* SetAccessor */) { - if (accessor.type) { - return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); - } - else if (accessor.parameters.length !== 1) { - return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_must_have_exactly_one_parameter); - } - else { - var parameter = accessor.parameters[0]; - if (parameter.dotDotDotToken) { - return grammarErrorOnNode(parameter.dotDotDotToken, ts.Diagnostics.A_set_accessor_cannot_have_rest_parameter); - } - else if (parameter.flags & 499 /* Modifier */) { - return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); - } - else if (parameter.questionToken) { - return grammarErrorOnNode(parameter.questionToken, ts.Diagnostics.A_set_accessor_cannot_have_an_optional_parameter); - } - else if (parameter.initializer) { - return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_parameter_cannot_have_an_initializer); - } - } - } - } - function checkGrammarForNonSymbolComputedProperty(node, message) { - if (node.kind === 129 /* ComputedPropertyName */ && !ts.isWellKnownSymbolSyntactically(node.expression)) { - return grammarErrorOnNode(node, message); - } - } - function checkGrammarMethod(node) { - if (checkGrammarDisallowedModifiersInBlockOrObjectLiteralExpression(node) || - checkGrammarFunctionLikeDeclaration(node) || - checkGrammarForGenerator(node)) { - return true; - } - if (node.parent.kind === 157 /* ObjectLiteralExpression */) { - if (checkGrammarForInvalidQuestionMark(node, node.questionToken, ts.Diagnostics.A_class_member_cannot_be_declared_optional)) { - return true; - } - else if (node.body === undefined) { - return grammarErrorAtPos(getSourceFile(node), node.end - 1, ";".length, ts.Diagnostics._0_expected, "{"); - } - } - if (node.parent.kind === 204 /* ClassDeclaration */) { - if (checkGrammarForInvalidQuestionMark(node, node.questionToken, ts.Diagnostics.A_class_member_cannot_be_declared_optional)) { - return true; - } - // Technically, computed properties in ambient contexts is disallowed - // for property declarations and accessors too, not just methods. - // However, property declarations disallow computed names in general, - // and accessors are not allowed in ambient contexts in general, - // so this error only really matters for methods. - if (ts.isInAmbientContext(node)) { - return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_ambient_context_must_directly_refer_to_a_built_in_symbol); - } - else if (!node.body) { - return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol); - } - } - else if (node.parent.kind === 205 /* InterfaceDeclaration */) { - return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol); - } - else if (node.parent.kind === 148 /* TypeLiteral */) { - return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol); - } - } - function isIterationStatement(node, lookInLabeledStatements) { - switch (node.kind) { - case 189 /* ForStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - case 187 /* DoStatement */: - case 188 /* WhileStatement */: - return true; - case 197 /* LabeledStatement */: - return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements); - } - return false; - } - function checkGrammarBreakOrContinueStatement(node) { - var current = node; - while (current) { - if (ts.isFunctionLike(current)) { - return grammarErrorOnNode(node, ts.Diagnostics.Jump_target_cannot_cross_function_boundary); - } - switch (current.kind) { - case 197 /* LabeledStatement */: - if (node.label && current.label.text === node.label.text) { - // found matching label - verify that label usage is correct - // continue can only target labels that are on iteration statements - var isMisplacedContinueLabel = node.kind === 192 /* ContinueStatement */ - && !isIterationStatement(current.statement, true); - if (isMisplacedContinueLabel) { - return grammarErrorOnNode(node, ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement); - } - return false; - } - break; - case 196 /* SwitchStatement */: - if (node.kind === 193 /* BreakStatement */ && !node.label) { - // unlabeled break within switch statement - ok - return false; - } - break; - default: - if (isIterationStatement(current, false) && !node.label) { - // unlabeled break or continue within iteration statement - ok - return false; - } - break; - } - current = current.parent; - } - if (node.label) { - var message = node.kind === 193 /* BreakStatement */ - ? ts.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement - : ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; - return grammarErrorOnNode(node, message); - } - else { - var message = node.kind === 193 /* BreakStatement */ - ? ts.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement - : ts.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; - return grammarErrorOnNode(node, message); - } - } - function checkGrammarBindingElement(node) { - if (node.dotDotDotToken) { - var elements = node.parent.elements; - if (node !== ts.lastOrUndefined(elements)) { - return grammarErrorOnNode(node, ts.Diagnostics.A_rest_element_must_be_last_in_an_array_destructuring_pattern); - } - if (node.name.kind === 154 /* ArrayBindingPattern */ || node.name.kind === 153 /* ObjectBindingPattern */) { - return grammarErrorOnNode(node.name, ts.Diagnostics.A_rest_element_cannot_contain_a_binding_pattern); - } - if (node.initializer) { - // Error on equals token which immediate precedes the initializer - return grammarErrorAtPos(ts.getSourceFileOfNode(node), node.initializer.pos - 1, 1, ts.Diagnostics.A_rest_element_cannot_have_an_initializer); - } - } - // It is a SyntaxError if a VariableDeclaration or VariableDeclarationNoIn occurs within strict code - // and its Identifier is eval or arguments - return checkGrammarEvalOrArgumentsInStrictMode(node, node.name); - } - function checkGrammarVariableDeclaration(node) { - if (node.parent.parent.kind !== 190 /* ForInStatement */ && node.parent.parent.kind !== 191 /* ForOfStatement */) { - if (ts.isInAmbientContext(node)) { - if (node.initializer) { - // Error on equals token which immediate precedes the initializer - var equalsTokenLength = "=".length; - return grammarErrorAtPos(ts.getSourceFileOfNode(node), node.initializer.pos - equalsTokenLength, equalsTokenLength, ts.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts); - } - } - else if (!node.initializer) { - if (ts.isBindingPattern(node.name) && !ts.isBindingPattern(node.parent)) { - return grammarErrorOnNode(node, ts.Diagnostics.A_destructuring_declaration_must_have_an_initializer); - } - if (ts.isConst(node)) { - return grammarErrorOnNode(node, ts.Diagnostics.const_declarations_must_be_initialized); - } - } - } - var checkLetConstNames = languageVersion >= 2 /* ES6 */ && (ts.isLet(node) || ts.isConst(node)); - // 1. LexicalDeclaration : LetOrConst BindingList ; - // It is a Syntax Error if the BoundNames of BindingList contains "let". - // 2. ForDeclaration: ForDeclaration : LetOrConst ForBinding - // It is a Syntax Error if the BoundNames of ForDeclaration contains "let". - // It is a SyntaxError if a VariableDeclaration or VariableDeclarationNoIn occurs within strict code - // and its Identifier is eval or arguments - return (checkLetConstNames && checkGrammarNameInLetOrConstDeclarations(node.name)) || - checkGrammarEvalOrArgumentsInStrictMode(node, node.name); - } - function checkGrammarNameInLetOrConstDeclarations(name) { - if (name.kind === 65 /* Identifier */) { - if (name.text === "let") { - return grammarErrorOnNode(name, ts.Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations); - } - } - else { - var elements = name.elements; - for (var _i = 0; _i < elements.length; _i++) { - var element = elements[_i]; - if (element.kind !== 178 /* OmittedExpression */) { - checkGrammarNameInLetOrConstDeclarations(element.name); - } - } - } - } - function checkGrammarVariableDeclarationList(declarationList) { - var declarations = declarationList.declarations; - if (checkGrammarForDisallowedTrailingComma(declarationList.declarations)) { - return true; - } - if (!declarationList.declarations.length) { - return grammarErrorAtPos(ts.getSourceFileOfNode(declarationList), declarations.pos, declarations.end - declarations.pos, ts.Diagnostics.Variable_declaration_list_cannot_be_empty); - } - } - function allowLetAndConstDeclarations(parent) { - switch (parent.kind) { - case 186 /* IfStatement */: - case 187 /* DoStatement */: - case 188 /* WhileStatement */: - case 195 /* WithStatement */: - case 189 /* ForStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - return false; - case 197 /* LabeledStatement */: - return allowLetAndConstDeclarations(parent.parent); - } - return true; - } - function checkGrammarForDisallowedLetOrConstStatement(node) { - if (!allowLetAndConstDeclarations(node.parent)) { - if (ts.isLet(node.declarationList)) { - return grammarErrorOnNode(node, ts.Diagnostics.let_declarations_can_only_be_declared_inside_a_block); - } - else if (ts.isConst(node.declarationList)) { - return grammarErrorOnNode(node, ts.Diagnostics.const_declarations_can_only_be_declared_inside_a_block); - } - } - } - function isIntegerLiteral(expression) { - if (expression.kind === 170 /* PrefixUnaryExpression */) { - var unaryExpression = expression; - if (unaryExpression.operator === 33 /* PlusToken */ || unaryExpression.operator === 34 /* MinusToken */) { - expression = unaryExpression.operand; - } - } - if (expression.kind === 7 /* NumericLiteral */) { - // Allows for scientific notation since literalExpression.text was formed by - // coercing a number to a string. Sometimes this coercion can yield a string - // in scientific notation. - // We also don't need special logic for hex because a hex integer is converted - // to decimal when it is coerced. - return /^[0-9]+([eE]\+?[0-9]+)?$/.test(expression.text); - } - return false; - } - function checkGrammarEnumDeclaration(enumDecl) { - var enumIsConst = (enumDecl.flags & 8192 /* Const */) !== 0; - var hasError = false; - // skip checks below for const enums - they allow arbitrary initializers as long as they can be evaluated to constant expressions. - // since all values are known in compile time - it is not necessary to check that constant enum section precedes computed enum members. - if (!enumIsConst) { - var inConstantEnumMemberSection = true; - var inAmbientContext = ts.isInAmbientContext(enumDecl); - for (var _i = 0, _a = enumDecl.members; _i < _a.length; _i++) { - var node = _a[_i]; - // Do not use hasDynamicName here, because that returns false for well known symbols. - // We want to perform checkComputedPropertyName for all computed properties, including - // well known symbols. - if (node.name.kind === 129 /* ComputedPropertyName */) { - hasError = grammarErrorOnNode(node.name, ts.Diagnostics.Computed_property_names_are_not_allowed_in_enums); - } - else if (inAmbientContext) { - if (node.initializer && !isIntegerLiteral(node.initializer)) { - hasError = grammarErrorOnNode(node.name, ts.Diagnostics.Ambient_enum_elements_can_only_have_integer_literal_initializers) || hasError; - } - } - else if (node.initializer) { - inConstantEnumMemberSection = isIntegerLiteral(node.initializer); - } - else if (!inConstantEnumMemberSection) { - hasError = grammarErrorOnNode(node.name, ts.Diagnostics.Enum_member_must_have_initializer) || hasError; - } - } - } - return hasError; - } - function hasParseDiagnostics(sourceFile) { - return sourceFile.parseDiagnostics.length > 0; - } - function grammarErrorOnFirstToken(node, message, arg0, arg1, arg2) { - var sourceFile = ts.getSourceFileOfNode(node); - if (!hasParseDiagnostics(sourceFile)) { - var span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos); - diagnostics.add(ts.createFileDiagnostic(sourceFile, span.start, span.length, message, arg0, arg1, arg2)); - return true; - } - } - function grammarErrorAtPos(sourceFile, start, length, message, arg0, arg1, arg2) { - if (!hasParseDiagnostics(sourceFile)) { - diagnostics.add(ts.createFileDiagnostic(sourceFile, start, length, message, arg0, arg1, arg2)); - return true; - } - } - function grammarErrorOnNode(node, message, arg0, arg1, arg2) { - var sourceFile = ts.getSourceFileOfNode(node); - if (!hasParseDiagnostics(sourceFile)) { - diagnostics.add(ts.createDiagnosticForNode(node, message, arg0, arg1, arg2)); - return true; - } - } - function checkGrammarEvalOrArgumentsInStrictMode(contextNode, name) { - if (name && name.kind === 65 /* Identifier */) { - var identifier = name; - if (contextNode && (contextNode.parserContextFlags & 1 /* StrictMode */) && isEvalOrArgumentsIdentifier(identifier)) { - var nameText = ts.declarationNameToString(identifier); - // We check first if the name is inside class declaration or class expression; if so give explicit message - // otherwise report generic error message. - // reportGrammarErrorInClassDeclaration only return true if grammar error is successfully reported and false otherwise - var reportErrorInClassDeclaration = reportStrictModeGrammarErrorInClassDeclaration(identifier, ts.Diagnostics.Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode, nameText); - if (!reportErrorInClassDeclaration) { - return grammarErrorOnNode(identifier, ts.Diagnostics.Invalid_use_of_0_in_strict_mode, nameText); - } - return reportErrorInClassDeclaration; - } - } - } - function isEvalOrArgumentsIdentifier(node) { - return node.kind === 65 /* Identifier */ && - (node.text === "eval" || node.text === "arguments"); - } - function checkGrammarConstructorTypeParameters(node) { - if (node.typeParameters) { - return grammarErrorAtPos(ts.getSourceFileOfNode(node), node.typeParameters.pos, node.typeParameters.end - node.typeParameters.pos, ts.Diagnostics.Type_parameters_cannot_appear_on_a_constructor_declaration); - } - } - function checkGrammarConstructorTypeAnnotation(node) { - if (node.type) { - return grammarErrorOnNode(node.type, ts.Diagnostics.Type_annotation_cannot_appear_on_a_constructor_declaration); - } - } - function checkGrammarProperty(node) { - if (node.parent.kind === 204 /* ClassDeclaration */) { - if (checkGrammarForInvalidQuestionMark(node, node.questionToken, ts.Diagnostics.A_class_member_cannot_be_declared_optional) || - checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_class_property_declaration_must_directly_refer_to_a_built_in_symbol)) { - return true; - } - } - else if (node.parent.kind === 205 /* InterfaceDeclaration */) { - if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol)) { - return true; - } - } - else if (node.parent.kind === 148 /* TypeLiteral */) { - if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol)) { - return true; - } - } - if (ts.isInAmbientContext(node) && node.initializer) { - return grammarErrorOnFirstToken(node.initializer, ts.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts); - } - } - function checkGrammarTopLevelElementForRequiredDeclareModifier(node) { - // A declare modifier is required for any top level .d.ts declaration except export=, export default, - // interfaces and imports categories: - // - // DeclarationElement: - // ExportAssignment - // export_opt InterfaceDeclaration - // export_opt ImportDeclaration - // export_opt ExternalImportDeclaration - // export_opt AmbientDeclaration - // - if (node.kind === 205 /* InterfaceDeclaration */ || - node.kind === 212 /* ImportDeclaration */ || - node.kind === 211 /* ImportEqualsDeclaration */ || - node.kind === 218 /* ExportDeclaration */ || - node.kind === 217 /* ExportAssignment */ || - (node.flags & 2 /* Ambient */) || - (node.flags & (1 /* Export */ | 256 /* Default */))) { - return false; - } - return grammarErrorOnFirstToken(node, ts.Diagnostics.A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file); - } - function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) { - for (var _i = 0, _a = file.statements; _i < _a.length; _i++) { - var decl = _a[_i]; - if (ts.isDeclaration(decl) || decl.kind === 183 /* VariableStatement */) { - if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { - return true; - } - } - } - } - function checkGrammarSourceFile(node) { - return ts.isInAmbientContext(node) && checkGrammarTopLevelElementsForRequiredDeclareModifier(node); - } - function checkGrammarStatementInAmbientContext(node) { - if (ts.isInAmbientContext(node)) { - // An accessors is already reported about the ambient context - if (isAccessor(node.parent.kind)) { - return getNodeLinks(node).hasReportedStatementInAmbientContext = true; - } - // Find containing block which is either Block, ModuleBlock, SourceFile - var links = getNodeLinks(node); - if (!links.hasReportedStatementInAmbientContext && ts.isFunctionLike(node.parent)) { - return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); - } - // We are either parented by another statement, or some sort of block. - // If we're in a block, we only want to really report an error once - // to prevent noisyness. So use a bit on the block to indicate if - // this has already been reported, and don't report if it has. - // - if (node.parent.kind === 182 /* Block */ || node.parent.kind === 209 /* ModuleBlock */ || node.parent.kind === 230 /* SourceFile */) { - var links_1 = getNodeLinks(node.parent); - // Check if the containing block ever report this error - if (!links_1.hasReportedStatementInAmbientContext) { - return links_1.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts); - } - } - else { - } - } - } - function checkGrammarNumericLiteral(node) { - // Grammar checking - if (node.flags & 16384 /* OctalLiteral */) { - if (node.parserContextFlags & 1 /* StrictMode */) { - return grammarErrorOnNode(node, ts.Diagnostics.Octal_literals_are_not_allowed_in_strict_mode); - } - else if (languageVersion >= 1 /* ES5 */) { - return grammarErrorOnNode(node, ts.Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher); - } - } - } - function grammarErrorAfterFirstToken(node, message, arg0, arg1, arg2) { - var sourceFile = ts.getSourceFileOfNode(node); - if (!hasParseDiagnostics(sourceFile)) { - var span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos); - diagnostics.add(ts.createFileDiagnostic(sourceFile, ts.textSpanEnd(span), 0, message, arg0, arg1, arg2)); - return true; - } - } - initializeTypeChecker(); - return checker; - } - ts.createTypeChecker = createTypeChecker; -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - function getDeclarationDiagnostics(host, resolver, targetSourceFile) { - var diagnostics = []; - var jsFilePath = ts.getOwnEmitOutputFilePath(targetSourceFile, host, ".js"); - emitDeclarations(host, resolver, diagnostics, jsFilePath, targetSourceFile); - return diagnostics; - } - ts.getDeclarationDiagnostics = getDeclarationDiagnostics; - function emitDeclarations(host, resolver, diagnostics, jsFilePath, root) { - var newLine = host.getNewLine(); - var compilerOptions = host.getCompilerOptions(); - var languageVersion = compilerOptions.target || 0 /* ES3 */; - var write; - var writeLine; - var increaseIndent; - var decreaseIndent; - var writeTextOfNode; - var writer = createAndSetNewTextWriterWithSymbolWriter(); - var enclosingDeclaration; - var currentSourceFile; - var reportedDeclarationError = false; - var emitJsDocComments = compilerOptions.removeComments ? function (declaration) { } : writeJsDocComments; - var emit = compilerOptions.stripInternal ? stripInternal : emitNode; - var moduleElementDeclarationEmitInfo = []; - var asynchronousSubModuleDeclarationEmitInfo; - // Contains the reference paths that needs to go in the declaration file. - // Collecting this separately because reference paths need to be first thing in the declaration file - // and we could be collecting these paths from multiple files into single one with --out option - var referencePathsOutput = ""; - if (root) { - // Emitting just a single file, so emit references in this file only - if (!compilerOptions.noResolve) { - var addedGlobalFileReference = false; - ts.forEach(root.referencedFiles, function (fileReference) { - var referencedFile = ts.tryResolveScriptReference(host, root, fileReference); - // All the references that are not going to be part of same file - if (referencedFile && ((referencedFile.flags & 2048 /* DeclarationFile */) || - ts.shouldEmitToOwnFile(referencedFile, compilerOptions) || - !addedGlobalFileReference)) { - writeReferencePath(referencedFile); - if (!ts.isExternalModuleOrDeclarationFile(referencedFile)) { - addedGlobalFileReference = true; - } - } - }); - } - emitSourceFile(root); - // create asynchronous output for the importDeclarations - if (moduleElementDeclarationEmitInfo.length) { - var oldWriter = writer; - ts.forEach(moduleElementDeclarationEmitInfo, function (aliasEmitInfo) { - if (aliasEmitInfo.isVisible) { - ts.Debug.assert(aliasEmitInfo.node.kind === 212 /* ImportDeclaration */); - createAndSetNewTextWriterWithSymbolWriter(); - ts.Debug.assert(aliasEmitInfo.indent === 0); - writeImportDeclaration(aliasEmitInfo.node); - aliasEmitInfo.asynchronousOutput = writer.getText(); - } - }); - setWriter(oldWriter); - } - } - else { - // Emit references corresponding to this file - var emittedReferencedFiles = []; - ts.forEach(host.getSourceFiles(), function (sourceFile) { - if (!ts.isExternalModuleOrDeclarationFile(sourceFile)) { - // Check what references need to be added - if (!compilerOptions.noResolve) { - ts.forEach(sourceFile.referencedFiles, function (fileReference) { - var referencedFile = ts.tryResolveScriptReference(host, sourceFile, fileReference); - // If the reference file is a declaration file or an external module, emit that reference - if (referencedFile && (ts.isExternalModuleOrDeclarationFile(referencedFile) && - !ts.contains(emittedReferencedFiles, referencedFile))) { - writeReferencePath(referencedFile); - emittedReferencedFiles.push(referencedFile); - } - }); - } - emitSourceFile(sourceFile); - } - }); - } - return { - reportedDeclarationError: reportedDeclarationError, - moduleElementDeclarationEmitInfo: moduleElementDeclarationEmitInfo, - synchronousDeclarationOutput: writer.getText(), - referencePathsOutput: referencePathsOutput - }; - function hasInternalAnnotation(range) { - var text = currentSourceFile.text; - var comment = text.substring(range.pos, range.end); - return comment.indexOf("@internal") >= 0; - } - function stripInternal(node) { - if (node) { - var leadingCommentRanges = ts.getLeadingCommentRanges(currentSourceFile.text, node.pos); - if (ts.forEach(leadingCommentRanges, hasInternalAnnotation)) { - return; - } - emitNode(node); - } - } - function createAndSetNewTextWriterWithSymbolWriter() { - var writer = ts.createTextWriter(newLine); - writer.trackSymbol = trackSymbol; - writer.writeKeyword = writer.write; - writer.writeOperator = writer.write; - writer.writePunctuation = writer.write; - writer.writeSpace = writer.write; - writer.writeStringLiteral = writer.writeLiteral; - writer.writeParameter = writer.write; - writer.writeSymbol = writer.write; - setWriter(writer); - return writer; - } - function setWriter(newWriter) { - writer = newWriter; - write = newWriter.write; - writeTextOfNode = newWriter.writeTextOfNode; - writeLine = newWriter.writeLine; - increaseIndent = newWriter.increaseIndent; - decreaseIndent = newWriter.decreaseIndent; - } - function writeAsynchronousModuleElements(nodes) { - var oldWriter = writer; - ts.forEach(nodes, function (declaration) { - var nodeToCheck; - if (declaration.kind === 201 /* VariableDeclaration */) { - nodeToCheck = declaration.parent.parent; - } - else if (declaration.kind === 215 /* NamedImports */ || declaration.kind === 216 /* ImportSpecifier */ || declaration.kind === 213 /* ImportClause */) { - ts.Debug.fail("We should be getting ImportDeclaration instead to write"); - } - else { - nodeToCheck = declaration; - } - var moduleElementEmitInfo = ts.forEach(moduleElementDeclarationEmitInfo, function (declEmitInfo) { return declEmitInfo.node === nodeToCheck ? declEmitInfo : undefined; }); - if (!moduleElementEmitInfo && asynchronousSubModuleDeclarationEmitInfo) { - moduleElementEmitInfo = ts.forEach(asynchronousSubModuleDeclarationEmitInfo, function (declEmitInfo) { return declEmitInfo.node === nodeToCheck ? declEmitInfo : undefined; }); - } - // If the alias was marked as not visible when we saw its declaration, we would have saved the aliasEmitInfo, but if we haven't yet visited the alias declaration - // then we don't need to write it at this point. We will write it when we actually see its declaration - // Eg. - // export function bar(a: foo.Foo) { } - // import foo = require("foo"); - // Writing of function bar would mark alias declaration foo as visible but we haven't yet visited that declaration so do nothing, - // we would write alias foo declaration when we visit it since it would now be marked as visible - if (moduleElementEmitInfo) { - if (moduleElementEmitInfo.node.kind === 212 /* ImportDeclaration */) { - // we have to create asynchronous output only after we have collected complete information - // because it is possible to enable multiple bindings as asynchronously visible - moduleElementEmitInfo.isVisible = true; - } - else { - createAndSetNewTextWriterWithSymbolWriter(); - for (var declarationIndent = moduleElementEmitInfo.indent; declarationIndent; declarationIndent--) { - increaseIndent(); - } - if (nodeToCheck.kind === 208 /* ModuleDeclaration */) { - ts.Debug.assert(asynchronousSubModuleDeclarationEmitInfo === undefined); - asynchronousSubModuleDeclarationEmitInfo = []; - } - writeModuleElement(nodeToCheck); - if (nodeToCheck.kind === 208 /* ModuleDeclaration */) { - moduleElementEmitInfo.subModuleElementDeclarationEmitInfo = asynchronousSubModuleDeclarationEmitInfo; - asynchronousSubModuleDeclarationEmitInfo = undefined; - } - moduleElementEmitInfo.asynchronousOutput = writer.getText(); - } - } - }); - setWriter(oldWriter); - } - function handleSymbolAccessibilityError(symbolAccesibilityResult) { - if (symbolAccesibilityResult.accessibility === 0 /* Accessible */) { - // write the aliases - if (symbolAccesibilityResult && symbolAccesibilityResult.aliasesToMakeVisible) { - writeAsynchronousModuleElements(symbolAccesibilityResult.aliasesToMakeVisible); - } - } - else { - // Report error - reportedDeclarationError = true; - var errorInfo = writer.getSymbolAccessibilityDiagnostic(symbolAccesibilityResult); - if (errorInfo) { - if (errorInfo.typeName) { - diagnostics.push(ts.createDiagnosticForNode(symbolAccesibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, errorInfo.typeName), symbolAccesibilityResult.errorSymbolName, symbolAccesibilityResult.errorModuleName)); - } - else { - diagnostics.push(ts.createDiagnosticForNode(symbolAccesibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, symbolAccesibilityResult.errorSymbolName, symbolAccesibilityResult.errorModuleName)); - } - } - } - } - function trackSymbol(symbol, enclosingDeclaration, meaning) { - handleSymbolAccessibilityError(resolver.isSymbolAccessible(symbol, enclosingDeclaration, meaning)); - } - function writeTypeOfDeclaration(declaration, type, getSymbolAccessibilityDiagnostic) { - writer.getSymbolAccessibilityDiagnostic = getSymbolAccessibilityDiagnostic; - write(": "); - if (type) { - // Write the type - emitType(type); - } - else { - resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, 2 /* UseTypeOfFunction */, writer); - } - } - function writeReturnTypeAtSignature(signature, getSymbolAccessibilityDiagnostic) { - writer.getSymbolAccessibilityDiagnostic = getSymbolAccessibilityDiagnostic; - write(": "); - if (signature.type) { - // Write the type - emitType(signature.type); - } - else { - resolver.writeReturnTypeOfSignatureDeclaration(signature, enclosingDeclaration, 2 /* UseTypeOfFunction */, writer); - } - } - function emitLines(nodes) { - for (var _i = 0; _i < nodes.length; _i++) { - var node = nodes[_i]; - emit(node); - } - } - function emitSeparatedList(nodes, separator, eachNodeEmitFn, canEmitFn) { - var currentWriterPos = writer.getTextPos(); - for (var _i = 0; _i < nodes.length; _i++) { - var node = nodes[_i]; - if (!canEmitFn || canEmitFn(node)) { - if (currentWriterPos !== writer.getTextPos()) { - write(separator); - } - currentWriterPos = writer.getTextPos(); - eachNodeEmitFn(node); - } - } - } - function emitCommaList(nodes, eachNodeEmitFn, canEmitFn) { - emitSeparatedList(nodes, ", ", eachNodeEmitFn, canEmitFn); - } - function writeJsDocComments(declaration) { - if (declaration) { - var jsDocComments = ts.getJsDocComments(declaration, currentSourceFile); - ts.emitNewLineBeforeLeadingComments(currentSourceFile, writer, declaration, jsDocComments); - // jsDoc comments are emitted at /*leading comment1 */space/*leading comment*/space - ts.emitComments(currentSourceFile, writer, jsDocComments, true, newLine, ts.writeCommentRange); - } - } - function emitTypeWithNewGetSymbolAccessibilityDiagnostic(type, getSymbolAccessibilityDiagnostic) { - writer.getSymbolAccessibilityDiagnostic = getSymbolAccessibilityDiagnostic; - emitType(type); - } - function emitType(type) { - switch (type.kind) { - case 112 /* AnyKeyword */: - case 123 /* StringKeyword */: - case 121 /* NumberKeyword */: - case 113 /* BooleanKeyword */: - case 124 /* SymbolKeyword */: - case 99 /* VoidKeyword */: - case 8 /* StringLiteral */: - return writeTextOfNode(currentSourceFile, type); - case 179 /* ExpressionWithTypeArguments */: - return emitExpressionWithTypeArguments(type); - case 144 /* TypeReference */: - return emitTypeReference(type); - case 147 /* TypeQuery */: - return emitTypeQuery(type); - case 149 /* ArrayType */: - return emitArrayType(type); - case 150 /* TupleType */: - return emitTupleType(type); - case 151 /* UnionType */: - return emitUnionType(type); - case 152 /* ParenthesizedType */: - return emitParenType(type); - case 145 /* FunctionType */: - case 146 /* ConstructorType */: - return emitSignatureDeclarationWithJsDocComments(type); - case 148 /* TypeLiteral */: - return emitTypeLiteral(type); - case 65 /* Identifier */: - return emitEntityName(type); - case 128 /* QualifiedName */: - return emitEntityName(type); - } - function emitEntityName(entityName) { - var visibilityResult = resolver.isEntityNameVisible(entityName, - // Aliases can be written asynchronously so use correct enclosing declaration - entityName.parent.kind === 211 /* ImportEqualsDeclaration */ ? entityName.parent : enclosingDeclaration); - handleSymbolAccessibilityError(visibilityResult); - writeEntityName(entityName); - function writeEntityName(entityName) { - if (entityName.kind === 65 /* Identifier */) { - writeTextOfNode(currentSourceFile, entityName); - } - else { - var left = entityName.kind === 128 /* QualifiedName */ ? entityName.left : entityName.expression; - var right = entityName.kind === 128 /* QualifiedName */ ? entityName.right : entityName.name; - writeEntityName(left); - write("."); - writeTextOfNode(currentSourceFile, right); - } - } - } - function emitExpressionWithTypeArguments(node) { - if (ts.isSupportedExpressionWithTypeArguments(node)) { - ts.Debug.assert(node.expression.kind === 65 /* Identifier */ || node.expression.kind === 158 /* PropertyAccessExpression */); - emitEntityName(node.expression); - if (node.typeArguments) { - write("<"); - emitCommaList(node.typeArguments, emitType); - write(">"); - } - } - } - function emitTypeReference(type) { - emitEntityName(type.typeName); - if (type.typeArguments) { - write("<"); - emitCommaList(type.typeArguments, emitType); - write(">"); - } - } - function emitTypeQuery(type) { - write("typeof "); - emitEntityName(type.exprName); - } - function emitArrayType(type) { - emitType(type.elementType); - write("[]"); - } - function emitTupleType(type) { - write("["); - emitCommaList(type.elementTypes, emitType); - write("]"); - } - function emitUnionType(type) { - emitSeparatedList(type.types, " | ", emitType); - } - function emitParenType(type) { - write("("); - emitType(type.type); - write(")"); - } - function emitTypeLiteral(type) { - write("{"); - if (type.members.length) { - writeLine(); - increaseIndent(); - // write members - emitLines(type.members); - decreaseIndent(); - } - write("}"); - } - } - function emitSourceFile(node) { - currentSourceFile = node; - enclosingDeclaration = node; - emitLines(node.statements); - } - // Return a temp variable name to be used in `export default` statements. - // The temp name will be of the form _default_counter. - // Note that export default is only allowed at most once in a module, so we - // do not need to keep track of created temp names. - function getExportDefaultTempVariableName() { - var baseName = "_default"; - if (!ts.hasProperty(currentSourceFile.identifiers, baseName)) { - return baseName; - } - var count = 0; - while (true) { - var name_18 = baseName + "_" + (++count); - if (!ts.hasProperty(currentSourceFile.identifiers, name_18)) { - return name_18; - } - } - } - function emitExportAssignment(node) { - if (node.expression.kind === 65 /* Identifier */) { - write(node.isExportEquals ? "export = " : "export default "); - writeTextOfNode(currentSourceFile, node.expression); - } - else { - // Expression - var tempVarName = getExportDefaultTempVariableName(); - write("declare var "); - write(tempVarName); - write(": "); - writer.getSymbolAccessibilityDiagnostic = getDefaultExportAccessibilityDiagnostic; - resolver.writeTypeOfExpression(node.expression, enclosingDeclaration, 2 /* UseTypeOfFunction */, writer); - write(";"); - writeLine(); - write(node.isExportEquals ? "export = " : "export default "); - write(tempVarName); - } - write(";"); - writeLine(); - // Make all the declarations visible for the export name - if (node.expression.kind === 65 /* Identifier */) { - var nodes = resolver.collectLinkedAliases(node.expression); - // write each of these declarations asynchronously - writeAsynchronousModuleElements(nodes); - } - function getDefaultExportAccessibilityDiagnostic(diagnostic) { - return { - diagnosticMessage: ts.Diagnostics.Default_export_of_the_module_has_or_is_using_private_name_0, - errorNode: node - }; - } - } - function isModuleElementVisible(node) { - return resolver.isDeclarationVisible(node); - } - function emitModuleElement(node, isModuleElementVisible) { - if (isModuleElementVisible) { - writeModuleElement(node); - } - else if (node.kind === 211 /* ImportEqualsDeclaration */ || - (node.parent.kind === 230 /* SourceFile */ && ts.isExternalModule(currentSourceFile))) { - var isVisible; - if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 230 /* SourceFile */) { - // Import declaration of another module that is visited async so lets put it in right spot - asynchronousSubModuleDeclarationEmitInfo.push({ - node: node, - outputPos: writer.getTextPos(), - indent: writer.getIndent(), - isVisible: isVisible - }); - } - else { - if (node.kind === 212 /* ImportDeclaration */) { - var importDeclaration = node; - if (importDeclaration.importClause) { - isVisible = (importDeclaration.importClause.name && resolver.isDeclarationVisible(importDeclaration.importClause)) || - isVisibleNamedBinding(importDeclaration.importClause.namedBindings); - } - } - moduleElementDeclarationEmitInfo.push({ - node: node, - outputPos: writer.getTextPos(), - indent: writer.getIndent(), - isVisible: isVisible - }); - } - } - } - function writeModuleElement(node) { - switch (node.kind) { - case 203 /* FunctionDeclaration */: - return writeFunctionDeclaration(node); - case 183 /* VariableStatement */: - return writeVariableStatement(node); - case 205 /* InterfaceDeclaration */: - return writeInterfaceDeclaration(node); - case 204 /* ClassDeclaration */: - return writeClassDeclaration(node); - case 206 /* TypeAliasDeclaration */: - return writeTypeAliasDeclaration(node); - case 207 /* EnumDeclaration */: - return writeEnumDeclaration(node); - case 208 /* ModuleDeclaration */: - return writeModuleDeclaration(node); - case 211 /* ImportEqualsDeclaration */: - return writeImportEqualsDeclaration(node); - case 212 /* ImportDeclaration */: - return writeImportDeclaration(node); - default: - ts.Debug.fail("Unknown symbol kind"); - } - } - function emitModuleElementDeclarationFlags(node) { - // If the node is parented in the current source file we need to emit export declare or just export - if (node.parent === currentSourceFile) { - // If the node is exported - if (node.flags & 1 /* Export */) { - write("export "); - } - if (node.flags & 256 /* Default */) { - write("default "); - } - else if (node.kind !== 205 /* InterfaceDeclaration */) { - write("declare "); - } - } - } - function emitClassMemberDeclarationFlags(node) { - if (node.flags & 32 /* Private */) { - write("private "); - } - else if (node.flags & 64 /* Protected */) { - write("protected "); - } - if (node.flags & 128 /* Static */) { - write("static "); - } - } - function writeImportEqualsDeclaration(node) { - // note usage of writer. methods instead of aliases created, just to make sure we are using - // correct writer especially to handle asynchronous alias writing - emitJsDocComments(node); - if (node.flags & 1 /* Export */) { - write("export "); - } - write("import "); - writeTextOfNode(currentSourceFile, node.name); - write(" = "); - if (ts.isInternalModuleImportEqualsDeclaration(node)) { - emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.moduleReference, getImportEntityNameVisibilityError); - write(";"); - } - else { - write("require("); - writeTextOfNode(currentSourceFile, ts.getExternalModuleImportEqualsDeclarationExpression(node)); - write(");"); - } - writer.writeLine(); - function getImportEntityNameVisibilityError(symbolAccesibilityResult) { - return { - diagnosticMessage: ts.Diagnostics.Import_declaration_0_is_using_private_name_1, - errorNode: node, - typeName: node.name - }; - } - } - function isVisibleNamedBinding(namedBindings) { - if (namedBindings) { - if (namedBindings.kind === 214 /* NamespaceImport */) { - return resolver.isDeclarationVisible(namedBindings); - } - else { - return ts.forEach(namedBindings.elements, function (namedImport) { return resolver.isDeclarationVisible(namedImport); }); - } - } - } - function writeImportDeclaration(node) { - if (!node.importClause && !(node.flags & 1 /* Export */)) { - // do not write non-exported import declarations that don't have import clauses - return; - } - emitJsDocComments(node); - if (node.flags & 1 /* Export */) { - write("export "); - } - write("import "); - if (node.importClause) { - var currentWriterPos = writer.getTextPos(); - if (node.importClause.name && resolver.isDeclarationVisible(node.importClause)) { - writeTextOfNode(currentSourceFile, node.importClause.name); - } - if (node.importClause.namedBindings && isVisibleNamedBinding(node.importClause.namedBindings)) { - if (currentWriterPos !== writer.getTextPos()) { - // If the default binding was emitted, write the separated - write(", "); - } - if (node.importClause.namedBindings.kind === 214 /* NamespaceImport */) { - write("* as "); - writeTextOfNode(currentSourceFile, node.importClause.namedBindings.name); - } - else { - write("{ "); - emitCommaList(node.importClause.namedBindings.elements, emitImportOrExportSpecifier, resolver.isDeclarationVisible); - write(" }"); - } - } - write(" from "); - } - writeTextOfNode(currentSourceFile, node.moduleSpecifier); - write(";"); - writer.writeLine(); - } - function emitImportOrExportSpecifier(node) { - if (node.propertyName) { - writeTextOfNode(currentSourceFile, node.propertyName); - write(" as "); - } - writeTextOfNode(currentSourceFile, node.name); - } - function emitExportSpecifier(node) { - emitImportOrExportSpecifier(node); - // Make all the declarations visible for the export name - var nodes = resolver.collectLinkedAliases(node.propertyName || node.name); - // write each of these declarations asynchronously - writeAsynchronousModuleElements(nodes); - } - function emitExportDeclaration(node) { - emitJsDocComments(node); - write("export "); - if (node.exportClause) { - write("{ "); - emitCommaList(node.exportClause.elements, emitExportSpecifier); - write(" }"); - } - else { - write("*"); - } - if (node.moduleSpecifier) { - write(" from "); - writeTextOfNode(currentSourceFile, node.moduleSpecifier); - } - write(";"); - writer.writeLine(); - } - function writeModuleDeclaration(node) { - emitJsDocComments(node); - emitModuleElementDeclarationFlags(node); - write("module "); - writeTextOfNode(currentSourceFile, node.name); - while (node.body.kind !== 209 /* ModuleBlock */) { - node = node.body; - write("."); - writeTextOfNode(currentSourceFile, node.name); - } - var prevEnclosingDeclaration = enclosingDeclaration; - enclosingDeclaration = node; - write(" {"); - writeLine(); - increaseIndent(); - emitLines(node.body.statements); - decreaseIndent(); - write("}"); - writeLine(); - enclosingDeclaration = prevEnclosingDeclaration; - } - function writeTypeAliasDeclaration(node) { - emitJsDocComments(node); - emitModuleElementDeclarationFlags(node); - write("type "); - writeTextOfNode(currentSourceFile, node.name); - write(" = "); - emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.type, getTypeAliasDeclarationVisibilityError); - write(";"); - writeLine(); - function getTypeAliasDeclarationVisibilityError(symbolAccesibilityResult) { - return { - diagnosticMessage: ts.Diagnostics.Exported_type_alias_0_has_or_is_using_private_name_1, - errorNode: node.type, - typeName: node.name - }; - } - } - function writeEnumDeclaration(node) { - emitJsDocComments(node); - emitModuleElementDeclarationFlags(node); - if (ts.isConst(node)) { - write("const "); - } - write("enum "); - writeTextOfNode(currentSourceFile, node.name); - write(" {"); - writeLine(); - increaseIndent(); - emitLines(node.members); - decreaseIndent(); - write("}"); - writeLine(); - } - function emitEnumMemberDeclaration(node) { - emitJsDocComments(node); - writeTextOfNode(currentSourceFile, node.name); - var enumMemberValue = resolver.getConstantValue(node); - if (enumMemberValue !== undefined) { - write(" = "); - write(enumMemberValue.toString()); - } - write(","); - writeLine(); - } - function isPrivateMethodTypeParameter(node) { - return node.parent.kind === 136 /* MethodDeclaration */ && (node.parent.flags & 32 /* Private */); - } - function emitTypeParameters(typeParameters) { - function emitTypeParameter(node) { - increaseIndent(); - emitJsDocComments(node); - decreaseIndent(); - writeTextOfNode(currentSourceFile, node.name); - // If there is constraint present and this is not a type parameter of the private method emit the constraint - if (node.constraint && !isPrivateMethodTypeParameter(node)) { - write(" extends "); - if (node.parent.kind === 145 /* FunctionType */ || - node.parent.kind === 146 /* ConstructorType */ || - (node.parent.parent && node.parent.parent.kind === 148 /* TypeLiteral */)) { - ts.Debug.assert(node.parent.kind === 136 /* MethodDeclaration */ || - node.parent.kind === 135 /* MethodSignature */ || - node.parent.kind === 145 /* FunctionType */ || - node.parent.kind === 146 /* ConstructorType */ || - node.parent.kind === 140 /* CallSignature */ || - node.parent.kind === 141 /* ConstructSignature */); - emitType(node.constraint); - } - else { - emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.constraint, getTypeParameterConstraintVisibilityError); - } - } - function getTypeParameterConstraintVisibilityError(symbolAccesibilityResult) { - // Type parameter constraints are named by user so we should always be able to name it - var diagnosticMessage; - switch (node.parent.kind) { - case 204 /* ClassDeclaration */: - diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; - break; - case 205 /* InterfaceDeclaration */: - diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; - break; - case 141 /* ConstructSignature */: - diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; - break; - case 140 /* CallSignature */: - diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; - break; - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - if (node.parent.flags & 128 /* Static */) { - diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; - } - else if (node.parent.parent.kind === 204 /* ClassDeclaration */) { - diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; - } - else { - diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; - } - break; - case 203 /* FunctionDeclaration */: - diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; - break; - default: - ts.Debug.fail("This is unknown parent for type parameter: " + node.parent.kind); - } - return { - diagnosticMessage: diagnosticMessage, - errorNode: node, - typeName: node.name - }; - } - } - if (typeParameters) { - write("<"); - emitCommaList(typeParameters, emitTypeParameter); - write(">"); - } - } - function emitHeritageClause(typeReferences, isImplementsList) { - if (typeReferences) { - write(isImplementsList ? " implements " : " extends "); - emitCommaList(typeReferences, emitTypeOfTypeReference); - } - function emitTypeOfTypeReference(node) { - if (ts.isSupportedExpressionWithTypeArguments(node)) { - emitTypeWithNewGetSymbolAccessibilityDiagnostic(node, getHeritageClauseVisibilityError); - } - function getHeritageClauseVisibilityError(symbolAccesibilityResult) { - var diagnosticMessage; - // Heritage clause is written by user so it can always be named - if (node.parent.parent.kind === 204 /* ClassDeclaration */) { - // Class or Interface implemented/extended is inaccessible - diagnosticMessage = isImplementsList ? - ts.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : - ts.Diagnostics.Extends_clause_of_exported_class_0_has_or_is_using_private_name_1; - } - else { - // interface is inaccessible - diagnosticMessage = ts.Diagnostics.Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1; - } - return { - diagnosticMessage: diagnosticMessage, - errorNode: node, - typeName: node.parent.parent.name - }; - } - } - } - function writeClassDeclaration(node) { - function emitParameterProperties(constructorDeclaration) { - if (constructorDeclaration) { - ts.forEach(constructorDeclaration.parameters, function (param) { - if (param.flags & 112 /* AccessibilityModifier */) { - emitPropertyDeclaration(param); - } - }); - } - } - emitJsDocComments(node); - emitModuleElementDeclarationFlags(node); - write("class "); - writeTextOfNode(currentSourceFile, node.name); - var prevEnclosingDeclaration = enclosingDeclaration; - enclosingDeclaration = node; - emitTypeParameters(node.typeParameters); - var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node); - if (baseTypeNode) { - emitHeritageClause([baseTypeNode], false); - } - emitHeritageClause(ts.getClassImplementsHeritageClauseElements(node), true); - write(" {"); - writeLine(); - increaseIndent(); - emitParameterProperties(ts.getFirstConstructorWithBody(node)); - emitLines(node.members); - decreaseIndent(); - write("}"); - writeLine(); - enclosingDeclaration = prevEnclosingDeclaration; - } - function writeInterfaceDeclaration(node) { - emitJsDocComments(node); - emitModuleElementDeclarationFlags(node); - write("interface "); - writeTextOfNode(currentSourceFile, node.name); - var prevEnclosingDeclaration = enclosingDeclaration; - enclosingDeclaration = node; - emitTypeParameters(node.typeParameters); - emitHeritageClause(ts.getInterfaceBaseTypeNodes(node), false); - write(" {"); - writeLine(); - increaseIndent(); - emitLines(node.members); - decreaseIndent(); - write("}"); - writeLine(); - enclosingDeclaration = prevEnclosingDeclaration; - } - function emitPropertyDeclaration(node) { - if (ts.hasDynamicName(node)) { - return; - } - emitJsDocComments(node); - emitClassMemberDeclarationFlags(node); - emitVariableDeclaration(node); - write(";"); - writeLine(); - } - function emitVariableDeclaration(node) { - // If we are emitting property it isn't moduleElement and hence we already know it needs to be emitted - // so there is no check needed to see if declaration is visible - if (node.kind !== 201 /* VariableDeclaration */ || resolver.isDeclarationVisible(node)) { - if (ts.isBindingPattern(node.name)) { - emitBindingPattern(node.name); - } - else { - // If this node is a computed name, it can only be a symbol, because we've already skipped - // it if it's not a well known symbol. In that case, the text of the name will be exactly - // what we want, namely the name expression enclosed in brackets. - writeTextOfNode(currentSourceFile, node.name); - // If optional property emit ? - if ((node.kind === 134 /* PropertyDeclaration */ || node.kind === 133 /* PropertySignature */) && ts.hasQuestionToken(node)) { - write("?"); - } - if ((node.kind === 134 /* PropertyDeclaration */ || node.kind === 133 /* PropertySignature */) && node.parent.kind === 148 /* TypeLiteral */) { - emitTypeOfVariableDeclarationFromTypeLiteral(node); - } - else if (!(node.flags & 32 /* Private */)) { - writeTypeOfDeclaration(node, node.type, getVariableDeclarationTypeVisibilityError); - } - } - } - function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult) { - if (node.kind === 201 /* VariableDeclaration */) { - return symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? - ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : - ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : - ts.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; - } - else if (node.kind === 134 /* PropertyDeclaration */ || node.kind === 133 /* PropertySignature */) { - // TODO(jfreeman): Deal with computed properties in error reporting. - if (node.flags & 128 /* Static */) { - return symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? - ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : - ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : - ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; - } - else if (node.parent.kind === 204 /* ClassDeclaration */) { - return symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? - ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : - ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : - ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; - } - else { - // Interfaces cannot have types that cannot be named - return symbolAccesibilityResult.errorModuleName ? - ts.Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : - ts.Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; - } - } - } - function getVariableDeclarationTypeVisibilityError(symbolAccesibilityResult) { - var diagnosticMessage = getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult); - return diagnosticMessage !== undefined ? { - diagnosticMessage: diagnosticMessage, - errorNode: node, - typeName: node.name - } : undefined; - } - function emitBindingPattern(bindingPattern) { - // Only select non-omitted expression from the bindingPattern's elements. - // We have to do this to avoid emitting trailing commas. - // For example: - // original: var [, c,,] = [ 2,3,4] - // emitted: declare var c: number; // instead of declare var c:number, ; - var elements = []; - for (var _i = 0, _a = bindingPattern.elements; _i < _a.length; _i++) { - var element = _a[_i]; - if (element.kind !== 178 /* OmittedExpression */) { - elements.push(element); - } - } - emitCommaList(elements, emitBindingElement); - } - function emitBindingElement(bindingElement) { - function getBindingElementTypeVisibilityError(symbolAccesibilityResult) { - var diagnosticMessage = getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult); - return diagnosticMessage !== undefined ? { - diagnosticMessage: diagnosticMessage, - errorNode: bindingElement, - typeName: bindingElement.name - } : undefined; - } - if (bindingElement.name) { - if (ts.isBindingPattern(bindingElement.name)) { - emitBindingPattern(bindingElement.name); - } - else { - writeTextOfNode(currentSourceFile, bindingElement.name); - writeTypeOfDeclaration(bindingElement, undefined, getBindingElementTypeVisibilityError); - } - } - } - } - function emitTypeOfVariableDeclarationFromTypeLiteral(node) { - // if this is property of type literal, - // or is parameter of method/call/construct/index signature of type literal - // emit only if type is specified - if (node.type) { - write(": "); - emitType(node.type); - } - } - function isVariableStatementVisible(node) { - return ts.forEach(node.declarationList.declarations, function (varDeclaration) { return resolver.isDeclarationVisible(varDeclaration); }); - } - function writeVariableStatement(node) { - emitJsDocComments(node); - emitModuleElementDeclarationFlags(node); - if (ts.isLet(node.declarationList)) { - write("let "); - } - else if (ts.isConst(node.declarationList)) { - write("const "); - } - else { - write("var "); - } - emitCommaList(node.declarationList.declarations, emitVariableDeclaration, resolver.isDeclarationVisible); - write(";"); - writeLine(); - } - function emitAccessorDeclaration(node) { - if (ts.hasDynamicName(node)) { - return; - } - var accessors = ts.getAllAccessorDeclarations(node.parent.members, node); - var accessorWithTypeAnnotation; - if (node === accessors.firstAccessor) { - emitJsDocComments(accessors.getAccessor); - emitJsDocComments(accessors.setAccessor); - emitClassMemberDeclarationFlags(node); - writeTextOfNode(currentSourceFile, node.name); - if (!(node.flags & 32 /* Private */)) { - accessorWithTypeAnnotation = node; - var type = getTypeAnnotationFromAccessor(node); - if (!type) { - // couldn't get type for the first accessor, try the another one - var anotherAccessor = node.kind === 138 /* GetAccessor */ ? accessors.setAccessor : accessors.getAccessor; - type = getTypeAnnotationFromAccessor(anotherAccessor); - if (type) { - accessorWithTypeAnnotation = anotherAccessor; - } - } - writeTypeOfDeclaration(node, type, getAccessorDeclarationTypeVisibilityError); - } - write(";"); - writeLine(); - } - function getTypeAnnotationFromAccessor(accessor) { - if (accessor) { - return accessor.kind === 138 /* GetAccessor */ - ? accessor.type // Getter - return type - : accessor.parameters.length > 0 - ? accessor.parameters[0].type // Setter parameter type - : undefined; - } - } - function getAccessorDeclarationTypeVisibilityError(symbolAccesibilityResult) { - var diagnosticMessage; - if (accessorWithTypeAnnotation.kind === 139 /* SetAccessor */) { - // Setters have to have type named and cannot infer it so, the type should always be named - if (accessorWithTypeAnnotation.parent.flags & 128 /* Static */) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? - ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 : - ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_name_1; - } - else { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? - ts.Diagnostics.Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 : - ts.Diagnostics.Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_name_1; - } - return { - diagnosticMessage: diagnosticMessage, - errorNode: accessorWithTypeAnnotation.parameters[0], - // TODO(jfreeman): Investigate why we are passing node.name instead of node.parameters[0].name - typeName: accessorWithTypeAnnotation.name - }; - } - else { - if (accessorWithTypeAnnotation.flags & 128 /* Static */) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? - ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : - ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1 : - ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_name_0; - } - else { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? - ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : - ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1 : - ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_name_0; - } - return { - diagnosticMessage: diagnosticMessage, - errorNode: accessorWithTypeAnnotation.name, - typeName: undefined - }; - } - } - } - function writeFunctionDeclaration(node) { - if (ts.hasDynamicName(node)) { - return; - } - // If we are emitting Method/Constructor it isn't moduleElement and hence already determined to be emitting - // so no need to verify if the declaration is visible - if (!resolver.isImplementationOfOverload(node)) { - emitJsDocComments(node); - if (node.kind === 203 /* FunctionDeclaration */) { - emitModuleElementDeclarationFlags(node); - } - else if (node.kind === 136 /* MethodDeclaration */) { - emitClassMemberDeclarationFlags(node); - } - if (node.kind === 203 /* FunctionDeclaration */) { - write("function "); - writeTextOfNode(currentSourceFile, node.name); - } - else if (node.kind === 137 /* Constructor */) { - write("constructor"); - } - else { - writeTextOfNode(currentSourceFile, node.name); - if (ts.hasQuestionToken(node)) { - write("?"); - } - } - emitSignatureDeclaration(node); - } - } - function emitSignatureDeclarationWithJsDocComments(node) { - emitJsDocComments(node); - emitSignatureDeclaration(node); - } - function emitSignatureDeclaration(node) { - // Construct signature or constructor type write new Signature - if (node.kind === 141 /* ConstructSignature */ || node.kind === 146 /* ConstructorType */) { - write("new "); - } - emitTypeParameters(node.typeParameters); - if (node.kind === 142 /* IndexSignature */) { - write("["); - } - else { - write("("); - } - var prevEnclosingDeclaration = enclosingDeclaration; - enclosingDeclaration = node; - // Parameters - emitCommaList(node.parameters, emitParameterDeclaration); - if (node.kind === 142 /* IndexSignature */) { - write("]"); - } - else { - write(")"); - } - // If this is not a constructor and is not private, emit the return type - var isFunctionTypeOrConstructorType = node.kind === 145 /* FunctionType */ || node.kind === 146 /* ConstructorType */; - if (isFunctionTypeOrConstructorType || node.parent.kind === 148 /* TypeLiteral */) { - // Emit type literal signature return type only if specified - if (node.type) { - write(isFunctionTypeOrConstructorType ? " => " : ": "); - emitType(node.type); - } - } - else if (node.kind !== 137 /* Constructor */ && !(node.flags & 32 /* Private */)) { - writeReturnTypeAtSignature(node, getReturnTypeVisibilityError); - } - enclosingDeclaration = prevEnclosingDeclaration; - if (!isFunctionTypeOrConstructorType) { - write(";"); - writeLine(); - } - function getReturnTypeVisibilityError(symbolAccesibilityResult) { - var diagnosticMessage; - switch (node.kind) { - case 141 /* ConstructSignature */: - // Interfaces cannot have return types that cannot be named - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? - ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : - ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; - break; - case 140 /* CallSignature */: - // Interfaces cannot have return types that cannot be named - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? - ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : - ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; - break; - case 142 /* IndexSignature */: - // Interfaces cannot have return types that cannot be named - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? - ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : - ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; - break; - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - if (node.flags & 128 /* Static */) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? - ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : - ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : - ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; - } - else if (node.parent.kind === 204 /* ClassDeclaration */) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? - ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : - ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : - ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0; - } - else { - // Interfaces cannot have return types that cannot be named - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? - ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : - ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; - } - break; - case 203 /* FunctionDeclaration */: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? - ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : - ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1 : - ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0; - break; - default: - ts.Debug.fail("This is unknown kind for signature: " + node.kind); - } - return { - diagnosticMessage: diagnosticMessage, - errorNode: node.name || node - }; - } - } - function emitParameterDeclaration(node) { - increaseIndent(); - emitJsDocComments(node); - if (node.dotDotDotToken) { - write("..."); - } - if (ts.isBindingPattern(node.name)) { - // For bindingPattern, we can't simply writeTextOfNode from the source file - // because we want to omit the initializer and using writeTextOfNode will result in initializer get emitted. - // Therefore, we will have to recursively emit each element in the bindingPattern. - emitBindingPattern(node.name); - } - else { - writeTextOfNode(currentSourceFile, node.name); - } - if (node.initializer || ts.hasQuestionToken(node)) { - write("?"); - } - decreaseIndent(); - if (node.parent.kind === 145 /* FunctionType */ || - node.parent.kind === 146 /* ConstructorType */ || - node.parent.parent.kind === 148 /* TypeLiteral */) { - emitTypeOfVariableDeclarationFromTypeLiteral(node); - } - else if (!(node.parent.flags & 32 /* Private */)) { - writeTypeOfDeclaration(node, node.type, getParameterDeclarationTypeVisibilityError); - } - function getParameterDeclarationTypeVisibilityError(symbolAccesibilityResult) { - var diagnosticMessage = getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult); - return diagnosticMessage !== undefined ? { - diagnosticMessage: diagnosticMessage, - errorNode: node, - typeName: node.name - } : undefined; - } - function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult) { - switch (node.parent.kind) { - case 137 /* Constructor */: - return symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? - ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : - ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : - ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; - case 141 /* ConstructSignature */: - // Interfaces cannot have parameter types that cannot be named - return symbolAccesibilityResult.errorModuleName ? - ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : - ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; - case 140 /* CallSignature */: - // Interfaces cannot have parameter types that cannot be named - return symbolAccesibilityResult.errorModuleName ? - ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : - ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - if (node.parent.flags & 128 /* Static */) { - return symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? - ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : - ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : - ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; - } - else if (node.parent.parent.kind === 204 /* ClassDeclaration */) { - return symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? - ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : - ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : - ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; - } - else { - // Interfaces cannot have parameter types that cannot be named - return symbolAccesibilityResult.errorModuleName ? - ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : - ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; - } - case 203 /* FunctionDeclaration */: - return symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? - ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : - ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 : - ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1; - default: - ts.Debug.fail("This is unknown parent for parameter: " + node.parent.kind); - } - } - function emitBindingPattern(bindingPattern) { - // We have to explicitly emit square bracket and bracket because these tokens are not store inside the node. - if (bindingPattern.kind === 153 /* ObjectBindingPattern */) { - write("{"); - emitCommaList(bindingPattern.elements, emitBindingElement); - write("}"); - } - else if (bindingPattern.kind === 154 /* ArrayBindingPattern */) { - write("["); - var elements = bindingPattern.elements; - emitCommaList(elements, emitBindingElement); - if (elements && elements.hasTrailingComma) { - write(", "); - } - write("]"); - } - } - function emitBindingElement(bindingElement) { - function getBindingElementTypeVisibilityError(symbolAccesibilityResult) { - var diagnosticMessage = getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult); - return diagnosticMessage !== undefined ? { - diagnosticMessage: diagnosticMessage, - errorNode: bindingElement, - typeName: bindingElement.name - } : undefined; - } - if (bindingElement.kind === 178 /* OmittedExpression */) { - // If bindingElement is an omittedExpression (i.e. containing elision), - // we will emit blank space (although this may differ from users' original code, - // it allows emitSeparatedList to write separator appropriately) - // Example: - // original: function foo([, x, ,]) {} - // emit : function foo([ , x, , ]) {} - write(" "); - } - else if (bindingElement.kind === 155 /* BindingElement */) { - if (bindingElement.propertyName) { - // bindingElement has propertyName property in the following case: - // { y: [a,b,c] ...} -> bindingPattern will have a property called propertyName for "y" - // We have to explicitly emit the propertyName before descending into its binding elements. - // Example: - // original: function foo({y: [a,b,c]}) {} - // emit : declare function foo({y: [a, b, c]}: { y: [any, any, any] }) void; - writeTextOfNode(currentSourceFile, bindingElement.propertyName); - write(": "); - // If bindingElement has propertyName property, then its name must be another bindingPattern of SyntaxKind.ObjectBindingPattern - emitBindingPattern(bindingElement.name); - } - else if (bindingElement.name) { - if (ts.isBindingPattern(bindingElement.name)) { - // If it is a nested binding pattern, we will recursively descend into each element and emit each one separately. - // In the case of rest element, we will omit rest element. - // Example: - // original: function foo([a, [[b]], c] = [1,[["string"]], 3]) {} - // emit : declare function foo([a, [[b]], c]: [number, [[string]], number]): void; - // original with rest: function foo([a, ...c]) {} - // emit : declare function foo([a, ...c]): void; - emitBindingPattern(bindingElement.name); - } - else { - ts.Debug.assert(bindingElement.name.kind === 65 /* Identifier */); - // If the node is just an identifier, we will simply emit the text associated with the node's name - // Example: - // original: function foo({y = 10, x}) {} - // emit : declare function foo({y, x}: {number, any}): void; - if (bindingElement.dotDotDotToken) { - write("..."); - } - writeTextOfNode(currentSourceFile, bindingElement.name); - } - } - } - } - } - function emitNode(node) { - switch (node.kind) { - case 203 /* FunctionDeclaration */: - case 208 /* ModuleDeclaration */: - case 211 /* ImportEqualsDeclaration */: - case 205 /* InterfaceDeclaration */: - case 204 /* ClassDeclaration */: - case 206 /* TypeAliasDeclaration */: - case 207 /* EnumDeclaration */: - return emitModuleElement(node, isModuleElementVisible(node)); - case 183 /* VariableStatement */: - return emitModuleElement(node, isVariableStatementVisible(node)); - case 212 /* ImportDeclaration */: - // Import declaration without import clause is visible, otherwise it is not visible - return emitModuleElement(node, !node.importClause); - case 218 /* ExportDeclaration */: - return emitExportDeclaration(node); - case 137 /* Constructor */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - return writeFunctionDeclaration(node); - case 141 /* ConstructSignature */: - case 140 /* CallSignature */: - case 142 /* IndexSignature */: - return emitSignatureDeclarationWithJsDocComments(node); - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - return emitAccessorDeclaration(node); - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - return emitPropertyDeclaration(node); - case 229 /* EnumMember */: - return emitEnumMemberDeclaration(node); - case 217 /* ExportAssignment */: - return emitExportAssignment(node); - case 230 /* SourceFile */: - return emitSourceFile(node); - } - } - function writeReferencePath(referencedFile) { - var declFileName = referencedFile.flags & 2048 /* DeclarationFile */ - ? referencedFile.fileName // Declaration file, use declaration file name - : ts.shouldEmitToOwnFile(referencedFile, compilerOptions) - ? ts.getOwnEmitOutputFilePath(referencedFile, host, ".d.ts") // Own output file so get the .d.ts file - : ts.removeFileExtension(compilerOptions.out) + ".d.ts"; // Global out file - declFileName = ts.getRelativePathToDirectoryOrUrl(ts.getDirectoryPath(ts.normalizeSlashes(jsFilePath)), declFileName, host.getCurrentDirectory(), host.getCanonicalFileName, - /*isAbsolutePathAnUrl*/ false); - referencePathsOutput += "/// " + newLine; - } - } - /* @internal */ - function writeDeclarationFile(jsFilePath, sourceFile, host, resolver, diagnostics) { - var emitDeclarationResult = emitDeclarations(host, resolver, diagnostics, jsFilePath, sourceFile); - // TODO(shkamat): Should we not write any declaration file if any of them can produce error, - // or should we just not write this file like we are doing now - if (!emitDeclarationResult.reportedDeclarationError) { - var declarationOutput = emitDeclarationResult.referencePathsOutput - + getDeclarationOutput(emitDeclarationResult.synchronousDeclarationOutput, emitDeclarationResult.moduleElementDeclarationEmitInfo); - ts.writeFile(host, diagnostics, ts.removeFileExtension(jsFilePath) + ".d.ts", declarationOutput, host.getCompilerOptions().emitBOM); - } - function getDeclarationOutput(synchronousDeclarationOutput, moduleElementDeclarationEmitInfo) { - var appliedSyncOutputPos = 0; - var declarationOutput = ""; - // apply asynchronous additions to the synchronous output - ts.forEach(moduleElementDeclarationEmitInfo, function (aliasEmitInfo) { - if (aliasEmitInfo.asynchronousOutput) { - declarationOutput += synchronousDeclarationOutput.substring(appliedSyncOutputPos, aliasEmitInfo.outputPos); - declarationOutput += getDeclarationOutput(aliasEmitInfo.asynchronousOutput, aliasEmitInfo.subModuleElementDeclarationEmitInfo); - appliedSyncOutputPos = aliasEmitInfo.outputPos; - } - }); - declarationOutput += synchronousDeclarationOutput.substring(appliedSyncOutputPos); - return declarationOutput; - } - } - ts.writeDeclarationFile = writeDeclarationFile; -})(ts || (ts = {})); -/// -/// -/* @internal */ -var ts; -(function (ts) { - function isExternalModuleOrDeclarationFile(sourceFile) { - return ts.isExternalModule(sourceFile) || ts.isDeclarationFile(sourceFile); - } - ts.isExternalModuleOrDeclarationFile = isExternalModuleOrDeclarationFile; - // Flags enum to track count of temp variables and a few dedicated names - var TempFlags; - (function (TempFlags) { - TempFlags[TempFlags["Auto"] = 0] = "Auto"; - TempFlags[TempFlags["CountMask"] = 268435455] = "CountMask"; - TempFlags[TempFlags["_i"] = 268435456] = "_i"; - })(TempFlags || (TempFlags = {})); - // targetSourceFile is when users only want one file in entire project to be emitted. This is used in compileOnSave feature - function emitFiles(resolver, host, targetSourceFile) { - // emit output for the __extends helper function - var extendsHelper = "\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n __.prototype = b.prototype;\n d.prototype = new __();\n};"; - // emit output for the __decorate helper function - var decorateHelper = "\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") return Reflect.decorate(decorators, target, key, desc);\n switch (arguments.length) {\n case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);\n case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);\n case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc);\n }\n};"; - // emit output for the __metadata helper function - var metadataHelper = "\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};"; - // emit output for the __param helper function - var paramHelper = "\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};"; - var compilerOptions = host.getCompilerOptions(); - var languageVersion = compilerOptions.target || 0 /* ES3 */; - var sourceMapDataList = compilerOptions.sourceMap || compilerOptions.inlineSourceMap ? [] : undefined; - var diagnostics = []; - var newLine = host.getNewLine(); - if (targetSourceFile === undefined) { - ts.forEach(host.getSourceFiles(), function (sourceFile) { - if (ts.shouldEmitToOwnFile(sourceFile, compilerOptions)) { - var jsFilePath = ts.getOwnEmitOutputFilePath(sourceFile, host, ".js"); - emitFile(jsFilePath, sourceFile); - } - }); - if (compilerOptions.out) { - emitFile(compilerOptions.out); - } - } - else { - // targetSourceFile is specified (e.g calling emitter from language service or calling getSemanticDiagnostic from language service) - if (ts.shouldEmitToOwnFile(targetSourceFile, compilerOptions)) { - var jsFilePath = ts.getOwnEmitOutputFilePath(targetSourceFile, host, ".js"); - emitFile(jsFilePath, targetSourceFile); - } - else if (!ts.isDeclarationFile(targetSourceFile) && compilerOptions.out) { - emitFile(compilerOptions.out); - } - } - // Sort and make the unique list of diagnostics - diagnostics = ts.sortAndDeduplicateDiagnostics(diagnostics); - return { - emitSkipped: false, - diagnostics: diagnostics, - sourceMaps: sourceMapDataList - }; - function isNodeDescendentOf(node, ancestor) { - while (node) { - if (node === ancestor) - return true; - node = node.parent; - } - return false; - } - function isUniqueLocalName(name, container) { - for (var node = container; isNodeDescendentOf(node, container); node = node.nextContainer) { - if (node.locals && ts.hasProperty(node.locals, name)) { - // We conservatively include alias symbols to cover cases where they're emitted as locals - if (node.locals[name].flags & (107455 /* Value */ | 1048576 /* ExportValue */ | 8388608 /* Alias */)) { - return false; - } - } - } - return true; - } - function emitJavaScript(jsFilePath, root) { - var writer = ts.createTextWriter(newLine); - var write = writer.write; - var writeTextOfNode = writer.writeTextOfNode; - var writeLine = writer.writeLine; - var increaseIndent = writer.increaseIndent; - var decreaseIndent = writer.decreaseIndent; - var currentSourceFile; - // name of an exporter function if file is a System external module - // System.register([...], function () {...}) - // exporting in System modules looks like: - // export var x; ... x = 1 - // => - // var x;... exporter("x", x = 1) - var exportFunctionForFile; - var generatedNameSet = {}; - var nodeToGeneratedName = []; - var computedPropertyNamesToGeneratedNames; - var extendsEmitted = false; - var decorateEmitted = false; - var paramEmitted = false; - var tempFlags = 0; - var tempVariables; - var tempParameters; - var externalImports; - var exportSpecifiers; - var exportEquals; - var hasExportStars; - /** Write emitted output to disk */ - var writeEmittedFiles = writeJavaScriptFile; - var detachedCommentsInfo; - var writeComment = ts.writeCommentRange; - /** Emit a node */ - var emit = emitNodeWithoutSourceMap; - /** Called just before starting emit of a node */ - var emitStart = function (node) { }; - /** Called once the emit of the node is done */ - var emitEnd = function (node) { }; - /** Emit the text for the given token that comes after startPos - * This by default writes the text provided with the given tokenKind - * but if optional emitFn callback is provided the text is emitted using the callback instead of default text - * @param tokenKind the kind of the token to search and emit - * @param startPos the position in the source to start searching for the token - * @param emitFn if given will be invoked to emit the text instead of actual token emit */ - var emitToken = emitTokenText; - /** Called to before starting the lexical scopes as in function/class in the emitted code because of node - * @param scopeDeclaration node that starts the lexical scope - * @param scopeName Optional name of this scope instead of deducing one from the declaration node */ - var scopeEmitStart = function (scopeDeclaration, scopeName) { }; - /** Called after coming out of the scope */ - var scopeEmitEnd = function () { }; - /** Sourcemap data that will get encoded */ - var sourceMapData; - if (compilerOptions.sourceMap || compilerOptions.inlineSourceMap) { - initializeEmitterWithSourceMaps(); - } - if (root) { - // Do not call emit directly. It does not set the currentSourceFile. - emitSourceFile(root); - } - else { - ts.forEach(host.getSourceFiles(), function (sourceFile) { - if (!isExternalModuleOrDeclarationFile(sourceFile)) { - emitSourceFile(sourceFile); - } - }); - } - writeLine(); - writeEmittedFiles(writer.getText(), compilerOptions.emitBOM); - if (compilerOptions.dependency && root && compilerOptions.module) { - emitDependencyFile(root); - } - return; - function emitDependencyFile(sourceFile) { - var depFile = ts.removeFileExtension(jsFilePath) + '.dep.json'; - var runtime = []; - var compileTime = []; - for (var _a = 0, _b = root.amdDependencies; _a < _b.length; _a++) { - var node = _b[_a]; - runtime.push(node.path); - } - function processExternalDeclaration(node) { - var name = getExternalModuleNameText(node); - if (name) { - if (name.length >= 2) { - var first = name[0]; - var last = name[name.length - 1]; - if ((first == '"' || first == "'") && (last == '"' || last == "'")) { - name = name.substring(1, name.length - 1); - } - } - if (isExternalDepedency(node)) { - runtime.push(name); - } - else { - compileTime.push(name); - } - } - } - function isExternalDepedency(node) { - for (var _a = 0; _a < externalImports.length; _a++) { - var external_1 = externalImports[_a]; - if (node === external_1) { - return true; - } - } - return false; - } - for (var _c = 0, _d = root.statements; _c < _d.length; _c++) { - var node = _d[_c]; - var name_19; - switch (node.kind) { - case 212 /* ImportDeclaration */: - processExternalDeclaration(node); - break; - case 211 /* ImportEqualsDeclaration */: - processExternalDeclaration(node); - break; - case 218 /* ExportDeclaration */: - var exportDeclaration = node; - if (exportDeclaration.moduleSpecifier) { - processExternalDeclaration(node); - } - break; - } - } - var dep = { - filePath: root.fileName, - compileTime: compileTime, - runtime: runtime - }; - ts.writeFile(host, [], depFile, JSON.stringify(dep, null, 4), compilerOptions.emitBOM); - } - function emitSourceFile(sourceFile) { - currentSourceFile = sourceFile; - exportFunctionForFile = undefined; - emit(sourceFile); - } - function isUniqueName(name) { - return !resolver.hasGlobalName(name) && - !ts.hasProperty(currentSourceFile.identifiers, name) && - !ts.hasProperty(generatedNameSet, name); - } - // Return the next available name in the pattern _a ... _z, _0, _1, ... - // TempFlags._i or TempFlags._n may be used to express a preference for that dedicated name. - // Note that names generated by makeTempVariableName and makeUniqueName will never conflict. - function makeTempVariableName(flags) { - if (flags && !(tempFlags & flags)) { - var name = flags === 268435456 /* _i */ ? "_i" : "_n"; - if (isUniqueName(name)) { - tempFlags |= flags; - return name; - } - } - while (true) { - var count = tempFlags & 268435455 /* CountMask */; - tempFlags++; - // Skip over 'i' and 'n' - if (count !== 8 && count !== 13) { - var name_20 = count < 26 ? "_" + String.fromCharCode(97 /* a */ + count) : "_" + (count - 26); - if (isUniqueName(name_20)) { - return name_20; - } - } - } - } - // Generate a name that is unique within the current file and doesn't conflict with any names - // in global scope. The name is formed by adding an '_n' suffix to the specified base name, - // where n is a positive integer. Note that names generated by makeTempVariableName and - // makeUniqueName are guaranteed to never conflict. - function makeUniqueName(baseName) { - // Find the first unique 'name_n', where n is a positive number - if (baseName.charCodeAt(baseName.length - 1) !== 95 /* _ */) { - baseName += "_"; - } - var i = 1; - while (true) { - var generatedName = baseName + i; - if (isUniqueName(generatedName)) { - return generatedNameSet[generatedName] = generatedName; - } - i++; - } - } - function generateNameForModuleOrEnum(node) { - var name = node.name.text; - // Use module/enum name itself if it is unique, otherwise make a unique variation - return isUniqueLocalName(name, node) ? name : makeUniqueName(name); - } - function generateNameForImportOrExportDeclaration(node) { - var expr = ts.getExternalModuleName(node); - var baseName = expr.kind === 8 /* StringLiteral */ ? - ts.escapeIdentifier(ts.makeIdentifierFromModuleName(expr.text)) : "module"; - return makeUniqueName(baseName); - } - function generateNameForExportDefault() { - return makeUniqueName("default"); - } - function generateNameForNode(node) { - switch (node.kind) { - case 65 /* Identifier */: - return makeUniqueName(node.text); - case 208 /* ModuleDeclaration */: - case 207 /* EnumDeclaration */: - return generateNameForModuleOrEnum(node); - case 212 /* ImportDeclaration */: - case 218 /* ExportDeclaration */: - return generateNameForImportOrExportDeclaration(node); - case 203 /* FunctionDeclaration */: - case 204 /* ClassDeclaration */: - case 177 /* ClassExpression */: - case 217 /* ExportAssignment */: - return generateNameForExportDefault(); - } - } - function getGeneratedNameForNode(node) { - var id = ts.getNodeId(node); - return nodeToGeneratedName[id] || (nodeToGeneratedName[id] = ts.unescapeIdentifier(generateNameForNode(node))); - } - function initializeEmitterWithSourceMaps() { - var sourceMapDir; // The directory in which sourcemap will be - // Current source map file and its index in the sources list - var sourceMapSourceIndex = -1; - // Names and its index map - var sourceMapNameIndexMap = {}; - var sourceMapNameIndices = []; - function getSourceMapNameIndex() { - return sourceMapNameIndices.length ? ts.lastOrUndefined(sourceMapNameIndices) : -1; - } - // Last recorded and encoded spans - var lastRecordedSourceMapSpan; - var lastEncodedSourceMapSpan = { - emittedLine: 1, - emittedColumn: 1, - sourceLine: 1, - sourceColumn: 1, - sourceIndex: 0 - }; - var lastEncodedNameIndex = 0; - // Encoding for sourcemap span - function encodeLastRecordedSourceMapSpan() { - if (!lastRecordedSourceMapSpan || lastRecordedSourceMapSpan === lastEncodedSourceMapSpan) { - return; - } - var prevEncodedEmittedColumn = lastEncodedSourceMapSpan.emittedColumn; - // Line/Comma delimiters - if (lastEncodedSourceMapSpan.emittedLine == lastRecordedSourceMapSpan.emittedLine) { - // Emit comma to separate the entry - if (sourceMapData.sourceMapMappings) { - sourceMapData.sourceMapMappings += ","; - } - } - else { - // Emit line delimiters - for (var encodedLine = lastEncodedSourceMapSpan.emittedLine; encodedLine < lastRecordedSourceMapSpan.emittedLine; encodedLine++) { - sourceMapData.sourceMapMappings += ";"; - } - prevEncodedEmittedColumn = 1; - } - // 1. Relative Column 0 based - sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.emittedColumn - prevEncodedEmittedColumn); - // 2. Relative sourceIndex - sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.sourceIndex - lastEncodedSourceMapSpan.sourceIndex); - // 3. Relative sourceLine 0 based - sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.sourceLine - lastEncodedSourceMapSpan.sourceLine); - // 4. Relative sourceColumn 0 based - sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.sourceColumn - lastEncodedSourceMapSpan.sourceColumn); - // 5. Relative namePosition 0 based - if (lastRecordedSourceMapSpan.nameIndex >= 0) { - sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.nameIndex - lastEncodedNameIndex); - lastEncodedNameIndex = lastRecordedSourceMapSpan.nameIndex; - } - lastEncodedSourceMapSpan = lastRecordedSourceMapSpan; - sourceMapData.sourceMapDecodedMappings.push(lastEncodedSourceMapSpan); - function base64VLQFormatEncode(inValue) { - function base64FormatEncode(inValue) { - if (inValue < 64) { - return 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.charAt(inValue); - } - throw TypeError(inValue + ": not a 64 based value"); - } - // Add a new least significant bit that has the sign of the value. - // if negative number the least significant bit that gets added to the number has value 1 - // else least significant bit value that gets added is 0 - // eg. -1 changes to binary : 01 [1] => 3 - // +1 changes to binary : 01 [0] => 2 - if (inValue < 0) { - inValue = ((-inValue) << 1) + 1; - } - else { - inValue = inValue << 1; - } - // Encode 5 bits at a time starting from least significant bits - var encodedStr = ""; - do { - var currentDigit = inValue & 31; // 11111 - inValue = inValue >> 5; - if (inValue > 0) { - // There are still more digits to decode, set the msb (6th bit) - currentDigit = currentDigit | 32; - } - encodedStr = encodedStr + base64FormatEncode(currentDigit); - } while (inValue > 0); - return encodedStr; - } - } - function recordSourceMapSpan(pos) { - var sourceLinePos = ts.getLineAndCharacterOfPosition(currentSourceFile, pos); - // Convert the location to be one-based. - sourceLinePos.line++; - sourceLinePos.character++; - var emittedLine = writer.getLine(); - var emittedColumn = writer.getColumn(); - // If this location wasn't recorded or the location in source is going backwards, record the span - if (!lastRecordedSourceMapSpan || - lastRecordedSourceMapSpan.emittedLine != emittedLine || - lastRecordedSourceMapSpan.emittedColumn != emittedColumn || - (lastRecordedSourceMapSpan.sourceIndex === sourceMapSourceIndex && - (lastRecordedSourceMapSpan.sourceLine > sourceLinePos.line || - (lastRecordedSourceMapSpan.sourceLine === sourceLinePos.line && lastRecordedSourceMapSpan.sourceColumn > sourceLinePos.character)))) { - // Encode the last recordedSpan before assigning new - encodeLastRecordedSourceMapSpan(); - // New span - lastRecordedSourceMapSpan = { - emittedLine: emittedLine, - emittedColumn: emittedColumn, - sourceLine: sourceLinePos.line, - sourceColumn: sourceLinePos.character, - nameIndex: getSourceMapNameIndex(), - sourceIndex: sourceMapSourceIndex - }; - } - else { - // Take the new pos instead since there is no change in emittedLine and column since last location - lastRecordedSourceMapSpan.sourceLine = sourceLinePos.line; - lastRecordedSourceMapSpan.sourceColumn = sourceLinePos.character; - lastRecordedSourceMapSpan.sourceIndex = sourceMapSourceIndex; - } - } - function recordEmitNodeStartSpan(node) { - // Get the token pos after skipping to the token (ignoring the leading trivia) - recordSourceMapSpan(ts.skipTrivia(currentSourceFile.text, node.pos)); - } - function recordEmitNodeEndSpan(node) { - recordSourceMapSpan(node.end); - } - function writeTextWithSpanRecord(tokenKind, startPos, emitFn) { - var tokenStartPos = ts.skipTrivia(currentSourceFile.text, startPos); - recordSourceMapSpan(tokenStartPos); - var tokenEndPos = emitTokenText(tokenKind, tokenStartPos, emitFn); - recordSourceMapSpan(tokenEndPos); - return tokenEndPos; - } - function recordNewSourceFileStart(node) { - // Add the file to tsFilePaths - // If sourceroot option: Use the relative path corresponding to the common directory path - // otherwise source locations relative to map file location - var sourcesDirectoryPath = compilerOptions.sourceRoot ? host.getCommonSourceDirectory() : sourceMapDir; - sourceMapData.sourceMapSources.push(ts.getRelativePathToDirectoryOrUrl(sourcesDirectoryPath, node.fileName, host.getCurrentDirectory(), host.getCanonicalFileName, - /*isAbsolutePathAnUrl*/ true)); - sourceMapSourceIndex = sourceMapData.sourceMapSources.length - 1; - // The one that can be used from program to get the actual source file - sourceMapData.inputSourceFileNames.push(node.fileName); - if (compilerOptions.inlineSources) { - if (!sourceMapData.sourceMapSourcesContent) { - sourceMapData.sourceMapSourcesContent = []; - } - sourceMapData.sourceMapSourcesContent.push(node.text); - } - } - function recordScopeNameOfNode(node, scopeName) { - function recordScopeNameIndex(scopeNameIndex) { - sourceMapNameIndices.push(scopeNameIndex); - } - function recordScopeNameStart(scopeName) { - var scopeNameIndex = -1; - if (scopeName) { - var parentIndex = getSourceMapNameIndex(); - if (parentIndex !== -1) { - // Child scopes are always shown with a dot (even if they have no name), - // unless it is a computed property. Then it is shown with brackets, - // but the brackets are included in the name. - var name_21 = node.name; - if (!name_21 || name_21.kind !== 129 /* ComputedPropertyName */) { - scopeName = "." + scopeName; - } - scopeName = sourceMapData.sourceMapNames[parentIndex] + scopeName; - } - scopeNameIndex = ts.getProperty(sourceMapNameIndexMap, scopeName); - if (scopeNameIndex === undefined) { - scopeNameIndex = sourceMapData.sourceMapNames.length; - sourceMapData.sourceMapNames.push(scopeName); - sourceMapNameIndexMap[scopeName] = scopeNameIndex; - } - } - recordScopeNameIndex(scopeNameIndex); - } - if (scopeName) { - // The scope was already given a name use it - recordScopeNameStart(scopeName); - } - else if (node.kind === 203 /* FunctionDeclaration */ || - node.kind === 165 /* FunctionExpression */ || - node.kind === 136 /* MethodDeclaration */ || - node.kind === 135 /* MethodSignature */ || - node.kind === 138 /* GetAccessor */ || - node.kind === 139 /* SetAccessor */ || - node.kind === 208 /* ModuleDeclaration */ || - node.kind === 204 /* ClassDeclaration */ || - node.kind === 207 /* EnumDeclaration */) { - // Declaration and has associated name use it - if (node.name) { - var name_22 = node.name; - // For computed property names, the text will include the brackets - scopeName = name_22.kind === 129 /* ComputedPropertyName */ - ? ts.getTextOfNode(name_22) - : node.name.text; - } - recordScopeNameStart(scopeName); - } - else { - // Block just use the name from upper level scope - recordScopeNameIndex(getSourceMapNameIndex()); - } - } - function recordScopeNameEnd() { - sourceMapNameIndices.pop(); - } - ; - function writeCommentRangeWithMap(curentSourceFile, writer, comment, newLine) { - recordSourceMapSpan(comment.pos); - ts.writeCommentRange(currentSourceFile, writer, comment, newLine); - recordSourceMapSpan(comment.end); - } - function serializeSourceMapContents(version, file, sourceRoot, sources, names, mappings, sourcesContent) { - if (typeof JSON !== "undefined") { - var map_1 = { - version: version, - file: file, - sourceRoot: sourceRoot, - sources: sources, - names: names, - mappings: mappings - }; - if (sourcesContent !== undefined) { - map_1.sourcesContent = sourcesContent; - } - return JSON.stringify(map_1); - } - return "{\"version\":" + version + ",\"file\":\"" + ts.escapeString(file) + "\",\"sourceRoot\":\"" + ts.escapeString(sourceRoot) + "\",\"sources\":[" + serializeStringArray(sources) + "],\"names\":[" + serializeStringArray(names) + "],\"mappings\":\"" + ts.escapeString(mappings) + "\" " + (sourcesContent !== undefined ? ",\"sourcesContent\":[" + serializeStringArray(sourcesContent) + "]" : "") + "}"; - function serializeStringArray(list) { - var output = ""; - for (var i = 0, n = list.length; i < n; i++) { - if (i) { - output += ","; - } - output += "\"" + ts.escapeString(list[i]) + "\""; - } - return output; - } - } - function writeJavaScriptAndSourceMapFile(emitOutput, writeByteOrderMark) { - encodeLastRecordedSourceMapSpan(); - var sourceMapText = serializeSourceMapContents(3, sourceMapData.sourceMapFile, sourceMapData.sourceMapSourceRoot, sourceMapData.sourceMapSources, sourceMapData.sourceMapNames, sourceMapData.sourceMapMappings, sourceMapData.sourceMapSourcesContent); - sourceMapDataList.push(sourceMapData); - var sourceMapUrl; - if (compilerOptions.inlineSourceMap) { - // Encode the sourceMap into the sourceMap url - var base64SourceMapText = ts.convertToBase64(sourceMapText); - sourceMapUrl = "//# sourceMappingURL=data:application/json;base64," + base64SourceMapText; - } - else { - // Write source map file - ts.writeFile(host, diagnostics, sourceMapData.sourceMapFilePath, sourceMapText, false); - sourceMapUrl = "//# sourceMappingURL=" + sourceMapData.jsSourceMappingURL; - } - // Write sourcemap url to the js file and write the js file - writeJavaScriptFile(emitOutput + sourceMapUrl, writeByteOrderMark); - } - // Initialize source map data - var sourceMapJsFile = ts.getBaseFileName(ts.normalizeSlashes(jsFilePath)); - sourceMapData = { - sourceMapFilePath: jsFilePath + ".map", - jsSourceMappingURL: sourceMapJsFile + ".map", - sourceMapFile: sourceMapJsFile, - sourceMapSourceRoot: compilerOptions.sourceRoot || "", - sourceMapSources: [], - inputSourceFileNames: [], - sourceMapNames: [], - sourceMapMappings: "", - sourceMapSourcesContent: undefined, - sourceMapDecodedMappings: [] - }; - // Normalize source root and make sure it has trailing "/" so that it can be used to combine paths with the - // relative paths of the sources list in the sourcemap - sourceMapData.sourceMapSourceRoot = ts.normalizeSlashes(sourceMapData.sourceMapSourceRoot); - if (sourceMapData.sourceMapSourceRoot.length && sourceMapData.sourceMapSourceRoot.charCodeAt(sourceMapData.sourceMapSourceRoot.length - 1) !== 47 /* slash */) { - sourceMapData.sourceMapSourceRoot += ts.directorySeparator; - } - if (compilerOptions.mapRoot) { - sourceMapDir = ts.normalizeSlashes(compilerOptions.mapRoot); - if (root) { - // For modules or multiple emit files the mapRoot will have directory structure like the sources - // So if src\a.ts and src\lib\b.ts are compiled together user would be moving the maps into mapRoot\a.js.map and mapRoot\lib\b.js.map - sourceMapDir = ts.getDirectoryPath(ts.getSourceFilePathInNewDir(root, host, sourceMapDir)); - } - if (!ts.isRootedDiskPath(sourceMapDir) && !ts.isUrl(sourceMapDir)) { - // The relative paths are relative to the common directory - sourceMapDir = ts.combinePaths(host.getCommonSourceDirectory(), sourceMapDir); - sourceMapData.jsSourceMappingURL = ts.getRelativePathToDirectoryOrUrl(ts.getDirectoryPath(ts.normalizePath(jsFilePath)), ts.combinePaths(sourceMapDir, sourceMapData.jsSourceMappingURL), host.getCurrentDirectory(), host.getCanonicalFileName, - /*isAbsolutePathAnUrl*/ true); - } - else { - sourceMapData.jsSourceMappingURL = ts.combinePaths(sourceMapDir, sourceMapData.jsSourceMappingURL); - } - } - else { - sourceMapDir = ts.getDirectoryPath(ts.normalizePath(jsFilePath)); - } - function emitNodeWithSourceMap(node) { - if (node) { - if (ts.nodeIsSynthesized(node)) { - return emitNodeWithoutSourceMap(node); - } - if (node.kind != 230 /* SourceFile */) { - recordEmitNodeStartSpan(node); - emitNodeWithoutSourceMap(node); - recordEmitNodeEndSpan(node); - } - else { - recordNewSourceFileStart(node); - emitNodeWithoutSourceMap(node); - } - } - } - writeEmittedFiles = writeJavaScriptAndSourceMapFile; - emit = emitNodeWithSourceMap; - emitStart = recordEmitNodeStartSpan; - emitEnd = recordEmitNodeEndSpan; - emitToken = writeTextWithSpanRecord; - scopeEmitStart = recordScopeNameOfNode; - scopeEmitEnd = recordScopeNameEnd; - writeComment = writeCommentRangeWithMap; - } - function writeJavaScriptFile(emitOutput, writeByteOrderMark) { - ts.writeFile(host, diagnostics, jsFilePath, emitOutput, writeByteOrderMark); - } - // Create a temporary variable with a unique unused name. - function createTempVariable(flags) { - var result = ts.createSynthesizedNode(65 /* Identifier */); - result.text = makeTempVariableName(flags); - return result; - } - function recordTempDeclaration(name) { - if (!tempVariables) { - tempVariables = []; - } - tempVariables.push(name); - } - function createAndRecordTempVariable(flags) { - var temp = createTempVariable(flags); - recordTempDeclaration(temp); - return temp; - } - function emitTempDeclarations(newLine) { - if (tempVariables) { - if (newLine) { - writeLine(); - } - else { - write(" "); - } - write("var "); - emitCommaList(tempVariables); - write(";"); - } - } - function emitTokenText(tokenKind, startPos, emitFn) { - var tokenString = ts.tokenToString(tokenKind); - if (emitFn) { - emitFn(); - } - else { - write(tokenString); - } - return startPos + tokenString.length; - } - function emitOptional(prefix, node) { - if (node) { - write(prefix); - emit(node); - } - } - function emitParenthesizedIf(node, parenthesized) { - if (parenthesized) { - write("("); - } - emit(node); - if (parenthesized) { - write(")"); - } - } - function emitTrailingCommaIfPresent(nodeList) { - if (nodeList.hasTrailingComma) { - write(","); - } - } - function emitLinePreservingList(parent, nodes, allowTrailingComma, spacesBetweenBraces) { - ts.Debug.assert(nodes.length > 0); - increaseIndent(); - if (nodeStartPositionsAreOnSameLine(parent, nodes[0])) { - if (spacesBetweenBraces) { - write(" "); - } - } - else { - writeLine(); - } - for (var i = 0, n = nodes.length; i < n; i++) { - if (i) { - if (nodeEndIsOnSameLineAsNodeStart(nodes[i - 1], nodes[i])) { - write(", "); - } - else { - write(","); - writeLine(); - } - } - emit(nodes[i]); - } - if (nodes.hasTrailingComma && allowTrailingComma) { - write(","); - } - decreaseIndent(); - if (nodeEndPositionsAreOnSameLine(parent, ts.lastOrUndefined(nodes))) { - if (spacesBetweenBraces) { - write(" "); - } - } - else { - writeLine(); - } - } - function emitList(nodes, start, count, multiLine, trailingComma, leadingComma, noTrailingNewLine, emitNode) { - if (!emitNode) { - emitNode = emit; - } - for (var i = 0; i < count; i++) { - if (multiLine) { - if (i || leadingComma) { - write(","); - } - writeLine(); - } - else { - if (i || leadingComma) { - write(", "); - } - } - emitNode(nodes[start + i]); - leadingComma = true; - } - if (trailingComma) { - write(","); - } - if (multiLine && !noTrailingNewLine) { - writeLine(); - } - return count; - } - function emitCommaList(nodes) { - if (nodes) { - emitList(nodes, 0, nodes.length, false, false); - } - } - function emitLines(nodes) { - emitLinesStartingAt(nodes, 0); - } - function emitLinesStartingAt(nodes, startIndex) { - for (var i = startIndex; i < nodes.length; i++) { - writeLine(); - emit(nodes[i]); - } - } - function isBinaryOrOctalIntegerLiteral(node, text) { - if (node.kind === 7 /* NumericLiteral */ && text.length > 1) { - switch (text.charCodeAt(1)) { - case 98 /* b */: - case 66 /* B */: - case 111 /* o */: - case 79 /* O */: - return true; - } - } - return false; - } - function emitLiteral(node) { - var text = getLiteralText(node); - if ((compilerOptions.sourceMap || compilerOptions.inlineSourceMap) && (node.kind === 8 /* StringLiteral */ || ts.isTemplateLiteralKind(node.kind))) { - writer.writeLiteral(text); - } - else if (languageVersion < 2 /* ES6 */ && isBinaryOrOctalIntegerLiteral(node, text)) { - write(node.text); - } - else { - write(text); - } - } - function getLiteralText(node) { - // Any template literal or string literal with an extended escape - // (e.g. "\u{0067}") will need to be downleveled as a escaped string literal. - if (languageVersion < 2 /* ES6 */ && (ts.isTemplateLiteralKind(node.kind) || node.hasExtendedUnicodeEscape)) { - return getQuotedEscapedLiteralText('"', node.text, '"'); - } - // If we don't need to downlevel and we can reach the original source text using - // the node's parent reference, then simply get the text as it was originally written. - if (node.parent) { - return ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); - } - // If we can't reach the original source text, use the canonical form if it's a number, - // or an escaped quoted form of the original text if it's string-like. - switch (node.kind) { - case 8 /* StringLiteral */: - return getQuotedEscapedLiteralText('"', node.text, '"'); - case 10 /* NoSubstitutionTemplateLiteral */: - return getQuotedEscapedLiteralText('`', node.text, '`'); - case 11 /* TemplateHead */: - return getQuotedEscapedLiteralText('`', node.text, '${'); - case 12 /* TemplateMiddle */: - return getQuotedEscapedLiteralText('}', node.text, '${'); - case 13 /* TemplateTail */: - return getQuotedEscapedLiteralText('}', node.text, '`'); - case 7 /* NumericLiteral */: - return node.text; - } - ts.Debug.fail("Literal kind '" + node.kind + "' not accounted for."); - } - function getQuotedEscapedLiteralText(leftQuote, text, rightQuote) { - return leftQuote + ts.escapeNonAsciiCharacters(ts.escapeString(text)) + rightQuote; - } - function emitDownlevelRawTemplateLiteral(node) { - // Find original source text, since we need to emit the raw strings of the tagged template. - // The raw strings contain the (escaped) strings of what the user wrote. - // Examples: `\n` is converted to "\\n", a template string with a newline to "\n". - var text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); - // text contains the original source, it will also contain quotes ("`"), dolar signs and braces ("${" and "}"), - // thus we need to remove those characters. - // First template piece starts with "`", others with "}" - // Last template piece ends with "`", others with "${" - var isLast = node.kind === 10 /* NoSubstitutionTemplateLiteral */ || node.kind === 13 /* TemplateTail */; - text = text.substring(1, text.length - (isLast ? 1 : 2)); - // Newline normalization: - // ES6 Spec 11.8.6.1 - Static Semantics of TV's and TRV's - // and LineTerminatorSequences are normalized to for both TV and TRV. - text = text.replace(/\r\n?/g, "\n"); - text = ts.escapeString(text); - write('"' + text + '"'); - } - function emitDownlevelTaggedTemplateArray(node, literalEmitter) { - write("["); - if (node.template.kind === 10 /* NoSubstitutionTemplateLiteral */) { - literalEmitter(node.template); - } - else { - literalEmitter(node.template.head); - ts.forEach(node.template.templateSpans, function (child) { - write(", "); - literalEmitter(child.literal); - }); - } - write("]"); - } - function emitDownlevelTaggedTemplate(node) { - var tempVariable = createAndRecordTempVariable(0 /* Auto */); - write("("); - emit(tempVariable); - write(" = "); - emitDownlevelTaggedTemplateArray(node, emit); - write(", "); - emit(tempVariable); - write(".raw = "); - emitDownlevelTaggedTemplateArray(node, emitDownlevelRawTemplateLiteral); - write(", "); - emitParenthesizedIf(node.tag, needsParenthesisForPropertyAccessOrInvocation(node.tag)); - write("("); - emit(tempVariable); - // Now we emit the expressions - if (node.template.kind === 174 /* TemplateExpression */) { - ts.forEach(node.template.templateSpans, function (templateSpan) { - write(", "); - var needsParens = templateSpan.expression.kind === 172 /* BinaryExpression */ - && templateSpan.expression.operatorToken.kind === 23 /* CommaToken */; - emitParenthesizedIf(templateSpan.expression, needsParens); - }); - } - write("))"); - } - function emitTemplateExpression(node) { - // In ES6 mode and above, we can simply emit each portion of a template in order, but in - // ES3 & ES5 we must convert the template expression into a series of string concatenations. - if (languageVersion >= 2 /* ES6 */) { - ts.forEachChild(node, emit); - return; - } - var emitOuterParens = ts.isExpression(node.parent) - && templateNeedsParens(node, node.parent); - if (emitOuterParens) { - write("("); - } - var headEmitted = false; - if (shouldEmitTemplateHead()) { - emitLiteral(node.head); - headEmitted = true; - } - for (var i = 0, n = node.templateSpans.length; i < n; i++) { - var templateSpan = node.templateSpans[i]; - // Check if the expression has operands and binds its operands less closely than binary '+'. - // If it does, we need to wrap the expression in parentheses. Otherwise, something like - // `abc${ 1 << 2 }` - // becomes - // "abc" + 1 << 2 + "" - // which is really - // ("abc" + 1) << (2 + "") - // rather than - // "abc" + (1 << 2) + "" - var needsParens = templateSpan.expression.kind !== 164 /* ParenthesizedExpression */ - && comparePrecedenceToBinaryPlus(templateSpan.expression) !== 1 /* GreaterThan */; - if (i > 0 || headEmitted) { - // If this is the first span and the head was not emitted, then this templateSpan's - // expression will be the first to be emitted. Don't emit the preceding ' + ' in that - // case. - write(" + "); - } - emitParenthesizedIf(templateSpan.expression, needsParens); - // Only emit if the literal is non-empty. - // The binary '+' operator is left-associative, so the first string concatenation - // with the head will force the result up to this point to be a string. - // Emitting a '+ ""' has no semantic effect for middles and tails. - if (templateSpan.literal.text.length !== 0) { - write(" + "); - emitLiteral(templateSpan.literal); - } - } - if (emitOuterParens) { - write(")"); - } - function shouldEmitTemplateHead() { - // If this expression has an empty head literal and the first template span has a non-empty - // literal, then emitting the empty head literal is not necessary. - // `${ foo } and ${ bar }` - // can be emitted as - // foo + " and " + bar - // This is because it is only required that one of the first two operands in the emit - // output must be a string literal, so that the other operand and all following operands - // are forced into strings. - // - // If the first template span has an empty literal, then the head must still be emitted. - // `${ foo }${ bar }` - // must still be emitted as - // "" + foo + bar - // There is always atleast one templateSpan in this code path, since - // NoSubstitutionTemplateLiterals are directly emitted via emitLiteral() - ts.Debug.assert(node.templateSpans.length !== 0); - return node.head.text.length !== 0 || node.templateSpans[0].literal.text.length === 0; - } - function templateNeedsParens(template, parent) { - switch (parent.kind) { - case 160 /* CallExpression */: - case 161 /* NewExpression */: - return parent.expression === template; - case 162 /* TaggedTemplateExpression */: - case 164 /* ParenthesizedExpression */: - return false; - default: - return comparePrecedenceToBinaryPlus(parent) !== -1 /* LessThan */; - } - } - /** - * Returns whether the expression has lesser, greater, - * or equal precedence to the binary '+' operator - */ - function comparePrecedenceToBinaryPlus(expression) { - // All binary expressions have lower precedence than '+' apart from '*', '/', and '%' - // which have greater precedence and '-' which has equal precedence. - // All unary operators have a higher precedence apart from yield. - // Arrow functions and conditionals have a lower precedence, - // although we convert the former into regular function expressions in ES5 mode, - // and in ES6 mode this function won't get called anyway. - // - // TODO (drosen): Note that we need to account for the upcoming 'yield' and - // spread ('...') unary operators that are anticipated for ES6. - switch (expression.kind) { - case 172 /* BinaryExpression */: - switch (expression.operatorToken.kind) { - case 35 /* AsteriskToken */: - case 36 /* SlashToken */: - case 37 /* PercentToken */: - return 1 /* GreaterThan */; - case 33 /* PlusToken */: - case 34 /* MinusToken */: - return 0 /* EqualTo */; - default: - return -1 /* LessThan */; - } - case 175 /* YieldExpression */: - case 173 /* ConditionalExpression */: - return -1 /* LessThan */; - default: - return 1 /* GreaterThan */; - } - } - } - function emitTemplateSpan(span) { - emit(span.expression); - emit(span.literal); - } - // This function specifically handles numeric/string literals for enum and accessor 'identifiers'. - // In a sense, it does not actually emit identifiers as much as it declares a name for a specific property. - // For example, this is utilized when feeding in a result to Object.defineProperty. - function emitExpressionForPropertyName(node) { - ts.Debug.assert(node.kind !== 155 /* BindingElement */); - if (node.kind === 8 /* StringLiteral */) { - emitLiteral(node); - } - else if (node.kind === 129 /* ComputedPropertyName */) { - // if this is a decorated computed property, we will need to capture the result - // of the property expression so that we can apply decorators later. This is to ensure - // we don't introduce unintended side effects: - // - // class C { - // [_a = x]() { } - // } - // - // The emit for the decorated computed property decorator is: - // - // Object.defineProperty(C.prototype, _a, __decorate([dec], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); - // - if (ts.nodeIsDecorated(node.parent)) { - if (!computedPropertyNamesToGeneratedNames) { - computedPropertyNamesToGeneratedNames = []; - } - var generatedName = computedPropertyNamesToGeneratedNames[ts.getNodeId(node)]; - if (generatedName) { - // we have already generated a variable for this node, write that value instead. - write(generatedName); - return; - } - generatedName = createAndRecordTempVariable(0 /* Auto */).text; - computedPropertyNamesToGeneratedNames[ts.getNodeId(node)] = generatedName; - write(generatedName); - write(" = "); - } - emit(node.expression); - } - else { - write("\""); - if (node.kind === 7 /* NumericLiteral */) { - write(node.text); - } - else { - writeTextOfNode(currentSourceFile, node); - } - write("\""); - } - } - function isExpressionIdentifier(node) { - var parent = node.parent; - switch (parent.kind) { - case 156 /* ArrayLiteralExpression */: - case 172 /* BinaryExpression */: - case 160 /* CallExpression */: - case 223 /* CaseClause */: - case 129 /* ComputedPropertyName */: - case 173 /* ConditionalExpression */: - case 132 /* Decorator */: - case 167 /* DeleteExpression */: - case 187 /* DoStatement */: - case 159 /* ElementAccessExpression */: - case 217 /* ExportAssignment */: - case 185 /* ExpressionStatement */: - case 179 /* ExpressionWithTypeArguments */: - case 189 /* ForStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - case 186 /* IfStatement */: - case 161 /* NewExpression */: - case 164 /* ParenthesizedExpression */: - case 171 /* PostfixUnaryExpression */: - case 170 /* PrefixUnaryExpression */: - case 194 /* ReturnStatement */: - case 228 /* ShorthandPropertyAssignment */: - case 176 /* SpreadElementExpression */: - case 196 /* SwitchStatement */: - case 162 /* TaggedTemplateExpression */: - case 180 /* TemplateSpan */: - case 198 /* ThrowStatement */: - case 163 /* TypeAssertionExpression */: - case 168 /* TypeOfExpression */: - case 169 /* VoidExpression */: - case 188 /* WhileStatement */: - case 195 /* WithStatement */: - case 175 /* YieldExpression */: - return true; - case 155 /* BindingElement */: - case 229 /* EnumMember */: - case 131 /* Parameter */: - case 227 /* PropertyAssignment */: - case 134 /* PropertyDeclaration */: - case 201 /* VariableDeclaration */: - return parent.initializer === node; - case 158 /* PropertyAccessExpression */: - return parent.expression === node; - case 166 /* ArrowFunction */: - case 165 /* FunctionExpression */: - return parent.body === node; - case 211 /* ImportEqualsDeclaration */: - return parent.moduleReference === node; - case 128 /* QualifiedName */: - return parent.left === node; - } - return false; - } - function emitExpressionIdentifier(node) { - var container = resolver.getReferencedExportContainer(node); - if (container) { - if (container.kind === 230 /* SourceFile */) { - // Identifier references module export - if (languageVersion < 2 /* ES6 */ && compilerOptions.module !== 4 /* System */) { - write("exports."); - } - } - else { - // Identifier references namespace export - write(getGeneratedNameForNode(container)); - write("."); - } - } - else if (languageVersion < 2 /* ES6 */) { - var declaration = resolver.getReferencedImportDeclaration(node); - if (declaration) { - if (declaration.kind === 213 /* ImportClause */) { - // Identifier references default import - write(getGeneratedNameForNode(declaration.parent)); - write(languageVersion === 0 /* ES3 */ ? '["default"]' : ".default"); - return; - } - else if (declaration.kind === 216 /* ImportSpecifier */) { - // Identifier references named import - write(getGeneratedNameForNode(declaration.parent.parent.parent)); - write("."); - writeTextOfNode(currentSourceFile, declaration.propertyName || declaration.name); - return; - } - } - declaration = resolver.getReferencedNestedRedeclaration(node); - if (declaration) { - write(getGeneratedNameForNode(declaration.name)); - return; - } - } - writeTextOfNode(currentSourceFile, node); - } - function isNameOfNestedRedeclaration(node) { - if (languageVersion < 2 /* ES6 */) { - var parent_7 = node.parent; - switch (parent_7.kind) { - case 155 /* BindingElement */: - case 204 /* ClassDeclaration */: - case 207 /* EnumDeclaration */: - case 201 /* VariableDeclaration */: - return parent_7.name === node && resolver.isNestedRedeclaration(parent_7); - } - } - return false; - } - function emitIdentifier(node) { - if (!node.parent) { - write(node.text); - } - else if (isExpressionIdentifier(node)) { - emitExpressionIdentifier(node); - } - else if (isNameOfNestedRedeclaration(node)) { - write(getGeneratedNameForNode(node)); - } - else { - writeTextOfNode(currentSourceFile, node); - } - } - function emitThis(node) { - if (resolver.getNodeCheckFlags(node) & 2 /* LexicalThis */) { - write("_this"); - } - else { - write("this"); - } - } - function emitSuper(node) { - if (languageVersion >= 2 /* ES6 */) { - write("super"); - } - else { - var flags = resolver.getNodeCheckFlags(node); - if (flags & 16 /* SuperInstance */) { - write("_super.prototype"); - } - else { - write("_super"); - } - } - } - function emitObjectBindingPattern(node) { - write("{ "); - var elements = node.elements; - emitList(elements, 0, elements.length, false, elements.hasTrailingComma); - write(" }"); - } - function emitArrayBindingPattern(node) { - write("["); - var elements = node.elements; - emitList(elements, 0, elements.length, false, elements.hasTrailingComma); - write("]"); - } - function emitBindingElement(node) { - if (node.propertyName) { - emit(node.propertyName); - write(": "); - } - if (node.dotDotDotToken) { - write("..."); - } - if (ts.isBindingPattern(node.name)) { - emit(node.name); - } - else { - emitModuleMemberName(node); - } - emitOptional(" = ", node.initializer); - } - function emitSpreadElementExpression(node) { - write("..."); - emit(node.expression); - } - function emitYieldExpression(node) { - write(ts.tokenToString(110 /* YieldKeyword */)); - if (node.asteriskToken) { - write("*"); - } - if (node.expression) { - write(" "); - emit(node.expression); - } - } - function needsParenthesisForPropertyAccessOrInvocation(node) { - switch (node.kind) { - case 65 /* Identifier */: - case 156 /* ArrayLiteralExpression */: - case 158 /* PropertyAccessExpression */: - case 159 /* ElementAccessExpression */: - case 160 /* CallExpression */: - case 164 /* ParenthesizedExpression */: - // This list is not exhaustive and only includes those cases that are relevant - // to the check in emitArrayLiteral. More cases can be added as needed. - return false; - } - return true; - } - function emitListWithSpread(elements, needsUniqueCopy, multiLine, trailingComma, useConcat) { - var pos = 0; - var group = 0; - var length = elements.length; - while (pos < length) { - // Emit using the pattern .concat(, , ...) - if (group === 1 && useConcat) { - write(".concat("); - } - else if (group > 0) { - write(", "); - } - var e = elements[pos]; - if (e.kind === 176 /* SpreadElementExpression */) { - e = e.expression; - emitParenthesizedIf(e, group === 0 && needsParenthesisForPropertyAccessOrInvocation(e)); - pos++; - if (pos === length && group === 0 && needsUniqueCopy && e.kind !== 156 /* ArrayLiteralExpression */) { - write(".slice()"); - } - } - else { - var i = pos; - while (i < length && elements[i].kind !== 176 /* SpreadElementExpression */) { - i++; - } - write("["); - if (multiLine) { - increaseIndent(); - } - emitList(elements, pos, i - pos, multiLine, trailingComma && i === length); - if (multiLine) { - decreaseIndent(); - } - write("]"); - pos = i; - } - group++; - } - if (group > 1) { - if (useConcat) { - write(")"); - } - } - } - function isSpreadElementExpression(node) { - return node.kind === 176 /* SpreadElementExpression */; - } - function emitArrayLiteral(node) { - var elements = node.elements; - if (elements.length === 0) { - write("[]"); - } - else if (languageVersion >= 2 /* ES6 */ || !ts.forEach(elements, isSpreadElementExpression)) { - write("["); - emitLinePreservingList(node, node.elements, elements.hasTrailingComma, false); - write("]"); - } - else { - emitListWithSpread(elements, true, (node.flags & 512 /* MultiLine */) !== 0, - /*trailingComma*/ elements.hasTrailingComma, true); - } - } - function emitObjectLiteralBody(node, numElements) { - if (numElements === 0) { - write("{}"); - return; - } - write("{"); - if (numElements > 0) { - var properties = node.properties; - // If we are not doing a downlevel transformation for object literals, - // then try to preserve the original shape of the object literal. - // Otherwise just try to preserve the formatting. - if (numElements === properties.length) { - emitLinePreservingList(node, properties, languageVersion >= 1 /* ES5 */, true); - } - else { - var multiLine = (node.flags & 512 /* MultiLine */) !== 0; - if (!multiLine) { - write(" "); - } - else { - increaseIndent(); - } - emitList(properties, 0, numElements, multiLine, false); - if (!multiLine) { - write(" "); - } - else { - decreaseIndent(); - } - } - } - write("}"); - } - function emitDownlevelObjectLiteralWithComputedProperties(node, firstComputedPropertyIndex) { - var multiLine = (node.flags & 512 /* MultiLine */) !== 0; - var properties = node.properties; - write("("); - if (multiLine) { - increaseIndent(); - } - // For computed properties, we need to create a unique handle to the object - // literal so we can modify it without risking internal assignments tainting the object. - var tempVar = createAndRecordTempVariable(0 /* Auto */); - // Write out the first non-computed properties - // (or all properties if none of them are computed), - // then emit the rest through indexing on the temp variable. - emit(tempVar); - write(" = "); - emitObjectLiteralBody(node, firstComputedPropertyIndex); - for (var i = firstComputedPropertyIndex, n = properties.length; i < n; i++) { - writeComma(); - var property = properties[i]; - emitStart(property); - if (property.kind === 138 /* GetAccessor */ || property.kind === 139 /* SetAccessor */) { - // TODO (drosen): Reconcile with 'emitMemberFunctions'. - var accessors = ts.getAllAccessorDeclarations(node.properties, property); - if (property !== accessors.firstAccessor) { - continue; - } - write("Object.defineProperty("); - emit(tempVar); - write(", "); - emitStart(node.name); - emitExpressionForPropertyName(property.name); - emitEnd(property.name); - write(", {"); - increaseIndent(); - if (accessors.getAccessor) { - writeLine(); - emitLeadingComments(accessors.getAccessor); - write("get: "); - emitStart(accessors.getAccessor); - write("function "); - emitSignatureAndBody(accessors.getAccessor); - emitEnd(accessors.getAccessor); - emitTrailingComments(accessors.getAccessor); - write(","); - } - if (accessors.setAccessor) { - writeLine(); - emitLeadingComments(accessors.setAccessor); - write("set: "); - emitStart(accessors.setAccessor); - write("function "); - emitSignatureAndBody(accessors.setAccessor); - emitEnd(accessors.setAccessor); - emitTrailingComments(accessors.setAccessor); - write(","); - } - writeLine(); - write("enumerable: true,"); - writeLine(); - write("configurable: true"); - decreaseIndent(); - writeLine(); - write("})"); - emitEnd(property); - } - else { - emitLeadingComments(property); - emitStart(property.name); - emit(tempVar); - emitMemberAccessForPropertyName(property.name); - emitEnd(property.name); - write(" = "); - if (property.kind === 227 /* PropertyAssignment */) { - emit(property.initializer); - } - else if (property.kind === 228 /* ShorthandPropertyAssignment */) { - emitExpressionIdentifier(property.name); - } - else if (property.kind === 136 /* MethodDeclaration */) { - emitFunctionDeclaration(property); - } - else { - ts.Debug.fail("ObjectLiteralElement type not accounted for: " + property.kind); - } - } - emitEnd(property); - } - writeComma(); - emit(tempVar); - if (multiLine) { - decreaseIndent(); - writeLine(); - } - write(")"); - function writeComma() { - if (multiLine) { - write(","); - writeLine(); - } - else { - write(", "); - } - } - } - function emitObjectLiteral(node) { - var properties = node.properties; - if (languageVersion < 2 /* ES6 */) { - var numProperties = properties.length; - // Find the first computed property. - // Everything until that point can be emitted as part of the initial object literal. - var numInitialNonComputedProperties = numProperties; - for (var i = 0, n = properties.length; i < n; i++) { - if (properties[i].name.kind === 129 /* ComputedPropertyName */) { - numInitialNonComputedProperties = i; - break; - } - } - var hasComputedProperty = numInitialNonComputedProperties !== properties.length; - if (hasComputedProperty) { - emitDownlevelObjectLiteralWithComputedProperties(node, numInitialNonComputedProperties); - return; - } - } - // Ordinary case: either the object has no computed properties - // or we're compiling with an ES6+ target. - emitObjectLiteralBody(node, properties.length); - } - function createBinaryExpression(left, operator, right, startsOnNewLine) { - var result = ts.createSynthesizedNode(172 /* BinaryExpression */, startsOnNewLine); - result.operatorToken = ts.createSynthesizedNode(operator); - result.left = left; - result.right = right; - return result; - } - function createPropertyAccessExpression(expression, name) { - var result = ts.createSynthesizedNode(158 /* PropertyAccessExpression */); - result.expression = parenthesizeForAccess(expression); - result.dotToken = ts.createSynthesizedNode(20 /* DotToken */); - result.name = name; - return result; - } - function createElementAccessExpression(expression, argumentExpression) { - var result = ts.createSynthesizedNode(159 /* ElementAccessExpression */); - result.expression = parenthesizeForAccess(expression); - result.argumentExpression = argumentExpression; - return result; - } - function parenthesizeForAccess(expr) { - // When diagnosing whether the expression needs parentheses, the decision should be based - // on the innermost expression in a chain of nested type assertions. - while (expr.kind === 163 /* TypeAssertionExpression */) { - expr = expr.expression; - } - // isLeftHandSideExpression is almost the correct criterion for when it is not necessary - // to parenthesize the expression before a dot. The known exceptions are: - // - // NewExpression: - // new C.x -> not the same as (new C).x - // NumberLiteral - // 1.x -> not the same as (1).x - // - if (ts.isLeftHandSideExpression(expr) && - expr.kind !== 161 /* NewExpression */ && - expr.kind !== 7 /* NumericLiteral */) { - return expr; - } - var node = ts.createSynthesizedNode(164 /* ParenthesizedExpression */); - node.expression = expr; - return node; - } - function emitComputedPropertyName(node) { - write("["); - emitExpressionForPropertyName(node); - write("]"); - } - function emitMethod(node) { - if (languageVersion >= 2 /* ES6 */ && node.asteriskToken) { - write("*"); - } - emit(node.name); - if (languageVersion < 2 /* ES6 */) { - write(": function "); - } - emitSignatureAndBody(node); - } - function emitPropertyAssignment(node) { - emit(node.name); - write(": "); - emit(node.initializer); - } - // Return true if identifier resolves to an exported member of a namespace - function isNamespaceExportReference(node) { - var container = resolver.getReferencedExportContainer(node); - return container && container.kind !== 230 /* SourceFile */; - } - function emitShorthandPropertyAssignment(node) { - // The name property of a short-hand property assignment is considered an expression position, so here - // we manually emit the identifier to avoid rewriting. - writeTextOfNode(currentSourceFile, node.name); - // If emitting pre-ES6 code, or if the name requires rewriting when resolved as an expression identifier, - // we emit a normal property assignment. For example: - // module m { - // export let y; - // } - // module m { - // let obj = { y }; - // } - // Here we need to emit obj = { y : m.y } regardless of the output target. - if (languageVersion < 2 /* ES6 */ || isNamespaceExportReference(node.name)) { - // Emit identifier as an identifier - write(": "); - emit(node.name); - } - } - function tryEmitConstantValue(node) { - if (compilerOptions.isolatedModules) { - // do not inline enum values in separate compilation mode - return false; - } - var constantValue = resolver.getConstantValue(node); - if (constantValue !== undefined) { - write(constantValue.toString()); - if (!compilerOptions.removeComments) { - var propertyName = node.kind === 158 /* PropertyAccessExpression */ ? ts.declarationNameToString(node.name) : ts.getTextOfNode(node.argumentExpression); - write(" /* " + propertyName + " */"); - } - return true; - } - return false; - } - // Returns 'true' if the code was actually indented, false otherwise. - // If the code is not indented, an optional valueToWriteWhenNotIndenting will be - // emitted instead. - function indentIfOnDifferentLines(parent, node1, node2, valueToWriteWhenNotIndenting) { - var realNodesAreOnDifferentLines = !ts.nodeIsSynthesized(parent) && !nodeEndIsOnSameLineAsNodeStart(node1, node2); - // Always use a newline for synthesized code if the synthesizer desires it. - var synthesizedNodeIsOnDifferentLine = synthesizedNodeStartsOnNewLine(node2); - if (realNodesAreOnDifferentLines || synthesizedNodeIsOnDifferentLine) { - increaseIndent(); - writeLine(); - return true; - } - else { - if (valueToWriteWhenNotIndenting) { - write(valueToWriteWhenNotIndenting); - } - return false; - } - } - function emitPropertyAccess(node) { - if (tryEmitConstantValue(node)) { - return; - } - emit(node.expression); - var indentedBeforeDot = indentIfOnDifferentLines(node, node.expression, node.dotToken); - write("."); - var indentedAfterDot = indentIfOnDifferentLines(node, node.dotToken, node.name); - emit(node.name); - decreaseIndentIf(indentedBeforeDot, indentedAfterDot); - } - function emitQualifiedName(node) { - emit(node.left); - write("."); - emit(node.right); - } - function emitIndexedAccess(node) { - if (tryEmitConstantValue(node)) { - return; - } - emit(node.expression); - write("["); - emit(node.argumentExpression); - write("]"); - } - function hasSpreadElement(elements) { - return ts.forEach(elements, function (e) { return e.kind === 176 /* SpreadElementExpression */; }); - } - function skipParentheses(node) { - while (node.kind === 164 /* ParenthesizedExpression */ || node.kind === 163 /* TypeAssertionExpression */) { - node = node.expression; - } - return node; - } - function emitCallTarget(node) { - if (node.kind === 65 /* Identifier */ || node.kind === 93 /* ThisKeyword */ || node.kind === 91 /* SuperKeyword */) { - emit(node); - return node; - } - var temp = createAndRecordTempVariable(0 /* Auto */); - write("("); - emit(temp); - write(" = "); - emit(node); - write(")"); - return temp; - } - function emitCallWithSpread(node) { - var target; - var expr = skipParentheses(node.expression); - if (expr.kind === 158 /* PropertyAccessExpression */) { - // Target will be emitted as "this" argument - target = emitCallTarget(expr.expression); - write("."); - emit(expr.name); - } - else if (expr.kind === 159 /* ElementAccessExpression */) { - // Target will be emitted as "this" argument - target = emitCallTarget(expr.expression); - write("["); - emit(expr.argumentExpression); - write("]"); - } - else if (expr.kind === 91 /* SuperKeyword */) { - target = expr; - write("_super"); - } - else { - emit(node.expression); - } - write(".apply("); - if (target) { - if (target.kind === 91 /* SuperKeyword */) { - // Calls of form super(...) and super.foo(...) - emitThis(target); - } - else { - // Calls of form obj.foo(...) - emit(target); - } - } - else { - // Calls of form foo(...) - write("void 0"); - } - write(", "); - emitListWithSpread(node.arguments, false, false, false, true); - write(")"); - } - function emitCallExpression(node) { - if (languageVersion < 2 /* ES6 */ && hasSpreadElement(node.arguments)) { - emitCallWithSpread(node); - return; - } - var superCall = false; - if (node.expression.kind === 91 /* SuperKeyword */) { - emitSuper(node.expression); - superCall = true; - } - else { - emit(node.expression); - superCall = node.expression.kind === 158 /* PropertyAccessExpression */ && node.expression.expression.kind === 91 /* SuperKeyword */; - } - if (superCall && languageVersion < 2 /* ES6 */) { - write(".call("); - emitThis(node.expression); - if (node.arguments.length) { - write(", "); - emitCommaList(node.arguments); - } - write(")"); - } - else { - write("("); - emitCommaList(node.arguments); - write(")"); - } - } - function emitNewExpression(node) { - write("new "); - // Spread operator logic is supported in new expressions in ES5 using a combination - // of Function.prototype.bind() and Function.prototype.apply(). - // - // Example: - // - // var args = [1, 2, 3, 4, 5]; - // new Array(...args); - // - // is compiled into the following ES5: - // - // var args = [1, 2, 3, 4, 5]; - // new (Array.bind.apply(Array, [void 0].concat(args))); - // - // The 'thisArg' to 'bind' is ignored when invoking the result of 'bind' with 'new', - // Thus, we set it to undefined ('void 0'). - if (languageVersion === 1 /* ES5 */ && - node.arguments && - hasSpreadElement(node.arguments)) { - write("("); - var target = emitCallTarget(node.expression); - write(".bind.apply("); - emit(target); - write(", [void 0].concat("); - emitListWithSpread(node.arguments, false, false, false, false); - write(")))"); - write("()"); - } - else { - emit(node.expression); - if (node.arguments) { - write("("); - emitCommaList(node.arguments); - write(")"); - } - } - } - function emitTaggedTemplateExpression(node) { - if (languageVersion >= 2 /* ES6 */) { - emit(node.tag); - write(" "); - emit(node.template); - } - else { - emitDownlevelTaggedTemplate(node); - } - } - function emitParenExpression(node) { - // If the node is synthesized, it means the emitter put the parentheses there, - // not the user. If we didn't want them, the emitter would not have put them - // there. - if (!ts.nodeIsSynthesized(node) && node.parent.kind !== 166 /* ArrowFunction */) { - if (node.expression.kind === 163 /* TypeAssertionExpression */) { - var operand = node.expression.expression; - // Make sure we consider all nested cast expressions, e.g.: - // (-A).x; - while (operand.kind == 163 /* TypeAssertionExpression */) { - operand = operand.expression; - } - // We have an expression of the form: (SubExpr) - // Emitting this as (SubExpr) is really not desirable. We would like to emit the subexpr as is. - // Omitting the parentheses, however, could cause change in the semantics of the generated - // code if the casted expression has a lower precedence than the rest of the expression, e.g.: - // (new A).foo should be emitted as (new A).foo and not new A.foo - // (typeof A).toString() should be emitted as (typeof A).toString() and not typeof A.toString() - // new (A()) should be emitted as new (A()) and not new A() - // (function foo() { })() should be emitted as an IIF (function foo(){})() and not declaration function foo(){} () - if (operand.kind !== 170 /* PrefixUnaryExpression */ && - operand.kind !== 169 /* VoidExpression */ && - operand.kind !== 168 /* TypeOfExpression */ && - operand.kind !== 167 /* DeleteExpression */ && - operand.kind !== 171 /* PostfixUnaryExpression */ && - operand.kind !== 161 /* NewExpression */ && - !(operand.kind === 160 /* CallExpression */ && node.parent.kind === 161 /* NewExpression */) && - !(operand.kind === 165 /* FunctionExpression */ && node.parent.kind === 160 /* CallExpression */)) { - emit(operand); - return; - } - } - } - write("("); - emit(node.expression); - write(")"); - } - function emitDeleteExpression(node) { - write(ts.tokenToString(74 /* DeleteKeyword */)); - write(" "); - emit(node.expression); - } - function emitVoidExpression(node) { - write(ts.tokenToString(99 /* VoidKeyword */)); - write(" "); - emit(node.expression); - } - function emitTypeOfExpression(node) { - write(ts.tokenToString(97 /* TypeOfKeyword */)); - write(" "); - emit(node.expression); - } - function isNameOfExportedSourceLevelDeclarationInSystemExternalModule(node) { - if (!isCurrentFileSystemExternalModule() || node.kind !== 65 /* Identifier */ || ts.nodeIsSynthesized(node)) { - return false; - } - var isVariableDeclarationOrBindingElement = node.parent && (node.parent.kind === 201 /* VariableDeclaration */ || node.parent.kind === 155 /* BindingElement */); - var targetDeclaration = isVariableDeclarationOrBindingElement - ? node.parent - : resolver.getReferencedValueDeclaration(node); - return isSourceFileLevelDeclarationInSystemJsModule(targetDeclaration, true); - } - function emitPrefixUnaryExpression(node) { - var exportChanged = isNameOfExportedSourceLevelDeclarationInSystemExternalModule(node.operand); - if (exportChanged) { - // emit - // ++x - // as - // exports('x', ++x) - write(exportFunctionForFile + "(\""); - emitNodeWithoutSourceMap(node.operand); - write("\", "); - } - write(ts.tokenToString(node.operator)); - // In some cases, we need to emit a space between the operator and the operand. One obvious case - // is when the operator is an identifier, like delete or typeof. We also need to do this for plus - // and minus expressions in certain cases. Specifically, consider the following two cases (parens - // are just for clarity of exposition, and not part of the source code): - // - // (+(+1)) - // (+(++1)) - // - // We need to emit a space in both cases. In the first case, the absence of a space will make - // the resulting expression a prefix increment operation. And in the second, it will make the resulting - // expression a prefix increment whose operand is a plus expression - (++(+x)) - // The same is true of minus of course. - if (node.operand.kind === 170 /* PrefixUnaryExpression */) { - var operand = node.operand; - if (node.operator === 33 /* PlusToken */ && (operand.operator === 33 /* PlusToken */ || operand.operator === 38 /* PlusPlusToken */)) { - write(" "); - } - else if (node.operator === 34 /* MinusToken */ && (operand.operator === 34 /* MinusToken */ || operand.operator === 39 /* MinusMinusToken */)) { - write(" "); - } - } - emit(node.operand); - if (exportChanged) { - write(")"); - } - } - function emitPostfixUnaryExpression(node) { - var exportChanged = isNameOfExportedSourceLevelDeclarationInSystemExternalModule(node.operand); - if (exportChanged) { - // export function returns the value that was passes as the second argument - // however for postfix unary expressions result value should be the value before modification. - // emit 'x++' as '(export('x', ++x) - 1)' and 'x--' as '(export('x', --x) + 1)' - write("(" + exportFunctionForFile + "(\""); - emitNodeWithoutSourceMap(node.operand); - write("\", "); - write(ts.tokenToString(node.operator)); - emit(node.operand); - if (node.operator === 38 /* PlusPlusToken */) { - write(") - 1)"); - } - else { - write(") + 1)"); - } - } - else { - emit(node.operand); - write(ts.tokenToString(node.operator)); - } - } - function shouldHoistDeclarationInSystemJsModule(node) { - return isSourceFileLevelDeclarationInSystemJsModule(node, false); - } - /* - * Checks if given node is a source file level declaration (not nested in module/function). - * If 'isExported' is true - then declaration must also be exported. - * This function is used in two cases: - * - check if node is a exported source file level value to determine - * if we should also export the value after its it changed - * - check if node is a source level declaration to emit it differently, - * i.e non-exported variable statement 'var x = 1' is hoisted so - * we we emit variable statement 'var' should be dropped. - */ - function isSourceFileLevelDeclarationInSystemJsModule(node, isExported) { - if (!node || languageVersion >= 2 /* ES6 */ || !isCurrentFileSystemExternalModule()) { - return false; - } - var current = node; - while (current) { - if (current.kind === 230 /* SourceFile */) { - return !isExported || ((ts.getCombinedNodeFlags(node) & 1 /* Export */) !== 0); - } - else if (ts.isFunctionLike(current) || current.kind === 209 /* ModuleBlock */) { - return false; - } - else { - current = current.parent; - } - } - } - function emitBinaryExpression(node) { - if (languageVersion < 2 /* ES6 */ && node.operatorToken.kind === 53 /* EqualsToken */ && - (node.left.kind === 157 /* ObjectLiteralExpression */ || node.left.kind === 156 /* ArrayLiteralExpression */)) { - emitDestructuring(node, node.parent.kind === 185 /* ExpressionStatement */); - } - else { - var exportChanged = node.operatorToken.kind >= 53 /* FirstAssignment */ && - node.operatorToken.kind <= 64 /* LastAssignment */ && - isNameOfExportedSourceLevelDeclarationInSystemExternalModule(node.left); - if (exportChanged) { - // emit assignment 'x y' as 'exports("x", x y)' - write(exportFunctionForFile + "(\""); - emitNodeWithoutSourceMap(node.left); - write("\", "); - } - emit(node.left); - var indentedBeforeOperator = indentIfOnDifferentLines(node, node.left, node.operatorToken, node.operatorToken.kind !== 23 /* CommaToken */ ? " " : undefined); - write(ts.tokenToString(node.operatorToken.kind)); - var indentedAfterOperator = indentIfOnDifferentLines(node, node.operatorToken, node.right, " "); - emit(node.right); - decreaseIndentIf(indentedBeforeOperator, indentedAfterOperator); - if (exportChanged) { - write(")"); - } - } - } - function synthesizedNodeStartsOnNewLine(node) { - return ts.nodeIsSynthesized(node) && node.startsOnNewLine; - } - function emitConditionalExpression(node) { - emit(node.condition); - var indentedBeforeQuestion = indentIfOnDifferentLines(node, node.condition, node.questionToken, " "); - write("?"); - var indentedAfterQuestion = indentIfOnDifferentLines(node, node.questionToken, node.whenTrue, " "); - emit(node.whenTrue); - decreaseIndentIf(indentedBeforeQuestion, indentedAfterQuestion); - var indentedBeforeColon = indentIfOnDifferentLines(node, node.whenTrue, node.colonToken, " "); - write(":"); - var indentedAfterColon = indentIfOnDifferentLines(node, node.colonToken, node.whenFalse, " "); - emit(node.whenFalse); - decreaseIndentIf(indentedBeforeColon, indentedAfterColon); - } - // Helper function to decrease the indent if we previously indented. Allows multiple - // previous indent values to be considered at a time. This also allows caller to just - // call this once, passing in all their appropriate indent values, instead of needing - // to call this helper function multiple times. - function decreaseIndentIf(value1, value2) { - if (value1) { - decreaseIndent(); - } - if (value2) { - decreaseIndent(); - } - } - function isSingleLineEmptyBlock(node) { - if (node && node.kind === 182 /* Block */) { - var block = node; - return block.statements.length === 0 && nodeEndIsOnSameLineAsNodeStart(block, block); - } - } - function emitBlock(node) { - if (isSingleLineEmptyBlock(node)) { - emitToken(14 /* OpenBraceToken */, node.pos); - write(" "); - emitToken(15 /* CloseBraceToken */, node.statements.end); - return; - } - emitToken(14 /* OpenBraceToken */, node.pos); - increaseIndent(); - scopeEmitStart(node.parent); - if (node.kind === 209 /* ModuleBlock */) { - ts.Debug.assert(node.parent.kind === 208 /* ModuleDeclaration */); - emitCaptureThisForNodeIfNecessary(node.parent); - } - emitLines(node.statements); - if (node.kind === 209 /* ModuleBlock */) { - emitTempDeclarations(true); - } - decreaseIndent(); - writeLine(); - emitToken(15 /* CloseBraceToken */, node.statements.end); - scopeEmitEnd(); - } - function emitEmbeddedStatement(node) { - if (node.kind === 182 /* Block */) { - write(" "); - emit(node); - } - else { - increaseIndent(); - writeLine(); - emit(node); - decreaseIndent(); - } - } - function emitExpressionStatement(node) { - emitParenthesizedIf(node.expression, node.expression.kind === 166 /* ArrowFunction */); - write(";"); - } - function emitIfStatement(node) { - var endPos = emitToken(84 /* IfKeyword */, node.pos); - write(" "); - endPos = emitToken(16 /* OpenParenToken */, endPos); - emit(node.expression); - emitToken(17 /* CloseParenToken */, node.expression.end); - emitEmbeddedStatement(node.thenStatement); - if (node.elseStatement) { - writeLine(); - emitToken(76 /* ElseKeyword */, node.thenStatement.end); - if (node.elseStatement.kind === 186 /* IfStatement */) { - write(" "); - emit(node.elseStatement); - } - else { - emitEmbeddedStatement(node.elseStatement); - } - } - } - function emitDoStatement(node) { - write("do"); - emitEmbeddedStatement(node.statement); - if (node.statement.kind === 182 /* Block */) { - write(" "); - } - else { - writeLine(); - } - write("while ("); - emit(node.expression); - write(");"); - } - function emitWhileStatement(node) { - write("while ("); - emit(node.expression); - write(")"); - emitEmbeddedStatement(node.statement); - } - /** - * Returns true if start of variable declaration list was emitted. - * Returns false if nothing was written - this can happen for source file level variable declarations - * in system modules where such variable declarations are hoisted. - */ - function tryEmitStartOfVariableDeclarationList(decl, startPos) { - if (shouldHoistVariable(decl, true)) { - // variables in variable declaration list were already hoisted - return false; - } - var tokenKind = 98 /* VarKeyword */; - if (decl && languageVersion >= 2 /* ES6 */) { - if (ts.isLet(decl)) { - tokenKind = 104 /* LetKeyword */; - } - else if (ts.isConst(decl)) { - tokenKind = 70 /* ConstKeyword */; - } - } - if (startPos !== undefined) { - emitToken(tokenKind, startPos); - write(" "); - } - else { - switch (tokenKind) { - case 98 /* VarKeyword */: - write("var "); - break; - case 104 /* LetKeyword */: - write("let "); - break; - case 70 /* ConstKeyword */: - write("const "); - break; - } - } - return true; - } - function emitVariableDeclarationListSkippingUninitializedEntries(list) { - var started = false; - for (var _a = 0, _b = list.declarations; _a < _b.length; _a++) { - var decl = _b[_a]; - if (!decl.initializer) { - continue; - } - if (!started) { - started = true; - } - else { - write(", "); - } - emit(decl); - } - return started; - } - function emitForStatement(node) { - var endPos = emitToken(82 /* ForKeyword */, node.pos); - write(" "); - endPos = emitToken(16 /* OpenParenToken */, endPos); - if (node.initializer && node.initializer.kind === 202 /* VariableDeclarationList */) { - var variableDeclarationList = node.initializer; - var startIsEmitted = tryEmitStartOfVariableDeclarationList(variableDeclarationList, endPos); - if (startIsEmitted) { - emitCommaList(variableDeclarationList.declarations); - } - else { - emitVariableDeclarationListSkippingUninitializedEntries(variableDeclarationList); - } - } - else if (node.initializer) { - emit(node.initializer); - } - write(";"); - emitOptional(" ", node.condition); - write(";"); - emitOptional(" ", node.incrementor); - write(")"); - emitEmbeddedStatement(node.statement); - } - function emitForInOrForOfStatement(node) { - if (languageVersion < 2 /* ES6 */ && node.kind === 191 /* ForOfStatement */) { - return emitDownLevelForOfStatement(node); - } - var endPos = emitToken(82 /* ForKeyword */, node.pos); - write(" "); - endPos = emitToken(16 /* OpenParenToken */, endPos); - if (node.initializer.kind === 202 /* VariableDeclarationList */) { - var variableDeclarationList = node.initializer; - if (variableDeclarationList.declarations.length >= 1) { - tryEmitStartOfVariableDeclarationList(variableDeclarationList, endPos); - emit(variableDeclarationList.declarations[0]); - } - } - else { - emit(node.initializer); - } - if (node.kind === 190 /* ForInStatement */) { - write(" in "); - } - else { - write(" of "); - } - emit(node.expression); - emitToken(17 /* CloseParenToken */, node.expression.end); - emitEmbeddedStatement(node.statement); - } - function emitDownLevelForOfStatement(node) { - // The following ES6 code: - // - // for (let v of expr) { } - // - // should be emitted as - // - // for (let _i = 0, _a = expr; _i < _a.length; _i++) { - // let v = _a[_i]; - // } - // - // where _a and _i are temps emitted to capture the RHS and the counter, - // respectively. - // When the left hand side is an expression instead of a let declaration, - // the "let v" is not emitted. - // When the left hand side is a let/const, the v is renamed if there is - // another v in scope. - // Note that all assignments to the LHS are emitted in the body, including - // all destructuring. - // Note also that because an extra statement is needed to assign to the LHS, - // for-of bodies are always emitted as blocks. - var endPos = emitToken(82 /* ForKeyword */, node.pos); - write(" "); - endPos = emitToken(16 /* OpenParenToken */, endPos); - // Do not emit the LHS let declaration yet, because it might contain destructuring. - // Do not call recordTempDeclaration because we are declaring the temps - // right here. Recording means they will be declared later. - // In the case where the user wrote an identifier as the RHS, like this: - // - // for (let v of arr) { } - // - // we don't want to emit a temporary variable for the RHS, just use it directly. - var rhsIsIdentifier = node.expression.kind === 65 /* Identifier */; - var counter = createTempVariable(268435456 /* _i */); - var rhsReference = rhsIsIdentifier ? node.expression : createTempVariable(0 /* Auto */); - // This is the let keyword for the counter and rhsReference. The let keyword for - // the LHS will be emitted inside the body. - emitStart(node.expression); - write("var "); - // _i = 0 - emitNodeWithoutSourceMap(counter); - write(" = 0"); - emitEnd(node.expression); - if (!rhsIsIdentifier) { - // , _a = expr - write(", "); - emitStart(node.expression); - emitNodeWithoutSourceMap(rhsReference); - write(" = "); - emitNodeWithoutSourceMap(node.expression); - emitEnd(node.expression); - } - write("; "); - // _i < _a.length; - emitStart(node.initializer); - emitNodeWithoutSourceMap(counter); - write(" < "); - emitNodeWithoutSourceMap(rhsReference); - write(".length"); - emitEnd(node.initializer); - write("; "); - // _i++) - emitStart(node.initializer); - emitNodeWithoutSourceMap(counter); - write("++"); - emitEnd(node.initializer); - emitToken(17 /* CloseParenToken */, node.expression.end); - // Body - write(" {"); - writeLine(); - increaseIndent(); - // Initialize LHS - // let v = _a[_i]; - var rhsIterationValue = createElementAccessExpression(rhsReference, counter); - emitStart(node.initializer); - if (node.initializer.kind === 202 /* VariableDeclarationList */) { - write("var "); - var variableDeclarationList = node.initializer; - if (variableDeclarationList.declarations.length > 0) { - var declaration = variableDeclarationList.declarations[0]; - if (ts.isBindingPattern(declaration.name)) { - // This works whether the declaration is a var, let, or const. - // It will use rhsIterationValue _a[_i] as the initializer. - emitDestructuring(declaration, false, rhsIterationValue); - } - else { - // The following call does not include the initializer, so we have - // to emit it separately. - emitNodeWithoutSourceMap(declaration); - write(" = "); - emitNodeWithoutSourceMap(rhsIterationValue); - } - } - else { - // It's an empty declaration list. This can only happen in an error case, if the user wrote - // for (let of []) {} - emitNodeWithoutSourceMap(createTempVariable(0 /* Auto */)); - write(" = "); - emitNodeWithoutSourceMap(rhsIterationValue); - } - } - else { - // Initializer is an expression. Emit the expression in the body, so that it's - // evaluated on every iteration. - var assignmentExpression = createBinaryExpression(node.initializer, 53 /* EqualsToken */, rhsIterationValue, false); - if (node.initializer.kind === 156 /* ArrayLiteralExpression */ || node.initializer.kind === 157 /* ObjectLiteralExpression */) { - // This is a destructuring pattern, so call emitDestructuring instead of emit. Calling emit will not work, because it will cause - // the BinaryExpression to be passed in instead of the expression statement, which will cause emitDestructuring to crash. - emitDestructuring(assignmentExpression, true, undefined); - } - else { - emitNodeWithoutSourceMap(assignmentExpression); - } - } - emitEnd(node.initializer); - write(";"); - if (node.statement.kind === 182 /* Block */) { - emitLines(node.statement.statements); - } - else { - writeLine(); - emit(node.statement); - } - writeLine(); - decreaseIndent(); - write("}"); - } - function emitBreakOrContinueStatement(node) { - emitToken(node.kind === 193 /* BreakStatement */ ? 66 /* BreakKeyword */ : 71 /* ContinueKeyword */, node.pos); - emitOptional(" ", node.label); - write(";"); - } - function emitReturnStatement(node) { - emitToken(90 /* ReturnKeyword */, node.pos); - emitOptional(" ", node.expression); - write(";"); - } - function emitWithStatement(node) { - write("with ("); - emit(node.expression); - write(")"); - emitEmbeddedStatement(node.statement); - } - function emitSwitchStatement(node) { - var endPos = emitToken(92 /* SwitchKeyword */, node.pos); - write(" "); - emitToken(16 /* OpenParenToken */, endPos); - emit(node.expression); - endPos = emitToken(17 /* CloseParenToken */, node.expression.end); - write(" "); - emitCaseBlock(node.caseBlock, endPos); - } - function emitCaseBlock(node, startPos) { - emitToken(14 /* OpenBraceToken */, startPos); - increaseIndent(); - emitLines(node.clauses); - decreaseIndent(); - writeLine(); - emitToken(15 /* CloseBraceToken */, node.clauses.end); - } - function nodeStartPositionsAreOnSameLine(node1, node2) { - return ts.getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node1.pos)) === - ts.getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node2.pos)); - } - function nodeEndPositionsAreOnSameLine(node1, node2) { - return ts.getLineOfLocalPosition(currentSourceFile, node1.end) === - ts.getLineOfLocalPosition(currentSourceFile, node2.end); - } - function nodeEndIsOnSameLineAsNodeStart(node1, node2) { - return ts.getLineOfLocalPosition(currentSourceFile, node1.end) === - ts.getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node2.pos)); - } - function emitCaseOrDefaultClause(node) { - if (node.kind === 223 /* CaseClause */) { - write("case "); - emit(node.expression); - write(":"); - } - else { - write("default:"); - } - if (node.statements.length === 1 && nodeStartPositionsAreOnSameLine(node, node.statements[0])) { - write(" "); - emit(node.statements[0]); - } - else { - increaseIndent(); - emitLines(node.statements); - decreaseIndent(); - } - } - function emitThrowStatement(node) { - write("throw "); - emit(node.expression); - write(";"); - } - function emitTryStatement(node) { - write("try "); - emit(node.tryBlock); - emit(node.catchClause); - if (node.finallyBlock) { - writeLine(); - write("finally "); - emit(node.finallyBlock); - } - } - function emitCatchClause(node) { - writeLine(); - var endPos = emitToken(68 /* CatchKeyword */, node.pos); - write(" "); - emitToken(16 /* OpenParenToken */, endPos); - emit(node.variableDeclaration); - emitToken(17 /* CloseParenToken */, node.variableDeclaration ? node.variableDeclaration.end : endPos); - write(" "); - emitBlock(node.block); - } - function emitDebuggerStatement(node) { - emitToken(72 /* DebuggerKeyword */, node.pos); - write(";"); - } - function emitLabelledStatement(node) { - emit(node.label); - write(": "); - emit(node.statement); - } - function getContainingModule(node) { - do { - node = node.parent; - } while (node && node.kind !== 208 /* ModuleDeclaration */); - return node; - } - function emitContainingModuleName(node) { - var container = getContainingModule(node); - write(container ? getGeneratedNameForNode(container) : "exports"); - } - function emitModuleMemberName(node) { - emitStart(node.name); - if (ts.getCombinedNodeFlags(node) & 1 /* Export */) { - var container = getContainingModule(node); - if (container) { - write(getGeneratedNameForNode(container)); - write("."); - } - else if (languageVersion < 2 /* ES6 */ && compilerOptions.module !== 4 /* System */) { - write("exports."); - } - } - emitNodeWithoutSourceMap(node.name); - emitEnd(node.name); - } - function createVoidZero() { - var zero = ts.createSynthesizedNode(7 /* NumericLiteral */); - zero.text = "0"; - var result = ts.createSynthesizedNode(169 /* VoidExpression */); - result.expression = zero; - return result; - } - function emitExportMemberAssignment(node) { - if (node.flags & 1 /* Export */) { - writeLine(); - emitStart(node); - // emit call to exporter only for top level nodes - if (compilerOptions.module === 4 /* System */ && node.parent === currentSourceFile) { - // emit export default as - // export("default", ) - write(exportFunctionForFile + "(\""); - if (node.flags & 256 /* Default */) { - write("default"); - } - else { - emitNodeWithoutSourceMap(node.name); - } - write("\", "); - emitDeclarationName(node); - write(")"); - } - else { - if (node.flags & 256 /* Default */) { - if (languageVersion === 0 /* ES3 */) { - write("exports[\"default\"]"); - } - else { - write("exports.default"); - } - } - else { - emitModuleMemberName(node); - } - write(" = "); - emitDeclarationName(node); - } - emitEnd(node); - write(";"); - } - } - function emitExportMemberAssignments(name) { - if (!exportEquals && exportSpecifiers && ts.hasProperty(exportSpecifiers, name.text)) { - for (var _a = 0, _b = exportSpecifiers[name.text]; _a < _b.length; _a++) { - var specifier = _b[_a]; - writeLine(); - if (compilerOptions.module === 4 /* System */) { - emitStart(specifier.name); - write(exportFunctionForFile + "(\""); - emitNodeWithoutSourceMap(specifier.name); - write("\", "); - emitExpressionIdentifier(name); - write(")"); - emitEnd(specifier.name); - } - else { - emitStart(specifier.name); - emitContainingModuleName(specifier); - write("."); - emitNodeWithoutSourceMap(specifier.name); - emitEnd(specifier.name); - write(" = "); - emitExpressionIdentifier(name); - } - write(";"); - } - } - } - function emitDestructuring(root, isAssignmentExpressionStatement, value) { - var emitCount = 0; - // An exported declaration is actually emitted as an assignment (to a property on the module object), so - // temporary variables in an exported declaration need to have real declarations elsewhere - // Also temporary variables should be explicitly allocated for source level declarations when module target is system - // because actual variable declarations are hoisted - var canDefineTempVariablesInPlace = false; - if (root.kind === 201 /* VariableDeclaration */) { - var isExported = ts.getCombinedNodeFlags(root) & 1 /* Export */; - var isSourceLevelForSystemModuleKind = shouldHoistDeclarationInSystemJsModule(root); - canDefineTempVariablesInPlace = !isExported && !isSourceLevelForSystemModuleKind; - } - else if (root.kind === 131 /* Parameter */) { - canDefineTempVariablesInPlace = true; - } - if (root.kind === 172 /* BinaryExpression */) { - emitAssignmentExpression(root); - } - else { - ts.Debug.assert(!isAssignmentExpressionStatement); - emitBindingElement(root, value); - } - function emitAssignment(name, value) { - if (emitCount++) { - write(", "); - } - var isVariableDeclarationOrBindingElement = name.parent && (name.parent.kind === 201 /* VariableDeclaration */ || name.parent.kind === 155 /* BindingElement */); - var exportChanged = isNameOfExportedSourceLevelDeclarationInSystemExternalModule(name); - if (exportChanged) { - write(exportFunctionForFile + "(\""); - emitNodeWithoutSourceMap(name); - write("\", "); - } - if (isVariableDeclarationOrBindingElement) { - emitModuleMemberName(name.parent); - } - else { - emit(name); - } - write(" = "); - emit(value); - if (exportChanged) { - write(")"); - } - } - function ensureIdentifier(expr) { - if (expr.kind !== 65 /* Identifier */) { - var identifier = createTempVariable(0 /* Auto */); - if (!canDefineTempVariablesInPlace) { - recordTempDeclaration(identifier); - } - emitAssignment(identifier, expr); - expr = identifier; - } - return expr; - } - function createDefaultValueCheck(value, defaultValue) { - // The value expression will be evaluated twice, so for anything but a simple identifier - // we need to generate a temporary variable - value = ensureIdentifier(value); - // Return the expression 'value === void 0 ? defaultValue : value' - var equals = ts.createSynthesizedNode(172 /* BinaryExpression */); - equals.left = value; - equals.operatorToken = ts.createSynthesizedNode(30 /* EqualsEqualsEqualsToken */); - equals.right = createVoidZero(); - return createConditionalExpression(equals, defaultValue, value); - } - function createConditionalExpression(condition, whenTrue, whenFalse) { - var cond = ts.createSynthesizedNode(173 /* ConditionalExpression */); - cond.condition = condition; - cond.questionToken = ts.createSynthesizedNode(50 /* QuestionToken */); - cond.whenTrue = whenTrue; - cond.colonToken = ts.createSynthesizedNode(51 /* ColonToken */); - cond.whenFalse = whenFalse; - return cond; - } - function createNumericLiteral(value) { - var node = ts.createSynthesizedNode(7 /* NumericLiteral */); - node.text = "" + value; - return node; - } - function createPropertyAccessForDestructuringProperty(object, propName) { - // We create a synthetic copy of the identifier in order to avoid the rewriting that might - // otherwise occur when the identifier is emitted. - var syntheticName = ts.createSynthesizedNode(propName.kind); - syntheticName.text = propName.text; - if (syntheticName.kind !== 65 /* Identifier */) { - return createElementAccessExpression(object, syntheticName); - } - return createPropertyAccessExpression(object, syntheticName); - } - function createSliceCall(value, sliceIndex) { - var call = ts.createSynthesizedNode(160 /* CallExpression */); - var sliceIdentifier = ts.createSynthesizedNode(65 /* Identifier */); - sliceIdentifier.text = "slice"; - call.expression = createPropertyAccessExpression(value, sliceIdentifier); - call.arguments = ts.createSynthesizedNodeArray(); - call.arguments[0] = createNumericLiteral(sliceIndex); - return call; - } - function emitObjectLiteralAssignment(target, value) { - var properties = target.properties; - if (properties.length !== 1) { - // For anything but a single element destructuring we need to generate a temporary - // to ensure value is evaluated exactly once. - value = ensureIdentifier(value); - } - for (var _a = 0; _a < properties.length; _a++) { - var p = properties[_a]; - if (p.kind === 227 /* PropertyAssignment */ || p.kind === 228 /* ShorthandPropertyAssignment */) { - var propName = p.name; - emitDestructuringAssignment(p.initializer || propName, createPropertyAccessForDestructuringProperty(value, propName)); - } - } - } - function emitArrayLiteralAssignment(target, value) { - var elements = target.elements; - if (elements.length !== 1) { - // For anything but a single element destructuring we need to generate a temporary - // to ensure value is evaluated exactly once. - value = ensureIdentifier(value); - } - for (var i = 0; i < elements.length; i++) { - var e = elements[i]; - if (e.kind !== 178 /* OmittedExpression */) { - if (e.kind !== 176 /* SpreadElementExpression */) { - emitDestructuringAssignment(e, createElementAccessExpression(value, createNumericLiteral(i))); - } - else if (i === elements.length - 1) { - emitDestructuringAssignment(e.expression, createSliceCall(value, i)); - } - } - } - } - function emitDestructuringAssignment(target, value) { - if (target.kind === 172 /* BinaryExpression */ && target.operatorToken.kind === 53 /* EqualsToken */) { - value = createDefaultValueCheck(value, target.right); - target = target.left; - } - if (target.kind === 157 /* ObjectLiteralExpression */) { - emitObjectLiteralAssignment(target, value); - } - else if (target.kind === 156 /* ArrayLiteralExpression */) { - emitArrayLiteralAssignment(target, value); - } - else { - emitAssignment(target, value); - } - } - function emitAssignmentExpression(root) { - var target = root.left; - var value = root.right; - if (isAssignmentExpressionStatement) { - emitDestructuringAssignment(target, value); - } - else { - if (root.parent.kind !== 164 /* ParenthesizedExpression */) { - write("("); - } - value = ensureIdentifier(value); - emitDestructuringAssignment(target, value); - write(", "); - emit(value); - if (root.parent.kind !== 164 /* ParenthesizedExpression */) { - write(")"); - } - } - } - function emitBindingElement(target, value) { - if (target.initializer) { - // Combine value and initializer - value = value ? createDefaultValueCheck(value, target.initializer) : target.initializer; - } - else if (!value) { - // Use 'void 0' in absence of value and initializer - value = createVoidZero(); - } - if (ts.isBindingPattern(target.name)) { - var pattern = target.name; - var elements = pattern.elements; - if (elements.length !== 1) { - // For anything but a single element destructuring we need to generate a temporary - // to ensure value is evaluated exactly once. - value = ensureIdentifier(value); - } - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - if (pattern.kind === 153 /* ObjectBindingPattern */) { - // Rewrite element to a declaration with an initializer that fetches property - var propName = element.propertyName || element.name; - emitBindingElement(element, createPropertyAccessForDestructuringProperty(value, propName)); - } - else if (element.kind !== 178 /* OmittedExpression */) { - if (!element.dotDotDotToken) { - // Rewrite element to a declaration that accesses array element at index i - emitBindingElement(element, createElementAccessExpression(value, createNumericLiteral(i))); - } - else if (i === elements.length - 1) { - emitBindingElement(element, createSliceCall(value, i)); - } - } - } - } - else { - emitAssignment(target.name, value); - } - } - } - function emitVariableDeclaration(node) { - if (ts.isBindingPattern(node.name)) { - if (languageVersion < 2 /* ES6 */) { - emitDestructuring(node, false); - } - else { - emit(node.name); - emitOptional(" = ", node.initializer); - } - } - else { - var initializer = node.initializer; - if (!initializer && languageVersion < 2 /* ES6 */) { - // downlevel emit for non-initialized let bindings defined in loops - // for (...) { let x; } - // should be - // for (...) { var = void 0; } - // this is necessary to preserve ES6 semantic in scenarios like - // for (...) { let x; console.log(x); x = 1 } // assignment on one iteration should not affect other iterations - var isUninitializedLet = (resolver.getNodeCheckFlags(node) & 256 /* BlockScopedBindingInLoop */) && - (getCombinedFlagsForIdentifier(node.name) & 4096 /* Let */); - // NOTE: default initialization should not be added to let bindings in for-in\for-of statements - if (isUninitializedLet && - node.parent.parent.kind !== 190 /* ForInStatement */ && - node.parent.parent.kind !== 191 /* ForOfStatement */) { - initializer = createVoidZero(); - } - } - var exportChanged = isNameOfExportedSourceLevelDeclarationInSystemExternalModule(node.name); - if (exportChanged) { - write(exportFunctionForFile + "(\""); - emitNodeWithoutSourceMap(node.name); - write("\", "); - } - emitModuleMemberName(node); - emitOptional(" = ", initializer); - if (exportChanged) { - write(")"); - } - } - } - function emitExportVariableAssignments(node) { - if (node.kind === 178 /* OmittedExpression */) { - return; - } - var name = node.name; - if (name.kind === 65 /* Identifier */) { - emitExportMemberAssignments(name); - } - else if (ts.isBindingPattern(name)) { - ts.forEach(name.elements, emitExportVariableAssignments); - } - } - function getCombinedFlagsForIdentifier(node) { - if (!node.parent || (node.parent.kind !== 201 /* VariableDeclaration */ && node.parent.kind !== 155 /* BindingElement */)) { - return 0; - } - return ts.getCombinedNodeFlags(node.parent); - } - function isES6ExportedDeclaration(node) { - return !!(node.flags & 1 /* Export */) && - languageVersion >= 2 /* ES6 */ && - node.parent.kind === 230 /* SourceFile */; - } - function emitVariableStatement(node) { - var startIsEmitted = false; - if (node.flags & 1 /* Export */) { - if (isES6ExportedDeclaration(node)) { - // Exported ES6 module member - write("export "); - startIsEmitted = tryEmitStartOfVariableDeclarationList(node.declarationList); - } - } - else { - startIsEmitted = tryEmitStartOfVariableDeclarationList(node.declarationList); - } - if (startIsEmitted) { - emitCommaList(node.declarationList.declarations); - write(";"); - } - else { - var atLeastOneItem = emitVariableDeclarationListSkippingUninitializedEntries(node.declarationList); - if (atLeastOneItem) { - write(";"); - } - } - if (languageVersion < 2 /* ES6 */ && node.parent === currentSourceFile) { - ts.forEach(node.declarationList.declarations, emitExportVariableAssignments); - } - } - function shouldEmitLeadingAndTrailingCommentsForVariableStatement(node) { - // If we're not exporting the variables, there's nothing special here. - // Always emit comments for these nodes. - if (!(node.flags & 1 /* Export */)) { - return true; - } - // If we are exporting, but it's a top-level ES6 module exports, - // we'll emit the declaration list verbatim, so emit comments too. - if (isES6ExportedDeclaration(node)) { - return true; - } - // Otherwise, only emit if we have at least one initializer present. - for (var _a = 0, _b = node.declarationList.declarations; _a < _b.length; _a++) { - var declaration = _b[_a]; - if (declaration.initializer) { - return true; - } - } - return false; - } - function emitParameter(node) { - if (languageVersion < 2 /* ES6 */) { - if (ts.isBindingPattern(node.name)) { - var name_23 = createTempVariable(0 /* Auto */); - if (!tempParameters) { - tempParameters = []; - } - tempParameters.push(name_23); - emit(name_23); - } - else { - emit(node.name); - } - } - else { - if (node.dotDotDotToken) { - write("..."); - } - emit(node.name); - emitOptional(" = ", node.initializer); - } - } - function emitDefaultValueAssignments(node) { - if (languageVersion < 2 /* ES6 */) { - var tempIndex = 0; - ts.forEach(node.parameters, function (p) { - // A rest parameter cannot have a binding pattern or an initializer, - // so let's just ignore it. - if (p.dotDotDotToken) { - return; - } - if (ts.isBindingPattern(p.name)) { - writeLine(); - write("var "); - emitDestructuring(p, false, tempParameters[tempIndex]); - write(";"); - tempIndex++; - } - else if (p.initializer) { - writeLine(); - emitStart(p); - write("if ("); - emitNodeWithoutSourceMap(p.name); - write(" === void 0)"); - emitEnd(p); - write(" { "); - emitStart(p); - emitNodeWithoutSourceMap(p.name); - write(" = "); - emitNodeWithoutSourceMap(p.initializer); - emitEnd(p); - write("; }"); - } - }); - } - } - function emitRestParameter(node) { - if (languageVersion < 2 /* ES6 */ && ts.hasRestParameter(node)) { - var restIndex = node.parameters.length - 1; - var restParam = node.parameters[restIndex]; - // A rest parameter cannot have a binding pattern, so let's just ignore it if it does. - if (ts.isBindingPattern(restParam.name)) { - return; - } - var tempName = createTempVariable(268435456 /* _i */).text; - writeLine(); - emitLeadingComments(restParam); - emitStart(restParam); - write("var "); - emitNodeWithoutSourceMap(restParam.name); - write(" = [];"); - emitEnd(restParam); - emitTrailingComments(restParam); - writeLine(); - write("for ("); - emitStart(restParam); - write("var " + tempName + " = " + restIndex + ";"); - emitEnd(restParam); - write(" "); - emitStart(restParam); - write(tempName + " < arguments.length;"); - emitEnd(restParam); - write(" "); - emitStart(restParam); - write(tempName + "++"); - emitEnd(restParam); - write(") {"); - increaseIndent(); - writeLine(); - emitStart(restParam); - emitNodeWithoutSourceMap(restParam.name); - write("[" + tempName + " - " + restIndex + "] = arguments[" + tempName + "];"); - emitEnd(restParam); - decreaseIndent(); - writeLine(); - write("}"); - } - } - function emitAccessor(node) { - write(node.kind === 138 /* GetAccessor */ ? "get " : "set "); - emit(node.name); - emitSignatureAndBody(node); - } - function shouldEmitAsArrowFunction(node) { - return node.kind === 166 /* ArrowFunction */ && languageVersion >= 2 /* ES6 */; - } - function emitDeclarationName(node) { - if (node.name) { - emitNodeWithoutSourceMap(node.name); - } - else { - write(getGeneratedNameForNode(node)); - } - } - function shouldEmitFunctionName(node) { - if (node.kind === 165 /* FunctionExpression */) { - // Emit name if one is present - return !!node.name; - } - if (node.kind === 203 /* FunctionDeclaration */) { - // Emit name if one is present, or emit generated name in down-level case (for export default case) - return !!node.name || languageVersion < 2 /* ES6 */; - } - } - function emitFunctionDeclaration(node) { - if (ts.nodeIsMissing(node.body)) { - return emitOnlyPinnedOrTripleSlashComments(node); - } - if (node.kind !== 136 /* MethodDeclaration */ && node.kind !== 135 /* MethodSignature */) { - // Methods will emit the comments as part of emitting method declaration - emitLeadingComments(node); - } - // For targeting below es6, emit functions-like declaration including arrow function using function keyword. - // When targeting ES6, emit arrow function natively in ES6 by omitting function keyword and using fat arrow instead - if (!shouldEmitAsArrowFunction(node)) { - if (isES6ExportedDeclaration(node)) { - write("export "); - if (node.flags & 256 /* Default */) { - write("default "); - } - } - write("function"); - if (languageVersion >= 2 /* ES6 */ && node.asteriskToken) { - write("*"); - } - write(" "); - } - if (shouldEmitFunctionName(node)) { - emitDeclarationName(node); - } - emitSignatureAndBody(node); - if (languageVersion < 2 /* ES6 */ && node.kind === 203 /* FunctionDeclaration */ && node.parent === currentSourceFile && node.name) { - emitExportMemberAssignments(node.name); - } - if (node.kind !== 136 /* MethodDeclaration */ && node.kind !== 135 /* MethodSignature */) { - emitTrailingComments(node); - } - } - function emitCaptureThisForNodeIfNecessary(node) { - if (resolver.getNodeCheckFlags(node) & 4 /* CaptureThis */) { - writeLine(); - emitStart(node); - write("var _this = this;"); - emitEnd(node); - } - } - function emitSignatureParameters(node) { - increaseIndent(); - write("("); - if (node) { - var parameters = node.parameters; - var omitCount = languageVersion < 2 /* ES6 */ && ts.hasRestParameter(node) ? 1 : 0; - emitList(parameters, 0, parameters.length - omitCount, false, false); - } - write(")"); - decreaseIndent(); - } - function emitSignatureParametersForArrow(node) { - // Check whether the parameter list needs parentheses and preserve no-parenthesis - if (node.parameters.length === 1 && node.pos === node.parameters[0].pos) { - emit(node.parameters[0]); - return; - } - emitSignatureParameters(node); - } - function emitSignatureAndBody(node) { - var saveTempFlags = tempFlags; - var saveTempVariables = tempVariables; - var saveTempParameters = tempParameters; - tempFlags = 0; - tempVariables = undefined; - tempParameters = undefined; - // When targeting ES6, emit arrow function natively in ES6 - if (shouldEmitAsArrowFunction(node)) { - emitSignatureParametersForArrow(node); - write(" =>"); - } - else { - emitSignatureParameters(node); - } - if (!node.body) { - // There can be no body when there are parse errors. Just emit an empty block - // in that case. - write(" { }"); - } - else if (node.body.kind === 182 /* Block */) { - emitBlockFunctionBody(node, node.body); - } - else { - emitExpressionFunctionBody(node, node.body); - } - if (!isES6ExportedDeclaration(node)) { - emitExportMemberAssignment(node); - } - tempFlags = saveTempFlags; - tempVariables = saveTempVariables; - tempParameters = saveTempParameters; - } - // Returns true if any preamble code was emitted. - function emitFunctionBodyPreamble(node) { - emitCaptureThisForNodeIfNecessary(node); - emitDefaultValueAssignments(node); - emitRestParameter(node); - } - function emitExpressionFunctionBody(node, body) { - if (languageVersion < 2 /* ES6 */) { - emitDownLevelExpressionFunctionBody(node, body); - return; - } - // For es6 and higher we can emit the expression as is. However, in the case - // where the expression might end up looking like a block when emitted, we'll - // also wrap it in parentheses first. For example if you have: a => {} - // then we need to generate: a => ({}) - write(" "); - // Unwrap all type assertions. - var current = body; - while (current.kind === 163 /* TypeAssertionExpression */) { - current = current.expression; - } - emitParenthesizedIf(body, current.kind === 157 /* ObjectLiteralExpression */); - } - function emitDownLevelExpressionFunctionBody(node, body) { - write(" {"); - scopeEmitStart(node); - increaseIndent(); - var outPos = writer.getTextPos(); - emitDetachedComments(node.body); - emitFunctionBodyPreamble(node); - var preambleEmitted = writer.getTextPos() !== outPos; - decreaseIndent(); - // If we didn't have to emit any preamble code, then attempt to keep the arrow - // function on one line. - if (!preambleEmitted && nodeStartPositionsAreOnSameLine(node, body)) { - write(" "); - emitStart(body); - write("return "); - emit(body); - emitEnd(body); - write(";"); - emitTempDeclarations(false); - write(" "); - } - else { - increaseIndent(); - writeLine(); - emitLeadingComments(node.body); - write("return "); - emit(body); - write(";"); - emitTrailingComments(node.body); - emitTempDeclarations(true); - decreaseIndent(); - writeLine(); - } - emitStart(node.body); - write("}"); - emitEnd(node.body); - scopeEmitEnd(); - } - function emitBlockFunctionBody(node, body) { - write(" {"); - scopeEmitStart(node); - var initialTextPos = writer.getTextPos(); - increaseIndent(); - emitDetachedComments(body.statements); - // Emit all the directive prologues (like "use strict"). These have to come before - // any other preamble code we write (like parameter initializers). - var startIndex = emitDirectivePrologues(body.statements, true); - emitFunctionBodyPreamble(node); - decreaseIndent(); - var preambleEmitted = writer.getTextPos() !== initialTextPos; - if (!preambleEmitted && nodeEndIsOnSameLineAsNodeStart(body, body)) { - for (var _a = 0, _b = body.statements; _a < _b.length; _a++) { - var statement = _b[_a]; - write(" "); - emit(statement); - } - emitTempDeclarations(false); - write(" "); - emitLeadingCommentsOfPosition(body.statements.end); - } - else { - increaseIndent(); - emitLinesStartingAt(body.statements, startIndex); - emitTempDeclarations(true); - writeLine(); - emitLeadingCommentsOfPosition(body.statements.end); - decreaseIndent(); - } - emitToken(15 /* CloseBraceToken */, body.statements.end); - scopeEmitEnd(); - } - function findInitialSuperCall(ctor) { - if (ctor.body) { - var statement = ctor.body.statements[0]; - if (statement && statement.kind === 185 /* ExpressionStatement */) { - var expr = statement.expression; - if (expr && expr.kind === 160 /* CallExpression */) { - var func = expr.expression; - if (func && func.kind === 91 /* SuperKeyword */) { - return statement; - } - } - } - } - } - function emitParameterPropertyAssignments(node) { - ts.forEach(node.parameters, function (param) { - if (param.flags & 112 /* AccessibilityModifier */) { - writeLine(); - emitStart(param); - emitStart(param.name); - write("this."); - emitNodeWithoutSourceMap(param.name); - emitEnd(param.name); - write(" = "); - emit(param.name); - write(";"); - emitEnd(param); - } - }); - } - function emitMemberAccessForPropertyName(memberName) { - // TODO: (jfreeman,drosen): comment on why this is emitNodeWithoutSourceMap instead of emit here. - if (memberName.kind === 8 /* StringLiteral */ || memberName.kind === 7 /* NumericLiteral */) { - write("["); - emitNodeWithoutSourceMap(memberName); - write("]"); - } - else if (memberName.kind === 129 /* ComputedPropertyName */) { - emitComputedPropertyName(memberName); - } - else { - write("."); - emitNodeWithoutSourceMap(memberName); - } - } - function getInitializedProperties(node, isStatic) { - var properties = []; - for (var _a = 0, _b = node.members; _a < _b.length; _a++) { - var member = _b[_a]; - if (member.kind === 134 /* PropertyDeclaration */ && isStatic === ((member.flags & 128 /* Static */) !== 0) && member.initializer) { - properties.push(member); - } - } - return properties; - } - function emitPropertyDeclarations(node, properties) { - for (var _a = 0; _a < properties.length; _a++) { - var property = properties[_a]; - emitPropertyDeclaration(node, property); - } - } - function emitPropertyDeclaration(node, property, receiver, isExpression) { - writeLine(); - emitLeadingComments(property); - emitStart(property); - emitStart(property.name); - if (receiver) { - emit(receiver); - } - else { - if (property.flags & 128 /* Static */) { - emitDeclarationName(node); - } - else { - write("this"); - } - } - emitMemberAccessForPropertyName(property.name); - emitEnd(property.name); - write(" = "); - emit(property.initializer); - if (!isExpression) { - write(";"); - } - emitEnd(property); - emitTrailingComments(property); - } - function emitMemberFunctionsForES5AndLower(node) { - ts.forEach(node.members, function (member) { - if (member.kind === 181 /* SemicolonClassElement */) { - writeLine(); - write(";"); - } - else if (member.kind === 136 /* MethodDeclaration */ || node.kind === 135 /* MethodSignature */) { - if (!member.body) { - return emitOnlyPinnedOrTripleSlashComments(member); - } - writeLine(); - emitLeadingComments(member); - emitStart(member); - emitStart(member.name); - emitClassMemberPrefix(node, member); - emitMemberAccessForPropertyName(member.name); - emitEnd(member.name); - write(" = "); - emitStart(member); - emitFunctionDeclaration(member); - emitEnd(member); - emitEnd(member); - write(";"); - emitTrailingComments(member); - } - else if (member.kind === 138 /* GetAccessor */ || member.kind === 139 /* SetAccessor */) { - var accessors = ts.getAllAccessorDeclarations(node.members, member); - if (member === accessors.firstAccessor) { - writeLine(); - emitStart(member); - write("Object.defineProperty("); - emitStart(member.name); - emitClassMemberPrefix(node, member); - write(", "); - emitExpressionForPropertyName(member.name); - emitEnd(member.name); - write(", {"); - increaseIndent(); - if (accessors.getAccessor) { - writeLine(); - emitLeadingComments(accessors.getAccessor); - write("get: "); - emitStart(accessors.getAccessor); - write("function "); - emitSignatureAndBody(accessors.getAccessor); - emitEnd(accessors.getAccessor); - emitTrailingComments(accessors.getAccessor); - write(","); - } - if (accessors.setAccessor) { - writeLine(); - emitLeadingComments(accessors.setAccessor); - write("set: "); - emitStart(accessors.setAccessor); - write("function "); - emitSignatureAndBody(accessors.setAccessor); - emitEnd(accessors.setAccessor); - emitTrailingComments(accessors.setAccessor); - write(","); - } - writeLine(); - write("enumerable: true,"); - writeLine(); - write("configurable: true"); - decreaseIndent(); - writeLine(); - write("});"); - emitEnd(member); - } - } - }); - } - function emitMemberFunctionsForES6AndHigher(node) { - for (var _a = 0, _b = node.members; _a < _b.length; _a++) { - var member = _b[_a]; - if ((member.kind === 136 /* MethodDeclaration */ || node.kind === 135 /* MethodSignature */) && !member.body) { - emitOnlyPinnedOrTripleSlashComments(member); - } - else if (member.kind === 136 /* MethodDeclaration */ || - member.kind === 138 /* GetAccessor */ || - member.kind === 139 /* SetAccessor */) { - writeLine(); - emitLeadingComments(member); - emitStart(member); - if (member.flags & 128 /* Static */) { - write("static "); - } - if (member.kind === 138 /* GetAccessor */) { - write("get "); - } - else if (member.kind === 139 /* SetAccessor */) { - write("set "); - } - if (member.asteriskToken) { - write("*"); - } - emit(member.name); - emitSignatureAndBody(member); - emitEnd(member); - emitTrailingComments(member); - } - else if (member.kind === 181 /* SemicolonClassElement */) { - writeLine(); - write(";"); - } - } - } - function emitConstructor(node, baseTypeElement) { - var saveTempFlags = tempFlags; - var saveTempVariables = tempVariables; - var saveTempParameters = tempParameters; - tempFlags = 0; - tempVariables = undefined; - tempParameters = undefined; - emitConstructorWorker(node, baseTypeElement); - tempFlags = saveTempFlags; - tempVariables = saveTempVariables; - tempParameters = saveTempParameters; - } - function emitConstructorWorker(node, baseTypeElement) { - // Check if we have property assignment inside class declaration. - // If there is property assignment, we need to emit constructor whether users define it or not - // If there is no property assignment, we can omit constructor if users do not define it - var hasInstancePropertyWithInitializer = false; - // Emit the constructor overload pinned comments - ts.forEach(node.members, function (member) { - if (member.kind === 137 /* Constructor */ && !member.body) { - emitOnlyPinnedOrTripleSlashComments(member); - } - // Check if there is any non-static property assignment - if (member.kind === 134 /* PropertyDeclaration */ && member.initializer && (member.flags & 128 /* Static */) === 0) { - hasInstancePropertyWithInitializer = true; - } - }); - var ctor = ts.getFirstConstructorWithBody(node); - // For target ES6 and above, if there is no user-defined constructor and there is no property assignment - // do not emit constructor in class declaration. - if (languageVersion >= 2 /* ES6 */ && !ctor && !hasInstancePropertyWithInitializer) { - return; - } - if (ctor) { - emitLeadingComments(ctor); - } - emitStart(ctor || node); - if (languageVersion < 2 /* ES6 */) { - write("function "); - emitDeclarationName(node); - emitSignatureParameters(ctor); - } - else { - write("constructor"); - if (ctor) { - emitSignatureParameters(ctor); - } - else { - // Based on EcmaScript6 section 14.5.14: Runtime Semantics: ClassDefinitionEvaluation. - // If constructor is empty, then, - // If ClassHeritageopt is present, then - // Let constructor be the result of parsing the String "constructor(... args){ super (...args);}" using the syntactic grammar with the goal symbol MethodDefinition. - // Else, - // Let constructor be the result of parsing the String "constructor( ){ }" using the syntactic grammar with the goal symbol MethodDefinition - if (baseTypeElement) { - write("(...args)"); - } - else { - write("()"); - } - } - } - write(" {"); - scopeEmitStart(node, "constructor"); - increaseIndent(); - if (ctor) { - emitDetachedComments(ctor.body.statements); - } - emitCaptureThisForNodeIfNecessary(node); - if (ctor) { - emitDefaultValueAssignments(ctor); - emitRestParameter(ctor); - if (baseTypeElement) { - var superCall = findInitialSuperCall(ctor); - if (superCall) { - writeLine(); - emit(superCall); - } - } - emitParameterPropertyAssignments(ctor); - } - else { - if (baseTypeElement) { - writeLine(); - emitStart(baseTypeElement); - if (languageVersion < 2 /* ES6 */) { - write("_super.apply(this, arguments);"); - } - else { - write("super(...args);"); - } - emitEnd(baseTypeElement); - } - } - emitPropertyDeclarations(node, getInitializedProperties(node, false)); - if (ctor) { - var statements = ctor.body.statements; - if (superCall) { - statements = statements.slice(1); - } - emitLines(statements); - } - emitTempDeclarations(true); - writeLine(); - if (ctor) { - emitLeadingCommentsOfPosition(ctor.body.statements.end); - } - decreaseIndent(); - emitToken(15 /* CloseBraceToken */, ctor ? ctor.body.statements.end : node.members.end); - scopeEmitEnd(); - emitEnd(ctor || node); - if (ctor) { - emitTrailingComments(ctor); - } - } - function emitClassExpression(node) { - return emitClassLikeDeclaration(node); - } - function emitClassDeclaration(node) { - return emitClassLikeDeclaration(node); - } - function emitClassLikeDeclaration(node) { - if (languageVersion < 2 /* ES6 */) { - emitClassLikeDeclarationBelowES6(node); - } - else { - emitClassLikeDeclarationForES6AndHigher(node); - } - } - function emitClassLikeDeclarationForES6AndHigher(node) { - var thisNodeIsDecorated = ts.nodeIsDecorated(node); - if (node.kind === 204 /* ClassDeclaration */) { - if (thisNodeIsDecorated) { - // To preserve the correct runtime semantics when decorators are applied to the class, - // the emit needs to follow one of the following rules: - // - // * For a local class declaration: - // - // @dec class C { - // } - // - // The emit should be: - // - // let C = class { - // }; - // Object.defineProperty(C, "name", { value: "C", configurable: true }); - // C = __decorate([dec], C); - // - // * For an exported class declaration: - // - // @dec export class C { - // } - // - // The emit should be: - // - // export let C = class { - // }; - // Object.defineProperty(C, "name", { value: "C", configurable: true }); - // C = __decorate([dec], C); - // - // * For a default export of a class declaration with a name: - // - // @dec default export class C { - // } - // - // The emit should be: - // - // let C = class { - // } - // Object.defineProperty(C, "name", { value: "C", configurable: true }); - // C = __decorate([dec], C); - // export default C; - // - // * For a default export of a class declaration without a name: - // - // @dec default export class { - // } - // - // The emit should be: - // - // let _default = class { - // } - // _default = __decorate([dec], _default); - // export default _default; - // - if (isES6ExportedDeclaration(node) && !(node.flags & 256 /* Default */)) { - write("export "); - } - write("let "); - emitDeclarationName(node); - write(" = "); - } - else if (isES6ExportedDeclaration(node)) { - write("export "); - if (node.flags & 256 /* Default */) { - write("default "); - } - } - } - // If the class has static properties, and it's a class expression, then we'll need - // to specialize the emit a bit. for a class expression of the form: - // - // class C { static a = 1; static b = 2; ... } - // - // We'll emit: - // - // (_temp = class C { ... }, _temp.a = 1, _temp.b = 2, _temp) - // - // This keeps the expression as an expression, while ensuring that the static parts - // of it have been initialized by the time it is used. - var staticProperties = getInitializedProperties(node, true); - var isClassExpressionWithStaticProperties = staticProperties.length > 0 && node.kind === 177 /* ClassExpression */; - var tempVariable; - if (isClassExpressionWithStaticProperties) { - tempVariable = createAndRecordTempVariable(0 /* Auto */); - write("("); - increaseIndent(); - emit(tempVariable); - write(" = "); - } - write("class"); - // check if this is an "export default class" as it may not have a name. Do not emit the name if the class is decorated. - if ((node.name || !(node.flags & 256 /* Default */)) && !thisNodeIsDecorated) { - write(" "); - emitDeclarationName(node); - } - var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node); - if (baseTypeNode) { - write(" extends "); - emit(baseTypeNode.expression); - } - write(" {"); - increaseIndent(); - scopeEmitStart(node); - writeLine(); - emitConstructor(node, baseTypeNode); - emitMemberFunctionsForES6AndHigher(node); - decreaseIndent(); - writeLine(); - emitToken(15 /* CloseBraceToken */, node.members.end); - scopeEmitEnd(); - // TODO(rbuckton): Need to go back to `let _a = class C {}` approach, removing the defineProperty call for now. - // For a decorated class, we need to assign its name (if it has one). This is because we emit - // the class as a class expression to avoid the double-binding of the identifier: - // - // let C = class { - // } - // Object.defineProperty(C, "name", { value: "C", configurable: true }); - // - if (thisNodeIsDecorated) { - write(";"); - } - // Emit static property assignment. Because classDeclaration is lexically evaluated, - // it is safe to emit static property assignment after classDeclaration - // From ES6 specification: - // HasLexicalDeclaration (N) : Determines if the argument identifier has a binding in this environment record that was created using - // a lexical declaration such as a LexicalDeclaration or a ClassDeclaration. - if (isClassExpressionWithStaticProperties) { - for (var _a = 0; _a < staticProperties.length; _a++) { - var property = staticProperties[_a]; - write(","); - writeLine(); - emitPropertyDeclaration(node, property, tempVariable, true); - } - write(","); - writeLine(); - emit(tempVariable); - decreaseIndent(); - write(")"); - } - else { - writeLine(); - emitPropertyDeclarations(node, staticProperties); - emitDecoratorsOfClass(node); - } - // If this is an exported class, but not on the top level (i.e. on an internal - // module), export it - if (!isES6ExportedDeclaration(node) && (node.flags & 1 /* Export */)) { - writeLine(); - emitStart(node); - emitModuleMemberName(node); - write(" = "); - emitDeclarationName(node); - emitEnd(node); - write(";"); - } - else if (isES6ExportedDeclaration(node) && (node.flags & 256 /* Default */) && thisNodeIsDecorated) { - // if this is a top level default export of decorated class, write the export after the declaration. - writeLine(); - write("export default "); - emitDeclarationName(node); - write(";"); - } - } - function emitClassLikeDeclarationBelowES6(node) { - if (node.kind === 204 /* ClassDeclaration */) { - // source file level classes in system modules are hoisted so 'var's for them are already defined - if (!shouldHoistDeclarationInSystemJsModule(node)) { - write("var "); - } - emitDeclarationName(node); - write(" = "); - } - write("(function ("); - var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node); - if (baseTypeNode) { - write("_super"); - } - write(") {"); - var saveTempFlags = tempFlags; - var saveTempVariables = tempVariables; - var saveTempParameters = tempParameters; - var saveComputedPropertyNamesToGeneratedNames = computedPropertyNamesToGeneratedNames; - tempFlags = 0; - tempVariables = undefined; - tempParameters = undefined; - computedPropertyNamesToGeneratedNames = undefined; - increaseIndent(); - scopeEmitStart(node); - if (baseTypeNode) { - writeLine(); - emitStart(baseTypeNode); - write("__extends("); - emitDeclarationName(node); - write(", _super);"); - emitEnd(baseTypeNode); - } - writeLine(); - emitConstructor(node, baseTypeNode); - emitMemberFunctionsForES5AndLower(node); - emitPropertyDeclarations(node, getInitializedProperties(node, true)); - writeLine(); - emitDecoratorsOfClass(node); - writeLine(); - emitToken(15 /* CloseBraceToken */, node.members.end, function () { - write("return "); - emitDeclarationName(node); - }); - write(";"); - emitTempDeclarations(true); - tempFlags = saveTempFlags; - tempVariables = saveTempVariables; - tempParameters = saveTempParameters; - computedPropertyNamesToGeneratedNames = saveComputedPropertyNamesToGeneratedNames; - decreaseIndent(); - writeLine(); - emitToken(15 /* CloseBraceToken */, node.members.end); - scopeEmitEnd(); - emitStart(node); - write(")("); - if (baseTypeNode) { - emit(baseTypeNode.expression); - } - write(")"); - if (node.kind === 204 /* ClassDeclaration */) { - write(";"); - } - emitEnd(node); - if (node.kind === 204 /* ClassDeclaration */) { - emitExportMemberAssignment(node); - } - if (languageVersion < 2 /* ES6 */ && node.parent === currentSourceFile && node.name) { - emitExportMemberAssignments(node.name); - } - } - function emitClassMemberPrefix(node, member) { - emitDeclarationName(node); - if (!(member.flags & 128 /* Static */)) { - write(".prototype"); - } - } - function emitDecoratorsOfClass(node) { - emitDecoratorsOfMembers(node, 0); - emitDecoratorsOfMembers(node, 128 /* Static */); - emitDecoratorsOfConstructor(node); - } - function emitDecoratorsOfConstructor(node) { - var decorators = node.decorators; - var constructor = ts.getFirstConstructorWithBody(node); - var hasDecoratedParameters = constructor && ts.forEach(constructor.parameters, ts.nodeIsDecorated); - // skip decoration of the constructor if neither it nor its parameters are decorated - if (!decorators && !hasDecoratedParameters) { - return; - } - // Emit the call to __decorate. Given the class: - // - // @dec - // class C { - // } - // - // The emit for the class is: - // - // C = __decorate([dec], C); - // - writeLine(); - emitStart(node); - emitDeclarationName(node); - write(" = __decorate(["); - increaseIndent(); - writeLine(); - var decoratorCount = decorators ? decorators.length : 0; - var argumentsWritten = emitList(decorators, 0, decoratorCount, true, false, false, true, function (decorator) { - emitStart(decorator); - emit(decorator.expression); - emitEnd(decorator); - }); - argumentsWritten += emitDecoratorsOfParameters(constructor, argumentsWritten > 0); - emitSerializedTypeMetadata(node, argumentsWritten >= 0); - decreaseIndent(); - writeLine(); - write("], "); - emitDeclarationName(node); - write(");"); - emitEnd(node); - writeLine(); - } - function emitDecoratorsOfMembers(node, staticFlag) { - for (var _a = 0, _b = node.members; _a < _b.length; _a++) { - var member = _b[_a]; - // only emit members in the correct group - if ((member.flags & 128 /* Static */) !== staticFlag) { - continue; - } - // skip members that cannot be decorated (such as the constructor) - if (!ts.nodeCanBeDecorated(member)) { - continue; - } - // skip a member if it or any of its parameters are not decorated - if (!ts.nodeOrChildIsDecorated(member)) { - continue; - } - // skip an accessor declaration if it is not the first accessor - var decorators = void 0; - var functionLikeMember = void 0; - if (ts.isAccessor(member)) { - var accessors = ts.getAllAccessorDeclarations(node.members, member); - if (member !== accessors.firstAccessor) { - continue; - } - // get the decorators from the first accessor with decorators - decorators = accessors.firstAccessor.decorators; - if (!decorators && accessors.secondAccessor) { - decorators = accessors.secondAccessor.decorators; - } - // we only decorate parameters of the set accessor - functionLikeMember = accessors.setAccessor; - } - else { - decorators = member.decorators; - // we only decorate the parameters here if this is a method - if (member.kind === 136 /* MethodDeclaration */) { - functionLikeMember = member; - } - } - // Emit the call to __decorate. Given the following: - // - // class C { - // @dec method(@dec2 x) {} - // @dec get accessor() {} - // @dec prop; - // } - // - // The emit for a method is: - // - // Object.defineProperty(C.prototype, "method", - // __decorate([ - // dec, - // __param(0, dec2), - // __metadata("design:type", Function), - // __metadata("design:paramtypes", [Object]), - // __metadata("design:returntype", void 0) - // ], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); - // - // The emit for an accessor is: - // - // Object.defineProperty(C.prototype, "accessor", - // __decorate([ - // dec - // ], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); - // - // The emit for a property is: - // - // __decorate([ - // dec - // ], C.prototype, "prop"); - // - writeLine(); - emitStart(member); - if (member.kind !== 134 /* PropertyDeclaration */) { - write("Object.defineProperty("); - emitStart(member.name); - emitClassMemberPrefix(node, member); - write(", "); - emitExpressionForPropertyName(member.name); - emitEnd(member.name); - write(","); - increaseIndent(); - writeLine(); - } - write("__decorate(["); - increaseIndent(); - writeLine(); - var decoratorCount = decorators ? decorators.length : 0; - var argumentsWritten = emitList(decorators, 0, decoratorCount, true, false, false, true, function (decorator) { - emitStart(decorator); - emit(decorator.expression); - emitEnd(decorator); - }); - argumentsWritten += emitDecoratorsOfParameters(functionLikeMember, argumentsWritten > 0); - emitSerializedTypeMetadata(member, argumentsWritten > 0); - decreaseIndent(); - writeLine(); - write("], "); - emitStart(member.name); - emitClassMemberPrefix(node, member); - write(", "); - emitExpressionForPropertyName(member.name); - emitEnd(member.name); - if (member.kind !== 134 /* PropertyDeclaration */) { - write(", Object.getOwnPropertyDescriptor("); - emitStart(member.name); - emitClassMemberPrefix(node, member); - write(", "); - emitExpressionForPropertyName(member.name); - emitEnd(member.name); - write("))"); - decreaseIndent(); - } - write(");"); - emitEnd(member); - writeLine(); - } - } - function emitDecoratorsOfParameters(node, leadingComma) { - var argumentsWritten = 0; - if (node) { - var parameterIndex = 0; - for (var _a = 0, _b = node.parameters; _a < _b.length; _a++) { - var parameter = _b[_a]; - if (ts.nodeIsDecorated(parameter)) { - var decorators = parameter.decorators; - argumentsWritten += emitList(decorators, 0, decorators.length, true, false, leadingComma, true, function (decorator) { - emitStart(decorator); - write("__param(" + parameterIndex + ", "); - emit(decorator.expression); - write(")"); - emitEnd(decorator); - }); - leadingComma = true; - } - ++parameterIndex; - } - } - return argumentsWritten; - } - function shouldEmitTypeMetadata(node) { - // This method determines whether to emit the "design:type" metadata based on the node's kind. - // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata - // compiler option is set. - switch (node.kind) { - case 136 /* MethodDeclaration */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 134 /* PropertyDeclaration */: - return true; - } - return false; - } - function shouldEmitReturnTypeMetadata(node) { - // This method determines whether to emit the "design:returntype" metadata based on the node's kind. - // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata - // compiler option is set. - switch (node.kind) { - case 136 /* MethodDeclaration */: - return true; - } - return false; - } - function shouldEmitParamTypesMetadata(node) { - // This method determines whether to emit the "design:paramtypes" metadata based on the node's kind. - // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata - // compiler option is set. - switch (node.kind) { - case 204 /* ClassDeclaration */: - case 136 /* MethodDeclaration */: - case 139 /* SetAccessor */: - return true; - } - return false; - } - function emitSerializedTypeMetadata(node, writeComma) { - // This method emits the serialized type metadata for a decorator target. - // The caller should have already tested whether the node has decorators. - var argumentsWritten = 0; - if (compilerOptions.emitDecoratorMetadata) { - if (shouldEmitTypeMetadata(node)) { - var serializedType = resolver.serializeTypeOfNode(node); - if (serializedType) { - if (writeComma) { - write(", "); - } - writeLine(); - write("__metadata('design:type', "); - emitSerializedType(node, serializedType); - write(")"); - argumentsWritten++; - } - } - if (shouldEmitParamTypesMetadata(node)) { - var serializedTypes = resolver.serializeParameterTypesOfNode(node); - if (serializedTypes) { - if (writeComma || argumentsWritten) { - write(", "); - } - writeLine(); - write("__metadata('design:paramtypes', ["); - for (var i = 0; i < serializedTypes.length; ++i) { - if (i > 0) { - write(", "); - } - emitSerializedType(node, serializedTypes[i]); - } - write("])"); - argumentsWritten++; - } - } - if (shouldEmitReturnTypeMetadata(node)) { - var serializedType = resolver.serializeReturnTypeOfNode(node); - if (serializedType) { - if (writeComma || argumentsWritten) { - write(", "); - } - writeLine(); - write("__metadata('design:returntype', "); - emitSerializedType(node, serializedType); - write(")"); - argumentsWritten++; - } - } - } - return argumentsWritten; - } - function serializeTypeNameSegment(location, path, index) { - switch (index) { - case 0: - return "typeof " + path[index] + " !== 'undefined' && " + path[index]; - case 1: - return serializeTypeNameSegment(location, path, index - 1) + "." + path[index]; - default: - var temp = createAndRecordTempVariable(0 /* Auto */).text; - return "(" + temp + " = " + serializeTypeNameSegment(location, path, index - 1) + ") && " + temp + "." + path[index]; - } - } - function emitSerializedType(location, name) { - if (typeof name === "string") { - write(name); - return; - } - else { - ts.Debug.assert(name.length > 0, "Invalid serialized type name"); - write("(" + serializeTypeNameSegment(location, name, name.length - 1) + ") || Object"); - } - } - function emitInterfaceDeclaration(node) { - emitOnlyPinnedOrTripleSlashComments(node); - } - function shouldEmitEnumDeclaration(node) { - var isConstEnum = ts.isConst(node); - return !isConstEnum || compilerOptions.preserveConstEnums || compilerOptions.isolatedModules; - } - function emitEnumDeclaration(node) { - // const enums are completely erased during compilation. - if (!shouldEmitEnumDeclaration(node)) { - return; - } - if (!shouldHoistDeclarationInSystemJsModule(node)) { - // do not emit var if variable was already hoisted - if (!(node.flags & 1 /* Export */) || isES6ExportedDeclaration(node)) { - emitStart(node); - if (isES6ExportedDeclaration(node)) { - write("export "); - } - write("var "); - emit(node.name); - emitEnd(node); - write(";"); - } - } - writeLine(); - emitStart(node); - write("(function ("); - emitStart(node.name); - write(getGeneratedNameForNode(node)); - emitEnd(node.name); - write(") {"); - increaseIndent(); - scopeEmitStart(node); - emitLines(node.members); - decreaseIndent(); - writeLine(); - emitToken(15 /* CloseBraceToken */, node.members.end); - scopeEmitEnd(); - write(")("); - emitModuleMemberName(node); - write(" || ("); - emitModuleMemberName(node); - write(" = {}));"); - emitEnd(node); - if (!isES6ExportedDeclaration(node) && node.flags & 1 /* Export */ && !shouldHoistDeclarationInSystemJsModule(node)) { - // do not emit var if variable was already hoisted - writeLine(); - emitStart(node); - write("var "); - emit(node.name); - write(" = "); - emitModuleMemberName(node); - emitEnd(node); - write(";"); - } - if (languageVersion < 2 /* ES6 */ && node.parent === currentSourceFile) { - if (compilerOptions.module === 4 /* System */ && (node.flags & 1 /* Export */)) { - // write the call to exporter for enum - writeLine(); - write(exportFunctionForFile + "(\""); - emitDeclarationName(node); - write("\", "); - emitDeclarationName(node); - write(");"); - } - emitExportMemberAssignments(node.name); - } - } - function emitEnumMember(node) { - var enumParent = node.parent; - emitStart(node); - write(getGeneratedNameForNode(enumParent)); - write("["); - write(getGeneratedNameForNode(enumParent)); - write("["); - emitExpressionForPropertyName(node.name); - write("] = "); - writeEnumMemberDeclarationValue(node); - write("] = "); - emitExpressionForPropertyName(node.name); - emitEnd(node); - write(";"); - } - function writeEnumMemberDeclarationValue(member) { - var value = resolver.getConstantValue(member); - if (value !== undefined) { - write(value.toString()); - return; - } - else if (member.initializer) { - emit(member.initializer); - } - else { - write("undefined"); - } - } - function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) { - if (moduleDeclaration.body.kind === 208 /* ModuleDeclaration */) { - var recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); - return recursiveInnerModule || moduleDeclaration.body; - } - } - function shouldEmitModuleDeclaration(node) { - return ts.isInstantiatedModule(node, compilerOptions.preserveConstEnums || compilerOptions.isolatedModules); - } - function isModuleMergedWithES6Class(node) { - return languageVersion === 2 /* ES6 */ && !!(resolver.getNodeCheckFlags(node) & 2048 /* LexicalModuleMergesWithClass */); - } - function emitModuleDeclaration(node) { - // Emit only if this module is non-ambient. - var shouldEmit = shouldEmitModuleDeclaration(node); - if (!shouldEmit) { - return emitOnlyPinnedOrTripleSlashComments(node); - } - var hoistedInDeclarationScope = shouldHoistDeclarationInSystemJsModule(node); - var emitVarForModule = !hoistedInDeclarationScope && !isModuleMergedWithES6Class(node); - if (emitVarForModule) { - emitStart(node); - if (isES6ExportedDeclaration(node)) { - write("export "); - } - write("var "); - emit(node.name); - write(";"); - emitEnd(node); - writeLine(); - } - emitStart(node); - write("(function ("); - emitStart(node.name); - write(getGeneratedNameForNode(node)); - emitEnd(node.name); - write(") "); - if (node.body.kind === 209 /* ModuleBlock */) { - var saveTempFlags = tempFlags; - var saveTempVariables = tempVariables; - tempFlags = 0; - tempVariables = undefined; - emit(node.body); - tempFlags = saveTempFlags; - tempVariables = saveTempVariables; - } - else { - write("{"); - increaseIndent(); - scopeEmitStart(node); - emitCaptureThisForNodeIfNecessary(node); - writeLine(); - emit(node.body); - decreaseIndent(); - writeLine(); - var moduleBlock = getInnerMostModuleDeclarationFromDottedModule(node).body; - emitToken(15 /* CloseBraceToken */, moduleBlock.statements.end); - scopeEmitEnd(); - } - write(")("); - // write moduleDecl = containingModule.m only if it is not exported es6 module member - if ((node.flags & 1 /* Export */) && !isES6ExportedDeclaration(node)) { - emit(node.name); - write(" = "); - } - emitModuleMemberName(node); - write(" || ("); - emitModuleMemberName(node); - write(" = {}));"); - emitEnd(node); - if (!isES6ExportedDeclaration(node) && node.name.kind === 65 /* Identifier */ && node.parent === currentSourceFile) { - if (compilerOptions.module === 4 /* System */ && (node.flags & 1 /* Export */)) { - writeLine(); - write(exportFunctionForFile + "(\""); - emitDeclarationName(node); - write("\", "); - emitDeclarationName(node); - write(");"); - } - emitExportMemberAssignments(node.name); - } - } - function emitRequire(moduleName) { - if (moduleName.kind === 8 /* StringLiteral */) { - write("require("); - emitStart(moduleName); - emitLiteral(moduleName); - emitEnd(moduleName); - emitToken(17 /* CloseParenToken */, moduleName.end); - } - else { - write("require()"); - } - } - function getNamespaceDeclarationNode(node) { - if (node.kind === 211 /* ImportEqualsDeclaration */) { - return node; - } - var importClause = node.importClause; - if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 214 /* NamespaceImport */) { - return importClause.namedBindings; - } - } - function isDefaultImport(node) { - return node.kind === 212 /* ImportDeclaration */ && node.importClause && !!node.importClause.name; - } - function emitExportImportAssignments(node) { - if (ts.isAliasSymbolDeclaration(node) && resolver.isValueAliasDeclaration(node)) { - emitExportMemberAssignments(node.name); - } - ts.forEachChild(node, emitExportImportAssignments); - } - function emitImportDeclaration(node) { - if (languageVersion < 2 /* ES6 */) { - return emitExternalImportDeclaration(node); - } - // ES6 import - if (node.importClause) { - var shouldEmitDefaultBindings = resolver.isReferencedAliasDeclaration(node.importClause); - var shouldEmitNamedBindings = node.importClause.namedBindings && resolver.isReferencedAliasDeclaration(node.importClause.namedBindings, true); - if (shouldEmitDefaultBindings || shouldEmitNamedBindings) { - write("import "); - emitStart(node.importClause); - if (shouldEmitDefaultBindings) { - emit(node.importClause.name); - if (shouldEmitNamedBindings) { - write(", "); - } - } - if (shouldEmitNamedBindings) { - emitLeadingComments(node.importClause.namedBindings); - emitStart(node.importClause.namedBindings); - if (node.importClause.namedBindings.kind === 214 /* NamespaceImport */) { - write("* as "); - emit(node.importClause.namedBindings.name); - } - else { - write("{ "); - emitExportOrImportSpecifierList(node.importClause.namedBindings.elements, resolver.isReferencedAliasDeclaration); - write(" }"); - } - emitEnd(node.importClause.namedBindings); - emitTrailingComments(node.importClause.namedBindings); - } - emitEnd(node.importClause); - write(" from "); - emit(node.moduleSpecifier); - write(";"); - } - } - else { - write("import "); - emit(node.moduleSpecifier); - write(";"); - } - } - function emitExternalImportDeclaration(node) { - if (ts.contains(externalImports, node)) { - var isExportedImport = node.kind === 211 /* ImportEqualsDeclaration */ && (node.flags & 1 /* Export */) !== 0; - var namespaceDeclaration = getNamespaceDeclarationNode(node); - if (compilerOptions.module !== 2 /* AMD */) { - emitLeadingComments(node); - emitStart(node); - if (namespaceDeclaration && !isDefaultImport(node)) { - // import x = require("foo") - // import * as x from "foo" - if (!isExportedImport) - write("var "); - emitModuleMemberName(namespaceDeclaration); - write(" = "); - } - else { - // import "foo" - // import x from "foo" - // import { x, y } from "foo" - // import d, * as x from "foo" - // import d, { x, y } from "foo" - var isNakedImport = 212 /* ImportDeclaration */ && !node.importClause; - if (!isNakedImport) { - write("var "); - write(getGeneratedNameForNode(node)); - write(" = "); - } - } - emitRequire(ts.getExternalModuleName(node)); - if (namespaceDeclaration && isDefaultImport(node)) { - // import d, * as x from "foo" - write(", "); - emitModuleMemberName(namespaceDeclaration); - write(" = "); - write(getGeneratedNameForNode(node)); - } - write(";"); - emitEnd(node); - emitExportImportAssignments(node); - emitTrailingComments(node); - } - else { - if (isExportedImport) { - emitModuleMemberName(namespaceDeclaration); - write(" = "); - emit(namespaceDeclaration.name); - write(";"); - } - else if (namespaceDeclaration && isDefaultImport(node)) { - // import d, * as x from "foo" - write("var "); - emitModuleMemberName(namespaceDeclaration); - write(" = "); - write(getGeneratedNameForNode(node)); - write(";"); - } - emitExportImportAssignments(node); - } - } - } - function emitImportEqualsDeclaration(node) { - if (ts.isExternalModuleImportEqualsDeclaration(node)) { - emitExternalImportDeclaration(node); - return; - } - // preserve old compiler's behavior: emit 'var' for import declaration (even if we do not consider them referenced) when - // - current file is not external module - // - import declaration is top level and target is value imported by entity name - if (resolver.isReferencedAliasDeclaration(node) || - (!ts.isExternalModule(currentSourceFile) && resolver.isTopLevelValueImportEqualsWithEntityName(node))) { - emitLeadingComments(node); - emitStart(node); - if (isES6ExportedDeclaration(node)) { - write("export "); - write("var "); - } - else if (!(node.flags & 1 /* Export */)) { - write("var "); - } - emitModuleMemberName(node); - write(" = "); - emit(node.moduleReference); - write(";"); - emitEnd(node); - emitExportImportAssignments(node); - emitTrailingComments(node); - } - } - function emitExportDeclaration(node) { - ts.Debug.assert(compilerOptions.module !== 4 /* System */); - if (languageVersion < 2 /* ES6 */) { - if (node.moduleSpecifier && (!node.exportClause || resolver.isValueAliasDeclaration(node))) { - emitStart(node); - var generatedName = getGeneratedNameForNode(node); - if (node.exportClause) { - // export { x, y, ... } from "foo" - if (compilerOptions.module !== 2 /* AMD */) { - write("var "); - write(generatedName); - write(" = "); - emitRequire(ts.getExternalModuleName(node)); - write(";"); - } - for (var _a = 0, _b = node.exportClause.elements; _a < _b.length; _a++) { - var specifier = _b[_a]; - if (resolver.isValueAliasDeclaration(specifier)) { - writeLine(); - emitStart(specifier); - emitContainingModuleName(specifier); - write("."); - emitNodeWithoutSourceMap(specifier.name); - write(" = "); - write(generatedName); - write("."); - emitNodeWithoutSourceMap(specifier.propertyName || specifier.name); - write(";"); - emitEnd(specifier); - } - } - } - else { - // export * from "foo" - writeLine(); - write("__export("); - if (compilerOptions.module !== 2 /* AMD */) { - emitRequire(ts.getExternalModuleName(node)); - } - else { - write(generatedName); - } - write(");"); - } - emitEnd(node); - } - } - else { - if (!node.exportClause || resolver.isValueAliasDeclaration(node)) { - emitStart(node); - write("export "); - if (node.exportClause) { - // export { x, y, ... } - write("{ "); - emitExportOrImportSpecifierList(node.exportClause.elements, resolver.isValueAliasDeclaration); - write(" }"); - } - else { - write("*"); - } - if (node.moduleSpecifier) { - write(" from "); - emitNodeWithoutSourceMap(node.moduleSpecifier); - } - write(";"); - emitEnd(node); - } - } - } - function emitExportOrImportSpecifierList(specifiers, shouldEmit) { - ts.Debug.assert(languageVersion >= 2 /* ES6 */); - var needsComma = false; - for (var _a = 0; _a < specifiers.length; _a++) { - var specifier = specifiers[_a]; - if (shouldEmit(specifier)) { - if (needsComma) { - write(", "); - } - emitStart(specifier); - if (specifier.propertyName) { - emitNodeWithoutSourceMap(specifier.propertyName); - write(" as "); - } - emitNodeWithoutSourceMap(specifier.name); - emitEnd(specifier); - needsComma = true; - } - } - } - function emitExportAssignment(node) { - if (!node.isExportEquals && resolver.isValueAliasDeclaration(node)) { - if (languageVersion >= 2 /* ES6 */) { - writeLine(); - emitStart(node); - write("export default "); - var expression = node.expression; - emit(expression); - if (expression.kind !== 203 /* FunctionDeclaration */ && - expression.kind !== 204 /* ClassDeclaration */) { - write(";"); - } - emitEnd(node); - } - else { - writeLine(); - emitStart(node); - if (compilerOptions.module === 4 /* System */) { - write(exportFunctionForFile + "(\"default\","); - emit(node.expression); - write(")"); - } - else { - emitContainingModuleName(node); - if (languageVersion === 0 /* ES3 */) { - write("[\"default\"] = "); - } - else { - write(".default = "); - } - emit(node.expression); - } - write(";"); - emitEnd(node); - } - } - } - function collectExternalModuleInfo(sourceFile) { - externalImports = []; - exportSpecifiers = {}; - exportEquals = undefined; - hasExportStars = false; - for (var _a = 0, _b = sourceFile.statements; _a < _b.length; _a++) { - var node = _b[_a]; - switch (node.kind) { - case 212 /* ImportDeclaration */: - if (!node.importClause || - resolver.isReferencedAliasDeclaration(node.importClause, true)) { - // import "mod" - // import x from "mod" where x is referenced - // import * as x from "mod" where x is referenced - // import { x, y } from "mod" where at least one import is referenced - externalImports.push(node); - } - break; - case 211 /* ImportEqualsDeclaration */: - if (node.moduleReference.kind === 222 /* ExternalModuleReference */ && resolver.isReferencedAliasDeclaration(node)) { - // import x = require("mod") where x is referenced - externalImports.push(node); - } - break; - case 218 /* ExportDeclaration */: - if (node.moduleSpecifier) { - if (!node.exportClause) { - // export * from "mod" - externalImports.push(node); - hasExportStars = true; - } - else if (resolver.isValueAliasDeclaration(node)) { - // export { x, y } from "mod" where at least one export is a value symbol - externalImports.push(node); - } - } - else { - // export { x, y } - for (var _c = 0, _d = node.exportClause.elements; _c < _d.length; _c++) { - var specifier = _d[_c]; - var name_24 = (specifier.propertyName || specifier.name).text; - (exportSpecifiers[name_24] || (exportSpecifiers[name_24] = [])).push(specifier); - } - } - break; - case 217 /* ExportAssignment */: - if (node.isExportEquals && !exportEquals) { - // export = x - exportEquals = node; - } - break; - } - } - } - function emitExportStarHelper() { - if (hasExportStars) { - writeLine(); - write("function __export(m) {"); - increaseIndent(); - writeLine(); - write("for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];"); - decreaseIndent(); - writeLine(); - write("}"); - } - } - function getLocalNameForExternalImport(node) { - var namespaceDeclaration = getNamespaceDeclarationNode(node); - if (namespaceDeclaration && !isDefaultImport(node)) { - return ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, namespaceDeclaration.name); - } - if (node.kind === 212 /* ImportDeclaration */ && node.importClause) { - return getGeneratedNameForNode(node); - } - if (node.kind === 218 /* ExportDeclaration */ && node.moduleSpecifier) { - return getGeneratedNameForNode(node); - } - } - function getExternalModuleNameText(importNode) { - var moduleName = ts.getExternalModuleName(importNode); - if (moduleName.kind === 8 /* StringLiteral */) { - return getLiteralText(moduleName); - } - return undefined; - } - function emitVariableDeclarationsForImports() { - if (externalImports.length === 0) { - return; - } - writeLine(); - var started = false; - for (var _a = 0; _a < externalImports.length; _a++) { - var importNode = externalImports[_a]; - // do not create variable declaration for exports and imports that lack import clause - var skipNode = importNode.kind === 218 /* ExportDeclaration */ || - (importNode.kind === 212 /* ImportDeclaration */ && !importNode.importClause); - if (skipNode) { - continue; - } - if (!started) { - write("var "); - started = true; - } - else { - write(", "); - } - write(getLocalNameForExternalImport(importNode)); - } - if (started) { - write(";"); - } - } - function emitLocalStorageForExportedNamesIfNecessary(exportedDeclarations) { - // when resolving exports local exported entries/indirect exported entries in the module - // should always win over entries with similar names that were added via star exports - // to support this we store names of local/indirect exported entries in a set. - // this set is used to filter names brought by star expors. - if (!hasExportStars) { - // local names set is needed only in presence of star exports - return undefined; - } - // local names set should only be added if we have anything exported - if (!exportedDeclarations && ts.isEmpty(exportSpecifiers)) { - // no exported declarations (export var ...) or export specifiers (export {x}) - // check if we have any non star export declarations. - var hasExportDeclarationWithExportClause = false; - for (var _a = 0; _a < externalImports.length; _a++) { - var externalImport = externalImports[_a]; - if (externalImport.kind === 218 /* ExportDeclaration */ && externalImport.exportClause) { - hasExportDeclarationWithExportClause = true; - break; - } - } - if (!hasExportDeclarationWithExportClause) { - // we still need to emit exportStar helper - return emitExportStarFunction(undefined); - } - } - var exportedNamesStorageRef = makeUniqueName("exportedNames"); - writeLine(); - write("var " + exportedNamesStorageRef + " = {"); - increaseIndent(); - var started = false; - if (exportedDeclarations) { - for (var i = 0; i < exportedDeclarations.length; ++i) { - // write name of exported declaration, i.e 'export var x...' - writeExportedName(exportedDeclarations[i]); - } - } - if (exportSpecifiers) { - for (var n in exportSpecifiers) { - for (var _b = 0, _c = exportSpecifiers[n]; _b < _c.length; _b++) { - var specifier = _c[_b]; - // write name of export specified, i.e. 'export {x}' - writeExportedName(specifier.name); - } - } - } - for (var _d = 0; _d < externalImports.length; _d++) { - var externalImport = externalImports[_d]; - if (externalImport.kind !== 218 /* ExportDeclaration */) { - continue; - } - var exportDecl = externalImport; - if (!exportDecl.exportClause) { - // export * from ... - continue; - } - for (var _e = 0, _f = exportDecl.exportClause.elements; _e < _f.length; _e++) { - var element = _f[_e]; - // write name of indirectly exported entry, i.e. 'export {x} from ...' - writeExportedName(element.name || element.propertyName); - } - } - decreaseIndent(); - writeLine(); - write("};"); - return emitExportStarFunction(exportedNamesStorageRef); - function emitExportStarFunction(localNames) { - var exportStarFunction = makeUniqueName("exportStar"); - writeLine(); - // define an export star helper function - write("function " + exportStarFunction + "(m) {"); - increaseIndent(); - writeLine(); - write("for(var n in m) {"); - increaseIndent(); - writeLine(); - write("if (n !== \"default\""); - if (localNames) { - write("&& !" + localNames + ".hasOwnProperty(n)"); - } - write(") " + exportFunctionForFile + "(n, m[n]);"); - decreaseIndent(); - writeLine(); - write("}"); - decreaseIndent(); - writeLine(); - write("}"); - return exportStarFunction; - } - function writeExportedName(node) { - // do not record default exports - // they are local to module and never overwritten (explicitly skipped) by star export - if (node.kind !== 65 /* Identifier */ && node.flags & 256 /* Default */) { - return; - } - if (started) { - write(","); - } - else { - started = true; - } - writeLine(); - write("'"); - if (node.kind === 65 /* Identifier */) { - emitNodeWithoutSourceMap(node); - } - else { - emitDeclarationName(node); - } - write("': true"); - } - } - function processTopLevelVariableAndFunctionDeclarations(node) { - // per ES6 spec: - // 15.2.1.16.4 ModuleDeclarationInstantiation() Concrete Method - // - var declarations are initialized to undefined - 14.a.ii - // - function/generator declarations are instantiated - 16.a.iv - // this means that after module is instantiated but before its evaluation - // exported functions are already accessible at import sites - // in theory we should hoist only exported functions and its dependencies - // in practice to simplify things we'll hoist all source level functions and variable declaration - // including variables declarations for module and class declarations - var hoistedVars; - var hoistedFunctionDeclarations; - var exportedDeclarations; - visit(node); - if (hoistedVars) { - writeLine(); - write("var "); - var seen = {}; - for (var i = 0; i < hoistedVars.length; ++i) { - var local = hoistedVars[i]; - var name_25 = local.kind === 65 /* Identifier */ - ? local - : local.name; - if (name_25) { - // do not emit duplicate entries (in case of declaration merging) in the list of hoisted variables - var text = ts.unescapeIdentifier(name_25.text); - if (ts.hasProperty(seen, text)) { - continue; - } - else { - seen[text] = text; - } - } - if (i !== 0) { - write(", "); - } - if (local.kind === 204 /* ClassDeclaration */ || local.kind === 208 /* ModuleDeclaration */ || local.kind === 207 /* EnumDeclaration */) { - emitDeclarationName(local); - } - else { - emit(local); - } - var flags = ts.getCombinedNodeFlags(local.kind === 65 /* Identifier */ ? local.parent : local); - if (flags & 1 /* Export */) { - if (!exportedDeclarations) { - exportedDeclarations = []; - } - exportedDeclarations.push(local); - } - } - write(";"); - } - if (hoistedFunctionDeclarations) { - for (var _a = 0; _a < hoistedFunctionDeclarations.length; _a++) { - var f = hoistedFunctionDeclarations[_a]; - writeLine(); - emit(f); - if (f.flags & 1 /* Export */) { - if (!exportedDeclarations) { - exportedDeclarations = []; - } - exportedDeclarations.push(f); - } - } - } - return exportedDeclarations; - function visit(node) { - if (node.flags & 2 /* Ambient */) { - return; - } - if (node.kind === 203 /* FunctionDeclaration */) { - if (!hoistedFunctionDeclarations) { - hoistedFunctionDeclarations = []; - } - hoistedFunctionDeclarations.push(node); - return; - } - if (node.kind === 204 /* ClassDeclaration */) { - if (!hoistedVars) { - hoistedVars = []; - } - hoistedVars.push(node); - return; - } - if (node.kind === 207 /* EnumDeclaration */) { - if (shouldEmitEnumDeclaration(node)) { - if (!hoistedVars) { - hoistedVars = []; - } - hoistedVars.push(node); - } - return; - } - if (node.kind === 208 /* ModuleDeclaration */) { - if (shouldEmitModuleDeclaration(node)) { - if (!hoistedVars) { - hoistedVars = []; - } - hoistedVars.push(node); - } - return; - } - if (node.kind === 201 /* VariableDeclaration */ || node.kind === 155 /* BindingElement */) { - if (shouldHoistVariable(node, false)) { - var name_26 = node.name; - if (name_26.kind === 65 /* Identifier */) { - if (!hoistedVars) { - hoistedVars = []; - } - hoistedVars.push(name_26); - } - else { - ts.forEachChild(name_26, visit); - } - } - return; - } - if (ts.isBindingPattern(node)) { - ts.forEach(node.elements, visit); - return; - } - if (!ts.isDeclaration(node)) { - ts.forEachChild(node, visit); - } - } - } - function shouldHoistVariable(node, checkIfSourceFileLevelDecl) { - if (checkIfSourceFileLevelDecl && !shouldHoistDeclarationInSystemJsModule(node)) { - return false; - } - // hoist variable if - // - it is not block scoped - // - it is top level block scoped - // if block scoped variables are nested in some another block then - // no other functions can use them except ones that are defined at least in the same block - return (ts.getCombinedNodeFlags(node) & 12288 /* BlockScoped */) === 0 || - ts.getEnclosingBlockScopeContainer(node).kind === 230 /* SourceFile */; - } - function isCurrentFileSystemExternalModule() { - return compilerOptions.module === 4 /* System */ && ts.isExternalModule(currentSourceFile); - } - function emitSystemModuleBody(node, startIndex) { - // shape of the body in system modules: - // function (exports) { - // - // - // - // return { - // setters: [ - // - // ], - // execute: function() { - // - // } - // } - // - // } - // I.e: - // import {x} from 'file1' - // var y = 1; - // export function foo() { return y + x(); } - // console.log(y); - // will be transformed to - // function(exports) { - // var file1; // local alias - // var y; - // function foo() { return y + file1.x(); } - // exports("foo", foo); - // return { - // setters: [ - // function(v) { file1 = v } - // ], - // execute(): function() { - // y = 1; - // console.log(y); - // } - // }; - // } - emitVariableDeclarationsForImports(); - writeLine(); - var exportedDeclarations = processTopLevelVariableAndFunctionDeclarations(node); - var exportStarFunction = emitLocalStorageForExportedNamesIfNecessary(exportedDeclarations); - writeLine(); - write("return {"); - increaseIndent(); - writeLine(); - emitSetters(exportStarFunction); - writeLine(); - emitExecute(node, startIndex); - decreaseIndent(); - writeLine(); - write("}"); // return - emitTempDeclarations(true); - } - function emitSetters(exportStarFunction) { - write("setters:["); - for (var i = 0; i < externalImports.length; ++i) { - if (i !== 0) { - write(","); - } - writeLine(); - increaseIndent(); - var importNode = externalImports[i]; - var importVariableName = getLocalNameForExternalImport(importNode) || ""; - var parameterName = "_" + importVariableName; - write("function (" + parameterName + ") {"); - switch (importNode.kind) { - case 212 /* ImportDeclaration */: - if (!importNode.importClause) { - // 'import "..."' case - // module is imported only for side-effects, setter body will be empty - break; - } - // fall-through - case 211 /* ImportEqualsDeclaration */: - ts.Debug.assert(importVariableName !== ""); - increaseIndent(); - writeLine(); - // save import into the local - write(importVariableName + " = " + parameterName + ";"); - writeLine(); - var defaultName = importNode.kind === 212 /* ImportDeclaration */ - ? importNode.importClause.name - : importNode.name; - if (defaultName) { - // emit re-export for imported default name - // import n1 from 'foo1' - // import n2 = require('foo2') - // export {n1} - // export {n2} - emitExportMemberAssignments(defaultName); - writeLine(); - } - if (importNode.kind === 212 /* ImportDeclaration */ && - importNode.importClause.namedBindings) { - var namedBindings = importNode.importClause.namedBindings; - if (namedBindings.kind === 214 /* NamespaceImport */) { - // emit re-export for namespace - // import * as n from 'foo' - // export {n} - emitExportMemberAssignments(namedBindings.name); - writeLine(); - } - else { - // emit re-exports for named imports - // import {a, b} from 'foo' - // export {a, b as c} - for (var _a = 0, _b = namedBindings.elements; _a < _b.length; _a++) { - var element = _b[_a]; - emitExportMemberAssignments(element.name || element.propertyName); - writeLine(); - } - } - } - decreaseIndent(); - break; - case 218 /* ExportDeclaration */: - ts.Debug.assert(importVariableName !== ""); - increaseIndent(); - if (importNode.exportClause) { - // export {a, b as c} from 'foo' - // emit as: - // exports('a', _foo["a"]) - // exports('c', _foo["b"]) - for (var _c = 0, _d = importNode.exportClause.elements; _c < _d.length; _c++) { - var e = _d[_c]; - writeLine(); - write(exportFunctionForFile + "(\""); - emitNodeWithoutSourceMap(e.name); - write("\", " + parameterName + "[\""); - emitNodeWithoutSourceMap(e.propertyName || e.name); - write("\"]);"); - } - } - else { - writeLine(); - // export * from 'foo' - // emit as: - // exportStar(_foo); - write(exportStarFunction + "(" + parameterName + ");"); - } - writeLine(); - decreaseIndent(); - break; - } - write("}"); - decreaseIndent(); - } - write("],"); - } - function emitExecute(node, startIndex) { - write("execute: function() {"); - increaseIndent(); - writeLine(); - for (var i = startIndex; i < node.statements.length; ++i) { - var statement = node.statements[i]; - // - imports/exports are not emitted for system modules - // - function declarations are not emitted because they were already hoisted - switch (statement.kind) { - case 218 /* ExportDeclaration */: - case 212 /* ImportDeclaration */: - case 211 /* ImportEqualsDeclaration */: - case 203 /* FunctionDeclaration */: - continue; - } - writeLine(); - emit(statement); - } - decreaseIndent(); - writeLine(); - write("}"); // execute - } - function emitSystemModule(node, startIndex) { - collectExternalModuleInfo(node); - // System modules has the following shape - // System.register(['dep-1', ... 'dep-n'], function(exports) {/* module body function */}) - // 'exports' here is a function 'exports(name: string, value: T): T' that is used to publish exported values. - // 'exports' returns its 'value' argument so in most cases expressions - // that mutate exported values can be rewritten as: - // expr -> exports('name', expr). - // The only exception in this rule is postfix unary operators, - // see comment to 'emitPostfixUnaryExpression' for more details - ts.Debug.assert(!exportFunctionForFile); - // make sure that name of 'exports' function does not conflict with existing identifiers - exportFunctionForFile = makeUniqueName("exports"); - write("System.register("); - if (node.moduleName) { - write("\"" + node.moduleName + "\", "); - } - write("["); - for (var i = 0; i < externalImports.length; ++i) { - var text = getExternalModuleNameText(externalImports[i]); - if (i !== 0) { - write(", "); - } - write(text); - } - write("], function(" + exportFunctionForFile + ") {"); - writeLine(); - increaseIndent(); - emitCaptureThisForNodeIfNecessary(node); - emitSystemModuleBody(node, startIndex); - decreaseIndent(); - writeLine(); - write("});"); - } - function emitAMDDependencies(node, includeNonAmdDependencies) { - // An AMD define function has the following shape: - // define(id?, dependencies?, factory); - // - // This has the shape of - // define(name, ["module1", "module2"], function (module1Alias) { - // The location of the alias in the parameter list in the factory function needs to - // match the position of the module name in the dependency list. - // - // To ensure this is true in cases of modules with no aliases, e.g.: - // `import "module"` or `` - // we need to add modules without alias names to the end of the dependencies list - var aliasedModuleNames = []; // names of modules with corresponding parameter in the - // factory function. - var unaliasedModuleNames = []; // names of modules with no corresponding parameters in - // factory function. - var importAliasNames = []; // names of the parameters in the factory function; these - // parameters need to match the indexes of the corresponding - // module names in aliasedModuleNames. - // Fill in amd-dependency tags - for (var _a = 0, _b = node.amdDependencies; _a < _b.length; _a++) { - var amdDependency = _b[_a]; - if (amdDependency.name) { - aliasedModuleNames.push("\"" + amdDependency.path + "\""); - importAliasNames.push(amdDependency.name); - } - else { - unaliasedModuleNames.push("\"" + amdDependency.path + "\""); - } - } - for (var _c = 0; _c < externalImports.length; _c++) { - var importNode = externalImports[_c]; - // Find the name of the external module - var externalModuleName = getExternalModuleNameText(importNode); - // Find the name of the module alias, if there is one - var importAliasName = getLocalNameForExternalImport(importNode); - if (includeNonAmdDependencies && importAliasName) { - aliasedModuleNames.push(externalModuleName); - importAliasNames.push(importAliasName); - } - else { - unaliasedModuleNames.push(externalModuleName); - } - } - write("[\"require\", \"exports\""); - if (aliasedModuleNames.length) { - write(", "); - write(aliasedModuleNames.join(", ")); - } - if (unaliasedModuleNames.length) { - write(", "); - write(unaliasedModuleNames.join(", ")); - } - write("], function (require, exports"); - if (importAliasNames.length) { - write(", "); - write(importAliasNames.join(", ")); - } - } - function emitAMDModule(node, startIndex) { - collectExternalModuleInfo(node); - writeLine(); - write("define("); - if (node.moduleName) { - write("\"" + node.moduleName + "\", "); - } - emitAMDDependencies(node, true); - write(") {"); - increaseIndent(); - emitExportStarHelper(); - emitCaptureThisForNodeIfNecessary(node); - emitLinesStartingAt(node.statements, startIndex); - emitTempDeclarations(true); - emitExportEquals(true); - decreaseIndent(); - writeLine(); - write("});"); - } - function emitCommonJSModule(node, startIndex) { - collectExternalModuleInfo(node); - emitExportStarHelper(); - emitCaptureThisForNodeIfNecessary(node); - emitLinesStartingAt(node.statements, startIndex); - emitTempDeclarations(true); - emitExportEquals(false); - } - function emitUMDModule(node, startIndex) { - collectExternalModuleInfo(node); - // Module is detected first to support Browserify users that load into a browser with an AMD loader - writeLines("(function (deps, factory) {\n if (typeof module === 'object' && typeof module.exports === 'object') {\n var v = factory(require, exports); if (v !== undefined) module.exports = v;\n }\n else if (typeof define === 'function' && define.amd) {\n define(deps, factory);\n }\n})("); - emitAMDDependencies(node, false); - write(") {"); - increaseIndent(); - emitExportStarHelper(); - emitCaptureThisForNodeIfNecessary(node); - emitLinesStartingAt(node.statements, startIndex); - emitTempDeclarations(true); - emitExportEquals(true); - decreaseIndent(); - writeLine(); - write("});"); - } - function emitES6Module(node, startIndex) { - externalImports = undefined; - exportSpecifiers = undefined; - exportEquals = undefined; - hasExportStars = false; - emitCaptureThisForNodeIfNecessary(node); - emitLinesStartingAt(node.statements, startIndex); - emitTempDeclarations(true); - // Emit exportDefault if it exists will happen as part - // or normal statement emit. - } - function emitExportEquals(emitAsReturn) { - if (exportEquals && resolver.isValueAliasDeclaration(exportEquals)) { - writeLine(); - emitStart(exportEquals); - write(emitAsReturn ? "return " : "module.exports = "); - emit(exportEquals.expression); - write(";"); - emitEnd(exportEquals); - } - } - function emitDirectivePrologues(statements, startWithNewLine) { - for (var i = 0; i < statements.length; ++i) { - if (ts.isPrologueDirective(statements[i])) { - if (startWithNewLine || i > 0) { - writeLine(); - } - emit(statements[i]); - } - else { - // return index of the first non prologue directive - return i; - } - } - return statements.length; - } - function writeLines(text) { - var lines = text.split(/\r\n|\r|\n/g); - for (var i = 0; i < lines.length; ++i) { - var line = lines[i]; - if (line.length) { - writeLine(); - write(line); - } - } - } - function emitSourceFileNode(node) { - // Start new file on new line - writeLine(); - emitDetachedComments(node); - // emit prologue directives prior to __extends - var startIndex = emitDirectivePrologues(node.statements, false); - // Only emit helpers if the user did not say otherwise. - if (!compilerOptions.noEmitHelpers) { - // Only Emit __extends function when target ES5. - // For target ES6 and above, we can emit classDeclaration as is. - if ((languageVersion < 2 /* ES6 */) && (!extendsEmitted && resolver.getNodeCheckFlags(node) & 8 /* EmitExtends */)) { - writeLines(extendsHelper); - extendsEmitted = true; - } - if (!decorateEmitted && resolver.getNodeCheckFlags(node) & 512 /* EmitDecorate */) { - writeLines(decorateHelper); - if (compilerOptions.emitDecoratorMetadata) { - writeLines(metadataHelper); - } - decorateEmitted = true; - } - if (!paramEmitted && resolver.getNodeCheckFlags(node) & 1024 /* EmitParam */) { - writeLines(paramHelper); - paramEmitted = true; - } - } - if (ts.isExternalModule(node) || compilerOptions.isolatedModules) { - if (languageVersion >= 2 /* ES6 */) { - emitES6Module(node, startIndex); - } - else if (compilerOptions.module === 2 /* AMD */) { - emitAMDModule(node, startIndex); - } - else if (compilerOptions.module === 4 /* System */) { - emitSystemModule(node, startIndex); - } - else if (compilerOptions.module === 3 /* UMD */) { - emitUMDModule(node, startIndex); - } - else { - emitCommonJSModule(node, startIndex); - } - } - else { - externalImports = undefined; - exportSpecifiers = undefined; - exportEquals = undefined; - hasExportStars = false; - emitCaptureThisForNodeIfNecessary(node); - emitLinesStartingAt(node.statements, startIndex); - emitTempDeclarations(true); - } - emitLeadingComments(node.endOfFileToken); - } - function emitNodeWithoutSourceMap(node) { - if (!node) { - return; - } - if (node.flags & 2 /* Ambient */) { - return emitOnlyPinnedOrTripleSlashComments(node); - } - var emitComments = shouldEmitLeadingAndTrailingComments(node); - if (emitComments) { - emitLeadingComments(node); - } - emitJavaScriptWorker(node); - if (emitComments) { - emitTrailingComments(node); - } - } - function shouldEmitLeadingAndTrailingComments(node) { - switch (node.kind) { - // All of these entities are emitted in a specialized fashion. As such, we allow - // the specialized methods for each to handle the comments on the nodes. - case 205 /* InterfaceDeclaration */: - case 203 /* FunctionDeclaration */: - case 212 /* ImportDeclaration */: - case 211 /* ImportEqualsDeclaration */: - case 206 /* TypeAliasDeclaration */: - case 217 /* ExportAssignment */: - return false; - case 183 /* VariableStatement */: - return shouldEmitLeadingAndTrailingCommentsForVariableStatement(node); - case 208 /* ModuleDeclaration */: - // Only emit the leading/trailing comments for a module if we're actually - // emitting the module as well. - return shouldEmitModuleDeclaration(node); - case 207 /* EnumDeclaration */: - // Only emit the leading/trailing comments for an enum if we're actually - // emitting the module as well. - return shouldEmitEnumDeclaration(node); - } - // If this is the expression body of an arrow function that we're down-leveling, - // then we don't want to emit comments when we emit the body. It will have already - // been taken care of when we emitted the 'return' statement for the function - // expression body. - if (node.kind !== 182 /* Block */ && - node.parent && - node.parent.kind === 166 /* ArrowFunction */ && - node.parent.body === node && - compilerOptions.target <= 1 /* ES5 */) { - return false; - } - // Emit comments for everything else. - return true; - } - function emitJavaScriptWorker(node) { - // Check if the node can be emitted regardless of the ScriptTarget - switch (node.kind) { - case 65 /* Identifier */: - return emitIdentifier(node); - case 131 /* Parameter */: - return emitParameter(node); - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - return emitMethod(node); - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - return emitAccessor(node); - case 93 /* ThisKeyword */: - return emitThis(node); - case 91 /* SuperKeyword */: - return emitSuper(node); - case 89 /* NullKeyword */: - return write("null"); - case 95 /* TrueKeyword */: - return write("true"); - case 80 /* FalseKeyword */: - return write("false"); - case 7 /* NumericLiteral */: - case 8 /* StringLiteral */: - case 9 /* RegularExpressionLiteral */: - case 10 /* NoSubstitutionTemplateLiteral */: - case 11 /* TemplateHead */: - case 12 /* TemplateMiddle */: - case 13 /* TemplateTail */: - return emitLiteral(node); - case 174 /* TemplateExpression */: - return emitTemplateExpression(node); - case 180 /* TemplateSpan */: - return emitTemplateSpan(node); - case 128 /* QualifiedName */: - return emitQualifiedName(node); - case 153 /* ObjectBindingPattern */: - return emitObjectBindingPattern(node); - case 154 /* ArrayBindingPattern */: - return emitArrayBindingPattern(node); - case 155 /* BindingElement */: - return emitBindingElement(node); - case 156 /* ArrayLiteralExpression */: - return emitArrayLiteral(node); - case 157 /* ObjectLiteralExpression */: - return emitObjectLiteral(node); - case 227 /* PropertyAssignment */: - return emitPropertyAssignment(node); - case 228 /* ShorthandPropertyAssignment */: - return emitShorthandPropertyAssignment(node); - case 129 /* ComputedPropertyName */: - return emitComputedPropertyName(node); - case 158 /* PropertyAccessExpression */: - return emitPropertyAccess(node); - case 159 /* ElementAccessExpression */: - return emitIndexedAccess(node); - case 160 /* CallExpression */: - return emitCallExpression(node); - case 161 /* NewExpression */: - return emitNewExpression(node); - case 162 /* TaggedTemplateExpression */: - return emitTaggedTemplateExpression(node); - case 163 /* TypeAssertionExpression */: - return emit(node.expression); - case 164 /* ParenthesizedExpression */: - return emitParenExpression(node); - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - return emitFunctionDeclaration(node); - case 167 /* DeleteExpression */: - return emitDeleteExpression(node); - case 168 /* TypeOfExpression */: - return emitTypeOfExpression(node); - case 169 /* VoidExpression */: - return emitVoidExpression(node); - case 170 /* PrefixUnaryExpression */: - return emitPrefixUnaryExpression(node); - case 171 /* PostfixUnaryExpression */: - return emitPostfixUnaryExpression(node); - case 172 /* BinaryExpression */: - return emitBinaryExpression(node); - case 173 /* ConditionalExpression */: - return emitConditionalExpression(node); - case 176 /* SpreadElementExpression */: - return emitSpreadElementExpression(node); - case 175 /* YieldExpression */: - return emitYieldExpression(node); - case 178 /* OmittedExpression */: - return; - case 182 /* Block */: - case 209 /* ModuleBlock */: - return emitBlock(node); - case 183 /* VariableStatement */: - return emitVariableStatement(node); - case 184 /* EmptyStatement */: - return write(";"); - case 185 /* ExpressionStatement */: - return emitExpressionStatement(node); - case 186 /* IfStatement */: - return emitIfStatement(node); - case 187 /* DoStatement */: - return emitDoStatement(node); - case 188 /* WhileStatement */: - return emitWhileStatement(node); - case 189 /* ForStatement */: - return emitForStatement(node); - case 191 /* ForOfStatement */: - case 190 /* ForInStatement */: - return emitForInOrForOfStatement(node); - case 192 /* ContinueStatement */: - case 193 /* BreakStatement */: - return emitBreakOrContinueStatement(node); - case 194 /* ReturnStatement */: - return emitReturnStatement(node); - case 195 /* WithStatement */: - return emitWithStatement(node); - case 196 /* SwitchStatement */: - return emitSwitchStatement(node); - case 223 /* CaseClause */: - case 224 /* DefaultClause */: - return emitCaseOrDefaultClause(node); - case 197 /* LabeledStatement */: - return emitLabelledStatement(node); - case 198 /* ThrowStatement */: - return emitThrowStatement(node); - case 199 /* TryStatement */: - return emitTryStatement(node); - case 226 /* CatchClause */: - return emitCatchClause(node); - case 200 /* DebuggerStatement */: - return emitDebuggerStatement(node); - case 201 /* VariableDeclaration */: - return emitVariableDeclaration(node); - case 177 /* ClassExpression */: - return emitClassExpression(node); - case 204 /* ClassDeclaration */: - return emitClassDeclaration(node); - case 205 /* InterfaceDeclaration */: - return emitInterfaceDeclaration(node); - case 207 /* EnumDeclaration */: - return emitEnumDeclaration(node); - case 229 /* EnumMember */: - return emitEnumMember(node); - case 208 /* ModuleDeclaration */: - return emitModuleDeclaration(node); - case 212 /* ImportDeclaration */: - return emitImportDeclaration(node); - case 211 /* ImportEqualsDeclaration */: - return emitImportEqualsDeclaration(node); - case 218 /* ExportDeclaration */: - return emitExportDeclaration(node); - case 217 /* ExportAssignment */: - return emitExportAssignment(node); - case 230 /* SourceFile */: - return emitSourceFileNode(node); - } - } - function hasDetachedComments(pos) { - return detachedCommentsInfo !== undefined && ts.lastOrUndefined(detachedCommentsInfo).nodePos === pos; - } - function getLeadingCommentsWithoutDetachedComments() { - // get the leading comments from detachedPos - var leadingComments = ts.getLeadingCommentRanges(currentSourceFile.text, ts.lastOrUndefined(detachedCommentsInfo).detachedCommentEndPos); - if (detachedCommentsInfo.length - 1) { - detachedCommentsInfo.pop(); - } - else { - detachedCommentsInfo = undefined; - } - return leadingComments; - } - function filterComments(ranges, onlyPinnedOrTripleSlashComments) { - // If we're removing comments, then we want to strip out all but the pinned or - // triple slash comments. - if (ranges && onlyPinnedOrTripleSlashComments) { - ranges = ts.filter(ranges, isPinnedOrTripleSlashComment); - if (ranges.length === 0) { - return undefined; - } - } - return ranges; - } - function getLeadingCommentsToEmit(node) { - // Emit the leading comments only if the parent's pos doesn't match because parent should take care of emitting these comments - if (node.parent) { - if (node.parent.kind === 230 /* SourceFile */ || node.pos !== node.parent.pos) { - if (hasDetachedComments(node.pos)) { - // get comments without detached comments - return getLeadingCommentsWithoutDetachedComments(); - } - else { - // get the leading comments from the node - return ts.getLeadingCommentRangesOfNode(node, currentSourceFile); - } - } - } - } - function getTrailingCommentsToEmit(node) { - // Emit the trailing comments only if the parent's pos doesn't match because parent should take care of emitting these comments - if (node.parent) { - if (node.parent.kind === 230 /* SourceFile */ || node.end !== node.parent.end) { - return ts.getTrailingCommentRanges(currentSourceFile.text, node.end); - } - } - } - function emitOnlyPinnedOrTripleSlashComments(node) { - emitLeadingCommentsWorker(node, true); - } - function emitLeadingComments(node) { - return emitLeadingCommentsWorker(node, compilerOptions.removeComments); - } - function emitLeadingCommentsWorker(node, onlyPinnedOrTripleSlashComments) { - // If the caller only wants pinned or triple slash comments, then always filter - // down to that set. Otherwise, filter based on the current compiler options. - var leadingComments = filterComments(getLeadingCommentsToEmit(node), onlyPinnedOrTripleSlashComments); - ts.emitNewLineBeforeLeadingComments(currentSourceFile, writer, node, leadingComments); - // Leading comments are emitted at /*leading comment1 */space/*leading comment*/space - ts.emitComments(currentSourceFile, writer, leadingComments, true, newLine, writeComment); - } - function emitTrailingComments(node) { - // Emit the trailing comments only if the parent's end doesn't match - var trailingComments = filterComments(getTrailingCommentsToEmit(node), compilerOptions.removeComments); - // trailing comments are emitted at space/*trailing comment1 */space/*trailing comment*/ - ts.emitComments(currentSourceFile, writer, trailingComments, false, newLine, writeComment); - } - function emitLeadingCommentsOfPosition(pos) { - var leadingComments; - if (hasDetachedComments(pos)) { - // get comments without detached comments - leadingComments = getLeadingCommentsWithoutDetachedComments(); - } - else { - // get the leading comments from the node - leadingComments = ts.getLeadingCommentRanges(currentSourceFile.text, pos); - } - leadingComments = filterComments(leadingComments, compilerOptions.removeComments); - ts.emitNewLineBeforeLeadingComments(currentSourceFile, writer, { pos: pos, end: pos }, leadingComments); - // Leading comments are emitted at /*leading comment1 */space/*leading comment*/space - ts.emitComments(currentSourceFile, writer, leadingComments, true, newLine, writeComment); - } - function emitDetachedComments(node) { - var leadingComments = ts.getLeadingCommentRanges(currentSourceFile.text, node.pos); - if (leadingComments) { - var detachedComments = []; - var lastComment; - ts.forEach(leadingComments, function (comment) { - if (lastComment) { - var lastCommentLine = ts.getLineOfLocalPosition(currentSourceFile, lastComment.end); - var commentLine = ts.getLineOfLocalPosition(currentSourceFile, comment.pos); - if (commentLine >= lastCommentLine + 2) { - // There was a blank line between the last comment and this comment. This - // comment is not part of the copyright comments. Return what we have so - // far. - return detachedComments; - } - } - detachedComments.push(comment); - lastComment = comment; - }); - if (detachedComments.length) { - // All comments look like they could have been part of the copyright header. Make - // sure there is at least one blank line between it and the node. If not, it's not - // a copyright header. - var lastCommentLine = ts.getLineOfLocalPosition(currentSourceFile, ts.lastOrUndefined(detachedComments).end); - var nodeLine = ts.getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node.pos)); - if (nodeLine >= lastCommentLine + 2) { - // Valid detachedComments - ts.emitNewLineBeforeLeadingComments(currentSourceFile, writer, node, leadingComments); - ts.emitComments(currentSourceFile, writer, detachedComments, true, newLine, writeComment); - var currentDetachedCommentInfo = { nodePos: node.pos, detachedCommentEndPos: ts.lastOrUndefined(detachedComments).end }; - if (detachedCommentsInfo) { - detachedCommentsInfo.push(currentDetachedCommentInfo); - } - else { - detachedCommentsInfo = [currentDetachedCommentInfo]; - } - } - } - } - } - function isPinnedOrTripleSlashComment(comment) { - if (currentSourceFile.text.charCodeAt(comment.pos + 1) === 42 /* asterisk */) { - return currentSourceFile.text.charCodeAt(comment.pos + 2) === 33 /* exclamation */; - } - else if (currentSourceFile.text.charCodeAt(comment.pos + 1) === 47 /* slash */ && - comment.pos + 2 < comment.end && - currentSourceFile.text.charCodeAt(comment.pos + 2) === 47 /* slash */ && - currentSourceFile.text.substring(comment.pos, comment.end).match(ts.fullTripleSlashReferencePathRegEx)) { - return true; - } - } - } - function emitFile(jsFilePath, sourceFile) { - emitJavaScript(jsFilePath, sourceFile); - if (compilerOptions.declaration) { - ts.writeDeclarationFile(jsFilePath, sourceFile, host, resolver, diagnostics); - } - } - } - ts.emitFiles = emitFiles; -})(ts || (ts = {})); -/// -/// -var ts; -(function (ts) { - /* @internal */ ts.programTime = 0; - /* @internal */ ts.emitTime = 0; - /* @internal */ ts.ioReadTime = 0; - /* @internal */ ts.ioWriteTime = 0; - /** The version of the TypeScript compiler release */ - ts.version = "1.5.3"; - function findConfigFile(searchPath) { - var fileName = "tsconfig.json"; - while (true) { - if (ts.sys.fileExists(fileName)) { - return fileName; - } - var parentPath = ts.getDirectoryPath(searchPath); - if (parentPath === searchPath) { - break; - } - searchPath = parentPath; - fileName = "../" + fileName; - } - return undefined; - } - ts.findConfigFile = findConfigFile; - function createCompilerHost(options, setParentNodes) { - var currentDirectory; - var existingDirectories = {}; - function getCanonicalFileName(fileName) { - // if underlying system can distinguish between two files whose names differs only in cases then file name already in canonical form. - // otherwise use toLowerCase as a canonical form. - return ts.sys.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase(); - } - // returned by CScript sys environment - var unsupportedFileEncodingErrorCode = -2147024809; - function getSourceFile(fileName, languageVersion, onError) { - var text; - try { - var start = new Date().getTime(); - text = ts.sys.readFile(fileName, options.charset); - ts.ioReadTime += new Date().getTime() - start; - } - catch (e) { - if (onError) { - onError(e.number === unsupportedFileEncodingErrorCode - ? ts.createCompilerDiagnostic(ts.Diagnostics.Unsupported_file_encoding).messageText - : e.message); - } - text = ""; - } - return text !== undefined ? ts.createSourceFile(fileName, text, languageVersion, setParentNodes) : undefined; - } - function directoryExists(directoryPath) { - if (ts.hasProperty(existingDirectories, directoryPath)) { - return true; - } - if (ts.sys.directoryExists(directoryPath)) { - existingDirectories[directoryPath] = true; - return true; - } - return false; - } - function ensureDirectoriesExist(directoryPath) { - if (directoryPath.length > ts.getRootLength(directoryPath) && !directoryExists(directoryPath)) { - var parentDirectory = ts.getDirectoryPath(directoryPath); - ensureDirectoriesExist(parentDirectory); - ts.sys.createDirectory(directoryPath); - } - } - function writeFile(fileName, data, writeByteOrderMark, onError) { - try { - var start = new Date().getTime(); - ensureDirectoriesExist(ts.getDirectoryPath(ts.normalizePath(fileName))); - ts.sys.writeFile(fileName, data, writeByteOrderMark); - ts.ioWriteTime += new Date().getTime() - start; - } - catch (e) { - if (onError) { - onError(e.message); - } - } - } - var newLine = ts.getNewLineCharacter(options); - return { - getSourceFile: getSourceFile, - getDefaultLibFileName: function (options) { return ts.combinePaths(ts.getDirectoryPath(ts.normalizePath(ts.sys.getExecutingFilePath())), ts.getDefaultLibFileName(options)); }, - writeFile: writeFile, - getCurrentDirectory: function () { return currentDirectory || (currentDirectory = ts.sys.getCurrentDirectory()); }, - useCaseSensitiveFileNames: function () { return ts.sys.useCaseSensitiveFileNames; }, - getCanonicalFileName: getCanonicalFileName, - getNewLine: function () { return newLine; } - }; - } - ts.createCompilerHost = createCompilerHost; - function getPreEmitDiagnostics(program, sourceFile) { - var diagnostics = program.getSyntacticDiagnostics(sourceFile).concat(program.getGlobalDiagnostics()).concat(program.getSemanticDiagnostics(sourceFile)); - if (program.getCompilerOptions().declaration) { - diagnostics.concat(program.getDeclarationDiagnostics(sourceFile)); - } - return ts.sortAndDeduplicateDiagnostics(diagnostics); - } - ts.getPreEmitDiagnostics = getPreEmitDiagnostics; - function flattenDiagnosticMessageText(messageText, newLine) { - if (typeof messageText === "string") { - return messageText; - } - else { - var diagnosticChain = messageText; - var result = ""; - var indent = 0; - while (diagnosticChain) { - if (indent) { - result += newLine; - for (var i = 0; i < indent; i++) { - result += " "; - } - } - result += diagnosticChain.messageText; - indent++; - diagnosticChain = diagnosticChain.next; - } - return result; - } - } - ts.flattenDiagnosticMessageText = flattenDiagnosticMessageText; - function createProgram(rootNames, options, host) { - var program; - var files = []; - var diagnostics = ts.createDiagnosticCollection(); - var commonSourceDirectory; - var diagnosticsProducingTypeChecker; - var noDiagnosticsTypeChecker; - var classifiableNames; - var skipDefaultLib = options.noLib; - var start = new Date().getTime(); - host = host || createCompilerHost(options); - var filesByName = ts.createFileMap(function (fileName) { return host.getCanonicalFileName(fileName); }); - ts.forEach(rootNames, function (name) { return processRootFile(name, false); }); - // Do not process the default library if: - // - The '--noLib' flag is used. - // - A 'no-default-lib' reference comment is encountered in - // processing the root files. - if (!skipDefaultLib) { - processRootFile(host.getDefaultLibFileName(options), true); - } - verifyCompilerOptions(); - ts.programTime += new Date().getTime() - start; - program = { - getSourceFile: getSourceFile, - getSourceFiles: function () { return files; }, - getCompilerOptions: function () { return options; }, - getSyntacticDiagnostics: getSyntacticDiagnostics, - getGlobalDiagnostics: getGlobalDiagnostics, - getSemanticDiagnostics: getSemanticDiagnostics, - getDeclarationDiagnostics: getDeclarationDiagnostics, - getCompilerOptionsDiagnostics: getCompilerOptionsDiagnostics, - getTypeChecker: getTypeChecker, - getClassifiableNames: getClassifiableNames, - getDiagnosticsProducingTypeChecker: getDiagnosticsProducingTypeChecker, - getCommonSourceDirectory: function () { return commonSourceDirectory; }, - emit: emit, - getCurrentDirectory: function () { return host.getCurrentDirectory(); }, - getNodeCount: function () { return getDiagnosticsProducingTypeChecker().getNodeCount(); }, - getIdentifierCount: function () { return getDiagnosticsProducingTypeChecker().getIdentifierCount(); }, - getSymbolCount: function () { return getDiagnosticsProducingTypeChecker().getSymbolCount(); }, - getTypeCount: function () { return getDiagnosticsProducingTypeChecker().getTypeCount(); } - }; - return program; - function getClassifiableNames() { - if (!classifiableNames) { - // Initialize a checker so that all our files are bound. - getTypeChecker(); - classifiableNames = {}; - for (var _i = 0; _i < files.length; _i++) { - var sourceFile = files[_i]; - ts.copyMap(sourceFile.classifiableNames, classifiableNames); - } - } - return classifiableNames; - } - function getEmitHost(writeFileCallback) { - return { - getCanonicalFileName: function (fileName) { return host.getCanonicalFileName(fileName); }, - getCommonSourceDirectory: program.getCommonSourceDirectory, - getCompilerOptions: program.getCompilerOptions, - getCurrentDirectory: function () { return host.getCurrentDirectory(); }, - getNewLine: function () { return host.getNewLine(); }, - getSourceFile: program.getSourceFile, - getSourceFiles: program.getSourceFiles, - writeFile: writeFileCallback || (function (fileName, data, writeByteOrderMark, onError) { return host.writeFile(fileName, data, writeByteOrderMark, onError); }) - }; - } - function getDiagnosticsProducingTypeChecker() { - return diagnosticsProducingTypeChecker || (diagnosticsProducingTypeChecker = ts.createTypeChecker(program, true)); - } - function getTypeChecker() { - return noDiagnosticsTypeChecker || (noDiagnosticsTypeChecker = ts.createTypeChecker(program, false)); - } - function emit(sourceFile, writeFileCallback) { - // If the noEmitOnError flag is set, then check if we have any errors so far. If so, - // immediately bail out. - if (options.noEmitOnError && getPreEmitDiagnostics(this).length > 0) { - return { diagnostics: [], sourceMaps: undefined, emitSkipped: true }; - } - // Create the emit resolver outside of the "emitTime" tracking code below. That way - // any cost associated with it (like type checking) are appropriate associated with - // the type-checking counter. - // - // If the -out option is specified, we should not pass the source file to getEmitResolver. - // This is because in the -out scenario all files need to be emitted, and therefore all - // files need to be type checked. And the way to specify that all files need to be type - // checked is to not pass the file to getEmitResolver. - var emitResolver = getDiagnosticsProducingTypeChecker().getEmitResolver(options.out ? undefined : sourceFile); - var start = new Date().getTime(); - var emitResult = ts.emitFiles(emitResolver, getEmitHost(writeFileCallback), sourceFile); - ts.emitTime += new Date().getTime() - start; - return emitResult; - } - function getSourceFile(fileName) { - return filesByName.get(fileName); - } - function getDiagnosticsHelper(sourceFile, getDiagnostics) { - if (sourceFile) { - return getDiagnostics(sourceFile); - } - var allDiagnostics = []; - ts.forEach(program.getSourceFiles(), function (sourceFile) { - ts.addRange(allDiagnostics, getDiagnostics(sourceFile)); - }); - return ts.sortAndDeduplicateDiagnostics(allDiagnostics); - } - function getSyntacticDiagnostics(sourceFile) { - return getDiagnosticsHelper(sourceFile, getSyntacticDiagnosticsForFile); - } - function getSemanticDiagnostics(sourceFile) { - return getDiagnosticsHelper(sourceFile, getSemanticDiagnosticsForFile); - } - function getDeclarationDiagnostics(sourceFile) { - return getDiagnosticsHelper(sourceFile, getDeclarationDiagnosticsForFile); - } - function getSyntacticDiagnosticsForFile(sourceFile) { - return sourceFile.parseDiagnostics; - } - function getSemanticDiagnosticsForFile(sourceFile) { - var typeChecker = getDiagnosticsProducingTypeChecker(); - ts.Debug.assert(!!sourceFile.bindDiagnostics); - var bindDiagnostics = sourceFile.bindDiagnostics; - var checkDiagnostics = typeChecker.getDiagnostics(sourceFile); - var programDiagnostics = diagnostics.getDiagnostics(sourceFile.fileName); - return bindDiagnostics.concat(checkDiagnostics).concat(programDiagnostics); - } - function getDeclarationDiagnosticsForFile(sourceFile) { - if (!ts.isDeclarationFile(sourceFile)) { - var resolver = getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile); - // Don't actually write any files since we're just getting diagnostics. - var writeFile = function () { }; - return ts.getDeclarationDiagnostics(getEmitHost(writeFile), resolver, sourceFile); - } - } - function getCompilerOptionsDiagnostics() { - var allDiagnostics = []; - ts.addRange(allDiagnostics, diagnostics.getGlobalDiagnostics()); - return ts.sortAndDeduplicateDiagnostics(allDiagnostics); - } - function getGlobalDiagnostics() { - var typeChecker = getDiagnosticsProducingTypeChecker(); - var allDiagnostics = []; - ts.addRange(allDiagnostics, typeChecker.getGlobalDiagnostics()); - ts.addRange(allDiagnostics, diagnostics.getGlobalDiagnostics()); - return ts.sortAndDeduplicateDiagnostics(allDiagnostics); - } - function hasExtension(fileName) { - return ts.getBaseFileName(fileName).indexOf(".") >= 0; - } - function processRootFile(fileName, isDefaultLib) { - processSourceFile(ts.normalizePath(fileName), isDefaultLib); - } - function processSourceFile(fileName, isDefaultLib, refFile, refPos, refEnd) { - var start; - var length; - var extensions; - var diagnosticArgument; - if (refEnd !== undefined && refPos !== undefined) { - start = refPos; - length = refEnd - refPos; - } - var diagnostic; - if (hasExtension(fileName)) { - if (!options.allowNonTsExtensions && !ts.forEach(ts.supportedExtensions, function (extension) { return ts.fileExtensionIs(host.getCanonicalFileName(fileName), extension); })) { - diagnostic = ts.Diagnostics.File_0_has_unsupported_extension_The_only_supported_extensions_are_1; - diagnosticArgument = [fileName, "'" + ts.supportedExtensions.join("', '") + "'"]; - } - else if (!findSourceFile(fileName, isDefaultLib, refFile, refPos, refEnd)) { - diagnostic = ts.Diagnostics.File_0_not_found; - diagnosticArgument = [fileName]; - } - else if (refFile && host.getCanonicalFileName(fileName) === host.getCanonicalFileName(refFile.fileName)) { - diagnostic = ts.Diagnostics.A_file_cannot_have_a_reference_to_itself; - diagnosticArgument = [fileName]; - } - } - else { - var nonTsFile = options.allowNonTsExtensions && findSourceFile(fileName, isDefaultLib, refFile, refPos, refEnd); - if (!nonTsFile) { - if (options.allowNonTsExtensions) { - diagnostic = ts.Diagnostics.File_0_not_found; - diagnosticArgument = [fileName]; - } - else if (!ts.forEach(ts.supportedExtensions, function (extension) { return findSourceFile(fileName + extension, isDefaultLib, refFile, refPos, refEnd); })) { - diagnostic = ts.Diagnostics.File_0_not_found; - fileName += ".ts"; - diagnosticArgument = [fileName]; - } - } - } - if (diagnostic) { - if (refFile) { - diagnostics.add(ts.createFileDiagnostic.apply(void 0, [refFile, start, length, diagnostic].concat(diagnosticArgument))); - } - else { - diagnostics.add(ts.createCompilerDiagnostic.apply(void 0, [diagnostic].concat(diagnosticArgument))); - } - } - } - // Get source file from normalized fileName - function findSourceFile(fileName, isDefaultLib, refFile, refStart, refLength) { - var canonicalName = host.getCanonicalFileName(ts.normalizeSlashes(fileName)); - if (filesByName.contains(canonicalName)) { - // We've already looked for this file, use cached result - return getSourceFileFromCache(fileName, canonicalName, false); - } - else { - var normalizedAbsolutePath = ts.getNormalizedAbsolutePath(fileName, host.getCurrentDirectory()); - var canonicalAbsolutePath = host.getCanonicalFileName(normalizedAbsolutePath); - if (filesByName.contains(canonicalAbsolutePath)) { - return getSourceFileFromCache(normalizedAbsolutePath, canonicalAbsolutePath, true); - } - // We haven't looked for this file, do so now and cache result - var file = host.getSourceFile(fileName, options.target, function (hostErrorMessage) { - if (refFile) { - diagnostics.add(ts.createFileDiagnostic(refFile, refStart, refLength, ts.Diagnostics.Cannot_read_file_0_Colon_1, fileName, hostErrorMessage)); - } - else { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_read_file_0_Colon_1, fileName, hostErrorMessage)); - } - }); - filesByName.set(canonicalName, file); - if (file) { - skipDefaultLib = skipDefaultLib || file.hasNoDefaultLib; - // Set the source file for normalized absolute path - filesByName.set(canonicalAbsolutePath, file); - if (!options.noResolve) { - var basePath = ts.getDirectoryPath(fileName); - processReferencedFiles(file, basePath); - processImportedModules(file, basePath); - } - if (isDefaultLib) { - file.isDefaultLib = true; - files.unshift(file); - } - else { - files.push(file); - } - } - return file; - } - function getSourceFileFromCache(fileName, canonicalName, useAbsolutePath) { - var file = filesByName.get(canonicalName); - if (file && host.useCaseSensitiveFileNames()) { - var sourceFileName = useAbsolutePath ? ts.getNormalizedAbsolutePath(file.fileName, host.getCurrentDirectory()) : file.fileName; - if (canonicalName !== sourceFileName) { - diagnostics.add(ts.createFileDiagnostic(refFile, refStart, refLength, ts.Diagnostics.File_name_0_differs_from_already_included_file_name_1_only_in_casing, fileName, sourceFileName)); - } - } - return file; - } - } - function processReferencedFiles(file, basePath) { - ts.forEach(file.referencedFiles, function (ref) { - var referencedFileName = ts.isRootedDiskPath(ref.fileName) ? ref.fileName : ts.combinePaths(basePath, ref.fileName); - processSourceFile(ts.normalizePath(referencedFileName), false, file, ref.pos, ref.end); - }); - } - function processImportedModules(file, basePath) { - ts.forEach(file.statements, function (node) { - if (node.kind === 212 /* ImportDeclaration */ || node.kind === 211 /* ImportEqualsDeclaration */ || node.kind === 218 /* ExportDeclaration */) { - var moduleNameExpr = ts.getExternalModuleName(node); - if (moduleNameExpr && moduleNameExpr.kind === 8 /* StringLiteral */) { - var moduleNameText = moduleNameExpr.text; - if (moduleNameText) { - var searchPath = basePath; - var searchName; - while (true) { - searchName = ts.normalizePath(ts.combinePaths(searchPath, moduleNameText)); - if (ts.forEach(ts.supportedExtensions, function (extension) { return findModuleSourceFile(searchName + extension, moduleNameExpr); })) { - break; - } - var parentPath = ts.getDirectoryPath(searchPath); - if (parentPath === searchPath) { - break; - } - searchPath = parentPath; - } - } - } - } - else if (node.kind === 208 /* ModuleDeclaration */ && node.name.kind === 8 /* StringLiteral */ && (node.flags & 2 /* Ambient */ || ts.isDeclarationFile(file))) { - // TypeScript 1.0 spec (April 2014): 12.1.6 - // An AmbientExternalModuleDeclaration declares an external module. - // This type of declaration is permitted only in the global module. - // The StringLiteral must specify a top - level external module name. - // Relative external module names are not permitted - ts.forEachChild(node.body, function (node) { - if (ts.isExternalModuleImportEqualsDeclaration(node) && - ts.getExternalModuleImportEqualsDeclarationExpression(node).kind === 8 /* StringLiteral */) { - var nameLiteral = ts.getExternalModuleImportEqualsDeclarationExpression(node); - var moduleName = nameLiteral.text; - if (moduleName) { - // TypeScript 1.0 spec (April 2014): 12.1.6 - // An ExternalImportDeclaration in anAmbientExternalModuleDeclaration may reference other external modules - // only through top - level external module names. Relative external module names are not permitted. - var searchName = ts.normalizePath(ts.combinePaths(basePath, moduleName)); - ts.forEach(ts.supportedExtensions, function (extension) { return findModuleSourceFile(searchName + extension, nameLiteral); }); - } - } - }); - } - }); - function findModuleSourceFile(fileName, nameLiteral) { - return findSourceFile(fileName, false, file, nameLiteral.pos, nameLiteral.end - nameLiteral.pos); - } - } - function computeCommonSourceDirectory(sourceFiles) { - var commonPathComponents; - var currentDirectory = host.getCurrentDirectory(); - ts.forEach(files, function (sourceFile) { - // Each file contributes into common source file path - if (ts.isDeclarationFile(sourceFile)) { - return; - } - var sourcePathComponents = ts.getNormalizedPathComponents(sourceFile.fileName, currentDirectory); - sourcePathComponents.pop(); // The base file name is not part of the common directory path - if (!commonPathComponents) { - // first file - commonPathComponents = sourcePathComponents; - return; - } - for (var i = 0, n = Math.min(commonPathComponents.length, sourcePathComponents.length); i < n; i++) { - if (commonPathComponents[i] !== sourcePathComponents[i]) { - if (i === 0) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files)); - return; - } - // New common path found that is 0 -> i-1 - commonPathComponents.length = i; - break; - } - } - // If the sourcePathComponents was shorter than the commonPathComponents, truncate to the sourcePathComponents - if (sourcePathComponents.length < commonPathComponents.length) { - commonPathComponents.length = sourcePathComponents.length; - } - }); - return ts.getNormalizedPathFromPathComponents(commonPathComponents); - } - function checkSourceFilesBelongToPath(sourceFiles, rootDirectory) { - var allFilesBelongToPath = true; - if (sourceFiles) { - var currentDirectory = host.getCurrentDirectory(); - var absoluteRootDirectoryPath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(rootDirectory, currentDirectory)); - for (var _i = 0; _i < sourceFiles.length; _i++) { - var sourceFile = sourceFiles[_i]; - if (!ts.isDeclarationFile(sourceFile)) { - var absoluteSourceFilePath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(sourceFile.fileName, currentDirectory)); - if (absoluteSourceFilePath.indexOf(absoluteRootDirectoryPath) !== 0) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files, sourceFile.fileName, options.rootDir)); - allFilesBelongToPath = false; - } - } - } - } - return allFilesBelongToPath; - } - function verifyCompilerOptions() { - if (options.isolatedModules) { - if (options.sourceMap) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_sourceMap_cannot_be_specified_with_option_isolatedModules)); - } - if (options.declaration) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_declaration_cannot_be_specified_with_option_isolatedModules)); - } - if (options.noEmitOnError) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_noEmitOnError_cannot_be_specified_with_option_isolatedModules)); - } - if (options.out) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_out_cannot_be_specified_with_option_isolatedModules)); - } - } - if (options.inlineSourceMap) { - if (options.sourceMap) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_sourceMap_cannot_be_specified_with_option_inlineSourceMap)); - } - if (options.mapRoot) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_mapRoot_cannot_be_specified_with_option_inlineSourceMap)); - } - if (options.sourceRoot) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_sourceRoot_cannot_be_specified_with_option_inlineSourceMap)); - } - } - if (options.inlineSources) { - if (!options.sourceMap && !options.inlineSourceMap) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_inlineSources_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided)); - } - } - if (!options.sourceMap && (options.mapRoot || options.sourceRoot)) { - // Error to specify --mapRoot or --sourceRoot without mapSourceFiles - if (options.mapRoot) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_mapRoot_cannot_be_specified_without_specifying_sourceMap_option)); - } - if (options.sourceRoot) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_sourceRoot_cannot_be_specified_without_specifying_sourceMap_option)); - } - return; - } - var languageVersion = options.target || 0 /* ES3 */; - var firstExternalModuleSourceFile = ts.forEach(files, function (f) { return ts.isExternalModule(f) ? f : undefined; }); - if (options.isolatedModules) { - if (!options.module && languageVersion < 2 /* ES6 */) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES6_or_higher)); - } - var firstNonExternalModuleSourceFile = ts.forEach(files, function (f) { return !ts.isExternalModule(f) && !ts.isDeclarationFile(f) ? f : undefined; }); - if (firstNonExternalModuleSourceFile) { - var span = ts.getErrorSpanForNode(firstNonExternalModuleSourceFile, firstNonExternalModuleSourceFile); - diagnostics.add(ts.createFileDiagnostic(firstNonExternalModuleSourceFile, span.start, span.length, ts.Diagnostics.Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided)); - } - } - else if (firstExternalModuleSourceFile && languageVersion < 2 /* ES6 */ && !options.module) { - // We cannot use createDiagnosticFromNode because nodes do not have parents yet - var span = ts.getErrorSpanForNode(firstExternalModuleSourceFile, firstExternalModuleSourceFile.externalModuleIndicator); - diagnostics.add(ts.createFileDiagnostic(firstExternalModuleSourceFile, span.start, span.length, ts.Diagnostics.Cannot_compile_modules_unless_the_module_flag_is_provided)); - } - // Cannot specify module gen target when in es6 or above - if (options.module && languageVersion >= 2 /* ES6 */) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_compile_modules_into_commonjs_amd_system_or_umd_when_targeting_ES6_or_higher)); - } - // there has to be common source directory if user specified --outdir || --sourceRoot - // if user specified --mapRoot, there needs to be common source directory if there would be multiple files being emitted - if (options.outDir || - options.sourceRoot || - (options.mapRoot && - (!options.out || firstExternalModuleSourceFile !== undefined))) { - if (options.rootDir && checkSourceFilesBelongToPath(files, options.rootDir)) { - // If a rootDir is specified and is valid use it as the commonSourceDirectory - commonSourceDirectory = ts.getNormalizedAbsolutePath(options.rootDir, host.getCurrentDirectory()); - } - else { - // Compute the commonSourceDirectory from the input files - commonSourceDirectory = computeCommonSourceDirectory(files); - } - if (commonSourceDirectory && commonSourceDirectory[commonSourceDirectory.length - 1] !== ts.directorySeparator) { - // Make sure directory path ends with directory separator so this string can directly - // used to replace with "" to get the relative path of the source file and the relative path doesn't - // start with / making it rooted path - commonSourceDirectory += ts.directorySeparator; - } - } - if (options.noEmit) { - if (options.out || options.outDir) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_noEmit_cannot_be_specified_with_option_out_or_outDir)); - } - if (options.declaration) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_noEmit_cannot_be_specified_with_option_declaration)); - } - } - if (options.emitDecoratorMetadata && - !options.experimentalDecorators) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_experimentalDecorators_must_also_be_specified_when_option_emitDecoratorMetadata_is_specified)); - } - } - } - ts.createProgram = createProgram; -})(ts || (ts = {})); -/// -/// -/// -/// -var ts; -(function (ts) { - /* @internal */ - ts.optionDeclarations = [ - { - name: "charset", - type: "string" - }, - { - name: "declaration", - shortName: "d", - type: "boolean", - description: ts.Diagnostics.Generates_corresponding_d_ts_file - }, - { - name: "diagnostics", - type: "boolean" - }, - { - name: "emitBOM", - type: "boolean" - }, - { - name: "help", - shortName: "h", - type: "boolean", - description: ts.Diagnostics.Print_this_message - }, - { - name: "inlineSourceMap", - type: "boolean" - }, - { - name: "inlineSources", - type: "boolean" - }, - { - name: "listFiles", - type: "boolean" - }, - { - name: "locale", - type: "string" - }, - { - name: "mapRoot", - type: "string", - isFilePath: true, - description: ts.Diagnostics.Specifies_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations, - paramType: ts.Diagnostics.LOCATION - }, - { - name: "module", - shortName: "m", - type: { - "commonjs": 1 /* CommonJS */, - "amd": 2 /* AMD */, - "system": 4 /* System */, - "umd": 3 /* UMD */ - }, - description: ts.Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_or_umd, - paramType: ts.Diagnostics.KIND, - error: ts.Diagnostics.Argument_for_module_option_must_be_commonjs_amd_system_or_umd - }, - { - name: "newLine", - type: { - "crlf": 0 /* CarriageReturnLineFeed */, - "lf": 1 /* LineFeed */ - }, - description: ts.Diagnostics.Specifies_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix, - paramType: ts.Diagnostics.NEWLINE, - error: ts.Diagnostics.Argument_for_newLine_option_must_be_CRLF_or_LF - }, - { - name: "noEmit", - type: "boolean", - description: ts.Diagnostics.Do_not_emit_outputs - }, - { - name: "noEmitHelpers", - type: "boolean" - }, - { - name: "noEmitOnError", - type: "boolean", - description: ts.Diagnostics.Do_not_emit_outputs_if_any_errors_were_reported - }, - { - name: "noImplicitAny", - type: "boolean", - description: ts.Diagnostics.Raise_error_on_expressions_and_declarations_with_an_implied_any_type - }, - { - name: "noLib", - type: "boolean" - }, - { - name: "noResolve", - type: "boolean" - }, - { - name: "skipDefaultLibCheck", - type: "boolean" - }, - { - name: "out", - type: "string", - description: ts.Diagnostics.Concatenate_and_emit_output_to_single_file, - paramType: ts.Diagnostics.FILE - }, - { - name: "outDir", - type: "string", - isFilePath: true, - description: ts.Diagnostics.Redirect_output_structure_to_the_directory, - paramType: ts.Diagnostics.DIRECTORY - }, - { - name: "preserveConstEnums", - type: "boolean", - description: ts.Diagnostics.Do_not_erase_const_enum_declarations_in_generated_code - }, - { - name: "project", - shortName: "p", - type: "string", - isFilePath: true, - description: ts.Diagnostics.Compile_the_project_in_the_given_directory, - paramType: ts.Diagnostics.DIRECTORY - }, - { - name: "removeComments", - type: "boolean", - description: ts.Diagnostics.Do_not_emit_comments_to_output - }, - { - name: "rootDir", - type: "string", - isFilePath: true, - description: ts.Diagnostics.Specifies_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir, - paramType: ts.Diagnostics.LOCATION - }, - { - name: "isolatedModules", - type: "boolean" - }, - { - name: "sourceMap", - type: "boolean", - description: ts.Diagnostics.Generates_corresponding_map_file - }, - { - name: "sourceRoot", - type: "string", - isFilePath: true, - description: ts.Diagnostics.Specifies_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations, - paramType: ts.Diagnostics.LOCATION - }, - { - name: "suppressImplicitAnyIndexErrors", - type: "boolean", - description: ts.Diagnostics.Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures - }, - { - name: "stripInternal", - type: "boolean", - description: ts.Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation, - experimental: true - }, - { - name: "target", - shortName: "t", - type: { "es3": 0 /* ES3 */, "es5": 1 /* ES5 */, "es6": 2 /* ES6 */ }, - description: ts.Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES6_experimental, - paramType: ts.Diagnostics.VERSION, - error: ts.Diagnostics.Argument_for_target_option_must_be_ES3_ES5_or_ES6 - }, - { - name: "version", - shortName: "v", - type: "boolean", - description: ts.Diagnostics.Print_the_compiler_s_version - }, - { - name: "watch", - shortName: "w", - type: "boolean", - description: ts.Diagnostics.Watch_input_files - }, - { - name: "experimentalDecorators", - type: "boolean", - description: ts.Diagnostics.Enables_experimental_support_for_ES7_decorators - }, - { - name: "emitDecoratorMetadata", - type: "boolean", - experimental: true, - description: ts.Diagnostics.Enables_experimental_support_for_emitting_type_metadata_for_decorators - } - ]; - function parseCommandLine(commandLine) { - var options = {}; - var fileNames = []; - var errors = []; - var shortOptionNames = {}; - var optionNameMap = {}; - ts.forEach(ts.optionDeclarations, function (option) { - optionNameMap[option.name.toLowerCase()] = option; - if (option.shortName) { - shortOptionNames[option.shortName] = option.name; - } - }); - parseStrings(commandLine); - return { - options: options, - fileNames: fileNames, - errors: errors - }; - function parseStrings(args) { - var i = 0; - while (i < args.length) { - var s = args[i++]; - if (s.charCodeAt(0) === 64 /* at */) { - parseResponseFile(s.slice(1)); - } - else if (s.charCodeAt(0) === 45 /* minus */) { - s = s.slice(s.charCodeAt(1) === 45 /* minus */ ? 2 : 1).toLowerCase(); - // Try to translate short option names to their full equivalents. - if (ts.hasProperty(shortOptionNames, s)) { - s = shortOptionNames[s]; - } - if (ts.hasProperty(optionNameMap, s)) { - var opt = optionNameMap[s]; - // Check to see if no argument was provided (e.g. "--locale" is the last command-line argument). - if (!args[i] && opt.type !== "boolean") { - errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_expects_an_argument, opt.name)); - } - switch (opt.type) { - case "number": - options[opt.name] = parseInt(args[i++]); - break; - case "boolean": - options[opt.name] = true; - break; - case "string": - options[opt.name] = args[i++] || ""; - break; - // If not a primitive, the possible types are specified in what is effectively a map of options. - default: - var map = opt.type; - var key = (args[i++] || "").toLowerCase(); - if (ts.hasProperty(map, key)) { - options[opt.name] = map[key]; - } - else { - errors.push(ts.createCompilerDiagnostic(opt.error)); - } - } - } - else { - errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unknown_compiler_option_0, s)); - } - } - else { - fileNames.push(s); - } - } - } - function parseResponseFile(fileName) { - var text = ts.sys.readFile(fileName); - if (!text) { - errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.File_0_not_found, fileName)); - return; - } - var args = []; - var pos = 0; - while (true) { - while (pos < text.length && text.charCodeAt(pos) <= 32 /* space */) - pos++; - if (pos >= text.length) - break; - var start = pos; - if (text.charCodeAt(start) === 34 /* doubleQuote */) { - pos++; - while (pos < text.length && text.charCodeAt(pos) !== 34 /* doubleQuote */) - pos++; - if (pos < text.length) { - args.push(text.substring(start + 1, pos)); - pos++; - } - else { - errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unterminated_quoted_string_in_response_file_0, fileName)); - } - } - else { - while (text.charCodeAt(pos) > 32 /* space */) - pos++; - args.push(text.substring(start, pos)); - } - } - parseStrings(args); - } - } - ts.parseCommandLine = parseCommandLine; - /** - * Read tsconfig.json file - * @param fileName The path to the config file - */ - function readConfigFile(fileName) { - try { - var text = ts.sys.readFile(fileName); - } - catch (e) { - return { error: ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_read_file_0_Colon_1, fileName, e.message) }; - } - return parseConfigFileText(fileName, text); - } - ts.readConfigFile = readConfigFile; - /** - * Parse the text of the tsconfig.json file - * @param fileName The path to the config file - * @param jsonText The text of the config file - */ - function parseConfigFileText(fileName, jsonText) { - try { - return { config: /\S/.test(jsonText) ? JSON.parse(jsonText) : {} }; - } - catch (e) { - return { error: ts.createCompilerDiagnostic(ts.Diagnostics.Failed_to_parse_file_0_Colon_1, fileName, e.message) }; - } - } - ts.parseConfigFileText = parseConfigFileText; - /** - * Parse the contents of a config file (tsconfig.json). - * @param json The contents of the config file to parse - * @param basePath A root directory to resolve relative path entries in the config - * file to. e.g. outDir - */ - function parseConfigFile(json, host, basePath) { - var errors = []; - return { - options: getCompilerOptions(), - fileNames: getFileNames(), - errors: errors - }; - function getCompilerOptions() { - var options = {}; - var optionNameMap = {}; - ts.forEach(ts.optionDeclarations, function (option) { - optionNameMap[option.name] = option; - }); - var jsonOptions = json["compilerOptions"]; - if (jsonOptions) { - for (var id in jsonOptions) { - if (ts.hasProperty(optionNameMap, id)) { - var opt = optionNameMap[id]; - var optType = opt.type; - var value = jsonOptions[id]; - var expectedType = typeof optType === "string" ? optType : "string"; - if (typeof value === expectedType) { - if (typeof optType !== "string") { - var key = value.toLowerCase(); - if (ts.hasProperty(optType, key)) { - value = optType[key]; - } - else { - errors.push(ts.createCompilerDiagnostic(opt.error)); - value = 0; - } - } - if (opt.isFilePath) { - value = ts.normalizePath(ts.combinePaths(basePath, value)); - } - options[opt.name] = value; - } - else { - errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, id, expectedType)); - } - } - else { - errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unknown_compiler_option_0, id)); - } - } - } - return options; - } - function getFileNames() { - var fileNames = []; - if (ts.hasProperty(json, "files")) { - if (json["files"] instanceof Array) { - fileNames = ts.map(json["files"], function (s) { return ts.combinePaths(basePath, s); }); - } - } - else { - var exclude = json["exclude"] instanceof Array ? ts.map(json["exclude"], ts.normalizeSlashes) : undefined; - var sysFiles = host.readDirectory(basePath, ".ts", exclude); - for (var i = 0; i < sysFiles.length; i++) { - var name = sysFiles[i]; - if (!ts.fileExtensionIs(name, ".d.ts") || !ts.contains(sysFiles, name.substr(0, name.length - 5) + ".ts")) { - fileNames.push(name); - } - } - } - return fileNames; - } - } - ts.parseConfigFile = parseConfigFile; -})(ts || (ts = {})); -/* @internal */ -var ts; -(function (ts) { - var OutliningElementsCollector; - (function (OutliningElementsCollector) { - function collectElements(sourceFile) { - var elements = []; - var collapseText = "..."; - function addOutliningSpan(hintSpanNode, startElement, endElement, autoCollapse) { - if (hintSpanNode && startElement && endElement) { - var span = { - textSpan: ts.createTextSpanFromBounds(startElement.pos, endElement.end), - hintSpan: ts.createTextSpanFromBounds(hintSpanNode.getStart(), hintSpanNode.end), - bannerText: collapseText, - autoCollapse: autoCollapse - }; - elements.push(span); - } - } - function addOutliningSpanComments(commentSpan, autoCollapse) { - if (commentSpan) { - var span = { - textSpan: ts.createTextSpanFromBounds(commentSpan.pos, commentSpan.end), - hintSpan: ts.createTextSpanFromBounds(commentSpan.pos, commentSpan.end), - bannerText: collapseText, - autoCollapse: autoCollapse - }; - elements.push(span); - } - } - function addOutliningForLeadingCommentsForNode(n) { - var comments = ts.getLeadingCommentRangesOfNode(n, sourceFile); - if (comments) { - var firstSingleLineCommentStart = -1; - var lastSingleLineCommentEnd = -1; - var isFirstSingleLineComment = true; - var singleLineCommentCount = 0; - for (var _i = 0; _i < comments.length; _i++) { - var currentComment = comments[_i]; - // For single line comments, combine consecutive ones (2 or more) into - // a single span from the start of the first till the end of the last - if (currentComment.kind === 2 /* SingleLineCommentTrivia */) { - if (isFirstSingleLineComment) { - firstSingleLineCommentStart = currentComment.pos; - } - isFirstSingleLineComment = false; - lastSingleLineCommentEnd = currentComment.end; - singleLineCommentCount++; - } - else if (currentComment.kind === 3 /* MultiLineCommentTrivia */) { - combineAndAddMultipleSingleLineComments(singleLineCommentCount, firstSingleLineCommentStart, lastSingleLineCommentEnd); - addOutliningSpanComments(currentComment, false); - singleLineCommentCount = 0; - lastSingleLineCommentEnd = -1; - isFirstSingleLineComment = true; - } - } - combineAndAddMultipleSingleLineComments(singleLineCommentCount, firstSingleLineCommentStart, lastSingleLineCommentEnd); - } - } - function combineAndAddMultipleSingleLineComments(count, start, end) { - // Only outline spans of two or more consecutive single line comments - if (count > 1) { - var multipleSingleLineComments = { - pos: start, - end: end, - kind: 2 /* SingleLineCommentTrivia */ - }; - addOutliningSpanComments(multipleSingleLineComments, false); - } - } - function autoCollapse(node) { - return ts.isFunctionBlock(node) && node.parent.kind !== 166 /* ArrowFunction */; - } - var depth = 0; - var maxDepth = 20; - function walk(n) { - if (depth > maxDepth) { - return; - } - if (ts.isDeclaration(n)) { - addOutliningForLeadingCommentsForNode(n); - } - switch (n.kind) { - case 182 /* Block */: - if (!ts.isFunctionBlock(n)) { - var parent_8 = n.parent; - var openBrace = ts.findChildOfKind(n, 14 /* OpenBraceToken */, sourceFile); - var closeBrace = ts.findChildOfKind(n, 15 /* CloseBraceToken */, sourceFile); - // Check if the block is standalone, or 'attached' to some parent statement. - // If the latter, we want to collaps the block, but consider its hint span - // to be the entire span of the parent. - if (parent_8.kind === 187 /* DoStatement */ || - parent_8.kind === 190 /* ForInStatement */ || - parent_8.kind === 191 /* ForOfStatement */ || - parent_8.kind === 189 /* ForStatement */ || - parent_8.kind === 186 /* IfStatement */ || - parent_8.kind === 188 /* WhileStatement */ || - parent_8.kind === 195 /* WithStatement */ || - parent_8.kind === 226 /* CatchClause */) { - addOutliningSpan(parent_8, openBrace, closeBrace, autoCollapse(n)); - break; - } - if (parent_8.kind === 199 /* TryStatement */) { - // Could be the try-block, or the finally-block. - var tryStatement = parent_8; - if (tryStatement.tryBlock === n) { - addOutliningSpan(parent_8, openBrace, closeBrace, autoCollapse(n)); - break; - } - else if (tryStatement.finallyBlock === n) { - var finallyKeyword = ts.findChildOfKind(tryStatement, 81 /* FinallyKeyword */, sourceFile); - if (finallyKeyword) { - addOutliningSpan(finallyKeyword, openBrace, closeBrace, autoCollapse(n)); - break; - } - } - } - // Block was a standalone block. In this case we want to only collapse - // the span of the block, independent of any parent span. - var span = ts.createTextSpanFromBounds(n.getStart(), n.end); - elements.push({ - textSpan: span, - hintSpan: span, - bannerText: collapseText, - autoCollapse: autoCollapse(n) - }); - break; - } - // Fallthrough. - case 209 /* ModuleBlock */: { - var openBrace = ts.findChildOfKind(n, 14 /* OpenBraceToken */, sourceFile); - var closeBrace = ts.findChildOfKind(n, 15 /* CloseBraceToken */, sourceFile); - addOutliningSpan(n.parent, openBrace, closeBrace, autoCollapse(n)); - break; - } - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - case 207 /* EnumDeclaration */: - case 157 /* ObjectLiteralExpression */: - case 210 /* CaseBlock */: { - var openBrace = ts.findChildOfKind(n, 14 /* OpenBraceToken */, sourceFile); - var closeBrace = ts.findChildOfKind(n, 15 /* CloseBraceToken */, sourceFile); - addOutliningSpan(n, openBrace, closeBrace, autoCollapse(n)); - break; - } - case 156 /* ArrayLiteralExpression */: - var openBracket = ts.findChildOfKind(n, 18 /* OpenBracketToken */, sourceFile); - var closeBracket = ts.findChildOfKind(n, 19 /* CloseBracketToken */, sourceFile); - addOutliningSpan(n, openBracket, closeBracket, autoCollapse(n)); - break; - } - depth++; - ts.forEachChild(n, walk); - depth--; - } - walk(sourceFile); - return elements; - } - OutliningElementsCollector.collectElements = collectElements; - })(OutliningElementsCollector = ts.OutliningElementsCollector || (ts.OutliningElementsCollector = {})); -})(ts || (ts = {})); -/* @internal */ -var ts; -(function (ts) { - var NavigateTo; - (function (NavigateTo) { - function getNavigateToItems(program, cancellationToken, searchValue, maxResultCount) { - var patternMatcher = ts.createPatternMatcher(searchValue); - var rawItems = []; - // Search the declarations in all files and output matched NavigateToItem into array of NavigateToItem[] - ts.forEach(program.getSourceFiles(), function (sourceFile) { - cancellationToken.throwIfCancellationRequested(); - var nameToDeclarations = sourceFile.getNamedDeclarations(); - for (var name_27 in nameToDeclarations) { - var declarations = ts.getProperty(nameToDeclarations, name_27); - if (declarations) { - // First do a quick check to see if the name of the declaration matches the - // last portion of the (possibly) dotted name they're searching for. - var matches = patternMatcher.getMatchesForLastSegmentOfPattern(name_27); - if (!matches) { - continue; - } - for (var _i = 0; _i < declarations.length; _i++) { - var declaration = declarations[_i]; - // It was a match! If the pattern has dots in it, then also see if the - // declaration container matches as well. - if (patternMatcher.patternContainsDots) { - var containers = getContainers(declaration); - if (!containers) { - return undefined; - } - matches = patternMatcher.getMatches(containers, name_27); - if (!matches) { - continue; - } - } - var fileName = sourceFile.fileName; - var matchKind = bestMatchKind(matches); - rawItems.push({ name: name_27, fileName: fileName, matchKind: matchKind, isCaseSensitive: allMatchesAreCaseSensitive(matches), declaration: declaration }); - } - } - } - }); - rawItems.sort(compareNavigateToItems); - if (maxResultCount !== undefined) { - rawItems = rawItems.slice(0, maxResultCount); - } - var items = ts.map(rawItems, createNavigateToItem); - return items; - function allMatchesAreCaseSensitive(matches) { - ts.Debug.assert(matches.length > 0); - // This is a case sensitive match, only if all the submatches were case sensitive. - for (var _i = 0; _i < matches.length; _i++) { - var match = matches[_i]; - if (!match.isCaseSensitive) { - return false; - } - } - return true; - } - function getTextOfIdentifierOrLiteral(node) { - if (node) { - if (node.kind === 65 /* Identifier */ || - node.kind === 8 /* StringLiteral */ || - node.kind === 7 /* NumericLiteral */) { - return node.text; - } - } - return undefined; - } - function tryAddSingleDeclarationName(declaration, containers) { - if (declaration && declaration.name) { - var text = getTextOfIdentifierOrLiteral(declaration.name); - if (text !== undefined) { - containers.unshift(text); - } - else if (declaration.name.kind === 129 /* ComputedPropertyName */) { - return tryAddComputedPropertyName(declaration.name.expression, containers, true); - } - else { - // Don't know how to add this. - return false; - } - } - return true; - } - // Only added the names of computed properties if they're simple dotted expressions, like: - // - // [X.Y.Z]() { } - function tryAddComputedPropertyName(expression, containers, includeLastPortion) { - var text = getTextOfIdentifierOrLiteral(expression); - if (text !== undefined) { - if (includeLastPortion) { - containers.unshift(text); - } - return true; - } - if (expression.kind === 158 /* PropertyAccessExpression */) { - var propertyAccess = expression; - if (includeLastPortion) { - containers.unshift(propertyAccess.name.text); - } - return tryAddComputedPropertyName(propertyAccess.expression, containers, true); - } - return false; - } - function getContainers(declaration) { - var containers = []; - // First, if we started with a computed property name, then add all but the last - // portion into the container array. - if (declaration.name.kind === 129 /* ComputedPropertyName */) { - if (!tryAddComputedPropertyName(declaration.name.expression, containers, false)) { - return undefined; - } - } - // Now, walk up our containers, adding all their names to the container array. - declaration = ts.getContainerNode(declaration); - while (declaration) { - if (!tryAddSingleDeclarationName(declaration, containers)) { - return undefined; - } - declaration = ts.getContainerNode(declaration); - } - return containers; - } - function bestMatchKind(matches) { - ts.Debug.assert(matches.length > 0); - var bestMatchKind = ts.PatternMatchKind.camelCase; - for (var _i = 0; _i < matches.length; _i++) { - var match = matches[_i]; - var kind = match.kind; - if (kind < bestMatchKind) { - bestMatchKind = kind; - } - } - return bestMatchKind; - } - // This means "compare in a case insensitive manner." - var baseSensitivity = { sensitivity: "base" }; - function compareNavigateToItems(i1, i2) { - // TODO(cyrusn): get the gamut of comparisons that VS already uses here. - // Right now we just sort by kind first, and then by name of the item. - // We first sort case insensitively. So "Aaa" will come before "bar". - // Then we sort case sensitively, so "aaa" will come before "Aaa". - return i1.matchKind - i2.matchKind || - i1.name.localeCompare(i2.name, undefined, baseSensitivity) || - i1.name.localeCompare(i2.name); - } - function createNavigateToItem(rawItem) { - var declaration = rawItem.declaration; - var container = ts.getContainerNode(declaration); - return { - name: rawItem.name, - kind: ts.getNodeKind(declaration), - kindModifiers: ts.getNodeModifiers(declaration), - matchKind: ts.PatternMatchKind[rawItem.matchKind], - isCaseSensitive: rawItem.isCaseSensitive, - fileName: rawItem.fileName, - textSpan: ts.createTextSpanFromBounds(declaration.getStart(), declaration.getEnd()), - // TODO(jfreeman): What should be the containerName when the container has a computed name? - containerName: container && container.name ? container.name.text : "", - containerKind: container && container.name ? ts.getNodeKind(container) : "" - }; - } - } - NavigateTo.getNavigateToItems = getNavigateToItems; - })(NavigateTo = ts.NavigateTo || (ts.NavigateTo = {})); -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var NavigationBar; - (function (NavigationBar) { - function getNavigationBarItems(sourceFile) { - // If the source file has any child items, then it included in the tree - // and takes lexical ownership of all other top-level items. - var hasGlobalNode = false; - return getItemsWorker(getTopLevelNodes(sourceFile), createTopLevelItem); - function getIndent(node) { - // If we have a global node in the tree, - // then it adds an extra layer of depth to all subnodes. - var indent = hasGlobalNode ? 1 : 0; - var current = node.parent; - while (current) { - switch (current.kind) { - case 208 /* ModuleDeclaration */: - // If we have a module declared as A.B.C, it is more "intuitive" - // to say it only has a single layer of depth - do { - current = current.parent; - } while (current.kind === 208 /* ModuleDeclaration */); - // fall through - case 204 /* ClassDeclaration */: - case 207 /* EnumDeclaration */: - case 205 /* InterfaceDeclaration */: - case 203 /* FunctionDeclaration */: - indent++; - } - current = current.parent; - } - return indent; - } - function getChildNodes(nodes) { - var childNodes = []; - function visit(node) { - switch (node.kind) { - case 183 /* VariableStatement */: - ts.forEach(node.declarationList.declarations, visit); - break; - case 153 /* ObjectBindingPattern */: - case 154 /* ArrayBindingPattern */: - ts.forEach(node.elements, visit); - break; - case 218 /* ExportDeclaration */: - // Handle named exports case e.g.: - // export {a, b as B} from "mod"; - if (node.exportClause) { - ts.forEach(node.exportClause.elements, visit); - } - break; - case 212 /* ImportDeclaration */: - var importClause = node.importClause; - if (importClause) { - // Handle default import case e.g.: - // import d from "mod"; - if (importClause.name) { - childNodes.push(importClause); - } - // Handle named bindings in imports e.g.: - // import * as NS from "mod"; - // import {a, b as B} from "mod"; - if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 214 /* NamespaceImport */) { - childNodes.push(importClause.namedBindings); - } - else { - ts.forEach(importClause.namedBindings.elements, visit); - } - } - } - break; - case 155 /* BindingElement */: - case 201 /* VariableDeclaration */: - if (ts.isBindingPattern(node.name)) { - visit(node.name); - break; - } - // Fall through - case 204 /* ClassDeclaration */: - case 207 /* EnumDeclaration */: - case 205 /* InterfaceDeclaration */: - case 208 /* ModuleDeclaration */: - case 203 /* FunctionDeclaration */: - case 211 /* ImportEqualsDeclaration */: - case 216 /* ImportSpecifier */: - case 220 /* ExportSpecifier */: - childNodes.push(node); - break; - } - } - //for (let i = 0, n = nodes.length; i < n; i++) { - // let node = nodes[i]; - // if (node.kind === SyntaxKind.ClassDeclaration || - // node.kind === SyntaxKind.EnumDeclaration || - // node.kind === SyntaxKind.InterfaceDeclaration || - // node.kind === SyntaxKind.ModuleDeclaration || - // node.kind === SyntaxKind.FunctionDeclaration) { - // childNodes.push(node); - // } - // else if (node.kind === SyntaxKind.VariableStatement) { - // childNodes.push.apply(childNodes, (node).declarations); - // } - //} - ts.forEach(nodes, visit); - return sortNodes(childNodes); - } - function getTopLevelNodes(node) { - var topLevelNodes = []; - topLevelNodes.push(node); - addTopLevelNodes(node.statements, topLevelNodes); - return topLevelNodes; - } - function sortNodes(nodes) { - return nodes.slice(0).sort(function (n1, n2) { - if (n1.name && n2.name) { - return ts.getPropertyNameForPropertyNameNode(n1.name).localeCompare(ts.getPropertyNameForPropertyNameNode(n2.name)); - } - else if (n1.name) { - return 1; - } - else if (n2.name) { - return -1; - } - else { - return n1.kind - n2.kind; - } - }); - } - function addTopLevelNodes(nodes, topLevelNodes) { - nodes = sortNodes(nodes); - for (var _i = 0; _i < nodes.length; _i++) { - var node = nodes[_i]; - switch (node.kind) { - case 204 /* ClassDeclaration */: - case 207 /* EnumDeclaration */: - case 205 /* InterfaceDeclaration */: - topLevelNodes.push(node); - break; - case 208 /* ModuleDeclaration */: - var moduleDeclaration = node; - topLevelNodes.push(node); - addTopLevelNodes(getInnermostModule(moduleDeclaration).body.statements, topLevelNodes); - break; - case 203 /* FunctionDeclaration */: - var functionDeclaration = node; - if (isTopLevelFunctionDeclaration(functionDeclaration)) { - topLevelNodes.push(node); - addTopLevelNodes(functionDeclaration.body.statements, topLevelNodes); - } - break; - } - } - } - function isTopLevelFunctionDeclaration(functionDeclaration) { - if (functionDeclaration.kind === 203 /* FunctionDeclaration */) { - // A function declaration is 'top level' if it contains any function declarations - // within it. - if (functionDeclaration.body && functionDeclaration.body.kind === 182 /* Block */) { - // Proper function declarations can only have identifier names - if (ts.forEach(functionDeclaration.body.statements, function (s) { return s.kind === 203 /* FunctionDeclaration */ && !isEmpty(s.name.text); })) { - return true; - } - // Or if it is not parented by another function. i.e all functions - // at module scope are 'top level'. - if (!ts.isFunctionBlock(functionDeclaration.parent)) { - return true; - } - } - } - return false; - } - function getItemsWorker(nodes, createItem) { - var items = []; - var keyToItem = {}; - for (var _i = 0; _i < nodes.length; _i++) { - var child = nodes[_i]; - var item = createItem(child); - if (item !== undefined) { - if (item.text.length > 0) { - var key = item.text + "-" + item.kind + "-" + item.indent; - var itemWithSameName = keyToItem[key]; - if (itemWithSameName) { - // We had an item with the same name. Merge these items together. - merge(itemWithSameName, item); - } - else { - keyToItem[key] = item; - items.push(item); - } - } - } - } - return items; - } - function merge(target, source) { - // First, add any spans in the source to the target. - target.spans.push.apply(target.spans, source.spans); - if (source.childItems) { - if (!target.childItems) { - target.childItems = []; - } - // Next, recursively merge or add any children in the source as appropriate. - outer: for (var _i = 0, _a = source.childItems; _i < _a.length; _i++) { - var sourceChild = _a[_i]; - for (var _b = 0, _c = target.childItems; _b < _c.length; _b++) { - var targetChild = _c[_b]; - if (targetChild.text === sourceChild.text && targetChild.kind === sourceChild.kind) { - // Found a match. merge them. - merge(targetChild, sourceChild); - continue outer; - } - } - // Didn't find a match, just add this child to the list. - target.childItems.push(sourceChild); - } - } - } - function createChildItem(node) { - switch (node.kind) { - case 131 /* Parameter */: - if (ts.isBindingPattern(node.name)) { - break; - } - if ((node.flags & 499 /* Modifier */) === 0) { - return undefined; - } - return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberVariableElement); - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberFunctionElement); - case 138 /* GetAccessor */: - return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberGetAccessorElement); - case 139 /* SetAccessor */: - return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberSetAccessorElement); - case 142 /* IndexSignature */: - return createItem(node, "[]", ts.ScriptElementKind.indexSignatureElement); - case 229 /* EnumMember */: - return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberVariableElement); - case 140 /* CallSignature */: - return createItem(node, "()", ts.ScriptElementKind.callSignatureElement); - case 141 /* ConstructSignature */: - return createItem(node, "new()", ts.ScriptElementKind.constructSignatureElement); - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberVariableElement); - case 203 /* FunctionDeclaration */: - return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.functionElement); - case 201 /* VariableDeclaration */: - case 155 /* BindingElement */: - var variableDeclarationNode; - var name_28; - if (node.kind === 155 /* BindingElement */) { - name_28 = node.name; - variableDeclarationNode = node; - // binding elements are added only for variable declarations - // bubble up to the containing variable declaration - while (variableDeclarationNode && variableDeclarationNode.kind !== 201 /* VariableDeclaration */) { - variableDeclarationNode = variableDeclarationNode.parent; - } - ts.Debug.assert(variableDeclarationNode !== undefined); - } - else { - ts.Debug.assert(!ts.isBindingPattern(node.name)); - variableDeclarationNode = node; - name_28 = node.name; - } - if (ts.isConst(variableDeclarationNode)) { - return createItem(node, getTextOfNode(name_28), ts.ScriptElementKind.constElement); - } - else if (ts.isLet(variableDeclarationNode)) { - return createItem(node, getTextOfNode(name_28), ts.ScriptElementKind.letElement); - } - else { - return createItem(node, getTextOfNode(name_28), ts.ScriptElementKind.variableElement); - } - case 137 /* Constructor */: - return createItem(node, "constructor", ts.ScriptElementKind.constructorImplementationElement); - case 220 /* ExportSpecifier */: - case 216 /* ImportSpecifier */: - case 211 /* ImportEqualsDeclaration */: - case 213 /* ImportClause */: - case 214 /* NamespaceImport */: - return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.alias); - } - return undefined; - function createItem(node, name, scriptElementKind) { - return getNavigationBarItem(name, scriptElementKind, ts.getNodeModifiers(node), [getNodeSpan(node)]); - } - } - function isEmpty(text) { - return !text || text.trim() === ""; - } - function getNavigationBarItem(text, kind, kindModifiers, spans, childItems, indent) { - if (childItems === void 0) { childItems = []; } - if (indent === void 0) { indent = 0; } - if (isEmpty(text)) { - return undefined; - } - return { - text: text, - kind: kind, - kindModifiers: kindModifiers, - spans: spans, - childItems: childItems, - indent: indent, - bolded: false, - grayed: false - }; - } - function createTopLevelItem(node) { - switch (node.kind) { - case 230 /* SourceFile */: - return createSourceFileItem(node); - case 204 /* ClassDeclaration */: - return createClassItem(node); - case 207 /* EnumDeclaration */: - return createEnumItem(node); - case 205 /* InterfaceDeclaration */: - return createIterfaceItem(node); - case 208 /* ModuleDeclaration */: - return createModuleItem(node); - case 203 /* FunctionDeclaration */: - return createFunctionItem(node); - } - return undefined; - function getModuleName(moduleDeclaration) { - // We want to maintain quotation marks. - if (moduleDeclaration.name.kind === 8 /* StringLiteral */) { - return getTextOfNode(moduleDeclaration.name); - } - // Otherwise, we need to aggregate each identifier to build up the qualified name. - var result = []; - result.push(moduleDeclaration.name.text); - while (moduleDeclaration.body && moduleDeclaration.body.kind === 208 /* ModuleDeclaration */) { - moduleDeclaration = moduleDeclaration.body; - result.push(moduleDeclaration.name.text); - } - return result.join("."); - } - function createModuleItem(node) { - var moduleName = getModuleName(node); - var childItems = getItemsWorker(getChildNodes(getInnermostModule(node).body.statements), createChildItem); - return getNavigationBarItem(moduleName, ts.ScriptElementKind.moduleElement, ts.getNodeModifiers(node), [getNodeSpan(node)], childItems, getIndent(node)); - } - function createFunctionItem(node) { - if (node.body && node.body.kind === 182 /* Block */) { - var childItems = getItemsWorker(sortNodes(node.body.statements), createChildItem); - return getNavigationBarItem(!node.name ? "default" : node.name.text, ts.ScriptElementKind.functionElement, ts.getNodeModifiers(node), [getNodeSpan(node)], childItems, getIndent(node)); - } - return undefined; - } - function createSourceFileItem(node) { - var childItems = getItemsWorker(getChildNodes(node.statements), createChildItem); - if (childItems === undefined || childItems.length === 0) { - return undefined; - } - hasGlobalNode = true; - var rootName = ts.isExternalModule(node) - ? "\"" + ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(node.fileName)))) + "\"" - : ""; - return getNavigationBarItem(rootName, ts.ScriptElementKind.moduleElement, ts.ScriptElementKindModifier.none, [getNodeSpan(node)], childItems); - } - function createClassItem(node) { - var childItems; - if (node.members) { - var constructor = ts.forEach(node.members, function (member) { - return member.kind === 137 /* Constructor */ && member; - }); - // Add the constructor parameters in as children of the class (for property parameters). - // Note that *all non-binding pattern named* parameters will be added to the nodes array, but parameters that - // are not properties will be filtered out later by createChildItem. - var nodes = removeDynamicallyNamedProperties(node); - if (constructor) { - nodes.push.apply(nodes, ts.filter(constructor.parameters, function (p) { return !ts.isBindingPattern(p.name); })); - } - childItems = getItemsWorker(sortNodes(nodes), createChildItem); - } - var nodeName = !node.name ? "default" : node.name.text; - return getNavigationBarItem(nodeName, ts.ScriptElementKind.classElement, ts.getNodeModifiers(node), [getNodeSpan(node)], childItems, getIndent(node)); - } - function createEnumItem(node) { - var childItems = getItemsWorker(sortNodes(removeComputedProperties(node)), createChildItem); - return getNavigationBarItem(node.name.text, ts.ScriptElementKind.enumElement, ts.getNodeModifiers(node), [getNodeSpan(node)], childItems, getIndent(node)); - } - function createIterfaceItem(node) { - var childItems = getItemsWorker(sortNodes(removeDynamicallyNamedProperties(node)), createChildItem); - return getNavigationBarItem(node.name.text, ts.ScriptElementKind.interfaceElement, ts.getNodeModifiers(node), [getNodeSpan(node)], childItems, getIndent(node)); - } - } - function removeComputedProperties(node) { - return ts.filter(node.members, function (member) { return member.name === undefined || member.name.kind !== 129 /* ComputedPropertyName */; }); - } - /** - * Like removeComputedProperties, but retains the properties with well known symbol names - */ - function removeDynamicallyNamedProperties(node) { - return ts.filter(node.members, function (member) { return !ts.hasDynamicName(member); }); - } - function getInnermostModule(node) { - while (node.body.kind === 208 /* ModuleDeclaration */) { - node = node.body; - } - return node; - } - function getNodeSpan(node) { - return node.kind === 230 /* SourceFile */ - ? ts.createTextSpanFromBounds(node.getFullStart(), node.getEnd()) - : ts.createTextSpanFromBounds(node.getStart(), node.getEnd()); - } - function getTextOfNode(node) { - return ts.getTextOfNodeFromSourceText(sourceFile.text, node); - } - } - NavigationBar.getNavigationBarItems = getNavigationBarItems; - })(NavigationBar = ts.NavigationBar || (ts.NavigationBar = {})); -})(ts || (ts = {})); -/* @internal */ -var ts; -(function (ts) { - // Note(cyrusn): this enum is ordered from strongest match type to weakest match type. - (function (PatternMatchKind) { - PatternMatchKind[PatternMatchKind["exact"] = 0] = "exact"; - PatternMatchKind[PatternMatchKind["prefix"] = 1] = "prefix"; - PatternMatchKind[PatternMatchKind["substring"] = 2] = "substring"; - PatternMatchKind[PatternMatchKind["camelCase"] = 3] = "camelCase"; - })(ts.PatternMatchKind || (ts.PatternMatchKind = {})); - var PatternMatchKind = ts.PatternMatchKind; - function createPatternMatch(kind, punctuationStripped, isCaseSensitive, camelCaseWeight) { - return { - kind: kind, - punctuationStripped: punctuationStripped, - isCaseSensitive: isCaseSensitive, - camelCaseWeight: camelCaseWeight - }; - } - function createPatternMatcher(pattern) { - // We'll often see the same candidate string many times when searching (For example, when - // we see the name of a module that is used everywhere, or the name of an overload). As - // such, we cache the information we compute about the candidate for the life of this - // pattern matcher so we don't have to compute it multiple times. - var stringToWordSpans = {}; - pattern = pattern.trim(); - var fullPatternSegment = createSegment(pattern); - var dotSeparatedSegments = pattern.split(".").map(function (p) { return createSegment(p.trim()); }); - var invalidPattern = dotSeparatedSegments.length === 0 || ts.forEach(dotSeparatedSegments, segmentIsInvalid); - return { - getMatches: getMatches, - getMatchesForLastSegmentOfPattern: getMatchesForLastSegmentOfPattern, - patternContainsDots: dotSeparatedSegments.length > 1 - }; - // Quick checks so we can bail out when asked to match a candidate. - function skipMatch(candidate) { - return invalidPattern || !candidate; - } - function getMatchesForLastSegmentOfPattern(candidate) { - if (skipMatch(candidate)) { - return undefined; - } - return matchSegment(candidate, ts.lastOrUndefined(dotSeparatedSegments)); - } - function getMatches(candidateContainers, candidate) { - if (skipMatch(candidate)) { - return undefined; - } - // First, check that the last part of the dot separated pattern matches the name of the - // candidate. If not, then there's no point in proceeding and doing the more - // expensive work. - var candidateMatch = matchSegment(candidate, ts.lastOrUndefined(dotSeparatedSegments)); - if (!candidateMatch) { - return undefined; - } - candidateContainers = candidateContainers || []; - // -1 because the last part was checked against the name, and only the rest - // of the parts are checked against the container. - if (dotSeparatedSegments.length - 1 > candidateContainers.length) { - // There weren't enough container parts to match against the pattern parts. - // So this definitely doesn't match. - return undefined; - } - // So far so good. Now break up the container for the candidate and check if all - // the dotted parts match up correctly. - var totalMatch = candidateMatch; - for (var i = dotSeparatedSegments.length - 2, j = candidateContainers.length - 1; i >= 0; i--, j--) { - var segment = dotSeparatedSegments[i]; - var containerName = candidateContainers[j]; - var containerMatch = matchSegment(containerName, segment); - if (!containerMatch) { - // This container didn't match the pattern piece. So there's no match at all. - return undefined; - } - ts.addRange(totalMatch, containerMatch); - } - // Success, this symbol's full name matched against the dotted name the user was asking - // about. - return totalMatch; - } - function getWordSpans(word) { - if (!ts.hasProperty(stringToWordSpans, word)) { - stringToWordSpans[word] = breakIntoWordSpans(word); - } - return stringToWordSpans[word]; - } - function matchTextChunk(candidate, chunk, punctuationStripped) { - var index = indexOfIgnoringCase(candidate, chunk.textLowerCase); - if (index === 0) { - if (chunk.text.length === candidate.length) { - // a) Check if the part matches the candidate entirely, in an case insensitive or - // sensitive manner. If it does, return that there was an exact match. - return createPatternMatch(PatternMatchKind.exact, punctuationStripped, candidate === chunk.text); - } - else { - // b) Check if the part is a prefix of the candidate, in a case insensitive or sensitive - // manner. If it does, return that there was a prefix match. - return createPatternMatch(PatternMatchKind.prefix, punctuationStripped, startsWith(candidate, chunk.text)); - } - } - var isLowercase = chunk.isLowerCase; - if (isLowercase) { - if (index > 0) { - // c) If the part is entirely lowercase, then check if it is contained anywhere in the - // candidate in a case insensitive manner. If so, return that there was a substring - // match. - // - // Note: We only have a substring match if the lowercase part is prefix match of some - // word part. That way we don't match something like 'Class' when the user types 'a'. - // But we would match 'FooAttribute' (since 'Attribute' starts with 'a'). - var wordSpans = getWordSpans(candidate); - for (var _i = 0; _i < wordSpans.length; _i++) { - var span = wordSpans[_i]; - if (partStartsWith(candidate, span, chunk.text, true)) { - return createPatternMatch(PatternMatchKind.substring, punctuationStripped, - /*isCaseSensitive:*/ partStartsWith(candidate, span, chunk.text, false)); - } - } - } - } - else { - // d) If the part was not entirely lowercase, then check if it is contained in the - // candidate in a case *sensitive* manner. If so, return that there was a substring - // match. - if (candidate.indexOf(chunk.text) > 0) { - return createPatternMatch(PatternMatchKind.substring, punctuationStripped, true); - } - } - if (!isLowercase) { - // e) If the part was not entirely lowercase, then attempt a camel cased match as well. - if (chunk.characterSpans.length > 0) { - var candidateParts = getWordSpans(candidate); - var camelCaseWeight = tryCamelCaseMatch(candidate, candidateParts, chunk, false); - if (camelCaseWeight !== undefined) { - return createPatternMatch(PatternMatchKind.camelCase, punctuationStripped, true, camelCaseWeight); - } - camelCaseWeight = tryCamelCaseMatch(candidate, candidateParts, chunk, true); - if (camelCaseWeight !== undefined) { - return createPatternMatch(PatternMatchKind.camelCase, punctuationStripped, false, camelCaseWeight); - } - } - } - if (isLowercase) { - // f) Is the pattern a substring of the candidate starting on one of the candidate's word boundaries? - // We could check every character boundary start of the candidate for the pattern. However, that's - // an m * n operation in the wost case. Instead, find the first instance of the pattern - // substring, and see if it starts on a capital letter. It seems unlikely that the user will try to - // filter the list based on a substring that starts on a capital letter and also with a lowercase one. - // (Pattern: fogbar, Candidate: quuxfogbarFogBar). - if (chunk.text.length < candidate.length) { - if (index > 0 && isUpperCaseLetter(candidate.charCodeAt(index))) { - return createPatternMatch(PatternMatchKind.substring, punctuationStripped, false); - } - } - } - return undefined; - } - function containsSpaceOrAsterisk(text) { - for (var i = 0; i < text.length; i++) { - var ch = text.charCodeAt(i); - if (ch === 32 /* space */ || ch === 42 /* asterisk */) { - return true; - } - } - return false; - } - function matchSegment(candidate, segment) { - // First check if the segment matches as is. This is also useful if the segment contains - // characters we would normally strip when splitting into parts that we also may want to - // match in the candidate. For example if the segment is "@int" and the candidate is - // "@int", then that will show up as an exact match here. - // - // Note: if the segment contains a space or an asterisk then we must assume that it's a - // multi-word segment. - if (!containsSpaceOrAsterisk(segment.totalTextChunk.text)) { - var match = matchTextChunk(candidate, segment.totalTextChunk, false); - if (match) { - return [match]; - } - } - // The logic for pattern matching is now as follows: - // - // 1) Break the segment passed in into words. Breaking is rather simple and a - // good way to think about it that if gives you all the individual alphanumeric words - // of the pattern. - // - // 2) For each word try to match the word against the candidate value. - // - // 3) Matching is as follows: - // - // a) Check if the word matches the candidate entirely, in an case insensitive or - // sensitive manner. If it does, return that there was an exact match. - // - // b) Check if the word is a prefix of the candidate, in a case insensitive or - // sensitive manner. If it does, return that there was a prefix match. - // - // c) If the word is entirely lowercase, then check if it is contained anywhere in the - // candidate in a case insensitive manner. If so, return that there was a substring - // match. - // - // Note: We only have a substring match if the lowercase part is prefix match of - // some word part. That way we don't match something like 'Class' when the user - // types 'a'. But we would match 'FooAttribute' (since 'Attribute' starts with - // 'a'). - // - // d) If the word was not entirely lowercase, then check if it is contained in the - // candidate in a case *sensitive* manner. If so, return that there was a substring - // match. - // - // e) If the word was not entirely lowercase, then attempt a camel cased match as - // well. - // - // f) The word is all lower case. Is it a case insensitive substring of the candidate starting - // on a part boundary of the candidate? - // - // Only if all words have some sort of match is the pattern considered matched. - var subWordTextChunks = segment.subWordTextChunks; - var matches = undefined; - for (var _i = 0; _i < subWordTextChunks.length; _i++) { - var subWordTextChunk = subWordTextChunks[_i]; - // Try to match the candidate with this word - var result = matchTextChunk(candidate, subWordTextChunk, true); - if (!result) { - return undefined; - } - matches = matches || []; - matches.push(result); - } - return matches; - } - function partStartsWith(candidate, candidateSpan, pattern, ignoreCase, patternSpan) { - var patternPartStart = patternSpan ? patternSpan.start : 0; - var patternPartLength = patternSpan ? patternSpan.length : pattern.length; - if (patternPartLength > candidateSpan.length) { - // Pattern part is longer than the candidate part. There can never be a match. - return false; - } - if (ignoreCase) { - for (var i = 0; i < patternPartLength; i++) { - var ch1 = pattern.charCodeAt(patternPartStart + i); - var ch2 = candidate.charCodeAt(candidateSpan.start + i); - if (toLowerCase(ch1) !== toLowerCase(ch2)) { - return false; - } - } - } - else { - for (var i = 0; i < patternPartLength; i++) { - var ch1 = pattern.charCodeAt(patternPartStart + i); - var ch2 = candidate.charCodeAt(candidateSpan.start + i); - if (ch1 !== ch2) { - return false; - } - } - } - return true; - } - function tryCamelCaseMatch(candidate, candidateParts, chunk, ignoreCase) { - var chunkCharacterSpans = chunk.characterSpans; - // Note: we may have more pattern parts than candidate parts. This is because multiple - // pattern parts may match a candidate part. For example "SiUI" against "SimpleUI". - // We'll have 3 pattern parts Si/U/I against two candidate parts Simple/UI. However, U - // and I will both match in UI. - var currentCandidate = 0; - var currentChunkSpan = 0; - var firstMatch = undefined; - var contiguous = undefined; - while (true) { - // Let's consider our termination cases - if (currentChunkSpan === chunkCharacterSpans.length) { - // We did match! We shall assign a weight to this - var weight = 0; - // Was this contiguous? - if (contiguous) { - weight += 1; - } - // Did we start at the beginning of the candidate? - if (firstMatch === 0) { - weight += 2; - } - return weight; - } - else if (currentCandidate === candidateParts.length) { - // No match, since we still have more of the pattern to hit - return undefined; - } - var candidatePart = candidateParts[currentCandidate]; - var gotOneMatchThisCandidate = false; - // Consider the case of matching SiUI against SimpleUIElement. The candidate parts - // will be Simple/UI/Element, and the pattern parts will be Si/U/I. We'll match 'Si' - // against 'Simple' first. Then we'll match 'U' against 'UI'. However, we want to - // still keep matching pattern parts against that candidate part. - for (; currentChunkSpan < chunkCharacterSpans.length; currentChunkSpan++) { - var chunkCharacterSpan = chunkCharacterSpans[currentChunkSpan]; - if (gotOneMatchThisCandidate) { - // We've already gotten one pattern part match in this candidate. We will - // only continue trying to consumer pattern parts if the last part and this - // part are both upper case. - if (!isUpperCaseLetter(chunk.text.charCodeAt(chunkCharacterSpans[currentChunkSpan - 1].start)) || - !isUpperCaseLetter(chunk.text.charCodeAt(chunkCharacterSpans[currentChunkSpan].start))) { - break; - } - } - if (!partStartsWith(candidate, candidatePart, chunk.text, ignoreCase, chunkCharacterSpan)) { - break; - } - gotOneMatchThisCandidate = true; - firstMatch = firstMatch === undefined ? currentCandidate : firstMatch; - // If we were contiguous, then keep that value. If we weren't, then keep that - // value. If we don't know, then set the value to 'true' as an initial match is - // obviously contiguous. - contiguous = contiguous === undefined ? true : contiguous; - candidatePart = ts.createTextSpan(candidatePart.start + chunkCharacterSpan.length, candidatePart.length - chunkCharacterSpan.length); - } - // Check if we matched anything at all. If we didn't, then we need to unset the - // contiguous bit if we currently had it set. - // If we haven't set the bit yet, then that means we haven't matched anything so - // far, and we don't want to change that. - if (!gotOneMatchThisCandidate && contiguous !== undefined) { - contiguous = false; - } - // Move onto the next candidate. - currentCandidate++; - } - } - } - ts.createPatternMatcher = createPatternMatcher; - // Helper function to compare two matches to determine which is better. Matches are first - // ordered by kind (so all prefix matches always beat all substring matches). Then, if the - // match is a camel case match, the relative weights of the match are used to determine - // which is better (with a greater weight being better). Then if the match is of the same - // type, then a case sensitive match is considered better than an insensitive one. - function patternMatchCompareTo(match1, match2) { - return compareType(match1, match2) || - compareCamelCase(match1, match2) || - compareCase(match1, match2) || - comparePunctuation(match1, match2); - } - function comparePunctuation(result1, result2) { - // Consider a match to be better if it was successful without stripping punctuation - // versus a match that had to strip punctuation to succeed. - if (result1.punctuationStripped !== result2.punctuationStripped) { - return result1.punctuationStripped ? 1 : -1; - } - return 0; - } - function compareCase(result1, result2) { - if (result1.isCaseSensitive !== result2.isCaseSensitive) { - return result1.isCaseSensitive ? -1 : 1; - } - return 0; - } - function compareType(result1, result2) { - return result1.kind - result2.kind; - } - function compareCamelCase(result1, result2) { - if (result1.kind === PatternMatchKind.camelCase && result2.kind === PatternMatchKind.camelCase) { - // Swap the values here. If result1 has a higher weight, then we want it to come - // first. - return result2.camelCaseWeight - result1.camelCaseWeight; - } - return 0; - } - function createSegment(text) { - return { - totalTextChunk: createTextChunk(text), - subWordTextChunks: breakPatternIntoTextChunks(text) - }; - } - // A segment is considered invalid if we couldn't find any words in it. - function segmentIsInvalid(segment) { - return segment.subWordTextChunks.length === 0; - } - function isUpperCaseLetter(ch) { - // Fast check for the ascii range. - if (ch >= 65 /* A */ && ch <= 90 /* Z */) { - return true; - } - if (ch < 127 /* maxAsciiCharacter */ || !ts.isUnicodeIdentifierStart(ch, 2 /* Latest */)) { - return false; - } - // TODO: find a way to determine this for any unicode characters in a - // non-allocating manner. - var str = String.fromCharCode(ch); - return str === str.toUpperCase(); - } - function isLowerCaseLetter(ch) { - // Fast check for the ascii range. - if (ch >= 97 /* a */ && ch <= 122 /* z */) { - return true; - } - if (ch < 127 /* maxAsciiCharacter */ || !ts.isUnicodeIdentifierStart(ch, 2 /* Latest */)) { - return false; - } - // TODO: find a way to determine this for any unicode characters in a - // non-allocating manner. - var str = String.fromCharCode(ch); - return str === str.toLowerCase(); - } - function containsUpperCaseLetter(string) { - for (var i = 0, n = string.length; i < n; i++) { - if (isUpperCaseLetter(string.charCodeAt(i))) { - return true; - } - } - return false; - } - function startsWith(string, search) { - for (var i = 0, n = search.length; i < n; i++) { - if (string.charCodeAt(i) !== search.charCodeAt(i)) { - return false; - } - } - return true; - } - // Assumes 'value' is already lowercase. - function indexOfIgnoringCase(string, value) { - for (var i = 0, n = string.length - value.length; i <= n; i++) { - if (startsWithIgnoringCase(string, value, i)) { - return i; - } - } - return -1; - } - // Assumes 'value' is already lowercase. - function startsWithIgnoringCase(string, value, start) { - for (var i = 0, n = value.length; i < n; i++) { - var ch1 = toLowerCase(string.charCodeAt(i + start)); - var ch2 = value.charCodeAt(i); - if (ch1 !== ch2) { - return false; - } - } - return true; - } - function toLowerCase(ch) { - // Fast convert for the ascii range. - if (ch >= 65 /* A */ && ch <= 90 /* Z */) { - return 97 /* a */ + (ch - 65 /* A */); - } - if (ch < 127 /* maxAsciiCharacter */) { - return ch; - } - // TODO: find a way to compute this for any unicode characters in a - // non-allocating manner. - return String.fromCharCode(ch).toLowerCase().charCodeAt(0); - } - function isDigit(ch) { - // TODO(cyrusn): Find a way to support this for unicode digits. - return ch >= 48 /* _0 */ && ch <= 57 /* _9 */; - } - function isWordChar(ch) { - return isUpperCaseLetter(ch) || isLowerCaseLetter(ch) || isDigit(ch) || ch === 95 /* _ */ || ch === 36 /* $ */; - } - function breakPatternIntoTextChunks(pattern) { - var result = []; - var wordStart = 0; - var wordLength = 0; - for (var i = 0; i < pattern.length; i++) { - var ch = pattern.charCodeAt(i); - if (isWordChar(ch)) { - if (wordLength++ === 0) { - wordStart = i; - } - } - else { - if (wordLength > 0) { - result.push(createTextChunk(pattern.substr(wordStart, wordLength))); - wordLength = 0; - } - } - } - if (wordLength > 0) { - result.push(createTextChunk(pattern.substr(wordStart, wordLength))); - } - return result; - } - function createTextChunk(text) { - var textLowerCase = text.toLowerCase(); - return { - text: text, - textLowerCase: textLowerCase, - isLowerCase: text === textLowerCase, - characterSpans: breakIntoCharacterSpans(text) - }; - } - /* @internal */ function breakIntoCharacterSpans(identifier) { - return breakIntoSpans(identifier, false); - } - ts.breakIntoCharacterSpans = breakIntoCharacterSpans; - /* @internal */ function breakIntoWordSpans(identifier) { - return breakIntoSpans(identifier, true); - } - ts.breakIntoWordSpans = breakIntoWordSpans; - function breakIntoSpans(identifier, word) { - var result = []; - var wordStart = 0; - for (var i = 1, n = identifier.length; i < n; i++) { - var lastIsDigit = isDigit(identifier.charCodeAt(i - 1)); - var currentIsDigit = isDigit(identifier.charCodeAt(i)); - var hasTransitionFromLowerToUpper = transitionFromLowerToUpper(identifier, word, i); - var hasTransitionFromUpperToLower = transitionFromUpperToLower(identifier, word, i, wordStart); - if (charIsPunctuation(identifier.charCodeAt(i - 1)) || - charIsPunctuation(identifier.charCodeAt(i)) || - lastIsDigit != currentIsDigit || - hasTransitionFromLowerToUpper || - hasTransitionFromUpperToLower) { - if (!isAllPunctuation(identifier, wordStart, i)) { - result.push(ts.createTextSpan(wordStart, i - wordStart)); - } - wordStart = i; - } - } - if (!isAllPunctuation(identifier, wordStart, identifier.length)) { - result.push(ts.createTextSpan(wordStart, identifier.length - wordStart)); - } - return result; - } - function charIsPunctuation(ch) { - switch (ch) { - case 33 /* exclamation */: - case 34 /* doubleQuote */: - case 35 /* hash */: - case 37 /* percent */: - case 38 /* ampersand */: - case 39 /* singleQuote */: - case 40 /* openParen */: - case 41 /* closeParen */: - case 42 /* asterisk */: - case 44 /* comma */: - case 45 /* minus */: - case 46 /* dot */: - case 47 /* slash */: - case 58 /* colon */: - case 59 /* semicolon */: - case 63 /* question */: - case 64 /* at */: - case 91 /* openBracket */: - case 92 /* backslash */: - case 93 /* closeBracket */: - case 95 /* _ */: - case 123 /* openBrace */: - case 125 /* closeBrace */: - return true; - } - return false; - } - function isAllPunctuation(identifier, start, end) { - for (var i = start; i < end; i++) { - var ch = identifier.charCodeAt(i); - // We don't consider _ or $ as punctuation as there may be things with that name. - if (!charIsPunctuation(ch) || ch === 95 /* _ */ || ch === 36 /* $ */) { - return false; - } - } - return true; - } - function transitionFromUpperToLower(identifier, word, index, wordStart) { - if (word) { - // Cases this supports: - // 1) IDisposable -> I, Disposable - // 2) UIElement -> UI, Element - // 3) HTMLDocument -> HTML, Document - // - // etc. - if (index != wordStart && - index + 1 < identifier.length) { - var currentIsUpper = isUpperCaseLetter(identifier.charCodeAt(index)); - var nextIsLower = isLowerCaseLetter(identifier.charCodeAt(index + 1)); - if (currentIsUpper && nextIsLower) { - // We have a transition from an upper to a lower letter here. But we only - // want to break if all the letters that preceded are uppercase. i.e. if we - // have "Foo" we don't want to break that into "F, oo". But if we have - // "IFoo" or "UIFoo", then we want to break that into "I, Foo" and "UI, - // Foo". i.e. the last uppercase letter belongs to the lowercase letters - // that follows. Note: this will make the following not split properly: - // "HELLOthere". However, these sorts of names do not show up in .Net - // programs. - for (var i = wordStart; i < index; i++) { - if (!isUpperCaseLetter(identifier.charCodeAt(i))) { - return false; - } - } - return true; - } - } - } - return false; - } - function transitionFromLowerToUpper(identifier, word, index) { - var lastIsUpper = isUpperCaseLetter(identifier.charCodeAt(index - 1)); - var currentIsUpper = isUpperCaseLetter(identifier.charCodeAt(index)); - // See if the casing indicates we're starting a new word. Note: if we're breaking on - // words, then just seeing an upper case character isn't enough. Instead, it has to - // be uppercase and the previous character can't be uppercase. - // - // For example, breaking "AddMetadata" on words would make: Add Metadata - // - // on characters would be: A dd M etadata - // - // Break "AM" on words would be: AM - // - // on characters would be: A M - // - // We break the search string on characters. But we break the symbol name on words. - var transition = word - ? (currentIsUpper && !lastIsUpper) - : currentIsUpper; - return transition; - } -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var SignatureHelp; - (function (SignatureHelp) { - // A partially written generic type expression is not guaranteed to have the correct syntax tree. the expression could be parsed as less than/greater than expression or a comma expression - // or some other combination depending on what the user has typed so far. For the purposes of signature help we need to consider any location after "<" as a possible generic type reference. - // To do this, the method will back parse the expression starting at the position required. it will try to parse the current expression as a generic type expression, if it did succeed it - // will return the generic identifier that started the expression (e.g. "foo" in "foo(#a, b) -> The token introduces a list, and should begin a sig help session - // Case 2: - // fo#o#(a, b)# -> The token is either not associated with a list, or ends a list, so the session should end - // Case 3: - // foo(a#, #b#) -> The token is buried inside a list, and should give sig help - // Find out if 'node' is an argument, a type argument, or neither - if (node.kind === 24 /* LessThanToken */ || - node.kind === 16 /* OpenParenToken */) { - // Find the list that starts right *after* the < or ( token. - // If the user has just opened a list, consider this item 0. - var list = getChildListThatStartsWithOpenerToken(callExpression, node, sourceFile); - var isTypeArgList = callExpression.typeArguments && callExpression.typeArguments.pos === list.pos; - ts.Debug.assert(list !== undefined); - return { - kind: isTypeArgList ? 0 /* TypeArguments */ : 1 /* CallArguments */, - invocation: callExpression, - argumentsSpan: getApplicableSpanForArguments(list), - argumentIndex: 0, - argumentCount: getArgumentCount(list) - }; - } - // findListItemInfo can return undefined if we are not in parent's argument list - // or type argument list. This includes cases where the cursor is: - // - To the right of the closing paren, non-substitution template, or template tail. - // - Between the type arguments and the arguments (greater than token) - // - On the target of the call (parent.func) - // - On the 'new' keyword in a 'new' expression - var listItemInfo = ts.findListItemInfo(node); - if (listItemInfo) { - var list = listItemInfo.list; - var isTypeArgList = callExpression.typeArguments && callExpression.typeArguments.pos === list.pos; - var argumentIndex = getArgumentIndex(list, node); - var argumentCount = getArgumentCount(list); - ts.Debug.assert(argumentIndex === 0 || argumentIndex < argumentCount, "argumentCount < argumentIndex, " + argumentCount + " < " + argumentIndex); - return { - kind: isTypeArgList ? 0 /* TypeArguments */ : 1 /* CallArguments */, - invocation: callExpression, - argumentsSpan: getApplicableSpanForArguments(list), - argumentIndex: argumentIndex, - argumentCount: argumentCount - }; - } - } - else if (node.kind === 10 /* NoSubstitutionTemplateLiteral */ && node.parent.kind === 162 /* TaggedTemplateExpression */) { - // Check if we're actually inside the template; - // otherwise we'll fall out and return undefined. - if (ts.isInsideTemplateLiteral(node, position)) { - return getArgumentListInfoForTemplate(node.parent, 0); - } - } - else if (node.kind === 11 /* TemplateHead */ && node.parent.parent.kind === 162 /* TaggedTemplateExpression */) { - var templateExpression = node.parent; - var tagExpression = templateExpression.parent; - ts.Debug.assert(templateExpression.kind === 174 /* TemplateExpression */); - var argumentIndex = ts.isInsideTemplateLiteral(node, position) ? 0 : 1; - return getArgumentListInfoForTemplate(tagExpression, argumentIndex); - } - else if (node.parent.kind === 180 /* TemplateSpan */ && node.parent.parent.parent.kind === 162 /* TaggedTemplateExpression */) { - var templateSpan = node.parent; - var templateExpression = templateSpan.parent; - var tagExpression = templateExpression.parent; - ts.Debug.assert(templateExpression.kind === 174 /* TemplateExpression */); - // If we're just after a template tail, don't show signature help. - if (node.kind === 13 /* TemplateTail */ && !ts.isInsideTemplateLiteral(node, position)) { - return undefined; - } - var spanIndex = templateExpression.templateSpans.indexOf(templateSpan); - var argumentIndex = getArgumentIndexForTemplatePiece(spanIndex, node); - return getArgumentListInfoForTemplate(tagExpression, argumentIndex); - } - return undefined; - } - function getArgumentIndex(argumentsList, node) { - // The list we got back can include commas. In the presence of errors it may - // also just have nodes without commas. For example "Foo(a b c)" will have 3 - // args without commas. We want to find what index we're at. So we count - // forward until we hit ourselves, only incrementing the index if it isn't a - // comma. - // - // Note: the subtlety around trailing commas (in getArgumentCount) does not apply - // here. That's because we're only walking forward until we hit the node we're - // on. In that case, even if we're after the trailing comma, we'll still see - // that trailing comma in the list, and we'll have generated the appropriate - // arg index. - var argumentIndex = 0; - var listChildren = argumentsList.getChildren(); - for (var _i = 0; _i < listChildren.length; _i++) { - var child = listChildren[_i]; - if (child === node) { - break; - } - if (child.kind !== 23 /* CommaToken */) { - argumentIndex++; - } - } - return argumentIndex; - } - function getArgumentCount(argumentsList) { - // The argument count for a list is normally the number of non-comma children it has. - // For example, if you have "Foo(a,b)" then there will be three children of the arg - // list 'a' '' 'b'. So, in this case the arg count will be 2. However, there - // is a small subtlety. If you have "Foo(a,)", then the child list will just have - // 'a' ''. So, in the case where the last child is a comma, we increase the - // arg count by one to compensate. - // - // Note: this subtlety only applies to the last comma. If you had "Foo(a,," then - // we'll have: 'a' '' '' - // That will give us 2 non-commas. We then add one for the last comma, givin us an - // arg count of 3. - var listChildren = argumentsList.getChildren(); - var argumentCount = ts.countWhere(listChildren, function (arg) { return arg.kind !== 23 /* CommaToken */; }); - if (listChildren.length > 0 && ts.lastOrUndefined(listChildren).kind === 23 /* CommaToken */) { - argumentCount++; - } - return argumentCount; - } - // spanIndex is either the index for a given template span. - // This does not give appropriate results for a NoSubstitutionTemplateLiteral - function getArgumentIndexForTemplatePiece(spanIndex, node) { - // Because the TemplateStringsArray is the first argument, we have to offset each substitution expression by 1. - // There are three cases we can encounter: - // 1. We are precisely in the template literal (argIndex = 0). - // 2. We are in or to the right of the substitution expression (argIndex = spanIndex + 1). - // 3. We are directly to the right of the template literal, but because we look for the token on the left, - // not enough to put us in the substitution expression; we should consider ourselves part of - // the *next* span's expression by offsetting the index (argIndex = (spanIndex + 1) + 1). - // - // Example: f `# abcd $#{# 1 + 1# }# efghi ${ #"#hello"# } # ` - // ^ ^ ^ ^ ^ ^ ^ ^ ^ - // Case: 1 1 3 2 1 3 2 2 1 - ts.Debug.assert(position >= node.getStart(), "Assumed 'position' could not occur before node."); - if (ts.isTemplateLiteralKind(node.kind)) { - if (ts.isInsideTemplateLiteral(node, position)) { - return 0; - } - return spanIndex + 2; - } - return spanIndex + 1; - } - function getArgumentListInfoForTemplate(tagExpression, argumentIndex) { - // argumentCount is either 1 or (numSpans + 1) to account for the template strings array argument. - var argumentCount = tagExpression.template.kind === 10 /* NoSubstitutionTemplateLiteral */ - ? 1 - : tagExpression.template.templateSpans.length + 1; - ts.Debug.assert(argumentIndex === 0 || argumentIndex < argumentCount, "argumentCount < argumentIndex, " + argumentCount + " < " + argumentIndex); - return { - kind: 2 /* TaggedTemplateArguments */, - invocation: tagExpression, - argumentsSpan: getApplicableSpanForTaggedTemplate(tagExpression), - argumentIndex: argumentIndex, - argumentCount: argumentCount - }; - } - function getApplicableSpanForArguments(argumentsList) { - // We use full start and skip trivia on the end because we want to include trivia on - // both sides. For example, - // - // foo( /*comment */ a, b, c /*comment*/ ) - // | | - // - // The applicable span is from the first bar to the second bar (inclusive, - // but not including parentheses) - var applicableSpanStart = argumentsList.getFullStart(); - var applicableSpanEnd = ts.skipTrivia(sourceFile.text, argumentsList.getEnd(), false); - return ts.createTextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart); - } - function getApplicableSpanForTaggedTemplate(taggedTemplate) { - var template = taggedTemplate.template; - var applicableSpanStart = template.getStart(); - var applicableSpanEnd = template.getEnd(); - // We need to adjust the end position for the case where the template does not have a tail. - // Otherwise, we will not show signature help past the expression. - // For example, - // - // ` ${ 1 + 1 foo(10) - // | | - // - // This is because a Missing node has no width. However, what we actually want is to include trivia - // leading up to the next token in case the user is about to type in a TemplateMiddle or TemplateTail. - if (template.kind === 174 /* TemplateExpression */) { - var lastSpan = ts.lastOrUndefined(template.templateSpans); - if (lastSpan.literal.getFullWidth() === 0) { - applicableSpanEnd = ts.skipTrivia(sourceFile.text, applicableSpanEnd, false); - } - } - return ts.createTextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart); - } - function getContainingArgumentInfo(node) { - for (var n = node; n.kind !== 230 /* SourceFile */; n = n.parent) { - if (ts.isFunctionBlock(n)) { - return undefined; - } - // If the node is not a subspan of its parent, this is a big problem. - // There have been crashes that might be caused by this violation. - if (n.pos < n.parent.pos || n.end > n.parent.end) { - ts.Debug.fail("Node of kind " + n.kind + " is not a subspan of its parent of kind " + n.parent.kind); - } - var argumentInfo_1 = getImmediatelyContainingArgumentInfo(n); - if (argumentInfo_1) { - return argumentInfo_1; - } - } - return undefined; - } - function getChildListThatStartsWithOpenerToken(parent, openerToken, sourceFile) { - var children = parent.getChildren(sourceFile); - var indexOfOpenerToken = children.indexOf(openerToken); - ts.Debug.assert(indexOfOpenerToken >= 0 && children.length > indexOfOpenerToken + 1); - return children[indexOfOpenerToken + 1]; - } - /** - * The selectedItemIndex could be negative for several reasons. - * 1. There are too many arguments for all of the overloads - * 2. None of the overloads were type compatible - * The solution here is to try to pick the best overload by picking - * either the first one that has an appropriate number of parameters, - * or the one with the most parameters. - */ - function selectBestInvalidOverloadIndex(candidates, argumentCount) { - var maxParamsSignatureIndex = -1; - var maxParams = -1; - for (var i = 0; i < candidates.length; i++) { - var candidate = candidates[i]; - if (candidate.hasRestParameter || candidate.parameters.length >= argumentCount) { - return i; - } - if (candidate.parameters.length > maxParams) { - maxParams = candidate.parameters.length; - maxParamsSignatureIndex = i; - } - } - return maxParamsSignatureIndex; - } - function createSignatureHelpItems(candidates, bestSignature, argumentListInfo) { - var applicableSpan = argumentListInfo.argumentsSpan; - var isTypeParameterList = argumentListInfo.kind === 0 /* TypeArguments */; - var invocation = argumentListInfo.invocation; - var callTarget = ts.getInvokedExpression(invocation); - var callTargetSymbol = typeChecker.getSymbolAtLocation(callTarget); - var callTargetDisplayParts = callTargetSymbol && ts.symbolToDisplayParts(typeChecker, callTargetSymbol, undefined, undefined); - var items = ts.map(candidates, function (candidateSignature) { - var signatureHelpParameters; - var prefixDisplayParts = []; - var suffixDisplayParts = []; - if (callTargetDisplayParts) { - prefixDisplayParts.push.apply(prefixDisplayParts, callTargetDisplayParts); - } - if (isTypeParameterList) { - prefixDisplayParts.push(ts.punctuationPart(24 /* LessThanToken */)); - var typeParameters = candidateSignature.typeParameters; - signatureHelpParameters = typeParameters && typeParameters.length > 0 ? ts.map(typeParameters, createSignatureHelpParameterForTypeParameter) : emptyArray; - suffixDisplayParts.push(ts.punctuationPart(25 /* GreaterThanToken */)); - var parameterParts = ts.mapToDisplayParts(function (writer) { - return typeChecker.getSymbolDisplayBuilder().buildDisplayForParametersAndDelimiters(candidateSignature.parameters, writer, invocation); - }); - suffixDisplayParts.push.apply(suffixDisplayParts, parameterParts); - } - else { - var typeParameterParts = ts.mapToDisplayParts(function (writer) { - return typeChecker.getSymbolDisplayBuilder().buildDisplayForTypeParametersAndDelimiters(candidateSignature.typeParameters, writer, invocation); - }); - prefixDisplayParts.push.apply(prefixDisplayParts, typeParameterParts); - prefixDisplayParts.push(ts.punctuationPart(16 /* OpenParenToken */)); - var parameters = candidateSignature.parameters; - signatureHelpParameters = parameters.length > 0 ? ts.map(parameters, createSignatureHelpParameterForParameter) : emptyArray; - suffixDisplayParts.push(ts.punctuationPart(17 /* CloseParenToken */)); - } - var returnTypeParts = ts.mapToDisplayParts(function (writer) { - return typeChecker.getSymbolDisplayBuilder().buildReturnTypeDisplay(candidateSignature, writer, invocation); - }); - suffixDisplayParts.push.apply(suffixDisplayParts, returnTypeParts); - return { - isVariadic: candidateSignature.hasRestParameter, - prefixDisplayParts: prefixDisplayParts, - suffixDisplayParts: suffixDisplayParts, - separatorDisplayParts: [ts.punctuationPart(23 /* CommaToken */), ts.spacePart()], - parameters: signatureHelpParameters, - documentation: candidateSignature.getDocumentationComment() - }; - }); - var argumentIndex = argumentListInfo.argumentIndex; - // argumentCount is the *apparent* number of arguments. - var argumentCount = argumentListInfo.argumentCount; - var selectedItemIndex = candidates.indexOf(bestSignature); - if (selectedItemIndex < 0) { - selectedItemIndex = selectBestInvalidOverloadIndex(candidates, argumentCount); - } - ts.Debug.assert(argumentIndex === 0 || argumentIndex < argumentCount, "argumentCount < argumentIndex, " + argumentCount + " < " + argumentIndex); - return { - items: items, - applicableSpan: applicableSpan, - selectedItemIndex: selectedItemIndex, - argumentIndex: argumentIndex, - argumentCount: argumentCount - }; - function createSignatureHelpParameterForParameter(parameter) { - var displayParts = ts.mapToDisplayParts(function (writer) { - return typeChecker.getSymbolDisplayBuilder().buildParameterDisplay(parameter, writer, invocation); - }); - var isOptional = ts.hasQuestionToken(parameter.valueDeclaration); - return { - name: parameter.name, - documentation: parameter.getDocumentationComment(), - displayParts: displayParts, - isOptional: isOptional - }; - } - function createSignatureHelpParameterForTypeParameter(typeParameter) { - var displayParts = ts.mapToDisplayParts(function (writer) { - return typeChecker.getSymbolDisplayBuilder().buildTypeParameterDisplay(typeParameter, writer, invocation); - }); - return { - name: typeParameter.symbol.name, - documentation: emptyArray, - displayParts: displayParts, - isOptional: false - }; - } - } - } - SignatureHelp.getSignatureHelpItems = getSignatureHelpItems; - })(SignatureHelp = ts.SignatureHelp || (ts.SignatureHelp = {})); -})(ts || (ts = {})); -// These utilities are common to multiple language service features. -/* @internal */ -var ts; -(function (ts) { - function getEndLinePosition(line, sourceFile) { - ts.Debug.assert(line >= 0); - var lineStarts = sourceFile.getLineStarts(); - var lineIndex = line; - if (lineIndex + 1 === lineStarts.length) { - // last line - return EOF - return sourceFile.text.length - 1; - } - else { - // current line start - var start = lineStarts[lineIndex]; - // take the start position of the next line -1 = it should be some line break - var pos = lineStarts[lineIndex + 1] - 1; - ts.Debug.assert(ts.isLineBreak(sourceFile.text.charCodeAt(pos))); - // walk backwards skipping line breaks, stop the the beginning of current line. - // i.e: - // - // $ <- end of line for this position should match the start position - while (start <= pos && ts.isLineBreak(sourceFile.text.charCodeAt(pos))) { - pos--; - } - return pos; - } - } - ts.getEndLinePosition = getEndLinePosition; - function getLineStartPositionForPosition(position, sourceFile) { - var lineStarts = sourceFile.getLineStarts(); - var line = sourceFile.getLineAndCharacterOfPosition(position).line; - return lineStarts[line]; - } - ts.getLineStartPositionForPosition = getLineStartPositionForPosition; - function rangeContainsRange(r1, r2) { - return startEndContainsRange(r1.pos, r1.end, r2); - } - ts.rangeContainsRange = rangeContainsRange; - function startEndContainsRange(start, end, range) { - return start <= range.pos && end >= range.end; - } - ts.startEndContainsRange = startEndContainsRange; - function rangeContainsStartEnd(range, start, end) { - return range.pos <= start && range.end >= end; - } - ts.rangeContainsStartEnd = rangeContainsStartEnd; - function rangeOverlapsWithStartEnd(r1, start, end) { - return startEndOverlapsWithStartEnd(r1.pos, r1.end, start, end); - } - ts.rangeOverlapsWithStartEnd = rangeOverlapsWithStartEnd; - function startEndOverlapsWithStartEnd(start1, end1, start2, end2) { - var start = Math.max(start1, start2); - var end = Math.min(end1, end2); - return start < end; - } - ts.startEndOverlapsWithStartEnd = startEndOverlapsWithStartEnd; - function positionBelongsToNode(candidate, position, sourceFile) { - return candidate.end > position || !isCompletedNode(candidate, sourceFile); - } - ts.positionBelongsToNode = positionBelongsToNode; - function isCompletedNode(n, sourceFile) { - if (ts.nodeIsMissing(n)) { - return false; - } - switch (n.kind) { - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - case 207 /* EnumDeclaration */: - case 157 /* ObjectLiteralExpression */: - case 153 /* ObjectBindingPattern */: - case 148 /* TypeLiteral */: - case 182 /* Block */: - case 209 /* ModuleBlock */: - case 210 /* CaseBlock */: - return nodeEndsWith(n, 15 /* CloseBraceToken */, sourceFile); - case 226 /* CatchClause */: - return isCompletedNode(n.block, sourceFile); - case 161 /* NewExpression */: - if (!n.arguments) { - return true; - } - // fall through - case 160 /* CallExpression */: - case 164 /* ParenthesizedExpression */: - case 152 /* ParenthesizedType */: - return nodeEndsWith(n, 17 /* CloseParenToken */, sourceFile); - case 145 /* FunctionType */: - case 146 /* ConstructorType */: - return isCompletedNode(n.type, sourceFile); - case 137 /* Constructor */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 141 /* ConstructSignature */: - case 140 /* CallSignature */: - case 166 /* ArrowFunction */: - if (n.body) { - return isCompletedNode(n.body, sourceFile); - } - if (n.type) { - return isCompletedNode(n.type, sourceFile); - } - // Even though type parameters can be unclosed, we can get away with - // having at least a closing paren. - return hasChildOfKind(n, 17 /* CloseParenToken */, sourceFile); - case 208 /* ModuleDeclaration */: - return n.body && isCompletedNode(n.body, sourceFile); - case 186 /* IfStatement */: - if (n.elseStatement) { - return isCompletedNode(n.elseStatement, sourceFile); - } - return isCompletedNode(n.thenStatement, sourceFile); - case 185 /* ExpressionStatement */: - return isCompletedNode(n.expression, sourceFile); - case 156 /* ArrayLiteralExpression */: - case 154 /* ArrayBindingPattern */: - case 159 /* ElementAccessExpression */: - case 129 /* ComputedPropertyName */: - case 150 /* TupleType */: - return nodeEndsWith(n, 19 /* CloseBracketToken */, sourceFile); - case 142 /* IndexSignature */: - if (n.type) { - return isCompletedNode(n.type, sourceFile); - } - return hasChildOfKind(n, 19 /* CloseBracketToken */, sourceFile); - case 223 /* CaseClause */: - case 224 /* DefaultClause */: - // there is no such thing as terminator token for CaseClause/DefaultClause so for simplicitly always consider them non-completed - return false; - case 189 /* ForStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - case 188 /* WhileStatement */: - return isCompletedNode(n.statement, sourceFile); - case 187 /* DoStatement */: - // rough approximation: if DoStatement has While keyword - then if node is completed is checking the presence of ')'; - var hasWhileKeyword = findChildOfKind(n, 100 /* WhileKeyword */, sourceFile); - if (hasWhileKeyword) { - return nodeEndsWith(n, 17 /* CloseParenToken */, sourceFile); - } - return isCompletedNode(n.statement, sourceFile); - case 147 /* TypeQuery */: - return isCompletedNode(n.exprName, sourceFile); - case 168 /* TypeOfExpression */: - case 167 /* DeleteExpression */: - case 169 /* VoidExpression */: - case 175 /* YieldExpression */: - case 176 /* SpreadElementExpression */: - var unaryWordExpression = n; - return isCompletedNode(unaryWordExpression.expression, sourceFile); - case 162 /* TaggedTemplateExpression */: - return isCompletedNode(n.template, sourceFile); - case 174 /* TemplateExpression */: - var lastSpan = ts.lastOrUndefined(n.templateSpans); - return isCompletedNode(lastSpan, sourceFile); - case 180 /* TemplateSpan */: - return ts.nodeIsPresent(n.literal); - case 170 /* PrefixUnaryExpression */: - return isCompletedNode(n.operand, sourceFile); - case 172 /* BinaryExpression */: - return isCompletedNode(n.right, sourceFile); - case 173 /* ConditionalExpression */: - return isCompletedNode(n.whenFalse, sourceFile); - default: - return true; - } - } - ts.isCompletedNode = isCompletedNode; - /* - * Checks if node ends with 'expectedLastToken'. - * If child at position 'length - 1' is 'SemicolonToken' it is skipped and 'expectedLastToken' is compared with child at position 'length - 2'. - */ - function nodeEndsWith(n, expectedLastToken, sourceFile) { - var children = n.getChildren(sourceFile); - if (children.length) { - var last = ts.lastOrUndefined(children); - if (last.kind === expectedLastToken) { - return true; - } - else if (last.kind === 22 /* SemicolonToken */ && children.length !== 1) { - return children[children.length - 2].kind === expectedLastToken; - } - } - return false; - } - function findListItemInfo(node) { - var list = findContainingList(node); - // It is possible at this point for syntaxList to be undefined, either if - // node.parent had no list child, or if none of its list children contained - // the span of node. If this happens, return undefined. The caller should - // handle this case. - if (!list) { - return undefined; - } - var children = list.getChildren(); - var listItemIndex = ts.indexOf(children, node); - return { - listItemIndex: listItemIndex, - list: list - }; - } - ts.findListItemInfo = findListItemInfo; - function hasChildOfKind(n, kind, sourceFile) { - return !!findChildOfKind(n, kind, sourceFile); - } - ts.hasChildOfKind = hasChildOfKind; - function findChildOfKind(n, kind, sourceFile) { - return ts.forEach(n.getChildren(sourceFile), function (c) { return c.kind === kind && c; }); - } - ts.findChildOfKind = findChildOfKind; - function findContainingList(node) { - // The node might be a list element (nonsynthetic) or a comma (synthetic). Either way, it will - // be parented by the container of the SyntaxList, not the SyntaxList itself. - // In order to find the list item index, we first need to locate SyntaxList itself and then search - // for the position of the relevant node (or comma). - var syntaxList = ts.forEach(node.parent.getChildren(), function (c) { - // find syntax list that covers the span of the node - if (c.kind === 253 /* SyntaxList */ && c.pos <= node.pos && c.end >= node.end) { - return c; - } - }); - // Either we didn't find an appropriate list, or the list must contain us. - ts.Debug.assert(!syntaxList || ts.contains(syntaxList.getChildren(), node)); - return syntaxList; - } - ts.findContainingList = findContainingList; - /* Gets the token whose text has range [start, end) and - * position >= start and (position < end or (position === end && token is keyword or identifier)) - */ - function getTouchingWord(sourceFile, position) { - return getTouchingToken(sourceFile, position, function (n) { return isWord(n.kind); }); - } - ts.getTouchingWord = getTouchingWord; - /* Gets the token whose text has range [start, end) and position >= start - * and (position < end or (position === end && token is keyword or identifier or numeric\string litera)) - */ - function getTouchingPropertyName(sourceFile, position) { - return getTouchingToken(sourceFile, position, function (n) { return isPropertyName(n.kind); }); - } - ts.getTouchingPropertyName = getTouchingPropertyName; - /** Returns the token if position is in [start, end) or if position === end and includeItemAtEndPosition(token) === true */ - function getTouchingToken(sourceFile, position, includeItemAtEndPosition) { - return getTokenAtPositionWorker(sourceFile, position, false, includeItemAtEndPosition); - } - ts.getTouchingToken = getTouchingToken; - /** Returns a token if position is in [start-of-leading-trivia, end) */ - function getTokenAtPosition(sourceFile, position) { - return getTokenAtPositionWorker(sourceFile, position, true, undefined); - } - ts.getTokenAtPosition = getTokenAtPosition; - /** Get the token whose text contains the position */ - function getTokenAtPositionWorker(sourceFile, position, allowPositionInLeadingTrivia, includeItemAtEndPosition) { - var current = sourceFile; - outer: while (true) { - if (isToken(current)) { - // exit early - return current; - } - // find the child that contains 'position' - for (var i = 0, n = current.getChildCount(sourceFile); i < n; i++) { - var child = current.getChildAt(i); - var start = allowPositionInLeadingTrivia ? child.getFullStart() : child.getStart(sourceFile); - if (start <= position) { - var end = child.getEnd(); - if (position < end || (position === end && child.kind === 1 /* EndOfFileToken */)) { - current = child; - continue outer; - } - else if (includeItemAtEndPosition && end === position) { - var previousToken = findPrecedingToken(position, sourceFile, child); - if (previousToken && includeItemAtEndPosition(previousToken)) { - return previousToken; - } - } - } - } - return current; - } - } - /** - * The token on the left of the position is the token that strictly includes the position - * or sits to the left of the cursor if it is on a boundary. For example - * - * fo|o -> will return foo - * foo |bar -> will return foo - * - */ - function findTokenOnLeftOfPosition(file, position) { - // Ideally, getTokenAtPosition should return a token. However, it is currently - // broken, so we do a check to make sure the result was indeed a token. - var tokenAtPosition = getTokenAtPosition(file, position); - if (isToken(tokenAtPosition) && position > tokenAtPosition.getStart(file) && position < tokenAtPosition.getEnd()) { - return tokenAtPosition; - } - return findPrecedingToken(position, file); - } - ts.findTokenOnLeftOfPosition = findTokenOnLeftOfPosition; - function findNextToken(previousToken, parent) { - return find(parent); - function find(n) { - if (isToken(n) && n.pos === previousToken.end) { - // this is token that starts at the end of previous token - return it - return n; - } - var children = n.getChildren(); - for (var _i = 0; _i < children.length; _i++) { - var child = children[_i]; - var shouldDiveInChildNode = - // previous token is enclosed somewhere in the child - (child.pos <= previousToken.pos && child.end > previousToken.end) || - // previous token ends exactly at the beginning of child - (child.pos === previousToken.end); - if (shouldDiveInChildNode && nodeHasTokens(child)) { - return find(child); - } - } - return undefined; - } - } - ts.findNextToken = findNextToken; - function findPrecedingToken(position, sourceFile, startNode) { - return find(startNode || sourceFile); - function findRightmostToken(n) { - if (isToken(n)) { - return n; - } - var children = n.getChildren(); - var candidate = findRightmostChildNodeWithTokens(children, children.length); - return candidate && findRightmostToken(candidate); - } - function find(n) { - if (isToken(n)) { - return n; - } - var children = n.getChildren(); - for (var i = 0, len = children.length; i < len; i++) { - var child = children[i]; - if (nodeHasTokens(child)) { - if (position <= child.end) { - if (child.getStart(sourceFile) >= position) { - // actual start of the node is past the position - previous token should be at the end of previous child - var candidate = findRightmostChildNodeWithTokens(children, i); - return candidate && findRightmostToken(candidate); - } - else { - // candidate should be in this node - return find(child); - } - } - } - } - ts.Debug.assert(startNode !== undefined || n.kind === 230 /* SourceFile */); - // Here we know that none of child token nodes embrace the position, - // the only known case is when position is at the end of the file. - // Try to find the rightmost token in the file without filtering. - // Namely we are skipping the check: 'position < node.end' - if (children.length) { - var candidate = findRightmostChildNodeWithTokens(children, children.length); - return candidate && findRightmostToken(candidate); - } - } - /// finds last node that is considered as candidate for search (isCandidate(node) === true) starting from 'exclusiveStartPosition' - function findRightmostChildNodeWithTokens(children, exclusiveStartPosition) { - for (var i = exclusiveStartPosition - 1; i >= 0; --i) { - if (nodeHasTokens(children[i])) { - return children[i]; - } - } - } - } - ts.findPrecedingToken = findPrecedingToken; - function nodeHasTokens(n) { - // If we have a token or node that has a non-zero width, it must have tokens. - // Note, that getWidth() does not take trivia into account. - return n.getWidth() !== 0; - } - function getNodeModifiers(node) { - var flags = ts.getCombinedNodeFlags(node); - var result = []; - if (flags & 32 /* Private */) - result.push(ts.ScriptElementKindModifier.privateMemberModifier); - if (flags & 64 /* Protected */) - result.push(ts.ScriptElementKindModifier.protectedMemberModifier); - if (flags & 16 /* Public */) - result.push(ts.ScriptElementKindModifier.publicMemberModifier); - if (flags & 128 /* Static */) - result.push(ts.ScriptElementKindModifier.staticModifier); - if (flags & 1 /* Export */) - result.push(ts.ScriptElementKindModifier.exportedModifier); - if (ts.isInAmbientContext(node)) - result.push(ts.ScriptElementKindModifier.ambientModifier); - return result.length > 0 ? result.join(',') : ts.ScriptElementKindModifier.none; - } - ts.getNodeModifiers = getNodeModifiers; - function getTypeArgumentOrTypeParameterList(node) { - if (node.kind === 144 /* TypeReference */ || node.kind === 160 /* CallExpression */) { - return node.typeArguments; - } - if (ts.isFunctionLike(node) || node.kind === 204 /* ClassDeclaration */ || node.kind === 205 /* InterfaceDeclaration */) { - return node.typeParameters; - } - return undefined; - } - ts.getTypeArgumentOrTypeParameterList = getTypeArgumentOrTypeParameterList; - function isToken(n) { - return n.kind >= 0 /* FirstToken */ && n.kind <= 127 /* LastToken */; - } - ts.isToken = isToken; - function isWord(kind) { - return kind === 65 /* Identifier */ || ts.isKeyword(kind); - } - ts.isWord = isWord; - function isPropertyName(kind) { - return kind === 8 /* StringLiteral */ || kind === 7 /* NumericLiteral */ || isWord(kind); - } - function isComment(kind) { - return kind === 2 /* SingleLineCommentTrivia */ || kind === 3 /* MultiLineCommentTrivia */; - } - ts.isComment = isComment; - function isPunctuation(kind) { - return 14 /* FirstPunctuation */ <= kind && kind <= 64 /* LastPunctuation */; - } - ts.isPunctuation = isPunctuation; - function isInsideTemplateLiteral(node, position) { - return ts.isTemplateLiteralKind(node.kind) - && (node.getStart() < position && position < node.getEnd()) || (!!node.isUnterminated && position === node.getEnd()); - } - ts.isInsideTemplateLiteral = isInsideTemplateLiteral; - function isAccessibilityModifier(kind) { - switch (kind) { - case 108 /* PublicKeyword */: - case 106 /* PrivateKeyword */: - case 107 /* ProtectedKeyword */: - return true; - } - return false; - } - ts.isAccessibilityModifier = isAccessibilityModifier; - function compareDataObjects(dst, src) { - for (var e in dst) { - if (typeof dst[e] === "object") { - if (!compareDataObjects(dst[e], src[e])) { - return false; - } - } - else if (typeof dst[e] !== "function") { - if (dst[e] !== src[e]) { - return false; - } - } - } - return true; - } - ts.compareDataObjects = compareDataObjects; -})(ts || (ts = {})); -// Display-part writer helpers -/* @internal */ -var ts; -(function (ts) { - function isFirstDeclarationOfSymbolParameter(symbol) { - return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === 131 /* Parameter */; - } - ts.isFirstDeclarationOfSymbolParameter = isFirstDeclarationOfSymbolParameter; - var displayPartWriter = getDisplayPartWriter(); - function getDisplayPartWriter() { - var displayParts; - var lineStart; - var indent; - resetWriter(); - return { - displayParts: function () { return displayParts; }, - writeKeyword: function (text) { return writeKind(text, ts.SymbolDisplayPartKind.keyword); }, - writeOperator: function (text) { return writeKind(text, ts.SymbolDisplayPartKind.operator); }, - writePunctuation: function (text) { return writeKind(text, ts.SymbolDisplayPartKind.punctuation); }, - writeSpace: function (text) { return writeKind(text, ts.SymbolDisplayPartKind.space); }, - writeStringLiteral: function (text) { return writeKind(text, ts.SymbolDisplayPartKind.stringLiteral); }, - writeParameter: function (text) { return writeKind(text, ts.SymbolDisplayPartKind.parameterName); }, - writeSymbol: writeSymbol, - writeLine: writeLine, - increaseIndent: function () { indent++; }, - decreaseIndent: function () { indent--; }, - clear: resetWriter, - trackSymbol: function () { } - }; - function writeIndent() { - if (lineStart) { - var indentString = ts.getIndentString(indent); - if (indentString) { - displayParts.push(displayPart(indentString, ts.SymbolDisplayPartKind.space)); - } - lineStart = false; - } - } - function writeKind(text, kind) { - writeIndent(); - displayParts.push(displayPart(text, kind)); - } - function writeSymbol(text, symbol) { - writeIndent(); - displayParts.push(symbolPart(text, symbol)); - } - function writeLine() { - displayParts.push(lineBreakPart()); - lineStart = true; - } - function resetWriter() { - displayParts = []; - lineStart = true; - indent = 0; - } - } - function symbolPart(text, symbol) { - return displayPart(text, displayPartKind(symbol), symbol); - function displayPartKind(symbol) { - var flags = symbol.flags; - if (flags & 3 /* Variable */) { - return isFirstDeclarationOfSymbolParameter(symbol) ? ts.SymbolDisplayPartKind.parameterName : ts.SymbolDisplayPartKind.localName; - } - else if (flags & 4 /* Property */) { - return ts.SymbolDisplayPartKind.propertyName; - } - else if (flags & 32768 /* GetAccessor */) { - return ts.SymbolDisplayPartKind.propertyName; - } - else if (flags & 65536 /* SetAccessor */) { - return ts.SymbolDisplayPartKind.propertyName; - } - else if (flags & 8 /* EnumMember */) { - return ts.SymbolDisplayPartKind.enumMemberName; - } - else if (flags & 16 /* Function */) { - return ts.SymbolDisplayPartKind.functionName; - } - else if (flags & 32 /* Class */) { - return ts.SymbolDisplayPartKind.className; - } - else if (flags & 64 /* Interface */) { - return ts.SymbolDisplayPartKind.interfaceName; - } - else if (flags & 384 /* Enum */) { - return ts.SymbolDisplayPartKind.enumName; - } - else if (flags & 1536 /* Module */) { - return ts.SymbolDisplayPartKind.moduleName; - } - else if (flags & 8192 /* Method */) { - return ts.SymbolDisplayPartKind.methodName; - } - else if (flags & 262144 /* TypeParameter */) { - return ts.SymbolDisplayPartKind.typeParameterName; - } - else if (flags & 524288 /* TypeAlias */) { - return ts.SymbolDisplayPartKind.aliasName; - } - else if (flags & 8388608 /* Alias */) { - return ts.SymbolDisplayPartKind.aliasName; - } - return ts.SymbolDisplayPartKind.text; - } - } - ts.symbolPart = symbolPart; - function displayPart(text, kind, symbol) { - return { - text: text, - kind: ts.SymbolDisplayPartKind[kind] - }; - } - ts.displayPart = displayPart; - function spacePart() { - return displayPart(" ", ts.SymbolDisplayPartKind.space); - } - ts.spacePart = spacePart; - function keywordPart(kind) { - return displayPart(ts.tokenToString(kind), ts.SymbolDisplayPartKind.keyword); - } - ts.keywordPart = keywordPart; - function punctuationPart(kind) { - return displayPart(ts.tokenToString(kind), ts.SymbolDisplayPartKind.punctuation); - } - ts.punctuationPart = punctuationPart; - function operatorPart(kind) { - return displayPart(ts.tokenToString(kind), ts.SymbolDisplayPartKind.operator); - } - ts.operatorPart = operatorPart; - function textOrKeywordPart(text) { - var kind = ts.stringToToken(text); - return kind === undefined - ? textPart(text) - : keywordPart(kind); - } - ts.textOrKeywordPart = textOrKeywordPart; - function textPart(text) { - return displayPart(text, ts.SymbolDisplayPartKind.text); - } - ts.textPart = textPart; - function lineBreakPart() { - return displayPart("\n", ts.SymbolDisplayPartKind.lineBreak); - } - ts.lineBreakPart = lineBreakPart; - function mapToDisplayParts(writeDisplayParts) { - writeDisplayParts(displayPartWriter); - var result = displayPartWriter.displayParts(); - displayPartWriter.clear(); - return result; - } - ts.mapToDisplayParts = mapToDisplayParts; - function typeToDisplayParts(typechecker, type, enclosingDeclaration, flags) { - return mapToDisplayParts(function (writer) { - typechecker.getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags); - }); - } - ts.typeToDisplayParts = typeToDisplayParts; - function symbolToDisplayParts(typeChecker, symbol, enclosingDeclaration, meaning, flags) { - return mapToDisplayParts(function (writer) { - typeChecker.getSymbolDisplayBuilder().buildSymbolDisplay(symbol, writer, enclosingDeclaration, meaning, flags); - }); - } - ts.symbolToDisplayParts = symbolToDisplayParts; - function signatureToDisplayParts(typechecker, signature, enclosingDeclaration, flags) { - return mapToDisplayParts(function (writer) { - typechecker.getSymbolDisplayBuilder().buildSignatureDisplay(signature, writer, enclosingDeclaration, flags); - }); - } - ts.signatureToDisplayParts = signatureToDisplayParts; -})(ts || (ts = {})); -/// -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - var scanner = ts.createScanner(2 /* Latest */, false); - var ScanAction; - (function (ScanAction) { - ScanAction[ScanAction["Scan"] = 0] = "Scan"; - ScanAction[ScanAction["RescanGreaterThanToken"] = 1] = "RescanGreaterThanToken"; - ScanAction[ScanAction["RescanSlashToken"] = 2] = "RescanSlashToken"; - ScanAction[ScanAction["RescanTemplateToken"] = 3] = "RescanTemplateToken"; - })(ScanAction || (ScanAction = {})); - function getFormattingScanner(sourceFile, startPos, endPos) { - scanner.setText(sourceFile.text); - scanner.setTextPos(startPos); - var wasNewLine = true; - var leadingTrivia; - var trailingTrivia; - var savedPos; - var lastScanAction; - var lastTokenInfo; - return { - advance: advance, - readTokenInfo: readTokenInfo, - isOnToken: isOnToken, - lastTrailingTriviaWasNewLine: function () { return wasNewLine; }, - close: function () { - lastTokenInfo = undefined; - scanner.setText(undefined); - } - }; - function advance() { - lastTokenInfo = undefined; - var isStarted = scanner.getStartPos() !== startPos; - if (isStarted) { - if (trailingTrivia) { - ts.Debug.assert(trailingTrivia.length !== 0); - wasNewLine = ts.lastOrUndefined(trailingTrivia).kind === 4 /* NewLineTrivia */; - } - else { - wasNewLine = false; - } - } - leadingTrivia = undefined; - trailingTrivia = undefined; - if (!isStarted) { - scanner.scan(); - } - var t; - var pos = scanner.getStartPos(); - // Read leading trivia and token - while (pos < endPos) { - var t_2 = scanner.getToken(); - if (!ts.isTrivia(t_2)) { - break; - } - // consume leading trivia - scanner.scan(); - var item = { - pos: pos, - end: scanner.getStartPos(), - kind: t_2 - }; - pos = scanner.getStartPos(); - if (!leadingTrivia) { - leadingTrivia = []; - } - leadingTrivia.push(item); - } - savedPos = scanner.getStartPos(); - } - function shouldRescanGreaterThanToken(node) { - if (node) { - switch (node.kind) { - case 27 /* GreaterThanEqualsToken */: - case 60 /* GreaterThanGreaterThanEqualsToken */: - case 61 /* GreaterThanGreaterThanGreaterThanEqualsToken */: - case 42 /* GreaterThanGreaterThanGreaterThanToken */: - case 41 /* GreaterThanGreaterThanToken */: - return true; - } - } - return false; - } - function shouldRescanSlashToken(container) { - return container.kind === 9 /* RegularExpressionLiteral */; - } - function shouldRescanTemplateToken(container) { - return container.kind === 12 /* TemplateMiddle */ || - container.kind === 13 /* TemplateTail */; - } - function startsWithSlashToken(t) { - return t === 36 /* SlashToken */ || t === 57 /* SlashEqualsToken */; - } - function readTokenInfo(n) { - if (!isOnToken()) { - // scanner is not on the token (either advance was not called yet or scanner is already past the end position) - return { - leadingTrivia: leadingTrivia, - trailingTrivia: undefined, - token: undefined - }; - } - // normally scanner returns the smallest available token - // check the kind of context node to determine if scanner should have more greedy behavior and consume more text. - var expectedScanAction = shouldRescanGreaterThanToken(n) - ? 1 /* RescanGreaterThanToken */ - : shouldRescanSlashToken(n) - ? 2 /* RescanSlashToken */ - : shouldRescanTemplateToken(n) - ? 3 /* RescanTemplateToken */ - : 0 /* Scan */; - if (lastTokenInfo && expectedScanAction === lastScanAction) { - // readTokenInfo was called before with the same expected scan action. - // No need to re-scan text, return existing 'lastTokenInfo' - // it is ok to call fixTokenKind here since it does not affect - // what portion of text is consumed. In opposize rescanning can change it, - // i.e. for '>=' when originally scanner eats just one character - // and rescanning forces it to consume more. - return fixTokenKind(lastTokenInfo, n); - } - if (scanner.getStartPos() !== savedPos) { - ts.Debug.assert(lastTokenInfo !== undefined); - // readTokenInfo was called before but scan action differs - rescan text - scanner.setTextPos(savedPos); - scanner.scan(); - } - var currentToken = scanner.getToken(); - if (expectedScanAction === 1 /* RescanGreaterThanToken */ && currentToken === 25 /* GreaterThanToken */) { - currentToken = scanner.reScanGreaterToken(); - ts.Debug.assert(n.kind === currentToken); - lastScanAction = 1 /* RescanGreaterThanToken */; - } - else if (expectedScanAction === 2 /* RescanSlashToken */ && startsWithSlashToken(currentToken)) { - currentToken = scanner.reScanSlashToken(); - ts.Debug.assert(n.kind === currentToken); - lastScanAction = 2 /* RescanSlashToken */; - } - else if (expectedScanAction === 3 /* RescanTemplateToken */ && currentToken === 15 /* CloseBraceToken */) { - currentToken = scanner.reScanTemplateToken(); - lastScanAction = 3 /* RescanTemplateToken */; - } - else { - lastScanAction = 0 /* Scan */; - } - var token = { - pos: scanner.getStartPos(), - end: scanner.getTextPos(), - kind: currentToken - }; - // consume trailing trivia - if (trailingTrivia) { - trailingTrivia = undefined; - } - while (scanner.getStartPos() < endPos) { - currentToken = scanner.scan(); - if (!ts.isTrivia(currentToken)) { - break; - } - var trivia = { - pos: scanner.getStartPos(), - end: scanner.getTextPos(), - kind: currentToken - }; - if (!trailingTrivia) { - trailingTrivia = []; - } - trailingTrivia.push(trivia); - if (currentToken === 4 /* NewLineTrivia */) { - // move past new line - scanner.scan(); - break; - } - } - lastTokenInfo = { - leadingTrivia: leadingTrivia, - trailingTrivia: trailingTrivia, - token: token - }; - return fixTokenKind(lastTokenInfo, n); - } - function isOnToken() { - var current = (lastTokenInfo && lastTokenInfo.token.kind) || scanner.getToken(); - var startPos = (lastTokenInfo && lastTokenInfo.token.pos) || scanner.getStartPos(); - return startPos < endPos && current !== 1 /* EndOfFileToken */ && !ts.isTrivia(current); - } - // when containing node in the tree is token - // but its kind differs from the kind that was returned by the scanner, - // then kind needs to be fixed. This might happen in cases - // when parser interprets token differently, i.e keyword treated as identifier - function fixTokenKind(tokenInfo, container) { - if (ts.isToken(container) && tokenInfo.token.kind !== container.kind) { - tokenInfo.token.kind = container.kind; - } - return tokenInfo; - } - } - formatting.getFormattingScanner = getFormattingScanner; - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - var FormattingContext = (function () { - function FormattingContext(sourceFile, formattingRequestKind) { - this.sourceFile = sourceFile; - this.formattingRequestKind = formattingRequestKind; - } - FormattingContext.prototype.updateContext = function (currentRange, currentTokenParent, nextRange, nextTokenParent, commonParent) { - ts.Debug.assert(currentRange !== undefined, "currentTokenSpan is null"); - ts.Debug.assert(currentTokenParent !== undefined, "currentTokenParent is null"); - ts.Debug.assert(nextRange !== undefined, "nextTokenSpan is null"); - ts.Debug.assert(nextTokenParent !== undefined, "nextTokenParent is null"); - ts.Debug.assert(commonParent !== undefined, "commonParent is null"); - this.currentTokenSpan = currentRange; - this.currentTokenParent = currentTokenParent; - this.nextTokenSpan = nextRange; - this.nextTokenParent = nextTokenParent; - this.contextNode = commonParent; - // drop cached results - this.contextNodeAllOnSameLine = undefined; - this.nextNodeAllOnSameLine = undefined; - this.tokensAreOnSameLine = undefined; - this.contextNodeBlockIsOnOneLine = undefined; - this.nextNodeBlockIsOnOneLine = undefined; - }; - FormattingContext.prototype.ContextNodeAllOnSameLine = function () { - if (this.contextNodeAllOnSameLine === undefined) { - this.contextNodeAllOnSameLine = this.NodeIsOnOneLine(this.contextNode); - } - return this.contextNodeAllOnSameLine; - }; - FormattingContext.prototype.NextNodeAllOnSameLine = function () { - if (this.nextNodeAllOnSameLine === undefined) { - this.nextNodeAllOnSameLine = this.NodeIsOnOneLine(this.nextTokenParent); - } - return this.nextNodeAllOnSameLine; - }; - FormattingContext.prototype.TokensAreOnSameLine = function () { - if (this.tokensAreOnSameLine === undefined) { - var startLine = this.sourceFile.getLineAndCharacterOfPosition(this.currentTokenSpan.pos).line; - var endLine = this.sourceFile.getLineAndCharacterOfPosition(this.nextTokenSpan.pos).line; - this.tokensAreOnSameLine = (startLine == endLine); - } - return this.tokensAreOnSameLine; - }; - FormattingContext.prototype.ContextNodeBlockIsOnOneLine = function () { - if (this.contextNodeBlockIsOnOneLine === undefined) { - this.contextNodeBlockIsOnOneLine = this.BlockIsOnOneLine(this.contextNode); - } - return this.contextNodeBlockIsOnOneLine; - }; - FormattingContext.prototype.NextNodeBlockIsOnOneLine = function () { - if (this.nextNodeBlockIsOnOneLine === undefined) { - this.nextNodeBlockIsOnOneLine = this.BlockIsOnOneLine(this.nextTokenParent); - } - return this.nextNodeBlockIsOnOneLine; - }; - FormattingContext.prototype.NodeIsOnOneLine = function (node) { - var startLine = this.sourceFile.getLineAndCharacterOfPosition(node.getStart(this.sourceFile)).line; - var endLine = this.sourceFile.getLineAndCharacterOfPosition(node.getEnd()).line; - return startLine == endLine; - }; - FormattingContext.prototype.BlockIsOnOneLine = function (node) { - var openBrace = ts.findChildOfKind(node, 14 /* OpenBraceToken */, this.sourceFile); - var closeBrace = ts.findChildOfKind(node, 15 /* CloseBraceToken */, this.sourceFile); - if (openBrace && closeBrace) { - var startLine = this.sourceFile.getLineAndCharacterOfPosition(openBrace.getEnd()).line; - var endLine = this.sourceFile.getLineAndCharacterOfPosition(closeBrace.getStart(this.sourceFile)).line; - return startLine === endLine; - } - return false; - }; - return FormattingContext; - })(); - formatting.FormattingContext = FormattingContext; - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - (function (FormattingRequestKind) { - FormattingRequestKind[FormattingRequestKind["FormatDocument"] = 0] = "FormatDocument"; - FormattingRequestKind[FormattingRequestKind["FormatSelection"] = 1] = "FormatSelection"; - FormattingRequestKind[FormattingRequestKind["FormatOnEnter"] = 2] = "FormatOnEnter"; - FormattingRequestKind[FormattingRequestKind["FormatOnSemicolon"] = 3] = "FormatOnSemicolon"; - FormattingRequestKind[FormattingRequestKind["FormatOnClosingCurlyBrace"] = 4] = "FormatOnClosingCurlyBrace"; - })(formatting.FormattingRequestKind || (formatting.FormattingRequestKind = {})); - var FormattingRequestKind = formatting.FormattingRequestKind; - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - var Rule = (function () { - function Rule(Descriptor, Operation, Flag) { - if (Flag === void 0) { Flag = 0 /* None */; } - this.Descriptor = Descriptor; - this.Operation = Operation; - this.Flag = Flag; - } - Rule.prototype.toString = function () { - return "[desc=" + this.Descriptor + "," + - "operation=" + this.Operation + "," + - "flag=" + this.Flag + "]"; - }; - return Rule; - })(); - formatting.Rule = Rule; - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - (function (RuleAction) { - RuleAction[RuleAction["Ignore"] = 1] = "Ignore"; - RuleAction[RuleAction["Space"] = 2] = "Space"; - RuleAction[RuleAction["NewLine"] = 4] = "NewLine"; - RuleAction[RuleAction["Delete"] = 8] = "Delete"; - })(formatting.RuleAction || (formatting.RuleAction = {})); - var RuleAction = formatting.RuleAction; - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - var RuleDescriptor = (function () { - function RuleDescriptor(LeftTokenRange, RightTokenRange) { - this.LeftTokenRange = LeftTokenRange; - this.RightTokenRange = RightTokenRange; - } - RuleDescriptor.prototype.toString = function () { - return "[leftRange=" + this.LeftTokenRange + "," + - "rightRange=" + this.RightTokenRange + "]"; - }; - RuleDescriptor.create1 = function (left, right) { - return RuleDescriptor.create4(formatting.Shared.TokenRange.FromToken(left), formatting.Shared.TokenRange.FromToken(right)); - }; - RuleDescriptor.create2 = function (left, right) { - return RuleDescriptor.create4(left, formatting.Shared.TokenRange.FromToken(right)); - }; - RuleDescriptor.create3 = function (left, right) { - return RuleDescriptor.create4(formatting.Shared.TokenRange.FromToken(left), right); - }; - RuleDescriptor.create4 = function (left, right) { - return new RuleDescriptor(left, right); - }; - return RuleDescriptor; - })(); - formatting.RuleDescriptor = RuleDescriptor; - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - (function (RuleFlags) { - RuleFlags[RuleFlags["None"] = 0] = "None"; - RuleFlags[RuleFlags["CanDeleteNewLines"] = 1] = "CanDeleteNewLines"; - })(formatting.RuleFlags || (formatting.RuleFlags = {})); - var RuleFlags = formatting.RuleFlags; - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - var RuleOperation = (function () { - function RuleOperation() { - this.Context = null; - this.Action = null; - } - RuleOperation.prototype.toString = function () { - return "[context=" + this.Context + "," + - "action=" + this.Action + "]"; - }; - RuleOperation.create1 = function (action) { - return RuleOperation.create2(formatting.RuleOperationContext.Any, action); - }; - RuleOperation.create2 = function (context, action) { - var result = new RuleOperation(); - result.Context = context; - result.Action = action; - return result; - }; - return RuleOperation; - })(); - formatting.RuleOperation = RuleOperation; - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - var RuleOperationContext = (function () { - function RuleOperationContext() { - var funcs = []; - for (var _i = 0; _i < arguments.length; _i++) { - funcs[_i - 0] = arguments[_i]; - } - this.customContextChecks = funcs; - } - RuleOperationContext.prototype.IsAny = function () { - return this == RuleOperationContext.Any; - }; - RuleOperationContext.prototype.InContext = function (context) { - if (this.IsAny()) { - return true; - } - for (var _i = 0, _a = this.customContextChecks; _i < _a.length; _i++) { - var check = _a[_i]; - if (!check(context)) { - return false; - } - } - return true; - }; - RuleOperationContext.Any = new RuleOperationContext(); - return RuleOperationContext; - })(); - formatting.RuleOperationContext = RuleOperationContext; - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - var Rules = (function () { - function Rules() { - /// - /// Common Rules - /// - // Leave comments alone - this.IgnoreBeforeComment = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.Comments), formatting.RuleOperation.create1(1 /* Ignore */)); - this.IgnoreAfterLineComment = new formatting.Rule(formatting.RuleDescriptor.create3(2 /* SingleLineCommentTrivia */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create1(1 /* Ignore */)); - // Space after keyword but not before ; or : or ? - this.NoSpaceBeforeSemicolon = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22 /* SemicolonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeColon = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 51 /* ColonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); - this.NoSpaceBeforeQuestionMark = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 50 /* QuestionToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); - this.SpaceAfterColon = new formatting.Rule(formatting.RuleDescriptor.create3(51 /* ColonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), 2 /* Space */)); - this.SpaceAfterQuestionMarkInConditionalOperator = new formatting.Rule(formatting.RuleDescriptor.create3(50 /* QuestionToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsConditionalOperatorContext), 2 /* Space */)); - this.NoSpaceAfterQuestionMark = new formatting.Rule(formatting.RuleDescriptor.create3(50 /* QuestionToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.SpaceAfterSemicolon = new formatting.Rule(formatting.RuleDescriptor.create3(22 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - // Space after }. - this.SpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(15 /* CloseBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsAfterCodeBlockContext), 2 /* Space */)); - // Special case for (}, else) and (}, while) since else & while tokens are not part of the tree which makes SpaceAfterCloseBrace rule not applied - this.SpaceBetweenCloseBraceAndElse = new formatting.Rule(formatting.RuleDescriptor.create1(15 /* CloseBraceToken */, 76 /* ElseKeyword */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - this.SpaceBetweenCloseBraceAndWhile = new formatting.Rule(formatting.RuleDescriptor.create1(15 /* CloseBraceToken */, 100 /* WhileKeyword */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - this.NoSpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(15 /* CloseBraceToken */, formatting.Shared.TokenRange.FromTokens([17 /* CloseParenToken */, 19 /* CloseBracketToken */, 23 /* CommaToken */, 22 /* SemicolonToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - // No space for indexer and dot - this.NoSpaceBeforeDot = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20 /* DotToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterDot = new formatting.Rule(formatting.RuleDescriptor.create3(20 /* DotToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* OpenBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(18 /* OpenBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create3(19 /* CloseBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBeforeBlockInFunctionDeclarationContext), 8 /* Delete */)); - // Place a space before open brace in a function declaration - this.FunctionOpenBraceLeftTokenRange = formatting.Shared.TokenRange.AnyIncludingMultilineComments; - this.SpaceBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 14 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2 /* Space */), 1 /* CanDeleteNewLines */); - // Place a space before open brace in a TypeScript declaration that has braces as children (class, module, enum, etc) - this.TypeScriptOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([65 /* Identifier */, 3 /* MultiLineCommentTrivia */]); - this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 14 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2 /* Space */), 1 /* CanDeleteNewLines */); - // Place a space before open brace in a control flow construct - this.ControlOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([17 /* CloseParenToken */, 3 /* MultiLineCommentTrivia */, 75 /* DoKeyword */, 96 /* TryKeyword */, 81 /* FinallyKeyword */, 76 /* ElseKeyword */]); - this.SpaceBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 14 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2 /* Space */), 1 /* CanDeleteNewLines */); - // Insert a space after { and before } in single-line contexts, but remove space from empty object literals {}. - this.SpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(14 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSingleLineBlockContext), 2 /* Space */)); - this.SpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 15 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSingleLineBlockContext), 2 /* Space */)); - this.NoSpaceBetweenEmptyBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(14 /* OpenBraceToken */, 15 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsObjectContext), 8 /* Delete */)); - // Insert new line after { and before } in multi-line contexts. - this.NewLineAfterOpenBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create3(14 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4 /* NewLine */)); - // For functions and control block place } on a new line [multi-line rule] - this.NewLineBeforeCloseBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.AnyIncludingMultilineComments, 15 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4 /* NewLine */)); - // Special handling of unary operators. - // Prefix operators generally shouldn't have a space between - // them and their target unary expression. - this.NoSpaceAfterUnaryPrefixOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.UnaryPrefixOperators, formatting.Shared.TokenRange.UnaryPrefixExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); - this.NoSpaceAfterUnaryPreincrementOperator = new formatting.Rule(formatting.RuleDescriptor.create3(38 /* PlusPlusToken */, formatting.Shared.TokenRange.UnaryPreincrementExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterUnaryPredecrementOperator = new formatting.Rule(formatting.RuleDescriptor.create3(39 /* MinusMinusToken */, formatting.Shared.TokenRange.UnaryPredecrementExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeUnaryPostincrementOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.UnaryPostincrementExpressions, 38 /* PlusPlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeUnaryPostdecrementOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.UnaryPostdecrementExpressions, 39 /* MinusMinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - // More unary operator special-casing. - // DevDiv 181814: Be careful when removing leading whitespace - // around unary operators. Examples: - // 1 - -2 --X--> 1--2 - // a + ++b --X--> a+++b - this.SpaceAfterPostincrementWhenFollowedByAdd = new formatting.Rule(formatting.RuleDescriptor.create1(38 /* PlusPlusToken */, 33 /* PlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterAddWhenFollowedByUnaryPlus = new formatting.Rule(formatting.RuleDescriptor.create1(33 /* PlusToken */, 33 /* PlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterAddWhenFollowedByPreincrement = new formatting.Rule(formatting.RuleDescriptor.create1(33 /* PlusToken */, 38 /* PlusPlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterPostdecrementWhenFollowedBySubtract = new formatting.Rule(formatting.RuleDescriptor.create1(39 /* MinusMinusToken */, 34 /* MinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterSubtractWhenFollowedByUnaryMinus = new formatting.Rule(formatting.RuleDescriptor.create1(34 /* MinusToken */, 34 /* MinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterSubtractWhenFollowedByPredecrement = new formatting.Rule(formatting.RuleDescriptor.create1(34 /* MinusToken */, 39 /* MinusMinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.NoSpaceBeforeComma = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 23 /* CommaToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.SpaceAfterCertainKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([98 /* VarKeyword */, 94 /* ThrowKeyword */, 88 /* NewKeyword */, 74 /* DeleteKeyword */, 90 /* ReturnKeyword */, 97 /* TypeOfKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - this.SpaceAfterLetConstInVariableDeclaration = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([104 /* LetKeyword */, 70 /* ConstKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsStartOfVariableDeclarationList), 2 /* Space */)); - this.NoSpaceBeforeOpenParenInFuncCall = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 16 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsFunctionCallOrNewContext, Rules.IsPreviousTokenNotComma), 8 /* Delete */)); - this.SpaceAfterFunctionInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create3(83 /* FunctionKeyword */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */)); - this.NoSpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 16 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsFunctionDeclContext), 8 /* Delete */)); - this.SpaceAfterVoidOperator = new formatting.Rule(formatting.RuleDescriptor.create3(99 /* VoidKeyword */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsVoidOpContext), 2 /* Space */)); - this.NoSpaceBetweenReturnAndSemicolon = new formatting.Rule(formatting.RuleDescriptor.create1(90 /* ReturnKeyword */, 22 /* SemicolonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - // Add a space between statements. All keywords except (do,else,case) has open/close parens after them. - // So, we have a rule to add a space for [),Any], [do,Any], [else,Any], and [case,Any] - this.SpaceBetweenStatements = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([17 /* CloseParenToken */, 75 /* DoKeyword */, 76 /* ElseKeyword */, 67 /* CaseKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotForContext), 2 /* Space */)); - // This low-pri rule takes care of "try {" and "finally {" in case the rule SpaceBeforeOpenBraceInControl didn't execute on FormatOnEnter. - this.SpaceAfterTryFinally = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([96 /* TryKeyword */, 81 /* FinallyKeyword */]), 14 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - // get x() {} - // set x(val) {} - this.SpaceAfterGetSetInMember = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([116 /* GetKeyword */, 122 /* SetKeyword */]), 65 /* Identifier */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */)); - // Special case for binary operators (that are keywords). For these we have to add a space and shouldn't follow any user options. - this.SpaceBeforeBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryKeywordOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryKeywordOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - // TypeScript-specific higher priority rules - // Treat constructor as an identifier in a function declaration, and remove spaces between constructor and following left parentheses - this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(114 /* ConstructorKeyword */, 16 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - // Use of module as a function call. e.g.: import m2 = module("m2"); - this.NoSpaceAfterModuleImport = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([118 /* ModuleKeyword */, 120 /* RequireKeyword */]), 16 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - // Add a space around certain TypeScript keywords - this.SpaceAfterCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([69 /* ClassKeyword */, 115 /* DeclareKeyword */, 77 /* EnumKeyword */, 78 /* ExportKeyword */, 79 /* ExtendsKeyword */, 116 /* GetKeyword */, 102 /* ImplementsKeyword */, 85 /* ImportKeyword */, 103 /* InterfaceKeyword */, 118 /* ModuleKeyword */, 119 /* NamespaceKeyword */, 106 /* PrivateKeyword */, 108 /* PublicKeyword */, 122 /* SetKeyword */, 109 /* StaticKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - this.SpaceBeforeCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([79 /* ExtendsKeyword */, 102 /* ImplementsKeyword */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - // Treat string literals in module names as identifiers, and add a space between the literal and the opening Brace braces, e.g.: module "m2" { - this.SpaceAfterModuleName = new formatting.Rule(formatting.RuleDescriptor.create1(8 /* StringLiteral */, 14 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsModuleDeclContext), 2 /* Space */)); - // Lambda expressions - this.SpaceAfterArrow = new formatting.Rule(formatting.RuleDescriptor.create3(32 /* EqualsGreaterThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - // Optional parameters and let args - this.NoSpaceAfterEllipsis = new formatting.Rule(formatting.RuleDescriptor.create1(21 /* DotDotDotToken */, 65 /* Identifier */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterOptionalParameters = new formatting.Rule(formatting.RuleDescriptor.create3(50 /* QuestionToken */, formatting.Shared.TokenRange.FromTokens([17 /* CloseParenToken */, 23 /* CommaToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); - // generics - this.NoSpaceBeforeOpenAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.TypeNames, 24 /* LessThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), 8 /* Delete */)); - this.NoSpaceBetweenCloseParenAndAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create1(17 /* CloseParenToken */, 24 /* LessThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), 8 /* Delete */)); - this.NoSpaceAfterOpenAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create3(24 /* LessThanToken */, formatting.Shared.TokenRange.TypeNames), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), 8 /* Delete */)); - this.NoSpaceBeforeCloseAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 25 /* GreaterThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), 8 /* Delete */)); - this.NoSpaceAfterCloseAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create3(25 /* GreaterThanToken */, formatting.Shared.TokenRange.FromTokens([16 /* OpenParenToken */, 18 /* OpenBracketToken */, 25 /* GreaterThanToken */, 23 /* CommaToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), 8 /* Delete */)); - // Remove spaces in empty interface literals. e.g.: x: {} - this.NoSpaceBetweenEmptyInterfaceBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(14 /* OpenBraceToken */, 15 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsObjectTypeContext), 8 /* Delete */)); - // decorators - this.SpaceBeforeAt = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 52 /* AtToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - this.NoSpaceAfterAt = new formatting.Rule(formatting.RuleDescriptor.create3(52 /* AtToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.SpaceAfterDecorator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([65 /* Identifier */, 78 /* ExportKeyword */, 73 /* DefaultKeyword */, 69 /* ClassKeyword */, 109 /* StaticKeyword */, 108 /* PublicKeyword */, 106 /* PrivateKeyword */, 107 /* ProtectedKeyword */, 116 /* GetKeyword */, 122 /* SetKeyword */, 18 /* OpenBracketToken */, 35 /* AsteriskToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsEndOfDecoratorContextOnSameLine), 2 /* Space */)); - this.NoSpaceBetweenFunctionKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(83 /* FunctionKeyword */, 35 /* AsteriskToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 8 /* Delete */)); - this.SpaceAfterStarInGeneratorDeclaration = new formatting.Rule(formatting.RuleDescriptor.create3(35 /* AsteriskToken */, formatting.Shared.TokenRange.FromTokens([65 /* Identifier */, 16 /* OpenParenToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 2 /* Space */)); - this.NoSpaceBetweenYieldKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(110 /* YieldKeyword */, 35 /* AsteriskToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsYieldOrYieldStarWithOperand), 8 /* Delete */)); - this.SpaceBetweenYieldOrYieldStarAndOperand = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([110 /* YieldKeyword */, 35 /* AsteriskToken */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsYieldOrYieldStarWithOperand), 2 /* Space */)); - // These rules are higher in priority than user-configurable rules. - this.HighPriorityCommonRules = - [ - this.IgnoreBeforeComment, this.IgnoreAfterLineComment, - this.NoSpaceBeforeColon, this.SpaceAfterColon, this.NoSpaceBeforeQuestionMark, this.SpaceAfterQuestionMarkInConditionalOperator, - this.NoSpaceAfterQuestionMark, - this.NoSpaceBeforeDot, this.NoSpaceAfterDot, - this.NoSpaceAfterUnaryPrefixOperator, - this.NoSpaceAfterUnaryPreincrementOperator, this.NoSpaceAfterUnaryPredecrementOperator, - this.NoSpaceBeforeUnaryPostincrementOperator, this.NoSpaceBeforeUnaryPostdecrementOperator, - this.SpaceAfterPostincrementWhenFollowedByAdd, - this.SpaceAfterAddWhenFollowedByUnaryPlus, this.SpaceAfterAddWhenFollowedByPreincrement, - this.SpaceAfterPostdecrementWhenFollowedBySubtract, - this.SpaceAfterSubtractWhenFollowedByUnaryMinus, this.SpaceAfterSubtractWhenFollowedByPredecrement, - this.NoSpaceAfterCloseBrace, - this.SpaceAfterOpenBrace, this.SpaceBeforeCloseBrace, this.NewLineBeforeCloseBraceInBlockContext, - this.SpaceAfterCloseBrace, this.SpaceBetweenCloseBraceAndElse, this.SpaceBetweenCloseBraceAndWhile, this.NoSpaceBetweenEmptyBraceBrackets, - this.NoSpaceBetweenFunctionKeywordAndStar, this.SpaceAfterStarInGeneratorDeclaration, - this.SpaceAfterFunctionInFuncDecl, this.NewLineAfterOpenBraceInBlockContext, this.SpaceAfterGetSetInMember, - this.NoSpaceBetweenYieldKeywordAndStar, this.SpaceBetweenYieldOrYieldStarAndOperand, - this.NoSpaceBetweenReturnAndSemicolon, - this.SpaceAfterCertainKeywords, - this.SpaceAfterLetConstInVariableDeclaration, - this.NoSpaceBeforeOpenParenInFuncCall, - this.SpaceBeforeBinaryKeywordOperator, this.SpaceAfterBinaryKeywordOperator, - this.SpaceAfterVoidOperator, - // TypeScript-specific rules - this.NoSpaceAfterConstructor, this.NoSpaceAfterModuleImport, - this.SpaceAfterCertainTypeScriptKeywords, this.SpaceBeforeCertainTypeScriptKeywords, - this.SpaceAfterModuleName, - this.SpaceAfterArrow, - this.NoSpaceAfterEllipsis, - this.NoSpaceAfterOptionalParameters, - this.NoSpaceBetweenEmptyInterfaceBraceBrackets, - this.NoSpaceBeforeOpenAngularBracket, - this.NoSpaceBetweenCloseParenAndAngularBracket, - this.NoSpaceAfterOpenAngularBracket, - this.NoSpaceBeforeCloseAngularBracket, - this.NoSpaceAfterCloseAngularBracket, - this.SpaceBeforeAt, - this.NoSpaceAfterAt, - this.SpaceAfterDecorator, - ]; - // These rules are lower in priority than user-configurable rules. - this.LowPriorityCommonRules = - [ - this.NoSpaceBeforeSemicolon, - this.SpaceBeforeOpenBraceInControl, this.SpaceBeforeOpenBraceInFunction, this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock, - this.NoSpaceBeforeComma, - this.NoSpaceBeforeOpenBracket, this.NoSpaceAfterOpenBracket, - this.NoSpaceBeforeCloseBracket, this.NoSpaceAfterCloseBracket, - this.SpaceAfterSemicolon, - this.NoSpaceBeforeOpenParenInFuncDecl, - this.SpaceBetweenStatements, this.SpaceAfterTryFinally - ]; - /// - /// Rules controlled by user options - /// - // Insert space after comma delimiter - this.SpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(23 /* CommaToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - this.NoSpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(23 /* CommaToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - // Insert space before and after binary operators - this.SpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.NoSpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 8 /* Delete */)); - this.NoSpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 8 /* Delete */)); - // Insert space after keywords in control flow statements - this.SpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 16 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 2 /* Space */)); - this.NoSpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 16 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 8 /* Delete */)); - // Open Brace braces after function - //TypeScript: Function can have return types, which can be made of tons of different token kinds - this.NewLineBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 14 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */); - // Open Brace braces after TypeScript module/class/interface - this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 14 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */); - // Open Brace braces after control block - this.NewLineBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 14 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */); - // Insert space after semicolon in for statement - this.SpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(22 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsForContext), 2 /* Space */)); - this.NoSpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(22 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsForContext), 8 /* Delete */)); - // Insert space after opening and before closing nonempty parenthesis - this.SpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(16 /* OpenParenToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - this.SpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - this.NoSpaceBetweenParens = new formatting.Rule(formatting.RuleDescriptor.create1(16 /* OpenParenToken */, 17 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(16 /* OpenParenToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - // Insert space after function keyword for anonymous functions - this.SpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(83 /* FunctionKeyword */, 16 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */)); - this.NoSpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(83 /* FunctionKeyword */, 16 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 8 /* Delete */)); - } - Rules.prototype.getRuleName = function (rule) { - var o = this; - for (var name_29 in o) { - if (o[name_29] === rule) { - return name_29; - } - } - throw new Error("Unknown rule"); - }; - /// - /// Contexts - /// - Rules.IsForContext = function (context) { - return context.contextNode.kind === 189 /* ForStatement */; - }; - Rules.IsNotForContext = function (context) { - return !Rules.IsForContext(context); - }; - Rules.IsBinaryOpContext = function (context) { - switch (context.contextNode.kind) { - case 172 /* BinaryExpression */: - case 173 /* ConditionalExpression */: - case 143 /* TypePredicate */: - return true; - // equals in binding elements: function foo([[x, y] = [1, 2]]) - case 155 /* BindingElement */: - // equals in type X = ... - case 206 /* TypeAliasDeclaration */: - // equal in import a = module('a'); - case 211 /* ImportEqualsDeclaration */: - // equal in let a = 0; - case 201 /* VariableDeclaration */: - // equal in p = 0; - case 131 /* Parameter */: - case 229 /* EnumMember */: - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - return context.currentTokenSpan.kind === 53 /* EqualsToken */ || context.nextTokenSpan.kind === 53 /* EqualsToken */; - // "in" keyword in for (let x in []) { } - case 190 /* ForInStatement */: - return context.currentTokenSpan.kind === 86 /* InKeyword */ || context.nextTokenSpan.kind === 86 /* InKeyword */; - // Technically, "of" is not a binary operator, but format it the same way as "in" - case 191 /* ForOfStatement */: - return context.currentTokenSpan.kind === 127 /* OfKeyword */ || context.nextTokenSpan.kind === 127 /* OfKeyword */; - } - return false; - }; - Rules.IsNotBinaryOpContext = function (context) { - return !Rules.IsBinaryOpContext(context); - }; - Rules.IsConditionalOperatorContext = function (context) { - return context.contextNode.kind === 173 /* ConditionalExpression */; - }; - Rules.IsSameLineTokenOrBeforeMultilineBlockContext = function (context) { - //// This check is mainly used inside SpaceBeforeOpenBraceInControl and SpaceBeforeOpenBraceInFunction. - //// - //// Ex: - //// if (1) { .... - //// * ) and { are on the same line so apply the rule. Here we don't care whether it's same or multi block context - //// - //// Ex: - //// if (1) - //// { ... } - //// * ) and { are on differnet lines. We only need to format if the block is multiline context. So in this case we don't format. - //// - //// Ex: - //// if (1) - //// { ... - //// } - //// * ) and { are on differnet lines. We only need to format if the block is multiline context. So in this case we format. - return context.TokensAreOnSameLine() || Rules.IsBeforeMultilineBlockContext(context); - }; - // This check is done before an open brace in a control construct, a function, or a typescript block declaration - Rules.IsBeforeMultilineBlockContext = function (context) { - return Rules.IsBeforeBlockContext(context) && !(context.NextNodeAllOnSameLine() || context.NextNodeBlockIsOnOneLine()); - }; - Rules.IsMultilineBlockContext = function (context) { - return Rules.IsBlockContext(context) && !(context.ContextNodeAllOnSameLine() || context.ContextNodeBlockIsOnOneLine()); - }; - Rules.IsSingleLineBlockContext = function (context) { - return Rules.IsBlockContext(context) && (context.ContextNodeAllOnSameLine() || context.ContextNodeBlockIsOnOneLine()); - }; - Rules.IsBlockContext = function (context) { - return Rules.NodeIsBlockContext(context.contextNode); - }; - Rules.IsBeforeBlockContext = function (context) { - return Rules.NodeIsBlockContext(context.nextTokenParent); - }; - // IMPORTANT!!! This method must return true ONLY for nodes with open and close braces as immediate children - Rules.NodeIsBlockContext = function (node) { - if (Rules.NodeIsTypeScriptDeclWithBlockContext(node)) { - // This means we are in a context that looks like a block to the user, but in the grammar is actually not a node (it's a class, module, enum, object type literal, etc). - return true; - } - switch (node.kind) { - case 182 /* Block */: - case 210 /* CaseBlock */: - case 157 /* ObjectLiteralExpression */: - case 209 /* ModuleBlock */: - return true; - } - return false; - }; - Rules.IsFunctionDeclContext = function (context) { - switch (context.contextNode.kind) { - case 203 /* FunctionDeclaration */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - //case SyntaxKind.MemberFunctionDeclaration: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - ///case SyntaxKind.MethodSignature: - case 140 /* CallSignature */: - case 165 /* FunctionExpression */: - case 137 /* Constructor */: - case 166 /* ArrowFunction */: - //case SyntaxKind.ConstructorDeclaration: - //case SyntaxKind.SimpleArrowFunctionExpression: - //case SyntaxKind.ParenthesizedArrowFunctionExpression: - case 205 /* InterfaceDeclaration */: - return true; - } - return false; - }; - Rules.IsFunctionDeclarationOrFunctionExpressionContext = function (context) { - return context.contextNode.kind === 203 /* FunctionDeclaration */ || context.contextNode.kind === 165 /* FunctionExpression */; - }; - Rules.IsTypeScriptDeclWithBlockContext = function (context) { - return Rules.NodeIsTypeScriptDeclWithBlockContext(context.contextNode); - }; - Rules.NodeIsTypeScriptDeclWithBlockContext = function (node) { - switch (node.kind) { - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - case 207 /* EnumDeclaration */: - case 148 /* TypeLiteral */: - case 208 /* ModuleDeclaration */: - return true; - } - return false; - }; - Rules.IsAfterCodeBlockContext = function (context) { - switch (context.currentTokenParent.kind) { - case 204 /* ClassDeclaration */: - case 208 /* ModuleDeclaration */: - case 207 /* EnumDeclaration */: - case 182 /* Block */: - case 226 /* CatchClause */: - case 209 /* ModuleBlock */: - case 196 /* SwitchStatement */: - return true; - } - return false; - }; - Rules.IsControlDeclContext = function (context) { - switch (context.contextNode.kind) { - case 186 /* IfStatement */: - case 196 /* SwitchStatement */: - case 189 /* ForStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - case 188 /* WhileStatement */: - case 199 /* TryStatement */: - case 187 /* DoStatement */: - case 195 /* WithStatement */: - // TODO - // case SyntaxKind.ElseClause: - case 226 /* CatchClause */: - return true; - default: - return false; - } - }; - Rules.IsObjectContext = function (context) { - return context.contextNode.kind === 157 /* ObjectLiteralExpression */; - }; - Rules.IsFunctionCallContext = function (context) { - return context.contextNode.kind === 160 /* CallExpression */; - }; - Rules.IsNewContext = function (context) { - return context.contextNode.kind === 161 /* NewExpression */; - }; - Rules.IsFunctionCallOrNewContext = function (context) { - return Rules.IsFunctionCallContext(context) || Rules.IsNewContext(context); - }; - Rules.IsPreviousTokenNotComma = function (context) { - return context.currentTokenSpan.kind !== 23 /* CommaToken */; - }; - Rules.IsSameLineTokenContext = function (context) { - return context.TokensAreOnSameLine(); - }; - Rules.IsNotBeforeBlockInFunctionDeclarationContext = function (context) { - return !Rules.IsFunctionDeclContext(context) && !Rules.IsBeforeBlockContext(context); - }; - Rules.IsEndOfDecoratorContextOnSameLine = function (context) { - return context.TokensAreOnSameLine() && - context.contextNode.decorators && - Rules.NodeIsInDecoratorContext(context.currentTokenParent) && - !Rules.NodeIsInDecoratorContext(context.nextTokenParent); - }; - Rules.NodeIsInDecoratorContext = function (node) { - while (ts.isExpression(node)) { - node = node.parent; - } - return node.kind === 132 /* Decorator */; - }; - Rules.IsStartOfVariableDeclarationList = function (context) { - return context.currentTokenParent.kind === 202 /* VariableDeclarationList */ && - context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; - }; - Rules.IsNotFormatOnEnter = function (context) { - return context.formattingRequestKind != 2 /* FormatOnEnter */; - }; - Rules.IsModuleDeclContext = function (context) { - return context.contextNode.kind === 208 /* ModuleDeclaration */; - }; - Rules.IsObjectTypeContext = function (context) { - return context.contextNode.kind === 148 /* TypeLiteral */; // && context.contextNode.parent.kind !== SyntaxKind.InterfaceDeclaration; - }; - Rules.IsTypeArgumentOrParameter = function (token, parent) { - if (token.kind !== 24 /* LessThanToken */ && token.kind !== 25 /* GreaterThanToken */) { - return false; - } - switch (parent.kind) { - case 144 /* TypeReference */: - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 140 /* CallSignature */: - case 141 /* ConstructSignature */: - case 160 /* CallExpression */: - case 161 /* NewExpression */: - return true; - default: - return false; - } - }; - Rules.IsTypeArgumentOrParameterContext = function (context) { - return Rules.IsTypeArgumentOrParameter(context.currentTokenSpan, context.currentTokenParent) || - Rules.IsTypeArgumentOrParameter(context.nextTokenSpan, context.nextTokenParent); - }; - Rules.IsVoidOpContext = function (context) { - return context.currentTokenSpan.kind === 99 /* VoidKeyword */ && context.currentTokenParent.kind === 169 /* VoidExpression */; - }; - Rules.IsYieldOrYieldStarWithOperand = function (context) { - return context.contextNode.kind === 175 /* YieldExpression */ && context.contextNode.expression !== undefined; - }; - return Rules; - })(); - formatting.Rules = Rules; - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - var RulesMap = (function () { - function RulesMap() { - this.map = []; - this.mapRowLength = 0; - } - RulesMap.create = function (rules) { - var result = new RulesMap(); - result.Initialize(rules); - return result; - }; - RulesMap.prototype.Initialize = function (rules) { - this.mapRowLength = 127 /* LastToken */ + 1; - this.map = new Array(this.mapRowLength * this.mapRowLength); //new Array(this.mapRowLength * this.mapRowLength); - // This array is used only during construction of the rulesbucket in the map - var rulesBucketConstructionStateList = new Array(this.map.length); //new Array(this.map.length); - this.FillRules(rules, rulesBucketConstructionStateList); - return this.map; - }; - RulesMap.prototype.FillRules = function (rules, rulesBucketConstructionStateList) { - var _this = this; - rules.forEach(function (rule) { - _this.FillRule(rule, rulesBucketConstructionStateList); - }); - }; - RulesMap.prototype.GetRuleBucketIndex = function (row, column) { - var rulesBucketIndex = (row * this.mapRowLength) + column; - //Debug.Assert(rulesBucketIndex < this.map.Length, "Trying to access an index outside the array."); - return rulesBucketIndex; - }; - RulesMap.prototype.FillRule = function (rule, rulesBucketConstructionStateList) { - var _this = this; - var specificRule = rule.Descriptor.LeftTokenRange != formatting.Shared.TokenRange.Any && - rule.Descriptor.RightTokenRange != formatting.Shared.TokenRange.Any; - rule.Descriptor.LeftTokenRange.GetTokens().forEach(function (left) { - rule.Descriptor.RightTokenRange.GetTokens().forEach(function (right) { - var rulesBucketIndex = _this.GetRuleBucketIndex(left, right); - var rulesBucket = _this.map[rulesBucketIndex]; - if (rulesBucket == undefined) { - rulesBucket = _this.map[rulesBucketIndex] = new RulesBucket(); - } - rulesBucket.AddRule(rule, specificRule, rulesBucketConstructionStateList, rulesBucketIndex); - }); - }); - }; - RulesMap.prototype.GetRule = function (context) { - var bucketIndex = this.GetRuleBucketIndex(context.currentTokenSpan.kind, context.nextTokenSpan.kind); - var bucket = this.map[bucketIndex]; - if (bucket != null) { - for (var _i = 0, _a = bucket.Rules(); _i < _a.length; _i++) { - var rule = _a[_i]; - if (rule.Operation.Context.InContext(context)) { - return rule; - } - } - } - return null; - }; - return RulesMap; - })(); - formatting.RulesMap = RulesMap; - var MaskBitSize = 5; - var Mask = 0x1f; - (function (RulesPosition) { - RulesPosition[RulesPosition["IgnoreRulesSpecific"] = 0] = "IgnoreRulesSpecific"; - RulesPosition[RulesPosition["IgnoreRulesAny"] = MaskBitSize * 1] = "IgnoreRulesAny"; - RulesPosition[RulesPosition["ContextRulesSpecific"] = MaskBitSize * 2] = "ContextRulesSpecific"; - RulesPosition[RulesPosition["ContextRulesAny"] = MaskBitSize * 3] = "ContextRulesAny"; - RulesPosition[RulesPosition["NoContextRulesSpecific"] = MaskBitSize * 4] = "NoContextRulesSpecific"; - RulesPosition[RulesPosition["NoContextRulesAny"] = MaskBitSize * 5] = "NoContextRulesAny"; - })(formatting.RulesPosition || (formatting.RulesPosition = {})); - var RulesPosition = formatting.RulesPosition; - var RulesBucketConstructionState = (function () { - function RulesBucketConstructionState() { - //// The Rules list contains all the inserted rules into a rulebucket in the following order: - //// 1- Ignore rules with specific token combination - //// 2- Ignore rules with any token combination - //// 3- Context rules with specific token combination - //// 4- Context rules with any token combination - //// 5- Non-context rules with specific token combination - //// 6- Non-context rules with any token combination - //// - //// The member rulesInsertionIndexBitmap is used to describe the number of rules - //// in each sub-bucket (above) hence can be used to know the index of where to insert - //// the next rule. It's a bitmap which contains 6 different sections each is given 5 bits. - //// - //// Example: - //// In order to insert a rule to the end of sub-bucket (3), we get the index by adding - //// the values in the bitmap segments 3rd, 2nd, and 1st. - this.rulesInsertionIndexBitmap = 0; - } - RulesBucketConstructionState.prototype.GetInsertionIndex = function (maskPosition) { - var index = 0; - var pos = 0; - var indexBitmap = this.rulesInsertionIndexBitmap; - while (pos <= maskPosition) { - index += (indexBitmap & Mask); - indexBitmap >>= MaskBitSize; - pos += MaskBitSize; - } - return index; - }; - RulesBucketConstructionState.prototype.IncreaseInsertionIndex = function (maskPosition) { - var value = (this.rulesInsertionIndexBitmap >> maskPosition) & Mask; - value++; - ts.Debug.assert((value & Mask) == value, "Adding more rules into the sub-bucket than allowed. Maximum allowed is 32 rules."); - var temp = this.rulesInsertionIndexBitmap & ~(Mask << maskPosition); - temp |= value << maskPosition; - this.rulesInsertionIndexBitmap = temp; - }; - return RulesBucketConstructionState; - })(); - formatting.RulesBucketConstructionState = RulesBucketConstructionState; - var RulesBucket = (function () { - function RulesBucket() { - this.rules = []; - } - RulesBucket.prototype.Rules = function () { - return this.rules; - }; - RulesBucket.prototype.AddRule = function (rule, specificTokens, constructionState, rulesBucketIndex) { - var position; - if (rule.Operation.Action == 1 /* Ignore */) { - position = specificTokens ? - RulesPosition.IgnoreRulesSpecific : - RulesPosition.IgnoreRulesAny; - } - else if (!rule.Operation.Context.IsAny()) { - position = specificTokens ? - RulesPosition.ContextRulesSpecific : - RulesPosition.ContextRulesAny; - } - else { - position = specificTokens ? - RulesPosition.NoContextRulesSpecific : - RulesPosition.NoContextRulesAny; - } - var state = constructionState[rulesBucketIndex]; - if (state === undefined) { - state = constructionState[rulesBucketIndex] = new RulesBucketConstructionState(); - } - var index = state.GetInsertionIndex(position); - this.rules.splice(index, 0, rule); - state.IncreaseInsertionIndex(position); - }; - return RulesBucket; - })(); - formatting.RulesBucket = RulesBucket; - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - var Shared; - (function (Shared) { - var TokenRangeAccess = (function () { - function TokenRangeAccess(from, to, except) { - this.tokens = []; - for (var token = from; token <= to; token++) { - if (except.indexOf(token) < 0) { - this.tokens.push(token); - } - } - } - TokenRangeAccess.prototype.GetTokens = function () { - return this.tokens; - }; - TokenRangeAccess.prototype.Contains = function (token) { - return this.tokens.indexOf(token) >= 0; - }; - return TokenRangeAccess; - })(); - Shared.TokenRangeAccess = TokenRangeAccess; - var TokenValuesAccess = (function () { - function TokenValuesAccess(tks) { - this.tokens = tks && tks.length ? tks : []; - } - TokenValuesAccess.prototype.GetTokens = function () { - return this.tokens; - }; - TokenValuesAccess.prototype.Contains = function (token) { - return this.tokens.indexOf(token) >= 0; - }; - return TokenValuesAccess; - })(); - Shared.TokenValuesAccess = TokenValuesAccess; - var TokenSingleValueAccess = (function () { - function TokenSingleValueAccess(token) { - this.token = token; - } - TokenSingleValueAccess.prototype.GetTokens = function () { - return [this.token]; - }; - TokenSingleValueAccess.prototype.Contains = function (tokenValue) { - return tokenValue == this.token; - }; - return TokenSingleValueAccess; - })(); - Shared.TokenSingleValueAccess = TokenSingleValueAccess; - var TokenAllAccess = (function () { - function TokenAllAccess() { - } - TokenAllAccess.prototype.GetTokens = function () { - var result = []; - for (var token = 0 /* FirstToken */; token <= 127 /* LastToken */; token++) { - result.push(token); - } - return result; - }; - TokenAllAccess.prototype.Contains = function (tokenValue) { - return true; - }; - TokenAllAccess.prototype.toString = function () { - return "[allTokens]"; - }; - return TokenAllAccess; - })(); - Shared.TokenAllAccess = TokenAllAccess; - var TokenRange = (function () { - function TokenRange(tokenAccess) { - this.tokenAccess = tokenAccess; - } - TokenRange.FromToken = function (token) { - return new TokenRange(new TokenSingleValueAccess(token)); - }; - TokenRange.FromTokens = function (tokens) { - return new TokenRange(new TokenValuesAccess(tokens)); - }; - TokenRange.FromRange = function (f, to, except) { - if (except === void 0) { except = []; } - return new TokenRange(new TokenRangeAccess(f, to, except)); - }; - TokenRange.AllTokens = function () { - return new TokenRange(new TokenAllAccess()); - }; - TokenRange.prototype.GetTokens = function () { - return this.tokenAccess.GetTokens(); - }; - TokenRange.prototype.Contains = function (token) { - return this.tokenAccess.Contains(token); - }; - TokenRange.prototype.toString = function () { - return this.tokenAccess.toString(); - }; - TokenRange.Any = TokenRange.AllTokens(); - TokenRange.AnyIncludingMultilineComments = TokenRange.FromTokens(TokenRange.Any.GetTokens().concat([3 /* MultiLineCommentTrivia */])); - TokenRange.Keywords = TokenRange.FromRange(66 /* FirstKeyword */, 127 /* LastKeyword */); - TokenRange.BinaryOperators = TokenRange.FromRange(24 /* FirstBinaryOperator */, 64 /* LastBinaryOperator */); - TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([86 /* InKeyword */, 87 /* InstanceOfKeyword */, 127 /* OfKeyword */, 117 /* IsKeyword */]); - TokenRange.UnaryPrefixOperators = TokenRange.FromTokens([38 /* PlusPlusToken */, 39 /* MinusMinusToken */, 47 /* TildeToken */, 46 /* ExclamationToken */]); - TokenRange.UnaryPrefixExpressions = TokenRange.FromTokens([7 /* NumericLiteral */, 65 /* Identifier */, 16 /* OpenParenToken */, 18 /* OpenBracketToken */, 14 /* OpenBraceToken */, 93 /* ThisKeyword */, 88 /* NewKeyword */]); - TokenRange.UnaryPreincrementExpressions = TokenRange.FromTokens([65 /* Identifier */, 16 /* OpenParenToken */, 93 /* ThisKeyword */, 88 /* NewKeyword */]); - TokenRange.UnaryPostincrementExpressions = TokenRange.FromTokens([65 /* Identifier */, 17 /* CloseParenToken */, 19 /* CloseBracketToken */, 88 /* NewKeyword */]); - TokenRange.UnaryPredecrementExpressions = TokenRange.FromTokens([65 /* Identifier */, 16 /* OpenParenToken */, 93 /* ThisKeyword */, 88 /* NewKeyword */]); - TokenRange.UnaryPostdecrementExpressions = TokenRange.FromTokens([65 /* Identifier */, 17 /* CloseParenToken */, 19 /* CloseBracketToken */, 88 /* NewKeyword */]); - TokenRange.Comments = TokenRange.FromTokens([2 /* SingleLineCommentTrivia */, 3 /* MultiLineCommentTrivia */]); - TokenRange.TypeNames = TokenRange.FromTokens([65 /* Identifier */, 121 /* NumberKeyword */, 123 /* StringKeyword */, 113 /* BooleanKeyword */, 124 /* SymbolKeyword */, 99 /* VoidKeyword */, 112 /* AnyKeyword */]); - return TokenRange; - })(); - Shared.TokenRange = TokenRange; - })(Shared = formatting.Shared || (formatting.Shared = {})); - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - var RulesProvider = (function () { - function RulesProvider() { - this.globalRules = new formatting.Rules(); - } - RulesProvider.prototype.getRuleName = function (rule) { - return this.globalRules.getRuleName(rule); - }; - RulesProvider.prototype.getRuleByName = function (name) { - return this.globalRules[name]; - }; - RulesProvider.prototype.getRulesMap = function () { - return this.rulesMap; - }; - RulesProvider.prototype.ensureUpToDate = function (options) { - if (this.options == null || !ts.compareDataObjects(this.options, options)) { - var activeRules = this.createActiveRules(options); - var rulesMap = formatting.RulesMap.create(activeRules); - this.activeRules = activeRules; - this.rulesMap = rulesMap; - this.options = ts.clone(options); - } - }; - RulesProvider.prototype.createActiveRules = function (options) { - var rules = this.globalRules.HighPriorityCommonRules.slice(0); - if (options.InsertSpaceAfterCommaDelimiter) { - rules.push(this.globalRules.SpaceAfterComma); - } - else { - rules.push(this.globalRules.NoSpaceAfterComma); - } - if (options.InsertSpaceAfterFunctionKeywordForAnonymousFunctions) { - rules.push(this.globalRules.SpaceAfterAnonymousFunctionKeyword); - } - else { - rules.push(this.globalRules.NoSpaceAfterAnonymousFunctionKeyword); - } - if (options.InsertSpaceAfterKeywordsInControlFlowStatements) { - rules.push(this.globalRules.SpaceAfterKeywordInControl); - } - else { - rules.push(this.globalRules.NoSpaceAfterKeywordInControl); - } - if (options.InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis) { - rules.push(this.globalRules.SpaceAfterOpenParen); - rules.push(this.globalRules.SpaceBeforeCloseParen); - rules.push(this.globalRules.NoSpaceBetweenParens); - } - else { - rules.push(this.globalRules.NoSpaceAfterOpenParen); - rules.push(this.globalRules.NoSpaceBeforeCloseParen); - rules.push(this.globalRules.NoSpaceBetweenParens); - } - if (options.InsertSpaceAfterSemicolonInForStatements) { - rules.push(this.globalRules.SpaceAfterSemicolonInFor); - } - else { - rules.push(this.globalRules.NoSpaceAfterSemicolonInFor); - } - if (options.InsertSpaceBeforeAndAfterBinaryOperators) { - rules.push(this.globalRules.SpaceBeforeBinaryOperator); - rules.push(this.globalRules.SpaceAfterBinaryOperator); - } - else { - rules.push(this.globalRules.NoSpaceBeforeBinaryOperator); - rules.push(this.globalRules.NoSpaceAfterBinaryOperator); - } - if (options.PlaceOpenBraceOnNewLineForControlBlocks) { - rules.push(this.globalRules.NewLineBeforeOpenBraceInControl); - } - if (options.PlaceOpenBraceOnNewLineForFunctions) { - rules.push(this.globalRules.NewLineBeforeOpenBraceInFunction); - rules.push(this.globalRules.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock); - } - rules = rules.concat(this.globalRules.LowPriorityCommonRules); - return rules; - }; - return RulesProvider; - })(); - formatting.RulesProvider = RulesProvider; - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -/// -/// -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - var Constants; - (function (Constants) { - Constants[Constants["Unknown"] = -1] = "Unknown"; - })(Constants || (Constants = {})); - function formatOnEnter(position, sourceFile, rulesProvider, options) { - var line = sourceFile.getLineAndCharacterOfPosition(position).line; - if (line === 0) { - return []; - } - // get the span for the previous\current line - var span = { - // get start position for the previous line - pos: ts.getStartPositionOfLine(line - 1, sourceFile), - // get end position for the current line (end value is exclusive so add 1 to the result) - end: ts.getEndLinePosition(line, sourceFile) + 1 - }; - return formatSpan(span, sourceFile, options, rulesProvider, 2 /* FormatOnEnter */); - } - formatting.formatOnEnter = formatOnEnter; - function formatOnSemicolon(position, sourceFile, rulesProvider, options) { - return formatOutermostParent(position, 22 /* SemicolonToken */, sourceFile, options, rulesProvider, 3 /* FormatOnSemicolon */); - } - formatting.formatOnSemicolon = formatOnSemicolon; - function formatOnClosingCurly(position, sourceFile, rulesProvider, options) { - return formatOutermostParent(position, 15 /* CloseBraceToken */, sourceFile, options, rulesProvider, 4 /* FormatOnClosingCurlyBrace */); - } - formatting.formatOnClosingCurly = formatOnClosingCurly; - function formatDocument(sourceFile, rulesProvider, options) { - var span = { - pos: 0, - end: sourceFile.text.length - }; - return formatSpan(span, sourceFile, options, rulesProvider, 0 /* FormatDocument */); - } - formatting.formatDocument = formatDocument; - function formatSelection(start, end, sourceFile, rulesProvider, options) { - // format from the beginning of the line - var span = { - pos: ts.getLineStartPositionForPosition(start, sourceFile), - end: end - }; - return formatSpan(span, sourceFile, options, rulesProvider, 1 /* FormatSelection */); - } - formatting.formatSelection = formatSelection; - function formatOutermostParent(position, expectedLastToken, sourceFile, options, rulesProvider, requestKind) { - var parent = findOutermostParent(position, expectedLastToken, sourceFile); - if (!parent) { - return []; - } - var span = { - pos: ts.getLineStartPositionForPosition(parent.getStart(sourceFile), sourceFile), - end: parent.end - }; - return formatSpan(span, sourceFile, options, rulesProvider, requestKind); - } - function findOutermostParent(position, expectedTokenKind, sourceFile) { - var precedingToken = ts.findPrecedingToken(position, sourceFile); - // when it is claimed that trigger character was typed at given position - // we verify that there is a token with a matching kind whose end is equal to position (because the character was just typed). - // If this condition is not hold - then trigger character was typed in some other context, - // i.e.in comment and thus should not trigger autoformatting - if (!precedingToken || - precedingToken.kind !== expectedTokenKind || - position !== precedingToken.getEnd()) { - return undefined; - } - // walk up and search for the parent node that ends at the same position with precedingToken. - // for cases like this - // - // let x = 1; - // while (true) { - // } - // after typing close curly in while statement we want to reformat just the while statement. - // However if we just walk upwards searching for the parent that has the same end value - - // we'll end up with the whole source file. isListElement allows to stop on the list element level - var current = precedingToken; - while (current && - current.parent && - current.parent.end === precedingToken.end && - !isListElement(current.parent, current)) { - current = current.parent; - } - return current; - } - // Returns true if node is a element in some list in parent - // i.e. parent is class declaration with the list of members and node is one of members. - function isListElement(parent, node) { - switch (parent.kind) { - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - return ts.rangeContainsRange(parent.members, node); - case 208 /* ModuleDeclaration */: - var body = parent.body; - return body && body.kind === 182 /* Block */ && ts.rangeContainsRange(body.statements, node); - case 230 /* SourceFile */: - case 182 /* Block */: - case 209 /* ModuleBlock */: - return ts.rangeContainsRange(parent.statements, node); - case 226 /* CatchClause */: - return ts.rangeContainsRange(parent.block.statements, node); - } - return false; - } - /** find node that fully contains given text range */ - function findEnclosingNode(range, sourceFile) { - return find(sourceFile); - function find(n) { - var candidate = ts.forEachChild(n, function (c) { return ts.startEndContainsRange(c.getStart(sourceFile), c.end, range) && c; }); - if (candidate) { - var result = find(candidate); - if (result) { - return result; - } - } - return n; - } - } - /** formatting is not applied to ranges that contain parse errors. - * This function will return a predicate that for a given text range will tell - * if there are any parse errors that overlap with the range. - */ - function prepareRangeContainsErrorFunction(errors, originalRange) { - if (!errors.length) { - return rangeHasNoErrors; - } - // pick only errors that fall in range - var sorted = errors - .filter(function (d) { return ts.rangeOverlapsWithStartEnd(originalRange, d.start, d.start + d.length); }) - .sort(function (e1, e2) { return e1.start - e2.start; }); - if (!sorted.length) { - return rangeHasNoErrors; - } - var index = 0; - return function (r) { - // in current implementation sequence of arguments [r1, r2...] is monotonically increasing. - // 'index' tracks the index of the most recent error that was checked. - while (true) { - if (index >= sorted.length) { - // all errors in the range were already checked -> no error in specified range - return false; - } - var error = sorted[index]; - if (r.end <= error.start) { - // specified range ends before the error refered by 'index' - no error in range - return false; - } - if (ts.startEndOverlapsWithStartEnd(r.pos, r.end, error.start, error.start + error.length)) { - // specified range overlaps with error range - return true; - } - index++; - } - }; - function rangeHasNoErrors(r) { - return false; - } - } - /** - * Start of the original range might fall inside the comment - scanner will not yield appropriate results - * This function will look for token that is located before the start of target range - * and return its end as start position for the scanner. - */ - function getScanStartPosition(enclosingNode, originalRange, sourceFile) { - var start = enclosingNode.getStart(sourceFile); - if (start === originalRange.pos && enclosingNode.end === originalRange.end) { - return start; - } - var precedingToken = ts.findPrecedingToken(originalRange.pos, sourceFile); - if (!precedingToken) { - // no preceding token found - start from the beginning of enclosing node - return enclosingNode.pos; - } - // preceding token ends after the start of original range (i.e when originaRange.pos falls in the middle of literal) - // start from the beginning of enclosingNode to handle the entire 'originalRange' - if (precedingToken.end >= originalRange.pos) { - return enclosingNode.pos; - } - return precedingToken.end; - } - /* - * For cases like - * if (a || - * b ||$ - * c) {...} - * If we hit Enter at $ we want line ' b ||' to be indented. - * Formatting will be applied to the last two lines. - * Node that fully encloses these lines is binary expression 'a ||...'. - * Initial indentation for this node will be 0. - * Binary expressions don't introduce new indentation scopes, however it is possible - * that some parent node on the same line does - like if statement in this case. - * Note that we are considering parents only from the same line with initial node - - * if parent is on the different line - its delta was already contributed - * to the initial indentation. - */ - function getOwnOrInheritedDelta(n, options, sourceFile) { - var previousLine = -1 /* Unknown */; - var childKind = 0 /* Unknown */; - while (n) { - var line = sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile)).line; - if (previousLine !== -1 /* Unknown */ && line !== previousLine) { - break; - } - if (formatting.SmartIndenter.shouldIndentChildNode(n.kind, childKind)) { - return options.IndentSize; - } - previousLine = line; - childKind = n.kind; - n = n.parent; - } - return 0; - } - function formatSpan(originalRange, sourceFile, options, rulesProvider, requestKind) { - var rangeContainsError = prepareRangeContainsErrorFunction(sourceFile.parseDiagnostics, originalRange); - // formatting context is used by rules provider - var formattingContext = new formatting.FormattingContext(sourceFile, requestKind); - // find the smallest node that fully wraps the range and compute the initial indentation for the node - var enclosingNode = findEnclosingNode(originalRange, sourceFile); - var formattingScanner = formatting.getFormattingScanner(sourceFile, getScanStartPosition(enclosingNode, originalRange, sourceFile), originalRange.end); - var initialIndentation = formatting.SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, options); - var previousRangeHasError; - var previousRange; - var previousParent; - var previousRangeStartLine; - var lastIndentedLine; - var indentationOnLastIndentedLine; - var edits = []; - formattingScanner.advance(); - if (formattingScanner.isOnToken()) { - var startLine = sourceFile.getLineAndCharacterOfPosition(enclosingNode.getStart(sourceFile)).line; - var undecoratedStartLine = startLine; - if (enclosingNode.decorators) { - undecoratedStartLine = sourceFile.getLineAndCharacterOfPosition(ts.getNonDecoratorTokenPosOfNode(enclosingNode, sourceFile)).line; - } - var delta = getOwnOrInheritedDelta(enclosingNode, options, sourceFile); - processNode(enclosingNode, enclosingNode, startLine, undecoratedStartLine, initialIndentation, delta); - } - formattingScanner.close(); - return edits; - // local functions - /** Tries to compute the indentation for a list element. - * If list element is not in range then - * function will pick its actual indentation - * so it can be pushed downstream as inherited indentation. - * If list element is in the range - its indentation will be equal - * to inherited indentation from its predecessors. - */ - function tryComputeIndentationForListItem(startPos, endPos, parentStartLine, range, inheritedIndentation) { - if (ts.rangeOverlapsWithStartEnd(range, startPos, endPos)) { - if (inheritedIndentation !== -1 /* Unknown */) { - return inheritedIndentation; - } - } - else { - var startLine = sourceFile.getLineAndCharacterOfPosition(startPos).line; - var startLinePosition = ts.getLineStartPositionForPosition(startPos, sourceFile); - var column = formatting.SmartIndenter.findFirstNonWhitespaceColumn(startLinePosition, startPos, sourceFile, options); - if (startLine !== parentStartLine || startPos === column) { - return column; - } - } - return -1 /* Unknown */; - } - function computeIndentation(node, startLine, inheritedIndentation, parent, parentDynamicIndentation, effectiveParentStartLine) { - var indentation = inheritedIndentation; - if (indentation === -1 /* Unknown */) { - if (isSomeBlock(node.kind)) { - // blocks should be indented in - // - other blocks - // - source file - // - switch\default clauses - if (isSomeBlock(parent.kind) || - parent.kind === 230 /* SourceFile */ || - parent.kind === 223 /* CaseClause */ || - parent.kind === 224 /* DefaultClause */) { - indentation = parentDynamicIndentation.getIndentation() + parentDynamicIndentation.getDelta(); - } - else { - indentation = parentDynamicIndentation.getIndentation(); - } - } - else { - if (formatting.SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(parent, node, startLine, sourceFile)) { - indentation = parentDynamicIndentation.getIndentation(); - } - else { - indentation = parentDynamicIndentation.getIndentation() + parentDynamicIndentation.getDelta(); - } - } - } - var delta = formatting.SmartIndenter.shouldIndentChildNode(node.kind, 0 /* Unknown */) ? options.IndentSize : 0; - if (effectiveParentStartLine === startLine) { - // if node is located on the same line with the parent - // - inherit indentation from the parent - // - push children if either parent of node itself has non-zero delta - indentation = startLine === lastIndentedLine - ? indentationOnLastIndentedLine - : parentDynamicIndentation.getIndentation(); - delta = Math.min(options.IndentSize, parentDynamicIndentation.getDelta() + delta); - } - return { - indentation: indentation, - delta: delta - }; - } - function getFirstNonDecoratorTokenOfNode(node) { - if (node.modifiers && node.modifiers.length) { - return node.modifiers[0].kind; - } - switch (node.kind) { - case 204 /* ClassDeclaration */: return 69 /* ClassKeyword */; - case 205 /* InterfaceDeclaration */: return 103 /* InterfaceKeyword */; - case 203 /* FunctionDeclaration */: return 83 /* FunctionKeyword */; - case 207 /* EnumDeclaration */: return 207 /* EnumDeclaration */; - case 138 /* GetAccessor */: return 116 /* GetKeyword */; - case 139 /* SetAccessor */: return 122 /* SetKeyword */; - case 136 /* MethodDeclaration */: - if (node.asteriskToken) { - return 35 /* AsteriskToken */; - } - // fall-through - case 134 /* PropertyDeclaration */: - case 131 /* Parameter */: - return node.name.kind; - } - } - function getDynamicIndentation(node, nodeStartLine, indentation, delta) { - return { - getIndentationForComment: function (kind) { - switch (kind) { - // preceding comment to the token that closes the indentation scope inherits the indentation from the scope - // .. { - // // comment - // } - case 15 /* CloseBraceToken */: - case 19 /* CloseBracketToken */: - return indentation + delta; - } - return indentation; - }, - getIndentationForToken: function (line, kind) { - if (nodeStartLine !== line && node.decorators) { - if (kind === getFirstNonDecoratorTokenOfNode(node)) { - // if this token is the first token following the list of decorators, we do not need to indent - return indentation; - } - } - switch (kind) { - // open and close brace, 'else' and 'while' (in do statement) tokens has indentation of the parent - case 14 /* OpenBraceToken */: - case 15 /* CloseBraceToken */: - case 18 /* OpenBracketToken */: - case 19 /* CloseBracketToken */: - case 76 /* ElseKeyword */: - case 100 /* WhileKeyword */: - case 52 /* AtToken */: - return indentation; - default: - // if token line equals to the line of containing node (this is a first token in the node) - use node indentation - return nodeStartLine !== line ? indentation + delta : indentation; - } - }, - getIndentation: function () { return indentation; }, - getDelta: function () { return delta; }, - recomputeIndentation: function (lineAdded) { - if (node.parent && formatting.SmartIndenter.shouldIndentChildNode(node.parent.kind, node.kind)) { - if (lineAdded) { - indentation += options.IndentSize; - } - else { - indentation -= options.IndentSize; - } - if (formatting.SmartIndenter.shouldIndentChildNode(node.kind, 0 /* Unknown */)) { - delta = options.IndentSize; - } - else { - delta = 0; - } - } - } - }; - } - function processNode(node, contextNode, nodeStartLine, undecoratedNodeStartLine, indentation, delta) { - if (!ts.rangeOverlapsWithStartEnd(originalRange, node.getStart(sourceFile), node.getEnd())) { - return; - } - var nodeDynamicIndentation = getDynamicIndentation(node, nodeStartLine, indentation, delta); - // a useful observations when tracking context node - // / - // [a] - // / | \ - // [b] [c] [d] - // node 'a' is a context node for nodes 'b', 'c', 'd' - // except for the leftmost leaf token in [b] - in this case context node ('e') is located somewhere above 'a' - // this rule can be applied recursively to child nodes of 'a'. - // - // context node is set to parent node value after processing every child node - // context node is set to parent of the token after processing every token - var childContextNode = contextNode; - // if there are any tokens that logically belong to node and interleave child nodes - // such tokens will be consumed in processChildNode for for the child that follows them - ts.forEachChild(node, function (child) { - processChildNode(child, -1 /* Unknown */, node, nodeDynamicIndentation, nodeStartLine, undecoratedNodeStartLine, false); - }, function (nodes) { - processChildNodes(nodes, node, nodeStartLine, nodeDynamicIndentation); - }); - // proceed any tokens in the node that are located after child nodes - while (formattingScanner.isOnToken()) { - var tokenInfo = formattingScanner.readTokenInfo(node); - if (tokenInfo.token.end > node.end) { - break; - } - consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation); - } - function processChildNode(child, inheritedIndentation, parent, parentDynamicIndentation, parentStartLine, undecoratedParentStartLine, isListItem) { - var childStartPos = child.getStart(sourceFile); - var childStartLine = sourceFile.getLineAndCharacterOfPosition(childStartPos).line; - var undecoratedChildStartLine = childStartLine; - if (child.decorators) { - undecoratedChildStartLine = sourceFile.getLineAndCharacterOfPosition(ts.getNonDecoratorTokenPosOfNode(child, sourceFile)).line; - } - // if child is a list item - try to get its indentation - var childIndentationAmount = -1 /* Unknown */; - if (isListItem) { - childIndentationAmount = tryComputeIndentationForListItem(childStartPos, child.end, parentStartLine, originalRange, inheritedIndentation); - if (childIndentationAmount !== -1 /* Unknown */) { - inheritedIndentation = childIndentationAmount; - } - } - // child node is outside the target range - do not dive inside - if (!ts.rangeOverlapsWithStartEnd(originalRange, child.pos, child.end)) { - return inheritedIndentation; - } - if (child.getFullWidth() === 0) { - return inheritedIndentation; - } - while (formattingScanner.isOnToken()) { - // proceed any parent tokens that are located prior to child.getStart() - var tokenInfo = formattingScanner.readTokenInfo(node); - if (tokenInfo.token.end > childStartPos) { - // stop when formatting scanner advances past the beginning of the child - break; - } - consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation); - } - if (!formattingScanner.isOnToken()) { - return inheritedIndentation; - } - if (ts.isToken(child)) { - // if child node is a token, it does not impact indentation, proceed it using parent indentation scope rules - var tokenInfo = formattingScanner.readTokenInfo(child); - ts.Debug.assert(tokenInfo.token.end === child.end); - consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation); - return inheritedIndentation; - } - var effectiveParentStartLine = child.kind === 132 /* Decorator */ ? childStartLine : undecoratedParentStartLine; - var childIndentation = computeIndentation(child, childStartLine, childIndentationAmount, node, parentDynamicIndentation, effectiveParentStartLine); - processNode(child, childContextNode, childStartLine, undecoratedChildStartLine, childIndentation.indentation, childIndentation.delta); - childContextNode = node; - return inheritedIndentation; - } - function processChildNodes(nodes, parent, parentStartLine, parentDynamicIndentation) { - var listStartToken = getOpenTokenForList(parent, nodes); - var listEndToken = getCloseTokenForOpenToken(listStartToken); - var listDynamicIndentation = parentDynamicIndentation; - var startLine = parentStartLine; - if (listStartToken !== 0 /* Unknown */) { - // introduce a new indentation scope for lists (including list start and end tokens) - while (formattingScanner.isOnToken()) { - var tokenInfo = formattingScanner.readTokenInfo(parent); - if (tokenInfo.token.end > nodes.pos) { - // stop when formatting scanner moves past the beginning of node list - break; - } - else if (tokenInfo.token.kind === listStartToken) { - // consume list start token - startLine = sourceFile.getLineAndCharacterOfPosition(tokenInfo.token.pos).line; - var indentation_1 = computeIndentation(tokenInfo.token, startLine, -1 /* Unknown */, parent, parentDynamicIndentation, startLine); - listDynamicIndentation = getDynamicIndentation(parent, parentStartLine, indentation_1.indentation, indentation_1.delta); - consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation); - } - else { - // consume any tokens that precede the list as child elements of 'node' using its indentation scope - consumeTokenAndAdvanceScanner(tokenInfo, parent, parentDynamicIndentation); - } - } - } - var inheritedIndentation = -1 /* Unknown */; - for (var _i = 0; _i < nodes.length; _i++) { - var child = nodes[_i]; - inheritedIndentation = processChildNode(child, inheritedIndentation, node, listDynamicIndentation, startLine, startLine, true); - } - if (listEndToken !== 0 /* Unknown */) { - if (formattingScanner.isOnToken()) { - var tokenInfo = formattingScanner.readTokenInfo(parent); - // consume the list end token only if it is still belong to the parent - // there might be the case when current token matches end token but does not considered as one - // function (x: function) <-- - // without this check close paren will be interpreted as list end token for function expression which is wrong - if (tokenInfo.token.kind === listEndToken && ts.rangeContainsRange(parent, tokenInfo.token)) { - // consume list end token - consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation); - } - } - } - } - function consumeTokenAndAdvanceScanner(currentTokenInfo, parent, dynamicIndentation) { - ts.Debug.assert(ts.rangeContainsRange(parent, currentTokenInfo.token)); - var lastTriviaWasNewLine = formattingScanner.lastTrailingTriviaWasNewLine(); - var indentToken = false; - if (currentTokenInfo.leadingTrivia) { - processTrivia(currentTokenInfo.leadingTrivia, parent, childContextNode, dynamicIndentation); - } - var lineAdded; - var isTokenInRange = ts.rangeContainsRange(originalRange, currentTokenInfo.token); - var tokenStart = sourceFile.getLineAndCharacterOfPosition(currentTokenInfo.token.pos); - if (isTokenInRange) { - var rangeHasError = rangeContainsError(currentTokenInfo.token); - // save prevStartLine since processRange will overwrite this value with current ones - var prevStartLine = previousRangeStartLine; - lineAdded = processRange(currentTokenInfo.token, tokenStart, parent, childContextNode, dynamicIndentation); - if (rangeHasError) { - // do not indent comments\token if token range overlaps with some error - indentToken = false; - } - else { - if (lineAdded !== undefined) { - indentToken = lineAdded; - } - else { - indentToken = lastTriviaWasNewLine && tokenStart.line !== prevStartLine; - } - } - } - if (currentTokenInfo.trailingTrivia) { - processTrivia(currentTokenInfo.trailingTrivia, parent, childContextNode, dynamicIndentation); - } - if (indentToken) { - var indentNextTokenOrTrivia = true; - if (currentTokenInfo.leadingTrivia) { - for (var _i = 0, _a = currentTokenInfo.leadingTrivia; _i < _a.length; _i++) { - var triviaItem = _a[_i]; - if (!ts.rangeContainsRange(originalRange, triviaItem)) { - continue; - } - switch (triviaItem.kind) { - case 3 /* MultiLineCommentTrivia */: - var commentIndentation = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind); - indentMultilineComment(triviaItem, commentIndentation, !indentNextTokenOrTrivia); - indentNextTokenOrTrivia = false; - break; - case 2 /* SingleLineCommentTrivia */: - if (indentNextTokenOrTrivia) { - var commentIndentation_1 = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind); - insertIndentation(triviaItem.pos, commentIndentation_1, false); - indentNextTokenOrTrivia = false; - } - break; - case 4 /* NewLineTrivia */: - indentNextTokenOrTrivia = true; - break; - } - } - } - // indent token only if is it is in target range and does not overlap with any error ranges - if (isTokenInRange && !rangeContainsError(currentTokenInfo.token)) { - var tokenIndentation = dynamicIndentation.getIndentationForToken(tokenStart.line, currentTokenInfo.token.kind); - insertIndentation(currentTokenInfo.token.pos, tokenIndentation, lineAdded); - lastIndentedLine = tokenStart.line; - indentationOnLastIndentedLine = tokenIndentation; - } - } - formattingScanner.advance(); - childContextNode = parent; - } - } - function processTrivia(trivia, parent, contextNode, dynamicIndentation) { - for (var _i = 0; _i < trivia.length; _i++) { - var triviaItem = trivia[_i]; - if (ts.isComment(triviaItem.kind) && ts.rangeContainsRange(originalRange, triviaItem)) { - var triviaItemStart = sourceFile.getLineAndCharacterOfPosition(triviaItem.pos); - processRange(triviaItem, triviaItemStart, parent, contextNode, dynamicIndentation); - } - } - } - function processRange(range, rangeStart, parent, contextNode, dynamicIndentation) { - var rangeHasError = rangeContainsError(range); - var lineAdded; - if (!rangeHasError && !previousRangeHasError) { - if (!previousRange) { - // trim whitespaces starting from the beginning of the span up to the current line - var originalStart = sourceFile.getLineAndCharacterOfPosition(originalRange.pos); - trimTrailingWhitespacesForLines(originalStart.line, rangeStart.line); - } - else { - lineAdded = - processPair(range, rangeStart.line, parent, previousRange, previousRangeStartLine, previousParent, contextNode, dynamicIndentation); - } - } - previousRange = range; - previousParent = parent; - previousRangeStartLine = rangeStart.line; - previousRangeHasError = rangeHasError; - return lineAdded; - } - function processPair(currentItem, currentStartLine, currentParent, previousItem, previousStartLine, previousParent, contextNode, dynamicIndentation) { - formattingContext.updateContext(previousItem, previousParent, currentItem, currentParent, contextNode); - var rule = rulesProvider.getRulesMap().GetRule(formattingContext); - var trimTrailingWhitespaces; - var lineAdded; - if (rule) { - applyRuleEdits(rule, previousItem, previousStartLine, currentItem, currentStartLine); - if (rule.Operation.Action & (2 /* Space */ | 8 /* Delete */) && currentStartLine !== previousStartLine) { - lineAdded = false; - // Handle the case where the next line is moved to be the end of this line. - // In this case we don't indent the next line in the next pass. - if (currentParent.getStart(sourceFile) === currentItem.pos) { - dynamicIndentation.recomputeIndentation(false); - } - } - else if (rule.Operation.Action & 4 /* NewLine */ && currentStartLine === previousStartLine) { - lineAdded = true; - // Handle the case where token2 is moved to the new line. - // In this case we indent token2 in the next pass but we set - // sameLineIndent flag to notify the indenter that the indentation is within the line. - if (currentParent.getStart(sourceFile) === currentItem.pos) { - dynamicIndentation.recomputeIndentation(true); - } - } - // We need to trim trailing whitespace between the tokens if they were on different lines, and no rule was applied to put them on the same line - trimTrailingWhitespaces = - (rule.Operation.Action & (4 /* NewLine */ | 2 /* Space */)) && - rule.Flag !== 1 /* CanDeleteNewLines */; - } - else { - trimTrailingWhitespaces = true; - } - if (currentStartLine !== previousStartLine && trimTrailingWhitespaces) { - // We need to trim trailing whitespace between the tokens if they were on different lines, and no rule was applied to put them on the same line - trimTrailingWhitespacesForLines(previousStartLine, currentStartLine, previousItem); - } - return lineAdded; - } - function insertIndentation(pos, indentation, lineAdded) { - var indentationString = getIndentationString(indentation, options); - if (lineAdded) { - // new line is added before the token by the formatting rules - // insert indentation string at the very beginning of the token - recordReplace(pos, 0, indentationString); - } - else { - var tokenStart = sourceFile.getLineAndCharacterOfPosition(pos); - if (indentation !== tokenStart.character) { - var startLinePosition = ts.getStartPositionOfLine(tokenStart.line, sourceFile); - recordReplace(startLinePosition, tokenStart.character, indentationString); - } - } - } - function indentMultilineComment(commentRange, indentation, firstLineIsIndented) { - // split comment in lines - var startLine = sourceFile.getLineAndCharacterOfPosition(commentRange.pos).line; - var endLine = sourceFile.getLineAndCharacterOfPosition(commentRange.end).line; - var parts; - if (startLine === endLine) { - if (!firstLineIsIndented) { - // treat as single line comment - insertIndentation(commentRange.pos, indentation, false); - } - return; - } - else { - parts = []; - var startPos = commentRange.pos; - for (var line = startLine; line < endLine; ++line) { - var endOfLine = ts.getEndLinePosition(line, sourceFile); - parts.push({ pos: startPos, end: endOfLine }); - startPos = ts.getStartPositionOfLine(line + 1, sourceFile); - } - parts.push({ pos: startPos, end: commentRange.end }); - } - var startLinePos = ts.getStartPositionOfLine(startLine, sourceFile); - var nonWhitespaceColumnInFirstPart = formatting.SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(startLinePos, parts[0].pos, sourceFile, options); - if (indentation === nonWhitespaceColumnInFirstPart.column) { - return; - } - var startIndex = 0; - if (firstLineIsIndented) { - startIndex = 1; - startLine++; - } - // shift all parts on the delta size - var delta = indentation - nonWhitespaceColumnInFirstPart.column; - for (var i = startIndex, len = parts.length; i < len; ++i, ++startLine) { - var startLinePos_1 = ts.getStartPositionOfLine(startLine, sourceFile); - var nonWhitespaceCharacterAndColumn = i === 0 - ? nonWhitespaceColumnInFirstPart - : formatting.SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(parts[i].pos, parts[i].end, sourceFile, options); - var newIndentation = nonWhitespaceCharacterAndColumn.column + delta; - if (newIndentation > 0) { - var indentationString = getIndentationString(newIndentation, options); - recordReplace(startLinePos_1, nonWhitespaceCharacterAndColumn.character, indentationString); - } - else { - recordDelete(startLinePos_1, nonWhitespaceCharacterAndColumn.character); - } - } - } - function trimTrailingWhitespacesForLines(line1, line2, range) { - for (var line = line1; line < line2; ++line) { - var lineStartPosition = ts.getStartPositionOfLine(line, sourceFile); - var lineEndPosition = ts.getEndLinePosition(line, sourceFile); - // do not trim whitespaces in comments - if (range && ts.isComment(range.kind) && range.pos <= lineEndPosition && range.end > lineEndPosition) { - continue; - } - var pos = lineEndPosition; - while (pos >= lineStartPosition && ts.isWhiteSpace(sourceFile.text.charCodeAt(pos))) { - pos--; - } - if (pos !== lineEndPosition) { - ts.Debug.assert(pos === lineStartPosition || !ts.isWhiteSpace(sourceFile.text.charCodeAt(pos))); - recordDelete(pos + 1, lineEndPosition - pos); - } - } - } - function newTextChange(start, len, newText) { - return { span: ts.createTextSpan(start, len), newText: newText }; - } - function recordDelete(start, len) { - if (len) { - edits.push(newTextChange(start, len, "")); - } - } - function recordReplace(start, len, newText) { - if (len || newText) { - edits.push(newTextChange(start, len, newText)); - } - } - function applyRuleEdits(rule, previousRange, previousStartLine, currentRange, currentStartLine) { - var between; - switch (rule.Operation.Action) { - case 1 /* Ignore */: - // no action required - return; - case 8 /* Delete */: - if (previousRange.end !== currentRange.pos) { - // delete characters starting from t1.end up to t2.pos exclusive - recordDelete(previousRange.end, currentRange.pos - previousRange.end); - } - break; - case 4 /* NewLine */: - // exit early if we on different lines and rule cannot change number of newlines - // if line1 and line2 are on subsequent lines then no edits are required - ok to exit - // if line1 and line2 are separated with more than one newline - ok to exit since we cannot delete extra new lines - if (rule.Flag !== 1 /* CanDeleteNewLines */ && previousStartLine !== currentStartLine) { - return; - } - // edit should not be applied only if we have one line feed between elements - var lineDelta = currentStartLine - previousStartLine; - if (lineDelta !== 1) { - recordReplace(previousRange.end, currentRange.pos - previousRange.end, options.NewLineCharacter); - } - break; - case 2 /* Space */: - // exit early if we on different lines and rule cannot change number of newlines - if (rule.Flag !== 1 /* CanDeleteNewLines */ && previousStartLine !== currentStartLine) { - return; - } - var posDelta = currentRange.pos - previousRange.end; - if (posDelta !== 1 || sourceFile.text.charCodeAt(previousRange.end) !== 32 /* space */) { - recordReplace(previousRange.end, currentRange.pos - previousRange.end, " "); - } - break; - } - } - } - function isSomeBlock(kind) { - switch (kind) { - case 182 /* Block */: - case 209 /* ModuleBlock */: - return true; - } - return false; - } - function getOpenTokenForList(node, list) { - switch (node.kind) { - case 137 /* Constructor */: - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 166 /* ArrowFunction */: - if (node.typeParameters === list) { - return 24 /* LessThanToken */; - } - else if (node.parameters === list) { - return 16 /* OpenParenToken */; - } - break; - case 160 /* CallExpression */: - case 161 /* NewExpression */: - if (node.typeArguments === list) { - return 24 /* LessThanToken */; - } - else if (node.arguments === list) { - return 16 /* OpenParenToken */; - } - break; - case 144 /* TypeReference */: - if (node.typeArguments === list) { - return 24 /* LessThanToken */; - } - } - return 0 /* Unknown */; - } - function getCloseTokenForOpenToken(kind) { - switch (kind) { - case 16 /* OpenParenToken */: - return 17 /* CloseParenToken */; - case 24 /* LessThanToken */: - return 25 /* GreaterThanToken */; - } - return 0 /* Unknown */; - } - var internedSizes; - var internedTabsIndentation; - var internedSpacesIndentation; - function getIndentationString(indentation, options) { - // reset interned strings if FormatCodeOptions were changed - var resetInternedStrings = !internedSizes || (internedSizes.tabSize !== options.TabSize || internedSizes.indentSize !== options.IndentSize); - if (resetInternedStrings) { - internedSizes = { tabSize: options.TabSize, indentSize: options.IndentSize }; - internedTabsIndentation = internedSpacesIndentation = undefined; - } - if (!options.ConvertTabsToSpaces) { - var tabs = Math.floor(indentation / options.TabSize); - var spaces = indentation - tabs * options.TabSize; - var tabString; - if (!internedTabsIndentation) { - internedTabsIndentation = []; - } - if (internedTabsIndentation[tabs] === undefined) { - internedTabsIndentation[tabs] = tabString = repeat('\t', tabs); - } - else { - tabString = internedTabsIndentation[tabs]; - } - return spaces ? tabString + repeat(" ", spaces) : tabString; - } - else { - var spacesString; - var quotient = Math.floor(indentation / options.IndentSize); - var remainder = indentation % options.IndentSize; - if (!internedSpacesIndentation) { - internedSpacesIndentation = []; - } - if (internedSpacesIndentation[quotient] === undefined) { - spacesString = repeat(" ", options.IndentSize * quotient); - internedSpacesIndentation[quotient] = spacesString; - } - else { - spacesString = internedSpacesIndentation[quotient]; - } - return remainder ? spacesString + repeat(" ", remainder) : spacesString; - } - function repeat(value, count) { - var s = ""; - for (var i = 0; i < count; ++i) { - s += value; - } - return s; - } - } - formatting.getIndentationString = getIndentationString; - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - var SmartIndenter; - (function (SmartIndenter) { - var Value; - (function (Value) { - Value[Value["Unknown"] = -1] = "Unknown"; - })(Value || (Value = {})); - function getIndentation(position, sourceFile, options) { - if (position > sourceFile.text.length) { - return 0; // past EOF - } - var precedingToken = ts.findPrecedingToken(position, sourceFile); - if (!precedingToken) { - return 0; - } - // no indentation in string \regex\template literals - var precedingTokenIsLiteral = precedingToken.kind === 8 /* StringLiteral */ || - precedingToken.kind === 9 /* RegularExpressionLiteral */ || - precedingToken.kind === 10 /* NoSubstitutionTemplateLiteral */ || - precedingToken.kind === 11 /* TemplateHead */ || - precedingToken.kind === 12 /* TemplateMiddle */ || - precedingToken.kind === 13 /* TemplateTail */; - if (precedingTokenIsLiteral && precedingToken.getStart(sourceFile) <= position && precedingToken.end > position) { - return 0; - } - var lineAtPosition = sourceFile.getLineAndCharacterOfPosition(position).line; - if (precedingToken.kind === 23 /* CommaToken */ && precedingToken.parent.kind !== 172 /* BinaryExpression */) { - // previous token is comma that separates items in list - find the previous item and try to derive indentation from it - var actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options); - if (actualIndentation !== -1 /* Unknown */) { - return actualIndentation; - } - } - // try to find node that can contribute to indentation and includes 'position' starting from 'precedingToken' - // if such node is found - compute initial indentation for 'position' inside this node - var previous; - var current = precedingToken; - var currentStart; - var indentationDelta; - while (current) { - if (ts.positionBelongsToNode(current, position, sourceFile) && shouldIndentChildNode(current.kind, previous ? previous.kind : 0 /* Unknown */)) { - currentStart = getStartLineAndCharacterForNode(current, sourceFile); - if (nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken, current, lineAtPosition, sourceFile)) { - indentationDelta = 0; - } - else { - indentationDelta = lineAtPosition !== currentStart.line ? options.IndentSize : 0; - } - break; - } - // check if current node is a list item - if yes, take indentation from it - var actualIndentation = getActualIndentationForListItem(current, sourceFile, options); - if (actualIndentation !== -1 /* Unknown */) { - return actualIndentation; - } - previous = current; - current = current.parent; - } - if (!current) { - // no parent was found - return 0 to be indented on the level of SourceFile - return 0; - } - return getIndentationForNodeWorker(current, currentStart, undefined, indentationDelta, sourceFile, options); - } - SmartIndenter.getIndentation = getIndentation; - function getIndentationForNode(n, ignoreActualIndentationRange, sourceFile, options) { - var start = sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile)); - return getIndentationForNodeWorker(n, start, ignoreActualIndentationRange, 0, sourceFile, options); - } - SmartIndenter.getIndentationForNode = getIndentationForNode; - function getIndentationForNodeWorker(current, currentStart, ignoreActualIndentationRange, indentationDelta, sourceFile, options) { - var parent = current.parent; - var parentStart; - // walk upwards and collect indentations for pairs of parent-child nodes - // indentation is not added if parent and child nodes start on the same line or if parent is IfStatement and child starts on the same line with 'else clause' - while (parent) { - var useActualIndentation = true; - if (ignoreActualIndentationRange) { - var start = current.getStart(sourceFile); - useActualIndentation = start < ignoreActualIndentationRange.pos || start > ignoreActualIndentationRange.end; - } - if (useActualIndentation) { - // check if current node is a list item - if yes, take indentation from it - var actualIndentation = getActualIndentationForListItem(current, sourceFile, options); - if (actualIndentation !== -1 /* Unknown */) { - return actualIndentation + indentationDelta; - } - } - parentStart = getParentStart(parent, current, sourceFile); - var parentAndChildShareLine = parentStart.line === currentStart.line || - childStartsOnTheSameLineWithElseInIfStatement(parent, current, currentStart.line, sourceFile); - if (useActualIndentation) { - // try to fetch actual indentation for current node from source text - var actualIndentation = getActualIndentationForNode(current, parent, currentStart, parentAndChildShareLine, sourceFile, options); - if (actualIndentation !== -1 /* Unknown */) { - return actualIndentation + indentationDelta; - } - } - // increase indentation if parent node wants its content to be indented and parent and child nodes don't start on the same line - if (shouldIndentChildNode(parent.kind, current.kind) && !parentAndChildShareLine) { - indentationDelta += options.IndentSize; - } - current = parent; - currentStart = parentStart; - parent = current.parent; - } - return indentationDelta; - } - function getParentStart(parent, child, sourceFile) { - var containingList = getContainingList(child, sourceFile); - if (containingList) { - return sourceFile.getLineAndCharacterOfPosition(containingList.pos); - } - return sourceFile.getLineAndCharacterOfPosition(parent.getStart(sourceFile)); - } - /* - * Function returns Value.Unknown if indentation cannot be determined - */ - function getActualIndentationForListItemBeforeComma(commaToken, sourceFile, options) { - // previous token is comma that separates items in list - find the previous item and try to derive indentation from it - var commaItemInfo = ts.findListItemInfo(commaToken); - if (commaItemInfo && commaItemInfo.listItemIndex > 0) { - return deriveActualIndentationFromList(commaItemInfo.list.getChildren(), commaItemInfo.listItemIndex - 1, sourceFile, options); - } - else { - // handle broken code gracefully - return -1 /* Unknown */; - } - } - /* - * Function returns Value.Unknown if actual indentation for node should not be used (i.e because node is nested expression) - */ - function getActualIndentationForNode(current, parent, currentLineAndChar, parentAndChildShareLine, sourceFile, options) { - // actual indentation is used for statements\declarations if one of cases below is true: - // - parent is SourceFile - by default immediate children of SourceFile are not indented except when user indents them manually - // - parent and child are not on the same line - var useActualIndentation = (ts.isDeclaration(current) || ts.isStatement(current)) && - (parent.kind === 230 /* SourceFile */ || !parentAndChildShareLine); - if (!useActualIndentation) { - return -1 /* Unknown */; - } - return findColumnForFirstNonWhitespaceCharacterInLine(currentLineAndChar, sourceFile, options); - } - function nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken, current, lineAtPosition, sourceFile) { - var nextToken = ts.findNextToken(precedingToken, current); - if (!nextToken) { - return false; - } - if (nextToken.kind === 14 /* OpenBraceToken */) { - // open braces are always indented at the parent level - return true; - } - else if (nextToken.kind === 15 /* CloseBraceToken */) { - // close braces are indented at the parent level if they are located on the same line with cursor - // this means that if new line will be added at $ position, this case will be indented - // class A { - // $ - // } - /// and this one - not - // class A { - // $} - var nextTokenStartLine = getStartLineAndCharacterForNode(nextToken, sourceFile).line; - return lineAtPosition === nextTokenStartLine; - } - return false; - } - function getStartLineAndCharacterForNode(n, sourceFile) { - return sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile)); - } - function childStartsOnTheSameLineWithElseInIfStatement(parent, child, childStartLine, sourceFile) { - if (parent.kind === 186 /* IfStatement */ && parent.elseStatement === child) { - var elseKeyword = ts.findChildOfKind(parent, 76 /* ElseKeyword */, sourceFile); - ts.Debug.assert(elseKeyword !== undefined); - var elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; - return elseKeywordStartLine === childStartLine; - } - return false; - } - SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement = childStartsOnTheSameLineWithElseInIfStatement; - function getContainingList(node, sourceFile) { - if (node.parent) { - switch (node.parent.kind) { - case 144 /* TypeReference */: - if (node.parent.typeArguments && - ts.rangeContainsStartEnd(node.parent.typeArguments, node.getStart(sourceFile), node.getEnd())) { - return node.parent.typeArguments; - } - break; - case 157 /* ObjectLiteralExpression */: - return node.parent.properties; - case 156 /* ArrayLiteralExpression */: - return node.parent.elements; - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 140 /* CallSignature */: - case 141 /* ConstructSignature */: { - var start = node.getStart(sourceFile); - if (node.parent.typeParameters && - ts.rangeContainsStartEnd(node.parent.typeParameters, start, node.getEnd())) { - return node.parent.typeParameters; - } - if (ts.rangeContainsStartEnd(node.parent.parameters, start, node.getEnd())) { - return node.parent.parameters; - } - break; - } - case 161 /* NewExpression */: - case 160 /* CallExpression */: { - var start = node.getStart(sourceFile); - if (node.parent.typeArguments && - ts.rangeContainsStartEnd(node.parent.typeArguments, start, node.getEnd())) { - return node.parent.typeArguments; - } - if (node.parent.arguments && - ts.rangeContainsStartEnd(node.parent.arguments, start, node.getEnd())) { - return node.parent.arguments; - } - break; - } - } - } - return undefined; - } - function getActualIndentationForListItem(node, sourceFile, options) { - var containingList = getContainingList(node, sourceFile); - return containingList ? getActualIndentationFromList(containingList) : -1 /* Unknown */; - function getActualIndentationFromList(list) { - var index = ts.indexOf(list, node); - return index !== -1 ? deriveActualIndentationFromList(list, index, sourceFile, options) : -1 /* Unknown */; - } - } - function deriveActualIndentationFromList(list, index, sourceFile, options) { - ts.Debug.assert(index >= 0 && index < list.length); - var node = list[index]; - // walk toward the start of the list starting from current node and check if the line is the same for all items. - // if end line for item [i - 1] differs from the start line for item [i] - find column of the first non-whitespace character on the line of item [i] - var lineAndCharacter = getStartLineAndCharacterForNode(node, sourceFile); - for (var i = index - 1; i >= 0; --i) { - if (list[i].kind === 23 /* CommaToken */) { - continue; - } - // skip list items that ends on the same line with the current list element - var prevEndLine = sourceFile.getLineAndCharacterOfPosition(list[i].end).line; - if (prevEndLine !== lineAndCharacter.line) { - return findColumnForFirstNonWhitespaceCharacterInLine(lineAndCharacter, sourceFile, options); - } - lineAndCharacter = getStartLineAndCharacterForNode(list[i], sourceFile); - } - return -1 /* Unknown */; - } - function findColumnForFirstNonWhitespaceCharacterInLine(lineAndCharacter, sourceFile, options) { - var lineStart = sourceFile.getPositionOfLineAndCharacter(lineAndCharacter.line, 0); - return findFirstNonWhitespaceColumn(lineStart, lineStart + lineAndCharacter.character, sourceFile, options); - } - /* - Character is the actual index of the character since the beginning of the line. - Column - position of the character after expanding tabs to spaces - "0\t2$" - value of 'character' for '$' is 3 - value of 'column' for '$' is 6 (assuming that tab size is 4) - */ - function findFirstNonWhitespaceCharacterAndColumn(startPos, endPos, sourceFile, options) { - var character = 0; - var column = 0; - for (var pos = startPos; pos < endPos; ++pos) { - var ch = sourceFile.text.charCodeAt(pos); - if (!ts.isWhiteSpace(ch)) { - break; - } - if (ch === 9 /* tab */) { - column += options.TabSize + (column % options.TabSize); - } - else { - column++; - } - character++; - } - return { column: column, character: character }; - } - SmartIndenter.findFirstNonWhitespaceCharacterAndColumn = findFirstNonWhitespaceCharacterAndColumn; - function findFirstNonWhitespaceColumn(startPos, endPos, sourceFile, options) { - return findFirstNonWhitespaceCharacterAndColumn(startPos, endPos, sourceFile, options).column; - } - SmartIndenter.findFirstNonWhitespaceColumn = findFirstNonWhitespaceColumn; - function nodeContentIsAlwaysIndented(kind) { - switch (kind) { - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - case 207 /* EnumDeclaration */: - case 156 /* ArrayLiteralExpression */: - case 182 /* Block */: - case 209 /* ModuleBlock */: - case 157 /* ObjectLiteralExpression */: - case 148 /* TypeLiteral */: - case 150 /* TupleType */: - case 210 /* CaseBlock */: - case 224 /* DefaultClause */: - case 223 /* CaseClause */: - case 164 /* ParenthesizedExpression */: - case 160 /* CallExpression */: - case 161 /* NewExpression */: - case 183 /* VariableStatement */: - case 201 /* VariableDeclaration */: - case 217 /* ExportAssignment */: - case 194 /* ReturnStatement */: - case 173 /* ConditionalExpression */: - case 154 /* ArrayBindingPattern */: - case 153 /* ObjectBindingPattern */: - return true; - } - return false; - } - function shouldIndentChildNode(parent, child) { - if (nodeContentIsAlwaysIndented(parent)) { - return true; - } - switch (parent) { - case 187 /* DoStatement */: - case 188 /* WhileStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - case 189 /* ForStatement */: - case 186 /* IfStatement */: - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 140 /* CallSignature */: - case 166 /* ArrowFunction */: - case 137 /* Constructor */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - return child !== 182 /* Block */; - default: - return false; - } - } - SmartIndenter.shouldIndentChildNode = shouldIndentChildNode; - })(SmartIndenter = formatting.SmartIndenter || (formatting.SmartIndenter = {})); - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); -}; -/// -/// -/// -/// -/// -/// -/// -/// -/// -var ts; -(function (ts) { - /** The version of the language service API */ - ts.servicesVersion = "0.4"; - var ScriptSnapshot; - (function (ScriptSnapshot) { - var StringScriptSnapshot = (function () { - function StringScriptSnapshot(text) { - this.text = text; - this._lineStartPositions = undefined; - } - StringScriptSnapshot.prototype.getText = function (start, end) { - return this.text.substring(start, end); - }; - StringScriptSnapshot.prototype.getLength = function () { - return this.text.length; - }; - StringScriptSnapshot.prototype.getChangeRange = function (oldSnapshot) { - // Text-based snapshots do not support incremental parsing. Return undefined - // to signal that to the caller. - return undefined; - }; - return StringScriptSnapshot; - })(); - function fromString(text) { - return new StringScriptSnapshot(text); - } - ScriptSnapshot.fromString = fromString; - })(ScriptSnapshot = ts.ScriptSnapshot || (ts.ScriptSnapshot = {})); - var scanner = ts.createScanner(2 /* Latest */, true); - var emptyArray = []; - function createNode(kind, pos, end, flags, parent) { - var node = new (ts.getNodeConstructor(kind))(); - node.pos = pos; - node.end = end; - node.flags = flags; - node.parent = parent; - return node; - } - var NodeObject = (function () { - function NodeObject() { - } - NodeObject.prototype.getSourceFile = function () { - return ts.getSourceFileOfNode(this); - }; - NodeObject.prototype.getStart = function (sourceFile) { - return ts.getTokenPosOfNode(this, sourceFile); - }; - NodeObject.prototype.getFullStart = function () { - return this.pos; - }; - NodeObject.prototype.getEnd = function () { - return this.end; - }; - NodeObject.prototype.getWidth = function (sourceFile) { - return this.getEnd() - this.getStart(sourceFile); - }; - NodeObject.prototype.getFullWidth = function () { - return this.end - this.getFullStart(); - }; - NodeObject.prototype.getLeadingTriviaWidth = function (sourceFile) { - return this.getStart(sourceFile) - this.pos; - }; - NodeObject.prototype.getFullText = function (sourceFile) { - return (sourceFile || this.getSourceFile()).text.substring(this.pos, this.end); - }; - NodeObject.prototype.getText = function (sourceFile) { - return (sourceFile || this.getSourceFile()).text.substring(this.getStart(), this.getEnd()); - }; - NodeObject.prototype.addSyntheticNodes = function (nodes, pos, end) { - scanner.setTextPos(pos); - while (pos < end) { - var token = scanner.scan(); - var textPos = scanner.getTextPos(); - nodes.push(createNode(token, pos, textPos, 1024 /* Synthetic */, this)); - pos = textPos; - } - return pos; - }; - NodeObject.prototype.createSyntaxList = function (nodes) { - var list = createNode(253 /* SyntaxList */, nodes.pos, nodes.end, 1024 /* Synthetic */, this); - list._children = []; - var pos = nodes.pos; - for (var _i = 0; _i < nodes.length; _i++) { - var node = nodes[_i]; - if (pos < node.pos) { - pos = this.addSyntheticNodes(list._children, pos, node.pos); - } - list._children.push(node); - pos = node.end; - } - if (pos < nodes.end) { - this.addSyntheticNodes(list._children, pos, nodes.end); - } - return list; - }; - NodeObject.prototype.createChildren = function (sourceFile) { - var _this = this; - var children; - if (this.kind >= 128 /* FirstNode */) { - scanner.setText((sourceFile || this.getSourceFile()).text); - children = []; - var pos = this.pos; - var processNode = function (node) { - if (pos < node.pos) { - pos = _this.addSyntheticNodes(children, pos, node.pos); - } - children.push(node); - pos = node.end; - }; - var processNodes = function (nodes) { - if (pos < nodes.pos) { - pos = _this.addSyntheticNodes(children, pos, nodes.pos); - } - children.push(_this.createSyntaxList(nodes)); - pos = nodes.end; - }; - ts.forEachChild(this, processNode, processNodes); - if (pos < this.end) { - this.addSyntheticNodes(children, pos, this.end); - } - scanner.setText(undefined); - } - this._children = children || emptyArray; - }; - NodeObject.prototype.getChildCount = function (sourceFile) { - if (!this._children) - this.createChildren(sourceFile); - return this._children.length; - }; - NodeObject.prototype.getChildAt = function (index, sourceFile) { - if (!this._children) - this.createChildren(sourceFile); - return this._children[index]; - }; - NodeObject.prototype.getChildren = function (sourceFile) { - if (!this._children) - this.createChildren(sourceFile); - return this._children; - }; - NodeObject.prototype.getFirstToken = function (sourceFile) { - var children = this.getChildren(); - for (var _i = 0; _i < children.length; _i++) { - var child = children[_i]; - if (child.kind < 128 /* FirstNode */) { - return child; - } - return child.getFirstToken(sourceFile); - } - }; - NodeObject.prototype.getLastToken = function (sourceFile) { - var children = this.getChildren(sourceFile); - for (var i = children.length - 1; i >= 0; i--) { - var child = children[i]; - if (child.kind < 128 /* FirstNode */) { - return child; - } - return child.getLastToken(sourceFile); - } - }; - return NodeObject; - })(); - var SymbolObject = (function () { - function SymbolObject(flags, name) { - this.flags = flags; - this.name = name; - } - SymbolObject.prototype.getFlags = function () { - return this.flags; - }; - SymbolObject.prototype.getName = function () { - return this.name; - }; - SymbolObject.prototype.getDeclarations = function () { - return this.declarations; - }; - SymbolObject.prototype.getDocumentationComment = function () { - if (this.documentationComment === undefined) { - this.documentationComment = getJsDocCommentsFromDeclarations(this.declarations, this.name, !(this.flags & 4 /* Property */)); - } - return this.documentationComment; - }; - return SymbolObject; - })(); - function getJsDocCommentsFromDeclarations(declarations, name, canUseParsedParamTagComments) { - var documentationComment = []; - var docComments = getJsDocCommentsSeparatedByNewLines(); - ts.forEach(docComments, function (docComment) { - if (documentationComment.length) { - documentationComment.push(ts.lineBreakPart()); - } - documentationComment.push(docComment); - }); - return documentationComment; - function getJsDocCommentsSeparatedByNewLines() { - var paramTag = "@param"; - var jsDocCommentParts = []; - ts.forEach(declarations, function (declaration, indexOfDeclaration) { - // Make sure we are collecting doc comment from declaration once, - // In case of union property there might be same declaration multiple times - // which only varies in type parameter - // Eg. let a: Array | Array; a.length - // The property length will have two declarations of property length coming - // from Array - Array and Array - if (ts.indexOf(declarations, declaration) === indexOfDeclaration) { - var sourceFileOfDeclaration = ts.getSourceFileOfNode(declaration); - // If it is parameter - try and get the jsDoc comment with @param tag from function declaration's jsDoc comments - if (canUseParsedParamTagComments && declaration.kind === 131 /* Parameter */) { - ts.forEach(getJsDocCommentTextRange(declaration.parent, sourceFileOfDeclaration), function (jsDocCommentTextRange) { - var cleanedParamJsDocComment = getCleanedParamJsDocComment(jsDocCommentTextRange.pos, jsDocCommentTextRange.end, sourceFileOfDeclaration); - if (cleanedParamJsDocComment) { - jsDocCommentParts.push.apply(jsDocCommentParts, cleanedParamJsDocComment); - } - }); - } - // If this is left side of dotted module declaration, there is no doc comments associated with this node - if (declaration.kind === 208 /* ModuleDeclaration */ && declaration.body.kind === 208 /* ModuleDeclaration */) { - return; - } - // If this is dotted module name, get the doc comments from the parent - while (declaration.kind === 208 /* ModuleDeclaration */ && declaration.parent.kind === 208 /* ModuleDeclaration */) { - declaration = declaration.parent; - } - // Get the cleaned js doc comment text from the declaration - ts.forEach(getJsDocCommentTextRange(declaration.kind === 201 /* VariableDeclaration */ ? declaration.parent.parent : declaration, sourceFileOfDeclaration), function (jsDocCommentTextRange) { - var cleanedJsDocComment = getCleanedJsDocComment(jsDocCommentTextRange.pos, jsDocCommentTextRange.end, sourceFileOfDeclaration); - if (cleanedJsDocComment) { - jsDocCommentParts.push.apply(jsDocCommentParts, cleanedJsDocComment); - } - }); - } - }); - return jsDocCommentParts; - function getJsDocCommentTextRange(node, sourceFile) { - return ts.map(ts.getJsDocComments(node, sourceFile), function (jsDocComment) { - return { - pos: jsDocComment.pos + "/*".length, - end: jsDocComment.end - "*/".length // Trim off comment end indicator - }; - }); - } - function consumeWhiteSpacesOnTheLine(pos, end, sourceFile, maxSpacesToRemove) { - if (maxSpacesToRemove !== undefined) { - end = Math.min(end, pos + maxSpacesToRemove); - } - for (; pos < end; pos++) { - var ch = sourceFile.text.charCodeAt(pos); - if (!ts.isWhiteSpace(ch) || ts.isLineBreak(ch)) { - // Either found lineBreak or non whiteSpace - return pos; - } - } - return end; - } - function consumeLineBreaks(pos, end, sourceFile) { - while (pos < end && ts.isLineBreak(sourceFile.text.charCodeAt(pos))) { - pos++; - } - return pos; - } - function isName(pos, end, sourceFile, name) { - return pos + name.length < end && - sourceFile.text.substr(pos, name.length) === name && - (ts.isWhiteSpace(sourceFile.text.charCodeAt(pos + name.length)) || - ts.isLineBreak(sourceFile.text.charCodeAt(pos + name.length))); - } - function isParamTag(pos, end, sourceFile) { - // If it is @param tag - return isName(pos, end, sourceFile, paramTag); - } - function pushDocCommentLineText(docComments, text, blankLineCount) { - // Add the empty lines in between texts - while (blankLineCount--) { - docComments.push(ts.textPart("")); - } - docComments.push(ts.textPart(text)); - } - function getCleanedJsDocComment(pos, end, sourceFile) { - var spacesToRemoveAfterAsterisk; - var docComments = []; - var blankLineCount = 0; - var isInParamTag = false; - while (pos < end) { - var docCommentTextOfLine = ""; - // First consume leading white space - pos = consumeWhiteSpacesOnTheLine(pos, end, sourceFile); - // If the comment starts with '*' consume the spaces on this line - if (pos < end && sourceFile.text.charCodeAt(pos) === 42 /* asterisk */) { - var lineStartPos = pos + 1; - pos = consumeWhiteSpacesOnTheLine(pos + 1, end, sourceFile, spacesToRemoveAfterAsterisk); - // Set the spaces to remove after asterisk as margin if not already set - if (spacesToRemoveAfterAsterisk === undefined && pos < end && !ts.isLineBreak(sourceFile.text.charCodeAt(pos))) { - spacesToRemoveAfterAsterisk = pos - lineStartPos; - } - } - else if (spacesToRemoveAfterAsterisk === undefined) { - spacesToRemoveAfterAsterisk = 0; - } - // Analyse text on this line - while (pos < end && !ts.isLineBreak(sourceFile.text.charCodeAt(pos))) { - var ch = sourceFile.text.charAt(pos); - if (ch === "@") { - // If it is @param tag - if (isParamTag(pos, end, sourceFile)) { - isInParamTag = true; - pos += paramTag.length; - continue; - } - else { - isInParamTag = false; - } - } - // Add the ch to doc text if we arent in param tag - if (!isInParamTag) { - docCommentTextOfLine += ch; - } - // Scan next character - pos++; - } - // Continue with next line - pos = consumeLineBreaks(pos, end, sourceFile); - if (docCommentTextOfLine) { - pushDocCommentLineText(docComments, docCommentTextOfLine, blankLineCount); - blankLineCount = 0; - } - else if (!isInParamTag && docComments.length) { - // This is blank line when there is text already parsed - blankLineCount++; - } - } - return docComments; - } - function getCleanedParamJsDocComment(pos, end, sourceFile) { - var paramHelpStringMargin; - var paramDocComments = []; - while (pos < end) { - if (isParamTag(pos, end, sourceFile)) { - var blankLineCount = 0; - var recordedParamTag = false; - // Consume leading spaces - pos = consumeWhiteSpaces(pos + paramTag.length); - if (pos >= end) { - break; - } - // Ignore type expression - if (sourceFile.text.charCodeAt(pos) === 123 /* openBrace */) { - pos++; - for (var curlies = 1; pos < end; pos++) { - var charCode = sourceFile.text.charCodeAt(pos); - // { character means we need to find another } to match the found one - if (charCode === 123 /* openBrace */) { - curlies++; - continue; - } - // } char - if (charCode === 125 /* closeBrace */) { - curlies--; - if (curlies === 0) { - // We do not have any more } to match the type expression is ignored completely - pos++; - break; - } - else { - // there are more { to be matched with } - continue; - } - } - // Found start of another tag - if (charCode === 64 /* at */) { - break; - } - } - // Consume white spaces - pos = consumeWhiteSpaces(pos); - if (pos >= end) { - break; - } - } - // Parameter name - if (isName(pos, end, sourceFile, name)) { - // Found the parameter we are looking for consume white spaces - pos = consumeWhiteSpaces(pos + name.length); - if (pos >= end) { - break; - } - var paramHelpString = ""; - var firstLineParamHelpStringPos = pos; - while (pos < end) { - var ch = sourceFile.text.charCodeAt(pos); - // at line break, set this comment line text and go to next line - if (ts.isLineBreak(ch)) { - if (paramHelpString) { - pushDocCommentLineText(paramDocComments, paramHelpString, blankLineCount); - paramHelpString = ""; - blankLineCount = 0; - recordedParamTag = true; - } - else if (recordedParamTag) { - blankLineCount++; - } - // Get the pos after cleaning start of the line - setPosForParamHelpStringOnNextLine(firstLineParamHelpStringPos); - continue; - } - // Done scanning param help string - next tag found - if (ch === 64 /* at */) { - break; - } - paramHelpString += sourceFile.text.charAt(pos); - // Go to next character - pos++; - } - // If there is param help text, add it top the doc comments - if (paramHelpString) { - pushDocCommentLineText(paramDocComments, paramHelpString, blankLineCount); - } - paramHelpStringMargin = undefined; - } - // If this is the start of another tag, continue with the loop in seach of param tag with symbol name - if (sourceFile.text.charCodeAt(pos) === 64 /* at */) { - continue; - } - } - // Next character - pos++; - } - return paramDocComments; - function consumeWhiteSpaces(pos) { - while (pos < end && ts.isWhiteSpace(sourceFile.text.charCodeAt(pos))) { - pos++; - } - return pos; - } - function setPosForParamHelpStringOnNextLine(firstLineParamHelpStringPos) { - // Get the pos after consuming line breaks - pos = consumeLineBreaks(pos, end, sourceFile); - if (pos >= end) { - return; - } - if (paramHelpStringMargin === undefined) { - paramHelpStringMargin = sourceFile.getLineAndCharacterOfPosition(firstLineParamHelpStringPos).character; - } - // Now consume white spaces max - var startOfLinePos = pos; - pos = consumeWhiteSpacesOnTheLine(pos, end, sourceFile, paramHelpStringMargin); - if (pos >= end) { - return; - } - var consumedSpaces = pos - startOfLinePos; - if (consumedSpaces < paramHelpStringMargin) { - var ch = sourceFile.text.charCodeAt(pos); - if (ch === 42 /* asterisk */) { - // Consume more spaces after asterisk - pos = consumeWhiteSpacesOnTheLine(pos + 1, end, sourceFile, paramHelpStringMargin - consumedSpaces - 1); - } - } - } - } - } - } - var TypeObject = (function () { - function TypeObject(checker, flags) { - this.checker = checker; - this.flags = flags; - } - TypeObject.prototype.getFlags = function () { - return this.flags; - }; - TypeObject.prototype.getSymbol = function () { - return this.symbol; - }; - TypeObject.prototype.getProperties = function () { - return this.checker.getPropertiesOfType(this); - }; - TypeObject.prototype.getProperty = function (propertyName) { - return this.checker.getPropertyOfType(this, propertyName); - }; - TypeObject.prototype.getApparentProperties = function () { - return this.checker.getAugmentedPropertiesOfType(this); - }; - TypeObject.prototype.getCallSignatures = function () { - return this.checker.getSignaturesOfType(this, 0 /* Call */); - }; - TypeObject.prototype.getConstructSignatures = function () { - return this.checker.getSignaturesOfType(this, 1 /* Construct */); - }; - TypeObject.prototype.getStringIndexType = function () { - return this.checker.getIndexTypeOfType(this, 0 /* String */); - }; - TypeObject.prototype.getNumberIndexType = function () { - return this.checker.getIndexTypeOfType(this, 1 /* Number */); - }; - return TypeObject; - })(); - var SignatureObject = (function () { - function SignatureObject(checker) { - this.checker = checker; - } - SignatureObject.prototype.getDeclaration = function () { - return this.declaration; - }; - SignatureObject.prototype.getTypeParameters = function () { - return this.typeParameters; - }; - SignatureObject.prototype.getParameters = function () { - return this.parameters; - }; - SignatureObject.prototype.getReturnType = function () { - return this.checker.getReturnTypeOfSignature(this); - }; - SignatureObject.prototype.getDocumentationComment = function () { - if (this.documentationComment === undefined) { - this.documentationComment = this.declaration ? getJsDocCommentsFromDeclarations([this.declaration], - /*name*/ undefined, - /*canUseParsedParamTagComments*/ false) : []; - } - return this.documentationComment; - }; - return SignatureObject; - })(); - var SourceFileObject = (function (_super) { - __extends(SourceFileObject, _super); - function SourceFileObject() { - _super.apply(this, arguments); - } - SourceFileObject.prototype.update = function (newText, textChangeRange) { - return ts.updateSourceFile(this, newText, textChangeRange); - }; - SourceFileObject.prototype.getLineAndCharacterOfPosition = function (position) { - return ts.getLineAndCharacterOfPosition(this, position); - }; - SourceFileObject.prototype.getLineStarts = function () { - return ts.getLineStarts(this); - }; - SourceFileObject.prototype.getPositionOfLineAndCharacter = function (line, character) { - return ts.getPositionOfLineAndCharacter(this, line, character); - }; - SourceFileObject.prototype.getNamedDeclarations = function () { - if (!this.namedDeclarations) { - this.namedDeclarations = this.computeNamedDeclarations(); - } - return this.namedDeclarations; - }; - SourceFileObject.prototype.computeNamedDeclarations = function () { - var result = {}; - ts.forEachChild(this, visit); - return result; - function addDeclaration(declaration) { - var name = getDeclarationName(declaration); - if (name) { - var declarations = getDeclarations(name); - declarations.push(declaration); - } - } - function getDeclarations(name) { - return ts.getProperty(result, name) || (result[name] = []); - } - function getDeclarationName(declaration) { - if (declaration.name) { - var result_2 = getTextOfIdentifierOrLiteral(declaration.name); - if (result_2 !== undefined) { - return result_2; - } - if (declaration.name.kind === 129 /* ComputedPropertyName */) { - var expr = declaration.name.expression; - if (expr.kind === 158 /* PropertyAccessExpression */) { - return expr.name.text; - } - return getTextOfIdentifierOrLiteral(expr); - } - } - return undefined; - } - function getTextOfIdentifierOrLiteral(node) { - if (node) { - if (node.kind === 65 /* Identifier */ || - node.kind === 8 /* StringLiteral */ || - node.kind === 7 /* NumericLiteral */) { - return node.text; - } - } - return undefined; - } - function visit(node) { - switch (node.kind) { - case 203 /* FunctionDeclaration */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - var functionDeclaration = node; - var declarationName = getDeclarationName(functionDeclaration); - if (declarationName) { - var declarations = getDeclarations(declarationName); - var lastDeclaration = ts.lastOrUndefined(declarations); - // Check whether this declaration belongs to an "overload group". - if (lastDeclaration && functionDeclaration.parent === lastDeclaration.parent && functionDeclaration.symbol === lastDeclaration.symbol) { - // Overwrite the last declaration if it was an overload - // and this one is an implementation. - if (functionDeclaration.body && !lastDeclaration.body) { - declarations[declarations.length - 1] = functionDeclaration; - } - } - else { - declarations.push(functionDeclaration); - } - ts.forEachChild(node, visit); - } - break; - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - case 206 /* TypeAliasDeclaration */: - case 207 /* EnumDeclaration */: - case 208 /* ModuleDeclaration */: - case 211 /* ImportEqualsDeclaration */: - case 220 /* ExportSpecifier */: - case 216 /* ImportSpecifier */: - case 211 /* ImportEqualsDeclaration */: - case 213 /* ImportClause */: - case 214 /* NamespaceImport */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 148 /* TypeLiteral */: - addDeclaration(node); - // fall through - case 137 /* Constructor */: - case 183 /* VariableStatement */: - case 202 /* VariableDeclarationList */: - case 153 /* ObjectBindingPattern */: - case 154 /* ArrayBindingPattern */: - case 209 /* ModuleBlock */: - ts.forEachChild(node, visit); - break; - case 182 /* Block */: - if (ts.isFunctionBlock(node)) { - ts.forEachChild(node, visit); - } - break; - case 131 /* Parameter */: - // Only consider properties defined as constructor parameters - if (!(node.flags & 112 /* AccessibilityModifier */)) { - break; - } - // fall through - case 201 /* VariableDeclaration */: - case 155 /* BindingElement */: - if (ts.isBindingPattern(node.name)) { - ts.forEachChild(node.name, visit); - break; - } - case 229 /* EnumMember */: - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - addDeclaration(node); - break; - case 218 /* ExportDeclaration */: - // Handle named exports case e.g.: - // export {a, b as B} from "mod"; - if (node.exportClause) { - ts.forEach(node.exportClause.elements, visit); - } - break; - case 212 /* ImportDeclaration */: - var importClause = node.importClause; - if (importClause) { - // Handle default import case e.g.: - // import d from "mod"; - if (importClause.name) { - addDeclaration(importClause); - } - // Handle named bindings in imports e.g.: - // import * as NS from "mod"; - // import {a, b as B} from "mod"; - if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 214 /* NamespaceImport */) { - addDeclaration(importClause.namedBindings); - } - else { - ts.forEach(importClause.namedBindings.elements, visit); - } - } - } - break; - } - } - }; - return SourceFileObject; - })(NodeObject); - var TextChange = (function () { - function TextChange() { - } - return TextChange; - })(); - ts.TextChange = TextChange; - var HighlightSpanKind; - (function (HighlightSpanKind) { - HighlightSpanKind.none = "none"; - HighlightSpanKind.definition = "definition"; - HighlightSpanKind.reference = "reference"; - HighlightSpanKind.writtenReference = "writtenReference"; - })(HighlightSpanKind = ts.HighlightSpanKind || (ts.HighlightSpanKind = {})); - (function (SymbolDisplayPartKind) { - SymbolDisplayPartKind[SymbolDisplayPartKind["aliasName"] = 0] = "aliasName"; - SymbolDisplayPartKind[SymbolDisplayPartKind["className"] = 1] = "className"; - SymbolDisplayPartKind[SymbolDisplayPartKind["enumName"] = 2] = "enumName"; - SymbolDisplayPartKind[SymbolDisplayPartKind["fieldName"] = 3] = "fieldName"; - SymbolDisplayPartKind[SymbolDisplayPartKind["interfaceName"] = 4] = "interfaceName"; - SymbolDisplayPartKind[SymbolDisplayPartKind["keyword"] = 5] = "keyword"; - SymbolDisplayPartKind[SymbolDisplayPartKind["lineBreak"] = 6] = "lineBreak"; - SymbolDisplayPartKind[SymbolDisplayPartKind["numericLiteral"] = 7] = "numericLiteral"; - SymbolDisplayPartKind[SymbolDisplayPartKind["stringLiteral"] = 8] = "stringLiteral"; - SymbolDisplayPartKind[SymbolDisplayPartKind["localName"] = 9] = "localName"; - SymbolDisplayPartKind[SymbolDisplayPartKind["methodName"] = 10] = "methodName"; - SymbolDisplayPartKind[SymbolDisplayPartKind["moduleName"] = 11] = "moduleName"; - SymbolDisplayPartKind[SymbolDisplayPartKind["operator"] = 12] = "operator"; - SymbolDisplayPartKind[SymbolDisplayPartKind["parameterName"] = 13] = "parameterName"; - SymbolDisplayPartKind[SymbolDisplayPartKind["propertyName"] = 14] = "propertyName"; - SymbolDisplayPartKind[SymbolDisplayPartKind["punctuation"] = 15] = "punctuation"; - SymbolDisplayPartKind[SymbolDisplayPartKind["space"] = 16] = "space"; - SymbolDisplayPartKind[SymbolDisplayPartKind["text"] = 17] = "text"; - SymbolDisplayPartKind[SymbolDisplayPartKind["typeParameterName"] = 18] = "typeParameterName"; - SymbolDisplayPartKind[SymbolDisplayPartKind["enumMemberName"] = 19] = "enumMemberName"; - SymbolDisplayPartKind[SymbolDisplayPartKind["functionName"] = 20] = "functionName"; - SymbolDisplayPartKind[SymbolDisplayPartKind["regularExpressionLiteral"] = 21] = "regularExpressionLiteral"; - })(ts.SymbolDisplayPartKind || (ts.SymbolDisplayPartKind = {})); - var SymbolDisplayPartKind = ts.SymbolDisplayPartKind; - (function (OutputFileType) { - OutputFileType[OutputFileType["JavaScript"] = 0] = "JavaScript"; - OutputFileType[OutputFileType["SourceMap"] = 1] = "SourceMap"; - OutputFileType[OutputFileType["Declaration"] = 2] = "Declaration"; - })(ts.OutputFileType || (ts.OutputFileType = {})); - var OutputFileType = ts.OutputFileType; - (function (EndOfLineState) { - EndOfLineState[EndOfLineState["None"] = 0] = "None"; - EndOfLineState[EndOfLineState["InMultiLineCommentTrivia"] = 1] = "InMultiLineCommentTrivia"; - EndOfLineState[EndOfLineState["InSingleQuoteStringLiteral"] = 2] = "InSingleQuoteStringLiteral"; - EndOfLineState[EndOfLineState["InDoubleQuoteStringLiteral"] = 3] = "InDoubleQuoteStringLiteral"; - EndOfLineState[EndOfLineState["InTemplateHeadOrNoSubstitutionTemplate"] = 4] = "InTemplateHeadOrNoSubstitutionTemplate"; - EndOfLineState[EndOfLineState["InTemplateMiddleOrTail"] = 5] = "InTemplateMiddleOrTail"; - EndOfLineState[EndOfLineState["InTemplateSubstitutionPosition"] = 6] = "InTemplateSubstitutionPosition"; - })(ts.EndOfLineState || (ts.EndOfLineState = {})); - var EndOfLineState = ts.EndOfLineState; - (function (TokenClass) { - TokenClass[TokenClass["Punctuation"] = 0] = "Punctuation"; - TokenClass[TokenClass["Keyword"] = 1] = "Keyword"; - TokenClass[TokenClass["Operator"] = 2] = "Operator"; - TokenClass[TokenClass["Comment"] = 3] = "Comment"; - TokenClass[TokenClass["Whitespace"] = 4] = "Whitespace"; - TokenClass[TokenClass["Identifier"] = 5] = "Identifier"; - TokenClass[TokenClass["NumberLiteral"] = 6] = "NumberLiteral"; - TokenClass[TokenClass["StringLiteral"] = 7] = "StringLiteral"; - TokenClass[TokenClass["RegExpLiteral"] = 8] = "RegExpLiteral"; - })(ts.TokenClass || (ts.TokenClass = {})); - var TokenClass = ts.TokenClass; - // TODO: move these to enums - var ScriptElementKind; - (function (ScriptElementKind) { - ScriptElementKind.unknown = ""; - ScriptElementKind.warning = "warning"; - // predefined type (void) or keyword (class) - ScriptElementKind.keyword = "keyword"; - // top level script node - ScriptElementKind.scriptElement = "script"; - // module foo {} - ScriptElementKind.moduleElement = "module"; - // class X {} - ScriptElementKind.classElement = "class"; - // interface Y {} - ScriptElementKind.interfaceElement = "interface"; - // type T = ... - ScriptElementKind.typeElement = "type"; - // enum E - ScriptElementKind.enumElement = "enum"; - // Inside module and script only - // let v = .. - ScriptElementKind.variableElement = "var"; - // Inside function - ScriptElementKind.localVariableElement = "local var"; - // Inside module and script only - // function f() { } - ScriptElementKind.functionElement = "function"; - // Inside function - ScriptElementKind.localFunctionElement = "local function"; - // class X { [public|private]* foo() {} } - ScriptElementKind.memberFunctionElement = "method"; - // class X { [public|private]* [get|set] foo:number; } - ScriptElementKind.memberGetAccessorElement = "getter"; - ScriptElementKind.memberSetAccessorElement = "setter"; - // class X { [public|private]* foo:number; } - // interface Y { foo:number; } - ScriptElementKind.memberVariableElement = "property"; - // class X { constructor() { } } - ScriptElementKind.constructorImplementationElement = "constructor"; - // interface Y { ():number; } - ScriptElementKind.callSignatureElement = "call"; - // interface Y { []:number; } - ScriptElementKind.indexSignatureElement = "index"; - // interface Y { new():Y; } - ScriptElementKind.constructSignatureElement = "construct"; - // function foo(*Y*: string) - ScriptElementKind.parameterElement = "parameter"; - ScriptElementKind.typeParameterElement = "type parameter"; - ScriptElementKind.primitiveType = "primitive type"; - ScriptElementKind.label = "label"; - ScriptElementKind.alias = "alias"; - ScriptElementKind.constElement = "const"; - ScriptElementKind.letElement = "let"; - })(ScriptElementKind = ts.ScriptElementKind || (ts.ScriptElementKind = {})); - var ScriptElementKindModifier; - (function (ScriptElementKindModifier) { - ScriptElementKindModifier.none = ""; - ScriptElementKindModifier.publicMemberModifier = "public"; - ScriptElementKindModifier.privateMemberModifier = "private"; - ScriptElementKindModifier.protectedMemberModifier = "protected"; - ScriptElementKindModifier.exportedModifier = "export"; - ScriptElementKindModifier.ambientModifier = "declare"; - ScriptElementKindModifier.staticModifier = "static"; - })(ScriptElementKindModifier = ts.ScriptElementKindModifier || (ts.ScriptElementKindModifier = {})); - var ClassificationTypeNames = (function () { - function ClassificationTypeNames() { - } - ClassificationTypeNames.comment = "comment"; - ClassificationTypeNames.identifier = "identifier"; - ClassificationTypeNames.keyword = "keyword"; - ClassificationTypeNames.numericLiteral = "number"; - ClassificationTypeNames.operator = "operator"; - ClassificationTypeNames.stringLiteral = "string"; - ClassificationTypeNames.whiteSpace = "whitespace"; - ClassificationTypeNames.text = "text"; - ClassificationTypeNames.punctuation = "punctuation"; - ClassificationTypeNames.className = "class name"; - ClassificationTypeNames.enumName = "enum name"; - ClassificationTypeNames.interfaceName = "interface name"; - ClassificationTypeNames.moduleName = "module name"; - ClassificationTypeNames.typeParameterName = "type parameter name"; - ClassificationTypeNames.typeAliasName = "type alias name"; - ClassificationTypeNames.parameterName = "parameter name"; - ClassificationTypeNames.docCommentTagName = "doc comment tag name"; - return ClassificationTypeNames; - })(); - ts.ClassificationTypeNames = ClassificationTypeNames; - (function (ClassificationType) { - ClassificationType[ClassificationType["comment"] = 1] = "comment"; - ClassificationType[ClassificationType["identifier"] = 2] = "identifier"; - ClassificationType[ClassificationType["keyword"] = 3] = "keyword"; - ClassificationType[ClassificationType["numericLiteral"] = 4] = "numericLiteral"; - ClassificationType[ClassificationType["operator"] = 5] = "operator"; - ClassificationType[ClassificationType["stringLiteral"] = 6] = "stringLiteral"; - ClassificationType[ClassificationType["regularExpressionLiteral"] = 7] = "regularExpressionLiteral"; - ClassificationType[ClassificationType["whiteSpace"] = 8] = "whiteSpace"; - ClassificationType[ClassificationType["text"] = 9] = "text"; - ClassificationType[ClassificationType["punctuation"] = 10] = "punctuation"; - ClassificationType[ClassificationType["className"] = 11] = "className"; - ClassificationType[ClassificationType["enumName"] = 12] = "enumName"; - ClassificationType[ClassificationType["interfaceName"] = 13] = "interfaceName"; - ClassificationType[ClassificationType["moduleName"] = 14] = "moduleName"; - ClassificationType[ClassificationType["typeParameterName"] = 15] = "typeParameterName"; - ClassificationType[ClassificationType["typeAliasName"] = 16] = "typeAliasName"; - ClassificationType[ClassificationType["parameterName"] = 17] = "parameterName"; - ClassificationType[ClassificationType["docCommentTagName"] = 18] = "docCommentTagName"; - })(ts.ClassificationType || (ts.ClassificationType = {})); - var ClassificationType = ts.ClassificationType; - function displayPartsToString(displayParts) { - if (displayParts) { - return ts.map(displayParts, function (displayPart) { return displayPart.text; }).join(""); - } - return ""; - } - ts.displayPartsToString = displayPartsToString; - function isLocalVariableOrFunction(symbol) { - if (symbol.parent) { - return false; // This is exported symbol - } - return ts.forEach(symbol.declarations, function (declaration) { - // Function expressions are local - if (declaration.kind === 165 /* FunctionExpression */) { - return true; - } - if (declaration.kind !== 201 /* VariableDeclaration */ && declaration.kind !== 203 /* FunctionDeclaration */) { - return false; - } - // If the parent is not sourceFile or module block it is local variable - for (var parent_9 = declaration.parent; !ts.isFunctionBlock(parent_9); parent_9 = parent_9.parent) { - // Reached source file or module block - if (parent_9.kind === 230 /* SourceFile */ || parent_9.kind === 209 /* ModuleBlock */) { - return false; - } - } - // parent is in function block - return true; - }); - } - function getDefaultCompilerOptions() { - // Always default to "ScriptTarget.ES5" for the language service - return { - target: 1 /* ES5 */, - module: 0 /* None */ - }; - } - ts.getDefaultCompilerOptions = getDefaultCompilerOptions; - var OperationCanceledException = (function () { - function OperationCanceledException() { - } - return OperationCanceledException; - })(); - ts.OperationCanceledException = OperationCanceledException; - var CancellationTokenObject = (function () { - function CancellationTokenObject(cancellationToken) { - this.cancellationToken = cancellationToken; - } - CancellationTokenObject.prototype.isCancellationRequested = function () { - return this.cancellationToken && this.cancellationToken.isCancellationRequested(); - }; - CancellationTokenObject.prototype.throwIfCancellationRequested = function () { - if (this.isCancellationRequested()) { - throw new OperationCanceledException(); - } - }; - CancellationTokenObject.None = new CancellationTokenObject(null); - return CancellationTokenObject; - })(); - ts.CancellationTokenObject = CancellationTokenObject; - // Cache host information about scrip Should be refreshed - // at each language service public entry point, since we don't know when - // set of scripts handled by the host changes. - var HostCache = (function () { - function HostCache(host, getCanonicalFileName) { - this.host = host; - // script id => script index - this.fileNameToEntry = ts.createFileMap(getCanonicalFileName); - // Initialize the list with the root file names - var rootFileNames = host.getScriptFileNames(); - for (var _i = 0; _i < rootFileNames.length; _i++) { - var fileName = rootFileNames[_i]; - this.createEntry(fileName); - } - // store the compilation settings - this._compilationSettings = host.getCompilationSettings() || getDefaultCompilerOptions(); - } - HostCache.prototype.compilationSettings = function () { - return this._compilationSettings; - }; - HostCache.prototype.createEntry = function (fileName) { - var entry; - var scriptSnapshot = this.host.getScriptSnapshot(fileName); - if (scriptSnapshot) { - entry = { - hostFileName: fileName, - version: this.host.getScriptVersion(fileName), - scriptSnapshot: scriptSnapshot - }; - } - this.fileNameToEntry.set(fileName, entry); - return entry; - }; - HostCache.prototype.getEntry = function (fileName) { - return this.fileNameToEntry.get(fileName); - }; - HostCache.prototype.contains = function (fileName) { - return this.fileNameToEntry.contains(fileName); - }; - HostCache.prototype.getOrCreateEntry = function (fileName) { - if (this.contains(fileName)) { - return this.getEntry(fileName); - } - return this.createEntry(fileName); - }; - HostCache.prototype.getRootFileNames = function () { - var fileNames = []; - this.fileNameToEntry.forEachValue(function (value) { - if (value) { - fileNames.push(value.hostFileName); - } - }); - return fileNames; - }; - HostCache.prototype.getVersion = function (fileName) { - var file = this.getEntry(fileName); - return file && file.version; - }; - HostCache.prototype.getScriptSnapshot = function (fileName) { - var file = this.getEntry(fileName); - return file && file.scriptSnapshot; - }; - return HostCache; - })(); - var SyntaxTreeCache = (function () { - function SyntaxTreeCache(host) { - this.host = host; - } - SyntaxTreeCache.prototype.getCurrentSourceFile = function (fileName) { - var scriptSnapshot = this.host.getScriptSnapshot(fileName); - if (!scriptSnapshot) { - // The host does not know about this file. - throw new Error("Could not find file: '" + fileName + "'."); - } - var version = this.host.getScriptVersion(fileName); - var sourceFile; - if (this.currentFileName !== fileName) { - // This is a new file, just parse it - sourceFile = createLanguageServiceSourceFile(fileName, scriptSnapshot, 2 /* Latest */, version, true); - } - else if (this.currentFileVersion !== version) { - // This is the same file, just a newer version. Incrementally parse the file. - var editRange = scriptSnapshot.getChangeRange(this.currentFileScriptSnapshot); - sourceFile = updateLanguageServiceSourceFile(this.currentSourceFile, scriptSnapshot, version, editRange); - } - if (sourceFile) { - // All done, ensure state is up to date - this.currentFileVersion = version; - this.currentFileName = fileName; - this.currentFileScriptSnapshot = scriptSnapshot; - this.currentSourceFile = sourceFile; - } - return this.currentSourceFile; - }; - return SyntaxTreeCache; - })(); - function setSourceFileFields(sourceFile, scriptSnapshot, version) { - sourceFile.version = version; - sourceFile.scriptSnapshot = scriptSnapshot; - } - /* - * This function will compile source text from 'input' argument using specified compiler options. - * If not options are provided - it will use a set of default compiler options. - * Extra compiler options that will unconditionally be used bu this function are: - * - isolatedModules = true - * - allowNonTsExtensions = true - * - noLib = true - * - noResolve = true - */ - function transpile(input, compilerOptions, fileName, diagnostics, moduleName) { - var options = compilerOptions ? ts.clone(compilerOptions) : getDefaultCompilerOptions(); - options.isolatedModules = true; - // Filename can be non-ts file. - options.allowNonTsExtensions = true; - // We are not returning a sourceFile for lib file when asked by the program, - // so pass --noLib to avoid reporting a file not found error. - options.noLib = true; - // We are not doing a full typecheck, we are not resolving the whole context, - // so pass --noResolve to avoid reporting missing file errors. - options.noResolve = true; - // Parse - var inputFileName = fileName || "module.ts"; - var sourceFile = ts.createSourceFile(inputFileName, input, options.target); - if (moduleName) { - sourceFile.moduleName = moduleName; - } - // Store syntactic diagnostics - if (diagnostics && sourceFile.parseDiagnostics) { - diagnostics.push.apply(diagnostics, sourceFile.parseDiagnostics); - } - var newLine = ts.getNewLineCharacter(options); - // Output - var outputText; - // Create a compilerHost object to allow the compiler to read and write files - var compilerHost = { - getSourceFile: function (fileName, target) { return fileName === inputFileName ? sourceFile : undefined; }, - writeFile: function (name, text, writeByteOrderMark) { - ts.Debug.assert(outputText === undefined, "Unexpected multiple outputs for the file: " + name); - outputText = text; - }, - getDefaultLibFileName: function () { return "lib.d.ts"; }, - useCaseSensitiveFileNames: function () { return false; }, - getCanonicalFileName: function (fileName) { return fileName; }, - getCurrentDirectory: function () { return ""; }, - getNewLine: function () { return newLine; } - }; - var program = ts.createProgram([inputFileName], options, compilerHost); - if (diagnostics) { - diagnostics.push.apply(diagnostics, program.getCompilerOptionsDiagnostics()); - } - // Emit - program.emit(); - ts.Debug.assert(outputText !== undefined, "Output generation failed"); - return outputText; - } - ts.transpile = transpile; - function createLanguageServiceSourceFile(fileName, scriptSnapshot, scriptTarget, version, setNodeParents) { - var text = scriptSnapshot.getText(0, scriptSnapshot.getLength()); - var sourceFile = ts.createSourceFile(fileName, text, scriptTarget, setNodeParents); - setSourceFileFields(sourceFile, scriptSnapshot, version); - // after full parsing we can use table with interned strings as name table - sourceFile.nameTable = sourceFile.identifiers; - return sourceFile; - } - ts.createLanguageServiceSourceFile = createLanguageServiceSourceFile; - ts.disableIncrementalParsing = false; - function updateLanguageServiceSourceFile(sourceFile, scriptSnapshot, version, textChangeRange, aggressiveChecks) { - // If we were given a text change range, and our version or open-ness changed, then - // incrementally parse this file. - if (textChangeRange) { - if (version !== sourceFile.version) { - // Once incremental parsing is ready, then just call into this function. - if (!ts.disableIncrementalParsing) { - var newText; - // grab the fragment from the beginning of the original text to the beginning of the span - var prefix = textChangeRange.span.start !== 0 - ? sourceFile.text.substr(0, textChangeRange.span.start) - : ""; - // grab the fragment from the end of the span till the end of the original text - var suffix = ts.textSpanEnd(textChangeRange.span) !== sourceFile.text.length - ? sourceFile.text.substr(ts.textSpanEnd(textChangeRange.span)) - : ""; - if (textChangeRange.newLength === 0) { - // edit was a deletion - just combine prefix and suffix - newText = prefix && suffix ? prefix + suffix : prefix || suffix; - } - else { - // it was actual edit, fetch the fragment of new text that correspond to new span - var changedText = scriptSnapshot.getText(textChangeRange.span.start, textChangeRange.span.start + textChangeRange.newLength); - // combine prefix, changed text and suffix - newText = prefix && suffix - ? prefix + changedText + suffix - : prefix - ? (prefix + changedText) - : (changedText + suffix); - } - var newSourceFile = ts.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks); - setSourceFileFields(newSourceFile, scriptSnapshot, version); - // after incremental parsing nameTable might not be up-to-date - // drop it so it can be lazily recreated later - newSourceFile.nameTable = undefined; - return newSourceFile; - } - } - } - // Otherwise, just create a new source file. - return createLanguageServiceSourceFile(sourceFile.fileName, scriptSnapshot, sourceFile.languageVersion, version, true); - } - ts.updateLanguageServiceSourceFile = updateLanguageServiceSourceFile; - function createGetCanonicalFileName(useCaseSensitivefileNames) { - return useCaseSensitivefileNames - ? (function (fileName) { return fileName; }) - : (function (fileName) { return fileName.toLowerCase(); }); - } - function createDocumentRegistry(useCaseSensitiveFileNames) { - // Maps from compiler setting target (ES3, ES5, etc.) to all the cached documents we have - // for those settings. - var buckets = {}; - var getCanonicalFileName = createGetCanonicalFileName(!!useCaseSensitiveFileNames); - function getKeyFromCompilationSettings(settings) { - return "_" + settings.target; // + "|" + settings.propagateEnumConstantoString() - } - function getBucketForCompilationSettings(settings, createIfMissing) { - var key = getKeyFromCompilationSettings(settings); - var bucket = ts.lookUp(buckets, key); - if (!bucket && createIfMissing) { - buckets[key] = bucket = ts.createFileMap(getCanonicalFileName); - } - return bucket; - } - function reportStats() { - var bucketInfoArray = Object.keys(buckets).filter(function (name) { return name && name.charAt(0) === '_'; }).map(function (name) { - var entries = ts.lookUp(buckets, name); - var sourceFiles = []; - for (var i in entries) { - var entry = entries.get(i); - sourceFiles.push({ - name: i, - refCount: entry.languageServiceRefCount, - references: entry.owners.slice(0) - }); - } - sourceFiles.sort(function (x, y) { return y.refCount - x.refCount; }); - return { - bucket: name, - sourceFiles: sourceFiles - }; - }); - return JSON.stringify(bucketInfoArray, null, 2); - } - function acquireDocument(fileName, compilationSettings, scriptSnapshot, version) { - return acquireOrUpdateDocument(fileName, compilationSettings, scriptSnapshot, version, true); - } - function updateDocument(fileName, compilationSettings, scriptSnapshot, version) { - return acquireOrUpdateDocument(fileName, compilationSettings, scriptSnapshot, version, false); - } - function acquireOrUpdateDocument(fileName, compilationSettings, scriptSnapshot, version, acquiring) { - var bucket = getBucketForCompilationSettings(compilationSettings, true); - var entry = bucket.get(fileName); - if (!entry) { - ts.Debug.assert(acquiring, "How could we be trying to update a document that the registry doesn't have?"); - // Have never seen this file with these settings. Create a new source file for it. - var sourceFile = createLanguageServiceSourceFile(fileName, scriptSnapshot, compilationSettings.target, version, false); - entry = { - sourceFile: sourceFile, - languageServiceRefCount: 0, - owners: [] - }; - bucket.set(fileName, entry); - } - else { - // We have an entry for this file. However, it may be for a different version of - // the script snapshot. If so, update it appropriately. Otherwise, we can just - // return it as is. - if (entry.sourceFile.version !== version) { - entry.sourceFile = updateLanguageServiceSourceFile(entry.sourceFile, scriptSnapshot, version, scriptSnapshot.getChangeRange(entry.sourceFile.scriptSnapshot)); - } - } - // If we're acquiring, then this is the first time this LS is asking for this document. - // Increase our ref count so we know there's another LS using the document. If we're - // not acquiring, then that means the LS is 'updating' the file instead, and that means - // it has already acquired the document previously. As such, we do not need to increase - // the ref count. - if (acquiring) { - entry.languageServiceRefCount++; - } - return entry.sourceFile; - } - function releaseDocument(fileName, compilationSettings) { - var bucket = getBucketForCompilationSettings(compilationSettings, false); - ts.Debug.assert(bucket !== undefined); - var entry = bucket.get(fileName); - entry.languageServiceRefCount--; - ts.Debug.assert(entry.languageServiceRefCount >= 0); - if (entry.languageServiceRefCount === 0) { - bucket.remove(fileName); - } - } - return { - acquireDocument: acquireDocument, - updateDocument: updateDocument, - releaseDocument: releaseDocument, - reportStats: reportStats - }; - } - ts.createDocumentRegistry = createDocumentRegistry; - function preProcessFile(sourceText, readImportFiles) { - if (readImportFiles === void 0) { readImportFiles = true; } - var referencedFiles = []; - var importedFiles = []; - var isNoDefaultLib = false; - function processTripleSlashDirectives() { - var commentRanges = ts.getLeadingCommentRanges(sourceText, 0); - ts.forEach(commentRanges, function (commentRange) { - var comment = sourceText.substring(commentRange.pos, commentRange.end); - var referencePathMatchResult = ts.getFileReferenceFromReferencePath(comment, commentRange); - if (referencePathMatchResult) { - isNoDefaultLib = referencePathMatchResult.isNoDefaultLib; - var fileReference = referencePathMatchResult.fileReference; - if (fileReference) { - referencedFiles.push(fileReference); - } - } - }); - } - function recordModuleName() { - var importPath = scanner.getTokenValue(); - var pos = scanner.getTokenPos(); - importedFiles.push({ - fileName: importPath, - pos: pos, - end: pos + importPath.length - }); - } - function processImport() { - scanner.setText(sourceText); - var token = scanner.scan(); - // Look for: - // import "mod"; - // import d from "mod" - // import {a as A } from "mod"; - // import * as NS from "mod" - // import d, {a, b as B} from "mod" - // import i = require("mod"); - // - // export * from "mod" - // export {a as b} from "mod" - while (token !== 1 /* EndOfFileToken */) { - if (token === 85 /* ImportKeyword */) { - token = scanner.scan(); - if (token === 8 /* StringLiteral */) { - // import "mod"; - recordModuleName(); - continue; - } - else { - if (token === 65 /* Identifier */) { - token = scanner.scan(); - if (token === 126 /* FromKeyword */) { - token = scanner.scan(); - if (token === 8 /* StringLiteral */) { - // import d from "mod"; - recordModuleName(); - continue; - } - } - else if (token === 53 /* EqualsToken */) { - token = scanner.scan(); - if (token === 120 /* RequireKeyword */) { - token = scanner.scan(); - if (token === 16 /* OpenParenToken */) { - token = scanner.scan(); - if (token === 8 /* StringLiteral */) { - // import i = require("mod"); - recordModuleName(); - continue; - } - } - } - } - else if (token === 23 /* CommaToken */) { - // consume comma and keep going - token = scanner.scan(); - } - else { - // unknown syntax - continue; - } - } - if (token === 14 /* OpenBraceToken */) { - token = scanner.scan(); - // consume "{ a as B, c, d as D}" clauses - while (token !== 15 /* CloseBraceToken */) { - token = scanner.scan(); - } - if (token === 15 /* CloseBraceToken */) { - token = scanner.scan(); - if (token === 126 /* FromKeyword */) { - token = scanner.scan(); - if (token === 8 /* StringLiteral */) { - // import {a as A} from "mod"; - // import d, {a, b as B} from "mod" - recordModuleName(); - } - } - } - } - else if (token === 35 /* AsteriskToken */) { - token = scanner.scan(); - if (token === 111 /* AsKeyword */) { - token = scanner.scan(); - if (token === 65 /* Identifier */) { - token = scanner.scan(); - if (token === 126 /* FromKeyword */) { - token = scanner.scan(); - if (token === 8 /* StringLiteral */) { - // import * as NS from "mod" - // import d, * as NS from "mod" - recordModuleName(); - } - } - } - } - } - } - } - else if (token === 78 /* ExportKeyword */) { - token = scanner.scan(); - if (token === 14 /* OpenBraceToken */) { - token = scanner.scan(); - // consume "{ a as B, c, d as D}" clauses - while (token !== 15 /* CloseBraceToken */) { - token = scanner.scan(); - } - if (token === 15 /* CloseBraceToken */) { - token = scanner.scan(); - if (token === 126 /* FromKeyword */) { - token = scanner.scan(); - if (token === 8 /* StringLiteral */) { - // export {a as A} from "mod"; - // export {a, b as B} from "mod" - recordModuleName(); - } - } - } - } - else if (token === 35 /* AsteriskToken */) { - token = scanner.scan(); - if (token === 126 /* FromKeyword */) { - token = scanner.scan(); - if (token === 8 /* StringLiteral */) { - // export * from "mod" - recordModuleName(); - } - } - } - } - token = scanner.scan(); - } - scanner.setText(undefined); - } - if (readImportFiles) { - processImport(); - } - processTripleSlashDirectives(); - return { referencedFiles: referencedFiles, importedFiles: importedFiles, isLibFile: isNoDefaultLib }; - } - ts.preProcessFile = preProcessFile; - /// Helpers - function getTargetLabel(referenceNode, labelName) { - while (referenceNode) { - if (referenceNode.kind === 197 /* LabeledStatement */ && referenceNode.label.text === labelName) { - return referenceNode.label; - } - referenceNode = referenceNode.parent; - } - return undefined; - } - function isJumpStatementTarget(node) { - return node.kind === 65 /* Identifier */ && - (node.parent.kind === 193 /* BreakStatement */ || node.parent.kind === 192 /* ContinueStatement */) && - node.parent.label === node; - } - function isLabelOfLabeledStatement(node) { - return node.kind === 65 /* Identifier */ && - node.parent.kind === 197 /* LabeledStatement */ && - node.parent.label === node; - } - /** - * Whether or not a 'node' is preceded by a label of the given string. - * Note: 'node' cannot be a SourceFile. - */ - function isLabeledBy(node, labelName) { - for (var owner = node.parent; owner.kind === 197 /* LabeledStatement */; owner = owner.parent) { - if (owner.label.text === labelName) { - return true; - } - } - return false; - } - function isLabelName(node) { - return isLabelOfLabeledStatement(node) || isJumpStatementTarget(node); - } - function isRightSideOfQualifiedName(node) { - return node.parent.kind === 128 /* QualifiedName */ && node.parent.right === node; - } - function isRightSideOfPropertyAccess(node) { - return node && node.parent && node.parent.kind === 158 /* PropertyAccessExpression */ && node.parent.name === node; - } - function isCallExpressionTarget(node) { - if (isRightSideOfPropertyAccess(node)) { - node = node.parent; - } - return node && node.parent && node.parent.kind === 160 /* CallExpression */ && node.parent.expression === node; - } - function isNewExpressionTarget(node) { - if (isRightSideOfPropertyAccess(node)) { - node = node.parent; - } - return node && node.parent && node.parent.kind === 161 /* NewExpression */ && node.parent.expression === node; - } - function isNameOfModuleDeclaration(node) { - return node.parent.kind === 208 /* ModuleDeclaration */ && node.parent.name === node; - } - function isNameOfFunctionDeclaration(node) { - return node.kind === 65 /* Identifier */ && - ts.isFunctionLike(node.parent) && node.parent.name === node; - } - /** Returns true if node is a name of an object literal property, e.g. "a" in x = { "a": 1 } */ - function isNameOfPropertyAssignment(node) { - return (node.kind === 65 /* Identifier */ || node.kind === 8 /* StringLiteral */ || node.kind === 7 /* NumericLiteral */) && - (node.parent.kind === 227 /* PropertyAssignment */ || node.parent.kind === 228 /* ShorthandPropertyAssignment */) && node.parent.name === node; - } - function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) { - if (node.kind === 8 /* StringLiteral */ || node.kind === 7 /* NumericLiteral */) { - switch (node.parent.kind) { - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 227 /* PropertyAssignment */: - case 229 /* EnumMember */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 208 /* ModuleDeclaration */: - return node.parent.name === node; - case 159 /* ElementAccessExpression */: - return node.parent.argumentExpression === node; - } - } - return false; - } - function isNameOfExternalModuleImportOrDeclaration(node) { - if (node.kind === 8 /* StringLiteral */) { - return isNameOfModuleDeclaration(node) || - (ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) && ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node); - } - return false; - } - /** Returns true if the position is within a comment */ - function isInsideComment(sourceFile, token, position) { - // The position has to be: 1. in the leading trivia (before token.getStart()), and 2. within a comment - return position <= token.getStart(sourceFile) && - (isInsideCommentRange(ts.getTrailingCommentRanges(sourceFile.text, token.getFullStart())) || - isInsideCommentRange(ts.getLeadingCommentRanges(sourceFile.text, token.getFullStart()))); - function isInsideCommentRange(comments) { - return ts.forEach(comments, function (comment) { - // either we are 1. completely inside the comment, or 2. at the end of the comment - if (comment.pos < position && position < comment.end) { - return true; - } - else if (position === comment.end) { - var text = sourceFile.text; - var width = comment.end - comment.pos; - // is single line comment or just /* - if (width <= 2 || text.charCodeAt(comment.pos + 1) === 47 /* slash */) { - return true; - } - else { - // is unterminated multi-line comment - return !(text.charCodeAt(comment.end - 1) === 47 /* slash */ && - text.charCodeAt(comment.end - 2) === 42 /* asterisk */); - } - } - return false; - }); - } - } - var SemanticMeaning; - (function (SemanticMeaning) { - SemanticMeaning[SemanticMeaning["None"] = 0] = "None"; - SemanticMeaning[SemanticMeaning["Value"] = 1] = "Value"; - SemanticMeaning[SemanticMeaning["Type"] = 2] = "Type"; - SemanticMeaning[SemanticMeaning["Namespace"] = 4] = "Namespace"; - SemanticMeaning[SemanticMeaning["All"] = 7] = "All"; - })(SemanticMeaning || (SemanticMeaning = {})); - var BreakContinueSearchType; - (function (BreakContinueSearchType) { - BreakContinueSearchType[BreakContinueSearchType["None"] = 0] = "None"; - BreakContinueSearchType[BreakContinueSearchType["Unlabeled"] = 1] = "Unlabeled"; - BreakContinueSearchType[BreakContinueSearchType["Labeled"] = 2] = "Labeled"; - BreakContinueSearchType[BreakContinueSearchType["All"] = 3] = "All"; - })(BreakContinueSearchType || (BreakContinueSearchType = {})); - // A cache of completion entries for keywords, these do not change between sessions - var keywordCompletions = []; - for (var i = 66 /* FirstKeyword */; i <= 127 /* LastKeyword */; i++) { - keywordCompletions.push({ - name: ts.tokenToString(i), - kind: ScriptElementKind.keyword, - kindModifiers: ScriptElementKindModifier.none, - sortText: "0" - }); - } - /* @internal */ function getContainerNode(node) { - while (true) { - node = node.parent; - if (!node) { - return undefined; - } - switch (node.kind) { - case 230 /* SourceFile */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - case 207 /* EnumDeclaration */: - case 208 /* ModuleDeclaration */: - return node; - } - } - } - ts.getContainerNode = getContainerNode; - /* @internal */ function getNodeKind(node) { - switch (node.kind) { - case 208 /* ModuleDeclaration */: return ScriptElementKind.moduleElement; - case 204 /* ClassDeclaration */: return ScriptElementKind.classElement; - case 205 /* InterfaceDeclaration */: return ScriptElementKind.interfaceElement; - case 206 /* TypeAliasDeclaration */: return ScriptElementKind.typeElement; - case 207 /* EnumDeclaration */: return ScriptElementKind.enumElement; - case 201 /* VariableDeclaration */: - return ts.isConst(node) - ? ScriptElementKind.constElement - : ts.isLet(node) - ? ScriptElementKind.letElement - : ScriptElementKind.variableElement; - case 203 /* FunctionDeclaration */: return ScriptElementKind.functionElement; - case 138 /* GetAccessor */: return ScriptElementKind.memberGetAccessorElement; - case 139 /* SetAccessor */: return ScriptElementKind.memberSetAccessorElement; - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - return ScriptElementKind.memberFunctionElement; - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - return ScriptElementKind.memberVariableElement; - case 142 /* IndexSignature */: return ScriptElementKind.indexSignatureElement; - case 141 /* ConstructSignature */: return ScriptElementKind.constructSignatureElement; - case 140 /* CallSignature */: return ScriptElementKind.callSignatureElement; - case 137 /* Constructor */: return ScriptElementKind.constructorImplementationElement; - case 130 /* TypeParameter */: return ScriptElementKind.typeParameterElement; - case 229 /* EnumMember */: return ScriptElementKind.variableElement; - case 131 /* Parameter */: return (node.flags & 112 /* AccessibilityModifier */) ? ScriptElementKind.memberVariableElement : ScriptElementKind.parameterElement; - case 211 /* ImportEqualsDeclaration */: - case 216 /* ImportSpecifier */: - case 213 /* ImportClause */: - case 220 /* ExportSpecifier */: - case 214 /* NamespaceImport */: - return ScriptElementKind.alias; - } - return ScriptElementKind.unknown; - } - ts.getNodeKind = getNodeKind; - function createLanguageService(host, documentRegistry) { - if (documentRegistry === void 0) { documentRegistry = createDocumentRegistry(); } - var syntaxTreeCache = new SyntaxTreeCache(host); - var ruleProvider; - var program; - var lastProjectVersion; - var useCaseSensitivefileNames = false; - var cancellationToken = new CancellationTokenObject(host.getCancellationToken && host.getCancellationToken()); - // Check if the localized messages json is set, otherwise query the host for it - if (!ts.localizedDiagnosticMessages && host.getLocalizedDiagnosticMessages) { - ts.localizedDiagnosticMessages = host.getLocalizedDiagnosticMessages(); - } - function log(message) { - if (host.log) { - host.log(message); - } - } - var getCanonicalFileName = createGetCanonicalFileName(useCaseSensitivefileNames); - function getValidSourceFile(fileName) { - fileName = ts.normalizeSlashes(fileName); - var sourceFile = program.getSourceFile(getCanonicalFileName(fileName)); - if (!sourceFile) { - throw new Error("Could not find file: '" + fileName + "'."); - } - return sourceFile; - } - function getRuleProvider(options) { - // Ensure rules are initialized and up to date wrt to formatting options - if (!ruleProvider) { - ruleProvider = new ts.formatting.RulesProvider(); - } - ruleProvider.ensureUpToDate(options); - return ruleProvider; - } - function synchronizeHostData() { - // perform fast check if host supports it - if (host.getProjectVersion) { - var hostProjectVersion = host.getProjectVersion(); - if (hostProjectVersion) { - if (lastProjectVersion === hostProjectVersion) { - return; - } - lastProjectVersion = hostProjectVersion; - } - } - // Get a fresh cache of the host information - var hostCache = new HostCache(host, getCanonicalFileName); - // If the program is already up-to-date, we can reuse it - if (programUpToDate()) { - return; - } - // IMPORTANT - It is critical from this moment onward that we do not check - // cancellation tokens. We are about to mutate source files from a previous program - // instance. If we cancel midway through, we may end up in an inconsistent state where - // the program points to old source files that have been invalidated because of - // incremental parsing. - var oldSettings = program && program.getCompilerOptions(); - var newSettings = hostCache.compilationSettings(); - var changesInCompilationSettingsAffectSyntax = oldSettings && oldSettings.target !== newSettings.target; - // Now create a new compiler - var newProgram = ts.createProgram(hostCache.getRootFileNames(), newSettings, { - getSourceFile: getOrCreateSourceFile, - getCancellationToken: function () { return cancellationToken; }, - getCanonicalFileName: getCanonicalFileName, - useCaseSensitiveFileNames: function () { return useCaseSensitivefileNames; }, - getNewLine: function () { return host.getNewLine ? host.getNewLine() : "\r\n"; }, - getDefaultLibFileName: function (options) { return host.getDefaultLibFileName(options); }, - writeFile: function (fileName, data, writeByteOrderMark) { }, - getCurrentDirectory: function () { return host.getCurrentDirectory(); } - }); - // Release any files we have acquired in the old program but are - // not part of the new program. - if (program) { - var oldSourceFiles = program.getSourceFiles(); - for (var _i = 0; _i < oldSourceFiles.length; _i++) { - var oldSourceFile = oldSourceFiles[_i]; - var fileName = oldSourceFile.fileName; - if (!newProgram.getSourceFile(fileName) || changesInCompilationSettingsAffectSyntax) { - documentRegistry.releaseDocument(fileName, oldSettings); - } - } - } - // hostCache is captured in the closure for 'getOrCreateSourceFile' but it should not be used past this point. - // It needs to be cleared to allow all collected snapshots to be released - hostCache = undefined; - program = newProgram; - // Make sure all the nodes in the program are both bound, and have their parent - // pointers set property. - program.getTypeChecker(); - return; - function getOrCreateSourceFile(fileName) { - ts.Debug.assert(hostCache !== undefined); - // The program is asking for this file, check first if the host can locate it. - // If the host can not locate the file, then it does not exist. return undefined - // to the program to allow reporting of errors for missing files. - var hostFileInformation = hostCache.getOrCreateEntry(fileName); - if (!hostFileInformation) { - return undefined; - } - // Check if the language version has changed since we last created a program; if they are the same, - // it is safe to reuse the souceFiles; if not, then the shape of the AST can change, and the oldSourceFile - // can not be reused. we have to dump all syntax trees and create new ones. - if (!changesInCompilationSettingsAffectSyntax) { - // Check if the old program had this file already - var oldSourceFile = program && program.getSourceFile(fileName); - if (oldSourceFile) { - // We already had a source file for this file name. Go to the registry to - // ensure that we get the right up to date version of it. We need this to - // address the following 'race'. Specifically, say we have the following: - // - // LS1 - // \ - // DocumentRegistry - // / - // LS2 - // - // Each LS has a reference to file 'foo.ts' at version 1. LS2 then updates - // it's version of 'foo.ts' to version 2. This will cause LS2 and the - // DocumentRegistry to have version 2 of the document. HOwever, LS1 will - // have version 1. And *importantly* this source file will be *corrupt*. - // The act of creating version 2 of the file irrevocably damages the version - // 1 file. - // - // So, later when we call into LS1, we need to make sure that it doesn't use - // it's source file any more, and instead defers to DocumentRegistry to get - // either version 1, version 2 (or some other version) depending on what the - // host says should be used. - return documentRegistry.updateDocument(fileName, newSettings, hostFileInformation.scriptSnapshot, hostFileInformation.version); - } - } - // Could not find this file in the old program, create a new SourceFile for it. - return documentRegistry.acquireDocument(fileName, newSettings, hostFileInformation.scriptSnapshot, hostFileInformation.version); - } - function sourceFileUpToDate(sourceFile) { - return sourceFile && sourceFile.version === hostCache.getVersion(sourceFile.fileName); - } - function programUpToDate() { - // If we haven't create a program yet, then it is not up-to-date - if (!program) { - return false; - } - // If number of files in the program do not match, it is not up-to-date - var rootFileNames = hostCache.getRootFileNames(); - if (program.getSourceFiles().length !== rootFileNames.length) { - return false; - } - // If any file is not up-to-date, then the whole program is not up-to-date - for (var _i = 0; _i < rootFileNames.length; _i++) { - var fileName = rootFileNames[_i]; - if (!sourceFileUpToDate(program.getSourceFile(fileName))) { - return false; - } - } - // If the compilation settings do no match, then the program is not up-to-date - return ts.compareDataObjects(program.getCompilerOptions(), hostCache.compilationSettings()); - } - } - function getProgram() { - synchronizeHostData(); - return program; - } - function cleanupSemanticCache() { - // TODO: Should we jettison the program (or it's type checker) here? - } - function dispose() { - if (program) { - ts.forEach(program.getSourceFiles(), function (f) { - return documentRegistry.releaseDocument(f.fileName, program.getCompilerOptions()); - }); - } - } - /// Diagnostics - function getSyntacticDiagnostics(fileName) { - synchronizeHostData(); - return program.getSyntacticDiagnostics(getValidSourceFile(fileName)); - } - /** - * getSemanticDiagnostiscs return array of Diagnostics. If '-d' is not enabled, only report semantic errors - * If '-d' enabled, report both semantic and emitter errors - */ - function getSemanticDiagnostics(fileName) { - synchronizeHostData(); - var targetSourceFile = getValidSourceFile(fileName); - // For JavaScript files, we don't want to report the normal typescript semantic errors. - // Instead, we just report errors for using TypeScript-only constructs from within a - // JavaScript file. - if (ts.isJavaScript(fileName)) { - return getJavaScriptSemanticDiagnostics(targetSourceFile); - } - // Only perform the action per file regardless of '-out' flag as LanguageServiceHost is expected to call this function per file. - // Therefore only get diagnostics for given file. - var semanticDiagnostics = program.getSemanticDiagnostics(targetSourceFile); - if (!program.getCompilerOptions().declaration) { - return semanticDiagnostics; - } - // If '-d' is enabled, check for emitter error. One example of emitter error is export class implements non-export interface - var declarationDiagnostics = program.getDeclarationDiagnostics(targetSourceFile); - return ts.concatenate(semanticDiagnostics, declarationDiagnostics); - } - function getJavaScriptSemanticDiagnostics(sourceFile) { - var diagnostics = []; - walk(sourceFile); - return diagnostics; - function walk(node) { - if (!node) { - return false; - } - switch (node.kind) { - case 211 /* ImportEqualsDeclaration */: - diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.import_can_only_be_used_in_a_ts_file)); - return true; - case 217 /* ExportAssignment */: - diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.export_can_only_be_used_in_a_ts_file)); - return true; - case 204 /* ClassDeclaration */: - var classDeclaration = node; - if (checkModifiers(classDeclaration.modifiers) || - checkTypeParameters(classDeclaration.typeParameters)) { - return true; - } - break; - case 225 /* HeritageClause */: - var heritageClause = node; - if (heritageClause.token === 102 /* ImplementsKeyword */) { - diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.implements_clauses_can_only_be_used_in_a_ts_file)); - return true; - } - break; - case 205 /* InterfaceDeclaration */: - diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.interface_declarations_can_only_be_used_in_a_ts_file)); - return true; - case 208 /* ModuleDeclaration */: - diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.module_declarations_can_only_be_used_in_a_ts_file)); - return true; - case 206 /* TypeAliasDeclaration */: - diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.type_aliases_can_only_be_used_in_a_ts_file)); - return true; - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 137 /* Constructor */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 165 /* FunctionExpression */: - case 203 /* FunctionDeclaration */: - case 166 /* ArrowFunction */: - case 203 /* FunctionDeclaration */: - var functionDeclaration = node; - if (checkModifiers(functionDeclaration.modifiers) || - checkTypeParameters(functionDeclaration.typeParameters) || - checkTypeAnnotation(functionDeclaration.type)) { - return true; - } - break; - case 183 /* VariableStatement */: - var variableStatement = node; - if (checkModifiers(variableStatement.modifiers)) { - return true; - } - break; - case 201 /* VariableDeclaration */: - var variableDeclaration = node; - if (checkTypeAnnotation(variableDeclaration.type)) { - return true; - } - break; - case 160 /* CallExpression */: - case 161 /* NewExpression */: - var expression = node; - if (expression.typeArguments && expression.typeArguments.length > 0) { - var start = expression.typeArguments.pos; - diagnostics.push(ts.createFileDiagnostic(sourceFile, start, expression.typeArguments.end - start, ts.Diagnostics.type_arguments_can_only_be_used_in_a_ts_file)); - return true; - } - break; - case 131 /* Parameter */: - var parameter = node; - if (parameter.modifiers) { - var start = parameter.modifiers.pos; - diagnostics.push(ts.createFileDiagnostic(sourceFile, start, parameter.modifiers.end - start, ts.Diagnostics.parameter_modifiers_can_only_be_used_in_a_ts_file)); - return true; - } - if (parameter.questionToken) { - diagnostics.push(ts.createDiagnosticForNode(parameter.questionToken, ts.Diagnostics._0_can_only_be_used_in_a_ts_file, '?')); - return true; - } - if (parameter.type) { - diagnostics.push(ts.createDiagnosticForNode(parameter.type, ts.Diagnostics.types_can_only_be_used_in_a_ts_file)); - return true; - } - break; - case 134 /* PropertyDeclaration */: - diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.property_declarations_can_only_be_used_in_a_ts_file)); - return true; - case 207 /* EnumDeclaration */: - diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.enum_declarations_can_only_be_used_in_a_ts_file)); - return true; - case 163 /* TypeAssertionExpression */: - var typeAssertionExpression = node; - diagnostics.push(ts.createDiagnosticForNode(typeAssertionExpression.type, ts.Diagnostics.type_assertion_expressions_can_only_be_used_in_a_ts_file)); - return true; - case 132 /* Decorator */: - diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.decorators_can_only_be_used_in_a_ts_file)); - return true; - } - return ts.forEachChild(node, walk); - } - function checkTypeParameters(typeParameters) { - if (typeParameters) { - var start = typeParameters.pos; - diagnostics.push(ts.createFileDiagnostic(sourceFile, start, typeParameters.end - start, ts.Diagnostics.type_parameter_declarations_can_only_be_used_in_a_ts_file)); - return true; - } - return false; - } - function checkTypeAnnotation(type) { - if (type) { - diagnostics.push(ts.createDiagnosticForNode(type, ts.Diagnostics.types_can_only_be_used_in_a_ts_file)); - return true; - } - return false; - } - function checkModifiers(modifiers) { - if (modifiers) { - for (var _i = 0; _i < modifiers.length; _i++) { - var modifier = modifiers[_i]; - switch (modifier.kind) { - case 108 /* PublicKeyword */: - case 106 /* PrivateKeyword */: - case 107 /* ProtectedKeyword */: - case 115 /* DeclareKeyword */: - diagnostics.push(ts.createDiagnosticForNode(modifier, ts.Diagnostics._0_can_only_be_used_in_a_ts_file, ts.tokenToString(modifier.kind))); - return true; - // These are all legal modifiers. - case 109 /* StaticKeyword */: - case 78 /* ExportKeyword */: - case 70 /* ConstKeyword */: - case 73 /* DefaultKeyword */: - } - } - } - return false; - } - } - function getCompilerOptionsDiagnostics() { - synchronizeHostData(); - return program.getGlobalDiagnostics(); - } - /// Completion - function getCompletionEntryDisplayNameForSymbol(symbol, target, performCharacterChecks) { - var displayName = symbol.getName(); - if (displayName) { - // If this is the default export, get the name of the declaration if it exists - if (displayName === "default") { - var localSymbol = ts.getLocalSymbolForExportDefault(symbol); - if (localSymbol && localSymbol.name) { - displayName = symbol.valueDeclaration.localSymbol.name; - } - } - var firstCharCode = displayName.charCodeAt(0); - // First check of the displayName is not external module; if it is an external module, it is not valid entry - if ((symbol.flags & 1536 /* Namespace */) && (firstCharCode === 39 /* singleQuote */ || firstCharCode === 34 /* doubleQuote */)) { - // If the symbol is external module, don't show it in the completion list - // (i.e declare module "http" { let x; } | // <= request completion here, "http" should not be there) - return undefined; - } - } - return getCompletionEntryDisplayName(displayName, target, performCharacterChecks); - } - function getCompletionEntryDisplayName(displayName, target, performCharacterChecks) { - if (!displayName) { - return undefined; - } - var firstCharCode = displayName.charCodeAt(0); - if (displayName.length >= 2 && - firstCharCode === displayName.charCodeAt(displayName.length - 1) && - (firstCharCode === 39 /* singleQuote */ || firstCharCode === 34 /* doubleQuote */)) { - // If the user entered name for the symbol was quoted, removing the quotes is not enough, as the name could be an - // invalid identifier name. We need to check if whatever was inside the quotes is actually a valid identifier name. - displayName = displayName.substring(1, displayName.length - 1); - } - if (!displayName) { - return undefined; - } - if (performCharacterChecks) { - if (!ts.isIdentifierStart(displayName.charCodeAt(0), target)) { - return undefined; - } - for (var i = 1, n = displayName.length; i < n; i++) { - if (!ts.isIdentifierPart(displayName.charCodeAt(i), target)) { - return undefined; - } - } - } - return ts.unescapeIdentifier(displayName); - } - function getCompletionData(fileName, position) { - var typeChecker = program.getTypeChecker(); - var syntacticStart = new Date().getTime(); - var sourceFile = getValidSourceFile(fileName); - var isJavaScriptFile = ts.isJavaScript(fileName); - var start = new Date().getTime(); - var currentToken = ts.getTokenAtPosition(sourceFile, position); - log("getCompletionData: Get current token: " + (new Date().getTime() - start)); - start = new Date().getTime(); - // Completion not allowed inside comments, bail out if this is the case - var insideComment = isInsideComment(sourceFile, currentToken, position); - log("getCompletionData: Is inside comment: " + (new Date().getTime() - start)); - if (insideComment) { - log("Returning an empty list because completion was inside a comment."); - return undefined; - } - start = new Date().getTime(); - var previousToken = ts.findPrecedingToken(position, sourceFile); - log("getCompletionData: Get previous token 1: " + (new Date().getTime() - start)); - // The decision to provide completion depends on the contextToken, which is determined through the previousToken. - // Note: 'previousToken' (and thus 'contextToken') can be undefined if we are the beginning of the file - var contextToken = previousToken; - // Check if the caret is at the end of an identifier; this is a partial identifier that we want to complete: e.g. a.toS| - // Skip this partial identifier and adjust the contextToken to the token that precedes it. - if (contextToken && position <= contextToken.end && ts.isWord(contextToken.kind)) { - var start_2 = new Date().getTime(); - contextToken = ts.findPrecedingToken(contextToken.getFullStart(), sourceFile); - log("getCompletionData: Get previous token 2: " + (new Date().getTime() - start_2)); - } - // Check if this is a valid completion location - if (contextToken && isCompletionListBlocker(contextToken)) { - log("Returning an empty list because completion was requested in an invalid position."); - return undefined; - } - // Find the node where completion is requested on, in the case of a completion after - // a dot, it is the member access expression other wise, it is a request for all - // visible symbols in the scope, and the node is the current location. - var node = currentToken; - var isRightOfDot = false; - if (contextToken && contextToken.kind === 20 /* DotToken */ && contextToken.parent.kind === 158 /* PropertyAccessExpression */) { - node = contextToken.parent.expression; - isRightOfDot = true; - } - else if (contextToken && contextToken.kind === 20 /* DotToken */ && contextToken.parent.kind === 128 /* QualifiedName */) { - node = contextToken.parent.left; - isRightOfDot = true; - } - var location = ts.getTouchingPropertyName(sourceFile, position); - var target = program.getCompilerOptions().target; - var semanticStart = new Date().getTime(); - var isMemberCompletion; - var isNewIdentifierLocation; - var symbols = []; - if (isRightOfDot) { - getTypeScriptMemberSymbols(); - } - else { - // For JavaScript or TypeScript, if we're not after a dot, then just try to get the - // global symbols in scope. These results should be valid for either language as - // the set of symbols that can be referenced from this location. - if (!tryGetGlobalSymbols()) { - return undefined; - } - } - log("getCompletionData: Semantic work: " + (new Date().getTime() - semanticStart)); - return { symbols: symbols, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, location: location, isRightOfDot: isRightOfDot }; - function getTypeScriptMemberSymbols() { - // Right of dot member completion list - isMemberCompletion = true; - isNewIdentifierLocation = false; - if (node.kind === 65 /* Identifier */ || node.kind === 128 /* QualifiedName */ || node.kind === 158 /* PropertyAccessExpression */) { - var symbol = typeChecker.getSymbolAtLocation(node); - // This is an alias, follow what it aliases - if (symbol && symbol.flags & 8388608 /* Alias */) { - symbol = typeChecker.getAliasedSymbol(symbol); - } - if (symbol && symbol.flags & 1952 /* HasExports */) { - // Extract module or enum members - var exportedSymbols = typeChecker.getExportsOfModule(symbol); - ts.forEach(exportedSymbols, function (symbol) { - if (typeChecker.isValidPropertyAccess((node.parent), symbol.name)) { - symbols.push(symbol); - } - }); - } - } - var type = typeChecker.getTypeAtLocation(node); - addTypeProperties(type); - } - function addTypeProperties(type) { - if (type) { - // Filter private properties - for (var _i = 0, _a = type.getApparentProperties(); _i < _a.length; _i++) { - var symbol = _a[_i]; - if (typeChecker.isValidPropertyAccess((node.parent), symbol.name)) { - symbols.push(symbol); - } - } - if (isJavaScriptFile && type.flags & 16384 /* Union */) { - // In javascript files, for union types, we don't just get the members that - // the individual types have in common, we also include all the members that - // each individual type has. This is because we're going to add all identifiers - // anyways. So we might as well elevate the members that were at least part - // of the individual types to a higher status since we know what they are. - var unionType = type; - for (var _b = 0, _c = unionType.types; _b < _c.length; _b++) { - var elementType = _c[_b]; - addTypeProperties(elementType); - } - } - } - } - function tryGetGlobalSymbols() { - var containingObjectLiteral = getContainingObjectLiteralApplicableForCompletion(contextToken); - if (containingObjectLiteral) { - // Object literal expression, look up possible property names from contextual type - isMemberCompletion = true; - isNewIdentifierLocation = true; - var contextualType = typeChecker.getContextualType(containingObjectLiteral); - if (!contextualType) { - return false; - } - var contextualTypeMembers = typeChecker.getPropertiesOfType(contextualType); - if (contextualTypeMembers && contextualTypeMembers.length > 0) { - // Add filtered items to the completion list - symbols = filterContextualMembersList(contextualTypeMembers, containingObjectLiteral.properties); - } - } - else if (ts.getAncestor(contextToken, 213 /* ImportClause */)) { - // cursor is in import clause - // try to show exported member for imported module - isMemberCompletion = true; - isNewIdentifierLocation = true; - if (showCompletionsInImportsClause(contextToken)) { - var importDeclaration = ts.getAncestor(contextToken, 212 /* ImportDeclaration */); - ts.Debug.assert(importDeclaration !== undefined); - var exports; - if (importDeclaration.moduleSpecifier) { - var moduleSpecifierSymbol = typeChecker.getSymbolAtLocation(importDeclaration.moduleSpecifier); - if (moduleSpecifierSymbol) { - exports = typeChecker.getExportsOfModule(moduleSpecifierSymbol); - } - } - //let exports = typeInfoResolver.getExportsOfImportDeclaration(importDeclaration); - symbols = exports ? filterModuleExports(exports, importDeclaration) : emptyArray; - } - } - else { - // Get all entities in the current scope. - isMemberCompletion = false; - isNewIdentifierLocation = isNewIdentifierDefinitionLocation(contextToken); - if (previousToken !== contextToken) { - ts.Debug.assert(!!previousToken, "Expected 'contextToken' to be defined when different from 'previousToken'."); - } - // We need to find the node that will give us an appropriate scope to begin - // aggregating completion candidates. This is achieved in 'getScopeNode' - // by finding the first node that encompasses a position, accounting for whether a node - // is "complete" to decide whether a position belongs to the node. - // - // However, at the end of an identifier, we are interested in the scope of the identifier - // itself, but fall outside of the identifier. For instance: - // - // xyz => x$ - // - // the cursor is outside of both the 'x' and the arrow function 'xyz => x', - // so 'xyz' is not returned in our results. - // - // We define 'adjustedPosition' so that we may appropriately account for - // being at the end of an identifier. The intention is that if requesting completion - // at the end of an identifier, it should be effectively equivalent to requesting completion - // anywhere inside/at the beginning of the identifier. So in the previous case, the - // 'adjustedPosition' will work as if requesting completion in the following: - // - // xyz => $x - // - // If previousToken !== contextToken, then - // - 'contextToken' was adjusted to the token prior to 'previousToken' - // because we were at the end of an identifier. - // - 'previousToken' is defined. - var adjustedPosition = previousToken !== contextToken ? - previousToken.getStart() : - position; - var scopeNode = getScopeNode(contextToken, adjustedPosition, sourceFile) || sourceFile; - /// TODO filter meaning based on the current context - var symbolMeanings = 793056 /* Type */ | 107455 /* Value */ | 1536 /* Namespace */ | 8388608 /* Alias */; - symbols = typeChecker.getSymbolsInScope(scopeNode, symbolMeanings); - } - return true; - } - /** - * Finds the first node that "embraces" the position, so that one may - * accurately aggregate locals from the closest containing scope. - */ - function getScopeNode(initialToken, position, sourceFile) { - var scope = initialToken; - while (scope && !ts.positionBelongsToNode(scope, position, sourceFile)) { - scope = scope.parent; - } - return scope; - } - function isCompletionListBlocker(previousToken) { - var start = new Date().getTime(); - var result = isInStringOrRegularExpressionOrTemplateLiteral(previousToken) || - isIdentifierDefinitionLocation(previousToken) || - isRightOfIllegalDot(previousToken); - log("getCompletionsAtPosition: isCompletionListBlocker: " + (new Date().getTime() - start)); - return result; - } - function showCompletionsInImportsClause(node) { - if (node) { - // import {| - // import {a,| - if (node.kind === 14 /* OpenBraceToken */ || node.kind === 23 /* CommaToken */) { - return node.parent.kind === 215 /* NamedImports */; - } - } - return false; - } - function isNewIdentifierDefinitionLocation(previousToken) { - if (previousToken) { - var containingNodeKind = previousToken.parent.kind; - switch (previousToken.kind) { - case 23 /* CommaToken */: - return containingNodeKind === 160 /* CallExpression */ // func( a, | - || containingNodeKind === 137 /* Constructor */ // constructor( a, | public, protected, private keywords are allowed here, so show completion - || containingNodeKind === 161 /* NewExpression */ // new C(a, | - || containingNodeKind === 156 /* ArrayLiteralExpression */ // [a, | - || containingNodeKind === 172 /* BinaryExpression */ // let x = (a, | - || containingNodeKind === 145 /* FunctionType */; // var x: (s: string, list| - case 16 /* OpenParenToken */: - return containingNodeKind === 160 /* CallExpression */ // func( | - || containingNodeKind === 137 /* Constructor */ // constructor( | - || containingNodeKind === 161 /* NewExpression */ // new C(a| - || containingNodeKind === 164 /* ParenthesizedExpression */ // let x = (a| - || containingNodeKind === 152 /* ParenthesizedType */; // function F(pred: (a| this can become an arrow function, where 'a' is the argument - case 18 /* OpenBracketToken */: - return containingNodeKind === 156 /* ArrayLiteralExpression */; // [ | - case 118 /* ModuleKeyword */: // module | - case 119 /* NamespaceKeyword */: - return true; - case 20 /* DotToken */: - return containingNodeKind === 208 /* ModuleDeclaration */; // module A.| - case 14 /* OpenBraceToken */: - return containingNodeKind === 204 /* ClassDeclaration */; // class A{ | - case 53 /* EqualsToken */: - return containingNodeKind === 201 /* VariableDeclaration */ // let x = a| - || containingNodeKind === 172 /* BinaryExpression */; // x = a| - case 11 /* TemplateHead */: - return containingNodeKind === 174 /* TemplateExpression */; // `aa ${| - case 12 /* TemplateMiddle */: - return containingNodeKind === 180 /* TemplateSpan */; // `aa ${10} dd ${| - case 108 /* PublicKeyword */: - case 106 /* PrivateKeyword */: - case 107 /* ProtectedKeyword */: - return containingNodeKind === 134 /* PropertyDeclaration */; // class A{ public | - } - // Previous token may have been a keyword that was converted to an identifier. - switch (previousToken.getText()) { - case "public": - case "protected": - case "private": - return true; - } - } - return false; - } - function isInStringOrRegularExpressionOrTemplateLiteral(previousToken) { - if (previousToken.kind === 8 /* StringLiteral */ - || previousToken.kind === 9 /* RegularExpressionLiteral */ - || ts.isTemplateLiteralKind(previousToken.kind)) { - var start_3 = previousToken.getStart(); - var end = previousToken.getEnd(); - // To be "in" one of these literals, the position has to be: - // 1. entirely within the token text. - // 2. at the end position of an unterminated token. - // 3. at the end of a regular expression (due to trailing flags like '/foo/g'). - if (start_3 < position && position < end) { - return true; - } - if (position === end) { - return !!previousToken.isUnterminated || - previousToken.kind === 9 /* RegularExpressionLiteral */; - } - } - return false; - } - function getContainingObjectLiteralApplicableForCompletion(previousToken) { - // The locations in an object literal expression that are applicable for completion are property name definition locations. - if (previousToken) { - var parent_10 = previousToken.parent; - switch (previousToken.kind) { - case 14 /* OpenBraceToken */: // let x = { | - case 23 /* CommaToken */: - if (parent_10 && parent_10.kind === 157 /* ObjectLiteralExpression */) { - return parent_10; - } - break; - } - } - return undefined; - } - function isFunction(kind) { - switch (kind) { - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - case 203 /* FunctionDeclaration */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 140 /* CallSignature */: - case 141 /* ConstructSignature */: - case 142 /* IndexSignature */: - return true; - } - return false; - } - function isIdentifierDefinitionLocation(previousToken) { - if (previousToken) { - var containingNodeKind = previousToken.parent.kind; - switch (previousToken.kind) { - case 23 /* CommaToken */: - return containingNodeKind === 201 /* VariableDeclaration */ || - containingNodeKind === 202 /* VariableDeclarationList */ || - containingNodeKind === 183 /* VariableStatement */ || - containingNodeKind === 207 /* EnumDeclaration */ || - isFunction(containingNodeKind) || - containingNodeKind === 204 /* ClassDeclaration */ || - containingNodeKind === 203 /* FunctionDeclaration */ || - containingNodeKind === 205 /* InterfaceDeclaration */ || - containingNodeKind === 154 /* ArrayBindingPattern */ || - containingNodeKind === 153 /* ObjectBindingPattern */; // function func({ x, y| - case 20 /* DotToken */: - return containingNodeKind === 154 /* ArrayBindingPattern */; // var [.| - case 51 /* ColonToken */: - return containingNodeKind === 155 /* BindingElement */; // var {x :html| - case 18 /* OpenBracketToken */: - return containingNodeKind === 154 /* ArrayBindingPattern */; // var [x| - case 16 /* OpenParenToken */: - return containingNodeKind === 226 /* CatchClause */ || - isFunction(containingNodeKind); - case 14 /* OpenBraceToken */: - return containingNodeKind === 207 /* EnumDeclaration */ || - containingNodeKind === 205 /* InterfaceDeclaration */ || - containingNodeKind === 148 /* TypeLiteral */ || - containingNodeKind === 153 /* ObjectBindingPattern */; // function func({ x| - case 22 /* SemicolonToken */: - return containingNodeKind === 133 /* PropertySignature */ && - previousToken.parent && previousToken.parent.parent && - (previousToken.parent.parent.kind === 205 /* InterfaceDeclaration */ || - previousToken.parent.parent.kind === 148 /* TypeLiteral */); // let x : { a; | - case 24 /* LessThanToken */: - return containingNodeKind === 204 /* ClassDeclaration */ || - containingNodeKind === 203 /* FunctionDeclaration */ || - containingNodeKind === 205 /* InterfaceDeclaration */ || - isFunction(containingNodeKind); - case 109 /* StaticKeyword */: - return containingNodeKind === 134 /* PropertyDeclaration */; - case 21 /* DotDotDotToken */: - return containingNodeKind === 131 /* Parameter */ || - containingNodeKind === 137 /* Constructor */ || - (previousToken.parent && previousToken.parent.parent && - previousToken.parent.parent.kind === 154 /* ArrayBindingPattern */); // var [...z| - case 108 /* PublicKeyword */: - case 106 /* PrivateKeyword */: - case 107 /* ProtectedKeyword */: - return containingNodeKind === 131 /* Parameter */; - case 69 /* ClassKeyword */: - case 77 /* EnumKeyword */: - case 103 /* InterfaceKeyword */: - case 83 /* FunctionKeyword */: - case 98 /* VarKeyword */: - case 116 /* GetKeyword */: - case 122 /* SetKeyword */: - case 85 /* ImportKeyword */: - case 104 /* LetKeyword */: - case 70 /* ConstKeyword */: - case 110 /* YieldKeyword */: - case 125 /* TypeKeyword */: - return true; - } - // Previous token may have been a keyword that was converted to an identifier. - switch (previousToken.getText()) { - case "class": - case "interface": - case "enum": - case "function": - case "var": - case "static": - case "let": - case "const": - case "yield": - return true; - } - } - return false; - } - function isRightOfIllegalDot(previousToken) { - if (previousToken && previousToken.kind === 7 /* NumericLiteral */) { - var text = previousToken.getFullText(); - return text.charAt(text.length - 1) === "."; - } - return false; - } - function filterModuleExports(exports, importDeclaration) { - var exisingImports = {}; - if (!importDeclaration.importClause) { - return exports; - } - if (importDeclaration.importClause.namedBindings && - importDeclaration.importClause.namedBindings.kind === 215 /* NamedImports */) { - ts.forEach(importDeclaration.importClause.namedBindings.elements, function (el) { - var name = el.propertyName || el.name; - exisingImports[name.text] = true; - }); - } - if (ts.isEmpty(exisingImports)) { - return exports; - } - return ts.filter(exports, function (e) { return !ts.lookUp(exisingImports, e.name); }); - } - function filterContextualMembersList(contextualMemberSymbols, existingMembers) { - if (!existingMembers || existingMembers.length === 0) { - return contextualMemberSymbols; - } - var existingMemberNames = {}; - ts.forEach(existingMembers, function (m) { - if (m.kind !== 227 /* PropertyAssignment */ && m.kind !== 228 /* ShorthandPropertyAssignment */) { - // Ignore omitted expressions for missing members in the object literal - return; - } - if (m.getStart() <= position && position <= m.getEnd()) { - // If this is the current item we are editing right now, do not filter it out - return; - } - // TODO(jfreeman): Account for computed property name - existingMemberNames[m.name.text] = true; - }); - var filteredMembers = []; - ts.forEach(contextualMemberSymbols, function (s) { - if (!existingMemberNames[s.name]) { - filteredMembers.push(s); - } - }); - return filteredMembers; - } - } - function getCompletionsAtPosition(fileName, position) { - synchronizeHostData(); - var completionData = getCompletionData(fileName, position); - if (!completionData) { - return undefined; - } - var symbols = completionData.symbols, isMemberCompletion = completionData.isMemberCompletion, isNewIdentifierLocation = completionData.isNewIdentifierLocation, location = completionData.location, isRightOfDot = completionData.isRightOfDot; - var entries; - if (isRightOfDot && ts.isJavaScript(fileName)) { - entries = getCompletionEntriesFromSymbols(symbols); - ts.addRange(entries, getJavaScriptCompletionEntries()); - } - else { - if (!symbols || symbols.length === 0) { - return undefined; - } - entries = getCompletionEntriesFromSymbols(symbols); - } - // Add keywords if this is not a member completion list - if (!isMemberCompletion) { - ts.addRange(entries, keywordCompletions); - } - return { isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, entries: entries }; - function getJavaScriptCompletionEntries() { - var entries = []; - var allNames = {}; - var target = program.getCompilerOptions().target; - for (var _i = 0, _a = program.getSourceFiles(); _i < _a.length; _i++) { - var sourceFile = _a[_i]; - var nameTable = getNameTable(sourceFile); - for (var name_30 in nameTable) { - if (!allNames[name_30]) { - allNames[name_30] = name_30; - var displayName = getCompletionEntryDisplayName(name_30, target, true); - if (displayName) { - var entry = { - name: displayName, - kind: ScriptElementKind.warning, - kindModifiers: "", - sortText: "1" - }; - entries.push(entry); - } - } - } - } - return entries; - } - function createCompletionEntry(symbol, location) { - // Try to get a valid display name for this symbol, if we could not find one, then ignore it. - // We would like to only show things that can be added after a dot, so for instance numeric properties can - // not be accessed with a dot (a.1 <- invalid) - var displayName = getCompletionEntryDisplayNameForSymbol(symbol, program.getCompilerOptions().target, true); - if (!displayName) { - return undefined; - } - // TODO(drosen): Right now we just permit *all* semantic meanings when calling - // 'getSymbolKind' which is permissible given that it is backwards compatible; but - // really we should consider passing the meaning for the node so that we don't report - // that a suggestion for a value is an interface. We COULD also just do what - // 'getSymbolModifiers' does, which is to use the first declaration. - // Use a 'sortText' of 0' so that all symbol completion entries come before any other - // entries (like JavaScript identifier entries). - return { - name: displayName, - kind: getSymbolKind(symbol, location), - kindModifiers: getSymbolModifiers(symbol), - sortText: "0" - }; - } - function getCompletionEntriesFromSymbols(symbols) { - var start = new Date().getTime(); - var entries = []; - if (symbols) { - var nameToSymbol = {}; - for (var _i = 0; _i < symbols.length; _i++) { - var symbol = symbols[_i]; - var entry = createCompletionEntry(symbol, location); - if (entry) { - var id = ts.escapeIdentifier(entry.name); - if (!ts.lookUp(nameToSymbol, id)) { - entries.push(entry); - nameToSymbol[id] = symbol; - } - } - } - } - log("getCompletionsAtPosition: getCompletionEntriesFromSymbols: " + (new Date().getTime() - start)); - return entries; - } - } - function getCompletionEntryDetails(fileName, position, entryName) { - synchronizeHostData(); - // Compute all the completion symbols again. - var completionData = getCompletionData(fileName, position); - if (completionData) { - var symbols = completionData.symbols, location_2 = completionData.location; - // Find the symbol with the matching entry name. - var target = program.getCompilerOptions().target; - // We don't need to perform character checks here because we're only comparing the - // name against 'entryName' (which is known to be good), not building a new - // completion entry. - var symbol = ts.forEach(symbols, function (s) { return getCompletionEntryDisplayNameForSymbol(s, target, false) === entryName ? s : undefined; }); - if (symbol) { - var displayPartsDocumentationsAndSymbolKind = getSymbolDisplayPartsDocumentationAndSymbolKind(symbol, getValidSourceFile(fileName), location_2, location_2, 7 /* All */); - return { - name: entryName, - kind: displayPartsDocumentationsAndSymbolKind.symbolKind, - kindModifiers: getSymbolModifiers(symbol), - displayParts: displayPartsDocumentationsAndSymbolKind.displayParts, - documentation: displayPartsDocumentationsAndSymbolKind.documentation - }; - } - } - // Didn't find a symbol with this name. See if we can find a keyword instead. - var keywordCompletion = ts.forEach(keywordCompletions, function (c) { return c.name === entryName; }); - if (keywordCompletion) { - return { - name: entryName, - kind: ScriptElementKind.keyword, - kindModifiers: ScriptElementKindModifier.none, - displayParts: [ts.displayPart(entryName, SymbolDisplayPartKind.keyword)], - documentation: undefined - }; - } - return undefined; - } - // TODO(drosen): use contextual SemanticMeaning. - function getSymbolKind(symbol, location) { - var flags = symbol.getFlags(); - if (flags & 32 /* Class */) - return ScriptElementKind.classElement; - if (flags & 384 /* Enum */) - return ScriptElementKind.enumElement; - if (flags & 524288 /* TypeAlias */) - return ScriptElementKind.typeElement; - if (flags & 64 /* Interface */) - return ScriptElementKind.interfaceElement; - if (flags & 262144 /* TypeParameter */) - return ScriptElementKind.typeParameterElement; - var result = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(symbol, flags, location); - if (result === ScriptElementKind.unknown) { - if (flags & 262144 /* TypeParameter */) - return ScriptElementKind.typeParameterElement; - if (flags & 8 /* EnumMember */) - return ScriptElementKind.variableElement; - if (flags & 8388608 /* Alias */) - return ScriptElementKind.alias; - if (flags & 1536 /* Module */) - return ScriptElementKind.moduleElement; - } - return result; - } - function getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(symbol, flags, location) { - var typeChecker = program.getTypeChecker(); - if (typeChecker.isUndefinedSymbol(symbol)) { - return ScriptElementKind.variableElement; - } - if (typeChecker.isArgumentsSymbol(symbol)) { - return ScriptElementKind.localVariableElement; - } - if (flags & 3 /* Variable */) { - if (ts.isFirstDeclarationOfSymbolParameter(symbol)) { - return ScriptElementKind.parameterElement; - } - else if (symbol.valueDeclaration && ts.isConst(symbol.valueDeclaration)) { - return ScriptElementKind.constElement; - } - else if (ts.forEach(symbol.declarations, ts.isLet)) { - return ScriptElementKind.letElement; - } - return isLocalVariableOrFunction(symbol) ? ScriptElementKind.localVariableElement : ScriptElementKind.variableElement; - } - if (flags & 16 /* Function */) - return isLocalVariableOrFunction(symbol) ? ScriptElementKind.localFunctionElement : ScriptElementKind.functionElement; - if (flags & 32768 /* GetAccessor */) - return ScriptElementKind.memberGetAccessorElement; - if (flags & 65536 /* SetAccessor */) - return ScriptElementKind.memberSetAccessorElement; - if (flags & 8192 /* Method */) - return ScriptElementKind.memberFunctionElement; - if (flags & 16384 /* Constructor */) - return ScriptElementKind.constructorImplementationElement; - if (flags & 4 /* Property */) { - if (flags & 268435456 /* UnionProperty */) { - // If union property is result of union of non method (property/accessors/variables), it is labeled as property - var unionPropertyKind = ts.forEach(typeChecker.getRootSymbols(symbol), function (rootSymbol) { - var rootSymbolFlags = rootSymbol.getFlags(); - if (rootSymbolFlags & (98308 /* PropertyOrAccessor */ | 3 /* Variable */)) { - return ScriptElementKind.memberVariableElement; - } - ts.Debug.assert(!!(rootSymbolFlags & 8192 /* Method */)); - }); - if (!unionPropertyKind) { - // If this was union of all methods, - //make sure it has call signatures before we can label it as method - var typeOfUnionProperty = typeChecker.getTypeOfSymbolAtLocation(symbol, location); - if (typeOfUnionProperty.getCallSignatures().length) { - return ScriptElementKind.memberFunctionElement; - } - return ScriptElementKind.memberVariableElement; - } - return unionPropertyKind; - } - return ScriptElementKind.memberVariableElement; - } - return ScriptElementKind.unknown; - } - function getSymbolModifiers(symbol) { - return symbol && symbol.declarations && symbol.declarations.length > 0 - ? ts.getNodeModifiers(symbol.declarations[0]) - : ScriptElementKindModifier.none; - } - // TODO(drosen): Currently completion entry details passes the SemanticMeaning.All instead of using semanticMeaning of location - function getSymbolDisplayPartsDocumentationAndSymbolKind(symbol, sourceFile, enclosingDeclaration, location, semanticMeaning) { - if (semanticMeaning === void 0) { semanticMeaning = getMeaningFromLocation(location); } - var typeChecker = program.getTypeChecker(); - var displayParts = []; - var documentation; - var symbolFlags = symbol.flags; - var symbolKind = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(symbol, symbolFlags, location); - var hasAddedSymbolInfo; - var type; - // Class at constructor site need to be shown as constructor apart from property,method, vars - if (symbolKind !== ScriptElementKind.unknown || symbolFlags & 32 /* Class */ || symbolFlags & 8388608 /* Alias */) { - // If it is accessor they are allowed only if location is at name of the accessor - if (symbolKind === ScriptElementKind.memberGetAccessorElement || symbolKind === ScriptElementKind.memberSetAccessorElement) { - symbolKind = ScriptElementKind.memberVariableElement; - } - var signature; - type = typeChecker.getTypeOfSymbolAtLocation(symbol, location); - if (type) { - if (location.parent && location.parent.kind === 158 /* PropertyAccessExpression */) { - var right = location.parent.name; - // Either the location is on the right of a property access, or on the left and the right is missing - if (right === location || (right && right.getFullWidth() === 0)) { - location = location.parent; - } - } - // try get the call/construct signature from the type if it matches - var callExpression; - if (location.kind === 160 /* CallExpression */ || location.kind === 161 /* NewExpression */) { - callExpression = location; - } - else if (isCallExpressionTarget(location) || isNewExpressionTarget(location)) { - callExpression = location.parent; - } - if (callExpression) { - var candidateSignatures = []; - signature = typeChecker.getResolvedSignature(callExpression, candidateSignatures); - if (!signature && candidateSignatures.length) { - // Use the first candidate: - signature = candidateSignatures[0]; - } - var useConstructSignatures = callExpression.kind === 161 /* NewExpression */ || callExpression.expression.kind === 91 /* SuperKeyword */; - var allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures(); - if (!ts.contains(allSignatures, signature.target || signature)) { - // Get the first signature if there - signature = allSignatures.length ? allSignatures[0] : undefined; - } - if (signature) { - if (useConstructSignatures && (symbolFlags & 32 /* Class */)) { - // Constructor - symbolKind = ScriptElementKind.constructorImplementationElement; - addPrefixForAnyFunctionOrVar(type.symbol, symbolKind); - } - else if (symbolFlags & 8388608 /* Alias */) { - symbolKind = ScriptElementKind.alias; - pushTypePart(symbolKind); - displayParts.push(ts.spacePart()); - if (useConstructSignatures) { - displayParts.push(ts.keywordPart(88 /* NewKeyword */)); - displayParts.push(ts.spacePart()); - } - addFullSymbolName(symbol); - } - else { - addPrefixForAnyFunctionOrVar(symbol, symbolKind); - } - switch (symbolKind) { - case ScriptElementKind.memberVariableElement: - case ScriptElementKind.variableElement: - case ScriptElementKind.constElement: - case ScriptElementKind.letElement: - case ScriptElementKind.parameterElement: - case ScriptElementKind.localVariableElement: - // If it is call or construct signature of lambda's write type name - displayParts.push(ts.punctuationPart(51 /* ColonToken */)); - displayParts.push(ts.spacePart()); - if (useConstructSignatures) { - displayParts.push(ts.keywordPart(88 /* NewKeyword */)); - displayParts.push(ts.spacePart()); - } - if (!(type.flags & 32768 /* Anonymous */)) { - displayParts.push.apply(displayParts, ts.symbolToDisplayParts(typeChecker, type.symbol, enclosingDeclaration, undefined, 1 /* WriteTypeParametersOrArguments */)); - } - addSignatureDisplayParts(signature, allSignatures, 8 /* WriteArrowStyleSignature */); - break; - default: - // Just signature - addSignatureDisplayParts(signature, allSignatures); - } - hasAddedSymbolInfo = true; - } - } - else if ((isNameOfFunctionDeclaration(location) && !(symbol.flags & 98304 /* Accessor */)) || - (location.kind === 114 /* ConstructorKeyword */ && location.parent.kind === 137 /* Constructor */)) { - // get the signature from the declaration and write it - var functionDeclaration = location.parent; - var allSignatures = functionDeclaration.kind === 137 /* Constructor */ ? type.getConstructSignatures() : type.getCallSignatures(); - if (!typeChecker.isImplementationOfOverload(functionDeclaration)) { - signature = typeChecker.getSignatureFromDeclaration(functionDeclaration); - } - else { - signature = allSignatures[0]; - } - if (functionDeclaration.kind === 137 /* Constructor */) { - // show (constructor) Type(...) signature - symbolKind = ScriptElementKind.constructorImplementationElement; - addPrefixForAnyFunctionOrVar(type.symbol, symbolKind); - } - else { - // (function/method) symbol(..signature) - addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 140 /* CallSignature */ && - !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind); - } - addSignatureDisplayParts(signature, allSignatures); - hasAddedSymbolInfo = true; - } - } - } - if (symbolFlags & 32 /* Class */ && !hasAddedSymbolInfo) { - displayParts.push(ts.keywordPart(69 /* ClassKeyword */)); - displayParts.push(ts.spacePart()); - addFullSymbolName(symbol); - writeTypeParametersOfSymbol(symbol, sourceFile); - } - if ((symbolFlags & 64 /* Interface */) && (semanticMeaning & 2 /* Type */)) { - addNewLineIfDisplayPartsExist(); - displayParts.push(ts.keywordPart(103 /* InterfaceKeyword */)); - displayParts.push(ts.spacePart()); - addFullSymbolName(symbol); - writeTypeParametersOfSymbol(symbol, sourceFile); - } - if (symbolFlags & 524288 /* TypeAlias */) { - addNewLineIfDisplayPartsExist(); - displayParts.push(ts.keywordPart(125 /* TypeKeyword */)); - displayParts.push(ts.spacePart()); - addFullSymbolName(symbol); - displayParts.push(ts.spacePart()); - displayParts.push(ts.operatorPart(53 /* EqualsToken */)); - displayParts.push(ts.spacePart()); - displayParts.push.apply(displayParts, ts.typeToDisplayParts(typeChecker, typeChecker.getDeclaredTypeOfSymbol(symbol), enclosingDeclaration)); - } - if (symbolFlags & 384 /* Enum */) { - addNewLineIfDisplayPartsExist(); - if (ts.forEach(symbol.declarations, ts.isConstEnumDeclaration)) { - displayParts.push(ts.keywordPart(70 /* ConstKeyword */)); - displayParts.push(ts.spacePart()); - } - displayParts.push(ts.keywordPart(77 /* EnumKeyword */)); - displayParts.push(ts.spacePart()); - addFullSymbolName(symbol); - } - if (symbolFlags & 1536 /* Module */) { - addNewLineIfDisplayPartsExist(); - var declaration = ts.getDeclarationOfKind(symbol, 208 /* ModuleDeclaration */); - var isNamespace = declaration && declaration.name && declaration.name.kind === 65 /* Identifier */; - displayParts.push(ts.keywordPart(isNamespace ? 119 /* NamespaceKeyword */ : 118 /* ModuleKeyword */)); - displayParts.push(ts.spacePart()); - addFullSymbolName(symbol); - } - if ((symbolFlags & 262144 /* TypeParameter */) && (semanticMeaning & 2 /* Type */)) { - addNewLineIfDisplayPartsExist(); - displayParts.push(ts.punctuationPart(16 /* OpenParenToken */)); - displayParts.push(ts.textPart("type parameter")); - displayParts.push(ts.punctuationPart(17 /* CloseParenToken */)); - displayParts.push(ts.spacePart()); - addFullSymbolName(symbol); - displayParts.push(ts.spacePart()); - displayParts.push(ts.keywordPart(86 /* InKeyword */)); - displayParts.push(ts.spacePart()); - if (symbol.parent) { - // Class/Interface type parameter - addFullSymbolName(symbol.parent, enclosingDeclaration); - writeTypeParametersOfSymbol(symbol.parent, enclosingDeclaration); - } - else { - // Method/function type parameter - var signatureDeclaration = ts.getDeclarationOfKind(symbol, 130 /* TypeParameter */).parent; - var signature = typeChecker.getSignatureFromDeclaration(signatureDeclaration); - if (signatureDeclaration.kind === 141 /* ConstructSignature */) { - displayParts.push(ts.keywordPart(88 /* NewKeyword */)); - displayParts.push(ts.spacePart()); - } - else if (signatureDeclaration.kind !== 140 /* CallSignature */ && signatureDeclaration.name) { - addFullSymbolName(signatureDeclaration.symbol); - } - displayParts.push.apply(displayParts, ts.signatureToDisplayParts(typeChecker, signature, sourceFile, 32 /* WriteTypeArgumentsOfSignature */)); - } - } - if (symbolFlags & 8 /* EnumMember */) { - addPrefixForAnyFunctionOrVar(symbol, "enum member"); - var declaration = symbol.declarations[0]; - if (declaration.kind === 229 /* EnumMember */) { - var constantValue = typeChecker.getConstantValue(declaration); - if (constantValue !== undefined) { - displayParts.push(ts.spacePart()); - displayParts.push(ts.operatorPart(53 /* EqualsToken */)); - displayParts.push(ts.spacePart()); - displayParts.push(ts.displayPart(constantValue.toString(), SymbolDisplayPartKind.numericLiteral)); - } - } - } - if (symbolFlags & 8388608 /* Alias */) { - addNewLineIfDisplayPartsExist(); - displayParts.push(ts.keywordPart(85 /* ImportKeyword */)); - displayParts.push(ts.spacePart()); - addFullSymbolName(symbol); - ts.forEach(symbol.declarations, function (declaration) { - if (declaration.kind === 211 /* ImportEqualsDeclaration */) { - var importEqualsDeclaration = declaration; - if (ts.isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) { - displayParts.push(ts.spacePart()); - displayParts.push(ts.operatorPart(53 /* EqualsToken */)); - displayParts.push(ts.spacePart()); - displayParts.push(ts.keywordPart(120 /* RequireKeyword */)); - displayParts.push(ts.punctuationPart(16 /* OpenParenToken */)); - displayParts.push(ts.displayPart(ts.getTextOfNode(ts.getExternalModuleImportEqualsDeclarationExpression(importEqualsDeclaration)), SymbolDisplayPartKind.stringLiteral)); - displayParts.push(ts.punctuationPart(17 /* CloseParenToken */)); - } - else { - var internalAliasSymbol = typeChecker.getSymbolAtLocation(importEqualsDeclaration.moduleReference); - if (internalAliasSymbol) { - displayParts.push(ts.spacePart()); - displayParts.push(ts.operatorPart(53 /* EqualsToken */)); - displayParts.push(ts.spacePart()); - addFullSymbolName(internalAliasSymbol, enclosingDeclaration); - } - } - return true; - } - }); - } - if (!hasAddedSymbolInfo) { - if (symbolKind !== ScriptElementKind.unknown) { - if (type) { - addPrefixForAnyFunctionOrVar(symbol, symbolKind); - // For properties, variables and local vars: show the type - if (symbolKind === ScriptElementKind.memberVariableElement || - symbolFlags & 3 /* Variable */ || - symbolKind === ScriptElementKind.localVariableElement) { - displayParts.push(ts.punctuationPart(51 /* ColonToken */)); - displayParts.push(ts.spacePart()); - // If the type is type parameter, format it specially - if (type.symbol && type.symbol.flags & 262144 /* TypeParameter */) { - var typeParameterParts = ts.mapToDisplayParts(function (writer) { - typeChecker.getSymbolDisplayBuilder().buildTypeParameterDisplay(type, writer, enclosingDeclaration); - }); - displayParts.push.apply(displayParts, typeParameterParts); - } - else { - displayParts.push.apply(displayParts, ts.typeToDisplayParts(typeChecker, type, enclosingDeclaration)); - } - } - else if (symbolFlags & 16 /* Function */ || - symbolFlags & 8192 /* Method */ || - symbolFlags & 16384 /* Constructor */ || - symbolFlags & 131072 /* Signature */ || - symbolFlags & 98304 /* Accessor */ || - symbolKind === ScriptElementKind.memberFunctionElement) { - var allSignatures = type.getCallSignatures(); - addSignatureDisplayParts(allSignatures[0], allSignatures); - } - } - } - else { - symbolKind = getSymbolKind(symbol, location); - } - } - if (!documentation) { - documentation = symbol.getDocumentationComment(); - } - return { displayParts: displayParts, documentation: documentation, symbolKind: symbolKind }; - function addNewLineIfDisplayPartsExist() { - if (displayParts.length) { - displayParts.push(ts.lineBreakPart()); - } - } - function addFullSymbolName(symbol, enclosingDeclaration) { - var fullSymbolDisplayParts = ts.symbolToDisplayParts(typeChecker, symbol, enclosingDeclaration || sourceFile, undefined, 1 /* WriteTypeParametersOrArguments */ | 2 /* UseOnlyExternalAliasing */); - displayParts.push.apply(displayParts, fullSymbolDisplayParts); - } - function addPrefixForAnyFunctionOrVar(symbol, symbolKind) { - addNewLineIfDisplayPartsExist(); - if (symbolKind) { - pushTypePart(symbolKind); - displayParts.push(ts.spacePart()); - addFullSymbolName(symbol); - } - } - function pushTypePart(symbolKind) { - switch (symbolKind) { - case ScriptElementKind.variableElement: - case ScriptElementKind.functionElement: - case ScriptElementKind.letElement: - case ScriptElementKind.constElement: - case ScriptElementKind.constructorImplementationElement: - displayParts.push(ts.textOrKeywordPart(symbolKind)); - return; - default: - displayParts.push(ts.punctuationPart(16 /* OpenParenToken */)); - displayParts.push(ts.textOrKeywordPart(symbolKind)); - displayParts.push(ts.punctuationPart(17 /* CloseParenToken */)); - return; - } - } - function addSignatureDisplayParts(signature, allSignatures, flags) { - displayParts.push.apply(displayParts, ts.signatureToDisplayParts(typeChecker, signature, enclosingDeclaration, flags | 32 /* WriteTypeArgumentsOfSignature */)); - if (allSignatures.length > 1) { - displayParts.push(ts.spacePart()); - displayParts.push(ts.punctuationPart(16 /* OpenParenToken */)); - displayParts.push(ts.operatorPart(33 /* PlusToken */)); - displayParts.push(ts.displayPart((allSignatures.length - 1).toString(), SymbolDisplayPartKind.numericLiteral)); - displayParts.push(ts.spacePart()); - displayParts.push(ts.textPart(allSignatures.length === 2 ? "overload" : "overloads")); - displayParts.push(ts.punctuationPart(17 /* CloseParenToken */)); - } - documentation = signature.getDocumentationComment(); - } - function writeTypeParametersOfSymbol(symbol, enclosingDeclaration) { - var typeParameterParts = ts.mapToDisplayParts(function (writer) { - typeChecker.getSymbolDisplayBuilder().buildTypeParameterDisplayFromSymbol(symbol, writer, enclosingDeclaration); - }); - displayParts.push.apply(displayParts, typeParameterParts); - } - } - function getQuickInfoAtPosition(fileName, position) { - synchronizeHostData(); - var sourceFile = getValidSourceFile(fileName); - var node = ts.getTouchingPropertyName(sourceFile, position); - if (!node) { - return undefined; - } - if (isLabelName(node)) { - return undefined; - } - var typeChecker = program.getTypeChecker(); - var symbol = typeChecker.getSymbolAtLocation(node); - if (!symbol) { - // Try getting just type at this position and show - switch (node.kind) { - case 65 /* Identifier */: - case 158 /* PropertyAccessExpression */: - case 128 /* QualifiedName */: - case 93 /* ThisKeyword */: - case 91 /* SuperKeyword */: - // For the identifiers/this/super etc get the type at position - var type = typeChecker.getTypeAtLocation(node); - if (type) { - return { - kind: ScriptElementKind.unknown, - kindModifiers: ScriptElementKindModifier.none, - textSpan: ts.createTextSpan(node.getStart(), node.getWidth()), - displayParts: ts.typeToDisplayParts(typeChecker, type, getContainerNode(node)), - documentation: type.symbol ? type.symbol.getDocumentationComment() : undefined - }; - } - } - return undefined; - } - var displayPartsDocumentationsAndKind = getSymbolDisplayPartsDocumentationAndSymbolKind(symbol, sourceFile, getContainerNode(node), node); - return { - kind: displayPartsDocumentationsAndKind.symbolKind, - kindModifiers: getSymbolModifiers(symbol), - textSpan: ts.createTextSpan(node.getStart(), node.getWidth()), - displayParts: displayPartsDocumentationsAndKind.displayParts, - documentation: displayPartsDocumentationsAndKind.documentation - }; - } - function createDefinitionInfo(node, symbolKind, symbolName, containerName) { - return { - fileName: node.getSourceFile().fileName, - textSpan: ts.createTextSpanFromBounds(node.getStart(), node.getEnd()), - kind: symbolKind, - name: symbolName, - containerKind: undefined, - containerName: containerName - }; - } - function getDefinitionFromSymbol(symbol, node) { - var typeChecker = program.getTypeChecker(); - var result = []; - var declarations = symbol.getDeclarations(); - var symbolName = typeChecker.symbolToString(symbol); // Do not get scoped name, just the name of the symbol - var symbolKind = getSymbolKind(symbol, node); - var containerSymbol = symbol.parent; - var containerName = containerSymbol ? typeChecker.symbolToString(containerSymbol, node) : ""; - if (!tryAddConstructSignature(symbol, node, symbolKind, symbolName, containerName, result) && - !tryAddCallSignature(symbol, node, symbolKind, symbolName, containerName, result)) { - // Just add all the declarations. - ts.forEach(declarations, function (declaration) { - result.push(createDefinitionInfo(declaration, symbolKind, symbolName, containerName)); - }); - } - return result; - function tryAddConstructSignature(symbol, location, symbolKind, symbolName, containerName, result) { - // Applicable only if we are in a new expression, or we are on a constructor declaration - // and in either case the symbol has a construct signature definition, i.e. class - if (isNewExpressionTarget(location) || location.kind === 114 /* ConstructorKeyword */) { - if (symbol.flags & 32 /* Class */) { - var classDeclaration = symbol.getDeclarations()[0]; - ts.Debug.assert(classDeclaration && classDeclaration.kind === 204 /* ClassDeclaration */); - return tryAddSignature(classDeclaration.members, true, symbolKind, symbolName, containerName, result); - } - } - return false; - } - function tryAddCallSignature(symbol, location, symbolKind, symbolName, containerName, result) { - if (isCallExpressionTarget(location) || isNewExpressionTarget(location) || isNameOfFunctionDeclaration(location)) { - return tryAddSignature(symbol.declarations, false, symbolKind, symbolName, containerName, result); - } - return false; - } - function tryAddSignature(signatureDeclarations, selectConstructors, symbolKind, symbolName, containerName, result) { - var declarations = []; - var definition; - ts.forEach(signatureDeclarations, function (d) { - if ((selectConstructors && d.kind === 137 /* Constructor */) || - (!selectConstructors && (d.kind === 203 /* FunctionDeclaration */ || d.kind === 136 /* MethodDeclaration */ || d.kind === 135 /* MethodSignature */))) { - declarations.push(d); - if (d.body) - definition = d; - } - }); - if (definition) { - result.push(createDefinitionInfo(definition, symbolKind, symbolName, containerName)); - return true; - } - else if (declarations.length) { - result.push(createDefinitionInfo(ts.lastOrUndefined(declarations), symbolKind, symbolName, containerName)); - return true; - } - return false; - } - } - /// Goto definition - function getDefinitionAtPosition(fileName, position) { - synchronizeHostData(); - var sourceFile = getValidSourceFile(fileName); - var node = ts.getTouchingPropertyName(sourceFile, position); - if (!node) { - return undefined; - } - // Labels - if (isJumpStatementTarget(node)) { - var labelName = node.text; - var label = getTargetLabel(node.parent, node.text); - return label ? [createDefinitionInfo(label, ScriptElementKind.label, labelName, undefined)] : undefined; - } - /// Triple slash reference comments - var comment = ts.forEach(sourceFile.referencedFiles, function (r) { return (r.pos <= position && position < r.end) ? r : undefined; }); - if (comment) { - var referenceFile = ts.tryResolveScriptReference(program, sourceFile, comment); - if (referenceFile) { - return [{ - fileName: referenceFile.fileName, - textSpan: ts.createTextSpanFromBounds(0, 0), - kind: ScriptElementKind.scriptElement, - name: comment.fileName, - containerName: undefined, - containerKind: undefined - }]; - } - return undefined; - } - var typeChecker = program.getTypeChecker(); - var symbol = typeChecker.getSymbolAtLocation(node); - // Could not find a symbol e.g. node is string or number keyword, - // or the symbol was an internal symbol and does not have a declaration e.g. undefined symbol - if (!symbol) { - return undefined; - } - // If this is an alias, and the request came at the declaration location - // get the aliased symbol instead. This allows for goto def on an import e.g. - // import {A, B} from "mod"; - // to jump to the implementation directly. - if (symbol.flags & 8388608 /* Alias */) { - var declaration = symbol.declarations[0]; - if (node.kind === 65 /* Identifier */ && node.parent === declaration) { - symbol = typeChecker.getAliasedSymbol(symbol); - } - } - // Because name in short-hand property assignment has two different meanings: property name and property value, - // using go-to-definition at such position should go to the variable declaration of the property value rather than - // go to the declaration of the property name (in this case stay at the same position). However, if go-to-definition - // is performed at the location of property access, we would like to go to definition of the property in the short-hand - // assignment. This case and others are handled by the following code. - if (node.parent.kind === 228 /* ShorthandPropertyAssignment */) { - var shorthandSymbol = typeChecker.getShorthandAssignmentValueSymbol(symbol.valueDeclaration); - if (!shorthandSymbol) { - return []; - } - var shorthandDeclarations = shorthandSymbol.getDeclarations(); - var shorthandSymbolKind = getSymbolKind(shorthandSymbol, node); - var shorthandSymbolName = typeChecker.symbolToString(shorthandSymbol); - var shorthandContainerName = typeChecker.symbolToString(symbol.parent, node); - return ts.map(shorthandDeclarations, function (declaration) { return createDefinitionInfo(declaration, shorthandSymbolKind, shorthandSymbolName, shorthandContainerName); }); - } - return getDefinitionFromSymbol(symbol, node); - } - /// Goto type - function getTypeDefinitionAtPosition(fileName, position) { - synchronizeHostData(); - var sourceFile = getValidSourceFile(fileName); - var node = ts.getTouchingPropertyName(sourceFile, position); - if (!node) { - return undefined; - } - var typeChecker = program.getTypeChecker(); - var symbol = typeChecker.getSymbolAtLocation(node); - if (!symbol) { - return undefined; - } - var type = typeChecker.getTypeOfSymbolAtLocation(symbol, node); - if (!type) { - return undefined; - } - if (type.flags & 16384 /* Union */) { - var result = []; - ts.forEach(type.types, function (t) { - if (t.symbol) { - result.push.apply(result, getDefinitionFromSymbol(t.symbol, node)); - } - }); - return result; - } - if (!type.symbol) { - return undefined; - } - return getDefinitionFromSymbol(type.symbol, node); - } - function getOccurrencesAtPosition(fileName, position) { - var results = getOccurrencesAtPositionCore(fileName, position); - if (results) { - var sourceFile = getCanonicalFileName(ts.normalizeSlashes(fileName)); - // Get occurrences only supports reporting occurrences for the file queried. So - // filter down to that list. - results = ts.filter(results, function (r) { return getCanonicalFileName(ts.normalizeSlashes(r.fileName)) === sourceFile; }); - } - return results; - } - function getDocumentHighlights(fileName, position, filesToSearch) { - synchronizeHostData(); - filesToSearch = ts.map(filesToSearch, ts.normalizeSlashes); - var sourceFilesToSearch = ts.filter(program.getSourceFiles(), function (f) { return ts.contains(filesToSearch, f.fileName); }); - var sourceFile = getValidSourceFile(fileName); - var node = ts.getTouchingWord(sourceFile, position); - if (!node) { - return undefined; - } - return getSemanticDocumentHighlights(node) || getSyntacticDocumentHighlights(node); - function getHighlightSpanForNode(node) { - var start = node.getStart(); - var end = node.getEnd(); - return { - fileName: sourceFile.fileName, - textSpan: ts.createTextSpanFromBounds(start, end), - kind: HighlightSpanKind.none - }; - } - function getSemanticDocumentHighlights(node) { - if (node.kind === 65 /* Identifier */ || - node.kind === 93 /* ThisKeyword */ || - node.kind === 91 /* SuperKeyword */ || - isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || - isNameOfExternalModuleImportOrDeclaration(node)) { - var referencedSymbols = getReferencedSymbolsForNodes(node, sourceFilesToSearch, false, false); - return convertReferencedSymbols(referencedSymbols); - } - return undefined; - function convertReferencedSymbols(referencedSymbols) { - if (!referencedSymbols) { - return undefined; - } - var fileNameToDocumentHighlights = {}; - var result = []; - for (var _i = 0; _i < referencedSymbols.length; _i++) { - var referencedSymbol = referencedSymbols[_i]; - for (var _a = 0, _b = referencedSymbol.references; _a < _b.length; _a++) { - var referenceEntry = _b[_a]; - var fileName_1 = referenceEntry.fileName; - var documentHighlights = ts.getProperty(fileNameToDocumentHighlights, fileName_1); - if (!documentHighlights) { - documentHighlights = { fileName: fileName_1, highlightSpans: [] }; - fileNameToDocumentHighlights[fileName_1] = documentHighlights; - result.push(documentHighlights); - } - documentHighlights.highlightSpans.push({ - textSpan: referenceEntry.textSpan, - kind: referenceEntry.isWriteAccess ? HighlightSpanKind.writtenReference : HighlightSpanKind.reference - }); - } - } - return result; - } - } - function getSyntacticDocumentHighlights(node) { - var fileName = sourceFile.fileName; - var highlightSpans = getHighlightSpans(node); - if (!highlightSpans || highlightSpans.length === 0) { - return undefined; - } - return [{ fileName: fileName, highlightSpans: highlightSpans }]; - // returns true if 'node' is defined and has a matching 'kind'. - function hasKind(node, kind) { - return node !== undefined && node.kind === kind; - } - // Null-propagating 'parent' function. - function parent(node) { - return node && node.parent; - } - function getHighlightSpans(node) { - if (node) { - switch (node.kind) { - case 84 /* IfKeyword */: - case 76 /* ElseKeyword */: - if (hasKind(node.parent, 186 /* IfStatement */)) { - return getIfElseOccurrences(node.parent); - } - break; - case 90 /* ReturnKeyword */: - if (hasKind(node.parent, 194 /* ReturnStatement */)) { - return getReturnOccurrences(node.parent); - } - break; - case 94 /* ThrowKeyword */: - if (hasKind(node.parent, 198 /* ThrowStatement */)) { - return getThrowOccurrences(node.parent); - } - break; - case 68 /* CatchKeyword */: - if (hasKind(parent(parent(node)), 199 /* TryStatement */)) { - return getTryCatchFinallyOccurrences(node.parent.parent); - } - break; - case 96 /* TryKeyword */: - case 81 /* FinallyKeyword */: - if (hasKind(parent(node), 199 /* TryStatement */)) { - return getTryCatchFinallyOccurrences(node.parent); - } - break; - case 92 /* SwitchKeyword */: - if (hasKind(node.parent, 196 /* SwitchStatement */)) { - return getSwitchCaseDefaultOccurrences(node.parent); - } - break; - case 67 /* CaseKeyword */: - case 73 /* DefaultKeyword */: - if (hasKind(parent(parent(parent(node))), 196 /* SwitchStatement */)) { - return getSwitchCaseDefaultOccurrences(node.parent.parent.parent); - } - break; - case 66 /* BreakKeyword */: - case 71 /* ContinueKeyword */: - if (hasKind(node.parent, 193 /* BreakStatement */) || hasKind(node.parent, 192 /* ContinueStatement */)) { - return getBreakOrContinueStatementOccurences(node.parent); - } - break; - case 82 /* ForKeyword */: - if (hasKind(node.parent, 189 /* ForStatement */) || - hasKind(node.parent, 190 /* ForInStatement */) || - hasKind(node.parent, 191 /* ForOfStatement */)) { - return getLoopBreakContinueOccurrences(node.parent); - } - break; - case 100 /* WhileKeyword */: - case 75 /* DoKeyword */: - if (hasKind(node.parent, 188 /* WhileStatement */) || hasKind(node.parent, 187 /* DoStatement */)) { - return getLoopBreakContinueOccurrences(node.parent); - } - break; - case 114 /* ConstructorKeyword */: - if (hasKind(node.parent, 137 /* Constructor */)) { - return getConstructorOccurrences(node.parent); - } - break; - case 116 /* GetKeyword */: - case 122 /* SetKeyword */: - if (hasKind(node.parent, 138 /* GetAccessor */) || hasKind(node.parent, 139 /* SetAccessor */)) { - return getGetAndSetOccurrences(node.parent); - } - default: - if (ts.isModifier(node.kind) && node.parent && - (ts.isDeclaration(node.parent) || node.parent.kind === 183 /* VariableStatement */)) { - return getModifierOccurrences(node.kind, node.parent); - } - } - } - return undefined; - } - /** - * Aggregates all throw-statements within this node *without* crossing - * into function boundaries and try-blocks with catch-clauses. - */ - function aggregateOwnedThrowStatements(node) { - var statementAccumulator = []; - aggregate(node); - return statementAccumulator; - function aggregate(node) { - if (node.kind === 198 /* ThrowStatement */) { - statementAccumulator.push(node); - } - else if (node.kind === 199 /* TryStatement */) { - var tryStatement = node; - if (tryStatement.catchClause) { - aggregate(tryStatement.catchClause); - } - else { - // Exceptions thrown within a try block lacking a catch clause - // are "owned" in the current context. - aggregate(tryStatement.tryBlock); - } - if (tryStatement.finallyBlock) { - aggregate(tryStatement.finallyBlock); - } - } - else if (!ts.isFunctionLike(node)) { - ts.forEachChild(node, aggregate); - } - } - ; - } - /** - * For lack of a better name, this function takes a throw statement and returns the - * nearest ancestor that is a try-block (whose try statement has a catch clause), - * function-block, or source file. - */ - function getThrowStatementOwner(throwStatement) { - var child = throwStatement; - while (child.parent) { - var parent_11 = child.parent; - if (ts.isFunctionBlock(parent_11) || parent_11.kind === 230 /* SourceFile */) { - return parent_11; - } - // A throw-statement is only owned by a try-statement if the try-statement has - // a catch clause, and if the throw-statement occurs within the try block. - if (parent_11.kind === 199 /* TryStatement */) { - var tryStatement = parent_11; - if (tryStatement.tryBlock === child && tryStatement.catchClause) { - return child; - } - } - child = parent_11; - } - return undefined; - } - function aggregateAllBreakAndContinueStatements(node) { - var statementAccumulator = []; - aggregate(node); - return statementAccumulator; - function aggregate(node) { - if (node.kind === 193 /* BreakStatement */ || node.kind === 192 /* ContinueStatement */) { - statementAccumulator.push(node); - } - else if (!ts.isFunctionLike(node)) { - ts.forEachChild(node, aggregate); - } - } - ; - } - function ownsBreakOrContinueStatement(owner, statement) { - var actualOwner = getBreakOrContinueOwner(statement); - return actualOwner && actualOwner === owner; - } - function getBreakOrContinueOwner(statement) { - for (var node_2 = statement.parent; node_2; node_2 = node_2.parent) { - switch (node_2.kind) { - case 196 /* SwitchStatement */: - if (statement.kind === 192 /* ContinueStatement */) { - continue; - } - // Fall through. - case 189 /* ForStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - case 188 /* WhileStatement */: - case 187 /* DoStatement */: - if (!statement.label || isLabeledBy(node_2, statement.label.text)) { - return node_2; - } - break; - default: - // Don't cross function boundaries. - if (ts.isFunctionLike(node_2)) { - return undefined; - } - break; - } - } - return undefined; - } - function getModifierOccurrences(modifier, declaration) { - var container = declaration.parent; - // Make sure we only highlight the keyword when it makes sense to do so. - if (ts.isAccessibilityModifier(modifier)) { - if (!(container.kind === 204 /* ClassDeclaration */ || - (declaration.kind === 131 /* Parameter */ && hasKind(container, 137 /* Constructor */)))) { - return undefined; - } - } - else if (modifier === 109 /* StaticKeyword */) { - if (container.kind !== 204 /* ClassDeclaration */) { - return undefined; - } - } - else if (modifier === 78 /* ExportKeyword */ || modifier === 115 /* DeclareKeyword */) { - if (!(container.kind === 209 /* ModuleBlock */ || container.kind === 230 /* SourceFile */)) { - return undefined; - } - } - else { - // unsupported modifier - return undefined; - } - var keywords = []; - var modifierFlag = getFlagFromModifier(modifier); - var nodes; - switch (container.kind) { - case 209 /* ModuleBlock */: - case 230 /* SourceFile */: - nodes = container.statements; - break; - case 137 /* Constructor */: - nodes = container.parameters.concat(container.parent.members); - break; - case 204 /* ClassDeclaration */: - nodes = container.members; - // If we're an accessibility modifier, we're in an instance member and should search - // the constructor's parameter list for instance members as well. - if (modifierFlag & 112 /* AccessibilityModifier */) { - var constructor = ts.forEach(container.members, function (member) { - return member.kind === 137 /* Constructor */ && member; - }); - if (constructor) { - nodes = nodes.concat(constructor.parameters); - } - } - break; - default: - ts.Debug.fail("Invalid container kind."); - } - ts.forEach(nodes, function (node) { - if (node.modifiers && node.flags & modifierFlag) { - ts.forEach(node.modifiers, function (child) { return pushKeywordIf(keywords, child, modifier); }); - } - }); - return ts.map(keywords, getHighlightSpanForNode); - function getFlagFromModifier(modifier) { - switch (modifier) { - case 108 /* PublicKeyword */: - return 16 /* Public */; - case 106 /* PrivateKeyword */: - return 32 /* Private */; - case 107 /* ProtectedKeyword */: - return 64 /* Protected */; - case 109 /* StaticKeyword */: - return 128 /* Static */; - case 78 /* ExportKeyword */: - return 1 /* Export */; - case 115 /* DeclareKeyword */: - return 2 /* Ambient */; - default: - ts.Debug.fail(); - } - } - } - function pushKeywordIf(keywordList, token) { - var expected = []; - for (var _i = 2; _i < arguments.length; _i++) { - expected[_i - 2] = arguments[_i]; - } - if (token && ts.contains(expected, token.kind)) { - keywordList.push(token); - return true; - } - return false; - } - function getGetAndSetOccurrences(accessorDeclaration) { - var keywords = []; - tryPushAccessorKeyword(accessorDeclaration.symbol, 138 /* GetAccessor */); - tryPushAccessorKeyword(accessorDeclaration.symbol, 139 /* SetAccessor */); - return ts.map(keywords, getHighlightSpanForNode); - function tryPushAccessorKeyword(accessorSymbol, accessorKind) { - var accessor = ts.getDeclarationOfKind(accessorSymbol, accessorKind); - if (accessor) { - ts.forEach(accessor.getChildren(), function (child) { return pushKeywordIf(keywords, child, 116 /* GetKeyword */, 122 /* SetKeyword */); }); - } - } - } - function getConstructorOccurrences(constructorDeclaration) { - var declarations = constructorDeclaration.symbol.getDeclarations(); - var keywords = []; - ts.forEach(declarations, function (declaration) { - ts.forEach(declaration.getChildren(), function (token) { - return pushKeywordIf(keywords, token, 114 /* ConstructorKeyword */); - }); - }); - return ts.map(keywords, getHighlightSpanForNode); - } - function getLoopBreakContinueOccurrences(loopNode) { - var keywords = []; - if (pushKeywordIf(keywords, loopNode.getFirstToken(), 82 /* ForKeyword */, 100 /* WhileKeyword */, 75 /* DoKeyword */)) { - // If we succeeded and got a do-while loop, then start looking for a 'while' keyword. - if (loopNode.kind === 187 /* DoStatement */) { - var loopTokens = loopNode.getChildren(); - for (var i = loopTokens.length - 1; i >= 0; i--) { - if (pushKeywordIf(keywords, loopTokens[i], 100 /* WhileKeyword */)) { - break; - } - } - } - } - var breaksAndContinues = aggregateAllBreakAndContinueStatements(loopNode.statement); - ts.forEach(breaksAndContinues, function (statement) { - if (ownsBreakOrContinueStatement(loopNode, statement)) { - pushKeywordIf(keywords, statement.getFirstToken(), 66 /* BreakKeyword */, 71 /* ContinueKeyword */); - } - }); - return ts.map(keywords, getHighlightSpanForNode); - } - function getBreakOrContinueStatementOccurences(breakOrContinueStatement) { - var owner = getBreakOrContinueOwner(breakOrContinueStatement); - if (owner) { - switch (owner.kind) { - case 189 /* ForStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - case 187 /* DoStatement */: - case 188 /* WhileStatement */: - return getLoopBreakContinueOccurrences(owner); - case 196 /* SwitchStatement */: - return getSwitchCaseDefaultOccurrences(owner); - } - } - return undefined; - } - function getSwitchCaseDefaultOccurrences(switchStatement) { - var keywords = []; - pushKeywordIf(keywords, switchStatement.getFirstToken(), 92 /* SwitchKeyword */); - // Go through each clause in the switch statement, collecting the 'case'/'default' keywords. - ts.forEach(switchStatement.caseBlock.clauses, function (clause) { - pushKeywordIf(keywords, clause.getFirstToken(), 67 /* CaseKeyword */, 73 /* DefaultKeyword */); - var breaksAndContinues = aggregateAllBreakAndContinueStatements(clause); - ts.forEach(breaksAndContinues, function (statement) { - if (ownsBreakOrContinueStatement(switchStatement, statement)) { - pushKeywordIf(keywords, statement.getFirstToken(), 66 /* BreakKeyword */); - } - }); - }); - return ts.map(keywords, getHighlightSpanForNode); - } - function getTryCatchFinallyOccurrences(tryStatement) { - var keywords = []; - pushKeywordIf(keywords, tryStatement.getFirstToken(), 96 /* TryKeyword */); - if (tryStatement.catchClause) { - pushKeywordIf(keywords, tryStatement.catchClause.getFirstToken(), 68 /* CatchKeyword */); - } - if (tryStatement.finallyBlock) { - var finallyKeyword = ts.findChildOfKind(tryStatement, 81 /* FinallyKeyword */, sourceFile); - pushKeywordIf(keywords, finallyKeyword, 81 /* FinallyKeyword */); - } - return ts.map(keywords, getHighlightSpanForNode); - } - function getThrowOccurrences(throwStatement) { - var owner = getThrowStatementOwner(throwStatement); - if (!owner) { - return undefined; - } - var keywords = []; - ts.forEach(aggregateOwnedThrowStatements(owner), function (throwStatement) { - pushKeywordIf(keywords, throwStatement.getFirstToken(), 94 /* ThrowKeyword */); - }); - // If the "owner" is a function, then we equate 'return' and 'throw' statements in their - // ability to "jump out" of the function, and include occurrences for both. - if (ts.isFunctionBlock(owner)) { - ts.forEachReturnStatement(owner, function (returnStatement) { - pushKeywordIf(keywords, returnStatement.getFirstToken(), 90 /* ReturnKeyword */); - }); - } - return ts.map(keywords, getHighlightSpanForNode); - } - function getReturnOccurrences(returnStatement) { - var func = ts.getContainingFunction(returnStatement); - // If we didn't find a containing function with a block body, bail out. - if (!(func && hasKind(func.body, 182 /* Block */))) { - return undefined; - } - var keywords = []; - ts.forEachReturnStatement(func.body, function (returnStatement) { - pushKeywordIf(keywords, returnStatement.getFirstToken(), 90 /* ReturnKeyword */); - }); - // Include 'throw' statements that do not occur within a try block. - ts.forEach(aggregateOwnedThrowStatements(func.body), function (throwStatement) { - pushKeywordIf(keywords, throwStatement.getFirstToken(), 94 /* ThrowKeyword */); - }); - return ts.map(keywords, getHighlightSpanForNode); - } - function getIfElseOccurrences(ifStatement) { - var keywords = []; - // Traverse upwards through all parent if-statements linked by their else-branches. - while (hasKind(ifStatement.parent, 186 /* IfStatement */) && ifStatement.parent.elseStatement === ifStatement) { - ifStatement = ifStatement.parent; - } - // Now traverse back down through the else branches, aggregating if/else keywords of if-statements. - while (ifStatement) { - var children = ifStatement.getChildren(); - pushKeywordIf(keywords, children[0], 84 /* IfKeyword */); - // Generally the 'else' keyword is second-to-last, so we traverse backwards. - for (var i = children.length - 1; i >= 0; i--) { - if (pushKeywordIf(keywords, children[i], 76 /* ElseKeyword */)) { - break; - } - } - if (!hasKind(ifStatement.elseStatement, 186 /* IfStatement */)) { - break; - } - ifStatement = ifStatement.elseStatement; - } - var result = []; - // We'd like to highlight else/ifs together if they are only separated by whitespace - // (i.e. the keywords are separated by no comments, no newlines). - for (var i = 0; i < keywords.length; i++) { - if (keywords[i].kind === 76 /* ElseKeyword */ && i < keywords.length - 1) { - var elseKeyword = keywords[i]; - var ifKeyword = keywords[i + 1]; // this *should* always be an 'if' keyword. - var shouldCombindElseAndIf = true; - // Avoid recalculating getStart() by iterating backwards. - for (var j = ifKeyword.getStart() - 1; j >= elseKeyword.end; j--) { - if (!ts.isWhiteSpace(sourceFile.text.charCodeAt(j))) { - shouldCombindElseAndIf = false; - break; - } - } - if (shouldCombindElseAndIf) { - result.push({ - fileName: fileName, - textSpan: ts.createTextSpanFromBounds(elseKeyword.getStart(), ifKeyword.end), - kind: HighlightSpanKind.reference - }); - i++; // skip the next keyword - continue; - } - } - // Ordinary case: just highlight the keyword. - result.push(getHighlightSpanForNode(keywords[i])); - } - return result; - } - } - } - /// References and Occurrences - function getOccurrencesAtPositionCore(fileName, position) { - synchronizeHostData(); - return convertDocumentHighlights(getDocumentHighlights(fileName, position, [fileName])); - function convertDocumentHighlights(documentHighlights) { - if (!documentHighlights) { - return undefined; - } - var result = []; - for (var _i = 0; _i < documentHighlights.length; _i++) { - var entry = documentHighlights[_i]; - for (var _a = 0, _b = entry.highlightSpans; _a < _b.length; _a++) { - var highlightSpan = _b[_a]; - result.push({ - fileName: entry.fileName, - textSpan: highlightSpan.textSpan, - isWriteAccess: highlightSpan.kind === HighlightSpanKind.writtenReference - }); - } - } - return result; - } - } - function convertReferences(referenceSymbols) { - if (!referenceSymbols) { - return undefined; - } - var referenceEntries = []; - for (var _i = 0; _i < referenceSymbols.length; _i++) { - var referenceSymbol = referenceSymbols[_i]; - ts.addRange(referenceEntries, referenceSymbol.references); - } - return referenceEntries; - } - function findRenameLocations(fileName, position, findInStrings, findInComments) { - var referencedSymbols = findReferencedSymbols(fileName, position, findInStrings, findInComments); - return convertReferences(referencedSymbols); - } - function getReferencesAtPosition(fileName, position) { - var referencedSymbols = findReferencedSymbols(fileName, position, false, false); - return convertReferences(referencedSymbols); - } - function findReferences(fileName, position) { - var referencedSymbols = findReferencedSymbols(fileName, position, false, false); - // Only include referenced symbols that have a valid definition. - return ts.filter(referencedSymbols, function (rs) { return !!rs.definition; }); - } - function findReferencedSymbols(fileName, position, findInStrings, findInComments) { - synchronizeHostData(); - var sourceFile = getValidSourceFile(fileName); - var node = ts.getTouchingPropertyName(sourceFile, position); - if (!node) { - return undefined; - } - if (node.kind !== 65 /* Identifier */ && - // TODO (drosen): This should be enabled in a later release - currently breaks rename. - //node.kind !== SyntaxKind.ThisKeyword && - //node.kind !== SyntaxKind.SuperKeyword && - !isLiteralNameOfPropertyDeclarationOrIndexAccess(node) && - !isNameOfExternalModuleImportOrDeclaration(node)) { - return undefined; - } - ts.Debug.assert(node.kind === 65 /* Identifier */ || node.kind === 7 /* NumericLiteral */ || node.kind === 8 /* StringLiteral */); - return getReferencedSymbolsForNodes(node, program.getSourceFiles(), findInStrings, findInComments); - } - function getReferencedSymbolsForNodes(node, sourceFiles, findInStrings, findInComments) { - var typeChecker = program.getTypeChecker(); - // Labels - if (isLabelName(node)) { - if (isJumpStatementTarget(node)) { - var labelDefinition = getTargetLabel(node.parent, node.text); - // if we have a label definition, look within its statement for references, if not, then - // the label is undefined and we have no results.. - return labelDefinition ? getLabelReferencesInNode(labelDefinition.parent, labelDefinition) : undefined; - } - else { - // it is a label definition and not a target, search within the parent labeledStatement - return getLabelReferencesInNode(node.parent, node); - } - } - if (node.kind === 93 /* ThisKeyword */) { - return getReferencesForThisKeyword(node, sourceFiles); - } - if (node.kind === 91 /* SuperKeyword */) { - return getReferencesForSuperKeyword(node); - } - var symbol = typeChecker.getSymbolAtLocation(node); - // Could not find a symbol e.g. unknown identifier - if (!symbol) { - // Can't have references to something that we have no symbol for. - return undefined; - } - var declarations = symbol.declarations; - // The symbol was an internal symbol and does not have a declaration e.g.undefined symbol - if (!declarations || !declarations.length) { - return undefined; - } - var result; - // Compute the meaning from the location and the symbol it references - var searchMeaning = getIntersectingMeaningFromDeclarations(getMeaningFromLocation(node), declarations); - // Get the text to search for, we need to normalize it as external module names will have quote - var declaredName = getDeclaredName(symbol, node); - // Try to get the smallest valid scope that we can limit our search to; - // otherwise we'll need to search globally (i.e. include each file). - var scope = getSymbolScope(symbol); - // Maps from a symbol ID to the ReferencedSymbol entry in 'result'. - var symbolToIndex = []; - if (scope) { - result = []; - getReferencesInNode(scope, symbol, declaredName, node, searchMeaning, findInStrings, findInComments, result, symbolToIndex); - } - else { - var internedName = getInternedName(symbol, node, declarations); - for (var _i = 0; _i < sourceFiles.length; _i++) { - var sourceFile = sourceFiles[_i]; - cancellationToken.throwIfCancellationRequested(); - var nameTable = getNameTable(sourceFile); - if (ts.lookUp(nameTable, internedName)) { - result = result || []; - getReferencesInNode(sourceFile, symbol, declaredName, node, searchMeaning, findInStrings, findInComments, result, symbolToIndex); - } - } - } - return result; - function getDefinition(symbol) { - var info = getSymbolDisplayPartsDocumentationAndSymbolKind(symbol, node.getSourceFile(), getContainerNode(node), node); - var name = ts.map(info.displayParts, function (p) { return p.text; }).join(""); - var declarations = symbol.declarations; - if (!declarations || declarations.length === 0) { - return undefined; - } - return { - containerKind: "", - containerName: "", - name: name, - kind: info.symbolKind, - fileName: declarations[0].getSourceFile().fileName, - textSpan: ts.createTextSpan(declarations[0].getStart(), 0) - }; - } - function isImportOrExportSpecifierName(location) { - return location.parent && - (location.parent.kind === 216 /* ImportSpecifier */ || location.parent.kind === 220 /* ExportSpecifier */) && - location.parent.propertyName === location; - } - function isImportOrExportSpecifierImportSymbol(symbol) { - return (symbol.flags & 8388608 /* Alias */) && ts.forEach(symbol.declarations, function (declaration) { - return declaration.kind === 216 /* ImportSpecifier */ || declaration.kind === 220 /* ExportSpecifier */; - }); - } - function getDeclaredName(symbol, location) { - // Special case for function expressions, whose names are solely local to their bodies. - var functionExpression = ts.forEach(symbol.declarations, function (d) { return d.kind === 165 /* FunctionExpression */ ? d : undefined; }); - // When a name gets interned into a SourceFile's 'identifiers' Map, - // its name is escaped and stored in the same way its symbol name/identifier - // name should be stored. Function expressions, however, are a special case, - // because despite sometimes having a name, the binder unconditionally binds them - // to a symbol with the name "__function". - var name; - if (functionExpression && functionExpression.name) { - name = functionExpression.name.text; - } - // If this is an export or import specifier it could have been renamed using the as syntax. - // if so we want to search for whatever under the cursor, the symbol is pointing to the alias (name) - // so check for the propertyName. - if (isImportOrExportSpecifierName(location)) { - return location.getText(); - } - name = typeChecker.symbolToString(symbol); - return stripQuotes(name); - } - function getInternedName(symbol, location, declarations) { - // If this is an export or import specifier it could have been renamed using the as syntax. - // if so we want to search for whatever under the cursor, the symbol is pointing to the alias (name) - // so check for the propertyName. - if (isImportOrExportSpecifierName(location)) { - return location.getText(); - } - // Special case for function expressions, whose names are solely local to their bodies. - var functionExpression = ts.forEach(declarations, function (d) { return d.kind === 165 /* FunctionExpression */ ? d : undefined; }); - // When a name gets interned into a SourceFile's 'identifiers' Map, - // its name is escaped and stored in the same way its symbol name/identifier - // name should be stored. Function expressions, however, are a special case, - // because despite sometimes having a name, the binder unconditionally binds them - // to a symbol with the name "__function". - var name = functionExpression && functionExpression.name - ? functionExpression.name.text - : symbol.name; - return stripQuotes(name); - } - function stripQuotes(name) { - var length = name.length; - if (length >= 2 && name.charCodeAt(0) === 34 /* doubleQuote */ && name.charCodeAt(length - 1) === 34 /* doubleQuote */) { - return name.substring(1, length - 1); - } - ; - return name; - } - function getSymbolScope(symbol) { - // If this is private property or method, the scope is the containing class - if (symbol.flags & (4 /* Property */ | 8192 /* Method */)) { - var privateDeclaration = ts.forEach(symbol.getDeclarations(), function (d) { return (d.flags & 32 /* Private */) ? d : undefined; }); - if (privateDeclaration) { - return ts.getAncestor(privateDeclaration, 204 /* ClassDeclaration */); - } - } - // If the symbol is an import we would like to find it if we are looking for what it imports. - // So consider it visibile outside its declaration scope. - if (symbol.flags & 8388608 /* Alias */) { - return undefined; - } - // if this symbol is visible from its parent container, e.g. exported, then bail out - // if symbol correspond to the union property - bail out - if (symbol.parent || (symbol.flags & 268435456 /* UnionProperty */)) { - return undefined; - } - var scope = undefined; - var declarations = symbol.getDeclarations(); - if (declarations) { - for (var _i = 0; _i < declarations.length; _i++) { - var declaration = declarations[_i]; - var container = getContainerNode(declaration); - if (!container) { - return undefined; - } - if (scope && scope !== container) { - // Different declarations have different containers, bail out - return undefined; - } - if (container.kind === 230 /* SourceFile */ && !ts.isExternalModule(container)) { - // This is a global variable and not an external module, any declaration defined - // within this scope is visible outside the file - return undefined; - } - // The search scope is the container node - scope = container; - } - } - return scope; - } - function getPossibleSymbolReferencePositions(sourceFile, symbolName, start, end) { - var positions = []; - /// TODO: Cache symbol existence for files to save text search - // Also, need to make this work for unicode escapes. - // Be resilient in the face of a symbol with no name or zero length name - if (!symbolName || !symbolName.length) { - return positions; - } - var text = sourceFile.text; - var sourceLength = text.length; - var symbolNameLength = symbolName.length; - var position = text.indexOf(symbolName, start); - while (position >= 0) { - cancellationToken.throwIfCancellationRequested(); - // If we are past the end, stop looking - if (position > end) - break; - // We found a match. Make sure it's not part of a larger word (i.e. the char - // before and after it have to be a non-identifier char). - var endPosition = position + symbolNameLength; - if ((position === 0 || !ts.isIdentifierPart(text.charCodeAt(position - 1), 2 /* Latest */)) && - (endPosition === sourceLength || !ts.isIdentifierPart(text.charCodeAt(endPosition), 2 /* Latest */))) { - // Found a real match. Keep searching. - positions.push(position); - } - position = text.indexOf(symbolName, position + symbolNameLength + 1); - } - return positions; - } - function getLabelReferencesInNode(container, targetLabel) { - var references = []; - var sourceFile = container.getSourceFile(); - var labelName = targetLabel.text; - var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, labelName, container.getStart(), container.getEnd()); - ts.forEach(possiblePositions, function (position) { - cancellationToken.throwIfCancellationRequested(); - var node = ts.getTouchingWord(sourceFile, position); - if (!node || node.getWidth() !== labelName.length) { - return; - } - // Only pick labels that are either the target label, or have a target that is the target label - if (node === targetLabel || - (isJumpStatementTarget(node) && getTargetLabel(node, labelName) === targetLabel)) { - references.push(getReferenceEntryFromNode(node)); - } - }); - var definition = { - containerKind: "", - containerName: "", - fileName: targetLabel.getSourceFile().fileName, - kind: ScriptElementKind.label, - name: labelName, - textSpan: ts.createTextSpanFromBounds(targetLabel.getStart(), targetLabel.getEnd()) - }; - return [{ definition: definition, references: references }]; - } - function isValidReferencePosition(node, searchSymbolName) { - if (node) { - // Compare the length so we filter out strict superstrings of the symbol we are looking for - switch (node.kind) { - case 65 /* Identifier */: - return node.getWidth() === searchSymbolName.length; - case 8 /* StringLiteral */: - if (isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || - isNameOfExternalModuleImportOrDeclaration(node)) { - // For string literals we have two additional chars for the quotes - return node.getWidth() === searchSymbolName.length + 2; - } - break; - case 7 /* NumericLiteral */: - if (isLiteralNameOfPropertyDeclarationOrIndexAccess(node)) { - return node.getWidth() === searchSymbolName.length; - } - break; - } - } - return false; - } - /** Search within node "container" for references for a search value, where the search value is defined as a - * tuple of(searchSymbol, searchText, searchLocation, and searchMeaning). - * searchLocation: a node where the search value - */ - function getReferencesInNode(container, searchSymbol, searchText, searchLocation, searchMeaning, findInStrings, findInComments, result, symbolToIndex) { - var sourceFile = container.getSourceFile(); - var tripleSlashDirectivePrefixRegex = /^\/\/\/\s*= 0) { - var referencedSymbol = getReferencedSymbol(shorthandValueSymbol); - referencedSymbol.references.push(getReferenceEntryFromNode(referenceSymbolDeclaration.name)); - } - } - }); - } - return; - function getReferencedSymbol(symbol) { - var symbolId = ts.getSymbolId(symbol); - var index = symbolToIndex[symbolId]; - if (index === undefined) { - index = result.length; - symbolToIndex[symbolId] = index; - result.push({ - definition: getDefinition(symbol), - references: [] - }); - } - return result[index]; - } - function isInString(position) { - var token = ts.getTokenAtPosition(sourceFile, position); - return token && token.kind === 8 /* StringLiteral */ && position > token.getStart(); - } - function isInComment(position) { - var token = ts.getTokenAtPosition(sourceFile, position); - if (token && position < token.getStart()) { - // First, we have to see if this position actually landed in a comment. - var commentRanges = ts.getLeadingCommentRanges(sourceFile.text, token.pos); - // Then we want to make sure that it wasn't in a "///<" directive comment - // We don't want to unintentionally update a file name. - return ts.forEach(commentRanges, function (c) { - if (c.pos < position && position < c.end) { - var commentText = sourceFile.text.substring(c.pos, c.end); - if (!tripleSlashDirectivePrefixRegex.test(commentText)) { - return true; - } - } - }); - } - return false; - } - } - function getReferencesForSuperKeyword(superKeyword) { - var searchSpaceNode = ts.getSuperContainer(superKeyword, false); - if (!searchSpaceNode) { - return undefined; - } - // Whether 'super' occurs in a static context within a class. - var staticFlag = 128 /* Static */; - switch (searchSpaceNode.kind) { - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 137 /* Constructor */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - staticFlag &= searchSpaceNode.flags; - searchSpaceNode = searchSpaceNode.parent; // re-assign to be the owning class - break; - default: - return undefined; - } - var references = []; - var sourceFile = searchSpaceNode.getSourceFile(); - var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "super", searchSpaceNode.getStart(), searchSpaceNode.getEnd()); - ts.forEach(possiblePositions, function (position) { - cancellationToken.throwIfCancellationRequested(); - var node = ts.getTouchingWord(sourceFile, position); - if (!node || node.kind !== 91 /* SuperKeyword */) { - return; - } - var container = ts.getSuperContainer(node, false); - // If we have a 'super' container, we must have an enclosing class. - // Now make sure the owning class is the same as the search-space - // and has the same static qualifier as the original 'super's owner. - if (container && (128 /* Static */ & container.flags) === staticFlag && container.parent.symbol === searchSpaceNode.symbol) { - references.push(getReferenceEntryFromNode(node)); - } - }); - var definition = getDefinition(searchSpaceNode.symbol); - return [{ definition: definition, references: references }]; - } - function getReferencesForThisKeyword(thisOrSuperKeyword, sourceFiles) { - var searchSpaceNode = ts.getThisContainer(thisOrSuperKeyword, false); - // Whether 'this' occurs in a static context within a class. - var staticFlag = 128 /* Static */; - switch (searchSpaceNode.kind) { - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - if (ts.isObjectLiteralMethod(searchSpaceNode)) { - break; - } - // fall through - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 137 /* Constructor */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - staticFlag &= searchSpaceNode.flags; - searchSpaceNode = searchSpaceNode.parent; // re-assign to be the owning class - break; - case 230 /* SourceFile */: - if (ts.isExternalModule(searchSpaceNode)) { - return undefined; - } - // Fall through - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - break; - // Computed properties in classes are not handled here because references to this are illegal, - // so there is no point finding references to them. - default: - return undefined; - } - var references = []; - var possiblePositions; - if (searchSpaceNode.kind === 230 /* SourceFile */) { - ts.forEach(sourceFiles, function (sourceFile) { - possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", sourceFile.getStart(), sourceFile.getEnd()); - getThisReferencesInFile(sourceFile, sourceFile, possiblePositions, references); - }); - } - else { - var sourceFile = searchSpaceNode.getSourceFile(); - possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", searchSpaceNode.getStart(), searchSpaceNode.getEnd()); - getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, references); - } - return [{ - definition: { - containerKind: "", - containerName: "", - fileName: node.getSourceFile().fileName, - kind: ScriptElementKind.variableElement, - name: "this", - textSpan: ts.createTextSpanFromBounds(node.getStart(), node.getEnd()) - }, - references: references - }]; - function getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, result) { - ts.forEach(possiblePositions, function (position) { - cancellationToken.throwIfCancellationRequested(); - var node = ts.getTouchingWord(sourceFile, position); - if (!node || node.kind !== 93 /* ThisKeyword */) { - return; - } - var container = ts.getThisContainer(node, false); - switch (searchSpaceNode.kind) { - case 165 /* FunctionExpression */: - case 203 /* FunctionDeclaration */: - if (searchSpaceNode.symbol === container.symbol) { - result.push(getReferenceEntryFromNode(node)); - } - break; - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - if (ts.isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol) { - result.push(getReferenceEntryFromNode(node)); - } - break; - case 204 /* ClassDeclaration */: - // Make sure the container belongs to the same class - // and has the appropriate static modifier from the original container. - if (container.parent && searchSpaceNode.symbol === container.parent.symbol && (container.flags & 128 /* Static */) === staticFlag) { - result.push(getReferenceEntryFromNode(node)); - } - break; - case 230 /* SourceFile */: - if (container.kind === 230 /* SourceFile */ && !ts.isExternalModule(container)) { - result.push(getReferenceEntryFromNode(node)); - } - break; - } - }); - } - } - function populateSearchSymbolSet(symbol, location) { - // The search set contains at least the current symbol - var result = [symbol]; - // If the symbol is an alias, add what it alaises to the list - if (isImportOrExportSpecifierImportSymbol(symbol)) { - result.push(typeChecker.getAliasedSymbol(symbol)); - } - // If the location is in a context sensitive location (i.e. in an object literal) try - // to get a contextual type for it, and add the property symbol from the contextual - // type to the search set - if (isNameOfPropertyAssignment(location)) { - ts.forEach(getPropertySymbolsFromContextualType(location), function (contextualSymbol) { - result.push.apply(result, typeChecker.getRootSymbols(contextualSymbol)); - }); - /* Because in short-hand property assignment, location has two meaning : property name and as value of the property - * When we do findAllReference at the position of the short-hand property assignment, we would want to have references to position of - * property name and variable declaration of the identifier. - * Like in below example, when querying for all references for an identifier 'name', of the property assignment, the language service - * should show both 'name' in 'obj' and 'name' in variable declaration - * let name = "Foo"; - * let obj = { name }; - * In order to do that, we will populate the search set with the value symbol of the identifier as a value of the property assignment - * so that when matching with potential reference symbol, both symbols from property declaration and variable declaration - * will be included correctly. - */ - var shorthandValueSymbol = typeChecker.getShorthandAssignmentValueSymbol(location.parent); - if (shorthandValueSymbol) { - result.push(shorthandValueSymbol); - } - } - // If this is a union property, add all the symbols from all its source symbols in all unioned types. - // If the symbol is an instantiation from a another symbol (e.g. widened symbol) , add the root the list - ts.forEach(typeChecker.getRootSymbols(symbol), function (rootSymbol) { - if (rootSymbol !== symbol) { - result.push(rootSymbol); - } - // Add symbol of properties/methods of the same name in base classes and implemented interfaces definitions - if (rootSymbol.parent && rootSymbol.parent.flags & (32 /* Class */ | 64 /* Interface */)) { - getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result); - } - }); - return result; - } - function getPropertySymbolsFromBaseTypes(symbol, propertyName, result) { - if (symbol && symbol.flags & (32 /* Class */ | 64 /* Interface */)) { - ts.forEach(symbol.getDeclarations(), function (declaration) { - if (declaration.kind === 204 /* ClassDeclaration */) { - getPropertySymbolFromTypeReference(ts.getClassExtendsHeritageClauseElement(declaration)); - ts.forEach(ts.getClassImplementsHeritageClauseElements(declaration), getPropertySymbolFromTypeReference); - } - else if (declaration.kind === 205 /* InterfaceDeclaration */) { - ts.forEach(ts.getInterfaceBaseTypeNodes(declaration), getPropertySymbolFromTypeReference); - } - }); - } - return; - function getPropertySymbolFromTypeReference(typeReference) { - if (typeReference) { - var type = typeChecker.getTypeAtLocation(typeReference); - if (type) { - var propertySymbol = typeChecker.getPropertyOfType(type, propertyName); - if (propertySymbol) { - result.push(propertySymbol); - } - // Visit the typeReference as well to see if it directly or indirectly use that property - getPropertySymbolsFromBaseTypes(type.symbol, propertyName, result); - } - } - } - } - function getRelatedSymbol(searchSymbols, referenceSymbol, referenceLocation) { - if (searchSymbols.indexOf(referenceSymbol) >= 0) { - return referenceSymbol; - } - // If the reference symbol is an alias, check if what it is aliasing is one of the search - // symbols. - if (isImportOrExportSpecifierImportSymbol(referenceSymbol)) { - var aliasedSymbol = typeChecker.getAliasedSymbol(referenceSymbol); - if (searchSymbols.indexOf(aliasedSymbol) >= 0) { - return aliasedSymbol; - } - } - // If the reference location is in an object literal, try to get the contextual type for the - // object literal, lookup the property symbol in the contextual type, and use this symbol to - // compare to our searchSymbol - if (isNameOfPropertyAssignment(referenceLocation)) { - return ts.forEach(getPropertySymbolsFromContextualType(referenceLocation), function (contextualSymbol) { - return ts.forEach(typeChecker.getRootSymbols(contextualSymbol), function (s) { return searchSymbols.indexOf(s) >= 0 ? s : undefined; }); - }); - } - // Unwrap symbols to get to the root (e.g. transient symbols as a result of widening) - // Or a union property, use its underlying unioned symbols - return ts.forEach(typeChecker.getRootSymbols(referenceSymbol), function (rootSymbol) { - // if it is in the list, then we are done - if (searchSymbols.indexOf(rootSymbol) >= 0) { - return rootSymbol; - } - // Finally, try all properties with the same name in any type the containing type extended or implemented, and - // see if any is in the list - if (rootSymbol.parent && rootSymbol.parent.flags & (32 /* Class */ | 64 /* Interface */)) { - var result_3 = []; - getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result_3); - return ts.forEach(result_3, function (s) { return searchSymbols.indexOf(s) >= 0 ? s : undefined; }); - } - return undefined; - }); - } - function getPropertySymbolsFromContextualType(node) { - if (isNameOfPropertyAssignment(node)) { - var objectLiteral = node.parent.parent; - var contextualType = typeChecker.getContextualType(objectLiteral); - var name_31 = node.text; - if (contextualType) { - if (contextualType.flags & 16384 /* Union */) { - // This is a union type, first see if the property we are looking for is a union property (i.e. exists in all types) - // if not, search the constituent types for the property - var unionProperty = contextualType.getProperty(name_31); - if (unionProperty) { - return [unionProperty]; - } - else { - var result_4 = []; - ts.forEach(contextualType.types, function (t) { - var symbol = t.getProperty(name_31); - if (symbol) { - result_4.push(symbol); - } - }); - return result_4; - } - } - else { - var symbol_1 = contextualType.getProperty(name_31); - if (symbol_1) { - return [symbol_1]; - } - } - } - } - return undefined; - } - /** Given an initial searchMeaning, extracted from a location, widen the search scope based on the declarations - * of the corresponding symbol. e.g. if we are searching for "Foo" in value position, but "Foo" references a class - * then we need to widen the search to include type positions as well. - * On the contrary, if we are searching for "Bar" in type position and we trace bar to an interface, and an uninstantiated - * module, we want to keep the search limited to only types, as the two declarations (interface and uninstantiated module) - * do not intersect in any of the three spaces. - */ - function getIntersectingMeaningFromDeclarations(meaning, declarations) { - if (declarations) { - var lastIterationMeaning; - do { - // The result is order-sensitive, for instance if initialMeaning === Namespace, and declarations = [class, instantiated module] - // we need to consider both as they initialMeaning intersects with the module in the namespace space, and the module - // intersects with the class in the value space. - // To achieve that we will keep iterating until the result stabilizes. - // Remember the last meaning - lastIterationMeaning = meaning; - for (var _i = 0; _i < declarations.length; _i++) { - var declaration = declarations[_i]; - var declarationMeaning = getMeaningFromDeclaration(declaration); - if (declarationMeaning & meaning) { - meaning |= declarationMeaning; - } - } - } while (meaning !== lastIterationMeaning); - } - return meaning; - } - } - function getReferenceEntryFromNode(node) { - var start = node.getStart(); - var end = node.getEnd(); - if (node.kind === 8 /* StringLiteral */) { - start += 1; - end -= 1; - } - return { - fileName: node.getSourceFile().fileName, - textSpan: ts.createTextSpanFromBounds(start, end), - isWriteAccess: isWriteAccess(node) - }; - } - /** A node is considered a writeAccess iff it is a name of a declaration or a target of an assignment */ - function isWriteAccess(node) { - if (node.kind === 65 /* Identifier */ && ts.isDeclarationName(node)) { - return true; - } - var parent = node.parent; - if (parent) { - if (parent.kind === 171 /* PostfixUnaryExpression */ || parent.kind === 170 /* PrefixUnaryExpression */) { - return true; - } - else if (parent.kind === 172 /* BinaryExpression */ && parent.left === node) { - var operator = parent.operatorToken.kind; - return 53 /* FirstAssignment */ <= operator && operator <= 64 /* LastAssignment */; - } - } - return false; - } - /// NavigateTo - function getNavigateToItems(searchValue, maxResultCount) { - synchronizeHostData(); - return ts.NavigateTo.getNavigateToItems(program, cancellationToken, searchValue, maxResultCount); - } - function containErrors(diagnostics) { - return ts.forEach(diagnostics, function (diagnostic) { return diagnostic.category === ts.DiagnosticCategory.Error; }); - } - function getEmitOutput(fileName) { - synchronizeHostData(); - var sourceFile = getValidSourceFile(fileName); - var outputFiles = []; - function writeFile(fileName, data, writeByteOrderMark) { - outputFiles.push({ - name: fileName, - writeByteOrderMark: writeByteOrderMark, - text: data - }); - } - var emitOutput = program.emit(sourceFile, writeFile); - return { - outputFiles: outputFiles, - emitSkipped: emitOutput.emitSkipped - }; - } - function getMeaningFromDeclaration(node) { - switch (node.kind) { - case 131 /* Parameter */: - case 201 /* VariableDeclaration */: - case 155 /* BindingElement */: - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 227 /* PropertyAssignment */: - case 228 /* ShorthandPropertyAssignment */: - case 229 /* EnumMember */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 137 /* Constructor */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - case 226 /* CatchClause */: - return 1 /* Value */; - case 130 /* TypeParameter */: - case 205 /* InterfaceDeclaration */: - case 206 /* TypeAliasDeclaration */: - case 148 /* TypeLiteral */: - return 2 /* Type */; - case 204 /* ClassDeclaration */: - case 207 /* EnumDeclaration */: - return 1 /* Value */ | 2 /* Type */; - case 208 /* ModuleDeclaration */: - if (node.name.kind === 8 /* StringLiteral */) { - return 4 /* Namespace */ | 1 /* Value */; - } - else if (ts.getModuleInstanceState(node) === 1 /* Instantiated */) { - return 4 /* Namespace */ | 1 /* Value */; - } - else { - return 4 /* Namespace */; - } - case 215 /* NamedImports */: - case 216 /* ImportSpecifier */: - case 211 /* ImportEqualsDeclaration */: - case 212 /* ImportDeclaration */: - case 217 /* ExportAssignment */: - case 218 /* ExportDeclaration */: - return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; - // An external module can be a Value - case 230 /* SourceFile */: - return 4 /* Namespace */ | 1 /* Value */; - } - return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; - ts.Debug.fail("Unknown declaration type"); - } - function isTypeReference(node) { - if (ts.isRightSideOfQualifiedNameOrPropertyAccess(node)) { - node = node.parent; - } - return node.parent.kind === 144 /* TypeReference */ || node.parent.kind === 179 /* ExpressionWithTypeArguments */; - } - function isNamespaceReference(node) { - return isQualifiedNameNamespaceReference(node) || isPropertyAccessNamespaceReference(node); - } - function isPropertyAccessNamespaceReference(node) { - var root = node; - var isLastClause = true; - if (root.parent.kind === 158 /* PropertyAccessExpression */) { - while (root.parent && root.parent.kind === 158 /* PropertyAccessExpression */) { - root = root.parent; - } - isLastClause = root.name === node; - } - if (!isLastClause && root.parent.kind === 179 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 225 /* HeritageClause */) { - var decl = root.parent.parent.parent; - return (decl.kind === 204 /* ClassDeclaration */ && root.parent.parent.token === 102 /* ImplementsKeyword */) || - (decl.kind === 205 /* InterfaceDeclaration */ && root.parent.parent.token === 79 /* ExtendsKeyword */); - } - return false; - } - function isQualifiedNameNamespaceReference(node) { - var root = node; - var isLastClause = true; - if (root.parent.kind === 128 /* QualifiedName */) { - while (root.parent && root.parent.kind === 128 /* QualifiedName */) { - root = root.parent; - } - isLastClause = root.right === node; - } - return root.parent.kind === 144 /* TypeReference */ && !isLastClause; - } - function isInRightSideOfImport(node) { - while (node.parent.kind === 128 /* QualifiedName */) { - node = node.parent; - } - return ts.isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node; - } - function getMeaningFromRightHandSideOfImportEquals(node) { - ts.Debug.assert(node.kind === 65 /* Identifier */); - // import a = |b|; // Namespace - // import a = |b.c|; // Value, type, namespace - // import a = |b.c|.d; // Namespace - if (node.parent.kind === 128 /* QualifiedName */ && - node.parent.right === node && - node.parent.parent.kind === 211 /* ImportEqualsDeclaration */) { - return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; - } - return 4 /* Namespace */; - } - function getMeaningFromLocation(node) { - if (node.parent.kind === 217 /* ExportAssignment */) { - return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; - } - else if (isInRightSideOfImport(node)) { - return getMeaningFromRightHandSideOfImportEquals(node); - } - else if (ts.isDeclarationName(node)) { - return getMeaningFromDeclaration(node.parent); - } - else if (isTypeReference(node)) { - return 2 /* Type */; - } - else if (isNamespaceReference(node)) { - return 4 /* Namespace */; - } - else { - return 1 /* Value */; - } - } - // Signature help - /** - * This is a semantic operation. - */ - function getSignatureHelpItems(fileName, position) { - synchronizeHostData(); - var sourceFile = getValidSourceFile(fileName); - return ts.SignatureHelp.getSignatureHelpItems(program, sourceFile, position, cancellationToken); - } - /// Syntactic features - function getSourceFile(fileName) { - return syntaxTreeCache.getCurrentSourceFile(fileName); - } - function getNameOrDottedNameSpan(fileName, startPos, endPos) { - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - // Get node at the location - var node = ts.getTouchingPropertyName(sourceFile, startPos); - if (!node) { - return; - } - switch (node.kind) { - case 158 /* PropertyAccessExpression */: - case 128 /* QualifiedName */: - case 8 /* StringLiteral */: - case 80 /* FalseKeyword */: - case 95 /* TrueKeyword */: - case 89 /* NullKeyword */: - case 91 /* SuperKeyword */: - case 93 /* ThisKeyword */: - case 65 /* Identifier */: - break; - // Cant create the text span - default: - return; - } - var nodeForStartPos = node; - while (true) { - if (isRightSideOfPropertyAccess(nodeForStartPos) || isRightSideOfQualifiedName(nodeForStartPos)) { - // If on the span is in right side of the the property or qualified name, return the span from the qualified name pos to end of this node - nodeForStartPos = nodeForStartPos.parent; - } - else if (isNameOfModuleDeclaration(nodeForStartPos)) { - // If this is name of a module declarations, check if this is right side of dotted module name - // If parent of the module declaration which is parent of this node is module declaration and its body is the module declaration that this node is name of - // Then this name is name from dotted module - if (nodeForStartPos.parent.parent.kind === 208 /* ModuleDeclaration */ && - nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { - // Use parent module declarations name for start pos - nodeForStartPos = nodeForStartPos.parent.parent.name; - } - else { - // We have to use this name for start pos - break; - } - } - else { - // Is not a member expression so we have found the node for start pos - break; - } - } - return ts.createTextSpanFromBounds(nodeForStartPos.getStart(), node.getEnd()); - } - function getBreakpointStatementAtPosition(fileName, position) { - // doesn't use compiler - no need to synchronize with host - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - return ts.BreakpointResolver.spanInSourceFileAtLocation(sourceFile, position); - } - function getNavigationBarItems(fileName) { - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - return ts.NavigationBar.getNavigationBarItems(sourceFile); - } - function getSemanticClassifications(fileName, span) { - return convertClassifications(getEncodedSemanticClassifications(fileName, span)); - } - function getEncodedSemanticClassifications(fileName, span) { - synchronizeHostData(); - var sourceFile = getValidSourceFile(fileName); - var typeChecker = program.getTypeChecker(); - var result = []; - var classifiableNames = program.getClassifiableNames(); - processNode(sourceFile); - return { spans: result, endOfLineState: 0 /* None */ }; - function pushClassification(start, length, type) { - result.push(start); - result.push(length); - result.push(type); - } - function classifySymbol(symbol, meaningAtPosition) { - var flags = symbol.getFlags(); - if ((flags & 788448 /* Classifiable */) === 0 /* None */) { - return; - } - if (flags & 32 /* Class */) { - return 11 /* className */; - } - else if (flags & 384 /* Enum */) { - return 12 /* enumName */; - } - else if (flags & 524288 /* TypeAlias */) { - return 16 /* typeAliasName */; - } - else if (meaningAtPosition & 2 /* Type */) { - if (flags & 64 /* Interface */) { - return 13 /* interfaceName */; - } - else if (flags & 262144 /* TypeParameter */) { - return 15 /* typeParameterName */; - } - } - else if (flags & 1536 /* Module */) { - // Only classify a module as such if - // - It appears in a namespace context. - // - There exists a module declaration which actually impacts the value side. - if (meaningAtPosition & 4 /* Namespace */ || - (meaningAtPosition & 1 /* Value */ && hasValueSideModule(symbol))) { - return 14 /* moduleName */; - } - } - return undefined; - /** - * Returns true if there exists a module that introduces entities on the value side. - */ - function hasValueSideModule(symbol) { - return ts.forEach(symbol.declarations, function (declaration) { - return declaration.kind === 208 /* ModuleDeclaration */ && ts.getModuleInstanceState(declaration) == 1 /* Instantiated */; - }); - } - } - function processNode(node) { - // Only walk into nodes that intersect the requested span. - if (node && ts.textSpanIntersectsWith(span, node.getFullStart(), node.getFullWidth())) { - if (node.kind === 65 /* Identifier */ && !ts.nodeIsMissing(node)) { - var identifier = node; - // Only bother calling into the typechecker if this is an identifier that - // could possibly resolve to a type name. This makes classification run - // in a third of the time it would normally take. - if (classifiableNames[identifier.text]) { - var symbol = typeChecker.getSymbolAtLocation(node); - if (symbol) { - var type = classifySymbol(symbol, getMeaningFromLocation(node)); - if (type) { - pushClassification(node.getStart(), node.getWidth(), type); - } - } - } - } - ts.forEachChild(node, processNode); - } - } - } - function getClassificationTypeName(type) { - switch (type) { - case 1 /* comment */: return ClassificationTypeNames.comment; - case 2 /* identifier */: return ClassificationTypeNames.identifier; - case 3 /* keyword */: return ClassificationTypeNames.keyword; - case 4 /* numericLiteral */: return ClassificationTypeNames.numericLiteral; - case 5 /* operator */: return ClassificationTypeNames.operator; - case 6 /* stringLiteral */: return ClassificationTypeNames.stringLiteral; - case 8 /* whiteSpace */: return ClassificationTypeNames.whiteSpace; - case 9 /* text */: return ClassificationTypeNames.text; - case 10 /* punctuation */: return ClassificationTypeNames.punctuation; - case 11 /* className */: return ClassificationTypeNames.className; - case 12 /* enumName */: return ClassificationTypeNames.enumName; - case 13 /* interfaceName */: return ClassificationTypeNames.interfaceName; - case 14 /* moduleName */: return ClassificationTypeNames.moduleName; - case 15 /* typeParameterName */: return ClassificationTypeNames.typeParameterName; - case 16 /* typeAliasName */: return ClassificationTypeNames.typeAliasName; - case 17 /* parameterName */: return ClassificationTypeNames.parameterName; - case 18 /* docCommentTagName */: return ClassificationTypeNames.docCommentTagName; - } - } - function convertClassifications(classifications) { - ts.Debug.assert(classifications.spans.length % 3 === 0); - var dense = classifications.spans; - var result = []; - for (var i = 0, n = dense.length; i < n; i += 3) { - result.push({ - textSpan: ts.createTextSpan(dense[i], dense[i + 1]), - classificationType: getClassificationTypeName(dense[i + 2]) - }); - } - return result; - } - function getSyntacticClassifications(fileName, span) { - return convertClassifications(getEncodedSyntacticClassifications(fileName, span)); - } - function getEncodedSyntacticClassifications(fileName, span) { - // doesn't use compiler - no need to synchronize with host - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - // Make a scanner we can get trivia from. - var triviaScanner = ts.createScanner(2 /* Latest */, false, sourceFile.text); - var mergeConflictScanner = ts.createScanner(2 /* Latest */, false, sourceFile.text); - var result = []; - processElement(sourceFile); - return { spans: result, endOfLineState: 0 /* None */ }; - function pushClassification(start, length, type) { - result.push(start); - result.push(length); - result.push(type); - } - function classifyLeadingTrivia(token) { - var tokenStart = ts.skipTrivia(sourceFile.text, token.pos, false); - if (tokenStart === token.pos) { - return; - } - // token has trivia. Classify them appropriately. - triviaScanner.setTextPos(token.pos); - while (true) { - var start = triviaScanner.getTextPos(); - var kind = triviaScanner.scan(); - var end = triviaScanner.getTextPos(); - var width = end - start; - // The moment we get something that isn't trivia, then stop processing. - if (!ts.isTrivia(kind)) { - return; - } - // Only bother with the trivia if it at least intersects the span of interest. - if (ts.textSpanIntersectsWith(span, start, width)) { - if (ts.isComment(kind)) { - classifyComment(token, kind, start, width); - continue; - } - if (kind === 6 /* ConflictMarkerTrivia */) { - var text = sourceFile.text; - var ch = text.charCodeAt(start); - // for the <<<<<<< and >>>>>>> markers, we just add them in as comments - // in the classification stream. - if (ch === 60 /* lessThan */ || ch === 62 /* greaterThan */) { - pushClassification(start, width, 1 /* comment */); - continue; - } - // for the ======== add a comment for the first line, and then lex all - // subsequent lines up until the end of the conflict marker. - ts.Debug.assert(ch === 61 /* equals */); - classifyDisabledMergeCode(text, start, end); - } - } - } - } - function classifyComment(token, kind, start, width) { - if (kind === 3 /* MultiLineCommentTrivia */) { - // See if this is a doc comment. If so, we'll classify certain portions of it - // specially. - var docCommentAndDiagnostics = ts.parseIsolatedJSDocComment(sourceFile.text, start, width); - if (docCommentAndDiagnostics && docCommentAndDiagnostics.jsDocComment) { - docCommentAndDiagnostics.jsDocComment.parent = token; - classifyJSDocComment(docCommentAndDiagnostics.jsDocComment); - return; - } - } - // Simple comment. Just add as is. - pushCommentRange(start, width); - } - function pushCommentRange(start, width) { - pushClassification(start, width, 1 /* comment */); - } - function classifyJSDocComment(docComment) { - var pos = docComment.pos; - for (var _i = 0, _a = docComment.tags; _i < _a.length; _i++) { - var tag = _a[_i]; - // As we walk through each tag, classify the portion of text from the end of - // the last tag (or the start of the entire doc comment) as 'comment'. - if (tag.pos !== pos) { - pushCommentRange(pos, tag.pos - pos); - } - pushClassification(tag.atToken.pos, tag.atToken.end - tag.atToken.pos, 10 /* punctuation */); - pushClassification(tag.tagName.pos, tag.tagName.end - tag.tagName.pos, 18 /* docCommentTagName */); - pos = tag.tagName.end; - switch (tag.kind) { - case 249 /* JSDocParameterTag */: - processJSDocParameterTag(tag); - break; - case 252 /* JSDocTemplateTag */: - processJSDocTemplateTag(tag); - break; - case 251 /* JSDocTypeTag */: - processElement(tag.typeExpression); - break; - case 250 /* JSDocReturnTag */: - processElement(tag.typeExpression); - break; - } - pos = tag.end; - } - if (pos !== docComment.end) { - pushCommentRange(pos, docComment.end - pos); - } - return; - function processJSDocParameterTag(tag) { - if (tag.preParameterName) { - pushCommentRange(pos, tag.preParameterName.pos - pos); - pushClassification(tag.preParameterName.pos, tag.preParameterName.end - tag.preParameterName.pos, 17 /* parameterName */); - pos = tag.preParameterName.end; - } - if (tag.typeExpression) { - pushCommentRange(pos, tag.typeExpression.pos - pos); - processElement(tag.typeExpression); - pos = tag.typeExpression.end; - } - if (tag.postParameterName) { - pushCommentRange(pos, tag.postParameterName.pos - pos); - pushClassification(tag.postParameterName.pos, tag.postParameterName.end - tag.postParameterName.pos, 17 /* parameterName */); - pos = tag.postParameterName.end; - } - } - } - function processJSDocTemplateTag(tag) { - for (var _i = 0, _a = tag.getChildren(); _i < _a.length; _i++) { - var child = _a[_i]; - processElement(child); - } - } - function classifyDisabledMergeCode(text, start, end) { - // Classify the line that the ======= marker is on as a comment. Then just lex - // all further tokens and add them to the result. - for (var i = start; i < end; i++) { - if (ts.isLineBreak(text.charCodeAt(i))) { - break; - } - } - pushClassification(start, i - start, 1 /* comment */); - mergeConflictScanner.setTextPos(i); - while (mergeConflictScanner.getTextPos() < end) { - classifyDisabledCodeToken(); - } - } - function classifyDisabledCodeToken() { - var start = mergeConflictScanner.getTextPos(); - var tokenKind = mergeConflictScanner.scan(); - var end = mergeConflictScanner.getTextPos(); - var type = classifyTokenType(tokenKind); - if (type) { - pushClassification(start, end - start, type); - } - } - function classifyToken(token) { - classifyLeadingTrivia(token); - if (token.getWidth() > 0) { - var type = classifyTokenType(token.kind, token); - if (type) { - pushClassification(token.getStart(), token.getWidth(), type); - } - } - } - // for accurate classification, the actual token should be passed in. however, for - // cases like 'disabled merge code' classification, we just get the token kind and - // classify based on that instead. - function classifyTokenType(tokenKind, token) { - if (ts.isKeyword(tokenKind)) { - return 3 /* keyword */; - } - // Special case < and > If they appear in a generic context they are punctuation, - // not operators. - if (tokenKind === 24 /* LessThanToken */ || tokenKind === 25 /* GreaterThanToken */) { - // If the node owning the token has a type argument list or type parameter list, then - // we can effectively assume that a '<' and '>' belong to those lists. - if (token && ts.getTypeArgumentOrTypeParameterList(token.parent)) { - return 10 /* punctuation */; - } - } - if (ts.isPunctuation(tokenKind)) { - if (token) { - if (tokenKind === 53 /* EqualsToken */) { - // the '=' in a variable declaration is special cased here. - if (token.parent.kind === 201 /* VariableDeclaration */ || - token.parent.kind === 134 /* PropertyDeclaration */ || - token.parent.kind === 131 /* Parameter */) { - return 5 /* operator */; - } - } - if (token.parent.kind === 172 /* BinaryExpression */ || - token.parent.kind === 170 /* PrefixUnaryExpression */ || - token.parent.kind === 171 /* PostfixUnaryExpression */ || - token.parent.kind === 173 /* ConditionalExpression */) { - return 5 /* operator */; - } - } - return 10 /* punctuation */; - } - else if (tokenKind === 7 /* NumericLiteral */) { - return 4 /* numericLiteral */; - } - else if (tokenKind === 8 /* StringLiteral */) { - return 6 /* stringLiteral */; - } - else if (tokenKind === 9 /* RegularExpressionLiteral */) { - // TODO: we should get another classification type for these literals. - return 6 /* stringLiteral */; - } - else if (ts.isTemplateLiteralKind(tokenKind)) { - // TODO (drosen): we should *also* get another classification type for these literals. - return 6 /* stringLiteral */; - } - else if (tokenKind === 65 /* Identifier */) { - if (token) { - switch (token.parent.kind) { - case 204 /* ClassDeclaration */: - if (token.parent.name === token) { - return 11 /* className */; - } - return; - case 130 /* TypeParameter */: - if (token.parent.name === token) { - return 15 /* typeParameterName */; - } - return; - case 205 /* InterfaceDeclaration */: - if (token.parent.name === token) { - return 13 /* interfaceName */; - } - return; - case 207 /* EnumDeclaration */: - if (token.parent.name === token) { - return 12 /* enumName */; - } - return; - case 208 /* ModuleDeclaration */: - if (token.parent.name === token) { - return 14 /* moduleName */; - } - return; - case 131 /* Parameter */: - if (token.parent.name === token) { - return 17 /* parameterName */; - } - return; - } - } - return 9 /* text */; - } - } - function processElement(element) { - if (!element) { - return; - } - // Ignore nodes that don't intersect the original span to classify. - if (ts.textSpanIntersectsWith(span, element.getFullStart(), element.getFullWidth())) { - var children = element.getChildren(sourceFile); - for (var _i = 0; _i < children.length; _i++) { - var child = children[_i]; - if (ts.isToken(child)) { - classifyToken(child); - } - else { - // Recurse into our child nodes. - processElement(child); - } - } - } - } - } - function getOutliningSpans(fileName) { - // doesn't use compiler - no need to synchronize with host - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - return ts.OutliningElementsCollector.collectElements(sourceFile); - } - function getBraceMatchingAtPosition(fileName, position) { - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - var result = []; - var token = ts.getTouchingToken(sourceFile, position); - if (token.getStart(sourceFile) === position) { - var matchKind = getMatchingTokenKind(token); - // Ensure that there is a corresponding token to match ours. - if (matchKind) { - var parentElement = token.parent; - var childNodes = parentElement.getChildren(sourceFile); - for (var _i = 0; _i < childNodes.length; _i++) { - var current = childNodes[_i]; - if (current.kind === matchKind) { - var range1 = ts.createTextSpan(token.getStart(sourceFile), token.getWidth(sourceFile)); - var range2 = ts.createTextSpan(current.getStart(sourceFile), current.getWidth(sourceFile)); - // We want to order the braces when we return the result. - if (range1.start < range2.start) { - result.push(range1, range2); - } - else { - result.push(range2, range1); - } - break; - } - } - } - } - return result; - function getMatchingTokenKind(token) { - switch (token.kind) { - case 14 /* OpenBraceToken */: return 15 /* CloseBraceToken */; - case 16 /* OpenParenToken */: return 17 /* CloseParenToken */; - case 18 /* OpenBracketToken */: return 19 /* CloseBracketToken */; - case 24 /* LessThanToken */: return 25 /* GreaterThanToken */; - case 15 /* CloseBraceToken */: return 14 /* OpenBraceToken */; - case 17 /* CloseParenToken */: return 16 /* OpenParenToken */; - case 19 /* CloseBracketToken */: return 18 /* OpenBracketToken */; - case 25 /* GreaterThanToken */: return 24 /* LessThanToken */; - } - return undefined; - } - } - function getIndentationAtPosition(fileName, position, editorOptions) { - var start = new Date().getTime(); - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - log("getIndentationAtPosition: getCurrentSourceFile: " + (new Date().getTime() - start)); - start = new Date().getTime(); - var result = ts.formatting.SmartIndenter.getIndentation(position, sourceFile, editorOptions); - log("getIndentationAtPosition: computeIndentation : " + (new Date().getTime() - start)); - return result; - } - function getFormattingEditsForRange(fileName, start, end, options) { - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - return ts.formatting.formatSelection(start, end, sourceFile, getRuleProvider(options), options); - } - function getFormattingEditsForDocument(fileName, options) { - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - return ts.formatting.formatDocument(sourceFile, getRuleProvider(options), options); - } - function getFormattingEditsAfterKeystroke(fileName, position, key, options) { - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - if (key === "}") { - return ts.formatting.formatOnClosingCurly(position, sourceFile, getRuleProvider(options), options); - } - else if (key === ";") { - return ts.formatting.formatOnSemicolon(position, sourceFile, getRuleProvider(options), options); - } - else if (key === "\n") { - return ts.formatting.formatOnEnter(position, sourceFile, getRuleProvider(options), options); - } - return []; - } - function getTodoComments(fileName, descriptors) { - // Note: while getting todo comments seems like a syntactic operation, we actually - // treat it as a semantic operation here. This is because we expect our host to call - // this on every single file. If we treat this syntactically, then that will cause - // us to populate and throw away the tree in our syntax tree cache for each file. By - // treating this as a semantic operation, we can access any tree without throwing - // anything away. - synchronizeHostData(); - var sourceFile = getValidSourceFile(fileName); - cancellationToken.throwIfCancellationRequested(); - var fileContents = sourceFile.text; - var result = []; - if (descriptors.length > 0) { - var regExp = getTodoCommentsRegExp(); - var matchArray; - while (matchArray = regExp.exec(fileContents)) { - cancellationToken.throwIfCancellationRequested(); - // If we got a match, here is what the match array will look like. Say the source text is: - // - // " // hack 1" - // - // The result array with the regexp: will be: - // - // ["// hack 1", "// ", "hack 1", undefined, "hack"] - // - // Here are the relevant capture groups: - // 0) The full match for the entire regexp. - // 1) The preamble to the message portion. - // 2) The message portion. - // 3...N) The descriptor that was matched - by index. 'undefined' for each - // descriptor that didn't match. an actual value if it did match. - // - // i.e. 'undefined' in position 3 above means TODO(jason) didn't match. - // "hack" in position 4 means HACK did match. - var firstDescriptorCaptureIndex = 3; - ts.Debug.assert(matchArray.length === descriptors.length + firstDescriptorCaptureIndex); - var preamble = matchArray[1]; - var matchPosition = matchArray.index + preamble.length; - // OK, we have found a match in the file. This is only an acceptable match if - // it is contained within a comment. - var token = ts.getTokenAtPosition(sourceFile, matchPosition); - if (!isInsideComment(sourceFile, token, matchPosition)) { - continue; - } - var descriptor = undefined; - for (var i = 0, n = descriptors.length; i < n; i++) { - if (matchArray[i + firstDescriptorCaptureIndex]) { - descriptor = descriptors[i]; - } - } - ts.Debug.assert(descriptor !== undefined); - // We don't want to match something like 'TODOBY', so we make sure a non - // letter/digit follows the match. - if (isLetterOrDigit(fileContents.charCodeAt(matchPosition + descriptor.text.length))) { - continue; - } - var message = matchArray[2]; - result.push({ - descriptor: descriptor, - message: message, - position: matchPosition - }); - } - } - return result; - function escapeRegExp(str) { - return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); - } - function getTodoCommentsRegExp() { - // NOTE: ?: means 'non-capture group'. It allows us to have groups without having to - // filter them out later in the final result array. - // TODO comments can appear in one of the following forms: - // - // 1) // TODO or /////////// TODO - // - // 2) /* TODO or /********** TODO - // - // 3) /* - // * TODO - // */ - // - // The following three regexps are used to match the start of the text up to the TODO - // comment portion. - var singleLineCommentStart = /(?:\/\/+\s*)/.source; - var multiLineCommentStart = /(?:\/\*+\s*)/.source; - var anyNumberOfSpacesAndAsterixesAtStartOfLine = /(?:^(?:\s|\*)*)/.source; - // Match any of the above three TODO comment start regexps. - // Note that the outermost group *is* a capture group. We want to capture the preamble - // so that we can determine the starting position of the TODO comment match. - var preamble = "(" + anyNumberOfSpacesAndAsterixesAtStartOfLine + "|" + singleLineCommentStart + "|" + multiLineCommentStart + ")"; - // Takes the descriptors and forms a regexp that matches them as if they were literals. - // For example, if the descriptors are "TODO(jason)" and "HACK", then this will be: - // - // (?:(TODO\(jason\))|(HACK)) - // - // Note that the outermost group is *not* a capture group, but the innermost groups - // *are* capture groups. By capturing the inner literals we can determine after - // matching which descriptor we are dealing with. - var literals = "(?:" + ts.map(descriptors, function (d) { return "(" + escapeRegExp(d.text) + ")"; }).join("|") + ")"; - // After matching a descriptor literal, the following regexp matches the rest of the - // text up to the end of the line (or */). - var endOfLineOrEndOfComment = /(?:$|\*\/)/.source; - var messageRemainder = /(?:.*?)/.source; - // This is the portion of the match we'll return as part of the TODO comment result. We - // match the literal portion up to the end of the line or end of comment. - var messagePortion = "(" + literals + messageRemainder + ")"; - var regExpString = preamble + messagePortion + endOfLineOrEndOfComment; - // The final regexp will look like this: - // /((?:\/\/+\s*)|(?:\/\*+\s*)|(?:^(?:\s|\*)*))((?:(TODO\(jason\))|(HACK))(?:.*?))(?:$|\*\/)/gim - // The flags of the regexp are important here. - // 'g' is so that we are doing a global search and can find matches several times - // in the input. - // - // 'i' is for case insensitivity (We do this to match C# TODO comment code). - // - // 'm' is so we can find matches in a multi-line input. - return new RegExp(regExpString, "gim"); - } - function isLetterOrDigit(char) { - return (char >= 97 /* a */ && char <= 122 /* z */) || - (char >= 65 /* A */ && char <= 90 /* Z */) || - (char >= 48 /* _0 */ && char <= 57 /* _9 */); - } - } - function getRenameInfo(fileName, position) { - synchronizeHostData(); - var sourceFile = getValidSourceFile(fileName); - var typeChecker = program.getTypeChecker(); - var node = ts.getTouchingWord(sourceFile, position); - // Can only rename an identifier. - if (node && node.kind === 65 /* Identifier */) { - var symbol = typeChecker.getSymbolAtLocation(node); - // Only allow a symbol to be renamed if it actually has at least one declaration. - if (symbol) { - var declarations = symbol.getDeclarations(); - if (declarations && declarations.length > 0) { - // Disallow rename for elements that are defined in the standard TypeScript library. - var defaultLibFileName = host.getDefaultLibFileName(host.getCompilationSettings()); - if (defaultLibFileName) { - for (var _i = 0; _i < declarations.length; _i++) { - var current = declarations[_i]; - var sourceFile_2 = current.getSourceFile(); - if (sourceFile_2 && getCanonicalFileName(ts.normalizePath(sourceFile_2.fileName)) === getCanonicalFileName(ts.normalizePath(defaultLibFileName))) { - return getRenameInfoError(ts.getLocaleSpecificMessage(ts.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library.key)); - } - } - } - var kind = getSymbolKind(symbol, node); - if (kind) { - return { - canRename: true, - localizedErrorMessage: undefined, - displayName: symbol.name, - fullDisplayName: typeChecker.getFullyQualifiedName(symbol), - kind: kind, - kindModifiers: getSymbolModifiers(symbol), - triggerSpan: ts.createTextSpan(node.getStart(), node.getWidth()) - }; - } - } - } - } - return getRenameInfoError(ts.getLocaleSpecificMessage(ts.Diagnostics.You_cannot_rename_this_element.key)); - function getRenameInfoError(localizedErrorMessage) { - return { - canRename: false, - localizedErrorMessage: localizedErrorMessage, - displayName: undefined, - fullDisplayName: undefined, - kind: undefined, - kindModifiers: undefined, - triggerSpan: undefined - }; - } - } - return { - dispose: dispose, - cleanupSemanticCache: cleanupSemanticCache, - getSyntacticDiagnostics: getSyntacticDiagnostics, - getSemanticDiagnostics: getSemanticDiagnostics, - getCompilerOptionsDiagnostics: getCompilerOptionsDiagnostics, - getSyntacticClassifications: getSyntacticClassifications, - getSemanticClassifications: getSemanticClassifications, - getEncodedSyntacticClassifications: getEncodedSyntacticClassifications, - getEncodedSemanticClassifications: getEncodedSemanticClassifications, - getCompletionsAtPosition: getCompletionsAtPosition, - getCompletionEntryDetails: getCompletionEntryDetails, - getSignatureHelpItems: getSignatureHelpItems, - getQuickInfoAtPosition: getQuickInfoAtPosition, - getDefinitionAtPosition: getDefinitionAtPosition, - getTypeDefinitionAtPosition: getTypeDefinitionAtPosition, - getReferencesAtPosition: getReferencesAtPosition, - findReferences: findReferences, - getOccurrencesAtPosition: getOccurrencesAtPosition, - getDocumentHighlights: getDocumentHighlights, - getNameOrDottedNameSpan: getNameOrDottedNameSpan, - getBreakpointStatementAtPosition: getBreakpointStatementAtPosition, - getNavigateToItems: getNavigateToItems, - getRenameInfo: getRenameInfo, - findRenameLocations: findRenameLocations, - getNavigationBarItems: getNavigationBarItems, - getOutliningSpans: getOutliningSpans, - getTodoComments: getTodoComments, - getBraceMatchingAtPosition: getBraceMatchingAtPosition, - getIndentationAtPosition: getIndentationAtPosition, - getFormattingEditsForRange: getFormattingEditsForRange, - getFormattingEditsForDocument: getFormattingEditsForDocument, - getFormattingEditsAfterKeystroke: getFormattingEditsAfterKeystroke, - getEmitOutput: getEmitOutput, - getSourceFile: getSourceFile, - getProgram: getProgram - }; - } - ts.createLanguageService = createLanguageService; - /* @internal */ - function getNameTable(sourceFile) { - if (!sourceFile.nameTable) { - initializeNameTable(sourceFile); - } - return sourceFile.nameTable; - } - ts.getNameTable = getNameTable; - function initializeNameTable(sourceFile) { - var nameTable = {}; - walk(sourceFile); - sourceFile.nameTable = nameTable; - function walk(node) { - switch (node.kind) { - case 65 /* Identifier */: - nameTable[node.text] = node.text; - break; - case 8 /* StringLiteral */: - case 7 /* NumericLiteral */: - // We want to store any numbers/strings if they were a name that could be - // related to a declaration. So, if we have 'import x = require("something")' - // then we want 'something' to be in the name table. Similarly, if we have - // "a['propname']" then we want to store "propname" in the name table. - if (ts.isDeclarationName(node) || - node.parent.kind === 222 /* ExternalModuleReference */ || - isArgumentOfElementAccessExpression(node)) { - nameTable[node.text] = node.text; - } - break; - default: - ts.forEachChild(node, walk); - } - } - } - function isArgumentOfElementAccessExpression(node) { - return node && - node.parent && - node.parent.kind === 159 /* ElementAccessExpression */ && - node.parent.argumentExpression === node; - } - /// Classifier - function createClassifier() { - var scanner = ts.createScanner(2 /* Latest */, false); - /// We do not have a full parser support to know when we should parse a regex or not - /// If we consider every slash token to be a regex, we could be missing cases like "1/2/3", where - /// we have a series of divide operator. this list allows us to be more accurate by ruling out - /// locations where a regexp cannot exist. - var noRegexTable = []; - noRegexTable[65 /* Identifier */] = true; - noRegexTable[8 /* StringLiteral */] = true; - noRegexTable[7 /* NumericLiteral */] = true; - noRegexTable[9 /* RegularExpressionLiteral */] = true; - noRegexTable[93 /* ThisKeyword */] = true; - noRegexTable[38 /* PlusPlusToken */] = true; - noRegexTable[39 /* MinusMinusToken */] = true; - noRegexTable[17 /* CloseParenToken */] = true; - noRegexTable[19 /* CloseBracketToken */] = true; - noRegexTable[15 /* CloseBraceToken */] = true; - noRegexTable[95 /* TrueKeyword */] = true; - noRegexTable[80 /* FalseKeyword */] = true; - // Just a stack of TemplateHeads and OpenCurlyBraces, used to perform rudimentary (inexact) - // classification on template strings. Because of the context free nature of templates, - // the only precise way to classify a template portion would be by propagating the stack across - // lines, just as we do with the end-of-line state. However, this is a burden for implementers, - // and the behavior is entirely subsumed by the syntactic classifier anyway, so we instead - // flatten any nesting when the template stack is non-empty and encode it in the end-of-line state. - // Situations in which this fails are - // 1) When template strings are nested across different lines: - // `hello ${ `world - // ` }` - // - // Where on the second line, you will get the closing of a template, - // a closing curly, and a new template. - // - // 2) When substitution expressions have curly braces and the curly brace falls on the next line: - // `hello ${ () => { - // return "world" } } ` - // - // Where on the second line, you will get the 'return' keyword, - // a string literal, and a template end consisting of '} } `'. - var templateStack = []; - /** Returns true if 'keyword2' can legally follow 'keyword1' in any language construct. */ - function canFollow(keyword1, keyword2) { - if (ts.isAccessibilityModifier(keyword1)) { - if (keyword2 === 116 /* GetKeyword */ || - keyword2 === 122 /* SetKeyword */ || - keyword2 === 114 /* ConstructorKeyword */ || - keyword2 === 109 /* StaticKeyword */) { - // Allow things like "public get", "public constructor" and "public static". - // These are all legal. - return true; - } - // Any other keyword following "public" is actually an identifier an not a real - // keyword. - return false; - } - // Assume any other keyword combination is legal. This can be refined in the future - // if there are more cases we want the classifier to be better at. - return true; - } - function convertClassifications(classifications, text) { - var entries = []; - var dense = classifications.spans; - var lastEnd = 0; - for (var i = 0, n = dense.length; i < n; i += 3) { - var start = dense[i]; - var length_2 = dense[i + 1]; - var type = dense[i + 2]; - // Make a whitespace entry between the last item and this one. - if (lastEnd >= 0) { - var whitespaceLength_1 = start - lastEnd; - if (whitespaceLength_1 > 0) { - entries.push({ length: whitespaceLength_1, classification: TokenClass.Whitespace }); - } - } - entries.push({ length: length_2, classification: convertClassification(type) }); - lastEnd = start + length_2; - } - var whitespaceLength = text.length - lastEnd; - if (whitespaceLength > 0) { - entries.push({ length: whitespaceLength, classification: TokenClass.Whitespace }); - } - return { entries: entries, finalLexState: classifications.endOfLineState }; - } - function convertClassification(type) { - switch (type) { - case 1 /* comment */: return TokenClass.Comment; - case 3 /* keyword */: return TokenClass.Keyword; - case 4 /* numericLiteral */: return TokenClass.NumberLiteral; - case 5 /* operator */: return TokenClass.Operator; - case 6 /* stringLiteral */: return TokenClass.StringLiteral; - case 8 /* whiteSpace */: return TokenClass.Whitespace; - case 10 /* punctuation */: return TokenClass.Punctuation; - case 2 /* identifier */: - case 11 /* className */: - case 12 /* enumName */: - case 13 /* interfaceName */: - case 14 /* moduleName */: - case 15 /* typeParameterName */: - case 16 /* typeAliasName */: - case 9 /* text */: - case 17 /* parameterName */: - default: - return TokenClass.Identifier; - } - } - function getClassificationsForLine(text, lexState, syntacticClassifierAbsent) { - return convertClassifications(getEncodedLexicalClassifications(text, lexState, syntacticClassifierAbsent), text); - } - // If there is a syntactic classifier ('syntacticClassifierAbsent' is false), - // we will be more conservative in order to avoid conflicting with the syntactic classifier. - function getEncodedLexicalClassifications(text, lexState, syntacticClassifierAbsent) { - var offset = 0; - var token = 0 /* Unknown */; - var lastNonTriviaToken = 0 /* Unknown */; - // Empty out the template stack for reuse. - while (templateStack.length > 0) { - templateStack.pop(); - } - // If we're in a string literal, then prepend: "\ - // (and a newline). That way when we lex we'll think we're still in a string literal. - // - // If we're in a multiline comment, then prepend: /* - // (and a newline). That way when we lex we'll think we're still in a multiline comment. - switch (lexState) { - case 3 /* InDoubleQuoteStringLiteral */: - text = '"\\\n' + text; - offset = 3; - break; - case 2 /* InSingleQuoteStringLiteral */: - text = "'\\\n" + text; - offset = 3; - break; - case 1 /* InMultiLineCommentTrivia */: - text = "/*\n" + text; - offset = 3; - break; - case 4 /* InTemplateHeadOrNoSubstitutionTemplate */: - text = "`\n" + text; - offset = 2; - break; - case 5 /* InTemplateMiddleOrTail */: - text = "}\n" + text; - offset = 2; - // fallthrough - case 6 /* InTemplateSubstitutionPosition */: - templateStack.push(11 /* TemplateHead */); - break; - } - scanner.setText(text); - var result = { - endOfLineState: 0 /* None */, - spans: [] - }; - // We can run into an unfortunate interaction between the lexical and syntactic classifier - // when the user is typing something generic. Consider the case where the user types: - // - // Foo tokens. It's a weak heuristic, but should - // work well enough in practice. - var angleBracketStack = 0; - do { - token = scanner.scan(); - if (!ts.isTrivia(token)) { - if ((token === 36 /* SlashToken */ || token === 57 /* SlashEqualsToken */) && !noRegexTable[lastNonTriviaToken]) { - if (scanner.reScanSlashToken() === 9 /* RegularExpressionLiteral */) { - token = 9 /* RegularExpressionLiteral */; - } - } - else if (lastNonTriviaToken === 20 /* DotToken */ && isKeyword(token)) { - token = 65 /* Identifier */; - } - else if (isKeyword(lastNonTriviaToken) && isKeyword(token) && !canFollow(lastNonTriviaToken, token)) { - // We have two keywords in a row. Only treat the second as a keyword if - // it's a sequence that could legally occur in the language. Otherwise - // treat it as an identifier. This way, if someone writes "private var" - // we recognize that 'var' is actually an identifier here. - token = 65 /* Identifier */; - } - else if (lastNonTriviaToken === 65 /* Identifier */ && - token === 24 /* LessThanToken */) { - // Could be the start of something generic. Keep track of that by bumping - // up the current count of generic contexts we may be in. - angleBracketStack++; - } - else if (token === 25 /* GreaterThanToken */ && angleBracketStack > 0) { - // If we think we're currently in something generic, then mark that that - // generic entity is complete. - angleBracketStack--; - } - else if (token === 112 /* AnyKeyword */ || - token === 123 /* StringKeyword */ || - token === 121 /* NumberKeyword */ || - token === 113 /* BooleanKeyword */ || - token === 124 /* SymbolKeyword */) { - if (angleBracketStack > 0 && !syntacticClassifierAbsent) { - // If it looks like we're could be in something generic, don't classify this - // as a keyword. We may just get overwritten by the syntactic classifier, - // causing a noisy experience for the user. - token = 65 /* Identifier */; - } - } - else if (token === 11 /* TemplateHead */) { - templateStack.push(token); - } - else if (token === 14 /* OpenBraceToken */) { - // If we don't have anything on the template stack, - // then we aren't trying to keep track of a previously scanned template head. - if (templateStack.length > 0) { - templateStack.push(token); - } - } - else if (token === 15 /* CloseBraceToken */) { - // If we don't have anything on the template stack, - // then we aren't trying to keep track of a previously scanned template head. - if (templateStack.length > 0) { - var lastTemplateStackToken = ts.lastOrUndefined(templateStack); - if (lastTemplateStackToken === 11 /* TemplateHead */) { - token = scanner.reScanTemplateToken(); - // Only pop on a TemplateTail; a TemplateMiddle indicates there is more for us. - if (token === 13 /* TemplateTail */) { - templateStack.pop(); - } - else { - ts.Debug.assert(token === 12 /* TemplateMiddle */, "Should have been a template middle. Was " + token); - } - } - else { - ts.Debug.assert(lastTemplateStackToken === 14 /* OpenBraceToken */, "Should have been an open brace. Was: " + token); - templateStack.pop(); - } - } - } - lastNonTriviaToken = token; - } - processToken(); - } while (token !== 1 /* EndOfFileToken */); - return result; - function processToken() { - var start = scanner.getTokenPos(); - var end = scanner.getTextPos(); - addResult(start, end, classFromKind(token)); - if (end >= text.length) { - if (token === 8 /* StringLiteral */) { - // Check to see if we finished up on a multiline string literal. - var tokenText = scanner.getTokenText(); - if (scanner.isUnterminated()) { - var lastCharIndex = tokenText.length - 1; - var numBackslashes = 0; - while (tokenText.charCodeAt(lastCharIndex - numBackslashes) === 92 /* backslash */) { - numBackslashes++; - } - // If we have an odd number of backslashes, then the multiline string is unclosed - if (numBackslashes & 1) { - var quoteChar = tokenText.charCodeAt(0); - result.endOfLineState = quoteChar === 34 /* doubleQuote */ - ? 3 /* InDoubleQuoteStringLiteral */ - : 2 /* InSingleQuoteStringLiteral */; - } - } - } - else if (token === 3 /* MultiLineCommentTrivia */) { - // Check to see if the multiline comment was unclosed. - if (scanner.isUnterminated()) { - result.endOfLineState = 1 /* InMultiLineCommentTrivia */; - } - } - else if (ts.isTemplateLiteralKind(token)) { - if (scanner.isUnterminated()) { - if (token === 13 /* TemplateTail */) { - result.endOfLineState = 5 /* InTemplateMiddleOrTail */; - } - else if (token === 10 /* NoSubstitutionTemplateLiteral */) { - result.endOfLineState = 4 /* InTemplateHeadOrNoSubstitutionTemplate */; - } - else { - ts.Debug.fail("Only 'NoSubstitutionTemplateLiteral's and 'TemplateTail's can be unterminated; got SyntaxKind #" + token); - } - } - } - else if (templateStack.length > 0 && ts.lastOrUndefined(templateStack) === 11 /* TemplateHead */) { - result.endOfLineState = 6 /* InTemplateSubstitutionPosition */; - } - } - } - function addResult(start, end, classification) { - if (classification === 8 /* whiteSpace */) { - // Don't bother with whitespace classifications. They're not needed. - return; - } - if (start === 0 && offset > 0) { - // We're classifying the first token, and this was a case where we prepended - // text. We should consider the start of this token to be at the start of - // the original text. - start += offset; - } - // All our tokens are in relation to the augmented text. Move them back to be - // relative to the original text. - start -= offset; - end -= offset; - var length = end - start; - if (length > 0) { - result.spans.push(start); - result.spans.push(length); - result.spans.push(classification); - } - } - } - function isBinaryExpressionOperatorToken(token) { - switch (token) { - case 35 /* AsteriskToken */: - case 36 /* SlashToken */: - case 37 /* PercentToken */: - case 33 /* PlusToken */: - case 34 /* MinusToken */: - case 40 /* LessThanLessThanToken */: - case 41 /* GreaterThanGreaterThanToken */: - case 42 /* GreaterThanGreaterThanGreaterThanToken */: - case 24 /* LessThanToken */: - case 25 /* GreaterThanToken */: - case 26 /* LessThanEqualsToken */: - case 27 /* GreaterThanEqualsToken */: - case 87 /* InstanceOfKeyword */: - case 86 /* InKeyword */: - case 28 /* EqualsEqualsToken */: - case 29 /* ExclamationEqualsToken */: - case 30 /* EqualsEqualsEqualsToken */: - case 31 /* ExclamationEqualsEqualsToken */: - case 43 /* AmpersandToken */: - case 45 /* CaretToken */: - case 44 /* BarToken */: - case 48 /* AmpersandAmpersandToken */: - case 49 /* BarBarToken */: - case 63 /* BarEqualsToken */: - case 62 /* AmpersandEqualsToken */: - case 64 /* CaretEqualsToken */: - case 59 /* LessThanLessThanEqualsToken */: - case 60 /* GreaterThanGreaterThanEqualsToken */: - case 61 /* GreaterThanGreaterThanGreaterThanEqualsToken */: - case 54 /* PlusEqualsToken */: - case 55 /* MinusEqualsToken */: - case 56 /* AsteriskEqualsToken */: - case 57 /* SlashEqualsToken */: - case 58 /* PercentEqualsToken */: - case 53 /* EqualsToken */: - case 23 /* CommaToken */: - return true; - default: - return false; - } - } - function isPrefixUnaryExpressionOperatorToken(token) { - switch (token) { - case 33 /* PlusToken */: - case 34 /* MinusToken */: - case 47 /* TildeToken */: - case 46 /* ExclamationToken */: - case 38 /* PlusPlusToken */: - case 39 /* MinusMinusToken */: - return true; - default: - return false; - } - } - function isKeyword(token) { - return token >= 66 /* FirstKeyword */ && token <= 127 /* LastKeyword */; - } - function classFromKind(token) { - if (isKeyword(token)) { - return 3 /* keyword */; - } - else if (isBinaryExpressionOperatorToken(token) || isPrefixUnaryExpressionOperatorToken(token)) { - return 5 /* operator */; - } - else if (token >= 14 /* FirstPunctuation */ && token <= 64 /* LastPunctuation */) { - return 10 /* punctuation */; - } - switch (token) { - case 7 /* NumericLiteral */: - return 4 /* numericLiteral */; - case 8 /* StringLiteral */: - return 6 /* stringLiteral */; - case 9 /* RegularExpressionLiteral */: - return 7 /* regularExpressionLiteral */; - case 6 /* ConflictMarkerTrivia */: - case 3 /* MultiLineCommentTrivia */: - case 2 /* SingleLineCommentTrivia */: - return 1 /* comment */; - case 5 /* WhitespaceTrivia */: - case 4 /* NewLineTrivia */: - return 8 /* whiteSpace */; - case 65 /* Identifier */: - default: - if (ts.isTemplateLiteralKind(token)) { - return 6 /* stringLiteral */; - } - return 2 /* identifier */; - } - } - return { - getClassificationsForLine: getClassificationsForLine, - getEncodedLexicalClassifications: getEncodedLexicalClassifications - }; - } - ts.createClassifier = createClassifier; - /** - * Get the path of the default library file (lib.d.ts) as distributed with the typescript - * node package. - * The functionality is not supported if the ts module is consumed outside of a node module. - */ - function getDefaultLibFilePath(options) { - // Check __dirname is defined and that we are on a node.js system. - if (typeof __dirname !== "undefined") { - return __dirname + ts.directorySeparator + ts.getDefaultLibFileName(options); - } - throw new Error("getDefaultLibFilePath is only supported when consumed as a node module. "); - } - ts.getDefaultLibFilePath = getDefaultLibFilePath; - function initializeServices() { - ts.objectAllocator = { - getNodeConstructor: function (kind) { - function Node() { - } - var proto = kind === 230 /* SourceFile */ ? new SourceFileObject() : new NodeObject(); - proto.kind = kind; - proto.pos = 0; - proto.end = 0; - proto.flags = 0; - proto.parent = undefined; - Node.prototype = proto; - return Node; - }, - getSymbolConstructor: function () { return SymbolObject; }, - getTypeConstructor: function () { return TypeObject; }, - getSignatureConstructor: function () { return SignatureObject; } - }; - } - initializeServices(); -})(ts || (ts = {})); -// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. -// See LICENSE.txt in the project root for complete license information. -/// -/* @internal */ -var ts; -(function (ts) { - var BreakpointResolver; - (function (BreakpointResolver) { - /** - * Get the breakpoint span in given sourceFile - */ - function spanInSourceFileAtLocation(sourceFile, position) { - // Cannot set breakpoint in dts file - if (sourceFile.flags & 2048 /* DeclarationFile */) { - return undefined; - } - var tokenAtLocation = ts.getTokenAtPosition(sourceFile, position); - var lineOfPosition = sourceFile.getLineAndCharacterOfPosition(position).line; - if (sourceFile.getLineAndCharacterOfPosition(tokenAtLocation.getStart()).line > lineOfPosition) { - // Get previous token if the token is returned starts on new line - // eg: let x =10; |--- cursor is here - // let y = 10; - // token at position will return let keyword on second line as the token but we would like to use - // token on same line if trailing trivia (comments or white spaces on same line) part of the last token on that line - tokenAtLocation = ts.findPrecedingToken(tokenAtLocation.pos, sourceFile); - // Its a blank line - if (!tokenAtLocation || sourceFile.getLineAndCharacterOfPosition(tokenAtLocation.getEnd()).line !== lineOfPosition) { - return undefined; - } - } - // Cannot set breakpoint in ambient declarations - if (ts.isInAmbientContext(tokenAtLocation)) { - return undefined; - } - // Get the span in the node based on its syntax - return spanInNode(tokenAtLocation); - function textSpan(startNode, endNode) { - return ts.createTextSpanFromBounds(startNode.getStart(), (endNode || startNode).getEnd()); - } - function spanInNodeIfStartsOnSameLine(node, otherwiseOnNode) { - if (node && lineOfPosition === sourceFile.getLineAndCharacterOfPosition(node.getStart()).line) { - return spanInNode(node); - } - return spanInNode(otherwiseOnNode); - } - function spanInPreviousNode(node) { - return spanInNode(ts.findPrecedingToken(node.pos, sourceFile)); - } - function spanInNextNode(node) { - return spanInNode(ts.findNextToken(node, node.parent)); - } - function spanInNode(node) { - if (node) { - if (ts.isExpression(node)) { - if (node.parent.kind === 187 /* DoStatement */) { - // Set span as if on while keyword - return spanInPreviousNode(node); - } - if (node.parent.kind === 189 /* ForStatement */) { - // For now lets set the span on this expression, fix it later - return textSpan(node); - } - if (node.parent.kind === 172 /* BinaryExpression */ && node.parent.operatorToken.kind === 23 /* CommaToken */) { - // if this is comma expression, the breakpoint is possible in this expression - return textSpan(node); - } - if (node.parent.kind == 166 /* ArrowFunction */ && node.parent.body == node) { - // If this is body of arrow function, it is allowed to have the breakpoint - return textSpan(node); - } - } - switch (node.kind) { - case 183 /* VariableStatement */: - // Span on first variable declaration - return spanInVariableDeclaration(node.declarationList.declarations[0]); - case 201 /* VariableDeclaration */: - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - return spanInVariableDeclaration(node); - case 131 /* Parameter */: - return spanInParameterDeclaration(node); - case 203 /* FunctionDeclaration */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 137 /* Constructor */: - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - return spanInFunctionDeclaration(node); - case 182 /* Block */: - if (ts.isFunctionBlock(node)) { - return spanInFunctionBlock(node); - } - // Fall through - case 209 /* ModuleBlock */: - return spanInBlock(node); - case 226 /* CatchClause */: - return spanInBlock(node.block); - case 185 /* ExpressionStatement */: - // span on the expression - return textSpan(node.expression); - case 194 /* ReturnStatement */: - // span on return keyword and expression if present - return textSpan(node.getChildAt(0), node.expression); - case 188 /* WhileStatement */: - // Span on while(...) - return textSpan(node, ts.findNextToken(node.expression, node)); - case 187 /* DoStatement */: - // span in statement of the do statement - return spanInNode(node.statement); - case 200 /* DebuggerStatement */: - // span on debugger keyword - return textSpan(node.getChildAt(0)); - case 186 /* IfStatement */: - // set on if(..) span - return textSpan(node, ts.findNextToken(node.expression, node)); - case 197 /* LabeledStatement */: - // span in statement - return spanInNode(node.statement); - case 193 /* BreakStatement */: - case 192 /* ContinueStatement */: - // On break or continue keyword and label if present - return textSpan(node.getChildAt(0), node.label); - case 189 /* ForStatement */: - return spanInForStatement(node); - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - // span on for (a in ...) - return textSpan(node, ts.findNextToken(node.expression, node)); - case 196 /* SwitchStatement */: - // span on switch(...) - return textSpan(node, ts.findNextToken(node.expression, node)); - case 223 /* CaseClause */: - case 224 /* DefaultClause */: - // span in first statement of the clause - return spanInNode(node.statements[0]); - case 199 /* TryStatement */: - // span in try block - return spanInBlock(node.tryBlock); - case 198 /* ThrowStatement */: - // span in throw ... - return textSpan(node, node.expression); - case 217 /* ExportAssignment */: - // span on export = id - return textSpan(node, node.expression); - case 211 /* ImportEqualsDeclaration */: - // import statement without including semicolon - return textSpan(node, node.moduleReference); - case 212 /* ImportDeclaration */: - // import statement without including semicolon - return textSpan(node, node.moduleSpecifier); - case 218 /* ExportDeclaration */: - // import statement without including semicolon - return textSpan(node, node.moduleSpecifier); - case 208 /* ModuleDeclaration */: - // span on complete module if it is instantiated - if (ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { - return undefined; - } - case 204 /* ClassDeclaration */: - case 207 /* EnumDeclaration */: - case 229 /* EnumMember */: - case 160 /* CallExpression */: - case 161 /* NewExpression */: - // span on complete node - return textSpan(node); - case 195 /* WithStatement */: - // span in statement - return spanInNode(node.statement); - // No breakpoint in interface, type alias - case 205 /* InterfaceDeclaration */: - case 206 /* TypeAliasDeclaration */: - return undefined; - // Tokens: - case 22 /* SemicolonToken */: - case 1 /* EndOfFileToken */: - return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile)); - case 23 /* CommaToken */: - return spanInPreviousNode(node); - case 14 /* OpenBraceToken */: - return spanInOpenBraceToken(node); - case 15 /* CloseBraceToken */: - return spanInCloseBraceToken(node); - case 16 /* OpenParenToken */: - return spanInOpenParenToken(node); - case 17 /* CloseParenToken */: - return spanInCloseParenToken(node); - case 51 /* ColonToken */: - return spanInColonToken(node); - case 25 /* GreaterThanToken */: - case 24 /* LessThanToken */: - return spanInGreaterThanOrLessThanToken(node); - // Keywords: - case 100 /* WhileKeyword */: - return spanInWhileKeyword(node); - case 76 /* ElseKeyword */: - case 68 /* CatchKeyword */: - case 81 /* FinallyKeyword */: - return spanInNextNode(node); - default: - // If this is name of property assignment, set breakpoint in the initializer - if (node.parent.kind === 227 /* PropertyAssignment */ && node.parent.name === node) { - return spanInNode(node.parent.initializer); - } - // Breakpoint in type assertion goes to its operand - if (node.parent.kind === 163 /* TypeAssertionExpression */ && node.parent.type === node) { - return spanInNode(node.parent.expression); - } - // return type of function go to previous token - if (ts.isFunctionLike(node.parent) && node.parent.type === node) { - return spanInPreviousNode(node); - } - // Default go to parent to set the breakpoint - return spanInNode(node.parent); - } - } - function spanInVariableDeclaration(variableDeclaration) { - // If declaration of for in statement, just set the span in parent - if (variableDeclaration.parent.parent.kind === 190 /* ForInStatement */ || - variableDeclaration.parent.parent.kind === 191 /* ForOfStatement */) { - return spanInNode(variableDeclaration.parent.parent); - } - var isParentVariableStatement = variableDeclaration.parent.parent.kind === 183 /* VariableStatement */; - var isDeclarationOfForStatement = variableDeclaration.parent.parent.kind === 189 /* ForStatement */ && ts.contains(variableDeclaration.parent.parent.initializer.declarations, variableDeclaration); - var declarations = isParentVariableStatement - ? variableDeclaration.parent.parent.declarationList.declarations - : isDeclarationOfForStatement - ? variableDeclaration.parent.parent.initializer.declarations - : undefined; - // Breakpoint is possible in variableDeclaration only if there is initialization - if (variableDeclaration.initializer || (variableDeclaration.flags & 1 /* Export */)) { - if (declarations && declarations[0] === variableDeclaration) { - if (isParentVariableStatement) { - // First declaration - include let keyword - return textSpan(variableDeclaration.parent, variableDeclaration); - } - else { - ts.Debug.assert(isDeclarationOfForStatement); - // Include let keyword from for statement declarations in the span - return textSpan(ts.findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent), variableDeclaration); - } - } - else { - // Span only on this declaration - return textSpan(variableDeclaration); - } - } - else if (declarations && declarations[0] !== variableDeclaration) { - // If we cant set breakpoint on this declaration, set it on previous one - var indexOfCurrentDeclaration = ts.indexOf(declarations, variableDeclaration); - return spanInVariableDeclaration(declarations[indexOfCurrentDeclaration - 1]); - } - } - function canHaveSpanInParameterDeclaration(parameter) { - // Breakpoint is possible on parameter only if it has initializer, is a rest parameter, or has public or private modifier - return !!parameter.initializer || parameter.dotDotDotToken !== undefined || - !!(parameter.flags & 16 /* Public */) || !!(parameter.flags & 32 /* Private */); - } - function spanInParameterDeclaration(parameter) { - if (canHaveSpanInParameterDeclaration(parameter)) { - return textSpan(parameter); - } - else { - var functionDeclaration = parameter.parent; - var indexOfParameter = ts.indexOf(functionDeclaration.parameters, parameter); - if (indexOfParameter) { - // Not a first parameter, go to previous parameter - return spanInParameterDeclaration(functionDeclaration.parameters[indexOfParameter - 1]); - } - else { - // Set breakpoint in the function declaration body - return spanInNode(functionDeclaration.body); - } - } - } - function canFunctionHaveSpanInWholeDeclaration(functionDeclaration) { - return !!(functionDeclaration.flags & 1 /* Export */) || - (functionDeclaration.parent.kind === 204 /* ClassDeclaration */ && functionDeclaration.kind !== 137 /* Constructor */); - } - function spanInFunctionDeclaration(functionDeclaration) { - // No breakpoints in the function signature - if (!functionDeclaration.body) { - return undefined; - } - if (canFunctionHaveSpanInWholeDeclaration(functionDeclaration)) { - // Set the span on whole function declaration - return textSpan(functionDeclaration); - } - // Set span in function body - return spanInNode(functionDeclaration.body); - } - function spanInFunctionBlock(block) { - var nodeForSpanInBlock = block.statements.length ? block.statements[0] : block.getLastToken(); - if (canFunctionHaveSpanInWholeDeclaration(block.parent)) { - return spanInNodeIfStartsOnSameLine(block.parent, nodeForSpanInBlock); - } - return spanInNode(nodeForSpanInBlock); - } - function spanInBlock(block) { - switch (block.parent.kind) { - case 208 /* ModuleDeclaration */: - if (ts.getModuleInstanceState(block.parent) !== 1 /* Instantiated */) { - return undefined; - } - // Set on parent if on same line otherwise on first statement - case 188 /* WhileStatement */: - case 186 /* IfStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]); - // Set span on previous token if it starts on same line otherwise on the first statement of the block - case 189 /* ForStatement */: - return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]); - } - // Default action is to set on first statement - return spanInNode(block.statements[0]); - } - function spanInForStatement(forStatement) { - if (forStatement.initializer) { - if (forStatement.initializer.kind === 202 /* VariableDeclarationList */) { - var variableDeclarationList = forStatement.initializer; - if (variableDeclarationList.declarations.length > 0) { - return spanInNode(variableDeclarationList.declarations[0]); - } - } - else { - return spanInNode(forStatement.initializer); - } - } - if (forStatement.condition) { - return textSpan(forStatement.condition); - } - if (forStatement.incrementor) { - return textSpan(forStatement.incrementor); - } - } - // Tokens: - function spanInOpenBraceToken(node) { - switch (node.parent.kind) { - case 207 /* EnumDeclaration */: - var enumDeclaration = node.parent; - return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), enumDeclaration.members.length ? enumDeclaration.members[0] : enumDeclaration.getLastToken(sourceFile)); - case 204 /* ClassDeclaration */: - var classDeclaration = node.parent; - return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile)); - case 210 /* CaseBlock */: - return spanInNodeIfStartsOnSameLine(node.parent.parent, node.parent.clauses[0]); - } - // Default to parent node - return spanInNode(node.parent); - } - function spanInCloseBraceToken(node) { - switch (node.parent.kind) { - case 209 /* ModuleBlock */: - // If this is not instantiated module block no bp span - if (ts.getModuleInstanceState(node.parent.parent) !== 1 /* Instantiated */) { - return undefined; - } - case 207 /* EnumDeclaration */: - case 204 /* ClassDeclaration */: - // Span on close brace token - return textSpan(node); - case 182 /* Block */: - if (ts.isFunctionBlock(node.parent)) { - // Span on close brace token - return textSpan(node); - } - // fall through. - case 226 /* CatchClause */: - return spanInNode(ts.lastOrUndefined(node.parent.statements)); - ; - case 210 /* CaseBlock */: - // breakpoint in last statement of the last clause - var caseBlock = node.parent; - var lastClause = ts.lastOrUndefined(caseBlock.clauses); - if (lastClause) { - return spanInNode(ts.lastOrUndefined(lastClause.statements)); - } - return undefined; - // Default to parent node - default: - return spanInNode(node.parent); - } - } - function spanInOpenParenToken(node) { - if (node.parent.kind === 187 /* DoStatement */) { - // Go to while keyword and do action instead - return spanInPreviousNode(node); - } - // Default to parent node - return spanInNode(node.parent); - } - function spanInCloseParenToken(node) { - // Is this close paren token of parameter list, set span in previous token - switch (node.parent.kind) { - case 165 /* FunctionExpression */: - case 203 /* FunctionDeclaration */: - case 166 /* ArrowFunction */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 137 /* Constructor */: - case 188 /* WhileStatement */: - case 187 /* DoStatement */: - case 189 /* ForStatement */: - return spanInPreviousNode(node); - // Default to parent node - default: - return spanInNode(node.parent); - } - // Default to parent node - return spanInNode(node.parent); - } - function spanInColonToken(node) { - // Is this : specifying return annotation of the function declaration - if (ts.isFunctionLike(node.parent) || node.parent.kind === 227 /* PropertyAssignment */) { - return spanInPreviousNode(node); - } - return spanInNode(node.parent); - } - function spanInGreaterThanOrLessThanToken(node) { - if (node.parent.kind === 163 /* TypeAssertionExpression */) { - return spanInNode(node.parent.expression); - } - return spanInNode(node.parent); - } - function spanInWhileKeyword(node) { - if (node.parent.kind === 187 /* DoStatement */) { - // Set span on while expression - return textSpan(node, ts.findNextToken(node.parent.expression, node.parent)); - } - // Default to parent node - return spanInNode(node.parent); - } - } - } - BreakpointResolver.spanInSourceFileAtLocation = spanInSourceFileAtLocation; - })(BreakpointResolver = ts.BreakpointResolver || (ts.BreakpointResolver = {})); -})(ts || (ts = {})); -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -/// -/* @internal */ -var debugObjectHost = this; -/* @internal */ -var ts; -(function (ts) { - function logInternalError(logger, err) { - if (logger) { - logger.log("*INTERNAL ERROR* - Exception in typescript services: " + err.message); - } - } - var ScriptSnapshotShimAdapter = (function () { - function ScriptSnapshotShimAdapter(scriptSnapshotShim) { - this.scriptSnapshotShim = scriptSnapshotShim; - this.lineStartPositions = null; - } - ScriptSnapshotShimAdapter.prototype.getText = function (start, end) { - return this.scriptSnapshotShim.getText(start, end); - }; - ScriptSnapshotShimAdapter.prototype.getLength = function () { - return this.scriptSnapshotShim.getLength(); - }; - ScriptSnapshotShimAdapter.prototype.getChangeRange = function (oldSnapshot) { - var oldSnapshotShim = oldSnapshot; - var encoded = this.scriptSnapshotShim.getChangeRange(oldSnapshotShim.scriptSnapshotShim); - if (encoded == null) { - return null; - } - var decoded = JSON.parse(encoded); - return ts.createTextChangeRange(ts.createTextSpan(decoded.span.start, decoded.span.length), decoded.newLength); - }; - return ScriptSnapshotShimAdapter; - })(); - var LanguageServiceShimHostAdapter = (function () { - function LanguageServiceShimHostAdapter(shimHost) { - this.shimHost = shimHost; - this.loggingEnabled = false; - this.tracingEnabled = false; - } - LanguageServiceShimHostAdapter.prototype.log = function (s) { - if (this.loggingEnabled) { - this.shimHost.log(s); - } - }; - LanguageServiceShimHostAdapter.prototype.trace = function (s) { - if (this.tracingEnabled) { - this.shimHost.trace(s); - } - }; - LanguageServiceShimHostAdapter.prototype.error = function (s) { - this.shimHost.error(s); - }; - LanguageServiceShimHostAdapter.prototype.getProjectVersion = function () { - if (!this.shimHost.getProjectVersion) { - // shimmed host does not support getProjectVersion - return undefined; - } - return this.shimHost.getProjectVersion(); - }; - LanguageServiceShimHostAdapter.prototype.useCaseSensitiveFileNames = function () { - return this.shimHost.useCaseSensitiveFileNames ? this.shimHost.useCaseSensitiveFileNames() : false; - }; - LanguageServiceShimHostAdapter.prototype.getCompilationSettings = function () { - var settingsJson = this.shimHost.getCompilationSettings(); - if (settingsJson == null || settingsJson == "") { - throw Error("LanguageServiceShimHostAdapter.getCompilationSettings: empty compilationSettings"); - return null; - } - return JSON.parse(settingsJson); - }; - LanguageServiceShimHostAdapter.prototype.getScriptFileNames = function () { - var encoded = this.shimHost.getScriptFileNames(); - return this.files = JSON.parse(encoded); - }; - LanguageServiceShimHostAdapter.prototype.getScriptSnapshot = function (fileName) { - // Shim the API changes for 1.5 release. This should be removed once - // TypeScript 1.5 has shipped. - if (this.files && this.files.indexOf(fileName) < 0) { - return undefined; - } - var scriptSnapshot = this.shimHost.getScriptSnapshot(fileName); - return scriptSnapshot && new ScriptSnapshotShimAdapter(scriptSnapshot); - }; - LanguageServiceShimHostAdapter.prototype.getScriptVersion = function (fileName) { - return this.shimHost.getScriptVersion(fileName); - }; - LanguageServiceShimHostAdapter.prototype.getLocalizedDiagnosticMessages = function () { - var diagnosticMessagesJson = this.shimHost.getLocalizedDiagnosticMessages(); - if (diagnosticMessagesJson == null || diagnosticMessagesJson == "") { - return null; - } - try { - return JSON.parse(diagnosticMessagesJson); - } - catch (e) { - this.log(e.description || "diagnosticMessages.generated.json has invalid JSON format"); - return null; - } - }; - LanguageServiceShimHostAdapter.prototype.getCancellationToken = function () { - return this.shimHost.getCancellationToken(); - }; - LanguageServiceShimHostAdapter.prototype.getCurrentDirectory = function () { - return this.shimHost.getCurrentDirectory(); - }; - LanguageServiceShimHostAdapter.prototype.getDefaultLibFileName = function (options) { - // Wrap the API changes for 1.5 release. This try/catch - // should be removed once TypeScript 1.5 has shipped. - try { - return this.shimHost.getDefaultLibFileName(JSON.stringify(options)); - } - catch (e) { - return ""; - } - }; - return LanguageServiceShimHostAdapter; - })(); - ts.LanguageServiceShimHostAdapter = LanguageServiceShimHostAdapter; - var CoreServicesShimHostAdapter = (function () { - function CoreServicesShimHostAdapter(shimHost) { - this.shimHost = shimHost; - } - CoreServicesShimHostAdapter.prototype.readDirectory = function (rootDir, extension) { - var encoded = this.shimHost.readDirectory(rootDir, extension); - return JSON.parse(encoded); - }; - return CoreServicesShimHostAdapter; - })(); - ts.CoreServicesShimHostAdapter = CoreServicesShimHostAdapter; - function simpleForwardCall(logger, actionDescription, action, logPerformance) { - if (logPerformance) { - logger.log(actionDescription); - var start = Date.now(); - } - var result = action(); - if (logPerformance) { - var end = Date.now(); - logger.log(actionDescription + " completed in " + (end - start) + " msec"); - if (typeof (result) === "string") { - var str = result; - if (str.length > 128) { - str = str.substring(0, 128) + "..."; - } - logger.log(" result.length=" + str.length + ", result='" + JSON.stringify(str) + "'"); - } - } - return result; - } - function forwardJSONCall(logger, actionDescription, action, logPerformance) { - try { - var result = simpleForwardCall(logger, actionDescription, action, logPerformance); - return JSON.stringify({ result: result }); - } - catch (err) { - if (err instanceof ts.OperationCanceledException) { - return JSON.stringify({ canceled: true }); - } - logInternalError(logger, err); - err.description = actionDescription; - return JSON.stringify({ error: err }); - } - } - var ShimBase = (function () { - function ShimBase(factory) { - this.factory = factory; - factory.registerShim(this); - } - ShimBase.prototype.dispose = function (dummy) { - this.factory.unregisterShim(this); - }; - return ShimBase; - })(); - function realizeDiagnostics(diagnostics, newLine) { - return diagnostics.map(function (d) { return realizeDiagnostic(d, newLine); }); - } - ts.realizeDiagnostics = realizeDiagnostics; - function realizeDiagnostic(diagnostic, newLine) { - return { - message: ts.flattenDiagnosticMessageText(diagnostic.messageText, newLine), - start: diagnostic.start, - length: diagnostic.length, - /// TODO: no need for the tolowerCase call - category: ts.DiagnosticCategory[diagnostic.category].toLowerCase(), - code: diagnostic.code - }; - } - var LanguageServiceShimObject = (function (_super) { - __extends(LanguageServiceShimObject, _super); - function LanguageServiceShimObject(factory, host, languageService) { - _super.call(this, factory); - this.host = host; - this.languageService = languageService; - this.logPerformance = false; - this.logger = this.host; - } - LanguageServiceShimObject.prototype.forwardJSONCall = function (actionDescription, action) { - return forwardJSONCall(this.logger, actionDescription, action, this.logPerformance); - }; - /// DISPOSE - /** - * Ensure (almost) deterministic release of internal Javascript resources when - * some external native objects holds onto us (e.g. Com/Interop). - */ - LanguageServiceShimObject.prototype.dispose = function (dummy) { - this.logger.log("dispose()"); - this.languageService.dispose(); - this.languageService = null; - // force a GC - if (debugObjectHost && debugObjectHost.CollectGarbage) { - debugObjectHost.CollectGarbage(); - this.logger.log("CollectGarbage()"); - } - this.logger = null; - _super.prototype.dispose.call(this, dummy); - }; - /// REFRESH - /** - * Update the list of scripts known to the compiler - */ - LanguageServiceShimObject.prototype.refresh = function (throwOnError) { - this.forwardJSONCall("refresh(" + throwOnError + ")", function () { - return null; - }); - }; - LanguageServiceShimObject.prototype.cleanupSemanticCache = function () { - var _this = this; - this.forwardJSONCall("cleanupSemanticCache()", function () { - _this.languageService.cleanupSemanticCache(); - return null; - }); - }; - LanguageServiceShimObject.prototype.realizeDiagnostics = function (diagnostics) { - var newLine = this.getNewLine(); - return ts.realizeDiagnostics(diagnostics, newLine); - }; - LanguageServiceShimObject.prototype.getSyntacticClassifications = function (fileName, start, length) { - var _this = this; - return this.forwardJSONCall("getSyntacticClassifications('" + fileName + "', " + start + ", " + length + ")", function () { - var classifications = _this.languageService.getSyntacticClassifications(fileName, ts.createTextSpan(start, length)); - return classifications; - }); - }; - LanguageServiceShimObject.prototype.getSemanticClassifications = function (fileName, start, length) { - var _this = this; - return this.forwardJSONCall("getSemanticClassifications('" + fileName + "', " + start + ", " + length + ")", function () { - var classifications = _this.languageService.getSemanticClassifications(fileName, ts.createTextSpan(start, length)); - return classifications; - }); - }; - LanguageServiceShimObject.prototype.getEncodedSyntacticClassifications = function (fileName, start, length) { - var _this = this; - return this.forwardJSONCall("getEncodedSyntacticClassifications('" + fileName + "', " + start + ", " + length + ")", function () { - // directly serialize the spans out to a string. This is much faster to decode - // on the managed side versus a full JSON array. - return convertClassifications(_this.languageService.getEncodedSyntacticClassifications(fileName, ts.createTextSpan(start, length))); - }); - }; - LanguageServiceShimObject.prototype.getEncodedSemanticClassifications = function (fileName, start, length) { - var _this = this; - return this.forwardJSONCall("getEncodedSemanticClassifications('" + fileName + "', " + start + ", " + length + ")", function () { - // directly serialize the spans out to a string. This is much faster to decode - // on the managed side versus a full JSON array. - return convertClassifications(_this.languageService.getEncodedSemanticClassifications(fileName, ts.createTextSpan(start, length))); - }); - }; - LanguageServiceShimObject.prototype.getNewLine = function () { - return this.host.getNewLine ? this.host.getNewLine() : "\r\n"; - }; - LanguageServiceShimObject.prototype.getSyntacticDiagnostics = function (fileName) { - var _this = this; - return this.forwardJSONCall("getSyntacticDiagnostics('" + fileName + "')", function () { - var diagnostics = _this.languageService.getSyntacticDiagnostics(fileName); - return _this.realizeDiagnostics(diagnostics); - }); - }; - LanguageServiceShimObject.prototype.getSemanticDiagnostics = function (fileName) { - var _this = this; - return this.forwardJSONCall("getSemanticDiagnostics('" + fileName + "')", function () { - var diagnostics = _this.languageService.getSemanticDiagnostics(fileName); - return _this.realizeDiagnostics(diagnostics); - }); - }; - LanguageServiceShimObject.prototype.getCompilerOptionsDiagnostics = function () { - var _this = this; - return this.forwardJSONCall("getCompilerOptionsDiagnostics()", function () { - var diagnostics = _this.languageService.getCompilerOptionsDiagnostics(); - return _this.realizeDiagnostics(diagnostics); - }); - }; - /// QUICKINFO - /** - * Computes a string representation of the type at the requested position - * in the active file. - */ - LanguageServiceShimObject.prototype.getQuickInfoAtPosition = function (fileName, position) { - var _this = this; - return this.forwardJSONCall("getQuickInfoAtPosition('" + fileName + "', " + position + ")", function () { - var quickInfo = _this.languageService.getQuickInfoAtPosition(fileName, position); - return quickInfo; - }); - }; - /// NAMEORDOTTEDNAMESPAN - /** - * Computes span information of the name or dotted name at the requested position - * in the active file. - */ - LanguageServiceShimObject.prototype.getNameOrDottedNameSpan = function (fileName, startPos, endPos) { - var _this = this; - return this.forwardJSONCall("getNameOrDottedNameSpan('" + fileName + "', " + startPos + ", " + endPos + ")", function () { - var spanInfo = _this.languageService.getNameOrDottedNameSpan(fileName, startPos, endPos); - return spanInfo; - }); - }; - /** - * STATEMENTSPAN - * Computes span information of statement at the requested position in the active file. - */ - LanguageServiceShimObject.prototype.getBreakpointStatementAtPosition = function (fileName, position) { - var _this = this; - return this.forwardJSONCall("getBreakpointStatementAtPosition('" + fileName + "', " + position + ")", function () { - var spanInfo = _this.languageService.getBreakpointStatementAtPosition(fileName, position); - return spanInfo; - }); - }; - /// SIGNATUREHELP - LanguageServiceShimObject.prototype.getSignatureHelpItems = function (fileName, position) { - var _this = this; - return this.forwardJSONCall("getSignatureHelpItems('" + fileName + "', " + position + ")", function () { - var signatureInfo = _this.languageService.getSignatureHelpItems(fileName, position); - return signatureInfo; - }); - }; - /// GOTO DEFINITION - /** - * Computes the definition location and file for the symbol - * at the requested position. - */ - LanguageServiceShimObject.prototype.getDefinitionAtPosition = function (fileName, position) { - var _this = this; - return this.forwardJSONCall("getDefinitionAtPosition('" + fileName + "', " + position + ")", function () { - return _this.languageService.getDefinitionAtPosition(fileName, position); - }); - }; - /// GOTO Type - /** - * Computes the definition location of the type of the symbol - * at the requested position. - */ - LanguageServiceShimObject.prototype.getTypeDefinitionAtPosition = function (fileName, position) { - var _this = this; - return this.forwardJSONCall("getTypeDefinitionAtPosition('" + fileName + "', " + position + ")", function () { - return _this.languageService.getTypeDefinitionAtPosition(fileName, position); - }); - }; - LanguageServiceShimObject.prototype.getRenameInfo = function (fileName, position) { - var _this = this; - return this.forwardJSONCall("getRenameInfo('" + fileName + "', " + position + ")", function () { - return _this.languageService.getRenameInfo(fileName, position); - }); - }; - LanguageServiceShimObject.prototype.findRenameLocations = function (fileName, position, findInStrings, findInComments) { - var _this = this; - return this.forwardJSONCall("findRenameLocations('" + fileName + "', " + position + ", " + findInStrings + ", " + findInComments + ")", function () { - return _this.languageService.findRenameLocations(fileName, position, findInStrings, findInComments); - }); - }; - /// GET BRACE MATCHING - LanguageServiceShimObject.prototype.getBraceMatchingAtPosition = function (fileName, position) { - var _this = this; - return this.forwardJSONCall("getBraceMatchingAtPosition('" + fileName + "', " + position + ")", function () { - var textRanges = _this.languageService.getBraceMatchingAtPosition(fileName, position); - return textRanges; - }); - }; - /// GET SMART INDENT - LanguageServiceShimObject.prototype.getIndentationAtPosition = function (fileName, position, options /*Services.EditorOptions*/) { - var _this = this; - return this.forwardJSONCall("getIndentationAtPosition('" + fileName + "', " + position + ")", function () { - var localOptions = JSON.parse(options); - return _this.languageService.getIndentationAtPosition(fileName, position, localOptions); - }); - }; - /// GET REFERENCES - LanguageServiceShimObject.prototype.getReferencesAtPosition = function (fileName, position) { - var _this = this; - return this.forwardJSONCall("getReferencesAtPosition('" + fileName + "', " + position + ")", function () { - return _this.languageService.getReferencesAtPosition(fileName, position); - }); - }; - LanguageServiceShimObject.prototype.findReferences = function (fileName, position) { - var _this = this; - return this.forwardJSONCall("findReferences('" + fileName + "', " + position + ")", function () { - return _this.languageService.findReferences(fileName, position); - }); - }; - LanguageServiceShimObject.prototype.getOccurrencesAtPosition = function (fileName, position) { - var _this = this; - return this.forwardJSONCall("getOccurrencesAtPosition('" + fileName + "', " + position + ")", function () { - return _this.languageService.getOccurrencesAtPosition(fileName, position); - }); - }; - LanguageServiceShimObject.prototype.getDocumentHighlights = function (fileName, position, filesToSearch) { - var _this = this; - return this.forwardJSONCall("getDocumentHighlights('" + fileName + "', " + position + ")", function () { - return _this.languageService.getDocumentHighlights(fileName, position, JSON.parse(filesToSearch)); - }); - }; - /// COMPLETION LISTS - /** - * Get a string based representation of the completions - * to provide at the given source position and providing a member completion - * list if requested. - */ - LanguageServiceShimObject.prototype.getCompletionsAtPosition = function (fileName, position) { - var _this = this; - return this.forwardJSONCall("getCompletionsAtPosition('" + fileName + "', " + position + ")", function () { - var completion = _this.languageService.getCompletionsAtPosition(fileName, position); - return completion; - }); - }; - /** Get a string based representation of a completion list entry details */ - LanguageServiceShimObject.prototype.getCompletionEntryDetails = function (fileName, position, entryName) { - var _this = this; - return this.forwardJSONCall("getCompletionEntryDetails('" + fileName + "', " + position + ", " + entryName + ")", function () { - var details = _this.languageService.getCompletionEntryDetails(fileName, position, entryName); - return details; - }); - }; - LanguageServiceShimObject.prototype.getFormattingEditsForRange = function (fileName, start, end, options /*Services.FormatCodeOptions*/) { - var _this = this; - return this.forwardJSONCall("getFormattingEditsForRange('" + fileName + "', " + start + ", " + end + ")", function () { - var localOptions = JSON.parse(options); - var edits = _this.languageService.getFormattingEditsForRange(fileName, start, end, localOptions); - return edits; - }); - }; - LanguageServiceShimObject.prototype.getFormattingEditsForDocument = function (fileName, options /*Services.FormatCodeOptions*/) { - var _this = this; - return this.forwardJSONCall("getFormattingEditsForDocument('" + fileName + "')", function () { - var localOptions = JSON.parse(options); - var edits = _this.languageService.getFormattingEditsForDocument(fileName, localOptions); - return edits; - }); - }; - LanguageServiceShimObject.prototype.getFormattingEditsAfterKeystroke = function (fileName, position, key, options /*Services.FormatCodeOptions*/) { - var _this = this; - return this.forwardJSONCall("getFormattingEditsAfterKeystroke('" + fileName + "', " + position + ", '" + key + "')", function () { - var localOptions = JSON.parse(options); - var edits = _this.languageService.getFormattingEditsAfterKeystroke(fileName, position, key, localOptions); - return edits; - }); - }; - /// NAVIGATE TO - /** Return a list of symbols that are interesting to navigate to */ - LanguageServiceShimObject.prototype.getNavigateToItems = function (searchValue, maxResultCount) { - var _this = this; - return this.forwardJSONCall("getNavigateToItems('" + searchValue + "', " + maxResultCount + ")", function () { - var items = _this.languageService.getNavigateToItems(searchValue, maxResultCount); - return items; - }); - }; - LanguageServiceShimObject.prototype.getNavigationBarItems = function (fileName) { - var _this = this; - return this.forwardJSONCall("getNavigationBarItems('" + fileName + "')", function () { - var items = _this.languageService.getNavigationBarItems(fileName); - return items; - }); - }; - LanguageServiceShimObject.prototype.getOutliningSpans = function (fileName) { - var _this = this; - return this.forwardJSONCall("getOutliningSpans('" + fileName + "')", function () { - var items = _this.languageService.getOutliningSpans(fileName); - return items; - }); - }; - LanguageServiceShimObject.prototype.getTodoComments = function (fileName, descriptors) { - var _this = this; - return this.forwardJSONCall("getTodoComments('" + fileName + "')", function () { - var items = _this.languageService.getTodoComments(fileName, JSON.parse(descriptors)); - return items; - }); - }; - /// Emit - LanguageServiceShimObject.prototype.getEmitOutput = function (fileName) { - var _this = this; - return this.forwardJSONCall("getEmitOutput('" + fileName + "')", function () { - var output = _this.languageService.getEmitOutput(fileName); - // Shim the API changes for 1.5 release. This should be removed once - // TypeScript 1.5 has shipped. - output.emitOutputStatus = output.emitSkipped ? 1 : 0; - return output; - }); - }; - return LanguageServiceShimObject; - })(ShimBase); - function convertClassifications(classifications) { - return { spans: classifications.spans.join(","), endOfLineState: classifications.endOfLineState }; - } - var ClassifierShimObject = (function (_super) { - __extends(ClassifierShimObject, _super); - function ClassifierShimObject(factory, logger) { - _super.call(this, factory); - this.logger = logger; - this.logPerformance = false; - this.classifier = ts.createClassifier(); - } - ClassifierShimObject.prototype.getEncodedLexicalClassifications = function (text, lexState, syntacticClassifierAbsent) { - var _this = this; - return forwardJSONCall(this.logger, "getEncodedLexicalClassifications", function () { return convertClassifications(_this.classifier.getEncodedLexicalClassifications(text, lexState, syntacticClassifierAbsent)); }, this.logPerformance); - }; - /// COLORIZATION - ClassifierShimObject.prototype.getClassificationsForLine = function (text, lexState, classifyKeywordsInGenerics) { - var classification = this.classifier.getClassificationsForLine(text, lexState, classifyKeywordsInGenerics); - var items = classification.entries; - var result = ""; - for (var i = 0; i < items.length; i++) { - result += items[i].length + "\n"; - result += items[i].classification + "\n"; - } - result += classification.finalLexState; - return result; - }; - return ClassifierShimObject; - })(ShimBase); - var CoreServicesShimObject = (function (_super) { - __extends(CoreServicesShimObject, _super); - function CoreServicesShimObject(factory, logger, host) { - _super.call(this, factory); - this.logger = logger; - this.host = host; - this.logPerformance = false; - } - CoreServicesShimObject.prototype.forwardJSONCall = function (actionDescription, action) { - return forwardJSONCall(this.logger, actionDescription, action, this.logPerformance); - }; - CoreServicesShimObject.prototype.getPreProcessedFileInfo = function (fileName, sourceTextSnapshot) { - return this.forwardJSONCall("getPreProcessedFileInfo('" + fileName + "')", function () { - var result = ts.preProcessFile(sourceTextSnapshot.getText(0, sourceTextSnapshot.getLength())); - var convertResult = { - referencedFiles: [], - importedFiles: [], - isLibFile: result.isLibFile - }; - ts.forEach(result.referencedFiles, function (refFile) { - convertResult.referencedFiles.push({ - path: ts.normalizePath(refFile.fileName), - position: refFile.pos, - length: refFile.end - refFile.pos - }); - }); - ts.forEach(result.importedFiles, function (importedFile) { - convertResult.importedFiles.push({ - path: ts.normalizeSlashes(importedFile.fileName), - position: importedFile.pos, - length: importedFile.end - importedFile.pos - }); - }); - return convertResult; - }); - }; - CoreServicesShimObject.prototype.getTSConfigFileInfo = function (fileName, sourceTextSnapshot) { - var _this = this; - return this.forwardJSONCall("getTSConfigFileInfo('" + fileName + "')", function () { - var text = sourceTextSnapshot.getText(0, sourceTextSnapshot.getLength()); - var result = ts.parseConfigFileText(fileName, text); - if (result.error) { - return { - options: {}, - files: [], - errors: [realizeDiagnostic(result.error, '\r\n')] - }; - } - var configFile = ts.parseConfigFile(result.config, _this.host, ts.getDirectoryPath(ts.normalizeSlashes(fileName))); - return { - options: configFile.options, - files: configFile.fileNames, - errors: realizeDiagnostics(configFile.errors, '\r\n') - }; - }); - }; - CoreServicesShimObject.prototype.getDefaultCompilationSettings = function () { - return this.forwardJSONCall("getDefaultCompilationSettings()", function () { - return ts.getDefaultCompilerOptions(); - }); - }; - return CoreServicesShimObject; - })(ShimBase); - var TypeScriptServicesFactory = (function () { - function TypeScriptServicesFactory() { - this._shims = []; - } - /* - * Returns script API version. - */ - TypeScriptServicesFactory.prototype.getServicesVersion = function () { - return ts.servicesVersion; - }; - TypeScriptServicesFactory.prototype.createLanguageServiceShim = function (host) { - try { - if (this.documentRegistry === undefined) { - this.documentRegistry = ts.createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames()); - } - var hostAdapter = new LanguageServiceShimHostAdapter(host); - var languageService = ts.createLanguageService(hostAdapter, this.documentRegistry); - return new LanguageServiceShimObject(this, host, languageService); - } - catch (err) { - logInternalError(host, err); - throw err; - } - }; - TypeScriptServicesFactory.prototype.createClassifierShim = function (logger) { - try { - return new ClassifierShimObject(this, logger); - } - catch (err) { - logInternalError(logger, err); - throw err; - } - }; - TypeScriptServicesFactory.prototype.createCoreServicesShim = function (host) { - try { - var adapter = new CoreServicesShimHostAdapter(host); - return new CoreServicesShimObject(this, host, adapter); - } - catch (err) { - logInternalError(host, err); - throw err; - } - }; - TypeScriptServicesFactory.prototype.close = function () { - // Forget all the registered shims - this._shims = []; - this.documentRegistry = ts.createDocumentRegistry(); - }; - TypeScriptServicesFactory.prototype.registerShim = function (shim) { - this._shims.push(shim); - }; - TypeScriptServicesFactory.prototype.unregisterShim = function (shim) { - for (var i = 0, n = this._shims.length; i < n; i++) { - if (this._shims[i] === shim) { - delete this._shims[i]; - return; - } - } - throw new Error("Invalid operation"); - }; - return TypeScriptServicesFactory; - })(); - ts.TypeScriptServicesFactory = TypeScriptServicesFactory; - if (typeof module !== "undefined" && module.exports) { - module.exports = ts; - } -})(ts || (ts = {})); -/// TODO: this is used by VS, clean this up on both sides of the interface -/* @internal */ -var TypeScript; -(function (TypeScript) { - var Services; - (function (Services) { - Services.TypeScriptServicesFactory = ts.TypeScriptServicesFactory; - })(Services = TypeScript.Services || (TypeScript.Services = {})); -})(TypeScript || (TypeScript = {})); -/* @internal */ -var toolsVersion = "1.5"; -module.exports = ts; \ No newline at end of file diff --git a/build/lib/typings/gulp-uglify.d.ts b/build/lib/typings/gulp-uglify.d.ts deleted file mode 100644 index 2e5f41e80be68..0000000000000 --- a/build/lib/typings/gulp-uglify.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -// Type definitions for gulp-uglify -// Project: https://github.com/terinjokes/gulp-uglify -// Definitions by: Christopher Haws -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare module "gulp-uglify" { - import * as UglifyJS from 'uglify-js'; - - namespace GulpUglify { - interface Options { - /** - * Pass false to skip mangling names. - */ - mangle?: boolean; - - /** - * Pass if you wish to specify additional output options. The defaults are optimized for best compression. - */ - output?: UglifyJS.BeautifierOptions; - - /** - * Pass an object to specify custom compressor options. Pass false to skip compression completely. - */ - compress?: UglifyJS.CompressorOptions | boolean; - - /** - * A convenience option for options.output.comments. Defaults to preserving no comments. - * all - Preserve all comments in code blocks - * some - Preserve comments that start with a bang (!) or include a Closure Compiler directive (@preserve, @license, @cc_on) - * function - Specify your own comment preservation function. You will be passed the current node and the current comment and are expected to return either true or false. - */ - preserveComments?: string | ((node: any, comment: UglifyJS.Tokenizer) => boolean); - - warnings?: boolean; - } - - class GulpUglifyError { - cause: { - filename: string; - }; - } - } - - function GulpUglify(options?: GulpUglify.Options): NodeJS.ReadWriteStream; - - export = GulpUglify; -} \ No newline at end of file diff --git a/build/lib/typings/lib.es6.d.ts b/build/lib/typings/lib.es6.d.ts deleted file mode 100644 index 8cc95f419b192..0000000000000 --- a/build/lib/typings/lib.es6.d.ts +++ /dev/null @@ -1,18296 +0,0 @@ -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ - -/// - -///////////////////////////// -/// ECMAScript APIs -///////////////////////////// - -declare var NaN: number; -declare var Infinity: number; - -/** - * Evaluates JavaScript code and executes it. - * @param x A String value that contains valid JavaScript code. - */ -declare function eval(x: string): any; - -/** - * Converts A string to an integer. - * @param s A string to convert into a number. - * @param radix A value between 2 and 36 that specifies the base of the number in numString. - * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. - * All other strings are considered decimal. - */ -declare function parseInt(s: string, radix?: number): number; - -/** - * Converts a string to a floating-point number. - * @param string A string that contains a floating-point number. - */ -declare function parseFloat(string: string): number; - -/** - * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number). - * @param number A numeric value. - */ -declare function isNaN(number: number): boolean; - -/** - * Determines whether a supplied number is finite. - * @param number Any numeric value. - */ -declare function isFinite(number: number): boolean; - -/** - * Gets the unencoded version of an encoded Uniform Resource Identifier (URI). - * @param encodedURI A value representing an encoded URI. - */ -declare function decodeURI(encodedURI: string): string; - -/** - * Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI). - * @param encodedURIComponent A value representing an encoded URI component. - */ -declare function decodeURIComponent(encodedURIComponent: string): string; - -/** - * Encodes a text string as a valid Uniform Resource Identifier (URI) - * @param uri A value representing an encoded URI. - */ -declare function encodeURI(uri: string): string; - -/** - * Encodes a text string as a valid component of a Uniform Resource Identifier (URI). - * @param uriComponent A value representing an encoded URI component. - */ -declare function encodeURIComponent(uriComponent: string): string; - -interface PropertyDescriptor { - configurable?: boolean; - enumerable?: boolean; - value?: any; - writable?: boolean; - get? (): any; - set? (v: any): void; -} - -interface PropertyDescriptorMap { - [s: string]: PropertyDescriptor; -} - -interface Object { - /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */ - constructor: Function; - - /** Returns a string representation of an object. */ - toString(): string; - - /** Returns a date converted to a string using the current locale. */ - toLocaleString(): string; - - /** Returns the primitive value of the specified object. */ - valueOf(): Object; - - /** - * Determines whether an object has a property with the specified name. - * @param v A property name. - */ - hasOwnProperty(v: string): boolean; - - /** - * Determines whether an object exists in another object's prototype chain. - * @param v Another object whose prototype chain is to be checked. - */ - isPrototypeOf(v: Object): boolean; - - /** - * Determines whether a specified property is enumerable. - * @param v A property name. - */ - propertyIsEnumerable(v: string): boolean; -} - -interface ObjectConstructor { - new (value?: any): Object; - (): any; - (value: any): any; - - /** A reference to the prototype for a class of objects. */ - prototype: Object; - - /** - * Returns the prototype of an object. - * @param o The object that references the prototype. - */ - getPrototypeOf(o: any): any; - - /** - * Gets the own property descriptor of the specified object. - * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. - * @param o Object that contains the property. - * @param p Name of the property. - */ - getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; - - /** - * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly - * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions. - * @param o Object that contains the own properties. - */ - getOwnPropertyNames(o: any): string[]; - - /** - * Creates an object that has the specified prototype, and that optionally contains specified properties. - * @param o Object to use as a prototype. May be null - * @param properties JavaScript object that contains one or more property descriptors. - */ - create(o: any, properties?: PropertyDescriptorMap): any; - - /** - * Adds a property to an object, or modifies attributes of an existing property. - * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object. - * @param p The property name. - * @param attributes Descriptor for the property. It can be for a data property or an accessor property. - */ - defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; - - /** - * Adds one or more properties to an object, and/or modifies attributes of existing properties. - * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object. - * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property. - */ - defineProperties(o: any, properties: PropertyDescriptorMap): any; - - /** - * Prevents the modification of attributes of existing properties, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. - */ - seal(o: T): T; - - /** - * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. - */ - freeze(o: T): T; - - /** - * Prevents the addition of new properties to an object. - * @param o Object to make non-extensible. - */ - preventExtensions(o: T): T; - - /** - * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object. - * @param o Object to test. - */ - isSealed(o: any): boolean; - - /** - * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object. - * @param o Object to test. - */ - isFrozen(o: any): boolean; - - /** - * Returns a value that indicates whether new properties can be added to an object. - * @param o Object to test. - */ - isExtensible(o: any): boolean; - - /** - * Returns the names of the enumerable properties and methods of an object. - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - keys(o: any): string[]; -} - -/** - * Provides functionality common to all JavaScript objects. - */ -declare var Object: ObjectConstructor; - -/** - * Creates a new function. - */ -interface Function { - /** - * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function. - * @param thisArg The object to be used as the this object. - * @param argArray A set of arguments to be passed to the function. - */ - apply(thisArg: any, argArray?: any): any; - - /** - * Calls a method of an object, substituting another object for the current object. - * @param thisArg The object to be used as the current object. - * @param argArray A list of arguments to be passed to the method. - */ - call(thisArg: any, ...argArray: any[]): any; - - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg An object to which the this keyword can refer inside the new function. - * @param argArray A list of arguments to be passed to the new function. - */ - bind(thisArg: any, ...argArray: any[]): any; - - prototype: any; - length: number; - - // Non-standard extensions - arguments: any; - caller: Function; -} - -interface FunctionConstructor { - /** - * Creates a new function. - * @param args A list of arguments the function accepts. - */ - new (...args: string[]): Function; - (...args: string[]): Function; - prototype: Function; -} - -declare var Function: FunctionConstructor; - -interface IArguments { - [index: number]: any; - length: number; - callee: Function; -} - -interface String { - /** Returns a string representation of a string. */ - toString(): string; - - /** - * Returns the character at the specified index. - * @param pos The zero-based index of the desired character. - */ - charAt(pos: number): string; - - /** - * Returns the Unicode value of the character at the specified location. - * @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned. - */ - charCodeAt(index: number): number; - - /** - * Returns a string that contains the concatenation of two or more strings. - * @param strings The strings to append to the end of the string. - */ - concat(...strings: string[]): string; - - /** - * Returns the position of the first occurrence of a substring. - * @param searchString The substring to search for in the string - * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string. - */ - indexOf(searchString: string, position?: number): number; - - /** - * Returns the last occurrence of a substring in the string. - * @param searchString The substring to search for. - * @param position The index at which to begin searching. If omitted, the search begins at the end of the string. - */ - lastIndexOf(searchString: string, position?: number): number; - - /** - * Determines whether two strings are equivalent in the current locale. - * @param that String to compare to target string - */ - localeCompare(that: string): number; - - /** - * Matches a string with a regular expression, and returns an array containing the results of that search. - * @param regexp A variable name or string literal containing the regular expression pattern and flags. - */ - match(regexp: string): RegExpMatchArray; - - /** - * Matches a string with a regular expression, and returns an array containing the results of that search. - * @param regexp A regular expression object that contains the regular expression pattern and applicable flags. - */ - match(regexp: RegExp): RegExpMatchArray; - - /** - * Replaces text in a string, using a regular expression or search string. - * @param searchValue A String object or string literal that represents the regular expression - * @param replaceValue A String object or string literal containing the text to replace for every successful match of rgExp in stringObj. - */ - replace(searchValue: string, replaceValue: string): string; - - /** - * Replaces text in a string, using a regular expression or search string. - * @param searchValue A String object or string literal that represents the regular expression - * @param replaceValue A function that returns the replacement text. - */ - replace(searchValue: string, replaceValue: (substring: string, ...args: any[]) => string): string; - - /** - * Replaces text in a string, using a regular expression or search string. - * @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags - * @param replaceValue A String object or string literal containing the text to replace for every successful match of rgExp in stringObj. - */ - replace(searchValue: RegExp, replaceValue: string): string; - - /** - * Replaces text in a string, using a regular expression or search string. - * @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags - * @param replaceValue A function that returns the replacement text. - */ - replace(searchValue: RegExp, replaceValue: (substring: string, ...args: any[]) => string): string; - - /** - * Finds the first substring match in a regular expression search. - * @param regexp The regular expression pattern and applicable flags. - */ - search(regexp: string): number; - - /** - * Finds the first substring match in a regular expression search. - * @param regexp The regular expression pattern and applicable flags. - */ - search(regexp: RegExp): number; - - /** - * Returns a section of a string. - * @param start The index to the beginning of the specified portion of stringObj. - * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end. - * If this value is not specified, the substring continues to the end of stringObj. - */ - slice(start?: number, end?: number): string; - - /** - * Split a string into substrings using the specified separator and return them as an array. - * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. - * @param limit A value used to limit the number of elements returned in the array. - */ - split(separator: string, limit?: number): string[]; - - /** - * Split a string into substrings using the specified separator and return them as an array. - * @param separator A Regular Express that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. - * @param limit A value used to limit the number of elements returned in the array. - */ - split(separator: RegExp, limit?: number): string[]; - - /** - * Returns the substring at the specified location within a String object. - * @param start The zero-based index number indicating the beginning of the substring. - * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end. - * If end is omitted, the characters from start through the end of the original string are returned. - */ - substring(start: number, end?: number): string; - - /** Converts all the alphabetic characters in a string to lowercase. */ - toLowerCase(): string; - - /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ - toLocaleLowerCase(): string; - - /** Converts all the alphabetic characters in a string to uppercase. */ - toUpperCase(): string; - - /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ - toLocaleUpperCase(): string; - - /** Removes the leading and trailing white space and line terminator characters from a string. */ - trim(): string; - - /** Returns the length of a String object. */ - length: number; - - // IE extensions - /** - * Gets a substring beginning at the specified location and having the specified length. - * @param from The starting position of the desired substring. The index of the first character in the string is zero. - * @param length The number of characters to include in the returned substring. - */ - substr(from: number, length?: number): string; - - /** Returns the primitive value of the specified object. */ - valueOf(): string; - - [index: number]: string; -} - -interface StringConstructor { - new (value?: any): String; - (value?: any): string; - prototype: String; - fromCharCode(...codes: number[]): string; -} - -/** - * Allows manipulation and formatting of text strings and determination and location of substrings within strings. - */ -declare var String: StringConstructor; - -interface Boolean { - /** Returns the primitive value of the specified object. */ - valueOf(): boolean; -} - -interface BooleanConstructor { - new (value?: any): Boolean; - (value?: any): boolean; - prototype: Boolean; -} - -declare var Boolean: BooleanConstructor; - -interface Number { - /** - * Returns a string representation of an object. - * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers. - */ - toString(radix?: number): string; - - /** - * Returns a string representing a number in fixed-point notation. - * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive. - */ - toFixed(fractionDigits?: number): string; - - /** - * Returns a string containing a number represented in exponential notation. - * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive. - */ - toExponential(fractionDigits?: number): string; - - /** - * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits. - * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive. - */ - toPrecision(precision?: number): string; - - /** Returns the primitive value of the specified object. */ - valueOf(): number; -} - -interface NumberConstructor { - new (value?: any): Number; - (value?: any): number; - prototype: Number; - - /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */ - MAX_VALUE: number; - - /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */ - MIN_VALUE: number; - - /** - * A value that is not a number. - * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function. - */ - NaN: number; - - /** - * A value that is less than the largest negative number that can be represented in JavaScript. - * JavaScript displays NEGATIVE_INFINITY values as -infinity. - */ - NEGATIVE_INFINITY: number; - - /** - * A value greater than the largest number that can be represented in JavaScript. - * JavaScript displays POSITIVE_INFINITY values as infinity. - */ - POSITIVE_INFINITY: number; -} - -/** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */ -declare var Number: NumberConstructor; - -interface TemplateStringsArray extends Array { - raw: string[]; -} - -interface Math { - /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */ - E: number; - /** The natural logarithm of 10. */ - LN10: number; - /** The natural logarithm of 2. */ - LN2: number; - /** The base-2 logarithm of e. */ - LOG2E: number; - /** The base-10 logarithm of e. */ - LOG10E: number; - /** Pi. This is the ratio of the circumference of a circle to its diameter. */ - PI: number; - /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */ - SQRT1_2: number; - /** The square root of 2. */ - SQRT2: number; - /** - * Returns the absolute value of a number (the value without regard to whether it is positive or negative). - * For example, the absolute value of -5 is the same as the absolute value of 5. - * @param x A numeric expression for which the absolute value is needed. - */ - abs(x: number): number; - /** - * Returns the arc cosine (or inverse cosine) of a number. - * @param x A numeric expression. - */ - acos(x: number): number; - /** - * Returns the arcsine of a number. - * @param x A numeric expression. - */ - asin(x: number): number; - /** - * Returns the arctangent of a number. - * @param x A numeric expression for which the arctangent is needed. - */ - atan(x: number): number; - /** - * Returns the angle (in radians) from the X axis to a point. - * @param y A numeric expression representing the cartesian y-coordinate. - * @param x A numeric expression representing the cartesian x-coordinate. - */ - atan2(y: number, x: number): number; - /** - * Returns the smallest number greater than or equal to its numeric argument. - * @param x A numeric expression. - */ - ceil(x: number): number; - /** - * Returns the cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - cos(x: number): number; - /** - * Returns e (the base of natural logarithms) raised to a power. - * @param x A numeric expression representing the power of e. - */ - exp(x: number): number; - /** - * Returns the greatest number less than or equal to its numeric argument. - * @param x A numeric expression. - */ - floor(x: number): number; - /** - * Returns the natural logarithm (base e) of a number. - * @param x A numeric expression. - */ - log(x: number): number; - /** - * Returns the larger of a set of supplied numeric expressions. - * @param values Numeric expressions to be evaluated. - */ - max(...values: number[]): number; - /** - * Returns the smaller of a set of supplied numeric expressions. - * @param values Numeric expressions to be evaluated. - */ - min(...values: number[]): number; - /** - * Returns the value of a base expression taken to a specified power. - * @param x The base value of the expression. - * @param y The exponent value of the expression. - */ - pow(x: number, y: number): number; - /** Returns a pseudorandom number between 0 and 1. */ - random(): number; - /** - * Returns a supplied numeric expression rounded to the nearest number. - * @param x The value to be rounded to the nearest number. - */ - round(x: number): number; - /** - * Returns the sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - sin(x: number): number; - /** - * Returns the square root of a number. - * @param x A numeric expression. - */ - sqrt(x: number): number; - /** - * Returns the tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - tan(x: number): number; -} -/** An intrinsic object that provides basic mathematics functionality and constants. */ -declare var Math: Math; - -/** Enables basic storage and retrieval of dates and times. */ -interface Date { - /** Returns a string representation of a date. The format of the string depends on the locale. */ - toString(): string; - /** Returns a date as a string value. */ - toDateString(): string; - /** Returns a time as a string value. */ - toTimeString(): string; - /** Returns a value as a string value appropriate to the host environment's current locale. */ - toLocaleString(): string; - /** Returns a date as a string value appropriate to the host environment's current locale. */ - toLocaleDateString(): string; - /** Returns a time as a string value appropriate to the host environment's current locale. */ - toLocaleTimeString(): string; - /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ - valueOf(): number; - /** Gets the time value in milliseconds. */ - getTime(): number; - /** Gets the year, using local time. */ - getFullYear(): number; - /** Gets the year using Universal Coordinated Time (UTC). */ - getUTCFullYear(): number; - /** Gets the month, using local time. */ - getMonth(): number; - /** Gets the month of a Date object using Universal Coordinated Time (UTC). */ - getUTCMonth(): number; - /** Gets the day-of-the-month, using local time. */ - getDate(): number; - /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */ - getUTCDate(): number; - /** Gets the day of the week, using local time. */ - getDay(): number; - /** Gets the day of the week using Universal Coordinated Time (UTC). */ - getUTCDay(): number; - /** Gets the hours in a date, using local time. */ - getHours(): number; - /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */ - getUTCHours(): number; - /** Gets the minutes of a Date object, using local time. */ - getMinutes(): number; - /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */ - getUTCMinutes(): number; - /** Gets the seconds of a Date object, using local time. */ - getSeconds(): number; - /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */ - getUTCSeconds(): number; - /** Gets the milliseconds of a Date, using local time. */ - getMilliseconds(): number; - /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */ - getUTCMilliseconds(): number; - /** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */ - getTimezoneOffset(): number; - /** - * Sets the date and time value in the Date object. - * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT. - */ - setTime(time: number): number; - /** - * Sets the milliseconds value in the Date object using local time. - * @param ms A numeric value equal to the millisecond value. - */ - setMilliseconds(ms: number): number; - /** - * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC). - * @param ms A numeric value equal to the millisecond value. - */ - setUTCMilliseconds(ms: number): number; - - /** - * Sets the seconds value in the Date object using local time. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setSeconds(sec: number, ms?: number): number; - /** - * Sets the seconds value in the Date object using Universal Coordinated Time (UTC). - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setUTCSeconds(sec: number, ms?: number): number; - /** - * Sets the minutes value in the Date object using local time. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setMinutes(min: number, sec?: number, ms?: number): number; - /** - * Sets the minutes value in the Date object using Universal Coordinated Time (UTC). - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setUTCMinutes(min: number, sec?: number, ms?: number): number; - /** - * Sets the hour value in the Date object using local time. - * @param hours A numeric value equal to the hours value. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setHours(hours: number, min?: number, sec?: number, ms?: number): number; - /** - * Sets the hours value in the Date object using Universal Coordinated Time (UTC). - * @param hours A numeric value equal to the hours value. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number; - /** - * Sets the numeric day-of-the-month value of the Date object using local time. - * @param date A numeric value equal to the day of the month. - */ - setDate(date: number): number; - /** - * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC). - * @param date A numeric value equal to the day of the month. - */ - setUTCDate(date: number): number; - /** - * Sets the month value in the Date object using local time. - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. - * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used. - */ - setMonth(month: number, date?: number): number; - /** - * Sets the month value in the Date object using Universal Coordinated Time (UTC). - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. - * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used. - */ - setUTCMonth(month: number, date?: number): number; - /** - * Sets the year of the Date object using local time. - * @param year A numeric value for the year. - * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified. - * @param date A numeric value equal for the day of the month. - */ - setFullYear(year: number, month?: number, date?: number): number; - /** - * Sets the year value in the Date object using Universal Coordinated Time (UTC). - * @param year A numeric value equal to the year. - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied. - * @param date A numeric value equal to the day of the month. - */ - setUTCFullYear(year: number, month?: number, date?: number): number; - /** Returns a date converted to a string using Universal Coordinated Time (UTC). */ - toUTCString(): string; - /** Returns a date as a string value in ISO format. */ - toISOString(): string; - /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */ - toJSON(key?: any): string; -} - -interface DateConstructor { - new (): Date; - new (value: number): Date; - new (value: string): Date; - new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; - (): string; - prototype: Date; - /** - * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970. - * @param s A date string - */ - parse(s: string): number; - /** - * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. - * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. - * @param month The month as an number between 0 and 11 (January to December). - * @param date The date as an number between 1 and 31. - * @param hours Must be supplied if minutes is supplied. An number from 0 to 23 (midnight to 11pm) that specifies the hour. - * @param minutes Must be supplied if seconds is supplied. An number from 0 to 59 that specifies the minutes. - * @param seconds Must be supplied if milliseconds is supplied. An number from 0 to 59 that specifies the seconds. - * @param ms An number from 0 to 999 that specifies the milliseconds. - */ - UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; - now(): number; -} - -declare var Date: DateConstructor; - -interface RegExpMatchArray extends Array { - index?: number; - input?: string; -} - -interface RegExpExecArray extends Array { - index: number; - input: string; -} - -interface RegExp { - /** - * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search. - * @param string The String object or string literal on which to perform the search. - */ - exec(string: string): RegExpExecArray; - - /** - * Returns a Boolean value that indicates whether or not a pattern exists in a searched string. - * @param string String on which to perform the search. - */ - test(string: string): boolean; - - /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */ - source: string; - - /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */ - global: boolean; - - /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */ - ignoreCase: boolean; - - /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */ - multiline: boolean; - - lastIndex: number; - - // Non-standard extensions - compile(): RegExp; -} - -interface RegExpConstructor { - new (pattern: string, flags?: string): RegExp; - (pattern: string, flags?: string): RegExp; - prototype: RegExp; - - // Non-standard extensions - $1: string; - $2: string; - $3: string; - $4: string; - $5: string; - $6: string; - $7: string; - $8: string; - $9: string; - lastMatch: string; -} - -declare var RegExp: RegExpConstructor; - -interface Error { - name: string; - message: string; -} - -interface ErrorConstructor { - new (message?: string): Error; - (message?: string): Error; - prototype: Error; -} - -declare var Error: ErrorConstructor; - -interface EvalError extends Error { -} - -interface EvalErrorConstructor { - new (message?: string): EvalError; - (message?: string): EvalError; - prototype: EvalError; -} - -declare var EvalError: EvalErrorConstructor; - -interface RangeError extends Error { -} - -interface RangeErrorConstructor { - new (message?: string): RangeError; - (message?: string): RangeError; - prototype: RangeError; -} - -declare var RangeError: RangeErrorConstructor; - -interface ReferenceError extends Error { -} - -interface ReferenceErrorConstructor { - new (message?: string): ReferenceError; - (message?: string): ReferenceError; - prototype: ReferenceError; -} - -declare var ReferenceError: ReferenceErrorConstructor; - -interface SyntaxError extends Error { -} - -interface SyntaxErrorConstructor { - new (message?: string): SyntaxError; - (message?: string): SyntaxError; - prototype: SyntaxError; -} - -declare var SyntaxError: SyntaxErrorConstructor; - -interface TypeError extends Error { -} - -interface TypeErrorConstructor { - new (message?: string): TypeError; - (message?: string): TypeError; - prototype: TypeError; -} - -declare var TypeError: TypeErrorConstructor; - -interface URIError extends Error { -} - -interface URIErrorConstructor { - new (message?: string): URIError; - (message?: string): URIError; - prototype: URIError; -} - -declare var URIError: URIErrorConstructor; - -interface JSON { - /** - * Converts a JavaScript Object Notation (JSON) string into an object. - * @param text A valid JSON string. - * @param reviver A function that transforms the results. This function is called for each member of the object. - * If a member contains nested objects, the nested objects are transformed before the parent object is. - */ - parse(text: string, reviver?: (key: any, value: any) => any): any; - /** - * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. - * @param value A JavaScript value, usually an object or array, to be converted. - */ - stringify(value: any): string; - /** - * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. - * @param value A JavaScript value, usually an object or array, to be converted. - * @param replacer A function that transforms the results. - */ - stringify(value: any, replacer: (key: string, value: any) => any): string; - /** - * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. - * @param value A JavaScript value, usually an object or array, to be converted. - * @param replacer Array that transforms the results. - */ - stringify(value: any, replacer: any[]): string; - /** - * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. - * @param value A JavaScript value, usually an object or array, to be converted. - * @param replacer A function that transforms the results. - * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. - */ - stringify(value: any, replacer: (key: string, value: any) => any, space: any): string; - /** - * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. - * @param value A JavaScript value, usually an object or array, to be converted. - * @param replacer Array that transforms the results. - * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. - */ - stringify(value: any, replacer: any[], space: any): string; -} -/** - * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format. - */ -declare var JSON: JSON; - - -///////////////////////////// -/// ECMAScript Array API (specially handled by compiler) -///////////////////////////// - -interface Array { - /** - * Gets or sets the length of the array. This is a number one higher than the highest element defined in an array. - */ - length: number; - /** - * Returns a string representation of an array. - */ - toString(): string; - toLocaleString(): string; - /** - * Appends new elements to an array, and returns the new length of the array. - * @param items New elements of the Array. - */ - push(...items: T[]): number; - /** - * Removes the last element from an array and returns it. - */ - pop(): T; - /** - * Combines two or more arrays. - * @param items Additional items to add to the end of array1. - */ - concat(...items: U[]): T[]; - /** - * Combines two or more arrays. - * @param items Additional items to add to the end of array1. - */ - concat(...items: T[]): T[]; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; - /** - * Reverses the elements in an Array. - */ - reverse(): T[]; - /** - * Removes the first element from an array and returns it. - */ - shift(): T; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. - */ - slice(start?: number, end?: number): T[]; - - /** - * Sorts an array. - * @param compareFn The name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, ASCII character order. - */ - sort(compareFn?: (a: T, b: T) => number): T[]; - - /** - * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. - * @param start The zero-based location in the array from which to start removing elements. - */ - splice(start: number): T[]; - - /** - * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. - * @param items Elements to insert into the array in place of the deleted elements. - */ - splice(start: number, deleteCount: number, ...items: T[]): T[]; - - /** - * Inserts new elements at the start of an array. - * @param items Elements to insert at the start of the Array. - */ - unshift(...items: T[]): number; - - /** - * Returns the index of the first occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. - */ - indexOf(searchElement: T, fromIndex?: number): number; - - /** - * Returns the index of the last occurrence of a specified value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array. - */ - lastIndexOf(searchElement: T, fromIndex?: number): number; - - /** - * Determines whether all the members of an array satisfy the specified test. - * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; - - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; - - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; - - /** - * Calls a defined callback function on each element of an array, and returns an array that contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; - - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - filter(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): T[]; - - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; - - [n: number]: T; -} - -interface ArrayConstructor { - new (arrayLength?: number): any[]; - new (arrayLength: number): T[]; - new (...items: T[]): T[]; - (arrayLength?: number): any[]; - (arrayLength: number): T[]; - (...items: T[]): T[]; - isArray(arg: any): boolean; - prototype: Array; -} - -declare var Array: ArrayConstructor; - -interface TypedPropertyDescriptor { - enumerable?: boolean; - configurable?: boolean; - writable?: boolean; - value?: T; - get?: () => T; - set?: (value: T) => void; -} - -declare type ClassDecorator = (target: TFunction) => TFunction | void; -declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void; -declare type MethodDecorator = (target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor | void; -declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void; -declare type PropertyKey = string | number | symbol; - -interface Symbol { - /** Returns a string representation of an object. */ - toString(): string; - - /** Returns the primitive value of the specified object. */ - valueOf(): Object; - - [Symbol.toStringTag]: string; -} - -interface SymbolConstructor { - /** - * A reference to the prototype. - */ - prototype: Symbol; - - /** - * Returns a new unique Symbol value. - * @param description Description of the new Symbol object. - */ - (description?: string|number): symbol; - - /** - * Returns a Symbol object from the global symbol registry matching the given key if found. - * Otherwise, returns a new symbol with this key. - * @param key key to search for. - */ - for(key: string): symbol; - - /** - * Returns a key from the global symbol registry matching the given Symbol if found. - * Otherwise, returns a undefined. - * @param sym Symbol to find the key for. - */ - keyFor(sym: symbol): string; - - // Well-known Symbols - - /** - * A method that determines if a constructor object recognizes an object as one of the - * constructor’s instances. Called by the semantics of the instanceof operator. - */ - hasInstance: symbol; - - /** - * A Boolean value that if true indicates that an object should flatten to its array elements - * by Array.prototype.concat. - */ - isConcatSpreadable: symbol; - - /** - * A method that returns the default iterator for an object. Called by the semantics of the - * for-of statement. - */ - iterator: symbol; - - /** - * A regular expression method that matches the regular expression against a string. Called - * by the String.prototype.match method. - */ - match: symbol; - - /** - * A regular expression method that replaces matched substrings of a string. Called by the - * String.prototype.replace method. - */ - replace: symbol; - - /** - * A regular expression method that returns the index within a string that matches the - * regular expression. Called by the String.prototype.search method. - */ - search: symbol; - - /** - * A function valued property that is the constructor function that is used to create - * derived objects. - */ - species: symbol; - - /** - * A regular expression method that splits a string at the indices that match the regular - * expression. Called by the String.prototype.split method. - */ - split: symbol; - - /** - * A method that converts an object to a corresponding primitive value.Called by the ToPrimitive - * abstract operation. - */ - toPrimitive: symbol; - - /** - * A String value that is used in the creation of the default string description of an object. - * Called by the built-in method Object.prototype.toString. - */ - toStringTag: symbol; - - /** - * An Object whose own property names are property names that are excluded from the with - * environment bindings of the associated objects. - */ - unscopables: symbol; -} -declare var Symbol: SymbolConstructor; - -interface Object { - /** - * Determines whether an object has a property with the specified name. - * @param v A property name. - */ - hasOwnProperty(v: PropertyKey): boolean; - - /** - * Determines whether a specified property is enumerable. - * @param v A property name. - */ - propertyIsEnumerable(v: PropertyKey): boolean; -} - -interface ObjectConstructor { - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param sources One or more source objects to copy properties from. - */ - assign(target: any, ...sources: any[]): any; - - /** - * Returns an array of all symbol properties found directly on object o. - * @param o Object to retrieve the symbols from. - */ - getOwnPropertySymbols(o: any): symbol[]; - - /** - * Returns true if the values are the same value, false otherwise. - * @param value1 The first value. - * @param value2 The second value. - */ - is(value1: any, value2: any): boolean; - - /** - * Sets the prototype of a specified object o to object proto or null. Returns the object o. - * @param o The object to change its prototype. - * @param proto The value of the new prototype or null. - */ - setPrototypeOf(o: any, proto: any): any; - - /** - * Gets the own property descriptor of the specified object. - * An own property descriptor is one that is defined directly on the object and is not - * inherited from the object's prototype. - * @param o Object that contains the property. - * @param p Name of the property. - */ - getOwnPropertyDescriptor(o: any, propertyKey: PropertyKey): PropertyDescriptor; - - /** - * Adds a property to an object, or modifies attributes of an existing property. - * @param o Object on which to add or modify the property. This can be a native JavaScript - * object (that is, a user-defined object or a built in object) or a DOM object. - * @param p The property name. - * @param attributes Descriptor for the property. It can be for a data property or an accessor - * property. - */ - defineProperty(o: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): any; -} - -interface Function { - /** - * Returns a new function object that is identical to the argument object in all ways except - * for its identity and the value of its HomeObject internal slot. - */ - toMethod(newHome: Object): Function; - - /** - * Returns the name of the function. Function names are read-only and can not be changed. - */ - name: string; -} - -interface NumberConstructor { - /** - * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 - * that is representable as a Number value, which is approximately: - * 2.2204460492503130808472633361816 x 10‍−‍16. - */ - EPSILON: number; - - /** - * Returns true if passed value is finite. - * Unlike the global isFininte, Number.isFinite doesn't forcibly convert the parameter to a - * number. Only finite values of the type number, result in true. - * @param number A numeric value. - */ - isFinite(number: number): boolean; - - /** - * Returns true if the value passed is an integer, false otherwise. - * @param number A numeric value. - */ - isInteger(number: number): boolean; - - /** - * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a - * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter - * to a number. Only values of the type number, that are also NaN, result in true. - * @param number A numeric value. - */ - isNaN(number: number): boolean; - - /** - * Returns true if the value passed is a safe integer. - * @param number A numeric value. - */ - isSafeInteger(number: number): boolean; - - /** - * The value of the largest integer n such that n and n + 1 are both exactly representable as - * a Number value. - * The value of Number.MIN_SAFE_INTEGER is 9007199254740991 2^53 − 1. - */ - MAX_SAFE_INTEGER: number; - - /** - * The value of the smallest integer n such that n and n − 1 are both exactly representable as - * a Number value. - * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)). - */ - MIN_SAFE_INTEGER: number; - - /** - * Converts a string to a floating-point number. - * @param string A string that contains a floating-point number. - */ - parseFloat(string: string): number; - - /** - * Converts A string to an integer. - * @param s A string to convert into a number. - * @param radix A value between 2 and 36 that specifies the base of the number in numString. - * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. - * All other strings are considered decimal. - */ - parseInt(string: string, radix?: number): number; -} - -interface ArrayLike { - length: number; - [n: number]: T; -} - -interface Array { - /** Iterator */ - [Symbol.iterator](): IterableIterator; - - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): IterableIterator<[number, T]>; - - /** - * Returns an list of keys in the array - */ - keys(): IterableIterator; - - /** - * Returns an list of values in the array - */ - values(): IterableIterator; - - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: T, index: number, obj: Array) => boolean, thisArg?: any): T; - - /** - * Returns the index of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: T) => boolean, thisArg?: any): number; - - /** - * Returns the this object after filling the section identified by start and end with value - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: T, start?: number, end?: number): T[]; - - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): T[]; -} - -interface ArrayConstructor { - /** - * Creates an array from an array-like object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): Array; - - /** - * Creates an array from an iterable object. - * @param iterable An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(iterable: Iterable, mapfn: (v: T, k: number) => U, thisArg?: any): Array; - - /** - * Creates an array from an array-like object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Array; - - /** - * Creates an array from an iterable object. - * @param iterable An iterable object to convert to an array. - */ - from(iterable: Iterable): Array; - - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: T[]): Array; -} - -interface String { - /** Iterator */ - [Symbol.iterator](): IterableIterator; - - /** - * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point - * value of the UTF-16 encoded code point starting at the string element at position pos in - * the String resulting from converting this object to a String. - * If there is no element at that position, the result is undefined. - * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos. - */ - codePointAt(pos: number): number; - - /** - * Returns true if searchString appears as a substring of the result of converting this - * object to a String, at one or more positions that are - * greater than or equal to position; otherwise, returns false. - * @param searchString search string - * @param position If position is undefined, 0 is assumed, so as to search all of the String. - */ - contains(searchString: string, position?: number): boolean; - - /** - * Returns true if the sequence of elements of searchString converted to a String is the - * same as the corresponding elements of this object (converted to a String) starting at - * endPosition – length(this). Otherwise returns false. - */ - endsWith(searchString: string, endPosition?: number): boolean; - - /** - * Returns the String value result of normalizing the string into the normalization form - * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. - * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default - * is "NFC" - */ - normalize(form?: string): string; - - /** - * Returns a String value that is made from count copies appended together. If count is 0, - * T is the empty String is returned. - * @param count number of copies to append - */ - repeat(count: number): string; - - /** - * Returns true if the sequence of elements of searchString converted to a String is the - * same as the corresponding elements of this object (converted to a String) starting at - * position. Otherwise returns false. - */ - startsWith(searchString: string, position?: number): boolean; - - /** - * Returns an HTML anchor element and sets the name attribute to the text value - * @param name - */ - anchor(name: string): string; - - /** Returns a HTML element */ - big(): string; - - /** Returns a HTML element */ - blink(): string; - - /** Returns a HTML element */ - bold(): string; - - /** Returns a HTML element */ - fixed(): string - - /** Returns a HTML element and sets the color attribute value */ - fontcolor(color: string): string - - /** Returns a HTML element and sets the size attribute value */ - fontsize(size: number): string; - - /** Returns a HTML element and sets the size attribute value */ - fontsize(size: string): string; - - /** Returns an HTML element */ - italics(): string; - - /** Returns an HTML element and sets the href attribute value */ - link(url: string): string; - - /** Returns a HTML element */ - small(): string; - - /** Returns a HTML element */ - strike(): string; - - /** Returns a HTML element */ - sub(): string; - - /** Returns a HTML element */ - sup(): string; -} - -interface StringConstructor { - /** - * Return the String value whose elements are, in order, the elements in the List elements. - * If length is 0, the empty string is returned. - */ - fromCodePoint(...codePoints: number[]): string; - - /** - * String.raw is intended for use as a tag function of a Tagged Template String. When called - * as such the first argument will be a well formed template call site object and the rest - * parameter will contain the substitution values. - * @param template A well-formed template string call site representation. - * @param substitutions A set of substitution values. - */ - raw(template: TemplateStringsArray, ...substitutions: any[]): string; -} - -interface IteratorResult { - done: boolean; - value?: T; -} - -interface Iterator { - next(value?: any): IteratorResult; - return?(value?: any): IteratorResult; - throw?(e?: any): IteratorResult; -} - -interface Iterable { - [Symbol.iterator](): Iterator; -} - -interface IterableIterator extends Iterator { - [Symbol.iterator](): IterableIterator; -} - -interface GeneratorFunction extends Function { - -} - -interface GeneratorFunctionConstructor { - /** - * Creates a new Generator function. - * @param args A list of arguments the function accepts. - */ - new (...args: string[]): GeneratorFunction; - (...args: string[]): GeneratorFunction; - prototype: GeneratorFunction; -} -declare var GeneratorFunction: GeneratorFunctionConstructor; - -interface Generator extends IterableIterator { - next(value?: any): IteratorResult; - throw(exception: any): IteratorResult; - return(value: T): IteratorResult; - [Symbol.iterator](): Generator; - [Symbol.toStringTag]: string; -} - -interface Math { - /** - * Returns the number of leading zero bits in the 32-bit binary representation of a number. - * @param x A numeric expression. - */ - clz32(x: number): number; - - /** - * Returns the result of 32-bit multiplication of two numbers. - * @param x First number - * @param y Second number - */ - imul(x: number, y: number): number; - - /** - * Returns the sign of the x, indicating whether x is positive, negative or zero. - * @param x The numeric expression to test - */ - sign(x: number): number; - - /** - * Returns the base 10 logarithm of a number. - * @param x A numeric expression. - */ - log10(x: number): number; - - /** - * Returns the base 2 logarithm of a number. - * @param x A numeric expression. - */ - log2(x: number): number; - - /** - * Returns the natural logarithm of 1 + x. - * @param x A numeric expression. - */ - log1p(x: number): number; - - /** - * Returns the result of (e^x - 1) of x (e raised to the power of x, where e is the base of - * the natural logarithms). - * @param x A numeric expression. - */ - expm1(x: number): number; - - /** - * Returns the hyperbolic cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - cosh(x: number): number; - - /** - * Returns the hyperbolic sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - sinh(x: number): number; - - /** - * Returns the hyperbolic tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - tanh(x: number): number; - - /** - * Returns the inverse hyperbolic cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - acosh(x: number): number; - - /** - * Returns the inverse hyperbolic sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - asinh(x: number): number; - - /** - * Returns the inverse hyperbolic tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - atanh(x: number): number; - - /** - * Returns the square root of the sum of squares of its arguments. - * @param values Values to compute the square root for. - * If no arguments are passed, the result is +0. - * If there is only one argument, the result is the absolute value. - * If any argument is +Infinity or -Infinity, the result is +Infinity. - * If any argument is NaN, the result is NaN. - * If all arguments are either +0 or −0, the result is +0. - */ - hypot(...values: number[] ): number; - - /** - * Returns the integral part of the a numeric expression, x, removing any fractional digits. - * If x is already an integer, the result is x. - * @param x A numeric expression. - */ - trunc(x: number): number; - - /** - * Returns the nearest single precision float representation of a number. - * @param x A numeric expression. - */ - fround(x: number): number; - - /** - * Returns an implementation-dependent approximation to the cube root of number. - * @param x A numeric expression. - */ - cbrt(x: number): number; - - [Symbol.toStringTag]: string; -} - -interface RegExp { - /** - * Matches a string with a regular expression, and returns an array containing the results of - * that search. - * @param string A string to search within. - */ - match(string: string): string[]; - - /** - * Replaces text in a string, using a regular expression. - * @param searchValue A String object or string literal that represents the regular expression - * @param replaceValue A String object or string literal containing the text to replace for every - * successful match of rgExp in stringObj. - */ - replace(string: string, replaceValue: string): string; - - search(string: string): number; - - /** - * Returns an Array object into which substrings of the result of converting string to a String - * have been stored. The substrings are determined by searching from left to right for matches - * of the this value regular expression; these occurrences are not part of any substring in the - * returned array, but serve to divide up the String value. - * - * If the regular expression that contains capturing parentheses, then each time separator is - * matched the results (including any undefined results) of the capturing parentheses are spliced. - * @param string string value to split - * @param limit if not undefined, the output array is truncated so that it contains no more - * than limit elements. - */ - split(string: string, limit?: number): string[]; - - /** - * Returns a string indicating the flags of the regular expression in question. This field is read-only. - * The characters in this string are sequenced and concatenated in the following order: - * - * - "g" for global - * - "i" for ignoreCase - * - "m" for multiline - * - "u" for unicode - * - "y" for sticky - * - * If no flags are set, the value is the empty string. - */ - flags: string; - - /** - * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular - * expression. Default is false. Read-only. - */ - sticky: boolean; - - /** - * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular - * expression. Default is false. Read-only. - */ - unicode: boolean; -} - -interface Map { - clear(): void; - delete(key: K): boolean; - entries(): IterableIterator<[K, V]>; - forEach(callbackfn: (value: V, index: K, map: Map) => void, thisArg?: any): void; - get(key: K): V; - has(key: K): boolean; - keys(): IterableIterator; - set(key: K, value?: V): Map; - size: number; - values(): IterableIterator; - [Symbol.iterator]():IterableIterator<[K,V]>; - [Symbol.toStringTag]: string; -} - -interface MapConstructor { - new (): Map; - new (iterable: Iterable<[K, V]>): Map; - prototype: Map; -} -declare var Map: MapConstructor; - -interface WeakMap { - clear(): void; - delete(key: K): boolean; - get(key: K): V; - has(key: K): boolean; - set(key: K, value?: V): WeakMap; - [Symbol.toStringTag]: string; -} - -interface WeakMapConstructor { - new (): WeakMap; - new (iterable: Iterable<[K, V]>): WeakMap; - prototype: WeakMap; -} -declare var WeakMap: WeakMapConstructor; - -interface Set { - add(value: T): Set; - clear(): void; - delete(value: T): boolean; - entries(): IterableIterator<[T, T]>; - forEach(callbackfn: (value: T, index: T, set: Set) => void, thisArg?: any): void; - has(value: T): boolean; - keys(): IterableIterator; - size: number; - values(): IterableIterator; - [Symbol.iterator]():IterableIterator; - [Symbol.toStringTag]: string; -} - -interface SetConstructor { - new (): Set; - new (iterable: Iterable): Set; - prototype: Set; -} -declare var Set: SetConstructor; - -interface WeakSet { - add(value: T): WeakSet; - clear(): void; - delete(value: T): boolean; - has(value: T): boolean; - [Symbol.toStringTag]: string; -} - -interface WeakSetConstructor { - new (): WeakSet; - new (iterable: Iterable): WeakSet; - prototype: WeakSet; -} -declare var WeakSet: WeakSetConstructor; - -interface JSON { - [Symbol.toStringTag]: string; -} - -/** - * Represents a raw buffer of binary data, which is used to store data for the - * different typed arrays. ArrayBuffers cannot be read from or written to directly, - * but can be passed to a typed array or DataView Object to interpret the raw - * buffer as needed. - */ -interface ArrayBuffer { - /** - * Read-only. The length of the ArrayBuffer (in bytes). - */ - byteLength: number; - - /** - * Returns a section of an ArrayBuffer. - */ - slice(begin: number, end?: number): ArrayBuffer; - - [Symbol.toStringTag]: string; -} - -interface ArrayBufferConstructor { - prototype: ArrayBuffer; - new (byteLength: number): ArrayBuffer; - isView(arg: any): boolean; -} -declare var ArrayBuffer: ArrayBufferConstructor; - -interface DataView { - buffer: ArrayBuffer; - byteLength: number; - byteOffset: number; - /** - * Gets the Float32 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getFloat32(byteOffset: number, littleEndian: boolean): number; - - /** - * Gets the Float64 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getFloat64(byteOffset: number, littleEndian: boolean): number; - - /** - * Gets the Int8 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getInt8(byteOffset: number): number; - - /** - * Gets the Int16 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getInt16(byteOffset: number, littleEndian: boolean): number; - /** - * Gets the Int32 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getInt32(byteOffset: number, littleEndian: boolean): number; - - /** - * Gets the Uint8 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getUint8(byteOffset: number): number; - - /** - * Gets the Uint16 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getUint16(byteOffset: number, littleEndian: boolean): number; - - /** - * Gets the Uint32 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getUint32(byteOffset: number, littleEndian: boolean): number; - - /** - * Stores an Float32 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written, - * otherwise a little-endian value should be written. - */ - setFloat32(byteOffset: number, value: number, littleEndian: boolean): void; - - /** - * Stores an Float64 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written, - * otherwise a little-endian value should be written. - */ - setFloat64(byteOffset: number, value: number, littleEndian: boolean): void; - - /** - * Stores an Int8 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - */ - setInt8(byteOffset: number, value: number): void; - - /** - * Stores an Int16 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written, - * otherwise a little-endian value should be written. - */ - setInt16(byteOffset: number, value: number, littleEndian: boolean): void; - - /** - * Stores an Int32 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written, - * otherwise a little-endian value should be written. - */ - setInt32(byteOffset: number, value: number, littleEndian: boolean): void; - - /** - * Stores an Uint8 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - */ - setUint8(byteOffset: number, value: number): void; - - /** - * Stores an Uint16 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written, - * otherwise a little-endian value should be written. - */ - setUint16(byteOffset: number, value: number, littleEndian: boolean): void; - - /** - * Stores an Uint32 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written, - * otherwise a little-endian value should be written. - */ - setUint32(byteOffset: number, value: number, littleEndian: boolean): void; - - [Symbol.toStringTag]: string; -} - -interface DataViewConstructor { - new (buffer: ArrayBuffer, byteOffset?: number, byteLength?: number): DataView; -} -declare var DataView: DataViewConstructor; - -/** - * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested - * number of bytes could not be allocated an exception is raised. - */ -interface Int8Array { - /** - * The size in bytes of each element in the array. - */ - BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - buffer: ArrayBuffer; - - /** - * The length in bytes of the array. - */ - byteLength: number; - - /** - * The offset in bytes of the array. - */ - byteOffset: number; - - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): Int8Array; - - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): IterableIterator<[number, number]>; - - /** - * Determines whether all the members of an array satisfy the specified test. - * @param callbackfn A function that accepts up to three arguments. The every method calls - * the callbackfn function for each element in array1 until the callbackfn returns false, - * or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean; - - /** - * Returns the this object after filling the section identified by start and end with value - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): Int8Array; - - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param callbackfn A function that accepts up to three arguments. The filter method calls - * the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): Int8Array; - - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number; - - /** - * Returns the index of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number) => boolean, thisArg?: any): number; - - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: Int8Array) => void, thisArg?: any): void; - - /** - * Returns the index of the first occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; - - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; - - /** - * Returns an list of keys in the array - */ - keys(): IterableIterator; - - /** - * Returns the index of the last occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; - - /** - * The length of the array. - */ - length: number; - - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: Int8Array) => number, thisArg?: any): Int8Array; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U; - - /** - * Reverses the elements in an Array. - */ - reverse(): Int8Array; - - /** - * Sets a value or an array of values. - * @param index The index of the location to set. - * @param value The value to set. - */ - set(index: number, value: number): void; - - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: Int8Array, offset?: number): void; - - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. - */ - slice(start?: number, end?: number): Int8Array; - - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param callbackfn A function that accepts up to three arguments. The some method calls the - * callbackfn function for each element in array1 until the callbackfn returns true, or until - * the end of the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean; - - /** - * Sorts an array. - * @param compareFn The name of the function used to determine the order of the elements. If - * omitted, the elements are sorted in ascending, ASCII character order. - */ - sort(compareFn?: (a: number, b: number) => number): Int8Array; - - /** - * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin: number, end?: number): Int8Array; - - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; - - /** - * Returns a string representation of an array. - */ - toString(): string; - - /** - * Returns an list of values in the array - */ - values(): IterableIterator; - - [index: number]: number; - [Symbol.iterator](): IterableIterator; -} - -interface Int8ArrayConstructor { - prototype: Int8Array; - new (length: number): Int8Array; - new (array: Int8Array): Int8Array; - new (array: number[]): Int8Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array; - - /** - * The size in bytes of each element in the array. - */ - BYTES_PER_ELEMENT: number; - - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Int8Array; - - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike | Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; -} -declare var Int8Array: Int8ArrayConstructor; - -/** - * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the - * requested number of bytes could not be allocated an exception is raised. - */ -interface Uint8Array { - /** - * The size in bytes of each element in the array. - */ - BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - buffer: ArrayBuffer; - - /** - * The length in bytes of the array. - */ - byteLength: number; - - /** - * The offset in bytes of the array. - */ - byteOffset: number; - - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): Uint8Array; - - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): IterableIterator<[number, number]>; - - /** - * Determines whether all the members of an array satisfy the specified test. - * @param callbackfn A function that accepts up to three arguments. The every method calls - * the callbackfn function for each element in array1 until the callbackfn returns false, - * or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean; - - /** - * Returns the this object after filling the section identified by start and end with value - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): Uint8Array; - - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param callbackfn A function that accepts up to three arguments. The filter method calls - * the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): Uint8Array; - - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number; - - /** - * Returns the index of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number) => boolean, thisArg?: any): number; - - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: Uint8Array) => void, thisArg?: any): void; - - /** - * Returns the index of the first occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; - - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; - - /** - * Returns an list of keys in the array - */ - keys(): IterableIterator; - - /** - * Returns the index of the last occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; - - /** - * The length of the array. - */ - length: number; - - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: Uint8Array) => number, thisArg?: any): Uint8Array; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U; - - /** - * Reverses the elements in an Array. - */ - reverse(): Uint8Array; - - /** - * Sets a value or an array of values. - * @param index The index of the location to set. - * @param value The value to set. - */ - set(index: number, value: number): void; - - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: Uint8Array, offset?: number): void; - - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. - */ - slice(start?: number, end?: number): Uint8Array; - - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param callbackfn A function that accepts up to three arguments. The some method calls the - * callbackfn function for each element in array1 until the callbackfn returns true, or until - * the end of the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean; - - /** - * Sorts an array. - * @param compareFn The name of the function used to determine the order of the elements. If - * omitted, the elements are sorted in ascending, ASCII character order. - */ - sort(compareFn?: (a: number, b: number) => number): Uint8Array; - - /** - * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin: number, end?: number): Uint8Array; - - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; - - /** - * Returns a string representation of an array. - */ - toString(): string; - - /** - * Returns an list of values in the array - */ - values(): IterableIterator; - - [index: number]: number; - [Symbol.iterator](): IterableIterator; -} - -interface Uint8ArrayConstructor { - prototype: Uint8Array; - new (length: number): Uint8Array; - new (array: Uint8Array): Uint8Array; - new (array: number[]): Uint8Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array; - - /** - * The size in bytes of each element in the array. - */ - BYTES_PER_ELEMENT: number; - - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint8Array; - - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike | Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; -} -declare var Uint8Array: Uint8ArrayConstructor; - -/** - * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0. - * If the requested number of bytes could not be allocated an exception is raised. - */ -interface Uint8ClampedArray { - /** - * The size in bytes of each element in the array. - */ - BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - buffer: ArrayBuffer; - - /** - * The length in bytes of the array. - */ - byteLength: number; - - /** - * The offset in bytes of the array. - */ - byteOffset: number; - - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): Uint8ClampedArray; - - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): IterableIterator<[number, number]>; - - /** - * Determines whether all the members of an array satisfy the specified test. - * @param callbackfn A function that accepts up to three arguments. The every method calls - * the callbackfn function for each element in array1 until the callbackfn returns false, - * or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean; - - /** - * Returns the this object after filling the section identified by start and end with value - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): Uint8ClampedArray; - - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param callbackfn A function that accepts up to three arguments. The filter method calls - * the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): Uint8ClampedArray; - - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number; - - /** - * Returns the index of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number) => boolean, thisArg?: any): number; - - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => void, thisArg?: any): void; - - /** - * Returns the index of the first occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; - - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; - - /** - * Returns an list of keys in the array - */ - keys(): IterableIterator; - - /** - * Returns the index of the last occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; - - /** - * The length of the array. - */ - length: number; - - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => number, thisArg?: any): Uint8ClampedArray; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U; - - /** - * Reverses the elements in an Array. - */ - reverse(): Uint8ClampedArray; - - /** - * Sets a value or an array of values. - * @param index The index of the location to set. - * @param value The value to set. - */ - set(index: number, value: number): void; - - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: Uint8ClampedArray, offset?: number): void; - - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. - */ - slice(start?: number, end?: number): Uint8ClampedArray; - - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param callbackfn A function that accepts up to three arguments. The some method calls the - * callbackfn function for each element in array1 until the callbackfn returns true, or until - * the end of the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean; - - /** - * Sorts an array. - * @param compareFn The name of the function used to determine the order of the elements. If - * omitted, the elements are sorted in ascending, ASCII character order. - */ - sort(compareFn?: (a: number, b: number) => number): Uint8ClampedArray; - - /** - * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin: number, end?: number): Uint8ClampedArray; - - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; - - /** - * Returns a string representation of an array. - */ - toString(): string; - - /** - * Returns an list of values in the array - */ - values(): IterableIterator; - - [index: number]: number; - [Symbol.iterator](): IterableIterator; -} - -interface Uint8ClampedArrayConstructor { - prototype: Uint8ClampedArray; - new (length: number): Uint8ClampedArray; - new (array: Uint8ClampedArray): Uint8ClampedArray; - new (array: number[]): Uint8ClampedArray; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; - - /** - * The size in bytes of each element in the array. - */ - BYTES_PER_ELEMENT: number; - - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint8ClampedArray; - - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike | Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; -} -declare var Uint8ClampedArray: Uint8ClampedArrayConstructor; - -/** - * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the - * requested number of bytes could not be allocated an exception is raised. - */ -interface Int16Array { - /** - * The size in bytes of each element in the array. - */ - BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - buffer: ArrayBuffer; - - /** - * The length in bytes of the array. - */ - byteLength: number; - - /** - * The offset in bytes of the array. - */ - byteOffset: number; - - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): Int16Array; - - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): IterableIterator<[number, number]>; - - /** - * Determines whether all the members of an array satisfy the specified test. - * @param callbackfn A function that accepts up to three arguments. The every method calls - * the callbackfn function for each element in array1 until the callbackfn returns false, - * or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean; - - /** - * Returns the this object after filling the section identified by start and end with value - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): Int16Array; - - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param callbackfn A function that accepts up to three arguments. The filter method calls - * the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): Int16Array; - - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number; - - /** - * Returns the index of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number) => boolean, thisArg?: any): number; - - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: Int16Array) => void, thisArg?: any): void; - - /** - * Returns the index of the first occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; - - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; - - /** - * Returns an list of keys in the array - */ - keys(): IterableIterator; - - /** - * Returns the index of the last occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; - - /** - * The length of the array. - */ - length: number; - - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: Int16Array) => number, thisArg?: any): Int16Array; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U; - - /** - * Reverses the elements in an Array. - */ - reverse(): Int16Array; - - /** - * Sets a value or an array of values. - * @param index The index of the location to set. - * @param value The value to set. - */ - set(index: number, value: number): void; - - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: Int16Array, offset?: number): void; - - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. - */ - slice(start?: number, end?: number): Int16Array; - - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param callbackfn A function that accepts up to three arguments. The some method calls the - * callbackfn function for each element in array1 until the callbackfn returns true, or until - * the end of the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean; - - /** - * Sorts an array. - * @param compareFn The name of the function used to determine the order of the elements. If - * omitted, the elements are sorted in ascending, ASCII character order. - */ - sort(compareFn?: (a: number, b: number) => number): Int16Array; - - /** - * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin: number, end?: number): Int16Array; - - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; - - /** - * Returns a string representation of an array. - */ - toString(): string; - - /** - * Returns an list of values in the array - */ - values(): IterableIterator; - - [index: number]: number; - [Symbol.iterator](): IterableIterator; -} - -interface Int16ArrayConstructor { - prototype: Int16Array; - new (length: number): Int16Array; - new (array: Int16Array): Int16Array; - new (array: number[]): Int16Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array; - - /** - * The size in bytes of each element in the array. - */ - BYTES_PER_ELEMENT: number; - - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Int16Array; - - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike | Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; -} -declare var Int16Array: Int16ArrayConstructor; - -/** - * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the - * requested number of bytes could not be allocated an exception is raised. - */ -interface Uint16Array { - /** - * The size in bytes of each element in the array. - */ - BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - buffer: ArrayBuffer; - - /** - * The length in bytes of the array. - */ - byteLength: number; - - /** - * The offset in bytes of the array. - */ - byteOffset: number; - - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): Uint16Array; - - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): IterableIterator<[number, number]>; - - /** - * Determines whether all the members of an array satisfy the specified test. - * @param callbackfn A function that accepts up to three arguments. The every method calls - * the callbackfn function for each element in array1 until the callbackfn returns false, - * or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean; - - /** - * Returns the this object after filling the section identified by start and end with value - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): Uint16Array; - - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param callbackfn A function that accepts up to three arguments. The filter method calls - * the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): Uint16Array; - - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number; - - /** - * Returns the index of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number) => boolean, thisArg?: any): number; - - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: Uint16Array) => void, thisArg?: any): void; - - /** - * Returns the index of the first occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; - - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; - - /** - * Returns an list of keys in the array - */ - keys(): IterableIterator; - - /** - * Returns the index of the last occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; - - /** - * The length of the array. - */ - length: number; - - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: Uint16Array) => number, thisArg?: any): Uint16Array; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U; - - /** - * Reverses the elements in an Array. - */ - reverse(): Uint16Array; - - /** - * Sets a value or an array of values. - * @param index The index of the location to set. - * @param value The value to set. - */ - set(index: number, value: number): void; - - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: Uint16Array, offset?: number): void; - - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. - */ - slice(start?: number, end?: number): Uint16Array; - - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param callbackfn A function that accepts up to three arguments. The some method calls the - * callbackfn function for each element in array1 until the callbackfn returns true, or until - * the end of the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean; - - /** - * Sorts an array. - * @param compareFn The name of the function used to determine the order of the elements. If - * omitted, the elements are sorted in ascending, ASCII character order. - */ - sort(compareFn?: (a: number, b: number) => number): Uint16Array; - - /** - * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin: number, end?: number): Uint16Array; - - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; - - /** - * Returns a string representation of an array. - */ - toString(): string; - - /** - * Returns an list of values in the array - */ - values(): IterableIterator; - - [index: number]: number; - [Symbol.iterator](): IterableIterator; -} - -interface Uint16ArrayConstructor { - prototype: Uint16Array; - new (length: number): Uint16Array; - new (array: Uint16Array): Uint16Array; - new (array: number[]): Uint16Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array; - - /** - * The size in bytes of each element in the array. - */ - BYTES_PER_ELEMENT: number; - - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint16Array; - - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike | Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; -} -declare var Uint16Array: Uint16ArrayConstructor; - -/** - * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the - * requested number of bytes could not be allocated an exception is raised. - */ -interface Int32Array { - /** - * The size in bytes of each element in the array. - */ - BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - buffer: ArrayBuffer; - - /** - * The length in bytes of the array. - */ - byteLength: number; - - /** - * The offset in bytes of the array. - */ - byteOffset: number; - - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): Int32Array; - - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): IterableIterator<[number, number]>; - - /** - * Determines whether all the members of an array satisfy the specified test. - * @param callbackfn A function that accepts up to three arguments. The every method calls - * the callbackfn function for each element in array1 until the callbackfn returns false, - * or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean; - - /** - * Returns the this object after filling the section identified by start and end with value - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): Int32Array; - - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param callbackfn A function that accepts up to three arguments. The filter method calls - * the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): Int32Array; - - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number; - - /** - * Returns the index of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number) => boolean, thisArg?: any): number; - - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: Int32Array) => void, thisArg?: any): void; - - /** - * Returns the index of the first occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; - - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; - - /** - * Returns an list of keys in the array - */ - keys(): IterableIterator; - - /** - * Returns the index of the last occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; - - /** - * The length of the array. - */ - length: number; - - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: Int32Array) => number, thisArg?: any): Int32Array; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U; - - /** - * Reverses the elements in an Array. - */ - reverse(): Int32Array; - - /** - * Sets a value or an array of values. - * @param index The index of the location to set. - * @param value The value to set. - */ - set(index: number, value: number): void; - - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: Int32Array, offset?: number): void; - - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. - */ - slice(start?: number, end?: number): Int32Array; - - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param callbackfn A function that accepts up to three arguments. The some method calls the - * callbackfn function for each element in array1 until the callbackfn returns true, or until - * the end of the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean; - - /** - * Sorts an array. - * @param compareFn The name of the function used to determine the order of the elements. If - * omitted, the elements are sorted in ascending, ASCII character order. - */ - sort(compareFn?: (a: number, b: number) => number): Int32Array; - - /** - * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin: number, end?: number): Int32Array; - - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; - - /** - * Returns a string representation of an array. - */ - toString(): string; - - /** - * Returns an list of values in the array - */ - values(): IterableIterator; - - [index: number]: number; - [Symbol.iterator](): IterableIterator; -} - -interface Int32ArrayConstructor { - prototype: Int32Array; - new (length: number): Int32Array; - new (array: Int32Array): Int32Array; - new (array: number[]): Int32Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array; - - /** - * The size in bytes of each element in the array. - */ - BYTES_PER_ELEMENT: number; - - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Int32Array; - - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike | Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; -} -declare var Int32Array: Int32ArrayConstructor; - -/** - * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the - * requested number of bytes could not be allocated an exception is raised. - */ -interface Uint32Array { - /** - * The size in bytes of each element in the array. - */ - BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - buffer: ArrayBuffer; - - /** - * The length in bytes of the array. - */ - byteLength: number; - - /** - * The offset in bytes of the array. - */ - byteOffset: number; - - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): Uint32Array; - - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): IterableIterator<[number, number]>; - - /** - * Determines whether all the members of an array satisfy the specified test. - * @param callbackfn A function that accepts up to three arguments. The every method calls - * the callbackfn function for each element in array1 until the callbackfn returns false, - * or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean; - - /** - * Returns the this object after filling the section identified by start and end with value - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): Uint32Array; - - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param callbackfn A function that accepts up to three arguments. The filter method calls - * the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): Uint32Array; - - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number; - - /** - * Returns the index of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number) => boolean, thisArg?: any): number; - - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: Uint32Array) => void, thisArg?: any): void; - - /** - * Returns the index of the first occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; - - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; - - /** - * Returns an list of keys in the array - */ - keys(): IterableIterator; - - /** - * Returns the index of the last occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; - - /** - * The length of the array. - */ - length: number; - - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: Uint32Array) => number, thisArg?: any): Uint32Array; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U; - - /** - * Reverses the elements in an Array. - */ - reverse(): Uint32Array; - - /** - * Sets a value or an array of values. - * @param index The index of the location to set. - * @param value The value to set. - */ - set(index: number, value: number): void; - - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: Uint32Array, offset?: number): void; - - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. - */ - slice(start?: number, end?: number): Uint32Array; - - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param callbackfn A function that accepts up to three arguments. The some method calls the - * callbackfn function for each element in array1 until the callbackfn returns true, or until - * the end of the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean; - - /** - * Sorts an array. - * @param compareFn The name of the function used to determine the order of the elements. If - * omitted, the elements are sorted in ascending, ASCII character order. - */ - sort(compareFn?: (a: number, b: number) => number): Uint32Array; - - /** - * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin: number, end?: number): Uint32Array; - - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; - - /** - * Returns a string representation of an array. - */ - toString(): string; - - /** - * Returns an list of values in the array - */ - values(): IterableIterator; - - [index: number]: number; - [Symbol.iterator](): IterableIterator; -} - -interface Uint32ArrayConstructor { - prototype: Uint32Array; - new (length: number): Uint32Array; - new (array: Uint32Array): Uint32Array; - new (array: number[]): Uint32Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array; - - /** - * The size in bytes of each element in the array. - */ - BYTES_PER_ELEMENT: number; - - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint32Array; - - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike | Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; -} -declare var Uint32Array: Uint32ArrayConstructor; - -/** - * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number - * of bytes could not be allocated an exception is raised. - */ -interface Float32Array { - /** - * The size in bytes of each element in the array. - */ - BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - buffer: ArrayBuffer; - - /** - * The length in bytes of the array. - */ - byteLength: number; - - /** - * The offset in bytes of the array. - */ - byteOffset: number; - - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): Float32Array; - - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): IterableIterator<[number, number]>; - - /** - * Determines whether all the members of an array satisfy the specified test. - * @param callbackfn A function that accepts up to three arguments. The every method calls - * the callbackfn function for each element in array1 until the callbackfn returns false, - * or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean; - - /** - * Returns the this object after filling the section identified by start and end with value - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): Float32Array; - - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param callbackfn A function that accepts up to three arguments. The filter method calls - * the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): Float32Array; - - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number; - - /** - * Returns the index of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number) => boolean, thisArg?: any): number; - - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: Float32Array) => void, thisArg?: any): void; - - /** - * Returns the index of the first occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; - - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; - - /** - * Returns an list of keys in the array - */ - keys(): IterableIterator; - - /** - * Returns the index of the last occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; - - /** - * The length of the array. - */ - length: number; - - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: Float32Array) => number, thisArg?: any): Float32Array; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U; - - /** - * Reverses the elements in an Array. - */ - reverse(): Float32Array; - - /** - * Sets a value or an array of values. - * @param index The index of the location to set. - * @param value The value to set. - */ - set(index: number, value: number): void; - - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: Float32Array, offset?: number): void; - - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. - */ - slice(start?: number, end?: number): Float32Array; - - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param callbackfn A function that accepts up to three arguments. The some method calls the - * callbackfn function for each element in array1 until the callbackfn returns true, or until - * the end of the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean; - - /** - * Sorts an array. - * @param compareFn The name of the function used to determine the order of the elements. If - * omitted, the elements are sorted in ascending, ASCII character order. - */ - sort(compareFn?: (a: number, b: number) => number): Float32Array; - - /** - * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin: number, end?: number): Float32Array; - - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; - - /** - * Returns a string representation of an array. - */ - toString(): string; - - /** - * Returns an list of values in the array - */ - values(): IterableIterator; - - [index: number]: number; - [Symbol.iterator](): IterableIterator; -} - -interface Float32ArrayConstructor { - prototype: Float32Array; - new (length: number): Float32Array; - new (array: Float32Array): Float32Array; - new (array: number[]): Float32Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array; - - /** - * The size in bytes of each element in the array. - */ - BYTES_PER_ELEMENT: number; - - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Float32Array; - - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike | Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; -} -declare var Float32Array: Float32ArrayConstructor; - -/** - * A typed array of 64-bit float values. The contents are initialized to 0. If the requested - * number of bytes could not be allocated an exception is raised. - */ -interface Float64Array { - /** - * The size in bytes of each element in the array. - */ - BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - buffer: ArrayBuffer; - - /** - * The length in bytes of the array. - */ - byteLength: number; - - /** - * The offset in bytes of the array. - */ - byteOffset: number; - - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): Float64Array; - - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): IterableIterator<[number, number]>; - - /** - * Determines whether all the members of an array satisfy the specified test. - * @param callbackfn A function that accepts up to three arguments. The every method calls - * the callbackfn function for each element in array1 until the callbackfn returns false, - * or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean; - - /** - * Returns the this object after filling the section identified by start and end with value - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): Float64Array; - - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param callbackfn A function that accepts up to three arguments. The filter method calls - * the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): Float64Array; - - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number; - - /** - * Returns the index of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number) => boolean, thisArg?: any): number; - - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: Float64Array) => void, thisArg?: any): void; - - /** - * Returns the index of the first occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; - - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; - - /** - * Returns an list of keys in the array - */ - keys(): IterableIterator; - - /** - * Returns the index of the last occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; - - /** - * The length of the array. - */ - length: number; - - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: Float64Array) => number, thisArg?: any): Float64Array; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U; - - /** - * Reverses the elements in an Array. - */ - reverse(): Float64Array; - - /** - * Sets a value or an array of values. - * @param index The index of the location to set. - * @param value The value to set. - */ - set(index: number, value: number): void; - - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: Float64Array, offset?: number): void; - - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. - */ - slice(start?: number, end?: number): Float64Array; - - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param callbackfn A function that accepts up to three arguments. The some method calls the - * callbackfn function for each element in array1 until the callbackfn returns true, or until - * the end of the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean; - - /** - * Sorts an array. - * @param compareFn The name of the function used to determine the order of the elements. If - * omitted, the elements are sorted in ascending, ASCII character order. - */ - sort(compareFn?: (a: number, b: number) => number): Float64Array; - - /** - * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin: number, end?: number): Float64Array; - - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; - - /** - * Returns a string representation of an array. - */ - toString(): string; - - /** - * Returns an list of values in the array - */ - values(): IterableIterator; - - [index: number]: number; - [Symbol.iterator](): IterableIterator; -} - -interface Float64ArrayConstructor { - prototype: Float64Array; - new (length: number): Float64Array; - new (array: Float64Array): Float64Array; - new (array: number[]): Float64Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array; - - /** - * The size in bytes of each element in the array. - */ - BYTES_PER_ELEMENT: number; - - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Float64Array; - - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike | Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; -} -declare var Float64Array: Float64ArrayConstructor; - -interface ProxyHandler { - getPrototypeOf? (target: T): any; - setPrototypeOf? (target: T, v: any): boolean; - isExtensible? (target: T): boolean; - preventExtensions? (target: T): boolean; - getOwnPropertyDescriptor? (target: T, p: PropertyKey): PropertyDescriptor; - has? (target: T, p: PropertyKey): boolean; - get? (target: T, p: PropertyKey, receiver: any): any; - set? (target: T, p: PropertyKey, value: any, receiver: any): boolean; - deleteProperty? (target: T, p: PropertyKey): boolean; - defineProperty? (target: T, p: PropertyKey, attributes: PropertyDescriptor): boolean; - enumerate? (target: T): PropertyKey[]; - ownKeys? (target: T): PropertyKey[]; - apply? (target: T, thisArg: any, argArray?: any): any; - construct? (target: T, thisArg: any, argArray?: any): any; -} - -interface ProxyConstructor { - revocable(target: T, handler: ProxyHandler): { proxy: T; revoke: () => void; }; - new (target: T, handler: ProxyHandler): T -} -declare var Proxy: ProxyConstructor; - -declare module Reflect { - function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; - function construct(target: Function, argumentsList: ArrayLike): any; - function defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean; - function deleteProperty(target: any, propertyKey: PropertyKey): boolean; - function enumerate(target: any): IterableIterator; - function get(target: any, propertyKey: PropertyKey, receiver?: any): any; - function getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor; - function getPrototypeOf(target: any): any; - function has(target: any, propertyKey: string): boolean; - function has(target: any, propertyKey: symbol): boolean; - function isExtensible(target: any): boolean; - function ownKeys(target: any): Array; - function preventExtensions(target: any): boolean; - function set(target: any, propertyKey: PropertyKey, value: any, receiver? :any): boolean; - function setPrototypeOf(target: any, proto: any): boolean; -} - -interface PromiseLike { - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): PromiseLike; - then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => void): PromiseLike; -} - -/** - * Represents the completion of an asynchronous operation - */ -interface Promise { - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; - then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => void): Promise; - - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: (reason: any) => T | PromiseLike): Promise; - - [Symbol.toStringTag]: string; -} - -interface PromiseConstructor { - /** - * A reference to the prototype. - */ - prototype: Promise; - - /** - * Creates a new Promise. - * @param executor A callback used to initialize the promise. This callback is passed two arguments: - * a resolve callback used resolve the promise with a value or the result of another promise, - * and a reject callback used to reject the promise with a provided reason or error. - */ - new (executor: (resolve: (value?: T | PromiseLike) => void, reject: (reason?: any) => void) => void): Promise; - - /** - * Creates a Promise that is resolved with an array of results when all of the provided Promises - * resolve, or rejected when any Promise is rejected. - * @param values An array of Promises. - * @returns A new Promise. - */ - all(values: Iterable>): Promise; - - /** - * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved - * or rejected. - * @param values An array of Promises. - * @returns A new Promise. - */ - race(values: Iterable>): Promise; - - /** - * Creates a new rejected promise for the provided reason. - * @param reason The reason the promise was rejected. - * @returns A new rejected Promise. - */ - reject(reason: any): Promise; - - /** - * Creates a new rejected promise for the provided reason. - * @param reason The reason the promise was rejected. - * @returns A new rejected Promise. - */ - reject(reason: any): Promise; - - /** - * Creates a new resolved promise for the provided value. - * @param value A promise. - * @returns A promise whose internal state matches the provided promise. - */ - resolve(value: T | PromiseLike): Promise; - - /** - * Creates a new resolved promise . - * @returns A resolved promise. - */ - resolve(): Promise; - - [Symbol.species]: Function; -} - -declare var Promise: PromiseConstructor; - -interface ArrayBufferView { - /** - * The ArrayBuffer instance referenced by the array. - */ - buffer: ArrayBuffer; - - /** - * The length in bytes of the array. - */ - byteLength: number; - - /** - * The offset in bytes of the array. - */ - byteOffset: number; -}///////////////////////////// -/// ECMAScript Internationalization API -///////////////////////////// - -declare module Intl { - interface CollatorOptions { - usage?: string; - localeMatcher?: string; - numeric?: boolean; - caseFirst?: string; - sensitivity?: string; - ignorePunctuation?: boolean; - } - - interface ResolvedCollatorOptions { - locale: string; - usage: string; - sensitivity: string; - ignorePunctuation: boolean; - collation: string; - caseFirst: string; - numeric: boolean; - } - - interface Collator { - compare(x: string, y: string): number; - resolvedOptions(): ResolvedCollatorOptions; - } - var Collator: { - new (locales?: string[], options?: CollatorOptions): Collator; - new (locale?: string, options?: CollatorOptions): Collator; - (locales?: string[], options?: CollatorOptions): Collator; - (locale?: string, options?: CollatorOptions): Collator; - supportedLocalesOf(locales: string[], options?: CollatorOptions): string[]; - supportedLocalesOf(locale: string, options?: CollatorOptions): string[]; - } - - interface NumberFormatOptions { - localeMatcher?: string; - style?: string; - currency?: string; - currencyDisplay?: string; - useGrouping?: boolean; - } - - interface ResolvedNumberFormatOptions { - locale: string; - numberingSystem: string; - style: string; - currency?: string; - currencyDisplay?: string; - minimumintegerDigits: number; - minimumFractionDigits: number; - maximumFractionDigits: number; - minimumSignificantDigits?: number; - maximumSignificantDigits?: number; - useGrouping: boolean; - } - - interface NumberFormat { - format(value: number): string; - resolvedOptions(): ResolvedNumberFormatOptions; - } - var NumberFormat: { - new (locales?: string[], options?: NumberFormatOptions): Collator; - new (locale?: string, options?: NumberFormatOptions): Collator; - (locales?: string[], options?: NumberFormatOptions): Collator; - (locale?: string, options?: NumberFormatOptions): Collator; - supportedLocalesOf(locales: string[], options?: NumberFormatOptions): string[]; - supportedLocalesOf(locale: string, options?: NumberFormatOptions): string[]; - } - - interface DateTimeFormatOptions { - localeMatcher?: string; - weekday?: string; - era?: string; - year?: string; - month?: string; - day?: string; - hour?: string; - minute?: string; - second?: string; - timeZoneName?: string; - formatMatcher?: string; - hour12?: boolean; - } - - interface ResolvedDateTimeFormatOptions { - locale: string; - calendar: string; - numberingSystem: string; - timeZone: string; - hour12?: boolean; - weekday?: string; - era?: string; - year?: string; - month?: string; - day?: string; - hour?: string; - minute?: string; - second?: string; - timeZoneName?: string; - } - - interface DateTimeFormat { - format(date: number): string; - resolvedOptions(): ResolvedDateTimeFormatOptions; - } - var DateTimeFormat: { - new (locales?: string[], options?: DateTimeFormatOptions): Collator; - new (locale?: string, options?: DateTimeFormatOptions): Collator; - (locales?: string[], options?: DateTimeFormatOptions): Collator; - (locale?: string, options?: DateTimeFormatOptions): Collator; - supportedLocalesOf(locales: string[], options?: DateTimeFormatOptions): string[]; - supportedLocalesOf(locale: string, options?: DateTimeFormatOptions): string[]; - } -} - -interface String { - /** - * Determines whether two strings are equivalent in the current locale. - * @param that String to compare to target string - * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. - * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. - */ - localeCompare(that: string, locales: string[], options?: Intl.CollatorOptions): number; - - /** - * Determines whether two strings are equivalent in the current locale. - * @param that String to compare to target string - * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. - * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. - */ - localeCompare(that: string, locale: string, options?: Intl.CollatorOptions): number; -} - -interface Number { - /** - * Converts a number to a string by using the current or specified locale. - * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: string[], options?: Intl.NumberFormatOptions): string; - - /** - * Converts a number to a string by using the current or specified locale. - * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locale?: string, options?: Intl.NumberFormatOptions): string; -} - -interface Date { - /** - * Converts a date to a string by using the current or specified locale. - * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: string[], options?: Intl.DateTimeFormatOptions): string; - - /** - * Converts a date to a string by using the current or specified locale. - * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locale?: string, options?: Intl.DateTimeFormatOptions): string; -} - - -///////////////////////////// -/// IE DOM APIs -///////////////////////////// - -interface Algorithm { - name?: string; -} - -interface AriaRequestEventInit extends EventInit { - attributeName?: string; - attributeValue?: string; -} - -interface ClipboardEventInit extends EventInit { - data?: string; - dataType?: string; -} - -interface CommandEventInit extends EventInit { - commandName?: string; - detail?: string; -} - -interface CompositionEventInit extends UIEventInit { - data?: string; -} - -interface ConfirmSiteSpecificExceptionsInformation extends ExceptionInformation { - arrayOfDomainStrings?: string[]; -} - -interface CustomEventInit extends EventInit { - detail?: any; -} - -interface DeviceAccelerationDict { - x?: number; - y?: number; - z?: number; -} - -interface DeviceRotationRateDict { - alpha?: number; - beta?: number; - gamma?: number; -} - -interface EventInit { - bubbles?: boolean; - cancelable?: boolean; -} - -interface ExceptionInformation { - domain?: string; -} - -interface FocusEventInit extends UIEventInit { - relatedTarget?: EventTarget; -} - -interface HashChangeEventInit extends EventInit { - newURL?: string; - oldURL?: string; -} - -interface KeyAlgorithm { - name?: string; -} - -interface KeyboardEventInit extends SharedKeyboardAndMouseEventInit { - key?: string; - location?: number; - repeat?: boolean; -} - -interface MouseEventInit extends SharedKeyboardAndMouseEventInit { - screenX?: number; - screenY?: number; - clientX?: number; - clientY?: number; - button?: number; - buttons?: number; - relatedTarget?: EventTarget; -} - -interface MsZoomToOptions { - contentX?: number; - contentY?: number; - viewportX?: string; - viewportY?: string; - scaleFactor?: number; - animate?: string; -} - -interface MutationObserverInit { - childList?: boolean; - attributes?: boolean; - characterData?: boolean; - subtree?: boolean; - attributeOldValue?: boolean; - characterDataOldValue?: boolean; - attributeFilter?: string[]; -} - -interface ObjectURLOptions { - oneTimeOnly?: boolean; -} - -interface PointerEventInit extends MouseEventInit { - pointerId?: number; - width?: number; - height?: number; - pressure?: number; - tiltX?: number; - tiltY?: number; - pointerType?: string; - isPrimary?: boolean; -} - -interface PositionOptions { - enableHighAccuracy?: boolean; - timeout?: number; - maximumAge?: number; -} - -interface SharedKeyboardAndMouseEventInit extends UIEventInit { - ctrlKey?: boolean; - shiftKey?: boolean; - altKey?: boolean; - metaKey?: boolean; - keyModifierStateAltGraph?: boolean; - keyModifierStateCapsLock?: boolean; - keyModifierStateFn?: boolean; - keyModifierStateFnLock?: boolean; - keyModifierStateHyper?: boolean; - keyModifierStateNumLock?: boolean; - keyModifierStateOS?: boolean; - keyModifierStateScrollLock?: boolean; - keyModifierStateSuper?: boolean; - keyModifierStateSymbol?: boolean; - keyModifierStateSymbolLock?: boolean; -} - -interface StoreExceptionsInformation extends ExceptionInformation { - siteName?: string; - explanationString?: string; - detailURI?: string; -} - -interface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation { - arrayOfDomainStrings?: string[]; -} - -interface UIEventInit extends EventInit { - view?: Window; - detail?: number; -} - -interface WebGLContextAttributes { - alpha?: boolean; - depth?: boolean; - stencil?: boolean; - antialias?: boolean; - premultipliedAlpha?: boolean; - preserveDrawingBuffer?: boolean; -} - -interface WebGLContextEventInit extends EventInit { - statusMessage?: string; -} - -interface WheelEventInit extends MouseEventInit { - deltaX?: number; - deltaY?: number; - deltaZ?: number; - deltaMode?: number; -} - -interface EventListener { - (evt: Event): void; -} - -interface ANGLE_instanced_arrays { - drawArraysInstancedANGLE(mode: number, first: number, count: number, primcount: number): void; - drawElementsInstancedANGLE(mode: number, count: number, type: number, offset: number, primcount: number): void; - vertexAttribDivisorANGLE(index: number, divisor: number): void; - VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number; -} - -declare var ANGLE_instanced_arrays: { - prototype: ANGLE_instanced_arrays; - new(): ANGLE_instanced_arrays; - VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number; -} - -interface AnalyserNode extends AudioNode { - fftSize: number; - frequencyBinCount: number; - maxDecibels: number; - minDecibels: number; - smoothingTimeConstant: number; - getByteFrequencyData(array: Uint8Array): void; - getByteTimeDomainData(array: Uint8Array): void; - getFloatFrequencyData(array: any): void; - getFloatTimeDomainData(array: any): void; -} - -declare var AnalyserNode: { - prototype: AnalyserNode; - new(): AnalyserNode; -} - -interface AnimationEvent extends Event { - animationName: string; - elapsedTime: number; - initAnimationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, animationNameArg: string, elapsedTimeArg: number): void; -} - -declare var AnimationEvent: { - prototype: AnimationEvent; - new(): AnimationEvent; -} - -interface ApplicationCache extends EventTarget { - oncached: (ev: Event) => any; - onchecking: (ev: Event) => any; - ondownloading: (ev: Event) => any; - onerror: (ev: Event) => any; - onnoupdate: (ev: Event) => any; - onobsolete: (ev: Event) => any; - onprogress: (ev: ProgressEvent) => any; - onupdateready: (ev: Event) => any; - status: number; - abort(): void; - swapCache(): void; - update(): void; - CHECKING: number; - DOWNLOADING: number; - IDLE: number; - OBSOLETE: number; - UNCACHED: number; - UPDATEREADY: number; - addEventListener(type: "cached", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "checking", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "downloading", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: "noupdate", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "obsolete", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void; - addEventListener(type: "updateready", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var ApplicationCache: { - prototype: ApplicationCache; - new(): ApplicationCache; - CHECKING: number; - DOWNLOADING: number; - IDLE: number; - OBSOLETE: number; - UNCACHED: number; - UPDATEREADY: number; -} - -interface AriaRequestEvent extends Event { - attributeName: string; - attributeValue: string; -} - -declare var AriaRequestEvent: { - prototype: AriaRequestEvent; - new(type: string, eventInitDict?: AriaRequestEventInit): AriaRequestEvent; -} - -interface Attr extends Node { - name: string; - ownerElement: Element; - specified: boolean; - value: string; -} - -declare var Attr: { - prototype: Attr; - new(): Attr; -} - -interface AudioBuffer { - duration: number; - length: number; - numberOfChannels: number; - sampleRate: number; - getChannelData(channel: number): any; -} - -declare var AudioBuffer: { - prototype: AudioBuffer; - new(): AudioBuffer; -} - -interface AudioBufferSourceNode extends AudioNode { - buffer: AudioBuffer; - loop: boolean; - loopEnd: number; - loopStart: number; - onended: (ev: Event) => any; - playbackRate: AudioParam; - start(when?: number, offset?: number, duration?: number): void; - stop(when?: number): void; - addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var AudioBufferSourceNode: { - prototype: AudioBufferSourceNode; - new(): AudioBufferSourceNode; -} - -interface AudioContext extends EventTarget { - currentTime: number; - destination: AudioDestinationNode; - listener: AudioListener; - sampleRate: number; - createAnalyser(): AnalyserNode; - createBiquadFilter(): BiquadFilterNode; - createBuffer(numberOfChannels: number, length: number, sampleRate: number): AudioBuffer; - createBufferSource(): AudioBufferSourceNode; - createChannelMerger(numberOfInputs?: number): ChannelMergerNode; - createChannelSplitter(numberOfOutputs?: number): ChannelSplitterNode; - createConvolver(): ConvolverNode; - createDelay(maxDelayTime?: number): DelayNode; - createDynamicsCompressor(): DynamicsCompressorNode; - createGain(): GainNode; - createMediaElementSource(mediaElement: HTMLMediaElement): MediaElementAudioSourceNode; - createOscillator(): OscillatorNode; - createPanner(): PannerNode; - createPeriodicWave(real: any, imag: any): PeriodicWave; - createScriptProcessor(bufferSize?: number, numberOfInputChannels?: number, numberOfOutputChannels?: number): ScriptProcessorNode; - createStereoPanner(): StereoPannerNode; - createWaveShaper(): WaveShaperNode; - decodeAudioData(audioData: ArrayBuffer, successCallback: DecodeSuccessCallback, errorCallback?: DecodeErrorCallback): void; -} - -declare var AudioContext: { - prototype: AudioContext; - new(): AudioContext; -} - -interface AudioDestinationNode extends AudioNode { - maxChannelCount: number; -} - -declare var AudioDestinationNode: { - prototype: AudioDestinationNode; - new(): AudioDestinationNode; -} - -interface AudioListener { - dopplerFactor: number; - speedOfSound: number; - setOrientation(x: number, y: number, z: number, xUp: number, yUp: number, zUp: number): void; - setPosition(x: number, y: number, z: number): void; - setVelocity(x: number, y: number, z: number): void; -} - -declare var AudioListener: { - prototype: AudioListener; - new(): AudioListener; -} - -interface AudioNode extends EventTarget { - channelCount: number; - channelCountMode: string; - channelInterpretation: string; - context: AudioContext; - numberOfInputs: number; - numberOfOutputs: number; - connect(destination: AudioNode, output?: number, input?: number): void; - disconnect(output?: number): void; -} - -declare var AudioNode: { - prototype: AudioNode; - new(): AudioNode; -} - -interface AudioParam { - defaultValue: number; - value: number; - cancelScheduledValues(startTime: number): void; - exponentialRampToValueAtTime(value: number, endTime: number): void; - linearRampToValueAtTime(value: number, endTime: number): void; - setTargetAtTime(target: number, startTime: number, timeConstant: number): void; - setValueAtTime(value: number, startTime: number): void; - setValueCurveAtTime(values: any, startTime: number, duration: number): void; -} - -declare var AudioParam: { - prototype: AudioParam; - new(): AudioParam; -} - -interface AudioProcessingEvent extends Event { - inputBuffer: AudioBuffer; - outputBuffer: AudioBuffer; - playbackTime: number; -} - -declare var AudioProcessingEvent: { - prototype: AudioProcessingEvent; - new(): AudioProcessingEvent; -} - -interface AudioTrack { - enabled: boolean; - id: string; - kind: string; - label: string; - language: string; - sourceBuffer: SourceBuffer; -} - -declare var AudioTrack: { - prototype: AudioTrack; - new(): AudioTrack; -} - -interface AudioTrackList extends EventTarget { - length: number; - onaddtrack: (ev: TrackEvent) => any; - onchange: (ev: Event) => any; - onremovetrack: (ev: TrackEvent) => any; - getTrackById(id: string): AudioTrack; - item(index: number): AudioTrack; - addEventListener(type: "addtrack", listener: (ev: TrackEvent) => any, useCapture?: boolean): void; - addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "removetrack", listener: (ev: TrackEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - [index: number]: AudioTrack; -} - -declare var AudioTrackList: { - prototype: AudioTrackList; - new(): AudioTrackList; -} - -interface BarProp { - visible: boolean; -} - -declare var BarProp: { - prototype: BarProp; - new(): BarProp; -} - -interface BeforeUnloadEvent extends Event { - returnValue: any; -} - -declare var BeforeUnloadEvent: { - prototype: BeforeUnloadEvent; - new(): BeforeUnloadEvent; -} - -interface BiquadFilterNode extends AudioNode { - Q: AudioParam; - detune: AudioParam; - frequency: AudioParam; - gain: AudioParam; - type: string; - getFrequencyResponse(frequencyHz: any, magResponse: any, phaseResponse: any): void; -} - -declare var BiquadFilterNode: { - prototype: BiquadFilterNode; - new(): BiquadFilterNode; -} - -interface Blob { - size: number; - type: string; - msClose(): void; - msDetachStream(): any; - slice(start?: number, end?: number, contentType?: string): Blob; -} - -declare var Blob: { - prototype: Blob; - new (blobParts?: any[], options?: BlobPropertyBag): Blob; -} - -interface CDATASection extends Text { -} - -declare var CDATASection: { - prototype: CDATASection; - new(): CDATASection; -} - -interface CSS { - supports(property: string, value?: string): boolean; -} -declare var CSS: CSS; - -interface CSSConditionRule extends CSSGroupingRule { - conditionText: string; -} - -declare var CSSConditionRule: { - prototype: CSSConditionRule; - new(): CSSConditionRule; -} - -interface CSSFontFaceRule extends CSSRule { - style: CSSStyleDeclaration; -} - -declare var CSSFontFaceRule: { - prototype: CSSFontFaceRule; - new(): CSSFontFaceRule; -} - -interface CSSGroupingRule extends CSSRule { - cssRules: CSSRuleList; - deleteRule(index?: number): void; - insertRule(rule: string, index?: number): number; -} - -declare var CSSGroupingRule: { - prototype: CSSGroupingRule; - new(): CSSGroupingRule; -} - -interface CSSImportRule extends CSSRule { - href: string; - media: MediaList; - styleSheet: CSSStyleSheet; -} - -declare var CSSImportRule: { - prototype: CSSImportRule; - new(): CSSImportRule; -} - -interface CSSKeyframeRule extends CSSRule { - keyText: string; - style: CSSStyleDeclaration; -} - -declare var CSSKeyframeRule: { - prototype: CSSKeyframeRule; - new(): CSSKeyframeRule; -} - -interface CSSKeyframesRule extends CSSRule { - cssRules: CSSRuleList; - name: string; - appendRule(rule: string): void; - deleteRule(rule: string): void; - findRule(rule: string): CSSKeyframeRule; -} - -declare var CSSKeyframesRule: { - prototype: CSSKeyframesRule; - new(): CSSKeyframesRule; -} - -interface CSSMediaRule extends CSSConditionRule { - media: MediaList; -} - -declare var CSSMediaRule: { - prototype: CSSMediaRule; - new(): CSSMediaRule; -} - -interface CSSNamespaceRule extends CSSRule { - namespaceURI: string; - prefix: string; -} - -declare var CSSNamespaceRule: { - prototype: CSSNamespaceRule; - new(): CSSNamespaceRule; -} - -interface CSSPageRule extends CSSRule { - pseudoClass: string; - selector: string; - selectorText: string; - style: CSSStyleDeclaration; -} - -declare var CSSPageRule: { - prototype: CSSPageRule; - new(): CSSPageRule; -} - -interface CSSRule { - cssText: string; - parentRule: CSSRule; - parentStyleSheet: CSSStyleSheet; - type: number; - CHARSET_RULE: number; - FONT_FACE_RULE: number; - IMPORT_RULE: number; - KEYFRAMES_RULE: number; - KEYFRAME_RULE: number; - MEDIA_RULE: number; - NAMESPACE_RULE: number; - PAGE_RULE: number; - STYLE_RULE: number; - SUPPORTS_RULE: number; - UNKNOWN_RULE: number; - VIEWPORT_RULE: number; -} - -declare var CSSRule: { - prototype: CSSRule; - new(): CSSRule; - CHARSET_RULE: number; - FONT_FACE_RULE: number; - IMPORT_RULE: number; - KEYFRAMES_RULE: number; - KEYFRAME_RULE: number; - MEDIA_RULE: number; - NAMESPACE_RULE: number; - PAGE_RULE: number; - STYLE_RULE: number; - SUPPORTS_RULE: number; - UNKNOWN_RULE: number; - VIEWPORT_RULE: number; -} - -interface CSSRuleList { - length: number; - item(index: number): CSSRule; - [index: number]: CSSRule; -} - -declare var CSSRuleList: { - prototype: CSSRuleList; - new(): CSSRuleList; -} - -interface CSSStyleDeclaration { - alignContent: string; - alignItems: string; - alignSelf: string; - alignmentBaseline: string; - animation: string; - animationDelay: string; - animationDirection: string; - animationDuration: string; - animationFillMode: string; - animationIterationCount: string; - animationName: string; - animationPlayState: string; - animationTimingFunction: string; - backfaceVisibility: string; - background: string; - backgroundAttachment: string; - backgroundClip: string; - backgroundColor: string; - backgroundImage: string; - backgroundOrigin: string; - backgroundPosition: string; - backgroundPositionX: string; - backgroundPositionY: string; - backgroundRepeat: string; - backgroundSize: string; - baselineShift: string; - border: string; - borderBottom: string; - borderBottomColor: string; - borderBottomLeftRadius: string; - borderBottomRightRadius: string; - borderBottomStyle: string; - borderBottomWidth: string; - borderCollapse: string; - borderColor: string; - borderImage: string; - borderImageOutset: string; - borderImageRepeat: string; - borderImageSlice: string; - borderImageSource: string; - borderImageWidth: string; - borderLeft: string; - borderLeftColor: string; - borderLeftStyle: string; - borderLeftWidth: string; - borderRadius: string; - borderRight: string; - borderRightColor: string; - borderRightStyle: string; - borderRightWidth: string; - borderSpacing: string; - borderStyle: string; - borderTop: string; - borderTopColor: string; - borderTopLeftRadius: string; - borderTopRightRadius: string; - borderTopStyle: string; - borderTopWidth: string; - borderWidth: string; - bottom: string; - boxShadow: string; - boxSizing: string; - breakAfter: string; - breakBefore: string; - breakInside: string; - captionSide: string; - clear: string; - clip: string; - clipPath: string; - clipRule: string; - color: string; - colorInterpolationFilters: string; - columnCount: any; - columnFill: string; - columnGap: any; - columnRule: string; - columnRuleColor: any; - columnRuleStyle: string; - columnRuleWidth: any; - columnSpan: string; - columnWidth: any; - columns: string; - content: string; - counterIncrement: string; - counterReset: string; - cssFloat: string; - cssText: string; - cursor: string; - direction: string; - display: string; - dominantBaseline: string; - emptyCells: string; - enableBackground: string; - fill: string; - fillOpacity: string; - fillRule: string; - filter: string; - flex: string; - flexBasis: string; - flexDirection: string; - flexFlow: string; - flexGrow: string; - flexShrink: string; - flexWrap: string; - floodColor: string; - floodOpacity: string; - font: string; - fontFamily: string; - fontFeatureSettings: string; - fontSize: string; - fontSizeAdjust: string; - fontStretch: string; - fontStyle: string; - fontVariant: string; - fontWeight: string; - glyphOrientationHorizontal: string; - glyphOrientationVertical: string; - height: string; - imeMode: string; - justifyContent: string; - kerning: string; - left: string; - length: number; - letterSpacing: string; - lightingColor: string; - lineHeight: string; - listStyle: string; - listStyleImage: string; - listStylePosition: string; - listStyleType: string; - margin: string; - marginBottom: string; - marginLeft: string; - marginRight: string; - marginTop: string; - marker: string; - markerEnd: string; - markerMid: string; - markerStart: string; - mask: string; - maxHeight: string; - maxWidth: string; - minHeight: string; - minWidth: string; - msContentZoomChaining: string; - msContentZoomLimit: string; - msContentZoomLimitMax: any; - msContentZoomLimitMin: any; - msContentZoomSnap: string; - msContentZoomSnapPoints: string; - msContentZoomSnapType: string; - msContentZooming: string; - msFlowFrom: string; - msFlowInto: string; - msFontFeatureSettings: string; - msGridColumn: any; - msGridColumnAlign: string; - msGridColumnSpan: any; - msGridColumns: string; - msGridRow: any; - msGridRowAlign: string; - msGridRowSpan: any; - msGridRows: string; - msHighContrastAdjust: string; - msHyphenateLimitChars: string; - msHyphenateLimitLines: any; - msHyphenateLimitZone: any; - msHyphens: string; - msImeAlign: string; - msOverflowStyle: string; - msScrollChaining: string; - msScrollLimit: string; - msScrollLimitXMax: any; - msScrollLimitXMin: any; - msScrollLimitYMax: any; - msScrollLimitYMin: any; - msScrollRails: string; - msScrollSnapPointsX: string; - msScrollSnapPointsY: string; - msScrollSnapType: string; - msScrollSnapX: string; - msScrollSnapY: string; - msScrollTranslation: string; - msTextCombineHorizontal: string; - msTextSizeAdjust: any; - msTouchAction: string; - msTouchSelect: string; - msUserSelect: string; - msWrapFlow: string; - msWrapMargin: any; - msWrapThrough: string; - opacity: string; - order: string; - orphans: string; - outline: string; - outlineColor: string; - outlineStyle: string; - outlineWidth: string; - overflow: string; - overflowX: string; - overflowY: string; - padding: string; - paddingBottom: string; - paddingLeft: string; - paddingRight: string; - paddingTop: string; - pageBreakAfter: string; - pageBreakBefore: string; - pageBreakInside: string; - parentRule: CSSRule; - perspective: string; - perspectiveOrigin: string; - pointerEvents: string; - position: string; - quotes: string; - right: string; - rubyAlign: string; - rubyOverhang: string; - rubyPosition: string; - stopColor: string; - stopOpacity: string; - stroke: string; - strokeDasharray: string; - strokeDashoffset: string; - strokeLinecap: string; - strokeLinejoin: string; - strokeMiterlimit: string; - strokeOpacity: string; - strokeWidth: string; - tableLayout: string; - textAlign: string; - textAlignLast: string; - textAnchor: string; - textDecoration: string; - textFillColor: string; - textIndent: string; - textJustify: string; - textKashida: string; - textKashidaSpace: string; - textOverflow: string; - textShadow: string; - textTransform: string; - textUnderlinePosition: string; - top: string; - touchAction: string; - transform: string; - transformOrigin: string; - transformStyle: string; - transition: string; - transitionDelay: string; - transitionDuration: string; - transitionProperty: string; - transitionTimingFunction: string; - unicodeBidi: string; - verticalAlign: string; - visibility: string; - webkitAlignContent: string; - webkitAlignItems: string; - webkitAlignSelf: string; - webkitAnimation: string; - webkitAnimationDelay: string; - webkitAnimationDirection: string; - webkitAnimationDuration: string; - webkitAnimationFillMode: string; - webkitAnimationIterationCount: string; - webkitAnimationName: string; - webkitAnimationPlayState: string; - webkitAnimationTimingFunction: string; - webkitAppearance: string; - webkitBackfaceVisibility: string; - webkitBackground: string; - webkitBackgroundAttachment: string; - webkitBackgroundClip: string; - webkitBackgroundColor: string; - webkitBackgroundImage: string; - webkitBackgroundOrigin: string; - webkitBackgroundPosition: string; - webkitBackgroundPositionX: string; - webkitBackgroundPositionY: string; - webkitBackgroundRepeat: string; - webkitBackgroundSize: string; - webkitBorderBottomLeftRadius: string; - webkitBorderBottomRightRadius: string; - webkitBorderImage: string; - webkitBorderImageOutset: string; - webkitBorderImageRepeat: string; - webkitBorderImageSlice: string; - webkitBorderImageSource: string; - webkitBorderImageWidth: string; - webkitBorderRadius: string; - webkitBorderTopLeftRadius: string; - webkitBorderTopRightRadius: string; - webkitBoxAlign: string; - webkitBoxDirection: string; - webkitBoxFlex: string; - webkitBoxOrdinalGroup: string; - webkitBoxOrient: string; - webkitBoxPack: string; - webkitBoxSizing: string; - webkitColumnBreakAfter: string; - webkitColumnBreakBefore: string; - webkitColumnBreakInside: string; - webkitColumnCount: any; - webkitColumnGap: any; - webkitColumnRule: string; - webkitColumnRuleColor: any; - webkitColumnRuleStyle: string; - webkitColumnRuleWidth: any; - webkitColumnSpan: string; - webkitColumnWidth: any; - webkitColumns: string; - webkitFilter: string; - webkitFlex: string; - webkitFlexBasis: string; - webkitFlexDirection: string; - webkitFlexFlow: string; - webkitFlexGrow: string; - webkitFlexShrink: string; - webkitFlexWrap: string; - webkitJustifyContent: string; - webkitOrder: string; - webkitPerspective: string; - webkitPerspectiveOrigin: string; - webkitTapHighlightColor: string; - webkitTextFillColor: string; - webkitTextSizeAdjust: any; - webkitTransform: string; - webkitTransformOrigin: string; - webkitTransformStyle: string; - webkitTransition: string; - webkitTransitionDelay: string; - webkitTransitionDuration: string; - webkitTransitionProperty: string; - webkitTransitionTimingFunction: string; - webkitUserSelect: string; - webkitWritingMode: string; - whiteSpace: string; - widows: string; - width: string; - wordBreak: string; - wordSpacing: string; - wordWrap: string; - writingMode: string; - zIndex: string; - zoom: string; - getPropertyPriority(propertyName: string): string; - getPropertyValue(propertyName: string): string; - item(index: number): string; - removeProperty(propertyName: string): string; - setProperty(propertyName: string, value: string, priority?: string): void; - [index: number]: string; -} - -declare var CSSStyleDeclaration: { - prototype: CSSStyleDeclaration; - new(): CSSStyleDeclaration; -} - -interface CSSStyleRule extends CSSRule { - readOnly: boolean; - selectorText: string; - style: CSSStyleDeclaration; -} - -declare var CSSStyleRule: { - prototype: CSSStyleRule; - new(): CSSStyleRule; -} - -interface CSSStyleSheet extends StyleSheet { - cssRules: CSSRuleList; - cssText: string; - href: string; - id: string; - imports: StyleSheetList; - isAlternate: boolean; - isPrefAlternate: boolean; - ownerRule: CSSRule; - owningElement: Element; - pages: StyleSheetPageList; - readOnly: boolean; - rules: CSSRuleList; - addImport(bstrURL: string, lIndex?: number): number; - addPageRule(bstrSelector: string, bstrStyle: string, lIndex?: number): number; - addRule(bstrSelector: string, bstrStyle?: string, lIndex?: number): number; - deleteRule(index?: number): void; - insertRule(rule: string, index?: number): number; - removeImport(lIndex: number): void; - removeRule(lIndex: number): void; -} - -declare var CSSStyleSheet: { - prototype: CSSStyleSheet; - new(): CSSStyleSheet; -} - -interface CSSSupportsRule extends CSSConditionRule { -} - -declare var CSSSupportsRule: { - prototype: CSSSupportsRule; - new(): CSSSupportsRule; -} - -interface CanvasGradient { - addColorStop(offset: number, color: string): void; -} - -declare var CanvasGradient: { - prototype: CanvasGradient; - new(): CanvasGradient; -} - -interface CanvasPattern { -} - -declare var CanvasPattern: { - prototype: CanvasPattern; - new(): CanvasPattern; -} - -interface CanvasRenderingContext2D { - canvas: HTMLCanvasElement; - fillStyle: any; - font: string; - globalAlpha: number; - globalCompositeOperation: string; - lineCap: string; - lineDashOffset: number; - lineJoin: string; - lineWidth: number; - miterLimit: number; - msFillRule: string; - msImageSmoothingEnabled: boolean; - shadowBlur: number; - shadowColor: string; - shadowOffsetX: number; - shadowOffsetY: number; - strokeStyle: any; - textAlign: string; - textBaseline: string; - arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void; - arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void; - beginPath(): void; - bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void; - clearRect(x: number, y: number, w: number, h: number): void; - clip(fillRule?: string): void; - closePath(): void; - createImageData(imageDataOrSw: number, sh?: number): ImageData; - createImageData(imageDataOrSw: ImageData, sh?: number): ImageData; - createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient; - createPattern(image: HTMLImageElement, repetition: string): CanvasPattern; - createPattern(image: HTMLCanvasElement, repetition: string): CanvasPattern; - createPattern(image: HTMLVideoElement, repetition: string): CanvasPattern; - createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient; - drawImage(image: HTMLImageElement, offsetX: number, offsetY: number, width?: number, height?: number, canvasOffsetX?: number, canvasOffsetY?: number, canvasImageWidth?: number, canvasImageHeight?: number): void; - drawImage(image: HTMLCanvasElement, offsetX: number, offsetY: number, width?: number, height?: number, canvasOffsetX?: number, canvasOffsetY?: number, canvasImageWidth?: number, canvasImageHeight?: number): void; - drawImage(image: HTMLVideoElement, offsetX: number, offsetY: number, width?: number, height?: number, canvasOffsetX?: number, canvasOffsetY?: number, canvasImageWidth?: number, canvasImageHeight?: number): void; - fill(fillRule?: string): void; - fillRect(x: number, y: number, w: number, h: number): void; - fillText(text: string, x: number, y: number, maxWidth?: number): void; - getImageData(sx: number, sy: number, sw: number, sh: number): ImageData; - getLineDash(): number[]; - isPointInPath(x: number, y: number, fillRule?: string): boolean; - lineTo(x: number, y: number): void; - measureText(text: string): TextMetrics; - moveTo(x: number, y: number): void; - putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX?: number, dirtyY?: number, dirtyWidth?: number, dirtyHeight?: number): void; - quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void; - rect(x: number, y: number, w: number, h: number): void; - restore(): void; - rotate(angle: number): void; - save(): void; - scale(x: number, y: number): void; - setLineDash(segments: number[]): void; - setTransform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void; - stroke(): void; - strokeRect(x: number, y: number, w: number, h: number): void; - strokeText(text: string, x: number, y: number, maxWidth?: number): void; - transform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void; - translate(x: number, y: number): void; -} - -declare var CanvasRenderingContext2D: { - prototype: CanvasRenderingContext2D; - new(): CanvasRenderingContext2D; -} - -interface ChannelMergerNode extends AudioNode { -} - -declare var ChannelMergerNode: { - prototype: ChannelMergerNode; - new(): ChannelMergerNode; -} - -interface ChannelSplitterNode extends AudioNode { -} - -declare var ChannelSplitterNode: { - prototype: ChannelSplitterNode; - new(): ChannelSplitterNode; -} - -interface CharacterData extends Node, ChildNode { - data: string; - length: number; - appendData(arg: string): void; - deleteData(offset: number, count: number): void; - insertData(offset: number, arg: string): void; - replaceData(offset: number, count: number, arg: string): void; - substringData(offset: number, count: number): string; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var CharacterData: { - prototype: CharacterData; - new(): CharacterData; -} - -interface ClientRect { - bottom: number; - height: number; - left: number; - right: number; - top: number; - width: number; -} - -declare var ClientRect: { - prototype: ClientRect; - new(): ClientRect; -} - -interface ClientRectList { - length: number; - item(index: number): ClientRect; - [index: number]: ClientRect; -} - -declare var ClientRectList: { - prototype: ClientRectList; - new(): ClientRectList; -} - -interface ClipboardEvent extends Event { - clipboardData: DataTransfer; -} - -declare var ClipboardEvent: { - prototype: ClipboardEvent; - new(type: string, eventInitDict?: ClipboardEventInit): ClipboardEvent; -} - -interface CloseEvent extends Event { - code: number; - reason: string; - wasClean: boolean; - initCloseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, wasCleanArg: boolean, codeArg: number, reasonArg: string): void; -} - -declare var CloseEvent: { - prototype: CloseEvent; - new(): CloseEvent; -} - -interface CommandEvent extends Event { - commandName: string; - detail: string; -} - -declare var CommandEvent: { - prototype: CommandEvent; - new(type: string, eventInitDict?: CommandEventInit): CommandEvent; -} - -interface Comment extends CharacterData { - text: string; -} - -declare var Comment: { - prototype: Comment; - new(): Comment; -} - -interface CompositionEvent extends UIEvent { - data: string; - locale: string; - initCompositionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, locale: string): void; -} - -declare var CompositionEvent: { - prototype: CompositionEvent; - new(typeArg: string, eventInitDict?: CompositionEventInit): CompositionEvent; -} - -interface Console { - assert(test?: boolean, message?: string, ...optionalParams: any[]): void; - clear(): void; - count(countTitle?: string): void; - debug(message?: string, ...optionalParams: any[]): void; - dir(value?: any, ...optionalParams: any[]): void; - dirxml(value: any): void; - error(message?: any, ...optionalParams: any[]): void; - group(groupTitle?: string): void; - groupCollapsed(groupTitle?: string): void; - groupEnd(): void; - info(message?: any, ...optionalParams: any[]): void; - log(message?: any, ...optionalParams: any[]): void; - msIsIndependentlyComposed(element: Element): boolean; - profile(reportName?: string): void; - profileEnd(): void; - select(element: Element): void; - time(timerName?: string): void; - timeEnd(timerName?: string): void; - trace(): void; - warn(message?: any, ...optionalParams: any[]): void; -} - -declare var Console: { - prototype: Console; - new(): Console; -} - -interface ConvolverNode extends AudioNode { - buffer: AudioBuffer; - normalize: boolean; -} - -declare var ConvolverNode: { - prototype: ConvolverNode; - new(): ConvolverNode; -} - -interface Coordinates { - accuracy: number; - altitude: number; - altitudeAccuracy: number; - heading: number; - latitude: number; - longitude: number; - speed: number; -} - -declare var Coordinates: { - prototype: Coordinates; - new(): Coordinates; -} - -interface Crypto extends Object, RandomSource { - subtle: SubtleCrypto; -} - -declare var Crypto: { - prototype: Crypto; - new(): Crypto; -} - -interface CryptoKey { - algorithm: KeyAlgorithm; - extractable: boolean; - type: string; - usages: string[]; -} - -declare var CryptoKey: { - prototype: CryptoKey; - new(): CryptoKey; -} - -interface CryptoKeyPair { - privateKey: CryptoKey; - publicKey: CryptoKey; -} - -declare var CryptoKeyPair: { - prototype: CryptoKeyPair; - new(): CryptoKeyPair; -} - -interface CustomEvent extends Event { - detail: any; - initCustomEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, detailArg: any): void; -} - -declare var CustomEvent: { - prototype: CustomEvent; - new(typeArg: string, eventInitDict?: CustomEventInit): CustomEvent; -} - -interface DOMError { - name: string; - toString(): string; -} - -declare var DOMError: { - prototype: DOMError; - new(): DOMError; -} - -interface DOMException { - code: number; - message: string; - name: string; - toString(): string; - ABORT_ERR: number; - DATA_CLONE_ERR: number; - DOMSTRING_SIZE_ERR: number; - HIERARCHY_REQUEST_ERR: number; - INDEX_SIZE_ERR: number; - INUSE_ATTRIBUTE_ERR: number; - INVALID_ACCESS_ERR: number; - INVALID_CHARACTER_ERR: number; - INVALID_MODIFICATION_ERR: number; - INVALID_NODE_TYPE_ERR: number; - INVALID_STATE_ERR: number; - NAMESPACE_ERR: number; - NETWORK_ERR: number; - NOT_FOUND_ERR: number; - NOT_SUPPORTED_ERR: number; - NO_DATA_ALLOWED_ERR: number; - NO_MODIFICATION_ALLOWED_ERR: number; - PARSE_ERR: number; - QUOTA_EXCEEDED_ERR: number; - SECURITY_ERR: number; - SERIALIZE_ERR: number; - SYNTAX_ERR: number; - TIMEOUT_ERR: number; - TYPE_MISMATCH_ERR: number; - URL_MISMATCH_ERR: number; - VALIDATION_ERR: number; - WRONG_DOCUMENT_ERR: number; -} - -declare var DOMException: { - prototype: DOMException; - new(): DOMException; - ABORT_ERR: number; - DATA_CLONE_ERR: number; - DOMSTRING_SIZE_ERR: number; - HIERARCHY_REQUEST_ERR: number; - INDEX_SIZE_ERR: number; - INUSE_ATTRIBUTE_ERR: number; - INVALID_ACCESS_ERR: number; - INVALID_CHARACTER_ERR: number; - INVALID_MODIFICATION_ERR: number; - INVALID_NODE_TYPE_ERR: number; - INVALID_STATE_ERR: number; - NAMESPACE_ERR: number; - NETWORK_ERR: number; - NOT_FOUND_ERR: number; - NOT_SUPPORTED_ERR: number; - NO_DATA_ALLOWED_ERR: number; - NO_MODIFICATION_ALLOWED_ERR: number; - PARSE_ERR: number; - QUOTA_EXCEEDED_ERR: number; - SECURITY_ERR: number; - SERIALIZE_ERR: number; - SYNTAX_ERR: number; - TIMEOUT_ERR: number; - TYPE_MISMATCH_ERR: number; - URL_MISMATCH_ERR: number; - VALIDATION_ERR: number; - WRONG_DOCUMENT_ERR: number; -} - -interface DOMImplementation { - createDocument(namespaceURI: string, qualifiedName: string, doctype: DocumentType): Document; - createDocumentType(qualifiedName: string, publicId: string, systemId: string): DocumentType; - createHTMLDocument(title: string): Document; - hasFeature(feature: string, version: string): boolean; -} - -declare var DOMImplementation: { - prototype: DOMImplementation; - new(): DOMImplementation; -} - -interface DOMParser { - parseFromString(source: string, mimeType: string): Document; -} - -declare var DOMParser: { - prototype: DOMParser; - new(): DOMParser; -} - -interface DOMSettableTokenList extends DOMTokenList { - value: string; -} - -declare var DOMSettableTokenList: { - prototype: DOMSettableTokenList; - new(): DOMSettableTokenList; -} - -interface DOMStringList { - length: number; - contains(str: string): boolean; - item(index: number): string; - [index: number]: string; -} - -declare var DOMStringList: { - prototype: DOMStringList; - new(): DOMStringList; -} - -interface DOMStringMap { - [name: string]: string; -} - -declare var DOMStringMap: { - prototype: DOMStringMap; - new(): DOMStringMap; -} - -interface DOMTokenList { - length: number; - add(...token: string[]): void; - contains(token: string): boolean; - item(index: number): string; - remove(...token: string[]): void; - toString(): string; - toggle(token: string, force?: boolean): boolean; - [index: number]: string; -} - -declare var DOMTokenList: { - prototype: DOMTokenList; - new(): DOMTokenList; -} - -interface DataCue extends TextTrackCue { - data: ArrayBuffer; -} - -declare var DataCue: { - prototype: DataCue; - new(): DataCue; -} - -interface DataTransfer { - dropEffect: string; - effectAllowed: string; - files: FileList; - items: DataTransferItemList; - types: DOMStringList; - clearData(format?: string): boolean; - getData(format: string): string; - setData(format: string, data: string): boolean; -} - -declare var DataTransfer: { - prototype: DataTransfer; - new(): DataTransfer; -} - -interface DataTransferItem { - kind: string; - type: string; - getAsFile(): File; - getAsString(_callback: FunctionStringCallback): void; -} - -declare var DataTransferItem: { - prototype: DataTransferItem; - new(): DataTransferItem; -} - -interface DataTransferItemList { - length: number; - add(data: File): DataTransferItem; - clear(): void; - item(index: number): File; - remove(index: number): void; - [index: number]: File; -} - -declare var DataTransferItemList: { - prototype: DataTransferItemList; - new(): DataTransferItemList; -} - -interface DeferredPermissionRequest { - id: number; - type: string; - uri: string; - allow(): void; - deny(): void; -} - -declare var DeferredPermissionRequest: { - prototype: DeferredPermissionRequest; - new(): DeferredPermissionRequest; -} - -interface DelayNode extends AudioNode { - delayTime: AudioParam; -} - -declare var DelayNode: { - prototype: DelayNode; - new(): DelayNode; -} - -interface DeviceAcceleration { - x: number; - y: number; - z: number; -} - -declare var DeviceAcceleration: { - prototype: DeviceAcceleration; - new(): DeviceAcceleration; -} - -interface DeviceMotionEvent extends Event { - acceleration: DeviceAcceleration; - accelerationIncludingGravity: DeviceAcceleration; - interval: number; - rotationRate: DeviceRotationRate; - initDeviceMotionEvent(type: string, bubbles: boolean, cancelable: boolean, acceleration: DeviceAccelerationDict, accelerationIncludingGravity: DeviceAccelerationDict, rotationRate: DeviceRotationRateDict, interval: number): void; -} - -declare var DeviceMotionEvent: { - prototype: DeviceMotionEvent; - new(): DeviceMotionEvent; -} - -interface DeviceOrientationEvent extends Event { - absolute: boolean; - alpha: number; - beta: number; - gamma: number; - initDeviceOrientationEvent(type: string, bubbles: boolean, cancelable: boolean, alpha: number, beta: number, gamma: number, absolute: boolean): void; -} - -declare var DeviceOrientationEvent: { - prototype: DeviceOrientationEvent; - new(): DeviceOrientationEvent; -} - -interface DeviceRotationRate { - alpha: number; - beta: number; - gamma: number; -} - -declare var DeviceRotationRate: { - prototype: DeviceRotationRate; - new(): DeviceRotationRate; -} - -interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEvent { - /** - * Sets or gets the URL for the current document. - */ - URL: string; - /** - * Gets the URL for the document, stripped of any character encoding. - */ - URLUnencoded: string; - /** - * Gets the object that has the focus when the parent document has focus. - */ - activeElement: Element; - /** - * Sets or gets the color of all active links in the document. - */ - alinkColor: string; - /** - * Returns a reference to the collection of elements contained by the object. - */ - all: HTMLCollection; - /** - * Retrieves a collection of all a objects that have a name and/or id property. Objects in this collection are in HTML source order. - */ - anchors: HTMLCollection; - /** - * Retrieves a collection of all applet objects in the document. - */ - applets: HTMLCollection; - /** - * Deprecated. Sets or retrieves a value that indicates the background color behind the object. - */ - bgColor: string; - /** - * Specifies the beginning and end of the document body. - */ - body: HTMLElement; - characterSet: string; - /** - * Gets or sets the character set used to encode the object. - */ - charset: string; - /** - * Gets a value that indicates whether standards-compliant mode is switched on for the object. - */ - compatMode: string; - cookie: string; - /** - * Gets the default character set from the current regional language settings. - */ - defaultCharset: string; - defaultView: Window; - /** - * Sets or gets a value that indicates whether the document can be edited. - */ - designMode: string; - /** - * Sets or retrieves a value that indicates the reading order of the object. - */ - dir: string; - /** - * Gets an object representing the document type declaration associated with the current document. - */ - doctype: DocumentType; - /** - * Gets a reference to the root node of the document. - */ - documentElement: HTMLElement; - /** - * Sets or gets the security domain of the document. - */ - domain: string; - /** - * Retrieves a collection of all embed objects in the document. - */ - embeds: HTMLCollection; - /** - * Sets or gets the foreground (text) color of the document. - */ - fgColor: string; - /** - * Retrieves a collection, in source order, of all form objects in the document. - */ - forms: HTMLCollection; - fullscreenElement: Element; - fullscreenEnabled: boolean; - head: HTMLHeadElement; - hidden: boolean; - /** - * Retrieves a collection, in source order, of img objects in the document. - */ - images: HTMLCollection; - /** - * Gets the implementation object of the current document. - */ - implementation: DOMImplementation; - /** - * Returns the character encoding used to create the webpage that is loaded into the document object. - */ - inputEncoding: string; - /** - * Gets the date that the page was last modified, if the page supplies one. - */ - lastModified: string; - /** - * Sets or gets the color of the document links. - */ - linkColor: string; - /** - * Retrieves a collection of all a objects that specify the href property and all area objects in the document. - */ - links: HTMLCollection; - /** - * Contains information about the current URL. - */ - location: Location; - media: string; - msCSSOMElementFloatMetrics: boolean; - msCapsLockWarningOff: boolean; - msHidden: boolean; - msVisibilityState: string; - /** - * Fires when the user aborts the download. - * @param ev The event. - */ - onabort: (ev: Event) => any; - /** - * Fires when the object is set as the active element. - * @param ev The event. - */ - onactivate: (ev: UIEvent) => any; - /** - * Fires immediately before the object is set as the active element. - * @param ev The event. - */ - onbeforeactivate: (ev: UIEvent) => any; - /** - * Fires immediately before the activeElement is changed from the current object to another object in the parent document. - * @param ev The event. - */ - onbeforedeactivate: (ev: UIEvent) => any; - /** - * Fires when the object loses the input focus. - * @param ev The focus event. - */ - onblur: (ev: FocusEvent) => any; - /** - * Occurs when playback is possible, but would require further buffering. - * @param ev The event. - */ - oncanplay: (ev: Event) => any; - oncanplaythrough: (ev: Event) => any; - /** - * Fires when the contents of the object or selection have changed. - * @param ev The event. - */ - onchange: (ev: Event) => any; - /** - * Fires when the user clicks the left mouse button on the object - * @param ev The mouse event. - */ - onclick: (ev: MouseEvent) => any; - /** - * Fires when the user clicks the right mouse button in the client area, opening the context menu. - * @param ev The mouse event. - */ - oncontextmenu: (ev: PointerEvent) => any; - /** - * Fires when the user double-clicks the object. - * @param ev The mouse event. - */ - ondblclick: (ev: MouseEvent) => any; - /** - * Fires when the activeElement is changed from the current object to another object in the parent document. - * @param ev The UI Event - */ - ondeactivate: (ev: UIEvent) => any; - /** - * Fires on the source object continuously during a drag operation. - * @param ev The event. - */ - ondrag: (ev: DragEvent) => any; - /** - * Fires on the source object when the user releases the mouse at the close of a drag operation. - * @param ev The event. - */ - ondragend: (ev: DragEvent) => any; - /** - * Fires on the target element when the user drags the object to a valid drop target. - * @param ev The drag event. - */ - ondragenter: (ev: DragEvent) => any; - /** - * Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation. - * @param ev The drag event. - */ - ondragleave: (ev: DragEvent) => any; - /** - * Fires on the target element continuously while the user drags the object over a valid drop target. - * @param ev The event. - */ - ondragover: (ev: DragEvent) => any; - /** - * Fires on the source object when the user starts to drag a text selection or selected object. - * @param ev The event. - */ - ondragstart: (ev: DragEvent) => any; - ondrop: (ev: DragEvent) => any; - /** - * Occurs when the duration attribute is updated. - * @param ev The event. - */ - ondurationchange: (ev: Event) => any; - /** - * Occurs when the media element is reset to its initial state. - * @param ev The event. - */ - onemptied: (ev: Event) => any; - /** - * Occurs when the end of playback is reached. - * @param ev The event - */ - onended: (ev: Event) => any; - /** - * Fires when an error occurs during object loading. - * @param ev The event. - */ - onerror: (ev: Event) => any; - /** - * Fires when the object receives focus. - * @param ev The event. - */ - onfocus: (ev: FocusEvent) => any; - onfullscreenchange: (ev: Event) => any; - onfullscreenerror: (ev: Event) => any; - oninput: (ev: Event) => any; - /** - * Fires when the user presses a key. - * @param ev The keyboard event - */ - onkeydown: (ev: KeyboardEvent) => any; - /** - * Fires when the user presses an alphanumeric key. - * @param ev The event. - */ - onkeypress: (ev: KeyboardEvent) => any; - /** - * Fires when the user releases a key. - * @param ev The keyboard event - */ - onkeyup: (ev: KeyboardEvent) => any; - /** - * Fires immediately after the browser loads the object. - * @param ev The event. - */ - onload: (ev: Event) => any; - /** - * Occurs when media data is loaded at the current playback position. - * @param ev The event. - */ - onloadeddata: (ev: Event) => any; - /** - * Occurs when the duration and dimensions of the media have been determined. - * @param ev The event. - */ - onloadedmetadata: (ev: Event) => any; - /** - * Occurs when Internet Explorer begins looking for media data. - * @param ev The event. - */ - onloadstart: (ev: Event) => any; - /** - * Fires when the user clicks the object with either mouse button. - * @param ev The mouse event. - */ - onmousedown: (ev: MouseEvent) => any; - /** - * Fires when the user moves the mouse over the object. - * @param ev The mouse event. - */ - onmousemove: (ev: MouseEvent) => any; - /** - * Fires when the user moves the mouse pointer outside the boundaries of the object. - * @param ev The mouse event. - */ - onmouseout: (ev: MouseEvent) => any; - /** - * Fires when the user moves the mouse pointer into the object. - * @param ev The mouse event. - */ - onmouseover: (ev: MouseEvent) => any; - /** - * Fires when the user releases a mouse button while the mouse is over the object. - * @param ev The mouse event. - */ - onmouseup: (ev: MouseEvent) => any; - /** - * Fires when the wheel button is rotated. - * @param ev The mouse event - */ - onmousewheel: (ev: MouseWheelEvent) => any; - onmscontentzoom: (ev: UIEvent) => any; - onmsgesturechange: (ev: MSGestureEvent) => any; - onmsgesturedoubletap: (ev: MSGestureEvent) => any; - onmsgestureend: (ev: MSGestureEvent) => any; - onmsgesturehold: (ev: MSGestureEvent) => any; - onmsgesturestart: (ev: MSGestureEvent) => any; - onmsgesturetap: (ev: MSGestureEvent) => any; - onmsinertiastart: (ev: MSGestureEvent) => any; - onmsmanipulationstatechanged: (ev: MSManipulationEvent) => any; - onmspointercancel: (ev: MSPointerEvent) => any; - onmspointerdown: (ev: MSPointerEvent) => any; - onmspointerenter: (ev: MSPointerEvent) => any; - onmspointerleave: (ev: MSPointerEvent) => any; - onmspointermove: (ev: MSPointerEvent) => any; - onmspointerout: (ev: MSPointerEvent) => any; - onmspointerover: (ev: MSPointerEvent) => any; - onmspointerup: (ev: MSPointerEvent) => any; - /** - * Occurs when an item is removed from a Jump List of a webpage running in Site Mode. - * @param ev The event. - */ - onmssitemodejumplistitemremoved: (ev: MSSiteModeEvent) => any; - /** - * Occurs when a user clicks a button in a Thumbnail Toolbar of a webpage running in Site Mode. - * @param ev The event. - */ - onmsthumbnailclick: (ev: MSSiteModeEvent) => any; - /** - * Occurs when playback is paused. - * @param ev The event. - */ - onpause: (ev: Event) => any; - /** - * Occurs when the play method is requested. - * @param ev The event. - */ - onplay: (ev: Event) => any; - /** - * Occurs when the audio or video has started playing. - * @param ev The event. - */ - onplaying: (ev: Event) => any; - onpointerlockchange: (ev: Event) => any; - onpointerlockerror: (ev: Event) => any; - /** - * Occurs to indicate progress while downloading media data. - * @param ev The event. - */ - onprogress: (ev: ProgressEvent) => any; - /** - * Occurs when the playback rate is increased or decreased. - * @param ev The event. - */ - onratechange: (ev: Event) => any; - /** - * Fires when the state of the object has changed. - * @param ev The event - */ - onreadystatechange: (ev: ProgressEvent) => any; - /** - * Fires when the user resets a form. - * @param ev The event. - */ - onreset: (ev: Event) => any; - /** - * Fires when the user repositions the scroll box in the scroll bar on the object. - * @param ev The event. - */ - onscroll: (ev: UIEvent) => any; - /** - * Occurs when the seek operation ends. - * @param ev The event. - */ - onseeked: (ev: Event) => any; - /** - * Occurs when the current playback position is moved. - * @param ev The event. - */ - onseeking: (ev: Event) => any; - /** - * Fires when the current selection changes. - * @param ev The event. - */ - onselect: (ev: UIEvent) => any; - onselectstart: (ev: Event) => any; - /** - * Occurs when the download has stopped. - * @param ev The event. - */ - onstalled: (ev: Event) => any; - /** - * Fires when the user clicks the Stop button or leaves the Web page. - * @param ev The event. - */ - onstop: (ev: Event) => any; - onsubmit: (ev: Event) => any; - /** - * Occurs if the load operation has been intentionally halted. - * @param ev The event. - */ - onsuspend: (ev: Event) => any; - /** - * Occurs to indicate the current playback position. - * @param ev The event. - */ - ontimeupdate: (ev: Event) => any; - ontouchcancel: (ev: TouchEvent) => any; - ontouchend: (ev: TouchEvent) => any; - ontouchmove: (ev: TouchEvent) => any; - ontouchstart: (ev: TouchEvent) => any; - /** - * Occurs when the volume is changed, or playback is muted or unmuted. - * @param ev The event. - */ - onvolumechange: (ev: Event) => any; - /** - * Occurs when playback stops because the next frame of a video resource is not available. - * @param ev The event. - */ - onwaiting: (ev: Event) => any; - onwebkitfullscreenchange: (ev: Event) => any; - onwebkitfullscreenerror: (ev: Event) => any; - plugins: HTMLCollection; - pointerLockElement: Element; - /** - * Retrieves a value that indicates the current state of the object. - */ - readyState: string; - /** - * Gets the URL of the location that referred the user to the current page. - */ - referrer: string; - /** - * Gets the root svg element in the document hierarchy. - */ - rootElement: SVGSVGElement; - /** - * Retrieves a collection of all script objects in the document. - */ - scripts: HTMLCollection; - security: string; - /** - * Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document. - */ - styleSheets: StyleSheetList; - /** - * Contains the title of the document. - */ - title: string; - visibilityState: string; - /** - * Sets or gets the color of the links that the user has visited. - */ - vlinkColor: string; - webkitCurrentFullScreenElement: Element; - webkitFullscreenElement: Element; - webkitFullscreenEnabled: boolean; - webkitIsFullScreen: boolean; - xmlEncoding: string; - xmlStandalone: boolean; - /** - * Gets or sets the version attribute specified in the declaration of an XML document. - */ - xmlVersion: string; - adoptNode(source: Node): Node; - captureEvents(): void; - clear(): void; - /** - * Closes an output stream and forces the sent data to display. - */ - close(): void; - /** - * Creates an attribute object with a specified name. - * @param name String that sets the attribute object's name. - */ - createAttribute(name: string): Attr; - createAttributeNS(namespaceURI: string, qualifiedName: string): Attr; - createCDATASection(data: string): CDATASection; - /** - * Creates a comment object with the specified data. - * @param data Sets the comment object's data. - */ - createComment(data: string): Comment; - /** - * Creates a new document. - */ - createDocumentFragment(): DocumentFragment; - /** - * Creates an instance of the element for the specified tag. - * @param tagName The name of an element. - */ - createElement(tagName: "a"): HTMLAnchorElement; - createElement(tagName: "abbr"): HTMLPhraseElement; - createElement(tagName: "acronym"): HTMLPhraseElement; - createElement(tagName: "address"): HTMLBlockElement; - createElement(tagName: "applet"): HTMLAppletElement; - createElement(tagName: "area"): HTMLAreaElement; - createElement(tagName: "audio"): HTMLAudioElement; - createElement(tagName: "b"): HTMLPhraseElement; - createElement(tagName: "base"): HTMLBaseElement; - createElement(tagName: "basefont"): HTMLBaseFontElement; - createElement(tagName: "bdo"): HTMLPhraseElement; - createElement(tagName: "big"): HTMLPhraseElement; - createElement(tagName: "blockquote"): HTMLBlockElement; - createElement(tagName: "body"): HTMLBodyElement; - createElement(tagName: "br"): HTMLBRElement; - createElement(tagName: "button"): HTMLButtonElement; - createElement(tagName: "canvas"): HTMLCanvasElement; - createElement(tagName: "caption"): HTMLTableCaptionElement; - createElement(tagName: "center"): HTMLBlockElement; - createElement(tagName: "cite"): HTMLPhraseElement; - createElement(tagName: "code"): HTMLPhraseElement; - createElement(tagName: "col"): HTMLTableColElement; - createElement(tagName: "colgroup"): HTMLTableColElement; - createElement(tagName: "datalist"): HTMLDataListElement; - createElement(tagName: "dd"): HTMLDDElement; - createElement(tagName: "del"): HTMLModElement; - createElement(tagName: "dfn"): HTMLPhraseElement; - createElement(tagName: "dir"): HTMLDirectoryElement; - createElement(tagName: "div"): HTMLDivElement; - createElement(tagName: "dl"): HTMLDListElement; - createElement(tagName: "dt"): HTMLDTElement; - createElement(tagName: "em"): HTMLPhraseElement; - createElement(tagName: "embed"): HTMLEmbedElement; - createElement(tagName: "fieldset"): HTMLFieldSetElement; - createElement(tagName: "font"): HTMLFontElement; - createElement(tagName: "form"): HTMLFormElement; - createElement(tagName: "frame"): HTMLFrameElement; - createElement(tagName: "frameset"): HTMLFrameSetElement; - createElement(tagName: "h1"): HTMLHeadingElement; - createElement(tagName: "h2"): HTMLHeadingElement; - createElement(tagName: "h3"): HTMLHeadingElement; - createElement(tagName: "h4"): HTMLHeadingElement; - createElement(tagName: "h5"): HTMLHeadingElement; - createElement(tagName: "h6"): HTMLHeadingElement; - createElement(tagName: "head"): HTMLHeadElement; - createElement(tagName: "hr"): HTMLHRElement; - createElement(tagName: "html"): HTMLHtmlElement; - createElement(tagName: "i"): HTMLPhraseElement; - createElement(tagName: "iframe"): HTMLIFrameElement; - createElement(tagName: "img"): HTMLImageElement; - createElement(tagName: "input"): HTMLInputElement; - createElement(tagName: "ins"): HTMLModElement; - createElement(tagName: "isindex"): HTMLIsIndexElement; - createElement(tagName: "kbd"): HTMLPhraseElement; - createElement(tagName: "keygen"): HTMLBlockElement; - createElement(tagName: "label"): HTMLLabelElement; - createElement(tagName: "legend"): HTMLLegendElement; - createElement(tagName: "li"): HTMLLIElement; - createElement(tagName: "link"): HTMLLinkElement; - createElement(tagName: "listing"): HTMLBlockElement; - createElement(tagName: "map"): HTMLMapElement; - createElement(tagName: "marquee"): HTMLMarqueeElement; - createElement(tagName: "menu"): HTMLMenuElement; - createElement(tagName: "meta"): HTMLMetaElement; - createElement(tagName: "nextid"): HTMLNextIdElement; - createElement(tagName: "nobr"): HTMLPhraseElement; - createElement(tagName: "object"): HTMLObjectElement; - createElement(tagName: "ol"): HTMLOListElement; - createElement(tagName: "optgroup"): HTMLOptGroupElement; - createElement(tagName: "option"): HTMLOptionElement; - createElement(tagName: "p"): HTMLParagraphElement; - createElement(tagName: "param"): HTMLParamElement; - createElement(tagName: "plaintext"): HTMLBlockElement; - createElement(tagName: "pre"): HTMLPreElement; - createElement(tagName: "progress"): HTMLProgressElement; - createElement(tagName: "q"): HTMLQuoteElement; - createElement(tagName: "rt"): HTMLPhraseElement; - createElement(tagName: "ruby"): HTMLPhraseElement; - createElement(tagName: "s"): HTMLPhraseElement; - createElement(tagName: "samp"): HTMLPhraseElement; - createElement(tagName: "script"): HTMLScriptElement; - createElement(tagName: "select"): HTMLSelectElement; - createElement(tagName: "small"): HTMLPhraseElement; - createElement(tagName: "source"): HTMLSourceElement; - createElement(tagName: "span"): HTMLSpanElement; - createElement(tagName: "strike"): HTMLPhraseElement; - createElement(tagName: "strong"): HTMLPhraseElement; - createElement(tagName: "style"): HTMLStyleElement; - createElement(tagName: "sub"): HTMLPhraseElement; - createElement(tagName: "sup"): HTMLPhraseElement; - createElement(tagName: "table"): HTMLTableElement; - createElement(tagName: "tbody"): HTMLTableSectionElement; - createElement(tagName: "td"): HTMLTableDataCellElement; - createElement(tagName: "textarea"): HTMLTextAreaElement; - createElement(tagName: "tfoot"): HTMLTableSectionElement; - createElement(tagName: "th"): HTMLTableHeaderCellElement; - createElement(tagName: "thead"): HTMLTableSectionElement; - createElement(tagName: "title"): HTMLTitleElement; - createElement(tagName: "tr"): HTMLTableRowElement; - createElement(tagName: "track"): HTMLTrackElement; - createElement(tagName: "tt"): HTMLPhraseElement; - createElement(tagName: "u"): HTMLPhraseElement; - createElement(tagName: "ul"): HTMLUListElement; - createElement(tagName: "var"): HTMLPhraseElement; - createElement(tagName: "video"): HTMLVideoElement; - createElement(tagName: "x-ms-webview"): MSHTMLWebViewElement; - createElement(tagName: "xmp"): HTMLBlockElement; - createElement(tagName: string): HTMLElement; - createElementNS(namespaceURI: string, qualifiedName: string): Element; - createExpression(expression: string, resolver: XPathNSResolver): XPathExpression; - createNSResolver(nodeResolver: Node): XPathNSResolver; - /** - * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document. - * @param root The root element or node to start traversing on. - * @param whatToShow The type of nodes or elements to appear in the node list - * @param filter A custom NodeFilter function to use. For more information, see filter. Use null for no filter. - * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded. - */ - createNodeIterator(root: Node, whatToShow?: number, filter?: NodeFilter, entityReferenceExpansion?: boolean): NodeIterator; - createProcessingInstruction(target: string, data: string): ProcessingInstruction; - /** - * Returns an empty range object that has both of its boundary points positioned at the beginning of the document. - */ - createRange(): Range; - /** - * Creates a text string from the specified value. - * @param data String that specifies the nodeValue property of the text node. - */ - createTextNode(data: string): Text; - createTouch(view: any, target: EventTarget, identifier: number, pageX: number, pageY: number, screenX: number, screenY: number): Touch; - createTouchList(...touches: Touch[]): TouchList; - /** - * Creates a TreeWalker object that you can use to traverse filtered lists of nodes or elements in a document. - * @param root The root element or node to start traversing on. - * @param whatToShow The type of nodes or elements to appear in the node list. For more information, see whatToShow. - * @param filter A custom NodeFilter function to use. - * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded. - */ - createTreeWalker(root: Node, whatToShow?: number, filter?: NodeFilter, entityReferenceExpansion?: boolean): TreeWalker; - /** - * Returns the element for the specified x coordinate and the specified y coordinate. - * @param x The x-offset - * @param y The y-offset - */ - elementFromPoint(x: number, y: number): Element; - evaluate(expression: string, contextNode: Node, resolver: XPathNSResolver, type: number, result: XPathResult): XPathResult; - /** - * Executes a command on the current document, current selection, or the given range. - * @param commandId String that specifies the command to execute. This command can be any of the command identifiers that can be executed in script. - * @param showUI Display the user interface, defaults to false. - * @param value Value to assign. - */ - execCommand(commandId: string, showUI?: boolean, value?: any): boolean; - /** - * Displays help information for the given command identifier. - * @param commandId Displays help information for the given command identifier. - */ - execCommandShowHelp(commandId: string): boolean; - exitFullscreen(): void; - exitPointerLock(): void; - /** - * Causes the element to receive the focus and executes the code specified by the onfocus event. - */ - focus(): void; - /** - * Returns a reference to the first object with the specified value of the ID or NAME attribute. - * @param elementId String that specifies the ID value. Case-insensitive. - */ - getElementById(elementId: string): HTMLElement; - getElementsByClassName(classNames: string): NodeList; - /** - * Gets a collection of objects based on the value of the NAME or ID attribute. - * @param elementName Gets a collection of objects based on the value of the NAME or ID attribute. - */ - getElementsByName(elementName: string): NodeList; - /** - * Retrieves a collection of objects based on the specified element name. - * @param name Specifies the name of an element. - */ - getElementsByTagName(tagname: "a"): NodeListOf; - getElementsByTagName(tagname: "abbr"): NodeListOf; - getElementsByTagName(tagname: "acronym"): NodeListOf; - getElementsByTagName(tagname: "address"): NodeListOf; - getElementsByTagName(tagname: "applet"): NodeListOf; - getElementsByTagName(tagname: "area"): NodeListOf; - getElementsByTagName(tagname: "article"): NodeListOf; - getElementsByTagName(tagname: "aside"): NodeListOf; - getElementsByTagName(tagname: "audio"): NodeListOf; - getElementsByTagName(tagname: "b"): NodeListOf; - getElementsByTagName(tagname: "base"): NodeListOf; - getElementsByTagName(tagname: "basefont"): NodeListOf; - getElementsByTagName(tagname: "bdo"): NodeListOf; - getElementsByTagName(tagname: "big"): NodeListOf; - getElementsByTagName(tagname: "blockquote"): NodeListOf; - getElementsByTagName(tagname: "body"): NodeListOf; - getElementsByTagName(tagname: "br"): NodeListOf; - getElementsByTagName(tagname: "button"): NodeListOf; - getElementsByTagName(tagname: "canvas"): NodeListOf; - getElementsByTagName(tagname: "caption"): NodeListOf; - getElementsByTagName(tagname: "center"): NodeListOf; - getElementsByTagName(tagname: "circle"): NodeListOf; - getElementsByTagName(tagname: "cite"): NodeListOf; - getElementsByTagName(tagname: "clippath"): NodeListOf; - getElementsByTagName(tagname: "code"): NodeListOf; - getElementsByTagName(tagname: "col"): NodeListOf; - getElementsByTagName(tagname: "colgroup"): NodeListOf; - getElementsByTagName(tagname: "datalist"): NodeListOf; - getElementsByTagName(tagname: "dd"): NodeListOf; - getElementsByTagName(tagname: "defs"): NodeListOf; - getElementsByTagName(tagname: "del"): NodeListOf; - getElementsByTagName(tagname: "desc"): NodeListOf; - getElementsByTagName(tagname: "dfn"): NodeListOf; - getElementsByTagName(tagname: "dir"): NodeListOf; - getElementsByTagName(tagname: "div"): NodeListOf; - getElementsByTagName(tagname: "dl"): NodeListOf; - getElementsByTagName(tagname: "dt"): NodeListOf; - getElementsByTagName(tagname: "ellipse"): NodeListOf; - getElementsByTagName(tagname: "em"): NodeListOf; - getElementsByTagName(tagname: "embed"): NodeListOf; - getElementsByTagName(tagname: "feblend"): NodeListOf; - getElementsByTagName(tagname: "fecolormatrix"): NodeListOf; - getElementsByTagName(tagname: "fecomponenttransfer"): NodeListOf; - getElementsByTagName(tagname: "fecomposite"): NodeListOf; - getElementsByTagName(tagname: "feconvolvematrix"): NodeListOf; - getElementsByTagName(tagname: "fediffuselighting"): NodeListOf; - getElementsByTagName(tagname: "fedisplacementmap"): NodeListOf; - getElementsByTagName(tagname: "fedistantlight"): NodeListOf; - getElementsByTagName(tagname: "feflood"): NodeListOf; - getElementsByTagName(tagname: "fefunca"): NodeListOf; - getElementsByTagName(tagname: "fefuncb"): NodeListOf; - getElementsByTagName(tagname: "fefuncg"): NodeListOf; - getElementsByTagName(tagname: "fefuncr"): NodeListOf; - getElementsByTagName(tagname: "fegaussianblur"): NodeListOf; - getElementsByTagName(tagname: "feimage"): NodeListOf; - getElementsByTagName(tagname: "femerge"): NodeListOf; - getElementsByTagName(tagname: "femergenode"): NodeListOf; - getElementsByTagName(tagname: "femorphology"): NodeListOf; - getElementsByTagName(tagname: "feoffset"): NodeListOf; - getElementsByTagName(tagname: "fepointlight"): NodeListOf; - getElementsByTagName(tagname: "fespecularlighting"): NodeListOf; - getElementsByTagName(tagname: "fespotlight"): NodeListOf; - getElementsByTagName(tagname: "fetile"): NodeListOf; - getElementsByTagName(tagname: "feturbulence"): NodeListOf; - getElementsByTagName(tagname: "fieldset"): NodeListOf; - getElementsByTagName(tagname: "figcaption"): NodeListOf; - getElementsByTagName(tagname: "figure"): NodeListOf; - getElementsByTagName(tagname: "filter"): NodeListOf; - getElementsByTagName(tagname: "font"): NodeListOf; - getElementsByTagName(tagname: "footer"): NodeListOf; - getElementsByTagName(tagname: "foreignobject"): NodeListOf; - getElementsByTagName(tagname: "form"): NodeListOf; - getElementsByTagName(tagname: "frame"): NodeListOf; - getElementsByTagName(tagname: "frameset"): NodeListOf; - getElementsByTagName(tagname: "g"): NodeListOf; - getElementsByTagName(tagname: "h1"): NodeListOf; - getElementsByTagName(tagname: "h2"): NodeListOf; - getElementsByTagName(tagname: "h3"): NodeListOf; - getElementsByTagName(tagname: "h4"): NodeListOf; - getElementsByTagName(tagname: "h5"): NodeListOf; - getElementsByTagName(tagname: "h6"): NodeListOf; - getElementsByTagName(tagname: "head"): NodeListOf; - getElementsByTagName(tagname: "header"): NodeListOf; - getElementsByTagName(tagname: "hgroup"): NodeListOf; - getElementsByTagName(tagname: "hr"): NodeListOf; - getElementsByTagName(tagname: "html"): NodeListOf; - getElementsByTagName(tagname: "i"): NodeListOf; - getElementsByTagName(tagname: "iframe"): NodeListOf; - getElementsByTagName(tagname: "image"): NodeListOf; - getElementsByTagName(tagname: "img"): NodeListOf; - getElementsByTagName(tagname: "input"): NodeListOf; - getElementsByTagName(tagname: "ins"): NodeListOf; - getElementsByTagName(tagname: "isindex"): NodeListOf; - getElementsByTagName(tagname: "kbd"): NodeListOf; - getElementsByTagName(tagname: "keygen"): NodeListOf; - getElementsByTagName(tagname: "label"): NodeListOf; - getElementsByTagName(tagname: "legend"): NodeListOf; - getElementsByTagName(tagname: "li"): NodeListOf; - getElementsByTagName(tagname: "line"): NodeListOf; - getElementsByTagName(tagname: "lineargradient"): NodeListOf; - getElementsByTagName(tagname: "link"): NodeListOf; - getElementsByTagName(tagname: "listing"): NodeListOf; - getElementsByTagName(tagname: "map"): NodeListOf; - getElementsByTagName(tagname: "mark"): NodeListOf; - getElementsByTagName(tagname: "marker"): NodeListOf; - getElementsByTagName(tagname: "marquee"): NodeListOf; - getElementsByTagName(tagname: "mask"): NodeListOf; - getElementsByTagName(tagname: "menu"): NodeListOf; - getElementsByTagName(tagname: "meta"): NodeListOf; - getElementsByTagName(tagname: "metadata"): NodeListOf; - getElementsByTagName(tagname: "nav"): NodeListOf; - getElementsByTagName(tagname: "nextid"): NodeListOf; - getElementsByTagName(tagname: "nobr"): NodeListOf; - getElementsByTagName(tagname: "noframes"): NodeListOf; - getElementsByTagName(tagname: "noscript"): NodeListOf; - getElementsByTagName(tagname: "object"): NodeListOf; - getElementsByTagName(tagname: "ol"): NodeListOf; - getElementsByTagName(tagname: "optgroup"): NodeListOf; - getElementsByTagName(tagname: "option"): NodeListOf; - getElementsByTagName(tagname: "p"): NodeListOf; - getElementsByTagName(tagname: "param"): NodeListOf; - getElementsByTagName(tagname: "path"): NodeListOf; - getElementsByTagName(tagname: "pattern"): NodeListOf; - getElementsByTagName(tagname: "plaintext"): NodeListOf; - getElementsByTagName(tagname: "polygon"): NodeListOf; - getElementsByTagName(tagname: "polyline"): NodeListOf; - getElementsByTagName(tagname: "pre"): NodeListOf; - getElementsByTagName(tagname: "progress"): NodeListOf; - getElementsByTagName(tagname: "q"): NodeListOf; - getElementsByTagName(tagname: "radialgradient"): NodeListOf; - getElementsByTagName(tagname: "rect"): NodeListOf; - getElementsByTagName(tagname: "rt"): NodeListOf; - getElementsByTagName(tagname: "ruby"): NodeListOf; - getElementsByTagName(tagname: "s"): NodeListOf; - getElementsByTagName(tagname: "samp"): NodeListOf; - getElementsByTagName(tagname: "script"): NodeListOf; - getElementsByTagName(tagname: "section"): NodeListOf; - getElementsByTagName(tagname: "select"): NodeListOf; - getElementsByTagName(tagname: "small"): NodeListOf; - getElementsByTagName(tagname: "source"): NodeListOf; - getElementsByTagName(tagname: "span"): NodeListOf; - getElementsByTagName(tagname: "stop"): NodeListOf; - getElementsByTagName(tagname: "strike"): NodeListOf; - getElementsByTagName(tagname: "strong"): NodeListOf; - getElementsByTagName(tagname: "style"): NodeListOf; - getElementsByTagName(tagname: "sub"): NodeListOf; - getElementsByTagName(tagname: "sup"): NodeListOf; - getElementsByTagName(tagname: "svg"): NodeListOf; - getElementsByTagName(tagname: "switch"): NodeListOf; - getElementsByTagName(tagname: "symbol"): NodeListOf; - getElementsByTagName(tagname: "table"): NodeListOf; - getElementsByTagName(tagname: "tbody"): NodeListOf; - getElementsByTagName(tagname: "td"): NodeListOf; - getElementsByTagName(tagname: "text"): NodeListOf; - getElementsByTagName(tagname: "textpath"): NodeListOf; - getElementsByTagName(tagname: "textarea"): NodeListOf; - getElementsByTagName(tagname: "tfoot"): NodeListOf; - getElementsByTagName(tagname: "th"): NodeListOf; - getElementsByTagName(tagname: "thead"): NodeListOf; - getElementsByTagName(tagname: "title"): NodeListOf; - getElementsByTagName(tagname: "tr"): NodeListOf; - getElementsByTagName(tagname: "track"): NodeListOf; - getElementsByTagName(tagname: "tspan"): NodeListOf; - getElementsByTagName(tagname: "tt"): NodeListOf; - getElementsByTagName(tagname: "u"): NodeListOf; - getElementsByTagName(tagname: "ul"): NodeListOf; - getElementsByTagName(tagname: "use"): NodeListOf; - getElementsByTagName(tagname: "var"): NodeListOf; - getElementsByTagName(tagname: "video"): NodeListOf; - getElementsByTagName(tagname: "view"): NodeListOf; - getElementsByTagName(tagname: "wbr"): NodeListOf; - getElementsByTagName(tagname: "x-ms-webview"): NodeListOf; - getElementsByTagName(tagname: "xmp"): NodeListOf; - getElementsByTagName(tagname: string): NodeList; - getElementsByTagNameNS(namespaceURI: string, localName: string): NodeList; - /** - * Returns an object representing the current selection of the document that is loaded into the object displaying a webpage. - */ - getSelection(): Selection; - /** - * Gets a value indicating whether the object currently has focus. - */ - hasFocus(): boolean; - importNode(importedNode: Node, deep: boolean): Node; - msElementsFromPoint(x: number, y: number): NodeList; - msElementsFromRect(left: number, top: number, width: number, height: number): NodeList; - msGetPrintDocumentForNamedFlow(flowName: string): Document; - msSetPrintDocumentUriForNamedFlow(flowName: string, uri: string): void; - /** - * Opens a new window and loads a document specified by a given URL. Also, opens a new window that uses the url parameter and the name parameter to collect the output of the write method and the writeln method. - * @param url Specifies a MIME type for the document. - * @param name Specifies the name of the window. This name is used as the value for the TARGET attribute on a form or an anchor element. - * @param features Contains a list of items separated by commas. Each item consists of an option and a value, separated by an equals sign (for example, "fullscreen=yes, toolbar=yes"). The following values are supported. - * @param replace Specifies whether the existing entry for the document is replaced in the history list. - */ - open(url?: string, name?: string, features?: string, replace?: boolean): Document | Window; - /** - * Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand, given the current state of the document. - * @param commandId Specifies a command identifier. - */ - queryCommandEnabled(commandId: string): boolean; - /** - * Returns a Boolean value that indicates whether the specified command is in the indeterminate state. - * @param commandId String that specifies a command identifier. - */ - queryCommandIndeterm(commandId: string): boolean; - /** - * Returns a Boolean value that indicates the current state of the command. - * @param commandId String that specifies a command identifier. - */ - queryCommandState(commandId: string): boolean; - /** - * Returns a Boolean value that indicates whether the current command is supported on the current range. - * @param commandId Specifies a command identifier. - */ - queryCommandSupported(commandId: string): boolean; - /** - * Retrieves the string associated with a command. - * @param commandId String that contains the identifier of a command. This can be any command identifier given in the list of Command Identifiers. - */ - queryCommandText(commandId: string): string; - /** - * Returns the current value of the document, range, or current selection for the given command. - * @param commandId String that specifies a command identifier. - */ - queryCommandValue(commandId: string): string; - releaseEvents(): void; - /** - * Allows updating the print settings for the page. - */ - updateSettings(): void; - webkitCancelFullScreen(): void; - webkitExitFullscreen(): void; - /** - * Writes one or more HTML expressions to a document in the specified window. - * @param content Specifies the text and HTML tags to write. - */ - write(...content: string[]): void; - /** - * Writes one or more HTML expressions, followed by a carriage return, to a document in the specified window. - * @param content The text and HTML tags to write. - */ - writeln(...content: string[]): void; - addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "fullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "fullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mssitemodejumplistitemremoved", listener: (ev: MSSiteModeEvent) => any, useCapture?: boolean): void; - addEventListener(type: "msthumbnailclick", listener: (ev: MSSiteModeEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerlockchange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "pointerlockerror", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void; - addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "readystatechange", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void; - addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "stop", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var Document: { - prototype: Document; - new(): Document; -} - -interface DocumentFragment extends Node, NodeSelector { - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var DocumentFragment: { - prototype: DocumentFragment; - new(): DocumentFragment; -} - -interface DocumentType extends Node, ChildNode { - entities: NamedNodeMap; - internalSubset: string; - name: string; - notations: NamedNodeMap; - publicId: string; - systemId: string; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var DocumentType: { - prototype: DocumentType; - new(): DocumentType; -} - -interface DragEvent extends MouseEvent { - dataTransfer: DataTransfer; - initDragEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, dataTransferArg: DataTransfer): void; - msConvertURL(file: File, targetType: string, targetURL?: string): void; -} - -declare var DragEvent: { - prototype: DragEvent; - new(): DragEvent; -} - -interface DynamicsCompressorNode extends AudioNode { - attack: AudioParam; - knee: AudioParam; - ratio: AudioParam; - reduction: AudioParam; - release: AudioParam; - threshold: AudioParam; -} - -declare var DynamicsCompressorNode: { - prototype: DynamicsCompressorNode; - new(): DynamicsCompressorNode; -} - -interface EXT_texture_filter_anisotropic { - MAX_TEXTURE_MAX_ANISOTROPY_EXT: number; - TEXTURE_MAX_ANISOTROPY_EXT: number; -} - -declare var EXT_texture_filter_anisotropic: { - prototype: EXT_texture_filter_anisotropic; - new(): EXT_texture_filter_anisotropic; - MAX_TEXTURE_MAX_ANISOTROPY_EXT: number; - TEXTURE_MAX_ANISOTROPY_EXT: number; -} - -interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelector, ChildNode { - classList: DOMTokenList; - clientHeight: number; - clientLeft: number; - clientTop: number; - clientWidth: number; - msContentZoomFactor: number; - msRegionOverflow: string; - onariarequest: (ev: AriaRequestEvent) => any; - oncommand: (ev: CommandEvent) => any; - ongotpointercapture: (ev: PointerEvent) => any; - onlostpointercapture: (ev: PointerEvent) => any; - onmsgesturechange: (ev: MSGestureEvent) => any; - onmsgesturedoubletap: (ev: MSGestureEvent) => any; - onmsgestureend: (ev: MSGestureEvent) => any; - onmsgesturehold: (ev: MSGestureEvent) => any; - onmsgesturestart: (ev: MSGestureEvent) => any; - onmsgesturetap: (ev: MSGestureEvent) => any; - onmsgotpointercapture: (ev: MSPointerEvent) => any; - onmsinertiastart: (ev: MSGestureEvent) => any; - onmslostpointercapture: (ev: MSPointerEvent) => any; - onmspointercancel: (ev: MSPointerEvent) => any; - onmspointerdown: (ev: MSPointerEvent) => any; - onmspointerenter: (ev: MSPointerEvent) => any; - onmspointerleave: (ev: MSPointerEvent) => any; - onmspointermove: (ev: MSPointerEvent) => any; - onmspointerout: (ev: MSPointerEvent) => any; - onmspointerover: (ev: MSPointerEvent) => any; - onmspointerup: (ev: MSPointerEvent) => any; - ontouchcancel: (ev: TouchEvent) => any; - ontouchend: (ev: TouchEvent) => any; - ontouchmove: (ev: TouchEvent) => any; - ontouchstart: (ev: TouchEvent) => any; - onwebkitfullscreenchange: (ev: Event) => any; - onwebkitfullscreenerror: (ev: Event) => any; - scrollHeight: number; - scrollLeft: number; - scrollTop: number; - scrollWidth: number; - tagName: string; - getAttribute(name?: string): string; - getAttributeNS(namespaceURI: string, localName: string): string; - getAttributeNode(name: string): Attr; - getAttributeNodeNS(namespaceURI: string, localName: string): Attr; - getBoundingClientRect(): ClientRect; - getClientRects(): ClientRectList; - getElementsByTagName(name: "a"): NodeListOf; - getElementsByTagName(name: "abbr"): NodeListOf; - getElementsByTagName(name: "acronym"): NodeListOf; - getElementsByTagName(name: "address"): NodeListOf; - getElementsByTagName(name: "applet"): NodeListOf; - getElementsByTagName(name: "area"): NodeListOf; - getElementsByTagName(name: "article"): NodeListOf; - getElementsByTagName(name: "aside"): NodeListOf; - getElementsByTagName(name: "audio"): NodeListOf; - getElementsByTagName(name: "b"): NodeListOf; - getElementsByTagName(name: "base"): NodeListOf; - getElementsByTagName(name: "basefont"): NodeListOf; - getElementsByTagName(name: "bdo"): NodeListOf; - getElementsByTagName(name: "big"): NodeListOf; - getElementsByTagName(name: "blockquote"): NodeListOf; - getElementsByTagName(name: "body"): NodeListOf; - getElementsByTagName(name: "br"): NodeListOf; - getElementsByTagName(name: "button"): NodeListOf; - getElementsByTagName(name: "canvas"): NodeListOf; - getElementsByTagName(name: "caption"): NodeListOf; - getElementsByTagName(name: "center"): NodeListOf; - getElementsByTagName(name: "circle"): NodeListOf; - getElementsByTagName(name: "cite"): NodeListOf; - getElementsByTagName(name: "clippath"): NodeListOf; - getElementsByTagName(name: "code"): NodeListOf; - getElementsByTagName(name: "col"): NodeListOf; - getElementsByTagName(name: "colgroup"): NodeListOf; - getElementsByTagName(name: "datalist"): NodeListOf; - getElementsByTagName(name: "dd"): NodeListOf; - getElementsByTagName(name: "defs"): NodeListOf; - getElementsByTagName(name: "del"): NodeListOf; - getElementsByTagName(name: "desc"): NodeListOf; - getElementsByTagName(name: "dfn"): NodeListOf; - getElementsByTagName(name: "dir"): NodeListOf; - getElementsByTagName(name: "div"): NodeListOf; - getElementsByTagName(name: "dl"): NodeListOf; - getElementsByTagName(name: "dt"): NodeListOf; - getElementsByTagName(name: "ellipse"): NodeListOf; - getElementsByTagName(name: "em"): NodeListOf; - getElementsByTagName(name: "embed"): NodeListOf; - getElementsByTagName(name: "feblend"): NodeListOf; - getElementsByTagName(name: "fecolormatrix"): NodeListOf; - getElementsByTagName(name: "fecomponenttransfer"): NodeListOf; - getElementsByTagName(name: "fecomposite"): NodeListOf; - getElementsByTagName(name: "feconvolvematrix"): NodeListOf; - getElementsByTagName(name: "fediffuselighting"): NodeListOf; - getElementsByTagName(name: "fedisplacementmap"): NodeListOf; - getElementsByTagName(name: "fedistantlight"): NodeListOf; - getElementsByTagName(name: "feflood"): NodeListOf; - getElementsByTagName(name: "fefunca"): NodeListOf; - getElementsByTagName(name: "fefuncb"): NodeListOf; - getElementsByTagName(name: "fefuncg"): NodeListOf; - getElementsByTagName(name: "fefuncr"): NodeListOf; - getElementsByTagName(name: "fegaussianblur"): NodeListOf; - getElementsByTagName(name: "feimage"): NodeListOf; - getElementsByTagName(name: "femerge"): NodeListOf; - getElementsByTagName(name: "femergenode"): NodeListOf; - getElementsByTagName(name: "femorphology"): NodeListOf; - getElementsByTagName(name: "feoffset"): NodeListOf; - getElementsByTagName(name: "fepointlight"): NodeListOf; - getElementsByTagName(name: "fespecularlighting"): NodeListOf; - getElementsByTagName(name: "fespotlight"): NodeListOf; - getElementsByTagName(name: "fetile"): NodeListOf; - getElementsByTagName(name: "feturbulence"): NodeListOf; - getElementsByTagName(name: "fieldset"): NodeListOf; - getElementsByTagName(name: "figcaption"): NodeListOf; - getElementsByTagName(name: "figure"): NodeListOf; - getElementsByTagName(name: "filter"): NodeListOf; - getElementsByTagName(name: "font"): NodeListOf; - getElementsByTagName(name: "footer"): NodeListOf; - getElementsByTagName(name: "foreignobject"): NodeListOf; - getElementsByTagName(name: "form"): NodeListOf; - getElementsByTagName(name: "frame"): NodeListOf; - getElementsByTagName(name: "frameset"): NodeListOf; - getElementsByTagName(name: "g"): NodeListOf; - getElementsByTagName(name: "h1"): NodeListOf; - getElementsByTagName(name: "h2"): NodeListOf; - getElementsByTagName(name: "h3"): NodeListOf; - getElementsByTagName(name: "h4"): NodeListOf; - getElementsByTagName(name: "h5"): NodeListOf; - getElementsByTagName(name: "h6"): NodeListOf; - getElementsByTagName(name: "head"): NodeListOf; - getElementsByTagName(name: "header"): NodeListOf; - getElementsByTagName(name: "hgroup"): NodeListOf; - getElementsByTagName(name: "hr"): NodeListOf; - getElementsByTagName(name: "html"): NodeListOf; - getElementsByTagName(name: "i"): NodeListOf; - getElementsByTagName(name: "iframe"): NodeListOf; - getElementsByTagName(name: "image"): NodeListOf; - getElementsByTagName(name: "img"): NodeListOf; - getElementsByTagName(name: "input"): NodeListOf; - getElementsByTagName(name: "ins"): NodeListOf; - getElementsByTagName(name: "isindex"): NodeListOf; - getElementsByTagName(name: "kbd"): NodeListOf; - getElementsByTagName(name: "keygen"): NodeListOf; - getElementsByTagName(name: "label"): NodeListOf; - getElementsByTagName(name: "legend"): NodeListOf; - getElementsByTagName(name: "li"): NodeListOf; - getElementsByTagName(name: "line"): NodeListOf; - getElementsByTagName(name: "lineargradient"): NodeListOf; - getElementsByTagName(name: "link"): NodeListOf; - getElementsByTagName(name: "listing"): NodeListOf; - getElementsByTagName(name: "map"): NodeListOf; - getElementsByTagName(name: "mark"): NodeListOf; - getElementsByTagName(name: "marker"): NodeListOf; - getElementsByTagName(name: "marquee"): NodeListOf; - getElementsByTagName(name: "mask"): NodeListOf; - getElementsByTagName(name: "menu"): NodeListOf; - getElementsByTagName(name: "meta"): NodeListOf; - getElementsByTagName(name: "metadata"): NodeListOf; - getElementsByTagName(name: "nav"): NodeListOf; - getElementsByTagName(name: "nextid"): NodeListOf; - getElementsByTagName(name: "nobr"): NodeListOf; - getElementsByTagName(name: "noframes"): NodeListOf; - getElementsByTagName(name: "noscript"): NodeListOf; - getElementsByTagName(name: "object"): NodeListOf; - getElementsByTagName(name: "ol"): NodeListOf; - getElementsByTagName(name: "optgroup"): NodeListOf; - getElementsByTagName(name: "option"): NodeListOf; - getElementsByTagName(name: "p"): NodeListOf; - getElementsByTagName(name: "param"): NodeListOf; - getElementsByTagName(name: "path"): NodeListOf; - getElementsByTagName(name: "pattern"): NodeListOf; - getElementsByTagName(name: "plaintext"): NodeListOf; - getElementsByTagName(name: "polygon"): NodeListOf; - getElementsByTagName(name: "polyline"): NodeListOf; - getElementsByTagName(name: "pre"): NodeListOf; - getElementsByTagName(name: "progress"): NodeListOf; - getElementsByTagName(name: "q"): NodeListOf; - getElementsByTagName(name: "radialgradient"): NodeListOf; - getElementsByTagName(name: "rect"): NodeListOf; - getElementsByTagName(name: "rt"): NodeListOf; - getElementsByTagName(name: "ruby"): NodeListOf; - getElementsByTagName(name: "s"): NodeListOf; - getElementsByTagName(name: "samp"): NodeListOf; - getElementsByTagName(name: "script"): NodeListOf; - getElementsByTagName(name: "section"): NodeListOf; - getElementsByTagName(name: "select"): NodeListOf; - getElementsByTagName(name: "small"): NodeListOf; - getElementsByTagName(name: "source"): NodeListOf; - getElementsByTagName(name: "span"): NodeListOf; - getElementsByTagName(name: "stop"): NodeListOf; - getElementsByTagName(name: "strike"): NodeListOf; - getElementsByTagName(name: "strong"): NodeListOf; - getElementsByTagName(name: "style"): NodeListOf; - getElementsByTagName(name: "sub"): NodeListOf; - getElementsByTagName(name: "sup"): NodeListOf; - getElementsByTagName(name: "svg"): NodeListOf; - getElementsByTagName(name: "switch"): NodeListOf; - getElementsByTagName(name: "symbol"): NodeListOf; - getElementsByTagName(name: "table"): NodeListOf; - getElementsByTagName(name: "tbody"): NodeListOf; - getElementsByTagName(name: "td"): NodeListOf; - getElementsByTagName(name: "text"): NodeListOf; - getElementsByTagName(name: "textpath"): NodeListOf; - getElementsByTagName(name: "textarea"): NodeListOf; - getElementsByTagName(name: "tfoot"): NodeListOf; - getElementsByTagName(name: "th"): NodeListOf; - getElementsByTagName(name: "thead"): NodeListOf; - getElementsByTagName(name: "title"): NodeListOf; - getElementsByTagName(name: "tr"): NodeListOf; - getElementsByTagName(name: "track"): NodeListOf; - getElementsByTagName(name: "tspan"): NodeListOf; - getElementsByTagName(name: "tt"): NodeListOf; - getElementsByTagName(name: "u"): NodeListOf; - getElementsByTagName(name: "ul"): NodeListOf; - getElementsByTagName(name: "use"): NodeListOf; - getElementsByTagName(name: "var"): NodeListOf; - getElementsByTagName(name: "video"): NodeListOf; - getElementsByTagName(name: "view"): NodeListOf; - getElementsByTagName(name: "wbr"): NodeListOf; - getElementsByTagName(name: "x-ms-webview"): NodeListOf; - getElementsByTagName(name: "xmp"): NodeListOf; - getElementsByTagName(name: string): NodeList; - getElementsByTagNameNS(namespaceURI: string, localName: string): NodeList; - hasAttribute(name: string): boolean; - hasAttributeNS(namespaceURI: string, localName: string): boolean; - msGetRegionContent(): MSRangeCollection; - msGetUntransformedBounds(): ClientRect; - msMatchesSelector(selectors: string): boolean; - msReleasePointerCapture(pointerId: number): void; - msSetPointerCapture(pointerId: number): void; - msZoomTo(args: MsZoomToOptions): void; - releasePointerCapture(pointerId: number): void; - removeAttribute(name?: string): void; - removeAttributeNS(namespaceURI: string, localName: string): void; - removeAttributeNode(oldAttr: Attr): Attr; - requestFullscreen(): void; - requestPointerLock(): void; - setAttribute(name?: string, value?: string): void; - setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void; - setAttributeNode(newAttr: Attr): Attr; - setAttributeNodeNS(newAttr: Attr): Attr; - setPointerCapture(pointerId: number): void; - webkitMatchesSelector(selectors: string): boolean; - webkitRequestFullScreen(): void; - webkitRequestFullscreen(): void; - addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void; - addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void; - addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var Element: { - prototype: Element; - new(): Element; -} - -interface ErrorEvent extends Event { - colno: number; - error: any; - filename: string; - lineno: number; - message: string; - initErrorEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, messageArg: string, filenameArg: string, linenoArg: number): void; -} - -declare var ErrorEvent: { - prototype: ErrorEvent; - new(): ErrorEvent; -} - -interface Event { - bubbles: boolean; - cancelBubble: boolean; - cancelable: boolean; - currentTarget: EventTarget; - defaultPrevented: boolean; - eventPhase: number; - isTrusted: boolean; - returnValue: boolean; - srcElement: Element; - target: EventTarget; - timeStamp: number; - type: string; - initEvent(eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean): void; - preventDefault(): void; - stopImmediatePropagation(): void; - stopPropagation(): void; - AT_TARGET: number; - BUBBLING_PHASE: number; - CAPTURING_PHASE: number; -} - -declare var Event: { - prototype: Event; - new(type: string, eventInitDict?: EventInit): Event; - AT_TARGET: number; - BUBBLING_PHASE: number; - CAPTURING_PHASE: number; -} - -interface EventTarget { - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - dispatchEvent(evt: Event): boolean; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var EventTarget: { - prototype: EventTarget; - new(): EventTarget; -} - -interface External { -} - -declare var External: { - prototype: External; - new(): External; -} - -interface File extends Blob { - lastModifiedDate: any; - name: string; -} - -declare var File: { - prototype: File; - new(): File; -} - -interface FileList { - length: number; - item(index: number): File; - [index: number]: File; -} - -declare var FileList: { - prototype: FileList; - new(): FileList; -} - -interface FileReader extends EventTarget, MSBaseReader { - error: DOMError; - readAsArrayBuffer(blob: Blob): void; - readAsBinaryString(blob: Blob): void; - readAsDataURL(blob: Blob): void; - readAsText(blob: Blob, encoding?: string): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var FileReader: { - prototype: FileReader; - new(): FileReader; -} - -interface FocusEvent extends UIEvent { - relatedTarget: EventTarget; - initFocusEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, relatedTargetArg: EventTarget): void; -} - -declare var FocusEvent: { - prototype: FocusEvent; - new(typeArg: string, eventInitDict?: FocusEventInit): FocusEvent; -} - -interface FormData { - append(name: any, value: any, blobName?: string): void; -} - -declare var FormData: { - prototype: FormData; - new(): FormData; -} - -interface GainNode extends AudioNode { - gain: AudioParam; -} - -declare var GainNode: { - prototype: GainNode; - new(): GainNode; -} - -interface Gamepad { - axes: number[]; - buttons: GamepadButton[]; - connected: boolean; - id: string; - index: number; - mapping: string; - timestamp: number; -} - -declare var Gamepad: { - prototype: Gamepad; - new(): Gamepad; -} - -interface GamepadButton { - pressed: boolean; - value: number; -} - -declare var GamepadButton: { - prototype: GamepadButton; - new(): GamepadButton; -} - -interface GamepadEvent extends Event { - gamepad: Gamepad; -} - -declare var GamepadEvent: { - prototype: GamepadEvent; - new(): GamepadEvent; -} - -interface Geolocation { - clearWatch(watchId: number): void; - getCurrentPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): void; - watchPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): number; -} - -declare var Geolocation: { - prototype: Geolocation; - new(): Geolocation; -} - -interface HTMLAllCollection extends HTMLCollection { - namedItem(name: string): Element; -} - -declare var HTMLAllCollection: { - prototype: HTMLAllCollection; - new(): HTMLAllCollection; -} - -interface HTMLAnchorElement extends HTMLElement { - Methods: string; - /** - * Sets or retrieves the character set used to encode the object. - */ - charset: string; - /** - * Sets or retrieves the coordinates of the object. - */ - coords: string; - /** - * Contains the anchor portion of the URL including the hash sign (#). - */ - hash: string; - /** - * Contains the hostname and port values of the URL. - */ - host: string; - /** - * Contains the hostname of a URL. - */ - hostname: string; - /** - * Sets or retrieves a destination URL or an anchor point. - */ - href: string; - /** - * Sets or retrieves the language code of the object. - */ - hreflang: string; - mimeType: string; - /** - * Sets or retrieves the shape of the object. - */ - name: string; - nameProp: string; - /** - * Contains the pathname of the URL. - */ - pathname: string; - /** - * Sets or retrieves the port number associated with a URL. - */ - port: string; - /** - * Contains the protocol of the URL. - */ - protocol: string; - protocolLong: string; - /** - * Sets or retrieves the relationship between the object and the destination of the link. - */ - rel: string; - /** - * Sets or retrieves the relationship between the object and the destination of the link. - */ - rev: string; - /** - * Sets or retrieves the substring of the href property that follows the question mark. - */ - search: string; - /** - * Sets or retrieves the shape of the object. - */ - shape: string; - /** - * Sets or retrieves the window or frame at which to target content. - */ - target: string; - /** - * Retrieves or sets the text of the object as a string. - */ - text: string; - type: string; - urn: string; - /** - * Returns a string representation of an object. - */ - toString(): string; -} - -declare var HTMLAnchorElement: { - prototype: HTMLAnchorElement; - new(): HTMLAnchorElement; -} - -interface HTMLAppletElement extends HTMLElement { - /** - * Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element. - */ - BaseHref: string; - align: string; - /** - * Sets or retrieves a text alternative to the graphic. - */ - alt: string; - /** - * Gets or sets the optional alternative HTML script to execute if the object fails to load. - */ - altHtml: string; - /** - * Sets or retrieves a character string that can be used to implement your own archive functionality for the object. - */ - archive: string; - border: string; - code: string; - /** - * Sets or retrieves the URL of the component. - */ - codeBase: string; - /** - * Sets or retrieves the Internet media type for the code associated with the object. - */ - codeType: string; - /** - * Address of a pointer to the document this page or frame contains. If there is no document, then null will be returned. - */ - contentDocument: Document; - /** - * Sets or retrieves the URL that references the data of the object. - */ - data: string; - /** - * Sets or retrieves a character string that can be used to implement your own declare functionality for the object. - */ - declare: boolean; - form: HTMLFormElement; - /** - * Sets or retrieves the height of the object. - */ - height: string; - hspace: number; - /** - * Sets or retrieves the shape of the object. - */ - name: string; - object: string; - /** - * Sets or retrieves a message to be displayed while an object is loading. - */ - standby: string; - /** - * Returns the content type of the object. - */ - type: string; - /** - * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map. - */ - useMap: string; - vspace: number; - width: number; -} - -declare var HTMLAppletElement: { - prototype: HTMLAppletElement; - new(): HTMLAppletElement; -} - -interface HTMLAreaElement extends HTMLElement { - /** - * Sets or retrieves a text alternative to the graphic. - */ - alt: string; - /** - * Sets or retrieves the coordinates of the object. - */ - coords: string; - /** - * Sets or retrieves the subsection of the href property that follows the number sign (#). - */ - hash: string; - /** - * Sets or retrieves the hostname and port number of the location or URL. - */ - host: string; - /** - * Sets or retrieves the host name part of the location or URL. - */ - hostname: string; - /** - * Sets or retrieves a destination URL or an anchor point. - */ - href: string; - /** - * Sets or gets whether clicks in this region cause action. - */ - noHref: boolean; - /** - * Sets or retrieves the file name or path specified by the object. - */ - pathname: string; - /** - * Sets or retrieves the port number associated with a URL. - */ - port: string; - /** - * Sets or retrieves the protocol portion of a URL. - */ - protocol: string; - rel: string; - /** - * Sets or retrieves the substring of the href property that follows the question mark. - */ - search: string; - /** - * Sets or retrieves the shape of the object. - */ - shape: string; - /** - * Sets or retrieves the window or frame at which to target content. - */ - target: string; - /** - * Returns a string representation of an object. - */ - toString(): string; -} - -declare var HTMLAreaElement: { - prototype: HTMLAreaElement; - new(): HTMLAreaElement; -} - -interface HTMLAreasCollection extends HTMLCollection { - /** - * Adds an element to the areas, controlRange, or options collection. - */ - add(element: HTMLElement, before?: HTMLElement): void; - add(element: HTMLElement, before?: number): void; - /** - * Removes an element from the collection. - */ - remove(index?: number): void; -} - -declare var HTMLAreasCollection: { - prototype: HTMLAreasCollection; - new(): HTMLAreasCollection; -} - -interface HTMLAudioElement extends HTMLMediaElement { -} - -declare var HTMLAudioElement: { - prototype: HTMLAudioElement; - new(): HTMLAudioElement; -} - -interface HTMLBRElement extends HTMLElement { - /** - * Sets or retrieves the side on which floating objects are not to be positioned when any IHTMLBlockElement is inserted into the document. - */ - clear: string; -} - -declare var HTMLBRElement: { - prototype: HTMLBRElement; - new(): HTMLBRElement; -} - -interface HTMLBaseElement extends HTMLElement { - /** - * Gets or sets the baseline URL on which relative links are based. - */ - href: string; - /** - * Sets or retrieves the window or frame at which to target content. - */ - target: string; -} - -declare var HTMLBaseElement: { - prototype: HTMLBaseElement; - new(): HTMLBaseElement; -} - -interface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty { - /** - * Sets or retrieves the current typeface family. - */ - face: string; - /** - * Sets or retrieves the font size of the object. - */ - size: number; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var HTMLBaseFontElement: { - prototype: HTMLBaseFontElement; - new(): HTMLBaseFontElement; -} - -interface HTMLBlockElement extends HTMLElement { - /** - * Sets or retrieves reference information about the object. - */ - cite: string; - clear: string; - /** - * Sets or retrieves the width of the object. - */ - width: number; -} - -declare var HTMLBlockElement: { - prototype: HTMLBlockElement; - new(): HTMLBlockElement; -} - -interface HTMLBodyElement extends HTMLElement { - aLink: any; - background: string; - bgColor: any; - bgProperties: string; - link: any; - noWrap: boolean; - onafterprint: (ev: Event) => any; - onbeforeprint: (ev: Event) => any; - onbeforeunload: (ev: BeforeUnloadEvent) => any; - onblur: (ev: FocusEvent) => any; - onerror: (ev: Event) => any; - onfocus: (ev: FocusEvent) => any; - onhashchange: (ev: HashChangeEvent) => any; - onload: (ev: Event) => any; - onmessage: (ev: MessageEvent) => any; - onoffline: (ev: Event) => any; - ononline: (ev: Event) => any; - onorientationchange: (ev: Event) => any; - onpagehide: (ev: PageTransitionEvent) => any; - onpageshow: (ev: PageTransitionEvent) => any; - onpopstate: (ev: PopStateEvent) => any; - onresize: (ev: UIEvent) => any; - onstorage: (ev: StorageEvent) => any; - onunload: (ev: Event) => any; - text: any; - vLink: any; - createTextRange(): TextRange; - addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "afterprint", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforeprint", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "beforeunload", listener: (ev: BeforeUnloadEvent) => any, useCapture?: boolean): void; - addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void; - addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "hashchange", listener: (ev: HashChangeEvent) => any, useCapture?: boolean): void; - addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void; - addEventListener(type: "offline", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "online", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "orientationchange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "pagehide", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pageshow", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void; - addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "popstate", listener: (ev: PopStateEvent) => any, useCapture?: boolean): void; - addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void; - addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "resize", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "storage", listener: (ev: StorageEvent) => any, useCapture?: boolean): void; - addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "unload", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var HTMLBodyElement: { - prototype: HTMLBodyElement; - new(): HTMLBodyElement; -} - -interface HTMLButtonElement extends HTMLElement { - /** - * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing. - */ - autofocus: boolean; - disabled: boolean; - /** - * Retrieves a reference to the form that the object is embedded in. - */ - form: HTMLFormElement; - /** - * Overrides the action attribute (where the data on a form is sent) on the parent form element. - */ - formAction: string; - /** - * Used to override the encoding (formEnctype attribute) specified on the form element. - */ - formEnctype: string; - /** - * Overrides the submit method attribute previously specified on a form element. - */ - formMethod: string; - /** - * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option. - */ - formNoValidate: string; - /** - * Overrides the target attribute on a form element. - */ - formTarget: string; - /** - * Sets or retrieves the name of the object. - */ - name: string; - status: any; - /** - * Gets the classification and default behavior of the button. - */ - type: string; - /** - * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. - */ - validationMessage: string; - /** - * Returns a ValidityState object that represents the validity states of an element. - */ - validity: ValidityState; - /** - * Sets or retrieves the default or selected value of the control. - */ - value: string; - /** - * Returns whether an element will successfully validate based on forms validation rules and constraints. - */ - willValidate: boolean; - /** - * Returns whether a form will validate when it is submitted, without having to submit it. - */ - checkValidity(): boolean; - /** - * Creates a TextRange object for the element. - */ - createTextRange(): TextRange; - /** - * Sets a custom error message that is displayed when a form is submitted. - * @param error Sets a custom error message that is displayed when a form is submitted. - */ - setCustomValidity(error: string): void; -} - -declare var HTMLButtonElement: { - prototype: HTMLButtonElement; - new(): HTMLButtonElement; -} - -interface HTMLCanvasElement extends HTMLElement { - /** - * Gets or sets the height of a canvas element on a document. - */ - height: number; - /** - * Gets or sets the width of a canvas element on a document. - */ - width: number; - /** - * Returns an object that provides methods and properties for drawing and manipulating images and graphics on a canvas element in a document. A context object includes information about colors, line widths, fonts, and other graphic parameters that can be drawn on a canvas. - * @param contextId The identifier (ID) of the type of canvas to create. Internet Explorer 9 and Internet Explorer 10 support only a 2-D context using canvas.getContext("2d"); IE11 Preview also supports 3-D or WebGL context using canvas.getContext("experimental-webgl"); - */ - getContext(contextId: "2d"): CanvasRenderingContext2D; - getContext(contextId: "experimental-webgl"): WebGLRenderingContext; - getContext(contextId: string, ...args: any[]): CanvasRenderingContext2D | WebGLRenderingContext; - /** - * Returns a blob object encoded as a Portable Network Graphics (PNG) format from a canvas image or drawing. - */ - msToBlob(): Blob; - /** - * Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element. - * @param type The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image. - */ - toDataURL(type?: string, ...args: any[]): string; -} - -declare var HTMLCanvasElement: { - prototype: HTMLCanvasElement; - new(): HTMLCanvasElement; -} - -interface HTMLCollection { - /** - * Sets or retrieves the number of objects in a collection. - */ - length: number; - /** - * Retrieves an object from various collections. - */ - item(nameOrIndex?: any, optionalIndex?: any): Element; - /** - * Retrieves a select object or an object from an options collection. - */ - namedItem(name: string): Element; - [index: number]: Element; -} - -declare var HTMLCollection: { - prototype: HTMLCollection; - new(): HTMLCollection; -} - -interface HTMLDDElement extends HTMLElement { - /** - * Sets or retrieves whether the browser automatically performs wordwrap. - */ - noWrap: boolean; -} - -declare var HTMLDDElement: { - prototype: HTMLDDElement; - new(): HTMLDDElement; -} - -interface HTMLDListElement extends HTMLElement { - compact: boolean; -} - -declare var HTMLDListElement: { - prototype: HTMLDListElement; - new(): HTMLDListElement; -} - -interface HTMLDTElement extends HTMLElement { - /** - * Sets or retrieves whether the browser automatically performs wordwrap. - */ - noWrap: boolean; -} - -declare var HTMLDTElement: { - prototype: HTMLDTElement; - new(): HTMLDTElement; -} - -interface HTMLDataListElement extends HTMLElement { - options: HTMLCollection; -} - -declare var HTMLDataListElement: { - prototype: HTMLDataListElement; - new(): HTMLDataListElement; -} - -interface HTMLDirectoryElement extends HTMLElement { - compact: boolean; -} - -declare var HTMLDirectoryElement: { - prototype: HTMLDirectoryElement; - new(): HTMLDirectoryElement; -} - -interface HTMLDivElement extends HTMLElement { - /** - * Sets or retrieves how the object is aligned with adjacent text. - */ - align: string; - /** - * Sets or retrieves whether the browser automatically performs wordwrap. - */ - noWrap: boolean; -} - -declare var HTMLDivElement: { - prototype: HTMLDivElement; - new(): HTMLDivElement; -} - -interface HTMLDocument extends Document { -} - -declare var HTMLDocument: { - prototype: HTMLDocument; - new(): HTMLDocument; -} - -interface HTMLElement extends Element { - accessKey: string; - children: HTMLCollection; - className: string; - contentEditable: string; - dataset: DOMStringMap; - dir: string; - draggable: boolean; - hidden: boolean; - hideFocus: boolean; - id: string; - innerHTML: string; - innerText: string; - isContentEditable: boolean; - lang: string; - offsetHeight: number; - offsetLeft: number; - offsetParent: Element; - offsetTop: number; - offsetWidth: number; - onabort: (ev: Event) => any; - onactivate: (ev: UIEvent) => any; - onbeforeactivate: (ev: UIEvent) => any; - onbeforecopy: (ev: DragEvent) => any; - onbeforecut: (ev: DragEvent) => any; - onbeforedeactivate: (ev: UIEvent) => any; - onbeforepaste: (ev: DragEvent) => any; - onblur: (ev: FocusEvent) => any; - oncanplay: (ev: Event) => any; - oncanplaythrough: (ev: Event) => any; - onchange: (ev: Event) => any; - onclick: (ev: MouseEvent) => any; - oncontextmenu: (ev: PointerEvent) => any; - oncopy: (ev: DragEvent) => any; - oncuechange: (ev: Event) => any; - oncut: (ev: DragEvent) => any; - ondblclick: (ev: MouseEvent) => any; - ondeactivate: (ev: UIEvent) => any; - ondrag: (ev: DragEvent) => any; - ondragend: (ev: DragEvent) => any; - ondragenter: (ev: DragEvent) => any; - ondragleave: (ev: DragEvent) => any; - ondragover: (ev: DragEvent) => any; - ondragstart: (ev: DragEvent) => any; - ondrop: (ev: DragEvent) => any; - ondurationchange: (ev: Event) => any; - onemptied: (ev: Event) => any; - onended: (ev: Event) => any; - onerror: (ev: Event) => any; - onfocus: (ev: FocusEvent) => any; - oninput: (ev: Event) => any; - onkeydown: (ev: KeyboardEvent) => any; - onkeypress: (ev: KeyboardEvent) => any; - onkeyup: (ev: KeyboardEvent) => any; - onload: (ev: Event) => any; - onloadeddata: (ev: Event) => any; - onloadedmetadata: (ev: Event) => any; - onloadstart: (ev: Event) => any; - onmousedown: (ev: MouseEvent) => any; - onmouseenter: (ev: MouseEvent) => any; - onmouseleave: (ev: MouseEvent) => any; - onmousemove: (ev: MouseEvent) => any; - onmouseout: (ev: MouseEvent) => any; - onmouseover: (ev: MouseEvent) => any; - onmouseup: (ev: MouseEvent) => any; - onmousewheel: (ev: MouseWheelEvent) => any; - onmscontentzoom: (ev: UIEvent) => any; - onmsmanipulationstatechanged: (ev: MSManipulationEvent) => any; - onpaste: (ev: DragEvent) => any; - onpause: (ev: Event) => any; - onplay: (ev: Event) => any; - onplaying: (ev: Event) => any; - onprogress: (ev: ProgressEvent) => any; - onratechange: (ev: Event) => any; - onreset: (ev: Event) => any; - onscroll: (ev: UIEvent) => any; - onseeked: (ev: Event) => any; - onseeking: (ev: Event) => any; - onselect: (ev: UIEvent) => any; - onselectstart: (ev: Event) => any; - onstalled: (ev: Event) => any; - onsubmit: (ev: Event) => any; - onsuspend: (ev: Event) => any; - ontimeupdate: (ev: Event) => any; - onvolumechange: (ev: Event) => any; - onwaiting: (ev: Event) => any; - outerHTML: string; - outerText: string; - spellcheck: boolean; - style: CSSStyleDeclaration; - tabIndex: number; - title: string; - blur(): void; - click(): void; - contains(child: HTMLElement): boolean; - dragDrop(): boolean; - focus(): void; - getElementsByClassName(classNames: string): NodeList; - insertAdjacentElement(position: string, insertedElement: Element): Element; - insertAdjacentHTML(where: string, html: string): void; - insertAdjacentText(where: string, text: string): void; - msGetInputContext(): MSInputMethodContext; - scrollIntoView(top?: boolean): void; - setActive(): void; - addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void; - addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void; - addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void; - addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var HTMLElement: { - prototype: HTMLElement; - new(): HTMLElement; -} - -interface HTMLEmbedElement extends HTMLElement, GetSVGDocument { - /** - * Sets or retrieves the height of the object. - */ - height: string; - hidden: any; - /** - * Gets or sets whether the DLNA PlayTo device is available. - */ - msPlayToDisabled: boolean; - /** - * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server. - */ - msPlayToPreferredSourceUri: string; - /** - * Gets or sets the primary DLNA PlayTo device. - */ - msPlayToPrimary: boolean; - /** - * Gets the source associated with the media element for use by the PlayToManager. - */ - msPlayToSource: any; - /** - * Sets or retrieves the name of the object. - */ - name: string; - /** - * Retrieves the palette used for the embedded document. - */ - palette: string; - /** - * Retrieves the URL of the plug-in used to view an embedded document. - */ - pluginspage: string; - readyState: string; - /** - * Sets or retrieves a URL to be loaded by the object. - */ - src: string; - /** - * Sets or retrieves the height and width units of the embed object. - */ - units: string; - /** - * Sets or retrieves the width of the object. - */ - width: string; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var HTMLEmbedElement: { - prototype: HTMLEmbedElement; - new(): HTMLEmbedElement; -} - -interface HTMLFieldSetElement extends HTMLElement { - /** - * Sets or retrieves how the object is aligned with adjacent text. - */ - align: string; - disabled: boolean; - /** - * Retrieves a reference to the form that the object is embedded in. - */ - form: HTMLFormElement; - /** - * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. - */ - validationMessage: string; - /** - * Returns a ValidityState object that represents the validity states of an element. - */ - validity: ValidityState; - /** - * Returns whether an element will successfully validate based on forms validation rules and constraints. - */ - willValidate: boolean; - /** - * Returns whether a form will validate when it is submitted, without having to submit it. - */ - checkValidity(): boolean; - /** - * Sets a custom error message that is displayed when a form is submitted. - * @param error Sets a custom error message that is displayed when a form is submitted. - */ - setCustomValidity(error: string): void; -} - -declare var HTMLFieldSetElement: { - prototype: HTMLFieldSetElement; - new(): HTMLFieldSetElement; -} - -interface HTMLFontElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty { - /** - * Sets or retrieves the current typeface family. - */ - face: string; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var HTMLFontElement: { - prototype: HTMLFontElement; - new(): HTMLFontElement; -} - -interface HTMLFormElement extends HTMLElement { - /** - * Sets or retrieves a list of character encodings for input data that must be accepted by the server processing the form. - */ - acceptCharset: string; - /** - * Sets or retrieves the URL to which the form content is sent for processing. - */ - action: string; - /** - * Specifies whether autocomplete is applied to an editable text field. - */ - autocomplete: string; - /** - * Retrieves a collection, in source order, of all controls in a given form. - */ - elements: HTMLCollection; - /** - * Sets or retrieves the MIME encoding for the form. - */ - encoding: string; - /** - * Sets or retrieves the encoding type for the form. - */ - enctype: string; - /** - * Sets or retrieves the number of objects in a collection. - */ - length: number; - /** - * Sets or retrieves how to send the form data to the server. - */ - method: string; - /** - * Sets or retrieves the name of the object. - */ - name: string; - /** - * Designates a form that is not validated when submitted. - */ - noValidate: boolean; - /** - * Sets or retrieves the window or frame at which to target content. - */ - target: string; - /** - * Returns whether a form will validate when it is submitted, without having to submit it. - */ - checkValidity(): boolean; - /** - * Retrieves a form object or an object from an elements collection. - * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is a Number, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made. - * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned. - */ - item(name?: any, index?: any): any; - /** - * Retrieves a form object or an object from an elements collection. - */ - namedItem(name: string): any; - /** - * Fires when the user resets a form. - */ - reset(): void; - /** - * Fires when a FORM is about to be submitted. - */ - submit(): void; - [name: string]: any; -} - -declare var HTMLFormElement: { - prototype: HTMLFormElement; - new(): HTMLFormElement; -} - -interface HTMLFrameElement extends HTMLElement, GetSVGDocument { - /** - * Specifies the properties of a border drawn around an object. - */ - border: string; - /** - * Sets or retrieves the border color of the object. - */ - borderColor: any; - /** - * Retrieves the document object of the page or frame. - */ - contentDocument: Document; - /** - * Retrieves the object of the specified. - */ - contentWindow: Window; - /** - * Sets or retrieves whether to display a border for the frame. - */ - frameBorder: string; - /** - * Sets or retrieves the amount of additional space between the frames. - */ - frameSpacing: any; - /** - * Sets or retrieves the height of the object. - */ - height: string | number; - /** - * Sets or retrieves a URI to a long description of the object. - */ - longDesc: string; - /** - * Sets or retrieves the top and bottom margin heights before displaying the text in a frame. - */ - marginHeight: string; - /** - * Sets or retrieves the left and right margin widths before displaying the text in a frame. - */ - marginWidth: string; - /** - * Sets or retrieves the frame name. - */ - name: string; - /** - * Sets or retrieves whether the user can resize the frame. - */ - noResize: boolean; - /** - * Raised when the object has been completely received from the server. - */ - onload: (ev: Event) => any; - /** - * Sets or retrieves whether the frame can be scrolled. - */ - scrolling: string; - /** - * Sets the value indicating whether the source file of a frame or iframe has specific security restrictions applied. - */ - security: any; - /** - * Sets or retrieves a URL to be loaded by the object. - */ - src: string; - /** - * Sets or retrieves the width of the object. - */ - width: string | number; - addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void; - addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void; - addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void; - addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var HTMLFrameElement: { - prototype: HTMLFrameElement; - new(): HTMLFrameElement; -} - -interface HTMLFrameSetElement extends HTMLElement { - border: string; - /** - * Sets or retrieves the border color of the object. - */ - borderColor: any; - /** - * Sets or retrieves the frame widths of the object. - */ - cols: string; - /** - * Sets or retrieves whether to display a border for the frame. - */ - frameBorder: string; - /** - * Sets or retrieves the amount of additional space between the frames. - */ - frameSpacing: any; - name: string; - onafterprint: (ev: Event) => any; - onbeforeprint: (ev: Event) => any; - onbeforeunload: (ev: BeforeUnloadEvent) => any; - /** - * Fires when the object loses the input focus. - */ - onblur: (ev: FocusEvent) => any; - onerror: (ev: Event) => any; - /** - * Fires when the object receives focus. - */ - onfocus: (ev: FocusEvent) => any; - onhashchange: (ev: HashChangeEvent) => any; - onload: (ev: Event) => any; - onmessage: (ev: MessageEvent) => any; - onoffline: (ev: Event) => any; - ononline: (ev: Event) => any; - onorientationchange: (ev: Event) => any; - onpagehide: (ev: PageTransitionEvent) => any; - onpageshow: (ev: PageTransitionEvent) => any; - onresize: (ev: UIEvent) => any; - onstorage: (ev: StorageEvent) => any; - onunload: (ev: Event) => any; - /** - * Sets or retrieves the frame heights of the object. - */ - rows: string; - addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforeprint", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "beforeunload", listener: (ev: BeforeUnloadEvent) => any, useCapture?: boolean): void; - addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void; - addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "hashchange", listener: (ev: HashChangeEvent) => any, useCapture?: boolean): void; - addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void; - addEventListener(type: "offline", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "online", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "orientationchange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "pagehide", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pageshow", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void; - addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void; - addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "resize", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "storage", listener: (ev: StorageEvent) => any, useCapture?: boolean): void; - addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "unload", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var HTMLFrameSetElement: { - prototype: HTMLFrameSetElement; - new(): HTMLFrameSetElement; -} - -interface HTMLHRElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty { - /** - * Sets or retrieves how the object is aligned with adjacent text. - */ - align: string; - /** - * Sets or retrieves whether the horizontal rule is drawn with 3-D shading. - */ - noShade: boolean; - /** - * Sets or retrieves the width of the object. - */ - width: number; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var HTMLHRElement: { - prototype: HTMLHRElement; - new(): HTMLHRElement; -} - -interface HTMLHeadElement extends HTMLElement { - profile: string; -} - -declare var HTMLHeadElement: { - prototype: HTMLHeadElement; - new(): HTMLHeadElement; -} - -interface HTMLHeadingElement extends HTMLElement { - /** - * Sets or retrieves a value that indicates the table alignment. - */ - align: string; - clear: string; -} - -declare var HTMLHeadingElement: { - prototype: HTMLHeadingElement; - new(): HTMLHeadingElement; -} - -interface HTMLHtmlElement extends HTMLElement { - /** - * Sets or retrieves the DTD version that governs the current document. - */ - version: string; -} - -declare var HTMLHtmlElement: { - prototype: HTMLHtmlElement; - new(): HTMLHtmlElement; -} - -interface HTMLIFrameElement extends HTMLElement, GetSVGDocument { - /** - * Sets or retrieves how the object is aligned with adjacent text. - */ - align: string; - allowFullscreen: boolean; - /** - * Specifies the properties of a border drawn around an object. - */ - border: string; - /** - * Retrieves the document object of the page or frame. - */ - contentDocument: Document; - /** - * Retrieves the object of the specified. - */ - contentWindow: Window; - /** - * Sets or retrieves whether to display a border for the frame. - */ - frameBorder: string; - /** - * Sets or retrieves the amount of additional space between the frames. - */ - frameSpacing: any; - /** - * Sets or retrieves the height of the object. - */ - height: string; - /** - * Sets or retrieves the horizontal margin for the object. - */ - hspace: number; - /** - * Sets or retrieves a URI to a long description of the object. - */ - longDesc: string; - /** - * Sets or retrieves the top and bottom margin heights before displaying the text in a frame. - */ - marginHeight: string; - /** - * Sets or retrieves the left and right margin widths before displaying the text in a frame. - */ - marginWidth: string; - /** - * Sets or retrieves the frame name. - */ - name: string; - /** - * Sets or retrieves whether the user can resize the frame. - */ - noResize: boolean; - /** - * Raised when the object has been completely received from the server. - */ - onload: (ev: Event) => any; - sandbox: DOMSettableTokenList; - /** - * Sets or retrieves whether the frame can be scrolled. - */ - scrolling: string; - /** - * Sets the value indicating whether the source file of a frame or iframe has specific security restrictions applied. - */ - security: any; - /** - * Sets or retrieves a URL to be loaded by the object. - */ - src: string; - /** - * Sets or retrieves the vertical margin for the object. - */ - vspace: number; - /** - * Sets or retrieves the width of the object. - */ - width: string; - addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void; - addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void; - addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void; - addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var HTMLIFrameElement: { - prototype: HTMLIFrameElement; - new(): HTMLIFrameElement; -} - -interface HTMLImageElement extends HTMLElement { - /** - * Sets or retrieves how the object is aligned with adjacent text. - */ - align: string; - /** - * Sets or retrieves a text alternative to the graphic. - */ - alt: string; - /** - * Specifies the properties of a border drawn around an object. - */ - border: string; - /** - * Retrieves whether the object is fully loaded. - */ - complete: boolean; - crossOrigin: string; - currentSrc: string; - /** - * Sets or retrieves the height of the object. - */ - height: number; - /** - * Sets or retrieves the width of the border to draw around the object. - */ - hspace: number; - /** - * Sets or retrieves whether the image is a server-side image map. - */ - isMap: boolean; - /** - * Sets or retrieves a Uniform Resource Identifier (URI) to a long description of the object. - */ - longDesc: string; - /** - * Gets or sets whether the DLNA PlayTo device is available. - */ - msPlayToDisabled: boolean; - msPlayToPreferredSourceUri: string; - /** - * Gets or sets the primary DLNA PlayTo device. - */ - msPlayToPrimary: boolean; - /** - * Gets the source associated with the media element for use by the PlayToManager. - */ - msPlayToSource: any; - /** - * Sets or retrieves the name of the object. - */ - name: string; - /** - * The original height of the image resource before sizing. - */ - naturalHeight: number; - /** - * The original width of the image resource before sizing. - */ - naturalWidth: number; - /** - * The address or URL of the a media resource that is to be considered. - */ - src: string; - srcset: string; - /** - * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map. - */ - useMap: string; - /** - * Sets or retrieves the vertical margin for the object. - */ - vspace: number; - /** - * Sets or retrieves the width of the object. - */ - width: number; - x: number; - y: number; - msGetAsCastingSource(): any; -} - -declare var HTMLImageElement: { - prototype: HTMLImageElement; - new(): HTMLImageElement; - create(): HTMLImageElement; -} - -interface HTMLInputElement extends HTMLElement { - /** - * Sets or retrieves a comma-separated list of content types. - */ - accept: string; - /** - * Sets or retrieves how the object is aligned with adjacent text. - */ - align: string; - /** - * Sets or retrieves a text alternative to the graphic. - */ - alt: string; - /** - * Specifies whether autocomplete is applied to an editable text field. - */ - autocomplete: string; - /** - * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing. - */ - autofocus: boolean; - /** - * Sets or retrieves the width of the border to draw around the object. - */ - border: string; - /** - * Sets or retrieves the state of the check box or radio button. - */ - checked: boolean; - /** - * Retrieves whether the object is fully loaded. - */ - complete: boolean; - /** - * Sets or retrieves the state of the check box or radio button. - */ - defaultChecked: boolean; - /** - * Sets or retrieves the initial contents of the object. - */ - defaultValue: string; - disabled: boolean; - /** - * Returns a FileList object on a file type input object. - */ - files: FileList; - /** - * Retrieves a reference to the form that the object is embedded in. - */ - form: HTMLFormElement; - /** - * Overrides the action attribute (where the data on a form is sent) on the parent form element. - */ - formAction: string; - /** - * Used to override the encoding (formEnctype attribute) specified on the form element. - */ - formEnctype: string; - /** - * Overrides the submit method attribute previously specified on a form element. - */ - formMethod: string; - /** - * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option. - */ - formNoValidate: string; - /** - * Overrides the target attribute on a form element. - */ - formTarget: string; - /** - * Sets or retrieves the height of the object. - */ - height: string; - /** - * Sets or retrieves the width of the border to draw around the object. - */ - hspace: number; - indeterminate: boolean; - /** - * Specifies the ID of a pre-defined datalist of options for an input element. - */ - list: HTMLElement; - /** - * Defines the maximum acceptable value for an input element with type="number".When used with the min and step attributes, lets you control the range and increment (such as only even numbers) that the user can enter into an input field. - */ - max: string; - /** - * Sets or retrieves the maximum number of characters that the user can enter in a text control. - */ - maxLength: number; - /** - * Defines the minimum acceptable value for an input element with type="number". When used with the max and step attributes, lets you control the range and increment (such as even numbers only) that the user can enter into an input field. - */ - min: string; - /** - * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list. - */ - multiple: boolean; - /** - * Sets or retrieves the name of the object. - */ - name: string; - /** - * Gets or sets a string containing a regular expression that the user's input must match. - */ - pattern: string; - /** - * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field. - */ - placeholder: string; - readOnly: boolean; - /** - * When present, marks an element that can't be submitted without a value. - */ - required: boolean; - /** - * Gets or sets the end position or offset of a text selection. - */ - selectionEnd: number; - /** - * Gets or sets the starting position or offset of a text selection. - */ - selectionStart: number; - size: number; - /** - * The address or URL of the a media resource that is to be considered. - */ - src: string; - status: boolean; - /** - * Defines an increment or jump between values that you want to allow the user to enter. When used with the max and min attributes, lets you control the range and increment (for example, allow only even numbers) that the user can enter into an input field. - */ - step: string; - /** - * Returns the content type of the object. - */ - type: string; - /** - * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map. - */ - useMap: string; - /** - * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. - */ - validationMessage: string; - /** - * Returns a ValidityState object that represents the validity states of an element. - */ - validity: ValidityState; - /** - * Returns the value of the data at the cursor's current position. - */ - value: string; - valueAsDate: Date; - /** - * Returns the input field value as a number. - */ - valueAsNumber: number; - /** - * Sets or retrieves the vertical margin for the object. - */ - vspace: number; - /** - * Sets or retrieves the width of the object. - */ - width: string; - /** - * Returns whether an element will successfully validate based on forms validation rules and constraints. - */ - willValidate: boolean; - /** - * Returns whether a form will validate when it is submitted, without having to submit it. - */ - checkValidity(): boolean; - /** - * Creates a TextRange object for the element. - */ - createTextRange(): TextRange; - /** - * Makes the selection equal to the current object. - */ - select(): void; - /** - * Sets a custom error message that is displayed when a form is submitted. - * @param error Sets a custom error message that is displayed when a form is submitted. - */ - setCustomValidity(error: string): void; - /** - * Sets the start and end positions of a selection in a text field. - * @param start The offset into the text field for the start of the selection. - * @param end The offset into the text field for the end of the selection. - */ - setSelectionRange(start: number, end: number): void; - /** - * Decrements a range input control's value by the value given by the Step attribute. If the optional parameter is used, it will decrement the input control's step value multiplied by the parameter's value. - * @param n Value to decrement the value by. - */ - stepDown(n?: number): void; - /** - * Increments a range input control's value by the value given by the Step attribute. If the optional parameter is used, will increment the input control's value by that value. - * @param n Value to increment the value by. - */ - stepUp(n?: number): void; -} - -declare var HTMLInputElement: { - prototype: HTMLInputElement; - new(): HTMLInputElement; -} - -interface HTMLIsIndexElement extends HTMLElement { - /** - * Sets or retrieves the URL to which the form content is sent for processing. - */ - action: string; - /** - * Retrieves a reference to the form that the object is embedded in. - */ - form: HTMLFormElement; - prompt: string; -} - -declare var HTMLIsIndexElement: { - prototype: HTMLIsIndexElement; - new(): HTMLIsIndexElement; -} - -interface HTMLLIElement extends HTMLElement { - type: string; - /** - * Sets or retrieves the value of a list item. - */ - value: number; -} - -declare var HTMLLIElement: { - prototype: HTMLLIElement; - new(): HTMLLIElement; -} - -interface HTMLLabelElement extends HTMLElement { - /** - * Retrieves a reference to the form that the object is embedded in. - */ - form: HTMLFormElement; - /** - * Sets or retrieves the object to which the given label object is assigned. - */ - htmlFor: string; -} - -declare var HTMLLabelElement: { - prototype: HTMLLabelElement; - new(): HTMLLabelElement; -} - -interface HTMLLegendElement extends HTMLElement { - /** - * Retrieves a reference to the form that the object is embedded in. - */ - align: string; - /** - * Retrieves a reference to the form that the object is embedded in. - */ - form: HTMLFormElement; -} - -declare var HTMLLegendElement: { - prototype: HTMLLegendElement; - new(): HTMLLegendElement; -} - -interface HTMLLinkElement extends HTMLElement, LinkStyle { - /** - * Sets or retrieves the character set used to encode the object. - */ - charset: string; - disabled: boolean; - /** - * Sets or retrieves a destination URL or an anchor point. - */ - href: string; - /** - * Sets or retrieves the language code of the object. - */ - hreflang: string; - /** - * Sets or retrieves the media type. - */ - media: string; - /** - * Sets or retrieves the relationship between the object and the destination of the link. - */ - rel: string; - /** - * Sets or retrieves the relationship between the object and the destination of the link. - */ - rev: string; - /** - * Sets or retrieves the window or frame at which to target content. - */ - target: string; - /** - * Sets or retrieves the MIME type of the object. - */ - type: string; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var HTMLLinkElement: { - prototype: HTMLLinkElement; - new(): HTMLLinkElement; -} - -interface HTMLMapElement extends HTMLElement { - /** - * Retrieves a collection of the area objects defined for the given map object. - */ - areas: HTMLAreasCollection; - /** - * Sets or retrieves the name of the object. - */ - name: string; -} - -declare var HTMLMapElement: { - prototype: HTMLMapElement; - new(): HTMLMapElement; -} - -interface HTMLMarqueeElement extends HTMLElement { - behavior: string; - bgColor: any; - direction: string; - height: string; - hspace: number; - loop: number; - onbounce: (ev: Event) => any; - onfinish: (ev: Event) => any; - onstart: (ev: Event) => any; - scrollAmount: number; - scrollDelay: number; - trueSpeed: boolean; - vspace: number; - width: string; - start(): void; - stop(): void; - addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "bounce", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void; - addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: "finish", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void; - addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void; - addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "start", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var HTMLMarqueeElement: { - prototype: HTMLMarqueeElement; - new(): HTMLMarqueeElement; -} - -interface HTMLMediaElement extends HTMLElement { - /** - * Returns an AudioTrackList object with the audio tracks for a given video element. - */ - audioTracks: AudioTrackList; - /** - * Gets or sets a value that indicates whether to start playing the media automatically. - */ - autoplay: boolean; - /** - * Gets a collection of buffered time ranges. - */ - buffered: TimeRanges; - /** - * Gets or sets a flag that indicates whether the client provides a set of controls for the media (in case the developer does not include controls for the player). - */ - controls: boolean; - /** - * Gets the address or URL of the current media resource that is selected by IHTMLMediaElement. - */ - currentSrc: string; - /** - * Gets or sets the current playback position, in seconds. - */ - currentTime: number; - defaultMuted: boolean; - /** - * Gets or sets the default playback rate when the user is not using fast forward or reverse for a video or audio resource. - */ - defaultPlaybackRate: number; - /** - * Returns the duration in seconds of the current media resource. A NaN value is returned if duration is not available, or Infinity if the media resource is streaming. - */ - duration: number; - /** - * Gets information about whether the playback has ended or not. - */ - ended: boolean; - /** - * Returns an object representing the current error state of the audio or video element. - */ - error: MediaError; - /** - * Gets or sets a flag to specify whether playback should restart after it completes. - */ - loop: boolean; - /** - * Specifies the purpose of the audio or video media, such as background audio or alerts. - */ - msAudioCategory: string; - /** - * Specifies the output device id that the audio will be sent to. - */ - msAudioDeviceType: string; - msGraphicsTrustStatus: MSGraphicsTrust; - /** - * Gets the MSMediaKeys object, which is used for decrypting media data, that is associated with this media element. - */ - msKeys: MSMediaKeys; - /** - * Gets or sets whether the DLNA PlayTo device is available. - */ - msPlayToDisabled: boolean; - /** - * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server. - */ - msPlayToPreferredSourceUri: string; - /** - * Gets or sets the primary DLNA PlayTo device. - */ - msPlayToPrimary: boolean; - /** - * Gets the source associated with the media element for use by the PlayToManager. - */ - msPlayToSource: any; - /** - * Specifies whether or not to enable low-latency playback on the media element. - */ - msRealTime: boolean; - /** - * Gets or sets a flag that indicates whether the audio (either audio or the audio track on video media) is muted. - */ - muted: boolean; - /** - * Gets the current network activity for the element. - */ - networkState: number; - onmsneedkey: (ev: MSMediaKeyNeededEvent) => any; - /** - * Gets a flag that specifies whether playback is paused. - */ - paused: boolean; - /** - * Gets or sets the current rate of speed for the media resource to play. This speed is expressed as a multiple of the normal speed of the media resource. - */ - playbackRate: number; - /** - * Gets TimeRanges for the current media resource that has been played. - */ - played: TimeRanges; - /** - * Gets or sets the current playback position, in seconds. - */ - preload: string; - readyState: any; - /** - * Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked. - */ - seekable: TimeRanges; - /** - * Gets a flag that indicates whether the the client is currently moving to a new playback position in the media resource. - */ - seeking: boolean; - /** - * The address or URL of the a media resource that is to be considered. - */ - src: string; - textTracks: TextTrackList; - videoTracks: VideoTrackList; - /** - * Gets or sets the volume level for audio portions of the media element. - */ - volume: number; - addTextTrack(kind: string, label?: string, language?: string): TextTrack; - /** - * Returns a string that specifies whether the client can play a given media resource type. - */ - canPlayType(type: string): string; - /** - * Fires immediately after the client loads the object. - */ - load(): void; - /** - * Clears all effects from the media pipeline. - */ - msClearEffects(): void; - msGetAsCastingSource(): any; - /** - * Inserts the specified audio effect into media pipeline. - */ - msInsertAudioEffect(activatableClassId: string, effectRequired: boolean, config?: any): void; - msSetMediaKeys(mediaKeys: MSMediaKeys): void; - /** - * Specifies the media protection manager for a given media pipeline. - */ - msSetMediaProtectionManager(mediaProtectionManager?: any): void; - /** - * Pauses the current playback and sets paused to TRUE. This can be used to test whether the media is playing or paused. You can also use the pause or play events to tell whether the media is playing or not. - */ - pause(): void; - /** - * Loads and starts playback of a media resource. - */ - play(): void; - HAVE_CURRENT_DATA: number; - HAVE_ENOUGH_DATA: number; - HAVE_FUTURE_DATA: number; - HAVE_METADATA: number; - HAVE_NOTHING: number; - NETWORK_EMPTY: number; - NETWORK_IDLE: number; - NETWORK_LOADING: number; - NETWORK_NO_SOURCE: number; - addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void; - addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void; - addEventListener(type: "msneedkey", listener: (ev: MSMediaKeyNeededEvent) => any, useCapture?: boolean): void; - addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void; - addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var HTMLMediaElement: { - prototype: HTMLMediaElement; - new(): HTMLMediaElement; - HAVE_CURRENT_DATA: number; - HAVE_ENOUGH_DATA: number; - HAVE_FUTURE_DATA: number; - HAVE_METADATA: number; - HAVE_NOTHING: number; - NETWORK_EMPTY: number; - NETWORK_IDLE: number; - NETWORK_LOADING: number; - NETWORK_NO_SOURCE: number; -} - -interface HTMLMenuElement extends HTMLElement { - compact: boolean; - type: string; -} - -declare var HTMLMenuElement: { - prototype: HTMLMenuElement; - new(): HTMLMenuElement; -} - -interface HTMLMetaElement extends HTMLElement { - /** - * Sets or retrieves the character set used to encode the object. - */ - charset: string; - /** - * Gets or sets meta-information to associate with httpEquiv or name. - */ - content: string; - /** - * Gets or sets information used to bind the value of a content attribute of a meta element to an HTTP response header. - */ - httpEquiv: string; - /** - * Sets or retrieves the value specified in the content attribute of the meta object. - */ - name: string; - /** - * Sets or retrieves a scheme to be used in interpreting the value of a property specified for the object. - */ - scheme: string; - /** - * Sets or retrieves the URL property that will be loaded after the specified time has elapsed. - */ - url: string; -} - -declare var HTMLMetaElement: { - prototype: HTMLMetaElement; - new(): HTMLMetaElement; -} - -interface HTMLModElement extends HTMLElement { - /** - * Sets or retrieves reference information about the object. - */ - cite: string; - /** - * Sets or retrieves the date and time of a modification to the object. - */ - dateTime: string; -} - -declare var HTMLModElement: { - prototype: HTMLModElement; - new(): HTMLModElement; -} - -interface HTMLNextIdElement extends HTMLElement { - n: string; -} - -declare var HTMLNextIdElement: { - prototype: HTMLNextIdElement; - new(): HTMLNextIdElement; -} - -interface HTMLOListElement extends HTMLElement { - compact: boolean; - /** - * The starting number. - */ - start: number; - type: string; -} - -declare var HTMLOListElement: { - prototype: HTMLOListElement; - new(): HTMLOListElement; -} - -interface HTMLObjectElement extends HTMLElement, GetSVGDocument { - /** - * Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element. - */ - BaseHref: string; - align: string; - /** - * Sets or retrieves a text alternative to the graphic. - */ - alt: string; - /** - * Gets or sets the optional alternative HTML script to execute if the object fails to load. - */ - altHtml: string; - /** - * Sets or retrieves a character string that can be used to implement your own archive functionality for the object. - */ - archive: string; - border: string; - /** - * Sets or retrieves the URL of the file containing the compiled Java class. - */ - code: string; - /** - * Sets or retrieves the URL of the component. - */ - codeBase: string; - /** - * Sets or retrieves the Internet media type for the code associated with the object. - */ - codeType: string; - /** - * Retrieves the document object of the page or frame. - */ - contentDocument: Document; - /** - * Sets or retrieves the URL that references the data of the object. - */ - data: string; - declare: boolean; - /** - * Retrieves a reference to the form that the object is embedded in. - */ - form: HTMLFormElement; - /** - * Sets or retrieves the height of the object. - */ - height: string; - hspace: number; - /** - * Gets or sets whether the DLNA PlayTo device is available. - */ - msPlayToDisabled: boolean; - /** - * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server. - */ - msPlayToPreferredSourceUri: string; - /** - * Gets or sets the primary DLNA PlayTo device. - */ - msPlayToPrimary: boolean; - /** - * Gets the source associated with the media element for use by the PlayToManager. - */ - msPlayToSource: any; - /** - * Sets or retrieves the name of the object. - */ - name: string; - /** - * Retrieves the contained object. - */ - object: any; - readyState: number; - /** - * Sets or retrieves a message to be displayed while an object is loading. - */ - standby: string; - /** - * Sets or retrieves the MIME type of the object. - */ - type: string; - /** - * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map. - */ - useMap: string; - /** - * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. - */ - validationMessage: string; - /** - * Returns a ValidityState object that represents the validity states of an element. - */ - validity: ValidityState; - vspace: number; - /** - * Sets or retrieves the width of the object. - */ - width: string; - /** - * Returns whether an element will successfully validate based on forms validation rules and constraints. - */ - willValidate: boolean; - /** - * Returns whether a form will validate when it is submitted, without having to submit it. - */ - checkValidity(): boolean; - /** - * Sets a custom error message that is displayed when a form is submitted. - * @param error Sets a custom error message that is displayed when a form is submitted. - */ - setCustomValidity(error: string): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var HTMLObjectElement: { - prototype: HTMLObjectElement; - new(): HTMLObjectElement; -} - -interface HTMLOptGroupElement extends HTMLElement { - /** - * Sets or retrieves the status of an option. - */ - defaultSelected: boolean; - disabled: boolean; - /** - * Retrieves a reference to the form that the object is embedded in. - */ - form: HTMLFormElement; - /** - * Sets or retrieves the ordinal position of an option in a list box. - */ - index: number; - /** - * Sets or retrieves a value that you can use to implement your own label functionality for the object. - */ - label: string; - /** - * Sets or retrieves whether the option in the list box is the default item. - */ - selected: boolean; - /** - * Sets or retrieves the text string specified by the option tag. - */ - text: string; - /** - * Sets or retrieves the value which is returned to the server when the form control is submitted. - */ - value: string; -} - -declare var HTMLOptGroupElement: { - prototype: HTMLOptGroupElement; - new(): HTMLOptGroupElement; -} - -interface HTMLOptionElement extends HTMLElement { - /** - * Sets or retrieves the status of an option. - */ - defaultSelected: boolean; - disabled: boolean; - /** - * Retrieves a reference to the form that the object is embedded in. - */ - form: HTMLFormElement; - /** - * Sets or retrieves the ordinal position of an option in a list box. - */ - index: number; - /** - * Sets or retrieves a value that you can use to implement your own label functionality for the object. - */ - label: string; - /** - * Sets or retrieves whether the option in the list box is the default item. - */ - selected: boolean; - /** - * Sets or retrieves the text string specified by the option tag. - */ - text: string; - /** - * Sets or retrieves the value which is returned to the server when the form control is submitted. - */ - value: string; -} - -declare var HTMLOptionElement: { - prototype: HTMLOptionElement; - new(): HTMLOptionElement; - create(): HTMLOptionElement; -} - -interface HTMLParagraphElement extends HTMLElement { - /** - * Sets or retrieves how the object is aligned with adjacent text. - */ - align: string; - clear: string; -} - -declare var HTMLParagraphElement: { - prototype: HTMLParagraphElement; - new(): HTMLParagraphElement; -} - -interface HTMLParamElement extends HTMLElement { - /** - * Sets or retrieves the name of an input parameter for an element. - */ - name: string; - /** - * Sets or retrieves the content type of the resource designated by the value attribute. - */ - type: string; - /** - * Sets or retrieves the value of an input parameter for an element. - */ - value: string; - /** - * Sets or retrieves the data type of the value attribute. - */ - valueType: string; -} - -declare var HTMLParamElement: { - prototype: HTMLParamElement; - new(): HTMLParamElement; -} - -interface HTMLPhraseElement extends HTMLElement { - /** - * Sets or retrieves reference information about the object. - */ - cite: string; - /** - * Sets or retrieves the date and time of a modification to the object. - */ - dateTime: string; -} - -declare var HTMLPhraseElement: { - prototype: HTMLPhraseElement; - new(): HTMLPhraseElement; -} - -interface HTMLPreElement extends HTMLElement { - /** - * Indicates a citation by rendering text in italic type. - */ - cite: string; - clear: string; - /** - * Sets or gets a value that you can use to implement your own width functionality for the object. - */ - width: number; -} - -declare var HTMLPreElement: { - prototype: HTMLPreElement; - new(): HTMLPreElement; -} - -interface HTMLProgressElement extends HTMLElement { - /** - * Retrieves a reference to the form that the object is embedded in. - */ - form: HTMLFormElement; - /** - * Defines the maximum, or "done" value for a progress element. - */ - max: number; - /** - * Returns the quotient of value/max when the value attribute is set (determinate progress bar), or -1 when the value attribute is missing (indeterminate progress bar). - */ - position: number; - /** - * Sets or gets the current value of a progress element. The value must be a non-negative number between 0 and the max value. - */ - value: number; -} - -declare var HTMLProgressElement: { - prototype: HTMLProgressElement; - new(): HTMLProgressElement; -} - -interface HTMLQuoteElement extends HTMLElement { - /** - * Sets or retrieves reference information about the object. - */ - cite: string; - /** - * Sets or retrieves the date and time of a modification to the object. - */ - dateTime: string; -} - -declare var HTMLQuoteElement: { - prototype: HTMLQuoteElement; - new(): HTMLQuoteElement; -} - -interface HTMLScriptElement extends HTMLElement { - async: boolean; - /** - * Sets or retrieves the character set used to encode the object. - */ - charset: string; - /** - * Sets or retrieves the status of the script. - */ - defer: boolean; - /** - * Sets or retrieves the event for which the script is written. - */ - event: string; - /** - * Sets or retrieves the object that is bound to the event script. - */ - htmlFor: string; - /** - * Retrieves the URL to an external file that contains the source code or data. - */ - src: string; - /** - * Retrieves or sets the text of the object as a string. - */ - text: string; - /** - * Sets or retrieves the MIME type for the associated scripting engine. - */ - type: string; -} - -declare var HTMLScriptElement: { - prototype: HTMLScriptElement; - new(): HTMLScriptElement; -} - -interface HTMLSelectElement extends HTMLElement { - /** - * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing. - */ - autofocus: boolean; - disabled: boolean; - /** - * Retrieves a reference to the form that the object is embedded in. - */ - form: HTMLFormElement; - /** - * Sets or retrieves the number of objects in a collection. - */ - length: number; - /** - * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list. - */ - multiple: boolean; - /** - * Sets or retrieves the name of the object. - */ - name: string; - options: HTMLSelectElement; - /** - * When present, marks an element that can't be submitted without a value. - */ - required: boolean; - /** - * Sets or retrieves the index of the selected option in a select object. - */ - selectedIndex: number; - /** - * Sets or retrieves the number of rows in the list box. - */ - size: number; - /** - * Retrieves the type of select control based on the value of the MULTIPLE attribute. - */ - type: string; - /** - * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. - */ - validationMessage: string; - /** - * Returns a ValidityState object that represents the validity states of an element. - */ - validity: ValidityState; - /** - * Sets or retrieves the value which is returned to the server when the form control is submitted. - */ - value: string; - /** - * Returns whether an element will successfully validate based on forms validation rules and constraints. - */ - willValidate: boolean; - /** - * Adds an element to the areas, controlRange, or options collection. - * @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection. - * @param before Variant of type Object that specifies an element to insert before, or null to append the object to the collection. - */ - add(element: HTMLElement, before?: HTMLElement): void; - add(element: HTMLElement, before?: number): void; - /** - * Returns whether a form will validate when it is submitted, without having to submit it. - */ - checkValidity(): boolean; - /** - * Retrieves a select object or an object from an options collection. - * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is an integer, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made. - * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned. - */ - item(name?: any, index?: any): any; - /** - * Retrieves a select object or an object from an options collection. - * @param namedItem A String that specifies the name or id property of the object to retrieve. A collection is returned if more than one match is made. - */ - namedItem(name: string): any; - /** - * Removes an element from the collection. - * @param index Number that specifies the zero-based index of the element to remove from the collection. - */ - remove(index?: number): void; - /** - * Sets a custom error message that is displayed when a form is submitted. - * @param error Sets a custom error message that is displayed when a form is submitted. - */ - setCustomValidity(error: string): void; - [name: string]: any; -} - -declare var HTMLSelectElement: { - prototype: HTMLSelectElement; - new(): HTMLSelectElement; -} - -interface HTMLSourceElement extends HTMLElement { - /** - * Gets or sets the intended media type of the media source. - */ - media: string; - msKeySystem: string; - /** - * The address or URL of the a media resource that is to be considered. - */ - src: string; - /** - * Gets or sets the MIME type of a media resource. - */ - type: string; -} - -declare var HTMLSourceElement: { - prototype: HTMLSourceElement; - new(): HTMLSourceElement; -} - -interface HTMLSpanElement extends HTMLElement { -} - -declare var HTMLSpanElement: { - prototype: HTMLSpanElement; - new(): HTMLSpanElement; -} - -interface HTMLStyleElement extends HTMLElement, LinkStyle { - /** - * Sets or retrieves the media type. - */ - media: string; - /** - * Retrieves the CSS language in which the style sheet is written. - */ - type: string; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var HTMLStyleElement: { - prototype: HTMLStyleElement; - new(): HTMLStyleElement; -} - -interface HTMLTableCaptionElement extends HTMLElement { - /** - * Sets or retrieves the alignment of the caption or legend. - */ - align: string; - /** - * Sets or retrieves whether the caption appears at the top or bottom of the table. - */ - vAlign: string; -} - -declare var HTMLTableCaptionElement: { - prototype: HTMLTableCaptionElement; - new(): HTMLTableCaptionElement; -} - -interface HTMLTableCellElement extends HTMLElement, HTMLTableAlignment { - /** - * Sets or retrieves abbreviated text for the object. - */ - abbr: string; - /** - * Sets or retrieves how the object is aligned with adjacent text. - */ - align: string; - /** - * Sets or retrieves a comma-delimited list of conceptual categories associated with the object. - */ - axis: string; - bgColor: any; - /** - * Retrieves the position of the object in the cells collection of a row. - */ - cellIndex: number; - /** - * Sets or retrieves the number columns in the table that the object should span. - */ - colSpan: number; - /** - * Sets or retrieves a list of header cells that provide information for the object. - */ - headers: string; - /** - * Sets or retrieves the height of the object. - */ - height: any; - /** - * Sets or retrieves whether the browser automatically performs wordwrap. - */ - noWrap: boolean; - /** - * Sets or retrieves how many rows in a table the cell should span. - */ - rowSpan: number; - /** - * Sets or retrieves the group of cells in a table to which the object's information applies. - */ - scope: string; - /** - * Sets or retrieves the width of the object. - */ - width: string; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var HTMLTableCellElement: { - prototype: HTMLTableCellElement; - new(): HTMLTableCellElement; -} - -interface HTMLTableColElement extends HTMLElement, HTMLTableAlignment { - /** - * Sets or retrieves the alignment of the object relative to the display or table. - */ - align: string; - /** - * Sets or retrieves the number of columns in the group. - */ - span: number; - /** - * Sets or retrieves the width of the object. - */ - width: any; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var HTMLTableColElement: { - prototype: HTMLTableColElement; - new(): HTMLTableColElement; -} - -interface HTMLTableDataCellElement extends HTMLTableCellElement { -} - -declare var HTMLTableDataCellElement: { - prototype: HTMLTableDataCellElement; - new(): HTMLTableDataCellElement; -} - -interface HTMLTableElement extends HTMLElement { - /** - * Sets or retrieves a value that indicates the table alignment. - */ - align: string; - bgColor: any; - /** - * Sets or retrieves the width of the border to draw around the object. - */ - border: string; - /** - * Sets or retrieves the border color of the object. - */ - borderColor: any; - /** - * Retrieves the caption object of a table. - */ - caption: HTMLTableCaptionElement; - /** - * Sets or retrieves the amount of space between the border of the cell and the content of the cell. - */ - cellPadding: string; - /** - * Sets or retrieves the amount of space between cells in a table. - */ - cellSpacing: string; - /** - * Sets or retrieves the number of columns in the table. - */ - cols: number; - /** - * Sets or retrieves the way the border frame around the table is displayed. - */ - frame: string; - /** - * Sets or retrieves the height of the object. - */ - height: any; - /** - * Sets or retrieves the number of horizontal rows contained in the object. - */ - rows: HTMLCollection; - /** - * Sets or retrieves which dividing lines (inner borders) are displayed. - */ - rules: string; - /** - * Sets or retrieves a description and/or structure of the object. - */ - summary: string; - /** - * Retrieves a collection of all tBody objects in the table. Objects in this collection are in source order. - */ - tBodies: HTMLCollection; - /** - * Retrieves the tFoot object of the table. - */ - tFoot: HTMLTableSectionElement; - /** - * Retrieves the tHead object of the table. - */ - tHead: HTMLTableSectionElement; - /** - * Sets or retrieves the width of the object. - */ - width: string; - /** - * Creates an empty caption element in the table. - */ - createCaption(): HTMLElement; - /** - * Creates an empty tBody element in the table. - */ - createTBody(): HTMLElement; - /** - * Creates an empty tFoot element in the table. - */ - createTFoot(): HTMLElement; - /** - * Returns the tHead element object if successful, or null otherwise. - */ - createTHead(): HTMLElement; - /** - * Deletes the caption element and its contents from the table. - */ - deleteCaption(): void; - /** - * Removes the specified row (tr) from the element and from the rows collection. - * @param index Number that specifies the zero-based position in the rows collection of the row to remove. - */ - deleteRow(index?: number): void; - /** - * Deletes the tFoot element and its contents from the table. - */ - deleteTFoot(): void; - /** - * Deletes the tHead element and its contents from the table. - */ - deleteTHead(): void; - /** - * Creates a new row (tr) in the table, and adds the row to the rows collection. - * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection. - */ - insertRow(index?: number): HTMLElement; -} - -declare var HTMLTableElement: { - prototype: HTMLTableElement; - new(): HTMLTableElement; -} - -interface HTMLTableHeaderCellElement extends HTMLTableCellElement { - /** - * Sets or retrieves the group of cells in a table to which the object's information applies. - */ - scope: string; -} - -declare var HTMLTableHeaderCellElement: { - prototype: HTMLTableHeaderCellElement; - new(): HTMLTableHeaderCellElement; -} - -interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment { - /** - * Sets or retrieves how the object is aligned with adjacent text. - */ - align: string; - bgColor: any; - /** - * Retrieves a collection of all cells in the table row. - */ - cells: HTMLCollection; - /** - * Sets or retrieves the height of the object. - */ - height: any; - /** - * Retrieves the position of the object in the rows collection for the table. - */ - rowIndex: number; - /** - * Retrieves the position of the object in the collection. - */ - sectionRowIndex: number; - /** - * Removes the specified cell from the table row, as well as from the cells collection. - * @param index Number that specifies the zero-based position of the cell to remove from the table row. If no value is provided, the last cell in the cells collection is deleted. - */ - deleteCell(index?: number): void; - /** - * Creates a new cell in the table row, and adds the cell to the cells collection. - * @param index Number that specifies where to insert the cell in the tr. The default value is -1, which appends the new cell to the end of the cells collection. - */ - insertCell(index?: number): HTMLElement; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var HTMLTableRowElement: { - prototype: HTMLTableRowElement; - new(): HTMLTableRowElement; -} - -interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment { - /** - * Sets or retrieves a value that indicates the table alignment. - */ - align: string; - /** - * Sets or retrieves the number of horizontal rows contained in the object. - */ - rows: HTMLCollection; - /** - * Removes the specified row (tr) from the element and from the rows collection. - * @param index Number that specifies the zero-based position in the rows collection of the row to remove. - */ - deleteRow(index?: number): void; - /** - * Creates a new row (tr) in the table, and adds the row to the rows collection. - * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection. - */ - insertRow(index?: number): HTMLElement; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var HTMLTableSectionElement: { - prototype: HTMLTableSectionElement; - new(): HTMLTableSectionElement; -} - -interface HTMLTextAreaElement extends HTMLElement { - /** - * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing. - */ - autofocus: boolean; - /** - * Sets or retrieves the width of the object. - */ - cols: number; - /** - * Sets or retrieves the initial contents of the object. - */ - defaultValue: string; - disabled: boolean; - /** - * Retrieves a reference to the form that the object is embedded in. - */ - form: HTMLFormElement; - /** - * Sets or retrieves the maximum number of characters that the user can enter in a text control. - */ - maxLength: number; - /** - * Sets or retrieves the name of the object. - */ - name: string; - /** - * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field. - */ - placeholder: string; - /** - * Sets or retrieves the value indicated whether the content of the object is read-only. - */ - readOnly: boolean; - /** - * When present, marks an element that can't be submitted without a value. - */ - required: boolean; - /** - * Sets or retrieves the number of horizontal rows contained in the object. - */ - rows: number; - /** - * Gets or sets the end position or offset of a text selection. - */ - selectionEnd: number; - /** - * Gets or sets the starting position or offset of a text selection. - */ - selectionStart: number; - /** - * Sets or retrieves the value indicating whether the control is selected. - */ - status: any; - /** - * Retrieves the type of control. - */ - type: string; - /** - * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. - */ - validationMessage: string; - /** - * Returns a ValidityState object that represents the validity states of an element. - */ - validity: ValidityState; - /** - * Retrieves or sets the text in the entry field of the textArea element. - */ - value: string; - /** - * Returns whether an element will successfully validate based on forms validation rules and constraints. - */ - willValidate: boolean; - /** - * Sets or retrieves how to handle wordwrapping in the object. - */ - wrap: string; - /** - * Returns whether a form will validate when it is submitted, without having to submit it. - */ - checkValidity(): boolean; - /** - * Creates a TextRange object for the element. - */ - createTextRange(): TextRange; - /** - * Highlights the input area of a form element. - */ - select(): void; - /** - * Sets a custom error message that is displayed when a form is submitted. - * @param error Sets a custom error message that is displayed when a form is submitted. - */ - setCustomValidity(error: string): void; - /** - * Sets the start and end positions of a selection in a text field. - * @param start The offset into the text field for the start of the selection. - * @param end The offset into the text field for the end of the selection. - */ - setSelectionRange(start: number, end: number): void; -} - -declare var HTMLTextAreaElement: { - prototype: HTMLTextAreaElement; - new(): HTMLTextAreaElement; -} - -interface HTMLTitleElement extends HTMLElement { - /** - * Retrieves or sets the text of the object as a string. - */ - text: string; -} - -declare var HTMLTitleElement: { - prototype: HTMLTitleElement; - new(): HTMLTitleElement; -} - -interface HTMLTrackElement extends HTMLElement { - default: boolean; - kind: string; - label: string; - readyState: number; - src: string; - srclang: string; - track: TextTrack; - ERROR: number; - LOADED: number; - LOADING: number; - NONE: number; -} - -declare var HTMLTrackElement: { - prototype: HTMLTrackElement; - new(): HTMLTrackElement; - ERROR: number; - LOADED: number; - LOADING: number; - NONE: number; -} - -interface HTMLUListElement extends HTMLElement { - compact: boolean; - type: string; -} - -declare var HTMLUListElement: { - prototype: HTMLUListElement; - new(): HTMLUListElement; -} - -interface HTMLUnknownElement extends HTMLElement { -} - -declare var HTMLUnknownElement: { - prototype: HTMLUnknownElement; - new(): HTMLUnknownElement; -} - -interface HTMLVideoElement extends HTMLMediaElement { - /** - * Gets or sets the height of the video element. - */ - height: number; - msHorizontalMirror: boolean; - msIsLayoutOptimalForPlayback: boolean; - msIsStereo3D: boolean; - msStereo3DPackingMode: string; - msStereo3DRenderMode: string; - msZoom: boolean; - onMSVideoFormatChanged: (ev: Event) => any; - onMSVideoFrameStepCompleted: (ev: Event) => any; - onMSVideoOptimalLayoutChanged: (ev: Event) => any; - /** - * Gets or sets a URL of an image to display, for example, like a movie poster. This can be a still frame from the video, or another image if no video data is available. - */ - poster: string; - /** - * Gets the intrinsic height of a video in CSS pixels, or zero if the dimensions are not known. - */ - videoHeight: number; - /** - * Gets the intrinsic width of a video in CSS pixels, or zero if the dimensions are not known. - */ - videoWidth: number; - webkitDisplayingFullscreen: boolean; - webkitSupportsFullscreen: boolean; - /** - * Gets or sets the width of the video element. - */ - width: number; - getVideoPlaybackQuality(): VideoPlaybackQuality; - msFrameStep(forward: boolean): void; - msInsertVideoEffect(activatableClassId: string, effectRequired: boolean, config?: any): void; - msSetVideoRectangle(left: number, top: number, right: number, bottom: number): void; - webkitEnterFullScreen(): void; - webkitEnterFullscreen(): void; - webkitExitFullScreen(): void; - webkitExitFullscreen(): void; - addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSVideoFormatChanged", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "MSVideoFrameStepCompleted", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "MSVideoOptimalLayoutChanged", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void; - addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void; - addEventListener(type: "msneedkey", listener: (ev: MSMediaKeyNeededEvent) => any, useCapture?: boolean): void; - addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void; - addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var HTMLVideoElement: { - prototype: HTMLVideoElement; - new(): HTMLVideoElement; -} - -interface HashChangeEvent extends Event { - newURL: string; - oldURL: string; -} - -declare var HashChangeEvent: { - prototype: HashChangeEvent; - new(type: string, eventInitDict?: HashChangeEventInit): HashChangeEvent; -} - -interface History { - length: number; - state: any; - back(distance?: any): void; - forward(distance?: any): void; - go(delta?: any): void; - pushState(statedata: any, title?: string, url?: string): void; - replaceState(statedata: any, title?: string, url?: string): void; -} - -declare var History: { - prototype: History; - new(): History; -} - -interface IDBCursor { - direction: string; - key: any; - primaryKey: any; - source: any; - advance(count: number): void; - continue(key?: any): void; - delete(): IDBRequest; - update(value: any): IDBRequest; - NEXT: string; - NEXT_NO_DUPLICATE: string; - PREV: string; - PREV_NO_DUPLICATE: string; -} - -declare var IDBCursor: { - prototype: IDBCursor; - new(): IDBCursor; - NEXT: string; - NEXT_NO_DUPLICATE: string; - PREV: string; - PREV_NO_DUPLICATE: string; -} - -interface IDBCursorWithValue extends IDBCursor { - value: any; -} - -declare var IDBCursorWithValue: { - prototype: IDBCursorWithValue; - new(): IDBCursorWithValue; -} - -interface IDBDatabase extends EventTarget { - name: string; - objectStoreNames: DOMStringList; - onabort: (ev: Event) => any; - onerror: (ev: Event) => any; - version: string; - close(): void; - createObjectStore(name: string, optionalParameters?: any): IDBObjectStore; - deleteObjectStore(name: string): void; - transaction(storeNames: any, mode?: string): IDBTransaction; - addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var IDBDatabase: { - prototype: IDBDatabase; - new(): IDBDatabase; -} - -interface IDBFactory { - cmp(first: any, second: any): number; - deleteDatabase(name: string): IDBOpenDBRequest; - open(name: string, version?: number): IDBOpenDBRequest; -} - -declare var IDBFactory: { - prototype: IDBFactory; - new(): IDBFactory; -} - -interface IDBIndex { - keyPath: string; - name: string; - objectStore: IDBObjectStore; - unique: boolean; - count(key?: any): IDBRequest; - get(key: any): IDBRequest; - getKey(key: any): IDBRequest; - openCursor(range?: IDBKeyRange, direction?: string): IDBRequest; - openKeyCursor(range?: IDBKeyRange, direction?: string): IDBRequest; -} - -declare var IDBIndex: { - prototype: IDBIndex; - new(): IDBIndex; -} - -interface IDBKeyRange { - lower: any; - lowerOpen: boolean; - upper: any; - upperOpen: boolean; -} - -declare var IDBKeyRange: { - prototype: IDBKeyRange; - new(): IDBKeyRange; - bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange; - lowerBound(bound: any, open?: boolean): IDBKeyRange; - only(value: any): IDBKeyRange; - upperBound(bound: any, open?: boolean): IDBKeyRange; -} - -interface IDBObjectStore { - indexNames: DOMStringList; - keyPath: string; - name: string; - transaction: IDBTransaction; - add(value: any, key?: any): IDBRequest; - clear(): IDBRequest; - count(key?: any): IDBRequest; - createIndex(name: string, keyPath: string, optionalParameters?: any): IDBIndex; - delete(key: any): IDBRequest; - deleteIndex(indexName: string): void; - get(key: any): IDBRequest; - index(name: string): IDBIndex; - openCursor(range?: any, direction?: string): IDBRequest; - put(value: any, key?: any): IDBRequest; -} - -declare var IDBObjectStore: { - prototype: IDBObjectStore; - new(): IDBObjectStore; -} - -interface IDBOpenDBRequest extends IDBRequest { - onblocked: (ev: Event) => any; - onupgradeneeded: (ev: IDBVersionChangeEvent) => any; - addEventListener(type: "blocked", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: "success", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "upgradeneeded", listener: (ev: IDBVersionChangeEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var IDBOpenDBRequest: { - prototype: IDBOpenDBRequest; - new(): IDBOpenDBRequest; -} - -interface IDBRequest extends EventTarget { - error: DOMError; - onerror: (ev: Event) => any; - onsuccess: (ev: Event) => any; - readyState: string; - result: any; - source: any; - transaction: IDBTransaction; - addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: "success", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var IDBRequest: { - prototype: IDBRequest; - new(): IDBRequest; -} - -interface IDBTransaction extends EventTarget { - db: IDBDatabase; - error: DOMError; - mode: string; - onabort: (ev: Event) => any; - oncomplete: (ev: Event) => any; - onerror: (ev: Event) => any; - abort(): void; - objectStore(name: string): IDBObjectStore; - READ_ONLY: string; - READ_WRITE: string; - VERSION_CHANGE: string; - addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "complete", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var IDBTransaction: { - prototype: IDBTransaction; - new(): IDBTransaction; - READ_ONLY: string; - READ_WRITE: string; - VERSION_CHANGE: string; -} - -interface IDBVersionChangeEvent extends Event { - newVersion: number; - oldVersion: number; -} - -declare var IDBVersionChangeEvent: { - prototype: IDBVersionChangeEvent; - new(): IDBVersionChangeEvent; -} - -interface ImageData { - data: number[]; - height: number; - width: number; -} - -declare var ImageData: { - prototype: ImageData; - new(): ImageData; -} - -interface KeyboardEvent extends UIEvent { - altKey: boolean; - char: string; - charCode: number; - ctrlKey: boolean; - key: string; - keyCode: number; - locale: string; - location: number; - metaKey: boolean; - repeat: boolean; - shiftKey: boolean; - which: number; - getModifierState(keyArg: string): boolean; - initKeyboardEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, keyArg: string, locationArg: number, modifiersListArg: string, repeat: boolean, locale: string): void; - DOM_KEY_LOCATION_JOYSTICK: number; - DOM_KEY_LOCATION_LEFT: number; - DOM_KEY_LOCATION_MOBILE: number; - DOM_KEY_LOCATION_NUMPAD: number; - DOM_KEY_LOCATION_RIGHT: number; - DOM_KEY_LOCATION_STANDARD: number; -} - -declare var KeyboardEvent: { - prototype: KeyboardEvent; - new(typeArg: string, eventInitDict?: KeyboardEventInit): KeyboardEvent; - DOM_KEY_LOCATION_JOYSTICK: number; - DOM_KEY_LOCATION_LEFT: number; - DOM_KEY_LOCATION_MOBILE: number; - DOM_KEY_LOCATION_NUMPAD: number; - DOM_KEY_LOCATION_RIGHT: number; - DOM_KEY_LOCATION_STANDARD: number; -} - -interface Location { - hash: string; - host: string; - hostname: string; - href: string; - origin: string; - pathname: string; - port: string; - protocol: string; - search: string; - assign(url: string): void; - reload(forcedReload?: boolean): void; - replace(url: string): void; - toString(): string; -} - -declare var Location: { - prototype: Location; - new(): Location; -} - -interface LongRunningScriptDetectedEvent extends Event { - executionTime: number; - stopPageScriptExecution: boolean; -} - -declare var LongRunningScriptDetectedEvent: { - prototype: LongRunningScriptDetectedEvent; - new(): LongRunningScriptDetectedEvent; -} - -interface MSApp { - clearTemporaryWebDataAsync(): MSAppAsyncOperation; - createBlobFromRandomAccessStream(type: string, seeker: any): Blob; - createDataPackage(object: any): any; - createDataPackageFromSelection(): any; - createFileFromStorageFile(storageFile: any): File; - createStreamFromInputStream(type: string, inputStream: any): MSStream; - execAsyncAtPriority(asynchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): void; - execAtPriority(synchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): any; - getCurrentPriority(): string; - getHtmlPrintDocumentSourceAsync(htmlDoc: any): any; - getViewId(view: any): any; - isTaskScheduledAtPriorityOrHigher(priority: string): boolean; - pageHandlesAllApplicationActivations(enabled: boolean): void; - suppressSubdownloadCredentialPrompts(suppress: boolean): void; - terminateApp(exceptionObject: any): void; - CURRENT: string; - HIGH: string; - IDLE: string; - NORMAL: string; -} -declare var MSApp: MSApp; - -interface MSAppAsyncOperation extends EventTarget { - error: DOMError; - oncomplete: (ev: Event) => any; - onerror: (ev: Event) => any; - readyState: number; - result: any; - start(): void; - COMPLETED: number; - ERROR: number; - STARTED: number; - addEventListener(type: "complete", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var MSAppAsyncOperation: { - prototype: MSAppAsyncOperation; - new(): MSAppAsyncOperation; - COMPLETED: number; - ERROR: number; - STARTED: number; -} - -interface MSBlobBuilder { - append(data: any, endings?: string): void; - getBlob(contentType?: string): Blob; -} - -declare var MSBlobBuilder: { - prototype: MSBlobBuilder; - new(): MSBlobBuilder; -} - -interface MSCSSMatrix { - a: number; - b: number; - c: number; - d: number; - e: number; - f: number; - m11: number; - m12: number; - m13: number; - m14: number; - m21: number; - m22: number; - m23: number; - m24: number; - m31: number; - m32: number; - m33: number; - m34: number; - m41: number; - m42: number; - m43: number; - m44: number; - inverse(): MSCSSMatrix; - multiply(secondMatrix: MSCSSMatrix): MSCSSMatrix; - rotate(angleX: number, angleY?: number, angleZ?: number): MSCSSMatrix; - rotateAxisAngle(x: number, y: number, z: number, angle: number): MSCSSMatrix; - scale(scaleX: number, scaleY?: number, scaleZ?: number): MSCSSMatrix; - setMatrixValue(value: string): void; - skewX(angle: number): MSCSSMatrix; - skewY(angle: number): MSCSSMatrix; - toString(): string; - translate(x: number, y: number, z?: number): MSCSSMatrix; -} - -declare var MSCSSMatrix: { - prototype: MSCSSMatrix; - new(text?: string): MSCSSMatrix; -} - -interface MSGesture { - target: Element; - addPointer(pointerId: number): void; - stop(): void; -} - -declare var MSGesture: { - prototype: MSGesture; - new(): MSGesture; -} - -interface MSGestureEvent extends UIEvent { - clientX: number; - clientY: number; - expansion: number; - gestureObject: any; - hwTimestamp: number; - offsetX: number; - offsetY: number; - rotation: number; - scale: number; - screenX: number; - screenY: number; - translationX: number; - translationY: number; - velocityAngular: number; - velocityExpansion: number; - velocityX: number; - velocityY: number; - initGestureEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, offsetXArg: number, offsetYArg: number, translationXArg: number, translationYArg: number, scaleArg: number, expansionArg: number, rotationArg: number, velocityXArg: number, velocityYArg: number, velocityExpansionArg: number, velocityAngularArg: number, hwTimestampArg: number): void; - MSGESTURE_FLAG_BEGIN: number; - MSGESTURE_FLAG_CANCEL: number; - MSGESTURE_FLAG_END: number; - MSGESTURE_FLAG_INERTIA: number; - MSGESTURE_FLAG_NONE: number; -} - -declare var MSGestureEvent: { - prototype: MSGestureEvent; - new(): MSGestureEvent; - MSGESTURE_FLAG_BEGIN: number; - MSGESTURE_FLAG_CANCEL: number; - MSGESTURE_FLAG_END: number; - MSGESTURE_FLAG_INERTIA: number; - MSGESTURE_FLAG_NONE: number; -} - -interface MSGraphicsTrust { - constrictionActive: boolean; - status: string; -} - -declare var MSGraphicsTrust: { - prototype: MSGraphicsTrust; - new(): MSGraphicsTrust; -} - -interface MSHTMLWebViewElement extends HTMLElement { - canGoBack: boolean; - canGoForward: boolean; - containsFullScreenElement: boolean; - documentTitle: string; - height: number; - settings: MSWebViewSettings; - src: string; - width: number; - addWebAllowedObject(name: string, applicationObject: any): void; - buildLocalStreamUri(contentIdentifier: string, relativePath: string): string; - capturePreviewToBlobAsync(): MSWebViewAsyncOperation; - captureSelectedContentToDataPackageAsync(): MSWebViewAsyncOperation; - getDeferredPermissionRequestById(id: number): DeferredPermissionRequest; - getDeferredPermissionRequests(): DeferredPermissionRequest[]; - goBack(): void; - goForward(): void; - invokeScriptAsync(scriptName: string, ...args: any[]): MSWebViewAsyncOperation; - navigate(uri: string): void; - navigateToLocalStreamUri(source: string, streamResolver: any): void; - navigateToString(contents: string): void; - navigateWithHttpRequestMessage(requestMessage: any): void; - refresh(): void; - stop(): void; -} - -declare var MSHTMLWebViewElement: { - prototype: MSHTMLWebViewElement; - new(): MSHTMLWebViewElement; -} - -interface MSHeaderFooter { - URL: string; - dateLong: string; - dateShort: string; - font: string; - htmlFoot: string; - htmlHead: string; - page: number; - pageTotal: number; - textFoot: string; - textHead: string; - timeLong: string; - timeShort: string; - title: string; -} - -declare var MSHeaderFooter: { - prototype: MSHeaderFooter; - new(): MSHeaderFooter; -} - -interface MSInputMethodContext extends EventTarget { - compositionEndOffset: number; - compositionStartOffset: number; - oncandidatewindowhide: (ev: Event) => any; - oncandidatewindowshow: (ev: Event) => any; - oncandidatewindowupdate: (ev: Event) => any; - target: HTMLElement; - getCandidateWindowClientRect(): ClientRect; - getCompositionAlternatives(): string[]; - hasComposition(): boolean; - isCandidateWindowVisible(): boolean; - addEventListener(type: "MSCandidateWindowHide", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "MSCandidateWindowShow", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "MSCandidateWindowUpdate", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var MSInputMethodContext: { - prototype: MSInputMethodContext; - new(): MSInputMethodContext; -} - -interface MSManipulationEvent extends UIEvent { - currentState: number; - inertiaDestinationX: number; - inertiaDestinationY: number; - lastState: number; - initMSManipulationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, lastState: number, currentState: number): void; - MS_MANIPULATION_STATE_ACTIVE: number; - MS_MANIPULATION_STATE_CANCELLED: number; - MS_MANIPULATION_STATE_COMMITTED: number; - MS_MANIPULATION_STATE_DRAGGING: number; - MS_MANIPULATION_STATE_INERTIA: number; - MS_MANIPULATION_STATE_PRESELECT: number; - MS_MANIPULATION_STATE_SELECTING: number; - MS_MANIPULATION_STATE_STOPPED: number; -} - -declare var MSManipulationEvent: { - prototype: MSManipulationEvent; - new(): MSManipulationEvent; - MS_MANIPULATION_STATE_ACTIVE: number; - MS_MANIPULATION_STATE_CANCELLED: number; - MS_MANIPULATION_STATE_COMMITTED: number; - MS_MANIPULATION_STATE_DRAGGING: number; - MS_MANIPULATION_STATE_INERTIA: number; - MS_MANIPULATION_STATE_PRESELECT: number; - MS_MANIPULATION_STATE_SELECTING: number; - MS_MANIPULATION_STATE_STOPPED: number; -} - -interface MSMediaKeyError { - code: number; - systemCode: number; - MS_MEDIA_KEYERR_CLIENT: number; - MS_MEDIA_KEYERR_DOMAIN: number; - MS_MEDIA_KEYERR_HARDWARECHANGE: number; - MS_MEDIA_KEYERR_OUTPUT: number; - MS_MEDIA_KEYERR_SERVICE: number; - MS_MEDIA_KEYERR_UNKNOWN: number; -} - -declare var MSMediaKeyError: { - prototype: MSMediaKeyError; - new(): MSMediaKeyError; - MS_MEDIA_KEYERR_CLIENT: number; - MS_MEDIA_KEYERR_DOMAIN: number; - MS_MEDIA_KEYERR_HARDWARECHANGE: number; - MS_MEDIA_KEYERR_OUTPUT: number; - MS_MEDIA_KEYERR_SERVICE: number; - MS_MEDIA_KEYERR_UNKNOWN: number; -} - -interface MSMediaKeyMessageEvent extends Event { - destinationURL: string; - message: Uint8Array; -} - -declare var MSMediaKeyMessageEvent: { - prototype: MSMediaKeyMessageEvent; - new(): MSMediaKeyMessageEvent; -} - -interface MSMediaKeyNeededEvent extends Event { - initData: Uint8Array; -} - -declare var MSMediaKeyNeededEvent: { - prototype: MSMediaKeyNeededEvent; - new(): MSMediaKeyNeededEvent; -} - -interface MSMediaKeySession extends EventTarget { - error: MSMediaKeyError; - keySystem: string; - sessionId: string; - close(): void; - update(key: Uint8Array): void; -} - -declare var MSMediaKeySession: { - prototype: MSMediaKeySession; - new(): MSMediaKeySession; -} - -interface MSMediaKeys { - keySystem: string; - createSession(type: string, initData: Uint8Array, cdmData?: Uint8Array): MSMediaKeySession; -} - -declare var MSMediaKeys: { - prototype: MSMediaKeys; - new(keySystem: string): MSMediaKeys; - isTypeSupported(keySystem: string, type?: string): boolean; -} - -interface MSMimeTypesCollection { - length: number; -} - -declare var MSMimeTypesCollection: { - prototype: MSMimeTypesCollection; - new(): MSMimeTypesCollection; -} - -interface MSPluginsCollection { - length: number; - refresh(reload?: boolean): void; -} - -declare var MSPluginsCollection: { - prototype: MSPluginsCollection; - new(): MSPluginsCollection; -} - -interface MSPointerEvent extends MouseEvent { - currentPoint: any; - height: number; - hwTimestamp: number; - intermediatePoints: any; - isPrimary: boolean; - pointerId: number; - pointerType: any; - pressure: number; - rotation: number; - tiltX: number; - tiltY: number; - width: number; - getCurrentPoint(element: Element): void; - getIntermediatePoints(element: Element): void; - initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void; -} - -declare var MSPointerEvent: { - prototype: MSPointerEvent; - new(typeArg: string, eventInitDict?: PointerEventInit): MSPointerEvent; -} - -interface MSPrintManagerTemplatePrinter extends MSTemplatePrinter, EventTarget { - percentScale: number; - showHeaderFooter: boolean; - shrinkToFit: boolean; - drawPreviewPage(element: HTMLElement, pageNumber: number): void; - endPrint(): void; - getPrintTaskOptionValue(key: string): any; - invalidatePreview(): void; - setPageCount(pageCount: number): void; - startPrint(): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var MSPrintManagerTemplatePrinter: { - prototype: MSPrintManagerTemplatePrinter; - new(): MSPrintManagerTemplatePrinter; -} - -interface MSRangeCollection { - length: number; - item(index: number): Range; - [index: number]: Range; -} - -declare var MSRangeCollection: { - prototype: MSRangeCollection; - new(): MSRangeCollection; -} - -interface MSSiteModeEvent extends Event { - actionURL: string; - buttonID: number; -} - -declare var MSSiteModeEvent: { - prototype: MSSiteModeEvent; - new(): MSSiteModeEvent; -} - -interface MSStream { - type: string; - msClose(): void; - msDetachStream(): any; -} - -declare var MSStream: { - prototype: MSStream; - new(): MSStream; -} - -interface MSStreamReader extends EventTarget, MSBaseReader { - error: DOMError; - readAsArrayBuffer(stream: MSStream, size?: number): void; - readAsBinaryString(stream: MSStream, size?: number): void; - readAsBlob(stream: MSStream, size?: number): void; - readAsDataURL(stream: MSStream, size?: number): void; - readAsText(stream: MSStream, encoding?: string, size?: number): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var MSStreamReader: { - prototype: MSStreamReader; - new(): MSStreamReader; -} - -interface MSTemplatePrinter { - collate: boolean; - copies: number; - currentPage: boolean; - currentPageAvail: boolean; - duplex: boolean; - footer: string; - frameActive: boolean; - frameActiveEnabled: boolean; - frameAsShown: boolean; - framesetDocument: boolean; - header: string; - headerFooterFont: string; - marginBottom: number; - marginLeft: number; - marginRight: number; - marginTop: number; - orientation: string; - pageFrom: number; - pageHeight: number; - pageTo: number; - pageWidth: number; - selectedPages: boolean; - selection: boolean; - selectionEnabled: boolean; - unprintableBottom: number; - unprintableLeft: number; - unprintableRight: number; - unprintableTop: number; - usePrinterCopyCollate: boolean; - createHeaderFooter(): MSHeaderFooter; - deviceSupports(property: string): any; - ensurePrintDialogDefaults(): boolean; - getPageMarginBottom(pageRule: CSSPageRule, pageWidth: number, pageHeight: number): any; - getPageMarginBottomImportant(pageRule: CSSPageRule): boolean; - getPageMarginLeft(pageRule: CSSPageRule, pageWidth: number, pageHeight: number): any; - getPageMarginLeftImportant(pageRule: CSSPageRule): boolean; - getPageMarginRight(pageRule: CSSPageRule, pageWidth: number, pageHeight: number): any; - getPageMarginRightImportant(pageRule: CSSPageRule): boolean; - getPageMarginTop(pageRule: CSSPageRule, pageWidth: number, pageHeight: number): any; - getPageMarginTopImportant(pageRule: CSSPageRule): boolean; - printBlankPage(): void; - printNonNative(document: any): boolean; - printNonNativeFrames(document: any, activeFrame: boolean): void; - printPage(element: HTMLElement): void; - showPageSetupDialog(): boolean; - showPrintDialog(): boolean; - startDoc(title: string): boolean; - stopDoc(): void; - updatePageStatus(status: number): void; -} - -declare var MSTemplatePrinter: { - prototype: MSTemplatePrinter; - new(): MSTemplatePrinter; -} - -interface MSWebViewAsyncOperation extends EventTarget { - error: DOMError; - oncomplete: (ev: Event) => any; - onerror: (ev: Event) => any; - readyState: number; - result: any; - target: MSHTMLWebViewElement; - type: number; - start(): void; - COMPLETED: number; - ERROR: number; - STARTED: number; - TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number; - TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number; - TYPE_INVOKE_SCRIPT: number; - addEventListener(type: "complete", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var MSWebViewAsyncOperation: { - prototype: MSWebViewAsyncOperation; - new(): MSWebViewAsyncOperation; - COMPLETED: number; - ERROR: number; - STARTED: number; - TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number; - TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number; - TYPE_INVOKE_SCRIPT: number; -} - -interface MSWebViewSettings { - isIndexedDBEnabled: boolean; - isJavaScriptEnabled: boolean; -} - -declare var MSWebViewSettings: { - prototype: MSWebViewSettings; - new(): MSWebViewSettings; -} - -interface MediaElementAudioSourceNode extends AudioNode { -} - -declare var MediaElementAudioSourceNode: { - prototype: MediaElementAudioSourceNode; - new(): MediaElementAudioSourceNode; -} - -interface MediaError { - code: number; - msExtendedCode: number; - MEDIA_ERR_ABORTED: number; - MEDIA_ERR_DECODE: number; - MEDIA_ERR_NETWORK: number; - MEDIA_ERR_SRC_NOT_SUPPORTED: number; - MS_MEDIA_ERR_ENCRYPTED: number; -} - -declare var MediaError: { - prototype: MediaError; - new(): MediaError; - MEDIA_ERR_ABORTED: number; - MEDIA_ERR_DECODE: number; - MEDIA_ERR_NETWORK: number; - MEDIA_ERR_SRC_NOT_SUPPORTED: number; - MS_MEDIA_ERR_ENCRYPTED: number; -} - -interface MediaList { - length: number; - mediaText: string; - appendMedium(newMedium: string): void; - deleteMedium(oldMedium: string): void; - item(index: number): string; - toString(): string; - [index: number]: string; -} - -declare var MediaList: { - prototype: MediaList; - new(): MediaList; -} - -interface MediaQueryList { - matches: boolean; - media: string; - addListener(listener: MediaQueryListListener): void; - removeListener(listener: MediaQueryListListener): void; -} - -declare var MediaQueryList: { - prototype: MediaQueryList; - new(): MediaQueryList; -} - -interface MediaSource extends EventTarget { - activeSourceBuffers: SourceBufferList; - duration: number; - readyState: string; - sourceBuffers: SourceBufferList; - addSourceBuffer(type: string): SourceBuffer; - endOfStream(error?: string): void; - removeSourceBuffer(sourceBuffer: SourceBuffer): void; -} - -declare var MediaSource: { - prototype: MediaSource; - new(): MediaSource; - isTypeSupported(type: string): boolean; -} - -interface MessageChannel { - port1: MessagePort; - port2: MessagePort; -} - -declare var MessageChannel: { - prototype: MessageChannel; - new(): MessageChannel; -} - -interface MessageEvent extends Event { - data: any; - origin: string; - ports: any; - source: Window; - initMessageEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, dataArg: any, originArg: string, lastEventIdArg: string, sourceArg: Window): void; -} - -declare var MessageEvent: { - prototype: MessageEvent; - new(): MessageEvent; -} - -interface MessagePort extends EventTarget { - onmessage: (ev: MessageEvent) => any; - close(): void; - postMessage(message?: any, ports?: any): void; - start(): void; - addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var MessagePort: { - prototype: MessagePort; - new(): MessagePort; -} - -interface MimeType { - description: string; - enabledPlugin: Plugin; - suffixes: string; - type: string; -} - -declare var MimeType: { - prototype: MimeType; - new(): MimeType; -} - -interface MimeTypeArray { - length: number; - item(index: number): Plugin; - namedItem(type: string): Plugin; - [index: number]: Plugin; -} - -declare var MimeTypeArray: { - prototype: MimeTypeArray; - new(): MimeTypeArray; -} - -interface MouseEvent extends UIEvent { - altKey: boolean; - button: number; - buttons: number; - clientX: number; - clientY: number; - ctrlKey: boolean; - fromElement: Element; - layerX: number; - layerY: number; - metaKey: boolean; - movementX: number; - movementY: number; - offsetX: number; - offsetY: number; - pageX: number; - pageY: number; - relatedTarget: EventTarget; - screenX: number; - screenY: number; - shiftKey: boolean; - toElement: Element; - which: number; - x: number; - y: number; - getModifierState(keyArg: string): boolean; - initMouseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget): void; -} - -declare var MouseEvent: { - prototype: MouseEvent; - new(typeArg: string, eventInitDict?: MouseEventInit): MouseEvent; -} - -interface MouseWheelEvent extends MouseEvent { - wheelDelta: number; - wheelDeltaX: number; - wheelDeltaY: number; - initMouseWheelEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: EventTarget, modifiersListArg: string, wheelDeltaArg: number): void; -} - -declare var MouseWheelEvent: { - prototype: MouseWheelEvent; - new(): MouseWheelEvent; -} - -interface MutationEvent extends Event { - attrChange: number; - attrName: string; - newValue: string; - prevValue: string; - relatedNode: Node; - initMutationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, relatedNodeArg: Node, prevValueArg: string, newValueArg: string, attrNameArg: string, attrChangeArg: number): void; - ADDITION: number; - MODIFICATION: number; - REMOVAL: number; -} - -declare var MutationEvent: { - prototype: MutationEvent; - new(): MutationEvent; - ADDITION: number; - MODIFICATION: number; - REMOVAL: number; -} - -interface MutationObserver { - disconnect(): void; - observe(target: Node, options: MutationObserverInit): void; - takeRecords(): MutationRecord[]; -} - -declare var MutationObserver: { - prototype: MutationObserver; - new(callback: MutationCallback): MutationObserver; -} - -interface MutationRecord { - addedNodes: NodeList; - attributeName: string; - attributeNamespace: string; - nextSibling: Node; - oldValue: string; - previousSibling: Node; - removedNodes: NodeList; - target: Node; - type: string; -} - -declare var MutationRecord: { - prototype: MutationRecord; - new(): MutationRecord; -} - -interface NamedNodeMap { - length: number; - getNamedItem(name: string): Attr; - getNamedItemNS(namespaceURI: string, localName: string): Attr; - item(index: number): Attr; - removeNamedItem(name: string): Attr; - removeNamedItemNS(namespaceURI: string, localName: string): Attr; - setNamedItem(arg: Attr): Attr; - setNamedItemNS(arg: Attr): Attr; - [index: number]: Attr; -} - -declare var NamedNodeMap: { - prototype: NamedNodeMap; - new(): NamedNodeMap; -} - -interface NavigationCompletedEvent extends NavigationEvent { - isSuccess: boolean; - webErrorStatus: number; -} - -declare var NavigationCompletedEvent: { - prototype: NavigationCompletedEvent; - new(): NavigationCompletedEvent; -} - -interface NavigationEvent extends Event { - uri: string; -} - -declare var NavigationEvent: { - prototype: NavigationEvent; - new(): NavigationEvent; -} - -interface NavigationEventWithReferrer extends NavigationEvent { - referer: string; -} - -declare var NavigationEventWithReferrer: { - prototype: NavigationEventWithReferrer; - new(): NavigationEventWithReferrer; -} - -interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorContentUtils, NavigatorStorageUtils, NavigatorGeolocation, MSNavigatorDoNotTrack, MSFileSaver { - appCodeName: string; - appMinorVersion: string; - browserLanguage: string; - connectionSpeed: number; - cookieEnabled: boolean; - cpuClass: string; - language: string; - maxTouchPoints: number; - mimeTypes: MSMimeTypesCollection; - msManipulationViewsEnabled: boolean; - msMaxTouchPoints: number; - msPointerEnabled: boolean; - plugins: MSPluginsCollection; - pointerEnabled: boolean; - systemLanguage: string; - userLanguage: string; - webdriver: boolean; - getGamepads(): Gamepad[]; - javaEnabled(): boolean; - msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var Navigator: { - prototype: Navigator; - new(): Navigator; -} - -interface Node extends EventTarget { - attributes: NamedNodeMap; - baseURI: string; - childNodes: NodeList; - firstChild: Node; - lastChild: Node; - localName: string; - namespaceURI: string; - nextSibling: Node; - nodeName: string; - nodeType: number; - nodeValue: string; - ownerDocument: Document; - parentElement: HTMLElement; - parentNode: Node; - prefix: string; - previousSibling: Node; - textContent: string; - appendChild(newChild: Node): Node; - cloneNode(deep?: boolean): Node; - compareDocumentPosition(other: Node): number; - hasAttributes(): boolean; - hasChildNodes(): boolean; - insertBefore(newChild: Node, refChild?: Node): Node; - isDefaultNamespace(namespaceURI: string): boolean; - isEqualNode(arg: Node): boolean; - isSameNode(other: Node): boolean; - lookupNamespaceURI(prefix: string): string; - lookupPrefix(namespaceURI: string): string; - normalize(): void; - removeChild(oldChild: Node): Node; - replaceChild(newChild: Node, oldChild: Node): Node; - ATTRIBUTE_NODE: number; - CDATA_SECTION_NODE: number; - COMMENT_NODE: number; - DOCUMENT_FRAGMENT_NODE: number; - DOCUMENT_NODE: number; - DOCUMENT_POSITION_CONTAINED_BY: number; - DOCUMENT_POSITION_CONTAINS: number; - DOCUMENT_POSITION_DISCONNECTED: number; - DOCUMENT_POSITION_FOLLOWING: number; - DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number; - DOCUMENT_POSITION_PRECEDING: number; - DOCUMENT_TYPE_NODE: number; - ELEMENT_NODE: number; - ENTITY_NODE: number; - ENTITY_REFERENCE_NODE: number; - NOTATION_NODE: number; - PROCESSING_INSTRUCTION_NODE: number; - TEXT_NODE: number; -} - -declare var Node: { - prototype: Node; - new(): Node; - ATTRIBUTE_NODE: number; - CDATA_SECTION_NODE: number; - COMMENT_NODE: number; - DOCUMENT_FRAGMENT_NODE: number; - DOCUMENT_NODE: number; - DOCUMENT_POSITION_CONTAINED_BY: number; - DOCUMENT_POSITION_CONTAINS: number; - DOCUMENT_POSITION_DISCONNECTED: number; - DOCUMENT_POSITION_FOLLOWING: number; - DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number; - DOCUMENT_POSITION_PRECEDING: number; - DOCUMENT_TYPE_NODE: number; - ELEMENT_NODE: number; - ENTITY_NODE: number; - ENTITY_REFERENCE_NODE: number; - NOTATION_NODE: number; - PROCESSING_INSTRUCTION_NODE: number; - TEXT_NODE: number; -} - -interface NodeFilter { - FILTER_ACCEPT: number; - FILTER_REJECT: number; - FILTER_SKIP: number; - SHOW_ALL: number; - SHOW_ATTRIBUTE: number; - SHOW_CDATA_SECTION: number; - SHOW_COMMENT: number; - SHOW_DOCUMENT: number; - SHOW_DOCUMENT_FRAGMENT: number; - SHOW_DOCUMENT_TYPE: number; - SHOW_ELEMENT: number; - SHOW_ENTITY: number; - SHOW_ENTITY_REFERENCE: number; - SHOW_NOTATION: number; - SHOW_PROCESSING_INSTRUCTION: number; - SHOW_TEXT: number; -} -declare var NodeFilter: NodeFilter; - -interface NodeIterator { - expandEntityReferences: boolean; - filter: NodeFilter; - root: Node; - whatToShow: number; - detach(): void; - nextNode(): Node; - previousNode(): Node; -} - -declare var NodeIterator: { - prototype: NodeIterator; - new(): NodeIterator; -} - -interface NodeList { - length: number; - item(index: number): Node; - [index: number]: Node; -} - -declare var NodeList: { - prototype: NodeList; - new(): NodeList; -} - -interface OES_element_index_uint { -} - -declare var OES_element_index_uint: { - prototype: OES_element_index_uint; - new(): OES_element_index_uint; -} - -interface OES_standard_derivatives { - FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number; -} - -declare var OES_standard_derivatives: { - prototype: OES_standard_derivatives; - new(): OES_standard_derivatives; - FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number; -} - -interface OES_texture_float { -} - -declare var OES_texture_float: { - prototype: OES_texture_float; - new(): OES_texture_float; -} - -interface OES_texture_float_linear { -} - -declare var OES_texture_float_linear: { - prototype: OES_texture_float_linear; - new(): OES_texture_float_linear; -} - -interface OfflineAudioCompletionEvent extends Event { - renderedBuffer: AudioBuffer; -} - -declare var OfflineAudioCompletionEvent: { - prototype: OfflineAudioCompletionEvent; - new(): OfflineAudioCompletionEvent; -} - -interface OfflineAudioContext extends AudioContext { - oncomplete: (ev: Event) => any; - startRendering(): void; - addEventListener(type: "complete", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var OfflineAudioContext: { - prototype: OfflineAudioContext; - new(numberOfChannels: number, length: number, sampleRate: number): OfflineAudioContext; -} - -interface OscillatorNode extends AudioNode { - detune: AudioParam; - frequency: AudioParam; - onended: (ev: Event) => any; - type: string; - setPeriodicWave(periodicWave: PeriodicWave): void; - start(when?: number): void; - stop(when?: number): void; - addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var OscillatorNode: { - prototype: OscillatorNode; - new(): OscillatorNode; -} - -interface PageTransitionEvent extends Event { - persisted: boolean; -} - -declare var PageTransitionEvent: { - prototype: PageTransitionEvent; - new(): PageTransitionEvent; -} - -interface PannerNode extends AudioNode { - coneInnerAngle: number; - coneOuterAngle: number; - coneOuterGain: number; - distanceModel: string; - maxDistance: number; - panningModel: string; - refDistance: number; - rolloffFactor: number; - setOrientation(x: number, y: number, z: number): void; - setPosition(x: number, y: number, z: number): void; - setVelocity(x: number, y: number, z: number): void; -} - -declare var PannerNode: { - prototype: PannerNode; - new(): PannerNode; -} - -interface PerfWidgetExternal { - activeNetworkRequestCount: number; - averageFrameTime: number; - averagePaintTime: number; - extraInformationEnabled: boolean; - independentRenderingEnabled: boolean; - irDisablingContentString: string; - irStatusAvailable: boolean; - maxCpuSpeed: number; - paintRequestsPerSecond: number; - performanceCounter: number; - performanceCounterFrequency: number; - addEventListener(eventType: string, callback: Function): void; - getMemoryUsage(): number; - getProcessCpuUsage(): number; - getRecentCpuUsage(last: number): any; - getRecentFrames(last: number): any; - getRecentMemoryUsage(last: number): any; - getRecentPaintRequests(last: number): any; - removeEventListener(eventType: string, callback: Function): void; - repositionWindow(x: number, y: number): void; - resizeWindow(width: number, height: number): void; -} - -declare var PerfWidgetExternal: { - prototype: PerfWidgetExternal; - new(): PerfWidgetExternal; -} - -interface Performance { - navigation: PerformanceNavigation; - timing: PerformanceTiming; - clearMarks(markName?: string): void; - clearMeasures(measureName?: string): void; - clearResourceTimings(): void; - getEntries(): any; - getEntriesByName(name: string, entryType?: string): any; - getEntriesByType(entryType: string): any; - getMarks(markName?: string): any; - getMeasures(measureName?: string): any; - mark(markName: string): void; - measure(measureName: string, startMarkName?: string, endMarkName?: string): void; - now(): number; - setResourceTimingBufferSize(maxSize: number): void; - toJSON(): any; -} - -declare var Performance: { - prototype: Performance; - new(): Performance; -} - -interface PerformanceEntry { - duration: number; - entryType: string; - name: string; - startTime: number; -} - -declare var PerformanceEntry: { - prototype: PerformanceEntry; - new(): PerformanceEntry; -} - -interface PerformanceMark extends PerformanceEntry { -} - -declare var PerformanceMark: { - prototype: PerformanceMark; - new(): PerformanceMark; -} - -interface PerformanceMeasure extends PerformanceEntry { -} - -declare var PerformanceMeasure: { - prototype: PerformanceMeasure; - new(): PerformanceMeasure; -} - -interface PerformanceNavigation { - redirectCount: number; - type: number; - toJSON(): any; - TYPE_BACK_FORWARD: number; - TYPE_NAVIGATE: number; - TYPE_RELOAD: number; - TYPE_RESERVED: number; -} - -declare var PerformanceNavigation: { - prototype: PerformanceNavigation; - new(): PerformanceNavigation; - TYPE_BACK_FORWARD: number; - TYPE_NAVIGATE: number; - TYPE_RELOAD: number; - TYPE_RESERVED: number; -} - -interface PerformanceNavigationTiming extends PerformanceEntry { - connectEnd: number; - connectStart: number; - domComplete: number; - domContentLoadedEventEnd: number; - domContentLoadedEventStart: number; - domInteractive: number; - domLoading: number; - domainLookupEnd: number; - domainLookupStart: number; - fetchStart: number; - loadEventEnd: number; - loadEventStart: number; - navigationStart: number; - redirectCount: number; - redirectEnd: number; - redirectStart: number; - requestStart: number; - responseEnd: number; - responseStart: number; - type: string; - unloadEventEnd: number; - unloadEventStart: number; -} - -declare var PerformanceNavigationTiming: { - prototype: PerformanceNavigationTiming; - new(): PerformanceNavigationTiming; -} - -interface PerformanceResourceTiming extends PerformanceEntry { - connectEnd: number; - connectStart: number; - domainLookupEnd: number; - domainLookupStart: number; - fetchStart: number; - initiatorType: string; - redirectEnd: number; - redirectStart: number; - requestStart: number; - responseEnd: number; - responseStart: number; -} - -declare var PerformanceResourceTiming: { - prototype: PerformanceResourceTiming; - new(): PerformanceResourceTiming; -} - -interface PerformanceTiming { - connectEnd: number; - connectStart: number; - domComplete: number; - domContentLoadedEventEnd: number; - domContentLoadedEventStart: number; - domInteractive: number; - domLoading: number; - domainLookupEnd: number; - domainLookupStart: number; - fetchStart: number; - loadEventEnd: number; - loadEventStart: number; - msFirstPaint: number; - navigationStart: number; - redirectEnd: number; - redirectStart: number; - requestStart: number; - responseEnd: number; - responseStart: number; - unloadEventEnd: number; - unloadEventStart: number; - toJSON(): any; -} - -declare var PerformanceTiming: { - prototype: PerformanceTiming; - new(): PerformanceTiming; -} - -interface PeriodicWave { -} - -declare var PeriodicWave: { - prototype: PeriodicWave; - new(): PeriodicWave; -} - -interface PermissionRequest extends DeferredPermissionRequest { - state: string; - defer(): void; -} - -declare var PermissionRequest: { - prototype: PermissionRequest; - new(): PermissionRequest; -} - -interface PermissionRequestedEvent extends Event { - permissionRequest: PermissionRequest; -} - -declare var PermissionRequestedEvent: { - prototype: PermissionRequestedEvent; - new(): PermissionRequestedEvent; -} - -interface Plugin { - description: string; - filename: string; - length: number; - name: string; - version: string; - item(index: number): MimeType; - namedItem(type: string): MimeType; - [index: number]: MimeType; -} - -declare var Plugin: { - prototype: Plugin; - new(): Plugin; -} - -interface PluginArray { - length: number; - item(index: number): Plugin; - namedItem(name: string): Plugin; - refresh(reload?: boolean): void; - [index: number]: Plugin; -} - -declare var PluginArray: { - prototype: PluginArray; - new(): PluginArray; -} - -interface PointerEvent extends MouseEvent { - currentPoint: any; - height: number; - hwTimestamp: number; - intermediatePoints: any; - isPrimary: boolean; - pointerId: number; - pointerType: any; - pressure: number; - rotation: number; - tiltX: number; - tiltY: number; - width: number; - getCurrentPoint(element: Element): void; - getIntermediatePoints(element: Element): void; - initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void; -} - -declare var PointerEvent: { - prototype: PointerEvent; - new(typeArg: string, eventInitDict?: PointerEventInit): PointerEvent; -} - -interface PopStateEvent extends Event { - state: any; - initPopStateEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, stateArg: any): void; -} - -declare var PopStateEvent: { - prototype: PopStateEvent; - new(): PopStateEvent; -} - -interface Position { - coords: Coordinates; - timestamp: Date; -} - -declare var Position: { - prototype: Position; - new(): Position; -} - -interface PositionError { - code: number; - message: string; - toString(): string; - PERMISSION_DENIED: number; - POSITION_UNAVAILABLE: number; - TIMEOUT: number; -} - -declare var PositionError: { - prototype: PositionError; - new(): PositionError; - PERMISSION_DENIED: number; - POSITION_UNAVAILABLE: number; - TIMEOUT: number; -} - -interface ProcessingInstruction extends CharacterData { - target: string; -} - -declare var ProcessingInstruction: { - prototype: ProcessingInstruction; - new(): ProcessingInstruction; -} - -interface ProgressEvent extends Event { - lengthComputable: boolean; - loaded: number; - total: number; - initProgressEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, lengthComputableArg: boolean, loadedArg: number, totalArg: number): void; -} - -declare var ProgressEvent: { - prototype: ProgressEvent; - new(): ProgressEvent; -} - -interface Range { - collapsed: boolean; - commonAncestorContainer: Node; - endContainer: Node; - endOffset: number; - startContainer: Node; - startOffset: number; - cloneContents(): DocumentFragment; - cloneRange(): Range; - collapse(toStart: boolean): void; - compareBoundaryPoints(how: number, sourceRange: Range): number; - createContextualFragment(fragment: string): DocumentFragment; - deleteContents(): void; - detach(): void; - expand(Unit: string): boolean; - extractContents(): DocumentFragment; - getBoundingClientRect(): ClientRect; - getClientRects(): ClientRectList; - insertNode(newNode: Node): void; - selectNode(refNode: Node): void; - selectNodeContents(refNode: Node): void; - setEnd(refNode: Node, offset: number): void; - setEndAfter(refNode: Node): void; - setEndBefore(refNode: Node): void; - setStart(refNode: Node, offset: number): void; - setStartAfter(refNode: Node): void; - setStartBefore(refNode: Node): void; - surroundContents(newParent: Node): void; - toString(): string; - END_TO_END: number; - END_TO_START: number; - START_TO_END: number; - START_TO_START: number; -} - -declare var Range: { - prototype: Range; - new(): Range; - END_TO_END: number; - END_TO_START: number; - START_TO_END: number; - START_TO_START: number; -} - -interface SVGAElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference { - target: SVGAnimatedString; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGAElement: { - prototype: SVGAElement; - new(): SVGAElement; -} - -interface SVGAngle { - unitType: number; - value: number; - valueAsString: string; - valueInSpecifiedUnits: number; - convertToSpecifiedUnits(unitType: number): void; - newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void; - SVG_ANGLETYPE_DEG: number; - SVG_ANGLETYPE_GRAD: number; - SVG_ANGLETYPE_RAD: number; - SVG_ANGLETYPE_UNKNOWN: number; - SVG_ANGLETYPE_UNSPECIFIED: number; -} - -declare var SVGAngle: { - prototype: SVGAngle; - new(): SVGAngle; - SVG_ANGLETYPE_DEG: number; - SVG_ANGLETYPE_GRAD: number; - SVG_ANGLETYPE_RAD: number; - SVG_ANGLETYPE_UNKNOWN: number; - SVG_ANGLETYPE_UNSPECIFIED: number; -} - -interface SVGAnimatedAngle { - animVal: SVGAngle; - baseVal: SVGAngle; -} - -declare var SVGAnimatedAngle: { - prototype: SVGAnimatedAngle; - new(): SVGAnimatedAngle; -} - -interface SVGAnimatedBoolean { - animVal: boolean; - baseVal: boolean; -} - -declare var SVGAnimatedBoolean: { - prototype: SVGAnimatedBoolean; - new(): SVGAnimatedBoolean; -} - -interface SVGAnimatedEnumeration { - animVal: number; - baseVal: number; -} - -declare var SVGAnimatedEnumeration: { - prototype: SVGAnimatedEnumeration; - new(): SVGAnimatedEnumeration; -} - -interface SVGAnimatedInteger { - animVal: number; - baseVal: number; -} - -declare var SVGAnimatedInteger: { - prototype: SVGAnimatedInteger; - new(): SVGAnimatedInteger; -} - -interface SVGAnimatedLength { - animVal: SVGLength; - baseVal: SVGLength; -} - -declare var SVGAnimatedLength: { - prototype: SVGAnimatedLength; - new(): SVGAnimatedLength; -} - -interface SVGAnimatedLengthList { - animVal: SVGLengthList; - baseVal: SVGLengthList; -} - -declare var SVGAnimatedLengthList: { - prototype: SVGAnimatedLengthList; - new(): SVGAnimatedLengthList; -} - -interface SVGAnimatedNumber { - animVal: number; - baseVal: number; -} - -declare var SVGAnimatedNumber: { - prototype: SVGAnimatedNumber; - new(): SVGAnimatedNumber; -} - -interface SVGAnimatedNumberList { - animVal: SVGNumberList; - baseVal: SVGNumberList; -} - -declare var SVGAnimatedNumberList: { - prototype: SVGAnimatedNumberList; - new(): SVGAnimatedNumberList; -} - -interface SVGAnimatedPreserveAspectRatio { - animVal: SVGPreserveAspectRatio; - baseVal: SVGPreserveAspectRatio; -} - -declare var SVGAnimatedPreserveAspectRatio: { - prototype: SVGAnimatedPreserveAspectRatio; - new(): SVGAnimatedPreserveAspectRatio; -} - -interface SVGAnimatedRect { - animVal: SVGRect; - baseVal: SVGRect; -} - -declare var SVGAnimatedRect: { - prototype: SVGAnimatedRect; - new(): SVGAnimatedRect; -} - -interface SVGAnimatedString { - animVal: string; - baseVal: string; -} - -declare var SVGAnimatedString: { - prototype: SVGAnimatedString; - new(): SVGAnimatedString; -} - -interface SVGAnimatedTransformList { - animVal: SVGTransformList; - baseVal: SVGTransformList; -} - -declare var SVGAnimatedTransformList: { - prototype: SVGAnimatedTransformList; - new(): SVGAnimatedTransformList; -} - -interface SVGCircleElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired { - cx: SVGAnimatedLength; - cy: SVGAnimatedLength; - r: SVGAnimatedLength; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGCircleElement: { - prototype: SVGCircleElement; - new(): SVGCircleElement; -} - -interface SVGClipPathElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGUnitTypes { - clipPathUnits: SVGAnimatedEnumeration; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGClipPathElement: { - prototype: SVGClipPathElement; - new(): SVGClipPathElement; -} - -interface SVGComponentTransferFunctionElement extends SVGElement { - amplitude: SVGAnimatedNumber; - exponent: SVGAnimatedNumber; - intercept: SVGAnimatedNumber; - offset: SVGAnimatedNumber; - slope: SVGAnimatedNumber; - tableValues: SVGAnimatedNumberList; - type: SVGAnimatedEnumeration; - SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number; - SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number; - SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number; - SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number; - SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number; - SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number; -} - -declare var SVGComponentTransferFunctionElement: { - prototype: SVGComponentTransferFunctionElement; - new(): SVGComponentTransferFunctionElement; - SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number; - SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number; - SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number; - SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number; - SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number; - SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number; -} - -interface SVGDefsElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired { - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGDefsElement: { - prototype: SVGDefsElement; - new(): SVGDefsElement; -} - -interface SVGDescElement extends SVGElement, SVGStylable, SVGLangSpace { - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGDescElement: { - prototype: SVGDescElement; - new(): SVGDescElement; -} - -interface SVGElement extends Element { - id: string; - onclick: (ev: MouseEvent) => any; - ondblclick: (ev: MouseEvent) => any; - onfocusin: (ev: FocusEvent) => any; - onfocusout: (ev: FocusEvent) => any; - onload: (ev: Event) => any; - onmousedown: (ev: MouseEvent) => any; - onmousemove: (ev: MouseEvent) => any; - onmouseout: (ev: MouseEvent) => any; - onmouseover: (ev: MouseEvent) => any; - onmouseup: (ev: MouseEvent) => any; - ownerSVGElement: SVGSVGElement; - viewportElement: SVGElement; - xmlbase: string; - addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void; - addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "focusin", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "focusout", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGElement: { - prototype: SVGElement; - new(): SVGElement; -} - -interface SVGElementInstance extends EventTarget { - childNodes: SVGElementInstanceList; - correspondingElement: SVGElement; - correspondingUseElement: SVGUseElement; - firstChild: SVGElementInstance; - lastChild: SVGElementInstance; - nextSibling: SVGElementInstance; - parentNode: SVGElementInstance; - previousSibling: SVGElementInstance; -} - -declare var SVGElementInstance: { - prototype: SVGElementInstance; - new(): SVGElementInstance; -} - -interface SVGElementInstanceList { - length: number; - item(index: number): SVGElementInstance; -} - -declare var SVGElementInstanceList: { - prototype: SVGElementInstanceList; - new(): SVGElementInstanceList; -} - -interface SVGEllipseElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired { - cx: SVGAnimatedLength; - cy: SVGAnimatedLength; - rx: SVGAnimatedLength; - ry: SVGAnimatedLength; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGEllipseElement: { - prototype: SVGEllipseElement; - new(): SVGEllipseElement; -} - -interface SVGFEBlendElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { - in1: SVGAnimatedString; - in2: SVGAnimatedString; - mode: SVGAnimatedEnumeration; - SVG_FEBLEND_MODE_COLOR: number; - SVG_FEBLEND_MODE_COLOR_BURN: number; - SVG_FEBLEND_MODE_COLOR_DODGE: number; - SVG_FEBLEND_MODE_DARKEN: number; - SVG_FEBLEND_MODE_DIFFERENCE: number; - SVG_FEBLEND_MODE_EXCLUSION: number; - SVG_FEBLEND_MODE_HARD_LIGHT: number; - SVG_FEBLEND_MODE_HUE: number; - SVG_FEBLEND_MODE_LIGHTEN: number; - SVG_FEBLEND_MODE_LUMINOSITY: number; - SVG_FEBLEND_MODE_MULTIPLY: number; - SVG_FEBLEND_MODE_NORMAL: number; - SVG_FEBLEND_MODE_OVERLAY: number; - SVG_FEBLEND_MODE_SATURATION: number; - SVG_FEBLEND_MODE_SCREEN: number; - SVG_FEBLEND_MODE_SOFT_LIGHT: number; - SVG_FEBLEND_MODE_UNKNOWN: number; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGFEBlendElement: { - prototype: SVGFEBlendElement; - new(): SVGFEBlendElement; - SVG_FEBLEND_MODE_COLOR: number; - SVG_FEBLEND_MODE_COLOR_BURN: number; - SVG_FEBLEND_MODE_COLOR_DODGE: number; - SVG_FEBLEND_MODE_DARKEN: number; - SVG_FEBLEND_MODE_DIFFERENCE: number; - SVG_FEBLEND_MODE_EXCLUSION: number; - SVG_FEBLEND_MODE_HARD_LIGHT: number; - SVG_FEBLEND_MODE_HUE: number; - SVG_FEBLEND_MODE_LIGHTEN: number; - SVG_FEBLEND_MODE_LUMINOSITY: number; - SVG_FEBLEND_MODE_MULTIPLY: number; - SVG_FEBLEND_MODE_NORMAL: number; - SVG_FEBLEND_MODE_OVERLAY: number; - SVG_FEBLEND_MODE_SATURATION: number; - SVG_FEBLEND_MODE_SCREEN: number; - SVG_FEBLEND_MODE_SOFT_LIGHT: number; - SVG_FEBLEND_MODE_UNKNOWN: number; -} - -interface SVGFEColorMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { - in1: SVGAnimatedString; - type: SVGAnimatedEnumeration; - values: SVGAnimatedNumberList; - SVG_FECOLORMATRIX_TYPE_HUEROTATE: number; - SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number; - SVG_FECOLORMATRIX_TYPE_MATRIX: number; - SVG_FECOLORMATRIX_TYPE_SATURATE: number; - SVG_FECOLORMATRIX_TYPE_UNKNOWN: number; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGFEColorMatrixElement: { - prototype: SVGFEColorMatrixElement; - new(): SVGFEColorMatrixElement; - SVG_FECOLORMATRIX_TYPE_HUEROTATE: number; - SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number; - SVG_FECOLORMATRIX_TYPE_MATRIX: number; - SVG_FECOLORMATRIX_TYPE_SATURATE: number; - SVG_FECOLORMATRIX_TYPE_UNKNOWN: number; -} - -interface SVGFEComponentTransferElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { - in1: SVGAnimatedString; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGFEComponentTransferElement: { - prototype: SVGFEComponentTransferElement; - new(): SVGFEComponentTransferElement; -} - -interface SVGFECompositeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { - in1: SVGAnimatedString; - in2: SVGAnimatedString; - k1: SVGAnimatedNumber; - k2: SVGAnimatedNumber; - k3: SVGAnimatedNumber; - k4: SVGAnimatedNumber; - operator: SVGAnimatedEnumeration; - SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number; - SVG_FECOMPOSITE_OPERATOR_ATOP: number; - SVG_FECOMPOSITE_OPERATOR_IN: number; - SVG_FECOMPOSITE_OPERATOR_OUT: number; - SVG_FECOMPOSITE_OPERATOR_OVER: number; - SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number; - SVG_FECOMPOSITE_OPERATOR_XOR: number; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGFECompositeElement: { - prototype: SVGFECompositeElement; - new(): SVGFECompositeElement; - SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number; - SVG_FECOMPOSITE_OPERATOR_ATOP: number; - SVG_FECOMPOSITE_OPERATOR_IN: number; - SVG_FECOMPOSITE_OPERATOR_OUT: number; - SVG_FECOMPOSITE_OPERATOR_OVER: number; - SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number; - SVG_FECOMPOSITE_OPERATOR_XOR: number; -} - -interface SVGFEConvolveMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { - bias: SVGAnimatedNumber; - divisor: SVGAnimatedNumber; - edgeMode: SVGAnimatedEnumeration; - in1: SVGAnimatedString; - kernelMatrix: SVGAnimatedNumberList; - kernelUnitLengthX: SVGAnimatedNumber; - kernelUnitLengthY: SVGAnimatedNumber; - orderX: SVGAnimatedInteger; - orderY: SVGAnimatedInteger; - preserveAlpha: SVGAnimatedBoolean; - targetX: SVGAnimatedInteger; - targetY: SVGAnimatedInteger; - SVG_EDGEMODE_DUPLICATE: number; - SVG_EDGEMODE_NONE: number; - SVG_EDGEMODE_UNKNOWN: number; - SVG_EDGEMODE_WRAP: number; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGFEConvolveMatrixElement: { - prototype: SVGFEConvolveMatrixElement; - new(): SVGFEConvolveMatrixElement; - SVG_EDGEMODE_DUPLICATE: number; - SVG_EDGEMODE_NONE: number; - SVG_EDGEMODE_UNKNOWN: number; - SVG_EDGEMODE_WRAP: number; -} - -interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { - diffuseConstant: SVGAnimatedNumber; - in1: SVGAnimatedString; - kernelUnitLengthX: SVGAnimatedNumber; - kernelUnitLengthY: SVGAnimatedNumber; - surfaceScale: SVGAnimatedNumber; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGFEDiffuseLightingElement: { - prototype: SVGFEDiffuseLightingElement; - new(): SVGFEDiffuseLightingElement; -} - -interface SVGFEDisplacementMapElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { - in1: SVGAnimatedString; - in2: SVGAnimatedString; - scale: SVGAnimatedNumber; - xChannelSelector: SVGAnimatedEnumeration; - yChannelSelector: SVGAnimatedEnumeration; - SVG_CHANNEL_A: number; - SVG_CHANNEL_B: number; - SVG_CHANNEL_G: number; - SVG_CHANNEL_R: number; - SVG_CHANNEL_UNKNOWN: number; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGFEDisplacementMapElement: { - prototype: SVGFEDisplacementMapElement; - new(): SVGFEDisplacementMapElement; - SVG_CHANNEL_A: number; - SVG_CHANNEL_B: number; - SVG_CHANNEL_G: number; - SVG_CHANNEL_R: number; - SVG_CHANNEL_UNKNOWN: number; -} - -interface SVGFEDistantLightElement extends SVGElement { - azimuth: SVGAnimatedNumber; - elevation: SVGAnimatedNumber; -} - -declare var SVGFEDistantLightElement: { - prototype: SVGFEDistantLightElement; - new(): SVGFEDistantLightElement; -} - -interface SVGFEFloodElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGFEFloodElement: { - prototype: SVGFEFloodElement; - new(): SVGFEFloodElement; -} - -interface SVGFEFuncAElement extends SVGComponentTransferFunctionElement { -} - -declare var SVGFEFuncAElement: { - prototype: SVGFEFuncAElement; - new(): SVGFEFuncAElement; -} - -interface SVGFEFuncBElement extends SVGComponentTransferFunctionElement { -} - -declare var SVGFEFuncBElement: { - prototype: SVGFEFuncBElement; - new(): SVGFEFuncBElement; -} - -interface SVGFEFuncGElement extends SVGComponentTransferFunctionElement { -} - -declare var SVGFEFuncGElement: { - prototype: SVGFEFuncGElement; - new(): SVGFEFuncGElement; -} - -interface SVGFEFuncRElement extends SVGComponentTransferFunctionElement { -} - -declare var SVGFEFuncRElement: { - prototype: SVGFEFuncRElement; - new(): SVGFEFuncRElement; -} - -interface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { - in1: SVGAnimatedString; - stdDeviationX: SVGAnimatedNumber; - stdDeviationY: SVGAnimatedNumber; - setStdDeviation(stdDeviationX: number, stdDeviationY: number): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGFEGaussianBlurElement: { - prototype: SVGFEGaussianBlurElement; - new(): SVGFEGaussianBlurElement; -} - -interface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttributes, SVGLangSpace, SVGURIReference, SVGExternalResourcesRequired { - preserveAspectRatio: SVGAnimatedPreserveAspectRatio; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGFEImageElement: { - prototype: SVGFEImageElement; - new(): SVGFEImageElement; -} - -interface SVGFEMergeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGFEMergeElement: { - prototype: SVGFEMergeElement; - new(): SVGFEMergeElement; -} - -interface SVGFEMergeNodeElement extends SVGElement { - in1: SVGAnimatedString; -} - -declare var SVGFEMergeNodeElement: { - prototype: SVGFEMergeNodeElement; - new(): SVGFEMergeNodeElement; -} - -interface SVGFEMorphologyElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { - in1: SVGAnimatedString; - operator: SVGAnimatedEnumeration; - radiusX: SVGAnimatedNumber; - radiusY: SVGAnimatedNumber; - SVG_MORPHOLOGY_OPERATOR_DILATE: number; - SVG_MORPHOLOGY_OPERATOR_ERODE: number; - SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGFEMorphologyElement: { - prototype: SVGFEMorphologyElement; - new(): SVGFEMorphologyElement; - SVG_MORPHOLOGY_OPERATOR_DILATE: number; - SVG_MORPHOLOGY_OPERATOR_ERODE: number; - SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number; -} - -interface SVGFEOffsetElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { - dx: SVGAnimatedNumber; - dy: SVGAnimatedNumber; - in1: SVGAnimatedString; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGFEOffsetElement: { - prototype: SVGFEOffsetElement; - new(): SVGFEOffsetElement; -} - -interface SVGFEPointLightElement extends SVGElement { - x: SVGAnimatedNumber; - y: SVGAnimatedNumber; - z: SVGAnimatedNumber; -} - -declare var SVGFEPointLightElement: { - prototype: SVGFEPointLightElement; - new(): SVGFEPointLightElement; -} - -interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { - in1: SVGAnimatedString; - kernelUnitLengthX: SVGAnimatedNumber; - kernelUnitLengthY: SVGAnimatedNumber; - specularConstant: SVGAnimatedNumber; - specularExponent: SVGAnimatedNumber; - surfaceScale: SVGAnimatedNumber; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGFESpecularLightingElement: { - prototype: SVGFESpecularLightingElement; - new(): SVGFESpecularLightingElement; -} - -interface SVGFESpotLightElement extends SVGElement { - limitingConeAngle: SVGAnimatedNumber; - pointsAtX: SVGAnimatedNumber; - pointsAtY: SVGAnimatedNumber; - pointsAtZ: SVGAnimatedNumber; - specularExponent: SVGAnimatedNumber; - x: SVGAnimatedNumber; - y: SVGAnimatedNumber; - z: SVGAnimatedNumber; -} - -declare var SVGFESpotLightElement: { - prototype: SVGFESpotLightElement; - new(): SVGFESpotLightElement; -} - -interface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { - in1: SVGAnimatedString; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGFETileElement: { - prototype: SVGFETileElement; - new(): SVGFETileElement; -} - -interface SVGFETurbulenceElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { - baseFrequencyX: SVGAnimatedNumber; - baseFrequencyY: SVGAnimatedNumber; - numOctaves: SVGAnimatedInteger; - seed: SVGAnimatedNumber; - stitchTiles: SVGAnimatedEnumeration; - type: SVGAnimatedEnumeration; - SVG_STITCHTYPE_NOSTITCH: number; - SVG_STITCHTYPE_STITCH: number; - SVG_STITCHTYPE_UNKNOWN: number; - SVG_TURBULENCE_TYPE_FRACTALNOISE: number; - SVG_TURBULENCE_TYPE_TURBULENCE: number; - SVG_TURBULENCE_TYPE_UNKNOWN: number; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGFETurbulenceElement: { - prototype: SVGFETurbulenceElement; - new(): SVGFETurbulenceElement; - SVG_STITCHTYPE_NOSTITCH: number; - SVG_STITCHTYPE_STITCH: number; - SVG_STITCHTYPE_UNKNOWN: number; - SVG_TURBULENCE_TYPE_FRACTALNOISE: number; - SVG_TURBULENCE_TYPE_TURBULENCE: number; - SVG_TURBULENCE_TYPE_UNKNOWN: number; -} - -interface SVGFilterElement extends SVGElement, SVGUnitTypes, SVGStylable, SVGLangSpace, SVGURIReference, SVGExternalResourcesRequired { - filterResX: SVGAnimatedInteger; - filterResY: SVGAnimatedInteger; - filterUnits: SVGAnimatedEnumeration; - height: SVGAnimatedLength; - primitiveUnits: SVGAnimatedEnumeration; - width: SVGAnimatedLength; - x: SVGAnimatedLength; - y: SVGAnimatedLength; - setFilterRes(filterResX: number, filterResY: number): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGFilterElement: { - prototype: SVGFilterElement; - new(): SVGFilterElement; -} - -interface SVGForeignObjectElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired { - height: SVGAnimatedLength; - width: SVGAnimatedLength; - x: SVGAnimatedLength; - y: SVGAnimatedLength; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGForeignObjectElement: { - prototype: SVGForeignObjectElement; - new(): SVGForeignObjectElement; -} - -interface SVGGElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired { - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGGElement: { - prototype: SVGGElement; - new(): SVGGElement; -} - -interface SVGGradientElement extends SVGElement, SVGStylable, SVGExternalResourcesRequired, SVGURIReference, SVGUnitTypes { - gradientTransform: SVGAnimatedTransformList; - gradientUnits: SVGAnimatedEnumeration; - spreadMethod: SVGAnimatedEnumeration; - SVG_SPREADMETHOD_PAD: number; - SVG_SPREADMETHOD_REFLECT: number; - SVG_SPREADMETHOD_REPEAT: number; - SVG_SPREADMETHOD_UNKNOWN: number; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGGradientElement: { - prototype: SVGGradientElement; - new(): SVGGradientElement; - SVG_SPREADMETHOD_PAD: number; - SVG_SPREADMETHOD_REFLECT: number; - SVG_SPREADMETHOD_REPEAT: number; - SVG_SPREADMETHOD_UNKNOWN: number; -} - -interface SVGImageElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference { - height: SVGAnimatedLength; - preserveAspectRatio: SVGAnimatedPreserveAspectRatio; - width: SVGAnimatedLength; - x: SVGAnimatedLength; - y: SVGAnimatedLength; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGImageElement: { - prototype: SVGImageElement; - new(): SVGImageElement; -} - -interface SVGLength { - unitType: number; - value: number; - valueAsString: string; - valueInSpecifiedUnits: number; - convertToSpecifiedUnits(unitType: number): void; - newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void; - SVG_LENGTHTYPE_CM: number; - SVG_LENGTHTYPE_EMS: number; - SVG_LENGTHTYPE_EXS: number; - SVG_LENGTHTYPE_IN: number; - SVG_LENGTHTYPE_MM: number; - SVG_LENGTHTYPE_NUMBER: number; - SVG_LENGTHTYPE_PC: number; - SVG_LENGTHTYPE_PERCENTAGE: number; - SVG_LENGTHTYPE_PT: number; - SVG_LENGTHTYPE_PX: number; - SVG_LENGTHTYPE_UNKNOWN: number; -} - -declare var SVGLength: { - prototype: SVGLength; - new(): SVGLength; - SVG_LENGTHTYPE_CM: number; - SVG_LENGTHTYPE_EMS: number; - SVG_LENGTHTYPE_EXS: number; - SVG_LENGTHTYPE_IN: number; - SVG_LENGTHTYPE_MM: number; - SVG_LENGTHTYPE_NUMBER: number; - SVG_LENGTHTYPE_PC: number; - SVG_LENGTHTYPE_PERCENTAGE: number; - SVG_LENGTHTYPE_PT: number; - SVG_LENGTHTYPE_PX: number; - SVG_LENGTHTYPE_UNKNOWN: number; -} - -interface SVGLengthList { - numberOfItems: number; - appendItem(newItem: SVGLength): SVGLength; - clear(): void; - getItem(index: number): SVGLength; - initialize(newItem: SVGLength): SVGLength; - insertItemBefore(newItem: SVGLength, index: number): SVGLength; - removeItem(index: number): SVGLength; - replaceItem(newItem: SVGLength, index: number): SVGLength; -} - -declare var SVGLengthList: { - prototype: SVGLengthList; - new(): SVGLengthList; -} - -interface SVGLineElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired { - x1: SVGAnimatedLength; - x2: SVGAnimatedLength; - y1: SVGAnimatedLength; - y2: SVGAnimatedLength; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGLineElement: { - prototype: SVGLineElement; - new(): SVGLineElement; -} - -interface SVGLinearGradientElement extends SVGGradientElement { - x1: SVGAnimatedLength; - x2: SVGAnimatedLength; - y1: SVGAnimatedLength; - y2: SVGAnimatedLength; -} - -declare var SVGLinearGradientElement: { - prototype: SVGLinearGradientElement; - new(): SVGLinearGradientElement; -} - -interface SVGMarkerElement extends SVGElement, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox { - markerHeight: SVGAnimatedLength; - markerUnits: SVGAnimatedEnumeration; - markerWidth: SVGAnimatedLength; - orientAngle: SVGAnimatedAngle; - orientType: SVGAnimatedEnumeration; - refX: SVGAnimatedLength; - refY: SVGAnimatedLength; - setOrientToAngle(angle: SVGAngle): void; - setOrientToAuto(): void; - SVG_MARKERUNITS_STROKEWIDTH: number; - SVG_MARKERUNITS_UNKNOWN: number; - SVG_MARKERUNITS_USERSPACEONUSE: number; - SVG_MARKER_ORIENT_ANGLE: number; - SVG_MARKER_ORIENT_AUTO: number; - SVG_MARKER_ORIENT_UNKNOWN: number; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGMarkerElement: { - prototype: SVGMarkerElement; - new(): SVGMarkerElement; - SVG_MARKERUNITS_STROKEWIDTH: number; - SVG_MARKERUNITS_UNKNOWN: number; - SVG_MARKERUNITS_USERSPACEONUSE: number; - SVG_MARKER_ORIENT_ANGLE: number; - SVG_MARKER_ORIENT_AUTO: number; - SVG_MARKER_ORIENT_UNKNOWN: number; -} - -interface SVGMaskElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGUnitTypes { - height: SVGAnimatedLength; - maskContentUnits: SVGAnimatedEnumeration; - maskUnits: SVGAnimatedEnumeration; - width: SVGAnimatedLength; - x: SVGAnimatedLength; - y: SVGAnimatedLength; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGMaskElement: { - prototype: SVGMaskElement; - new(): SVGMaskElement; -} - -interface SVGMatrix { - a: number; - b: number; - c: number; - d: number; - e: number; - f: number; - flipX(): SVGMatrix; - flipY(): SVGMatrix; - inverse(): SVGMatrix; - multiply(secondMatrix: SVGMatrix): SVGMatrix; - rotate(angle: number): SVGMatrix; - rotateFromVector(x: number, y: number): SVGMatrix; - scale(scaleFactor: number): SVGMatrix; - scaleNonUniform(scaleFactorX: number, scaleFactorY: number): SVGMatrix; - skewX(angle: number): SVGMatrix; - skewY(angle: number): SVGMatrix; - translate(x: number, y: number): SVGMatrix; -} - -declare var SVGMatrix: { - prototype: SVGMatrix; - new(): SVGMatrix; -} - -interface SVGMetadataElement extends SVGElement { -} - -declare var SVGMetadataElement: { - prototype: SVGMetadataElement; - new(): SVGMetadataElement; -} - -interface SVGNumber { - value: number; -} - -declare var SVGNumber: { - prototype: SVGNumber; - new(): SVGNumber; -} - -interface SVGNumberList { - numberOfItems: number; - appendItem(newItem: SVGNumber): SVGNumber; - clear(): void; - getItem(index: number): SVGNumber; - initialize(newItem: SVGNumber): SVGNumber; - insertItemBefore(newItem: SVGNumber, index: number): SVGNumber; - removeItem(index: number): SVGNumber; - replaceItem(newItem: SVGNumber, index: number): SVGNumber; -} - -declare var SVGNumberList: { - prototype: SVGNumberList; - new(): SVGNumberList; -} - -interface SVGPathElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPathData { - createSVGPathSegArcAbs(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcAbs; - createSVGPathSegArcRel(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcRel; - createSVGPathSegClosePath(): SVGPathSegClosePath; - createSVGPathSegCurvetoCubicAbs(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicAbs; - createSVGPathSegCurvetoCubicRel(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicRel; - createSVGPathSegCurvetoCubicSmoothAbs(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothAbs; - createSVGPathSegCurvetoCubicSmoothRel(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothRel; - createSVGPathSegCurvetoQuadraticAbs(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticAbs; - createSVGPathSegCurvetoQuadraticRel(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticRel; - createSVGPathSegCurvetoQuadraticSmoothAbs(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothAbs; - createSVGPathSegCurvetoQuadraticSmoothRel(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothRel; - createSVGPathSegLinetoAbs(x: number, y: number): SVGPathSegLinetoAbs; - createSVGPathSegLinetoHorizontalAbs(x: number): SVGPathSegLinetoHorizontalAbs; - createSVGPathSegLinetoHorizontalRel(x: number): SVGPathSegLinetoHorizontalRel; - createSVGPathSegLinetoRel(x: number, y: number): SVGPathSegLinetoRel; - createSVGPathSegLinetoVerticalAbs(y: number): SVGPathSegLinetoVerticalAbs; - createSVGPathSegLinetoVerticalRel(y: number): SVGPathSegLinetoVerticalRel; - createSVGPathSegMovetoAbs(x: number, y: number): SVGPathSegMovetoAbs; - createSVGPathSegMovetoRel(x: number, y: number): SVGPathSegMovetoRel; - getPathSegAtLength(distance: number): number; - getPointAtLength(distance: number): SVGPoint; - getTotalLength(): number; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGPathElement: { - prototype: SVGPathElement; - new(): SVGPathElement; -} - -interface SVGPathSeg { - pathSegType: number; - pathSegTypeAsLetter: string; - PATHSEG_ARC_ABS: number; - PATHSEG_ARC_REL: number; - PATHSEG_CLOSEPATH: number; - PATHSEG_CURVETO_CUBIC_ABS: number; - PATHSEG_CURVETO_CUBIC_REL: number; - PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number; - PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number; - PATHSEG_CURVETO_QUADRATIC_ABS: number; - PATHSEG_CURVETO_QUADRATIC_REL: number; - PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number; - PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number; - PATHSEG_LINETO_ABS: number; - PATHSEG_LINETO_HORIZONTAL_ABS: number; - PATHSEG_LINETO_HORIZONTAL_REL: number; - PATHSEG_LINETO_REL: number; - PATHSEG_LINETO_VERTICAL_ABS: number; - PATHSEG_LINETO_VERTICAL_REL: number; - PATHSEG_MOVETO_ABS: number; - PATHSEG_MOVETO_REL: number; - PATHSEG_UNKNOWN: number; -} - -declare var SVGPathSeg: { - prototype: SVGPathSeg; - new(): SVGPathSeg; - PATHSEG_ARC_ABS: number; - PATHSEG_ARC_REL: number; - PATHSEG_CLOSEPATH: number; - PATHSEG_CURVETO_CUBIC_ABS: number; - PATHSEG_CURVETO_CUBIC_REL: number; - PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number; - PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number; - PATHSEG_CURVETO_QUADRATIC_ABS: number; - PATHSEG_CURVETO_QUADRATIC_REL: number; - PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number; - PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number; - PATHSEG_LINETO_ABS: number; - PATHSEG_LINETO_HORIZONTAL_ABS: number; - PATHSEG_LINETO_HORIZONTAL_REL: number; - PATHSEG_LINETO_REL: number; - PATHSEG_LINETO_VERTICAL_ABS: number; - PATHSEG_LINETO_VERTICAL_REL: number; - PATHSEG_MOVETO_ABS: number; - PATHSEG_MOVETO_REL: number; - PATHSEG_UNKNOWN: number; -} - -interface SVGPathSegArcAbs extends SVGPathSeg { - angle: number; - largeArcFlag: boolean; - r1: number; - r2: number; - sweepFlag: boolean; - x: number; - y: number; -} - -declare var SVGPathSegArcAbs: { - prototype: SVGPathSegArcAbs; - new(): SVGPathSegArcAbs; -} - -interface SVGPathSegArcRel extends SVGPathSeg { - angle: number; - largeArcFlag: boolean; - r1: number; - r2: number; - sweepFlag: boolean; - x: number; - y: number; -} - -declare var SVGPathSegArcRel: { - prototype: SVGPathSegArcRel; - new(): SVGPathSegArcRel; -} - -interface SVGPathSegClosePath extends SVGPathSeg { -} - -declare var SVGPathSegClosePath: { - prototype: SVGPathSegClosePath; - new(): SVGPathSegClosePath; -} - -interface SVGPathSegCurvetoCubicAbs extends SVGPathSeg { - x: number; - x1: number; - x2: number; - y: number; - y1: number; - y2: number; -} - -declare var SVGPathSegCurvetoCubicAbs: { - prototype: SVGPathSegCurvetoCubicAbs; - new(): SVGPathSegCurvetoCubicAbs; -} - -interface SVGPathSegCurvetoCubicRel extends SVGPathSeg { - x: number; - x1: number; - x2: number; - y: number; - y1: number; - y2: number; -} - -declare var SVGPathSegCurvetoCubicRel: { - prototype: SVGPathSegCurvetoCubicRel; - new(): SVGPathSegCurvetoCubicRel; -} - -interface SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg { - x: number; - x2: number; - y: number; - y2: number; -} - -declare var SVGPathSegCurvetoCubicSmoothAbs: { - prototype: SVGPathSegCurvetoCubicSmoothAbs; - new(): SVGPathSegCurvetoCubicSmoothAbs; -} - -interface SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg { - x: number; - x2: number; - y: number; - y2: number; -} - -declare var SVGPathSegCurvetoCubicSmoothRel: { - prototype: SVGPathSegCurvetoCubicSmoothRel; - new(): SVGPathSegCurvetoCubicSmoothRel; -} - -interface SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg { - x: number; - x1: number; - y: number; - y1: number; -} - -declare var SVGPathSegCurvetoQuadraticAbs: { - prototype: SVGPathSegCurvetoQuadraticAbs; - new(): SVGPathSegCurvetoQuadraticAbs; -} - -interface SVGPathSegCurvetoQuadraticRel extends SVGPathSeg { - x: number; - x1: number; - y: number; - y1: number; -} - -declare var SVGPathSegCurvetoQuadraticRel: { - prototype: SVGPathSegCurvetoQuadraticRel; - new(): SVGPathSegCurvetoQuadraticRel; -} - -interface SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg { - x: number; - y: number; -} - -declare var SVGPathSegCurvetoQuadraticSmoothAbs: { - prototype: SVGPathSegCurvetoQuadraticSmoothAbs; - new(): SVGPathSegCurvetoQuadraticSmoothAbs; -} - -interface SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg { - x: number; - y: number; -} - -declare var SVGPathSegCurvetoQuadraticSmoothRel: { - prototype: SVGPathSegCurvetoQuadraticSmoothRel; - new(): SVGPathSegCurvetoQuadraticSmoothRel; -} - -interface SVGPathSegLinetoAbs extends SVGPathSeg { - x: number; - y: number; -} - -declare var SVGPathSegLinetoAbs: { - prototype: SVGPathSegLinetoAbs; - new(): SVGPathSegLinetoAbs; -} - -interface SVGPathSegLinetoHorizontalAbs extends SVGPathSeg { - x: number; -} - -declare var SVGPathSegLinetoHorizontalAbs: { - prototype: SVGPathSegLinetoHorizontalAbs; - new(): SVGPathSegLinetoHorizontalAbs; -} - -interface SVGPathSegLinetoHorizontalRel extends SVGPathSeg { - x: number; -} - -declare var SVGPathSegLinetoHorizontalRel: { - prototype: SVGPathSegLinetoHorizontalRel; - new(): SVGPathSegLinetoHorizontalRel; -} - -interface SVGPathSegLinetoRel extends SVGPathSeg { - x: number; - y: number; -} - -declare var SVGPathSegLinetoRel: { - prototype: SVGPathSegLinetoRel; - new(): SVGPathSegLinetoRel; -} - -interface SVGPathSegLinetoVerticalAbs extends SVGPathSeg { - y: number; -} - -declare var SVGPathSegLinetoVerticalAbs: { - prototype: SVGPathSegLinetoVerticalAbs; - new(): SVGPathSegLinetoVerticalAbs; -} - -interface SVGPathSegLinetoVerticalRel extends SVGPathSeg { - y: number; -} - -declare var SVGPathSegLinetoVerticalRel: { - prototype: SVGPathSegLinetoVerticalRel; - new(): SVGPathSegLinetoVerticalRel; -} - -interface SVGPathSegList { - numberOfItems: number; - appendItem(newItem: SVGPathSeg): SVGPathSeg; - clear(): void; - getItem(index: number): SVGPathSeg; - initialize(newItem: SVGPathSeg): SVGPathSeg; - insertItemBefore(newItem: SVGPathSeg, index: number): SVGPathSeg; - removeItem(index: number): SVGPathSeg; - replaceItem(newItem: SVGPathSeg, index: number): SVGPathSeg; -} - -declare var SVGPathSegList: { - prototype: SVGPathSegList; - new(): SVGPathSegList; -} - -interface SVGPathSegMovetoAbs extends SVGPathSeg { - x: number; - y: number; -} - -declare var SVGPathSegMovetoAbs: { - prototype: SVGPathSegMovetoAbs; - new(): SVGPathSegMovetoAbs; -} - -interface SVGPathSegMovetoRel extends SVGPathSeg { - x: number; - y: number; -} - -declare var SVGPathSegMovetoRel: { - prototype: SVGPathSegMovetoRel; - new(): SVGPathSegMovetoRel; -} - -interface SVGPatternElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox, SVGURIReference, SVGUnitTypes { - height: SVGAnimatedLength; - patternContentUnits: SVGAnimatedEnumeration; - patternTransform: SVGAnimatedTransformList; - patternUnits: SVGAnimatedEnumeration; - width: SVGAnimatedLength; - x: SVGAnimatedLength; - y: SVGAnimatedLength; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGPatternElement: { - prototype: SVGPatternElement; - new(): SVGPatternElement; -} - -interface SVGPoint { - x: number; - y: number; - matrixTransform(matrix: SVGMatrix): SVGPoint; -} - -declare var SVGPoint: { - prototype: SVGPoint; - new(): SVGPoint; -} - -interface SVGPointList { - numberOfItems: number; - appendItem(newItem: SVGPoint): SVGPoint; - clear(): void; - getItem(index: number): SVGPoint; - initialize(newItem: SVGPoint): SVGPoint; - insertItemBefore(newItem: SVGPoint, index: number): SVGPoint; - removeItem(index: number): SVGPoint; - replaceItem(newItem: SVGPoint, index: number): SVGPoint; -} - -declare var SVGPointList: { - prototype: SVGPointList; - new(): SVGPointList; -} - -interface SVGPolygonElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPoints { - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGPolygonElement: { - prototype: SVGPolygonElement; - new(): SVGPolygonElement; -} - -interface SVGPolylineElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPoints { - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGPolylineElement: { - prototype: SVGPolylineElement; - new(): SVGPolylineElement; -} - -interface SVGPreserveAspectRatio { - align: number; - meetOrSlice: number; - SVG_MEETORSLICE_MEET: number; - SVG_MEETORSLICE_SLICE: number; - SVG_MEETORSLICE_UNKNOWN: number; - SVG_PRESERVEASPECTRATIO_NONE: number; - SVG_PRESERVEASPECTRATIO_UNKNOWN: number; - SVG_PRESERVEASPECTRATIO_XMAXYMAX: number; - SVG_PRESERVEASPECTRATIO_XMAXYMID: number; - SVG_PRESERVEASPECTRATIO_XMAXYMIN: number; - SVG_PRESERVEASPECTRATIO_XMIDYMAX: number; - SVG_PRESERVEASPECTRATIO_XMIDYMID: number; - SVG_PRESERVEASPECTRATIO_XMIDYMIN: number; - SVG_PRESERVEASPECTRATIO_XMINYMAX: number; - SVG_PRESERVEASPECTRATIO_XMINYMID: number; - SVG_PRESERVEASPECTRATIO_XMINYMIN: number; -} - -declare var SVGPreserveAspectRatio: { - prototype: SVGPreserveAspectRatio; - new(): SVGPreserveAspectRatio; - SVG_MEETORSLICE_MEET: number; - SVG_MEETORSLICE_SLICE: number; - SVG_MEETORSLICE_UNKNOWN: number; - SVG_PRESERVEASPECTRATIO_NONE: number; - SVG_PRESERVEASPECTRATIO_UNKNOWN: number; - SVG_PRESERVEASPECTRATIO_XMAXYMAX: number; - SVG_PRESERVEASPECTRATIO_XMAXYMID: number; - SVG_PRESERVEASPECTRATIO_XMAXYMIN: number; - SVG_PRESERVEASPECTRATIO_XMIDYMAX: number; - SVG_PRESERVEASPECTRATIO_XMIDYMID: number; - SVG_PRESERVEASPECTRATIO_XMIDYMIN: number; - SVG_PRESERVEASPECTRATIO_XMINYMAX: number; - SVG_PRESERVEASPECTRATIO_XMINYMID: number; - SVG_PRESERVEASPECTRATIO_XMINYMIN: number; -} - -interface SVGRadialGradientElement extends SVGGradientElement { - cx: SVGAnimatedLength; - cy: SVGAnimatedLength; - fx: SVGAnimatedLength; - fy: SVGAnimatedLength; - r: SVGAnimatedLength; -} - -declare var SVGRadialGradientElement: { - prototype: SVGRadialGradientElement; - new(): SVGRadialGradientElement; -} - -interface SVGRect { - height: number; - width: number; - x: number; - y: number; -} - -declare var SVGRect: { - prototype: SVGRect; - new(): SVGRect; -} - -interface SVGRectElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired { - height: SVGAnimatedLength; - rx: SVGAnimatedLength; - ry: SVGAnimatedLength; - width: SVGAnimatedLength; - x: SVGAnimatedLength; - y: SVGAnimatedLength; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGRectElement: { - prototype: SVGRectElement; - new(): SVGRectElement; -} - -interface SVGSVGElement extends SVGElement, DocumentEvent, SVGLocatable, SVGTests, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox, SVGZoomAndPan { - contentScriptType: string; - contentStyleType: string; - currentScale: number; - currentTranslate: SVGPoint; - height: SVGAnimatedLength; - onabort: (ev: Event) => any; - onerror: (ev: Event) => any; - onresize: (ev: UIEvent) => any; - onscroll: (ev: UIEvent) => any; - onunload: (ev: Event) => any; - onzoom: (ev: SVGZoomEvent) => any; - pixelUnitToMillimeterX: number; - pixelUnitToMillimeterY: number; - screenPixelToMillimeterX: number; - screenPixelToMillimeterY: number; - viewport: SVGRect; - width: SVGAnimatedLength; - x: SVGAnimatedLength; - y: SVGAnimatedLength; - checkEnclosure(element: SVGElement, rect: SVGRect): boolean; - checkIntersection(element: SVGElement, rect: SVGRect): boolean; - createSVGAngle(): SVGAngle; - createSVGLength(): SVGLength; - createSVGMatrix(): SVGMatrix; - createSVGNumber(): SVGNumber; - createSVGPoint(): SVGPoint; - createSVGRect(): SVGRect; - createSVGTransform(): SVGTransform; - createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform; - deselectAll(): void; - forceRedraw(): void; - getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration; - getCurrentTime(): number; - getElementById(elementId: string): Element; - getEnclosureList(rect: SVGRect, referenceElement: SVGElement): NodeList; - getIntersectionList(rect: SVGRect, referenceElement: SVGElement): NodeList; - pauseAnimations(): void; - setCurrentTime(seconds: number): void; - suspendRedraw(maxWaitMilliseconds: number): number; - unpauseAnimations(): void; - unsuspendRedraw(suspendHandleID: number): void; - unsuspendRedrawAll(): void; - addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "SVGAbort", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "SVGError", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "SVGUnload", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "SVGZoom", listener: (ev: SVGZoomEvent) => any, useCapture?: boolean): void; - addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void; - addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "focusin", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "focusout", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "resize", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGSVGElement: { - prototype: SVGSVGElement; - new(): SVGSVGElement; -} - -interface SVGScriptElement extends SVGElement, SVGExternalResourcesRequired, SVGURIReference { - type: string; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGScriptElement: { - prototype: SVGScriptElement; - new(): SVGScriptElement; -} - -interface SVGStopElement extends SVGElement, SVGStylable { - offset: SVGAnimatedNumber; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGStopElement: { - prototype: SVGStopElement; - new(): SVGStopElement; -} - -interface SVGStringList { - numberOfItems: number; - appendItem(newItem: string): string; - clear(): void; - getItem(index: number): string; - initialize(newItem: string): string; - insertItemBefore(newItem: string, index: number): string; - removeItem(index: number): string; - replaceItem(newItem: string, index: number): string; -} - -declare var SVGStringList: { - prototype: SVGStringList; - new(): SVGStringList; -} - -interface SVGStyleElement extends SVGElement, SVGLangSpace { - media: string; - title: string; - type: string; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGStyleElement: { - prototype: SVGStyleElement; - new(): SVGStyleElement; -} - -interface SVGSwitchElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired { - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGSwitchElement: { - prototype: SVGSwitchElement; - new(): SVGSwitchElement; -} - -interface SVGSymbolElement extends SVGElement, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox { - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGSymbolElement: { - prototype: SVGSymbolElement; - new(): SVGSymbolElement; -} - -interface SVGTSpanElement extends SVGTextPositioningElement { -} - -declare var SVGTSpanElement: { - prototype: SVGTSpanElement; - new(): SVGTSpanElement; -} - -interface SVGTextContentElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired { - lengthAdjust: SVGAnimatedEnumeration; - textLength: SVGAnimatedLength; - getCharNumAtPosition(point: SVGPoint): number; - getComputedTextLength(): number; - getEndPositionOfChar(charnum: number): SVGPoint; - getExtentOfChar(charnum: number): SVGRect; - getNumberOfChars(): number; - getRotationOfChar(charnum: number): number; - getStartPositionOfChar(charnum: number): SVGPoint; - getSubStringLength(charnum: number, nchars: number): number; - selectSubString(charnum: number, nchars: number): void; - LENGTHADJUST_SPACING: number; - LENGTHADJUST_SPACINGANDGLYPHS: number; - LENGTHADJUST_UNKNOWN: number; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGTextContentElement: { - prototype: SVGTextContentElement; - new(): SVGTextContentElement; - LENGTHADJUST_SPACING: number; - LENGTHADJUST_SPACINGANDGLYPHS: number; - LENGTHADJUST_UNKNOWN: number; -} - -interface SVGTextElement extends SVGTextPositioningElement, SVGTransformable { - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGTextElement: { - prototype: SVGTextElement; - new(): SVGTextElement; -} - -interface SVGTextPathElement extends SVGTextContentElement, SVGURIReference { - method: SVGAnimatedEnumeration; - spacing: SVGAnimatedEnumeration; - startOffset: SVGAnimatedLength; - TEXTPATH_METHODTYPE_ALIGN: number; - TEXTPATH_METHODTYPE_STRETCH: number; - TEXTPATH_METHODTYPE_UNKNOWN: number; - TEXTPATH_SPACINGTYPE_AUTO: number; - TEXTPATH_SPACINGTYPE_EXACT: number; - TEXTPATH_SPACINGTYPE_UNKNOWN: number; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGTextPathElement: { - prototype: SVGTextPathElement; - new(): SVGTextPathElement; - TEXTPATH_METHODTYPE_ALIGN: number; - TEXTPATH_METHODTYPE_STRETCH: number; - TEXTPATH_METHODTYPE_UNKNOWN: number; - TEXTPATH_SPACINGTYPE_AUTO: number; - TEXTPATH_SPACINGTYPE_EXACT: number; - TEXTPATH_SPACINGTYPE_UNKNOWN: number; -} - -interface SVGTextPositioningElement extends SVGTextContentElement { - dx: SVGAnimatedLengthList; - dy: SVGAnimatedLengthList; - rotate: SVGAnimatedNumberList; - x: SVGAnimatedLengthList; - y: SVGAnimatedLengthList; -} - -declare var SVGTextPositioningElement: { - prototype: SVGTextPositioningElement; - new(): SVGTextPositioningElement; -} - -interface SVGTitleElement extends SVGElement, SVGStylable, SVGLangSpace { - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGTitleElement: { - prototype: SVGTitleElement; - new(): SVGTitleElement; -} - -interface SVGTransform { - angle: number; - matrix: SVGMatrix; - type: number; - setMatrix(matrix: SVGMatrix): void; - setRotate(angle: number, cx: number, cy: number): void; - setScale(sx: number, sy: number): void; - setSkewX(angle: number): void; - setSkewY(angle: number): void; - setTranslate(tx: number, ty: number): void; - SVG_TRANSFORM_MATRIX: number; - SVG_TRANSFORM_ROTATE: number; - SVG_TRANSFORM_SCALE: number; - SVG_TRANSFORM_SKEWX: number; - SVG_TRANSFORM_SKEWY: number; - SVG_TRANSFORM_TRANSLATE: number; - SVG_TRANSFORM_UNKNOWN: number; -} - -declare var SVGTransform: { - prototype: SVGTransform; - new(): SVGTransform; - SVG_TRANSFORM_MATRIX: number; - SVG_TRANSFORM_ROTATE: number; - SVG_TRANSFORM_SCALE: number; - SVG_TRANSFORM_SKEWX: number; - SVG_TRANSFORM_SKEWY: number; - SVG_TRANSFORM_TRANSLATE: number; - SVG_TRANSFORM_UNKNOWN: number; -} - -interface SVGTransformList { - numberOfItems: number; - appendItem(newItem: SVGTransform): SVGTransform; - clear(): void; - consolidate(): SVGTransform; - createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform; - getItem(index: number): SVGTransform; - initialize(newItem: SVGTransform): SVGTransform; - insertItemBefore(newItem: SVGTransform, index: number): SVGTransform; - removeItem(index: number): SVGTransform; - replaceItem(newItem: SVGTransform, index: number): SVGTransform; -} - -declare var SVGTransformList: { - prototype: SVGTransformList; - new(): SVGTransformList; -} - -interface SVGUnitTypes { - SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: number; - SVG_UNIT_TYPE_UNKNOWN: number; - SVG_UNIT_TYPE_USERSPACEONUSE: number; -} -declare var SVGUnitTypes: SVGUnitTypes; - -interface SVGUseElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference { - animatedInstanceRoot: SVGElementInstance; - height: SVGAnimatedLength; - instanceRoot: SVGElementInstance; - width: SVGAnimatedLength; - x: SVGAnimatedLength; - y: SVGAnimatedLength; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGUseElement: { - prototype: SVGUseElement; - new(): SVGUseElement; -} - -interface SVGViewElement extends SVGElement, SVGExternalResourcesRequired, SVGFitToViewBox, SVGZoomAndPan { - viewTarget: SVGStringList; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGViewElement: { - prototype: SVGViewElement; - new(): SVGViewElement; -} - -interface SVGZoomAndPan { - SVG_ZOOMANDPAN_DISABLE: number; - SVG_ZOOMANDPAN_MAGNIFY: number; - SVG_ZOOMANDPAN_UNKNOWN: number; -} -declare var SVGZoomAndPan: SVGZoomAndPan; - -interface SVGZoomEvent extends UIEvent { - newScale: number; - newTranslate: SVGPoint; - previousScale: number; - previousTranslate: SVGPoint; - zoomRectScreen: SVGRect; -} - -declare var SVGZoomEvent: { - prototype: SVGZoomEvent; - new(): SVGZoomEvent; -} - -interface Screen extends EventTarget { - availHeight: number; - availWidth: number; - bufferDepth: number; - colorDepth: number; - deviceXDPI: number; - deviceYDPI: number; - fontSmoothingEnabled: boolean; - height: number; - logicalXDPI: number; - logicalYDPI: number; - msOrientation: string; - onmsorientationchange: (ev: Event) => any; - pixelDepth: number; - systemXDPI: number; - systemYDPI: number; - width: number; - msLockOrientation(orientations: string): boolean; - msLockOrientation(orientations: string[]): boolean; - msUnlockOrientation(): void; - addEventListener(type: "MSOrientationChange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var Screen: { - prototype: Screen; - new(): Screen; -} - -interface ScriptNotifyEvent extends Event { - callingUri: string; - value: string; -} - -declare var ScriptNotifyEvent: { - prototype: ScriptNotifyEvent; - new(): ScriptNotifyEvent; -} - -interface ScriptProcessorNode extends AudioNode { - bufferSize: number; - onaudioprocess: (ev: AudioProcessingEvent) => any; - addEventListener(type: "audioprocess", listener: (ev: AudioProcessingEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var ScriptProcessorNode: { - prototype: ScriptProcessorNode; - new(): ScriptProcessorNode; -} - -interface Selection { - anchorNode: Node; - anchorOffset: number; - focusNode: Node; - focusOffset: number; - isCollapsed: boolean; - rangeCount: number; - type: string; - addRange(range: Range): void; - collapse(parentNode: Node, offset: number): void; - collapseToEnd(): void; - collapseToStart(): void; - containsNode(node: Node, partlyContained: boolean): boolean; - deleteFromDocument(): void; - empty(): void; - extend(newNode: Node, offset: number): void; - getRangeAt(index: number): Range; - removeAllRanges(): void; - removeRange(range: Range): void; - selectAllChildren(parentNode: Node): void; - setBaseAndExtent(baseNode: Node, baseOffset: number, extentNode: Node, extentOffset: number): void; - toString(): string; -} - -declare var Selection: { - prototype: Selection; - new(): Selection; -} - -interface SourceBuffer extends EventTarget { - appendWindowEnd: number; - appendWindowStart: number; - audioTracks: AudioTrackList; - buffered: TimeRanges; - mode: string; - timestampOffset: number; - updating: boolean; - videoTracks: VideoTrackList; - abort(): void; - appendBuffer(data: ArrayBuffer): void; - appendBuffer(data: ArrayBufferView): void; - appendStream(stream: MSStream, maxSize?: number): void; - remove(start: number, end: number): void; -} - -declare var SourceBuffer: { - prototype: SourceBuffer; - new(): SourceBuffer; -} - -interface SourceBufferList extends EventTarget { - length: number; - item(index: number): SourceBuffer; - [index: number]: SourceBuffer; -} - -declare var SourceBufferList: { - prototype: SourceBufferList; - new(): SourceBufferList; -} - -interface StereoPannerNode extends AudioNode { - pan: AudioParam; -} - -declare var StereoPannerNode: { - prototype: StereoPannerNode; - new(): StereoPannerNode; -} - -interface Storage { - length: number; - clear(): void; - getItem(key: string): any; - key(index: number): string; - removeItem(key: string): void; - setItem(key: string, data: string): void; - [key: string]: any; - [index: number]: string; -} - -declare var Storage: { - prototype: Storage; - new(): Storage; -} - -interface StorageEvent extends Event { - key: string; - newValue: any; - oldValue: any; - storageArea: Storage; - url: string; - initStorageEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, keyArg: string, oldValueArg: any, newValueArg: any, urlArg: string, storageAreaArg: Storage): void; -} - -declare var StorageEvent: { - prototype: StorageEvent; - new(): StorageEvent; -} - -interface StyleMedia { - type: string; - matchMedium(mediaquery: string): boolean; -} - -declare var StyleMedia: { - prototype: StyleMedia; - new(): StyleMedia; -} - -interface StyleSheet { - disabled: boolean; - href: string; - media: MediaList; - ownerNode: Node; - parentStyleSheet: StyleSheet; - title: string; - type: string; -} - -declare var StyleSheet: { - prototype: StyleSheet; - new(): StyleSheet; -} - -interface StyleSheetList { - length: number; - item(index?: number): StyleSheet; - [index: number]: StyleSheet; -} - -declare var StyleSheetList: { - prototype: StyleSheetList; - new(): StyleSheetList; -} - -interface StyleSheetPageList { - length: number; - item(index: number): CSSPageRule; - [index: number]: CSSPageRule; -} - -declare var StyleSheetPageList: { - prototype: StyleSheetPageList; - new(): StyleSheetPageList; -} - -interface SubtleCrypto { - decrypt(algorithm: string, key: CryptoKey, data: ArrayBufferView): any; - decrypt(algorithm: Algorithm, key: CryptoKey, data: ArrayBufferView): any; - deriveBits(algorithm: string, baseKey: CryptoKey, length: number): any; - deriveBits(algorithm: Algorithm, baseKey: CryptoKey, length: number): any; - deriveKey(algorithm: string, baseKey: CryptoKey, derivedKeyType: string, extractable: boolean, keyUsages: string[]): any; - deriveKey(algorithm: string, baseKey: CryptoKey, derivedKeyType: Algorithm, extractable: boolean, keyUsages: string[]): any; - deriveKey(algorithm: Algorithm, baseKey: CryptoKey, derivedKeyType: string, extractable: boolean, keyUsages: string[]): any; - deriveKey(algorithm: Algorithm, baseKey: CryptoKey, derivedKeyType: Algorithm, extractable: boolean, keyUsages: string[]): any; - digest(algorithm: string, data: ArrayBufferView): any; - digest(algorithm: Algorithm, data: ArrayBufferView): any; - encrypt(algorithm: string, key: CryptoKey, data: ArrayBufferView): any; - encrypt(algorithm: Algorithm, key: CryptoKey, data: ArrayBufferView): any; - exportKey(format: string, key: CryptoKey): any; - generateKey(algorithm: string, extractable: boolean, keyUsages: string[]): any; - generateKey(algorithm: Algorithm, extractable: boolean, keyUsages: string[]): any; - importKey(format: string, keyData: ArrayBufferView, algorithm: string, extractable: boolean, keyUsages: string[]): any; - importKey(format: string, keyData: ArrayBufferView, algorithm: Algorithm, extractable: boolean, keyUsages: string[]): any; - sign(algorithm: string, key: CryptoKey, data: ArrayBufferView): any; - sign(algorithm: Algorithm, key: CryptoKey, data: ArrayBufferView): any; - unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: string, unwrappedKeyAlgorithm: string, extractable: boolean, keyUsages: string[]): any; - unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: string, unwrappedKeyAlgorithm: Algorithm, extractable: boolean, keyUsages: string[]): any; - unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: Algorithm, unwrappedKeyAlgorithm: string, extractable: boolean, keyUsages: string[]): any; - unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: Algorithm, unwrappedKeyAlgorithm: Algorithm, extractable: boolean, keyUsages: string[]): any; - verify(algorithm: string, key: CryptoKey, signature: ArrayBufferView, data: ArrayBufferView): any; - verify(algorithm: Algorithm, key: CryptoKey, signature: ArrayBufferView, data: ArrayBufferView): any; - wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: string): any; - wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: Algorithm): any; -} - -declare var SubtleCrypto: { - prototype: SubtleCrypto; - new(): SubtleCrypto; -} - -interface Text extends CharacterData { - wholeText: string; - replaceWholeText(content: string): Text; - splitText(offset: number): Text; -} - -declare var Text: { - prototype: Text; - new(): Text; -} - -interface TextEvent extends UIEvent { - data: string; - inputMethod: number; - locale: string; - initTextEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, inputMethod: number, locale: string): void; - DOM_INPUT_METHOD_DROP: number; - DOM_INPUT_METHOD_HANDWRITING: number; - DOM_INPUT_METHOD_IME: number; - DOM_INPUT_METHOD_KEYBOARD: number; - DOM_INPUT_METHOD_MULTIMODAL: number; - DOM_INPUT_METHOD_OPTION: number; - DOM_INPUT_METHOD_PASTE: number; - DOM_INPUT_METHOD_SCRIPT: number; - DOM_INPUT_METHOD_UNKNOWN: number; - DOM_INPUT_METHOD_VOICE: number; -} - -declare var TextEvent: { - prototype: TextEvent; - new(): TextEvent; - DOM_INPUT_METHOD_DROP: number; - DOM_INPUT_METHOD_HANDWRITING: number; - DOM_INPUT_METHOD_IME: number; - DOM_INPUT_METHOD_KEYBOARD: number; - DOM_INPUT_METHOD_MULTIMODAL: number; - DOM_INPUT_METHOD_OPTION: number; - DOM_INPUT_METHOD_PASTE: number; - DOM_INPUT_METHOD_SCRIPT: number; - DOM_INPUT_METHOD_UNKNOWN: number; - DOM_INPUT_METHOD_VOICE: number; -} - -interface TextMetrics { - width: number; -} - -declare var TextMetrics: { - prototype: TextMetrics; - new(): TextMetrics; -} - -interface TextRange { - boundingHeight: number; - boundingLeft: number; - boundingTop: number; - boundingWidth: number; - htmlText: string; - offsetLeft: number; - offsetTop: number; - text: string; - collapse(start?: boolean): void; - compareEndPoints(how: string, sourceRange: TextRange): number; - duplicate(): TextRange; - execCommand(cmdID: string, showUI?: boolean, value?: any): boolean; - execCommandShowHelp(cmdID: string): boolean; - expand(Unit: string): boolean; - findText(string: string, count?: number, flags?: number): boolean; - getBookmark(): string; - getBoundingClientRect(): ClientRect; - getClientRects(): ClientRectList; - inRange(range: TextRange): boolean; - isEqual(range: TextRange): boolean; - move(unit: string, count?: number): number; - moveEnd(unit: string, count?: number): number; - moveStart(unit: string, count?: number): number; - moveToBookmark(bookmark: string): boolean; - moveToElementText(element: Element): void; - moveToPoint(x: number, y: number): void; - parentElement(): Element; - pasteHTML(html: string): void; - queryCommandEnabled(cmdID: string): boolean; - queryCommandIndeterm(cmdID: string): boolean; - queryCommandState(cmdID: string): boolean; - queryCommandSupported(cmdID: string): boolean; - queryCommandText(cmdID: string): string; - queryCommandValue(cmdID: string): any; - scrollIntoView(fStart?: boolean): void; - select(): void; - setEndPoint(how: string, SourceRange: TextRange): void; -} - -declare var TextRange: { - prototype: TextRange; - new(): TextRange; -} - -interface TextRangeCollection { - length: number; - item(index: number): TextRange; - [index: number]: TextRange; -} - -declare var TextRangeCollection: { - prototype: TextRangeCollection; - new(): TextRangeCollection; -} - -interface TextTrack extends EventTarget { - activeCues: TextTrackCueList; - cues: TextTrackCueList; - inBandMetadataTrackDispatchType: string; - kind: string; - label: string; - language: string; - mode: any; - oncuechange: (ev: Event) => any; - onerror: (ev: Event) => any; - onload: (ev: Event) => any; - readyState: number; - addCue(cue: TextTrackCue): void; - removeCue(cue: TextTrackCue): void; - DISABLED: number; - ERROR: number; - HIDDEN: number; - LOADED: number; - LOADING: number; - NONE: number; - SHOWING: number; - addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var TextTrack: { - prototype: TextTrack; - new(): TextTrack; - DISABLED: number; - ERROR: number; - HIDDEN: number; - LOADED: number; - LOADING: number; - NONE: number; - SHOWING: number; -} - -interface TextTrackCue extends EventTarget { - endTime: number; - id: string; - onenter: (ev: Event) => any; - onexit: (ev: Event) => any; - pauseOnExit: boolean; - startTime: number; - text: string; - track: TextTrack; - getCueAsHTML(): DocumentFragment; - addEventListener(type: "enter", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "exit", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var TextTrackCue: { - prototype: TextTrackCue; - new(startTime: number, endTime: number, text: string): TextTrackCue; -} - -interface TextTrackCueList { - length: number; - getCueById(id: string): TextTrackCue; - item(index: number): TextTrackCue; - [index: number]: TextTrackCue; -} - -declare var TextTrackCueList: { - prototype: TextTrackCueList; - new(): TextTrackCueList; -} - -interface TextTrackList extends EventTarget { - length: number; - onaddtrack: (ev: TrackEvent) => any; - item(index: number): TextTrack; - addEventListener(type: "addtrack", listener: (ev: TrackEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - [index: number]: TextTrack; -} - -declare var TextTrackList: { - prototype: TextTrackList; - new(): TextTrackList; -} - -interface TimeRanges { - length: number; - end(index: number): number; - start(index: number): number; -} - -declare var TimeRanges: { - prototype: TimeRanges; - new(): TimeRanges; -} - -interface Touch { - clientX: number; - clientY: number; - identifier: number; - pageX: number; - pageY: number; - screenX: number; - screenY: number; - target: EventTarget; -} - -declare var Touch: { - prototype: Touch; - new(): Touch; -} - -interface TouchEvent extends UIEvent { - altKey: boolean; - changedTouches: TouchList; - ctrlKey: boolean; - metaKey: boolean; - shiftKey: boolean; - targetTouches: TouchList; - touches: TouchList; -} - -declare var TouchEvent: { - prototype: TouchEvent; - new(): TouchEvent; -} - -interface TouchList { - length: number; - item(index: number): Touch; - [index: number]: Touch; -} - -declare var TouchList: { - prototype: TouchList; - new(): TouchList; -} - -interface TrackEvent extends Event { - track: any; -} - -declare var TrackEvent: { - prototype: TrackEvent; - new(): TrackEvent; -} - -interface TransitionEvent extends Event { - elapsedTime: number; - propertyName: string; - initTransitionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, propertyNameArg: string, elapsedTimeArg: number): void; -} - -declare var TransitionEvent: { - prototype: TransitionEvent; - new(): TransitionEvent; -} - -interface TreeWalker { - currentNode: Node; - expandEntityReferences: boolean; - filter: NodeFilter; - root: Node; - whatToShow: number; - firstChild(): Node; - lastChild(): Node; - nextNode(): Node; - nextSibling(): Node; - parentNode(): Node; - previousNode(): Node; - previousSibling(): Node; -} - -declare var TreeWalker: { - prototype: TreeWalker; - new(): TreeWalker; -} - -interface UIEvent extends Event { - detail: number; - view: Window; - initUIEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number): void; -} - -declare var UIEvent: { - prototype: UIEvent; - new(type: string, eventInitDict?: UIEventInit): UIEvent; -} - -interface URL { - createObjectURL(object: any, options?: ObjectURLOptions): string; - revokeObjectURL(url: string): void; -} -declare var URL: URL; - -interface UnviewableContentIdentifiedEvent extends NavigationEventWithReferrer { - mediaType: string; -} - -declare var UnviewableContentIdentifiedEvent: { - prototype: UnviewableContentIdentifiedEvent; - new(): UnviewableContentIdentifiedEvent; -} - -interface ValidityState { - badInput: boolean; - customError: boolean; - patternMismatch: boolean; - rangeOverflow: boolean; - rangeUnderflow: boolean; - stepMismatch: boolean; - tooLong: boolean; - typeMismatch: boolean; - valid: boolean; - valueMissing: boolean; -} - -declare var ValidityState: { - prototype: ValidityState; - new(): ValidityState; -} - -interface VideoPlaybackQuality { - corruptedVideoFrames: number; - creationTime: number; - droppedVideoFrames: number; - totalFrameDelay: number; - totalVideoFrames: number; -} - -declare var VideoPlaybackQuality: { - prototype: VideoPlaybackQuality; - new(): VideoPlaybackQuality; -} - -interface VideoTrack { - id: string; - kind: string; - label: string; - language: string; - selected: boolean; - sourceBuffer: SourceBuffer; -} - -declare var VideoTrack: { - prototype: VideoTrack; - new(): VideoTrack; -} - -interface VideoTrackList extends EventTarget { - length: number; - onaddtrack: (ev: TrackEvent) => any; - onchange: (ev: Event) => any; - onremovetrack: (ev: TrackEvent) => any; - selectedIndex: number; - getTrackById(id: string): VideoTrack; - item(index: number): VideoTrack; - addEventListener(type: "addtrack", listener: (ev: TrackEvent) => any, useCapture?: boolean): void; - addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "removetrack", listener: (ev: TrackEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - [index: number]: VideoTrack; -} - -declare var VideoTrackList: { - prototype: VideoTrackList; - new(): VideoTrackList; -} - -interface WEBGL_compressed_texture_s3tc { - COMPRESSED_RGBA_S3TC_DXT1_EXT: number; - COMPRESSED_RGBA_S3TC_DXT3_EXT: number; - COMPRESSED_RGBA_S3TC_DXT5_EXT: number; - COMPRESSED_RGB_S3TC_DXT1_EXT: number; -} - -declare var WEBGL_compressed_texture_s3tc: { - prototype: WEBGL_compressed_texture_s3tc; - new(): WEBGL_compressed_texture_s3tc; - COMPRESSED_RGBA_S3TC_DXT1_EXT: number; - COMPRESSED_RGBA_S3TC_DXT3_EXT: number; - COMPRESSED_RGBA_S3TC_DXT5_EXT: number; - COMPRESSED_RGB_S3TC_DXT1_EXT: number; -} - -interface WEBGL_debug_renderer_info { - UNMASKED_RENDERER_WEBGL: number; - UNMASKED_VENDOR_WEBGL: number; -} - -declare var WEBGL_debug_renderer_info: { - prototype: WEBGL_debug_renderer_info; - new(): WEBGL_debug_renderer_info; - UNMASKED_RENDERER_WEBGL: number; - UNMASKED_VENDOR_WEBGL: number; -} - -interface WEBGL_depth_texture { - UNSIGNED_INT_24_8_WEBGL: number; -} - -declare var WEBGL_depth_texture: { - prototype: WEBGL_depth_texture; - new(): WEBGL_depth_texture; - UNSIGNED_INT_24_8_WEBGL: number; -} - -interface WaveShaperNode extends AudioNode { - curve: any; - oversample: string; -} - -declare var WaveShaperNode: { - prototype: WaveShaperNode; - new(): WaveShaperNode; -} - -interface WebGLActiveInfo { - name: string; - size: number; - type: number; -} - -declare var WebGLActiveInfo: { - prototype: WebGLActiveInfo; - new(): WebGLActiveInfo; -} - -interface WebGLBuffer extends WebGLObject { -} - -declare var WebGLBuffer: { - prototype: WebGLBuffer; - new(): WebGLBuffer; -} - -interface WebGLContextEvent extends Event { - statusMessage: string; -} - -declare var WebGLContextEvent: { - prototype: WebGLContextEvent; - new(): WebGLContextEvent; -} - -interface WebGLFramebuffer extends WebGLObject { -} - -declare var WebGLFramebuffer: { - prototype: WebGLFramebuffer; - new(): WebGLFramebuffer; -} - -interface WebGLObject { -} - -declare var WebGLObject: { - prototype: WebGLObject; - new(): WebGLObject; -} - -interface WebGLProgram extends WebGLObject { -} - -declare var WebGLProgram: { - prototype: WebGLProgram; - new(): WebGLProgram; -} - -interface WebGLRenderbuffer extends WebGLObject { -} - -declare var WebGLRenderbuffer: { - prototype: WebGLRenderbuffer; - new(): WebGLRenderbuffer; -} - -interface WebGLRenderingContext { - canvas: HTMLCanvasElement; - drawingBufferHeight: number; - drawingBufferWidth: number; - activeTexture(texture: number): void; - attachShader(program: WebGLProgram, shader: WebGLShader): void; - bindAttribLocation(program: WebGLProgram, index: number, name: string): void; - bindBuffer(target: number, buffer: WebGLBuffer): void; - bindFramebuffer(target: number, framebuffer: WebGLFramebuffer): void; - bindRenderbuffer(target: number, renderbuffer: WebGLRenderbuffer): void; - bindTexture(target: number, texture: WebGLTexture): void; - blendColor(red: number, green: number, blue: number, alpha: number): void; - blendEquation(mode: number): void; - blendEquationSeparate(modeRGB: number, modeAlpha: number): void; - blendFunc(sfactor: number, dfactor: number): void; - blendFuncSeparate(srcRGB: number, dstRGB: number, srcAlpha: number, dstAlpha: number): void; - bufferData(target: number, size: number, usage: number): void; - bufferData(target: number, size: ArrayBufferView, usage: number): void; - bufferData(target: number, size: any, usage: number): void; - bufferSubData(target: number, offset: number, data: ArrayBufferView): void; - bufferSubData(target: number, offset: number, data: any): void; - checkFramebufferStatus(target: number): number; - clear(mask: number): void; - clearColor(red: number, green: number, blue: number, alpha: number): void; - clearDepth(depth: number): void; - clearStencil(s: number): void; - colorMask(red: boolean, green: boolean, blue: boolean, alpha: boolean): void; - compileShader(shader: WebGLShader): void; - compressedTexImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, data: ArrayBufferView): void; - compressedTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, data: ArrayBufferView): void; - copyTexImage2D(target: number, level: number, internalformat: number, x: number, y: number, width: number, height: number, border: number): void; - copyTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, x: number, y: number, width: number, height: number): void; - createBuffer(): WebGLBuffer; - createFramebuffer(): WebGLFramebuffer; - createProgram(): WebGLProgram; - createRenderbuffer(): WebGLRenderbuffer; - createShader(type: number): WebGLShader; - createTexture(): WebGLTexture; - cullFace(mode: number): void; - deleteBuffer(buffer: WebGLBuffer): void; - deleteFramebuffer(framebuffer: WebGLFramebuffer): void; - deleteProgram(program: WebGLProgram): void; - deleteRenderbuffer(renderbuffer: WebGLRenderbuffer): void; - deleteShader(shader: WebGLShader): void; - deleteTexture(texture: WebGLTexture): void; - depthFunc(func: number): void; - depthMask(flag: boolean): void; - depthRange(zNear: number, zFar: number): void; - detachShader(program: WebGLProgram, shader: WebGLShader): void; - disable(cap: number): void; - disableVertexAttribArray(index: number): void; - drawArrays(mode: number, first: number, count: number): void; - drawElements(mode: number, count: number, type: number, offset: number): void; - enable(cap: number): void; - enableVertexAttribArray(index: number): void; - finish(): void; - flush(): void; - framebufferRenderbuffer(target: number, attachment: number, renderbuffertarget: number, renderbuffer: WebGLRenderbuffer): void; - framebufferTexture2D(target: number, attachment: number, textarget: number, texture: WebGLTexture, level: number): void; - frontFace(mode: number): void; - generateMipmap(target: number): void; - getActiveAttrib(program: WebGLProgram, index: number): WebGLActiveInfo; - getActiveUniform(program: WebGLProgram, index: number): WebGLActiveInfo; - getAttachedShaders(program: WebGLProgram): WebGLShader[]; - getAttribLocation(program: WebGLProgram, name: string): number; - getBufferParameter(target: number, pname: number): any; - getContextAttributes(): WebGLContextAttributes; - getError(): number; - getExtension(name: string): any; - getFramebufferAttachmentParameter(target: number, attachment: number, pname: number): any; - getParameter(pname: number): any; - getProgramInfoLog(program: WebGLProgram): string; - getProgramParameter(program: WebGLProgram, pname: number): any; - getRenderbufferParameter(target: number, pname: number): any; - getShaderInfoLog(shader: WebGLShader): string; - getShaderParameter(shader: WebGLShader, pname: number): any; - getShaderPrecisionFormat(shadertype: number, precisiontype: number): WebGLShaderPrecisionFormat; - getShaderSource(shader: WebGLShader): string; - getSupportedExtensions(): string[]; - getTexParameter(target: number, pname: number): any; - getUniform(program: WebGLProgram, location: WebGLUniformLocation): any; - getUniformLocation(program: WebGLProgram, name: string): WebGLUniformLocation; - getVertexAttrib(index: number, pname: number): any; - getVertexAttribOffset(index: number, pname: number): number; - hint(target: number, mode: number): void; - isBuffer(buffer: WebGLBuffer): boolean; - isContextLost(): boolean; - isEnabled(cap: number): boolean; - isFramebuffer(framebuffer: WebGLFramebuffer): boolean; - isProgram(program: WebGLProgram): boolean; - isRenderbuffer(renderbuffer: WebGLRenderbuffer): boolean; - isShader(shader: WebGLShader): boolean; - isTexture(texture: WebGLTexture): boolean; - lineWidth(width: number): void; - linkProgram(program: WebGLProgram): void; - pixelStorei(pname: number, param: number): void; - polygonOffset(factor: number, units: number): void; - readPixels(x: number, y: number, width: number, height: number, format: number, type: number, pixels: ArrayBufferView): void; - renderbufferStorage(target: number, internalformat: number, width: number, height: number): void; - sampleCoverage(value: number, invert: boolean): void; - scissor(x: number, y: number, width: number, height: number): void; - shaderSource(shader: WebGLShader, source: string): void; - stencilFunc(func: number, ref: number, mask: number): void; - stencilFuncSeparate(face: number, func: number, ref: number, mask: number): void; - stencilMask(mask: number): void; - stencilMaskSeparate(face: number, mask: number): void; - stencilOp(fail: number, zfail: number, zpass: number): void; - stencilOpSeparate(face: number, fail: number, zfail: number, zpass: number): void; - texImage2D(target: number, level: number, internalformat: number, format: number, type: number, pixels: ImageData): void; - texParameterf(target: number, pname: number, param: number): void; - texParameteri(target: number, pname: number, param: number): void; - texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, format: number, type: number, pixels: ImageData): void; - uniform1f(location: WebGLUniformLocation, x: number): void; - uniform1fv(location: WebGLUniformLocation, v: any): void; - uniform1i(location: WebGLUniformLocation, x: number): void; - uniform1iv(location: WebGLUniformLocation, v: Int32Array): void; - uniform2f(location: WebGLUniformLocation, x: number, y: number): void; - uniform2fv(location: WebGLUniformLocation, v: any): void; - uniform2i(location: WebGLUniformLocation, x: number, y: number): void; - uniform2iv(location: WebGLUniformLocation, v: Int32Array): void; - uniform3f(location: WebGLUniformLocation, x: number, y: number, z: number): void; - uniform3fv(location: WebGLUniformLocation, v: any): void; - uniform3i(location: WebGLUniformLocation, x: number, y: number, z: number): void; - uniform3iv(location: WebGLUniformLocation, v: Int32Array): void; - uniform4f(location: WebGLUniformLocation, x: number, y: number, z: number, w: number): void; - uniform4fv(location: WebGLUniformLocation, v: any): void; - uniform4i(location: WebGLUniformLocation, x: number, y: number, z: number, w: number): void; - uniform4iv(location: WebGLUniformLocation, v: Int32Array): void; - uniformMatrix2fv(location: WebGLUniformLocation, transpose: boolean, value: any): void; - uniformMatrix3fv(location: WebGLUniformLocation, transpose: boolean, value: any): void; - uniformMatrix4fv(location: WebGLUniformLocation, transpose: boolean, value: any): void; - useProgram(program: WebGLProgram): void; - validateProgram(program: WebGLProgram): void; - vertexAttrib1f(indx: number, x: number): void; - vertexAttrib1fv(indx: number, values: any): void; - vertexAttrib2f(indx: number, x: number, y: number): void; - vertexAttrib2fv(indx: number, values: any): void; - vertexAttrib3f(indx: number, x: number, y: number, z: number): void; - vertexAttrib3fv(indx: number, values: any): void; - vertexAttrib4f(indx: number, x: number, y: number, z: number, w: number): void; - vertexAttrib4fv(indx: number, values: any): void; - vertexAttribPointer(indx: number, size: number, type: number, normalized: boolean, stride: number, offset: number): void; - viewport(x: number, y: number, width: number, height: number): void; - ACTIVE_ATTRIBUTES: number; - ACTIVE_TEXTURE: number; - ACTIVE_UNIFORMS: number; - ALIASED_LINE_WIDTH_RANGE: number; - ALIASED_POINT_SIZE_RANGE: number; - ALPHA: number; - ALPHA_BITS: number; - ALWAYS: number; - ARRAY_BUFFER: number; - ARRAY_BUFFER_BINDING: number; - ATTACHED_SHADERS: number; - BACK: number; - BLEND: number; - BLEND_COLOR: number; - BLEND_DST_ALPHA: number; - BLEND_DST_RGB: number; - BLEND_EQUATION: number; - BLEND_EQUATION_ALPHA: number; - BLEND_EQUATION_RGB: number; - BLEND_SRC_ALPHA: number; - BLEND_SRC_RGB: number; - BLUE_BITS: number; - BOOL: number; - BOOL_VEC2: number; - BOOL_VEC3: number; - BOOL_VEC4: number; - BROWSER_DEFAULT_WEBGL: number; - BUFFER_SIZE: number; - BUFFER_USAGE: number; - BYTE: number; - CCW: number; - CLAMP_TO_EDGE: number; - COLOR_ATTACHMENT0: number; - COLOR_BUFFER_BIT: number; - COLOR_CLEAR_VALUE: number; - COLOR_WRITEMASK: number; - COMPILE_STATUS: number; - COMPRESSED_TEXTURE_FORMATS: number; - CONSTANT_ALPHA: number; - CONSTANT_COLOR: number; - CONTEXT_LOST_WEBGL: number; - CULL_FACE: number; - CULL_FACE_MODE: number; - CURRENT_PROGRAM: number; - CURRENT_VERTEX_ATTRIB: number; - CW: number; - DECR: number; - DECR_WRAP: number; - DELETE_STATUS: number; - DEPTH_ATTACHMENT: number; - DEPTH_BITS: number; - DEPTH_BUFFER_BIT: number; - DEPTH_CLEAR_VALUE: number; - DEPTH_COMPONENT: number; - DEPTH_COMPONENT16: number; - DEPTH_FUNC: number; - DEPTH_RANGE: number; - DEPTH_STENCIL: number; - DEPTH_STENCIL_ATTACHMENT: number; - DEPTH_TEST: number; - DEPTH_WRITEMASK: number; - DITHER: number; - DONT_CARE: number; - DST_ALPHA: number; - DST_COLOR: number; - DYNAMIC_DRAW: number; - ELEMENT_ARRAY_BUFFER: number; - ELEMENT_ARRAY_BUFFER_BINDING: number; - EQUAL: number; - FASTEST: number; - FLOAT: number; - FLOAT_MAT2: number; - FLOAT_MAT3: number; - FLOAT_MAT4: number; - FLOAT_VEC2: number; - FLOAT_VEC3: number; - FLOAT_VEC4: number; - FRAGMENT_SHADER: number; - FRAMEBUFFER: number; - FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number; - FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number; - FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number; - FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number; - FRAMEBUFFER_BINDING: number; - FRAMEBUFFER_COMPLETE: number; - FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number; - FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number; - FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number; - FRAMEBUFFER_UNSUPPORTED: number; - FRONT: number; - FRONT_AND_BACK: number; - FRONT_FACE: number; - FUNC_ADD: number; - FUNC_REVERSE_SUBTRACT: number; - FUNC_SUBTRACT: number; - GENERATE_MIPMAP_HINT: number; - GEQUAL: number; - GREATER: number; - GREEN_BITS: number; - HIGH_FLOAT: number; - HIGH_INT: number; - IMPLEMENTATION_COLOR_READ_FORMAT: number; - IMPLEMENTATION_COLOR_READ_TYPE: number; - INCR: number; - INCR_WRAP: number; - INT: number; - INT_VEC2: number; - INT_VEC3: number; - INT_VEC4: number; - INVALID_ENUM: number; - INVALID_FRAMEBUFFER_OPERATION: number; - INVALID_OPERATION: number; - INVALID_VALUE: number; - INVERT: number; - KEEP: number; - LEQUAL: number; - LESS: number; - LINEAR: number; - LINEAR_MIPMAP_LINEAR: number; - LINEAR_MIPMAP_NEAREST: number; - LINES: number; - LINE_LOOP: number; - LINE_STRIP: number; - LINE_WIDTH: number; - LINK_STATUS: number; - LOW_FLOAT: number; - LOW_INT: number; - LUMINANCE: number; - LUMINANCE_ALPHA: number; - MAX_COMBINED_TEXTURE_IMAGE_UNITS: number; - MAX_CUBE_MAP_TEXTURE_SIZE: number; - MAX_FRAGMENT_UNIFORM_VECTORS: number; - MAX_RENDERBUFFER_SIZE: number; - MAX_TEXTURE_IMAGE_UNITS: number; - MAX_TEXTURE_SIZE: number; - MAX_VARYING_VECTORS: number; - MAX_VERTEX_ATTRIBS: number; - MAX_VERTEX_TEXTURE_IMAGE_UNITS: number; - MAX_VERTEX_UNIFORM_VECTORS: number; - MAX_VIEWPORT_DIMS: number; - MEDIUM_FLOAT: number; - MEDIUM_INT: number; - MIRRORED_REPEAT: number; - NEAREST: number; - NEAREST_MIPMAP_LINEAR: number; - NEAREST_MIPMAP_NEAREST: number; - NEVER: number; - NICEST: number; - NONE: number; - NOTEQUAL: number; - NO_ERROR: number; - ONE: number; - ONE_MINUS_CONSTANT_ALPHA: number; - ONE_MINUS_CONSTANT_COLOR: number; - ONE_MINUS_DST_ALPHA: number; - ONE_MINUS_DST_COLOR: number; - ONE_MINUS_SRC_ALPHA: number; - ONE_MINUS_SRC_COLOR: number; - OUT_OF_MEMORY: number; - PACK_ALIGNMENT: number; - POINTS: number; - POLYGON_OFFSET_FACTOR: number; - POLYGON_OFFSET_FILL: number; - POLYGON_OFFSET_UNITS: number; - RED_BITS: number; - RENDERBUFFER: number; - RENDERBUFFER_ALPHA_SIZE: number; - RENDERBUFFER_BINDING: number; - RENDERBUFFER_BLUE_SIZE: number; - RENDERBUFFER_DEPTH_SIZE: number; - RENDERBUFFER_GREEN_SIZE: number; - RENDERBUFFER_HEIGHT: number; - RENDERBUFFER_INTERNAL_FORMAT: number; - RENDERBUFFER_RED_SIZE: number; - RENDERBUFFER_STENCIL_SIZE: number; - RENDERBUFFER_WIDTH: number; - RENDERER: number; - REPEAT: number; - REPLACE: number; - RGB: number; - RGB565: number; - RGB5_A1: number; - RGBA: number; - RGBA4: number; - SAMPLER_2D: number; - SAMPLER_CUBE: number; - SAMPLES: number; - SAMPLE_ALPHA_TO_COVERAGE: number; - SAMPLE_BUFFERS: number; - SAMPLE_COVERAGE: number; - SAMPLE_COVERAGE_INVERT: number; - SAMPLE_COVERAGE_VALUE: number; - SCISSOR_BOX: number; - SCISSOR_TEST: number; - SHADER_TYPE: number; - SHADING_LANGUAGE_VERSION: number; - SHORT: number; - SRC_ALPHA: number; - SRC_ALPHA_SATURATE: number; - SRC_COLOR: number; - STATIC_DRAW: number; - STENCIL_ATTACHMENT: number; - STENCIL_BACK_FAIL: number; - STENCIL_BACK_FUNC: number; - STENCIL_BACK_PASS_DEPTH_FAIL: number; - STENCIL_BACK_PASS_DEPTH_PASS: number; - STENCIL_BACK_REF: number; - STENCIL_BACK_VALUE_MASK: number; - STENCIL_BACK_WRITEMASK: number; - STENCIL_BITS: number; - STENCIL_BUFFER_BIT: number; - STENCIL_CLEAR_VALUE: number; - STENCIL_FAIL: number; - STENCIL_FUNC: number; - STENCIL_INDEX: number; - STENCIL_INDEX8: number; - STENCIL_PASS_DEPTH_FAIL: number; - STENCIL_PASS_DEPTH_PASS: number; - STENCIL_REF: number; - STENCIL_TEST: number; - STENCIL_VALUE_MASK: number; - STENCIL_WRITEMASK: number; - STREAM_DRAW: number; - SUBPIXEL_BITS: number; - TEXTURE: number; - TEXTURE0: number; - TEXTURE1: number; - TEXTURE10: number; - TEXTURE11: number; - TEXTURE12: number; - TEXTURE13: number; - TEXTURE14: number; - TEXTURE15: number; - TEXTURE16: number; - TEXTURE17: number; - TEXTURE18: number; - TEXTURE19: number; - TEXTURE2: number; - TEXTURE20: number; - TEXTURE21: number; - TEXTURE22: number; - TEXTURE23: number; - TEXTURE24: number; - TEXTURE25: number; - TEXTURE26: number; - TEXTURE27: number; - TEXTURE28: number; - TEXTURE29: number; - TEXTURE3: number; - TEXTURE30: number; - TEXTURE31: number; - TEXTURE4: number; - TEXTURE5: number; - TEXTURE6: number; - TEXTURE7: number; - TEXTURE8: number; - TEXTURE9: number; - TEXTURE_2D: number; - TEXTURE_BINDING_2D: number; - TEXTURE_BINDING_CUBE_MAP: number; - TEXTURE_CUBE_MAP: number; - TEXTURE_CUBE_MAP_NEGATIVE_X: number; - TEXTURE_CUBE_MAP_NEGATIVE_Y: number; - TEXTURE_CUBE_MAP_NEGATIVE_Z: number; - TEXTURE_CUBE_MAP_POSITIVE_X: number; - TEXTURE_CUBE_MAP_POSITIVE_Y: number; - TEXTURE_CUBE_MAP_POSITIVE_Z: number; - TEXTURE_MAG_FILTER: number; - TEXTURE_MIN_FILTER: number; - TEXTURE_WRAP_S: number; - TEXTURE_WRAP_T: number; - TRIANGLES: number; - TRIANGLE_FAN: number; - TRIANGLE_STRIP: number; - UNPACK_ALIGNMENT: number; - UNPACK_COLORSPACE_CONVERSION_WEBGL: number; - UNPACK_FLIP_Y_WEBGL: number; - UNPACK_PREMULTIPLY_ALPHA_WEBGL: number; - UNSIGNED_BYTE: number; - UNSIGNED_INT: number; - UNSIGNED_SHORT: number; - UNSIGNED_SHORT_4_4_4_4: number; - UNSIGNED_SHORT_5_5_5_1: number; - UNSIGNED_SHORT_5_6_5: number; - VALIDATE_STATUS: number; - VENDOR: number; - VERSION: number; - VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number; - VERTEX_ATTRIB_ARRAY_ENABLED: number; - VERTEX_ATTRIB_ARRAY_NORMALIZED: number; - VERTEX_ATTRIB_ARRAY_POINTER: number; - VERTEX_ATTRIB_ARRAY_SIZE: number; - VERTEX_ATTRIB_ARRAY_STRIDE: number; - VERTEX_ATTRIB_ARRAY_TYPE: number; - VERTEX_SHADER: number; - VIEWPORT: number; - ZERO: number; -} - -declare var WebGLRenderingContext: { - prototype: WebGLRenderingContext; - new(): WebGLRenderingContext; - ACTIVE_ATTRIBUTES: number; - ACTIVE_TEXTURE: number; - ACTIVE_UNIFORMS: number; - ALIASED_LINE_WIDTH_RANGE: number; - ALIASED_POINT_SIZE_RANGE: number; - ALPHA: number; - ALPHA_BITS: number; - ALWAYS: number; - ARRAY_BUFFER: number; - ARRAY_BUFFER_BINDING: number; - ATTACHED_SHADERS: number; - BACK: number; - BLEND: number; - BLEND_COLOR: number; - BLEND_DST_ALPHA: number; - BLEND_DST_RGB: number; - BLEND_EQUATION: number; - BLEND_EQUATION_ALPHA: number; - BLEND_EQUATION_RGB: number; - BLEND_SRC_ALPHA: number; - BLEND_SRC_RGB: number; - BLUE_BITS: number; - BOOL: number; - BOOL_VEC2: number; - BOOL_VEC3: number; - BOOL_VEC4: number; - BROWSER_DEFAULT_WEBGL: number; - BUFFER_SIZE: number; - BUFFER_USAGE: number; - BYTE: number; - CCW: number; - CLAMP_TO_EDGE: number; - COLOR_ATTACHMENT0: number; - COLOR_BUFFER_BIT: number; - COLOR_CLEAR_VALUE: number; - COLOR_WRITEMASK: number; - COMPILE_STATUS: number; - COMPRESSED_TEXTURE_FORMATS: number; - CONSTANT_ALPHA: number; - CONSTANT_COLOR: number; - CONTEXT_LOST_WEBGL: number; - CULL_FACE: number; - CULL_FACE_MODE: number; - CURRENT_PROGRAM: number; - CURRENT_VERTEX_ATTRIB: number; - CW: number; - DECR: number; - DECR_WRAP: number; - DELETE_STATUS: number; - DEPTH_ATTACHMENT: number; - DEPTH_BITS: number; - DEPTH_BUFFER_BIT: number; - DEPTH_CLEAR_VALUE: number; - DEPTH_COMPONENT: number; - DEPTH_COMPONENT16: number; - DEPTH_FUNC: number; - DEPTH_RANGE: number; - DEPTH_STENCIL: number; - DEPTH_STENCIL_ATTACHMENT: number; - DEPTH_TEST: number; - DEPTH_WRITEMASK: number; - DITHER: number; - DONT_CARE: number; - DST_ALPHA: number; - DST_COLOR: number; - DYNAMIC_DRAW: number; - ELEMENT_ARRAY_BUFFER: number; - ELEMENT_ARRAY_BUFFER_BINDING: number; - EQUAL: number; - FASTEST: number; - FLOAT: number; - FLOAT_MAT2: number; - FLOAT_MAT3: number; - FLOAT_MAT4: number; - FLOAT_VEC2: number; - FLOAT_VEC3: number; - FLOAT_VEC4: number; - FRAGMENT_SHADER: number; - FRAMEBUFFER: number; - FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number; - FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number; - FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number; - FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number; - FRAMEBUFFER_BINDING: number; - FRAMEBUFFER_COMPLETE: number; - FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number; - FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number; - FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number; - FRAMEBUFFER_UNSUPPORTED: number; - FRONT: number; - FRONT_AND_BACK: number; - FRONT_FACE: number; - FUNC_ADD: number; - FUNC_REVERSE_SUBTRACT: number; - FUNC_SUBTRACT: number; - GENERATE_MIPMAP_HINT: number; - GEQUAL: number; - GREATER: number; - GREEN_BITS: number; - HIGH_FLOAT: number; - HIGH_INT: number; - IMPLEMENTATION_COLOR_READ_FORMAT: number; - IMPLEMENTATION_COLOR_READ_TYPE: number; - INCR: number; - INCR_WRAP: number; - INT: number; - INT_VEC2: number; - INT_VEC3: number; - INT_VEC4: number; - INVALID_ENUM: number; - INVALID_FRAMEBUFFER_OPERATION: number; - INVALID_OPERATION: number; - INVALID_VALUE: number; - INVERT: number; - KEEP: number; - LEQUAL: number; - LESS: number; - LINEAR: number; - LINEAR_MIPMAP_LINEAR: number; - LINEAR_MIPMAP_NEAREST: number; - LINES: number; - LINE_LOOP: number; - LINE_STRIP: number; - LINE_WIDTH: number; - LINK_STATUS: number; - LOW_FLOAT: number; - LOW_INT: number; - LUMINANCE: number; - LUMINANCE_ALPHA: number; - MAX_COMBINED_TEXTURE_IMAGE_UNITS: number; - MAX_CUBE_MAP_TEXTURE_SIZE: number; - MAX_FRAGMENT_UNIFORM_VECTORS: number; - MAX_RENDERBUFFER_SIZE: number; - MAX_TEXTURE_IMAGE_UNITS: number; - MAX_TEXTURE_SIZE: number; - MAX_VARYING_VECTORS: number; - MAX_VERTEX_ATTRIBS: number; - MAX_VERTEX_TEXTURE_IMAGE_UNITS: number; - MAX_VERTEX_UNIFORM_VECTORS: number; - MAX_VIEWPORT_DIMS: number; - MEDIUM_FLOAT: number; - MEDIUM_INT: number; - MIRRORED_REPEAT: number; - NEAREST: number; - NEAREST_MIPMAP_LINEAR: number; - NEAREST_MIPMAP_NEAREST: number; - NEVER: number; - NICEST: number; - NONE: number; - NOTEQUAL: number; - NO_ERROR: number; - ONE: number; - ONE_MINUS_CONSTANT_ALPHA: number; - ONE_MINUS_CONSTANT_COLOR: number; - ONE_MINUS_DST_ALPHA: number; - ONE_MINUS_DST_COLOR: number; - ONE_MINUS_SRC_ALPHA: number; - ONE_MINUS_SRC_COLOR: number; - OUT_OF_MEMORY: number; - PACK_ALIGNMENT: number; - POINTS: number; - POLYGON_OFFSET_FACTOR: number; - POLYGON_OFFSET_FILL: number; - POLYGON_OFFSET_UNITS: number; - RED_BITS: number; - RENDERBUFFER: number; - RENDERBUFFER_ALPHA_SIZE: number; - RENDERBUFFER_BINDING: number; - RENDERBUFFER_BLUE_SIZE: number; - RENDERBUFFER_DEPTH_SIZE: number; - RENDERBUFFER_GREEN_SIZE: number; - RENDERBUFFER_HEIGHT: number; - RENDERBUFFER_INTERNAL_FORMAT: number; - RENDERBUFFER_RED_SIZE: number; - RENDERBUFFER_STENCIL_SIZE: number; - RENDERBUFFER_WIDTH: number; - RENDERER: number; - REPEAT: number; - REPLACE: number; - RGB: number; - RGB565: number; - RGB5_A1: number; - RGBA: number; - RGBA4: number; - SAMPLER_2D: number; - SAMPLER_CUBE: number; - SAMPLES: number; - SAMPLE_ALPHA_TO_COVERAGE: number; - SAMPLE_BUFFERS: number; - SAMPLE_COVERAGE: number; - SAMPLE_COVERAGE_INVERT: number; - SAMPLE_COVERAGE_VALUE: number; - SCISSOR_BOX: number; - SCISSOR_TEST: number; - SHADER_TYPE: number; - SHADING_LANGUAGE_VERSION: number; - SHORT: number; - SRC_ALPHA: number; - SRC_ALPHA_SATURATE: number; - SRC_COLOR: number; - STATIC_DRAW: number; - STENCIL_ATTACHMENT: number; - STENCIL_BACK_FAIL: number; - STENCIL_BACK_FUNC: number; - STENCIL_BACK_PASS_DEPTH_FAIL: number; - STENCIL_BACK_PASS_DEPTH_PASS: number; - STENCIL_BACK_REF: number; - STENCIL_BACK_VALUE_MASK: number; - STENCIL_BACK_WRITEMASK: number; - STENCIL_BITS: number; - STENCIL_BUFFER_BIT: number; - STENCIL_CLEAR_VALUE: number; - STENCIL_FAIL: number; - STENCIL_FUNC: number; - STENCIL_INDEX: number; - STENCIL_INDEX8: number; - STENCIL_PASS_DEPTH_FAIL: number; - STENCIL_PASS_DEPTH_PASS: number; - STENCIL_REF: number; - STENCIL_TEST: number; - STENCIL_VALUE_MASK: number; - STENCIL_WRITEMASK: number; - STREAM_DRAW: number; - SUBPIXEL_BITS: number; - TEXTURE: number; - TEXTURE0: number; - TEXTURE1: number; - TEXTURE10: number; - TEXTURE11: number; - TEXTURE12: number; - TEXTURE13: number; - TEXTURE14: number; - TEXTURE15: number; - TEXTURE16: number; - TEXTURE17: number; - TEXTURE18: number; - TEXTURE19: number; - TEXTURE2: number; - TEXTURE20: number; - TEXTURE21: number; - TEXTURE22: number; - TEXTURE23: number; - TEXTURE24: number; - TEXTURE25: number; - TEXTURE26: number; - TEXTURE27: number; - TEXTURE28: number; - TEXTURE29: number; - TEXTURE3: number; - TEXTURE30: number; - TEXTURE31: number; - TEXTURE4: number; - TEXTURE5: number; - TEXTURE6: number; - TEXTURE7: number; - TEXTURE8: number; - TEXTURE9: number; - TEXTURE_2D: number; - TEXTURE_BINDING_2D: number; - TEXTURE_BINDING_CUBE_MAP: number; - TEXTURE_CUBE_MAP: number; - TEXTURE_CUBE_MAP_NEGATIVE_X: number; - TEXTURE_CUBE_MAP_NEGATIVE_Y: number; - TEXTURE_CUBE_MAP_NEGATIVE_Z: number; - TEXTURE_CUBE_MAP_POSITIVE_X: number; - TEXTURE_CUBE_MAP_POSITIVE_Y: number; - TEXTURE_CUBE_MAP_POSITIVE_Z: number; - TEXTURE_MAG_FILTER: number; - TEXTURE_MIN_FILTER: number; - TEXTURE_WRAP_S: number; - TEXTURE_WRAP_T: number; - TRIANGLES: number; - TRIANGLE_FAN: number; - TRIANGLE_STRIP: number; - UNPACK_ALIGNMENT: number; - UNPACK_COLORSPACE_CONVERSION_WEBGL: number; - UNPACK_FLIP_Y_WEBGL: number; - UNPACK_PREMULTIPLY_ALPHA_WEBGL: number; - UNSIGNED_BYTE: number; - UNSIGNED_INT: number; - UNSIGNED_SHORT: number; - UNSIGNED_SHORT_4_4_4_4: number; - UNSIGNED_SHORT_5_5_5_1: number; - UNSIGNED_SHORT_5_6_5: number; - VALIDATE_STATUS: number; - VENDOR: number; - VERSION: number; - VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number; - VERTEX_ATTRIB_ARRAY_ENABLED: number; - VERTEX_ATTRIB_ARRAY_NORMALIZED: number; - VERTEX_ATTRIB_ARRAY_POINTER: number; - VERTEX_ATTRIB_ARRAY_SIZE: number; - VERTEX_ATTRIB_ARRAY_STRIDE: number; - VERTEX_ATTRIB_ARRAY_TYPE: number; - VERTEX_SHADER: number; - VIEWPORT: number; - ZERO: number; -} - -interface WebGLShader extends WebGLObject { -} - -declare var WebGLShader: { - prototype: WebGLShader; - new(): WebGLShader; -} - -interface WebGLShaderPrecisionFormat { - precision: number; - rangeMax: number; - rangeMin: number; -} - -declare var WebGLShaderPrecisionFormat: { - prototype: WebGLShaderPrecisionFormat; - new(): WebGLShaderPrecisionFormat; -} - -interface WebGLTexture extends WebGLObject { -} - -declare var WebGLTexture: { - prototype: WebGLTexture; - new(): WebGLTexture; -} - -interface WebGLUniformLocation { -} - -declare var WebGLUniformLocation: { - prototype: WebGLUniformLocation; - new(): WebGLUniformLocation; -} - -interface WebKitCSSMatrix { - a: number; - b: number; - c: number; - d: number; - e: number; - f: number; - m11: number; - m12: number; - m13: number; - m14: number; - m21: number; - m22: number; - m23: number; - m24: number; - m31: number; - m32: number; - m33: number; - m34: number; - m41: number; - m42: number; - m43: number; - m44: number; - inverse(): WebKitCSSMatrix; - multiply(secondMatrix: WebKitCSSMatrix): WebKitCSSMatrix; - rotate(angleX: number, angleY?: number, angleZ?: number): WebKitCSSMatrix; - rotateAxisAngle(x: number, y: number, z: number, angle: number): WebKitCSSMatrix; - scale(scaleX: number, scaleY?: number, scaleZ?: number): WebKitCSSMatrix; - setMatrixValue(value: string): void; - skewX(angle: number): WebKitCSSMatrix; - skewY(angle: number): WebKitCSSMatrix; - toString(): string; - translate(x: number, y: number, z?: number): WebKitCSSMatrix; -} - -declare var WebKitCSSMatrix: { - prototype: WebKitCSSMatrix; - new(text?: string): WebKitCSSMatrix; -} - -interface WebKitPoint { - x: number; - y: number; -} - -declare var WebKitPoint: { - prototype: WebKitPoint; - new(x?: number, y?: number): WebKitPoint; -} - -interface WebSocket extends EventTarget { - binaryType: string; - bufferedAmount: number; - extensions: string; - onclose: (ev: CloseEvent) => any; - onerror: (ev: Event) => any; - onmessage: (ev: MessageEvent) => any; - onopen: (ev: Event) => any; - protocol: string; - readyState: number; - url: string; - close(code?: number, reason?: string): void; - send(data: any): void; - CLOSED: number; - CLOSING: number; - CONNECTING: number; - OPEN: number; - addEventListener(type: "close", listener: (ev: CloseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void; - addEventListener(type: "open", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var WebSocket: { - prototype: WebSocket; - new(url: string, protocols?: string): WebSocket; - new(url: string, protocols?: any): WebSocket; - CLOSED: number; - CLOSING: number; - CONNECTING: number; - OPEN: number; -} - -interface WheelEvent extends MouseEvent { - deltaMode: number; - deltaX: number; - deltaY: number; - deltaZ: number; - getCurrentPoint(element: Element): void; - initWheelEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: EventTarget, modifiersListArg: string, deltaXArg: number, deltaYArg: number, deltaZArg: number, deltaMode: number): void; - DOM_DELTA_LINE: number; - DOM_DELTA_PAGE: number; - DOM_DELTA_PIXEL: number; -} - -declare var WheelEvent: { - prototype: WheelEvent; - new(typeArg: string, eventInitDict?: WheelEventInit): WheelEvent; - DOM_DELTA_LINE: number; - DOM_DELTA_PAGE: number; - DOM_DELTA_PIXEL: number; -} - -interface Window extends EventTarget, WindowTimers, WindowSessionStorage, WindowLocalStorage, WindowConsole, GlobalEventHandlers, IDBEnvironment, WindowBase64 { - animationStartTime: number; - applicationCache: ApplicationCache; - clientInformation: Navigator; - closed: boolean; - crypto: Crypto; - defaultStatus: string; - devicePixelRatio: number; - doNotTrack: string; - document: Document; - event: Event; - external: External; - frameElement: Element; - frames: Window; - history: History; - innerHeight: number; - innerWidth: number; - length: number; - location: Location; - locationbar: BarProp; - menubar: BarProp; - msAnimationStartTime: number; - msTemplatePrinter: MSTemplatePrinter; - name: string; - navigator: Navigator; - offscreenBuffering: string | boolean; - onabort: (ev: Event) => any; - onafterprint: (ev: Event) => any; - onbeforeprint: (ev: Event) => any; - onbeforeunload: (ev: BeforeUnloadEvent) => any; - onblur: (ev: FocusEvent) => any; - oncanplay: (ev: Event) => any; - oncanplaythrough: (ev: Event) => any; - onchange: (ev: Event) => any; - onclick: (ev: MouseEvent) => any; - oncompassneedscalibration: (ev: Event) => any; - oncontextmenu: (ev: PointerEvent) => any; - ondblclick: (ev: MouseEvent) => any; - ondevicemotion: (ev: DeviceMotionEvent) => any; - ondeviceorientation: (ev: DeviceOrientationEvent) => any; - ondrag: (ev: DragEvent) => any; - ondragend: (ev: DragEvent) => any; - ondragenter: (ev: DragEvent) => any; - ondragleave: (ev: DragEvent) => any; - ondragover: (ev: DragEvent) => any; - ondragstart: (ev: DragEvent) => any; - ondrop: (ev: DragEvent) => any; - ondurationchange: (ev: Event) => any; - onemptied: (ev: Event) => any; - onended: (ev: Event) => any; - onerror: ErrorEventHandler; - onfocus: (ev: FocusEvent) => any; - onhashchange: (ev: HashChangeEvent) => any; - oninput: (ev: Event) => any; - onkeydown: (ev: KeyboardEvent) => any; - onkeypress: (ev: KeyboardEvent) => any; - onkeyup: (ev: KeyboardEvent) => any; - onload: (ev: Event) => any; - onloadeddata: (ev: Event) => any; - onloadedmetadata: (ev: Event) => any; - onloadstart: (ev: Event) => any; - onmessage: (ev: MessageEvent) => any; - onmousedown: (ev: MouseEvent) => any; - onmouseenter: (ev: MouseEvent) => any; - onmouseleave: (ev: MouseEvent) => any; - onmousemove: (ev: MouseEvent) => any; - onmouseout: (ev: MouseEvent) => any; - onmouseover: (ev: MouseEvent) => any; - onmouseup: (ev: MouseEvent) => any; - onmousewheel: (ev: MouseWheelEvent) => any; - onmsgesturechange: (ev: MSGestureEvent) => any; - onmsgesturedoubletap: (ev: MSGestureEvent) => any; - onmsgestureend: (ev: MSGestureEvent) => any; - onmsgesturehold: (ev: MSGestureEvent) => any; - onmsgesturestart: (ev: MSGestureEvent) => any; - onmsgesturetap: (ev: MSGestureEvent) => any; - onmsinertiastart: (ev: MSGestureEvent) => any; - onmspointercancel: (ev: MSPointerEvent) => any; - onmspointerdown: (ev: MSPointerEvent) => any; - onmspointerenter: (ev: MSPointerEvent) => any; - onmspointerleave: (ev: MSPointerEvent) => any; - onmspointermove: (ev: MSPointerEvent) => any; - onmspointerout: (ev: MSPointerEvent) => any; - onmspointerover: (ev: MSPointerEvent) => any; - onmspointerup: (ev: MSPointerEvent) => any; - onoffline: (ev: Event) => any; - ononline: (ev: Event) => any; - onorientationchange: (ev: Event) => any; - onpagehide: (ev: PageTransitionEvent) => any; - onpageshow: (ev: PageTransitionEvent) => any; - onpause: (ev: Event) => any; - onplay: (ev: Event) => any; - onplaying: (ev: Event) => any; - onpopstate: (ev: PopStateEvent) => any; - onprogress: (ev: ProgressEvent) => any; - onratechange: (ev: Event) => any; - onreadystatechange: (ev: ProgressEvent) => any; - onreset: (ev: Event) => any; - onresize: (ev: UIEvent) => any; - onscroll: (ev: UIEvent) => any; - onseeked: (ev: Event) => any; - onseeking: (ev: Event) => any; - onselect: (ev: UIEvent) => any; - onstalled: (ev: Event) => any; - onstorage: (ev: StorageEvent) => any; - onsubmit: (ev: Event) => any; - onsuspend: (ev: Event) => any; - ontimeupdate: (ev: Event) => any; - ontouchcancel: any; - ontouchend: any; - ontouchmove: any; - ontouchstart: any; - onunload: (ev: Event) => any; - onvolumechange: (ev: Event) => any; - onwaiting: (ev: Event) => any; - opener: Window; - orientation: string; - outerHeight: number; - outerWidth: number; - pageXOffset: number; - pageYOffset: number; - parent: Window; - performance: Performance; - personalbar: BarProp; - screen: Screen; - screenLeft: number; - screenTop: number; - screenX: number; - screenY: number; - scrollX: number; - scrollY: number; - scrollbars: BarProp; - self: Window; - status: string; - statusbar: BarProp; - styleMedia: StyleMedia; - toolbar: BarProp; - top: Window; - window: Window; - alert(message?: any): void; - blur(): void; - cancelAnimationFrame(handle: number): void; - captureEvents(): void; - close(): void; - confirm(message?: string): boolean; - focus(): void; - getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration; - getMatchedCSSRules(elt: Element, pseudoElt?: string): CSSRuleList; - getSelection(): Selection; - matchMedia(mediaQuery: string): MediaQueryList; - moveBy(x?: number, y?: number): void; - moveTo(x?: number, y?: number): void; - msCancelRequestAnimationFrame(handle: number): void; - msMatchMedia(mediaQuery: string): MediaQueryList; - msRequestAnimationFrame(callback: FrameRequestCallback): number; - msWriteProfilerMark(profilerMarkName: string): void; - open(url?: string, target?: string, features?: string, replace?: boolean): any; - postMessage(message: any, targetOrigin: string, ports?: any): void; - print(): void; - prompt(message?: string, _default?: string): string; - releaseEvents(): void; - requestAnimationFrame(callback: FrameRequestCallback): number; - resizeBy(x?: number, y?: number): void; - resizeTo(x?: number, y?: number): void; - scroll(x?: number, y?: number): void; - scrollBy(x?: number, y?: number): void; - scrollTo(x?: number, y?: number): void; - webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint; - webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint; - addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "afterprint", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "beforeprint", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "beforeunload", listener: (ev: BeforeUnloadEvent) => any, useCapture?: boolean): void; - addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "compassneedscalibration", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "devicemotion", listener: (ev: DeviceMotionEvent) => any, useCapture?: boolean): void; - addEventListener(type: "deviceorientation", listener: (ev: DeviceOrientationEvent) => any, useCapture?: boolean): void; - addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "hashchange", listener: (ev: HashChangeEvent) => any, useCapture?: boolean): void; - addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void; - addEventListener(type: "offline", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "online", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "orientationchange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "pagehide", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pageshow", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "popstate", listener: (ev: PopStateEvent) => any, useCapture?: boolean): void; - addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void; - addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "readystatechange", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void; - addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "resize", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "storage", listener: (ev: StorageEvent) => any, useCapture?: boolean): void; - addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "unload", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - [index: number]: Window; -} - -declare var Window: { - prototype: Window; - new(): Window; -} - -interface Worker extends EventTarget, AbstractWorker { - onmessage: (ev: MessageEvent) => any; - postMessage(message: any, ports?: any): void; - terminate(): void; - addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var Worker: { - prototype: Worker; - new(stringUrl: string): Worker; -} - -interface XMLDocument extends Document { -} - -declare var XMLDocument: { - prototype: XMLDocument; - new(): XMLDocument; -} - -interface XMLHttpRequest extends EventTarget, XMLHttpRequestEventTarget { - msCaching: string; - onreadystatechange: (ev: ProgressEvent) => any; - readyState: number; - response: any; - responseBody: any; - responseText: string; - responseType: string; - responseXML: any; - status: number; - statusText: string; - timeout: number; - upload: XMLHttpRequestUpload; - withCredentials: boolean; - abort(): void; - getAllResponseHeaders(): string; - getResponseHeader(header: string): string; - msCachingEnabled(): boolean; - open(method: string, url: string, async?: boolean, user?: string, password?: string): void; - overrideMimeType(mime: string): void; - send(data?: Document): void; - send(data?: string): void; - send(data?: any): void; - setRequestHeader(header: string, value: string): void; - DONE: number; - HEADERS_RECEIVED: number; - LOADING: number; - OPENED: number; - UNSENT: number; - addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadend", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void; - addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void; - addEventListener(type: "readystatechange", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void; - addEventListener(type: "timeout", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var XMLHttpRequest: { - prototype: XMLHttpRequest; - new(): XMLHttpRequest; - DONE: number; - HEADERS_RECEIVED: number; - LOADING: number; - OPENED: number; - UNSENT: number; - create(): XMLHttpRequest; -} - -interface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget { - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var XMLHttpRequestUpload: { - prototype: XMLHttpRequestUpload; - new(): XMLHttpRequestUpload; -} - -interface XMLSerializer { - serializeToString(target: Node): string; -} - -declare var XMLSerializer: { - prototype: XMLSerializer; - new(): XMLSerializer; -} - -interface XPathEvaluator { - createExpression(expression: string, resolver: XPathNSResolver): XPathExpression; - createNSResolver(nodeResolver?: Node): XPathNSResolver; - evaluate(expression: string, contextNode: Node, resolver: XPathNSResolver, type: number, result: XPathResult): XPathResult; -} - -declare var XPathEvaluator: { - prototype: XPathEvaluator; - new(): XPathEvaluator; -} - -interface XPathExpression { - evaluate(contextNode: Node, type: number, result: XPathResult): XPathExpression; -} - -declare var XPathExpression: { - prototype: XPathExpression; - new(): XPathExpression; -} - -interface XPathNSResolver { - lookupNamespaceURI(prefix: string): string; -} - -declare var XPathNSResolver: { - prototype: XPathNSResolver; - new(): XPathNSResolver; -} - -interface XPathResult { - booleanValue: boolean; - invalidIteratorState: boolean; - numberValue: number; - resultType: number; - singleNodeValue: Node; - snapshotLength: number; - stringValue: string; - iterateNext(): Node; - snapshotItem(index: number): Node; - ANY_TYPE: number; - ANY_UNORDERED_NODE_TYPE: number; - BOOLEAN_TYPE: number; - FIRST_ORDERED_NODE_TYPE: number; - NUMBER_TYPE: number; - ORDERED_NODE_ITERATOR_TYPE: number; - ORDERED_NODE_SNAPSHOT_TYPE: number; - STRING_TYPE: number; - UNORDERED_NODE_ITERATOR_TYPE: number; - UNORDERED_NODE_SNAPSHOT_TYPE: number; -} - -declare var XPathResult: { - prototype: XPathResult; - new(): XPathResult; - ANY_TYPE: number; - ANY_UNORDERED_NODE_TYPE: number; - BOOLEAN_TYPE: number; - FIRST_ORDERED_NODE_TYPE: number; - NUMBER_TYPE: number; - ORDERED_NODE_ITERATOR_TYPE: number; - ORDERED_NODE_SNAPSHOT_TYPE: number; - STRING_TYPE: number; - UNORDERED_NODE_ITERATOR_TYPE: number; - UNORDERED_NODE_SNAPSHOT_TYPE: number; -} - -interface XSLTProcessor { - clearParameters(): void; - getParameter(namespaceURI: string, localName: string): any; - importStylesheet(style: Node): void; - removeParameter(namespaceURI: string, localName: string): void; - reset(): void; - setParameter(namespaceURI: string, localName: string, value: any): void; - transformToDocument(source: Node): Document; - transformToFragment(source: Node, document: Document): DocumentFragment; -} - -declare var XSLTProcessor: { - prototype: XSLTProcessor; - new(): XSLTProcessor; -} - -interface AbstractWorker { - onerror: (ev: Event) => any; - addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -interface ChildNode { - remove(): void; -} - -interface DOML2DeprecatedColorProperty { - color: string; -} - -interface DOML2DeprecatedSizeProperty { - size: number; -} - -interface DocumentEvent { - createEvent(eventInterface:"AnimationEvent"): AnimationEvent; - createEvent(eventInterface:"AriaRequestEvent"): AriaRequestEvent; - createEvent(eventInterface:"AudioProcessingEvent"): AudioProcessingEvent; - createEvent(eventInterface:"BeforeUnloadEvent"): BeforeUnloadEvent; - createEvent(eventInterface:"CloseEvent"): CloseEvent; - createEvent(eventInterface:"CommandEvent"): CommandEvent; - createEvent(eventInterface:"CompositionEvent"): CompositionEvent; - createEvent(eventInterface: "CustomEvent"): CustomEvent; - createEvent(eventInterface:"DeviceMotionEvent"): DeviceMotionEvent; - createEvent(eventInterface:"DeviceOrientationEvent"): DeviceOrientationEvent; - createEvent(eventInterface:"DragEvent"): DragEvent; - createEvent(eventInterface:"ErrorEvent"): ErrorEvent; - createEvent(eventInterface:"Event"): Event; - createEvent(eventInterface:"Events"): Event; - createEvent(eventInterface:"FocusEvent"): FocusEvent; - createEvent(eventInterface:"GamepadEvent"): GamepadEvent; - createEvent(eventInterface:"HashChangeEvent"): HashChangeEvent; - createEvent(eventInterface:"IDBVersionChangeEvent"): IDBVersionChangeEvent; - createEvent(eventInterface:"KeyboardEvent"): KeyboardEvent; - createEvent(eventInterface:"LongRunningScriptDetectedEvent"): LongRunningScriptDetectedEvent; - createEvent(eventInterface:"MSGestureEvent"): MSGestureEvent; - createEvent(eventInterface:"MSManipulationEvent"): MSManipulationEvent; - createEvent(eventInterface:"MSMediaKeyMessageEvent"): MSMediaKeyMessageEvent; - createEvent(eventInterface:"MSMediaKeyNeededEvent"): MSMediaKeyNeededEvent; - createEvent(eventInterface:"MSPointerEvent"): MSPointerEvent; - createEvent(eventInterface:"MSSiteModeEvent"): MSSiteModeEvent; - createEvent(eventInterface:"MessageEvent"): MessageEvent; - createEvent(eventInterface:"MouseEvent"): MouseEvent; - createEvent(eventInterface:"MouseEvents"): MouseEvent; - createEvent(eventInterface:"MouseWheelEvent"): MouseWheelEvent; - createEvent(eventInterface:"MSGestureEvent"): MSGestureEvent; - createEvent(eventInterface:"MSPointerEvent"): MSPointerEvent; - createEvent(eventInterface:"MutationEvent"): MutationEvent; - createEvent(eventInterface:"MutationEvents"): MutationEvent; - createEvent(eventInterface:"NavigationCompletedEvent"): NavigationCompletedEvent; - createEvent(eventInterface:"NavigationEvent"): NavigationEvent; - createEvent(eventInterface:"NavigationEventWithReferrer"): NavigationEventWithReferrer; - createEvent(eventInterface:"OfflineAudioCompletionEvent"): OfflineAudioCompletionEvent; - createEvent(eventInterface:"PageTransitionEvent"): PageTransitionEvent; - createEvent(eventInterface:"PermissionRequestedEvent"): PermissionRequestedEvent; - createEvent(eventInterface:"PointerEvent"): PointerEvent; - createEvent(eventInterface:"PopStateEvent"): PopStateEvent; - createEvent(eventInterface:"ProgressEvent"): ProgressEvent; - createEvent(eventInterface:"SVGZoomEvent"): SVGZoomEvent; - createEvent(eventInterface:"SVGZoomEvents"): SVGZoomEvent; - createEvent(eventInterface:"ScriptNotifyEvent"): ScriptNotifyEvent; - createEvent(eventInterface:"StorageEvent"): StorageEvent; - createEvent(eventInterface:"TextEvent"): TextEvent; - createEvent(eventInterface:"TouchEvent"): TouchEvent; - createEvent(eventInterface:"TrackEvent"): TrackEvent; - createEvent(eventInterface:"TransitionEvent"): TransitionEvent; - createEvent(eventInterface:"UIEvent"): UIEvent; - createEvent(eventInterface:"UIEvents"): UIEvent; - createEvent(eventInterface:"UnviewableContentIdentifiedEvent"): UnviewableContentIdentifiedEvent; - createEvent(eventInterface:"WebGLContextEvent"): WebGLContextEvent; - createEvent(eventInterface:"WheelEvent"): WheelEvent; - createEvent(eventInterface: string): Event; -} - -interface ElementTraversal { - childElementCount: number; - firstElementChild: Element; - lastElementChild: Element; - nextElementSibling: Element; - previousElementSibling: Element; -} - -interface GetSVGDocument { - getSVGDocument(): Document; -} - -interface GlobalEventHandlers { - onpointercancel: (ev: PointerEvent) => any; - onpointerdown: (ev: PointerEvent) => any; - onpointerenter: (ev: PointerEvent) => any; - onpointerleave: (ev: PointerEvent) => any; - onpointermove: (ev: PointerEvent) => any; - onpointerout: (ev: PointerEvent) => any; - onpointerover: (ev: PointerEvent) => any; - onpointerup: (ev: PointerEvent) => any; - onwheel: (ev: WheelEvent) => any; - addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -interface HTMLTableAlignment { - /** - * Sets or retrieves a value that you can use to implement your own ch functionality for the object. - */ - ch: string; - /** - * Sets or retrieves a value that you can use to implement your own chOff functionality for the object. - */ - chOff: string; - /** - * Sets or retrieves how text and other content are vertically aligned within the object that contains them. - */ - vAlign: string; -} - -interface IDBEnvironment { - indexedDB: IDBFactory; - msIndexedDB: IDBFactory; -} - -interface LinkStyle { - sheet: StyleSheet; -} - -interface MSBaseReader { - onabort: (ev: Event) => any; - onerror: (ev: Event) => any; - onload: (ev: Event) => any; - onloadend: (ev: ProgressEvent) => any; - onloadstart: (ev: Event) => any; - onprogress: (ev: ProgressEvent) => any; - readyState: number; - result: any; - abort(): void; - DONE: number; - EMPTY: number; - LOADING: number; - addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadend", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void; - addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -interface MSFileSaver { - msSaveBlob(blob: any, defaultName?: string): boolean; - msSaveOrOpenBlob(blob: any, defaultName?: string): boolean; -} - -interface MSNavigatorDoNotTrack { - confirmSiteSpecificTrackingException(args: ConfirmSiteSpecificExceptionsInformation): boolean; - confirmWebWideTrackingException(args: ExceptionInformation): boolean; - removeSiteSpecificTrackingException(args: ExceptionInformation): void; - removeWebWideTrackingException(args: ExceptionInformation): void; - storeSiteSpecificTrackingException(args: StoreSiteSpecificExceptionsInformation): void; - storeWebWideTrackingException(args: StoreExceptionsInformation): void; -} - -interface NavigatorContentUtils { -} - -interface NavigatorGeolocation { - geolocation: Geolocation; -} - -interface NavigatorID { - appName: string; - appVersion: string; - platform: string; - product: string; - productSub: string; - userAgent: string; - vendor: string; - vendorSub: string; -} - -interface NavigatorOnLine { - onLine: boolean; -} - -interface NavigatorStorageUtils { -} - -interface NodeSelector { - querySelector(selectors: string): Element; - querySelectorAll(selectors: string): NodeList; -} - -interface RandomSource { - getRandomValues(array: ArrayBufferView): ArrayBufferView; -} - -interface SVGAnimatedPathData { - pathSegList: SVGPathSegList; -} - -interface SVGAnimatedPoints { - animatedPoints: SVGPointList; - points: SVGPointList; -} - -interface SVGExternalResourcesRequired { - externalResourcesRequired: SVGAnimatedBoolean; -} - -interface SVGFilterPrimitiveStandardAttributes extends SVGStylable { - height: SVGAnimatedLength; - result: SVGAnimatedString; - width: SVGAnimatedLength; - x: SVGAnimatedLength; - y: SVGAnimatedLength; -} - -interface SVGFitToViewBox { - preserveAspectRatio: SVGAnimatedPreserveAspectRatio; - viewBox: SVGAnimatedRect; -} - -interface SVGLangSpace { - xmllang: string; - xmlspace: string; -} - -interface SVGLocatable { - farthestViewportElement: SVGElement; - nearestViewportElement: SVGElement; - getBBox(): SVGRect; - getCTM(): SVGMatrix; - getScreenCTM(): SVGMatrix; - getTransformToElement(element: SVGElement): SVGMatrix; -} - -interface SVGStylable { - className: SVGAnimatedString; - style: CSSStyleDeclaration; -} - -interface SVGTests { - requiredExtensions: SVGStringList; - requiredFeatures: SVGStringList; - systemLanguage: SVGStringList; - hasExtension(extension: string): boolean; -} - -interface SVGTransformable extends SVGLocatable { - transform: SVGAnimatedTransformList; -} - -interface SVGURIReference { - href: SVGAnimatedString; -} - -interface WindowBase64 { - atob(encodedString: string): string; - btoa(rawString: string): string; -} - -interface WindowConsole { - console: Console; -} - -interface WindowLocalStorage { - localStorage: Storage; -} - -interface WindowSessionStorage { - sessionStorage: Storage; -} - -interface WindowTimers extends Object, WindowTimersExtension { - clearInterval(handle: number): void; - clearTimeout(handle: number): void; - setInterval(handler: any, timeout?: any, ...args: any[]): number; - setTimeout(handler: any, timeout?: any, ...args: any[]): number; -} - -interface WindowTimersExtension { - clearImmediate(handle: number): void; - msClearImmediate(handle: number): void; - msSetImmediate(expression: any, ...args: any[]): number; - setImmediate(expression: any, ...args: any[]): number; -} - -interface XMLHttpRequestEventTarget { - onabort: (ev: Event) => any; - onerror: (ev: Event) => any; - onload: (ev: Event) => any; - onloadend: (ev: ProgressEvent) => any; - onloadstart: (ev: Event) => any; - onprogress: (ev: ProgressEvent) => any; - ontimeout: (ev: ProgressEvent) => any; - addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadend", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void; - addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void; - addEventListener(type: "timeout", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - - -interface NodeListOf extends NodeList { - length: number; - item(index: number): TNode; - [index: number]: TNode; -} - -interface BlobPropertyBag { - type?: string; - endings?: string; -} - -interface EventListenerObject { - handleEvent(evt: Event): void; -} - -declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject; - -interface ErrorEventHandler { - (event: Event, source?: string, fileno?: number, columnNumber?: number): void; - (event: string, source?: string, fileno?: number, columnNumber?: number): void; -} -interface PositionCallback { - (position: Position): void; -} -interface PositionErrorCallback { - (error: PositionError): void; -} -interface MediaQueryListListener { - (mql: MediaQueryList): void; -} -interface MSLaunchUriCallback { - (): void; -} -interface FrameRequestCallback { - (time: number): void; -} -interface MSUnsafeFunctionCallback { - (): any; -} -interface MSExecAtPriorityFunctionCallback { - (...args: any[]): any; -} -interface MutationCallback { - (mutations: MutationRecord[], observer: MutationObserver): void; -} -interface DecodeSuccessCallback { - (decodedData: AudioBuffer): void; -} -interface DecodeErrorCallback { - (): void; -} -interface FunctionStringCallback { - (data: string): void; -} -declare var Audio: {new(src?: string): HTMLAudioElement; }; -declare var Image: {new(width?: number, height?: number): HTMLImageElement; }; -declare var Option: {new(text?: string, value?: string, defaultSelected?: boolean, selected?: boolean): HTMLOptionElement; }; -declare var animationStartTime: number; -declare var applicationCache: ApplicationCache; -declare var clientInformation: Navigator; -declare var closed: boolean; -declare var crypto: Crypto; -declare var defaultStatus: string; -declare var devicePixelRatio: number; -declare var doNotTrack: string; -declare var document: Document; -declare var event: Event; -declare var external: External; -declare var frameElement: Element; -declare var frames: Window; -declare var history: History; -declare var innerHeight: number; -declare var innerWidth: number; -declare var length: number; -declare var location: Location; -declare var locationbar: BarProp; -declare var menubar: BarProp; -declare var msAnimationStartTime: number; -declare var msTemplatePrinter: MSTemplatePrinter; -declare var name: string; -declare var navigator: Navigator; -declare var offscreenBuffering: string | boolean; -declare var onabort: (ev: Event) => any; -declare var onafterprint: (ev: Event) => any; -declare var onbeforeprint: (ev: Event) => any; -declare var onbeforeunload: (ev: BeforeUnloadEvent) => any; -declare var onblur: (ev: FocusEvent) => any; -declare var oncanplay: (ev: Event) => any; -declare var oncanplaythrough: (ev: Event) => any; -declare var onchange: (ev: Event) => any; -declare var onclick: (ev: MouseEvent) => any; -declare var oncompassneedscalibration: (ev: Event) => any; -declare var oncontextmenu: (ev: PointerEvent) => any; -declare var ondblclick: (ev: MouseEvent) => any; -declare var ondevicemotion: (ev: DeviceMotionEvent) => any; -declare var ondeviceorientation: (ev: DeviceOrientationEvent) => any; -declare var ondrag: (ev: DragEvent) => any; -declare var ondragend: (ev: DragEvent) => any; -declare var ondragenter: (ev: DragEvent) => any; -declare var ondragleave: (ev: DragEvent) => any; -declare var ondragover: (ev: DragEvent) => any; -declare var ondragstart: (ev: DragEvent) => any; -declare var ondrop: (ev: DragEvent) => any; -declare var ondurationchange: (ev: Event) => any; -declare var onemptied: (ev: Event) => any; -declare var onended: (ev: Event) => any; -declare var onerror: ErrorEventHandler; -declare var onfocus: (ev: FocusEvent) => any; -declare var onhashchange: (ev: HashChangeEvent) => any; -declare var oninput: (ev: Event) => any; -declare var onkeydown: (ev: KeyboardEvent) => any; -declare var onkeypress: (ev: KeyboardEvent) => any; -declare var onkeyup: (ev: KeyboardEvent) => any; -declare var onload: (ev: Event) => any; -declare var onloadeddata: (ev: Event) => any; -declare var onloadedmetadata: (ev: Event) => any; -declare var onloadstart: (ev: Event) => any; -declare var onmessage: (ev: MessageEvent) => any; -declare var onmousedown: (ev: MouseEvent) => any; -declare var onmouseenter: (ev: MouseEvent) => any; -declare var onmouseleave: (ev: MouseEvent) => any; -declare var onmousemove: (ev: MouseEvent) => any; -declare var onmouseout: (ev: MouseEvent) => any; -declare var onmouseover: (ev: MouseEvent) => any; -declare var onmouseup: (ev: MouseEvent) => any; -declare var onmousewheel: (ev: MouseWheelEvent) => any; -declare var onmsgesturechange: (ev: MSGestureEvent) => any; -declare var onmsgesturedoubletap: (ev: MSGestureEvent) => any; -declare var onmsgestureend: (ev: MSGestureEvent) => any; -declare var onmsgesturehold: (ev: MSGestureEvent) => any; -declare var onmsgesturestart: (ev: MSGestureEvent) => any; -declare var onmsgesturetap: (ev: MSGestureEvent) => any; -declare var onmsinertiastart: (ev: MSGestureEvent) => any; -declare var onmspointercancel: (ev: MSPointerEvent) => any; -declare var onmspointerdown: (ev: MSPointerEvent) => any; -declare var onmspointerenter: (ev: MSPointerEvent) => any; -declare var onmspointerleave: (ev: MSPointerEvent) => any; -declare var onmspointermove: (ev: MSPointerEvent) => any; -declare var onmspointerout: (ev: MSPointerEvent) => any; -declare var onmspointerover: (ev: MSPointerEvent) => any; -declare var onmspointerup: (ev: MSPointerEvent) => any; -declare var onoffline: (ev: Event) => any; -declare var ononline: (ev: Event) => any; -declare var onorientationchange: (ev: Event) => any; -declare var onpagehide: (ev: PageTransitionEvent) => any; -declare var onpageshow: (ev: PageTransitionEvent) => any; -declare var onpause: (ev: Event) => any; -declare var onplay: (ev: Event) => any; -declare var onplaying: (ev: Event) => any; -declare var onpopstate: (ev: PopStateEvent) => any; -declare var onprogress: (ev: ProgressEvent) => any; -declare var onratechange: (ev: Event) => any; -declare var onreadystatechange: (ev: ProgressEvent) => any; -declare var onreset: (ev: Event) => any; -declare var onresize: (ev: UIEvent) => any; -declare var onscroll: (ev: UIEvent) => any; -declare var onseeked: (ev: Event) => any; -declare var onseeking: (ev: Event) => any; -declare var onselect: (ev: UIEvent) => any; -declare var onstalled: (ev: Event) => any; -declare var onstorage: (ev: StorageEvent) => any; -declare var onsubmit: (ev: Event) => any; -declare var onsuspend: (ev: Event) => any; -declare var ontimeupdate: (ev: Event) => any; -declare var ontouchcancel: any; -declare var ontouchend: any; -declare var ontouchmove: any; -declare var ontouchstart: any; -declare var onunload: (ev: Event) => any; -declare var onvolumechange: (ev: Event) => any; -declare var onwaiting: (ev: Event) => any; -declare var opener: Window; -declare var orientation: string; -declare var outerHeight: number; -declare var outerWidth: number; -declare var pageXOffset: number; -declare var pageYOffset: number; -declare var parent: Window; -declare var performance: Performance; -declare var personalbar: BarProp; -declare var screen: Screen; -declare var screenLeft: number; -declare var screenTop: number; -declare var screenX: number; -declare var screenY: number; -declare var scrollX: number; -declare var scrollY: number; -declare var scrollbars: BarProp; -declare var self: Window; -declare var status: string; -declare var statusbar: BarProp; -declare var styleMedia: StyleMedia; -declare var toolbar: BarProp; -declare var top: Window; -declare var window: Window; -declare function alert(message?: any): void; -declare function blur(): void; -declare function cancelAnimationFrame(handle: number): void; -declare function captureEvents(): void; -declare function close(): void; -declare function confirm(message?: string): boolean; -declare function focus(): void; -declare function getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration; -declare function getMatchedCSSRules(elt: Element, pseudoElt?: string): CSSRuleList; -declare function getSelection(): Selection; -declare function matchMedia(mediaQuery: string): MediaQueryList; -declare function moveBy(x?: number, y?: number): void; -declare function moveTo(x?: number, y?: number): void; -declare function msCancelRequestAnimationFrame(handle: number): void; -declare function msMatchMedia(mediaQuery: string): MediaQueryList; -declare function msRequestAnimationFrame(callback: FrameRequestCallback): number; -declare function msWriteProfilerMark(profilerMarkName: string): void; -declare function open(url?: string, target?: string, features?: string, replace?: boolean): any; -declare function postMessage(message: any, targetOrigin: string, ports?: any): void; -declare function print(): void; -declare function prompt(message?: string, _default?: string): string; -declare function releaseEvents(): void; -declare function requestAnimationFrame(callback: FrameRequestCallback): number; -declare function resizeBy(x?: number, y?: number): void; -declare function resizeTo(x?: number, y?: number): void; -declare function scroll(x?: number, y?: number): void; -declare function scrollBy(x?: number, y?: number): void; -declare function scrollTo(x?: number, y?: number): void; -declare function webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint; -declare function webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint; -declare function toString(): string; -declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -declare function dispatchEvent(evt: Event): boolean; -declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -declare function clearInterval(handle: number): void; -declare function clearTimeout(handle: number): void; -declare function setInterval(handler: any, timeout?: any, ...args: any[]): number; -declare function setTimeout(handler: any, timeout?: any, ...args: any[]): number; -declare function clearImmediate(handle: number): void; -declare function msClearImmediate(handle: number): void; -declare function msSetImmediate(expression: any, ...args: any[]): number; -declare function setImmediate(expression: any, ...args: any[]): number; -declare var sessionStorage: Storage; -declare var localStorage: Storage; -declare var console: Console; -declare var onpointercancel: (ev: PointerEvent) => any; -declare var onpointerdown: (ev: PointerEvent) => any; -declare var onpointerenter: (ev: PointerEvent) => any; -declare var onpointerleave: (ev: PointerEvent) => any; -declare var onpointermove: (ev: PointerEvent) => any; -declare var onpointerout: (ev: PointerEvent) => any; -declare var onpointerover: (ev: PointerEvent) => any; -declare var onpointerup: (ev: PointerEvent) => any; -declare var onwheel: (ev: WheelEvent) => any; -declare var indexedDB: IDBFactory; -declare var msIndexedDB: IDBFactory; -declare function atob(encodedString: string): string; -declare function btoa(rawString: string): string; -declare function addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "afterprint", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "beforeprint", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "beforeunload", listener: (ev: BeforeUnloadEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "compassneedscalibration", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "devicemotion", listener: (ev: DeviceMotionEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "deviceorientation", listener: (ev: DeviceOrientationEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "hashchange", listener: (ev: HashChangeEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "offline", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "online", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "orientationchange", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "pagehide", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "pageshow", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "popstate", listener: (ev: PopStateEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "readystatechange", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "resize", listener: (ev: UIEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "storage", listener: (ev: StorageEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "unload", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void; -declare function addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void; -declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -///////////////////////////// -/// WorkerGlobalScope APIs -///////////////////////////// -// These are only available in a Web Worker -declare function importScripts(...urls: string[]): void; - - -///////////////////////////// -/// Windows Script Host APIS -///////////////////////////// - - -interface ActiveXObject { - new (s: string): any; -} -declare var ActiveXObject: ActiveXObject; - -interface ITextWriter { - Write(s: string): void; - WriteLine(s: string): void; - Close(): void; -} - -interface TextStreamBase { - /** - * The column number of the current character position in an input stream. - */ - Column: number; - - /** - * The current line number in an input stream. - */ - Line: number; - - /** - * Closes a text stream. - * It is not necessary to close standard streams; they close automatically when the process ends. If - * you close a standard stream, be aware that any other pointers to that standard stream become invalid. - */ - Close(): void; -} - -interface TextStreamWriter extends TextStreamBase { - /** - * Sends a string to an output stream. - */ - Write(s: string): void; - - /** - * Sends a specified number of blank lines (newline characters) to an output stream. - */ - WriteBlankLines(intLines: number): void; - - /** - * Sends a string followed by a newline character to an output stream. - */ - WriteLine(s: string): void; -} - -interface TextStreamReader extends TextStreamBase { - /** - * Returns a specified number of characters from an input stream, starting at the current pointer position. - * Does not return until the ENTER key is pressed. - * Can only be used on a stream in reading mode; causes an error in writing or appending mode. - */ - Read(characters: number): string; - - /** - * Returns all characters from an input stream. - * Can only be used on a stream in reading mode; causes an error in writing or appending mode. - */ - ReadAll(): string; - - /** - * Returns an entire line from an input stream. - * Although this method extracts the newline character, it does not add it to the returned string. - * Can only be used on a stream in reading mode; causes an error in writing or appending mode. - */ - ReadLine(): string; - - /** - * Skips a specified number of characters when reading from an input text stream. - * Can only be used on a stream in reading mode; causes an error in writing or appending mode. - * @param characters Positive number of characters to skip forward. (Backward skipping is not supported.) - */ - Skip(characters: number): void; - - /** - * Skips the next line when reading from an input text stream. - * Can only be used on a stream in reading mode, not writing or appending mode. - */ - SkipLine(): void; - - /** - * Indicates whether the stream pointer position is at the end of a line. - */ - AtEndOfLine: boolean; - - /** - * Indicates whether the stream pointer position is at the end of a stream. - */ - AtEndOfStream: boolean; -} - -declare var WScript: { - /** - * Outputs text to either a message box (under WScript.exe) or the command console window followed by - * a newline (under CScript.exe). - */ - Echo(s: any): void; - - /** - * Exposes the write-only error output stream for the current script. - * Can be accessed only while using CScript.exe. - */ - StdErr: TextStreamWriter; - - /** - * Exposes the write-only output stream for the current script. - * Can be accessed only while using CScript.exe. - */ - StdOut: TextStreamWriter; - Arguments: { length: number; Item(n: number): string; }; - - /** - * The full path of the currently running script. - */ - ScriptFullName: string; - - /** - * Forces the script to stop immediately, with an optional exit code. - */ - Quit(exitCode?: number): number; - - /** - * The Windows Script Host build version number. - */ - BuildVersion: number; - - /** - * Fully qualified path of the host executable. - */ - FullName: string; - - /** - * Gets/sets the script mode - interactive(true) or batch(false). - */ - Interactive: boolean; - - /** - * The name of the host executable (WScript.exe or CScript.exe). - */ - Name: string; - - /** - * Path of the directory containing the host executable. - */ - Path: string; - - /** - * The filename of the currently running script. - */ - ScriptName: string; - - /** - * Exposes the read-only input stream for the current script. - * Can be accessed only while using CScript.exe. - */ - StdIn: TextStreamReader; - - /** - * Windows Script Host version - */ - Version: string; - - /** - * Connects a COM object's event sources to functions named with a given prefix, in the form prefix_event. - */ - ConnectObject(objEventSource: any, strPrefix: string): void; - - /** - * Creates a COM object. - * @param strProgiID - * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events. - */ - CreateObject(strProgID: string, strPrefix?: string): any; - - /** - * Disconnects a COM object from its event sources. - */ - DisconnectObject(obj: any): void; - - /** - * Retrieves an existing object with the specified ProgID from memory, or creates a new one from a file. - * @param strPathname Fully qualified path to the file containing the object persisted to disk. - * For objects in memory, pass a zero-length string. - * @param strProgID - * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events. - */ - GetObject(strPathname: string, strProgID?: string, strPrefix?: string): any; - - /** - * Suspends script execution for a specified length of time, then continues execution. - * @param intTime Interval (in milliseconds) to suspend script execution. - */ - Sleep(intTime: number): void; -}; - -/** - * Allows enumerating over a COM collection, which may not have indexed item access. - */ -interface Enumerator { - /** - * Returns true if the current item is the last one in the collection, or the collection is empty, - * or the current item is undefined. - */ - atEnd(): boolean; - - /** - * Returns the current item in the collection - */ - item(): T; - - /** - * Resets the current item in the collection to the first item. If there are no items in the collection, - * the current item is set to undefined. - */ - moveFirst(): void; - - /** - * Moves the current item to the next item in the collection. If the enumerator is at the end of - * the collection or the collection is empty, the current item is set to undefined. - */ - moveNext(): void; -} - -interface EnumeratorConstructor { - new (collection: any): Enumerator; - new (collection: any): Enumerator; -} - -declare var Enumerator: EnumeratorConstructor; - -/** - * Enables reading from a COM safe array, which might have an alternate lower bound, or multiple dimensions. - */ -interface VBArray { - /** - * Returns the number of dimensions (1-based). - */ - dimensions(): number; - - /** - * Takes an index for each dimension in the array, and returns the item at the corresponding location. - */ - getItem(dimension1Index: number, ...dimensionNIndexes: number[]): T; - - /** - * Returns the smallest available index for a given dimension. - * @param dimension 1-based dimension (defaults to 1) - */ - lbound(dimension?: number): number; - - /** - * Returns the largest available index for a given dimension. - * @param dimension 1-based dimension (defaults to 1) - */ - ubound(dimension?: number): number; - - /** - * Returns a Javascript array with all the elements in the VBArray. If there are multiple dimensions, - * each successive dimension is appended to the end of the array. - * Example: [[1,2,3],[4,5,6]] becomes [1,2,3,4,5,6] - */ - toArray(): T[]; -} - -interface VBArrayConstructor { - new (safeArray: any): VBArray; - new (safeArray: any): VBArray; -} - -declare var VBArray: VBArrayConstructor; diff --git a/build/lib/typings/node.d.ts b/build/lib/typings/node.d.ts deleted file mode 100644 index f9b3a68a893bc..0000000000000 --- a/build/lib/typings/node.d.ts +++ /dev/null @@ -1,1536 +0,0 @@ -// Type definitions for Node.js v0.12.0 -// Project: http://nodejs.org/ -// Definitions by: Microsoft TypeScript , DefinitelyTyped -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/************************************************ -* * -* Node.js v0.12.0 API * -* * -************************************************/ - -/************************************************ -* * -* GLOBAL * -* * -************************************************/ -declare var process: NodeJS.Process; -declare var global: NodeJS.Global; - -declare var __filename: string; -declare var __dirname: string; - -declare function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; -declare function clearTimeout(timeoutId: NodeJS.Timer): void; -declare function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; -declare function clearInterval(intervalId: NodeJS.Timer): void; -declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]): any; -declare function clearImmediate(immediateId: any): void; - -declare var require: { - (id: string): any; - resolve(id:string): string; - cache: any; - extensions: any; - main: any; -}; - -declare var module: { - exports: any; - require(id: string): any; - id: string; - filename: string; - loaded: boolean; - parent: any; - children: any[]; -}; - -// Same as module.exports -declare var exports: any; -declare var SlowBuffer: { - new (str: string, encoding?: string): Buffer; - new (size: number): Buffer; - new (size: Uint8Array): Buffer; - new (array: any[]): Buffer; - prototype: Buffer; - isBuffer(obj: any): boolean; - byteLength(string: string, encoding?: string): number; - concat(list: Buffer[], totalLength?: number): Buffer; -}; - - -// Buffer class -interface Buffer extends NodeBuffer {} -declare var Buffer: { - new (str: string, encoding?: string): Buffer; - new (size: number): Buffer; - new (size: Uint8Array): Buffer; - new (array: any[]): Buffer; - prototype: Buffer; - isBuffer(obj: any): boolean; - byteLength(string: string, encoding?: string): number; - concat(list: Buffer[], totalLength?: number): Buffer; -}; - -/************************************************ -* * -* GLOBAL INTERFACES * -* * -************************************************/ -declare module NodeJS { - export interface ErrnoException extends Error { - errno?: number; - code?: string; - path?: string; - syscall?: string; - } - - export interface EventEmitter { - addListener(event: string, listener: Function): EventEmitter; - on(event: string, listener: Function): EventEmitter; - once(event: string, listener: Function): EventEmitter; - removeListener(event: string, listener: Function): EventEmitter; - removeAllListeners(event?: string): EventEmitter; - setMaxListeners(n: number): void; - listeners(event: string): Function[]; - emit(event: string, ...args: any[]): boolean; - } - - export interface ReadableStream extends EventEmitter { - readable: boolean; - read(size?: number): string|Buffer; - setEncoding(encoding: string): void; - pause(): void; - resume(): void; - pipe(destination: T, options?: { end?: boolean; }): T; - unpipe(destination?: T): void; - unshift(chunk: string): void; - unshift(chunk: Buffer): void; - wrap(oldStream: ReadableStream): ReadableStream; - } - - export interface WritableStream extends EventEmitter { - writable: boolean; - write(buffer: Buffer, cb?: Function): boolean; - write(str: string, cb?: Function): boolean; - write(str: string, encoding?: string, cb?: Function): boolean; - end(): void; - end(buffer: Buffer, cb?: Function): void; - end(str: string, cb?: Function): void; - end(str: string, encoding?: string, cb?: Function): void; - } - - export interface ReadWriteStream extends ReadableStream, WritableStream {} - - export interface Process extends EventEmitter { - stdout: WritableStream; - stderr: WritableStream; - stdin: ReadableStream; - argv: string[]; - execPath: string; - abort(): void; - chdir(directory: string): void; - cwd(): string; - env: any; - exit(code?: number): void; - getgid(): number; - setgid(id: number): void; - setgid(id: string): void; - getuid(): number; - setuid(id: number): void; - setuid(id: string): void; - version: string; - versions: { - http_parser: string; - node: string; - v8: string; - ares: string; - uv: string; - zlib: string; - openssl: string; - }; - config: { - target_defaults: { - cflags: any[]; - default_configuration: string; - defines: string[]; - include_dirs: string[]; - libraries: string[]; - }; - variables: { - clang: number; - host_arch: string; - node_install_npm: boolean; - node_install_waf: boolean; - node_prefix: string; - node_shared_openssl: boolean; - node_shared_v8: boolean; - node_shared_zlib: boolean; - node_use_dtrace: boolean; - node_use_etw: boolean; - node_use_openssl: boolean; - target_arch: string; - v8_no_strict_aliasing: number; - v8_use_snapshot: boolean; - visibility: string; - }; - }; - kill(pid: number, signal?: string): void; - pid: number; - title: string; - arch: string; - platform: string; - memoryUsage(): { rss: number; heapTotal: number; heapUsed: number; }; - nextTick(callback: Function): void; - umask(mask?: number): number; - uptime(): number; - hrtime(time?:number[]): number[]; - - // Worker - send?(message: any, sendHandle?: any): void; - } - - export interface Global { - Array: typeof Array; - ArrayBuffer: typeof ArrayBuffer; - Boolean: typeof Boolean; - Buffer: typeof Buffer; - DataView: typeof DataView; - Date: typeof Date; - Error: typeof Error; - EvalError: typeof EvalError; - Float32Array: typeof Float32Array; - Float64Array: typeof Float64Array; - Function: typeof Function; - GLOBAL: Global; - Infinity: typeof Infinity; - Int16Array: typeof Int16Array; - Int32Array: typeof Int32Array; - Int8Array: typeof Int8Array; - Intl: typeof Intl; - JSON: typeof JSON; - Map: typeof Map; - Math: typeof Math; - NaN: typeof NaN; - Number: typeof Number; - Object: typeof Object; - Promise: Function; - RangeError: typeof RangeError; - ReferenceError: typeof ReferenceError; - RegExp: typeof RegExp; - Set: typeof Set; - String: typeof String; - Symbol: Function; - SyntaxError: typeof SyntaxError; - TypeError: typeof TypeError; - URIError: typeof URIError; - Uint16Array: typeof Uint16Array; - Uint32Array: typeof Uint32Array; - Uint8Array: typeof Uint8Array; - Uint8ClampedArray: Function; - WeakMap: typeof WeakMap; - WeakSet: Function; - clearImmediate: (immediateId: any) => void; - clearInterval: (intervalId: NodeJS.Timer) => void; - clearTimeout: (timeoutId: NodeJS.Timer) => void; - console: typeof console; - decodeURI: typeof decodeURI; - decodeURIComponent: typeof decodeURIComponent; - encodeURI: typeof encodeURI; - encodeURIComponent: typeof encodeURIComponent; - escape: (str: string) => string; - eval: typeof eval; - global: Global; - isFinite: typeof isFinite; - isNaN: typeof isNaN; - parseFloat: typeof parseFloat; - parseInt: typeof parseInt; - process: Process; - root: Global; - setImmediate: (callback: (...args: any[]) => void, ...args: any[]) => any; - setInterval: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => NodeJS.Timer; - setTimeout: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => NodeJS.Timer; - undefined: typeof undefined; - unescape: (str: string) => string; - gc: () => void; - } - - export interface Timer { - ref() : void; - unref() : void; - } -} - -/** - * @deprecated - */ -interface NodeBuffer { - [index: number]: number; - write(string: string, offset?: number, length?: number, encoding?: string): number; - toString(encoding?: string, start?: number, end?: number): string; - toJSON(): any; - length: number; - copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; - slice(start?: number, end?: number): Buffer; - readUInt8(offset: number, noAsset?: boolean): number; - readUInt16LE(offset: number, noAssert?: boolean): number; - readUInt16BE(offset: number, noAssert?: boolean): number; - readUInt32LE(offset: number, noAssert?: boolean): number; - readUInt32BE(offset: number, noAssert?: boolean): number; - readInt8(offset: number, noAssert?: boolean): number; - readInt16LE(offset: number, noAssert?: boolean): number; - readInt16BE(offset: number, noAssert?: boolean): number; - readInt32LE(offset: number, noAssert?: boolean): number; - readInt32BE(offset: number, noAssert?: boolean): number; - readFloatLE(offset: number, noAssert?: boolean): number; - readFloatBE(offset: number, noAssert?: boolean): number; - readDoubleLE(offset: number, noAssert?: boolean): number; - readDoubleBE(offset: number, noAssert?: boolean): number; - writeUInt8(value: number, offset: number, noAssert?: boolean): void; - writeUInt16LE(value: number, offset: number, noAssert?: boolean): void; - writeUInt16BE(value: number, offset: number, noAssert?: boolean): void; - writeUInt32LE(value: number, offset: number, noAssert?: boolean): void; - writeUInt32BE(value: number, offset: number, noAssert?: boolean): void; - writeInt8(value: number, offset: number, noAssert?: boolean): void; - writeInt16LE(value: number, offset: number, noAssert?: boolean): void; - writeInt16BE(value: number, offset: number, noAssert?: boolean): void; - writeInt32LE(value: number, offset: number, noAssert?: boolean): void; - writeInt32BE(value: number, offset: number, noAssert?: boolean): void; - writeFloatLE(value: number, offset: number, noAssert?: boolean): void; - writeFloatBE(value: number, offset: number, noAssert?: boolean): void; - writeDoubleLE(value: number, offset: number, noAssert?: boolean): void; - writeDoubleBE(value: number, offset: number, noAssert?: boolean): void; - fill(value: any, offset?: number, end?: number): void; -} - -/************************************************ -* * -* MODULES * -* * -************************************************/ -declare module "buffer" { - export var INSPECT_MAX_BYTES: number; -} - -declare module "querystring" { - export function stringify(obj: any, sep?: string, eq?: string): string; - export function parse(str: string, sep?: string, eq?: string, options?: { maxKeys?: number; }): any; - export function escape(str: string): string; - export function unescape(str: string): string; -} - -declare module "events" { - export class EventEmitter implements NodeJS.EventEmitter { - static listenerCount(emitter: EventEmitter, event: string): number; - - addListener(event: string, listener: Function): EventEmitter; - on(event: string, listener: Function): EventEmitter; - once(event: string, listener: Function): EventEmitter; - removeListener(event: string, listener: Function): EventEmitter; - removeAllListeners(event?: string): EventEmitter; - setMaxListeners(n: number): void; - listeners(event: string): Function[]; - emit(event: string, ...args: any[]): boolean; - } -} - -declare module "http" { - import events = require("events"); - import net = require("net"); - import stream = require("stream"); - - export interface Server extends events.EventEmitter { - listen(port: number, hostname?: string, backlog?: number, callback?: Function): Server; - listen(port: number, hostname?: string, callback?: Function): Server; - listen(path: string, callback?: Function): Server; - listen(handle: any, listeningListener?: Function): Server; - close(cb?: any): Server; - address(): { port: number; family: string; address: string; }; - maxHeadersCount: number; - } - /** - * @deprecated Use IncomingMessage - */ - export interface ServerRequest extends IncomingMessage { - connection: net.Socket; - } - export interface ServerResponse extends events.EventEmitter, stream.Writable { - // Extended base methods - write(buffer: Buffer): boolean; - write(buffer: Buffer, cb?: Function): boolean; - write(str: string, cb?: Function): boolean; - write(str: string, encoding?: string, cb?: Function): boolean; - write(str: string, encoding?: string, fd?: string): boolean; - - writeContinue(): void; - writeHead(statusCode: number, reasonPhrase?: string, headers?: any): void; - writeHead(statusCode: number, headers?: any): void; - statusCode: number; - setHeader(name: string, value: string): void; - sendDate: boolean; - getHeader(name: string): string; - removeHeader(name: string): void; - write(chunk: any, encoding?: string): any; - addTrailers(headers: any): void; - - // Extended base methods - end(): void; - end(buffer: Buffer, cb?: Function): void; - end(str: string, cb?: Function): void; - end(str: string, encoding?: string, cb?: Function): void; - end(data?: any, encoding?: string): void; - } - export interface ClientRequest extends events.EventEmitter, stream.Writable { - // Extended base methods - write(buffer: Buffer): boolean; - write(buffer: Buffer, cb?: Function): boolean; - write(str: string, cb?: Function): boolean; - write(str: string, encoding?: string, cb?: Function): boolean; - write(str: string, encoding?: string, fd?: string): boolean; - - write(chunk: any, encoding?: string): void; - abort(): void; - setTimeout(timeout: number, callback?: Function): void; - setNoDelay(noDelay?: boolean): void; - setSocketKeepAlive(enable?: boolean, initialDelay?: number): void; - - // Extended base methods - end(): void; - end(buffer: Buffer, cb?: Function): void; - end(str: string, cb?: Function): void; - end(str: string, encoding?: string, cb?: Function): void; - end(data?: any, encoding?: string): void; - } - export interface IncomingMessage extends events.EventEmitter, stream.Readable { - httpVersion: string; - headers: any; - rawHeaders: string[]; - trailers: any; - rawTrailers: any; - setTimeout(msecs: number, callback: Function): NodeJS.Timer; - /** - * Only valid for request obtained from http.Server. - */ - method?: string; - /** - * Only valid for request obtained from http.Server. - */ - url?: string; - /** - * Only valid for response obtained from http.ClientRequest. - */ - statusCode?: number; - /** - * Only valid for response obtained from http.ClientRequest. - */ - statusMessage?: string; - socket: net.Socket; - } - /** - * @deprecated Use IncomingMessage - */ - export interface ClientResponse extends IncomingMessage { } - - export interface AgentOptions { - /** - * Keep sockets around in a pool to be used by other requests in the future. Default = false - */ - keepAlive?: boolean; - /** - * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. - * Only relevant if keepAlive is set to true. - */ - keepAliveMsecs?: number; - /** - * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity - */ - maxSockets?: number; - /** - * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256. - */ - maxFreeSockets?: number; - } - - export class Agent { - maxSockets: number; - sockets: any; - requests: any; - - constructor(opts?: AgentOptions); - - /** - * Destroy any sockets that are currently in use by the agent. - * It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled, - * then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise, - * sockets may hang open for quite a long time before the server terminates them. - */ - destroy(): void; - } - - export var STATUS_CODES: { - [errorCode: number]: string; - [errorCode: string]: string; - }; - export function createServer(requestListener?: (request: IncomingMessage, response: ServerResponse) =>void ): Server; - export function createClient(port?: number, host?: string): any; - export function request(options: any, callback?: (res: IncomingMessage) => void): ClientRequest; - export function get(options: any, callback?: (res: IncomingMessage) => void): ClientRequest; - export var globalAgent: Agent; -} - -declare module "cluster" { - import child = require("child_process"); - import events = require("events"); - - export interface ClusterSettings { - exec?: string; - args?: string[]; - silent?: boolean; - } - - export class Worker extends events.EventEmitter { - id: string; - process: child.ChildProcess; - suicide: boolean; - send(message: any, sendHandle?: any): void; - kill(signal?: string): void; - destroy(signal?: string): void; - disconnect(): void; - } - - export var settings: ClusterSettings; - export var isMaster: boolean; - export var isWorker: boolean; - export function setupMaster(settings?: ClusterSettings): void; - export function fork(env?: any): Worker; - export function disconnect(callback?: Function): void; - export var worker: Worker; - export var workers: Worker[]; - - // Event emitter - export function addListener(event: string, listener: Function): void; - export function on(event: string, listener: Function): any; - export function once(event: string, listener: Function): void; - export function removeListener(event: string, listener: Function): void; - export function removeAllListeners(event?: string): void; - export function setMaxListeners(n: number): void; - export function listeners(event: string): Function[]; - export function emit(event: string, ...args: any[]): boolean; -} - -declare module "zlib" { - import stream = require("stream"); - export interface ZlibOptions { chunkSize?: number; windowBits?: number; level?: number; memLevel?: number; strategy?: number; dictionary?: any; } - - export interface Gzip extends stream.Transform { } - export interface Gunzip extends stream.Transform { } - export interface Deflate extends stream.Transform { } - export interface Inflate extends stream.Transform { } - export interface DeflateRaw extends stream.Transform { } - export interface InflateRaw extends stream.Transform { } - export interface Unzip extends stream.Transform { } - - export function createGzip(options?: ZlibOptions): Gzip; - export function createGunzip(options?: ZlibOptions): Gunzip; - export function createDeflate(options?: ZlibOptions): Deflate; - export function createInflate(options?: ZlibOptions): Inflate; - export function createDeflateRaw(options?: ZlibOptions): DeflateRaw; - export function createInflateRaw(options?: ZlibOptions): InflateRaw; - export function createUnzip(options?: ZlibOptions): Unzip; - - export function deflate(buf: Buffer, callback: (error: Error, result: any) =>void ): void; - export function deflateRaw(buf: Buffer, callback: (error: Error, result: any) =>void ): void; - export function gzip(buf: Buffer, callback: (error: Error, result: any) =>void ): void; - export function gunzip(buf: Buffer, callback: (error: Error, result: any) =>void ): void; - export function inflate(buf: Buffer, callback: (error: Error, result: any) =>void ): void; - export function inflateRaw(buf: Buffer, callback: (error: Error, result: any) =>void ): void; - export function unzip(buf: Buffer, callback: (error: Error, result: any) =>void ): void; - - // Constants - export var Z_NO_FLUSH: number; - export var Z_PARTIAL_FLUSH: number; - export var Z_SYNC_FLUSH: number; - export var Z_FULL_FLUSH: number; - export var Z_FINISH: number; - export var Z_BLOCK: number; - export var Z_TREES: number; - export var Z_OK: number; - export var Z_STREAM_END: number; - export var Z_NEED_DICT: number; - export var Z_ERRNO: number; - export var Z_STREAM_ERROR: number; - export var Z_DATA_ERROR: number; - export var Z_MEM_ERROR: number; - export var Z_BUF_ERROR: number; - export var Z_VERSION_ERROR: number; - export var Z_NO_COMPRESSION: number; - export var Z_BEST_SPEED: number; - export var Z_BEST_COMPRESSION: number; - export var Z_DEFAULT_COMPRESSION: number; - export var Z_FILTERED: number; - export var Z_HUFFMAN_ONLY: number; - export var Z_RLE: number; - export var Z_FIXED: number; - export var Z_DEFAULT_STRATEGY: number; - export var Z_BINARY: number; - export var Z_TEXT: number; - export var Z_ASCII: number; - export var Z_UNKNOWN: number; - export var Z_DEFLATED: number; - export var Z_NULL: number; -} - -declare module "os" { - export function tmpdir(): string; - export function hostname(): string; - export function type(): string; - export function platform(): string; - export function arch(): string; - export function release(): string; - export function uptime(): number; - export function loadavg(): number[]; - export function totalmem(): number; - export function freemem(): number; - export function cpus(): { model: string; speed: number; times: { user: number; nice: number; sys: number; idle: number; irq: number; }; }[]; - export function networkInterfaces(): any; - export var EOL: string; -} - -declare module "https" { - import tls = require("tls"); - import events = require("events"); - import http = require("http"); - - export interface ServerOptions { - pfx?: any; - key?: any; - passphrase?: string; - cert?: any; - ca?: any; - crl?: any; - ciphers?: string; - honorCipherOrder?: boolean; - requestCert?: boolean; - rejectUnauthorized?: boolean; - NPNProtocols?: any; - SNICallback?: (servername: string) => any; - } - - export interface RequestOptions { - host?: string; - hostname?: string; - port?: number; - path?: string; - method?: string; - headers?: any; - auth?: string; - agent?: any; - pfx?: any; - key?: any; - passphrase?: string; - cert?: any; - ca?: any; - ciphers?: string; - rejectUnauthorized?: boolean; - } - - export interface Agent { - maxSockets: number; - sockets: any; - requests: any; - } - export var Agent: { - new (options?: RequestOptions): Agent; - }; - export interface Server extends tls.Server { } - export function createServer(options: ServerOptions, requestListener?: Function): Server; - export function request(options: RequestOptions, callback?: (res: http.IncomingMessage) =>void ): http.ClientRequest; - export function get(options: RequestOptions, callback?: (res: http.IncomingMessage) =>void ): http.ClientRequest; - export var globalAgent: Agent; -} - -declare module "punycode" { - export function decode(string: string): string; - export function encode(string: string): string; - export function toUnicode(domain: string): string; - export function toASCII(domain: string): string; - export var ucs2: ucs2; - interface ucs2 { - decode(string: string): string; - encode(codePoints: number[]): string; - } - export var version: any; -} - -declare module "repl" { - import stream = require("stream"); - import events = require("events"); - - export interface ReplOptions { - prompt?: string; - input?: NodeJS.ReadableStream; - output?: NodeJS.WritableStream; - terminal?: boolean; - eval?: Function; - useColors?: boolean; - useGlobal?: boolean; - ignoreUndefined?: boolean; - writer?: Function; - } - export function start(options: ReplOptions): events.EventEmitter; -} - -declare module "readline" { - import events = require("events"); - import stream = require("stream"); - - export interface ReadLine extends events.EventEmitter { - setPrompt(prompt: string, length: number): void; - prompt(preserveCursor?: boolean): void; - question(query: string, callback: Function): void; - pause(): void; - resume(): void; - close(): void; - write(data: any, key?: any): void; - } - export interface ReadLineOptions { - input: NodeJS.ReadableStream; - output: NodeJS.WritableStream; - completer?: Function; - terminal?: boolean; - } - export function createInterface(options: ReadLineOptions): ReadLine; -} - -declare module "vm" { - export interface Context { } - export interface Script { - runInThisContext(): void; - runInNewContext(sandbox?: Context): void; - } - export function runInThisContext(code: string, filename?: string): void; - export function runInNewContext(code: string, sandbox?: Context, filename?: string): void; - export function runInContext(code: string, context: Context, filename?: string): void; - export function createContext(initSandbox?: Context): Context; - export function createScript(code: string, filename?: string): Script; -} - -declare module "child_process" { - import events = require("events"); - import stream = require("stream"); - - export interface ChildProcess extends events.EventEmitter { - stdin: stream.Writable; - stdout: stream.Readable; - stderr: stream.Readable; - pid: number; - kill(signal?: string): void; - send(message: any, sendHandle?: any): void; - disconnect(): void; - } - - export function spawn(command: string, args?: string[], options?: { - cwd?: string; - stdio?: any; - custom?: any; - env?: any; - detached?: boolean; - }): ChildProcess; - export function exec(command: string, options: { - cwd?: string; - stdio?: any; - customFds?: any; - env?: any; - encoding?: string; - timeout?: number; - maxBuffer?: number; - killSignal?: string; - }, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess; - export function exec(command: string, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess; - export function execFile(file: string, - callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess; - export function execFile(file: string, args?: string[], - callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess; - export function execFile(file: string, args?: string[], options?: { - cwd?: string; - stdio?: any; - customFds?: any; - env?: any; - encoding?: string; - timeout?: number; - maxBuffer?: string; - killSignal?: string; - }, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess; - export function fork(modulePath: string, args?: string[], options?: { - cwd?: string; - env?: any; - encoding?: string; - }): ChildProcess; - export function execSync(command: string, options?: { - cwd?: string; - input?: string|Buffer; - stdio?: any; - env?: any; - uid?: number; - gid?: number; - timeout?: number; - maxBuffer?: number; - killSignal?: string; - encoding?: string; - }): ChildProcess; - export function execFileSync(command: string, args?: string[], options?: { - cwd?: string; - input?: string|Buffer; - stdio?: any; - env?: any; - uid?: number; - gid?: number; - timeout?: number; - maxBuffer?: number; - killSignal?: string; - encoding?: string; - }): ChildProcess; -} - -declare module "url" { - export interface Url { - href: string; - protocol: string; - auth: string; - hostname: string; - port: string; - host: string; - pathname: string; - search: string; - query: any; // string | Object - slashes: boolean; - hash?: string; - path?: string; - } - - export interface UrlOptions { - protocol?: string; - auth?: string; - hostname?: string; - port?: string; - host?: string; - pathname?: string; - search?: string; - query?: any; - hash?: string; - path?: string; - } - - export function parse(urlStr: string, parseQueryString?: boolean , slashesDenoteHost?: boolean ): Url; - export function format(url: UrlOptions): string; - export function resolve(from: string, to: string): string; -} - -declare module "dns" { - export function lookup(domain: string, family: number, callback: (err: Error, address: string, family: number) =>void ): string; - export function lookup(domain: string, callback: (err: Error, address: string, family: number) =>void ): string; - export function resolve(domain: string, rrtype: string, callback: (err: Error, addresses: string[]) =>void ): string[]; - export function resolve(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[]; - export function resolve4(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[]; - export function resolve6(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[]; - export function resolveMx(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[]; - export function resolveTxt(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[]; - export function resolveSrv(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[]; - export function resolveNs(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[]; - export function resolveCname(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[]; - export function reverse(ip: string, callback: (err: Error, domains: string[]) =>void ): string[]; -} - -declare module "net" { - import stream = require("stream"); - - export interface Socket extends stream.Duplex { - // Extended base methods - write(buffer: Buffer): boolean; - write(buffer: Buffer, cb?: Function): boolean; - write(str: string, cb?: Function): boolean; - write(str: string, encoding?: string, cb?: Function): boolean; - write(str: string, encoding?: string, fd?: string): boolean; - - connect(port: number, host?: string, connectionListener?: Function): void; - connect(path: string, connectionListener?: Function): void; - bufferSize: number; - setEncoding(encoding?: string): void; - write(data: any, encoding?: string, callback?: Function): void; - destroy(): void; - pause(): void; - resume(): void; - setTimeout(timeout: number, callback?: Function): void; - setNoDelay(noDelay?: boolean): void; - setKeepAlive(enable?: boolean, initialDelay?: number): void; - address(): { port: number; family: string; address: string; }; - unref(): void; - ref(): void; - - remoteAddress: string; - remoteFamily: string; - remotePort: number; - localAddress: string; - localPort: number; - bytesRead: number; - bytesWritten: number; - - // Extended base methods - end(): void; - end(buffer: Buffer, cb?: Function): void; - end(str: string, cb?: Function): void; - end(str: string, encoding?: string, cb?: Function): void; - end(data?: any, encoding?: string): void; - } - - export var Socket: { - new (options?: { fd?: string; type?: string; allowHalfOpen?: boolean; }): Socket; - }; - - export interface Server extends Socket { - listen(port: number, host?: string, backlog?: number, listeningListener?: Function): Server; - listen(path: string, listeningListener?: Function): Server; - listen(handle: any, listeningListener?: Function): Server; - close(callback?: Function): Server; - address(): { port: number; family: string; address: string; }; - maxConnections: number; - connections: number; - } - export function createServer(connectionListener?: (socket: Socket) =>void ): Server; - export function createServer(options?: { allowHalfOpen?: boolean; }, connectionListener?: (socket: Socket) =>void ): Server; - export function connect(options: { allowHalfOpen?: boolean; }, connectionListener?: Function): Socket; - export function connect(port: number, host?: string, connectionListener?: Function): Socket; - export function connect(path: string, connectionListener?: Function): Socket; - export function createConnection(options: { allowHalfOpen?: boolean; }, connectionListener?: Function): Socket; - export function createConnection(port: number, host?: string, connectionListener?: Function): Socket; - export function createConnection(path: string, connectionListener?: Function): Socket; - export function isIP(input: string): number; - export function isIPv4(input: string): boolean; - export function isIPv6(input: string): boolean; -} - -declare module "dgram" { - import events = require("events"); - - interface RemoteInfo { - address: string; - port: number; - size: number; - } - - interface AddressInfo { - address: string; - family: string; - port: number; - } - - export function createSocket(type: string, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; - - interface Socket extends events.EventEmitter { - send(buf: Buffer, offset: number, length: number, port: number, address: string, callback?: (error: Error, bytes: number) => void): void; - bind(port: number, address?: string, callback?: () => void): void; - close(): void; - address(): AddressInfo; - setBroadcast(flag: boolean): void; - setMulticastTTL(ttl: number): void; - setMulticastLoopback(flag: boolean): void; - addMembership(multicastAddress: string, multicastInterface?: string): void; - dropMembership(multicastAddress: string, multicastInterface?: string): void; - } -} - -declare module "fs" { - import stream = require("stream"); - import events = require("events"); - - interface Stats { - isFile(): boolean; - isDirectory(): boolean; - isBlockDevice(): boolean; - isCharacterDevice(): boolean; - isSymbolicLink(): boolean; - isFIFO(): boolean; - isSocket(): boolean; - dev: number; - ino: number; - mode: number; - nlink: number; - uid: number; - gid: number; - rdev: number; - size: number; - blksize: number; - blocks: number; - atime: Date; - mtime: Date; - ctime: Date; - } - - interface FSWatcher extends events.EventEmitter { - close(): void; - } - - export interface ReadStream extends stream.Readable { - close(): void; - } - export interface WriteStream extends stream.Writable { - close(): void; - } - - export function rename(oldPath: string, newPath: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function renameSync(oldPath: string, newPath: string): void; - export function truncate(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function truncate(path: string, len: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function truncateSync(path: string, len?: number): void; - export function ftruncate(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function ftruncate(fd: number, len: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function ftruncateSync(fd: number, len?: number): void; - export function chown(path: string, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function chownSync(path: string, uid: number, gid: number): void; - export function fchown(fd: number, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function fchownSync(fd: number, uid: number, gid: number): void; - export function lchown(path: string, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function lchownSync(path: string, uid: number, gid: number): void; - export function chmod(path: string, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function chmod(path: string, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function chmodSync(path: string, mode: number): void; - export function chmodSync(path: string, mode: string): void; - export function fchmod(fd: number, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function fchmod(fd: number, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function fchmodSync(fd: number, mode: number): void; - export function fchmodSync(fd: number, mode: string): void; - export function lchmod(path: string, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function lchmod(path: string, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function lchmodSync(path: string, mode: number): void; - export function lchmodSync(path: string, mode: string): void; - export function stat(path: string, callback?: (err: NodeJS.ErrnoException, stats: Stats) => any): void; - export function lstat(path: string, callback?: (err: NodeJS.ErrnoException, stats: Stats) => any): void; - export function fstat(fd: number, callback?: (err: NodeJS.ErrnoException, stats: Stats) => any): void; - export function statSync(path: string): Stats; - export function lstatSync(path: string): Stats; - export function fstatSync(fd: number): Stats; - export function link(srcpath: string, dstpath: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function linkSync(srcpath: string, dstpath: string): void; - export function symlink(srcpath: string, dstpath: string, type?: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function symlinkSync(srcpath: string, dstpath: string, type?: string): void; - export function readlink(path: string, callback?: (err: NodeJS.ErrnoException, linkString: string) => any): void; - export function readlinkSync(path: string): string; - export function realpath(path: string, callback?: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void; - export function realpath(path: string, cache: {[path: string]: string}, callback: (err: NodeJS.ErrnoException, resolvedPath: string) =>any): void; - export function realpathSync(path: string, cache?: {[path: string]: string}): string; - export function unlink(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function unlinkSync(path: string): void; - export function rmdir(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function rmdirSync(path: string): void; - export function mkdir(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function mkdir(path: string, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function mkdir(path: string, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function mkdirSync(path: string, mode?: number): void; - export function mkdirSync(path: string, mode?: string): void; - export function readdir(path: string, callback?: (err: NodeJS.ErrnoException, files: string[]) => void): void; - export function readdirSync(path: string): string[]; - export function close(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function closeSync(fd: number): void; - export function open(path: string, flags: string, callback?: (err: NodeJS.ErrnoException, fd: number) => any): void; - export function open(path: string, flags: string, mode: number, callback?: (err: NodeJS.ErrnoException, fd: number) => any): void; - export function open(path: string, flags: string, mode: string, callback?: (err: NodeJS.ErrnoException, fd: number) => any): void; - export function openSync(path: string, flags: string, mode?: number): number; - export function openSync(path: string, flags: string, mode?: string): number; - export function utimes(path: string, atime: number, mtime: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function utimes(path: string, atime: Date, mtime: Date, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function utimesSync(path: string, atime: number, mtime: number): void; - export function utimesSync(path: string, atime: Date, mtime: Date): void; - export function futimes(fd: number, atime: number, mtime: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function futimes(fd: number, atime: Date, mtime: Date, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function futimesSync(fd: number, atime: number, mtime: number): void; - export function futimesSync(fd: number, atime: Date, mtime: Date): void; - export function fsync(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function fsyncSync(fd: number): void; - export function write(fd: number, buffer: Buffer, offset: number, length: number, position: number, callback?: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void): void; - export function writeSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number; - export function read(fd: number, buffer: Buffer, offset: number, length: number, position: number, callback?: (err: NodeJS.ErrnoException, bytesRead: number, buffer: Buffer) => void): void; - export function readSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number; - export function readFile(filename: string, encoding: string, callback: (err: NodeJS.ErrnoException, data: string) => void): void; - export function readFile(filename: string, options: { encoding: string; flag?: string; }, callback: (err: NodeJS.ErrnoException, data: string) => void): void; - export function readFile(filename: string, options: { flag?: string; }, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void; - export function readFile(filename: string, callback: (err: NodeJS.ErrnoException, data: Buffer) => void ): void; - export function readFileSync(filename: string, encoding: string): string; - export function readFileSync(filename: string, options: { encoding: string; flag?: string; }): string; - export function readFileSync(filename: string, options?: { flag?: string; }): Buffer; - export function writeFile(filename: string, data: any, callback?: (err: NodeJS.ErrnoException) => void): void; - export function writeFile(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void; - export function writeFile(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void; - export function writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void; - export function writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): void; - export function appendFile(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void; - export function appendFile(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void; - export function appendFile(filename: string, data: any, callback?: (err: NodeJS.ErrnoException) => void): void; - export function appendFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void; - export function appendFileSync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): void; - export function watchFile(filename: string, listener: (curr: Stats, prev: Stats) => void): void; - export function watchFile(filename: string, options: { persistent?: boolean; interval?: number; }, listener: (curr: Stats, prev: Stats) => void): void; - export function unwatchFile(filename: string, listener?: (curr: Stats, prev: Stats) => void): void; - export function watch(filename: string, listener?: (event: string, filename: string) => any): FSWatcher; - export function watch(filename: string, options: { persistent?: boolean; }, listener?: (event: string, filename: string) => any): FSWatcher; - export function exists(path: string, callback?: (exists: boolean) => void): void; - export function existsSync(path: string): boolean; - export function createReadStream(path: string, options?: { - flags?: string; - encoding?: string; - fd?: string; - mode?: number; - bufferSize?: number; - }): ReadStream; - export function createReadStream(path: string, options?: { - flags?: string; - encoding?: string; - fd?: string; - mode?: string; - bufferSize?: number; - }): ReadStream; - export function createWriteStream(path: string, options?: { - flags?: string; - encoding?: string; - string?: string; - }): WriteStream; -} - -declare module "path" { - - export interface ParsedPath { - root: string; - dir: string; - base: string; - ext: string; - name: string; - } - - export function normalize(p: string): string; - export function join(...paths: any[]): string; - export function resolve(...pathSegments: any[]): string; - export function isAbsolute(p: string): boolean; - export function relative(from: string, to: string): string; - export function dirname(p: string): string; - export function basename(p: string, ext?: string): string; - export function extname(p: string): string; - export var sep: string; - export var delimiter: string; - export function parse(p: string): ParsedPath; - export function format(pP: ParsedPath): string; - - export module posix { - export function normalize(p: string): string; - export function join(...paths: any[]): string; - export function resolve(...pathSegments: any[]): string; - export function isAbsolute(p: string): boolean; - export function relative(from: string, to: string): string; - export function dirname(p: string): string; - export function basename(p: string, ext?: string): string; - export function extname(p: string): string; - export var sep: string; - export var delimiter: string; - export function parse(p: string): ParsedPath; - export function format(pP: ParsedPath): string; - } - - export module win32 { - export function normalize(p: string): string; - export function join(...paths: any[]): string; - export function resolve(...pathSegments: any[]): string; - export function isAbsolute(p: string): boolean; - export function relative(from: string, to: string): string; - export function dirname(p: string): string; - export function basename(p: string, ext?: string): string; - export function extname(p: string): string; - export var sep: string; - export var delimiter: string; - export function parse(p: string): ParsedPath; - export function format(pP: ParsedPath): string; - } -} - -declare module "string_decoder" { - export interface NodeStringDecoder { - write(buffer: Buffer): string; - detectIncompleteChar(buffer: Buffer): number; - } - export var StringDecoder: { - new (encoding: string): NodeStringDecoder; - }; -} - -declare module "tls" { - import crypto = require("crypto"); - import net = require("net"); - import stream = require("stream"); - - var CLIENT_RENEG_LIMIT: number; - var CLIENT_RENEG_WINDOW: number; - - export interface TlsOptions { - pfx?: any; //string or buffer - key?: any; //string or buffer - passphrase?: string; - cert?: any; - ca?: any; //string or buffer - crl?: any; //string or string array - ciphers?: string; - honorCipherOrder?: any; - requestCert?: boolean; - rejectUnauthorized?: boolean; - NPNProtocols?: any; //array or Buffer; - SNICallback?: (servername: string) => any; - } - - export interface ConnectionOptions { - host?: string; - port?: number; - socket?: net.Socket; - pfx?: any; //string | Buffer - key?: any; //string | Buffer - passphrase?: string; - cert?: any; //string | Buffer - ca?: any; //Array of string | Buffer - rejectUnauthorized?: boolean; - NPNProtocols?: any; //Array of string | Buffer - servername?: string; - } - - export interface Server extends net.Server { - // Extended base methods - listen(port: number, host?: string, backlog?: number, listeningListener?: Function): Server; - listen(path: string, listeningListener?: Function): Server; - listen(handle: any, listeningListener?: Function): Server; - - listen(port: number, host?: string, callback?: Function): Server; - close(): Server; - address(): { port: number; family: string; address: string; }; - addContext(hostName: string, credentials: { - key: string; - cert: string; - ca: string; - }): void; - maxConnections: number; - connections: number; - } - - export interface ClearTextStream extends stream.Duplex { - authorized: boolean; - authorizationError: Error; - getPeerCertificate(): any; - getCipher: { - name: string; - version: string; - }; - address: { - port: number; - family: string; - address: string; - }; - remoteAddress: string; - remotePort: number; - } - - export interface SecurePair { - encrypted: any; - cleartext: any; - } - - export interface SecureContextOptions { - pfx?: any; //string | buffer - key?: any; //string | buffer - passphrase?: string; - cert?: any; // string | buffer - ca?: any; // string | buffer - crl?: any; // string | string[] - ciphers?: string; - honorCipherOrder?: boolean; - } - - export interface SecureContext { - context: any; - } - - export function createServer(options: TlsOptions, secureConnectionListener?: (cleartextStream: ClearTextStream) =>void ): Server; - export function connect(options: TlsOptions, secureConnectionListener?: () =>void ): ClearTextStream; - export function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () =>void ): ClearTextStream; - export function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () =>void ): ClearTextStream; - export function createSecurePair(credentials?: crypto.Credentials, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair; - export function createSecureContext(details: SecureContextOptions): SecureContext; -} - -declare module "crypto" { - export interface CredentialDetails { - pfx: string; - key: string; - passphrase: string; - cert: string; - ca: any; //string | string array - crl: any; //string | string array - ciphers: string; - } - export interface Credentials { context?: any; } - export function createCredentials(details: CredentialDetails): Credentials; - export function createHash(algorithm: string): Hash; - export function createHmac(algorithm: string, key: string): Hmac; - export function createHmac(algorithm: string, key: Buffer): Hmac; - interface Hash { - update(data: any, input_encoding?: string): Hash; - digest(encoding: 'buffer'): Buffer; - digest(encoding: string): any; - digest(): Buffer; - } - interface Hmac { - update(data: any, input_encoding?: string): Hmac; - digest(encoding: 'buffer'): Buffer; - digest(encoding: string): any; - digest(): Buffer; - } - export function createCipher(algorithm: string, password: any): Cipher; - export function createCipheriv(algorithm: string, key: any, iv: any): Cipher; - interface Cipher { - update(data: Buffer): Buffer; - update(data: string, input_encoding?: string, output_encoding?: string): string; - final(): Buffer; - final(output_encoding: string): string; - setAutoPadding(auto_padding: boolean): void; - } - export function createDecipher(algorithm: string, password: any): Decipher; - export function createDecipheriv(algorithm: string, key: any, iv: any): Decipher; - interface Decipher { - update(data: Buffer): Buffer; - update(data: string, input_encoding?: string, output_encoding?: string): string; - final(): Buffer; - final(output_encoding: string): string; - setAutoPadding(auto_padding: boolean): void; - } - export function createSign(algorithm: string): Signer; - interface Signer { - update(data: any): void; - sign(private_key: string, output_format: string): string; - } - export function createVerify(algorith: string): Verify; - interface Verify { - update(data: any): void; - verify(object: string, signature: string, signature_format?: string): boolean; - } - export function createDiffieHellman(prime_length: number): DiffieHellman; - export function createDiffieHellman(prime: number, encoding?: string): DiffieHellman; - interface DiffieHellman { - generateKeys(encoding?: string): string; - computeSecret(other_public_key: string, input_encoding?: string, output_encoding?: string): string; - getPrime(encoding?: string): string; - getGenerator(encoding: string): string; - getPublicKey(encoding?: string): string; - getPrivateKey(encoding?: string): string; - setPublicKey(public_key: string, encoding?: string): void; - setPrivateKey(public_key: string, encoding?: string): void; - } - export function getDiffieHellman(group_name: string): DiffieHellman; - export function pbkdf2(password: string, salt: string, iterations: number, keylen: number, callback: (err: Error, derivedKey: Buffer) => any): void; - export function pbkdf2Sync(password: string, salt: string, iterations: number, keylen: number) : Buffer; - export function randomBytes(size: number): Buffer; - export function randomBytes(size: number, callback: (err: Error, buf: Buffer) =>void ): void; - export function pseudoRandomBytes(size: number): Buffer; - export function pseudoRandomBytes(size: number, callback: (err: Error, buf: Buffer) =>void ): void; -} - -declare module "stream" { - import events = require("events"); - - export interface Stream extends events.EventEmitter { - pipe(destination: T, options?: { end?: boolean; }): T; - } - - export interface ReadableOptions { - highWaterMark?: number; - encoding?: string; - objectMode?: boolean; - } - - export class Readable extends events.EventEmitter implements NodeJS.ReadableStream { - readable: boolean; - constructor(opts?: ReadableOptions); - _read(size: number): void; - read(size?: number): string|Buffer; - setEncoding(encoding: string): void; - pause(): void; - resume(): void; - pipe(destination: T, options?: { end?: boolean; }): T; - unpipe(destination?: T): void; - unshift(chunk: string): void; - unshift(chunk: Buffer): void; - wrap(oldStream: NodeJS.ReadableStream): NodeJS.ReadableStream; - push(chunk: any, encoding?: string): boolean; - } - - export interface WritableOptions { - highWaterMark?: number; - decodeStrings?: boolean; - } - - export class Writable extends events.EventEmitter implements NodeJS.WritableStream { - writable: boolean; - constructor(opts?: WritableOptions); - _write(data: Buffer, encoding: string, callback: Function): void; - _write(data: string, encoding: string, callback: Function): void; - write(buffer: Buffer, cb?: Function): boolean; - write(str: string, cb?: Function): boolean; - write(str: string, encoding?: string, cb?: Function): boolean; - end(): void; - end(buffer: Buffer, cb?: Function): void; - end(str: string, cb?: Function): void; - end(str: string, encoding?: string, cb?: Function): void; - } - - export interface DuplexOptions extends ReadableOptions, WritableOptions { - allowHalfOpen?: boolean; - } - - // Note: Duplex extends both Readable and Writable. - export class Duplex extends Readable implements NodeJS.ReadWriteStream { - writable: boolean; - constructor(opts?: DuplexOptions); - _write(data: Buffer, encoding: string, callback: Function): void; - _write(data: string, encoding: string, callback: Function): void; - write(buffer: Buffer, cb?: Function): boolean; - write(str: string, cb?: Function): boolean; - write(str: string, encoding?: string, cb?: Function): boolean; - end(): void; - end(buffer: Buffer, cb?: Function): void; - end(str: string, cb?: Function): void; - end(str: string, encoding?: string, cb?: Function): void; - } - - export interface TransformOptions extends ReadableOptions, WritableOptions {} - - // Note: Transform lacks the _read and _write methods of Readable/Writable. - export class Transform extends events.EventEmitter implements NodeJS.ReadWriteStream { - readable: boolean; - writable: boolean; - constructor(opts?: TransformOptions); - _transform(chunk: Buffer, encoding: string, callback: Function): void; - _transform(chunk: string, encoding: string, callback: Function): void; - _flush(callback: Function): void; - read(size?: number): any; - setEncoding(encoding: string): void; - pause(): void; - resume(): void; - pipe(destination: T, options?: { end?: boolean; }): T; - unpipe(destination?: T): void; - unshift(chunk: string): void; - unshift(chunk: Buffer): void; - wrap(oldStream: NodeJS.ReadableStream): NodeJS.ReadableStream; - push(chunk: any, encoding?: string): boolean; - write(buffer: Buffer, cb?: Function): boolean; - write(str: string, cb?: Function): boolean; - write(str: string, encoding?: string, cb?: Function): boolean; - end(): void; - end(buffer: Buffer, cb?: Function): void; - end(str: string, cb?: Function): void; - end(str: string, encoding?: string, cb?: Function): void; - } - - export class PassThrough extends Transform {} -} - -declare module "util" { - export interface InspectOptions { - showHidden?: boolean; - depth?: number; - colors?: boolean; - customInspect?: boolean; - } - - export function format(format: any, ...param: any[]): string; - export function debug(string: string): void; - export function error(...param: any[]): void; - export function puts(...param: any[]): void; - export function print(...param: any[]): void; - export function log(string: string): void; - export function inspect(object: any, showHidden?: boolean, depth?: number, color?: boolean): string; - export function inspect(object: any, options: InspectOptions): string; - export function isArray(object: any): boolean; - export function isRegExp(object: any): boolean; - export function isDate(object: any): boolean; - export function isError(object: any): boolean; - export function inherits(constructor: any, superConstructor: any): void; -} - -declare module "assert" { - function internal (value: any, message?: string): void; - module internal { - export class AssertionError implements Error { - name: string; - message: string; - actual: any; - expected: any; - operator: string; - generatedMessage: boolean; - - constructor(options?: {message?: string; actual?: any; expected?: any; - operator?: string; stackStartFunction?: Function}); - } - - export function fail(actual?: any, expected?: any, message?: string, operator?: string): void; - export function ok(value: any, message?: string): void; - export function equal(actual: any, expected: any, message?: string): void; - export function notEqual(actual: any, expected: any, message?: string): void; - export function deepEqual(actual: any, expected: any, message?: string): void; - export function notDeepEqual(acutal: any, expected: any, message?: string): void; - export function strictEqual(actual: any, expected: any, message?: string): void; - export function notStrictEqual(actual: any, expected: any, message?: string): void; - export var throws: { - (block: Function, message?: string): void; - (block: Function, error: Function, message?: string): void; - (block: Function, error: RegExp, message?: string): void; - (block: Function, error: (err: any) => boolean, message?: string): void; - }; - - export var doesNotThrow: { - (block: Function, message?: string): void; - (block: Function, error: Function, message?: string): void; - (block: Function, error: RegExp, message?: string): void; - (block: Function, error: (err: any) => boolean, message?: string): void; - }; - - export function ifError(value: any): void; - } - - export = internal; -} - -declare module "tty" { - import net = require("net"); - - export function isatty(fd: number): boolean; - export interface ReadStream extends net.Socket { - isRaw: boolean; - setRawMode(mode: boolean): void; - } - export interface WriteStream extends net.Socket { - columns: number; - rows: number; - } -} - -declare module "domain" { - import events = require("events"); - - export class Domain extends events.EventEmitter { - run(fn: Function): void; - add(emitter: events.EventEmitter): void; - remove(emitter: events.EventEmitter): void; - bind(cb: (err: Error, data: any) => any): any; - intercept(cb: (data: any) => any): any; - dispose(): void; - - addListener(event: string, listener: Function): Domain; - on(event: string, listener: Function): Domain; - once(event: string, listener: Function): Domain; - removeListener(event: string, listener: Function): Domain; - removeAllListeners(event?: string): Domain; - } - - export function create(): Domain; -} diff --git a/build/lib/typings/uglify-js.d.ts b/build/lib/typings/uglify-js.d.ts deleted file mode 100644 index 9ee5da6a4fdcd..0000000000000 --- a/build/lib/typings/uglify-js.d.ts +++ /dev/null @@ -1,428 +0,0 @@ -// Type definitions for UglifyJS 2 v2.6.1 -// Project: https://github.com/mishoo/UglifyJS2 -// Definitions by: Tanguy Krotoff -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare module 'uglify-js' { - import * as MOZ_SourceMap from 'source-map'; - - namespace UglifyJS { - interface Tokenizer { - /** - * The type of this token. - * Can be "num", "string", "regexp", "operator", "punc", "atom", "name", "keyword", "comment1" or "comment2". - * "comment1" and "comment2" are for single-line, respectively multi-line comments. - */ - type: string; - - /** - * The name of the file where this token originated from. Useful when compressing multiple files at once to generate the proper source map. - */ - file: string; - - /** - * The "value" of the token. - * That's additional information and depends on the token type: "num", "string" and "regexp" tokens you get their literal value. - * - For "operator" you get the operator. - * - For "punc" it's the punctuation sign (parens, comma, semicolon etc). - * - For "atom", "name" and "keyword" it's the name of the identifier - * - For comments it's the body of the comment (excluding the initial "//" and "/*". - */ - value: string; - - /** - * The line number of this token in the original code. - * 1-based index. - */ - line: number; - - /** - * The column number of this token in the original code. - * 0-based index. - */ - col: number; - - /** - * Short for "newline before", it's a boolean that tells us whether there was a newline before this node in the original source. It helps for automatic semicolon insertion. - * For multi-line comments in particular this will be set to true if there either was a newline before this comment, or * * if this comment contains a newline. - */ - nlb: boolean; - - /** - * This doesn't apply for comment tokens, but for all other token types it will be an array of comment tokens that were found before. - */ - comments_before: string[]; - } - - interface AST_Node { - // The first token of this node - start: AST_Node; - - // The last token of this node - end: AST_Node; - - transform(tt: TreeTransformer): AST_Toplevel; - } - - interface AST_Toplevel extends AST_Node { - // UglifyJS contains a scope analyzer which figures out variable/function definitions, references etc. - // You need to call it manually before compression or mangling. - // The figure_out_scope method is defined only on the AST_Toplevel node. - figure_out_scope(): void; - - // Get names that are optimized for GZip compression (names will be generated using the most frequent characters first) - compute_char_frequency(): void; - - mangle_names(): void; - - print(stream: OutputStream): void; - - print_to_string(options?: BeautifierOptions): string; - } - - interface MinifyOptions { - spidermonkey?: boolean; - outSourceMap?: string; - sourceRoot?: string; - inSourceMap?: string; - fromString?: boolean; - warnings?: boolean; - mangle?: Object; - output?: MinifyOutput, - compress?: Object; - } - - interface MinifyOutput { - code: string; - map: string; - } - - function minify(files: string | Array, options?: MinifyOptions): MinifyOutput; - - - interface ParseOptions { - // Default is false - strict?: boolean; - - // Input file name, default is null - filename?: string; - - // Default is null - toplevel?: AST_Toplevel; - } - - /** - * The parser creates a custom abstract syntax tree given a piece of JavaScript code. - * Perhaps you should read about the AST first. - */ - function parse(code: string, options?: ParseOptions): AST_Toplevel; - - - interface BeautifierOptions { - /** - * Start indentation on every line (only when `beautify`) - */ - indent_start?: number; - - /** - * Indentation level (only when `beautify`) - */ - indent_level?: number; - - /** - * Quote all keys in object literals? - */ - quote_keys?: boolean; - - /** - * Add a space after colon signs? - */ - space_colon?: boolean; - - /** - * Output ASCII-safe? (encodes Unicode characters as ASCII) - */ - ascii_only?: boolean; - - /** - * Escape " boolean; - - /** - * UglifyJS provides a TreeWalker object and every node has a walk method that given a walker will apply your visitor to each node in the tree. - * Your visitor can return a non-falsy value in order to prevent descending the current node. - */ - function TreeWalker(visitor: visitor): TreeWalker; - - - // TODO - interface TreeTransformer extends TreeWalker { - } - - /** - * The tree transformer is a special case of a tree walker. - * In fact it even inherits from TreeWalker and you can use the same methods, but initialization and visitor protocol are a bit different. - */ - function TreeTransformer(before: visitor, after: visitor): TreeTransformer; - } - - export = UglifyJS; -} \ No newline at end of file diff --git a/build/lib/util.js b/build/lib/util.js index 4ffed1622467d..8ce093e800f4b 100644 --- a/build/lib/util.js +++ b/build/lib/util.js @@ -1,213 +1,213 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; -Object.defineProperty(exports, "__esModule", { value: true }); -var es = require("event-stream"); -var debounce = require("debounce"); -var _filter = require("gulp-filter"); -var rename = require("gulp-rename"); -var _ = require("underscore"); -var path = require("path"); -var fs = require("fs"); -var _rimraf = require("rimraf"); -var git = require("./git"); -var VinylFile = require("vinyl"); -var NoCancellationToken = { isCancellationRequested: function () { return false; } }; -function incremental(streamProvider, initial, supportsCancellation) { - var input = es.through(); - var output = es.through(); - var state = 'idle'; - var buffer = Object.create(null); - var token = !supportsCancellation ? null : { isCancellationRequested: function () { return Object.keys(buffer).length > 0; } }; - var run = function (input, isCancellable) { - state = 'running'; - var stream = !supportsCancellation ? streamProvider() : streamProvider(isCancellable ? token : NoCancellationToken); - input - .pipe(stream) - .pipe(es.through(null, function () { - state = 'idle'; - eventuallyRun(); - })) - .pipe(output); - }; - if (initial) { - run(initial, false); - } - var eventuallyRun = debounce(function () { - var paths = Object.keys(buffer); - if (paths.length === 0) { - return; - } - var data = paths.map(function (path) { return buffer[path]; }); - buffer = Object.create(null); - run(es.readArray(data), true); - }, 500); - input.on('data', function (f) { - buffer[f.path] = f; - if (state === 'idle') { - eventuallyRun(); - } - }); - return es.duplex(input, output); -} -exports.incremental = incremental; -function fixWin32DirectoryPermissions() { - if (!/win32/.test(process.platform)) { - return es.through(); - } - return es.mapSync(function (f) { - if (f.stat && f.stat.isDirectory && f.stat.isDirectory()) { - f.stat.mode = 16877; - } - return f; - }); -} -exports.fixWin32DirectoryPermissions = fixWin32DirectoryPermissions; -function setExecutableBit(pattern) { - var setBit = es.mapSync(function (f) { - f.stat.mode = 33261; - return f; - }); - if (!pattern) { - return setBit; - } - var input = es.through(); - var filter = _filter(pattern, { restore: true }); - var output = input - .pipe(filter) - .pipe(setBit) - .pipe(filter.restore); - return es.duplex(input, output); -} -exports.setExecutableBit = setExecutableBit; -function toFileUri(filePath) { - var match = filePath.match(/^([a-z])\:(.*)$/i); - if (match) { - filePath = '/' + match[1].toUpperCase() + ':' + match[2]; - } - return 'file://' + filePath.replace(/\\/g, '/'); -} -exports.toFileUri = toFileUri; -function skipDirectories() { - return es.mapSync(function (f) { - if (!f.isDirectory()) { - return f; - } - }); -} -exports.skipDirectories = skipDirectories; -function cleanNodeModule(name, excludes, includes) { - var toGlob = function (path) { return '**/node_modules/' + name + (path ? '/' + path : ''); }; - var negate = function (str) { return '!' + str; }; - var allFilter = _filter(toGlob('**'), { restore: true }); - var globs = [toGlob('**')].concat(excludes.map(_.compose(negate, toGlob))); - var input = es.through(); - var nodeModuleInput = input.pipe(allFilter); - var output = nodeModuleInput.pipe(_filter(globs)); - if (includes) { - var includeGlobs = includes.map(toGlob); - output = es.merge(output, nodeModuleInput.pipe(_filter(includeGlobs))); - } - output = output.pipe(allFilter.restore); - return es.duplex(input, output); -} -exports.cleanNodeModule = cleanNodeModule; -function loadSourcemaps() { - var input = es.through(); - var output = input - .pipe(es.map(function (f, cb) { - if (f.sourceMap) { - cb(null, f); - return; - } - if (!f.contents) { - cb(new Error('empty file')); - return; - } - var contents = f.contents.toString('utf8'); - var reg = /\/\/# sourceMappingURL=(.*)$/g; - var lastMatch = null, match = null; - while (match = reg.exec(contents)) { - lastMatch = match; - } - if (!lastMatch) { - f.sourceMap = { - version: 3, - names: [], - mappings: '', - sources: [f.relative.replace(/\//g, '/')], - sourcesContent: [contents] - }; - cb(null, f); - return; - } - f.contents = new Buffer(contents.replace(/\/\/# sourceMappingURL=(.*)$/g, ''), 'utf8'); - fs.readFile(path.join(path.dirname(f.path), lastMatch[1]), 'utf8', function (err, contents) { - if (err) { - return cb(err); - } - f.sourceMap = JSON.parse(contents); - cb(null, f); - }); - })); - return es.duplex(input, output); -} -exports.loadSourcemaps = loadSourcemaps; -function stripSourceMappingURL() { - var input = es.through(); - var output = input - .pipe(es.mapSync(function (f) { - var contents = f.contents.toString('utf8'); - f.contents = new Buffer(contents.replace(/\n\/\/# sourceMappingURL=(.*)$/gm, ''), 'utf8'); - return f; - })); - return es.duplex(input, output); -} -exports.stripSourceMappingURL = stripSourceMappingURL; -function rimraf(dir) { - var retries = 0; - var retry = function (cb) { - _rimraf(dir, { maxBusyTries: 1 }, function (err) { - if (!err) { - return cb(); - } - ; - if (err.code === 'ENOTEMPTY' && ++retries < 5) { - return setTimeout(function () { return retry(cb); }, 10); - } - return cb(err); - }); - }; - return function (cb) { return retry(cb); }; -} -exports.rimraf = rimraf; -function getVersion(root) { - var version = process.env['BUILD_SOURCEVERSION']; - if (!version || !/^[0-9a-f]{40}$/i.test(version)) { - version = git.getVersion(root); - } - return version; -} -exports.getVersion = getVersion; -function rebase(count) { - return rename(function (f) { - var parts = f.dirname.split(/[\/\\]/); - f.dirname = parts.slice(count).join(path.sep); - }); -} -exports.rebase = rebase; -function filter(fn) { - var result = es.through(function (data) { - if (fn(data)) { - this.emit('data', data); - } - else { - result.restore.push(data); - } - }); - result.restore = es.through(); - return result; -} -exports.filter = filter; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +var es = require("event-stream"); +var debounce = require("debounce"); +var _filter = require("gulp-filter"); +var rename = require("gulp-rename"); +var _ = require("underscore"); +var path = require("path"); +var fs = require("fs"); +var _rimraf = require("rimraf"); +var git = require("./git"); +var VinylFile = require("vinyl"); +var NoCancellationToken = { isCancellationRequested: function () { return false; } }; +function incremental(streamProvider, initial, supportsCancellation) { + var input = es.through(); + var output = es.through(); + var state = 'idle'; + var buffer = Object.create(null); + var token = !supportsCancellation ? null : { isCancellationRequested: function () { return Object.keys(buffer).length > 0; } }; + var run = function (input, isCancellable) { + state = 'running'; + var stream = !supportsCancellation ? streamProvider() : streamProvider(isCancellable ? token : NoCancellationToken); + input + .pipe(stream) + .pipe(es.through(null, function () { + state = 'idle'; + eventuallyRun(); + })) + .pipe(output); + }; + if (initial) { + run(initial, false); + } + var eventuallyRun = debounce(function () { + var paths = Object.keys(buffer); + if (paths.length === 0) { + return; + } + var data = paths.map(function (path) { return buffer[path]; }); + buffer = Object.create(null); + run(es.readArray(data), true); + }, 500); + input.on('data', function (f) { + buffer[f.path] = f; + if (state === 'idle') { + eventuallyRun(); + } + }); + return es.duplex(input, output); +} +exports.incremental = incremental; +function fixWin32DirectoryPermissions() { + if (!/win32/.test(process.platform)) { + return es.through(); + } + return es.mapSync(function (f) { + if (f.stat && f.stat.isDirectory && f.stat.isDirectory()) { + f.stat.mode = 16877; + } + return f; + }); +} +exports.fixWin32DirectoryPermissions = fixWin32DirectoryPermissions; +function setExecutableBit(pattern) { + var setBit = es.mapSync(function (f) { + f.stat.mode = 33261; + return f; + }); + if (!pattern) { + return setBit; + } + var input = es.through(); + var filter = _filter(pattern, { restore: true }); + var output = input + .pipe(filter) + .pipe(setBit) + .pipe(filter.restore); + return es.duplex(input, output); +} +exports.setExecutableBit = setExecutableBit; +function toFileUri(filePath) { + var match = filePath.match(/^([a-z])\:(.*)$/i); + if (match) { + filePath = '/' + match[1].toUpperCase() + ':' + match[2]; + } + return 'file://' + filePath.replace(/\\/g, '/'); +} +exports.toFileUri = toFileUri; +function skipDirectories() { + return es.mapSync(function (f) { + if (!f.isDirectory()) { + return f; + } + }); +} +exports.skipDirectories = skipDirectories; +function cleanNodeModule(name, excludes, includes) { + var toGlob = function (path) { return '**/node_modules/' + name + (path ? '/' + path : ''); }; + var negate = function (str) { return '!' + str; }; + var allFilter = _filter(toGlob('**'), { restore: true }); + var globs = [toGlob('**')].concat(excludes.map(_.compose(negate, toGlob))); + var input = es.through(); + var nodeModuleInput = input.pipe(allFilter); + var output = nodeModuleInput.pipe(_filter(globs)); + if (includes) { + var includeGlobs = includes.map(toGlob); + output = es.merge(output, nodeModuleInput.pipe(_filter(includeGlobs))); + } + output = output.pipe(allFilter.restore); + return es.duplex(input, output); +} +exports.cleanNodeModule = cleanNodeModule; +function loadSourcemaps() { + var input = es.through(); + var output = input + .pipe(es.map(function (f, cb) { + if (f.sourceMap) { + cb(null, f); + return; + } + if (!f.contents) { + cb(new Error('empty file')); + return; + } + var contents = f.contents.toString('utf8'); + var reg = /\/\/# sourceMappingURL=(.*)$/g; + var lastMatch = null, match = null; + while (match = reg.exec(contents)) { + lastMatch = match; + } + if (!lastMatch) { + f.sourceMap = { + version: 3, + names: [], + mappings: '', + sources: [f.relative.replace(/\//g, '/')], + sourcesContent: [contents] + }; + cb(null, f); + return; + } + f.contents = new Buffer(contents.replace(/\/\/# sourceMappingURL=(.*)$/g, ''), 'utf8'); + fs.readFile(path.join(path.dirname(f.path), lastMatch[1]), 'utf8', function (err, contents) { + if (err) { + return cb(err); + } + f.sourceMap = JSON.parse(contents); + cb(null, f); + }); + })); + return es.duplex(input, output); +} +exports.loadSourcemaps = loadSourcemaps; +function stripSourceMappingURL() { + var input = es.through(); + var output = input + .pipe(es.mapSync(function (f) { + var contents = f.contents.toString('utf8'); + f.contents = new Buffer(contents.replace(/\n\/\/# sourceMappingURL=(.*)$/gm, ''), 'utf8'); + return f; + })); + return es.duplex(input, output); +} +exports.stripSourceMappingURL = stripSourceMappingURL; +function rimraf(dir) { + var retries = 0; + var retry = function (cb) { + _rimraf(dir, { maxBusyTries: 1 }, function (err) { + if (!err) { + return cb(); + } + ; + if (err.code === 'ENOTEMPTY' && ++retries < 5) { + return setTimeout(function () { return retry(cb); }, 10); + } + return cb(err); + }); + }; + return function (cb) { return retry(cb); }; +} +exports.rimraf = rimraf; +function getVersion(root) { + var version = process.env['BUILD_SOURCEVERSION']; + if (!version || !/^[0-9a-f]{40}$/i.test(version)) { + version = git.getVersion(root); + } + return version; +} +exports.getVersion = getVersion; +function rebase(count) { + return rename(function (f) { + var parts = f.dirname.split(/[\/\\]/); + f.dirname = parts.slice(count).join(path.sep); + }); +} +exports.rebase = rebase; +function filter(fn) { + var result = es.through(function (data) { + if (fn(data)) { + this.emit('data', data); + } + else { + result.restore.push(data); + } + }); + result.restore = es.through(); + return result; +} +exports.filter = filter; diff --git a/build/lib/util.ts b/build/lib/util.ts index 44cc657c0c0a8..8f4f1ea75e964 100644 --- a/build/lib/util.ts +++ b/build/lib/util.ts @@ -22,19 +22,19 @@ export interface ICancellationToken { isCancellationRequested(): boolean; } -const NoCancellationToken:ICancellationToken = { isCancellationRequested: () => false }; +const NoCancellationToken: ICancellationToken = { isCancellationRequested: () => false }; export interface IStreamProvider { - (cancellationToken?:ICancellationToken): NodeJS.ReadWriteStream; + (cancellationToken?: ICancellationToken): NodeJS.ReadWriteStream; } -export function incremental(streamProvider:IStreamProvider, initial:NodeJS.ReadWriteStream, supportsCancellation:boolean): NodeJS.ReadWriteStream { +export function incremental(streamProvider: IStreamProvider, initial: NodeJS.ReadWriteStream, supportsCancellation: boolean): NodeJS.ReadWriteStream { const input = es.through(); const output = es.through(); let state = 'idle'; let buffer = Object.create(null); - const token:ICancellationToken = !supportsCancellation ? null : { isCancellationRequested: () => Object.keys(buffer).length > 0 }; + const token: ICancellationToken = !supportsCancellation ? null : { isCancellationRequested: () => Object.keys(buffer).length > 0 }; const run = (input, isCancellable) => { state = 'running'; @@ -66,7 +66,7 @@ export function incremental(streamProvider:IStreamProvider, initial:NodeJS.ReadW run(es.readArray(data), true); }, 500); - input.on('data', f => { + input.on('data', (f: any) => { buffer[f.path] = f; if (state === 'idle') { @@ -82,7 +82,7 @@ export function fixWin32DirectoryPermissions(): NodeJS.ReadWriteStream { return es.through(); } - return es.mapSync(f => { + return es.mapSync(f => { if (f.stat && f.stat.isDirectory && f.stat.isDirectory()) { f.stat.mode = 16877; } @@ -92,7 +92,7 @@ export function fixWin32DirectoryPermissions(): NodeJS.ReadWriteStream { } export function setExecutableBit(pattern: string | string[]): NodeJS.ReadWriteStream { - var setBit = es.mapSync(f => { + var setBit = es.mapSync(f => { f.stat.mode = /* 100755 */ 33261; return f; }); @@ -111,7 +111,7 @@ export function setExecutableBit(pattern: string | string[]): NodeJS.ReadWriteSt return es.duplex(input, output); } -export function toFileUri(filePath:string): string { +export function toFileUri(filePath: string): string { const match = filePath.match(/^([a-z])\:(.*)$/i); if (match) { @@ -122,23 +122,23 @@ export function toFileUri(filePath:string): string { } export function skipDirectories(): NodeJS.ReadWriteStream { - return es.mapSync(f => { + return es.mapSync(f => { if (!f.isDirectory()) { return f; } }); } -export function cleanNodeModule(name:string, excludes:string[], includes:string[]): NodeJS.ReadWriteStream { - const toGlob = (path:string) => '**/node_modules/' + name + (path ? '/' + path : ''); - const negate = (str:string) => '!' + str; +export function cleanNodeModule(name: string, excludes: string[], includes: string[]): NodeJS.ReadWriteStream { + const toGlob = (path: string) => '**/node_modules/' + name + (path ? '/' + path : ''); + const negate = (str: string) => '!' + str; const allFilter = _filter(toGlob('**'), { restore: true }); const globs = [toGlob('**')].concat(excludes.map(_.compose(negate, toGlob))); const input = es.through(); const nodeModuleInput = input.pipe(allFilter); - let output:NodeJS.ReadWriteStream = nodeModuleInput.pipe(_filter(globs)); + let output: NodeJS.ReadWriteStream = nodeModuleInput.pipe(_filter(globs)); if (includes) { const includeGlobs = includes.map(toGlob); @@ -157,7 +157,7 @@ export function loadSourcemaps(): NodeJS.ReadWriteStream { const input = es.through(); const output = input - .pipe(es.map((f, cb): FileSourceMap => { + .pipe(es.map((f, cb): FileSourceMap => { if (f.sourceMap) { cb(null, f); return; @@ -207,7 +207,7 @@ export function stripSourceMappingURL(): NodeJS.ReadWriteStream { const input = es.through(); const output = input - .pipe(es.mapSync(f => { + .pipe(es.mapSync(f => { const contents = (f.contents).toString('utf8'); f.contents = new Buffer(contents.replace(/\n\/\/# sourceMappingURL=(.*)$/gm, ''), 'utf8'); return f; @@ -216,11 +216,11 @@ export function stripSourceMappingURL(): NodeJS.ReadWriteStream { return es.duplex(input, output); } -export function rimraf(dir:string):(cb:any)=>void { +export function rimraf(dir: string): (cb: any) => void { let retries = 0; const retry = cb => { - _rimraf(dir, { maxBusyTries: 1 }, (err:any) => { + _rimraf(dir, { maxBusyTries: 1 }, (err: any) => { if (!err) { return cb(); }; @@ -236,7 +236,7 @@ export function rimraf(dir:string):(cb:any)=>void { return cb => retry(cb); } -export function getVersion(root:string): string { +export function getVersion(root: string): string { let version = process.env['BUILD_SOURCEVERSION']; if (!version || !/^[0-9a-f]{40}$/i.test(version)) { @@ -246,7 +246,7 @@ export function getVersion(root:string): string { return version; } -export function rebase(count:number): NodeJS.ReadWriteStream { +export function rebase(count: number): NodeJS.ReadWriteStream { return rename(f => { const parts = f.dirname.split(/[\/\\]/); f.dirname = parts.slice(count).join(path.sep); @@ -257,7 +257,7 @@ export interface FilterStream extends NodeJS.ReadWriteStream { restore: ThroughStream; } -export function filter(fn:(data:any)=>boolean):FilterStream { +export function filter(fn: (data: any) => boolean): FilterStream { const result = es.through(function (data) { if (fn(data)) { this.emit('data', data); diff --git a/build/lib/watch/index.js b/build/lib/watch/index.js index 17cd6ab66463b..bed579ec0758a 100644 --- a/build/lib/watch/index.js +++ b/build/lib/watch/index.js @@ -17,9 +17,20 @@ function handleDeletions() { }); } -const watch = process.platform === 'win32' - ? require('./watch-win32') - : require('gulp-watch'); +let watch = void 0; + +if (!process.env['VSCODE_USE_LEGACY_WATCH']) { + try { + watch = require('./watch-nsfw'); + } catch (err) { + console.warn('Could not load our cross platform file watcher: ' + err.toString()); + console.warn('Falling back to our platform specific watcher...'); + } +} + +if (!watch) { + watch = process.platform === 'win32' ? require('./watch-win32') : require('gulp-watch'); +} module.exports = function () { return watch.apply(null, arguments) diff --git a/build/lib/watch/package.json b/build/lib/watch/package.json index 0d03134015361..b10e8ed2727e5 100644 --- a/build/lib/watch/package.json +++ b/build/lib/watch/package.json @@ -5,6 +5,7 @@ "author": "Microsoft ", "private": true, "devDependencies": { - "gulp-watch": "^4.3.9" + "gulp-watch": "^4.3.9", + "nsfw": "^1.0.15" } } diff --git a/build/lib/watch/watch-nsfw.js b/build/lib/watch/watch-nsfw.js new file mode 100644 index 0000000000000..c9fe9192f310a --- /dev/null +++ b/build/lib/watch/watch-nsfw.js @@ -0,0 +1,94 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +var nsfw = require('nsfw'); +var path = require('path'); +var fs = require('fs'); +var File = require('vinyl'); +var es = require('event-stream'); +var filter = require('gulp-filter'); + +function toChangeType(type) { + switch (type) { + case 0: return 'add'; + case 1: return 'unlink'; + case 2: return 'change'; + } +} + +function watch(root) { + var result = es.through(); + + function handleEvent(path, type) { + if (/[/\\].git[/\\]/.test(path) || /[/\\]out[/\\]/.test(path)) { + return; // filter as early as possible + } + + var file = new File({ + path: path, + base: root + }); + + file.event = type; + result.emit('data', file); + } + + nsfw(root, function(events) { + for (var i = 0; i < events.length; i++) { + var e = events[i]; + var changeType = e.action; + + if (changeType === 3 /* RENAMED */) { + handleEvent(path.join(e.directory, e.oldFile), 'unlink'); + handleEvent(path.join(e.directory, e.newFile), 'add'); + } else { + handleEvent(path.join(e.directory, e.file), toChangeType(changeType)); + } + } + }).then(function(watcher) { + watcher.start(); + }); + + return result; +} + +var cache = Object.create(null); + +module.exports = function(pattern, options) { + options = options || {}; + + var cwd = path.normalize(options.cwd || process.cwd()); + var watcher = cache[cwd]; + + if (!watcher) { + watcher = cache[cwd] = watch(cwd); + } + + var rebase = !options.base ? es.through() : es.mapSync(function(f) { + f.base = options.base; + return f; + }); + + return watcher + .pipe(filter(['**', '!.git{,/**}'])) // ignore all things git + .pipe(filter(pattern)) + .pipe(es.map(function(file, cb) { + fs.stat(file.path, function(err, stat) { + if (err && err.code === 'ENOENT') { return cb(null, file); } + if (err) { return cb(); } + if (!stat.isFile()) { return cb(); } + + fs.readFile(file.path, function(err, contents) { + if (err && err.code === 'ENOENT') { return cb(null, file); } + if (err) { return cb(); } + + file.contents = contents; + file.stat = stat; + cb(null, file); + }); + }); + })) + .pipe(rebase); +}; \ No newline at end of file diff --git a/build/monaco/api.js b/build/monaco/api.js index 96d03bf8da61f..83eacd16a3dd2 100644 --- a/build/monaco/api.js +++ b/build/monaco/api.js @@ -1,327 +1,327 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var fs = require("fs"); -var ts = require("typescript"); -var path = require("path"); -var tsfmt = require('../../tsfmt.json'); -var util = require('gulp-util'); -function log(message) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } - util.log.apply(util, [util.colors.cyan('[monaco.d.ts]'), message].concat(rest)); -} -var SRC = path.join(__dirname, '../../src'); -var OUT_ROOT = path.join(__dirname, '../../'); -var RECIPE_PATH = path.join(__dirname, './monaco.d.ts.recipe'); -var DECLARATION_PATH = path.join(__dirname, '../../src/vs/monaco.d.ts'); -var CURRENT_PROCESSING_RULE = ''; -function logErr(message) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } - util.log(util.colors.red('[monaco.d.ts]'), 'WHILE HANDLING RULE: ', CURRENT_PROCESSING_RULE); - util.log.apply(util, [util.colors.red('[monaco.d.ts]'), message].concat(rest)); -} -function moduleIdToPath(out, moduleId) { - if (/\.d\.ts/.test(moduleId)) { - return path.join(SRC, moduleId); - } - return path.join(OUT_ROOT, out, moduleId) + '.d.ts'; -} -var SOURCE_FILE_MAP = {}; -function getSourceFile(out, inputFiles, moduleId) { - if (!SOURCE_FILE_MAP[moduleId]) { - var filePath = path.normalize(moduleIdToPath(out, moduleId)); - if (!inputFiles.hasOwnProperty(filePath)) { - logErr('CANNOT FIND FILE ' + filePath + '. YOU MIGHT NEED TO RESTART gulp'); - return null; - } - var fileContents = inputFiles[filePath]; - var sourceFile = ts.createSourceFile(filePath, fileContents, ts.ScriptTarget.ES5); - SOURCE_FILE_MAP[moduleId] = sourceFile; - } - return SOURCE_FILE_MAP[moduleId]; -} -function isDeclaration(a) { - return (a.kind === ts.SyntaxKind.InterfaceDeclaration - || a.kind === ts.SyntaxKind.EnumDeclaration - || a.kind === ts.SyntaxKind.ClassDeclaration - || a.kind === ts.SyntaxKind.TypeAliasDeclaration - || a.kind === ts.SyntaxKind.FunctionDeclaration - || a.kind === ts.SyntaxKind.ModuleDeclaration); -} -function visitTopLevelDeclarations(sourceFile, visitor) { - var stop = false; - var visit = function (node) { - if (stop) { - return; - } - switch (node.kind) { - case ts.SyntaxKind.InterfaceDeclaration: - case ts.SyntaxKind.EnumDeclaration: - case ts.SyntaxKind.ClassDeclaration: - case ts.SyntaxKind.VariableStatement: - case ts.SyntaxKind.TypeAliasDeclaration: - case ts.SyntaxKind.FunctionDeclaration: - case ts.SyntaxKind.ModuleDeclaration: - stop = visitor(node); - } - // if (node.kind !== ts.SyntaxKind.SourceFile) { - // if (getNodeText(sourceFile, node).indexOf('SymbolKind') >= 0) { - // console.log('FOUND TEXT IN NODE: ' + ts.SyntaxKind[node.kind]); - // console.log(getNodeText(sourceFile, node)); - // } - // } - if (stop) { - return; - } - ts.forEachChild(node, visit); - }; - visit(sourceFile); -} -function getAllTopLevelDeclarations(sourceFile) { - var all = []; - visitTopLevelDeclarations(sourceFile, function (node) { - if (node.kind === ts.SyntaxKind.InterfaceDeclaration || node.kind === ts.SyntaxKind.ClassDeclaration || node.kind === ts.SyntaxKind.ModuleDeclaration) { - var interfaceDeclaration = node; - var triviaStart = interfaceDeclaration.pos; - var triviaEnd = interfaceDeclaration.name.pos; - var triviaText = getNodeText(sourceFile, { pos: triviaStart, end: triviaEnd }); - // // let nodeText = getNodeText(sourceFile, node); - // if (getNodeText(sourceFile, node).indexOf('SymbolKind') >= 0) { - // console.log('TRIVIA: ', triviaText); - // } - if (triviaText.indexOf('@internal') === -1) { - all.push(node); - } - } - else { - var nodeText = getNodeText(sourceFile, node); - if (nodeText.indexOf('@internal') === -1) { - all.push(node); - } - } - return false /*continue*/; - }); - return all; -} -function getTopLevelDeclaration(sourceFile, typeName) { - var result = null; - visitTopLevelDeclarations(sourceFile, function (node) { - if (isDeclaration(node)) { - if (node.name.text === typeName) { - result = node; - return true /*stop*/; - } - return false /*continue*/; - } - // node is ts.VariableStatement - if (getNodeText(sourceFile, node).indexOf(typeName) >= 0) { - result = node; - return true /*stop*/; - } - return false /*continue*/; - }); - return result; -} -function getNodeText(sourceFile, node) { - return sourceFile.getFullText().substring(node.pos, node.end); -} -function getMassagedTopLevelDeclarationText(sourceFile, declaration) { - var result = getNodeText(sourceFile, declaration); - // if (result.indexOf('MonacoWorker') >= 0) { - // console.log('here!'); - // // console.log(ts.SyntaxKind[declaration.kind]); - // } - if (declaration.kind === ts.SyntaxKind.InterfaceDeclaration || declaration.kind === ts.SyntaxKind.ClassDeclaration) { - var interfaceDeclaration = declaration; - var members = interfaceDeclaration.members; - members.forEach(function (member) { - try { - var memberText = getNodeText(sourceFile, member); - if (memberText.indexOf('@internal') >= 0 || memberText.indexOf('private') >= 0) { - // console.log('BEFORE: ', result); - result = result.replace(memberText, ''); - // console.log('AFTER: ', result); - } - } - catch (err) { - // life.. - } - }); - } - result = result.replace(/export default/g, 'export'); - result = result.replace(/export declare/g, 'export'); - return result; -} -function format(text) { - // Parse the source text - var sourceFile = ts.createSourceFile('file.ts', text, ts.ScriptTarget.Latest, /*setParentPointers*/ true); - // Get the formatting edits on the input sources - var edits = ts.formatting.formatDocument(sourceFile, getRuleProvider(tsfmt), tsfmt); - // Apply the edits on the input code - return applyEdits(text, edits); - function getRuleProvider(options) { - // Share this between multiple formatters using the same options. - // This represents the bulk of the space the formatter uses. - var ruleProvider = new ts.formatting.RulesProvider(); - ruleProvider.ensureUpToDate(options); - return ruleProvider; - } - function applyEdits(text, edits) { - // Apply edits in reverse on the existing text - var result = text; - for (var i = edits.length - 1; i >= 0; i--) { - var change = edits[i]; - var head = result.slice(0, change.span.start); - var tail = result.slice(change.span.start + change.span.length); - result = head + change.newText + tail; - } - return result; - } -} -function createReplacer(data) { - data = data || ''; - var rawDirectives = data.split(';'); - var directives = []; - rawDirectives.forEach(function (rawDirective) { - if (rawDirective.length === 0) { - return; - } - var pieces = rawDirective.split('=>'); - var findStr = pieces[0]; - var replaceStr = pieces[1]; - findStr = findStr.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, '\\$&'); - findStr = '\\b' + findStr + '\\b'; - directives.push([new RegExp(findStr, 'g'), replaceStr]); - }); - return function (str) { - for (var i = 0; i < directives.length; i++) { - str = str.replace(directives[i][0], directives[i][1]); - } - return str; - }; -} -function generateDeclarationFile(out, inputFiles, recipe) { - var lines = recipe.split(/\r\n|\n|\r/); - var result = []; - lines.forEach(function (line) { - var m1 = line.match(/^\s*#include\(([^;)]*)(;[^)]*)?\)\:(.*)$/); - if (m1) { - CURRENT_PROCESSING_RULE = line; - var moduleId = m1[1]; - var sourceFile_1 = getSourceFile(out, inputFiles, moduleId); - if (!sourceFile_1) { - return; - } - var replacer_1 = createReplacer(m1[2]); - var typeNames = m1[3].split(/,/); - typeNames.forEach(function (typeName) { - typeName = typeName.trim(); - if (typeName.length === 0) { - return; - } - var declaration = getTopLevelDeclaration(sourceFile_1, typeName); - if (!declaration) { - logErr('Cannot find type ' + typeName); - return; - } - result.push(replacer_1(getMassagedTopLevelDeclarationText(sourceFile_1, declaration))); - }); - return; - } - var m2 = line.match(/^\s*#includeAll\(([^;)]*)(;[^)]*)?\)\:(.*)$/); - if (m2) { - CURRENT_PROCESSING_RULE = line; - var moduleId = m2[1]; - var sourceFile_2 = getSourceFile(out, inputFiles, moduleId); - if (!sourceFile_2) { - return; - } - var replacer_2 = createReplacer(m2[2]); - var typeNames = m2[3].split(/,/); - var typesToExcludeMap_1 = {}; - var typesToExcludeArr_1 = []; - typeNames.forEach(function (typeName) { - typeName = typeName.trim(); - if (typeName.length === 0) { - return; - } - typesToExcludeMap_1[typeName] = true; - typesToExcludeArr_1.push(typeName); - }); - getAllTopLevelDeclarations(sourceFile_2).forEach(function (declaration) { - if (isDeclaration(declaration)) { - if (typesToExcludeMap_1[declaration.name.text]) { - return; - } - } - else { - // node is ts.VariableStatement - var nodeText = getNodeText(sourceFile_2, declaration); - for (var i = 0; i < typesToExcludeArr_1.length; i++) { - if (nodeText.indexOf(typesToExcludeArr_1[i]) >= 0) { - return; - } - } - } - result.push(replacer_2(getMassagedTopLevelDeclarationText(sourceFile_2, declaration))); - }); - return; - } - result.push(line); - }); - var resultTxt = result.join('\n'); - resultTxt = resultTxt.replace(/\bURI\b/g, 'Uri'); - resultTxt = resultTxt.replace(/\bEvent= 0) { + // console.log('FOUND TEXT IN NODE: ' + ts.SyntaxKind[node.kind]); + // console.log(getNodeText(sourceFile, node)); + // } + // } + if (stop) { + return; + } + ts.forEachChild(node, visit); + }; + visit(sourceFile); +} +function getAllTopLevelDeclarations(sourceFile) { + var all = []; + visitTopLevelDeclarations(sourceFile, function (node) { + if (node.kind === ts.SyntaxKind.InterfaceDeclaration || node.kind === ts.SyntaxKind.ClassDeclaration || node.kind === ts.SyntaxKind.ModuleDeclaration) { + var interfaceDeclaration = node; + var triviaStart = interfaceDeclaration.pos; + var triviaEnd = interfaceDeclaration.name.pos; + var triviaText = getNodeText(sourceFile, { pos: triviaStart, end: triviaEnd }); + // // let nodeText = getNodeText(sourceFile, node); + // if (getNodeText(sourceFile, node).indexOf('SymbolKind') >= 0) { + // console.log('TRIVIA: ', triviaText); + // } + if (triviaText.indexOf('@internal') === -1) { + all.push(node); + } + } + else { + var nodeText = getNodeText(sourceFile, node); + if (nodeText.indexOf('@internal') === -1) { + all.push(node); + } + } + return false /*continue*/; + }); + return all; +} +function getTopLevelDeclaration(sourceFile, typeName) { + var result = null; + visitTopLevelDeclarations(sourceFile, function (node) { + if (isDeclaration(node)) { + if (node.name.text === typeName) { + result = node; + return true /*stop*/; + } + return false /*continue*/; + } + // node is ts.VariableStatement + if (getNodeText(sourceFile, node).indexOf(typeName) >= 0) { + result = node; + return true /*stop*/; + } + return false /*continue*/; + }); + return result; +} +function getNodeText(sourceFile, node) { + return sourceFile.getFullText().substring(node.pos, node.end); +} +function getMassagedTopLevelDeclarationText(sourceFile, declaration) { + var result = getNodeText(sourceFile, declaration); + // if (result.indexOf('MonacoWorker') >= 0) { + // console.log('here!'); + // // console.log(ts.SyntaxKind[declaration.kind]); + // } + if (declaration.kind === ts.SyntaxKind.InterfaceDeclaration || declaration.kind === ts.SyntaxKind.ClassDeclaration) { + var interfaceDeclaration = declaration; + var members = interfaceDeclaration.members; + members.forEach(function (member) { + try { + var memberText = getNodeText(sourceFile, member); + if (memberText.indexOf('@internal') >= 0 || memberText.indexOf('private') >= 0) { + // console.log('BEFORE: ', result); + result = result.replace(memberText, ''); + // console.log('AFTER: ', result); + } + } + catch (err) { + // life.. + } + }); + } + result = result.replace(/export default/g, 'export'); + result = result.replace(/export declare/g, 'export'); + return result; +} +function format(text) { + // Parse the source text + var sourceFile = ts.createSourceFile('file.ts', text, ts.ScriptTarget.Latest, /*setParentPointers*/ true); + // Get the formatting edits on the input sources + var edits = ts.formatting.formatDocument(sourceFile, getRuleProvider(tsfmt), tsfmt); + // Apply the edits on the input code + return applyEdits(text, edits); + function getRuleProvider(options) { + // Share this between multiple formatters using the same options. + // This represents the bulk of the space the formatter uses. + var ruleProvider = new ts.formatting.RulesProvider(); + ruleProvider.ensureUpToDate(options); + return ruleProvider; + } + function applyEdits(text, edits) { + // Apply edits in reverse on the existing text + var result = text; + for (var i = edits.length - 1; i >= 0; i--) { + var change = edits[i]; + var head = result.slice(0, change.span.start); + var tail = result.slice(change.span.start + change.span.length); + result = head + change.newText + tail; + } + return result; + } +} +function createReplacer(data) { + data = data || ''; + var rawDirectives = data.split(';'); + var directives = []; + rawDirectives.forEach(function (rawDirective) { + if (rawDirective.length === 0) { + return; + } + var pieces = rawDirective.split('=>'); + var findStr = pieces[0]; + var replaceStr = pieces[1]; + findStr = findStr.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, '\\$&'); + findStr = '\\b' + findStr + '\\b'; + directives.push([new RegExp(findStr, 'g'), replaceStr]); + }); + return function (str) { + for (var i = 0; i < directives.length; i++) { + str = str.replace(directives[i][0], directives[i][1]); + } + return str; + }; +} +function generateDeclarationFile(out, inputFiles, recipe) { + var lines = recipe.split(/\r\n|\n|\r/); + var result = []; + lines.forEach(function (line) { + var m1 = line.match(/^\s*#include\(([^;)]*)(;[^)]*)?\)\:(.*)$/); + if (m1) { + CURRENT_PROCESSING_RULE = line; + var moduleId = m1[1]; + var sourceFile_1 = getSourceFile(out, inputFiles, moduleId); + if (!sourceFile_1) { + return; + } + var replacer_1 = createReplacer(m1[2]); + var typeNames = m1[3].split(/,/); + typeNames.forEach(function (typeName) { + typeName = typeName.trim(); + if (typeName.length === 0) { + return; + } + var declaration = getTopLevelDeclaration(sourceFile_1, typeName); + if (!declaration) { + logErr('Cannot find type ' + typeName); + return; + } + result.push(replacer_1(getMassagedTopLevelDeclarationText(sourceFile_1, declaration))); + }); + return; + } + var m2 = line.match(/^\s*#includeAll\(([^;)]*)(;[^)]*)?\)\:(.*)$/); + if (m2) { + CURRENT_PROCESSING_RULE = line; + var moduleId = m2[1]; + var sourceFile_2 = getSourceFile(out, inputFiles, moduleId); + if (!sourceFile_2) { + return; + } + var replacer_2 = createReplacer(m2[2]); + var typeNames = m2[3].split(/,/); + var typesToExcludeMap_1 = {}; + var typesToExcludeArr_1 = []; + typeNames.forEach(function (typeName) { + typeName = typeName.trim(); + if (typeName.length === 0) { + return; + } + typesToExcludeMap_1[typeName] = true; + typesToExcludeArr_1.push(typeName); + }); + getAllTopLevelDeclarations(sourceFile_2).forEach(function (declaration) { + if (isDeclaration(declaration)) { + if (typesToExcludeMap_1[declaration.name.text]) { + return; + } + } + else { + // node is ts.VariableStatement + var nodeText = getNodeText(sourceFile_2, declaration); + for (var i = 0; i < typesToExcludeArr_1.length; i++) { + if (nodeText.indexOf(typesToExcludeArr_1[i]) >= 0) { + return; + } + } + } + result.push(replacer_2(getMassagedTopLevelDeclarationText(sourceFile_2, declaration))); + }); + return; + } + result.push(line); + }); + var resultTxt = result.join('\n'); + resultTxt = resultTxt.replace(/\bURI\b/g, 'Uri'); + resultTxt = resultTxt.replace(/\bEventlanguages.;editorCommon.=>): -#include(vs/editor/common/services/standaloneThemeService): BuiltinTheme, IStandaloneThemeData, IColors +#includeAll(vs/editor/standalone/browser/standaloneEditor;modes.=>languages.;editorCommon.=>): +#include(vs/editor/standalone/common/standaloneThemeService): BuiltinTheme, IStandaloneThemeData, IColors #include(vs/editor/common/modes/supports/tokenization): ITokenThemeRule #include(vs/editor/common/services/webWorker): MonacoWebWorker, IWebWorkerOptions -#include(vs/editor/browser/standalone/standaloneCodeEditor): IEditorConstructionOptions, IDiffEditorConstructionOptions, IStandaloneCodeEditor, IStandaloneDiffEditor +#include(vs/editor/standalone/browser/standaloneCodeEditor): IEditorConstructionOptions, IDiffEditorConstructionOptions, IStandaloneCodeEditor, IStandaloneDiffEditor export interface ICommandHandler { (...args:any[]): void; } #include(vs/platform/contextkey/common/contextkey): IContextKey -#include(vs/editor/browser/standalone/standaloneServices): IEditorOverrideServices +#include(vs/editor/standalone/browser/standaloneServices): IEditorOverrideServices #include(vs/platform/markers/common/markers): IMarkerData -#include(vs/editor/browser/standalone/colorizer): IColorizerOptions, IColorizerElementOptions +#include(vs/editor/standalone/browser/colorizer): IColorizerOptions, IColorizerElementOptions #include(vs/base/common/scrollable): ScrollbarVisibility +#include(vs/platform/theme/common/themeService): ThemeColor #includeAll(vs/editor/common/editorCommon;IMode=>languages.IMode;LanguageIdentifier=>languages.LanguageIdentifier;editorOptions.=>): ISelection, IScrollEvent #includeAll(vs/editor/common/model/textModelEvents): #includeAll(vs/editor/common/controller/cursorEvents): @@ -80,11 +81,11 @@ export interface ICommandHandler { declare module monaco.languages { -#includeAll(vs/editor/browser/standalone/standaloneLanguages;modes.=>;editorCommon.=>editor.;IMarkerData=>editor.IMarkerData): +#includeAll(vs/editor/standalone/browser/standaloneLanguages;modes.=>;editorCommon.=>editor.;IMarkerData=>editor.IMarkerData): #includeAll(vs/editor/common/modes/languageConfiguration): #includeAll(vs/editor/common/modes;editorCommon.IRange=>IRange;editorCommon.IPosition=>IPosition;editorCommon.=>editor.): #include(vs/editor/common/services/modeService): ILanguageExtensionPoint -#includeAll(vs/editor/common/modes/monarch/monarchTypes): +#includeAll(vs/editor/standalone/common/monarch/monarchTypes): } diff --git a/build/monaco/package.json b/build/monaco/package.json index 604ffd4b5fe10..a697b035f7139 100644 --- a/build/monaco/package.json +++ b/build/monaco/package.json @@ -48,7 +48,7 @@ "sinon": "^1.17.2", "source-map": "^0.4.4", "tslint": "^4.3.1", - "typescript": "2.2.2", + "typescript": "2.3.2", "typescript-formatter": "4.0.1", "underscore": "^1.8.2", "vinyl": "^0.4.5", diff --git a/build/npm/postinstall.js b/build/npm/postinstall.js index fd64909a4eed2..7b156212bec82 100644 --- a/build/npm/postinstall.js +++ b/build/npm/postinstall.js @@ -4,13 +4,15 @@ *--------------------------------------------------------------------------------------------*/ const cp = require('child_process'); +const path = require('path'); const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm'; -function npmInstall(location) { - const result = cp.spawnSync(npm, ['install'], { - cwd: location , - stdio: 'inherit' - }); +function npmInstall(location, opts) { + opts = opts || {}; + opts.cwd = location; + opts.stdio = 'inherit'; + + const result = cp.spawnSync(npm, ['install'], opts); if (result.error || result.status !== 0) { process.exit(1); @@ -33,9 +35,27 @@ const extensions = [ 'html', 'git', 'gulp', - 'grunt' + 'grunt', + 'jake', + 'merge-conflict', + 'emmet', + 'npm', + 'jake' ]; extensions.forEach(extension => npmInstall(`extensions/${extension}`)); -npmInstall(`build`); // node modules required for build \ No newline at end of file +function npmInstallBuildDependencies() { + // make sure we install gulp watch for the system installed + // node, since that is the driver of gulp + const env = Object.assign({}, process.env); + + delete env['npm_config_disturl']; + delete env['npm_config_target']; + delete env['npm_config_runtime']; + + npmInstall(path.join(path.dirname(__dirname), 'lib', 'watch'), { env }); +} + +npmInstall(`build`); // node modules required for build +npmInstallBuildDependencies(); // node modules for watching, specific to host node version, not electron \ No newline at end of file diff --git a/build/npm/preinstall.js b/build/npm/preinstall.js index 6a65998d3f6ba..2bcbfb6e7d0e6 100644 --- a/build/npm/preinstall.js +++ b/build/npm/preinstall.js @@ -3,32 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -const path = require('path'); -const cp = require('child_process'); - -if (process.env['npm_config_disturl'] !== 'https://atom.io/download/atom-shell') { +if (process.env['npm_config_disturl'] !== 'https://atom.io/download/electron') { console.error("You can't use plain npm to install Code's dependencies."); console.error( /^win/.test(process.platform) - ? "Please run '.\\scripts\\npm.bat install' instead." - : "Please run './scripts/npm.sh install' instead." + ? "Please run '.\\scripts\\npm.bat install' instead." + : "Please run './scripts/npm.sh install' instead." ); process.exit(1); -} - -// make sure we install gulp watch for the system installed -// node, since that is the driver of gulp -if (process.platform !== 'win32') { - const env = Object.assign({}, process.env); - - delete env['npm_config_disturl']; - delete env['npm_config_target']; - delete env['npm_config_runtime']; - - cp.spawnSync('npm', ['install'], { - cwd: path.join(path.dirname(__dirname), 'lib', 'watch'), - stdio: 'inherit', - env - }); } \ No newline at end of file diff --git a/build/npm/update-all-grammars.js b/build/npm/update-all-grammars.js new file mode 100644 index 0000000000000..88b890af730c1 --- /dev/null +++ b/build/npm/update-all-grammars.js @@ -0,0 +1,73 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +const cp = require('child_process'); +const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm'; + +function updateGrammar(location) { + const result = cp.spawnSync(npm, ['run', 'update-grammar'], { + cwd: location, + stdio: 'inherit' + }); + + if (result.error || result.status !== 0) { + process.exit(1); + } +} + +const extensions = [ + // 'bat' Grammar no longer available + 'clojure', + 'coffeescript', + 'cpp', + 'csharp', + 'css', + 'diff', + 'docker', + 'fsharp', + 'gitsyntax', + 'go', + 'groovy', + 'handlebars', + 'hlsl', + 'html', + 'ini', + 'java', + // 'javascript', updated through JavaScript + // 'json', customized + 'less', + 'lua', + 'make', + 'markdown', + 'objective-c', + 'perl', + 'php', + // 'powershell', grammar not ready yet, @daviwil will ping when ready + 'pug', + 'python', + 'r', + 'razor', + 'ruby', + 'rust', + 'scss', + 'shaderlab', + 'shellscript', + // 'sql', customized, PRs pending + 'swift', + 'typescript', + 'vb', + 'xml', + 'yaml' +]; + +extensions.forEach(extension => updateGrammar(`extensions/${extension}`)); + +// run integration tests + +if (process.platform === 'win32') { + cp.spawn('.\scripts\test-integration.bat', [], { env: process.env, stdio: 'inherit' }); +} else { + cp.spawn('/bin/bash', ['./scripts/test-integration.sh'], { env: process.env, stdio: 'inherit' }); +} \ No newline at end of file diff --git a/build/npm/update-grammar.js b/build/npm/update-grammar.js index 4b0408b89b29d..fca60d83242dc 100644 --- a/build/npm/update-grammar.js +++ b/build/npm/update-grammar.js @@ -25,19 +25,28 @@ function getOptions(urlString) { } } -function download(url) { -return new Promise((c, e) => { - var content = ''; - var request = https.get(getOptions(url), function (response) { +function download(url, redirectCount) { + return new Promise((c, e) => { + var content = ''; + https.get(getOptions(url), function (response) { response.on('data', function (data) { content += data.toString(); }).on('end', function () { + let count = redirectCount || 0; + if (count < 5 && response.statusCode >= 300 && response.statusCode <= 303 || response.statusCode === 307) { + let location = response.headers['location']; + if (location) { + console.log("Redirected " + url + " to " + location); + download(location, count+1).then(c, e); + return; + } + } c(content); }); }).on('error', function (err) { e(err.message); }); -}); + }); } function getCommitSha(repoId, repoPath) { @@ -46,14 +55,15 @@ function getCommitSha(repoId, repoPath) { try { let lastCommit = JSON.parse(content)[0]; return Promise.resolve({ - commitSha : lastCommit.sha, - commitDate : lastCommit.commit.author.date + commitSha: lastCommit.sha, + commitDate: lastCommit.commit.author.date }); } catch (e) { + console.error("Failed extracting the SHA: " + content); return Promise.resolve(null); } }, function () { - console.err('Failed loading ' + commitInfo); + console.error('Failed loading ' + commitInfo); return Promise.resolve(null); }); } @@ -78,11 +88,23 @@ exports.update = function (repoId, repoPath, dest, modifyGrammar) { modifyGrammar(grammar); } return getCommitSha(repoId, repoPath).then(function (info) { + let result = { + information_for_contributors: [ + 'This file has been converted from https://github.com/' + repoId + '/blob/master/' + repoPath, + '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.' + ] + }; + if (info) { - grammar.version = 'https://github.com/' + repoId + '/commit/' + info.commitSha; + result.version = 'https://github.com/' + repoId + '/commit/' + info.commitSha; } + for (let key in grammar) { + result[key] = grammar[key]; + } + try { - fs.writeFileSync(dest, JSON.stringify(grammar, null, '\t')); + fs.writeFileSync(dest, JSON.stringify(result, null, '\t')); if (info) { console.log('Updated ' + path.basename(dest) + ' to ' + repoId + '@' + info.commitSha.substr(0, 7) + ' (' + info.commitDate.substr(0, 10) + ')'); } else { @@ -97,7 +119,7 @@ exports.update = function (repoId, repoPath, dest, modifyGrammar) { } if (path.basename(process.argv[1]) === 'update-grammar.js') { - for (var i = 3; i < process.argv.length; i+=2) { - exports.update(process.argv[2], process.argv[i], process.argv[i+1]); + for (var i = 3; i < process.argv.length; i += 2) { + exports.update(process.argv[2], process.argv[i], process.argv[i + 1]); } } diff --git a/build/npm/update-theme.js b/build/npm/update-theme.js index f4b2d8f3c94ca..7e5649a1cbc71 100644 --- a/build/npm/update-theme.js +++ b/build/npm/update-theme.js @@ -10,29 +10,29 @@ var fs = require('fs'); var plist = require('fast-plist'); var mappings = { - "background": ["editorBackground"], - "foreground": ["editorForeground"], - "hoverHighlight": ["editorHoverHighlight"], - "linkForeground": ["editorLinkForeground"], - "selection": ["editorSelection"], - "inactiveSelection": ["editorInactiveSelection"], - "selectionHighlightColor": ["editorSelectionHighlight"], - "wordHighlight": ["editorWordHighlight"], - "wordHighlightStrong": ["editorWordHighlightStrong"], - "findMatchHighlight": ["editorFindMatchHighlight", "peekViewEditorMatchHighlight"], - "currentFindMatchHighlight": ["editorFindMatch"], - "findRangeHighlight": ["editorFindRangeHighlight"], - "referenceHighlight": ["peekViewResultsMatchForeground"], - "lineHighlight": ["editorLineHighlight"], - "rangeHighlight": ["editorRangeHighlight"], - "caret": ["editorCursor"], - "invisibles": ["editorWhitespaces"], - "guide": ["editorIndentGuides"], - "ansiBlack": ["terminalAnsiBlack"], "ansiRed": ["terminalAnsiRed"], "ansiGreen": ["terminalAnsiGreen"], "ansiYellow": ["terminalAnsiYellow"], - "ansiBlue": ["terminalAnsiBlue"], "ansiMagenta": ["terminalAnsiMagenta"], "ansiCyan": ["terminalAnsiCyan"], "ansiWhite": ["terminalAnsiWhite"], - "ansiBrightBlack": ["terminalAnsiBrightBlack"], "ansiBrightRed": ["terminalAnsiBrightRed"], "ansiBrightGreen": ["terminalAnsiBrightGreen"], - "ansiBrightYellow": ["terminalAnsiBrightYellow"], "ansiBrightBlue": ["terminalAnsiBrightBlue"], "ansiBrightMagenta": ["terminalAnsiBrightMagenta"], - "ansiBrightCyan": ["terminalAnsiBrightCyan"], "ansiBrightWhite": ["terminalAnsiBrightWhite"] + "background": ["editor.background"], + "foreground": ["editor.foreground"], + "hoverHighlight": ["editor.hoverHighlightBackground"], + "linkForeground": ["editorLink.foreground"], + "selection": ["editor.selectionBackground"], + "inactiveSelection": ["editor.inactiveSelectionBackground"], + "selectionHighlightColor": ["editor.selectionHighlightBackground"], + "wordHighlight": ["editor.wordHighlightBackground"], + "wordHighlightStrong": ["editor.wordHighlightStrongBackground"], + "findMatchHighlight": ["editor.findMatchHighlightBackground", "peekViewResult.matchHighlightBackground"], + "currentFindMatchHighlight": ["editor.findMatchBackground"], + "findRangeHighlight": ["editor.findRangeHighlightBackground"], + "referenceHighlight": ["peekViewEditor.matchHighlightBackground"], + "lineHighlight": ["editor.lineHighlightBackground"], + "rangeHighlight": ["editor.rangeHighlightBackground"], + "caret": ["editorCursor.foreground"], + "invisibles": ["editorWhitespace.foreground"], + "guide": ["editorIndentGuide.background"], + "ansiBlack": ["terminal.ansiBlack"], "ansiRed": ["terminal.ansiRed"], "ansiGreen": ["terminal.ansiGreen"], "ansiYellow": ["terminal.ansiYellow"], + "ansiBlue": ["terminal.ansiBlue"], "ansiMagenta": ["terminal.ansiMagenta"], "ansiCyan": ["terminal.ansiCyan"], "ansiWhite": ["terminal.ansiWhite"], + "ansiBrightBlack": ["terminal.ansiBrightBlack"], "ansiBrightRed": ["terminal.ansiBrightRed"], "ansiBrightGreen": ["terminal.ansiBrightGreen"], + "ansiBrightYellow": ["terminal.ansiBrightYellow"], "ansiBrightBlue": ["terminal.ansiBrightBlue"], "ansiBrightMagenta": ["terminal.ansiBrightMagenta"], + "ansiBrightCyan": ["terminal.ansiBrightCyan"], "ansiBrightWhite": ["terminal.ansiBrightWhite"] }; exports.update = function (srcName, destName) { diff --git a/build/package.json b/build/package.json index 2be49f6f8cde7..b3205d92bc4cd 100644 --- a/build/package.json +++ b/build/package.json @@ -2,7 +2,23 @@ "name": "code-oss-dev-build", "version": "1.0.0", "devDependencies": { - "@types/xml2js": "^0.0.33", - "xml2js": "^0.4.17" + "@types/azure": "^0.9.18", + "@types/documentdb": "^1.10.1", + "@types/es6-collections": "^0.5.30", + "@types/es6-promise": "0.0.32", + "@types/mime": "0.0.29", + "@types/node": "^7.0.13", + "@types/xml2js": "^0.0.33", + "azure-storage": "^2.1.0", + "documentdb": "^1.11.0", + "mime": "^1.3.4", + "minimist": "^1.2.0", + "typescript": "2.3.4", + "xml2js": "^0.4.17" + }, + "scripts": { + "compile": "tsc", + "watch": "tsc --watch", + "postinstall": "npm run compile" } -} \ No newline at end of file +} diff --git a/build/tfs/common/.gitignore b/build/tfs/common/.gitignore new file mode 100644 index 0000000000000..e94ecda764e2d --- /dev/null +++ b/build/tfs/common/.gitignore @@ -0,0 +1,2 @@ +node_modules/ +*.js \ No newline at end of file diff --git a/build/tfs/common/common.sh b/build/tfs/common/common.sh new file mode 100755 index 0000000000000..52f5353794345 --- /dev/null +++ b/build/tfs/common/common.sh @@ -0,0 +1,40 @@ +#!/bin/bash +set -e + +# set agent specific npm cache +if [ -n "$AGENT_WORKFOLDER" ] +then + export npm_config_cache="$AGENT_WORKFOLDER/npm-cache" + echo "Using npm cache: $npm_config_cache" +fi + +SUMMARY="Task;Duration"$'\n' +step() { + START=$SECONDS + TASK=$1; shift + echo "" + echo "*****************************************************************************" + echo "Start: $TASK" + echo "*****************************************************************************" + "$@" + + # Calculate total duration + TOTAL=$(echo "$SECONDS - $START" | bc) + M=$(echo "$TOTAL / 60" | bc) + S=$(echo "$TOTAL % 60" | bc) + DURATION="$(printf "%02d" $M):$(printf "%02d" $S)" + + echo "*****************************************************************************" + echo "End: $TASK, Total: $DURATION" + echo "*****************************************************************************" + SUMMARY="$SUMMARY$TASK;$DURATION"$'\n' +} + +done_steps() { + echo "" + echo "Build Summary" + echo "=============" + echo "${SUMMARY}" | column -t -s';' +} + +trap done_steps EXIT \ No newline at end of file diff --git a/build/tfs/common/enqueue.ts b/build/tfs/common/enqueue.ts new file mode 100644 index 0000000000000..61e1171f2eb66 --- /dev/null +++ b/build/tfs/common/enqueue.ts @@ -0,0 +1,85 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { execSync } from 'child_process'; +import { DocumentClient } from 'documentdb'; +import * as azure from 'azure-storage'; + +interface Asset { + platform: string; + type: string; + url: string; + mooncakeUrl: string; + hash: string; +} + +function queueSigningRequest(quality: string, commit: string): Promise { + const retryOperations = new azure.ExponentialRetryPolicyFilter(); + const queueSvc = azure + .createQueueService(process.env['AZURE_STORAGE_ACCOUNT_2'], process.env['AZURE_STORAGE_ACCESS_KEY_2']) + .withFilter(retryOperations); + + queueSvc.messageEncoder = new azure.QueueMessageEncoder.TextBase64QueueMessageEncoder(); + + const message = `${quality}/${commit}`; + + return new Promise((c, e) => queueSvc.createMessage('sign-darwin', message, err => err ? e(err) : c())); +} + +function isBuildSigned(quality: string, commit: string): Promise { + const client = new DocumentClient(process.env['AZURE_DOCUMENTDB_ENDPOINT'], { masterKey: process.env['AZURE_DOCUMENTDB_MASTERKEY'] }); + const collection = 'dbs/builds/colls/' + quality; + const updateQuery = { + query: 'SELECT TOP 1 * FROM c WHERE c.id = @id', + parameters: [{ name: '@id', value: commit }] + }; + + return new Promise((c, e) => { + client.queryDocuments(collection, updateQuery).toArray((err, results) => { + if (err) { return e(err); } + if (results.length !== 1) { return c(false); } + + const [release] = results; + const assets: Asset[] = release.assets; + const isSigned = assets.some(a => a.platform === 'darwin' && a.type === 'archive'); + + c(isSigned); + }); + }); +} + +async function waitForSignedBuild(quality: string, commit: string): Promise { + let retries = 0; + + while (retries < 180) { + if (await isBuildSigned(quality, commit)) { + return; + } + + await new Promise(c => setTimeout(c, 10000)); + retries++; + } + + throw new Error('Timed out waiting for signed build'); +} + +async function main(quality: string): Promise { + const commit = execSync('git rev-parse HEAD', { encoding: 'utf8' }).trim(); + + console.log(`Queueing signing request for '${quality}/${commit}'...`); + await queueSigningRequest(quality, commit); + + console.log('Waiting on signed build...'); + await waitForSignedBuild(quality, commit); + + console.log('Found signed build!'); +} + +main(process.argv[2]).catch(err => { + console.error(err); + process.exit(1); +}); \ No newline at end of file diff --git a/build/tfs/common/installDistro.ts b/build/tfs/common/installDistro.ts new file mode 100644 index 0000000000000..ec29450f011bd --- /dev/null +++ b/build/tfs/common/installDistro.ts @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +const cp = require('child_process'); +const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm'; + +function npmInstall(package: string, args: string[]): void { + const result = cp.spawnSync(npm, ['install', package, ...args], { + stdio: 'inherit' + }); + + if (result.error || result.status !== 0) { + process.exit(1); + } +} + +const product = require('../../../product.json'); +const dependencies = product.dependencies || {} as { [name: string]: string; }; +const [, , ...args] = process.argv; + +Object.keys(dependencies).forEach(name => { + const url = dependencies[name]; + npmInstall(url, args); +}); \ No newline at end of file diff --git a/build/tfs/common/publish.ts b/build/tfs/common/publish.ts new file mode 100644 index 0000000000000..ecf1148c2ff0b --- /dev/null +++ b/build/tfs/common/publish.ts @@ -0,0 +1,254 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import * as fs from 'fs'; +import { execSync } from 'child_process'; +import { Readable } from 'stream'; +import * as crypto from 'crypto'; +import * as azure from 'azure-storage'; +import * as mime from 'mime'; +import * as minimist from 'minimist'; +import { DocumentClient, NewDocument } from 'documentdb'; + +if (process.argv.length < 6) { + console.error('Usage: node publish.js '); + process.exit(-1); +} + +function hashStream(hashName: string, stream: Readable): Promise { + return new Promise((c, e) => { + const shasum = crypto.createHash(hashName); + + stream + .on('data', shasum.update.bind(shasum)) + .on('error', e) + .on('close', () => c(shasum.digest('hex'))); + }); +} + +interface Config { + id: string; + frozen: boolean; +} + +function createDefaultConfig(quality: string): Config { + return { + id: quality, + frozen: false + }; +} + +function getConfig(quality: string): Promise { + const client = new DocumentClient(process.env['AZURE_DOCUMENTDB_ENDPOINT'], { masterKey: process.env['AZURE_DOCUMENTDB_MASTERKEY'] }); + const collection = 'dbs/builds/colls/config'; + const query = { + query: `SELECT TOP 1 * FROM c WHERE c.id = @quality`, + parameters: [ + { name: '@quality', value: quality } + ] + }; + + return new Promise((c, e) => { + client.queryDocuments(collection, query).toArray((err, results) => { + if (err && err.code !== 409) { return e(err); } + + c(!results || results.length === 0 ? createDefaultConfig(quality) : results[0] as any as Config); + }); + }); +} + +interface Asset { + platform: string; + type: string; + url: string; + mooncakeUrl: string; + hash: string; + sha256hash: string; +} + +function createOrUpdate(commit: string, quality: string, platform: string, type: string, release: NewDocument, asset: Asset, isUpdate: boolean): Promise { + const client = new DocumentClient(process.env['AZURE_DOCUMENTDB_ENDPOINT'], { masterKey: process.env['AZURE_DOCUMENTDB_MASTERKEY'] }); + const collection = 'dbs/builds/colls/' + quality; + const updateQuery = { + query: 'SELECT TOP 1 * FROM c WHERE c.id = @id', + parameters: [{ name: '@id', value: commit }] + }; + + let updateTries = 0; + + function update(): Promise { + updateTries++; + + return new Promise((c, e) => { + client.queryDocuments(collection, updateQuery).toArray((err, results) => { + if (err) { return e(err); } + if (results.length !== 1) { return e(new Error('No documents')); } + + const release = results[0]; + + release.assets = [ + ...release.assets.filter((a: any) => !(a.platform === platform && a.type === type)), + asset + ]; + + if (isUpdate) { + release.updates[platform] = type; + } + + client.replaceDocument(release._self, release, err => { + if (err && err.code === 409 && updateTries < 5) { return c(update()); } + if (err) { return e(err); } + + console.log('Build successfully updated.'); + c(); + }); + }); + }); + } + + return new Promise((c, e) => { + client.createDocument(collection, release, err => { + if (err && err.code === 409) { return c(update()); } + if (err) { return e(err); } + + console.log('Build successfully published.'); + c(); + }); + }); +} + +async function assertContainer(blobService: azure.BlobService, quality: string): Promise { + await new Promise((c, e) => blobService.createContainerIfNotExists(quality, { publicAccessLevel: 'blob' }, err => err ? e(err) : c())); +} + +async function doesAssetExist(blobService: azure.BlobService, quality: string, blobName: string): Promise { + const existsResult = await new Promise((c, e) => blobService.doesBlobExist(quality, blobName, (err, r) => err ? e(err) : c(r))); + return existsResult.exists; +} + +async function uploadBlob(blobService: azure.BlobService, quality: string, blobName: string, file: string): Promise { + const blobOptions = { + contentType: mime.lookup(file), + cacheControl: 'max-age=31536000, public' + }; + + await new Promise((c, e) => blobService.createBlockBlobFromLocalFile(quality, blobName, file, blobOptions, err => err ? e(err) : c())); +} + +interface PublishOptions { + 'upload-only': boolean; +} + +async function publish(commit: string, quality: string, platform: string, type: string, name: string, version: string, _isUpdate: string, file: string, opts: PublishOptions): Promise { + const isUpdate = _isUpdate === 'true'; + + const queuedBy = process.env['BUILD_QUEUEDBY']; + const sourceBranch = process.env['BUILD_SOURCEBRANCH']; + const isReleased = quality === 'insider' + && /^master$|^refs\/heads\/master$/.test(sourceBranch) + && /Project Collection Service Accounts|Microsoft.VisualStudio.Services.TFS/.test(queuedBy); + + console.log('Publishing...'); + console.log('Quality:', quality); + console.log('Platforn:', platform); + console.log('Type:', type); + console.log('Name:', name); + console.log('Version:', version); + console.log('Commit:', commit); + console.log('Is Update:', isUpdate); + console.log('Is Released:', isReleased); + console.log('File:', file); + + const stream = fs.createReadStream(file); + const [sha1hash, sha256hash] = await Promise.all([hashStream('sha1', stream), hashStream('sha256', stream)]); + + console.log('SHA1:', sha1hash); + console.log('SHA256:', sha256hash); + + const blobName = commit + '/' + name; + const storageAccount = process.env['AZURE_STORAGE_ACCOUNT_2']; + + const blobService = azure.createBlobService(storageAccount, process.env['AZURE_STORAGE_ACCESS_KEY_2']) + .withFilter(new azure.ExponentialRetryPolicyFilter()); + + const mooncakeBlobService = azure.createBlobService(storageAccount, process.env['MOONCAKE_STORAGE_ACCESS_KEY'], `${storageAccount}.blob.core.chinacloudapi.cn`) + .withFilter(new azure.ExponentialRetryPolicyFilter()); + + await Promise.all([ + assertContainer(blobService, quality), + assertContainer(mooncakeBlobService, quality) + ]); + + const [blobExists, moooncakeBlobExists] = await Promise.all([ + doesAssetExist(blobService, quality, blobName), + doesAssetExist(mooncakeBlobService, quality, blobName) + ]); + + if (blobExists || moooncakeBlobExists) { + console.log(`Blob ${quality}, ${blobName} already exists, not publishing again.`); + return; + } + + console.log('Uploading blobs to Azure storage...'); + + await Promise.all([ + uploadBlob(blobService, quality, blobName, file), + uploadBlob(mooncakeBlobService, quality, blobName, file) + ]); + + console.log('Blobs successfully uploaded.'); + + const config = await getConfig(quality); + + console.log('Quality config:', config); + + const asset: Asset = { + platform: platform, + type: type, + url: `${process.env['AZURE_CDN_URL']}/${quality}/${blobName}`, + mooncakeUrl: `${process.env['MOONCAKE_CDN_URL']}/${quality}/${blobName}`, + hash: sha1hash, + sha256hash + }; + + const release = { + id: commit, + timestamp: (new Date()).getTime(), + version, + isReleased: config.frozen ? false : isReleased, + sourceBranch, + queuedBy, + assets: [], + updates: {} as any + }; + + if (!opts['upload-only']) { + release.assets.push(asset); + + if (isUpdate) { + release.updates[platform] = type; + } + } + + await createOrUpdate(commit, quality, platform, type, release, asset, isUpdate); +} + +function main(): void { + const opts = minimist(process.argv.slice(2), { + boolean: ['upload-only'] + }); + + const [quality, platform, type, name, version, _isUpdate, file] = opts._; + const commit = execSync('git rev-parse HEAD', { encoding: 'utf8' }).trim(); + + publish(commit, quality, platform, type, name, version, _isUpdate, file, opts).catch(err => { + console.error(err); + process.exit(1); + }); +} + +main(); diff --git a/build/tfs/darwin/build.sh b/build/tfs/darwin/build.sh new file mode 100755 index 0000000000000..6397b310dca98 --- /dev/null +++ b/build/tfs/darwin/build.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +. ./scripts/env.sh +. ./build/tfs/common/common.sh + +export VSCODE_MIXIN_PASSWORD="$1" +export AZURE_STORAGE_ACCESS_KEY="$2" +export AZURE_STORAGE_ACCESS_KEY_2="$3" +export MOONCAKE_STORAGE_ACCESS_KEY="$4" +export AZURE_DOCUMENTDB_MASTERKEY="$5" +VSO_PAT="$6" + +echo "machine monacotools.visualstudio.com password $VSO_PAT" > ~/.netrc + +step "Install dependencies" \ + npm install + +step "Mix in repository from vscode-distro" \ + npm run gulp -- mixin + +step "Install distro dependencies" \ + node build/tfs/common/installDistro.js + +step "Build minified & upload source maps" \ + npm run gulp -- --max_old_space_size=4096 vscode-darwin-min upload-vscode-sourcemaps + +step "Run unit tests" \ + ./scripts/test.sh --build --reporter dot + +step "Run integration tests" \ + ./scripts/test-integration.sh + +step "Publish release" \ + ./build/tfs/darwin/release.sh \ No newline at end of file diff --git a/build/tfs/darwin/release.sh b/build/tfs/darwin/release.sh new file mode 100755 index 0000000000000..24ed4c30a78b5 --- /dev/null +++ b/build/tfs/darwin/release.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +. ./scripts/env.sh +. ./build/tfs/common/common.sh + +(cd $BUILD_SOURCESDIRECTORY/build/tfs/common && \ + step "Install build dependencies" \ + npm i) + +REPO=`pwd` +ZIP=$REPO/../VSCode-darwin-selfsigned.zip +UNSIGNEDZIP=$REPO/../VSCode-darwin-unsigned.zip +BUILD=$REPO/../VSCode-darwin +PACKAGEJSON=`ls $BUILD/*.app/Contents/Resources/app/package.json` +VERSION=`node -p "require(\"$PACKAGEJSON\").version"` + +rm -rf $UNSIGNEDZIP +(cd $BUILD && \ + step "Create unsigned archive" \ + zip -r -X -y $UNSIGNEDZIP *) + +step "Upload unsigned archive" \ + node build/tfs/common/publish.js --upload-only $VSCODE_QUALITY darwin archive-unsigned VSCode-darwin-$VSCODE_QUALITY-unsigned.zip $VERSION false $UNSIGNEDZIP + +step "Sign build" \ + node build/tfs/common/enqueue.js $VSCODE_QUALITY \ No newline at end of file diff --git a/build/tfs/darwin/smoketest.sh b/build/tfs/darwin/smoketest.sh new file mode 100755 index 0000000000000..f750f4e159c2f --- /dev/null +++ b/build/tfs/darwin/smoketest.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +. ./scripts/env.sh +. ./build/tfs/common/common.sh + +export VSCODE_MIXIN_PASSWORD="$1" +VSO_PAT="$2" + +echo "machine monacotools.visualstudio.com password $VSO_PAT" > ~/.netrc + +step "Install dependencies" \ + npm install + +step "Mix in repository from vscode-distro" \ + npm run gulp -- mixin + +step "Install distro dependencies" \ + node build/tfs/common/installDistro.js + +step "Build minified & upload source maps" \ + npm run gulp -- --max_old_space_size=4096 vscode-darwin-min + +step "Run smoke test" \ + pushd test/smoke + npm install + npm test -- --latest "$AGENT_BUILDDIRECTORY/VSCode-darwin/Visual Studio Code - Insiders.app/Contents/MacOS/Electron" + popd \ No newline at end of file diff --git a/build/tfs/linux/.gitignore b/build/tfs/linux/.gitignore new file mode 100644 index 0000000000000..0f46fa7086ac3 --- /dev/null +++ b/build/tfs/linux/.gitignore @@ -0,0 +1 @@ +pat \ No newline at end of file diff --git a/build/tfs/linux/Dockerfile b/build/tfs/linux/Dockerfile new file mode 100644 index 0000000000000..eba237b8a3724 --- /dev/null +++ b/build/tfs/linux/Dockerfile @@ -0,0 +1,39 @@ +FROM microsoft/vsts-agent:ubuntu-14.04-standard +MAINTAINER Joao Moreno + +RUN dpkg --add-architecture i386 +RUN apt-get update + +# Dependencies +RUN apt-get install -y build-essential +RUN apt-get install -y gcc-multilib g++-multilib +RUN apt-get install -y zip +RUN apt-get install -y rpm +RUN apt-get install -y createrepo +RUN apt-get install -y python-gtk2 +RUN apt-get install -y jq +RUN apt-get install -y xvfb +RUN apt-get install -y fakeroot +RUN apt-get install -y libgtk2.0-0 libgtk2.0-0:i386 +RUN apt-get install -y libgconf-2-4 libgconf-2-4:i386 +RUN apt-get install -y libnss3 libnss3:i386 +RUN apt-get install -y libasound2 libasound2:i386 +RUN apt-get install -y libxtst6 libxtst6:i386 +RUN apt-get install -y libfuse2 +RUN apt-get install -y libnotify-bin +RUN apt-get install -y libnotify4:i386 +RUN apt-get install -y libx11-dev libx11-dev:i386 +RUN apt-get install -y libxkbfile-dev:i386 +RUN apt-get install -y libxss1 libxss1:i386 +RUN apt-get install -y libx11-xcb-dev libx11-xcb-dev:i386 +RUN apt-get install -y libgl1-mesa-glx:i386 libgl1-mesa-dri:i386 +RUN apt-get install -y libxkbfile-dev +RUN apt-get install -y bc bsdmainutils + +# Xvfb +# Thanks https://medium.com/@griggheo/running-headless-selenium-webdriver-tests-in-docker-containers-342fdbabf756 +ADD xvfb.init /etc/init.d/xvfb +RUN chmod +x /etc/init.d/xvfb +RUN update-rc.d xvfb defaults + +CMD (service xvfb start; export DISPLAY=:10; ./start.sh) \ No newline at end of file diff --git a/build/tfs/linux/build-ia32.sh b/build/tfs/linux/build-ia32.sh new file mode 100755 index 0000000000000..0b0f1c2a45800 --- /dev/null +++ b/build/tfs/linux/build-ia32.sh @@ -0,0 +1,3 @@ +#!/bin/bash +set -e +./build/tfs/linux/build.sh ia32 "$@" \ No newline at end of file diff --git a/build/tfs/linux/build-x64.sh b/build/tfs/linux/build-x64.sh new file mode 100755 index 0000000000000..fb5b38e02b3b6 --- /dev/null +++ b/build/tfs/linux/build-x64.sh @@ -0,0 +1,3 @@ +#!/bin/bash +set -e +./build/tfs/linux/build.sh x64 "$@" \ No newline at end of file diff --git a/build/tfs/linux/build.sh b/build/tfs/linux/build.sh new file mode 100755 index 0000000000000..a2e0010ed038f --- /dev/null +++ b/build/tfs/linux/build.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +. ./scripts/env.sh +. ./build/tfs/common/common.sh + +export ARCH="$1" +export VSCODE_MIXIN_PASSWORD="$2" +export AZURE_STORAGE_ACCESS_KEY="$3" +export AZURE_STORAGE_ACCESS_KEY_2="$4" +export MOONCAKE_STORAGE_ACCESS_KEY="$5" +export AZURE_DOCUMENTDB_MASTERKEY="$6" +export LINUX_REPO_PASSWORD="$7" +VSO_PAT="$8" + +echo "machine monacotools.visualstudio.com password $VSO_PAT" > ~/.netrc + +step "Install dependencies" \ + npm install --arch=$ARCH --unsafe-perm + +step "Mix in repository from vscode-distro" \ + npm run gulp -- mixin + +step "Get Electron" \ + npm run gulp -- "electron-$ARCH" + +step "Install distro dependencies" \ + node build/tfs/common/installDistro.js --arch=$ARCH + +step "Build minified" \ + npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-min" + +step "Run unit tests" \ + ./scripts/test.sh --build --reporter dot + +step "Publish release" \ + ./build/tfs/linux/release.sh \ No newline at end of file diff --git a/build/tfs/linux/release.sh b/build/tfs/linux/release.sh new file mode 100755 index 0000000000000..40d68aee73fc1 --- /dev/null +++ b/build/tfs/linux/release.sh @@ -0,0 +1,86 @@ +#!/bin/bash + +. ./scripts/env.sh +. ./build/tfs/common/common.sh + +step "Build Debian package" \ + npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-build-deb" + +step "Build RPM package" \ + npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-build-rpm" + +(cd $BUILD_SOURCESDIRECTORY/build/tfs/common && \ + step "Install build dependencies" \ + npm install --unsafe-perm) + +# Variables +PLATFORM_LINUX="linux-$ARCH" +PLATFORM_DEB="linux-deb-$ARCH" +PLATFORM_RPM="linux-rpm-$ARCH" +[[ "$ARCH" == "ia32" ]] && DEB_ARCH="i386" || DEB_ARCH="amd64" +[[ "$ARCH" == "ia32" ]] && RPM_ARCH="i386" || RPM_ARCH="x86_64" +REPO="`pwd`" +ROOT="$REPO/.." +BUILDNAME="VSCode-$PLATFORM_LINUX" +BUILD="$ROOT/$BUILDNAME" +BUILD_VERSION="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/ | sed -e 's/code-[a-z]*_//g' -e 's/\.deb$//g')" +[ -z "$VSCODE_QUALITY" ] && TARBALL_FILENAME="code-$BUILD_VERSION.tar.gz" || TARBALL_FILENAME="code-$VSCODE_QUALITY-$BUILD_VERSION.tar.gz" +TARBALL_PATH="$ROOT/$TARBALL_FILENAME" +PACKAGEJSON="$BUILD/resources/app/package.json" +VERSION=$(node -p "require(\"$PACKAGEJSON\").version") + +rm -rf $ROOT/code-*.tar.* +(cd $ROOT && \ + step "Create tar.gz archive" \ + tar -czf $TARBALL_PATH $BUILDNAME) + +step "Publish tar.gz archive" \ + node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_LINUX archive-unsigned $TARBALL_FILENAME $VERSION true $TARBALL_PATH + +DEB_FILENAME="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/)" +DEB_PATH="$REPO/.build/linux/deb/$DEB_ARCH/deb/$DEB_FILENAME" + +step "Publish Debian package" \ + node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_DEB package $DEB_FILENAME $VERSION true $DEB_PATH + +RPM_FILENAME="$(ls $REPO/.build/linux/rpm/$RPM_ARCH/ | grep .rpm)" +RPM_PATH="$REPO/.build/linux/rpm/$RPM_ARCH/$RPM_FILENAME" + +step "Publish RPM package" \ + node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_RPM package $RPM_FILENAME $VERSION true $RPM_PATH + +if [ -z "$VSCODE_QUALITY" ]; then + echo "VSCODE_QUALITY is not set, skipping repo package publish" +else + if [ "$BUILD_SOURCEBRANCH" = "master" ] || [ "$BUILD_SOURCEBRANCH" = "refs/heads/master" ]; then + if [[ $BUILD_QUEUEDBY = *"Project Collection Service Accounts"* || $BUILD_QUEUEDBY = *"Microsoft.VisualStudio.Services.TFS"* ]]; then + # Get necessary information + pushd $REPO && COMMIT_HASH=$(git rev-parse HEAD) && popd + PACKAGE_NAME="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/ | sed -e 's/_.*//g')" + DEB_URL="https://az764295.vo.msecnd.net/$VSCODE_QUALITY/$COMMIT_HASH/$DEB_FILENAME" + RPM_URL="https://az764295.vo.msecnd.net/$VSCODE_QUALITY/$COMMIT_HASH/$RPM_FILENAME" + PACKAGE_VERSION="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/ | sed -e 's/code-[a-z]*_//g' -e 's/\_.*$//g')" + # Write config files needed by API, use eval to force environment variable expansion + DIRNAME=$(dirname $(readlink -f $0)) + pushd $DIRNAME + # Submit to apt repo + if [ "$DEB_ARCH" = "amd64" ]; then + eval echo '{ \"server\": \"azure-apt-cat.cloudapp.net\", \"protocol\": \"https\", \"port\": \"443\", \"repositoryId\": \"58a4adf642421134a1a48d1a\", \"username\": \"$LINUX_REPO_USERNAME\", \"password\": \"$LINUX_REPO_PASSWORD\" }' > apt-config.json + eval echo '{ \"name\": \"$PACKAGE_NAME\", \"version\": \"$PACKAGE_VERSION\", \"repositoryId\": \"58a4adf642421134a1a48d1a\", \"sourceUrl\": \"$DEB_URL\" }' > apt-addpkg.json + echo "Submitting apt-addpkg.json:" + cat apt-addpkg.json + + step "Publish to repositories" \ + ./repoapi_client.sh -config apt-config.json -addpkg apt-addpkg.json + fi + # Submit to yum repo (disabled as it's manual until signing is automated) + # eval echo '{ \"server\": \"azure-apt-cat.cloudapp.net\", \"protocol\": \"https\", \"port\": \"443\", \"repositoryId\": \"58a4ae3542421134a1a48d1b\", \"username\": \"$LINUX_REPO_USERNAME\", \"password\": \"$LINUX_REPO_PASSWORD\" }' > yum-config.json + # eval echo '{ \"name\": \"$PACKAGE_NAME\", \"version\": \"$PACKAGE_VERSION\", \"repositoryId\": \"58a4ae3542421134a1a48d1b\", \"sourceUrl\": \"$RPM_URL\" }' > yum-addpkg.json + # echo "Submitting yum-addpkg.json:" + # cat yum-addpkg.json + # ./repoapi_client.sh -config yum-config.json -addpkg yum-addpkg.json + popd + echo "To check repo publish status run ./repoapi_client.sh -config config.json -check " + fi + fi +fi diff --git a/build/tfs/linux/repoapi_client.sh b/build/tfs/linux/repoapi_client.sh new file mode 100755 index 0000000000000..b214ef10726a6 --- /dev/null +++ b/build/tfs/linux/repoapi_client.sh @@ -0,0 +1,262 @@ +#!/bin/bash -e +# This is a VERY basic script for Create/Delete operations on repos and packages +# +cmd=$1 +urls=urls.txt +defaultPackageFile=new_package.json +defaultRepoFile=new_repo.json + +function Bail +{ + echo "ERROR: $@" + exit 1 +} + +function BailIfFileMissing { + file="$1" + if [ ! -f "$file" ]; then + Bail "File $file does not exist" + fi +} + +function Usage { + echo "USAGE: Manage repos and packages in an apt repository" + echo "$0 -config FILENAME -listrepos | -listpkgs | -addrepo FILENAME | -addpkg FILENAME |" + echo "-addpkgs FILENAME | -check ID | -delrepo REPOID | -delpkg PKGID" + echo -e "\t-config FILENAME : JSON file containing API server name and creds" + echo -e "\t-listrepos : List repositories" + echo -e "\t-listpkgs [REGEX] : List packages, optionally filter by REGEX" + echo -e "\t-addrepo FILENAME : Create a new repo using the specified JSON file" + echo -e "\t-addpkg FILENAME : Add package to repo using the specified JSON file" + echo -e "\t-addpkgs FILENAME : Add packages to repo using urls contained in FILENAME" + echo -e "\t-check ID : Check upload operation by ID" + echo -e "\t-delrepo REPOID : Delete the specified repo by ID" + echo -e "\t-delpkg PKGID : Delete the specified package by ID" + exit 1 +} + +function ParseFromJson { + if [ -z "$secretContents" ]; then + Bail "Unable to parse value because no JSON contents were specified" + elif [ -z "$1" ]; then + Bail "Unable to parse value from JSON because no key was specified" + fi + # Write value directly to stdout to be used by caller + echo $secretContents | jq "$1" | tr -d '"' +} + +function ParseConfigFile { + configFile="$1" + if [ -z "$configFile" ]; then + echo "Must specify -config option" + Usage + fi + BailIfFileMissing "$configFile" + secretContents=$(cat "$configFile") + + server=$(ParseFromJson .server) + protocol=$(ParseFromJson .protocol) + port=$(ParseFromJson .port) + repositoryId=$(ParseFromJson .repositoryId) + user=$(ParseFromJson .username) + pass=$(ParseFromJson .password) + baseurl="$protocol://$user:$pass@$server:$port" +} + +# List Repositories +function ListRepositories +{ + echo "Fetching repo list from $server..." + curl -k "$baseurl/v1/repositories" | sed 's/,/,\n/g' | sed 's/^"/\t"/g' + echo "" +} + +# List packages, using $1 as a regex to filter results +function ListPackages +{ + echo "Fetching package list from $server" + curl -k "$baseurl/v1/packages" | sed 's/{/\n{/g' | egrep "$1" | sed 's/,/,\n/g' | sed 's/^"/\t"/g' + echo "" +} + +# Create a new Repo using the specified JSON file +function AddRepo +{ + repoFile=$1 + if [ -z $repoFile ]; then + Bail "Error: Must specify a JSON-formatted file. Reference $defaultRepoFile.template" + fi + if [ ! -f $repoFile ]; then + Bail "Error: Cannot create repo - $repoFile does not exist" + fi + packageUrl=$(grep "url" $repoFile | head -n 1 | awk '{print $2}' | tr -d ',') + echo "Creating new repo on $server [$packageUrl]" + curl -i -k "$baseurl/v1/repositories" --data @./$repoFile -H "Content-Type: application/json" + echo "" +} + +# Upload a single package using the specified JSON file +function AddPackage +{ + packageFile=$1 + if [ -z $packageFile ]; then + Bail "Error: Must specify a JSON-formatted file. Reference $defaultPackageFile.template" + fi + if [ ! -f $packageFile ]; then + Bail "Error: Cannot add package - $packageFile does not exist" + fi + packageUrl=$(grep "sourceUrl" $packageFile | head -n 1 | awk '{print $2}') + echo "Adding package to $server [$packageUrl]" + curl -i -k "$baseurl/v1/packages" --data @./$packageFile -H "Content-Type: application/json" + echo "" +} + +# Upload a single package by dynamically creating a JSON file using a provided URL +function AddPackageByUrl +{ + url=$(echo "$1") + if [ -z "$url" ]; then + Bail "Unable to publish package because no URL was specified" + fi + tmpFile=$(mktemp) + tmpOut=$(mktemp) + if ! wget -q "$url" -O $tmpFile; then + rm -f $tmpFile $tmpFile + Bail "Unable to download URL $url" + elif dpkg -I $tmpFile > $tmpOut 2> /dev/null; then + echo "File is deb format" + pkgName=$(grep "^\s*Package:" $tmpOut | awk '{print $2}') + pkgVer=$(grep "^\s*Version:" $tmpOut | awk '{print $2}') + elif rpm -qpi $tmpFile > $tmpOut 2> /dev/null; then + echo "File is rpm format" + pkgName=$(egrep "^Name" $tmpOut | tr -d ':' | awk '{print $2}') + pkgVer=$(egrep "^Version" $tmpOut | tr -d ':' | awk '{print $2}') + else + rm -f $tmpFile $tmpOut + Bail "File is not a valid deb/rpm package $url" + fi + + rm -f $tmpFile $tmpOut + if [ -z "$pkgName" ]; then + Bail "Unable to parse package name for $url" + elif [ -z "$pkgVer" ]; then + Bail "Unable to parse package version number for $url" + fi + + # Create Package .json file + escapedUrl=$(echo "$url" | sed 's/\//\\\//g' | sed 's/\&/\\\&/g') + cp $defaultPackageFile.template $defaultPackageFile + sed -i "s/PACKAGENAME/$pkgName/g" $defaultPackageFile + sed -i "s/PACKAGEVERSION/$pkgVer/g" $defaultPackageFile + sed -i "s/PACKAGEURL/$escapedUrl/g" $defaultPackageFile + sed -i "s/REPOSITORYID/$repositoryId/g" $defaultPackageFile + # Perform Upload + AddPackage $defaultPackageFile + # Cleanup + rm -f $defaultPackageFile +} + +# Upload multiple packages by reading urls line-by-line from the specified file +function AddPackages +{ + urlFile=$1 + if [ -z $urlFile ]; then + Bail "Must specify a flat text file containing one or more URLs" + fi + if [ ! -f $urlFile ]; then + Bail "Cannot add packages. File $urlFile does not exist" + fi + for url in $(cat $urlFile); do + if [ -n "$url" ]; then + AddPackageByUrl "$url" + fi + sleep 5 + done +} + +# Check upload by ID +function CheckUpload { + id=$1 + if [ -z "$id" ]; then + Bail "Must specify an ID" + fi + curl -k $baseurl/v1/packages/queue/$id + echo "" +} + +# Delete the specified repo +function DeleteRepo +{ + repoId=$1 + if [ -z $repoId ]; then + Bail "Please specify repository ID. Run -listrepos for a list of IDs" + fi + curl -I -k -X DELETE "$baseurl/v1/repositories/$repoId" +} + +# Delete the specified package +function DeletePackage +{ + packageId=$1 + if [ -z $packageId ]; then + Bail "Please specify package ID. Run -listpkgs for a list of IDs" + fi + echo Removing pkgId $packageId from repo $repositoryId + curl -I -k -X DELETE "$baseurl/v1/packages/$packageId" +} + +# Parse params +# Not using getopts because this uses multi-char flags +operation= +while (( "$#" )); do + if [[ "$1" == "-config" ]]; then + shift + configFile="$1" + elif [[ "$1" == "-listrepos" ]]; then + operation=ListRepositories + elif [[ "$1" == "-listpkgs" ]]; then + operation=ListPackages + if [ -n "$2" ]; then + shift + operand="$1" + fi + elif [[ "$1" == "-addrepo" ]]; then + operation=AddRepo + shift + operand="$1" + elif [[ "$1" == "-addpkg" ]]; then + operation=AddPackage + shift + operand="$1" + elif [[ "$1" == "-addpkgs" ]]; then + operation=AddPackages + shift + operand="$1" + elif [[ "$1" == "-check" ]]; then + operation=CheckUpload + shift + operand="$1" + elif [[ "$1" == "-delrepo" ]]; then + operation=DeleteRepo + shift + operand="$1" + elif [[ "$1" == "-delpkg" ]]; then + operation=DeletePackage + shift + operand="$1" + else + Usage + fi + shift +done + +echo "Performing $operation $operand" +# Parse config file +ParseConfigFile "$configFile" + +# Exit if no operation was specified +if [ -z "operation" ]; then + Usage +fi + +$operation "$operand" diff --git a/build/tfs/linux/run-agent.sh b/build/tfs/linux/run-agent.sh new file mode 100755 index 0000000000000..9e09eed144701 --- /dev/null +++ b/build/tfs/linux/run-agent.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +if [ ! -f pat ]; then + echo "Error: file pat not found" + exit 1 +fi + +docker run \ + -e VSTS_ACCOUNT="monacotools" \ + -e VSTS_TOKEN="$(cat pat)" \ + -e VSTS_AGENT="tb-lnx-local" \ + -e VSTS_POOL=linux \ + -e VSTS_WORK="/var/vsts/work" \ + --name "tb-lnx-local" \ + -it joaomoreno/vscode-vso-agent \ No newline at end of file diff --git a/build/tfs/linux/smoketest.sh b/build/tfs/linux/smoketest.sh new file mode 100644 index 0000000000000..4d1cf649e7147 --- /dev/null +++ b/build/tfs/linux/smoketest.sh @@ -0,0 +1,45 @@ +#!/bin/bash +set -e + +. ./scripts/env.sh +. ./build/tfs/common/common.sh + +export ARCH="$1" +export VSCODE_MIXIN_PASSWORD="$2" +VSO_PAT="$3" + +echo "machine monacotools.visualstudio.com password $VSO_PAT" > ~/.netrc + +step "Install dependencies" \ + npm install --arch=$ARCH --unsafe-perm + +step "Mix in repository from vscode-distro" \ + npm run gulp -- mixin + +step "Get Electron" \ + npm run gulp -- "electron-$ARCH" + +step "Install distro dependencies" \ + node build/tfs/common/installDistro.js --arch=$ARCH + +step "Build minified" \ + npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-min" + +function configureEnvironment { + id -u testuser &>/dev/null || (useradd -m testuser; chpasswd <<< testuser:testpassword) + sudo -i -u testuser git config --global user.name "VS Code Agent" + sudo -i -u testuser git config --global user.email "monacotools@microsoft.com" + chown -R testuser $AGENT_BUILDDIRECTORY +} + +function runTest { + pushd test/smoke + npm install + sudo -u testuser -H xvfb-run -a -s "-screen 0 1024x768x8" npm test -- --latest "$AGENT_BUILDDIRECTORY/VSCode-linux-ia32/code-insiders" + popd +} + +step "Configure environment" configureEnvironment + +step "Run smoke test" runTest + diff --git a/build/tfs/linux/xvfb.init b/build/tfs/linux/xvfb.init new file mode 100644 index 0000000000000..4d77d253a2649 --- /dev/null +++ b/build/tfs/linux/xvfb.init @@ -0,0 +1,53 @@ +#!/bin/bash +# +# /etc/rc.d/init.d/xvfbd +# +# chkconfig: 345 95 28 +# description: Starts/Stops X Virtual Framebuffer server +# processname: Xvfb +# +### BEGIN INIT INFO +# Provides: xvfb +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start xvfb at boot time +# Description: Enable xvfb provided by daemon. +### END INIT INFO + +[ "${NETWORKING}" = "no" ] && exit 0 + +PROG="/usr/bin/Xvfb" +PROG_OPTIONS=":10 -ac" +PROG_OUTPUT="/tmp/Xvfb.out" + +case "$1" in + start) + echo "Starting : X Virtual Frame Buffer " + $PROG $PROG_OPTIONS>>$PROG_OUTPUT 2>&1 & + disown -ar + ;; + stop) + echo "Shutting down : X Virtual Frame Buffer" + killproc $PROG + RETVAL=$? + [ $RETVAL -eq 0 ] && /bin/rm -f /var/lock/subsys/Xvfb + /var/run/Xvfb.pid + echo + ;; + restart|reload) + $0 stop + $0 start + RETVAL=$? + ;; + status) + status Xvfb + RETVAL=$? + ;; + *) + echo $"Usage: $0 (start|stop|restart|reload|status)" + exit 1 +esac + +exit $RETVAL \ No newline at end of file diff --git a/build/tfs/win32/1_build.ps1 b/build/tfs/win32/1_build.ps1 new file mode 100644 index 0000000000000..34b44826fc09f --- /dev/null +++ b/build/tfs/win32/1_build.ps1 @@ -0,0 +1,46 @@ +Param( + [string]$arch, + [string]$mixinPassword, + [string]$vsoPAT +) + +. .\scripts\env.ps1 +. .\build\tfs\win32\lib.ps1 + +# Create a _netrc file to download distro dependencies +# In order to get _netrc to work, we need a HOME variable setup +"machine monacotools.visualstudio.com password ${vsoPAT}" | Out-File "$env:HOME\_netrc" -Encoding ASCII + +# Set the right architecture +$env:npm_config_arch="$arch" + +step "Install dependencies" { + exec { & npm install } +} + +$env:VSCODE_MIXIN_PASSWORD = $mixinPassword +step "Mix in repository from vscode-distro" { + exec { & npm run gulp -- mixin } +} + +step "Get Electron" { + exec { & npm run gulp -- "electron-$global:arch" } +} + +step "Install distro dependencies" { + exec { & node build\tfs\common\installDistro.js } +} + +step "Build minified" { + exec { & npm run gulp -- --max_old_space_size=4096 "vscode-win32-$global:arch-min" } +} + +step "Run unit tests" { + exec { & .\scripts\test.bat --build --reporter dot } +} + +# step "Run integration tests" { +# exec { & .\scripts\test-integration.bat } +# } + +done \ No newline at end of file diff --git a/build/tfs/win32/2_package.ps1 b/build/tfs/win32/2_package.ps1 new file mode 100644 index 0000000000000..63d7c9cc4129e --- /dev/null +++ b/build/tfs/win32/2_package.ps1 @@ -0,0 +1,11 @@ +Param( + [string]$arch +) + +. .\build\tfs\win32\lib.ps1 + +step "Create archive and setup package" { + exec { & npm run gulp -- --max_old_space_size=4096 "vscode-win32-$global:arch-archive" "vscode-win32-$global:arch-setup" } +} + +done \ No newline at end of file diff --git a/build/tfs/win32/3_upload.ps1 b/build/tfs/win32/3_upload.ps1 new file mode 100644 index 0000000000000..3f23b6d1831bd --- /dev/null +++ b/build/tfs/win32/3_upload.ps1 @@ -0,0 +1,34 @@ +Param( + [string]$arch, + [string]$storageKey, + [string]$mooncakeStorageKey, + [string]$documentDbKey +) + +. .\build\tfs\win32\lib.ps1 + +$Repo = "$(pwd)" +$Root = "$Repo\.." +$Exe = "$Repo\.build\win32-$arch\setup\VSCodeSetup.exe" +$Zip = "$Repo\.build\win32-$arch\archive\VSCode-win32-$arch.zip" +$Build = "$Root\VSCode-win32-$arch" + +# get version +$PackageJson = Get-Content -Raw -Path "$Build\resources\app\package.json" | ConvertFrom-Json +$Version = $PackageJson.version +$Quality = "$env:VSCODE_QUALITY" +$env:AZURE_STORAGE_ACCESS_KEY_2 = $storageKey +$env:MOONCAKE_STORAGE_ACCESS_KEY = $mooncakeStorageKey +$env:AZURE_DOCUMENTDB_MASTERKEY = $documentDbKey + +$assetPlatform = if ($arch -eq "ia32") { "win32" } else { "win32-x64" } + +step "Publish archive" { + exec { & node build/tfs/common/publish.js $Quality "$global:assetPlatform-archive" archive "VSCode-win32-$global:arch-$Version.zip" $Version true $Zip } +} + +step "Publish setup package" { + exec { & node build/tfs/common/publish.js $Quality "$global:assetPlatform" setup "VSCodeSetup-$global:arch-$Version.exe" $Version true $Exe } +} + +done \ No newline at end of file diff --git a/build/tfs/win32/lib.ps1 b/build/tfs/win32/lib.ps1 new file mode 100644 index 0000000000000..39a3bade9dade --- /dev/null +++ b/build/tfs/win32/lib.ps1 @@ -0,0 +1,47 @@ +# stop when there's an error +$ErrorActionPreference = 'Stop' + +$env:HOME=$env:USERPROFILE + +if (Test-Path env:AGENT_WORKFOLDER) { + $env:HOME="${env:AGENT_WORKFOLDER}\home" + $env:npm_config_cache="${env:HOME}\npm-cache" + $env:npm_config_devdir="${env:HOME}\npm-devdir" + New-Item -Path "$env:HOME" -Type directory -Force | out-null + New-Item -Path "$env:npm_config_cache" -Type directory -Force | out-null +} + +# throw when a process exits with something other than 0 +function exec([scriptblock]$cmd, [string]$errorMessage = "Error executing command: " + $cmd) { + & $cmd + if ($LastExitCode -ne 0) { + throw $errorMessage + } +} + +$Summary = @() +function step($Task, $Step) { + echo "" + echo "*****************************************************************************" + echo "Start: $Task" + echo "*****************************************************************************" + echo "" + + $Stopwatch = [Diagnostics.Stopwatch]::StartNew() + Invoke-Command $Step + $Stopwatch.Stop() + $Formatted = "{0:g}" -f $Stopwatch.Elapsed + + echo "*****************************************************************************" + echo "End: $Task, Total: $Formatted" + echo "*****************************************************************************" + + $global:Summary += @{ "$Task" = $Formatted } +} + +function done() { + echo "" + echo "Build Summary" + echo "=============" + $global:Summary | Format-Table @{L="Task";E={$_.Name}}, @{L="Duration";E={$_.Value}} +} \ No newline at end of file diff --git a/build/tfs/win32/smoketest.ps1 b/build/tfs/win32/smoketest.ps1 new file mode 100644 index 0000000000000..bfc8b94a933fd --- /dev/null +++ b/build/tfs/win32/smoketest.ps1 @@ -0,0 +1,46 @@ +Param( + [string]$arch, + [string]$mixinPassword, + [string]$vsoPAT +) + +. .\scripts\env.ps1 +. .\build\tfs\win32\lib.ps1 + +# Create a _netrc file to download distro dependencies +# In order to get _netrc to work, we need a HOME variable setup +$env:HOME = $env:USERPROFILE +"machine monacotools.visualstudio.com password ${vsoPAT}" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII + +# Set the right architecture +$env:npm_config_arch = "$arch" + +step "Install dependencies" { + exec { & npm install } +} + +$env:VSCODE_MIXIN_PASSWORD = $mixinPassword +step "Mix in repository from vscode-distro" { + exec { & npm run gulp -- mixin } +} + +step "Get Electron" { + exec { & npm run gulp -- "electron-$global:arch" } +} + +step "Install distro dependencies" { + exec { & node build\tfs\common\installDistro.js } +} + +step "Build minified" { + exec { & npm run gulp -- --max_old_space_size=4096 "vscode-win32-$global:arch-min" } +} + +step "Run smoke test" { + exec { & Push-Location test\smoke } + exec { & npm install } + exec { & npm test -- --latest "$env:AGENT_BUILDDIRECTORY\VSCode-win32-$global:arch\Code - Insiders.exe" } + exec { & Pop-Location } +} + +done \ No newline at end of file diff --git a/build/tsconfig.json b/build/tsconfig.json index 59a73844e1456..04f3963055d58 100644 --- a/build/tsconfig.json +++ b/build/tsconfig.json @@ -1,13 +1,15 @@ { "compilerOptions": { + "target": "es5", "module": "commonjs", "noImplicitAny": false, "removeComments": false, "preserveConstEnums": true, - "target": "es5", "sourceMap": false, "experimentalDecorators": true, - "noLib": true, "newLine": "LF" - } + }, + "exclude": [ + "node_modules/**" + ] } \ No newline at end of file diff --git a/build/tslint.json b/build/tslint.json new file mode 100644 index 0000000000000..e269a87c0e65f --- /dev/null +++ b/build/tslint.json @@ -0,0 +1,13 @@ +{ + "rules": { + "no-unused-expression": true, + "no-duplicate-variable": true, + "no-unused-variable": true, + "curly": true, + "class-name": true, + "semicolon": [ + "always" + ], + "triple-equals": true + } +} \ No newline at end of file diff --git a/build/win32/code.iss b/build/win32/code.iss index 1eb3241d9f483..2051718f9cf1e 100644 --- a/build/win32/code.iss +++ b/build/win32/code.iss @@ -14,7 +14,7 @@ AppUpdatesURL=https://code.visualstudio.com/ DefaultDirName={pf}\{#DirName} DefaultGroupName={#NameLong} AllowNoIcons=yes -OutputDir={#RepoDir}\.build\win32\setup +OutputDir={#OutputDir} OutputBaseFilename=VSCodeSetup Compression=lzma SolidCompression=yes @@ -30,6 +30,8 @@ SourceDir={#SourceDir} AppVersion={#Version} VersionInfoVersion={#RawVersion} ShowLanguageDialog=auto +ArchitecturesAllowed={#ArchitecturesAllowed} +ArchitecturesInstallIn64BitMode={#ArchitecturesInstallIn64BitMode} [Languages] Name: "english"; MessagesFile: "compiler:Default.isl,{#RepoDir}\build\win32\i18n\messages.en.isl" {#LocalizedLanguageFile} @@ -51,7 +53,7 @@ Type: filesandordirs; Name: {app}\resources\app\node_modules Type: files; Name: {app}\resources\app\Credits_45.0.2454.85.html [Tasks] -Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}" +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1 Name: "addcontextmenufiles"; Description: "{cm:AddContextMenuFiles,{#NameShort}}"; GroupDescription: "{cm:Other}"; Flags: unchecked Name: "addcontextmenufolders"; Description: "{cm:AddContextMenuFolders,{#NameShort}}"; GroupDescription: "{cm:Other}"; Flags: unchecked @@ -770,6 +772,10 @@ Root: HKCR; Subkey: "{#RegValueName}SourceFile"; ValueType: string; ValueName: " Root: HKCR; Subkey: "{#RegValueName}SourceFile\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\resources\app\resources\win32\code_file.ico" Root: HKCR; Subkey: "{#RegValueName}SourceFile\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#ExeBasename}.exe"" ""%1""" +Root: HKCR; Subkey: "Applications\{#ExeBasename}.exe"; ValueType: none; ValueName: ""; Flags: uninsdeletekey +Root: HKCR; Subkey: "Applications\{#ExeBasename}.exe\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\resources\app\resources\win32\code_file.ico" +Root: HKCR; Subkey: "Applications\{#ExeBasename}.exe\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#ExeBasename}.exe"" ""%1""" + Root: HKCU; Subkey: "Environment"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}\bin"; Tasks: addtopath; Check: NeedsAddPath(ExpandConstant('{app}\bin')) Root: HKCU; Subkey: "SOFTWARE\Classes\*\shell\{#RegValueName}"; ValueType: expandsz; ValueName: ""; ValueData: "Open with {#ShellNameShort}"; Tasks: addcontextmenufiles; Flags: uninsdeletekey @@ -786,6 +792,34 @@ Root: HKCU; Subkey: "SOFTWARE\Classes\Drive\shell\{#RegValueName}"; ValueType: e Root: HKCU; Subkey: "SOFTWARE\Classes\Drive\shell\{#RegValueName}\command"; ValueType: expandsz; ValueName: ""; ValueData: """{app}\{#ExeBasename}.exe"" ""%V"""; Tasks: addcontextmenufolders [Code] +// Don't allow installing conflicting architectures +function InitializeSetup(): Boolean; +var + RegKey: String; + ThisArch: String; + AltArch: String; +begin + Result := True; + + if IsWin64 then begin + RegKey := 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\' + copy('{#IncompatibleAppId}', 2, 38) + '_is1'; + + if '{#Arch}' = 'ia32' then begin + Result := not RegKeyExists(HKLM64, RegKey); + ThisArch := '32'; + AltArch := '64'; + end else begin + Result := not RegKeyExists(HKLM32, RegKey); + ThisArch := '64'; + AltArch := '32'; + end; + + if not Result then begin + MsgBox('Please uninstall {#NameShort} ' + AltArch + 'bits before installing this ' + ThisArch + 'bits version.', mbInformation, MB_OK); + end; + end; +end; + function WizardNotSilent(): Boolean; begin Result := not WizardSilent(); diff --git a/build/win32/i18n/messages.hu.isl b/build/win32/i18n/messages.hu.isl new file mode 100644 index 0000000000000..120bf8fc27b8e --- /dev/null +++ b/build/win32/i18n/messages.hu.isl @@ -0,0 +1,8 @@ +[CustomMessages] +AddContextMenuFiles="Megnyits a kvetkezvel: %1" parancs hozzadsa a fjlok helyi menjhez a Windows Intzben +AddContextMenuFolders="Megnyits a kvetkezvel: %1" parancs hozzadsa a mappk helyi menjhez a Windows Intzben +AssociateWithFiles=%1 regisztrlsa szerkesztknt a tmogatott fjltpusokhoz +AddToPath=Hozzads a PATH-hoz (jraindts utn lesz elrhet) +RunAfter=%1 indtsa a telepts utn +Other=Egyb: +SourceFile=%1 forrsfjl \ No newline at end of file diff --git a/build/win32/i18n/messages.pt-br.isl b/build/win32/i18n/messages.pt-br.isl new file mode 100644 index 0000000000000..7021e814e8f61 --- /dev/null +++ b/build/win32/i18n/messages.pt-br.isl @@ -0,0 +1,8 @@ +[CustomMessages] +AddContextMenuFiles=Adicione a ao "Abrir com %1" ao menu de contexto de arquivo do Windows Explorer +AddContextMenuFolders=Adicione a ao "Abrir com %1" ao menu de contexto de diretrio do Windows Explorer +AssociateWithFiles=Registre %1 como um editor para tipos de arquivos suportados +AddToPath=Adicione em PATH (disponvel aps reiniciar) +RunAfter=Executar %1 aps a instalao +Other=Outros: +SourceFile=Arquivo Fonte %1 \ No newline at end of file diff --git a/build/win32/i18n/messages.tr.isl b/build/win32/i18n/messages.tr.isl new file mode 100644 index 0000000000000..4e8e7bbd19b44 --- /dev/null +++ b/build/win32/i18n/messages.tr.isl @@ -0,0 +1,8 @@ +[CustomMessages] +AddContextMenuFiles=Windows Gezgini balam mensne "%1 le A" eylemini ekle +AddContextMenuFolders=Windows Gezgini dizin balam mensne "%1 le A" eylemini ekle +AssociateWithFiles=%1 uygulamasn desteklenen dosya trleri iin bir dzenleyici olarak kayt et +AddToPath=PATH'e ekle (yeniden balattktan sonra kullanlabilir) +RunAfter=Kurulumdan sonra %1 uygulamasn altr. +Other=Dier: +SourceFile=%1 Kaynak Dosyas \ No newline at end of file diff --git a/extensions/bat/.vscodeignore b/extensions/bat/.vscodeignore new file mode 100644 index 0000000000000..77ab386fc7df4 --- /dev/null +++ b/extensions/bat/.vscodeignore @@ -0,0 +1 @@ +test/** \ No newline at end of file diff --git a/extensions/bat/syntaxes/Batch File.tmLanguage b/extensions/bat/syntaxes/Batch File.tmLanguage index 499096364044b..7f0a1061423e0 100644 --- a/extensions/bat/syntaxes/Batch File.tmLanguage +++ b/extensions/bat/syntaxes/Batch File.tmLanguage @@ -74,13 +74,18 @@ 1 name - variable.parameter.loop.begin.shell + variable.other.parsetime.begin.shell + + 2 + + name + variable.other.parsetime.end.shell name - variable.parameter.loop.dosbatch + variable.other.parsetime.dosbatch match - (?i)(%%)(~(?:f|d|p|n|x|s|a|t|z|\$[^:]*:)*)?[a-z] + (%)[^%]+(%)|(%%)[^%]+(%%) captures @@ -88,18 +93,13 @@ 1 name - variable.other.parsetime.begin.shell - - 2 - - name - variable.other.parsetime.end.shell + variable.parameter.loop.begin.shell name - variable.other.parsetime.dosbatch + variable.parameter.loop.dosbatch match - (%)[^%]+(%) + (?i)(%%)(~(?:f|d|p|n|x|s|a|t|z|\$[^:]*:)*)?[a-z] captures diff --git a/extensions/bat/test/colorize-fixtures/test.bat b/extensions/bat/test/colorize-fixtures/test.bat index f5ae5d25119c8..3e215fc5efc2d 100644 --- a/extensions/bat/test/colorize-fixtures/test.bat +++ b/extensions/bat/test/colorize-fixtures/test.bat @@ -16,13 +16,9 @@ if not exist out node .\node_modules\gulp\bin\gulp.js compile :: Configuration set NODE_ENV=development -set VSCODE_DEV=1 -set ELECTRON_DEFAULT_ERROR_MODE=1 -set ELECTRON_ENABLE_LOGGING=1 -set ELECTRON_ENABLE_STACK_DUMPING=1 -:: Launch Code -.\.build\electron\electron.exe . %* +call echo %%LINE:rem +=%% + popd endlocal \ No newline at end of file diff --git a/extensions/bat/test/colorize-results/test_bat.json b/extensions/bat/test/colorize-results/test_bat.json index f69d64df672ef..d0f381fc7f3f2 100644 --- a/extensions/bat/test/colorize-results/test_bat.json +++ b/extensions/bat/test/colorize-results/test_bat.json @@ -95,7 +95,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -106,7 +106,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -139,7 +139,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -161,7 +161,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -216,7 +216,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -264,62 +264,18 @@ } }, { - "c": "set", - "t": "source.dosbatch keyword.command.dosbatch", - "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" - } - }, - { - "c": " VSCODE_DEV=1", - "t": "source.dosbatch", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "set", - "t": "source.dosbatch keyword.command.dosbatch", - "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" - } - }, - { - "c": " ELECTRON_DEFAULT_ERROR_MODE=1", - "t": "source.dosbatch", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "set", - "t": "source.dosbatch keyword.command.dosbatch", + "c": "call", + "t": "source.dosbatch keyword.control.statement.dosbatch", "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" + "dark_plus": "keyword.control: #C586C0", + "light_plus": "keyword.control: #AF00DB", + "dark_vs": "keyword.control: #569CD6", + "light_vs": "keyword.control: #0000FF", + "hc_black": "keyword.control: #C586C0" } }, { - "c": " ELECTRON_ENABLE_LOGGING=1", + "c": " ", "t": "source.dosbatch", "r": { "dark_plus": "default: #D4D4D4", @@ -330,7 +286,7 @@ } }, { - "c": "set", + "c": "echo", "t": "source.dosbatch keyword.command.dosbatch", "r": { "dark_plus": "keyword: #569CD6", @@ -341,7 +297,7 @@ } }, { - "c": " ELECTRON_ENABLE_STACK_DUMPING=1", + "c": " ", "t": "source.dosbatch", "r": { "dark_plus": "default: #D4D4D4", @@ -352,25 +308,14 @@ } }, { - "c": ":: Launch Code", - "t": "source.dosbatch comment.line.colons.dosbatch", + "c": "%%LINE:rem +=%%", + "t": "source.dosbatch variable.other.parsetime.dosbatch", "r": { - "dark_plus": "comment: #608B4E", - "light_plus": "comment: #008000", - "dark_vs": "comment: #608B4E", - "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668" - } - }, - { - "c": ".\\.build\\electron\\electron.exe . %*", - "t": "source.dosbatch", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/clojure/.vscodeignore b/extensions/clojure/.vscodeignore new file mode 100644 index 0000000000000..77ab386fc7df4 --- /dev/null +++ b/extensions/clojure/.vscodeignore @@ -0,0 +1 @@ +test/** \ No newline at end of file diff --git a/extensions/clojure/package.json b/extensions/clojure/package.json index 23a065a7fbeb6..b404ef5fb8ae4 100644 --- a/extensions/clojure/package.json +++ b/extensions/clojure/package.json @@ -10,7 +10,7 @@ "languages": [{ "id": "clojure", "aliases": ["Clojure", "clojure"], - "extensions": [".clj", ".cljs", ".cljx", ".clojure", ".edn"], + "extensions": [".clj", ".cljs", ".cljc", ".cljx", ".clojure", ".edn"], "configuration": "./language-configuration.json" }], "grammars": [{ diff --git a/extensions/clojure/syntaxes/clojure.tmLanguage.json b/extensions/clojure/syntaxes/clojure.tmLanguage.json index 9f130767d07bf..437a0c5b5e198 100644 --- a/extensions/clojure/syntaxes/clojure.tmLanguage.json +++ b/extensions/clojure/syntaxes/clojure.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-clojure/blob/master/grammars/clojure.cson", + "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." + ], "scopeName": "source.clojure", "fileTypes": [ "boot", @@ -64,14 +69,11 @@ }, { "include": "#symbol" - }, - { - "include": "#whitespace" } ], "repository": { "comment": { - "begin": ";", + "begin": "(? updateLaunchJsonDecorations(editor), null, context.subscriptions)); context.subscriptions.push(vscode.workspace.onDidChangeTextDocument(event => { @@ -61,11 +67,48 @@ function registerSettingsCompletions(): vscode.Disposable { }); } -function newSimpleCompletionItem(text: string, range: vscode.Range, description?: string): vscode.CompletionItem { - const item = new vscode.CompletionItem(text); +function registerExtensionsCompletions(): vscode.Disposable { + return vscode.languages.registerCompletionItemProvider({ pattern: '**/extensions.json' }, { + provideCompletionItems(document, position, token) { + const location = getLocation(document.getText(), document.offsetAt(position)); + const range = document.getWordRangeAtPosition(position) || new vscode.Range(position, position); + if (location.path[0] === 'recommendations') { + const config = parse(document.getText()); + const alreadyEnteredExtensions = config && config.recommendations || []; + if (Array.isArray(alreadyEnteredExtensions)) { + const knownExtensionProposals = vscode.extensions.all.filter(e => + !(e.id.startsWith('vscode.') + || e.id === 'Microsoft.vscode-markdown' + || alreadyEnteredExtensions.indexOf(e.id) > -1)); + if (knownExtensionProposals.length) { + return knownExtensionProposals.map(e => { + const item = new vscode.CompletionItem(e.id); + const insertText = `"${e.id}"`; + item.kind = vscode.CompletionItemKind.Value; + item.insertText = insertText; + item.range = range; + item.filterText = insertText; + return item; + }); + } else { + const example = new vscode.CompletionItem(localize('exampleExtension', "Example")); + example.insertText = '"vscode.csharp"'; + example.kind = vscode.CompletionItemKind.Value; + example.range = range; + return [example]; + } + } + } + return []; + } + }); +} + +function newSimpleCompletionItem(label: string, range: vscode.Range, description?: string, insertText?: string): vscode.CompletionItem { + const item = new vscode.CompletionItem(label); item.kind = vscode.CompletionItemKind.Value; item.detail = description; - item.insertText = text; + item.insertText = insertText || label; item.range = range; return item; diff --git a/extensions/configuration-editing/src/settingsDocumentHelper.ts b/extensions/configuration-editing/src/settingsDocumentHelper.ts index b8f9c16fca6b3..dc4c47ac129cc 100644 --- a/extensions/configuration-editing/src/settingsDocumentHelper.ts +++ b/extensions/configuration-editing/src/settingsDocumentHelper.ts @@ -46,8 +46,10 @@ export class SettingsDocument { completions.push(this.newSimpleCompletionItem('${activeEditorShort}', range, localize('activeEditorShort', "e.g. myFile.txt"))); completions.push(this.newSimpleCompletionItem('${activeEditorMedium}', range, localize('activeEditorMedium', "e.g. myFolder/myFile.txt"))); completions.push(this.newSimpleCompletionItem('${activeEditorLong}', range, localize('activeEditorLong', "e.g. /Users/Development/myProject/myFolder/myFile.txt"))); - completions.push(this.newSimpleCompletionItem('${rootName}', range, localize('rootName', "e.g. myProject"))); + completions.push(this.newSimpleCompletionItem('${rootName}', range, localize('rootName', "e.g. myFolder1, myFolder2, myFolder3"))); completions.push(this.newSimpleCompletionItem('${rootPath}', range, localize('rootPath', "e.g. /Users/Development/myProject"))); + completions.push(this.newSimpleCompletionItem('${folderName}', range, localize('folderName', "e.g. myFolder"))); + completions.push(this.newSimpleCompletionItem('${folderPath}', range, localize('folderPath', "e.g. /Users/Development/myFolder"))); completions.push(this.newSimpleCompletionItem('${appName}', range, localize('appName', "e.g. VS Code"))); completions.push(this.newSimpleCompletionItem('${dirty}', range, localize('dirty', "a dirty indicator if the active editor is dirty"))); completions.push(this.newSimpleCompletionItem('${separator}', range, localize('separator', "a conditional separator (' - ') that only shows when surrounded by variables with values"))); diff --git a/extensions/configuration-editing/tsconfig.json b/extensions/configuration-editing/tsconfig.json index 3fd4b7cd11756..6971f531b1105 100644 --- a/extensions/configuration-editing/tsconfig.json +++ b/extensions/configuration-editing/tsconfig.json @@ -8,7 +8,7 @@ ], "strictNullChecks": true }, - "exclude": [ - "node_modules" + "include": [ + "src/**/*" ] } diff --git a/extensions/cpp/.vscodeignore b/extensions/cpp/.vscodeignore new file mode 100644 index 0000000000000..77ab386fc7df4 --- /dev/null +++ b/extensions/cpp/.vscodeignore @@ -0,0 +1 @@ +test/** \ No newline at end of file diff --git a/extensions/cpp/OSSREADME.json b/extensions/cpp/OSSREADME.json index 58859a1b77640..5137487d2ed03 100644 --- a/extensions/cpp/OSSREADME.json +++ b/extensions/cpp/OSSREADME.json @@ -2,7 +2,7 @@ [ { "name": "atom/language-c", - "version": "0.51.3", + "version": "0.0.0", "license": "MIT", "repositoryURL": "https://github.com/atom/language-c", "description": "The files syntaxes/c.json and syntaxes/c++.json were derived from the Atom package https://atom.io/packages/language-c which was originally converted from the C TextMate bundle https://github.com/textmate/c.tmbundle." diff --git a/extensions/cpp/syntaxes/c++.json b/extensions/cpp/syntaxes/c++.json index 0d20c95fb60ef..bc627e3a036f3 100644 --- a/extensions/cpp/syntaxes/c++.json +++ b/extensions/cpp/syntaxes/c++.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-c/blob/master/grammars/c%2B%2B.cson", + "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." + ], "scopeName": "source.cpp", "fileTypes": [ "cc", @@ -425,6 +430,9 @@ { "match": "\\\\x\\h+", "name": "constant.character.escape.cpp" + }, + { + "include": "source.c#string_placeholder" } ] }, @@ -454,6 +462,5 @@ } ] } - }, - "version": "https://github.com/atom/language-c/commit/a74c2f967d73e802a67fa6e971a8e8dedf076597" + } } \ No newline at end of file diff --git a/extensions/cpp/syntaxes/c.json b/extensions/cpp/syntaxes/c.json index 6cc84cff24df3..b83b31ad22e41 100644 --- a/extensions/cpp/syntaxes/c.json +++ b/extensions/cpp/syntaxes/c.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-c/blob/master/grammars/c.cson", + "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." + ], "scopeName": "source.c", "fileTypes": [ "c", @@ -773,7 +778,7 @@ }, "patterns": [ { - "begin": "\\G", + "begin": "\\G(?=.)", "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)\\s+\n(\\g)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()", + "begin": "(?x)\n(?:\\b(delegate)\\b)\\s+\n(?\n (?:\n (?:ref\\s+)? # ref return\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+\n(\\g)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()", "beginCaptures": { "1": { "name": "keyword.other.delegate.cs" @@ -959,7 +968,7 @@ ] }, "field-declaration": { - "begin": "(?x)\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)\\s+\n(\\g)\\s* # first field name\n(?!=>|==)(?=,|;|=|$)", + "begin": "(?x)\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+\n(\\g)\\s* # first field name\n(?!=>|==)(?=,|;|=|$)", "beginCaptures": { "1": { "patterns": [ @@ -993,7 +1002,7 @@ ] }, "property-declaration": { - "begin": "(?x)\n(?!.*\\b(?:class|interface|struct|enum|event)\\b)\\s*\n(?\n (?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?\\g)\\s*\n(?=\\{|=>|$)", + "begin": "(?x)\n(?!.*\\b(?:class|interface|struct|enum|event)\\b)\\s*\n(?\n (?\n (?:\n (?:ref\\s+)? # ref return\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?\\g)\\s*\n(?=\\{|=>|$)", "beginCaptures": { "1": { "patterns": [ @@ -1036,7 +1045,7 @@ ] }, "indexer-declaration": { - "begin": "(?x)\n(?\n (?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?this)\\s*\n(?=\\[)", + "begin": "(?x)\n(?\n (?\n (?:\n (?:ref\\s+)? # ref return\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?this)\\s*\n(?=\\[)", "beginCaptures": { "1": { "patterns": [ @@ -1079,7 +1088,7 @@ ] }, "event-declaration": { - "begin": "(?x)\n\\b(event)\\b\\s*\n(?\n (?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?\\g(?:\\s*,\\s*\\g)*)\\s*\n(?=\\{|;|$)", + "begin": "(?x)\n\\b(event)\\b\\s*\n(?\n (?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?\\g(?:\\s*,\\s*\\g)*)\\s*\n(?=\\{|;|$)", "beginCaptures": { "1": { "name": "keyword.other.event.cs" @@ -1209,7 +1218,7 @@ ] }, "method-declaration": { - "begin": "(?x)\n(?\n (?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(\\g)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()", + "begin": "(?x)\n(?\n (?\n (?:\n (?:ref\\s+)? # ref return\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(\\g)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()", "beginCaptures": { "1": { "patterns": [ @@ -1345,7 +1354,7 @@ ] }, "operator-declaration": { - "begin": "(?x)\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)\\s*\n(?(?:\\b(?:operator)))\\s*\n(?(?:\\+|-|\\*|/|%|&|\\||\\^|\\<\\<|\\>\\>|==|!=|\\>|\\<|\\>=|\\<=|!|~|\\+\\+|--|true|false))\\s*\n(?=\\()", + "begin": "(?x)\n(?\n (?:\n (?:ref\\s+)? # ref return\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?(?:\\b(?:operator)))\\s*\n(?(?:\\+|-|\\*|/|%|&|\\||\\^|\\<\\<|\\>\\>|==|!=|\\>|\\<|\\>=|\\<=|!|~|\\+\\+|--|true|false))\\s*\n(?=\\()", "beginCaptures": { "1": { "patterns": [ @@ -1378,7 +1387,7 @@ ] }, "conversion-operator-declaration": { - "begin": "(?x)\n(?(?:\\b(?:explicit|implicit)))\\s*\n(?(?:\\b(?:operator)))\\s*\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)\\s*\n(?=\\()", + "begin": "(?x)\n(?(?:\\b(?:explicit|implicit)))\\s*\n(?(?:\\b(?:operator)))\\s*\n(?\n (?:\n (?:ref\\s+)? # ref return\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?=\\()", "beginCaptures": { "1": { "patterns": [ @@ -1455,6 +1464,9 @@ }, "end": "(?=[,\\)\\];}])", "patterns": [ + { + "include": "#ref-modifier" + }, { "include": "#expression" } @@ -1469,6 +1481,9 @@ }, "end": "(?=[,\\);}])", "patterns": [ + { + "include": "#ref-modifier" + }, { "include": "#expression" } @@ -1520,6 +1535,9 @@ }, "end": "(?=;)", "patterns": [ + { + "include": "#ref-modifier" + }, { "include": "#expression" } @@ -1834,7 +1852,7 @@ }, "patterns": [ { - "match": "(?x)\n(?:\n (\\bvar\\b)|\n (?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n)\\s+\n(\\g)\\s+\n\\b(in)\\b", + "match": "(?x)\n(?:\n (\\bvar\\b)|\n (?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\n)\\s+\n(\\g)\\s+\n\\b(in)\\b", "captures": { "1": { "name": "keyword.other.var.cs" @@ -1904,6 +1922,9 @@ }, "end": "(?<=\\})", "patterns": [ + { + "include": "#comment" + }, { "include": "#block" } @@ -1918,6 +1939,9 @@ }, "end": "(?<=\\})", "patterns": [ + { + "include": "#comment" + }, { "include": "#block" } @@ -1947,7 +1971,7 @@ }, "patterns": [ { - "match": "(?x)\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)\\s*\n(?:\\b(\\g)\\b)?", + "match": "(?x)\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?:\\b(\\g)\\b)?", "captures": { "1": { "patterns": [ @@ -1966,6 +1990,9 @@ { "include": "#when-clause" }, + { + "include": "#comment" + }, { "include": "#block" } @@ -1990,6 +2017,9 @@ "patterns": [ { "include": "#expression" + }, + { + "include": "#comment" } ] }, @@ -2104,19 +2134,22 @@ ] }, "local-variable-declaration": { - "begin": "(?x)\n(?:\n (\\bvar\\b)|\n (?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n)\\s+\n(\\g)\\s*\n(?=,|;|=|\\))", + "begin": "(?x)\n(?:\n (?:(\\bref)\\s+)?(\\bvar\\b)| # ref local\n (?\n (?:\n (?:ref\\s+)? # ref local\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\n)\\s+\n(\\g)\\s*\n(?=,|;|=|\\))", "beginCaptures": { "1": { - "name": "keyword.other.var.cs" + "name": "storage.modifier.cs" }, "2": { + "name": "keyword.other.var.cs" + }, + "3": { "patterns": [ { "include": "#type" } ] }, - "7": { + "8": { "name": "entity.name.variable.local.cs" } }, @@ -2138,7 +2171,7 @@ ] }, "local-constant-declaration": { - "begin": "(?x)\n(?\\b(?:const)\\b)\\s*\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)\\s+\n(\\g)\\s*\n(?=,|;|=)", + "begin": "(?x)\n(?\\b(?:const)\\b)\\s*\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+\n(\\g)\\s*\n(?=,|;|=)", "beginCaptures": { "1": { "name": "storage.modifier.cs" @@ -2228,7 +2261,7 @@ "include": "#tuple-declaration-deconstruction-element-list" }, { - "include": "#declaration-expression" + "include": "#declaration-expression-tuple" }, { "include": "#punctuation-comma" @@ -2264,7 +2297,7 @@ "include": "#tuple-deconstruction-element-list" }, { - "include": "#declaration-expression" + "include": "#declaration-expression-tuple" }, { "include": "#punctuation-comma" @@ -2279,8 +2312,26 @@ } ] }, - "declaration-expression": { - "match": "(?x) # e.g. int x OR var x\n(?:\n \\b(var)\\b|\n (?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n)\\s+\n\\b(\\g)\\b\\s*\n(?=[,)])", + "declaration-expression-local": { + "match": "(?x) # e.g. int x OR var x\n(?:\n \\b(var)\\b|\n (?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\n)\\s+\n\\b(\\g)\\b\\s*\n(?=[,)\\]])", + "captures": { + "1": { + "name": "keyword.other.var.cs" + }, + "2": { + "patterns": [ + { + "include": "#type" + } + ] + }, + "7": { + "name": "entity.name.variable.local.cs" + } + } + }, + "declaration-expression-tuple": { + "match": "(?x) # e.g. int x OR var x\n(?:\n \\b(var)\\b|\n (?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\n)\\s+\n\\b(\\g)\\b\\s*\n(?=[,)])", "captures": { "1": { "name": "keyword.other.var.cs" @@ -2369,6 +2420,20 @@ } ] }, + "throw-expression": { + "begin": "(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)\\s*\n(\\))(?=\\s*[_[:alnum:]\\(])", + "match": "(?x)\n(\\()\\s*\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(\\))(?=\\s*[_[:alnum:]\\(])", "captures": { "1": { "name": "punctuation.parenthesis.open.cs" @@ -2765,7 +2830,7 @@ } }, "as-expression": { - "match": "(?x)\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)?", + "match": "(?x)\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)?", "captures": { "1": { "name": "keyword.other.as.cs" @@ -2780,7 +2845,7 @@ } }, "is-expression": { - "match": "(?x)\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)?", + "match": "(?x)\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)?", "captures": { "1": { "name": "keyword.other.is.cs" @@ -2910,7 +2975,7 @@ ] }, "object-creation-expression-with-parameters": { - "begin": "(?x)\n(new)\\s+\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)\\s*\n(?=\\()", + "begin": "(?x)\n(new)\\s+\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?=\\()", "beginCaptures": { "1": { "name": "keyword.other.new.cs" @@ -2931,7 +2996,7 @@ ] }, "object-creation-expression-with-no-parameters": { - "match": "(?x)\n(new)\\s+\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)\\s*\n(?=\\{|$)", + "match": "(?x)\n(new)\\s+\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?=\\{|$)", "captures": { "1": { "name": "keyword.other.new.cs" @@ -2946,7 +3011,7 @@ } }, "array-creation-expression": { - "begin": "(?x)\n\\b(new)\\b\\s*\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)?\\s*\n(?=\\[)", + "begin": "(?x)\n\\b(new)\\b\\s*\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)?\\s*\n(?=\\[)", "beginCaptures": { "1": { "name": "keyword.other.new.cs" @@ -3145,13 +3210,16 @@ "name": "storage.modifier.cs", "match": "\\b(ref|out)\\b" }, + { + "include": "#declaration-expression-local" + }, { "include": "#expression" } ] }, "query-expression": { - "begin": "(?x)\n\\b(from)\\b\\s*\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)?\n\\b(\\g)\\b\\s*\n\\b(in)\\b\\s*", + "begin": "(?x)\n\\b(from)\\b\\s*\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)?\n\\b(\\g)\\b\\s*\n\\b(in)\\b\\s*", "beginCaptures": { "1": { "name": "keyword.query.from.cs" @@ -3243,7 +3311,7 @@ ] }, "join-clause": { - "begin": "(?x)\n\\b(join)\\b\\s*\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)?\n\\b(\\g)\\b\\s*\n\\b(in)\\b\\s*", + "begin": "(?x)\n\\b(join)\\b\\s*\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)?\n\\b(\\g)\\b\\s*\n\\b(in)\\b\\s*", "beginCaptures": { "1": { "name": "keyword.query.join.cs" @@ -3421,6 +3489,9 @@ { "include": "#block" }, + { + "include": "#ref-modifier" + }, { "include": "#expression" } @@ -3448,6 +3519,9 @@ { "include": "#block" }, + { + "include": "#ref-modifier" + }, { "include": "#expression" } @@ -3507,7 +3581,7 @@ ] }, "lambda-parameter": { - "match": "(?x)\n(ref|out)?\\s*\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)?\n\\b(\\g)\\b\\s*\n(?=[,)])", + "match": "(?x)\n(ref|out)?\\s*\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)?\n\\b(\\g)\\b\\s*\n(?=[,)])", "captures": { "1": { "name": "storage.modifier.cs" @@ -3530,6 +3604,9 @@ { "include": "#comment" }, + { + "include": "#ref-modifier" + }, { "include": "#tuple-type" }, @@ -3550,6 +3627,10 @@ } ] }, + "ref-modifier": { + "name": "storage.modifier.cs", + "match": "ref" + }, "tuple-type": { "begin": "\\(", "beginCaptures": { @@ -3573,7 +3654,7 @@ ] }, "tuple-element": { - "match": "(?x)\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)\n(?:\\b(?\\g)\\b)?", + "match": "(?x)\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\n(?:\\b(?\\g)\\b)?", "captures": { "1": { "patterns": [ @@ -4186,6 +4267,5 @@ } } } - }, - "version": "https://github.com/dotnet/csharp-tmLanguage/commit/4d0e50c51f336645c98689737db1be321d212d3d" + } } \ No newline at end of file diff --git a/extensions/csharp/test/colorize-results/test_cs.json b/extensions/csharp/test/colorize-results/test_cs.json index 89d2fa8ff3b2c..1bb74d46cd0a0 100644 --- a/extensions/csharp/test/colorize-results/test_cs.json +++ b/extensions/csharp/test/colorize-results/test_cs.json @@ -29,7 +29,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -73,7 +73,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -128,7 +128,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -216,7 +216,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -755,7 +755,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -832,7 +832,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -854,7 +854,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -975,7 +975,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1074,7 +1074,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1151,7 +1151,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1173,7 +1173,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1195,7 +1195,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1272,7 +1272,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/css/.vscodeignore b/extensions/css/.vscodeignore new file mode 100644 index 0000000000000..7b2f560d103be --- /dev/null +++ b/extensions/css/.vscodeignore @@ -0,0 +1,6 @@ +test/** +client/src/** +client/tsconfig.json +server/src/** +server/tsconfig.json +server/node_modules/@types/** \ No newline at end of file diff --git a/extensions/css/client/src/cssMain.ts b/extensions/css/client/src/cssMain.ts index caab3531a4979..33fc8f200621d 100644 --- a/extensions/css/client/src/cssMain.ts +++ b/extensions/css/client/src/cssMain.ts @@ -61,16 +61,24 @@ export function activate(context: ExtensionContext) { context.subscriptions.push(disposable); }); + let indentationRules = { + increaseIndentPattern: /(^.*\{[^}]*$)/, + decreaseIndentPattern: /^\s*\}/ + }; + languages.setLanguageConfiguration('css', { - wordPattern: /(#?-?\d*\.\d\w*%?)|(::?[\w-]*(?=[^,{;]*[,{]))|(([@#.!])?[\w-?]+%?|[@#!.])/g + wordPattern: /(#?-?\d*\.\d\w*%?)|(::?[\w-]*(?=[^,{;]*[,{]))|(([@#.!])?[\w-?]+%?|[@#!.])/g, + indentationRules: indentationRules }); languages.setLanguageConfiguration('less', { - wordPattern: /(#?-?\d*\.\d\w*%?)|(::?[\w-]+(?=[^,{;]*[,{]))|(([@#.!])?[\w-?]+%?|[@#!.])/g + wordPattern: /(#?-?\d*\.\d\w*%?)|(::?[\w-]+(?=[^,{;]*[,{]))|(([@#.!])?[\w-?]+%?|[@#!.])/g, + indentationRules: indentationRules }); languages.setLanguageConfiguration('scss', { - wordPattern: /(#?-?\d*\.\d\w*%?)|(::?[\w-]*(?=[^,{;]*[,{]))|(([@$#.!])?[\w-?]+%?|[@#!$.])/g + wordPattern: /(#?-?\d*\.\d\w*%?)|(::?[\w-]*(?=[^,{;]*[,{]))|(([@$#.!])?[\w-?]+%?|[@#!$.])/g, + indentationRules: indentationRules }); commands.registerCommand('_css.applyCodeAction', applyCodeAction); diff --git a/extensions/css/client/tsconfig.json b/extensions/css/client/tsconfig.json index 2f1dccc29ca6d..e87d1a805a184 100644 --- a/extensions/css/client/tsconfig.json +++ b/extensions/css/client/tsconfig.json @@ -7,7 +7,7 @@ "es5", "es2015.promise" ] }, - "exclude": [ - "node_modules" + "include": [ + "src/**/*" ] } \ No newline at end of file diff --git a/extensions/css/npm-shrinkwrap.json b/extensions/css/npm-shrinkwrap.json index a1df5a0b286da..eece4499ec94e 100644 --- a/extensions/css/npm-shrinkwrap.json +++ b/extensions/css/npm-shrinkwrap.json @@ -3,19 +3,19 @@ "version": "0.1.0", "dependencies": { "vscode-jsonrpc": { - "version": "3.1.0-alpha.1", - "from": "vscode-jsonrpc@>=3.1.0-alpha.1 <4.0.0", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-3.1.0-alpha.1.tgz" + "version": "3.2.0", + "from": "vscode-jsonrpc@>=3.2.0 <4.0.0", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-3.2.0.tgz" }, "vscode-languageclient": { - "version": "3.1.0-alpha.1", - "from": "vscode-languageclient@next", - "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-3.1.0-alpha.1.tgz" + "version": "3.2.0", + "from": "vscode-languageclient@3.2.0", + "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-3.2.0.tgz" }, "vscode-languageserver-types": { - "version": "3.0.3", - "from": "vscode-languageserver-types@>=3.0.3 <4.0.0", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.0.3.tgz" + "version": "3.2.0", + "from": "vscode-languageserver-types@>=3.2.0 <4.0.0", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.2.0.tgz" }, "vscode-nls": { "version": "2.0.2", diff --git a/extensions/css/package.json b/extensions/css/package.json index 7e963d2e97f9e..88da0e07ff7d8 100644 --- a/extensions/css/package.json +++ b/extensions/css/package.json @@ -672,7 +672,7 @@ } }, "dependencies": { - "vscode-languageclient": "^3.1.0-alpha.1", + "vscode-languageclient": "^3.2.0", "vscode-nls": "^2.0.2" }, "devDependencies": { diff --git a/extensions/css/server/npm-shrinkwrap.json b/extensions/css/server/npm-shrinkwrap.json index a33dc2d263d2d..39dc45e142b30 100644 --- a/extensions/css/server/npm-shrinkwrap.json +++ b/extensions/css/server/npm-shrinkwrap.json @@ -3,24 +3,24 @@ "version": "1.0.0", "dependencies": { "vscode-css-languageservice": { - "version": "2.0.2", + "version": "2.1.1", "from": "vscode-css-languageservice@next", - "resolved": "https://registry.npmjs.org/vscode-css-languageservice/-/vscode-css-languageservice-2.0.2.tgz" + "resolved": "https://registry.npmjs.org/vscode-css-languageservice/-/vscode-css-languageservice-2.1.1.tgz" }, "vscode-jsonrpc": { - "version": "3.1.0-alpha.1", - "from": "vscode-jsonrpc@>=3.1.0-alpha.1 <4.0.0", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-3.1.0-alpha.1.tgz" + "version": "3.2.0", + "from": "vscode-jsonrpc@>=3.2.0 <4.0.0", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-3.2.0.tgz" }, "vscode-languageserver": { - "version": "3.1.0-alpha.1", - "from": "vscode-languageserver@next", - "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-3.1.0-alpha.1.tgz" + "version": "3.2.0", + "from": "vscode-languageserver@3.2.0", + "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-3.2.0.tgz" }, "vscode-languageserver-types": { - "version": "3.0.3", - "from": "vscode-languageserver-types@>=3.0.3 <4.0.0", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.0.3.tgz" + "version": "3.2.0", + "from": "vscode-languageserver-types@>=3.2.0 <4.0.0", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.2.0.tgz" }, "vscode-nls": { "version": "2.0.2", diff --git a/extensions/css/server/package.json b/extensions/css/server/package.json index 32845e75105ba..cc4ba952244f7 100644 --- a/extensions/css/server/package.json +++ b/extensions/css/server/package.json @@ -8,8 +8,8 @@ "node": "*" }, "dependencies": { - "vscode-css-languageservice": "^2.0.2", - "vscode-languageserver": "^3.1.0-alpha.1" + "vscode-css-languageservice": "^2.1.1", + "vscode-languageserver": "^3.2.0" }, "devDependencies": { "@types/node": "^6.0.51" diff --git a/extensions/css/server/tsconfig.json b/extensions/css/server/tsconfig.json index 7651bc8687e91..8e862f0264610 100644 --- a/extensions/css/server/tsconfig.json +++ b/extensions/css/server/tsconfig.json @@ -7,7 +7,7 @@ "es5" ] }, - "exclude": [ - "node_modules" + "include": [ + "src/**/*" ] } \ No newline at end of file diff --git a/extensions/css/syntaxes/css.tmLanguage.json b/extensions/css/syntaxes/css.tmLanguage.json index 0d5a3c2775e98..dae4475161aea 100644 --- a/extensions/css/syntaxes/css.tmLanguage.json +++ b/extensions/css/syntaxes/css.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-css/blob/master/grammars/css.cson", + "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." + ], "scopeName": "source.css", "name": "CSS", "fileTypes": [ @@ -182,7 +187,7 @@ }, { "begin": "(?i)(?=@media(\\s|\\(|/\\*|$))", - "end": "(?<=})", + "end": "(?<=})(?!\\G)", "patterns": [ { "begin": "(?i)\\G(@)media", @@ -226,7 +231,7 @@ }, { "begin": "(?i)(?=@counter-style([\\s'\"{;]|/\\*|$))", - "end": "(?<=})", + "end": "(?<=})(?!\\G)", "patterns": [ { "begin": "(?i)\\G(@)counter-style", @@ -292,7 +297,7 @@ }, { "begin": "(?i)(?=@document([\\s'\"{;]|/\\*|$))", - "end": "(?<=})", + "end": "(?<=})(?!\\G)", "patterns": [ { "begin": "(?i)\\G(@)document", @@ -377,11 +382,11 @@ ] }, { - "begin": "(?i)(?=@keyframes([\\s'\"{;]|/\\*|$))", - "end": "(?<=})", + "begin": "(?i)(?=@(?:-(?:webkit|moz|o|ms)-)?keyframes([\\s'\"{;]|/\\*|$))", + "end": "(?<=})(?!\\G)", "patterns": [ { - "begin": "(?i)\\G(@)keyframes", + "begin": "(?i)\\G(@)(?:-(?:webkit|moz|o|ms)-)?keyframes", "beginCaptures": { "0": { "name": "keyword.control.at-rule.keyframes.css" @@ -455,7 +460,7 @@ }, { "begin": "(?i)(?=@supports(\\s|\\(|/\\*|$))", - "end": "(?<=})|(?=;)", + "end": "(?<=})(?!\\G)|(?=;)", "patterns": [ { "begin": "(?i)\\G(@)supports", @@ -1328,7 +1333,7 @@ "name": "keyword.other.unit.${2:/downcase}.css" } }, - "match": "(?xi) (?)( .*)?)|((\\+).*))$\\n?", + "name": "markup.inserted.diff" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.changed.diff" + } + }, + "match": "^(!).*$\\n?", + "name": "markup.changed.diff" + }, + { + "captures": { + "3": { + "name": "punctuation.definition.deleted.diff" + }, + "6": { + "name": "punctuation.definition.deleted.diff" + } + }, + "match": "^(((<)( .*)?)|((-).*))$\\n?", + "name": "markup.deleted.diff" + }, + { + "begin": "^(#)", + "captures": { + "1": { + "name": "punctuation.definition.comment.diff" + } + }, + "comment": "Git produces unified diffs with embedded comments\"", + "end": "\\n", + "name": "comment.line.number-sign.diff" + }, + { + "match": "^index [0-9a-f]{7,40}\\.\\.[0-9a-f]{7,40}.*$\\n?", + "name": "meta.diff.index.git" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.key-value.diff" + }, + "2": { + "name": "meta.toc-list.file-name.diff" + } + }, + "match": "^Index(:) (.+)$\\n?", + "name": "meta.diff.index" + }, + { + "match": "^Only in .*: .*$\\n?", + "name": "meta.diff.only-in" + } + ], + "scopeName": "source.diff", + "uuid": "7E848FF4-708E-11D9-97B4-0011242E4184" +} \ No newline at end of file diff --git a/extensions/diff/test/colorize-results/test_diff.json b/extensions/diff/test/colorize-results/test_diff.json index 5329bcae5c028..26ab2f4fb0300 100644 --- a/extensions/diff/test/colorize-results/test_diff.json +++ b/extensions/diff/test/colorize-results/test_diff.json @@ -100,7 +100,7 @@ }, { "c": "-", - "t": "source.diff markup.deleted.diff punctuation.definition.inserted.diff", + "t": "source.diff markup.deleted.diff punctuation.definition.deleted.diff", "r": { "dark_plus": "markup.deleted: #CE9178", "light_plus": "markup.deleted: #A31515", @@ -122,7 +122,7 @@ }, { "c": "-", - "t": "source.diff markup.deleted.diff punctuation.definition.inserted.diff", + "t": "source.diff markup.deleted.diff punctuation.definition.deleted.diff", "r": { "dark_plus": "markup.deleted: #CE9178", "light_plus": "markup.deleted: #A31515", @@ -155,7 +155,7 @@ }, { "c": "-", - "t": "source.diff markup.deleted.diff punctuation.definition.inserted.diff", + "t": "source.diff markup.deleted.diff punctuation.definition.deleted.diff", "r": { "dark_plus": "markup.deleted: #CE9178", "light_plus": "markup.deleted: #A31515", diff --git a/extensions/docker/.vscodeignore b/extensions/docker/.vscodeignore new file mode 100644 index 0000000000000..77ab386fc7df4 --- /dev/null +++ b/extensions/docker/.vscodeignore @@ -0,0 +1 @@ +test/** \ No newline at end of file diff --git a/extensions/docker/OSSREADME.json b/extensions/docker/OSSREADME.json index 33c86da5f8662..28c0191ec17fb 100644 --- a/extensions/docker/OSSREADME.json +++ b/extensions/docker/OSSREADME.json @@ -3,6 +3,6 @@ "name": "language-docker", "version": "0.0.0", "license": "Apache2", - "repositoryURL": "https://github.com/docker/docker", - "description": "The file syntaxes/Dockerfile.tmLanguage was included from https://github.com/docker/docker/blob/master/contrib/syntax/textmate/Docker.tmbundle/Syntaxes/Dockerfile.tmLanguage." + "repositoryURL": "https://github.com/moby/moby", + "description": "The file syntaxes/Dockerfile.tmLanguage was included from https://github.com/moby/moby/blob/master/contrib/syntax/textmate/Docker.tmbundle/Syntaxes/Dockerfile.tmLanguage." }] diff --git a/extensions/docker/package.json b/extensions/docker/package.json index 0da40007bc60a..e58f082641901 100644 --- a/extensions/docker/package.json +++ b/extensions/docker/package.json @@ -4,7 +4,7 @@ "publisher": "vscode", "engines": { "vscode": "*" }, "scripts": { - "update-grammar": "node ../../build/npm/update-grammar.js docker/docker contrib/syntax/textmate/Docker.tmbundle/Syntaxes/Dockerfile.tmLanguage ./syntaxes/docker.tmLanguage.json" + "update-grammar": "node ../../build/npm/update-grammar.js moby/moby contrib/syntax/textmate/Docker.tmbundle/Syntaxes/Dockerfile.tmLanguage ./syntaxes/docker.tmLanguage.json" }, "contributes": { "languages": [{ diff --git a/extensions/docker/syntaxes/docker.tmLanguage.json b/extensions/docker/syntaxes/docker.tmLanguage.json index 619bc3f3f83be..d8c2d0fd76666 100644 --- a/extensions/docker/syntaxes/docker.tmLanguage.json +++ b/extensions/docker/syntaxes/docker.tmLanguage.json @@ -1,9 +1,25 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/moby/moby/blob/master/contrib/syntax/textmate/Docker.tmbundle/Syntaxes/Dockerfile.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." + ], "fileTypes": [ "Dockerfile" ], "name": "Dockerfile", "patterns": [ + { + "captures": { + "1": { + "name": "keyword.other.special-method.dockerfile" + }, + "2": { + "name": "keyword.other.special-method.dockerfile" + } + }, + "match": "^\\s*\\b(FROM)\\b.*?\\b(AS)\\b" + }, { "captures": { "1": { @@ -85,6 +101,5 @@ } ], "scopeName": "source.dockerfile", - "uuid": "a39d8795-59d2-49af-aa00-fe74ee29576e", - "version": "https://github.com/docker/docker/commit/4cb71f80823af345d063cf0ad657e73ce9caa75f" + "uuid": "a39d8795-59d2-49af-aa00-fe74ee29576e" } \ No newline at end of file diff --git a/extensions/emmet/.vscodeignore b/extensions/emmet/.vscodeignore new file mode 100644 index 0000000000000..24428a6f7582d --- /dev/null +++ b/extensions/emmet/.vscodeignore @@ -0,0 +1,4 @@ +test/** +src/** +tsconfig.json +npm-shrinkwrap.json \ No newline at end of file diff --git a/extensions/emmet/npm-shrinkwrap.json b/extensions/emmet/npm-shrinkwrap.json new file mode 100644 index 0000000000000..a2002c206401f --- /dev/null +++ b/extensions/emmet/npm-shrinkwrap.json @@ -0,0 +1,126 @@ +{ + "name": "emmet", + "version": "0.0.1", + "dependencies": { + "@emmetio/abbreviation": { + "version": "0.6.1", + "from": "@emmetio/abbreviation@>=0.6.1 <0.7.0", + "resolved": "https://registry.npmjs.org/@emmetio/abbreviation/-/abbreviation-0.6.1.tgz" + }, + "@emmetio/css-abbreviation": { + "version": "0.3.1", + "from": "@emmetio/css-abbreviation@>=0.3.1 <0.4.0", + "resolved": "https://registry.npmjs.org/@emmetio/css-abbreviation/-/css-abbreviation-0.3.1.tgz" + }, + "@emmetio/css-parser": { + "version": "0.3.0", + "from": "@emmetio/css-parser@>=0.3.0 <0.4.0", + "resolved": "https://registry.npmjs.org/@emmetio/css-parser/-/css-parser-0.3.0.tgz" + }, + "@emmetio/css-snippets-resolver": { + "version": "0.2.5", + "from": "@emmetio/css-snippets-resolver@>=0.2.5 <0.3.0", + "resolved": "https://registry.npmjs.org/@emmetio/css-snippets-resolver/-/css-snippets-resolver-0.2.5.tgz" + }, + "@emmetio/expand-abbreviation": { + "version": "0.5.8", + "from": "@emmetio/expand-abbreviation@>=0.5.8 <0.6.0", + "resolved": "https://registry.npmjs.org/@emmetio/expand-abbreviation/-/expand-abbreviation-0.5.8.tgz" + }, + "@emmetio/extract-abbreviation": { + "version": "0.1.2", + "from": "@emmetio/extract-abbreviation@>=0.1.1 <0.2.0", + "resolved": "https://registry.npmjs.org/@emmetio/extract-abbreviation/-/extract-abbreviation-0.1.2.tgz" + }, + "@emmetio/field-parser": { + "version": "0.3.0", + "from": "@emmetio/field-parser@>=0.3.0 <0.4.0", + "resolved": "https://registry.npmjs.org/@emmetio/field-parser/-/field-parser-0.3.0.tgz" + }, + "@emmetio/html-matcher": { + "version": "0.3.2", + "from": "@emmetio/html-matcher@>=0.3.1 <0.4.0", + "resolved": "https://registry.npmjs.org/@emmetio/html-matcher/-/html-matcher-0.3.2.tgz" + }, + "@emmetio/html-snippets-resolver": { + "version": "0.1.4", + "from": "@emmetio/html-snippets-resolver@>=0.1.4 <0.2.0", + "resolved": "https://registry.npmjs.org/@emmetio/html-snippets-resolver/-/html-snippets-resolver-0.1.4.tgz" + }, + "@emmetio/html-transform": { + "version": "0.3.2", + "from": "@emmetio/html-transform@>=0.3.2 <0.4.0", + "resolved": "https://registry.npmjs.org/@emmetio/html-transform/-/html-transform-0.3.2.tgz" + }, + "@emmetio/implicit-tag": { + "version": "1.0.0", + "from": "@emmetio/implicit-tag@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/@emmetio/implicit-tag/-/implicit-tag-1.0.0.tgz" + }, + "@emmetio/lorem": { + "version": "1.0.1", + "from": "@emmetio/lorem@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/@emmetio/lorem/-/lorem-1.0.1.tgz" + }, + "@emmetio/markup-formatters": { + "version": "0.3.3", + "from": "@emmetio/markup-formatters@>=0.3.3 <0.4.0", + "resolved": "https://registry.npmjs.org/@emmetio/markup-formatters/-/markup-formatters-0.3.3.tgz" + }, + "@emmetio/math-expression": { + "version": "0.1.1", + "from": "@emmetio/math-expression@>=0.1.1 <0.2.0", + "resolved": "https://registry.npmjs.org/@emmetio/math-expression/-/math-expression-0.1.1.tgz" + }, + "@emmetio/node": { + "version": "0.1.2", + "from": "@emmetio/node@>=0.1.2 <0.2.0", + "resolved": "https://registry.npmjs.org/@emmetio/node/-/node-0.1.2.tgz" + }, + "@emmetio/output-profile": { + "version": "0.1.5", + "from": "@emmetio/output-profile@>=0.1.5 <0.2.0", + "resolved": "https://registry.npmjs.org/@emmetio/output-profile/-/output-profile-0.1.5.tgz" + }, + "@emmetio/output-renderer": { + "version": "0.1.1", + "from": "@emmetio/output-renderer@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/@emmetio/output-renderer/-/output-renderer-0.1.1.tgz" + }, + "@emmetio/snippets": { + "version": "0.2.3", + "from": "@emmetio/snippets@>=0.2.3 <0.3.0", + "resolved": "https://registry.npmjs.org/@emmetio/snippets/-/snippets-0.2.3.tgz" + }, + "@emmetio/snippets-registry": { + "version": "0.3.1", + "from": "@emmetio/snippets-registry@>=0.3.1 <0.4.0", + "resolved": "https://registry.npmjs.org/@emmetio/snippets-registry/-/snippets-registry-0.3.1.tgz" + }, + "@emmetio/stream-reader": { + "version": "2.2.0", + "from": "@emmetio/stream-reader@>=2.2.0 <3.0.0", + "resolved": "https://registry.npmjs.org/@emmetio/stream-reader/-/stream-reader-2.2.0.tgz" + }, + "@emmetio/stream-reader-utils": { + "version": "0.1.0", + "from": "@emmetio/stream-reader-utils@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/@emmetio/stream-reader-utils/-/stream-reader-utils-0.1.0.tgz" + }, + "@emmetio/stylesheet-formatters": { + "version": "0.1.2", + "from": "@emmetio/stylesheet-formatters@>=0.1.2 <0.2.0", + "resolved": "https://registry.npmjs.org/@emmetio/stylesheet-formatters/-/stylesheet-formatters-0.1.2.tgz" + }, + "@emmetio/variable-resolver": { + "version": "0.2.1", + "from": "@emmetio/variable-resolver@>=0.2.1 <0.3.0", + "resolved": "https://registry.npmjs.org/@emmetio/variable-resolver/-/variable-resolver-0.2.1.tgz" + }, + "vscode-emmet-helper": { + "version": "0.0.18", + "from": "vscode-emmet-helper@0.0.18", + "resolved": "https://registry.npmjs.org/vscode-emmet-helper/-/vscode-emmet-helper-0.0.18.tgz" + } + } +} diff --git a/extensions/emmet/package.json b/extensions/emmet/package.json new file mode 100644 index 0000000000000..439621a13712d --- /dev/null +++ b/extensions/emmet/package.json @@ -0,0 +1,78 @@ +{ + "name": "emmet", + "displayName": "emmet", + "description": "Emmet support for VS Code", + "version": "0.0.1", + "publisher": "vscode", + "engines": { + "vscode": "^1.13.0" + }, + "categories": [ + "Other" + ], + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/vscode-emmet" + }, + "activationEvents": [ + "*" + ], + "main": "./out/extension", + "contributes": { + "configuration": { + "type": "object", + "title": "Emmet", + "properties": { + "emmet.showExpandedAbbreviation": { + "type": ["string"], + "enum": [ + "never", + "always", + "inMarkupAndStylesheetFilesOnly" + ], + "default": "inMarkupAndStylesheetFilesOnly", + "description": "Applicable only when emmet.useNewEmmet is set to true.\nShows expanded emmet abbreviations as suggestions.\nThe option \"inMarkupAndStylesheetFilesOnly\" applies to html, haml, jade, slim, xml, xsl, css, scss, sass, less and stylus.\nThe option \"always\" applies to all parts of the file regardless of markup/css." + }, + "emmet.showAbbreviationSuggestions": { + "type": "boolean", + "default": true, + "description": "Applicable only when emmet.useNewEmmet is set to true.\nShows possible emmet abbreviations as suggestions. Not applicable in stylesheets or when emmet.showExpandedAbbreviation is set to \"never\"." + }, + "emmet.includeLanguages": { + "type": "object", + "default": {}, + "description": "Applicable only when emmet.useNewEmmet is set to true.\nEnable emmet abbreviations in languages that are not supported by default. Add a mapping here between the language and emmet supported language.\n Eg: {\"vue-html\": \"html\", \"javascript\": \"javascriptreact\"}" + }, + "emmet.variables":{ + "type": "object", + "properties": { + "lang": { + "type": "string", + "default": "en" + }, + "charset": { + "type": "string", + "default": "UTF-8" + } + }, + "default":{}, + "description": "Applicable only when emmet.useNewEmmet is set to true.\nVariables to be used in emmet snippets" + } + } + } + }, + "scripts": { + "compile": "gulp compile-extension:emmet" + }, + "devDependencies": { + "@types/node": "^7.0.4" + }, + "dependencies": { + "@emmetio/expand-abbreviation": "^0.5.8", + "@emmetio/extract-abbreviation": "^0.1.1", + "@emmetio/html-matcher": "^0.3.1", + "@emmetio/css-parser": "^0.3.0", + "@emmetio/math-expression": "^0.1.1", + "vscode-emmet-helper":"0.0.18" + } +} \ No newline at end of file diff --git a/extensions/emmet/src/abbreviationActions.ts b/extensions/emmet/src/abbreviationActions.ts new file mode 100644 index 0000000000000..1d940dbd66b97 --- /dev/null +++ b/extensions/emmet/src/abbreviationActions.ts @@ -0,0 +1,253 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { expand } from '@emmetio/expand-abbreviation'; +import { Node, HtmlNode, Rule } from 'EmmetNode'; +import { getNode, getInnerRange, getMappingForIncludedLanguages, parse, validate } from './util'; +import { getExpandOptions, extractAbbreviation, isStyleSheet, isAbbreviationValid, getEmmetMode } from 'vscode-emmet-helper'; + +interface ExpandAbbreviationInput { + syntax: string; + abbreviation: string; + rangeToReplace: vscode.Range; + textToWrap?: string; + preceedingWhiteSpace?: string; +} + +export function wrapWithAbbreviation(args) { + const syntax = getSyntaxFromArgs(args); + if (!syntax || !validate()) { + return; + } + + const editor = vscode.window.activeTextEditor; + const newLine = editor.document.eol === vscode.EndOfLine.LF ? '\n' : '\r\n'; + + vscode.window.showInputBox({ prompt: 'Enter Abbreviation' }).then(abbreviation => { + if (!abbreviation || !abbreviation.trim() || !isAbbreviationValid(syntax, abbreviation)) { return; } + + let expandAbbrList: ExpandAbbreviationInput[] = []; + let firstTextToReplace: string; + let allTextToReplaceSame: boolean = true; + + editor.selections.forEach(selection => { + let rangeToReplace: vscode.Range = selection.isReversed ? new vscode.Range(selection.active, selection.anchor) : selection; + if (rangeToReplace.isEmpty) { + rangeToReplace = new vscode.Range(rangeToReplace.start.line, 0, rangeToReplace.start.line, editor.document.lineAt(rangeToReplace.start.line).text.length); + } + const firstLine = editor.document.lineAt(rangeToReplace.start).text; + const firstLineTillSelection = firstLine.substr(0, rangeToReplace.start.character); + const noTextBeforeSelection = /^\s*$/.test(firstLineTillSelection); + let textToWrap = ''; + let preceedingWhiteSpace = ''; + + if (noTextBeforeSelection) { + const matches = firstLine.match(/^(\s*)/); + if (matches) { + preceedingWhiteSpace = matches[1]; + } + if (rangeToReplace.start.character <= preceedingWhiteSpace.length) { + rangeToReplace = new vscode.Range(rangeToReplace.start.line, 0, rangeToReplace.end.line, rangeToReplace.end.character); + } + + textToWrap = newLine; + for (let i = rangeToReplace.start.line; i <= rangeToReplace.end.line; i++) { + textToWrap += '\t' + editor.document.lineAt(i).text.substr(preceedingWhiteSpace.length) + newLine; + } + } else { + textToWrap = editor.document.getText(rangeToReplace); + } + + if (!firstTextToReplace) { + firstTextToReplace = textToWrap; + } else if (allTextToReplaceSame && firstTextToReplace !== textToWrap) { + allTextToReplaceSame = false; + } + + expandAbbrList.push({ syntax, abbreviation, rangeToReplace, textToWrap, preceedingWhiteSpace }); + }); + + expandAbbreviationInRange(editor, expandAbbrList, allTextToReplaceSame); + }); +} + +export function expandAbbreviation(args) { + const syntax = getSyntaxFromArgs(args); + if (!syntax || !validate()) { + return; + } + + const editor = vscode.window.activeTextEditor; + + let rootNode = parse(editor.document); + if (!rootNode) { + return; + } + + let abbreviationList: ExpandAbbreviationInput[] = []; + let firstAbbreviation: string; + let allAbbreviationsSame: boolean = true; + + editor.selections.forEach(selection => { + let rangeToReplace: vscode.Range = selection; + let position = selection.isReversed ? selection.anchor : selection.active; + let abbreviation = editor.document.getText(rangeToReplace); + if (rangeToReplace.isEmpty) { + [rangeToReplace, abbreviation] = extractAbbreviation(editor.document, position); + } + if (!isAbbreviationValid(syntax, abbreviation)) { + vscode.window.showErrorMessage('Emmet: Invalid abbreviation'); + return; + } + + let currentNode = getNode(rootNode, position); + if (!isValidLocationForEmmetAbbreviation(currentNode, syntax, position)) { + return; + } + + if (!firstAbbreviation) { + firstAbbreviation = abbreviation; + } else if (allAbbreviationsSame && firstAbbreviation !== abbreviation) { + allAbbreviationsSame = false; + } + + abbreviationList.push({ syntax, abbreviation, rangeToReplace }); + }); + + expandAbbreviationInRange(editor, abbreviationList, allAbbreviationsSame); +} + + +/** + * Checks if given position is a valid location to expand emmet abbreviation. + * Works only on html and css/less/scss syntax + * @param currentNode parsed node at given position + * @param syntax syntax of the abbreviation + * @param position position to validate + */ +export function isValidLocationForEmmetAbbreviation(currentNode: Node, syntax: string, position: vscode.Position): boolean { + if (!currentNode) { + return true; + } + + if (isStyleSheet(syntax)) { + if (currentNode.type !== 'rule') { + return true; + } + const currentCssNode = currentNode; + return currentCssNode.selectorToken && position.isAfter(currentCssNode.selectorToken.end); + } + + const currentHtmlNode = currentNode; + if (currentHtmlNode.close) { + return getInnerRange(currentHtmlNode).contains(position); + } + + return false; +} + +/** + * Expands abbreviations as detailed in expandAbbrList in the editor + * @param editor + * @param expandAbbrList + * @param insertSameSnippet + */ +function expandAbbreviationInRange(editor: vscode.TextEditor, expandAbbrList: ExpandAbbreviationInput[], insertSameSnippet: boolean) { + if (!expandAbbrList || expandAbbrList.length === 0) { + return; + } + const newLine = editor.document.eol === vscode.EndOfLine.LF ? '\n' : '\r\n'; + + // Snippet to replace at multiple cursors are not the same + // `editor.insertSnippet` will have to be called for each instance separately + // We will not be able to maintain multiple cursors after snippet insertion + if (!insertSameSnippet) { + expandAbbrList.forEach((expandAbbrInput: ExpandAbbreviationInput) => { + let expandedText = expandAbbr(expandAbbrInput, newLine); + if (expandedText) { + editor.insertSnippet(new vscode.SnippetString(expandedText), expandAbbrInput.rangeToReplace); + } + }); + return; + } + + // Snippet to replace at all cursors are the same + // We can pass all ranges to `editor.insertSnippet` in a single call so that + // all cursors are maintained after snippet insertion + const anyExpandAbbrInput = expandAbbrList[0]; + let expandedText = expandAbbr(anyExpandAbbrInput, newLine); + let allRanges = expandAbbrList.map(value => { + return value.rangeToReplace; + }); + if (expandedText) { + editor.insertSnippet(new vscode.SnippetString(expandedText), allRanges); + } +} + +/** + * Expands abbreviation as detailed in given input. + * If there is textToWrap, then given preceedingWhiteSpace is applied + */ +function expandAbbr(input: ExpandAbbreviationInput, newLine: string): string { + // Expand the abbreviation + let expandedText; + try { + expandedText = expand(input.abbreviation, getExpandOptions(input.syntax, input.textToWrap)); + } catch (e) { + vscode.window.showErrorMessage('Failed to expand abbreviation'); + } + + if (!expandedText) { + return; + } + + // If no text to wrap, then return the expanded text + if (!input.textToWrap) { + return expandedText; + } + + // There was text to wrap, and the final expanded text is multi line + // So add the preceedingWhiteSpace to each line + if (expandedText.indexOf('\n') > -1) { + return expandedText.split(newLine).map(line => input.preceedingWhiteSpace + line).join(newLine); + } + + // There was text to wrap and the final expanded text is single line + // This can happen when the abbreviation was for an inline element + // Remove the preceeding newLine + tab and the ending newLine, that was added to textToWrap + // And re-expand the abbreviation + let regex = newLine === '\n' ? /^\n\t(.*)\n$/ : /^\r\n\t(.*)\r\n$/; + let matches = input.textToWrap.match(regex); + if (matches) { + input.textToWrap = matches[1]; + return expandAbbr(input, newLine); + } + + return input.preceedingWhiteSpace + expandedText; +} + +function getSyntaxFromArgs(args: any): string { + let editor = vscode.window.activeTextEditor; + if (!editor) { + vscode.window.showInformationMessage('No editor is active.'); + return; + } + if (typeof args !== 'object' || !args['language']) { + vscode.window.showInformationMessage('Cannot resolve language at cursor.'); + return; + } + + const mappedModes = getMappingForIncludedLanguages(); + let language: string = args['language']; + let parentMode: string = args['parentMode']; + + let syntax = getEmmetMode(mappedModes[language] ? mappedModes[language] : language); + if (syntax) { + return syntax; + } + + return getEmmetMode(mappedModes[parentMode] ? mappedModes[parentMode] : parentMode); +} \ No newline at end of file diff --git a/extensions/emmet/src/balance.ts b/extensions/emmet/src/balance.ts new file mode 100644 index 0000000000000..164b4cb0c3753 --- /dev/null +++ b/extensions/emmet/src/balance.ts @@ -0,0 +1,83 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { HtmlNode } from 'EmmetNode'; +import { getNode, parse, validate } from './util'; + +export function balanceOut() { + balance(true); +} + +export function balanceIn() { + balance(false); +} + +function balance(out: boolean) { + let editor = vscode.window.activeTextEditor; + if (!validate(false)) { + return; + } + + let rootNode = parse(editor.document); + if (!rootNode) { + return; + } + + let getRangeFunction = out ? getRangeToBalanceOut : getRangeToBalanceIn; + let newSelections: vscode.Selection[] = []; + editor.selections.forEach(selection => { + let range = getRangeFunction(editor.document, selection, rootNode); + newSelections.push(range ? range : selection); + }); + + editor.selection = newSelections[0]; + editor.selections = newSelections; +} + +function getRangeToBalanceOut(document: vscode.TextDocument, selection: vscode.Selection, rootNode: HtmlNode): vscode.Selection { + let nodeToBalance = getNode(rootNode, selection.start); + if (!nodeToBalance) { + return; + } + if (!nodeToBalance.close) { + return new vscode.Selection(nodeToBalance.start, nodeToBalance.end); + } + + let innerSelection = new vscode.Selection(nodeToBalance.open.end, nodeToBalance.close.start); + let outerSelection = new vscode.Selection(nodeToBalance.start, nodeToBalance.end); + + if (innerSelection.contains(selection) && !innerSelection.isEqual(selection)) { + return innerSelection; + } + if (outerSelection.contains(selection) && !outerSelection.isEqual(selection)) { + return outerSelection; + } + return; +} + +function getRangeToBalanceIn(document: vscode.TextDocument, selection: vscode.Selection, rootNode: HtmlNode): vscode.Selection { + let nodeToBalance = getNode(rootNode, selection.start); + if (!nodeToBalance) { + return; + } + + if (!nodeToBalance.firstChild) { + if (nodeToBalance.close) { + return new vscode.Selection(nodeToBalance.open.end, nodeToBalance.close.start); + } + return; + } + + if (selection.start.isEqual(nodeToBalance.firstChild.start) + && selection.end.isEqual(nodeToBalance.firstChild.end) + && nodeToBalance.firstChild.close) { + return new vscode.Selection(nodeToBalance.firstChild.open.end, nodeToBalance.firstChild.close.start); + } + + return new vscode.Selection(nodeToBalance.firstChild.start, nodeToBalance.firstChild.end); + +} + diff --git a/extensions/emmet/src/bufferStream.ts b/extensions/emmet/src/bufferStream.ts new file mode 100644 index 0000000000000..a7a6cd5a0d25d --- /dev/null +++ b/extensions/emmet/src/bufferStream.ts @@ -0,0 +1,189 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +/* Based on @sergeche's work in his emmet plugin */ + +'use strict'; + +import { TextDocument, Position, Range, EndOfLine } from 'vscode'; + +/** + * A stream reader for VSCode's `TextDocument` + * Based on @emmetio/stream-reader and @emmetio/atom-plugin + */ +export class DocumentStreamReader { + private document: TextDocument; + private start: Position; + private _eof: Position; + public pos: Position; + private _eol: string; + + /** + * @param {TextDocument} buffer + * @param {Position} pos + * @param {Range} limit + */ + constructor(document: TextDocument, pos?: Position, limit?: Range) { + + this.document = document; + this.start = this.pos = pos ? pos : new Position(0, 0); + this._eof = limit ? limit.end : new Position(this.document.lineCount - 1, this._lineLength(this.document.lineCount - 1)); + this._eol = this.document.eol === EndOfLine.LF ? '\n' : '\r\n'; + } + + /** + * Returns true only if the stream is at the end of the file. + * @returns {Boolean} + */ + eof() { + return this.pos.isAfterOrEqual(this._eof); + } + + /** + * Creates a new stream instance which is limited to given range for given document + * @param {Position} start + * @param {Position} end + * @return {DocumentStreamReader} + */ + limit(start, end) { + return new DocumentStreamReader(this.document, start, new Range(start, end)); + } + + /** + * Returns the next character code in the stream without advancing it. + * Will return NaN at the end of the file. + * @returns {Number} + */ + peek() { + if (this.eof()) { + return NaN; + } + const line = this.document.lineAt(this.pos.line).text; + return this.pos.character < line.length ? line.charCodeAt(this.pos.character) : this._eol.charCodeAt(this.pos.character - line.length); + } + + /** + * Returns the next character in the stream and advances it. + * Also returns NaN when no more characters are available. + * @returns {Number} + */ + next() { + if (this.eof()) { + return NaN; + } + + const line = this.document.lineAt(this.pos.line).text; + let code: number; + if (this.pos.character < line.length) { + code = line.charCodeAt(this.pos.character); + this.pos = this.pos.translate(0, 1); + } else { + code = this._eol.charCodeAt(this.pos.character - line.length); + this.pos = new Position(this.pos.line + 1, 0); + } + + if (this.eof()) { + // restrict pos to eof, if in case it got moved beyond eof + this.pos = new Position(this._eof.line, this._eof.character); + } + + return code; + } + + /** + * Backs up the stream n characters. Backing it up further than the + * start of the current token will cause things to break, so be careful. + * @param {Number} n + */ + backUp(n) { + let row = this.pos.line; + let column = this.pos.character; + column -= (n || 1); + + while (row >= 0 && column < 0) { + row--; + column += this._lineLength(row); + } + + this.pos = row < 0 || column < 0 + ? new Position(0, 0) + : new Position(row, column); + + return this.peek(); + } + + /** + * Get the string between the start of the current token and the + * current stream position. + * @returns {String} + */ + current() { + return this.substring(this.start, this.pos); + } + + /** + * Returns contents for given range + * @param {Position} from + * @param {Position} to + * @return {String} + */ + substring(from, to) { + return this.document.getText(new Range(from, to)); + } + + /** + * Creates error object with current stream state + * @param {String} message + * @return {Error} + */ + error(message) { + const err = new Error(`${message} at row ${this.pos.line}, column ${this.pos.character}`); + + return err; + } + + /** + * Returns line length of given row, including line ending + * @param {Number} row + * @return {Number} + */ + _lineLength(row) { + if (row === this.document.lineCount - 1) { + return this.document.lineAt(row).text.length; + } + return this.document.lineAt(row).text.length + this._eol.length; + } + + /** + * `match` can be a character code or a function that takes a character code + * and returns a boolean. If the next character in the stream 'matches' + * the given argument, it is consumed and returned. + * Otherwise, `false` is returned. + * @param {Number|Function} match + * @returns {Boolean} + */ + eat(match) { + const ch = this.peek(); + const ok = typeof match === 'function' ? match(ch) : ch === match; + + if (ok) { + this.next(); + } + + return ok; + } + + /** + * Repeatedly calls eat with the given argument, until it + * fails. Returns true if any characters were eaten. + * @param {Object} match + * @returns {Boolean} + */ + eatWhile(match) { + const start = this.pos; + while (!this.eof() && this.eat(match)) { } + return !this.pos.isEqual(start); + } +} diff --git a/extensions/emmet/src/defaultCompletionProvider.ts b/extensions/emmet/src/defaultCompletionProvider.ts new file mode 100644 index 0000000000000..0ce04b7653ec9 --- /dev/null +++ b/extensions/emmet/src/defaultCompletionProvider.ts @@ -0,0 +1,72 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { HtmlNode } from 'EmmetNode'; +import { EmmetCompletionItemProvider, isStyleSheet, getEmmetMode } from 'vscode-emmet-helper'; +import { isValidLocationForEmmetAbbreviation } from './abbreviationActions'; +import { getNode, getInnerRange, getMappingForIncludedLanguages, parse } from './util'; + +export class DefaultCompletionItemProvider implements vscode.CompletionItemProvider { + + public provideCompletionItems(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken): Thenable { + const mappedLanguages = getMappingForIncludedLanguages(); + + let isSyntaxMapped = mappedLanguages[document.languageId] ? true : false; + let syntax = getEmmetMode(isSyntaxMapped ? mappedLanguages[document.languageId] : document.languageId); + + if (document.languageId === 'html' || isStyleSheet(document.languageId)) { + // Document can be html/css parsed + // Use syntaxHelper to parse file, validate location and update sytnax if needed + syntax = this.syntaxHelper(syntax, document, position); + } + + if (!syntax + || ((isSyntaxMapped || syntax === 'jsx') + && vscode.workspace.getConfiguration('emmet')['showExpandedAbbreviation'] !== 'always')) { + return; + } + + const emmetCompletionProvider = new EmmetCompletionItemProvider(syntax); + return emmetCompletionProvider.provideCompletionItems(document, position, token); + } + + /** + * Parses given document to check whether given position is valid for emmet abbreviation and returns appropriate syntax + * @param syntax string language mode of current document + * @param document vscode.Textdocument + * @param position vscode.Position position of the abbreviation that needs to be expanded + */ + private syntaxHelper(syntax: string, document: vscode.TextDocument, position: vscode.Position): string { + if (!syntax) { + return syntax; + } + let rootNode = parse(document, false); + if (!rootNode) { + return; + } + + let currentNode = getNode(rootNode, position); + + if (!isStyleSheet(syntax)) { + const currentHtmlNode = currentNode; + if (currentHtmlNode + && currentHtmlNode.close + && currentHtmlNode.name === 'style' + && getInnerRange(currentHtmlNode).contains(position)) { + return 'css'; + } + } + + if (!isValidLocationForEmmetAbbreviation(currentNode, syntax, position)) { + return; + } + return syntax; + } + + + + +} \ No newline at end of file diff --git a/extensions/emmet/src/editPoint.ts b/extensions/emmet/src/editPoint.ts new file mode 100644 index 0000000000000..2028d3295b3c6 --- /dev/null +++ b/extensions/emmet/src/editPoint.ts @@ -0,0 +1,70 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { validate } from './util'; + +export function fetchEditPoint(direction: string): void { + let editor = vscode.window.activeTextEditor; + if (!validate()) { + return; + } + + let newSelections: vscode.Selection[] = []; + editor.selections.forEach(selection => { + let updatedSelection = direction === 'next' ? nextEditPoint(selection.anchor, editor) : prevEditPoint(selection.anchor, editor); + newSelections.push(updatedSelection ? updatedSelection : selection); + }); + editor.selections = newSelections; + editor.revealRange(editor.selections[editor.selections.length - 1]); +} + +function nextEditPoint(position: vscode.Position, editor: vscode.TextEditor): vscode.Selection { + for (let lineNum = position.line; lineNum < editor.document.lineCount; lineNum++) { + let updatedSelection = findEditPoint(lineNum, editor, position, 'next'); + if (updatedSelection) { + return updatedSelection; + } + } +} + +function prevEditPoint(position: vscode.Position, editor: vscode.TextEditor): vscode.Selection { + for (let lineNum = position.line; lineNum >= 0; lineNum--) { + let updatedSelection = findEditPoint(lineNum, editor, position, 'prev'); + if (updatedSelection) { + return updatedSelection; + } + } +} + + +function findEditPoint(lineNum: number, editor: vscode.TextEditor, position: vscode.Position, direction: string): vscode.Selection { + let line = editor.document.lineAt(lineNum); + let lineContent = line.text; + + if (lineNum !== position.line && line.isEmptyOrWhitespace) { + return new vscode.Selection(lineNum, lineContent.length, lineNum, lineContent.length); + } + + if (lineNum === position.line && direction === 'prev') { + lineContent = lineContent.substr(0, position.character); + } + let emptyAttrIndex = direction === 'next' ? lineContent.indexOf('""', lineNum === position.line ? position.character : 0) : lineContent.lastIndexOf('""'); + let emptyTagIndex = direction === 'next' ? lineContent.indexOf('><', lineNum === position.line ? position.character : 0) : lineContent.lastIndexOf('><'); + + let winner = -1; + + if (emptyAttrIndex > -1 && emptyTagIndex > -1) { + winner = direction === 'next' ? Math.min(emptyAttrIndex, emptyTagIndex) : Math.max(emptyAttrIndex, emptyTagIndex); + } else if (emptyAttrIndex > -1) { + winner = emptyAttrIndex; + } else { + winner = emptyTagIndex; + } + + if (winner > -1) { + return new vscode.Selection(lineNum, winner + 1, lineNum, winner + 1); + } +} diff --git a/extensions/emmet/src/evaluateMathExpression.ts b/extensions/emmet/src/evaluateMathExpression.ts new file mode 100644 index 0000000000000..46c5a197bb845 --- /dev/null +++ b/extensions/emmet/src/evaluateMathExpression.ts @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +/* Based on @sergeche's work in his emmet plugin */ + +import * as vscode from 'vscode'; +import evaluate from '@emmetio/math-expression'; +import { DocumentStreamReader } from './bufferStream'; + +export function evaluateMathExpression() { + let editor = vscode.window.activeTextEditor; + if (!editor) { + vscode.window.showInformationMessage('No editor is active'); + return; + } + const stream = new DocumentStreamReader(editor.document); + editor.edit(editBuilder => { + editor.selections.forEach(selection => { + const pos = selection.isReversed ? selection.anchor : selection.active; + stream.pos = pos; + + try { + const result = String(evaluate(stream, true)); + editBuilder.replace(new vscode.Range(stream.pos, pos), result); + } catch (err) { + // Ignore error since most likely it’s because of non-math expression + console.warn('Math evaluation error', err); + } + }); + }); + +} diff --git a/extensions/emmet/src/extension.ts b/extensions/emmet/src/extension.ts new file mode 100644 index 0000000000000..b7c1a9f36f167 --- /dev/null +++ b/extensions/emmet/src/extension.ts @@ -0,0 +1,130 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { DefaultCompletionItemProvider } from './defaultCompletionProvider'; +import { expandAbbreviation, wrapWithAbbreviation } from './abbreviationActions'; +import { removeTag } from './removeTag'; +import { updateTag } from './updateTag'; +import { matchTag } from './matchTag'; +import { balanceOut, balanceIn } from './balance'; +import { splitJoinTag } from './splitJoinTag'; +import { mergeLines } from './mergeLines'; +import { toggleComment } from './toggleComment'; +import { fetchEditPoint } from './editPoint'; +import { fetchSelectItem } from './selectItem'; +import { evaluateMathExpression } from './evaluateMathExpression'; +import { incrementDecrement } from './incrementDecrement'; +import { LANGUAGE_MODES, getMappingForIncludedLanguages } from './util'; +import { updateExtensionsPath } from 'vscode-emmet-helper'; + +export function activate(context: vscode.ExtensionContext) { + let completionProvider = new DefaultCompletionItemProvider(); + Object.keys(LANGUAGE_MODES).forEach(language => { + const provider = vscode.languages.registerCompletionItemProvider(language, completionProvider, ...LANGUAGE_MODES[language]); + context.subscriptions.push(provider); + }); + let includedLanguages = getMappingForIncludedLanguages(); + Object.keys(includedLanguages).forEach(language => { + const provider = vscode.languages.registerCompletionItemProvider(language, completionProvider, ...LANGUAGE_MODES[includedLanguages[language]]); + context.subscriptions.push(provider); + }); + + context.subscriptions.push(vscode.commands.registerCommand('emmet.wrapWithAbbreviation', (args) => { + wrapWithAbbreviation(args); + })); + + context.subscriptions.push(vscode.commands.registerCommand('emmet.expandAbbreviation', (args) => { + expandAbbreviation(args); + })); + + context.subscriptions.push(vscode.commands.registerCommand('emmet.removeTag', () => { + removeTag(); + })); + + context.subscriptions.push(vscode.commands.registerCommand('emmet.updateTag', () => { + vscode.window.showInputBox({ prompt: 'Enter Tag' }).then(tagName => { + updateTag(tagName); + }); + })); + + context.subscriptions.push(vscode.commands.registerCommand('emmet.matchTag', () => { + matchTag(); + })); + + context.subscriptions.push(vscode.commands.registerCommand('emmet.balanceOut', () => { + balanceOut(); + })); + + context.subscriptions.push(vscode.commands.registerCommand('emmet.balanceIn', () => { + balanceIn(); + })); + + context.subscriptions.push(vscode.commands.registerCommand('emmet.splitJoinTag', () => { + splitJoinTag(); + })); + + context.subscriptions.push(vscode.commands.registerCommand('emmet.mergeLines', () => { + mergeLines(); + })); + + context.subscriptions.push(vscode.commands.registerCommand('emmet.toggleComment', () => { + toggleComment(); + })); + + context.subscriptions.push(vscode.commands.registerCommand('emmet.nextEditPoint', () => { + fetchEditPoint('next'); + })); + + context.subscriptions.push(vscode.commands.registerCommand('emmet.prevEditPoint', () => { + fetchEditPoint('prev'); + })); + + context.subscriptions.push(vscode.commands.registerCommand('emmet.selectNextItem', () => { + fetchSelectItem('next'); + })); + + context.subscriptions.push(vscode.commands.registerCommand('emmet.selectPrevItem', () => { + fetchSelectItem('prev'); + })); + + context.subscriptions.push(vscode.commands.registerCommand('emmet.evaluateMathExpression', () => { + evaluateMathExpression(); + })); + + context.subscriptions.push(vscode.commands.registerCommand('emmet.incrementNumberByOneTenth', () => { + incrementDecrement(.1); + })); + + context.subscriptions.push(vscode.commands.registerCommand('emmet.incrementNumberByOne', () => { + incrementDecrement(1); + })); + + context.subscriptions.push(vscode.commands.registerCommand('emmet.incrementNumberByTen', () => { + incrementDecrement(10); + })); + + context.subscriptions.push(vscode.commands.registerCommand('emmet.decrementNumberByOneTenth', () => { + incrementDecrement(-0.1); + })); + + context.subscriptions.push(vscode.commands.registerCommand('emmet.decrementNumberByOne', () => { + incrementDecrement(-1); + })); + + context.subscriptions.push(vscode.commands.registerCommand('emmet.decrementNumberByTen', () => { + incrementDecrement(-10); + })); + + + + updateExtensionsPath(); + context.subscriptions.push(vscode.workspace.onDidChangeConfiguration(() => { + updateExtensionsPath(); + })); +} + +export function deactivate() { +} diff --git a/extensions/emmet/src/incrementDecrement.ts b/extensions/emmet/src/incrementDecrement.ts new file mode 100644 index 0000000000000..9f772b133eea2 --- /dev/null +++ b/extensions/emmet/src/incrementDecrement.ts @@ -0,0 +1,119 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +/* Based on @sergeche's work in his emmet plugin */ + +import * as vscode from 'vscode'; + +const reNumber = /[0-9]/; + +/** + * Incerement number under caret of given editor + * @param {Number} delta + */ +export function incrementDecrement(delta: number) { + let editor = vscode.window.activeTextEditor; + if (!editor) { + vscode.window.showInformationMessage('No editor is active'); + return; + } + + editor.edit(editBuilder => { + editor.selections.forEach(selection => { + let rangeToReplace: vscode.Range = selection; + if (selection.isEmpty) { + rangeToReplace = locate(editor.document, selection.isReversed ? selection.anchor : selection.active); + } + + const text = editor.document.getText(rangeToReplace); + if (isValidNumber(text)) { + editBuilder.replace(rangeToReplace, update(text, delta)); + } + }); + }); +} + +/** + * Updates given number with `delta` and returns string formatted according + * to original string format + * @param {String} numString + * @param {Number} delta + * @return {String} + */ +export function update(numString, delta): string { + let m; + let decimals = (m = numString.match(/\.(\d+)$/)) ? m[1].length : 1; + let output = String((parseFloat(numString) + delta).toFixed(decimals)).replace(/\.0+$/, ''); + + if (m = numString.match(/^\-?(0\d+)/)) { + // padded number: preserve padding + output = output.replace(/^(\-?)(\d+)/, (str, minus, prefix) => + minus + '0'.repeat(Math.max(0, m[1].length - prefix.length)) + prefix); + } + + if (/^\-?\./.test(numString)) { + // omit integer part + output = output.replace(/^(\-?)0+/, '$1'); + } + + return output; +} + +/** + * Locates number from given position in the document + * @param {document} Textdocument + * @param {Point} pos + * @return {Range} Range of number or `undefined` if not found + */ +export function locate(document: vscode.TextDocument, pos: vscode.Position) { + + const line = document.lineAt(pos.line).text; + let start = pos.character; + let end = pos.character; + let hadDot = false, hadMinus = false; + let ch; + + while (start > 0) { + ch = line[--start]; + if (ch === '-') { + hadMinus = true; + break; + } else if (ch === '.' && !hadDot) { + hadDot = true; + } else if (!reNumber.test(ch)) { + start++; + break; + } + } + + if (line[end] === '-' && !hadMinus) { + end++; + } + + while (end < line.length) { + ch = line[end++]; + if (ch === '.' && !hadDot && reNumber.test(line[end])) { + // A dot must be followed by a number. Otherwise stop parsing + hadDot = true; + } else if (!reNumber.test(ch)) { + end--; + break; + } + } + + // ensure that found range contains valid number + if (start !== end && isValidNumber(line.slice(start, end))) { + return new vscode.Range(pos.line, start, pos.line, end); + } +} + +/** + * Check if given string contains valid number + * @param {String} str + * @return {Boolean} + */ +function isValidNumber(str): boolean { + return str && !isNaN(parseFloat(str)); +} diff --git a/extensions/emmet/src/matchTag.ts b/extensions/emmet/src/matchTag.ts new file mode 100644 index 0000000000000..52222a157c9fa --- /dev/null +++ b/extensions/emmet/src/matchTag.ts @@ -0,0 +1,50 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { HtmlNode } from 'EmmetNode'; +import { getNode, parse, validate } from './util'; + +export function matchTag() { + let editor = vscode.window.activeTextEditor; + if (!validate(false)) { + return; + } + + let rootNode = parse(editor.document); + if (!rootNode) { + return; + } + + let updatedSelections = []; + editor.selections.forEach(selection => { + let updatedSelection = getUpdatedSelections(editor, selection.start, rootNode); + if (updatedSelection) { + updatedSelections.push(updatedSelection); + } + }); + if (updatedSelections.length > 0) { + editor.selections = updatedSelections; + editor.revealRange(editor.selections[updatedSelections.length - 1]); + } +} + +function getUpdatedSelections(editor: vscode.TextEditor, position: vscode.Position, rootNode: HtmlNode): vscode.Selection { + let currentNode = getNode(rootNode, position, true); + if (!currentNode) { + return; + } + + // If no closing tag or cursor is between open and close tag, then no-op + if (!currentNode.close || (position.isAfter(currentNode.open.end) && position.isBefore(currentNode.close.start))) { + return; + } + + // Place cursor inside the close tag if cursor is inside the open tag, else place it inside the open tag + let finalPosition = position.isBeforeOrEqual(currentNode.open.end) ? currentNode.close.start.translate(0, 2) : currentNode.open.start.translate(0, 1); + return new vscode.Selection(finalPosition, finalPosition); +} + + diff --git a/extensions/emmet/src/mergeLines.ts b/extensions/emmet/src/mergeLines.ts new file mode 100644 index 0000000000000..927db50d97196 --- /dev/null +++ b/extensions/emmet/src/mergeLines.ts @@ -0,0 +1,50 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { Node } from 'EmmetNode'; +import { getNode, parse, validate } from './util'; + +export function mergeLines() { + let editor = vscode.window.activeTextEditor; + if (!validate(false)) { + return; + } + + let rootNode = parse(editor.document); + if (!rootNode) { + return; + } + + editor.edit(editBuilder => { + editor.selections.reverse().forEach(selection => { + let [rangeToReplace, textToReplaceWith] = getRangesToReplace(editor.document, selection, rootNode); + if (rangeToReplace && textToReplaceWith) { + editBuilder.replace(rangeToReplace, textToReplaceWith); + } + }); + }); +} + +function getRangesToReplace(document: vscode.TextDocument, selection: vscode.Selection, rootNode: Node): [vscode.Range, string] { + let startNodeToUpdate: Node; + let endNodeToUpdate: Node; + + if (selection.isEmpty) { + startNodeToUpdate = endNodeToUpdate = getNode(rootNode, selection.start); + } else { + startNodeToUpdate = getNode(rootNode, selection.start, true); + endNodeToUpdate = getNode(rootNode, selection.end, true); + } + + if (!startNodeToUpdate || !endNodeToUpdate) { + return [null, null]; + } + + let rangeToReplace = new vscode.Range(startNodeToUpdate.start, endNodeToUpdate.end); + let textToReplaceWith = document.getText(rangeToReplace).replace(/\r\n|\n/g, '').replace(/>\s*<'); + + return [rangeToReplace, textToReplaceWith]; +} \ No newline at end of file diff --git a/extensions/emmet/src/removeTag.ts b/extensions/emmet/src/removeTag.ts new file mode 100644 index 0000000000000..4594db4202298 --- /dev/null +++ b/extensions/emmet/src/removeTag.ts @@ -0,0 +1,68 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { parse, validate, getNode } from './util'; +import { HtmlNode } from 'EmmetNode'; + +export function removeTag() { + let editor = vscode.window.activeTextEditor; + if (!validate(false)) { + return; + } + + let rootNode = parse(editor.document); + if (!rootNode) { + return; + } + + let indentInSpaces = ''; + for (let i = 0; i < editor.options.tabSize; i++) { + indentInSpaces += ' '; + } + + let rangesToRemove = []; + editor.selections.reverse().forEach(selection => { + rangesToRemove = rangesToRemove.concat(getRangeToRemove(editor, rootNode, selection, indentInSpaces)); + }); + + editor.edit(editBuilder => { + rangesToRemove.forEach(range => { + editBuilder.replace(range, ''); + }); + }); +} + +function getRangeToRemove(editor: vscode.TextEditor, rootNode: HtmlNode, selection: vscode.Selection, indentInSpaces: string): vscode.Range[] { + + let nodeToUpdate = getNode(rootNode, selection.start); + if (!nodeToUpdate) { + return []; + } + + let openRange = new vscode.Range(nodeToUpdate.open.start, nodeToUpdate.open.end); + let closeRange = null; + if (nodeToUpdate.close) { + closeRange = new vscode.Range(nodeToUpdate.close.start, nodeToUpdate.close.end); + } + + if (!openRange.contains(selection.start) && !closeRange.contains(selection.start)) { + return []; + } + let ranges = [openRange]; + if (closeRange) { + for (let i = openRange.start.line + 1; i <= closeRange.start.line; i++) { + let lineContent = editor.document.lineAt(i).text; + if (lineContent.startsWith('\t')) { + ranges.push(new vscode.Range(i, 0, i, 1)); + } else if (lineContent.startsWith(indentInSpaces)) { + ranges.push(new vscode.Range(i, 0, i, indentInSpaces.length)); + } + } + ranges.push(closeRange); + } + return ranges; +} + diff --git a/extensions/emmet/src/selectItem.ts b/extensions/emmet/src/selectItem.ts new file mode 100644 index 0000000000000..d15675d59a402 --- /dev/null +++ b/extensions/emmet/src/selectItem.ts @@ -0,0 +1,45 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { validate, parse } from './util'; +import { nextItemHTML, prevItemHTML } from './selectItemHTML'; +import { nextItemStylesheet, prevItemStylesheet } from './selectItemStylesheet'; +import { isStyleSheet } from 'vscode-emmet-helper'; + + +export function fetchSelectItem(direction: string): void { + let editor = vscode.window.activeTextEditor; + if (!validate()) { + return; + } + + let nextItem; + let prevItem; + + if (isStyleSheet(editor.document.languageId)) { + nextItem = nextItemStylesheet; + prevItem = prevItemStylesheet; + } else { + nextItem = nextItemHTML; + prevItem = prevItemHTML; + } + + let rootNode = parse(editor.document); + if (!rootNode) { + return; + } + + let newSelections: vscode.Selection[] = []; + editor.selections.forEach(selection => { + const selectionStart = selection.isReversed ? selection.active : selection.anchor; + const selectionEnd = selection.isReversed ? selection.anchor : selection.active; + + let updatedSelection = direction === 'next' ? nextItem(selectionStart, selectionEnd, editor, rootNode) : prevItem(selectionStart, selectionEnd, editor, rootNode); + newSelections.push(updatedSelection ? updatedSelection : selection); + }); + editor.selections = newSelections; + editor.revealRange(editor.selections[editor.selections.length - 1]); +} \ No newline at end of file diff --git a/extensions/emmet/src/selectItemHTML.ts b/extensions/emmet/src/selectItemHTML.ts new file mode 100644 index 0000000000000..1b234e2f34944 --- /dev/null +++ b/extensions/emmet/src/selectItemHTML.ts @@ -0,0 +1,200 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { getDeepestNode, findNextWord, findPrevWord, getNode } from './util'; +import { HtmlNode } from 'EmmetNode'; + +export function nextItemHTML(selectionStart: vscode.Position, selectionEnd: vscode.Position, editor: vscode.TextEditor, rootNode: HtmlNode): vscode.Selection { + let currentNode = getNode(rootNode, selectionEnd); + let nextNode: HtmlNode; + + if (!currentNode) { + return; + } + + if (currentNode.type !== 'comment') { + // If cursor is in the tag name, select tag + if (selectionEnd.isBefore(currentNode.open.start.translate(0, currentNode.name.length))) { + return getSelectionFromNode(currentNode, editor.document); + } + + // If cursor is in the open tag, look for attributes + if (selectionEnd.isBefore(currentNode.open.end)) { + let attrSelection = getNextAttribute(selectionStart, selectionEnd, editor.document, currentNode); + if (attrSelection) { + return attrSelection; + } + } + + // Get the first child of current node which is right after the cursor and is not a comment + nextNode = currentNode.firstChild; + while (nextNode && (selectionEnd.isAfterOrEqual(nextNode.start) || nextNode.type === 'comment')) { + nextNode = nextNode.nextSibling; + } + } + + + // Get next sibling of current node which is not a comment. If none is found try the same on the parent + while (!nextNode && currentNode) { + if (currentNode.nextSibling) { + if (currentNode.nextSibling.type !== 'comment') { + nextNode = currentNode.nextSibling; + } else { + currentNode = currentNode.nextSibling; + } + } else { + currentNode = currentNode.parent; + } + } + + return getSelectionFromNode(nextNode, editor.document); +} + +export function prevItemHTML(selectionStart: vscode.Position, selectionEnd: vscode.Position, editor: vscode.TextEditor, rootNode: HtmlNode): vscode.Selection { + let currentNode = getNode(rootNode, selectionStart); + let prevNode: HtmlNode; + + if (!currentNode) { + return; + } + + if (currentNode.type !== 'comment' && selectionStart.translate(0, -1).isAfter(currentNode.open.start)) { + + if (selectionStart.isBefore(currentNode.open.end) || !currentNode.firstChild) { + prevNode = currentNode; + } else { + // Select the child that appears just before the cursor and is not a comment + prevNode = currentNode.firstChild; + let oldOption: HtmlNode; + while (prevNode.nextSibling && selectionStart.isAfterOrEqual(prevNode.nextSibling.end)) { + if (prevNode && prevNode.type !== 'comment') { + oldOption = prevNode; + } + prevNode = prevNode.nextSibling; + } + + prevNode = getDeepestNode((prevNode && prevNode.type !== 'comment') ? prevNode : oldOption); + } + } + + // Select previous sibling which is not a comment. If none found, then select parent + while (!prevNode && currentNode) { + if (currentNode.previousSibling) { + if (currentNode.previousSibling.type !== 'comment') { + prevNode = getDeepestNode(currentNode.previousSibling); + } else { + currentNode = currentNode.previousSibling; + } + } else { + prevNode = currentNode.parent; + } + + } + + let attrSelection = getPrevAttribute(selectionStart, selectionEnd, editor.document, prevNode); + return attrSelection ? attrSelection : getSelectionFromNode(prevNode, editor.document); +} + +function getSelectionFromNode(node: HtmlNode, document: vscode.TextDocument): vscode.Selection { + if (node && node.open) { + let selectionStart = (node.open.start).translate(0, 1); + let selectionEnd = selectionStart.translate(0, node.name.length); + + return new vscode.Selection(selectionStart, selectionEnd); + } +} + +function getNextAttribute(selectionStart: vscode.Position, selectionEnd: vscode.Position, document: vscode.TextDocument, node: HtmlNode): vscode.Selection { + + if (!node.attributes || node.attributes.length === 0 || node.type === 'comment') { + return; + } + + for (let i = 0; i < node.attributes.length; i++) { + let attr = node.attributes[i]; + + if (selectionEnd.isBefore(attr.start)) { + // select full attr + return new vscode.Selection(attr.start, attr.end); + } + + if (!attr.value || (attr.value.start).isEqual(attr.value.end)) { + // No attr value to select + continue; + } + + if ((selectionStart.isEqual(attr.start) && selectionEnd.isEqual(attr.end)) || selectionEnd.isBefore(attr.value.start)) { + // cursor is in attr name, so select full attr value + return new vscode.Selection(attr.value.start, attr.value.end); + } + + // Fetch the next word in the attr value + + if (attr.value.toString().indexOf(' ') === -1) { + // attr value does not have space, so no next word to find + continue; + } + + let pos = undefined; + if (selectionStart.isEqual(attr.value.start) && selectionEnd.isEqual(attr.value.end)) { + pos = -1; + } + if (pos === undefined && selectionEnd.isBefore(attr.end)) { + pos = selectionEnd.character - attr.value.start.character - 1; + } + + if (pos !== undefined) { + let [newSelectionStartOffset, newSelectionEndOffset] = findNextWord(attr.value.toString(), pos); + if (newSelectionStartOffset >= 0 && newSelectionEndOffset >= 0) { + const newSelectionStart = (attr.value.start).translate(0, newSelectionStartOffset); + const newSelectionEnd = (attr.value.start).translate(0, newSelectionEndOffset); + return new vscode.Selection(newSelectionStart, newSelectionEnd); + } + } + + } +} + +function getPrevAttribute(selectionStart: vscode.Position, selectionEnd: vscode.Position, document: vscode.TextDocument, node: HtmlNode): vscode.Selection { + + if (!node.attributes || node.attributes.length === 0 || node.type === 'comment') { + return; + } + + for (let i = node.attributes.length - 1; i >= 0; i--) { + let attr = node.attributes[i]; + + if (selectionStart.isBeforeOrEqual(attr.start)) { + continue; + } + + if (!attr.value || (attr.value.start).isEqual(attr.value.end) || selectionStart.isBefore(attr.value.start)) { + // select full attr + return new vscode.Selection(attr.start, attr.end); + } + + if (selectionStart.isEqual(attr.value.start)) { + if (selectionEnd.isAfterOrEqual(attr.value.end)) { + // select full attr + return new vscode.Selection(attr.start, attr.end); + } + // select attr value + return new vscode.Selection(attr.value.start, attr.value.end); + } + + // Fetch the prev word in the attr value + + let pos = selectionStart.isAfter(attr.value.end) ? attr.value.toString().length : selectionStart.character - attr.value.start.character; + let [newSelectionStartOffset, newSelectionEndOffset] = findPrevWord(attr.value.toString(), pos); + if (newSelectionStartOffset >= 0 && newSelectionEndOffset >= 0) { + const newSelectionStart = (attr.value.start).translate(0, newSelectionStartOffset); + const newSelectionEnd = (attr.value.start).translate(0, newSelectionEndOffset); + return new vscode.Selection(newSelectionStart, newSelectionEnd); + } + + + } +} \ No newline at end of file diff --git a/extensions/emmet/src/selectItemStylesheet.ts b/extensions/emmet/src/selectItemStylesheet.ts new file mode 100644 index 0000000000000..09f0d6103a9cd --- /dev/null +++ b/extensions/emmet/src/selectItemStylesheet.ts @@ -0,0 +1,142 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { getDeepestNode, findNextWord, findPrevWord, getNode } from './util'; +import { Node, CssNode, Rule, Property } from 'EmmetNode'; + +export function nextItemStylesheet(startOffset: vscode.Position, endOffset: vscode.Position, editor: vscode.TextEditor, rootNode: Node): vscode.Selection { + let currentNode = getNode(rootNode, endOffset, true); + if (!currentNode) { + currentNode = rootNode; + } + if (!currentNode) { + return; + } + // Full property is selected, so select full property value next + if (currentNode.type === 'property' && startOffset.isEqual(currentNode.start) && endOffset.isEqual(currentNode.end)) { + return getSelectionFromProperty(currentNode, editor.document, startOffset, endOffset, true, 'next'); + } + + // Part or whole of propertyValue is selected, so select the next word in the propertyValue + if (currentNode.type === 'property' && startOffset.isAfterOrEqual((currentNode).valueToken.start) && endOffset.isBeforeOrEqual((currentNode).valueToken.end)) { + let singlePropertyValue = getSelectionFromProperty(currentNode, editor.document, startOffset, endOffset, false, 'next'); + if (singlePropertyValue) { + return singlePropertyValue; + } + } + + // Cursor is in the selector or in a property + if ((currentNode.type === 'rule' && endOffset.isBefore((currentNode).selectorToken.end)) + || (currentNode.type === 'property' && endOffset.isBefore((currentNode).valueToken.end))) { + return getSelectionFromNode(currentNode, editor.document); + } + + // Get the first child of current node which is right after the cursor + let nextNode = currentNode.firstChild; + while (nextNode && endOffset.isAfterOrEqual(nextNode.end)) { + nextNode = nextNode.nextSibling; + } + + // Get next sibling of current node or the parent + while (!nextNode && currentNode) { + nextNode = currentNode.nextSibling; + currentNode = currentNode.parent; + } + + return getSelectionFromNode(nextNode, editor.document); + +} + +export function prevItemStylesheet(startOffset: vscode.Position, endOffset: vscode.Position, editor: vscode.TextEditor, rootNode: CssNode): vscode.Selection { + let currentNode = getNode(rootNode, startOffset); + if (!currentNode) { + currentNode = rootNode; + } + if (!currentNode) { + return; + } + + // Full property value is selected, so select the whole property next + if (currentNode.type === 'property' && startOffset.isEqual((currentNode).valueToken.start) && endOffset.isEqual((currentNode).valueToken.end)) { + return getSelectionFromNode(currentNode, editor.document); + } + + // Part of propertyValue is selected, so select the prev word in the propertyValue + if (currentNode.type === 'property' && startOffset.isAfterOrEqual((currentNode).valueToken.start) && endOffset.isBeforeOrEqual((currentNode).valueToken.end)) { + let singlePropertyValue = getSelectionFromProperty(currentNode, editor.document, startOffset, endOffset, false, 'prev'); + if (singlePropertyValue) { + return singlePropertyValue; + } + } + + if (currentNode.type === 'property' || !currentNode.firstChild || (currentNode.type === 'rule' && startOffset.isBeforeOrEqual(currentNode.firstChild.start))) { + return getSelectionFromNode(currentNode, editor.document); + } + + // Select the child that appears just before the cursor + let prevNode = currentNode.firstChild; + while (prevNode.nextSibling && startOffset.isAfterOrEqual(prevNode.nextSibling.end)) { + prevNode = prevNode.nextSibling; + } + prevNode = getDeepestNode(prevNode); + + return getSelectionFromProperty(prevNode, editor.document, startOffset, endOffset, false, 'prev'); + +} + + +function getSelectionFromNode(node: Node, document: vscode.TextDocument): vscode.Selection { + if (!node) { + return; + } + + let nodeToSelect = node.type === 'rule' ? (node).selectorToken : node; + return new vscode.Selection(nodeToSelect.start, nodeToSelect.end); +} + + +function getSelectionFromProperty(node: Node, document: vscode.TextDocument, selectionStart: vscode.Position, selectionEnd: vscode.Position, selectFullValue: boolean, direction: string): vscode.Selection { + if (!node || node.type !== 'property') { + return; + } + const propertyNode = node; + + let propertyValue = propertyNode.valueToken.stream.substring(propertyNode.valueToken.start, propertyNode.valueToken.end); + selectFullValue = selectFullValue || (direction === 'prev' && selectionStart.isEqual(propertyNode.valueToken.start) && selectionEnd.isBefore(propertyNode.valueToken.end)); + + if (selectFullValue) { + return new vscode.Selection(propertyNode.valueToken.start, propertyNode.valueToken.end); + } + + let pos; + if (direction === 'prev') { + if (selectionStart.isEqual(propertyNode.valueToken.start)) { + return; + } + pos = selectionStart.isAfter(propertyNode.valueToken.end) ? propertyValue.length : selectionStart.character - propertyNode.valueToken.start.character; + } + + if (direction === 'next') { + if (selectionEnd.isEqual(propertyNode.valueToken.end) && (selectionStart.isAfter(propertyNode.valueToken.start) || propertyValue.indexOf(' ') === -1)) { + return; + } + pos = selectionEnd.isEqual(propertyNode.valueToken.end) ? -1 : selectionEnd.character - propertyNode.valueToken.start.character - 1; + } + + + let [newSelectionStartOffset, newSelectionEndOffset] = direction === 'prev' ? findPrevWord(propertyValue, pos) : findNextWord(propertyValue, pos); + if (!newSelectionStartOffset && !newSelectionEndOffset) { + return; + } + + const newSelectionStart = (propertyNode.valueToken.start).translate(0, newSelectionStartOffset); + const newSelectionEnd = (propertyNode.valueToken.start).translate(0, newSelectionEndOffset); + + return new vscode.Selection(newSelectionStart, newSelectionEnd); +} + + + diff --git a/extensions/emmet/src/splitJoinTag.ts b/extensions/emmet/src/splitJoinTag.ts new file mode 100644 index 0000000000000..cdbed5a572e88 --- /dev/null +++ b/extensions/emmet/src/splitJoinTag.ts @@ -0,0 +1,58 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import Node from '@emmetio/node'; +import { getNode, parse, validate } from './util'; + +export function splitJoinTag() { + let editor = vscode.window.activeTextEditor; + if (!validate(false)) { + return; + } + + let rootNode = parse(editor.document); + if (!rootNode) { + return; + } + + editor.edit(editBuilder => { + editor.selections.reverse().forEach(selection => { + let [rangeToReplace, textToReplaceWith] = getRangesToReplace(editor.document, selection, rootNode); + if (rangeToReplace && textToReplaceWith) { + editBuilder.replace(rangeToReplace, textToReplaceWith); + } + }); + }); +} + +function getRangesToReplace(document: vscode.TextDocument, selection: vscode.Selection, rootNode: Node): [vscode.Range, string] { + let nodeToUpdate: Node = getNode(rootNode, selection.start); + let rangeToReplace: vscode.Range; + let textToReplaceWith: string; + + if (!nodeToUpdate) { + return [null, null]; + } + + if (!nodeToUpdate.close) { + // Split Tag + let nodeText = document.getText(new vscode.Range(nodeToUpdate.start, nodeToUpdate.end)); + let m = nodeText.match(/(\s*\/)?>$/); + let end = nodeToUpdate.end; + let start = m ? end.translate(0, -m[0].length) : end; + + rangeToReplace = new vscode.Range(start, end); + textToReplaceWith = `>`; + } else { + // Join Tag + let start = (nodeToUpdate.open.end).translate(0, -1); + let end = nodeToUpdate.end; + rangeToReplace = new vscode.Range(start, end); + textToReplaceWith = '/>'; + } + + return [rangeToReplace, textToReplaceWith]; +} \ No newline at end of file diff --git a/extensions/emmet/src/toggleComment.ts b/extensions/emmet/src/toggleComment.ts new file mode 100644 index 0000000000000..8f9200b96c5a4 --- /dev/null +++ b/extensions/emmet/src/toggleComment.ts @@ -0,0 +1,130 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { getNodesInBetween, getNode, parse } from './util'; +import { Node, Stylesheet } from 'EmmetNode'; +import { isStyleSheet } from 'vscode-emmet-helper'; + +const startCommentStylesheet = '/*'; +const endCommentStylesheet = '*/'; +const startCommentHTML = ''; + +export function toggleComment() { + let editor = vscode.window.activeTextEditor; + if (!editor) { + vscode.window.showInformationMessage('No editor is active'); + return; + } + + let toggleCommentInternal; + let startComment; + let endComment; + + if (isStyleSheet(editor.document.languageId)) { + toggleCommentInternal = toggleCommentStylesheet; + startComment = startCommentStylesheet; + endComment = endCommentStylesheet; + } else { + toggleCommentInternal = toggleCommentHTML; + startComment = startCommentHTML; + endComment = endCommentHTML; + } + + let rootNode = parse(editor.document); + if (!rootNode) { + return; + } + + editor.edit(editBuilder => { + editor.selections.reverse().forEach(selection => { + let [rangesToUnComment, rangeToComment] = toggleCommentInternal(editor.document, selection, rootNode); + rangesToUnComment.forEach((rangeToUnComment: vscode.Range) => { + editBuilder.delete(new vscode.Range(rangeToUnComment.start, rangeToUnComment.start.translate(0, startComment.length))); + editBuilder.delete(new vscode.Range(rangeToUnComment.end.translate(0, -endComment.length), rangeToUnComment.end)); + }); + if (rangeToComment) { + editBuilder.insert(rangeToComment.start, startComment); + editBuilder.insert(rangeToComment.end, endComment); + } + + }); + }); +} + +function toggleCommentHTML(document: vscode.TextDocument, selection: vscode.Selection, rootNode: Node): [vscode.Range[], vscode.Range] { + const selectionStart = selection.isReversed ? selection.active : selection.anchor; + const selectionEnd = selection.isReversed ? selection.anchor : selection.active; + + let startNode = getNode(rootNode, selectionStart, true); + let endNode = getNode(rootNode, selectionEnd, true); + + if (!startNode || !endNode) { + return [[], null]; + } + + let allNodes: Node[] = getNodesInBetween(startNode, endNode); + let rangesToUnComment: vscode.Range[] = []; + + allNodes.forEach(node => { + rangesToUnComment = rangesToUnComment.concat(getRangesToUnCommentHTML(node, document)); + }); + + if (startNode.type === 'comment') { + return [rangesToUnComment, null]; + } + + let rangeToComment = new vscode.Range(allNodes[0].start, allNodes[allNodes.length - 1].end); + return [rangesToUnComment, rangeToComment]; +} + +function getRangesToUnCommentHTML(node: Node, document: vscode.TextDocument): vscode.Range[] { + let rangesToUnComment = []; + + // If current node is commented, then uncomment and return + if (node.type === 'comment') { + rangesToUnComment.push(new vscode.Range(node.start, node.end)); + + return rangesToUnComment; + } + + // All children of current node should be uncommented + node.children.forEach(childNode => { + rangesToUnComment = rangesToUnComment.concat(getRangesToUnCommentHTML(childNode, document)); + }); + + return rangesToUnComment; +} + +function toggleCommentStylesheet(document: vscode.TextDocument, selection: vscode.Selection, rootNode: Stylesheet): [vscode.Range[], vscode.Range] { + + const selectionStart = selection.isReversed ? selection.active : selection.anchor; + const selectionEnd = selection.isReversed ? selection.anchor : selection.active; + + let startNode = getNode(rootNode, selectionStart, true); + let endNode = getNode(rootNode, selectionEnd, true); + let rangesToUnComment: vscode.Range[] = []; + + let isFirstNodeCommented = false; + + // Uncomment the comments that intersect with the selection. + rootNode.comments.forEach(comment => { + if (!isFirstNodeCommented) { + isFirstNodeCommented = (selectionStart.isAfterOrEqual(comment.start) && selectionEnd.isBefore(comment.end)); + } + + if (selection.contains(comment.start) + || selection.contains(comment.end) + || (selectionStart.isAfterOrEqual(comment.start) && selectionEnd.isBefore(comment.end))) { + rangesToUnComment.push(new vscode.Range(comment.start, comment.end)); + } + }); + + let rangeToComment = isFirstNodeCommented ? null : new vscode.Range(startNode ? startNode.start : selectionStart, endNode ? endNode.end : selectionEnd); + return [rangesToUnComment, rangeToComment]; + + +} diff --git a/extensions/emmet/src/typings/EmmetNode.d.ts b/extensions/emmet/src/typings/EmmetNode.d.ts new file mode 100644 index 0000000000000..dd84cc068d369 --- /dev/null +++ b/extensions/emmet/src/typings/EmmetNode.d.ts @@ -0,0 +1,77 @@ +/*--------------------------------------------------------------------------------------------- +* Copyright (c) Microsoft Corporation. All rights reserved. +* Licensed under the MIT License. See License.txt in the project root for license information. +*--------------------------------------------------------------------------------------------*/ + +declare module 'EmmetNode' { + import { Position } from 'vscode'; + + export interface Node { + start: Position + end: Position + type: string + parent: Node + firstChild: Node + nextSibling: Node + previousSibling: Node + children: Node[] + } + + export interface Token { + start: Position + end: Position + stream: BufferStream + toString(): string + } + + export interface Attribute extends Token { + name: string + value: Token + } + + export interface HtmlNode extends Node { + name: string + open: Token + close: Token + parent: HtmlNode + firstChild: HtmlNode + nextSibling: HtmlNode + previousSibling: HtmlNode + children: HtmlNode[] + attributes: Attribute[] + } + + export interface CssNode extends Node { + parent: CssNode + firstChild: CssNode + nextSibling: CssNode + previousSibling: CssNode + children: CssNode[] + } + + export interface Rule extends CssNode { + selectorToken: Token + } + + export interface Property extends CssNode { + valueToken: Token + } + + export interface Stylesheet extends Node { + comments: Token[] + } + + export interface BufferStream { + peek(): number + next(): number + backUp(n: number): number + current(): string + substring(from: Position, to: Position): string + eat(match): boolean + eatWhile(match): boolean + } +} + + + + diff --git a/extensions/emmet/src/typings/refs.d.ts b/extensions/emmet/src/typings/refs.d.ts new file mode 100644 index 0000000000000..0188b6f9ffced --- /dev/null +++ b/extensions/emmet/src/typings/refs.d.ts @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +/// +/// +/// diff --git a/extensions/emmet/src/updateTag.ts b/extensions/emmet/src/updateTag.ts new file mode 100644 index 0000000000000..c77eb1614058f --- /dev/null +++ b/extensions/emmet/src/updateTag.ts @@ -0,0 +1,50 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { HtmlNode } from 'EmmetNode'; +import { getNode, parse, validate } from './util'; + +export function updateTag(tagName: string) { + let editor = vscode.window.activeTextEditor; + if (!validate(false)) { + return; + } + let rootNode = parse(editor.document); + if (!rootNode) { + return; + } + + let rangesToUpdate = []; + editor.selections.reverse().forEach(selection => { + rangesToUpdate = rangesToUpdate.concat(getRangesToUpdate(editor, selection, rootNode)); + }); + + editor.edit(editBuilder => { + rangesToUpdate.forEach(range => { + editBuilder.replace(range, tagName); + }); + }); +} + +function getRangesToUpdate(editor: vscode.TextEditor, selection: vscode.Selection, rootNode: HtmlNode): vscode.Range[] { + let nodeToUpdate = getNode(rootNode, selection.start); + if (!nodeToUpdate) { + return []; + } + + let openStart = nodeToUpdate.open.start.translate(0, 1); + let openEnd = openStart.translate(0, nodeToUpdate.name.length); + + let ranges = [new vscode.Range(openStart, openEnd)]; + if (nodeToUpdate.close) { + let closeStart = nodeToUpdate.close.start.translate(0, 2); + let closeEnd = nodeToUpdate.close.end.translate(0, -1); + ranges.push(new vscode.Range(closeStart, closeEnd)); + } + return ranges; +} + + diff --git a/extensions/emmet/src/util.ts b/extensions/emmet/src/util.ts new file mode 100644 index 0000000000000..eb11b4873e2d1 --- /dev/null +++ b/extensions/emmet/src/util.ts @@ -0,0 +1,255 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import parse from '@emmetio/html-matcher'; +import parseStylesheet from '@emmetio/css-parser'; +import { Node, HtmlNode } from 'EmmetNode'; +import { DocumentStreamReader } from './bufferStream'; +import { isStyleSheet } from 'vscode-emmet-helper'; + +export const LANGUAGE_MODES: Object = { + 'html': ['!', '.', '}', ':', '*', '$'], + 'jade': ['!', '.', '}', ':', '*', '$'], + 'slim': ['!', '.', '}', ':', '*', '$'], + 'haml': ['!', '.', '}', ':', '*', '$'], + 'xml': ['.', '}', '*', '$'], + 'xsl': ['.', '}', '*', '$'], + 'css': [':'], + 'scss': [':'], + 'sass': [':'], + 'less': [':'], + 'stylus': [':'], + 'javascriptreact': ['.', '}', '*', '$'], + 'typescriptreact': ['.', '}', '*', '$'] +}; + +// Explicitly map languages that have built-in grammar in VS Code to their parent language +// to get emmet completion support +// For other languages, users will have to use `emmet.includeLanguages` or +// language specific extensions can provide emmet completion support +export const MAPPED_MODES: Object = { + 'handlebars': 'html', + 'php': 'html' +}; + +export function validate(allowStylesheet: boolean = true): boolean { + let editor = vscode.window.activeTextEditor; + if (!editor) { + vscode.window.showInformationMessage('No editor is active'); + return false; + } + if (!allowStylesheet && isStyleSheet(editor.document.languageId)) { + return false; + } + return true; +} + +export function getMappingForIncludedLanguages(): any { + let finalMappedModes = {}; + let includeLanguagesConfig = vscode.workspace.getConfiguration('emmet')['includeLanguages']; + let includeLanguages = Object.assign({}, MAPPED_MODES, includeLanguagesConfig ? includeLanguagesConfig : {}); + Object.keys(includeLanguages).forEach(syntax => { + if (typeof includeLanguages[syntax] === 'string' && LANGUAGE_MODES[includeLanguages[syntax]]) { + finalMappedModes[syntax] = includeLanguages[syntax]; + } + }); + return finalMappedModes; +} + +/** + * Parses the given document using emmet parsing modules + * @param document + */ +export function parse(document: vscode.TextDocument, showError: boolean = true): Node { + let parseContent = isStyleSheet(document.languageId) ? parseStylesheet : parse; + let rootNode: Node; + try { + rootNode = parseContent(new DocumentStreamReader(document)); + } catch (e) { + if (showError) { + vscode.window.showErrorMessage('Emmet: Failed to parse the file'); + } + } + return rootNode; +} + +/** + * Returns node corresponding to given position in the given root node + * @param root + * @param position + * @param includeNodeBoundary + */ +export function getNode(root: Node, position: vscode.Position, includeNodeBoundary: boolean = false) { + let currentNode = root.firstChild; + let foundNode: Node = null; + + while (currentNode) { + const nodeStart: vscode.Position = currentNode.start; + const nodeEnd: vscode.Position = currentNode.end; + if ((nodeStart.isBefore(position) && nodeEnd.isAfter(position)) + || (includeNodeBoundary && (nodeStart.isBeforeOrEqual(position) && nodeEnd.isAfterOrEqual(position)))) { + + foundNode = currentNode; + // Dig deeper + currentNode = currentNode.firstChild; + } else { + currentNode = currentNode.nextSibling; + } + } + + return foundNode; +} + +/** + * Returns inner range of an html node. + * @param currentNode + */ +export function getInnerRange(currentNode: HtmlNode): vscode.Range { + if (!currentNode.close) { + return; + } + return new vscode.Range(currentNode.open.end, currentNode.close.start); +} + +export function getDeepestNode(node: Node): Node { + if (!node || !node.children || node.children.length === 0 || !node.children.find(x => x.type !== 'comment')) { + return node; + } + for (let i = node.children.length - 1; i >= 0; i--) { + if (node.children[i].type !== 'comment') { + return getDeepestNode(node.children[i]); + } + } +} + +export function findNextWord(propertyValue: string, pos: number): [number, number] { + + let foundSpace = pos === -1; + let foundStart = false; + let foundEnd = false; + + let newSelectionStart; + let newSelectionEnd; + while (pos < propertyValue.length - 1) { + pos++; + if (!foundSpace) { + if (propertyValue[pos] === ' ') { + foundSpace = true; + } + continue; + } + if (foundSpace && !foundStart && propertyValue[pos] === ' ') { + continue; + } + if (!foundStart) { + newSelectionStart = pos; + foundStart = true; + continue; + } + if (propertyValue[pos] === ' ') { + newSelectionEnd = pos; + foundEnd = true; + break; + } + } + + if (foundStart && !foundEnd) { + newSelectionEnd = propertyValue.length; + } + + return [newSelectionStart, newSelectionEnd]; +} + +export function findPrevWord(propertyValue: string, pos: number): [number, number] { + + let foundSpace = pos === propertyValue.length; + let foundStart = false; + let foundEnd = false; + + let newSelectionStart; + let newSelectionEnd; + while (pos > -1) { + pos--; + if (!foundSpace) { + if (propertyValue[pos] === ' ') { + foundSpace = true; + } + continue; + } + if (foundSpace && !foundEnd && propertyValue[pos] === ' ') { + continue; + } + if (!foundEnd) { + newSelectionEnd = pos + 1; + foundEnd = true; + continue; + } + if (propertyValue[pos] === ' ') { + newSelectionStart = pos + 1; + foundStart = true; + break; + } + } + + if (foundEnd && !foundStart) { + newSelectionStart = 0; + } + + return [newSelectionStart, newSelectionEnd]; +} + +export function getNodesInBetween(node1: Node, node2: Node): Node[] { + // Same node + if (sameNodes(node1, node2)) { + return [node1]; + } + + // Same parent + if (sameNodes(node1.parent, node2.parent)) { + return getNextSiblingsTillPosition(node1, node2.end); + } + + // node2 is ancestor of node1 + if (node2.start.isBefore(node1.start)) { + return [node2]; + } + + // node1 is ancestor of node2 + if (node2.start.isBefore(node1.end)) { + return [node1]; + } + + // Get the highest ancestor of node1 that should be commented + while (node1.parent && node1.parent.end.isBefore(node2.start)) { + node1 = node1.parent; + } + + // Get the highest ancestor of node2 that should be commented + while (node2.parent && node2.parent.start.isAfter(node1.start)) { + node2 = node2.parent; + } + + return getNextSiblingsTillPosition(node1, node2.end); +} + +function getNextSiblingsTillPosition(node: Node, position: vscode.Position): Node[] { + let siblings: Node[] = []; + let currentNode = node; + while (currentNode && position.isAfter(currentNode.start)) { + siblings.push(currentNode); + currentNode = currentNode.nextSibling; + } + return siblings; +} + +export function sameNodes(node1: Node, node2: Node): boolean { + if (!node1 || !node2) { + return false; + } + return (node1.start).isEqual(node2.start) && (node1.end).isEqual(node2.end); +} + + diff --git a/extensions/emmet/tsconfig.json b/extensions/emmet/tsconfig.json new file mode 100644 index 0000000000000..06d04868a7010 --- /dev/null +++ b/extensions/emmet/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "target": "es6", + "lib": [ + "es2016" + ], + "module": "commonjs", + "outDir": "./out" + + }, + "exclude": [ + "node_modules", + ".vscode-test" + ], + "include": [ + "src/**/*" + ] +} \ No newline at end of file diff --git a/extensions/extension-editing/.vscodeignore b/extensions/extension-editing/.vscodeignore new file mode 100644 index 0000000000000..24428a6f7582d --- /dev/null +++ b/extensions/extension-editing/.vscodeignore @@ -0,0 +1,4 @@ +test/** +src/** +tsconfig.json +npm-shrinkwrap.json \ No newline at end of file diff --git a/extensions/extension-editing/npm-shrinkwrap.json b/extensions/extension-editing/npm-shrinkwrap.json index 08f1d9351e7e6..c546fa26f89bd 100644 --- a/extensions/extension-editing/npm-shrinkwrap.json +++ b/extensions/extension-editing/npm-shrinkwrap.json @@ -1,15 +1,61 @@ { - "name": "extension-editing", - "version": "0.0.1", - "dependencies": { - "jsonc-parser": { - "version": "0.3.1", - "from": "jsonc-parser@0.3.1" - }, - "vscode-nls": { - "version": "2.0.2", - "from": "vscode-nls@>=2.0.2 <3.0.0", - "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-2.0.2.tgz" - } - } -} \ No newline at end of file + "name": "extension-editing", + "version": "0.0.1", + "dependencies": { + "@types/node": { + "version": "6.0.78", + "from": "@types/node@>=6.0.46 <7.0.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.78.tgz" + }, + "argparse": { + "version": "1.0.9", + "from": "argparse@>=1.0.7 <2.0.0", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz" + }, + "entities": { + "version": "1.1.1", + "from": "entities@>=1.1.1 <1.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz" + }, + "jsonc-parser": { + "version": "0.3.1", + "from": "jsonc-parser@>=0.3.1 <0.4.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-0.3.1.tgz" + }, + "linkify-it": { + "version": "2.0.3", + "from": "linkify-it@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.0.3.tgz" + }, + "markdown-it": { + "version": "8.3.1", + "from": "markdown-it@>=8.3.1 <9.0.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.3.1.tgz" + }, + "mdurl": { + "version": "1.0.1", + "from": "mdurl@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz" + }, + "parse5": { + "version": "3.0.2", + "from": "parse5@>=3.0.2 <4.0.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-3.0.2.tgz" + }, + "sprintf-js": { + "version": "1.0.3", + "from": "sprintf-js@>=1.0.2 <1.1.0", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" + }, + "uc.micro": { + "version": "1.0.3", + "from": "uc.micro@>=1.0.3 <2.0.0", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.3.tgz" + }, + "vscode-nls": { + "version": "2.0.2", + "from": "vscode-nls@>=2.0.1 <3.0.0", + "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-2.0.2.tgz" + } + } +} diff --git a/extensions/extension-editing/package.json b/extensions/extension-editing/package.json index a5aa159da05d1..36f1ae658ab31 100644 --- a/extensions/extension-editing/package.json +++ b/extensions/extension-editing/package.json @@ -11,6 +11,7 @@ ], "activationEvents": [ "onLanguage:json", + "onLanguage:markdown", "onLanguage:typescript" ], "main": "./out/extension", @@ -20,6 +21,8 @@ }, "dependencies": { "jsonc-parser": "^0.3.1", + "markdown-it": "^8.3.1", + "parse5": "^3.0.2", "vscode-nls": "^2.0.1" }, "contributes": { @@ -43,6 +46,7 @@ ] }, "devDependencies": { + "@types/markdown-it": "0.0.2", "@types/node": "^7.0.4" } -} \ No newline at end of file +} diff --git a/extensions/extension-editing/src/extension.ts b/extensions/extension-editing/src/extension.ts index cda1ed07ce997..9e648bc9264e3 100644 --- a/extensions/extension-editing/src/extension.ts +++ b/extensions/extension-editing/src/extension.ts @@ -8,6 +8,7 @@ import * as vscode from 'vscode'; import * as ts from 'typescript'; import { PackageDocument } from './packageDocumentHelper'; +import { ExtensionLinter } from './extensionLinter'; export function activate(context: vscode.ExtensionContext) { const registration = vscode.languages.registerDocumentLinkProvider({ language: 'typescript', pattern: '**/vscode.d.ts' }, _linkProvider); @@ -15,6 +16,8 @@ export function activate(context: vscode.ExtensionContext) { //package.json suggestions context.subscriptions.push(registerPackageDocumentCompletions()); + + context.subscriptions.push(new ExtensionLinter(context)); } const _linkProvider = new class implements vscode.DocumentLinkProvider { @@ -74,7 +77,7 @@ namespace ast { const spans: number[] = []; ts.forEachChild(sourceFile, function visit(node: ts.Node) { - const declIdent = (node).name; + const declIdent = (node).name; if (declIdent && declIdent.kind === ts.SyntaxKind.Identifier) { identifiers.push((declIdent).text); spans.push(node.pos, node.end); diff --git a/extensions/extension-editing/src/extensionLinter.ts b/extensions/extension-editing/src/extensionLinter.ts new file mode 100644 index 0000000000000..27bd4e1d2a21d --- /dev/null +++ b/extensions/extension-editing/src/extensionLinter.ts @@ -0,0 +1,352 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as fs from 'fs'; +import * as path from 'path'; + +import { parseTree, findNodeAtLocation, Node as JsonNode } from 'jsonc-parser'; +import * as nls from 'vscode-nls'; +import * as MarkdownIt from 'markdown-it'; +import * as parse5 from 'parse5'; + +import { languages, workspace, Disposable, ExtensionContext, TextDocument, Uri, Diagnostic, Range, DiagnosticSeverity, Position } from 'vscode'; + +const product = require('../../../product.json'); +const allowedBadgeProviders: string[] = (product.extensionAllowedBadgeProviders || []).map(s => s.toLowerCase()); + +const localize = nls.loadMessageBundle(); + +const httpsRequired = localize('httpsRequired', "Images must use the HTTPS protocol."); +const svgsNotValid = localize('svgsNotValid', "SVGs are not a valid image source."); +const embeddedSvgsNotValid = localize('embeddedSvgsNotValid', "Embedded SVGs are not a valid image source."); +const dataUrlsNotValid = localize('dataUrlsNotValid', "Data URLs are not a valid image source."); +const relativeUrlRequiresHttpsRepository = localize('relativeUrlRequiresHttpsRepository', "Relative image URLs require a repository with HTTPS protocol in the package.json."); + +enum Context { + ICON, + BADGE, + MARKDOWN +} + +interface TokenAndPosition { + token: MarkdownIt.Token; + begin: number; + end: number; +} + +interface PackageJsonInfo { + isExtension: boolean; + hasHttpsRepository: boolean; +} + +export class ExtensionLinter { + + private diagnosticsCollection = languages.createDiagnosticCollection('extension-editing'); + private fileWatcher = workspace.createFileSystemWatcher('**/package.json'); + private disposables: Disposable[] = [this.diagnosticsCollection, this.fileWatcher]; + + private folderToPackageJsonInfo: Record = {}; + private packageJsonQ = new Set(); + private readmeQ = new Set(); + private timer: NodeJS.Timer; + private markdownIt = new MarkdownIt(); + + constructor(private context: ExtensionContext) { + this.disposables.push( + workspace.onDidOpenTextDocument(document => this.queue(document)), + workspace.onDidChangeTextDocument(event => this.queue(event.document)), + workspace.onDidCloseTextDocument(document => this.clear(document)), + this.fileWatcher.onDidChange(uri => this.packageJsonChanged(this.getUriFolder(uri))), + this.fileWatcher.onDidCreate(uri => this.packageJsonChanged(this.getUriFolder(uri))), + this.fileWatcher.onDidDelete(uri => this.packageJsonChanged(this.getUriFolder(uri))), + ); + workspace.textDocuments.forEach(document => this.queue(document)); + } + + private queue(document: TextDocument) { + const p = document.uri.path; + if (document.languageId === 'json' && endsWith(p, '/package.json')) { + this.packageJsonQ.add(document); + this.startTimer(); + } + this.queueReadme(document); + } + + private queueReadme(document: TextDocument) { + const p = document.uri.path; + if (document.languageId === 'markdown' && (endsWith(p.toLowerCase(), '/readme.md') || endsWith(p.toLowerCase(), '/changelog.md'))) { + this.readmeQ.add(document); + this.startTimer(); + } + } + + private startTimer() { + if (this.timer) { + clearTimeout(this.timer); + } + this.timer = setTimeout(() => { + this.lint() + .catch(console.error); + }, 300); + } + + private async lint() { + this.lintPackageJson(); + await this.lintReadme(); + } + + private lintPackageJson() { + this.packageJsonQ.forEach(document => { + this.packageJsonQ.delete(document); + if (document.isClosed) { + return; + } + + const diagnostics: Diagnostic[] = []; + + const tree = parseTree(document.getText()); + const info = this.readPackageJsonInfo(this.getUriFolder(document.uri), tree); + if (info.isExtension) { + + const icon = findNodeAtLocation(tree, ['icon']); + if (icon && icon.type === 'string') { + this.addDiagnostics(diagnostics, document, icon.offset + 1, icon.offset + icon.length - 1, icon.value, Context.ICON, info); + } + + const badges = findNodeAtLocation(tree, ['badges']); + if (badges && badges.type === 'array') { + badges.children.map(child => findNodeAtLocation(child, ['url'])) + .filter(url => url && url.type === 'string') + .map(url => this.addDiagnostics(diagnostics, document, url.offset + 1, url.offset + url.length - 1, url.value, Context.BADGE, info)); + } + + } + this.diagnosticsCollection.set(document.uri, diagnostics); + }); + } + + private async lintReadme() { + for (const document of Array.from(this.readmeQ)) { + this.readmeQ.delete(document); + if (document.isClosed) { + return; + } + + const folder = this.getUriFolder(document.uri); + let info = this.folderToPackageJsonInfo[folder.toString()]; + if (!info) { + const tree = await this.loadPackageJson(folder); + info = this.readPackageJsonInfo(folder, tree); + } + if (!info.isExtension) { + this.diagnosticsCollection.set(document.uri, []); + return; + } + + const text = document.getText(); + const tokens = this.markdownIt.parse(text, {}); + const tokensAndPositions = (function toTokensAndPositions(this: ExtensionLinter, tokens: MarkdownIt.Token[], begin = 0, end = text.length): TokenAndPosition[] { + const tokensAndPositions = tokens.map(token => { + if (token.map) { + const tokenBegin = document.offsetAt(new Position(token.map[0], 0)); + const tokenEnd = begin = document.offsetAt(new Position(token.map[1], 0)); + return { + token, + begin: tokenBegin, + end: tokenEnd + }; + } + const image = token.type === 'image' && this.locateToken(text, begin, end, token, token.attrGet('src')); + const other = image || this.locateToken(text, begin, end, token, token.content); + return other || { + token, + begin, + end: begin + }; + }); + return tokensAndPositions.concat( + ...tokensAndPositions.filter(tnp => tnp.token.children && tnp.token.children.length) + .map(tnp => toTokensAndPositions.call(this, tnp.token.children, tnp.begin, tnp.end)) + ); + }).call(this, tokens); + + const diagnostics: Diagnostic[] = []; + + tokensAndPositions.filter(tnp => tnp.token.type === 'image' && tnp.token.attrGet('src')) + .map(inp => { + const src = inp.token.attrGet('src'); + const begin = text.indexOf(src, inp.begin); + if (begin !== -1 && begin < inp.end) { + this.addDiagnostics(diagnostics, document, begin, begin + src.length, src, Context.MARKDOWN, info); + } else { + const content = inp.token.content; + const begin = text.indexOf(content, inp.begin); + if (begin !== -1 && begin < inp.end) { + this.addDiagnostics(diagnostics, document, begin, begin + content.length, src, Context.MARKDOWN, info); + } + } + }); + + let svgStart: Diagnostic; + tokensAndPositions.filter(tnp => tnp.token.type === 'text' && tnp.token.content) + .map(tnp => { + const parser = new parse5.SAXParser({ locationInfo: true }); + parser.on('startTag', (name, attrs, selfClosing, location) => { + if (name === 'img') { + const src = attrs.find(a => a.name === 'src'); + if (src && src.value) { + const begin = text.indexOf(src.value, tnp.begin + location.startOffset); + if (begin !== -1 && begin < tnp.end) { + this.addDiagnostics(diagnostics, document, begin, begin + src.value.length, src.value, Context.MARKDOWN, info); + } + } + } else if (name === 'svg') { + const begin = tnp.begin + location.startOffset; + const end = tnp.begin + location.endOffset; + const range = new Range(document.positionAt(begin), document.positionAt(end)); + svgStart = new Diagnostic(range, embeddedSvgsNotValid, DiagnosticSeverity.Warning); + diagnostics.push(svgStart); + } + }); + parser.on('endTag', (name, location) => { + if (name === 'svg' && svgStart) { + const end = tnp.begin + location.endOffset; + svgStart.range = new Range(svgStart.range.start, document.positionAt(end)); + } + }); + parser.write(tnp.token.content); + parser.end(); + }); + + this.diagnosticsCollection.set(document.uri, diagnostics); + }; + } + + private locateToken(text: string, begin: number, end: number, token: MarkdownIt.Token, content: string) { + if (content) { + const tokenBegin = text.indexOf(content, begin); + if (tokenBegin !== -1) { + const tokenEnd = tokenBegin + content.length; + if (tokenEnd <= end) { + begin = tokenEnd; + return { + token, + begin: tokenBegin, + end: tokenEnd + }; + } + } + } + } + + private readPackageJsonInfo(folder: Uri, tree: JsonNode) { + const engine = tree && findNodeAtLocation(tree, ['engines', 'vscode']); + const repo = tree && findNodeAtLocation(tree, ['repository', 'url']); + const info: PackageJsonInfo = { + isExtension: !!(engine && engine.type === 'string'), + hasHttpsRepository: !!(repo && repo.type === 'string' && repo.value && parseUri(repo.value).scheme.toLowerCase() === 'https') + }; + const str = folder.toString(); + const oldInfo = this.folderToPackageJsonInfo[str]; + if (oldInfo && (oldInfo.isExtension !== info.isExtension || oldInfo.hasHttpsRepository !== info.hasHttpsRepository)) { + this.packageJsonChanged(folder); // clears this.folderToPackageJsonInfo[str] + } + this.folderToPackageJsonInfo[str] = info; + return info; + } + + private async loadPackageJson(folder: Uri) { + const file = folder.with({ path: path.posix.join(folder.path, 'package.json') }); + const exists = await fileExists(file.fsPath); + if (!exists) { + return undefined; + } + const document = await workspace.openTextDocument(file); + return parseTree(document.getText()); + } + + private packageJsonChanged(folder: Uri) { + delete this.folderToPackageJsonInfo[folder.toString()]; + const str = folder.toString().toLowerCase(); + workspace.textDocuments.filter(document => this.getUriFolder(document.uri).toString().toLowerCase() === str) + .forEach(document => this.queueReadme(document)); + } + + private getUriFolder(uri: Uri) { + return uri.with({ path: path.posix.dirname(uri.path) }); + } + + private addDiagnostics(diagnostics: Diagnostic[], document: TextDocument, begin: number, end: number, src: string, context: Context, info: PackageJsonInfo) { + const uri = parseUri(src); + const scheme = uri.scheme.toLowerCase(); + + if (scheme && scheme !== 'https' && scheme !== 'data') { + const range = new Range(document.positionAt(begin), document.positionAt(end)); + diagnostics.push(new Diagnostic(range, httpsRequired, DiagnosticSeverity.Warning)); + } + + if (scheme === 'data') { + const range = new Range(document.positionAt(begin), document.positionAt(end)); + diagnostics.push(new Diagnostic(range, dataUrlsNotValid, DiagnosticSeverity.Warning)); + } + + if (!scheme && !info.hasHttpsRepository) { + const range = new Range(document.positionAt(begin), document.positionAt(end)); + diagnostics.push(new Diagnostic(range, relativeUrlRequiresHttpsRepository, DiagnosticSeverity.Warning)); + } + + if (endsWith(uri.path.toLowerCase(), '.svg') && allowedBadgeProviders.indexOf(uri.authority.toLowerCase()) === -1) { + const range = new Range(document.positionAt(begin), document.positionAt(end)); + diagnostics.push(new Diagnostic(range, svgsNotValid, DiagnosticSeverity.Warning)); + } + } + + private clear(document: TextDocument) { + this.diagnosticsCollection.delete(document.uri); + this.packageJsonQ.delete(document); + } + + public dispose() { + this.disposables.forEach(d => d.dispose()); + this.disposables = []; + } +} + +function endsWith(haystack: string, needle: string): boolean { + let diff = haystack.length - needle.length; + if (diff > 0) { + return haystack.indexOf(needle, diff) === diff; + } else if (diff === 0) { + return haystack === needle; + } else { + return false; + } +} + +function fileExists(path: string): Promise { + return new Promise((resolve, reject) => { + fs.lstat(path, (err, stats) => { + if (!err) { + resolve(true); + } else if (err.code === 'ENOENT') { + resolve(false); + } else { + reject(err); + } + }); + }); +} + +function parseUri(src: string) { + try { + return Uri.parse(src); + } catch (err) { + try { + return Uri.parse(encodeURI(src)); + } catch (err) { + return Uri.parse(''); + } + } +} \ No newline at end of file diff --git a/extensions/extension-editing/src/typings/ref.d.ts b/extensions/extension-editing/src/typings/ref.d.ts index bc057c5587839..216911a680eb2 100644 --- a/extensions/extension-editing/src/typings/ref.d.ts +++ b/extensions/extension-editing/src/typings/ref.d.ts @@ -4,4 +4,3 @@ *--------------------------------------------------------------------------------------------*/ /// -/// diff --git a/extensions/extension-editing/tsconfig.json b/extensions/extension-editing/tsconfig.json index 90ac01c2d39f0..a2b5bcdfddf61 100644 --- a/extensions/extension-editing/tsconfig.json +++ b/extensions/extension-editing/tsconfig.json @@ -7,7 +7,7 @@ "module": "commonjs", "outDir": "./out" }, - "exclude": [ - "node_modules" + "include": [ + "src/**/*" ] } \ No newline at end of file diff --git a/extensions/fsharp/.vscodeignore b/extensions/fsharp/.vscodeignore new file mode 100644 index 0000000000000..77ab386fc7df4 --- /dev/null +++ b/extensions/fsharp/.vscodeignore @@ -0,0 +1 @@ +test/** \ No newline at end of file diff --git a/extensions/fsharp/syntaxes/fsharp.json b/extensions/fsharp/syntaxes/fsharp.json index 4fe9eeffc16c4..f7abe7e8a5251 100644 --- a/extensions/fsharp/syntaxes/fsharp.json +++ b/extensions/fsharp/syntaxes/fsharp.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/ionide/ionide-fsgrammar/blob/master/grammar/fsharp.json", + "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." + ], "name": "fsharp", "scopeName": "source.fsharp", "fileTypes": [ @@ -16,9 +21,6 @@ { "include": "#structure" }, - { - "include": "#attributes" - }, { "include": "#strings" }, @@ -31,6 +33,9 @@ { "include": "#definition" }, + { + "include": "#attributes" + }, { "include": "#method_calls" }, @@ -59,7 +64,7 @@ { "name": "function.anonymous", "begin": "\\b(fun)\\b", - "end": "[(->)\\n]", + "end": "(->)", "beginCaptures": { "1": { "name": "keyword.other.function-definition.fsharp" @@ -139,7 +144,7 @@ "patterns": [ { "name": "binding.fsharp", - "begin": "\\b(val mutable|val|let mutable|let inline|let|member|static member|override|let!)(\\s+rec|mutable)?(\\s+private|internal|public)?\\s+(\\([^\\s-]*\\)|[_[:alpha:]]([_[:alpha:]0-9,\\.]|(?<=,)\\s)*)", + "begin": "\\b(val mutable|val|let mutable|let inline|let|member|static member|override|let!)(\\s+rec|mutable)?(\\s+\\[\\<.*\\>\\])?\\s*(private|internal|public)?\\s+(\\([^\\s-]*\\)|[_[:alpha:]]([_[:alpha:]0-9,\\._]|(?<=,)\\s)*)", "end": "((``.*``)|(with)|=|$)", "beginCaptures": { "1": { @@ -149,9 +154,12 @@ "name": "keyword.other.function-recursive.fsharp" }, "3": { - "name": "keyword.other.access.fsharp" + "name": "support.function.attribute.fsharp" }, "4": { + "name": "keyword.other.access.fsharp" + }, + "5": { "name": "variable.other.binding.fsharp" } }, @@ -178,7 +186,7 @@ "patterns": [ { "name": "keyword.other.fsharp", - "match": "\\b(function|yield!|yield|class|match|delegate|of|new|in|as|if|then|else|elif|for|begin|end|inherit|do|let\\!|return\\!|return|interface|with|abstract|member|try|finally|and|when|use|use\\!|struct|while)\\b" + "match": "\\b(function|yield!|yield|class|match|delegate|of|new|in|as|if|then|else|elif|for|begin|end|inherit|do|let\\!|return\\!|return|interface|with|abstract|member|try|finally|and|when|use|use\\!|struct|while|mutable)\\b" }, { "name": "meta.preprocessor.fsharp", @@ -195,7 +203,7 @@ "patterns": [ { "name": "entity.name.section.fsharp", - "begin": "\\b(namespace|module)(\\s+public|internal|private)?\\s+([[:alpha:]][[:alpha:]0-9'_. ]*)", + "begin": "\\b(namespace|module)\\s*(public|internal|private)?\\s+([[:alpha:]][[:alpha:]0-9'_. ]*)", "end": "(\\s|$)", "beginCaptures": { "1": { @@ -389,7 +397,7 @@ "patterns": [ { "name": "record.fsharp", - "match": "(type)[\\s]+(private|internal|public)?[\\s]*([[:alpha:]0-9'<>^:,. ]+)[\\s]*(\\([[:alpha:]0-9'<>^:,. ]+\\))?[\\s]*((with)|(as [[:alpha:]0-9']+)|(=)|(\\(\\)))", + "match": "(type)[\\s]+(private|internal|public)?[\\s]*([[:alpha:]0-9'<>^:,._ ]+)[\\s]*(\\([[:alpha:]0-9'<>^:,._ ]+\\))?[\\s]*((with)|(as [[:alpha:]0-9']+)|(=)|(\\(\\)))", "captures": { "1": { "name": "keyword.other.fsharp" @@ -453,6 +461,5 @@ } ] } - }, - "version": "https://github.com/ionide/ionide-fsgrammar/commit/edb05603ec3f2eb3c633f92df1649e82fe870545" + } } \ No newline at end of file diff --git a/extensions/fsharp/test/colorize-results/test_fs.json b/extensions/fsharp/test/colorize-results/test_fs.json index 26bad9ce44162..2f161a6fccc8d 100644 --- a/extensions/fsharp/test/colorize-results/test_fs.json +++ b/extensions/fsharp/test/colorize-results/test_fs.json @@ -51,7 +51,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -117,7 +117,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -293,7 +293,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -392,7 +392,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -590,7 +590,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -744,7 +744,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -766,7 +766,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -865,7 +865,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/git/.vscodeignore b/extensions/git/.vscodeignore new file mode 100644 index 0000000000000..7ba0880ef8c0b --- /dev/null +++ b/extensions/git/.vscodeignore @@ -0,0 +1,5 @@ +src/** +test/** +out/test/** +tsconfig.json +npm-shrinkwrap.json \ No newline at end of file diff --git a/extensions/git/npm-shrinkwrap.json b/extensions/git/npm-shrinkwrap.json index d047fc02b9d9f..d757c142e96d3 100644 --- a/extensions/git/npm-shrinkwrap.json +++ b/extensions/git/npm-shrinkwrap.json @@ -13,9 +13,9 @@ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz" }, "vscode-extension-telemetry": { - "version": "0.0.6", - "from": "vscode-extension-telemetry@>=0.0.6 <0.0.7", - "resolved": "https://registry.npmjs.org/vscode-extension-telemetry/-/vscode-extension-telemetry-0.0.6.tgz" + "version": "0.0.7", + "from": "vscode-extension-telemetry@>=0.0.8 <0.0.9", + "resolved": "https://registry.npmjs.org/vscode-extension-telemetry/-/vscode-extension-telemetry-0.0.8.tgz" }, "vscode-nls": { "version": "2.0.2", diff --git a/extensions/git/package.json b/extensions/git/package.json index bd3d175c58ae3..bf8fe767cdfba 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -59,6 +59,11 @@ "dark": "resources/icons/dark/open-file.svg" } }, + { + "command": "git.openHEADFile", + "title": "%command.openHEADFile%", + "category": "Git" + }, { "command": "git.stage", "title": "%command.stage%", @@ -172,6 +177,16 @@ "title": "%command.branch%", "category": "Git" }, + { + "command": "git.deleteBranch", + "title": "%command.deleteBranch%", + "category": "Git" + }, + { + "command": "git.merge", + "title": "%command.merge%", + "category": "Git" + }, { "command": "git.pull", "title": "%command.pull%", @@ -182,6 +197,11 @@ "title": "%command.pullRebase%", "category": "Git" }, + { + "command": "git.pullFrom", + "title": "%command.pullFrom%", + "category": "Git" + }, { "command": "git.push", "title": "%command.push%", @@ -206,6 +226,11 @@ "command": "git.showOutput", "title": "%command.showOutput%", "category": "Git" + }, + { + "command": "git.ignore", + "title": "%command.ignore%", + "category": "Git" } ], "menus": { @@ -226,6 +251,10 @@ "command": "git.openFile", "when": "config.git.enabled && scmProvider == git && gitState == idle" }, + { + "command": "git.openHEADFile", + "when": "config.git.enabled && scmProvider == git && gitState == idle" + }, { "command": "git.openChange", "when": "config.git.enabled && scmProvider == git && gitState == idle" @@ -298,14 +327,26 @@ "command": "git.branch", "when": "config.git.enabled && scmProvider == git && gitState == idle" }, + { + "command": "git.deleteBranch", + "when": "config.git.enabled && scmProvider == git && gitState == idle" + }, { "command": "git.pull", "when": "config.git.enabled && scmProvider == git && gitState == idle" }, + { + "command": "git.pullFrom", + "when": "config.git.enabled && scmProvider == git && gitState == idle" + }, { "command": "git.pullRebase", "when": "config.git.enabled && scmProvider == git && gitState == idle" }, + { + "command": "git.pullFrom", + "when": "config.git.enabled && scmProvider == git && gitState == idle" + }, { "command": "git.push", "when": "config.git.enabled && scmProvider == git && gitState == idle" @@ -358,6 +399,10 @@ "group": "1_sync", "when": "config.git.enabled && scmProvider == git && gitState == idle" }, + { + "command": "git.pullFrom", + "when": "config.git.enabled && scmProvider == git && gitState == idle" + }, { "command": "git.push", "group": "1_sync", @@ -477,6 +522,11 @@ "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == index", "group": "navigation" }, + { + "command": "git.openHEADFile", + "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == index", + "group": "navigation" + }, { "command": "git.unstage", "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == index", @@ -492,6 +542,11 @@ "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == workingTree", "group": "navigation" }, + { + "command": "git.openHEADFile", + "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == workingTree", + "group": "navigation" + }, { "command": "git.openFile", "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == workingTree", @@ -516,13 +571,18 @@ "command": "git.stage", "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == workingTree", "group": "inline" + }, + { + "command": "git.ignore", + "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == workingTree", + "group": "1_modification@3" } ], "editor/title": [ { "command": "git.openFile", "group": "navigation", - "when": "config.git.enabled && scmProvider == git && isInDiffEditor && resourceScheme != extension" + "when": "config.git.enabled && scmProvider == git && isInDiffEditor && resourceScheme != extension && resourceScheme != merge-conflict.conflict-diff" }, { "command": "git.openChange", @@ -532,17 +592,17 @@ { "command": "git.stageSelectedRanges", "group": "2_git@1", - "when": "config.git.enabled && scmProvider == git && isInDiffEditor" + "when": "config.git.enabled && scmProvider == git && isInDiffEditor && resourceScheme != merge-conflict.conflict-diff" }, { "command": "git.unstageSelectedRanges", "group": "2_git@2", - "when": "config.git.enabled && scmProvider == git && isInDiffEditor" + "when": "config.git.enabled && scmProvider == git && isInDiffEditor && resourceScheme != merge-conflict.conflict-diff" }, { "command": "git.revertSelectedRanges", "group": "2_git@3", - "when": "config.git.enabled && scmProvider == git && isInDiffEditor" + "when": "config.git.enabled && scmProvider == git && isInDiffEditor && resourceScheme != merge-conflict.conflict-diff" } ] }, @@ -608,14 +668,24 @@ "type": "boolean", "description": "%config.ignoreLimitWarning%", "default": false + }, + "git.defaultCloneDirectory": { + "type": "string", + "default": null, + "description": "%config.defaultCloneDirectory%" + }, + "git.enableSmartCommit": { + "type": "boolean", + "description": "%config.enableSmartCommit%", + "default": false } } } }, "dependencies": { "iconv-lite": "0.4.15", - "vscode-extension-telemetry": "^0.0.7", - "vscode-nls": "^2.0.1" + "vscode-extension-telemetry": "0.0.8", + "vscode-nls": "2.0.2" }, "devDependencies": { "@types/mocha": "^2.2.41", diff --git a/extensions/git/package.nls.json b/extensions/git/package.nls.json index 11c7347fa07a8..bc8bc381786fa 100644 --- a/extensions/git/package.nls.json +++ b/extensions/git/package.nls.json @@ -4,6 +4,7 @@ "command.refresh": "Refresh", "command.openChange": "Open Changes", "command.openFile": "Open File", + "command.openHEADFile": "Open File (HEAD)", "command.stage": "Stage Changes", "command.stageAll": "Stage All Changes", "command.stageSelectedRanges": "Stage Selected Ranges", @@ -21,13 +22,17 @@ "command.undoCommit": "Undo Last Commit", "command.checkout": "Checkout to...", "command.branch": "Create Branch...", + "command.deleteBranch": "Delete Branch...", + "command.merge": "Merge Branch...", "command.pull": "Pull", "command.pullRebase": "Pull (Rebase)", + "command.pullFrom": "Pull from...", "command.push": "Push", "command.pushTo": "Push to...", "command.sync": "Sync", - "command.publish": "Publish", + "command.publish": "Publish Branch", "command.showOutput": "Show Git Output", + "command.ignore": "Add File to .gitignore", "config.enabled": "Whether git is enabled", "config.path": "Path to the git executable", "config.autorefresh": "Whether auto refreshing is enabled", @@ -37,5 +42,7 @@ "config.countBadge": "Controls the git badge counter. `all` counts all changes. `tracked` counts only the tracked changes. `off` turns it off.", "config.checkoutType": "Controls what type of branches are listed when running `Checkout to...`. `all` shows all refs, `local` shows only the local branchs, `tags` shows only tags and `remote` shows only remote branches.", "config.ignoreLegacyWarning": "Ignores the legacy Git warning", - "config.ignoreLimitWarning": "Ignores the warning when there are too many changes in a repository" + "config.ignoreLimitWarning": "Ignores the warning when there are too many changes in a repository", + "config.defaultCloneDirectory": "The default location where to clone a git repository", + "config.enableSmartCommit": "Commit all changes when there are no staged changes." } \ No newline at end of file diff --git a/extensions/git/src/askpass-main.ts b/extensions/git/src/askpass-main.ts index 3759c11dd0a15..db1bdeac366bd 100644 --- a/extensions/git/src/askpass-main.ts +++ b/extensions/git/src/askpass-main.ts @@ -22,8 +22,8 @@ function main(argv: string[]): void { return fatal('Wrong number of arguments'); } - if (!process.env['VSCODE_GIT_ASKPASS_PORT']) { - return fatal('Missing port'); + if (!process.env['VSCODE_GIT_ASKPASS_HANDLE']) { + return fatal('Missing handle'); } if (!process.env['VSCODE_GIT_ASKPASS_PIPE']) { @@ -35,13 +35,11 @@ function main(argv: string[]): void { } const output = process.env['VSCODE_GIT_ASKPASS_PIPE']; - const port = Number.parseInt(process.env['VSCODE_GIT_ASKPASS_PORT']); + const socketPath = process.env['VSCODE_GIT_ASKPASS_HANDLE']; const request = argv[2]; const host = argv[4].substring(1, argv[4].length - 2); - const opts: http.RequestOptions = { - hostname: 'localhost', - port, + socketPath, path: '/', method: 'POST' }; diff --git a/extensions/git/src/askpass.ts b/extensions/git/src/askpass.ts index bbd2ca576e7a2..300e666834c6a 100644 --- a/extensions/git/src/askpass.ts +++ b/extensions/git/src/askpass.ts @@ -6,25 +6,59 @@ 'use strict'; import { Disposable, window, InputBoxOptions } from 'vscode'; +import { denodeify } from './util'; import * as path from 'path'; import * as http from 'http'; +import * as os from 'os'; +import * as crypto from 'crypto'; + +const randomBytes = denodeify(crypto.randomBytes); + +export interface AskpassEnvironment { + GIT_ASKPASS: string; + ELECTRON_RUN_AS_NODE?: string; + VSCODE_GIT_ASKPASS_NODE?: string; + VSCODE_GIT_ASKPASS_MAIN?: string; + VSCODE_GIT_ASKPASS_HANDLE?: string; +} + +function getIPCHandlePath(nonce: string): string { + if (process.platform === 'win32') { + return `\\\\.\\pipe\\vscode-git-askpass-${nonce}-sock`; + } + + if (process.env['XDG_RUNTIME_DIR']) { + return path.join(process.env['XDG_RUNTIME_DIR'], `vscode-git-askpass-${nonce}.sock`); + } + + return path.join(os.tmpdir(), `vscode-git-askpass-${nonce}.sock`); +} export class Askpass implements Disposable { private server: http.Server; - private portPromise: Promise; + private ipcHandlePathPromise: Promise; private enabled = true; constructor() { this.server = http.createServer((req, res) => this.onRequest(req, res)); + this.ipcHandlePathPromise = this.setup().catch(err => console.error(err)); + } + + private async setup(): Promise { + const buffer = await randomBytes(20); + const nonce = buffer.toString('hex'); + const ipcHandlePath = getIPCHandlePath(nonce); try { - this.server.listen(0); - this.portPromise = new Promise(c => this.server.on('listening', () => c(this.server.address().port))); + this.server.listen(ipcHandlePath); this.server.on('error', err => console.error(err)); } catch (err) { + console.error('Could not launch git askpass helper.'); this.enabled = false; } + + return ipcHandlePath; } private onRequest(req: http.ServerRequest, res: http.ServerResponse): void { @@ -55,7 +89,7 @@ export class Askpass implements Disposable { return await window.showInputBox(options) || ''; } - async getEnv(): Promise { + async getEnv(): Promise { if (!this.enabled) { return { GIT_ASKPASS: path.join(__dirname, 'askpass-empty.sh') @@ -67,7 +101,7 @@ export class Askpass implements Disposable { GIT_ASKPASS: path.join(__dirname, 'askpass.sh'), VSCODE_GIT_ASKPASS_NODE: process.execPath, VSCODE_GIT_ASKPASS_MAIN: path.join(__dirname, 'askpass-main.js'), - VSCODE_GIT_ASKPASS_PORT: String(await this.portPromise) + VSCODE_GIT_ASKPASS_HANDLE: await this.ipcHandlePathPromise }; } diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 399cfd10a163d..fa93cd06bf506 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -5,8 +5,8 @@ 'use strict'; -import { Uri, commands, scm, Disposable, window, workspace, QuickPickItem, OutputChannel, Range, WorkspaceEdit, Position, LineChange, SourceControlResourceState } from 'vscode'; -import { Ref, RefType, Git, GitErrorCodes } from './git'; +import { Uri, commands, scm, Disposable, window, workspace, QuickPickItem, OutputChannel, Range, WorkspaceEdit, Position, LineChange, SourceControlResourceState, TextDocumentShowOptions, ViewColumn } from 'vscode'; +import { Ref, RefType, Git, GitErrorCodes, Branch } from './git'; import { Model, Resource, Status, CommitOptions, WorkingTreeGroup, IndexGroup, MergeGroup } from './model'; import { toGitUri, fromGitUri } from './uri'; import { applyLineChanges, intersectDiffWithRange, toLineRanges, invertLineChange } from './staging'; @@ -60,6 +60,35 @@ class CheckoutRemoteHeadItem extends CheckoutItem { } } +class BranchDeleteItem implements QuickPickItem { + + private get shortCommit(): string { return (this.ref.commit || '').substr(0, 8); } + get branchName(): string | undefined { return this.ref.name; } + get label(): string { return this.branchName || ''; } + get description(): string { return this.shortCommit; } + + constructor(private ref: Ref) { } + + async run(model: Model, force?: boolean): Promise { + if (!this.branchName) { + return; + } + await model.deleteBranch(this.branchName, force); + } +} + +class MergeItem implements QuickPickItem { + + get label(): string { return this.ref.name || ''; } + get description(): string { return this.ref.name || ''; } + + constructor(protected ref: Ref) { } + + async run(model: Model): Promise { + await model.merge(this.ref.name! || this.ref.commit!); + } +} + interface Command { commandId: string; key: string; @@ -128,11 +157,18 @@ export class CommandCenter { return; } + const viewColumn = window.activeTextEditor && window.activeTextEditor.viewColumn || ViewColumn.One; + if (!left) { - return await commands.executeCommand('vscode.open', right); + return await commands.executeCommand('vscode.open', right, viewColumn); } - return await commands.executeCommand('vscode.diff', left, right, title); + const opts: TextDocumentShowOptions = { + preview: true, + viewColumn + }; + + return await commands.executeCommand('vscode.diff', left, right, title, opts); } private getLeftResource(resource: Resource): Uri | undefined { @@ -202,9 +238,12 @@ export class CommandCenter { return; } + const config = workspace.getConfiguration('git'); + const value = config.get('defaultCloneDirectory') || os.homedir(); + const parentPath = await window.showInputBox({ prompt: localize('parent', "Parent Directory"), - value: os.homedir(), + value, ignoreFocusOut: true }); @@ -269,7 +308,35 @@ export class CommandCenter { return; } - return await commands.executeCommand('vscode.open', uri); + const viewColumn = window.activeTextEditor && window.activeTextEditor.viewColumn || ViewColumn.One; + + return await commands.executeCommand('vscode.open', uri, viewColumn); + } + + @command('git.openHEADFile') + async openHEADFile(arg?: Resource | Uri): Promise { + let resource: Resource | undefined = undefined; + + if (arg instanceof Resource) { + resource = arg; + } else if (arg instanceof Uri) { + resource = this.getSCMResource(arg); + } else { + resource = this.getSCMResource(); + } + + if (!resource) { + return; + } + + const HEAD = this.getLeftResource(resource); + + if (!HEAD) { + window.showWarningMessage(localize('HEAD not available', "HEAD version of '{0}' is not available.", path.basename(resource.resourceUri.fsPath))); + return; + } + + return await commands.executeCommand('vscode.open', HEAD); } @command('git.openChange') @@ -287,7 +354,6 @@ export class CommandCenter { if (!resource) { return; } - return await this._openResource(resource); } @@ -309,7 +375,9 @@ export class CommandCenter { return; } - return await commands.executeCommand('vscode.open', uriToOpen); + const viewColumn = window.activeTextEditor && window.activeTextEditor.viewColumn || ViewColumn.One; + + return await commands.executeCommand('vscode.open', uriToOpen, viewColumn); } @command('git.stage') @@ -530,15 +598,36 @@ export class CommandCenter { getCommitMessage: () => Promise, opts?: CommitOptions ): Promise { + const config = workspace.getConfiguration('git'); + const enableSmartCommit = config.get('enableSmartCommit') === true; + const noStagedChanges = this.model.indexGroup.resources.length === 0; + const noUnstagedChanges = this.model.workingTreeGroup.resources.length === 0; + + // no changes, and the user has not configured to commit all in this case + if (!noUnstagedChanges && noStagedChanges && !enableSmartCommit) { + + // prompt the user if we want to commit all or not + const message = localize('no staged changes', "There are no staged changes to commit.\n\nWould you like to automatically stage all your changes and commit them directly?"); + const yes = localize('yes', "Yes"); + const always = localize('always', "Always"); + const pick = await window.showWarningMessage(message, { modal: true }, yes, always); + + if (pick === always) { + config.update('enableSmartCommit', true, true); + } else if (pick !== yes) { + return false; // do not commit on cancel + } + } + if (!opts) { - opts = { all: this.model.indexGroup.resources.length === 0 }; + opts = { all: noStagedChanges }; } if ( // no changes - (this.model.indexGroup.resources.length === 0 && this.model.workingTreeGroup.resources.length === 0) + (noStagedChanges && noUnstagedChanges) // or no staged changes and not `all` - || (!opts.all && this.model.indexGroup.resources.length === 0) + || (!opts.all && noStagedChanges) ) { window.showInformationMessage(localize('no changes', "There are no changes to commit.")); return false; @@ -584,6 +673,10 @@ export class CommandCenter { @command('git.commitWithInput') async commitWithInput(): Promise { + if (!scm.inputBox.value) { + return; + } + const didCommit = await this.smartCommit(async () => scm.inputBox.value); if (didCommit) { @@ -645,7 +738,7 @@ export class CommandCenter { .map(ref => new CheckoutRemoteHeadItem(ref)); const picks = [...heads, ...tags, ...remoteHeads]; - const placeHolder = 'Select a ref to checkout'; + const placeHolder = localize('select a ref to checkout', 'Select a ref to checkout'); const choice = await window.showQuickPick(picks, { placeHolder }); if (!choice) { @@ -671,6 +764,107 @@ export class CommandCenter { await this.model.branch(name); } + @command('git.deleteBranch') + async deleteBranch(name: string, force?: boolean): Promise { + let run: (force?: boolean) => Promise; + if (typeof name === 'string') { + run = force => this.model.deleteBranch(name, force); + } else { + const currentHead = this.model.HEAD && this.model.HEAD.name; + const heads = this.model.refs.filter(ref => ref.type === RefType.Head && ref.name !== currentHead) + .map(ref => new BranchDeleteItem(ref)); + + const placeHolder = localize('select branch to delete', 'Select a branch to delete'); + const choice = await window.showQuickPick(heads, { placeHolder }); + + if (!choice || !choice.branchName) { + return; + } + name = choice.branchName; + run = force => choice.run(this.model, force); + } + + try { + await run(force); + } catch (err) { + if (err.gitErrorCode !== GitErrorCodes.BranchNotFullyMerged) { + throw err; + } + + const message = localize('confirm force delete branch', "The branch '{0}' is not fully merged. Delete anyway?", name); + const yes = localize('delete branch', "Delete Branch"); + const pick = await window.showWarningMessage(message, yes); + + if (pick === yes) { + await run(true); + } + } + } + + @command('git.merge') + async merge(): Promise { + const config = workspace.getConfiguration('git'); + const checkoutType = config.get('checkoutType') || 'all'; + const includeRemotes = checkoutType === 'all' || checkoutType === 'remote'; + + const heads = this.model.refs.filter(ref => ref.type === RefType.Head) + .filter(ref => ref.name || ref.commit) + .map(ref => new MergeItem(ref as Branch)); + + const remoteHeads = (includeRemotes ? this.model.refs.filter(ref => ref.type === RefType.RemoteHead) : []) + .filter(ref => ref.name || ref.commit) + .map(ref => new MergeItem(ref as Branch)); + + const picks = [...heads, ...remoteHeads]; + const placeHolder = localize('select a branch to merge from', 'Select a branch to merge from'); + const choice = await window.showQuickPick(picks, { placeHolder }); + + if (!choice) { + return; + } + + try { + await choice.run(this.model); + } catch (err) { + if (err.gitErrorCode !== GitErrorCodes.Conflict) { + throw err; + } + + const message = localize('merge conflicts', "There are merge conflicts. Resolve them before committing."); + await window.showWarningMessage(message); + } + } + + @command('git.pullFrom') + async pullFrom(): Promise { + const remotes = this.model.remotes; + + if (remotes.length === 0) { + window.showWarningMessage(localize('no remotes to pull', "Your repository has no remotes configured to pull from.")); + return; + } + + const picks = remotes.map(r => ({ label: r.name, description: r.url })); + const placeHolder = localize('pick remote pull repo', "Pick a remote to pull the branch from"); + const pick = await window.showQuickPick(picks, { placeHolder }); + + if (!pick) { + return; + } + + const branchName = await window.showInputBox({ + placeHolder: localize('branch name', "Branch name"), + prompt: localize('provide branch name', "Please provide a branch name"), + ignoreFocusOut: true + }); + + if (!branchName) { + return; + } + + this.model.pull(false, pick.label, branchName); + } + @command('git.pull') async pull(): Promise { const remotes = this.model.remotes; @@ -692,7 +886,7 @@ export class CommandCenter { return; } - await this.model.pull(true); + await this.model.pullWithRebase(); } @command('git.push') @@ -730,7 +924,7 @@ export class CommandCenter { return; } - this.model.push(pick.label, branchName); + this.model.pushTo(pick.label, branchName); } @command('git.sync') @@ -778,7 +972,7 @@ export class CommandCenter { return; } - await this.model.push(choice, branchName, { setUpstream: true }); + await this.model.pushTo(choice, branchName, true); } @command('git.showOutput') @@ -786,6 +980,29 @@ export class CommandCenter { this.outputChannel.show(); } + @command('git.ignore') + async ignore(...resourceStates: SourceControlResourceState[]): Promise { + if (resourceStates.length === 0 || !(resourceStates[0].resourceUri instanceof Uri)) { + const uri = window.activeTextEditor && window.activeTextEditor.document.uri; + + if (!uri) { + return; + } + + return await this.model.ignore([uri]); + } + + const uris = resourceStates + .filter(s => s instanceof Resource) + .map(r => r.resourceUri); + + if (!uris.length) { + return; + } + + await this.model.ignore(uris); + } + private createCommand(id: string, key: string, method: Function, skipModelCheck: boolean): (...args: any[]) => any { const result = (...args) => { if (!skipModelCheck && !this.model) { diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index 4adc617a3ebb0..9129f527fe661 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -21,10 +21,6 @@ export interface IGit { version: string; } -export interface PushOptions { - setUpstream?: boolean; -} - export interface IFileStatus { x: string; y: string; @@ -159,6 +155,12 @@ export interface IExecutionResult { } async function exec(child: cp.ChildProcess, options: any = {}): Promise { + if (!child.stdout || !child.stderr) { + throw new GitError({ + message: 'Failed to get stdout or stderr from git process.' + }); + } + const disposables: IDisposable[] = []; const once = (ee: NodeJS.EventEmitter, name: string, fn: Function) => { @@ -273,7 +275,9 @@ export const GitErrorCodes = { CantCreatePipe: 'CantCreatePipe', CantAccessRemote: 'CantAccessRemote', RepositoryNotFound: 'RepositoryNotFound', - RepositoryIsLocked: 'RepositoryIsLocked' + RepositoryIsLocked: 'RepositoryIsLocked', + BranchNotFullyMerged: 'BranchNotFullyMerged', + NoRemoteReference: 'NoRemoteReference' }; function getGitErrorCode(stderr: string): string | undefined { @@ -291,6 +295,10 @@ function getGitErrorCode(stderr: string): string | undefined { return GitErrorCodes.RepositoryNotFound; } else if (/unable to access/.test(stderr)) { return GitErrorCodes.CantAccessRemote; + } else if (/branch '.+' is not fully merged/.test(stderr)) { + return GitErrorCodes.BranchNotFullyMerged; + } else if (/Couldn\'t find remote ref/.test(stderr)) { + return GitErrorCodes.NoRemoteReference; } return void 0; @@ -386,7 +394,7 @@ export class Git { options.env = assign({}, process.env, this.env, options.env || {}, { VSCODE_GIT_COMMAND: args[0], - LC_ALL: 'en_US', + LC_ALL: 'en_US.UTF-8', LANG: 'en_US.UTF-8' }); @@ -445,7 +453,7 @@ export class GitStatusParser { // space i++; - if (entry.x === 'R') { + if (entry.x === 'R' || entry.x === 'C') { lastIndex = raw.indexOf('\0', i); if (lastIndex === -1) { @@ -650,6 +658,25 @@ export class Repository { await this.run(args); } + async deleteBranch(name: string, force?: boolean): Promise { + const args = ['branch', force ? '-D' : '-d', name]; + await this.run(args); + } + + async merge(ref: string): Promise { + const args = ['merge', ref]; + + try { + await this.run(args); + } catch (err) { + if (/^CONFLICT /m.test(err.stdout || '')) { + err.gitErrorCode = GitErrorCodes.Conflict; + } + + throw err; + } + } + async clean(paths: string[]): Promise { const pathsByGroup = groupBy(paths, p => path.dirname(p)); const groups = Object.keys(pathsByGroup).map(k => pathsByGroup[k]); @@ -730,13 +757,18 @@ export class Repository { } } - async pull(rebase?: boolean): Promise { + async pull(rebase?: boolean, remote?: string, branch?: string): Promise { const args = ['pull']; if (rebase) { args.push('-r'); } + if (remote && branch) { + args.push(remote); + args.push(branch); + } + try { await this.run(args); } catch (err) { @@ -754,10 +786,10 @@ export class Repository { } } - async push(remote?: string, name?: string, options?: PushOptions): Promise { + async push(remote?: string, name?: string, setUpstream: boolean = false): Promise { const args = ['push']; - if (options && options.setUpstream) { + if (setUpstream) { args.push('-u'); } @@ -954,4 +986,4 @@ export class Repository { return { hash: match[1], message: match[2] }; } -} \ No newline at end of file +} diff --git a/extensions/git/src/main.ts b/extensions/git/src/main.ts index edc5f6c19cc1c..d4eddb1ce803e 100644 --- a/extensions/git/src/main.ts +++ b/extensions/git/src/main.ts @@ -5,6 +5,8 @@ 'use strict'; +import * as nls from 'vscode-nls'; +const localize = nls.config(process.env.VSCODE_NLS_CONFIG)(); import { ExtensionContext, workspace, window, Disposable, commands, Uri } from 'vscode'; import { findGit, Git, IGit } from './git'; import { Model } from './model'; @@ -13,13 +15,9 @@ import { CommandCenter } from './commands'; import { StatusBarCommands } from './statusbar'; import { GitContentProvider } from './contentProvider'; import { AutoFetcher } from './autofetch'; -import { MergeDecorator } from './merge'; import { Askpass } from './askpass'; import { toDisposable } from './util'; import TelemetryReporter from 'vscode-extension-telemetry'; -import * as nls from 'vscode-nls'; - -const localize = nls.config(process.env.VSCODE_NLS_CONFIG)(); async function init(context: ExtensionContext, disposables: Disposable[]): Promise { const { name, version, aiKey } = require(context.asAbsolutePath('./package.json')) as { name: string, version: string, aiKey: string }; @@ -58,14 +56,12 @@ async function init(context: ExtensionContext, disposables: Disposable[]): Promi const provider = new GitSCMProvider(model, commandCenter, statusBarCommands); const contentProvider = new GitContentProvider(model); const autoFetcher = new AutoFetcher(model); - const mergeDecorator = new MergeDecorator(model); disposables.push( commandCenter, provider, contentProvider, autoFetcher, - mergeDecorator, model ); diff --git a/extensions/git/src/merge.ts b/extensions/git/src/merge.ts deleted file mode 100644 index 457e966d89a4c..0000000000000 --- a/extensions/git/src/merge.ts +++ /dev/null @@ -1,96 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import { window, workspace, Disposable, TextEditor, TextDocument, Range } from 'vscode'; -import { Model, Status } from './model'; -import { filterEvent } from './util'; -import { debounce } from './decorators'; -import { iterate } from './iterators'; - -function* lines(document: TextDocument): IterableIterator { - for (let i = 0; i < document.lineCount; i++) { - yield document.lineAt(i).text; - } -} - -const pattern = /^<<<<<<<|^=======|^>>>>>>>/; - -function decorate(document: TextDocument): Range[] { - return iterate(lines(document)) - .map((line, i) => pattern.test(line) ? i : null) - .filter(i => i !== null) - .map((i: number) => new Range(i, 1, i, 1)) - .toArray(); -} - -class TextEditorMergeDecorator { - - private static DecorationType = window.createTextEditorDecorationType({ - backgroundColor: 'rgba(255, 139, 0, 0.3)', - isWholeLine: true, - dark: { - backgroundColor: 'rgba(235, 59, 0, 0.3)' - } - }); - - private uri: string; - private disposables: Disposable[] = []; - - constructor( - private model: Model, - private editor: TextEditor - ) { - this.uri = this.editor.document.uri.toString(); - - const onDidChange = filterEvent(workspace.onDidChangeTextDocument, e => e.document && e.document.uri.toString() === this.uri); - onDidChange(this.redecorate, this, this.disposables); - model.onDidChange(this.redecorate, this, this.disposables); - - this.redecorate(); - } - - @debounce(300) - private redecorate(): void { - let decorations: Range[] = []; - - if (window.visibleTextEditors.every(e => e !== this.editor)) { - this.dispose(); - return; - } - - if (this.model.mergeGroup.resources.some(r => r.type === Status.BOTH_MODIFIED && r.resourceUri.toString() === this.uri)) { - decorations = decorate(this.editor.document); - } - - this.editor.setDecorations(TextEditorMergeDecorator.DecorationType, decorations); - } - - dispose(): void { - this.disposables.forEach(d => d.dispose()); - } -} - -export class MergeDecorator { - - private textEditorDecorators: TextEditorMergeDecorator[] = []; - private disposables: Disposable[] = []; - - constructor(private model: Model) { - window.onDidChangeVisibleTextEditors(this.onDidChangeVisibleTextEditors, this, this.disposables); - this.onDidChangeVisibleTextEditors(window.visibleTextEditors); - } - - private onDidChangeVisibleTextEditors(editors: TextEditor[]): void { - this.textEditorDecorators.forEach(d => d.dispose()); - this.textEditorDecorators = editors.map(e => new TextEditorMergeDecorator(this.model, e)); - } - - dispose(): void { - this.textEditorDecorators.forEach(d => d.dispose()); - this.disposables.forEach(d => d.dispose()); - } -} diff --git a/extensions/git/src/model.ts b/extensions/git/src/model.ts index 1d74a87d3a3a0..7a93c2a9e52d1 100644 --- a/extensions/git/src/model.ts +++ b/extensions/git/src/model.ts @@ -5,13 +5,13 @@ 'use strict'; -import { Uri, Command, EventEmitter, Event, SourceControlResourceState, SourceControlResourceDecorations, Disposable, ProgressLocation, window, workspace } from 'vscode'; -import { Git, Repository, Ref, Branch, Remote, PushOptions, Commit, GitErrorCodes } from './git'; -import { anyEvent, eventToPromise, filterEvent, mapEvent, EmptyDisposable, combinedDisposable, dispose } from './util'; +import { Uri, Command, EventEmitter, Event, SourceControlResourceState, SourceControlResourceDecorations, Disposable, ProgressLocation, window, workspace, WorkspaceEdit } from 'vscode'; +import { Git, Repository, Ref, Branch, Remote, Commit, GitErrorCodes } from './git'; +import { anyEvent, eventToPromise, filterEvent, EmptyDisposable, combinedDisposable, dispose } from './util'; import { memoize, throttle, debounce } from './decorators'; -import { watch } from './watch'; import * as path from 'path'; import * as nls from 'vscode-nls'; +import * as fs from 'fs'; const timeout = (millis: number) => new Promise(c => setTimeout(c, millis)); @@ -53,7 +53,7 @@ export class Resource implements SourceControlResourceState { @memoize get resourceUri(): Uri { - if (this.renameResourceUri && (this._type === Status.MODIFIED || this._type === Status.DELETED || this._type === Status.INDEX_RENAMED)) { + if (this.renameResourceUri && (this._type === Status.MODIFIED || this._type === Status.DELETED || this._type === Status.INDEX_RENAMED || this._type === Status.INDEX_COPIED)) { return this.renameResourceUri; } @@ -211,7 +211,10 @@ export enum Operation { Init = 1 << 12, Show = 1 << 13, Stage = 1 << 14, - GetCommitTemplate = 1 << 15 + GetCommitTemplate = 1 << 15, + DeleteBranch = 1 << 16, + Merge = 1 << 17, + Ignore = 1 << 18 } // function getOperationName(operation: Operation): string { @@ -454,6 +457,14 @@ export class Model implements Disposable { await this.run(Operation.Branch, () => this.repository.branch(name, true)); } + async deleteBranch(name: string, force?: boolean): Promise { + await this.run(Operation.DeleteBranch, () => this.repository.deleteBranch(name, force)); + } + + async merge(ref: string): Promise { + await this.run(Operation.Merge, () => this.repository.merge(ref)); + } + async checkout(treeish: string): Promise { await this.run(Operation.Checkout, () => this.repository.checkout(treeish, [])); } @@ -475,12 +486,27 @@ export class Model implements Disposable { } } - async pull(rebase?: boolean): Promise { - await this.run(Operation.Pull, () => this.repository.pull(rebase)); + @throttle + async pullWithRebase(): Promise { + await this.run(Operation.Pull, () => this.repository.pull(true)); } - async push(remote?: string, name?: string, options?: PushOptions): Promise { - await this.run(Operation.Push, () => this.repository.push(remote, name, options)); + @throttle + async pull(rebase?: boolean, remote?: string, name?: string): Promise { + await this.run(Operation.Pull, () => this.repository.pull(rebase, remote, name)); + } + + @throttle + async push(): Promise { + await this.run(Operation.Push, () => this.repository.push()); + } + + async pullFrom(rebase?: boolean, remote?: string, branch?: string): Promise { + await this.run(Operation.Pull, () => this.repository.pull(rebase, remote, branch)); + } + + async pushTo(remote?: string, name?: string, setUpstream: boolean = false): Promise { + await this.run(Operation.Push, () => this.repository.push(remote, name, setUpstream)); } @throttle @@ -510,6 +536,25 @@ export class Model implements Disposable { return await this.run(Operation.GetCommitTemplate, async () => this.repository.getCommitTemplate()); } + async ignore(files: Uri[]): Promise { + return await this.run(Operation.Ignore, async () => { + const ignoreFile = `${this.repository.root}${path.sep}.gitignore`; + const textToAppend = files + .map(uri => path.relative(this.repository.root, uri.fsPath).replace(/\\/g, '/')) + .join('\n'); + + const document = await new Promise(c => fs.exists(ignoreFile, c)) + ? await workspace.openTextDocument(ignoreFile) + : await workspace.openTextDocument(Uri.file(ignoreFile).with({ scheme: 'untitled' })); + + await window.showTextDocument(document); + const edit = new WorkspaceEdit(); + + edit.insert(document.uri, document.lineAt(document.lineCount - 1).range.end, `${textToAppend}\n`); + workspace.applyEdit(edit); + }); + } + private async run(operation: Operation, runOperation: () => Promise = () => Promise.resolve(null)): Promise { const run = async () => { this._operations = this._operations.start(operation); @@ -582,16 +627,13 @@ export class Model implements Disposable { const repositoryRoot = await this._git.getRepositoryRoot(this.workspaceRoot.fsPath); this.repository = this._git.open(repositoryRoot); - const dotGitPath = path.join(repositoryRoot, '.git'); - const { event: onRawGitChange, disposable: watcher } = watch(dotGitPath); - disposables.push(watcher); + const onGitChange = filterEvent(this.onWorkspaceChange, uri => /\/\.git\//.test(uri.path)); + const onRelevantGitChange = filterEvent(onGitChange, uri => !/\/\.git\/index\.lock$/.test(uri.path)); - const onGitChange = mapEvent(onRawGitChange, ({ filename }) => Uri.file(path.join(dotGitPath, filename))); - const onRelevantGitChange = filterEvent(onGitChange, uri => !/\/\.git\/index\.lock$/.test(uri.fsPath)); onRelevantGitChange(this.onFSChange, this, disposables); onRelevantGitChange(this._onDidChangeRepository.fire, this._onDidChangeRepository, disposables); - const onNonGitChange = filterEvent(this.onWorkspaceChange, uri => !/\/\.git\//.test(uri.fsPath)); + const onNonGitChange = filterEvent(this.onWorkspaceChange, uri => !/\/\.git\//.test(uri.path)); onNonGitChange(this.onFSChange, this, disposables); this.repositoryDisposable = combinedDisposable(disposables); @@ -670,7 +712,7 @@ export class Model implements Disposable { case 'A': index.push(new Resource(this.workspaceRoot, this.indexGroup, uri, Status.INDEX_ADDED)); break; case 'D': index.push(new Resource(this.workspaceRoot, this.indexGroup, uri, Status.INDEX_DELETED)); break; case 'R': index.push(new Resource(this.workspaceRoot, this.indexGroup, uri, Status.INDEX_RENAMED, renameUri)); break; - case 'C': index.push(new Resource(this.workspaceRoot, this.indexGroup, uri, Status.INDEX_COPIED)); break; + case 'C': index.push(new Resource(this.workspaceRoot, this.indexGroup, uri, Status.INDEX_COPIED, renameUri)); break; } switch (raw.y) { diff --git a/extensions/git/src/scmProvider.ts b/extensions/git/src/scmProvider.ts index 3b4ab990d2f13..f942fcc8a5e95 100644 --- a/extensions/git/src/scmProvider.ts +++ b/extensions/git/src/scmProvider.ts @@ -6,7 +6,7 @@ 'use strict'; import { scm, Uri, Disposable, SourceControl, SourceControlResourceGroup, Event, workspace, commands } from 'vscode'; -import { Model, State } from './model'; +import { Model, State, Status } from './model'; import { StatusBarCommands } from './statusbar'; import { CommandCenter } from './commands'; import { mapEvent } from './util'; @@ -37,14 +37,14 @@ export class GitSCMProvider { get count(): number { const countBadge = workspace.getConfiguration('git').get('countBadge'); + const total = this.model.mergeGroup.resources.length + + this.model.indexGroup.resources.length + + this.model.workingTreeGroup.resources.length; switch (countBadge) { case 'off': return 0; - case 'tracked': return this.model.indexGroup.resources.length; - default: - return this.model.mergeGroup.resources.length - + this.model.indexGroup.resources.length - + this.model.workingTreeGroup.resources.length; + case 'tracked': return total - this.model.workingTreeGroup.resources.filter(r => r.type === Status.UNTRACKED || r.type === Status.IGNORED).length; + default: return total; } } diff --git a/extensions/git/src/statusbar.ts b/extensions/git/src/statusbar.ts index b12dd9664c498..9fe437ccec562 100644 --- a/extensions/git/src/statusbar.ts +++ b/extensions/git/src/statusbar.ts @@ -114,11 +114,11 @@ class SyncStatusBar { text += `${HEAD.behind}↓ ${HEAD.ahead}↑`; } command = 'git.sync'; - tooltip = localize('sync changes', "Synchronize changes"); + tooltip = localize('sync changes', "Synchronize Changes"); } else { icon = '$(cloud-upload)'; command = 'git.publish'; - tooltip = localize('publish changes', "Publish changes"); + tooltip = localize('publish changes', "Publish Changes"); } } else { command = ''; @@ -127,9 +127,8 @@ class SyncStatusBar { if (this.state.isSyncRunning) { icon = '$(sync~spin)'; - text = ''; command = ''; - tooltip = localize('syncing changes', "Synchronizing changes..."); + tooltip = localize('syncing changes', "Synchronizing Changes..."); } return { diff --git a/extensions/git/src/watch.ts b/extensions/git/src/watch.ts deleted file mode 100644 index a3a51a8aea7e2..0000000000000 --- a/extensions/git/src/watch.ts +++ /dev/null @@ -1,23 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import { EventEmitter, Event, Disposable } from 'vscode'; -import * as fs from 'fs'; - -export interface FSEvent { - eventType: string; - filename: string; -} - -export function watch(path: string): { event: Event; disposable: Disposable; } { - const emitter = new EventEmitter(); - const event = emitter.event; - const watcher = fs.watch(path, (eventType, filename) => emitter.fire({ eventType, filename })); - const disposable = new Disposable(() => watcher.close()); - - return { event, disposable }; -} diff --git a/extensions/git/tsconfig.json b/extensions/git/tsconfig.json index bed30f8826c7f..254c9e6745984 100644 --- a/extensions/git/tsconfig.json +++ b/extensions/git/tsconfig.json @@ -9,7 +9,7 @@ "strictNullChecks": true, "experimentalDecorators": true }, - "exclude": [ - "node_modules" + "include": [ + "src/**/*" ] } \ No newline at end of file diff --git a/extensions/git/vsc-extension-quickstart.md b/extensions/git/vsc-extension-quickstart.md deleted file mode 100644 index 6cdea2b5dad9c..0000000000000 --- a/extensions/git/vsc-extension-quickstart.md +++ /dev/null @@ -1,33 +0,0 @@ -# Welcome to your first VS Code Extension - -## What's in the folder -* This folder contains all of the files necessary for your extension -* `package.json` - this is the manifest file in which you declare your extension and command. -The sample plugin registers a command and defines its title and command name. With this information -VS Code can show the command in the command palette. It doesn’t yet need to load the plugin. -* `src/extension.ts` - this is the main file where you will provide the implementation of your command. -The file exports one function, `activate`, which is called the very first time your extension is -activated (in this case by executing the command). Inside the `activate` function we call `registerCommand`. -We pass the function containing the implementation of the command as the second parameter to -`registerCommand`. - -## Get up and running straight away -* press `F5` to open a new window with your extension loaded -* run your command from the command palette by pressing (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) and typing `Hello World` -* set breakpoints in your code inside `src/extension.ts` to debug your extension -* find output from your extension in the debug console - -## Make changes -* you can relaunch the extension from the debug toolbar after changing code in `src/extension.ts` -* you can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes - -## Explore the API -* you can open the full set of our API when you open the file `node_modules/vscode/vscode.d.ts` - -## Run tests -* open the debug viewlet (`Ctrl+Shift+D` or `Cmd+Shift+D` on Mac) and from the launch configuration dropdown pick `Launch Tests` -* press `F5` to run the tests in a new window with your extension loaded -* see the output of the test result in the debug console -* make changes to `test/extension.test.ts` or create new test files inside the `test` folder - * by convention, the test runner will only consider files matching the name pattern `**.test.ts` - * you can create folders inside the `test` folder to structure your tests any way you want \ No newline at end of file diff --git a/extensions/gitsyntax/.vscodeignore b/extensions/gitsyntax/.vscodeignore new file mode 100644 index 0000000000000..77ab386fc7df4 --- /dev/null +++ b/extensions/gitsyntax/.vscodeignore @@ -0,0 +1 @@ +test/** \ No newline at end of file diff --git a/extensions/gitsyntax/package.json b/extensions/gitsyntax/package.json index 8ce5bd1ba32fe..bc1a1810f9167 100644 --- a/extensions/gitsyntax/package.json +++ b/extensions/gitsyntax/package.json @@ -10,6 +10,9 @@ "categories": [ "Other" ], + "scripts": { + "update-grammar": "node ../../build/npm/update-grammar.js textmate/git.tmbundle Syntaxes/Git%20Commit%20Message.tmLanguage ./syntaxes/git-commit.tmLanguage.json Syntaxes/Git%20Rebase%20Message.tmLanguage ./syntaxes/git-rebase.tmLanguage.json" + }, "contributes": { "languages": [ { @@ -40,12 +43,12 @@ { "language": "git-commit", "scopeName": "text.git-commit", - "path": "./syntaxes/git-commit.tmLanguage" + "path": "./syntaxes/git-commit.tmLanguage.json" }, { "language": "git-rebase", "scopeName": "text.git-rebase", - "path": "./syntaxes/git-rebase.tmLanguage" + "path": "./syntaxes/git-rebase.tmLanguage.json" } ] } diff --git a/extensions/gitsyntax/syntaxes/git-commit.tmLanguage b/extensions/gitsyntax/syntaxes/git-commit.tmLanguage deleted file mode 100644 index 705fc0a36f96d..0000000000000 --- a/extensions/gitsyntax/syntaxes/git-commit.tmLanguage +++ /dev/null @@ -1,221 +0,0 @@ - - - - - fileTypes - - COMMIT_EDITMSG - MERGE_MSG - - foldingStartMarker - ^\+\+\+ - foldingStopMarker - ^--- - name - Git Commit Message - patterns - - - begin - \A(?!# Please enter the commit message) - end - ^(?=# Please enter the commit message) - name - meta.scope.message.git-commit - patterns - - - begin - \A(?=#) - end - ^(?!#) - patterns - - - include - #comment - - - - - begin - ^(?!# Please enter the commit message) - end - ^(?=# Please enter the commit message) - patterns - - - begin - \G - end - ^(?!\G) - name - meta.scope.subject.git-commit - patterns - - - captures - - 1 - - name - keyword.other.$2.git-commit - - - match - \G((fixup|squash)!)\s* - - - match - .{66,}$ - name - invalid.illegal.line-too-long.git-commit - - - match - .{51,}$ - name - invalid.deprecated.line-too-long.git-commit - - - - - begin - ^(?!# Please enter the commit message) - end - ^(?=# Please enter the commit message) - patterns - - - include - #comment - - - - - - - - - begin - ^(?=# Please enter the commit message) - end - \z - name - meta.scope.metadata.git-commit - patterns - - - include - #metadata - - - - - repository - - comment - - begin - ^(#) - captures - - 1 - - name - punctuation.definition.comment.git-commit - - - end - \n - name - comment.line.number-sign.git-commit - - metadata - - patterns - - - begin - (?=^# Changes to be committed:) - end - (?!\G)((?=^# \w)|(?!^#)) - patterns - - - begin - (^[ \t]+)?(?=#) - beginCaptures - - 1 - - name - punctuation.whitespace.comment.leading.git-commit - - - contentName - comment.line.number-sign.git-commit - end - (?!\G)^ - patterns - - - match - \G# - name - punctuation.definition.comment.git-commit - - - match - ((modified|renamed):.*)$\n? - name - markup.changed.git-commit - - - match - (new file:.*)$\n? - name - markup.inserted.git-commit - - - match - (deleted:.*)$\n? - name - markup.deleted.git-commit - - - - - - - include - #comment - - - begin - (?=diff\ \-\-git) - comment - diff presented at the end of the commit message when using commit -v. - contentName - source.diff - end - \z - name - meta.embedded.diff.git-commit - patterns - - - include - source.diff - - - - - - - scopeName - text.git-commit - uuid - BFE83C06-8508-44BE-A975-95A57BF619A7 - - diff --git a/extensions/gitsyntax/syntaxes/git-commit.tmLanguage.json b/extensions/gitsyntax/syntaxes/git-commit.tmLanguage.json new file mode 100644 index 0000000000000..ffe1561f7271b --- /dev/null +++ b/extensions/gitsyntax/syntaxes/git-commit.tmLanguage.json @@ -0,0 +1,147 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/git.tmbundle/blob/master/Syntaxes/Git%20Commit%20Message.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." + ], + "fileTypes": [ + "COMMIT_EDITMSG", + "MERGE_MSG" + ], + "foldingStartMarker": "^\\+\\+\\+", + "foldingStopMarker": "^---", + "name": "Git Commit Message", + "patterns": [ + { + "begin": "\\A(?!# Please enter the commit message)", + "end": "^(?=# Please enter the commit message)", + "name": "meta.scope.message.git-commit", + "patterns": [ + { + "begin": "\\A(?=#)", + "end": "^(?!#)", + "patterns": [ + { + "include": "#comment" + } + ] + }, + { + "begin": "^(?!# Please enter the commit message)", + "end": "^(?=# Please enter the commit message)", + "patterns": [ + { + "begin": "\\G", + "end": "^(?!\\G)", + "name": "meta.scope.subject.git-commit", + "patterns": [ + { + "captures": { + "1": { + "name": "keyword.other.$2.git-commit" + } + }, + "match": "\\G((fixup|squash)!)\\s*" + }, + { + "match": ".{73,}$", + "name": "invalid.illegal.line-too-long.git-commit" + }, + { + "match": ".{51,}$", + "name": "invalid.deprecated.line-too-long.git-commit" + } + ] + }, + { + "begin": "^(?!# Please enter the commit message)", + "end": "^(?=# Please enter the commit message)", + "patterns": [ + { + "include": "#comment" + } + ] + } + ] + } + ] + }, + { + "begin": "^(?=# Please enter the commit message)", + "end": "\\z", + "name": "meta.scope.metadata.git-commit", + "patterns": [ + { + "include": "#metadata" + } + ] + } + ], + "repository": { + "comment": { + "begin": "^(#)", + "captures": { + "1": { + "name": "punctuation.definition.comment.git-commit" + } + }, + "end": "\\n", + "name": "comment.line.number-sign.git-commit" + }, + "metadata": { + "patterns": [ + { + "begin": "(?=^# Changes to be committed:)", + "end": "(?!\\G)((?=^# \\w)|(?!^#))", + "patterns": [ + { + "begin": "(^[ \\t]+)?(?=#)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.git-commit" + } + }, + "contentName": "comment.line.number-sign.git-commit", + "end": "(?!\\G)^", + "patterns": [ + { + "match": "\\G#", + "name": "punctuation.definition.comment.git-commit" + }, + { + "match": "((modified|renamed):.*)$\\n?", + "name": "markup.changed.git-commit" + }, + { + "match": "(new file:.*)$\\n?", + "name": "markup.inserted.git-commit" + }, + { + "match": "(deleted:.*)$\\n?", + "name": "markup.deleted.git-commit" + } + ] + } + ] + }, + { + "include": "#comment" + }, + { + "begin": "(?=diff\\ \\-\\-git)", + "comment": "diff presented at the end of the commit message when using commit -v.", + "contentName": "source.diff", + "end": "\\z", + "name": "meta.embedded.diff.git-commit", + "patterns": [ + { + "include": "source.diff" + } + ] + } + ] + } + }, + "scopeName": "text.git-commit", + "uuid": "BFE83C06-8508-44BE-A975-95A57BF619A7" +} \ No newline at end of file diff --git a/extensions/gitsyntax/syntaxes/git-rebase.tmLanguage b/extensions/gitsyntax/syntaxes/git-rebase.tmLanguage deleted file mode 100644 index a53ee1533fd89..0000000000000 --- a/extensions/gitsyntax/syntaxes/git-rebase.tmLanguage +++ /dev/null @@ -1,57 +0,0 @@ - - - - - fileTypes - - git-rebase-todo - - name - Git Rebase Message - patterns - - - captures - - 1 - - name - punctuation.definition.comment.git-rebase - - - match - ^\s*(#).*$\n? - name - comment.line.number-sign.git-rebase - - - captures - - 1 - - name - support.function.git-rebase - - 2 - - name - constant.sha.git-rebase - - 3 - - name - meta.commit-message.git-rebase - - - match - ^\s*(pick|p|reword|r|edit|e|squash|s|fixup|f|d|drop|x|exec)\s+([0-9a-f]+)\s+(.*)$ - name - meta.commit-command.git-rebase - - - scopeName - text.git-rebase - uuid - 7F1CC209-5F6D-486A-8180-09FA282381A1 - - diff --git a/extensions/gitsyntax/syntaxes/git-rebase.tmLanguage.json b/extensions/gitsyntax/syntaxes/git-rebase.tmLanguage.json new file mode 100644 index 0000000000000..15bac0d8d0932 --- /dev/null +++ b/extensions/gitsyntax/syntaxes/git-rebase.tmLanguage.json @@ -0,0 +1,39 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/git.tmbundle/blob/master/Syntaxes/Git%20Rebase%20Message.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." + ], + "fileTypes": [ + "git-rebase-todo" + ], + "name": "Git Rebase Message", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.comment.git-rebase" + } + }, + "match": "^\\s*(#).*$\\n?", + "name": "comment.line.number-sign.git-rebase" + }, + { + "captures": { + "1": { + "name": "support.function.git-rebase" + }, + "2": { + "name": "constant.sha.git-rebase" + }, + "3": { + "name": "meta.commit-message.git-rebase" + } + }, + "match": "^\\s*(pick|p|reword|r|edit|e|squash|s|fixup|f|exec|x|drop|d)\\s+([0-9a-f]+)\\s+(.*)$", + "name": "meta.commit-command.git-rebase" + } + ], + "scopeName": "text.git-rebase", + "uuid": "7F1CC209-5F6D-486A-8180-09FA282381A1" +} \ No newline at end of file diff --git a/extensions/go/.vscodeignore b/extensions/go/.vscodeignore new file mode 100644 index 0000000000000..77ab386fc7df4 --- /dev/null +++ b/extensions/go/.vscodeignore @@ -0,0 +1 @@ +test/** \ No newline at end of file diff --git a/extensions/go/syntaxes/go.json b/extensions/go/syntaxes/go.json index 0cfcf1940ad5f..098c8710482c7 100644 --- a/extensions/go/syntaxes/go.json +++ b/extensions/go/syntaxes/go.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-go/blob/master/grammars/go.cson", + "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." + ], "scopeName": "source.go", "name": "Go", "comment": "Go language", @@ -227,7 +232,7 @@ ] }, { - "match": "(? - - - - fileTypes - - groovy - gvy - - foldingStartMarker - (\{\s*$|^\s*// \{\{\{) - foldingStopMarker - ^\s*(\}|// \}\}\}$) - keyEquivalent - ^~G - name - 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, - therefore 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* - (?: - (?:private|protected|public|native|synchronized|abstract|threadsafe|transient|static|final) # visibility/modifier - | - (?:def) - | - (?: - (?: - (?:void|boolean|byte|char|short|int|float|long|double) - | - (?:@?(?:[a-zA-Z]\w*\.)*[A-Z]+\w*) # object type - ) - [\[\]]* - (?:<.*>)? - ) - - ) - \s+ - ([^=]+\s+)?\w+\s*\( - )) - 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| - Null)|ull)|Contains|T(?:hat|oString|rue)|Inspect|Equals|False|Length| - ArrayEquals)))\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:(?= - (?: - (?:private|protected|public|native|synchronized|abstract|threadsafe|transient|static|final) # visibility/modifier - | - (?:def) - | - (?:void|boolean|byte|char|short|int|float|long|double) - | - (?:(?:[a-z]\w*\.)*[A-Z]+\w*) # object type - ) - \s+ - [\w\d_<>\[\],\s]+ - (?:=|$) - - )) - 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 - - - - - - - scopeName - source.groovy - uuid - B3A64888-EBBB-4436-8D9E-F1169C5D7613 - - \ No newline at end of file diff --git a/extensions/groovy/syntaxes/groovy.tmLanguage.json b/extensions/groovy/syntaxes/groovy.tmLanguage.json new file mode 100644 index 0000000000000..3dc8af7d0a168 --- /dev/null +++ b/extensions/groovy/syntaxes/groovy.tmLanguage.json @@ -0,0 +1,1390 @@ +{ + "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." + ], + "fileTypes": [ + "groovy", + "gvy" + ], + "foldingStartMarker": "(\\{\\s*$|^\\s*// \\{\\{\\{)", + "foldingStopMarker": "^\\s*(\\}|// \\}\\}\\}$)", + "keyEquivalent": "^~G", + "name": "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": "(?)", + "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((?", + "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" + } + ] + } + ] + } + }, + "scopeName": "source.groovy", + "uuid": "B3A64888-EBBB-4436-8D9E-F1169C5D7613" +} \ No newline at end of file diff --git a/extensions/groovy/test/colorize-results/test_groovy.json b/extensions/groovy/test/colorize-results/test_groovy.json index 7e74addd23e69..ee78a65becc17 100644 --- a/extensions/groovy/test/colorize-results/test_groovy.json +++ b/extensions/groovy/test/colorize-results/test_groovy.json @@ -29,7 +29,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -150,7 +150,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -205,7 +205,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -260,7 +260,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -282,7 +282,7 @@ "light_plus": "storage.type.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.groovy: #4EC9B0" } }, { @@ -304,7 +304,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -370,7 +370,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -436,7 +436,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -524,7 +524,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -623,7 +623,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -1437,7 +1437,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1481,7 +1481,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1492,7 +1492,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1569,7 +1569,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1602,7 +1602,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1646,7 +1646,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1679,7 +1679,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1701,7 +1701,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1712,7 +1712,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -2207,7 +2207,7 @@ "light_plus": "storage.type.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.groovy: #4EC9B0" } }, { @@ -2405,7 +2405,7 @@ "light_plus": "storage.type.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.groovy: #4EC9B0" } }, { @@ -2482,7 +2482,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2504,7 +2504,7 @@ "light_plus": "storage.type.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.groovy: #4EC9B0" } }, { @@ -2658,7 +2658,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -3274,7 +3274,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -3307,7 +3307,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -3318,7 +3318,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -3340,7 +3340,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -3362,7 +3362,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -3373,7 +3373,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -3395,7 +3395,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -3472,7 +3472,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3505,7 +3505,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3549,7 +3549,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -3582,7 +3582,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -3604,7 +3604,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -3615,7 +3615,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -3670,7 +3670,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -3791,7 +3791,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -3879,7 +3879,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -3978,7 +3978,7 @@ "light_plus": "storage.type.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.groovy: #4EC9B0" } }, { @@ -4000,7 +4000,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -4121,7 +4121,7 @@ "light_plus": "storage.type.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.groovy: #4EC9B0" } }, { @@ -4143,7 +4143,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -4187,7 +4187,7 @@ "light_plus": "storage.type.primitive.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.primitive.groovy: #4EC9B0" } }, { @@ -4209,7 +4209,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -4231,7 +4231,7 @@ "light_plus": "storage.type.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.groovy: #4EC9B0" } }, { @@ -4253,7 +4253,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4297,7 +4297,7 @@ "light_plus": "variable.language: #0000FF", "dark_vs": "variable.language: #569CD6", "light_vs": "variable.language: #0000FF", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4429,7 +4429,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -4528,7 +4528,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -4583,7 +4583,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -4649,7 +4649,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -4715,7 +4715,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -4737,7 +4737,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -4803,7 +4803,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -4869,7 +4869,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -4902,7 +4902,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -5012,7 +5012,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -5089,7 +5089,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -5298,7 +5298,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5771,7 +5771,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -5826,7 +5826,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6057,7 +6057,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6453,7 +6453,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6596,7 +6596,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -6981,7 +6981,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -7124,7 +7124,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -7432,7 +7432,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -7476,7 +7476,7 @@ "light_plus": "storage.type.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.groovy: #4EC9B0" } }, { @@ -7564,7 +7564,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -7652,7 +7652,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -7696,7 +7696,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -7784,7 +7784,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -7839,7 +7839,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7872,7 +7872,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7916,7 +7916,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -8048,7 +8048,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -8125,7 +8125,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -8180,7 +8180,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8246,7 +8246,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -8334,7 +8334,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -8378,7 +8378,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -8510,7 +8510,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -8554,7 +8554,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8587,7 +8587,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8851,7 +8851,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -8873,7 +8873,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8906,7 +8906,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -9005,7 +9005,7 @@ "light_plus": "storage.type.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.groovy: #4EC9B0" } }, { @@ -9148,7 +9148,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -9192,7 +9192,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -9214,7 +9214,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -9478,7 +9478,7 @@ "light_plus": "storage.type.annotation.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.annotation.groovy: #4EC9B0" } }, { @@ -9489,7 +9489,7 @@ "light_plus": "storage.type.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.groovy: #4EC9B0" } }, { @@ -9511,7 +9511,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -9566,7 +9566,7 @@ "light_plus": "storage.type.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.groovy: #4EC9B0" } }, { @@ -9654,7 +9654,7 @@ "light_plus": "storage.type.object.array.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.object.array.groovy: #4EC9B0" } }, { @@ -9830,7 +9830,7 @@ "light_plus": "storage.type.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.groovy: #4EC9B0" } }, { @@ -9918,7 +9918,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -10083,7 +10083,7 @@ "light_plus": "storage.type.annotation.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.annotation.groovy: #4EC9B0" } }, { @@ -10094,7 +10094,7 @@ "light_plus": "storage.type.primitive.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.primitive.groovy: #4EC9B0" } }, { @@ -10116,7 +10116,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -10138,7 +10138,7 @@ "light_plus": "storage.type.primitive.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.primitive.groovy: #4EC9B0" } }, { @@ -10160,7 +10160,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10193,7 +10193,7 @@ "light_plus": "storage.type.primitive.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.primitive.groovy: #4EC9B0" } }, { @@ -10215,7 +10215,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10303,7 +10303,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { diff --git a/extensions/grunt/.vscodeignore b/extensions/grunt/.vscodeignore new file mode 100644 index 0000000000000..ebab1d50b9ba0 --- /dev/null +++ b/extensions/grunt/.vscodeignore @@ -0,0 +1,3 @@ +test/** +src/** +tsconfig.json \ No newline at end of file diff --git a/extensions/grunt/npm-shrinkwrap.json b/extensions/grunt/npm-shrinkwrap.json new file mode 100644 index 0000000000000..1ae6a9311441e --- /dev/null +++ b/extensions/grunt/npm-shrinkwrap.json @@ -0,0 +1,11 @@ +{ + "name": "grunt", + "version": "0.0.1", + "dependencies": { + "vscode-nls": { + "version": "2.0.2", + "from": "vscode-nls@>=2.0.2 <3.0.0", + "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-2.0.2.tgz" + } + } +} diff --git a/extensions/grunt/package.json b/extensions/grunt/package.json index 6e67c3153de58..0758d440b08da 100644 --- a/extensions/grunt/package.json +++ b/extensions/grunt/package.json @@ -7,13 +7,12 @@ "engines": { "vscode": "*" }, - "enableProposedApi": true, "categories": [ "Other" ], "scripts": { - "compile": "gulp compile-extension:gulp", - "watch": "gulp watch-extension:gulp" + "compile": "gulp compile-extension:grunt", + "watch": "gulp watch-extension:grunt" }, "dependencies": { "vscode-nls": "^2.0.2" @@ -23,9 +22,7 @@ }, "main": "./out/main", "activationEvents": [ - "onCommand:workbench.action.tasks.runTask", - "onCommand:workbench.action.tasks.build", - "onCommand:workbench.action.tasks.test" + "onCommand:workbench.action.tasks.runTask" ], "contributes": { "configuration": { @@ -43,6 +40,22 @@ "description": "%config.grunt.autoDetect%" } } - } + }, + "taskDefinitions": [ + { + "type": "grunt", + "required": ["task"], + "properties": { + "task": { + "type": "string", + "description": "The Grunt task to customize" + }, + "file": { + "type": "string", + "description": "The Grunt file that provides the task. Can be omitted." + } + } + } + ] } } \ No newline at end of file diff --git a/extensions/grunt/src/main.ts b/extensions/grunt/src/main.ts index ff551f904ecc9..21f73c3ce737e 100644 --- a/extensions/grunt/src/main.ts +++ b/extensions/grunt/src/main.ts @@ -34,12 +34,15 @@ export function activate(_context: vscode.ExtensionContext): void { taskProvider.dispose(); taskProvider = undefined; } else if (!taskProvider && autoDetect === 'on') { - taskProvider = vscode.workspace.registerTaskProvider({ + taskProvider = vscode.workspace.registerTaskProvider('grunt', { provideTasks: () => { if (!detectorPromise) { detectorPromise = getGruntTasks(); } return detectorPromise; + }, + resolveTask(_task: vscode.Task): vscode.Task | undefined { + return undefined; } }); } @@ -73,6 +76,39 @@ function exec(command: string, options: cp.ExecOptions): Promise<{ stdout: strin }); } +let _channel: vscode.OutputChannel; +function getOutputChannel(): vscode.OutputChannel { + if (!_channel) { + _channel = vscode.window.createOutputChannel('Grunt Auto Detection'); + } + return _channel; +} + +interface GruntTaskDefinition extends vscode.TaskDefinition { + task: string; + file?: string; +} + +const buildNames: string[] = ['build', 'compile', 'watch']; +function isBuildTask(name: string): boolean { + for (let buildName of buildNames) { + if (name.indexOf(buildName) !== -1) { + return true; + } + } + return false; +} + +const testNames: string[] = ['test']; +function isTestTask(name: string): boolean { + for (let testName of testNames) { + if (name.indexOf(testName) !== -1) { + return true; + } + } + return false; +} + async function getGruntTasks(): Promise { let workspaceRoot = vscode.workspace.rootPath; let emptyTasks: vscode.Task[] = []; @@ -95,18 +131,14 @@ async function getGruntTasks(): Promise { } let commandLine = `${command} --help --no-color`; - let channel = vscode.window.createOutputChannel('tasks'); try { let { stdout, stderr } = await exec(commandLine, { cwd: workspaceRoot }); if (stderr) { - channel.appendLine(stderr); - channel.show(true); + getOutputChannel().appendLine(stderr); + getOutputChannel().show(true); } let result: vscode.Task[] = []; if (stdout) { - let buildTask: { task: vscode.Task | undefined, rank: number } = { task: undefined, rank: 0 }; - let testTask: { task: vscode.Task | undefined, rank: number } = { task: undefined, rank: 0 }; - // grunt lists tasks as follows (description is wrapped into a new line if too long): // ... // Available tasks @@ -137,40 +169,38 @@ async function getGruntTasks(): Promise { let regExp = /^\s*(\S.*\S) \S/g; let matches = regExp.exec(line); if (matches && matches.length === 2) { - let taskName = matches[1]; - let task = taskName.indexOf(' ') === -1 - ? new vscode.ShellTask(`grunt: ${taskName}`, `${command} ${taskName}`) - : new vscode.ShellTask(`grunt: ${taskName}`, `${command} "${taskName}"`); - task.identifier = `grunt.${taskName}`; + let name = matches[1]; + let kind: GruntTaskDefinition = { + type: 'grunt', + task: name + }; + let source = 'grunt'; + let task = name.indexOf(' ') === -1 + ? new vscode.Task(kind, name, source, new vscode.ShellExecution(`${command} ${name}`)) + : new vscode.Task(kind, name, source, new vscode.ShellExecution(`${command} "${name}"`)); result.push(task); - let lowerCaseTaskName = taskName.toLowerCase(); - if (lowerCaseTaskName === 'build') { - buildTask = { task, rank: 2 }; - } else if (lowerCaseTaskName.indexOf('build') !== -1 && buildTask.rank < 1) { - buildTask = { task, rank: 1 }; - } else if (lowerCaseTaskName === 'test') { - testTask = { task, rank: 2 }; - } else if (lowerCaseTaskName.indexOf('test') !== -1 && testTask.rank < 1) { - testTask = { task, rank: 1 }; + let lowerCaseTaskName = name.toLowerCase(); + if (isBuildTask(lowerCaseTaskName)) { + task.group = vscode.TaskGroup.Build; + } else if (isTestTask(lowerCaseTaskName)) { + task.group = vscode.TaskGroup.Test; } } } } } - if (buildTask.task) { - buildTask.task.group = vscode.TaskGroup.Build; - } - if (testTask.task) { - testTask.task.group = vscode.TaskGroup.Test; - } } return result; } catch (err) { + let channel = getOutputChannel(); if (err.stderr) { channel.appendLine(err.stderr); - channel.show(true); + } + if (err.stdout) { + channel.appendLine(err.stdout); } channel.appendLine(localize('execFailed', 'Auto detecting Grunt failed with error: {0}', err.error ? err.error.toString() : 'unknown')); + channel.show(true); return emptyTasks; } } \ No newline at end of file diff --git a/extensions/grunt/tsconfig.json b/extensions/grunt/tsconfig.json index d815a565579a2..e804fa3acd7a6 100644 --- a/extensions/grunt/tsconfig.json +++ b/extensions/grunt/tsconfig.json @@ -12,8 +12,7 @@ "noUnusedLocals": true, "noUnusedParameters": true }, - "exclude": [ - "node_modules", - "out" + "include": [ + "src/**/*" ] } \ No newline at end of file diff --git a/extensions/gulp/.vscodeignore b/extensions/gulp/.vscodeignore new file mode 100644 index 0000000000000..d43a539fddf5b --- /dev/null +++ b/extensions/gulp/.vscodeignore @@ -0,0 +1,2 @@ +src/** +tsconfig.json \ No newline at end of file diff --git a/extensions/gulp/npm-shrinkwrap.json b/extensions/gulp/npm-shrinkwrap.json new file mode 100644 index 0000000000000..1f6acafe769a8 --- /dev/null +++ b/extensions/gulp/npm-shrinkwrap.json @@ -0,0 +1,11 @@ +{ + "name": "gulp", + "version": "0.0.1", + "dependencies": { + "vscode-nls": { + "version": "2.0.2", + "from": "vscode-nls@>=2.0.2 <3.0.0", + "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-2.0.2.tgz" + } + } +} diff --git a/extensions/gulp/package.json b/extensions/gulp/package.json index f2eb59ef07434..235f3e2d1384c 100644 --- a/extensions/gulp/package.json +++ b/extensions/gulp/package.json @@ -7,7 +7,6 @@ "engines": { "vscode": "*" }, - "enableProposedApi": true, "categories": [ "Other" ], @@ -23,9 +22,7 @@ }, "main": "./out/main", "activationEvents": [ - "onCommand:workbench.action.tasks.runTask", - "onCommand:workbench.action.tasks.build", - "onCommand:workbench.action.tasks.test" + "onCommand:workbench.action.tasks.runTask" ], "contributes": { "configuration": { @@ -43,6 +40,22 @@ "description": "%config.gulp.autoDetect%" } } - } + }, + "taskDefinitions": [ + { + "type": "gulp", + "required": ["task"], + "properties": { + "task": { + "type": "string", + "description": "The Gulp task to customize" + }, + "file": { + "type": "string", + "description": "The Gulp file that provides the task. Can be omitted." + } + } + } + ] } } \ No newline at end of file diff --git a/extensions/gulp/src/main.ts b/extensions/gulp/src/main.ts index e4bbba3b42245..24d7370cf13a1 100644 --- a/extensions/gulp/src/main.ts +++ b/extensions/gulp/src/main.ts @@ -34,12 +34,15 @@ export function activate(_context: vscode.ExtensionContext): void { taskProvider.dispose(); taskProvider = undefined; } else if (!taskProvider && autoDetect === 'on') { - taskProvider = vscode.workspace.registerTaskProvider({ + taskProvider = vscode.workspace.registerTaskProvider('gulp', { provideTasks: () => { if (!gulpPromise) { gulpPromise = getGulpTasks(); } return gulpPromise; + }, + resolveTask(_task: vscode.Task): vscode.Task | undefined { + return undefined; } }); } @@ -73,6 +76,39 @@ function exec(command: string, options: cp.ExecOptions): Promise<{ stdout: strin }); } +let _channel: vscode.OutputChannel; +function getOutputChannel(): vscode.OutputChannel { + if (!_channel) { + _channel = vscode.window.createOutputChannel('Gulp Auto Detection'); + } + return _channel; +} + +interface GulpTaskDefinition extends vscode.TaskDefinition { + task: string; + file?: string; +} + +const buildNames: string[] = ['build', 'compile', 'watch']; +function isBuildTask(name: string): boolean { + for (let buildName of buildNames) { + if (name.indexOf(buildName) !== -1) { + return true; + } + } + return false; +} + +const testNames: string[] = ['test']; +function isTestTask(name: string): boolean { + for (let testName of testNames) { + if (name.indexOf(testName) !== -1) { + return true; + } + } + return false; +} + async function getGulpTasks(): Promise { let workspaceRoot = vscode.workspace.rootPath; let emptyTasks: vscode.Task[] = []; @@ -98,48 +134,44 @@ async function getGulpTasks(): Promise { } let commandLine = `${gulpCommand} --tasks-simple --no-color`; - let channel = vscode.window.createOutputChannel('tasks'); try { let { stdout, stderr } = await exec(commandLine, { cwd: workspaceRoot }); - if (stderr) { - channel.appendLine(stderr); + if (stderr && stderr.length > 0) { + getOutputChannel().appendLine(stderr); + getOutputChannel().show(true); } let result: vscode.Task[] = []; if (stdout) { - let buildTask: { task: vscode.Task | undefined, rank: number } = { task: undefined, rank: 0 }; - let testTask: { task: vscode.Task | undefined, rank: number } = { task: undefined, rank: 0 }; let lines = stdout.split(/\r{0,1}\n/); for (let line of lines) { if (line.length === 0) { continue; } - let task = new vscode.ShellTask(`gulp: ${line}`, `${gulpCommand} ${line}`); - task.identifier = `gulp.${line}`; + let kind: GulpTaskDefinition = { + type: 'gulp', + task: line + }; + let task = new vscode.Task(kind, line, 'gulp', new vscode.ShellExecution(`${gulpCommand} ${line}`)); result.push(task); let lowerCaseLine = line.toLowerCase(); - if (lowerCaseLine === 'build') { - buildTask = { task, rank: 2 }; - } else if (lowerCaseLine.indexOf('build') !== -1 && buildTask.rank < 1) { - buildTask = { task, rank: 1 }; - } else if (lowerCaseLine === 'test') { - testTask = { task, rank: 2 }; - } else if (lowerCaseLine.indexOf('test') !== -1 && testTask.rank < 1) { - testTask = { task, rank: 1 }; + if (isBuildTask(lowerCaseLine)) { + task.group = vscode.TaskGroup.Build; + } else if (isTestTask(lowerCaseLine)) { + task.group = vscode.TaskGroup.Test; } } - if (buildTask.task) { - buildTask.task.group = vscode.TaskGroup.Build; - } - if (testTask.task) { - testTask.task.group = vscode.TaskGroup.Test; - } } return result; } catch (err) { + let channel = getOutputChannel(); if (err.stderr) { channel.appendLine(err.stderr); } + if (err.stdout) { + channel.appendLine(err.stdout); + } channel.appendLine(localize('execFailed', 'Auto detecting gulp failed with error: {0}', err.error ? err.error.toString() : 'unknown')); + channel.show(true); return emptyTasks; } } \ No newline at end of file diff --git a/extensions/gulp/tsconfig.json b/extensions/gulp/tsconfig.json index d815a565579a2..e804fa3acd7a6 100644 --- a/extensions/gulp/tsconfig.json +++ b/extensions/gulp/tsconfig.json @@ -12,8 +12,7 @@ "noUnusedLocals": true, "noUnusedParameters": true }, - "exclude": [ - "node_modules", - "out" + "include": [ + "src/**/*" ] } \ No newline at end of file diff --git a/extensions/handlebars/.vscodeignore b/extensions/handlebars/.vscodeignore new file mode 100644 index 0000000000000..77ab386fc7df4 --- /dev/null +++ b/extensions/handlebars/.vscodeignore @@ -0,0 +1 @@ +test/** \ No newline at end of file diff --git a/extensions/handlebars/syntaxes/Handlebars.tmLanguage.json b/extensions/handlebars/syntaxes/Handlebars.tmLanguage.json index 9e3579d90c283..e915b691d7faa 100644 --- a/extensions/handlebars/syntaxes/Handlebars.tmLanguage.json +++ b/extensions/handlebars/syntaxes/Handlebars.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/daaain/Handlebars/blob/master/grammars/Handlebars.json", + "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." + ], "name": "Handlebars", "repository": { "html_tags": { @@ -849,6 +854,5 @@ "template", "tmpl" ], - "uuid": "70E91676-DE0A-4266-A2B9-3AD2E535E484", - "version": "https://github.com/daaain/Handlebars/commit/4e8244410815da73f93375532939d48bd5a9bb93" + "uuid": "70E91676-DE0A-4266-A2B9-3AD2E535E484" } \ No newline at end of file diff --git a/extensions/handlebars/test/colorize-results/test_handlebars.json b/extensions/handlebars/test/colorize-results/test_handlebars.json index cdf6cca84ccc3..a14353771e5d8 100644 --- a/extensions/handlebars/test/colorize-results/test_handlebars.json +++ b/extensions/handlebars/test/colorize-results/test_handlebars.json @@ -150,7 +150,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -161,7 +161,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -172,7 +172,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -227,7 +227,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -249,7 +249,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -260,7 +260,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -315,7 +315,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -326,7 +326,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -337,7 +337,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -359,7 +359,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -370,7 +370,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -381,7 +381,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -436,7 +436,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -546,7 +546,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -568,7 +568,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -579,7 +579,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -590,7 +590,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -634,7 +634,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -656,7 +656,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -667,7 +667,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -832,7 +832,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -997,7 +997,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1019,7 +1019,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1030,7 +1030,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1085,7 +1085,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1096,7 +1096,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1107,7 +1107,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1162,7 +1162,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1437,7 +1437,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1459,7 +1459,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1470,7 +1470,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1602,7 +1602,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "string: #CE9178", "light_vs": "string.quoted.double.handlebars: #0000FF", - "hc_black": "string: #CE9178" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1613,7 +1613,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string.quoted.double.handlebars: #0000FF", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1624,7 +1624,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "string: #CE9178", "light_vs": "string.quoted.double.handlebars: #0000FF", - "hc_black": "string: #CE9178" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1646,7 +1646,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "string: #CE9178", "light_vs": "string.quoted.double.handlebars: #0000FF", - "hc_black": "string: #CE9178" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1657,7 +1657,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string.quoted.double.handlebars: #0000FF", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1668,7 +1668,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "string: #CE9178", "light_vs": "string.quoted.double.handlebars: #0000FF", - "hc_black": "string: #CE9178" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1701,7 +1701,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1712,7 +1712,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1723,7 +1723,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1844,7 +1844,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1855,7 +1855,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1866,7 +1866,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1921,7 +1921,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { diff --git a/extensions/handlebars/test/colorize-results/test_hbs.json b/extensions/handlebars/test/colorize-results/test_hbs.json index c359f0eabc5b6..466499b590c87 100644 --- a/extensions/handlebars/test/colorize-results/test_hbs.json +++ b/extensions/handlebars/test/colorize-results/test_hbs.json @@ -194,7 +194,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -216,7 +216,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -227,7 +227,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -359,7 +359,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "string: #CE9178", "light_vs": "string.quoted.double.handlebars: #0000FF", - "hc_black": "string: #CE9178" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -370,7 +370,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string.quoted.double.handlebars: #0000FF", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -381,7 +381,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "string: #CE9178", "light_vs": "string.quoted.double.handlebars: #0000FF", - "hc_black": "string: #CE9178" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -403,7 +403,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "string: #CE9178", "light_vs": "string.quoted.double.handlebars: #0000FF", - "hc_black": "string: #CE9178" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -414,7 +414,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string.quoted.double.handlebars: #0000FF", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -425,7 +425,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "string: #CE9178", "light_vs": "string.quoted.double.handlebars: #0000FF", - "hc_black": "string: #CE9178" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -458,7 +458,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -469,7 +469,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -480,7 +480,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -601,7 +601,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -612,7 +612,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -623,7 +623,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -678,7 +678,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -733,7 +733,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -744,7 +744,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -755,7 +755,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -777,7 +777,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -788,7 +788,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -799,7 +799,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -821,7 +821,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -832,7 +832,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -843,7 +843,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1052,7 +1052,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1074,7 +1074,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1085,7 +1085,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1140,7 +1140,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1151,7 +1151,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1162,7 +1162,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1184,7 +1184,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1195,7 +1195,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1206,7 +1206,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1261,7 +1261,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1415,7 +1415,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1437,7 +1437,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1459,7 +1459,7 @@ "light_plus": "variable: #001080", "dark_vs": "entity.other.attribute-name: #9CDCFE", "light_vs": "entity.other.attribute-name: #FF0000", - "hc_black": "entity.other.attribute-name: #9CDCFE" + "hc_black": "variable: #9CDCFE" } }, { @@ -1525,7 +1525,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1635,7 +1635,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1657,7 +1657,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1668,7 +1668,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1690,7 +1690,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1712,7 +1712,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1734,7 +1734,7 @@ "light_plus": "variable: #001080", "dark_vs": "entity.other.attribute-name: #9CDCFE", "light_vs": "entity.other.attribute-name: #FF0000", - "hc_black": "entity.other.attribute-name: #9CDCFE" + "hc_black": "variable: #9CDCFE" } }, { @@ -1800,7 +1800,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1822,7 +1822,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { diff --git a/extensions/hlsl/.vscodeignore b/extensions/hlsl/.vscodeignore new file mode 100644 index 0000000000000..77ab386fc7df4 --- /dev/null +++ b/extensions/hlsl/.vscodeignore @@ -0,0 +1 @@ +test/** \ No newline at end of file diff --git a/extensions/hlsl/syntaxes/hlsl.json b/extensions/hlsl/syntaxes/hlsl.json index 91dcf2b252026..20565922c5383 100644 --- a/extensions/hlsl/syntaxes/hlsl.json +++ b/extensions/hlsl/syntaxes/hlsl.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/tgjones/shaders-tmLanguage/blob/master/grammars/hlsl.json", + "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." + ], "scopeName": "source.hlsl", "name": "HLSL", "fileTypes": [ @@ -213,6 +218,5 @@ } ] } - ], - "version": "https://github.com/tgjones/shaders-tmLanguage/commit/cd1ef40f549f9ce2b9e6b73498688de114a85382" + ] } \ No newline at end of file diff --git a/extensions/hlsl/test/colorize-results/test_hlsl.json b/extensions/hlsl/test/colorize-results/test_hlsl.json index 0f245f64b567e..06022858d4aad 100644 --- a/extensions/hlsl/test/colorize-results/test_hlsl.json +++ b/extensions/hlsl/test/colorize-results/test_hlsl.json @@ -73,7 +73,7 @@ "light_plus": "support.variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.variable: #9CDCFE" } }, { @@ -117,7 +117,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -183,7 +183,7 @@ "light_plus": "support.variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.variable: #9CDCFE" } }, { @@ -249,7 +249,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { diff --git a/extensions/html/.vscodeignore b/extensions/html/.vscodeignore new file mode 100644 index 0000000000000..4fddc6954ced2 --- /dev/null +++ b/extensions/html/.vscodeignore @@ -0,0 +1,9 @@ +test/** +server/tsconfig.json +server/node_modules/@types/** +server/src/** +server/test/** +server/out/test/** +client/tsconfig.json +client/src/** +npm-shrinkwrap.json \ No newline at end of file diff --git a/extensions/html/OSSREADME.json b/extensions/html/OSSREADME.json index 238e37e068fcd..473df53afb391 100644 --- a/extensions/html/OSSREADME.json +++ b/extensions/html/OSSREADME.json @@ -50,7 +50,7 @@ "name": "Ionic documentation", "version": "1.2.4", "license": "Apache2", - "repositoryURL": "https://github.com/driftyco/ionic-site", + "repositoryURL": "https://github.com/ionic-team/ionic-site", "licenseDetail": [ "Copyright Drifty Co. http://drifty.com/.", "", diff --git a/extensions/html/client/src/htmlMain.ts b/extensions/html/client/src/htmlMain.ts index cd12405a71f24..7f4c9fe344060 100644 --- a/extensions/html/client/src/htmlMain.ts +++ b/extensions/html/client/src/htmlMain.ts @@ -78,6 +78,10 @@ export function activate(context: ExtensionContext) { }); languages.setLanguageConfiguration('html', { + indentationRules: { + increaseIndentPattern: /<(?!\?|(?:area|base|br|col|frame|hr|html|img|input|link|meta|param)\b|[^>]*\/>)([-_\.A-Za-z0-9]+)(?=\s|>)\b[^>]*>(?!.*<\/\1>)|)|\{[^}"']*$/, + decreaseIndentPattern: /^\s*(<\/(?!html)[-_\.A-Za-z0-9]+\b[^>]*>|-->|\})/ + }, wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g, onEnterRules: [ { diff --git a/extensions/html/npm-shrinkwrap.json b/extensions/html/npm-shrinkwrap.json index fe73237002a1e..7fee667332b3d 100644 --- a/extensions/html/npm-shrinkwrap.json +++ b/extensions/html/npm-shrinkwrap.json @@ -8,9 +8,9 @@ "resolved": "https://registry.npmjs.org/applicationinsights/-/applicationinsights-0.18.0.tgz" }, "vscode-extension-telemetry": { - "version": "0.0.6", - "from": "vscode-extension-telemetry@>=0.0.6 <0.0.7", - "resolved": "https://registry.npmjs.org/vscode-extension-telemetry/-/vscode-extension-telemetry-0.0.6.tgz" + "version": "0.0.7", + "from": "vscode-extension-telemetry@>=0.0.8 <0.0.9", + "resolved": "https://registry.npmjs.org/vscode-extension-telemetry/-/vscode-extension-telemetry-0.0.8.tgz" }, "vscode-jsonrpc": { "version": "3.1.0-alpha.1", @@ -38,4 +38,4 @@ "resolved": "https://registry.npmjs.org/winreg/-/winreg-1.2.3.tgz" } } -} +} \ No newline at end of file diff --git a/extensions/html/package.json b/extensions/html/package.json index 7c6e97305a164..df231a22a2f61 100644 --- a/extensions/html/package.json +++ b/extensions/html/package.json @@ -24,6 +24,7 @@ { "id": "html", "extensions": [ + ".rhtml", ".html", ".htm", ".shtml", @@ -190,13 +191,13 @@ } }, "dependencies": { - "vscode-extension-telemetry": "^0.0.7", - "vscode-languageclient": "^3.1.0-alpha.1", - "vscode-languageserver-types": "^3.0.3", - "vscode-nls": "^2.0.2" + "vscode-extension-telemetry": "0.0.8", + "vscode-languageclient": "3.1.0-alpha.1", + "vscode-languageserver-types": "3.0.3", + "vscode-nls": "2.0.2" }, "devDependencies": { "@types/node": "^6.0.51", "@types/mocha": "^2.2.33" } -} +} \ No newline at end of file diff --git a/extensions/html/server/npm-shrinkwrap.json b/extensions/html/server/npm-shrinkwrap.json index 82254c66b11df..ee83f51e71e65 100644 --- a/extensions/html/server/npm-shrinkwrap.json +++ b/extensions/html/server/npm-shrinkwrap.json @@ -3,14 +3,21 @@ "version": "1.0.0", "dependencies": { "vscode-css-languageservice": { - "version": "2.0.2", + "version": "2.1.0", "from": "vscode-css-languageservice@next", - "resolved": "https://registry.npmjs.org/vscode-css-languageservice/-/vscode-css-languageservice-2.0.2.tgz" + "resolved": "https://registry.npmjs.org/vscode-css-languageservice/-/vscode-css-languageservice-2.1.0.tgz", + "dependencies": { + "vscode-languageserver-types": { + "version": "3.2.0", + "from": "vscode-languageserver-types@>=3.2.0 <4.0.0", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.2.0.tgz" + } + } }, "vscode-html-languageservice": { - "version": "2.0.4", + "version": "2.0.5", "from": "vscode-html-languageservice@next", - "resolved": "https://registry.npmjs.org/vscode-html-languageservice/-/vscode-html-languageservice-2.0.4.tgz" + "resolved": "https://registry.npmjs.org/vscode-html-languageservice/-/vscode-html-languageservice-2.0.5.tgz" }, "vscode-jsonrpc": { "version": "3.1.0-alpha.1", diff --git a/extensions/html/server/package.json b/extensions/html/server/package.json index a80e9b214bafa..5284d547143e5 100644 --- a/extensions/html/server/package.json +++ b/extensions/html/server/package.json @@ -8,8 +8,8 @@ "node": "*" }, "dependencies": { - "vscode-css-languageservice": "^2.0.2", - "vscode-html-languageservice": "^2.0.4", + "vscode-css-languageservice": "^2.1.0", + "vscode-html-languageservice": "^2.0.5", "vscode-languageserver": "^3.1.0-alpha.1", "vscode-nls": "^2.0.2", "vscode-uri": "^1.0.0" diff --git a/extensions/html/server/src/modes/formatting.ts b/extensions/html/server/src/modes/formatting.ts index 3c39a703b5941..54bbcd2577297 100644 --- a/extensions/html/server/src/modes/formatting.ts +++ b/extensions/html/server/src/modes/formatting.ts @@ -5,13 +5,27 @@ 'use strict'; import { applyEdits } from '../utils/edits'; -import { TextDocument, Range, TextEdit, FormattingOptions } from 'vscode-languageserver-types'; +import { TextDocument, Range, TextEdit, FormattingOptions, Position } from 'vscode-languageserver-types'; import { LanguageModes } from './languageModes'; import { pushAll } from '../utils/arrays'; +import { isEOL } from '../utils/strings'; export function format(languageModes: LanguageModes, document: TextDocument, formatRange: Range, formattingOptions: FormattingOptions, enabledModes: { [mode: string]: boolean }) { let result: TextEdit[] = []; + let endPos = formatRange.end; + let endOffset = document.offsetAt(endPos); + let content = document.getText(); + if (endPos.character === 0 && endPos.line > 0 && endOffset !== content.length) { + // if selection ends after a new line, exclude that new line + let prevLineStart = document.offsetAt(Position.create(endPos.line - 1, 0)); + while (isEOL(content, endOffset - 1) && endOffset > prevLineStart) { + endOffset--; + } + formatRange = Range.create(formatRange.start, document.positionAt(endOffset)); + } + + // run the html formatter on the full range and pass the result content to the embedded formatters. // from the final content create a single edit // advantages of this approach are diff --git a/extensions/html/server/src/modes/javascriptMode.ts b/extensions/html/server/src/modes/javascriptMode.ts index 0340f1be6b213..b9cd9075b2001 100644 --- a/extensions/html/server/src/modes/javascriptMode.ts +++ b/extensions/html/server/src/modes/javascriptMode.ts @@ -30,9 +30,10 @@ export function getJavascriptMode(documentRegions: LanguageModelCache compilerOptions, getScriptFileNames: () => [FILE_NAME, JQUERY_D_TS], + getScriptKind: () => ts.ScriptKind.JS, getScriptVersion: (fileName: string) => { if (fileName === FILE_NAME) { return String(scriptFileVersion); @@ -70,8 +71,9 @@ export function getJavascriptMode(documentRegions: LanguageModelCache { + const syntaxDiagnostics = jsLanguageService.getSyntacticDiagnostics(FILE_NAME); + const semanticDiagnostics = jsLanguageService.getSemanticDiagnostics(FILE_NAME); + return syntaxDiagnostics.concat(semanticDiagnostics).map((diag): Diagnostic => { return { range: convertRange(currentTextDocument, diag), severity: DiagnosticSeverity.Error, diff --git a/extensions/html/server/src/modes/languageModes.ts b/extensions/html/server/src/modes/languageModes.ts index 54349b429d886..59851b10851e7 100644 --- a/extensions/html/server/src/modes/languageModes.ts +++ b/extensions/html/server/src/modes/languageModes.ts @@ -68,7 +68,7 @@ export function getLanguageModes(supportedLanguages: { [languageId: string]: boo } return { getModeAtPosition(document: TextDocument, position: Position): LanguageMode { - let languageId = documentRegions.get(document).getLanguageAtPosition(position);; + let languageId = documentRegions.get(document).getLanguageAtPosition(position); if (languageId) { return modes[languageId]; } diff --git a/extensions/html/server/src/test/formatting.test.ts b/extensions/html/server/src/test/formatting.test.ts index 81fc9954ab334..ea4ecf3315304 100644 --- a/extensions/html/server/src/test/formatting.test.ts +++ b/extensions/html/server/src/test/formatting.test.ts @@ -103,6 +103,10 @@ suite('HTML Embedded Formatting', () => { assertFormat('\n ', '\n '); }); + test('Range after new line', function (): any { + assertFormat('\n |\n|', '\n \n'); + }); + }); function applyEdits(document: TextDocument, edits: TextEdit[]): string { diff --git a/extensions/html/server/src/utils/strings.ts b/extensions/html/server/src/utils/strings.ts index f04a5744fab78..7540468238793 100644 --- a/extensions/html/server/src/utils/strings.ts +++ b/extensions/html/server/src/utils/strings.ts @@ -57,9 +57,12 @@ export function isWhitespaceOnly(str: string) { return /^\s*$/.test(str); } +export function isEOL(content: string, offset: number) { + return isNewlineCharacter(content.charCodeAt(offset)); +} const CR = '\r'.charCodeAt(0); const NL = '\n'.charCodeAt(0); -function isNewlineCharacter(charCode: number) { +export function isNewlineCharacter(charCode: number) { return charCode === CR || charCode === NL; } \ No newline at end of file diff --git a/extensions/html/syntaxes/html.json b/extensions/html/syntaxes/html.json index 66eacb26486d9..4192c82470395 100644 --- a/extensions/html/syntaxes/html.json +++ b/extensions/html/syntaxes/html.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/html.tmbundle/blob/master/Syntaxes/HTML.plist", + "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." + ], "fileTypes": [ "html", "htm", @@ -339,7 +344,7 @@ }, { "begin": "\\G", - "end": "(?i:(?=/?>|type\\s*=\\s*('|\"|)(?!text/(javascript|ecmascript)|application/((x-)?javascript|ecmascript))\\b))", + "end": "(?i:(?=/?>|type(?=[\\s=])(?!\\s*=\\s*('|\"|)(text/(javascript|ecmascript|babel)|application/((x-)?javascript|ecmascript|babel)|module)[\\s\"'>])))", "name": "meta.tag.metadata.script.html", "patterns": [ { @@ -347,6 +352,48 @@ } ] }, + { + "begin": "(?=(?i:type\\s*=\\s*('|\"|)(text/(x-handlebars|(x-(handlebars-)?|ng-)?template|html)[\\s\"'>])))", + "end": "((<))(?=/(?i:script))", + "endCaptures": { + "0": { + "name": "meta.tag.metadata.script.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "text.html.basic" + } + }, + "patterns": [ + { + "begin": "\\G", + "end": "(>)|(?=/>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.metadata.script.html", + "patterns": [ + { + "include": "#tag-stuff" + } + ] + }, + { + "begin": "(?!\\G)", + "end": "(?= + + + + + + \ No newline at end of file diff --git a/extensions/html/test/colorize-results/12750_html.json b/extensions/html/test/colorize-results/12750_html.json index 0e544efdcf8b2..88c372b5581f1 100644 --- a/extensions/html/test/colorize-results/12750_html.json +++ b/extensions/html/test/colorize-results/12750_html.json @@ -117,7 +117,7 @@ "light_plus": "support.variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.variable: #9CDCFE" } }, { @@ -139,7 +139,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -304,7 +304,7 @@ "light_plus": "support.variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.variable: #9CDCFE" } }, { @@ -326,7 +326,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { diff --git a/extensions/html/test/colorize-results/25920_html.json b/extensions/html/test/colorize-results/25920_html.json new file mode 100644 index 0000000000000..697937acdbdcb --- /dev/null +++ b/extensions/html/test/colorize-results/25920_html.json @@ -0,0 +1,1036 @@ +[ + { + "c": "<", + "t": "text.html.basic meta.tag.structure.any.html punctuation.definition.tag.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "html", + "t": "text.html.basic meta.tag.structure.any.html entity.name.tag.structure.any.html", + "r": { + "dark_plus": "entity.name.tag: #569CD6", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag: #569CD6", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag: #569CD6" + } + }, + { + "c": ">", + "t": "text.html.basic meta.tag.structure.any.html punctuation.definition.tag.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "<", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.begin.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "script", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html entity.name.tag.html", + "r": { + "dark_plus": "entity.name.tag: #569CD6", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag: #569CD6", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag: #569CD6" + } + }, + { + "c": " ", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "type", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html entity.other.attribute-name.html", + "r": { + "dark_plus": "entity.other.attribute-name: #9CDCFE", + "light_plus": "entity.other.attribute-name: #FF0000", + "dark_vs": "entity.other.attribute-name: #9CDCFE", + "light_vs": "entity.other.attribute-name: #FF0000", + "hc_black": "entity.other.attribute-name: #9CDCFE" + } + }, + { + "c": "=", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "'", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html string.quoted.single.html punctuation.definition.string.begin.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": "text/html", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html string.quoted.single.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": "'", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html string.quoted.single.html punctuation.definition.string.end.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": ">", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.end.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "\t", + "t": "text.html.basic meta.embedded.block.html text.html.basic", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "<", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html punctuation.definition.tag.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "div", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html entity.name.tag.html", + "r": { + "dark_plus": "entity.name.tag: #569CD6", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag: #569CD6", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag: #569CD6" + } + }, + { + "c": " ", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "class", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html entity.other.attribute-name.html", + "r": { + "dark_plus": "entity.other.attribute-name: #9CDCFE", + "light_plus": "entity.other.attribute-name: #FF0000", + "dark_vs": "entity.other.attribute-name: #9CDCFE", + "light_vs": "entity.other.attribute-name: #FF0000", + "hc_black": "entity.other.attribute-name: #9CDCFE" + } + }, + { + "c": "=", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "'", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html string.quoted.single.html punctuation.definition.string.begin.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": "foo", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html string.quoted.single.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": "'", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html string.quoted.single.html punctuation.definition.string.end.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": ">", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html punctuation.definition.tag.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "<", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html punctuation.definition.tag.html meta.scope.between-tag-pair.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "/", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html punctuation.definition.tag.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "div", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html entity.name.tag.html", + "r": { + "dark_plus": "entity.name.tag: #569CD6", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag: #569CD6", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag: #569CD6" + } + }, + { + "c": ">", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html punctuation.definition.tag.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "<", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.begin.html text.html.basic", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "/", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.begin.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "script", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html entity.name.tag.html", + "r": { + "dark_plus": "entity.name.tag: #569CD6", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag: #569CD6", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag: #569CD6" + } + }, + { + "c": ">", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.end.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "<", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.begin.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "script", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html entity.name.tag.html", + "r": { + "dark_plus": "entity.name.tag: #569CD6", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag: #569CD6", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag: #569CD6" + } + }, + { + "c": " ", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "type", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html entity.other.attribute-name.html", + "r": { + "dark_plus": "entity.other.attribute-name: #9CDCFE", + "light_plus": "entity.other.attribute-name: #FF0000", + "dark_vs": "entity.other.attribute-name: #9CDCFE", + "light_vs": "entity.other.attribute-name: #FF0000", + "hc_black": "entity.other.attribute-name: #9CDCFE" + } + }, + { + "c": "=", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "'", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html string.quoted.single.html punctuation.definition.string.begin.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": "module", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html string.quoted.single.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": "'", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html string.quoted.single.html punctuation.definition.string.end.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": ">", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.end.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "\t", + "t": "text.html.basic meta.embedded.block.html source.js", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "var", + "t": "text.html.basic meta.embedded.block.html source.js meta.var.expr.js storage.type.js", + "r": { + "dark_plus": "storage.type: #569CD6", + "light_plus": "storage.type: #0000FF", + "dark_vs": "storage.type: #569CD6", + "light_vs": "storage.type: #0000FF", + "hc_black": "storage.type: #569CD6" + } + }, + { + "c": " ", + "t": "text.html.basic meta.embedded.block.html source.js meta.var.expr.js", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "x", + "t": "text.html.basic meta.embedded.block.html source.js meta.var.expr.js meta.var-single-variable.expr.js meta.definition.variable.js variable.other.readwrite.js", + "r": { + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE" + } + }, + { + "c": " ", + "t": "text.html.basic meta.embedded.block.html source.js meta.var.expr.js meta.var-single-variable.expr.js", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "=", + "t": "text.html.basic meta.embedded.block.html source.js meta.var.expr.js keyword.operator.assignment.js", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, + { + "c": " ", + "t": "text.html.basic meta.embedded.block.html source.js meta.var.expr.js", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "9", + "t": "text.html.basic meta.embedded.block.html source.js meta.var.expr.js constant.numeric.decimal.js", + "r": { + "dark_plus": "constant.numeric: #B5CEA8", + "light_plus": "constant.numeric: #09885A", + "dark_vs": "constant.numeric: #B5CEA8", + "light_vs": "constant.numeric: #09885A", + "hc_black": "constant.numeric: #B5CEA8" + } + }, + { + "c": ";", + "t": "text.html.basic meta.embedded.block.html source.js punctuation.terminator.statement.js", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "<", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.begin.html source.js", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "/", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.begin.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "script", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html entity.name.tag.html", + "r": { + "dark_plus": "entity.name.tag: #569CD6", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag: #569CD6", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag: #569CD6" + } + }, + { + "c": ">", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.end.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "<", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.begin.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "script", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html entity.name.tag.html", + "r": { + "dark_plus": "entity.name.tag: #569CD6", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag: #569CD6", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag: #569CD6" + } + }, + { + "c": " ", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "type", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html entity.other.attribute-name.html", + "r": { + "dark_plus": "entity.other.attribute-name: #9CDCFE", + "light_plus": "entity.other.attribute-name: #FF0000", + "dark_vs": "entity.other.attribute-name: #9CDCFE", + "light_vs": "entity.other.attribute-name: #FF0000", + "hc_black": "entity.other.attribute-name: #9CDCFE" + } + }, + { + "c": "=", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "'", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html string.quoted.single.html punctuation.definition.string.begin.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": "text/ng-template", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html string.quoted.single.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": "'", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html string.quoted.single.html punctuation.definition.string.end.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": ">", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.end.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "\t", + "t": "text.html.basic meta.embedded.block.html text.html.basic", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "<", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html punctuation.definition.tag.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "div", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html entity.name.tag.html", + "r": { + "dark_plus": "entity.name.tag: #569CD6", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag: #569CD6", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag: #569CD6" + } + }, + { + "c": " ", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "class", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html entity.other.attribute-name.html", + "r": { + "dark_plus": "entity.other.attribute-name: #9CDCFE", + "light_plus": "entity.other.attribute-name: #FF0000", + "dark_vs": "entity.other.attribute-name: #9CDCFE", + "light_vs": "entity.other.attribute-name: #FF0000", + "hc_black": "entity.other.attribute-name: #9CDCFE" + } + }, + { + "c": "=", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "'", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html string.quoted.single.html punctuation.definition.string.begin.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": "foo", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html string.quoted.single.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": "'", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html string.quoted.single.html punctuation.definition.string.end.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": ">", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html punctuation.definition.tag.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "<", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html punctuation.definition.tag.html meta.scope.between-tag-pair.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "/", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html punctuation.definition.tag.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "div", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html entity.name.tag.html", + "r": { + "dark_plus": "entity.name.tag: #569CD6", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag: #569CD6", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag: #569CD6" + } + }, + { + "c": ">", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html punctuation.definition.tag.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "<", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.begin.html text.html.basic", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "/", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.begin.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "script", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html entity.name.tag.html", + "r": { + "dark_plus": "entity.name.tag: #569CD6", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag: #569CD6", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag: #569CD6" + } + }, + { + "c": ">", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.end.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "<", + "t": "text.html.basic meta.tag.structure.any.html punctuation.definition.tag.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "body", + "t": "text.html.basic meta.tag.structure.any.html entity.name.tag.structure.any.html", + "r": { + "dark_plus": "entity.name.tag: #569CD6", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag: #569CD6", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag: #569CD6" + } + }, + { + "c": " ", + "t": "text.html.basic meta.tag.structure.any.html", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "class", + "t": "text.html.basic meta.tag.structure.any.html entity.other.attribute-name.html", + "r": { + "dark_plus": "entity.other.attribute-name: #9CDCFE", + "light_plus": "entity.other.attribute-name: #FF0000", + "dark_vs": "entity.other.attribute-name: #9CDCFE", + "light_vs": "entity.other.attribute-name: #FF0000", + "hc_black": "entity.other.attribute-name: #9CDCFE" + } + }, + { + "c": "=", + "t": "text.html.basic meta.tag.structure.any.html", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "'", + "t": "text.html.basic meta.tag.structure.any.html string.quoted.single.html punctuation.definition.string.begin.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": "bar", + "t": "text.html.basic meta.tag.structure.any.html string.quoted.single.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": "'", + "t": "text.html.basic meta.tag.structure.any.html string.quoted.single.html punctuation.definition.string.end.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": ">", + "t": "text.html.basic meta.tag.structure.any.html punctuation.definition.tag.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "", + "t": "text.html.basic meta.tag.structure.any.html punctuation.definition.tag.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "", + "t": "text.html.basic meta.tag.structure.any.html punctuation.definition.tag.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + } +] \ No newline at end of file diff --git a/extensions/html/test/colorize-results/test_html.json b/extensions/html/test/colorize-results/test_html.json index b9b6fbc789bd1..987bfae286c87 100644 --- a/extensions/html/test/colorize-results/test_html.json +++ b/extensions/html/test/colorize-results/test_html.json @@ -645,7 +645,7 @@ "light_plus": "support.constant.color: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.color: #0451A5", - "hc_black": "support.constant.color: #B5CEA8" + "hc_black": "support.constant.color: #CE9178" } }, { @@ -711,7 +711,7 @@ "light_plus": "constant.other.color.rgb-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "constant.other.color.rgb-value: #0451A5", - "hc_black": "constant.other.color.rgb-value: #B5CEA8" + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -722,7 +722,7 @@ "light_plus": "constant.other.color.rgb-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "constant.other.color.rgb-value: #0451A5", - "hc_black": "constant.other.color.rgb-value: #B5CEA8" + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -1459,7 +1459,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1481,7 +1481,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1569,7 +1569,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1591,7 +1591,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1635,7 +1635,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -1646,7 +1646,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -1723,7 +1723,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -1734,7 +1734,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -1778,7 +1778,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -1789,7 +1789,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -1921,7 +1921,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1965,7 +1965,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2108,7 +2108,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2130,7 +2130,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { diff --git a/extensions/ini/.vscodeignore b/extensions/ini/.vscodeignore new file mode 100644 index 0000000000000..77ab386fc7df4 --- /dev/null +++ b/extensions/ini/.vscodeignore @@ -0,0 +1 @@ +test/** \ No newline at end of file diff --git a/extensions/ini/package.json b/extensions/ini/package.json index b6a9b6c37d015..bfb7bb522157e 100644 --- a/extensions/ini/package.json +++ b/extensions/ini/package.json @@ -3,6 +3,9 @@ "version": "0.1.0", "publisher": "vscode", "engines": { "vscode": "*" }, + "scripts": { + "update-grammar": "node ../../build/npm/update-grammar.js textmate/ini.tmbundle Syntaxes/Ini.plist ./syntaxes/ini.tmLanguage.json" + }, "contributes": { "languages": [{ "id": "ini", @@ -19,12 +22,12 @@ }], "grammars": [{ "language": "ini", - "scopeName": "source.properties", - "path": "./syntaxes/properties.plist" + "scopeName": "source.ini", + "path": "./syntaxes/ini.tmLanguage.json" },{ "language": "properties", - "scopeName": "source.properties", - "path": "./syntaxes/properties.plist" + "scopeName": "source.ini", + "path": "./syntaxes/ini.tmLanguage.json" }] } } diff --git a/extensions/ini/syntaxes/ini.tmLanguage.json b/extensions/ini/syntaxes/ini.tmLanguage.json new file mode 100644 index 0000000000000..34679c1bee09c --- /dev/null +++ b/extensions/ini/syntaxes/ini.tmLanguage.json @@ -0,0 +1,118 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/ini.tmbundle/blob/master/Syntaxes/Ini.plist", + "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." + ], + "fileTypes": [ + "ini", + "conf" + ], + "keyEquivalent": "^~I", + "name": "Ini", + "patterns": [ + { + "begin": "(^[ \\t]+)?(?=#)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.ini" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.ini" + } + }, + "end": "\\n", + "name": "comment.line.number-sign.ini" + } + ] + }, + { + "begin": "(^[ \\t]+)?(?=;)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.ini" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": ";", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.ini" + } + }, + "end": "\\n", + "name": "comment.line.semicolon.ini" + } + ] + }, + { + "captures": { + "1": { + "name": "keyword.other.definition.ini" + }, + "2": { + "name": "punctuation.separator.key-value.ini" + } + }, + "match": "\\b([a-zA-Z0-9_.-]+)\\b\\s*(=)" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.entity.ini" + }, + "3": { + "name": "punctuation.definition.entity.ini" + } + }, + "match": "^(\\[)(.*?)(\\])", + "name": "entity.name.section.group-title.ini" + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ini" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ini" + } + }, + "name": "string.quoted.single.ini", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.ini" + } + ] + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ini" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ini" + } + }, + "name": "string.quoted.double.ini" + } + ], + "scopeName": "source.ini", + "uuid": "77DC23B6-8A90-11D9-BAA4-000A9584EC8C" +} \ No newline at end of file diff --git a/extensions/ini/syntaxes/properties.plist b/extensions/ini/syntaxes/properties.plist deleted file mode 100644 index 11436566bd5a5..0000000000000 --- a/extensions/ini/syntaxes/properties.plist +++ /dev/null @@ -1,181 +0,0 @@ - - - - - fileTypes - - ini - conf - - keyEquivalent - ^~I - name - Ini - patterns - - - begin - (^[ \t]+)?(?=#) - beginCaptures - - 1 - - name - punctuation.whitespace.comment.leading.ini - - - end - (?!\G) - patterns - - - begin - # - beginCaptures - - 0 - - name - punctuation.definition.comment.ini - - - end - \n - name - comment.line.number-sign.ini - - - - - begin - (^[ \t]+)?(?=;) - beginCaptures - - 1 - - name - punctuation.whitespace.comment.leading.ini - - - end - (?!\G) - patterns - - - begin - ; - beginCaptures - - 0 - - name - punctuation.definition.comment.ini - - - end - \n - name - comment.line.semicolon.ini - - - - - captures - - 1 - - name - keyword.other.definition.ini - - 2 - - name - punctuation.separator.key-value.ini - - - match - \b([a-zA-Z0-9_.-]+)\b\s*(=) - - - captures - - 1 - - name - punctuation.definition.entity.ini - - 3 - - name - punctuation.definition.entity.ini - - - match - ^(\[)(.*?)(\]) - name - entity.name.section.group-title.ini - - - begin - ' - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ini - - - end - ' - endCaptures - - 0 - - name - punctuation.definition.string.end.ini - - - name - string.quoted.single.ini - patterns - - - match - \\. - name - constant.character.escape.ini - - - - - begin - " - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ini - - - end - " - endCaptures - - 0 - - name - punctuation.definition.string.end.ini - - - name - string.quoted.double.ini - - - scopeName - source.properties - uuid - 77DC23B6-8A90-11D9-BAA4-000A9584EC8C - - \ No newline at end of file diff --git a/extensions/ini/test/colorize-results/test_ini.json b/extensions/ini/test/colorize-results/test_ini.json index f30cdc5389207..5b001c68246ed 100644 --- a/extensions/ini/test/colorize-results/test_ini.json +++ b/extensions/ini/test/colorize-results/test_ini.json @@ -1,7 +1,7 @@ [ { "c": ";", - "t": "source.properties comment.line.semicolon.ini punctuation.definition.comment.ini", + "t": "source.ini comment.line.semicolon.ini punctuation.definition.comment.ini", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -12,7 +12,7 @@ }, { "c": " last modified 1 April 2001 by John Doe", - "t": "source.properties comment.line.semicolon.ini", + "t": "source.ini comment.line.semicolon.ini", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -23,7 +23,7 @@ }, { "c": "[", - "t": "source.properties entity.name.section.group-title.ini punctuation.definition.entity.ini", + "t": "source.ini entity.name.section.group-title.ini punctuation.definition.entity.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -34,7 +34,7 @@ }, { "c": "owner", - "t": "source.properties entity.name.section.group-title.ini", + "t": "source.ini entity.name.section.group-title.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -45,7 +45,7 @@ }, { "c": "]", - "t": "source.properties entity.name.section.group-title.ini punctuation.definition.entity.ini", + "t": "source.ini entity.name.section.group-title.ini punctuation.definition.entity.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -56,7 +56,7 @@ }, { "c": "name", - "t": "source.properties keyword.other.definition.ini", + "t": "source.ini keyword.other.definition.ini", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -67,7 +67,7 @@ }, { "c": "=", - "t": "source.properties punctuation.separator.key-value.ini", + "t": "source.ini punctuation.separator.key-value.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -78,7 +78,7 @@ }, { "c": "John Doe", - "t": "source.properties", + "t": "source.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -89,7 +89,7 @@ }, { "c": "organization", - "t": "source.properties keyword.other.definition.ini", + "t": "source.ini keyword.other.definition.ini", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -100,7 +100,7 @@ }, { "c": "=", - "t": "source.properties punctuation.separator.key-value.ini", + "t": "source.ini punctuation.separator.key-value.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -111,7 +111,7 @@ }, { "c": "Acme Widgets Inc.", - "t": "source.properties", + "t": "source.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -122,7 +122,7 @@ }, { "c": "[", - "t": "source.properties entity.name.section.group-title.ini punctuation.definition.entity.ini", + "t": "source.ini entity.name.section.group-title.ini punctuation.definition.entity.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -133,7 +133,7 @@ }, { "c": "database", - "t": "source.properties entity.name.section.group-title.ini", + "t": "source.ini entity.name.section.group-title.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -144,7 +144,7 @@ }, { "c": "]", - "t": "source.properties entity.name.section.group-title.ini punctuation.definition.entity.ini", + "t": "source.ini entity.name.section.group-title.ini punctuation.definition.entity.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -155,7 +155,7 @@ }, { "c": ";", - "t": "source.properties comment.line.semicolon.ini punctuation.definition.comment.ini", + "t": "source.ini comment.line.semicolon.ini punctuation.definition.comment.ini", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -166,7 +166,7 @@ }, { "c": " use IP address in case network name resolution is not working", - "t": "source.properties comment.line.semicolon.ini", + "t": "source.ini comment.line.semicolon.ini", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -177,7 +177,7 @@ }, { "c": "server", - "t": "source.properties keyword.other.definition.ini", + "t": "source.ini keyword.other.definition.ini", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -188,7 +188,7 @@ }, { "c": "=", - "t": "source.properties punctuation.separator.key-value.ini", + "t": "source.ini punctuation.separator.key-value.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -199,7 +199,7 @@ }, { "c": "192.0.2.62", - "t": "source.properties", + "t": "source.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -210,7 +210,7 @@ }, { "c": "port", - "t": "source.properties keyword.other.definition.ini", + "t": "source.ini keyword.other.definition.ini", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -221,7 +221,7 @@ }, { "c": "=", - "t": "source.properties punctuation.separator.key-value.ini", + "t": "source.ini punctuation.separator.key-value.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -232,7 +232,7 @@ }, { "c": "143", - "t": "source.properties", + "t": "source.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -243,7 +243,7 @@ }, { "c": "file", - "t": "source.properties keyword.other.definition.ini", + "t": "source.ini keyword.other.definition.ini", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -254,7 +254,7 @@ }, { "c": "=", - "t": "source.properties punctuation.separator.key-value.ini", + "t": "source.ini punctuation.separator.key-value.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -265,7 +265,7 @@ }, { "c": "\"", - "t": "source.properties string.quoted.double.ini punctuation.definition.string.begin.ini", + "t": "source.ini string.quoted.double.ini punctuation.definition.string.begin.ini", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -276,7 +276,7 @@ }, { "c": "payroll.dat", - "t": "source.properties string.quoted.double.ini", + "t": "source.ini string.quoted.double.ini", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -287,7 +287,7 @@ }, { "c": "\"", - "t": "source.properties string.quoted.double.ini punctuation.definition.string.end.ini", + "t": "source.ini string.quoted.double.ini punctuation.definition.string.end.ini", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", diff --git a/extensions/jake/.vscodeignore b/extensions/jake/.vscodeignore new file mode 100644 index 0000000000000..d43a539fddf5b --- /dev/null +++ b/extensions/jake/.vscodeignore @@ -0,0 +1,2 @@ +src/** +tsconfig.json \ No newline at end of file diff --git a/extensions/jake/npm-shrinkwrap.json b/extensions/jake/npm-shrinkwrap.json new file mode 100644 index 0000000000000..cffff9df1e398 --- /dev/null +++ b/extensions/jake/npm-shrinkwrap.json @@ -0,0 +1,11 @@ +{ + "name": "jake", + "version": "0.0.1", + "dependencies": { + "vscode-nls": { + "version": "2.0.2", + "from": "vscode-nls@>=2.0.2 <3.0.0", + "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-2.0.2.tgz" + } + } +} diff --git a/extensions/jake/package.json b/extensions/jake/package.json new file mode 100644 index 0000000000000..9e48dd07c438b --- /dev/null +++ b/extensions/jake/package.json @@ -0,0 +1,61 @@ +{ + "name": "jake", + "publisher": "vscode", + "description": "Extension to add Jake capabilities to VSCode.", + "displayName": "Jake support for VSCode", + "version": "0.0.1", + "engines": { + "vscode": "*" + }, + "categories": [ + "Other" + ], + "scripts": { + "compile": "gulp compile-extension:jake", + "watch": "gulp watch-extension:jake" + }, + "dependencies": { + "vscode-nls": "^2.0.2" + }, + "devDependencies": { + "@types/node": "^7.0.18" + }, + "main": "./out/main", + "activationEvents": [ + "onCommand:workbench.action.tasks.runTask" + ], + "contributes": { + "configuration": { + "id": "jake", + "type": "object", + "title": "Jake", + "properties": { + "jake.autoDetect": { + "type": "string", + "enum": [ + "off", + "on" + ], + "default": "on", + "description": "%config.jake.autoDetect%" + } + } + }, + "taskDefinitions": [ + { + "type": "jake", + "required": ["task"], + "properties": { + "task": { + "type": "string", + "description": "The Jake task to customize" + }, + "file": { + "type": "string", + "description": "The Jake file that provides the task. Can be omitted." + } + } + } + ] + } +} \ No newline at end of file diff --git a/extensions/jake/package.nls.json b/extensions/jake/package.nls.json new file mode 100644 index 0000000000000..c6ca7464a7535 --- /dev/null +++ b/extensions/jake/package.nls.json @@ -0,0 +1,3 @@ +{ + "config.jake.autoDetect": "Controls whether auto detection of Jake tasks is on or off. Default is on." +} \ No newline at end of file diff --git a/extensions/jake/src/main.ts b/extensions/jake/src/main.ts new file mode 100644 index 0000000000000..b0b4b137ab9ce --- /dev/null +++ b/extensions/jake/src/main.ts @@ -0,0 +1,182 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import * as path from 'path'; +import * as fs from 'fs'; +import * as cp from 'child_process'; +import * as vscode from 'vscode'; +import * as nls from 'vscode-nls'; + +const localize = nls.config(process.env.VSCODE_NLS_CONFIG)(); + +type AutoDetect = 'on' | 'off'; +let taskProvider: vscode.Disposable | undefined; + +export function activate(_context: vscode.ExtensionContext): void { + let workspaceRoot = vscode.workspace.rootPath; + if (!workspaceRoot) { + return; + } + let pattern = path.join(workspaceRoot, '{Jakefile,Jakefile.js}'); + let jakePromise: Thenable | undefined = undefined; + let fileWatcher = vscode.workspace.createFileSystemWatcher(pattern); + fileWatcher.onDidChange(() => jakePromise = undefined); + fileWatcher.onDidCreate(() => jakePromise = undefined); + fileWatcher.onDidDelete(() => jakePromise = undefined); + + function onConfigurationChanged() { + let autoDetect = vscode.workspace.getConfiguration('jake').get('autoDetect'); + if (taskProvider && autoDetect === 'off') { + jakePromise = undefined; + taskProvider.dispose(); + taskProvider = undefined; + } else if (!taskProvider && autoDetect === 'on') { + taskProvider = vscode.workspace.registerTaskProvider('jake', { + provideTasks: () => { + if (!jakePromise) { + jakePromise = getJakeTasks(); + } + return jakePromise; + }, + resolveTask(_task: vscode.Task): vscode.Task | undefined { + return undefined; + } + }); + } + } + vscode.workspace.onDidChangeConfiguration(onConfigurationChanged); + onConfigurationChanged(); +} + +export function deactivate(): void { + if (taskProvider) { + taskProvider.dispose(); + } +} + +function exists(file: string): Promise { + return new Promise((resolve, _reject) => { + fs.exists(file, (value) => { + resolve(value); + }); + }); +} + +function exec(command: string, options: cp.ExecOptions): Promise<{ stdout: string; stderr: string }> { + return new Promise<{ stdout: string; stderr: string }>((resolve, reject) => { + cp.exec(command, options, (error, stdout, stderr) => { + if (error) { + reject({ error, stdout, stderr }); + } + resolve({ stdout, stderr }); + }); + }); +} + +let _channel: vscode.OutputChannel; +function getOutputChannel(): vscode.OutputChannel { + if (!_channel) { + _channel = vscode.window.createOutputChannel('Jake Auto Detection'); + } + return _channel; +} + +interface JakeTaskDefinition extends vscode.TaskDefinition { + task: string; + file?: string; +} + +const buildNames: string[] = ['build', 'compile', 'watch']; +function isBuildTask(name: string): boolean { + for (let buildName of buildNames) { + if (name.indexOf(buildName) !== -1) { + return true; + } + } + return false; +} + +const testNames: string[] = ['test']; +function isTestTask(name: string): boolean { + for (let testName of testNames) { + if (name.indexOf(testName) !== -1) { + return true; + } + } + return false; +} + +async function getJakeTasks(): Promise { + let workspaceRoot = vscode.workspace.rootPath; + let emptyTasks: vscode.Task[] = []; + if (!workspaceRoot) { + return emptyTasks; + } + let jakefile = path.join(workspaceRoot, 'Jakefile'); + if (!await exists(jakefile)) { + jakefile = path.join(workspaceRoot, 'Jakefile.js'); + if (! await exists(jakefile)) { + return emptyTasks; + } + } + + let jakeCommand: string; + let platform = process.platform; + if (platform === 'win32' && await exists(path.join(workspaceRoot!, 'node_modules', '.bin', 'jake.cmd'))) { + jakeCommand = path.join('.', 'node_modules', '.bin', 'jake.cmd'); + } else if ((platform === 'linux' || platform === 'darwin') && await exists(path.join(workspaceRoot!, 'node_modules', '.bin', 'jake'))) { + jakeCommand = path.join('.', 'node_modules', '.bin', 'jake'); + } else { + jakeCommand = 'jake'; + } + + let commandLine = `${jakeCommand} --tasks`; + try { + let { stdout, stderr } = await exec(commandLine, { cwd: workspaceRoot }); + if (stderr) { + getOutputChannel().appendLine(stderr); + getOutputChannel().show(true); + } + let result: vscode.Task[] = []; + if (stdout) { + let lines = stdout.split(/\r{0,1}\n/); + for (let line of lines) { + if (line.length === 0) { + continue; + } + let regExp = /^jake\s+([^\s]+)\s/g; + let matches = regExp.exec(line); + if (matches && matches.length === 2) { + let taskName = matches[1]; + let kind: JakeTaskDefinition = { + type: 'jake', + task: taskName + }; + let task = new vscode.Task(kind, taskName, 'jake', new vscode.ShellExecution(`${jakeCommand} ${taskName}`)); + result.push(task); + let lowerCaseLine = line.toLowerCase(); + if (isBuildTask(lowerCaseLine)) { + task.group = vscode.TaskGroup.Build; + } else if (isTestTask(lowerCaseLine)) { + task.group = vscode.TaskGroup.Test; + } + } + } + } + return result; + } catch (err) { + let channel = getOutputChannel(); + if (err.stderr) { + channel.appendLine(err.stderr); + } + if (err.stdout) { + channel.appendLine(err.stdout); + } + channel.appendLine(localize('execFailed', 'Auto detecting Jake failed with error: {0}', err.error ? err.error.toString() : 'unknown')); + channel.show(true); + return emptyTasks; + } +} \ No newline at end of file diff --git a/extensions/jake/src/typings/refs.d.ts b/extensions/jake/src/typings/refs.d.ts new file mode 100644 index 0000000000000..954bab971e334 --- /dev/null +++ b/extensions/jake/src/typings/refs.d.ts @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +/// +/// +/// diff --git a/extensions/jake/tsconfig.json b/extensions/jake/tsconfig.json new file mode 100644 index 0000000000000..e804fa3acd7a6 --- /dev/null +++ b/extensions/jake/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "target": "es6", + "module": "commonjs", + "lib": [ + "es2016" + ], + "outDir": "./out", + "strictNullChecks": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noUnusedLocals": true, + "noUnusedParameters": true + }, + "include": [ + "src/**/*" + ] +} \ No newline at end of file diff --git a/extensions/java/.vscodeignore b/extensions/java/.vscodeignore new file mode 100644 index 0000000000000..77ab386fc7df4 --- /dev/null +++ b/extensions/java/.vscodeignore @@ -0,0 +1 @@ +test/** \ No newline at end of file diff --git a/extensions/java/OSSREADME.json b/extensions/java/OSSREADME.json index 6a2da0d287bd6..c87e957510ba8 100644 --- a/extensions/java/OSSREADME.json +++ b/extensions/java/OSSREADME.json @@ -1,42 +1,9 @@ // ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS: [{ - "name": "textmate/java.tmbundle", + "name": "atom/language-java", "version": "0.0.0", - "license": "TextMate Bundle License", - "repositoryURL": "https://github.com/textmate/java.tmbundle", - "licenseDetail": [ - "Copyright (c) textmate-java.tmbundle project authors", - "", - "If not otherwise specified (see below), files in this repository fall under the following license:", - "", - "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.", - "", - "An exception is made for files in readable text which contain their own license information,", - "or files where an accompanying file exists (in the same directory) with a \"-license\" suffix added", - "to the base-name name of the original file, and an extension of txt, html, or similar. For example", - "\"tidy\" is accompanied by \"tidy-license.txt\"." - ] -},{ - "name": "textmate/javadoc.tmbundle", - "version": "0.0.0", - "license": "TextMate Bundle License", - "repositoryURL": "https://github.com/textmate/javadoc.tmbundle", - "licenseDetail": [ - "Copyright (c) textmate-javadoc.tmbundle project authors", - "", - "If not otherwise specified (see below), files in this repository fall under the following license:", - "", - "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.", - "", - "An exception is made for files in readable text which contain their own license information,", - "or files where an accompanying file exists (in the same directory) with a \"-license\" suffix added", - "to the base-name name of the original file, and an extension of txt, html, or similar. For example", - "\"tidy\" is accompanied by \"tidy-license.txt\"." - ] + "license": "MIT", + "repositoryURL": "https://github.com/atom/language-java", + "description": "The file syntaxes/java.tmLanguage.json was derived from the Atom package https://github.com/atom/language-java which was originally converted from the TextMate bundle https://github.com/textmate/java.tmbundle." + }] diff --git a/extensions/java/package.json b/extensions/java/package.json index ee0e7e616abe1..d8c9375f0c3b5 100644 --- a/extensions/java/package.json +++ b/extensions/java/package.json @@ -4,7 +4,7 @@ "publisher": "vscode", "engines": { "vscode": "*" }, "scripts": { - "update-grammar": "node ../../build/npm/update-grammar.js textmate/java.tmbundle Syntaxes/Java.plist ./syntaxes/java.tmLanguage.json && node ../../build/npm/update-grammar.js textmate/javadoc.tmbundle Syntaxes/JavaDoc.tmLanguage ./syntaxes/javadoc.tmLanguage.json" + "update-grammar": "node ../../build/npm/update-grammar.js atom/language-java grammars/java.cson ./syntaxes/java.tmLanguage.json" }, "contributes": { "languages": [{ @@ -17,9 +17,6 @@ "language": "java", "scopeName": "source.java", "path": "./syntaxes/java.tmLanguage.json" - },{ - "scopeName": "text.html.javadoc", - "path": "./syntaxes/javadoc.tmLanguage.json" }] } } \ No newline at end of file diff --git a/extensions/java/syntaxes/java.tmLanguage.json b/extensions/java/syntaxes/java.tmLanguage.json index f0fcef2d0651f..654bf8e2ba8fc 100644 --- a/extensions/java/syntaxes/java.tmLanguage.json +++ b/extensions/java/syntaxes/java.tmLanguage.json @@ -1,100 +1,104 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-java/blob/master/grammars/java.cson", + "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." + ], + "scopeName": "source.java", + "name": "Java", "fileTypes": [ "java", "bsh" ], - "keyEquivalent": "^~J", - "name": "Java", "patterns": [ { - "captures": { - "1": { - "name": "keyword.other.package.java" - }, - "2": { - "name": "storage.modifier.package.java" - }, - "3": { - "name": "punctuation.terminator.java" - } - }, - "match": "^\\s*(package)\\b(?:\\s*([^ ;$]+)\\s*(;)?)?", - "name": "meta.package.java" - }, - { - "begin": "(import static)\\b\\s*", + "begin": "\\b(package)\\b\\s*", "beginCaptures": { "1": { - "name": "keyword.other.import.static.java" - } - }, - "captures": { - "1": { - "name": "keyword.other.import.java" - }, - "2": { - "name": "storage.modifier.import.java" - }, - "3": { - "name": "punctuation.terminator.java" + "name": "keyword.other.package.java" } }, - "contentName": "storage.modifier.import.java", - "end": "\\s*(?:$|(;))", + "end": "\\s*(;)", "endCaptures": { "1": { "name": "punctuation.terminator.java" } }, - "name": "meta.import.java", + "name": "meta.package.java", + "contentName": "storage.modifier.package.java", "patterns": [ { - "match": "\\.", - "name": "punctuation.separator.java" + "include": "#comments" + }, + { + "match": "(?<=\\.)\\s*\\.|\\.(?=\\s*;)", + "name": "invalid.illegal.character_not_allowed_here.java" + }, + { + "match": "(?\n\t\t\t\t\t\t\t0[xX]\t\t\t\t\t\t\t\t\t# Start literal\n\t\t\t\t\t\t\t(\\h([\\h_]*\\h)?)?\t\t\t\t\t\t# Optional Number\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t(?<=\\h)\\.\t\t\t\t\t\t\t# A number must exist on\n\t\t\t\t\t\t | \\.(?=\\h)\t\t\t\t\t\t\t# one side of the decimal\n\t\t\t\t\t\t | (?<=\\h)\t\t\t\t\t\t\t\t# Decimal not required\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t(\\h([\\h_]*\\h)?)?\t\t\t\t\t\t# Optional Number\n\t\t\t\t\t\t\t[pP]\t\t\t\t\t\t\t\t\t# Exponent Indicator\n\t\t\t\t\t\t\t[+-]?(0|[1-9]([0-9_]*[0-9])?)\t\t\t# Signed Integer\n\t\t\t\t\t\t\t[fFdD]?\t\t\t\t\t\t\t\t\t# Float Type Suffix\n\t\t\t\t\t\t)\n\t\t\t\t\t\t(?!\\w)\t\t\t\t\t\t\t\t\t\t# Ensure word boundry\n\t\t\t\t\t", - "name": "constant.numeric.hex-float.java" - }, - { - "match": "(?x)\n\t\t\t\t\t\t(?\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t(0|[1-9]([0-9_]*[0-9])?)\t\t\t\t# Leading digits\n\t\t\t\t\t\t\t\t(?=[eEfFdD.])\t\t\t\t\t\t\t# Allow for numbers without .\n\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t(?<=[0-9])(?=[eEfFdD])\t\t\t\t\t# Allow for numbers without .\n\t\t\t\t\t\t\t | \\.\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t[0-9]([0-9_]*[0-9])?\t\t\t\t\t# Numbers after .\n\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t[eE][+-]?(0|[1-9]([0-9_]*[0-9])?)\t\t# Exponent\n\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t[fFdD]?\t\t\t\t\t\t\t\t\t\t# Float Type Suffix\n\t\t\t\t\t\t)\n\t\t\t\t\t\t(?!\\w)\t\t\t\t\t\t\t\t\t\t\t# Ensure word boundry\n\t\t\t\t\t", - "name": "constant.numeric.float.java" - }, - { - "captures": { - "1": { - "name": "keyword.operator.dereference.java" + "begin": "^\\s*/\\*\\*", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.java" } }, - "match": "(\\.)?\\b([A-Z][A-Z0-9_]+)(?!<|\\.class|\\s*\\w+\\s*=)\\b", - "name": "constant.other.java" - } - ] - }, - "enums": { - "begin": "^(?=\\s*[A-Z0-9_]+\\s*({|\\(|,))", - "end": "(?=;|})", - "patterns": [ - { - "begin": "\\w+", - "beginCaptures": { + "end": "\\*/", + "endCaptures": { "0": { - "name": "constant.other.enum.java" + "name": "punctuation.definition.comment.java" } }, - "end": "(?=,|;|})", - "name": "meta.enum.java", + "name": "comment.block.javadoc.java", "patterns": [ { - "include": "#parens" + "match": "@(author|deprecated|return|see|serial|since|version)\\b", + "name": "keyword.other.documentation.javadoc.java" }, { - "begin": "{", - "beginCaptures": { - "0": { - "name": "punctuation.section.enum.begin.java" - } - }, - "end": "}", - "endCaptures": { - "0": { - "name": "punctuation.section.enum.end.java" + "match": "(@param)\\s+(\\S+)", + "captures": { + "1": { + "name": "keyword.other.documentation.javadoc.java" + }, + "2": { + "name": "variable.parameter.java" } - }, - "patterns": [ - { - "include": "#class-body" + } + }, + { + "match": "(@(?:exception|throws))\\s+(\\S+)", + "captures": { + "1": { + "name": "keyword.other.documentation.javadoc.java" + }, + "2": { + "name": "entity.name.type.class.java" + } + } + }, + { + "match": "{(@link)\\s+(\\S+)?#([\\w$]+\\s*\\([^\\(\\)]*\\)).*}", + "captures": { + "1": { + "name": "keyword.other.documentation.javadoc.java" + }, + "2": { + "name": "entity.name.type.class.java" + }, + "3": { + "name": "variable.parameter.java" + } + } + } + ] + } + ] + }, + "try-catch-finally": { + "patterns": [ + { + "begin": "\\btry\\b", + "beginCaptures": { + "0": { + "name": "keyword.control.try.java" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.section.try.end.bracket.curly.java" + } + }, + "name": "meta.try.java", + "patterns": [ + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.try.resources.begin.bracket.round.java" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.try.resources.end.bracket.round.java" + } + }, + "name": "meta.try.resources.java", + "patterns": [ + { + "include": "#code" + } + ] + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.try.begin.bracket.curly.java" + } + }, + "end": "(?=})", + "contentName": "meta.try.body.java", + "patterns": [ + { + "include": "#code" + } + ] + } + ] + }, + { + "begin": "\\b(catch)\\b\\s*(?=\\(\\s*[^\\s]+\\s*[^)]+\\))", + "beginCaptures": { + "1": { + "name": "keyword.control.catch.java" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.section.catch.end.bracket.curly.java" + } + }, + "name": "meta.catch.java", + "patterns": [ + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.parameters.begin.bracket.round.java" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.bracket.round.java" + } + }, + "contentName": "meta.catch.parameters.java", + "patterns": [ + { + "include": "#parameters" + } + ] + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.catch.begin.bracket.curly.java" + } + }, + "end": "(?=})", + "contentName": "meta.catch.body.java", + "patterns": [ + { + "include": "#code" + } + ] + } + ] + }, + { + "begin": "\\bfinally\\b", + "beginCaptures": { + "0": { + "name": "keyword.control.finally.java" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.section.finally.end.bracket.curly.java" + } + }, + "name": "meta.finally.java", + "patterns": [ + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.finally.begin.bracket.curly.java" + } + }, + "end": "(?=})", + "contentName": "meta.finally.body.java", + "patterns": [ + { + "include": "#code" } ] } ] + } + ] + }, + "constants-and-special-vars": { + "patterns": [ + { + "match": "\\b(true|false|null)\\b", + "name": "constant.language.java" + }, + { + "match": "\\bthis\\b", + "name": "variable.language.this.java" + }, + { + "match": "\\bsuper\\b", + "name": "variable.language.java" + } + ] + }, + "generics": { + "begin": "<", + "beginCaptures": { + "0": { + "name": "punctuation.bracket.angle.java" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.bracket.angle.java" + } + }, + "patterns": [ + { + "match": "\\b(extends|super)\\b", + "name": "storage.modifier.$1.java" + }, + { + "match": "([a-zA-Z$_][a-zA-Z0-9$_]*)(?=\\s*<)", + "captures": { + "1": { + "name": "storage.type.java" + } + } + }, + { + "match": "[a-zA-Z$_][a-zA-Z0-9$_]*", + "name": "storage.type.generic.java" + }, + { + "match": "\\?", + "name": "storage.type.generic.wildcard.java" + }, + { + "match": "&", + "name": "punctuation.separator.types.java" + }, + { + "match": ",", + "name": "punctuation.separator.delimiter.java" + }, + { + "include": "#parens" + }, + { + "include": "#generics" + }, + { + "include": "#comments" + } + ] + }, + "enums": { + "begin": "^\\s*(enum)\\s+(\\w+)", + "beginCaptures": { + "1": { + "name": "storage.modifier.java" + }, + "2": { + "name": "entity.name.type.enum.java" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.section.enum.end.bracket.curly.java" + } + }, + "name": "meta.enum.java", + "patterns": [ + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.enum.begin.bracket.curly.java" + } + }, + "end": "(?=})", + "patterns": [ + { + "match": "\\w+", + "name": "constant.other.enum.java" + }, + { + "include": "#class-body" + } + ] }, { "include": "#comments" + } + ] + }, + "function-call": { + "begin": "([A-Za-z_$][\\w$]*)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "entity.name.function.java" }, + "2": { + "name": "punctuation.definition.parameters.begin.bracket.round.java" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.bracket.round.java" + } + }, + "name": "meta.function-call.java", + "patterns": [ { - "include": "#annotations" + "include": "#code" } ] }, "keywords": { "patterns": [ { - "match": "\\b(try|catch|finally|throw)\\b", - "name": "keyword.control.catch-exception.java" + "match": "\\bthrow\\b", + "name": "keyword.control.throw.java" }, { "match": "\\?|:", @@ -604,7 +856,7 @@ }, { "match": "\\b(instanceof)\\b", - "name": "keyword.operator.java" + "name": "keyword.operator.instanceof.java" }, { "match": "(<<|>>>?|~|\\^)", @@ -641,39 +893,38 @@ { "match": "(\\||&)", "name": "keyword.operator.bitwise.java" - }, - { - "match": "(?<=\\S)\\.(?=\\S)", - "name": "keyword.operator.dereference.java" - }, + } + ] + }, + "lambda-expression": { + "patterns": [ { - "match": ";", - "name": "punctuation.terminator.java" + "match": "->", + "name": "storage.type.function.arrow.java" } ] }, "method-call": { - "begin": "([\\w$]+)(\\()", + "begin": "(\\.)\\s*([A-Za-z_$][\\w$]*)\\s*(\\()", "beginCaptures": { "1": { - "name": "meta.method.java" + "name": "punctuation.separator.period.java" }, "2": { - "name": "punctuation.definition.method-parameters.begin.java" + "name": "entity.name.function.java" + }, + "3": { + "name": "punctuation.definition.parameters.begin.bracket.round.java" } }, "end": "\\)", "endCaptures": { "0": { - "name": "punctuation.definition.method-parameters.end.java" + "name": "punctuation.definition.parameters.end.bracket.round.java" } }, "name": "meta.method-call.java", "patterns": [ - { - "match": ",", - "name": "punctuation.definition.seperator.parameter.java" - }, { "include": "#code" } @@ -684,7 +935,7 @@ "end": "(})|(?=;)", "endCaptures": { "1": { - "name": "punctuation.section.method.end.java" + "name": "punctuation.section.method.end.bracket.curly.java" } }, "name": "meta.method.java", @@ -693,49 +944,47 @@ "include": "#storage-modifiers" }, { - "begin": "(\\w+)\\s*\\(", + "begin": "(\\w+)\\s*(\\()", "beginCaptures": { "1": { "name": "entity.name.function.java" + }, + "2": { + "name": "punctuation.definition.parameters.begin.bracket.round.java" } }, "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.bracket.round.java" + } + }, "name": "meta.method.identifier.java", "patterns": [ { "include": "#parameters" }, { - "include": "#comments" - } - ] - }, - { - "begin": "<", - "end": ">", - "name": "storage.type.token.java", - "patterns": [ - { - "include": "#object-types" + "include": "#parens" }, { - "begin": "<", - "comment": "This is just to support <>'s with no actual type prefix", - "end": ">|[^\\w\\s,\\[\\]<]", - "name": "storage.type.generic.java" + "include": "#comments-inline" } ] }, + { + "include": "#generics" + }, { "begin": "(?=\\w.*\\s+\\w+\\s*\\()", - "end": "(?=\\w+\\s*\\()", + "end": "(?=\\s+\\w+\\s*\\()", "name": "meta.method.return-type.java", "patterns": [ { "include": "#all-types" }, { - "include": "#comments" + "include": "#parens" } ] }, @@ -746,11 +995,11 @@ "begin": "{", "beginCaptures": { "0": { - "name": "punctuation.section.method.begin.java" + "name": "punctuation.section.method.begin.bracket.curly.java" } }, "end": "(?=})", - "name": "meta.method.body.java", + "contentName": "meta.method.body.java", "patterns": [ { "include": "#code" @@ -762,136 +1011,251 @@ } ] }, + "numbers": { + "patterns": [ + { + "match": "(?x)\n\\b(?|[^\\w\\s,\\?<\\[\\]]", - "name": "storage.type.generic.java", + "include": "#generics" + }, + { + "begin": "\\b(?:[A-Z]\\w*\\s*(\\.)\\s*)*([A-Z]\\w*)\\s*(?=\\[)", + "beginCaptures": { + "1": { + "name": "punctuation.separator.period.java" + }, + "2": { + "name": "storage.type.object.array.java" + } + }, + "end": "(?!\\s*\\[)", "patterns": [ { - "include": "#object-types" + "include": "#comments" }, { - "begin": "<", - "comment": "This is just to support <>'s with no actual type prefix", - "end": ">|[^\\w\\s,\\[\\]<]", - "name": "storage.type.generic.java" + "include": "#parens" } ] }, { - "begin": "\\b((?:[a-z]\\w*\\.)*[A-Z]+\\w*)(?=\\[)", - "end": "(?=[^\\]\\s])", - "name": "storage.type.object.array.java", + "begin": "\\b(?:[A-Z]\\w*\\s*(\\.)\\s*)*[A-Z]\\w*\\s*(?=<)", + "beginCaptures": { + "0": { + "name": "storage.type.java" + }, + "1": { + "name": "punctuation.separator.period.java" + } + }, + "end": "(?<=>)", "patterns": [ { - "begin": "\\[", - "end": "\\]", - "patterns": [ - { - "include": "#code" - } - ] + "include": "#generics" } ] }, { + "match": "\\b(?:[A-Z]\\w*\\s*(\\.)\\s*)*[A-Z]\\w*\\b", + "name": "storage.type.java", "captures": { "1": { - "name": "keyword.operator.dereference.java" + "name": "punctuation.separator.period.java" } - }, - "match": "\\b(?:[a-z]\\w*(\\.))*[A-Z]+\\w*\\b", - "name": "storage.type.java" + } } ] }, "object-types-inherited": { "patterns": [ { - "begin": "\\b((?:[a-z]\\w*\\.)*[A-Z]+\\w*)<", - "end": ">|[^\\w\\s,<]", - "name": "entity.other.inherited-class.java", - "patterns": [ - { - "include": "#object-types" - }, - { - "begin": "<", - "comment": "This is just to support <>'s with no actual type prefix", - "end": ">|[^\\w\\s,<]", - "name": "storage.type.generic.java" - } - ] + "include": "#generics" }, { + "match": "\\b(?:[A-Z]\\w*\\s*(\\.)\\s*)*[A-Z]\\w*\\b", + "name": "entity.other.inherited-class.java", "captures": { "1": { - "name": "keyword.operator.dereference.java" + "name": "punctuation.separator.period.java" } - }, - "match": "\\b(?:[a-z]\\w*(\\.))*[A-Z]+\\w*", - "name": "entity.other.inherited-class.java" + } + }, + { + "match": ",", + "name": "punctuation.separator.delimiter.java" } ] }, + "objects": { + "match": "(?\\[\\],][\\w<>\\[\\],?\\s]*)?\n \\s+\n [A-Za-z_$][\\w$]* # At least one identifier after space\n ([\\w\\[\\],$][\\w\\[\\],\\s]*)? # possibly primitive array or additional identifiers\n \\s*(=|;)\n))", + "end": "(?=;)", + "name": "meta.definition.variable.java", "patterns": [ { - "include": "#strings" + "match": "([A-Za-z$_][\\w$]*)(?=\\s*(\\[\\])*\\s*(;|=|,))", + "captures": { + "1": { + "name": "variable.other.definition.java" + } + } }, { - "include": "#object-types" + "include": "#all-types" }, { - "include": "#constants-and-special-vars" - } - ] - }, - "variables": { - "applyEndPatternLast": 1, - "patterns": [ - { - "begin": "(?x:(?=\n (?:\n (?:private|protected|public|native|synchronized|volatile|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 (?!private|protected|public|native|synchronized|volatile|abstract|threadsafe|transient|static|final|def|void|boolean|byte|char|short|int|float|long|double)\n [\\w\\d_<>\\[\\],\\?][\\w\\d_<>\\[\\],\\? \\t]*\n (?:=|$)\n \n\t\t\t\t\t))", + "begin": "=", + "beginCaptures": { + "0": { + "name": "keyword.operator.assignment.java" + } + }, "end": "(?=;)", - "name": "meta.definition.variable.java", "patterns": [ - { - "match": "\\s" - }, - { - "captures": { - "1": { - "name": "constant.other.variable.java" - } - }, - "match": "([A-Z_0-9]+)\\s+(?=\\=)" - }, - { - "captures": { - "1": { - "name": "meta.definition.variable.name.java" - } - }, - "match": "(\\w[^\\s,]*)\\s+(?=\\=)" - }, - { - "begin": "=", - "beginCaptures": { - "0": { - "name": "keyword.operator.assignment.java" - } - }, - "end": "(?=;)", - "patterns": [ - { - "include": "#code" - } - ] - }, - { - "captures": { - "1": { - "name": "meta.definition.variable.name.java" - } - }, - "match": "(\\w[^\\s=]*)(?=\\s*;)" - }, { "include": "#code" } ] + }, + { + "include": "#code" + } + ] + }, + "member-variables": { + "begin": "(?=private|protected|public|native|synchronized|abstract|threadsafe|transient|static|final)", + "end": "(?=;)", + "patterns": [ + { + "include": "#storage-modifiers" + }, + { + "include": "#variables" } ] } - }, - "scopeName": "source.java", - "uuid": "2B449DF6-6B1D-11D9-94EC-000D93589AF6", - "version": "https://github.com/textmate/java.tmbundle/commit/faffa518d0b22b68b4e5e6b4c939722522b97d40" + } } \ No newline at end of file diff --git a/extensions/java/syntaxes/javadoc.tmLanguage.json b/extensions/java/syntaxes/javadoc.tmLanguage.json deleted file mode 100644 index a47e5c98d04df..0000000000000 --- a/extensions/java/syntaxes/javadoc.tmLanguage.json +++ /dev/null @@ -1,432 +0,0 @@ -{ - "fileTypes": [], - "name": "JavaDoc", - "patterns": [ - { - "begin": "(/\\*\\*)\\s*$", - "beginCaptures": { - "1": { - "name": "punctuation.definition.comment.begin.javadoc" - } - }, - "contentName": "text.html", - "end": "\\*/", - "endCaptures": { - "0": { - "name": "punctuation.definition.comment.end.javadoc" - } - }, - "name": "comment.block.documentation.javadoc", - "patterns": [ - { - "include": "#inline" - }, - { - "begin": "((\\@)param)", - "beginCaptures": { - "1": { - "name": "keyword.other.documentation.param.javadoc" - }, - "2": { - "name": "punctuation.definition.keyword.javadoc" - } - }, - "end": "(?=^\\s*\\*?\\s*@|\\*/)", - "name": "meta.documentation.tag.param.javadoc", - "patterns": [ - { - "include": "#inline" - } - ] - }, - { - "begin": "((\\@)return)", - "beginCaptures": { - "1": { - "name": "keyword.other.documentation.return.javadoc" - }, - "2": { - "name": "punctuation.definition.keyword.javadoc" - } - }, - "end": "(?=^\\s*\\*?\\s*@|\\*/)", - "name": "meta.documentation.tag.return.javadoc", - "patterns": [ - { - "include": "#inline" - } - ] - }, - { - "begin": "((\\@)throws)", - "beginCaptures": { - "1": { - "name": "keyword.other.documentation.throws.javadoc" - }, - "2": { - "name": "punctuation.definition.keyword.javadoc" - } - }, - "end": "(?=^\\s*\\*?\\s*@|\\*/)", - "name": "meta.documentation.tag.throws.javadoc", - "patterns": [ - { - "include": "#inline" - } - ] - }, - { - "begin": "((\\@)exception)", - "beginCaptures": { - "1": { - "name": "keyword.other.documentation.exception.javadoc" - }, - "2": { - "name": "punctuation.definition.keyword.javadoc" - } - }, - "end": "(?=^\\s*\\*?\\s*@|\\*/)", - "name": "meta.documentation.tag.exception.javadoc", - "patterns": [ - { - "include": "#inline" - } - ] - }, - { - "begin": "((\\@)author)", - "beginCaptures": { - "1": { - "name": "keyword.other.documentation.author.javadoc" - }, - "2": { - "name": "punctuation.definition.keyword.javadoc" - } - }, - "end": "(?=^\\s*\\*?\\s*@|\\*/)", - "name": "meta.documentation.tag.author.javadoc", - "patterns": [ - { - "include": "#inline" - } - ] - }, - { - "begin": "((\\@)version)", - "beginCaptures": { - "1": { - "name": "keyword.other.documentation.version.javadoc" - }, - "2": { - "name": "punctuation.definition.keyword.javadoc" - } - }, - "end": "(?=^\\s*\\*?\\s*@|\\*/)", - "name": "meta.documentation.tag.version.javadoc", - "patterns": [ - { - "include": "#inline" - } - ] - }, - { - "begin": "((\\@)see)", - "beginCaptures": { - "1": { - "name": "keyword.other.documentation.see.javadoc" - }, - "2": { - "name": "punctuation.definition.keyword.javadoc" - } - }, - "end": "(?=^\\s*\\*?\\s*@|\\*/)", - "name": "meta.documentation.tag.see.javadoc", - "patterns": [ - { - "include": "#inline" - } - ] - }, - { - "begin": "((\\@)since)", - "beginCaptures": { - "1": { - "name": "keyword.other.documentation.since.javadoc" - }, - "2": { - "name": "punctuation.definition.keyword.javadoc" - } - }, - "end": "(?=^\\s*\\*?\\s*@|\\*/)", - "name": "meta.documentation.tag.since.javadoc", - "patterns": [ - { - "include": "#inline" - } - ] - }, - { - "begin": "((\\@)serial)", - "beginCaptures": { - "1": { - "name": "keyword.other.documentation.serial.javadoc" - }, - "2": { - "name": "punctuation.definition.keyword.javadoc" - } - }, - "end": "(?=^\\s*\\*?\\s*@|\\*/)", - "name": "meta.documentation.tag.serial.javadoc", - "patterns": [ - { - "include": "#inline" - } - ] - }, - { - "begin": "((\\@)serialField)", - "beginCaptures": { - "1": { - "name": "keyword.other.documentation.serialField.javadoc" - }, - "2": { - "name": "punctuation.definition.keyword.javadoc" - } - }, - "end": "(?=^\\s*\\*?\\s*@|\\*/)", - "name": "meta.documentation.tag.serialField.javadoc", - "patterns": [ - { - "include": "#inline" - } - ] - }, - { - "begin": "((\\@)serialData)", - "beginCaptures": { - "1": { - "name": "keyword.other.documentation.serialData.javadoc" - }, - "2": { - "name": "punctuation.definition.keyword.javadoc" - } - }, - "end": "(?=^\\s*\\*?\\s*@|\\*/)", - "name": "meta.documentation.tag.serialData.javadoc", - "patterns": [ - { - "include": "#inline" - } - ] - }, - { - "begin": "((\\@)deprecated)", - "beginCaptures": { - "1": { - "name": "keyword.other.documentation.deprecated.javadoc" - }, - "2": { - "name": "punctuation.definition.keyword.javadoc" - } - }, - "end": "(?=^\\s*\\*?\\s*@|\\*/)", - "name": "meta.documentation.tag.deprecated.javadoc", - "patterns": [ - { - "include": "#inline" - } - ] - }, - { - "captures": { - "1": { - "name": "keyword.other.documentation.custom.javadoc" - }, - "2": { - "name": "punctuation.definition.keyword.javadoc" - } - }, - "match": "((\\@)\\S+)\\s" - } - ] - } - ], - "repository": { - "inline": { - "patterns": [ - { - "include": "#inline-formatting" - }, - { - "comment": "This prevents < characters in commented source from starting\n\t\t\t\t\t\t\t\ta tag that will not end. List of allowed tags taken from\n\t\t\t\t\t\t\t\tjava checkstyle.", - "match": "<(?!/?(a|abbr|acronym|address|area|b|bdo|big|blockquote|br|caption|cite|code|colgroup|dd|del|div|dfn|dl|dt|em|fieldset|font|h1toh6|hr|i|img|ins|kbd|li|ol|p|pre|q|samp|small|span|strong|sub|sup|table|tbody|td|tfoot|th|thread|tr|tt|u|ul)\\b[^>]*>)" - }, - { - "include": "text.html.basic" - }, - { - "match": "((https?|s?ftp|ftps|file|smb|afp|nfs|(x-)?man|gopher|txmt)://|mailto:)[-:@a-zA-Z0-9_.,~%+/?=&#;]+(?", - "t": "source.java meta.class.java meta.class.body.java comment.block.documentation.javadoc text.html meta.tag.block.any.html punctuation.definition.tag.end.html", - "r": { - "dark_plus": "punctuation.definition.tag: #808080", - "light_plus": "punctuation.definition.tag: #800000", - "dark_vs": "punctuation.definition.tag: #808080", - "light_vs": "punctuation.definition.tag: #800000", - "hc_black": "punctuation.definition.tag: #808080" - } - }, - { - "c": "Note:", - "t": "source.java meta.class.java meta.class.body.java comment.block.documentation.javadoc text.html", + "c": "\t/**", + "t": "source.java meta.class.java meta.class.body.java comment.block.javadoc.java punctuation.definition.comment.java", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -506,41 +451,8 @@ } }, { - "c": "", - "t": "source.java meta.class.java meta.class.body.java comment.block.documentation.javadoc text.html meta.tag.block.any.html punctuation.definition.tag.end.html", - "r": { - "dark_plus": "punctuation.definition.tag: #808080", - "light_plus": "punctuation.definition.tag: #800000", - "dark_vs": "punctuation.definition.tag: #808080", - "light_vs": "punctuation.definition.tag: #800000", - "hc_black": "punctuation.definition.tag: #808080" - } - }, - { - "c": " Hello", - "t": "source.java meta.class.java meta.class.body.java comment.block.documentation.javadoc text.html", + "c": "\t *

Note:

Hello", + "t": "source.java meta.class.java meta.class.body.java comment.block.javadoc.java", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -551,7 +463,7 @@ }, { "c": "\t * ", - "t": "source.java meta.class.java meta.class.body.java comment.block.documentation.javadoc text.html", + "t": "source.java meta.class.java meta.class.body.java comment.block.javadoc.java", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -561,8 +473,8 @@ } }, { - "c": "@", - "t": "source.java meta.class.java meta.class.body.java comment.block.documentation.javadoc text.html meta.documentation.tag.param.javadoc keyword.other.documentation.param.javadoc punctuation.definition.keyword.javadoc", + "c": "@param", + "t": "source.java meta.class.java meta.class.body.java comment.block.javadoc.java keyword.other.documentation.javadoc.java", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -572,30 +484,30 @@ } }, { - "c": "param", - "t": "source.java meta.class.java meta.class.body.java comment.block.documentation.javadoc text.html meta.documentation.tag.param.javadoc keyword.other.documentation.param.javadoc", + "c": " ", + "t": "source.java meta.class.java meta.class.body.java comment.block.javadoc.java", "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" + "dark_plus": "comment: #608B4E", + "light_plus": "comment: #008000", + "dark_vs": "comment: #608B4E", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668" } }, { - "c": " args", - "t": "source.java meta.class.java meta.class.body.java comment.block.documentation.javadoc text.html meta.documentation.tag.param.javadoc", + "c": "args", + "t": "source.java meta.class.java meta.class.body.java comment.block.javadoc.java variable.parameter.java", "r": { - "dark_plus": "comment: #608B4E", - "light_plus": "comment: #008000", + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", "dark_vs": "comment: #608B4E", "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668" + "hc_black": "variable: #9CDCFE" } }, { "c": "\t ", - "t": "source.java meta.class.java meta.class.body.java comment.block.documentation.javadoc text.html meta.documentation.tag.param.javadoc", + "t": "source.java meta.class.java meta.class.body.java comment.block.javadoc.java", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -606,7 +518,7 @@ }, { "c": "*/", - "t": "source.java meta.class.java meta.class.body.java comment.block.documentation.javadoc punctuation.definition.comment.end.javadoc", + "t": "source.java meta.class.java meta.class.body.java comment.block.javadoc.java punctuation.definition.comment.java", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -650,18 +562,18 @@ }, { "c": "void", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.return-type.java storage.type.primitive.array.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.return-type.java storage.type.primitive.java", "r": { - "dark_plus": "storage.type.primitive.array.java: #4EC9B0", - "light_plus": "storage.type.primitive.array.java: #267F99", + "dark_plus": "storage.type.primitive.java: #4EC9B0", + "light_plus": "storage.type.primitive.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.primitive.java: #4EC9B0" } }, { "c": " ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.return-type.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -678,12 +590,12 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { "c": "(", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java punctuation.definition.parameters.begin.bracket.round.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -694,13 +606,13 @@ }, { "c": "int", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java storage.type.primitive.array.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java storage.type.primitive.java", "r": { - "dark_plus": "storage.type.primitive.array.java: #4EC9B0", - "light_plus": "storage.type.primitive.array.java: #267F99", + "dark_plus": "storage.type.primitive.java: #4EC9B0", + "light_plus": "storage.type.primitive.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.primitive.java: #4EC9B0" } }, { @@ -722,12 +634,12 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { "c": ")", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java punctuation.definition.parameters.end.bracket.round.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -749,7 +661,7 @@ }, { "c": "{", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java punctuation.section.method.begin.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java punctuation.section.method.begin.bracket.curly.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -771,18 +683,40 @@ }, { "c": "double", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java storage.type.primitive.array.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java storage.type.primitive.java", "r": { - "dark_plus": "storage.type.primitive.array.java: #4EC9B0", - "light_plus": "storage.type.primitive.array.java: #267F99", + "dark_plus": "storage.type.primitive.java: #4EC9B0", + "light_plus": "storage.type.primitive.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.primitive.java: #4EC9B0" } }, { - "c": " b ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "c": " ", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "b", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java variable.other.definition.java", + "r": { + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE" + } + }, + { + "c": " ", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -793,7 +727,7 @@ }, { "c": "=", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java keyword.operator.assignment.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java keyword.operator.assignment.java", "r": { "dark_plus": "keyword.operator: #D4D4D4", "light_plus": "keyword.operator: #000000", @@ -804,7 +738,7 @@ }, { "c": " ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -815,7 +749,7 @@ }, { "c": "0.0", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java constant.numeric.float.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java constant.numeric.decimal.java", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -848,18 +782,40 @@ }, { "c": "double", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java storage.type.primitive.array.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java storage.type.primitive.java", "r": { - "dark_plus": "storage.type.primitive.array.java: #4EC9B0", - "light_plus": "storage.type.primitive.array.java: #267F99", + "dark_plus": "storage.type.primitive.java: #4EC9B0", + "light_plus": "storage.type.primitive.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.primitive.java: #4EC9B0" } }, { - "c": " c ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "c": " ", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "c", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java variable.other.definition.java", + "r": { + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE" + } + }, + { + "c": " ", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -870,7 +826,7 @@ }, { "c": "=", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java keyword.operator.assignment.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java keyword.operator.assignment.java", "r": { "dark_plus": "keyword.operator: #D4D4D4", "light_plus": "keyword.operator: #000000", @@ -881,7 +837,7 @@ }, { "c": " ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -892,7 +848,7 @@ }, { "c": "10e3", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java constant.numeric.float.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java constant.numeric.decimal.java", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -925,18 +881,40 @@ }, { "c": "long", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java storage.type.primitive.array.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java storage.type.primitive.java", "r": { - "dark_plus": "storage.type.primitive.array.java: #4EC9B0", - "light_plus": "storage.type.primitive.array.java: #267F99", + "dark_plus": "storage.type.primitive.java: #4EC9B0", + "light_plus": "storage.type.primitive.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.primitive.java: #4EC9B0" } }, { - "c": " l ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "c": " ", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "l", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java variable.other.definition.java", + "r": { + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE" + } + }, + { + "c": " ", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -947,7 +925,7 @@ }, { "c": "=", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java keyword.operator.assignment.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java keyword.operator.assignment.java", "r": { "dark_plus": "keyword.operator: #D4D4D4", "light_plus": "keyword.operator: #000000", @@ -958,7 +936,7 @@ }, { "c": " ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -969,7 +947,7 @@ }, { "c": "134l", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java constant.numeric.integer.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java constant.numeric.decimal.java", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -1002,7 +980,7 @@ }, { "c": "}", - "t": "source.java meta.class.java meta.class.body.java meta.method.java punctuation.section.method.end.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java punctuation.section.method.end.bracket.curly.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1085,12 +1063,12 @@ "light_plus": "storage.type.annotation.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.annotation.java: #4EC9B0" } }, { "c": "(", - "t": "source.java meta.class.java meta.class.body.java meta.declaration.annotation.java punctuation.definition.annotation-arguments.begin.java", + "t": "source.java meta.class.java meta.class.body.java meta.declaration.annotation.java punctuation.definition.annotation-arguments.begin.bracket.round.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1178,7 +1156,7 @@ }, { "c": ")", - "t": "source.java meta.class.java meta.class.body.java meta.declaration.annotation.java punctuation.definition.annotation-arguments.end.java", + "t": "source.java meta.class.java meta.class.body.java meta.declaration.annotation.java punctuation.definition.annotation-arguments.end.bracket.round.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1222,18 +1200,18 @@ }, { "c": "long", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.return-type.java storage.type.primitive.array.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.return-type.java storage.type.primitive.java", "r": { - "dark_plus": "storage.type.primitive.array.java: #4EC9B0", - "light_plus": "storage.type.primitive.array.java: #267F99", + "dark_plus": "storage.type.primitive.java: #4EC9B0", + "light_plus": "storage.type.primitive.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.primitive.java: #4EC9B0" } }, { "c": " ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.return-type.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1250,12 +1228,12 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { "c": "(", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java punctuation.definition.parameters.begin.bracket.round.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1266,13 +1244,13 @@ }, { "c": "long", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java storage.type.primitive.array.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java storage.type.primitive.java", "r": { - "dark_plus": "storage.type.primitive.array.java: #4EC9B0", - "light_plus": "storage.type.primitive.array.java: #267F99", + "dark_plus": "storage.type.primitive.java: #4EC9B0", + "light_plus": "storage.type.primitive.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.primitive.java: #4EC9B0" } }, { @@ -1294,12 +1272,12 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { "c": ")", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java punctuation.definition.parameters.end.bracket.round.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1310,7 +1288,7 @@ }, { "c": "{", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java punctuation.section.method.begin.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java punctuation.section.method.begin.bracket.curly.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1338,11 +1316,11 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { - "c": " (", + "c": " ", "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", "r": { "dark_plus": "default: #D4D4D4", @@ -1352,20 +1330,53 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "(", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java punctuation.bracket.round.java", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, { "c": "int", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java storage.type.primitive.array.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java storage.type.primitive.java", "r": { - "dark_plus": "storage.type.primitive.array.java: #4EC9B0", - "light_plus": "storage.type.primitive.array.java: #267F99", + "dark_plus": "storage.type.primitive.java: #4EC9B0", + "light_plus": "storage.type.primitive.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.primitive.java: #4EC9B0" } }, { - "c": " i ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "c": " ", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "i", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java variable.other.definition.java", + "r": { + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE" + } + }, + { + "c": " ", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1376,7 +1387,7 @@ }, { "c": "=", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java keyword.operator.assignment.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java keyword.operator.assignment.java", "r": { "dark_plus": "keyword.operator: #D4D4D4", "light_plus": "keyword.operator: #000000", @@ -1387,7 +1398,7 @@ }, { "c": " ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1398,7 +1409,7 @@ }, { "c": "0", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java constant.numeric.integer.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java constant.numeric.decimal.java", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -1453,7 +1464,7 @@ }, { "c": "9", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java constant.numeric.integer.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java constant.numeric.decimal.java", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -1496,7 +1507,18 @@ } }, { - "c": ") ", + "c": ")", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java punctuation.bracket.round.java", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", "r": { "dark_plus": "default: #D4D4D4", @@ -1508,7 +1530,7 @@ }, { "c": "{", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java punctuation.section.block.begin.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java punctuation.section.block.begin.bracket.curly.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1530,62 +1552,62 @@ }, { "c": "System", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java storage.type.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java variable.other.object.java", "r": { - "dark_plus": "storage.type.java: #4EC9B0", - "light_plus": "storage.type.java: #267F99", - "dark_vs": "storage.type: #569CD6", - "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE" } }, { "c": ".", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java keyword.operator.dereference.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java punctuation.separator.period.java", "r": { - "dark_plus": "keyword.operator: #D4D4D4", - "light_plus": "keyword.operator: #000000", - "dark_vs": "keyword.operator: #D4D4D4", - "light_vs": "keyword.operator: #000000", - "hc_black": "keyword.operator: #D4D4D4" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { "c": "out", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java variable.other.object.property.java", "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { "c": ".", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java keyword.operator.dereference.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.method-call.java punctuation.separator.period.java", "r": { - "dark_plus": "keyword.operator: #D4D4D4", - "light_plus": "keyword.operator: #000000", - "dark_vs": "keyword.operator: #D4D4D4", - "light_vs": "keyword.operator: #000000", - "hc_black": "keyword.operator: #D4D4D4" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { "c": "println", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.method-call.java meta.method.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.method-call.java entity.name.function.java", "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", + "dark_plus": "entity.name.function: #DCDCAA", + "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { "c": "(", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.method-call.java punctuation.definition.method-parameters.begin.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.method-call.java punctuation.definition.parameters.begin.bracket.round.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1662,7 +1684,7 @@ }, { "c": ")", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.method-call.java punctuation.definition.method-parameters.end.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.method-call.java punctuation.definition.parameters.end.bracket.round.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1695,7 +1717,7 @@ }, { "c": "}", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java punctuation.section.block.end.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java punctuation.section.block.end.bracket.curly.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1723,7 +1745,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1739,7 +1761,7 @@ }, { "c": "10", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java constant.numeric.integer.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java constant.numeric.decimal.java", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -1772,7 +1794,7 @@ }, { "c": "}", - "t": "source.java meta.class.java meta.class.body.java meta.method.java punctuation.section.method.end.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java punctuation.section.method.end.bracket.curly.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1833,7 +1855,7 @@ "light_plus": "storage.type.annotation.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.annotation.java: #4EC9B0" } }, { @@ -1871,18 +1893,18 @@ }, { "c": "void", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.return-type.java storage.type.primitive.array.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.return-type.java storage.type.primitive.java", "r": { - "dark_plus": "storage.type.primitive.array.java: #4EC9B0", - "light_plus": "storage.type.primitive.array.java: #267F99", + "dark_plus": "storage.type.primitive.java: #4EC9B0", + "light_plus": "storage.type.primitive.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.primitive.java: #4EC9B0" } }, { "c": " ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.return-type.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1899,12 +1921,23 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", + "hc_black": "entity.name.function: #DCDCAA" + } + }, + { + "c": "(", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java punctuation.definition.parameters.begin.bracket.round.java", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", "hc_black": "default: #FFFFFF" } }, { - "c": "()", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java", + "c": ")", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java punctuation.definition.parameters.end.bracket.round.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1926,7 +1959,7 @@ }, { "c": "{", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java punctuation.section.method.begin.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java punctuation.section.method.begin.bracket.curly.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1948,18 +1981,40 @@ }, { "c": "int", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java storage.type.primitive.array.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java storage.type.primitive.java", "r": { - "dark_plus": "storage.type.primitive.array.java: #4EC9B0", - "light_plus": "storage.type.primitive.array.java: #267F99", + "dark_plus": "storage.type.primitive.java: #4EC9B0", + "light_plus": "storage.type.primitive.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.primitive.java: #4EC9B0" } }, { - "c": " hex ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "c": " ", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "hex", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java variable.other.definition.java", + "r": { + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE" + } + }, + { + "c": " ", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1970,7 +2025,7 @@ }, { "c": "=", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java keyword.operator.assignment.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java keyword.operator.assignment.java", "r": { "dark_plus": "keyword.operator: #D4D4D4", "light_plus": "keyword.operator: #000000", @@ -1981,7 +2036,7 @@ }, { "c": " ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1992,7 +2047,7 @@ }, { "c": "0x5", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java constant.numeric.hex.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java constant.numeric.hex.java", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -2024,41 +2079,74 @@ } }, { - "c": "Vector<", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java storage.type.generic.java", + "c": "Vector", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java storage.type.java", "r": { - "dark_plus": "storage.type.generic.java: #4EC9B0", - "light_plus": "storage.type.generic.java: #267F99", + "dark_plus": "storage.type.java: #4EC9B0", + "light_plus": "storage.type.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.java: #4EC9B0" } }, { - "c": "Number", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java storage.type.generic.java storage.type.java", + "c": "<", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java punctuation.bracket.angle.java", "r": { - "dark_plus": "storage.type.java: #4EC9B0", - "light_plus": "storage.type.java: #267F99", - "dark_vs": "storage.type: #569CD6", - "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { - "c": ">", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java storage.type.generic.java", + "c": "Number", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java storage.type.generic.java", "r": { "dark_plus": "storage.type.generic.java: #4EC9B0", "light_plus": "storage.type.generic.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.generic.java: #4EC9B0" } }, { - "c": " v ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "c": ">", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java punctuation.bracket.angle.java", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "v", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java variable.other.definition.java", + "r": { + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE" + } + }, + { + "c": " ", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -2069,7 +2157,7 @@ }, { "c": "=", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java keyword.operator.assignment.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java keyword.operator.assignment.java", "r": { "dark_plus": "keyword.operator: #D4D4D4", "light_plus": "keyword.operator: #000000", @@ -2080,7 +2168,7 @@ }, { "c": " ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -2091,18 +2179,18 @@ }, { "c": "new", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java keyword.control.new.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java keyword.control.new.java", "r": { "dark_plus": "keyword.control: #C586C0", "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { "c": " ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -2113,18 +2201,29 @@ }, { "c": "Vector", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java storage.type.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java meta.function-call.java entity.name.function.java", "r": { - "dark_plus": "storage.type.java: #4EC9B0", - "light_plus": "storage.type.java: #267F99", - "dark_vs": "storage.type: #569CD6", - "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "dark_plus": "entity.name.function: #DCDCAA", + "light_plus": "entity.name.function: #795E26", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.function: #DCDCAA" } }, { - "c": "()", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "c": "(", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java meta.function-call.java punctuation.definition.parameters.begin.bracket.round.java", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ")", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java meta.function-call.java punctuation.definition.parameters.end.bracket.round.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -2157,7 +2256,7 @@ }, { "c": "}", - "t": "source.java meta.class.java meta.class.body.java meta.method.java punctuation.section.method.end.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java punctuation.section.method.end.bracket.curly.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -2168,7 +2267,7 @@ }, { "c": "}", - "t": "source.java meta.class.java punctuation.section.class.end.java", + "t": "source.java meta.class.java punctuation.section.class.end.bracket.curly.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", diff --git a/extensions/javascript/.vscodeignore b/extensions/javascript/.vscodeignore new file mode 100644 index 0000000000000..e403ee9949404 --- /dev/null +++ b/extensions/javascript/.vscodeignore @@ -0,0 +1,4 @@ +test/** +src/**/*.ts +tsconfig.json +npm-shrinkwrap.json \ No newline at end of file diff --git a/extensions/javascript/package.json b/extensions/javascript/package.json index aeb014688ae9c..b8c76ba64aaf2 100644 --- a/extensions/javascript/package.json +++ b/extensions/javascript/package.json @@ -41,7 +41,8 @@ ], "extensions": [ ".js", - ".es6" + ".es6", + ".mjs" ], "filenames": [ "jakefile" diff --git a/extensions/javascript/syntaxes/JavaScript.tmLanguage.json b/extensions/javascript/syntaxes/JavaScript.tmLanguage.json index bda3bd858cd37..7610157bb85ab 100644 --- a/extensions/javascript/syntaxes/JavaScript.tmLanguage.json +++ b/extensions/javascript/syntaxes/JavaScript.tmLanguage.json @@ -1,9 +1,17 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/Microsoft/TypeScript-TmLanguage/blob/master/TypeScriptReact.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/Microsoft/TypeScript-TmLanguage/commit/9be58bc51f179fd4119dbd5caaa7693a381a13b5", "name": "JavaScript (with React support)", "scopeName": "source.js", "fileTypes": [ ".js", - ".jsx" + ".jsx", + ".es6", + ".mjs" ], "uuid": "805375ec-d614-41f5-8993-5843fe63ea82", "patterns": [ @@ -72,7 +80,7 @@ "name": "storage.type.js" } }, - "end": "(?=$|;|}|(\\s+(of|in)\\s+))", + "end": "(?=$|^|;|}|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#destructuring-variable" @@ -101,7 +109,7 @@ "name": "meta.definition.variable.js entity.name.function.js" } }, - "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" @@ -116,7 +124,7 @@ "name": "meta.definition.variable.js variable.other.constant.js" } }, - "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" @@ -131,7 +139,7 @@ "name": "meta.definition.variable.js variable.other.readwrite.js" } }, - "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" @@ -158,7 +166,7 @@ { "name": "meta.object-binding-pattern-variable.js", "begin": "(?)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n )) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n ))\n)", + "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n )) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n ))\n)", "captures": { "1": { "name": "storage.modifier.js" @@ -1519,15 +1570,18 @@ "name": "keyword.operator.rest.js" }, "3": { - "name": "entity.name.function.js" + "name": "entity.name.function.js variable.language.this.js" }, "4": { + "name": "entity.name.function.js" + }, + "5": { "name": "keyword.operator.optional.js" } } }, { - "match": "(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)", "patterns": [ { - "include": "#comment" + "name": "meta.type.annotation.js", + "begin": "(:)(?=\\s*\\S)", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.annotation.js" + } + }, + "end": "(?])|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))", + "patterns": [ + { + "include": "#type" + } + ] }, { - "include": "#type" + "name": "meta.type.annotation.js", + "begin": "(:)", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.annotation.js" + } + }, + "end": "(?])|(?=^\\s*$)|((?<=\\S)(?=\\s*$))|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))", + "patterns": [ + { + "include": "#type" + } + ] } ] }, @@ -1938,14 +2037,40 @@ ] }, "type-function-return-type": { - "name": "meta.type.function.return.js", - "begin": "=>", - "beginCaptures": { - "0": { - "name": "storage.type.function.arrow.js" + "patterns": [ + { + "name": "meta.type.function.return.js", + "begin": "(=>)(?=\\s*\\S)", + "beginCaptures": { + "1": { + "name": "storage.type.function.arrow.js" + } + }, + "end": "(?)(?]|//|$)", + "patterns": [ + { + "include": "#type-function-return-type-core" + } + ] + }, + { + "name": "meta.type.function.return.js", + "begin": "=>", + "beginCaptures": { + "0": { + "name": "storage.type.function.arrow.js" + } + }, + "end": "(?)(?]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))", + "patterns": [ + { + "include": "#type-function-return-type-core" + } + ] } - }, - "end": "(?)(?]|//|$)", + ] + }, + "type-function-return-type-core": { "patterns": [ { "include": "#comment" @@ -2017,7 +2142,7 @@ "name": "punctuation.definition.typeparameters.begin.js" } }, - "end": "(?=$)|(>)", + "end": "(>)", "endCaptures": { "1": { "name": "punctuation.definition.typeparameters.end.js" @@ -2052,7 +2177,7 @@ "name": "keyword.operator.assignment.js" } }, - "end": "(?=$|[,);}\\]])", + "end": "(?=$|^|[,);}\\]])", "patterns": [ { "include": "#expression" @@ -2066,7 +2191,7 @@ "name": "keyword.operator.assignment.js" } }, - "end": "(?=[,);}\\]])|(?=^\\s*$)", + "end": "(?=[,);}\\]])|(?=^\\s*$)|(?<=\\S)(? is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n ) |\n (\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends \n ) |\n # arrow function possible to detect only with => on same line\n (\n (<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(([^()]|\\([^()]*\\))*\\) # parameteres\n (\\s*:\\s*(.)*)? # return type\n \\s*=> # arrow operator\n )\n )\n)", + "begin": "(?x) (?:\n (? is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n ) |\n (\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends \n ) |\n # arrow function possible to detect only with => on same line\n (\n (<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(([^()]|\\([^()]*\\))*\\) # parameteres\n (\\s*:\\s*(.)*)? # return type\n \\s*=> # arrow operator\n )\n )\n)", "beginCaptures": { "1": { "name": "storage.modifier.async.js" @@ -2806,7 +2935,7 @@ "name": "storage.type.function.arrow.js" } }, - "end": "(?<=\\})|((?!\\{)(?=\\S))", + "end": "(?<=\\}|\\S)(?)|((?!\\{)(?=\\S))", "patterns": [ { "include": "#decl-block" @@ -3356,37 +3485,29 @@ } }, { - "begin": "(^[ \\t]+)?(?=//)", + "begin": "(^[ \\t]+)?(//)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.js" + }, + "2": { + "name": "comment.line.double-slash.js punctuation.definition.comment.js" } }, - "end": "(?=$)", - "patterns": [ - { - "name": "comment.line.double-slash.js", - "begin": "//", - "beginCaptures": { - "0": { - "name": "punctuation.definition.comment.js" - } - }, - "end": "(?=$)" - } - ] + "end": "(?=^)", + "contentName": "comment.line.double-slash.tsx" } ] }, "directives": { "name": "comment.line.triple-slash.directive.js", - "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|name)\\s*=\\s*((\\'[^']*\\')|(\\\"[^\"]*\\\")))+\\s*/>\\s*$)", + "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|name)\\s*=\\s*((\\'.*\\')|(\\\".*\\\")))+\\s*/>\\s*$)", "beginCaptures": { "1": { "name": "punctuation.definition.comment.js" } }, - "end": "(?=$)", + "end": "(?=^)", "patterns": [ { "name": "meta.tag.js", @@ -4006,8 +4127,8 @@ }, "jsx-tag-without-attributes": { "name": "meta.tag.without-attributes.js", - "begin": "(<)\\s*([_$a-zA-Z][-$\\w.]*(?)", - "end": "()", + "begin": "(<)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?)", + "end": "()", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.js" @@ -4016,6 +4137,9 @@ "name": "entity.name.tag.js" }, "3": { + "name": "support.class.component.js" + }, + "4": { "name": "punctuation.definition.tag.end.js" } }, @@ -4027,6 +4151,9 @@ "name": "entity.name.tag.js" }, "3": { + "name": "support.class.component.js" + }, + "4": { "name": "punctuation.definition.tag.end.js" } }, @@ -4039,7 +4166,7 @@ }, "jsx-tag-in-expression": { "begin": "(?x)\n (?<=[({\\[,?=>:*]|&&|\\|\\||\\?|\\Wreturn|^return|\\Wdefault|^)\\s*\n (?!(<)\\s*([_$a-zA-Z][-$\\w.]*(?)) #look ahead is not start of tag without attributes\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?))", - "end": "(/>)|(?:())", + "end": "(/>)|(?:())", "endCaptures": { "0": { "name": "meta.tag.js" @@ -4054,6 +4181,9 @@ "name": "entity.name.tag.js" }, "4": { + "name": "support.class.component.js" + }, + "5": { "name": "punctuation.definition.tag.end.js" } }, @@ -4065,7 +4195,7 @@ }, "jsx-child-tag": { "begin": "(?x)\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?))", - "end": "(/>)|(?:())", + "end": "(/>)|(?:())", "endCaptures": { "0": { "name": "meta.tag.js" @@ -4080,6 +4210,9 @@ "name": "entity.name.tag.js" }, "4": { + "name": "support.class.component.js" + }, + "5": { "name": "punctuation.definition.tag.end.js" } }, @@ -4095,13 +4228,16 @@ "end": "(?=(/>)|(?:()))", "patterns": [ { - "begin": "(?x)\n (<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?)", + "begin": "(?x)\n (<)\\s*\n ((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.js" }, "2": { "name": "entity.name.tag.js" + }, + "3": { + "name": "support.class.component.js" } }, "end": "(?=[/]?>)", @@ -4170,6 +4306,5 @@ } ] } - }, - "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/9f6676aa2ddb75cb5a9dbe1f59024069e839d986" + } } \ No newline at end of file diff --git a/extensions/javascript/test/colorize-results/test6916_js.json b/extensions/javascript/test/colorize-results/test6916_js.json index 92e3ffc82eb74..a3e9cc286fc26 100644 --- a/extensions/javascript/test/colorize-results/test6916_js.json +++ b/extensions/javascript/test/colorize-results/test6916_js.json @@ -7,7 +7,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -51,7 +51,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -95,7 +95,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -139,7 +139,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -183,7 +183,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -227,7 +227,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -249,7 +249,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -271,7 +271,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -293,7 +293,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -337,7 +337,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -359,7 +359,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -381,7 +381,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -425,7 +425,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -447,7 +447,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -469,7 +469,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/javascript/test/colorize-results/test_js.json b/extensions/javascript/test/colorize-results/test_js.json index afcb74133d9c7..4d2acf6739fc0 100644 --- a/extensions/javascript/test/colorize-results/test_js.json +++ b/extensions/javascript/test/colorize-results/test_js.json @@ -95,7 +95,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -139,7 +139,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -238,7 +238,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -282,7 +282,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -381,7 +381,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -425,7 +425,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -524,7 +524,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -568,7 +568,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -667,7 +667,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -711,7 +711,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -810,7 +810,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -854,7 +854,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -876,7 +876,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -898,7 +898,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -942,7 +942,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -953,7 +953,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -1030,7 +1030,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1107,7 +1107,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1140,7 +1140,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1162,7 +1162,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1305,7 +1305,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1327,7 +1327,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1349,7 +1349,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1448,7 +1448,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -1459,7 +1459,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -1569,7 +1569,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1591,7 +1591,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1635,7 +1635,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1657,7 +1657,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1679,7 +1679,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1778,7 +1778,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1800,7 +1800,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1965,7 +1965,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2009,7 +2009,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2031,7 +2031,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2130,7 +2130,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -2141,7 +2141,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -2251,7 +2251,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2273,7 +2273,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2372,7 +2372,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -2383,7 +2383,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -2493,7 +2493,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2515,7 +2515,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2537,7 +2537,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2559,7 +2559,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2592,7 +2592,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2636,7 +2636,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2658,7 +2658,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2680,7 +2680,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2779,7 +2779,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2801,7 +2801,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2977,7 +2977,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2999,7 +2999,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3054,7 +3054,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3076,7 +3076,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -3142,7 +3142,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3219,7 +3219,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -3274,7 +3274,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3351,7 +3351,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3395,7 +3395,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3417,7 +3417,7 @@ "light_plus": "support.variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.variable: #9CDCFE" } }, { @@ -3450,7 +3450,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3494,7 +3494,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3527,7 +3527,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3593,7 +3593,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3615,7 +3615,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3670,7 +3670,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -3692,7 +3692,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3714,7 +3714,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3791,7 +3791,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -3813,7 +3813,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/javascript/test/colorize-results/test_jsx.json b/extensions/javascript/test/colorize-results/test_jsx.json index eaf452df0d2f5..55e2c440d3bee 100644 --- a/extensions/javascript/test/colorize-results/test_jsx.json +++ b/extensions/javascript/test/colorize-results/test_jsx.json @@ -29,7 +29,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -73,7 +73,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -95,7 +95,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -139,7 +139,7 @@ "light_plus": "meta.object-literal.key entity.name.function: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key entity.name.function: #9CDCFE" } }, { @@ -150,7 +150,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -249,7 +249,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -293,7 +293,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -304,7 +304,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -403,7 +403,7 @@ "light_plus": "meta.object-literal.key entity.name.function: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key entity.name.function: #9CDCFE" } }, { @@ -414,7 +414,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -469,7 +469,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -529,7 +529,7 @@ }, { "c": " Prevent following the link.", - "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.js", + "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.tsx", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -557,7 +557,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -579,7 +579,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -628,7 +628,7 @@ }, { "c": " Invert the chosen default.", - "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.js", + "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.tsx", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -661,7 +661,7 @@ }, { "c": " This will trigger an intelligent re-render of the component.", - "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.js", + "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.tsx", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -711,7 +711,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -755,7 +755,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -766,7 +766,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -821,7 +821,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -843,7 +843,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -931,7 +931,7 @@ "light_plus": "meta.object-literal.key entity.name.function: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key entity.name.function: #9CDCFE" } }, { @@ -942,7 +942,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -1046,7 +1046,7 @@ }, { "c": " Default to the default message.", - "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.js", + "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.tsx", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -1096,7 +1096,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1162,7 +1162,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1184,7 +1184,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1222,7 +1222,7 @@ }, { "c": " If toggled, show the alternate message.", - "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.js", + "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.tsx", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -1250,7 +1250,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1316,7 +1316,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1338,7 +1338,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1393,7 +1393,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1459,7 +1459,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1481,7 +1481,7 @@ "light_plus": "support.variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.variable: #9CDCFE" } }, { @@ -1536,7 +1536,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1679,7 +1679,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1899,7 +1899,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2108,7 +2108,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2130,7 +2130,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2157,13 +2157,13 @@ }, { "c": "ToggleText", - "t": "source.js meta.tag.js entity.name.tag.js", + "t": "source.js meta.tag.js entity.name.tag.js support.class.component.js", "r": { - "dark_plus": "entity.name.tag: #569CD6", - "light_plus": "entity.name.tag: #800000", + "dark_plus": "support.class: #4EC9B0", + "light_plus": "support.class: #267F99", "dark_vs": "entity.name.tag: #569CD6", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "support.class: #4EC9B0" } }, { @@ -2350,7 +2350,7 @@ "light_plus": "support.variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.variable: #9CDCFE" } }, { @@ -2372,7 +2372,7 @@ "light_plus": "support.variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.variable: #9CDCFE" } }, { diff --git a/extensions/javascript/tsconfig.json b/extensions/javascript/tsconfig.json index 551261ed46daf..4445bb27fd755 100644 --- a/extensions/javascript/tsconfig.json +++ b/extensions/javascript/tsconfig.json @@ -7,7 +7,7 @@ "es2015" ] }, - "exclude": [ - "node_modules" + "include": [ + "src/**/*" ] } \ No newline at end of file diff --git a/extensions/json/.vscodeignore b/extensions/json/.vscodeignore new file mode 100644 index 0000000000000..7785bab61c18e --- /dev/null +++ b/extensions/json/.vscodeignore @@ -0,0 +1,7 @@ +test/** +client/tsconfig.json +client/src/** +server/tsconfig.json +server/src/** +server/node_modules/@types/** +npm-shrinkwrap.json \ No newline at end of file diff --git a/extensions/json/client/src/colorDecorators.ts b/extensions/json/client/src/colorDecorators.ts index 6fecd50facbac..f1caaea3ee1ed 100644 --- a/extensions/json/client/src/colorDecorators.ts +++ b/extensions/json/client/src/colorDecorators.ts @@ -134,7 +134,6 @@ export function activateColorDecorations(decoratorProvider: (uri: string) => The const colorPattern = /^#[0-9A-Fa-f]{3,8}$/; function hex2CSSColor(hex: string): string { - console.log(hex); if (!hex || !colorPattern.test(hex)) { return null; } diff --git a/extensions/json/client/src/jsonMain.ts b/extensions/json/client/src/jsonMain.ts index 962b6d893481b..6180cdfc5c991 100644 --- a/extensions/json/client/src/jsonMain.ts +++ b/extensions/json/client/src/jsonMain.ts @@ -102,7 +102,11 @@ export function activate(context: ExtensionContext) { context.subscriptions.push(disposable); languages.setLanguageConfiguration('json', { - wordPattern: /("(?:[^\\\"]*(?:\\.)?)*"?)|[^\s{}\[\],:]+/ + wordPattern: /("(?:[^\\\"]*(?:\\.)?)*"?)|[^\s{}\[\],:]+/, + indentationRules: { + increaseIndentPattern: /^.*(\{[^}]*|\[[^\]]*)$/, + decreaseIndentPattern: /^\s*[}\]],?\s*$/ + } }); } diff --git a/extensions/json/npm-shrinkwrap.json b/extensions/json/npm-shrinkwrap.json index e9b9bf0a74754..57a72e038e6b7 100644 --- a/extensions/json/npm-shrinkwrap.json +++ b/extensions/json/npm-shrinkwrap.json @@ -8,9 +8,9 @@ "resolved": "https://registry.npmjs.org/applicationinsights/-/applicationinsights-0.18.0.tgz" }, "vscode-extension-telemetry": { - "version": "0.0.6", - "from": "vscode-extension-telemetry@>=0.0.6 <0.0.7", - "resolved": "https://registry.npmjs.org/vscode-extension-telemetry/-/vscode-extension-telemetry-0.0.6.tgz" + "version": "0.0.7", + "from": "vscode-extension-telemetry@>=0.0.8 <0.0.9", + "resolved": "https://registry.npmjs.org/vscode-extension-telemetry/-/vscode-extension-telemetry-0.0.8.tgz" }, "vscode-jsonrpc": { "version": "3.1.0-alpha.1", @@ -38,4 +38,4 @@ "resolved": "https://registry.npmjs.org/winreg/-/winreg-1.2.3.tgz" } } -} +} \ No newline at end of file diff --git a/extensions/json/package.json b/extensions/json/package.json index 2e7f998417237..92fd2f2645c9d 100644 --- a/extensions/json/package.json +++ b/extensions/json/package.json @@ -117,16 +117,18 @@ }, "configurationDefaults": { "[json]": { - "editor.quickSuggestions": { "strings": true } + "editor.quickSuggestions": { + "strings": true + } } } }, "dependencies": { - "vscode-extension-telemetry": "^0.0.7", - "vscode-languageclient": "^3.1.0-alpha.1", - "vscode-nls": "^2.0.2" + "vscode-extension-telemetry": "0.0.8", + "vscode-languageclient": "3.1.0-alpha.1", + "vscode-nls": "2.0.2" }, "devDependencies": { "@types/node": "^6.0.51" } -} +} \ No newline at end of file diff --git a/extensions/json/server/npm-shrinkwrap.json b/extensions/json/server/npm-shrinkwrap.json index 4571e4d6bcc65..159acef96328c 100644 --- a/extensions/json/server/npm-shrinkwrap.json +++ b/extensions/json/server/npm-shrinkwrap.json @@ -8,14 +8,14 @@ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-1.0.2.tgz" }, "debug": { - "version": "2.6.0", + "version": "2.6.6", "from": "debug@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.0.tgz" + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.6.tgz" }, "extend": { - "version": "3.0.0", + "version": "3.0.1", "from": "extend@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz" + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz" }, "http-proxy-agent": { "version": "0.2.7", @@ -28,24 +28,24 @@ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-0.3.6.tgz" }, "jsonc-parser": { - "version": "0.4.1", - "from": "jsonc-parser@0.4.1", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-0.4.1.tgz" + "version": "0.4.2", + "from": "jsonc-parser@0.4.2", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-0.4.2.tgz" }, "ms": { - "version": "0.7.2", - "from": "ms@0.7.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz" + "version": "0.7.3", + "from": "ms@0.7.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.3.tgz" }, "request-light": { - "version": "0.2.0", - "from": "request-light@0.2.0", - "resolved": "https://registry.npmjs.org/request-light/-/request-light-0.2.0.tgz" + "version": "0.2.1", + "from": "request-light@0.2.1", + "resolved": "https://registry.npmjs.org/request-light/-/request-light-0.2.1.tgz" }, "vscode-json-languageservice": { - "version": "2.0.8", + "version": "2.0.12", "from": "vscode-json-languageservice@next", - "resolved": "https://registry.npmjs.org/vscode-json-languageservice/-/vscode-json-languageservice-2.0.8.tgz" + "resolved": "https://registry.npmjs.org/vscode-json-languageservice/-/vscode-json-languageservice-2.0.12.tgz" }, "vscode-jsonrpc": { "version": "3.1.0-alpha.1", @@ -68,9 +68,9 @@ "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-2.0.2.tgz" }, "vscode-uri": { - "version": "1.0.0", + "version": "1.0.1", "from": "vscode-uri@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-1.0.1.tgz" } } } diff --git a/extensions/json/server/package.json b/extensions/json/server/package.json index 4b0a98a80a2a5..54c72cc4759e8 100644 --- a/extensions/json/server/package.json +++ b/extensions/json/server/package.json @@ -8,9 +8,9 @@ "node": "*" }, "dependencies": { - "jsonc-parser": "^0.4.1", - "request-light": "^0.2.0", - "vscode-json-languageservice": "^2.0.8", + "jsonc-parser": "^0.4.2", + "request-light": "^0.2.1", + "vscode-json-languageservice": "^2.0.12", "vscode-languageserver": "^3.1.0-alpha.1", "vscode-nls": "^2.0.2" }, diff --git a/extensions/json/server/src/jsonServerMain.ts b/extensions/json/server/src/jsonServerMain.ts index 09a0dc199a74a..f81721cde4af9 100644 --- a/extensions/json/server/src/jsonServerMain.ts +++ b/extensions/json/server/src/jsonServerMain.ts @@ -111,7 +111,8 @@ let schemaRequestService = (uri: string): Thenable => { } }); } - return xhr({ url: uri, followRedirects: 5 }).then(response => { + let headers = { 'Accept-Encoding': 'gzip, deflate' }; + return xhr({ url: uri, followRedirects: 5, headers }).then(response => { return response.responseText; }, (error: XHRResponse) => { return Promise.reject(error.responseText || getErrorStatusDescription(error.status) || error.toString()); diff --git a/extensions/json/server/tsconfig.json b/extensions/json/server/tsconfig.json index c2a86a0af350a..deecf69b8b4f1 100644 --- a/extensions/json/server/tsconfig.json +++ b/extensions/json/server/tsconfig.json @@ -9,7 +9,7 @@ "es5", "es2015.promise" ] }, - "exclude": [ - "node_modules" + "include": [ + "src/**/*" ] } \ No newline at end of file diff --git a/extensions/json/syntaxes/JSON.tmLanguage b/extensions/json/syntaxes/JSON.tmLanguage index 9d6a24cc16a59..507eb03ec93f2 100644 --- a/extensions/json/syntaxes/JSON.tmLanguage +++ b/extensions/json/syntaxes/JSON.tmLanguage @@ -98,7 +98,7 @@ begin - /\*\* + /\*\*(?!/) captures 0 diff --git a/extensions/less/.vscodeignore b/extensions/less/.vscodeignore new file mode 100644 index 0000000000000..77ab386fc7df4 --- /dev/null +++ b/extensions/less/.vscodeignore @@ -0,0 +1 @@ +test/** \ No newline at end of file diff --git a/extensions/less/syntaxes/less.tmLanguage.json b/extensions/less/syntaxes/less.tmLanguage.json index f9605e2f845e9..cd1543fd7d3eb 100644 --- a/extensions/less/syntaxes/less.tmLanguage.json +++ b/extensions/less/syntaxes/less.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-less/blob/master/grammars/less.cson", + "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." + ], "name": "Less", "scopeName": "source.css.less", "fileTypes": [ @@ -146,12 +151,7 @@ "name": "comment.block.css" }, { - "match": "[+-]?\\d*\\.?\\d+", - "name": "constant.numeric.css" - }, - { - "match": "(?<=[\\d])(ch|cm|deg|dpi|dpcm|dppx|em|ex|grad|in|mm|ms|pc|pt|px|rad|rem|turn|s|vh|vmin|vw)\\b|%", - "name": "keyword.other.unit.css" + "include": "source.css#numeric-values" }, { "captures": { @@ -209,7 +209,7 @@ "include": "#brace_round" }, { - "include": "#commas" + "include": "source.css#commas" }, { "include": "#strings" @@ -241,8 +241,7 @@ "name": "meta.at-rule.media.css" }, { - "match": "\\b(width|scan|resolution|orientation|monochrome|min-width|min-resolution|min-monochrome|min-height|min-device-width|min-device-height|min-device-aspect-ratio|min-color-index|min-color|min-aspect-ratio|max-width|max-resolution|max-monochrome|max-height|max-device-width|max-device-height|max-device-aspect-ratio|max-color-index|max-color|max-aspect-ratio|height|grid|device-width|device-height|device-aspect-ratio|color-index|color|aspect-ratio)\\b", - "name": "support.type.property-name.media-feature.media.css" + "include": "source.css#media-features" }, { "match": "\\b(tv|tty|screen|projection|print|handheld|embossed|braille|aural|all)\\b", @@ -282,13 +281,13 @@ ] }, { + "match": "(@|\\-\\-)[\\w-]+(?=\\s*)", + "name": "variable.other.less", "captures": { "1": { "name": "punctuation.definition.variable.less" } - }, - "match": "(?:@|\\-\\-)[a-zA-Z0-9_-][\\w-]*(?=\\s*)", - "name": "variable.other.less" + } }, { "include": "#variable_interpolation" @@ -309,19 +308,22 @@ "name": "meta.property-list.css", "patterns": [ { - "include": "#pseudo_elements" + "include": "source.css#pseudo-elements" }, { - "include": "#pseudo_classes" + "include": "source.css#pseudo-classes" }, { - "include": "#variable_interpolation" + "include": "source.css#tag-names" + }, + { + "include": "source.css#commas" }, { - "include": "#property_names" + "include": "#variable_interpolation" }, { - "include": "#property_names_svg" + "include": "source.css#property-names" }, { "include": "#property_values" @@ -344,22 +346,17 @@ "name": "keyword.control.logical.operator.less" }, { - "match": "(?x)\n(?", + "notIn": [ + "string" + ] + } + ], + "surroundingPairs": [ + ["(", ")"], + ["[", "]"], + ["`", "`"] ] -} +} \ No newline at end of file diff --git a/extensions/markdown/media/loading.js b/extensions/markdown/media/loading.js new file mode 100644 index 0000000000000..7889d432ef78c --- /dev/null +++ b/extensions/markdown/media/loading.js @@ -0,0 +1,36 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// @ts-check + +'use strict'; + + +(function () { + const unloadedStyles = []; + + const onStyleLoadError = (event) => { + const source = event.target.dataset.source; + unloadedStyles.push(source); + }; + + window.addEventListener('DOMContentLoaded', () => { + for (const link of document.getElementsByClassName('code-user-style')) { + if (link.dataset.source) { + link.onerror = onStyleLoadError; + } + } + }) + + window.addEventListener('load', () => { + if (!unloadedStyles.length) { + return; + } + const args = [unloadedStyles]; + window.parent.postMessage({ + command: 'did-click-link', + data: `command:_markdown.onPreviewStyleLoadError?${encodeURIComponent(JSON.stringify(args))}` + }, 'file://'); + }); +}()); \ No newline at end of file diff --git a/extensions/markdown/media/main.js b/extensions/markdown/media/main.js index 1718be3f453af..1b7ac343e0943 100644 --- a/extensions/markdown/media/main.js +++ b/extensions/markdown/media/main.js @@ -145,7 +145,7 @@ var marker = new ActiveLineMarker(); const settings = JSON.parse(document.getElementById('vscode-markdown-preview-data').getAttribute('data-settings')); - window.addEventListener('load', () => { + function onLoad() { if (settings.scrollPreviewWithEditorSelection) { const initialLine = +settings.line; if (!isNaN(initialLine)) { @@ -155,7 +155,14 @@ }, 0); } } - }); + } + + if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', onLoad); + } else { + onLoad(); + } + window.addEventListener('resize', () => { scrollDisabled = true; diff --git a/extensions/markdown/npm-shrinkwrap.json b/extensions/markdown/npm-shrinkwrap.json index de14b48e12d84..f8ae61f746516 100644 --- a/extensions/markdown/npm-shrinkwrap.json +++ b/extensions/markdown/npm-shrinkwrap.json @@ -58,13 +58,13 @@ "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.3.tgz" }, "vscode-extension-telemetry": { - "version": "0.0.6", - "from": "vscode-extension-telemetry@>=0.0.6 <0.0.7", - "resolved": "https://registry.npmjs.org/vscode-extension-telemetry/-/vscode-extension-telemetry-0.0.6.tgz" + "version": "0.0.7", + "from": "vscode-extension-telemetry@>=0.0.8 <0.0.9", + "resolved": "https://registry.npmjs.org/vscode-extension-telemetry/-/vscode-extension-telemetry-0.0.8.tgz" }, "vscode-nls": { "version": "2.0.2", - "from": "vscode-nls@latest", + "from": "vscode-nls@>=2.0.1 <3.0.0", "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-2.0.2.tgz" }, "winreg": { @@ -73,4 +73,4 @@ "resolved": "https://registry.npmjs.org/winreg/-/winreg-1.2.3.tgz" } } -} +} \ No newline at end of file diff --git a/extensions/markdown/package.json b/extensions/markdown/package.json index c0917c8bcba54..33d53cc5a01c4 100644 --- a/extensions/markdown/package.json +++ b/extensions/markdown/package.json @@ -16,7 +16,8 @@ "onLanguage:markdown", "onCommand:markdown.showPreview", "onCommand:markdown.showPreviewToSide", - "onCommand:markdown.showSource" + "onCommand:markdown.showSource", + "onCommand:markdown.showPreviewSecuritySelector" ], "contributes": { "languages": [ @@ -79,25 +80,42 @@ "menus": { "editor/title": [ { - "when": "editorLangId == markdown", "command": "markdown.showPreviewToSide", + "when": "editorLangId == markdown", "alt": "markdown.showPreview", "group": "navigation" }, { - "when": "resourceScheme == markdown", "command": "markdown.showSource", + "when": "resourceScheme == markdown", "group": "navigation" }, { - "when": "resourceScheme == markdown", - "command": "markdown.showPreviewSecuritySelector" + "command": "markdown.showPreviewSecuritySelector", + "when": "resourceScheme == markdown" } ], "explorer/context": [ { + "command": "markdown.showPreview", "when": "resourceLangId == markdown", + "group": "navigation" + } + ], + "commandPalette": [ + { "command": "markdown.showPreview", + "when": "editorLangId == markdown", + "group": "navigation" + }, + { + "command": "markdown.showPreviewToSide", + "when": "editorLangId == markdown", + "group": "navigation" + }, + { + "command": "markdown.showSource", + "when": "resourceScheme == markdown", "group": "navigation" } ] @@ -107,13 +125,13 @@ "command": "markdown.showPreview", "key": "shift+ctrl+v", "mac": "shift+cmd+v", - "when": "editorFocus" + "when": "editorLangId == markdown" }, { "command": "markdown.showPreviewToSide", "key": "ctrl+k v", "mac": "cmd+k v", - "when": "editorFocus" + "when": "editorLangId == markdown" } ], "snippets": [ @@ -141,6 +159,11 @@ "default": "hide", "description": "%markdown.previewFrontMatter.dec%" }, + "markdown.preview.breaks": { + "type": "boolean", + "default": false, + "description": "%markdown.preview.breaks.desc%" + }, "markdown.preview.fontFamily": { "type": "string", "default": "-apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', 'HelveticaNeue-Light', 'Ubuntu', 'Droid Sans', sans-serif", @@ -204,11 +227,11 @@ "update-grammar": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ./syntaxes/gulpfile.js" }, "dependencies": { - "highlight.js": "^9.3.0", - "markdown-it": "^8.3.1", + "highlight.js": "9.5.0", + "markdown-it": "8.2.2", "markdown-it-named-headers": "0.0.4", - "vscode-extension-telemetry": "^0.0.7", - "vscode-nls": "^2.0.2" + "vscode-extension-telemetry": "0.0.8", + "vscode-nls": "2.0.2" }, "devDependencies": { "@types/node": "^7.0.4", diff --git a/extensions/markdown/package.nls.json b/extensions/markdown/package.nls.json index b58fe4c5e401a..11e191a773206 100644 --- a/extensions/markdown/package.nls.json +++ b/extensions/markdown/package.nls.json @@ -1,4 +1,5 @@ { + "markdown.preview.breaks.desc": "Sets how line-breaks are rendered in the markdown preview. Setting it to 'true' creates a
for every newline.", "markdown.preview.doubleClickToSwitchToEditor.desc": "Double click in the markdown preview to switch to the editor.", "markdown.preview.fontFamily.desc": "Controls the font family used in the markdown preview.", "markdown.preview.fontSize.desc": "Controls the font size in pixels used in the markdown preview.", diff --git a/extensions/markdown/src/documentLinkProvider.ts b/extensions/markdown/src/documentLinkProvider.ts index 2b2bde5d53594..4cf4055c940e7 100644 --- a/extensions/markdown/src/documentLinkProvider.ts +++ b/extensions/markdown/src/documentLinkProvider.ts @@ -10,7 +10,7 @@ import * as path from 'path'; export default class MarkdownDocumentLinkProvider implements vscode.DocumentLinkProvider { - private _linkPattern = /(\[[^\]]*\]\(\s*?)([^\s\)]+?)(\s+[^\)]+)?\)/g; + private _linkPattern = /(\[[^\]]*\]\(\s*?)(((((?=.*\)\)+)|(?=.*\)\]+))[^\s\)]+?)|([^\s]+)))\)/g; constructor() { } diff --git a/extensions/markdown/src/documentSymbolProvider.ts b/extensions/markdown/src/documentSymbolProvider.ts index e35e690d624fd..dec8161964831 100644 --- a/extensions/markdown/src/documentSymbolProvider.ts +++ b/extensions/markdown/src/documentSymbolProvider.ts @@ -19,7 +19,7 @@ export default class MDDocumentSymbolProvider implements vscode.DocumentSymbolPr provideDocumentSymbols(document: vscode.TextDocument): vscode.ProviderResult { const toc = new TableOfContentsProvider(this.engine, document); return toc.getToc().map(entry => { - return new vscode.SymbolInformation(entry.text, vscode.SymbolKind.Module, '', entry.location); + return new vscode.SymbolInformation(entry.text, vscode.SymbolKind.Namespace, '', entry.location); }); } } \ No newline at end of file diff --git a/extensions/markdown/src/extension.ts b/extensions/markdown/src/extension.ts index e454e22879bb8..01f348951488c 100644 --- a/extensions/markdown/src/extension.ts +++ b/extensions/markdown/src/extension.ts @@ -5,6 +5,8 @@ 'use strict'; +import * as nls from 'vscode-nls'; +const localize = nls.config(process.env.VSCODE_NLS_CONFIG)(); import * as vscode from 'vscode'; import * as path from 'path'; import TelemetryReporter from 'vscode-extension-telemetry'; @@ -59,7 +61,7 @@ export function activate(context: vscode.ExtensionContext) { continue; } - let styles = contributes['markdown.preview'] && contributes['markdown.preview'].styles; + let styles = contributes['markdown.previewStyles']; if (styles) { if (!Array.isArray(styles)) { styles = [styles]; @@ -73,7 +75,7 @@ export function activate(context: vscode.ExtensionContext) { } } - let scripts = contributes['markdown.preview'] && contributes['markdown.preview'].scripts; + let scripts = contributes['markdown.previewScripts']; if (scripts) { if (!Array.isArray(scripts)) { scripts = [scripts]; @@ -166,6 +168,10 @@ export function activate(context: vscode.ExtensionContext) { previewSecuritySelector.showSecutitySelectorForWorkspace(resource ? vscode.Uri.parse(resource).query : undefined); })); + context.subscriptions.push(vscode.commands.registerCommand('_markdown.onPreviewStyleLoadError', (resources: string[]) => { + vscode.window.showWarningMessage(localize('onPreviewStyleLoadError', "Could not load 'markdown.styles': {0}", resources.join(', '))); + })); + context.subscriptions.push(vscode.workspace.onDidSaveTextDocument(document => { if (isMarkdownFile(document)) { const uri = getMarkdownUri(document.uri); @@ -221,7 +227,8 @@ function showPreview(uri?: vscode.Uri, sideBySide: boolean = false) { const thenable = vscode.commands.executeCommand('vscode.previewHtml', getMarkdownUri(resource), getViewColumn(sideBySide), - `Preview '${path.basename(resource.fsPath)}'`); + `Preview '${path.basename(resource.fsPath)}'`, + { allowScripts: true, allowSvgs: true }); if (telemetryReporter) { telemetryReporter.sendTelemetryEvent('openPreview', { diff --git a/extensions/markdown/src/markdownEngine.ts b/extensions/markdown/src/markdownEngine.ts index aad5d484645b7..c13130b98b911 100644 --- a/extensions/markdown/src/markdownEngine.ts +++ b/extensions/markdown/src/markdownEngine.ts @@ -20,6 +20,8 @@ interface MarkdownIt { parse(text: string, env: any): IToken[]; utils: any; + + set(options: any): MarkdownIt; } const FrontMatterRegex = /^---\s*[^]*?(-{3}|\.{3})\s*/; @@ -79,6 +81,7 @@ export class MarkdownEngine { this.addLinkNormalizer(this.md); this.addLinkValidator(this.md); } + this.md.set({ breaks: vscode.workspace.getConfiguration('markdown').get('preview.breaks', false) }); return this.md; } diff --git a/extensions/markdown/src/previewContentProvider.ts b/extensions/markdown/src/previewContentProvider.ts index 7e98548f2121c..346232bbc5187 100644 --- a/extensions/markdown/src/previewContentProvider.ts +++ b/extensions/markdown/src/previewContentProvider.ts @@ -39,7 +39,7 @@ export function getMarkdownUri(uri: vscode.Uri) { return uri.with({ scheme: 'markdown', - path: uri.fsPath + '.rendered', + path: uri.path + '.rendered', query: uri.toString() }); } @@ -52,6 +52,7 @@ class MarkdownPreviewConfig { public readonly scrollBeyondLastLine: boolean; public readonly wordWrap: boolean; public readonly previewFrontMatter: string; + public readonly lineBreaks: boolean; public readonly doubleClickToSwitchToEditor: boolean; public readonly scrollEditorWithPreview: boolean; public readonly scrollPreviewWithEditorSelection: boolean; @@ -65,18 +66,25 @@ class MarkdownPreviewConfig { private constructor() { const editorConfig = vscode.workspace.getConfiguration('editor'); const markdownConfig = vscode.workspace.getConfiguration('markdown'); + const markdownEditorConfig = vscode.workspace.getConfiguration('[markdown]'); this.scrollBeyondLastLine = editorConfig.get('scrollBeyondLastLine', false); + this.wordWrap = editorConfig.get('wordWrap', 'off') !== 'off'; + if (markdownEditorConfig && markdownEditorConfig['editor.wordWrap']) { + this.wordWrap = markdownEditorConfig['editor.wordWrap'] !== 'off'; + } this.previewFrontMatter = markdownConfig.get('previewFrontMatter', 'hide'); this.scrollPreviewWithEditorSelection = !!markdownConfig.get('preview.scrollPreviewWithEditorSelection', true); this.scrollEditorWithPreview = !!markdownConfig.get('preview.scrollEditorWithPreview', true); + this.lineBreaks = !!markdownConfig.get('preview.breaks', false); this.doubleClickToSwitchToEditor = !!markdownConfig.get('preview.doubleClickToSwitchToEditor', true); + this.markEditorSelection = !!markdownConfig.get('preview.markEditorSelection', true); this.fontFamily = markdownConfig.get('preview.fontFamily', undefined); - this.fontSize = +markdownConfig.get('preview.fontSize', NaN); - this.lineHeight = +markdownConfig.get('preview.lineHeight', NaN); + this.fontSize = Math.max(8, +markdownConfig.get('preview.fontSize', NaN)); + this.lineHeight = Math.max(0.6, +markdownConfig.get('preview.lineHeight', NaN)); this.styles = markdownConfig.get('styles', []); } @@ -165,7 +173,7 @@ export class MDDocumentContentProvider implements vscode.TextDocumentContentProv private computeCustomStyleSheetIncludes(uri: vscode.Uri): string { if (this.config.styles && Array.isArray(this.config.styles)) { return this.config.styles.map((style) => { - return ``; + return ``; }).join('\n'); } return ''; @@ -175,8 +183,8 @@ export class MDDocumentContentProvider implements vscode.TextDocumentContentProv return ``; } @@ -195,22 +203,22 @@ export class MDDocumentContentProvider implements vscode.TextDocumentContentProv private getScripts(nonce: string): string { const scripts = [this.getMediaPath('main.js')].concat(this.extraScripts.map(resource => resource.toString())); return scripts - .map(source => ``) + .map(source => ``) .join('\n'); } public provideTextDocumentContent(uri: vscode.Uri): Thenable { const sourceUri = vscode.Uri.parse(uri.query); + let initialLine: number | undefined = undefined; + const editor = vscode.window.activeTextEditor; + if (editor && editor.document.uri.fsPath === sourceUri.fsPath) { + initialLine = editor.selection.active.line; + } + return vscode.workspace.openTextDocument(sourceUri).then(document => { this.config = MarkdownPreviewConfig.getCurrentConfig(); - let initialLine = 0; - const editor = vscode.window.activeTextEditor; - if (editor && editor.document.uri.fsPath === sourceUri.fsPath) { - initialLine = editor.selection.active.line; - } - const initialData = { previewUri: uri.toString(), source: sourceUri.toString(), @@ -237,6 +245,7 @@ export class MDDocumentContentProvider implements vscode.TextDocumentContentProv ${csp} + ${this.getStyles(uri, nonce)} diff --git a/extensions/markdown/src/tableOfContentsProvider.ts b/extensions/markdown/src/tableOfContentsProvider.ts index 7a08e6b4348ea..983b9113ffa58 100644 --- a/extensions/markdown/src/tableOfContentsProvider.ts +++ b/extensions/markdown/src/tableOfContentsProvider.ts @@ -66,7 +66,7 @@ export class TableOfContentsProvider { } private static getHeaderText(header: string): string { - return header.replace(/^\s*(#)+\s*(.*?)\s*\1*$/, '$2').trim(); + return header.replace(/^\s*(#+)\s*(.*?)\s*\1*$/, (_, level, word) => `${level} ${word.trim()}`); } public static slugify(header: string): string { diff --git a/extensions/markdown/syntaxes/gulpfile.js b/extensions/markdown/syntaxes/gulpfile.js index f57cb80fb9d77..15545e82502a0 100644 --- a/extensions/markdown/syntaxes/gulpfile.js +++ b/extensions/markdown/syntaxes/gulpfile.js @@ -32,13 +32,15 @@ const languages = [ { name: 'git_rebase', identifiers: ['git-rebase-todo'], source: 'text.git-rebase' }, { name: 'go', identifiers: ['go', 'golang'], source: 'source.go' }, { name: 'groovy', identifiers: ['groovy', 'gvy'], source: 'source.groovy' }, - { name: 'jade', identifiers: ['jade'], source: 'text.jade' }, + { name: 'jade', identifiers: ['jade', 'pug'], source: 'text.jade' }, - { name: 'js', identifiers: ['js', 'jsx', 'javascript'], source: 'source.js' }, + { name: 'js', identifiers: ['js', 'jsx', 'javascript', 'es6', 'mjs'], source: 'source.js' }, { name: 'js_regexp', identifiers: ['regexp'], source: 'source.js.regexp' }, { name: 'json', identifiers: ['json', 'sublime-settings', 'sublime-menu', 'sublime-keymap', 'sublime-mousemap', 'sublime-theme', 'sublime-build', 'sublime-project', 'sublime-completions'], source: 'source.json' }, { name: 'less', identifiers: ['less'], source: 'source.css.less' }, { name: 'objc', identifiers: ['objectivec', 'objective-c', 'mm', 'objc', 'obj-c', 'm', 'h'], source: 'source.objc' }, + { name: 'scss', identifiers: ['scss'], source: 'source.css.scss' }, + { name: 'perl6', identifiers: ['perl6', 'p6', 'pl6', 'pm6', 'nqp'], source: 'source.perl.6' }, { name: 'powershell', identifiers: ['powershell', 'ps1', 'psm1', 'psd1'], source: 'source.powershell' }, { name: 'python', identifiers: ['python', 'py', 'py3', 'rpy', 'pyw', 'cpy', 'SConstruct', 'Sconstruct', 'sconstruct', 'SConscript', 'gyp', 'gypi'], source: 'source.python' }, diff --git a/extensions/markdown/syntaxes/markdown.tmLanguage b/extensions/markdown/syntaxes/markdown.tmLanguage index df4657d201426..d9ac2a0ba6c44 100644 --- a/extensions/markdown/syntaxes/markdown.tmLanguage +++ b/extensions/markdown/syntaxes/markdown.tmLanguage @@ -174,6 +174,10 @@ include #fenced_code_block_objc
+ + include + #fenced_code_block_scss + include #fenced_code_block_perl6 @@ -1914,7 +1918,7 @@ fenced_code_block_jade begin - (^|\G)(\s*)([`~]{3,})\s*((jade)(\s+[^`~]*)?$) + (^|\G)(\s*)([`~]{3,})\s*((jade|pug)(\s+[^`~]*)?$) name markup.fenced_code.block.markdown end @@ -1965,7 +1969,7 @@ fenced_code_block_js begin - (^|\G)(\s*)([`~]{3,})\s*((js|jsx|javascript)(\s+[^`~]*)?$) + (^|\G)(\s*)([`~]{3,})\s*((js|jsx|javascript|es6|mjs)(\s+[^`~]*)?$) name markup.fenced_code.block.markdown end @@ -2217,6 +2221,57 @@
+ fenced_code_block_scss + + begin + (^|\G)(\s*)([`~]{3,})\s*((scss)(\s+[^`~]*)?$) + name + markup.fenced_code.block.markdown + end + (^|\G)(\2|\s{0,3})(\3)\s*$ + beginCaptures + + 3 + + name + punctuation.definition.markdown + + 5 + + name + fenced_code.block.language + + 6 + + name + fenced_code.block.language.attributes + + + endCaptures + + 3 + + name + punctuation.definition.markdown + + + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?!\s*([`~]{3,})\s*$) + patterns + + + include + source.css.scss + + + + + fenced_code_block_perl6 begin diff --git a/extensions/markdown/syntaxes/markdown.tmLanguage.base b/extensions/markdown/syntaxes/markdown.tmLanguage.base index 6a8868a260bfb..7c5a5558a18c0 100644 --- a/extensions/markdown/syntaxes/markdown.tmLanguage.base +++ b/extensions/markdown/syntaxes/markdown.tmLanguage.base @@ -416,7 +416,7 @@ name markup.fenced_code.block.markdown begin - (^|\G)(\s*)([`~]{3,})\s*(?=[^`~]*)?$ + (^|\G)(\s*)([`~]{3,})\s*(?=([^`~]*)?$) end (^|\G)(\2|\s{0,3})(\3)\s*$ beginCaptures @@ -1118,7 +1118,7 @@ match - (\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\])[ ]?(\[)([^\]]*+)(\]) + (\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\])(\[)([^\]]*+)(\]) name meta.link.reference.markdown diff --git a/extensions/markdown/tsconfig.json b/extensions/markdown/tsconfig.json index e877d8142f07d..ec272338af52f 100644 --- a/extensions/markdown/tsconfig.json +++ b/extensions/markdown/tsconfig.json @@ -14,7 +14,7 @@ "noUnusedLocals": true, "noUnusedParameters": true }, - "exclude": [ - "node_modules" + "include": [ + "src/**/*" ] } \ No newline at end of file diff --git a/extensions/merge-conflict/.vscodeignore b/extensions/merge-conflict/.vscodeignore new file mode 100644 index 0000000000000..d43a539fddf5b --- /dev/null +++ b/extensions/merge-conflict/.vscodeignore @@ -0,0 +1,2 @@ +src/** +tsconfig.json \ No newline at end of file diff --git a/extensions/merge-conflict/npm-shrinkwrap.json b/extensions/merge-conflict/npm-shrinkwrap.json new file mode 100644 index 0000000000000..ec715d1907bdb --- /dev/null +++ b/extensions/merge-conflict/npm-shrinkwrap.json @@ -0,0 +1,26 @@ +{ + "name": "merge-conflict", + "version": "0.7.0", + "dependencies": { + "applicationinsights": { + "version": "0.18.0", + "from": "applicationinsights@0.18.0", + "resolved": "https://registry.npmjs.org/applicationinsights/-/applicationinsights-0.18.0.tgz" + }, + "vscode-extension-telemetry": { + "version": "0.0.8", + "from": "vscode-extension-telemetry@0.0.8", + "resolved": "https://registry.npmjs.org/vscode-extension-telemetry/-/vscode-extension-telemetry-0.0.8.tgz" + }, + "vscode-nls": { + "version": "2.0.2", + "from": "vscode-nls@>=2.0.2 <3.0.0", + "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-2.0.2.tgz" + }, + "winreg": { + "version": "1.2.3", + "from": "winreg@1.2.3", + "resolved": "https://registry.npmjs.org/winreg/-/winreg-1.2.3.tgz" + } + } +} diff --git a/extensions/merge-conflict/package.json b/extensions/merge-conflict/package.json new file mode 100644 index 0000000000000..05fa4d772e87e --- /dev/null +++ b/extensions/merge-conflict/package.json @@ -0,0 +1,93 @@ +{ + "name": "merge-conflict", + "publisher": "vscode", + "displayName": "merge-conflict", + "description": "Merge Conflict", + "version": "0.7.0", + "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", + "engines": { + "vscode": "^1.5.0" + }, + "categories": [ + "Other" + ], + "activationEvents": [ + "*" + ], + "main": "./out/extension", + "scripts": { + "compile": "gulp compile-extension:merge-conflict", + "watch": "gulp watch-extension:merge-conflict" + }, + "contributes": { + "commands": [ + { + "category": "%command.category%", + "title": "%command.accept.all-incoming%", + "command": "merge-conflict.accept.all-incoming" + }, + { + "category": "%command.category%", + "title": "%command.accept.all-both%", + "command": "merge-conflict.accept.all-both" + }, + { + "category": "%command.category%", + "title": "%command.accept.current%", + "command": "merge-conflict.accept.current" + }, + { + "category": "%command.category%", + "title": "%command.accept.incoming%", + "command": "merge-conflict.accept.incoming" + }, + { + "category": "%command.category%", + "title": "Accept selection", + "command": "merge-conflict.accept.selection" + }, + { + "category": "%command.category%", + "title": "%command.accept.both%", + "command": "merge-conflict.accept.both" + }, + { + "category": "%command.category%", + "title": "%command.next%", + "command": "merge-conflict.next" + }, + { + "category": "%command.category%", + "title": "%command.previous%", + "command": "merge-conflict.previous" + }, + { + "category": "%command.category%", + "title": "%command.compare%", + "command": "merge-conflict.compare" + } + ], + "configuration": { + "title": "%config.title%", + "properties": { + "merge-conflict.codeLens.enabled": { + "type": "boolean", + "description": "%config.codeLensEnabled%", + "default": true + }, + "merge-conflict.decorators.enabled": { + "type": "boolean", + "description": "%config.decoratorsEnabled%", + "default": true + } + } + } + }, + "dependencies": { + "vscode-extension-telemetry": "0.0.8", + "vscode-nls": "^2.0.2" + }, + "devDependencies": { + "@types/node": "^7.0.4" + } +} \ No newline at end of file diff --git a/extensions/merge-conflict/package.nls.json b/extensions/merge-conflict/package.nls.json new file mode 100644 index 0000000000000..b2927ca3431c9 --- /dev/null +++ b/extensions/merge-conflict/package.nls.json @@ -0,0 +1,15 @@ +{ + "command.category": "Merge Conflict", + "command.accept.all-incoming": "Accept All Incoming", + "command.accept.all-both": "Accept All Both", + "command.accept.current": "Accept Current", + "command.accept.incoming": "Accept Incoming", + "command.accept.selection": "Accept Selection", + "command.accept.both": "Accept Both", + "command.next": "Next Conflict", + "command.previous": "Previous Conflict", + "command.compare": "Compare Current Conflict", + "config.title": "Merge Conflict", + "config.codeLensEnabled": "Enable/disable merge conflict block CodeLens within editor", + "config.decoratorsEnabled": "Enable/disable merge conflict decorators within editor" +} \ No newline at end of file diff --git a/extensions/merge-conflict/src/codelensProvider.ts b/extensions/merge-conflict/src/codelensProvider.ts new file mode 100644 index 0000000000000..aa7bc6e30e0d8 --- /dev/null +++ b/extensions/merge-conflict/src/codelensProvider.ts @@ -0,0 +1,102 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import * as interfaces from './interfaces'; +import { loadMessageBundle } from 'vscode-nls'; +const localize = loadMessageBundle(); + +export default class MergeConflictCodeLensProvider implements vscode.CodeLensProvider, vscode.Disposable { + private codeLensRegistrationHandle: vscode.Disposable | null; + private config: interfaces.IExtensionConfiguration; + private tracker: interfaces.IDocumentMergeConflictTracker; + + constructor(private context: vscode.ExtensionContext, trackerService: interfaces.IDocumentMergeConflictTrackerService) { + this.tracker = trackerService.createTracker('codelens'); + } + + begin(config: interfaces.IExtensionConfiguration) { + this.config = config; + + if (this.config.enableCodeLens) { + this.registerCodeLensProvider(); + } + } + + configurationUpdated(updatedConfig: interfaces.IExtensionConfiguration) { + + if (updatedConfig.enableCodeLens === false && this.codeLensRegistrationHandle) { + this.codeLensRegistrationHandle.dispose(); + this.codeLensRegistrationHandle = null; + } + else if (updatedConfig.enableCodeLens === true && !this.codeLensRegistrationHandle) { + this.registerCodeLensProvider(); + } + + this.config = updatedConfig; + } + + + dispose() { + if (this.codeLensRegistrationHandle) { + this.codeLensRegistrationHandle.dispose(); + this.codeLensRegistrationHandle = null; + } + } + + async provideCodeLenses(document: vscode.TextDocument, token: vscode.CancellationToken): Promise { + + if (!this.config || !this.config.enableCodeLens) { + return null; + } + + let conflicts = await this.tracker.getConflicts(document); + + if (!conflicts || conflicts.length === 0) { + return null; + } + + let items: vscode.CodeLens[] = []; + + conflicts.forEach(conflict => { + let acceptCurrentCommand: vscode.Command = { + command: 'merge-conflict.accept.current', + title: localize('acceptCurrentChange', 'Accept Current Change'), + arguments: ['known-conflict', conflict] + }; + + let acceptIncomingCommand: vscode.Command = { + command: 'merge-conflict.accept.incoming', + title: localize('acceptIncomingChange', 'Accept Incoming Change'), + arguments: ['known-conflict', conflict] + }; + + let acceptBothCommand: vscode.Command = { + command: 'merge-conflict.accept.both', + title: localize('acceptBothChanges', 'Accept Both Changes'), + arguments: ['known-conflict', conflict] + }; + + let diffCommand: vscode.Command = { + command: 'merge-conflict.compare', + title: localize('compareChanges', 'Compare Changes'), + arguments: [conflict] + }; + + items.push( + new vscode.CodeLens(conflict.range, acceptCurrentCommand), + new vscode.CodeLens(conflict.range.with(conflict.range.start.with({ character: conflict.range.start.character + 1 })), acceptIncomingCommand), + new vscode.CodeLens(conflict.range.with(conflict.range.start.with({ character: conflict.range.start.character + 2 })), acceptBothCommand), + new vscode.CodeLens(conflict.range.with(conflict.range.start.with({ character: conflict.range.start.character + 3 })), diffCommand) + ); + }); + + return items; + } + + private registerCodeLensProvider() { + this.codeLensRegistrationHandle = vscode.languages.registerCodeLensProvider({ pattern: '**/*' }, this); + } +} diff --git a/extensions/merge-conflict/src/commandHandler.ts b/extensions/merge-conflict/src/commandHandler.ts new file mode 100644 index 0000000000000..0f4134fcbbd83 --- /dev/null +++ b/extensions/merge-conflict/src/commandHandler.ts @@ -0,0 +1,288 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import * as vscode from 'vscode'; +import * as interfaces from './interfaces'; +import ContentProvider from './contentProvider'; +import * as path from 'path'; +import { loadMessageBundle } from 'vscode-nls'; +const localize = loadMessageBundle(); + +interface IDocumentMergeConflictNavigationResults { + canNavigate: boolean; + conflict?: interfaces.IDocumentMergeConflict; +} + +enum NavigationDirection { + Forwards, + Backwards +} + +export default class CommandHandler implements vscode.Disposable { + + private disposables: vscode.Disposable[] = []; + private tracker: interfaces.IDocumentMergeConflictTracker; + + constructor(private context: vscode.ExtensionContext, trackerService: interfaces.IDocumentMergeConflictTrackerService) { + this.tracker = trackerService.createTracker('commands'); + } + + begin() { + this.disposables.push( + this.registerTextEditorCommand('merge-conflict.accept.current', this.acceptCurrent), + this.registerTextEditorCommand('merge-conflict.accept.incoming', this.acceptIncoming), + this.registerTextEditorCommand('merge-conflict.accept.selection', this.acceptSelection), + this.registerTextEditorCommand('merge-conflict.accept.both', this.acceptBoth), + this.registerTextEditorCommand('merge-conflict.accept.all-current', this.acceptAllCurrent), + this.registerTextEditorCommand('merge-conflict.accept.all-incoming', this.acceptAllIncoming), + this.registerTextEditorCommand('merge-conflict.accept.all-both', this.acceptAllBoth), + this.registerTextEditorCommand('merge-conflict.next', this.navigateNext), + this.registerTextEditorCommand('merge-conflict.previous', this.navigatePrevious), + this.registerTextEditorCommand('merge-conflict.compare', this.compare) + ); + } + + private registerTextEditorCommand(command: string, cb: (editor: vscode.TextEditor, ...args) => Promise) { + return vscode.commands.registerCommand(command, (...args) => { + const editor = vscode.window.activeTextEditor; + return editor && cb.call(this, editor, ...args); + }); + } + + acceptCurrent(editor: vscode.TextEditor, ...args): Promise { + return this.accept(interfaces.CommitType.Current, editor, ...args); + } + + acceptIncoming(editor: vscode.TextEditor, ...args): Promise { + return this.accept(interfaces.CommitType.Incoming, editor, ...args); + } + + acceptBoth(editor: vscode.TextEditor, ...args): Promise { + return this.accept(interfaces.CommitType.Both, editor, ...args); + } + + acceptAllCurrent(editor: vscode.TextEditor, ...args): Promise { + return this.acceptAll(interfaces.CommitType.Current, editor); + } + + acceptAllIncoming(editor: vscode.TextEditor, ...args): Promise { + return this.acceptAll(interfaces.CommitType.Incoming, editor); + } + + acceptAllBoth(editor: vscode.TextEditor, ...args): Promise { + return this.acceptAll(interfaces.CommitType.Both, editor); + } + + async compare(editor: vscode.TextEditor, conflict: interfaces.IDocumentMergeConflict | null, ...args) { + const fileName = path.basename(editor.document.uri.fsPath); + + // No conflict, command executed from command palette + if (!conflict) { + conflict = await this.findConflictContainingSelection(editor); + + // Still failed to find conflict, warn the user and exit + if (!conflict) { + vscode.window.showWarningMessage(localize('cursorNotInConflict', 'Editor cursor is not within a merge conflict')); + return; + } + } + + const scheme = editor.document.uri.scheme; + let range = conflict.current.content; + const leftUri = editor.document.uri.with({ + scheme: ContentProvider.scheme, + query: JSON.stringify({ scheme, range }) + }); + + range = conflict.incoming.content; + const rightUri = leftUri.with({ query: JSON.stringify({ scheme, range }) }); + + const title = localize('compareChangesTitle', '{0}: Current Changes ⟷ Incoming Changes', fileName); + vscode.commands.executeCommand('vscode.diff', leftUri, rightUri, title); + } + + navigateNext(editor: vscode.TextEditor, ...args): Promise { + return this.navigate(editor, NavigationDirection.Forwards); + } + + navigatePrevious(editor: vscode.TextEditor, ...args): Promise { + return this.navigate(editor, NavigationDirection.Backwards); + } + + async acceptSelection(editor: vscode.TextEditor, ...args): Promise { + let conflict = await this.findConflictContainingSelection(editor); + + if (!conflict) { + vscode.window.showWarningMessage(localize('cursorNotInConflict', 'Editor cursor is not within a merge conflict')); + return; + } + + let typeToAccept: interfaces.CommitType; + let tokenAfterCurrentBlock: vscode.Range = conflict.splitter; + + if (conflict.commonAncestors.length > 0) { + tokenAfterCurrentBlock = conflict.commonAncestors[0].header; + } + + // Figure out if the cursor is in current or incoming, we do this by seeing if + // the active position is before or after the range of the splitter or common + // ancesors marker. We can use this trick as the previous check in + // findConflictByActiveSelection will ensure it's within the conflict range, so + // we don't falsely identify "current" or "incoming" if outside of a conflict range. + if (editor.selection.active.isBefore(tokenAfterCurrentBlock.start)) { + typeToAccept = interfaces.CommitType.Current; + } + else if (editor.selection.active.isAfter(conflict.splitter.end)) { + typeToAccept = interfaces.CommitType.Incoming; + } + else if (editor.selection.active.isBefore(conflict.splitter.start)) { + vscode.window.showWarningMessage(localize('cursorOnCommonAncestorsRange', 'Editor cursor is within the common ancestors block, please move it to either the "current" or "incoming" block')); + return; + } + else { + vscode.window.showWarningMessage(localize('cursorOnSplitterRange', 'Editor cursor is within the merge conflict splitter, please move it to either the "current" or "incoming" block')); + return; + } + + this.tracker.forget(editor.document); + conflict.commitEdit(typeToAccept, editor); + } + + dispose() { + this.disposables.forEach(disposable => disposable.dispose()); + this.disposables = []; + } + + private async navigate(editor: vscode.TextEditor, direction: NavigationDirection): Promise { + let navigationResult = await this.findConflictForNavigation(editor, direction); + + if (!navigationResult) { + vscode.window.showWarningMessage(localize('noConflicts', 'No merge conflicts found in this file')); + return; + } + else if (!navigationResult.canNavigate) { + vscode.window.showWarningMessage(localize('noOtherConflictsInThisFile', 'No other merge conflicts within this file')); + return; + } + else if (!navigationResult.conflict) { + // TODO: Show error message? + return; + } + + // Move the selection to the first line of the conflict + editor.selection = new vscode.Selection(navigationResult.conflict.range.start, navigationResult.conflict.range.start); + editor.revealRange(navigationResult.conflict.range, vscode.TextEditorRevealType.Default); + } + + private async accept(type: interfaces.CommitType, editor: vscode.TextEditor, ...args): Promise { + + let conflict: interfaces.IDocumentMergeConflict | null; + + // If launched with known context, take the conflict from that + if (args[0] === 'known-conflict') { + conflict = args[1]; + } + else { + // Attempt to find a conflict that matches the current curosr position + conflict = await this.findConflictContainingSelection(editor); + } + + if (!conflict) { + vscode.window.showWarningMessage(localize('cursorNotInConflict', 'Editor cursor is not within a merge conflict')); + return; + } + + // Tracker can forget as we know we are going to do an edit + this.tracker.forget(editor.document); + conflict.commitEdit(type, editor); + } + + private async acceptAll(type: interfaces.CommitType, editor: vscode.TextEditor): Promise { + let conflicts = await this.tracker.getConflicts(editor.document); + + if (!conflicts || conflicts.length === 0) { + vscode.window.showWarningMessage(localize('noConflicts', 'No merge conflicts found in this file')); + return; + } + + // For get the current state of the document, as we know we are doing to do a large edit + this.tracker.forget(editor.document); + + // Apply all changes as one edit + await editor.edit((edit) => conflicts.forEach(conflict => { + conflict.applyEdit(type, editor, edit); + })); + } + + private async findConflictContainingSelection(editor: vscode.TextEditor, conflicts?: interfaces.IDocumentMergeConflict[]): Promise { + + if (!conflicts) { + conflicts = await this.tracker.getConflicts(editor.document); + } + + if (!conflicts || conflicts.length === 0) { + return null; + } + + for (let i = 0; i < conflicts.length; i++) { + if (conflicts[i].range.contains(editor.selection.active)) { + return conflicts[i]; + } + } + + return null; + } + + private async findConflictForNavigation(editor: vscode.TextEditor, direction: NavigationDirection, conflicts?: interfaces.IDocumentMergeConflict[]): Promise { + if (!conflicts) { + conflicts = await this.tracker.getConflicts(editor.document); + } + + if (!conflicts || conflicts.length === 0) { + return null; + } + + let selection = editor.selection.active; + if (conflicts.length === 1) { + if (conflicts[0].range.contains(selection)) { + return { + canNavigate: false + }; + } + + return { + canNavigate: true, + conflict: conflicts[0] + }; + } + + let predicate: (conflict) => boolean; + let fallback: () => interfaces.IDocumentMergeConflict; + + if (direction === NavigationDirection.Forwards) { + predicate = (conflict) => selection.isBefore(conflict.range.start); + fallback = () => conflicts![0]; + } else if (direction === NavigationDirection.Backwards) { + predicate = (conflict) => selection.isAfter(conflict.range.start); + fallback = () => conflicts![conflicts!.length - 1]; + } else { + throw new Error(`Unsupported direction ${direction}`); + } + + for (let i = 0; i < conflicts.length; i++) { + if (predicate(conflicts[i]) && !conflicts[i].range.contains(selection)) { + return { + canNavigate: true, + conflict: conflicts[i] + }; + } + } + + // Went all the way to the end, return the head + return { + canNavigate: true, + conflict: fallback() + }; + } +} \ No newline at end of file diff --git a/extensions/merge-conflict/src/contentProvider.ts b/extensions/merge-conflict/src/contentProvider.ts new file mode 100644 index 0000000000000..446ab052f2297 --- /dev/null +++ b/extensions/merge-conflict/src/contentProvider.ts @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +import * as vscode from 'vscode'; +import * as interfaces from './interfaces'; + +export default class MergeConflictContentProvider implements vscode.TextDocumentContentProvider, vscode.Disposable { + + static scheme = 'merge-conflict.conflict-diff'; + + constructor(private context: vscode.ExtensionContext) { + } + + begin(config: interfaces.IExtensionConfiguration) { + this.context.subscriptions.push( + vscode.workspace.registerTextDocumentContentProvider(MergeConflictContentProvider.scheme, this) + ); + } + + dispose() { + } + + async provideTextDocumentContent(uri: vscode.Uri): Promise { + try { + const { scheme, range } = JSON.parse(uri.query) as { scheme: string; range: { line: number, character: number }[] }; + const [start, end] = range; + + const document = await vscode.workspace.openTextDocument(uri.with({ scheme, query: '' })); + const text = document.getText(new vscode.Range(start.line, start.character, end.line, end.character)); + return text; + } + catch (ex) { + await vscode.window.showErrorMessage('Unable to show comparison'); + return null; + } + } +} \ No newline at end of file diff --git a/extensions/merge-conflict/src/delayer.ts b/extensions/merge-conflict/src/delayer.ts new file mode 100644 index 0000000000000..59ec77ed5038d --- /dev/null +++ b/extensions/merge-conflict/src/delayer.ts @@ -0,0 +1,80 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +export interface ITask { + (): T; +} + +export class Delayer { + + public defaultDelay: number; + private timeout: any; // Timer + private completionPromise: Promise | null; + private onSuccess: ((value?: T | Thenable | null) => void) | null; + private task: ITask | null; + + constructor(defaultDelay: number) { + this.defaultDelay = defaultDelay; + this.timeout = null; + this.completionPromise = null; + this.onSuccess = null; + this.task = null; + } + + public trigger(task: ITask, delay: number = this.defaultDelay): Promise { + this.task = task; + if (delay >= 0) { + this.cancelTimeout(); + } + + if (!this.completionPromise) { + this.completionPromise = new Promise((resolve) => { + this.onSuccess = resolve; + }).then(() => { + this.completionPromise = null; + this.onSuccess = null; + var result = this.task!(); + this.task = null; + return result; + }); + } + + if (delay >= 0 || this.timeout === null) { + this.timeout = setTimeout(() => { + this.timeout = null; + this.onSuccess!(null); + }, delay >= 0 ? delay : this.defaultDelay); + } + + return this.completionPromise; + } + + public forceDelivery(): Promise | null { + if (!this.completionPromise) { + return null; + } + this.cancelTimeout(); + let result = this.completionPromise; + this.onSuccess!(null); + return result; + } + + public isTriggered(): boolean { + return this.timeout !== null; + } + + public cancel(): void { + this.cancelTimeout(); + this.completionPromise = null; + } + + private cancelTimeout(): void { + if (this.timeout !== null) { + clearTimeout(this.timeout); + this.timeout = null; + } + } +} \ No newline at end of file diff --git a/extensions/merge-conflict/src/documentMergeConflict.ts b/extensions/merge-conflict/src/documentMergeConflict.ts new file mode 100644 index 0000000000000..f1714c981632b --- /dev/null +++ b/extensions/merge-conflict/src/documentMergeConflict.ts @@ -0,0 +1,78 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import * as interfaces from './interfaces'; +import * as vscode from 'vscode'; + +export class DocumentMergeConflict implements interfaces.IDocumentMergeConflict { + + public range: vscode.Range; + public current: interfaces.IMergeRegion; + public incoming: interfaces.IMergeRegion; + public commonAncestors: interfaces.IMergeRegion[]; + public splitter: vscode.Range; + + constructor(document: vscode.TextDocument, descriptor: interfaces.IDocumentMergeConflictDescriptor) { + this.range = descriptor.range; + this.current = descriptor.current; + this.incoming = descriptor.incoming; + this.commonAncestors = descriptor.commonAncestors; + this.splitter = descriptor.splitter; + } + + public commitEdit(type: interfaces.CommitType, editor: vscode.TextEditor, edit?: vscode.TextEditorEdit): Thenable { + + if (edit) { + + this.applyEdit(type, editor, edit); + return Promise.resolve(true); + }; + + return editor.edit((edit) => this.applyEdit(type, editor, edit)); + } + + public applyEdit(type: interfaces.CommitType, editor: vscode.TextEditor, edit: vscode.TextEditorEdit): void { + + // Each conflict is a set of ranges as follows, note placements or newlines + // which may not in in spans + // [ Conflict Range -- (Entire content below) + // [ Current Header ]\n -- >>>>> Header + // [ Current Content ] -- (content) + // [ Splitter ]\n -- ===== + // [ Incoming Content ] -- (content) + // [ Incoming Header ]\n -- <<<<< Incoming + // ] + if (type === interfaces.CommitType.Current) { + // Replace [ Conflict Range ] with [ Current Content ] + let content = editor.document.getText(this.current.content); + this.replaceRangeWithContent(content, edit); + } + else if (type === interfaces.CommitType.Incoming) { + let content = editor.document.getText(this.incoming.content); + this.replaceRangeWithContent(content, edit); + } + else if (type === interfaces.CommitType.Both) { + // Replace [ Conflict Range ] with [ Current Content ] + \n + [ Incoming Content ] + + const currentContent = editor.document.getText(this.current.content); + const incomingContent = editor.document.getText(this.incoming.content); + + edit.replace(this.range, currentContent.concat(incomingContent)); + } + } + + private replaceRangeWithContent(content: string, edit: vscode.TextEditorEdit) { + if (this.isNewlineOnly(content)) { + edit.replace(this.range, ''); + return; + } + + // Replace [ Conflict Range ] with [ Current Content ] + edit.replace(this.range, content); + } + + private isNewlineOnly(text: string) { + return text === '\n' || text === '\r\n'; + } +} \ No newline at end of file diff --git a/extensions/merge-conflict/src/documentTracker.ts b/extensions/merge-conflict/src/documentTracker.ts new file mode 100644 index 0000000000000..e6b50fec1a832 --- /dev/null +++ b/extensions/merge-conflict/src/documentTracker.ts @@ -0,0 +1,138 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { MergeConflictParser } from './mergeConflictParser'; +import * as interfaces from './interfaces'; +import { Delayer } from './delayer'; + +class ScanTask { + public origins: Set = new Set(); + public delayTask: Delayer; + + constructor(delayTime: number, initialOrigin: string) { + this.origins.add(initialOrigin); + this.delayTask = new Delayer(delayTime); + } + + public addOrigin(name: string): boolean { + if (this.origins.has(name)) { + return false; + } + + return false; + } + + public hasOrigin(name: string): boolean { + return this.origins.has(name); + } +} + +class OriginDocumentMergeConflictTracker implements interfaces.IDocumentMergeConflictTracker { + constructor(private parent: DocumentMergeConflictTracker, private origin: string) { + } + + getConflicts(document: vscode.TextDocument): PromiseLike { + return this.parent.getConflicts(document, this.origin); + } + + isPending(document: vscode.TextDocument): boolean { + return this.parent.isPending(document, this.origin); + } + + forget(document: vscode.TextDocument) { + this.parent.forget(document); + } +} + +export default class DocumentMergeConflictTracker implements vscode.Disposable, interfaces.IDocumentMergeConflictTrackerService { + private cache: Map = new Map(); + private delayExpireTime: number = 250; + + getConflicts(document: vscode.TextDocument, origin: string): PromiseLike { + // Attempt from cache + + let key = this.getCacheKey(document); + + if (!key) { + // Document doesnt have a uri, can't cache it, so return + return Promise.resolve(this.getConflictsOrEmpty(document, [origin])); + } + + let cacheItem = this.cache.get(key); + if (!cacheItem) { + cacheItem = new ScanTask(this.delayExpireTime, origin); + this.cache.set(key, cacheItem); + } + else { + cacheItem.addOrigin(origin); + } + + return cacheItem.delayTask.trigger(() => { + let conflicts = this.getConflictsOrEmpty(document, Array.from(cacheItem!.origins)); + + if (this.cache) { + this.cache.delete(key!); + } + + return conflicts; + }); + } + + isPending(document: vscode.TextDocument, origin: string): boolean { + if (!document) { + return false; + } + + let key = this.getCacheKey(document); + if (!key) { + return false; + } + + var task = this.cache.get(key); + + if (!task) { + return false; + } + + return task.hasOrigin(origin); + } + + createTracker(origin: string): interfaces.IDocumentMergeConflictTracker { + return new OriginDocumentMergeConflictTracker(this, origin); + } + + forget(document: vscode.TextDocument) { + let key = this.getCacheKey(document); + + if (key) { + this.cache.delete(key); + } + } + + dispose() { + this.cache.clear(); + } + + private getConflictsOrEmpty(document: vscode.TextDocument, origins: string[]): interfaces.IDocumentMergeConflict[] { + const containsConflict = MergeConflictParser.containsConflict(document); + + if (!containsConflict) { + return []; + } + + const conflicts = MergeConflictParser.scanDocument(document); + return conflicts; + } + + private getCacheKey(document: vscode.TextDocument): string | null { + if (document.uri && document.uri) { + return document.uri.toString(); + } + + return null; + } +} + diff --git a/extensions/merge-conflict/src/extension.ts b/extensions/merge-conflict/src/extension.ts new file mode 100644 index 0000000000000..3168d67ab425c --- /dev/null +++ b/extensions/merge-conflict/src/extension.ts @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as nls from 'vscode-nls'; +nls.config(process.env.VSCODE_NLS_CONFIG)(); +import * as vscode from 'vscode'; +import MergeConflictServices from './services'; + +export function activate(context: vscode.ExtensionContext) { + // Register disposables + const services = new MergeConflictServices(context); + services.begin(); + context.subscriptions.push(services); +} + +export function deactivate() { +} + diff --git a/extensions/merge-conflict/src/interfaces.ts b/extensions/merge-conflict/src/interfaces.ts new file mode 100644 index 0000000000000..70519b72b1f11 --- /dev/null +++ b/extensions/merge-conflict/src/interfaces.ts @@ -0,0 +1,48 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import * as vscode from 'vscode'; + +export interface IMergeRegion { + name: string; + header: vscode.Range; + content: vscode.Range; + decoratorContent: vscode.Range; +} + +export enum CommitType { + Current, + Incoming, + Both +} + +export interface IExtensionConfiguration { + enableCodeLens: boolean; + enableDecorations: boolean; + enableEditorOverview: boolean; +} + +export interface IDocumentMergeConflict extends IDocumentMergeConflictDescriptor { + commitEdit(type: CommitType, editor: vscode.TextEditor, edit?: vscode.TextEditorEdit); + applyEdit(type: CommitType, editor: vscode.TextEditor, edit: vscode.TextEditorEdit); +} + +export interface IDocumentMergeConflictDescriptor { + range: vscode.Range; + current: IMergeRegion; + incoming: IMergeRegion; + commonAncestors: IMergeRegion[]; + splitter: vscode.Range; +} + +export interface IDocumentMergeConflictTracker { + getConflicts(document: vscode.TextDocument): PromiseLike; + isPending(document: vscode.TextDocument): boolean; + forget(document: vscode.TextDocument); +} + +export interface IDocumentMergeConflictTrackerService { + createTracker(origin: string): IDocumentMergeConflictTracker; + forget(document: vscode.TextDocument); +} diff --git a/extensions/merge-conflict/src/mergeConflictParser.ts b/extensions/merge-conflict/src/mergeConflictParser.ts new file mode 100644 index 0000000000000..44fb2f36d19ab --- /dev/null +++ b/extensions/merge-conflict/src/mergeConflictParser.ts @@ -0,0 +1,168 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import * as vscode from 'vscode'; +import * as interfaces from './interfaces'; +import { DocumentMergeConflict } from './documentMergeConflict'; + +const startHeaderMarker = '<<<<<<<'; +const commonAncestorsMarker = '|||||||'; +const splitterMarker = '======='; +const endFooterMarker = '>>>>>>>'; + +interface IScanMergedConflict { + startHeader: vscode.TextLine; + commonAncestors: vscode.TextLine[]; + splitter?: vscode.TextLine; + endFooter?: vscode.TextLine; +} + +export class MergeConflictParser { + + static scanDocument(document: vscode.TextDocument): interfaces.IDocumentMergeConflict[] { + + // Scan each line in the document, we already know there is atleast a <<<<<<< and + // >>>>>> marker within the document, we need to group these into conflict ranges. + // We initially build a scan match, that references the lines of the header, splitter + // and footer. This is then converted into a full descriptor containing all required + // ranges. + + let currentConflict: IScanMergedConflict | null = null; + const conflictDescriptors: interfaces.IDocumentMergeConflictDescriptor[] = []; + + for (let i = 0; i < document.lineCount; i++) { + const line = document.lineAt(i); + + // Ignore empty lines + if (!line || line.isEmptyOrWhitespace) { + continue; + } + + // Is this a start line? <<<<<<< + if (line.text.startsWith(startHeaderMarker)) { + if (currentConflict !== null) { + // Error, we should not see a startMarker before we've seen an endMarker + currentConflict = null; + + // Give up parsing, anything matched up this to this point will be decorated + // anything after will not + break; + } + + // Create a new conflict starting at this line + currentConflict = { startHeader: line, commonAncestors: [] }; + } + // Are we within a conflict block and is this a common ancestors marker? ||||||| + else if (currentConflict && !currentConflict.splitter && line.text.startsWith(commonAncestorsMarker)) { + currentConflict.commonAncestors.push(line); + } + // Are we within a conflict block and is this a splitter? ======= + else if (currentConflict && !currentConflict.splitter && line.text.startsWith(splitterMarker)) { + currentConflict.splitter = line; + } + // Are we withon a conflict block and is this a footer? >>>>>>> + else if (currentConflict && line.text.startsWith(endFooterMarker)) { + currentConflict.endFooter = line; + + // Create a full descriptor from the lines that we matched. This can return + // null if the descriptor could not be completed. + let completeDescriptor = MergeConflictParser.scanItemTolMergeConflictDescriptor(document, currentConflict); + + if (completeDescriptor !== null) { + conflictDescriptors.push(completeDescriptor); + } + + // Reset the current conflict to be empty, so we can match the next + // starting header marker. + currentConflict = null; + } + } + + return conflictDescriptors + .filter(Boolean) + .map(descriptor => new DocumentMergeConflict(document, descriptor)); + } + + private static scanItemTolMergeConflictDescriptor(document: vscode.TextDocument, scanned: IScanMergedConflict): interfaces.IDocumentMergeConflictDescriptor | null { + // Validate we have all the required lines within the scan item. + if (!scanned.startHeader || !scanned.splitter || !scanned.endFooter) { + return null; + } + + let tokenAfterCurrentBlock: vscode.TextLine = scanned.commonAncestors[0] || scanned.splitter; + + // Assume that descriptor.current.header, descriptor.incoming.header and descriptor.spliiter + // have valid ranges, fill in content and total ranges from these parts. + // NOTE: We need to shift the decortator range back one character so the splitter does not end up with + // two decoration colors (current and splitter), if we take the new line from the content into account + // the decorator will wrap to the next line. + return { + current: { + header: scanned.startHeader.range, + decoratorContent: new vscode.Range( + scanned.startHeader.rangeIncludingLineBreak.end, + MergeConflictParser.shiftBackOneCharacter(document, tokenAfterCurrentBlock.range.start, scanned.startHeader.rangeIncludingLineBreak.end)), + // Current content is range between header (shifted for linebreak) and splitter or common ancestors mark start + content: new vscode.Range( + scanned.startHeader.rangeIncludingLineBreak.end, + tokenAfterCurrentBlock.range.start), + name: scanned.startHeader.text.substring(startHeaderMarker.length + 1) + }, + commonAncestors: scanned.commonAncestors.map((currentTokenLine, index, commonAncestors) => { + let nextTokenLine = commonAncestors[index + 1] || scanned.splitter; + return { + header: currentTokenLine.range, + decoratorContent: new vscode.Range( + currentTokenLine.rangeIncludingLineBreak.end, + MergeConflictParser.shiftBackOneCharacter(document, nextTokenLine.range.start, currentTokenLine.rangeIncludingLineBreak.end)), + // Each common ancestors block is range between one common ancestors token + // (shifted for linebreak) and start of next common ancestors token or splitter + content: new vscode.Range( + currentTokenLine.rangeIncludingLineBreak.end, + nextTokenLine.range.start), + name: currentTokenLine.text.substring(commonAncestorsMarker.length + 1) + }; + }), + splitter: scanned.splitter.range, + incoming: { + header: scanned.endFooter.range, + decoratorContent: new vscode.Range( + scanned.splitter.rangeIncludingLineBreak.end, + MergeConflictParser.shiftBackOneCharacter(document, scanned.endFooter.range.start, scanned.splitter.rangeIncludingLineBreak.end)), + // Incoming content is range between splitter (shifted for linebreak) and footer start + content: new vscode.Range( + scanned.splitter.rangeIncludingLineBreak.end, + scanned.endFooter.range.start), + name: scanned.endFooter.text.substring(endFooterMarker.length + 1) + }, + // Entire range is between current header start and incoming header end (including line break) + range: new vscode.Range(scanned.startHeader.range.start, scanned.endFooter.rangeIncludingLineBreak.end) + }; + } + + static containsConflict(document: vscode.TextDocument): boolean { + if (!document) { + return false; + } + + let text = document.getText(); + return text.includes(startHeaderMarker) && text.includes(endFooterMarker); + } + + private static shiftBackOneCharacter(document: vscode.TextDocument, range: vscode.Position, unlessEqual: vscode.Position): vscode.Position { + if (range.isEqual(unlessEqual)) { + return range; + } + + let line = range.line; + let character = range.character - 1; + + if (character < 0) { + line--; + character = document.lineAt(line).range.end.character; + } + + return new vscode.Position(line, character); + } +} diff --git a/extensions/merge-conflict/src/mergeDecorator.ts b/extensions/merge-conflict/src/mergeDecorator.ts new file mode 100644 index 0000000000000..0716e5b1eeb2d --- /dev/null +++ b/extensions/merge-conflict/src/mergeDecorator.ts @@ -0,0 +1,252 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import * as vscode from 'vscode'; +import * as interfaces from './interfaces'; +import { loadMessageBundle } from 'vscode-nls'; +const localize = loadMessageBundle(); + +export default class MergeDectorator implements vscode.Disposable { + + private decorations: { [key: string]: vscode.TextEditorDecorationType } = {}; + + private decorationUsesWholeLine: boolean = true; // Useful for debugging, set to false to see exact match ranges + + private config: interfaces.IExtensionConfiguration; + private tracker: interfaces.IDocumentMergeConflictTracker; + private updating = new Map(); + + constructor(private context: vscode.ExtensionContext, trackerService: interfaces.IDocumentMergeConflictTrackerService) { + this.tracker = trackerService.createTracker('decorator'); + } + + begin(config: interfaces.IExtensionConfiguration) { + this.config = config; + this.registerDecorationTypes(config); + + // Check if we already have a set of active windows, attempt to track these. + vscode.window.visibleTextEditors.forEach(e => this.applyDecorations(e)); + + vscode.workspace.onDidOpenTextDocument(event => { + this.applyDecorationsFromEvent(event); + }, null, this.context.subscriptions); + + vscode.workspace.onDidChangeTextDocument(event => { + this.applyDecorationsFromEvent(event.document); + }, null, this.context.subscriptions); + + vscode.window.onDidChangeVisibleTextEditors((e) => { + // Any of which could be new (not just the active one). + e.forEach(e => this.applyDecorations(e)); + }, null, this.context.subscriptions); + } + + configurationUpdated(config: interfaces.IExtensionConfiguration) { + this.config = config; + this.registerDecorationTypes(config); + + // Re-apply the decoration + vscode.window.visibleTextEditors.forEach(e => { + this.removeDecorations(e); + this.applyDecorations(e); + }); + } + + private registerDecorationTypes(config: interfaces.IExtensionConfiguration) { + + // Dispose of existing decorations + Object.keys(this.decorations).forEach(k => this.decorations[k].dispose()); + this.decorations = {}; + + // None of our features are enabled + if (!config.enableDecorations || !config.enableEditorOverview) { + return; + } + + // Create decorators + if (config.enableDecorations || config.enableEditorOverview) { + this.decorations['current.content'] = vscode.window.createTextEditorDecorationType( + this.generateBlockRenderOptions('merge.currentContentBackground', 'editorOverviewRuler.currentContentForeground', config) + ); + + this.decorations['incoming.content'] = vscode.window.createTextEditorDecorationType( + this.generateBlockRenderOptions('merge.incomingContentBackground', 'editorOverviewRuler.incomingContentForeground', config) + ); + + this.decorations['commonAncestors.content'] = vscode.window.createTextEditorDecorationType( + this.generateBlockRenderOptions('merge.commonContentBackground', 'editorOverviewRuler.commonContentForeground', config) + ); + } + + if (config.enableDecorations) { + this.decorations['current.header'] = vscode.window.createTextEditorDecorationType({ + isWholeLine: this.decorationUsesWholeLine, + backgroundColor: new vscode.ThemeColor('merge.currentHeaderBackground'), + color: new vscode.ThemeColor('editor.foreground'), + outlineStyle: 'solid', + outlineWidth: '1pt', + outlineColor: new vscode.ThemeColor('merge.border'), + after: { + contentText: ' ' + localize('currentChange', '(Current Change)'), + color: new vscode.ThemeColor('descriptionForeground') + } + }); + + this.decorations['commonAncestors.header'] = vscode.window.createTextEditorDecorationType({ + isWholeLine: this.decorationUsesWholeLine, + backgroundColor: new vscode.ThemeColor('merge.commonHeaderBackground'), + color: new vscode.ThemeColor('editor.foreground'), + outlineStyle: 'solid', + outlineWidth: '1pt', + outlineColor: new vscode.ThemeColor('merge.border') + }); + + this.decorations['splitter'] = vscode.window.createTextEditorDecorationType({ + color: new vscode.ThemeColor('editor.foreground'), + outlineStyle: 'solid', + outlineWidth: '1pt', + outlineColor: new vscode.ThemeColor('merge.border'), + isWholeLine: this.decorationUsesWholeLine, + }); + + this.decorations['incoming.header'] = vscode.window.createTextEditorDecorationType({ + backgroundColor: new vscode.ThemeColor('merge.incomingHeaderBackground'), + color: new vscode.ThemeColor('editor.foreground'), + outlineStyle: 'solid', + outlineWidth: '1pt', + outlineColor: new vscode.ThemeColor('merge.border'), + isWholeLine: this.decorationUsesWholeLine, + after: { + contentText: ' ' + localize('incomingChange', '(Incoming Change)'), + color: new vscode.ThemeColor('descriptionForeground') + } + }); + } + } + + dispose() { + + // TODO: Replace with Map + Object.keys(this.decorations).forEach(name => { + this.decorations[name].dispose(); + }); + + this.decorations = {}; + } + + private generateBlockRenderOptions(backgroundColor: string, overviewRulerColor: string, config: interfaces.IExtensionConfiguration): vscode.DecorationRenderOptions { + + let renderOptions: vscode.DecorationRenderOptions = {}; + + if (config.enableDecorations) { + renderOptions.backgroundColor = new vscode.ThemeColor(backgroundColor); + renderOptions.isWholeLine = this.decorationUsesWholeLine; + } + + if (config.enableEditorOverview) { + renderOptions.overviewRulerColor = new vscode.ThemeColor(overviewRulerColor); + renderOptions.overviewRulerLane = vscode.OverviewRulerLane.Full; + } + + return renderOptions; + } + + private applyDecorationsFromEvent(eventDocument: vscode.TextDocument) { + for (var i = 0; i < vscode.window.visibleTextEditors.length; i++) { + if (vscode.window.visibleTextEditors[i].document === eventDocument) { + // Attempt to apply + this.applyDecorations(vscode.window.visibleTextEditors[i]); + } + } + } + + private async applyDecorations(editor: vscode.TextEditor) { + if (!editor || !editor.document) { return; } + + if (!this.config || (!this.config.enableDecorations && !this.config.enableEditorOverview)) { + return; + } + + // If we have a pending scan from the same origin, exit early. (Cannot use this.tracker.isPending() because decorations are per editor.) + if (this.updating.get(editor)) { + return; + } + + try { + this.updating.set(editor, true); + + let conflicts = await this.tracker.getConflicts(editor.document); + if (vscode.window.visibleTextEditors.indexOf(editor) === -1) { + return; + } + + if (conflicts.length === 0) { + this.removeDecorations(editor); + return; + } + + // Store decorations keyed by the type of decoration, set decoration wants a "style" + // to go with it, which will match this key (see constructor); + let matchDecorations: { [key: string]: vscode.DecorationOptions[] } = {}; + + let pushDecoration = (key: string, d: vscode.DecorationOptions) => { + matchDecorations[key] = matchDecorations[key] || []; + matchDecorations[key].push(d); + }; + + conflicts.forEach(conflict => { + // TODO, this could be more effective, just call getMatchPositions once with a map of decoration to position + if (!conflict.current.decoratorContent.isEmpty) { + pushDecoration('current.content', { range: conflict.current.decoratorContent }); + } + if (!conflict.incoming.decoratorContent.isEmpty) { + pushDecoration('incoming.content', { range: conflict.incoming.decoratorContent }); + } + + conflict.commonAncestors.forEach(commonAncestorsRegion => { + if (!commonAncestorsRegion.decoratorContent.isEmpty) { + pushDecoration('commonAncestors.content', { range: commonAncestorsRegion.decoratorContent }); + } + }); + + if (this.config.enableDecorations) { + pushDecoration('current.header', { range: conflict.current.header }); + pushDecoration('splitter', { range: conflict.splitter }); + pushDecoration('incoming.header', { range: conflict.incoming.header }); + + conflict.commonAncestors.forEach(commonAncestorsRegion => { + pushDecoration('commonAncestors.header', { range: commonAncestorsRegion.header }); + }); + } + }); + + // For each match we've generated, apply the generated decoration with the matching decoration type to the + // editor instance. Keys in both matches and decorations should match. + Object.keys(matchDecorations).forEach(decorationKey => { + let decorationType = this.decorations[decorationKey]; + + if (decorationType) { + editor.setDecorations(decorationType, matchDecorations[decorationKey]); + } + }); + + } finally { + this.updating.delete(editor); + } + } + + private removeDecorations(editor: vscode.TextEditor) { + // Remove all decorations, there might be none + Object.keys(this.decorations).forEach(decorationKey => { + + // Race condition, while editing the settings, it's possible to + // generate regions before the configuration has been refreshed + let decorationType = this.decorations[decorationKey]; + + if (decorationType) { + editor.setDecorations(decorationType, []); + } + }); + } +} \ No newline at end of file diff --git a/extensions/merge-conflict/src/services.ts b/extensions/merge-conflict/src/services.ts new file mode 100644 index 0000000000000..320adb3e53e59 --- /dev/null +++ b/extensions/merge-conflict/src/services.ts @@ -0,0 +1,67 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import * as vscode from 'vscode'; +import DocumentTracker from './documentTracker'; +import CodeLensProvider from './codelensProvider'; +import CommandHandler from './commandHandler'; +import ContentProvider from './contentProvider'; +import Decorator from './mergeDecorator'; +import * as interfaces from './interfaces'; + +const ConfigurationSectionName = 'merge-conflict'; + +export default class ServiceWrapper implements vscode.Disposable { + + private services: vscode.Disposable[] = []; + + constructor(private context: vscode.ExtensionContext) { + } + + begin() { + + let configuration = this.createExtensionConfiguration(); + const documentTracker = new DocumentTracker(); + + this.services.push( + documentTracker, + new CommandHandler(this.context, documentTracker), + new CodeLensProvider(this.context, documentTracker), + new ContentProvider(this.context), + new Decorator(this.context, documentTracker), + ); + + this.services.forEach((service: any) => { + if (service.begin && service.begin instanceof Function) { + service.begin(configuration); + } + }); + + vscode.workspace.onDidChangeConfiguration(() => { + this.services.forEach((service: any) => { + if (service.configurationUpdated && service.configurationUpdated instanceof Function) { + service.configurationUpdated(this.createExtensionConfiguration()); + } + }); + }); + } + + createExtensionConfiguration(): interfaces.IExtensionConfiguration { + const workspaceConfiguration = vscode.workspace.getConfiguration(ConfigurationSectionName); + const codeLensEnabled: boolean = workspaceConfiguration.get('codeLens.enabled', true); + const decoratorsEnabled: boolean = workspaceConfiguration.get('decorators.enabled', true); + + return { + enableCodeLens: codeLensEnabled, + enableDecorations: decoratorsEnabled, + enableEditorOverview: decoratorsEnabled + }; + } + + dispose() { + this.services.forEach(disposable => disposable.dispose()); + this.services = []; + } +} + diff --git a/extensions/merge-conflict/src/typings/refs.d.ts b/extensions/merge-conflict/src/typings/refs.d.ts new file mode 100644 index 0000000000000..bc057c5587839 --- /dev/null +++ b/extensions/merge-conflict/src/typings/refs.d.ts @@ -0,0 +1,7 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +/// +/// diff --git a/extensions/merge-conflict/tsconfig.json b/extensions/merge-conflict/tsconfig.json new file mode 100644 index 0000000000000..ce3e55fff2d71 --- /dev/null +++ b/extensions/merge-conflict/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "target": "es6", + "lib": [ + "es2016" + ], + "module": "commonjs", + "outDir": "./out", + "strictNullChecks": true, + "experimentalDecorators": true + }, + "include": [ + "src/**/*" + ] +} diff --git a/extensions/npm-shrinkwrap.json b/extensions/npm-shrinkwrap.json index 9079dd51c957d..68c3e372e42b4 100644 --- a/extensions/npm-shrinkwrap.json +++ b/extensions/npm-shrinkwrap.json @@ -3,9 +3,9 @@ "version": "0.0.1", "dependencies": { "typescript": { - "version": "2.3.1", - "from": "typescript@typescript@2.3.1", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.3.1.tgz" + "version": "2.4.1", + "from": "typescript@2.4.1", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.4.1.tgz" } } } diff --git a/extensions/npm/.vscode/launch.json b/extensions/npm/.vscode/launch.json new file mode 100644 index 0000000000000..da043ff85d975 --- /dev/null +++ b/extensions/npm/.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, + "outFiles": ["${workspaceRoot}/client/out/**/*.js"], + "preLaunchTask": "npm" + } + ] +} \ No newline at end of file diff --git a/extensions/npm/.vscode/tasks.json b/extensions/npm/.vscode/tasks.json new file mode 100644 index 0000000000000..0a411c1c867da --- /dev/null +++ b/extensions/npm/.vscode/tasks.json @@ -0,0 +1,9 @@ +{ + "version": "0.1.0", + "command": "npm", + "isShellCommand": true, + "showOutput": "silent", + "args": ["run", "compile"], + "isBackground": true, + "problemMatcher": "$tsc-watch" +} \ No newline at end of file diff --git a/extensions/npm/.vscodeignore b/extensions/npm/.vscodeignore new file mode 100644 index 0000000000000..d43a539fddf5b --- /dev/null +++ b/extensions/npm/.vscodeignore @@ -0,0 +1,2 @@ +src/** +tsconfig.json \ No newline at end of file diff --git a/extensions/npm/npm-shrinkwrap.json b/extensions/npm/npm-shrinkwrap.json new file mode 100644 index 0000000000000..9d0f47cc9c2fb --- /dev/null +++ b/extensions/npm/npm-shrinkwrap.json @@ -0,0 +1,11 @@ +{ + "name": "npm", + "version": "0.0.1", + "dependencies": { + "vscode-nls": { + "version": "2.0.2", + "from": "vscode-nls@>=2.0.2 <3.0.0", + "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-2.0.2.tgz" + } + } +} diff --git a/extensions/npm/package.json b/extensions/npm/package.json new file mode 100644 index 0000000000000..0570253af1f5a --- /dev/null +++ b/extensions/npm/package.json @@ -0,0 +1,61 @@ +{ + "name": "npm", + "publisher": "vscode", + "description": "Extension to add task support for npm scripts.", + "displayName": "Npm support for VSCode", + "version": "0.0.1", + "engines": { + "vscode": "0.10.x" + }, + "categories": [ + "Other" + ], + "scripts": { + "compile": "gulp compile-extension:npm", + "watch": "gulp watch-extension:npm" + }, + "dependencies": { + "vscode-nls": "^2.0.2" + }, + "devDependencies": { + "@types/node": "^7.0.12" + }, + "main": "./out/main", + "activationEvents": [ + "onCommand:workbench.action.tasks.runTask" + ], + "contributes": { + "configuration": { + "id": "npm", + "type": "object", + "title": "Npm", + "properties": { + "npm.autoDetect": { + "type": "string", + "enum": [ + "off", + "on" + ], + "default": "on", + "description": "%config.npm.autoDetect%" + } + } + }, + "taskDefinitions": [ + { + "type": "npm", + "required": ["script"], + "properties": { + "script": { + "type": "string", + "description": "The npm script to customize" + }, + "file": { + "type": "string", + "description": "The package.json file that provides the task. Can be omitted." + } + } + } + ] + } +} \ No newline at end of file diff --git a/extensions/npm/package.nls.json b/extensions/npm/package.nls.json new file mode 100644 index 0000000000000..bd7c911cda4de --- /dev/null +++ b/extensions/npm/package.nls.json @@ -0,0 +1,3 @@ +{ + "config.npm.autoDetect": "Controls whether auto detection of npm scripts is on or off. Default is on." +} \ No newline at end of file diff --git a/extensions/npm/src/main.ts b/extensions/npm/src/main.ts new file mode 100644 index 0000000000000..82d266687f88e --- /dev/null +++ b/extensions/npm/src/main.ts @@ -0,0 +1,131 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import * as path from 'path'; +import * as fs from 'fs'; +import * as vscode from 'vscode'; + +type AutoDetect = 'on' | 'off'; +let taskProvider: vscode.Disposable | undefined; + +export function activate(_context: vscode.ExtensionContext): void { + let workspaceRoot = vscode.workspace.rootPath; + if (!workspaceRoot) { + return; + } + + function onConfigurationChanged() { + let autoDetect = vscode.workspace.getConfiguration('npm').get('autoDetect'); + if (taskProvider && autoDetect === 'off') { + taskProvider.dispose(); + taskProvider = undefined; + } else if (!taskProvider && autoDetect === 'on') { + taskProvider = vscode.workspace.registerTaskProvider('npm', { + provideTasks: () => { + return getNpmScriptsAsTasks(); + }, + resolveTask(_task: vscode.Task): vscode.Task | undefined { + return undefined; + } + }); + } + } + vscode.workspace.onDidChangeConfiguration(onConfigurationChanged); + onConfigurationChanged(); +} + +export function deactivate(): void { + if (taskProvider) { + taskProvider.dispose(); + } +} + +async function exists(file: string): Promise { + return new Promise((resolve, _reject) => { + fs.exists(file, (value) => { + resolve(value); + }); + }); +} + +async function readFile(file: string): Promise { + return new Promise((resolve, reject) => { + fs.readFile(file, (err, data) => { + if (err) { + reject(err); + } + resolve(data.toString()); + }); + }); +} + +interface NpmTaskDefinition extends vscode.TaskDefinition { + script: string; + file?: string; +} + +const buildNames: string[] = ['build', 'compile', 'watch']; +function isBuildTask(name: string): boolean { + for (let buildName of buildNames) { + if (name.indexOf(buildName) !== -1) { + return true; + } + } + return false; +} + +const testNames: string[] = ['test']; +function isTestTask(name: string): boolean { + for (let testName of testNames) { + if (name === testName) { + return true; + } + } + return false; +} + +async function getNpmScriptsAsTasks(): Promise { + let workspaceRoot = vscode.workspace.rootPath; + let emptyTasks: vscode.Task[] = []; + + if (!workspaceRoot) { + return emptyTasks; + } + + let packageJson = path.join(workspaceRoot, 'package.json'); + if (!await exists(packageJson)) { + return emptyTasks; + } + + try { + var contents = await readFile(packageJson); + var json = JSON.parse(contents); + if (!json.scripts) { + return Promise.resolve(emptyTasks); + } + + const result: vscode.Task[] = []; + Object.keys(json.scripts).forEach(each => { + const kind: NpmTaskDefinition = { + type: 'npm', + script: each + }; + const task = new vscode.Task(kind, `run ${each}`, 'npm', new vscode.ShellExecution(`npm run ${each}`)); + const lowerCaseTaskName = each.toLowerCase(); + if (isBuildTask(lowerCaseTaskName)) { + task.group = vscode.TaskGroup.Build; + } else if (isTestTask(lowerCaseTaskName)) { + task.group = vscode.TaskGroup.Test; + } + result.push(task); + }); + // add some 'well known' npm tasks + result.push(new vscode.Task({ type: 'npm', script: 'install' } as NpmTaskDefinition, `install`, 'npm', new vscode.ShellExecution(`npm install`))); + return Promise.resolve(result); + } catch (e) { + return Promise.resolve(emptyTasks); + } +} \ No newline at end of file diff --git a/extensions/npm/src/typings/refs.d.ts b/extensions/npm/src/typings/refs.d.ts new file mode 100644 index 0000000000000..954bab971e334 --- /dev/null +++ b/extensions/npm/src/typings/refs.d.ts @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +/// +/// +/// diff --git a/extensions/npm/tsconfig.json b/extensions/npm/tsconfig.json new file mode 100644 index 0000000000000..e804fa3acd7a6 --- /dev/null +++ b/extensions/npm/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "target": "es6", + "module": "commonjs", + "lib": [ + "es2016" + ], + "outDir": "./out", + "strictNullChecks": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noUnusedLocals": true, + "noUnusedParameters": true + }, + "include": [ + "src/**/*" + ] +} \ No newline at end of file diff --git a/extensions/objective-c/.vscodeignore b/extensions/objective-c/.vscodeignore new file mode 100644 index 0000000000000..77ab386fc7df4 --- /dev/null +++ b/extensions/objective-c/.vscodeignore @@ -0,0 +1 @@ +test/** \ No newline at end of file diff --git a/extensions/objective-c/syntaxes/objective-c++.tmLanguage.json b/extensions/objective-c/syntaxes/objective-c++.tmLanguage.json index 26550c61e1b18..2b46507a2fba2 100644 --- a/extensions/objective-c/syntaxes/objective-c++.tmLanguage.json +++ b/extensions/objective-c/syntaxes/objective-c++.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-objective-c/blob/master/grammars/objective-c++.cson", + "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." + ], "scopeName": "source.objcpp", "fileTypes": [ "mm", diff --git a/extensions/objective-c/syntaxes/objective-c.tmLanguage.json b/extensions/objective-c/syntaxes/objective-c.tmLanguage.json index 2037028b0c34c..a07e0ba7f437a 100644 --- a/extensions/objective-c/syntaxes/objective-c.tmLanguage.json +++ b/extensions/objective-c/syntaxes/objective-c.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-objective-c/blob/master/grammars/objective-c.cson", + "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." + ], "scopeName": "source.objc", "fileTypes": [ "m", @@ -993,6 +998,5 @@ } ] } - }, - "version": "https://github.com/atom/language-objective-c/commit/0727e04544f3414c1c339cf15a39a05ea3938cb4" + } } \ No newline at end of file diff --git a/extensions/objective-c/test/colorize-results/test_m.json b/extensions/objective-c/test/colorize-results/test_m.json index 542815fa19269..ed1bda084e3a5 100644 --- a/extensions/objective-c/test/colorize-results/test_m.json +++ b/extensions/objective-c/test/colorize-results/test_m.json @@ -51,7 +51,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -62,7 +62,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -117,7 +117,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -128,7 +128,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -271,7 +271,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -293,7 +293,7 @@ "light_plus": "meta.return-type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.return-type: #4EC9B0" } }, { @@ -315,7 +315,7 @@ "light_plus": "meta.return-type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.return-type: #4EC9B0" } }, { @@ -326,7 +326,7 @@ "light_plus": "meta.return-type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.return-type: #4EC9B0" } }, { @@ -337,7 +337,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -348,7 +348,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -370,7 +370,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -414,7 +414,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -458,7 +458,7 @@ "light_plus": "meta.return-type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.return-type: #4EC9B0" } }, { @@ -480,7 +480,7 @@ "light_plus": "meta.return-type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.return-type: #4EC9B0" } }, { @@ -491,7 +491,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -502,7 +502,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -546,7 +546,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -579,7 +579,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -634,7 +634,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -799,7 +799,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -865,7 +865,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -953,7 +953,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -1250,7 +1250,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -1316,7 +1316,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1448,7 +1448,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1503,7 +1503,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1602,7 +1602,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1932,7 +1932,7 @@ "light_plus": "meta.return-type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.return-type: #4EC9B0" } }, { @@ -1954,7 +1954,7 @@ "light_plus": "meta.return-type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.return-type: #4EC9B0" } }, { @@ -1965,7 +1965,7 @@ "light_plus": "meta.return-type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.return-type: #4EC9B0" } }, { @@ -1976,7 +1976,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1987,7 +1987,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2075,7 +2075,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2097,7 +2097,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2108,7 +2108,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2196,7 +2196,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2383,7 +2383,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "meta.selector: #D7BA7D", "light_vs": "meta.selector: #800000", - "hc_black": "meta.selector: #D7BA7D" + "hc_black": "support.function: #DCDCAA" } }, { @@ -2438,7 +2438,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -2515,7 +2515,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -2658,7 +2658,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2713,7 +2713,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2779,7 +2779,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2823,7 +2823,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { diff --git a/extensions/package.json b/extensions/package.json index 59748875eb879..4d3369bac2c8e 100644 --- a/extensions/package.json +++ b/extensions/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "description": "Dependencies shared by all extensions", "dependencies": { - "typescript": "typescript@2.3.1" + "typescript": "2.4.1" }, "scripts": { "postinstall": "node ./postinstall" diff --git a/extensions/perl/.vscodeignore b/extensions/perl/.vscodeignore new file mode 100644 index 0000000000000..77ab386fc7df4 --- /dev/null +++ b/extensions/perl/.vscodeignore @@ -0,0 +1 @@ +test/** \ No newline at end of file diff --git a/extensions/perl/syntaxes/perl.tmLanguage.json b/extensions/perl/syntaxes/perl.tmLanguage.json index 612c4796cbe7c..4c4209c317b0a 100644 --- a/extensions/perl/syntaxes/perl.tmLanguage.json +++ b/extensions/perl/syntaxes/perl.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/perl.tmbundle/blob/master/Syntaxes/Perl.plist", + "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." + ], "comment": "\n\tTODO:\tInclude RegExp syntax\n", "fileTypes": [ "pl", @@ -2541,6 +2546,5 @@ } }, "scopeName": "source.perl", - "uuid": "EDBFE125-6B1C-11D9-9189-000D93589AF6", - "version": "https://github.com/textmate/perl.tmbundle/commit/c0b7a4bd65882380522d82a60b536479a62b07c3" + "uuid": "EDBFE125-6B1C-11D9-9189-000D93589AF6" } \ No newline at end of file diff --git a/extensions/perl/syntaxes/perl6.tmLanguage.json b/extensions/perl/syntaxes/perl6.tmLanguage.json index a3024a11ae78e..9ddfdf4250901 100644 --- a/extensions/perl/syntaxes/perl6.tmLanguage.json +++ b/extensions/perl/syntaxes/perl6.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/perl.tmbundle/blob/master/Syntaxes/Perl%206.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." + ], "fileTypes": [ "p6", "pl6", @@ -314,6 +319,5 @@ } }, "scopeName": "source.perl.6", - "uuid": "E685440C-0E20-4424-9693-864D5240A269", - "version": "https://github.com/textmate/perl.tmbundle/commit/d9841a0878239fa43f88c640f8d458590f97e8f5" + "uuid": "E685440C-0E20-4424-9693-864D5240A269" } \ No newline at end of file diff --git a/extensions/perl/test/colorize-results/test2_pl.json b/extensions/perl/test/colorize-results/test2_pl.json index 550b80232e3c5..ef4bcabf439e2 100644 --- a/extensions/perl/test/colorize-results/test2_pl.json +++ b/extensions/perl/test/colorize-results/test2_pl.json @@ -7,7 +7,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -51,7 +51,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -62,7 +62,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -106,7 +106,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -150,7 +150,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -161,7 +161,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -205,7 +205,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -216,7 +216,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -282,7 +282,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -326,7 +326,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -337,7 +337,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -381,7 +381,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -392,7 +392,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -414,7 +414,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -425,7 +425,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -491,7 +491,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -546,7 +546,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -557,7 +557,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -590,7 +590,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -612,7 +612,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -623,7 +623,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -645,7 +645,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -656,7 +656,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -733,7 +733,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -744,7 +744,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -788,7 +788,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -799,7 +799,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -865,7 +865,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -876,7 +876,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -898,7 +898,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -909,7 +909,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -953,7 +953,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -964,7 +964,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1019,7 +1019,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1041,7 +1041,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1063,7 +1063,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1074,7 +1074,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1151,7 +1151,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1162,7 +1162,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1206,7 +1206,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1228,7 +1228,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1250,7 +1250,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1261,7 +1261,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1360,7 +1360,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1437,7 +1437,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1448,7 +1448,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1470,7 +1470,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1481,7 +1481,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1525,7 +1525,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1536,7 +1536,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1624,7 +1624,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1635,7 +1635,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1679,7 +1679,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1701,7 +1701,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1723,7 +1723,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1734,7 +1734,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1800,7 +1800,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1866,7 +1866,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1877,7 +1877,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1921,7 +1921,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1943,7 +1943,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1965,7 +1965,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1976,7 +1976,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1998,7 +1998,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -2020,7 +2020,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2031,7 +2031,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2053,7 +2053,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2064,7 +2064,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2086,7 +2086,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -2108,7 +2108,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2119,7 +2119,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2185,7 +2185,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2196,7 +2196,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2218,7 +2218,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -2240,7 +2240,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2284,7 +2284,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2339,7 +2339,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2350,7 +2350,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2372,7 +2372,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2383,7 +2383,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2405,7 +2405,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2416,7 +2416,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2460,7 +2460,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -2471,7 +2471,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -2493,7 +2493,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -2504,7 +2504,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -2603,7 +2603,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -2614,7 +2614,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -2636,7 +2636,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -2647,7 +2647,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -2691,7 +2691,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2713,7 +2713,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2735,7 +2735,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2746,7 +2746,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2768,7 +2768,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2779,7 +2779,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2856,7 +2856,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2922,7 +2922,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2933,7 +2933,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2955,7 +2955,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2966,7 +2966,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3010,7 +3010,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -3021,7 +3021,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -3054,7 +3054,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3065,7 +3065,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3087,7 +3087,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3098,7 +3098,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3120,7 +3120,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -3142,7 +3142,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3153,7 +3153,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3175,7 +3175,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3186,7 +3186,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3263,7 +3263,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3274,7 +3274,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/perl/test/colorize-results/test_pl.json b/extensions/perl/test/colorize-results/test_pl.json index b07bdb97e2056..dd6dc702ac1d3 100644 --- a/extensions/perl/test/colorize-results/test_pl.json +++ b/extensions/perl/test/colorize-results/test_pl.json @@ -7,7 +7,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -51,7 +51,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -62,7 +62,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -106,7 +106,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -172,7 +172,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -183,7 +183,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -205,7 +205,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -216,7 +216,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -238,7 +238,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -249,7 +249,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -315,7 +315,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -337,7 +337,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -348,7 +348,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -546,7 +546,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -568,7 +568,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -579,7 +579,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -634,7 +634,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -744,7 +744,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -755,7 +755,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -832,7 +832,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -865,7 +865,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -876,7 +876,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -898,7 +898,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -909,7 +909,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -931,7 +931,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -942,7 +942,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1129,7 +1129,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1195,7 +1195,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1206,7 +1206,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1228,7 +1228,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1239,7 +1239,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1272,7 +1272,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1294,7 +1294,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1316,7 +1316,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1327,7 +1327,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1371,7 +1371,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1415,7 +1415,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1426,7 +1426,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1503,7 +1503,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1580,7 +1580,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1591,7 +1591,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1624,7 +1624,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1646,7 +1646,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1657,7 +1657,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1723,7 +1723,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1745,7 +1745,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1756,7 +1756,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1811,7 +1811,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1822,7 +1822,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1844,7 +1844,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1855,7 +1855,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1910,7 +1910,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1987,7 +1987,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2031,7 +2031,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2042,7 +2042,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2064,7 +2064,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -2086,7 +2086,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2097,7 +2097,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2141,7 +2141,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2152,7 +2152,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2185,7 +2185,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2207,7 +2207,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2218,7 +2218,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2240,7 +2240,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { diff --git a/extensions/php/.vscodeignore b/extensions/php/.vscodeignore index 47cf365a0785e..b29072a6403ca 100644 --- a/extensions/php/.vscodeignore +++ b/extensions/php/.vscodeignore @@ -1 +1,6 @@ test/** +build/** +out/test/** +src/** +tsconfig.json +npm-shrinkwrap.json \ No newline at end of file diff --git a/extensions/php/build/update-grammar.js b/extensions/php/build/update-grammar.js new file mode 100644 index 0000000000000..ac1f9887b28ec --- /dev/null +++ b/extensions/php/build/update-grammar.js @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +var updateGrammar = require('../../../build/npm/update-grammar'); + +function adaptInjectionScope(grammar) { + // we're using the HTML grammar from https://github.com/textmate/html.tmbundle which has moved away from source.js.embedded.html + let oldInjectionKey = "text.html.php - (meta.embedded | meta.tag), L:text.html.php meta.tag, L:source.js.embedded.html"; + let newInjectionKey = "text.html.php - (meta.embedded | meta.tag), L:text.html.php meta.tag, L:text.html.php source.js"; + + var injections = grammar.injections; + var injection = injections[oldInjectionKey]; + if (!injections) { + throw new Error("Can not find PHP injection"); + } + delete injections[oldInjectionKey]; + injections[newInjectionKey] = injection; +} + +updateGrammar.update('atom/language-php', 'grammars/php.cson', './syntaxes/php.tmLanguage.json', adaptInjectionScope); + diff --git a/extensions/php/package.json b/extensions/php/package.json index 7f1aa55047898..6871cf7d10cc8 100644 --- a/extensions/php/package.json +++ b/extensions/php/package.json @@ -27,6 +27,7 @@ "PHP", "php" ], + "firstLine": "^#!/.*\\bphp\\b", "mimetypes": [ "application/x-php" ], @@ -86,6 +87,26 @@ ], "default": "onSave", "description": "%configuration.validate.run%" + }, + "php.validate.runInShell": { + "type": [ + "boolean", + "object" + ], + "default": false, + "description": "%configuration.validate.runInShell%", + "properties": { + "shellArgs": { + "type": "array", + "default": [], + "description": "%configuration.validate.shellArgs%" + }, + "shellExecutable": { + "type": "string", + "default": "", + "description": "%configuration.validate.shellExecutable%" + } + } } } }, @@ -114,9 +135,9 @@ "scripts": { "compile": "gulp compile-extension:php", "watch": "gulp watch-extension:php", - "update-grammar": "node ../../build/npm/update-grammar.js atom/language-php grammars/php.cson ./syntaxes/php.tmLanguage.json" + "update-grammar": "node ./build/update-grammar.js" }, "devDependencies": { "@types/node": "^7.0.4" } -} \ No newline at end of file +} diff --git a/extensions/php/package.nls.json b/extensions/php/package.nls.json index 85edb25a9bb95..852dcb676c653 100644 --- a/extensions/php/package.nls.json +++ b/extensions/php/package.nls.json @@ -1,9 +1,12 @@ -{ +{ "configuration.suggest.basic": "Configures if the built-in PHP language suggestions are enabled. The support suggests PHP globals and variables.", "configuration.validate.enable": "Enable/disable built-in PHP validation.", "configuration.validate.executablePath": "Points to the PHP executable.", "configuration.validate.run": "Whether the linter is run on save or on type.", "configuration.title": "PHP", "commands.categroy.php": "PHP", - "command.untrustValidationExecutable": "Disallow PHP validation executable (defined as workspace setting)" -} \ No newline at end of file + "command.untrustValidationExecutable": "Disallow PHP validation executable (defined as workspace setting)", + "configuration.validate.runInShell": "Run validation in a shell", + "configuration.validate.shellArgs": "Default shell arguments", + "configuration.validate.shellExecutable": "Shell executable path" +} diff --git a/extensions/php/snippets/php.json b/extensions/php/snippets/php.json index 5a3f2c4418ca0..24a4426a54aa3 100644 --- a/extensions/php/snippets/php.json +++ b/extensions/php/snippets/php.json @@ -1,63 +1,75 @@ { - "Class Variable": { - "prefix": "doc_v", + "class …": { + "prefix": "class", + "body": [ + "class ${1:ClassName} ${2:extends ${3:AnotherClass}} ${4:implements ${5:Interface}}", + "{", + "\t$0", + "}", + "" + ], + "description": "Class definition" + }, + "PHPDoc class …": { + "prefix": "doc_class", "body": [ "/**", - " * ${1:undocumented class variable}", - " *", - " * @var ${2:string}", - " **/", - "${3:var} $$2;$0" + " * ${6:undocumented class}", + " */", + "class ${1:ClassName} ${2:extends ${3:AnotherClass}} ${4:implements ${5:Interface}}", + "{", + "\t$0", + "}", + "" ], - "description": "Documented Class Variable" + "description": "Documented Class Declaration" }, "function __construct": { "prefix": "con", "body": [ - "function __construct(${1:$${2:foo} ${3:= ${4:null}}}) {", - "\t${2:$this->$0 = $$0;}", - "}" + "${1:public} function __construct(${2:${3:Type} $${4:var}${5: = ${6:null}}}) {", + "\t\\$this->${4:var} = $${4:var};$0", + "}" ] }, - "class …": { - "prefix": "class", + "PHPDoc property": { + "prefix": "doc_v", "body": [ - "/**", - " * $1", - " */", - "class ${2:ClassName} ${3:extends ${4:AnotherClass}}", - "{", - "\t$5", - "\tfunction ${6:__construct}(${7:argument})", - "\t{", - "\t\t${0:# code...}", - "\t}", - "}", - "" + "/** @var ${1:Type} $${2:var} ${3:description} */", + "${4:protected} $${2:var}${5: = ${6:null}};$0" ], - "description": "Class definition" + "description": "Documented Class Variable" }, "PHPDoc function …": { "prefix": "doc_f", "body": [ "/**", - " * ${6:undocumented function summary}", + " * ${1:undocumented function summary}", " *", - " * ${7:Undocumented function long description}", + " * ${2:Undocumented function long description}", " *", - " * @param ${8:type} ${9:var} ${10:Description}", + "${3: * @param ${4:Type} $${5:var} ${6:Description}}", + "${7: * @return ${8:type}}", + "${9: * @throws ${10:conditon}}", " **/", - "${1:public }function ${2:FunctionName}(${3:$${4:value}${5:=''}})", + "${11:public }function ${12:FunctionName}(${13:${14:${4:Type} }$${5:var}${15: = ${16:null}}})", "{", "\t${0:# code...}", "}" ], "description": "Documented function" }, + "PHPDoc param …": { + "prefix": "param", + "body": [ + "* @param ${1:Type} ${2:var} ${3:Description}$0" + ], + "description": "Paramater documentation" + }, "function …": { "prefix": "fun", "body": [ - "${1:public }function ${2:FunctionName}(${3:$${4:value}${5:=''}})", + "${1:public }function ${2:FunctionName}(${3:${4:${5:Type} }$${6:var}${7: = ${8:null}}})", "{", "\t${0:# code...}", "}" @@ -72,10 +84,7 @@ " */", "trait ${2:TraitName}", "{", - "\tfunction ${3:functionName}(${4:argument})", - "\t{", - "\t\t${5:# code...}", - "\t}", + "\t$0", "}", "" ], @@ -94,21 +103,18 @@ "body": [ "do {", "\t${0:# code...}", - "} while (${1:${2:$a} <= ${3:10}});" + "} while (${1:$${2:a} <= ${3:10}});" ], "description": "Do-While loop" }, - "if … else …": { - "prefix": "ifelse", + "while …": { + "prefix": "while", "body": [ - "if (${1:condition}) {", - "\t${2:# code...}", - "} else {", - "\t${3:# code...}", - "}", - "$0" + "while (${1:$${2:a} <= ${3:10}}) {", + "\t${0:# code...}", + "}" ], - "description": "If Else block" + "description": "While-loop" }, "if …": { "prefix": "if", @@ -119,6 +125,18 @@ ], "description": "If block" }, + "if … else …": { + "prefix": "ifelse", + "body": [ + "if (${1:condition}) {", + "\t${2:# code...}", + "} else {", + "\t${3:# code...}", + "}", + "$0" + ], + "description": "If Else block" + }, "$… = ( … ) ? … : …": { "prefix": "if?", "body": "$${1:retVal} = (${2:condition}) ? ${3:a} : ${4:b} ;", @@ -178,7 +196,7 @@ "switch …": { "prefix": "switch", "body": [ - "switch (${1:variable}) {", + "switch (\\$${1:variable}) {", "\tcase '${2:value}':", "\t\t${3:# code...}", "\t\tbreak;", @@ -193,7 +211,7 @@ "case …": { "prefix": "case", "body": [ - "case '${1:variable}':", + "case '${1:value}':", "\t${0:# code...}", "\tbreak;" ], @@ -201,12 +219,12 @@ }, "$this->…": { "prefix": "this", - "body": "$this->$0", + "body": "\\$this->$0;", "description": "$this->..." }, "echo $this->…": { "prefix": "ethis", - "body": "echo $this->$0", + "body": "echo \\$this->$0;", "description": "Echo this" }, "Throw Exception": { @@ -216,14 +234,5 @@ "$0" ], "description": "Throw exception" - }, - "while …": { - "prefix": "while", - "body": [ - "while (${1:$a <= 10}) {", - "\t${0:# code...}", - "}" - ], - "description": "While-loop" } } \ No newline at end of file diff --git a/extensions/php/src/features/validationProvider.ts b/extensions/php/src/features/validationProvider.ts index 41bae2878dc9d..87b9a9bc6b1f6 100644 --- a/extensions/php/src/features/validationProvider.ts +++ b/extensions/php/src/features/validationProvider.ts @@ -12,6 +12,7 @@ import * as vscode from 'vscode'; import { ThrottledDelayer } from './utils/async'; import * as nls from 'vscode-nls'; + let localize = nls.loadMessageBundle(); export class LineDecoder { @@ -97,11 +98,18 @@ export default class PHPValidationProvider { private diagnosticCollection: vscode.DiagnosticCollection; private delayers: { [key: string]: ThrottledDelayer }; + private platform: string; + private runInShell: boolean = false; + private shellExecutable: string; + private shellArgs: string[] = []; + private isMsys: boolean = false; + constructor(private workspaceStore: vscode.Memento) { this.executable = null; this.validationEnabled = true; this.trigger = RunTrigger.onSave; this.pauseValidation = false; + this.platform = process.platform; } public activate(subscriptions: vscode.Disposable[]) { @@ -129,16 +137,67 @@ export default class PHPValidationProvider { if (section) { this.validationEnabled = section.get('validate.enable', true); let inspect = section.inspect('validate.executablePath'); - if (inspect.workspaceValue) { + if (inspect && inspect.workspaceValue) { this.executable = inspect.workspaceValue; this.executableIsUserDefined = false; - } else if (inspect.globalValue) { + } else if (inspect && inspect.globalValue) { this.executable = inspect.globalValue; this.executableIsUserDefined = true; } else { this.executable = undefined; this.executableIsUserDefined = undefined; } + + let shellSettings = section.get('validate.runInShell'); + if (typeof(shellSettings) === 'boolean') { + this.runInShell = shellSettings; + if (this.platform.toLowerCase() === 'win32') { + this.shellExecutable = 'C:\\WINDOWS\\system32\\cmd.exe'; + this.shellArgs = ['/C']; + if (process.env.ComSpec) { + this.shellExecutable = process.env.ComSpec; + if (process.env.ComSpec.toLowerCase().indexof('powershell.exe') !== -1) { + this.shellArgs = ['/Command']; + } else if (process.env.ComSpec.toLowerCase().indexof('bash.exe') !== -1) { + this.shellArgs = ['-c']; + } + } + } else { + this.shellExecutable = process.env.SHELL || '/bin/bash'; + this.shellArgs = ['-c']; + } + } else if (typeof(shellSettings) === 'object') { + this.runInShell = true; + if (shellSettings.shellExecutable && typeof(shellSettings.shellExecutable) === 'string') { + this.shellExecutable = shellSettings.shellExecutable; + } + if (shellSettings.shellArgs) { + if (typeof(shellSettings.shellArgs) === 'string') { + this.shellArgs = [shellSettings.shellArgs]; + } + if (shellSettings.shellArgs instanceof Array) { + this.shellArgs = shellSettings.shellArgs.splice(0); + } + } + console.log('Run in shell?', this.runInShell); + console.log('Shell exec', this.shellExecutable); + console.log('Shell args', this.shellArgs); + } + + // Is this native bash.exe? + // We inspect output from `bash.exe` and look for "msys" string. + // This tells us how we need to transform our file paths. + if (this.shellExecutable.toLowerCase().indexOf('bash.exe') !== -1) { + let inspectString = this.shellExecutable + ' --version'; + let that = this; + cp.exec(inspectString, function (error, stdout, stderr) { + console.log('Inspecting bash.exe shell executable version', inspectString, stdout); + if (stdout.toLowerCase().indexOf('msys') !== -1) { + that.isMsys = true; + } + }); + } + this.trigger = RunTrigger.from(section.get('validate.run', RunTrigger.strings.onSave)); } if (this.executableIsUserDefined !== true && this.workspaceStore.get(CheckedExecutablePath, undefined) !== void 0) { @@ -236,7 +295,7 @@ export default class PHPValidationProvider { } }; - let options = vscode.workspace.rootPath ? { cwd: vscode.workspace.rootPath } : undefined; + let options = vscode.workspace.rootPath ? { cwd: vscode.workspace.rootPath } : {}; let args: string[]; if (this.trigger === RunTrigger.onSave) { args = PHPValidationProvider.FileArgs.slice(0); @@ -244,6 +303,40 @@ export default class PHPValidationProvider { } else { args = PHPValidationProvider.BufferArgs; } + + // Are we validating with WSL? + if (this.runInShell) { + // Reset executable + let executableInShell = executable; + executable = this.shellExecutable; + + console.log('Orig args', args); + // Shell args + let executableArgs = args.slice(0); + + // If win32 and bash.exe, transform Windows file path to Linux file path + if (this.platform === 'win32' && executable.indexOf('bash.exe') !== -1) { + let windowsPath = executableArgs.pop(); + let linuxPath = ''; + if (this.isMsys) { + // Git Bash (msys) uses "/c/Users/..." filesystem mount + linuxPath = windowsPath.trim().replace(/^([a-zA-Z]):\\/, '/$1/').replace(/\\/g, '/'); + } else { + // WSL Bash uses "/mnt/c/Users/..." filesystem mount + linuxPath = windowsPath.trim().replace(/^([a-zA-Z]):\\/, '/mnt/$1/').replace(/\\/g, '/'); + } + executableArgs.push(linuxPath); + } + + // Finalize executable args + args = this.shellArgs.concat(['"', executableInShell, executableArgs.join(' '), '"']); + + console.log('Final args', args); + + // Node spawn with shell + options['shell'] = true; + } + try { let childProcess = cp.spawn(executable, args, options); childProcess.on('error', (error: Error) => { @@ -293,4 +386,4 @@ export default class PHPValidationProvider { } vscode.window.showInformationMessage(message); } -} \ No newline at end of file +} diff --git a/extensions/php/src/phpMain.ts b/extensions/php/src/phpMain.ts index dbf3d4462e538..13ec5bf614be6 100644 --- a/extensions/php/src/phpMain.ts +++ b/extensions/php/src/phpMain.ts @@ -4,14 +4,14 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; +import * as vscode from 'vscode'; +import * as nls from 'vscode-nls'; +nls.config({ locale: vscode.env.language }); + import PHPCompletionItemProvider from './features/completionItemProvider'; import PHPHoverProvider from './features/hoverProvider'; import PHPSignatureHelpProvider from './features/signatureHelpProvider'; import PHPValidationProvider from './features/validationProvider'; -import * as vscode from 'vscode'; - -import * as nls from 'vscode-nls'; -nls.config({ locale: vscode.env.language }); export function activate(context: vscode.ExtensionContext): any { diff --git a/extensions/php/syntaxes/php.tmLanguage.json b/extensions/php/syntaxes/php.tmLanguage.json index 9586638c4d2f7..8b457cf3c6f9c 100644 --- a/extensions/php/syntaxes/php.tmLanguage.json +++ b/extensions/php/syntaxes/php.tmLanguage.json @@ -1,4 +1,10 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-php/blob/master/grammars/php.cson", + "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/atom/language-php/commit/e1290265f3d68316347e0ab2665686016b4b24b7", "scopeName": "text.html.php", "name": "PHP", "fileTypes": [ @@ -20,7 +26,7 @@ "foldingStartMarker": "(/\\*|\\{\\s*$|<<))", @@ -40,14 +46,14 @@ "begin": "<\\?(?i:php|=)?", "beginCaptures": { "0": { - "name": "punctuation.section.embedded.begin.metatag.php" + "name": "punctuation.section.embedded.begin.php" } }, "contentName": "source.php", "end": "(\\?)>", "endCaptures": { "0": { - "name": "punctuation.section.embedded.end.metatag.php" + "name": "punctuation.section.embedded.end.php" }, "1": { "name": "source.php" @@ -66,14 +72,14 @@ "begin": "<\\?(?i:php|=)?(?![^?]*\\?>)", "beginCaptures": { "0": { - "name": "punctuation.section.embedded.begin.metatag.php" + "name": "punctuation.section.embedded.begin.php" } }, "contentName": "source.php", "end": "(\\?)>", "endCaptures": { "0": { - "name": "punctuation.section.embedded.end.metatag.php" + "name": "punctuation.section.embedded.end.php" }, "1": { "name": "source.php" @@ -90,13 +96,13 @@ "begin": "<\\?(?i:php|=)?", "beginCaptures": { "0": { - "name": "punctuation.section.embedded.begin.metatag.php" + "name": "punctuation.section.embedded.begin.php" } }, "end": ">", "endCaptures": { "0": { - "name": "punctuation.section.embedded.end.metatag.php" + "name": "punctuation.section.embedded.end.php" } }, "name": "meta.embedded.line.php", @@ -107,7 +113,7 @@ "name": "source.php" }, "2": { - "name": "punctuation.section.embedded.end.metatag.php" + "name": "punctuation.section.embedded.end.php" }, "3": { "name": "source.php" @@ -122,7 +128,7 @@ "end": "(\\?)(?=>)", "endCaptures": { "0": { - "name": "punctuation.section.embedded.end.metatag.php" + "name": "punctuation.section.embedded.end.php" }, "1": { "name": "source.php" @@ -145,16 +151,137 @@ } ], "repository": { + "class-body": { + "patterns": [ + { + "match": "(?xi)\n\\b(use)\\s+\n([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\n((?:\\s*,\\s*[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)*)\n(?=\\s*;)", + "name": "meta.use.php", + "captures": { + "1": { + "name": "keyword.other.use.php" + }, + "2": { + "name": "support.class.php" + }, + "3": { + "patterns": [ + { + "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", + "name": "support.class.php" + }, + { + "match": ",", + "name": "punctuation.separator.delimiter.php" + } + ] + } + } + }, + { + "begin": "(?i)\\buse\\b", + "beginCaptures": { + "0": { + "name": "keyword.other.use.php" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.use.end.bracket.curly.php" + } + }, + "name": "meta.use.php", + "patterns": [ + { + "match": "(?xi)\n([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\n((?:\\s*,\\s*[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)*)", + "captures": { + "1": { + "name": "support.class.php" + }, + "2": { + "patterns": [ + { + "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", + "name": "support.class.php" + }, + { + "match": ",", + "name": "punctuation.separator.delimiter.php" + } + ] + } + } + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.use.begin.bracket.curly.php" + } + }, + "end": "(?=})", + "contentName": "meta.use.body.php", + "patterns": [ + { + "include": "#scope-resolution" + }, + { + "match": "(?xi)\n\\b(as)\\s+\n([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\\b # Visibility modifier OR alias\n(?:\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*))? # alias", + "captures": { + "1": { + "name": "keyword.other.use-as.php" + }, + "2": { + "patterns": [ + { + "match": "\\b(final|abstract|public|private|protected|static)\\b", + "name": "storage.modifier.php" + }, + { + "match": "[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", + "name": "entity.other.alias.php" + } + ] + }, + "3": { + "name": "entity.other.alias.php" + } + } + }, + { + "match": "(?i)\\b(insteadof)\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)", + "captures": { + "1": { + "name": "keyword.other.use-insteadof.php" + }, + "2": { + "name": "support.class.php" + } + } + }, + { + "match": ";", + "name": "punctuation.terminator.expression.php" + } + ] + } + ] + }, + { + "include": "#language" + } + ] + }, "class-builtin": { "patterns": [ { + "match": "(?xi)\n(\\\\)?\\b\n((APC|Append)Iterator|Array(Access|Iterator|Object)\n|Bad(Function|Method)CallException\n|(Caching|CallbackFilter)Iterator|Collator|Collectable|Cond|Countable|CURLFile\n|Date(Interval|Period|Time(Interface|Immutable|Zone)?)?|Directory(Iterator)?|DomainException\n|DOM(Attr|CdataSection|CharacterData|Comment|Document(Fragment)?|Element|EntityReference\n |Implementation|NamedNodeMap|Node(list)?|ProcessingInstruction|Text|XPath)\n|(Error)?Exception|EmptyIterator\n|finfo\n|Ev(Check|Child|Embed|Fork|Idle|Io|Loop|Periodic|Prepare|Signal|Stat|Timer|Watcher)?\n|Event(Base|Buffer(Event)?|SslContext|Http(Request|Connection)?|Config|DnsBase|Util|Listener)?\n|FANNConnection|(Filter|Filesystem)Iterator\n|Gender\\\\Gender|GlobIterator|Gmagick(Draw|Pixel)?\n|Haru(Annotation|Destination|Doc|Encoder|Font|Image|Outline|Page)\n|Http((Inflate|Deflate)?Stream|Message|Request(Pool)?|Response|QueryString)\n|HRTime\\\\(PerformanceCounter|StopWatch)\n|Intl(Calendar|((CodePoint|RuleBased)?Break|Parts)?Iterator|DateFormatter|TimeZone)\n|Imagick(Draw|Pixel(Iterator)?)?\n|InfiniteIterator|InvalidArgumentException|Iterator(Aggregate|Iterator)?\n|JsonSerializable\n|KTaglib_(MPEG_(File|AudioProperties)|Tag|ID3v2_(Tag|(AttachedPicture)?Frame))\n|Lapack|(Length|Locale|Logic)Exception|LimitIterator|Lua(Closure)?\n|Mongo(BinData|Client|Code|Collection|CommandCursor|Cursor(Exception)?|Date|DB(Ref)?|DeleteBatch\n |Grid(FS(Cursor|File)?)|Id|InsertBatch|Int(32|64)|Log|Pool|Regex|ResultException|Timestamp\n |UpdateBatch|Write(Batch|ConcernException))?\n|Memcache(d)?|MessageFormatter|MultipleIterator|Mutex\n|mysqli(_(driver|stmt|warning|result))?\n|MysqlndUh(Connection|PreparedStatement)\n|NoRewindIterator|Normalizer|NumberFormatter\n|OCI-(Collection|Lob)|OuterIterator|(OutOf(Bounds|Range)|Overflow)Exception\n|ParentIterator|PDO(Statement)?|Phar(Data|FileInfo)?|php_user_filter|Pool\n|QuickHash(Int(Set|StringHash)|StringIntHash)\n|Recursive(Array|Caching|Directory|Fallback|Filter|Iterator|Regex|Tree)?Iterator\n|Reflection(Class|Function(Abstract)?|Method|Object|Parameter|Property|(Zend)?Extension)?\n|RangeException|Reflector|RegexIterator|ResourceBundle|RuntimeException|RRD(Creator|Graph|Updater)\n|SAM(Connection|Message)|SCA(_(SoapProxy|LocalProxy))?\n|SDO_(DAS_(ChangeSummary|Data(Factory|Object)|Relational|Setting|XML(_Document)?)\n |Data(Factory|Object)|Exception|List|Model_(Property|ReflectionDataObject|Type)|Sequence)\n|SeekableIterator|Serializable|SessionHandler(Interface)?|SimpleXML(Iterator|Element)|SNMP\n|Soap(Client|Fault|Header|Param|Server|Var)\n|SphinxClient|Spoofchecker\n|Spl(DoublyLinkedList|Enum|File(Info|Object)|FixedArray|(Max|Min)?Heap|Observer|ObjectStorage\n |(Priority)?Queue|Stack|Subject|Type|TempFileObject)\n|SQLite(3(Result|Stmt)?|Database|Result|Unbuffered)\n|stdClass|streamWrapper|SVM(Model)?|Swish(Result(s)?|Search)?|Sync(Event|Mutex|ReaderWriter|Semaphore)\n|Thread(ed)?|tidy(Node)?|TokyoTyrant(Table|Iterator|Query)?|Transliterator|Traversable\n|UConverter|(Underflow|UnexpectedValue)Exception\n|V8Js(Exception)?|Varnish(Admin|Log|Stat)\n|Worker|Weak(Map|Ref)\n|XML(Diff\\\\(Base|DOM|File|Memory)|Reader|Writer)|XsltProcessor\n|Yaf_(Route_(Interface|Map|Regex|Rewrite|Simple|Supervar)\n |Action_Abstract|Application|Config_(Simple|Ini|Abstract)|Controller_Abstract\n |Dispatcher|Exception|Loader|Plugin_Abstract|Registry|Request_(Abstract|Simple|Http)\n |Response_Abstract|Router|Session|View_(Simple|Interface))\n|Yar_(Client(_Exception)?|Concurrent_Client|Server(_Exception)?)\n|ZipArchive|ZMQ(Context|Device|Poll|Socket)?)\n\\b", + "name": "support.class.builtin.php", "captures": { "1": { "name": "punctuation.separator.inheritance.php" } - }, - "match": "(?i)(\\\\)?\\b(st(dClass|reamWrapper)|R(RD(Graph|Creator|Updater)|untimeException|e(sourceBundle|cursive(RegexIterator|Ca(chingIterator|llbackFilterIterator)|TreeIterator|Iterator(Iterator)?|DirectoryIterator|FilterIterator|ArrayIterator)|flect(ion(Method|Class|ZendExtension|Object|P(arameter|roperty)|Extension|Function(Abstract)?)?|or)|gexIterator)|angeException)|G(ender\\Gender|lobIterator|magick(Draw|Pixel)?)|X(sltProcessor|ML(Reader|Diff\\\\(Memory|Base|DOM|File)|Writer)|SLTProcessor)|M(ysqlndUh(Connection|PreparedStatement)|ongo(Re(sultException|gex)|Grid(fsFile|FS(Cursor|File)?)|BinData|C(o(de|llection|mmandCursor)|ursor(Exception)?|lient)|Timestamp|I(n(sertBatch|t(32|64))|d)|D(B(Ref)?|eleteBatch|ate)|UpdateBatch|Pool|Write(Batch|ConcernException)|Log)?|u(tex|ltipleIterator)|e(ssageFormatter|mcache(d)?))|Bad(MethodCallException|FunctionCallException)|tidy(Node)?|S(ync(ReaderWriter|Mutex|Semaphore|Event)|impleXML(Iterator|Element)|oap(Server|Header|Client|Param|Var|Fault)|NMP|CA(_(SoapProxy|LocalProxy))?|p(hinxClient|oofchecker|l(M(inHeap|axHeap)|S(tack|ubject)|Heap|T(ype|empFileObject)|Ob(server|jectStorage)|DoublyLinkedList|PriorityQueue|Enum|Queue|Fi(le(Info|Object)|xedArray)))|e(ssionHandler(Interface)?|ekableIterator|rializable)|DO_(Model_(ReflectionDataObject|Type|Property)|Sequence|D(ata(Object|Factory)|AS_(Relational|XML(_Document)?|Setting|ChangeSummary|Data(Object|Factory)))|Exception|List)|wish(Result(s)?|Search)?|VM(Model)?|QLite(Result|3(Result|Stmt)?|Database|Unbuffered)|AM(Message|Connection))|H(RTime\\\\(StopWatch|PerformanceCounter)|ttp(Re(sponse|quest(Pool)?)|Message|InflateStream|DeflateStream|QueryString)|aru(Image|Outline|D(oc|estination)|Page|Encoder|Font|Annotation))|Ya(f_(R(oute(_(Re(write|gex)|Map|S(tatic|imple|upervar)|Interface)|r)|e(sponse_Abstract|quest_(Simple|Http|Abstract)|gistry))|Session|Con(troller_Abstract|fig_(Simple|Ini|Abstract))|Dispatcher|Plugin_Abstract|Exception|View_(Simple|Interface)|Loader|A(ction_Abstract|pplication))|r_(Server(_Exception)?|C(oncurrent_Client|lient(_Exception)?)))|N(o(RewindIterator|rmalizer)|umberFormatter)|C(o(nd|untable|ll(ectable|ator))|URLFile|a(chingIterator|llbackFilterIterator))|T(hread(ed)?|okyoTyrant(Table|Iterator|Query)?|ra(nsliterator|versable))|I(n(tl(RuleBasedBreakIterator|BreakIterator|C(odePointBreakIterator|alendar)|TimeZone|Iterator|DateFormatter|PartsIterator)|validArgumentException|finiteIterator)|terator(Iterator|Aggregate)?|magick(Draw|Pixel(Iterator)?)?)|php_user_filter|Z(MQ(Socket|Context|Device|Poll)?|ipArchive)|O(CI-(Collection|Lob)|ut(erIterator|Of(RangeException|BoundsException))|verflowException)|D(irectory(Iterator)?|omainException|OM(XPath|N(ode(list)?|amedNodeMap)|C(haracterData|omment|dataSection)|Text|Implementation|Document(Fragment)?|ProcessingInstruction|E(ntityReference|lement)|Attr)|ate(Time(I(nterface|mmutable)|Zone)?|Interval|Period))|U(n(derflowException|expectedValueException)|Converter)|JsonSerializable|finfo|P(har(Data|FileInfo)?|ool|DO(Statement)?|arentIterator)|E(v(S(tat|ignal)|Ch(ild|eck)|Timer|I(o|dle)|ent(B(uffer(Event)?|ase)|SslContext|Http(Request|Connection)?|Config|DnsBase|Util|Listener)?|P(eriodic|repare)|Embed|Fork|Watcher|Loop)?|rrorException|xception|mptyIterator)|V(8Js(Exception)?|arnish(Stat|Log|Admin))|KTaglib_(MPEG_(File|AudioProperties)|Tag|ID3v2_(Tag|Frame|AttachedPictureFrame))|QuickHash(StringIntHash|Int(S(tringHash|et)|Hash))|F(il(terIterator|esystemIterator)|ANNConnection)|mysqli(_(stmt|driver|warning|result))?|W(orker|eak(Map|ref))|L(imitIterator|o(cale|gicException)|ua(Closure)?|engthException|apack)|A(ppendIterator|PCIterator|rray(Iterator|Object|Access)))\\b", - "name": "support.class.builtin.php" + } } ] }, @@ -196,14 +323,18 @@ "comments": { "patterns": [ { - "begin": "/\\*\\*(?:#@\\+)?\\s*$", - "captures": { + "begin": "/\\*\\*(?=\\s)", + "beginCaptures": { "0": { "name": "punctuation.definition.comment.php" } }, - "comment": "This now only highlights a docblock if the first line contains only /**\n\t\t\t\t\t\t\t\t- this is to stop highlighting everything as invalid when people do comment banners with /******** ...\n\t\t\t\t\t\t\t\t- Now matches /**#@+ too - used for docblock templates: http://manual.phpdoc.org/HTMLframesConverter/default/phpDocumentor/tutorial_phpDocumentor.howto.pkg.html#basics.docblocktemplate", "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.php" + } + }, "name": "comment.block.documentation.phpdoc.php", "patterns": [ { @@ -222,7 +353,7 @@ "name": "comment.block.php" }, { - "begin": "(^[ \\t]+)?(?=//)", + "begin": "(^\\s+)?(?=//)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.php" @@ -243,7 +374,7 @@ ] }, { - "begin": "(^[ \\t]+)?(?=#)", + "begin": "(^\\s+)?(?=#)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.php" @@ -268,88 +399,67 @@ "constants": { "patterns": [ { - "begin": "(?xi)(?=\n\t\t\t (\n\t\t\t (\\\\[a-z_][a-z_0-9]*\\\\[a-z_][a-z_0-9\\\\]*)|\n\t\t\t ([a-z_][a-z_0-9]*\\\\[a-z_][a-z_0-9\\\\]*)\n\t\t\t )\n\t\t\t [^a-z_0-9\\\\])", - "end": "(?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\\\])", - "endCaptures": { + "match": "(?i)\\b(TRUE|FALSE|NULL|__(FILE|DIR|FUNCTION|CLASS|METHOD|LINE|NAMESPACE)__|ON|OFF|YES|NO|NL|BR|TAB)\\b", + "name": "constant.language.php" + }, + { + "match": "(?x)\n(\\\\)?\\b\n(DEFAULT_INCLUDE_PATH\n|EAR_(INSTALL|EXTENSION)_DIR\n|E_(ALL|COMPILE_(ERROR|WARNING)|CORE_(ERROR|WARNING)|DEPRECATED|ERROR|NOTICE\n |PARSE|RECOVERABLE_ERROR|STRICT|USER_(DEPRECATED|ERROR|NOTICE|WARNING)|WARNING)\n|PHP_(ROUND_HALF_(DOWN|EVEN|ODD|UP)|(MAJOR|MINOR|RELEASE)_VERSION|MAXPATHLEN\n |BINDIR|SHLIB_SUFFIX|SYSCONFDIR|SAPI|CONFIG_FILE_(PATH|SCAN_DIR)\n |INT_(MAX|SIZE)|ZTS|OS|OUTPUT_HANDLER_(START|CONT|END)|DEBUG|DATADIR\n |URL_(SCHEME|HOST|USER|PORT|PASS|PATH|QUERY|FRAGMENT)|PREFIX\n |EXTRA_VERSION|EXTENSION_DIR|EOL|VERSION(_ID)?\n |WINDOWS_(NT_(SERVER|DOMAIN_CONTROLLER|WORKSTATION)\n |VERSION_(MAJOR|MINOR)|BUILD|SUITEMASK|SP_(MAJOR|MINOR)\n |PRODUCTTYPE|PLATFORM)\n |LIBDIR|LOCALSTATEDIR)\n|STD(ERR|IN|OUT)|ZEND_(DEBUG_BUILD|THREAD_SAFE))\n\\b", + "name": "support.constant.core.php", + "captures": { "1": { - "name": "constant.other.php" + "name": "punctuation.separator.inheritance.php" } - }, - "patterns": [ - { - "include": "#namespace" + } + }, + { + "match": "(?x)\n(\\\\)?\\b\n(__COMPILER_HALT_OFFSET__|AB(MON_(1|2|3|4|5|6|7|8|9|10|11|12)|DAY[1-7])\n|AM_STR|ASSERT_(ACTIVE|BAIL|CALLBACK_QUIET_EVAL|WARNING)|ALT_DIGITS\n|CASE_(UPPER|LOWER)|CHAR_MAX|CONNECTION_(ABORTED|NORMAL|TIMEOUT)|CODESET|COUNT_(NORMAL|RECURSIVE)\n|CREDITS_(ALL|DOCS|FULLPAGE|GENERAL|GROUP|MODULES|QA|SAPI)\n|CRYPT_(BLOWFISH|EXT_DES|MD5|SHA(256|512)|SALT_LENGTH|STD_DES)|CURRENCY_SYMBOL\n|D_(T_)?FMT|DATE_(ATOM|COOKIE|ISO8601|RFC(822|850|1036|1123|2822|3339)|RSS|W3C)\n|DAY_[1-7]|DECIMAL_POINT|DIRECTORY_SEPARATOR\n|ENT_(COMPAT|IGNORE|(NO)?QUOTES)|EXTR_(IF_EXISTS|OVERWRITE|PREFIX_(ALL|IF_EXISTS|INVALID|SAME)|REFS|SKIP)\n|ERA(_(D_(T_)?FMT)|T_FMT|YEAR)?|FRAC_DIGITS|GROUPING|HASH_HMAC|HTML_(ENTITIES|SPECIALCHARS)\n|INF|INFO_(ALL|CREDITS|CONFIGURATION|ENVIRONMENT|GENERAL|LICENSEMODULES|VARIABLES)\n|INI_(ALL|CANNER_(NORMAL|RAW)|PERDIR|SYSTEM|USER)|INT_(CURR_SYMBOL|FRAC_DIGITS)\n|LC_(ALL|COLLATE|CTYPE|MESSAGES|MONETARY|NUMERIC|TIME)|LOCK_(EX|NB|SH|UN)\n|LOG_(ALERT|AUTH(PRIV)?|CRIT|CRON|CONS|DAEMON|DEBUG|EMERG|ERR|INFO|LOCAL[1-7]|LPR|KERN|MAIL\n |NEWS|NODELAY|NOTICE|NOWAIT|ODELAY|PID|PERROR|WARNING|SYSLOG|UCP|USER)\n|M_(1_PI|SQRT(1_2|2|3|PI)|2_(SQRT)?PI|PI(_(2|4))?|E(ULER)?|LN(10|2|PI)|LOG(10|2)E)\n|MON_(1|2|3|4|5|6|7|8|9|10|11|12|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)\n|N_(CS_PRECEDES|SEP_BY_SPACE|SIGN_POSN)|NAN|NEGATIVE_SIGN|NO(EXPR|STR)\n|P_(CS_PRECEDES|SEP_BY_SPACE|SIGN_POSN)|PM_STR|POSITIVE_SIGN\n|PATH(_SEPARATOR|INFO_(EXTENSION|(BASE|DIR|FILE)NAME))|RADIXCHAR\n|SEEK_(CUR|END|SET)|SORT_(ASC|DESC|LOCALE_STRING|REGULAR|STRING)|STR_PAD_(BOTH|LEFT|RIGHT)\n|T_FMT(_AMPM)?|THOUSEP|THOUSANDS_SEP\n|UPLOAD_ERR_(CANT_WRITE|EXTENSION|(FORM|INI)_SIZE|NO_(FILE|TMP_DIR)|OK|PARTIAL)\n|YES(EXPR|STR))\n\\b", + "name": "support.constant.std.php", + "captures": { + "1": { + "name": "punctuation.separator.inheritance.php" } - ] + } }, { - "begin": "(?=\\\\?[a-zA-Z_\\x{7f}-\\x{ff}])", - "end": "(?=[^\\\\a-zA-Z_\\x{7f}-\\x{ff}])", - "patterns": [ - { - "match": "(?i)\\b(TRUE|FALSE|NULL|__(FILE|DIR|FUNCTION|CLASS|METHOD|LINE|NAMESPACE)__|ON|OFF|YES|NO|NL|BR|TAB)\\b", - "name": "constant.language.php" - }, - { - "captures": { - "1": { - "name": "punctuation.separator.inheritance.php" - } - }, - "match": "(\\\\)?\\b(STD(IN|OUT|ERR)|ZEND_(THREAD_SAFE|DEBUG_BUILD)|DEFAULT_INCLUDE_PATH|P(HP_(R(OUND_HALF_(ODD|DOWN|UP|EVEN)|ELEASE_VERSION)|M(INOR_VERSION|A(XPATHLEN|JOR_VERSION))|BINDIR|S(HLIB_SUFFIX|YSCONFDIR|API)|CONFIG_FILE_(SCAN_DIR|PATH)|INT_(MAX|SIZE)|ZTS|O(S|UTPUT_HANDLER_(START|CONT|END))|D(EBUG|ATADIR)|URL_(SCHEME|HOST|USER|P(ORT|A(SS|TH))|QUERY|FRAGMENT)|PREFIX|E(XT(RA_VERSION|ENSION_DIR)|OL)|VERSION(_ID)?|WINDOWS_(NT_(SERVER|DOMAIN_CONTROLLER|WORKSTATION)|VERSION_(M(INOR|AJOR)|BUILD|S(UITEMASK|P_M(INOR|AJOR))|P(RODUCTTYPE|LATFORM)))|L(IBDIR|OCALSTATEDIR))|EAR_(INSTALL_DIR|EXTENSION_DIR))|E_(RECOVERABLE_ERROR|STRICT|NOTICE|CO(RE_(ERROR|WARNING)|MPILE_(ERROR|WARNING))|DEPRECATED|USER_(NOTICE|DEPRECATED|ERROR|WARNING)|PARSE|ERROR|WARNING|ALL))\\b", - "name": "support.constant.core.php" - }, - { - "captures": { - "1": { - "name": "punctuation.separator.inheritance.php" - } - }, - "match": "(\\\\)?\\b(RADIXCHAR|GROUPING|M(_(1_PI|SQRT(1_2|2|3|PI)|2_(SQRTPI|PI)|PI(_(2|4))?|E(ULER)?|L(N(10|2|PI)|OG(10E|2E)))|ON_(GROUPING|1(1|2|0)?|7|2|8|THOUSANDS_SEP|3|DECIMAL_POINT|9|4|5|6))|S(TR_PAD_(RIGHT|BOTH|LEFT)|ORT_(REGULAR|STRING|NUMERIC|DESC|LOCALE_STRING|ASC)|EEK_(SET|CUR|END))|H(TML_(SPECIALCHARS|ENTITIES)|ASH_HMAC)|YES(STR|EXPR)|N(_(S(IGN_POSN|EP_BY_SPACE)|CS_PRECEDES)|O(STR|EXPR)|EGATIVE_SIGN|AN)|C(R(YPT_(MD5|BLOWFISH|S(HA(256|512)|TD_DES|ALT_LENGTH)|EXT_DES)|NCYSTR|EDITS_(G(ROUP|ENERAL)|MODULES|SAPI|DOCS|QA|FULLPAGE|ALL))|HAR_MAX|O(NNECTION_(NORMAL|TIMEOUT|ABORTED)|DESET|UNT_(RECURSIVE|NORMAL))|URRENCY_SYMBOL|ASE_(UPPER|LOWER))|__COMPILER_HALT_OFFSET__|T(HOUS(EP|ANDS_SEP)|_FMT(_AMPM)?)|IN(T_(CURR_SYMBOL|FRAC_DIGITS)|I_(S(YSTEM|CANNER_(RAW|NORMAL))|USER|PERDIR|ALL)|F(O_(GENERAL|MODULES|C(REDITS|ONFIGURATION)|ENVIRONMENT|VARIABLES|LICENSE|ALL))?)|D(_(T_FMT|FMT)|IRECTORY_SEPARATOR|ECIMAL_POINT|A(Y_(1|7|2|3|4|5|6)|TE_(R(SS|FC(1(123|036)|2822|8(22|50)|3339))|COOKIE|ISO8601|W3C|ATOM)))|UPLOAD_ERR_(NO_(TMP_DIR|FILE)|CANT_WRITE|INI_SIZE|OK|PARTIAL|EXTENSION|FORM_SIZE)|P(M_STR|_(S(IGN_POSN|EP_BY_SPACE)|CS_PRECEDES)|OSITIVE_SIGN|ATH(_SEPARATOR|INFO_(BASENAME|DIRNAME|EXTENSION|FILENAME)))|E(RA(_(YEAR|T_FMT|D_(T_FMT|FMT)))?|XTR_(REFS|SKIP|IF_EXISTS|OVERWRITE|PREFIX_(SAME|I(NVALID|F_EXISTS)|ALL))|NT_(NOQUOTES|COMPAT|IGNORE|QUOTES))|FRAC_DIGITS|L(C_(M(ONETARY|ESSAGES)|NUMERIC|C(TYPE|OLLATE)|TIME|ALL)|O(G_(MAIL|SYSLOG|N(O(TICE|WAIT)|DELAY|EWS)|C(R(IT|ON)|ONS)|INFO|ODELAY|D(EBUG|AEMON)|U(SER|UCP)|P(ID|ERROR)|E(RR|MERG)|KERN|WARNING|L(OCAL(1|7|2|3|4|5|0|6)|PR)|A(UTH(PRIV)?|LERT))|CK_(SH|NB|UN|EX)))|A(M_STR|B(MON_(1(1|2|0)?|7|2|8|3|9|4|5|6)|DAY_(1|7|2|3|4|5|6))|SSERT_(BAIL|CALLBACK|QUIET_EVAL|WARNING|ACTIVE)|LT_DIGITS))\\b", - "name": "support.constant.std.php" - }, - { - "captures": { - "1": { - "name": "punctuation.separator.inheritance.php" - } - }, - "match": "(\\\\)?\\b(GLOB_(MARK|BRACE|NO(SORT|CHECK|ESCAPE)|ONLYDIR|ERR|AVAILABLE_FLAGS)|XML_(SAX_IMPL|HTML_DOCUMENT_NODE|N(OTATION_NODE|AMESPACE_DECL_NODE)|C(OMMENT_NODE|DATA_SECTION_NODE)|TEXT_NODE|OPTION_(SKIP_(TAGSTART|WHITE)|CASE_FOLDING|TARGET_ENCODING)|D(TD_NODE|OCUMENT_(NODE|TYPE_NODE|FRAG_NODE))|PI_NODE|E(RROR_(RECURSIVE_ENTITY_REF|MISPLACED_XML_PI|B(INARY_ENTITY_REF|AD_CHAR_REF)|SYNTAX|NO(NE|_(MEMORY|ELEMENTS))|TAG_MISMATCH|IN(CORRECT_ENCODING|VALID_TOKEN)|DUPLICATE_ATTRIBUTE|UN(CLOSED_(CDATA_SECTION|TOKEN)|DEFINED_ENTITY|KNOWN_ENCODING)|JUNK_AFTER_DOC_ELEMENT|PAR(TIAL_CHAR|AM_ENTITY_REF)|EXTERNAL_ENTITY_HANDLING|A(SYNC_ENTITY|TTRIBUTE_EXTERNAL_ENTITY_REF))|NTITY_(REF_NODE|NODE|DECL_NODE)|LEMENT_(NODE|DECL_NODE))|LOCAL_NAMESPACE|ATTRIBUTE_(N(MTOKEN(S)?|O(TATION|DE))|CDATA|ID(REF(S)?)?|DECL_NODE|EN(TITY|UMERATION)))|M(HASH_(RIPEMD(1(28|60)|256|320)|GOST|MD(2|4|5)|S(HA(1|2(24|56)|384|512)|NEFRU256)|HAVAL(1(28|92|60)|2(24|56))|CRC32(B)?|TIGER(1(28|60))?|WHIRLPOOL|ADLER32)|YSQL(_(BOTH|NUM|CLIENT_(SSL|COMPRESS|I(GNORE_SPACE|NTERACTIVE))|ASSOC)|I_(RE(PORT_(STRICT|INDEX|OFF|ERROR|ALL)|FRESH_(GRANT|MASTER|BACKUP_LOG|S(TATUS|LAVE)|HOSTS|T(HREADS|ABLES)|LOG)|AD_DEFAULT_(GROUP|FILE))|GROUP_FLAG|MULTIPLE_KEY_FLAG|B(INARY_FLAG|OTH|LOB_FLAG)|S(T(MT_ATTR_(CURSOR_TYPE|UPDATE_MAX_LENGTH|PREFETCH_ROWS)|ORE_RESULT)|E(RVER_QUERY_(NO_(GOOD_INDEX_USED|INDEX_USED)|WAS_SLOW)|T_(CHARSET_NAME|FLAG)))|N(O(_D(EFAULT_VALUE_FLAG|ATA)|T_NULL_FLAG)|UM(_FLAG)?)|C(URSOR_TYPE_(READ_ONLY|SCROLLABLE|NO_CURSOR|FOR_UPDATE)|LIENT_(SSL|NO_SCHEMA|COMPRESS|I(GNORE_SPACE|NTERACTIVE)|FOUND_ROWS))|T(YPE_(GEOMETRY|MEDIUM_BLOB|B(IT|LOB)|S(HORT|TRING|ET)|YEAR|N(ULL|EWD(ECIMAL|ATE))|CHAR|TI(ME(STAMP)?|NY(_BLOB)?)|INT(24|ERVAL)|D(OUBLE|ECIMAL|ATE(TIME)?)|ENUM|VAR_STRING|FLOAT|LONG(_BLOB|LONG)?)|IMESTAMP_FLAG)|INIT_COMMAND|ZEROFILL_FLAG|O(N_UPDATE_NOW_FLAG|PT_(NET_(READ_BUFFER_SIZE|CMD_BUFFER_SIZE)|CONNECT_TIMEOUT|INT_AND_FLOAT_NATIVE|LOCAL_INFILE))|D(EBUG_TRACE_ENABLED|ATA_TRUNCATED)|U(SE_RESULT|N(SIGNED_FLAG|IQUE_KEY_FLAG))|P(RI_KEY_FLAG|ART_KEY_FLAG)|ENUM_FLAG|A(S(SOC|YNC)|UTO_INCREMENT_FLAG)))|CRYPT_(R(C(2|6)|IJNDAEL_(1(28|92)|256)|AND)|GOST|XTEA|M(ODE_(STREAM|NOFB|C(BC|FB)|OFB|ECB)|ARS)|BLOWFISH(_COMPAT)?|S(ERPENT|KIPJACK|AFER(128|PLUS|64))|C(RYPT|AST_(128|256))|T(RIPLEDES|HREEWAY|WOFISH)|IDEA|3DES|DE(S|CRYPT|V_(RANDOM|URANDOM))|PANAMA|EN(CRYPT|IGNA)|WAKE|LOKI97|ARCFOUR(_IV)?))|S(TREAM_(REPORT_ERRORS|M(UST_SEEK|KDIR_RECURSIVE)|BUFFER_(NONE|FULL|LINE)|S(HUT_(RD(WR)?|WR)|OCK_(R(DM|AW)|S(TREAM|EQPACKET)|DGRAM)|ERVER_(BIND|LISTEN))|NOTIFY_(RE(SOLVE|DIRECTED)|MIME_TYPE_IS|SEVERITY_(INFO|ERR|WARN)|CO(MPLETED|NNECT)|PROGRESS|F(ILE_SIZE_IS|AILURE)|AUTH_RE(SULT|QUIRED))|C(RYPTO_METHOD_(SSLv(2(_(SERVER|CLIENT)|3_(SERVER|CLIENT))|3_(SERVER|CLIENT))|TLS_(SERVER|CLIENT))|LIENT_(CONNECT|PERSISTENT|ASYNC_CONNECT)|AST_(FOR_SELECT|AS_STREAM))|I(GNORE_URL|S_URL|PPROTO_(RAW|TCP|I(CMP|P)|UDP))|O(OB|PTION_(READ_(BUFFER|TIMEOUT)|BLOCKING|WRITE_BUFFER))|U(RL_STAT_(QUIET|LINK)|SE_PATH)|P(EEK|F_(INET(6)?|UNIX))|ENFORCE_SAFE_MODE|FILTER_(READ|WRITE|ALL))|UNFUNCS_RET_(STRING|TIMESTAMP|DOUBLE)|QLITE(_(R(OW|EADONLY)|MIS(MATCH|USE)|B(OTH|USY)|SCHEMA|N(O(MEM|T(FOUND|ADB)|LFS)|UM)|C(O(RRUPT|NSTRAINT)|ANTOPEN)|TOOBIG|I(NTER(RUPT|NAL)|OERR)|OK|DONE|P(ROTOCOL|ERM)|E(RROR|MPTY)|F(ORMAT|ULL)|LOCKED|A(BORT|SSOC|UTH))|3_(B(OTH|LOB)|NU(M|LL)|TEXT|INTEGER|OPEN_(READ(ONLY|WRITE)|CREATE)|FLOAT|ASSOC)))|CURL(M(SG_DONE|_(BAD_(HANDLE|EASY_HANDLE)|CALL_MULTI_PERFORM|INTERNAL_ERROR|O(UT_OF_MEMORY|K)))|SSH_AUTH_(HOST|NONE|DEFAULT|P(UBLICKEY|ASSWORD)|KEYBOARD)|CLOSEPOLICY_(SLOWEST|CALLBACK|OLDEST|LEAST_(RECENTLY_USED|TRAFFIC))|_(HTTP_VERSION_(1_(1|0)|NONE)|NETRC_(REQUIRED|IGNORED|OPTIONAL)|TIMECOND_(IF(MODSINCE|UNMODSINCE)|LASTMOD)|IPRESOLVE_(V(4|6)|WHATEVER)|VERSION_(SSL|IPV6|KERBEROS4|LIBZ))|INFO_(RE(DIRECT_(COUNT|TIME)|QUEST_SIZE)|S(SL_VERIFYRESULT|TARTTRANSFER_TIME|IZE_(DOWNLOAD|UPLOAD)|PEED_(DOWNLOAD|UPLOAD))|H(TTP_CODE|EADER_(SIZE|OUT))|NAMELOOKUP_TIME|C(ON(NECT_TIME|TENT_(TYPE|LENGTH_(DOWNLOAD|UPLOAD)))|ERTINFO)|TOTAL_TIME|PR(IVATE|ETRANSFER_TIME)|EFFECTIVE_URL|FILETIME)|OPT_(R(E(SUME_FROM|TURNTRANSFER|DIR_PROTOCOLS|FERER|AD(DATA|FUNCTION))|AN(GE|DOM_FILE))|MAX(REDIRS|CONNECTS)|B(INARYTRANSFER|UFFERSIZE)|S(S(H_(HOST_PUBLIC_KEY_MD5|P(RIVATE_KEYFILE|UBLIC_KEYFILE)|AUTH_TYPES)|L(CERT(TYPE|PASSWD)?|_(CIPHER_LIST|VERIFY(HOST|PEER))|ENGINE(_DEFAULT)?|VERSION|KEY(TYPE|PASSWD)?))|TDERR)|H(TTP(GET|HEADER|200ALIASES|_VERSION|PROXYTUNNEL|AUTH)|EADER(FUNCTION)?)|N(O(BODY|SIGNAL|PROGRESS)|ETRC)|C(RLF|O(NNECTTIMEOUT(_MS)?|OKIE(SESSION|JAR|FILE)?)|USTOMREQUEST|ERTINFO|LOSEPOLICY|A(INFO|PATH))|T(RANSFERTEXT|CP_NODELAY|IME(CONDITION|OUT(_MS)?|VALUE))|I(N(TERFACE|FILE(SIZE)?)|PRESOLVE)|DNS_(CACHE_TIMEOUT|USE_GLOBAL_CACHE)|U(RL|SER(PWD|AGENT)|NRESTRICTED_AUTH|PLOAD)|P(R(IVATE|O(GRESSFUNCTION|XY(TYPE|USERPWD|PORT|AUTH)?|TOCOLS))|O(RT|ST(REDIR|QUOTE|FIELDS)?)|UT)|E(GDSOCKET|NCODING)|VERBOSE|K(RB4LEVEL|EYPASSWD)|QUOTE|F(RESH_CONNECT|TP(SSLAUTH|_(S(SL|KIP_PASV_IP)|CREATE_MISSING_DIRS|USE_EP(RT|SV)|FILEMETHOD)|PORT|LISTONLY|APPEND)|ILE(TIME)?|O(RBID_REUSE|LLOWLOCATION)|AILONERROR)|WRITE(HEADER|FUNCTION)|LOW_SPEED_(TIME|LIMIT)|AUTOREFERER)|PRO(XY_(SOCKS(4|5)|HTTP)|TO_(S(CP|FTP)|HTTP(S)?|T(ELNET|FTP)|DICT|F(TP(S)?|ILE)|LDAP(S)?|ALL))|E_(RE(CV_ERROR|AD_ERROR)|GOT_NOTHING|MALFORMAT_USER|BAD_(C(ONTENT_ENCODING|ALLING_ORDER)|PASSWORD_ENTERED|FUNCTION_ARGUMENT)|S(S(H|L_(C(IPHER|ONNECT_ERROR|ERTPROBLEM|ACERT)|PEER_CERTIFICATE|ENGINE_(SETFAILED|NOTFOUND)))|HARE_IN_USE|END_ERROR)|HTTP_(RANGE_ERROR|NOT_FOUND|PO(RT_FAILED|ST_ERROR))|COULDNT_(RESOLVE_(HOST|PROXY)|CONNECT)|T(OO_MANY_REDIRECTS|ELNET_OPTION_SYNTAX)|O(BSOLETE|UT_OF_MEMORY|PERATION_TIMEOUTED|K)|U(RL_MALFORMAT(_USER)?|N(SUPPORTED_PROTOCOL|KNOWN_TELNET_OPTION))|PARTIAL_FILE|F(TP_(BAD_DOWNLOAD_RESUME|SSL_FAILED|C(OULDNT_(RETR_FILE|GET_SIZE|S(TOR_FILE|ET_(BINARY|ASCII))|USE_REST)|ANT_(RECONNECT|GET_HOST))|USER_PASSWORD_INCORRECT|PORT_FAILED|QUOTE_ERROR|W(RITE_ERROR|EIRD_(SERVER_REPLY|227_FORMAT|USER_REPLY|PAS(S_REPLY|V_REPLY)))|ACCESS_DENIED)|ILE(SIZE_EXCEEDED|_COULDNT_READ_FILE)|UNCTION_NOT_FOUND|AILED_INIT)|WRITE_ERROR|L(IBRARY_NOT_FOUND|DAP_(SEARCH_FAILED|CANNOT_BIND|INVALID_URL))|ABORTED_BY_CALLBACK)|VERSION_NOW|FTP(METHOD_(MULTICWD|SINGLECWD|NOCWD)|SSL_(NONE|CONTROL|TRY|ALL)|AUTH_(SSL|TLS|DEFAULT))|AUTH_(GSSNEGOTIATE|BASIC|NTLM|DIGEST|ANY(SAFE)?))|I(MAGETYPE_(GIF|XBM|BMP|SWF|COUNT|TIFF_(MM|II)|I(CO|FF)|UNKNOWN|J(B2|P(X|2|C|EG(2000)?))|P(SD|NG)|WBMP)|NPUT_(REQUEST|GET|SE(RVER|SSION)|COOKIE|POST|ENV)|CONV_(MIME_DECODE_(STRICT|CONTINUE_ON_ERROR)|IMPL|VERSION))|D(NS_(MX|S(RV|OA)|HINFO|N(S|APTR)|CNAME|TXT|PTR|A(NY|LL|AAA|6)?)|OM(STRING_SIZE_ERR|_(SYNTAX_ERR|HIERARCHY_REQUEST_ERR|N(O(_(MODIFICATION_ALLOWED_ERR|DATA_ALLOWED_ERR)|T_(SUPPORTED_ERR|FOUND_ERR))|AMESPACE_ERR)|IN(DEX_SIZE_ERR|USE_ATTRIBUTE_ERR|VALID_(MODIFICATION_ERR|STATE_ERR|CHARACTER_ERR|ACCESS_ERR))|PHP_ERR|VALIDATION_ERR|WRONG_DOCUMENT_ERR)))|JSON_(HEX_(TAG|QUOT|A(MP|POS))|NUMERIC_CHECK|ERROR_(S(YNTAX|TATE_MISMATCH)|NONE|CTRL_CHAR|DEPTH|UTF8)|FORCE_OBJECT)|P(REG_(RECURSION_LIMIT_ERROR|GREP_INVERT|BA(CKTRACK_LIMIT_ERROR|D_UTF8_(OFFSET_ERROR|ERROR))|S(PLIT_(NO_EMPTY|OFFSET_CAPTURE|DELIM_CAPTURE)|ET_ORDER)|NO_ERROR|INTERNAL_ERROR|OFFSET_CAPTURE|PATTERN_ORDER)|SFS_(PASS_ON|ERR_FATAL|F(EED_ME|LAG_(NORMAL|FLUSH_(CLOSE|INC))))|CRE_VERSION|OSIX_(R_OK|X_OK|S_IF(REG|BLK|SOCK|CHR|IFO)|F_OK|W_OK))|F(NM_(NOESCAPE|CASEFOLD|P(ERIOD|ATHNAME))|IL(TER_(REQUIRE_(SCALAR|ARRAY)|SANITIZE_(MAGIC_QUOTES|S(TRI(NG|PPED)|PECIAL_CHARS)|NUMBER_(INT|FLOAT)|URL|E(MAIL|NCODED)|FULL_SPECIAL_CHARS)|NULL_ON_FAILURE|CALLBACK|DEFAULT|UNSAFE_RAW|VALIDATE_(REGEXP|BOOLEAN|I(NT|P)|URL|EMAIL|FLOAT)|F(ORCE_ARRAY|LAG_(S(CHEME_REQUIRED|TRIP_(BACKTICK|HIGH|LOW))|HOST_REQUIRED|NO(NE|_(RES_RANGE|PRIV_RANGE|ENCODE_QUOTES))|IPV(4|6)|PATH_REQUIRED|E(MPTY_STRING_NULL|NCODE_(HIGH|LOW|AMP))|QUERY_REQUIRED|ALLOW_(SCIENTIFIC|HEX|THOUSAND|OCTAL|FRACTION))))|E(_(BINARY|SKIP_EMPTY_LINES|NO_DEFAULT_CONTEXT|TEXT|IGNORE_NEW_LINES|USE_INCLUDE_PATH|APPEND)|INFO_(RAW|MIME(_(TYPE|ENCODING))?|SYMLINK|NONE|CONTINUE|DEVICES|PRESERVE_ATIME)))|ORCE_(GZIP|DEFLATE))|LIBXML_(XINCLUDE|N(SCLEAN|O(XMLDECL|BLANKS|NET|CDATA|E(RROR|MPTYTAG|NT)|WARNING))|COMPACT|D(TD(VALID|LOAD|ATTR)|OTTED_VERSION)|PARSEHUGE|ERR_(NONE|ERROR|FATAL|WARNING)|VERSION|LOADED_VERSION))\\b", - "name": "support.constant.ext.php" - }, - { - "captures": { - "1": { - "name": "punctuation.separator.inheritance.php" - } - }, - "match": "(\\\\)?\\bT_(RE(TURN|QUIRE(_ONCE)?)|G(OTO|LOBAL)|XOR_EQUAL|M(INUS_EQUAL|OD_EQUAL|UL_EQUAL|ETHOD_C|L_COMMENT)|B(REAK|OOL(_CAST|EAN_(OR|AND))|AD_CHARACTER)|S(R(_EQUAL)?|T(RING(_(CAST|VARNAME))?|A(RT_HEREDOC|TIC))|WITCH|L(_EQUAL)?)|HALT_COMPILER|N(S_(SEPARATOR|C)|UM_STRING|EW|AMESPACE)|C(HARACTER|O(MMENT|N(ST(ANT_ENCAPSED_STRING)?|CAT_EQUAL|TINUE))|URLY_OPEN|L(O(SE_TAG|NE)|ASS(_C)?)|A(SE|TCH))|T(RY|HROW)|I(MPLEMENTS|S(SET|_(GREATER_OR_EQUAL|SMALLER_OR_EQUAL|NOT_(IDENTICAL|EQUAL)|IDENTICAL|EQUAL))|N(STANCEOF|C(LUDE(_ONCE)?)?|T(_CAST|ERFACE)|LINE_HTML)|F)|O(R_EQUAL|BJECT_(CAST|OPERATOR)|PEN_TAG(_WITH_ECHO)?|LD_FUNCTION)|D(NUMBER|I(R|V_EQUAL)|O(C_COMMENT|UBLE_(C(OLON|AST)|ARROW)|LLAR_OPEN_CURLY_BRACES)?|E(C(LARE)?|FAULT))|U(SE|NSET(_CAST)?)|P(R(I(NT|VATE)|OTECTED)|UBLIC|LUS_EQUAL|AAMAYIM_NEKUDOTAYIM)|E(X(TENDS|IT)|MPTY|N(CAPSED_AND_WHITESPACE|D(SWITCH|_HEREDOC|IF|DECLARE|FOR(EACH)?|WHILE))|CHO|VAL|LSE(IF)?)|VAR(IABLE)?|F(I(NAL|LE)|OR(EACH)?|UNC(_C|TION))|WHI(TESPACE|LE)|L(NUMBER|I(ST|NE)|OGICAL_(XOR|OR|AND))|A(RRAY(_CAST)?|BSTRACT|S|ND_EQUAL))\\b", - "name": "support.constant.parser-token.php" - }, - { - "comment": "In PHP, any identifier which is not a variable is taken to be a constant.\n \t\t\t\tHowever, if there is no constant defined with the given name then a notice\n \t\t\t\tis generated and the constant is assumed to have the value of its name.", - "match": "[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*", - "name": "constant.other.php" + "match": "(?x)\n(\\\\)?\\b\n(GLOB_(MARK|BRACE|NO(SORT|CHECK|ESCAPE)|ONLYDIR|ERR|AVAILABLE_FLAGS)\n|XML_(SAX_IMPL|(DTD|DOCUMENT(_(FRAG|TYPE))?|HTML_DOCUMENT|NOTATION|NAMESPACE_DECL|PI|COMMENT|DATA_SECTION|TEXT)_NODE\n |OPTION_(SKIP_(TAGSTART|WHITE)|CASE_FOLDING|TARGET_ENCODING)\n |ERROR_((BAD_CHAR|(ATTRIBUTE_EXTERNAL|BINARY|PARAM|RECURSIVE)_ENTITY)_REF|MISPLACED_XML_PI|SYNTAX|NONE\n |NO_(MEMORY|ELEMENTS)|TAG_MISMATCH|INCORRECT_ENCODING|INVALID_TOKEN|DUPLICATE_ATTRIBUTE\n |UNCLOSED_(CDATA_SECTION|TOKEN)|UNDEFINED_ENTITY|UNKNOWN_ENCODING|JUNK_AFTER_DOC_ELEMENT\n |PARTIAL_CHAR|EXTERNAL_ENTITY_HANDLING|ASYNC_ENTITY)\n |ENTITY_(((REF|DECL)_)?NODE)|ELEMENT(_DECL)?_NODE|LOCAL_NAMESPACE|ATTRIBUTE_(NMTOKEN(S)?|NOTATION|NODE)\n |CDATA|ID(REF(S)?)?|DECL_NODE|ENTITY|ENUMERATION)\n|MHASH_(RIPEMD(128|160|256|320)|GOST|MD(2|4|5)|SHA(1|224|256|384|512)|SNEFRU256|HAVAL(128|160|192|224|256)\n |CRC23(B)?|TIGER(128|160)?|WHIRLPOOL|ADLER32)\n|MYSQL_(BOTH|NUM|CLIENT_(SSL|COMPRESS|IGNORE_SPACE|INTERACTIVE|ASSOC))\n|MYSQLI_(REPORT_(STRICT|INDEX|OFF|ERROR|ALL)|REFRESH_(GRANT|MASTER|BACKUP_LOG|STATUS|SLAVE|HOSTS|THREADS|TABLES|LOG)\n |READ_DEFAULT_(FILE|GROUP)|(GROUP|MULTIPLE_KEY|BINARY|BLOB)_FLAG|BOTH\n |STMT_ATTR_(CURSOR_TYPE|UPDATE_MAX_LENGTH|PREFETCH_ROWS)|STORE_RESULT\n |SERVER_QUERY_(NO_((GOOD_)?INDEX_USED)|WAS_SLOW)|SET_(CHARSET_NAME|FLAG)\n |NO_(DEFAULT_VALUE_FLAG|DATA)|NOT_NULL_FLAG|NUM(_FLAG)?\n |CURSOR_TYPE_(READ_ONLY|SCROLLABLE|NO_CURSOR|FOR_UPDATE)\n |CLIENT_(SSL|NO_SCHEMA|COMPRESS|IGNORE_SPACE|INTERACTIVE|FOUND_ROWS)\n |TYPE_(GEOMETRY|((MEDIUM|LONG|TINY)_)?BLOB|BIT|SHORT|STRING|SET|YEAR|NULL|NEWDECIMAL|NEWDATE|CHAR\n |TIME(STAMP)?|TINY|INT24|INTERVAL|DOUBLE|DECIMAL|DATE(TIME)?|ENUM|VAR_STRING|FLOAT|LONG(LONG)?)\n |TIME_STAMP_FLAG|INIT_COMMAND|ZEROFILL_FLAG|ON_UPDATE_NOW_FLAG\n |OPT_(NET_((CMD|READ)_BUFFER_SIZE)|CONNECT_TIMEOUT|INT_AND_FLOAT_NATIVE|LOCAL_INFILE)\n |DEBUG_TRACE_ENABLED|DATA_TRUNCATED|USE_RESULT|(ENUM|(PART|PRI|UNIQUE)_KEY|UNSIGNED)_FLAG\n |ASSOC|ASYNC|AUTO_INCREMENT_FLAG)\n|MCRYPT_(RC(2|6)|RIJNDAEL_(128|192|256)|RAND|GOST|XTEA|MODE_(STREAM|NOFB|CBC|CFB|OFB|ECB)|MARS\n |BLOWFISH(_COMPAT)?|SERPENT|SKIPJACK|SAFER(64|128|PLUS)|CRYPT|CAST_(128|256)|TRIPLEDES|THREEWAY\n |TWOFISH|IDEA|(3)?DES|DECRYPT|DEV_(U)?RANDOM|PANAMA|ENCRYPT|ENIGNA|WAKE|LOKI97|ARCFOUR(_IV)?)\n|STREAM_(REPORT_ERRORS|MUST_SEEK|MKDIR_RECURSIVE|BUFFER_(NONE|FULL|LINE)|SHUT_(RD)?WR\n |SOCK_(RDM|RAW|STREAM|SEQPACKET|DGRAM)|SERVER_(BIND|LISTEN)\n |NOTIFY_(REDIRECTED|RESOLVE|MIME_TYPE_IS|SEVERITY_(INFO|ERR|WARN)|COMPLETED|CONNECT|PROGRESS\n |FILE_SIZE_IS|FAILURE|AUTH_(REQUIRED|RESULT))\n |CRYPTO_METHOD_((SSLv2(3)?|SSLv3|TLS)_(CLIENT|SERVER))|CLIENT_((ASYNC_)?CONNECT|PERSISTENT)\n |CAST_(AS_STREAM|FOR_SELECT)|(IGNORE|IS)_URL|IPPROTO_(RAW|TCP|ICMP|IP|UDP)|OOB\n |OPTION_(READ_(BUFFER|TIMEOUT)|BLOCKING|WRITE_BUFFER)|URL_STAT_(LINK|QUIET)|USE_PATH\n |PEEK|PF_(INET(6)?|UNIX)|ENFORCE_SAFE_MODE|FILTER_(ALL|READ|WRITE))\n|SUNFUNCS_RET_(DOUBLE|STRING|TIMESTAMP)\n|SQLITE_(READONLY|ROW|MISMATCH|MISUSE|BOTH|BUSY|SCHEMA|NOMEM|NOTFOUND|NOTADB|NOLFS|NUM|CORRUPT\n |CONSTRAINT|CANTOPEN|TOOBIG|INTERRUPT|INTERNAL|IOERR|OK|DONE|PROTOCOL|PERM|ERROR|EMPTY\n |FORMAT|FULL|LOCKED|ABORT|ASSOC|AUTH)\n|SQLITE3_(BOTH|BLOB|NUM|NULL|TEXT|INTEGER|OPEN_(READ(ONLY|WRITE)|CREATE)|FLOAT_ASSOC)\n|CURL(M_(BAD_((EASY)?HANDLE)|CALL_MULTI_PERFORM|INTERNAL_ERROR|OUT_OF_MEMORY|OK)\n |MSG_DONE|SSH_AUTH_(HOST|NONE|DEFAULT|PUBLICKEY|PASSWORD|KEYBOARD)\n |CLOSEPOLICY_(SLOWEST|CALLBACK|OLDEST|LEAST_(RECENTLY_USED|TRAFFIC)\n |INFO_(REDIRECT_(COUNT|TIME)|REQUEST_SIZE|SSL_VERIFYRESULT|STARTTRANSFER_TIME\n |(SIZE|SPEED)_(DOWNLOAD|UPLOAD)|HTTP_CODE|HEADER_(OUT|SIZE)|NAMELOOKUP_TIME\n |CONNECT_TIME|CONTENT_(TYPE|LENGTH_(DOWNLOAD|UPLOAD))|CERTINFO|TOTAL_TIME\n |PRIVATE|PRETRANSFER_TIME|EFFECTIVE_URL|FILETIME)\n |OPT_(RESUME_FROM|RETURNTRANSFER|REDIR_PROTOCOLS|REFERER|READ(DATA|FUNCTION)|RANGE|RANDOM_FILE\n |MAX(CONNECTS|REDIRS)|BINARYTRANSFER|BUFFERSIZE\n |SSH_(HOST_PUBLIC_KEY_MD5|(PRIVATE|PUBLIC)_KEYFILE)|AUTH_TYPES)\n |SSL(CERT(TYPE|PASSWD)?|ENGINE(_DEFAULT)?|VERSION|KEY(TYPE|PASSWD)?)\n |SSL_(CIPHER_LIST|VERIFY(HOST|PEER))\n |STDERR|HTTP(GET|HEADER|200ALIASES|_VERSION|PROXYTUNNEL|AUTH)\n |HEADER(FUNCTION)?|NO(BODY|SIGNAL|PROGRESS)|NETRC|CRLF|CONNECTTIMEOUT(_MS)?\n |COOKIE(SESSION|JAR|FILE)?|CUSTOMREQUEST|CERTINFO|CLOSEPOLICY|CA(INFO|PATH)|TRANSFERTEXT\n |TCP_NODELAY|TIME(CONDITION|OUT(_MS)?|VALUE)|INTERFACE|INFILE(SIZE)?|IPRESOLVE\n |DNS_(CACHE_TIMEOUT|USE_GLOBAL_CACHE)|URL|USER(AGENT|PWD)|UNRESTRICTED_AUTH|UPLOAD\n |PRIVATE|PROGRESSFUNCTION|PROXY(TYPE|USERPWD|PORT|AUTH)?|PROTOCOLS|PORT\n |POST(REDIR|QUOTE|FIELDS)?|PUT|EGDSOCKET|ENCODING|VERBOSE|KRB4LEVEL|KEYPASSWD|QUOTE|FRESH_CONNECT\n |FTP(APPEND|LISTONLY|PORT|SSLAUTH)\n |FTP_(SSL|SKIP_PASV_IP|CREATE_MISSING_DIRS|USE_EP(RT|SV)|FILEMETHOD)\n |FILE(TIME)?|FORBID_REUSE|FOLLOWLOCATION|FAILONERROR|WRITE(FUNCTION|HEADER)|LOW_SPEED_(LIMIT|TIME)\n |AUTOREFERER)\n |PROXY_(HTTP|SOCKS(4|5))|PROTO_(SCP|SFTP|HTTP(S)?|TELNET|TFTP|DICT|FTP(S)?|FILE|LDAP(S)?|ALL)\n |E_((RECV|READ)_ERROR|GOT_NOTHING|MALFORMAT_USER\n |BAD_(CONTENT_ENCODING|CALLING_ORDER|PASSWORD_ENTERED|FUNCTION_ARGUMENT)\n |SSH|SSL_(CIPHER|CONNECT_ERROR|CERTPROBLEM|CACERT|PEER_CERTIFICATE|ENGINE_(NOTFOUND|SETFAILED))\n |SHARE_IN_USE|SEND_ERROR|HTTP_(RANGE_ERROR|NOT_FOUND|PORT_FAILED|POST_ERROR)\n |COULDNT_(RESOLVE_(HOST|PROXY)|CONNECT)|TOO_MANY_REDIRECTS|TELNET_OPTION_SYNTAX|OBSOLETE\n |OUT_OF_MEMORY|OPERATION|TIMEOUTED|OK|URL_MALFORMAT(_USER)?|UNSUPPORTED_PROTOCOL\n |UNKNOWN_TELNET_OPTION|PARTIAL_FILE\n |FTP_(BAD_DOWNLOAD_RESUME|SSL_FAILED|COULDNT_(RETR_FILE|GET_SIZE|STOR_FILE|SET_(BINARY|ASCII)|USE_REST)\n |CANT_(GET_HOST|RECONNECT)|USER_PASSWORD_INCORRECT|PORT_FAILED|QUOTE_ERROR|WRITE_ERROR\n |WEIRD_((PASS|PASV|SERVER|USER)_REPLY|227_FORMAT)|ACCESS_DENIED)\n |FILESIZE_EXCEEDED|FILE_COULDNT_READ_FILE|FUNCTION_NOT_FOUND|FAILED_INIT|WRITE_ERROR|LIBRARY_NOT_FOUND\n |LDAP_(SEARCH_FAILED|CANNOT_BIND|INVALID_URL)|ABORTED_BY_CALLBACK)\n |VERSION_NOW\n |FTP(METHOD_(MULTI|SINGLE|NO)CWD|SSL_(ALL|NONE|CONTROL|TRY)|AUTH_(DEFAULT|SSL|TLS))\n |AUTH_(ANY(SAFE)?|BASIC|DIGEST|GSSNEGOTIATE|NTLM))\n|CURL_(HTTP_VERSION_(1_(0|1)|NONE)|NETRC_(REQUIRED|IGNORED|OPTIONAL)|TIMECOND_(IF(UN)?MODSINCE|LASTMOD)\n |IPRESOLVE_(V(4|6)|WHATEVER)|VERSION_(SSL|IPV6|KERBEROS4|LIBZ))\n|IMAGETYPE_(GIF|XBM|BMP|SWF|COUNT|TIFF_(MM|II)|ICO|IFF|UNKNOWN|JB2|JPX|JP2|JPC|JPEG(2000)?|PSD|PNG|WBMP)\n|INPUT_(REQUEST|GET|SERVER|SESSION|COOKIE|POST|ENV)|ICONV_(MIME_DECODE_(STRICT|CONTINUE_ON_ERROR)|IMPL|VERSION)\n|DNS_(MX|SRV|SOA|HINFO|NS|NAPTR|CNAME|TXT|PTR|ANY|ALL|AAAA|A(6)?)\n|DOM(STRING_SIZE_ERR)\n|DOM_((SYNTAX|HIERARCHY_REQUEST|NO_(MODIFICATION_ALLOWED|DATA_ALLOWED)|NOT_(FOUND|SUPPORTED)|NAMESPACE\n |INDEX_SIZE|USE_ATTRIBUTE|VALID_(MODIFICATION|STATE|CHARACTER|ACCESS)|PHP|VALIDATION|WRONG_DOCUMENT)_ERR)\n|JSON_(HEX_(TAG|QUOT|AMP|APOS)|NUMERIC_CHECK|ERROR_(SYNTAX|STATE_MISMATCH|NONE|CTRL_CHAR|DEPTH|UTF8)|FORCE_OBJECT)\n|PREG_((D_UTF8(_OFFSET)?|NO|INTERNAL|(BACKTRACK|RECURSION)_LIMIT)_ERROR|GREP_INVERT\n |SPLIT_(NO_EMPTY|(DELIM|OFFSET)_CAPTURE)|SET_ORDER|OFFSET_CAPTURE|PATTERN_ORDER)\n|PSFS_(PASS_ON|ERR_FATAL|FEED_ME|FLAG_(NORMAL|FLUSH_(CLOSE|INC)))\n|PCRE_VERSION|POSIX_((F|R|W|X)_OK|S_IF(REG|BLK|SOCK|CHR|IFO))\n|FNM_(NOESCAPE|CASEFOLD|PERIOD|PATHNAME)\n|FILTER_(REQUIRE_(SCALAR|ARRAY)|NULL_ON_FAILURE|CALLBACK|DEFAULT|UNSAFE_RAW\n |SANITIZE_(MAGIC_QUOTES|STRING|STRIPPED|SPECIAL_CHARS|NUMBER_(INT|FLOAT)|URL\n |EMAIL|ENCODED|FULL_SPCIAL_CHARS)\n |VALIDATE_(REGEXP|BOOLEAN|INT|IP|URL|EMAIL|FLOAT)\n |FORCE_ARRAY\n |FLAG_(SCHEME_REQUIRED|STRIP_(BACKTICK|HIGH|LOW)|HOST_REQUIRED|NONE|NO_(RES|PRIV)_RANGE|ENCODE_QUOTES\n |IPV(4|6)|PATH_REQUIRED|EMPTY_STRING_NULL|ENCODE_(HIGH|LOW|AMP)|QUERY_REQUIRED\n |ALLOW_(SCIENTIFIC|HEX|THOUSAND|OCTAL|FRACTION)))\n|FILE_(BINARY|SKIP_EMPTY_LINES|NO_DEFAULT_CONTEXT|TEXT|IGNORE_NEW_LINES|USE_INCLUDE_PATH|APPEND)\n|FILEINFO_(RAW|MIME(_(ENCODING|TYPE))?|SYMLINK|NONE|CONTINUE|DEVICES|PRESERVE_ATIME)\n|FORCE_(DEFLATE|GZIP)\n|LIBXML_(XINCLUDE|NSCLEAN|NO(XMLDECL|BLANKS|NET|CDATA|ERROR|EMPTYTAG|ENT|WARNING)\n |COMPACT|DTD(VALID|LOAD|ATTR)|((DOTTED|LOADED)_)?VERSION|PARSEHUGE|ERR_(NONE|ERROR|FATAL|WARNING)))\n\\b", + "name": "support.constant.ext.php", + "captures": { + "1": { + "name": "punctuation.separator.inheritance.php" } - ] + } + }, + { + "match": "(?x)\n(\\\\)?\\b\n(T_(RETURN|REQUIRE(_ONCE)?|GOTO|GLOBAL|(MINUS|MOD|MUL|XOR)_EQUAL|METHOD_C|ML_COMMENT|BREAK\n |BOOL_CAST|BOOLEAN_(AND|OR)|BAD_CHARACTER|SR(_EQUAL)?|STRING(_CAST|VARNAME)?|START_HEREDOC|STATIC\n |SWITCH|SL(_EQUAL)?|HALT_COMPILER|NS_(C|SEPARATOR)|NUM_STRING|NEW|NAMESPACE|CHARACTER|COMMENT\n |CONSTANT(_ENCAPSED_STRING)?|CONCAT_EQUAL|CONTINUE|CURLY_OPEN|CLOSE_TAG|CLONE|CLASS(_C)?\n |CASE|CATCH|TRY|THROW|IMPLEMENTS|ISSET|IS_((GREATER|SMALLER)_OR_EQUAL|(NOT_)?(IDENTICAL|EQUAL))\n |INSTANCEOF|INCLUDE(_ONCE)?|INC|INT_CAST|INTERFACE|INLINE_HTML|IF|OR_EQUAL|OBJECT_(CAST|OPERATOR)\n |OPEN_TAG(_WITH_ECHO)?|OLD_FUNCTION|DNUMBER|DIR|DIV_EQUAL|DOC_COMMENT|DOUBLE_(ARROW|CAST|COLON)\n |DOLLAR_OPEN_CURLY_BRACES|DO|DEC|DECLARE|DEFAULT|USE|UNSET(_CAST)?|PRINT|PRIVATE|PROTECTED|PUBLIC\n |PLUS_EQUAL|PAAMAYIM_NEKUDOTAYIM|EXTENDS|EXIT|EMPTY|ENCAPSED_AND_WHITESPACE\n |END(SWITCH|IF|DECLARE|FOR(EACH)?|WHILE)|END_HEREDOC|ECHO|EVAL|ELSE(IF)?|VAR(IABLE)?|FINAL|FILE\n |FOR(EACH)?|FUNC_C|FUNCTION|WHITESPACE|WHILE|LNUMBER|LIST|LINE|LOGICAL_(AND|OR|XOR)\n |ARRAY_(CAST)?|ABSTRACT|AS|AND_EQUAL))\n\\b", + "name": "support.constant.parser-token.php", + "captures": { + "1": { + "name": "punctuation.separator.inheritance.php" + } + } + }, + { + "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", + "name": "constant.other.php" } ] }, - "function-arguments": { + "function-parameters": { "patterns": [ { "include": "#comments" }, { - "begin": "(?xi)\n\t\t\t\t\t\t\t\\s*(array) # Typehint\n\t\t\t\t\t\t\t\\s*(&)? \t\t\t\t\t# Reference\n\t\t\t\t\t\t\t\\s*((\\$+)[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*) # The variable name\n\t\t\t\t\t\t\t\\s*(=)\t# A default value\n\t\t\t\t\t\t\t\\s*(array)\\s*(\\()\n\t\t\t\t\t\t\t", + "begin": "(?xi)\n(array) # Typehint\n\\s+((&)?\\s*(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Variable name with possible reference\n\\s*(=)\\s*(array)\\s*(\\() # Default value", "beginCaptures": { "1": { "name": "storage.type.php" }, "2": { - "name": "storage.modifier.reference.php" + "name": "variable.other.php" }, "3": { - "name": "variable.other.php" + "name": "storage.modifier.reference.php" }, "4": { "name": "punctuation.definition.variable.php" @@ -361,17 +471,17 @@ "name": "support.function.construct.php" }, "7": { - "name": "punctuation.definition.array.begin.php" + "name": "punctuation.definition.array.begin.bracket.round.php" } }, "contentName": "meta.array.php", "end": "\\)", "endCaptures": { "0": { - "name": "punctuation.definition.array.end.php" + "name": "punctuation.definition.array.end.bracket.round.php" } }, - "name": "meta.function.argument.array.php", + "name": "meta.function.parameter.array.php", "patterns": [ { "include": "#comments" @@ -385,15 +495,17 @@ ] }, { + "match": "(?xi)\n(array|callable) # Typehint\n\\s+((&)?\\s*(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Variable name with possible reference\n(?: # Optional default value\n \\s*(=)\\s*\n (?:\n (null)\n |\n (\\[)((?>[^\\[\\]]+|\\[\\g<8>\\])*)(\\])\n |((?:\\S*?\\(\\))|(?:\\S*?))\n )\n)?\n\\s*(?=,|\\)|/[/*]|\\#|$) # A closing parentheses (end of argument list) or a comma or a comment", + "name": "meta.function.parameter.array.php", "captures": { "1": { "name": "storage.type.php" }, "2": { - "name": "storage.modifier.reference.php" + "name": "variable.other.php" }, "3": { - "name": "variable.other.php" + "name": "storage.modifier.reference.php" }, "4": { "name": "punctuation.definition.variable.php" @@ -420,92 +532,98 @@ "10": { "name": "invalid.illegal.non-null-typehinted.php" } - }, - "match": "(?xi)\n\t\t\t\t\t\t\t\\s*(array|callable) # Typehint\n\t\t\t\t\t\t\t\\s*(&)? \t\t\t\t\t# Reference\n\t\t\t\t\t\t\t\\s*((\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # The variable name\n\t\t\t\t\t\t\t(?:\n\t\t\t\t\t\t\t\t\\s*(?:(=)\\s*(?:(null)|(\\[)((?>[^\\[\\]]+|\\[\\g<8>\\])*)(\\])|((?:\\S*?\\(\\))|(?:\\S*?))))\t# A default value\n\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t\\s*(?=,|\\)|/[/*]|\\#|$) # A closing parentheses (end of argument list) or a comma or a comment\n\t\t\t\t\t\t\t", - "name": "meta.function.argument.array.php" + } }, { - "begin": "(?i)(?=[a-z_0-9\\\\]*[a-z_][a-z_0-9]*\\s*&?\\s*(?:\\.\\.\\.)?\\$)", - "end": "(?=,|\\)|/[/*]|\\#|$)", - "name": "meta.function.argument.typehinted.php", - "patterns": [ - { - "include": "#class-name" + "begin": "(?xi)\n([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Typehinted class name\n\\s*((&)?\\s*(\\.\\.\\.)?(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Variable name with possible reference", + "beginCaptures": { + "1": { + "name": "storage.type.php" + }, + "2": { + "name": "variable.other.php" + }, + "3": { + "name": "storage.modifier.reference.php" + }, + "4": { + "name": "keyword.operator.variadic.php" }, + "5": { + "name": "punctuation.definition.variable.php" + } + }, + "end": "(?=,|\\)|/[/*]|\\#)", + "name": "meta.function.parameter.typehinted.php", + "patterns": [ { - "captures": { - "1": { - "name": "support.class.php" - }, - "2": { - "name": "storage.modifier.reference.php" - }, - "3": { - "name": "variable.other.php" - }, - "4": { - "name": "punctuation.definition.variable.php" - }, - "5": { + "begin": "=", + "beginCaptures": { + "0": { "name": "keyword.operator.assignment.php" - }, - "6": { - "name": "constant.language.php" - }, - "7": { - "name": "invalid.illegal.non-null-typehinted.php" } }, - "match": "(?xi)\n \t\t\t\t\t\t\t\\s*([a-z_][a-z_0-9]*)? # Typehinted class name\n \t\t\t\t\t\t\t\\s*(&)? \t\t\t\t\t# Reference\n \t\t\t\t\t\t\t\\s*(((?:\\.\\.\\.)?\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # The variable name\n \t\t\t\t\t\t\t(?:\n \t\t\t\t\t\t\t\t\\s*(?:(=)\\s*(?:(null)|((?:\\S*?\\(\\))|(?:\\S*?))))\t# A default value\n \t\t\t\t\t\t\t)?\n \t\t\t\t\t\t\t\\s*(?=,|\\)|/[/*]|\\#|$) # A closing parentheses (end of argument list) or a comma\n\t\t\t\t\t " + "end": "(?=,|\\)|/[/*]|\\#)", + "patterns": [ + { + "include": "#language" + } + ] } ] }, { "captures": { "1": { - "name": "storage.modifier.reference.php" + "name": "variable.other.php" }, "2": { - "name": "variable.other.php" + "name": "storage.modifier.reference.php" }, "3": { + "name": "keyword.operator.variadic.php" + }, + "4": { "name": "punctuation.definition.variable.php" } }, - "match": "(?:\\s*(&))?\\s*(((?:\\.\\.\\.)?\\$+)[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\\s*(?=,|\\)|/[/*]|\\#)", - "name": "meta.function.argument.no-default.php" + "match": "(?xi)\n((&)?\\s*(\\.\\.\\.)?(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Variable name with possible reference\n\\s*(?=,|\\)|/[/*]|\\#|$) # A closing parentheses (end of argument list) or a comma or a comment", + "name": "meta.function.parameter.no-default.php" }, { - "begin": "(?:\\s*(&))?\\s*((\\$+)[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)(?:\\s*(=)\\s*)\\s*(?:(\\[)((?>[^\\[\\]]+|\\[\\g<6>\\])*)(\\]))?", - "captures": { + "begin": "(?xi)\n((&)?\\s*(\\.\\.\\.)?(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Variable name with possible reference\n\\s*(=)\\s*\n(?:(\\[)((?>[^\\[\\]]+|\\[\\g<6>\\])*)(\\]))? # Optional default type", + "beginCaptures": { "1": { - "name": "storage.modifier.reference.php" + "name": "variable.other.php" }, "2": { - "name": "variable.other.php" + "name": "storage.modifier.reference.php" }, "3": { - "name": "punctuation.definition.variable.php" + "name": "keyword.operator.variadic.php" }, "4": { - "name": "keyword.operator.assignment.php" + "name": "punctuation.definition.variable.php" }, "5": { - "name": "punctuation.section.array.begin.php" + "name": "keyword.operator.assignment.php" }, "6": { + "name": "punctuation.section.array.begin.php" + }, + "7": { "patterns": [ { "include": "#parameter-default-types" } ] }, - "7": { + "8": { "name": "punctuation.section.array.end.php" } }, "end": "(?=,|\\)|/[/*]|\\#)", - "name": "meta.function.argument.default.php", + "name": "meta.function.parameter.default.php", "patterns": [ { "include": "#parameter-default-types" @@ -517,57 +635,81 @@ "function-call": { "patterns": [ { - "begin": "(?i)(?=\\\\?[a-z_0-9\\\\]+\\\\[a-z_][a-z0-9_]*\\s*\\()", - "comment": "Functions in a user-defined namespace (overrides any built-ins)", - "end": "(?=\\s*\\()", + "begin": "(?i)(\\\\?[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*\\\\[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\\s*(\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#namespace" + }, + { + "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", + "name": "entity.name.function.php" + } + ] + }, + "2": { + "name": "punctuation.definition.arguments.begin.bracket.round.php" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.end.bracket.round.php" + } + }, + "name": "meta.function-call.php", "patterns": [ { - "include": "#user-function-call" + "include": "#language" } ] }, { - "match": "(?i)\\b(print|echo)\\b", - "name": "support.function.construct.output.php" - }, - { - "begin": "(?i)(\\\\)?(?=\\b[a-z_][a-z_0-9]*\\s*\\()", + "begin": "(?i)(\\\\)?\\b([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\\s*(\\()", "beginCaptures": { "1": { "name": "punctuation.separator.inheritance.php" - } - }, - "comment": "Root namespace function calls (built-in or user)", - "end": "(?=\\s*\\()", - "patterns": [ - { - "match": "(?i)\\b(isset|unset|e(val|mpty)|list)(?=\\s*\\()", - "name": "support.function.construct.php" }, - { - "include": "#support" + "2": { + "patterns": [ + { + "include": "#support" + }, + { + "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", + "name": "entity.name.function.php" + } + ] }, + "3": { + "name": "punctuation.definition.arguments.begin.bracket.round.php" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.end.bracket.round.php" + } + }, + "name": "meta.function-call.php", + "patterns": [ { - "include": "#user-function-call" + "include": "#language" } ] + }, + { + "match": "(?i)\\b(print|echo)\\b", + "name": "support.function.construct.output.php" } ] }, "heredoc": { "patterns": [ { - "begin": "(?=<<<\\s*(\"?)([a-zA-Z_]+[a-zA-Z0-9_]*)(\\1)\\s*$)", + "begin": "(?i)(?=<<<\\s*(\"?)([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)(\\1)\\s*$)", "end": "(?!\\G)", - "injections": { - "*": { - "patterns": [ - { - "include": "#interpolation" - } - ] - } - }, "name": "string.unquoted.heredoc.php", "patterns": [ { @@ -576,298 +718,646 @@ ] }, { - "begin": "(?=<<<\\s*('?)([a-zA-Z_]+[a-zA-Z0-9_]*)(\\1)\\s*$)", + "begin": "(?=<<<\\s*'([a-zA-Z_]+[a-zA-Z0-9_]*)'\\s*$)", "end": "(?!\\G)", - "name": "string.unquoted.heredoc.nowdoc.php", + "name": "string.unquoted.nowdoc.php", "patterns": [ { - "include": "#heredoc_interior" + "include": "#nowdoc_interior" } ] } - ], - "repository": { - "heredoc_interior": { + ] + }, + "heredoc_interior": { + "patterns": [ + { + "begin": "(<<<)\\s*(\"?)(HTML)(\\2)(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "text.html", + "end": "^(\\3)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "name": "meta.embedded.html", "patterns": [ { - "begin": "(<<<)\\s*(['\"]?)(HTML)(\\2)\\s*$\\n?", - "beginCaptures": { - "0": { - "name": "punctuation.section.embedded.begin.php" - }, - "1": { - "name": "punctuation.definition.string.php" - }, - "3": { - "name": "keyword.operator.heredoc.php" - } - }, - "contentName": "text.html", - "end": "^(\\3)\\b", - "endCaptures": { - "0": { - "name": "punctuation.section.embedded.end.php" - }, - "1": { - "name": "keyword.operator.heredoc.php" - } - }, - "name": "meta.embedded.html", - "patterns": [ - { - "include": "text.html.basic" - } - ] + "include": "#interpolation" }, { - "begin": "(<<<)\\s*(['\"]?)(XML)(\\2)\\s*$\\n?", - "beginCaptures": { - "0": { - "name": "punctuation.section.embedded.begin.php" - }, + "include": "text.html.basic" + } + ] + }, + { + "begin": "(<<<)\\s*(\"?)(XML)(\\2)(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "text.xml", + "end": "^(\\3)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "name": "meta.embedded.xml", + "patterns": [ + { + "include": "#interpolation" + }, + { + "include": "text.xml" + } + ] + }, + { + "begin": "(<<<)\\s*(\"?)(SQL)(\\2)(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.sql", + "end": "^(\\3)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "name": "meta.embedded.sql", + "patterns": [ + { + "include": "#interpolation" + }, + { + "include": "source.sql" + } + ] + }, + { + "begin": "(<<<)\\s*(\"?)(JAVASCRIPT|JS)(\\2)(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.js", + "end": "^(\\3)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "name": "meta.embedded.js", + "patterns": [ + { + "include": "#interpolation" + }, + { + "include": "source.js" + } + ] + }, + { + "begin": "(<<<)\\s*(\"?)(JSON)(\\2)(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.json", + "end": "^(\\3)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "name": "meta.embedded.json", + "patterns": [ + { + "include": "#interpolation" + }, + { + "include": "source.json" + } + ] + }, + { + "begin": "(<<<)\\s*(\"?)(CSS)(\\2)(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.css", + "end": "^(\\3)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "name": "meta.embedded.css", + "patterns": [ + { + "include": "#interpolation" + }, + { + "include": "source.css" + } + ] + }, + { + "begin": "(<<<)\\s*(\"?)(REGEXP?)(\\2)(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "string.regexp.heredoc.php", + "end": "^(\\3)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "patterns": [ + { + "include": "#interpolation" + }, + { + "match": "(\\\\){1,2}[.$^\\[\\]{}]", + "name": "constant.character.escape.regex.php" + }, + { + "captures": { "1": { - "name": "punctuation.definition.string.php" + "name": "punctuation.definition.arbitrary-repitition.php" }, "3": { - "name": "keyword.operator.heredoc.php" + "name": "punctuation.definition.arbitrary-repitition.php" } }, - "contentName": "text.xml", - "end": "^(\\3)\\b", - "endCaptures": { + "match": "({)\\d+(,\\d+)?(})", + "name": "string.regexp.arbitrary-repitition.php" + }, + { + "begin": "\\[(?:\\^?\\])?", + "captures": { "0": { - "name": "punctuation.section.embedded.end.php" - }, - "1": { - "name": "keyword.operator.heredoc.php" + "name": "punctuation.definition.character-class.php" } }, - "name": "meta.embedded.xml", + "end": "\\]", + "name": "string.regexp.character-class.php", "patterns": [ { - "include": "text.xml" + "match": "\\\\[\\\\'\\[\\]]", + "name": "constant.character.escape.php" } ] }, { - "begin": "(<<<)\\s*(['\"]?)(SQL)(\\2)\\s*$\\n?", + "match": "[$^+*]", + "name": "keyword.operator.regexp.php" + }, + { + "begin": "(?i)(?<=^|\\s)(#)\\s(?=[[a-z0-9_\\x{7f}-\\x{ff},. \\t?!-][^\\x{00}-\\x{7f}]]*$)", "beginCaptures": { - "0": { - "name": "punctuation.section.embedded.begin.php" - }, "1": { - "name": "punctuation.definition.string.php" - }, - "3": { - "name": "keyword.operator.heredoc.php" + "name": "punctuation.definition.comment.php" } }, - "contentName": "source.sql", - "end": "^(\\3)\\b", + "end": "$", "endCaptures": { "0": { - "name": "punctuation.section.embedded.end.php" - }, - "1": { - "name": "keyword.operator.heredoc.php" + "name": "punctuation.definition.comment.php" } }, - "name": "meta.embedded.sql", - "patterns": [ - { - "include": "source.sql" - } - ] - }, - { - "begin": "(<<<)\\s*(['\"]?)(JAVASCRIPT)(\\2)\\s*$\\n?", - "beginCaptures": { - "0": { - "name": "punctuation.section.embedded.begin.php" - }, - "1": { - "name": "punctuation.definition.string.php" - }, - "3": { - "name": "keyword.operator.heredoc.php" - } - }, - "contentName": "source.js", - "end": "^(\\3)\\b", - "endCaptures": { - "0": { - "name": "punctuation.section.embedded.end.php" - }, - "1": { - "name": "keyword.operator.heredoc.php" - } - }, - "name": "meta.embedded.js", - "patterns": [ - { - "include": "source.js" - } - ] + "name": "comment.line.number-sign.php" + } + ] + }, + { + "begin": "(?i)(<<<)\\s*(\"?)([a-z_\\x{7f}-\\x{ff}]+[a-z0-9_\\x{7f}-\\x{ff}]*)(\\2)(\\s*)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.php" }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "end": "^(\\3)\\b", + "endCaptures": { + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "patterns": [ { - "begin": "(<<<)\\s*(['\"]?)(JSON)(\\2)\\s*$\\n?", - "beginCaptures": { - "0": { - "name": "punctuation.section.embedded.begin.php" - }, - "1": { - "name": "punctuation.definition.string.php" - }, - "3": { - "name": "keyword.operator.heredoc.php" - } - }, - "contentName": "source.json", - "end": "^(\\3)\\b", - "endCaptures": { - "0": { - "name": "punctuation.section.embedded.end.php" - }, - "1": { - "name": "keyword.operator.heredoc.php" - } - }, - "name": "meta.embedded.json", - "patterns": [ - { - "include": "source.json" - } - ] + "include": "#interpolation" + } + ] + } + ] + }, + "nowdoc_interior": { + "patterns": [ + { + "begin": "(<<<)\\s*'(HTML)'(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" }, + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "text.html", + "end": "^(\\2)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.nowdoc.php" + } + }, + "name": "meta.embedded.html", + "patterns": [ { - "begin": "(<<<)\\s*(['\"]?)(CSS)(\\2)\\s*$\\n?", - "beginCaptures": { - "0": { - "name": "punctuation.section.embedded.begin.php" - }, + "include": "text.html.basic" + } + ] + }, + { + "begin": "(<<<)\\s*'(XML)'(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "text.xml", + "end": "^(\\2)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.nowdoc.php" + } + }, + "name": "meta.embedded.xml", + "patterns": [ + { + "include": "text.xml" + } + ] + }, + { + "begin": "(<<<)\\s*'(SQL)'(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.sql", + "end": "^(\\2)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.nowdoc.php" + } + }, + "name": "meta.embedded.sql", + "patterns": [ + { + "include": "source.sql" + } + ] + }, + { + "begin": "(<<<)\\s*'(JAVASCRIPT|JS)'(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.js", + "end": "^(\\2)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.nowdoc.php" + } + }, + "name": "meta.embedded.js", + "patterns": [ + { + "include": "source.js" + } + ] + }, + { + "begin": "(<<<)\\s*'(JSON)'(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.json", + "end": "^(\\2)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.nowdoc.php" + } + }, + "name": "meta.embedded.json", + "patterns": [ + { + "include": "source.json" + } + ] + }, + { + "begin": "(<<<)\\s*'(CSS)'(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.css", + "end": "^(\\2)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.nowdoc.php" + } + }, + "name": "meta.embedded.css", + "patterns": [ + { + "include": "source.css" + } + ] + }, + { + "begin": "(<<<)\\s*'(REGEXP?)'(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "string.regexp.nowdoc.php", + "end": "^(\\2)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.nowdoc.php" + } + }, + "patterns": [ + { + "match": "(\\\\){1,2}[.$^\\[\\]{}]", + "name": "constant.character.escape.regex.php" + }, + { + "captures": { "1": { - "name": "punctuation.definition.string.php" + "name": "punctuation.definition.arbitrary-repitition.php" }, "3": { - "name": "keyword.operator.heredoc.php" + "name": "punctuation.definition.arbitrary-repitition.php" } }, - "contentName": "source.css", - "end": "^(\\3)\\b", - "endCaptures": { + "match": "({)\\d+(,\\d+)?(})", + "name": "string.regexp.arbitrary-repitition.php" + }, + { + "begin": "\\[(?:\\^?\\])?", + "captures": { "0": { - "name": "punctuation.section.embedded.end.php" - }, - "1": { - "name": "keyword.operator.heredoc.php" + "name": "punctuation.definition.character-class.php" } }, - "name": "meta.embedded.css", + "end": "\\]", + "name": "string.regexp.character-class.php", "patterns": [ { - "include": "source.css" + "match": "\\\\[\\\\'\\[\\]]", + "name": "constant.character.escape.php" } ] }, { - "begin": "(<<<)\\s*(['\"]?)(REGEX)(\\2)\\s*$\\n?", + "match": "[$^+*]", + "name": "keyword.operator.regexp.php" + }, + { + "begin": "(?i)(?<=^|\\s)(#)\\s(?=[[a-z0-9_\\x{7f}-\\x{ff},. \\t?!-][^\\x{00}-\\x{7f}]]*$)", "beginCaptures": { - "0": { - "name": "punctuation.section.embedded.begin.php" - }, "1": { - "name": "punctuation.definition.string.php" - }, - "3": { - "name": "keyword.operator.heredoc.php" + "name": "punctuation.definition.comment.php" } }, - "contentName": "string.regexp.heredoc.php", - "end": "^(\\3)\\b", + "end": "$", "endCaptures": { "0": { - "name": "punctuation.section.embedded.end.php" - }, - "1": { - "name": "keyword.operator.heredoc.php" + "name": "punctuation.definition.comment.php" } }, - "patterns": [ - { - "comment": "Escaped from the regexp – there can also be 2 backslashes (since 1 will escape the first)", - "match": "(\\\\){1,2}[.$^\\[\\]{}]", - "name": "constant.character.escape.regex.php" - }, - { - "captures": { - "1": { - "name": "punctuation.definition.arbitrary-repitition.php" - }, - "3": { - "name": "punctuation.definition.arbitrary-repitition.php" - } - }, - "match": "(\\{)\\d+(,\\d+)?(\\})", - "name": "string.regexp.arbitrary-repitition.php" - }, - { - "begin": "\\[(?:\\^?\\])?", - "captures": { - "0": { - "name": "punctuation.definition.character-class.php" - } - }, - "end": "\\]", - "name": "string.regexp.character-class.php", - "patterns": [ - { - "match": "\\\\[\\\\'\\[\\]]", - "name": "constant.character.escape.php" - } - ] - }, - { - "match": "[$^+*]", - "name": "keyword.operator.regexp.php" - }, - { - "begin": "(?<=^|\\s)(#)\\s(?=[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.comment.php" - } - }, - "comment": "We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.", - "end": "$\\n?", - "endCaptures": { - "0": { - "name": "punctuation.definition.comment.php" - } - }, - "name": "comment.line.number-sign.php" - } - ] + "name": "comment.line.number-sign.php" + } + ] + }, + { + "begin": "(?i)(<<<)\\s*'([a-z_\\x{7f}-\\x{ff}]+[a-z0-9_\\x{7f}-\\x{ff}]*)'(\\s*)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.php" }, - { - "begin": "(<<<)\\s*(['\"]?)([a-zA-Z_]+[a-zA-Z0-9_]*)(\\2)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.string.php" - }, - "3": { - "name": "keyword.operator.heredoc.php" - } - }, - "end": "^(\\3)\\b", - "endCaptures": { - "1": { - "name": "keyword.operator.heredoc.php" - } - } + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "end": "^(\\2)\\b", + "endCaptures": { + "1": { + "name": "keyword.operator.nowdoc.php" } - ] + } } - } + ] }, "instantiation": { "begin": "(?i)(new)\\s+", @@ -876,10 +1366,10 @@ "name": "keyword.other.new.php" } }, - "end": "(?i)(?=[^$a-z0-9_\\\\])", + "end": "(?i)(?=[^a-z0-9_\\x{7f}-\\x{ff}\\\\])", "patterns": [ { - "match": "(parent|static|self)(?=[^a-z0-9_])", + "match": "(?i)(parent|static|self)(?![a-z0-9_\\x{7f}-\\x{ff}])", "name": "storage.type.php" }, { @@ -891,7 +1381,6 @@ ] }, "interpolation": { - "comment": "http://www.php.net/manual/en/language.types.string.php#language.types.string.parsing", "patterns": [ { "match": "\\\\[0-7]{1,3}", @@ -906,15 +1395,15 @@ "name": "constant.character.escape.php" }, { - "begin": "(\\{)(?=\\$.*?\\})", + "begin": "{(?=\\$.*?})", "beginCaptures": { - "1": { + "0": { "name": "punctuation.definition.variable.php" } }, - "end": "(\\})", + "end": "}", "endCaptures": { - "1": { + "0": { "name": "punctuation.definition.variable.php" } }, @@ -938,7 +1427,7 @@ "name": "variable.other.php" } }, - "match": "(?i)(\\$+)([a-z_][a-z_0-9]*)(?=\\s*\\()", + "match": "(?i)(\\$+)([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)(?=\\s*\\()", "name": "meta.function-call.invoke.php" }, "language": { @@ -947,15 +1436,15 @@ "include": "#comments" }, { - "match": "\\{", + "match": "{", "name": "punctuation.section.scope.begin.php" }, { - "match": "\\}", + "match": "}", "name": "punctuation.section.scope.end.php" }, { - "begin": "(?i)^\\s*(interface)\\s+([a-z0-9_]+)\\s*(extends)?\\s*", + "begin": "(?i)^\\s*(interface)\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\\s*(extends)?\\s*", "beginCaptures": { "1": { "name": "storage.type.interface.php" @@ -967,12 +1456,12 @@ "name": "storage.modifier.extends.php" } }, - "end": "((?:[a-zA-Z0-9_]+\\s*,\\s*)*)([a-zA-Z0-9_]+)?\\s*(?:(?=\\{)|$)", + "end": "(?i)((?:[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*\\s*,\\s*)*)([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?\\s*(?:(?={)|$)", "endCaptures": { "1": { "patterns": [ { - "match": "[a-zA-Z0-9_]+", + "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", "name": "entity.other.inherited-class.php" }, { @@ -993,7 +1482,7 @@ ] }, { - "begin": "(?i)^\\s*(trait)\\s+([a-z0-9_]+)", + "begin": "(?i)^\\s*(trait)\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)", "beginCaptures": { "1": { "name": "storage.type.trait.php" @@ -1002,7 +1491,7 @@ "name": "entity.name.type.trait.php" } }, - "end": "(?=[{])", + "end": "(?={)", "name": "meta.trait.php", "patterns": [ { @@ -1011,14 +1500,14 @@ ] }, { - "begin": "(?i)(?:^|(?<=<\\?php))\\s*(namespace)\\b\\s+(?=([a-z0-9_\\\\]+\\s*($|[;{]|(\\/[\\/*])))|$)", + "begin": "(?i)(?:^|(?<=<\\?php))\\s*(namespace)\\b\\s+(?=([a-z0-9_\\x{7f}-\\x{ff}\\\\]+\\s*($|[;{]|(/[/*])))|$)", "beginCaptures": { "1": { "name": "keyword.other.namespace.php" } }, "contentName": "entity.name.type.namespace.php", - "end": "(?i)(?=\\s*$|[^a-z0-9_\\\\])", + "end": "(?i)(?=\\s*$|[^a-z0-9_\\x{7f}-\\x{ff}\\\\])", "name": "meta.namespace.php", "patterns": [ { @@ -1028,16 +1517,13 @@ ] }, { - "begin": "(?i)\\s*\\b(use)\\s+(?:((const)|(function))\\s+)?", + "begin": "(?i)\\b(use)\\s+(?:(const|function)\\s+)?", "beginCaptures": { "1": { "name": "keyword.other.use.php" }, - "3": { - "name": "storage.type.const.php" - }, - "4": { - "name": "storage.type.function.php" + "2": { + "name": "storage.type.${2:/downcase}.php" } }, "end": "(?=;|(?:^\\s*$))", @@ -1047,8 +1533,8 @@ "include": "#comments" }, { - "begin": "(?i)\\s*(?=[a-z_0-9\\\\])", - "end": "(?xi)(?:\n \t\t\t (?:\\s*(as)\\b\\s*([a-z_0-9]*)\\s*(?=,|;|$))\n \t\t\t |(?=,|;|$)\n \t\t\t )", + "begin": "(?i)\\s*(?=[a-z0-9_\\x{7f}-\\x{ff}\\\\])", + "end": "(?i)(?:\\s*(as)\\s+([a-z0-9_\\x{7f}-\\x{ff}]*))?\\s*(?=,|;|$)", "endCaptures": { "1": { "name": "keyword.other.use-as.php" @@ -1062,7 +1548,7 @@ "include": "#class-builtin" }, { - "begin": "(?i)\\s*(?=[\\\\a-z_0-9])", + "begin": "(?i)\\s*(?=[a-z0-9_\\x{7f}-\\x{ff}\\\\])", "end": "$|(?=[\\s,;])", "name": "support.other.namespace.use.php", "patterns": [ @@ -1080,10 +1566,10 @@ ] }, { - "begin": "(?i)^\\s*(abstract|final)?\\s*(class)\\s+([a-z0-9_]+)\\s*", + "begin": "(?i)^\\s*(?:(abstract|final)\\s+)?(class)\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)", "beginCaptures": { "1": { - "name": "storage.modifier.abstract.php" + "name": "storage.modifier.${1:/downcase}.php" }, "2": { "name": "storage.type.class.php" @@ -1092,7 +1578,12 @@ "name": "entity.name.type.class.php" } }, - "end": "(?=[;{])", + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.class.end.bracket.curly.php" + } + }, "name": "meta.class.php", "patterns": [ { @@ -1106,11 +1597,11 @@ } }, "contentName": "meta.other.inherited-class.php", - "end": "(?i)(?=[^a-z_0-9\\\\])", + "end": "(?i)(?=[^a-z0-9_\\x{7f}-\\x{ff}\\\\])", "patterns": [ { - "begin": "(?i)(?=\\\\?[a-z_0-9]+\\\\)", - "end": "(?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\\\])", + "begin": "(?i)(?=\\\\?[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*\\\\)", + "end": "(?i)([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?(?=[^a-z0-9_\\x{7f}-\\x{ff}\\\\])", "endCaptures": { "1": { "name": "entity.other.inherited-class.php" @@ -1129,7 +1620,7 @@ "include": "#namespace" }, { - "match": "(?i)[a-z_][a-z_0-9]*", + "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", "name": "entity.other.inherited-class.php" } ] @@ -1147,13 +1638,13 @@ "include": "#comments" }, { - "begin": "(?i)(?=[a-z0-9_\\\\]+)", + "begin": "(?i)(?=[a-z0-9_\\x{7f}-\\x{ff}\\\\]+)", "contentName": "meta.other.inherited-class.php", - "end": "(?i)(?:\\s*(?:,|(?=[^a-z0-9_\\\\\\s]))\\s*)", + "end": "(?i)(?:\\s*(?:,|(?=[^a-z0-9_\\x{7f}-\\x{ff}\\\\\\s]))\\s*)", "patterns": [ { - "begin": "(?i)(?=\\\\?[a-z_0-9]+\\\\)", - "end": "(?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\\\])", + "begin": "(?i)(?=\\\\?[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*\\\\)", + "end": "(?i)([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?(?=[^a-z0-9_\\x{7f}-\\x{ff}\\\\])", "endCaptures": { "1": { "name": "entity.other.inherited-class.php" @@ -1172,31 +1663,42 @@ "include": "#namespace" }, { - "match": "(?i)[a-z_][a-z_0-9]*", + "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", "name": "entity.other.inherited-class.php" } ] } ] + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.class.begin.bracket.curly.php" + } + }, + "end": "(?=})", + "contentName": "meta.class.body.php", + "patterns": [ + { + "include": "#class-body" + } + ] } ] }, { - "captures": { - "1": { - "name": "keyword.control.php" - } - }, - "match": "\\s*\\b((break|c(ase|ontinue)|d(e(clare|fault)|ie|o)|e(lse(if)?|nd(declare|for(each)?|if|switch|while)|xit)|for(each)?|if|return|switch|use|while|yield))\\b" + "match": "(?x)\n\\b(\n break|case|continue|declare|default|die|do|\n else(if)?|end(declare|for(each)?|if|switch|while)|exit|\n for(each)?|if|return|switch|use|while|yield\n)\\b", + "name": "keyword.control.php" }, { - "begin": "(?i)\\b((?:require|include)(?:_once)?)\\b\\s*", + "begin": "(?i)\\b((?:require|include)(?:_once)?)\\s+", "beginCaptures": { "1": { "name": "keyword.control.import.include.php" } }, - "end": "(?=\\s|;|$)", + "end": "(?=\\s|;|$|\\?>)", "name": "meta.include.php", "patterns": [ { @@ -1205,28 +1707,51 @@ ] }, { - "begin": "\\b(catch)\\b\\s*\\(\\s*", + "begin": "\\b(catch)\\s*(\\()", "beginCaptures": { "1": { "name": "keyword.control.exception.catch.php" + }, + "2": { + "name": "punctuation.definition.parameters.begin.bracket.round.php" } }, - "end": "([A-Za-z_][A-Za-z_0-9]*)\\s*((\\$+)[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\\s*\\)", + "end": "\\)", "endCaptures": { - "1": { - "name": "support.class.exception.php" - }, - "2": { - "name": "variable.other.php" - }, - "3": { - "name": "punctuation.definition.variable.php" + "0": { + "name": "punctuation.definition.parameters.end.bracket.round.php" } }, "name": "meta.catch.php", "patterns": [ { "include": "#namespace" + }, + { + "match": "(?xi)\n([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Exception class\n((?:\\s*\\|\\s*[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)*) # Optional additional exception classes\n\\s*\n((\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Variable", + "captures": { + "1": { + "name": "support.class.exception.php" + }, + "2": { + "patterns": [ + { + "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", + "name": "support.class.exception.php" + }, + { + "match": "\\|", + "name": "punctuation.separator.delimiter.php" + } + ] + }, + "3": { + "name": "variable.other.php" + }, + "4": { + "name": "punctuation.definition.variable.php" + } + } } ] }, @@ -1235,7 +1760,7 @@ "name": "keyword.control.exception.php" }, { - "begin": "(?i)\\b(function)\\s*(&\\s*)?(?=\\()", + "begin": "(?i)\\b(function)\\s*(&)?\\s*(?=\\()", "beginCaptures": { "1": { "name": "storage.type.function.php" @@ -1244,26 +1769,26 @@ "name": "storage.modifier.reference.php" } }, - "end": "(?=\\{)", + "end": "(?={)", "name": "meta.function.closure.php", "patterns": [ { - "begin": "(\\()", + "begin": "\\(", "beginCaptures": { - "1": { - "name": "punctuation.definition.parameters.begin.php" + "0": { + "name": "punctuation.definition.parameters.begin.bracket.round.php" } }, - "contentName": "meta.function.arguments.php", - "end": "(\\))", + "contentName": "meta.function.parameters.php", + "end": "\\)", "endCaptures": { - "1": { - "name": "punctuation.definition.parameters.end.php" + "0": { + "name": "punctuation.definition.parameters.end.bracket.round.php" } }, "patterns": [ { - "include": "#function-arguments" + "include": "#function-parameters" } ] }, @@ -1274,29 +1799,29 @@ "name": "keyword.other.function.use.php" }, "2": { - "name": "punctuation.definition.parameters.begin.php" + "name": "punctuation.definition.parameters.begin.bracket.round.php" } }, - "end": "(\\))", + "end": "\\)", "endCaptures": { - "1": { - "name": "punctuation.definition.parameters.end.php" + "0": { + "name": "punctuation.definition.parameters.end.bracket.round.php" } }, "patterns": [ { "captures": { "1": { - "name": "storage.modifier.reference.php" + "name": "variable.other.php" }, "2": { - "name": "variable.other.php" + "name": "storage.modifier.reference.php" }, "3": { "name": "punctuation.definition.variable.php" } }, - "match": "(?:\\s*(&))?\\s*((\\$+)[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\\s*(?=,|\\))", + "match": "(?i)((&)?\\s*(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\\s*(?=,|\\))", "name": "meta.function.closure.use.php" } ] @@ -1304,7 +1829,7 @@ ] }, { - "begin": "(?x)\\s*\n\t\t\t\t\t ((?:(?:final|abstract|public|private|protected|static)\\s+)*)\n\t\t\t\t (function)\n\t\t\t\t (?:\\s+|(\\s*&\\s*))\n\t\t\t\t (?:\n\t\t\t\t (__(?:call|construct|debugInfo|destruct|get|set|isset|unset|tostring|clone|set_state|sleep|wakeup|autoload|invoke|callStatic))\n\t\t\t\t |([a-zA-Z0-9_]+)\n\t\t\t\t )\n\t\t\t\t \\s*\n\t\t\t\t (\\()", + "begin": "(?x)\n((?:(?:final|abstract|public|private|protected|static)\\s+)*)\n(function)\n\\s*(&)?\\s*\n(?i:\n (__(?:call|construct|debugInfo|destruct|get|set|isset|unset|tostring|\n clone|set_state|sleep|wakeup|autoload|invoke|callStatic))\n |([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\n)\n\\s*(\\()", "beginCaptures": { "1": { "patterns": [ @@ -1327,20 +1852,26 @@ "name": "entity.name.function.php" }, "6": { - "name": "punctuation.definition.parameters.begin.php" + "name": "punctuation.definition.parameters.begin.bracket.round.php" } }, - "contentName": "meta.function.arguments.php", - "end": "(\\))", + "contentName": "meta.function.parameters.php", + "end": "(\\))(?:\\s*(:)\\s*([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*))?", "endCaptures": { "1": { - "name": "punctuation.definition.parameters.end.php" + "name": "punctuation.definition.parameters.end.bracket.round.php" + }, + "2": { + "name": "keyword.operator.return-value.php" + }, + "3": { + "name": "storage.type.php" } }, "name": "meta.function.php", "patterns": [ { - "include": "#function-arguments" + "include": "#function-parameters" } ] }, @@ -1348,37 +1879,7 @@ "include": "#invoke-call" }, { - "begin": "(?xi)\\s*(?=\n\t\t\t\t [a-z_0-9$\\\\]+(::)\n (?:\n \t\t\t\t ([a-z_][a-z_0-9]*)\\s*\\(\n \t\t\t\t |\n \t\t\t\t ((\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\n \t\t\t\t |\n \t\t\t\t ([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\n \t\t\t\t)?\n\t\t\t\t )", - "end": "(?x)(::)\n (?:\n \t\t\t\t ([A-Za-z_][A-Za-z_0-9]*)\\s*\\(\n \t\t\t\t |\n \t\t\t\t ((\\$+)[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\n \t\t\t\t |\n \t\t\t\t ([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\n \t\t\t\t)?", - "endCaptures": { - "1": { - "name": "keyword.operator.class.php" - }, - "2": { - "name": "meta.function-call.static.php" - }, - "3": { - "name": "variable.other.class.php" - }, - "4": { - "name": "punctuation.definition.variable.php" - }, - "5": { - "name": "constant.other.class.php" - } - }, - "patterns": [ - { - "match": "(self|static|parent)\\b", - "name": "storage.type.php" - }, - { - "include": "#class-name" - }, - { - "include": "#variable-name" - } - ] + "include": "#scope-resolution" }, { "include": "#variables" @@ -1392,10 +1893,10 @@ "name": "support.function.construct.php" }, "2": { - "name": "punctuation.definition.array.begin.php" + "name": "punctuation.definition.array.begin.bracket.round.php" }, "3": { - "name": "punctuation.definition.array.end.php" + "name": "punctuation.definition.array.end.bracket.round.php" } }, "match": "(array)(\\()(\\))", @@ -1408,13 +1909,13 @@ "name": "support.function.construct.php" }, "2": { - "name": "punctuation.definition.array.begin.php" + "name": "punctuation.definition.array.begin.bracket.round.php" } }, "end": "\\)", "endCaptures": { "0": { - "name": "punctuation.definition.array.end.php" + "name": "punctuation.definition.array.end.bracket.round.php" } }, "name": "meta.array.php", @@ -1425,19 +1926,25 @@ ] }, { + "match": "(?i)(\\()\\s*(array|real|double|float|int(?:eger)?|bool(?:ean)?|string|object|binary|unset)\\s*(\\))", "captures": { "1": { + "name": "punctuation.definition.storage-type.begin.bracket.round.php" + }, + "2": { "name": "storage.type.php" + }, + "3": { + "name": "punctuation.definition.storage-type.end.bracket.round.php" } - }, - "match": "(?i)\\s*\\(\\s*(array|real|double|float|int(eger)?|bool(ean)?|string|object|binary|unset)\\s*\\)" + } }, { "match": "(?i)\\b(array|real|double|float|int(eger)?|bool(ean)?|string|class|clone|var|function|interface|trait|parent|self|object)\\b", "name": "storage.type.php" }, { - "match": "(?i)\\b(global|abstract|const|extends|implements|final|p(r(ivate|otected)|ublic)|static)\\b", + "match": "(?i)\\b(global|abstract|const|extends|implements|final|private|protected|public|static)\\b", "name": "storage.modifier.php" }, { @@ -1470,14 +1977,14 @@ "name": "storage.modifier.reference.php" } }, - "match": "(?:(\\=)(&))|(&(?=[$A-Za-z_]))" + "match": "(?i)(\\=)(&)|(&)(?=[$a-z_])" }, { - "match": "(@)", + "match": "@", "name": "keyword.operator.error-control.php" }, { - "match": "(===|==|!==|!=|<>)", + "match": "===|==|!==|!=|<>", "name": "keyword.operator.comparison.php" }, { @@ -1485,15 +1992,15 @@ "name": "keyword.operator.assignment.php" }, { - "match": "(<=>|<=|>=|<|>)", + "match": "<=>|<=|>=|<|>", "name": "keyword.operator.comparison.php" }, { - "match": "(\\-\\-|\\+\\+)", + "match": "\\-\\-|\\+\\+", "name": "keyword.operator.increment-decrement.php" }, { - "match": "(\\-|\\+|\\*|/|%)", + "match": "\\-|\\+|\\*|/|%", "name": "keyword.operator.arithmetic.php" }, { @@ -1508,13 +2015,13 @@ "name": "keyword.operator.bitwise.php" }, { - "begin": "(?i)\\b(instanceof)\\b\\s+(?=[\\\\$a-z_])", + "begin": "(?i)\\b(instanceof)\\s+(?=[\\\\$a-z_])", "beginCaptures": { "1": { "name": "keyword.operator.type.php" } }, - "end": "(?=[^\\\\$A-Za-z_0-9])", + "end": "(?=[^\\\\$a-z0-9_\\x{7f}-\\x{ff}])", "patterns": [ { "include": "#class-name" @@ -1539,7 +2046,7 @@ "name": "support.other.php" } }, - "match": "(?i)(goto)\\s+([a-z_][a-z_0-9]*)" + "match": "(?i)(goto)\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)" }, { "captures": { @@ -1547,7 +2054,7 @@ "name": "entity.name.goto-label.php" } }, - "match": "(?i)^\\s*([a-z_][a-z_0-9]*)\\s*:" + "match": "(?i)^\\s*([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\\s*:(?!:)" }, { "include": "#string-backtick" @@ -1571,13 +2078,32 @@ } ] }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.begin.bracket.round.php" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.end.bracket.round.php" + } + }, + "patterns": [ + { + "include": "#language" + } + ] + }, { "include": "#constants" } ] }, "namespace": { - "begin": "(?i)(?:(namespace)|[a-z0-9_]+)?(\\\\)(?=.*?[^a-z_0-9\\\\])", + "begin": "(?i)(?:(namespace)|[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?(\\\\)(?=.*?[^a-z0-9_\\x{7f}-\\x{ff}\\\\])", "beginCaptures": { "1": { "name": "variable.language.namespace.php" @@ -1586,27 +2112,23 @@ "name": "punctuation.separator.inheritance.php" } }, - "end": "(?i)(?=[a-z0-9_]*[^a-z0-9_\\\\])", + "end": "(?i)(?=[a-z0-9_\\x{7f}-\\x{ff}]*[^a-z0-9_\\x{7f}-\\x{ff}\\\\])", "name": "support.other.namespace.php", "patterns": [ { - "captures": { - "1": { - "name": "punctuation.separator.inheritance.php" - } - }, - "match": "(?i)(\\\\)" + "match": "\\\\", + "name": "punctuation.separator.inheritance.php" } ] }, "numbers": { - "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)\\b", + "match": "(?i)\\b((0x[0-9a-f]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))(e(\\+|-)?[0-9]+)?)\\b", "name": "constant.numeric.php" }, "object": { "patterns": [ { - "begin": "(->)(\\$?\\{)", + "begin": "(->)(\\$?{)", "beginCaptures": { "1": { "name": "keyword.operator.class.php" @@ -1615,9 +2137,9 @@ "name": "punctuation.definition.variable.php" } }, - "end": "(\\})", + "end": "}", "endCaptures": { - "1": { + "0": { "name": "punctuation.definition.variable.php" } }, @@ -1628,21 +2150,44 @@ ] }, { - "captures": { + "begin": "(?i)(->)([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\\s*(\\()", + "beginCaptures": { "1": { "name": "keyword.operator.class.php" }, "2": { - "name": "meta.function-call.object.php" + "name": "entity.name.function.php" }, "3": { + "name": "punctuation.definition.arguments.begin.bracket.round.php" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.end.bracket.round.php" + } + }, + "name": "meta.method-call.php", + "patterns": [ + { + "include": "#language" + } + ] + }, + { + "captures": { + "1": { + "name": "keyword.operator.class.php" + }, + "2": { "name": "variable.other.property.php" }, - "4": { + "3": { "name": "punctuation.definition.variable.php" } }, - "match": "(?x)(->)\n \t\t\t\t(?:\n \t\t\t\t ([A-Za-z_][A-Za-z_0-9]*)\\s*\\(\n \t\t\t\t |\n \t\t\t\t ((\\$+)?[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\n \t\t\t\t)?" + "match": "(?i)(->)((\\$+)?[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?" } ] }, @@ -1679,13 +2224,13 @@ "name": "support.function.construct.php" }, "2": { - "name": "punctuation.definition.array.begin.php" + "name": "punctuation.definition.array.begin.bracket.round.php" } }, "end": "\\)", "endCaptures": { "0": { - "name": "punctuation.definition.array.end.php" + "name": "punctuation.definition.array.end.bracket.round.php" } }, "name": "meta.array.php", @@ -1699,7 +2244,7 @@ "include": "#instantiation" }, { - "begin": "(?xi)\\s*(?=\n\t\t\t\t [a-z_0-9\\\\]+(::)\n \t\t\t\t ([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?\n\t\t\t\t )", + "begin": "(?xi)\n(?=[a-z0-9_\\x{7f}-\\x{ff}\\\\]+(::)\n ([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?\n)", "end": "(?i)(::)([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?", "endCaptures": { "1": { @@ -1723,8 +2268,7 @@ "php_doc": { "patterns": [ { - "comment": "PHPDocumentor only recognises lines with an asterisk as the first non-whitespaces character", - "match": "^(?!\\s*\\*).*$\\n?", + "match": "^(?!\\s*\\*).*?(?:(?=\\*\\/)|$\\n?)", "name": "invalid.illegal.missing-asterisk.phpdoc.php" }, { @@ -1753,7 +2297,7 @@ "match": "(@xlink)\\s+(.+)\\s*$" }, { - "match": "\\@(a(pi|bstract|uthor)|c(ategory|opyright)|example|global|internal|li(cense|nk)|method|p(roperty(\\-read|\\-write|)|ackage|aram)|return|s(ee|ince|ource|tatic|ubpackage)|t(hrows|odo)|v(ar|ersion)|uses|deprecated|final|ignore)\\b", + "match": "(?x)\n@\n(\n api|abstract|author|category|copyright|example|global|inherit[Dd]oc|internal|\n license|link|method|property(-(read|write))?|package|param|return|see|since|source|\n static|subpackage|throws|todo|var|version|uses|deprecated|final|ignore\n)\\b", "name": "keyword.other.phpdoc.php" }, { @@ -1762,13 +2306,13 @@ "name": "keyword.other.phpdoc.php" } }, - "match": "\\{(@(link)).+?\\}", + "match": "{(@(link|inherit[Dd]oc)).+?}", "name": "meta.tag.inline.phpdoc.php" } ] }, "regex-double-quoted": { - "begin": "(?x)\"/ (?= (\\\\.|[^\"/])++/[imsxeADSUXu]*\" )", + "begin": "\"/(?=(\\\\.|[^\"/])++/[imsxeADSUXu]*\")", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.php" @@ -1783,7 +2327,6 @@ "name": "string.regexp.double-quoted.php", "patterns": [ { - "comment": "Escaped from the regexp – there can also be 2 backslashes (since 1 will escape the first)", "match": "(\\\\){1,2}[.$^\\[\\]{}]", "name": "constant.character.escape.regex.php" }, @@ -1799,7 +2342,7 @@ "name": "punctuation.definition.arbitrary-repetition.php" } }, - "match": "(\\{)\\d+(,\\d+)?(\\})", + "match": "({)\\d+(,\\d+)?(})", "name": "string.regexp.arbitrary-repetition.php" }, { @@ -1824,7 +2367,7 @@ ] }, "regex-single-quoted": { - "begin": "(?x)'/ (?= ( \\\\ (?: \\\\ (?: \\\\ [\\\\']? | [^'] ) | . ) | [^'/] )++/[imsxeADSUXu]*' )", + "begin": "'/(?=(\\\\(?:\\\\(?:\\\\[\\\\']?|[^'])|.)|[^'/])++/[imsxeADSUXu]*')", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.php" @@ -1850,7 +2393,7 @@ "name": "punctuation.definition.arbitrary-repetition.php" } }, - "match": "(\\{)\\d+(,\\d+)?(\\})", + "match": "({)\\d+(,\\d+)?(})", "name": "string.regexp.arbitrary-repetition.php" }, { @@ -1869,13 +2412,89 @@ } ] }, + "scope-resolution": { + "patterns": [ + { + "match": "(?i)\\b([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)(?=\\s*::)", + "captures": { + "1": { + "patterns": [ + { + "match": "\\b(self|static|parent)\\b", + "name": "storage.type.php" + }, + { + "include": "#class-name" + }, + { + "include": "#variable-name" + } + ] + } + } + }, + { + "begin": "(?i)(::)\\s*([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "keyword.operator.class.php" + }, + "2": { + "name": "entity.name.function.php" + }, + "3": { + "name": "punctuation.definition.arguments.begin.bracket.round.php" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.arguments.end.bracket.round.php" + } + }, + "name": "meta.method-call.static.php", + "patterns": [ + { + "include": "#language" + } + ] + }, + { + "match": "(?i)(::)\\s*(class)\\b", + "captures": { + "1": { + "name": "keyword.operator.class.php" + }, + "2": { + "name": "keyword.other.class.php" + } + } + }, + { + "match": "(?xi)\n(::)\\s*\n(?:\n ((\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Variable\n |\n ([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Constant\n)?", + "captures": { + "1": { + "name": "keyword.operator.class.php" + }, + "2": { + "name": "variable.other.class.php" + }, + "3": { + "name": "punctuation.definition.variable.php" + }, + "4": { + "name": "constant.other.class.php" + } + } + } + ] + }, "single_quote_regex_escape": { - "comment": "Support both PHP string and regex escaping", - "match": "(?x) \\\\ (?: \\\\ (?: \\\\ [\\\\']? | [^'] ) | . )", + "match": "\\\\(?:\\\\(?:\\\\[\\\\']?|[^'])|.)", "name": "constant.character.escape.php" }, "sql-string-double-quoted": { - "begin": "\"\\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER)\\b)", + "begin": "\"\\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER|AND)\\b)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.php" @@ -1891,24 +2510,32 @@ "name": "string.quoted.double.sql.php", "patterns": [ { - "match": "#(\\\\\"|[^\"])*(?=\"|$\\n?)", - "name": "comment.line.number-sign.sql" + "match": "(#)(\\\\\"|[^\"])*(?=\"|$)", + "name": "comment.line.number-sign.sql", + "captures": { + "1": { + "name": "punctuation.definition.comment.sql" + } + } }, { - "match": "--(\\\\\"|[^\"])*(?=\"|$\\n?)", - "name": "comment.line.double-dash.sql" + "match": "(--)(\\\\\"|[^\"])*(?=\"|$)", + "name": "comment.line.double-dash.sql", + "captures": { + "1": { + "name": "punctuation.definition.comment.sql" + } + } }, { "match": "\\\\[\\\\\"`']", "name": "constant.character.escape.php" }, { - "comment": "Unclosed strings must be captured to avoid them eating the remainder of the PHP script\n\t\t\t\t\tSample case: $sql = \"SELECT * FROM bar WHERE foo = '\" . $variable . \"'\"", "match": "'(?=((\\\\')|[^'\"])*(\"|$))", "name": "string.quoted.single.unclosed.sql" }, { - "comment": "Unclosed strings must be captured to avoid them eating the remainder of the PHP script\n\t\t\t\t\tSample case: $sql = \"SELECT * FROM bar WHERE foo = '\" . $variable . \"'\"", "match": "`(?=((\\\\`)|[^`\"])*(\"|$))", "name": "string.quoted.other.backtick.unclosed.sql" }, @@ -1941,7 +2568,7 @@ ] }, "sql-string-single-quoted": { - "begin": "'\\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER)\\b)", + "begin": "'\\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER|AND)\\b)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.php" @@ -1957,24 +2584,32 @@ "name": "string.quoted.single.sql.php", "patterns": [ { - "match": "#(\\\\'|[^'])*(?='|$\\n?)", - "name": "comment.line.number-sign.sql" + "match": "(#)(\\\\'|[^'])*(?='|$)", + "name": "comment.line.number-sign.sql", + "captures": { + "1": { + "name": "punctuation.definition.comment.sql" + } + } }, { - "match": "--(\\\\'|[^'])*(?='|$\\n?)", - "name": "comment.line.double-dash.sql" + "match": "(--)(\\\\'|[^'])*(?='|$)", + "name": "comment.line.double-dash.sql", + "captures": { + "1": { + "name": "punctuation.definition.comment.sql" + } + } }, { "match": "\\\\[\\\\'`\"]", "name": "constant.character.escape.php" }, { - "comment": "Unclosed strings must be captured to avoid them eating the remainder of the PHP script\n\t\t\t\t\tSample case: $sql = \"SELECT * FROM bar WHERE foo = '\" . $variable . \"'\"", "match": "`(?=((\\\\`)|[^`'])*('|$))", "name": "string.quoted.other.backtick.unclosed.sql" }, { - "comment": "Unclosed strings must be captured to avoid them eating the remainder of the PHP script\n\t\t\t\t\tSample case: $sql = \"SELECT * FROM bar WHERE foo = '\" . $variable . \"'\"", "match": "\"(?=((\\\\\")|[^\"'])*('|$))", "name": "string.quoted.double.unclosed.sql" }, @@ -2014,8 +2649,6 @@ "name": "punctuation.definition.string.begin.php" } }, - "comment": "This contentName is just to allow the usage of “select scope” to select the string contents first, then the string with quotes", - "contentName": "meta.string-contents.quoted.double.php", "end": "\"", "endCaptures": { "0": { @@ -2036,7 +2669,6 @@ "name": "punctuation.definition.string.begin.php" } }, - "contentName": "meta.string-contents.quoted.single.php", "end": "'", "endCaptures": { "0": { @@ -2076,19 +2708,19 @@ "support": { "patterns": [ { - "match": "(?i)\\bapc_(s(tore|ma_info)|c(ompile_file|lear_cache|a(s|che_info))|inc|de(c|fine_constants|lete(_file)?)|exists|fetch|load_constants|add|bin_(dump(file)?|load(file)?))\\b", + "match": "(?xi)\n\\b\napc_(\n store|sma_info|compile_file|clear_cache|cas|cache_info|inc|dec|define_constants|delete(_file)?|\n exists|fetch|load_constants|add|bin_(dump|load)(file)?\n)\\b", "name": "support.function.apc.php" }, { - "match": "(?i)\\b(s(huffle|izeof|ort)|n(ext|at(sort|casesort))|c(o(unt|mpact)|urrent)|in_array|u(sort|ksort|asort)|p(os|rev)|e(nd|ach|xtract)|k(sort|ey(_exists)?|rsort)|list|a(sort|r(sort|ray(_(s(hift|um|plice|earch|lice)|c(h(unk|ange_key_case)|o(unt_values|lumn|mbine))|intersect(_(u(key|assoc)|key|assoc))?|diff(_(u(key|assoc)|key|assoc))?|u(n(shift|ique)|intersect(_(uassoc|assoc))?|diff(_(uassoc|assoc))?)|p(op|ush|ad|roduct)|values|key(s|_exists)|f(il(ter|l(_keys)?)|lip)|walk(_recursive)?|r(e(duce|place(_recursive)?|verse)|and)|m(ultisort|erge(_recursive)?|ap)))?))|r(sort|eset|ange))\\b", + "match": "(?xi)\\b\n(\n shuffle|sizeof|sort|next|nat(case)?sort|count|compact|current|in_array|usort|uksort|uasort|\n pos|prev|end|each|extract|ksort|key(_exists)?|krsort|list|asort|arsort|rsort|reset|range|\n array(_(shift|sum|splice|search|slice|chunk|change_key_case|count_values|column|combine|\n (diff|intersect)(_(u)?(key|assoc))?|u(diff|intersect)(_(u)?assoc)?|unshift|unique|\n pop|push|pad|product|values|keys|key_exists|filter|fill(_keys)?|flip|walk(_recursive)?|\n reduce|replace(_recursive)?|reverse|rand|multisort|merge(_recursive)?|map)?)\n)\\b", "name": "support.function.array.php" }, { - "match": "(?i)\\b(s(how_source|ys_getloadavg|leep)|highlight_(string|file)|con(stant|nection_(status|aborted))|time_(sleep_until|nanosleep)|ignore_user_abort|d(ie|efine(d)?)|u(sleep|n(iqid|pack))|__halt_compiler|p(hp_(strip_whitespace|check_syntax)|ack)|e(val|xit)|get_browser)\\b", + "match": "(?xi)\\b\n(\n show_source|sys_getloadavg|sleep|highlight_(file|string)|constant|connection_(aborted|status)|\n time_(nanosleep|sleep_until)|ignore_user_abort|die|define(d)?|usleep|uniqid|unpack|__halt_compiler|\n php_(check_syntax|strip_whitespace)|pack|eval|exit|get_browser\n)\\b", "name": "support.function.basic_functions.php" }, { - "match": "(?i)\\bbc(s(cale|ub|qrt)|comp|div|pow(mod)?|add|m(od|ul))\\b", + "match": "(?i)\\bbc(scale|sub|sqrt|comp|div|pow(mod)?|add|mod|mul)\\b", "name": "support.function.bcmath.php" }, { @@ -2096,75 +2728,83 @@ "name": "support.function.blenc.php" }, { - "match": "(?i)\\bbz(c(ompress|lose)|open|decompress|err(str|no|or)|flush|write|read)\\b", + "match": "(?i)\\bbz(compress|close|open|decompress|errstr|errno|error|flush|write|read)\\b", "name": "support.function.bz2.php" }, { - "match": "(?i)\\b(GregorianToJD|cal_(to_jd|info|days_in_month|from_jd)|unixtojd|jdto(unix|jewish)|easter_da(ys|te)|J(ulianToJD|ewishToJD|D(MonthName|To(Gregorian|Julian|French)|DayOfWeek))|FrenchToJD)\\b", + "match": "(?xi)\\b\n(\n (French|Gregorian|Jewish|Julian)ToJD|cal_(to_jd|info|days_in_month|from_jd)|unixtojd|\n jdto(unix|jewish)|easter_(date|days)|JD(MonthName|To(Gregorian|Julian|French)|DayOfWeek)\n)\\b", "name": "support.function.calendar.php" }, { - "match": "(?i)\\b(c(lass_(exists|alias)|all_user_method(_array)?)|trait_exists|i(s_(subclass_of|a)|nterface_exists)|__autoload|property_exists|get_(c(lass(_(vars|methods))?|alled_class)|object_vars|declared_(classes|traits|interfaces)|parent_class)|method_exists)\\b", + "match": "(?xi)\\b\n(\n class_alias|all_user_method(_array)?|is_(a|subclass_of)|__autoload|(class|interface|method|property|trait)_exists|\n get_(class(_(vars|methods))?|(called|parent)_class|object_vars|declared_(classes|interfaces|traits))\n)\\b", "name": "support.function.classobj.php" }, { - "match": "(?i)\\b(com_(create_guid|print_typeinfo|event_sink|load_typelib|get_active_object|message_pump)|variant_(s(ub|et(_type)?)|n(ot|eg)|c(a(st|t)|mp)|i(nt|div|mp)|or|d(iv|ate_(to_timestamp|from_timestamp))|pow|eqv|fix|a(nd|dd|bs)|round|get_type|xor|m(od|ul)))\\b", + "match": "(?xi)\\b\n(\n com_(create_guid|print_typeinfo|event_sink|load_typelib|get_active_object|message_pump)|\n variant_(sub|set(_type)?|not|neg|cast|cat|cmp|int|idiv|imp|or|div|date_(from|to)_timestamp|\n pow|eqv|fix|and|add|abs|round|get_type|xor|mod|mul)\n)\\b", "name": "support.function.com.php" }, { - "match": "(?i)\\bctype_(space|cntrl|digit|upper|p(unct|rint)|lower|al(num|pha)|graph|xdigit)\\b", + "begin": "(?i)\\b(isset|unset|eval|empty|list)\\b", + "name": "support.function.construct.php" + }, + { + "match": "(?i)\\b(print|echo)\\b", + "name": "support.function.construct.output.php" + }, + { + "match": "(?i)\\bctype_(space|cntrl|digit|upper|punct|print|lower|alnum|alpha|graph|xdigit)\\b", "name": "support.function.ctype.php" }, { - "match": "(?i)\\bcurl_(s(hare_(setopt|close|init)|trerror|etopt(_array)?)|c(opy_handle|lose)|init|unescape|pause|e(scape|rr(no|or)|xec)|version|file_create|reset|getinfo|multi_(s(trerror|e(topt|lect))|close|in(it|fo_read)|exec|add_handle|remove_handle|getcontent))\\b", + "match": "(?xi)\\b\ncurl_(\n share_(close|init|setopt)|strerror|setopt(_array)?|copy_handle|close|init|unescape|pause|escape|\n errno|error|exec|version|file_create|reset|getinfo|\n multi_(strerror|setopt|select|close|init|info_read|(add|remove)_handle|getcontent|exec)\n)\\b", "name": "support.function.curl.php" }, { - "match": "(?i)\\b(str(totime|ptime|ftime)|checkdate|time(zone_(name_(from_abbr|get)|transitions_get|identifiers_list|o(pen|ffset_get)|version_get|location_get|abbreviations_list))?|idate|date(_(su(n(set|_info|rise)|b)|create(_(immutable(_from_format)?|from_format))?|time(stamp_(set|get)|zone_(set|get)|_set)|i(sodate_set|nterval_(create_from_date_string|format))|offset_get|d(iff|efault_timezone_(set|get)|ate_set)|parse(_from_format)?|format|add|get_last_errors|modify))?|localtime|g(et(timeofday|date)|m(strftime|date|mktime))|m(icrotime|ktime))\\b", + "match": "(?xi)\\b\n(\n strtotime|str[fp]time|checkdate|time|timezone_name_(from_abbr|get)|idate|\n timezone_((location|offset|transitions|version)_get|(abbreviations|identifiers)_list|open)|\n date(_(sun(rise|set)|sun_info|sub|create(_(immutable_)?from_format)?|timestamp_(get|set)|timezone_(get|set)|time_set|\n isodate_set|interval_(create_from_date_string|format)|offset_get|diff|default_timezone_(get|set)|date_set|\n parse(_from_format)?|format|add|get_last_errors|modify))?|\n localtime|get(date|timeofday)|gm(strftime|date|mktime)|microtime|mktime\n)\\b", "name": "support.function.datetime.php" }, { - "match": "(?i)\\bdba_(sync|handlers|nextkey|close|insert|op(timize|en)|delete|popen|exists|key_split|f(irstkey|etch)|list|replace)\\b", + "match": "(?i)\\bdba_(sync|handlers|nextkey|close|insert|optimize|open|delete|popen|exists|key_split|firstkey|fetch|list|replace)\\b", "name": "support.function.dba.php" }, { - "match": "(?i)\\bdbx_(sort|c(o(nnect|mpare)|lose)|e(scape_string|rror)|query|fetch_row)\\b", + "match": "(?i)\\bdbx_(sort|connect|compare|close|escape_string|error|query|fetch_row)\\b", "name": "support.function.dbx.php" }, { - "match": "(?i)\\b(scandir|c(h(dir|root)|losedir)|opendir|dir|re(winddir|addir)|getcwd)\\b", + "match": "(?i)\\b(scandir|chdir|chroot|closedir|opendir|dir|rewinddir|readdir|getcwd)\\b", "name": "support.function.dir.php" }, { - "match": "(?i)\\beio_(s(y(nc(_file_range|fs)?|mlink)|tat(vfs)?|e(ndfile|t_m(in_parallel|ax_(idle|p(oll_(time|reqs)|arallel)))|ek))|n(threads|op|pending|re(qs|ady))|c(h(own|mod)|ustom|lose|ancel)|truncate|init|open|dup2|u(nlink|time)|poll|event_loop|f(s(ync|tat(vfs)?)|ch(own|mod)|truncate|datasync|utime|allocate)|write|l(stat|ink)|r(e(name|a(d(dir|link|ahead)?|lpath))|mdir)|g(et_(event_stream|last_error)|rp(_(cancel|limit|add))?)|mk(nod|dir)|busy)\\b", + "match": "(?xi)\\b\neio_(\n sync(fs)?|sync_file_range|symlink|stat(vfs)?|sendfile|set_min_parallel|set_max_(idle|poll_(reqs|time)|parallel)|\n seek|n(threads|op|pending|reqs|ready)|chown|chmod|custom|close|cancel|truncate|init|open|dup2|unlink|utime|poll|\n event_loop|f(sync|stat(vfs)?|chown|chmod|truncate|datasync|utime|allocate)|write|lstat|link|rename|realpath|\n read(ahead|dir|link)?|rmdir|get_(event_stream|last_error)|grp(_(add|cancel|limit))?|mknod|mkdir|busy\n)\\b", "name": "support.function.eio.php" }, { - "match": "(?i)\\benchant_(dict_(s(tore_replacement|uggest)|check|is_in_session|describe|quick_check|add_to_(session|personal)|get_error)|broker_(set_ordering|init|d(ict_exists|escribe)|free(_dict)?|list_dicts|request_(dict|pwl_dict)|get_error))\\b", + "match": "(?xi)\\b\nenchant_(\n dict_(store_replacement|suggest|check|is_in_session|describe|quick_check|add_to_(personal|session)|get_error)|\n broker_(set_ordering|init|dict_exists|describe|free(_dict)?|list_dicts|request_(pwl_)?dict|get_error)\n)\\b", "name": "support.function.enchant.php" }, { - "match": "(?i)\\b(s(plit(i)?|ql_regcase)|ereg(i(_replace)?|_replace)?)\\b", + "match": "(?i)\\bsplit(i)?|sql_regcase|ereg(i)?(_replace)?\\b", "name": "support.function.ereg.php" }, { - "match": "(?i)\\b(set_e(rror_handler|xception_handler)|trigger_error|debug_(print_backtrace|backtrace)|user_error|error_(log|reporting|get_last)|restore_e(rror_handler|xception_handler))\\b", + "match": "(?i)\\b((restore|set)_(error_handler|exception_handler)|trigger_error|debug_(print_)?backtrace|user_error|error_(log|reporting|get_last))\\b", "name": "support.function.errorfunc.php" }, { - "match": "(?i)\\b(s(hell_exec|ystem)|p(assthru|roc_(nice|close|terminate|open|get_status))|e(scapeshell(cmd|arg)|xec))\\b", + "match": "(?i)\\bshell_exec|system|passthru|proc_(nice|close|terminate|open|get_status)|escapeshell(arg|cmd)|exec\\b", "name": "support.function.exec.php" }, { - "match": "(?i)\\b(exif_(t(humbnail|agname)|imagetype|read_data)|read_exif_data)\\b", + "match": "(?i)\\b(exif_(thumbnail|tagname|imagetype|read_data)|read_exif_data)\\b", "name": "support.function.exif.php" }, { - "match": "(?i)\\bfann_(s(huffle_train_data|cale_(train(_data)?|input(_train_data)?|output(_train_data)?)|ubset_train_data|et_(s(caling_params|arprop_(step_error_(shift|threshold_factor)|temperature|weight_decay_shift))|ca(scade_(num_candidate_groups|candidate_(stagnation_epochs|change_fraction|limit)|output_(stagnation_epochs|change_fraction)|weight_multiplier|activation_(steepnesses|functions)|m(in_(cand_epochs|out_epochs)|ax_(cand_epochs|out_epochs)))|llback)|train(ing_algorithm|_(stop_function|error_function))|input_scaling_params|output_scaling_params|error_log|quickprop_(decay|mu)|weight(_array)?|learning_(rate|momentum)|activation_(steepness(_(hidden|output|layer))?|function(_(hidden|output|layer))?)|rprop_(increase_factor|de(crease_factor|lta_(zero|m(in|ax))))|bit_fail_limit)|ave(_train)?)|num_(input_train_data|output_train_data)|c(opy|lear_scaling_params|ascadetrain_on_(data|file)|reate_(s(hortcut(_array)?|tandard(_array)?|parse(_array)?)|train(_from_callback)?|from_file))|t(est(_data)?|rain(_(on_(data|file)|epoch))?)|init_weights|d(uplicate_train_data|es(cale_(train|input|output)|troy(_train)?))|print_error|length_train_data|r(un|e(set_(MSE|err(str|no))|ad_train_from_file)|andomize_weights)|get_(sarprop_(step_error_(shift|threshold_factor)|temperature|weight_decay_shift)|n(um_(input|output|layers)|etwork_type)|MSE|c(onnection_(array|rate)|ascade_(num_candidate(s|_groups)|candidate_(stagnation_epochs|change_fraction|limit)|output_(stagnation_epochs|change_fraction)|weight_multiplier|activation_(steepnesses(_count)?|functions(_count)?)|m(in_(cand_epochs|out_epochs)|ax_(cand_epochs|out_epochs))))|t(otal_(neurons|connections)|rain(ing_algorithm|_(stop_function|error_function)))|err(str|no)|quickprop_(decay|mu)|l(earning_(rate|momentum)|ayer_array)|activation_(steepness|function)|rprop_(increase_factor|de(crease_factor|lta_(zero|m(in|ax))))|bi(t_fail(_limit)?|as_array))|merge_train_data)\\b", + "match": "(?xi)\\b\nfann_(\n (duplicate|length|merge|shuffle|subset)_train_data|scale_(train(_data)?|(input|output)(_train_data)?)|\n set_(scaling_params|sarprop_(step_error_(shift|threshold_factor)|temperature|weight_decay_shift)|\n cascade_(num_candidate_groups|candidate_(change_fraction|limit|stagnation_epochs)|\n output_(change_fraction|stagnation_epochs)|weight_multiplier|activation_(functions|steepnesses)|\n (max|min)_(cand|out)_epochs)|\n callback|training_algorithm|train_(error|stop)_function|(input|output)_scaling_params|error_log|\n quickprop_(decay|mu)|weight(_array)?|learning_(momentum|rate)|bit_fail_limit|\n activation_(function|steepness)(_(hidden|layer|output))?|\n rprop_((decrease|increase)_factor|delta_(max|min|zero)))|\n save(_train)?|num_(input|output)_train_data|copy|clear_scaling_params|cascadetrain_on_(file|data)|\n create_((sparse|shortcut|standard)(_array)?|train(_from_callback)?|from_file)|\n test(_data)?|train(_(on_(file|data)|epoch))?|init_weights|descale_(input|output|train)|destroy(_train)?|\n print_error|run|reset_(MSE|err(no|str))|read_train_from_file|randomize_weights|\n get_(sarprop_(step_error_(shift|threshold_factor)|temperature|weight_decay_shift)|num_(input|output|layers)|\n network_type|MSE|connection_(array|rate)|bias_array|bit_fail(_limit)?|\n cascade_(num_(candidates|candidate_groups)|(candidate|output)_(change_fraction|limit|stagnation_epochs)|\n weight_multiplier|activation_(functions|steepnesses)(_count)?|(max|min)_(cand|out)_epochs)|\n total_(connections|neurons)|training_algorithm|train_(error|stop)_function|err(no|str)|\n quickprop_(decay|mu)|learning_(momentum|rate)|layer_array|activation_(function|steepness)|\n rprop_((decrease|increase)_factor|delta_(max|min|zero)))\n)\\b", "name": "support.function.fann.php" }, { - "match": "(?i)\\b(s(ymlink|tat|et_file_buffer)|c(h(own|grp|mod)|opy|learstatcache)|t(ouch|empnam|mpfile)|is_(dir|uploaded_file|executable|file|writ(eable|able)|link|readable)|d(i(sk(_(total_space|free_space)|freespace)|rname)|elete)|u(nlink|mask)|p(close|open|a(thinfo|rse_ini_(string|file)))|f(s(canf|tat|eek)|nmatch|close|t(ell|runcate)|ile(size|ctime|type|inode|owner|_(put_contents|exists|get_contents)|perms|atime|group|mtime)?|open|p(ut(s|csv)|assthru)|eof|flush|write|lock|read|get(s(s)?|c(sv)?))|l(stat|ch(own|grp)|ink(info)?)|r(e(name|wind|a(d(file|link)|lpath(_cache_(size|get))?))|mdir)|glob|m(ove_uploaded_file|kdir)|basename)\\b", + "match": "(?xi)\\b\n(\n symlink|stat|set_file_buffer|chown|chgrp|chmod|copy|clearstatcache|touch|tempnam|tmpfile|\n is_(dir|(uploaded_)?file|executable|link|readable|writ(e)?able)|disk_(free|total)_space|diskfreespace|\n dirname|delete|unlink|umask|pclose|popen|pathinfo|parse_ini_(file|string)|fscanf|fstat|fseek|fnmatch|\n fclose|ftell|ftruncate|file(size|[acm]time|type|inode|owner|perms|group)?|file_(exists|(get|put)_contents)|\n f(open|puts|putcsv|passthru|eof|flush|write|lock|read|gets(s)?|getc(sv)?)|lstat|lchown|lchgrp|link(info)?|\n rename|rewind|read(file|link)|realpath(_cache_(get|size))?|rmdir|glob|move_uploaded_file|mkdir|basename\n)\\b", "name": "support.function.file.php" }, { @@ -2172,7 +2812,7 @@ "name": "support.function.fileinfo.php" }, { - "match": "(?i)\\bfilter_(has_var|i(nput(_array)?|d)|var(_array)?|list)\\b", + "match": "(?i)\\bfilter_(has_var|input(_array)?|id|var(_array)?|list)\\b", "name": "support.function.filter.php" }, { @@ -2180,47 +2820,47 @@ "name": "support.function.fpm.php" }, { - "match": "(?i)\\b(c(all_user_func(_array)?|reate_function)|unregister_tick_function|f(orward_static_call(_array)?|unc(tion_exists|_(num_args|get_arg(s)?)))|register_(shutdown_function|tick_function)|get_defined_functions)\\b", + "match": "(?i)\\b(call_user_(func|method)(_array)?|create_function|unregister_tick_function|forward_static_call(_array)?|function_exists|func_(num_args|get_arg(s)?)|register_(shutdown|tick)_function|get_defined_functions)\\b", "name": "support.function.funchand.php" }, { - "match": "(?i)\\b(ngettext|textdomain|d(ngettext|c(ngettext|gettext)|gettext)|gettext|bind(textdomain|_textdomain_codeset))\\b", + "match": "(?i)\\b((n)?gettext|textdomain|d((n)?gettext|c(n)?gettext)|bind(textdomain|_textdomain_codeset))\\b", "name": "support.function.gettext.php" }, { - "match": "(?i)\\bgmp_(s(can(1|0)|trval|ign|ub|etbit|qrt(rem)?)|hamdist|ne(g|xtprime)|c(om|lrbit|mp)|testbit|i(n(tval|it|vert)|mport)|or|div(_(q(r)?|r)|exact)?|jacobi|p(o(pcount|w(m)?)|erfect_square|rob_prime)|export|fact|legendre|a(nd|dd|bs)|r(oot(rem)?|andom(_(range|bits))?)|gcd(ext)?|xor|m(od|ul))\\b", + "match": "(?xi)\\b\ngmp_(\n scan[01]|strval|sign|sub|setbit|sqrt(rem)?|hamdist|neg|nextprime|com|clrbit|cmp|testbit|\n intval|init|invert|import|or|div(exact)?|div_(q|qr|r)|jacobi|popcount|pow(m)?|perfect_square|\n prob_prime|export|fact|legendre|and|add|abs|root(rem)?|random(_(bits|range))?|gcd(ext)?|xor|mod|mul\n)\\b", "name": "support.function.gmp.php" }, { - "match": "(?i)\\bhash(_(hmac(_file)?|copy|init|update(_(stream|file))?|pbkdf2|equals|fi(nal|le)|algos))?\\b", + "match": "(?i)\\bhash(_(hmac(_file)?|copy|init|update(_(file|stream))?|pbkdf2|equals|file|final|algos))?\\b", "name": "support.function.hash.php" }, { - "match": "(?i)\\b(http_(s(upport|end_(st(atus|ream)|content_(type|disposition)|data|file|last_modified))|head|negotiate_(c(harset|ontent_type)|language)|c(hunked_decode|ache_(etag|last_modified))|throttle|inflate|d(eflate|ate)|p(ost_(data|fields)|ut_(stream|data|file)|ersistent_handles_(c(ount|lean)|ident)|arse_(headers|cookie|params|message))|re(direct|quest(_(method_(name|unregister|exists|register)|body_encode))?)|get(_request_(headers|body(_stream)?))?|match_(etag|request_header|modified)|build_(str|cookie|url))|ob_(inflatehandler|deflatehandler|etaghandler))\\b", + "match": "(?xi)\\b\n(\n http_(support|send_(status|stream|content_(disposition|type)|data|file|last_modified)|head|\n negotiate_(charset|content_type|language)|chunked_decode|cache_(etag|last_modified)|throttle|\n inflate|deflate|date|post_(data|fields)|put_(data|file|stream)|persistent_handles_(count|clean|ident)|\n parse_(cookie|headers|message|params)|redirect|request(_(method_(exists|name|(un)?register)|body_encode))?|\n get(_request_(headers|body(_stream)?))?|match_(etag|modified|request_header)|build_(cookie|str|url))|\n ob_(etag|deflate|inflate)handler\n)\\b", "name": "support.function.http.php" }, { - "match": "(?i)\\b(iconv(_(s(tr(pos|len|rpos)|ubstr|et_encoding)|get_encoding|mime_(decode(_headers)?|encode)))?|ob_iconv_handler)\\b", + "match": "(?i)\\b(iconv(_(str(pos|len|rpos)|substr|(get|set)_encoding|mime_(decode(_headers)?|encode)))?|ob_iconv_handler)\\b", "name": "support.function.iconv.php" }, { - "match": "(?i)\\biis_(s(t(op_serv(ice|er)|art_serv(ice|er))|et_(s(cript_map|erver_rights)|dir_security|app_settings))|add_server|remove_server|get_(s(cript_map|erv(ice_state|er_(rights|by_(comment|path))))|dir_security))\\b", + "match": "(?i)\\biis_((start|stop)_(service|server)|set_(script_map|server_rights|dir_security|app_settings)|(add|remove)_server|get_(script_map|service_state|server_(rights|by_(comment|path))|dir_security))\\b", "name": "support.function.iisfunc.php" }, { - "match": "(?i)\\b(i(ptc(parse|embed)|mage(s(y|cale|tring(up)?|et(style|t(hickness|ile)|interpolation|pixel|brush)|avealpha|x)|c(har(up)?|o(nvolution|py(res(ized|ampled)|merge(gray)?)?|lor(s(total|et|forindex)|closest(hwb|alpha)?|transparent|deallocate|exact(alpha)?|a(t|llocate(alpha)?)|resolve(alpha)?|match))|r(op(auto)?|eate(truecolor|from(string|jpeg|png|w(ebp|bmp)|g(if|d(2(part)?)?)|x(pm|bm)))?))|t(ypes|tf(text|bbox)|ruecolortopalette)|i(struecolor|nterlace)|2wbmp|d(estroy|ashedline)|jpeg|_type_to_(extension|mime_type)|p(s(slantfont|text|e(ncodefont|xtendfont)|freefont|loadfont|bbox)|ng|olygon|alette(copy|totruecolor))|ellipse|f(t(text|bbox)|il(ter|l(toborder|ed(polygon|ellipse|arc|rectangle))?)|ont(height|width)|lip)|w(ebp|bmp)|l(ine|oadfont|ayereffect)|a(ntialias|ffine(matrix(concat|get))?|lphablending|rc)|r(otate|ectangle)|g(if|d(2)?|ammacorrect|rab(screen|window))|xbm))|jpeg2wbmp|png2wbmp|g(d_info|etimagesize(fromstring)?))\\b", + "match": "(?xi)\\b\n(\n iptc(embed|parse)|(jpeg|png)2wbmp|gd_info|getimagesize(fromstring)?|\n image(s[xy]|scale|(char|string)(up)?|set(style|thickness|tile|interpolation|pixel|brush)|savealpha|\n convolution|copy(resampled|resized|merge(gray)?)?|colors(forindex|total)|\n color(set|closest(alpha|hwb)?|transparent|deallocate|(allocate|exact|resolve)(alpha)?|at|match)|\n crop(auto)?|create(truecolor|from(string|jpeg|png|wbmp|webp|gif|gd(2(part)?)?|xpm|xbm))?|\n types|ttf(bbox|text)|truecolortopalette|istruecolor|interlace|2wbmp|destroy|dashedline|jpeg|\n _type_to_(extension|mime_type)|ps(slantfont|text|(encode|extend|free|load)font|bbox)|png|polygon|\n palette(copy|totruecolor)|ellipse|ft(text|bbox)|filter|fill|filltoborder|\n filled(arc|ellipse|polygon|rectangle)|font(height|width)|flip|webp|wbmp|line|loadfont|layereffect|\n antialias|affine(matrix(concat|get))?|alphablending|arc|rotate|rectangle|gif|gd(2)?|gammacorrect|\n grab(screen|window)|xbm)\n)\\b", "name": "support.function.image.php" }, { - "match": "(?i)\\b(s(ys_get_temp_dir|et_(time_limit|include_path|magic_quotes_runtime))|cli_(set_process_title|get_process_title)|ini_(set|alter|restore|get(_all)?)|zend_(thread_id|version|logo_guid)|dl|p(hp(credits|info|_(sapi_name|ini_(scanned_files|loaded_file)|uname|logo_guid)|version)|utenv)|extension_loaded|version_compare|assert(_options)?|restore_include_path|g(c_(collect_cycles|disable|enable(d)?)|et(opt|_(c(urrent_user|fg_var)|include(d_files|_path)|defined_constants|extension_funcs|loaded_extensions|required_files|magic_quotes_(runtime|gpc))|env|lastmod|rusage|my(inode|uid|pid|gid)))|m(emory_get_(usage|peak_usage)|a(in|gic_quotes_runtime)))\\b", + "match": "(?xi)\\b\n(\n sys_get_temp_dir|set_(time_limit|include_path|magic_quotes_runtime)|cli_(get|set)_process_title|\n ini_(alter|get(_all)?|restore|set)|zend_(thread_id|version|logo_guid)|dl|php(credits|info|version)|\n php_(sapi_name|ini_(scanned_files|loaded_file)|uname|logo_guid)|putenv|extension_loaded|version_compare|\n assert(_options)?|restore_include_path|gc_(collect_cycles|disable|enable(d)?)|getopt|\n get_(cfg_var|current_user|defined_constants|extension_funcs|include_path|included_files|loaded_extensions|\n magic_quotes_(gpc|runtime)|required_files|resources)|\n get(env|lastmod|rusage|my(inode|[gup]id))|\n memory_get_(peak_)?usage|main|magic_quotes_runtime\n)\\b", "name": "support.function.info.php" }, { - "match": "(?i)\\bibase_(se(t_event_handler|rv(ice_(detach|attach)|er_info))|n(um_(params|fields)|ame_result)|c(o(nnect|mmit(_ret)?)|lose)|trans|d(elete_user|rop_db|b_info)|p(connect|aram_info|repare)|e(rr(code|msg)|xecute)|query|f(ield_info|etch_(object|assoc|row)|ree_(event_handler|query|result))|wait_event|a(dd_user|ffected_rows)|r(ollback(_ret)?|estore)|gen_id|m(odify_user|aintain_db)|b(lob_(c(lose|ancel|reate)|i(nfo|mport)|open|echo|add|get)|ackup))\\b", + "match": "(?xi)\\b\nibase_(\n set_event_handler|service_(attach|detach)|server_info|num_(fields|params)|name_result|connect|\n commit(_ret)?|close|trans|delete_user|drop_db|db_info|pconnect|param_info|prepare|err(code|msg)|\n execute|query|field_info|fetch_(assoc|object|row)|free_(event_handler|query|result)|wait_event|\n add_user|affected_rows|rollback(_ret)?|restore|gen_id|modify_user|maintain_db|backup|\n blob_(cancel|close|create|import|info|open|echo|add|get)\n)\\b", "name": "support.function.interbase.php" }, { - "match": "(?i)\\b(n(ormalizer_(normalize|is_normalized)|umfmt_(set_(symbol|text_attribute|pattern|attribute)|create|parse(_currency)?|format(_currency)?|get_(symbol|text_attribute|pattern|error_(code|message)|locale|attribute)))|collator_(s(ort(_with_sort_keys)?|et_(strength|attribute))|c(ompare|reate)|asort|get_(s(trength|ort_key)|error_(code|message)|locale|attribute))|transliterator_(create(_(inverse|from_rules))?|transliterate|list_ids|get_error_(code|message))|i(ntl(cal_get_error_(code|message)|tz_get_error_(code|message)|_(is_failure|error_name|get_error_(code|message)))|dn_to_(u(nicode|tf8)|ascii))|datefmt_(set_(calendar|timezone(_id)?|pattern|lenient)|create|is_lenient|parse|format(_object)?|localtime|get_(calendar(_object)?|time(type|zone(_id)?)|datetype|pattern|error_(code|message)|locale))|locale_(set_default|c(ompose|anonicalize)|parse|filter_matches|lookup|accept_from_http|get_(script|d(isplay_(script|name|variant|language|region)|efault)|primary_language|keywords|all_variants|region))|resourcebundle_(c(ount|reate)|locales|get(_error_(code|message))?)|grapheme_(s(tr(str|i(str|pos)|pos|len|r(ipos|pos))|ubstr)|extract)|msgfmt_(set_pattern|create|parse(_message)?|format(_message)?|get_(pattern|error_(code|message)|locale)))\\b", + "match": "(?xi)\\b\n(\n normalizer_(normalize|is_normalized)|idn_to_(unicode|utf8|ascii)|\n numfmt_(set_(symbol|(text_)?attribute|pattern)|create|(parse|format)(_currency)?|\n get_(symbol|(text_)?attribute|pattern|error_(code|message)|locale))|\n collator_(sort(_with_sort_keys)?|set_(attribute|strength)|compare|create|asort|\n get_(strength|sort_key|error_(code|message)|locale|attribute))|\n transliterator_(create(_(inverse|from_rules))?|transliterate|list_ids|get_error_(code|message))|\n intl(cal|tz)_get_error_(code|message)|intl_(is_failure|error_name|get_error_(code|message))|\n datefmt_(set_(calendar|lenient|pattern|timezone(_id)?)|create|is_lenient|parse|format(_object)?|localtime|\n get_(calendar(_object)?|time(type|zone(_id)?)|datetype|pattern|error_(code|message)|locale))|\n locale_(set_default|compose|canonicalize|parse|filter_matches|lookup|accept_from_http|\n get_(script|display_(script|name|variant|language|region)|default|primary_language|keywords|all_variants|region))|\n resourcebundle_(create|count|locales|get(_(error_(code|message)))?)|\n grapheme_(str(i?str|r?i?pos|len)|substr|extract)|\n msgfmt_(set_pattern|create|(format|parse)(_message)?|get_(pattern|error_(code|message)|locale))\n)\\b", "name": "support.function.intl.php" }, { @@ -2228,7 +2868,7 @@ "name": "support.function.json.php" }, { - "match": "(?i)\\bldap_(s(tart_tls|ort|e(t_(option|rebind_proc)|arch)|asl_bind)|next_(entry|attribute|reference)|c(o(n(nect|trol_paged_result(_response)?)|unt_entries|mpare)|lose)|t61_to_8859|d(n2ufn|elete)|8859_to_t61|unbind|parse_re(sult|ference)|e(scape|rr(no|2str|or)|xplode_dn)|f(irst_(entry|attribute|reference)|ree_result)|list|add|re(name|ad)|get_(option|dn|entries|values(_len)?|attributes)|mod(ify(_batch)?|_(del|add|replace))|bind)\\b", + "match": "(?xi)\\b\nldap_(\n start|tls|sort|search|sasl_bind|set_(option|rebind_proc)|(first|next)_(attribute|entry|reference)|\n connect|control_paged_result(_response)?|count_entries|compare|close|t61_to_8859|8859_to_t61|\n dn2ufn|delete|unbind|parse_(reference|result)|escape|errno|err2str|error|explode_dn|bind|\n free_result|list|add|rename|read|get_(option|dn|entries|values(_len)?|attributes)|modify(_batch)?|\n mod_(add|del|replace)\n)\\b", "name": "support.function.ldap.php" }, { @@ -2240,15 +2880,15 @@ "name": "support.function.mail.php" }, { - "match": "(?i)\\b(s(in(h)?|qrt|rand)|h(ypot|exdec)|c(os(h)?|eil)|tan(h)?|is_(nan|infinite|finite)|octdec|de(c(hex|oct|bin)|g2rad)|p(i|ow)|exp(m1)?|f(loor|mod)|l(cg_value|og(1(p|0))?)|a(sin(h)?|cos(h)?|tan(h|2)?|bs)|r(ound|a(nd|d2deg))|getrandmax|m(t_(srand|rand|getrandmax)|in|ax)|b(indec|ase_convert))\\b", + "match": "(?xi)\\b\n(\n (a)?(cos|sin|tan)(h)?|sqrt|srand|hypot|hexdec|ceil|is_(nan|(in)?finite)|octdec|dec(hex|oct|bin)|deg2rad|\n pi|pow|exp(m1)?|floor|fmod|lcg_value|log(1(p|0))?|atan2|abs|round|rand|rad2deg|getrandmax|\n mt_(srand|rand|getrandmax)|max|min|bindec|base_convert\n)\\b", "name": "support.function.math.php" }, { - "match": "(?i)\\bmb_(s(tr(str|cut|to(upper|lower)|i(str|pos|mwidth)|pos|width|len|r(chr|i(chr|pos)|pos))|ubst(itute_character|r(_count)?)|plit|end_mail)|http_(input|output)|c(heck_encoding|onvert_(case|encoding|variables|kana))|internal_encoding|output_handler|de(code_(numericentity|mimeheader)|tect_(order|encoding))|p(arse_str|referred_mime_name)|e(ncod(ing_aliases|e_(numericentity|mimeheader))|reg(i(_replace)?|_(search(_(setpos|init|pos|regs|get(pos|regs)))?|replace(_callback)?|match))?)|l(ist_encodings|anguage)|regex_(set_options|encoding)|get_info)\\b", + "match": "(?xi)\\b\nmb_(\n str(cut|str|to(lower|upper)|istr|ipos|imwidth|pos|width|len|rchr|richr|ripos|rpos)|\n substitute_character|substr(_count)?|split|send_mail|http_(input|output)|check_encoding|\n convert_(case|encoding|kana|variables)|internal_encoding|output_handler|decode_(numericentity|mimeheader)|\n detect_(encoding|order)|parse_str|preferred_mime_name|encoding_aliases|encode_(numericentity|mimeheader)|\n ereg(i(_replace)?)?|ereg_(search(_(get(pos|regs)|init|regs|(set)?pos))?|replace(_callback)?|match)|\n list_encodings|language|regex_(set_options|encoding)|get_info\n)\\b", "name": "support.function.mbstring.php" }, { - "match": "(?i)\\bm(crypt_(c(fb|reate_iv|bc)|ofb|decrypt|e(nc(_(self_test|is_block_(algorithm(_mode)?|mode)|get_(supported_key_sizes|iv_size|key_size|algorithms_name|modes_name|block_size))|rypt)|cb)|list_(algorithms|modes)|ge(neric(_(init|deinit|end))?|t_(cipher_name|iv_size|key_size|block_size))|module_(self_test|close|is_block_(algorithm(_mode)?|mode)|open|get_(supported_key_sizes|algo_(key_size|block_size))))|decrypt_generic)\\b", + "match": "(?xi)\\b\n(\n mcrypt_(\n cfb|create_iv|cbc|ofb|decrypt|encrypt|ecb|list_(algorithms|modes)|generic(_((de)?init|end))?|\n enc_(self_test|is_block_(algorithm|algorithm_mode|mode)|\n get_(supported_key_sizes|(block|iv|key)_size|(algorithms|modes)_name))|\n get_(cipher_name|(block|iv|key)_size)|\n module_(close|self_test|is_block_(algorithm|algorithm_mode|mode)|open|\n get_(supported_key_sizes|algo_(block|key)_size)))|\n mdecrypt_generic\n)\\b", "name": "support.function.mcrypt.php" }, { @@ -2264,11 +2904,11 @@ "name": "support.function.mongo.php" }, { - "match": "(?i)\\bmysql_(s(tat|e(t_charset|lect_db))|num_(fields|rows)|c(onnect|l(ient_encoding|ose)|reate_db)|t(hread_id|ablename)|in(sert_id|fo)|d(ata_seek|rop_db|b_(name|query))|unbuffered_query|p(connect|ing)|e(scape_string|rr(no|or))|query|f(ield_(seek|name|t(ype|able)|flags|len)|etch_(object|field|lengths|a(ssoc|rray)|row)|ree_result)|list_(tables|dbs|processes|fields)|affected_rows|re(sult|al_escape_string)|get_(server_info|host_info|client_info|proto_info))\\b", + "match": "(?xi)\\b\nmysql_(\n stat|set_charset|select_db|num_(fields|rows)|connect|client_encoding|close|create_db|escape_string|\n thread_id|tablename|insert_id|info|data_seek|drop_db|db_(name|query)|unbuffered_query|pconnect|ping|\n errno|error|query|field_(seek|name|type|table|flags|len)|fetch_(object|field|lengths|assoc|array|row)|\n free_result|list_(tables|dbs|processes|fields)|affected_rows|result|real_escape_string|\n get_(client|host|proto|server)_info\n)\\b", "name": "support.function.mysql.php" }, { - "match": "(?i)\\bmysqli_(s(sl_set|t(ore_result|at|mt_(s(tore_result|end_long_data)|next_result|close|init|data_seek|prepare|execute|f(etch|ree_result)|attr_(set|get)|res(ult_metadata|et)|get_(warnings|result)|more_results|bind_(param|result)))|e(nd_(query|long_data)|t_(charset|opt|local_infile_(handler|default))|lect_db)|lave_query|avepoint)|next_result|c(ha(nge_user|racter_set_name)|o(nnect|mmit)|l(ient_encoding|ose))|thread_safe|init|options|d(isable_r(pl_parse|eads_from_master)|ump_debug_info|ebug|ata_seek)|use_result|p(ing|oll|aram_count|repare)|e(scape_string|nable_r(pl_parse|eads_from_master)|xecute|mbedded_server_(start|end))|kill|query|f(ield_seek|etch(_(object|field(s|_direct)?|a(ssoc|ll|rray)|row))?|ree_result)|autocommit|r(ollback|pl_(p(arse_enabled|robe)|query_type)|e(port|fresh|lease_savepoint|a(p_async_query|l_(connect|escape_string|query))))|get_(c(harset|onnection_stats|lient_(stats|info|version)|ache_stats)|warnings|links_stats|metadata)|m(ore_results|ulti_query|aster_query)|b(ind_(param|result)|egin_transaction))\\b", + "match": "(?xi)\\b\nmysqli_(\n ssl_set|store_result|stat|send_(query|long_data)|set_(charset|opt|local_infile_(default|handler))|\n stmt_(store_result|send_long_data|next_result|close|init|data_seek|prepare|execute|fetch|free_result|\n attr_(get|set)|result_metadata|reset|get_(result|warnings)|more_results|bind_(param|result))|\n select_db|slave_query|savepoint|next_result|change_user|character_set_name|connect|commit|\n client_encoding|close|thread_safe|init|options|(enable|disable)_(reads_from_master|rpl_parse)|\n dump_debug_info|debug|data_seek|use_result|ping|poll|param_count|prepare|escape_string|execute|\n embedded_server_(start|end)|kill|query|field_seek|free_result|autocommit|rollback|report|refresh|\n fetch(_(object|fields|field(_direct)?|assoc|all|array|row))?|rpl_(parse_enabled|probe|query_type)|\n release_savepoint|reap_async_query|real_(connect|escape_string|query)|more_results|multi_query|\n get_(charset|connection_stats|client_(stats|info|version)|cache_stats|warnings|links_stats|metadata)|\n master_query|bind_(param|result)|begin_transaction\n)\\b", "name": "support.function.mysqli.php" }, { @@ -2280,23 +2920,23 @@ "name": "support.function.mysqlnd-ms.php" }, { - "match": "(?i)\\bmysqlnd_qc_(set_(storage_handler|cache_condition|is_select|user_handlers)|clear_cache|get_(normalized_query_trace_log|c(ore_stats|ache_info)|query_trace_log|available_handlers))\\b", + "match": "(?i)\\bmysqlnd_qc_(set_(storage_handler|cache_condition|is_select|user_handlers)|clear_cache|get_(normalized_query_trace_log|core_stats|cache_info|query_trace_log|available_handlers))\\b", "name": "support.function.mysqlnd-qc.php" }, { - "match": "(?i)\\bmysqlnd_uh_(set_(statement_proxy|connection_proxy)|convert_to_mysqlnd)\\b", + "match": "(?i)\\bmysqlnd_uh_(set_(statement|connection)_proxy|convert_to_mysqlnd)\\b", "name": "support.function.mysqlnd-uh.php" }, { - "match": "(?i)\\b(s(yslog|ocket_(set_(timeout|blocking)|get_status)|et(cookie|rawcookie))|h(ttp_response_code|eader(s_(sent|list)|_re(gister_callback|move))?)|c(heckdnsrr|loselog)|i(net_(ntop|pton)|p2long)|openlog|d(ns_(check_record|get_(record|mx))|efine_syslog_variables)|pfsockopen|fsockopen|long2ip|get(servby(name|port)|host(name|by(name(l)?|addr))|protobyn(umber|ame)|mxrr))\\b", + "match": "(?xi)\\b\n(\n syslog|socket_(set_(blocking|timeout)|get_status)|set(raw)?cookie|http_response_code|openlog|\n headers_(list|sent)|header(_(register_callback|remove))?|checkdnsrr|closelog|inet_(ntop|pton)|ip2long|\n openlog|dns_(check_record|get_(record|mx))|define_syslog_variables|(p)?fsockopen|long2ip|\n get(servby(name|port)|host(name|by(name(l)?|addr))|protoby(name|number)|mxrr)\n)\\b", "name": "support.function.network.php" }, { - "match": "(?i)\\bnsapi_(virtual|re(sponse_headers|quest_headers))\\b", + "match": "(?i)\\bnsapi_(virtual|response_headers|request_headers)\\b", "name": "support.function.nsapi.php" }, { - "match": "(?i)\\boci(s(tatementtype|e(tprefetch|rverversion)|avelob(file)?)|n(umcols|ew(c(ollection|ursor)|descriptor)|logon)|c(o(l(umn(s(cale|ize)|name|type(raw)?|isnull|precision)|l(size|trim|a(ssign(elem)?|ppend)|getelem|max))|mmit)|loselob|ancel)|internaldebug|definebyname|_(s(tatement_type|e(t_(client_i(nfo|dentifier)|prefetch|edition|action|module_name)|rver_version))|n(um_(fields|rows)|ew_(c(o(nnect|llection)|ursor)|descriptor))|c(o(nnect|mmit)|l(ient_version|ose)|ancel)|internal_debug|define_by_name|p(connect|a(ssword_change|rse))|e(rror|xecute)|f(ield_(s(cale|ize)|name|type(_raw)?|is_null|precision)|etch(_(object|a(ssoc|ll|rray)|row))?|ree_(statement|descriptor))|lob_(copy|is_equal)|r(ollback|esult)|get_implicit_resultset|bind_(array_by_name|by_name))|p(logon|arse)|e(rror|xecute)|f(etch(statement|into)?|ree(statement|c(ollection|ursor)|desc))|write(temporarylob|lobtofile)|lo(adlob|go(n|ff))|r(o(wcount|llback)|esult)|bindbyname)\\b", + "match": "(?xi)\\b\n(\n oci(statementtype|setprefetch|serverversion|savelob(file)?|numcols|new(collection|cursor|descriptor)|nlogon|\n column(scale|size|name|type(raw)?|isnull|precision)|coll(size|trim|assign(elem)?|append|getelem|max)|commit|\n closelob|cancel|internaldebug|definebyname|plogon|parse|error|execute|fetch(statement|into)?|\n free(statement|collection|cursor|desc)|write(temporarylob|lobtofile)|loadlob|log(on|off)|rowcount|rollback|\n result|bindbyname)|\n oci_(statement_type|set_(client_(info|identifier)|prefetch|edition|action|module_name)|server_version|\n num_(fields|rows)|new_(connect|collection|cursor|descriptor)|connect|commit|client_version|close|cancel|\n internal_debug|define_by_name|pconnect|password_change|parse|error|execute|bind_(array_)?by_name|\n field_(scale|size|name|type(_raw)?|is_null|precision)|fetch(_(object|assoc|all|array|row))?|\n free_(statement|descriptor)|lob_(copy|is_equal)|rollback|result|get_implicit_resultset)\n)\\b", "name": "support.function.oci8.php" }, { @@ -2304,11 +2944,11 @@ "name": "support.function.opcache.php" }, { - "match": "(?i)\\bopenssl_(s(ign|pki_(new|export(_challenge)?|verify)|eal)|c(sr_(sign|new|export(_to_file)?|get_(subject|public_key))|ipher_iv_length)|open|d(h_compute_key|igest|ecrypt)|p(ublic_(decrypt|encrypt)|k(cs(12_(export(_to_file)?|read)|7_(sign|decrypt|encrypt|verify))|ey_(new|export(_to_file)?|free|get_(details|p(ublic|rivate))))|rivate_(decrypt|encrypt)|bkdf2)|e(ncrypt|rror_string)|verify|free_key|random_pseudo_bytes|get_(c(ipher_methods|ert_locations)|p(ublickey|rivatekey)|md_methods)|x509_(check(_private_key|purpose)|parse|export(_to_file)?|f(ingerprint|ree)|read))\\b", + "match": "(?xi)\\b\nopenssl_(\n sign|spki_(new|export(_challenge)?|verify)|seal|csr_(sign|new|export(_to_file)?|get_(subject|public_key))|\n cipher_iv_length|open|dh_compute_key|digest|decrypt|public_(decrypt|encrypt)|encrypt|error_string|\n pkcs12_(export(_to_file)?|read)|pkcs7_(sign|decrypt|encrypt|verify)|verify|free_key|random_pseudo_bytes|\n pkey_(new|export(_to_file)?|free|get_(details|public|private))|private_(decrypt|encrypt)|pbkdf2|\n get_((cipher|md)_methods|cert_locations|(public|private)key)|\n x509_(check_private_key|checkpurpose|parse|export(_to_file)?|fingerprint|free|read)\n)\\b", "name": "support.function.openssl.php" }, { - "match": "(?i)\\b(o(utput_(add_rewrite_var|reset_rewrite_vars)|b_(start|clean|implicit_flush|end_(clean|flush)|flush|list_handlers|g(zhandler|et_(status|c(ontents|lean)|flush|le(ngth|vel)))))|flush)\\b", + "match": "(?xi)\\b\n(\n output_(add_rewrite_var|reset_rewrite_vars)|flush|\n ob_(start|clean|implicit_flush|end_(clean|flush)|flush|list_handlers|gzhandler|\n get_(status|contents|clean|flush|length|level))\n)\\b", "name": "support.function.output.php" }, { @@ -2316,15 +2956,15 @@ "name": "support.function.password.php" }, { - "match": "(?i)\\bpcntl_(s(trerror|ig(nal(_dispatch)?|timedwait|procmask|waitinfo)|etpriority)|e(rrno|xec)|fork|w(stopsig|termsig|if(s(topped|ignaled)|exited)|exitstatus|ait(pid)?)|alarm|get(_last_error|priority))\\b", + "match": "(?xi)\\b\npcntl_(\n strerror|signal(_dispatch)?|sig(timedwait|procmask|waitinfo)|setpriority|errno|exec|fork|\n w(stopsig|termsig|if(stopped|signaled|exited))|wait(pid)?|alarm|getpriority|get_last_error\n)\\b", "name": "support.function.pcntl.php" }, { - "match": "(?i)\\bpg_(s(ocket|e(nd_(prepare|execute|query(_params)?)|t_(client_encoding|error_verbosity)|lect))|host|num_(fields|rows)|c(o(n(sume_input|nect(ion_(status|reset|busy)|_poll)?|vert)|py_(to|from))|l(ient_encoding|ose)|ancel_query)|t(ty|ra(nsaction_status|ce))|insert|options|d(elete|bname)|u(n(trace|escape_bytea)|pdate)|p(connect|ing|ort|ut_line|arameter_status|repare)|e(scape_(string|identifier|literal|bytea)|nd_copy|xecute)|version|query(_params)?|f(ield_(size|n(um|ame)|t(ype(_oid)?|able)|is_null|prtlen)|etch_(object|a(ssoc|ll(_columns)?|rray)|r(ow|esult))|lush|ree_result)|l(o_(seek|c(lose|reate)|t(ell|runcate)|import|open|unlink|export|write|read(_all)?)|ast_(notice|oid|error))|affected_rows|result_(s(tatus|eek)|error(_field)?)|get_(notify|pid|result)|meta_data)\\b", + "match": "(?xi)\\b\npg_(\n socket|send_(prepare|execute|query(_params)?)|set_(client_encoding|error_verbosity)|select|host|\n num_(fields|rows)|consume_input|connection_(status|reset|busy)|connect(_poll)?|convert|copy_(from|to)|\n client_encoding|close|cancel_query|tty|transaction_status|trace|insert|options|delete|dbname|untrace|\n unescape_bytea|update|pconnect|ping|port|put_line|parameter_status|prepare|version|query(_params)?|\n escape_(string|identifier|literal|bytea)|end_copy|execute|flush|free_result|last_(notice|error|oid)|\n field_(size|num|name|type(_oid)?|table|is_null|prtlen)|affected_rows|result_(status|seek|error(_field)?)|\n fetch_(object|assoc|all(_columns)?|array|row|result)|get_(notify|pid|result)|meta_data|\n lo_(seek|close|create|tell|truncate|import|open|unlink|export|write|read(_all)?)|\n)\\b", "name": "support.function.pgsql.php" }, { - "match": "(?i)\\b(virtual|apache_(setenv|note|child_terminate|lookup_uri|re(s(ponse_headers|et_timeout)|quest_headers)|get(_(version|modules)|env))|getallheaders)\\b", + "match": "(?i)\\b(virtual|getallheaders|apache_((get|set)env|note|child_terminate|lookup_uri|response_headers|reset_timeout|request_headers|get_(version|modules)))\\b", "name": "support.function.php_apache.php" }, { @@ -2332,19 +2972,19 @@ "name": "support.function.php_dom.php" }, { - "match": "(?i)\\bftp_(s(sl_connect|ystype|i(te|ze)|et_option)|n(list|b_(continue|put|f(put|get)|get))|c(h(dir|mod)|onnect|dup|lose)|delete|p(ut|wd|asv)|exec|quit|f(put|get)|login|alloc|r(ename|aw(list)?|mdir)|get(_option)?|m(dtm|kdir))\\b", + "match": "(?xi)\\b\nftp_(\n ssl_connect|systype|site|size|set_option|nlist|nb_(continue|f?(put|get))|ch(dir|mod)|connect|cdup|close|\n delete|put|pwd|pasv|exec|quit|f(put|get)|login|alloc|rename|raw(list)?|rmdir|get(_option)?|mdtm|mkdir\n)\\b", "name": "support.function.php_ftp.php" }, { - "match": "(?i)\\bimap_(s(can(mailbox)?|tatus|ort|ubscribe|e(t(_quota|flag_full|acl)|arch)|avebody)|header(s|info)?|num_(recent|msg)|c(heck|l(ose|earflag_full)|reate(mailbox)?)|t(hread|imeout)|open|delete(mailbox)?|8bit|u(n(subscribe|delete)|tf(7_(decode|encode)|8)|id)|ping|e(rrors|xpunge)|qprint|fetch(structure|header|text|_overview|mime|body)|l(sub|ist(s(can|ubscribed)|mailbox)?|ast_error)|a(ppend|lerts)|r(e(name(mailbox)?|open)|fc822_(parse_(headers|adrlist)|write_address))|g(c|et(subscribed|_quota(root)?|acl|mailboxes))|m(sgno|ime_header_decode|ail(_(co(py|mpose)|move)|boxmsginfo)?)|b(inary|ody(struct)?|ase64))\\b", + "match": "(?xi)\\b\nimap_(\n (create|delete|list|rename|scan)(mailbox)?|status|sort|subscribe|set_quota|set(flag_full|acl)|search|savebody|\n num_(recent|msg)|check|close|clearflag_full|thread|timeout|open|header(info)?|headers|append|alerts|reopen|\n 8bit|unsubscribe|undelete|utf7_(decode|encode)|utf8|uid|ping|errors|expunge|qprint|gc|\n fetch(structure|header|text|mime|body)|fetch_overview|lsub|list(scan|subscribed)|last_error|\n rfc822_(parse_(headers|adrlist)|write_address)|get(subscribed|acl|mailboxes)|get_quota(root)?|\n msgno|mime_header_decode|mail_(copy|compose|move)|mail|mailboxmsginfo|binary|body(struct)?|base64\n)\\b", "name": "support.function.php_imap.php" }, { - "match": "(?i)\\bmssql_(select_db|n(um_(fields|rows)|ext_result)|c(onnect|lose)|init|data_seek|pconnect|execute|query|f(ield_(seek|name|type|length)|etch_(object|field|a(ssoc|rray)|row|batch)|ree_(statement|result))|r(ows_affected|esult)|g(uid_string|et_last_message)|min_(error_severity|message_severity)|bind)\\b", + "match": "(?xi)\\b\nmssql_(\n select_db|num_(fields|rows)|next_result|connect|close|init|data_seek|pconnect|execute|query|\n field_(seek|name|type|length)|fetch_(object|field|assoc|array|row|batch)|free_(statement|result)|\n rows_affected|result|guid_string|get_last_message|min_(error|message)_severity|bind\n)\\b", "name": "support.function.php_mssql.php" }, { - "match": "(?i)\\bodbc_(s(tatistics|pecialcolumns|etoption)|n(um_(fields|rows)|ext_result)|c(o(nnect|lumn(s|privileges)|mmit)|ursor|lose(_all)?)|table(s|privileges)|d(o|ata_source)|p(connect|r(imarykeys|ocedure(s|columns)|epare))|e(rror(msg)?|xec(ute)?)|f(ield_(scale|n(um|ame)|type|precision|len)|oreignkeys|etch_(into|object|array|row)|ree_result)|longreadlen|autocommit|r(ollback|esult(_all)?)|gettypeinfo|binmode)\\b", + "match": "(?xi)\\b\nodbc_(\n statistics|specialcolumns|setoption|num_(fields|rows)|next_result|connect|columns|columnprivileges|commit|\n cursor|close(_all)?|tables|tableprivileges|do|data_source|pconnect|primarykeys|procedures|procedurecolumns|\n prepare|error(msg)?|exec(ute)?|field_(scale|num|name|type|precision|len)|foreignkeys|free_result|\n fetch_(into|object|array|row)|longreadlen|autocommit|rollback|result(_all)?|gettypeinfo|binmode\n)\\b", "name": "support.function.php_odbc.php" }, { @@ -2356,23 +2996,23 @@ "name": "support.function.php_spl.php" }, { - "match": "(?i)\\bzip_(close|open|entry_(name|c(ompress(ionmethod|edsize)|lose)|open|filesize|read)|read)\\b", + "match": "(?i)\\bzip_(close|open|entry_(name|compressionmethod|compressedsize|close|open|filesize|read)|read)\\b", "name": "support.function.php_zip.php" }, { - "match": "(?i)\\bposix_(s(trerror|et(sid|uid|pgid|e(uid|gid)|gid))|ctermid|t(tyname|imes)|i(satty|nitgroups)|uname|errno|kill|access|get(sid|cwd|uid|_last_error|p(id|pid|w(nam|uid)|g(id|rp))|e(uid|gid)|login|rlimit|g(id|r(nam|oups|gid)))|mk(nod|fifo))\\b", + "match": "(?xi)\\b\nposix_(\n strerror|set(s|e?u|[ep]?g)id|ctermid|ttyname|times|isatty|initgroups|uname|errno|kill|access|\n get(sid|cwd|uid|pid|ppid|pwnam|pwuid|pgid|pgrp|euid|egid|login|rlimit|gid|grnam|groups|grgid)|\n get_last_error|mknod|mkfifo\n)\\b", "name": "support.function.posix.php" }, { - "match": "(?i)\\bset(threadtitle|proctitle)\\b", + "match": "(?i)\\bset(thread|proc)title\\b", "name": "support.function.proctitle.php" }, { - "match": "(?i)\\bpspell_(s(tore_replacement|uggest|ave_wordlist)|new(_(config|personal))?|c(heck|onfig_(save_repl|create|ignore|d(ict_dir|ata_dir)|personal|r(untogether|epl)|mode)|lear_session)|add_to_(session|personal))\\b", + "match": "(?xi)\\b\npspell_(\n store_replacement|suggest|save_wordlist|new(_(config|personal))?|check|clear_session|\n config_(save_repl|create|ignore|(data|dict)_dir|personal|runtogether|repl|mode)|add_to_(session|personal)\n)\\b", "name": "support.function.pspell.php" }, { - "match": "(?i)\\breadline(_(c(ompletion_function|lear_history|allback_(handler_(install|remove)|read_char))|info|on_new_line|write_history|list_history|add_history|re(display|ad_history)))?\\b", + "match": "(?i)\\breadline(_(completion_function|clear_history|callback_(handler_(install|remove)|read_char)|info|on_new_line|write_history|list_history|add_history|redisplay|read_history))?\\b", "name": "support.function.readline.php" }, { @@ -2380,15 +3020,15 @@ "name": "support.function.recode.php" }, { - "match": "(?i)\\brrd(c_disconnect|_(create|tune|info|update|error|version|f(irst|etch)|last(update)?|restore|graph|xport))\\b", + "match": "(?i)\\brrd(c_disconnect|_(create|tune|info|update|error|version|first|fetch|last(update)?|restore|graph|xport))\\b", "name": "support.function.rrd.php" }, { - "match": "(?i)\\b(s(hm_(has_var|detach|put_var|attach|remove(_var)?|get_var)|em_(acquire|re(lease|move)|get))|ftok|msg_(s(tat_queue|e(nd|t_queue))|queue_exists|re(ceive|move_queue)|get_queue))\\b", + "match": "(?xi)\\b\n(\n shm_((get|has|remove|put)_var|detach|attach|remove)|sem_(acquire|release|remove|get)|ftok|\n msg_((get|remove|set|stat)_queue|send|queue_exists|receive)\n)\\b", "name": "support.function.sem.php" }, { - "match": "(?i)\\bsession_(s(ta(tus|rt)|et_(save_handler|cookie_params)|ave_path)|name|c(ommit|ache_(expire|limiter))|i(s_registered|d)|de(stroy|code)|un(set|register)|encode|write_close|abort|re(set|g(ister(_shutdown)?|enerate_id))|get_cookie_params|module_name)\\b", + "match": "(?xi)\\b\nsession_(\n status|start|set_(save_handler|cookie_params)|save_path|name|commit|cache_(expire|limiter)|\n is_registered|id|destroy|decode|unset|unregister|encode|write_close|abort|reset|register(_shutdown)?|\n regenerate_id|get_cookie_params|module_name\n)\\b", "name": "support.function.session.php" }, { @@ -2400,7 +3040,7 @@ "name": "support.function.simplexml.php" }, { - "match": "(?i)\\bsnmp(set|2_(set|walk|real_walk|get(next)?)|_(set_(oid_(numeric_print|output_format)|enum_print|valueretrieval|quick_print)|read_mib|get_(valueretrieval|quick_print))|3_(set|walk|real_walk|get(next)?)|walk(oid)?|realwalk|get(next)?)\\b", + "match": "(?xi)\\b\n(\n snmp(walk(oid)?|realwalk|get(next)?|set)|\n snmp_(set_(valueretrieval|quick_print|enum_print|oid_(numeric_print|output_format))|read_mib|\n get_(valueretrieval|quick_print))|\n snmp[23]_(set|walk|real_walk|get(next)?)\n)\\b", "name": "support.function.snmp.php" }, { @@ -2408,31 +3048,31 @@ "name": "support.function.soap.php" }, { - "match": "(?i)\\bsocket_(s(hutdown|trerror|e(nd(to|msg)?|t_(nonblock|option|block)|lect))|c(onnect|l(ose|ear_error)|reate(_(pair|listen))?|msg_space)|import_stream|write|l(isten|ast_error)|accept|re(cv(from|msg)?|ad)|get(sockname|_option|peername)|bind)\\b", + "match": "(?xi)\\b\nsocket_(\n shutdown|strerror|send(to|msg)?|set_((non)?block|option)|select|connect|close|clear_error|bind|\n create(_(pair|listen))?|cmsg_space|import_stream|write|listen|last_error|accept|recv(from|msg)?|\n read|get(peer|sock)name|get_option\n)\\b", "name": "support.function.sockets.php" }, { - "match": "(?i)\\bsqlite_(s(ingle_query|eek)|has_(prev|more)|n(um_(fields|rows)|ext)|c(hanges|olumn|urrent|lose|reate_(function|aggregate))|open|u(nbuffered_query|df_(decode_binary|encode_binary))|p(open|rev)|e(scape_string|rror_string|xec)|valid|key|query|f(ield_name|etch_(s(tring|ingle)|column_types|object|a(ll|rray))|actory)|l(ib(encoding|version)|ast_(insert_rowid|error))|array_query|rewind|busy_timeout)\\b", + "match": "(?xi)\\b\nsqlite_(\n single_query|seek|has_(more|prev)|num_(fields|rows)|next|changes|column|current|close|\n create_(aggregate|function)|open|unbuffered_query|udf_(decode|encode)_binary|popen|prev|\n escape_string|error_string|exec|valid|key|query|field_name|factory|\n fetch_(string|single|column_types|object|all|array)|lib(encoding|version)|\n last_(insert_rowid|error)|array_query|rewind|busy_timeout\n)\\b", "name": "support.function.sqlite.php" }, { - "match": "(?i)\\bsqlsrv_(se(nd_stream_data|rver_info)|has_rows|n(um_(fields|rows)|ext_result)|c(o(n(nect|figure)|mmit)|l(ient_info|ose)|ancel)|prepare|e(rrors|xecute)|query|f(ield_metadata|etch(_(object|array))?|ree_stmt)|ro(ws_affected|llback)|get_(config|field)|begin_transaction)\\b", + "match": "(?xi)\\b\nsqlsrv_(\n send_stream_data|server_info|has_rows|num_(fields|rows)|next_result|connect|configure|commit|\n client_info|close|cancel|prepare|errors|execute|query|field_metadata|fetch(_(array|object))?|\n free_stmt|rows_affected|rollback|get_(config|field)|begin_transaction\n)\\b", "name": "support.function.sqlsrv.php" }, { - "match": "(?i)\\bstats_(s(ta(ndard_deviation|t_(noncentral_t|correlation|in(nerproduct|dependent_t)|p(owersum|ercentile|aired_t)|gennch|binomial_coef))|kew)|harmonic_mean|c(ovariance|df_(n(oncentral_(chisquare|f)|egative_binomial)|c(hisquare|auchy)|t|uniform|poisson|exponential|f|weibull|l(ogistic|aplace)|gamma|b(inomial|eta)))|den(s_(n(ormal|egative_binomial)|c(hisquare|auchy)|t|pmf_(hypergeometric|poisson|binomial)|exponential|f|weibull|l(ogistic|aplace)|gamma|beta)|_uniform)|variance|kurtosis|absolute_deviation|rand_(setall|phrase_to_seeds|ranf|ge(n_(no(ncen(tral_(t|f)|ral_chisquare)|rmal)|chisquare|t|i(nt|uniform|poisson|binomial(_negative)?)|exponential|f(uniform)?|gamma|beta)|t_seeds)))\\b", + "match": "(?xi)\\b\nstats_(\n harmonic_mean|covariance|standard_deviation|skew|\n cdf_(noncentral_(chisquare|f)|negative_binomial|chisquare|cauchy|t|uniform|poisson|exponential|f|weibull|\n logistic|laplace|gamma|binomial|beta)|\n stat_(noncentral_t|correlation|innerproduct|independent_t|powersum|percentile|paired_t|gennch|binomial_coef)|\n dens_(normal|negative_binomial|chisquare|cauchy|t|pmf_(hypergeometric|poisson|binomial)|exponential|f|\n weibull|logistic|laplace|gamma|beta)|\n den_uniform|variance|kurtosis|absolute_deviation|\n rand_(setall|phrase_to_seeds|ranf|get_seeds|\n gen_(noncentral_[ft]|noncenral_chisquare|normal|chisquare|t|int|\n i(uniform|poisson|binomial(_negative)?)|exponential|f(uniform)?|gamma|beta))\n)\\b", "name": "support.function.stats.php" }, { - "match": "(?i)\\bs(tream_(s(ocket_(s(hutdown|e(ndto|rver))|client|pair|enable_crypto|accept|recvfrom|get_name)|upports_lock|e(t_(chunk_size|timeout|write_buffer|read_buffer|blocking)|lect))|notification_callback|co(ntext_(set_(option|default|params)|create|get_(options|default|params))|py_to_stream)|is_local|encoding|filter_(prepend|append|re(gister|move))|wrapper_(unregister|re(store|gister))|re(solve_include_path|gister_wrapper)|get_(contents|transports|filters|wrappers|line|meta_data)|bucket_(new|prepend|append|make_writeable))|et_socket_blocking)\\b", + "match": "(?xi)\\b\n(\n set_socket_blocking|\n stream_(socket_(shutdown|sendto|server|client|pair|enable_crypto|accept|recvfrom|get_name)|\n set_(chunk_size|timeout|(read|write)_buffer|blocking)|select|notification_callback|supports_lock|\n context_(set_(option|default|params)|create|get_(options|default|params))|copy_to_stream|is_local|\n encoding|filter_(append|prepend|register|remove)|wrapper_((un)?register|restore)|\n resolve_include_path|register_wrapper|get_(contents|transports|filters|wrappers|line|meta_data)|\n bucket_(new|prepend|append|make_writeable)\n )\n)\\b", "name": "support.function.streamsfuncs.php" }, { - "match": "(?i)\\b(s(scanf|ha1(_file)?|tr(s(tr|pn)|n(c(asecmp|mp)|atc(asecmp|mp))|c(spn|hr|oll|asecmp|mp)|t(o(upper|k|lower)|r)|i(str|p(slashes|cslashes|os|_tags))|_(s(huffle|plit)|ireplace|pad|word_count|r(ot13|ep(eat|lace))|getcsv)|p(os|brk)|len|r(chr|ipos|pos|ev))|imilar_text|oundex|ubstr(_(co(unt|mpare)|replace))?|printf|etlocale)|h(tml(specialchars(_decode)?|_entity_decode|entities)|e(x2bin|brev(c)?))|n(umber_format|l(2br|_langinfo))|c(h(op|unk_split|r)|o(nvert_(cyr_string|uu(decode|encode))|unt_chars)|r(ypt|c32))|trim|implode|ord|uc(first|words)|join|p(arse_str|rint(f)?)|e(cho|xplode)|v(sprintf|printf|fprintf)|quote(d_printable_(decode|encode)|meta)|fprintf|wordwrap|l(cfirst|trim|ocaleconv|evenshtein)|add(slashes|cslashes)|rtrim|get_html_translation_table|m(oney_format|d5(_file)?|etaphone)|bin2hex)\\b", + "match": "(?xi)\\b\n(\n money_format|md5(_file)?|metaphone|bin2hex|sscanf|sha1(_file)?|\n str(str|c?spn|n(at)?(case)?cmp|chr|coll|(case)?cmp|to(upper|lower)|tok|tr|istr|pos|pbrk|len|rchr|ri?pos|rev)|\n str_(getcsv|ireplace|pad|repeat|replace|rot13|shuffle|split|word_count)|\n strip(c?slashes|os)|strip_tags|similar_text|soundex|substr(_(count|compare|replace))?|setlocale|\n html(specialchars(_decode)?|entities)|html_entity_decode|hex2bin|hebrev(c)?|number_format|nl2br|nl_langinfo|\n chop|chunk_split|chr|convert_(cyr_string|uu(decode|encode))|count_chars|crypt|crc32|trim|implode|ord|\n uc(first|words)|join|parse_str|print(f)?|echo|explode|v?[fs]?printf|quoted_printable_(decode|encode)|\n quotemeta|wordwrap|lcfirst|[lr]trim|localeconv|levenshtein|addc?slashes|get_html_translation_table\n)\\b", "name": "support.function.string.php" }, { - "match": "(?i)\\bsybase_(se(t_message_handler|lect_db)|num_(fields|rows)|c(onnect|lose)|d(eadlock_retry_count|ata_seek)|unbuffered_query|pconnect|query|f(ield_seek|etch_(object|field|a(ssoc|rray)|row)|ree_result)|affected_rows|result|get_last_message|min_(server_severity|client_severity|error_severity|message_severity))\\b", + "match": "(?xi)\\b\nsybase_(\n set_message_handler|select_db|num_(fields|rows)|connect|close|deadlock_retry_count|data_seek|\n unbuffered_query|pconnect|query|field_seek|fetch_(object|field|assoc|array|row)|free_result|\n affected_rows|result|get_last_message|min_(client|error|message|server)_severity\n)\\b", "name": "support.function.sybase.php" }, { @@ -2440,7 +3080,7 @@ "name": "support.function.taint.php" }, { - "match": "(?i)\\b(tidy_(s(et(opt|_encoding)|ave_config)|c(onfig_count|lean_repair)|is_x(html|ml)|diagnose|parse_(string|file)|error_count|warning_count|load_config|access_count|re(set_config|pair_(string|file))|get(opt|_(status|h(tml(_ver)?|ead)|config|o(utput|pt_doc)|r(oot|elease)|body)))|ob_tidyhandler)\\b", + "match": "(?xi)\\b\n(\n tidy_((get|set)opt|set_encoding|save_config|config_count|clean_repair|is_(xhtml|xml)|diagnose|\n (access|error|warning)_count|load_config|reset_config|(parse|repair)_(string|file)|\n get_(status|html(_ver)?|head|config|output|opt_doc|root|release|body))|\n ob_tidyhandler\n)\\b", "name": "support.function.tidy.php" }, { @@ -2448,43 +3088,43 @@ "name": "support.function.tokenizer.php" }, { - "match": "(?i)\\btrader_(s(t(och(f|rsi)?|ddev)|in(h)?|u(m|b)|et_(compat|unstable_period)|qrt|ar(ext)?|ma)|ht_(sine|trend(line|mode)|dcp(hase|eriod)|phasor)|natr|c(ci|o(s(h)?|rrel)|dl(s(ho(otingstar|rtline)|t(icksandwich|alledpattern)|pinningtop|eparatinglines)|h(i(kkake(mod)?|ghwave)|omingpigeon|a(ngingman|rami(cross)?|mmer))|c(o(ncealbabyswall|unterattack)|losingmarubozu)|t(hrusting|a(sukigap|kuri)|ristar)|i(n(neck|vertedhammer)|dentical3crows)|2crows|onneck|d(oji(star)?|arkcloudcover|ragonflydoji)|u(nique3river|psidegap2crows)|3(starsinsouth|inside|outside|whitesoldiers|linestrike|blackcrows)|piercing|e(ngulfing|vening(star|dojistar))|kicking(bylength)?|l(ongl(ine|eggeddoji)|adderbottom)|a(dvanceblock|bandonedbaby)|ri(sefall3methods|ckshawman)|g(apsidesidewhite|ravestonedoji)|xsidegap3methods|m(orning(star|dojistar)|a(t(hold|chinglow)|rubozu))|b(elthold|reakaway))|eil|mo)|t(sf|ypprice|3|ema|an(h)?|r(i(x|ma)|ange))|obv|d(iv|ema|x)|ultosc|p(po|lus_d(i|m))|e(rrno|xp|ma)|var|kama|floor|w(clprice|illr|ma)|l(n|inearreg(_(slope|intercept|angle))?|og10)|a(sin|cos|t(an|r)|d(osc|d|x(r)?)?|po|vgprice|roon(osc)?)|r(si|oc(p|r(100)?)?)|get_(compat|unstable_period)|m(i(n(index|us_d(i|m)|max(index)?)?|dp(oint|rice))|om|ult|edprice|fi|a(cd(ext|fix)?|vp|x(index)?|ma)?)|b(op|eta|bands))\\b", + "match": "(?xi)\\b\ntrader_(\n stoch(f|r|rsi)?|stddev|sin(h)?|sum|sub|set_(compat|unstable_period)|sqrt|sar(ext)?|sma|\n ht_(sine|trend(line|mode)|dc(period|phase)|phasor)|natr|cci|cos(h)?|correl|\n cdl(shootingstar|shortline|sticksandwich|stalledpattern|spinningtop|separatinglines|\n hikkake(mod)?|highwave|homingpigeon|hangingman|harami(cross)?|hammer|concealbabyswall|\n counterattack|closingmarubozu|thrusting|tasukigap|takuri|tristar|inneck|invertedhammer|\n identical3crows|2crows|onneck|doji(star)?|darkcloudcover|dragonflydoji|unique3river|\n upsidegap2crows|3(starsinsouth|inside|outside|whitesoldiers|linestrike|blackcrows)|\n piercing|engulfing|evening(doji)?star|kicking(bylength)?|longline|longleggeddoji|\n ladderbottom|advanceblock|abandonedbaby|risefall3methods|rickshawman|gapsidesidewhite|\n gravestonedoji|xsidegap3methods|morning(doji)?star|mathold|matchinglow|marubozu|\n belthold|breakaway)|\n ceil|cmo|tsf|typprice|t3|tema|tan(h)?|trix|trima|trange|obv|div|dema|dx|ultosc|ppo|\n plus_d[im]|errno|exp|ema|var|kama|floor|wclprice|willr|wma|ln|log10|bop|beta|bbands|\n linearreg(_(slope|intercept|angle))?|asin|acos|atan|atr|adosc|ad|add|adx(r)?|apo|avgprice|\n aroon(osc)?|rsi|roc|rocp|rocr(100)?|get_(compat|unstable_period)|min(index)?|minus_d[im]|\n minmax(index)?|mid(point|price)|mom|mult|medprice|mfi|macd(ext|fix)?|mavp|max(index)?|ma(ma)?\n)\\b", "name": "support.function.trader.php" }, { - "match": "(?i)\\buopz_(co(py|mpose)|implement|overload|delete|undefine|extend|f(unction|lags)|re(store|name|define)|backup)\\b", + "match": "(?i)\\buopz_(copy|compose|implement|overload|delete|undefine|extend|function|flags|restore|rename|redefine|backup)\\b", "name": "support.function.uopz.php" }, { - "match": "(?i)\\b(http_build_query|url(decode|encode)|parse_url|rawurl(decode|encode)|get_(headers|meta_tags)|base64_(decode|encode))\\b", + "match": "(?i)\\b(http_build_query|(raw)?url(decode|encode)|parse_url|get_(headers|meta_tags)|base64_(decode|encode))\\b", "name": "support.function.url.php" }, { - "match": "(?i)\\b(s(trval|e(ttype|rialize))|i(s(set|_(s(calar|tring)|nu(ll|meric)|callable|int(eger)?|object|double|float|long|array|re(source|al)|bool))|ntval|mport_request_variables)|d(oubleval|ebug_zval_dump)|unse(t|rialize)|print_r|empty|var_(dump|export)|floatval|get(type|_(defined_vars|resource_type))|boolval)\\b", + "match": "(?xi)\\b\n(\n strval|settype|serialize|(bool|double|float)val|debug_zval_dump|intval|import_request_variables|isset|\n is_(scalar|string|null|numeric|callable|int(eger)?|object|double|float|long|array|resource|real|bool)|\n unset|unserialize|print_r|empty|var_(dump|export)|gettype|get_(defined_vars|resource_type)\n)\\b", "name": "support.function.var.php" }, { - "match": "(?i)\\bwddx_(serialize_va(lue|rs)|deserialize|packet_(start|end)|add_vars)\\b", + "match": "(?i)\\bwddx_(serialize_(value|vars)|deserialize|packet_(start|end)|add_vars)\\b", "name": "support.function.wddx.php" }, { - "match": "(?i)\\bxhprof_(sample_(disable|enable)|disable|enable)\\b", + "match": "(?i)\\bxhprof_(sample_)?(disable|enable)\\b", "name": "support.function.xhprof.php" }, { - "match": "(?i)\\b(utf8_(decode|encode)|xml_(set_(start_namespace_decl_handler|notation_decl_handler|character_data_handler|object|default_handler|unparsed_entity_decl_handler|processing_instruction_handler|e(nd_namespace_decl_handler|lement_handler|xternal_entity_ref_handler))|parse(_into_struct|r_(set_option|create(_ns)?|free|get_option))?|error_string|get_(current_(column_number|line_number|byte_index)|error_code)))\\b", + "match": "(?xi)\n\\b\n(\n utf8_(decode|encode)|\n xml_(set_((notation|(end|start)_namespace|unparsed_entity)_decl_handler|\n (character_data|default|element|external_entity_ref|processing_instruction)_handler|object)|\n parse(_into_struct)?|parser_((get|set)_option|create(_ns)?|free)|error_string|\n get_(current_((column|line)_number|byte_index)|error_code))\n)\\b", "name": "support.function.xml.php" }, { - "match": "(?i)\\bxmlrpc_(se(t_type|rver_(c(all_method|reate)|destroy|add_introspection_data|register_(introspection_callback|method)))|is_fault|decode(_request)?|parse_method_descriptions|encode(_request)?|get_type)\\b", + "match": "(?xi)\\b\nxmlrpc_(\n server_(call_method|create|destroy|add_introspection_data|register_(introspection_callback|method))|\n is_fault|decode(_request)?|parse_method_descriptions|encode(_request)?|(get|set)_type\n)\\b", "name": "support.function.xmlrpc.php" }, { - "match": "(?i)\\bxmlwriter_(s(tart_(c(omment|data)|d(td(_(e(ntity|lement)|attlist))?|ocument)|pi|element(_ns)?|attribute(_ns)?)|et_indent(_string)?)|text|o(utput_memory|pen_(uri|memory))|end_(c(omment|data)|d(td(_(e(ntity|lement)|attlist))?|ocument)|pi|element|attribute)|f(ull_end_element|lush)|write_(c(omment|data)|dtd(_(e(ntity|lement)|attlist))?|pi|element(_ns)?|attribute(_ns)?|raw))\\b", + "match": "(?xi)\\b\nxmlwriter_(\n (end|start|write)_(comment|cdata|dtd(_(attlist|entity|element))?|document|pi|attribute|element)|\n (start|write)_(attribute|element)_ns|write_raw|set_indent(_string)?|text|output_memory|open_(memory|uri)|\n full_end_element|flush|\n)\\b", "name": "support.function.xmlwriter.php" }, { - "match": "(?i)\\b(zlib_(decode|encode|get_coding_type)|readgzfile|gz(seek|c(ompress|lose)|tell|inflate|open|de(code|flate)|uncompress|p(uts|assthru)|e(ncode|of)|file|write|re(wind|ad)|get(s(s)?|c)))\\b", + "match": "(?xi)\\b\n(\n zlib_(decode|encode|get_coding_type)|readgzfile|\n gz(seek|compress|close|tell|inflate|open|decode|deflate|uncompress|puts|passthru|encode|eof|file|\n write|rewind|read|getc|getss?)\n)\\b", "name": "support.function.zlib.php" }, { @@ -2493,16 +3133,6 @@ } ] }, - "user-function-call": { - "begin": "(?i)(?=[a-z_0-9\\\\]*[a-z_][a-z0-9_]*\\s*\\()", - "end": "(?i)[a-z_][a-z_0-9]*(?=\\s*\\()", - "name": "meta.function-call.php", - "patterns": [ - { - "include": "#namespace" - } - ] - }, "var_basic": { "patterns": [ { @@ -2511,7 +3141,7 @@ "name": "punctuation.definition.variable.php" } }, - "match": "(?x)\n \t\t\t (\\$+)[a-zA-Z_\\x{7f}-\\x{ff}]\n \t\t\t [a-zA-Z0-9_\\x{7f}-\\x{ff}]*?\\b", + "match": "(?i)(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*\\b", "name": "variable.other.php" } ] @@ -2534,6 +3164,15 @@ "match": "(\\$)((GLOBALS|_(ENV|SERVER|SESSION)))", "name": "variable.other.global.safer.php" }, + "var_language": { + "match": "(\\$)this\\b", + "name": "variable.language.this.php", + "captures": { + "1": { + "name": "punctuation.definition.variable.php" + } + } + }, "variable-name": { "patterns": [ { @@ -2575,8 +3214,7 @@ "name": "punctuation.section.array.end.php" } }, - "comment": "Simple syntax: $foo, $foo[0], $foo[$bar], $foo->bar", - "match": "(?x)\n\t\t\t\t\t\t((\\$)(?[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*))\n\t\t\t\t\t\t(?:\n\t\t\t\t\t\t\t(->)(\\g)\n\t\t\t\t\t\t\t|\n\t\t\t\t\t\t\t(\\[)\n\t\t\t\t\t\t\t\t(?:(\\d+)|((\\$)\\g)|(\\w+))\n\t\t\t\t\t\t\t(\\])\n\t\t\t\t\t\t)?\n\t\t\t\t\t\t" + "match": "(?xi)\n((\\$)(?[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*))\n(?:\n (->)(\\g)\n |\n (\\[)(?:(\\d+)|((\\$)\\g)|([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*))(\\])\n)?" }, { "captures": { @@ -2590,13 +3228,15 @@ "name": "punctuation.definition.variable.php" } }, - "comment": "Simple syntax with braces: \"foo${bar}baz\"", - "match": "(?x)\n\t\t\t\t\t\t((\\$\\{)(?[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)(\\}))\n\t\t\t\t\t\t" + "match": "(?i)((\\${)(?[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)(}))" } ] }, "variables": { "patterns": [ + { + "include": "#var_language" + }, { "include": "#var_global" }, @@ -2607,15 +3247,15 @@ "include": "#var_basic" }, { - "begin": "(\\$\\{)(?=.*?\\})", + "begin": "\\${(?=.*?})", "beginCaptures": { - "1": { + "0": { "name": "punctuation.definition.variable.php" } }, - "end": "(\\})", + "end": "}", "endCaptures": { - "1": { + "0": { "name": "punctuation.definition.variable.php" } }, @@ -2627,6 +3267,5 @@ } ] } - }, - "version": "https://github.com/atom/language-php/commit/6c48772bfdf5ed057501952f8454900b91ff140a" + } } \ No newline at end of file diff --git a/extensions/php/test/colorize-fixtures/issue-28354.php b/extensions/php/test/colorize-fixtures/issue-28354.php new file mode 100644 index 0000000000000..a6fce36cda824 --- /dev/null +++ b/extensions/php/test/colorize-fixtures/issue-28354.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/extensions/php/test/colorize-fixtures/test.php b/extensions/php/test/colorize-fixtures/test.php index 2a64196636887..b7d9578dcac7b 100644 --- a/extensions/php/test/colorize-fixtures/test.php +++ b/extensions/php/test/colorize-fixtures/test.php @@ -40,7 +40,9 @@ function functionName(){ print("Uncut Point: $deck[$index] "); $starting_point++; } + + function foo bar(){} ?> - \ No newline at end of file + diff --git a/extensions/php/test/colorize-results/issue-28354_php.json b/extensions/php/test/colorize-results/issue-28354_php.json new file mode 100644 index 0000000000000..a78acbee7a0d3 --- /dev/null +++ b/extensions/php/test/colorize-results/issue-28354_php.json @@ -0,0 +1,541 @@ +[ + { + "c": "<", + "t": "text.html.php meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.begin.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "script", + "t": "text.html.php meta.embedded.block.html meta.tag.metadata.script.html entity.name.tag.html", + "r": { + "dark_plus": "entity.name.tag: #569CD6", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag: #569CD6", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag: #569CD6" + } + }, + { + "c": ">", + "t": "text.html.php meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.end.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": " ", + "t": "text.html.php meta.embedded.block.html source.js", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "...", + "t": "text.html.php meta.embedded.block.html source.js keyword.operator.spread.js", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, + { + "c": " ", + "t": "text.html.php meta.embedded.block.html source.js punctuation.whitespace.embedded.leading.php", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "", + "t": "text.html.php meta.embedded.block.html source.js meta.embedded.block.php punctuation.section.embedded.end.php", + "r": { + "dark_plus": "punctuation.section.embedded.end.php: #569CD6", + "light_plus": "punctuation.section.embedded.end.php: #800000", + "dark_vs": "punctuation.section.embedded.end.php: #569CD6", + "light_vs": "punctuation.section.embedded.end.php: #800000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "text.html.php meta.embedded.block.html source.js", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "...", + "t": "text.html.php meta.embedded.block.html source.js keyword.operator.spread.js", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, + { + "c": "<", + "t": "text.html.php meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.begin.html source.js", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "/", + "t": "text.html.php meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.begin.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "script", + "t": "text.html.php meta.embedded.block.html meta.tag.metadata.script.html entity.name.tag.html", + "r": { + "dark_plus": "entity.name.tag: #569CD6", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag: #569CD6", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag: #569CD6" + } + }, + { + "c": ">", + "t": "text.html.php meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.end.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + } +] \ No newline at end of file diff --git a/extensions/php/test/colorize-results/test_php.json b/extensions/php/test/colorize-results/test_php.json index 72e7f6a86a40a..997b0b2fbadc0 100644 --- a/extensions/php/test/colorize-results/test_php.json +++ b/extensions/php/test/colorize-results/test_php.json @@ -221,18 +221,18 @@ }, { "c": "", - "t": "text.html.php meta.embedded.block.php source.php string.quoted.double.php meta.string-contents.quoted.double.php", + "t": "text.html.php meta.embedded.block.php source.php meta.function-call.php string.quoted.double.php", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -2432,7 +2542,7 @@ }, { "c": "\"", - "t": "text.html.php meta.embedded.block.php source.php string.quoted.double.php punctuation.definition.string.end.php", + "t": "text.html.php meta.embedded.block.php source.php meta.function-call.php string.quoted.double.php punctuation.definition.string.end.php", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -2443,7 +2553,7 @@ }, { "c": ")", - "t": "text.html.php meta.embedded.block.php source.php", + "t": "text.html.php meta.embedded.block.php source.php meta.function-call.php punctuation.definition.arguments.end.bracket.round.php", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -2515,11 +2625,11 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { - "c": " (", + "c": " ", "t": "text.html.php meta.embedded.block.php source.php", "r": { "dark_plus": "default: #D4D4D4", @@ -2529,6 +2639,17 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "(", + "t": "text.html.php meta.embedded.block.php source.php punctuation.definition.begin.bracket.round.php", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, { "c": "$", "t": "text.html.php meta.embedded.block.php source.php variable.other.php punctuation.definition.variable.php", @@ -2537,7 +2658,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2548,7 +2669,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2625,7 +2746,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2636,7 +2757,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2713,7 +2834,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2724,7 +2845,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2739,7 +2860,18 @@ } }, { - "c": ") ", + "c": ")", + "t": "text.html.php meta.embedded.block.php source.php punctuation.definition.end.bracket.round.php", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", "t": "text.html.php meta.embedded.block.php source.php", "r": { "dark_plus": "default: #D4D4D4", @@ -2779,11 +2911,11 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { - "c": " (", + "c": " ", "t": "text.html.php meta.embedded.block.php source.php", "r": { "dark_plus": "default: #D4D4D4", @@ -2793,6 +2925,17 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "(", + "t": "text.html.php meta.embedded.block.php source.php punctuation.definition.begin.bracket.round.php", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, { "c": "$", "t": "text.html.php meta.embedded.block.php source.php variable.other.php punctuation.definition.variable.php", @@ -2801,7 +2944,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2812,7 +2955,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2860,7 +3003,18 @@ } }, { - "c": ") ", + "c": ")", + "t": "text.html.php meta.embedded.block.php source.php punctuation.definition.end.bracket.round.php", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", "t": "text.html.php meta.embedded.block.php source.php", "r": { "dark_plus": "default: #D4D4D4", @@ -2900,7 +3054,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2911,7 +3065,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3004,18 +3158,18 @@ }, { "c": "print", - "t": "text.html.php meta.embedded.block.php source.php support.function.construct.output.php", + "t": "text.html.php meta.embedded.block.php source.php meta.function-call.php support.function.construct.output.php", "r": { "dark_plus": "support.function: #DCDCAA", "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { "c": "(", - "t": "text.html.php meta.embedded.block.php source.php", + "t": "text.html.php meta.embedded.block.php source.php meta.function-call.php punctuation.definition.arguments.begin.bracket.round.php", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -3026,7 +3180,7 @@ }, { "c": "\"", - "t": "text.html.php meta.embedded.block.php source.php string.quoted.double.php punctuation.definition.string.begin.php", + "t": "text.html.php meta.embedded.block.php source.php meta.function-call.php string.quoted.double.php punctuation.definition.string.begin.php", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -3037,7 +3191,7 @@ }, { "c": "Uncut Point: ", - "t": "text.html.php meta.embedded.block.php source.php string.quoted.double.php meta.string-contents.quoted.double.php", + "t": "text.html.php meta.embedded.block.php source.php meta.function-call.php string.quoted.double.php", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -3048,29 +3202,29 @@ }, { "c": "$", - "t": "text.html.php meta.embedded.block.php source.php string.quoted.double.php meta.string-contents.quoted.double.php variable.other.php punctuation.definition.variable.php", + "t": "text.html.php meta.embedded.block.php source.php meta.function-call.php string.quoted.double.php variable.other.php punctuation.definition.variable.php", "r": { "dark_plus": "variable: #9CDCFE", "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { "c": "deck", - "t": "text.html.php meta.embedded.block.php source.php string.quoted.double.php meta.string-contents.quoted.double.php variable.other.php", + "t": "text.html.php meta.embedded.block.php source.php meta.function-call.php string.quoted.double.php variable.other.php", "r": { "dark_plus": "variable: #9CDCFE", "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { "c": "[", - "t": "text.html.php meta.embedded.block.php source.php string.quoted.double.php meta.string-contents.quoted.double.php punctuation.section.array.begin.php", + "t": "text.html.php meta.embedded.block.php source.php meta.function-call.php string.quoted.double.php punctuation.section.array.begin.php", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -3081,29 +3235,29 @@ }, { "c": "$", - "t": "text.html.php meta.embedded.block.php source.php string.quoted.double.php meta.string-contents.quoted.double.php variable.other.index.php punctuation.definition.variable.php", + "t": "text.html.php meta.embedded.block.php source.php meta.function-call.php string.quoted.double.php variable.other.index.php punctuation.definition.variable.php", "r": { "dark_plus": "variable: #9CDCFE", "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { "c": "index", - "t": "text.html.php meta.embedded.block.php source.php string.quoted.double.php meta.string-contents.quoted.double.php variable.other.index.php", + "t": "text.html.php meta.embedded.block.php source.php meta.function-call.php string.quoted.double.php variable.other.index.php", "r": { "dark_plus": "variable: #9CDCFE", "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { "c": "]", - "t": "text.html.php meta.embedded.block.php source.php string.quoted.double.php meta.string-contents.quoted.double.php punctuation.section.array.end.php", + "t": "text.html.php meta.embedded.block.php source.php meta.function-call.php string.quoted.double.php punctuation.section.array.end.php", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -3114,7 +3268,7 @@ }, { "c": " ", - "t": "text.html.php meta.embedded.block.php source.php string.quoted.double.php meta.string-contents.quoted.double.php", + "t": "text.html.php meta.embedded.block.php source.php meta.function-call.php string.quoted.double.php", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -3125,7 +3279,7 @@ }, { "c": "\"", - "t": "text.html.php meta.embedded.block.php source.php string.quoted.double.php punctuation.definition.string.end.php", + "t": "text.html.php meta.embedded.block.php source.php meta.function-call.php string.quoted.double.php punctuation.definition.string.end.php", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -3136,7 +3290,7 @@ }, { "c": ")", - "t": "text.html.php meta.embedded.block.php source.php", + "t": "text.html.php meta.embedded.block.php source.php meta.function-call.php punctuation.definition.arguments.end.bracket.round.php", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -3175,7 +3329,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3186,7 +3340,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3233,25 +3387,113 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "\t", + "t": "text.html.php meta.embedded.block.php source.php", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "function", + "t": "text.html.php meta.embedded.block.php source.php meta.function.php storage.type.function.php", + "r": { + "dark_plus": "storage.type: #569CD6", + "light_plus": "storage.type: #0000FF", + "dark_vs": "storage.type: #569CD6", + "light_vs": "storage.type: #0000FF", + "hc_black": "storage.type: #569CD6" + } + }, + { + "c": " ", + "t": "text.html.php meta.embedded.block.php source.php meta.function.php", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "foo bar", + "t": "text.html.php meta.embedded.block.php source.php meta.function.php entity.name.function.php", + "r": { + "dark_plus": "entity.name.function: #DCDCAA", + "light_plus": "entity.name.function: #795E26", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.function: #DCDCAA" + } + }, + { + "c": "(", + "t": "text.html.php meta.embedded.block.php source.php meta.function.php punctuation.definition.parameters.begin.bracket.round.php", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ")", + "t": "text.html.php meta.embedded.block.php source.php meta.function.php punctuation.definition.parameters.end.bracket.round.php", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "{", + "t": "text.html.php meta.embedded.block.php source.php punctuation.section.scope.begin.php", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "}", + "t": "text.html.php meta.embedded.block.php source.php punctuation.section.scope.end.php", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, { "c": "?", - "t": "text.html.php meta.embedded.block.php punctuation.section.embedded.end.metatag.php source.php", + "t": "text.html.php meta.embedded.block.php punctuation.section.embedded.end.php source.php", "r": { - "dark_plus": "punctuation.section.embedded.end.metatag.php: #569CD6", - "light_plus": "punctuation.section.embedded.end.metatag.php: #800000", - "dark_vs": "punctuation.section.embedded.end.metatag.php: #569CD6", - "light_vs": "punctuation.section.embedded.end.metatag.php: #800000", + "dark_plus": "punctuation.section.embedded.end.php: #569CD6", + "light_plus": "punctuation.section.embedded.end.php: #800000", + "dark_vs": "punctuation.section.embedded.end.php: #569CD6", + "light_vs": "punctuation.section.embedded.end.php: #800000", "hc_black": "default: #FFFFFF" } }, { "c": ">", - "t": "text.html.php meta.embedded.block.php punctuation.section.embedded.end.metatag.php", + "t": "text.html.php meta.embedded.block.php punctuation.section.embedded.end.php", "r": { - "dark_plus": "punctuation.section.embedded.end.metatag.php: #569CD6", - "light_plus": "punctuation.section.embedded.end.metatag.php: #800000", - "dark_vs": "punctuation.section.embedded.end.metatag.php: #569CD6", - "light_vs": "punctuation.section.embedded.end.metatag.php: #800000", + "dark_plus": "punctuation.section.embedded.end.php: #569CD6", + "light_plus": "punctuation.section.embedded.end.php: #800000", + "dark_vs": "punctuation.section.embedded.end.php: #569CD6", + "light_vs": "punctuation.section.embedded.end.php: #800000", "hc_black": "default: #FFFFFF" } }, diff --git a/extensions/php/tsconfig.json b/extensions/php/tsconfig.json index 90ac01c2d39f0..a2b5bcdfddf61 100644 --- a/extensions/php/tsconfig.json +++ b/extensions/php/tsconfig.json @@ -7,7 +7,7 @@ "module": "commonjs", "outDir": "./out" }, - "exclude": [ - "node_modules" + "include": [ + "src/**/*" ] } \ No newline at end of file diff --git a/extensions/powershell/.vscodeignore b/extensions/powershell/.vscodeignore new file mode 100644 index 0000000000000..77ab386fc7df4 --- /dev/null +++ b/extensions/powershell/.vscodeignore @@ -0,0 +1 @@ +test/** \ No newline at end of file diff --git a/extensions/powershell/test/colorize-results/test_ps1.json b/extensions/powershell/test/colorize-results/test_ps1.json index 794ed90dcf4aa..bce680fee4026 100644 --- a/extensions/powershell/test/colorize-results/test_ps1.json +++ b/extensions/powershell/test/colorize-results/test_ps1.json @@ -40,7 +40,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -73,7 +73,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -117,7 +117,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -216,7 +216,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -260,7 +260,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -315,7 +315,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -337,7 +337,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -370,7 +370,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -381,7 +381,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -458,7 +458,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -491,7 +491,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -623,7 +623,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -667,7 +667,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -766,7 +766,7 @@ "light_plus": "variable: #001080", "dark_vs": "entity.other.attribute-name: #9CDCFE", "light_vs": "entity.other.attribute-name: #FF0000", - "hc_black": "entity.other.attribute-name: #9CDCFE" + "hc_black": "variable: #9CDCFE" } }, { @@ -821,7 +821,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -865,7 +865,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -920,7 +920,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -986,7 +986,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1041,7 +1041,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1382,7 +1382,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1459,7 +1459,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1514,7 +1514,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1569,7 +1569,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1690,7 +1690,7 @@ "light_plus": "support.variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.variable: #9CDCFE" } }, { @@ -1701,7 +1701,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1745,7 +1745,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1822,7 +1822,7 @@ "light_plus": "support.variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.variable: #9CDCFE" } }, { @@ -1833,7 +1833,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1855,7 +1855,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1888,7 +1888,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1954,7 +1954,7 @@ "light_plus": "support.variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "support.variable: #9CDCFE" } }, { @@ -1965,7 +1965,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -2031,7 +2031,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2075,7 +2075,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2119,7 +2119,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2174,7 +2174,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2273,7 +2273,7 @@ "light_plus": "support.variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.variable: #9CDCFE" } }, { @@ -2284,7 +2284,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2328,7 +2328,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2350,7 +2350,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -2405,7 +2405,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/pug/.vscodeignore b/extensions/pug/.vscodeignore new file mode 100644 index 0000000000000..77ab386fc7df4 --- /dev/null +++ b/extensions/pug/.vscodeignore @@ -0,0 +1 @@ +test/** \ No newline at end of file diff --git a/extensions/pug/syntaxes/pug.tmLanguage.json b/extensions/pug/syntaxes/pug.tmLanguage.json index 808be9e6db8c2..8a3d17a81dc2c 100644 --- a/extensions/pug/syntaxes/pug.tmLanguage.json +++ b/extensions/pug/syntaxes/pug.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/davidrios/jade-tmbundle/blob/master/Syntaxes/Jade.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." + ], "fileTypes": [ "jade" ], @@ -981,6 +986,5 @@ } }, "scopeName": "text.jade", - "uuid": "eee6ba25-6ac2-4f7e-9c70-cddf2bd3448b", - "version": "https://github.com/davidrios/jade-tmbundle/commit/f311a516bb29296fcebfdc7da8149b1c79dfb0a1" + "uuid": "eee6ba25-6ac2-4f7e-9c70-cddf2bd3448b" } \ No newline at end of file diff --git a/extensions/pug/test/colorize-results/test_pug.json b/extensions/pug/test/colorize-results/test_pug.json index 69bd4db3a9c99..ad73e9dbaf597 100644 --- a/extensions/pug/test/colorize-results/test_pug.json +++ b/extensions/pug/test/colorize-results/test_pug.json @@ -315,7 +315,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -337,7 +337,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -612,7 +612,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -634,7 +634,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -678,7 +678,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -744,7 +744,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -755,7 +755,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -854,7 +854,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -964,7 +964,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string.interpolated.jade: #0000FF", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -986,7 +986,7 @@ "light_plus": "support.variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string.interpolated.jade: #0000FF", - "hc_black": "string: #CE9178" + "hc_black": "support.variable: #9CDCFE" } }, { @@ -1602,7 +1602,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1646,7 +1646,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1668,7 +1668,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1778,7 +1778,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { diff --git a/extensions/python/.vscodeignore b/extensions/python/.vscodeignore index 47cf365a0785e..ebab1d50b9ba0 100644 --- a/extensions/python/.vscodeignore +++ b/extensions/python/.vscodeignore @@ -1 +1,3 @@ test/** +src/** +tsconfig.json \ No newline at end of file diff --git a/extensions/python/syntaxes/MagicPython.tmLanguage.json b/extensions/python/syntaxes/MagicPython.tmLanguage.json index f9d673e627361..29e51b920fac4 100644 --- a/extensions/python/syntaxes/MagicPython.tmLanguage.json +++ b/extensions/python/syntaxes/MagicPython.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/MagicStack/MagicPython/blob/master/grammars/MagicPython.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." + ], "name": "MagicPython", "scopeName": "source.python", "fileTypes": [ @@ -5230,6 +5235,5 @@ } ] } - }, - "version": "https://github.com/MagicStack/MagicPython/commit/976e59dcb78cb577e79c8f2117216c06718337e0" + } } \ No newline at end of file diff --git a/extensions/python/syntaxes/MagicRegExp.tmLanguage.json b/extensions/python/syntaxes/MagicRegExp.tmLanguage.json index b5795a7b89f3d..34d1a973578a4 100644 --- a/extensions/python/syntaxes/MagicRegExp.tmLanguage.json +++ b/extensions/python/syntaxes/MagicRegExp.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/MagicStack/MagicPython/blob/master/grammars/MagicRegExp.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." + ], "name": "MagicRegExp", "scopeName": "source.regexp.python", "fileTypes": [ @@ -460,6 +465,5 @@ } ] } - }, - "version": "https://github.com/MagicStack/MagicPython/commit/df5bb18c64252f2e7b1aa87e2ed124666d314f1d" + } } \ No newline at end of file diff --git a/extensions/python/test/colorize-results/test_py.json b/extensions/python/test/colorize-results/test_py.json index 081349fd61be2..5d58f2c7297a4 100644 --- a/extensions/python/test/colorize-results/test_py.json +++ b/extensions/python/test/colorize-results/test_py.json @@ -7,7 +7,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -29,7 +29,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -84,7 +84,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -216,7 +216,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -238,7 +238,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -271,7 +271,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -458,7 +458,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -480,7 +480,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -579,7 +579,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -667,7 +667,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -689,7 +689,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -744,7 +744,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -854,7 +854,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -942,7 +942,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1030,7 +1030,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1162,7 +1162,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1173,7 +1173,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1921,7 +1921,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1976,7 +1976,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1998,7 +1998,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2031,7 +2031,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2075,7 +2075,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2119,7 +2119,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -2185,7 +2185,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2240,7 +2240,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2284,7 +2284,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2306,7 +2306,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3175,7 +3175,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -3197,7 +3197,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3285,7 +3285,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -3406,7 +3406,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -3747,7 +3747,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -3890,7 +3890,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -3934,7 +3934,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -3956,7 +3956,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3989,7 +3989,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4033,7 +4033,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4077,7 +4077,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -4242,7 +4242,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -4341,7 +4341,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -4396,7 +4396,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -4418,7 +4418,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4451,7 +4451,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4495,7 +4495,7 @@ "light_plus": "variable.language: #0000FF", "dark_vs": "variable.language: #569CD6", "light_vs": "variable.language: #0000FF", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4550,7 +4550,7 @@ "light_plus": "variable.language: #0000FF", "dark_vs": "variable.language: #569CD6", "light_vs": "variable.language: #0000FF", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4649,7 +4649,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -4671,7 +4671,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4715,7 +4715,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4759,7 +4759,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -4825,7 +4825,7 @@ "light_plus": "variable.language: #0000FF", "dark_vs": "variable.language: #569CD6", "light_vs": "variable.language: #0000FF", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4869,7 +4869,7 @@ "light_plus": "variable.language: #0000FF", "dark_vs": "variable.language: #569CD6", "light_vs": "variable.language: #0000FF", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4968,7 +4968,7 @@ "light_plus": "variable.language: #0000FF", "dark_vs": "variable.language: #569CD6", "light_vs": "variable.language: #0000FF", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5056,7 +5056,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5078,7 +5078,7 @@ "light_plus": "variable.language: #0000FF", "dark_vs": "variable.language: #569CD6", "light_vs": "variable.language: #0000FF", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5496,7 +5496,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5551,7 +5551,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5606,7 +5606,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5705,7 +5705,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -5760,7 +5760,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5782,7 +5782,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5804,7 +5804,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -5837,7 +5837,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -5903,7 +5903,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5925,7 +5925,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5969,7 +5969,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6585,7 +6585,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6618,7 +6618,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6651,7 +6651,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { diff --git a/extensions/python/tsconfig.json b/extensions/python/tsconfig.json index 90ac01c2d39f0..a2b5bcdfddf61 100644 --- a/extensions/python/tsconfig.json +++ b/extensions/python/tsconfig.json @@ -7,7 +7,7 @@ "module": "commonjs", "outDir": "./out" }, - "exclude": [ - "node_modules" + "include": [ + "src/**/*" ] } \ No newline at end of file diff --git a/extensions/r/.vscodeignore b/extensions/r/.vscodeignore new file mode 100644 index 0000000000000..77ab386fc7df4 --- /dev/null +++ b/extensions/r/.vscodeignore @@ -0,0 +1 @@ +test/** \ No newline at end of file diff --git a/extensions/r/package.json b/extensions/r/package.json index a41d8ef14880d..e1104e2344006 100644 --- a/extensions/r/package.json +++ b/extensions/r/package.json @@ -3,6 +3,9 @@ "version": "0.1.0", "publisher": "vscode", "engines": { "vscode": "*" }, + "scripts": { + "update-grammar": "node ../../build/npm/update-grammar.js textmate/r.tmbundle Syntaxes/R.plist ./syntaxes/r.tmLanguage.json" + }, "contributes": { "languages": [{ "id": "r", @@ -13,7 +16,7 @@ "grammars": [{ "language": "r", "scopeName": "source.r", - "path": "./syntaxes/R.plist" + "path": "./syntaxes/r.tmLanguage.json" }] } } diff --git a/extensions/r/syntaxes/R.plist b/extensions/r/syntaxes/R.plist deleted file mode 100644 index 58022aa142d43..0000000000000 --- a/extensions/r/syntaxes/R.plist +++ /dev/null @@ -1,316 +0,0 @@ - - - - - fileTypes - - R - r - s - S - Rprofile - - keyEquivalent - ^~R - name - R - patterns - - - captures - - 1 - - name - comment.line.pragma.r - - 2 - - name - entity.name.pragma.name.r - - - match - ^(#pragma[ \t]+mark)[ \t](.*) - name - comment.line.pragma-mark.r - - - begin - (^[ \t]+)?(?=#) - beginCaptures - - 1 - - name - punctuation.whitespace.comment.leading.r - - - end - (?!\G) - patterns - - - begin - # - beginCaptures - - 0 - - name - punctuation.definition.comment.r - - - end - \n - name - comment.line.number-sign.r - - - - - match - \b(logical|numeric|character|complex|matrix|array|data\.frame|list|factor)(?=\s*\() - name - storage.type.r - - - match - \b(function|if|break|next|repeat|else|for|return|switch|while|in|invisible)\b - name - keyword.control.r - - - match - \b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)(i|L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\b - name - constant.numeric.r - - - match - \b(T|F|TRUE|FALSE|NULL|NA|Inf|NaN)\b - name - constant.language.r - - - match - \b(pi|letters|LETTERS|month\.abb|month\.name)\b - name - support.constant.misc.r - - - match - (\-|\+|\*|\/|%\/%|%%|%\*%|%in%|%o%|%x%|\^) - name - keyword.operator.arithmetic.r - - - match - (=|<-|<<-|->|->>) - name - keyword.operator.assignment.r - - - match - (==|!=|<>|<|>|<=|>=) - name - keyword.operator.comparison.r - - - match - (!|&{1,2}|[|]{1,2}) - name - keyword.operator.logical.r - - - match - (\.\.\.|\$|@|:|\~) - name - keyword.other.r - - - begin - " - beginCaptures - - 0 - - name - punctuation.definition.string.begin.r - - - end - " - endCaptures - - 0 - - name - punctuation.definition.string.end.r - - - name - string.quoted.double.r - patterns - - - match - \\. - name - constant.character.escape.r - - - - - begin - ' - beginCaptures - - 0 - - name - punctuation.definition.string.begin.r - - - end - ' - endCaptures - - 0 - - name - punctuation.definition.string.end.r - - - name - string.quoted.single.r - patterns - - - match - \\. - name - constant.character.escape.r - - - - - captures - - 1 - - name - entity.name.function.r - - 2 - - name - keyword.operator.assignment.r - - 3 - - name - keyword.control.r - - - match - ([[:alpha:].][[:alnum:]._]*)\s*(<-)\s*(function) - name - meta.function.r - - - captures - - 1 - - name - entity.name.tag.r - - 4 - - name - entity.name.type.r - - - match - (setMethod|setReplaceMethod|setGeneric|setGroupGeneric|setClass)\s*\(\s*([[:alpha:]\d]+\s*=\s*)?("|\x{27})([a-zA-Z._\[\$@][a-zA-Z0-9._\[]*?)\3.* - name - meta.method.declaration.r - - - match - ([[:alpha:].][[:alnum:]._]*)\s*\( - - - captures - - 1 - - name - variable.parameter.r - - 2 - - name - keyword.operator.assignment.r - - - match - ([[:alpha:].][[:alnum:]._]*)\s*(=)(?=[^=]) - - - match - \b([\d_][[:alnum:]._]+)\b - name - invalid.illegal.variable.other.r - - - match - \b([[:alnum:]_]+)(?=::) - name - entity.namespace.r - - - match - \b([[:alnum:]._]+)\b - name - variable.other.r - - - begin - \{ - beginCaptures - - 0 - - name - punctuation.section.block.begin.r - - - end - \} - endCaptures - - 0 - - name - punctuation.section.block.end.r - - - name - meta.block.r - patterns - - - include - source.r - - - - - scopeName - source.r - uuid - B2E6B78D-6E70-11D9-A369-000D93B3A10E - - \ No newline at end of file diff --git a/extensions/r/syntaxes/r.tmLanguage.json b/extensions/r/syntaxes/r.tmLanguage.json new file mode 100644 index 0000000000000..025877c7ab4e1 --- /dev/null +++ b/extensions/r/syntaxes/r.tmLanguage.json @@ -0,0 +1,208 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/r.tmbundle/blob/master/Syntaxes/R.plist", + "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." + ], + "fileTypes": [ + "R", + "r", + "s", + "S", + "Rprofile" + ], + "keyEquivalent": "^~R", + "name": "R", + "patterns": [ + { + "captures": { + "1": { + "name": "comment.line.pragma.r" + }, + "2": { + "name": "entity.name.pragma.name.r" + } + }, + "match": "^(#pragma[ \\t]+mark)[ \\t](.*)", + "name": "comment.line.pragma-mark.r" + }, + { + "begin": "(^[ \\t]+)?(?=#)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.r" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.r" + } + }, + "end": "\\n", + "name": "comment.line.number-sign.r" + } + ] + }, + { + "match": "\\b(logical|numeric|character|complex|matrix|array|data\\.frame|list|factor)(?=\\s*\\()", + "name": "storage.type.r" + }, + { + "match": "\\b(function|if|break|next|repeat|else|for|return|switch|while|in|invisible)\\b", + "name": "keyword.control.r" + }, + { + "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(i|L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b", + "name": "constant.numeric.r" + }, + { + "match": "\\b(T|F|TRUE|FALSE|NULL|NA|Inf|NaN)\\b", + "name": "constant.language.r" + }, + { + "match": "\\b(pi|letters|LETTERS|month\\.abb|month\\.name)\\b", + "name": "support.constant.misc.r" + }, + { + "match": "(\\-|\\+|\\*|\\/|%\\/%|%%|%\\*%|%in%|%o%|%x%|\\^)", + "name": "keyword.operator.arithmetic.r" + }, + { + "match": "(=|<-|<<-|->|->>)", + "name": "keyword.operator.assignment.r" + }, + { + "match": "(==|!=|<>|<|>|<=|>=)", + "name": "keyword.operator.comparison.r" + }, + { + "match": "(!|&{1,2}|[|]{1,2})", + "name": "keyword.operator.logical.r" + }, + { + "match": "(\\.\\.\\.|\\$|@|:|\\~)", + "name": "keyword.other.r" + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.r" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.r" + } + }, + "name": "string.quoted.double.r", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.r" + } + ] + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.r" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.r" + } + }, + "name": "string.quoted.single.r", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.r" + } + ] + }, + { + "captures": { + "1": { + "name": "entity.name.function.r" + }, + "2": { + "name": "keyword.operator.assignment.r" + }, + "3": { + "name": "keyword.control.r" + } + }, + "match": "([[:alpha:].][[:alnum:]._]*)\\s*(<-)\\s*(function)", + "name": "meta.function.r" + }, + { + "captures": { + "1": { + "name": "entity.name.tag.r" + }, + "4": { + "name": "entity.name.type.r" + } + }, + "match": "(setMethod|setReplaceMethod|setGeneric|setGroupGeneric|setClass)\\s*\\(\\s*([[:alpha:]\\d]+\\s*=\\s*)?(\"|\\x{27})([a-zA-Z._\\[\\$@][a-zA-Z0-9._\\[]*?)\\3.*", + "name": "meta.method.declaration.r" + }, + { + "match": "([[:alpha:].][[:alnum:]._]*)\\s*\\(" + }, + { + "captures": { + "1": { + "name": "variable.parameter.r" + }, + "2": { + "name": "keyword.operator.assignment.r" + } + }, + "match": "([[:alpha:].][[:alnum:]._]*)\\s*(=)(?=[^=])" + }, + { + "match": "\\b([\\d_][[:alnum:]._]+)\\b", + "name": "invalid.illegal.variable.other.r" + }, + { + "match": "\\b([[:alnum:]_]+)(?=::)", + "name": "entity.namespace.r" + }, + { + "match": "\\b([[:alnum:]._]+)\\b", + "name": "variable.other.r" + }, + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.section.block.begin.r" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.r" + } + }, + "name": "meta.block.r", + "patterns": [ + { + "include": "source.r" + } + ] + } + ], + "scopeName": "source.r", + "uuid": "B2E6B78D-6E70-11D9-A369-000D93B3A10E" +} \ No newline at end of file diff --git a/extensions/r/test/colorize-results/test_r.json b/extensions/r/test/colorize-results/test_r.json index bcd1217fd331e..545fbd4b31fac 100644 --- a/extensions/r/test/colorize-results/test_r.json +++ b/extensions/r/test/colorize-results/test_r.json @@ -205,7 +205,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -249,7 +249,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -271,7 +271,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -293,7 +293,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -337,7 +337,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -381,7 +381,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/razor/.vscodeignore b/extensions/razor/.vscodeignore new file mode 100644 index 0000000000000..77ab386fc7df4 --- /dev/null +++ b/extensions/razor/.vscodeignore @@ -0,0 +1 @@ +test/** \ No newline at end of file diff --git a/extensions/razor/syntaxes/cshtml.json b/extensions/razor/syntaxes/cshtml.json index 402915e8c9fc0..180ad0e68dd23 100644 --- a/extensions/razor/syntaxes/cshtml.json +++ b/extensions/razor/syntaxes/cshtml.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/demyte/language-cshtml/blob/master/grammars/cshtml.cson", + "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." + ], "name": "ASP.NET Razor", "scopeName": "text.html.cshtml", "fileTypes": [ @@ -148,6 +153,5 @@ "end": "\\*@", "name": "comment.block.cshtml" } - }, - "version": "https://github.com/demyte/language-cshtml/commit/a49735dc7aef56ae772a3bcfd8e42c89895dcff4" + } } \ No newline at end of file diff --git a/extensions/razor/test/colorize-results/test_cshtml.json b/extensions/razor/test/colorize-results/test_cshtml.json index 8c8c54c9830e5..b87c41d8f04a8 100644 --- a/extensions/razor/test/colorize-results/test_cshtml.json +++ b/extensions/razor/test/colorize-results/test_cshtml.json @@ -7,7 +7,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -40,7 +40,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -62,7 +62,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -84,7 +84,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -117,7 +117,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -139,7 +139,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -227,7 +227,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -249,7 +249,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -326,7 +326,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -348,7 +348,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -392,7 +392,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -425,7 +425,7 @@ "light_plus": "storage.type.cs: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.cs: #4EC9B0" } }, { @@ -480,7 +480,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -502,7 +502,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -546,7 +546,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -579,7 +579,7 @@ "light_plus": "storage.type.cs: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.cs: #4EC9B0" } }, { @@ -667,7 +667,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -711,7 +711,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -799,7 +799,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -887,7 +887,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -909,7 +909,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -931,7 +931,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1041,7 +1041,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1085,7 +1085,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1118,7 +1118,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -3164,7 +3164,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -3318,7 +3318,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -3340,7 +3340,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/ruby/.vscodeignore b/extensions/ruby/.vscodeignore new file mode 100644 index 0000000000000..77ab386fc7df4 --- /dev/null +++ b/extensions/ruby/.vscodeignore @@ -0,0 +1 @@ +test/** \ No newline at end of file diff --git a/extensions/ruby/language-configuration.json b/extensions/ruby/language-configuration.json index b508561c89747..fe8a5e9e2ac69 100644 --- a/extensions/ruby/language-configuration.json +++ b/extensions/ruby/language-configuration.json @@ -21,5 +21,9 @@ ["(", ")"], ["\"", "\""], ["'", "'"] - ] + ], + "indentationRules": { + "increaseIndentPattern": "^\\s*((begin|class|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while)|(.*\\sdo\\b))\\b[^\\{;]*$", + "decreaseIndentPattern": "^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when)\\b)" + } } \ No newline at end of file diff --git a/extensions/ruby/package.json b/extensions/ruby/package.json index 18fe222daafd1..827722f1683fd 100644 --- a/extensions/ruby/package.json +++ b/extensions/ruby/package.json @@ -1,15 +1,13 @@ { "name": "ruby", - "version": "0.2.0", + "version": "0.2.1", "publisher": "vscode", "engines": { "vscode": "*" }, - "activationEvents": ["onLanguage:ruby"], - "main": "./out/rubyMain", "contributes": { "languages": [{ "id": "ruby", "extensions": [ ".rb", ".rbx", ".rjs", ".gemspec", ".rake", ".ru", ".erb" ], - "filenames": [ "rakefile", "gemfile", "guardfile", "podfile" ], + "filenames": [ "rakefile", "gemfile", "guardfile", "podfile", "capfile" ], "aliases": [ "Ruby", "rb" ], "firstLine": "^#!/.*\\bruby\\b", "configuration": "./language-configuration.json" @@ -17,11 +15,7 @@ "grammars": [{ "language": "ruby", "scopeName": "source.ruby", - "path": "./syntaxes/Ruby.plist" + "path": "./syntaxes/ruby.tmLanguage.json" }] - }, - "scripts": { - "compile": "gulp compile-extension:ruby", - "watch": "gulp watch-extension:ruby" } } diff --git a/extensions/ruby/src/rubyMain.ts b/extensions/ruby/src/rubyMain.ts deleted file mode 100644 index fd899f545e3b0..0000000000000 --- a/extensions/ruby/src/rubyMain.ts +++ /dev/null @@ -1,15 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; -import { ExtensionContext, languages } from 'vscode'; - -export function activate(context: ExtensionContext): any { - languages.setLanguageConfiguration('ruby', { - indentationRules: { - increaseIndentPattern: /^\s*((begin|class|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while)|(.*\sdo\b))\b[^\{;]*$/, - decreaseIndentPattern: /^\s*([}\]]([,)]?\s*(#|$)|\.[a-zA-Z_]\w*\b)|(end|rescue|ensure|else|elsif|when)\b)/ - } - }); -} diff --git a/extensions/ruby/src/typings/ref.d.ts b/extensions/ruby/src/typings/ref.d.ts deleted file mode 100644 index 531d3c037dde7..0000000000000 --- a/extensions/ruby/src/typings/ref.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -/// \ No newline at end of file diff --git a/extensions/ruby/syntaxes/Ruby.plist b/extensions/ruby/syntaxes/Ruby.plist deleted file mode 100644 index 04e41fabbf5d0..0000000000000 --- a/extensions/ruby/syntaxes/Ruby.plist +++ /dev/null @@ -1,4092 +0,0 @@ - - - - - comment - - TODO: unresolved issues - - text: - "p <<end - print me! - end" - symptoms: - not recognized as a heredoc - solution: - there is no way to distinguish perfectly between the << operator and the start - of a heredoc. Currently, we require assignment to recognize a heredoc. More - refinement is possible. - • Heredocs with indented terminators (<<-) are always distinguishable, however. - • Nested heredocs are not really supportable at present - - text: - print <<-'THERE' - This is single quoted. - The above used #{Time.now} - THERE - symtoms: - From Programming Ruby p306; should be a non-interpolated heredoc. - - text: - val?(a):p(b) - val?'a':'b' - symptoms: - ':p' is recognized as a symbol.. its 2 things ':' and 'p'. - :'b' has same problem. - solution: - ternary operator rule, precedence stuff, symbol rule. - but also consider 'a.b?(:c)' ?? - - fileTypes - - rb - rbx - rjs - Rakefile - rake - cgi - fcgi - gemspec - irbrc - Capfile - ru - prawn - Cheffile - Gemfile - Guardfile - Hobofile - Vagrantfile - Appraisals - Rantfile - Berksfile - Berksfile.lock - Thorfile - Puppetfile - - firstLineMatch - ^#!/.*\bruby - keyEquivalent - ^~R - name - Ruby - patterns - - - captures - - 1 - - name - keyword.control.class.ruby - - 2 - - name - entity.name.type.class.ruby - - 3 - - name - keyword.operator.other.ruby - - 4 - - name - entity.other.inherited-class.ruby - - 5 - - name - keyword.operator.other.ruby - - 6 - - name - variable.other.object.ruby - - - match - ^\s*(class)\s+(?:([.a-zA-Z0-9_:]+)(?:\s*(<)\s*([.a-zA-Z0-9_:]+))?|(<<)\s*([.a-zA-Z0-9_:]+)) - name - meta.class.ruby - - - captures - - 1 - - name - keyword.control.module.ruby - - 2 - - name - entity.name.type.module.ruby - - 3 - - name - entity.other.inherited-class.module.first.ruby - - 4 - - name - punctuation.separator.inheritance.ruby - - 5 - - name - entity.other.inherited-class.module.second.ruby - - 6 - - name - punctuation.separator.inheritance.ruby - - 7 - - name - entity.other.inherited-class.module.third.ruby - - 8 - - name - punctuation.separator.inheritance.ruby - - - match - ^\s*(module)\s+(([A-Z]\w*(::))?([A-Z]\w*(::))?([A-Z]\w*(::))*[A-Z]\w*) - name - meta.module.ruby - - - comment - else if is a common mistake carried over from other languages. it works if you put in a second end, but it’s never what you want. - match - (?<!\.)\belse(\s)+if\b - name - invalid.deprecated.ruby - - - captures - - 1 - - name - punctuation.definition.constant.ruby - - - comment - symbols as hash key (1.9 syntax) - match - (?>[a-zA-Z_]\w*(?>[?!])?)(:)(?!:) - name - constant.other.symbol.hashkey.ruby - - - captures - - 1 - - name - punctuation.definition.constant.ruby - - - comment - symbols as hash key (1.8 syntax) - match - (?<!:)(:)(?>[a-zA-Z_]\w*(?>[?!])?)(?=\s*=>) - name - constant.other.symbol.hashkey.ruby - - - comment - everything being a reserved word, not a value and needing a 'end' is a.. - match - (?<!\.)\b(BEGIN|begin|case|class|else|elsif|END|end|ensure|for|if|in|module|rescue|then|unless|until|when|while)\b(?![?!]) - name - keyword.control.ruby - - - comment - contextual smart pair support for block parameters - match - (?<!\.)\bdo\b\s* - name - keyword.control.start-block.ruby - - - comment - contextual smart pair support - match - (?<=\{)(\s+) - name - meta.syntax.ruby.start-block - - - comment - as above, just doesn't need a 'end' and does a logic operation - match - (?<!\.)\b(and|not|or)\b - name - keyword.operator.logical.ruby - - - comment - just as above but being not a logical operation - match - (?<!\.)\b(alias|alias_method|break|next|redo|retry|return|super|undef|yield)\b(?![?!])|\bdefined\?|\bblock_given\? - name - keyword.control.pseudo-method.ruby - - - match - \b(nil|true|false)\b(?![?!]) - name - constant.language.ruby - - - match - \b(__(FILE|LINE)__|self)\b(?![?!]) - name - variable.language.ruby - - - comment - everything being a method but having a special function is a.. - match - \b(initialize|new|loop|include|extend|prepend|fail|raise|attr_reader|attr_writer|attr_accessor|attr|catch|throw|private|module_function|public|protected)\b(?![?!]) - name - keyword.other.special-method.ruby - - - begin - \b(require|require_relative|gem)\b - captures - - 1 - - name - keyword.other.special-method.ruby - - - end - $|(?=#|\}) - name - meta.require.ruby - patterns - - - include - $self - - - - - captures - - 1 - - name - punctuation.definition.variable.ruby - - - match - (@)[a-zA-Z_]\w* - name - variable.other.readwrite.instance.ruby - - - captures - - 1 - - name - punctuation.definition.variable.ruby - - - match - (@@)[a-zA-Z_]\w* - name - variable.other.readwrite.class.ruby - - - captures - - 1 - - name - punctuation.definition.variable.ruby - - - match - (\$)[a-zA-Z_]\w* - name - variable.other.readwrite.global.ruby - - - captures - - 1 - - name - punctuation.definition.variable.ruby - - - match - (\$)(!|@|&|`|'|\+|\d+|~|=|/|\\|,|;|\.|<|>|_|\*|\$|\?|:|"|-[0adFiIlpv]) - name - variable.other.readwrite.global.pre-defined.ruby - - - begin - \b(ENV)\[ - beginCaptures - - 1 - - name - variable.other.constant.ruby - - - end - \] - name - meta.environment-variable.ruby - patterns - - - include - $self - - - - - match - \b[A-Z]\w*(?=((\.|::)[A-Za-z]|\[)) - name - support.class.ruby - - - match - \b[A-Z]\w*\b - name - variable.other.constant.ruby - - - begin - (?x) - (?=def\b) # an optimization to help Oniguruma fail fast - (?<=^|\s)(def)\s+ # the def keyword - ( (?>[a-zA-Z_]\w*(?>\.|::))? # a method name prefix - (?>[a-zA-Z_]\w*(?>[?!]|=(?!>))? # the method name - |===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?) ) # …or an operator method - \s*(\() # the openning parenthesis for arguments - - beginCaptures - - 1 - - name - keyword.control.def.ruby - - 2 - - name - entity.name.function.ruby - - 3 - - name - punctuation.definition.parameters.ruby - - - comment - the method pattern comes from the symbol pattern, see there for a explaination - end - \) - endCaptures - - 0 - - name - punctuation.definition.parameters.ruby - - - name - meta.function.method.with-arguments.ruby - patterns - - - begin - (?=[&*_a-zA-Z]) - end - (?=[,)]) - patterns - - - captures - - 1 - - name - storage.type.variable.ruby - - 2 - - name - variable.parameter.function.ruby - - - match - \G([&*]?)([_a-zA-Z][_a-zA-Z0-9]*) - - - include - $self - - - - - - - begin - (?x) - (?=def\b) # an optimization to help Oniguruma fail fast - (?<=^|\s)(def)\s+ # the def keyword - ( (?>[a-zA-Z_]\w*(?>\.|::))? # a method name prefix - (?>[a-zA-Z_]\w*(?>[?!]|=(?!>))? # the method name - |===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?) ) # …or an operator method - [ \t] # the space separating the arguments - (?=[ \t]*[^\s#;]) # make sure arguments and not a comment follow - - beginCaptures - - 1 - - name - keyword.control.def.ruby - - 2 - - name - entity.name.function.ruby - - - comment - same as the previous rule, but without parentheses around the arguments - end - $ - name - meta.function.method.with-arguments.ruby - patterns - - - begin - (?![\s,]) - end - (?=,|$) - patterns - - - captures - - 1 - - name - punctuation.definition.variable.ruby - - - match - \G([&*]?)[_a-zA-Z][_a-zA-Z0-9]* - name - variable.parameter.function.ruby - - - include - $self - - - - - - - captures - - 1 - - name - keyword.control.def.ruby - - 3 - - name - entity.name.function.ruby - - - comment - the optional name is just to catch the def also without a method-name - match - (?x) - (?=def\b) # an optimization to help Oniguruma fail fast - (?<=^|\s)(def)\b # the def keyword - ( \s+ # an optional group of whitespace followed by… - ( (?>[a-zA-Z_]\w*(?>\.|::))? # a method name prefix - (?>[a-zA-Z_]\w*(?>[?!]|=(?!>))? # the method name - |===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?) ) )? # …or an operator method - - name - meta.function.method.without-arguments.ruby - - - match - \b\d(?>_?\d)*(?=\.\d|[eE])(\.\d(?>_?\d)*)?([eE][-+]?\d(?>_?\d)*)?r?i?\b - name - constant.numeric.float.ruby - - - match - \b(0[dD]\d|[1-9])(?>_?\d)*r?i?\b - name - constant.numeric.integer.ruby - - - match - \b0[xX]\h(?>_?\h)*r?i?\b - name - constant.numeric.hex.ruby - - - match - \b0[bB][01](?>_?[01])*r?i?\b - name - constant.numeric.binary.ruby - - - match - \b0([oO]?[0-7](?>_?[0-7])*)?r?i?\b - name - constant.numeric.octal.ruby - - - begin - :' - captures - - 0 - - name - punctuation.definition.constant.ruby - - - end - ' - name - constant.other.symbol.single-quoted.ruby - patterns - - - match - \\['\\] - name - constant.character.escape.ruby - - - - - begin - :" - captures - - 0 - - name - punctuation.definition.constant.ruby - - - end - " - name - constant.other.symbol.double-quoted.ruby - patterns - - - include - #interpolated_ruby - - - include - #escaped_char - - - - - comment - Needs higher precidence than regular expressions. - match - (?<!\()/= - name - keyword.operator.assignment.augmented.ruby - - - begin - ' - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - comment - single quoted string (does not allow interpolation) - end - ' - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.quoted.single.ruby - patterns - - - match - \\'|\\\\ - name - constant.character.escape.ruby - - - - - begin - " - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - comment - double quoted string (allows for interpolation) - end - " - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.quoted.double.ruby - patterns - - - include - #interpolated_ruby - - - include - #escaped_char - - - - - begin - ` - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - comment - execute string (allows for interpolation) - end - ` - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.interpolated.ruby - patterns - - - include - #interpolated_ruby - - - include - #escaped_char - - - - - include - #percent_literals - - - begin - (?x) - (?: - ^ # beginning of line - | (?<= # or look-behind on: - [=>~(?:\[,|&;] - | [\s;]if\s # keywords - | [\s;]elsif\s - | [\s;]while\s - | [\s;]unless\s - | [\s;]when\s - | [\s;]assert_match\s - | [\s;]or\s # boolean opperators - | [\s;]and\s - | [\s;]not\s - | [\s.]index\s # methods - | [\s.]scan\s - | [\s.]sub\s - | [\s.]sub!\s - | [\s.]gsub\s - | [\s.]gsub!\s - | [\s.]match\s - ) - | (?<= # or a look-behind with line anchor: - ^when\s # duplication necessary due to limits of regex - | ^if\s - | ^elsif\s - | ^while\s - | ^unless\s - ) - ) - \s*((/))(?![*+{}?]) - - captures - - 1 - - name - string.regexp.classic.ruby - - 2 - - name - punctuation.definition.string.ruby - - - comment - regular expressions (normal) - we only start a regexp if the character before it (excluding whitespace) - is what we think is before a regexp - - contentName - string.regexp.classic.ruby - end - ((/[eimnosux]*)) - patterns - - - include - #regex_sub - - - - - captures - - 1 - - name - punctuation.definition.constant.ruby - - - comment - symbols - match - (?<!:)(:)(?>[a-zA-Z_]\w*(?>[?!]|=(?![>=]))?|===?|>[>=]?|<[<=]?|<=>|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?|@@?[a-zA-Z_]\w*) - name - constant.other.symbol.ruby - - - begin - ^=begin - captures - - 0 - - name - punctuation.definition.comment.ruby - - - comment - multiline comments - end - ^=end - name - comment.block.documentation.ruby - - - begin - (^[ \t]+)?(?=#) - beginCaptures - - 1 - - name - punctuation.whitespace.comment.leading.ruby - - - end - (?!\G) - patterns - - - begin - # - beginCaptures - - 0 - - name - punctuation.definition.comment.ruby - - - end - \n - name - comment.line.number-sign.ruby - - - - - comment - - matches questionmark-letters. - - examples (1st alternation = hex): - ?\x1 ?\x61 - - examples (2nd alternation = octal): - ?\0 ?\07 ?\017 - - examples (3rd alternation = escaped): - ?\n ?\b - - examples (4th alternation = meta-ctrl): - ?\C-a ?\M-a ?\C-\M-\C-\M-a - - examples (4th alternation = normal): - ?a ?A ?0 - ?* ?" ?( - ?. ?# - - - the negative lookbehind prevents against matching - p(42.tainted?) - - match - (?<!\w)\?(\\(x\h{1,2}(?!\h)\b|0[0-7]{0,2}(?![0-7])\b|[^x0MC])|(\\[MC]-)+\w|[^\s\\]) - name - constant.numeric.ruby - - - begin - ^__END__\n - captures - - 0 - - name - string.unquoted.program-block.ruby - - - comment - __END__ marker - contentName - text.plain - end - (?=not)impossible - patterns - - - begin - (?=<?xml|<(?i:html\b)|!DOCTYPE (?i:html\b)) - end - (?=not)impossible - name - text.html.embedded.ruby - patterns - - - include - text.html.basic - - - - - - - begin - (?=(?><<[-~]("?)((?:[_\w]+_|)HTML)\b\1)) - comment - Heredoc with embedded html - end - (?!\G) - name - meta.embedded.block.html - patterns - - - begin - (?><<[-~]("?)((?:[_\w]+_|)HTML)\b\1) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - contentName - text.html - end - \s*\2$\n? - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.unquoted.heredoc.ruby - patterns - - - include - #heredoc - - - include - #interpolated_ruby - - - include - text.html.basic - - - include - #escaped_char - - - - - - - begin - (?=(?><<[-~]("?)((?:[_\w]+_|)SQL)\b\1)) - comment - Heredoc with embedded sql - end - (?!\G) - name - meta.embedded.block.sql - patterns - - - begin - (?><<[-~]("?)((?:[_\w]+_|)SQL)\b\1) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - contentName - source.sql - end - \s*\2$\n? - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.unquoted.heredoc.ruby - patterns - - - include - #heredoc - - - include - #interpolated_ruby - - - include - source.sql - - - include - #escaped_char - - - - - - - begin - (?=(?><<[-~]("?)((?:[_\w]+_|)CSS)\b\1)) - comment - Heredoc with embedded css - end - (?!\G) - name - meta.embedded.block.css - patterns - - - begin - (?><<[-~]("?)((?:[_\w]+_|)CSS)\b\1) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - contentName - source.css - end - \s*\2$\n? - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.unquoted.heredoc.ruby - patterns - - - include - #heredoc - - - include - #interpolated_ruby - - - include - source.css - - - include - #escaped_char - - - - - - - begin - (?=(?><<[-~]("?)((?:[_\w]+_|)CPP)\b\1)) - comment - Heredoc with embedded c++ - end - (?!\G) - name - meta.embedded.block.cpp - patterns - - - begin - (?><<[-~]("?)((?:[_\w]+_|)CPP)\b\1) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - contentName - source.cpp - end - \s*\2$\n? - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.unquoted.heredoc.ruby - patterns - - - include - #heredoc - - - include - #interpolated_ruby - - - include - source.cpp - - - include - #escaped_char - - - - - - - begin - (?=(?><<[-~]("?)((?:[_\w]+_|)C)\b\1)) - comment - Heredoc with embedded c - end - (?!\G) - name - meta.embedded.block.c - patterns - - - begin - (?><<[-~]("?)((?:[_\w]+_|)C)\b\1) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - contentName - source.c - end - \s*\2$\n? - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.unquoted.heredoc.ruby - patterns - - - include - #heredoc - - - include - #interpolated_ruby - - - include - source.c - - - include - #escaped_char - - - - - - - begin - (?=(?><<[-~]("?)((?:[_\w]+_|)(?:JS|JAVASCRIPT))\b\1)) - comment - Heredoc with embedded javascript - end - (?!\G) - name - meta.embedded.block.js - patterns - - - begin - (?><<[-~]("?)((?:[_\w]+_|)(?:JS|JAVASCRIPT))\b\1) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - contentName - source.js - end - \s*\2$\n? - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.unquoted.heredoc.ruby - patterns - - - include - #heredoc - - - include - #interpolated_ruby - - - include - source.js - - - include - #escaped_char - - - - - - - begin - (?=(?><<[-~]("?)((?:[_\w]+_|)JQUERY)\b\1)) - comment - Heredoc with embedded jQuery javascript - end - (?!\G) - name - meta.embedded.block.js.jquery - patterns - - - begin - (?><<[-~]("?)((?:[_\w]+_|)JQUERY)\b\1) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - contentName - source.js.jquery - end - \s*\2$\n? - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.unquoted.heredoc.ruby - patterns - - - include - #heredoc - - - include - #interpolated_ruby - - - include - source.js.jquery - - - include - #escaped_char - - - - - - - begin - (?=(?><<[-~]("?)((?:[_\w]+_|)(?:SH|SHELL))\b\1)) - comment - Heredoc with embedded shell - end - (?!\G) - name - meta.embedded.block.shell - patterns - - - begin - (?><<[-~]("?)((?:[_\w]+_|)(?:SH|SHELL))\b\1) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - contentName - source.shell - end - \s*\2$\n? - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.unquoted.heredoc.ruby - patterns - - - include - #heredoc - - - include - #interpolated_ruby - - - include - source.shell - - - include - #escaped_char - - - - - - - begin - (?=(?><<[-~]("?)((?:[_\w]+_|)LUA)\b\1)) - comment - Heredoc with embedded lua - end - (?!\G) - name - meta.embedded.block.lua - patterns - - - begin - (?><<[-~]("?)((?:[_\w]+_|)LUA)\b\1) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - contentName - source.lua - end - \s*\2$\n? - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.unquoted.heredoc.ruby - patterns - - - include - #heredoc - - - include - #interpolated_ruby - - - include - source.lua - - - include - #escaped_char - - - - - - - begin - (?=(?><<[-~]("?)((?:[_\w]+_|)RUBY)\b\1)) - comment - Heredoc with embedded ruby - end - (?!\G) - name - meta.embedded.block.ruby - patterns - - - begin - (?><<[-~]("?)((?:[_\w]+_|)RUBY)\b\1) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - contentName - source.ruby - end - \s*\2$\n? - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.unquoted.heredoc.ruby - patterns - - - include - #heredoc - - - include - #interpolated_ruby - - - include - source.ruby - - - include - #escaped_char - - - - - - - begin - (?>\=\s*<<(\w+)) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - end - ^\1$ - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.unquoted.heredoc.ruby - patterns - - - include - #heredoc - - - include - #interpolated_ruby - - - include - #escaped_char - - - - - begin - (?><<[-~](\w+)) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - comment - heredoc with indented terminator - end - \s*\1$ - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.unquoted.heredoc.ruby - patterns - - - include - #heredoc - - - include - #interpolated_ruby - - - include - #escaped_char - - - - - begin - (?<=\{|do|\{\s|do\s)(\|) - captures - - 1 - - name - punctuation.separator.variable.ruby - - - end - (\|) - patterns - - - match - [_a-zA-Z][_a-zA-Z0-9]* - name - variable.other.block.ruby - - - match - , - name - punctuation.separator.variable.ruby - - - - - match - => - name - punctuation.separator.key-value - - - match - <<=|%=|&=|\*=|\*\*=|\+=|\-=|\^=|\|{1,2}=|<< - name - keyword.operator.assignment.augmented.ruby - - - match - <=>|<(?!<|=)|>(?!<|=|>)|<=|>=|===|==|=~|!=|!~|(?<=[ \t])\? - name - keyword.operator.comparison.ruby - - - match - (?<=[ \t])!+|\bnot\b|&&|\band\b|\|\||\bor\b|\^ - name - keyword.operator.logical.ruby - - - match - (%|&|\*\*|\*|\+|\-|/) - name - keyword.operator.arithmetic.ruby - - - match - = - name - keyword.operator.assignment.ruby - - - match - \||~|>> - name - keyword.operator.other.ruby - - - match - : - name - punctuation.separator.other.ruby - - - match - \; - name - punctuation.separator.statement.ruby - - - match - , - name - punctuation.separator.object.ruby - - - match - \.|:: - name - punctuation.separator.method.ruby - - - match - \{ - name - punctuation.section.scope.begin.ruby - - - match - \} - name - punctuation.section.scope.end.ruby - - - match - \[ - name - punctuation.section.array.begin.ruby - - - match - \] - name - punctuation.section.array.end.ruby - - - match - \(|\) - name - punctuation.section.function.ruby - - - repository - - escaped_char - - match - \\(?:[0-7]{1,3}|x[\da-fA-F]{1,2}|.) - name - constant.character.escape.ruby - - heredoc - - begin - ^<<[-~]?\w+ - end - $ - patterns - - - include - $self - - - - interpolated_ruby - - patterns - - - begin - #\{ - beginCaptures - - 0 - - name - punctuation.section.embedded.begin.ruby - - - contentName - source.ruby - end - (\}) - endCaptures - - 0 - - name - punctuation.section.embedded.end.ruby - - 1 - - name - source.ruby - - - name - meta.embedded.line.ruby - patterns - - - include - #nest_curly_and_self - - - include - $self - - - repository - - nest_curly_and_self - - patterns - - - begin - \{ - captures - - 0 - - name - punctuation.section.scope.ruby - - - end - \} - patterns - - - include - #nest_curly_and_self - - - - - include - $self - - - - - - - captures - - 1 - - name - punctuation.definition.variable.ruby - - - match - (#@)[a-zA-Z_]\w* - name - variable.other.readwrite.instance.ruby - - - captures - - 1 - - name - punctuation.definition.variable.ruby - - - match - (#@@)[a-zA-Z_]\w* - name - variable.other.readwrite.class.ruby - - - captures - - 1 - - name - punctuation.definition.variable.ruby - - - match - (#\$)[a-zA-Z_]\w* - name - variable.other.readwrite.global.ruby - - - - percent_literals - - patterns - - - begin - %i(?:([(\[{<])|([^\w\s]|_)) - beginCaptures - - 0 - - name - punctuation.section.array.begin.ruby - - - end - [)\]}>]|\1\2 - endCaptures - - 0 - - name - punctuation.section.array.end.ruby - - - name - meta.array.symbol.ruby - patterns - - - begin - \G(?<=\()(?!\)) - end - (?=\)) - patterns - - - include - #parens - - - include - #symbol - - - - - begin - \G(?<=\[)(?!\]) - end - (?=\]) - patterns - - - include - #brackets - - - include - #symbol - - - - - begin - \G(?<=\{)(?!\}) - end - (?=\}) - patterns - - - include - #braces - - - include - #symbol - - - - - begin - \G(?<=<)(?!>) - end - (?=>) - patterns - - - include - #angles - - - include - #symbol - - - - - include - #symbol - - - repository - - angles - - patterns - - - captures - - 0 - - name - constant.character.escape.ruby - - - match - \\<|\\> - name - constant.other.symbol.ruby - - - begin - < - captures - - 0 - - name - constant.other.symbol.ruby - - - end - > - patterns - - - include - #angles - - - include - #symbol - - - - - - braces - - patterns - - - captures - - 0 - - name - constant.character.escape.ruby - - - match - \\\{|\\\} - name - constant.other.symbol.ruby - - - begin - \{ - captures - - 0 - - name - constant.other.symbol.ruby - - - end - \} - patterns - - - include - #braces - - - include - #symbol - - - - - - brackets - - patterns - - - captures - - 0 - - name - constant.character.escape.ruby - - - match - \\\[|\\\] - name - constant.other.symbol.ruby - - - begin - \[ - captures - - 0 - - name - constant.other.symbol.ruby - - - end - \] - patterns - - - include - #brackets - - - include - #symbol - - - - - - parens - - patterns - - - captures - - 0 - - name - constant.character.escape.ruby - - - match - \\\(|\\\) - name - constant.other.symbol.ruby - - - begin - \( - captures - - 0 - - name - constant.other.symbol.ruby - - - end - \) - patterns - - - include - #parens - - - include - #symbol - - - - - - symbol - - patterns - - - captures - - 0 - - name - constant.character.escape.ruby - - - match - \\\\|\\[ ] - name - constant.other.symbol.ruby - - - match - \S\w* - name - constant.other.symbol.ruby - - - - - - - begin - %I(?:([(\[{<])|([^\w\s]|_)) - beginCaptures - - 0 - - name - punctuation.section.array.begin.ruby - - - end - [)\]}>]|\1\2 - endCaptures - - 0 - - name - punctuation.section.array.end.ruby - - - name - meta.array.symbol.interpolated.ruby - patterns - - - begin - \G(?<=\()(?!\)) - end - (?=\)) - patterns - - - include - #parens - - - include - #symbol - - - - - begin - \G(?<=\[)(?!\]) - end - (?=\]) - patterns - - - include - #brackets - - - include - #symbol - - - - - begin - \G(?<=\{)(?!\}) - end - (?=\}) - patterns - - - include - #braces - - - include - #symbol - - - - - begin - \G(?<=<)(?!>) - end - (?=>) - patterns - - - include - #angles - - - include - #symbol - - - - - include - #symbol - - - repository - - angles - - patterns - - - begin - < - captures - - 0 - - name - constant.other.symbol.ruby - - - end - > - patterns - - - include - #angles - - - include - #symbol - - - - - - braces - - patterns - - - begin - \{ - captures - - 0 - - name - constant.other.symbol.ruby - - - end - \} - patterns - - - include - #braces - - - include - #symbol - - - - - - brackets - - patterns - - - begin - \[ - captures - - 0 - - name - constant.other.symbol.ruby - - - end - \] - patterns - - - include - #brackets - - - include - #symbol - - - - - - parens - - patterns - - - begin - \( - captures - - 0 - - name - constant.other.symbol.ruby - - - end - \) - patterns - - - include - #parens - - - include - #symbol - - - - - - symbol - - patterns - - - begin - (?=\\|#\{) - end - (?!\G) - name - constant.other.symbol.ruby - patterns - - - include - #escaped_char - - - include - #interpolated_ruby - - - - - match - \S\w* - name - constant.other.symbol.ruby - - - - - - - begin - %q(?:([(\[{<])|([^\w\s]|_)) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - end - [)\]}>]|\1\2 - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.quoted.other.ruby - patterns - - - begin - \G(?<=\()(?!\)) - end - (?=\)) - patterns - - - include - #parens - - - - - begin - \G(?<=\[)(?!\]) - end - (?=\]) - patterns - - - include - #brackets - - - - - begin - \G(?<=\{)(?!\}) - end - (?=\}) - patterns - - - include - #braces - - - - - begin - \G(?<=<)(?!>) - end - (?=>) - patterns - - - include - #angles - - - - - repository - - angles - - patterns - - - match - \\<|\\>|\\\\ - name - constant.character.escape.ruby - - - begin - < - end - > - patterns - - - include - #angles - - - - - - braces - - patterns - - - match - \\\{|\\\}|\\\\ - name - constant.character.escape.ruby - - - begin - \{ - end - \} - patterns - - - include - #braces - - - - - - brackets - - patterns - - - match - \\\[|\\\]|\\\\ - name - constant.character.escape.ruby - - - begin - \[ - end - \] - patterns - - - include - #brackets - - - - - - parens - - patterns - - - match - \\\(|\\\)|\\\\ - name - constant.character.escape.ruby - - - begin - \( - end - \) - patterns - - - include - #parens - - - - - - - - - begin - %Q?(?:([(\[{<])|([^\w\s]|_)) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - end - [)\]}>]|\1\2 - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.quoted.other.interpolated.ruby - patterns - - - begin - \G(?<=\()(?!\)) - end - (?=\)) - patterns - - - include - #parens - - - - - begin - \G(?<=\[)(?!\]) - end - (?=\]) - patterns - - - include - #brackets - - - - - begin - \G(?<=\{)(?!\}) - end - (?=\}) - patterns - - - include - #braces - - - - - begin - \G(?<=<)(?!>) - end - (?=>) - patterns - - - include - #angles - - - - - include - #escaped_char - - - include - #interpolated_ruby - - - repository - - angles - - patterns - - - include - #escaped_char - - - include - #interpolated_ruby - - - begin - < - end - > - patterns - - - include - #angles - - - - - - braces - - patterns - - - include - #escaped_char - - - include - #interpolated_ruby - - - begin - \{ - end - \} - patterns - - - include - #braces - - - - - - brackets - - patterns - - - include - #escaped_char - - - include - #interpolated_ruby - - - begin - \[ - end - \] - patterns - - - include - #brackets - - - - - - parens - - patterns - - - include - #escaped_char - - - include - #interpolated_ruby - - - begin - \( - end - \) - patterns - - - include - #parens - - - - - - - - - begin - %r(?:([(\[{<])|([^\w\s]|_)) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - end - ([)\]}>]|\1\2)[eimnosux]* - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.regexp.percent.ruby - patterns - - - begin - \G(?<=\()(?!\)) - end - (?=\)) - patterns - - - include - #parens - - - - - begin - \G(?<=\[)(?!\]) - end - (?=\]) - patterns - - - include - #brackets - - - - - begin - \G(?<=\{)(?!\}) - end - (?=\}) - patterns - - - include - #braces - - - - - begin - \G(?<=<)(?!>) - end - (?=>) - patterns - - - include - #angles - - - - - include - #regex_sub - - - repository - - angles - - patterns - - - include - #regex_sub - - - begin - < - end - > - patterns - - - include - #angles - - - - - - braces - - patterns - - - include - #regex_sub - - - begin - \{ - end - \} - patterns - - - include - #braces - - - - - - brackets - - patterns - - - include - #regex_sub - - - begin - \[ - end - \] - patterns - - - include - #brackets - - - - - - parens - - patterns - - - include - #regex_sub - - - begin - \( - end - \) - patterns - - - include - #parens - - - - - - - - - begin - %s(?:([(\[{<])|([^\w\s]|_)) - beginCaptures - - 0 - - name - punctuation.definition.constant.begin.ruby - - - end - [)\]}>]|\1\2 - endCaptures - - 0 - - name - punctuation.definition.constant.end.ruby - - - name - constant.other.symbol.percent.ruby - patterns - - - begin - \G(?<=\()(?!\)) - end - (?=\)) - patterns - - - include - #parens - - - - - begin - \G(?<=\[)(?!\]) - end - (?=\]) - patterns - - - include - #brackets - - - - - begin - \G(?<=\{)(?!\}) - end - (?=\}) - patterns - - - include - #braces - - - - - begin - \G(?<=<)(?!>) - end - (?=>) - patterns - - - include - #angles - - - - - repository - - angles - - patterns - - - match - \\<|\\>|\\\\ - name - constant.character.escape.ruby - - - begin - < - end - > - patterns - - - include - #angles - - - - - - braces - - patterns - - - match - \\\{|\\\}|\\\\ - name - constant.character.escape.ruby - - - begin - \{ - end - \} - patterns - - - include - #braces - - - - - - brackets - - patterns - - - match - \\\[|\\\]|\\\\ - name - constant.character.escape.ruby - - - begin - \[ - end - \] - patterns - - - include - #brackets - - - - - - parens - - patterns - - - match - \\\(|\\\)|\\\\ - name - constant.character.escape.ruby - - - begin - \( - end - \) - patterns - - - include - #parens - - - - - - - - - begin - %w(?:([(\[{<])|([^\w\s]|_)) - beginCaptures - - 0 - - name - punctuation.section.array.begin.ruby - - - end - [)\]}>]|\1\2 - endCaptures - - 0 - - name - punctuation.section.array.end.ruby - - - name - meta.array.string.ruby - patterns - - - begin - \G(?<=\()(?!\)) - end - (?=\)) - patterns - - - include - #parens - - - include - #string - - - - - begin - \G(?<=\[)(?!\]) - end - (?=\]) - patterns - - - include - #brackets - - - include - #string - - - - - begin - \G(?<=\{)(?!\}) - end - (?=\}) - patterns - - - include - #braces - - - include - #string - - - - - begin - \G(?<=<)(?!>) - end - (?=>) - patterns - - - include - #angles - - - include - #string - - - - - include - #string - - - repository - - angles - - patterns - - - captures - - 0 - - name - constant.character.escape.ruby - - - match - \\<|\\> - name - string.other.ruby - - - begin - < - captures - - 0 - - name - string.other.ruby - - - end - > - patterns - - - include - #angles - - - include - #string - - - - - - braces - - patterns - - - captures - - 0 - - name - constant.character.escape.ruby - - - match - \\\{|\\\} - name - string.other.ruby - - - begin - \{ - captures - - 0 - - name - string.other.ruby - - - end - \} - patterns - - - include - #braces - - - include - #string - - - - - - brackets - - patterns - - - captures - - 0 - - name - constant.character.escape.ruby - - - match - \\\[|\\\] - name - string.other.ruby - - - begin - \[ - captures - - 0 - - name - string.other.ruby - - - end - \] - patterns - - - include - #brackets - - - include - #string - - - - - - parens - - patterns - - - captures - - 0 - - name - constant.character.escape.ruby - - - match - \\\(|\\\) - name - string.other.ruby - - - begin - \( - captures - - 0 - - name - string.other.ruby - - - end - \) - patterns - - - include - #parens - - - include - #string - - - - - - string - - patterns - - - captures - - 0 - - name - constant.character.escape.ruby - - - match - \\\\|\\[ ] - name - string.other.ruby - - - match - \S\w* - name - string.other.ruby - - - - - - - begin - %W(?:([(\[{<])|([^\w\s]|_)) - beginCaptures - - 0 - - name - punctuation.section.array.begin.ruby - - - end - [)\]}>]|\1\2 - endCaptures - - 0 - - name - punctuation.section.array.end.ruby - - - name - meta.array.string.interpolated.ruby - patterns - - - begin - \G(?<=\()(?!\)) - end - (?=\)) - patterns - - - include - #parens - - - include - #string - - - - - begin - \G(?<=\[)(?!\]) - end - (?=\]) - patterns - - - include - #brackets - - - include - #string - - - - - begin - \G(?<=\{)(?!\}) - end - (?=\}) - patterns - - - include - #braces - - - include - #string - - - - - begin - \G(?<=<)(?!>) - end - (?=>) - patterns - - - include - #angles - - - include - #string - - - - - include - #string - - - repository - - angles - - patterns - - - begin - < - captures - - 0 - - name - string.other.ruby - - - end - > - patterns - - - include - #angles - - - include - #string - - - - - - braces - - patterns - - - begin - \{ - captures - - 0 - - name - string.other.ruby - - - end - \} - patterns - - - include - #braces - - - include - #string - - - - - - brackets - - patterns - - - begin - \[ - captures - - 0 - - name - string.other.ruby - - - end - \] - patterns - - - include - #brackets - - - include - #string - - - - - - parens - - patterns - - - begin - \( - captures - - 0 - - name - string.other.ruby - - - end - \) - patterns - - - include - #parens - - - include - #string - - - - - - string - - patterns - - - begin - (?=\\|#\{) - end - (?!\G) - name - string.other.ruby - patterns - - - include - #escaped_char - - - include - #interpolated_ruby - - - - - match - \S\w* - name - string.other.ruby - - - - - - - begin - %x(?:([(\[{<])|([^\w\s]|_)) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - end - [)\]}>]|\1\2 - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.interpolated.percent.ruby - patterns - - - begin - \G(?<=\()(?!\)) - end - (?=\)) - patterns - - - include - #parens - - - - - begin - \G(?<=\[)(?!\]) - end - (?=\]) - patterns - - - include - #brackets - - - - - begin - \G(?<=\{)(?!\}) - end - (?=\}) - patterns - - - include - #braces - - - - - begin - \G(?<=<)(?!>) - end - (?=>) - patterns - - - include - #angles - - - - - include - #escaped_char - - - include - #interpolated_ruby - - - repository - - angles - - patterns - - - include - #escaped_char - - - include - #interpolated_ruby - - - begin - < - end - > - patterns - - - include - #angles - - - - - - braces - - patterns - - - include - #escaped_char - - - include - #interpolated_ruby - - - begin - \{ - end - \} - patterns - - - include - #braces - - - - - - brackets - - patterns - - - include - #escaped_char - - - include - #interpolated_ruby - - - begin - \[ - end - \] - patterns - - - include - #brackets - - - - - - parens - - patterns - - - include - #escaped_char - - - include - #interpolated_ruby - - - begin - \( - end - \) - patterns - - - include - #parens - - - - - - - - - - regex_sub - - patterns - - - include - #interpolated_ruby - - - include - #escaped_char - - - captures - - 1 - - name - punctuation.definition.quantifier.begin.ruby - - 3 - - name - punctuation.definition.quantifier.end.ruby - - - match - (\{)\d+(,\d+)?(\}) - name - keyword.operator.quantifier.ruby - - - begin - \[(?:\^?\])? - beginCaptures - - 0 - - name - punctuation.definition.character-class.begin.ruby - - - end - \] - endCaptures - - 0 - - name - punctuation.definition.character-class.end.ruby - - - name - constant.other.character-class.set.ruby - patterns - - - include - #escaped_char - - - - - begin - \(\?# - beginCaptures - - 0 - - name - punctuation.definition.comment.begin.ruby - - - end - \) - endCaptures - - 0 - - name - punctuation.definition.comment.end.ruby - - - name - comment.line.number-sign.ruby - patterns - - - include - #escaped_char - - - - - begin - \( - captures - - 0 - - name - punctuation.definition.group.ruby - - - end - \) - name - meta.group.regexp.ruby - patterns - - - include - #regex_sub - - - - - begin - (?<=^|\s)(#)\s(?=[[a-zA-Z0-9,. \t?!-][^\x{00}-\x{7F}]]*$) - beginCaptures - - 1 - - name - punctuation.definition.comment.ruby - - - comment - We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags. - end - $\n? - name - comment.line.number-sign.ruby - - - - - scopeName - source.ruby - uuid - E00B62AC-6B1C-11D9-9B1F-000D93589AF6 - - - diff --git a/extensions/ruby/syntaxes/ruby.tmLanguage.json b/extensions/ruby/syntaxes/ruby.tmLanguage.json new file mode 100644 index 0000000000000..a6e0c01b7b9fa --- /dev/null +++ b/extensions/ruby/syntaxes/ruby.tmLanguage.json @@ -0,0 +1,2732 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/ruby.tmbundle/blob/master/Syntaxes/Ruby.plist", + "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." + ], + "comment": "\n\tTODO: unresolved issues\n\n\ttext:\n\t\"p <[a-zA-Z_]\\w*(?>[?!])?)(:)(?!:)", + "name": "constant.other.symbol.hashkey.ruby" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.constant.ruby" + } + }, + "comment": "symbols as hash key (1.8 syntax)", + "match": "(?[a-zA-Z_]\\w*(?>[?!])?)(?=\\s*=>)", + "name": "constant.other.symbol.hashkey.ruby" + }, + { + "comment": "everything being a reserved word, not a value and needing a 'end' is a..", + "match": "(?|_|\\*|\\$|\\?|:|\"|-[0adFiIlpvw])", + "name": "variable.other.readwrite.global.pre-defined.ruby" + }, + { + "begin": "\\b(ENV)\\[", + "beginCaptures": { + "1": { + "name": "variable.other.constant.ruby" + } + }, + "end": "\\]", + "name": "meta.environment-variable.ruby", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "match": "\\b[A-Z]\\w*(?=((\\.|::)[A-Za-z]|\\[))", + "name": "support.class.ruby" + }, + { + "match": "\\b(abort|at_exit|autoload[?]?|binding|callcc|caller|caller_locations|chomp|chop|eval|exec|exit|exit!|fork|format|gets|global_variables|gsub|lambda|load|local_variables|open|p|print|printf|proc|putc|puts|rand|readline|readlines|select|set_trace_func|sleep|spawn|sprintf|srand|sub|syscall|system|test|trace_var|trap|untrace_var|warn)(\\b|(?<=[?!]))(?![?!])", + "name": "support.function.kernel.ruby" + }, + { + "match": "\\b[A-Z]\\w*\\b", + "name": "variable.other.constant.ruby" + }, + { + "begin": "(?x)\n\t\t\t (?=def\\b) # an optimization to help Oniguruma fail fast\n\t\t\t (?<=^|\\s)(def)\\s+ # the def keyword\n\t\t\t ( (?>[a-zA-Z_]\\w*(?>\\.|::))? # a method name prefix\n\t\t\t (?>[a-zA-Z_]\\w*(?>[?!]|=(?!>))? # the method name\n\t\t\t |===?|!=|!~|>[>=]?|<=>|<[<=]?|[%&`/\\|^]|\\*\\*?|=?~|[-+]@?|\\[\\]=?) ) # …or an operator method\n\t\t\t \\s*(\\() # the openning parenthesis for arguments\n\t\t\t ", + "beginCaptures": { + "1": { + "name": "keyword.control.def.ruby" + }, + "2": { + "name": "entity.name.function.ruby" + }, + "3": { + "name": "punctuation.definition.parameters.ruby" + } + }, + "comment": "the method pattern comes from the symbol pattern, see there for a explaination", + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.ruby" + } + }, + "name": "meta.function.method.with-arguments.ruby", + "patterns": [ + { + "begin": "(?=[&*_a-zA-Z])", + "end": "(?=[,)])", + "patterns": [ + { + "captures": { + "1": { + "name": "storage.type.variable.ruby" + }, + "2": { + "name": "constant.other.symbol.hashkey.parameter.function.ruby" + }, + "3": { + "name": "punctuation.definition.constant.ruby" + }, + "4": { + "name": "variable.parameter.function.ruby" + } + }, + "match": "\\G([&*]?)(?:([_a-zA-Z]\\w*(:))|([_a-zA-Z]\\w*))" + }, + { + "begin": "\\(", + "captures": { + "0": { + "name": "punctuation.section.function.ruby" + } + }, + "comment": "Prevent end pattern of parent rule from ending prematurely.", + "end": "\\)", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "include": "$self" + } + ] + } + ] + }, + { + "begin": "(?x)\n\t\t\t (?=def\\b) # an optimization to help Oniguruma fail fast\n\t\t\t (?<=^|\\s)(def)\\s+ # the def keyword\n\t\t\t ( (?>[a-zA-Z_]\\w*(?>\\.|::))? # a method name prefix\n\t\t\t (?>[a-zA-Z_]\\w*(?>[?!]|=(?!>))? # the method name\n\t\t\t |===?|!=|!~|>[>=]?|<=>|<[<=]?|[%&`/\\|^]|\\*\\*?|=?~|[-+]@?|\\[\\]=?) ) # …or an operator method\n\t\t\t [ \\t] # the space separating the arguments\n\t\t\t (?=[ \\t]*[^\\s#;]) # make sure arguments and not a comment follow\n\t\t\t ", + "beginCaptures": { + "1": { + "name": "keyword.control.def.ruby" + }, + "2": { + "name": "entity.name.function.ruby" + } + }, + "comment": "same as the previous rule, but without parentheses around the arguments", + "end": "$", + "name": "meta.function.method.with-arguments.ruby", + "patterns": [ + { + "begin": "(?![\\s,])", + "end": "(?=,|$)", + "patterns": [ + { + "captures": { + "1": { + "name": "storage.type.variable.ruby" + }, + "2": { + "name": "constant.other.symbol.hashkey.parameter.function.ruby" + }, + "3": { + "name": "punctuation.definition.constant.ruby" + }, + "4": { + "name": "variable.parameter.function.ruby" + } + }, + "match": "\\G([&*]?)(?:([_a-zA-Z]\\w*(:))|([_a-zA-Z]\\w*))", + "name": "variable.parameter.function.ruby" + }, + { + "include": "$self" + } + ] + } + ] + }, + { + "captures": { + "1": { + "name": "keyword.control.def.ruby" + }, + "3": { + "name": "entity.name.function.ruby" + } + }, + "comment": " the optional name is just to catch the def also without a method-name", + "match": "(?x)\n\t\t\t (?=def\\b) # an optimization to help Oniguruma fail fast\n\t\t\t (?<=^|\\s)(def)\\b # the def keyword\n\t\t\t ( \\s+ # an optional group of whitespace followed by…\n\t\t\t ( (?>[a-zA-Z_]\\w*(?>\\.|::))? # a method name prefix\n\t\t\t (?>[a-zA-Z_]\\w*(?>[?!]|=(?!>))? # the method name\n\t\t\t |===?|!=|!~|>[>=]?|<=>|<[<=]?|[%&`/\\|^]|\\*\\*?|=?~|[-+]@?|\\[\\]=?) ) )? # …or an operator method\n\t\t\t ", + "name": "meta.function.method.without-arguments.ruby" + }, + { + "match": "\\b\\d(?>_?\\d)*(?=\\.\\d|[eE])(\\.\\d(?>_?\\d)*)?([eE][-+]?\\d(?>_?\\d)*)?r?i?\\b", + "name": "constant.numeric.float.ruby" + }, + { + "match": "\\b(0[dD]\\d|[1-9])(?>_?\\d)*r?i?\\b", + "name": "constant.numeric.integer.ruby" + }, + { + "match": "\\b0[xX]\\h(?>_?\\h)*r?i?\\b", + "name": "constant.numeric.hex.ruby" + }, + { + "match": "\\b0[bB][01](?>_?[01])*r?i?\\b", + "name": "constant.numeric.binary.ruby" + }, + { + "match": "\\b0([oO]?[0-7](?>_?[0-7])*)?r?i?\\b", + "name": "constant.numeric.octal.ruby" + }, + { + "begin": ":'", + "captures": { + "0": { + "name": "punctuation.definition.constant.ruby" + } + }, + "end": "'", + "name": "constant.other.symbol.single-quoted.ruby", + "patterns": [ + { + "match": "\\\\['\\\\]", + "name": "constant.character.escape.ruby" + } + ] + }, + { + "begin": ":\"", + "captures": { + "0": { + "name": "punctuation.definition.constant.ruby" + } + }, + "end": "\"", + "name": "constant.other.symbol.double-quoted.ruby", + "patterns": [ + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "comment": "Needs higher precidence than regular expressions.", + "match": "(?~(?:\\[,|&;]\n\t\t\t | [\\s;]if\\s\t\t\t# keywords\n\t\t\t | [\\s;]elsif\\s\n\t\t\t | [\\s;]while\\s\n\t\t\t | [\\s;]unless\\s\n\t\t\t | [\\s;]when\\s\n\t\t\t | [\\s;]assert_match\\s\n\t\t\t | [\\s;]or\\s\t\t\t# boolean opperators\n\t\t\t | [\\s;]and\\s\n\t\t\t | [\\s;]not\\s\n\t\t\t | [\\s.]index\\s\t\t\t# methods\n\t\t\t | [\\s.]scan\\s\n\t\t\t | [\\s.]sub\\s\n\t\t\t | [\\s.]sub!\\s\n\t\t\t | [\\s.]gsub\\s\n\t\t\t | [\\s.]gsub!\\s\n\t\t\t | [\\s.]match\\s\n\t\t\t )\n\t\t\t | (?<= # or a look-behind with line anchor:\n\t\t\t ^when\\s # duplication necessary due to limits of regex\n\t\t\t | ^if\\s\n\t\t\t | ^elsif\\s\n\t\t\t | ^while\\s\n\t\t\t | ^unless\\s\n\t\t\t )\n\t\t\t )\n\t\t\t \\s*((/))(?![*+{}?])\n\t\t\t", + "captures": { + "1": { + "name": "string.regexp.classic.ruby" + }, + "2": { + "name": "punctuation.definition.string.ruby" + } + }, + "comment": "regular expressions (normal)\n\t\t\twe only start a regexp if the character before it (excluding whitespace)\n\t\t\tis what we think is before a regexp\n\t\t\t", + "contentName": "string.regexp.classic.ruby", + "end": "((/[eimnosux]*))", + "patterns": [ + { + "include": "#regex_sub" + } + ] + }, + { + "captures": { + "1": { + "name": "punctuation.definition.constant.ruby" + } + }, + "comment": "symbols", + "match": "(?[a-zA-Z_]\\w*(?>[?!]|=(?![>=]))?|===?|>[>=]?|<=>|<[<=]?|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\]=?|(@@?|\\$)[a-zA-Z_]\\w*)", + "name": "constant.other.symbol.ruby" + }, + { + "begin": "^=begin", + "captures": { + "0": { + "name": "punctuation.definition.comment.ruby" + } + }, + "comment": "multiline comments", + "end": "^=end", + "name": "comment.block.documentation.ruby" + }, + { + "begin": "(^[ \\t]+)?(?=#)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.ruby" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.ruby" + } + }, + "end": "\\n", + "name": "comment.line.number-sign.ruby" + } + ] + }, + { + "comment": "\n\t\t\tmatches questionmark-letters.\n\n\t\t\texamples (1st alternation = hex):\n\t\t\t?\\x1 ?\\x61\n\n\t\t\texamples (2nd alternation = octal):\n\t\t\t?\\0 ?\\07 ?\\017\n\n\t\t\texamples (3rd alternation = escaped):\n\t\t\t?\\n ?\\b\n\n\t\t\texamples (4th alternation = meta-ctrl):\n\t\t\t?\\C-a ?\\M-a ?\\C-\\M-\\C-\\M-a\n\n\t\t\texamples (4th alternation = normal):\n\t\t\t?a ?A ?0 \n\t\t\t?* ?\" ?( \n\t\t\t?. ?#\n\t\t\t\n\t\t\t\n\t\t\tthe negative lookbehind prevents against matching\n\t\t\tp(42.tainted?)\n\t\t\t", + "match": "(?<<[-~](\"?)((?:[_\\w]+_|)HTML)\\b\\1))", + "comment": "Heredoc with embedded html", + "end": "(?!\\G)", + "name": "meta.embedded.block.html", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)HTML)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "text.html", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "text.html.basic" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)SQL)\\b\\1))", + "comment": "Heredoc with embedded sql", + "end": "(?!\\G)", + "name": "meta.embedded.block.sql", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)SQL)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "source.sql", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "source.sql" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)CSS)\\b\\1))", + "comment": "Heredoc with embedded css", + "end": "(?!\\G)", + "name": "meta.embedded.block.css", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)CSS)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "source.css", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "source.css" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)CPP)\\b\\1))", + "comment": "Heredoc with embedded c++", + "end": "(?!\\G)", + "name": "meta.embedded.block.c++", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)CPP)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "source.c++", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "source.c++" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)C)\\b\\1))", + "comment": "Heredoc with embedded c", + "end": "(?!\\G)", + "name": "meta.embedded.block.c", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)C)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "source.c", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "source.c" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)(?:JS|JAVASCRIPT))\\b\\1))", + "comment": "Heredoc with embedded javascript", + "end": "(?!\\G)", + "name": "meta.embedded.block.js", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)(?:JS|JAVASCRIPT))\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "source.js", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "source.js" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)JQUERY)\\b\\1))", + "comment": "Heredoc with embedded jQuery javascript", + "end": "(?!\\G)", + "name": "meta.embedded.block.js.jquery", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)JQUERY)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "source.js.jquery", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "source.js.jquery" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)(?:SH|SHELL))\\b\\1))", + "comment": "Heredoc with embedded shell", + "end": "(?!\\G)", + "name": "meta.embedded.block.shell", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)(?:SH|SHELL))\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "source.shell", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "source.shell" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)LUA)\\b\\1))", + "comment": "Heredoc with embedded lua", + "end": "(?!\\G)", + "name": "meta.embedded.block.lua", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)LUA)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "source.lua", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "source.lua" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)RUBY)\\b\\1))", + "comment": "Heredoc with embedded ruby", + "end": "(?!\\G)", + "name": "meta.embedded.block.ruby", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)RUBY)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "source.ruby", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "source.ruby" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?>=\\s*<<(\\w+))", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "end": "^\\1$", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "(?><<[-~](\\w+))", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "comment": "heredoc with indented terminator", + "end": "\\s*\\1$", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "(?<=\\{|do|\\{\\s|do\\s)(\\|)", + "captures": { + "1": { + "name": "punctuation.separator.arguments.ruby" + } + }, + "end": "(?", + "name": "punctuation.separator.key-value" + }, + { + "match": "->", + "name": "support.function.kernel.lambda.ruby" + }, + { + "match": "<<=|%=|&{1,2}=|\\*=|\\*\\*=|\\+=|-=|\\^=|\\|{1,2}=|<<", + "name": "keyword.operator.assignment.augmented.ruby" + }, + { + "match": "<=>|<(?!<|=)|>(?!<|=|>)|<=|>=|===|==|=~|!=|!~|(?<=[ \\t])\\?", + "name": "keyword.operator.comparison.ruby" + }, + { + "match": "(?>", + "name": "keyword.operator.other.ruby" + }, + { + "match": ";", + "name": "punctuation.separator.statement.ruby" + }, + { + "match": ",", + "name": "punctuation.separator.object.ruby" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.namespace.ruby" + } + }, + "comment": "Mark as namespace separator if double colons followed by capital letter", + "match": "(::)\\s*(?=[A-Z])" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.method.ruby" + } + }, + "comment": "Mark as method separator if double colons not followed by capital letter", + "match": "(\\.|::)\\s*(?![A-Z])" + }, + { + "comment": "Must come after method and constant separators to prefer double colons", + "match": ":", + "name": "punctuation.separator.other.ruby" + }, + { + "match": "\\{", + "name": "punctuation.section.scope.begin.ruby" + }, + { + "match": "\\}", + "name": "punctuation.section.scope.end.ruby" + }, + { + "match": "\\[", + "name": "punctuation.section.array.begin.ruby" + }, + { + "match": "\\]", + "name": "punctuation.section.array.end.ruby" + }, + { + "match": "\\(|\\)", + "name": "punctuation.section.function.ruby" + } + ], + "repository": { + "escaped_char": { + "match": "\\\\(?:[0-7]{1,3}|x[\\da-fA-F]{1,2}|.)", + "name": "constant.character.escape.ruby" + }, + "heredoc": { + "begin": "^<<[-~]?\\w+", + "end": "$", + "patterns": [ + { + "include": "$self" + } + ] + }, + "interpolated_ruby": { + "patterns": [ + { + "begin": "#\\{", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.ruby" + } + }, + "contentName": "source.ruby", + "end": "(\\})", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.ruby" + }, + "1": { + "name": "source.ruby" + } + }, + "name": "meta.embedded.line.ruby", + "patterns": [ + { + "include": "#nest_curly_and_self" + }, + { + "include": "$self" + } + ], + "repository": { + "nest_curly_and_self": { + "patterns": [ + { + "begin": "\\{", + "captures": { + "0": { + "name": "punctuation.section.scope.ruby" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#nest_curly_and_self" + } + ] + }, + { + "include": "$self" + } + ] + } + } + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.ruby" + } + }, + "match": "(#@)[a-zA-Z_]\\w*", + "name": "variable.other.readwrite.instance.ruby" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.ruby" + } + }, + "match": "(#@@)[a-zA-Z_]\\w*", + "name": "variable.other.readwrite.class.ruby" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.ruby" + } + }, + "match": "(#\\$)[a-zA-Z_]\\w*", + "name": "variable.other.readwrite.global.ruby" + } + ] + }, + "percent_literals": { + "patterns": [ + { + "begin": "%i(?:([(\\[{<])|([^\\w\\s]|_))", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": "[)\\]}>]\\2|\\1\\2", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "meta.array.symbol.ruby", + "patterns": [ + { + "begin": "\\G(?<=\\()(?!\\))", + "end": "(?=\\))", + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#symbol" + } + ] + }, + { + "begin": "\\G(?<=\\[)(?!\\])", + "end": "(?=\\])", + "patterns": [ + { + "include": "#brackets" + }, + { + "include": "#symbol" + } + ] + }, + { + "begin": "\\G(?<=\\{)(?!\\})", + "end": "(?=\\})", + "patterns": [ + { + "include": "#braces" + }, + { + "include": "#symbol" + } + ] + }, + { + "begin": "\\G(?<=<)(?!>)", + "end": "(?=>)", + "patterns": [ + { + "include": "#angles" + }, + { + "include": "#symbol" + } + ] + }, + { + "include": "#symbol" + } + ], + "repository": { + "angles": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\<|\\\\>", + "name": "constant.other.symbol.ruby" + }, + { + "begin": "<", + "captures": { + "0": { + "name": "constant.other.symbol.ruby" + } + }, + "end": ">", + "patterns": [ + { + "include": "#angles" + }, + { + "include": "#symbol" + } + ] + } + ] + }, + "braces": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\\\{|\\\\\\}", + "name": "constant.other.symbol.ruby" + }, + { + "begin": "\\{", + "captures": { + "0": { + "name": "constant.other.symbol.ruby" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#braces" + }, + { + "include": "#symbol" + } + ] + } + ] + }, + "brackets": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\\\[|\\\\\\]", + "name": "constant.other.symbol.ruby" + }, + { + "begin": "\\[", + "captures": { + "0": { + "name": "constant.other.symbol.ruby" + } + }, + "end": "\\]", + "patterns": [ + { + "include": "#brackets" + }, + { + "include": "#symbol" + } + ] + } + ] + }, + "parens": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\\\(|\\\\\\)", + "name": "constant.other.symbol.ruby" + }, + { + "begin": "\\(", + "captures": { + "0": { + "name": "constant.other.symbol.ruby" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#symbol" + } + ] + } + ] + }, + "symbol": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\\\\\|\\\\[ ]", + "name": "constant.other.symbol.ruby" + }, + { + "match": "\\S\\w*", + "name": "constant.other.symbol.ruby" + } + ] + } + } + }, + { + "begin": "%I(?:([(\\[{<])|([^\\w\\s]|_))", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": "[)\\]}>]\\2|\\1\\2", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "meta.array.symbol.interpolated.ruby", + "patterns": [ + { + "begin": "\\G(?<=\\()(?!\\))", + "end": "(?=\\))", + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#symbol" + } + ] + }, + { + "begin": "\\G(?<=\\[)(?!\\])", + "end": "(?=\\])", + "patterns": [ + { + "include": "#brackets" + }, + { + "include": "#symbol" + } + ] + }, + { + "begin": "\\G(?<=\\{)(?!\\})", + "end": "(?=\\})", + "patterns": [ + { + "include": "#braces" + }, + { + "include": "#symbol" + } + ] + }, + { + "begin": "\\G(?<=<)(?!>)", + "end": "(?=>)", + "patterns": [ + { + "include": "#angles" + }, + { + "include": "#symbol" + } + ] + }, + { + "include": "#symbol" + } + ], + "repository": { + "angles": { + "patterns": [ + { + "begin": "<", + "captures": { + "0": { + "name": "constant.other.symbol.ruby" + } + }, + "end": ">", + "patterns": [ + { + "include": "#angles" + }, + { + "include": "#symbol" + } + ] + } + ] + }, + "braces": { + "patterns": [ + { + "begin": "\\{", + "captures": { + "0": { + "name": "constant.other.symbol.ruby" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#braces" + }, + { + "include": "#symbol" + } + ] + } + ] + }, + "brackets": { + "patterns": [ + { + "begin": "\\[", + "captures": { + "0": { + "name": "constant.other.symbol.ruby" + } + }, + "end": "\\]", + "patterns": [ + { + "include": "#brackets" + }, + { + "include": "#symbol" + } + ] + } + ] + }, + "parens": { + "patterns": [ + { + "begin": "\\(", + "captures": { + "0": { + "name": "constant.other.symbol.ruby" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#symbol" + } + ] + } + ] + }, + "symbol": { + "patterns": [ + { + "begin": "(?=\\\\|#\\{)", + "end": "(?!\\G)", + "name": "constant.other.symbol.ruby", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + } + ] + }, + { + "match": "\\S\\w*", + "name": "constant.other.symbol.ruby" + } + ] + } + } + }, + { + "begin": "%q(?:([(\\[{<])|([^\\w\\s]|_))", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "end": "[)\\]}>]\\2|\\1\\2", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.quoted.other.ruby", + "patterns": [ + { + "begin": "\\G(?<=\\()(?!\\))", + "end": "(?=\\))", + "patterns": [ + { + "include": "#parens" + } + ] + }, + { + "begin": "\\G(?<=\\[)(?!\\])", + "end": "(?=\\])", + "patterns": [ + { + "include": "#brackets" + } + ] + }, + { + "begin": "\\G(?<=\\{)(?!\\})", + "end": "(?=\\})", + "patterns": [ + { + "include": "#braces" + } + ] + }, + { + "begin": "\\G(?<=<)(?!>)", + "end": "(?=>)", + "patterns": [ + { + "include": "#angles" + } + ] + } + ], + "repository": { + "angles": { + "patterns": [ + { + "match": "\\\\<|\\\\>|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "begin": "<", + "end": ">", + "patterns": [ + { + "include": "#angles" + } + ] + } + ] + }, + "braces": { + "patterns": [ + { + "match": "\\\\\\{|\\\\\\}|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "begin": "\\{", + "end": "\\}", + "patterns": [ + { + "include": "#braces" + } + ] + } + ] + }, + "brackets": { + "patterns": [ + { + "match": "\\\\\\[|\\\\\\]|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "begin": "\\[", + "end": "\\]", + "patterns": [ + { + "include": "#brackets" + } + ] + } + ] + }, + "parens": { + "patterns": [ + { + "match": "\\\\\\(|\\\\\\)|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "#parens" + } + ] + } + ] + } + } + }, + { + "begin": "%Q?(?:([(\\[{<])|([^\\w\\s=]|_))", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "end": "[)\\]}>]\\2|\\1\\2", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.quoted.other.interpolated.ruby", + "patterns": [ + { + "begin": "\\G(?<=\\()(?!\\))", + "end": "(?=\\))", + "patterns": [ + { + "include": "#parens" + } + ] + }, + { + "begin": "\\G(?<=\\[)(?!\\])", + "end": "(?=\\])", + "patterns": [ + { + "include": "#brackets" + } + ] + }, + { + "begin": "\\G(?<=\\{)(?!\\})", + "end": "(?=\\})", + "patterns": [ + { + "include": "#braces" + } + ] + }, + { + "begin": "\\G(?<=<)(?!>)", + "end": "(?=>)", + "patterns": [ + { + "include": "#angles" + } + ] + }, + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + } + ], + "repository": { + "angles": { + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + }, + { + "begin": "<", + "end": ">", + "patterns": [ + { + "include": "#angles" + } + ] + } + ] + }, + "braces": { + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + }, + { + "begin": "\\{", + "end": "\\}", + "patterns": [ + { + "include": "#braces" + } + ] + } + ] + }, + "brackets": { + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + }, + { + "begin": "\\[", + "end": "\\]", + "patterns": [ + { + "include": "#brackets" + } + ] + } + ] + }, + "parens": { + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + }, + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "#parens" + } + ] + } + ] + } + } + }, + { + "begin": "%r(?:([(\\[{<])|([^\\w\\s]|_))", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "end": "([)\\]}>]\\2|\\1\\2)[eimnosux]*", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.regexp.percent.ruby", + "patterns": [ + { + "begin": "\\G(?<=\\()(?!\\))", + "end": "(?=\\))", + "patterns": [ + { + "include": "#parens" + } + ] + }, + { + "begin": "\\G(?<=\\[)(?!\\])", + "end": "(?=\\])", + "patterns": [ + { + "include": "#brackets" + } + ] + }, + { + "begin": "\\G(?<=\\{)(?!\\})", + "end": "(?=\\})", + "patterns": [ + { + "include": "#braces" + } + ] + }, + { + "begin": "\\G(?<=<)(?!>)", + "end": "(?=>)", + "patterns": [ + { + "include": "#angles" + } + ] + }, + { + "include": "#regex_sub" + } + ], + "repository": { + "angles": { + "patterns": [ + { + "include": "#regex_sub" + }, + { + "begin": "<", + "end": ">", + "patterns": [ + { + "include": "#angles" + } + ] + } + ] + }, + "braces": { + "patterns": [ + { + "include": "#regex_sub" + }, + { + "begin": "\\{", + "end": "\\}", + "patterns": [ + { + "include": "#braces" + } + ] + } + ] + }, + "brackets": { + "patterns": [ + { + "include": "#regex_sub" + }, + { + "begin": "\\[", + "end": "\\]", + "patterns": [ + { + "include": "#brackets" + } + ] + } + ] + }, + "parens": { + "patterns": [ + { + "include": "#regex_sub" + }, + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "#parens" + } + ] + } + ] + } + } + }, + { + "begin": "%s(?:([(\\[{<])|([^\\w\\s]|_))", + "beginCaptures": { + "0": { + "name": "punctuation.definition.constant.begin.ruby" + } + }, + "end": "[)\\]}>]\\2|\\1\\2", + "endCaptures": { + "0": { + "name": "punctuation.definition.constant.end.ruby" + } + }, + "name": "constant.other.symbol.percent.ruby", + "patterns": [ + { + "begin": "\\G(?<=\\()(?!\\))", + "end": "(?=\\))", + "patterns": [ + { + "include": "#parens" + } + ] + }, + { + "begin": "\\G(?<=\\[)(?!\\])", + "end": "(?=\\])", + "patterns": [ + { + "include": "#brackets" + } + ] + }, + { + "begin": "\\G(?<=\\{)(?!\\})", + "end": "(?=\\})", + "patterns": [ + { + "include": "#braces" + } + ] + }, + { + "begin": "\\G(?<=<)(?!>)", + "end": "(?=>)", + "patterns": [ + { + "include": "#angles" + } + ] + } + ], + "repository": { + "angles": { + "patterns": [ + { + "match": "\\\\<|\\\\>|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "begin": "<", + "end": ">", + "patterns": [ + { + "include": "#angles" + } + ] + } + ] + }, + "braces": { + "patterns": [ + { + "match": "\\\\\\{|\\\\\\}|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "begin": "\\{", + "end": "\\}", + "patterns": [ + { + "include": "#braces" + } + ] + } + ] + }, + "brackets": { + "patterns": [ + { + "match": "\\\\\\[|\\\\\\]|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "begin": "\\[", + "end": "\\]", + "patterns": [ + { + "include": "#brackets" + } + ] + } + ] + }, + "parens": { + "patterns": [ + { + "match": "\\\\\\(|\\\\\\)|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "#parens" + } + ] + } + ] + } + } + }, + { + "begin": "%w(?:([(\\[{<])|([^\\w\\s]|_))", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": "[)\\]}>]\\2|\\1\\2", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "meta.array.string.ruby", + "patterns": [ + { + "begin": "\\G(?<=\\()(?!\\))", + "end": "(?=\\))", + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#string" + } + ] + }, + { + "begin": "\\G(?<=\\[)(?!\\])", + "end": "(?=\\])", + "patterns": [ + { + "include": "#brackets" + }, + { + "include": "#string" + } + ] + }, + { + "begin": "\\G(?<=\\{)(?!\\})", + "end": "(?=\\})", + "patterns": [ + { + "include": "#braces" + }, + { + "include": "#string" + } + ] + }, + { + "begin": "\\G(?<=<)(?!>)", + "end": "(?=>)", + "patterns": [ + { + "include": "#angles" + }, + { + "include": "#string" + } + ] + }, + { + "include": "#string" + } + ], + "repository": { + "angles": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\<|\\\\>", + "name": "string.other.ruby" + }, + { + "begin": "<", + "captures": { + "0": { + "name": "string.other.ruby" + } + }, + "end": ">", + "patterns": [ + { + "include": "#angles" + }, + { + "include": "#string" + } + ] + } + ] + }, + "braces": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\\\{|\\\\\\}", + "name": "string.other.ruby" + }, + { + "begin": "\\{", + "captures": { + "0": { + "name": "string.other.ruby" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#braces" + }, + { + "include": "#string" + } + ] + } + ] + }, + "brackets": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\\\[|\\\\\\]", + "name": "string.other.ruby" + }, + { + "begin": "\\[", + "captures": { + "0": { + "name": "string.other.ruby" + } + }, + "end": "\\]", + "patterns": [ + { + "include": "#brackets" + }, + { + "include": "#string" + } + ] + } + ] + }, + "parens": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\\\(|\\\\\\)", + "name": "string.other.ruby" + }, + { + "begin": "\\(", + "captures": { + "0": { + "name": "string.other.ruby" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#string" + } + ] + } + ] + }, + "string": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\\\\\|\\\\[ ]", + "name": "string.other.ruby" + }, + { + "match": "\\S\\w*", + "name": "string.other.ruby" + } + ] + } + } + }, + { + "begin": "%W(?:([(\\[{<])|([^\\w\\s]|_))", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": "[)\\]}>]\\2|\\1\\2", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "meta.array.string.interpolated.ruby", + "patterns": [ + { + "begin": "\\G(?<=\\()(?!\\))", + "end": "(?=\\))", + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#string" + } + ] + }, + { + "begin": "\\G(?<=\\[)(?!\\])", + "end": "(?=\\])", + "patterns": [ + { + "include": "#brackets" + }, + { + "include": "#string" + } + ] + }, + { + "begin": "\\G(?<=\\{)(?!\\})", + "end": "(?=\\})", + "patterns": [ + { + "include": "#braces" + }, + { + "include": "#string" + } + ] + }, + { + "begin": "\\G(?<=<)(?!>)", + "end": "(?=>)", + "patterns": [ + { + "include": "#angles" + }, + { + "include": "#string" + } + ] + }, + { + "include": "#string" + } + ], + "repository": { + "angles": { + "patterns": [ + { + "begin": "<", + "captures": { + "0": { + "name": "string.other.ruby" + } + }, + "end": ">", + "patterns": [ + { + "include": "#angles" + }, + { + "include": "#string" + } + ] + } + ] + }, + "braces": { + "patterns": [ + { + "begin": "\\{", + "captures": { + "0": { + "name": "string.other.ruby" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#braces" + }, + { + "include": "#string" + } + ] + } + ] + }, + "brackets": { + "patterns": [ + { + "begin": "\\[", + "captures": { + "0": { + "name": "string.other.ruby" + } + }, + "end": "\\]", + "patterns": [ + { + "include": "#brackets" + }, + { + "include": "#string" + } + ] + } + ] + }, + "parens": { + "patterns": [ + { + "begin": "\\(", + "captures": { + "0": { + "name": "string.other.ruby" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#string" + } + ] + } + ] + }, + "string": { + "patterns": [ + { + "begin": "(?=\\\\|#\\{)", + "end": "(?!\\G)", + "name": "string.other.ruby", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + } + ] + }, + { + "match": "\\S\\w*", + "name": "string.other.ruby" + } + ] + } + } + }, + { + "begin": "%x(?:([(\\[{<])|([^\\w\\s]|_))", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "end": "[)\\]}>]\\2|\\1\\2", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.interpolated.percent.ruby", + "patterns": [ + { + "begin": "\\G(?<=\\()(?!\\))", + "end": "(?=\\))", + "patterns": [ + { + "include": "#parens" + } + ] + }, + { + "begin": "\\G(?<=\\[)(?!\\])", + "end": "(?=\\])", + "patterns": [ + { + "include": "#brackets" + } + ] + }, + { + "begin": "\\G(?<=\\{)(?!\\})", + "end": "(?=\\})", + "patterns": [ + { + "include": "#braces" + } + ] + }, + { + "begin": "\\G(?<=<)(?!>)", + "end": "(?=>)", + "patterns": [ + { + "include": "#angles" + } + ] + }, + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + } + ], + "repository": { + "angles": { + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + }, + { + "begin": "<", + "end": ">", + "patterns": [ + { + "include": "#angles" + } + ] + } + ] + }, + "braces": { + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + }, + { + "begin": "\\{", + "end": "\\}", + "patterns": [ + { + "include": "#braces" + } + ] + } + ] + }, + "brackets": { + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + }, + { + "begin": "\\[", + "end": "\\]", + "patterns": [ + { + "include": "#brackets" + } + ] + } + ] + }, + "parens": { + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + }, + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "#parens" + } + ] + } + ] + } + } + } + ] + }, + "regex_sub": { + "patterns": [ + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.quantifier.begin.ruby" + }, + "3": { + "name": "punctuation.definition.quantifier.end.ruby" + } + }, + "match": "(\\{)\\d+(,\\d+)?(\\})", + "name": "keyword.operator.quantifier.ruby" + }, + { + "begin": "\\[\\^?", + "beginCaptures": { + "0": { + "name": "punctuation.definition.character-class.begin.ruby" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.character-class.end.ruby" + } + }, + "name": "constant.other.character-class.set.ruby", + "patterns": [ + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "\\(\\?#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.begin.ruby" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.end.ruby" + } + }, + "name": "comment.line.number-sign.ruby", + "patterns": [ + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "\\(", + "captures": { + "0": { + "name": "punctuation.definition.group.ruby" + } + }, + "end": "\\)", + "name": "meta.group.regexp.ruby", + "patterns": [ + { + "include": "#regex_sub" + } + ] + }, + { + "begin": "(?<=^|\\s)(#)\\s(?=[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.ruby" + } + }, + "comment": "We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.", + "end": "$\\n?", + "name": "comment.line.number-sign.ruby" + } + ] + } + }, + "scopeName": "source.ruby", + "uuid": "E00B62AC-6B1C-11D9-9B1F-000D93589AF6" +} \ No newline at end of file diff --git a/extensions/ruby/test/colorize-results/test_rb.json b/extensions/ruby/test/colorize-results/test_rb.json index 0a64f6f6aed05..4c6e89c33f09a 100644 --- a/extensions/ruby/test/colorize-results/test_rb.json +++ b/extensions/ruby/test/colorize-results/test_rb.json @@ -95,7 +95,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -117,7 +117,7 @@ "light_plus": "entity.other.inherited-class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.other.inherited-class: #4EC9B0" } }, { @@ -128,7 +128,7 @@ "light_plus": "entity.other.inherited-class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.other.inherited-class: #4EC9B0" } }, { @@ -139,7 +139,7 @@ "light_plus": "entity.other.inherited-class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.other.inherited-class: #4EC9B0" } }, { @@ -150,7 +150,7 @@ "light_plus": "entity.other.inherited-class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.other.inherited-class: #4EC9B0" } }, { @@ -161,7 +161,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -260,7 +260,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -282,7 +282,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -326,7 +326,7 @@ "light_plus": "entity.other.inherited-class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.other.inherited-class: #4EC9B0" } }, { @@ -370,12 +370,12 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { "c": "::", - "t": "source.ruby punctuation.separator.other.ruby", + "t": "source.ruby punctuation.separator.namespace.ruby", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -392,12 +392,12 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { "c": "::", - "t": "source.ruby punctuation.separator.other.ruby", + "t": "source.ruby punctuation.separator.namespace.ruby", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -414,12 +414,12 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { "c": "::", - "t": "source.ruby punctuation.separator.other.ruby", + "t": "source.ruby punctuation.separator.namespace.ruby", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -436,7 +436,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -480,7 +480,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -766,7 +766,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -788,7 +788,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -810,7 +810,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -832,7 +832,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -898,7 +898,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -975,7 +975,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1052,7 +1052,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1063,7 +1063,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1195,7 +1195,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1272,7 +1272,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1349,7 +1349,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1426,7 +1426,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1481,12 +1481,12 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { "c": "::", - "t": "source.ruby punctuation.separator.other.ruby", + "t": "source.ruby punctuation.separator.namespace.ruby", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1503,7 +1503,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1536,7 +1536,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1547,7 +1547,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1602,7 +1602,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1613,7 +1613,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1657,7 +1657,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -1695,13 +1695,13 @@ }, { "c": "self", - "t": "source.ruby variable.language.ruby", + "t": "source.ruby variable.language.self.ruby", "r": { "dark_plus": "variable.language: #569CD6", "light_plus": "variable.language: #0000FF", "dark_vs": "variable.language: #569CD6", "light_vs": "variable.language: #0000FF", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1734,7 +1734,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1745,7 +1745,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1789,7 +1789,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -1827,13 +1827,13 @@ }, { "c": "self", - "t": "source.ruby variable.language.ruby", + "t": "source.ruby variable.language.self.ruby", "r": { "dark_plus": "variable.language: #569CD6", "light_plus": "variable.language: #0000FF", "dark_vs": "variable.language: #569CD6", "light_vs": "variable.language: #0000FF", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1866,7 +1866,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1877,7 +1877,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1965,7 +1965,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1976,7 +1976,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2042,7 +2042,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2053,7 +2053,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2119,7 +2119,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2141,7 +2141,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -2273,7 +2273,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -2328,7 +2328,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2416,7 +2416,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2801,7 +2801,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2823,7 +2823,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2834,7 +2834,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } } ] \ No newline at end of file diff --git a/extensions/ruby/tsconfig.json b/extensions/ruby/tsconfig.json deleted file mode 100644 index a016490a376e0..0000000000000 --- a/extensions/ruby/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "target": "es5", - "outDir": "./out", - "lib": [ - "es2015" - ], - "sourceMap": true - }, - "exclude": [ - "node_modules" - ] -} \ No newline at end of file diff --git a/extensions/rust/.vscodeignore b/extensions/rust/.vscodeignore new file mode 100644 index 0000000000000..77ab386fc7df4 --- /dev/null +++ b/extensions/rust/.vscodeignore @@ -0,0 +1 @@ +test/** \ No newline at end of file diff --git a/extensions/rust/syntaxes/rust.tmLanguage.json b/extensions/rust/syntaxes/rust.tmLanguage.json index 3b952b7f86863..31dcab1d88754 100644 --- a/extensions/rust/syntaxes/rust.tmLanguage.json +++ b/extensions/rust/syntaxes/rust.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/zargony/atom-language-rust/blob/master/grammars/rust.cson", + "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." + ], "name": "Rust", "scopeName": "source.rust", "fileTypes": [ @@ -158,6 +163,11 @@ "name": "support.type.std.rust", "match": "\\b(ToOwned|ToString)\\b" }, + "type": { + "comment": "A type", + "name": "entity.name.type.rust", + "match": "\\b([A-Za-z][_A-Za-z0-9]*|_[_A-Za-z0-9]+)\\b" + }, "type_params": { "comment": "Type parameters", "name": "meta.type_params.rust", @@ -201,6 +211,61 @@ } }, "patterns": [ + { + "comment": "Implementation", + "begin": "\\b(impl)\\b", + "end": "\\{", + "beginCaptures": { + "1": { + "name": "storage.type.rust" + } + }, + "patterns": [ + { + "include": "#block_comment" + }, + { + "include": "#line_comment" + }, + { + "include": "#sigils" + }, + { + "include": "#mut" + }, + { + "include": "#ref_lifetime" + }, + { + "include": "#core_types" + }, + { + "include": "#core_marker" + }, + { + "include": "#core_traits" + }, + { + "include": "#std_types" + }, + { + "include": "#std_traits" + }, + { + "include": "#type_params" + }, + { + "include": "#where" + }, + { + "name": "storage.type.rust", + "match": "\\bfor\\b" + }, + { + "include": "#type" + } + ] + }, { "include": "#block_doc_comment" }, @@ -403,16 +468,34 @@ }, { "comment": "Function call", - "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\s*\\(", + "match": "\\b([A-Za-z][A-Za-z0-9_]*|_[A-Za-z0-9_]+)\\s*\\(", "captures": { "1": { "name": "entity.name.function.rust" } } }, + { + "comment": "Function call with type parameters", + "begin": "\\b([A-Za-z][A-Za-z0-9_]*|_[A-Za-z0-9_]+)\\s*(::)(?=\\s*<.*>\\s*\\()", + "end": "\\(", + "captures": { + "1": { + "name": "entity.name.function.rust" + }, + "2": { + "name": "keyword.operator.misc.rust" + } + }, + "patterns": [ + { + "include": "#type_params" + } + ] + }, { "comment": "Function definition", - "begin": "\\b(fn)\\s+([a-zA-Z_][a-zA-Z0-9_]*)", + "begin": "\\b(fn)\\s+([A-Za-z][A-Za-z0-9_]*|_[A-Za-z0-9_]+)", "end": "[\\{;]", "beginCaptures": { "1": { @@ -470,7 +553,7 @@ }, { "comment": "Function arguments", - "match": "fn", + "match": "\bfn\b", "name": "keyword.other.fn.rust" } ] @@ -564,59 +647,6 @@ "include": "#type_params" } ] - }, - { - "comment": "Implementation", - "begin": "\\b(impl)\\b", - "end": "\\{", - "beginCaptures": { - "1": { - "name": "storage.type.rust" - } - }, - "patterns": [ - { - "include": "#block_comment" - }, - { - "include": "#line_comment" - }, - { - "include": "#sigils" - }, - { - "include": "#mut" - }, - { - "include": "#ref_lifetime" - }, - { - "include": "#core_types" - }, - { - "include": "#core_marker" - }, - { - "include": "#core_traits" - }, - { - "include": "#std_types" - }, - { - "include": "#std_traits" - }, - { - "include": "#type_params" - }, - { - "include": "#where" - }, - { - "name": "storage.type.rust", - "match": "\\bfor\\b" - } - ] } - ], - "version": "https://github.com/zargony/atom-language-rust/commit/5e32388ed873683f3ccdea618c25d1ace8759608" + ] } \ No newline at end of file diff --git a/extensions/rust/test/colorize-results/test-6611_rs.json b/extensions/rust/test/colorize-results/test-6611_rs.json index 5136a3a57d5f6..6667e4fd311d8 100644 --- a/extensions/rust/test/colorize-results/test-6611_rs.json +++ b/extensions/rust/test/colorize-results/test-6611_rs.json @@ -11,7 +11,7 @@ } }, { - "c": " Foo", + "c": " ", "t": "source.rust", "r": { "dark_plus": "default: #D4D4D4", @@ -21,6 +21,17 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "Foo", + "t": "source.rust entity.name.type.rust", + "r": { + "dark_plus": "entity.name.type: #4EC9B0", + "light_plus": "entity.name.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.type: #4EC9B0" + } + }, { "c": "", "t": "source.rust meta.type_params.rust", @@ -55,7 +66,7 @@ } }, { - "c": " A: B", + "c": " ", "t": "source.rust", "r": { "dark_plus": "default: #D4D4D4", @@ -65,6 +76,39 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "A", + "t": "source.rust entity.name.type.rust", + "r": { + "dark_plus": "entity.name.type: #4EC9B0", + "light_plus": "entity.name.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.type: #4EC9B0" + } + }, + { + "c": ": ", + "t": "source.rust", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "B", + "t": "source.rust entity.name.type.rust", + "r": { + "dark_plus": "entity.name.type: #4EC9B0", + "light_plus": "entity.name.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.type: #4EC9B0" + } + }, { "c": "{ }", "t": "source.rust", @@ -88,7 +132,7 @@ } }, { - "c": " Foo", + "c": " ", "t": "source.rust", "r": { "dark_plus": "default: #D4D4D4", @@ -98,6 +142,17 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "Foo", + "t": "source.rust entity.name.type.rust", + "r": { + "dark_plus": "entity.name.type: #4EC9B0", + "light_plus": "entity.name.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.type: #4EC9B0" + } + }, { "c": "", "t": "source.rust meta.type_params.rust", @@ -132,7 +187,7 @@ } }, { - "c": " C", + "c": " ", "t": "source.rust", "r": { "dark_plus": "default: #D4D4D4", @@ -142,6 +197,17 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "C", + "t": "source.rust entity.name.type.rust", + "r": { + "dark_plus": "entity.name.type: #4EC9B0", + "light_plus": "entity.name.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.type: #4EC9B0" + } + }, { "c": " ", "t": "source.rust", @@ -165,7 +231,7 @@ } }, { - "c": " A: B", + "c": " ", "t": "source.rust", "r": { "dark_plus": "default: #D4D4D4", @@ -175,6 +241,39 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "A", + "t": "source.rust entity.name.type.rust", + "r": { + "dark_plus": "entity.name.type: #4EC9B0", + "light_plus": "entity.name.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.type: #4EC9B0" + } + }, + { + "c": ": ", + "t": "source.rust", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "B", + "t": "source.rust entity.name.type.rust", + "r": { + "dark_plus": "entity.name.type: #4EC9B0", + "light_plus": "entity.name.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.type: #4EC9B0" + } + }, { "c": "{ }", "t": "source.rust", @@ -198,7 +297,7 @@ } }, { - "c": " Foo", + "c": " ", "t": "source.rust", "r": { "dark_plus": "default: #D4D4D4", @@ -208,6 +307,17 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "Foo", + "t": "source.rust entity.name.type.rust", + "r": { + "dark_plus": "entity.name.type: #4EC9B0", + "light_plus": "entity.name.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.type: #4EC9B0" + } + }, { "c": "", "t": "source.rust meta.type_params.rust", @@ -242,7 +352,7 @@ } }, { - "c": " C", + "c": " ", "t": "source.rust", "r": { "dark_plus": "default: #D4D4D4", @@ -252,6 +362,17 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "C", + "t": "source.rust entity.name.type.rust", + "r": { + "dark_plus": "entity.name.type: #4EC9B0", + "light_plus": "entity.name.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.type: #4EC9B0" + } + }, { "c": "{", "t": "source.rust", @@ -304,7 +425,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -414,7 +535,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -513,7 +634,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -601,7 +722,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { diff --git a/extensions/rust/test/colorize-results/test_rs.json b/extensions/rust/test/colorize-results/test_rs.json index cc273390c6270..977fe6bd28c2c 100644 --- a/extensions/rust/test/colorize-results/test_rs.json +++ b/extensions/rust/test/colorize-results/test_rs.json @@ -73,7 +73,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -106,7 +106,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -161,7 +161,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -304,7 +304,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -348,7 +348,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -370,7 +370,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -436,7 +436,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -469,7 +469,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -524,7 +524,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { diff --git a/extensions/scss/.vscodeignore b/extensions/scss/.vscodeignore new file mode 100644 index 0000000000000..77ab386fc7df4 --- /dev/null +++ b/extensions/scss/.vscodeignore @@ -0,0 +1 @@ +test/** \ No newline at end of file diff --git a/extensions/scss/syntaxes/scss.json b/extensions/scss/syntaxes/scss.json index 921c511a494f9..d60a4be60eda1 100644 --- a/extensions/scss/syntaxes/scss.json +++ b/extensions/scss/syntaxes/scss.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-sass/blob/master/grammars/scss.cson", + "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." + ], "scopeName": "source.css.scss", "name": "SCSS", "fileTypes": [ @@ -65,9 +70,6 @@ } ], "repository": { - "at_rule__": { - "comment": "Note how all @rules are prefixed." - }, "at_rule_charset": { "begin": "\\s*((@)charset\\b)\\s*", "captures": { @@ -78,7 +80,6 @@ "name": "punctuation.definition.keyword.scss" } }, - "comment": "Charset", "end": "\\s*((?=;|$))", "name": "meta.at-rule.charset.scss", "patterns": [ @@ -255,7 +256,6 @@ "name": "entity.name.function.scss" } }, - "comment": "Function with Attributes", "end": "\\s*(?={)", "name": "meta.at-rule.function.scss", "patterns": [ @@ -276,7 +276,6 @@ "name": "entity.name.function.scss" } }, - "comment": "Simple Function", "match": "\\s*((@)function\\b)\\s*", "name": "meta.at-rule.function.scss" } @@ -509,26 +508,76 @@ "name": "meta.at-rule.media.scss", "patterns": [ { - "match": "\\b(only)\\b", - "name": "keyword.control.operator" + "include": "#comment_block" }, { - "include": "#media_features" + "include": "#comment_line" }, { - "include": "#property_values" + "match": "\\b(only)\\b", + "name": "keyword.control.operator" }, { - "include": "#variable" + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.media-query.begin.bracket.round.scss" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.media-query.end.bracket.round.scss" + } + }, + "name": "meta.property-list.media-query.scss", + "patterns": [ + { + "begin": "(?(['\"])(?:[^\\\\]|\\\\.)*?(\\6)))))?\\s*(])", - "name": "meta.attribute-selector.scss" + } }, "selector_class": { - "begin": "(\\.)(?=[\\w-]|#{)", - "beginCaptures": { + "match": "(?x)\n(\\.) # Valid class-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,.\\#)\\[:{>+~|] # - Another selector\n | /\\* # - A block comment\n)", + "name": "entity.other.attribute-name.class.css", + "captures": { "1": { "name": "punctuation.definition.entity.css" + }, + "2": { + "patterns": [ + { + "include": "#interpolation" + }, + { + "match": "\\\\([0-9a-fA-F]{1,6}|.)", + "name": "constant.character.escape.scss" + }, + { + "match": "\\$|}", + "name": "invalid.illegal.scss" + } + ] } - }, - "end": "(?![\\w-]|(#{))", - "name": "entity.other.attribute-name.class.css", - "patterns": [ - { - "include": "#interpolation" - } - ] - }, - "selector_entities": { - "match": "(?x)\n\\b\n(a|abbr|acronym|address|area|article|aside|audio|\nb|base|bdi|bdo|big|blockquote|body|br|button|\ncanvas|caption|circle|cite|code|col|colgroup|\ndata|datalist|dd|del|details|dfn|dialog|div|dl|dt|\nellipse|em|embed|eventsource|\nfieldset|figure|figcaption|footer|form|frame|frameset|\ng|\n(h[1-6])|head|header|hgroup|hr|html|\ni|iframe|img|image|input|ins|\nkbd|keygen|\nlabel|legend|li|line(?!-)|link|\nmain|map|mark|menu|menuitem|meta|meter|\nnav|noframes|noscript|\nobject(?!-)|ol|optgroup|option|output|\np|param|path|picture|polygon|polyline|pre|progress|\nq|\nrb|rect|rp|rt|rtc|ruby|\ns|samp|script|section|select|small|source|span|strike|strong|style|sub|summary|sup|svg|\ntable(?!-)|tbody|td|template|text(?!-)|textarea|textpath|tfoot|th|thead|time|title|tr|track|tspan|tt|\nu|ul|\nvar|video|\nwbr)\n\\b", - "name": "entity.name.tag.scss" + } }, "selector_custom": { - "match": "\\b([a-zA-Z0-9]+(-[a-zA-Z0-9]+)+)(?=\\.|\\s++[^:]|\\s*[,{]|:(link|visited|hover|active|focus|target|lang|disabled|enabled|checked|indeterminate|root|nth-(child|last-child|of-type|last-of-type)|first-child|last-child|first-of-type|last-of-type|only-child|only-of-type|empty|not|valid|invalid)(\\([0-9A-Za-z]*\\))?)", + "match": "\\b([a-zA-Z0-9]+(-[a-zA-Z0-9]+)+)(?=\\.|\\s++[^:]|\\s*[,\\[{]|:(link|visited|hover|active|focus|target|lang|disabled|enabled|checked|indeterminate|root|nth-(child|last-child|of-type|last-of-type)|first-child|last-child|first-of-type|last-of-type|only-child|only-of-type|empty|not|valid|invalid)(\\([0-9A-Za-z]*\\))?)", "name": "entity.name.tag.custom.scss" }, "selector_id": { + "match": "(?x)\n(\\#) # Valid id-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,.\\#)\\[:{>+~|] # - Another selector\n | /\\* # - A block comment\n)", + "name": "entity.other.attribute-name.id.css", "captures": { "1": { "name": "punctuation.definition.entity.css" + }, + "2": { + "patterns": [ + { + "include": "#interpolation" + }, + { + "match": "\\\\([0-9a-fA-F]{1,6}|.)", + "name": "constant.character.escape.scss" + }, + { + "match": "\\$|}", + "name": "invalid.illegal.identifier.scss" + } + ] } - }, - "match": "(#)[a-zA-Z][a-zA-Z0-9_-]*", - "name": "entity.other.attribute-name.id.css" + } }, "selector_placeholder": { + "match": "(?x)\n(%) # Valid placeholder-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,.\\#)\\[:{>+~|] # - Another selector\n | /\\* # - A block comment\n)", + "name": "entity.other.attribute-name.placeholder.css", "captures": { "1": { - "name": "punctuation.definition.entity.scss" + "name": "punctuation.definition.entity.css" + }, + "2": { + "patterns": [ + { + "include": "#interpolation" + }, + { + "match": "\\\\([0-9a-fA-F]{1,6}|.)", + "name": "constant.character.escape.scss" + }, + { + "match": "\\$|}", + "name": "invalid.illegal.identifier.scss" + } + ] } - }, - "match": "(%)[a-zA-Z0-9_-]+", - "name": "entity.other.attribute-name.placeholder.scss" + } }, "parent_selector_suffix": { - "match": "(?<=&)[a-zA-Z0-9_-]+", - "name": "entity.other.attribute-name.parent-selector-suffix.scss" + "match": "(?x)\n(?<=&)\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,.\\#)\\[:{>+~|] # - Another selector\n | /\\* # - A block comment\n)", + "name": "entity.other.attribute-name.parent-selector-suffix.css", + "captures": { + "1": { + "name": "punctuation.definition.entity.css" + }, + "2": { + "patterns": [ + { + "include": "#interpolation" + }, + { + "match": "\\\\([0-9a-fA-F]{1,6}|.)", + "name": "constant.character.escape.scss" + }, + { + "match": "\\$|}", + "name": "invalid.illegal.identifier.scss" + } + ] + } + } }, "selector_pseudo_class": { "patterns": [ @@ -1494,9 +1520,12 @@ } }, "patterns": [ + { + "include": "#interpolation" + }, { "match": "\\d+", - "name": "constant.numeric.scss" + "name": "constant.numeric.css" }, { "match": "(?<=\\d)n\\b|\\b(n|even|odd)\\b", @@ -1509,32 +1538,14 @@ ] }, { - "match": "(?x)\n(:)\\b\n(link|visited|hover|active|focus|target|lang|disabled|enabled|checked|\nindeterminate|root|first-child|last-child|first-of-type|last-of-type|\nonly-child|only-of-type|empty|not|valid|invalid)\\b", - "captures": { - "0": { - "name": "entity.other.attribute-name.pseudo-class.css" - }, - "1": { - "name": "punctuation.definition.entity.css" - } - } + "include": "source.css#pseudo-classes" } ] }, - "selector_pseudo_element": { - "captures": { - "1": { - "name": "punctuation.definition.entity.css" - } - }, - "match": "(:+)((-(moz|webkit|ms)-)?(after|before|first-letter|first-line|selection))\\b", - "name": "entity.other.attribute-name.pseudo-element.css" - }, "selectors": { - "comment": "Stuff for Selectors.", "patterns": [ { - "include": "#selector_entities" + "include": "source.css#tag-names" }, { "include": "#selector_custom" @@ -1555,7 +1566,7 @@ "include": "#tag_parent_reference" }, { - "include": "#selector_pseudo_element" + "include": "source.css#pseudo-elements" }, { "include": "#selector_attribute" @@ -1668,6 +1679,5 @@ "match": "(\\$|\\-\\-)[A-Za-z0-9_-]+\\b", "name": "variable.scss" } - }, - "version": "https://github.com/atom/language-sass/commit/63b3aa0ed8f25b80a109c110bdfbd9950bd0df27" + } } \ No newline at end of file diff --git a/extensions/scss/test/colorize-results/test-cssvariables_scss.json b/extensions/scss/test/colorize-results/test-cssvariables_scss.json index 686e91d75e4e2..e51a05d345fb1 100644 --- a/extensions/scss/test/colorize-results/test-cssvariables_scss.json +++ b/extensions/scss/test/colorize-results/test-cssvariables_scss.json @@ -89,7 +89,7 @@ }, { "c": "6", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -100,7 +100,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -166,7 +166,7 @@ }, { "c": "(", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss punctuation.definition.begin.bracket.round.scss", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -177,7 +177,7 @@ }, { "c": "4", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -227,7 +227,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -264,8 +264,19 @@ } }, { - "c": ");", - "t": "source.css.scss meta.property-list.scss", + "c": ")", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss punctuation.definition.end.bracket.round.scss", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ";", + "t": "source.css.scss meta.property-list.scss punctuation.terminator.rule.scss", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -287,13 +298,13 @@ }, { "c": "body", - "t": "source.css.scss entity.name.tag.scss", + "t": "source.css.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -331,7 +342,7 @@ }, { "c": "padding-left", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -370,7 +381,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -386,7 +397,7 @@ }, { "c": "4", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -436,7 +447,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -485,7 +496,7 @@ }, { "c": "5", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -496,7 +507,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", diff --git a/extensions/scss/test/colorize-results/test_scss.json b/extensions/scss/test/colorize-results/test_scss.json index 3310661788d1b..ffcdbc7f034ad 100644 --- a/extensions/scss/test/colorize-results/test_scss.json +++ b/extensions/scss/test/colorize-results/test_scss.json @@ -95,7 +95,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -106,7 +106,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -254,7 +254,7 @@ }, { "c": "width", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -287,7 +287,7 @@ }, { "c": "97", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -298,7 +298,7 @@ }, { "c": "%", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.percentage.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -331,13 +331,13 @@ }, { "c": "p", - "t": "source.css.scss meta.property-list.scss entity.name.tag.scss", + "t": "source.css.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -353,13 +353,13 @@ }, { "c": "div", - "t": "source.css.scss meta.property-list.scss entity.name.tag.scss", + "t": "source.css.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -397,7 +397,7 @@ }, { "c": "font-size", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -430,7 +430,7 @@ }, { "c": "2", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -441,7 +441,7 @@ }, { "c": "em", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -474,13 +474,13 @@ }, { "c": "a", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss entity.name.tag.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -518,7 +518,7 @@ }, { "c": "font-weight", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -551,13 +551,13 @@ }, { "c": "bold", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.css", "r": { "dark_plus": "support.constant.property-value: #CE9178", "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -628,13 +628,13 @@ }, { "c": "pre", - "t": "source.css.scss meta.property-list.scss entity.name.tag.scss", + "t": "source.css.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -672,7 +672,7 @@ }, { "c": "font-size", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -705,7 +705,7 @@ }, { "c": "3", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -716,7 +716,7 @@ }, { "c": "em", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -859,7 +859,7 @@ }, { "c": "color", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -892,13 +892,13 @@ }, { "c": "black", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.css", "r": { "dark_plus": "support.constant.color: #CE9178", "light_plus": "support.constant.color: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.color: #0451A5", - "hc_black": "support.constant.color: #B5CEA8" + "hc_black": "support.constant.color: #CE9178" } }, { @@ -925,13 +925,13 @@ }, { "c": "a", - "t": "source.css.scss meta.property-list.scss entity.name.tag.scss", + "t": "source.css.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -969,7 +969,7 @@ }, { "c": "font-weight", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -1002,13 +1002,13 @@ }, { "c": "bold", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.css", "r": { "dark_plus": "support.constant.property-value: #CE9178", "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -1101,7 +1101,7 @@ }, { "c": "color", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -1134,13 +1134,13 @@ }, { "c": "red", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.css", "r": { "dark_plus": "support.constant.color: #CE9178", "light_plus": "support.constant.color: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.color: #0451A5", - "hc_black": "support.constant.color: #B5CEA8" + "hc_black": "support.constant.color: #CE9178" } }, { @@ -1299,13 +1299,13 @@ }, { "c": "font", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "support.type.property-name: #9CDCFE", - "light_plus": "support.type.property-name: #FF0000", - "dark_vs": "support.type.property-name: #9CDCFE", - "light_vs": "support.type.property-name: #FF0000", - "hc_black": "support.type.property-name: #D4D4D4" + "dark_plus": "entity.name.tag.css: #D7BA7D", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag.css: #D7BA7D", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -1332,7 +1332,7 @@ }, { "c": "2", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -1343,7 +1343,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -1365,7 +1365,7 @@ }, { "c": "3", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -1376,7 +1376,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -1409,7 +1409,7 @@ }, { "c": "family", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -1453,7 +1453,7 @@ }, { "c": "size", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -1486,7 +1486,7 @@ }, { "c": "30", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -1497,7 +1497,7 @@ }, { "c": "em", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -1530,7 +1530,7 @@ }, { "c": "weight", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -1563,13 +1563,13 @@ }, { "c": "bold", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.css", "r": { "dark_plus": "support.constant.property-value: #CE9178", "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -1662,13 +1662,13 @@ }, { "c": "tr", - "t": "source.css.scss entity.name.tag.scss", + "t": "source.css.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -1728,13 +1728,13 @@ }, { "c": "foo", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss invalid.illegal.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss", "r": { - "dark_plus": "invalid: #F44747", - "light_plus": "invalid: #CD3131", - "dark_vs": "invalid: #F44747", - "light_vs": "invalid: #CD3131", - "hc_black": "invalid: #F44747" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { @@ -1805,13 +1805,13 @@ }, { "c": "foo", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss invalid.illegal.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss", "r": { - "dark_plus": "invalid: #F44747", - "light_plus": "invalid: #CD3131", - "dark_vs": "invalid: #F44747", - "light_vs": "invalid: #CD3131", - "hc_black": "invalid: #F44747" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { @@ -1849,7 +1849,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -1904,13 +1904,13 @@ }, { "c": "foo", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss invalid.illegal.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss", "r": { - "dark_plus": "invalid: #F44747", - "light_plus": "invalid: #CD3131", - "dark_vs": "invalid: #F44747", - "light_vs": "invalid: #CD3131", - "hc_black": "invalid: #F44747" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { @@ -1937,7 +1937,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -1948,7 +1948,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -2014,13 +2014,13 @@ }, { "c": "foo", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss invalid.illegal.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss", "r": { - "dark_plus": "invalid: #F44747", - "light_plus": "invalid: #CD3131", - "dark_vs": "invalid: #F44747", - "light_vs": "invalid: #CD3131", - "hc_black": "invalid: #F44747" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { @@ -2113,13 +2113,13 @@ }, { "c": "foo", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss invalid.illegal.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss", "r": { - "dark_plus": "invalid: #F44747", - "light_plus": "invalid: #CD3131", - "dark_vs": "invalid: #F44747", - "light_vs": "invalid: #CD3131", - "hc_black": "invalid: #F44747" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { @@ -2157,7 +2157,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -2212,13 +2212,13 @@ }, { "c": "foo", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss invalid.illegal.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss", "r": { - "dark_plus": "invalid: #F44747", - "light_plus": "invalid: #CD3131", - "dark_vs": "invalid: #F44747", - "light_vs": "invalid: #CD3131", - "hc_black": "invalid: #F44747" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { @@ -2278,7 +2278,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -2465,13 +2465,13 @@ }, { "c": "body", - "t": "source.css.scss entity.name.tag.scss", + "t": "source.css.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -2509,7 +2509,7 @@ }, { "c": "color", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -2542,13 +2542,13 @@ }, { "c": "black", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.css", "r": { "dark_plus": "support.constant.color: #CE9178", "light_plus": "support.constant.color: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.color: #0451A5", - "hc_black": "support.constant.color: #B5CEA8" + "hc_black": "support.constant.color: #CE9178" } }, { @@ -2652,13 +2652,13 @@ }, { "c": "a", - "t": "source.css.scss entity.name.tag.scss", + "t": "source.css.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -2696,7 +2696,7 @@ }, { "c": "color", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -2729,13 +2729,13 @@ }, { "c": "green", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.css", "r": { "dark_plus": "support.constant.color: #CE9178", "light_plus": "support.constant.color: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.color: #0451A5", - "hc_black": "support.constant.color: #B5CEA8" + "hc_black": "support.constant.color: #CE9178" } }, { @@ -2839,7 +2839,7 @@ }, { "c": "5", - "t": "source.css.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -2850,7 +2850,7 @@ }, { "c": "em", - "t": "source.css.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -3059,7 +3059,7 @@ }, { "c": "6", - "t": "source.css.scss meta.property-list.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -3070,7 +3070,7 @@ }, { "c": "em", - "t": "source.css.scss meta.property-list.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -3103,7 +3103,7 @@ }, { "c": "width", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -3202,7 +3202,7 @@ }, { "c": "12", - "t": "source.css.scss meta.property-list.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -3213,7 +3213,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -3279,7 +3279,7 @@ }, { "c": "30", - "t": "source.css.scss meta.property-list.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -3290,7 +3290,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -3323,13 +3323,13 @@ }, { "c": "font", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "support.type.property-name: #9CDCFE", - "light_plus": "support.type.property-name: #FF0000", - "dark_vs": "support.type.property-name: #9CDCFE", - "light_vs": "support.type.property-name: #FF0000", - "hc_black": "support.type.property-name: #D4D4D4" + "dark_plus": "entity.name.tag.css: #D7BA7D", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag.css: #D7BA7D", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -3362,7 +3362,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3384,7 +3384,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3406,7 +3406,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3428,7 +3428,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3532,13 +3532,13 @@ }, { "c": "border", - "t": "source.css.scss meta.set.variable.scss support.type.property-name.scss", + "t": "source.css.scss meta.set.variable.scss support.constant.property-value.css", "r": { - "dark_plus": "support.type.property-name: #9CDCFE", - "light_plus": "support.type.property-name: #FF0000", - "dark_vs": "support.type.property-name: #9CDCFE", - "light_vs": "support.type.property-name: #FF0000", - "hc_black": "support.type.property-name: #D4D4D4" + "dark_plus": "support.constant.property-value: #CE9178", + "light_plus": "support.constant.property-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "support.constant.property-value: #0451A5", + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -3554,13 +3554,13 @@ }, { "c": "p", - "t": "source.css.scss entity.name.tag.scss", + "t": "source.css.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -3582,7 +3582,7 @@ "light_plus": "variable: #001080", "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" + "hc_black": "variable: #9CDCFE" } }, { @@ -3604,7 +3604,7 @@ "light_plus": "variable: #001080", "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" + "hc_black": "variable: #9CDCFE" } }, { @@ -3648,7 +3648,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3670,11 +3670,11 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { - "c": "-", + "c": "-color", "t": "source.css.scss meta.property-list.scss meta.property-name.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -3684,17 +3684,6 @@ "hc_black": "default: #FFFFFF" } }, - { - "c": "color", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", - "r": { - "dark_plus": "support.type.property-name: #9CDCFE", - "light_plus": "support.type.property-name: #FF0000", - "dark_vs": "support.type.property-name: #9CDCFE", - "light_vs": "support.type.property-name: #FF0000", - "hc_black": "support.type.property-name: #D4D4D4" - } - }, { "c": ":", "t": "source.css.scss meta.property-list.scss punctuation.separator.key-value.scss", @@ -3719,13 +3708,13 @@ }, { "c": "blue", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.css", "r": { "dark_plus": "support.constant.color: #CE9178", "light_plus": "support.constant.color: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.color: #0451A5", - "hc_black": "support.constant.color: #B5CEA8" + "hc_black": "support.constant.color: #CE9178" } }, { @@ -3857,7 +3846,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -3873,7 +3862,7 @@ }, { "c": "100", - "t": "source.css.scss meta.set.variable.scss constant.numeric.color.rgb-value.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -3906,7 +3895,7 @@ }, { "c": "100", - "t": "source.css.scss meta.set.variable.scss constant.numeric.color.rgb-value.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -3939,7 +3928,7 @@ }, { "c": "225", - "t": "source.css.scss meta.set.variable.scss constant.numeric.color.rgb-value.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -3972,7 +3961,7 @@ }, { "c": "0.25", - "t": "source.css.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4060,13 +4049,13 @@ }, { "c": "p", - "t": "source.css.scss entity.name.tag.scss", + "t": "source.css.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -4104,7 +4093,7 @@ }, { "c": "width", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -4137,7 +4126,7 @@ }, { "c": "(", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss punctuation.definition.begin.bracket.round.scss", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -4148,7 +4137,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4159,7 +4148,7 @@ }, { "c": "em", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -4203,7 +4192,7 @@ }, { "c": "2", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4214,7 +4203,7 @@ }, { "c": "em", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -4224,8 +4213,19 @@ } }, { - "c": ") ", - "t": "source.css.scss meta.property-list.scss", + "c": ")", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss punctuation.definition.end.bracket.round.scss", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -4236,18 +4236,40 @@ }, { "c": "*", - "t": "source.css.scss meta.property-list.scss entity.name.tag.wildcard.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.operator.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", - "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", - "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" } }, { - "c": " 3;", - "t": "source.css.scss meta.property-list.scss", + "c": " ", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "3", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", + "r": { + "dark_plus": "constant.numeric: #B5CEA8", + "light_plus": "constant.numeric: #09885A", + "dark_vs": "constant.numeric: #B5CEA8", + "light_vs": "constant.numeric: #09885A", + "hc_black": "constant.numeric: #B5CEA8" + } + }, + { + "c": ";", + "t": "source.css.scss meta.property-list.scss punctuation.terminator.rule.scss", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -4269,7 +4291,7 @@ }, { "c": "color", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -4302,24 +4324,24 @@ }, { "c": "#", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "010203", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -4357,24 +4379,24 @@ }, { "c": "#", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "040506", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -4401,7 +4423,7 @@ }, { "c": "font-family", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -4522,7 +4544,7 @@ }, { "c": "margin", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -4555,7 +4577,7 @@ }, { "c": "3", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4566,7 +4588,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -4610,7 +4632,7 @@ }, { "c": "4", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4621,7 +4643,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -4643,13 +4665,13 @@ }, { "c": "auto", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.css", "r": { "dark_plus": "support.constant.property-value: #CE9178", "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -4676,13 +4698,13 @@ }, { "c": "content", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "support.type.property-name: #9CDCFE", - "light_plus": "support.type.property-name: #FF0000", - "dark_vs": "support.type.property-name: #9CDCFE", - "light_vs": "support.type.property-name: #FF0000", - "hc_black": "support.type.property-name: #D4D4D4" + "dark_plus": "entity.name.tag.css: #D7BA7D", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag.css: #D7BA7D", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -4737,12 +4759,12 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { "c": "5", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss string.quoted.double.scss variable.interpolation.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss string.quoted.double.scss variable.interpolation.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4759,7 +4781,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -4781,12 +4803,12 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { "c": "10", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss string.quoted.double.scss variable.interpolation.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss string.quoted.double.scss variable.interpolation.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4803,7 +4825,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -4852,7 +4874,7 @@ }, { "c": "color", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -4891,7 +4913,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -4907,7 +4929,7 @@ }, { "c": "0", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4940,7 +4962,7 @@ }, { "c": "100", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4951,7 +4973,7 @@ }, { "c": "%", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.percentage.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -4984,7 +5006,7 @@ }, { "c": "50", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4995,7 +5017,7 @@ }, { "c": "%", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.percentage.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -5039,7 +5061,7 @@ }, { "c": "color", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -5078,7 +5100,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -5111,7 +5133,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5127,7 +5149,7 @@ }, { "c": "0", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -5177,7 +5199,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5193,7 +5215,7 @@ }, { "c": "100", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -5204,7 +5226,7 @@ }, { "c": "%", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.percentage.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -5254,7 +5276,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5270,7 +5292,7 @@ }, { "c": "50", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -5281,7 +5303,7 @@ }, { "c": "%", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.percentage.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -5391,7 +5413,7 @@ }, { "c": "40", - "t": "source.css.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -5402,7 +5424,7 @@ }, { "c": "px", - "t": "source.css.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -5457,7 +5479,7 @@ }, { "c": "10", - "t": "source.css.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -5468,7 +5490,7 @@ }, { "c": "px", - "t": "source.css.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -5496,7 +5518,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5507,7 +5529,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5529,7 +5551,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -5606,7 +5628,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5617,7 +5639,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5709,7 +5731,7 @@ } }, { - "c": " (", + "c": " ", "t": "source.css.scss meta.property-list.scss meta.at-rule.return.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -5719,6 +5741,17 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "(", + "t": "source.css.scss meta.property-list.scss meta.at-rule.return.scss punctuation.definition.begin.bracket.round.scss", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, { "c": "$n", "t": "source.css.scss meta.property-list.scss meta.at-rule.return.scss variable.scss", @@ -5765,7 +5798,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.at-rule.return.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.at-rule.return.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -5775,7 +5808,18 @@ } }, { - "c": ") ", + "c": ")", + "t": "source.css.scss meta.property-list.scss meta.at-rule.return.scss punctuation.definition.end.bracket.round.scss", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", "t": "source.css.scss meta.property-list.scss meta.at-rule.return.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -5897,7 +5941,7 @@ }, { "c": "width", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -5936,7 +5980,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -5952,7 +5996,7 @@ }, { "c": "5", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -6046,7 +6090,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6057,7 +6101,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6156,7 +6200,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -6233,7 +6277,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6244,7 +6288,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6310,7 +6354,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -6354,7 +6398,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -6376,7 +6420,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -6475,7 +6519,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6486,7 +6530,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6645,7 +6689,7 @@ }, { "c": "width", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -6678,7 +6722,7 @@ }, { "c": "300", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -6689,7 +6733,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -6728,7 +6772,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6739,7 +6783,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6761,7 +6805,7 @@ "light_plus": "support.constant.media: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.media: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.media: #CE9178" } }, { @@ -6787,7 +6831,7 @@ } }, { - "c": " (", + "c": " ", "t": "source.css.scss meta.property-list.scss meta.at-rule.media.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -6797,9 +6841,20 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "(", + "t": "source.css.scss meta.property-list.scss meta.at-rule.media.scss meta.property-list.media-query.scss punctuation.definition.media-query.begin.bracket.round.scss", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, { "c": "orientation", - "t": "source.css.scss meta.property-list.scss meta.at-rule.media.scss support.type.property-name.media.css", + "t": "source.css.scss meta.property-list.scss meta.at-rule.media.scss meta.property-list.media-query.scss meta.property-name.media-query.scss support.type.property-name.media.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -6809,8 +6864,19 @@ } }, { - "c": ": ", - "t": "source.css.scss meta.property-list.scss meta.at-rule.media.scss", + "c": ":", + "t": "source.css.scss meta.property-list.scss meta.at-rule.media.scss meta.property-list.media-query.scss punctuation.separator.key-value.scss", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.css.scss meta.property-list.scss meta.at-rule.media.scss meta.property-list.media-query.scss", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -6821,18 +6887,29 @@ }, { "c": "landscape", - "t": "source.css.scss meta.property-list.scss meta.at-rule.media.scss support.constant.property-value.scss", + "t": "source.css.scss meta.property-list.scss meta.at-rule.media.scss meta.property-list.media-query.scss meta.property-value.media-query.scss support.constant.property-value.css", "r": { "dark_plus": "support.constant.property-value: #CE9178", "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { - "c": ") ", - "t": "source.css.scss meta.property-list.scss meta.at-rule.media.scss", + "c": ")", + "t": "source.css.scss meta.property-list.scss meta.at-rule.media.scss meta.property-list.media-query.scss punctuation.definition.media-query.end.bracket.round.scss", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.css.scss meta.property-list.scss meta.at-rule.media.scss", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -6865,7 +6942,7 @@ }, { "c": "width", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -6898,7 +6975,7 @@ }, { "c": "500", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -6909,7 +6986,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -7052,7 +7129,7 @@ }, { "c": "border", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -7085,7 +7162,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -7096,7 +7173,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -7118,24 +7195,24 @@ }, { "c": "#", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "f00", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -7162,7 +7239,7 @@ }, { "c": "background-color", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -7195,24 +7272,24 @@ }, { "c": "#", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "fdd", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -7300,7 +7377,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -7311,11 +7388,11 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { - "c": " ", + "c": " .error", "t": "source.css.scss meta.property-list.scss meta.at-rule.import.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -7325,28 +7402,6 @@ "hc_black": "default: #FFFFFF" } }, - { - "c": ".", - "t": "source.css.scss meta.property-list.scss meta.at-rule.import.scss entity.other.attribute-name.class.css punctuation.definition.entity.css", - "r": { - "dark_plus": "entity.other.attribute-name.class.css: #D7BA7D", - "light_plus": "entity.other.attribute-name.class.css: #800000", - "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", - "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" - } - }, - { - "c": "error", - "t": "source.css.scss meta.property-list.scss meta.at-rule.import.scss entity.other.attribute-name.class.css", - "r": { - "dark_plus": "entity.other.attribute-name.class.css: #D7BA7D", - "light_plus": "entity.other.attribute-name.class.css: #800000", - "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", - "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" - } - }, { "c": ";", "t": "source.css.scss meta.property-list.scss", @@ -7371,7 +7426,7 @@ }, { "c": "border-width", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -7404,7 +7459,7 @@ }, { "c": "3", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -7415,7 +7470,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -7469,7 +7524,7 @@ } }, { - "c": " ", + "c": " a", "t": "source.css.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -7479,20 +7534,9 @@ "hc_black": "default: #FFFFFF" } }, - { - "c": "a", - "t": "source.css.scss entity.name.tag.scss", - "r": { - "dark_plus": "entity.name.tag: #569CD6", - "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", - "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" - } - }, { "c": "%", - "t": "source.css.scss entity.other.attribute-name.placeholder.scss punctuation.definition.entity.scss", + "t": "source.css.scss entity.other.attribute-name.placeholder.css punctuation.definition.entity.css", "r": { "dark_plus": "entity.other.attribute-name: #9CDCFE", "light_plus": "entity.other.attribute-name: #FF0000", @@ -7503,7 +7547,7 @@ }, { "c": "extreme", - "t": "source.css.scss entity.other.attribute-name.placeholder.scss", + "t": "source.css.scss entity.other.attribute-name.placeholder.css", "r": { "dark_plus": "entity.other.attribute-name: #9CDCFE", "light_plus": "entity.other.attribute-name: #FF0000", @@ -7547,7 +7591,7 @@ }, { "c": "color", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -7580,13 +7624,13 @@ }, { "c": "blue", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.css", "r": { "dark_plus": "support.constant.color: #CE9178", "light_plus": "support.constant.color: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.color: #0451A5", - "hc_black": "support.constant.color: #B5CEA8" + "hc_black": "support.constant.color: #CE9178" } }, { @@ -7613,7 +7657,7 @@ }, { "c": "font-weight", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -7646,13 +7690,13 @@ }, { "c": "bold", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.css", "r": { "dark_plus": "support.constant.property-value: #CE9178", "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -7679,7 +7723,7 @@ }, { "c": "font-size", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -7712,7 +7756,7 @@ }, { "c": "2", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -7723,7 +7767,7 @@ }, { "c": "em", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -7817,7 +7861,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -7828,7 +7872,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -7844,7 +7888,7 @@ }, { "c": "%", - "t": "source.css.scss meta.property-list.scss meta.at-rule.import.scss entity.other.attribute-name.placeholder.scss punctuation.definition.entity.scss", + "t": "source.css.scss meta.property-list.scss meta.at-rule.import.scss entity.other.attribute-name.placeholder.css punctuation.definition.entity.css", "r": { "dark_plus": "entity.other.attribute-name: #9CDCFE", "light_plus": "entity.other.attribute-name: #FF0000", @@ -7855,7 +7899,7 @@ }, { "c": "extreme", - "t": "source.css.scss meta.property-list.scss meta.at-rule.import.scss entity.other.attribute-name.placeholder.scss", + "t": "source.css.scss meta.property-list.scss meta.at-rule.import.scss entity.other.attribute-name.placeholder.css", "r": { "dark_plus": "entity.other.attribute-name: #9CDCFE", "light_plus": "entity.other.attribute-name: #FF0000", @@ -7949,7 +7993,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -7960,7 +8004,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -7993,7 +8037,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8004,7 +8048,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8026,7 +8070,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -8125,7 +8169,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8136,7 +8180,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8158,7 +8202,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -8235,7 +8279,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8246,7 +8290,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8290,7 +8334,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -8312,7 +8356,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -8394,7 +8438,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -8405,7 +8449,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -8510,7 +8554,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8521,7 +8565,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8543,7 +8587,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -8620,7 +8664,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8631,7 +8675,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8675,7 +8719,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -8697,7 +8741,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -8779,7 +8823,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -8790,7 +8834,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -8889,7 +8933,7 @@ }, { "c": "position", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -8922,13 +8966,13 @@ }, { "c": "relative", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.css", "r": { "dark_plus": "support.constant.property-value: #CE9178", "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -8955,7 +8999,7 @@ }, { "c": "left", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -9021,7 +9065,7 @@ }, { "c": "top", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -9153,13 +9197,13 @@ }, { "c": "p", - "t": "source.css.scss entity.name.tag.scss", + "t": "source.css.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -9203,7 +9247,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -9214,7 +9258,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -9230,7 +9274,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -9274,7 +9318,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -9318,7 +9362,7 @@ }, { "c": "2", - "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -9362,7 +9406,7 @@ }, { "c": "border", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -9395,7 +9439,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -9406,7 +9450,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -9428,13 +9472,13 @@ }, { "c": "solid", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.css", "r": { "dark_plus": "support.constant.property-value: #CE9178", "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -9489,7 +9533,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -9500,7 +9544,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -9516,7 +9560,7 @@ }, { "c": "5", - "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -9560,7 +9604,7 @@ }, { "c": "3", - "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -9604,7 +9648,7 @@ }, { "c": "border", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -9637,7 +9681,7 @@ }, { "c": "2", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -9648,7 +9692,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -9670,13 +9714,13 @@ }, { "c": "dotted", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.css", "r": { "dark_plus": "support.constant.property-value: #CE9178", "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -9731,7 +9775,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -9742,33 +9786,11 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" - } - }, - { - "c": " ", - "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "keyword.control: #C586C0" } }, { - "c": "null", - "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss support.constant.property-value.scss", - "r": { - "dark_plus": "support.constant.property-value: #CE9178", - "light_plus": "support.constant.property-value: #0451A5", - "dark_vs": "default: #D4D4D4", - "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", + "c": " null ", "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -9802,7 +9824,7 @@ }, { "c": "border", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -9835,7 +9857,7 @@ }, { "c": "3", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -9846,7 +9868,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -9868,13 +9890,13 @@ }, { "c": "double", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.css", "r": { "dark_plus": "support.constant.property-value: #CE9178", "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -10000,13 +10022,13 @@ }, { "c": "p", - "t": "source.css.scss entity.name.tag.scss", + "t": "source.css.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -10050,7 +10072,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -10061,7 +10083,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -10143,7 +10165,7 @@ }, { "c": "color", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -10176,13 +10198,13 @@ }, { "c": "blue", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.css", "r": { "dark_plus": "support.constant.color: #CE9178", "light_plus": "support.constant.color: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.color: #0451A5", - "hc_black": "support.constant.color: #B5CEA8" + "hc_black": "support.constant.color: #CE9178" } }, { @@ -10237,7 +10259,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -10248,7 +10270,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -10275,7 +10297,7 @@ }, { "c": "color", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -10308,13 +10330,13 @@ }, { "c": "black", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.css", "r": { "dark_plus": "support.constant.color: #CE9178", "light_plus": "support.constant.color: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.color: #0451A5", - "hc_black": "support.constant.color: #B5CEA8" + "hc_black": "support.constant.color: #CE9178" } }, { @@ -10402,7 +10424,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -10413,7 +10435,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -10457,7 +10479,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -10473,7 +10495,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.for.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.for.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -10501,7 +10523,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -10517,7 +10539,7 @@ }, { "c": "3", - "t": "source.css.scss meta.at-rule.for.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.for.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -10589,7 +10611,7 @@ "light_plus": "variable: #001080", "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" + "hc_black": "variable: #9CDCFE" } }, { @@ -10611,7 +10633,7 @@ "light_plus": "variable: #001080", "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" + "hc_black": "variable: #9CDCFE" } }, { @@ -10649,7 +10671,7 @@ }, { "c": "width", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -10682,7 +10704,7 @@ }, { "c": "2", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -10693,7 +10715,7 @@ }, { "c": "em", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -10831,7 +10853,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -10842,7 +10864,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -10886,7 +10908,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -10963,7 +10985,7 @@ "light_plus": "variable: #001080", "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" + "hc_black": "variable: #9CDCFE" } }, { @@ -10985,7 +11007,7 @@ "light_plus": "variable: #001080", "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" + "hc_black": "variable: #9CDCFE" } }, { @@ -11034,7 +11056,7 @@ }, { "c": "background-image", - "t": "source.css.scss meta.at-rule.each.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -11073,7 +11095,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -11117,7 +11139,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -11139,7 +11161,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -11276,7 +11298,7 @@ }, { "c": "6", - "t": "source.css.scss meta.at-rule.each.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -11304,7 +11326,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -11315,7 +11337,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -11375,7 +11397,7 @@ }, { "c": "0", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -11447,7 +11469,7 @@ "light_plus": "variable: #001080", "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" + "hc_black": "variable: #9CDCFE" } }, { @@ -11469,7 +11491,7 @@ "light_plus": "variable: #001080", "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" + "hc_black": "variable: #9CDCFE" } }, { @@ -11507,7 +11529,7 @@ }, { "c": "width", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -11540,7 +11562,7 @@ }, { "c": "2", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -11551,7 +11573,7 @@ }, { "c": "em", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -11727,7 +11749,7 @@ }, { "c": "2", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -11799,7 +11821,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -11810,7 +11832,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -11832,7 +11854,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -11942,7 +11964,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -11953,7 +11975,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -11997,7 +12019,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -12013,7 +12035,7 @@ }, { "c": "0", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.for.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.for.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -12041,7 +12063,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -12107,7 +12129,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -12118,11 +12140,11 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { - "c": " (", + "c": " ", "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -12132,6 +12154,17 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "(", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss punctuation.definition.begin.bracket.round.scss", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, { "c": "unit", "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss support.function.misc.scss", @@ -12140,7 +12173,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -12177,29 +12210,7 @@ } }, { - "c": " ", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "==", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss keyword.operator.comparison.scss", - "r": { - "dark_plus": "keyword.operator: #D4D4D4", - "light_plus": "keyword.operator: #000000", - "dark_vs": "keyword.operator: #D4D4D4", - "light_vs": "keyword.operator: #000000", - "hc_black": "keyword.operator: #D4D4D4" - } - }, - { - "c": " ", + "c": " == ", "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -12243,7 +12254,18 @@ } }, { - "c": ") ", + "c": ")", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss punctuation.definition.end.bracket.round.scss", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -12265,7 +12287,7 @@ } }, { - "c": " (", + "c": " ", "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -12275,6 +12297,17 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "(", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss punctuation.definition.begin.bracket.round.scss", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, { "c": "$i", "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss variable.scss", @@ -12287,7 +12320,7 @@ } }, { - "c": " ", + "c": " == ", "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -12298,19 +12331,8 @@ } }, { - "c": "==", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss keyword.operator.comparison.scss", - "r": { - "dark_plus": "keyword.operator: #D4D4D4", - "light_plus": "keyword.operator: #000000", - "dark_vs": "keyword.operator: #D4D4D4", - "light_vs": "keyword.operator: #000000", - "hc_black": "keyword.operator: #D4D4D4" - } - }, - { - "c": " (", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss", + "c": "(", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss punctuation.definition.begin.bracket.round.scss", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -12365,7 +12387,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -12375,7 +12397,18 @@ } }, { - "c": ")) ", + "c": "))", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss punctuation.definition.end.bracket.round.scss", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -12442,7 +12475,7 @@ }, { "c": "100", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -12453,7 +12486,7 @@ }, { "c": "%", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.percentage.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -12492,7 +12525,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -12503,7 +12536,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -12624,7 +12657,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -12635,7 +12668,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -12723,7 +12756,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -12734,7 +12767,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -12756,7 +12789,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -12794,13 +12827,13 @@ }, { "c": "font", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "support.type.property-name: #9CDCFE", - "light_plus": "support.type.property-name: #FF0000", - "dark_vs": "support.type.property-name: #9CDCFE", - "light_vs": "support.type.property-name: #FF0000", - "hc_black": "support.type.property-name: #D4D4D4" + "dark_plus": "entity.name.tag.css: #D7BA7D", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag.css: #D7BA7D", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -12838,7 +12871,7 @@ }, { "c": "family", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -12871,13 +12904,13 @@ }, { "c": "Arial", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.font-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.font-name.css", "r": { "dark_plus": "support.constant.font-name: #CE9178", "light_plus": "support.constant.font-name: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.font-name: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.font-name: #CE9178" } }, { @@ -12904,7 +12937,7 @@ }, { "c": "size", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -12937,7 +12970,7 @@ }, { "c": "20", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -12948,7 +12981,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -12981,7 +13014,7 @@ }, { "c": "weight", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -13014,13 +13047,13 @@ }, { "c": "bold", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.css", "r": { "dark_plus": "support.constant.property-value: #CE9178", "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -13069,7 +13102,7 @@ }, { "c": "color", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -13102,24 +13135,24 @@ }, { "c": "#", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "ff0000", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -13207,7 +13240,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -13218,7 +13251,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -13240,7 +13273,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -13267,7 +13300,7 @@ }, { "c": "padding", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -13300,7 +13333,7 @@ }, { "c": "4", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -13311,7 +13344,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -13383,7 +13416,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -13394,7 +13427,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -13416,7 +13449,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -13487,7 +13520,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.at-rule.mixin.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.at-rule.mixin.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -13498,7 +13531,7 @@ }, { "c": "in", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.at-rule.mixin.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.at-rule.mixin.scss constant.numeric.css keyword.other.unit.in.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -13553,7 +13586,7 @@ }, { "c": "border", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -13597,7 +13630,7 @@ }, { "c": "color", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -13663,7 +13696,7 @@ }, { "c": "width", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -13729,13 +13762,13 @@ }, { "c": "style", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss entity.name.tag.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -13762,13 +13795,13 @@ }, { "c": "dashed", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.css", "r": { "dark_plus": "support.constant.property-value: #CE9178", "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -13817,13 +13850,13 @@ }, { "c": "p", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss entity.name.tag.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -13867,7 +13900,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -13878,7 +13911,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -13900,7 +13933,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -13916,13 +13949,13 @@ }, { "c": "blue", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss support.constant.color.w3c-standard-color-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss support.constant.color.w3c-standard-color-name.css", "r": { "dark_plus": "support.constant.color: #CE9178", "light_plus": "support.constant.color: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.color: #0451A5", - "hc_black": "support.constant.color: #B5CEA8" + "hc_black": "support.constant.color: #CE9178" } }, { @@ -13999,7 +14032,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -14010,7 +14043,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -14032,7 +14065,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -14114,13 +14147,13 @@ }, { "c": "-moz-box-shadow", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.vendored.property-name.css", "r": { - "dark_plus": "support.type.property-name: #9CDCFE", - "light_plus": "support.type.property-name: #FF0000", - "dark_vs": "support.type.property-name: #9CDCFE", - "light_vs": "support.type.property-name: #FF0000", - "hc_black": "support.type.property-name: #D4D4D4" + "dark_plus": "support.type.vendored.property-name: #9CDCFE", + "light_plus": "support.type.vendored.property-name: #FF0000", + "dark_vs": "support.type.vendored.property-name: #9CDCFE", + "light_vs": "support.type.vendored.property-name: #FF0000", + "hc_black": "support.type.vendored.property-name: #D4D4D4" } }, { @@ -14180,13 +14213,13 @@ }, { "c": "-webkit-box-shadow", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.vendored.property-name.css", "r": { - "dark_plus": "support.type.property-name: #9CDCFE", - "light_plus": "support.type.property-name: #FF0000", - "dark_vs": "support.type.property-name: #9CDCFE", - "light_vs": "support.type.property-name: #FF0000", - "hc_black": "support.type.property-name: #D4D4D4" + "dark_plus": "support.type.vendored.property-name: #9CDCFE", + "light_plus": "support.type.vendored.property-name: #FF0000", + "dark_vs": "support.type.vendored.property-name: #9CDCFE", + "light_vs": "support.type.vendored.property-name: #FF0000", + "hc_black": "support.type.vendored.property-name: #D4D4D4" } }, { @@ -14246,7 +14279,7 @@ }, { "c": "box-shadow", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -14373,7 +14406,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -14384,7 +14417,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -14406,7 +14439,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -14422,7 +14455,7 @@ }, { "c": "0", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -14433,7 +14466,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -14455,7 +14488,7 @@ }, { "c": "4", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -14466,7 +14499,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -14488,7 +14521,7 @@ }, { "c": "5", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -14499,7 +14532,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -14521,24 +14554,24 @@ }, { "c": "#", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "666", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -14554,7 +14587,7 @@ }, { "c": "2", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -14565,7 +14598,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -14587,7 +14620,7 @@ }, { "c": "6", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -14598,7 +14631,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -14620,7 +14653,7 @@ }, { "c": "10", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -14631,7 +14664,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -14653,24 +14686,24 @@ }, { "c": "#", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "999", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -14747,7 +14780,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -14758,7 +14791,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -14780,7 +14813,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -14895,7 +14928,7 @@ }, { "c": "color", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -14961,7 +14994,7 @@ }, { "c": "background-color", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -15027,7 +15060,7 @@ }, { "c": "border-color", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -15115,24 +15148,24 @@ }, { "c": "#", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "ff0000", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -15148,24 +15181,24 @@ }, { "c": "#", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "00ff00", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -15181,24 +15214,24 @@ }, { "c": "#", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "0000ff", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -15275,7 +15308,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -15286,7 +15319,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -15308,7 +15341,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -15418,7 +15451,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -15429,7 +15462,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -15451,7 +15484,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -15511,13 +15544,13 @@ }, { "c": "html", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss entity.name.tag.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -15561,7 +15594,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -15616,7 +15649,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -15627,7 +15660,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -15649,7 +15682,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -15742,7 +15775,7 @@ }, { "c": "background-image", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -15781,7 +15814,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -15814,7 +15847,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -15880,7 +15913,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -15891,7 +15924,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -15957,7 +15990,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -15968,7 +16001,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -15990,7 +16023,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -16105,13 +16138,13 @@ }, { "c": "=", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.attribute-selector.scss punctuation.separator.operator.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.attribute-selector.scss keyword.operator.scss", "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" } }, { @@ -16127,13 +16160,13 @@ }, { "c": "external", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.attribute-selector.scss string.quoted.double.attribute-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.attribute-selector.scss", "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { @@ -16215,13 +16248,13 @@ }, { "c": "content", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "support.type.property-name: #9CDCFE", - "light_plus": "support.type.property-name: #FF0000", - "dark_vs": "support.type.property-name: #9CDCFE", - "light_vs": "support.type.property-name: #FF0000", - "hc_black": "support.type.property-name: #D4D4D4" + "dark_plus": "entity.name.tag.css: #D7BA7D", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag.css: #D7BA7D", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -16342,7 +16375,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -16353,7 +16386,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -16375,7 +16408,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -16413,7 +16446,7 @@ }, { "c": "margin-left", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -16446,7 +16479,7 @@ }, { "c": "4", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -16457,7 +16490,7 @@ }, { "c": "cm", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.cm.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -16490,7 +16523,7 @@ }, { "c": "margin-right", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -16523,7 +16556,7 @@ }, { "c": "3", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -16534,7 +16567,7 @@ }, { "c": "cm", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.cm.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -16600,13 +16633,13 @@ }, { "c": "tr", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss entity.name.tag.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -16666,13 +16699,13 @@ }, { "c": "foo", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss invalid.illegal.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss", "r": { - "dark_plus": "invalid: #F44747", - "light_plus": "invalid: #CD3131", - "dark_vs": "invalid: #F44747", - "light_vs": "invalid: #CD3131", - "hc_black": "invalid: #F44747" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { @@ -16765,7 +16798,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -16776,7 +16809,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -16820,13 +16853,13 @@ }, { "c": "white", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss support.constant.color.w3c-standard-color-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss support.constant.color.w3c-standard-color-name.css", "r": { "dark_plus": "support.constant.color: #CE9178", "light_plus": "support.constant.color: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.color: #0451A5", - "hc_black": "support.constant.color: #B5CEA8" + "hc_black": "support.constant.color: #CE9178" } }, { @@ -16864,13 +16897,13 @@ }, { "c": "default", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss support.constant.property-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss support.constant.property-value.css", "r": { "dark_plus": "support.constant.property-value: #CE9178", "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -16963,13 +16996,13 @@ }, { "c": "black", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss support.constant.color.w3c-standard-color-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss support.constant.color.w3c-standard-color-name.css", "r": { "dark_plus": "support.constant.color: #CE9178", "light_plus": "support.constant.color: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.color: #0451A5", - "hc_black": "support.constant.color: #B5CEA8" + "hc_black": "support.constant.color: #CE9178" } }, { @@ -17029,7 +17062,7 @@ }, { "c": "margin-top", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -17051,7 +17084,7 @@ }, { "c": "0", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -17073,7 +17106,7 @@ }, { "c": "margin-bottom", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -17095,24 +17128,24 @@ }, { "c": "#", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "123", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -17128,7 +17161,7 @@ }, { "c": "margin-top", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -17156,7 +17189,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -17172,7 +17205,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -17244,7 +17277,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -17255,7 +17288,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -17277,7 +17310,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -17314,7 +17347,7 @@ } }, { - "c": " ", + "c": " false", "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.mixin.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -17324,17 +17357,6 @@ "hc_black": "default: #FFFFFF" } }, - { - "c": "false", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.mixin.scss support.constant.property-value.scss", - "r": { - "dark_plus": "support.constant.property-value: #CE9178", - "light_plus": "support.constant.property-value: #0451A5", - "dark_vs": "default: #D4D4D4", - "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" - } - }, { "c": ")", "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.mixin.scss punctuation.definition.parameters.end.bracket.round.scss", @@ -17387,7 +17409,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -17398,11 +17420,11 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { - "c": " ", + "c": " .", "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.import.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -17412,31 +17434,20 @@ "hc_black": "default: #FFFFFF" } }, - { - "c": ".", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.import.scss entity.other.attribute-name.class.css punctuation.definition.entity.css", - "r": { - "dark_plus": "entity.other.attribute-name.class.css: #D7BA7D", - "light_plus": "entity.other.attribute-name.class.css: #800000", - "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", - "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" - } - }, { "c": "#{", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.import.scss entity.other.attribute-name.class.css variable.interpolation.scss punctuation.definition.interpolation.begin.bracket.curly.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.import.scss variable.interpolation.scss punctuation.definition.interpolation.begin.bracket.curly.scss", "r": { "dark_plus": "variable: #9CDCFE", "light_plus": "variable: #001080", - "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", - "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE" } }, { "c": "$a", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.import.scss entity.other.attribute-name.class.css variable.interpolation.scss variable.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.import.scss variable.interpolation.scss variable.scss", "r": { "dark_plus": "variable.scss: #9CDCFE", "light_plus": "variable.scss: #FF0000", @@ -17447,13 +17458,13 @@ }, { "c": "}", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.import.scss entity.other.attribute-name.class.css variable.interpolation.scss punctuation.definition.interpolation.end.bracket.curly.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.import.scss variable.interpolation.scss punctuation.definition.interpolation.end.bracket.curly.scss", "r": { "dark_plus": "variable: #9CDCFE", "light_plus": "variable: #001080", - "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", - "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE" } }, { @@ -17486,7 +17497,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -17497,7 +17508,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -17519,7 +17530,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -17541,7 +17552,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -17612,13 +17623,13 @@ }, { "c": "a", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss entity.name.tag.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -17645,7 +17656,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -17656,7 +17667,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -17733,13 +17744,13 @@ }, { "c": "b", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss entity.name.tag.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -17766,7 +17777,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -17777,7 +17788,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -17810,13 +17821,13 @@ }, { "c": "foo", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss invalid.illegal.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss", "r": { - "dark_plus": "invalid: #F44747", - "light_plus": "invalid: #CD3131", - "dark_vs": "invalid: #F44747", - "light_vs": "invalid: #CD3131", - "hc_black": "invalid: #F44747" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { @@ -17860,7 +17871,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -17871,7 +17882,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -17893,7 +17904,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -18014,7 +18025,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -18025,7 +18036,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -18063,7 +18074,7 @@ }, { "c": "font-family", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -18129,7 +18140,7 @@ }, { "c": "src", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -18168,7 +18179,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -18322,7 +18333,7 @@ "light_plus": "variable: #001080", "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" + "hc_black": "variable: #9CDCFE" } }, { @@ -18344,7 +18355,7 @@ "light_plus": "variable: #001080", "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" + "hc_black": "variable: #9CDCFE" } }, { @@ -18399,7 +18410,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -18421,11 +18432,11 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { - "c": "-", + "c": "-style", "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -18435,17 +18446,6 @@ "hc_black": "default: #FFFFFF" } }, - { - "c": "style", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", - "r": { - "dark_plus": "support.type.property-name: #9CDCFE", - "light_plus": "support.type.property-name: #FF0000", - "dark_vs": "support.type.property-name: #9CDCFE", - "light_vs": "support.type.property-name: #FF0000", - "hc_black": "support.type.property-name: #D4D4D4" - } - }, { "c": ":", "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss punctuation.separator.key-value.scss", @@ -18470,7 +18470,7 @@ }, { "c": "0", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -18503,13 +18503,13 @@ }, { "c": "foo-", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss invalid.illegal.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss", "r": { - "dark_plus": "invalid: #F44747", - "light_plus": "invalid: #CD3131", - "dark_vs": "invalid: #F44747", - "light_vs": "invalid: #CD3131", - "hc_black": "invalid: #F44747" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { @@ -18520,7 +18520,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -18542,7 +18542,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -18569,7 +18569,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -18608,7 +18608,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -18630,18 +18630,18 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { "c": "-bar-", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss invalid.illegal.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss", "r": { - "dark_plus": "invalid: #F44747", - "light_plus": "invalid: #CD3131", - "dark_vs": "invalid: #F44747", - "light_vs": "invalid: #CD3131", - "hc_black": "invalid: #F44747" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { @@ -18652,7 +18652,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -18674,7 +18674,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -18701,7 +18701,7 @@ }, { "c": "2", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -18734,13 +18734,13 @@ }, { "c": "foo-", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss invalid.illegal.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss", "r": { - "dark_plus": "invalid: #F44747", - "light_plus": "invalid: #CD3131", - "dark_vs": "invalid: #F44747", - "light_vs": "invalid: #CD3131", - "hc_black": "invalid: #F44747" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { @@ -18751,7 +18751,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -18773,18 +18773,18 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { "c": "-bar", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss invalid.illegal.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss", "r": { - "dark_plus": "invalid: #F44747", - "light_plus": "invalid: #CD3131", - "dark_vs": "invalid: #F44747", - "light_vs": "invalid: #CD3131", - "hc_black": "invalid: #F44747" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { @@ -18811,7 +18811,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -18883,7 +18883,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -18894,7 +18894,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -18976,7 +18976,7 @@ }, { "c": "opacity", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -19009,7 +19009,7 @@ }, { "c": "0", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -19108,7 +19108,7 @@ }, { "c": "opacity", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -19141,7 +19141,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -19202,7 +19202,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -19213,7 +19213,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -19295,7 +19295,7 @@ }, { "c": "opacity", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -19328,7 +19328,7 @@ }, { "c": "0", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -19427,7 +19427,7 @@ }, { "c": "opacity", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -19460,7 +19460,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -19526,13 +19526,13 @@ }, { "c": "-o-keyframes", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss invalid.illegal.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.vendored.property-name.css", "r": { - "dark_plus": "invalid: #F44747", - "light_plus": "invalid: #CD3131", - "dark_vs": "invalid: #F44747", - "light_vs": "invalid: #CD3131", - "hc_black": "invalid: #F44747" + "dark_plus": "support.type.vendored.property-name: #9CDCFE", + "light_plus": "support.type.vendored.property-name: #FF0000", + "dark_vs": "support.type.vendored.property-name: #9CDCFE", + "light_vs": "support.type.vendored.property-name: #FF0000", + "hc_black": "support.type.vendored.property-name: #D4D4D4" } }, { @@ -19614,7 +19614,7 @@ }, { "c": "opacity", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -19647,7 +19647,7 @@ }, { "c": "0", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -19724,7 +19724,7 @@ }, { "c": "opacity", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -19757,7 +19757,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -19818,7 +19818,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -19829,7 +19829,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -19851,7 +19851,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -19933,7 +19933,7 @@ }, { "c": "opacity", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -19966,7 +19966,7 @@ }, { "c": "0", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -20065,7 +20065,7 @@ }, { "c": "opacity", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -20098,7 +20098,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -20208,18 +20208,18 @@ }, { "c": "=", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.attribute-selector.scss punctuation.separator.operator.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.attribute-selector.scss keyword.operator.scss", "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" } }, { "c": "'", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.attribute-selector.scss string.quoted.double.attribute-value.scss punctuation.definition.string.begin.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.attribute-selector.scss string.quoted.single.attribute-value.scss punctuation.definition.string.begin.scss", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -20230,18 +20230,18 @@ }, { "c": "test-1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.attribute-selector.scss string.quoted.double.attribute-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.attribute-selector.scss", "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { "c": "'", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.attribute-selector.scss string.quoted.double.attribute-value.scss punctuation.definition.string.end.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.attribute-selector.scss string.quoted.single.attribute-value.scss punctuation.definition.string.end.scss", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -20318,13 +20318,13 @@ }, { "c": "content", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "support.type.property-name: #9CDCFE", - "light_plus": "support.type.property-name: #FF0000", - "dark_vs": "support.type.property-name: #9CDCFE", - "light_vs": "support.type.property-name: #FF0000", - "hc_black": "support.type.property-name: #D4D4D4" + "dark_plus": "entity.name.tag.css: #D7BA7D", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag.css: #D7BA7D", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { diff --git a/extensions/shaderlab/.vscodeignore b/extensions/shaderlab/.vscodeignore new file mode 100644 index 0000000000000..77ab386fc7df4 --- /dev/null +++ b/extensions/shaderlab/.vscodeignore @@ -0,0 +1 @@ +test/** \ No newline at end of file diff --git a/extensions/shaderlab/syntaxes/shaderlab.json b/extensions/shaderlab/syntaxes/shaderlab.json index aad10f3b35aff..8a293ee334711 100644 --- a/extensions/shaderlab/syntaxes/shaderlab.json +++ b/extensions/shaderlab/syntaxes/shaderlab.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/tgjones/shaders-tmLanguage/blob/master/grammars/shaderlab.json", + "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." + ], "scopeName": "source.shaderlab", "name": "ShaderLab", "fileTypes": [ @@ -93,6 +98,48 @@ "name": "keyword.other" } }, + "patterns": [ + { + "include": "#hlsl-embedded" + } + ] + }, + { + "name": "meta.hlslblock", + "begin": "\\b(HLSLPROGRAM|HLSLINCLUDE)\\b", + "beginCaptures": { + "1": { + "name": "keyword.other" + } + }, + "end": "\\b(ENDHLSL)\\b", + "endCaptures": { + "1": { + "name": "keyword.other" + } + }, + "patterns": [ + { + "include": "#hlsl-embedded" + } + ] + }, + { + "name": "string.quoted.double.shaderlab", + "begin": "\"", + "end": "\"" + } + ], + "repository": { + "numbers": { + "patterns": [ + { + "name": "constant.numeric.shaderlab", + "match": "\\b([0-9]+\\.?[0-9]*)\\b" + } + ] + }, + "hlsl-embedded": { "patterns": [ { "include": "source.hlsl" @@ -154,22 +201,6 @@ "match": "\\b(SurfaceOutputStandardSpecular|SurfaceOutputStandard|SurfaceOutput|Input)\\b" } ] - }, - { - "name": "string.quoted.double.shaderlab", - "begin": "\"", - "end": "\"" - } - ], - "repository": { - "numbers": { - "patterns": [ - { - "name": "constant.numeric.shaderlab", - "match": "\\b([0-9]+\\.?[0-9]*)\\b" - } - ] } - }, - "version": "https://github.com/tgjones/shaders-tmLanguage/commit/cd1ef40f549f9ce2b9e6b73498688de114a85382" + } } \ No newline at end of file diff --git a/extensions/shaderlab/test/colorize-results/test_shader.json b/extensions/shaderlab/test/colorize-results/test_shader.json index 2769b1e9713d8..7f731af089fd2 100644 --- a/extensions/shaderlab/test/colorize-results/test_shader.json +++ b/extensions/shaderlab/test/colorize-results/test_shader.json @@ -95,7 +95,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -238,7 +238,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -293,7 +293,7 @@ "light_plus": "support.variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.variable: #9CDCFE" } }, { @@ -359,7 +359,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -381,7 +381,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -425,7 +425,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -535,7 +535,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { diff --git a/extensions/shellscript/.vscodeignore b/extensions/shellscript/.vscodeignore new file mode 100644 index 0000000000000..77ab386fc7df4 --- /dev/null +++ b/extensions/shellscript/.vscodeignore @@ -0,0 +1 @@ +test/** \ No newline at end of file diff --git a/extensions/shellscript/syntaxes/Shell-Unix-Bash.tmLanguage.json b/extensions/shellscript/syntaxes/Shell-Unix-Bash.tmLanguage.json index 21055f9d66b20..1ac065388d8e0 100644 --- a/extensions/shellscript/syntaxes/Shell-Unix-Bash.tmLanguage.json +++ b/extensions/shellscript/syntaxes/Shell-Unix-Bash.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/shellscript.tmbundle/blob/master/Syntaxes/Shell-Unix-Bash.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." + ], "fileTypes": [ "sh", "bash", @@ -1237,6 +1242,5 @@ } }, "scopeName": "source.shell", - "uuid": "DDEEA3ED-6B1C-11D9-8B10-000D93589AF6", - "version": "https://github.com/textmate/shellscript.tmbundle/commit/ba95d7b742caef130911d878f42f66bdd80181e4" + "uuid": "DDEEA3ED-6B1C-11D9-8B10-000D93589AF6" } \ No newline at end of file diff --git a/extensions/shellscript/test/colorize-results/test_sh.json b/extensions/shellscript/test/colorize-results/test_sh.json index 93acd4ac00c8e..3bb5e394f1e9f 100644 --- a/extensions/shellscript/test/colorize-results/test_sh.json +++ b/extensions/shellscript/test/colorize-results/test_sh.json @@ -29,7 +29,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -84,7 +84,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -95,7 +95,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -238,7 +238,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -260,7 +260,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -337,7 +337,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -348,7 +348,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -458,7 +458,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -491,7 +491,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -502,7 +502,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -557,7 +557,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -590,7 +590,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -601,7 +601,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -623,7 +623,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -634,7 +634,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -656,7 +656,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -678,7 +678,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -821,7 +821,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -832,7 +832,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -887,7 +887,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -975,7 +975,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -986,7 +986,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1030,7 +1030,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1151,7 +1151,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1206,7 +1206,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1228,7 +1228,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1239,7 +1239,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1294,7 +1294,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1448,7 +1448,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1503,7 +1503,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1514,7 +1514,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1657,7 +1657,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1679,7 +1679,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1701,7 +1701,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1734,7 +1734,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1745,7 +1745,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1778,7 +1778,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1800,7 +1800,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1822,7 +1822,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1855,7 +1855,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1866,7 +1866,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1899,7 +1899,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1943,7 +1943,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1954,7 +1954,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/sql/.vscodeignore b/extensions/sql/.vscodeignore new file mode 100644 index 0000000000000..77ab386fc7df4 --- /dev/null +++ b/extensions/sql/.vscodeignore @@ -0,0 +1 @@ +test/** \ No newline at end of file diff --git a/extensions/sql/test/colorize-results/test_sql.json b/extensions/sql/test/colorize-results/test_sql.json index a17bd7e32f7f3..7b133d4de64bb 100644 --- a/extensions/sql/test/colorize-results/test_sql.json +++ b/extensions/sql/test/colorize-results/test_sql.json @@ -51,7 +51,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { diff --git a/extensions/swift/.vscodeignore b/extensions/swift/.vscodeignore new file mode 100644 index 0000000000000..77ab386fc7df4 --- /dev/null +++ b/extensions/swift/.vscodeignore @@ -0,0 +1 @@ +test/** \ No newline at end of file diff --git a/extensions/swift/package.json b/extensions/swift/package.json index b8f262b4cff26..a9139a22a6d6c 100644 --- a/extensions/swift/package.json +++ b/extensions/swift/package.json @@ -3,6 +3,9 @@ "version": "0.1.0", "publisher": "vscode", "engines": { "vscode": "*" }, + "scripts": { + "update-grammar": "node ../../build/npm/update-grammar.js freebroccolo/atom-language-swift grammars/swift.cson ./syntaxes/swift.tmLanguage.json" + }, "contributes": { "languages": [{ "id": "swift", @@ -13,7 +16,7 @@ "grammars": [{ "language": "swift", "scopeName": "source.swift", - "path": "./syntaxes/swift.json" + "path": "./syntaxes/swift.tmLanguage.json" }], "snippets": [{ "language": "swift", diff --git a/extensions/swift/syntaxes/swift.json b/extensions/swift/syntaxes/swift.json deleted file mode 100644 index ffd875717c659..0000000000000 --- a/extensions/swift/syntaxes/swift.json +++ /dev/null @@ -1,257 +0,0 @@ -{ - "scopeName": "source.swift", - "fileTypes": [ - "swift" - ], - "name": "Swift", - "firstLineMatch": "^#!\\s*/.*\\bswift", - "patterns": [ - { - "name": "keyword.declaration.swift", - "match": "\\b(class|deinit|enum|extension|import|init|inout|internal|let|operator|private|protocol|public|static|struct|subscript|typealias|var)\\b" - }, - { - "name": "keyword.statement.swift", - "match": "\\b(break|case|continue|default|defer|do|else|fallthrough|for|guard|if|in|repeat|return|switch|where|while)\\b" - }, - { - "name": "keyword.expressions-and-types.swift", - "match": "\\b(as|catch|dynamicType|false|is|nil|rethrows|super|self|Self|throw|throws|true|try|__COLUMN__|__FILE__|__FUNCTION__|__LINE__)\\b" - }, - { - "name": "keyword.patterns.swift", - "match": "\\b(_)\\b" - }, - { - "name": "keyword.primitive-datatypes.swift", - "match": "\\b(Int|UInt|String|Bool|Character|Optional|Float|Double)\\b" - }, - { - "name": "keyword.reserved.swift", - "match": "\\b(associativity|convenience|dynamic|didSet|final|get|infix|lazy|left|mutating|none|nonmutating|optional|override|postfix|precedence|prefix|Protocol|required|right|set|Type|unowned|weak|willSet)\\b" - }, - { - "include": "#comment" - }, - { - "include": "#literal" - }, - { - "include": "#function" - }, - { - "include": "#operator" - }, - { - "include": "#attribute" - } - ], - "repository": { - "comment": { - "patterns": [ - { - "name": "comment.block.swift", - "begin": "/\\*", - "beginCaptures": { - "0": { - "name": "punctuation.definition.comment.begin.swift" - } - }, - "end": "\\*/", - "endCaptures": { - "0": { - "name": "punctuation.definition.comment.end.swift" - } - }, - "patterns": [ - { - "include": "#comment" - } - ] - }, - { - "begin": "(^[ \\t]+)?(?=//)", - "beginCaptures": { - "1": { - "name": "punctuation.whitespace.comment.leading.swift" - } - }, - "end": "(?!\\G)", - "patterns": [ - { - "name": "comment.line.double-slash.swift", - "begin": "//", - "beginCaptures": { - "0": { - "name": "punctuation.definition.comment.swift" - } - }, - "end": "\\n", - "patterns": [ - { - "name": "punctuation.separator.continuation.swift", - "match": "(?>\\\\\\s*\\n)" - } - ] - } - ] - } - ] - }, - "escaped-char": { - "patterns": [ - { - "name": "constant.character.escape.swift", - "match": "\\\\[0\\\\tnr\"']" - }, - { - "name": "constant.character.escape.swift", - "match": "\\\\(x\\h{2}|u\\h{4}|U\\h{8})" - }, - { - "name": "invalid.illegal.constant.character.escape.swift", - "match": "\\\\[^uxU]" - } - ] - }, - "identifier": { - "match": "(?x) (? \\g \\g? | ` \\g \\g? ` ){0} (? [ a-z A-Z ] | [ \\u00A8 \\u00AA \\u00AD \\u00AF \\u00B2-\\u00B5 \\u00B7-\\u00BA ] | [ \\u00BC-\\u00BE \\u00C0-\\u00D6 \\u00D8-\\u00F6 \\u00F8-\\u00FF ] | [ \\u0100-\\u02FF \\u0370-\\u167F \\u1681-\\u180D \\u180F-\\u1DBF ] | [ \\u1E00-\\u1FFF ] | [ \\u200B-\\u200D \\u202A-\\u202E \\u203F-\\u2040 \\u2054 \\u2060-\\u206F ] | [ \\u2070-\\u20CF \\u2100-\\u218F \\u2460-\\u24FF \\u2776-\\u2793 ] | [ \\u2C00-\\u2DFF \\u2E80-\\u2FFF ] | [ \\u3004-\\u3007 \\u3021-\\u302F \\u3031-\\u303F \\u3040-\\uD7FF ] | [ \\uF900-\\uFD3D \\uFD40-\\uFDCF \\uFDF0-\\uFE1F \\uFE30-\\uFE44 ] | [ \\uFE47-\\uFFFD ] | [ \\u10000-\\u1FFFD \\u20000-\\u2FFFD \\u30000-\\u3FFFD \\u40000-\\u4FFFD ] | [ \\u50000-\\u5FFFD \\u60000-\\u6FFFD \\u70000-\\u7FFFD \\u80000-\\u8FFFD ] | [ \\u90000-\\u9FFFD \\uA0000-\\uAFFFD \\uB0000-\\uBFFFD \\uC0000-\\uCFFFD ] | [ \\uD0000-\\uDFFFD \\uE0000-\\uEFFFD ] ){0} (? \\d | [ \\u0300-\\u036F \\u1DC0-\\u1DFF \\u20D0-\\u20FF \\uFE20-\\uFE2F ] | \\g ){0} (? \\g \\g? ){0} (? (?) \\$ \\d+ (?!\\g) (?# FIXME) ){0} \\g | \\g", - "captures": { - "5": { - "name": "variable.other.positional.swift" - } - } - }, - "literal": { - "patterns": [ - { - "include": "#literal-number" - }, - { - "include": "#literal-string" - }, - { - "include": "#literal-boolean" - } - ] - }, - "literal-number": { - "name": "constant.numeric.swift", - "match": "(?x) (?### INTEGER ###) (? \\g | \\g | \\g | \\g ){0} (?### BINARY ###) (? 0b \\g \\g? ){0} (? [0-1] ){0} (? \\g | _ ){0} (? \\g \\g? ){0} (?### OCTAL ###) (? 0o \\g \\g? ){0} (? [0-7] ){0} (? \\g | _ ){0} (? \\g \\g? ){0} (?### DECIMAL ###) (? \\g \\g? ){0} (? \\d ){0} (? \\g | _ ){0} (? \\g \\g? ){0} (?### HEXADECIMAL ###) (? 0x \\g \\g? ){0} (? \\h ){0} (? \\g | _ ){0} (? \\g \\g? ){0} (?### FLOATING POINT ###) (? \\g \\g? \\g? | \\g \\g? \\g ){0} (? \\. \\g ){0} (? \\g \\g? \\g ){0} (? \\. \\g? ){0} (? \\g \\g? \\g ){0} (? [eE] ){0} (? [pP] ){0} (? [+-] ){0} (?!0[box]) \\g | \\g" - }, - "literal-string": { - "name": "string.quoted.double.swift", - "begin": "\"", - "end": "\"", - "beginCaptures": { - "0": { - "name": "punctuation.definition.string.begin.swift" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.definition.string.end.swift" - } - }, - "patterns": [ - { - "include": "#quoted-text" - } - ] - }, - "literal-boolean": { - "match": "\\b(true|false)\\b(?![?!])", - "name": "constant.language.boolean.swift" - }, - "operator": { - "patterns": [ - { - "include": "#operator-character" - } - ] - }, - "operator-character": { - "name": "keyword.operator.swift", - "match": "[\\/=\\-+!*%<>&|^~.]" - }, - "quoted-text": { - "patterns": [ - { - "name": "meta.embedded.line.swift", - "contentName": "source.swift", - "begin": "\\\\\\(", - "end": "\\)", - "beginCaptures": { - "0": { - "name": "punctuation.section.embedded.begin.swift" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.section.embedded.end.swift" - } - }, - "patterns": [ - { - "include": "$self" - } - ] - }, - { - "include": "#escaped-char" - } - ] - }, - "function": { - "name": "meta.function.swift", - "begin": "(func) \\s*", - "end": "(?=\\{|#)|;|$", - "beginCaptures": { - "1": { - "name": "storage.type.function.swift" - } - }, - "comment": "match regular function like: func myFunc(...)", - "patterns": [ - { - "begin": "([a-zA-Z_0-9]+)\\s*(\\()", - "beginCaptures": { - "1": { - "name": "entity.name.function.swift" - }, - "2": { - "name": "punctuation.definition.parameters.begin.swift" - } - }, - "comment": "match regular function like: func myFunc(...)", - "end": "(\\))", - "endCaptures": { - "1": { - "name": "punctuation.definition.parameters.end.swift" - } - } - }, - { - "name": "meta.return-type.swift", - "match": "((->)\\s*([^\\{]+))", - "captures": { - "2": { - "name": "punctuation.function.swift" - }, - "3": { - "name": "entity.name.type.class.swift" - } - } - } - ] - }, - "whitespace": { - "match": "(?x) [ \\u0020 (?# space) \\u000A (?# line-feed) \\u000D (?# carriage-return) \\u0009 (?# horizontal-tab) \\u000B (?# vertical-tab) \\u000C (?# form-feed) \\u0000 (?# null) ]" - }, - "attribute": { - "name": "storage.type.attribute.swift", - "begin": "@", - "end": " " - } - } -} \ No newline at end of file diff --git a/extensions/swift/syntaxes/swift.tmLanguage.json b/extensions/swift/syntaxes/swift.tmLanguage.json new file mode 100644 index 0000000000000..ea83040609c7a --- /dev/null +++ b/extensions/swift/syntaxes/swift.tmLanguage.json @@ -0,0 +1,221 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/freebroccolo/atom-language-swift/blob/master/grammars/swift.cson", + "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." + ], + "scopeName": "source.swift", + "fileTypes": [ + "swift" + ], + "name": "Swift", + "firstLineMatch": "^#!\\s*/.*\\bswift", + "patterns": [ + { + "name": "keyword.others.swift", + "match": "^\\s*(#if|#else|#endif|#elseif|@warn_unused_result|@discardableResult|@IBAction|@IBOutlet|@IBDesignable|@IBInspectable)\\b" + }, + { + "name": "keyword.declaration.swift", + "match": "\\b(deinit|import|init|subscript)\\b" + }, + { + "name": "storage.type.swift", + "match": "\\b(precedencegroup|class|struct|enum|extension|protocol|let|var|typealias)\\b" + }, + { + "name": "storage.modifier.swift", + "match": "\\b(final|internal|private|fileprivate|public|open|static|required|convenience)\\b" + }, + { + "name": "keyword.statement.swift", + "match": "\\b(try|catch|repeat|break|case|continue|default|do|else|fallthrough|if|in|for|return|switch|where|while|guard|defer)\\b" + }, + { + "name": "support.type.swift", + "match": "(?x) \\b(Character|U?Int|U?Int(8|16|32|64) |Float|Double|Float(32|64)|Bool|String|Date|Data|URL |(double|float)[234]|(double|float)[234]x[234] |Any |AnyObject |Error |Equatable |Hashable |Comparable |CustomDebugStringConvertible |CustomStringConvertible |OptionSet |ManagedBuffer |ManagedBufferPointer |BitwiseOperations |CountedSet |Counter |Directions |ExpressibleByArrayLiteral |ExpressibleByBooleanLiteral |ExpressibleByDictionaryLiteral |ExpressibleByExtendedGraphemeClusterLiteral |ExpressibleByFloatLitera |ExpressibleByIntegerLiteral |ExpressibleByNilLiteral |ExpressibleByStringInterpolation |ExpressibleByStringLiteral |ExpressibleByUnicodeScalarLiteral |OrderedSet |PaperSize |RawRepresentable |(UI|NS|CF|CG)[A-Z][a-zA-Z0-9]+ |Stream |(In|Out)putStream |FileManager |Array |Unsafe[a-zA-Z]*Pointer |Bundle |Jex)\\b" + }, + { + "name": "support.function.swift", + "match": "\\b(assert|assertionFailure|print)\\b" + }, + { + "name": "keyword.expressions-and-types.swift", + "match": "\\b(as|dynamicType|is|new|super|self|Self|Type|#column|#file|#function|#line)\\b" + }, + { + "name": "keyword.reserved.swift", + "match": "\\b(associativity|didSet|get|infix|inout|left|mutating|nonmutating|operator|override|postfix|precedence|prefix|right|set|unowned|unowned(safe)|unowned(unsafe)|weak|willSet)\\b" + }, + { + "name": "constant.language.swift", + "match": "\\b(true|false|nil|none)\\b" + }, + { + "name": "entity.name.function.swift", + "match": "\\bfunc\\s+([^\\t\\n\\x20\\x28]+)" + }, + { + "include": "#comment" + }, + { + "include": "#literal" + }, + { + "include": "#operator" + } + ], + "repository": { + "comment": { + "patterns": [ + { + "name": "comment.block.swift", + "begin": "/\\*", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.begin.swift" + } + }, + "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.end.swift" + } + }, + "patterns": [ + { + "include": "#comment" + } + ] + }, + { + "begin": "(^[ \\t]+)?(?=//)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.swift" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "name": "comment.line.double-slash.swift", + "begin": "//", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.swift" + } + }, + "end": "\\n", + "patterns": [ + { + "name": "punctuation.separator.continuation.swift", + "match": "(?>\\\\\\s*\\n)" + } + ] + } + ] + } + ] + }, + "escaped-char": { + "patterns": [ + { + "name": "constant.character.escape.swift", + "match": "\\\\[0\\\\tnr\"']" + }, + { + "name": "constant.character.escape.swift", + "match": "\\\\(x\\h{2}|u\\h{4}|U\\h{8})" + }, + { + "name": "invalid.illegal.constant.character.escape.swift", + "match": "\\\\[^uxU]" + } + ] + }, + "identifier": { + "match": "(?x) (? \\g \\g? | ` \\g \\g? ` ){0} (? [ a-z A-Z ] | [ \\u00A8 \\u00AA \\u00AD \\u00AF \\u00B2-\\u00B5 \\u00B7-\\u00BA ] | [ \\u00BC-\\u00BE \\u00C0-\\u00D6 \\u00D8-\\u00F6 \\u00F8-\\u00FF ] | [ \\u0100-\\u02FF \\u0370-\\u167F \\u1681-\\u180D \\u180F-\\u1DBF ] | [ \\u1E00-\\u1FFF ] | [ \\u200B-\\u200D \\u202A-\\u202E \\u203F-\\u2040 \\u2054 \\u2060-\\u206F ] | [ \\u2070-\\u20CF \\u2100-\\u218F \\u2460-\\u24FF \\u2776-\\u2793 ] | [ \\u2C00-\\u2DFF \\u2E80-\\u2FFF ] | [ \\u3004-\\u3007 \\u3021-\\u302F \\u3031-\\u303F \\u3040-\\uD7FF ] | [ \\uF900-\\uFD3D \\uFD40-\\uFDCF \\uFDF0-\\uFE1F \\uFE30-\\uFE44 ] | [ \\uFE47-\\uFFFD ] | [ \\u10000-\\u1FFFD \\u20000-\\u2FFFD \\u30000-\\u3FFFD \\u40000-\\u4FFFD ] | [ \\u50000-\\u5FFFD \\u60000-\\u6FFFD \\u70000-\\u7FFFD \\u80000-\\u8FFFD ] | [ \\u90000-\\u9FFFD \\uA0000-\\uAFFFD \\uB0000-\\uBFFFD \\uC0000-\\uCFFFD ] | [ \\uD0000-\\uDFFFD \\uE0000-\\uEFFFD ] ){0} (? \\d | [ \\u0300-\\u036F \\u1DC0-\\u1DFF \\u20D0-\\u20FF \\uFE20-\\uFE2F ] | \\g ){0} (? \\g \\g? ){0} (? (?) \\$ \\d+ (?!\\g) (?# FIXME) ){0} \\g | \\g", + "captures": { + "5": { + "name": "variable.other.positional.swift" + } + } + }, + "literal": { + "patterns": [ + { + "include": "#literal-number" + }, + { + "include": "#literal-string" + } + ] + }, + "literal-number": { + "name": "constant.numeric.swift", + "match": "(?x) (?### INTEGER ###) (? \\g | \\g | \\g | \\g ){0} (?### BINARY ###) (? \\b 0b \\g \\g? \\b ){0} (? [0-1] ){0} (? \\g | _ ){0} (? \\g \\g? ){0} (?### OCTAL ###) (? \\b 0o \\g \\g? \\b ){0} (? [0-7] ){0} (? \\g | _ ){0} (? \\g \\g? ){0} (?### DECIMAL ###) (? \\b \\g \\g? \\b ){0} (? \\d ){0} (? \\g | _ ){0} (? \\g \\g? ){0} (?### HEXADECIMAL ###) (? \\b 0x \\g \\g? \\b ){0} (? \\h ){0} (? \\g | _ ){0} (? \\g \\g? ){0} (?### FLOATING POINT ###) (? \\b \\g \\g? \\g? \\b | \\b \\g \\g? \\g \\b ){0} (? \\. \\g ){0} (? \\g \\g? \\g ){0} (? \\. \\g? ){0} (? \\g \\g? \\g ){0} (? [eE] ){0} (? [pP] ){0} (? [+-] ){0} (?!0[box]) \\g | \\g" + }, + "literal-string": { + "name": "string.quoted.double.swift", + "begin": "\"", + "end": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.swift" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.swift" + } + }, + "patterns": [ + { + "include": "#quoted-text" + } + ] + }, + "operator": { + "patterns": [ + { + "include": "#operator-character" + } + ] + }, + "operator-character": { + "name": "keyword.operator.swift", + "match": "[\\/=\\-+!*%<>&|^~,\\?:\\[\\]]" + }, + "quoted-text": { + "patterns": [ + { + "name": "meta.embedded.line.swift", + "contentName": "source.swift", + "begin": "\\\\\\(", + "end": "\\)", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.swift" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.swift" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "include": "#escaped-char" + } + ] + }, + "whitespace": { + "match": "(?x) [ \\u0020 (?# space) \\u000A (?# line-feed) \\u000D (?# carriage-return) \\u0009 (?# horizontal-tab) \\u000B (?# vertical-tab) \\u000C (?# form-feed) \\u0000 (?# null) ]" + } + } +} \ No newline at end of file diff --git a/extensions/swift/test/colorize-results/test_swift.json b/extensions/swift/test/colorize-results/test_swift.json index 2da06bcd479f2..cf3e249352288 100644 --- a/extensions/swift/test/colorize-results/test_swift.json +++ b/extensions/swift/test/colorize-results/test_swift.json @@ -1,13 +1,13 @@ [ { "c": "var", - "t": "source.swift keyword.declaration.swift", + "t": "source.swift storage.type.swift", "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" + "dark_plus": "storage.type: #569CD6", + "light_plus": "storage.type: #0000FF", + "dark_vs": "storage.type: #569CD6", + "light_vs": "storage.type: #0000FF", + "hc_black": "storage.type: #569CD6" } }, { @@ -56,13 +56,13 @@ }, { "c": "var", - "t": "source.swift keyword.declaration.swift", + "t": "source.swift storage.type.swift", "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" + "dark_plus": "storage.type: #569CD6", + "light_plus": "storage.type: #0000FF", + "dark_vs": "storage.type: #569CD6", + "light_vs": "storage.type: #0000FF", + "hc_black": "storage.type: #569CD6" } }, { @@ -132,19 +132,19 @@ } }, { - "c": "func", - "t": "source.swift meta.function.swift storage.type.function.swift", + "c": "func hasAnyMatches", + "t": "source.swift entity.name.function.swift", "r": { - "dark_plus": "storage.type: #569CD6", - "light_plus": "storage.type: #0000FF", - "dark_vs": "storage.type: #569CD6", - "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "dark_plus": "entity.name.function: #DCDCAA", + "light_plus": "entity.name.function: #795E26", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.function: #DCDCAA" } }, { - "c": " ", - "t": "source.swift meta.function.swift", + "c": "(list", + "t": "source.swift", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -154,19 +154,63 @@ } }, { - "c": "hasAnyMatches", - "t": "source.swift meta.function.swift entity.name.function.swift", + "c": ":", + "t": "source.swift keyword.operator.swift", "r": { - "dark_plus": "entity.name.function: #DCDCAA", - "light_plus": "entity.name.function: #795E26", + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, + { + "c": " ", + "t": "source.swift", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", "hc_black": "default: #FFFFFF" } }, { - "c": "(", - "t": "source.swift meta.function.swift punctuation.definition.parameters.begin.swift", + "c": "[", + "t": "source.swift keyword.operator.swift", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, + { + "c": "Int", + "t": "source.swift support.type.swift", + "r": { + "dark_plus": "support.type: #4EC9B0", + "light_plus": "support.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "support.type: #4EC9B0" + } + }, + { + "c": "],", + "t": "source.swift keyword.operator.swift", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, + { + "c": " condition", + "t": "source.swift", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -176,8 +220,19 @@ } }, { - "c": "list: [Int], condition: (Int", - "t": "source.swift meta.function.swift", + "c": ":", + "t": "source.swift keyword.operator.swift", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, + { + "c": " (", + "t": "source.swift", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -187,8 +242,19 @@ } }, { - "c": ")", - "t": "source.swift meta.function.swift punctuation.definition.parameters.end.swift", + "c": "Int", + "t": "source.swift support.type.swift", + "r": { + "dark_plus": "support.type: #4EC9B0", + "light_plus": "support.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "support.type: #4EC9B0" + } + }, + { + "c": ") ", + "t": "source.swift", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -197,9 +263,20 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "->", + "t": "source.swift keyword.operator.swift", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, { "c": " ", - "t": "source.swift meta.function.swift", + "t": "source.swift", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -209,40 +286,62 @@ } }, { - "c": "->", - "t": "source.swift meta.function.swift meta.return-type.swift punctuation.function.swift", + "c": "Bool", + "t": "source.swift support.type.swift", "r": { - "dark_plus": "meta.return-type: #4EC9B0", - "light_plus": "meta.return-type: #267F99", + "dark_plus": "support.type: #4EC9B0", + "light_plus": "support.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "support.type: #4EC9B0" + } + }, + { + "c": ") ", + "t": "source.swift", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", "hc_black": "default: #FFFFFF" } }, + { + "c": "->", + "t": "source.swift keyword.operator.swift", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, { "c": " ", - "t": "source.swift meta.function.swift meta.return-type.swift", + "t": "source.swift", "r": { - "dark_plus": "meta.return-type: #4EC9B0", - "light_plus": "meta.return-type: #267F99", + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", "hc_black": "default: #FFFFFF" } }, { - "c": "Bool) -> Bool ", - "t": "source.swift meta.function.swift meta.return-type.swift entity.name.type.class.swift", + "c": "Bool", + "t": "source.swift support.type.swift", "r": { - "dark_plus": "entity.name.type: #4EC9B0", - "light_plus": "entity.name.type: #267F99", + "dark_plus": "support.type: #4EC9B0", + "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { - "c": "{", + "c": " {", "t": "source.swift", "r": { "dark_plus": "default: #D4D4D4", @@ -375,13 +474,13 @@ }, { "c": "true", - "t": "source.swift keyword.expressions-and-types.swift", + "t": "source.swift constant.language.swift", "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" + "dark_plus": "constant.language: #569CD6", + "light_plus": "constant.language: #0000FF", + "dark_vs": "constant.language: #569CD6", + "light_vs": "constant.language: #0000FF", + "hc_black": "constant.language: #569CD6" } }, { @@ -441,13 +540,13 @@ }, { "c": "false", - "t": "source.swift keyword.expressions-and-types.swift", + "t": "source.swift constant.language.swift", "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" + "dark_plus": "constant.language: #569CD6", + "light_plus": "constant.language: #0000FF", + "dark_vs": "constant.language: #569CD6", + "light_vs": "constant.language: #0000FF", + "hc_black": "constant.language: #569CD6" } }, { diff --git a/extensions/theme-abyss/themes/abyss-color-theme.json b/extensions/theme-abyss/themes/abyss-color-theme.json index 85f1403140712..9901ee0d6b862 100644 --- a/extensions/theme-abyss/themes/abyss-color-theme.json +++ b/extensions/theme-abyss/themes/abyss-color-theme.json @@ -254,174 +254,181 @@ // Base // "foreground": "", "focusBorder": "#596F99", + // "contrastActiveBorder": "", + // "contrastBorder": "", - // "widgetShadow": "", + // "widget.shadow": "", - "inputBoxBackground": "#181f2f", - // "inputBoxBorder": "", - // "inputBoxForeground": "", - "inputBoxActiveOptionBorder": "#1D4A87", - "inputValidationInfoBorder": "#384078", - "inputValidationInfoBackground": "#051336", - "inputValidationWarningBackground": "#5B7E7A", - "inputValidationWarningBorder": "#5B7E7A", - "inputValidationErrorBackground": "#A22D44", - "inputValidationErrorBorder": "#AB395B", + "input.background": "#181f2f", + // "input.border": "", + // "input.foreground": "", + "inputOption.activeBorder": "#1D4A87", + "inputValidation.infoBorder": "#384078", + "inputValidation.infoBackground": "#051336", + "inputValidation.warningBackground": "#5B7E7A", + "inputValidation.warningBorder": "#5B7E7A", + "inputValidation.errorBackground": "#A22D44", + "inputValidation.errorBorder": "#AB395B", - // "dropdownBackground": "#181f2f", - // "dropdownForeground": "", - // "dropdownBorder": "", + "badge.background": "#0063a5", + "progressBar.background": "#0063a5", - "buttonBackground": "#455064", - "buttonHoverBackground": "#4A5C6B", - // "buttonForeground": "", + "dropdown.background": "#181f2f", + // "dropdown.foreground": "", + // "dropdown.border": "", - "listFocusAndSelectionBackground": "#08286b", - // "listFocusAndSelectionForeground": "", - "listActiveSelectionBackground": "#011B51", - // "listActiveSelectionForeground": "", - "listFocusBackground": "#08286b", - "listHoverBackground": "#041D52", - "listInactiveSelectionBackground": "#152037", - "listDropBackground": "#041D52", - // "listHighlightForeground": "", + "button.background": "#2B3C5D", + // "button.foreground": "", - "scrollbarShadow": "#515E91AA", - "scrollbarSliderActiveBackground": "#3B3F5188", - "scrollbarSliderBackground": "#1F223088", - "scrollbarSliderHoverBackground": "#3B3F5188", + "list.activeSelectionBackground": "#08286b", + // "list.activeSelectionForeground": "", + "list.focusBackground": "#08286b", + "list.hoverBackground": "#061940", + "list.inactiveSelectionBackground": "#152037", + "list.dropBackground": "#041D52", + "list.highlightForeground": "#0063a5", + + "scrollbar.shadow": "#515E91AA", + "scrollbarSlider.activeBackground": "#3B3F5188", + "scrollbarSlider.background": "#1F2230AA", + "scrollbarSlider.hoverBackground": "#3B3F5188", // Editor - "editorBackground": "#000c18", - "editorForeground": "#6688cc", - "editorWidgetBackground": "#262641", - "editorCursor": "#ddbb88", - "editorWhitespaces": "#103050", - "editorLineHighlight": "#082050", - "editorSelection": "#770811", - "editorIndentGuides": "#002952", - "editorHoverBackground": "#000c38", - "editorHoverBorder": "#004c18", - "editorLineNumbers": "#406385", - "editorMarkerNavigationBackground": "#060621", - "editorMarkerNavigationError": "#FF0000", - "editorMarkerNavigationWarning": "#00FF00", - "editorActiveLinkForeground": "#0063a5", - // "editorFindMatch": "", - "editorFindMatchHighlight": "#eeeeee44", - // "editorFindRangeHighlight": "", - // "editorHoverHighlight": "", - // "editorInactiveSelection": "", - // "editorLineHighlightBorder": "", - "editorLinkForeground": "#0063a5", - // "editorRangeHighlight": "", - // "editorSelectionHighlight": "", - // "editorSuggestWidgetBackground": "", - // "editorSuggestWidgetBorder": "", - // "editorWordHighlight": "", - // "editorWordHighlightStrong": "", + "editor.background": "#000c18", + // "editor.foreground": "#6688cc", + "editorWidget.background": "#262641", + "editorCursor.foreground": "#ddbb88", + "editorWhitespace.foreground": "#103050", + "editor.lineHighlightBackground": "#082050", + "editor.selectionBackground": "#770811", + "editorIndentGuide.background": "#002952", + "editorHoverWidget.background": "#000c38", + "editorHoverWidget.border": "#004c18", + "editorLineNumber.foreground": "#406385", + "editorMarkerNavigation.background": "#060621", + "editorMarkerNavigationError.background": "#AB395B", + "editorMarkerNavigationWarning.background": "#5B7E7A", + "editorLink.activeForeground": "#0063a5", + // "editor.findMatchBackground": "", + "editor.findMatchHighlightBackground": "#eeeeee44", + // "editor.findRangeHighlightBackground": "", + // "editor.hoverHighlightBackground": "", + // "editor.inactiveSelectionBackground": "", + // "editor.lineHighlightBorder": "", + // "editor.rangeHighlightBackground": "", + // "editor.selectionHighlightBackground": "", + // "editor.wordHighlightBackground": "", + // "editor.wordHighlightStrongBackground": "", + + // Editor: Suggest Widget + // "editorSuggestWidget.background": "", + // "editorSuggestWidget.border": "", + // "editorSuggestWidget.foreground": "", + // "editorSuggestWidget.highlightForeground": "", + // "editorSuggestWidget.selectedBackground": "", // Editor: Peek View - "peekViewResultsBackground": "#060621", - // "peekViewResultsMatchForeground": "", - // "peekViewResultsSelectionBackground": "", - // "peekViewResultsSelectionForeground": "", - "peekViewEditorBackground": "#10192c", - "peekViewTitleBackground": "#10192c", - "peekViewBorder": "#2b2b4a", - "peekViewEditorMatchHighlight": "#eeeeee33", - // "peekViewResultsFileForeground": "", - "peekViewResultsMatchHighlight": "#eeeeee44", - // "peekViewTitleForeground": "", - // "peekViewTitleInfoForeground": "", + "peekViewResult.background": "#060621", + // "peekViewResult.lineForeground": "", + // "peekViewResult.selectionBackground": "", + // "peekViewResult.selectionForeground": "", + "peekViewEditor.background": "#10192c", + "peekViewTitle.background": "#10192c", + "peekView.border": "#2b2b4a", + "peekViewEditor.matchHighlightBackground": "#eeeeee33", + // "peekViewResult.fileForeground": "", + "peekViewResult.matchHighlightBackground": "#eeeeee44", + // "peekViewTitleLabel.foreground": "", + // "peekViewTitleDescription.foreground": "", // Editor: Diff - "diffEditorInserted": "#31958A55", - // "diffEditorInsertedOutline": "", - "diffEditorRemoved": "#892F4688", - // "diffEditorRemovedOutline": "", + "diffEditor.insertedTextBackground": "#31958A55", + // "diffEditor.insertedTextBorder": "", + "diffEditor.removedTextBackground": "#892F4688", + // "diffEditor.removedTextBorder": "", // Workbench: Title - "titleBarActiveBackground": "#10192c", - // "titleBarActiveForeground": "", - "titleBarInactiveBackground": "#10192caa", - // "titleBarInactiveForeground": "", + "titleBar.activeBackground": "#10192c", + // "titleBar.activeForeground": "", + // "titleBar.inactiveBackground": "", + // "titleBar.inactiveForeground": "", // Workbench: Editors - // "editorGroupHeaderBackground": "", - "editorGroupBorder": "#2b2b4a", - "editorGroupBackground": "#1c1c2a", - "editorMasterDetailsBorder": "#10192c", - "editorDragAndDropBackground": "#25375daa", + // "editorGroupHeader.noTabsBackground": "", + "editorGroup.border": "#2b2b4a", + "editorGroup.background": "#1c1c2a", + "editorGroup.dropBackground": "#25375daa", + "editorGroupHeader.tabsBackground": "#1c1c2a", // Workbench: Tabs - "tabsContainerBackground": "#1c1c2a", - "tabBorder": "#2b2b4a", - // "tabActiveBackground": "", - "tabInactiveBackground": "#10192c", - // "tabActiveEditorGroupActiveForeground": "", - // "tabActiveEditorGroupInactiveForeground": "", - // "tabInactiveEditorGroupActiveForeground": "", - // "tabInactiveEditorGroupInactiveForeground": "", + "tab.border": "#2b2b4a", + // "tab.activeBackground": "", + "tab.inactiveBackground": "#10192c", + // "tab.activeForeground": "", + // "tab.inactiveForeground": "", // Workbench: Activity Bar - "activityBarBackground": "#051336", - // "activityBarForeground": "", - "activityBarBadgeBackground": "#0063a5", - // "activityBarBadgeForeground": "", - "activityBarDragAndDropBackground": "#25375daa", + "activityBar.background": "#051336", + // "activityBar.foreground": "", + // "activityBarBadge.background": "", + // "activityBarBadge.foreground": "", + // "activityBar.dropBackground": "", // Workbench: Panel - // "panelBackground": "", - "panelBorder": "#2b2b4a", - // "panelActiveTitleBorder": "", - // "panelActiveTitleForeground": "", - // "panelInactiveTitleForeground": "", + // "panel.background": "", + "panel.border": "#2b2b4a", + // "panelTitle.activeBorder": "", + // "panelTitle.activeForeground": "", + // "panelTitle.inactiveForeground": "", // Workbench: Side Bar - "sideBarBackground": "#060621", - // "sideBarTitleForeground": "", - "sideBarSectionHeaderBackground": "#10192c", + "sideBar.background": "#060621", + // "sideBarTitle.foreground": "", + "sideBarSectionHeader.background": "#10192c", // Workbench: Status Bar - "statusBarBackground": "#10192c", - "statusBarNoFolderBackground": "#10192c", - "statusBarDebuggingBackground": "#10192c", - // "statusBarForeground": "", - "statusBarProminentItemBackground": "#0063a5", - "statusBarProminentItemHoverBackground": "#0063a5dd", - "statusBarItemActiveBackground": "#ffffff33", - "statusBarItemHoverBackground": "#ffffff22", + "statusBar.background": "#10192c", + "statusBar.noFolderBackground": "#10192c", + "statusBar.debuggingBackground": "#10192c", + // "statusBar.foreground": "", + "statusBarItem.prominentBackground": "#0063a5", + "statusBarItem.prominentHoverBackground": "#0063a5dd", + // "statusBarItem.activeBackground": "", + // "statusBarItem.hoverBackground": "", // Workbench: Debug - "debugToolBarBackground": "#051336", - "debugExceptionWidgetBackground": "#051336", - // "debugExceptionWidgetBorder": "", + "debugToolBar.background": "#051336", + "debugExceptionWidget.background": "#051336", + "debugExceptionWidget.border": "#AB395B", // Workbench: Notifications - "notificationsBackground": "#051336", - // "notificationsForeground": "", + "notification.background": "#182543", + // "notification.foreground": "", // Workbench: Quick Open - "pickerGroupBorder": "#596F99", - "pickerGroupForeground": "#596F99" + "pickerGroup.border": "#596F99", + "pickerGroup.foreground": "#596F99", + + // Workbench: Extensions + "extensionButton.prominentBackground": "#5f8b3b", + "extensionButton.prominentHoverBackground": "#5f8b3bbb", // Workbench: Terminal - // "terminalAnsiBlack": "", - // "terminalAnsiBlue": "", - // "terminalAnsiBrightBlack": "", - // "terminalAnsiBrightBlue": "", - // "terminalAnsiBrightCyan": "", - // "terminalAnsiBrightGreen": "", - // "terminalAnsiBrightMagenta": "", - // "terminalAnsiBrightRed": "", - // "terminalAnsiBrightWhite": "", - // "terminalAnsiBrightYellow": "", - // "terminalAnsiCyan": "", - // "terminalAnsiGreen": "", - // "terminalAnsiMagenta": "", - // "terminalAnsiRed": "", - // "terminalAnsiWhite": "", - // "terminalAnsiYellow": "" + "terminal.ansiBlack": "#111111", + "terminal.ansiRed": "#ff9da4", + "terminal.ansiGreen": "#d1f1a9", + "terminal.ansiYellow": "#ffeead", + "terminal.ansiBlue": "#bbdaff", + "terminal.ansiMagenta": "#ebbbff", + "terminal.ansiCyan": "#99ffff", + "terminal.ansiWhite": "#cccccc", + "terminal.ansiBrightBlack": "#333333", + "terminal.ansiBrightRed": "#ff7882", + "terminal.ansiBrightGreen": "#b8f171", + "terminal.ansiBrightYellow": "#ffe580", + "terminal.ansiBrightBlue": "#80baff", + "terminal.ansiBrightMagenta": "#d778ff", + "terminal.ansiBrightCyan": "#78ffff", + "terminal.ansiBrightWhite": "#ffffff" } } \ No newline at end of file diff --git a/extensions/theme-defaults/themes/dark_defaults.json b/extensions/theme-defaults/themes/dark_defaults.json index d98ae61bf4f90..e15677c62c867 100644 --- a/extensions/theme-defaults/themes/dark_defaults.json +++ b/extensions/theme-defaults/themes/dark_defaults.json @@ -2,10 +2,13 @@ "$schema": "vscode://schemas/color-theme", "name": "Dark Default Colors", "colors": { - "editorBackground": "#1e1e1e", - "editorForeground": "#D4D4D4", - "editorInactiveSelection": "#3A3D41", - "editorIndentGuides": "#404040", - "editorSelectionHighlight": "#add6ff26" + "editor.background": "#1E1E1E", + "editor.foreground": "#D4D4D4", + "editor.inactiveSelectionBackground": "#3A3D41", + "editorIndentGuide.background": "#404040", + "editor.selectionHighlightBackground": "#ADD6FF26", + "list.dropBackground": "#383B3D", + "activityBarBadge.background": "#007ACC", + "sideBarTitle.foreground": "#BBBBBB" } } \ No newline at end of file diff --git a/extensions/theme-defaults/themes/dark_vs.json b/extensions/theme-defaults/themes/dark_vs.json index 08b4ecfee9b61..02e12514b2649 100644 --- a/extensions/theme-defaults/themes/dark_vs.json +++ b/extensions/theme-defaults/themes/dark_vs.json @@ -246,19 +246,31 @@ "punctuation.definition.template-expression.begin.js", "punctuation.definition.template-expression.begin.ts", "punctuation.definition.template-expression.end.ts", - "punctuation.definition.template-expression.end.js" + "punctuation.definition.template-expression.end.js", + "punctuation.section.embedded.coffee" ], "settings": { "foreground": "#569cd6" } }, + { + "name": "Reset JavaScript string interpolation expression", + "scope": [ + "meta.template.expression.js", + "meta.template.expression.ts" + ], + "settings": { + "foreground": "#d4d4d4" + } + }, { "scope": [ "support.type.vendored.property-name", "support.type.property-name", "variable.css", "variable.scss", - "variable.other.less" + "variable.other.less", + "source.coffee.embedded" ], "settings": { "foreground": "#9cdcfe" @@ -302,8 +314,8 @@ }, { "scope": [ - "punctuation.section.embedded.begin.metatag.php", - "punctuation.section.embedded.end.metatag.php" + "punctuation.section.embedded.begin.php", + "punctuation.section.embedded.end.php" ], "settings": { "foreground": "#569cd6" @@ -325,6 +337,7 @@ "name": "coloring of the Java import and package identifiers", "scope": [ "storage.modifier.import.java", + "variable.language.wildcard.java", "storage.modifier.package.java" ], "settings": { diff --git a/extensions/theme-defaults/themes/hc_black.json b/extensions/theme-defaults/themes/hc_black.json index 4fb65f26e8b33..5cadf6c65cf9c 100644 --- a/extensions/theme-defaults/themes/hc_black.json +++ b/extensions/theme-defaults/themes/hc_black.json @@ -2,310 +2,108 @@ "$schema": "vscode://schemas/color-theme", "name": "Dark High Contrast", "include": "./hc_black_defaults.json", - "settings": [ - { - "settings": { - "foreground": "#FFFFFF", - "background": "#000000" - } - }, - { - "scope": "emphasis", - "settings": { - "fontStyle": "italic" - } - }, - { - "scope": "strong", - "settings": { - "fontStyle": "bold" - } - }, - { - "scope": "meta.diff.header", - "settings": { - "foreground": "#000080" - } - }, - - { - "scope": "comment", - "settings": { - "foreground": "#7ca668" - } - }, - { - "scope": "constant.language", - "settings": { - "foreground": "#569cd6" - } - }, + "colors": { + "selection.background": "#008000", + "editor.selectionBackground": "#FFFFFF" + }, + "tokenColors": [ { + "name": "Function declarations", "scope": [ - "constant.numeric", - "constant.other.color.rgb-value", - "constant.other.rgb-value", - "support.constant.color" + "entity.name.function", + "support.function", + "support.constant.handlebars" ], "settings": { - "foreground": "#b5cea8" - } - }, - { - "scope": "constant.regexp", - "settings": { - "foreground": "#b46695" - } - }, - { - "scope": "entity.name.tag", - "settings": { - "foreground": "#569cd6" - } - }, - { - "scope": "entity.name.tag.css", - "settings": { - "foreground": "#d7ba7d" - } - }, - { - "scope": "entity.other.attribute-name", - "settings": { - "foreground": "#9cdcfe" + "foreground": "#DCDCAA" } }, { + "name": "Types declaration and references", "scope": [ - "entity.other.attribute-name.class.css", - "entity.other.attribute-name.class.mixin.css", - "entity.other.attribute-name.id.css", - "entity.other.attribute-name.parent-selector.css", - "entity.other.attribute-name.pseudo-class.css", - "entity.other.attribute-name.pseudo-element.css", - - "source.css.less entity.other.attribute-name.id", - - "entity.other.attribute-name.attribute.scss", - "entity.other.attribute-name.scss" + "meta.return-type", + "support.class", + "support.type", + "entity.name.type", + "entity.name.class", + "storage.type.cs", + "storage.type.generic.cs", + "storage.type.modifier.cs", + "storage.type.variable.cs", + "storage.type.annotation.java", + "storage.type.generic.java", + "storage.type.java", + "storage.type.object.array.java", + "storage.type.primitive.array.java", + "storage.type.primitive.java", + "storage.type.token.java", + "storage.type.groovy", + "storage.type.annotation.groovy", + "storage.type.parameters.groovy", + "storage.type.generic.groovy", + "storage.type.object.array.groovy", + "storage.type.primitive.array.groovy", + "storage.type.primitive.groovy" ], "settings": { - "foreground": "#d7ba7d" - } - }, - { - "scope": "invalid", - "settings": { - "foreground": "#f44747" - } - }, - { - "scope": "markup.underline", - "settings": { - "fontStyle": "underline" - } - }, - { - "scope": "markup.bold", - "settings": { - "fontStyle": "bold" - } - }, - { - "scope": "markup.heading", - "settings": { - "foreground": "#6796e6" - } - }, - { - "scope": "markup.italic", - "settings": { - "fontStyle": "italic" - } - }, - { - "scope": "markup.inserted", - "settings": { - "foreground": "#b5cea8" - } - }, - { - "scope": "markup.deleted", - "settings": { - "foreground": "#ce9178" - } - }, - { - "scope": "markup.changed", - "settings": { - "foreground": "#569cd6" - } - }, - { - "scope": "meta.selector", - "settings": { - "foreground": "#d7ba7d" + "foreground": "#4EC9B0" } }, { - "name": "brackets of XML/HTML tags", + "name": "Types declaration and references, TS grammar specific", "scope": [ - "punctuation.definition.tag" + "meta.type.cast.expr", + "meta.type.new.expr", + "support.constant.math", + "support.constant.dom", + "support.constant.json", + "entity.other.inherited-class" ], "settings": { - "foreground": "#808080" - } - }, - { - "scope": "meta.preprocessor", - "settings": { - "foreground": "#569cd6" - } - }, - { - "scope": "meta.preprocessor.string", - "settings": { - "foreground": "#ce9178" - } - }, - { - "scope": "meta.preprocessor.numeric", - "settings": { - "foreground": "#b5cea8" - } - }, - { - "scope": "meta.structure.dictionary.key.python", - "settings": { - "foreground": "#9cdcfe" - } - }, - { - "scope": "storage", - "settings": { - "foreground": "#569cd6" - } - }, - { - "scope": "storage.type", - "settings": { - "foreground": "#569cd6" - } - }, - { - "scope": "storage.modifier", - "settings": { - "foreground": "#569cd6" - } - }, - { - "scope": "string", - "settings": { - "foreground": "#ce9178" - } - }, - { - "scope": "string.tag", - "settings": { - "foreground": "#ce9178" - } - }, - { - "scope": "string.value", - "settings": { - "foreground": "#ce9178" + "foreground": "#4EC9B0" } }, { - "scope": "string.regexp", + "name": "Control flow keywords", + "scope": "keyword.control", "settings": { - "foreground": "#d16969" + "foreground": "#C586C0" } }, { - "name": "JavaScript string interpolation ${}", + "name": "Variable and parameter name", "scope": [ - "punctuation.definition.template-expression.begin.js", - "punctuation.definition.template-expression.begin.ts", - "punctuation.definition.template-expression.end.ts", - "punctuation.definition.template-expression.end.js" + "variable", + "meta.definition.variable.name", + "support.variable" ], "settings": { - "foreground": "#569cd6" + "foreground": "#9CDCFE" } }, { + "name": "Object keys, TS grammar specific", "scope": [ - "support.type.vendored.property-name", - "support.type.property-name", - "variable.css", - "variable.scss", - "variable.other.less" + "meta.object-literal.key", + "meta.object-literal.key entity.name.function" ], "settings": { - "foreground": "#d4d4d4" - } - }, - { - "scope": "keyword", - "settings": { - "foreground": "#569cd6" - } - }, - { - "scope": "keyword.control", - "settings": { - "foreground": "#569cd6" - } - }, - { - "scope": "keyword.operator", - "settings": { - "foreground": "#d4d4d4" + "foreground": "#9CDCFE" } }, { + "name": "CSS property value", "scope": [ - "keyword.operator.new", - "keyword.operator.expression", - "keyword.operator.cast", - "keyword.operator.sizeof", - "keyword.operator.logical.python" + "support.constant.property-value", + "support.constant.font-name", + "support.constant.media-type", + "support.constant.media", + "constant.other.color.rgb-value", + "constant.other.rgb-value", + "support.constant.color" ], "settings": { - "foreground": "#569cd6" - } - }, - { - "scope": "keyword.other.unit", - "settings": { - "foreground": "#b5cea8" - } - }, - { - "scope": "support.function.git-rebase", - "settings": { - "foreground": "#d4d4d4" - } - }, - { - "scope": "constant.sha.git-rebase", - "settings": { - "foreground": "#b5cea8" - } - }, - { - "name": "coloring of the Java import and package identifiers", - "scope": ["storage.modifier.import.java", "storage.modifier.package.java"], - "settings": { - "foreground": "#d4d4d4" - } - }, - { - "name": "coloring of the TS this", - "scope": "variable.language.this", - "settings": { - "foreground": "#569cd6" + "foreground": "#CE9178" } } ] diff --git a/extensions/theme-defaults/themes/hc_black_defaults.json b/extensions/theme-defaults/themes/hc_black_defaults.json index ec8999a7eb80f..fe0b672d31214 100644 --- a/extensions/theme-defaults/themes/hc_black_defaults.json +++ b/extensions/theme-defaults/themes/hc_black_defaults.json @@ -2,8 +2,332 @@ "$schema": "vscode://schemas/color-theme", "name": "High Contrast Default Colors", "colors": { - "editorBackground": "#000000", - "editorForeground": "#FFFFFF", - "editorIndentGuides": "#FFFFFF" - } + "editor.background": "#000000", + "editor.foreground": "#FFFFFF", + "editorIndentGuide.background": "#FFFFFF", + "sideBarTitle.foreground": "#FFFFFF" + }, + "settings": [ + { + "settings": { + "foreground": "#FFFFFF", + "background": "#000000" + } + }, + { + "scope": "emphasis", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "strong", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "meta.diff.header", + "settings": { + "foreground": "#000080" + } + }, + + { + "scope": "comment", + "settings": { + "foreground": "#7ca668" + } + }, + { + "scope": "constant.language", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": [ + "constant.numeric", + "constant.other.color.rgb-value", + "constant.other.rgb-value", + "support.constant.color" + ], + "settings": { + "foreground": "#b5cea8" + } + }, + { + "scope": "constant.regexp", + "settings": { + "foreground": "#b46695" + } + }, + { + "scope": "entity.name.tag", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "entity.name.tag.css", + "settings": { + "foreground": "#d7ba7d" + } + }, + { + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#9cdcfe" + } + }, + { + "scope": [ + "entity.other.attribute-name.class.css", + "entity.other.attribute-name.class.mixin.css", + "entity.other.attribute-name.id.css", + "entity.other.attribute-name.parent-selector.css", + "entity.other.attribute-name.pseudo-class.css", + "entity.other.attribute-name.pseudo-element.css", + + "source.css.less entity.other.attribute-name.id", + + "entity.other.attribute-name.attribute.scss", + "entity.other.attribute-name.scss" + ], + "settings": { + "foreground": "#d7ba7d" + } + }, + { + "scope": "invalid", + "settings": { + "foreground": "#f44747" + } + }, + { + "scope": "markup.underline", + "settings": { + "fontStyle": "underline" + } + }, + { + "scope": "markup.bold", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "markup.heading", + "settings": { + "foreground": "#6796e6" + } + }, + { + "scope": "markup.italic", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "markup.inserted", + "settings": { + "foreground": "#b5cea8" + } + }, + { + "scope": "markup.deleted", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "markup.changed", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "meta.selector", + "settings": { + "foreground": "#d7ba7d" + } + }, + { + "name": "brackets of XML/HTML tags", + "scope": [ + "punctuation.definition.tag" + ], + "settings": { + "foreground": "#808080" + } + }, + { + "scope": "meta.preprocessor", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "meta.preprocessor.string", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "meta.preprocessor.numeric", + "settings": { + "foreground": "#b5cea8" + } + }, + { + "scope": "meta.structure.dictionary.key.python", + "settings": { + "foreground": "#9cdcfe" + } + }, + { + "scope": "storage", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "storage.type", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "storage.modifier", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "string", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "string.tag", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "string.value", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "string.regexp", + "settings": { + "foreground": "#d16969" + } + }, + { + "name": "JavaScript string interpolation ${}", + "scope": [ + "punctuation.definition.template-expression.begin.js", + "punctuation.definition.template-expression.begin.ts", + "punctuation.definition.template-expression.end.ts", + "punctuation.definition.template-expression.end.js", + "punctuation.section.embedded.coffee" + ], + "settings": { + "foreground": "#569cd6" + } + }, + { + "name": "Reset JavaScript string interpolation expression", + "scope": [ + "meta.template.expression.js", + "meta.template.expression.ts" + ], + "settings": { + "foreground": "#ffffff" + } + }, + { + "scope": [ + "support.type.vendored.property-name", + "support.type.property-name", + "variable.css", + "variable.scss", + "variable.other.less", + "source.coffee.embedded" + ], + "settings": { + "foreground": "#d4d4d4" + } + }, + { + "scope": "keyword", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "keyword.control", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "keyword.operator", + "settings": { + "foreground": "#d4d4d4" + } + }, + { + "scope": [ + "keyword.operator.new", + "keyword.operator.expression", + "keyword.operator.cast", + "keyword.operator.sizeof", + "keyword.operator.logical.python" + ], + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "keyword.other.unit", + "settings": { + "foreground": "#b5cea8" + } + }, + { + "scope": "support.function.git-rebase", + "settings": { + "foreground": "#d4d4d4" + } + }, + { + "scope": "constant.sha.git-rebase", + "settings": { + "foreground": "#b5cea8" + } + }, + { + "name": "coloring of the Java import and package identifiers", + "scope": [ + "storage.modifier.import.java", + "variable.language.wildcard.java", + "storage.modifier.package.java" + ], + "settings": { + "foreground": "#d4d4d4" + } + }, + { + "name": "coloring of the TS this", + "scope": "variable.language.this", + "settings": { + "foreground": "#569cd6" + } + } + ] } \ No newline at end of file diff --git a/extensions/theme-defaults/themes/light_defaults.json b/extensions/theme-defaults/themes/light_defaults.json index b88c1db752f18..ad85f382140c4 100644 --- a/extensions/theme-defaults/themes/light_defaults.json +++ b/extensions/theme-defaults/themes/light_defaults.json @@ -2,11 +2,13 @@ "$schema": "vscode://schemas/color-theme", "name": "Light Default Colors", "colors": { - "editorBackground": "#ffffff", - "editorForeground": "#000000", - "editorInactiveSelection": "#E5EBF1", - "editorIndentGuides": "#d3d3d3", - "editorSelectionHighlight": "#add6ff4d", - "editorSuggestWidgetBackground": "#F3F3F3" + "editor.background": "#FFFFFF", + "editor.foreground": "#000000", + "editor.inactiveSelectionBackground": "#E5EBF1", + "editorIndentGuide.background": "#D3D3D3", + "editor.selectionHighlightBackground": "#ADD6FF4D", + "editorSuggestWidget.background": "#F3F3F3", + "activityBarBadge.background": "#007ACC", + "sideBarTitle.foreground": "#6F6F6F" } } \ No newline at end of file diff --git a/extensions/theme-defaults/themes/light_vs.json b/extensions/theme-defaults/themes/light_vs.json index b97b25eecd879..a1d9f797f64f7 100644 --- a/extensions/theme-defaults/themes/light_vs.json +++ b/extensions/theme-defaults/themes/light_vs.json @@ -242,12 +242,23 @@ "punctuation.definition.template-expression.begin.js", "punctuation.definition.template-expression.begin.ts", "punctuation.definition.template-expression.end.ts", - "punctuation.definition.template-expression.end.js" + "punctuation.definition.template-expression.end.js", + "punctuation.section.embedded.coffee" ], "settings": { "foreground": "#0000ff" } }, + { + "name": "Reset JavaScript string interpolation expression", + "scope": [ + "meta.template.expression.js", + "meta.template.expression.ts" + ], + "settings": { + "foreground": "#000000" + } + }, { "scope": [ "support.constant.property-value", @@ -268,7 +279,8 @@ "support.type.property-name", "variable.css", "variable.scss", - "variable.other.less" + "variable.other.less", + "source.coffee.embedded" ], "settings": { "foreground": "#ff0000" @@ -318,8 +330,8 @@ }, { "scope": [ - "punctuation.section.embedded.begin.metatag.php", - "punctuation.section.embedded.end.metatag.php" + "punctuation.section.embedded.begin.php", + "punctuation.section.embedded.end.php" ], "settings": { "foreground": "#800000" @@ -341,6 +353,7 @@ "name": "coloring of the Java import and package identifiers", "scope": [ "storage.modifier.import.java", + "variable.language.wildcard.java", "storage.modifier.package.java" ], "settings": { diff --git a/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json b/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json index 7b5beeb3a9abd..f9a84a5c5eec4 100644 --- a/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json +++ b/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json @@ -2,27 +2,50 @@ "name": "Kimbie Dark", "type": "dark", "colors": { - "inputBoxBackground": "#2f2f2f", - "editorBackground": "#221a0f", - "editorForeground": "#d3af86", - "editorSelection": "#84613daa", - "editorWidgetBackground": "#131510", - "editorHoverBackground": "#221a14", - "tabsContainerBackground": "#131510", - "tabInactiveBackground": "#131510", - "statusBarBackground": "#162257", - "activityBarBackground": "#221a0f", - "activityBarForeground": "#d3af86", - "activityBarBadgeBackground": "#162257", - "sideBarBackground": "#131510", - "editorLineHighlight": "#5e452b", - "editorCursor": "#d3af86", - "editorWhitespaces": "#a57a4c", - "peekViewTitleBackground": "#131510", - "peekViewBorder": "#5e452b", - "peekViewResultsBackground": "#131510", - "peekViewEditorBackground": "#221a14", - "peekViewEditorMatchHighlight": "#84613daa" + "input.background": "#51412c", + "editor.background": "#221a0f", + "editor.foreground": "#d3af86", + "focusBorder": "#a57a4c", + "list.highlightForeground": "#e3b583", + "list.activeSelectionBackground": "#7c5021", + "list.hoverBackground": "#7c502166", + "list.focusBackground": "#7c5021AA", + "list.inactiveSelectionBackground": "#645342", + "pickerGroup.foreground": "#e3b583", + "pickerGroup.border": "#e3b583", + "inputOption.activeBorder": "#a57a4c", + "selection.background": "#84613daa", + "editor.selectionBackground": "#84613daa", + "editorWidget.background": "#131510", + "editorHoverWidget.background": "#221a14", + "editorGroupHeader.tabsBackground": "#131510", + "editorGroup.background": "#0f0c08", + "tab.inactiveBackground": "#131510", + "titleBar.activeBackground": "#423523", + "statusBar.background": "#423523", + "statusBar.debuggingBackground": "#423523", + "statusBar.noFolderBackground": "#423523", + "activityBar.background": "#221a0f", + "activityBar.foreground": "#d3af86", + "sideBar.background": "#362712", + "editor.lineHighlightBackground": "#5e452b", + "editorCursor.foreground": "#d3af86", + "editorWhitespace.foreground": "#a57a4c", + "peekViewTitle.background": "#362712", + "peekView.border": "#5e452b", + "peekViewResult.background": "#362712", + "peekViewEditor.background": "#221a14", + "peekViewEditor.matchHighlightBackground": "#84613daa", + "notification.background": "#473a29", + "button.background": "#6e583b", + "inputValidation.infoBorder": "#1b60a5", + "inputValidation.infoBackground": "#2b2a42", + "inputValidation.warningBackground": "#51412c", + // "inputValidation.warningBorder": "#5B7E7A", + "inputValidation.errorBackground": "#5f0d0d", + "inputValidation.errorBorder": "#9d2f23", + "badge.background": "#7f5d38", + "progressBar.background": "#7f5d38" }, "tokenColors": [ { @@ -347,7 +370,7 @@ "variable.interpolation" ], "settings": { - "foreground": "#18401e" + "foreground": "#088649" } }, { diff --git a/extensions/theme-monokai-dimmed/package.json b/extensions/theme-monokai-dimmed/package.json index c8fd670870591..18ed5256ad8d9 100644 --- a/extensions/theme-monokai-dimmed/package.json +++ b/extensions/theme-monokai-dimmed/package.json @@ -8,7 +8,7 @@ { "label": "Monokai Dimmed", "uiTheme": "vs-dark", - "path": "./themes/dimmed-monokai.tmTheme" + "path": "./themes/dimmed-monokai-color-theme.json" } ] } diff --git a/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json b/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json new file mode 100644 index 0000000000000..71e9ef0240789 --- /dev/null +++ b/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json @@ -0,0 +1,565 @@ +{ + "type": "dark", + "colors": { + "dropdown.background": "#525252", + "list.activeSelectionBackground": "#707070", + "list.focusBackground": "#707070", + "list.inactiveSelectionBackground": "#4e4e4e", + "list.hoverBackground": "#707070", + "list.highlightForeground": "#e58520", + "button.background": "#565656", + "editor.background": "#1e1e1e", + "editor.foreground": "#c5c8c6", + "editor.selectionBackground": "#373b41", + "editor.lineHighlightBackground": "#303030", + "editorCursor.foreground": "#c07020", + "editorWhitespace.foreground": "#505037", + "editorIndentGuide.background": "#505037", + "editorGroupHeader.tabsBackground": "#282828", + "editorGroup.background": "#1e1e1e", + "tab.inactiveBackground": "#404040", + "tab.border": "#303030", + "tab.inactiveForeground": "#d8d8d8", + "peekView.border": "#3655b5", + "panelTitle.activeForeground": "#ffffff", + "statusBar.background": "#505050", + "statusBar.debuggingBackground": "#505050", + "statusBar.noFolderBackground": "#505050", + "titleBar.activeBackground": "#505050", + "activityBar.background": "#353535", + "activityBar.foreground": "#ffffff", + "activityBarBadge.background": "#3655b5", + "sideBar.background": "#272727", + "sideBarSectionHeader.background": "#505050", + "notification.background": "#353535", + "pickerGroup.foreground": "#b0b0b0", + "terminal.ansiWhite": "#ffffff", + "inputOption.activeBorder": "#3655b5", + "focusBorder": "#3655b5" + }, + "tokenColors": [ + { + "settings": { + "background": "#1e1e1e", + "foreground": "#C5C8C6" + } + }, + { + "name": "By uonick", + "settings": { + "background": "#202025ff", + "foreground": "#c5c8c6ff" + } + }, + { + "name": "Comment", + "scope": "comment", + "settings": { + "fontStyle": "\n ", + "foreground": "#9A9B99" + } + }, + { + "name": "String", + "scope": "string", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#9AA83A" + } + }, + { + "name": "String Embedded Source", + "scope": "string source", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#D08442" + } + }, + { + "name": "Number", + "scope": "constant.numeric", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#6089B4" + } + }, + { + "name": "Built-in constant", + "scope": "constant.language", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#408080" + } + }, + { + "name": "User-defined constant", + "scope": "constant.character, constant.other", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#8080FF", + "background": "#1e1e1e" + } + }, + { + "name": "Keyword", + "scope": "keyword", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#6089B4" + } + }, + { + "name": "Support", + "scope": "support", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#C7444A" + } + }, + { + "name": "Storage", + "scope": "storage", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#9872A2" + } + }, + { + "name": "Class name", + "scope": "entity.name.class, entity.name.type", + "settings": { + "fontStyle": "\n \t\t\t \t", + "foreground": "#9B0000", + "background": "#1E1E1E" + } + }, + { + "name": "Inherited class", + "scope": "entity.other.inherited-class", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#C7444A" + } + }, + { + "name": "Function name", + "scope": "entity.name.function", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#CE6700" + } + }, + { + "name": "Function argument", + "scope": "variable.parameter", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#6089B4" + } + }, + { + "name": "Tag name", + "scope": "entity.name.tag", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#9872A2" + } + }, + { + "name": "Tag attribute", + "scope": "entity.other.attribute-name", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#9872A2" + } + }, + { + "name": "Library function", + "scope": "support.function", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#9872A2" + } + }, + { + "name": "Keyword", + "scope": "keyword", + "settings": { + "fontStyle": "\n \t\t\t\t", + "foreground": "#676867" + } + }, + { + "name": "Class Variable", + "scope": "variable.js, punctuation.separator.variable", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#6089B4" + } + }, + { + "name": "Language Constant", + "scope": "constant.language", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#FF0080" + } + }, + { + "name": "Meta Brace", + "scope": "punctuation.section.embedded -(source string source punctuation.section.embedded), meta.brace.erb.html", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#008200" + } + }, + { + "name": "Invalid", + "scope": "invalid", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#FF0B00" + } + }, + { + "name": "Normal Variable", + "scope": "variable.other.php, variable.other.normal", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#6089B4" + } + }, + { + "name": "Function Object", + "scope": "meta.function-call.object", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#9872A2" + } + }, + { + "name": "Keyword Control", + "scope": "keyword.control", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#9872A2" + } + }, + { + "name": "Tag", + "scope": "meta.tag", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#D0B344" + } + }, + { + "name": "Tag Name", + "scope": "entity.name.tag", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#6089B4" + } + }, + { + "name": "Doctype", + "scope": "meta.doctype, meta.tag.sgml-declaration.doctype, meta.tag.sgml.doctype", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#9AA83A" + } + }, + { + "name": "Tag Inline Source", + "scope": "meta.tag.inline source, text.html.php.source", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#9AA83A" + } + }, + { + "name": "Tag Other", + "scope": "meta.tag.other, entity.name.tag.style, entity.name.tag.script, meta.tag.block.script, source.js.embedded punctuation.definition.tag.html, source.css.embedded punctuation.definition.tag.html", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#9872A2" + } + }, + { + "name": "Tag Attribute", + "scope": "entity.other.attribute-name, meta.tag punctuation.definition.string", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#D0B344" + } + }, + { + "name": "Tag Value", + "scope": "meta.tag string -source -punctuation, text source text meta.tag string -punctuation", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#6089B4" + } + }, + { + "name": "Meta Brace", + "scope": "punctuation.section.embedded -(source string source punctuation.section.embedded), meta.brace.erb.html", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#D0B344" + } + }, + { + "name": "HTML ID", + "scope": "meta.toc-list.id", + "settings": { + "foreground": "#9AA83A" + } + }, + { + "name": "HTML String", + "scope": "string.quoted.double.html, punctuation.definition.string.begin.html, punctuation.definition.string.end.html", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#9AA83A" + } + }, + { + "name": "HTML Tags", + "scope": "punctuation.definition.tag.html, punctuation.definition.tag.begin, punctuation.definition.tag.end", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#6089B4" + } + }, + { + "name": "CSS ID", + "scope": "meta.selector.css entity.other.attribute-name.id", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#9872A2" + } + }, + { + "name": "CSS Property Name", + "scope": "support.type.property-name.css", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#676867" + } + }, + { + "name": "CSS Property Value", + "scope": "meta.property-group support.constant.property-value.css, meta.property-value support.constant.property-value.css", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#C7444A" + } + }, + { + "name": "JavaScript Variable", + "scope": "variable.language.js", + "settings": { + "foreground": "#CC555A" + } + }, + { + "name": "Template Definition", + "scope": [ + "punctuation.definition.template-expression", + "punctuation.section.embedded.coffee" + ], + "settings": { + "foreground": "#D08442" + } + }, + { + "name": "Reset JavaScript string interpolation expression", + "scope": [ + "meta.template.expression" + ], + "settings": { + "foreground": "#C5C8C6" + } + }, + { + "name": "PHP Function Call", + "scope": "meta.function-call.object.php", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#D0B344" + } + }, + { + "name": "PHP Single Quote HMTL Fix", + "scope": "punctuation.definition.string.end.php, punctuation.definition.string.begin.php", + "settings": { + "foreground": "#9AA83A" + } + }, + { + "name": "PHP Parenthesis HMTL Fix", + "scope": "source.php.embedded.line.html", + "settings": { + "foreground": "#676867" + } + }, + { + "name": "PHP Punctuation Embedded", + "scope": "punctuation.section.embedded.begin.php, punctuation.section.embedded.end.php", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#D08442" + } + }, + { + "name": "Ruby Symbol", + "scope": "constant.other.symbol.ruby", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#9AA83A" + } + }, + { + "name": "Ruby Variable", + "scope": "variable.language.ruby", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#D0B344" + } + }, + { + "name": "Ruby Special Method", + "scope": "keyword.other.special-method.ruby", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#D9B700" + } + }, + { + "name": "Ruby Embedded Source", + "scope": "source.ruby.embedded.source", + "settings": { + "foreground": "#D08442" + } + }, + { + "name": "SQL", + "scope": "keyword.other.DML.sql", + "settings": { + "fontStyle": "\n \t\t\t\t", + "foreground": "#D0B344" + } + }, + { + "name": "diff: header", + "scope": "meta.diff, meta.diff.header", + "settings": { + "background": "#b58900", + "fontStyle": "italic", + "foreground": "#E0EDDD" + } + }, + { + "name": "diff: deleted", + "scope": "markup.deleted", + "settings": { + "background": "#eee8d5", + "fontStyle": "", + "foreground": "#dc322f" + } + }, + { + "name": "diff: changed", + "scope": "markup.changed", + "settings": { + "background": "#eee8d5", + "fontStyle": "", + "foreground": "#cb4b16" + } + }, + { + "name": "diff: inserted", + "scope": "markup.inserted", + "settings": { + "background": "#eee8d5", + "foreground": "#219186" + } + }, + { + "name": "Markup Quote", + "scope": "markup.quote", + "settings": { + "foreground": "#9872A2" + } + }, + { + "name": "Markup Lists", + "scope": "markup.list", + "settings": { + "foreground": "#9AA83A" + } + }, + { + "name": "Markup Styling", + "scope": "markup.bold, markup.italic", + "settings": { + "foreground": "#6089B4" + } + }, + { + "name": "Markup Inline", + "scope": "markup.inline.raw", + "settings": { + "fontStyle": "", + "foreground": "#FF0080" + } + }, + { + "name": "Markup Headings", + "scope": "markup.heading", + "settings": { + "foreground": "#D0B344" + } + }, + { + "name": "Markup Setext Header", + "scope": "markup.heading.setext", + "settings": { + "fontStyle": "", + "foreground": "#D0B344" + } + }, + { + "scope": "token.info-token", + "settings": { + "foreground": "#6796e6" + } + }, + { + "scope": "token.warn-token", + "settings": { + "foreground": "#cd9731" + } + }, + { + "scope": "token.error-token", + "settings": { + "foreground": "#f44747" + } + }, + { + "scope": "token.debug-token", + "settings": { + "foreground": "#b267e6" + } + }, + { + "name": "this.self", + "scope": "variable.language", + "settings": { + "foreground": "#c7444a" + } + } + ] +} \ No newline at end of file diff --git a/extensions/theme-monokai-dimmed/themes/dimmed-monokai.tmTheme b/extensions/theme-monokai-dimmed/themes/dimmed-monokai.tmTheme deleted file mode 100644 index 5c542a4394ea3..0000000000000 --- a/extensions/theme-monokai-dimmed/themes/dimmed-monokai.tmTheme +++ /dev/null @@ -1,856 +0,0 @@ - - - - author - uonick - comment - Dimmed - Monokai - name - Dimmed - Monokai - settings - - - settings - - background - #1e1e1e - caret - #fc5604 - foreground - #C5C8C6 - invisibles - #4B4E55 - lineHighlight - #282A2E - selection - #373B41 - - - - name - By uonick - settings - - - - - name - Comment - scope - comment - settings - - fontStyle - - - foreground - #9A9B99 - - - - name - String - scope - string - settings - - fontStyle - - - foreground - #9AA83A - - - - name - String Embedded Source - scope - string source - settings - - fontStyle - - - foreground - #D08442 - - - - name - Number - scope - constant.numeric - settings - - fontStyle - - - foreground - #6089B4 - - - - name - Built-in constant - scope - constant.language - settings - - fontStyle - - - foreground - #408080 - - - - name - User-defined constant - scope - constant.character, constant.other - settings - - fontStyle - - - foreground - #8080FF - background - #1e1e1e - - - - name - Keyword - scope - keyword - settings - - fontStyle - - - foreground - #6089B4 - - - - name - Support - scope - support - settings - - fontStyle - - - foreground - #C7444A - - - - name - Storage - scope - storage - settings - - fontStyle - - - foreground - #9872A2 - - - - name - Class name - scope - entity.name.class, entity.name.type - settings - - fontStyle - - - foreground - #9B0000 - background - #1E1E1E - - - - name - Inherited class - scope - entity.other.inherited-class - settings - - fontStyle - - - foreground - #C7444A - - - - name - Function name - scope - entity.name.function - settings - - fontStyle - - - foreground - #CE6700 - - - - name - Function argument - scope - variable.parameter - settings - - fontStyle - - - foreground - #6089B4 - - - - name - Tag name - scope - entity.name.tag - settings - - fontStyle - - - foreground - #9872A2 - - - - name - Tag attribute - scope - entity.other.attribute-name - settings - - fontStyle - - - foreground - #9872A2 - - - - name - Library function - scope - support.function - settings - - fontStyle - - - foreground - #9872A2 - - - - name - Keyword - scope - keyword - settings - - fontStyle - - - foreground - #676867 - - - - name - Class Variable - scope - variable.other, variable.js, punctuation.separator.variable - settings - - fontStyle - - - foreground - #6089B4 - - - - name - Language Constant - scope - constant.language - settings - - fontStyle - - - foreground - #FF0080 - - - - name - Meta Brace - scope - punctuation.section.embedded -(source string source punctuation.section.embedded), meta.brace.erb.html - settings - - fontStyle - - - foreground - #008200 - - - - name - Invalid - scope - invalid - settings - - fontStyle - - - foreground - #FF0B00 - - - - name - Normal Variable - scope - variable.other.php, variable.other.normal - settings - - fontStyle - - - foreground - #6089B4 - - - - name - Function Call - scope - meta.function-call - settings - - fontStyle - - - foreground - #0080FF - - - - name - Function Object - scope - meta.function-call.object - settings - - fontStyle - - - foreground - #9872A2 - - - - name - Function Call Variable - scope - variable.other.property - settings - - fontStyle - - - foreground - #9872A2 - - - - name - Keyword Control - scope - keyword.control - settings - - fontStyle - - - foreground - #9872A2 - - - - name - Tag - scope - meta.tag - settings - - fontStyle - - - foreground - #D0B344 - - - - name - Tag Name - scope - entity.name.tag - settings - - fontStyle - - - foreground - #6089B4 - - - - name - Doctype - scope - meta.doctype, meta.tag.sgml-declaration.doctype, meta.tag.sgml.doctype - settings - - fontStyle - - - foreground - #9AA83A - - - - name - Tag Inline Source - scope - meta.tag.inline source, text.html.php.source - settings - - fontStyle - - - foreground - #9AA83A - - - - name - Tag Other - scope - meta.tag.other, entity.name.tag.style, entity.name.tag.script, meta.tag.block.script, source.js.embedded punctuation.definition.tag.html, source.css.embedded punctuation.definition.tag.html - settings - - fontStyle - - - foreground - #9872A2 - - - - name - Tag Attribute - scope - entity.other.attribute-name, meta.tag punctuation.definition.string - settings - - fontStyle - - - foreground - #D0B344 - - - - name - Tag Value - scope - meta.tag string -source -punctuation, text source text meta.tag string -punctuation - settings - - fontStyle - - - foreground - #6089B4 - - - - name - Meta Brace - scope - punctuation.section.embedded -(source string source punctuation.section.embedded), meta.brace.erb.html - settings - - fontStyle - - - foreground - #D0B344 - - - - name - HTML ID - scope - meta.toc-list.id - settings - - foreground - #9AA83A - - - - name - HTML String - scope - string.quoted.double.html, punctuation.definition.string.begin.html, punctuation.definition.string.end.html - settings - - fontStyle - - - foreground - #9AA83A - - - - name - HTML Tags - scope - punctuation.definition.tag.html, punctuation.definition.tag.begin, punctuation.definition.tag.end - settings - - fontStyle - - - foreground - #6089B4 - - - - name - CSS ID - scope - meta.selector.css entity.other.attribute-name.id - settings - - fontStyle - - - foreground - #9872A2 - - - - name - CSS Property Name - scope - support.type.property-name.css - settings - - fontStyle - - - foreground - #676867 - - - - name - CSS Property Value - scope - meta.property-group support.constant.property-value.css, meta.property-value support.constant.property-value.css - settings - - fontStyle - - - foreground - #C7444A - - - - name - JavaScript Variable - scope - variable.language.js - settings - - foreground - #CC555A - - - - name - PHP Function Call - scope - meta.function-call.object.php - settings - - fontStyle - - - foreground - #D0B344 - - - - name - PHP Single Quote HMTL Fix - scope - punctuation.definition.string.end.php, punctuation.definition.string.begin.php - settings - - foreground - #9AA83A - - - - name - PHP Parenthesis HMTL Fix - scope - source.php.embedded.line.html - settings - - foreground - #676867 - - - - name - PHP Punctuation Embedded - scope - punctuation.section.embedded.begin.php, punctuation.section.embedded.end.php - settings - - fontStyle - - - foreground - #D08442 - - - - name - Ruby Symbol - scope - constant.other.symbol.ruby - settings - - fontStyle - - - foreground - #9AA83A - - - - name - Ruby Variable - scope - variable.language.ruby - settings - - fontStyle - - - foreground - #D0B344 - - - - name - Ruby Special Method - scope - keyword.other.special-method.ruby - settings - - fontStyle - - - foreground - #D9B700 - - - - name - Ruby Embedded Source - scope - source.ruby.embedded.source - settings - - foreground - #D08442 - - - - name - SQL - scope - keyword.other.DML.sql - settings - - fontStyle - - - foreground - #D0B344 - - - - name - diff: header - scope - meta.diff, meta.diff.header - settings - - background - #b58900 - fontStyle - italic - foreground - #E0EDDD - - - - name - diff: deleted - scope - markup.deleted - settings - - background - #eee8d5 - fontStyle - - foreground - #dc322f - - - - name - diff: changed - scope - markup.changed - settings - - background - #eee8d5 - fontStyle - - foreground - #cb4b16 - - - - name - diff: inserted - scope - markup.inserted - settings - - background - #eee8d5 - foreground - #219186 - - - - name - Markup Quote - scope - markup.quote - settings - - foreground - #9872A2 - - - - name - Markup Lists - scope - markup.list - settings - - foreground - #9AA83A - - - - name - Markup Styling - scope - markup.bold, markup.italic - settings - - foreground - #6089B4 - - - - name - Markup Inline - scope - markup.inline.raw - settings - - fontStyle - - foreground - #FF0080 - - - - name - Markup Headings - scope - markup.heading - settings - - foreground - #D0B344 - - - - name - Markup Setext Header - scope - markup.heading.setext - settings - - fontStyle - - foreground - #D0B344 - - - - - - diff --git a/extensions/theme-monokai/package.json b/extensions/theme-monokai/package.json index 42d625293576a..4e4fdd358b7f1 100644 --- a/extensions/theme-monokai/package.json +++ b/extensions/theme-monokai/package.json @@ -8,7 +8,7 @@ { "label": "Monokai", "uiTheme": "vs-dark", - "path": "./themes/Monokai.tmTheme" + "path": "./themes/monokai-color-theme.json" } ] } diff --git a/extensions/theme-monokai/themes/Monokai.tmTheme b/extensions/theme-monokai/themes/Monokai.tmTheme deleted file mode 100644 index 81c05dcb79f2c..0000000000000 --- a/extensions/theme-monokai/themes/Monokai.tmTheme +++ /dev/null @@ -1,472 +0,0 @@ - - - - - name - Monokai - settings - - - settings - - background - #272822 - caret - #F8F8F0 - foreground - #F8F8F2 - invisibles - #3B3A32 - lineHighlight - #3E3D32 - selection - #49483E - findHighlight - #FFE792 - findHighlightForeground - #000000 - selectionBorder - #222218 - activeGuide - #9D550FB0 - guide - #48473E - - bracketsForeground - #F8F8F2A5 - bracketsOptions - underline - - bracketContentsForeground - #F8F8F2A5 - bracketContentsOptions - underline - - tagsOptions - stippled_underline - - - - name - Comment - scope - comment - settings - - foreground - #75715E - - - - name - String - scope - string - settings - - foreground - #E6DB74 - - - - name - Template Definition - scope - punctuation.definition.template-expression - settings - - foreground - #F92672 - - - - name - Number - scope - constant.numeric - settings - - foreground - #AE81FF - - - - - name - Built-in constant - scope - constant.language - settings - - foreground - #AE81FF - - - - name - User-defined constant - scope - constant.character, constant.other - settings - - foreground - #AE81FF - - - - name - Variable - scope - variable - settings - - fontStyle - - - - - name - Keyword - scope - keyword - settings - - foreground - #F92672 - - - - name - Storage - scope - storage - settings - - fontStyle - - foreground - #F92672 - - - - name - Storage type - scope - storage.type - settings - - fontStyle - italic - foreground - #66D9EF - - - - name - Class name - scope - entity.name.type, entity.name.class - settings - - fontStyle - underline - foreground - #A6E22E - - - - name - Inherited class - scope - entity.other.inherited-class - settings - - fontStyle - italic underline - foreground - #A6E22E - - - - name - Function name - scope - entity.name.function - settings - - fontStyle - - foreground - #A6E22E - - - - name - Function argument - scope - variable.parameter - settings - - fontStyle - italic - foreground - #FD971F - - - - name - Tag name - scope - entity.name.tag - settings - - fontStyle - - foreground - #F92672 - - - - name - Tag attribute - scope - entity.other.attribute-name - settings - - fontStyle - - foreground - #A6E22E - - - - name - Library function - scope - support.function - settings - - fontStyle - - foreground - #66D9EF - - - - name - Library constant - scope - support.constant - settings - - fontStyle - - foreground - #66D9EF - - - - name - Library class/type - scope - support.type, support.class - settings - - fontStyle - italic - foreground - #66D9EF - - - - name - Library variable - scope - support.other.variable - settings - - fontStyle - - - - - name - Invalid - scope - invalid - settings - - background - #F92672 - fontStyle - - foreground - #F8F8F0 - - - - name - Invalid deprecated - scope - invalid.deprecated - settings - - background - #AE81FF - foreground - #F8F8F0 - - - - name - JSON String - scope - meta.structure.dictionary.json string.quoted.double.json - settings - - foreground - #CFCFC2 - - - - - name - diff.header - scope - meta.diff, meta.diff.header - settings - - foreground - #75715E - - - - name - diff.deleted - scope - markup.deleted - settings - - foreground - #F92672 - - - - name - diff.inserted - scope - markup.inserted - settings - - foreground - #A6E22E - - - - name - diff.changed - scope - markup.changed - settings - - foreground - #E6DB74 - - - - - scope - constant.numeric.line-number.find-in-files - match - settings - - foreground - #AE81FFA0 - - - - scope - entity.name.filename.find-in-files - settings - - foreground - #E6DB74 - - - - - name - Markup Quote - scope - markup.quote - settings - - foreground - #F92672 - - - - name - Markup Lists - scope - markup.list - settings - - foreground - #E6DB74 - - - - name - Markup Styling - scope - markup.bold, markup.italic - settings - - foreground - #66D9EF - - - - name - Markup Inline - scope - markup.inline.raw - settings - - fontStyle - - foreground - #FD971F - - - - name - Markup Headings - scope - markup.heading - settings - - foreground - #A6E22E - - - - name - Markup Setext Header - scope - markup.heading.setext - settings - - fontStyle - - foreground - #A6E22E - - - - - - uuid - D8D5E82E-3D5B-46B5-B38E-8C841C21347D - - diff --git a/extensions/theme-monokai/themes/monokai-color-theme.json b/extensions/theme-monokai/themes/monokai-color-theme.json new file mode 100644 index 0000000000000..fa42db4a3c3d0 --- /dev/null +++ b/extensions/theme-monokai/themes/monokai-color-theme.json @@ -0,0 +1,403 @@ +// This theme's colors are based on the original Monokai: +// #1e1f1c (tab well, borders) +// #272822 (editor background) +// #414339 (selection) +// #75715e (focus) +// #f8f8f2 (editor foreground) +{ + "type": "dark", + "colors": { + "dropdown.background": "#414339", + "list.activeSelectionBackground": "#75715E", + "list.focusBackground": "#414339", + "list.inactiveSelectionBackground": "#414339", + "list.hoverBackground": "#272822", + "list.dropBackground": "#414339", + "list.highlightForeground": "#f8f8f2", + "button.background": "#75715E", + "editor.background": "#272822", + "editor.foreground": "#f8f8f2", + "selection.background": "#ccccc7", + "editor.selectionBackground": "#49483e", + "editor.lineHighlightBackground": "#3e3d32", + "editorCursor.foreground": "#f8f8f0", + "editorWhitespace.foreground": "#464741", + "editorIndentGuide.background": "#464741", + "editorGroupHeader.tabsBackground": "#1e1f1c", + "editorGroup.dropBackground": "#41433980", + "tab.inactiveBackground": "#414339", + "tab.border": "#1e1f1c", + "tab.inactiveForeground": "#ccccc7", // needs to be bright so it's readable when another editor group is focused + "widget.shadow": "#000000", + "progressBar.background": "#75715E", + "badge.background": "#75715E", + "badge.foreground": "#f8f8f2", + "editorLineNumber.foreground": "#90908a", + "panelTitle.activeForeground": "#f8f8f2", + "panelTitle.activeBorder": "#75715E", + "panelTitle.inactiveForeground": "#75715E", + "panel.border": "#414339", + "titleBar.activeBackground": "#1e1f1c", + "statusBar.background": "#414339", + "statusBar.noFolderBackground": "#414339", + "statusBar.debuggingBackground": "#75715E", + "activityBar.background": "#272822", + "activityBar.foreground": "#f8f8f2", + "activityBar.dropBackground": "#414339", + "sideBar.background": "#1e1f1c", + "sideBarSectionHeader.background": "#272822", + "pickerGroup.foreground": "#75715E", + "input.background": "#414339", + "inputOption.activeBorder": "#75715E", + "focusBorder": "#75715E", + "editorWidget.background": "#1e1f1c", + "debugToolBar.background": "#1e1f1c", + "diffEditor.insertedTextBackground": "#66852880", // middle of #272822 and #a6e22e + "diffEditor.removedTextBackground": "#90274A80", // middle of #272822 and #f92672 + "inputValidation.errorBackground": "#90274A", // middle of #272822 and #f92672 + "inputValidation.errorBorder": "#f92672", + "inputValidation.warningBackground": "#848528", // middle of #272822 and #e2e22e + "inputValidation.warningBorder": "#e2e22e", + "inputValidation.infoBackground": "#546190", // middle of #272822 and #819aff + "inputValidation.infoBorder": "#819aff", + "editorHoverWidget.background": "#414339", + "editorHoverWidget.border": "#75715E", + "editorSuggestWidget.background": "#272822", + "editorSuggestWidget.border": "#75715E", + "editorGroup.border": "#414339", + "peekView.border": "#75715E", + "peekViewEditor.background": "#272822", + "peekViewResult.background": "#1e1f1c", + "peekViewTitle.background": "#1e1f1c", + "peekViewResult.selectionBackground": "#414339", + "peekViewResult.matchHighlightBackground": "#75715E", + "peekViewEditor.matchHighlightBackground": "#75715E", + "terminal.ansiBlack": "#333333", + "terminal.ansiRed": "#C4265E", // the bright color with ~75% transparent on the background + "terminal.ansiGreen": "#86B42B", + "terminal.ansiYellow": "#B3B42B", + "terminal.ansiBlue": "#6A7EC8", + "terminal.ansiMagenta": "#8C6BC8", + "terminal.ansiCyan": "#56ADBC", + "terminal.ansiWhite": "#e3e3dd", + "terminal.ansiBrightBlack": "#666666", + "terminal.ansiBrightRed": "#f92672", + "terminal.ansiBrightGreen": "#A6E22E", + "terminal.ansiBrightYellow": "#e2e22e", // hue shifted #A6E22E + "terminal.ansiBrightBlue": "#819aff", // hue shifted #AE81FF + "terminal.ansiBrightMagenta": "#AE81FF", + "terminal.ansiBrightCyan": "#66D9EF", + "terminal.ansiBrightWhite": "#f8f8f2" + }, + "tokenColors": [ + { + "settings": { + "background": "#272822", + "foreground": "#F8F8F2" + } + }, + { + "name": "Comment", + "scope": "comment", + "settings": { + "foreground": "#75715E" + } + }, + { + "name": "String", + "scope": "string", + "settings": { + "foreground": "#E6DB74" + } + }, + { + "name": "Template Definition", + "scope": [ + "punctuation.definition.template-expression", + "punctuation.section.embedded.coffee" + ], + "settings": { + "foreground": "#F92672" + } + }, + { + "name": "Reset JavaScript string interpolation expression", + "scope": [ + "meta.template.expression" + ], + "settings": { + "foreground": "#F8F8F2" + } + }, + { + "name": "Number", + "scope": "constant.numeric", + "settings": { + "foreground": "#AE81FF" + } + }, + { + "name": "Built-in constant", + "scope": "constant.language", + "settings": { + "foreground": "#AE81FF" + } + }, + { + "name": "User-defined constant", + "scope": "constant.character, constant.other", + "settings": { + "foreground": "#AE81FF" + } + }, + { + "name": "Variable", + "scope": "variable", + "settings": { + "fontStyle": "", + "foreground": "#F8F8F2" + } + }, + { + "name": "Keyword", + "scope": "keyword", + "settings": { + "foreground": "#F92672" + } + }, + { + "name": "Storage", + "scope": "storage", + "settings": { + "fontStyle": "", + "foreground": "#F92672" + } + }, + { + "name": "Storage type", + "scope": "storage.type", + "settings": { + "fontStyle": "italic", + "foreground": "#66D9EF" + } + }, + { + "name": "Class name", + "scope": "entity.name.type, entity.name.class", + "settings": { + "fontStyle": "underline", + "foreground": "#A6E22E" + } + }, + { + "name": "Inherited class", + "scope": "entity.other.inherited-class", + "settings": { + "fontStyle": "italic underline", + "foreground": "#A6E22E" + } + }, + { + "name": "Function name", + "scope": "entity.name.function", + "settings": { + "fontStyle": "", + "foreground": "#A6E22E" + } + }, + { + "name": "Function argument", + "scope": "variable.parameter", + "settings": { + "fontStyle": "italic", + "foreground": "#FD971F" + } + }, + { + "name": "Tag name", + "scope": "entity.name.tag", + "settings": { + "fontStyle": "", + "foreground": "#F92672" + } + }, + { + "name": "Tag attribute", + "scope": "entity.other.attribute-name", + "settings": { + "fontStyle": "", + "foreground": "#A6E22E" + } + }, + { + "name": "Library function", + "scope": "support.function", + "settings": { + "fontStyle": "", + "foreground": "#66D9EF" + } + }, + { + "name": "Library constant", + "scope": "support.constant", + "settings": { + "fontStyle": "", + "foreground": "#66D9EF" + } + }, + { + "name": "Library class/type", + "scope": "support.type, support.class", + "settings": { + "fontStyle": "italic", + "foreground": "#66D9EF" + } + }, + { + "name": "Library variable", + "scope": "support.other.variable", + "settings": { + "fontStyle": "" + } + }, + { + "name": "Invalid", + "scope": "invalid", + "settings": { + "background": "#F92672", + "fontStyle": "", + "foreground": "#F8F8F0" + } + }, + { + "name": "Invalid deprecated", + "scope": "invalid.deprecated", + "settings": { + "background": "#AE81FF", + "foreground": "#F8F8F0" + } + }, + { + "name": "JSON String", + "scope": "meta.structure.dictionary.json string.quoted.double.json", + "settings": { + "foreground": "#CFCFC2" + } + }, + { + "name": "diff.header", + "scope": "meta.diff, meta.diff.header", + "settings": { + "foreground": "#75715E" + } + }, + { + "name": "diff.deleted", + "scope": "markup.deleted", + "settings": { + "foreground": "#F92672" + } + }, + { + "name": "diff.inserted", + "scope": "markup.inserted", + "settings": { + "foreground": "#A6E22E" + } + }, + { + "name": "diff.changed", + "scope": "markup.changed", + "settings": { + "foreground": "#E6DB74" + } + }, + { + "scope": "constant.numeric.line-number.find-in-files - match", + "settings": { + "foreground": "#AE81FFA0" + } + }, + { + "scope": "entity.name.filename.find-in-files", + "settings": { + "foreground": "#E6DB74" + } + }, + { + "name": "Markup Quote", + "scope": "markup.quote", + "settings": { + "foreground": "#F92672" + } + }, + { + "name": "Markup Lists", + "scope": "markup.list", + "settings": { + "foreground": "#E6DB74" + } + }, + { + "name": "Markup Styling", + "scope": "markup.bold, markup.italic", + "settings": { + "foreground": "#66D9EF" + } + }, + { + "name": "Markup Inline", + "scope": "markup.inline.raw", + "settings": { + "fontStyle": "", + "foreground": "#FD971F" + } + }, + { + "name": "Markup Headings", + "scope": "markup.heading", + "settings": { + "foreground": "#A6E22E" + } + }, + { + "name": "Markup Setext Header", + "scope": "markup.heading.setext", + "settings": { + "fontStyle": "", + "foreground": "#A6E22E" + } + }, + { + "scope": "token.info-token", + "settings": { + "foreground": "#6796e6" + } + }, + { + "scope": "token.warn-token", + "settings": { + "foreground": "#cd9731" + } + }, + { + "scope": "token.error-token", + "settings": { + "foreground": "#f44747" + } + }, + { + "scope": "token.debug-token", + "settings": { + "foreground": "#b267e6" + } + }, + { + "name": "this.self", + "scope": "variable.language", + "settings": { + "foreground": "#FD971F" + } + } + ] +} diff --git a/extensions/theme-quietlight/themes/quietlight-color-theme.json b/extensions/theme-quietlight/themes/quietlight-color-theme.json index dd68a955fc806..e1d9201c6d7f3 100644 --- a/extensions/theme-quietlight/themes/quietlight-color-theme.json +++ b/extensions/theme-quietlight/themes/quietlight-color-theme.json @@ -454,32 +454,51 @@ ], "colors": { "focusBorder": "#A6B39B", - "pickerGroupForeground": "#A6B39B", - "pickerGroupBorder": "#749351", - "listActiveSelectionForeground": "#6c6c6c", - "listFocusAndSelectionForeground": "#6c6c6c", - "listFocusBackground": "#CADEB9", - "listFocusAndSelectionBackground": "#A2B294", - "listActiveSelectionBackground": "#B6C8A7", - "editorBackground": "#F5F5F5", - "editorWhitespaces": "#AAAAAA", - "editorLineHighlight": "#E4F6D4", - "editorSelection": "#C9D0D9", - "panelBackground": "#F5F5F5", - "sideBarBackground": "#F2F2F2", - "editorLineNumbers": "#9DA39A", - "editorCursor": "#54494B", - "inputBoxActiveOptionBorder": "#adafb7", - "dropdownBackground": "#F5F5F5", - "editorFindMatch": "#BF9CAC", - "editorFindMatchHighlight": "#edc9d8", - "peekViewEditorMatchHighlight": "#C2DFE3", - "peekViewTitleBackground": "#F2F8FC", - "peekViewEditorBackground": "#F2F8FC", - "peekViewResultsBackground": "#F2F8FC", - "peekViewResultsMatchHighlight": "#93C6D6", - "statusBarBackground": "#705697", - "activityBarBackground": "#EDEDF5", - "activityBarForeground": "#705697" + "pickerGroup.foreground": "#A6B39B", + "pickerGroup.border": "#749351", + "list.activeSelectionForeground": "#6c6c6c", + "list.focusBackground": "#CADEB9", + "list.activeSelectionBackground": "#c4d9b1", + "list.inactiveSelectionBackground": "#d3dbcd", + "list.highlightForeground": "#9769dc", + "selection.background": "#C9D0D9", + "editor.background": "#F5F5F5", + "editorWhitespace.foreground": "#AAAAAA", + "editor.lineHighlightBackground": "#E4F6D4", + "editor.selectionBackground": "#C9D0D9", + "panel.background": "#F5F5F5", + "sideBar.background": "#F2F2F2", + "sideBarSectionHeader.background": "#ede8ef", + "editorLineNumber.foreground": "#9DA39A", + "editorCursor.foreground": "#54494B", + "inputOption.activeBorder": "#adafb7", + "dropdown.background": "#F5F5F5", + "editor.findMatchBackground": "#BF9CAC", + "editor.findMatchHighlightBackground": "#edc9d8", + "peekViewEditor.matchHighlightBackground": "#C2DFE3", + "peekViewTitle.background": "#F2F8FC", + "peekViewEditor.background": "#F2F8FC", + "peekViewResult.background": "#F2F8FC", + "peekView.border": "#705697", + "peekViewResult.matchHighlightBackground": "#93C6D6", + "statusBar.background": "#705697", + "statusBar.noFolderBackground": "#705697", + "statusBar.debuggingBackground": "#705697", + "activityBar.background": "#EDEDF5", + "activityBar.foreground": "#705697", + "activityBarBadge.background": "#705697", + "titleBar.activeBackground": "#c4b7d7", + "button.background": "#705697", + "notification.background": "#442e66", + "editorGroup.dropBackground": "#C9D0D988", + "inputValidation.infoBorder": "#4ec1e5", + "inputValidation.infoBackground": "#f2fcff", + "inputValidation.warningBackground": "#fffee2", + "inputValidation.warningBorder": "#ffe055", + "inputValidation.errorBackground": "#ffeaea", + "inputValidation.errorBorder": "#f1897f", + "errorForeground": "#ffeaea", + "badge.background": "#705697AA", + "progressBar.background": "#705697" } } \ No newline at end of file diff --git a/extensions/theme-red/themes/Red-color-theme.json b/extensions/theme-red/themes/Red-color-theme.json index 928472265fdc3..94d2c20ae2beb 100644 --- a/extensions/theme-red/themes/Red-color-theme.json +++ b/extensions/theme-red/themes/Red-color-theme.json @@ -2,55 +2,60 @@ "tokenColors": "./red.tmTheme", "colors": { // window - "activityBarBadgeBackground": "#DB7E58", - "activityBarBackground": "#580000", - "tabInactiveBackground": "#300a0a", - "tabActiveBackground": "#490000", - "sideBarBackground": "#330000", - "statusBarBackground": "#700000", - "statusBarNoFolderBackground": "#700000", - "tabsContainerBackground": "#330000", - "titleBarActiveBackground": "#770000", - "titleBarInactiveBackground": "#773333", + "activityBar.background": "#580000", + "tab.inactiveBackground": "#300a0a", + "tab.activeBackground": "#490000", + "sideBar.background": "#330000", + "statusBar.background": "#700000", + "statusBar.noFolderBackground": "#700000", + "editorGroupHeader.tabsBackground": "#330000", + "titleBar.activeBackground": "#770000", + "titleBar.inactiveBackground": "#772222", + "selection.background": "#ff777788", // editor - "editorBackground": "#390000", - "editorGroupBorder": "#ff666633", - "editorCursor": "#970000", - "editorForeground": "#F8F8F8", - "editorWhitespaces": "#c10000", - "editorSelection": "#750000", - "editorLineNumbers": "#ff777788", - "editorWidgetBackground": "#300000", - "editorHoverBackground": "#300000", - "editorSuggestWidgetBackground": "#300000", - "editorSuggestWidgetBorder": "#220000", - "editorLineHighlight": "#ff000033", - "editorHoverHighlight": "#ff000044", - "editorSelectionHighlight": "#f5500039", - "editorLinkForeground": "#D69B6A", - "editorActiveLinkForeground": "#FFD0AA", - "peekViewTitleBackground": "#550000", - "peekViewBorder": "#ff000044", - "peekViewResultsBackground": "#400000", - "peekViewEditorBackground": "#300000", + "editor.background": "#390000", + "editorGroup.border": "#ff666633", + "editorGroup.background": "#1c0101", + "editorCursor.foreground": "#970000", + "editor.foreground": "#F8F8F8", + "editorWhitespace.foreground": "#c10000", + "editor.selectionBackground": "#750000", + "editorLineNumber.foreground": "#ff777788", + "editorWidget.background": "#300000", + "editorHoverWidget.background": "#300000", + "editorSuggestWidget.background": "#300000", + "editorSuggestWidget.border": "#220000", + "editor.lineHighlightBackground": "#ff000033", + "editor.hoverHighlightBackground": "#ff000044", + "editor.selectionHighlightBackground": "#f5500039", + "editorLink.activeForeground": "#FFD0AA", + "peekViewTitle.background": "#550000", + "peekView.border": "#ff000044", + "peekViewResult.background": "#400000", + "peekViewEditor.background": "#300000", // UI + "debugToolBar.background": "#660000", "focusBorder": "#ff6666aa", - "buttonBackground": "#885555", - "buttonHoverBackground": "#aa5555", - "dropdownBackground": "#580000", - "inputBoxBackground": "#580000", - "inputBoxActiveOptionBorder": "#cc0000", - "inputValidationInfoBackground": "#550000", - "inputValidationInfoBorder": "#773333", - "listHoverBackground": "#800000", - "listActiveSelectionBackground": "#700000", - "listInactiveSelectionBackground": "#770000", - "listFocusBackground": "#660000", - "listFocusAndSelectionBackground": "#880000", - "listHighlightForeground": "#ff4444", - "notificationsBackground": "#662222", - "pickerGroupForeground": "#cc9999", - "pickerGroupBorder": "#ff000033" + "button.background": "#833", + "dropdown.background": "#580000", + "input.background": "#580000", + "inputOption.activeBorder": "#cc0000", + "inputValidation.infoBackground": "#550000", + "inputValidation.infoBorder": "#DB7E58", + "list.hoverBackground": "#800000", + "list.activeSelectionBackground": "#880000", + "list.inactiveSelectionBackground": "#770000", + "list.dropBackground": "#662222", + "list.focusBackground": "#660000", + "list.highlightForeground": "#ff4444", + "notification.background": "#662222", + "pickerGroup.foreground": "#cc9999", + "pickerGroup.border": "#ff000033", + "badge.background": "#cc3333", + "progressBar.background": "#cc3333", + "errorForeground": "#ffeaea", + "extensionButton.prominentBackground": "#cc3333", + "extensionButton.prominentHoverBackground": "#cc333388" }, "name": "Red" } \ No newline at end of file diff --git a/extensions/theme-seti/.vscodeignore b/extensions/theme-seti/.vscodeignore new file mode 100644 index 0000000000000..e390b124a6b8f --- /dev/null +++ b/extensions/theme-seti/.vscodeignore @@ -0,0 +1 @@ +build/** \ No newline at end of file diff --git a/extensions/theme-seti/build/update-icon-theme.js b/extensions/theme-seti/build/update-icon-theme.js index 7f44c3ac2450e..a2a2bbd840c0d 100644 --- a/extensions/theme-seti/build/update-icon-theme.js +++ b/extensions/theme-seti/build/update-icon-theme.js @@ -212,6 +212,14 @@ exports.update = function () { } var res = { + information_for_contributors: [ + 'This file has been generated from data in https://github.com/jesseweed/seti-ui:', + '- icon definitions: styles/_fonts/seti.less', + '- icon colors: styles/ui-variables.less', + '- file associations: styles/icons/mapping.less', + 'If you want to provide a fix or improvement, please create a pull request against the jesseweed/seti-ui repository.', + 'Once accepted there, we are happy to receive an update request.', + ], fonts: [{ id: "seti", src: [{ "path": "./seti.woff", "format": "woff" }], diff --git a/extensions/theme-seti/icons/seti.woff b/extensions/theme-seti/icons/seti.woff index d1411ae522183..5dd4c46c58c12 100644 Binary files a/extensions/theme-seti/icons/seti.woff and b/extensions/theme-seti/icons/seti.woff differ diff --git a/extensions/theme-seti/icons/vs-seti-icon-theme.json b/extensions/theme-seti/icons/vs-seti-icon-theme.json index 27c00bcc1cd5c..46e757af3f69c 100644 --- a/extensions/theme-seti/icons/vs-seti-icon-theme.json +++ b/extensions/theme-seti/icons/vs-seti-icon-theme.json @@ -1,4 +1,12 @@ { + "information_for_contributors": [ + "This file has been generated from data in https://github.com/jesseweed/seti-ui:", + "- icon definitions: styles/_fonts/seti.less", + "- icon colors: styles/ui-variables.less", + "- file associations: styles/icons/mapping.less", + "If you want to provide a fix or improvement, please create a pull request against the jesseweed/seti-ui repository.", + "Once accepted there, we are happy to receive an update request." + ], "fonts": [ { "id": "seti", @@ -106,775 +114,807 @@ "fontCharacter": "\\E00E", "fontColor": "#6d8086" }, - "_coffee_light": { + "_code-climate_light": { + "fontCharacter": "\\E00F", + "fontColor": "#723eb6" + }, + "_code-climate": { "fontCharacter": "\\E00F", + "fontColor": "#8dc149" + }, + "_coffee_light": { + "fontCharacter": "\\E010", "fontColor": "#3434be" }, "_coffee": { - "fontCharacter": "\\E00F", + "fontCharacter": "\\E010", "fontColor": "#cbcb41" }, "_coffee_erb": { - "fontCharacter": "\\E010" + "fontCharacter": "\\E011" }, "_coldfusion_light": { - "fontCharacter": "\\E011", + "fontCharacter": "\\E012", "fontColor": "#ae6545" }, "_coldfusion": { - "fontCharacter": "\\E011", + "fontCharacter": "\\E012", "fontColor": "#519aba" }, "_config_light": { - "fontCharacter": "\\E012", + "fontCharacter": "\\E013", "fontColor": "#927f79" }, "_config": { - "fontCharacter": "\\E012", + "fontCharacter": "\\E013", "fontColor": "#6d8086" }, "_cpp_light": { - "fontCharacter": "\\E013", + "fontCharacter": "\\E014", "fontColor": "#5f8b3b" }, "_cpp": { - "fontCharacter": "\\E013", + "fontCharacter": "\\E014", "fontColor": "#a074c4" }, "_css_light": { - "fontCharacter": "\\E014", + "fontCharacter": "\\E015", "fontColor": "#ae6545" }, "_css": { - "fontCharacter": "\\E014", + "fontCharacter": "\\E015", "fontColor": "#519aba" }, "_csv_light": { - "fontCharacter": "\\E015", + "fontCharacter": "\\E016", "fontColor": "#723eb6" }, "_csv": { - "fontCharacter": "\\E015", + "fontCharacter": "\\E016", "fontColor": "#8dc149" }, "_d_light": { - "fontCharacter": "\\E016", + "fontCharacter": "\\E017", "fontColor": "#33c1bb" }, "_d": { - "fontCharacter": "\\E016", + "fontCharacter": "\\E017", "fontColor": "#cc3e44" }, "_db_light": { - "fontCharacter": "\\E017", + "fontCharacter": "\\E018", "fontColor": "#aac7a" }, "_db": { - "fontCharacter": "\\E017", + "fontCharacter": "\\E018", "fontColor": "#f55385" }, "_default_light": { - "fontCharacter": "\\E018", + "fontCharacter": "\\E019", "fontColor": "#2b2829" }, "_default": { - "fontCharacter": "\\E018", + "fontCharacter": "\\E019", "fontColor": "#d4d7d6" }, "_deprecation-cop": { - "fontCharacter": "\\E019" + "fontCharacter": "\\E01A" }, "_docker_light": { - "fontCharacter": "\\E01A", - "fontColor": "#ae6545" + "fontCharacter": "\\E01B", + "fontColor": "#aac7a" }, "_docker": { - "fontCharacter": "\\E01A", - "fontColor": "#519aba" - }, - "_editorconfig_light": { "fontCharacter": "\\E01B", - "fontColor": "#ae6545" + "fontColor": "#f55385" }, "_editorconfig": { - "fontCharacter": "\\E01B", - "fontColor": "#519aba" + "fontCharacter": "\\E01C" }, "_ejs_light": { - "fontCharacter": "\\E01C", + "fontCharacter": "\\E01D", "fontColor": "#3434be" }, "_ejs": { - "fontCharacter": "\\E01C", + "fontCharacter": "\\E01D", "fontColor": "#cbcb41" }, "_elixir_light": { - "fontCharacter": "\\E01D", + "fontCharacter": "\\E01E", "fontColor": "#5f8b3b" }, "_elixir": { - "fontCharacter": "\\E01D", + "fontCharacter": "\\E01E", "fontColor": "#a074c4" }, "_elixir_script_light": { - "fontCharacter": "\\E01E", + "fontCharacter": "\\E01F", "fontColor": "#5f8b3b" }, "_elixir_script": { - "fontCharacter": "\\E01E", + "fontCharacter": "\\E01F", "fontColor": "#a074c4" }, "_elm_light": { - "fontCharacter": "\\E01F", + "fontCharacter": "\\E020", "fontColor": "#ae6545" }, "_elm": { - "fontCharacter": "\\E01F", + "fontCharacter": "\\E020", "fontColor": "#519aba" }, "_error": { - "fontCharacter": "\\E020" + "fontCharacter": "\\E021" }, "_eslint_light": { - "fontCharacter": "\\E021", - "fontColor": "#5f8b3b" + "fontCharacter": "\\E022", + "fontColor": "#b2a5a1" }, "_eslint": { - "fontCharacter": "\\E021", - "fontColor": "#a074c4" + "fontCharacter": "\\E022", + "fontColor": "#4d5a5e" + }, + "_f-sharp_light": { + "fontCharacter": "\\E023", + "fontColor": "#ae6545" + }, + "_f-sharp": { + "fontCharacter": "\\E023", + "fontColor": "#519aba" }, "_favicon_light": { - "fontCharacter": "\\E022", + "fontCharacter": "\\E024", "fontColor": "#3434be" }, "_favicon": { - "fontCharacter": "\\E022", + "fontCharacter": "\\E024", "fontColor": "#cbcb41" }, "_folder": { - "fontCharacter": "\\E023" + "fontCharacter": "\\E025" }, "_font_light": { - "fontCharacter": "\\E024", + "fontCharacter": "\\E026", "fontColor": "#33c1bb" }, "_font": { - "fontCharacter": "\\E024", + "fontCharacter": "\\E026", "fontColor": "#cc3e44" }, "_git_folder": { - "fontCharacter": "\\E025" + "fontCharacter": "\\E027" }, "_git_ignore": { - "fontCharacter": "\\E026" + "fontCharacter": "\\E028" }, "_github_light": { - "fontCharacter": "\\E027", + "fontCharacter": "\\E029", "fontColor": "#2b2829" }, "_github": { - "fontCharacter": "\\E027", + "fontCharacter": "\\E029", "fontColor": "#d4d7d6" }, "_go_light": { - "fontCharacter": "\\E028", + "fontCharacter": "\\E02A", "fontColor": "#ae6545" }, "_go": { - "fontCharacter": "\\E028", + "fontCharacter": "\\E02A", "fontColor": "#519aba" }, "_go2_light": { - "fontCharacter": "\\E029", + "fontCharacter": "\\E02B", "fontColor": "#ae6545" }, "_go2": { - "fontCharacter": "\\E029", + "fontCharacter": "\\E02B", "fontColor": "#519aba" }, "_gradle_light": { - "fontCharacter": "\\E02A", + "fontCharacter": "\\E02C", "fontColor": "#723eb6" }, "_gradle": { - "fontCharacter": "\\E02A", + "fontCharacter": "\\E02C", "fontColor": "#8dc149" }, "_grails_light": { - "fontCharacter": "\\E02B", + "fontCharacter": "\\E02D", "fontColor": "#723eb6" }, "_grails": { - "fontCharacter": "\\E02B", + "fontCharacter": "\\E02D", "fontColor": "#8dc149" }, "_grunt_light": { - "fontCharacter": "\\E02C", + "fontCharacter": "\\E02E", "fontColor": "#1c86cc" }, "_grunt": { - "fontCharacter": "\\E02C", + "fontCharacter": "\\E02E", "fontColor": "#e37933" }, "_gulp_light": { - "fontCharacter": "\\E02D", + "fontCharacter": "\\E02F", "fontColor": "#33c1bb" }, "_gulp": { - "fontCharacter": "\\E02D", + "fontCharacter": "\\E02F", "fontColor": "#cc3e44" }, "_hacklang": { - "fontCharacter": "\\E02E" + "fontCharacter": "\\E030" }, "_haml_light": { - "fontCharacter": "\\E02F", + "fontCharacter": "\\E031", "fontColor": "#33c1bb" }, "_haml": { - "fontCharacter": "\\E02F", + "fontCharacter": "\\E031", "fontColor": "#cc3e44" }, "_haskell_light": { - "fontCharacter": "\\E030", + "fontCharacter": "\\E032", "fontColor": "#5f8b3b" }, "_haskell": { - "fontCharacter": "\\E030", + "fontCharacter": "\\E032", "fontColor": "#a074c4" }, "_heroku_light": { - "fontCharacter": "\\E031", + "fontCharacter": "\\E033", "fontColor": "#5f8b3b" }, "_heroku": { - "fontCharacter": "\\E031", + "fontCharacter": "\\E033", "fontColor": "#a074c4" }, "_hex_light": { - "fontCharacter": "\\E032", + "fontCharacter": "\\E034", "fontColor": "#33c1bb" }, "_hex": { - "fontCharacter": "\\E032", + "fontCharacter": "\\E034", "fontColor": "#cc3e44" }, "_html_light": { - "fontCharacter": "\\E033", + "fontCharacter": "\\E035", "fontColor": "#1c86cc" }, "_html": { - "fontCharacter": "\\E033", + "fontCharacter": "\\E035", "fontColor": "#e37933" }, "_html_erb": { - "fontCharacter": "\\E034" + "fontCharacter": "\\E036" }, "_ignored_light": { - "fontCharacter": "\\E035", + "fontCharacter": "\\E037", "fontColor": "#beaca4" }, "_ignored": { - "fontCharacter": "\\E035", + "fontCharacter": "\\E037", "fontColor": "#41535b" }, "_illustrator_light": { - "fontCharacter": "\\E036", + "fontCharacter": "\\E038", "fontColor": "#3434be" }, "_illustrator": { - "fontCharacter": "\\E036", + "fontCharacter": "\\E038", "fontColor": "#cbcb41" }, "_image_light": { - "fontCharacter": "\\E037", + "fontCharacter": "\\E039", "fontColor": "#5f8b3b" }, "_image": { - "fontCharacter": "\\E037", + "fontCharacter": "\\E039", "fontColor": "#a074c4" }, + "_info_light": { + "fontCharacter": "\\E03A", + "fontColor": "#ae6545" + }, "_info": { - "fontCharacter": "\\E038" + "fontCharacter": "\\E03A", + "fontColor": "#519aba" }, "_ionic_light": { - "fontCharacter": "\\E039", + "fontCharacter": "\\E03B", "fontColor": "#ae6545" }, "_ionic": { - "fontCharacter": "\\E039", + "fontCharacter": "\\E03B", "fontColor": "#519aba" }, "_jade_light": { - "fontCharacter": "\\E03A", + "fontCharacter": "\\E03C", "fontColor": "#33c1bb" }, "_jade": { - "fontCharacter": "\\E03A", + "fontCharacter": "\\E03C", "fontColor": "#cc3e44" }, "_java_light": { - "fontCharacter": "\\E03B", + "fontCharacter": "\\E03D", "fontColor": "#33c1bb" }, "_java": { - "fontCharacter": "\\E03B", + "fontCharacter": "\\E03D", "fontColor": "#cc3e44" }, "_javascript_light": { - "fontCharacter": "\\E03C", + "fontCharacter": "\\E03E", "fontColor": "#ae6545" }, "_javascript": { - "fontCharacter": "\\E03C", + "fontCharacter": "\\E03E", "fontColor": "#519aba" }, + "_jenkins_light": { + "fontCharacter": "\\E03F", + "fontColor": "#33c1bb" + }, + "_jenkins": { + "fontCharacter": "\\E03F", + "fontColor": "#cc3e44" + }, "_js_erb": { - "fontCharacter": "\\E03D" + "fontCharacter": "\\E040" }, "_json_light": { - "fontCharacter": "\\E03E", + "fontCharacter": "\\E041", "fontColor": "#3434be" }, "_json": { - "fontCharacter": "\\E03E", + "fontCharacter": "\\E041", "fontColor": "#cbcb41" }, "_julia_light": { - "fontCharacter": "\\E03F", + "fontCharacter": "\\E042", "fontColor": "#5f8b3b" }, "_julia": { - "fontCharacter": "\\E03F", + "fontCharacter": "\\E042", "fontColor": "#a074c4" }, "_karma_light": { - "fontCharacter": "\\E040", + "fontCharacter": "\\E043", "fontColor": "#723eb6" }, "_karma": { - "fontCharacter": "\\E040", + "fontCharacter": "\\E043", "fontColor": "#8dc149" }, "_less_light": { - "fontCharacter": "\\E041", + "fontCharacter": "\\E044", "fontColor": "#ae6545" }, "_less": { - "fontCharacter": "\\E041", + "fontCharacter": "\\E044", "fontColor": "#519aba" }, "_license_light": { - "fontCharacter": "\\E042", + "fontCharacter": "\\E045", "fontColor": "#33c1bb" }, "_license": { - "fontCharacter": "\\E042", + "fontCharacter": "\\E045", "fontColor": "#cc3e44" }, "_liquid_light": { - "fontCharacter": "\\E043", + "fontCharacter": "\\E046", "fontColor": "#723eb6" }, "_liquid": { - "fontCharacter": "\\E043", + "fontCharacter": "\\E046", "fontColor": "#8dc149" }, "_livescript_light": { - "fontCharacter": "\\E044", + "fontCharacter": "\\E047", "fontColor": "#ae6545" }, "_livescript": { - "fontCharacter": "\\E044", + "fontCharacter": "\\E047", "fontColor": "#519aba" }, "_lua_light": { - "fontCharacter": "\\E045", + "fontCharacter": "\\E048", "fontColor": "#ae6545" }, "_lua": { - "fontCharacter": "\\E045", + "fontCharacter": "\\E048", "fontColor": "#519aba" }, "_makefile_light": { - "fontCharacter": "\\E046", + "fontCharacter": "\\E049", "fontColor": "#ae6545" }, "_makefile": { - "fontCharacter": "\\E046", + "fontCharacter": "\\E049", "fontColor": "#519aba" }, "_markdown_light": { - "fontCharacter": "\\E047", - "fontColor": "#aac7a" + "fontCharacter": "\\E04A", + "fontColor": "#ae6545" }, "_markdown": { - "fontCharacter": "\\E047", - "fontColor": "#f55385" + "fontCharacter": "\\E04A", + "fontColor": "#519aba" }, "_maven_light": { - "fontCharacter": "\\E048", + "fontCharacter": "\\E04B", "fontColor": "#33c1bb" }, "_maven": { - "fontCharacter": "\\E048", + "fontCharacter": "\\E04B", "fontColor": "#cc3e44" }, "_mdo_light": { - "fontCharacter": "\\E049", + "fontCharacter": "\\E04C", "fontColor": "#33c1bb" }, "_mdo": { - "fontCharacter": "\\E049", + "fontCharacter": "\\E04C", "fontColor": "#cc3e44" }, "_mustache_light": { - "fontCharacter": "\\E04A", + "fontCharacter": "\\E04D", "fontColor": "#1c86cc" }, "_mustache": { - "fontCharacter": "\\E04A", + "fontCharacter": "\\E04D", "fontColor": "#e37933" }, "_new-file": { - "fontCharacter": "\\E04B" + "fontCharacter": "\\E04E" }, "_npm_light": { - "fontCharacter": "\\E04C", + "fontCharacter": "\\E04F", "fontColor": "#33c1bb" }, "_npm": { - "fontCharacter": "\\E04C", + "fontCharacter": "\\E04F", "fontColor": "#cc3e44" }, "_npm_ignored_light": { - "fontCharacter": "\\E04D", + "fontCharacter": "\\E050", "fontColor": "#beaca4" }, "_npm_ignored": { - "fontCharacter": "\\E04D", + "fontCharacter": "\\E050", "fontColor": "#41535b" }, "_nunjucks_light": { - "fontCharacter": "\\E04E", + "fontCharacter": "\\E051", "fontColor": "#723eb6" }, "_nunjucks": { - "fontCharacter": "\\E04E", + "fontCharacter": "\\E051", "fontColor": "#8dc149" }, "_ocaml_light": { - "fontCharacter": "\\E04F", + "fontCharacter": "\\E052", "fontColor": "#1c86cc" }, "_ocaml": { - "fontCharacter": "\\E04F", + "fontCharacter": "\\E052", "fontColor": "#e37933" }, "_pdf_light": { - "fontCharacter": "\\E050", + "fontCharacter": "\\E053", "fontColor": "#33c1bb" }, "_pdf": { - "fontCharacter": "\\E050", + "fontCharacter": "\\E053", "fontColor": "#cc3e44" }, "_perl_light": { - "fontCharacter": "\\E051", + "fontCharacter": "\\E054", "fontColor": "#ae6545" }, "_perl": { - "fontCharacter": "\\E051", + "fontCharacter": "\\E054", "fontColor": "#519aba" }, "_photoshop_light": { - "fontCharacter": "\\E052", + "fontCharacter": "\\E055", "fontColor": "#ae6545" }, "_photoshop": { - "fontCharacter": "\\E052", + "fontCharacter": "\\E055", "fontColor": "#519aba" }, "_php_light": { - "fontCharacter": "\\E053", + "fontCharacter": "\\E056", "fontColor": "#5f8b3b" }, "_php": { - "fontCharacter": "\\E053", + "fontCharacter": "\\E056", "fontColor": "#a074c4" }, + "_powershell_light": { + "fontCharacter": "\\E057", + "fontColor": "#ae6545" + }, + "_powershell": { + "fontCharacter": "\\E057", + "fontColor": "#519aba" + }, "_project": { - "fontCharacter": "\\E054" + "fontCharacter": "\\E058" }, "_pug_light": { - "fontCharacter": "\\E055", - "fontColor": "#ae6545" + "fontCharacter": "\\E059", + "fontColor": "#33c1bb" }, "_pug": { - "fontCharacter": "\\E055", - "fontColor": "#519aba" + "fontCharacter": "\\E059", + "fontColor": "#cc3e44" }, "_puppet_light": { - "fontCharacter": "\\E056", + "fontCharacter": "\\E05A", "fontColor": "#3434be" }, "_puppet": { - "fontCharacter": "\\E056", + "fontCharacter": "\\E05A", "fontColor": "#cbcb41" }, "_python_light": { - "fontCharacter": "\\E057", + "fontCharacter": "\\E05B", "fontColor": "#ae6545" }, "_python": { - "fontCharacter": "\\E057", + "fontCharacter": "\\E05B", "fontColor": "#519aba" }, "_rails": { - "fontCharacter": "\\E058" + "fontCharacter": "\\E05C" }, "_react_light": { - "fontCharacter": "\\E059", + "fontCharacter": "\\E05D", "fontColor": "#ae6545" }, "_react": { - "fontCharacter": "\\E059", + "fontCharacter": "\\E05D", "fontColor": "#519aba" }, "_rollup_light": { - "fontCharacter": "\\E05A", + "fontCharacter": "\\E05E", "fontColor": "#33c1bb" }, "_rollup": { - "fontCharacter": "\\E05A", + "fontCharacter": "\\E05E", "fontColor": "#cc3e44" }, "_ruby_light": { - "fontCharacter": "\\E05B", + "fontCharacter": "\\E05F", "fontColor": "#33c1bb" }, "_ruby": { - "fontCharacter": "\\E05B", + "fontCharacter": "\\E05F", "fontColor": "#cc3e44" }, "_rust_light": { - "fontCharacter": "\\E05C", + "fontCharacter": "\\E060", "fontColor": "#927f79" }, "_rust": { - "fontCharacter": "\\E05C", + "fontCharacter": "\\E060", "fontColor": "#6d8086" }, "_salesforce_light": { - "fontCharacter": "\\E05D", + "fontCharacter": "\\E061", "fontColor": "#ae6545" }, "_salesforce": { - "fontCharacter": "\\E05D", + "fontCharacter": "\\E061", "fontColor": "#519aba" }, "_sass_light": { - "fontCharacter": "\\E05E", + "fontCharacter": "\\E062", "fontColor": "#aac7a" }, "_sass": { - "fontCharacter": "\\E05E", + "fontCharacter": "\\E062", "fontColor": "#f55385" }, "_sbt_light": { - "fontCharacter": "\\E05F", + "fontCharacter": "\\E063", "fontColor": "#ae6545" }, "_sbt": { - "fontCharacter": "\\E05F", + "fontCharacter": "\\E063", "fontColor": "#519aba" }, "_scala_light": { - "fontCharacter": "\\E060", + "fontCharacter": "\\E064", "fontColor": "#33c1bb" }, "_scala": { - "fontCharacter": "\\E060", + "fontCharacter": "\\E064", "fontColor": "#cc3e44" }, "_search": { - "fontCharacter": "\\E061" + "fontCharacter": "\\E065" }, "_settings": { - "fontCharacter": "\\E062" + "fontCharacter": "\\E066" }, "_shell_light": { - "fontCharacter": "\\E063", + "fontCharacter": "\\E067", "fontColor": "#b2a5a1" }, "_shell": { - "fontCharacter": "\\E063", + "fontCharacter": "\\E067", "fontColor": "#4d5a5e" }, "_slim_light": { - "fontCharacter": "\\E064", + "fontCharacter": "\\E068", "fontColor": "#1c86cc" }, "_slim": { - "fontCharacter": "\\E064", + "fontCharacter": "\\E068", "fontColor": "#e37933" }, "_smarty_light": { - "fontCharacter": "\\E065", + "fontCharacter": "\\E069", "fontColor": "#3434be" }, "_smarty": { - "fontCharacter": "\\E065", + "fontCharacter": "\\E069", "fontColor": "#cbcb41" }, "_spring_light": { - "fontCharacter": "\\E066", + "fontCharacter": "\\E06A", "fontColor": "#723eb6" }, "_spring": { - "fontCharacter": "\\E066", + "fontCharacter": "\\E06A", "fontColor": "#8dc149" }, "_stylus_light": { - "fontCharacter": "\\E067", + "fontCharacter": "\\E06B", "fontColor": "#723eb6" }, "_stylus": { - "fontCharacter": "\\E067", + "fontCharacter": "\\E06B", "fontColor": "#8dc149" }, "_sublime_light": { - "fontCharacter": "\\E068", + "fontCharacter": "\\E06C", "fontColor": "#1c86cc" }, "_sublime": { - "fontCharacter": "\\E068", + "fontCharacter": "\\E06C", "fontColor": "#e37933" }, "_svg_light": { - "fontCharacter": "\\E069", + "fontCharacter": "\\E06D", "fontColor": "#5f8b3b" }, "_svg": { - "fontCharacter": "\\E069", + "fontCharacter": "\\E06D", "fontColor": "#a074c4" }, "_swift_light": { - "fontCharacter": "\\E06A", + "fontCharacter": "\\E06E", "fontColor": "#1c86cc" }, "_swift": { - "fontCharacter": "\\E06A", + "fontCharacter": "\\E06E", "fontColor": "#e37933" }, "_terraform_light": { - "fontCharacter": "\\E06B", + "fontCharacter": "\\E06F", "fontColor": "#5f8b3b" }, "_terraform": { - "fontCharacter": "\\E06B", + "fontCharacter": "\\E06F", "fontColor": "#a074c4" }, "_tex_light": { - "fontCharacter": "\\E06C", + "fontCharacter": "\\E070", "fontColor": "#2b2829" }, "_tex": { - "fontCharacter": "\\E06C", + "fontCharacter": "\\E070", "fontColor": "#d4d7d6" }, "_time-cop": { - "fontCharacter": "\\E06D" + "fontCharacter": "\\E071" }, "_todo": { - "fontCharacter": "\\E06E" + "fontCharacter": "\\E072" }, "_twig_light": { - "fontCharacter": "\\E06F", + "fontCharacter": "\\E073", "fontColor": "#723eb6" }, "_twig": { - "fontCharacter": "\\E06F", + "fontCharacter": "\\E073", "fontColor": "#8dc149" }, "_typescript_light": { - "fontCharacter": "\\E070", + "fontCharacter": "\\E074", "fontColor": "#ae6545" }, "_typescript": { - "fontCharacter": "\\E070", + "fontCharacter": "\\E074", "fontColor": "#519aba" }, "_vala_light": { - "fontCharacter": "\\E071", + "fontCharacter": "\\E075", "fontColor": "#927f79" }, "_vala": { - "fontCharacter": "\\E071", + "fontCharacter": "\\E075", "fontColor": "#6d8086" }, "_video_light": { - "fontCharacter": "\\E072", + "fontCharacter": "\\E076", "fontColor": "#aac7a" }, "_video": { - "fontCharacter": "\\E072", + "fontCharacter": "\\E076", "fontColor": "#f55385" }, "_vue_light": { - "fontCharacter": "\\E073", - "fontColor": "#bc94db" + "fontCharacter": "\\E077", + "fontColor": "#723eb6" }, "_vue": { - "fontCharacter": "\\E073", - "fontColor": "#436b24" + "fontCharacter": "\\E077", + "fontColor": "#8dc149" }, "_windows_light": { - "fontCharacter": "\\E074", + "fontCharacter": "\\E078", "fontColor": "#ae6545" }, "_windows": { - "fontCharacter": "\\E074", + "fontCharacter": "\\E078", "fontColor": "#519aba" }, "_word_light": { - "fontCharacter": "\\E075", + "fontCharacter": "\\E079", "fontColor": "#ae6545" }, "_word": { - "fontCharacter": "\\E075", + "fontCharacter": "\\E079", "fontColor": "#519aba" }, "_xls_light": { - "fontCharacter": "\\E076", + "fontCharacter": "\\E07A", "fontColor": "#723eb6" }, "_xls": { - "fontCharacter": "\\E076", + "fontCharacter": "\\E07A", "fontColor": "#8dc149" }, "_xml_light": { - "fontCharacter": "\\E077", + "fontCharacter": "\\E07B", "fontColor": "#1c86cc" }, "_xml": { - "fontCharacter": "\\E077", + "fontCharacter": "\\E07B", "fontColor": "#e37933" }, "_yarn_light": { - "fontCharacter": "\\E078", + "fontCharacter": "\\E07C", "fontColor": "#ae6545" }, "_yarn": { - "fontCharacter": "\\E078", + "fontCharacter": "\\E07C", "fontColor": "#519aba" }, "_yml_light": { - "fontCharacter": "\\E079", + "fontCharacter": "\\E07D", "fontColor": "#5f8b3b" }, "_yml": { - "fontCharacter": "\\E079", + "fontCharacter": "\\E07D", "fontColor": "#a074c4" } }, @@ -922,6 +962,7 @@ "class": "_java", "classpath": "_java", "js.map": "_javascript", + "spec.js": "_javascript", "es": "_javascript", "es5": "_javascript", "es7": "_javascript", @@ -997,24 +1038,39 @@ "wav": "_audio", "babelrc": "_babel", "bowerrc": "_bower", + "dockerignore": "_docker", + "codeclimate.yml": "_code-climate", "eslintrc": "_eslint", + "eslintrc.js": "_eslint", + "eslintrc.yaml": "_eslint", + "eslintrc.yml": "_eslint", + "eslintrc.json": "_eslint", "eslintignore": "_eslint", "jshintrc": "_javascript", "jscsrc": "_javascript", "direnv": "_config", "env": "_config", "static": "_config", - "editorconfig": "_editorconfig", + "editorconfig": "_config", "slugignore": "_config", "tmp": "_clock", + "htaccess": "_config", "ds_store": "_ignored" }, "fileNames": { "mix": "_hex", + "jenkinsfile": "_jenkins", "karma.conf.js": "_karma", "karma.conf.coffee": "_karma", + "readme.md": "_info", + "changelog.md": "_clock", + "changelog": "_clock", + "version.md": "_clock", + "version": "_clock", "mvnw": "_maven", "bower.json": "_bower", + "docker-healthcheck": "_docker", + "docker-compose.yml": "_docker", "gruntfile.js": "_grunt", "gruntfile.babel.js": "_grunt", "gruntfile.coffee": "_grunt", @@ -1030,7 +1086,6 @@ "copying": "_license", "compiling": "_license", "contributing": "_license", - "readme": "_markdown", "qmakefile": "_makefile", "omakefile": "_makefile", "cmakelists.txt": "_makefile", @@ -1046,6 +1101,7 @@ "csharp": "_c-sharp", "css": "_css", "dockerfile": "_docker", + "fsharp": "_f-sharp", "go": "_go2", "groovy": "_grails", "handlebars": "_mustache", @@ -1062,6 +1118,7 @@ "objective-c": "_c", "perl": "_perl", "php": "_php", + "powershell": "_powershell", "jade": "_jade", "python": "_python", "ruby": "_ruby", @@ -1120,6 +1177,7 @@ "class": "_java_light", "classpath": "_java_light", "js.map": "_javascript_light", + "spec.js": "_javascript_light", "es": "_javascript_light", "es5": "_javascript_light", "es7": "_javascript_light", @@ -1195,16 +1253,23 @@ "wav": "_audio_light", "babelrc": "_babel_light", "bowerrc": "_bower_light", + "dockerignore": "_docker_light", + "codeclimate.yml": "_code-climate_light", "eslintrc": "_eslint_light", + "eslintrc.js": "_eslint_light", + "eslintrc.yaml": "_eslint_light", + "eslintrc.yml": "_eslint_light", + "eslintrc.json": "_eslint_light", "eslintignore": "_eslint_light", "jshintrc": "_javascript_light", "jscsrc": "_javascript_light", "direnv": "_config_light", "env": "_config_light", "static": "_config_light", - "editorconfig": "_editorconfig_light", + "editorconfig": "_config_light", "slugignore": "_config_light", "tmp": "_clock_light", + "htaccess": "_config_light", "ds_store": "_ignored_light" }, "languageIds": { @@ -1215,6 +1280,7 @@ "csharp": "_c-sharp_light", "css": "_css_light", "dockerfile": "_docker_light", + "fsharp": "_f-sharp_light", "go": "_go2_light", "groovy": "_grails_light", "handlebars": "_mustache_light", @@ -1231,6 +1297,7 @@ "objective-c": "_c_light", "perl": "_perl_light", "php": "_php_light", + "powershell": "_powershell_light", "jade": "_jade_light", "python": "_python_light", "ruby": "_ruby_light", @@ -1246,10 +1313,18 @@ }, "fileNames": { "mix": "_hex_light", + "jenkinsfile": "_jenkins_light", "karma.conf.js": "_karma_light", "karma.conf.coffee": "_karma_light", + "readme.md": "_info_light", + "changelog.md": "_clock_light", + "changelog": "_clock_light", + "version.md": "_clock_light", + "version": "_clock_light", "mvnw": "_maven_light", "bower.json": "_bower_light", + "docker-healthcheck": "_docker_light", + "docker-compose.yml": "_docker_light", "gruntfile.js": "_grunt_light", "gruntfile.babel.js": "_grunt_light", "gruntfile.coffee": "_grunt_light", @@ -1265,7 +1340,6 @@ "copying": "_license_light", "compiling": "_license_light", "contributing": "_license_light", - "readme": "_markdown_light", "qmakefile": "_makefile_light", "omakefile": "_makefile_light", "cmakelists.txt": "_makefile_light", @@ -1273,5 +1347,5 @@ "npm-debug.log": "_npm_ignored_light" } }, - "version": "https://github.com/jesseweed/seti-ui/commit/f7e582faec0961ddf783ad4dffed41e0f2da5413" + "version": "https://github.com/jesseweed/seti-ui/commit/f78d62397f6f779ad43b0b5dce2cbfd68e21bf34" } \ No newline at end of file diff --git a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json index 63a31ddf13cd8..5309eb6fd1a19 100644 --- a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json +++ b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json @@ -296,168 +296,184 @@ // Base // "foreground": "", "focusBorder": "#2AA19899", + // "contrastActiveBorder": "", + // "contrastBorder": "", - // "widgetShadow": "", + // "widget.shadow": "", - "inputBoxBackground": "#003847", - "inputBoxForeground": "#93A1A1", - "inputBoxActiveOptionBorder": "#2AA19899", - "inputValidationInfoBorder": "#384078", - "inputValidationInfoBackground": "#051336", - "inputValidationWarningBackground": "#5B7E7A", - "inputValidationWarningBorder": "#5B7E7A", - "inputValidationErrorBackground": "#A22D44", - "inputValidationErrorBorder": "#AB395B", + "selection.background": "#2AA19899", - "dropdownBackground": "#00212B", - "dropdownBorder": "#2AA19899", + "input.background": "#003847", + "input.foreground": "#93A1A1", + "input.placeholderForeground": "#93A1A1AA", + // "input.border": "", - "buttonBackground": "#2AA19899", - "buttonHoverBackground": "#2AA19844", - // "buttonForeground": "", + "inputOption.activeBorder": "#2AA19899", + "inputValidation.infoBorder": "#363b5f", + "inputValidation.infoBackground": "#052730", + "inputValidation.warningBackground": "#5d5938", + "inputValidation.warningBorder": "#9d8a5e", + "inputValidation.errorBackground": "#571b26", + "inputValidation.errorBorder": "#a92049", - "listFocusAndSelectionBackground": "#005A6F", - // "listFocusAndSelectionForeground": "", - "listActiveSelectionBackground": "#004454", - // "listActiveSelectionForeground": "", - "listFocusBackground": "#005A6F", - "listHoverBackground": "#004454AA", - "listInactiveSelectionBackground": "#00445488", - "listDropBackground": "#00445488", - // "listHighlightForeground": "", + "errorForeground": "#ffeaea", - // "scrollbarShadow": "", - // "scrollbarSliderActiveBackground": "", - // "scrollbarSliderBackground": "", - // "scrollbarSliderHoverBackground": "", + "badge.background": "#047aa6", + "progressBar.background": "#047aa6", + + "dropdown.background": "#00212B", + "dropdown.border": "#2AA19899", + // "dropdown.foreground": "", + + "button.background": "#2AA19899", + // "button.foreground": "", + + "list.activeSelectionBackground": "#005A6F", + // "list.activeSelectionForeground": "", + "list.focusBackground": "#005A6F", + "list.hoverBackground": "#004454AA", + "list.inactiveSelectionBackground": "#00445488", + "list.dropBackground": "#00445488", + "list.highlightForeground": "#1ebcc5", + + // "scrollbar.shadow": "", + // "scrollbarSlider.activeBackground": "", + // "scrollbarSlider.background": "", + // "scrollbarSlider.hoverBackground": "", // Editor - "editorBackground": "#002B36", - "editorForeground": "#6688cc", - "editorWidgetBackground": "#00212B", - "editorCursor": "#D30102", - "editorWhitespaces": "#93A1A180", - "editorLineHighlight": "#073642", - "editorSelection": "#073642", - // "editorIndentGuides": "", - "editorHoverBackground": "#004052", - // "editorHoverBorder": "", - // "editorLineNumbers": "", - // "editorMarkerNavigationBackground": "", - // "editorMarkerNavigationError": "", - // "editorMarkerNavigationWarning": "", - // "editorActiveLinkForeground": "", - // "editorFindMatch": "", - // "editorFindMatchHighlight": "", - // "editorFindRangeHighlight": "", - // "editorHoverHighlight": "", - // "editorInactiveSelection": "", - // "editorLineHighlightBorder": "", - // "editorLinkForeground": "", - // "editorRangeHighlight": "", - // "editorSelectionHighlight": "", - // "editorSuggestWidgetBackground": "", - // "editorSuggestWidgetBorder": "", - // "editorWordHighlight": "", - // "editorWordHighlightStrong": "", + "editor.background": "#002B36", + // "editor.foreground": "#6688cc", + "editorWidget.background": "#00212B", + "editorCursor.foreground": "#D30102", + "editorWhitespace.foreground": "#93A1A180", + "editor.lineHighlightBackground": "#073642", + "editor.selectionBackground": "#073642", + // "editorIndentGuide.background": "", + "editorHoverWidget.background": "#004052", + // "editorHoverWidget.border": "", + // "editorLineNumber.foreground": "", + // "editorMarkerNavigation.background": "", + "editorMarkerNavigationError.background": "#AB395B", + "editorMarkerNavigationWarning.background": "#5B7E7A", + // "editorLink.activeForeground": "", + // "editor.findMatchBackground": "", + // "editor.findMatchHighlightBackground": "", + // "editor.findRangeHighlightBackground": "", + // "editor.hoverHighlightBackground": "", + // "editor.inactiveSelectionBackground": "", + // "editor.lineHighlightBorder": "", + // "editor.rangeHighlightBackground": "", + // "editor.selectionHighlightBackground": "", + // "editor.wordHighlightBackground": "", + // "editor.wordHighlightStrongBackground": "", + + // Editor: Suggest + // "editorSuggestWidget.background": "", + // "editorSuggestWidget.border": "", + // "editorSuggestWidget.foreground": "", + // "editorSuggestWidget.highlightForeground": "", + // "editorSuggestWidget.selectedBackground": "", // Editor: Peek View - "peekViewResultsBackground": "#00212B", - // "peekViewResultsMatchForeground": "", - // "peekViewResultsSelectionBackground": "", - // "peekViewResultsSelectionForeground": "", - "peekViewEditorBackground": "#10192c", - "peekViewTitleBackground": "#00212B", - "peekViewBorder": "#2b2b4a", - "peekViewEditorMatchHighlight": "#7744AA40", - // "peekViewResultsFileForeground": "", - // "peekViewResultsMatchHighlight": "", - // "peekViewTitleForeground": "", - // "peekViewTitleInfoForeground": "", + "peekViewResult.background": "#00212B", + // "peekViewResult.lineForeground": "", + // "peekViewResult.selectionBackground": "", + // "peekViewResult.selectionForeground": "", + "peekViewEditor.background": "#10192c", + "peekViewTitle.background": "#00212B", + "peekView.border": "#2b2b4a", + "peekViewEditor.matchHighlightBackground": "#7744AA40", + // "peekViewResult.fileForeground": "", + // "peekViewResult.matchHighlightBackground": "", + // "peekViewTitleLabel.foreground": "", + // "peekViewTitleDescription.foreground": "", // Editor: Diff - // "diffEditorInserted": "", - // "diffEditorInsertedOutline": "", - // "diffEditorRemoved": "", - // "diffEditorRemovedOutline": "", + // "diffEditor.insertedTextBackground": "", + // "diffEditor.insertedTextBorder": "", + // "diffEditor.removedTextBackground": "", + // "diffEditor.removedTextBorder": "", // Workbench: Title - "titleBarActiveBackground": "#002C39", - "titleBarInactiveBackground": "#002C39", + "titleBar.activeBackground": "#002C39", + // "titleBar.inactiveBackground": "", + // "titleBar.activeForeground": "", + // "titleBar.inactiveForeground": "", // Workbench: Editors - // "editorGroupHeaderBackground": "", - "editorGroupBorder": "#00212B", - "editorGroupBackground": "#011b23", - "editorMasterDetailsBorder": "#00212B", - "editorDragAndDropBackground": "#00212BAA", + // "editorGroupHeader.noTabsBackground": "", + "editorGroup.border": "#00212B", + "editorGroup.background": "#011b23", + "editorGroup.dropBackground": "#2AA19844", + "editorGroupHeader.tabsBackground": "#004052", // Workbench: Tabs - "tabActiveEditorGroupActiveForeground": "#d6dbdb", - "tabActiveBackground": "#002B37", - "tabInactiveEditorGroupActiveForeground": "#93A1A1", - "tabInactiveBackground": "#004052", - "tabsContainerBackground": "#004052", - "tabBorder": "#003847", - "tabActiveEditorGroupInactiveForeground": "#93A1A1", - "tabInactiveEditorGroupInactiveForeground": "#93A1A1", + "tab.activeForeground": "#d6dbdb", + "tab.activeBackground": "#002B37", + "tab.inactiveForeground": "#93A1A1", + "tab.inactiveBackground": "#004052", + "tab.border": "#003847", // Workbench: Activity Bar - "activityBarBackground": "#003847", - "activityBarDragAndDropBackground": "#00212B", - "activityBarBadgeBackground": "#047aa6", + "activityBar.background": "#003847", + // "activityBarBadge.background": "", + // "activityBar.dropBackground": "", + // "activityBar.foreground": "", + // "activityBarBadge.foreground": "", // Workbench: Panel - // "panelBackground": "", - "panelBorder": "#2b2b4a", - // "panelActiveTitleBorder": "", - // "panelActiveTitleForeground": "", - // "panelInactiveTitleForeground": "", + // "panel.background": "", + "panel.border": "#2b2b4a", + // "panelTitle.activeBorder": "", + // "panelTitle.activeForeground": "", + // "panelTitle.inactiveForeground": "", // Workbench: Side Bar - "sideBarBackground": "#00212B", - "sideBarTitleForeground": "#93A1A1", - // "sideBarSectionHeaderBackground": "", + "sideBar.background": "#00212B", + "sideBarTitle.foreground": "#93A1A1", + // "sideBarSectionHeader.background": "", // Workbench: Status Bar - "statusBarForeground": "#93A1A1", - "statusBarBackground": "#00212B", - "statusBarDebuggingBackground": "#00212B", - "statusBarNoFolderBackground": "#00212B", - "statusBarProminentItemBackground": "#003847", - "statusBarProminentItemHoverBackground": "#003847", - // "statusBarItemActiveBackground": "", - // "statusBarItemHoverBackground": "", + "statusBar.foreground": "#93A1A1", + "statusBar.background": "#00212B", + "statusBar.debuggingBackground": "#00212B", + "statusBar.noFolderBackground": "#00212B", + "statusBarItem.prominentBackground": "#003847", + "statusBarItem.prominentHoverBackground": "#003847", + // "statusBarItem.activeBackground": "", + // "statusBarItem.hoverBackground": "", // Workbench: Debug - "debugToolBarBackground": "#00212B", - "debugExceptionWidgetBackground": "#00212B", - // "debugExceptionWidgetBorder": "", + "debugToolBar.background": "#00212B", + "debugExceptionWidget.background": "#00212B", + "debugExceptionWidget.border": "#AB395B", // Workbench: Notifications - "notificationsBackground": "#003847", - // "notificationsForeground": "", + "notification.background": "#003847", + // "notification.foreground": "", // Workbench: Quick Open - "pickerGroupForeground": "#2AA19899", - "pickerGroupBorder": "#2AA19899" + "pickerGroup.foreground": "#2AA19899", + "pickerGroup.border": "#2AA19899", // Workbench: Terminal - // "terminalAnsiBlack": "", - // "terminalAnsiBlue": "", - // "terminalAnsiBrightBlack": "", - // "terminalAnsiBrightBlue": "", - // "terminalAnsiBrightCyan": "", - // "terminalAnsiBrightGreen": "", - // "terminalAnsiBrightMagenta": "", - // "terminalAnsiBrightRed": "", - // "terminalAnsiBrightWhite": "", - // "terminalAnsiBrightYellow": "", - // "terminalAnsiCyan": "", - // "terminalAnsiGreen": "", - // "terminalAnsiMagenta": "", - // "terminalAnsiRed": "", - // "terminalAnsiWhite": "", - // "terminalAnsiYellow": "" + // Colors sourced from the official palette http://ethanschoonover.com/solarized + "terminal.ansiBlack": "#073642", + "terminal.ansiRed": "#dc322f", + "terminal.ansiGreen": "#859900", + "terminal.ansiYellow": "#b58900", + "terminal.ansiBlue": "#268bd2", + "terminal.ansiMagenta": "#d33682", + "terminal.ansiCyan": "#2aa198", + "terminal.ansiWhite": "#eee8d5", + "terminal.ansiBrightBlack": "#586e75", + "terminal.ansiBrightRed": "#cb4b16", + "terminal.ansiBrightGreen": "#586e75", + "terminal.ansiBrightYellow": "#657b83", + "terminal.ansiBrightBlue": "#839496", + "terminal.ansiBrightMagenta": "#6c71c4", + "terminal.ansiBrightCyan": "#93a1a1", + "terminal.ansiBrightWhite": "#fdf6e3" } } \ No newline at end of file diff --git a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json index 42b05f7962c54..d52a797a35f53 100644 --- a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json +++ b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json @@ -292,45 +292,191 @@ } ], "colors": { - "editorBackground": "#FDF6E3", - "editorCursor": "#657B83", - "editorWhitespaces": "#586E7580", - "editorLineHighlight": "#EEE8D5", - "editorSelection": "#EEE8D5", - "sideBarBackground": "#EEE8D5", - "sideBarTitleForeground": "#586E75", - "activityBarBackground": "#DDD6C1", - "activityBarForeground": "#584c27", - "activityBarDragAndDropBackground": "#EEE8D5", - "activityBarBadgeBackground": "#B58900", - "editorWidgetBackground": "#EEE8D5", - "inputBoxBackground": "#DDD6C1", - "inputBoxForeground": "#586E75", - "inputBoxActiveOptionBorder": "#2AA19899", - "focusBorder": "#2AA19899", - "titleBarActiveBackground": "#002C39", - "titleBarInactiveBackground": "#002C39", - "statusBarForeground": "#586E75", - "statusBarBackground": "#EEE8D5", - "statusBarDebuggingBackground": "#EEE8D5", - "statusBarNoFolderBackground": "#EEE8D5", - // "tabActiveEditorGroupActiveForeground": "#d6dbdb", - "tabActiveBackground": "#FDF6E3", - "tabInactiveEditorGroupActiveForeground": "#586E75", - "tabInactiveBackground": "#CCC4B0", - "tabsContainerBackground": "#CCC4B0", - "tabBorder": "#DDD6C1", - // "tabActiveEditorGroupInactiveForeground": "#586E75", - // "tabInactiveEditorGroupInactiveForeground": "#586E75", - "debugToolBarBackground": "#EEE8D5", - "dropdownBackground": "#EEE8D5", - "dropdownBorder": "#2AA19899", + // Base + // "foreground": "", + "focusBorder": "#D3AF86", + // "contrastActiveBorder": "", + // "contrastBorder": "", - "peekViewResultsBackground": "#EEE8D5", - "peekViewTitleBackground": "#EEE8D5", - "peekViewEditorMatchHighlight": "#7744AA40", - "editorHoverBackground": "#CCC4B0" + // "widget.shadow": "", + "input.background": "#DDD6C1", + // "input.border": "", + "input.foreground": "#586E75", + "input.placeholderForeground": "#586E75AA", + "inputOption.activeBorder": "#D3AF86", + // "inputValidation.infoBorder": "", + // "inputValidation.infoBackground": "", + // "inputValidation.warningBackground": "", + // "inputValidation.warningBorder": "", + // "inputValidation.errorBackground": "", + // "inputValidation.errorBorder": "", + + "badge.background": "#B58900AA", + "progressBar.background": "#B58900", + + "dropdown.background": "#EEE8D5", + // "dropdown.foreground": "", + "dropdown.border": "#D3AF86", + + "button.background": "#AC9D57", + // "button.foreground": "", + + "selection.background": "#CCC4B0", + + "list.activeSelectionBackground": "#DFCA88", + "list.activeSelectionForeground": "#6C6C6C", + "list.focusBackground": "#DFCA8866", + "list.hoverBackground": "#DFCA8844", + "list.inactiveSelectionBackground": "#D1CBB8", + "list.highlightForeground": "#B58900", + + // "scrollbar.shadow": "", + // "scrollbarSlider.activeBackground": "", + // "scrollbarSlider.background": "", + // "scrollbarSlider.hoverBackground": "", + + // Editor + "editor.background": "#FDF6E3", + // "editor.foreground": "#6688cc", + "editorWidget.background": "#EEE8D5", + "editorCursor.foreground": "#657B83", + "editorWhitespace.foreground": "#586E7580", + "editor.lineHighlightBackground": "#EEE8D5", + "editor.selectionBackground": "#EEE8D5", + // "editorIndentGuide.background": "", + "editorHoverWidget.background": "#CCC4B0", + // "editorHoverWidget.border": "", + // "editorLineNumber.foreground": "", + // "editorMarkerNavigation.background": "", + // "editorMarkerNavigationError.background": "", + // "editorMarkerNavigationWarning.background": "", + // "editorLink.activeForeground": "", + // "editor.findMatchBackground": "", + // "editor.findMatchHighlightBackground": "", + // "editor.findRangeHighlightBackground": "", + // "editor.hoverHighlightBackground": "", + // "editor.inactiveSelectionBackground": "", + // "editor.lineHighlightBorder": "", + // "editor.rangeHighlightBackground": "", + // "editor.selectionHighlightBackground": "", + // "editor.wordHighlightBackground": "", + // "editor.wordHighlightStrongBackground": "", + + // Editor: Suggest Widget + // "editorSuggestWidget.background": "", + // "editorSuggestWidget.border": "", + // "editorSuggestWidget.foreground": "", + // "editorSuggestWidget.highlightForeground": "", + // "editorSuggestWidget.selectedBackground": "", + + // Editor: Peek View + "peekViewResult.background": "#EEE8D5", + // "peekViewResult.lineForeground": "", + // "peekViewResult.selectionBackground": "", + // "peekViewResult.selectionForeground": "", + "peekViewEditor.background": "#FFFBF2", + "peekViewTitle.background": "#EEE8D5", + "peekView.border": "#B58900", + "peekViewEditor.matchHighlightBackground": "#7744AA40", + // "peekViewResult.fileForeground": "", + // "peekViewResult.matchHighlightBackground": "", + // "peekViewTitleLabel.foreground": "", + // "peekViewTitleDescription.foreground": "", + + // Editor: Diff + // "diffEditor.insertedTextBackground": "", + // "diffEditor.insertedTextBorder": "", + // "diffEditor.removedTextBackground": "", + // "diffEditor.removedTextBorder": "", + + // Workbench: Title + "titleBar.activeBackground": "#EEE8D5", + // "titleBar.activeForeground": "", + // "titleBar.inactiveBackground": "", + // "titleBar.inactiveForeground": "", + + // Workbench: Editors + // "editorGroupHeader.noTabsBackground": "", + "editorGroup.border": "#DDD6C1", + "editorGroup.background": "#FFFBF2", + "editorGroup.dropBackground": "#DDD6C1AA", + "editorGroupHeader.tabsBackground": "#D9D2C2", + + // Workbench: Tabs + "tab.border": "#DDD6C1", + "tab.activeBackground": "#FDF6E3", + "tab.inactiveForeground": "#586E75", + "tab.inactiveBackground": "#D3CBB7", + // "tab.activeBackground": "", + // "tab.activeForeground": "", + // "tab.inactiveForeground": "", + + // Workbench: Activity Bar + "activityBar.background": "#DDD6C1", + "activityBar.foreground": "#584c27", + "activityBar.dropBackground": "#EEE8D5", + "activityBarBadge.background": "#B58900", + // "activityBarBadge.foreground": "", + + // Workbench: Panel + // "panel.background": "", + "panel.border": "#DDD6C1", + // "panelTitle.activeBorder": "", + // "panelTitle.activeForeground": "", + // "panelTitle.inactiveForeground": "", + + // Workbench: Side Bar + "sideBar.background": "#EEE8D5", + "sideBarTitle.foreground": "#586E75", + // "sideBarSectionHeader.background": "", + + // Workbench: Status Bar + "statusBar.foreground": "#586E75", + "statusBar.background": "#EEE8D5", + "statusBar.debuggingBackground": "#EEE8D5", + "statusBar.noFolderBackground": "#EEE8D5", + // "statusBar.foreground": "", + "statusBarItem.prominentBackground": "#DDD6C1", + "statusBarItem.prominentHoverBackground": "#DDD6C199", + // "statusBarItem.activeBackground": "", + // "statusBarItem.hoverBackground": "", + + // Workbench: Debug + "debugToolBar.background": "#DDD6C1", + "debugExceptionWidget.background": "#DDD6C1", + "debugExceptionWidget.border": "#AB395B", + + // Workbench: Notifications + "notification.background": "#999178", + // "notification.foreground": "", + + // Workbench: Quick Open + "pickerGroup.border": "#2AA19899", + "pickerGroup.foreground": "#2AA19899", + + // Extensions + "extensionButton.prominentBackground": "#b58900", + "extensionButton.prominentHoverBackground": "#584c27aa", + + // Workbench: Terminal + // Colors sourced from the official palette http://ethanschoonover.com/solarized + "terminal.ansiBlack": "#073642", + "terminal.ansiRed": "#dc322f", + "terminal.ansiGreen": "#859900", + "terminal.ansiYellow": "#b58900", + "terminal.ansiBlue": "#268bd2", + "terminal.ansiMagenta": "#d33682", + "terminal.ansiCyan": "#2aa198", + "terminal.ansiWhite": "#eee8d5", + "terminal.ansiBrightBlack": "#586e75", + "terminal.ansiBrightRed": "#cb4b16", + "terminal.ansiBrightGreen": "#586e75", + "terminal.ansiBrightYellow": "#657b83", + "terminal.ansiBrightBlue": "#839496", + "terminal.ansiBrightMagenta": "#6c71c4", + "terminal.ansiBrightCyan": "#93a1a1", + "terminal.ansiBrightWhite": "#fdf6e3" } } \ No newline at end of file diff --git a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json index 8ed7c467c5bba..830caf27cb6c4 100644 --- a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json +++ b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json @@ -2,46 +2,56 @@ "type": "dark", "colors": { "focusBorder": "#bbdaff", - "inputBoxBackground": "#001733", - "dropdownBackground": "#001733", - "listFocusBackground": "#ffffff60", - "listActiveSelectionBackground": "#ffffff50", - "listFocusAndSelectionBackground": "#ffffff60", - "listInactiveSelectionBackground": "#ffffff40", - "listHoverBackground": "#ffffff30", - "listDropBackground": "#ffffff60", - "pickerGroupForeground": "#bbdaff", - "editorBackground": "#002451", - "editorForeground": "#ffffff", - "editorSelection": "#003f8e", - "editorLineHighlight": "#00346e", - "editorCursor": "#ffffff", - "editorWhitespaces": "#404f7d", - "tabsContainerBackground": "#001733", - "tabInactiveBackground": "#001c40", - "statusBarBackground": "#001126", - "statusBarNoFolderBackground": "#001126", - "activityBarBackground": "#001733", - "activityBarBadgeBackground": "#bbdaff", - "activityBarBadgeForeground": "#001733", - "sideBarBackground": "#001c40", - "statusBarDebuggingBackground": "#ffeead", - "terminalAnsiBlack": "#111111", - "terminalAnsiRed": "#ff9da4", - "terminalAnsiGreen": "#d1f1a9", - "terminalAnsiYellow": "#ffeead", - "terminalAnsiBlue": "#bbdaff", - "terminalAnsiMagenta": "#ebbbff", - "terminalAnsiCyan": "#99ffff", - "terminalAnsiWhite": "#cccccc", - "terminalAnsiBrightBlack": "#333333", - "terminalAnsiBrightRed": "#ff7882", - "terminalAnsiBrightGreen": "#b8f171", - "terminalAnsiBrightYellow": "#ffe580", - "terminalAnsiBrightBlue": "#80baff", - "terminalAnsiBrightMagenta": "#d778ff", - "terminalAnsiBrightCyan": "#78ffff", - "terminalAnsiBrightWhite": "#ffffff" + "errorForeground": "#a92049", + "input.background": "#001733", + "dropdown.background": "#001733", + "list.focusBackground": "#ffffff60", + "list.activeSelectionBackground": "#ffffff60", + "list.inactiveSelectionBackground": "#ffffff40", + "list.hoverBackground": "#ffffff30", + "list.highlightForeground": "#bbdaff", + "pickerGroup.foreground": "#bbdaff", + "editor.background": "#002451", + "editor.foreground": "#ffffff", + "editor.selectionBackground": "#003f8e", + "editor.lineHighlightBackground": "#00346e", + "editorCursor.foreground": "#ffffff", + "editorWhitespace.foreground": "#404f7d", + "editorWidget.background": "#001c40", + "editorHoverWidget.background": "#001c40", + "editorHoverWidget.border": "#ffffff44", + "editorGroup.border": "#404f7d", + "editorGroupHeader.tabsBackground": "#001733", + "editorGroup.background": "#1c1c2a", + "editorGroup.dropBackground": "#25375daa", + "peekViewResult.background": "#001c40", + "tab.inactiveBackground": "#001c40", + "debugToolBar.background": "#001c40", + "titleBar.activeBackground": "#001126", + "statusBar.background": "#001126", + "statusBar.noFolderBackground": "#001126", + "statusBar.debuggingBackground": "#001126", + "activityBar.background": "#001733", + "progressBar.background": "#bbdaffcc", + "badge.background": "#bbdaffcc", + "badge.foreground": "#001733", + "sideBar.background": "#001c40", + "terminal.ansiBlack": "#111111", + "terminal.ansiRed": "#ff9da4", + "terminal.ansiGreen": "#d1f1a9", + "terminal.ansiYellow": "#ffeead", + "terminal.ansiBlue": "#bbdaff", + "terminal.ansiMagenta": "#ebbbff", + "terminal.ansiCyan": "#99ffff", + "terminal.ansiWhite": "#cccccc", + "terminal.ansiBrightBlack": "#333333", + "terminal.ansiBrightRed": "#ff7882", + "terminal.ansiBrightGreen": "#b8f171", + "terminal.ansiBrightYellow": "#ffe580", + "terminal.ansiBrightBlue": "#80baff", + "terminal.ansiBrightMagenta": "#d778ff", + "terminal.ansiBrightCyan": "#78ffff", + "terminal.ansiBrightWhite": "#ffffff" }, "tokenColors": [ { diff --git a/extensions/typescript/.vscodeignore b/extensions/typescript/.vscodeignore new file mode 100644 index 0000000000000..41dbd8bd426d2 --- /dev/null +++ b/extensions/typescript/.vscodeignore @@ -0,0 +1,5 @@ +build/** +src/** +test/** +tsconfig.json +npm-shrinkwrap.json \ No newline at end of file diff --git a/extensions/typescript/build/update-grammars.js b/extensions/typescript/build/update-grammars.js index 2ce6ee9d828a1..c38d6f1051017 100644 --- a/extensions/typescript/build/update-grammars.js +++ b/extensions/typescript/build/update-grammars.js @@ -8,7 +8,7 @@ var updateGrammar = require('../../../build/npm/update-grammar'); function adaptToJavaScript(grammar) { grammar.name = 'JavaScript (with React support)'; - grammar.fileTypes = ['.js', '.jsx' ]; + grammar.fileTypes = ['.js', '.jsx', '.es6', '.mjs' ]; grammar.scopeName = 'source.js'; var fixScopeNames = function(rule) { diff --git a/extensions/typescript/npm-shrinkwrap.json b/extensions/typescript/npm-shrinkwrap.json index 9a82d480137b4..0dfcf758ab2c6 100644 --- a/extensions/typescript/npm-shrinkwrap.json +++ b/extensions/typescript/npm-shrinkwrap.json @@ -13,9 +13,9 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz" }, "vscode-extension-telemetry": { - "version": "0.0.6", - "from": "vscode-extension-telemetry@>=0.0.6 <0.0.7", - "resolved": "https://registry.npmjs.org/vscode-extension-telemetry/-/vscode-extension-telemetry-0.0.6.tgz" + "version": "0.0.7", + "from": "vscode-extension-telemetry@>=0.0.8 <0.0.9", + "resolved": "https://registry.npmjs.org/vscode-extension-telemetry/-/vscode-extension-telemetry-0.0.8.tgz" }, "vscode-nls": { "version": "2.0.1", diff --git a/extensions/typescript/package.json b/extensions/typescript/package.json index 1d239313b43fa..46579d1b0428c 100644 --- a/extensions/typescript/package.json +++ b/extensions/typescript/package.json @@ -12,8 +12,8 @@ }, "dependencies": { "semver": "4.3.6", - "vscode-extension-telemetry": "^0.0.7", - "vscode-nls": "^2.0.1" + "vscode-extension-telemetry": "0.0.8", + "vscode-nls": "2.0.1" }, "devDependencies": { "@types/node": "^7.0.4", @@ -21,7 +21,7 @@ }, "scripts": { "vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:typescript ./tsconfig.json", - "update-grammars": "node ./build/update-grammars.js" + "update-grammar": "node ./build/update-grammars.js" }, "activationEvents": [ "onLanguage:javascript", @@ -34,7 +34,8 @@ "onCommand:typescript.selectTypeScriptVersion", "onCommand:javascript.goToProjectConfig", "onCommand:typescript.goToProjectConfig", - "onCommand:typescript.openTsServerLog" + "onCommand:typescript.openTsServerLog", + "onCommand:workbench.action.tasks.runTask" ], "main": "./out/typescriptMain", "contributes": { @@ -102,11 +103,25 @@ "default": true, "description": "%typescript.check.tscVersion%" }, + "typescript.npm": { + "type": [ + "string", + "null" + ], + "default": null, + "description": "%typescript.npm%", + "isExecutable": true + }, "typescript.check.npmIsInstalled": { "type": "boolean", "default": true, "description": "%typescript.check.npmIsInstalled%" }, + "javascript.referencesCodeLens.enabled": { + "type": "boolean", + "default": false, + "description": "%javascript.referencesCodeLens.enabled%" + }, "typescript.referencesCodeLens.enabled": { "type": "boolean", "default": false, @@ -158,6 +173,11 @@ "default": true, "description": "%format.insertSpaceAfterCommaDelimiter%" }, + "typescript.format.insertSpaceAfterConstructor": { + "type": "boolean", + "default": false, + "description": "%format.insertSpaceAfterConstructor%" + }, "typescript.format.insertSpaceAfterSemicolonInForStatements": { "type": "boolean", "default": true, @@ -208,6 +228,11 @@ "default": false, "description": "%format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces%" }, + "typescript.format.insertSpaceAfterTypeAssertion": { + "type": "boolean", + "default": false, + "description": "%format.insertSpaceAfterTypeAssertion%" + }, "typescript.format.placeOpenBraceOnNewLineForFunctions": { "type": "boolean", "default": false, @@ -233,6 +258,11 @@ "default": true, "description": "%format.insertSpaceAfterCommaDelimiter%" }, + "javascript.format.insertSpaceAfterConstructor": { + "type": "boolean", + "default": false, + "description": "%format.insertSpaceAfterConstructor%" + }, "javascript.format.insertSpaceAfterSemicolonInForStatements": { "type": "boolean", "default": true, @@ -302,6 +332,20 @@ "type": "boolean", "default": false, "description": "%javascript.implicitProjectConfig.checkJs%" + }, + "javascript.nameSuggestions": { + "type": "boolean", + "default": true, + "description": "%javascript.nameSuggestions%" + }, + "typescript.tsc.autoDetect": { + "type": "string", + "default": "on", + "enum": [ + "on", + "off" + ], + "description": "%typescript.tsc.autoDetect%" } } }, @@ -335,6 +379,11 @@ "command": "typescript.openTsServerLog", "title": "%typescript.openTsServerLog.title%", "category": "TypeScript" + }, + { + "command": "typescript.restartTsServer", + "title": "%typescript.restartTsServer%", + "category": "TypeScript" } ], "menus": { @@ -413,6 +462,18 @@ "url": "http://json.schemastore.org/typings" } ], + "taskDefinitions": [ + { + "type": "typescript", + "required": ["tsconfig"], + "properties": { + "tsconfig": { + "type": "string", + "description": "The tsconfig file that defines the TS build" + } + } + } + ], "problemPatterns": [ { "name": "tsc", @@ -427,6 +488,7 @@ "problemMatchers": [ { "name": "tsc", + "label": "%typescript.problemMatchers.tsc.label%", "owner": "typescript", "applyTo": "closedDocuments", "fileLocation": [ @@ -437,6 +499,7 @@ }, { "name": "tsc-watch", + "label": "%typescript.problemMatchers.tscWatch.label%", "owner": "typescript", "applyTo": "closedDocuments", "fileLocation": [ @@ -444,7 +507,7 @@ "${cwd}" ], "pattern": "$tsc", - "watching": { + "background": { "activeOnStart": true, "beginsPattern": { "regexp": "^\\s*(?:message TS6032:|\\d{1,2}:\\d{1,2}:\\d{1,2}(?: AM| PM)? -) File change detected\\. Starting incremental compilation\\.\\.\\." @@ -456,4 +519,4 @@ } ] } -} +} \ No newline at end of file diff --git a/extensions/typescript/package.nls.json b/extensions/typescript/package.nls.json index 78103b9093938..d23b901152795 100644 --- a/extensions/typescript/package.nls.json +++ b/extensions/typescript/package.nls.json @@ -8,11 +8,11 @@ "typescript.check.tscVersion": "Check if a global install TypeScript compiler (e.g. tsc) differs from the used TypeScript language service.", "typescript.tsserver.log": "Enables logging of the TS server to a file. This log can be used to diagnose TS Server issues. The log may contain file paths, source code, and other potentially sensitive information from your project.", "typescript.tsserver.trace": "Enables tracing of messages sent to the TS server. This trace can be used to diagnose TS Server issues. The trace may contain file paths, source code, and other potentially sensitive information from your project.", - "typescript.tsserver.experimentalAutoBuild": "Enables experimental auto build. Requires 1.9 dev or 2.x tsserver version and a restart of VS Code after changing it.", "typescript.validate.enable": "Enable/disable TypeScript validation.", "typescript.format.enable": "Enable/disable default TypeScript formatter.", "javascript.format.enable": "Enable/disable default JavaScript formatter.", "format.insertSpaceAfterCommaDelimiter": "Defines space handling after a comma delimiter.", + "format.insertSpaceAfterConstructor": "Defines space handling after the constructor keyword. Requires TypeScript >= 2.3.0.", "format.insertSpaceAfterSemicolonInForStatements": " Defines space handling after a semicolon in a for statement.", "format.insertSpaceBeforeAndAfterBinaryOperators": "Defines space handling after a binary operator.", "format.insertSpaceAfterKeywordsInControlFlowStatements": "Defines space handling after keywords in a control flow statement.", @@ -23,16 +23,24 @@ "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": "Defines space handling after opening and before closing non empty braces. Requires TypeScript >= 2.3.0.", "format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": "Defines space handling after opening and before closing template string braces. Requires TypeScript >= 2.0.6.", "format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": "Defines space handling after opening and before closing JSX expression braces. Requires TypeScript >= 2.0.6.", + "format.insertSpaceAfterTypeAssertion": "Defines space handling after type assertions in TypeScript. Requires TypeScript >= 2.4.", "format.placeOpenBraceOnNewLineForFunctions": "Defines whether an open brace is put onto a new line for functions or not.", "format.placeOpenBraceOnNewLineForControlBlocks": "Defines whether an open brace is put onto a new line for control blocks or not.", "javascript.validate.enable": "Enable/disable JavaScript validation.", "typescript.goToProjectConfig.title": "Go to Project Configuration", "javascript.goToProjectConfig.title": "Go to Project Configuration", - "typescript.referencesCodeLens.enabled": "Enable/disable references CodeLens. Requires TypeScript >= 2.0.6.", + "javascript.referencesCodeLens.enabled": "Enable/disable references CodeLens in JavaScript files.", + "typescript.referencesCodeLens.enabled": "Enable/disable references CodeLens in TypeScript files. Requires TypeScript >= 2.0.6.", "typescript.implementationsCodeLens.enabled": "Enable/disable implementations CodeLens. Requires TypeScript >= 2.2.0.", - "typescript.openTsServerLog.title": "Open TS Server log file", + "typescript.openTsServerLog.title": "Open TS Server log", + "typescript.restartTsServer": "Restart TS server", "typescript.selectTypeScriptVersion.title": "Select TypeScript Version", "jsDocCompletion.enabled": "Enable/disable auto JSDoc comments", "javascript.implicitProjectConfig.checkJs": "Enable/disable semantic checking of JavaScript files. Existing jsconfig.json or tsconfig.json files override this setting. Requires TypeScript >=2.3.1.", - "typescript.check.npmIsInstalled": "Check if NPM is installed for automatic typings acquisition" + "typescript.npm": "Specifies the path to the NPM executable used for Automatic Type Acquisition. Requires TypeScript >= 2.3.4.", + "typescript.check.npmIsInstalled": "Check if NPM is installed for Automatic Type Acquisition.", + "javascript.nameSuggestions": "Enable/disable including unique names from the file in JavaScript suggestion lists.", + "typescript.tsc.autoDetect": "Controls whether auto detection of tsc tasks is on or off.", + "typescript.problemMatchers.tsc.label": "TypeScript problems", + "typescript.problemMatchers.tscWatch.label": "TypeScript problems (watch mode)" } diff --git a/extensions/typescript/src/features/baseCodeLensProvider.ts b/extensions/typescript/src/features/baseCodeLensProvider.ts index 986cb09b8d08c..84ba69a0a96f2 100644 --- a/extensions/typescript/src/features/baseCodeLensProvider.ts +++ b/extensions/typescript/src/features/baseCodeLensProvider.ts @@ -3,9 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { CodeLensProvider, CodeLens, CancellationToken, TextDocument, Range, Uri, Position, Event, EventEmitter, workspace, } from 'vscode'; +import { CodeLensProvider, CodeLens, CancellationToken, TextDocument, Range, Uri, Position, Event, EventEmitter, ProviderResult, } from 'vscode'; import * as Proto from '../protocol'; import { ITypescriptServiceClient } from '../typescriptService'; @@ -21,35 +19,32 @@ export class ReferencesCodeLens extends CodeLens { } export abstract class TypeScriptBaseCodeLensProvider implements CodeLensProvider { - private enabled: boolean = false; + private enabled: boolean = true; private onDidChangeCodeLensesEmitter = new EventEmitter(); public constructor( - protected client: ITypescriptServiceClient, - private toggleSettingName: string + protected client: ITypescriptServiceClient ) { } public get onDidChangeCodeLenses(): Event { return this.onDidChangeCodeLensesEmitter.event; } - public updateConfiguration(): void { - const typeScriptConfig = workspace.getConfiguration('typescript'); - const wasEnabled = this.enabled; - this.enabled = typeScriptConfig.get(this.toggleSettingName, false); - if (wasEnabled !== this.enabled) { + protected setEnabled(enabled: false): void { + if (this.enabled !== enabled) { + this.enabled = enabled; this.onDidChangeCodeLensesEmitter.fire(); } } - provideCodeLenses(document: TextDocument, token: CancellationToken): Promise { + provideCodeLenses(document: TextDocument, token: CancellationToken): ProviderResult { if (!this.enabled) { - return Promise.resolve([]); + return []; } const filepath = this.client.normalizePath(document.uri); if (!filepath) { - return Promise.resolve([]); + return []; } return this.client.execute('navtree', { file: filepath }, token).then(response => { if (!response) { @@ -61,6 +56,8 @@ export abstract class TypeScriptBaseCodeLensProvider implements CodeLensProvider tree.childItems.forEach(item => this.walkNavTree(document, item, null, referenceableSpans)); } return referenceableSpans.map(span => new ReferencesCodeLens(document.uri, filepath, span)); + }, () => { + return []; }); } @@ -108,7 +105,7 @@ export abstract class TypeScriptBaseCodeLensProvider implements CodeLensProvider const text = document.getText(range); - const identifierMatch = new RegExp(`^(.*?(\\b|\\W))${(item.text || '').replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')}\\b`, 'gm'); + const identifierMatch = new RegExp(`^(.*?(\\b|\\W))${(item.text || '').replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')}(\\b|\\W)`, 'gm'); const match = identifierMatch.exec(text); const prefixLength = match ? match.index + match[1].length : 0; const startOffset = document.offsetAt(new Position(range.start.line, range.start.character)) + prefixLength; diff --git a/extensions/typescript/src/features/bufferSyncSupport.ts b/extensions/typescript/src/features/bufferSyncSupport.ts index 9e9858902e486..0fc4ab3eb2399 100644 --- a/extensions/typescript/src/features/bufferSyncSupport.ts +++ b/extensions/typescript/src/features/bufferSyncSupport.ts @@ -2,16 +2,14 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; import * as cp from 'child_process'; import * as fs from 'fs'; -import { workspace, window, TextDocument, TextDocumentChangeEvent, TextDocumentContentChangeEvent, Disposable, MessageItem } from 'vscode'; +import { workspace, window, TextDocument, TextDocumentChangeEvent, TextDocumentContentChangeEvent, Disposable, MessageItem, Uri, commands } from 'vscode'; import * as Proto from '../protocol'; import { ITypescriptServiceClient } from '../typescriptService'; import { Delayer } from '../utils/async'; -import LinkedMap from './linkedMap'; import * as nls from 'vscode-nls'; let localize = nls.loadMessageBundle(); @@ -20,26 +18,24 @@ interface IDiagnosticRequestor { requestDiagnostic(filepath: string): void; } -const Mode2ScriptKind: ObjectMap<'TS' | 'JS' | 'TSX' | 'JSX'> = { - 'typescript': 'TS', - 'typescriptreact': 'TSX', - 'javascript': 'JS', - 'javascriptreact': 'JSX' -}; +function mode2ScriptKind(mode: string): 'TS' | 'TSX' | 'JS' | 'JSX' | undefined { + switch (mode) { + case 'typescript': return 'TS'; + case 'typescriptreact': return 'TSX'; + case 'javascript': return 'JS'; + case 'javascriptreact': return 'JSX'; + } + return undefined; +} class SyncedBuffer { - private document: TextDocument; - private filepath: string; - private diagnosticRequestor: IDiagnosticRequestor; - private client: ITypescriptServiceClient; - - constructor(document: TextDocument, filepath: string, diagnosticRequestor: IDiagnosticRequestor, client: ITypescriptServiceClient) { - this.document = document; - this.filepath = filepath; - this.diagnosticRequestor = diagnosticRequestor; - this.client = client; - } + constructor( + private readonly document: TextDocument, + private readonly filepath: string, + private readonly diagnosticRequestor: IDiagnosticRequestor, + private readonly client: ITypescriptServiceClient + ) { } public open(): void { const args: Proto.OpenRequestArgs = { @@ -48,14 +44,17 @@ class SyncedBuffer { }; if (this.client.apiVersion.has203Features()) { - const scriptKind = Mode2ScriptKind[this.document.languageId]; + const scriptKind = mode2ScriptKind(this.document.languageId); if (scriptKind) { args.scriptKindName = scriptKind; } } - if (workspace.rootPath && this.client.apiVersion.has230Features()) { - args.projectRootPath = workspace.rootPath; + if (this.client.apiVersion.has230Features()) { + const root = this.client.getWorkspaceRootForResource(this.document.uri); + if (root) { + args.projectRootPath = root; + } } this.client.execute('open', args, false); @@ -66,23 +65,22 @@ class SyncedBuffer { } public close(): void { - let args: Proto.FileRequestArgs = { + const args: Proto.FileRequestArgs = { file: this.filepath }; this.client.execute('close', args, false); } - onContentChanged(events: TextDocumentContentChangeEvent[]): void { - let filePath = this.client.normalizePath(this.document.uri); + public onContentChanged(events: TextDocumentContentChangeEvent[]): void { + const filePath = this.client.normalizePath(this.document.uri); if (!filePath) { return; } - for (let i = 0; i < events.length; i++) { - let event = events[i]; - let range = event.range; - let text = event.text; - let args: Proto.ChangeRequestArgs = { + for (const event of events) { + const range = event.range; + const text = event.text; + const args: Proto.ChangeRequestArgs = { file: filePath, line: range.start.line + 1, offset: range.start.character + 1, @@ -103,47 +101,36 @@ export interface Diagnostics { const checkTscVersionSettingKey = 'check.tscVersion'; export default class BufferSyncSupport { - private client: ITypescriptServiceClient; + private readonly client: ITypescriptServiceClient; private _validate: boolean; - private modeIds: ObjectMap; - private extensions: ObjectMap; - private diagnostics: Diagnostics; - private disposables: Disposable[] = []; - private syncedBuffers: ObjectMap; + private readonly modeIds: Set; + private readonly diagnostics: Diagnostics; + private readonly disposables: Disposable[] = []; + private readonly syncedBuffers: Map; - private projectValidationRequested: boolean; - - private pendingDiagnostics: { [key: string]: number; }; - private diagnosticDelayer: Delayer; - private emitQueue: LinkedMap; + private pendingDiagnostics = new Map(); + private readonly diagnosticDelayer: Delayer; private checkGlobalTSCVersion: boolean; - constructor(client: ITypescriptServiceClient, modeIds: string[], diagnostics: Diagnostics, extensions: ObjectMap, validate: boolean = true) { + constructor(client: ITypescriptServiceClient, modeIds: string[], diagnostics: Diagnostics, validate: boolean = true) { this.client = client; - this.modeIds = Object.create(null); - modeIds.forEach(modeId => this.modeIds[modeId] = true); + this.modeIds = new Set(modeIds); this.diagnostics = diagnostics; - this.extensions = extensions; this._validate = validate; - this.projectValidationRequested = false; - - this.pendingDiagnostics = Object.create(null); this.diagnosticDelayer = new Delayer(300); - this.syncedBuffers = Object.create(null); - this.emitQueue = new LinkedMap(); + this.syncedBuffers = new Map(); const tsConfig = workspace.getConfiguration('typescript'); - this.checkGlobalTSCVersion = client.checkGlobalTSCVersion && this.modeIds['typescript'] === true && tsConfig.get(checkTscVersionSettingKey, true); + this.checkGlobalTSCVersion = client.checkGlobalTSCVersion && this.modeIds.has('typescript') && tsConfig.get(checkTscVersionSettingKey, true); } public listen(): void { workspace.onDidOpenTextDocument(this.onDidOpenTextDocument, this, this.disposables); workspace.onDidCloseTextDocument(this.onDidCloseTextDocument, this, this.disposables); workspace.onDidChangeTextDocument(this.onDidChangeTextDocument, this, this.disposables); - workspace.onDidSaveTextDocument(this.onDidSaveTextDocument, this, this.disposables); workspace.textDocuments.forEach(this.onDidOpenTextDocument, this); } @@ -156,13 +143,13 @@ export default class BufferSyncSupport { } public handles(file: string): boolean { - return !!this.syncedBuffers[file]; + return this.syncedBuffers.has(file); } public reOpenDocuments(): void { - Object.keys(this.syncedBuffers).forEach(key => { - this.syncedBuffers[key].open(); - }); + for (const buffer of this.syncedBuffers.values()) { + buffer.open(); + } } public dispose(): void { @@ -175,16 +162,16 @@ export default class BufferSyncSupport { } private onDidOpenTextDocument(document: TextDocument): void { - if (!this.modeIds[document.languageId]) { + if (!this.modeIds.has(document.languageId)) { return; } - let resource = document.uri; - let filepath = this.client.normalizePath(resource); + const resource = document.uri; + const filepath = this.client.normalizePath(resource); if (!filepath) { return; } - let syncedBuffer = new SyncedBuffer(document, filepath, this, this.client); - this.syncedBuffers[filepath] = syncedBuffer; + const syncedBuffer = new SyncedBuffer(document, filepath, this, this.client); + this.syncedBuffers.set(filepath, syncedBuffer); syncedBuffer.open(); this.requestDiagnostic(filepath); if (document.languageId === 'typescript' || document.languageId === 'typescriptreact') { @@ -197,12 +184,12 @@ export default class BufferSyncSupport { if (!filepath) { return; } - let syncedBuffer = this.syncedBuffers[filepath]; + const syncedBuffer = this.syncedBuffers.get(filepath); if (!syncedBuffer) { return; } this.diagnostics.delete(filepath); - delete this.syncedBuffers[filepath]; + this.syncedBuffers.delete(filepath); syncedBuffer.close(); if (!fs.existsSync(filepath)) { this.requestAllDiagnostics(); @@ -214,41 +201,32 @@ export default class BufferSyncSupport { if (!filepath) { return; } - let syncedBuffer = this.syncedBuffers[filepath]; + let syncedBuffer = this.syncedBuffers.get(filepath); if (!syncedBuffer) { return; } syncedBuffer.onContentChanged(e.contentChanges); } - private onDidSaveTextDocument(document: TextDocument): void { - let filepath = this.client.normalizePath(document.uri); - if (!filepath) { - return; - } - let syncedBuffer = this.syncedBuffers[filepath]; - if (!syncedBuffer) { - return; - } - } - public requestAllDiagnostics() { if (!this._validate) { return; } - Object.keys(this.syncedBuffers).forEach(filePath => this.pendingDiagnostics[filePath] = Date.now()); + for (const filePath of this.syncedBuffers.keys()) { + this.pendingDiagnostics.set(filePath, Date.now()); + } this.diagnosticDelayer.trigger(() => { this.sendPendingDiagnostics(); }, 200); } public requestDiagnostic(file: string): void { - if (!this._validate || this.client.experimentalAutoBuild) { + if (!this._validate) { return; } - this.pendingDiagnostics[file] = Date.now(); - let buffer = this.syncedBuffers[file]; + this.pendingDiagnostics.set(file, Date.now()); + const buffer = this.syncedBuffers.get(file); let delay = 300; if (buffer) { let lineCount = buffer.lineCount; @@ -263,10 +241,10 @@ export default class BufferSyncSupport { if (!this._validate) { return; } - let files = Object.keys(this.pendingDiagnostics).map((key) => { + let files = Array.from(this.pendingDiagnostics.entries()).map(([key, value]) => { return { file: key, - time: this.pendingDiagnostics[key] + time: value }; }).sort((a, b) => { return a.time - b.time; @@ -275,18 +253,20 @@ export default class BufferSyncSupport { }); // Add all open TS buffers to the geterr request. They might be visible - Object.keys(this.syncedBuffers).forEach((file) => { - if (!this.pendingDiagnostics[file]) { + for (const file of this.syncedBuffers.keys()) { + if (!this.pendingDiagnostics.get(file)) { files.push(file); } - }); + } - let args: Proto.GeterrRequestArgs = { - delay: 0, - files: files - }; - this.client.execute('geterr', args, false); - this.pendingDiagnostics = Object.create(null); + if (files.length) { + const args: Proto.GeterrRequestArgs = { + delay: 0, + files: files + }; + this.client.execute('geterr', args, false); + } + this.pendingDiagnostics.clear(); } private checkTSCVersion() { @@ -299,21 +279,6 @@ export default class BufferSyncSupport { id: number; } - function openUrl(url: string) { - let cmd: string; - switch (process.platform) { - case 'darwin': - cmd = 'open'; - break; - case 'win32': - cmd = 'start'; - break; - default: - cmd = 'xdg-open'; - } - return cp.exec(cmd + ' ' + url); - } - let tscVersion: string | undefined = undefined; try { let out = cp.execSync('tsc --version', { encoding: 'utf8' }); @@ -327,7 +292,7 @@ export default class BufferSyncSupport { } if (tscVersion && tscVersion !== this.client.apiVersion.versionString) { window.showInformationMessage( - localize('versionMismatch', 'Version mismatch! global tsc ({0}) != VS Code\'s language service ({1}). Inconsistent compile errors might occur', tscVersion, this.client.apiVersion.versionString), + localize('versionMismatch', 'Using TypeScript ({1}) for editor features. TypeScript ({0}) is installed globally on your machine. Errors in VS Code may differ from TSC errors', tscVersion, this.client.apiVersion.versionString), { title: localize('moreInformation', 'More Information'), id: 1 @@ -347,7 +312,7 @@ export default class BufferSyncSupport { } switch (selected.id) { case 1: - openUrl('http://go.microsoft.com/fwlink/?LinkId=826239'); + commands.executeCommand('vscode.open', Uri.parse('http://go.microsoft.com/fwlink/?LinkId=826239')); break; case 2: const tsConfig = workspace.getConfiguration('typescript'); diff --git a/extensions/typescript/src/features/codeActionProvider.ts b/extensions/typescript/src/features/codeActionProvider.ts index aea55cef7edfa..8f0dd56f01d93 100644 --- a/extensions/typescript/src/features/codeActionProvider.ts +++ b/extensions/typescript/src/features/codeActionProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { CodeActionProvider, TextDocument, Range, CancellationToken, CodeActionContext, Command, commands, Uri, workspace, WorkspaceEdit, TextEdit, FormattingOptions, window, ProviderResult } from 'vscode'; import * as Proto from '../protocol'; @@ -58,7 +56,7 @@ export default class TypeScriptCodeActionProvider implements CodeActionProvider }; return this.getSupportedActionsForContext(context) .then(supportedActions => { - if (!supportedActions.length) { + if (!supportedActions.size) { return []; } return this.client.execute('getCodeFixes', { @@ -67,8 +65,8 @@ export default class TypeScriptCodeActionProvider implements CodeActionProvider endLine: range.end.line + 1, startOffset: range.start.character + 1, endOffset: range.end.character + 1, - errorCodes: supportedActions - }, token).then(response => response.body || []); + errorCodes: Array.from(supportedActions) + } as Proto.CodeFixRequestArgs, token).then(response => response.body || []); }) .then(codeActions => codeActions.map(action => this.actionToEdit(source, action))); } @@ -87,11 +85,11 @@ export default class TypeScriptCodeActionProvider implements CodeActionProvider return this._supportedCodeActions; } - private getSupportedActionsForContext(context: CodeActionContext) { + private getSupportedActionsForContext(context: CodeActionContext): Thenable> { return this.supportedCodeActions.then(supportedActions => - context.diagnostics + new Set(context.diagnostics .map(diagnostic => +diagnostic.code) - .filter(code => supportedActions[code])); + .filter(code => supportedActions[code]))); } private actionToEdit(source: Source, action: Proto.CodeAction): Command { diff --git a/extensions/typescript/src/features/completionItemProvider.ts b/extensions/typescript/src/features/completionItemProvider.ts index 9a4ad7c1f7d7d..90a3f56b30ebb 100644 --- a/extensions/typescript/src/features/completionItemProvider.ts +++ b/extensions/typescript/src/features/completionItemProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { CompletionItem, TextDocument, Position, CompletionItemKind, CompletionItemProvider, CancellationToken, TextEdit, Range, SnippetString, workspace, ProviderResult } from 'vscode'; import { ITypescriptServiceClient } from '../typescriptService'; @@ -128,11 +126,13 @@ class MyCompletionItem extends CompletionItem { } interface Configuration { - useCodeSnippetsOnMethodSuggest?: boolean; + useCodeSnippetsOnMethodSuggest: boolean; + nameSuggestions: boolean; } namespace Configuration { export const useCodeSnippetsOnMethodSuggest = 'useCodeSnippetsOnMethodSuggest'; + export const nameSuggestions = 'nameSuggestions'; } export default class TypeScriptCompletionItemProvider implements CompletionItemProvider { @@ -143,13 +143,19 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP private client: ITypescriptServiceClient, private typingsStatus: TypingsStatus ) { - this.config = { useCodeSnippetsOnMethodSuggest: false }; + this.config = { + useCodeSnippetsOnMethodSuggest: false, + nameSuggestions: true + }; } public updateConfiguration(): void { // Use shared setting for js and ts const typeScriptConfig = workspace.getConfiguration('typescript'); this.config.useCodeSnippetsOnMethodSuggest = typeScriptConfig.get(Configuration.useCodeSnippetsOnMethodSuggest, false); + + const jsConfig = workspace.getConfiguration('javascript'); + this.config.nameSuggestions = jsConfig.get(Configuration.nameSuggestions, true); } public provideCompletionItems(document: TextDocument, position: Position, token: CancellationToken): Promise { @@ -202,21 +208,22 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP // Prevents incorrectly completing while typing spread operators. if (position.character > 0) { const preText = document.getText(new Range( - new Position(position.line, 0), - new Position(position.line, position.character - 1))); + position.line, 0, + position.line, position.character - 1)); enableDotCompletions = preText.match(/[a-z_$\)\]\}]\s*$/ig) !== null; } - for (let i = 0; i < body.length; i++) { - const element = body[i]; + for (const element of body) { + if (element.kind === PConst.Kind.warning && !this.config.nameSuggestions) { + continue; + } const item = new MyCompletionItem(position, document, element, enableDotCompletions, !this.config.useCodeSnippetsOnMethodSuggest); completionItems.push(item); } } return completionItems; - }, (err) => { - this.client.error(`'completions' request failed with error.`, err); + }, () => { return []; }); } @@ -242,9 +249,10 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP return item; } const detail = details[0]; - item.documentation = Previewer.plain(detail.documentation); item.detail = Previewer.plain(detail.displayParts); + item.documentation = Previewer.plainDocumentation(detail.documentation, detail.tags); + if (detail && this.config.useCodeSnippetsOnMethodSuggest && (item.kind === CompletionItemKind.Function || item.kind === CompletionItemKind.Method)) { return this.isValidFunctionCompletionContext(filepath, item.position).then(shouldCompleteFunction => { if (shouldCompleteFunction) { @@ -255,8 +263,7 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP } return item; - }, (err) => { - this.client.error(`'completionEntryDetails' request failed with error.`, err); + }, () => { return item; }); } diff --git a/extensions/typescript/src/features/definitionProvider.ts b/extensions/typescript/src/features/definitionProvider.ts index ee364a636140a..2713fc603db33 100644 --- a/extensions/typescript/src/features/definitionProvider.ts +++ b/extensions/typescript/src/features/definitionProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { DefinitionProvider, TextDocument, Position, CancellationToken, Definition } from 'vscode'; import { ITypescriptServiceClient } from '../typescriptService'; diff --git a/extensions/typescript/src/features/definitionProviderBase.ts b/extensions/typescript/src/features/definitionProviderBase.ts index 3cf6690101571..78768df2fee89 100644 --- a/extensions/typescript/src/features/definitionProviderBase.ts +++ b/extensions/typescript/src/features/definitionProviderBase.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { TextDocument, Position, Range, CancellationToken, Location } from 'vscode'; import * as Proto from '../protocol'; @@ -42,8 +40,7 @@ export default class TypeScriptDefinitionProviderBase { return new Location(resource, new Range(location.start.line - 1, location.start.offset - 1, location.end.line - 1, location.end.offset - 1)); } }).filter(x => x !== null) as Location[]; - }, (error) => { - this.client.error(`'${definitionType}' request failed with error.`, error); + }, () => { return []; }); } diff --git a/extensions/typescript/src/features/directiveCommentCompletionProvider.ts b/extensions/typescript/src/features/directiveCommentCompletionProvider.ts new file mode 100644 index 0000000000000..6dd8aa8418d84 --- /dev/null +++ b/extensions/typescript/src/features/directiveCommentCompletionProvider.ts @@ -0,0 +1,69 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { Position, CompletionItemProvider, CompletionItemKind, TextDocument, CancellationToken, CompletionItem, ProviderResult, Range } from 'vscode'; + +import { ITypescriptServiceClient } from '../typescriptService'; + +import * as nls from 'vscode-nls'; +const localize = nls.loadMessageBundle(); + +interface Directive { + value: string; + description: string; +} + +const directives: Directive[] = [ + { + value: '@ts-check', + description: localize( + 'ts-check', + 'Enables semantic checking in a JavaScript file. Must be at the top of a file.') + }, { + value: '@ts-nocheck', + description: localize( + 'ts-nocheck', + 'Disables semantic checking in a JavaScript file. Must be at the top of a file.') + }, { + value: '@ts-ignore', + description: localize( + 'ts-ignore', + 'Suppresses @ts-check errors on the next line of a file.') + } +]; + +export class DirectiveCommentCompletionProvider implements CompletionItemProvider { + constructor( + private client: ITypescriptServiceClient, + ) { } + + public provideCompletionItems(document: TextDocument, position: Position, _token: CancellationToken): ProviderResult { + if (!this.client.apiVersion.has230Features()) { + return []; + } + + const file = this.client.normalizePath(document.uri); + if (!file) { + return []; + } + + const line = document.lineAt(position.line).text; + const prefix = line.slice(0, position.character); + const match = prefix.match(/^\s*\/\/+\s?(@[a-zA-Z\-]*)?$/); + if (match) { + return directives.map(directive => { + const item = new CompletionItem(directive.value, CompletionItemKind.Snippet); + item.detail = directive.description; + item.range = new Range(position.line, Math.max(0, position.character - match[1].length), position.line, position.character); + return item; + }); + } + return []; + } + + public resolveCompletionItem(item: CompletionItem, _token: CancellationToken) { + return item; + } +} \ No newline at end of file diff --git a/extensions/typescript/src/features/documentHighlightProvider.ts b/extensions/typescript/src/features/documentHighlightProvider.ts index afffc9fa60ca9..15224ca2c2e43 100644 --- a/extensions/typescript/src/features/documentHighlightProvider.ts +++ b/extensions/typescript/src/features/documentHighlightProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { DocumentHighlightProvider, DocumentHighlight, DocumentHighlightKind, TextDocument, Position, Range, CancellationToken } from 'vscode'; import * as Proto from '../protocol'; @@ -45,8 +43,7 @@ export default class TypeScriptDocumentHighlightProvider implements DocumentHigh }); } return []; - }, (err) => { - this.client.error(`'occurrences' request failed with error.`, err); + }, () => { return []; }); } diff --git a/extensions/typescript/src/features/documentSymbolProvider.ts b/extensions/typescript/src/features/documentSymbolProvider.ts index 5d4a8595a37a4..9fbaf64fc8055 100644 --- a/extensions/typescript/src/features/documentSymbolProvider.ts +++ b/extensions/typescript/src/features/documentSymbolProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { DocumentSymbolProvider, SymbolInformation, SymbolKind, TextDocument, Range, Location, CancellationToken, Uri } from 'vscode'; import * as Proto from '../protocol'; @@ -35,18 +33,19 @@ export default class TypeScriptDocumentSymbolProvider implements DocumentSymbolP public constructor( private client: ITypescriptServiceClient) { } - public provideDocumentSymbols(resource: TextDocument, token: CancellationToken): Promise { + public async provideDocumentSymbols(resource: TextDocument, token: CancellationToken): Promise { const filepath = this.client.normalizePath(resource.uri); if (!filepath) { - return Promise.resolve([]); + return []; } const args: Proto.FileRequestArgs = { file: filepath }; - if (this.client.apiVersion.has206Features()) { - return this.client.execute('navtree', args, token).then((response) => { - const result: SymbolInformation[] = []; + try { + const result: SymbolInformation[] = []; + if (this.client.apiVersion.has206Features()) { + const response = await this.client.execute('navtree', args, token); if (response.body) { // The root represents the file. Ignore this when showing in the UI let tree = response.body; @@ -54,25 +53,17 @@ export default class TypeScriptDocumentSymbolProvider implements DocumentSymbolP tree.childItems.forEach(item => TypeScriptDocumentSymbolProvider.convertNavTree(resource.uri, result, item)); } } - return result; - }, (err) => { - this.client.error(`'navtree' request failed with error.`, err); - return []; - }); - } else { - return this.client.execute('navbar', args, token).then((response) => { - const result: SymbolInformation[] = []; + } else { + const response = await this.client.execute('navbar', args, token); if (response.body) { let foldingMap: ObjectMap = Object.create(null); response.body.forEach(item => TypeScriptDocumentSymbolProvider.convertNavBar(resource.uri, 0, foldingMap, result, item)); } - return result; - }, (err) => { - this.client.error(`'navbar' request failed with error.`, err); - return []; - }); + } + return result; + } catch (e) { + return []; } - } private static convertNavBar(resource: Uri, indent: number, foldingMap: ObjectMap, bucket: SymbolInformation[], item: Proto.NavigationBarItem, containerLabel?: string): void { diff --git a/extensions/typescript/src/features/formattingProvider.ts b/extensions/typescript/src/features/formattingProvider.ts index 77f6971201e48..2554620ac65d4 100644 --- a/extensions/typescript/src/features/formattingProvider.ts +++ b/extensions/typescript/src/features/formattingProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { workspace as Workspace, DocumentRangeFormattingEditProvider, OnTypeFormattingEditProvider, FormattingOptions, TextDocument, Position, Range, CancellationToken, TextEdit, WorkspaceConfiguration } from 'vscode'; import * as Proto from '../protocol'; @@ -13,6 +11,7 @@ import { ITypescriptServiceClient } from '../typescriptService'; interface Configuration { enable: boolean; insertSpaceAfterCommaDelimiter: boolean; + insertSpaceAfterConstructor: boolean; insertSpaceAfterSemicolonInForStatements: boolean; insertSpaceBeforeAndAfterBinaryOperators: boolean; insertSpaceAfterKeywordsInControlFlowStatements: boolean; @@ -22,33 +21,34 @@ interface Configuration { insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces: boolean; insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: boolean; insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces: boolean; + insertSpaceAfterTypeAssertion: boolean; insertSpaceBeforeFunctionParenthesis: boolean; placeOpenBraceOnNewLineForFunctions: boolean; placeOpenBraceOnNewLineForControlBlocks: boolean; - - [key: string]: boolean; } namespace Configuration { - export const insertSpaceAfterCommaDelimiter: string = 'insertSpaceAfterCommaDelimiter'; - export const insertSpaceAfterSemicolonInForStatements: string = 'insertSpaceAfterSemicolonInForStatements'; - export const insertSpaceBeforeAndAfterBinaryOperators: string = 'insertSpaceBeforeAndAfterBinaryOperators'; - export const insertSpaceAfterKeywordsInControlFlowStatements: string = 'insertSpaceAfterKeywordsInControlFlowStatements'; - export const insertSpaceAfterFunctionKeywordForAnonymousFunctions: string = 'insertSpaceAfterFunctionKeywordForAnonymousFunctions'; - export const insertSpaceBeforeFunctionParenthesis: string = 'insertSpaceBeforeFunctionParenthesis'; - export const insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: string = 'insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis'; - export const insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: string = 'insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets'; - export const insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces: string = 'insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces'; - export const insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: string = 'insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces'; - export const insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces: string = 'insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces'; - export const placeOpenBraceOnNewLineForFunctions: string = 'placeOpenBraceOnNewLineForFunctions'; - export const placeOpenBraceOnNewLineForControlBlocks: string = 'placeOpenBraceOnNewLineForControlBlocks'; + export const insertSpaceAfterCommaDelimiter = 'insertSpaceAfterCommaDelimiter'; + export const insertSpaceAfterConstructor = 'insertSpaceAfterConstructor'; + export const insertSpaceAfterSemicolonInForStatements = 'insertSpaceAfterSemicolonInForStatements'; + export const insertSpaceBeforeAndAfterBinaryOperators = 'insertSpaceBeforeAndAfterBinaryOperators'; + export const insertSpaceAfterKeywordsInControlFlowStatements = 'insertSpaceAfterKeywordsInControlFlowStatements'; + export const insertSpaceAfterFunctionKeywordForAnonymousFunctions = 'insertSpaceAfterFunctionKeywordForAnonymousFunctions'; + export const insertSpaceBeforeFunctionParenthesis = 'insertSpaceBeforeFunctionParenthesis'; + export const insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis = 'insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis'; + export const insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets = 'insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets'; + export const insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces = 'insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces'; + export const insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces = 'insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces'; + export const insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces = 'insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces'; + export const insertSpaceAfterTypeAssertion = 'insertSpaceAfterTypeAssertion'; + export const placeOpenBraceOnNewLineForFunctions = 'placeOpenBraceOnNewLineForFunctions'; + export const placeOpenBraceOnNewLineForControlBlocks = 'placeOpenBraceOnNewLineForControlBlocks'; export function equals(a: Configuration, b: Configuration): boolean { let keys = Object.keys(a); for (let i = 0; i < keys.length; i++) { let key = keys[i]; - if (a[key] !== b[key]) { + if ((a as any)[key] !== (b as any)[key]) { return false; } } @@ -59,6 +59,7 @@ namespace Configuration { let result: Configuration = Object.create(null); result.enable = true; result.insertSpaceAfterCommaDelimiter = true; + result.insertSpaceAfterConstructor = false; result.insertSpaceAfterSemicolonInForStatements = true; result.insertSpaceBeforeAndAfterBinaryOperators = true; result.insertSpaceAfterKeywordsInControlFlowStatements = true; @@ -69,6 +70,7 @@ namespace Configuration { result.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces = true; result.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces = false; result.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces = false; + result.insertSpaceAfterTypeAssertion = false; result.placeOpenBraceOnNewLineForFunctions = false; result.placeOpenBraceOnNewLineForControlBlocks = false; return result; @@ -138,8 +140,7 @@ export default class TypeScriptFormattingProvider implements DocumentRangeFormat } else { return []; } - }, (err: any) => { - this.client.error(`'format' request failed with error.`, err); + }, () => { return []; }); }); @@ -197,8 +198,7 @@ export default class TypeScriptFormattingProvider implements DocumentRangeFormat } } return result; - }, (err: any) => { - this.client.error(`'formatonkey' request failed with error.`, err); + }, () => { return []; }); }); @@ -217,6 +217,7 @@ export default class TypeScriptFormattingProvider implements DocumentRangeFormat // We can use \n here since the editor normalizes later on to its line endings. newLineCharacter: '\n', insertSpaceAfterCommaDelimiter: this.config.insertSpaceAfterCommaDelimiter, + insertSpaceAfterConstructor: this.config.insertSpaceAfterConstructor, insertSpaceAfterSemicolonInForStatements: this.config.insertSpaceAfterSemicolonInForStatements, insertSpaceBeforeAndAfterBinaryOperators: this.config.insertSpaceBeforeAndAfterBinaryOperators, insertSpaceAfterKeywordsInControlFlowStatements: this.config.insertSpaceAfterKeywordsInControlFlowStatements, @@ -227,8 +228,10 @@ export default class TypeScriptFormattingProvider implements DocumentRangeFormat insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces: this.config.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces, insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: this.config.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces, insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces: this.config.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces, + insertSpaceAfterTypeAssertion: this.config.insertSpaceAfterTypeAssertion, placeOpenBraceOnNewLineForFunctions: this.config.placeOpenBraceOnNewLineForFunctions, - placeOpenBraceOnNewLineForControlBlocks: this.config.placeOpenBraceOnNewLineForControlBlocks + placeOpenBraceOnNewLineForControlBlocks: this.config.placeOpenBraceOnNewLineForControlBlocks, + }; } } diff --git a/extensions/typescript/src/features/hoverProvider.ts b/extensions/typescript/src/features/hoverProvider.ts index 960d4964c42fc..a0914aa17306e 100644 --- a/extensions/typescript/src/features/hoverProvider.ts +++ b/extensions/typescript/src/features/hoverProvider.ts @@ -3,12 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { HoverProvider, Hover, TextDocument, Position, Range, CancellationToken } from 'vscode'; import * as Proto from '../protocol'; import { ITypescriptServiceClient } from '../typescriptService'; +import { tagsMarkdownPreview } from "./previewer"; export default class TypeScriptHoverProvider implements HoverProvider { @@ -29,13 +28,20 @@ export default class TypeScriptHoverProvider implements HoverProvider { if (response && response.body) { const data = response.body; return new Hover( - [{ language: 'typescript', value: data.displayString }, data.documentation], + TypeScriptHoverProvider.getContents(data), new Range(data.start.line - 1, data.start.offset - 1, data.end.line - 1, data.end.offset - 1)); } return undefined; - }, (err) => { - this.client.error(`'quickinfo' request failed with error.`, err); + }, () => { return null; }); } + + private static getContents(data: Proto.QuickInfoResponseBody) { + const tags = tagsMarkdownPreview(data.tags); + return [ + { language: 'typescript', value: data.displayString }, + data.documentation + (tags ? '\n\n' + tags : '') + ]; + } } \ No newline at end of file diff --git a/extensions/typescript/src/features/implementationProvider.ts b/extensions/typescript/src/features/implementationProvider.ts index 452afad10331c..ab4d5b8c45bed 100644 --- a/extensions/typescript/src/features/implementationProvider.ts +++ b/extensions/typescript/src/features/implementationProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { ImplementationProvider, TextDocument, Position, CancellationToken, Definition } from 'vscode'; import { ITypescriptServiceClient } from '../typescriptService'; diff --git a/extensions/typescript/src/features/implementationsCodeLensProvider.ts b/extensions/typescript/src/features/implementationsCodeLensProvider.ts index ad083c2cbe417..30daa644a4edc 100644 --- a/extensions/typescript/src/features/implementationsCodeLensProvider.ts +++ b/extensions/typescript/src/features/implementationsCodeLensProvider.ts @@ -3,9 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { CodeLens, CancellationToken, TextDocument, Range, Location } from 'vscode'; +import { CodeLens, CancellationToken, TextDocument, Range, Location, ProviderResult, workspace } from 'vscode'; import * as Proto from '../protocol'; import * as PConst from '../protocol.const'; @@ -17,14 +15,20 @@ const localize = nls.loadMessageBundle(); export default class TypeScriptImplementationsCodeLensProvider extends TypeScriptBaseCodeLensProvider { public constructor( - client: ITypescriptServiceClient + client: ITypescriptServiceClient, + private readonly language: string ) { - super(client, 'implementationsCodeLens.enabled'); + super(client); + } + + public updateConfiguration(): void { + const config = workspace.getConfiguration(this.language); + this.setEnabled(config.get('implementationsCodeLens.enabled', false)); } - provideCodeLenses(document: TextDocument, token: CancellationToken): Promise { + provideCodeLenses(document: TextDocument, token: CancellationToken): ProviderResult { if (!this.client.apiVersion.has220Features()) { - return Promise.resolve([]); + return []; } return super.provideCodeLenses(document, token); } diff --git a/extensions/typescript/src/features/jsDocCompletionProvider.ts b/extensions/typescript/src/features/jsDocCompletionProvider.ts index 7f9aaf8c029cc..502cf89c42c71 100644 --- a/extensions/typescript/src/features/jsDocCompletionProvider.ts +++ b/extensions/typescript/src/features/jsDocCompletionProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { Position, Range, CompletionItemProvider, CompletionItemKind, TextDocument, CancellationToken, CompletionItem, window, Uri, ProviderResult, TextEditor, SnippetString, workspace } from 'vscode'; import { ITypescriptServiceClient } from '../typescriptService'; @@ -26,7 +24,7 @@ namespace Configuration { class JsDocCompletionItem extends CompletionItem { constructor( - file: Uri, + document: TextDocument, position: Position, shouldGetJSDocFromTSServer: boolean, ) { @@ -34,10 +32,19 @@ class JsDocCompletionItem extends CompletionItem { this.detail = localize('typescript.jsDocCompletionItem.documentation', 'JSDoc comment'); this.insertText = ''; this.sortText = '\0'; + + const line = document.lineAt(position.line).text; + const prefix = line.slice(0, position.character).match(/\/\**\s*$/); + const suffix = line.slice(position.character).match(/^\s*\**\//); + const start = position.translate(0, prefix ? -prefix[0].length : 0); + this.range = new Range( + start, + position.translate(0, suffix ? suffix[0].length : 0)); + this.command = { title: 'Try Complete JSDoc', command: TryCompleteJsDocCommand.COMMAND_NAME, - arguments: [file, position, shouldGetJSDocFromTSServer] + arguments: [document.uri, start, shouldGetJSDocFromTSServer] }; } } @@ -67,7 +74,7 @@ export class JsDocCompletionProvider implements CompletionItemProvider { const line = document.lineAt(position.line).text; const prefix = line.slice(0, position.character); if (prefix.match(/^\s*$|\/\*\*\s*$|^\s*\/\*\*+\s*$/)) { - return [new JsDocCompletionItem(document.uri, position, this.config.enabled)]; + return [new JsDocCompletionItem(document, position, this.config.enabled)]; } return []; } @@ -80,16 +87,16 @@ export class JsDocCompletionProvider implements CompletionItemProvider { export class TryCompleteJsDocCommand { static COMMAND_NAME = '_typeScript.tryCompleteJsDoc'; - constructor(private client: ITypescriptServiceClient) { - - } + constructor( + private lazyClient: () => ITypescriptServiceClient + ) { } /** * Try to insert a jsdoc comment, using a template provide by typescript * if possible, otherwise falling back to a default comment format. */ - public tryCompleteJsDoc(resource: Uri, position: Position, shouldGetJSDocFromTSServer: boolean): Thenable { - const file = this.client.normalizePath(resource); + public tryCompleteJsDoc(resource: Uri, start: Position, shouldGetJSDocFromTSServer: boolean): Thenable { + const file = this.lazyClient().normalizePath(resource); if (!file) { return Promise.resolve(false); } @@ -99,44 +106,17 @@ export class TryCompleteJsDocCommand { return Promise.resolve(false); } - return this.prepForDocCompletion(editor, position) - .then((start: Position) => { - if (!shouldGetJSDocFromTSServer) { - return this.tryInsertDefaultDoc(editor, start); - } - - return this.tryInsertJsDocFromTemplate(editor, file, start) - .then((didInsertFromTemplate: boolean) => { - if (didInsertFromTemplate) { - return true; - } - return this.tryInsertDefaultDoc(editor, start); - }); - }); - } - - /** - * Prepare the area around the position for insertion of the jsdoc. - * - * Removes any the prefix and suffix of a possible jsdoc - */ - private prepForDocCompletion(editor: TextEditor, position: Position): Thenable { - const line = editor.document.lineAt(position.line).text; - const prefix = line.slice(0, position.character).match(/\/\**\s*$/); - const suffix = line.slice(position.character).match(/^\s*\**\//); - if (!prefix && !suffix) { - // Nothing to remove - return Promise.resolve(position); + if (!shouldGetJSDocFromTSServer) { + return this.tryInsertDefaultDoc(editor, start); } - const start = position.translate(0, prefix ? -prefix[0].length : 0); - return editor.edit( - edits => { - edits.delete(new Range(start, position.translate(0, suffix ? suffix[0].length : 0))); - }, { - undoStopBefore: true, - undoStopAfter: false - }).then(() => start); + return this.tryInsertJsDocFromTemplate(editor, file, start) + .then((didInsertFromTemplate: boolean) => { + if (didInsertFromTemplate) { + return true; + } + return this.tryInsertDefaultDoc(editor, start); + }); } private tryInsertJsDocFromTemplate(editor: TextEditor, file: string, position: Position): Promise { @@ -146,7 +126,7 @@ export class TryCompleteJsDocCommand { offset: position.character + 1 }; return Promise.race([ - this.client.execute('docCommentTemplate', args), + this.lazyClient().execute('docCommentTemplate', args), new Promise((_, reject) => setTimeout(reject, 250)) ]).then((res: DocCommandTemplateResponse) => { if (!res || !res.body) { diff --git a/extensions/typescript/src/features/linkedMap.ts b/extensions/typescript/src/features/linkedMap.ts deleted file mode 100644 index 9f0a41a02bb13..0000000000000 --- a/extensions/typescript/src/features/linkedMap.ts +++ /dev/null @@ -1,168 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -interface Item { - previous: Item | undefined; - next: Item | undefined; - key: string; - value: T; -} - -export default class LinkedMap { - - private map: ObjectMap>; - private head: Item | undefined; - private tail: Item | undefined; - private _length: number; - - constructor() { - this.map = Object.create(null); - this.head = undefined; - this.tail = undefined; - this._length = 0; - } - - public isEmpty(): boolean { - return !this.head && !this.tail; - } - - public length(): number { - return this._length; - } - - public get(key: string): T | undefined { - const item = this.map[key]; - if (!item) { - return undefined; - } - return item.value; - } - - public add(key: string, value: T, touch = false): void { - let item = this.map[key]; - if (item) { - item.value = value; - if (touch) { - this.touch(item); - } - } - else { - item = { key, value, next: undefined, previous: undefined }; - if (touch) { - this.addItemFirst(item); - } - else { - this.addItemLast(item); - } - this.map[key] = item; - this._length++; - } - } - - public remove(key: string): T | undefined { - const item = this.map[key]; - if (!item) { - return undefined; - } - delete this.map[key]; - this.removeItem(item); - this._length--; - return item.value; - } - - public shift(): T | undefined { - if (!this.head && !this.tail) { - return undefined; - } - if (!this.head || !this.tail) { - throw new Error('Invalid list'); - } - const item = this.head; - delete this.map[item.key]; - this.removeItem(item); - this._length--; - return item.value; - } - - private addItemFirst(item: Item): void { - // First time Insert - if (!this.head && !this.tail) { - this.tail = item; - } else if (!this.head) { - throw new Error('Invalid list'); - } else { - item.next = this.head; - this.head.previous = item; - } - this.head = item; - } - - private addItemLast(item: Item): void { - // First time Insert - if (!this.head && !this.tail) { - this.head = item; - } else if (!this.tail) { - throw new Error('Invalid list'); - } else { - item.previous = this.tail; - this.tail.next = item; - } - this.tail = item; - } - - private removeItem(item: Item): void { - if (item === this.head && item === this.tail) { - this.head = undefined; - this.tail = undefined; - } - else if (item === this.head) { - this.head = item.next; - } - else if (item === this.tail) { - this.tail = item.previous; - } - else { - const next = item.next; - const previous = item.previous; - if (!next || !previous) { - throw new Error('Invalid list'); - } - next.previous = previous; - previous.next = next; - } - } - - private touch(item: Item): void { - if (item === this.head) { - return; - } - - const next = item.next; - const previous = item.previous; - - // Unlink the item - if (item === this.tail) { - this.tail = previous; - } - else { - // Both next and previous are not null since item was neither head nor tail. - if (next) { - next.previous = previous; - } - if (previous) { - previous.next = next; - } - } - - // Insert the node at head - item.previous = undefined; - item.next = this.head; - if (!this.head) { - throw new Error('Invalid list'); - } - this.head.previous = item; - this.head = item; - } -} diff --git a/extensions/typescript/src/features/previewer.ts b/extensions/typescript/src/features/previewer.ts index 0f57473fa5890..5865b560d2b0a 100644 --- a/extensions/typescript/src/features/previewer.ts +++ b/extensions/typescript/src/features/previewer.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import * as Proto from '../protocol'; export function plain(parts: Proto.SymbolDisplayPart[]): string { @@ -12,4 +10,34 @@ export function plain(parts: Proto.SymbolDisplayPart[]): string { return ''; } return parts.map(part => part.text).join(''); +} + +export function tagsMarkdownPreview(tags: Proto.JSDocTagInfo[]): string { + return (tags || []) + .map(tag => { + const label = `*@${tag.name}*`; + if (!tag.text) { + return label; + } + return label + (tag.text.match(/\r\n|\n/g) ? ' \n' + tag.text : ` — ${tag.text}`); + }) + .join(' \n\n'); +} + +function tagsPlainPreview(tags: Proto.JSDocTagInfo[]): string { + return (tags || []) + .map(tag => { + const label = `@${tag.name}`; + if (!tag.text) { + return label; + } + return label + (tag.text.match(/\r\n|\n/g) ? '\n' + tag.text : ` — ${tag.text}`); + }) + .join('\n\ngit'); +} + +export function plainDocumentation(documentation: Proto.SymbolDisplayPart[], tags: Proto.JSDocTagInfo[]): string { + const processedDocumentation = plain(documentation).replace(/\n([ \t]*\n)?/gm, (x) => x.length >= 2 ? '\n\n' : ' '); + const parts = [processedDocumentation, tagsPlainPreview(tags)]; + return parts.filter(x => x).join('\n\n'); } \ No newline at end of file diff --git a/extensions/typescript/src/features/refactorProvider.ts b/extensions/typescript/src/features/refactorProvider.ts new file mode 100644 index 0000000000000..4e930e09d8065 --- /dev/null +++ b/extensions/typescript/src/features/refactorProvider.ts @@ -0,0 +1,128 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { CodeActionProvider, TextDocument, Range, CancellationToken, CodeActionContext, Command, commands, workspace, WorkspaceEdit, window, QuickPickItem } from 'vscode'; + +import * as Proto from '../protocol'; +import { ITypescriptServiceClient } from '../typescriptService'; + + +export default class TypeScriptRefactorProvider implements CodeActionProvider { + private doRefactorCommandId: string; + private selectRefactorCommandId: string; + + constructor( + private readonly client: ITypescriptServiceClient, + mode: string + ) { + this.doRefactorCommandId = `_typescript.applyRefactoring.${mode}`; + this.selectRefactorCommandId = `_typescript.selectRefactoring.${mode}`; + + commands.registerCommand(this.doRefactorCommandId, this.doRefactoring, this); + commands.registerCommand(this.selectRefactorCommandId, this.selectRefactoring, this); + + } + + public async provideCodeActions( + document: TextDocument, + range: Range, + _context: CodeActionContext, + token: CancellationToken + ): Promise { + if (!this.client.apiVersion.has240Features()) { + return []; + } + + const file = this.client.normalizePath(document.uri); + if (!file) { + return []; + } + + const args: Proto.GetApplicableRefactorsRequestArgs = { + file: file, + startLine: range.start.line + 1, + startOffset: range.start.character + 1, + endLine: range.end.line + 1, + endOffset: range.end.character + 1 + }; + + try { + const response = await this.client.execute('getApplicableRefactors', args, token); + if (!response || !response.body) { + return []; + } + + const actions: Command[] = []; + for (const info of response.body) { + if (info.inlineable === false) { + actions.push({ + title: info.description, + command: this.selectRefactorCommandId, + arguments: [file, info, range] + }); + } else { + for (const action of info.actions) { + actions.push({ + title: action.description, + command: this.doRefactorCommandId, + arguments: [file, info.name, action.name, range] + }); + } + } + } + return actions; + } catch (err) { + return []; + } + } + + private toWorkspaceEdit(edits: Proto.FileCodeEdits[]): WorkspaceEdit { + const workspaceEdit = new WorkspaceEdit(); + for (const edit of edits) { + for (const textChange of edit.textChanges) { + workspaceEdit.replace(this.client.asUrl(edit.fileName), + new Range( + textChange.start.line - 1, textChange.start.offset - 1, + textChange.end.line - 1, textChange.end.offset - 1), + textChange.newText); + } + } + return workspaceEdit; + } + + private async selectRefactoring(file: string, info: Proto.ApplicableRefactorInfo, range: Range): Promise { + return window.showQuickPick(info.actions.map((action): QuickPickItem => ({ + label: action.name, + description: action.description + }))).then(selected => { + if (!selected) { + return false; + } + return this.doRefactoring(file, info.name, selected.label, range); + }); + } + + private async doRefactoring(file: string, refactor: string, action: string, range: Range): Promise { + const args: Proto.GetEditsForRefactorRequestArgs = { + file, + refactor, + action, + startLine: range.start.line + 1, + startOffset: range.start.character + 1, + endLine: range.end.line + 1, + endOffset: range.end.character + 1 + }; + + const response = await this.client.execute('getEditsForRefactor', args); + if (!response || !response.body || !response.body.edits.length) { + return false; + } + + const edit = this.toWorkspaceEdit(response.body.edits); + return workspace.applyEdit(edit); + } +} \ No newline at end of file diff --git a/extensions/typescript/src/features/referenceProvider.ts b/extensions/typescript/src/features/referenceProvider.ts index 56aac3a0cd8e3..9f7ccf9f49ae1 100644 --- a/extensions/typescript/src/features/referenceProvider.ts +++ b/extensions/typescript/src/features/referenceProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { ReferenceProvider, Location, TextDocument, Position, Range, CancellationToken } from 'vscode'; import * as Proto from '../protocol'; @@ -43,8 +41,7 @@ export default class TypeScriptReferenceSupport implements ReferenceProvider { result.push(location); } return result; - }, (err) => { - this.client.error(`'references' request failed with error.`, err); + }, () => { return []; }); } diff --git a/extensions/typescript/src/features/referencesCodeLensProvider.ts b/extensions/typescript/src/features/referencesCodeLensProvider.ts index b5d249d6d45ca..5576bfc48250b 100644 --- a/extensions/typescript/src/features/referencesCodeLensProvider.ts +++ b/extensions/typescript/src/features/referencesCodeLensProvider.ts @@ -3,9 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { CodeLens, CancellationToken, TextDocument, Range, Location } from 'vscode'; +import { CodeLens, CancellationToken, TextDocument, Range, Location, ProviderResult, workspace } from 'vscode'; import * as Proto from '../protocol'; import * as PConst from '../protocol.const'; @@ -17,14 +15,20 @@ const localize = nls.loadMessageBundle(); export default class TypeScriptReferencesCodeLensProvider extends TypeScriptBaseCodeLensProvider { public constructor( - client: ITypescriptServiceClient + client: ITypescriptServiceClient, + private readonly language: string ) { - super(client, 'referencesCodeLens.enabled'); + super(client); + } + + public updateConfiguration(): void { + const config = workspace.getConfiguration(this.language); + this.setEnabled(config.get('referencesCodeLens.enabled', false)); } - provideCodeLenses(document: TextDocument, token: CancellationToken): Promise { + provideCodeLenses(document: TextDocument, token: CancellationToken): ProviderResult { if (!this.client.apiVersion.has206Features()) { - return Promise.resolve([]); + return []; } return super.provideCodeLenses(document, token); } diff --git a/extensions/typescript/src/features/renameProvider.ts b/extensions/typescript/src/features/renameProvider.ts index da279ab5596af..450523b4ade59 100644 --- a/extensions/typescript/src/features/renameProvider.ts +++ b/extensions/typescript/src/features/renameProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { RenameProvider, WorkspaceEdit, TextDocument, Position, Range, CancellationToken } from 'vscode'; import * as Proto from '../protocol'; @@ -51,8 +49,7 @@ export default class TypeScriptRenameProvider implements RenameProvider { }); }); return result; - }, (err) => { - this.client.error(`'rename' request failed with error.`, err); + }, () => { return null; }); } diff --git a/extensions/typescript/src/features/signatureHelpProvider.ts b/extensions/typescript/src/features/signatureHelpProvider.ts index 7d6f8942bfef9..c3f6c86e00186 100644 --- a/extensions/typescript/src/features/signatureHelpProvider.ts +++ b/extensions/typescript/src/features/signatureHelpProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { SignatureHelpProvider, SignatureHelp, SignatureInformation, ParameterInformation, TextDocument, Position, CancellationToken } from 'vscode'; import * as Previewer from './previewer'; @@ -61,13 +59,12 @@ export default class TypeScriptSignatureHelpProvider implements SignatureHelpPro } }); signature.label += Previewer.plain(item.suffixDisplayParts); - signature.documentation = Previewer.plain(item.documentation); + signature.documentation = Previewer.plainDocumentation(item.documentation, item.tags); result.signatures.push(signature); }); return result; - }, (err: any) => { - this.client.error(`'signatureHelp' request failed with error.`, err); + }, () => { return null; }); } diff --git a/extensions/typescript/src/features/taskProvider.ts b/extensions/typescript/src/features/taskProvider.ts new file mode 100644 index 0000000000000..e3008d28fd9dc --- /dev/null +++ b/extensions/typescript/src/features/taskProvider.ts @@ -0,0 +1,167 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import * as fs from 'fs'; +import * as path from 'path'; +import * as vscode from 'vscode'; + +import * as Proto from '../protocol'; +import TypeScriptServiceClient from '../typescriptServiceClient'; +import TsConfigProvider from '../utils/tsconfigProvider'; +import { isImplicitProjectConfigFile } from '../utils/tsconfig'; + +const exists = (file: string): Promise => + new Promise((resolve, _reject) => { + fs.exists(file, (value: boolean) => { + resolve(value); + }); + }); + + +interface TypeScriptTaskDefinition extends vscode.TaskDefinition { + tsconfig: string; +} + +/** + * Provides tasks for building `tsconfig.json` files in a project. + */ +class TscTaskProvider implements vscode.TaskProvider { + private readonly tsconfigProvider: TsConfigProvider; + + public constructor( + private readonly lazyClient: () => TypeScriptServiceClient + ) { + this.tsconfigProvider = new TsConfigProvider(); + } + + dispose() { + this.tsconfigProvider.dispose(); + } + + public async provideTasks(token: vscode.CancellationToken): Promise { + const rootPath = vscode.workspace.rootPath; + if (!rootPath) { + return []; + } + + const command = await this.getCommand(); + const projects = await this.getAllTsConfigs(token); + + return projects.map(configFile => { + const configFileName = path.relative(rootPath, configFile); + const identifier: TypeScriptTaskDefinition = { type: 'typescript', tsconfig: configFileName }; + const buildTask = new vscode.Task(identifier, `build ${configFileName}`, 'tsc', new vscode.ShellExecution(`${command} -p "${configFile}"`), '$tsc'); + buildTask.group = vscode.TaskGroup.Build; + return buildTask; + }); + } + + public resolveTask(_task: vscode.Task): vscode.Task | undefined { + return undefined; + } + + private async getAllTsConfigs(token: vscode.CancellationToken): Promise { + const out = new Set(); + const configs = (await this.getTsConfigForActiveFile(token)).concat(await this.getTsConfigsInWorkspace()); + for (const config of configs) { + if (await exists(config)) { + out.add(config); + } + } + return Array.from(out); + } + + private async getTsConfigForActiveFile(token: vscode.CancellationToken): Promise { + const editor = vscode.window.activeTextEditor; + if (editor) { + if (path.basename(editor.document.fileName).match(/^tsconfig\.(.\.)?json$/)) { + return [editor.document.fileName]; + } + } + + const file = this.getActiveTypeScriptFile(); + if (!file) { + return []; + } + + const res: Proto.ProjectInfoResponse = await this.lazyClient().execute( + 'projectInfo', + { file, needFileNameList: false } as protocol.ProjectInfoRequestArgs, + token); + + if (!res || !res.body) { + return []; + } + + const { configFileName } = res.body; + if (configFileName && !isImplicitProjectConfigFile(configFileName)) { + return [configFileName]; + } + return []; + } + + private async getTsConfigsInWorkspace(): Promise { + return Array.from(await this.tsconfigProvider.getConfigsForWorkspace()); + } + + private async getCommand(): Promise { + const platform = process.platform; + if (platform === 'win32' && await exists(path.join(vscode.workspace.rootPath!, 'node_modules', '.bin', 'tsc.cmd'))) { + return path.join('.', 'node_modules', '.bin', 'tsc.cmd'); + } else if ((platform === 'linux' || platform === 'darwin') && await exists(path.join(vscode.workspace.rootPath!, 'node_modules', '.bin', 'tsc'))) { + return path.join('.', 'node_modules', '.bin', 'tsc'); + } else { + return 'tsc'; + } + } + + private getActiveTypeScriptFile(): string | null { + const editor = vscode.window.activeTextEditor; + if (editor) { + const document = editor.document; + if (document && (document.languageId === 'typescript' || document.languageId === 'typescriptreact')) { + return this.lazyClient().normalizePath(document.uri); + } + } + return null; + } +} + +type AutoDetect = 'on' | 'off'; + +/** + * Manages registrations of TypeScript task provides with VScode. + */ +export default class TypeScriptTaskProviderManager { + private taskProviderSub: vscode.Disposable | undefined = undefined; + private readonly disposables: vscode.Disposable[] = []; + + constructor( + private readonly lazyClient: () => TypeScriptServiceClient + ) { + vscode.workspace.onDidChangeConfiguration(this.onConfigurationChanged, this, this.disposables); + this.onConfigurationChanged(); + } + + dispose() { + if (this.taskProviderSub) { + this.taskProviderSub.dispose(); + this.taskProviderSub = undefined; + } + this.disposables.forEach(x => x.dispose()); + } + + private onConfigurationChanged() { + let autoDetect = vscode.workspace.getConfiguration('typescript.tsc').get('autoDetect'); + if (this.taskProviderSub && autoDetect === 'off') { + this.taskProviderSub.dispose(); + this.taskProviderSub = undefined; + } else if (!this.taskProviderSub && autoDetect === 'on') { + this.taskProviderSub = vscode.workspace.registerTaskProvider('typescript', new TscTaskProvider(this.lazyClient)); + } + } +} \ No newline at end of file diff --git a/extensions/typescript/src/features/typeDefinitionProvider.ts b/extensions/typescript/src/features/typeDefinitionProvider.ts index edaccf0bf3330..d107f67580a06 100644 --- a/extensions/typescript/src/features/typeDefinitionProvider.ts +++ b/extensions/typescript/src/features/typeDefinitionProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { TypeDefinitionProvider, TextDocument, Position, CancellationToken, Definition } from 'vscode'; import { ITypescriptServiceClient } from '../typescriptService'; diff --git a/extensions/typescript/src/features/workspaceSymbolProvider.ts b/extensions/typescript/src/features/workspaceSymbolProvider.ts index 625c2d1c4ba9e..fa78077164502 100644 --- a/extensions/typescript/src/features/workspaceSymbolProvider.ts +++ b/extensions/typescript/src/features/workspaceSymbolProvider.ts @@ -3,20 +3,22 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { workspace, window, Uri, WorkspaceSymbolProvider, SymbolInformation, SymbolKind, Range, Location, CancellationToken } from 'vscode'; import * as Proto from '../protocol'; import { ITypescriptServiceClient } from '../typescriptService'; -const _kindMapping: { [kind: string]: SymbolKind } = Object.create(null); -_kindMapping['method'] = SymbolKind.Method; -_kindMapping['enum'] = SymbolKind.Enum; -_kindMapping['function'] = SymbolKind.Function; -_kindMapping['class'] = SymbolKind.Class; -_kindMapping['interface'] = SymbolKind.Interface; -_kindMapping['var'] = SymbolKind.Variable; +function getSymbolKind(item: Proto.NavtoItem): SymbolKind { + switch (item.kind) { + case 'method': return SymbolKind.Method; + case 'enum': return SymbolKind.Enum; + case 'function': return SymbolKind.Function; + case 'class': return SymbolKind.Class; + case 'interface': return SymbolKind.Interface; + case 'var': return SymbolKind.Variable; + default: return SymbolKind.Variable; + } +} export default class TypeScriptWorkspaceSymbolProvider implements WorkspaceSymbolProvider { public constructor( @@ -28,16 +30,16 @@ export default class TypeScriptWorkspaceSymbolProvider implements WorkspaceSymbo // general questions so we check the active editor. If this // doesn't match we take the first TS document. let uri: Uri | undefined = undefined; - let editor = window.activeTextEditor; + const editor = window.activeTextEditor; if (editor) { - let document = editor.document; + const document = editor.document; if (document && document.languageId === this.modeId) { uri = document.uri; } } if (!uri) { - let documents = workspace.textDocuments; - for (let document of documents) { + const documents = workspace.textDocuments; + for (const document of documents) { if (document.languageId === this.modeId) { uri = document.uri; break; @@ -53,36 +55,29 @@ export default class TypeScriptWorkspaceSymbolProvider implements WorkspaceSymbo if (!filepath) { return Promise.resolve([]); } - let args: Proto.NavtoRequestArgs = { + const args: Proto.NavtoRequestArgs = { file: filepath, searchValue: search }; - if (!args.file) { - return Promise.resolve([]); - } return this.client.execute('navto', args, token).then((response): SymbolInformation[] => { + const result: SymbolInformation[] = []; let data = response.body; if (data) { - let result: SymbolInformation[] = []; for (let item of data) { if (!item.containerName && item.kind === 'alias') { continue; } - let range = new Range(item.start.line - 1, item.start.offset - 1, item.end.line - 1, item.end.offset - 1); + const range = new Range(item.start.line - 1, item.start.offset - 1, item.end.line - 1, item.end.offset - 1); let label = item.name; if (item.kind === 'method' || item.kind === 'function') { label += '()'; } - result.push(new SymbolInformation(label, _kindMapping[item.kind], item.containerName ? item.containerName : '', + result.push(new SymbolInformation(label, getSymbolKind(item), item.containerName || '', new Location(this.client.asUrl(item.file), range))); } - return result; - } else { - return []; } - - }, (err) => { - this.client.error(`'navto' request failed with error.`, err); + return result; + }, () => { return []; }); } diff --git a/extensions/typescript/src/protocol.const.ts b/extensions/typescript/src/protocol.const.ts index 6990868683d89..822e05d2b2117 100644 --- a/extensions/typescript/src/protocol.const.ts +++ b/extensions/typescript/src/protocol.const.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - export class Kind { public static readonly alias = 'alias'; public static readonly callSignature = 'call'; diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index cc01c02942b8d..46d5174773e1d 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -7,9 +7,8 @@ * Includes code from typescript-sublime-plugin project, obtained from * https://github.com/Microsoft/TypeScript-Sublime-Plugin/blob/master/TypeScript%20Indent.tmPreferences * ------------------------------------------------------------------------------------------ */ -'use strict'; -import { env, languages, commands, workspace, window, ExtensionContext, Memento, IndentAction, Diagnostic, DiagnosticCollection, Range, Disposable, Uri, MessageItem, TextEditor, FileSystemWatcher, DiagnosticSeverity } from 'vscode'; +import { env, languages, commands, workspace, window, ExtensionContext, Memento, IndentAction, Diagnostic, DiagnosticCollection, Range, Disposable, Uri, MessageItem, TextEditor, DiagnosticSeverity, TextDocument } from 'vscode'; // This must be the first statement otherwise modules might got loaded with // the wrong locale. @@ -39,21 +38,24 @@ import BufferSyncSupport from './features/bufferSyncSupport'; import CompletionItemProvider from './features/completionItemProvider'; import WorkspaceSymbolProvider from './features/workspaceSymbolProvider'; import CodeActionProvider from './features/codeActionProvider'; +import RefactorProvider from './features/refactorProvider'; import ReferenceCodeLensProvider from './features/referencesCodeLensProvider'; import { JsDocCompletionProvider, TryCompleteJsDocCommand } from './features/jsDocCompletionProvider'; +import { DirectiveCommentCompletionProvider } from './features/directiveCommentCompletionProvider'; +import TypeScriptTaskProviderManager from './features/taskProvider'; import ImplementationCodeLensProvider from './features/implementationsCodeLensProvider'; -import * as BuildStatus from './utils/buildStatus'; import * as ProjectStatus from './utils/projectStatus'; import TypingsStatus, { AtaProgressReporter } from './utils/typingsStatus'; -import * as VersionStatus from './utils/versionStatus'; +import VersionStatus from './utils/versionStatus'; +import { getContributedTypeScriptServerPlugins, TypeScriptServerPlugin } from './utils/plugins'; +import { openOrCreateConfigFile, isImplicitProjectConfigFile } from './utils/tsconfig'; interface LanguageDescription { id: string; diagnosticSource: string; modeIds: string[]; - extensions: string[]; - configFile: string; + configFile?: string; } enum ProjectConfigAction { @@ -66,87 +68,114 @@ interface ProjectConfigMessageItem extends MessageItem { id: ProjectConfigAction; } +const MODE_ID_TS = 'typescript'; +const MODE_ID_TSX = 'typescriptreact'; +const MODE_ID_JS = 'javascript'; +const MODE_ID_JSX = 'javascriptreact'; + +const standardLanguageDescriptions: LanguageDescription[] = [ + { + id: 'typescript', + diagnosticSource: 'ts', + modeIds: [MODE_ID_TS, MODE_ID_TSX], + configFile: 'tsconfig.json' + }, { + id: 'javascript', + diagnosticSource: 'js', + modeIds: [MODE_ID_JS, MODE_ID_JSX], + configFile: 'jsconfig.json' + } +]; + export function activate(context: ExtensionContext): void { - const MODE_ID_TS = 'typescript'; - const MODE_ID_TSX = 'typescriptreact'; - const MODE_ID_JS = 'javascript'; - const MODE_ID_JSX = 'javascriptreact'; - - const clientHost = new TypeScriptServiceClientHost([ - { - id: 'typescript', - diagnosticSource: 'ts', - modeIds: [MODE_ID_TS, MODE_ID_TSX], - extensions: ['.ts', '.tsx'], - configFile: 'tsconfig.json' - }, - { - id: 'javascript', - diagnosticSource: 'js', - modeIds: [MODE_ID_JS, MODE_ID_JSX], - extensions: ['.js', '.jsx'], - configFile: 'jsconfig.json' - } - ], context.storagePath, context.globalState, context.workspaceState); - context.subscriptions.push(clientHost); + const plugins = getContributedTypeScriptServerPlugins(); + + const lazyClientHost = (() => { + let clientHost: TypeScriptServiceClientHost | undefined; + return () => { + if (!clientHost) { + clientHost = new TypeScriptServiceClientHost(standardLanguageDescriptions, context.workspaceState, plugins); + context.subscriptions.push(clientHost); + + const host = clientHost; + clientHost.serviceClient.onReady().then(() => { + context.subscriptions.push(ProjectStatus.create(host.serviceClient, + path => new Promise(resolve => setTimeout(() => resolve(host.handles(path)), 750)), + context.workspaceState)); + }, () => { + // Nothing to do here. The client did show a message; + }); + } + return clientHost; + }; + })(); - const client = clientHost.serviceClient; context.subscriptions.push(commands.registerCommand('typescript.reloadProjects', () => { - clientHost.reloadProjects(); + lazyClientHost().reloadProjects(); })); context.subscriptions.push(commands.registerCommand('javascript.reloadProjects', () => { - clientHost.reloadProjects(); + lazyClientHost().reloadProjects(); })); context.subscriptions.push(commands.registerCommand('typescript.selectTypeScriptVersion', () => { - client.onVersionStatusClicked(); + lazyClientHost().serviceClient.onVersionStatusClicked(); })); context.subscriptions.push(commands.registerCommand('typescript.openTsServerLog', () => { - client.openTsServerLogFile(); + lazyClientHost().serviceClient.openTsServerLogFile(); + })); + + context.subscriptions.push(commands.registerCommand('typescript.restartTsServer', () => { + lazyClientHost().serviceClient.restartTsServer(); })); + context.subscriptions.push(new TypeScriptTaskProviderManager(() => lazyClientHost().serviceClient)); + const goToProjectConfig = (isTypeScript: boolean) => { const editor = window.activeTextEditor; if (editor) { - clientHost.goToProjectConfig(isTypeScript, editor.document.uri); + lazyClientHost().goToProjectConfig(isTypeScript, editor.document.uri); } }; context.subscriptions.push(commands.registerCommand('typescript.goToProjectConfig', goToProjectConfig.bind(null, true))); context.subscriptions.push(commands.registerCommand('javascript.goToProjectConfig', goToProjectConfig.bind(null, false))); - const jsDocCompletionCommand = new TryCompleteJsDocCommand(client); + const jsDocCompletionCommand = new TryCompleteJsDocCommand(() => lazyClientHost().serviceClient); context.subscriptions.push(commands.registerCommand(TryCompleteJsDocCommand.COMMAND_NAME, jsDocCompletionCommand.tryCompleteJsDoc, jsDocCompletionCommand)); - window.onDidChangeActiveTextEditor(VersionStatus.showHideStatus, null, context.subscriptions); - client.onReady().then(() => { - context.subscriptions.push(ProjectStatus.create(client, - path => new Promise(resolve => setTimeout(() => resolve(clientHost.handles(path)), 750)), - context.workspaceState)); - }, () => { - // Nothing to do here. The client did show a message; - }); - BuildStatus.update({ queueLength: 0 }); + const supportedLanguage = [].concat.apply([], standardLanguageDescriptions.map(x => x.modeIds).concat(plugins.map(x => x.languages))); + function didOpenTextDocument(textDocument: TextDocument): boolean { + if (supportedLanguage.indexOf(textDocument.languageId) >= 0) { + openListener.dispose(); + // Force activation + void lazyClientHost(); + return true; + } + return false; + }; + const openListener = workspace.onDidOpenTextDocument(didOpenTextDocument); + for (let textDocument of workspace.textDocuments) { + if (didOpenTextDocument(textDocument)) { + break; + } + } } + const validateSetting = 'validate.enable'; class LanguageProvider { - private readonly extensions: ObjectMap; private syntaxDiagnostics: ObjectMap; private readonly currentDiagnostics: DiagnosticCollection; private readonly bufferSyncSupport: BufferSyncSupport; - private completionItemProvider: CompletionItemProvider; private formattingProvider: FormattingProvider; private formattingProviderRegistration: Disposable | null; private typingsStatus: TypingsStatus; - private referenceCodeLensProvider: ReferenceCodeLensProvider; - private implementationCodeLensProvider: ImplementationCodeLensProvider; - private JsDocCompletionProvider: JsDocCompletionProvider; + private toUpdateOnConfigurationChanged: ({ updateConfiguration: () => void })[] = []; private _validate: boolean = true; @@ -158,14 +187,11 @@ class LanguageProvider { private readonly client: TypeScriptServiceClient, private readonly description: LanguageDescription ) { - this.extensions = Object.create(null); - description.extensions.forEach(extension => this.extensions[extension] = true); - this.bufferSyncSupport = new BufferSyncSupport(client, description.modeIds, { delete: (file: string) => { this.currentDiagnostics.delete(client.asUrl(file)); } - }, this.extensions); + }); this.syntaxDiagnostics = Object.create(null); this.currentDiagnostics = languages.createDiagnosticCollection(description.id); @@ -211,9 +237,12 @@ class LanguageProvider { const selector = this.description.modeIds; const config = workspace.getConfiguration(this.id); - this.completionItemProvider = new CompletionItemProvider(client, this.typingsStatus); - this.completionItemProvider.updateConfiguration(); - this.disposables.push(languages.registerCompletionItemProvider(selector, this.completionItemProvider, '.')); + const completionItemProvider = new CompletionItemProvider(client, this.typingsStatus); + completionItemProvider.updateConfiguration(); + this.toUpdateOnConfigurationChanged.push(completionItemProvider); + this.disposables.push(languages.registerCompletionItemProvider(selector, completionItemProvider, '.')); + + this.disposables.push(languages.registerCompletionItemProvider(selector, new DirectiveCommentCompletionProvider(client), '@')); this.formattingProvider = new FormattingProvider(client); this.formattingProvider.updateConfiguration(config); @@ -222,9 +251,9 @@ class LanguageProvider { this.formattingProviderRegistration = languages.registerDocumentRangeFormattingEditProvider(selector, this.formattingProvider); } - this.JsDocCompletionProvider = new JsDocCompletionProvider(client); - this.JsDocCompletionProvider.updateConfiguration(); - this.disposables.push(languages.registerCompletionItemProvider(selector, this.JsDocCompletionProvider, '*')); + const jsDocCompletionProvider = new JsDocCompletionProvider(client); + jsDocCompletionProvider.updateConfiguration(); + this.disposables.push(languages.registerCompletionItemProvider(selector, jsDocCompletionProvider, '*')); this.disposables.push(languages.registerHoverProvider(selector, new HoverProvider(client))); this.disposables.push(languages.registerDefinitionProvider(selector, new DefinitionProvider(client))); @@ -234,27 +263,31 @@ class LanguageProvider { this.disposables.push(languages.registerSignatureHelpProvider(selector, new SignatureHelpProvider(client), '(', ',')); this.disposables.push(languages.registerRenameProvider(selector, new RenameProvider(client))); - this.referenceCodeLensProvider = new ReferenceCodeLensProvider(client); - this.referenceCodeLensProvider.updateConfiguration(); - this.disposables.push(languages.registerCodeLensProvider(selector, this.referenceCodeLensProvider)); - - this.implementationCodeLensProvider = new ImplementationCodeLensProvider(client); - this.implementationCodeLensProvider.updateConfiguration(); - this.disposables.push(languages.registerCodeLensProvider(selector, this.implementationCodeLensProvider)); - this.disposables.push(languages.registerCodeActionsProvider(selector, new CodeActionProvider(client, this.description.id))); - + this.disposables.push(languages.registerCodeActionsProvider(selector, new RefactorProvider(client, this.description.id))); this.registerVersionDependentProviders(); this.description.modeIds.forEach(modeId => { this.disposables.push(languages.registerWorkspaceSymbolProvider(new WorkspaceSymbolProvider(client, modeId))); + const referenceCodeLensProvider = new ReferenceCodeLensProvider(client, modeId); + referenceCodeLensProvider.updateConfiguration(); + this.toUpdateOnConfigurationChanged.push(referenceCodeLensProvider); + this.disposables.push(languages.registerCodeLensProvider(selector, referenceCodeLensProvider)); + + const implementationCodeLensProvider = new ImplementationCodeLensProvider(client, modeId); + implementationCodeLensProvider.updateConfiguration(); + this.toUpdateOnConfigurationChanged.push(implementationCodeLensProvider); + this.disposables.push(languages.registerCodeLensProvider(selector, implementationCodeLensProvider)); + + this.disposables.push(languages.setLanguageConfiguration(modeId, { indentationRules: { // ^(.*\*/)?\s*\}.*$ - decreaseIndentPattern: /^(.*\*\/)?\s*\}.*$/, + decreaseIndentPattern: /^((?!.*?\/\*).*\*\/)?\s*[\}\]\)].*$/, // ^.*\{[^}"']*$ - increaseIndentPattern: /^.*\{[^}"'`]*$/ + increaseIndentPattern: /^.*(\{[^}"'`]*|\([^)"'`]*|\[[^\]"'`]*)$/, + indentNextLinePattern: /^\s*(for|while|if|else)\b(?!.*[;{}]\s*(\/\/.*|\/[*].*[*]\/\s*)?$)/ }, wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, onEnterRules: [ @@ -306,15 +339,7 @@ class LanguageProvider { private configurationChanged(): void { const config = workspace.getConfiguration(this.id); this.updateValidate(config.get(validateSetting, true)); - if (this.completionItemProvider) { - this.completionItemProvider.updateConfiguration(); - } - if (this.referenceCodeLensProvider) { - this.referenceCodeLensProvider.updateConfiguration(); - } - if (this.implementationCodeLensProvider) { - this.implementationCodeLensProvider.updateConfiguration(); - } + if (this.formattingProvider) { this.formattingProvider.updateConfiguration(config); if (!this.formattingProvider.isEnabled() && this.formattingProviderRegistration) { @@ -325,18 +350,26 @@ class LanguageProvider { this.formattingProviderRegistration = languages.registerDocumentRangeFormattingEditProvider(this.description.modeIds, this.formattingProvider); } } - if (this.JsDocCompletionProvider) { - this.JsDocCompletionProvider.updateConfiguration(); + + for (const toUpdate of this.toUpdateOnConfigurationChanged) { + toUpdate.updateConfiguration(); } } - public handles(file: string): boolean { - const extension = path.extname(file); - if ((extension && this.extensions[extension]) || this.bufferSyncSupport.handles(file)) { + public handles(file: string, doc: TextDocument): boolean { + if (doc && this.description.modeIds.indexOf(doc.languageId) >= 0) { return true; } + + if (this.bufferSyncSupport.handles(file)) { + return true; + } + const basename = path.basename(file); - return !!basename && basename === this.description.configFile; + if (!!basename && basename === this.description.configFile) { + return true; + } + return false; } public get id(): string { @@ -416,16 +449,15 @@ class LanguageProvider { class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { private client: TypeScriptServiceClient; - private languages: LanguageProvider[]; - private languagePerId: ObjectMap; - private configFileWatcher: FileSystemWatcher; + private languages: LanguageProvider[] = []; + private languagePerId: Map; private readonly disposables: Disposable[] = []; + private readonly versionStatus: VersionStatus; constructor( descriptions: LanguageDescription[], - storagePath: string | undefined, - globalState: Memento, - workspaceState: Memento + workspaceState: Memento, + plugins: TypeScriptServerPlugin[] ) { const handleProjectCreateOrDelete = () => { this.client.execute('reloadProjects', null, false); @@ -442,15 +474,45 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { configFileWatcher.onDidDelete(handleProjectCreateOrDelete, this, this.disposables); configFileWatcher.onDidChange(handleProjectChange, this, this.disposables); - this.client = new TypeScriptServiceClient(this, storagePath, globalState, workspaceState, this.disposables); - this.languages = []; - this.languagePerId = Object.create(null); + this.versionStatus = new VersionStatus(); + this.disposables.push(this.versionStatus); + + this.client = new TypeScriptServiceClient(this, workspaceState, this.versionStatus, plugins, this.disposables); + this.languagePerId = new Map(); for (const description of descriptions) { const manager = new LanguageProvider(this.client, description); this.languages.push(manager); this.disposables.push(manager); - this.languagePerId[description.id] = manager; + this.languagePerId.set(description.id, manager); } + + this.client.onReady().then(() => { + if (!this.client.apiVersion.has230Features()) { + return; + } + + const langauges = new Set(); + for (const plugin of plugins) { + for (const language of plugin.languages) { + langauges.add(language); + } + } + if (langauges.size) { + const description: LanguageDescription = { + id: 'typescript-plugins', + modeIds: Array.from(langauges.values()), + diagnosticSource: 'ts-plugins' + }; + const manager = new LanguageProvider(this.client, description); + this.languages.push(manager); + this.disposables.push(manager); + this.languagePerId.set(description.id, manager); + } + }); + + this.client.onTsServerStarted(() => { + this.triggerAllDiagnostics(); + }); } public dispose(): void { @@ -460,22 +522,12 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { obj.dispose(); } } - this.configFileWatcher.dispose(); } public get serviceClient(): TypeScriptServiceClient { return this.client; } - public restartTsServer(): void { - this.client.restartTsServer(); - if (this.languages) { - for (const provider of this.languages) { - provider.reInitialize(); - } - } - } - public reloadProjects(): void { this.client.execute('reloadProjects', null, false); this.triggerAllDiagnostics(); @@ -489,7 +541,7 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { isTypeScriptProject: boolean, resource: Uri ): Thenable | undefined { - const rootPath = workspace.rootPath; + const rootPath = this.client.getWorkspaceRootForResource(resource); if (!rootPath) { window.showInformationMessage( localize( @@ -515,7 +567,7 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { } const { configFileName } = res.body; - if (configFileName && configFileName.indexOf('/dev/null/') !== 0) { + if (configFileName && !isImplicitProjectConfigFile(configFileName)) { return workspace.openTextDocument(configFileName) .then(doc => window.showTextDocument(doc, window.activeTextEditor ? window.activeTextEditor.viewColumn : undefined)); @@ -536,11 +588,7 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { }).then(selected => { switch (selected && selected.id) { case ProjectConfigAction.CreateConfig: - const configFile = Uri.file(path.join(rootPath, isTypeScriptProject ? 'tsconfig.json' : 'jsconfig.json')); - return workspace.openTextDocument(configFile) - .then(undefined, _ => workspace.openTextDocument(configFile.with({ scheme: 'untitled' }))) - .then(doc => - window.showTextDocument(doc, window.activeTextEditor ? window.activeTextEditor.viewColumn : undefined)); + return openOrCreateConfigFile(isTypeScriptProject, rootPath); case ProjectConfigAction.LearnMore: if (isTypeScriptProject) { @@ -557,50 +605,52 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { }); } - private findLanguage(file: string): LanguageProvider | null { - for (let i = 0; i < this.languages.length; i++) { - let language = this.languages[i]; - if (language.handles(file)) { - return language; + private findLanguage(file: string): Thenable { + return workspace.openTextDocument(this.client.asUrl(file)).then((doc: TextDocument) => { + for (const language of this.languages) { + if (language.handles(file, doc)) { + return language; + } } - } - return null; + return null; + }, () => null); } private triggerAllDiagnostics() { - Object.keys(this.languagePerId).forEach(key => this.languagePerId[key].triggerAllDiagnostics()); + for (const language of this.languagePerId.values()) { + language.triggerAllDiagnostics(); + } } /* internal */ populateService(): void { // See https://github.com/Microsoft/TypeScript/issues/5530 - workspace.saveAll(false).then(_ => { - Object.keys(this.languagePerId).forEach(key => this.languagePerId[key].reInitialize()); + workspace.saveAll(false).then(() => { + for (const language of this.languagePerId.values()) { + language.reInitialize(); + } }); } /* internal */ syntaxDiagnosticsReceived(event: Proto.DiagnosticEvent): void { - let body = event.body; + const body = event.body; if (body && body.diagnostics) { - let language = this.findLanguage(body.file); - if (language) { - language.syntaxDiagnosticsReceived(body.file, this.createMarkerDatas(body.diagnostics, language.diagnosticSource)); - } + this.findLanguage(body.file).then(language => { + if (language) { + language.syntaxDiagnosticsReceived(body.file, this.createMarkerDatas(body.diagnostics, language.diagnosticSource)); + } + }); } } /* internal */ semanticDiagnosticsReceived(event: Proto.DiagnosticEvent): void { - let body = event.body; + const body = event.body; if (body && body.diagnostics) { - let language = this.findLanguage(body.file); - if (language) { - language.semanticDiagnosticsReceived(body.file, this.createMarkerDatas(body.diagnostics, language.diagnosticSource)); - } - } - /* - if (Is.defined(body.queueLength)) { - BuildStatus.update({ queueLength: body.queueLength }); + this.findLanguage(body.file).then(language => { + if (language) { + language.semanticDiagnosticsReceived(body.file, this.createMarkerDatas(body.diagnostics, language.diagnosticSource)); + } + }); } - */ } /* internal */ configFileDiagnosticsReceived(event: Proto.ConfigFileDiagnosticEvent): void { @@ -610,47 +660,48 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { return; } - const language = body.triggerFile ? this.findLanguage(body.triggerFile) : this.findLanguage(body.configFile); - if (!language) { - return; - } - if (body.diagnostics.length === 0) { - language.configFileDiagnosticsReceived(body.configFile, []); - } else if (body.diagnostics.length >= 1) { - workspace.openTextDocument(Uri.file(body.configFile)).then((document) => { - let curly: [number, number, number] | undefined = undefined; - let nonCurly: [number, number, number] | undefined = undefined; - let diagnostic: Diagnostic; - for (let index = 0; index < document.lineCount; index++) { - const line = document.lineAt(index); - const text = line.text; - const firstNonWhitespaceCharacterIndex = line.firstNonWhitespaceCharacterIndex; - if (firstNonWhitespaceCharacterIndex < text.length) { - if (text.charAt(firstNonWhitespaceCharacterIndex) === '{') { - curly = [index, firstNonWhitespaceCharacterIndex, firstNonWhitespaceCharacterIndex + 1]; - break; - } else { - const matches = /\s*([^\s]*)(?:\s*|$)/.exec(text.substr(firstNonWhitespaceCharacterIndex)); - if (matches && matches.length >= 1) { - nonCurly = [index, firstNonWhitespaceCharacterIndex, firstNonWhitespaceCharacterIndex + matches[1].length]; + (body.triggerFile ? this.findLanguage(body.triggerFile) : this.findLanguage(body.configFile)).then(language => { + if (!language) { + return; + } + if (body.diagnostics.length === 0) { + language.configFileDiagnosticsReceived(body.configFile, []); + } else if (body.diagnostics.length >= 1) { + workspace.openTextDocument(Uri.file(body.configFile)).then((document) => { + let curly: [number, number, number] | undefined = undefined; + let nonCurly: [number, number, number] | undefined = undefined; + let diagnostic: Diagnostic; + for (let index = 0; index < document.lineCount; index++) { + const line = document.lineAt(index); + const text = line.text; + const firstNonWhitespaceCharacterIndex = line.firstNonWhitespaceCharacterIndex; + if (firstNonWhitespaceCharacterIndex < text.length) { + if (text.charAt(firstNonWhitespaceCharacterIndex) === '{') { + curly = [index, firstNonWhitespaceCharacterIndex, firstNonWhitespaceCharacterIndex + 1]; + break; + } else { + const matches = /\s*([^\s]*)(?:\s*|$)/.exec(text.substr(firstNonWhitespaceCharacterIndex)); + if (matches && matches.length >= 1) { + nonCurly = [index, firstNonWhitespaceCharacterIndex, firstNonWhitespaceCharacterIndex + matches[1].length]; + } } } } - } - const match = curly || nonCurly; - if (match) { - diagnostic = new Diagnostic(new Range(match[0], match[1], match[0], match[2]), body.diagnostics[0].text); - } else { - diagnostic = new Diagnostic(new Range(0, 0, 0, 0), body.diagnostics[0].text); - } - if (diagnostic) { - diagnostic.source = language.diagnosticSource; - language.configFileDiagnosticsReceived(body.configFile, [diagnostic]); - } - }, _error => { - language.configFileDiagnosticsReceived(body.configFile, [new Diagnostic(new Range(0, 0, 0, 0), body.diagnostics[0].text)]); - }); - } + const match = curly || nonCurly; + if (match) { + diagnostic = new Diagnostic(new Range(match[0], match[1], match[0], match[2]), body.diagnostics[0].text); + } else { + diagnostic = new Diagnostic(new Range(0, 0, 0, 0), body.diagnostics[0].text); + } + if (diagnostic) { + diagnostic.source = language.diagnosticSource; + language.configFileDiagnosticsReceived(body.configFile, [diagnostic]); + } + }, _error => { + language.configFileDiagnosticsReceived(body.configFile, [new Diagnostic(new Range(0, 0, 0, 0), body.diagnostics[0].text)]); + }); + } + }); } private createMarkerDatas(diagnostics: Proto.Diagnostic[], source: string): Diagnostic[] { diff --git a/extensions/typescript/src/typescriptService.ts b/extensions/typescript/src/typescriptService.ts index bfc410c6cbab2..ffab7e955a71d 100644 --- a/extensions/typescript/src/typescriptService.ts +++ b/extensions/typescript/src/typescriptService.ts @@ -3,7 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; import { CancellationToken, Uri, Event } from 'vscode'; import * as Proto from './protocol'; @@ -65,15 +64,23 @@ export class API { public has230Features(): boolean { return semver.gte(this._version, '2.3.0'); } + + public has234Features(): boolean { + return semver.gte(this._version, '2.3.4'); + } + public has240Features(): boolean { + return semver.gte(this._version, '2.4.0'); + } } export interface ITypescriptServiceClient { normalizePath(resource: Uri): string | null; asUrl(filepath: string): Uri; + getWorkspaceRootForResource(resource: Uri): string | undefined; - info(message: string, data?: any): void; warn(message: string, data?: any): void; - error(message: string, data?: any): void; + + onTsServerStarted: Event; onProjectLanguageServiceStateChanged: Event; onDidBeginInstallTypings: Event; @@ -82,7 +89,6 @@ export interface ITypescriptServiceClient { logTelemetry(eventName: string, properties?: { [prop: string]: string }): void; - experimentalAutoBuild: boolean; apiVersion: API; checkGlobalTSCVersion: boolean; @@ -113,6 +119,8 @@ export interface ITypescriptServiceClient { execute(command: 'getCodeFixes', args: Proto.CodeFixRequestArgs, token?: CancellationToken): Promise; execute(command: 'getSupportedCodeFixes', args: null, token?: CancellationToken): Promise; execute(command: 'docCommentTemplate', args: Proto.FileLocationRequestArgs, token?: CancellationToken): Promise; + execute(command: 'getApplicableRefactors', args: Proto.GetApplicableRefactorsRequestArgs, token?: CancellationToken): Promise; + execute(command: 'getEditsForRefactor', args: Proto.GetEditsForRefactorRequestArgs, token?: CancellationToken): Promise; // execute(command: 'compileOnSaveAffectedFileList', args: Proto.CompileOnSaveEmitFileRequestArgs, token?: CancellationToken): Promise; // execute(command: 'compileOnSaveEmitFile', args: Proto.CompileOnSaveEmitFileRequestArgs, token?: CancellationToken): Promise; execute(command: string, args: any, expectedResult: boolean | CancellationToken, token?: CancellationToken): Promise; diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index 78252498fc775..e5e4f4fa30a83 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -3,24 +3,25 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import * as cp from 'child_process'; import * as path from 'path'; import * as fs from 'fs'; import * as os from 'os'; +import * as net from 'net'; import * as electron from './utils/electron'; import { Reader } from './utils/wireProtocol'; -import { workspace, window, extensions, Uri, CancellationToken, Disposable, OutputChannel, Memento, MessageItem, QuickPickItem, EventEmitter, Event, commands, WorkspaceConfiguration } from 'vscode'; +import { workspace, window, Uri, CancellationToken, Disposable, Memento, MessageItem, QuickPickItem, EventEmitter, Event, commands, WorkspaceConfiguration } from 'vscode'; import * as Proto from './protocol'; import { ITypescriptServiceClient, ITypescriptServiceClientHost, API } from './typescriptService'; +import { TypeScriptServerPlugin } from './utils/plugins'; +import Logger from './utils/logger'; -import * as VersionStatus from './utils/versionStatus'; +import VersionStatus from './utils/versionStatus'; import * as is from './utils/is'; - -import TelemetryReporter from 'vscode-extension-telemetry'; +import TelemetryReporter from './utils/telemetry'; +import Tracer from './utils/tracer'; import * as nls from 'vscode-nls'; const localize = nls.loadMessageBundle(); @@ -31,44 +32,42 @@ interface CallbackItem { start: number; } -interface CallbackMap { - [key: number]: CallbackItem; -} +class CallbackMap { + private callbacks: Map = new Map(); + public pendingResponses: number = 0; -interface RequestItem { - request: Proto.Request; - promise: Promise | null; - callbacks: CallbackItem | null; -} + public destroy(e: any): void { + for (const callback of this.callbacks.values()) { + callback.e(e); + } + this.callbacks = new Map(); + this.pendingResponses = 0; + } -interface IPackageInfo { - name: string; - version: string; - aiKey: string; -} + public add(seq: number, callback: CallbackItem) { + this.callbacks.set(seq, callback); + ++this.pendingResponses; + } -enum Trace { - Off, - Messages, - Verbose -} + public fetch(seq: number): CallbackItem | undefined { + const callback = this.callbacks.get(seq); + this.delete(seq); + return callback; + } -namespace Trace { - export function fromString(value: string): Trace { - value = value.toLowerCase(); - switch (value) { - case 'off': - return Trace.Off; - case 'messages': - return Trace.Messages; - case 'verbose': - return Trace.Verbose; - default: - return Trace.Off; + private delete(seq: number) { + if (this.callbacks.delete(seq)) { + --this.pendingResponses; } } } +interface RequestItem { + request: Proto.Request; + promise: Promise | null; + callbacks: CallbackItem | null; +} + enum TsServerLogLevel { Off, Normal, @@ -121,11 +120,103 @@ interface MyMessageItem extends MessageItem { id: MessageAction; } -interface TypeScriptServerPlugin { - path: string; - name: string; +class TypeScriptServiceConfiguration { + public readonly globalTsdk: string | null; + public readonly localTsdk: string | null; + public readonly npmLocation: string | null; + public readonly tsServerLogLevel: TsServerLogLevel = TsServerLogLevel.Off; + public readonly checkJs: boolean; + + public static loadFromWorkspace(): TypeScriptServiceConfiguration { + return new TypeScriptServiceConfiguration(); + } + + private constructor() { + const configuration = workspace.getConfiguration(); + + this.globalTsdk = TypeScriptServiceConfiguration.extractGlobalTsdk(configuration); + this.localTsdk = TypeScriptServiceConfiguration.extractLocalTsdk(configuration); + this.npmLocation = TypeScriptServiceConfiguration.readNpmLocation(configuration); + this.tsServerLogLevel = TypeScriptServiceConfiguration.readTsServerLogLevel(configuration); + this.checkJs = TypeScriptServiceConfiguration.readCheckJs(configuration); + } + + public isEqualTo(other: TypeScriptServiceConfiguration): boolean { + return this.globalTsdk === other.globalTsdk + && this.localTsdk === other.localTsdk + && this.npmLocation === other.npmLocation + && this.tsServerLogLevel === other.tsServerLogLevel + && this.checkJs === other.checkJs; + } + + private static extractGlobalTsdk(configuration: WorkspaceConfiguration): string | null { + let inspect = configuration.inspect('typescript.tsdk'); + if (inspect && inspect.globalValue && 'string' === typeof inspect.globalValue) { + return inspect.globalValue; + } + if (inspect && inspect.defaultValue && 'string' === typeof inspect.defaultValue) { + return inspect.defaultValue; + } + return null; + } + + private static extractLocalTsdk(configuration: WorkspaceConfiguration): string | null { + let inspect = configuration.inspect('typescript.tsdk'); + if (inspect && inspect.workspaceValue && 'string' === typeof inspect.workspaceValue) { + return inspect.workspaceValue; + } + return null; + } + + private static readTsServerLogLevel(configuration: WorkspaceConfiguration): TsServerLogLevel { + const setting = configuration.get('typescript.tsserver.log', 'off'); + return TsServerLogLevel.fromString(setting); + } + + private static readCheckJs(configuration: WorkspaceConfiguration): boolean { + return configuration.get('javascript.implicitProjectConfig.checkJs', false); + } + + private static readNpmLocation(configuration: WorkspaceConfiguration): string | null { + return configuration.get('typescript.npm', null); + } } +class RequestQueue { + private queue: RequestItem[] = []; + private sequenceNumber: number = 0; + + public get length(): number { + return this.queue.length; + } + + public push(item: RequestItem): void { + this.queue.push(item); + } + + public shift(): RequestItem | undefined { + return this.queue.shift(); + } + + public tryCancelPendingRequest(seq: number): boolean { + for (let i = 0; i < this.queue.length; i++) { + if (this.queue[i].request.seq === seq) { + this.queue.splice(i, 1); + return true; + } + } + return false; + } + + public createRequest(command: string, args: any): Proto.Request { + return { + seq: this.sequenceNumber++, + type: 'request', + command: command, + arguments: args + }; + } +} export default class TypeScriptServiceClient implements ITypescriptServiceClient { private static useWorkspaceTsdkStorageKey = 'typescript.useWorkspaceTsdk'; @@ -134,48 +225,44 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient private static readonly WALK_THROUGH_SNIPPET_SCHEME = 'walkThroughSnippet'; private static readonly WALK_THROUGH_SNIPPET_SCHEME_COLON = `${TypeScriptServiceClient.WALK_THROUGH_SNIPPET_SCHEME}:`; - private host: ITypescriptServiceClientHost; - private storagePath: string | undefined; - private globalState: Memento; private pathSeparator: string; private modulePath: string | undefined; private _onReady: { promise: Promise; resolve: () => void; reject: () => void; }; - private globalTsdk: string | null; - private localTsdk: string | null; + private configuration: TypeScriptServiceConfiguration; private _checkGlobalTSCVersion: boolean; - private _experimentalAutoBuild: boolean; - private trace: Trace; - private _output: OutputChannel; + private tracer: Tracer; + private readonly logger: Logger = new Logger(); private tsServerLogFile: string | null = null; - private tsServerLogLevel: TsServerLogLevel = TsServerLogLevel.Off; private servicePromise: Thenable | null; private lastError: Error | null; private reader: Reader; - private sequenceNumber: number; - private exitRequested: boolean; private firstStart: number; private lastStart: number; private numberRestarts: number; + private isRestarting: boolean = false; + private cancellationPipeName: string | null = null; - private requestQueue: RequestItem[]; - private pendingResponses: number; + private requestQueue: RequestQueue; private callbacks: CallbackMap; - private _onProjectLanguageServiceStateChanged = new EventEmitter(); - private _onDidBeginInstallTypings = new EventEmitter(); - private _onDidEndInstallTypings = new EventEmitter(); - private _onTypesInstallerInitializationFailed = new EventEmitter(); - private _packageInfo: IPackageInfo | null; + private readonly _onTsServerStarted = new EventEmitter(); + private readonly _onProjectLanguageServiceStateChanged = new EventEmitter(); + private readonly _onDidBeginInstallTypings = new EventEmitter(); + private readonly _onDidEndInstallTypings = new EventEmitter(); + private readonly _onTypesInstallerInitializationFailed = new EventEmitter(); + private _apiVersion: API; private telemetryReporter: TelemetryReporter; - private checkJs: boolean; - constructor(host: ITypescriptServiceClientHost, storagePath: string | undefined, globalState: Memento, private workspaceState: Memento, disposables: Disposable[]) { - this.host = host; - this.storagePath = storagePath; - this.globalState = globalState; + constructor( + private readonly host: ITypescriptServiceClientHost, + private readonly workspaceState: Memento, + private readonly versionStatus: VersionStatus, + private readonly plugins: TypeScriptServerPlugin[], + disposables: Disposable[] + ) { this.pathSeparator = path.sep; this.lastStart = Date.now(); @@ -186,67 +273,48 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient this.servicePromise = null; this.lastError = null; - this.sequenceNumber = 0; - this.exitRequested = false; this.firstStart = Date.now(); this.numberRestarts = 0; - this.requestQueue = []; - this.pendingResponses = 0; - this.callbacks = Object.create(null); - const configuration = workspace.getConfiguration(); - this.globalTsdk = this.extractGlobalTsdk(configuration); - this.localTsdk = this.extractLocalTsdk(configuration); + this.requestQueue = new RequestQueue(); + this.callbacks = new CallbackMap(); + this.configuration = TypeScriptServiceConfiguration.loadFromWorkspace(); - this._experimentalAutoBuild = false; // configuration.get('typescript.tsserver.experimentalAutoBuild', false); this._apiVersion = new API('1.0.0'); this._checkGlobalTSCVersion = true; - this.trace = this.readTrace(); - this.tsServerLogLevel = this.readTsServerLogLevel(); - this.checkJs = this.readCheckJs(); + this.tracer = new Tracer(this.logger); disposables.push(workspace.onDidChangeConfiguration(() => { - let oldLoggingLevel = this.tsServerLogLevel; - let oldglobalTsdk = this.globalTsdk; - let oldLocalTsdk = this.localTsdk; - let oldCheckJs = this.checkJs; - - this.trace = this.readTrace(); - this.tsServerLogLevel = this.readTsServerLogLevel(); + const oldConfiguration = this.configuration; + this.configuration = TypeScriptServiceConfiguration.loadFromWorkspace(); - const configuration = workspace.getConfiguration(); - this.globalTsdk = this.extractGlobalTsdk(configuration); - this.localTsdk = this.extractLocalTsdk(configuration); - this.checkJs = this.readCheckJs(); + this.tracer.updateConfiguration(); - if (this.servicePromise && oldCheckJs !== this.checkJs) { - this.setCompilerOptionsForInferredProjects(); - } + if (this.servicePromise) { + if (this.configuration.checkJs !== oldConfiguration.checkJs) { + this.setCompilerOptionsForInferredProjects(); + } - if (this.servicePromise === null && (oldglobalTsdk !== this.globalTsdk || oldLocalTsdk !== this.localTsdk)) { - this.startService(); - } else if (this.servicePromise !== null && (this.tsServerLogLevel !== oldLoggingLevel || (oldglobalTsdk !== this.globalTsdk || oldLocalTsdk !== this.localTsdk))) { - this.restartTsServer(); + if (!this.configuration.isEqualTo(oldConfiguration)) { + this.restartTsServer(); + } } })); - if (this.packageInfo && this.packageInfo.aiKey) { - this.telemetryReporter = new TelemetryReporter(this.packageInfo.name, this.packageInfo.version, this.packageInfo.aiKey); - disposables.push(this.telemetryReporter); - } + this.telemetryReporter = new TelemetryReporter(); + disposables.push(this.telemetryReporter); this.startService(); } public restartTsServer(): void { const start = () => { - this.trace = this.readTrace(); - this.tsServerLogLevel = this.readTsServerLogLevel(); - this.servicePromise = this.startService(); + this.servicePromise = this.startService(true); return this.servicePromise; }; - if (this.servicePromise !== null) { + if (this.servicePromise) { this.servicePromise = this.servicePromise.then(cp => { if (cp) { + this.isRestarting = true; cp.kill(); } }).then(start); @@ -255,24 +323,8 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } } - - private extractGlobalTsdk(configuration: WorkspaceConfiguration): string | null { - let inspect = configuration.inspect('typescript.tsdk'); - if (inspect && inspect.globalValue && 'string' === typeof inspect.globalValue) { - return inspect.globalValue; - } - if (inspect && inspect.defaultValue && 'string' === typeof inspect.defaultValue) { - return inspect.defaultValue; - } - return null; - } - - private extractLocalTsdk(configuration: WorkspaceConfiguration): string | null { - let inspect = configuration.inspect('typescript.tsdk'); - if (inspect && inspect.workspaceValue && 'string' === typeof inspect.workspaceValue) { - return inspect.workspaceValue; - } - return null; + get onTsServerStarted(): Event { + return this._onTsServerStarted.event; } get onProjectLanguageServiceStateChanged(): Event { @@ -291,34 +343,6 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient return this._onTypesInstallerInitializationFailed.event; } - private get output(): OutputChannel { - if (!this._output) { - this._output = window.createOutputChannel(localize('channelName', 'TypeScript')); - } - return this._output; - } - - private readTrace(): Trace { - let result: Trace = Trace.fromString(workspace.getConfiguration().get('typescript.tsserver.trace', 'off')); - if (result === Trace.Off && !!process.env.TSS_TRACE) { - result = Trace.Messages; - } - return result; - } - - private readTsServerLogLevel(): TsServerLogLevel { - const setting = workspace.getConfiguration().get('typescript.tsserver.log', 'off'); - return TsServerLogLevel.fromString(setting); - } - - private readCheckJs(): boolean { - return workspace.getConfiguration().get('javascript.implicitProjectConfig.checkJs', false); - } - - public get experimentalAutoBuild(): boolean { - return this._experimentalAutoBuild; - } - public get checkGlobalTSCVersion(): boolean { return this._checkGlobalTSCVersion; } @@ -331,80 +355,20 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient return this._onReady.promise; } - private data2String(data: any): string { - if (data instanceof Error) { - if (is.string(data.stack)) { - return data.stack; - } - return (data as Error).message; - } - if (is.boolean(data.success) && !data.success && is.string(data.message)) { - return data.message; - } - if (is.string(data)) { - return data; - } - return data.toString(); - } - - public info(message: string, data?: any): void { - this.output.appendLine(`[Info - ${(new Date().toLocaleTimeString())}] ${message}`); - if (data) { - this.output.appendLine(this.data2String(data)); - } + private info(message: string, data?: any): void { + this.logger.info(message, data); } public warn(message: string, data?: any): void { - this.output.appendLine(`[Warn - ${(new Date().toLocaleTimeString())}] ${message}`); - if (data) { - this.output.appendLine(this.data2String(data)); - } - } - - public error(message: string, data?: any): void { - // See https://github.com/Microsoft/TypeScript/issues/10496 - if (data && data.message === 'No content available.') { - return; - } - this.output.appendLine(`[Error - ${(new Date().toLocaleTimeString())}] ${message}`); - if (data) { - this.output.appendLine(this.data2String(data)); - } - // this.output.show(true); - } - - private logTrace(message: string, data?: any): void { - this.output.appendLine(`[Trace - ${(new Date().toLocaleTimeString())}] ${message}`); - if (data) { - this.output.appendLine(this.data2String(data)); - } - // this.output.show(true); + this.logger.warn(message, data); } - private get packageInfo(): IPackageInfo | null { - - if (this._packageInfo !== undefined) { - return this._packageInfo; - } - let packagePath = path.join(__dirname, './../package.json'); - let extensionPackage = require(packagePath); - if (extensionPackage) { - this._packageInfo = { - name: extensionPackage.name, - version: extensionPackage.version, - aiKey: extensionPackage.aiKey - }; - } else { - this._packageInfo = null; - } - - return this._packageInfo; + private error(message: string, data?: any): void { + this.logger.error(message, data); } public logTelemetry(eventName: string, properties?: { [prop: string]: string }) { - if (this.telemetryReporter) { - this.telemetryReporter.sendTelemetryEvent(eventName, properties); - } + this.telemetryReporter.logTelemetry(eventName, properties); } private service(): Thenable { @@ -430,19 +394,20 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } private get localTypeScriptPath(): string | null { - if (!workspace.rootPath) { + const rootPath = this.mainWorkspaceRootPath; + if (!rootPath) { return null; } - if (this.localTsdk) { + if (this.configuration.localTsdk) { this._checkGlobalTSCVersion = false; - if ((path).isAbsolute(this.localTsdk)) { - return path.join(this.localTsdk, 'tsserver.js'); + if ((path).isAbsolute(this.configuration.localTsdk)) { + return path.join(this.configuration.localTsdk, 'tsserver.js'); } - return path.join(workspace.rootPath, this.localTsdk, 'tsserver.js'); + return path.join(rootPath, this.configuration.localTsdk, 'tsserver.js'); } - const localModulePath = path.join(workspace.rootPath, 'node_modules', 'typescript', 'lib', 'tsserver.js'); + const localModulePath = path.join(rootPath, 'node_modules', 'typescript', 'lib', 'tsserver.js'); if (fs.existsSync(localModulePath) && this.getTypeScriptVersion(localModulePath)) { return localModulePath; } @@ -450,12 +415,12 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } private get globalTypescriptPath(): string { - if (this.globalTsdk) { + if (this.configuration.globalTsdk) { this._checkGlobalTSCVersion = false; - if ((path).isAbsolute(this.globalTsdk)) { - return path.join(this.globalTsdk, 'tsserver.js'); - } else if (workspace.rootPath) { - return path.join(workspace.rootPath, this.globalTsdk, 'tsserver.js'); + if ((path).isAbsolute(this.configuration.globalTsdk)) { + return path.join(this.configuration.globalTsdk, 'tsserver.js'); + } else if (this.mainWorkspaceRootPath) { + return path.join(this.mainWorkspaceRootPath, this.configuration.globalTsdk, 'tsserver.js'); } } @@ -463,7 +428,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } private hasWorkspaceTsdkSetting(): boolean { - return !!this.localTsdk; + return !!this.configuration.localTsdk; } private startService(resendModels: boolean = false): Thenable { @@ -471,23 +436,23 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient if (!this.workspaceState.get(TypeScriptServiceClient.tsdkMigratedStorageKey, false)) { this.workspaceState.update(TypeScriptServiceClient.tsdkMigratedStorageKey, true); - if (workspace.rootPath && this.hasWorkspaceTsdkSetting()) { + if (this.mainWorkspaceRootPath && this.hasWorkspaceTsdkSetting()) { modulePath = this.showVersionPicker(true); } } return modulePath.then(modulePath => { if (this.workspaceState.get(TypeScriptServiceClient.useWorkspaceTsdkStorageKey, false)) { - if (workspace.rootPath) { + if (this.mainWorkspaceRootPath) { // TODO: check if we need better error handling return this.localTypeScriptPath || modulePath; } } return modulePath; }).then(modulePath => { + return this.getDebugPort().then(debugPort => ({ modulePath, debugPort })); + }).then(({ modulePath, debugPort }) => { return this.servicePromise = new Promise((resolve, reject) => { - const tsConfig = workspace.getConfiguration('typescript'); - this.info(`Using tsserver from: ${modulePath}`); if (!fs.existsSync(modulePath)) { window.showWarningMessage(localize('noServerFound', 'The path {0} doesn\'t point to a valid tsserver install. Falling back to bundled TypeScript version.', modulePath ? path.dirname(modulePath) : '')); @@ -509,35 +474,28 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient const label = version || localize('versionNumber.custom', 'custom'); const tooltip = modulePath; this.modulePath = modulePath; - VersionStatus.showHideStatus(); - VersionStatus.setInfo(label, tooltip); - - // This is backwards compatibility code to move the setting from the local - // store into the workspace setting file. - const doGlobalVersionCheckKey: string = 'doGlobalVersionCheck'; - const globalStateValue = this.globalState.get(doGlobalVersionCheckKey, true); - const checkTscVersion = 'check.tscVersion'; - if (!globalStateValue) { - tsConfig.update(checkTscVersion, false, true); - this.globalState.update(doGlobalVersionCheckKey, true); - } + this.versionStatus.showHideStatus(); + this.versionStatus.setInfo(label, tooltip); + + + this.requestQueue = new RequestQueue(); + this.callbacks = new CallbackMap(); + this.lastError = null; try { - let options: electron.IForkOptions = { + const options: electron.IForkOptions = { execArgv: [] // [`--debug-brk=5859`] }; - if (workspace.rootPath) { - options.cwd = workspace.rootPath; + if (this.mainWorkspaceRootPath) { + options.cwd = this.mainWorkspaceRootPath; } - let value = process.env.TSS_DEBUG; - if (value) { - let port = parseInt(value); - if (!isNaN(port)) { - this.info(`TSServer started in debug mode using port ${port}`); - options.execArgv = [`--debug=${port}`]; - } + + if (debugPort && !isNaN(debugPort)) { + this.info(`TSServer started in debug mode using port ${debugPort}`); + options.execArgv = [`--debug=${debugPort}`]; } - let args: string[] = []; + + const args: string[] = []; if (this.apiVersion.has206Features()) { args.push('--useSingleInferredProject'); if (workspace.getConfiguration().get('typescript.disableAutomaticTypeAcquisition', false)) { @@ -548,12 +506,12 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient args.push('--enableTelemetry'); } if (this.apiVersion.has222Features()) { - this.cancellationPipeName = electron.getPipeName(`tscancellation-${electron.makeRandomHexString(20)}`); + this.cancellationPipeName = electron.getTempFile(`tscancellation-${electron.makeRandomHexString(20)}`); args.push('--cancellationPipeName', this.cancellationPipeName + '*'); } if (this.apiVersion.has222Features()) { - if (this.tsServerLogLevel !== TsServerLogLevel.Off) { + if (this.configuration.tsServerLogLevel !== TsServerLogLevel.Off) { try { const logDir = fs.mkdtempSync(path.join(os.tmpdir(), `vscode-tsserver-log-`)); this.tsServerLogFile = path.join(logDir, `tsserver.log`); @@ -563,23 +521,28 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } if (this.tsServerLogFile) { - args.push('--logVerbosity', TsServerLogLevel.toString(this.tsServerLogLevel)); + args.push('--logVerbosity', TsServerLogLevel.toString(this.configuration.tsServerLogLevel)); args.push('--logFile', this.tsServerLogFile); } } } if (this.apiVersion.has230Features()) { - const plugins = this.getContributedTypeScriptServerPlugins(); - if (plugins.length) { - args.push('--globalPlugins', plugins.map(x => x.name).join(',')); + if (this.plugins.length) { + args.push('--globalPlugins', this.plugins.map(x => x.name).join(',')); if (modulePath === this.globalTypescriptPath) { - args.push('--pluginProbeLocations', plugins.map(x => x.path).join(',')); + args.push('--pluginProbeLocations', this.plugins.map(x => x.path).join(',')); } } } - electron.fork(modulePath, args, options, (err: any, childProcess: cp.ChildProcess) => { + if (this.apiVersion.has234Features()) { + if (this.configuration.npmLocation) { + args.push('--npmLocation', `"${this.configuration.npmLocation}"`); + } + } + + electron.fork(modulePath, args, options, this.logger, (err: any, childProcess: cp.ChildProcess) => { if (err) { this.lastError = err; this.error('Starting TSServer failed with error.', err); @@ -594,20 +557,33 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient if (this.tsServerLogFile) { this.error(`TSServer log file: ${this.tsServerLogFile}`); } + this.logTelemetry('tsserver.error'); this.serviceExited(false); }); childProcess.on('exit', (code: any) => { - this.error(`TSServer exited with code: ${code === null || typeof code === 'undefined' ? 'unknown' : code}`); + if (code === null || typeof code === 'undefined') { + this.info(`TSServer exited`); + } else { + this.error(`TSServer exited with code: ${code}`); + this.logTelemetry('tsserver.exitWithCode', { code: code }); + } + if (this.tsServerLogFile) { - this.error(`TSServer log file: ${this.tsServerLogFile}`); + this.info(`TSServer log file: ${this.tsServerLogFile}`); } - this.serviceExited(true); - }); - this.reader = new Reader(childProcess.stdout, (msg) => { - this.dispatchMessage(msg); + this.serviceExited(!this.isRestarting); + this.isRestarting = false; }); + + this.reader = new Reader( + childProcess.stdout, + (msg) => { this.dispatchMessage(msg); }, + error => { this.error('ReaderError', error); }); + this._onReady.resolve(); resolve(childProcess); + this._onTsServerStarted.fire(); + this.serviceStarted(resendModels); }); } catch (error) { @@ -617,13 +593,37 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient }); } + private getDebugPort(): Promise { + const value = process.env.TSS_DEBUG; + if (value) { + const port = parseInt(value); + if (!isNaN(port)) { + return Promise.resolve(port); + } + } + + if (workspace.getConfiguration('typescript').get('tsserver.debug', false)) { + return Promise.race([ + new Promise((resolve) => setTimeout(() => resolve(undefined), 1000)), + new Promise((resolve) => { + const server = net.createServer(sock => sock.end()); + server.listen(0, function () { + resolve(server.address().port); + }); + }) + ]); + } + + return Promise.resolve(undefined); + } + public onVersionStatusClicked(): Thenable { return this.showVersionPicker(false); } private showVersionPicker(firstRun: boolean): Thenable { const modulePath = this.modulePath || this.globalTypescriptPath; - if (!workspace.rootPath || !modulePath) { + if (!this.mainWorkspaceRootPath || !modulePath) { return Promise.resolve(modulePath); } @@ -706,7 +706,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient .then(() => false); } - if (this.tsServerLogLevel === TsServerLogLevel.Off) { + if (this.configuration.tsServerLogLevel === TsServerLogLevel.Off) { return window.showErrorMessage( localize( 'typescript.openTsServerLog.loggingNotEnabled', @@ -733,21 +733,12 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient 'TS Server has not started logging.')).then(() => false); } - return workspace.openTextDocument(this.tsServerLogFile) - .then(doc => { - if (!doc) { - return false; - } - return window.showTextDocument(doc, window.activeTextEditor ? window.activeTextEditor.viewColumn : undefined) - .then(editor => !!editor); - }, () => false) - .then(didOpen => { - if (!didOpen) { - window.showWarningMessage(localize( - 'openTsServerLog.openFileFailedFailed', - 'Could not open TS Server log file')); - } - return didOpen; + return commands.executeCommand('_workbench.action.files.revealInOS', Uri.parse(this.tsServerLogFile)) + .then(() => true, () => { + window.showWarningMessage(localize( + 'openTsServerLog.openFileFailedFailed', + 'Could not open TS Server log file')); + return false; }); } @@ -755,13 +746,6 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient let configureOptions: Proto.ConfigureRequestArguments = { hostInfo: 'vscode' }; - if (this._experimentalAutoBuild && this.storagePath) { - try { - fs.mkdirSync(this.storagePath); - } catch (error) { - } - // configureOptions.autoDiagnostics = true; - } this.execute('configure', configureOptions); this.setCompilerOptionsForInferredProjects(); if (resendModels) { @@ -823,31 +807,13 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient return desc.version; } - private getContributedTypeScriptServerPlugins(): TypeScriptServerPlugin[] { - const plugins: TypeScriptServerPlugin[] = []; - for (const extension of extensions.all) { - const pack = extension.packageJSON; - if (pack.contributes && pack.contributes.typescriptServerPlugins && Array.isArray(pack.contributes.typescriptServerPlugins)) { - for (const plugin of pack.contributes.typescriptServerPlugins) { - plugins.push({ - name: plugin.name, - path: extension.extensionPath - }); - } - } - } - return plugins; - } - private serviceExited(restart: boolean): void { this.servicePromise = null; this.tsServerLogFile = null; - Object.keys(this.callbacks).forEach((key) => { - this.callbacks[parseInt(key)].e(new Error('Service died.')); - }); - this.callbacks = Object.create(null); - if (!this.exitRequested && restart) { - let diff = Date.now() - this.lastStart; + this.callbacks.destroy(new Error('Service died.')); + this.callbacks = new CallbackMap(); + if (restart) { + const diff = Date.now() - this.lastStart; this.numberRestarts++; let startService = true; if (this.numberRestarts > 5) { @@ -918,7 +884,36 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient return Uri.file(filepath); } - public execute(command: string, args: any, expectsResultOrToken?: boolean | CancellationToken, token?: CancellationToken): Promise { + private get mainWorkspaceRootPath(): string | undefined { + if (workspace.rootPath) { + return workspace.rootPath; + } + + if (workspace.workspaceFolders && workspace.workspaceFolders.length) { + return workspace.workspaceFolders[0].fsPath; + } + + return undefined; + } + + public getWorkspaceRootForResource(resource: Uri): string | undefined { + if (workspace.rootPath) { + return workspace.rootPath; + } + + if (workspace.workspaceFolders && workspace.workspaceFolders.length) { + if (resource.scheme === 'file') { + const found = workspace.workspaceFolders.find(root => resource.fsPath.startsWith(root.fsPath)); + return found ? found.fsPath : found; + } + return workspace.workspaceFolders[0].fsPath; + } + + return undefined; + } + + public execute(command: string, args: any, expectsResultOrToken?: boolean | CancellationToken): Promise { + let token: CancellationToken | undefined = undefined; let expectsResult = true; if (typeof expectsResultOrToken === 'boolean') { expectsResult = expectsResultOrToken; @@ -926,27 +921,28 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient token = expectsResultOrToken; } - let request: Proto.Request = { - seq: this.sequenceNumber++, - type: 'request', - command: command, - arguments: args - }; - let requestInfo: RequestItem = { + const request = this.requestQueue.createRequest(command, args); + const requestInfo: RequestItem = { request: request, promise: null, callbacks: null }; let result: Promise = Promise.resolve(null); if (expectsResult) { + let wasCancelled = false; result = new Promise((resolve, reject) => { requestInfo.callbacks = { c: resolve, e: reject, start: Date.now() }; if (token) { token.onCancellationRequested(() => { + wasCancelled = true; this.tryCancelRequest(request.seq); - resolve(undefined); }); } + }).catch((err: any) => { + if (!wasCancelled) { + this.error(`'${command}' request failed with error.`, err); + } + throw err; }); } requestInfo.promise = result; @@ -957,7 +953,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } private sendNextRequests(): void { - while (this.pendingResponses === 0 && this.requestQueue.length > 0) { + while (this.callbacks.pendingResponses === 0 && this.requestQueue.length > 0) { const item = this.requestQueue.shift(); if (item) { this.sendRequest(item); @@ -966,63 +962,57 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } private sendRequest(requestItem: RequestItem): void { - let serverRequest = requestItem.request; - this.traceRequest(serverRequest, !!requestItem.callbacks); + const serverRequest = requestItem.request; + this.tracer.traceRequest(serverRequest, !!requestItem.callbacks, this.requestQueue.length); if (requestItem.callbacks) { - this.callbacks[serverRequest.seq] = requestItem.callbacks; - this.pendingResponses++; + this.callbacks.add(serverRequest.seq, requestItem.callbacks); } this.service() .then((childProcess) => { childProcess.stdin.write(JSON.stringify(serverRequest) + '\r\n', 'utf8'); - }).then(undefined, err => { - let callback = this.callbacks[serverRequest.seq]; + }) + .then(undefined, err => { + const callback = this.callbacks.fetch(serverRequest.seq); if (callback) { callback.e(err); - delete this.callbacks[serverRequest.seq]; - this.pendingResponses--; } }); } private tryCancelRequest(seq: number): boolean { - for (let i = 0; i < this.requestQueue.length; i++) { - if (this.requestQueue[i].request.seq === seq) { - this.requestQueue.splice(i, 1); - if (this.trace !== Trace.Off) { - this.logTrace(`TypeScript Service: canceled request with sequence number ${seq}`); - } + try { + if (this.requestQueue.tryCancelPendingRequest(seq)) { + this.tracer.logTrace(`TypeScript Service: canceled request with sequence number ${seq}`); return true; } - } - if (this.apiVersion.has222Features() && this.cancellationPipeName) { - if (this.trace !== Trace.Off) { - this.logTrace(`TypeScript Service: trying to cancel ongoing request with sequence number ${seq}`); - } - try { - fs.writeFileSync(this.cancellationPipeName + seq, ''); + if (this.apiVersion.has222Features() && this.cancellationPipeName) { + this.tracer.logTrace(`TypeScript Service: trying to cancel ongoing request with sequence number ${seq}`); + try { + fs.writeFileSync(this.cancellationPipeName + seq, ''); + } catch (e) { + // noop + } return true; - } catch (e) { - // noop } - } - if (this.trace !== Trace.Off) { - this.logTrace(`TypeScript Service: tried to cancel request with sequence number ${seq}. But request got already delivered.`); + this.tracer.logTrace(`TypeScript Service: tried to cancel request with sequence number ${seq}. But request got already delivered.`); + return false; + } finally { + const p = this.callbacks.fetch(seq); + if (p) { + p.e(new Error(`Cancelled Request ${seq}`)); + } } - return false; } private dispatchMessage(message: Proto.Message): void { try { if (message.type === 'response') { - let response: Proto.Response = message; - let p = this.callbacks[response.request_seq]; + const response: Proto.Response = message as Proto.Response; + const p = this.callbacks.fetch(response.request_seq); if (p) { - this.traceResponse(response, p.start); - delete this.callbacks[response.request_seq]; - this.pendingResponses--; + this.tracer.traceResponse(response, p.start); if (response.success) { p.c(response); } else { @@ -1030,62 +1020,9 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } } } else if (message.type === 'event') { - let event: Proto.Event = message; - this.traceEvent(event); - if (event.event === 'syntaxDiag') { - this.host.syntaxDiagnosticsReceived(event as Proto.DiagnosticEvent); - } else if (event.event === 'semanticDiag') { - this.host.semanticDiagnosticsReceived(event as Proto.DiagnosticEvent); - } else if (event.event === 'configFileDiag') { - this.host.configFileDiagnosticsReceived(event as Proto.ConfigFileDiagnosticEvent); - } else if (event.event === 'telemetry') { - let telemetryData = (event as Proto.TelemetryEvent).body; - let properties: ObjectMap = Object.create(null); - switch (telemetryData.telemetryEventName) { - case 'typingsInstalled': - let typingsInstalledPayload: Proto.TypingsInstalledTelemetryEventPayload = (telemetryData.payload as Proto.TypingsInstalledTelemetryEventPayload); - properties['installedPackages'] = typingsInstalledPayload.installedPackages; - - if (is.defined(typingsInstalledPayload.installSuccess)) { - properties['installSuccess'] = typingsInstalledPayload.installSuccess.toString(); - } - if (is.string(typingsInstalledPayload.typingsInstallerVersion)) { - properties['typingsInstallerVersion'] = typingsInstalledPayload.typingsInstallerVersion; - } - break; - default: - let payload = telemetryData.payload; - if (payload) { - Object.keys(payload).forEach((key) => { - if (payload.hasOwnProperty(key) && is.string(payload[key])) { - properties[key] = payload[key]; - } - }); - } - break; - } - this.logTelemetry(telemetryData.telemetryEventName, properties); - } else if (event.event === 'projectLanguageServiceState') { - const data = (event as Proto.ProjectLanguageServiceStateEvent).body; - if (data) { - this._onProjectLanguageServiceStateChanged.fire(data); - } - } else if (event.event === 'beginInstallTypes') { - const data = (event as Proto.BeginInstallTypesEvent).body; - if (data) { - this._onDidBeginInstallTypings.fire(data); - } - } else if (event.event === 'endInstallTypes') { - const data = (event as Proto.EndInstallTypesEvent).body; - if (data) { - this._onDidEndInstallTypings.fire(data); - } - } else if (event.event === 'typesInstallerInitializationFailed') { - const data = (event as Proto.TypesInstallerInitializationFailedEvent).body; - if (data) { - this._onTypesInstallerInitializationFailed.fire(data); - } - } + const event: Proto.Event = message; + this.tracer.traceEvent(event); + this.dispatchEvent(event); } else { throw new Error('Unknown message type ' + message.type + ' recevied'); } @@ -1094,36 +1031,69 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } } - private traceRequest(request: Proto.Request, responseExpected: boolean): void { - if (this.trace === Trace.Off) { - return; - } - let data: string | undefined = undefined; - if (this.trace === Trace.Verbose && request.arguments) { - data = `Arguments: ${JSON.stringify(request.arguments, null, 4)}`; + private dispatchEvent(event: Proto.Event) { + if (event.event === 'syntaxDiag') { + this.host.syntaxDiagnosticsReceived(event as Proto.DiagnosticEvent); + } else if (event.event === 'semanticDiag') { + this.host.semanticDiagnosticsReceived(event as Proto.DiagnosticEvent); + } else if (event.event === 'configFileDiag') { + this.host.configFileDiagnosticsReceived(event as Proto.ConfigFileDiagnosticEvent); + } else if (event.event === 'telemetry') { + const telemetryData = (event as Proto.TelemetryEvent).body; + this.dispatchTelemetryEvent(telemetryData); + } else if (event.event === 'projectLanguageServiceState') { + const data = (event as Proto.ProjectLanguageServiceStateEvent).body; + if (data) { + this._onProjectLanguageServiceStateChanged.fire(data); + } + } else if (event.event === 'beginInstallTypes') { + const data = (event as Proto.BeginInstallTypesEvent).body; + if (data) { + this._onDidBeginInstallTypings.fire(data); + } + } else if (event.event === 'endInstallTypes') { + const data = (event as Proto.EndInstallTypesEvent).body; + if (data) { + this._onDidEndInstallTypings.fire(data); + } + } else if (event.event === 'typesInstallerInitializationFailed') { + const data = (event as Proto.TypesInstallerInitializationFailedEvent).body; + if (data) { + this._onTypesInstallerInitializationFailed.fire(data); + } } - this.logTrace(`Sending request: ${request.command} (${request.seq}). Response expected: ${responseExpected ? 'yes' : 'no'}. Current queue length: ${this.requestQueue.length}`, data); } - private traceResponse(response: Proto.Response, startTime: number): void { - if (this.trace === Trace.Off) { - return; - } - let data: string | undefined = undefined; - if (this.trace === Trace.Verbose && response.body) { - data = `Result: ${JSON.stringify(response.body, null, 4)}`; - } - this.logTrace(`Response received: ${response.command} (${response.request_seq}). Request took ${Date.now() - startTime} ms. Success: ${response.success} ${!response.success ? '. Message: ' + response.message : ''}`, data); - } + private dispatchTelemetryEvent(telemetryData: Proto.TelemetryEventBody): void { + const properties: ObjectMap = Object.create(null); + switch (telemetryData.telemetryEventName) { + case 'typingsInstalled': + const typingsInstalledPayload: Proto.TypingsInstalledTelemetryEventPayload = (telemetryData.payload as Proto.TypingsInstalledTelemetryEventPayload); + properties['installedPackages'] = typingsInstalledPayload.installedPackages; - private traceEvent(event: Proto.Event): void { - if (this.trace === Trace.Off) { - return; - } - let data: string | undefined = undefined; - if (this.trace === Trace.Verbose && event.body) { - data = `Data: ${JSON.stringify(event.body, null, 4)}`; + if (is.defined(typingsInstalledPayload.installSuccess)) { + properties['installSuccess'] = typingsInstalledPayload.installSuccess.toString(); + } + if (is.string(typingsInstalledPayload.typingsInstallerVersion)) { + properties['typingsInstallerVersion'] = typingsInstalledPayload.typingsInstallerVersion; + } + break; + + default: + const payload = telemetryData.payload; + if (payload) { + Object.keys(payload).forEach((key) => { + try { + if (payload.hasOwnProperty(key)) { + properties[key] = is.string(payload[key]) ? payload[key] : JSON.stringify(payload[key]); + } + } catch (e) { + // noop + } + }); + } + break; } - this.logTrace(`Event received: ${event.event} (${event.seq}).`, data); + this.logTelemetry(telemetryData.telemetryEventName, properties); } } \ No newline at end of file diff --git a/extensions/typescript/src/typings/ref.d.ts b/extensions/typescript/src/typings/ref.d.ts index bc057c5587839..954bab971e334 100644 --- a/extensions/typescript/src/typings/ref.d.ts +++ b/extensions/typescript/src/typings/ref.d.ts @@ -4,4 +4,5 @@ *--------------------------------------------------------------------------------------------*/ /// +/// /// diff --git a/extensions/typescript/src/utils/async.ts b/extensions/typescript/src/utils/async.ts index fb260bde50b4f..f87754e69e89a 100644 --- a/extensions/typescript/src/utils/async.ts +++ b/extensions/typescript/src/utils/async.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - export interface ITask { (): T; } diff --git a/extensions/typescript/src/utils/buildStatus.ts b/extensions/typescript/src/utils/buildStatus.ts deleted file mode 100644 index cf640508af34c..0000000000000 --- a/extensions/typescript/src/utils/buildStatus.ts +++ /dev/null @@ -1,23 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import vscode = require('vscode'); - -const statusItem: vscode.StatusBarItem = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left, Number.MIN_VALUE); - -export interface BuildInfo { - queueLength: number; -} - -export function update(info: BuildInfo): void { - if (info.queueLength === 0) { - statusItem.hide(); - return; - } - statusItem.text = info.queueLength.toString(); - statusItem.show(); -} \ No newline at end of file diff --git a/extensions/typescript/src/utils/electron.ts b/extensions/typescript/src/utils/electron.ts index 799628d28014c..46ad56c464abb 100644 --- a/extensions/typescript/src/utils/electron.ts +++ b/extensions/typescript/src/utils/electron.ts @@ -3,17 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import path = require('path'); import os = require('os'); import net = require('net'); import cp = require('child_process'); +import Logger from './logger'; export interface IForkOptions { cwd?: string; - env?: any; - encoding?: string; execArgv?: string[]; } @@ -30,8 +27,7 @@ export function makeRandomHexString(length: number): string { function generatePipeName(): string { return getPipeName(makeRandomHexString(40)); } - -export function getPipeName(name: string): string { +function getPipeName(name: string): string { const fullName = 'vscode-' + name; if (process.platform === 'win32') { return '\\\\.\\pipe\\' + fullName + '-sock'; @@ -41,6 +37,11 @@ export function getPipeName(name: string): string { return path.join(os.tmpdir(), fullName + '.sock'); } +export function getTempFile(name: string): string { + const fullName = 'vscode-' + name; + return path.join(os.tmpdir(), fullName + '.sock'); +} + function generatePatchedEnv(env: any, stdInPipeName: string, stdOutPipeName: string, stdErrPipeName: string): any { // Set the two unique pipe names and the electron flag as process env @@ -58,17 +59,23 @@ function generatePatchedEnv(env: any, stdInPipeName: string, stdOutPipeName: str return newEnv; } -export function fork(modulePath: string, args: string[], options: IForkOptions, callback: (error: any, cp: cp.ChildProcess | null) => void): void { +export function fork( + modulePath: string, + args: string[], + options: IForkOptions, + logger: Logger, + callback: (error: any, cp: cp.ChildProcess | null) => void, +): void { var callbackCalled = false; - var resolve = (result: cp.ChildProcess) => { + const resolve = (result: cp.ChildProcess) => { if (callbackCalled) { return; } callbackCalled = true; callback(null, result); }; - var reject = (err: any) => { + const reject = (err: any) => { if (callbackCalled) { return; } @@ -77,13 +84,12 @@ export function fork(modulePath: string, args: string[], options: IForkOptions, }; // Generate three unique pipe names - var stdInPipeName = generatePipeName(); - var stdOutPipeName = generatePipeName(); - let stdErrPipeName = generatePipeName(); + const stdInPipeName = generatePipeName(); + const stdOutPipeName = generatePipeName(); + const stdErrPipeName = generatePipeName(); - var newEnv = generatePatchedEnv(options.env || process.env, stdInPipeName, stdOutPipeName, stdErrPipeName); - + const newEnv = generatePatchedEnv(process.env, stdInPipeName, stdOutPipeName, stdErrPipeName); var childProcess: cp.ChildProcess; // Begin listening to stderr pipe @@ -110,7 +116,7 @@ export function fork(modulePath: string, args: string[], options: IForkOptions, stdOutServer.listen(stdOutPipeName); var serverClosed = false; - var closeServer = () => { + const closeServer = () => { if (serverClosed) { return; } @@ -120,7 +126,9 @@ export function fork(modulePath: string, args: string[], options: IForkOptions, }; // Create the process - let bootstrapperPath = path.join(__dirname, 'electronForkStart'); + logger.info('Forking TSServer', `PATH: ${newEnv['PATH']}`); + + const bootstrapperPath = path.join(__dirname, 'electronForkStart'); childProcess = cp.fork(bootstrapperPath, [modulePath].concat(args), { silent: true, cwd: options.cwd, diff --git a/extensions/typescript/src/utils/is.ts b/extensions/typescript/src/utils/is.ts index 78ef8c734cdcc..fc6fd6ad2861b 100644 --- a/extensions/typescript/src/utils/is.ts +++ b/extensions/typescript/src/utils/is.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - const toString = Object.prototype.toString; export function defined(value: any): boolean { diff --git a/extensions/typescript/src/utils/logger.ts b/extensions/typescript/src/utils/logger.ts new file mode 100644 index 0000000000000..8e31d66d8581a --- /dev/null +++ b/extensions/typescript/src/utils/logger.ts @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { OutputChannel, window } from 'vscode'; +import * as is from './is'; + +import * as nls from 'vscode-nls'; +const localize = nls.loadMessageBundle(); + +export default class Logger { + private _output: OutputChannel; + + private get output(): OutputChannel { + if (!this._output) { + this._output = window.createOutputChannel(localize('channelName', 'TypeScript')); + } + return this._output; + } + + private data2String(data: any): string { + if (data instanceof Error) { + if (is.string(data.stack)) { + return data.stack; + } + return (data as Error).message; + } + if (is.boolean(data.success) && !data.success && is.string(data.message)) { + return data.message; + } + if (is.string(data)) { + return data; + } + return data.toString(); + } + + public info(message: string, data?: any): void { + this.logLevel('Info', message, data); + } + + public warn(message: string, data?: any): void { + this.logLevel('Warn', message, data); + } + + public error(message: string, data?: any): void { + // See https://github.com/Microsoft/TypeScript/issues/10496 + if (data && data.message === 'No content available.') { + return; + } + this.logLevel('Error', message, data); + } + + public logLevel(level: string, message: string, data?: any): void { + this.output.appendLine(`[${level} - ${(new Date().toLocaleTimeString())}] ${message}`); + if (data) { + this.output.appendLine(this.data2String(data)); + } + } +} \ No newline at end of file diff --git a/extensions/typescript/src/utils/plugins.ts b/extensions/typescript/src/utils/plugins.ts new file mode 100644 index 0000000000000..23342cc8b3183 --- /dev/null +++ b/extensions/typescript/src/utils/plugins.ts @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { extensions } from 'vscode'; + + +export interface TypeScriptServerPlugin { + path: string; + name: string; + languages: string[]; +} + +export function getContributedTypeScriptServerPlugins(): TypeScriptServerPlugin[] { + const plugins: TypeScriptServerPlugin[] = []; + for (const extension of extensions.all) { + const pack = extension.packageJSON; + if (pack.contributes && pack.contributes.typescriptServerPlugins && Array.isArray(pack.contributes.typescriptServerPlugins)) { + for (const plugin of pack.contributes.typescriptServerPlugins) { + plugins.push({ + name: plugin.name, + path: extension.extensionPath, + languages: Array.isArray(plugin.languages) ? plugin.languages : [] + }); + } + } + } + return plugins; +} diff --git a/extensions/typescript/src/utils/projectStatus.ts b/extensions/typescript/src/utils/projectStatus.ts index f6042d2944913..278d7155b25b3 100644 --- a/extensions/typescript/src/utils/projectStatus.ts +++ b/extensions/typescript/src/utils/projectStatus.ts @@ -3,23 +3,18 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import * as vscode from 'vscode'; import { ITypescriptServiceClient } from '../typescriptService'; import { loadMessageBundle } from 'vscode-nls'; -import { dirname, join } from 'path'; +import { dirname } from 'path'; +import { openOrCreateConfigFile, isImplicitProjectConfigFile } from './tsconfig'; const localize = loadMessageBundle(); const selector = ['javascript', 'javascriptreact']; -interface Option extends vscode.MessageItem { - execute(): void; -} interface Hint { message: string; - options: Option[]; } interface ProjectHintedMap { @@ -47,29 +42,11 @@ class ExcludeHintItem { this._item.hide(); } - public show(configFileName: string, largeRoots: string, onExecute: () => void) { + public show(largeRoots?: string) { this._currentHint = { - message: largeRoots.length > 0 + message: largeRoots ? localize('hintExclude', "To enable project-wide JavaScript/TypeScript language features, exclude folders with many files, like: {0}", largeRoots) - : localize('hintExclude.generic', "To enable project-wide JavaScript/TypeScript language features, exclude large folders with source files that you do not work on."), - options: [{ - title: localize('open', "Configure Excludes"), - execute: () => { - this._client.logTelemetry('js.hintProjectExcludes.accepted'); - onExecute(); - this._item.hide(); - - let configFileUri: vscode.Uri; - if (vscode.workspace.rootPath && dirname(configFileName).indexOf(vscode.workspace.rootPath) === 0) { - configFileUri = vscode.Uri.file(configFileName); - } else { - configFileUri = vscode.Uri.parse('untitled://' + join(vscode.workspace.rootPath || '', 'jsconfig.json')); - } - - return vscode.workspace.openTextDocument(configFileName) - .then(vscode.window.showTextDocument); - } - }] + : localize('hintExclude.generic', "To enable project-wide JavaScript/TypeScript language features, exclude large folders with source files that you do not work on.") }; this._item.tooltip = this._currentHint.message; this._item.text = localize('large.label', "Configure Excludes"); @@ -122,9 +99,8 @@ function createLargeProjectMonitorForProject(item: ExcludeHintItem, client: ITyp if (fileNames.length > fileLimit || res.body.languageServiceDisabled) { let largeRoots = computeLargeRoots(configFileName, fileNames).map(f => `'/${f}/'`).join(', '); - item.show(configFileName, largeRoots, () => { - projectHinted[configFileName] = true; - }); + item.show(largeRoots); + projectHinted[configFileName] = true; } else { item.hide(); } @@ -145,11 +121,39 @@ function createLargeProjectMonitorForProject(item: ExcludeHintItem, client: ITyp } function createLargeProjectMonitorFromTypeScript(item: ExcludeHintItem, client: ITypescriptServiceClient): vscode.Disposable { + + interface LargeProjectMessageItem extends vscode.MessageItem { + index: number; + } + return client.onProjectLanguageServiceStateChanged(body => { if (body.languageServiceEnabled) { item.hide(); } else { - item.show(body.projectName, '', () => { }); + item.show(); + const configFileName = body.projectName; + if (configFileName) { + vscode.window.showWarningMessage(item.getCurrentHint().message, + { + title: localize('large.label', "Configure Excludes"), + index: 0 + }).then(selected => { + if (!selected || selected.index !== 0) { + return; + } + if (!isImplicitProjectConfigFile(configFileName)) { + vscode.workspace.openTextDocument(configFileName) + .then(vscode.window.showTextDocument); + } else { + const root = client.getWorkspaceRootForResource(vscode.Uri.file(configFileName)); + if (root) { + openOrCreateConfigFile( + configFileName.match(/tsconfig\.?.*\.json/) !== null, + root); + } + } + }); + } } }); } @@ -159,12 +163,8 @@ export function create(client: ITypescriptServiceClient, isOpen: (path: string) let item = new ExcludeHintItem(client); toDispose.push(vscode.commands.registerCommand('js.projectStatus.command', () => { - let { message, options } = item.getCurrentHint(); - return vscode.window.showInformationMessage(message, ...options).then(selection => { - if (selection) { - return selection.execute(); - } - }); + let { message } = item.getCurrentHint(); + return vscode.window.showInformationMessage(message); })); if (client.apiVersion.has213Features()) { diff --git a/extensions/typescript/src/utils/telemetry.ts b/extensions/typescript/src/utils/telemetry.ts new file mode 100644 index 0000000000000..b687b11b4ac60 --- /dev/null +++ b/extensions/typescript/src/utils/telemetry.ts @@ -0,0 +1,74 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as path from 'path'; +import VsCodeTelemetryReporter from 'vscode-extension-telemetry'; +import { Disposable } from 'vscode'; + + +interface IPackageInfo { + name: string; + version: string; + aiKey: string; +} + + +export default class TelemetryReporter extends Disposable { + private _packageInfo: IPackageInfo | null; + + private _reporter: VsCodeTelemetryReporter | null; + + constructor() { + super(() => this.dispose()); + } + + dispose() { + if (this._reporter) { + this._reporter.dispose(); + this._reporter = null; + } + } + + public logTelemetry(eventName: string, properties?: { [prop: string]: string }) { + if (this.reporter) { + this.reporter.sendTelemetryEvent(eventName, properties); + } + } + + private get reporter(): VsCodeTelemetryReporter | null { + if (typeof this._reporter !== 'undefined') { + return this._reporter; + } + + if (this.packageInfo && this.packageInfo.aiKey) { + this._reporter = new VsCodeTelemetryReporter( + this.packageInfo.name, + this.packageInfo.version, + this.packageInfo.aiKey); + } else { + this._reporter = null; + } + return this._reporter; + } + + private get packageInfo(): IPackageInfo | null { + if (this._packageInfo !== undefined) { + return this._packageInfo; + } + let packagePath = path.join(__dirname, '..', '..', 'package.json'); + let extensionPackage = require(packagePath); + if (extensionPackage) { + this._packageInfo = { + name: extensionPackage.name, + version: extensionPackage.version, + aiKey: extensionPackage.aiKey + }; + } else { + this._packageInfo = null; + } + + return this._packageInfo; + } +} \ No newline at end of file diff --git a/extensions/typescript/src/utils/tracer.ts b/extensions/typescript/src/utils/tracer.ts new file mode 100644 index 0000000000000..fe16a13d61a86 --- /dev/null +++ b/extensions/typescript/src/utils/tracer.ts @@ -0,0 +1,93 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { workspace } from 'vscode'; + +import * as Proto from '../protocol'; +import Logger from './logger'; + + +enum Trace { + Off, + Messages, + Verbose +} + +namespace Trace { + export function fromString(value: string): Trace { + value = value.toLowerCase(); + switch (value) { + case 'off': + return Trace.Off; + case 'messages': + return Trace.Messages; + case 'verbose': + return Trace.Verbose; + default: + return Trace.Off; + } + } +} + +export default class Tracer { + private trace: Trace; + + constructor( + private readonly logger: Logger + ) { + this.updateConfiguration(); + } + + public updateConfiguration() { + this.trace = Tracer.readTrace(); + } + + private static readTrace(): Trace { + let result: Trace = Trace.fromString(workspace.getConfiguration().get('typescript.tsserver.trace', 'off')); + if (result === Trace.Off && !!process.env.TSS_TRACE) { + result = Trace.Messages; + } + return result; + } + + public traceRequest(request: Proto.Request, responseExpected: boolean, queueLength: number): void { + if (this.trace === Trace.Off) { + return; + } + let data: string | undefined = undefined; + if (this.trace === Trace.Verbose && request.arguments) { + data = `Arguments: ${JSON.stringify(request.arguments, null, 4)}`; + } + this.logTrace(`Sending request: ${request.command} (${request.seq}). Response expected: ${responseExpected ? 'yes' : 'no'}. Current queue length: ${queueLength}`, data); + } + + public traceResponse(response: Proto.Response, startTime: number): void { + if (this.trace === Trace.Off) { + return; + } + let data: string | undefined = undefined; + if (this.trace === Trace.Verbose && response.body) { + data = `Result: ${JSON.stringify(response.body, null, 4)}`; + } + this.logTrace(`Response received: ${response.command} (${response.request_seq}). Request took ${Date.now() - startTime} ms. Success: ${response.success} ${!response.success ? '. Message: ' + response.message : ''}`, data); + } + + public traceEvent(event: Proto.Event): void { + if (this.trace === Trace.Off) { + return; + } + let data: string | undefined = undefined; + if (this.trace === Trace.Verbose && event.body) { + data = `Data: ${JSON.stringify(event.body, null, 4)}`; + } + this.logTrace(`Event received: ${event.event} (${event.seq}).`, data); + } + + public logTrace(message: string, data?: any): void { + if (this.trace !== Trace.Off) { + this.logger.logLevel('Trace', message, data); + } + } +} \ No newline at end of file diff --git a/extensions/typescript/src/utils/tsconfig.ts b/extensions/typescript/src/utils/tsconfig.ts new file mode 100644 index 0000000000000..2cdd311ace4bd --- /dev/null +++ b/extensions/typescript/src/utils/tsconfig.ts @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import * as path from 'path'; + +export function isImplicitProjectConfigFile(configFileName: string) { + return configFileName.indexOf('/dev/null/') === 0; +} + +export function openOrCreateConfigFile( + isTypeScriptProject: boolean, + rootPath: string +): Thenable { + const configFile = vscode.Uri.file(path.join(rootPath, isTypeScriptProject ? 'tsconfig.json' : 'jsconfig.json')); + const col = vscode.window.activeTextEditor ? vscode.window.activeTextEditor.viewColumn : undefined; + return vscode.workspace.openTextDocument(configFile) + .then(doc => { + return vscode.window.showTextDocument(doc, col); + }, _ => { + return vscode.workspace.openTextDocument(configFile.with({ scheme: 'untitled' })) + .then(doc => vscode.window.showTextDocument(doc, col)) + .then(editor => { + if (editor.document.getText().length === 0) { + return editor.insertSnippet(new vscode.SnippetString('{\n\t$0\n}')) + .then(_ => editor); + } + return editor; + }); + }); +} \ No newline at end of file diff --git a/extensions/typescript/src/utils/tsconfigProvider.ts b/extensions/typescript/src/utils/tsconfigProvider.ts new file mode 100644 index 0000000000000..4c9db2c033a5d --- /dev/null +++ b/extensions/typescript/src/utils/tsconfigProvider.ts @@ -0,0 +1,58 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import * as vscode from 'vscode'; + +export default class TsConfigProvider extends vscode.Disposable { + private readonly tsconfigs = new Set(); + + private activated: boolean = false; + private disposables: vscode.Disposable[] = []; + + constructor() { + super(() => this.dispose()); + } + + dispose(): void { + this.disposables.forEach(d => d.dispose()); + } + + public async getConfigsForWorkspace(): Promise> { + if (!vscode.workspace.rootPath && !vscode.workspace.workspaceFolders) { + return []; + } + await this.ensureActivated(); + return this.tsconfigs; + } + + private async ensureActivated() { + if (this.activated) { + return this; + } + this.activated = true; + + for (const config of await TsConfigProvider.loadWorkspaceTsconfigs()) { + this.tsconfigs.add(config.fsPath); + } + + const configFileWatcher = vscode.workspace.createFileSystemWatcher('**/tsconfig*.json'); + this.disposables.push(configFileWatcher); + configFileWatcher.onDidCreate(this.handleProjectCreate, this, this.disposables); + configFileWatcher.onDidDelete(this.handleProjectDelete, this, this.disposables); + + return this; + } + + private static loadWorkspaceTsconfigs() { + return vscode.workspace.findFiles('**/tsconfig*.json', '**/node_modules/**'); + } + + private handleProjectCreate(e: vscode.Uri) { + this.tsconfigs.add(e.fsPath); + } + + private handleProjectDelete(e: vscode.Uri) { + this.tsconfigs.delete(e.fsPath); + } +} diff --git a/extensions/typescript/src/utils/typingsStatus.ts b/extensions/typescript/src/utils/typingsStatus.ts index 4798046abf622..33c4a85c7d663 100644 --- a/extensions/typescript/src/utils/typingsStatus.ts +++ b/extensions/typescript/src/utils/typingsStatus.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { MessageItem, workspace, Disposable, ProgressLocation, window, commands, Uri } from 'vscode'; import { ITypescriptServiceClient } from '../typescriptService'; import { loadMessageBundle } from 'vscode-nls'; @@ -108,7 +106,7 @@ export class AtaProgressReporter { window.showWarningMessage( localize( 'typesInstallerInitializationFailed.title', - "Could not install typings files for JavaScript language features. Please ensure that NPM is installed and is in your PATH" + "Could not install typings files for JavaScript language features. Please ensure that NPM is installed or configure 'typescript.npm' in your user settings" ), { title: localize('typesInstallerInitializationFailed.moreInformation', "More Information"), id: 1 diff --git a/extensions/typescript/src/utils/versionStatus.ts b/extensions/typescript/src/utils/versionStatus.ts index 358d3a9b10301..21f3a1c34f18f 100644 --- a/extensions/typescript/src/utils/versionStatus.ts +++ b/extensions/typescript/src/utils/versionStatus.ts @@ -3,44 +3,53 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; +import * as vscode from 'vscode'; -import vscode = require('vscode'); -const versionBarEntry = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right, Number.MIN_VALUE); +export default class VersionStatus extends vscode.Disposable { + onChangeEditorSub: any; + private versionBarEntry: vscode.StatusBarItem; -export function showHideStatus() { - if (!versionBarEntry) { - return; - } - if (!vscode.window.activeTextEditor) { - versionBarEntry.hide(); - return; - } + constructor() { + super(() => this.dispose()); - let doc = vscode.window.activeTextEditor.document; - if (vscode.languages.match('typescript', doc) || vscode.languages.match('typescriptreact', doc)) { - versionBarEntry.show(); - return; - } + this.versionBarEntry = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right, Number.MIN_VALUE); - if (!vscode.window.activeTextEditor.viewColumn) { - // viewColumn is undefined for the debug/output panel, but we still want - // to show the version info - return; + this.onChangeEditorSub = vscode.window.onDidChangeActiveTextEditor(this.showHideStatus, this); } - versionBarEntry.hide(); -} + dispose() { + this.versionBarEntry.dispose(); + this.onChangeEditorSub.dispose(); + } -export function disposeStatus() { - if (versionBarEntry) { - versionBarEntry.dispose(); + showHideStatus() { + if (!this.versionBarEntry) { + return; + } + if (!vscode.window.activeTextEditor) { + this.versionBarEntry.hide(); + return; + } + + let doc = vscode.window.activeTextEditor.document; + if (vscode.languages.match('typescript', doc) || vscode.languages.match('typescriptreact', doc)) { + this.versionBarEntry.show(); + return; + } + + if (!vscode.window.activeTextEditor.viewColumn) { + // viewColumn is undefined for the debug/output panel, but we still want + // to show the version info + return; + } + + this.versionBarEntry.hide(); } -} -export function setInfo(message: string, tooltip: string) { - versionBarEntry.text = message; - versionBarEntry.tooltip = tooltip; - versionBarEntry.command = 'typescript.selectTypeScriptVersion'; + public setInfo(message: string, tooltip: string) { + this.versionBarEntry.text = message; + this.versionBarEntry.tooltip = tooltip; + this.versionBarEntry.command = 'typescript.selectTypeScriptVersion'; + } } diff --git a/extensions/typescript/src/utils/wireProtocol.ts b/extensions/typescript/src/utils/wireProtocol.ts index 0227b3be7e6b1..799ec78da5239 100644 --- a/extensions/typescript/src/utils/wireProtocol.ts +++ b/extensions/typescript/src/utils/wireProtocol.ts @@ -3,16 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; +import * as stream from 'stream'; -import stream = require('stream'); - -let DefaultSize: number = 8192; -let ContentLength: string = 'Content-Length: '; -let ContentLengthSize: number = Buffer.byteLength(ContentLength, 'utf8'); -let Blank: number = new Buffer(' ', 'utf8')[0]; -let BackslashR: number = new Buffer('\r', 'utf8')[0]; -let BackslashN: number = new Buffer('\n', 'utf8')[0]; +const DefaultSize: number = 8192; +const ContentLength: string = 'Content-Length: '; +const ContentLengthSize: number = Buffer.byteLength(ContentLength, 'utf8'); +const Blank: number = new Buffer(' ', 'utf8')[0]; +const BackslashR: number = new Buffer('\r', 'utf8')[0]; +const BackslashN: number = new Buffer('\n', 'utf8')[0]; class ProtocolBuffer { @@ -83,36 +81,6 @@ class ProtocolBuffer { this.index = this.index - sourceStart; return result; } - - public tryReadLine(): string | null { - let end: number = 0; - while (end < this.index && this.buffer[end] !== BackslashR && this.buffer[end] !== BackslashN) { - end++; - } - if (end >= this.index) { - return null; - } - let result = this.buffer.toString('utf8', 0, end); - while (end < this.index && (this.buffer[end] === BackslashR || this.buffer[end] === BackslashN)) { - end++; - } - if (this.index === end) { - this.index = 0; - } else { - this.buffer.copy(this.buffer, 0, end); - this.index = this.index - end; - } - return result; - } - - public get numberOfBytes(): number { - return this.index; - } -} - -export enum ReaderType { - Length = 0, - Line = 1 } export interface ICallback { @@ -121,75 +89,45 @@ export interface ICallback { export class Reader { - private readable: stream.Readable; - private callback: ICallback; - private buffer: ProtocolBuffer; + private readonly readable: stream.Readable; + private readonly callback: ICallback; + private readonly buffer: ProtocolBuffer; private nextMessageLength: number; - public constructor(readable: stream.Readable, callback: ICallback, type: ReaderType = ReaderType.Length) { + public constructor( + readable: stream.Readable, + callback: ICallback, + private readonly onError: (error: any) => void = () => ({}) + ) { this.readable = readable; this.buffer = new ProtocolBuffer(); this.callback = callback; this.nextMessageLength = -1; - if (type === ReaderType.Length) { - this.readable.on('data', (data: Buffer) => { - this.onLengthData(data); - }); - } else if (type === ReaderType.Line) { - this.readable.on('data', (data: Buffer) => { - this.onLineData(data); - }); - } + this.readable.on('data', (data: Buffer) => { + this.onLengthData(data); + }); } private onLengthData(data: Buffer): void { - this.buffer.append(data); - while (true) { - if (this.nextMessageLength === -1) { - this.nextMessageLength = this.buffer.tryReadContentLength(); + try { + this.buffer.append(data); + while (true) { if (this.nextMessageLength === -1) { + this.nextMessageLength = this.buffer.tryReadContentLength(); + if (this.nextMessageLength === -1) { + return; + } + } + const msg = this.buffer.tryReadContent(this.nextMessageLength); + if (msg === null) { return; } + this.nextMessageLength = -1; + const json = JSON.parse(msg); + this.callback(json); } - let msg = this.buffer.tryReadContent(this.nextMessageLength); - if (msg === null) { - return; - } - this.nextMessageLength = -1; - let json = JSON.parse(msg); - this.callback(json); - } - } - - private onLineData(data: Buffer): void { - this.buffer.append(data); - while (true) { - let msg = this.buffer.tryReadLine(); - if (msg === null) { - return; - } - this.callback(JSON.parse(msg)); + } catch (e) { + this.onError(e); } } } - -export class Writer { - - private writable: stream.Writable; - - public constructor(writable: stream.Writable) { - this.writable = writable; - } - - public write(msg: T): void { - let json = JSON.stringify(msg); - let buffer: string[] = [ - ContentLength, - Buffer.byteLength(json, 'utf8').toString(), - '\r\n\r\n', - json, - '\r\n' - ]; - this.writable.write(buffer.join(''), 'utf8'); - } -} \ No newline at end of file diff --git a/extensions/typescript/syntaxes/TypeScript.tmLanguage.json b/extensions/typescript/syntaxes/TypeScript.tmLanguage.json index b80d24f1c23b0..6e16d697d52f3 100644 --- a/extensions/typescript/syntaxes/TypeScript.tmLanguage.json +++ b/extensions/typescript/syntaxes/TypeScript.tmLanguage.json @@ -1,4 +1,10 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/Microsoft/TypeScript-TmLanguage/blob/master/TypeScript.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/Microsoft/TypeScript-TmLanguage/commit/9be58bc51f179fd4119dbd5caaa7693a381a13b5", "name": "TypeScript", "scopeName": "source.ts", "fileTypes": [ @@ -71,7 +77,7 @@ "name": "storage.type.ts" } }, - "end": "(?=$|;|}|(\\s+(of|in)\\s+))", + "end": "(?=$|^|;|}|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#destructuring-variable" @@ -100,7 +106,7 @@ "name": "meta.definition.variable.ts entity.name.function.ts" } }, - "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" @@ -115,7 +121,7 @@ "name": "meta.definition.variable.ts variable.other.constant.ts" } }, - "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" @@ -130,7 +136,7 @@ "name": "meta.definition.variable.ts variable.other.readwrite.ts" } }, - "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" @@ -157,7 +163,7 @@ { "name": "meta.object-binding-pattern-variable.ts", "begin": "(?)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n )) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n ))\n)", + "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n )) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n ))\n)", "captures": { "1": { "name": "storage.modifier.ts" @@ -1515,15 +1564,18 @@ "name": "keyword.operator.rest.ts" }, "3": { - "name": "entity.name.function.ts" + "name": "entity.name.function.ts variable.language.this.ts" }, "4": { + "name": "entity.name.function.ts" + }, + "5": { "name": "keyword.operator.optional.ts" } } }, { - "match": "(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)", "patterns": [ { - "include": "#comment" + "name": "meta.type.annotation.ts", + "begin": "(:)(?=\\s*\\S)", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.annotation.ts" + } + }, + "end": "(?])|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))", + "patterns": [ + { + "include": "#type" + } + ] }, { - "include": "#type" + "name": "meta.type.annotation.ts", + "begin": "(:)", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.annotation.ts" + } + }, + "end": "(?])|(?=^\\s*$)|((?<=\\S)(?=\\s*$))|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))", + "patterns": [ + { + "include": "#type" + } + ] } ] }, @@ -1934,14 +2031,40 @@ ] }, "type-function-return-type": { - "name": "meta.type.function.return.ts", - "begin": "=>", - "beginCaptures": { - "0": { - "name": "storage.type.function.arrow.ts" + "patterns": [ + { + "name": "meta.type.function.return.ts", + "begin": "(=>)(?=\\s*\\S)", + "beginCaptures": { + "1": { + "name": "storage.type.function.arrow.ts" + } + }, + "end": "(?)(?]|//|$)", + "patterns": [ + { + "include": "#type-function-return-type-core" + } + ] + }, + { + "name": "meta.type.function.return.ts", + "begin": "=>", + "beginCaptures": { + "0": { + "name": "storage.type.function.arrow.ts" + } + }, + "end": "(?)(?]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))", + "patterns": [ + { + "include": "#type-function-return-type-core" + } + ] } - }, - "end": "(?)(?]|//|$)", + ] + }, + "type-function-return-type-core": { "patterns": [ { "include": "#comment" @@ -2013,7 +2136,7 @@ "name": "punctuation.definition.typeparameters.begin.ts" } }, - "end": "(?=$)|(>)", + "end": "(>)", "endCaptures": { "1": { "name": "punctuation.definition.typeparameters.end.ts" @@ -2048,7 +2171,7 @@ "name": "keyword.operator.assignment.ts" } }, - "end": "(?=$|[,);}\\]])", + "end": "(?=$|^|[,);}\\]])", "patterns": [ { "include": "#expression" @@ -2062,7 +2185,7 @@ "name": "keyword.operator.assignment.ts" } }, - "end": "(?=[,);}\\]])|(?=^\\s*$)", + "end": "(?=[,);}\\]])|(?=^\\s*$)|(?<=\\S)(?*]))\\s*(<)(?!*?]))\\s*(<)(?!", + "end": "(\\>)\\s*", "endCaptures": { - "0": { + "1": { "name": "meta.brace.angle.ts" } }, @@ -2513,9 +2640,9 @@ "name": "meta.brace.angle.ts" } }, - "end": "\\>", + "end": "(\\>)\\s*", "endCaptures": { - "0": { + "1": { "name": "meta.brace.angle.ts" } }, @@ -2558,12 +2685,12 @@ }, { "name": "meta.object.member.ts", - "begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*:)", + "begin": "(?=(?:(?:\\'.*\\')|(?:\\\".*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*:)", "end": "(?=,|\\})", "patterns": [ { "name": "meta.object-literal.key.ts", - "begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*:)", + "begin": "(?=(?:(?:\\'.*\\')|(?:\\\".*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*:)", "end": ":", "endCaptures": { "0": { @@ -2724,7 +2851,7 @@ "name": "keyword.control.as.ts" } }, - "end": "(?=$|[;,:})\\]])", + "end": "(?=$|^|[;,:})\\]])", "patterns": [ { "include": "#type" @@ -2809,7 +2936,7 @@ }, { "name": "meta.arrow.ts", - "begin": "(?x) (?:\n (? is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n ) |\n (\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends \n ) |\n # arrow function possible to detect only with => on same line\n (\n (<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(([^()]|\\([^()]*\\))*\\) # parameteres\n (\\s*:\\s*(.)*)? # return type\n \\s*=> # arrow operator\n )\n )\n)", + "begin": "(?x) (?:\n (? is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n ) |\n (\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends \n ) |\n # arrow function possible to detect only with => on same line\n (\n (<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(([^()]|\\([^()]*\\))*\\) # parameteres\n (\\s*:\\s*(.)*)? # return type\n \\s*=> # arrow operator\n )\n )\n)", "beginCaptures": { "1": { "name": "storage.modifier.async.ts" @@ -2839,7 +2966,7 @@ "name": "storage.type.function.arrow.ts" } }, - "end": "(?<=\\})|((?!\\{)(?=\\S))", + "end": "(?<=\\}|\\S)(?)|((?!\\{)(?=\\S))", "patterns": [ { "include": "#decl-block" @@ -3389,37 +3516,29 @@ } }, { - "begin": "(^[ \\t]+)?(?=//)", + "begin": "(^[ \\t]+)?(//)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.ts" + }, + "2": { + "name": "comment.line.double-slash.ts punctuation.definition.comment.ts" } }, - "end": "(?=$)", - "patterns": [ - { - "name": "comment.line.double-slash.ts", - "begin": "//", - "beginCaptures": { - "0": { - "name": "punctuation.definition.comment.ts" - } - }, - "end": "(?=$)" - } - ] + "end": "(?=^)", + "contentName": "comment.line.double-slash.ts" } ] }, "directives": { "name": "comment.line.triple-slash.directive.ts", - "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|name)\\s*=\\s*((\\'[^']*\\')|(\\\"[^\"]*\\\")))+\\s*/>\\s*$)", + "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|name)\\s*=\\s*((\\'.*\\')|(\\\".*\\\")))+\\s*/>\\s*$)", "beginCaptures": { "1": { "name": "punctuation.definition.comment.ts" } }, - "end": "(?=$)", + "end": "(?=^)", "patterns": [ { "name": "meta.tag.ts", @@ -3922,6 +4041,5 @@ } ] } - }, - "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/9f6676aa2ddb75cb5a9dbe1f59024069e839d986" + } } \ No newline at end of file diff --git a/extensions/typescript/syntaxes/TypeScriptReact.tmLanguage.json b/extensions/typescript/syntaxes/TypeScriptReact.tmLanguage.json index 3781e7bc5dcfe..e8423e02c966a 100644 --- a/extensions/typescript/syntaxes/TypeScriptReact.tmLanguage.json +++ b/extensions/typescript/syntaxes/TypeScriptReact.tmLanguage.json @@ -1,4 +1,10 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/Microsoft/TypeScript-TmLanguage/blob/master/TypeScriptReact.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/Microsoft/TypeScript-TmLanguage/commit/9be58bc51f179fd4119dbd5caaa7693a381a13b5", "name": "TypeScriptReact", "scopeName": "source.tsx", "fileTypes": [ @@ -71,7 +77,7 @@ "name": "storage.type.tsx" } }, - "end": "(?=$|;|}|(\\s+(of|in)\\s+))", + "end": "(?=$|^|;|}|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#destructuring-variable" @@ -100,7 +106,7 @@ "name": "meta.definition.variable.tsx entity.name.function.tsx" } }, - "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" @@ -115,7 +121,7 @@ "name": "meta.definition.variable.tsx variable.other.constant.tsx" } }, - "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" @@ -130,7 +136,7 @@ "name": "meta.definition.variable.tsx variable.other.readwrite.tsx" } }, - "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" @@ -157,7 +163,7 @@ { "name": "meta.object-binding-pattern-variable.tsx", "begin": "(?)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n )) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n ))\n)", + "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n )) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n ))\n)", "captures": { "1": { "name": "storage.modifier.tsx" @@ -1518,15 +1567,18 @@ "name": "keyword.operator.rest.tsx" }, "3": { - "name": "entity.name.function.tsx" + "name": "entity.name.function.tsx variable.language.this.tsx" }, "4": { + "name": "entity.name.function.tsx" + }, + "5": { "name": "keyword.operator.optional.tsx" } } }, { - "match": "(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)", "patterns": [ { - "include": "#comment" + "name": "meta.type.annotation.tsx", + "begin": "(:)(?=\\s*\\S)", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.annotation.tsx" + } + }, + "end": "(?])|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))", + "patterns": [ + { + "include": "#type" + } + ] }, { - "include": "#type" + "name": "meta.type.annotation.tsx", + "begin": "(:)", + "beginCaptures": { + "1": { + "name": "keyword.operator.type.annotation.tsx" + } + }, + "end": "(?])|(?=^\\s*$)|((?<=\\S)(?=\\s*$))|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))", + "patterns": [ + { + "include": "#type" + } + ] } ] }, @@ -1937,14 +2034,40 @@ ] }, "type-function-return-type": { - "name": "meta.type.function.return.tsx", - "begin": "=>", - "beginCaptures": { - "0": { - "name": "storage.type.function.arrow.tsx" + "patterns": [ + { + "name": "meta.type.function.return.tsx", + "begin": "(=>)(?=\\s*\\S)", + "beginCaptures": { + "1": { + "name": "storage.type.function.arrow.tsx" + } + }, + "end": "(?)(?]|//|$)", + "patterns": [ + { + "include": "#type-function-return-type-core" + } + ] + }, + { + "name": "meta.type.function.return.tsx", + "begin": "=>", + "beginCaptures": { + "0": { + "name": "storage.type.function.arrow.tsx" + } + }, + "end": "(?)(?]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))", + "patterns": [ + { + "include": "#type-function-return-type-core" + } + ] } - }, - "end": "(?)(?]|//|$)", + ] + }, + "type-function-return-type-core": { "patterns": [ { "include": "#comment" @@ -2016,7 +2139,7 @@ "name": "punctuation.definition.typeparameters.begin.tsx" } }, - "end": "(?=$)|(>)", + "end": "(>)", "endCaptures": { "1": { "name": "punctuation.definition.typeparameters.end.tsx" @@ -2051,7 +2174,7 @@ "name": "keyword.operator.assignment.tsx" } }, - "end": "(?=$|[,);}\\]])", + "end": "(?=$|^|[,);}\\]])", "patterns": [ { "include": "#expression" @@ -2065,7 +2188,7 @@ "name": "keyword.operator.assignment.tsx" } }, - "end": "(?=[,);}\\]])|(?=^\\s*$)", + "end": "(?=[,);}\\]])|(?=^\\s*$)|(?<=\\S)(? is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n ) |\n (\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends \n ) |\n # arrow function possible to detect only with => on same line\n (\n (<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(([^()]|\\([^()]*\\))*\\) # parameteres\n (\\s*:\\s*(.)*)? # return type\n \\s*=> # arrow operator\n )\n )\n)", + "begin": "(?x) (?:\n (? is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n ) |\n (\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends \n ) |\n # arrow function possible to detect only with => on same line\n (\n (<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(([^()]|\\([^()]*\\))*\\) # parameteres\n (\\s*:\\s*(.)*)? # return type\n \\s*=> # arrow operator\n )\n )\n)", "beginCaptures": { "1": { "name": "storage.modifier.async.tsx" @@ -2805,7 +2932,7 @@ "name": "storage.type.function.arrow.tsx" } }, - "end": "(?<=\\})|((?!\\{)(?=\\S))", + "end": "(?<=\\}|\\S)(?)|((?!\\{)(?=\\S))", "patterns": [ { "include": "#decl-block" @@ -3355,37 +3482,29 @@ } }, { - "begin": "(^[ \\t]+)?(?=//)", + "begin": "(^[ \\t]+)?(//)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.tsx" + }, + "2": { + "name": "comment.line.double-slash.tsx punctuation.definition.comment.tsx" } }, - "end": "(?=$)", - "patterns": [ - { - "name": "comment.line.double-slash.tsx", - "begin": "//", - "beginCaptures": { - "0": { - "name": "punctuation.definition.comment.tsx" - } - }, - "end": "(?=$)" - } - ] + "end": "(?=^)", + "contentName": "comment.line.double-slash.tsx" } ] }, "directives": { "name": "comment.line.triple-slash.directive.tsx", - "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|name)\\s*=\\s*((\\'[^']*\\')|(\\\"[^\"]*\\\")))+\\s*/>\\s*$)", + "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|name)\\s*=\\s*((\\'.*\\')|(\\\".*\\\")))+\\s*/>\\s*$)", "beginCaptures": { "1": { "name": "punctuation.definition.comment.tsx" } }, - "end": "(?=$)", + "end": "(?=^)", "patterns": [ { "name": "meta.tag.tsx", @@ -4005,8 +4124,8 @@ }, "jsx-tag-without-attributes": { "name": "meta.tag.without-attributes.tsx", - "begin": "(<)\\s*([_$a-zA-Z][-$\\w.]*(?)", - "end": "()", + "begin": "(<)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?)", + "end": "()", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.tsx" @@ -4015,6 +4134,9 @@ "name": "entity.name.tag.tsx" }, "3": { + "name": "support.class.component.tsx" + }, + "4": { "name": "punctuation.definition.tag.end.tsx" } }, @@ -4026,6 +4148,9 @@ "name": "entity.name.tag.tsx" }, "3": { + "name": "support.class.component.tsx" + }, + "4": { "name": "punctuation.definition.tag.end.tsx" } }, @@ -4038,7 +4163,7 @@ }, "jsx-tag-in-expression": { "begin": "(?x)\n (?<=[({\\[,?=>:*]|&&|\\|\\||\\?|\\Wreturn|^return|\\Wdefault|^)\\s*\n (?!(<)\\s*([_$a-zA-Z][-$\\w.]*(?)) #look ahead is not start of tag without attributes\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?))", - "end": "(/>)|(?:())", + "end": "(/>)|(?:())", "endCaptures": { "0": { "name": "meta.tag.tsx" @@ -4053,6 +4178,9 @@ "name": "entity.name.tag.tsx" }, "4": { + "name": "support.class.component.tsx" + }, + "5": { "name": "punctuation.definition.tag.end.tsx" } }, @@ -4064,7 +4192,7 @@ }, "jsx-child-tag": { "begin": "(?x)\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?))", - "end": "(/>)|(?:())", + "end": "(/>)|(?:())", "endCaptures": { "0": { "name": "meta.tag.tsx" @@ -4079,6 +4207,9 @@ "name": "entity.name.tag.tsx" }, "4": { + "name": "support.class.component.tsx" + }, + "5": { "name": "punctuation.definition.tag.end.tsx" } }, @@ -4094,13 +4225,16 @@ "end": "(?=(/>)|(?:()))", "patterns": [ { - "begin": "(?x)\n (<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?)", + "begin": "(?x)\n (<)\\s*\n ((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.tsx" }, "2": { "name": "entity.name.tag.tsx" + }, + "3": { + "name": "support.class.component.tsx" } }, "end": "(?=[/]?>)", @@ -4169,6 +4303,5 @@ } ] } - }, - "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/9f6676aa2ddb75cb5a9dbe1f59024069e839d986" + } } \ No newline at end of file diff --git a/extensions/typescript/test/colorize-results/test-brackets_tsx.json b/extensions/typescript/test/colorize-results/test-brackets_tsx.json index 26c893e42af1a..92fe70a1da2df 100644 --- a/extensions/typescript/test/colorize-results/test-brackets_tsx.json +++ b/extensions/typescript/test/colorize-results/test-brackets_tsx.json @@ -29,7 +29,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -73,7 +73,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -95,7 +95,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -194,7 +194,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -238,7 +238,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -271,7 +271,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -293,7 +293,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -359,7 +359,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/typescript/test/colorize-results/test-function-inv_ts.json b/extensions/typescript/test/colorize-results/test-function-inv_ts.json index 5e3326255f764..c99ec3d0ce263 100644 --- a/extensions/typescript/test/colorize-results/test-function-inv_ts.json +++ b/extensions/typescript/test/colorize-results/test-function-inv_ts.json @@ -7,7 +7,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -29,7 +29,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -51,7 +51,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -95,7 +95,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -117,7 +117,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -150,7 +150,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/typescript/test/colorize-results/test-issue11_ts.json b/extensions/typescript/test/colorize-results/test-issue11_ts.json index dec1231bd198f..c7ee2e71f2126 100644 --- a/extensions/typescript/test/colorize-results/test-issue11_ts.json +++ b/extensions/typescript/test/colorize-results/test-issue11_ts.json @@ -29,7 +29,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -95,7 +95,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -139,7 +139,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -238,7 +238,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -304,7 +304,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -370,7 +370,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -425,7 +425,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -480,7 +480,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -535,7 +535,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -590,7 +590,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -645,7 +645,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -700,7 +700,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -755,7 +755,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -810,7 +810,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -865,7 +865,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -920,7 +920,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -975,7 +975,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1030,7 +1030,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1085,7 +1085,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1162,7 +1162,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1217,7 +1217,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1316,7 +1316,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1426,7 +1426,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1503,7 +1503,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1723,7 +1723,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -1745,7 +1745,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -1778,7 +1778,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -1866,7 +1866,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -1888,7 +1888,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -1954,7 +1954,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2042,7 +2042,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -2152,7 +2152,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -2229,7 +2229,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -2306,7 +2306,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2328,7 +2328,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -2405,7 +2405,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2482,7 +2482,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2515,7 +2515,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -2548,7 +2548,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2592,7 +2592,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -2647,7 +2647,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -2680,7 +2680,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -2735,7 +2735,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2768,7 +2768,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -2790,7 +2790,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -2834,7 +2834,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -2867,7 +2867,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -2911,7 +2911,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -2966,7 +2966,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3252,7 +3252,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3340,7 +3340,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -3362,7 +3362,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { diff --git a/extensions/typescript/test/colorize-results/test-issue5431_ts.json b/extensions/typescript/test/colorize-results/test-issue5431_ts.json index 8f699a350f53f..f249e06fe4796 100644 --- a/extensions/typescript/test/colorize-results/test-issue5431_ts.json +++ b/extensions/typescript/test/colorize-results/test-issue5431_ts.json @@ -29,7 +29,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -51,7 +51,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -84,7 +84,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -117,7 +117,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -194,7 +194,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -238,7 +238,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -368,9 +368,9 @@ "r": { "dark_plus": "variable: #9CDCFE", "light_plus": "variable: #001080", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "dark_vs": "meta.template.expression.ts: #D4D4D4", + "light_vs": "meta.template.expression.ts: #000000", + "hc_black": "variable: #9CDCFE" } }, { @@ -412,9 +412,9 @@ "r": { "dark_plus": "variable: #9CDCFE", "light_plus": "variable: #001080", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "dark_vs": "meta.template.expression.ts: #D4D4D4", + "light_vs": "meta.template.expression.ts: #000000", + "hc_black": "variable: #9CDCFE" } }, { @@ -469,7 +469,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { diff --git a/extensions/typescript/test/colorize-results/test-issue5465_ts.json b/extensions/typescript/test/colorize-results/test-issue5465_ts.json index f43dc3fba2991..f4a61d6e1ac21 100644 --- a/extensions/typescript/test/colorize-results/test-issue5465_ts.json +++ b/extensions/typescript/test/colorize-results/test-issue5465_ts.json @@ -40,7 +40,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -106,7 +106,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -183,7 +183,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { diff --git a/extensions/typescript/test/colorize-results/test-issue5566_ts.json b/extensions/typescript/test/colorize-results/test-issue5566_ts.json index 1d4071b8100f9..86357c7c0cde4 100644 --- a/extensions/typescript/test/colorize-results/test-issue5566_ts.json +++ b/extensions/typescript/test/colorize-results/test-issue5566_ts.json @@ -29,7 +29,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -117,7 +117,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -205,7 +205,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -315,7 +315,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { diff --git a/extensions/typescript/test/colorize-results/test-keywords_ts.json b/extensions/typescript/test/colorize-results/test-keywords_ts.json index ac1e6e571f76e..016639c505ded 100644 --- a/extensions/typescript/test/colorize-results/test-keywords_ts.json +++ b/extensions/typescript/test/colorize-results/test-keywords_ts.json @@ -7,7 +7,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -51,7 +51,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -172,7 +172,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { diff --git a/extensions/typescript/test/colorize-results/test-members_ts.json b/extensions/typescript/test/colorize-results/test-members_ts.json index e6937242dc4f7..05e924b9c13ed 100644 --- a/extensions/typescript/test/colorize-results/test-members_ts.json +++ b/extensions/typescript/test/colorize-results/test-members_ts.json @@ -29,7 +29,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -73,7 +73,7 @@ "light_plus": "entity.other.inherited-class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.other.inherited-class: #4EC9B0" } }, { @@ -139,7 +139,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -172,7 +172,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -271,7 +271,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -293,7 +293,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -337,7 +337,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { diff --git a/extensions/typescript/test/colorize-results/test-object-literals_ts.json b/extensions/typescript/test/colorize-results/test-object-literals_ts.json index 36b795a88e5ad..1b5123075e022 100644 --- a/extensions/typescript/test/colorize-results/test-object-literals_ts.json +++ b/extensions/typescript/test/colorize-results/test-object-literals_ts.json @@ -29,7 +29,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -95,7 +95,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -106,7 +106,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -150,7 +150,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -161,7 +161,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -183,7 +183,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -216,7 +216,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -227,7 +227,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { diff --git a/extensions/typescript/test/colorize-results/test-strings_ts.json b/extensions/typescript/test/colorize-results/test-strings_ts.json index c3486c526ff75..cbf4e9dfb66fd 100644 --- a/extensions/typescript/test/colorize-results/test-strings_ts.json +++ b/extensions/typescript/test/colorize-results/test-strings_ts.json @@ -29,7 +29,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -104,9 +104,9 @@ "r": { "dark_plus": "variable: #9CDCFE", "light_plus": "variable: #001080", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "dark_vs": "meta.template.expression.ts: #D4D4D4", + "light_vs": "meta.template.expression.ts: #000000", + "hc_black": "variable: #9CDCFE" } }, { @@ -161,7 +161,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -183,7 +183,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -271,7 +271,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -315,7 +315,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -355,11 +355,11 @@ "c": " ", "t": "source.ts string.template.ts meta.template.expression.ts", "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "dark_plus": "meta.template.expression.ts: #D4D4D4", + "light_plus": "meta.template.expression.ts: #000000", + "dark_vs": "meta.template.expression.ts: #D4D4D4", + "light_vs": "meta.template.expression.ts: #000000", + "hc_black": "meta.template.expression.ts: #FFFFFF" } }, { @@ -368,20 +368,20 @@ "r": { "dark_plus": "variable: #9CDCFE", "light_plus": "variable: #001080", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "dark_vs": "meta.template.expression.ts: #D4D4D4", + "light_vs": "meta.template.expression.ts: #000000", + "hc_black": "variable: #9CDCFE" } }, { "c": " ", "t": "source.ts string.template.ts meta.template.expression.ts", "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "dark_plus": "meta.template.expression.ts: #D4D4D4", + "light_plus": "meta.template.expression.ts: #000000", + "dark_vs": "meta.template.expression.ts: #D4D4D4", + "light_vs": "meta.template.expression.ts: #000000", + "hc_black": "meta.template.expression.ts: #FFFFFF" } }, { @@ -399,11 +399,11 @@ "c": " ", "t": "source.ts string.template.ts meta.template.expression.ts", "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "dark_plus": "meta.template.expression.ts: #D4D4D4", + "light_plus": "meta.template.expression.ts: #000000", + "dark_vs": "meta.template.expression.ts: #D4D4D4", + "light_vs": "meta.template.expression.ts: #000000", + "hc_black": "meta.template.expression.ts: #FFFFFF" } }, { @@ -412,20 +412,20 @@ "r": { "dark_plus": "variable: #9CDCFE", "light_plus": "variable: #001080", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "dark_vs": "meta.template.expression.ts: #D4D4D4", + "light_vs": "meta.template.expression.ts: #000000", + "hc_black": "variable: #9CDCFE" } }, { "c": " ", "t": "source.ts string.template.ts meta.template.expression.ts", "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "dark_plus": "meta.template.expression.ts: #D4D4D4", + "light_plus": "meta.template.expression.ts: #000000", + "dark_vs": "meta.template.expression.ts: #D4D4D4", + "light_vs": "meta.template.expression.ts: #000000", + "hc_black": "meta.template.expression.ts: #FFFFFF" } }, { @@ -465,11 +465,11 @@ "c": " ", "t": "source.ts string.template.ts meta.template.expression.ts", "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "dark_plus": "meta.template.expression.ts: #D4D4D4", + "light_plus": "meta.template.expression.ts: #000000", + "dark_vs": "meta.template.expression.ts: #D4D4D4", + "light_vs": "meta.template.expression.ts: #000000", + "hc_black": "meta.template.expression.ts: #FFFFFF" } }, { @@ -478,20 +478,20 @@ "r": { "dark_plus": "variable: #9CDCFE", "light_plus": "variable: #001080", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "dark_vs": "meta.template.expression.ts: #D4D4D4", + "light_vs": "meta.template.expression.ts: #000000", + "hc_black": "variable: #9CDCFE" } }, { "c": " ", "t": "source.ts string.template.ts meta.template.expression.ts", "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "dark_plus": "meta.template.expression.ts: #D4D4D4", + "light_plus": "meta.template.expression.ts: #000000", + "dark_vs": "meta.template.expression.ts: #D4D4D4", + "light_vs": "meta.template.expression.ts: #000000", + "hc_black": "meta.template.expression.ts: #FFFFFF" } }, { @@ -509,11 +509,11 @@ "c": " ", "t": "source.ts string.template.ts meta.template.expression.ts", "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "dark_plus": "meta.template.expression.ts: #D4D4D4", + "light_plus": "meta.template.expression.ts: #000000", + "dark_vs": "meta.template.expression.ts: #D4D4D4", + "light_vs": "meta.template.expression.ts: #000000", + "hc_black": "meta.template.expression.ts: #FFFFFF" } }, { @@ -522,20 +522,20 @@ "r": { "dark_plus": "variable: #9CDCFE", "light_plus": "variable: #001080", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "dark_vs": "meta.template.expression.ts: #D4D4D4", + "light_vs": "meta.template.expression.ts: #000000", + "hc_black": "variable: #9CDCFE" } }, { "c": " ", "t": "source.ts string.template.ts meta.template.expression.ts", "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "dark_plus": "meta.template.expression.ts: #D4D4D4", + "light_plus": "meta.template.expression.ts: #000000", + "dark_vs": "meta.template.expression.ts: #D4D4D4", + "light_vs": "meta.template.expression.ts: #000000", + "hc_black": "meta.template.expression.ts: #FFFFFF" } }, { diff --git a/extensions/typescript/test/colorize-results/test-this_ts.json b/extensions/typescript/test/colorize-results/test-this_ts.json index 0efe6a8d69cd3..bb626c7e1006d 100644 --- a/extensions/typescript/test/colorize-results/test-this_ts.json +++ b/extensions/typescript/test/colorize-results/test-this_ts.json @@ -51,7 +51,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/typescript/test/colorize-results/test_ts.json b/extensions/typescript/test/colorize-results/test_ts.json index d407ffa3a5bb1..72fb99dba539e 100644 --- a/extensions/typescript/test/colorize-results/test_ts.json +++ b/extensions/typescript/test/colorize-results/test_ts.json @@ -95,7 +95,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -139,7 +139,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -183,7 +183,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -249,7 +249,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -282,7 +282,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -337,7 +337,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -370,7 +370,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -425,7 +425,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -458,7 +458,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -513,7 +513,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -546,7 +546,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -579,7 +579,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -612,7 +612,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -645,7 +645,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -678,7 +678,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -755,7 +755,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -799,7 +799,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -854,7 +854,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -898,7 +898,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -953,7 +953,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -997,7 +997,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1063,7 +1063,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1107,7 +1107,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -1173,7 +1173,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1206,7 +1206,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -1261,7 +1261,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1294,7 +1294,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -1349,7 +1349,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1382,7 +1382,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -1437,7 +1437,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1470,7 +1470,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -1525,7 +1525,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1558,7 +1558,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -1613,7 +1613,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1646,7 +1646,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -1701,7 +1701,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1734,7 +1734,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -1789,7 +1789,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1822,7 +1822,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -1877,7 +1877,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1998,7 +1998,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2097,7 +2097,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2196,7 +2196,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2317,7 +2317,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2438,7 +2438,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2559,7 +2559,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2680,7 +2680,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2779,7 +2779,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2878,7 +2878,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2944,7 +2944,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -3010,7 +3010,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -3098,7 +3098,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -3164,7 +3164,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -3208,7 +3208,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -3252,7 +3252,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3296,7 +3296,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -3373,7 +3373,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3395,7 +3395,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3439,7 +3439,7 @@ "light_plus": "support.constant.math: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.math: #4EC9B0" } }, { @@ -3461,7 +3461,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -3538,7 +3538,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3571,7 +3571,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -3593,7 +3593,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3714,7 +3714,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -3780,7 +3780,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -3846,7 +3846,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3912,7 +3912,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -3956,7 +3956,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3989,7 +3989,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -4066,7 +4066,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4132,7 +4132,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4154,7 +4154,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4176,7 +4176,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4198,7 +4198,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4220,7 +4220,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4286,7 +4286,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -4308,7 +4308,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4352,7 +4352,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -4396,7 +4396,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -4418,7 +4418,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4506,7 +4506,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -4627,7 +4627,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -4704,7 +4704,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4792,7 +4792,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -4814,7 +4814,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4858,7 +4858,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -4935,7 +4935,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5001,7 +5001,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -5023,7 +5023,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5089,7 +5089,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5155,7 +5155,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -5177,7 +5177,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5199,7 +5199,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5232,7 +5232,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5254,7 +5254,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5287,7 +5287,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5309,7 +5309,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5353,7 +5353,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5375,7 +5375,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5463,7 +5463,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5540,7 +5540,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5562,7 +5562,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5639,7 +5639,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5661,7 +5661,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5683,7 +5683,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5760,7 +5760,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5782,7 +5782,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5859,7 +5859,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5881,7 +5881,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5958,7 +5958,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -5980,7 +5980,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -6024,7 +6024,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -6101,7 +6101,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -6178,7 +6178,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6222,7 +6222,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -6310,7 +6310,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -6376,7 +6376,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -6442,7 +6442,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6486,7 +6486,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -6574,7 +6574,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -6651,7 +6651,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -6717,7 +6717,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6739,7 +6739,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -6827,7 +6827,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -6904,7 +6904,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6937,7 +6937,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6981,7 +6981,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -7003,7 +7003,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7025,7 +7025,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7069,7 +7069,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7102,7 +7102,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7124,7 +7124,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7168,7 +7168,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7223,7 +7223,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7333,7 +7333,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -7355,7 +7355,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7432,7 +7432,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -7454,7 +7454,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7498,7 +7498,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -7531,7 +7531,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7575,7 +7575,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -7630,7 +7630,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -7652,7 +7652,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7740,7 +7740,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7828,7 +7828,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7894,7 +7894,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7938,7 +7938,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8004,7 +8004,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8037,7 +8037,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8092,7 +8092,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8136,7 +8136,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8158,7 +8158,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8180,7 +8180,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8213,7 +8213,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8290,7 +8290,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -8312,7 +8312,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8389,7 +8389,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8466,7 +8466,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8510,7 +8510,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8587,7 +8587,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8653,7 +8653,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8686,7 +8686,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8774,7 +8774,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8851,7 +8851,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8895,7 +8895,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8972,7 +8972,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -9038,7 +9038,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -9071,7 +9071,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -9137,7 +9137,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -9159,7 +9159,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -9181,7 +9181,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -9225,7 +9225,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -9247,7 +9247,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -9280,7 +9280,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -9390,7 +9390,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -9412,7 +9412,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -9434,7 +9434,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -9500,7 +9500,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -9522,7 +9522,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -9599,7 +9599,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -9621,7 +9621,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -9665,7 +9665,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -9720,7 +9720,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -9764,7 +9764,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -9863,7 +9863,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -9929,7 +9929,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -9973,7 +9973,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10028,7 +10028,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10050,7 +10050,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10116,7 +10116,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10171,7 +10171,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10193,7 +10193,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -10215,7 +10215,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10237,7 +10237,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10303,7 +10303,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10336,7 +10336,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10358,7 +10358,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10402,7 +10402,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10457,7 +10457,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10512,7 +10512,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10578,7 +10578,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10600,7 +10600,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10644,7 +10644,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10666,7 +10666,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10732,7 +10732,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10798,7 +10798,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10853,7 +10853,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10875,7 +10875,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -10897,7 +10897,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10919,7 +10919,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10985,7 +10985,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -11018,7 +11018,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -11040,7 +11040,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -11084,7 +11084,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -11139,7 +11139,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -11194,7 +11194,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -11304,7 +11304,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -11370,7 +11370,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -11392,7 +11392,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { diff --git a/extensions/typescript/tsconfig.json b/extensions/typescript/tsconfig.json index 2e44abefad495..da4f1bb399b46 100644 --- a/extensions/typescript/tsconfig.json +++ b/extensions/typescript/tsconfig.json @@ -11,12 +11,11 @@ "noImplicitAny": true, "noImplicitReturns": true, "noUnusedLocals": true, - "noUnusedParameters": true + "noUnusedParameters": true, + "strict": true, + "alwaysStrict": true }, - "exclude": [ - "node_modules", - "server", - "out", - "test/colorize-fixtures" + "include": [ + "src/**/*" ] } \ No newline at end of file diff --git a/extensions/vb/.vscodeignore b/extensions/vb/.vscodeignore new file mode 100644 index 0000000000000..77ab386fc7df4 --- /dev/null +++ b/extensions/vb/.vscodeignore @@ -0,0 +1 @@ +test/** \ No newline at end of file diff --git a/extensions/vb/syntaxes/asp-vb-net.tmlanguage.json b/extensions/vb/syntaxes/asp-vb-net.tmlanguage.json index f1d697c499a45..1df56b22df87f 100644 --- a/extensions/vb/syntaxes/asp-vb-net.tmlanguage.json +++ b/extensions/vb/syntaxes/asp-vb-net.tmlanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/asp.vb.net.tmbundle/blob/master/Syntaxes/ASP%20VB.net.plist", + "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." + ], "comment": "Modified from the original ASP bundle. Originally modified by Thomas Aylott subtleGradient.com", "fileTypes": [ "vb" @@ -233,6 +238,5 @@ } }, "scopeName": "source.asp.vb.net", - "uuid": "7F9C9343-D48E-4E7D-BFE8-F680714DCD3E", - "version": "https://github.com/textmate/asp.vb.net.tmbundle/commit/72d44550b3286d0382d7be0624140cf97857ff69" + "uuid": "7F9C9343-D48E-4E7D-BFE8-F680714DCD3E" } \ No newline at end of file diff --git a/extensions/vb/test/colorize-results/test_vb.json b/extensions/vb/test/colorize-results/test_vb.json index abbc7e6a32f2e..b4567db9c7471 100644 --- a/extensions/vb/test/colorize-results/test_vb.json +++ b/extensions/vb/test/colorize-results/test_vb.json @@ -40,7 +40,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -62,7 +62,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -106,7 +106,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -128,7 +128,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -293,7 +293,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -348,7 +348,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -359,7 +359,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -370,7 +370,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -403,7 +403,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -447,7 +447,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -458,7 +458,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -469,7 +469,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -502,7 +502,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -546,7 +546,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -557,7 +557,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -568,7 +568,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -601,7 +601,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -722,7 +722,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -766,7 +766,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -788,7 +788,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -832,7 +832,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -865,7 +865,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -898,7 +898,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -920,7 +920,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -942,7 +942,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -964,7 +964,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1019,7 +1019,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1052,7 +1052,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1250,7 +1250,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1272,7 +1272,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1294,7 +1294,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1349,7 +1349,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1382,7 +1382,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1415,7 +1415,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1514,7 +1514,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1536,7 +1536,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1624,7 +1624,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1646,7 +1646,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1668,7 +1668,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1866,7 +1866,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1888,7 +1888,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1910,7 +1910,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1998,7 +1998,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2031,7 +2031,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2064,7 +2064,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2119,7 +2119,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2163,7 +2163,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { diff --git a/extensions/vscode-api-tests/src/configuration.test.ts b/extensions/vscode-api-tests/src/configuration.test.ts index 8b063ae4c7819..65dc52e453783 100644 --- a/extensions/vscode-api-tests/src/configuration.test.ts +++ b/extensions/vscode-api-tests/src/configuration.test.ts @@ -8,7 +8,7 @@ import * as vscode from 'vscode'; suite('Configuration tests', () => { - test('Default configurations', function () { + test('configurations, language defaults', function () { const defaultLanguageSettings = vscode.workspace.getConfiguration().get('[abcLang]'); assert.deepEqual(defaultLanguageSettings, { @@ -17,4 +17,29 @@ suite('Configuration tests', () => { }); }); -}); \ No newline at end of file + test('configuration, defaults', () => { + const config = vscode.workspace.getConfiguration('farboo'); + + assert.ok(config.has('config0')); + assert.equal(config.get('config0'), true); + assert.equal(config.get('config4'), ''); + assert.equal(config['config0'], true); + assert.equal(config['config4'], ''); + + assert.throws(() => (config)['config4'] = 'valuevalue'); + + assert.ok(config.has('nested.config1')); + assert.equal(config.get('nested.config1'), 42); + assert.ok(config.has('nested.config2')); + assert.equal(config.get('nested.config2'), 'Das Pferd frisst kein Reis.'); + }); + + test('configuration, name vs property', () => { + const config = vscode.workspace.getConfiguration('farboo'); + + assert.ok(config.has('get')); + assert.equal(config.get('get'), 'get-prop'); + assert.deepEqual(config['get'], config.get); + assert.throws(() => config['get'] = 'get-prop'); + }); +}); diff --git a/extensions/vscode-api-tests/src/editor.test.ts b/extensions/vscode-api-tests/src/editor.test.ts index f39a736a96762..a5d597b4bc0db 100644 --- a/extensions/vscode-api-tests/src/editor.test.ts +++ b/extensions/vscode-api-tests/src/editor.test.ts @@ -7,11 +7,11 @@ import * as assert from 'assert'; import { workspace, window, Position, Range, commands, TextEditor, TextDocument, TextEditorCursorStyle, TextEditorLineNumbersStyle, SnippetString, Selection } from 'vscode'; -import { createRandomFile, deleteFile, cleanUp } from './utils'; +import { createRandomFile, deleteFile, closeAllEditors } from './utils'; suite('editor tests', () => { - teardown(cleanUp); + teardown(closeAllEditors); function withRandomFileEditor(initialContents: string, run: (editor: TextEditor, doc: TextDocument) => Thenable): Thenable { return createRandomFile(initialContents).then(file => { @@ -194,7 +194,7 @@ suite('editor tests', () => { (err) => { assert.ok(true, 'edit with overlapping ranges should fail'); } - ); + ); }); }); }); diff --git a/extensions/vscode-api-tests/src/languages.test.ts b/extensions/vscode-api-tests/src/languages.test.ts index d4a0c80130ef1..321b1b772f234 100644 --- a/extensions/vscode-api-tests/src/languages.test.ts +++ b/extensions/vscode-api-tests/src/languages.test.ts @@ -14,7 +14,7 @@ import { suite('languages namespace tests', () => { - test('diagnostics & CodeActionProvider', function (done) { + test('diagnostics & CodeActionProvider', function () { class D2 extends Diagnostic { customProp = { complex() { } }; @@ -54,20 +54,15 @@ suite('languages namespace tests', () => { let r4 = languages.createDiagnosticCollection(); r4.set(uri, [diag2]); - workspace.openTextDocument(uri).then(doc => { + return workspace.openTextDocument(uri).then(doc => { return commands.executeCommand('vscode.executeCodeActionProvider', uri, new Range(0, 0, 0, 10)); }).then(commands => { - try { - assert.ok(ran); - Disposable.from(r1, r2, r3, r4).dispose(); - done(); - } catch (e) { - done(e); - } - }, done); + assert.ok(ran); + Disposable.from(r1, r2, r3, r4).dispose(); + }); }); - test('completions with document filters', function (done) { + test('completions with document filters', function () { let ran = false; let uri = Uri.file(join(workspace.rootPath || '', './bower.json')); @@ -82,17 +77,13 @@ suite('languages namespace tests', () => { } }); - workspace.openTextDocument(uri).then(doc => { + return workspace.openTextDocument(uri).then(doc => { return commands.executeCommand('vscode.executeCompletionItemProvider', uri, new Position(1, 0)); }).then((result: CompletionList) => { - try { - assert.equal(result.items[0].label, 'foo'); - assert.ok(ran); - Disposable.from(r1).dispose(); - done(); - } catch (e) { - done(e); - } - }, done); + r1.dispose(); + assert.ok(ran); + console.log(result.items); + assert.equal(result.items[0].label, 'foo'); + }); }); }); diff --git a/extensions/vscode-api-tests/src/utils.ts b/extensions/vscode-api-tests/src/utils.ts index d22baa8d55a5c..0d869ed787df7 100644 --- a/extensions/vscode-api-tests/src/utils.ts +++ b/extensions/vscode-api-tests/src/utils.ts @@ -5,7 +5,6 @@ 'use strict'; -import * as assert from 'assert'; import * as vscode from 'vscode'; import * as fs from 'fs'; import * as os from 'os'; @@ -49,31 +48,7 @@ export function deleteFile(file: vscode.Uri): Thenable { }); } -export function cleanUp(): Thenable { - return new Promise((resolve, reject) => { - if (vscode.window.visibleTextEditors.length === 0) { - return resolve(); - } - - const reg = vscode.window.onDidChangeVisibleTextEditors(editors => { - if (editors.length === 0) { - resolve(); - reg.dispose(); - } - }); +export function closeAllEditors(): Thenable { + return vscode.commands.executeCommand('workbench.action.closeAllEditors'); - vscode.commands.executeCommand('workbench.action.closeAllEditors').then(undefined, reject); - - }).then(() => { - assert.equal(vscode.window.visibleTextEditors.length, 0); - assert(!vscode.window.activeTextEditor); - - // TODO: we can't yet make this assertion because when - // the phost creates a document and makes no changes to it, - // the main side doesn't know about it and the phost side - // assumes it exists. Calling closeAllFiles will not - // remove it from textDocuments array. :( - - // assert.equal(vscode.workspace.textDocuments.length, 0); - }); } diff --git a/extensions/vscode-api-tests/src/window.test.ts b/extensions/vscode-api-tests/src/window.test.ts index 94a11bdff8ea4..cf4c0f653e5a3 100644 --- a/extensions/vscode-api-tests/src/window.test.ts +++ b/extensions/vscode-api-tests/src/window.test.ts @@ -8,11 +8,11 @@ import * as assert from 'assert'; import { workspace, window, commands, ViewColumn, TextEditorViewColumnChangeEvent, Uri, Selection, Position, CancellationTokenSource, TextEditorSelectionChangeKind } from 'vscode'; import { join } from 'path'; -import { cleanUp, pathEquals } from './utils'; +import { closeAllEditors, pathEquals, createRandomFile } from './utils'; suite('window namespace tests', () => { - teardown(cleanUp); + teardown(closeAllEditors); test('editor, active text editor', () => { return workspace.openTextDocument(join(workspace.rootPath || '', './far.js')).then(doc => { @@ -24,10 +24,10 @@ suite('window namespace tests', () => { }); }); - test('editor, UN-active text editor', () => { - assert.equal(window.visibleTextEditors.length, 0); - assert.ok(window.activeTextEditor === undefined); - }); + // test('editor, UN-active text editor', () => { + // assert.equal(window.visibleTextEditors.length, 0); + // assert.ok(window.activeTextEditor === undefined); + // }); test('editor, assign and check view columns', () => { @@ -110,6 +110,25 @@ suite('window namespace tests', () => { }); }); + test('issue #25801 - default column when opening a file', async () => { + const [docA, docB, docC] = await Promise.all([ + workspace.openTextDocument(await createRandomFile()), + workspace.openTextDocument(await createRandomFile()), + workspace.openTextDocument(await createRandomFile()) + ]); + + await window.showTextDocument(docA, ViewColumn.One); + await window.showTextDocument(docB, ViewColumn.Two); + + assert.ok(window.activeTextEditor); + assert.ok(window.activeTextEditor!.document === docB); + assert.equal(window.activeTextEditor!.viewColumn, ViewColumn.Two); + + await window.showTextDocument(docC); + assert.ok(window.activeTextEditor!.document === docC); + assert.equal(window.activeTextEditor!.viewColumn, ViewColumn.One); + }); + test('issue #5362 - Incorrect TextEditor passed by onDidChangeTextEditorSelection', (done) => { const file10Path = join(workspace.rootPath || '', './10linefile.ts'); const file30Path = join(workspace.rootPath || '', './30linefile.ts'); diff --git a/extensions/vscode-api-tests/src/workspace.test.ts b/extensions/vscode-api-tests/src/workspace.test.ts index 31303542fad61..f55270629353b 100644 --- a/extensions/vscode-api-tests/src/workspace.test.ts +++ b/extensions/vscode-api-tests/src/workspace.test.ts @@ -6,68 +6,38 @@ 'use strict'; import * as assert from 'assert'; -import { workspace, TextDocument, window, Position, Uri, EventEmitter, WorkspaceEdit, Disposable, EndOfLine } from 'vscode'; -import { createRandomFile, deleteFile, cleanUp, pathEquals } from './utils'; +import * as vscode from 'vscode'; +import { createRandomFile, deleteFile, closeAllEditors, pathEquals } from './utils'; import { join, basename } from 'path'; import * as fs from 'fs'; suite('workspace-namespace', () => { - teardown(cleanUp); + teardown(closeAllEditors); - test('configuration, defaults', () => { - const config = workspace.getConfiguration('farboo'); - - assert.ok(config.has('config0')); - assert.equal(config.get('config0'), true); - assert.equal(config.get('config4'), ''); - assert.equal(config['config0'], true); - assert.equal(config['config4'], ''); - - assert.throws(() => (config)['config4'] = 'valuevalue'); - - assert.ok(config.has('nested.config1')); - assert.equal(config.get('nested.config1'), 42); - assert.ok(config.has('nested.config2')); - assert.equal(config.get('nested.config2'), 'Das Pferd frisst kein Reis.'); - }); - - test('configuration, name vs property', () => { - const config = workspace.getConfiguration('farboo'); - - assert.ok(config.has('get')); - assert.equal(config.get('get'), 'get-prop'); - assert.deepEqual(config['get'], config.get); - assert.throws(() => config['get'] = 'get-prop'); - }); - - // test('configuration, getConfig/value', () => { - // const value = workspace.getConfiguration('farboo.config0'); - // assert.equal(Object.keys(value).length, 3); - // }); test('textDocuments', () => { - assert.ok(Array.isArray(workspace.textDocuments)); - assert.throws(() => (workspace).textDocuments = null); + assert.ok(Array.isArray(vscode.workspace.textDocuments)); + assert.throws(() => (vscode.workspace).textDocuments = null); }); test('rootPath', () => { - if (workspace.rootPath) { - assert.ok(pathEquals(workspace.rootPath, join(__dirname, '../testWorkspace'))); + if (vscode.workspace.rootPath) { + assert.ok(pathEquals(vscode.workspace.rootPath, join(__dirname, '../testWorkspace'))); } - assert.throws(() => workspace.rootPath = 'farboo'); + assert.throws(() => vscode.workspace.rootPath = 'farboo'); }); test('openTextDocument', () => { - let len = workspace.textDocuments.length; - return workspace.openTextDocument(join(workspace.rootPath || '', './simple.txt')).then(doc => { + let len = vscode.workspace.textDocuments.length; + return vscode.workspace.openTextDocument(join(vscode.workspace.rootPath || '', './simple.txt')).then(doc => { assert.ok(doc); - assert.equal(workspace.textDocuments.length, len + 1); + assert.equal(vscode.workspace.textDocuments.length, len + 1); }); }); test('openTextDocument, illegal path', () => { - return workspace.openTextDocument('funkydonky.txt').then(doc => { + return vscode.workspace.openTextDocument('funkydonky.txt').then(doc => { throw new Error('missing error'); }, err => { // good! @@ -75,28 +45,28 @@ suite('workspace-namespace', () => { }); test('openTextDocument, untitled is dirty', function () { - return workspace.openTextDocument(Uri.parse('untitled:' + join(workspace.rootPath || '', './newfile.txt'))).then(doc => { + return vscode.workspace.openTextDocument(vscode.Uri.parse('untitled:' + join(vscode.workspace.rootPath || '', './newfile.txt'))).then(doc => { assert.equal(doc.uri.scheme, 'untitled'); assert.ok(doc.isDirty); }); }); test('openTextDocument, untitled with host', function () { - const uri = Uri.parse('untitled://localhost/c%24/Users/jrieken/code/samples/foobar.txt'); - return workspace.openTextDocument(uri).then(doc => { + const uri = vscode.Uri.parse('untitled://localhost/c%24/Users/jrieken/code/samples/foobar.txt'); + return vscode.workspace.openTextDocument(uri).then(doc => { assert.equal(doc.uri.scheme, 'untitled'); }); }); test('openTextDocument, untitled without path', function () { - return workspace.openTextDocument().then(doc => { + return vscode.workspace.openTextDocument().then(doc => { assert.equal(doc.uri.scheme, 'untitled'); assert.ok(doc.isDirty); }); }); test('openTextDocument, untitled without path but language ID', function () { - return workspace.openTextDocument({ language: 'xml' }).then(doc => { + return vscode.workspace.openTextDocument({ language: 'xml' }).then(doc => { assert.equal(doc.uri.scheme, 'untitled'); assert.equal(doc.languageId, 'xml'); assert.ok(doc.isDirty); @@ -104,7 +74,7 @@ suite('workspace-namespace', () => { }); test('openTextDocument, untitled without path but language ID and content', function () { - return workspace.openTextDocument({ language: 'html', content: '

Hello world!

' }).then(doc => { + return vscode.workspace.openTextDocument({ language: 'html', content: '

Hello world!

' }).then(doc => { assert.equal(doc.uri.scheme, 'untitled'); assert.equal(doc.languageId, 'html'); assert.ok(doc.isDirty); @@ -113,16 +83,16 @@ suite('workspace-namespace', () => { }); test('openTextDocument, untitled closes on save', function (done) { - const path = join(workspace.rootPath || '', './newfile.txt'); + const path = join(vscode.workspace.rootPath || '', './newfile.txt'); - return workspace.openTextDocument(Uri.parse('untitled:' + path)).then(doc => { + return vscode.workspace.openTextDocument(vscode.Uri.parse('untitled:' + path)).then(doc => { assert.equal(doc.uri.scheme, 'untitled'); assert.ok(doc.isDirty); - let closed: TextDocument; - let d0 = workspace.onDidCloseTextDocument(e => closed = e); + let closed: vscode.TextDocument; + let d0 = vscode.workspace.onDidCloseTextDocument(e => closed = e); - return window.showTextDocument(doc).then(() => { + return vscode.window.showTextDocument(doc).then(() => { return doc.save().then(() => { assert.ok(closed === doc); assert.ok(!doc.isDirty); @@ -130,7 +100,7 @@ suite('workspace-namespace', () => { d0.dispose(); - return deleteFile(Uri.file(join(workspace.rootPath || '', './newfile.txt'))).then(() => done(null)); + return deleteFile(vscode.Uri.file(join(vscode.workspace.rootPath || '', './newfile.txt'))).then(() => done(null)); }); }); @@ -139,22 +109,22 @@ suite('workspace-namespace', () => { test('openTextDocument, uri scheme/auth/path', function () { - let registration = workspace.registerTextDocumentContentProvider('sc', { + let registration = vscode.workspace.registerTextDocumentContentProvider('sc', { provideTextDocumentContent() { return 'SC'; } }); return Promise.all([ - workspace.openTextDocument(Uri.parse('sc://auth')).then(doc => { + vscode.workspace.openTextDocument(vscode.Uri.parse('sc://auth')).then(doc => { assert.equal(doc.uri.authority, 'auth'); assert.equal(doc.uri.path, ''); }), - workspace.openTextDocument(Uri.parse('sc:///path')).then(doc => { + vscode.workspace.openTextDocument(vscode.Uri.parse('sc:///path')).then(doc => { assert.equal(doc.uri.authority, ''); assert.equal(doc.uri.path, '/path'); }), - workspace.openTextDocument(Uri.parse('sc://auth/path')).then(doc => { + vscode.workspace.openTextDocument(vscode.Uri.parse('sc://auth/path')).then(doc => { assert.equal(doc.uri.authority, 'auth'); assert.equal(doc.uri.path, '/path'); }) @@ -165,110 +135,110 @@ suite('workspace-namespace', () => { test('eol, read', () => { const a = createRandomFile('foo\nbar\nbar').then(file => { - return workspace.openTextDocument(file).then(doc => { - assert.equal(doc.eol, EndOfLine.LF); + return vscode.workspace.openTextDocument(file).then(doc => { + assert.equal(doc.eol, vscode.EndOfLine.LF); }); }); const b = createRandomFile('foo\nbar\nbar\r\nbaz').then(file => { - return workspace.openTextDocument(file).then(doc => { - assert.equal(doc.eol, EndOfLine.LF); + return vscode.workspace.openTextDocument(file).then(doc => { + assert.equal(doc.eol, vscode.EndOfLine.LF); }); }); const c = createRandomFile('foo\r\nbar\r\nbar').then(file => { - return workspace.openTextDocument(file).then(doc => { - assert.equal(doc.eol, EndOfLine.CRLF); + return vscode.workspace.openTextDocument(file).then(doc => { + assert.equal(doc.eol, vscode.EndOfLine.CRLF); }); }); return Promise.all([a, b, c]); }); - // test('eol, change via editor', () => { - // return createRandomFile('foo\nbar\nbar').then(file => { - // return workspace.openTextDocument(file).then(doc => { - // assert.equal(doc.eol, EndOfLine.LF); - // return window.showTextDocument(doc).then(editor => { - // return editor.edit(builder => builder.setEndOfLine(EndOfLine.CRLF)); - - // }).then(value => { - // assert.ok(value); - // assert.ok(doc.isDirty); - // assert.equal(doc.eol, EndOfLine.CRLF); - // }); - // }); - // }); - // }); + test('eol, change via editor', () => { + return createRandomFile('foo\nbar\nbar').then(file => { + return vscode.workspace.openTextDocument(file).then(doc => { + assert.equal(doc.eol, vscode.EndOfLine.LF); + return vscode.window.showTextDocument(doc).then(editor => { + return editor.edit(builder => builder.setEndOfLine(vscode.EndOfLine.CRLF)); + + }).then(value => { + assert.ok(value); + assert.ok(doc.isDirty); + assert.equal(doc.eol, vscode.EndOfLine.CRLF); + }); + }); + }); + }); - // test('eol, change via applyEdit', () => { - // return createRandomFile('foo\nbar\nbar').then(file => { - // return workspace.openTextDocument(file).then(doc => { - // assert.equal(doc.eol, EndOfLine.LF); - - // const edit = new WorkspaceEdit(); - // edit.set(file, [TextEdit.setEndOfLine(EndOfLine.CRLF)]); - // return workspace.applyEdit(edit).then(value => { - // assert.ok(value); - // assert.ok(doc.isDirty); - // assert.equal(doc.eol, EndOfLine.CRLF); - // }); - // }); - // }); - // }); + test('eol, change via applyEdit', () => { + return createRandomFile('foo\nbar\nbar').then(file => { + return vscode.workspace.openTextDocument(file).then(doc => { + assert.equal(doc.eol, vscode.EndOfLine.LF); + + const edit = new vscode.WorkspaceEdit(); + edit.set(file, [vscode.TextEdit.setEndOfLine(vscode.EndOfLine.CRLF)]); + return vscode.workspace.applyEdit(edit).then(value => { + assert.ok(value); + assert.ok(doc.isDirty); + assert.equal(doc.eol, vscode.EndOfLine.CRLF); + }); + }); + }); + }); - // test('eol, change via onWillSave', () => { + test('eol, change via onWillSave', () => { - // let called = false; - // let sub = workspace.onWillSaveTextDocument(e => { - // called = true; - // e.waitUntil(Promise.resolve([TextEdit.setEndOfLine(EndOfLine.LF)])); - // }); + let called = false; + let sub = vscode.workspace.onWillSaveTextDocument(e => { + called = true; + e.waitUntil(Promise.resolve([vscode.TextEdit.setEndOfLine(vscode.EndOfLine.LF)])); + }); - // return createRandomFile('foo\r\nbar\r\nbar').then(file => { - // return workspace.openTextDocument(file).then(doc => { - // assert.equal(doc.eol, EndOfLine.CRLF); - // const edit = new WorkspaceEdit(); - // edit.set(file, [TextEdit.insert(new Position(0, 0), '-changes-')]); - - // return workspace.applyEdit(edit).then(success => { - // assert.ok(success); - // return doc.save(); - - // }).then(success => { - // assert.ok(success); - // assert.ok(called); - // assert.ok(!doc.isDirty); - // assert.equal(doc.eol, EndOfLine.LF); - // sub.dispose(); - // }); - // }); - // }); - // }); + return createRandomFile('foo\r\nbar\r\nbar').then(file => { + return vscode.workspace.openTextDocument(file).then(doc => { + assert.equal(doc.eol, vscode.EndOfLine.CRLF); + const edit = new vscode.WorkspaceEdit(); + edit.set(file, [vscode.TextEdit.insert(new vscode.Position(0, 0), '-changes-')]); + + return vscode.workspace.applyEdit(edit).then(success => { + assert.ok(success); + return doc.save(); + + }).then(success => { + assert.ok(success); + assert.ok(called); + assert.ok(!doc.isDirty); + assert.equal(doc.eol, vscode.EndOfLine.LF); + sub.dispose(); + }); + }); + }); + }); test('events: onDidOpenTextDocument, onDidChangeTextDocument, onDidSaveTextDocument', () => { return createRandomFile().then(file => { - let disposables: Disposable[] = []; + let disposables: vscode.Disposable[] = []; let onDidOpenTextDocument = false; - disposables.push(workspace.onDidOpenTextDocument(e => { + disposables.push(vscode.workspace.onDidOpenTextDocument(e => { assert.ok(pathEquals(e.uri.fsPath, file.fsPath)); onDidOpenTextDocument = true; })); let onDidChangeTextDocument = false; - disposables.push(workspace.onDidChangeTextDocument(e => { + disposables.push(vscode.workspace.onDidChangeTextDocument(e => { assert.ok(pathEquals(e.document.uri.fsPath, file.fsPath)); onDidChangeTextDocument = true; })); let onDidSaveTextDocument = false; - disposables.push(workspace.onDidSaveTextDocument(e => { + disposables.push(vscode.workspace.onDidSaveTextDocument(e => { assert.ok(pathEquals(e.uri.fsPath, file.fsPath)); onDidSaveTextDocument = true; })); - return workspace.openTextDocument(file).then(doc => { - return window.showTextDocument(doc).then((editor) => { + return vscode.workspace.openTextDocument(file).then(doc => { + return vscode.window.showTextDocument(doc).then((editor) => { return editor.edit((builder) => { - builder.insert(new Position(0, 0), 'Hello World'); + builder.insert(new vscode.Position(0, 0), 'Hello World'); }).then(applied => { return doc.save().then(saved => { assert.ok(onDidOpenTextDocument); @@ -292,14 +262,14 @@ suite('workspace-namespace', () => { test('registerTextDocumentContentProvider, simple', function () { - let registration = workspace.registerTextDocumentContentProvider('foo', { + let registration = vscode.workspace.registerTextDocumentContentProvider('foo', { provideTextDocumentContent(uri) { return uri.toString(); } }); - const uri = Uri.parse('foo://testing/virtual.js'); - return workspace.openTextDocument(uri).then(doc => { + const uri = vscode.Uri.parse('foo://testing/virtual.js'); + return vscode.workspace.openTextDocument(uri).then(doc => { assert.equal(doc.getText(), uri.toString()); assert.equal(doc.isDirty, false); assert.equal(doc.uri.toString(), uri.toString()); @@ -311,15 +281,15 @@ suite('workspace-namespace', () => { // built-in assert.throws(function () { - workspace.registerTextDocumentContentProvider('untitled', { provideTextDocumentContent() { return null; } }); + vscode.workspace.registerTextDocumentContentProvider('untitled', { provideTextDocumentContent() { return null; } }); }); // built-in assert.throws(function () { - workspace.registerTextDocumentContentProvider('file', { provideTextDocumentContent() { return null; } }); + vscode.workspace.registerTextDocumentContentProvider('file', { provideTextDocumentContent() { return null; } }); }); // missing scheme - return workspace.openTextDocument(Uri.parse('notThere://foo/far/boo/bar')).then(() => { + return vscode.workspace.openTextDocument(vscode.Uri.parse('notThere://foo/far/boo/bar')).then(() => { assert.ok(false, 'expected failure'); }, err => { // expected @@ -329,14 +299,14 @@ suite('workspace-namespace', () => { test('registerTextDocumentContentProvider, multiple', function () { // duplicate registration - let registration1 = workspace.registerTextDocumentContentProvider('foo', { + let registration1 = vscode.workspace.registerTextDocumentContentProvider('foo', { provideTextDocumentContent(uri) { if (uri.authority === 'foo') { return '1'; } } }); - let registration2 = workspace.registerTextDocumentContentProvider('foo', { + let registration2 = vscode.workspace.registerTextDocumentContentProvider('foo', { provideTextDocumentContent(uri) { if (uri.authority === 'bar') { return '2'; @@ -345,8 +315,8 @@ suite('workspace-namespace', () => { }); return Promise.all([ - workspace.openTextDocument(Uri.parse('foo://foo/bla')).then(doc => { assert.equal(doc.getText(), '1'); }), - workspace.openTextDocument(Uri.parse('foo://bar/bla')).then(doc => { assert.equal(doc.getText(), '2'); }) + vscode.workspace.openTextDocument(vscode.Uri.parse('foo://foo/bla')).then(doc => { assert.equal(doc.getText(), '1'); }), + vscode.workspace.openTextDocument(vscode.Uri.parse('foo://bar/bla')).then(doc => { assert.equal(doc.getText(), '2'); }) ]).then(() => { registration1.dispose(); registration2.dispose(); @@ -356,18 +326,18 @@ suite('workspace-namespace', () => { test('registerTextDocumentContentProvider, evil provider', function () { // duplicate registration - let registration1 = workspace.registerTextDocumentContentProvider('foo', { + let registration1 = vscode.workspace.registerTextDocumentContentProvider('foo', { provideTextDocumentContent(uri) { return '1'; } }); - let registration2 = workspace.registerTextDocumentContentProvider('foo', { + let registration2 = vscode.workspace.registerTextDocumentContentProvider('foo', { provideTextDocumentContent(uri): string { throw new Error('fail'); } }); - return workspace.openTextDocument(Uri.parse('foo://foo/bla')).then(doc => { + return vscode.workspace.openTextDocument(vscode.Uri.parse('foo://foo/bla')).then(doc => { assert.equal(doc.getText(), '1'); registration1.dispose(); registration2.dispose(); @@ -376,12 +346,12 @@ suite('workspace-namespace', () => { test('registerTextDocumentContentProvider, invalid text', function () { - let registration = workspace.registerTextDocumentContentProvider('foo', { + let registration = vscode.workspace.registerTextDocumentContentProvider('foo', { provideTextDocumentContent(uri) { return 123; } }); - return workspace.openTextDocument(Uri.parse('foo://auth/path')).then(() => { + return vscode.workspace.openTextDocument(vscode.Uri.parse('foo://auth/path')).then(() => { assert.ok(false, 'expected failure'); }, err => { // expected @@ -391,14 +361,14 @@ suite('workspace-namespace', () => { test('registerTextDocumentContentProvider, show virtual document', function () { - let registration = workspace.registerTextDocumentContentProvider('foo', { + let registration = vscode.workspace.registerTextDocumentContentProvider('foo', { provideTextDocumentContent(uri) { return 'I am virtual'; } }); - return workspace.openTextDocument(Uri.parse('foo://something/path')).then(doc => { - return window.showTextDocument(doc).then(editor => { + return vscode.workspace.openTextDocument(vscode.Uri.parse('foo://something/path')).then(doc => { + return vscode.window.showTextDocument(doc).then(editor => { assert.ok(editor.document === doc); assert.equal(editor.document.getText(), 'I am virtual'); @@ -410,19 +380,19 @@ suite('workspace-namespace', () => { test('registerTextDocumentContentProvider, open/open document', function () { let callCount = 0; - let registration = workspace.registerTextDocumentContentProvider('foo', { + let registration = vscode.workspace.registerTextDocumentContentProvider('foo', { provideTextDocumentContent(uri) { callCount += 1; return 'I am virtual'; } }); - const uri = Uri.parse('foo://testing/path'); + const uri = vscode.Uri.parse('foo://testing/path'); - return Promise.all([workspace.openTextDocument(uri), workspace.openTextDocument(uri)]).then(docs => { + return Promise.all([vscode.workspace.openTextDocument(uri), vscode.workspace.openTextDocument(uri)]).then(docs => { let [first, second] = docs; assert.ok(first === second); - assert.ok(workspace.textDocuments.some(doc => doc.uri.toString() === uri.toString())); + assert.ok(vscode.workspace.textDocuments.some(doc => doc.uri.toString() === uri.toString())); assert.equal(callCount, 1); registration.dispose(); }); @@ -430,15 +400,15 @@ suite('workspace-namespace', () => { test('registerTextDocumentContentProvider, empty doc', function () { - let registration = workspace.registerTextDocumentContentProvider('foo', { + let registration = vscode.workspace.registerTextDocumentContentProvider('foo', { provideTextDocumentContent(uri) { return ''; } }); - const uri = Uri.parse('foo:doc/empty'); + const uri = vscode.Uri.parse('foo:doc/empty'); - return workspace.openTextDocument(uri).then(doc => { + return vscode.workspace.openTextDocument(uri).then(doc => { assert.equal(doc.getText(), ''); assert.equal(doc.uri.toString(), uri.toString()); registration.dispose(); @@ -448,25 +418,25 @@ suite('workspace-namespace', () => { test('registerTextDocumentContentProvider, change event', function () { let callCount = 0; - let emitter = new EventEmitter(); + let emitter = new vscode.EventEmitter(); - let registration = workspace.registerTextDocumentContentProvider('foo', { + let registration = vscode.workspace.registerTextDocumentContentProvider('foo', { onDidChange: emitter.event, provideTextDocumentContent(uri) { return 'call' + (callCount++); } }); - const uri = Uri.parse('foo://testing/path3'); + const uri = vscode.Uri.parse('foo://testing/path3'); - return workspace.openTextDocument(uri).then(doc => { + return vscode.workspace.openTextDocument(uri).then(doc => { assert.equal(callCount, 1); assert.equal(doc.getText(), 'call0'); return new Promise((resolve, reject) => { - let subscription = workspace.onDidChangeTextDocument(event => { + let subscription = vscode.workspace.onDidChangeTextDocument(event => { subscription.dispose(); assert.ok(event.document === doc); assert.equal(event.document.getText(), 'call1'); @@ -481,11 +451,11 @@ suite('workspace-namespace', () => { }); test('findFiles', () => { - return workspace.findFiles('*.js').then((res) => { + return vscode.workspace.findFiles('*.js').then((res) => { assert.equal(res.length, 1); - assert.equal(basename(workspace.asRelativePath(res[0])), 'far.js'); + assert.equal(basename(vscode.workspace.asRelativePath(res[0])), 'far.js'); }); - }); + }).timeout(60 * 1000); // Increase timeout for search-based test // TODO@Joh this test fails randomly // test('findFiles, cancellation', () => { @@ -494,17 +464,17 @@ suite('workspace-namespace', () => { // const token = source.token; // just to get an instance first // source.cancel(); - // return workspace.findFiles('*.js', null, 100, token).then((res) => { + // return vscode.workspace.findFiles('*.js', null, 100, token).then((res) => { // assert.equal(res, void 0); // }); // }); test('applyEdit', () => { - return workspace.openTextDocument(Uri.parse('untitled:' + join(workspace.rootPath || '', './new2.txt'))).then(doc => { - let edit = new WorkspaceEdit(); - edit.insert(doc.uri, new Position(0, 0), new Array(1000).join('Hello World')); - return workspace.applyEdit(edit); + return vscode.workspace.openTextDocument(vscode.Uri.parse('untitled:' + join(vscode.workspace.rootPath || '', './new2.txt'))).then(doc => { + let edit = new vscode.WorkspaceEdit(); + edit.insert(doc.uri, new vscode.Position(0, 0), new Array(1000).join('Hello World')); + return vscode.workspace.applyEdit(edit); }); }); }); diff --git a/extensions/vscode-api-tests/tsconfig.json b/extensions/vscode-api-tests/tsconfig.json index 620857bb06ffb..26c357e374bab 100644 --- a/extensions/vscode-api-tests/tsconfig.json +++ b/extensions/vscode-api-tests/tsconfig.json @@ -9,7 +9,7 @@ "sourceMap": true, "strictNullChecks": true }, - "exclude": [ - "node_modules" + "include": [ + "src/**/*" ] } \ No newline at end of file diff --git a/extensions/vscode-colorize-tests/package.json b/extensions/vscode-colorize-tests/package.json index a91ebb2a4d72f..2e886b6718905 100644 --- a/extensions/vscode-colorize-tests/package.json +++ b/extensions/vscode-colorize-tests/package.json @@ -8,14 +8,12 @@ "vscode": "*" }, "scripts": { - "compile": "node ./node_modules/vscode/bin/compile -watch -p ./", "vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:vscode-colorize-tests ./tsconfig.json", "postinstall": "node ./node_modules/vscode/bin/install" }, "devDependencies": { "@types/mocha": "^2.2.38", "@types/node": "^7.0.4", - "typescript": "^1.6.2", "vscode": "1.0.1" } } \ No newline at end of file diff --git a/extensions/vscode-colorize-tests/src/colorizer.test.ts b/extensions/vscode-colorize-tests/src/colorizer.test.ts index d709300a8394e..3c91e57ef3ff0 100644 --- a/extensions/vscode-colorize-tests/src/colorizer.test.ts +++ b/extensions/vscode-colorize-tests/src/colorizer.test.ts @@ -38,7 +38,7 @@ function assertUnchangedTokens(testFixurePath: string, done) { }, done); } -suite("colorization", () => { +suite('colorization', () => { let extensionsFolder = normalize(join(__dirname, '../../')); let extensions = fs.readdirSync(extensionsFolder); extensions.forEach(extension => { diff --git a/extensions/vscode-colorize-tests/tsconfig.json b/extensions/vscode-colorize-tests/tsconfig.json index 099a940aa2e35..366e25ea09c7c 100644 --- a/extensions/vscode-colorize-tests/tsconfig.json +++ b/extensions/vscode-colorize-tests/tsconfig.json @@ -8,7 +8,7 @@ ], "sourceMap": true }, - "exclude": [ - "node_modules" + "include": [ + "src/**/*" ] } \ No newline at end of file diff --git a/extensions/xml/.vscodeignore b/extensions/xml/.vscodeignore new file mode 100644 index 0000000000000..77ab386fc7df4 --- /dev/null +++ b/extensions/xml/.vscodeignore @@ -0,0 +1 @@ +test/** \ No newline at end of file diff --git a/extensions/xml/syntaxes/xml.json b/extensions/xml/syntaxes/xml.json index 8237ae9f31582..a2006a0d26534 100644 --- a/extensions/xml/syntaxes/xml.json +++ b/extensions/xml/syntaxes/xml.json @@ -1,7 +1,13 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-xml/blob/master/grammars/xml.cson", + "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." + ], "scopeName": "text.xml", "name": "XML", "fileTypes": [ + "aiml", "atom", "axml", "bpmn", @@ -21,6 +27,7 @@ "fodt", "fsproj", "fxml", + "gir", "glade", "gpx", "graphml", @@ -29,6 +36,7 @@ "isml", "jmx", "jsp", + "kst", "launch", "menu", "mxml", @@ -44,7 +52,10 @@ "rdf", "rng", "rss", + "sdf", "shproj", + "siml", + "sld", "storyboard", "svg", "targets", @@ -57,7 +68,12 @@ "vcproj.filters", "vcxproj", "vcxproj.filters", + "wixmsp", + "wixmst", + "wixobj", + "wixout", "wsdl", + "wxs", "xaml", "xbl", "xib", @@ -69,6 +85,7 @@ "xul", "ui" ], + "firstLineMatch": "(?x)\n# XML declaration\n(?:\n ^ <\\? xml\n\n # VersionInfo\n \\s+ version\n \\s* = \\s*\n (['\"])\n 1 \\. [0-9]+\n \\1\n\n # EncodingDecl\n (?:\n \\s+ encoding\n \\s* = \\s*\n\n # EncName\n (['\"])\n [A-Za-z]\n [-A-Za-z0-9._]*\n \\2\n )?\n\n # SDDecl\n (?:\n \\s+ standalone\n \\s* = \\s*\n (['\"])\n (?:yes|no)\n \\3\n )?\n\n \\s* \\?>\n)\n|\n# Modeline\n(?i:\n # Emacs\n -\\*-(?:\\s*(?=[^:;\\s]+\\s*-\\*-)|(?:.*?[;\\s]|(?<=-\\*-))mode\\s*:\\s*)\n xml\n (?=[\\s;]|(?]?\\d+|m)?|\\sex)(?=:(?=\\s*set?\\s[^\\n:]+:)|:(?!\\s*set?\\s))(?:(?:\\s|\\s*:\\s*)\\w*(?:\\s*=(?:[^\\n\\\\\\s]|\\\\.)*)?)*[\\s:](?:filetype|ft|syntax)\\s*=\n xml\n (?=\\s|:|$)\n)", "patterns": [ { "begin": "(<\\?)\\s*([-_a-zA-Z0-9]+)", @@ -421,6 +438,5 @@ "end": "--%?>", "name": "comment.block.xml" } - }, - "version": "https://github.com/atom/language-xml/commit/f461d428fb87040cb8a52d87d0b95151b9d3c0cc" + } } \ No newline at end of file diff --git a/extensions/xml/syntaxes/xsl.json b/extensions/xml/syntaxes/xsl.json index 8b715b599f94e..2193c1a9570ab 100644 --- a/extensions/xml/syntaxes/xsl.json +++ b/extensions/xml/syntaxes/xsl.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-xml/blob/master/grammars/xsl.cson", + "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." + ], "scopeName": "text.xml.xsl", "name": "XSL", "fileTypes": [ @@ -88,6 +93,5 @@ }, "name": "string.quoted.single.xml" } - }, - "version": "https://github.com/atom/language-xml/commit/507de2ee7daca60cf02e9e21fbeb92bbae73e280" + } } \ No newline at end of file diff --git a/extensions/yaml/.vscodeignore b/extensions/yaml/.vscodeignore new file mode 100644 index 0000000000000..77ab386fc7df4 --- /dev/null +++ b/extensions/yaml/.vscodeignore @@ -0,0 +1 @@ +test/** \ No newline at end of file diff --git a/extensions/yaml/syntaxes/yaml.json b/extensions/yaml/syntaxes/yaml.json index 55939b86d8d9a..82cd7d840dbee 100644 --- a/extensions/yaml/syntaxes/yaml.json +++ b/extensions/yaml/syntaxes/yaml.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/yaml.tmbundle/blob/master/Syntaxes/YAML.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." + ], "fileTypes": [ "yaml", "yml", @@ -624,6 +629,5 @@ } }, "scopeName": "source.yaml", - "uuid": "686AD6AE-33F3-4493-9512-9E9FC1D5417F", - "version": "https://github.com/textmate/yaml.tmbundle/commit/efc96efafe5e48480cf55a2ed124b388cbea4440" + "uuid": "686AD6AE-33F3-4493-9512-9E9FC1D5417F" } \ No newline at end of file diff --git a/extensions/yaml/test/colorize-results/test_yaml.json b/extensions/yaml/test/colorize-results/test_yaml.json index 8bea09ae57db1..e4e35ba7eefeb 100644 --- a/extensions/yaml/test/colorize-results/test_yaml.json +++ b/extensions/yaml/test/colorize-results/test_yaml.json @@ -84,7 +84,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -95,7 +95,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -348,7 +348,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -359,7 +359,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -447,7 +447,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -458,7 +458,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -579,7 +579,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -590,7 +590,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/i18n/chs/extensions/configuration-editing/out/extension.i18n.json b/i18n/chs/extensions/configuration-editing/out/extension.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/extensions/configuration-editing/out/extension.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json b/i18n/chs/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json index 214156f8972a3..97ff868bd38ef 100644 --- a/i18n/chs/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json +++ b/i18n/chs/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json @@ -5,9 +5,8 @@ // Do not edit this file. It is machine generated. { "activeEditorShort": "例如 myFile.txt", - "activeEditorMedium": "e.g. myFolder/myFile.txt", - "activeEditorLong": "e.g. /Users/Development/myProject/myFolder/myFile.txt", - "rootName": "例如 myProject", + "activeEditorMedium": "例如 myFolder/myFile.txt", + "activeEditorLong": "例如 /Users/Development/myProject/myFolder/myFile.txt", "rootPath": "例如 /Users/Development/myProject", "appName": "例如 VS Code", "dirty": "一个更新的指示器,指示活动编辑器是否更新", diff --git a/i18n/chs/extensions/extension-editing/out/extensionLinter.i18n.json b/i18n/chs/extensions/extension-editing/out/extensionLinter.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/extensions/extension-editing/out/extensionLinter.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/extensions/git/out/commands.i18n.json b/i18n/chs/extensions/git/out/commands.i18n.json index 7746211bbf628..ceede002e08b3 100644 --- a/i18n/chs/extensions/git/out/commands.i18n.json +++ b/i18n/chs/extensions/git/out/commands.i18n.json @@ -17,19 +17,29 @@ "confirm discard multiple": "是否确实要放弃 {0} 文件中的更改?", "discard": "放弃更改", "confirm discard all": "确定要放弃所有更改吗?此操作不可撤销!", + "discardAll": "放弃所有更改", + "no staged changes": "现在没有暂存的更改以供提交\n\n是否要直接自动暂存所有更改并提交?", + "yes": "是", + "always": "始终", "no changes": "没有要提交的更改。", "commit message": "提交消息", "provide commit message": "请提供提交消息", "branch name": "分支名称", "provide branch name": "请提供分支名称", + "select branch to delete": "选择要删除的分支", + "confirm force delete branch": "“{0}”分支未被完全合并。是否仍要删除?", + "delete branch": "删除分支", + "no remotes to pull": "存储库未配置任何从其中进行拉取的远程存储库。", "no remotes to push": "存储库未配置任何要推送到的远程存储库。", "nobranch": "请签出一个分支以推送到远程。", "pick remote": "选取要将分支“{0}”发布到的远程:", + "sync is unpredictable": "此操作从“{0}”推送和拉取提交。", "ok": "确定", "never again": "好,永不再显示", "no remotes to publish": "存储库未配置任何要发布到的远程存储库。", "disabled": "此工作区已禁用或不支持 GIT", "clean repo": "在签出前,请清理存储库工作树。", + "cant push": "无法推送 refs 到远端。请先运行“拉取”功能以整合你的更改。", "git error details": "Git:{0}", "git error": "Git 错误", "open git log": "打开 GIT 日志" diff --git a/i18n/chs/extensions/git/out/main.i18n.json b/i18n/chs/extensions/git/out/main.i18n.json index 266c6a1a3e56a..7b6c6f37d1f62 100644 --- a/i18n/chs/extensions/git/out/main.i18n.json +++ b/i18n/chs/extensions/git/out/main.i18n.json @@ -7,5 +7,5 @@ "using git": "使用 {1} 中的 GIT {0}", "updateGit": "更新 GIT", "neverShowAgain": "不再显示", - "git20": "似乎已安装 GIT {0}。Code 非常适合 GIT >= 2" + "git20": "你似乎已安装 Git {0}。Code 和 Git 版本 >=2 一起工作最佳" } \ No newline at end of file diff --git a/i18n/chs/extensions/git/out/scmProvider.i18n.json b/i18n/chs/extensions/git/out/scmProvider.i18n.json index 7fded37328a95..c52199b46c1c4 100644 --- a/i18n/chs/extensions/git/out/scmProvider.i18n.json +++ b/i18n/chs/extensions/git/out/scmProvider.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "commit": "Commit" + "commit": "提交" } \ No newline at end of file diff --git a/i18n/chs/extensions/git/package.i18n.json b/i18n/chs/extensions/git/package.i18n.json index 27fa6e370caf2..792d3e841ba71 100644 --- a/i18n/chs/extensions/git/package.i18n.json +++ b/i18n/chs/extensions/git/package.i18n.json @@ -20,27 +20,29 @@ "command.cleanAll": "放弃所有更改", "command.commit": "Commit", "command.commitStaged": "提交已暂存文件", - "command.commitStagedSigned": "提交暂存数据(已签收)", + "command.commitStagedSigned": "提交已暂存文件(已签名)", "command.commitAll": "全部提交", - "command.commitAllSigned": "提交所有数据(已签收)", + "command.commitAllSigned": "全部提交(已签名)", "command.undoCommit": "撤消上次提交", "command.checkout": "签出到...", "command.branch": "创建分支...", + "command.deleteBranch": "删除分支...", "command.pull": "拉取", "command.pullRebase": "拉取(变基)", "command.push": "推送", "command.pushTo": "推送到...", "command.sync": "同步", - "command.publish": "发布", + "command.publish": "发布分支", "command.showOutput": "显示 GIT 输出", "config.enabled": "是否已启用 GIT", - "config.path": "可执行 GIT 的路径", + "config.path": "Git 可执行文件路径", "config.autorefresh": "是否已启用自动刷新", "config.autofetch": "是否启用了自动提取", "config.enableLongCommitWarning": "是否针对长段提交消息进行警告", - "config.confirmSync": "同步 GIT 存储库前请先进行确认", - "config.countBadge": "控制 GIT 徽章计数器", - "config.checkoutType": "控制列出哪些分支类型", + "config.confirmSync": "同步 Git 存储库前进行确认", + "config.countBadge": "控制 Git 徽章计数器。“all”计算所有更改。“tracked”只计算跟踪的更改。“off”关闭此功能。", + "config.checkoutType": "控制运行“签出到...”时列出的分支的类型。“all”显示所有 refs,“local”只显示本地分支,“tags”只显示标签,“remote”只显示远程分支。", "config.ignoreLegacyWarning": "忽略旧版 Git 警告", - "config.ignoreLimitWarning": "忽略“存储库中存在大量更改”的警告" + "config.ignoreLimitWarning": "忽略“存储库中存在大量更改”的警告", + "config.defaultCloneDirectory": "克隆 Git 存储库的默认位置" } \ No newline at end of file diff --git a/i18n/chs/extensions/grunt/out/main.i18n.json b/i18n/chs/extensions/grunt/out/main.i18n.json index 8b6ad71cd4e6d..6f111606a092d 100644 --- a/i18n/chs/extensions/grunt/out/main.i18n.json +++ b/i18n/chs/extensions/grunt/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "自动检测 Grunt 失败,错误:{0}" +} \ No newline at end of file diff --git a/i18n/chs/extensions/grunt/package.i18n.json b/i18n/chs/extensions/grunt/package.i18n.json index 8b6ad71cd4e6d..750b3bc4c13af 100644 --- a/i18n/chs/extensions/grunt/package.i18n.json +++ b/i18n/chs/extensions/grunt/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.grunt.autoDetect": "控制自动检测 Grunt 任务是否打开。默认开启。" +} \ No newline at end of file diff --git a/i18n/chs/extensions/gulp/out/main.i18n.json b/i18n/chs/extensions/gulp/out/main.i18n.json index 500082cf82f27..bda8a250c2541 100644 --- a/i18n/chs/extensions/gulp/out/main.i18n.json +++ b/i18n/chs/extensions/gulp/out/main.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "execFailed": "自动检测 gulp 失败,错误为: {0}" + "execFailed": "自动检测 gulp 失败,错误:{0}" } \ No newline at end of file diff --git a/i18n/chs/extensions/gulp/package.i18n.json b/i18n/chs/extensions/gulp/package.i18n.json index 045189a90f813..368a4601441ee 100644 --- a/i18n/chs/extensions/gulp/package.i18n.json +++ b/i18n/chs/extensions/gulp/package.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "config.gulp.autoDetect": "控制自动检测 gulp 任务是否打开。默认开启。" + "config.gulp.autoDetect": "控制自动检测 Gulp 任务是否打开。默认开启。" } \ No newline at end of file diff --git a/i18n/chs/extensions/jake/out/main.i18n.json b/i18n/chs/extensions/jake/out/main.i18n.json new file mode 100644 index 0000000000000..d2f56bdda986c --- /dev/null +++ b/i18n/chs/extensions/jake/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "自动检测 Jake 失败,错误:{0}" +} \ No newline at end of file diff --git a/i18n/chs/extensions/jake/package.i18n.json b/i18n/chs/extensions/jake/package.i18n.json new file mode 100644 index 0000000000000..46f020cf890fd --- /dev/null +++ b/i18n/chs/extensions/jake/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.jake.autoDetect": "控制自动检测 Jake 任务是否打开。默认开启。" +} \ No newline at end of file diff --git a/i18n/chs/extensions/json/package.i18n.json b/i18n/chs/extensions/json/package.i18n.json index 6c9d2ad0143e9..f147c64ed829b 100644 --- a/i18n/chs/extensions/json/package.i18n.json +++ b/i18n/chs/extensions/json/package.i18n.json @@ -10,6 +10,6 @@ "json.schemas.fileMatch.item.desc": "将 JSON 文件解析到架构时,用于匹配的可以包含 \"*\" 的文件模式。", "json.schemas.schema.desc": "给定 URL 的架构定义。只需提供该架构以避免对架构 URL 的访问。", "json.format.enable.desc": "启用/禁用默认 JSON 格式化程序(需要重启)", - "json.tracing.desc": "跟踪 VS Code 和 JSON 语言服务器之间的通信。", + "json.tracing.desc": "跟踪 VS Code 与 JSON 语言服务器之间的通信。", "json.colorDecorators.enable.desc": "启用或禁用颜色修饰器" } \ No newline at end of file diff --git a/i18n/chs/extensions/markdown/out/extension.i18n.json b/i18n/chs/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..111330fed75d9 --- /dev/null +++ b/i18n/chs/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "onPreviewStyleLoadError": "无法加载“markdown.styles”:{0}" +} \ No newline at end of file diff --git a/i18n/chs/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/chs/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..91a343efd7d87 --- /dev/null +++ b/i18n/chs/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "acceptCurrentChange": "采用当前更改", + "acceptIncomingChange": "采用传入的更改", + "acceptBothChanges": "保留双方更改", + "compareChanges": "比较变更" +} \ No newline at end of file diff --git a/i18n/chs/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/chs/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..836475b99dc33 --- /dev/null +++ b/i18n/chs/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "cursorNotInConflict": "编辑器光标不在合并冲突内", + "compareChangesTitle": "{0}:当前更改 ⟷ 传入的更改", + "cursorOnCommonAncestorsRange": "编辑器光标在共同来源块上,请将其移动至“当前”或“传入”区域中", + "cursorOnSplitterRange": "编辑器光标在合并冲突分割线上,请将其移动至“当前”或“传入”区域中", + "noConflicts": "没有在此文件中找到合并冲突", + "noOtherConflictsInThisFile": "此文件中没有其他合并冲突了" +} \ No newline at end of file diff --git a/i18n/chs/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/chs/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..6fb9fc93479d3 --- /dev/null +++ b/i18n/chs/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "currentChange": "(当前更改)", + "incomingChange": "(传入的更改)" +} \ No newline at end of file diff --git a/i18n/chs/extensions/merge-conflict/package.i18n.json b/i18n/chs/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..ae0c9b4170490 --- /dev/null +++ b/i18n/chs/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "command.category": "合并冲突", + "command.accept.all-incoming": "全部采用传入版本", + "command.accept.all-both": "全部保留两者", + "command.accept.current": "采用当前内容", + "command.accept.incoming": "采用传入内容", + "command.accept.selection": "采用选中版本", + "command.accept.both": "保留两者", + "command.next": "下一个冲突", + "command.previous": "上一个冲突", + "command.compare": "比较当前冲突", + "config.title": "合并冲突", + "config.codeLensEnabled": "启用/禁用编辑器内合并冲突区域的 CodeLens", + "config.decoratorsEnabled": "启用/禁用编辑器内的合并冲突修饰器" +} \ No newline at end of file diff --git a/i18n/chs/extensions/npm/package.i18n.json b/i18n/chs/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..6130b12cc0571 --- /dev/null +++ b/i18n/chs/extensions/npm/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.npm.autoDetect": "控制自动检测 npm 脚本是否打开。默认开启。" +} \ No newline at end of file diff --git a/i18n/chs/extensions/typescript/out/features/bufferSyncSupport.i18n.json b/i18n/chs/extensions/typescript/out/features/bufferSyncSupport.i18n.json index b2cb78f102d0b..2b32badbce55a 100644 --- a/i18n/chs/extensions/typescript/out/features/bufferSyncSupport.i18n.json +++ b/i18n/chs/extensions/typescript/out/features/bufferSyncSupport.i18n.json @@ -4,8 +4,9 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "versionMismatch": "正在使用 TypeScript ({1}) 实现的编辑器功能。TypeScript ({0}) 已经全局安装在你的电脑上。VS Code 中发生的错误可能会与 TCS 中不同", "moreInformation": "详细信息", - "doNotCheckAgain": "不要再次检查", + "doNotCheckAgain": "不再检查", "close": "关闭", "updateTscCheck": "已将用户设置 \"typescript.check.tscVersion\" 更新为 false" } \ No newline at end of file diff --git a/i18n/chs/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/chs/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json new file mode 100644 index 0000000000000..de76bf9b5f59c --- /dev/null +++ b/i18n/chs/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ts-check": "在 JavaScript 文件中启用语义检查。必须在文件顶部。", + "ts-nocheck": "在 JavaScript 文件中禁用语义检查。必须在文件顶部。", + "ts-ignore": "取消文件下一行的 @ts-check 错误提示。" +} \ No newline at end of file diff --git a/i18n/chs/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/chs/extensions/typescript/out/typescriptServiceClient.i18n.json index 046adff9e707e..06c4e0ea585e7 100644 --- a/i18n/chs/extensions/typescript/out/typescriptServiceClient.i18n.json +++ b/i18n/chs/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -4,13 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "restartTsServerTitle": "重启", - "restartTypeScriptServerBlurb": "重启 TypeScript 服务器以应用更改", - "later": "稍后", - "channelName": "TypeScript", "noServerFound": "路径 {0} 未指向有效的 tsserver 安装。请回退到捆绑的 TypeScript 版本。", "noBundledServerFound": "其他应用程序(例如运行异常的病毒检测工具)已删除 VSCode 的 tsserver。请重新安装 VS Code。", "versionNumber.custom": "自定义", + "serverCouldNotBeStarted": "无法启动 TypeScript 语言服务器。错误消息为: {0}", "useVSCodeVersionOption": "使用 VSCode 的版本", "activeVersion": "当前处于活动状态", "useWorkspaceVersionOption": "使用工作区版本", diff --git a/i18n/chs/extensions/typescript/out/utils/logger.i18n.json b/i18n/chs/extensions/typescript/out/utils/logger.i18n.json new file mode 100644 index 0000000000000..bc738f43d0c37 --- /dev/null +++ b/i18n/chs/extensions/typescript/out/utils/logger.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "channelName": "TypeScript" +} \ No newline at end of file diff --git a/i18n/chs/extensions/typescript/out/utils/projectStatus.i18n.json b/i18n/chs/extensions/typescript/out/utils/projectStatus.i18n.json index 801a0e687c6ba..cd5d5f3a2ff01 100644 --- a/i18n/chs/extensions/typescript/out/utils/projectStatus.i18n.json +++ b/i18n/chs/extensions/typescript/out/utils/projectStatus.i18n.json @@ -6,7 +6,6 @@ { "hintExclude": "若要启用项目范围内的 JavaScript/TypeScript 语言功能,请排除包含多个文件的文件夹,例如: {0}", "hintExclude.generic": "若要启用项目范围内的 JavaScript/TypeScript 语言功能,请排除包含不需要处理的源文件的大型文件夹。", - "open": "配置排除", "large.label": "配置排除", "hintExclude.tooltip": "若要启用项目范围内的 JavaScript/TypeScript 语言功能,请排除包含不需要处理的源文件的大型文件夹。" } \ No newline at end of file diff --git a/i18n/chs/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/chs/extensions/typescript/out/utils/typingsStatus.i18n.json index cba20c137972f..276914045d0be 100644 --- a/i18n/chs/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/chs/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,7 +5,7 @@ // Do not edit this file. It is machine generated. { "installingPackages": "提取数据以实现更好的 TypeScript IntelliSense", - "typesInstallerInitializationFailed.title": "无法为 JavaScript 语言功能安装 typings 文件。请确认 NPM 已经安装", + "typesInstallerInitializationFailed.title": "无法为 JavaScript 语言功能安装 typings 文件。请确认 NPM 已经安装或者在你的用户设置中配置“typescript.npm”", "typesInstallerInitializationFailed.moreInformation": "详细信息", "typesInstallerInitializationFailed.doNotCheckAgain": "不要再次检查", "typesInstallerInitializationFailed.close": "关闭" diff --git a/i18n/chs/extensions/typescript/package.i18n.json b/i18n/chs/extensions/typescript/package.i18n.json index 1e24a1e8d406c..8f30f33dedaf0 100644 --- a/i18n/chs/extensions/typescript/package.i18n.json +++ b/i18n/chs/extensions/typescript/package.i18n.json @@ -13,11 +13,11 @@ "typescript.check.tscVersion": "检查全局安装的 TypeScript 编译器(例如 tsc )是否不同于使用的 TypeScript 语言服务。", "typescript.tsserver.log": "将 TS 服务器的日志保存到一个文件。此日志可用于诊断 TS 服务器问题。日志可能包含你的项目中的文件路径、源代码和其他可能敏感的信息。", "typescript.tsserver.trace": "对发送到 TS 服务器的消息启用跟踪。此跟踪信息可用于诊断 TS 服务器问题。 跟踪信息可能包含你的项目中的文件路径、源代码和其他可能敏感的信息。", - "typescript.tsserver.experimentalAutoBuild": "启用实验性自动生成。要求安装 1.9 dev 或 2.x tsserver 版本并在更改后重启 VS Code。", "typescript.validate.enable": "启用/禁用 TypeScript 验证。", "typescript.format.enable": "启用/禁用默认 TypeScript 格式化程序。", "javascript.format.enable": "启用/禁用 JavaScript 格式化程序。", "format.insertSpaceAfterCommaDelimiter": "定义逗号分隔符后面的空格处理。", + "format.insertSpaceAfterConstructor": "定义构造器关键字后的空格处理。要求 TypeScript >= 2.3.0。", "format.insertSpaceAfterSemicolonInForStatements": "在 For 语句中,定义分号后面的空格处理。", "format.insertSpaceBeforeAndAfterBinaryOperators": "定义二进制运算符后面的空格处理", "format.insertSpaceAfterKeywordsInControlFlowStatements": "定义控制流语句中关键字后面的空格处理。", @@ -33,11 +33,16 @@ "javascript.validate.enable": "启用/禁用 JavaScript 验证。", "typescript.goToProjectConfig.title": "转到项目配置", "javascript.goToProjectConfig.title": "转到项目配置", - "typescript.referencesCodeLens.enabled": "启用/禁用引用 CodeLens。要求 TypeScript >= 2.0.6。", + "javascript.referencesCodeLens.enabled": "启用/禁用在 JavaScript 文件中引用 CodeLens。", + "typescript.referencesCodeLens.enabled": "启用/禁用在 TypeScript 文件中引用 CodeLens。要求 TypeScript >= 2.0.6。", "typescript.implementationsCodeLens.enabled": "启用/禁用实现 CodeLens。要求 TypeScript >= 2.2.0。", - "typescript.openTsServerLog.title": "打开 TS 服务器日志文件", + "typescript.openTsServerLog.title": "打开 TS 服务器日志", + "typescript.restartTsServer": "重启 TS 服务器", "typescript.selectTypeScriptVersion.title": "选择 TypeScript 版本", "jsDocCompletion.enabled": "启用/禁用自动 JSDoc 注释", "javascript.implicitProjectConfig.checkJs": "启用/禁用 JavaScript 文件的语义检查。现有的 jsconfig.json 或\n tsconfig.json 文件会覆盖此设置。要求 TypeScript >=2.3.1。", - "typescript.check.npmIsInstalled": "检查是否安装了 NPM 以进行自动 typings 获取" + "typescript.npm": "指定用于自动获取类型的 NPM 可执行文件的路径。要求 TypeScript >= 2.3.4。", + "typescript.check.npmIsInstalled": "检查是否安装了 NPM 以自动获取类型。", + "javascript.nameSuggestions": "启用/禁用在 JavaScript 建议列表中包含文件中的唯一名称。", + "typescript.tsc.autoDetect": "控制自动检测 tsc 任务是否打开。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/chs/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index 8f88774462653..883b4c5cbca44 100644 --- a/i18n/chs/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/chs/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,8 +6,7 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "图像太大,无法在编辑器中显示。 ", - "resourceOpenExternalButton": "打开图像", - "resourceOpenExternalText": " 是否使用外部程序?", + "resourceOpenExternalButton": "使用外部程序打开图片?", "nativeBinaryError": "文件将不在编辑器中显示,因为它是二进制文件、非常大或使用不支持的文本编码。", "sizeB": "{0} B", "sizeKB": "{0} KB", diff --git a/i18n/chs/src/vs/base/common/errorMessage.i18n.json b/i18n/chs/src/vs/base/common/errorMessage.i18n.json index 8dd95907e5163..01836ff546514 100644 --- a/i18n/chs/src/vs/base/common/errorMessage.i18n.json +++ b/i18n/chs/src/vs/base/common/errorMessage.i18n.json @@ -13,6 +13,6 @@ "error.connection.unknown": "出现未知连接错误。您的 Internet 连接已断开,或者您连接的服务器已脱机。", "stackTrace.format": "{0}: {1}", "error.defaultMessage": "出现未知错误。有关详细信息,请参阅日志。", - "nodeExceptionMessage": "发生了系统错误({0})", + "nodeExceptionMessage": "发生了系统错误 ({0})", "error.moreErrors": "{0} 个(共 {1} 个错误)" } \ No newline at end of file diff --git a/i18n/chs/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/chs/src/vs/base/common/jsonErrorMessages.i18n.json new file mode 100644 index 0000000000000..0400ef47d7ca6 --- /dev/null +++ b/i18n/chs/src/vs/base/common/jsonErrorMessages.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error.invalidSymbol": "符号无效", + "error.invalidNumberFormat": "数字格式无效", + "error.propertyNameExpected": "需要属性名", + "error.valueExpected": "需要值", + "error.colonExpected": "需要冒号", + "error.commaExpected": "需要逗号", + "error.closeBraceExpected": "需要右大括号", + "error.closeBracketExpected": "需要右括号", + "error.endOfFileExpected": "需要文件结尾(EOF)" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/base/common/keybindingLabels.i18n.json b/i18n/chs/src/vs/base/common/keybindingLabels.i18n.json new file mode 100644 index 0000000000000..0e97d8b37c301 --- /dev/null +++ b/i18n/chs/src/vs/base/common/keybindingLabels.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ctrlKey": "Ctrl", + "shiftKey": "Shift", + "altKey": "Alt", + "windowsKey": "Windows", + "ctrlKey.long": "Control", + "shiftKey.long": "Shift", + "altKey.long": "Alt", + "cmdKey.long": "Command", + "windowsKey.long": "Windows" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/code/electron-main/menus.i18n.json b/i18n/chs/src/vs/code/electron-main/menus.i18n.json index f049e294f3bc1..cd2479ccdbe4f 100644 --- a/i18n/chs/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/chs/src/vs/code/electron-main/menus.i18n.json @@ -14,6 +14,7 @@ "mHelp": "帮助(&&H)", "miNewWindow": "新建窗口(&&W)", "mAbout": "关于 {0}", + "mServices": "服务", "mHide": "隐藏 {0}", "mHideOthers": "隐藏其他", "mShowAll": "全部显示", @@ -40,6 +41,7 @@ "miSelectIconTheme": "文件图标主题(&&I)", "miPreferences": "首选项(&&P)", "miReopenClosedEditor": "重新打开已关闭的编辑器(&&R)", + "miMore": "更多(&&M)...", "miClearRecentOpen": "清除最近使用的文件(&&C)", "miUndo": "撤消(&&U)", "miRedo": "恢复(&&R)", @@ -54,9 +56,9 @@ "miShowEmmetCommands": "Emmet(&&M)...", "miToggleLineComment": "切换行注释(&&T)", "miToggleBlockComment": "切换块注释(&&B)", - "miInsertCursorAbove": "在上面添加游标(&&A)", - "miInsertCursorBelow": "在下面添加游标(&&D)", - "miInsertCursorAtEndOfEachLineSelected": "在行尾添加游标(&&U)", + "miInsertCursorAbove": "在上面添加光标(&&A)", + "miInsertCursorBelow": "在下面添加光标(&&D)", + "miInsertCursorAtEndOfEachLineSelected": "在行尾添加光标(&&U)", "miAddSelectionToNextFindMatch": "添加下一个匹配项(&&N)", "miAddSelectionToPreviousFindMatch": "添加上一个匹配项(&&R)", "miSelectHighlights": "选择所有匹配项(&&O)", @@ -69,7 +71,7 @@ "miSmartSelectShrink": "缩小选定范围(&&S)", "miViewExplorer": "资源管理器(&&E)", "miViewSearch": "搜索(&&S)", - "miViewGit": "GIT(&&G)", + "miViewSCM": "SCM(&&C)", "miViewDebug": "调试(&&D)", "miViewExtensions": "扩展(&&X)", "miToggleOutput": "输出(&&O)", @@ -101,7 +103,7 @@ "miForward": "前进(&&F)", "miNextEditor": "下一个编辑器(&&N)", "miPreviousEditor": "上一个编辑器(&&P)", - "miNextEditorInGroup": "组中上一个使用过的编辑器(&&P)", + "miNextEditorInGroup": "组中下一个使用过的编辑器(&&N)", "miPreviousEditorInGroup": "组中上一个使用过的编辑器(&&P)", "miSwitchEditor": "切换编辑器(&&E)", "miFocusFirstGroup": "第一组(&&F)", @@ -114,9 +116,11 @@ "miGotoSymbolInFile": "转到文件中的符号(&&S)...", "miGotoSymbolInWorkspace": "转到工作区中的符号(&&W)...", "miGotoDefinition": "转到定义(&&D)...", + "miGotoTypeDefinition": "转到类型定义(&&T)", + "miGotoImplementation": "转到实现(&&I)", "miGotoLine": "转到行(&&L)...", "miStartDebugging": "启动调试(&&S)", - "miStartWithoutDebugging": "在不调试的情况下启动(&&W)", + "miStartWithoutDebugging": "非调试启动(&&W)", "miStopDebugging": "停止调试(&&S)", "miRestart Debugging": "重启调试(&&R)", "miOpenConfigurations": "打开配置(&&C)", @@ -130,31 +134,37 @@ "miColumnBreakpoint": "列断点(&&O)", "miFunctionBreakpoint": "函数断点(&&F)...", "miNewBreakpoint": "新建断点(&&N)", + "miEnableAllBreakpoints": "启用所有断点", "miDisableAllBreakpoints": "禁用所有断点(&&L)", "miRemoveAllBreakpoints": "删除所有断点(&&R)", "miInstallAdditionalDebuggers": "安装其他调试器(&&I)...", "mMinimize": "最小化", - "mClose": "关闭", + "mZoom": "缩放", "mBringToFront": "全部置于顶层", + "miSwitchWindow": "切换窗口(&&W)...", "miToggleDevTools": "切换开发人员工具(&&T)", "miAccessibilityOptions": "辅助功能选项(&&O)", "miReportIssues": "报告问题(&&I)", "miWelcome": "欢迎使用(&&W)", + "miInteractivePlayground": "交互式演练场(&&I)", "miDocumentation": "文档(&&D)", "miReleaseNotes": "发行说明(&&R)", - "miKeyboardShortcuts": "键盘快捷方式参考(&&K)", + "miKeyboardShortcuts": "快捷键参考(&&K)", "miIntroductoryVideos": "介绍性视频(&&V)", "miTwitter": "在 Twitter 上加入我们(&&J)", "miUserVoice": "搜索功能请求(&&S)", "miLicense": "查看许可证(&&L)", "miPrivacyStatement": "隐私声明(&&P)", "miAbout": "关于(&&A)", + "miRunTask": "运行任务(&&R)...", + "miConfigureTask": "配置任务(&&C)", + "accessibilityOptionsWindowTitle": "辅助功能选项", "miRestartToUpdate": "重启以更新...", "miCheckingForUpdates": "正在检查更新...", "miDownloadUpdate": "下载可用更新", "miDownloadingUpdate": "正在下载更新...", "miInstallingUpdate": "正在安装更新...", "miCheckForUpdates": "检查更新...", - "aboutDetail": "\n版本 {0}\n提交 {1}\n日期 {2}\nShell {3}\n呈现器 {4}\nNode {5}", + "aboutDetail": "\n版本 {0}\n提交 {1}\n日期 {2}\nShell {3}\n渲染器 {4}\nNode {5}", "okButton": "确定" } \ No newline at end of file diff --git a/i18n/chs/src/vs/code/electron-main/windows.i18n.json b/i18n/chs/src/vs/code/electron-main/windows.i18n.json index 6982cf6190cbd..2c892bf97d078 100644 --- a/i18n/chs/src/vs/code/electron-main/windows.i18n.json +++ b/i18n/chs/src/vs/code/electron-main/windows.i18n.json @@ -7,7 +7,6 @@ "ok": "确定", "pathNotExistTitle": "路径不存在", "pathNotExistDetail": "磁盘上似乎不再存在路径“{0}”。", - "accessibilityOptionsWindowTitle": "辅助功能选项", "reopen": "重新打开", "wait": "保持等待", "close": "关闭", @@ -15,8 +14,6 @@ "appStalledDetail": "可以重新打开或关闭窗,或者保持等待。", "appCrashed": "窗口出现故障", "appCrashedDetail": "我们对此引起的不便表示抱歉! 请重启该窗口从上次停止的位置继续。", - "newWindow": "新建窗口", - "newWindowDesc": "打开一个新窗口", - "recentFolders": "最近的文件夹", - "folderDesc": "{0} {1}" + "openFile": "打开文件", + "openFolder": "打开文件夹" } \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/browser/widget/diffEditorWidget.i18n.json b/i18n/chs/src/vs/editor/browser/widget/diffEditorWidget.i18n.json index 8b6ad71cd4e6d..8b17b19639ade 100644 --- a/i18n/chs/src/vs/editor/browser/widget/diffEditorWidget.i18n.json +++ b/i18n/chs/src/vs/editor/browser/widget/diffEditorWidget.i18n.json @@ -3,4 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "diffEditorInserted": "已插入文本的背景颜色。", + "diffEditorRemoved": "被删除文本的背景颜色。", + "diffEditorInsertedOutline": "插入的文本的轮廓颜色。", + "diffEditorRemovedOutline": "被删除文本的轮廓颜色。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/browser/widget/diffReview.i18n.json b/i18n/chs/src/vs/editor/browser/widget/diffReview.i18n.json new file mode 100644 index 0000000000000..3ebf52a28ce2e --- /dev/null +++ b/i18n/chs/src/vs/editor/browser/widget/diffReview.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "关闭" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json index c0bcb56318650..20d4ec635d048 100644 --- a/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -9,37 +9,45 @@ "fontWeight": "控制字体粗细。", "fontSize": "以像素为单位控制字号。", "lineHeight": "控制行高。使用 0 通过字号计算行高。", + "letterSpacing": "以像素为单位控制字符间距。", "lineNumbers": "控制行号的显示。可能的值为“开”、“关”和“相对”。“相对”将显示从当前光标位置开始计数的行数。", "rulers": "显示垂直标尺的列", "wordSeparators": "执行文字相关的导航或操作时将用作文字分隔符的字符", "tabSize": "一个制表符等于的空格数。该设置在 `editor.detectIndentation` 启用时根据文件内容进行重写。", - "tabSize.errorMessage": "应为 \\\\\"number\\\\\"。注意,值\\\\\"auto\\\\\"已由 \\\\\"editor.detectIndentation\\\\\" 设置替换。", + "tabSize.errorMessage": "应为“number”。注意,值“auto”已由“editor.detectIndentation”设置替换。", "insertSpaces": "按 \"Tab\" 时插入空格。该设置在 `editor.detectIndentation` 启用时根据文件内容进行重写。", "insertSpaces.errorMessage": "应为 \"boolean\"。注意,值 \"auto\" 已由 \"editor.detectIndentation\" 设置替换。", "detectIndentation": "当打开文件时,将基于文件内容检测 \"editor.tabSize\" 和 \"editor.insertSpaces\"。", "roundedSelection": "控制选取范围是否有圆角", "scrollBeyondLastLine": "控制编辑器是否可以滚动到最后一行之后", "minimap.enabled": "控制是否显示 minimap", + "minimap.showSlider": "控制是否自动隐藏迷你地图滑块。 ", "minimap.renderCharacters": "呈现某行上的实际字符(与颜色块相反)", "minimap.maxColumn": "限制最小映射的宽度,尽量多地呈现特定数量的列", + "find.seedSearchStringFromSelection": "控制是否将编辑器的选中内容作为搜索词填入到查找组件", + "find.autoFindInSelection": "控制当编辑器中选中多个字符或多行文字时是否开启“在选定内容中查找”选项 ", "wordWrap.off": "永不换行。", "wordWrap.on": "将在视区宽度处换行。", "wordWrap.wordWrapColumn": "将在 \"editor.wordWrapColumn\" 处换行。", "wordWrap.bounded": "将在最小视区和 \"editor.wordWrapColumn\" 处换行。", + "wordWrap": "控制折行方式。可以选择: - “off” (禁用折行), - “on” (视区折行), - “wordWrapColumn”(在“editor.wordWrapColumn”处折行)或 - “bounded”(在视区与“editor.wordWrapColumn”两者的较小者处折行)。", "wordWrapColumn": "在 \"editor.wordWrap\" 为 \"wordWrapColumn\" 或 \"bounded\" 时控制编辑器列的换行。", - "wrappingIndent": "控制换行的行的缩进。可以是\\\\\"none\\\\\"、 \\\\\"same\\\\\" 或 \\\\\"indent\\\\\"。", + "wrappingIndent": "控制折行的缩进。可以是“none”、“same”或“indent”。", "mouseWheelScrollSensitivity": "要对鼠标滚轮滚动事件的 \"deltaX\" 和 \"deltaY\" 使用的乘数 ", + "multiCursorModifier.ctrlCmd": "映射到“Control”(Windows 和 Linux)或“Command”(OSX)。", + "multiCursorModifier.alt": "映射到“Alt”(Windows 和 Linux)或“Option”(OSX)。", + "multiCursorModifier": "用鼠标添加多个光标时使用的修改键。“ctrlCmd”映射为“Control”(Windows 和 Linux)或“Command”(OSX)。“转到定义”和“打开链接”功能的鼠标手势将会相应调整,不与多光标修改键冲突。", "quickSuggestions.strings": "在字符串内启用快速建议。", "quickSuggestions.comments": "在注释内启用快速建议。", "quickSuggestions.other": "在字符串和注释外启用快速建议。", "quickSuggestions": "控制键入时是否应自动显示建议", "quickSuggestionsDelay": "控制延迟多少毫秒后将显示快速建议", - "parameterHints": "启用参数提示", + "parameterHints": "启用在输入时显示含有参数文档和类型信息的小面板", "autoClosingBrackets": "控制编辑器是否应该在左括号后自动插入右括号", "formatOnType": "控制编辑器是否应在键入后自动设置行的格式", "formatOnPaste": "控制编辑器是否应自动设置粘贴内容的格式。格式化程序必须可用并且能设置文档中某一范围的格式。", "suggestOnTriggerCharacters": "控制键入触发器字符时是否应自动显示建议", - "acceptSuggestionOnEnter": "控制除了 \"Tab\" 键以外,是否还应在遇到 \"Enter\" 键时接受建议。帮助避免“插入新行”或“接受建议”之间出现歧义。", + "acceptSuggestionOnEnter": "控制按“Enter”键是否像按“Tab”键一样接受建议。这能帮助避免“插入新行”和“接受建议”之间的歧义。值为“smart”时表示,仅当文字改变时,按“Enter”键才能接受建议", "acceptSuggestionOnCommitCharacter": "控制是否应在遇到提交字符时接受建议。例如,在 JavaScript 中,分号(\";\")可以为提交字符,可接受建议并键入该字符。", "snippetSuggestions": "控制是否将代码段与其他建议一起显示以及它们的排序方式。", "emptySelectionClipboard": "控制没有选择内容的复制是否复制当前行。", @@ -61,12 +69,18 @@ "renderLineHighlight": "控制编辑器应如何呈现当前行突出显示,可能为“无”、“装订线”、“线”和“全部”。", "codeLens": "控制编辑器是否显示代码滤镜", "folding": "控制编辑器是否启用代码折叠功能", + "showFoldingControls": "控制是否自动隐藏导航线上的折叠控件。", "matchBrackets": "当选择其中一项时,将突出显示匹配的括号。", "glyphMargin": "控制编辑器是否应呈现垂直字形边距。字形边距最常用于调试。", "useTabStops": "在制表位后插入和删除空格", "trimAutoWhitespace": "删除尾随自动插入的空格", "stablePeek": "即使在双击编辑器内容或按 Esc 键时,也要保持速览编辑器的打开状态。", "dragAndDrop": "控制编辑器是否应该允许通过拖放移动所选项。", + "accessibilitySupport.auto": "编辑器将使用平台 API 以检测是否附加了屏幕阅读器。", + "accessibilitySupport.on": "编辑器将对屏幕阅读器的使用进行永久优化。", + "accessibilitySupport.off": "编辑器将不再对屏幕阅读器的使用进行优化。", + "accessibilitySupport": "控制编辑器是否应运行在对屏幕阅读器进行优化的模式。", + "links": "控制编辑器是否应检测链接并使它们可被点击", "sideBySide": "控制 Diff 编辑器以并排或内联形式显示差异", "ignoreTrimWhitespace": "控制差异编辑器是否将对前导空格或尾随空格的更改显示为差异", "renderIndicators": "控制差异编辑器是否为已添加/删除的更改显示 +/- 指示符号", diff --git a/i18n/chs/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/chs/src/vs/editor/common/config/editorOptions.i18n.json new file mode 100644 index 0000000000000..fa32e6dd25278 --- /dev/null +++ b/i18n/chs/src/vs/editor/common/config/editorOptions.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "accessibilityOffAriaLabel": "现在无法访问编辑器。按 Alt+F1 显示选项。", + "editorViewAccessibleLabel": "编辑器内容" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/chs/src/vs/editor/common/view/editorColorRegistry.i18n.json index 0d70c92f50016..26da122b2d855 100644 --- a/i18n/chs/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/chs/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -4,11 +4,21 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "lineHighlight": "光标所在行高亮文本的背景颜色。", + "lineHighlight": "光标所在行高亮内容的背景颜色。", "lineHighlightBorderBox": "光标所在行四周边框的背景颜色。", "rangeHighlight": "突出显示范围的背景颜色,例如 \"Quick Open\" 和“查找”功能。", "caret": "编辑器光标颜色。", "editorWhitespaces": "编辑器中空白字符颜色。", "editorIndentGuides": "编辑器缩进参考线颜色。", - "editorLineNumbers": "编辑器行号颜色。" + "editorLineNumbers": "编辑器行号颜色。", + "editorRuler": "编辑器标尺的颜色。", + "editorCodeLensForeground": "编辑器 CodeLens 的前景色", + "editorBracketMatchBackground": "匹配括号的背景色", + "editorBracketMatchBorder": "匹配括号外框颜色", + "editorOverviewRulerBorder": "概览标尺边框的颜色。", + "editorGutter": "编辑器导航线的背景色。导航线包括边缘符号和行号。", + "errorForeground": "编辑器中错误波浪线的前景色。", + "errorBorder": "编辑器中错误波浪线的边框颜色。", + "warningForeground": "编辑器中警告波浪线的前景色。", + "warningBorder": "编辑器中警告波浪线的边框颜色。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/accessibility/browser/accessibility.i18n.json b/i18n/chs/src/vs/editor/contrib/accessibility/browser/accessibility.i18n.json index 714861ecdf6eb..94299c46f7be8 100644 --- a/i18n/chs/src/vs/editor/contrib/accessibility/browser/accessibility.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/accessibility/browser/accessibility.i18n.json @@ -6,10 +6,10 @@ { "introMsg": "感谢试用 VS Code 的辅助功能选项。", "status": "状态:", - "tabFocusModeOnMsg": "在当前编辑器中按 Tab 会将焦点移动到下一个可聚焦的元素。通过按 {0} 切换此行为。", + "tabFocusModeOnMsg": "在当前编辑器中按 Tab 会将焦点移动到下一个可聚焦的元素。按 {0} 来切换此行为。", "tabFocusModeOnMsgNoKb": "在当前编辑器中按 Tab 会将焦点移动到下一个可聚焦的元素。当前无法通过键绑定触发命令 {0}。", - "tabFocusModeOffMsg": "在当前编辑器中按 Tab 将插入制表符。通过按 {0} 切换此行为。", + "tabFocusModeOffMsg": "在当前编辑器中按 Tab 将插入制表符。按 {0} 来切换此行为。", "tabFocusModeOffMsgNoKb": "在当前编辑器中按 Tab 会插入制表符。当前无法通过键绑定触发命令 {0}。", - "outroMsg": "可以通过按 Esc 消除此工具提示并返回到编辑器。", + "outroMsg": "你可以按 Esc 键来消除此提示并返回到编辑器。", "ShowAccessibilityHelpAction": "显示辅助功能帮助" } \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json b/i18n/chs/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json index 11871e98a8070..3e76231776688 100644 --- a/i18n/chs/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json @@ -4,6 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "caret.moveLeft": "将脱字号向左移", - "caret.moveRight": "将脱字号向右移" + "caret.moveLeft": "将插入点左移", + "caret.moveRight": "将插入点右移" } \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/find/common/findController.i18n.json b/i18n/chs/src/vs/editor/contrib/find/common/findController.i18n.json index 0ae6f9d406d90..deae7b20954de 100644 --- a/i18n/chs/src/vs/editor/contrib/find/common/findController.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/find/common/findController.i18n.json @@ -14,6 +14,6 @@ "addSelectionToPreviousFindMatch": "将选择内容添加到上一查找匹配项", "moveSelectionToNextFindMatch": "将上次选择移动到下一个查找匹配项", "moveSelectionToPreviousFindMatch": "将上个选择内容移动到上一查找匹配项", - "selectAllOccurencesOfFindMatch": "选择所有找到的查找匹配项", + "selectAllOccurrencesOfFindMatch": "选择所有找到的查找匹配项", "changeAll.label": "更改所有匹配项" } \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/format/browser/formatActions.i18n.json b/i18n/chs/src/vs/editor/contrib/format/browser/formatActions.i18n.json index d1fd1741e7486..7a87ba778044c 100644 --- a/i18n/chs/src/vs/editor/contrib/format/browser/formatActions.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/format/browser/formatActions.i18n.json @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "hint11": "Made 1 formatting edit on line {0}", - "hintn1": "Made {0} formatting edits on line {1}", - "hint1n": "Made 1 formatting edit between lines {0} and {1}", - "hintnn": "Made {0} formatting edits between lines {1} and {2}", - "formatDocument.label": "Format Document", - "formatSelection.label": "Format Selection" + "hint11": "在第 {0} 行进行了 1 次格式编辑", + "hintn1": "在第 {1} 行进行了 {0} 次格式编辑", + "hint1n": "第 {0} 行到第 {1} 行间进行了 1 次格式编辑", + "hintnn": "第 {1} 行到第 {2} 行间进行了 {0} 次格式编辑", + "formatDocument.label": "格式化文件", + "formatSelection.label": "格式化选定代码" } \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..e788771d2f25a --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "未找到“{0}”的任何定义", + "generic.noResults": "找不到定义", + "meta.title": " – {0} 定义", + "actions.goToDecl.label": "转到定义", + "actions.goToDeclToSide.label": "打开侧边的定义", + "actions.previewDecl.label": "查看定义", + "goToImplementation.noResultWord": "未找到“{0}”的实现", + "goToImplementation.generic.noResults": "未找到实现", + "meta.implementations.title": "– {0} 个实现", + "actions.goToImplementation.label": "转到实现", + "actions.peekImplementation.label": "速览实现", + "goToTypeDefinition.noResultWord": "未找到“{0}”的类型定义", + "goToTypeDefinition.generic.noResults": "未找到类型定义", + "meta.typeDefinitions.title": " – {0} 个类型定义", + "actions.goToTypeDefinition.label": "转到类型定义", + "actions.peekTypeDefinition.label": "快速查看类型定义" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..ab0b4761cf9a4 --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "单击显示 {0} 个定义。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/hover/browser/hover.i18n.json b/i18n/chs/src/vs/editor/contrib/hover/browser/hover.i18n.json index 2d214d20aca7b..6591084448163 100644 --- a/i18n/chs/src/vs/editor/contrib/hover/browser/hover.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/hover/browser/hover.i18n.json @@ -4,8 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "showHover": "显示悬停", - "hoverHighlight": "在显示软键盘的字下方突出显示。", - "hoverBackground": "编辑器悬停的背景颜色。", - "hoverBorder": "编辑器软键盘边框颜色。" + "showHover": "显示悬停" } \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/indentation/common/indentation.i18n.json b/i18n/chs/src/vs/editor/contrib/indentation/common/indentation.i18n.json index 76fa4543d539d..5bd5906da321c 100644 --- a/i18n/chs/src/vs/editor/contrib/indentation/common/indentation.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/indentation/common/indentation.i18n.json @@ -8,7 +8,7 @@ "indentationToTabs": "将缩进转换为制表符", "configuredTabSize": "已配置制表符大小", "selectTabWidth": "选择当前文件的制表符大小", - "indentUsingTabs": "使用 \\\\\"Tab\\\\\" 缩进", + "indentUsingTabs": "使用“Tab”缩进", "indentUsingSpaces": "使用空格缩进", "detectIndentation": "检查内容中的缩进", "editor.reindentlines": "重新缩进行" diff --git a/i18n/chs/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json b/i18n/chs/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json index 59c62abf01c5b..346d11b670616 100644 --- a/i18n/chs/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json @@ -18,7 +18,7 @@ "lines.insertAfter": "在下面插入行", "lines.deleteAllLeft": "删除左侧所有内容", "lines.deleteAllRight": "删除右侧所有内容", - "lines.joinLines": "联接行", + "lines.joinLines": "合并行", "editor.transpose": "转置游标处的字符", "editor.transformToUppercase": "转换为大写", "editor.transformToLowercase": "转换为小写" diff --git a/i18n/chs/src/vs/editor/contrib/links/browser/links.i18n.json b/i18n/chs/src/vs/editor/contrib/links/browser/links.i18n.json index 345d85ddefa86..9e17ff5092c6a 100644 --- a/i18n/chs/src/vs/editor/contrib/links/browser/links.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/links/browser/links.i18n.json @@ -6,6 +6,7 @@ { "links.navigate.mac": "Cmd + 单击以跟踪链接", "links.navigate": "Ctrl + 单击以跟踪链接", + "links.navigate.al": "Alt + 单击以访问链接", "invalid.url": "抱歉,无法打开此链接,因为其格式不正确: {0}", "missing.url": "抱歉,无法打开此链接,因为其目标丢失。", "label": "打开链接" diff --git a/i18n/chs/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/chs/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index c0aa1adc88c76..710eeeefcfc87 100644 --- a/i18n/chs/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -4,6 +4,9 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "aria.oneReference": "在文件 {0} 的 {1} 行 {2} 列的符号", + "aria.fileReferences.1": "{0} 中有 1 个符号,完整路径:{1}", + "aria.fileReferences.N": "{1} 中有 {0} 个符号,完整路径:{2}", "aria.result.0": "未找到结果", "aria.result.1": "在 {0} 中找到 1 个符号", "aria.result.n1": "在 {1} 中找到 {0} 个符号", diff --git a/i18n/chs/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/chs/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index eb47c72700185..70e89645ee3d5 100644 --- a/i18n/chs/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -12,15 +12,16 @@ "noResults": "无结果", "peekView.alternateTitle": "引用", "peekViewTitleBackground": "速览视图标题区域背景颜色。", - "peekViewTitle": "速览视图标题颜色。", - "peekViewTitleInfo": "速览视图标题信息颜色。", + "peekViewTitleForeground": "速览视图标题颜色。", + "peekViewTitleInfoForeground": "速览视图标题信息颜色。", "peekViewBorder": "速览视图边框和箭头颜色。", "peekViewResultsBackground": "速览视图结果列表背景颜色。", - "peekViewResultsMatchForeground": "在速览视图结果列表中匹配条目前景色。", - "peekViewResultsFileForeground": "速览视图结果列表中的文件条目前景色。", + "peekViewResultsMatchForeground": "速览视图结果列表中行节点的前景色。", + "peekViewResultsFileForeground": "速览视图结果列表中文件节点的前景色。", "peekViewResultsSelectionBackground": "速览视图结果列表中所选条目的背景颜色。", "peekViewResultsSelectionForeground": "速览视图结果列表中所选条目的前景色。", "peekViewEditorBackground": "速览视图编辑器背景颜色。", + "peekViewEditorGutterBackground": "速览视图编辑器中导航线的背景颜色。", "peekViewResultsMatchHighlight": "在速览视图结果列表中匹配突出显示颜色。", "peekViewEditorMatchHighlight": "在速览视图编辑器中匹配突出显示颜色。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/rename/browser/rename.i18n.json b/i18n/chs/src/vs/editor/contrib/rename/browser/rename.i18n.json index f965e61027712..1f33c3d33d2ba 100644 --- a/i18n/chs/src/vs/editor/contrib/rename/browser/rename.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/rename/browser/rename.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "no result": "无结果。", + "aria": "成功将“{0}”重命名为“{1}”。摘要:{2}", "rename.failed": "抱歉,重命名无法执行。", "rename.label": "重命名符号" } \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json b/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json index 2f25ac5482136..ef3fe110728ff 100644 --- a/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "arai.alert.snippet": "确认“{0}”插入以下文本:{1}", "suggest.trigger.label": "触发建议" } \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 84279723b776b..ec34ba659f112 100644 --- a/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -4,10 +4,15 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "readMore": "阅读更多...{0}", + "editorSuggestWidgetBackground": "建议小组件的背景颜色", + "editorSuggestWidgetBorder": "建议小组件的边框颜色", + "editorSuggestWidgetForeground": "建议小组件的前景颜色。", + "editorSuggestWidgetSelectedBackground": "建议小组件中被选择条目的背景颜色。", + "editorSuggestWidgetHighlightForeground": "建议小组件中匹配内容的高亮颜色。", + "readMore": "阅读详细信息...{0}", "suggestionWithDetailsAriaLabel": "{0}(建议)具有详细信息", "suggestionAriaLabel": "{0},建议", - "goback": "返回", + "readLess": "阅读简略信息...{0}", "suggestWidget.loading": "正在加载...", "suggestWidget.noSuggestions": "无建议。", "suggestionAriaAccepted": "{0},已接受", diff --git a/i18n/chs/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json b/i18n/chs/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json index a64a607ad878c..897e74dff44a2 100644 --- a/i18n/chs/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "toggle.tabMovesFocus": "切换 Tab 键移动焦点" + "toggle.tabMovesFocus": "切换 Tab 键是否移动焦点" } \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/chs/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json index f588a8a158692..a4b09b5b447fa 100644 --- a/i18n/chs/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json +++ b/i18n/chs/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -15,5 +15,9 @@ "schema.brackets": "定义增加和减少缩进的括号。", "schema.autoClosingPairs": "定义括号对。当输入左方括号时,将自动插入右方括号。", "schema.autoClosingPairs.notIn": "定义禁用了自动配对的作用域列表。", - "schema.surroundingPairs": "定义可用于包围所选字符串的括号对。" + "schema.surroundingPairs": "定义可用于包围所选字符串的括号对。", + "schema.wordPattern": "此语言的文本定义。", + "schema.wordPattern.pattern": "用于匹配文本的正则表达式模式。", + "schema.wordPattern.flags": "用于匹配文本的正则表达式标志。", + "schema.wordPattern.flags.errorMessage": "必须匹配模式“/^([gimuy]+)$/”。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json index 0699d103832e2..2e644c790f621 100644 --- a/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json +++ b/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "requirearray": "菜单项必须为一个数组", + "requirestring": "属性“{0}”是必要属性,其类型必须是“string”", "optstring": "属性“{0}”可以被省略,否则其类型必须为“string”", "vscode.extension.contributes.menuItem.command": "要执行的命令的标识符。该命令必须在 \"commands\" 部分中声明", "vscode.extension.contributes.menuItem.alt": "要执行的替代命令的标识符。该命令必须在“命令”部分中声明", @@ -17,9 +18,11 @@ "menus.explorerContext": "文件资源管理器上下文菜单", "menus.editorTabContext": "编辑器选项卡上下文菜单", "menus.debugCallstackContext": "调试调用堆栈上下文菜单", - "menus.scmTitle": "源控件标题菜单", - "menus.resourceGroupContext": "源控件资源组上下文菜单", - "menus.resourceStateContext": "源控件资源状态上下文菜单", + "menus.scmTitle": "源代码管理标题菜单", + "menus.resourceGroupContext": "源代码管理资源组上下文菜单", + "menus.resourceStateContext": "源代码管理资源状态上下文菜单", + "view.viewTitle": "提供的视图的标题菜单", + "view.itemContext": "提供的视图中的项目的上下文菜单", "nonempty": "应为非空值。", "opticon": "可以省略属性“图标”或者它必须是一个字符串或类似“{dark, light}”的文本", "requireStringOrObject": "属性“{0}”为必需且其类型必须为“字符串”或“对象”", @@ -35,5 +38,6 @@ "menuId.invalid": "“{0}”为无效菜单标识符", "missing.command": "菜单项引用未在“命令”部分进行定义的命令“{0}”。", "missing.altCommand": "菜单项引用未在“命令”部分进行定义的 alt 命令“{0}”。", - "dupe.command": "菜单项引用与默认和 alt 命令相同的命令" + "dupe.command": "菜单项引用与默认和 alt 命令相同的命令", + "nosupport.altCommand": "抱歉,目前仅有“editor/title”菜单的“navigation”组支持 alt 命令" } \ No newline at end of file diff --git a/i18n/chs/src/vs/platform/configuration/common/configurationRegistry.i18n.json b/i18n/chs/src/vs/platform/configuration/common/configurationRegistry.i18n.json index ea616506b8e2c..ec9f20b7bad50 100644 --- a/i18n/chs/src/vs/platform/configuration/common/configurationRegistry.i18n.json +++ b/i18n/chs/src/vs/platform/configuration/common/configurationRegistry.i18n.json @@ -7,13 +7,6 @@ "defaultConfigurations.title": "默认配置替代", "overrideSettings.description": "针对 {0} 语言,配置替代编辑器设置。", "overrideSettings.defaultDescription": "针对某种语言,配置替代编辑器设置。", - "vscode.extension.contributes.configuration": "用于配置字符串。", - "vscode.extension.contributes.configuration.title": "设置摘要。此标签将在设置文件中用作分隔注释。", - "vscode.extension.contributes.configuration.properties": "配置属性的描述。", - "config.property.languageDefault": "无法注册“{0}”。这符合属性模式 \"\\\\[.*\\\\]$\",可用于描述特定语言编辑器设置。请使用 \"configurationDefaults\"。", - "config.property.duplicate": "无法注册“{0}”。此属性已注册。", - "invalid.properties": "configuration.properties 必须是对象", - "invalid.type": "如果进行设置,\"configuration.type\" 必须设置为对象", - "invalid.title": "configuration.title 必须是字符串", - "vscode.extension.contributes.defaultConfiguration": "按语言提供默认编辑器配置设置。" + "config.property.languageDefault": "无法注册“{0}”。其符合描述特定语言编辑器设置的表达式 \"\\\\[.*\\\\]$\"。请使用 \"configurationDefaults\"。", + "config.property.duplicate": "无法注册“{0}”。此属性已注册。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/platform/environment/node/argv.i18n.json b/i18n/chs/src/vs/platform/environment/node/argv.i18n.json index 7de2b4c533586..f5c7660b6175b 100644 --- a/i18n/chs/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/chs/src/vs/platform/environment/node/argv.i18n.json @@ -20,6 +20,7 @@ "showVersions": "使用 --list-extension 时,显示已安装扩展的版本。", "installExtension": "安装扩展。", "uninstallExtension": "卸载扩展。", + "experimentalApis": "启用扩展程序实验性 api 功能。", "disableExtensions": "禁用所有已安装的扩展。", "disableGPU": "禁用 GPU 硬件加速。", "version": "打印版本。", diff --git a/i18n/chs/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/chs/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index 2c8ade8f369fe..feafccf34519c 100644 --- a/i18n/chs/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/chs/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -14,6 +14,12 @@ "vscode.extension.contributes": "由此包表示的 VS Code 扩展的所有贡献。", "vscode.extension.preview": "在 Marketplace 中设置扩展,将其标记为“预览”。", "vscode.extension.activationEvents": "VS Code 扩展的激活事件。", + "vscode.extension.activationEvents.onLanguage": "在打开被解析为指定语言的文件时发出的激活事件。", + "vscode.extension.activationEvents.onCommand": "在调用指定命令时发出的激活事件。", + "vscode.extension.activationEvents.onDebug": "在指定类型的调试会话开始时发出的激活事件。", + "vscode.extension.activationEvents.workspaceContains": "在打开至少包含一个匹配指定 glob 模式的文件的文件夹时发出的激活事件。", + "vscode.extension.activationEvents.onView": "在指定视图被展开时发出的激活事件。", + "vscode.extension.activationEvents.star": "在 VS Code 启动时发出的激活事件。为确保良好的最终用户体验,请仅在其他激活事件组合不适用于你的情况时,才在扩展中使用此事件。", "vscode.extension.badges": "在 Marketplace 的扩展页边栏中显示的徽章数组。", "vscode.extension.badges.url": "徽章图像 URL。", "vscode.extension.badges.href": "徽章链接。", diff --git a/i18n/chs/src/vs/platform/extensions/node/extensionValidator.i18n.json b/i18n/chs/src/vs/platform/extensions/node/extensionValidator.i18n.json index 58daf0e1a2441..73890b4a095af 100644 --- a/i18n/chs/src/vs/platform/extensions/node/extensionValidator.i18n.json +++ b/i18n/chs/src/vs/platform/extensions/node/extensionValidator.i18n.json @@ -9,15 +9,15 @@ "versionSpecificity2": "\"engines.vscode\" ({0}) 中指定的版本不够具体。对于 1.0.0 之后的 vscode 版本,请至少定义主要想要的版本。例如: ^1.10.0、1.10.x、1.x.x、2.x.x 等。", "versionMismatch": "扩展与 Code {0} 不兼容。扩展需要: {1}。", "extensionDescription.empty": "已获得空扩展说明", - "extensionDescription.publisher": "属性“{0}”是必需的,其类型必须是“字符串”", - "extensionDescription.name": "属性“{0}”是必需的,其类型必须是“字符串”", - "extensionDescription.version": "属性“{0}”是必需的,其类型必须是“字符串”", - "extensionDescription.engines": "属性“{0}”为必需且其类型必须为 \"object\"", - "extensionDescription.engines.vscode": "属性“{0}”是必需的,其类型必须是“字符串”", - "extensionDescription.extensionDependencies": "属性“{0}”可以省略或其类型必须是 \"string[]\"", - "extensionDescription.activationEvents1": "属性“{0}”可以省略或其类型必须是 \"string[]\"", + "extensionDescription.publisher": "属性“{0}”是必要属性,其类型必须是 \"string\"", + "extensionDescription.name": "属性“{0}”是必要属性,其类型必须是 \"string\"", + "extensionDescription.version": "属性“{0}”是必要属性,其类型必须是 \"string\"", + "extensionDescription.engines": "属性“{0}”是必要属性,其类型必须是 \"object\"", + "extensionDescription.engines.vscode": "属性“{0}”是必要属性,其类型必须是 \"string\"", + "extensionDescription.extensionDependencies": "属性“{0}”可以省略,否则其类型必须是 \"string[]\"", + "extensionDescription.activationEvents1": "属性“{0}”可以省略,否则其类型必须是 \"string[]\"", "extensionDescription.activationEvents2": "必须同时指定或同时省略属性”{0}“和”{1}“", - "extensionDescription.main1": "属性“{0}”可以省略,或者其类型必须是“字符串”", + "extensionDescription.main1": "属性“{0}”可以省略,否则其类型必须是 \"string\"", "extensionDescription.main2": "应在扩展文件夹({1})中包含 \"main\" ({0})。这可能会使扩展不可移植。", "extensionDescription.main3": "必须同时指定或同时省略属性”{0}“和”{1}“", "notSemver": "扩展版本与 semver 不兼容。" diff --git a/i18n/chs/src/vs/platform/history/electron-main/historyMainService.i18n.json b/i18n/chs/src/vs/platform/history/electron-main/historyMainService.i18n.json new file mode 100644 index 0000000000000..61b499c3553c1 --- /dev/null +++ b/i18n/chs/src/vs/platform/history/electron-main/historyMainService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "newWindow": "新建窗口", + "newWindowDesc": "打开一个新窗口", + "recentFolders": "最近的文件夹", + "folderDesc": "{0} {1}" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/platform/keybinding/common/keybindingLabels.i18n.json b/i18n/chs/src/vs/platform/keybinding/common/keybindingLabels.i18n.json index 8fa747b0b99bd..0e97d8b37c301 100644 --- a/i18n/chs/src/vs/platform/keybinding/common/keybindingLabels.i18n.json +++ b/i18n/chs/src/vs/platform/keybinding/common/keybindingLabels.i18n.json @@ -8,9 +8,9 @@ "shiftKey": "Shift", "altKey": "Alt", "windowsKey": "Windows", - "ctrlKey.long": "控件", + "ctrlKey.long": "Control", "shiftKey.long": "Shift", "altKey.long": "Alt", - "cmdKey.long": "命令", + "cmdKey.long": "Command", "windowsKey.long": "Windows" } \ No newline at end of file diff --git a/i18n/chs/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/chs/src/vs/platform/markers/common/problemMatcher.i18n.json index 8a1380aeb6292..9926f27ea04be 100644 --- a/i18n/chs/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/chs/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -7,6 +7,7 @@ "ProblemPatternParser.loopProperty.notLast": "循环属性仅在最一个行匹配程序上受支持。", "ProblemPatternParser.problemPattern.missingRegExp": "问题模式缺少正则表达式。", "ProblemPatternParser.problemPattern.missingProperty": "问题模式无效。它必须至少包含一个文件、消息和行或位置匹配组。", + "ProblemPatternParser.invalidRegexp": "错误:字符串 {0} 不是有效的正则表达式。\n", "ProblemPatternSchema.regexp": "用于在输出中查找错误、警告或信息的正则表达式。", "ProblemPatternSchema.file": "文件名的匹配组索引。如果省略,则使用 1。", "ProblemPatternSchema.location": "问题位置的匹配组索引。有效的位置模式为(line)、(line,column)和(startLine,startColumn,endLine,endColumn)。如果省略了,将假定(line,column)。", @@ -27,11 +28,13 @@ "ProblemMatcherParser.noProblemPattern": "错误: 描述未定义有效的问题模式:\n{0}\n", "ProblemMatcherParser.noOwner": "错误: 描述未定义所有者:\n{0}\n", "ProblemMatcherParser.noFileLocation": "错误: 描述未定义文件位置:\n{0}\n", - "ProblemMatcherParser.noDefinedPatter": "错误: 含标识符 {0} 的模式不存在。", + "ProblemMatcherParser.unknownSeverity": "信息:未知严重性 {0}。有效值为“error”、“warning”和“info”。\n", + "ProblemMatcherParser.noDefinedPatter": "错误: 标识符为 {0} 的模式不存在。", "ProblemMatcherParser.noIdentifier": "错误: 模式属性引用空标识符。", "ProblemMatcherParser.noValidIdentifier": "错误: 模式属性 {0} 是无效的模式变量名。", "ProblemMatcherParser.problemPattern.watchingMatcher": "问题匹配程序必须定义监视的开始模式和结束模式。", - "WatchingPatternSchema.regexp": "用于检测监视任务的开始和结束的正则表达式。", + "ProblemMatcherParser.invalidRegexp": "错误: 字符串 {0} 不是有效的正则表达式。\n", + "WatchingPatternSchema.regexp": "用于检测后台任务开始或结束的正则表达式。", "WatchingPatternSchema.file": "文件名的匹配组索引。可以省略。", "PatternTypeSchema.name": "所提供或预定义模式的名称", "PatternTypeSchema.description": "问题模式或者所提供或预定义问题模式的名称。如果已指定基准,则可以省略。", @@ -40,14 +43,18 @@ "ProblemMatcherSchema.severity": "捕获问题的默认严重性。如果模式未定义严重性的匹配组,则使用。", "ProblemMatcherSchema.applyTo": "控制文本文档上报告的问题是否仅应用于打开、关闭或所有文档。", "ProblemMatcherSchema.fileLocation": "定义应如何解释问题模式中报告的文件名。", + "ProblemMatcherSchema.background": "用于跟踪在后台任务上激活的匹配程序的开始和结束的模式。", + "ProblemMatcherSchema.background.activeOnStart": "如果设置为 true,则会在任务开始时激活后台监控。这相当于发出与 beginPattern 匹配的行。", + "ProblemMatcherSchema.background.beginsPattern": "如果在输出内匹配,则会发出后台任务开始的信号。", + "ProblemMatcherSchema.background.endsPattern": "如果在输出内匹配,则会发出后台任务结束的信号。", + "ProblemMatcherSchema.watching.deprecated": "“watching”属性已被弃用。请改用“background”。", + "ProblemMatcherSchema.watching": "用于跟踪监视匹配程序开始和结束的模式。", "ProblemMatcherSchema.watching.activeOnStart": "如果设置为 true,则当任务开始时观察程序处于活动模式。这相当于发出与 beginPattern 匹配的行。", "ProblemMatcherSchema.watching.beginsPattern": "如果在输出内匹配,则在监视任务开始时会发出信号。", "ProblemMatcherSchema.watching.endsPattern": "如果在输出内匹配,则在监视任务结束时会发出信号。", - "ProblemMatcherSchema.watching": "用于跟踪观看模式开始和结束的模式。", "LegacyProblemMatcherSchema.watchedBegin.deprecated": "此属性已弃用。请改用观看属性。", "LegacyProblemMatcherSchema.watchedBegin": "一个正则表达式,发出受监视任务开始执行(通过文件监视触发)的信号。", "LegacyProblemMatcherSchema.watchedEnd.deprecated": "此属性已弃用。请改用观看属性。", "LegacyProblemMatcherSchema.watchedEnd": "一个正则表达式,发出受监视任务结束执行的信号。", - "NamedProblemMatcherSchema.name": "问题匹配程序的名称。", "ProblemMatcherExtPoint": "提供问题匹配程序" } \ No newline at end of file diff --git a/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json index df4685c01a5f9..b2e2b911b3880 100644 --- a/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -4,29 +4,84 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.color": "无效的颜色格式。请使用 #RRGGBB 或 #RRGGBBAA", + "invalid.color": "颜色格式无效。请使用 #RGB、#RGBA、#RRGGBB 或 #RRGGBBAA", "schema.colors": "工作台中使用的颜色。", "foreground": "整体前景色。此颜色仅在不被组件覆盖时适用。", - "focusedElementOutline": "重点元素的整体边框颜色。此颜色仅在不被组件覆盖时适用。", - "highContrastBorder": "启用高对比度主题时,用于分隔组件的边框颜色。", - "highContrastOutline": "启用高对比度主题时,活动组件的轮廓颜色。", + "errorForeground": "错误信息的整体前景色。此颜色仅在不被组件覆盖时适用。", + "descriptionForeground": "提供其他信息的说明文本的前景色,例如标签文本。", + "focusBorder": "焦点元素的整体边框颜色。此颜色仅在不被其他组件覆盖时适用。", + "contrastBorder": "在元素周围额外的一层边框,用来提高对比度从而区别其他元素。", + "activeContrastBorder": "在活动元素周围额外的一层边框,用来提高对比度从而区别其他元素。", + "selectionBackground": "工作台所选文本的背景颜色(例如输入字段或文本区域)。注意,本设置不适用于编辑器。", + "textSeparatorForeground": "文字分隔符的颜色。", + "textLinkForeground": "文本中链接的前景色。", + "textLinkActiveForeground": "文本中活动链接的前景色。", + "textPreformatForeground": "预格式化文本段的前景色。", + "textBlockQuoteBackground": "文本中块引用的背景颜色。", + "textBlockQuoteBorder": "文本中块引用的边框颜色。", + "textCodeBlockBackground": "文本中代码块的背景颜色。", + "widgetShadow": "编辑器内小组件(如查找/替换)的阴影颜色。", "inputBoxBackground": "输入框背景色。", "inputBoxForeground": "输入框前景色。", "inputBoxBorder": "输入框边框。", "inputBoxActiveOptionBorder": "输入字段中已激活选项的边框颜色。", + "inputPlaceholderForeground": "输入框中占位符的前景色。", + "inputValidationInfoBackground": "严重性为信息时输入验证的背景颜色。", + "inputValidationInfoBorder": "严重性为信息时输入验证的边框颜色。", + "inputValidationWarningBackground": "严重性为警告时输入验证的背景颜色。", + "inputValidationWarningBorder": "严重性为警告时输入验证的边框颜色。", + "inputValidationErrorBackground": "严重性为错误时输入验证的背景颜色。", + "inputValidationErrorBorder": "严重性为错误时输入验证的边框颜色。", "dropdownBackground": "下拉列表背景色。", "dropdownForeground": "下拉列表前景色。", "dropdownBorder": "下拉列表边框。", + "listFocusBackground": "焦点项在列表或树活动时的背景颜色。活动的列表或树具有键盘焦点,非活动的没有。", + "listFocusForeground": "焦点项在列表或树活动时的背景颜色。活动的列表或树具有键盘焦点,非活动的没有。", + "listActiveSelectionBackground": "已选项在列表或树活动时的背景颜色。活动的列表或树具有键盘焦点,非活动的没有。", + "listActiveSelectionForeground": "已选项在列表或树活动时的前景颜色。活动的列表或树具有键盘焦点,非活动的没有。", + "listInactiveSelectionBackground": "已选项在列表或树非活动时的背景颜色。活动的列表或树具有键盘焦点,非活动的没有。", + "listInactiveSelectionForeground": "已选项在列表或树非活动时的前景颜色。活动的列表或树具有键盘焦点,非活动的没有。", + "listHoverBackground": "使用鼠标移动项目时,列表或树的背景颜色。", + "listHoverForeground": "鼠标在项目上悬停时,列表或树的前景颜色。", + "listDropBackground": "使用鼠标移动项目时,列表或树进行拖放的背景颜色。", + "highlight": "在列表或树中搜索时,其中匹配内容的高亮颜色。", + "pickerGroupForeground": "快速选取器分组标签的颜色。", + "pickerGroupBorder": "快速选取器分组边框的颜色。", + "buttonForeground": "按钮前景色。", + "buttonBackground": "按钮背景色。", + "buttonHoverBackground": "按钮在悬停时的背景颜色。", + "badgeBackground": "Badge 背景色。Badge 是小型的信息标签,如表示搜索结果数量的标签。", + "badgeForeground": "Badge 前景色。Badge 是小型的信息标签,如表示搜索结果数量的标签。", + "scrollbarShadow": "表示视图被滚动的滚动条阴影。", + "scrollbarSliderBackground": "滑块的背景颜色。", + "scrollbarSliderHoverBackground": "滑块在悬停时的背景颜色。", + "scrollbarSliderActiveBackground": "滑块在活动的背景颜色。", + "progressBarBackground": "表示长时间操作的进度条的背景色。", "editorBackground": "编辑器背景颜色。", "editorForeground": "编辑器默认前景色。", - "editorSelection": "编辑器所选内容的颜色。", + "editorWidgetBackground": "编辑器组件(如查找/替换)背景颜色。", + "editorWidgetBorder": "编辑器小部件的边框颜色。此颜色仅在小部件有边框且不被小部件重写时适用。", "editorInactiveSelection": "非活动编辑器中所选内容的颜色。", "editorSelectionHighlight": "与所选内容具有相同内容的区域颜色。", "editorFindMatch": "当前搜索匹配项的颜色。", "findMatchHighlight": "其他搜索匹配项的颜色。", "findRangeHighlight": "限制搜索的范围的颜色。", + "hoverHighlight": "悬停提示显示时文本底下的高亮颜色。", + "hoverBackground": "编辑器悬停提示的背景颜色。", + "hoverBorder": "光标悬停时编辑器的边框颜色。", "activeLinkForeground": "活动链接颜色。", - "linkForeground": "链接颜色。", - "editorWidgetBackground": "编辑器组件(如查找/替换)背景颜色。", - "editorWidgetShadow": "编辑器组件(如查找/替换)阴影颜色。" + "diffEditorInserted": "已插入文本的背景颜色。", + "diffEditorRemoved": "被删除文本的背景颜色。", + "diffEditorInsertedOutline": "插入的文本的轮廓颜色。", + "diffEditorRemovedOutline": "被删除文本的轮廓颜色。", + "mergeCurrentHeaderBackground": "内联合并冲突中当前版本区域的标头背景色。", + "mergeCurrentContentBackground": "内联合并冲突中当前版本区域的内容背景色。", + "mergeIncomingHeaderBackground": "内联合并冲突中传入的版本区域的标头背景色。", + "mergeIncomingContentBackground": "内联合并冲突中传入的版本区域的内容背景色。", + "mergeCommonHeaderBackground": "内联合并冲突中共同祖先区域的标头背景色。", + "mergeCommonContentBackground": "内联合并冲突中共同祖先区域的内容背景色。", + "mergeBorder": "内联合并冲突中标头和分割线的边框颜色。", + "overviewRulerCurrentContentForeground": "内联合并冲突中当前版本区域的概览标尺前景色。", + "overviewRulerIncomingContentForeground": "内联合并冲突中传入的版本区域的概览标尺前景色。", + "overviewRulerCommonContentForeground": "内联合并冲突中共同祖先区域的概览标尺前景色。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/chs/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json new file mode 100644 index 0000000000000..1b83e2539f407 --- /dev/null +++ b/i18n/chs/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "overwritingExtension": "使用扩展程序 {1} 覆盖扩展程序 {0}。", + "extensionUnderDevelopment": "正在 {0} 处加载开发扩展程序" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/chs/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json new file mode 100644 index 0000000000000..d95075ca825b8 --- /dev/null +++ b/i18n/chs/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "关闭", + "cancel": "取消", + "ok": "确定" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/api/node/extHostExplorerView.i18n.json b/i18n/chs/src/vs/workbench/api/node/extHostExplorerView.i18n.json new file mode 100644 index 0000000000000..dc7534a706017 --- /dev/null +++ b/i18n/chs/src/vs/workbench/api/node/extHostExplorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "没有注册 ID 为“{0}”的 TreeExplorerNodeProvider。", + "treeExplorer.failedToProvideRootNode": "TreeExplorerNodeProvider“{0}”无法提供根节点。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/chs/src/vs/workbench/api/node/extHostTask.i18n.json new file mode 100644 index 0000000000000..4b90a12aaf247 --- /dev/null +++ b/i18n/chs/src/vs/workbench/api/node/extHostTask.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "task.label": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/api/node/extHostTreeView.i18n.json b/i18n/chs/src/vs/workbench/api/node/extHostTreeView.i18n.json new file mode 100644 index 0000000000000..dc7534a706017 --- /dev/null +++ b/i18n/chs/src/vs/workbench/api/node/extHostTreeView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "没有注册 ID 为“{0}”的 TreeExplorerNodeProvider。", + "treeExplorer.failedToProvideRootNode": "TreeExplorerNodeProvider“{0}”无法提供根节点。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/chs/src/vs/workbench/api/node/extHostTreeViews.i18n.json new file mode 100644 index 0000000000000..7bfb0b886ded6 --- /dev/null +++ b/i18n/chs/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeView.notRegistered": "没有注册 ID 为“{0}”的树形图。", + "treeItem.notFound": "没有在树中找到 ID 为“{0}”的项目。", + "treeView.duplicateElement": "已注册元素 {0}。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/browser/actions/configureLocale.i18n.json b/i18n/chs/src/vs/workbench/browser/actions/configureLocale.i18n.json index 37269b60c8f66..c8f8f1edc8f30 100644 --- a/i18n/chs/src/vs/workbench/browser/actions/configureLocale.i18n.json +++ b/i18n/chs/src/vs/workbench/browser/actions/configureLocale.i18n.json @@ -7,7 +7,7 @@ "configureLocale": "配置语言", "displayLanguage": "定义 VSCode 的显示语言。", "doc": "请参阅 {0},了解支持的语言列表。", - "restart": "要更改值需要重启 VSCode。", + "restart": "更改此值需要重启 VSCode。", "fail.createSettings": "无法创建“{0}”({1})。", "JsonSchema.locale": "要使用的 UI 语言。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/browser/actions/fileActions.i18n.json b/i18n/chs/src/vs/workbench/browser/actions/fileActions.i18n.json index a6924ebdfa7b1..37e6e574bb870 100644 --- a/i18n/chs/src/vs/workbench/browser/actions/fileActions.i18n.json +++ b/i18n/chs/src/vs/workbench/browser/actions/fileActions.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "openFolder": "打开文件夹...", - "openFileFolder": "打开..." + "openFileFolder": "打开...", + "add": "添加" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json b/i18n/chs/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json index 29e014471dace..9b17b8e657258 100644 --- a/i18n/chs/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json +++ b/i18n/chs/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "hideActivitBar": "隐藏活动栏", - "activityBarAriaLabel": "活动视图切换器" + "activityBarAriaLabel": "活动视图切换器", + "globalActions": "全局动作" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/chs/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index b2df0032ff4a9..c2d34737a9106 100644 --- a/i18n/chs/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/chs/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -5,7 +5,7 @@ // Do not edit this file. It is machine generated. { "splitEditor": "拆分编辑器", - "joinTwoGroups": "联接两个组的编辑器", + "joinTwoGroups": "合并两个组的编辑器", "navigateEditorGroups": "在编辑器组间进行导航", "focusActiveEditorGroup": "聚焦活动编辑器组", "focusFirstEditorGroup": "聚焦于第一个编辑器组", @@ -19,6 +19,7 @@ "closeEditorsToTheLeft": "关闭左侧编辑器", "closeEditorsToTheRight": "关闭右侧编辑器", "closeAllEditors": "关闭所有编辑器", + "closeUnmodifiedEditors": "关闭组中未作更改的编辑器", "closeEditorsInOtherGroups": "关闭其他组中的编辑器", "closeOtherEditorsInGroup": "关闭其他编辑器", "closeEditorsInGroup": "关闭组中的所有编辑器", @@ -44,6 +45,8 @@ "openPreviousRecentlyUsedEditorInGroup": "打开组中上一个最近使用的编辑器", "openNextRecentlyUsedEditorInGroup": "打开组中下一个最近使用的编辑器", "navigateEditorHistoryByInput": "从历史记录里打开上一个编辑器", + "openNextRecentlyUsedEditor": "打开下一个最近使用的编辑器", + "openPreviousRecentlyUsedEditor": "打开上一个最近使用的编辑器", "clearEditorHistory": "清除编辑器历史记录", "focusLastEditorInStack": "打开组中上一个编辑器", "moveEditorLeft": "向左移动编辑器", diff --git a/i18n/chs/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/chs/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index 7f7594d784a0a..0b7d6bc441e3b 100644 --- a/i18n/chs/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/chs/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -11,6 +11,8 @@ "endOfLineLineFeed": "LF", "endOfLineCarriageReturnLineFeed": "CRLF", "tabFocusModeEnabled": "按 Tab 移动焦点", + "screenReaderDetected": "检测到屏幕阅读器", + "screenReaderDetectedExtra": "如果你没有使用屏幕阅读器,请将设置中的“editor.accessibilitySupport”改为“off”。", "disableTabMode": "禁用辅助功能模式", "gotoLine": "转到行", "indentation": "缩进", diff --git a/i18n/chs/src/vs/workbench/browser/parts/editor/titleControl.i18n.json b/i18n/chs/src/vs/workbench/browser/parts/editor/titleControl.i18n.json index 33c78c3b91123..63726f327651d 100644 --- a/i18n/chs/src/vs/workbench/browser/parts/editor/titleControl.i18n.json +++ b/i18n/chs/src/vs/workbench/browser/parts/editor/titleControl.i18n.json @@ -8,6 +8,7 @@ "closeOthers": "关闭其他", "closeRight": "关闭到右侧", "closeAll": "全部关闭", + "closeAllUnmodified": "关闭未更改的", "keepOpen": "保持打开状态", "showOpenedEditors": "显示打开的编辑器", "araLabelEditorActions": "编辑器操作" diff --git a/i18n/chs/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json b/i18n/chs/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json new file mode 100644 index 0000000000000..04188ac2f7920 --- /dev/null +++ b/i18n/chs/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpen": "转到文件...", + "quickNavigateNext": "在 Quick Open 中导航到下一个", + "quickNavigatePrevious": "在 Quick Open 中导航到上一个", + "quickSelectNext": "在 Quick Open 中选择“下一步”", + "quickSelectPrevious": "在 Quick Open 中选择“上一步”" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/browser/quickopen.i18n.json b/i18n/chs/src/vs/workbench/browser/quickopen.i18n.json index 5df82e1051da1..949f6468fc28c 100644 --- a/i18n/chs/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/chs/src/vs/workbench/browser/quickopen.i18n.json @@ -6,6 +6,5 @@ { "noResultsMatching": "没有匹配的结果", "noResultsFound2": "未找到结果", - "entryAriaLabel": "{0},命令", - "noCommands": "没有匹配的命令" + "entryAriaLabel": "{0},命令" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/browser/viewlet.i18n.json b/i18n/chs/src/vs/workbench/browser/viewlet.i18n.json index 9f0c295e5f27e..6f2dfb7174db7 100644 --- a/i18n/chs/src/vs/workbench/browser/viewlet.i18n.json +++ b/i18n/chs/src/vs/workbench/browser/viewlet.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "collapse": "全部折叠", - "viewToolbarAriaLabel": "{0} 操作" + "collapse": "全部折叠" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/common/theme.i18n.json b/i18n/chs/src/vs/workbench/common/theme.i18n.json index 8cd936efa7a68..eba91d16d2022 100644 --- a/i18n/chs/src/vs/workbench/common/theme.i18n.json +++ b/i18n/chs/src/vs/workbench/common/theme.i18n.json @@ -4,40 +4,58 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "tabsContainerBackground": "选项卡容器的边框颜色。选项卡是编辑器区域中编辑器的容器。可在一个编辑器组中打开多个选项卡。可以存在多个编辑器组。", - "activeTabBackground": "活动选项卡的背景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", - "inactiveTabBackground": "非活动选项卡的背景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", - "activeTabActiveGroupForeground": "活动组中活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", - "activeTabInactiveGroupForeground": "非活动组中活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", - "inactiveTabActiveGroupForeground": "活动组中非活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", - "inactiveTabInactiveGroupForeground": "非活动组中非活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", + "tabActiveBackground": "活动选项卡的背景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", + "tabInactiveBackground": "非活动选项卡的背景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", "tabBorder": "用于将选项卡彼此分隔开的边框。选项卡是编辑器区域中编辑器的容器。可在一个编辑器组中打开多个选项卡。可以存在多个编辑器组。", - "editorHeaderBackground": "未启用任何选项卡的情况下,编辑器标题标头的背景颜色。", + "tabActiveForeground": "活动组中活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", + "tabInactiveForeground": "活动组中非活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", + "tabUnfocusedActiveForeground": "非活动组中活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", + "tabUnfocusedInactiveForeground": "非活动组中非活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", + "editorGroupBackground": "编辑器组的背景颜色。编辑器组是编辑器的容器。此颜色在拖动编辑器组时显示。", + "tabsContainerBackground": "启用选项卡时编辑器组标题的背景颜色。编辑器组是编辑器的容器。", + "tabsContainerBorder": "选项卡启用时编辑器组标题的边框颜色。编辑器组是编辑器的容器。", + "editorGroupHeaderBackground": "禁用选项卡时编辑器组标题的背景颜色。编辑器组是编辑器的容器。", "editorGroupBorder": "将多个编辑器组彼此分隔开的颜色。编辑器组是编辑器的容器。", - "editorGroupBackground": "编辑器组的背景颜色。编辑器组是编辑器的容器。", - "editorDragAndDropBackground": "随意拖动编辑器时的背景色。", - "editorSideBySideBorder": "用于将并排编辑器的详细信息与主边栏分隔开的边框颜色。", + "editorDragAndDropBackground": "拖动编辑器时的背景颜色。此颜色应有透明度,以便编辑器内容能透过背景。", "panelBackground": "面板的背景色。面板显示在编辑器区域下方,可包含输出和集成终端等视图。", - "panelTopBorder": "分隔到编辑器的顶部面板边框色。面板显示在编辑器区域下方,可包含输出和集成终端等视图。", + "panelBorder": "分隔到编辑器的顶部面板边框色。面板显示在编辑器区域下方,可包含输出和集成终端等视图。", "panelActiveTitleForeground": "活动面板的标题颜色。面板显示在编辑器区域下方,并包含输出和集成终端等视图。", "panelInactiveTitleForeground": "非活动面板的标题颜色。面板显示在编辑器区域下方,并包含输出和集成终端等视图。", - "panelActiveTitleBorder": "活动面板标题的边框颜色。面板显示在编辑器区域下方,并包含输出和集成终端等视图。", + "panelActiveTitleBorder": "活动面板的边框颜色。面板显示在编辑器区域下方,包含输出和集成终端等视图。", "statusBarForeground": "状态栏前景色。状态栏显示在窗口底部。", "statusBarBackground": "标准状态栏背景色。状态栏显示在窗口底部。", + "statusBarBorder": "状态栏分隔侧边栏和编辑器的边框颜色。状态栏显示在窗口底部。", "statusBarNoFolderBackground": "没有打开文件夹时状态栏的背景色。状态栏显示在窗口底部。", + "statusBarNoFolderForeground": "没有打开文件夹时状态栏的前景色。状态栏显示在窗口底部。", "statusBarItemActiveBackground": "单击时的状态栏项背景色。状态栏显示在窗口底部。", "statusBarItemHoverBackground": "悬停时的状态栏项背景色。状态栏显示在窗口底部。", - "statusBarInfoItemBackground": "状态栏信息项背景色。状态栏显示在窗口底部。", - "statusBarInfoItemHoverBackground": "悬停时的状态栏信息项背景色。状态栏显示在窗口底部。", + "statusBarProminentItemBackground": "状态栏突出显示项的背景颜色。突出显示项比状态栏中的其他条目更显眼,表明其重要性更高。状态栏显示在窗口底部。", + "statusBarProminentItemHoverBackground": "状态栏突出显示项在悬停时的背景颜色。突出显示项比状态栏中的其他条目更显眼,表明其重要性更高。状态栏显示在窗口底部。", "activityBarBackground": "活动栏背景色。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", "activityBarForeground": "活动栏前景色(例如用于图标)。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", - "activityBarDragAndDropBackground": "拖放活动栏项的反馈颜色。 活动栏显示在最左侧或最右侧,并允许在侧边栏视图之间切换。", - "activityBadgeBackground": "活动通知提醒背景颜色。活动栏显示在最左侧或最右侧,并允许在侧边栏视图之间切换。", - "activityBadgeForeground": "活动通知提醒前景色。活动栏显示在最左侧或最右侧,并允许在侧边栏视图之间切换。", + "activityBarBorder": "活动栏分隔侧边栏的边框颜色。活动栏显示在最左侧或最右侧,并可以切换侧边栏的视图。", + "activityBarDragAndDropBackground": "活动栏项在被拖放时的反馈颜色。此颜色应有透明度,以便活动栏条目能透过此颜色。活动栏显示在最左侧或最右侧,并允许在侧边栏视图之间切换。", + "activityBarBadgeBackground": "活动通知徽章背景色。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", + "activityBarBadgeForeground": "活动通知徽章前景色。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", "sideBarBackground": "侧边栏背景色。侧边栏是资源管理器和搜索等视图的容器。", + "sideBarForeground": "侧边栏前景色。侧边栏是资源管理器和搜索等视图的容器。", + "sideBarBorder": "侧边栏分隔编辑器的边框颜色。侧边栏包含资源管理器、搜索等视图。", "sideBarTitleForeground": "侧边栏标题前景色。侧边栏是资源管理器和搜索等视图的容器。", + "sideBarSectionHeaderBackground": "侧边栏节标题的背景颜色。侧边栏是资源管理器和搜索等视图的容器。", + "sideBarSectionHeaderForeground": "侧边栏节标题的前景色。侧边栏包括资源管理器、搜索等视图。", "titleBarActiveForeground": "窗口处于活动状态时的标题栏前景色。请注意,该颜色当前仅在 macOS 上受支持。", "titleBarInactiveForeground": "窗口处于非活动状态时的标题栏前景色。请注意,该颜色当前仅在 macOS 上受支持。", "titleBarActiveBackground": "窗口处于活动状态时的标题栏背景色。请注意,该颜色当前仅在 macOS 上受支持。", - "titleBarInactiveBackground": "窗口处于非活动状态时的标题栏背景色。请注意,该颜色当前仅在 macOS 上受支持。" + "titleBarInactiveBackground": "窗口处于非活动状态时的标题栏背景色。请注意,该颜色当前仅在 macOS 上受支持。", + "notificationsForeground": "通知前景色。通知从窗口顶部滑入。", + "notificationsBackground": "通知背颜色。通知从窗口顶部滑入。", + "notificationsButtonBackground": "通知按钮背景色。通知从窗口顶部滑入。", + "notificationsButtonHoverBackground": "悬停时的通知按钮背景色。通知从窗口顶部滑入。", + "notificationsButtonForeground": "通知按钮前景色。通知从窗口顶部滑入。", + "notificationsInfoBackground": "消息通知背景色。通知从窗口顶部滑入。", + "notificationsInfoForeground": "消息通知前景色。通知从窗口顶部滑入。", + "notificationsWarningBackground": "警告通知背颜色。通知从窗口顶部滑入。", + "notificationsWarningForeground": "警告通知前景色。通知从窗口顶部滑入。", + "notificationsErrorBackground": "错误通知背景色。通知从窗口顶部滑入。", + "notificationsErrorForeground": "错误通知前景色。通知从窗口顶部滑入。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/chs/src/vs/workbench/electron-browser/actions.i18n.json index 7ee775d592ca3..cbe66a7ca66d9 100644 --- a/i18n/chs/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/chs/src/vs/workbench/electron-browser/actions.i18n.json @@ -6,9 +6,6 @@ { "closeActiveEditor": "关闭编辑器", "closeWindow": "关闭窗口", - "switchWindow": "切换窗口", - "switchWindowPlaceHolder": "选择窗口", - "current": "当前窗口", "closeFolder": "关闭文件夹", "noFolderOpened": "此实例中没有要关闭的已打开文件夹。", "newWindow": "新建窗口", @@ -20,22 +17,28 @@ "zoomReset": "重置缩放", "appPerf": "启动性能", "reloadWindow": "重新加载窗口", - "openRecent": "打开最近的文件", + "switchWindowPlaceHolder": "选择切换的窗口", + "current": "当前窗口", + "switchWindow": "切换窗口...", + "quickSwitchWindow": "快速切换窗口...", "folders": "文件夹", "files": "文件", "openRecentPlaceHolderMac": "选择路径(在新窗口中按住 Cmd 键打开)", "openRecentPlaceHolder": "选择要打开的路径(在新窗口中按住 Ctrl 键打开)", + "openRecent": "打开最近的文件…", + "quickOpenRecent": "快速打开最近的文件…", "closeMessages": "关闭通知消息", "reportIssues": "报告问题", "reportPerformanceIssue": "报告性能问题", "keybindingsReference": "键盘快捷方式参考", "openDocumentationUrl": "文档", "openIntroductoryVideosUrl": "入门视频", + "openTipsAndTricksUrl": "提示与技巧", "toggleSharedProcess": "切换共享进程", - "navigateLeft": "移动到左侧的视图部分", - "navigateRight": "移动到右侧的视图部分", - "navigateUp": "移动到上方的视图部分", - "navigateDown": "移动到下方的视图部分", + "navigateLeft": "导航到左侧视图", + "navigateRight": "导航到右侧视图", + "navigateUp": "导航到上方视图", + "navigateDown": "导航到下方视图", "increaseViewSize": "增加当前视图大小", "decreaseViewSize": "减小当前视图大小" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/electron-browser/extensionHost.i18n.json b/i18n/chs/src/vs/workbench/electron-browser/extensionHost.i18n.json index 1ce1b1f29a7c9..2f9f1e433c18e 100644 --- a/i18n/chs/src/vs/workbench/electron-browser/extensionHost.i18n.json +++ b/i18n/chs/src/vs/workbench/electron-browser/extensionHost.i18n.json @@ -7,5 +7,6 @@ "extensionHostProcess.startupFailDebug": "扩展未在 10 秒内启动,可能在第一行已停止,需要调试器才能继续。", "extensionHostProcess.startupFail": "扩展主机未在 10 秒内启动,这可能是一个问题。", "extensionHostProcess.error": "扩展主机中的错误: {0}", + "devTools": "开发人员工具", "extensionHostProcess.crash": "扩展主机意外终止。请重新加载窗口以恢复。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/chs/src/vs/workbench/electron-browser/main.contribution.i18n.json index ee33fc5f24367..acc882f1d20a4 100644 --- a/i18n/chs/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,6 +7,7 @@ "view": "查看", "help": "帮助", "file": "文件", + "developer": "开发者", "showEditorTabs": "控制打开的编辑器是否显示在选项卡中。", "editorTabCloseButton": "控制编辑器的选项卡关闭按钮的位置,或当设置为 \"off\" 时禁用关闭它们。", "showIcons": "控制打开的编辑器是否随图标一起显示。这还需启用图标主题。", @@ -14,6 +15,8 @@ "enablePreviewFromQuickOpen": "控制 Quick Open 中打开的编辑器是否显示为预览。预览编辑器可以重新使用,直到将其保留(例如,通过双击或编辑)。", "editorOpenPositioning": "控制打开编辑器的位置。选择“左侧”或“右侧”以在当前活动位置的左侧或右侧打开编辑器。选择“第一个”或“最后一个”以从当前活动位置独立打开编辑器。", "revealIfOpen": "控制打开时编辑器是否显示在任何可见组中。如果禁用,编辑器会优先在当前活动编辑器组中打开。如果启用,会显示已打开的编辑器而不是在当前活动编辑器组中再次打开。请注意,有些情况下会忽略此设置,例如强制编辑器在特定组中或在当前活动组的边侧打开时。", + "commandHistory": "控制命令面板中保留最近使用命令的数量。设置为 0 则禁用命令历史记录。", + "preserveInput": "控制是否在再次打开命令面板时恢复上一次的输入内容。", "closeOnFocusLost": "控制 Quick Open 是否应在失去焦点时自动关闭。", "openDefaultSettings": "控制打开设置时是否打开显示所有默认设置的编辑器。", "sideBarLocation": "控制边栏的位置。它可显示在工作台的左侧或右侧。", @@ -30,23 +33,24 @@ "window.openFoldersInNewWindow.off": "文件夹将替换上一个活动窗口", "window.openFoldersInNewWindow.default": "文件夹在新窗口中打开,除非从应用程序内选取一个文件夹(例如,通过“文件”菜单)", "openFoldersInNewWindow": "控制文件夹应在新窗口中打开还是替换上一活动窗口。\n- default: 文件夹将在新窗口中打开,除非文件是从应用程序内选取的(例如通过“文件”菜单)\n- on: 文件夹将在新窗口中打开\n- off: 文件夹将替换上一活动窗口\n注意,可能仍会存在忽略此设置的情况(例如当使用 -new-window 或 -reuse-window 命令行选项时)。", - "window.reopenFolders.none": "永不重新打开文件夹。", - "window.reopenFolders.one": "重新打开上一个活动文件夹。", - "window.reopenFolders.all": "重新打开上一个会话的所有文件夹。", - "reopenFolders": "控制重启后重新打开文件夹的方式。选择“none”表示永不重新打开文件夹,选择“one”表示重新打开最后使用的一个文件夹,或选择“all”表示打开上次会话的所有文件夹。", + "window.reopenFolders.all": "重新打开所有窗口。", + "window.reopenFolders.folders": "重新打开所有文件夹。空窗口将不会被恢复。", + "window.reopenFolders.one": "重新打开上一个活动窗口。", + "window.reopenFolders.none": "永远不重新打开窗口。总是以一个空窗口启动。", + "restoreWindows": "控制重启后重新打开窗口的方式。选择“none”则永远在启动时打开一个空窗口;选择“one”则重新打开最后使用的窗口;选择“folders”则重新打开所有你曾打开的文件夹;或选择“all”则重新打开上次会话的所有窗口。", "restoreFullscreen": "如果窗口已退出全屏模式,控制其是否应还原为全屏模式。", "zoomLevel": "调整窗口的缩放级别。原始大小是 0,每次递增(例如 1)或递减(例如 -1)表示放大或缩小 20%。也可以输入小数以便以更精细的粒度调整缩放级别。", - "title": "基于活动编辑器控制窗口标题。基于上下文替换变量:\n${activeEditorShort}: 例如 myFile.txt\n${activeEditorMedium}:例如 myFolder/myFile.txt\n${activeEditorLong}: 例如 /Users/Development/myProject/myFolder/myFile.txt\n${rootName}: 例如 myProject\n${rootPath}: 例如 /Users/Development/myProject\n${appName}: 例如 VS Code\n${dirty}: 一个更新指示器,指示活动编辑器是否更新\n${separator}: 一个条件分隔符(\"-\"),仅在左右是具有值的变量时才显示", "window.newWindowDimensions.default": "在屏幕中心打开新窗口。", "window.newWindowDimensions.inherit": "以与上一个活动窗口相同的尺寸打开新窗口。", "window.newWindowDimensions.maximized": "打开最大化的新窗口。", "window.newWindowDimensions.fullscreen": "在全屏模式下打开新窗口。", - "newWindowDimensions": "控制打开新窗口的尺寸。默认情况下,新窗口将以小尺寸在屏幕的中央打开。当设置为 \"inherit\" 时,窗口将获取与上一活动窗口相同的尺寸。当设置为 \"maximized\" 时,窗口将以最大化形式打开,如果配置为 \"fullscreen\",窗口将以全屏形式打开。", + "newWindowDimensions": "控制在已有窗口时新打开窗口的尺寸。默认情况下,新窗口将以小尺寸在屏幕的中央打开。当设置为“inherit”时,新窗口将继承上一活动窗口的尺寸,设置为“maximized”时窗口将被最大化,设置为“fullscreen”时则变为全屏。请注意,此设置对第一个打开的窗口无效。第一个窗口总是会恢复关闭前的大小和位置。", "window.menuBarVisibility.default": "菜单仅在全屏模式下隐藏。", "window.menuBarVisibility.visible": "菜单始终可见,即使处于全屏模式下。", "window.menuBarVisibility.toggle": "菜单隐藏,但可以通过 Alt 键显示。", "window.menuBarVisibility.hidden": "菜单始终隐藏。", "menuBarVisibility": "控制菜单栏的可见性。“切换”设置表示隐藏菜单栏,按一次 Alt 键则将显示此菜单栏。默认情况下,除非窗口为全屏,否则菜单栏可见。", + "enableMenuBarMnemonics": "如果启用,则可使用 Alt 快捷键打开主菜单。禁用助记键允许将这些 Alt 快捷键绑定到编辑器命令。", "autoDetectHighContrast": "如果已启用,将自动更改为高对比度主题;如果 Windows 正在使用高对比度主题,则当离开 Windows 高对比度主题时会更改为深色主题。", "titleBarStyle": "调整窗口标题栏的外观。更改需要在完全重启后才能应用。", "window.nativeTabs": "\n启用macOS Sierra窗口选项卡。请注意,更改需要完全重新启动程序才能生效。如果配置此选项,本机选项卡将禁用自定义标题栏样式。", @@ -56,5 +60,9 @@ "zenMode.hideTabs": "控制打开 Zen 模式是否也会隐藏工作台选项卡。", "zenMode.hideStatusBar": "控制打开 Zen 模式是否也会隐藏工作台底部的状态栏。", "zenMode.hideActivityBar": "控制打开 Zen 模式是否也会隐藏工作台左侧的活动栏。", - "zenMode.restore": "控制如果某窗口已退出 zen 模式,是否应还原到 zen 模式。" + "zenMode.restore": "控制如果某窗口已退出 zen 模式,是否应还原到 zen 模式。", + "workspaceConfigurationTitle": "工作区", + "workspaces.title": "工作区中的文件夹设置", + "files.exclude.boolean": "匹配文件路径所依据的 glob 模式。设置为 true 或 false 可启用或禁用该模式。", + "workspaces.additionalFolders": "工作区中的文件夹" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/electron-browser/shell.i18n.json b/i18n/chs/src/vs/workbench/electron-browser/shell.i18n.json index 3af5d3e32a63b..3f8eff44c3f4b 100644 --- a/i18n/chs/src/vs/workbench/electron-browser/shell.i18n.json +++ b/i18n/chs/src/vs/workbench/electron-browser/shell.i18n.json @@ -4,9 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "runningAsRoot": "不建议将 Code 作为“根”运行。", - "prof.message": "成功创建的配置文件。", - "prof.detail": "请创建问题并手动附加以下文件:\n{0}", - "prof.restartAndFileIssue": "创建问题并重启", - "prof.restart": "重启" + "runningAsRoot": "不建议将 Code 作为“根”运行。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/electron-browser/window.i18n.json b/i18n/chs/src/vs/workbench/electron-browser/window.i18n.json index 365d467f27081..0f5f23325d4e9 100644 --- a/i18n/chs/src/vs/workbench/electron-browser/window.i18n.json +++ b/i18n/chs/src/vs/workbench/electron-browser/window.i18n.json @@ -11,7 +11,5 @@ "paste": "粘贴", "selectAll": "全选", "confirmOpen": "是否确定要打开 {0} 个文件夹?", - "confirmOpenButton": "打开(&&O)...", - "developer": "开发者", - "file": "文件" + "confirmOpenButton": "打开(&&O)..." } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/chs/src/vs/workbench/electron-browser/workbench.i18n.json new file mode 100644 index 0000000000000..b7d445f6a6a3e --- /dev/null +++ b/i18n/chs/src/vs/workbench/electron-browser/workbench.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "developer": "开发者", + "file": "文件" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json new file mode 100644 index 0000000000000..9085c53577122 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emergencyConfOn": "正在更改“editor.accessibilitySupport”设置为“on”。", + "openingDocs": "正在打开 VS Code 辅助功能文档页面。", + "introMsg": "感谢试用 VS Code 的辅助功能选项。", + "status": "状态:", + "changeConfigToOnMac": "要配置编辑器对屏幕阅读器进行永久优化,请按 Command+E。", + "changeConfigToOnWinLinux": "要配置编辑器对屏幕阅读器进行永久优化,请按 Ctrl+E。", + "auto_unknown": "编辑器被配置为使用平台 API 以检测是否附加了屏幕阅读器,但当前运行时不支持此功能。", + "auto_on": "编辑器自动检测到已附加屏幕阅读器。", + "auto_off": "编辑器被配置为自动检测是否附加了屏幕阅读器,当前未检测到。", + "configuredOn": "编辑器被配置为对屏幕阅读器的使用进行永久优化 — 你可以编辑设置中的“editor.accessibilitySupport”以改变此行为。", + "configuredOff": "编辑器被配置为不对屏幕阅读器的使用进行优化。", + "tabFocusModeOnMsg": "在当前编辑器中按 Tab 会将焦点移动到下一个可聚焦的元素。按 {0} 来切换此行为。", + "tabFocusModeOnMsgNoKb": "在当前编辑器中按 Tab 会将焦点移动到下一个可聚焦的元素。当前无法通过键绑定触发命令 {0}。", + "tabFocusModeOffMsg": "在当前编辑器中按 Tab 将插入制表符。按 {0} 来切换此行为。", + "tabFocusModeOffMsgNoKb": "在当前编辑器中按 Tab 会插入制表符。当前无法通过键绑定触发命令 {0}。", + "openDocMac": "按 Command+H 以打开浏览器窗口,其中包含更多有关 VS Code 辅助功能的信息。", + "openDocWinLinux": "按 Ctrl+H 以打开浏览器窗口,其中包含更多有关 VS Code 辅助功能的信息。", + "outroMsg": "你可以按 Esc 或 Shift+Esc 消除此工具提示并返回到编辑器。", + "ShowAccessibilityHelpAction": "显示辅助功能帮助" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json index c5e4314489b8e..b163a2de99e32 100644 --- a/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "workbench.action.inspectKeyMap": "Developer: Inspect Key Mapppings" + "workbench.action.inspectKeyMap": "开发者: 检查键映射" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..69af1a1991cd0 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inspectTMScopes": "开发者: 检查 TM 作用域", + "inspectTMScopesWidget.loading": "正在加载..." +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json new file mode 100644 index 0000000000000..d199230dbba45 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parseErrors": "错误分析 {0}: {1}", + "schema.openBracket": "左方括号字符或字符串序列。", + "schema.closeBracket": "右方括号字符或字符串序列。", + "schema.comments": "定义注释符号", + "schema.blockComments": "定义块注释的标记方式。", + "schema.blockComment.begin": "作为块注释开头的字符序列。", + "schema.blockComment.end": "作为块注释结尾的字符序列。", + "schema.lineComment": "作为行注释开头的字符序列。", + "schema.brackets": "定义增加和减少缩进的括号。", + "schema.autoClosingPairs": "定义括号对。当输入左方括号时,将自动插入右方括号。", + "schema.autoClosingPairs.notIn": "定义禁用了自动配对的作用域列表。", + "schema.surroundingPairs": "定义可用于包围所选字符串的括号对。", + "schema.wordPattern": "此语言的文本定义。", + "schema.wordPattern.pattern": "用于匹配文本的正则表达式模式。", + "schema.wordPattern.flags": "用于匹配文本的正则表达式标志。", + "schema.wordPattern.flags.errorMessage": "必须匹配模式“/^([gimuy]+)$/”。", + "schema.indentationRules": "语言的缩进设置。", + "schema.indentationRules.increaseIndentPattern": "如果一行文本匹配此模式,则之后所有内容都应被缩进一次(直到匹配其他规则)。", + "schema.indentationRules.increaseIndentPattern.pattern": "increaseIndentPattern 的正则表达式模式。", + "schema.indentationRules.increaseIndentPattern.flags": "increaseIndentPattern 的正则表达式标志。", + "schema.indentationRules.increaseIndentPattern.errorMessage": "必须匹配模式“/^([gimuy]+)$/”。", + "schema.indentationRules.decreaseIndentPattern": "如果一行文本匹配此模式,则之后所有内容都应被取消缩进一次(直到匹配其他规则)。", + "schema.indentationRules.decreaseIndentPattern.errorMessage": "必须匹配模式“/^([gimuy]+)$/”。", + "schema.indentationRules.indentNextLinePattern.errorMessage": "必须匹配模式“/^([gimuy]+)$/”。", + "schema.indentationRules.unIndentedLinePattern.errorMessage": "必须匹配模式“/^([gimuy]+)$/”。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..69af1a1991cd0 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inspectTMScopes": "开发者: 检查 TM 作用域", + "inspectTMScopesWidget.loading": "正在加载..." +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json new file mode 100644 index 0000000000000..90e803801d335 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "切换多行修改键" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json index 8d541bedfe0b5..a7b3e519e7d33 100644 --- a/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json @@ -6,6 +6,6 @@ { "toggle.wordwrap": "查看: 切换自动换行", "wordWrap.notInDiffEditor": "不能在差异编辑器中切换自动换行。", - "unwrapMinified": "为此文件禁用换行", + "unwrapMinified": "为此文件禁用折行", "wrapMinified": "为此文件启用换行" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index 0dcbbe504420e..258e88045a6cf 100644 --- a/i18n/chs/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -6,6 +6,7 @@ { "openLaunchJson": "打开 {0}", "launchJsonNeedsConfigurtion": "配置或修复 \"launch.json\"", + "noFolderDebugConfig": "请先打开一个文件夹以进行高级调试配置。", "startDebug": "开始调试", "startWithoutDebugging": "开始执行(不调试)", "selectAndStartDebugging": "选择并开始调试", @@ -34,6 +35,7 @@ "editConditionalBreakpoint": "编辑断点...", "setValue": "设置值", "addWatchExpression": "添加表达式", + "editWatchExpression": "编辑表达式", "addToWatchExpressions": "添加到监视", "removeWatchExpression": "删除表达式", "removeAllWatchExpressions": "删除所有表达式", diff --git a/i18n/chs/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json new file mode 100644 index 0000000000000..fd9702e842b93 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugToolBarBackground": "调试工具栏背景颜色。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json new file mode 100644 index 0000000000000..e0672f811fd25 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileLinkMac": "点击以跟进(Cmd + 点击打开到侧边)", + "fileLink": "点击以跟进(Ctrl + 点击打开到侧边))" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/common/debug.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/common/debug.i18n.json new file mode 100644 index 0000000000000..8f7407863de08 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/debug/common/debug.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "internalConsoleOptions": "内部调试控制台的控制行为。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/common/debugModel.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/common/debugModel.i18n.json index 84e124d8037c0..8408a37f11a6e 100644 --- a/i18n/chs/src/vs/workbench/parts/debug/common/debugModel.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/debug/common/debugModel.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "unknownSource": "未知源", "notAvailable": "不可用", - "startDebugFirst": "请启动调试会话以评估", - "unknownStack": "未知的堆栈位置" + "startDebugFirst": "请启动调试会话以评估" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/common/debugSource.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/common/debugSource.i18n.json new file mode 100644 index 0000000000000..b9d67ae239156 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/debug/common/debugSource.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownSource": "未知源" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json new file mode 100644 index 0000000000000..b984c5a3f689d --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noFolderDebugConfig": "请先打开一个文件夹以进行高级调试配置。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json index 3cd5741027e2f..776abd849a77e 100644 --- a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json @@ -24,7 +24,7 @@ "vscode.extension.contributes.debuggers.osx.runtime": "用于 OSX 的运行时。", "vscode.extension.contributes.debuggers.linux": "Linux 特定的设置。", "vscode.extension.contributes.debuggers.linux.runtime": "用于 Linux 的运行时。", - "vscode.extension.contributes.breakpoints": "贡献断电。", + "vscode.extension.contributes.breakpoints": "添加断点。", "vscode.extension.contributes.breakpoints.language": "对此语言允许断点。", "app.launch.json.title": "启动", "app.launch.json.version": "此文件格式的版本。", diff --git a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index f29ac67da10fe..31765f90ced5b 100644 --- a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -5,8 +5,8 @@ // Do not edit this file. It is machine generated. { "snapshotObj": "仅显示了此对象的基元值。", - "debuggingStarted": "已开始调试。", "debuggingPaused": "已暂停调试,原因 {0},{1} {2}", + "debuggingStarted": "已开始调试。", "debuggingStopped": "已停止调试。", "breakpointAdded": "已添加断点,行 {0}, 文件 {1}", "breakpointRemoved": "已删除断点,行 {0},文件 {1}", diff --git a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json index b02aea13f1dbe..83ff9579591d7 100644 --- a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json @@ -6,5 +6,6 @@ { "copyValue": "复制值", "copy": "复制", + "copyAll": "全部复制", "copyStackTrace": "复制调用堆栈" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json index 611916ce3ffbb..38f61fbac529b 100644 --- a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json @@ -7,5 +7,6 @@ "replAriaLabel": "读取 Eval 打印循环面板", "actions.repl.historyPrevious": "上一个历史记录", "actions.repl.historyNext": "下一个历史记录", - "actions.repl.acceptInput": "接受 REPL 的输入" + "actions.repl.acceptInput": "接受 REPL 的输入", + "actions.repl.copyAll": "调试: 复制控制台所有内容" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json index f8362fa633f0f..16828d670d2bb 100644 --- a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json @@ -5,8 +5,6 @@ // Do not edit this file. It is machine generated. { "stateCapture": "对象状态捕获自第一个评估", - "fileLinkMac": "点击以跟进(Cmd + 点击打开到侧边)", - "fileLink": "点击以跟进(Ctrl + 点击打开到侧边))", "replVariableAriaLabel": "变量 {0} 具有值 {1}、读取 Eval 打印循环,调试", "replExpressionAriaLabel": "表达式 {0} 具有值 {1},读取 Eval 打印循环,调试", "replValueOutputAriaLabel": "{0},读取 Eval 打印循环,调试", diff --git a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json index 6e5b8b4125520..f5089c0197a26 100644 --- a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "statusBarDebuggingBackground": "调试程序时状态栏的背景色。状态栏显示在窗口底部" + "statusBarDebuggingBackground": "调试程序时状态栏的背景色。状态栏显示在窗口底部", + "statusBarDebuggingForeground": "调试程序时状态栏的前景色。状态栏显示在窗口底部" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index e1f50545d948d..54243f83ce323 100644 --- a/i18n/chs/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,12 +7,12 @@ "debugAdapterBinNotFound": "调试适配器可执行的“{0}”不存在。", "debugAdapterCannotDetermineExecutable": "无法确定调试适配器“{0}”的可执行文件。", "debugType": "配置类型。", + "debugTypeNotRecognised": "无法识别此调试类型。确保已经安装并启用相应的调试扩展。", "node2NotSupported": "不再支持 \"node2\",改用 \"node\",并将 \"protocol\" 属性设为 \"inspector\"。", "debugName": "配置名称;在启动配置下拉菜单中显示。", "debugRequest": "请求配置类型。可以是“启动”或“附加”。", "debugServer": "仅用于调试扩展开发: 如果已指定端口,VS 代码会尝试连接到在服务器模式中运行的调试适配器", "debugPrelaunchTask": "调试会话开始前要运行的任务。", - "internalConsoleOptions": "内部调试控制台的控制行为。", "debugWindowsConfiguration": "特定于 Windows 的启动配置属性。", "debugOSXConfiguration": "特定于 OS X 的启动配置属性。", "debugLinuxConfiguration": "特定于 Linux 的启动配置属性。", diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json new file mode 100644 index 0000000000000..344b7a80602e1 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "balanceInward": "Emmet: 平衡(向内)", + "balanceOutward": "Emmet: 平衡(向外)" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json new file mode 100644 index 0000000000000..fbb9c2b2cd2d4 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "previousEditPoint": "Emmet: 转到上一编辑点", + "nextEditPoint": "Emmet: 转到下一编辑点" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json new file mode 100644 index 0000000000000..f4159d50b0ea6 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "evaluateMathExpression": "Emmet: 求数学表达式的值" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json new file mode 100644 index 0000000000000..dcef9178c36c7 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "expandAbbreviationAction": "Emmet: 展开缩写" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json new file mode 100644 index 0000000000000..81f7dcfcab119 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "incrementNumberByOneTenth": "Emmet: 增加 0.1", + "incrementNumberByOne": "Emmet: 增加 1", + "incrementNumberByTen": "Emmet: 增加 10", + "decrementNumberByOneTenth": "Emmet: 减少 0.1", + "decrementNumberByOne": "Emmet: 减少 1", + "decrementNumberByTen": "Emmet: 减少 10" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json new file mode 100644 index 0000000000000..bb3ef016208fc --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "matchingPair": "Emmet: 转到匹配对" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json new file mode 100644 index 0000000000000..8548113b66b02 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mergeLines": "Emmet: 合并行" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json new file mode 100644 index 0000000000000..1dcfdd7b85ce9 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reflectCSSValue": "Emmet: 反射 CSS 值" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json new file mode 100644 index 0000000000000..545f1c107e703 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeTag": "Emmet: 删除标签" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json new file mode 100644 index 0000000000000..6d307aadabf11 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "selectPreviousItem": "Emmet: 选择上一项", + "selectNextItem": "Emmet: 选择下一项" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json new file mode 100644 index 0000000000000..53e4eaafbd993 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "splitJoinTag": "Emmet: 分离/联接标签" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json new file mode 100644 index 0000000000000..ecb3f893e89d1 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleComment": "Emmet: 切换注释" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json new file mode 100644 index 0000000000000..d68725525c809 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateImageSize": "Emmet: 更新图像大小" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json new file mode 100644 index 0000000000000..8bf2821c1205f --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateTag": "Emmet: 更新标签", + "enterTag": "输入标签", + "tag": "标签" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json new file mode 100644 index 0000000000000..21f0c06d36383 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wrapWithAbbreviationAction": "Emmet: 使用缩写进行包围", + "enterAbbreviation": "输入缩写", + "abbreviation": "缩写" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json new file mode 100644 index 0000000000000..2d8b8d26d448d --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emmetConfigurationTitle": "Emmet", + "triggerExpansionOnTab": "启用后,按 TAB 键时,将展开 Emmet 缩写。", + "emmetPreferences": "用于修改 Emmet 某些操作和解析程序的行为的首选项。", + "emmetSyntaxProfiles": "为指定的语法定义配置文件或使用带有特定规则的配置文件。", + "emmetExclude": "不应展开 Emmet 缩写的语言数组。", + "emmetExtensionsPath": "包含 Emmet 配置文件、代码段和首选项的文件夹路径", + "useNewEmmet": "试用新版 Emmet 模块(最终会替换旧版单一 Emmet 库)体验所有 Emmet 功能。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index 5b9fad8155072..076eadb1e72ac 100644 --- a/i18n/chs/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -4,10 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "vscode.extension.contributes.explorer": "将自定义树资源管理器 viewlet 添加到边栏", - "vscode.extension.contributes.explorer.treeExplorerNodeProviderId": "用于标识通过 vscode.workspace.registerTreeExplorerNodeProvider 注册的提供程序的唯一 ID", - "vscode.extension.contributes.explorer.treeLabel": "用于呈现自定义树资源管理器的人工可读字符串", - "vscode.extension.contributes.explorer.icon": "活动栏上指向 viewlet 图标的路径", + "vscode.extension.contributes.view": "添加自定义视图", + "vscode.extension.contributes.view.id": "用于标识通过 vscode.workspace.createTreeView 创建的视图的唯一 ID", + "vscode.extension.contributes.view.label": "用于呈现视图的人类可读的字符串", + "vscode.extension.contributes.view.icon": "视图图标的路径", + "vscode.extension.contributes.views": "添加自定义视图", "showViewlet": "显示 {0}", "view": "查看" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index 5e357e17480ed..f9491aa92e060 100644 --- a/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -24,6 +24,11 @@ "default": "默认", "debuggers": "调试程序({0})", "debugger name": "名称", + "debugger type": "类型", + "views": "视图 ({0})", + "view id": "ID", + "view name": "名称", + "view location": "位置", "themes": "主题({0})", "JSON Validation": "JSON 验证({0})", "commands": "命令({0})", diff --git a/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index af246476905c3..38c86c25f8b5c 100644 --- a/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -22,6 +22,8 @@ "disableGloballyAction": "始终", "disableAction": "禁用", "checkForUpdates": "检查更新", + "enableAutoUpdate": "启用自动更新扩展", + "disableAutoUpdate": "禁用自动更新扩展", "updateAll": "更新所有扩展", "reloadAction": "重新加载", "postUpdateTooltip": "重载以更新", @@ -44,6 +46,8 @@ "showWorkspaceRecommendedExtensions": "显示工作区建议的扩展名", "showRecommendedKeymapExtensions": "显示推荐键映射", "showRecommendedKeymapExtensionsShort": "键映射", + "showLanguageExtensions": "显示语言扩展", + "showLanguageExtensionsShort": "语言扩展", "configureWorkspaceRecommendedExtensions": "配置建议的扩展(工作区)", "ConfigureWorkspaceRecommendations.noWorkspace": "建议仅在工作区文件夹上可用。", "OpenExtensionsFile.failed": "无法在 \".vscode\" 文件夹({0})内创建 \"extensions.json\" 文件。", @@ -51,5 +55,8 @@ "disableAll": "禁用所有已安装的扩展", "disableAllWorkspace": "禁用此工作区的所有已安装的扩展", "enableAll": "启用所有已安装的扩展", - "enableAllWorkspace": "启用此工作区的所有已安装的扩展" + "enableAllWorkspace": "启用此工作区的所有已安装的扩展", + "extensionButtonProminentBackground": "扩展中突出操作的按钮背景色(比如 安装按钮)。", + "extensionButtonProminentForeground": "扩展中突出操作的按钮前景色(比如 安装按钮)。", + "extensionButtonProminentHoverBackground": "扩展中突出操作的按钮被悬停时的颜色(比如 安装按钮)。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index 8bcde2a904f1d..2db4a66e7e7d8 100644 --- a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -8,5 +8,9 @@ "showRecommendations": "显示建议", "neverShowAgain": "不再显示", "close": "关闭", - "workspaceRecommended": "此工作区具有扩展建议。" + "workspaceRecommended": "此工作区具有扩展建议。", + "ignoreExtensionRecommendations": "你是否要忽略所有推荐的扩展?", + "ignoreAll": "是,忽略全部", + "no": "否", + "cancel": "取消" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index e65debf45a67d..1320378fc4d3d 100644 --- a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -10,5 +10,6 @@ "extensions": "扩展", "view": "查看", "extensionsConfigurationTitle": "扩展", - "extensionsAutoUpdate": "自动更新扩展" + "extensionsAutoUpdate": "自动更新扩展", + "extensionsIgnoreRecommendations": "忽略推荐的扩展" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json new file mode 100644 index 0000000000000..518bee02115f8 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "disableOtherKeymapsConfirmation": "禁用其他键映射 ({0}) 以避免键绑定之间的冲突?", + "yes": "是", + "no": "否", + "betterMergeDisabled": "现已内置 Better Merge 扩展。此扩展已被安装并禁用,且能被卸载。", + "uninstall": "卸载", + "later": "稍后" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json index 1d7195f43d79d..0dc6a7005ecd9 100644 --- a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json @@ -4,12 +4,15 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "marketPlace": "商店", + "installedExtensions": "已安装", + "searchInstalledExtensions": "已安装", + "recommendedExtensions": "推荐", "searchExtensions": "在应用商店中搜索扩展", - "extensions": "扩展", "sort by installs": "排序依据: 安装计数", "sort by rating": "排序依据: 分级", "sort by name": "排序依据: 名称", - "no extensions found": "找不到扩展。", "suggestProxyError": "市场返回 \"ECONNREFUSED\"。请检查 \"http.proxy\" 设置。", + "extensions": "扩展", "outdatedExtensions": "{0} 个过时的扩展" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json new file mode 100644 index 0000000000000..373bc6642b7f9 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensions": "扩展", + "no extensions found": "找不到扩展。", + "suggestProxyError": "市场返回 \"ECONNREFUSED\"。请检查 \"http.proxy\" 设置。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json b/i18n/chs/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json index a71be8e6f915e..93fab46db227d 100644 --- a/i18n/chs/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json @@ -13,5 +13,7 @@ "cancel": "取消", "singleDependentError": "无法禁用扩展“{0}”。扩展“{1}”取决于此。", "twoDependentsError": "无法禁用扩展“{0}”。扩展“{1}”和扩展“{2}”取决于此。", - "multipleDependentsError": "无法禁用扩展“{0}”。扩展“{1}”、“{2}”和其他扩展取决于此。" + "multipleDependentsError": "无法禁用扩展“{0}”。扩展“{1}”、“{2}”和其他扩展取决于此。", + "installConfirmation": "是否要安装“{0}”扩展?", + "install": "安装" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index b519747f41a3e..255c3f8414aa0 100644 --- a/i18n/chs/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,7 +16,7 @@ "associations": "配置语言的文件关联(如: \"*.extension\": \"html\")。这些关联的优先级高于已安装语言的默认关联。", "encoding": "读取和编写文件时将使用的默认字符集编码。", "autoGuessEncoding": "启用时,会在打开文件时尝试猜测字符集编码", - "eol": "默认行尾字符。", + "eol": "默认行尾字符。使用 \\n 表示 LF,\\r\\n 表示 CRLF。", "trimTrailingWhitespace": "启用后,将在保存文件时剪裁尾随空格。", "insertFinalNewline": "启用后,保存文件时在文件末尾插入一个最终新行。", "files.autoSave.off": "永不自动保存更新后的文件。", @@ -24,11 +24,10 @@ "files.autoSave.onFocusChange": "编辑器失去焦点时自动保存更新后的文件。", "files.autoSave.onWindowChange": "窗口失去焦点时自动保存更新后的文件。", "autoSave": "控制已更新文件的自动保存。接受的值:“{0}”、\"{1}”、“{2}”(编辑器失去焦点)、“{3}”(窗口失去焦点)。如果设置为“{4}”,则可在 \"files.autoSaveDelay\" 中配置延迟。", - "autoSaveDelay": "控制延迟(以秒为单位),在该延迟后将自动保存更新后的文件。仅在 \"files.autoSave'\" 设置为“{0}”时适用。", - "watcherExclude": "配置文件路径的 glob 模式以从文件监视排除。更改此设置要求重启。如果在启动时遇到 Code 消耗大量 CPU 时间,则可以排除大型文件夹以减少初始加载。", + "autoSaveDelay": "控制在多少毫秒后自动保存更改过的文件。仅在“files.autoSave”设置为“{0}”时适用。", "hotExit.off": "禁用热退出。", - "hotExit.onExit": "应用程序关闭时 - 即当 Windows/Linux 上的最后一个窗口关闭或触发 workbench.action.quit 命令时(命令托盘、键绑定、菜单)- 将触发热退出。下次启动时将还原所有已备份的窗口。", - "hotExit.onExitAndWindowClose": "应用程序关闭时 - 即当 Windows/Linux 上的最后一个窗口关闭或触发 workbench.action.quit 命令时(命令托盘、键绑定、菜单)- 将触发热退出。下次启动时将还原所有未打开文件夹的所有窗口。若要将文件夹窗口还原成关闭前的模式,请将 \"window.reopenFolders\" 设置为“所有”。", + "hotExit.onExit": "应用程序关闭时将触发热退出。在 Windows/Linux 上关闭最后一个窗口或触发 workbench.action.quit 命令(命令托盘、键绑定、菜单)会引起应用程序关闭。下次启动时将还原所有已备份的窗口。", + "hotExit.onExitAndWindowClose": "应用程序关闭时将触发热退出。在 Windows/Linux 上关闭最后一个窗口、触发 workbench.action.quit 命令(命令托盘、键绑定、菜单)会引起应用程序关闭。对于任何有文件夹打开的窗口,则不论该窗口是否是最后一个窗口。下次启动时将还原所有未打开文件夹的窗口。若要还原打开有文件夹的窗口,请将“window.restoreWindows”设置为“all”。", "hotExit": "控制是否在会话间记住未保存的文件,以允许在退出编辑器时跳过保存提示。", "defaultLanguage": "分配给新文件的默认语言模式。", "editorConfigurationTitle": "编辑器", diff --git a/i18n/chs/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json b/i18n/chs/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json index 4d442c51a66c6..51ca4525bf3ae 100644 --- a/i18n/chs/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "explorerSection": "文件资源管理器部分", "noWorkspace": "无打开的文件夹", + "explorerSection": "文件资源管理器部分", "noWorkspaceHelp": "尚未打开文件夹。", "openFolder": "打开文件夹" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json b/i18n/chs/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json index 7193836bd0885..f94fffb2f4bb2 100644 --- a/i18n/chs/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "explorerSection": "文件资源管理器部分", + "folders": "文件夹", "treeAriaLabel": "文件资源管理器" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json b/i18n/chs/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json index 33cc7fda987c0..1639569b1103d 100644 --- a/i18n/chs/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "openEditosrSection": "打开的编辑器部分", "openEditors": "打开的编辑器", + "openEditosrSection": "打开的编辑器部分", "treeAriaLabel": "打开的编辑器: 活动文件列表", "dirtyCounter": "{0} 个未保存" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json b/i18n/chs/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json index e635127d4c4a3..c1b279825f673 100644 --- a/i18n/chs/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json @@ -7,6 +7,7 @@ "editorGroupAriaLabel": "{0}, 编辑器组", "openEditorAriaLabel": "{0}, 打开编辑器", "saveAll": "全部保存", + "closeAllUnmodified": "关闭未更改的", "closeAll": "全部关闭", "close": "关闭", "closeOthers": "关闭其他" diff --git a/i18n/chs/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json b/i18n/chs/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json index f4fa6caa5bcb3..9745dba45381e 100644 --- a/i18n/chs/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "orphanedFile": "{0} (deleted from disk)" + "orphanedFile": "{0} (磁盘上已删除)" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/git/browser/views/empty/emptyView.i18n.json b/i18n/chs/src/vs/workbench/parts/git/browser/views/empty/emptyView.i18n.json index d4d866094c63b..e4d4e20d71555 100644 --- a/i18n/chs/src/vs/workbench/parts/git/browser/views/empty/emptyView.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/git/browser/views/empty/emptyView.i18n.json @@ -4,6 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "noGit": "此工作区尚未在 GIT 源控件之下。", + "noGit": "此工作区尚未使用 Git 源代码管理。", "gitinit": "初始化 GIT 存储库" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/nps/electron-browser/nps.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/nps/electron-browser/nps.contribution.i18n.json index 46b894ba355d6..d3829780ea902 100644 --- a/i18n/chs/src/vs/workbench/parts/nps/electron-browser/nps.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/nps/electron-browser/nps.contribution.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "surveyQuestion": "是否介意参加快速反馈调查?", + "surveyQuestion": "您愿意参与一次简短的反馈调查吗?", "takeSurvey": "参加调查", "remindLater": "稍后提醒", "neverAgain": "不再显示" diff --git a/i18n/chs/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index dbd6be98f3e07..bb7e4ea7afa06 100644 --- a/i18n/chs/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -5,5 +5,11 @@ // Do not edit this file. It is machine generated. { "slow": "检测到启动缓慢", - "slow.detail": "抱歉,出现了启动缓慢的情况。请重启“{0}”并启用分析,将分析文件与我们共享,我们会努力提高启动速度。" + "slow.detail": "抱歉,出现了启动缓慢的情况。请重启“{0}”并启用分析,将分析文件与我们共享,我们会努力提高启动速度。", + "prof.message": "已成功创建描述文件。", + "prof.detail": "请创建问题并手动附加以下文件:\n{0}", + "prof.restartAndFileIssue": "创建问题并重启", + "prof.restart": "重启", + "prof.thanks": "感谢您的帮助。", + "prof.detail.restart": "需要重新启动才能继续使用“{0}”。再次感谢您的贡献。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json b/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json index 99d48068a9a9f..1c5aca86231a6 100644 --- a/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json @@ -5,5 +5,5 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.initial": "按所需的键组合,然后按 Enter。按 Esc 可取消。", - "defineKeybinding.chordsTo": "弦形" + "defineKeybinding.chordsTo": "加上" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json index d4d305eba54aa..3461ec0a523e9 100644 --- a/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "keybindingsInputName": "键盘快捷键", + "keybindingsInputName": "键盘快捷方式", "SearchKeybindings.AriaLabel": "搜索键绑定", "SearchKeybindings.Placeholder": "搜索键绑定", "sortByPrecedene": "按优先级排序", - "header-message": "用于高级自定义打开和编辑", + "header-message": "高级自定义请打开和编辑", "keybindings-file-name": "keybindings.json", "keybindingsLabel": "键绑定", "changeLabel": "更改键绑定", diff --git a/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index 84943cf12d797..574f03fcc125d 100644 --- a/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -5,7 +5,7 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.start": "定义键绑定", - "defineKeybinding.kbLayoutInfoMessage": "对于当前键盘布局,按 ", "defineKeybinding.kbLayoutErrorMessage": "在当前键盘布局下无法生成此组合键。", - "DefineKeybindingAction": "定义键绑定" + "defineKeybinding.kbLayoutLocalAndUSMessage": "在你的键盘布局上为 **{0}**(美国标准布局上为 **{1}**)。", + "defineKeybinding.kbLayoutLocalMessage": "在你的键盘布局上为 **{0}**。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index 0bf6b9af9955e..72a81c0af681d 100644 --- a/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -6,6 +6,7 @@ { "openGlobalSettings": "打开用户设置", "openGlobalKeybindings": "打开键盘快捷方式", + "openGlobalKeybindingsFile": "打开键盘快捷方式文件", "openWorkspaceSettings": "打开工作区设置", "configureLanguageBasedSettings": "配置语言特定的设置...", "languageDescriptionConfigured": "({0})", diff --git a/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index 4cefcb62c6fa4..10a5c923c142f 100644 --- a/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -4,6 +4,9 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "errorInvalidConfiguration": "无法写入设置。请更正文件中的错误/警告,然后重试。", + "defaultSettingsTitle": "默认设置", + "noSettingsFound": "未找到设置。", "editTtile": "编辑", "replaceDefaultValue": "在设置中替换", "copyDefaultValue": "复制到设置", diff --git a/i18n/chs/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json b/i18n/chs/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json index ef307afdfbd26..7f2b487c29d8a 100644 --- a/i18n/chs/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "commonlyUsed": "常用设置", + "noSettings": "没有设置", "defaultKeybindingsHeader": "通过将键绑定放入键绑定文件中来覆盖键绑定。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json b/i18n/chs/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json index 01fb87d221396..e66ea5624b195 100644 --- a/i18n/chs/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json @@ -5,10 +5,14 @@ // Do not edit this file. It is machine generated. { "showTriggerActions": "显示所有命令", + "clearCommandHistory": "清除命令历史记录", + "showCommands.label": "命令面板...", "entryAriaLabelWithKey": "{0}、{1} ,命令", "entryAriaLabel": "{0},命令", "canNotRun": "无法从此处运行命令“{0}”。", "actionNotEnabled": "在当前上下文中没有启用命令“{0}”。", + "recentlyUsed": "最近使用", + "morecCommands": "其他命令", "commandLabel": "{0}: {1}", "cat.title": "{0}: {1}", "noCommandsMatching": "没有匹配的命令" diff --git a/i18n/chs/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json new file mode 100644 index 0000000000000..99d6de8863e96 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "relaunchSettingMessage": "设置已更改,需要重启才能生效。", + "relaunchSettingDetail": "按下“重启”按钮以重新启动 {0} 并启用该设置。", + "restart": "重启", + "relaunchWorkspaceMessage": "添加或删除了一个工作区文件夹,需要重启才能生效。", + "relaunchWorkspaceDetail": "按下“重启”按钮以重载此窗口并启用设置。", + "reload": "重新加载" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/chs/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json new file mode 100644 index 0000000000000..bc3bae9c0e521 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGutterModifiedBackground": "编辑器导航线中被修改行的背景颜色。", + "editorGutterAddedBackground": "编辑器导航线中已插入行的背景颜色。", + "editorGutterDeletedBackground": "编辑器导航线中被删除行的背景颜色。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json index ab4166d5cd73b..8ea8ff4f96e85 100644 --- a/i18n/chs/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json @@ -4,7 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "toggleGitViewlet": "显示 GIT", + "toggleGitViewlet": "显示 Git", + "installAdditionalSCMProviders": "安装其他 SCM 提供程序...", "source control": "源代码管理", "toggleSCMViewlet": "显示 SCM", "view": "查看" diff --git a/i18n/chs/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json b/i18n/chs/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json index f03d74e8c9daf..89c41c7a05bad 100644 --- a/i18n/chs/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "switch provider": "切换 SCM 提供程序..." + "installAdditionalSCMProviders": "安装其他 SCM 提供程序...", + "switch provider": "切换源代码管理系统..." } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/chs/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json index cfb58fab2ae1d..cce9767d1ac59 100644 --- a/i18n/chs/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -7,6 +7,6 @@ "searchMatches": "已找到 {0} 个匹配项", "searchMatch": "已找到 {0} 个匹配项", "fileMatchAriaLabel": "文件夹 {2} 的文件 {1} 中有 {0} 个匹配项,搜索结果", - "replacePreviewResultAria": "替换预览结果, {0}", - "searchResultAria": "{0},搜索结果" + "replacePreviewResultAria": "在第 {2} 列替换词组 {0} 为 {1},同行文本为 {3}", + "searchResultAria": "在第 {1} 列找到词组 {0},同行文本为 {2}" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json b/i18n/chs/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json index 0c4154de4e50a..a667d902bfed1 100644 --- a/i18n/chs/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json @@ -4,10 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "vscode.extension.contributes.snippets": "贡献代码段。", + "vscode.extension.contributes.snippets": "添加代码段。", "vscode.extension.contributes.snippets-language": "此代码片段参与的语言标识符。", "vscode.extension.contributes.snippets-path": "代码片段文件的路径。该路径相对于扩展文件夹,通常以 \"./snippets/\" 开头。", "invalid.language": "“contributes.{0}.language”中存在未知的语言。提供的值: {1}", "invalid.path.0": "“contributes.{0}.path”中应为字符串。提供的值: {1}", - "invalid.path.1": "“contributes.{0}.path”({1})应包含在扩展的文件夹({2})内。这可能会使扩展不可移植。" + "invalid.path.1": "“contributes.{0}.path”({1})应包含在扩展的文件夹({2})内。这可能会使扩展不可移植。", + "badVariableUse": "“{0}”代码片段很可能混淆了片段变量和片段占位符。有关详细信息,请访问 https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json index 40b1258792202..5a84e47f5dbcf 100644 --- a/i18n/chs/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json @@ -11,6 +11,6 @@ "snippetSchema.json.default": "空代码片段", "snippetSchema.json": "用户代码片段配置", "snippetSchema.json.prefix": "在 Intellisense 中选择代码片段时将使用的前缀", - "snippetSchema.json.body": "代码片段内容。使用“${id}”、“${id:label}”、“${1:label}”作为变量,使用 \"$0\" 和 \"$1\" 作为光标位置", + "snippetSchema.json.body": "代码片段的内容。使用“$1”和“${1:defaultText}”定义光标位置,使用“$0”定义最终光标位置。使用“${varName}”和“${varName:defaultText}”插入变量值,例如“这是文件:$TM_FILENAME”。", "snippetSchema.json.description": "代码片段描述。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json new file mode 100644 index 0000000000000..52ab1590ed236 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "helpUs": "帮助我们改善对 {0} 的支持", + "takeShortSurvey": "参与小调查", + "remindLater": "稍后提醒", + "neverAgain": "不再显示" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..36e84d84fb11b --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "您愿意参与一次简短的反馈调查吗?", + "takeSurvey": "参与调查", + "remindLater": "稍后提醒", + "neverAgain": "不再显示" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json new file mode 100644 index 0000000000000..67e2a3537349e --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "键入生成任务的名称", + "noTasksMatching": "没有匹配的任务", + "noTasksFound": "找不到生成任务" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json index bf5eec2631c96..4c092b1226f24 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -4,5 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0},任务" + "entryAriaLabel": "{0},任务", + "recentlyUsed": "最近使用的任务", + "configured": "已配置的任务", + "detected": "检测到的任务" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json index 0fb0ed162d404..5ddd907a1c159 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0},任务", "tasksAriaLabel": "键入要重启的任务的名称", "noTasksMatching": "没有匹配的任务", "noTasksFound": "没有发现要重启的任务" diff --git a/i18n/chs/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json index fd9dbffc710ab..9094587319afa 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0},任务", "tasksAriaLabel": "键入要运行的任务的名称", "noTasksMatching": "没有匹配的任务", "noTasksFound": "找不到任务" diff --git a/i18n/chs/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json new file mode 100644 index 0000000000000..2e83da227175e --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "键入测试任务的名称", + "noTasksMatching": "没有匹配的任务", + "noTasksFound": "没有找到测试任务" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index 8490e6b190ad6..29d782900adbc 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -5,13 +5,13 @@ // Do not edit this file. It is machine generated. { "ConfigurationParser.invalidCWD": "警告: options.cwd 必须属于字符串类型。正在忽略值 {0}\n", - "ConfigurationParser.noShell": "警告: 仅当在终端中执行任务时支持 shell 配置。", "ConfigurationParser.noargs": "错误: 命令参数必须是字符串数组。提供的值为:\n{0}", + "ConfigurationParser.noShell": "警告: 仅当在终端中执行任务时支持 shell 配置。", "ConfigurationParser.noName": "错误: 声明范围内的问题匹配程序必须具有名称:\n{0}\n", "ConfigurationParser.unknownMatcherKind": "警告: 已定义的问题匹配程序未知。受支持的类型为 string | ProblemMatcher | (string | ProblemMatcher)[]。\n{0}\n", "ConfigurationParser.invalidVaraibleReference": "错误: 无效的 problemMatcher 引用: {0}\n", "ConfigurationParser.noTaskName": "错误: 任务必须提供 taskName 属性。将忽略该任务。\n{0}\n", "taskConfiguration.shellArgs": "警告: 任务“{0}”是 shell 命令,该命令的名称或其中一个参数具有非转义空格。若要确保命令行引用正确,请将参数合并到该命令。", - "taskConfiguration.noCommandOrDependsOn": "错误: 任务“{0}”既不指定命令,也不指定 dependsOn 属性。将忽略该任务。其定义为:\n{1}", + "taskConfiguration.noCommandOrDependsOn": "错误:任务“{0}”既不指定命令,也不指定 dependsOn 属性。将忽略该任务。其定义为:\n{1}", "taskConfiguration.noCommand": "错误: 任务“{0}”未定义命令。将忽略该任务。其定义为:\n{1}" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json index f6a08e3733171..63b20c41b934d 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "tsc.config": "创建 TypeScript 项目", - "tsc.watch": "编译观看模式的 TypeScript 项目", "dotnetCore": "执行 .NET Core 生成命令", "msbuild": "执行生成目标", "externalCommand": "运行任意外部命令的示例", diff --git a/i18n/chs/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json index 46ce4264dea7a..022342352e6b3 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json @@ -7,6 +7,7 @@ "JsonSchema.options": "其他命令选项", "JsonSchema.options.cwd": "已执行程序或脚本的当前工作目录。如果省略,则使用代码的当前工作区根。", "JsonSchema.options.env": "已执行程序或 shell 的环境。如果省略,则使用父进程的环境。", + "JsonSchema.shellConfiguration": "配置使用的 shell。", "JsonSchema.shell.executable": "待使用的 shell。", "JsonSchema.shell.args": "shell 参数。", "JsonSchema.command": "要执行的命令。可以是外部程序或 shell 命令。", diff --git a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json index 739af6ee7d504..f4f41e4b5fc90 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json @@ -5,6 +5,8 @@ // Do not edit this file. It is machine generated. { "JsonSchema.version": "配置的版本号", + "JsonSchema._runner": "此 runner 已完成使命。请使用官方 runner 属性", + "JsonSchema.runner": "定义任务是否作为进程执行,输出显示在输出窗口还是在终端内。", "JsonSchema.windows": "Windows 特定的命令配置", "JsonSchema.mac": "Mac 特定的命令配置", "JsonSchema.linux": "Linux 特定的命令配置", diff --git a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json index 4106097a93e42..c52182fe2c64c 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -4,11 +4,21 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "JsonSchema.version": "配置的版本号", - "JsonSchema.windows": "Windows 特定的命令配置", - "JsonSchema.mac": "Mac 特定的命令配置", - "JsonSchema.linux": "Linux 特定的命令配置", "JsonSchema.shell": "指定命令是 shell 命令还是外部程序。如果省略,默认值是 false。", "JsonSchema.tasks.dependsOn.string": "此任务依赖的另一任务。", - "JsonSchema.tasks.dependsOn.array": "此任务依赖的其他任务。" + "JsonSchema.tasks.dependsOn.array": "此任务依赖的其他任务。", + "JsonSchema.tasks.presentation": "配置用于显示任务输出和读取输入的面板。", + "JsonSchema.tasks.presentation.echo": "控制是否将执行的命令显示到面板中。默认值为“true”。", + "JsonSchema.tasks.presentation.focus": "控制面板是否获取焦点。默认值为“false”。如果设置为“true”,面板也会显示。", + "JsonSchema.tasks.presentation.reveals": "控制是否显示运行此任务的面板。默认值为“always”。", + "JsonSchema.tasks.presentation.instance": "控制是否在任务间共享面板。同一个任务使用相同面板还是每次运行时新创建一个面板。", + "JsonSchema.tasks.type": "定义任务是被作为进程运行还是在 shell 中作为命令运行。默认作为进程运行。", + "JsonSchema.version": "配置的版本号。", + "JsonSchema.tasks.taskName": "任务名称", + "JsonSchema.tasks.background": "已执行的任务是否保持活动状态并在后台运行。", + "JsonSchema.tasks.promptOnClose": "当 VS 代码与运行的任务一起关闭时是否提示用户。", + "JsonSchema.tasks.matchers": "要使用的问题匹配程序。可以是字符串或问题匹配程序定义,或字符串和问题匹配程序数组。", + "JsonSchema.windows": "Windows 特定的命令配置", + "JsonSchema.mac": "Mac 特定的命令配置", + "JsonSchema.linux": "Linux 特定的命令配置" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index af44cd6b11227..6d39a36131735 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -9,6 +9,7 @@ "ConfigureTaskRunnerAction.quickPick.template": "选择任务运行程序", "ConfigureTaskRunnerAction.autoDetecting": "适用于 {0} 的自动检测任务", "ConfigureTaskRunnerAction.autoDetect": "自动检测系统任务失败。请使用默认模板。有关详细信息,请参阅任务输出。", + "ConfigureTaskRunnerAction.autoDetectError": "自动检测任务系统时出现错误。有关详细信息,请参阅任务输出。", "ConfigureTaskRunnerAction.failed": "无法在 \".vscode\" 文件夹中创建 \"tasks.json\" 文件。查看任务输出了解详细信息。", "ConfigureTaskRunnerAction.label": "配置任务运行程序", "ConfigureBuildTaskAction.label": "配置生成任务", @@ -17,11 +18,14 @@ "problems": "问题", "manyMarkers": "99+", "tasks": "任务", - "TaskSystem.noHotSwap": "更改任务执行引擎需要重启 VS 代码。已忽略更改。", - "TaskService.noBuildTask": "未定义任何生成任务。使用 \"isBuildCommand\" 在 tasks.json 文件中标记任务。", - "TaskService.noTestTask": "未定义任何测试任务。使用 \"isTestCommand\" 在 tasks.json 文件中标记任务。", + "TaskSystem.noHotSwap": "更改任务执行引擎需要重启 VS Code。已忽略更改。", + "TaskService.noBuildTask1": "未定义任何生成任务。使用 \"isBuildCommand\" 在 tasks.json 文件中标记任务。", + "TaskService.noTestTask1": "未定义任何测试任务。使用 \"isTestCommand\" 在 tasks.json 文件中标记任务。", "TaskServer.noTask": "未找到要执行的请求任务 {0}。", - "TaskSystem.activeSame": "任务已处于活动状态并处于监视模式。若要终止任务,请使用 \"F1\" >“终止任务”", + "customizeParseErrors": "当前任务配置存在错误。请先更正错误,再自定义任务。", + "moreThanOneBuildTask": "当前 tasks.json 中定义了多个生成任务。正在执行第一个。\n", + "TaskSystem.activeSame.background": "任务已激活并处于后台模式。若要终止任务,请按“F1”>“终止任务”", + "TaskSystem.activeSame.noBackground": "此任务处于活动状态。若要终止任务,请按“F1”>“终止任务”", "TaskSystem.active": "当前已有任务正在运行。请先终止它,然后再执行另一项任务。", "TaskSystem.restartFailed": "未能终止并重启任务 {0}", "TaskSystem.configurationErrors": "错误: 提供的任务配置具有验证错误,无法使用。请首先改正错误。", @@ -30,17 +34,21 @@ "TaskSystem.terminateTask": "终止任务(&&T)", "TaskSystem.noProcess": "启动的任务不再存在。如果任务已衍生出后台进程,则退出 VS Code 可能会导致出现孤立的进程。若要避免此情况,请使用等待标记启动最后一个后台进程。", "TaskSystem.exitAnyways": "仍然退出(&&E)", - "TerminateAction.label": "终止运行中的任务", + "TerminateAction.label": "终止任务", "TaskSystem.unknownError": "运行任务时发生了错误。请参见任务日志了解详细信息。", "TaskService.noWorkspace": "任务仅在工作区文件夹上可用。", + "recentlyUsed": "最近使用的任务", + "configured": "已配置的任务", + "detected": "检测到的任务", + "TaskService.fetchingBuildTasks": "正在获取生成任务...", + "TaskService.noBuildTaskTerminal": "未能找到生成任务。按“配置生成任务”来定义一个。", + "TaskService.fetchingTestTasks": "正在获取测试任务...", + "TaskService.noTestTaskTerminal": "未能找到测试任务。按“配置任务运行程序”来定义一个。", "TerminateAction.noProcess": "启动的进程不再存在。如果任务衍生的后台任务退出 VS Code,则可能会导致出现孤立的进程。", "TerminateAction.failed": "未能终止运行中的任务", "ShowLogAction.label": "显示任务日志", "RunTaskAction.label": "运行任务", - "RestartTaskAction.label": "重启任务", "BuildAction.label": "运行生成任务", "TestAction.label": "运行测试任务", - "quickOpen.task": "运行任务", - "quickOpen.terminateTask": "终止任务(&&T)", - "quickOpen.restartTask": "重启任务" + "quickOpen.task": "运行任务" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index 2132313f0b684..007d5c51e4a65 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -6,5 +6,7 @@ { "TerminalTaskSystem.unknownError": "在执行任务时发生未知错误。请参见任务输出日志了解详细信息。", "TerminalTaskSystem.terminalName": "任务 - {0}", - "TerminalTaskSystem": "无法对 UNC 驱动器执行 shell 命令。" + "reuseTerminal": "终端将被任务重用,按任意键关闭。", + "TerminalTaskSystem": "无法对 UNC 驱动器执行 shell 命令。", + "unkownProblemMatcher": "无法解析问题匹配程序 {0}。此匹配程序将被忽略" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json index aa659de1014f0..5b8a86d9c21b1 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json @@ -7,5 +7,6 @@ "TaskRunnerSystem.unknownError": "在执行任务时发生未知错误。请参见任务输出日志了解详细信息。", "TaskRunnerSystem.watchingBuildTaskFinished": "\n监视生成任务已完成", "TaskRunnerSystem.childProcessError": "Failed to launch external program {0} {1}.", - "TaskRunnerSystem.cancelRequested": "\n已根据用户请求终止了任务'{0}' " + "TaskRunnerSystem.cancelRequested": "\n已根据用户请求终止了任务'{0}' ", + "unkownProblemMatcher": "无法解析问题匹配程序 {0}。此匹配程序将被忽略" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json new file mode 100644 index 0000000000000..f10e5f7921c7b --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ConfigurationParser.invalidCWD": "警告: options.cwd 必须属于字符串类型。正在忽略值 {0}\n", + "ConfigurationParser.noargs": "错误: 命令参数必须是字符串数组。提供的值为:\n{0}", + "ConfigurationParser.noShell": "警告: 仅当在终端中执行任务时支持 shell 配置。", + "ConfigurationParser.noName": "错误: 声明范围内的问题匹配程序必须具有名称:\n{0}\n", + "ConfigurationParser.unknownMatcherKind": "警告: 已定义的问题匹配程序未知。受支持的类型为 string | ProblemMatcher | (string | ProblemMatcher)[]。\n{0}\n", + "ConfigurationParser.invalidVaraibleReference": "错误: 无效的 problemMatcher 引用: {0}\n", + "ConfigurationParser.noTaskType": "错误: 任务必须提供 type 属性。将忽略该任务。\n{0}\n", + "ConfigurationParser.noTaskName": "错误: 任务必须提供 taskName 属性。将忽略该任务。\n{0}\n", + "taskConfiguration.shellArgs": "警告: 任务“{0}”是 shell 命令,该命令的名称或其中一个参数具有非转义空格。若要确保命令行引用正确,请将参数合并到该命令。", + "taskConfiguration.noCommandOrDependsOn": "错误:任务“{0}”既不指定命令,也不指定 dependsOn 属性。将忽略该任务。其定义为:\n{1}", + "taskConfiguration.noCommand": "错误: 任务“{0}”未定义命令。将忽略该任务。其定义为:\n{1}" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json index a90f5c8220cd2..c8746db7afb2f 100644 --- a/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -8,6 +8,7 @@ "workbench.action.terminal.kill": "终止活动终端实例", "workbench.action.terminal.kill.short": "终止终端", "workbench.action.terminal.copySelection": "复制所选内容", + "workbench.action.terminal.selectAll": "全选", "workbench.action.terminal.new": "新建集成终端", "workbench.action.terminal.new.short": "新的终端", "workbench.action.terminal.focus": "聚焦于终端", @@ -26,5 +27,11 @@ "workbench.action.terminal.scrollUp": "向上滚动(行)", "workbench.action.terminal.scrollUpPage": "向上滚动(页)", "workbench.action.terminal.scrollToTop": "滚动到顶部", - "workbench.action.terminal.clear": "清除" + "workbench.action.terminal.clear": "清除", + "workbench.action.terminal.allowWorkspaceShell": "允许配置工作区 Shell", + "workbench.action.terminal.disallowWorkspaceShell": "禁止配置工作区 Shell", + "workbench.action.terminal.rename": "重命名", + "workbench.action.terminal.rename.prompt": "输入终端名称", + "workbench.action.terminal.focusFindWidget": "聚焦于查找小组件", + "workbench.action.terminal.hideFindWidget": "隐藏查找小组件" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json b/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json index bc85c5bd23bd0..396e41e5c5227 100644 --- a/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.background": "终端的背景颜色,允许终端的颜色与面板不同。", + "terminal.foreground": "终端的前景颜色。", "terminal.ansiColor": "终端中的 ANSI 颜色“{0}”。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json b/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json new file mode 100644 index 0000000000000..d650d2c5ce653 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "查找", + "placeholder.find": "查找", + "label.previousMatchButton": "上一个匹配", + "label.nextMatchButton": "下一个匹配", + "label.closeButton": "关闭" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json b/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json index 968bdf8f6a5bf..f329e3b8be438 100644 --- a/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "terminal.integrated.copySelection.noSelection": "当终端没有位于焦点时无法复制终端选定内容", + "terminal.integrated.copySelection.noSelection": "没有在终端中选择要复制的内容", "terminal.integrated.exitedWithCode": "通过退出代码 {0} 终止的终端进程", "terminal.integrated.waitOnExit": "按任意键以关闭终端", "terminal.integrated.launchFailed": "终端进程命令“{0} {1}”无法启动(退出代码: {2})" diff --git a/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json b/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json index bd290d13ae705..204cfda7f7360 100644 --- a/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminalLinkHandler.followLinkAlt": "Alt + 单击以访问链接", "terminalLinkHandler.followLinkCmd": "Cmd + 单击以跟踪链接", "terminalLinkHandler.followLinkCtrl": "Ctrl + 单击以跟踪链接" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json b/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json index 56f0d4bb145cb..d3e2c12d9a642 100644 --- a/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json @@ -7,5 +7,6 @@ "copy": "复制", "createNewTerminal": "新的终端", "paste": "粘贴", + "selectAll": "全选", "clear": "清除" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 97293e743e379..7a4782c776259 100644 --- a/i18n/chs/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,13 +6,14 @@ { "selectTheme.label": "颜色主题", "installColorThemes": "安装其他颜色主题...", - "problemChangingTheme": "设置主题时出现问题: {0}", - "themes.selectTheme": "选择颜色主题", + "themes.selectTheme": "选择颜色主题(按上下箭头键预览)", "selectIconTheme.label": "文件图标主题", "installIconThemes": "安装其他文件图标主题...", "noIconThemeLabel": "无", "noIconThemeDesc": "禁用文件图标", "problemChangingIconTheme": "设置图标主题时出现问题: {0}", "themes.selectIconTheme": "选择文件图标主题", - "preferences": "首选项" + "generateColorTheme.label": "使用当前设置生成颜色主题", + "preferences": "首选项", + "developer": "开发者" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/update/electron-browser/update.i18n.json b/i18n/chs/src/vs/workbench/parts/update/electron-browser/update.i18n.json index 458a66e47a206..5a19870b02c75 100644 --- a/i18n/chs/src/vs/workbench/parts/update/electron-browser/update.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/update/electron-browser/update.i18n.json @@ -13,7 +13,20 @@ "read the release notes": "欢迎使用 {0} v{1}! 是否要阅读发布说明?", "licenseChanged": "我们的许可条款已更改,请仔细浏览。", "license": "读取许可证", - "updateAvailable": "{0} 将在重启后更新。", + "updateIsReady": "有新更新可用。", "thereIsUpdateAvailable": "存在可用更新。", - "noUpdatesAvailable": "当前没有可用的更新。" + "updateAvailable": "{0} 将在重启后更新。", + "noUpdatesAvailable": "当前没有可用的更新。", + "commandPalette": "命令面板...", + "settings": "设置", + "keyboardShortcuts": "键盘快捷方式", + "selectTheme.label": "颜色主题", + "themes.selectIconTheme.label": "文件图标主题", + "not available": "更新不可用", + "checkingForUpdates": "正在检查更新...", + "DownloadUpdate": "下载可用更新", + "DownloadingUpdate": "正在下载更新...", + "InstallingUpdate": "正在安装更新...", + "restartToUpdate": "重启以更新...", + "checkForUpdates": "检查更新..." } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/views/browser/views.i18n.json b/i18n/chs/src/vs/workbench/parts/views/browser/views.i18n.json new file mode 100644 index 0000000000000..08ebcb29e969b --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/views/browser/views.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewToolbarAriaLabel": "{0} 操作" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json b/i18n/chs/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json new file mode 100644 index 0000000000000..06a69c68416ca --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "视图必须为数组", + "requirestring": "属性“{0}”是必需的,其类型必须是“string”", + "optstring": "属性“{0}”可以省略,否则其类型必须是 \"string\"", + "vscode.extension.contributes.view.id": "视图的标识符。使用标识符通过“vscode.window.registerTreeDataProviderForView” API 注册数据提供程序。同时将“onView:${id}”事件注册到“activationEvents”以激活你的扩展。", + "vscode.extension.contributes.view.name": "人类可读的视图名称。将会被显示", + "vscode.extension.contributes.view.when": "显示此视图必须为真的条件", + "vscode.extension.contributes.views": "向编辑器提供视图", + "views.explorer": "资源管理器视图", + "locationId.invalid": "“{0}”为无效视图位置" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json b/i18n/chs/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json index 076dd52ebbba1..0d83fa608df0a 100644 --- a/i18n/chs/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json @@ -14,10 +14,6 @@ "watermark.toggleTerminal": "切换终端", "watermark.findInFiles": "在文件中查找", "watermark.startDebugging": "开始调试", - "watermark.selectTheme": "更改主题", - "watermark.selectKeymap": "更改键映射", - "watermark.keybindingsReference": "键盘参考", - "watermark.openGlobalKeybindings": "键盘快捷方式(&&K)", "watermark.unboundCommand": "未绑定", "workbenchConfigurationTitle": "工作台", "tips.enabled": "启用后,当没有打开编辑器时将显示水印提示。" diff --git a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index a1751e2466091..525229ce91713 100644 --- a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -9,35 +9,37 @@ "welcomePage.start": "开始", "welcomePage.newFile": "新建文件", "welcomePage.openFolder": "打开文件夹...", - "welcomePage.cloneGitRepository": "克隆 GIT 存储库...", + "welcomePage.cloneGitRepository": "克隆 Git 存储库...", "welcomePage.recent": "最近", + "welcomePage.moreRecent": "更多...", "welcomePage.noRecentFolders": "无最近使用文件夹", "welcomePage.help": "帮助", - "welcomePage.productDocumentation": "产品文档", + "welcomePage.keybindingsCheatsheet": "可打印的键盘速查表", "welcomePage.introductoryVideos": "入门视频", + "welcomePage.tipsAndTricks": "提示与技巧", + "welcomePage.productDocumentation": "产品文档", "welcomePage.gitHubRepository": "GitHub 存储库", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "启动时显示欢迎页", - "welcomePage.quickLinks": "快速链接", - "welcomePage.interactivePlayground": "交互式演练场", - "welcomePage.interactivePlaygroundDescription": "在简短演练中试用编辑器的基本功能", - "welcomePage.interfaceOverview": "界面概述", - "welcomePage.interfaceOverviewDescription": "查看突出显示主要 UI 组件的叠加图", + "welcomePage.customize": "自定义", + "welcomePage.installExtensionPacks": "工具和语言", + "welcomePage.installExtensionPacksDescription": "安装对 {0} 和 {1} 的支持", + "welcomePage.moreExtensions": "更多", + "welcomePage.installKeymapDescription": "安装键盘快捷方式", + "welcomePage.installKeymapExtension": "安装 {0} 和 {1} 的键盘快捷方式", + "welcomePage.others": "其他", "welcomePage.colorTheme": "颜色主题", "welcomePage.colorThemeDescription": "使编辑器和代码呈现你喜欢的外观", + "welcomePage.learn": "学习", + "welcomePage.showCommands": "查找并运行所有命令", + "welcomePage.showCommandsDescription": "使用命令面板快速访问和搜索命令 ({0})", + "welcomePage.interfaceOverview": "界面概述", + "welcomePage.interfaceOverviewDescription": "查看突出显示主要 UI 组件的叠加图", + "welcomePage.interactivePlayground": "交互式演练场", + "welcomePage.interactivePlaygroundDescription": "在简短演练中试用编辑器的基本功能", + "welcomePage.quickLinks": "快速链接", "welcomePage.keybindingsReference": "键盘快捷方式参考", "welcomePage.keybindingsReferenceDescription": "包含常见键盘快捷方式的可打印 PDF 文件", - "welcomePage.showCommands": "查找并运行所有命令", - "welcomePage.showCommandsDescription": "从控制面板快速访问并搜索命令({0})", "welcomePage.configureSettings": "配置设置", - "welcomePage.configureSettingsDescription": "通过调整设置来解锁 VS Code 的全部功能", - "welcomePage.installKeymapDescription": "安装键盘快捷方式", - "welcomePage.installKeymap": "安装 {0}、{1}、{2} 和 {3} 的键盘快捷方式", - "welcomePage.vim": "Vim", - "welcomePage.vimCurrent": "Vim (当前)", - "welcomePage.sublime": "Sublime", - "welcomePage.sublimeCurrent": "Sublime (当前)", - "welcomePage.atom": "Atom", - "welcomePage.atomCurrent": "Atom (当前)", - "welcomePage.others": "其他" + "welcomePage.configureSettingsDescription": "通过调整设置来解锁 VS Code 的全部功能" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json index 9df0fba85871c..e476d81e4d2fb 100644 --- a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json @@ -5,6 +5,8 @@ // Do not edit this file. It is machine generated. { "workbenchConfigurationTitle": "工作台", - "welcomePage.enabled": "启用后,将在启动时显示欢迎页。", + "workbench.startupEditor.welcomePage": "打开欢迎页面(默认)。", + "workbench.startupEditor.newUntitledFile": "打开新的无标题文档", + "workbench.startupEditor": "控制在未能恢复上一会话的信息的情况下,启动时显示的编辑器。选择“none”表示启动时不打开编辑器,“welcomePage”表示打开欢迎页面(默认),“newUntitledFile”表示打开新的无标题文档(仅当未打开文件夹时)。", "help": "帮助" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 71001529b3c3f..2ce7d16dc1f52 100644 --- a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,11 +5,32 @@ // Do not edit this file. It is machine generated. { "welcomePage": "欢迎使用", - "welcome.title": "欢迎使用", + "welcomePage.javaScript": "JavaScript", + "welcomePage.typeScript": "TypeScript", + "welcomePage.python": "Python", + "welcomePage.php": "PHP", + "welcomePage.docker": "Docker", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", + "welcomePage.extensionPackAlreadyInstalled": "已安装对 {0} 的支持。", + "welcomePage.willReloadAfterInstallingExtensionPack": "安装对 {0} 的额外支持后,将重载窗口。", + "welcomePage.installingExtensionPack": "正在安装对 {0} 的额外支持...", + "welcomePage.extensionPackNotFound": "找不到对 {0} (ID: {1}) 的支持。", "welcomePage.keymapAlreadyInstalled": "已安装 {0} 键盘快捷方式。", "welcomePage.willReloadAfterInstallingKeymap": "安装 {0} 键盘快捷方式后,将重载窗口。", - "ok": "确定", "welcomePage.installingKeymap": "正在安装 {0} 键盘快捷方式...", "welcomePage.keymapNotFound": "找不到 ID 为 {1} 的 {0} 键盘快捷方式。", - "cancel": "取消" + "welcome.title": "欢迎使用", + "welcomePage.openFolderWithPath": "打开路径为 {1} 的文件夹 {0}", + "welcomePage.extensionListSeparator": "、", + "welcomePage.installKeymap": "安装 {0} 键映射", + "welcomePage.installExtensionPack": "安装对 {0} 的额外支持", + "welcomePage.installedKeymap": "已安装 {0} 键映射", + "welcomePage.installedExtensionPack": "已安装 {0} 支持", + "ok": "确定", + "details": "详细信息", + "cancel": "取消", + "welcomePage.buttonBackground": "欢迎页按钮的背景色。", + "welcomePage.buttonHoverBackground": "欢迎页按钮被悬停时的背景色。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/chs/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json index 919a9e29fe9b0..4beaf7510a919 100644 --- a/i18n/chs/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "walkThrough.unboundCommand": "未绑定" + "walkThrough.unboundCommand": "未绑定", + "walkThrough.gitNotFound": "你的系统上似乎未安装 Git。", + "walkThrough.embeddedEditorBackground": "嵌入于交互式演练场中的编辑器的背景颜色。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/services/configuration/node/configuration.i18n.json b/i18n/chs/src/vs/workbench/services/configuration/node/configuration.i18n.json new file mode 100644 index 0000000000000..8fc13df992075 --- /dev/null +++ b/i18n/chs/src/vs/workbench/services/configuration/node/configuration.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.configuration": "用于配置字符串。", + "vscode.extension.contributes.configuration.title": "设置摘要。此标签将在设置文件中用作分隔注释。", + "vscode.extension.contributes.configuration.properties": "配置属性的描述。", + "invalid.type": "如果进行设置,\"configuration.type\" 必须设置为对象", + "invalid.title": "configuration.title 必须是字符串", + "vscode.extension.contributes.defaultConfiguration": "按语言提供默认编辑器配置设置。", + "invalid.properties": "configuration.properties 必须是对象" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/chs/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index 78d407bf40b4d..e8a58d8ccea34 100644 --- a/i18n/chs/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/chs/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -4,11 +4,14 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "open": "打开设置", + "close": "关闭", + "saveAndRetry": "保存设置并重试", "errorUnknownKey": "无法写入配置文件(未知密钥)", "errorInvalidTarget": "无法写入到配置文件(无效的目标)", - "errorNoWorkspaceOpened": "无法写入设置,因为没有打开任何文件夹。请先打开一个文件夹,然后重试。", + "errorNoWorkspaceOpened": "没有打开任何文件夹,因此无法写入设置。请先打开一个文件夹,然后重试。", "errorInvalidConfiguration": "无法写入设置。请打开 **用户设置** 更正文件中的错误/警告,然后重试。", "errorInvalidConfigurationWorkspace": "无法写入设置。请打开 **工作区设置** 更正文件中的错误/警告,然后重试。", - "errorConfigurationFileDirty": "无法写入设置,因为该文件已更新。请保存 **用户设置** 文件,然后重试。", - "errorConfigurationFileDirtyWorkspace": "无法写入设置,因为该文件已更新。请保存 **工作区设置** 文件,然后重试。" + "errorConfigurationFileDirty": "文件已变更,因此无法写入设置。请先保存 **用户设置** 文件,然后重试。", + "errorConfigurationFileDirtyWorkspace": "文件已变更,因此无法写入设置。请先保存 **工作区设置** 文件,然后重试。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json b/i18n/chs/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json new file mode 100644 index 0000000000000..0581515bc92d8 --- /dev/null +++ b/i18n/chs/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "遥测", + "telemetry.enableCrashReporting": "启用要发送给 Microsoft 的故障报表。\n此选项需重启才可生效。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/services/files/node/fileService.i18n.json b/i18n/chs/src/vs/workbench/services/files/node/fileService.i18n.json index 51c9c6cc3ecc1..b5d3233f409ec 100644 --- a/i18n/chs/src/vs/workbench/services/files/node/fileService.i18n.json +++ b/i18n/chs/src/vs/workbench/services/files/node/fileService.i18n.json @@ -6,8 +6,10 @@ { "fileInvalidPath": "无效的文件资源({0})", "fileIsDirectoryError": "文件是目录({0})", + "fileTooLargeError": "文件太大,无法打开", "fileBinaryError": "文件似乎是二进制文件,无法作为文档打开", "fileNotFoundError": "找不到文件({0})", + "fileMoveConflict": "无法移动/复制。文件已存在于目标位置。", "unableToMoveCopyError": "无法移动/复制。文件将替换其所在的文件夹。", "foldersCopyError": "无法将文件夹复制到工作区中。请选择单独的文件来进行复制。", "fileReadOnlyError": "文件为只读文件" diff --git a/i18n/chs/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/chs/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index bafde878dc4b7..57fb7d30808b7 100644 --- a/i18n/chs/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/chs/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -8,15 +8,12 @@ "requirestring": "属性“{0}”是必需的,其类型必须是“字符串”", "optstring": "属性“{0}”可以省略,或者其类型必须是“字符串”", "vscode.extension.contributes.keybindings.command": "要在触发键绑定时运行的命令的标识符。", - "vscode.extension.contributes.keybindings.key": "键或键序列(用加号分隔键,用空格分隔序列,例如,对于弦形,Ctrl+O 和 Ctrl+L L ", + "vscode.extension.contributes.keybindings.key": "按键或按键序列。用加号分隔按键,用空格分隔序列。例如,Ctrl+O 和 Ctrl+L L(连续按键)。", "vscode.extension.contributes.keybindings.mac": "Mac 特定的键或键序列。", "vscode.extension.contributes.keybindings.linux": "Linux 特定的键或键序列。", "vscode.extension.contributes.keybindings.win": "Windows 特定的键或键序列。", "vscode.extension.contributes.keybindings.when": "键处于活动状态时的条件。", "vscode.extension.contributes.keybindings": "用于键绑定。", - "openDocumentation": "了解详细信息", - "keybindingMigration.ok": "确定", - "keybindingMigration.prompt": "已为你的键盘布局更改某些键盘快捷键。", "invalid.keybindings": "无效的“contributes.{0}”: {1}", "unboundCommands": "以下是其他可用命令:", "keybindings.json.title": "键绑定配置", @@ -25,5 +22,5 @@ "keybindings.json.when": "键处于活动状态时的条件。", "keybindings.json.args": "要传递给命令以执行的参数。", "keyboardConfigurationTitle": "键盘", - "dispatch": "控制按键的分派逻辑以使用 \"keydown.code\" (推荐)或 \"eydown.keyCode\"。" + "dispatch": "控制按键的调度逻辑以使用“keydown.code”(推荐) 或“keydown.keyCode”。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json b/i18n/chs/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json index 30dff55c8cad7..427956885a75b 100644 --- a/i18n/chs/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json +++ b/i18n/chs/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json @@ -4,7 +4,16 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid": "无效的“contributes.{0}”。应为数组。", + "vscode.extension.contributes.languages": "有助于语言声明。", + "vscode.extension.contributes.languages.id": "语言 ID。", + "vscode.extension.contributes.languages.aliases": "语言的别名。", + "vscode.extension.contributes.languages.extensions": "与语言关联的文件扩展名。", + "vscode.extension.contributes.languages.filenames": "与语言关联的文件名。", + "vscode.extension.contributes.languages.filenamePatterns": "与语言关联的文件名 glob 模式。", + "vscode.extension.contributes.languages.mimetypes": "与语言关联的 Mime 类型。", + "vscode.extension.contributes.languages.firstLine": "与语言文件的第一行匹配的正则表达式。", + "vscode.extension.contributes.languages.configuration": "包含语言配置选项的文件的相对路径。", + "invalid": "“contributes.{0}”无效。应为数组。", "invalid.empty": "“contributes.{0}”的值为空", "require.id": "属性“{0}”是必需的,其类型必须是“字符串”", "opt.extensions": "属性“{0}”可以省略,其类型必须是 \"string[]\"", diff --git a/i18n/chs/src/vs/workbench/services/progress/browser/progressService2.i18n.json b/i18n/chs/src/vs/workbench/services/progress/browser/progressService2.i18n.json new file mode 100644 index 0000000000000..6db7d6aae514a --- /dev/null +++ b/i18n/chs/src/vs/workbench/services/progress/browser/progressService2.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "progress.text": "{0} - {1}", + "progress.title": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json b/i18n/chs/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json new file mode 100644 index 0000000000000..dfbe43b5ad9c7 --- /dev/null +++ b/i18n/chs/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.grammars": "贡献 textmate tokenizer。", + "vscode.extension.contributes.grammars.language": "此语法为其贡献了内容的语言标识符。", + "vscode.extension.contributes.grammars.scopeName": "tmLanguage 文件所用的 textmate 范围名称。", + "vscode.extension.contributes.grammars.path": "tmLanguage 文件的路径。该路径是相对于扩展文件夹,通常以 \"./syntaxes/\" 开头。", + "vscode.extension.contributes.grammars.embeddedLanguages": "如果此语法包含嵌入式语言,则为作用域名称到语言 ID 的映射。", + "vscode.extension.contributes.grammars.injectTo": "此语法注入到的语言范围名称列表。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json b/i18n/chs/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json new file mode 100644 index 0000000000000..bfa6530c7f321 --- /dev/null +++ b/i18n/chs/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid.language": "“contributes.{0}.language”中存在未知的语言。提供的值: {1}", + "invalid.scopeName": "“contributes.{0}.scopeName”中应为字符串。提供的值: {1}", + "invalid.path.0": "“contributes.{0}.path”中应为字符串。提供的值: {1}", + "invalid.injectTo": "\"contributes.{0}.injectTo\" 中的值无效。必须为语言范围名称数组。提供的值: {1}", + "invalid.embeddedLanguages": "\"contributes.{0}.embeddedLanguages\" 中的值无效。必须为从作用域名称到语言的对象映射。提供的值: {1}", + "invalid.path.1": "“contributes.{0}.path”({1})应包含在扩展的文件夹({2})内。这可能会使扩展不可移植。", + "no-tm-grammar": "没有注册这种语言的 TM 语法。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json b/i18n/chs/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json index c9bf9070daa1f..d745afc220794 100644 --- a/i18n/chs/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json +++ b/i18n/chs/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json @@ -6,5 +6,6 @@ { "schema.colors": "语法突出显示颜色", "schema.properties.name": "规则描述", - "schema.fontStyle": "规则字体样式:“斜体”、“粗体”和“下划线”中的一种或者组合" + "schema.fontStyle": "规则字体样式:“斜体”、“粗体”和“下划线”中的一种或者组合", + "schema.tokenColors.path": "tmTheme 文件路径(相对于当前文件)" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/chs/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json index 4f358c63711be..88cd69f245175 100644 --- a/i18n/chs/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json +++ b/i18n/chs/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -5,8 +5,9 @@ // Do not edit this file. It is machine generated. { "error.cannotparsejson": "分析 JSON 主题文件 {0} 时出现问题", - "error.invalidformat": "分析 JSON 主题文件时出现问题: {0}。需要“令牌颜色”和“颜色”。", - "error.plist.invalidformat": "分析主题文件时出现问题: {0}。\"settings\" 不是数组。", - "error.cannotparse": "分析主题文件时出现问题: {0}", - "error.cannotload": "加载主题文件 {0} 时出现问题: {1}" + "error.invalidformat.colors": "分析颜色主题文件时出现问题:{0}。属性“colors”不是“object”类型。", + "error.invalidformat.tokenColors": "分析颜色主题文件时出现问题:{0}。属性“tokenColors”应为指定颜色的数组或是指向 TextMate 主题文件的路径", + "error.plist.invalidformat": "分析 tmTheme 文件时出现问题:{0}。“settings”不是数组。", + "error.cannotparse": "分析 tmTheme 文件时出现问题:{0}", + "error.cannotload": "分析 tmTheme 文件 {0} 时出现问题:{1}" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/chs/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index 5428ed9e97e73..6431206538fa3 100644 --- a/i18n/chs/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/chs/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -14,17 +14,18 @@ "vscode.extension.contributes.iconThemes.label": "UI 中显示的图标主题的标签。", "vscode.extension.contributes.iconThemes.path": "图标主题定义文件的路径。该路径相对于扩展文件夹,通常是 \"./icons/awesome-icon-theme.json\"。", "migration.completed": "已向用户设置添加了新的主题设置。{0} 中可备份。", - "error.cannotloadtheme": "Unable to load {0}: {1}", - "reqarray": "Extension point `{0}` must be an array.", + "error.cannotloadtheme": "无法加载 {0}: {1}", + "reqarray": "扩展点“{0}”必须是一个数组。", "reqpath": "“contributes.{0}.path”中应为字符串。提供的值: {1}", "invalid.path.1": "“contributes.{0}.path”({1})应包含在扩展的文件夹({2})内。这可能会使扩展不可移植。", "reqid": "“contributes.{0}.id”中应为字符串。提供的值: {1}", "error.cannotloadicontheme": "Unable to load {0}", "error.cannotparseicontheme": "Problems parsing file icons file: {0}", - "colorTheme": "Specifies the color theme used in the workbench.", - "colorThemeError": "Theme is unknown or not installed.", - "iconTheme": "Specifies the icon theme used in the workbench.", + "colorTheme": "指定工作台中使用的颜色主题。", + "colorThemeError": "主题未知或未安装。", "noIconThemeDesc": "No file icons", - "iconThemeError": "File icon theme is unknown or not installed.", - "workbenchColors": "覆盖当前所选颜色主题的颜色。 此为实验性设置,因为下一版本中将更改颜色名称。" + "iconThemeError": "文件图标主题未知或未安装。", + "workbenchColors": "覆盖当前所选颜色主题的颜色。", + "workbenchColors.deprecated": "该设置不再是实验性设置,并已重命名为“workbench.colorCustomizations”", + "workbenchColors.deprecatedDescription": "改用“workbench.colorCustomizations”" } \ No newline at end of file diff --git a/i18n/cht/extensions/configuration-editing/out/extension.i18n.json b/i18n/cht/extensions/configuration-editing/out/extension.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/extensions/configuration-editing/out/extension.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json b/i18n/cht/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json index e25bac5f167c4..bfbf51dad3db2 100644 --- a/i18n/cht/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json +++ b/i18n/cht/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json @@ -7,7 +7,6 @@ "activeEditorShort": "例如 myFile.txt", "activeEditorMedium": "例如 myFolder/myFile.txt", "activeEditorLong": "例如 /Users/Development/myProject/myFolder/myFile.txt", - "rootName": "例如 myProject", "rootPath": "例如 /Users/Development/myProject", "appName": "例如 VS Code", "dirty": "若使用中的編輯器已變更,即為已變更的指示區", diff --git a/i18n/cht/extensions/extension-editing/out/extensionLinter.i18n.json b/i18n/cht/extensions/extension-editing/out/extensionLinter.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/extensions/extension-editing/out/extensionLinter.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/extensions/git/out/commands.i18n.json b/i18n/cht/extensions/git/out/commands.i18n.json index 1cdcbdecd44a3..ca70fea046db3 100644 --- a/i18n/cht/extensions/git/out/commands.i18n.json +++ b/i18n/cht/extensions/git/out/commands.i18n.json @@ -6,31 +6,40 @@ { "tag at": "位於 {0} 的標記", "remote branch at": "位於 {0} 的遠端分支", - "repourl": "存放庫 URL", + "repourl": "儲存庫 URL", "parent": "父目錄", - "cloning": "正在複製 Git 存放庫...", - "openrepo": "開啟存放庫", - "proposeopen": "要開啟複製的存放庫嗎?", + "cloning": "正在複製 Git 儲存庫...", + "openrepo": "開啟儲存庫", + "proposeopen": "要開啟複製的儲存庫嗎?", "confirm revert": "確定要還原您在 {0} 中選取的變更嗎?", "revert": "還原變更", "confirm discard": "確定要捨棄 {0} 中的變更嗎?", "confirm discard multiple": "確定要捨棄 {0} 檔案中的變更嗎?", "discard": "捨棄變更", + "confirm discard all": "確定要捨棄所有變更嗎? 此動作無法復原!", + "discardAll": "捨棄所有變更", + "no staged changes": "沒有暫存變更進行提交\n\n您希望自動暫存您所有變更並直接提交?", + "yes": "是", + "always": "永遠", "no changes": "沒有任何變更要認可。", "commit message": "認可訊息", "provide commit message": "請提供認可訊息", "branch name": "分支名稱", "provide branch name": "請提供分支名稱", - "no remotes to pull": "您的存放庫未設定要提取的來源遠端。", - "no remotes to push": "您的存放庫未設定要推送的目標遠端。", + "select branch to delete": "選擇分支進行刪除", + "confirm force delete branch": "分支 '{0}' 尚未完整合併. 確定刪除嗎?", + "delete branch": "刪除分支", + "no remotes to pull": "您的儲存庫未設定要提取的遠端來源。", + "no remotes to push": "您的儲存庫未設定要推送的遠端目標。", "nobranch": "請簽出分支以推送到遠端。", "pick remote": "挑選要發行分支 '{0}' 的目標遠端:", "sync is unpredictable": "此動作會將認可發送至 '{0}' 及從中提取認可。", "ok": "確定", "never again": "確定不要再顯示", - "no remotes to publish": "您的存放庫未設定要發行的目標遠端。", + "no remotes to publish": "您的儲存庫未設定要發行的遠端目標。", "disabled": "Git 已停用,或在此工作區不受支援", - "clean repo": "請先清除您的存放庫工作樹狀再簽出。", + "clean repo": "請先清除您的本地儲存庫工作區再簽出。", + "cant push": "無法將參考推送到遠端。請先執行 [提取] 以整合您的變更。", "git error details": "Git: {0}", "git error": "Git 錯誤", "open git log": "開啟 Git 記錄" diff --git a/i18n/cht/extensions/git/out/main.i18n.json b/i18n/cht/extensions/git/out/main.i18n.json index 710676d3a31ae..1a5f7ab3b83f2 100644 --- a/i18n/cht/extensions/git/out/main.i18n.json +++ b/i18n/cht/extensions/git/out/main.i18n.json @@ -6,5 +6,6 @@ { "using git": "正在使用來自 {1} 的 git {0}", "updateGit": "更新 Git", - "neverShowAgain": "不要再顯示" + "neverShowAgain": "不要再顯示", + "git20": "您似乎已安裝 Git {0}。Code 搭配 Git >= 2 的執行效果最佳" } \ No newline at end of file diff --git a/i18n/cht/extensions/git/out/model.i18n.json b/i18n/cht/extensions/git/out/model.i18n.json index 69c8e98ba1901..9949e5c21643d 100644 --- a/i18n/cht/extensions/git/out/model.i18n.json +++ b/i18n/cht/extensions/git/out/model.i18n.json @@ -8,5 +8,7 @@ "merge changes": "合併變更", "staged changes": "已分段的變更", "changes": "變更", - "ok": "確定" + "ok": "確定", + "neveragain": "不要再顯示", + "huge": "位於 '{0}' 的 Git 儲存庫有過多使用中的變更,只有部份 Git 功能會被啟用。" } \ No newline at end of file diff --git a/i18n/cht/extensions/git/out/scmProvider.i18n.json b/i18n/cht/extensions/git/out/scmProvider.i18n.json index 7fded37328a95..e71dab52f4e97 100644 --- a/i18n/cht/extensions/git/out/scmProvider.i18n.json +++ b/i18n/cht/extensions/git/out/scmProvider.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "commit": "Commit" + "commit": "認可" } \ No newline at end of file diff --git a/i18n/cht/extensions/git/package.i18n.json b/i18n/cht/extensions/git/package.i18n.json index 2eb969e59eab4..e5b0bf72ade77 100644 --- a/i18n/cht/extensions/git/package.i18n.json +++ b/i18n/cht/extensions/git/package.i18n.json @@ -5,7 +5,7 @@ // Do not edit this file. It is machine generated. { "command.clone": "複製", - "command.init": "初始化存放庫", + "command.init": "初始化儲存庫", "command.refresh": "重新整理", "command.openChange": "開啟變更", "command.openFile": "開啟檔案", @@ -20,18 +20,19 @@ "command.cleanAll": "捨棄所有變更", "command.commit": "Commit", "command.commitStaged": "認可暫存", - "command.commitStagedSigned": "認可暫存 (已登出)", + "command.commitStagedSigned": "認可暫存 (已簽章)", "command.commitAll": "全部認可", - "command.commitAllSigned": "全部認可 (已登出)", + "command.commitAllSigned": "全部認可 (已簽章)", "command.undoCommit": "復原上次認可", "command.checkout": "簽出至...", "command.branch": "建立分支...", + "command.deleteBranch": "刪除分支...", "command.pull": "提取", "command.pullRebase": "提取 (重訂基底)", "command.push": "推送", "command.pushTo": "推送至...", "command.sync": "同步處理", - "command.publish": "發行", + "command.publish": "發行分支", "command.showOutput": "顯示 Git 輸出", "config.enabled": "是否啟用 GIT", "config.path": "Git 可執行檔的路徑", @@ -39,6 +40,9 @@ "config.autofetch": "是否啟用自動擷取", "config.enableLongCommitWarning": "是否發出長認可訊息的警告", "config.confirmSync": "請先確認再同步處理 GIT 存放庫", - "config.countBadge": "控制 GIT 徽章計數器", - "config.checkoutType": "控制要列出哪種類型的分支" + "config.countBadge": "控制 git 徽章計數器。[全部] 會計算所有變更。[已追蹤] 只會計算追蹤的變更。[關閉] 會將其關閉。", + "config.checkoutType": "控制在執行 [簽出至...] 時,會列出那些類型的分支。[全部] 會顯示所有參考,[本機] 只會顯示本機分支,[標記] 只會顯示標記,[遠端] 只會顯示遠端分支。", + "config.ignoreLegacyWarning": "略過舊的 Git 警告", + "config.ignoreLimitWarning": "當儲存庫中有過多變更時,略過警告。", + "config.defaultCloneDirectory": "複製 Git 儲存庫的預設位置" } \ No newline at end of file diff --git a/i18n/cht/extensions/grunt/out/main.i18n.json b/i18n/cht/extensions/grunt/out/main.i18n.json index 8b6ad71cd4e6d..39e6cf64ecbd3 100644 --- a/i18n/cht/extensions/grunt/out/main.i18n.json +++ b/i18n/cht/extensions/grunt/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Grunt 的自動偵測失敗。錯誤: {0}" +} \ No newline at end of file diff --git a/i18n/cht/extensions/grunt/package.i18n.json b/i18n/cht/extensions/grunt/package.i18n.json index 8b6ad71cd4e6d..01c2df22d6d1f 100644 --- a/i18n/cht/extensions/grunt/package.i18n.json +++ b/i18n/cht/extensions/grunt/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.grunt.autoDetect": "控制 Grunt 工作的自動偵測為開啟或關閉。預設為開。" +} \ No newline at end of file diff --git a/i18n/cht/extensions/gulp/out/main.i18n.json b/i18n/cht/extensions/gulp/out/main.i18n.json index 8b6ad71cd4e6d..019ce972d1c96 100644 --- a/i18n/cht/extensions/gulp/out/main.i18n.json +++ b/i18n/cht/extensions/gulp/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Gulp 的自動偵測失敗。錯誤: {0}" +} \ No newline at end of file diff --git a/i18n/cht/extensions/gulp/package.i18n.json b/i18n/cht/extensions/gulp/package.i18n.json index 8b6ad71cd4e6d..e91e1955eec75 100644 --- a/i18n/cht/extensions/gulp/package.i18n.json +++ b/i18n/cht/extensions/gulp/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.gulp.autoDetect": "控制 Gulp 工作的自動偵測為開啟或關閉。預設為開。" +} \ No newline at end of file diff --git a/i18n/cht/extensions/jake/out/main.i18n.json b/i18n/cht/extensions/jake/out/main.i18n.json new file mode 100644 index 0000000000000..f85adc82182e7 --- /dev/null +++ b/i18n/cht/extensions/jake/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "Jake 的自動偵測失敗。錯誤: {0}" +} \ No newline at end of file diff --git a/i18n/cht/extensions/jake/package.i18n.json b/i18n/cht/extensions/jake/package.i18n.json new file mode 100644 index 0000000000000..ee533577d0713 --- /dev/null +++ b/i18n/cht/extensions/jake/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.jake.autoDetect": "控制 Jake 工作的自動偵測為開啟或關閉。預設為開。" +} \ No newline at end of file diff --git a/i18n/cht/extensions/markdown/out/extension.i18n.json b/i18n/cht/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..f8b580fc8f070 --- /dev/null +++ b/i18n/cht/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "onPreviewStyleLoadError": "無法載入 ‘markdown.style' 樣式:{0}" +} \ No newline at end of file diff --git a/i18n/cht/extensions/markdown/package.i18n.json b/i18n/cht/extensions/markdown/package.i18n.json index 8944d1dde4330..6c7136baba315 100644 --- a/i18n/cht/extensions/markdown/package.i18n.json +++ b/i18n/cht/extensions/markdown/package.i18n.json @@ -16,5 +16,7 @@ "markdown.previewSide.title": "在一側開啟預覽", "markdown.showSource.title": "顯示來源", "markdown.styles.dec": "可從 Markdown 預覽使用之 CSS 樣式表的 URL 或本機路徑清單。相對路徑是相對於在總管中開啟的資料夾來進行解釋。若沒有開啟資料夾,路徑則是相對於 Markdown 檔案的位置來進行解釋。所有 '\\' 都必須寫成 '\\\\'。", - "markdown.showPreviewSecuritySelector.title": "變更 Markdown 預覽安全性設定" + "markdown.showPreviewSecuritySelector.title": "變更 Markdown 預覽安全性設定", + "markdown.preview.enableExperimentalExtensionApi.desc": "[實驗性] 允許延伸模組延伸 Markdown 預覽。", + "markdown.trace.desc": "允許 Markdown 延伸模組進行偵錯記錄。" } \ No newline at end of file diff --git a/i18n/cht/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/cht/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..fd3fc4ee5125c --- /dev/null +++ b/i18n/cht/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "acceptCurrentChange": "接受當前變更", + "acceptIncomingChange": "接受來源變更", + "acceptBothChanges": "接受兩者變更", + "compareChanges": "比較變更" +} \ No newline at end of file diff --git a/i18n/cht/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/cht/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..a82efe04f8a99 --- /dev/null +++ b/i18n/cht/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "cursorNotInConflict": "編輯器游標不在衝突合併範圍之內", + "compareChangesTitle": "{0}: 當前變更⟷來源變更", + "cursorOnSplitterRange": "編輯器游標在衝突合併工具範圍內,請移動至\"當前項目\"或來源項目\"區塊", + "noConflicts": "檔案內找不到需要合併衝突項目", + "noOtherConflictsInThisFile": "此檔案內沒有其他的衝突合併項目" +} \ No newline at end of file diff --git a/i18n/cht/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/cht/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..1282a1b3de3af --- /dev/null +++ b/i18n/cht/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "currentChange": "(目前變更)", + "incomingChange": "(來源變更)" +} \ No newline at end of file diff --git a/i18n/cht/extensions/merge-conflict/package.i18n.json b/i18n/cht/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..21711a0ff3211 --- /dev/null +++ b/i18n/cht/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "command.category": "合併衝突", + "command.accept.all-incoming": "接受所有來源", + "command.accept.all-both": "接受兩者所有項目", + "command.accept.current": "接受當前項目", + "command.accept.incoming": "接受來源項目", + "command.accept.selection": "接受選取項目", + "command.accept.both": "接受兩者", + "command.next": "下一個衝突", + "command.previous": "前一個衝突", + "command.compare": "比較目前衝突", + "config.title": "合併衝突", + "config.codeLensEnabled": "啟用/停用 編輯器CodeLens衝突合併 ", + "config.decoratorsEnabled": "啟用/停用 編輯器衝突合併色彩裝飾" +} \ No newline at end of file diff --git a/i18n/cht/extensions/npm/package.i18n.json b/i18n/cht/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..74cbc6cffe4b8 --- /dev/null +++ b/i18n/cht/extensions/npm/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.npm.autoDetect": "控制是否自動檢測npm腳本.預設為開啟." +} \ No newline at end of file diff --git a/i18n/cht/extensions/php/package.i18n.json b/i18n/cht/extensions/php/package.i18n.json index ea8c697e6aa45..5f7fb84195495 100644 --- a/i18n/cht/extensions/php/package.i18n.json +++ b/i18n/cht/extensions/php/package.i18n.json @@ -9,5 +9,6 @@ "configuration.validate.executablePath": "指向 PHP 可執行檔。", "configuration.validate.run": "是否在儲存或輸入時執行 linter。", "configuration.title": "PHP", - "commands.categroy.php": "PHP" + "commands.categroy.php": "PHP", + "command.untrustValidationExecutable": "禁止 PHP 驗證可執行檔 (定義為工作區設定)" } \ No newline at end of file diff --git a/i18n/cht/extensions/typescript/out/features/bufferSyncSupport.i18n.json b/i18n/cht/extensions/typescript/out/features/bufferSyncSupport.i18n.json index 94c3eb2b5b915..8d73858cf4f5e 100644 --- a/i18n/cht/extensions/typescript/out/features/bufferSyncSupport.i18n.json +++ b/i18n/cht/extensions/typescript/out/features/bufferSyncSupport.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "versionMismatch": "版本不符! 全域 TSC ({0}) != VS Code 的語言服務 ({1})。可能會發生編譯不一致的錯誤", "moreInformation": "詳細資訊", "doNotCheckAgain": "不要再檢查", "close": "關閉", diff --git a/i18n/cht/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/cht/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json new file mode 100644 index 0000000000000..19b6338186e4b --- /dev/null +++ b/i18n/cht/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ts-check": "啟用 JavaScript 檔案的語意檢查。必須在檔案的最上面。", + "ts-nocheck": "停用 JavaScript 檔案的語意檢查。必須在檔案的最上面。", + "ts-ignore": "隱藏下一行@ts-check 的錯誤警告。" +} \ No newline at end of file diff --git a/i18n/cht/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/cht/extensions/typescript/out/typescriptServiceClient.i18n.json index 693e6c0ce7128..0ac728237d9c5 100644 --- a/i18n/cht/extensions/typescript/out/typescriptServiceClient.i18n.json +++ b/i18n/cht/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -4,9 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "restartTsServerTitle": "重新啟動", - "later": "稍後", - "channelName": "TypeScript", "noServerFound": "路徑 {0} 未指向有效的 tsserver 安裝。即將回復為配套的 TypeScript 版本。", "noBundledServerFound": "其他應用程式已刪除了 VSCode 的 tsserver,例如行為不當的病毒偵測工具。請重新安裝 VS Code。", "versionNumber.custom": "自訂", @@ -17,6 +14,8 @@ "learnMore": "深入了解", "selectTsVersion": "選取 JavaScript 與 TypeScript 功能使用的 TypeScript 版本", "typescript.openTsServerLog.notSupported": "TS 伺服器的記錄功能需要 TS 2.2.2+", + "typescript.openTsServerLog.loggingNotEnabled": "TS 伺服器記錄功能已關閉。請設定 `typescript.tsserver.log` 並重新啟動 TS 伺服器,以啟用記錄功能", + "typescript.openTsServerLog.enableAndReloadOption": "啟用記錄功能並重新啟動 TS 伺服器", "typescript.openTsServerLog.noLogFile": "TS 伺服器尚未開始記錄。", "openTsServerLog.openFileFailedFailed": "無法開啟 TS 伺服器記錄檔", "serverDiedAfterStart": "TypeScript 語言服務在啟動後立即中止 5 次。服務將不會重新啟動。", diff --git a/i18n/cht/extensions/typescript/out/utils/logger.i18n.json b/i18n/cht/extensions/typescript/out/utils/logger.i18n.json new file mode 100644 index 0000000000000..bc738f43d0c37 --- /dev/null +++ b/i18n/cht/extensions/typescript/out/utils/logger.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "channelName": "TypeScript" +} \ No newline at end of file diff --git a/i18n/cht/extensions/typescript/out/utils/projectStatus.i18n.json b/i18n/cht/extensions/typescript/out/utils/projectStatus.i18n.json index bfe9d8300ece6..3c39220ae532e 100644 --- a/i18n/cht/extensions/typescript/out/utils/projectStatus.i18n.json +++ b/i18n/cht/extensions/typescript/out/utils/projectStatus.i18n.json @@ -6,7 +6,6 @@ { "hintExclude": "若要讓整個專案都能使用 JavaScript/TypeScript 語言功能,請排除內含許多檔案的資料夾,例如: {0}", "hintExclude.generic": "若要讓整個專案都能使用 JavaScript/TypeScript 語言功能,請排除內含您未使用之來源檔案的大型資料夾。", - "open": "設定排除項目", "large.label": "設定排除項目", "hintExclude.tooltip": "若要讓整個專案都能使用 JavaScript/TypeScript 語言功能,請排除內含您未使用之來源檔案的大型資料夾。" } \ No newline at end of file diff --git a/i18n/cht/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/cht/extensions/typescript/out/utils/typingsStatus.i18n.json index 4f15ff5fc04f8..d487fd639bc08 100644 --- a/i18n/cht/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/cht/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "installingPackages": "正在擷取資料以改善 TypeScript IntelliSense", + "typesInstallerInitializationFailed.title": "無法安裝typings檔案Javascript語言功能,請確認NPM是否已安裝且配置'typescript.npm'", "typesInstallerInitializationFailed.moreInformation": "詳細資訊", "typesInstallerInitializationFailed.doNotCheckAgain": "不要再檢查", "typesInstallerInitializationFailed.close": "關閉" diff --git a/i18n/cht/extensions/typescript/package.i18n.json b/i18n/cht/extensions/typescript/package.i18n.json index 474b92a51c1a0..adf3f4e32dd92 100644 --- a/i18n/cht/extensions/typescript/package.i18n.json +++ b/i18n/cht/extensions/typescript/package.i18n.json @@ -11,11 +11,13 @@ "typescript.tsdk.desc": "指定資料夾路徑,其中包含要使用的 tsserver 和 lib*.d.ts 檔案。", "typescript.disableAutomaticTypeAcquisition": "停用自動類型取得。需要 TypeScript >= 2.0.6,並需要在變更後重新啟動。", "typescript.check.tscVersion": "請檢查全域安裝 TypeScript 編譯器 (例如 tsc) 是否不同於使用的 TypeScript 語言服務。", - "typescript.tsserver.experimentalAutoBuild": "啟用實驗性自動建置。需要 1.9 dev 或 2.x tsserver 版本,且在變更後必須重新啟動 VS Code。", + "typescript.tsserver.log": "允許 TS 伺服器記錄到檔案。此記錄可用來診斷 TS 伺服器問題。記錄可能包含檔案路徑、原始程式碼及您專案中可能具有敏感性的其他資訊。", + "typescript.tsserver.trace": "允許將訊息追蹤傳送到 TS 伺服器。此追蹤可用來診斷 TS 伺服器問題。追蹤可能包含檔案路徑、原始程式碼及您專案中可能具有敏感性的其他資訊。", "typescript.validate.enable": "啟用/停用 TypeScript 驗證。", "typescript.format.enable": "啟用/停用預設 TypeScript 格式器。", "javascript.format.enable": "啟用/停用預設 JavaScript 格式器。", "format.insertSpaceAfterCommaDelimiter": "定義逗號分隔符號後的空格處理。", + "format.insertSpaceAfterConstructor": "定義 constructor 關鍵字後空格處理。需要 TypeScript >= 2.3.0。", "format.insertSpaceAfterSemicolonInForStatements": " 定義 for 陳述式內分號後的空格處理。", "format.insertSpaceBeforeAndAfterBinaryOperators": "定義二元運算子後的空格處理。", "format.insertSpaceAfterKeywordsInControlFlowStatements": "定義控制流程陳述式內關鍵字後的空格處理方式。", @@ -23,6 +25,7 @@ "format.insertSpaceBeforeFunctionParenthesis": "定義如何處理函式引數括號之前的空格。TypeScript 必須 >= 2.1.5。", "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": "定義左右非空白括弧間的空格處理。", "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": "定義左右非空白中括弧間的空格處理。", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": "定義範非空白左右大括弧間的空格處理。需要 TypeScript >= 2.3.0。", "format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": "定義範本字串左右大括弧間的空格處理。需要 TypeScript >= 2.0.6。", "format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": "定義 JSX 運算式左右大括弧間的空格處理。需要 TypeScript >= 2.0.6。", "format.placeOpenBraceOnNewLineForFunctions": "定義是否將左大括弧放入函式的新行。", @@ -30,6 +33,16 @@ "javascript.validate.enable": "啟用/停用 JavaScript 驗證。", "typescript.goToProjectConfig.title": "移至專案組態", "javascript.goToProjectConfig.title": "移至專案組態", - "typescript.openTsServerLog.title": "開啟 TS 伺服器記錄檔", - "typescript.selectTypeScriptVersion.title": "選取 TypeScript 版本" + "javascript.referencesCodeLens.enabled": "在JavaScript檔案啟用/停用 參考CodeLens ", + "typescript.referencesCodeLens.enabled": "在TypeScript檔案啟用/停用CodeLens參考。需要TypeScript>=2.0.6。", + "typescript.implementationsCodeLens.enabled": "啟用/停用實作 CodeLens。需要 TypeScript >= 2.2.0。", + "typescript.openTsServerLog.title": "開啟 TS 伺服器記錄", + "typescript.restartTsServer": "重新啟動TS伺服器", + "typescript.selectTypeScriptVersion.title": "選取 TypeScript 版本", + "jsDocCompletion.enabled": "啟用/停用自動 JSDoc 註解", + "javascript.implicitProjectConfig.checkJs": "啟用/停用 JavaScript 檔案的語意檢查。現有的 jsconfig.json 或 tsconfig.json 檔案會覆寫此設定。需要 TypeScript >=2.3.1。", + "typescript.npm": "指定用於自動類型取得的 NPM 可執行檔路徑。TypeScript 必須 >= 2.3.4.", + "typescript.check.npmIsInstalled": "檢查是否已安裝NPM用以取得自動類型擷取.", + "javascript.nameSuggestions": "從JavaScript推薦表檔案中啟用/停用包含唯一檔名", + "typescript.tsc.autoDetect": "控制 tsc 工作的自動偵測為開啟或關閉。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/cht/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index da6b8c6d2c009..4686baf14d02c 100644 --- a/i18n/cht/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/cht/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -5,9 +5,8 @@ // Do not edit this file. It is machine generated. { "imgMeta": "{0}x{1} {2}", - "largeImageError": "因為影像太大,所以無法在編輯器中顯示。", - "resourceOpenExternalButton": "開啟影像", - "resourceOpenExternalText": " 要使用外部程式嗎?", + "largeImageError": "因為影像太大,無法在編輯器中顯示。", + "resourceOpenExternalButton": "要使用外部程式打開影像嗎?", "nativeBinaryError": "檔案為二進位檔、非常大或使用不支援的文字編碼,因此將不會顯示於編輯器中。", "sizeB": "{0}B", "sizeKB": "{0}KB", diff --git a/i18n/cht/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/cht/src/vs/base/common/jsonErrorMessages.i18n.json new file mode 100644 index 0000000000000..8d1538fc7340f --- /dev/null +++ b/i18n/cht/src/vs/base/common/jsonErrorMessages.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error.invalidSymbol": "無效的符號", + "error.invalidNumberFormat": "無效的數字格式", + "error.propertyNameExpected": "須有屬性名稱", + "error.valueExpected": "必須有值", + "error.colonExpected": "必須有冒號", + "error.commaExpected": "必須有逗號", + "error.closeBraceExpected": "必須為右大括號", + "error.closeBracketExpected": "必須為右中括號", + "error.endOfFileExpected": "必須有檔案結尾" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/base/common/keybindingLabels.i18n.json b/i18n/cht/src/vs/base/common/keybindingLabels.i18n.json new file mode 100644 index 0000000000000..0e97d8b37c301 --- /dev/null +++ b/i18n/cht/src/vs/base/common/keybindingLabels.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ctrlKey": "Ctrl", + "shiftKey": "Shift", + "altKey": "Alt", + "windowsKey": "Windows", + "ctrlKey.long": "Control", + "shiftKey.long": "Shift", + "altKey.long": "Alt", + "cmdKey.long": "Command", + "windowsKey.long": "Windows" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/code/electron-main/menus.i18n.json b/i18n/cht/src/vs/code/electron-main/menus.i18n.json index a0c96430b3eb7..a6b17d6f801a2 100644 --- a/i18n/cht/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/cht/src/vs/code/electron-main/menus.i18n.json @@ -6,12 +6,15 @@ { "mFile": "檔案 (&&F)", "mEdit": "編輯(&&E)", + "mSelection": "選取項目(&&S)", "mView": "檢視 (&&V)", + "mGoto": "前往(&&G)", "mDebug": "偵錯 (&&D)", "mWindow": "視窗", "mHelp": "說明 (&&H)", "miNewWindow": "開新視窗(&&W)", "mAbout": "關於 {0}", + "mServices": "服務", "mHide": "隱藏 {0}", "mHideOthers": "隱藏其他", "mShowAll": "全部顯示", @@ -29,6 +32,7 @@ "miCloseWindow": "關閉視窗(&&E)", "miCloseFolder": "關閉資料夾(&&F)", "miCloseEditor": "關閉編輯器(&&C)", + "miExit": "結束(&&X)", "miOpenSettings": "設定(&&S)", "miOpenKeymap": "鍵盤快速鍵(&&K)", "miOpenKeymapExtensions": "按鍵對應延伸模組(&&K)", @@ -40,6 +44,7 @@ "miClearRecentOpen": "清理最近的檔案(&&C)", "miUndo": "復原(&&U)", "miRedo": "重做(&&R)", + "miCut": "剪下(&&T)", "miCopy": "複製(&&C)", "miPaste": "貼上(&&P)", "miFind": "尋找(&&F)", @@ -65,7 +70,7 @@ "miSmartSelectShrink": "壓縮選取範圍(&&S)", "miViewExplorer": "檔案總管(&&E)", "miViewSearch": "搜尋(&&S)", - "miViewGit": "Git(&&G)", + "miViewSCM": "SCM", "miViewDebug": "偵錯 (&&D)", "miViewExtensions": "擴充功能(&&X)", "miToggleOutput": "輸出(&&O)", @@ -110,6 +115,8 @@ "miGotoSymbolInFile": "前往檔案中的符號(&&S)...", "miGotoSymbolInWorkspace": "前往工作區中的符號(&&W)...", "miGotoDefinition": "移至定義(&&D)", + "miGotoTypeDefinition": "移至類型定義(&&T)", + "miGotoImplementation": "前往實作(&&I)", "miGotoLine": "移至行(&&L)...", "miStartDebugging": "啟動偵錯(&&S)", "miStartWithoutDebugging": "只啟動但不偵錯(&&W)", @@ -126,16 +133,17 @@ "miColumnBreakpoint": "資料行中斷點(&&O)", "miFunctionBreakpoint": "函式中斷點(&&F}...", "miNewBreakpoint": "新增中斷點(&&N)", + "miEnableAllBreakpoints": "啟用所有中斷點", "miDisableAllBreakpoints": "停用所有中斷點(&&L)", "miRemoveAllBreakpoints": "移除所有中斷點(&&R)", "miInstallAdditionalDebuggers": "安裝其他偵錯工具(&&I)...", "mMinimize": "最小化", - "mClose": "關閉", "mBringToFront": "全部提到最上層", "miToggleDevTools": "切換開發人員工具(&&T)", "miAccessibilityOptions": "協助工具選項(&&O)", "miReportIssues": "回報問題(&&I)", "miWelcome": "歡迎使用(&&W)", + "miInteractivePlayground": "Interactive Playground(&&I)", "miDocumentation": "文件(&&D)", "miReleaseNotes": "版本資訊(&&R)", "miKeyboardShortcuts": "鍵盤快速鍵參考(&&K)", @@ -145,12 +153,12 @@ "miLicense": "檢視授權(&&L)", "miPrivacyStatement": "隱私權聲明(&&P)", "miAbout": "關於(&&A)", - "miRestartToUpdate": "重新啟動以更新...", + "accessibilityOptionsWindowTitle": "協助工具選項", "miCheckingForUpdates": "正在查看是否有更新...", "miDownloadUpdate": "下載可用更新", "miDownloadingUpdate": "正在下載更新...", "miInstallingUpdate": "正在安裝更新...", - "miCheckForUpdates": "查看是否有更新...", + "miCheckForUpdates": "查看是否有更新", "aboutDetail": "\n版本 {0}\n認可 {1}\n日期 {2}\nShell {3}\n轉譯器 {4}\nNode {5}", "okButton": "確定" } \ No newline at end of file diff --git a/i18n/cht/src/vs/code/electron-main/windows.i18n.json b/i18n/cht/src/vs/code/electron-main/windows.i18n.json index 1a51baff5db5c..6137785c58706 100644 --- a/i18n/cht/src/vs/code/electron-main/windows.i18n.json +++ b/i18n/cht/src/vs/code/electron-main/windows.i18n.json @@ -7,7 +7,6 @@ "ok": "確定", "pathNotExistTitle": "路徑不存在", "pathNotExistDetail": "磁碟上似乎已沒有路徑 '{0}'。", - "accessibilityOptionsWindowTitle": "協助工具選項", "reopen": "重新開啟", "wait": "繼續等候", "close": "關閉", @@ -15,8 +14,6 @@ "appStalledDetail": "您可以重新開啟或關閉視窗,或是繼續等候。", "appCrashed": "視窗已損毀", "appCrashedDetail": "很抱歉造成您的不便! 您可以重新開啟視窗,從您離開的地方繼續進行。", - "newWindow": "開新視窗", - "newWindowDesc": "開啟新視窗", - "recentFolders": "最近使用的資料夾", - "folderDesc": "{0} {1}" + "openFile": "開啟檔案", + "openFolder": "開啟資料夾" } \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/browser/widget/diffEditorWidget.i18n.json b/i18n/cht/src/vs/editor/browser/widget/diffEditorWidget.i18n.json index 8b6ad71cd4e6d..a4ab50f8f6a76 100644 --- a/i18n/cht/src/vs/editor/browser/widget/diffEditorWidget.i18n.json +++ b/i18n/cht/src/vs/editor/browser/widget/diffEditorWidget.i18n.json @@ -3,4 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "diffEditorInserted": "插入文字的背景色彩。", + "diffEditorRemoved": "移除文字的背景色彩。", + "diffEditorInsertedOutline": "插入的文字外框色彩。", + "diffEditorRemovedOutline": "移除的文字外框色彩。" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/browser/widget/diffReview.i18n.json b/i18n/cht/src/vs/editor/browser/widget/diffReview.i18n.json new file mode 100644 index 0000000000000..8b7662c4c930b --- /dev/null +++ b/i18n/cht/src/vs/editor/browser/widget/diffReview.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "關閉" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json index f935716347fda..6d3924e724563 100644 --- a/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -9,6 +9,7 @@ "fontWeight": "控制字型寬度。", "fontSize": "控制字型大小 (以像素為單位)。", "lineHeight": "控制行高。使用 0 會從 fontSize 計算 lineHeight。", + "letterSpacing": "控制字元間距 (以像素為單位)", "lineNumbers": "控制行號顯示。可能的值有 'on'、'off' 及 'relative'。'relative' 會從目前的資料指標位置顯示行數。", "rulers": "要在其中顯示垂直尺規的資料行", "wordSeparators": "執行文字相關導覽或作業時將作為文字分隔符號的字元", @@ -20,26 +21,33 @@ "roundedSelection": "控制選取範圍是否有圓角", "scrollBeyondLastLine": "控制編輯器是否會捲動到最後一行之後", "minimap.enabled": "控制是否會顯示迷你地圖", + "minimap.showSlider": "自動隱藏迷你地圖滑桿", "minimap.renderCharacters": "呈現行內的實際字元 (而不是彩色區塊)", "minimap.maxColumn": "限制迷你地圖的寬度,以呈現最多的資料行", + "find.seedSearchStringFromSelection": "控制編譯器選取範圍是否預設為尋找工具的搜尋字串", + "find.autoFindInSelection": "控制編譯器內選取多字元或多行內文是否開啟選取範圍尋找功能", "wordWrap.off": "一律不換行。", "wordWrap.on": "依檢視區寬度換行。", "wordWrap.wordWrapColumn": "於 'editor.wordWrapColumn' 換行。", "wordWrap.bounded": "當檢視區縮至最小並設定 'editor.wordWrapColumn' 時換行。", + "wordWrap": "控制是否自動換行。可以是:\n - 'off' (停用換行),\n - 'on' (檢視區換行),\n - 'wordWrapColumn' (於 'editor.wordWrapColumn' 換行`) 或\n - 'bounded' (當檢視區縮至最小並設定 'editor.wordWrapColumn' 時換行).", "wordWrapColumn": "當 `editor.wordWrap` 為 [wordWrapColumn] 或 [bounded] 時,控制編輯器中的資料行換行。", "wrappingIndent": "控制換行的縮排。可以是 [無]、[相同] 或 [縮排]。", "mouseWheelScrollSensitivity": "滑鼠滾輪捲動事件的 'deltaX' 與 'deltaY' 所使用的乘數", + "multiCursorModifier.ctrlCmd": "對應Windows和Linux的'Control'與對應OSX的'Command'", + "multiCursorModifier.alt": "對應Windows和Linux的'Alt'與對應OSX的'Option'", + "multiCursorModifier": "用於新增多個滑鼠游標的修改程式。`ctrlCmd` 會對應到 Windows 及 Linux 上的 `Control` 以及 OSX 上的 `Command`。[移至定義] 及 [開啟連結] 滑鼠手勢將會適應以避免和 multicursor 修改程式衝突。", "quickSuggestions.strings": "允許在字串內顯示即時建議。", "quickSuggestions.comments": "允許在註解中顯示即時建議。", "quickSuggestions.other": "允許在字串與註解以外之處顯示即時建議。", "quickSuggestions": "控制是否應在輸入時自動顯示建議", "quickSuggestionsDelay": "控制延遲顯示快速建議的毫秒數", - "parameterHints": "啟用參數提示", + "parameterHints": "當您輸入時啟用彈出視窗,顯示參數文件與類型資訊", "autoClosingBrackets": "控制編輯器是否應在左括號後自動插入右括號", "formatOnType": "控制編輯器是否應在輸入一行後自動格式化", "formatOnPaste": "控制編輯器是否應自動設定貼上的內容格式。格式器必須可供使用,而且格式器應該能夠設定文件中一個範圍的格式。", "suggestOnTriggerCharacters": "控制輸入觸發字元時,是否應自動顯示建議", - "acceptSuggestionOnEnter": "控制除了 'Tab' 外,是否也藉由按下 'Enter' 接受建議。如此可避免混淆要插入新行或接受建議。", + "acceptSuggestionOnEnter": "控制除了 'Tab' 外,是否也藉由按下 'Enter' 接受建議。如此可避免混淆要插入新行或接受建議。設定值'smart'表示在文字變更同時,只透過Enter接受建議。", "acceptSuggestionOnCommitCharacter": "控制認可字元是否應接受建議。例如在 JavaScript 中,分號 (';') 可以是接受建議並鍵入該字元的認可字元。", "snippetSuggestions": "控制程式碼片段是否隨其他建議顯示,以及其排序方式。", "emptySelectionClipboard": "控制複製時不選取任何項目是否會複製目前程式行。", @@ -61,12 +69,18 @@ "renderLineHighlight": "控制編輯器應如何轉譯目前反白的行,可能的值有 'none'、'gutter'、'line' 和 'all'。", "codeLens": "控制編輯器是否顯示程式碼濾鏡", "folding": "控制編輯器是否已啟用程式碼摺疊功能", + "showFoldingControls": "自動隱藏摺疊控制向", "matchBrackets": "當選取某側的括號時,強調顯示另一側的配對括號。", "glyphMargin": "控制編輯器是否應轉譯垂直字符邊界。字符邊界最常用來進行偵錯。", "useTabStops": "插入和刪除接在定位停駐點後的空白字元", "trimAutoWhitespace": "移除尾端自動插入的空白字元", "stablePeek": "讓預覽編輯器在使用者按兩下其內容或點擊 Escape 時保持開啟。", "dragAndDrop": "控制編輯器是否允許透過拖放動作移動選取範圍。", + "accessibilitySupport.auto": "編輯器將使用平台 API 以偵測螢幕助讀程式附加。", + "accessibilitySupport.on": "編輯器將會為螢幕助讀程式的使用方式永久地最佳化。", + "accessibilitySupport.off": "編輯器不會為螢幕助讀程式的使用方式進行最佳化。", + "accessibilitySupport": "控制編輯器是否應於已為螢幕助讀程式最佳化的模式中執行。", + "links": "控制編輯器是否應偵測連結且讓它可點擊", "sideBySide": "控制 Diff 編輯器要並排或內嵌顯示差異", "ignoreTrimWhitespace": "控制 Diff 編輯器是否將開頭或尾端空白字元的變更顯示為差異", "renderIndicators": "控制 Diff 編輯器是否要為新增的/移除的變更顯示 +/- 標記", diff --git a/i18n/cht/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/cht/src/vs/editor/common/config/editorOptions.i18n.json new file mode 100644 index 0000000000000..7d0a6fdde24db --- /dev/null +++ b/i18n/cht/src/vs/editor/common/config/editorOptions.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "accessibilityOffAriaLabel": "編輯器現在無法存取。按Alt+F1尋求選項", + "editorViewAccessibleLabel": "編輯器內容" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/common/services/bulkEdit.i18n.json b/i18n/cht/src/vs/editor/common/services/bulkEdit.i18n.json index 8cbdaf09d5d56..cf3f3771d6a2b 100644 --- a/i18n/cht/src/vs/editor/common/services/bulkEdit.i18n.json +++ b/i18n/cht/src/vs/editor/common/services/bulkEdit.i18n.json @@ -4,5 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "conflict": "這些檔案已同時變更: {0}" + "conflict": "這些檔案已同時變更: {0}", + "summary.0": "未進行任何編輯", + "summary.nm": "在 {1} 個檔案中進行了 {0} 項文字編輯", + "summary.n0": "在一個檔案中進行了 {0} 項文字編輯" } \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/cht/src/vs/editor/common/view/editorColorRegistry.i18n.json index 810bd9dd09b77..a64950d25e3b8 100644 --- a/i18n/cht/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/cht/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -10,5 +10,15 @@ "caret": "編輯器游標的色彩。", "editorWhitespaces": "編輯器中空白字元的色彩。", "editorIndentGuides": "編輯器縮排輔助線的色彩。", - "editorLineNumbers": "編輯器行號的色彩。" + "editorLineNumbers": "編輯器行號的色彩。", + "editorRuler": "編輯器尺規的色彩", + "editorCodeLensForeground": "編輯器程式碼濾鏡的前景色彩", + "editorBracketMatchBackground": "成對括號背景色彩", + "editorBracketMatchBorder": "成對括號邊框色彩", + "editorOverviewRulerBorder": "預覽檢視編輯器尺規的邊框色彩.", + "editorGutter": "編輯器邊框的背景顏色,包含行號與字形圖示的邊框.", + "errorForeground": "編輯器內錯誤提示線的前景色彩.", + "errorBorder": "編輯器內錯誤提示線的邊框色彩.", + "warningForeground": "編輯器內警告提示線的前景色彩.", + "warningBorder": "編輯器內警告提示線的邊框色彩." } \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/find/common/findController.i18n.json b/i18n/cht/src/vs/editor/contrib/find/common/findController.i18n.json index 29657be9ff8c0..0de30c3bd71e3 100644 --- a/i18n/cht/src/vs/editor/contrib/find/common/findController.i18n.json +++ b/i18n/cht/src/vs/editor/contrib/find/common/findController.i18n.json @@ -14,6 +14,6 @@ "addSelectionToPreviousFindMatch": "將選取項目加入前一個找到的相符項中", "moveSelectionToNextFindMatch": "將最後一個選擇項目移至下一個找到的相符項", "moveSelectionToPreviousFindMatch": "將最後一個選擇項目移至前一個找到的相符項", - "selectAllOccurencesOfFindMatch": "選取所有找到的相符項目", + "selectAllOccurrencesOfFindMatch": "選取所有找到的相符項目", "changeAll.label": "變更所有發生次數" } \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/format/browser/formatActions.i18n.json b/i18n/cht/src/vs/editor/contrib/format/browser/formatActions.i18n.json index d1fd1741e7486..5c9e753d7067e 100644 --- a/i18n/cht/src/vs/editor/contrib/format/browser/formatActions.i18n.json +++ b/i18n/cht/src/vs/editor/contrib/format/browser/formatActions.i18n.json @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "hint11": "Made 1 formatting edit on line {0}", - "hintn1": "Made {0} formatting edits on line {1}", - "hint1n": "Made 1 formatting edit between lines {0} and {1}", - "hintnn": "Made {0} formatting edits between lines {1} and {2}", - "formatDocument.label": "Format Document", - "formatSelection.label": "Format Selection" + "hint11": "在行 {0} 編輯了 1 項格式", + "hintn1": "在行 {1} 編輯了 {0} 項格式", + "hint1n": "在行 {0} 與行 {1} 之間編輯了 1 項格式", + "hintnn": "在行 {1} 與行 {2} 之間編輯了 {0} 項格式", + "formatDocument.label": "將文件格式化", + "formatSelection.label": "將選取項目格式化" } \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/cht/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..26ea0a1761cf6 --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "找不到 '{0}' 的定義", + "generic.noResults": "找不到任何定義", + "meta.title": " - {0} 個定義", + "actions.goToDecl.label": "移至定義", + "actions.goToDeclToSide.label": "在一側開啟定義", + "actions.previewDecl.label": "預覽定義", + "goToImplementation.noResultWord": "找不到 '{0}' 的任何實作", + "goToImplementation.generic.noResults": "找不到任何實作", + "meta.implementations.title": " – {0} 個實作", + "actions.goToImplementation.label": "前往實作", + "actions.peekImplementation.label": "預覽實作", + "goToTypeDefinition.noResultWord": "找不到 '{0}' 的任何類型定義", + "goToTypeDefinition.generic.noResults": "找不到任何類型定義", + "meta.typeDefinitions.title": " – {0} 個定義", + "actions.goToTypeDefinition.label": "移至類型定義", + "actions.peekTypeDefinition.label": "預覽類型定義" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/cht/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..24cf4f7503fe8 --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "按一下以顯示 {0} 項定義。" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/hover/browser/hover.i18n.json b/i18n/cht/src/vs/editor/contrib/hover/browser/hover.i18n.json index 43422adfd161e..7895cc33c1f48 100644 --- a/i18n/cht/src/vs/editor/contrib/hover/browser/hover.i18n.json +++ b/i18n/cht/src/vs/editor/contrib/hover/browser/hover.i18n.json @@ -4,8 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "showHover": "動態顯示", - "hoverHighlight": "在顯示了動態顯示的單字下方醒目提示。", - "hoverBackground": "編輯器動態顯示的背景色彩。", - "hoverBorder": "編輯器動態顯示的框線色彩。" + "showHover": "動態顯示" } \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/links/browser/links.i18n.json b/i18n/cht/src/vs/editor/contrib/links/browser/links.i18n.json index 405dbdb09b960..6f5daa0aa3cf1 100644 --- a/i18n/cht/src/vs/editor/contrib/links/browser/links.i18n.json +++ b/i18n/cht/src/vs/editor/contrib/links/browser/links.i18n.json @@ -6,6 +6,7 @@ { "links.navigate.mac": "按住 Cmd 並按一下按鍵以追蹤連結", "links.navigate": "按住 Ctrl 並按一下滑鼠按鈕可連入連結", + "links.navigate.al": "按住Alt並點擊以追蹤連結", "invalid.url": "抱歉,因為此連結的語式不正確,所以無法加以開啟: {0}", "missing.url": "抱歉,因為此連結遺失目標,所以無法加以開啟。", "label": "開啟連結" diff --git a/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index 001af4741896b..e42c2aa096694 100644 --- a/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -4,5 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "aria.result.0": "找不到結果" + "aria.oneReference": "個符號位於 {0} 中的第 {1} 行第 {2} 欄", + "aria.fileReferences.1": "1 個符號位於 {0}, 完整路徑 {1}", + "aria.fileReferences.N": "{0} 個符號位於 {1}, 完整路徑 {2}", + "aria.result.0": "找不到結果", + "aria.result.1": "在 {0} 中找到 1 個符號", + "aria.result.n1": "在 {1} 中找到 {0} 個符號", + "aria.result.nm": "在 {1} 個檔案中找到 {0} 個符號" } \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index 4d3b844ac4876..3dca8b60ce1d2 100644 --- a/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -12,15 +12,16 @@ "noResults": "沒有結果", "peekView.alternateTitle": "參考", "peekViewTitleBackground": "預覽檢視標題區域的背景色彩。", - "peekViewTitle": "預覽檢視標題的色彩。", - "peekViewTitleInfo": "預覽檢視標題資訊的色彩。", + "peekViewTitleForeground": "預覽檢視標題的色彩。", + "peekViewTitleInfoForeground": "預覽檢視標題資訊的色彩。", "peekViewBorder": "預覽檢視之框線與箭頭的色彩。", "peekViewResultsBackground": "預覽檢視中結果清單的背景色彩。", - "peekViewResultsMatchForeground": "在預覽檢視之結果清單中比對輸入時的前景。", - "peekViewResultsFileForeground": "在預覽檢視之結果清單中輸入檔案時的前景。", + "peekViewResultsMatchForeground": "預覽檢視結果列表中行節點的前景色彩", + "peekViewResultsFileForeground": "預覽檢視結果列表中檔案節點的前景色彩", "peekViewResultsSelectionBackground": "在預覽檢視之結果清單中選取項目時的背景色彩。", "peekViewResultsSelectionForeground": "在預覽檢視之結果清單中選取項目時的前景色彩。", "peekViewEditorBackground": "預覽檢視編輯器的背景色彩。", + "peekViewEditorGutterBackground": "預覽檢視編輯器邊框(含行號或字形圖示)的背景色彩。", "peekViewResultsMatchHighlight": "在預覽檢視編輯器中比對時的反白顯示色彩。", "peekViewEditorMatchHighlight": "預覽檢視編輯器中比對時的反白顯示色彩。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/rename/browser/rename.i18n.json b/i18n/cht/src/vs/editor/contrib/rename/browser/rename.i18n.json index 59742a35f3a86..e1b559cf2ece6 100644 --- a/i18n/cht/src/vs/editor/contrib/rename/browser/rename.i18n.json +++ b/i18n/cht/src/vs/editor/contrib/rename/browser/rename.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "no result": "沒有結果。", + "aria": "已成功將 '{0}' 重新命名為 '{1}'。摘要: {2}", "rename.failed": "抱歉,無法執行重新命名。", "rename.label": "重新命名符號" } \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json b/i18n/cht/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json index a43ef74dcf1b0..87e19ea32a121 100644 --- a/i18n/cht/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json +++ b/i18n/cht/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "arai.alert.snippet": "接受 '{0}' 時接受了插入下列文字: {1}", "suggest.trigger.label": "觸發建議" } \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/cht/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 322170be64d55..beb2f4690fc30 100644 --- a/i18n/cht/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/cht/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -4,10 +4,15 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "editorSuggestWidgetBackground": "建議小工具的背景色彩。", + "editorSuggestWidgetBorder": "建議小工具的邊界色彩。", + "editorSuggestWidgetForeground": "建議小工具的前景色彩。", + "editorSuggestWidgetSelectedBackground": "建議小工具中所選項目的背景色彩。", + "editorSuggestWidgetHighlightForeground": "建議小工具中相符醒目提示的色彩。", "readMore": "進一步了解...{0}", "suggestionWithDetailsAriaLabel": "{0},建議,有詳細資料", "suggestionAriaLabel": "{0},建議", - "goback": "返回", + "readLess": "簡易說明...{0}", "suggestWidget.loading": "正在載入...", "suggestWidget.noSuggestions": "無建議。", "suggestionAriaAccepted": "{0},接受", diff --git a/i18n/cht/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/cht/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json index e62440bc202cc..bf2bf87414cc4 100644 --- a/i18n/cht/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json +++ b/i18n/cht/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -15,5 +15,9 @@ "schema.brackets": "定義增加或減少縮排的括弧符號。", "schema.autoClosingPairs": "定義成對括弧。輸入左括弧時,即自動插入右括弧。", "schema.autoClosingPairs.notIn": "定義停用自動配對的範圍清單。", - "schema.surroundingPairs": "定義可用以括住所選字串的成對括弧。" + "schema.surroundingPairs": "定義可用以括住所選字串的成對括弧。", + "schema.wordPattern": "定義語言的文字", + "schema.wordPattern.pattern": "使用正規表示式進行文字比對", + "schema.wordPattern.flags": "使用正規表示式標記進行文字比對", + "schema.wordPattern.flags.errorMessage": "必須符合樣式 `/^([gimuy]+)$/`" } \ No newline at end of file diff --git a/i18n/cht/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/cht/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json index 993d9fa74a6a0..8a8133f764f81 100644 --- a/i18n/cht/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json +++ b/i18n/cht/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -21,6 +21,8 @@ "menus.scmTitle": "原始檔控制標題功能表", "menus.resourceGroupContext": "原始檔控制資源群組操作功能表", "menus.resourceStateContext": "原始檔控制資源群組狀態操作功能表", + "view.viewTitle": "這有助於查看標題功能表", + "view.itemContext": "這有助於查看項目內容功能表", "nonempty": "必須是非空白值。", "opticon": "屬性 `icon` 可以省略,否則必須為字串或類似 `{dark, light}` 的常值", "requireStringOrObject": "'{0}' 為必要屬性,且其類型必須是 'string' 或 'object'", diff --git a/i18n/cht/src/vs/platform/configuration/common/configurationRegistry.i18n.json b/i18n/cht/src/vs/platform/configuration/common/configurationRegistry.i18n.json index 9d2796c881889..82d7f4fe6a4bb 100644 --- a/i18n/cht/src/vs/platform/configuration/common/configurationRegistry.i18n.json +++ b/i18n/cht/src/vs/platform/configuration/common/configurationRegistry.i18n.json @@ -7,13 +7,6 @@ "defaultConfigurations.title": "預設組態覆寫", "overrideSettings.description": "設定要針對 {0} 語言覆寫的編輯器設定。", "overrideSettings.defaultDescription": "設定要針對語言覆寫的編輯器設定。", - "vscode.extension.contributes.configuration": "提供組態設定。", - "vscode.extension.contributes.configuration.title": "設定的摘要。此標籤將會在設定檔中作為分隔註解使用。", - "vscode.extension.contributes.configuration.properties": "組態屬性的描述。", "config.property.languageDefault": "無法註冊 '{0}'。這符合用於描述語言專用編輯器設定的屬性模式 '\\\\[.*\\\\]$'。請使用 'configurationDefaults' 貢獻。", - "config.property.duplicate": "無法註冊 '{0}'。此屬性已經註冊。", - "invalid.properties": "'configuration.properties' 必須是物件", - "invalid.type": "如果已設定,'configuration.type' 必須設定為物件", - "invalid.title": "'configuration.title' 必須是字串", - "vscode.extension.contributes.defaultConfiguration": "依語言貢獻預設編輯器組態設定。" + "config.property.duplicate": "無法註冊 '{0}'。此屬性已經註冊。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/platform/environment/node/argv.i18n.json b/i18n/cht/src/vs/platform/environment/node/argv.i18n.json index 5b3013c182fcf..e5703d3b95169 100644 --- a/i18n/cht/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/cht/src/vs/platform/environment/node/argv.i18n.json @@ -20,6 +20,7 @@ "showVersions": "使用 --list-extension 時,顯示安裝的擴充功能版本。", "installExtension": "安裝擴充功能。", "uninstallExtension": "解除安裝擴充功能。", + "experimentalApis": "為延伸模組啟用建議的 API 功能。", "disableExtensions": "停用所有已安裝的擴充功能。", "disableGPU": "停用 GPU 硬體加速。", "version": "列印版本。", diff --git a/i18n/cht/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/cht/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index f1ba5247c95d7..8586f1686ce66 100644 --- a/i18n/cht/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/cht/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -14,6 +14,12 @@ "vscode.extension.contributes": "此封裝所代表的所有 VS Code 擴充功能比重。", "vscode.extension.preview": "將延伸模組設為在 Marketplace 中標幟為 [預覽]。", "vscode.extension.activationEvents": "VS Code 擴充功能的啟動事件。", + "vscode.extension.activationEvents.onLanguage": "當指定語言檔案開啟時激發該事件", + "vscode.extension.activationEvents.onCommand": "當指定的命令被調用時激發該事件", + "vscode.extension.activationEvents.onDebug": "當指定的工作偵錯階段開始時激發該事件", + "vscode.extension.activationEvents.workspaceContains": "當開啟指定的文件夾包含glob模式匹配的文件時激發該事件", + "vscode.extension.activationEvents.onView": "當指定的檢視被擴展時激發該事件", + "vscode.extension.activationEvents.star": "當VS Code啟動時激發該事件,為了確保最好的使用者體驗,當您的擴充功能沒有其他組合作業時,請激活此事件.", "vscode.extension.badges": "要顯示於 Marketplace 擴充頁面資訊看板的徽章陣列。", "vscode.extension.badges.url": "徽章映像 URL。", "vscode.extension.badges.href": "徽章連結。", diff --git a/i18n/cht/src/vs/platform/history/electron-main/historyMainService.i18n.json b/i18n/cht/src/vs/platform/history/electron-main/historyMainService.i18n.json new file mode 100644 index 0000000000000..72828dcc85cd2 --- /dev/null +++ b/i18n/cht/src/vs/platform/history/electron-main/historyMainService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "newWindow": "開新視窗", + "newWindowDesc": "開啟新視窗", + "recentFolders": "最近使用的資料夾", + "folderDesc": "{0} {1}" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/cht/src/vs/platform/markers/common/problemMatcher.i18n.json index 8f89b539f15cd..7407796295650 100644 --- a/i18n/cht/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/cht/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -24,12 +24,17 @@ "NamedMultiLineProblemPatternSchema.patterns": "實際的模式。", "ProblemPatternExtPoint": "提供問題模式", "ProblemPatternRegistry.error": "問題模式無效。此模式將予忽略。", + "ProblemMatcherParser.noProblemMatcher": "錯誤: 無法將描述轉換成問題比對器:\n{0}\n", + "ProblemMatcherParser.noProblemPattern": "錯誤: 描述未定義有效的問題樣式:\n{0}\n", + "ProblemMatcherParser.noOwner": "錯誤: 描述未定義擁有者:\n{0}\n", + "ProblemMatcherParser.noFileLocation": "錯誤: 描述未定義檔案位置:\n{0}\n", "ProblemMatcherParser.unknownSeverity": "資訊: 嚴重性 {0} 不明。有效值為錯誤、警告和資訊。\n", "ProblemMatcherParser.noDefinedPatter": "錯誤: 沒有識別碼為 {0} 的樣式。", "ProblemMatcherParser.noIdentifier": "錯誤: 樣式屬性參考了空的識別碼。", "ProblemMatcherParser.noValidIdentifier": "錯誤: 樣式屬性 {0} 不是有效的樣式變數名稱。", "ProblemMatcherParser.problemPattern.watchingMatcher": "問題比對器必須同時定義監控的開始模式和結束模式。", - "WatchingPatternSchema.regexp": "規則運算式,用來偵測監看工作開始或結束。", + "ProblemMatcherParser.invalidRegexp": "錯誤: 字串 {0} 不是有效的規則運算式。\n", + "WatchingPatternSchema.regexp": "用來查看偵測背景工作開始或結束的正規表達式.", "WatchingPatternSchema.file": "檔案名稱的符合群組索引。可以省略。", "PatternTypeSchema.name": "所提供或預先定義之模式的名稱", "PatternTypeSchema.description": "問題模式或所提供或預先定義之問題模式的名稱。如有指定基底,即可發出。", @@ -38,14 +43,18 @@ "ProblemMatcherSchema.severity": "擷取項目問題的預設嚴重性。如果模式未定義嚴重性的符合群組,就會加以使用。", "ProblemMatcherSchema.applyTo": "控制文字文件上所回報的問題僅會套用至開啟的文件、關閉的文件或所有文件。", "ProblemMatcherSchema.fileLocation": "定義問題模式中所回報檔案名稱的解譯方式。", + "ProblemMatcherSchema.background": "偵測後台任務中匹配程序模式的開始與結束.", + "ProblemMatcherSchema.background.activeOnStart": "如果設置為 True,背景監控程式在工作啟動時處於主動模式。這相當於符合起始樣式的行。", + "ProblemMatcherSchema.background.beginsPattern": "如果於輸出中相符,則會指示背景程式開始。", + "ProblemMatcherSchema.background.endsPattern": "如果於輸出中相符,則會指示背景程式結束。", + "ProblemMatcherSchema.watching.deprecated": "關注屬性已被淘汰,請改用背景取代。", + "ProblemMatcherSchema.watching": "追蹤匹配程序的開始與結束。", "ProblemMatcherSchema.watching.activeOnStart": "如果設定為 True,監控程式在工作啟動時處於主動模式。這相當於發出符合 beginPattern 的行", "ProblemMatcherSchema.watching.beginsPattern": "如果在輸出中相符,則會指示監看工作開始。", "ProblemMatcherSchema.watching.endsPattern": "如果在輸出中相符,則會指示監看工作結束。", - "ProblemMatcherSchema.watching": "這些模式可用於從頭到尾追蹤所關注的模式。", "LegacyProblemMatcherSchema.watchedBegin.deprecated": "此屬性即將淘汰。請改用關注的屬性。", "LegacyProblemMatcherSchema.watchedBegin": "規則運算式,指示監看的工作開始執行 (透過檔案監看觸發)。", "LegacyProblemMatcherSchema.watchedEnd.deprecated": "此屬性即將淘汰。請改用關注的屬性。", "LegacyProblemMatcherSchema.watchedEnd": "規則運算式,指示監看的工作結束執行。", - "NamedProblemMatcherSchema.name": "問題比對器的名稱。", "ProblemMatcherExtPoint": "提供問題比對器" } \ No newline at end of file diff --git a/i18n/cht/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/cht/src/vs/platform/theme/common/colorRegistry.i18n.json index 498fa64cbcfff..02b323822c61c 100644 --- a/i18n/cht/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/cht/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -4,27 +4,81 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.color": "色彩格式無效。請使用 #RRGGBB 或 #RRGGBBAA", + "invalid.color": "色彩格式無效。請使用 #RGB、#RGBA、#RRGGBB 或 #RRGGBBAA", "schema.colors": "工作台中使用的色彩。", "foreground": "整體的前景色彩。僅當未被任何元件覆疊時,才會使用此色彩。", - "focusedElementOutline": "焦點項目的整體邊框/框線色彩。僅當未被任何元件覆疊時,才會使用此色彩。", - "highContrastBorder": "當啟用高對比佈景主題時,用以分隔元件的框線色彩。", - "highContrastOutline": "當啟用高對比佈景主題時,作用中元件的框線色彩。", + "errorForeground": "整體錯誤訊息的前景色彩。僅當未被任何元件覆蓋時,才會使用此色彩。", + "descriptionForeground": "提供附加訊息的前景顏色,例如標籤", + "focusBorder": "焦點項目的整體框線色彩。只在沒有任何元件覆寫此色彩時,才會加以使用。", + "contrastBorder": "項目周圍的額外框線,可將項目從其他項目中區隔出來以提高對比。", + "activeContrastBorder": "使用中項目周圍的額外邊界,可將項目從其他項目中區隔出來以提高對比。", + "selectionBackground": "作業區域選取的背景顏色(例如輸入或文字區域)。請注意,這不適用於編輯器中的選取。", + "textSeparatorForeground": "文字分隔符號的顏色。", + "textLinkForeground": "內文連結的前景色彩", + "textLinkActiveForeground": "內文使用連結的前景色彩", + "textPreformatForeground": "提示及建議文字的前景色彩。", + "textBlockQuoteBackground": "文內引用區塊背景色彩。", + "textBlockQuoteBorder": "引用文字的框線顏色。", + "textCodeBlockBackground": "文字區塊的背景顏色。", + "widgetShadow": "小工具的陰影色彩,例如編輯器中的尋找/取代。", "inputBoxBackground": "輸入方塊的背景。", "inputBoxForeground": "輸入方塊的前景。", "inputBoxBorder": "輸入方塊的框線。", "inputBoxActiveOptionBorder": "輸入欄位中可使用之項目的框線色彩。", + "inputPlaceholderForeground": "文字輸入替代字符的前景顏色。", + "inputValidationInfoBackground": "資訊嚴重性的輸入驗證背景色彩。", + "inputValidationInfoBorder": "資訊嚴重性的輸入驗證邊界色彩。", + "inputValidationWarningBackground": "資訊警告的輸入驗證背景色彩。", + "inputValidationWarningBorder": "警告嚴重性的輸入驗證邊界色彩。", + "inputValidationErrorBackground": "錯誤嚴重性的輸入驗證背景色彩。", + "inputValidationErrorBorder": "錯誤嚴重性的輸入驗證邊界色彩。", "dropdownBackground": "下拉式清單的背景。", "dropdownForeground": "下拉式清單的前景。", "dropdownBorder": "下拉式清單的框線。", + "listFocusBackground": "當清單/樹狀為使用中狀態時,焦點項目的清單/樹狀背景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。", + "listFocusForeground": "當清單/樹狀為使用中狀態時,焦點項目的清單/樹狀前景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。", + "listActiveSelectionBackground": "當清單/樹狀為使用中狀態時,所選項目的清單/樹狀背景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。", + "listActiveSelectionForeground": "當清單/樹狀為使用中狀態時,所選項目的清單/樹狀前景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。", + "listInactiveSelectionBackground": "當清單/樹狀為非使用中狀態時,所選項目的清單/樹狀背景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。", + "listInactiveSelectionForeground": "當清單/樹狀為使用中狀態時,所選項目的清單/樹狀前景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中則沒有。", + "listHoverBackground": "使用滑鼠暫留在項目時的清單/樹狀背景。", + "listHoverForeground": "滑鼠暫留在項目時的清單/樹狀前景。", + "listDropBackground": "使用滑鼠四處移動項目時的清單/樹狀拖放背景。", + "highlight": "在清單/樹狀內搜尋時,相符醒目提示的清單/樹狀前景色彩。", + "pickerGroupForeground": "分組標籤的快速選擇器色彩。", + "pickerGroupBorder": "分組邊界的快速選擇器色彩。", + "buttonForeground": "按鈕前景色彩。", + "buttonBackground": "按鈕背景色彩。", + "buttonHoverBackground": "暫留時的按鈕背景色彩。", + "badgeBackground": "標記的背景顏色。標記為小型的訊息標籤,例如搜尋結果的數量。", + "badgeForeground": "標記的前景顏色。標記為小型的訊息標籤,例如搜尋結果的數量。", + "scrollbarShadow": "指出在捲動該檢視的捲軸陰影。", + "scrollbarSliderBackground": "滑桿背景色彩。", + "scrollbarSliderHoverBackground": "暫留時的滑桿背景色彩。", + "scrollbarSliderActiveBackground": "使用中狀態時的滑桿背景色彩。", + "progressBarBackground": "長時間運行進度條的背景色彩.", "editorBackground": "編輯器的背景色彩。", "editorForeground": "編輯器的預設前景色彩。", - "editorSelection": "編輯器選取範圍的色彩。", + "editorWidgetBackground": "編輯器小工具的背景色彩,例如尋找/取代。", + "editorWidgetBorder": "編輯器小工具的邊界色彩。小工具選擇擁有邊界或色彩未被小工具覆寫時,才會使用色彩。", "editorInactiveSelection": "非使用中之編輯器選取範圍的色彩。", "editorSelectionHighlight": "選取時,內容相同之區域的色彩。", "editorFindMatch": "符合目前搜尋的色彩。", "findMatchHighlight": "符合其他搜尋的色彩。", "findRangeHighlight": "限制搜尋之範圍的色彩。", + "hoverHighlight": "在顯示了動態顯示的單字下方醒目提示。", + "hoverBackground": "編輯器動態顯示的背景色彩。", + "hoverBorder": "編輯器動態顯示的框線色彩。", "activeLinkForeground": "使用中之連結的色彩。", - "linkForeground": "連結的色彩。" + "diffEditorInserted": "插入文字的背景色彩。", + "diffEditorRemoved": "移除文字的背景色彩。", + "diffEditorInsertedOutline": "插入的文字外框色彩。", + "diffEditorRemovedOutline": "移除的文字外框色彩。", + "mergeCurrentHeaderBackground": "目前內嵌合併衝突中的深色標題背景。", + "mergeCurrentContentBackground": "目前內嵌合併衝突中的內容背景。", + "mergeIncomingHeaderBackground": "傳入內嵌合併衝突中的深色標題背景。", + "mergeIncomingContentBackground": "傳入內嵌合併衝突中的內容背景。", + "mergeBorder": "內嵌合併衝突中標頭及分隔器的邊界色彩。", + "overviewRulerCurrentContentForeground": "目前內嵌合併衝突的概觀尺規前景。", + "overviewRulerIncomingContentForeground": "傳入內嵌合併衝突的概觀尺規前景。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/cht/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json new file mode 100644 index 0000000000000..36b2b7b357e35 --- /dev/null +++ b/i18n/cht/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "overwritingExtension": "正在以 {1} 覆寫延伸模組 {0}。", + "extensionUnderDevelopment": "正在載入位於 {0} 的開發延伸模組" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/cht/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json new file mode 100644 index 0000000000000..4d3f09317ea91 --- /dev/null +++ b/i18n/cht/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "關閉", + "cancel": "取消", + "ok": "確定" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/api/node/extHostExplorerView.i18n.json b/i18n/cht/src/vs/workbench/api/node/extHostExplorerView.i18n.json new file mode 100644 index 0000000000000..24e5da7900523 --- /dev/null +++ b/i18n/cht/src/vs/workbench/api/node/extHostExplorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "未註冊識別碼為 '{0}' 的 TreeExplorerNodeProvider。", + "treeExplorer.failedToProvideRootNode": "TreeExplorerNodeProvider '{0}' 無法提供根節點。" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/cht/src/vs/workbench/api/node/extHostTask.i18n.json new file mode 100644 index 0000000000000..4b90a12aaf247 --- /dev/null +++ b/i18n/cht/src/vs/workbench/api/node/extHostTask.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "task.label": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/api/node/extHostTreeView.i18n.json b/i18n/cht/src/vs/workbench/api/node/extHostTreeView.i18n.json new file mode 100644 index 0000000000000..24e5da7900523 --- /dev/null +++ b/i18n/cht/src/vs/workbench/api/node/extHostTreeView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "未註冊識別碼為 '{0}' 的 TreeExplorerNodeProvider。", + "treeExplorer.failedToProvideRootNode": "TreeExplorerNodeProvider '{0}' 無法提供根節點。" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/cht/src/vs/workbench/api/node/extHostTreeViews.i18n.json new file mode 100644 index 0000000000000..edc32bace6e95 --- /dev/null +++ b/i18n/cht/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeView.notRegistered": "未註冊識別碼為 '{0}' 的樹狀檢視。", + "treeItem.notFound": "找不到識別碼為 '{0}' 的樹狀檢視。", + "treeView.duplicateElement": "元件{0}已被註冊" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json b/i18n/cht/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json index f5d3fe58b6219..e2c33864cd6df 100644 --- a/i18n/cht/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json +++ b/i18n/cht/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "hideActivitBar": "隱藏活動列", - "activityBarAriaLabel": "即時檢視切換器" + "activityBarAriaLabel": "即時檢視切換器", + "globalActions": "全域動作" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/cht/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index 7262a8948e380..1228bd7f60dca 100644 --- a/i18n/cht/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/cht/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -44,6 +44,8 @@ "openPreviousRecentlyUsedEditorInGroup": "開啟群組中上一個最近使用的編輯器", "openNextRecentlyUsedEditorInGroup": "開啟群組中下一個最近使用的編輯器", "navigateEditorHistoryByInput": "從記錄中開啟上一個編輯器", + "openNextRecentlyUsedEditor": "開啟下一個最近使用的編輯器", + "openPreviousRecentlyUsedEditor": "開啟上一個最近使用的編輯器", "clearEditorHistory": "清除編輯器記錄", "focusLastEditorInStack": "開啟群組中最後一個編輯器", "moveEditorLeft": "將編輯器左移", diff --git a/i18n/cht/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/cht/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index 3ee2576e0d359..31e2ba3cca7bc 100644 --- a/i18n/cht/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/cht/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -11,6 +11,8 @@ "endOfLineLineFeed": "LF", "endOfLineCarriageReturnLineFeed": "CRLF", "tabFocusModeEnabled": "用 Tab 鍵移動焦點", + "screenReaderDetected": "偵測到螢幕助讀程式", + "screenReaderDetectedExtra": "若您不打算使用螢幕助讀程式,請將設定 `editor.accessibilitySupport` 變更為 \"off\"。", "disableTabMode": "停用協助工具模式", "gotoLine": "移至行", "indentation": "縮排", diff --git a/i18n/cht/src/vs/workbench/browser/parts/editor/titleControl.i18n.json b/i18n/cht/src/vs/workbench/browser/parts/editor/titleControl.i18n.json index 1d56fbd1f8026..bfffed93b029e 100644 --- a/i18n/cht/src/vs/workbench/browser/parts/editor/titleControl.i18n.json +++ b/i18n/cht/src/vs/workbench/browser/parts/editor/titleControl.i18n.json @@ -8,6 +8,7 @@ "closeOthers": "關閉其他", "closeRight": "關到右側", "closeAll": "全部關閉", + "closeAllUnmodified": "關閉未變更的檔案", "keepOpen": "保持開啟", "showOpenedEditors": "顯示開啟的編輯器", "araLabelEditorActions": "編輯器動作" diff --git a/i18n/cht/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json b/i18n/cht/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json new file mode 100644 index 0000000000000..4e28880164248 --- /dev/null +++ b/i18n/cht/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpen": "移至檔案...", + "quickNavigateNext": "在 Quick Open 中導覽至下一項", + "quickNavigatePrevious": "在 Quick Open 中導覽至上一項", + "quickSelectNext": "在 Quick Open 中選取下一個", + "quickSelectPrevious": "在 Quick Open 中選取上一個" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/browser/quickopen.i18n.json b/i18n/cht/src/vs/workbench/browser/quickopen.i18n.json index c47858a81d205..cab0a05a7b4a3 100644 --- a/i18n/cht/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/cht/src/vs/workbench/browser/quickopen.i18n.json @@ -6,6 +6,5 @@ { "noResultsMatching": "沒有相符的結果", "noResultsFound2": "找不到結果", - "entryAriaLabel": "{0},命令", - "noCommands": "沒有相符的命令" + "entryAriaLabel": "{0},命令" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/browser/viewlet.i18n.json b/i18n/cht/src/vs/workbench/browser/viewlet.i18n.json index 26801a4aefd57..690069abe9667 100644 --- a/i18n/cht/src/vs/workbench/browser/viewlet.i18n.json +++ b/i18n/cht/src/vs/workbench/browser/viewlet.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "collapse": "全部摺疊", - "viewToolbarAriaLabel": "{0} 個動作" + "collapse": "全部摺疊" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/common/theme.i18n.json b/i18n/cht/src/vs/workbench/common/theme.i18n.json index 2299f7297c4ad..938086e4262e6 100644 --- a/i18n/cht/src/vs/workbench/common/theme.i18n.json +++ b/i18n/cht/src/vs/workbench/common/theme.i18n.json @@ -4,39 +4,49 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "tabsContainerBackground": "索引標籤容器的背景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", - "activeTabBackground": "使用中之索引標籤的背景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", - "inactiveTabBackground": "非使用中之索引標籤的背景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", - "activeTabActiveGroupForeground": "使用中的群組內,使用中之索引標籤的前景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", - "activeTabInactiveGroupForeground": "非使用中的群組內,使用中之索引標籤的前景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", - "inactiveTabActiveGroupForeground": "使用中的群組內,非使用中之索引標籤的前景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", - "inactiveTabInactiveGroupForeground": "非使用中的群組內,非使用中之索引標籤的前景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", + "tabActiveBackground": "使用中之索引標籤的背景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", + "tabInactiveBackground": "非使用中之索引標籤的背景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", "tabBorder": "用以分隔索引標籤彼此的框線。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", - "editorHeaderBackground": "當未啟用任何索引標籤時,編輯器標題的背景色彩。", + "tabActiveForeground": "使用中的群組內,使用中之索引標籤的前景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", + "tabInactiveForeground": "使用中的群組內,非使用中之索引標籤的前景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", + "tabUnfocusedActiveForeground": "非使用中的群組內,使用中之索引標籤的前景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", + "tabUnfocusedInactiveForeground": "非使用中的群組內,非使用中之索引標籤的前景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", + "editorGroupBackground": "編輯器群組的背景色彩。編輯器群組是編輯器的容器。當拖曳編輯器群組時會顯示背景色彩。", + "tabsContainerBackground": "當索引標籤啟用的時候編輯器群組標題的背景色彩。編輯器群組是編輯器的容器。", + "tabsContainerBorder": "當索引標籤啟用時,編輯器群組標題的框線色彩。編輯器群組是編輯器的容器。", + "editorGroupHeaderBackground": "當索引標籤禁用的時候編輯器群組標題的背景顏色。編輯器群組是編輯器的容器。", "editorGroupBorder": "用以分隔多個編輯器群組彼此的色彩。編輯器群組是編輯器的容器。", - "editorGroupBackground": "編輯器群組的背景色彩。編輯器群組是編輯器的容器。", - "editorDragAndDropBackground": "拖曳編輯器時的背景色彩。", - "editorSideBySideBorder": "用以分隔詳細資料與並排編輯器之主要排的框線色彩。", + "editorDragAndDropBackground": "拖拉編輯器時的背景顏色,可設置透明度讓內容穿透顯示.", "panelBackground": "面板的前景色彩。面板會顯示在編輯器區域的下方,其中包含諸如輸出與整合式終端機等檢視。", - "panelTopBorder": "面板頂端用以分隔編輯器的邊框色彩。面板會顯示在編輯器區域的下方,其中包含諸如輸出與整合式終端機等檢視。", + "panelBorder": "面板頂端用以分隔編輯器的邊框色彩。面板會顯示在編輯器區域的下方,其中包含諸如輸出與整合式終端機等檢視。", "panelActiveTitleForeground": "使用中之面板標題的標題色彩。面板會顯示在編輯器區域的下方,其中包含諸如輸出與整合式終端機等檢視。", "panelInactiveTitleForeground": "非使用中之面板標題的標題色彩。面板會顯示在編輯器區域的下方,其中包含諸如輸出與整合式終端機等檢視。", "panelActiveTitleBorder": "使用中之面板標題的框線色彩。面板會顯示在編輯器區域的下方,其中包含諸如輸出與整合式終端機等檢視。", "statusBarForeground": "狀態列的前景色彩。狀態列會顯示在視窗的底部。", "statusBarBackground": "標準狀態列的背景色彩。狀態列會顯示在視窗的底部。", + "statusBarBorder": "用以分隔資訊看板與編輯器的狀態列框線色彩。狀態列會顯示在視窗的底部。", "statusBarNoFolderBackground": "當未開啟任何資料夾時,狀態列的背景色彩。狀態列會顯示在視窗的底部。", + "statusBarNoFolderForeground": "當未開啟任何資料夾時,狀態列的前景色彩。狀態列會顯示在視窗的底部。", "statusBarItemActiveBackground": "按下滑鼠按鈕時,狀態列項目的背景色彩。狀態列會顯示在視窗的底部。", "statusBarItemHoverBackground": "動態顯示時,狀態列項目的背景色彩。狀態列會顯示在視窗的底部。", - "statusBarInfoItemBackground": "狀態列資訊項目的背景色彩。狀態列會顯示在視窗的底部。", - "statusBarInfoItemHoverBackground": "動態顯示時,狀態列資訊項目的背景色彩。狀態列會顯示在視窗的底部。", + "statusBarProminentItemBackground": "狀態列突出項目的背景顏色。突出項目比狀態列的其他項目更顯眼,用於表示重要性更高。狀態列會顯示在視窗的底部。", + "statusBarProminentItemHoverBackground": "狀態列突出項目暫留時的背景顏色。突出項目比狀態列的其他項目更顯眼,用於表示重要性更高。狀態列會顯示在視窗的底部。", "activityBarBackground": "活動列背景的色彩。活動列會顯示在最左側或最右側,並可切換不同的提要欄位檢視。", - "activityBarDragAndDropBackground": "拖放活動列項目之意見回應時的色彩。此活動列會顯示在最左側或最右側,讓您可以切換提要欄位的不同檢視。", - "activityBadgeBackground": "活動通知徽章的背景色彩。此活動列會顯示在最左側或最右側,讓您可以切換提要欄位的不同檢視。", - "activityBadgeForeground": "活動通知徽章的前背景色彩。此活動列會顯示在最左側或最右側,讓您可以切換提要欄位的不同檢視。", + "activityBarForeground": "活動列的前背景色彩(例如用於圖示)。此活動列會顯示在最左側或最右側,讓您可以切換提要欄位的不同檢視。", + "activityBarBorder": "用以分隔提要欄位的活動列框線色彩。此活動列會顯示在最左側或最右側,讓您可以切換提要欄位的不同檢視。", + "activityBarDragAndDropBackground": "拖拉活動徽章項目時的色彩.顏色可設置透明度讓原活動徽章可穿透顯示.活動徽章列表會出現在最左側或最右側並允許切換不同的檢視.", + "activityBarBadgeBackground": "活動通知徽章的背景色彩。此活動列會顯示在最左側或最右側,讓您可以切換提要欄位的不同檢視。", + "activityBarBadgeForeground": "活動通知徽章的前背景色彩。此活動列會顯示在最左側或最右側,讓您可以切換提要欄位的不同檢視。", "sideBarBackground": "提要欄位的背景色彩。提要欄位是檢視 (例如 Explorer 與搜尋) 的容器。", + "sideBarForeground": "側欄的前景顏色.側欄包含Explorer與搜尋.", + "sideBarBorder": "用以分隔編輯器的側邊提要欄位框線色彩。該提要欄位是檢視 (例如 Explorer 及搜尋) 的容器。", "sideBarTitleForeground": "提要欄位標題的前景色彩。提要欄位是檢視 (例如 Explorer 與搜尋) 的容器。", + "sideBarSectionHeaderBackground": "提要欄位區段標頭的背景色彩。提要欄位是檢視 (例如 Explorer 與搜尋) 的容器。", + "sideBarSectionHeaderForeground": "提要欄位區段標頭的前景色彩。提要欄位是檢視 (例如 Explorer 與搜尋) 的容器。", "titleBarActiveForeground": "作用中視窗之標題列的前景。請注意,目前只有 macOS 支援此色彩。", "titleBarInactiveForeground": "非作用中視窗之標題列的前景。請注意,目前只有 macOS 支援此色彩。", "titleBarActiveBackground": "作用中視窗之標題列的背景。請注意,目前只有 macOS 支援此色彩。", - "titleBarInactiveBackground": "非作用中視窗之標題列的背景。請注意,目前只有 macOS 支援此色彩。" + "titleBarInactiveBackground": "非作用中視窗之標題列的背景。請注意,目前只有 macOS 支援此色彩。", + "notificationsForeground": "通知的前景色彩。通知從視窗的上方滑入。", + "notificationsBackground": "通知的背景色彩。通知從視窗的上方滑入。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/cht/src/vs/workbench/electron-browser/actions.i18n.json index 5268fd64574f1..c90fe12a2f58b 100644 --- a/i18n/cht/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/cht/src/vs/workbench/electron-browser/actions.i18n.json @@ -6,9 +6,6 @@ { "closeActiveEditor": "關閉編輯器", "closeWindow": "關閉視窗", - "switchWindow": "切換視窗", - "switchWindowPlaceHolder": "選取視窗", - "current": "目前視窗", "closeFolder": "關閉資料夾", "noFolderOpened": "此執行個體中目前沒有開啟的資料夾可以關閉。", "newWindow": "開新視窗", @@ -20,11 +17,14 @@ "zoomReset": "重設縮放", "appPerf": "啟動效能", "reloadWindow": "重新載入視窗", - "openRecent": "開啟最近使用的檔案", + "current": "目前視窗", + "switchWindow": "切換視窗...", "folders": "資料夾", "files": "檔案", "openRecentPlaceHolderMac": "選取路徑 (按住 Cmd 鍵以在新視窗開啟)", "openRecentPlaceHolder": "選取要開啟的路徑 (按住 Ctrl 鍵以在新視窗開啟)", + "openRecent": "開啟最近使用的檔案...", + "quickOpenRecent": "快速開啟最近使用的檔案...", "closeMessages": "關閉通知訊息", "reportIssues": "回報問題", "reportPerformanceIssue": "回報效能問題", @@ -32,10 +32,10 @@ "openDocumentationUrl": "文件", "openIntroductoryVideosUrl": "簡介影片", "toggleSharedProcess": "切換共用處理序", - "navigateLeft": "移至 [檢視左側]", - "navigateRight": "移至 [檢視右側]", - "navigateUp": "移至 [檢視上方]", - "navigateDown": "移至 [檢視下方]", + "navigateLeft": "導覽至 [檢視左側]", + "navigateRight": "導覽至 [檢視右側]", + "navigateUp": "導覽至 [檢視上方]", + "navigateDown": "導覽至 [檢視下方]", "increaseViewSize": "增加目前的檢視大小", "decreaseViewSize": "縮小目前的檢視大小" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json index f9a78df403212..9dec716968a0a 100644 --- a/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,6 +7,7 @@ "view": "檢視", "help": "說明", "file": "檔案", + "developer": "開發人員", "showEditorTabs": "控制已開啟的編輯器是否應顯示在索引標籤中。", "editorTabCloseButton": "控制編輯器的索引標籤關閉按鈕位置,或在設為 'off' 時將其停用。", "showIcons": "控制開啟的編輯器是否搭配圖示顯示。這需要同時啟用圖示佈景主題。", @@ -20,6 +21,7 @@ "statusBarVisibility": "控制 Workbench 底端狀態列的可視性。", "activityBarVisibility": "控制活動列在 workbench 中的可見度。", "closeOnFileDelete": "控制顯示檔案的編輯器是否應在其他處理序刪除或重新命名該檔案時自動關閉。若停用此選項,當發生前述狀況時,編輯器會保持開啟,並呈現已變更的狀態。請注意,從應用程式內刪除一律會關閉編輯器,但已變更的檔案在資料未儲存前一律不會關閉。", + "swipeToNavigate": "利用三指水平撥動在開啟的檔案間瀏覽。", "workbenchConfigurationTitle": "工作台", "window.openFilesInNewWindow.on": "檔案會在新視窗中開啟", "window.openFilesInNewWindow.off": "檔案會在開啟了檔案資料夾的視窗,或在上一個使用中的視窗中開啟", @@ -29,29 +31,29 @@ "window.openFoldersInNewWindow.off": "資料夾會取代上一個使用中的視窗", "window.openFoldersInNewWindow.default": "除非已從應用程式內挑選了資料夾 (例如透過 [檔案] 功能表),否則資料夾會在新視窗中開啟", "openFoldersInNewWindow": "控制資料夾應在新視窗中開啟或取代上一個使用中的視窗。\n- default: 除非已從應用程式內挑選資料夾 (例如,透過 [檔案] 功能表),否則會在新視窗開啟\n- on: 資料夾會在新視窗開啟\n- off: 資料夾會取代上一個使用中視窗\n請注意,在某些情況下會略過此設定 (例如,使用了 -new-window 或 -reuse-window 命令列選項時)。", - "window.reopenFolders.none": "一律不重新開啟資料夾。", - "window.reopenFolders.one": "重新開啟上一個使用中的資料夾。", - "window.reopenFolders.all": "重新開啟上一個工作階段的所有資料夾。", - "reopenFolders": "控制重新啟動後重新開啟資料夾的方式。選取 [none] 永不重新開啟資料夾,選取 [one] 重新開啟最近一個使用的資料夾,或選取 [all] 重新開啟上一個工作階段的所有資料夾。", "restoreFullscreen": "控制當視窗在全螢幕模式下結束後,下次是否仍以全螢幕模式開啟。", "zoomLevel": "調整視窗的縮放比例。原始大小為 0,而且每個向上增量 (例如 1) 或向下增量 (例如 -1) 代表放大或縮小 20%。您也可以輸入小數,更細微地調整縮放比例。", - "title": "控制使用中之編輯器上的視窗標題。變數會依內容替換: \n${activeEditorShort}: 例如 myFile.txt\n${activeEditorMedium}: 例如 myFolder/myFile.txt\n${activeEditorLong}: 例如 /Users/Development/myProject/myFolder/myFile.txt\n${rootName}: 例如 myProject\n${rootPath}: 例如 /Users/Development/myProject\n${appName}: 例如 VS Code\n${dirty}: 若使用中的編輯器已變更,即為已變更的指標\n${separator}: 條件式分隔符號 (\" - \"),只會在前後有包含值的變數時顯示", "window.newWindowDimensions.default": "在螢幕中央開啟新視窗。", "window.newWindowDimensions.inherit": "以相同於上一個使用中之視窗的維度開啟新視窗。", "window.newWindowDimensions.maximized": "開啟並最大化新視窗。", "window.newWindowDimensions.fullscreen": "在全螢幕模式下開啟新視窗。", - "newWindowDimensions": "控制開啟新視窗的維度。根據預設,新視窗會以小型維度在畫面中央開啟。設為 'inherit' 時,視窗的維度會和上一個使用中視窗相同。設為 'maximized' 時,視窗會開到最大,若設為 'fullscreen' 則全螢幕開啟。", + "newWindowDimensions": "控制當至少一個視窗已打開的情況下開啟新視窗的維度。根據預設,新視窗會以小型維度在畫面中央開啟。設為 'inherit' 時,視窗的維度會和最後開啟的視窗相同。設為 'maximized' 時,視窗會開到最大,若設為 'fullscreen' 則全螢幕開啟。", "window.menuBarVisibility.default": "只在全螢幕模式時隱藏功能表。", "window.menuBarVisibility.visible": "一律顯示功能表,即使在全螢幕模式時亦然。", "window.menuBarVisibility.toggle": "隱藏功能表,但可經由 Alt 鍵加以顯示。", "window.menuBarVisibility.hidden": "一律隱藏功能表。", "menuBarVisibility": "控制功能表列的可見度。[切換] 設定表示會隱藏功能表列,按一下 Alt 鍵則會顯示。除非視窗是全螢幕,否則預設會顯示功能表列。", + "enableMenuBarMnemonics": "啟用後可以利用Alt快捷鍵打開主選單.關閉記憶選單將Alt快捷鍵綁定至替代的命令區塊.", "autoDetectHighContrast": "若啟用,如果 Windows 使用高對比佈景主題,就會自動變更為高對比佈景主題,切換掉 Windows 高對比佈景主題時則變更為深色佈景主題。", "titleBarStyle": "調整視窗標題列的外觀。變更需要完整重新啟動才會套用。", + "window.nativeTabs": "啟用 macOS Sierra 視窗索引標籤。請注意需要完全重新啟動才能套用變更,並且完成設定後原始索引標籤將會停用自訂標題列樣式。", "windowConfigurationTitle": "視窗", "zenModeConfigurationTitle": "Zen Mode", "zenMode.fullScreen": "控制開啟 Zen Mode 是否也會將 Workbench 轉換為全螢幕模式。", "zenMode.hideTabs": "控制開啟 Zen Mode 是否也會隱藏 Workbench 索引標籤。", "zenMode.hideStatusBar": "控制開啟 Zen Mode 是否也會隱藏 Workbench 底部的狀態列。", - "zenMode.restore": "控制視窗如果在 Zen Mode 下結束,是否應還原為 Zen Mode。" + "zenMode.hideActivityBar": "控制開啟 Zen Mode 是否也會隱藏 Workbench 左方的活動列。", + "zenMode.restore": "控制視窗如果在 Zen Mode 下結束,是否應還原為 Zen Mode。", + "workspaceConfigurationTitle": "工作區", + "files.exclude.boolean": "要符合檔案路徑的 Glob 模式。設為 True 或 False 可啟用或停用模式。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/electron-browser/shell.i18n.json b/i18n/cht/src/vs/workbench/electron-browser/shell.i18n.json index cd49d332f0dfc..5a00c19854990 100644 --- a/i18n/cht/src/vs/workbench/electron-browser/shell.i18n.json +++ b/i18n/cht/src/vs/workbench/electron-browser/shell.i18n.json @@ -4,9 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "runningAsRoot": "建議不要以 'root' 身分執行 Code。", - "prof.message": "已成功建立設定檔。", - "prof.detail": "請建立問題,並手動附加下列檔案:\n{0}", - "prof.restartAndFileIssue": "建立問題並重新啟動", - "prof.restart": "重新啟動" + "runningAsRoot": "建議不要以 'root' 身分執行 Code。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/electron-browser/window.i18n.json b/i18n/cht/src/vs/workbench/electron-browser/window.i18n.json index 89eb6c3653d6b..091cf1f44e4df 100644 --- a/i18n/cht/src/vs/workbench/electron-browser/window.i18n.json +++ b/i18n/cht/src/vs/workbench/electron-browser/window.i18n.json @@ -11,7 +11,5 @@ "paste": "貼上", "selectAll": "全選", "confirmOpen": "確定要開啟 {0} 資料夾嗎?", - "confirmOpenButton": "開啟(&&O)...", - "developer": "開發人員", - "file": "檔案" + "confirmOpenButton": "開啟(&&O)..." } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/cht/src/vs/workbench/electron-browser/workbench.i18n.json new file mode 100644 index 0000000000000..2375ce9a84fc6 --- /dev/null +++ b/i18n/cht/src/vs/workbench/electron-browser/workbench.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "developer": "開發人員", + "file": "檔案" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json b/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json new file mode 100644 index 0000000000000..9e13a86b296f4 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emergencyConfOn": "現在請將設定 `editor.accessibilitySupport` 變更為 'on'。", + "openingDocs": "現在請開啟 VS Code 協助工具文件頁面。", + "introMsg": "感謝您試用 VS Code 的協助工具選項。", + "status": "狀態:", + "changeConfigToOnMac": "若要將編輯器為螢幕助讀程式的使用方式設定為永久地最佳化,現在請按 Command+E。", + "changeConfigToOnWinLinux": "若要將編輯器為螢幕助讀程式的使用方式設定為永久地最佳化,現在請按 Control+E。", + "auto_unknown": "編輯器已設定為使用平台 API 以偵測螢幕助讀程式附加,但是目前的執行階段不支援。", + "auto_on": "編輯器已自動偵測到螢幕助讀程式附加。", + "auto_off": "編輯器已設定為自動偵測螢幕助讀程式附加,但目前的實際狀況卻不是如此。", + "configuredOn": "編輯器已為螢幕助讀程式的使用方式設定為永久地更新 - 您可以藉由編輯設定 `editor.accessibilitySupport` 以變更這項設定。", + "configuredOff": "編輯器已設定為不會為螢幕助讀程式的使用方式進行最佳化。", + "tabFocusModeOnMsg": "在目前的編輯器中按 Tab 鍵會將焦點移至下一個可設定焦點的元素。按 {0} 可切換此行為。", + "tabFocusModeOnMsgNoKb": "在目前的編輯器中按 Tab 鍵會將焦點移至下一個可設定焦點的元素。命令 {0} 目前無法由按鍵繫結關係觸發。", + "tabFocusModeOffMsg": "在目前的編輯器中按 Tab 鍵會插入定位字元。按 {0} 可切換此行為。", + "tabFocusModeOffMsgNoKb": "在目前的編輯器中按 Tab 鍵會插入定位字元。命令 {0} 目前無法由按鍵繫結關係觸發。", + "openDocMac": "現在請按 Command+H 以開啟具有更多與協助工具相關 VS Code 資訊的瀏覽器視窗。", + "openDocWinLinux": "現在請按 Control+H 以開啟具有更多與協助工具相關 VS Code 資訊的瀏覽器視窗。", + "outroMsg": "您可以按 Esc 鍵或 Shift+Esc 鍵來解除此工具提示並返回編輯器。", + "ShowAccessibilityHelpAction": "顯示協助工具說明" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json index c5e4314489b8e..ff6f3d234e919 100644 --- a/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "workbench.action.inspectKeyMap": "Developer: Inspect Key Mapppings" + "workbench.action.inspectKeyMap": "開發人員: 檢查按鍵對應" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json b/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..ef380d89f981f --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inspectTMScopes": "開發人員: 檢查 TM 範圍", + "inspectTMScopesWidget.loading": "正在載入..." +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json b/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json new file mode 100644 index 0000000000000..40e6f7e4ac387 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parseErrors": "剖析 {0} 時發生錯誤: {1}", + "schema.openBracket": "左括弧字元或字串順序。", + "schema.closeBracket": "右括弧字元或字串順序。", + "schema.comments": "定義註解符號", + "schema.blockComments": "定義標記區塊註解的方式。", + "schema.blockComment.begin": "區塊註解開頭的字元順序。", + "schema.blockComment.end": "區塊註解結尾的字元順序。", + "schema.lineComment": "行註解開頭的字元順序。", + "schema.brackets": "定義增加或減少縮排的括弧符號。", + "schema.autoClosingPairs": "定義成對括弧。輸入左括弧時,即自動插入右括弧。", + "schema.autoClosingPairs.notIn": "定義停用自動配對的範圍清單。", + "schema.surroundingPairs": "定義可用以括住所選字串的成對括弧。", + "schema.wordPattern": "定義語言的文字", + "schema.wordPattern.pattern": "使用正規表示式進行文字比對", + "schema.wordPattern.flags": "使用正規表示式標記進行文字比對", + "schema.wordPattern.flags.errorMessage": "必須符合樣式 `/^([gimuy]+)$/`", + "schema.indentationRules.increaseIndentPattern.errorMessage": "必須符合樣式 `/^([gimuy]+)$/`", + "schema.indentationRules.decreaseIndentPattern.errorMessage": "必須符合樣式 `/^([gimuy]+)$/`", + "schema.indentationRules.indentNextLinePattern.errorMessage": "必須符合樣式 `/^([gimuy]+)$/`", + "schema.indentationRules.unIndentedLinePattern.errorMessage": "必須符合樣式 `/^([gimuy]+)$/`" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json b/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..ef380d89f981f --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inspectTMScopes": "開發人員: 檢查 TM 範圍", + "inspectTMScopesWidget.loading": "正在載入..." +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json b/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json new file mode 100644 index 0000000000000..fef7fe532f8f2 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "切換至多游標修改程式" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index e61ce405342c6..b1e2ccbfec457 100644 --- a/i18n/cht/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -6,6 +6,7 @@ { "openLaunchJson": "開啟 {0}", "launchJsonNeedsConfigurtion": "設定或修正 'launch.json'", + "noFolderDebugConfig": "請先打開一個資料夾以便設定進階偵錯組態。", "startDebug": "開始偵錯", "startWithoutDebugging": "開始但不偵錯", "selectAndStartDebugging": "選取並開始偵錯", @@ -34,6 +35,7 @@ "editConditionalBreakpoint": "編輯中斷點...", "setValue": "設定值", "addWatchExpression": "加入運算式", + "editWatchExpression": "編輯運算式", "addToWatchExpressions": "加入監看", "removeWatchExpression": "移除運算式", "removeAllWatchExpressions": "移除所有運算式", diff --git a/i18n/cht/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json new file mode 100644 index 0000000000000..8bd875c749d3c --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugToolBarBackground": "偵錯工具列背景色彩。" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json new file mode 100644 index 0000000000000..e2098f79ad8ea --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileLinkMac": "按一下以追蹤 (Cmd + 按一下滑鼠左鍵開至側邊)", + "fileLink": "按一下以追蹤 (Ctrl + 按一下滑鼠左鍵開至側邊)" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/common/debug.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/common/debug.i18n.json new file mode 100644 index 0000000000000..63a60fc01a22c --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/debug/common/debug.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "internalConsoleOptions": "內部偵錯主控台的控制項行為。" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/common/debugModel.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/common/debugModel.i18n.json index 3a0b48960cd5a..0ebbbd8344989 100644 --- a/i18n/cht/src/vs/workbench/parts/debug/common/debugModel.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/debug/common/debugModel.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "unknownSource": "未知的來源", "notAvailable": "無法使用", - "startDebugFirst": "請啟動偵錯工作階段進行評估", - "unknownStack": "不明堆疊位置" + "startDebugFirst": "請啟動偵錯工作階段進行評估" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/common/debugSource.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/common/debugSource.i18n.json new file mode 100644 index 0000000000000..6ce65f7439bb8 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/debug/common/debugSource.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownSource": "未知的來源" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json index 02c3d441b7f8c..da46c1cbcd0d3 100644 --- a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -15,5 +15,6 @@ "allowBreakpointsEverywhere": "允許在任何檔案設定中斷點", "openExplorerOnEnd": "自動於偵錯工作階段結束時開啟總管檢視", "inlineValues": "在偵錯時於編輯器以內嵌方式顯示變數值", - "hideActionBar": "控制是否應隱藏浮點偵錯動作列" + "hideActionBar": "控制是否應隱藏浮點偵錯動作列", + "launch": "全域偵錯啟動組態。應當做在工作區之間共用的 'launch.json' 替代方案使用" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json new file mode 100644 index 0000000000000..b5bfc8d474b30 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noFolderDebugConfig": "請先打開一個資料夾以便設定進階偵錯組態。" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index c3db57caac680..4ff9fe0b2b99b 100644 --- a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -5,8 +5,8 @@ // Do not edit this file. It is machine generated. { "snapshotObj": "只會顯示此物件的基本值。", - "debuggingStarted": "偵錯已開始。", "debuggingPaused": "偵錯已暫停,原因 {0},{1} {2}", + "debuggingStarted": "偵錯已開始。", "debuggingStopped": "偵錯已停止。", "breakpointAdded": "已新增中斷點,行 {0},檔案 {1}", "breakpointRemoved": "已移除中斷點,行 {0},檔案 {1}", diff --git a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json index ae46ae65a607f..d77b4677ceadc 100644 --- a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json @@ -6,5 +6,6 @@ { "copyValue": "複製值", "copy": "複製", + "copyAll": "全部複製", "copyStackTrace": "複製呼叫堆疊" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json index 1c7a91ba5c951..e7982d93dfd16 100644 --- a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json @@ -5,8 +5,6 @@ // Do not edit this file. It is machine generated. { "stateCapture": "第一次評估會擷取物件狀態", - "fileLinkMac": "按一下以追蹤 (Cmd + 按一下滑鼠左鍵開至側邊)", - "fileLink": "按一下以追蹤 (Ctrl + 按一下滑鼠左鍵開至側邊)", "replVariableAriaLabel": "變數 {0} 具有值 {1},「讀取、求值、輸出」迴圈,偵錯", "replExpressionAriaLabel": "運算式 {0} 具有值 {1},「讀取、求值、輸出」迴圈,偵錯", "replValueOutputAriaLabel": "{0},「讀取、求值、輸出」迴圈,偵錯", diff --git a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json index 259df04a8b178..81362151ea4a1 100644 --- a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "statusBarDebuggingBackground": "對程式執行偵錯時狀態列的背景色彩。狀態列會顯示在視窗的底部" + "statusBarDebuggingBackground": "對程式執行偵錯時狀態列的背景色彩。狀態列會顯示在視窗的底部", + "statusBarDebuggingForeground": "對程式執行偵錯時狀態列的前景色彩。狀態列會顯示在視窗的底部" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index f41f30d55245c..246786aab6cf2 100644 --- a/i18n/cht/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,12 +7,12 @@ "debugAdapterBinNotFound": "偵錯配接器可執行檔 '{0}' 不存在。", "debugAdapterCannotDetermineExecutable": "無法判斷偵錯配接器 '{0}' 的可執行檔。", "debugType": "組態的類型。", + "debugTypeNotRecognised": "無法辨識此偵錯類型.請確認已有安裝並啟用相對應的偵錯擴充功能.", "node2NotSupported": "\"node2\" 已不再支援,請改用 \"node\",並將 \"protocol\" 屬性設為 \"inspector\"。", "debugName": "組態的名稱; 出現在啟動組態下拉式功能表中。", "debugRequest": "要求組態的類型。可以是 [啟動] 或 [附加]。", "debugServer": "僅限偵錯延伸模組開發: 如果指定了連接埠,VS Code 會嘗試連線至以伺服器模式執行的偵錯配接器", "debugPrelaunchTask": "偵錯工作階段啟動前要執行的工作。", - "internalConsoleOptions": "內部偵錯主控台的控制項行為。", "debugWindowsConfiguration": "Windows 特定的啟動設定屬性。", "debugOSXConfiguration": "OS X 特定的啟動設定屬性。", "debugLinuxConfiguration": "Linux 特定的啟動設定屬性。", diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json new file mode 100644 index 0000000000000..71f6e49ff9506 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "balanceInward": "Emmet: 平衡 (向內)", + "balanceOutward": "Emmet: 平衡 (向外)" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json new file mode 100644 index 0000000000000..cc8a2f3862077 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "previousEditPoint": "Emmet: 前往上一個編輯端點", + "nextEditPoint": "Emmet: 前往下一個編輯端點" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json new file mode 100644 index 0000000000000..2fd101d61046c --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "evaluateMathExpression": "Emmet: 評估數學運算式" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json new file mode 100644 index 0000000000000..e44c6de8d4af8 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "expandAbbreviationAction": "Emmet: 展開縮寫" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json new file mode 100644 index 0000000000000..64cf880ae48c1 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "incrementNumberByOneTenth": "Emmet: 依 0.1 遞增", + "incrementNumberByOne": "Emmet: 依 1 遞增", + "incrementNumberByTen": "Emmet: 依 10 遞增", + "decrementNumberByOneTenth": "Emmet: 依 0.1 遞減", + "decrementNumberByOne": "Emmet: 依 1 遞減", + "decrementNumberByTen": "Emmet: 依 10 遞減" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json new file mode 100644 index 0000000000000..211f58191fec4 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "matchingPair": "Emmet: 前往相符的配對" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json new file mode 100644 index 0000000000000..3e491126dc25c --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mergeLines": "Emmet: 合併行" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json new file mode 100644 index 0000000000000..1dcfdd7b85ce9 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reflectCSSValue": "Emmet: 反射 CSS 值" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json new file mode 100644 index 0000000000000..0c12d23d41a72 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeTag": "Emmet: 移除標記" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json new file mode 100644 index 0000000000000..2674e2efa4e8a --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "selectPreviousItem": "Emmet: 選取上一個項目", + "selectNextItem": "Emmet: 選取下一個項目" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json new file mode 100644 index 0000000000000..b861468d52ec7 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "splitJoinTag": "Emmet: 分割/聯結標記" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json new file mode 100644 index 0000000000000..9980a634fb88e --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleComment": "Emmet: 切換註解" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json new file mode 100644 index 0000000000000..11fbb1e13ba5b --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateImageSize": "Emmet: 更新影像大小" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json new file mode 100644 index 0000000000000..659656b1b2b4e --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateTag": "Emmet: 更新標記", + "enterTag": "輸入標記", + "tag": "標記" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json new file mode 100644 index 0000000000000..78eafe156b11b --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wrapWithAbbreviationAction": "Emmet: 以縮寫包裝", + "enterAbbreviation": "輸入縮寫", + "abbreviation": "縮寫" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json new file mode 100644 index 0000000000000..0766d1cdedb10 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emmetConfigurationTitle": "Emmet", + "triggerExpansionOnTab": "如有啟用,只要按 Tab 鍵就能展開 Emmet 縮寫。", + "emmetPreferences": "喜好設定,用以修改某些動作的行為及 Emmet 的解析程式。", + "emmetSyntaxProfiles": "為指定的語法定義設定檔,或透過特定規則使用自己的設定檔。", + "emmetExclude": "不應展開 Emmet 縮寫的語言陣列。", + "emmetExtensionsPath": "包含 Emmet 設定檔、程式碼片段及參考的資料夾路徑", + "useNewEmmet": "試試所有 Emmet 功能的新 Emmet 模組 (最終會取代舊的單一 Emmet 程式庫)。" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index dc585358a435f..71c9d68e1927f 100644 --- a/i18n/cht/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -4,10 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "vscode.extension.contributes.explorer": "提供自訂 Tree Explorer viewlet 到資訊看板", - "vscode.extension.contributes.explorer.treeExplorerNodeProviderId": "用以識別透過 vscode.workspace.registerTreeExplorerNodeProvider 所註冊之提供者的唯一識別碼", - "vscode.extension.contributes.explorer.treeLabel": "用以轉譯自訂 Tree Explorer 的易讀字串", - "vscode.extension.contributes.explorer.icon": "活動列上 viewlet 圖示的路徑", + "vscode.extension.contributes.view": "提供自訂檢視", + "vscode.extension.contributes.view.id": "用以識別透過 vscode.workspace.createTreeView 建立之檢視的唯一識別碼", + "vscode.extension.contributes.view.label": "用以轉譯檢視的易讀字串", + "vscode.extension.contributes.view.icon": "連到檢視圖示的路徑", + "vscode.extension.contributes.views": "提供自訂檢視", "showViewlet": "顯示 {0}", "view": "檢視" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index 2badec430e0fd..3d0e6b6a5b66e 100644 --- a/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -24,6 +24,10 @@ "default": "預設", "debuggers": "偵錯工具 ({0})", "debugger name": "名稱", + "views": "瀏覽次數 ({0})", + "view id": "識別碼", + "view name": "名稱", + "view location": "位置", "themes": "佈景主題 ({0})", "JSON Validation": "JSON 驗證 ({0})", "commands": "命令 ({0})", diff --git a/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index 7e0eff0f087ce..dce745aeaf805 100644 --- a/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -22,6 +22,8 @@ "disableGloballyAction": "永遠", "disableAction": "停用", "checkForUpdates": "查看是否有更新", + "enableAutoUpdate": "啟用自動更新延伸模組", + "disableAutoUpdate": "停用自動更新延伸模組", "updateAll": "更新所有延伸模組", "reloadAction": "重新載入", "postUpdateTooltip": "重新載入以更新", @@ -44,6 +46,8 @@ "showWorkspaceRecommendedExtensions": "顯示工作區的建議擴充功能", "showRecommendedKeymapExtensions": "顯示建議的按鍵對應", "showRecommendedKeymapExtensionsShort": "按鍵對應", + "showLanguageExtensions": "顯示語言擴充功能", + "showLanguageExtensionsShort": "語言擴充功能", "configureWorkspaceRecommendedExtensions": "設定建議的延伸模組 (工作區)", "ConfigureWorkspaceRecommendations.noWorkspace": "只有在工作區資料夾中才能使用建議。", "OpenExtensionsFile.failed": "無法在 '.vscode' 資料夾 ({0}) 中建立 'extensions.json' 檔案。", @@ -51,5 +55,8 @@ "disableAll": "停用所有已安裝的延伸模組", "disableAllWorkspace": "停用此工作區的所有已安裝延伸模組", "enableAll": "啟用所有已安裝的延伸模組", - "enableAllWorkspace": "啟用此工作區的所有已安裝延伸模組" + "enableAllWorkspace": "啟用此工作區的所有已安裝延伸模組", + "extensionButtonProminentBackground": "突出的動作延伸模組按鈕背景色彩 (例如,[安裝] 按鈕)。", + "extensionButtonProminentForeground": "突出的動作延伸模組按鈕前景色彩 (例如,[安裝] 按鈕)。", + "extensionButtonProminentHoverBackground": "突出的動作延伸模組按鈕背景暫留色彩 (例如,[安裝] 按鈕)。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index c4ae560325bf2..9e97614cd5ee4 100644 --- a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -4,8 +4,13 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "reallyRecommended2": "建議對此檔案類型使用 '{0}' 延伸模組。", "showRecommendations": "顯示建議", "neverShowAgain": "不要再顯示", "close": "關閉", - "workspaceRecommended": "此工作區具有擴充功能建議。" + "workspaceRecommended": "此工作區具有擴充功能建議。", + "ignoreExtensionRecommendations": "是否略過所有建議的擴充功能?", + "ignoreAll": "是,略過全部", + "no": "否", + "cancel": "取消" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index ee54fc14d14f0..c0f0b8275588f 100644 --- a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -10,5 +10,6 @@ "extensions": "擴充功能", "view": "檢視", "extensionsConfigurationTitle": "擴充功能", - "extensionsAutoUpdate": "自動更新擴充功能" + "extensionsAutoUpdate": "自動更新擴充功能", + "extensionsIgnoreRecommendations": "忽略延伸模組建議" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json new file mode 100644 index 0000000000000..8c853f39a8303 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "disableOtherKeymapsConfirmation": "要停用其他按鍵對應 ({0}),以避免按鍵繫結關係間的衝突嗎?", + "yes": "是", + "no": "否", + "betterMergeDisabled": "目前已內建 Better Merge 延伸模組,安裝的延伸模組已停用並且可以移除。", + "uninstall": "解除安裝", + "later": "稍後" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json index 25ecab5370988..a88d55b7e4df3 100644 --- a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json @@ -5,10 +5,10 @@ // Do not edit this file. It is machine generated. { "searchExtensions": "在 Marketplace 中搜尋擴充功能", - "extensions": "擴充功能", "sort by installs": "排序依據: 安裝計數", "sort by rating": "排序依據: 評等", - "no extensions found": "找不到延伸模組。", + "sort by name": "排序依據: 名稱", "suggestProxyError": "Marketplace 傳回 'ECONNREFUSED'。請檢查 'http.proxy' 設定。", + "extensions": "擴充功能", "outdatedExtensions": "{0} 過期的擴充功能" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json new file mode 100644 index 0000000000000..2832629d84e61 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensions": "延伸模組", + "no extensions found": "找不到延伸模組。", + "suggestProxyError": "Marketplace 傳回 'ECONNREFUSED'。請檢查 'http.proxy' 設定。" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json index 940703b5bad37..be81c9fe30891 100644 --- a/i18n/cht/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json @@ -13,5 +13,6 @@ "cancel": "取消", "singleDependentError": "無法停用延伸模組 '{0}'。'{1}' 延伸模組相依於此項。", "twoDependentsError": "無法停用延伸模組 '{0}'。'{1}' 及 '{2}' 延伸模組相依於此項。", - "multipleDependentsError": "無法停用延伸模組 '{0}'。'{1}'、'{2}' 及其他延伸模組相依於此項。" + "multipleDependentsError": "無法停用延伸模組 '{0}'。'{1}'、'{2}' 及其他延伸模組相依於此項。", + "install": "安裝" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index d18aa96ecafbc..5c743eb2ce258 100644 --- a/i18n/cht/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,7 +16,7 @@ "associations": "將檔案關聯設定為語言 (例如 \"*.extension\": \"html\")。這些語言優先於已安裝語言的預設關聯。", "encoding": "讀取與寫入檔案時要使用的預設字元集編碼。", "autoGuessEncoding": "如有啟用,將會在開啟檔案時,嘗試猜測字元集編碼", - "eol": "預設行尾字元。", + "eol": "預設結尾斷行字元.LF使用 \\n , CRLF使用\\r\\n ", "trimTrailingWhitespace": "若啟用,將在儲存檔案時修剪尾端空白。", "insertFinalNewline": "啟用時,請在儲存檔案時在其結尾插入最後一個新行。", "files.autoSave.off": "已變更的檔案一律不會自動儲存。", @@ -25,10 +25,8 @@ "files.autoSave.onWindowChange": "已變更的檔案會在視窗失去焦點時自動儲存。", "autoSave": "控制已變更之檔案的自動儲存。接受的值: '{0}'、'{1}、'{2}' (編輯器失去焦點)、'{3}' (視窗失去焦點)。若設為 '{4}',可以在 \"files.autoSaveDelay\" 中設定延遲。", "autoSaveDelay": "控制要自動儲存已變更之檔案前必須經過的延遲時間 (毫秒)。僅當 'files.autoSave' 設為 \"{0}\" 時才適用。", - "watcherExclude": "將檔案路徑的 Glob 模式設定為從檔案監控排除。需要重新啟動才能變更此設定。當您發現 Code 在啟動時使用大量 CPU 時間時,可以排除較大的資料夾以降低初始負載。", "hotExit.off": "停用 Hot Exit。", "hotExit.onExit": "Hot Exit 將會在關閉應用程式時觸發,也就是在 Windows/Linux 上關閉上一個視窗,或是觸發 workbench.action.quit 命令 (命令選擇區、按鍵繫結關係、功能表) 時觸發。具有備份的所有視窗都會在下次啟動時還原。", - "hotExit.onExitAndWindowClose": "Hot Exit 將會在關閉應用程式時觸發,也就是在 Windows/Linux 上關閉上一個視窗,或是觸發 workbench.action.quit 命令 (命令選擇區、按鍵繫結關係、功能表) 時觸發,也會針對已開啟資料夾的任何視窗觸發,而不論其是否為上一個視窗。具有備份的所有視窗都會在下次啟動時還原。若要將資料夾視窗還原成關機前的狀態,請將 \"window.reopenFolders\" 設定為 \"all\"。", "hotExit": "控制是否讓不同工作階段記住未儲存的檔案,並允許在結束編輯器時跳過儲存提示。", "defaultLanguage": "指派給新檔案的預設語言模式。", "editorConfigurationTitle": "編輯器", diff --git a/i18n/cht/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json b/i18n/cht/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json index 84b98eb14e0cf..4a54d52ef909c 100644 --- a/i18n/cht/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json @@ -11,5 +11,6 @@ "genericSaveError": "無法儲存 '{0}': {1}", "staleSaveError": "無法儲存 '{0}': 磁碟上的內容較新。請按一下 [比較],比較您的版本與磁碟上的版本。", "compareChanges": "比較", + "saveConflictDiffLabel": "{0} (位於磁碟) ↔ {1} (在 {2} 中) - 解決儲存衝突", "userGuide": "使用編輯器工具列中的動作來「復原」您的變更,或以您的變更「覆寫」磁碟上的內容" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json b/i18n/cht/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json index daa9489ee2bcc..22aa2fcc8879e 100644 --- a/i18n/cht/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "explorerSection": "檔案總管區段", "noWorkspace": "沒有開啟的資料夾", + "explorerSection": "檔案總管區段", "noWorkspaceHelp": "您尚未開啟資料夾。", "openFolder": "開啟資料夾" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json b/i18n/cht/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json index bb6c9f7b0a8fd..4279cc7e911c6 100644 --- a/i18n/cht/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "openEditosrSection": "開放式編輯器區段", "openEditors": "已開啟的編輯器", + "openEditosrSection": "開放式編輯器區段", "treeAriaLabel": "開啟的編輯器: 使用中檔案的清單", "dirtyCounter": "{0} 未儲存" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json b/i18n/cht/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json index daecadc10ca5f..53460cbff1fa4 100644 --- a/i18n/cht/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json @@ -7,6 +7,7 @@ "editorGroupAriaLabel": "{0},編輯器群組", "openEditorAriaLabel": "{0},開啟編輯器", "saveAll": "全部儲存", + "closeAllUnmodified": "關閉未變更的檔案", "closeAll": "全部關閉", "close": "關閉", "closeOthers": "關閉其他" diff --git a/i18n/cht/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index 1c615781faa32..2699d76ae0960 100644 --- a/i18n/cht/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -5,5 +5,11 @@ // Do not edit this file. It is machine generated. { "slow": "偵測到啟動速度慢", - "slow.detail": "抱歉! 先前的啟動速度過慢。請重新啟動 '{0}' 並啟用剖析功能,同時將設定檔提供給我們,我們將努力提升啟動的品質。" + "slow.detail": "抱歉! 先前的啟動速度過慢。請重新啟動 '{0}' 並啟用剖析功能,同時將設定檔提供給我們,我們將努力提升啟動的品質。", + "prof.message": "已成功建立設定檔。", + "prof.detail": "請建立問題,並手動附加下列檔案:\n{0}", + "prof.restartAndFileIssue": "建立問題並重新啟動", + "prof.restart": "重新啟動", + "prof.thanks": "感謝您的協助", + "prof.detail.restart": "需要重新啟動才能夠繼續使用'{0}‘.再次感謝您的回饋." } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json index c3aa093a86d83..45b8b75fa8315 100644 --- a/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -7,6 +7,7 @@ "keybindingsInputName": "鍵盤快速鍵(&&K)", "SearchKeybindings.AriaLabel": "搜尋按鍵繫結關係", "SearchKeybindings.Placeholder": "搜尋按鍵繫結關係", + "sortByPrecedene": "依優先順序排序", "header-message": "開啟及編輯進階自訂項目時使用", "keybindings-file-name": "keybindings.json", "keybindingsLabel": "按鍵繫結關係", @@ -14,6 +15,7 @@ "addLabel": "新增按鍵繫結關係", "removeLabel": "移除按鍵繫結關係", "resetLabel": "重設按鍵繫結關係", + "showConflictsLabel": "顯示衝突", "copyLabel": "複製", "error": "編輯按鍵繫結關係時發生錯誤 '{0}'。請開啟 'keybindings.json' 檔案加以檢查。", "command": "Command", diff --git a/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index d34b15d8697ff..96477e8cd2891 100644 --- a/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -5,7 +5,7 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.start": "定義按鍵繫結關係", - "defineKeybinding.kbLayoutInfoMessage": "針對您目前的鍵盤配置,請按 ", "defineKeybinding.kbLayoutErrorMessage": "您無法在目前的鍵盤配置下產生此按鍵組合。", - "DefineKeybindingAction": "定義按鍵繫結關係" + "defineKeybinding.kbLayoutLocalAndUSMessage": "**{0}**針對您目前的按鍵配置(**{1}**為美國標準)", + "defineKeybinding.kbLayoutLocalMessage": "**{0}**針對您目前的鍵盤配置" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index ae979e3f75301..a92d2c49e8bbe 100644 --- a/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -6,6 +6,7 @@ { "openGlobalSettings": "開啟使用者設定", "openGlobalKeybindings": "開啟鍵盤快速鍵", + "openGlobalKeybindingsFile": "開啟鍵盤快速鍵檔案", "openWorkspaceSettings": "開啟工作區設定", "configureLanguageBasedSettings": "設定語言專屬設定...", "languageDescriptionConfigured": "({0})", diff --git a/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index d55154b3d4292..d84b02f49a5a8 100644 --- a/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "errorInvalidConfiguration": "無法寫入設定.請開啟使用者設定並修正檔案中的錯誤/警告後再試一次.", + "defaultSettingsTitle": "預設設定", "editTtile": "編輯", "replaceDefaultValue": "在設定中取代", "copyDefaultValue": "複製到設定", diff --git a/i18n/cht/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json b/i18n/cht/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json index 6ecaf06064a46..c9a1d53702206 100644 --- a/i18n/cht/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json @@ -6,5 +6,6 @@ { "default": "預設", "user": "使用者", + "meta": "中繼", "option": "選項" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json b/i18n/cht/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json index 57c6be161054c..af7514ed858a4 100644 --- a/i18n/cht/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json @@ -5,10 +5,13 @@ // Do not edit this file. It is machine generated. { "showTriggerActions": "顯示所有命令", + "showCommands.label": "命令選擇區...", "entryAriaLabelWithKey": "{0}、{1}、命令", "entryAriaLabel": "{0},命令", "canNotRun": "無法從這裡執行命令 '{0}'。", "actionNotEnabled": "目前內容中未啟用命令 '{0}'。", + "recentlyUsed": "最近使用的", + "morecCommands": "其他命令", "commandLabel": "{0}: {1}", "cat.title": "{0}: {1}", "noCommandsMatching": "沒有相符的命令" diff --git a/i18n/cht/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json new file mode 100644 index 0000000000000..a4c089ec5ce16 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "relaunchSettingMessage": "設定已經變更,必須重新啟動才會生效。", + "relaunchSettingDetail": "請按 [重新啟動] 按鈕以重新啟動 {0} 並啟用設定。", + "restart": "重新啟動", + "reload": "重新載入" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/cht/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json new file mode 100644 index 0000000000000..eea295d406662 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGutterModifiedBackground": "修改中的行於編輯器邊框的背景色彩", + "editorGutterAddedBackground": "新增後的行於編輯器邊框的背景色彩", + "editorGutterDeletedBackground": "刪除後的行於編輯器邊框的背景色彩" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json index c0bccd6864ce2..cafed39301058 100644 --- a/i18n/cht/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "toggleGitViewlet": "顯示 Git", + "installAdditionalSCMProviders": "安裝額外SCM提供者...", "source control": "原始檔控制", "toggleSCMViewlet": "顯示 SCM", "view": "檢視" diff --git a/i18n/cht/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json b/i18n/cht/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json index d1872f571b1c6..5450727934af6 100644 --- a/i18n/cht/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "installAdditionalSCMProviders": "安裝額外SCM提供者...", "switch provider": "切換 SCM 提供者..." } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/cht/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json index e2c76d595ed39..0780f0f62bdbe 100644 --- a/i18n/cht/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -7,6 +7,6 @@ "searchMatches": "找到 {0} 個相符", "searchMatch": "找到 {0} 個相符", "fileMatchAriaLabel": "資料夾 {2} 的檔案 {1} 中有 {0} 個相符,搜尋結果", - "replacePreviewResultAria": "取代預覽結果,{0}", - "searchResultAria": "{0},搜尋結果" + "replacePreviewResultAria": "根據文字({3})在({2})欄位列表中將({1})替代為文字{{0}}", + "searchResultAria": "根據文字({2})並在({1})欄位列表中找到符合({0})的項目" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json b/i18n/cht/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json index 4cb9c1367eea4..2789a5e845e9d 100644 --- a/i18n/cht/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json @@ -9,5 +9,6 @@ "vscode.extension.contributes.snippets-path": "程式碼片段檔案的路徑。此路徑是擴充功能資料夾的相對路徑,而且一般會以 './snippets/' 開頭。", "invalid.language": "`contributes.{0}.language` 中的不明語言。提供的值: {1}", "invalid.path.0": "`contributes.{0}.path` 中的預期字串。提供的值: {1}", - "invalid.path.1": "要包含在擴充功能資料夾 ({2}) 中的預期 `contributes.{0}.path` ({1})。這可能會使擴充功能無法移植。" + "invalid.path.1": "要包含在擴充功能資料夾 ({2}) 中的預期 `contributes.{0}.path` ({1})。這可能會使擴充功能無法移植。", + "badVariableUse": "程式碼片段 \"{0}\" 很可能會混淆 snippet-variables 及 snippet-placeholders。如需詳細資料,請參閱 https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json index 79eb6e8c71ce9..8db84c0d3ebbe 100644 --- a/i18n/cht/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json @@ -11,6 +11,6 @@ "snippetSchema.json.default": "空白程式碼片段", "snippetSchema.json": "使用者程式碼片段組態", "snippetSchema.json.prefix": "在 Intellisense 中選取程式碼片段時要使用的前置詞", - "snippetSchema.json.body": "程式碼片段內容。請針對變數使用 '${id}'、'${id:label}'、'${1:label}',並針對游標位置使用 '$0'、'$1'", + "snippetSchema.json.body": "程式碼片段內容。請使用 '$1', '${1:defaultText}' 以定義游標位置,並使用 '$0' 定義最終游標位置。將 '${varName}' and '${varName:defaultText}' 插入變數值,例如 'This is file: $TM_FILENAME'。", "snippetSchema.json.description": "程式碼片段描述。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json new file mode 100644 index 0000000000000..a74cdd763fc61 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "helpUs": "協助我們改善{0}", + "takeShortSurvey": "填寫簡短調查問卷", + "remindLater": "稍後再提醒我", + "neverAgain": "不要再顯示" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..260deed4c1d26 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "您願意填寫簡短的意見反應問卷嗎?", + "takeSurvey": "填寫問卷", + "remindLater": "稍後再提醒我", + "neverAgain": "不要再顯示" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json new file mode 100644 index 0000000000000..8ccb1a3828491 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "沒有工作相符" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json index a6d7f30447aca..b0cd09ce051ca 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0},工作", "tasksAriaLabel": "請鍵入要重新啟動的工作名稱", "noTasksMatching": "沒有工作相符", "noTasksFound": "找不到工作可重新啟動" diff --git a/i18n/cht/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json index 7eb3693cef90d..c6d5f5a478b2c 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0},工作", "tasksAriaLabel": "輸入要執行的工作名稱", "noTasksMatching": "No tasks matching", "noTasksFound": "找不到工作" diff --git a/i18n/cht/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json new file mode 100644 index 0000000000000..8ccb1a3828491 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "沒有工作相符" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index 8da7ffbc6c413..9320c66c86fb0 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -5,13 +5,13 @@ // Do not edit this file. It is machine generated. { "ConfigurationParser.invalidCWD": "警告: options.cwd 必須屬於字串類型。即將忽略值 {0}。", - "ConfigurationParser.noShell": "警告: 只有在終端機中執行工作時才支援殼層組態。", "ConfigurationParser.noargs": "錯誤: 命令引數必須是字串陣列。提供的值為:\n{0}", + "ConfigurationParser.noShell": "警告: 只有在終端機中執行工作時才支援殼層組態。", "ConfigurationParser.noName": "錯誤: 宣告範圍中的問題比對器必須有名稱:\n{0}\n", "ConfigurationParser.unknownMatcherKind": "警告: 定義的問題比對器未知。支援的類型為 string | ProblemMatcher | (string | ProblemMatcher)[]。\n{0}\n", "ConfigurationParser.invalidVaraibleReference": "錯誤: problemMatcher 參考無效: {0}\n", "ConfigurationParser.noTaskName": "錯誤: 工作必須提供 taskName 屬性。即將忽略此工作。\n{0}\n", "taskConfiguration.shellArgs": "警告: 工作 '{0}' 是殼層命令,但命令名稱或其中一個引數有的未逸出的空格。若要確保命令列正確引述,請將引數合併到命令中。", - "taskConfiguration.noCommandOrDependsOn": "錯誤: 工作 '{0}' 未指定命令或 dependsOn 屬性。即將略過該工作。其定義為:\n{1}", + "taskConfiguration.noCommandOrDependsOn": "錯誤: 工作 '{0}' 未指定命令與 dependsOn 屬性。將會略過該工作。其定義為: \n{1}", "taskConfiguration.noCommand": "錯誤: 工作 '{0}' 未定義命令。即將略過該工作。其定義為:\n{1}" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json index fef61a785af84..bb81cd023b79c 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "tsc.config": "編譯 TypeScript 專案", - "tsc.watch": "在監看模式中編譯 TypeScript 專案", "dotnetCore": "執行 .NET Core 建置命令", "msbuild": "執行建置目標", "externalCommand": "執行任意外部命令的範例", diff --git a/i18n/cht/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json index a08f7bd95bc77..44fe783df838d 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json @@ -7,6 +7,7 @@ "JsonSchema.options": "其他命令選項", "JsonSchema.options.cwd": "所執行程式或指令碼的目前工作目錄。如果省略,則會使用 Code 的目前工作區根目錄。", "JsonSchema.options.env": "所執行程式或殼層的環境。如果省略,則會使用父處理序的環境。", + "JsonSchema.shellConfiguration": "設定要使用的殼層。", "JsonSchema.shell.executable": "要使用的殼層。", "JsonSchema.shell.args": "殼層引數。", "JsonSchema.command": "要執行的命令。可以是外部程式或殼層命令。", diff --git a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json index b729447e97962..fa2e875a18e10 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json @@ -5,6 +5,8 @@ // Do not edit this file. It is machine generated. { "JsonSchema.version": "組態的版本號碼", + "JsonSchema._runner": "執行器已結束支援.請參考官方執行器屬性", + "JsonSchema.runner": "定義工作是否作為處理序執行,以及輸出會顯示在輸出視窗或終端機內。", "JsonSchema.windows": "Windows 特定命令組態", "JsonSchema.mac": "Mac 特定命令組態", "JsonSchema.linux": "Linux 特定命令組態", diff --git a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json index 91d93e19374ef..e0f4ef5519317 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -4,11 +4,16 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "JsonSchema.version": "組態的版本號碼", - "JsonSchema.windows": "Windows 特定命令組態", - "JsonSchema.mac": "Mac 特定命令組態", - "JsonSchema.linux": "Linux 特定命令組態", "JsonSchema.shell": "指定此命令是殼層命令或外部程式。如果省略,預設為 False。", "JsonSchema.tasks.dependsOn.string": "此工作相依的另一個工作。", - "JsonSchema.tasks.dependsOn.array": "此工作相依的其他工作。" + "JsonSchema.tasks.dependsOn.array": "此工作相依的其他工作。", + "JsonSchema.tasks.type": "定義工作是作為處理序或殼層中的命令執行。預設為處理序。", + "JsonSchema.version": "組態版本號碼", + "JsonSchema.tasks.taskName": "工作的名稱", + "JsonSchema.tasks.background": "執行的工作是否保持運作且正在背景執行。", + "JsonSchema.tasks.promptOnClose": "是否在 VS Code 有執行中工作的狀態下關閉時提示使用者。", + "JsonSchema.tasks.matchers": "要使用的問題比對器。可以是字串或問題比對器定義,或是字串和問題比對器陣列。", + "JsonSchema.windows": "Windows 特定命令組態", + "JsonSchema.mac": "Mac 特定命令組態", + "JsonSchema.linux": "Linux 特定命令組態" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 7758b0a3da047..d4dcfe161fe93 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -9,6 +9,7 @@ "ConfigureTaskRunnerAction.quickPick.template": "選取工作執行器", "ConfigureTaskRunnerAction.autoDetecting": "自動偵測 {0} 的工作", "ConfigureTaskRunnerAction.autoDetect": "自動偵測工作系統失敗。正在使用預設範本。如需詳細資料,請參閱工作輸出。", + "ConfigureTaskRunnerAction.autoDetectError": "自動偵測工作系統產生錯誤。如需詳細資料,請參閱工作輸出。", "ConfigureTaskRunnerAction.failed": "無法在 '.vscode' 資料夾中建立 'tasks.json' 檔案。如需詳細資訊,請參閱工作輸出。", "ConfigureTaskRunnerAction.label": "設定工作執行器", "ConfigureBuildTaskAction.label": "設定建置工作", @@ -18,10 +19,11 @@ "manyMarkers": "99+", "tasks": "工作", "TaskSystem.noHotSwap": "變更工作執行引擎需要重新啟動 VS Code。已略過變更。", - "TaskService.noBuildTask": "未定義任何建置工作。請使用 'isBuildCommand' 標記 tasks.json 檔案中的工作。", - "TaskService.noTestTask": "未定義任何建置工作。請使用 'isTestCommand' 標記 tasks.json 檔案中的工作。", + "TaskService.noBuildTask1": "未定義任何建置工作。請使用 'isBuildCommand' 標記 tasks.json 檔案中的工作。", + "TaskService.noTestTask1": "未定義任何建置工作。請使用 'isTestCommand' 標記 tasks.json 檔案中的工作。", "TaskServer.noTask": "找不到所要求要執行的工作 {0}。", - "TaskSystem.activeSame": "工作已在使用中並處於監看模式。若要終止工作,請使用 F1 > [終止工作]", + "customizeParseErrors": "當前的工作組態存在錯誤.請更正錯誤再執行工作.", + "moreThanOneBuildTask": "定義了很多建置工作於tasks.json.執行第一個.", "TaskSystem.active": "已有工作在執行。請先終止該工作,然後再執行其他工作。", "TaskSystem.restartFailed": "無法終止再重新啟動工作 {0}", "TaskSystem.configurationErrors": "錯誤: 提供的工作組態具有驗證錯誤而無法使用。請先更正這些錯誤。", @@ -30,17 +32,14 @@ "TaskSystem.terminateTask": "終止工作(&&T)", "TaskSystem.noProcess": "啟動的工作已不存在。如果工作繁衍的背景處理序結束,VS Code 可能會產生孤立的處理序。若要避免此情況,請啟動有等候旗標的最後一個背景處理序。", "TaskSystem.exitAnyways": "仍要結束(&&E)", - "TerminateAction.label": "終止執行中的工作", + "TerminateAction.label": "終止工作", "TaskSystem.unknownError": "執行工作時發生錯誤。如需詳細資訊,請參閱工作記錄檔。", "TaskService.noWorkspace": "這些工作只會出現在工作區資料夾中。", "TerminateAction.noProcess": "啟動的處理序已不存在。如果工作繁衍的背景工作結束,VS Code 可能會產生孤立的處理序。", "TerminateAction.failed": "無法終止執行中的工作", "ShowLogAction.label": "顯示工作記錄檔", "RunTaskAction.label": "執行工作", - "RestartTaskAction.label": "重新啟動工作", "BuildAction.label": "執行建置工作", "TestAction.label": "執行測試工作", - "quickOpen.task": "執行工作", - "quickOpen.terminateTask": "終止工作(&&T)", - "quickOpen.restartTask": "重新啟動工作" + "quickOpen.task": "執行工作" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index 6fbf828e69e89..871f4fbea5ab1 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -6,5 +6,7 @@ { "TerminalTaskSystem.unknownError": "執行工作時發生不明錯誤。如需詳細資訊,請參閱工作輸出記錄檔。", "TerminalTaskSystem.terminalName": "工作 - {0}", - "TerminalTaskSystem": "無法在 UNC 磁碟機上執行殼層命令。" + "reuseTerminal": "工作將被重新啟用.按任意鍵關閉.", + "TerminalTaskSystem": "無法在 UNC 磁碟機上執行殼層命令。", + "unkownProblemMatcher": "問題比對器 {0} 無法解析,比對器將予忽略。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json index 14a1145483abf..a61b95cb11771 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json @@ -7,5 +7,6 @@ "TaskRunnerSystem.unknownError": "執行工作時發生不明錯誤。如需詳細資訊,請參閱工作輸出記錄檔。", "TaskRunnerSystem.watchingBuildTaskFinished": "\n監看建置工作已完成。", "TaskRunnerSystem.childProcessError": "Failed to launch external program {0} {1}.", - "TaskRunnerSystem.cancelRequested": "\n根據使用者要求已終止工作 '{0}'。" + "TaskRunnerSystem.cancelRequested": "\n根據使用者要求已終止工作 '{0}'。", + "unkownProblemMatcher": "問題比對器 {0} 無法解析,比對器將予忽略。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json new file mode 100644 index 0000000000000..9320c66c86fb0 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ConfigurationParser.invalidCWD": "警告: options.cwd 必須屬於字串類型。即將忽略值 {0}。", + "ConfigurationParser.noargs": "錯誤: 命令引數必須是字串陣列。提供的值為:\n{0}", + "ConfigurationParser.noShell": "警告: 只有在終端機中執行工作時才支援殼層組態。", + "ConfigurationParser.noName": "錯誤: 宣告範圍中的問題比對器必須有名稱:\n{0}\n", + "ConfigurationParser.unknownMatcherKind": "警告: 定義的問題比對器未知。支援的類型為 string | ProblemMatcher | (string | ProblemMatcher)[]。\n{0}\n", + "ConfigurationParser.invalidVaraibleReference": "錯誤: problemMatcher 參考無效: {0}\n", + "ConfigurationParser.noTaskName": "錯誤: 工作必須提供 taskName 屬性。即將忽略此工作。\n{0}\n", + "taskConfiguration.shellArgs": "警告: 工作 '{0}' 是殼層命令,但命令名稱或其中一個引數有的未逸出的空格。若要確保命令列正確引述,請將引數合併到命令中。", + "taskConfiguration.noCommandOrDependsOn": "錯誤: 工作 '{0}' 未指定命令與 dependsOn 屬性。將會略過該工作。其定義為: \n{1}", + "taskConfiguration.noCommand": "錯誤: 工作 '{0}' 未定義命令。即將略過該工作。其定義為:\n{1}" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json index e9ec0d1fe5459..38cbc1a135f20 100644 --- a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -16,6 +16,7 @@ "terminal.integrated.fontLigatures": "控制是否在終端機中啟用連字字型。", "terminal.integrated.fontSize": "控制終端機的字型大小 (以像素為單位)。", "terminal.integrated.lineHeight": "控制終端機的行高,此數字會乘上終端機字型大小,以取得以像素為單位的實際行高。", + "terminal.integrated.enableBold": "是否要在終端機內啟用粗體文字。此動作需要終端機殼層的支援。", "terminal.integrated.cursorBlinking": "控制終端機資料指標是否閃爍。", "terminal.integrated.cursorStyle": "控制終端機資料指標的樣式。", "terminal.integrated.scrollback": "控制終端機保留在其緩衝區中的行數上限。", diff --git a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json index 1e92f6894ee39..77fd54ab18bf5 100644 --- a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -8,6 +8,7 @@ "workbench.action.terminal.kill": "終止使用中的終端機執行個體", "workbench.action.terminal.kill.short": "終止終端機", "workbench.action.terminal.copySelection": "複製選取項目", + "workbench.action.terminal.selectAll": "全選", "workbench.action.terminal.new": "建立新的整合式終端機", "workbench.action.terminal.new.short": "新增終端機", "workbench.action.terminal.focus": "聚焦終端機", @@ -26,5 +27,10 @@ "workbench.action.terminal.scrollUp": "向上捲動 (行)", "workbench.action.terminal.scrollUpPage": "向上捲動 (頁)", "workbench.action.terminal.scrollToTop": "捲動至頂端", - "workbench.action.terminal.clear": "清除" + "workbench.action.terminal.clear": "清除", + "workbench.action.terminal.allowWorkspaceShell": "允許工作區外觀配置", + "workbench.action.terminal.disallowWorkspaceShell": "不允許工作區外觀設置", + "workbench.action.terminal.rename": "重新命名", + "workbench.action.terminal.rename.prompt": "輸入終端機名稱", + "workbench.action.terminal.hideFindWidget": "隱藏尋找小工具" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json index d6c50f67f6886..6016a0077c1c8 100644 --- a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.background": "終端機的背景色彩,允許終端機和面板的色彩不同。", + "terminal.foreground": "終端機的前景色彩。", "terminal.ansiColor": "終端機中的 '{0}' ANSI 色彩。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json index 1ed48f98d5802..8d475ec070173 100644 --- a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.integrated.allowWorkspaceShell": "要允許 {0} (定義為工作區設定) 在終端機中啟動嗎?", "allow": "Allow", "disallow": "Disallow" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json new file mode 100644 index 0000000000000..f2ff92bce0706 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "尋找", + "placeholder.find": "尋找", + "label.previousMatchButton": "上一個符合項", + "label.nextMatchButton": "下一個相符項", + "label.closeButton": "關閉" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json index d0d02ca0fc55d..6ac7e3480a4a2 100644 --- a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "terminal.integrated.copySelection.noSelection": "無法在終端機沒有焦點時複製終端機選取範圍", "terminal.integrated.exitedWithCode": "終端機處理序已終止,結束代碼為: {0}", "terminal.integrated.waitOnExit": "按任意鍵關閉終端機", "terminal.integrated.launchFailed": "無法啟動終端機處理序命令 `{0}{1}` (結束代碼: {2})" diff --git a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json index 9a504f88eaf67..c5b1b929d80b1 100644 --- a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminalLinkHandler.followLinkAlt": "按住Alt並點擊以追蹤連結", "terminalLinkHandler.followLinkCmd": "按住 Cmd 並按一下滑鼠按鈕可連入連結", "terminalLinkHandler.followLinkCtrl": "按住 Ctrl 並按一下滑鼠按鈕可連入連結" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json index ca237826ef798..f9f8c2b8d9e84 100644 --- a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json @@ -7,5 +7,6 @@ "copy": "複製", "createNewTerminal": "新增終端機", "paste": "貼上", + "selectAll": "全選", "clear": "清除" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 23deff159dbde..ae636e706790b 100644 --- a/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,13 +6,14 @@ { "selectTheme.label": "色彩佈景主題", "installColorThemes": "安裝其他的色彩佈景主題...", - "problemChangingTheme": "設定佈景主題時發生問題: {0}", - "themes.selectTheme": "選取色彩佈景主題", + "themes.selectTheme": "選取色彩主題(上/下鍵預覽)", "selectIconTheme.label": "檔案圖示佈景主題", "installIconThemes": "安裝其他的檔案圖示主題...", "noIconThemeLabel": "無", "noIconThemeDesc": "停用檔案圖示", "problemChangingIconTheme": "設定圖示佈景主題時發生問題: {0}", "themes.selectIconTheme": "選取檔案圖示佈景主題", - "preferences": "喜好設定" + "generateColorTheme.label": "依目前的設定產生色彩佈景主題", + "preferences": "喜好設定", + "developer": "開發人員" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/update/electron-browser/update.i18n.json b/i18n/cht/src/vs/workbench/parts/update/electron-browser/update.i18n.json index 942ed9430c3a7..9f485311c72b9 100644 --- a/i18n/cht/src/vs/workbench/parts/update/electron-browser/update.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/update/electron-browser/update.i18n.json @@ -13,7 +13,19 @@ "read the release notes": "歡迎使用 {0} v{1}! 您要閱讀版本資訊嗎?", "licenseChanged": "授權條款已有所變更,請仔細閱讀。", "license": "閱讀授權", - "updateAvailable": "{0} 重新啟動後將會更新。", + "updateIsReady": "可用的更新", "thereIsUpdateAvailable": "已有更新可用。", - "noUpdatesAvailable": "目前沒有可用的更新。" + "updateAvailable": "{0} 重新啟動後將會更新。", + "noUpdatesAvailable": "目前沒有可用的更新。", + "commandPalette": "命令選擇區...", + "settings": "設定", + "keyboardShortcuts": "鍵盤快速鍵(&&K)", + "selectTheme.label": "色彩佈景主題", + "themes.selectIconTheme.label": "檔案圖示佈景主題", + "not available": "無可用更新", + "checkingForUpdates": "正在查看是否有更新...", + "DownloadUpdate": "下載可用更新", + "DownloadingUpdate": "正在下載更新...", + "InstallingUpdate": "正在安裝更新...", + "checkForUpdates": "查看是否有更新..." } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/views/browser/views.i18n.json b/i18n/cht/src/vs/workbench/parts/views/browser/views.i18n.json new file mode 100644 index 0000000000000..6894078d8f2b5 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/views/browser/views.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewToolbarAriaLabel": "{0} 個動作" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json b/i18n/cht/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json new file mode 100644 index 0000000000000..efe1cddf382a3 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "項目必須為陣列", + "requirestring": "屬性 '{0}' 為強制項目且必須屬於 `string` 類型", + "optstring": "屬性 `{0}` 可以省略或必須屬於 `string` 類型", + "vscode.extension.contributes.view.id": "檢視的識別碼。請使用此識別碼透過 `vscode.window.registerTreeDataProviderForView` API 登錄資料提供者。並藉由將 `onView:${id}` 事件登錄至 `activationEvents` 以觸發啟用您的延伸模組。", + "vscode.extension.contributes.view.name": "使用人性化顯示名稱.", + "vscode.extension.contributes.view.when": "必須為 true 以顯示此檢視的條件", + "vscode.extension.contributes.views": "提供意見給編輯者", + "views.explorer": "檔案總管檢視", + "locationId.invalid": "`{0}`不是有效的識別位置" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json b/i18n/cht/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json index 60739e80849e9..501a7e95c7665 100644 --- a/i18n/cht/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json @@ -14,10 +14,6 @@ "watermark.toggleTerminal": "切換終端機", "watermark.findInFiles": "在檔案中尋找", "watermark.startDebugging": "開始偵錯", - "watermark.selectTheme": "變更佈景主題", - "watermark.selectKeymap": "變更鍵盤對應", - "watermark.keybindingsReference": "鍵盤參考", - "watermark.openGlobalKeybindings": "鍵盤快速鍵", "watermark.unboundCommand": "未繫結", "workbenchConfigurationTitle": "工作台", "tips.enabled": "如有啟用,將會在編輯器未開啟時以浮水印方式顯示提示。" diff --git a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 5e5be1740d830..440dfaba679ee 100644 --- a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -11,33 +11,33 @@ "welcomePage.openFolder": "開啟資料夾...", "welcomePage.cloneGitRepository": "複製 Git 存放庫...", "welcomePage.recent": "最近使用", + "welcomePage.moreRecent": "更多...", "welcomePage.noRecentFolders": "沒有最近使用的資料夾", "welcomePage.help": "說明", - "welcomePage.productDocumentation": "產品文件", + "welcomePage.keybindingsCheatsheet": "閱覽鍵盤快速鍵", "welcomePage.introductoryVideos": "簡介影片", + "welcomePage.productDocumentation": "產品文件", "welcomePage.gitHubRepository": "GitHub 存放庫", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "啟動時顯示歡迎頁面", - "welcomePage.quickLinks": "快速連結", - "welcomePage.interactivePlayground": "Interactive Playground", - "welcomePage.interactivePlaygroundDescription": "嘗試使用逐步解說短片中的一些基本編輯器功能", - "welcomePage.interfaceOverview": "介面概觀", - "welcomePage.interfaceOverviewDescription": "使用視覺覆疊效果強調顯示 UI 的主要元件", + "welcomePage.customize": "自訂", + "welcomePage.installExtensionPacks": "工具與語言", + "welcomePage.installExtensionPacksDescription": "安裝{0}與{1}的支援功能。", + "welcomePage.moreExtensions": "更多", + "welcomePage.installKeymapDescription": "安裝鍵盤快速鍵", + "welcomePage.installKeymapExtension": "安裝鍵盤快速鍵{0}與{1}", + "welcomePage.others": "其他", "welcomePage.colorTheme": "彩色佈景主題", "welcomePage.colorThemeDescription": "將編輯器及您的程式碼設定成您喜愛的外觀", + "welcomePage.learn": "深入了解", + "welcomePage.showCommands": "尋找及執行所有命令", + "welcomePage.interfaceOverview": "介面概觀", + "welcomePage.interfaceOverviewDescription": "使用視覺覆疊效果強調顯示 UI 的主要元件", + "welcomePage.interactivePlayground": "Interactive Playground", + "welcomePage.interactivePlaygroundDescription": "嘗試使用逐步解說短片中的一些基本編輯器功能", + "welcomePage.quickLinks": "快速連結", "welcomePage.keybindingsReference": "鍵盤快速鍵參考", "welcomePage.keybindingsReferenceDescription": "可列印的 PDF,附有最常用的鍵盤快速鍵", - "welcomePage.showCommands": "尋找及執行所有命令", - "welcomePage.showCommandsDescription": "從控制台快速存取及搜尋命令 ({0})", "welcomePage.configureSettings": "組態設定", - "welcomePage.configureSettingsDescription": "微調設定就能發揮 VS Code 的所有功能", - "welcomePage.installKeymapDescription": "安裝鍵盤快速鍵", - "welcomePage.installKeymap": "安裝鍵盤快速鍵 {0}、{1}、{2} 及 {3}", - "welcomePage.vim": "活力", - "welcomePage.vimCurrent": "活力 (目前)", - "welcomePage.sublime": "壯麗", - "welcomePage.sublimeCurrent": "壯麗 (目前)", - "welcomePage.atom": "Atom", - "welcomePage.atomCurrent": "Atom (目前)", - "welcomePage.others": "其他" + "welcomePage.configureSettingsDescription": "微調設定就能發揮 VS Code 的所有功能" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json index 2e0c06390e3ec..7da5e64d29fac 100644 --- a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "workbenchConfigurationTitle": "工作台", - "welcomePage.enabled": "若啟用,會在啟動時顯示歡迎頁面。", "help": "說明" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index aceea3407e3b0..266ab6448f8cc 100644 --- a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,11 +5,32 @@ // Do not edit this file. It is machine generated. { "welcomePage": "歡迎使用", - "welcome.title": "歡迎使用", + "welcomePage.javaScript": "JavaScript", + "welcomePage.typeScript": "TypeScript", + "welcomePage.python": "Python", + "welcomePage.php": "PHP", + "welcomePage.docker": "Docker", + "welcomePage.vim": "活力", + "welcomePage.sublime": "壯麗", + "welcomePage.atom": "Atom", + "welcomePage.extensionPackAlreadyInstalled": "支援功能{0}已被安裝。", + "welcomePage.willReloadAfterInstallingExtensionPack": "{0} 的其他支援安裝完成後,將會重新載入此視窗。", + "welcomePage.installingExtensionPack": "正在安裝 {0} 的其他支援...", + "welcomePage.extensionPackNotFound": "找不到ID為{1}的{0}支援功能.", "welcomePage.keymapAlreadyInstalled": "已安裝 {0} 鍵盤快速鍵。", "welcomePage.willReloadAfterInstallingKeymap": "{0} 鍵盤快速鍵安裝完成後,將會重新載入此視窗。", - "ok": "確定", "welcomePage.installingKeymap": "正在安裝 {0} 鍵盤快速鍵...", "welcomePage.keymapNotFound": "找不到識別碼為 {1} 的 {0} 鍵盤快速鍵。", - "cancel": "取消" + "welcome.title": "歡迎使用", + "welcomePage.openFolderWithPath": "透過路徑 {1} 開啟資料夾 {0}", + "welcomePage.extensionListSeparator": ",", + "welcomePage.installKeymap": "安裝 {0} 按鍵對應", + "welcomePage.installExtensionPack": "安裝 {0} 的其他支援", + "welcomePage.installedKeymap": "已安裝 {0} 按鍵對應", + "welcomePage.installedExtensionPack": "已安裝 {0} 支援", + "ok": "確定", + "details": "詳細資料", + "cancel": "取消", + "welcomePage.buttonBackground": "起始頁面按鈕的背景色彩.", + "welcomePage.buttonHoverBackground": "起始頁面暫留於按鈕的背景色彩" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/cht/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json index 88da29e3eed52..920973ad06303 100644 --- a/i18n/cht/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "walkThrough.unboundCommand": "未繫結" + "walkThrough.unboundCommand": "未繫結", + "walkThrough.gitNotFound": "您的系統上似乎未安裝 Git。", + "walkThrough.embeddedEditorBackground": "編輯器互動區塊的背景色彩." } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/services/configuration/node/configuration.i18n.json b/i18n/cht/src/vs/workbench/services/configuration/node/configuration.i18n.json new file mode 100644 index 0000000000000..8fd534084bbd4 --- /dev/null +++ b/i18n/cht/src/vs/workbench/services/configuration/node/configuration.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.configuration": "提供組態設定。", + "vscode.extension.contributes.configuration.title": "設定的摘要。此標籤將會在設定檔中作為分隔註解使用。", + "vscode.extension.contributes.configuration.properties": "組態屬性的描述。", + "invalid.type": "如果已設定,'configuration.type' 必須設定為物件", + "invalid.title": "'configuration.title' 必須是字串", + "vscode.extension.contributes.defaultConfiguration": "依語言貢獻預設編輯器組態設定。", + "invalid.properties": "'configuration.properties' 必須是物件" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/cht/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index 377d6da8f30b3..0121512656e19 100644 --- a/i18n/cht/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/cht/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -4,11 +4,14 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "open": "開啟設定", + "close": "關閉", + "saveAndRetry": "儲存設定並重啟", "errorUnknownKey": "無法寫入組態檔 (不明的按鍵)", "errorInvalidTarget": "無法寫入組態檔 (目標無效)", - "errorNoWorkspaceOpened": "因為未開啟任何資料夾,所以無法寫入設定。請開啟資料夾後再試一次。", - "errorInvalidConfiguration": "無法寫入設定。請開啟 **使用者設定** 以修正檔案中的錯誤/警告後再試一次。", - "errorInvalidConfigurationWorkspace": "無法寫入設定。請開啟 **工作區設定** 以修正檔案中的錯誤/警告後再試一次。", - "errorConfigurationFileDirty": "因為檔案已變更,所以無法寫入設定。請儲存 **使用者設定** 檔案後再試一次。", - "errorConfigurationFileDirtyWorkspace": "因為檔案已變更,所以無法寫入設定。請儲存 **工作區設定** 檔案後再試一次。" + "errorNoWorkspaceOpened": "無法寫入設定,因為沒有開啟資料夾,請開啟資料夾後再試一次.", + "errorInvalidConfiguration": "無法寫入設定.請開啟**使用者設定**並修正錯誤/警告後再試一次.", + "errorInvalidConfigurationWorkspace": "無法寫入設定.請開啟**工作區設定**並修正檔案中的錯誤/警告後再試一次.", + "errorConfigurationFileDirty": "無法寫入設定,因為檔案已變更.請儲存**使用者設定**後再試一次", + "errorConfigurationFileDirtyWorkspace": "無法寫入設定,因檔案已變更.請儲存**工作區設定**後再試一次." } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json b/i18n/cht/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json new file mode 100644 index 0000000000000..e3e021a425489 --- /dev/null +++ b/i18n/cht/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "遙測", + "telemetry.enableCrashReporting": "允許將損毀報告傳送給 Microsoft。\n此選項需要重新啟動才會生效。" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/cht/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index 02d0580da7628..1e956b07a1e45 100644 --- a/i18n/cht/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/cht/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -8,15 +8,11 @@ "requirestring": "屬性 '{0}' 為強制項目且必須屬於 `string` 類型", "optstring": "屬性 `{0}` 可以省略或必須屬於 `string` 類型", "vscode.extension.contributes.keybindings.command": "觸發按鍵繫結關係時所要執行命令的識別碼。", - "vscode.extension.contributes.keybindings.key": "按鍵或按鍵順序 (以加號分隔按鍵並以空格分隔順序,例如 Ctrl+O 和 Ctrl+L L 進行同步選取", "vscode.extension.contributes.keybindings.mac": "Mac 特定按鍵或按鍵順序。", "vscode.extension.contributes.keybindings.linux": "Linux 特定按鍵或按鍵順序。", "vscode.extension.contributes.keybindings.win": "Windows 特定按鍵或按鍵順序。", "vscode.extension.contributes.keybindings.when": "按鍵為使用中時的條件。", "vscode.extension.contributes.keybindings": "提供按鍵繫結關係。", - "openDocumentation": "深入了解", - "keybindingMigration.ok": "確定", - "keybindingMigration.prompt": "您的鍵盤配置已有一些鍵盤快速鍵變更了。", "invalid.keybindings": "`contributes.{0}` 無效: {1}", "unboundCommands": "其他可用命令如下: ", "keybindings.json.title": "按鍵繫結關係組態", diff --git a/i18n/cht/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json b/i18n/cht/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json index d68f6a2d15113..0233809cbf1f2 100644 --- a/i18n/cht/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json +++ b/i18n/cht/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json @@ -4,6 +4,15 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "vscode.extension.contributes.languages": "提供語言宣告。", + "vscode.extension.contributes.languages.id": "語言的識別碼。", + "vscode.extension.contributes.languages.aliases": "語言的別名名稱。", + "vscode.extension.contributes.languages.extensions": "與語言相關聯的副檔名。", + "vscode.extension.contributes.languages.filenames": "與語言相關聯的檔案名稱。", + "vscode.extension.contributes.languages.filenamePatterns": "與語言相關聯的檔案名稱 Glob 模式。", + "vscode.extension.contributes.languages.mimetypes": "與語言相關聯的 MIME 類型。", + "vscode.extension.contributes.languages.firstLine": "規則運算式,符合語言檔案的第一行。", + "vscode.extension.contributes.languages.configuration": "檔案的相對路徑,其中該檔案包含語言組態選項。", "invalid": "`contributes.{0}` 無效。必須是陣列。", "invalid.empty": "`contributes.{0}` 值為空值", "require.id": "屬性 '{0}' 為強制項目且必須屬於 `string` 類型", diff --git a/i18n/cht/src/vs/workbench/services/progress/browser/progressService2.i18n.json b/i18n/cht/src/vs/workbench/services/progress/browser/progressService2.i18n.json new file mode 100644 index 0000000000000..6db7d6aae514a --- /dev/null +++ b/i18n/cht/src/vs/workbench/services/progress/browser/progressService2.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "progress.text": "{0} - {1}", + "progress.title": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json b/i18n/cht/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json new file mode 100644 index 0000000000000..7cf9de41c76c1 --- /dev/null +++ b/i18n/cht/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.grammars": "提供 textmate 權杖化工具。", + "vscode.extension.contributes.grammars.language": "要提供此語法的目標語言識別碼。", + "vscode.extension.contributes.grammars.scopeName": "tmLanguage 檔案所使用的 textmate 範圍名稱。", + "vscode.extension.contributes.grammars.path": "tmLanguage 檔案的路徑。此路徑是擴充功能資料夾的相對路徑,而且一般會以 './syntaxes/' 開頭。", + "vscode.extension.contributes.grammars.embeddedLanguages": "如果此文法包含內嵌語言,即為範圍名稱到語言識別碼的對應。", + "vscode.extension.contributes.grammars.injectTo": "要插入此文法的語言範圍名稱清單。" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json b/i18n/cht/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json new file mode 100644 index 0000000000000..d57676c5b402b --- /dev/null +++ b/i18n/cht/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid.language": "`contributes.{0}.language` 中的不明語言。提供的值: {1}", + "invalid.scopeName": "`contributes.{0}.scopeName` 中的預期字串。提供的值: {1}", + "invalid.path.0": "'contributes.{0}.path' 中應有字串。提供的值: {1}", + "invalid.injectTo": "`contributes.{0}.injectTo` 中的值無效。必須是語言範圍名稱的陣列。提供的值: {1}", + "invalid.embeddedLanguages": "`contributes.{0}.embeddedLanguages` 中的值無效。必須是從範圍名稱到語言的物件對應。提供的值: {1}", + "invalid.path.1": "擴充功能資料夾 ({2}) 應包含 'contributes.{0}.path' ({1})。這可能會導致擴充功能無法移植。", + "no-tm-grammar": "此語言未註冊任何 TM 文法。" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json b/i18n/cht/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json index b08073157603f..fe793cb749abc 100644 --- a/i18n/cht/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json +++ b/i18n/cht/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json @@ -6,5 +6,6 @@ { "schema.colors": "反白顯示語法時的色彩", "schema.properties.name": "規則描述", - "schema.fontStyle": "規則的字型樣式:「斜體」、「粗體」或「底線」之一或其組合" + "schema.fontStyle": "規則的字型樣式:「斜體」、「粗體」或「底線」之一或其組合", + "schema.tokenColors.path": "tmTheme 檔案的路徑 (相對於目前檔案)。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/cht/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json index 2e5056bf9ee8f..7c45152f8a53b 100644 --- a/i18n/cht/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json +++ b/i18n/cht/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -5,8 +5,9 @@ // Do not edit this file. It is machine generated. { "error.cannotparsejson": "剖析 JSON 佈景主題檔案時發生問題: {0}", - "error.invalidformat": "剖析 JSON 佈景主題檔案時發生問題: {0}。應為 'tokenColors' 及 'colors'。", - "error.plist.invalidformat": "剖析佈景主題檔案 {0} 時出現問題。'settings' 不是陣列。", - "error.cannotparse": "剖析佈景主題檔案 {0} 時發生問題", - "error.cannotload": "載入佈景主題檔案 {0} 時發生問題: {1}" + "error.invalidformat.colors": "剖析彩色佈景主題檔案 {0} 時出現問題。屬性 'settings' 不是 'object' 類型。", + "error.invalidformat.tokenColors": "剖析彩色佈景主題檔案 {0} 時出現問題。屬性 'tokenColors' 應為指定顏色的陣列,或為通往文字配對佈景主題檔案的路徑", + "error.plist.invalidformat": "剖析 tmTheme 檔案 {0} 時出現問題。'settings' 不是陣列。", + "error.cannotparse": "剖析 tmTheme 檔案 {0} 時發生問題", + "error.cannotload": "載入 tmTheme 檔案 {0} 時發生問題: {1}" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/cht/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index 50dce9f491f36..97b17773d471c 100644 --- a/i18n/cht/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/cht/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -23,8 +23,9 @@ "error.cannotparseicontheme": "Problems parsing file icons file: {0}", "colorTheme": "Specifies the color theme used in the workbench.", "colorThemeError": "Theme is unknown or not installed.", - "iconTheme": "Specifies the icon theme used in the workbench.", "noIconThemeDesc": "No file icons", "iconThemeError": "File icon theme is unknown or not installed.", - "workbenchColors": "覆寫目前選取之色彩佈景主題的色彩。此設定為實驗性質,色彩名稱將於下一版時變更。" + "workbenchColors": "依目前選擇的彩色佈景主題覆寫顏色", + "workbenchColors.deprecated": "此設定不再為實驗性,且已被重新命名為 'workbench.colorCustomizations'", + "workbenchColors.deprecatedDescription": "改用'workbench.colorCustomizations'" } \ No newline at end of file diff --git a/i18n/deu/extensions/configuration-editing/out/extension.i18n.json b/i18n/deu/extensions/configuration-editing/out/extension.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/extensions/configuration-editing/out/extension.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json b/i18n/deu/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json index 51b03fb61554e..085d9d2c6cb7f 100644 --- a/i18n/deu/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json +++ b/i18n/deu/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json @@ -7,7 +7,6 @@ "activeEditorShort": "z. B. myFile.txt", "activeEditorMedium": "e.g. myFolder/myFile.txt", "activeEditorLong": "e.g. /Users/Development/myProject/myFolder/myFile.txt", - "rootName": "z. B. myProject", "rootPath": "z. B. /Users/Development/myProject", "appName": "z. B. VS Code", "dirty": "Ein geänderter Indikator, wenn der aktive Editor geändert wurde", diff --git a/i18n/deu/extensions/extension-editing/out/extensionLinter.i18n.json b/i18n/deu/extensions/extension-editing/out/extensionLinter.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/extensions/extension-editing/out/extensionLinter.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/extensions/git/out/commands.i18n.json b/i18n/deu/extensions/git/out/commands.i18n.json index 3470905699d9f..b3f20ad87c778 100644 --- a/i18n/deu/extensions/git/out/commands.i18n.json +++ b/i18n/deu/extensions/git/out/commands.i18n.json @@ -16,11 +16,19 @@ "confirm discard": "Möchten Sie die Änderungen in {0} wirklich verwerfen?", "confirm discard multiple": "Möchten Sie wirklich Änderungen in {0} Dateien verwerfen?", "discard": "Änderungen verwerfen", + "confirm discard all": "Möchten Sie wirklich ALLE Änderungen verwerfen? Dieser Vorgang kann nicht rückgängig gemacht werden!", + "discardAll": "ALLE Änderungen verwerfen", + "no staged changes": "Es sind keine Änderungen bereitgestellt.\n\nMöchten Sie alle Ihre Änderungen automatisch bereitstellen und direkt committen?", + "yes": "Ja", + "always": "Immer", "no changes": "Keine Änderungen zum Speichern vorhanden.", "commit message": "Commit-Nachricht", "provide commit message": "Geben Sie eine Commit-Nachrichte ein.", "branch name": "Branchname", "provide branch name": "Geben Sie einen Branchnamen an.", + "select branch to delete": "Wählen Sie einen Branch zum Löschen aus", + "confirm force delete branch": "Der Branch '{0}' ist noch nicht vollständig zusammengeführt. Trotzdem löschen?", + "delete branch": "Branch löschen", "no remotes to pull": "In Ihrem Repository wurden keine Remoteelemente für den Pull konfiguriert.", "no remotes to push": "In Ihrem Repository wurden keine Remoteelemente für den Push konfiguriert.", "nobranch": "Wählen Sie ein Branch für den Push zu einem Remoteelement aus.", @@ -31,6 +39,7 @@ "no remotes to publish": "In Ihrem Repository wurden keine Remoteelemente für die Veröffentlichung konfiguriert.", "disabled": "Git ist deaktiviert oder wird in diesem Arbeitsbereich nicht unterstützt.", "clean repo": "Bereinigen Sie Ihre Repository-Arbeitsstruktur vor Auftragsabschluss.", + "cant push": "Verweise können nicht per Push an einen Remotespeicherort übertragen werden. Führen Sie zuerst \"Pull\" aus, um Ihre Änderungen zu integrieren.", "git error details": "Git: {0}", "git error": "Git-Fehler", "open git log": "Git-Protokoll öffnen" diff --git a/i18n/deu/extensions/git/out/main.i18n.json b/i18n/deu/extensions/git/out/main.i18n.json index 07df5014a5b40..58ab0b365d001 100644 --- a/i18n/deu/extensions/git/out/main.i18n.json +++ b/i18n/deu/extensions/git/out/main.i18n.json @@ -6,5 +6,6 @@ { "using git": "Verwenden von Git {0} von {1}", "updateGit": "Git aktualisieren", - "neverShowAgain": "Nicht mehr anzeigen" + "neverShowAgain": "Nicht mehr anzeigen", + "git20": "Sie haben anscheinend Git {0} installiert. Code funktioniert am besten mit Git 2 oder neuer" } \ No newline at end of file diff --git a/i18n/deu/extensions/git/out/model.i18n.json b/i18n/deu/extensions/git/out/model.i18n.json index c9102d14eb434..681e5ffa79523 100644 --- a/i18n/deu/extensions/git/out/model.i18n.json +++ b/i18n/deu/extensions/git/out/model.i18n.json @@ -8,5 +8,7 @@ "merge changes": "Änderungen zusammenführen", "staged changes": "Bereitgestellte Änderungen", "changes": "Änderungen", - "ok": "OK" + "ok": "OK", + "neveragain": "Nie wieder anzeigen", + "huge": "Das Git-Repository unter {0} umfasst zu viele aktive Änderungen. Nur ein Teil der Git-Features wird aktiviert." } \ No newline at end of file diff --git a/i18n/deu/extensions/git/package.i18n.json b/i18n/deu/extensions/git/package.i18n.json index e85515266777e..85ab4dca67ae6 100644 --- a/i18n/deu/extensions/git/package.i18n.json +++ b/i18n/deu/extensions/git/package.i18n.json @@ -11,27 +11,28 @@ "command.openFile": "Datei öffnen", "command.stage": "Änderungen bereitstellen", "command.stageAll": "Alle Änderungen bereitstellen", - "command.stageSelectedRanges": "Gewählte Bereiche staffeln", + "command.stageSelectedRanges": "Gewählte Bereiche bereitstellen", "command.revertSelectedRanges": "Ausgewählte Bereiche zurücksetzen", "command.unstage": "Bereitstellung der Änderungen aufheben", "command.unstageAll": "Bereitstellung aller Änderungen aufheben", - "command.unstageSelectedRanges": "Staffelung gewählter Bereiche aufheben", + "command.unstageSelectedRanges": "Bereitstellung gewählter Bereiche aufheben", "command.clean": "Änderungen verwerfen", "command.cleanAll": "Alle Änderungen verwerfen", "command.commit": "Commit", "command.commitStaged": "Commit bereitgestellt", - "command.commitStagedSigned": "Gestaffelt committen (abgemeldet)", + "command.commitStagedSigned": "Bereitgestelltes committen (unterzeichnet)", "command.commitAll": "Commit für alle ausführen", - "command.commitAllSigned": "Alle committen (abgemeldet)", + "command.commitAllSigned": "Alle committen (unterzeichnet)", "command.undoCommit": "Letzten Commit rückgängig machen", "command.checkout": "Auschecken an...", - "command.branch": "Branch wird erstellt...", + "command.branch": "Branch erstellen...", + "command.deleteBranch": "Branch löschen...", "command.pull": "Pull", "command.pullRebase": "Pull (Rebase)", "command.push": "Push", "command.pushTo": "Push zu...", "command.sync": "Synchronisierung", - "command.publish": "Veröffentlichen", + "command.publish": "Branch veröffentlichen", "command.showOutput": "Git-Ausgabe anzeigen", "config.enabled": "Gibt an, ob Git aktiviert ist.", "config.path": "Der Pfad zur ausführbaren Git-Datei.", @@ -39,6 +40,9 @@ "config.autofetch": "Gibt an, ob automatischer Abruf aktiviert ist.", "config.enableLongCommitWarning": "Gibt an, ob Warnungen zu langen Commitnachrichten erfolgen sollen.", "config.confirmSync": "Vor dem Synchronisieren von Git-Repositorys bestätigen.", - "config.countBadge": "Steuert die Git-Badgeanzahl.", - "config.checkoutType": "Steuert, welcher Branchtyp aufgelistet wird." + "config.countBadge": "Steuert die Git-Badgeanzahl. \"Alle\" zählt alle Änderungen. \"tracked\" (Nachverfolgt) zählt nur die nachverfolgten Änderungen. \"off\" (Aus) deaktiviert dies.", + "config.checkoutType": "Steuert, welcher Branchtyp beim Ausführen von \"Auschecken an...\" aufgelistet wird. \"Alle\" zeigt alle Verweise an, \"Lokal\" nur die lokalen Branches, \"Tags\" zeigt nur Tags an, und \"Remote\" zeigt nur Remotebranches an.", + "config.ignoreLegacyWarning": "Ignoriert die Legacy-Git-Warnung.", + "config.ignoreLimitWarning": "Ignoriert Warnung bei zu hoher Anzahl von Änderungen in einem Repository", + "config.defaultCloneDirectory": "Das Standard-Verzeichnis für einen Klon eines Git-Repositorys" } \ No newline at end of file diff --git a/i18n/deu/extensions/grunt/out/main.i18n.json b/i18n/deu/extensions/grunt/out/main.i18n.json index 8b6ad71cd4e6d..b1c5165293c78 100644 --- a/i18n/deu/extensions/grunt/out/main.i18n.json +++ b/i18n/deu/extensions/grunt/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Fehler bei der automatischen Grunt-Erkennung. Fehlermeldung: {0}" +} \ No newline at end of file diff --git a/i18n/deu/extensions/grunt/package.i18n.json b/i18n/deu/extensions/grunt/package.i18n.json index 8b6ad71cd4e6d..41b1a3a2d810e 100644 --- a/i18n/deu/extensions/grunt/package.i18n.json +++ b/i18n/deu/extensions/grunt/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.grunt.autoDetect": "Steuert, ob die automatische Erkennung von Grunt-Tasks aktiviert oder deaktiviert ist. Standardmäßig ist die Funktion aktiviert." +} \ No newline at end of file diff --git a/i18n/deu/extensions/gulp/out/main.i18n.json b/i18n/deu/extensions/gulp/out/main.i18n.json index 8b6ad71cd4e6d..a4ddf3b18b832 100644 --- a/i18n/deu/extensions/gulp/out/main.i18n.json +++ b/i18n/deu/extensions/gulp/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Fehler bei der automatischen Gulp-Erkennung. Fehlermeldung: {0}" +} \ No newline at end of file diff --git a/i18n/deu/extensions/gulp/package.i18n.json b/i18n/deu/extensions/gulp/package.i18n.json index 8b6ad71cd4e6d..b6b5c532278f5 100644 --- a/i18n/deu/extensions/gulp/package.i18n.json +++ b/i18n/deu/extensions/gulp/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.gulp.autoDetect": "Steuert, ob die automatische Erkennung von Gulp-Tasks aktiviert oder deaktiviert ist. Standardmäßig ist die Funktion aktiviert." +} \ No newline at end of file diff --git a/i18n/deu/extensions/jake/out/main.i18n.json b/i18n/deu/extensions/jake/out/main.i18n.json new file mode 100644 index 0000000000000..83268c0007181 --- /dev/null +++ b/i18n/deu/extensions/jake/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "Fehler bei der automatischen Jake-Erkennung. Fehlermeldung: {0}" +} \ No newline at end of file diff --git a/i18n/deu/extensions/jake/package.i18n.json b/i18n/deu/extensions/jake/package.i18n.json new file mode 100644 index 0000000000000..6ca3a5549ddf9 --- /dev/null +++ b/i18n/deu/extensions/jake/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.jake.autoDetect": "Steuert, ob die automatische Erkennung von Jake-Tasks aktiviert oder deaktiviert ist. Standardmäßig ist die Funktion aktiviert." +} \ No newline at end of file diff --git a/i18n/deu/extensions/markdown/out/extension.i18n.json b/i18n/deu/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..490139dcf55e6 --- /dev/null +++ b/i18n/deu/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "onPreviewStyleLoadError": "'markdown.styles' konnte nicht geladen werden: {0}" +} \ No newline at end of file diff --git a/i18n/deu/extensions/markdown/package.i18n.json b/i18n/deu/extensions/markdown/package.i18n.json index d8b94f2c035e4..184214e2034b2 100644 --- a/i18n/deu/extensions/markdown/package.i18n.json +++ b/i18n/deu/extensions/markdown/package.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "markdown.preview.breaks.desc": "Legt fest, wie Zeilenumbrüche in der Markdown-Vorschau gerendert werden. Die Einstellung 'true' erzeugt ein
für jede neue Zeile.", "markdown.preview.doubleClickToSwitchToEditor.desc": "Doppelklicken Sie in die Markdown-Vorschau, um zum Editor zu wechseln.", "markdown.preview.fontFamily.desc": "Steuert die Schriftfamilie, die in der Markdownvorschau verwendet wird.", "markdown.preview.fontSize.desc": "Steuert den Schriftgrad in Pixeln, der in der Markdownvorschau verwendet wird.", @@ -17,5 +18,6 @@ "markdown.showSource.title": "Quelle anzeigen", "markdown.styles.dec": "Eine Liste von URLs oder lokalen Pfaden zu CSS-Stylesheets aus der Markdownvorschau, die verwendet werden sollen. Relative Pfade werden relativ zu dem Ordner interpretiert, der im Explorer geöffnet ist. Wenn kein Ordner geöffnet ist, werden sie relativ zum Speicherort der Markdowndatei interpretiert. Alle '\\' müssen als '\\\\' geschrieben werden.", "markdown.showPreviewSecuritySelector.title": "Sicherheitseinstellungen für Markdown-Vorschau ändern", - "markdown.preview.enableExperimentalExtensionApi.desc": "[Experimentell] Erlaube Erweiterungen die Markdown-Vorschau zu erweitern." + "markdown.preview.enableExperimentalExtensionApi.desc": "[Experimentell] Erlaube Erweiterungen die Markdown-Vorschau zu erweitern.", + "markdown.trace.desc": "Aktiviert die Debugprotokollierung für die Markdown-Erweiterung." } \ No newline at end of file diff --git a/i18n/deu/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/deu/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..278e924d5a580 --- /dev/null +++ b/i18n/deu/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "acceptCurrentChange": "Aktuelle Änderung akzeptieren", + "acceptIncomingChange": "Eingehende Änderung akzeptieren", + "acceptBothChanges": "Beide Änderungen akzeptieren", + "compareChanges": "Änderungen vergleichen" +} \ No newline at end of file diff --git a/i18n/deu/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/deu/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..551e796d909c9 --- /dev/null +++ b/i18n/deu/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "cursorNotInConflict": "Der Editor-Cursor ist nicht innerhalb eines Mergingkonflikts", + "compareChangesTitle": "{0}: Aktuelle Änderungen ⟷ Eingehende Änderungen", + "cursorOnCommonAncestorsRange": "Der Editor-Cursor ist innerhalb des Blocks gemeinsamer Vorgänger, verschieben Sie ihn entweder in den Block \"aktuell\" oder \"eingehend\". ", + "cursorOnSplitterRange": "Der Editor-Cursor ist innerhalb der Mergingkonfliktaufteilung, verschieben Sie ihn entweder in den Block \"aktuell\" oder \"eingehend\".", + "noConflicts": "Keine Merge-Konflikte in dieser Datei gefunden", + "noOtherConflictsInThisFile": "Keine weiteren Merge-Konflikte in dieser Datei" +} \ No newline at end of file diff --git a/i18n/deu/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/deu/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..5ef895aeb90fe --- /dev/null +++ b/i18n/deu/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "currentChange": "(Aktuelle Änderung)", + "incomingChange": "(Eingehende Änderung)" +} \ No newline at end of file diff --git a/i18n/deu/extensions/merge-conflict/package.i18n.json b/i18n/deu/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..5bbe54989dcf3 --- /dev/null +++ b/i18n/deu/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "command.category": "Merge-Konflikt", + "command.accept.all-incoming": "Alle eingehenden akzeptieren", + "command.accept.all-both": "Alle beide akzeptieren", + "command.accept.current": "Aktuelles akzeptieren", + "command.accept.incoming": "Eingehendes akzeptieren", + "command.accept.selection": "Auswahl akzeptieren", + "command.accept.both": "Beides akzeptieren", + "command.next": "Nächster Konflikt", + "command.previous": "Vorheriger Konflikt", + "command.compare": "Aktuellen Konflikt vergleichen", + "config.title": "Merge-Konflikt", + "config.codeLensEnabled": "CodeLens-Mergingkonfliktblock im Editor aktivieren/deaktivieren", + "config.decoratorsEnabled": "Mergingkonflikt-Decorators im Editor aktivieren/deaktivieren" +} \ No newline at end of file diff --git a/i18n/deu/extensions/npm/package.i18n.json b/i18n/deu/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..df3491b4c0525 --- /dev/null +++ b/i18n/deu/extensions/npm/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.npm.autoDetect": "Steuert, ob die automatische Erkennung von NPM-Skripts aktiviert oder deaktiviert ist. Standardmäßig ist die Funktion aktiviert." +} \ No newline at end of file diff --git a/i18n/deu/extensions/php/package.i18n.json b/i18n/deu/extensions/php/package.i18n.json index 0f34620884841..e6a425d7d9af2 100644 --- a/i18n/deu/extensions/php/package.i18n.json +++ b/i18n/deu/extensions/php/package.i18n.json @@ -9,5 +9,6 @@ "configuration.validate.executablePath": "Zeigt auf die ausführbare PHP-Datei.", "configuration.validate.run": "Gibt an, ob der Linter beim Speichern oder bei der Eingabe ausgeführt wird.", "configuration.title": "PHP", - "commands.categroy.php": "PHP" + "commands.categroy.php": "PHP", + "command.untrustValidationExecutable": "Ausführbare Datei für PHP-Überprüfung nicht zulassen (als Arbeitsbereicheinstellung definiert)" } \ No newline at end of file diff --git a/i18n/deu/extensions/typescript/out/features/bufferSyncSupport.i18n.json b/i18n/deu/extensions/typescript/out/features/bufferSyncSupport.i18n.json index 055c93e97a340..676910e08b507 100644 --- a/i18n/deu/extensions/typescript/out/features/bufferSyncSupport.i18n.json +++ b/i18n/deu/extensions/typescript/out/features/bufferSyncSupport.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "versionMismatch": "Versionskonflikt zwischen dem globalen TSC ({0}) und dem Sprachdienst von VS Code ({1}). Dies kann zu Kompilierungsfehlern aufgrund von Inkonsistenzen führen.", + "versionMismatch": "TypeScript ({1)} wird für Editor-Funktionen verwenden. TypeScript ({0}) ist global auf Ihrem Computer installiert. Fehler in VS Code können sich von TSC-Fehlern unterscheiden", "moreInformation": "Weitere Informationen", "doNotCheckAgain": "Nicht erneut überprüfen", "close": "Schließen", diff --git a/i18n/deu/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/deu/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json new file mode 100644 index 0000000000000..171e5c786affa --- /dev/null +++ b/i18n/deu/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ts-check": "Aktiviert die Semantiküberprüfung in einer JavaScript-Datei. Muss sich oben in einer Datei befinden.", + "ts-nocheck": "Deaktiviert die Semantiküberprüfung in einer JavaScript-Datei. Muss sich oben in einer Datei befinden.", + "ts-ignore": "Unterdrückt @ts-check-Fehler in der nächsten Zeile einer Datei." +} \ No newline at end of file diff --git a/i18n/deu/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/deu/extensions/typescript/out/typescriptServiceClient.i18n.json index 6d17c22d103d4..5cda5156ae6a6 100644 --- a/i18n/deu/extensions/typescript/out/typescriptServiceClient.i18n.json +++ b/i18n/deu/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -4,9 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "restartTsServerTitle": "Neu starten", - "later": "Später", - "channelName": "TypeScript", "noServerFound": "Der Pfad \"{0}\" zeigt nicht auf eine gültige tsserver-Installation. Fallback auf gebündelte TypeScript-Version wird durchgeführt.", "noBundledServerFound": "Der tsserver von VSCode wurde von einer anderen Anwendung wie etwa einem fehlerhaften Tool zur Viruserkennung gelöscht. Führen Sie eine Neuinstallation von VS Code durch.", "versionNumber.custom": "benutzerdefiniert", @@ -17,6 +14,8 @@ "learnMore": "Weitere Informationen", "selectTsVersion": "Wählen Sie die für die JavaScript- und TypeScript-Sprachfunktionen verwendete TypeScript-Version aus.", "typescript.openTsServerLog.notSupported": "Die TS Server-Protokollierung erfordert TS 2.2.2+.", + "typescript.openTsServerLog.loggingNotEnabled": "Die TS Server-Protokollierung ist deaktiviert. Legen Sie \"typescript.tsserver.log\" fest, und laden Sie VS Code erneut, um die Protokollierung zu aktivieren.", + "typescript.openTsServerLog.enableAndReloadOption": "Aktiviert die Protokollierung und startet den TS-Server neu.", "typescript.openTsServerLog.noLogFile": "TS Server hat noch nicht mit der Protokollierung begonnen.", "openTsServerLog.openFileFailedFailed": "Die TS-Server-Protokolldatei konnte nicht geöffnet werden.", "serverDiedAfterStart": "Der TypeScript-Sprachdienst wurde direkt nach seinem Start fünfmal beendet. Der Dienst wird nicht neu gestartet.", diff --git a/i18n/deu/extensions/typescript/out/utils/logger.i18n.json b/i18n/deu/extensions/typescript/out/utils/logger.i18n.json new file mode 100644 index 0000000000000..bc738f43d0c37 --- /dev/null +++ b/i18n/deu/extensions/typescript/out/utils/logger.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "channelName": "TypeScript" +} \ No newline at end of file diff --git a/i18n/deu/extensions/typescript/out/utils/projectStatus.i18n.json b/i18n/deu/extensions/typescript/out/utils/projectStatus.i18n.json index 2ec9b6aab9aa8..22d044da6195e 100644 --- a/i18n/deu/extensions/typescript/out/utils/projectStatus.i18n.json +++ b/i18n/deu/extensions/typescript/out/utils/projectStatus.i18n.json @@ -6,7 +6,6 @@ { "hintExclude": "Um die JavaScript/TypeScript-Sprachfunktionen für das gesamte Projekt zu aktivieren, schließen Sie Ordner mit vielen Dateien aus. Beispiel: {0}", "hintExclude.generic": "Um JavaScript/TypeScript-Sprachfunktionen für das gesamte Projekt zu aktivieren, schließen Sie große Ordner mit Quelldateien aus, an denen Sie nicht arbeiten.", - "open": "Auszuschließende Elemente konfigurieren", "large.label": "Auszuschließende Elemente konfigurieren", "hintExclude.tooltip": "Um JavaScript/TypeScript-Sprachfunktionen für das gesamte Projekt zu aktivieren, schließen Sie große Ordner mit Quelldateien aus, an denen Sie nicht arbeiten." } \ No newline at end of file diff --git a/i18n/deu/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/deu/extensions/typescript/out/utils/typingsStatus.i18n.json index 6d9362666976d..1f64e53eff2db 100644 --- a/i18n/deu/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/deu/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "installingPackages": "Daten werden zum Optimieren von TypeScript IntelliSense abgerufen", + "typesInstallerInitializationFailed.title": "Typisierungsdateien für JavaScript-Sprachfunktionen konnten nicht installiert werden. Stellen Sie sicher, das NPM installiert ist, oder konfigurieren Sie \"typescript.npm\" in Ihren Benutzereinstellungen.", "typesInstallerInitializationFailed.moreInformation": "Weitere Informationen", "typesInstallerInitializationFailed.doNotCheckAgain": "Nicht erneut überprüfen", "typesInstallerInitializationFailed.close": "Schließen" diff --git a/i18n/deu/extensions/typescript/package.i18n.json b/i18n/deu/extensions/typescript/package.i18n.json index c5276e8289314..9c93e639cb710 100644 --- a/i18n/deu/extensions/typescript/package.i18n.json +++ b/i18n/deu/extensions/typescript/package.i18n.json @@ -11,11 +11,13 @@ "typescript.tsdk.desc": "Gibt den Ordnerpfad mit den zu verwendenden tsserver- und lib*.d.ts-Dateien an.", "typescript.disableAutomaticTypeAcquisition": "Deaktiviert die automatische Typerfassung. Erfordert TypeScript >= 2.0.6 und einen Neustart nach der Änderung.", "typescript.check.tscVersion": "Überprüfen, ob sich ein global installierter TypeScript-Compiler (z. B. tsc) vom verwendeten TypeScript-Sprachdienst unterscheidet.", - "typescript.tsserver.experimentalAutoBuild": "Ermöglicht experimentelle automatische Buildvorgänge. Erfordert Version 1.9 dev oder 2.x tsserver sowie einen Neustart von VS Code nach der Änderung.", + "typescript.tsserver.log": "Aktiviert die Protokollierung des TS-Servers in eine Datei. Mithilfe der Protokolldatei lassen sich Probleme beim TS-Server diagnostizieren. Die Protokolldatei kann Dateipfade, Quellcode und weitere potenziell sensible Informationen aus Ihrem Projekt enthalten.", + "typescript.tsserver.trace": "Aktiviert die Ablaufverfolgung von an den TS-Server gesendeten Nachrichten. Mithilfe der Ablaufverfolgung lassen sich Probleme beim TS-Server diagnostizieren. Die Ablaufverfolgung kann Dateipfade, Quellcode und weitere potenziell sensible Informationen aus Ihrem Projekt enthalten.", "typescript.validate.enable": "TypeScript-Überprüfung aktivieren/deaktivieren.", "typescript.format.enable": "Standardmäßigen TypeScript-Formatierer aktivieren/deaktivieren.", "javascript.format.enable": "Standardmäßigen JavaScript-Formatierer aktivieren/deaktivieren.", "format.insertSpaceAfterCommaDelimiter": "Definiert die Verarbeitung von Leerzeichen nach einem Kommatrennzeichen.", + "format.insertSpaceAfterConstructor": "Definiert die Verarbeitung von Leerzeichen nach dem Konstruktor-Schlüsselwort. Erfordert TypeScript 2.3.0 oder höher.", "format.insertSpaceAfterSemicolonInForStatements": " Definiert die Verarbeitung von Leerzeichen nach einem Semikolon in einer for-Anweisung.", "format.insertSpaceBeforeAndAfterBinaryOperators": "Definiert die Verarbeitung von Leerzeichen nach einem binären Operator.", "format.insertSpaceAfterKeywordsInControlFlowStatements": "Definiert die Verarbeitung von Leerzeichen nach Schlüsselwörtern in einer Flusssteuerungsanweisung.", @@ -23,6 +25,7 @@ "format.insertSpaceBeforeFunctionParenthesis": "Definiert die Verarbeitung von Leerzeichen vor Funktionsargumentklammern. Erfordert TypeScript >= 2.1.5.", "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": "Definiert die Verarbeitung von Leerzeichen nach öffnenden und vor schließenden nicht leeren runden Klammern.", "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": "Definiert die Verarbeitung von Leerzeichen nach öffnenden und vor schließenden nicht leeren eckigen Klammern.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": "Definiert die Verarbeitung von Leerzeichen nach öffnenden und vor schließenden geschweiften Klammern. Erfordert TypeScript 2.3.0 oder höher.", "format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": "Definiert die Verarbeitung von Leerzeichen nach öffnenden und vor schließenden geschweiften Klammern für Vorlagenzeichenfolgen. Erfordert TypeScript >= 2.0.6.", "format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": "Definiert die Verarbeitung von Leerzeichen nach öffnenden und vor schließenden geschweiften Klammern für JSX-Ausdrücke. Erfordert TypeScript >= 2.0.6.", "format.placeOpenBraceOnNewLineForFunctions": "Definiert, ob eine öffnende geschweifte Klammer für Funktionen in eine neue Zeile eingefügt wird.", @@ -30,6 +33,16 @@ "javascript.validate.enable": "JavaScript-Überprüfung aktivieren/deaktivieren.", "typescript.goToProjectConfig.title": "Zur Projektkonfiguration wechseln", "javascript.goToProjectConfig.title": "Zur Projektkonfiguration wechseln", + "javascript.referencesCodeLens.enabled": "Aktiviert oder deaktiviert CodeLens-Verweise in JavaScript Dateien. Erfordert TypeScript 2.0.6 oder höher.", + "typescript.referencesCodeLens.enabled": "Aktiviert oder deaktiviert CodeLens-Verweise in TypeScript Dateien. Erfordert TypeScript 2.0.6 oder höher.", + "typescript.implementationsCodeLens.enabled": "Aktiviert oder deaktiviert CodeLens-Implementierungen. Erfordert TypeScript 2.2.0 oder höher.", "typescript.openTsServerLog.title": "TS Server-Protokolldatei öffnen", - "typescript.selectTypeScriptVersion.title": "TypeScript-Version wählen" + "typescript.restartTsServer": "TS Server neu starten", + "typescript.selectTypeScriptVersion.title": "TypeScript-Version wählen", + "jsDocCompletion.enabled": "Automatische JSDoc-Kommentare aktivieren/deaktivieren", + "javascript.implicitProjectConfig.checkJs": "Aktiviert/deaktiviert die Semantikprüfung bei JavaScript-Dateien. Diese Einstellung wird von vorhandenen \"jsconfig.json\"- oder \"tsconfig.json\"-Dateien außer Kraft gesetzt. Erfordert TypeScript 2.3.1 oder höher.", + "typescript.npm": "Gibt den Pfad zur ausführbaren NPM-Datei an, die für die automatische Typerfassung verwendet wird. Hierfür ist TypeScript 2.3.4 oder höher erforderlich.", + "typescript.check.npmIsInstalled": "Überprüfen Sie, ob NPM für die automatische Typerfassung installiert ist.", + "javascript.nameSuggestions": "Das Einbeziehen eindeutiger Namen von der Datei in der JavaScript-Vorschlagsliste aktivieren/deaktivieren.", + "typescript.tsc.autoDetect": "Steuert, ob die automatische Erkennung von tsc-Tasks aktiviert oder deaktiviert ist.\n" } \ No newline at end of file diff --git a/i18n/deu/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/deu/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index a2b0a61e0fa19..9b3e7fa3e6ebb 100644 --- a/i18n/deu/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/deu/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,8 +6,7 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "Das Bild ist zu groß für den Editor. ", - "resourceOpenExternalButton": "Bild öffnen", - "resourceOpenExternalText": " mit externem Programm?", + "resourceOpenExternalButton": "Bild mit externem Programm öffnen?", "nativeBinaryError": "Die Datei wird nicht im Editor angezeigt, weil sie binär oder sehr groß ist oder eine nicht unterstützte Textcodierung verwendet.", "sizeB": "{0} B", "sizeKB": "{0} KB", diff --git a/i18n/deu/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/deu/src/vs/base/common/jsonErrorMessages.i18n.json new file mode 100644 index 0000000000000..e4b0b451c6c91 --- /dev/null +++ b/i18n/deu/src/vs/base/common/jsonErrorMessages.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error.invalidSymbol": "Ungültiges Symbol", + "error.invalidNumberFormat": "Ungültiges Zahlenformat.", + "error.propertyNameExpected": "Ein Eigenschaftenname wurde erwartet.", + "error.valueExpected": "Ein Wert wurde erwartet.", + "error.colonExpected": "Ein Doppelpunkt wurde erwartet.", + "error.commaExpected": "Ein Komma wurde erwartet.", + "error.closeBraceExpected": "Eine schließende geschweifte Klammer wurde erwartet.", + "error.closeBracketExpected": "Eine schließende Klammer wurde erwartet.", + "error.endOfFileExpected": "Das Dateiende wurde erwartet." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/base/common/keybindingLabels.i18n.json b/i18n/deu/src/vs/base/common/keybindingLabels.i18n.json new file mode 100644 index 0000000000000..d7a218d2a9504 --- /dev/null +++ b/i18n/deu/src/vs/base/common/keybindingLabels.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ctrlKey": "STRG", + "shiftKey": "UMSCHALTTASTE", + "altKey": "ALT", + "windowsKey": "Windows", + "ctrlKey.long": "STRG", + "shiftKey.long": "UMSCHALTTASTE", + "altKey.long": "ALT", + "cmdKey.long": "Befehlstaste", + "windowsKey.long": "Windows" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/code/electron-main/menus.i18n.json b/i18n/deu/src/vs/code/electron-main/menus.i18n.json index 55751eba86739..296ab1c7cca50 100644 --- a/i18n/deu/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/deu/src/vs/code/electron-main/menus.i18n.json @@ -6,7 +6,7 @@ { "mFile": "&&Datei", "mEdit": "&&Bearbeiten", - "mSelection": "&&Aktion auswählen", + "mSelection": "&&Auswahl", "mView": "&&Anzeigen", "mGoto": "Los", "mDebug": "&&Debuggen", @@ -14,6 +14,7 @@ "mHelp": "&&Hilfe", "miNewWindow": "Neues &&Fenster", "mAbout": "Informationen zu {0}", + "mServices": "Dienste", "mHide": "{0} ausblenden", "mHideOthers": "Andere ausblenden", "mShowAll": "Alle anzeigen", @@ -40,6 +41,7 @@ "miSelectIconTheme": "Datei-&&Symboldesign", "miPreferences": "&&Einstellungen", "miReopenClosedEditor": "&&Geschlossenen Editor erneut öffnen", + "miMore": "&&Mehr...", "miClearRecentOpen": "&&Zuletzt verwendete Dateien löschen", "miUndo": "&&Rückgängig", "miRedo": "&&Wiederholen", @@ -69,7 +71,7 @@ "miSmartSelectShrink": "Au&&swahl verkleinern", "miViewExplorer": "&&Explorer", "miViewSearch": "&&Suchen", - "miViewGit": "&&Git", + "miViewSCM": "S&&CM", "miViewDebug": "&&Debuggen", "miViewExtensions": "E&&xtensions", "miToggleOutput": "&&Ausgabe", @@ -114,9 +116,11 @@ "miGotoSymbolInFile": "Gehe zu &&Symbol in Datei...", "miGotoSymbolInWorkspace": "Zu Symbol im &&Arbeitsbereich wechseln...", "miGotoDefinition": "Gehe &&zu Definition", + "miGotoTypeDefinition": "Wechsle zu &&Typdefinition", + "miGotoImplementation": "Wechsle zur &&Implementierung", "miGotoLine": "Gehe zu &&Zeile...", "miStartDebugging": "&&Debugging starten", - "miStartWithoutDebugging": "&&Ohne Debuggen starten", + "miStartWithoutDebugging": "&&Ohne Debugging starten", "miStopDebugging": "&&Debugging beenden", "miRestart Debugging": "&&Debugging erneut starten", "miOpenConfigurations": "&&Konfigurationen öffnen", @@ -130,16 +134,17 @@ "miColumnBreakpoint": "S&&paltenhaltepunkt", "miFunctionBreakpoint": "&&Funktionshaltepunkt...", "miNewBreakpoint": "&&Neuer Haltepunkt", + "miEnableAllBreakpoints": "Alle Haltepunkte aktivieren", "miDisableAllBreakpoints": "A&&lle Haltepunkte deaktivieren", "miRemoveAllBreakpoints": "&&Alle Haltepunkte entfernen", "miInstallAdditionalDebuggers": "&&Zusätzliche Debugger installieren...", "mMinimize": "Minimieren", - "mClose": "Schließen", "mBringToFront": "Alle in den Vordergrund", "miToggleDevTools": "&&Entwicklungertools umschalten", "miAccessibilityOptions": "&&Optionen für erleichterte Bedienung", "miReportIssues": "&&Probleme melden", "miWelcome": "&&Willkommen", + "miInteractivePlayground": "&&Interactive Spielwiese", "miDocumentation": "&&Dokumentation", "miReleaseNotes": "&&Anmerkungen zu dieser Version", "miKeyboardShortcuts": "&&Referenz für Tastenkombinationen", @@ -149,12 +154,12 @@ "miLicense": "&&Lizenz anzeigen", "miPrivacyStatement": "&&Datenschutzerklärung", "miAbout": "&&Info", - "miRestartToUpdate": "Für Update neu starten...", + "accessibilityOptionsWindowTitle": "Optionen für erleichterte Bedienung", "miCheckingForUpdates": "Überprüfen auf Updates...", "miDownloadUpdate": "Verfügbares Update herunterladen", "miDownloadingUpdate": "Das Update wird heruntergeladen...", "miInstallingUpdate": "Update wird installiert...", - "miCheckForUpdates": "Auf Updates überprüfen...", + "miCheckForUpdates": "Nach Aktualisierungen suchen...", "aboutDetail": "\nVersion {0}\nCommit {1}\nDatum {2}\nShell {3}\nRenderer {4}\nNode {5}", "okButton": "OK" } \ No newline at end of file diff --git a/i18n/deu/src/vs/code/electron-main/windows.i18n.json b/i18n/deu/src/vs/code/electron-main/windows.i18n.json index 19ea01ffe2bea..72c02e88f7478 100644 --- a/i18n/deu/src/vs/code/electron-main/windows.i18n.json +++ b/i18n/deu/src/vs/code/electron-main/windows.i18n.json @@ -7,7 +7,6 @@ "ok": "OK", "pathNotExistTitle": "Der Pfad ist nicht vorhanden.", "pathNotExistDetail": "Der Pfad \"{0}\" scheint auf dem Datenträger nicht mehr vorhanden zu sein.", - "accessibilityOptionsWindowTitle": "Optionen für erleichterte Bedienung", "reopen": "Erneut öffnen", "wait": "Bitte warten.", "close": "Schließen", @@ -15,8 +14,6 @@ "appStalledDetail": "Sie können das Fenster erneut öffnen oder schließen oder weiterhin warten.", "appCrashed": "Das Fenster ist abgestürzt.", "appCrashedDetail": "Bitte entschuldigen Sie die Unannehmlichkeiten. Sie können das Fenster erneut öffnen und dort weitermachen, wo Sie aufgehört haben.", - "newWindow": "Neues Fenster", - "newWindowDesc": "Öffnet ein neues Fenster.", - "recentFolders": "Zuletzt verwendete Ordner", - "folderDesc": "{0} {1}" + "openFile": "Datei öffnen", + "openFolder": "Ordner öffnen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/code/node/cliProcessMain.i18n.json b/i18n/deu/src/vs/code/node/cliProcessMain.i18n.json index 18b9830f20668..75e98b759836b 100644 --- a/i18n/deu/src/vs/code/node/cliProcessMain.i18n.json +++ b/i18n/deu/src/vs/code/node/cliProcessMain.i18n.json @@ -7,7 +7,7 @@ "notFound": "Die Erweiterung '{0}' wurde nicht gefunden.", "notInstalled": "Die Erweiterung \"{0}\" ist nicht installiert.", "useId": "Stellen Sie sicher, dass Sie die vollständige Erweiterungs-ID (einschließlich des Herausgebers) verwenden. Beispiel: {0}", - "successVsixInstall": "Die Extension \"{0}\" wurde erfolgreich installiert.", + "successVsixInstall": "Die Erweiterung \"{0}\" wurde erfolgreich installiert.", "alreadyInstalled": "Die Erweiterung \"{0}\" ist bereits installiert.", "foundExtension": "\"{0}\" wurde in Marketplace gefunden.", "installing": "Wird installiert...", diff --git a/i18n/deu/src/vs/editor/browser/widget/diffEditorWidget.i18n.json b/i18n/deu/src/vs/editor/browser/widget/diffEditorWidget.i18n.json index 8b6ad71cd4e6d..51ebb551931c2 100644 --- a/i18n/deu/src/vs/editor/browser/widget/diffEditorWidget.i18n.json +++ b/i18n/deu/src/vs/editor/browser/widget/diffEditorWidget.i18n.json @@ -3,4 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "diffEditorInserted": "Hintergrundfarbe für eingefügten Text.", + "diffEditorRemoved": "Hintergrundfarbe für entfernten Text.", + "diffEditorInsertedOutline": "Konturfarbe für eingefügten Text.", + "diffEditorRemovedOutline": "Konturfarbe für entfernten Text." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/browser/widget/diffReview.i18n.json b/i18n/deu/src/vs/editor/browser/widget/diffReview.i18n.json new file mode 100644 index 0000000000000..c35e6f205f9bf --- /dev/null +++ b/i18n/deu/src/vs/editor/browser/widget/diffReview.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "Schließen", + "header": "Unterschied von {0} zu {1}: Original {2}, {3} Zeilen, Geändert {4}, {5} Zeilen", + "blankLine": "leer" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json index 2fe70e62eed2e..4fa8980e64215 100644 --- a/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -9,6 +9,7 @@ "fontWeight": "Steuert die Schriftbreite.", "fontSize": "Steuert den Schriftgrad in Pixeln.", "lineHeight": "Steuert die Zeilenhöhe. Verwenden Sie 0, um LineHeight aus der FontSize-Angabe zu berechnen.", + "letterSpacing": "Steuert den Zeichenabstand in Pixeln.", "lineNumbers": "Steuert die Anzeige von Zeilennummern. Mögliche Werte sind \"Ein\", \"Aus\" und \"Relativ\". \"Relativ\" zeigt die Zeilenanzahl ab der aktuellen Cursorposition.", "rulers": "Spalten, an denen vertikale Lineale angezeigt werden sollen", "wordSeparators": "Zeichen, die als Worttrennzeichen verwendet werden, wenn wortbezogene Navigationen oder Vorgänge ausgeführt werden.", @@ -20,8 +21,11 @@ "roundedSelection": "Steuert, ob die Auswahl runde Ecken aufweist.", "scrollBeyondLastLine": "Legt fest, ob der Editor Bildläufe über die letzte Zeile hinaus ausführt.", "minimap.enabled": "Steuert, ob die Minikarte angezeigt wird", + "minimap.showSlider": "Steuert, ob der Minimap-Schieberegler automatisch ausgeblendet wird.", "minimap.renderCharacters": "Die tatsächlichen Zeichen in einer Zeile rendern (im Gegensatz zu Farbblöcken)", "minimap.maxColumn": "Breite der Minikarte beschränken, um höchstens eine bestimmte Anzahl von Spalten zu rendern", + "find.seedSearchStringFromSelection": "Steuert, ob wir für die Suchzeichenfolge im Suchwidget aus der Editorauswahl ein Seeding ausführen.", + "find.autoFindInSelection": "Steuert, ob die Kennzeichnung \"In Auswahl suchen\" aktiviert ist, wenn mehrere Zeichen oder Textzeilen im Editor ausgewählt wurden.", "wordWrap.off": "Zeilenumbrüche erfolgen nie.", "wordWrap.on": "Der Zeilenumbruch erfolgt an der Breite des Anzeigebereichs.", "wordWrap.wordWrapColumn": "Der Zeilenbereich erfolgt bei \"editor.wordWrapColumn\".", @@ -30,17 +34,20 @@ "wordWrapColumn": "Steuert die Umbruchspalte des Editors, wenn für \"editor.wordWrap\" die Option \"wordWrapColumn\" oder \"bounded\" festgelegt ist.", "wrappingIndent": "Steuert den Einzug der umbrochenen Zeilen. Der Wert kann \"none\", \"same\" oder \"indent\" sein.", "mouseWheelScrollSensitivity": "Ein Multiplikator, der für die Mausrad-Bildlaufereignisse \"deltaX\" und \"deltaY\" verwendet werden soll.", + "multiCursorModifier.ctrlCmd": "Ist unter Windows und Linux der Taste \"STRG\" und unter OSX der Befehlstaste zugeordnet.", + "multiCursorModifier.alt": "Ist unter Windows und Linux der Taste \"Alt\" und unter OSX der Wahltaste zugeordnet. ", + "multiCursorModifier": "Der Modifizierer, der zum Hinzufügen mehrerer Cursor mit der Maus verwendet wird. \"ctrlCmd\" wird unter Windows und Linux der Taste \"STRG\" und unter OSX der Befehlstaste zugeordnet. Die Mausbewegungen \"Gehe zu Definition\" und \"Link öffnen\" werden so angepasst, dass kein Konflikt mit dem Multi-Cursor-Modifizierer entsteht.", "quickSuggestions.strings": "Schnellvorschläge innerhalb von Zeichenfolgen aktivieren.", "quickSuggestions.comments": "Schnellvorschläge innerhalb von Kommentaren aktivieren.", "quickSuggestions.other": "Schnellvorschläge außerhalb von Zeichenfolgen und Kommentaren aktivieren.", "quickSuggestions": "Steuert, ob Vorschläge während der Eingabe automatisch angezeigt werden sollen.", "quickSuggestionsDelay": "Steuert die Verzögerung in ms für die Anzeige der Schnellvorschläge.", - "parameterHints": "Aktiviert Parameterhinweise.", + "parameterHints": "Aktiviert ein Pop-Up, das Parameter-Dokumentation und Typ-Information während des Tippens anzeigt", "autoClosingBrackets": "Steuert, ob der Editor Klammern automatisch nach dem Öffnen schließt.", "formatOnType": "Steuert, ob der Editor Zeilen automatisch nach der Eingabe formatiert.", "formatOnPaste": "Steuert, ob der Editor den eingefügten Inhalt automatisch formatiert.", "suggestOnTriggerCharacters": "Steuert, ob Vorschläge automatisch bei der Eingabe von Triggerzeichen angezeigt werden.", - "acceptSuggestionOnEnter": "Steuert, ob Vorschläge über die Eingabetaste (zusätzlich zur TAB-Taste) angenommen werden sollen. Vermeidet Mehrdeutigkeit zwischen dem Einfügen neuer Zeilen oder dem Annehmen von Vorschlägen.", + "acceptSuggestionOnEnter": "Steuert, ob Vorschläge über die Eingabetaste (zusätzlich zur TAB-Taste) angenommen werden sollen. Vermeidet Mehrdeutigkeit zwischen dem Einfügen neuer Zeilen oder dem Annehmen von Vorschlägen. Der Wert \"smart\" bedeutet, dass ein Vorschlag nur über die Eingabetaste akzeptiert wird, wenn eine Textänderung vorgenommen wird.", "acceptSuggestionOnCommitCharacter": "Steuert, ob Vorschläge über Commitzeichen angenommen werden sollen. In JavaScript kann ein Semikolon (\";\") beispielsweise ein Commitzeichen sein, das einen Vorschlag annimmt und dieses Zeichen eingibt.", "snippetSuggestions": "Steuert, ob Codeausschnitte mit anderen Vorschlägen angezeigt und wie diese sortiert werden.", "emptySelectionClipboard": "Steuert, ob ein Kopiervorgang ohne Auswahl die aktuelle Zeile kopiert.", @@ -62,12 +69,18 @@ "renderLineHighlight": "Steuert, wie der Editor die aktuelle Zeilenhervorhebung rendern soll. Mögliche Werte sind \"none\", \"gutter\", \"line\" und \"all\".", "codeLens": "Steuert, ob der Editor CodeLenses anzeigt.", "folding": "Steuert, ob für den Editor Codefaltung aktiviert ist.", + "showFoldingControls": "Steuert, ob die Falt-Steuerelemente an der Leiste automatisch ausgeblendet werden.", "matchBrackets": "Übereinstimmende Klammern hervorheben, wenn eine davon ausgewählt wird.", "glyphMargin": "Steuert, ob der Editor den vertikalen Glyphenrand rendert. Der Glyphenrand wird hauptsächlich zum Debuggen verwendet.", "useTabStops": "Das Einfügen und Löschen von Leerzeichen folgt auf Tabstopps.", "trimAutoWhitespace": "Nachfolgendes automatisch eingefügtes Leerzeichen entfernen", "stablePeek": "Peek-Editoren geöffnet lassen, auch wenn auf ihren Inhalt doppelgeklickt oder die ESC-TASTE gedrückt wird.", "dragAndDrop": "Steuert, ob der Editor das Verschieben einer Auswahl per Drag and Drop zulässt.", + "accessibilitySupport.auto": "Der Editor verwendet Plattform-APIs, um zu erkennen, wenn eine Sprachausgabe angefügt wird.", + "accessibilitySupport.on": "Der Editor wird durchgehend für die Verwendung mit einer Sprachausgabe optimiert.", + "accessibilitySupport.off": "Der Editor wird nie für die Verwendung mit einer Sprachausgabe optimiert. ", + "accessibilitySupport": "Steuert, ob der Editor in einem Modus ausgeführt werden soll, in dem er für die Sprachausgabe optimiert wird.", + "links": "Steuert, ob der Editor Links erkennen und anklickbar machen soll", "sideBySide": "Steuert, ob der Diff-Editor das Diff nebeneinander oder inline anzeigt.", "ignoreTrimWhitespace": "Steuert, ob der Diff-Editor Änderungen in führenden oder nachgestellten Leerzeichen als Diffs anzeigt.", "renderIndicators": "Steuert, ob der Diff-Editor die Indikatoren \"+\" und \"-\" für hinzugefügte/entfernte Änderungen anzeigt.", diff --git a/i18n/deu/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/deu/src/vs/editor/common/config/editorOptions.i18n.json new file mode 100644 index 0000000000000..b892d619fd6ca --- /dev/null +++ b/i18n/deu/src/vs/editor/common/config/editorOptions.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "accessibilityOffAriaLabel": "Der Editor ist zurzeit nicht verfügbar. Drücken Sie Alt+F1 für Optionen.", + "editorViewAccessibleLabel": "Editor-Inhalt" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/common/services/bulkEdit.i18n.json b/i18n/deu/src/vs/editor/common/services/bulkEdit.i18n.json index 864b6f935a8d1..d7541e30bc744 100644 --- a/i18n/deu/src/vs/editor/common/services/bulkEdit.i18n.json +++ b/i18n/deu/src/vs/editor/common/services/bulkEdit.i18n.json @@ -4,5 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "conflict": "Die folgenden Dateien wurden in der Zwischenzeit geändert: {0}" + "conflict": "Die folgenden Dateien wurden in der Zwischenzeit geändert: {0}", + "summary.0": "Keine Änderungen vorgenommen", + "summary.nm": "{0} Änderungen am Text in {1} Dateien vorgenommen", + "summary.n0": "{0} Änderungen am Text in einer Datei vorgenommen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/deu/src/vs/editor/common/view/editorColorRegistry.i18n.json index aff2b6db4dbec..56e0924a36c8f 100644 --- a/i18n/deu/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/deu/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -10,5 +10,15 @@ "caret": "Farbe des Cursors im Editor.", "editorWhitespaces": "Farbe der Leerzeichen im Editor.", "editorIndentGuides": "Farbe der Führungslinien für Einzüge im Editor.", - "editorLineNumbers": "Zeilennummernfarbe im Editor." + "editorLineNumbers": "Zeilennummernfarbe im Editor.", + "editorRuler": "Farbe des Editor-Lineals.", + "editorCodeLensForeground": "Vordergrundfarbe der CodeLens-Links im Editor", + "editorBracketMatchBackground": "Hintergrundfarbe für zusammengehörige Klammern", + "editorBracketMatchBorder": "Farbe für zusammengehörige Klammern", + "editorOverviewRulerBorder": "Farbe des Rahmens für das Übersicht-Lineal.", + "editorGutter": "Hintergrundfarbe der Editorleiste. Die Leiste enthält die Glyphenränder und die Zeilennummern.", + "errorForeground": "Vordergrundfarbe von Fehlerunterstreichungen im Editor.", + "errorBorder": "Rahmenfarbe von Fehlerunterstreichungen im Editor.", + "warningForeground": "Vordergrundfarbe von Warnungsunterstreichungen im Editor.", + "warningBorder": "Rahmenfarbe von Warnungsunterstreichungen im Editor." } \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/find/common/findController.i18n.json b/i18n/deu/src/vs/editor/contrib/find/common/findController.i18n.json index e4d42f465d185..1766611d9a43c 100644 --- a/i18n/deu/src/vs/editor/contrib/find/common/findController.i18n.json +++ b/i18n/deu/src/vs/editor/contrib/find/common/findController.i18n.json @@ -14,6 +14,6 @@ "addSelectionToPreviousFindMatch": "Letzte Auswahl zu vorheriger Übereinstimmungssuche hinzufügen", "moveSelectionToNextFindMatch": "Letzte Auswahl in nächste Übereinstimmungssuche verschieben", "moveSelectionToPreviousFindMatch": "Letzte Auswahl in vorherige Übereinstimmungssuche verschieben", - "selectAllOccurencesOfFindMatch": "Alle Vorkommen auswählen und Übereinstimmung suchen", + "selectAllOccurrencesOfFindMatch": "Alle Vorkommen auswählen und Übereinstimmung suchen", "changeAll.label": "Alle Vorkommen ändern" } \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/format/browser/formatActions.i18n.json b/i18n/deu/src/vs/editor/contrib/format/browser/formatActions.i18n.json index d1fd1741e7486..52715dd20dbe0 100644 --- a/i18n/deu/src/vs/editor/contrib/format/browser/formatActions.i18n.json +++ b/i18n/deu/src/vs/editor/contrib/format/browser/formatActions.i18n.json @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "hint11": "Made 1 formatting edit on line {0}", - "hintn1": "Made {0} formatting edits on line {1}", - "hint1n": "Made 1 formatting edit between lines {0} and {1}", - "hintnn": "Made {0} formatting edits between lines {1} and {2}", + "hint11": "1 Formatierung in Zeile {0} vorgenommen", + "hintn1": "{0} Formatierungen in Zeile {1} vorgenommen", + "hint1n": "1 Formatierung zwischen Zeilen {0} und {1} vorgenommen", + "hintnn": "{0} Formatierungen zwischen Zeilen {1} und {2} vorgenommen", "formatDocument.label": "Format Document", "formatSelection.label": "Format Selection" } \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/deu/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..ffee2c2fa36db --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "Keine Definition gefunden für \"{0}\".", + "generic.noResults": "Keine Definition gefunden", + "meta.title": " – {0} Definitionen", + "actions.goToDecl.label": "Gehe zu Definition", + "actions.goToDeclToSide.label": "Definition an der Seite öffnen", + "actions.previewDecl.label": "Peek-Definition", + "goToImplementation.noResultWord": "Keine Implementierung gefunden für \"{0}\"", + "goToImplementation.generic.noResults": "Keine Implementierung gefunden", + "meta.implementations.title": "{0} Implementierungen", + "actions.goToImplementation.label": "Zur Implementierung wechseln", + "actions.peekImplementation.label": "Vorschau der Implementierung anzeigen", + "goToTypeDefinition.noResultWord": "Keine Typendefinition gefunden für \"{0}\"", + "goToTypeDefinition.generic.noResults": "Keine Typendefinition gefunden", + "meta.typeDefinitions.title": "{0} Typdefinitionen", + "actions.goToTypeDefinition.label": "Zur Typdefinition wechseln", + "actions.peekTypeDefinition.label": "Vorschau der Typdefinition anzeigen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/deu/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..2d5f00609a890 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "Klicken Sie, um {0} Definitionen anzuzeigen." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/hover/browser/hover.i18n.json b/i18n/deu/src/vs/editor/contrib/hover/browser/hover.i18n.json index d1a57ea327423..44bcefc08052b 100644 --- a/i18n/deu/src/vs/editor/contrib/hover/browser/hover.i18n.json +++ b/i18n/deu/src/vs/editor/contrib/hover/browser/hover.i18n.json @@ -4,8 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "showHover": "Hovern anzeigen", - "hoverHighlight": "Hervorhebung eines Worts, unter dem ein Mauszeiger angezeigt wird.", - "hoverBackground": "Background color of the editor hover.", - "hoverBorder": "Rahmenfarbe des Editor-Mauszeigers." + "showHover": "Hovern anzeigen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/links/browser/links.i18n.json b/i18n/deu/src/vs/editor/contrib/links/browser/links.i18n.json index 8445991334986..3c582ab348dc5 100644 --- a/i18n/deu/src/vs/editor/contrib/links/browser/links.i18n.json +++ b/i18n/deu/src/vs/editor/contrib/links/browser/links.i18n.json @@ -6,6 +6,7 @@ { "links.navigate.mac": "BEFEHLSTASTE + Mausklick zum Aufrufen des Links", "links.navigate": "STRG + Mausklick zum Aufrufen des Links", + "links.navigate.al": "ALT + Mausklick zum Aufrufen des Links", "invalid.url": "Fehler beim Öffnen dieses Links, weil er nicht wohlgeformt ist: {0}", "missing.url": "Fehler beim Öffnen dieses Links, weil das Ziel fehlt.", "label": "Link öffnen" diff --git a/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index 7204351782b4c..76ca2b446f443 100644 --- a/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -4,5 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "aria.result.0": "Es wurden keine Ergebnisse gefunden." + "aria.oneReference": "Symbol in {0} in Zeile {1}, Spalte {2}", + "aria.fileReferences.1": "1 Symbol in {0}, vollständiger Pfad {1}", + "aria.fileReferences.N": "{0} Symbole in {1}, vollständiger Pfad {2}", + "aria.result.0": "Es wurden keine Ergebnisse gefunden.", + "aria.result.1": "1 Symbol in {0} gefunden", + "aria.result.n1": "{0} Symbole in {1} gefunden", + "aria.result.nm": "{0} Symbole in {1} Dateien gefunden" } \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index 445846a21a318..358b448e65f6b 100644 --- a/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -12,15 +12,16 @@ "noResults": "Keine Ergebnisse", "peekView.alternateTitle": "Verweise", "peekViewTitleBackground": "Hintergrundfarbe des Titelbereichs der Peek-Ansicht.", - "peekViewTitle": "Farbe des Titels in der Peek-Ansicht.", - "peekViewTitleInfo": "Farbe der Titelinformationen in der Peek-Ansicht.", + "peekViewTitleForeground": "Farbe des Titels in der Peek-Ansicht.", + "peekViewTitleInfoForeground": "Farbe der Titelinformationen in der Peek-Ansicht.", "peekViewBorder": "Farbe der Peek-Ansichtsränder und des Pfeils.", "peekViewResultsBackground": "Hintergrundfarbe der Ergebnisliste in der Peek-Ansicht.", - "peekViewResultsMatchForeground": "Vordergrund für Übereinstimmungseinträge in der Ergebnisliste der Peek-Ansicht.", - "peekViewResultsFileForeground": "Vordergrund für Dateieinträge in der Ergebnisliste der Peek-Ansicht.", + "peekViewResultsMatchForeground": "Vordergrundfarbe für Zeilenknoten in der Ergebnisliste der Peek-Ansicht.", + "peekViewResultsFileForeground": "Vordergrundfarbe für Dateiknoten in der Ergebnisliste der Peek-Ansicht.", "peekViewResultsSelectionBackground": "Hintergrundfarbe des ausgewählten Eintrags in der Ergebnisliste der Peek-Ansicht.", "peekViewResultsSelectionForeground": "Vordergrundfarbe des ausgewählten Eintrags in der Ergebnisliste der Peek-Ansicht.", "peekViewEditorBackground": "Hintergrundfarbe des Peek-Editors.", + "peekViewEditorGutterBackground": "Hintergrundfarbe der Leiste im Peek-Editor.", "peekViewResultsMatchHighlight": "Farbe für Übereinstimmungsmarkierungen in der Ergebnisliste der Peek-Ansicht.", "peekViewEditorMatchHighlight": "Farbe für Übereinstimmungsmarkierungen im Peek-Editor." } \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/rename/browser/rename.i18n.json b/i18n/deu/src/vs/editor/contrib/rename/browser/rename.i18n.json index 2f9ffc111f05f..0a095a2aa5eda 100644 --- a/i18n/deu/src/vs/editor/contrib/rename/browser/rename.i18n.json +++ b/i18n/deu/src/vs/editor/contrib/rename/browser/rename.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "no result": "Kein Ergebnis.", + "aria": "\"{0}\" erfolgreich in \"{1}\" umbenannt. Zusammenfassung: {2}", "rename.failed": "Fehler bei der Ausführung der Umbenennung.", "rename.label": "Symbol umbenennen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json b/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json index 3ba9d84591c9a..634627ef2a586 100644 --- a/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json +++ b/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "arai.alert.snippet": "Durch Annahme von \"{0}\" wurde folgender Text eingefügt: {1}", "suggest.trigger.label": "Vorschlag auslösen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 80f4b97aa14c9..df507c729f972 100644 --- a/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -4,10 +4,15 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "editorSuggestWidgetBackground": "Hintergrundfarbe des Vorschlagswidgets.", + "editorSuggestWidgetBorder": "Rahmenfarbe des Vorschlagswidgets.", + "editorSuggestWidgetForeground": "Vordergrundfarbe des Vorschlagswidgets.", + "editorSuggestWidgetSelectedBackground": "Hintergrundfarbe des ausgewählten Eintrags im Vorschlagswidget.", + "editorSuggestWidgetHighlightForeground": "Farbe der Trefferhervorhebung im Vorschlagswidget.", "readMore": "Mehr anzeigen...{0}", "suggestionWithDetailsAriaLabel": "{0}, Vorschlag, hat Details", "suggestionAriaLabel": "{0}, Vorschlag", - "goback": "Zurück", + "readLess": "Weniger anzeigen...{0}", "suggestWidget.loading": "Wird geladen...", "suggestWidget.noSuggestions": "Keine Vorschläge.", "suggestionAriaAccepted": "{0}, angenommen", diff --git a/i18n/deu/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/deu/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json index 0dd09877b283b..91b2f0a1b1a38 100644 --- a/i18n/deu/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json +++ b/i18n/deu/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -15,5 +15,9 @@ "schema.brackets": "Definiert die Klammersymbole, die den Einzug vergrößern oder verkleinern.", "schema.autoClosingPairs": "Definiert die Klammerpaare. Wenn eine öffnende Klammer eingegeben wird, wird die schließende Klammer automatisch eingefügt.", "schema.autoClosingPairs.notIn": "Definiert eine Liste von Bereichen, in denen die automatischen Paare deaktiviert sind.", - "schema.surroundingPairs": "Definiert die Klammerpaare, in die eine ausgewählte Zeichenfolge eingeschlossen werden kann." + "schema.surroundingPairs": "Definiert die Klammerpaare, in die eine ausgewählte Zeichenfolge eingeschlossen werden kann.", + "schema.wordPattern": "Die Worddefinition für die Sprache.", + "schema.wordPattern.pattern": "RegExp Muster für Wortübereinstimmungen.", + "schema.wordPattern.flags": "RegExp Kennzeichen für Wortübereinstimmungen", + "schema.wordPattern.flags.errorMessage": "Muss mit dem Muster `/^([gimuy]+)$/` übereinstimmen." } \ No newline at end of file diff --git a/i18n/deu/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/deu/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json index e82addc678451..e957466c8a6bd 100644 --- a/i18n/deu/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json +++ b/i18n/deu/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -21,6 +21,8 @@ "menus.scmTitle": "Das Titelmenü der Quellcodeverwaltung", "menus.resourceGroupContext": "Das Ressourcengruppen-Kontextmenü der Quellcodeverwaltung", "menus.resourceStateContext": "Das Ressourcenstatus-Kontextmenü der Quellcodeverwaltung", + "view.viewTitle": "Das beigetragene Editor-Titelmenü.", + "view.itemContext": "Das beigetragene Anzeigeelement-Kontextmenü.", "nonempty": "Es wurde ein nicht leerer Wert erwartet.", "opticon": "Die Eigenschaft \"icon\" kann ausgelassen werden oder muss eine Zeichenfolge oder ein Literal wie \"{dark, light}\" sein.", "requireStringOrObject": "Die Eigenschaft \"{0}\" ist obligatorisch und muss vom Typ \"Zeichenfolge\" oder \"Objekt\" sein.", diff --git a/i18n/deu/src/vs/platform/configuration/common/configurationRegistry.i18n.json b/i18n/deu/src/vs/platform/configuration/common/configurationRegistry.i18n.json index d4a19af0780f6..8c62df479baa7 100644 --- a/i18n/deu/src/vs/platform/configuration/common/configurationRegistry.i18n.json +++ b/i18n/deu/src/vs/platform/configuration/common/configurationRegistry.i18n.json @@ -7,13 +7,6 @@ "defaultConfigurations.title": "Standard-Konfiguration überschreibt", "overrideSettings.description": "Zu überschreibende Einstellungen für Sprache {0} konfigurieren.", "overrideSettings.defaultDescription": "Zu überschreibende Editor-Einstellungen für eine Sprache konfigurieren.", - "vscode.extension.contributes.configuration": "Trägt Konfigurationseigenschaften bei.", - "vscode.extension.contributes.configuration.title": "Eine Zusammenfassung der Einstellungen. Diese Bezeichnung wird in der Einstellungsdatei als trennender Kommentar verwendet.", - "vscode.extension.contributes.configuration.properties": "Die Beschreibung der Konfigurationseigenschaften.", "config.property.languageDefault": "\"{0}\" kann nicht registriert werden. Die Eigenschaft stimmt mit dem Eigenschaftsmuster '\\\\[.*\\\\]$' zum Beschreiben sprachspezifischer Editor-Einstellungen überein. Verwenden Sie den Beitrag \"configurationDefaults\".", - "config.property.duplicate": "\"{0}\" kann nicht registriert werden. Diese Eigenschaft ist bereits registriert.", - "invalid.properties": "\"configuration.properties\" muss ein Objekt sein.", - "invalid.type": "Wenn eine Festlegung erfolgt, muss \"configuration.type\" auf \"object\" festgelegt werden.", - "invalid.title": "configuration.title muss eine Zeichenfolge sein.", - "vscode.extension.contributes.defaultConfiguration": "Trägt zu Konfigurationeinstellungen des Standard-Editors für die jeweilige Sprache bei." + "config.property.duplicate": "\"{0}\" kann nicht registriert werden. Diese Eigenschaft ist bereits registriert." } \ No newline at end of file diff --git a/i18n/deu/src/vs/platform/environment/node/argv.i18n.json b/i18n/deu/src/vs/platform/environment/node/argv.i18n.json index 8104fc70ba050..058d98933af62 100644 --- a/i18n/deu/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/deu/src/vs/platform/environment/node/argv.i18n.json @@ -20,6 +20,7 @@ "showVersions": "Zeigt Versionen der installierten Erweiterungen an, wenn \"--list-extension\" verwendet wird.", "installExtension": "Installiert eine Extension.", "uninstallExtension": "Deinstalliert eine Extension.", + "experimentalApis": "Aktiviert vorgeschlagene API-Features für eine Erweiterung.", "disableExtensions": "Deaktiviert alle installierten Extensions.", "disableGPU": "Deaktiviert die GPU-Hardwarebeschleunigung.", "version": "Gibt die Version aus.", diff --git a/i18n/deu/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/deu/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index d6cbe93d2b633..2a33dae4abf0a 100644 --- a/i18n/deu/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/deu/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -14,6 +14,12 @@ "vscode.extension.contributes": "Alle Beiträge der VS Code-Extension, die durch dieses Paket dargestellt werden.", "vscode.extension.preview": "Legt die Erweiterung fest, die im Marketplace als Vorschau gekennzeichnet werden soll.", "vscode.extension.activationEvents": "Aktivierungsereignisse für die VS Code-Extension.", + "vscode.extension.activationEvents.onLanguage": "Ein Aktivierungsereignis wird beim Öffnen einer Datei ausgegeben, die in die angegebene Sprache aufgelöst wird.", + "vscode.extension.activationEvents.onCommand": "Ein Aktivierungsereignis wird beim Aufrufen des angegebenen Befehls ausgegeben.", + "vscode.extension.activationEvents.onDebug": "Ein Aktivierungsereignis wird beim Starten einer Debugsitzung des angegebenen Typs ausgegeben.", + "vscode.extension.activationEvents.workspaceContains": "Ein Aktivierungsereignis wird beim Öffnen eines Ordners ausgegeben, der mindestens eine Datei enthält, die mit dem angegebenen Globmuster übereinstimmt.", + "vscode.extension.activationEvents.onView": "Ein Aktivierungsereignis wird beim Erweitern der angegebenen Ansicht ausgegeben.", + "vscode.extension.activationEvents.star": "Ein Aktivierungsereignis wird beim Start von VS Code ausgegeben. Damit für die Endbenutzer eine bestmögliche Benutzerfreundlichkeit sichergestellt ist, verwenden Sie dieses Aktivierungsereignis in Ihrer Erweiterung nur dann, wenn in Ihrem Anwendungsfall keine andere Kombination an Aktivierungsereignissen funktioniert.", "vscode.extension.badges": "Array aus Badges, die im Marketplace in der Seitenleiste auf der Seite mit den Erweiterungen angezeigt werden.", "vscode.extension.badges.url": "Die Bild-URL für den Badge.", "vscode.extension.badges.href": "Der Link für den Badge.", diff --git a/i18n/deu/src/vs/platform/history/electron-main/historyMainService.i18n.json b/i18n/deu/src/vs/platform/history/electron-main/historyMainService.i18n.json new file mode 100644 index 0000000000000..88004b1c71eca --- /dev/null +++ b/i18n/deu/src/vs/platform/history/electron-main/historyMainService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "newWindow": "Neues Fenster", + "newWindowDesc": "Öffnet ein neues Fenster.", + "recentFolders": "Zuletzt verwendete Ordner", + "folderDesc": "{0} {1}" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/deu/src/vs/platform/markers/common/problemMatcher.i18n.json index 1955c94d40bf3..7e5f2ca478b56 100644 --- a/i18n/deu/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/deu/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -34,7 +34,7 @@ "ProblemMatcherParser.noValidIdentifier": "Fehler: Die Mustereigenschaft {0} ist kein gültiger Name für eine Mustervariable.", "ProblemMatcherParser.problemPattern.watchingMatcher": "Ein Problemmatcher muss ein Anfangsmuster und ein Endmuster für die Überwachung definieren.", "ProblemMatcherParser.invalidRegexp": "Fehler: Die Zeichenfolge {0} ist kein gültiger regulärer Ausdruck.\n", - "WatchingPatternSchema.regexp": "Der reguläre Ausdruck zum Erkennen des Anfangs oder Endes eines Überwachungstasks.", + "WatchingPatternSchema.regexp": "Der reguläre Ausdruck zum Erkennen des Anfangs oder Endes eines Hintergrundtasks.", "WatchingPatternSchema.file": "Der Übereinstimmungsgruppenindex des Dateinamens. Kann ausgelassen werden.", "PatternTypeSchema.name": "Der Name eines beigetragenen oder vordefinierten Musters", "PatternTypeSchema.description": "Ein Problemmuster oder der Name eines beigetragenen oder vordefinierten Problemmusters. Kann ausgelassen werden, wenn die Basis angegeben ist.", @@ -43,14 +43,20 @@ "ProblemMatcherSchema.severity": "Der Standardschweregrad für Erfassungsprobleme. Dieser wird verwendet, wenn das Muster keine Übereinstimmungsgruppe für den Schweregrad definiert.", "ProblemMatcherSchema.applyTo": "Steuert, ob ein für ein Textdokument gemeldetes Problem nur auf geöffnete, geschlossene oder alle Dokumente angewendet wird.", "ProblemMatcherSchema.fileLocation": "Definiert, wie Dateinamen interpretiert werden sollen, die in einem Problemmuster gemeldet werden.", + "ProblemMatcherSchema.background": "Muster zum Nachverfolgen des Beginns und Endes eines Abgleichers, der für eine Hintergrundaufgabe aktiv ist.", + "ProblemMatcherSchema.background.activeOnStart": "Wenn dieser Wert auf \"true\" festgelegt wird, befindet sich die Hintergrundüberwachung im aktiven Modus, wenn die Aufgabe gestartet wird. Dies entspricht dem Ausgeben einer Zeile, die mit dem \"beginPattern\" übereinstimmt.", + "ProblemMatcherSchema.background.beginsPattern": "Wenn eine Übereinstimmung mit der Ausgabe vorliegt, wird der Start einer Hintergrundaufgabe signalisiert.", + "ProblemMatcherSchema.background.endsPattern": "Wenn eine Übereinstimmung mit der Ausgabe vorliegt, wird das Ende einer Hintergrundaufgabe signalisiert.", + "ProblemMatcherSchema.watching.deprecated": "Die Überwachungseigenschaft ist veraltet. Verwenden Sie stattdessen den Hintergrund.", + "ProblemMatcherSchema.watching": "Muster zum Nachverfolgen des Beginns und Endes eines Problemabgleicher.", "ProblemMatcherSchema.watching.activeOnStart": "Wenn dieser Wert auf \"true\" festgelegt wird, befindet sich die Überwachung im aktiven Modus, wenn der Task gestartet wird. Dies entspricht dem Ausgeben einer Zeile, die mit dem \"beginPattern\" übereinstimmt.", "ProblemMatcherSchema.watching.beginsPattern": "Wenn eine Übereinstimmung mit der Ausgabe vorliegt, wird der Start eines Überwachungstasks signalisiert.", "ProblemMatcherSchema.watching.endsPattern": "Wenn eine Übereinstimmung mit der Ausgabe vorliegt, wird das Ende eines Überwachungstasks signalisiert.", - "ProblemMatcherSchema.watching": "Muster zum Nachverfolgen des Beginns und Endes eines Beobachtungsmusters.", "LegacyProblemMatcherSchema.watchedBegin.deprecated": "Diese Eigenschaft ist veraltet. Verwenden Sie stattdessen die Überwachungseigenschaft.", "LegacyProblemMatcherSchema.watchedBegin": "Ein regulärer Ausdruck, der signalisiert, dass die Ausführung eines überwachten Tasks (ausgelöst durch die Dateiüberwachung) beginnt.", "LegacyProblemMatcherSchema.watchedEnd.deprecated": "Diese Eigenschaft ist veraltet. Verwenden Sie stattdessen die Überwachungseigenschaft.", "LegacyProblemMatcherSchema.watchedEnd": "Ein regulärer Ausdruck, der signalisiert, dass die Ausführung eines überwachten Tasks beendet wird.", - "NamedProblemMatcherSchema.name": "Der Name des Problemabgleichers.", - "ProblemMatcherExtPoint": "Trägt Problemabgleicher bei" + "ProblemMatcherExtPoint": "Trägt Problemabgleicher bei", + "lessCompile": "LESS Probleme", + "go": "Go Probleme" } \ No newline at end of file diff --git a/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json index 37515c6a0476d..3e65a3de86f69 100644 --- a/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -4,29 +4,81 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.color": "Ungültiges Farbformat. Verwenden Sie #RRGGBB oder #RRGGBBAA.", + "invalid.color": "Ungültiges Farbformat. Verwenden Sie #RGB, #RGBA, #RRGGBB oder #RRGGBBAA.", "schema.colors": "In der Workbench verwendete Farben.", "foreground": "Allgemeine Vordergrundfarbe. Diese Farbe wird nur verwendet, wenn sie nicht durch eine Komponente überschrieben wird.", - "focusedElementOutline": "Allgemeine Kontur-/Rahmenfarbe für fokussierte Elemente. Diese Farbe wird nur verwendet, wenn sie nicht durch eine Komponente überschrieben wird.", - "highContrastBorder": "Rahmenfarbe zum Trennen von Komponenten, wenn ein Design mit hohem Kontrast aktiviert wurde.", - "highContrastOutline": "Konturfarbe für aktive Komponenten, wenn ein Design mit hohem Kontrast aktiviert wurde.", + "errorForeground": "Allgemeine Vordergrundfarbe. Diese Farbe wird nur verwendet, wenn sie nicht durch eine Komponente überschrieben wird.", + "descriptionForeground": "Vordergrundfarbe für Beschreibungstexte, die weitere Informationen anzeigen, z. B. für ein Label.", + "focusBorder": "Allgemeine Rahmenfarbe für fokussierte Elemente. Diese Farbe wird nur verwendet, wenn sie nicht durch eine Komponente überschrieben wird.", + "contrastBorder": "Ein zusätzlicher Rahmen um Elemente, mit dem diese von anderen getrennt werden, um einen größeren Kontrast zu erreichen.", + "activeContrastBorder": "Ein zusätzlicher Rahmen um aktive Elemente, mit dem diese von anderen getrennt werden, um einen größeren Kontrast zu erreichen.", + "textSeparatorForeground": "Farbe für Text-Trennzeichen.", + "textLinkForeground": "Vordergrundfarbe für Links im Text.", + "textLinkActiveForeground": "Vordergrundfarbe für aktive Links im Text.", + "textPreformatForeground": "Vordergrundfarbe für vorformatierte Textsegmente.", + "textBlockQuoteBackground": "Hintergrundfarbe für block quotes im Text.", + "textBlockQuoteBorder": "Rahmenfarbe für block quotes im Text.", + "textCodeBlockBackground": "Hintergrundfarbe für Code-Blöcke im Text.", + "widgetShadow": "Schattenfarbe von Widgets wie zum Beispiel Suchen/Ersetzen innerhalb des Editors.", "inputBoxBackground": "Hintergrund für Eingabefeld.", "inputBoxForeground": "Vordergrund für Eingabefeld.", "inputBoxBorder": "Rahmen für Eingabefeld.", "inputBoxActiveOptionBorder": "Rahmenfarbe für aktivierte Optionen in Eingabefeldern.", + "inputPlaceholderForeground": "Input box - Vordergrundfarbe für Platzhalter-Text.", + "inputValidationInfoBackground": "Hintergrundfarbe bei der Eingabevalidierung für den Schweregrad der Information.", + "inputValidationInfoBorder": "Rahmenfarbe bei der Eingabevalidierung für den Schweregrad der Information.", + "inputValidationWarningBackground": "Hintergrundfarbe bei der Eingabevalidierung für eine Warnung zur Information.", + "inputValidationWarningBorder": "Rahmenfarbe bei der Eingabevalidierung für den Schweregrad der Warnung.", + "inputValidationErrorBackground": "Hintergrundfarbe bei der Eingabevalidierung für den Schweregrad des Fehlers.", + "inputValidationErrorBorder": "Rahmenfarbe bei der Eingabevalidierung für den Schweregrad des Fehlers.", "dropdownBackground": "Hintergrund für Dropdown.", "dropdownForeground": "Vordergrund für Dropdown.", "dropdownBorder": "Rahmen für Dropdown.", + "listFocusBackground": "Hintergrundfarbe der Liste/Struktur für das fokussierte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.", + "listFocusForeground": "Vordergrundfarbe der Liste/Struktur für das fokussierte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.", + "listActiveSelectionBackground": "Hintergrundfarbe der Liste/Struktur für das ausgewählte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.", + "listActiveSelectionForeground": "Vordergrundfarbe der Liste/Struktur für das ausgewählte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.", + "listInactiveSelectionBackground": "Hintergrundfarbe der Liste/Struktur für das ausgewählte Element, wenn die Liste/Struktur inaktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.", + "listInactiveSelectionForeground": "Liste/Baumstruktur - Vordergrundfarbe für das ausgewählte Element, wenn die Liste/Baumstruktur inaktiv ist. Eine aktive Liste/Baumstruktur hat Tastaturfokus, eine inaktive hingegen nicht.", + "listHoverBackground": "Hintergrund der Liste/Struktur, wenn mit der Maus auf Elemente gezeigt wird.", + "listHoverForeground": "Vordergrund der Liste/Struktur, wenn mit der Maus auf Elemente gezeigt wird.", + "listDropBackground": "Drag & Drop-Hintergrund der Liste/Struktur, wenn Elemente mithilfe der Maus verschoben werden.", + "highlight": "Vordergrundfarbe der Liste/Struktur zur Trefferhervorhebung beim Suchen innerhalb der Liste/Struktur.", + "pickerGroupForeground": "Schnellauswahlfarbe für das Gruppieren von Bezeichnungen.", + "pickerGroupBorder": "Schnellauswahlfarbe für das Gruppieren von Rahmen.", + "buttonForeground": "Vordergrundfarbe der Schaltfläche.", + "buttonBackground": "Hintergrundfarbe der Schaltfläche.", + "buttonHoverBackground": "Hintergrundfarbe der Schaltfläche, wenn darauf gezeigt wird.", + "badgeBackground": "Badge - Hintergrundfarbe. Badges sind kurze Info-Texte, z. B. für Anzahl Suchergebnisse.", + "badgeForeground": "Badge - Vordergrundfarbe. Badges sind kurze Info-Texte, z. B. für Anzahl Suchergebnisse.", + "scrollbarShadow": "Schatten der Scrollleiste, um anzuzeigen, dass die Ansicht gescrollt wird.", + "scrollbarSliderBackground": "Hintergrundfarbe des Schiebereglers.", + "scrollbarSliderHoverBackground": "Hintergrundfarbe des Schiebereglers, wenn darauf gezeigt wird.", + "scrollbarSliderActiveBackground": "Hintergrundfarbe des Schiebereglers, wenn dieser aktiv ist.", + "progressBarBackground": "Hintergrundfarbe des Fortschrittbalkens, der für lang ausgeführte Vorgänge angezeigt werden kann.", "editorBackground": "Hintergrundfarbe des Editors.", "editorForeground": "Standardvordergrundfarbe des Editors.", - "editorSelection": "Farbe der Editor-Auswahl.", + "editorWidgetBackground": "Hintergrundfarbe von Editor-Widgets wie zum Beispiel Suchen/Ersetzen.", + "editorWidgetBorder": "Rahmenfarbe von Editorwigdets. Die Farbe wird nur verwendet, wenn für das Widget ein Rahmen verwendet wird und die Farbe nicht von einem Widget überschrieben wird.", + "editorSelectionForeground": "Farbe des gewählten Text für einen hohen Kontrast", "editorInactiveSelection": "Farbe der Auswahl in einem inaktiven Editor.", "editorSelectionHighlight": "Farbe für Bereiche, deren Inhalt der Auswahl entspricht.", "editorFindMatch": "Farbe des aktuellen Suchergebnisses.", "findMatchHighlight": "Farbe der anderen Suchtreffer.", "findRangeHighlight": "Farbe des Bereichs zur Einschränkung der Suche.", + "hoverHighlight": "Hervorhebung eines Worts, unter dem ein Mauszeiger angezeigt wird.", + "hoverBackground": "Background color of the editor hover.", + "hoverBorder": "Rahmenfarbe des Editor-Mauszeigers.", "activeLinkForeground": "Farbe der aktiven Links.", - "linkForeground": "Farbe der Links.", - "editorWidgetBackground": "Hintergrundfarbe von Editor-Widgets wie zum Beispiel Suchen/Ersetzen.", - "editorWidgetShadow": "Farbe des Schattens von Editor-Widgets wie zum Beispiel Suchen/Ersetzen." + "diffEditorInserted": "Hintergrundfarbe für eingefügten Text.", + "diffEditorRemoved": "Hintergrundfarbe für entfernten Text.", + "diffEditorInsertedOutline": "Konturfarbe für eingefügten Text.", + "diffEditorRemovedOutline": "Konturfarbe für entfernten Text.", + "mergeCurrentHeaderBackground": "Aktueller Kopfzeilenhintergrund in Inline-Mergingkonflikten.", + "mergeCurrentContentBackground": "Aktueller Inhaltshintergrund in Inline-Mergingkonflikten.", + "mergeIncomingHeaderBackground": "Eingehender Kopfzeilenhintergrund in Inline-Mergingkonflikten. ", + "mergeIncomingContentBackground": "Eingehender Inhaltshintergrund in Inline-Mergingkonflikten.", + "mergeBorder": "Rahmenfarbe für Kopfzeilen und die Aufteilung in Inline-Mergingkonflikten.", + "overviewRulerCurrentContentForeground": "Aktueller Übersichtslineal-Vordergrund für Inline-Mergingkonflikte.", + "overviewRulerIncomingContentForeground": "Eingehender Übersichtslineal-Vordergrund für Inline-Mergingkonflikte. " } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/deu/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json new file mode 100644 index 0000000000000..1d3dbda78ae67 --- /dev/null +++ b/i18n/deu/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "overwritingExtension": "Die Erweiterung \"{0}\" wird mit \"{1}\" überschrieben.", + "extensionUnderDevelopment": "Die Entwicklungserweiterung unter \"{0}\" wird geladen." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/deu/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json new file mode 100644 index 0000000000000..d76b48e30dbf4 --- /dev/null +++ b/i18n/deu/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "Schließen", + "cancel": "Abbrechen", + "ok": "OK" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/api/node/extHostExplorerView.i18n.json b/i18n/deu/src/vs/workbench/api/node/extHostExplorerView.i18n.json new file mode 100644 index 0000000000000..c6eed83d99907 --- /dev/null +++ b/i18n/deu/src/vs/workbench/api/node/extHostExplorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "Es ist kein TreeExplorerNodeProvider mit ID \"{0}\" registriert.", + "treeExplorer.failedToProvideRootNode": "TreeExplorerNodeProvider \"{0}\" hat keinen Stammknoten bereitgestellt." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/deu/src/vs/workbench/api/node/extHostTask.i18n.json new file mode 100644 index 0000000000000..4b90a12aaf247 --- /dev/null +++ b/i18n/deu/src/vs/workbench/api/node/extHostTask.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "task.label": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/api/node/extHostTreeView.i18n.json b/i18n/deu/src/vs/workbench/api/node/extHostTreeView.i18n.json new file mode 100644 index 0000000000000..c6eed83d99907 --- /dev/null +++ b/i18n/deu/src/vs/workbench/api/node/extHostTreeView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "Es ist kein TreeExplorerNodeProvider mit ID \"{0}\" registriert.", + "treeExplorer.failedToProvideRootNode": "TreeExplorerNodeProvider \"{0}\" hat keinen Stammknoten bereitgestellt." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/deu/src/vs/workbench/api/node/extHostTreeViews.i18n.json new file mode 100644 index 0000000000000..76a366889135e --- /dev/null +++ b/i18n/deu/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeView.notRegistered": "Kein Treeviw mit der id '{0}' registriert.", + "treeItem.notFound": "Kein Tree-Eintrag mit der id '{0}' gefunden.", + "treeView.duplicateElement": "Element {0} ist bereit registriert." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/browser/actions/configureLocale.i18n.json b/i18n/deu/src/vs/workbench/browser/actions/configureLocale.i18n.json index 32abf05f8cb70..f17cc2cd8aa4b 100644 --- a/i18n/deu/src/vs/workbench/browser/actions/configureLocale.i18n.json +++ b/i18n/deu/src/vs/workbench/browser/actions/configureLocale.i18n.json @@ -7,7 +7,7 @@ "configureLocale": "Sprache konfigurieren", "displayLanguage": "Definiert die Anzeigesprache von VSCode.", "doc": "Unter {0} finden Sie eine Liste der unterstützten Sprachen.", - "restart": "Das Ändern des Werts erfordert einen Neustart von VSCode.", + "restart": "Das Ändern dieses Wertes erfordert einen Neustart von VSCode.", "fail.createSettings": "{0} ({1}) kann nicht erstellt werden.", "JsonSchema.locale": "Die zu verwendende Sprache der Benutzeroberfläche." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/browser/parts/activitybar/activitybarActions.i18n.json b/i18n/deu/src/vs/workbench/browser/parts/activitybar/activitybarActions.i18n.json index 56158022353f3..745ba80b2745e 100644 --- a/i18n/deu/src/vs/workbench/browser/parts/activitybar/activitybarActions.i18n.json +++ b/i18n/deu/src/vs/workbench/browser/parts/activitybar/activitybarActions.i18n.json @@ -9,6 +9,6 @@ "titleKeybinding": "{0} ({1})", "additionalViews": "Zusätzliche Ansichten", "numberBadge": "{0} ({1})", - "manageExtension": "Extension verwalten", + "manageExtension": "Erweiterung verwalten", "toggle": "Ansichtsfixierung umschalten" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json b/i18n/deu/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json index ab66bc16e2e56..419bdb09927d7 100644 --- a/i18n/deu/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json +++ b/i18n/deu/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "hideActivitBar": "Aktivitätsleiste ausblenden", - "activityBarAriaLabel": "Umschaltung der aktiven Ansicht" + "activityBarAriaLabel": "Umschaltung der aktiven Ansicht", + "globalActions": "Globale Aktionen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/deu/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index 818cf12465ed1..fa4ed40683448 100644 --- a/i18n/deu/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/deu/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -44,6 +44,8 @@ "openPreviousRecentlyUsedEditorInGroup": "Vorherigen zuletzt verwendeten Editor in der Gruppe öffnen", "openNextRecentlyUsedEditorInGroup": "Nächsten zuletzt verwendeten Editor in der Gruppe öffnen", "navigateEditorHistoryByInput": "Vorherigen Editor aus Verlauf öffnen", + "openNextRecentlyUsedEditor": "Nächsten zuletzt verwendeten Editor öffnen", + "openPreviousRecentlyUsedEditor": "Vorherigen zuletzt verwendeten Editor öffnen", "clearEditorHistory": "Editor-Verlauf löschen", "focusLastEditorInStack": "Letzten Editor in der Gruppe öffnen", "moveEditorLeft": "Editor nach links verschieben", diff --git a/i18n/deu/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/deu/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index 27e4ef85e7a04..3bfcbf3c5241d 100644 --- a/i18n/deu/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/deu/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -10,7 +10,7 @@ "multiSelection": "{0} Auswahlen", "endOfLineLineFeed": "LF", "endOfLineCarriageReturnLineFeed": "CRLF", - "tabFocusModeEnabled": "TAB-TASTE verschiebt Fokus", + "screenReaderDetectedExtra": "Wenn Sie keine Sprachausgabe verwenden, ändern Sie die Einstellung \"editor.accessibilitySupport\" in \"Aus\".", "disableTabMode": "Barrierefreiheitsmodus deaktivieren", "gotoLine": "Gehe zu Zeile", "indentation": "Einzug", diff --git a/i18n/deu/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json b/i18n/deu/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json new file mode 100644 index 0000000000000..51845025d4128 --- /dev/null +++ b/i18n/deu/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpen": "Gehe zu Datei...", + "quickNavigateNext": "Zum nächsten Element in Quick Open navigieren", + "quickNavigatePrevious": "Zum vorherigen Element in Quick Open navigieren", + "quickSelectNext": "Nächstes Element in Quick Open auswählen", + "quickSelectPrevious": "Vorheriges Element in Quick Open auswählen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/browser/parts/statusbar/statusbarPart.i18n.json b/i18n/deu/src/vs/workbench/browser/parts/statusbar/statusbarPart.i18n.json index 382a562e4f393..f86613230bf18 100644 --- a/i18n/deu/src/vs/workbench/browser/parts/statusbar/statusbarPart.i18n.json +++ b/i18n/deu/src/vs/workbench/browser/parts/statusbar/statusbarPart.i18n.json @@ -5,5 +5,5 @@ // Do not edit this file. It is machine generated. { "canNotRun": "Der Befehl \"{0}\" ist zurzeit nicht aktiviert und kann nicht ausgeführt werden.", - "manageExtension": "Extension verwalten" + "manageExtension": "Erweiterung verwalten" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/browser/parts/titlebar/titlebarPart.i18n.json b/i18n/deu/src/vs/workbench/browser/parts/titlebar/titlebarPart.i18n.json index 37b47a30cb82d..5618ae8213a77 100644 --- a/i18n/deu/src/vs/workbench/browser/parts/titlebar/titlebarPart.i18n.json +++ b/i18n/deu/src/vs/workbench/browser/parts/titlebar/titlebarPart.i18n.json @@ -5,5 +5,5 @@ // Do not edit this file. It is machine generated. { "patchedWindowTitle": "[Nicht unterstützt]", - "devExtensionWindowTitlePrefix": "[Extensionentwicklungshost]" + "devExtensionWindowTitlePrefix": "[Erweiterungsentwicklungshost]" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/browser/quickopen.i18n.json b/i18n/deu/src/vs/workbench/browser/quickopen.i18n.json index 4283ec57cb32a..89a7706d48243 100644 --- a/i18n/deu/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/deu/src/vs/workbench/browser/quickopen.i18n.json @@ -6,6 +6,5 @@ { "noResultsMatching": "Keine übereinstimmenden Ergebnisse.", "noResultsFound2": "Es wurden keine Ergebnisse gefunden.", - "entryAriaLabel": "{0}, Befehl", - "noCommands": "Keine übereinstimmenden Befehle." + "entryAriaLabel": "{0}, Befehl" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/browser/viewlet.i18n.json b/i18n/deu/src/vs/workbench/browser/viewlet.i18n.json index 14a9eb167211b..97b755d5fd67f 100644 --- a/i18n/deu/src/vs/workbench/browser/viewlet.i18n.json +++ b/i18n/deu/src/vs/workbench/browser/viewlet.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "collapse": "Alle zuklappen", - "viewToolbarAriaLabel": "{0}-Aktionen" + "collapse": "Alle zuklappen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/common/theme.i18n.json b/i18n/deu/src/vs/workbench/common/theme.i18n.json index c25cfc548044b..01779434428e5 100644 --- a/i18n/deu/src/vs/workbench/common/theme.i18n.json +++ b/i18n/deu/src/vs/workbench/common/theme.i18n.json @@ -4,39 +4,49 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "tabsContainerBackground": "Hintergrundfarbe der aktiven Registerkarte. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", - "activeTabBackground": "Hintergrundfarbe der aktiven Registerkarte. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", - "inactiveTabBackground": "Hintergrundfarbe der inaktiven Registerkarte. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", - "activeTabActiveGroupForeground": "Vordergrundfarbe der aktiven Registerkarte in einer aktiven Gruppe. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", - "activeTabInactiveGroupForeground": "Vordergrundfarbe der aktiven Registerkarte in einer inaktiven Gruppe. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", - "inactiveTabActiveGroupForeground": "Vordergrundfarbe der inaktiven Registerkarte in einer aktiven Gruppe. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", - "inactiveTabInactiveGroupForeground": "Vordergrundfarbe der inaktiven Registerkarte in einer inaktiven Gruppe. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", + "tabActiveBackground": "Hintergrundfarbe der aktiven Registerkarte. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", + "tabInactiveBackground": "Hintergrundfarbe der inaktiven Registerkarte. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", "tabBorder": "Rahmen zum Trennen von Registerkarten. Registerkarten sind die Container für Editoren im Editor-Bereich. In einer Editor-Gruppe können mehrere Registerkarten geöffnet werden. Mehrere Editor-Gruppen sind möglich.", - "editorHeaderBackground": "Hintergrundfarbe der Titelüberschrift des Editors, wenn keine Registerkarten aktiviert sind.", + "tabActiveForeground": "Vordergrundfarbe der aktiven Registerkarte in einer aktiven Gruppe. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", + "tabInactiveForeground": "Vordergrundfarbe der inaktiven Registerkarte in einer aktiven Gruppe. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", + "tabUnfocusedActiveForeground": "Vordergrundfarbe der aktiven Registerkarte in einer inaktiven Gruppe. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", + "tabUnfocusedInactiveForeground": "Vordergrundfarbe der inaktiven Registerkarte in einer inaktiven Gruppe. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", + "editorGroupBackground": "Hintergrundfarbe einer Editor-Gruppe. Editor-Gruppen sind die Container der Editoren. Die Hintergrundfarbe wird beim Ziehen von Editoren angezeigt.", + "tabsContainerBackground": "Hintergrundfarbe der Titelüberschrift der Editor-Gruppe, wenn die Registerkarten deaktiviert sind. Editor-Gruppen sind die Container der Editoren.", + "tabsContainerBorder": "Rahmenfarbe der Titelüberschrift der Editor-Gruppe, wenn die Registerkarten deaktiviert sind. Editor-Gruppen sind die Container der Editoren.", + "editorGroupHeaderBackground": "Hintergrundfarbe der Titelüberschrift des Editors, wenn die Registerkarten deaktiviert sind. Editor-Gruppen sind die Container der Editoren.", "editorGroupBorder": "Farbe zum Trennen mehrerer Editor-Gruppen. Editor-Gruppen sind die Container der Editoren.", - "editorGroupBackground": "Hintergrundfarbe einer Editor-Gruppe. Editor-Gruppen sind die Container der Editoren.", - "editorDragAndDropBackground": "Hintergrundfarbe beim Ziehen von Editoren.", - "editorSideBySideBorder": "Rahmenfarbe zum Trennen der Details der Masterseite für Editoren mit der Ansicht \"Nebeneinander\".", + "editorDragAndDropBackground": " Hintergrundfarbe beim Ziehen von Editoren. Die Farbe muss transparent sein, damit der Editor-Inhalt noch sichtbar sind.", "panelBackground": "Hintergrundfarbe des Panels. Panels werden unter dem Editorbereich angezeigt und enthalten Ansichten wie die Ausgabe und das integrierte Terminal.", - "panelTopBorder": "Farbe des oberen Panelrahmens, der das Panel vom Editor abtrennt. Panels werden unter dem Editorbereich angezeigt und enthalten Ansichten wie die Ausgabe und das integrierten Terminal.", + "panelBorder": "Farbe des oberen Panelrahmens, der das Panel vom Editor abtrennt. Panels werden unter dem Editorbereich angezeigt und enthalten Ansichten wie die Ausgabe und das integrierten Terminal.", "panelActiveTitleForeground": "Titelfarbe für den aktiven Bereich. Bereiche werden unter dem Editorbereich angezeigt und enthalten Ansichten wie Ausgabe und integriertes Terminal.", "panelInactiveTitleForeground": "Titelfarbe für den inaktiven Bereich. Bereiche werden unter dem Editorbereich angezeigt und enthalten Ansichten wie Ausgabe und integriertes Terminal.", "panelActiveTitleBorder": "Rahmenfarbe für den Titel des aktiven Bereichs. Bereiche werden unter dem Editorbereich angezeigt und enthalten Ansichten wie Ausgabe und integriertes Terminal.", "statusBarForeground": "Vordergrundfarbe der Statusleiste. Die Statusleiste wird unten im Fenster angezeigt.", "statusBarBackground": "Standardhintergrundfarbe der Statusleiste. Die Statusleiste wird unten im Fenster angezeigt.", + "statusBarBorder": "Rahmenfarbe der Statusleiste für die Abtrennung von der Seitenleiste und dem Editor. Die Statusleiste wird unten im Fenster angezeigt.", "statusBarNoFolderBackground": "Hintergrundfarbe der Statusleiste, wenn kein Ordner geöffnet ist. Die Statusleiste wird unten im Fenster angezeigt.", + "statusBarNoFolderForeground": "Vordergrundfarbe der Statusleiste, wenn kein Ordner geöffnet ist. Die Statusleiste wird unten im Fenster angezeigt.", "statusBarItemActiveBackground": "Hintergrundfarbe für Statusleistenelemente beim Klicken. Die Statusleiste wird am unteren Rand des Fensters angezeigt.", "statusBarItemHoverBackground": "Hintergrundfarbe der Statusleistenelemente beim Daraufzeigen. Die Statusleiste wird am unteren Seitenrand angezeigt.", - "statusBarInfoItemBackground": "Hintergrundfarbe der Informationselemente der Statusleiste. Die Statusleiste wird am unteren Seitenrand angezeigt.", - "statusBarInfoItemHoverBackground": "Hintergrundfarbe der Informationselemente der Statusleiste beim Daraufzeigen. Die Statusleiste wird am unteren Seitenrand angezeigt.", + "statusBarProminentItemBackground": "Hintergrundfarbe für markante Elemente der Statusleiste. Markante Elemente sind im Vergleich zu anderen Statusleisteneinträgen hervorgehoben, um auf ihre Bedeutung hinzuweisen. Die Statusleiste wird unten im Fenster angezeigt.", + "statusBarProminentItemHoverBackground": "Hintergrundfarbe für markante Elemente der Statusleiste, wenn auf diese gezeigt wird. Markante Elemente sind im Vergleich zu anderen Statusleisteneinträgen hervorgehoben, um auf ihre Bedeutung hinzuweisen. Die Statusleiste wird unten im Fenster angezeigt.", "activityBarBackground": "Hintergrundfarbe der Aktivitätsleiste. Die Aktivitätsleiste wird ganz links oder rechts angezeigt und ermöglicht das Wechseln zwischen verschiedenen Ansichten der Seitenleiste.", - "activityBarDragAndDropBackground": "Drag Drop-Feedbackfarbe für Elemente der Aktivitätsleiste. Die Aktivitätsleiste wird ganz links oder ganz rechts angezeigt und ermöglicht den Wechsel zwischen Ansichten der Seitenleiste.", - "activityBadgeBackground": "Hintergrundfarbe für Aktivitätsinfobadge. Die Aktivitätsleiste wird ganz links oder ganz rechts angezeigt und ermöglicht den Wechsel zwischen Ansichten der Seitenleiste.", - "activityBadgeForeground": "Vordergrundfarbe für Aktivitätsinfobadge. Die Aktivitätsleiste wird ganz links oder ganz rechts angezeigt und ermöglicht den Wechsel zwischen Ansichten der Seitenleiste.", + "activityBarForeground": "Vordergrundfarbe der Aktivitätsleiste (z. B. für Symbole). Die Aktivitätsleiste wird ganz links oder rechts angezeigt und ermöglicht das Wechseln zwischen verschiedenen Ansichten der Seitenleiste.", + "activityBarBorder": "Rahmenfarbe der Aktivitätsleiste für die Abtrennung von der Seitenleiste. Die Aktivitätsleiste wird ganz links oder rechts angezeigt und ermöglicht das Wechseln zwischen verschiedenen Ansichten der Seitenleiste.", + "activityBarDragAndDropBackground": "Drag & Drop-Feedbackfarbe für Elemente der Aktivitätsleiste. Die Farbe muss transparent sein, damit die Einträge der Aktivitätsleiste noch sichtbar sind. Die Aktivitätsleiste wird ganz links oder ganz rechts angezeigt und ermöglicht den Wechsel zwischen Ansichten der Seitenleiste.", + "activityBarBadgeBackground": "Hintergrundfarbe für Aktivitätsinfobadge. Die Aktivitätsleiste wird ganz links oder ganz rechts angezeigt und ermöglicht den Wechsel zwischen Ansichten der Seitenleiste.", + "activityBarBadgeForeground": "Vordergrundfarbe für Aktivitätsinfobadge. Die Aktivitätsleiste wird ganz links oder ganz rechts angezeigt und ermöglicht den Wechsel zwischen Ansichten der Seitenleiste.", "sideBarBackground": "Hintergrundfarbe der Seitenleiste. Die Seitenleiste ist der Container für Ansichten wie den Explorer und die Suche.", + "sideBarForeground": "Vordergrundfarbe der Seitenleiste. Die Seitenleiste ist der Container für Ansichten wie den Explorer und die Suche.", + "sideBarBorder": "Rahmenfarbe der Seitenleiste zum Abtrennen an der Seite zum Editor. Die Seitenleiste ist der Container für Ansichten wie den Explorer und die Suche.", "sideBarTitleForeground": "Vordergrundfarbe der Seitenleiste. Die Seitenleiste ist der Container für Ansichten wie den Explorer und die Suche.", + "sideBarSectionHeaderBackground": "Hintergrundfarbe der Abschnittsüberschrift der Seitenleiste. Die Seitenleiste ist der Container für Ansichten wie den Explorer und die Suche.", + "sideBarSectionHeaderForeground": "Vordergrundfarbe der Abschnittsüberschrift der Seitenleiste. Die Seitenleiste ist der Container für Ansichten wie den Explorer und die Suche.", "titleBarActiveForeground": "Vordergrund der Titelleiste, wenn das Fenster aktiv ist. Diese Farbe wird derzeit nur von MacOS unterstützt.", "titleBarInactiveForeground": "Vordergrund der Titelleiste, wenn das Fenster inaktiv ist. Diese Farbe wird derzeit nur von MacOS unterstützt.", "titleBarActiveBackground": "Hintergrund der Titelleiste, wenn das Fenster aktiv ist. Diese Farbe wird derzeit nur von MacOS unterstützt.", - "titleBarInactiveBackground": "Hintergrund der Titelleiste, wenn das Fenster inaktiv ist. Diese Farbe wird derzeit nur von MacOS unterstützt." + "titleBarInactiveBackground": "Hintergrund der Titelleiste, wenn das Fenster inaktiv ist. Diese Farbe wird derzeit nur von MacOS unterstützt.", + "notificationsForeground": "Vordergrundfarbe für Benachrichtigungen. Benachrichtigungen werden oben im Fenster eingeblendet.", + "notificationsBackground": "Hintergrundfarbe für Benachrichtigungen. Benachrichtigungen werden oben im Fenster eingeblendet." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/deu/src/vs/workbench/electron-browser/actions.i18n.json index 92dabcb049614..70ead81b19e0c 100644 --- a/i18n/deu/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/deu/src/vs/workbench/electron-browser/actions.i18n.json @@ -6,9 +6,6 @@ { "closeActiveEditor": "Editor schließen", "closeWindow": "Fenster schließen", - "switchWindow": "Fenster wechseln", - "switchWindowPlaceHolder": "Fenster auswählen", - "current": "Aktuelles Fenster", "closeFolder": "Ordner schließen", "noFolderOpened": "Zurzeit ist kein Ordner in dieser Instanz geöffnet, der geschlossen werden kann.", "newWindow": "Neues Fenster", @@ -20,7 +17,7 @@ "zoomReset": "Zoom zurücksetzen", "appPerf": "Startleistung", "reloadWindow": "Fenster erneut laden", - "openRecent": "Zuletzt verwendete öffnen", + "current": "Aktuelles Fenster", "folders": "Ordner", "files": "Dateien", "openRecentPlaceHolderMac": "Wählen Sie einen Pfad aus (halten Sie die BEFEHLSTASTE gedrückt, um ein neues Fenster zu öffnen).", @@ -32,10 +29,6 @@ "openDocumentationUrl": "Dokumentation", "openIntroductoryVideosUrl": "Einführungsvideos", "toggleSharedProcess": "Freigegebenen Prozess umschalten", - "navigateLeft": "Zum Ansichtsteil links verschieben", - "navigateRight": "Zum Ansichtsteil rechts verschieben", - "navigateUp": "Zum Ansichtsteil darüber verschieben", - "navigateDown": "Zum Ansichtsteil darunter verschieben", "increaseViewSize": "Aktuelle Ansicht vergrößern", "decreaseViewSize": "Aktuelle Ansicht verkleinern" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/electron-browser/extensionHost.i18n.json b/i18n/deu/src/vs/workbench/electron-browser/extensionHost.i18n.json index 914f3831b14d1..9a7af044bcf30 100644 --- a/i18n/deu/src/vs/workbench/electron-browser/extensionHost.i18n.json +++ b/i18n/deu/src/vs/workbench/electron-browser/extensionHost.i18n.json @@ -7,5 +7,6 @@ "extensionHostProcess.startupFailDebug": "Der Erweiterungshost wurde nicht innerhalb von 10 Sekunden gestartet. Möglicherweise wurde er in der ersten Zeile beendet und benötigt einen Debugger, um die Ausführung fortzusetzen.", "extensionHostProcess.startupFail": "Der Erweiterungshost wurde nicht innerhalb von 10 Sekunden gestartet. Dies stellt ggf. ein Problem dar.", "extensionHostProcess.error": "Fehler vom Erweiterungshost: {0}", + "devTools": "Entwicklertools", "extensionHostProcess.crash": "Der Erweiterungshost wurde unerwartet beendet. Bitte laden Sie das Fenster erneut, um ihn wiederherzustellen." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json index 7510208eaa27c..d87fb8c8c76cd 100644 --- a/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,6 +7,7 @@ "view": "Anzeigen", "help": "Hilfe", "file": "Datei", + "developer": "Entwickler", "showEditorTabs": "Steuert, ob geöffnete Editoren auf Registerkarten angezeigt werden sollen.", "editorTabCloseButton": "Steuert die Position der Schließen-Schaltflächen der Editor-Registerkarten oder deaktiviert sie bei der Einstellung \"off\".", "showIcons": "Steuert, ob geöffnete Editoren mit einem Symbol angezeigt werden sollen. Hierzu muss auch ein Symboldesign aktiviert werden.", @@ -20,6 +21,7 @@ "statusBarVisibility": "Steuert die Sichtbarkeit der Statusleiste im unteren Bereich der Workbench.", "activityBarVisibility": "Steuert die Sichtbarkeit der Aktivitätsleiste in der Workbench.", "closeOnFileDelete": "Steuert, ob Editoren, die eine Datei anzeigen, automatisch geschlossen werden sollen, wenn die Datei von einem anderen Prozess umbenannt oder gelöscht wird. Wenn Sie diese Option deaktivieren, bleibt der Editor bei einem solchen Ereignis als geändert offen. Bei Löschvorgängen innerhalb der Anwendung wird der Editor immer geschlossen, und geänderte Dateien werden nie geschlossen, damit Ihre Daten nicht verloren gehen.", + "swipeToNavigate": "Hiermit navigieren Sie per waagrechtem Wischen mit drei Fingen zwischen geöffneten Dateien.", "workbenchConfigurationTitle": "Workbench", "window.openFilesInNewWindow.on": "Dateien werden in einem neuen Fenster geöffnet.", "window.openFilesInNewWindow.off": "Dateien werden im Fenster mit dem geöffneten Dateiordner oder im letzten aktiven Fenster geöffnet.", @@ -29,29 +31,30 @@ "window.openFoldersInNewWindow.off": "Ordner ersetzen das letzte aktive Fenster.", "window.openFoldersInNewWindow.default": "Ordner werden in einem neuen Fenster geöffnet, sofern kein Ordner innerhalb der Anwendung ausgewählt wird (z. B. über das Dateimenü).", "openFoldersInNewWindow": "Steuert, ob Ordner in einem neuen Fenster geöffnet werden oder das letzte aktive Fenster ersetzen.\n- default: Die Ordner werden in einem neuen Fenster geöffnet, sofern kein Ordner innerhalb der Anwendung ausgewählt wird (z. B. über das Dateimenü).\n- on: Die Ordner werden in einem neuen Fenster geöffnet.\n- off: Die Ordner ersetzen das letzte aktive Fenster.\nIn einigen Fällen wird diese Einstellung unter Umständen ignoriert (z. B. bei der Befehlszeilenoption \"-new-window\" oder \"-reuse-window\").", - "window.reopenFolders.none": "Ordner nie erneut öffnen.", - "window.reopenFolders.one": "Den letzten aktiven Ordner erneut öffnen.", - "window.reopenFolders.all": "Alle Ordner der letzten Sitzung erneut öffnen.", - "reopenFolders": "Steuert, wie Ordner nach einem Neustart erneut geöffnet werden. Wählen Sie \"none\" aus, um Ordner nie erneut zu öffnen, \"one\", um den zuletzt bearbeiteten Ordner erneut zu öffnen, oder \"all\", um alle Ordner der letzten Sitzung erneut zu öffnen.", + "window.reopenFolders.all": "Alle Fenster erneut öffnen.", "restoreFullscreen": "Steuert, ob ein Fenster im Vollbildmodus wiederhergestellt wird, wenn es im Vollbildmodus beendet wurde.", "zoomLevel": "Passen Sie den Zoomfaktor des Fensters an. Die ursprüngliche Größe ist 0. Jede Inkrementierung nach oben (z. B. 1) oder unten (z. B. -1) stellt eine Vergrößerung bzw. Verkleinerung um 20 % dar. Sie können auch Dezimalwerte eingeben, um den Zoomfaktor genauer anzupassen.", - "title": "Steuert den Fenstertitel abhängig vom aktiven Editor. Variablen werden abhängig vom Kontext ersetzt:\n${activeEditorShort}: z. B. myFile.txt\n${activeEditorMedium}: z. B. myFolder/myFile.txt\n${activeEditorLong}: z. B. /Users/Development/myProject/myFolder/myFile.txt\n${rootName}: z. B. myProject\n${rootPath}: z. B. /Users/Development/myProject\n${appName}: z. B. VS Code\n${dirty}: ein geänderter Indikator, wenn der aktive Editor geändert wurde\n${separator}: ein bedingtes Trennzeichen (\" - \"), das nur in der Umgebung von Variablen mit Werten angezeigt wird", "window.newWindowDimensions.default": "Öffnet neue Fenster in der Mitte des Bildschirms.", "window.newWindowDimensions.inherit": "Öffnet neue Fenster mit den gleichen Abmessungen wie das letzte aktive Fenster.", "window.newWindowDimensions.maximized": "Öffnet neue Fenster maximiert.", "window.newWindowDimensions.fullscreen": "Öffnet neue Fenster im Vollbildmodus.", - "newWindowDimensions": "Steuert die Abmessungen beim Öffnen eines neuen Fensters. Standardmäßig wird in der Mitte des Bildschirms ein neues Fenster mit kleinen Abmessungen geöffnet. Bei der Einstellung \"inherit\" erhält das Fenster die gleichen Abmessungen wie das letzte aktive Fenster. Bei der Einstellung \"maximized\" wird das Fenster maximiert geöffnet, und bei \"fullscreen\" wird es im Vollbildmodus geöffnet.", + "newWindowDimensions": "Steuert die Abmessungen beim Öffnen eines neuen Fensters. Standardmäßig wird in der Mitte des Bildschirms ein neues Fenster mit kleinen Abmessungen geöffnet. Bei der Einstellung \"inherit\" erhält das Fenster die gleichen Abmessungen wie das letzte aktive Fenster. Bei der Einstellung \"maximized\" wird das Fenster maximiert geöffnet, und bei \"fullscreen\" wird es im Vollbildmodus geöffnet. Die Einstellung hat keine Auswirkungen auf das zuerst geöffnete Fenster. Größe und Position des ersten Fensters werden immer so wiederhergestellt, wie sie vor dem Schließen waren.", "window.menuBarVisibility.default": "Das Menü ist nur im Vollbildmodus ausgeblendet.", "window.menuBarVisibility.visible": "Das Menu wird immer angezeigt, auch im Vollbildmodus.", "window.menuBarVisibility.toggle": "Das Menu ist ausgeblendet, kann aber mit der Alt-Taste angezeigt werden.", "window.menuBarVisibility.hidden": "Das Menü ist immer ausgeblendet.", "menuBarVisibility": "Steuert die Sichtbarkeit der Menüleiste. Die Einstellung \"Umschalten\" bedeutet, dass die Menüleiste durch einfaches Betätigen der ALT-Taste angezeigt und ausgeblendet wird. Die Menüleite wird standardmäßig angezeigt, sofern sich das Fenster nicht im Vollbildmodus befindet.", + "enableMenuBarMnemonics": "Ist dies aktiviert, können die Hauptmenüs mithilfe von Tastenkombinationen mit der Alt-Taste geöffnet werden. Wenn mnemonische Zeichen deaktiviert werden, können diese Tastenkombinationen mit der Alt-Taste stattdessen an Editor-Befehle gebunden werden.", "autoDetectHighContrast": "Ist diese Option aktiviert, erfolgt automatisch ein Wechsel zu einem Design mit hohem Kontrast, wenn Windows ein Design mit hohem Kontrast verwendet, und zu einem dunklen Design, wenn Sie für Windows kein Design mit hohem Kontrast mehr verwenden.", "titleBarStyle": "Passt das Aussehen der Titelleiste des Fensters an. Zum Anwenden der Änderungen ist ein vollständiger Neustart erforderlich.", + "window.nativeTabs": "Aktiviert MacOS Sierra-Fensterregisterkarten. Beachten Sie, dass zum Übernehmen von Änderungen ein vollständiger Neustart erforderlich ist und durch ggf. konfigurierte native Registerkarten ein benutzerdefinierter Titelleistenstil deaktiviert wird.", "windowConfigurationTitle": "Fenster", "zenModeConfigurationTitle": "Zen-Modus", "zenMode.fullScreen": "Steuert, ob die Workbench durch das Aktivieren des Zen-Modus in den Vollbildmodus wechselt.", "zenMode.hideTabs": "Steuert, ob die Workbench-Registerkarten durch Aktivieren des Zen-Modus ebenfalls ausgeblendet werden.", "zenMode.hideStatusBar": "Steuert, ob die Statusleiste im unteren Bereich der Workbench durch Aktivieren des Zen-Modus ebenfalls ausgeblendet wird.", - "zenMode.restore": "Steuert, ob ein Fenster im Zen-Modus wiederhergestellt werden soll, wenn es im Zen-Modus beendet wurde." + "zenMode.hideActivityBar": "Steuert, ob die Aktivitätsleiste im linken Bereich der Workbench durch Aktivieren des Zen-Modus ebenfalls ausgeblendet wird.", + "zenMode.restore": "Steuert, ob ein Fenster im Zen-Modus wiederhergestellt werden soll, wenn es im Zen-Modus beendet wurde.", + "workspaceConfigurationTitle": "Arbeitsbereich", + "files.exclude.boolean": "Das Globmuster, mit dem Dateipfade verglichen werden sollen. Legen Sie diesen Wert auf \"true\" oder \"false\" fest, um das Muster zu aktivieren bzw. zu deaktivieren." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/electron-browser/shell.i18n.json b/i18n/deu/src/vs/workbench/electron-browser/shell.i18n.json index dd4ad3fcbb985..b225b8a0012bf 100644 --- a/i18n/deu/src/vs/workbench/electron-browser/shell.i18n.json +++ b/i18n/deu/src/vs/workbench/electron-browser/shell.i18n.json @@ -4,9 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "runningAsRoot": "Es wird empfohlen, Code nicht als \"root\" auszuführen.", - "prof.message": "Profile wurden erfolgreich erstellt.", - "prof.detail": "Erstellen Sie ein Problem, und fügen Sie die folgenden Dateien manuell an:\n{0}", - "prof.restartAndFileIssue": "Problem erstellen und neu starten", - "prof.restart": "Neu starten" + "runningAsRoot": "Es wird empfohlen, Code nicht als \"root\" auszuführen." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/electron-browser/window.i18n.json b/i18n/deu/src/vs/workbench/electron-browser/window.i18n.json index 1c580a18212a7..41496cf43a09f 100644 --- a/i18n/deu/src/vs/workbench/electron-browser/window.i18n.json +++ b/i18n/deu/src/vs/workbench/electron-browser/window.i18n.json @@ -11,7 +11,5 @@ "paste": "Einfügen", "selectAll": "Alles auswählen", "confirmOpen": "Möchten Sie \"{0}\" Ordner wirklich öffnen?", - "confirmOpenButton": "&&Öffnen", - "developer": "Entwickler", - "file": "Datei" + "confirmOpenButton": "&&Öffnen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/deu/src/vs/workbench/electron-browser/workbench.i18n.json new file mode 100644 index 0000000000000..db7c9434c92a2 --- /dev/null +++ b/i18n/deu/src/vs/workbench/electron-browser/workbench.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "developer": "Entwickler", + "file": "Datei" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/node/extensionHostMain.i18n.json b/i18n/deu/src/vs/workbench/node/extensionHostMain.i18n.json index e72f0170a4a09..3727d238663dd 100644 --- a/i18n/deu/src/vs/workbench/node/extensionHostMain.i18n.json +++ b/i18n/deu/src/vs/workbench/node/extensionHostMain.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "extensionTestError": "Der Pfad \"{0}\" verweist nicht auf einen gültigen Test Runner für eine Extension." + "extensionTestError": "Der Pfad \"{0}\" verweist nicht auf einen gültigen Test Runner für eine Erweiterung." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json b/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json new file mode 100644 index 0000000000000..f802905959f40 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emergencyConfOn": "Die Einstellung \"editor.accessibilitySupport\" wird in \"Ein\" geändert.", + "openingDocs": "Die Dokumentationsseite zur Barrierefreiheit von VS Code wird jetzt geöffnet.", + "introMsg": "Vielen Dank, dass Sie die Optionen für Barrierefreiheit von VS Code testen.", + "status": "Status:", + "changeConfigToOnMac": "Betätigen Sie jetzt die Befehlstaste+E, um den Editor zu konfigurieren, sodass er permanent für die Verwendung mit einer Sprachausgabe optimiert wird.", + "changeConfigToOnWinLinux": "Betätigen Sie jetzt die Befehlstaste+E, um den Editor zu konfigurieren, sodass er permanent für die Verwendung mit einer Sprachausgabe optimiert wird.", + "auto_unknown": "Der Editor ist für die Verwendung von Plattform-APIs konfiguriert, um zu erkennen, wenn eine Sprachausgabe angefügt wird, die aktuelle Laufzeit unterstützt dies jedoch nicht.", + "auto_on": "Der Editor hat automatisch erkannt, dass eine Sprachausgabe angefügt wurde.", + "auto_off": "Der Editor ist so konfiguriert, dass er automatisch erkennt, wenn eine Sprachausgabe angefügt wird, was momentan nicht der Fall ist.", + "configuredOn": "Der Editor ist so konfiguriert, dass er für die Verwendung mit einer Sprachausgabe durchgehend optimiert wird – Sie können dies ändern, indem Sie die Einstellung \"editor.accessibilitySupport\" bearbeiten.", + "configuredOff": "Der Editor ist so konfiguriert, dass er für die Verwendung mit einer Sprachausgabe nie optimiert wird.", + "tabFocusModeOnMsg": "Durch Drücken der TAB-TASTE im aktuellen Editor wird der Fokus in das nächste Element verschoben, das den Fokus erhalten kann. Schalten Sie dieses Verhalten um, indem Sie {0} drücken.", + "tabFocusModeOnMsgNoKb": "Durch Drücken der TAB-TASTE im aktuellen Editor wird der Fokus in das nächste Element verschoben, das den Fokus erhalten kann. Der {0}-Befehl kann zurzeit nicht durch eine Tastenzuordnung ausgelöst werden.", + "tabFocusModeOffMsg": "Durch Drücken der TAB-TASTE im aktuellen Editor wird das Tabstoppzeichen eingefügt. Schalten Sie dieses Verhalten um, indem Sie {0} drücken.", + "tabFocusModeOffMsgNoKb": "Durch Drücken der TAB-TASTE im aktuellen Editor wird das Tabstoppzeichen eingefügt. Der {0}-Befehl kann zurzeit nicht durch eine Tastenzuordnung ausgelöst werden.", + "openDocMac": "Drücken Sie die Befehlstaste+H, um ein Browserfenster mit zusätzlichen VS Code-Informationen zur Barrierefreiheit zu öffnen.", + "openDocWinLinux": "Drücken Sie STRG+H, um ein Browserfenster mit zusätzlichen VS Code-Informationen zur Barrierefreiheit zu öffnen.", + "outroMsg": "Sie können diese QuickInfo schließen und durch Drücken von ESC oder UMSCHALT+ESC zum Editor zurückkehren.", + "ShowAccessibilityHelpAction": "Hilfe zur Barrierefreiheit anzeigen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json index c5e4314489b8e..60061e8550449 100644 --- a/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "workbench.action.inspectKeyMap": "Developer: Inspect Key Mapppings" + "workbench.action.inspectKeyMap": "Entwickler: Wichtige Zuordnungen prüfen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json b/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..18e736ab9873a --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inspectTMScopes": "Entwickler: TM-Bereiche untersuchen", + "inspectTMScopesWidget.loading": "Wird geladen..." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json b/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json new file mode 100644 index 0000000000000..c19698a6d8c8b --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parseErrors": "Fehler beim Analysieren von {0}: {1}", + "schema.openBracket": "Das öffnende Klammerzeichen oder die Zeichenfolgensequenz.", + "schema.closeBracket": "Das schließende Klammerzeichen oder die Zeichenfolgensequenz.", + "schema.comments": "Definiert die Kommentarsymbole.", + "schema.blockComments": "Definiert, wie Blockkommentare markiert werden.", + "schema.blockComment.begin": "Die Zeichenfolge, mit der ein Blockkommentar beginnt.", + "schema.blockComment.end": "Die Zeichenfolge, die einen Blockkommentar beendet.", + "schema.lineComment": "Die Zeichenfolge, mit der ein Zeilenkommentar beginnt.", + "schema.brackets": "Definiert die Klammersymbole, die den Einzug vergrößern oder verkleinern.", + "schema.autoClosingPairs": "Definiert die Klammerpaare. Wenn eine öffnende Klammer eingegeben wird, wird die schließende Klammer automatisch eingefügt.", + "schema.autoClosingPairs.notIn": "Definiert eine Liste von Bereichen, in denen die automatischen Paare deaktiviert sind.", + "schema.surroundingPairs": "Definiert die Klammerpaare, in die eine ausgewählte Zeichenfolge eingeschlossen werden kann.", + "schema.wordPattern": "Die Worddefinition für die Sprache.", + "schema.wordPattern.pattern": "RegExp Muster für Wortübereinstimmungen.", + "schema.wordPattern.flags": "RegExp Kennzeichen für Wortübereinstimmungen", + "schema.wordPattern.flags.errorMessage": "Muss mit dem Muster `/^([gimuy]+)$/` übereinstimmen.", + "schema.indentationRules.increaseIndentPattern.errorMessage": "Muss mit dem Muster `/^([gimuy]+)$/` übereinstimmen.", + "schema.indentationRules.decreaseIndentPattern.errorMessage": "Muss mit dem Muster `/^([gimuy]+)$/` übereinstimmen.", + "schema.indentationRules.indentNextLinePattern.errorMessage": "Muss mit dem Muster `/^([gimuy]+)$/` übereinstimmen.", + "schema.indentationRules.unIndentedLinePattern.errorMessage": "Muss mit dem Muster `/^([gimuy]+)$/` übereinstimmen." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json b/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..18e736ab9873a --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inspectTMScopes": "Entwickler: TM-Bereiche untersuchen", + "inspectTMScopesWidget.loading": "Wird geladen..." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json b/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json new file mode 100644 index 0000000000000..0ca859efe95f5 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "Multi-Curosor-Modifizierer umschalten" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index c2e596b32963a..a294a18039b78 100644 --- a/i18n/deu/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -6,6 +6,7 @@ { "openLaunchJson": "{0} öffnen", "launchJsonNeedsConfigurtion": "Konfigurieren oder reparieren Sie \"launch.json\".", + "noFolderDebugConfig": "Öffnen Sie bitte einen Ordner, um erweitertes Debuggen zu konfigurieren.", "startDebug": "Debuggen starten", "startWithoutDebugging": "Ohne Debuggen starten", "selectAndStartDebugging": "Debugging auswählen und starten", @@ -34,6 +35,7 @@ "editConditionalBreakpoint": "Haltepunkt bearbeiten...", "setValue": "Wert festlegen", "addWatchExpression": "Ausdruck hinzufügen", + "editWatchExpression": "Ausdruck bearbeiten", "addToWatchExpressions": "Zur Überwachung hinzufügen", "removeWatchExpression": "Ausdruck entfernen", "removeAllWatchExpressions": "Alle Ausdrücke entfernen", diff --git a/i18n/deu/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json new file mode 100644 index 0000000000000..e3b17702d867e --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugToolBarBackground": "Hintergrundfarbe der Debug-Symbolleiste." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json new file mode 100644 index 0000000000000..0506a861bbff7 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileLinkMac": "Zum Öffnen klicken (CMD+KLICKEN für seitliche Anzeige)", + "fileLink": "Zum Öffnen klicken (STRG+KLICKEN für seitliche Anzeige)" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/debug/common/debug.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/common/debug.i18n.json new file mode 100644 index 0000000000000..a4c31f57de44c --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/debug/common/debug.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "internalConsoleOptions": "Steuert das Verhalten der internen Debugging-Konsole." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/debug/common/debugModel.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/common/debugModel.i18n.json index e564397040762..6814de9d5ecd5 100644 --- a/i18n/deu/src/vs/workbench/parts/debug/common/debugModel.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/debug/common/debugModel.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "unknownSource": "Unbekannte Quelle", "notAvailable": "Nicht verfügbar", - "startDebugFirst": "Bitte starten Sie eine Debugsitzung, um die Auswertung vorzunehmen.", - "unknownStack": "Unbekannte Stapelposition" + "startDebugFirst": "Bitte starten Sie eine Debugsitzung, um die Auswertung vorzunehmen." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/debug/common/debugSource.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/common/debugSource.i18n.json new file mode 100644 index 0000000000000..8e5e5b68c3db2 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/debug/common/debugSource.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownSource": "Unbekannte Quelle" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json index e1408dc36749f..fe8164578a1a5 100644 --- a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -15,5 +15,6 @@ "allowBreakpointsEverywhere": "Ermöglicht das Festlegen von Haltepunkten für alle Dateien.", "openExplorerOnEnd": "Hiermit wird am Ende einer Debugsitzung automatisch eine Explorer-Ansicht geöffnet.", "inlineValues": "Variablenwerte beim Debuggen in Editor eingebunden anzeigen", - "hideActionBar": "Steuert, ob die unverankerte Debugaktionsleiste ausgeblendet werden soll" + "hideActionBar": "Steuert, ob die unverankerte Debugaktionsleiste ausgeblendet werden soll", + "launch": "Startkonfiguration für globales Debuggen. Sollte als Alternative zu \"launch.json\" verwendet werden, das übergreifend von mehreren Arbeitsbereichen genutzt wird" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json new file mode 100644 index 0000000000000..09e90db77c7ea --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noFolderDebugConfig": "Öffnen Sie bitte einen Ordner, um erweitertes Debuggen zu konfigurieren." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json index 8a09c15cf7821..14f2ea7aa8a5a 100644 --- a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json @@ -7,7 +7,7 @@ "vscode.extension.contributes.debuggers": "Trägt Debugadapter bei.", "vscode.extension.contributes.debuggers.type": "Der eindeutige Bezeichner für diese Debugadapter.", "vscode.extension.contributes.debuggers.label": "Der Anzeigename für diese Debugadapter.", - "vscode.extension.contributes.debuggers.program": "Der Pfad zum Debugadapterprogramm. Der Pfad ist absolut oder relativ zum Extensionordner.", + "vscode.extension.contributes.debuggers.program": "Der Pfad zum Debugadapterprogramm. Der Pfad ist absolut oder relativ zum Erweiterungsordner.", "vscode.extension.contributes.debuggers.args": "Optionale Argumente, die an den Adapter übergeben werden sollen.", "vscode.extension.contributes.debuggers.runtime": "Optionale Laufzeit für den Fall, dass das Programmattribut keine ausführbare Datei ist und eine Laufzeit erfordert.", "vscode.extension.contributes.debuggers.runtimeArgs": "Optionale Laufzeitargumente.", diff --git a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index 68430d7756046..7c044c0e58086 100644 --- a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -5,8 +5,8 @@ // Do not edit this file. It is machine generated. { "snapshotObj": "Nur primitive Werte werden für dieses Objekt angezeigt.", - "debuggingStarted": "Das Debuggen wurde gestartet.", "debuggingPaused": "Das Debuggen wurde angehalten. Ursache {0}, {1}{2}", + "debuggingStarted": "Das Debuggen wurde gestartet.", "debuggingStopped": "Das Debuggen wurde beendet.", "breakpointAdded": "Der Haltepunkt wurde hinzugefügt. Zeile {0}, Datei \"{1}\".", "breakpointRemoved": "Der Haltepunkt wurde entfernt. Zeile {0}, Datei \"{1}\".", diff --git a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json index 77b8513319c99..bef42d1efed70 100644 --- a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json @@ -6,5 +6,6 @@ { "copyValue": "Wert kopieren", "copy": "Kopieren", + "copyAll": "Alles kopieren", "copyStackTrace": "Aufrufliste kopieren" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json index a145fe55185c4..dded802b64caa 100644 --- a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json @@ -5,8 +5,6 @@ // Do not edit this file. It is machine generated. { "stateCapture": "Der Objektstatus wird aus der ersten Auswertung erfasst.", - "fileLinkMac": "Zum Öffnen klicken (CMD+KLICKEN für seitliche Anzeige)", - "fileLink": "Zum Öffnen klicken (STRG+KLICKEN für seitliche Anzeige)", "replVariableAriaLabel": "Variable {0} besitzt den Wert {1}, Read Eval Print-Loop, Debuggen", "replExpressionAriaLabel": "Ausdruck {0} besitzt den Wert {1}, Read Eval Print-Loop, Debuggen", "replValueOutputAriaLabel": "{0}, Read Eval Print-Loop, Debuggen", diff --git a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json index 83ecbf1d9c05f..57d2b6200423f 100644 --- a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "statusBarDebuggingBackground": "Hintergrundfarbe der Statusleiste beim Debuggen eines Programms. Die Statusleiste wird unten im Fenster angezeigt." + "statusBarDebuggingBackground": "Hintergrundfarbe der Statusleiste beim Debuggen eines Programms. Die Statusleiste wird unten im Fenster angezeigt.", + "statusBarDebuggingForeground": "Vordergrundfarbe der Statusleiste beim Debuggen eines Programms. Die Statusleiste wird unten im Fenster angezeigt." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index 213056c17ed22..1bcee0dbf6e04 100644 --- a/i18n/deu/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,12 +7,12 @@ "debugAdapterBinNotFound": "Die ausführbare Datei \"{0}\" des Debugadapters ist nicht vorhanden.", "debugAdapterCannotDetermineExecutable": "Die ausführbare Datei \"{0}\" des Debugadapters kann nicht bestimmt werden.", "debugType": "Der Typ der Konfiguration.", + "debugTypeNotRecognised": "Dieser Debugging-Typ wurde nicht erkannt. Bitte installieren und aktivieren Sie die dazugehörige Debugging-Erweiterung.", "node2NotSupported": "\"node2\" wird nicht mehr unterstützt, verwenden Sie stattdessen \"node\", und legen Sie das Attribut \"protocol\" auf \"inspector\" fest.", "debugName": "Der Name der Konfiguration. Er wird im Dropdownmenü der Startkonfiguration angezeigt.", "debugRequest": "Der Anforderungstyp der Konfiguration. Der Wert kann \"launch\" oder \"attach\" sein.", "debugServer": "Nur für die Entwicklung von Debugerweiterungen: Wenn ein Port angegeben ist, versucht der VS-Code, eine Verbindung mit einem Debugadapter herzustellen, der im Servermodus ausgeführt wird.", "debugPrelaunchTask": "Ein Task, der ausgeführt werden soll, bevor die Debugsitzung beginnt.", - "internalConsoleOptions": "Steuert das Verhalten der internen Debugging-Konsole.", "debugWindowsConfiguration": "Windows-spezifische Startkonfigurationsattribute.", "debugOSXConfiguration": "OS X-spezifische Startkonfigurationsattribute.", "debugLinuxConfiguration": "Linux-spezifische Startkonfigurationsattribute.", diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json new file mode 100644 index 0000000000000..e0afee4248519 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "balanceInward": "Emmet: Ausgleichen (einwärts)", + "balanceOutward": "Emmet: Ausgleichen (auswärts)" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json new file mode 100644 index 0000000000000..de81c8b774353 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "previousEditPoint": "Emmet: Zum vorherigen Bearbeitungspunkt wechseln", + "nextEditPoint": "Emmet: Zum nächsten Bearbeitungspunkt wechseln" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json new file mode 100644 index 0000000000000..a3f778d565ab5 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "evaluateMathExpression": "Emmet: Mathematischen Ausdruck auswerten" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json new file mode 100644 index 0000000000000..278d10a21dc74 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "expandAbbreviationAction": "Emmet: Abkürzung erweitern" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json new file mode 100644 index 0000000000000..2aab3f2af7ce7 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "incrementNumberByOneTenth": "Emmet: Um 0,1 inkrementieren", + "incrementNumberByOne": "Emmet: Um 1 inkrementieren", + "incrementNumberByTen": "Emmet: Um 10 inkrementieren", + "decrementNumberByOneTenth": "Emmet: Um 0,1 dekrementieren", + "decrementNumberByOne": "Emmet: Um 1 dekrementieren", + "decrementNumberByTen": "Emmet: Um 10 dekrementieren" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json new file mode 100644 index 0000000000000..158b074c05b3d --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "matchingPair": "Emmet: Gehe zu übereinstimmendem Paar" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json new file mode 100644 index 0000000000000..e6f2b3e1ba724 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mergeLines": "Emmet: Zeilen mergen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json new file mode 100644 index 0000000000000..1569d01566960 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reflectCSSValue": "Emmet: CSS-Wert reflektieren" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json new file mode 100644 index 0000000000000..bb2a97fd42e31 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeTag": "Emmet: Tag entfernen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json new file mode 100644 index 0000000000000..0ddd0df478e81 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "selectPreviousItem": "Emmet: Vorheriges Element auswählen", + "selectNextItem": "Emmet: Nächstes Element auswählen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json new file mode 100644 index 0000000000000..a214ce3766ae8 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "splitJoinTag": "Emmet: Tag teilen/verknüpfen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json new file mode 100644 index 0000000000000..118d88c7df808 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleComment": "Emmet: Kommentar umschalten" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json new file mode 100644 index 0000000000000..b682f5d97c3d6 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateImageSize": "Emmet: Bildgröße aktualisieren" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json new file mode 100644 index 0000000000000..bba2b0b703e21 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateTag": "Emmet: Tag aktualisieren", + "enterTag": "Tag eingeben", + "tag": "Tag" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json new file mode 100644 index 0000000000000..45013796dd3f1 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wrapWithAbbreviationAction": "Emmet: Mit Abkürzung umschließen", + "enterAbbreviation": "Abkürzung eingeben", + "abbreviation": "Abkürzung" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json new file mode 100644 index 0000000000000..71dbf73cb59ff --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emmetConfigurationTitle": "Emmet", + "triggerExpansionOnTab": "Wenn aktiviert, werden Emmet-Abkürzungen beim Drücken der TAB-TASTE erweitert.", + "emmetPreferences": "Einstellungen, die zum Ändern des Verhaltens einiger Aktionen und Konfliktlöser von Emmet verwendet werden.", + "emmetSyntaxProfiles": "Definieren Sie das Profil für die angegebene Syntax, oder verwenden Sie Ihr eigenes Profil mit bestimmten Regeln.", + "emmetExclude": "Ein Array von Sprachen, in dem Emmet-Abkürzungen nicht erweitert werden sollen.", + "emmetExtensionsPath": "Pfad zu einem Ordner mit Emmet-Profilen, Ausschnitten und Voreinstellungen", + "useNewEmmet": "Testen Sie die neuen Emmet-Module (die letztendlich die alte einzelne Emmet-Bibliothek ersetzen) für alle Emmet-Funktionen." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index f6397044a9553..88f9247b746a4 100644 --- a/i18n/deu/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -4,10 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "vscode.extension.contributes.explorer": "Stellt ein benutzerdefiniertes Viewlet für den Tree Explorer in der Seitenleiste zur Verfügung.", - "vscode.extension.contributes.explorer.treeExplorerNodeProviderId": "Eindeutige ID zum Identifizieren des über vscode.workspace.registerTreeExplorerNodeProvider registrierten Anbieters", - "vscode.extension.contributes.explorer.treeLabel": "Visuell lesbare Zeichenfolge zur Darstellung des benutzerdefinierten Tree Explorers", - "vscode.extension.contributes.explorer.icon": "Pfad zum Symbol des Viewlets auf der Aktivitätsleiste", + "vscode.extension.contributes.view": "Trägt eine benutzerdefinierte Ansicht bei", + "vscode.extension.contributes.view.id": "Eindeutige ID zum Identifizieren der über vscode.workspace.createTreeView erstellten Ansicht", + "vscode.extension.contributes.view.label": "Visuell lesbare Zeichenfolge zum Rendern der Ansicht", + "vscode.extension.contributes.view.icon": "Pfad zum Ansichtssymbol", + "vscode.extension.contributes.views": "Trägt benutzerdefinierte Ansichten bei", "showViewlet": "{0} anzeigen", "view": "Anzeigen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index 66aee761ca9ab..80ecb27720f60 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -15,7 +15,7 @@ "changelog": "ChangeLog", "dependencies": "Abhängigkeiten", "noReadme": "Keine INFODATEI verfügbar.", - "noChangelog": "Es ist kein Änderungsprotokoll verfügbar.", + "noChangelog": "Es ist kein ChangeLog verfügbar.", "noContributions": "Keine Beiträge", "noDependencies": "Keine Abhängigkeiten", "settings": "Einstellungen ({0})", @@ -24,6 +24,10 @@ "default": "Standard", "debuggers": "Debugger ({0})", "debugger name": "Name", + "views": "Ansichten ({0})", + "view id": "ID", + "view name": "Name", + "view location": "Wo", "themes": "Designs ({0})", "JSON Validation": "JSON-Validierung ({0})", "commands": "Befehle ({0})", diff --git a/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index d87f46daa42ac..0e32d73283c06 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -22,7 +22,9 @@ "disableGloballyAction": "Immer", "disableAction": "Deaktivieren", "checkForUpdates": "Nach Updates suchen", - "updateAll": "Alle Extensions aktualisieren", + "enableAutoUpdate": "Aktivere die automatische Aktualisierung von Erweiterungen", + "disableAutoUpdate": "Deaktivere die automatische Aktualisierung von Erweiterungen", + "updateAll": "Alle Erweiterungen aktualisieren", "reloadAction": "Neu starten", "postUpdateTooltip": "Zum Aktualisieren erneut laden", "postUpdateMessage": "Dieses Fenster erneut laden, um die aktualisierte Erweiterung \"{0}\" zu aktivieren?", @@ -33,17 +35,19 @@ "postUninstallTooltip": "Zum Deaktivieren erneut laden", "postUninstallMessage": "Dieses Fenster erneut laden, um die deinstallierte Erweiterung \"{0}\" zu deaktivieren?", "reload": "Fenster &&erneut laden", - "toggleExtensionsViewlet": "Extensions anzeigen", - "installExtensions": "Extensions installieren", - "showInstalledExtensions": "Installierte Extensions anzeigen", + "toggleExtensionsViewlet": "Erweiterungen anzeigen", + "installExtensions": "Erweiterungen installieren", + "showInstalledExtensions": "Installierte Erweiterungen anzeigen", "showDisabledExtensions": "Deaktivierte Erweiterungen anzeigen", "clearExtensionsInput": "Extensioneingabe löschen", - "showOutdatedExtensions": "Veraltete Extensions anzeigen", - "showPopularExtensions": "Beliebte Extensions anzeigen", - "showRecommendedExtensions": "Empfohlene Extensions anzeigen", - "showWorkspaceRecommendedExtensions": "Für den Arbeitsbereich empfohlene Extensions anzeigen", + "showOutdatedExtensions": "Veraltete Erweiterungen anzeigen", + "showPopularExtensions": "Beliebte Erweiterungen anzeigen", + "showRecommendedExtensions": "Empfohlene Erweiterungen anzeigen", + "showWorkspaceRecommendedExtensions": "Für den Arbeitsbereich empfohlene Erweiterungen anzeigen", "showRecommendedKeymapExtensions": "Empfohlene Tastenzuordnungen anzeigen", "showRecommendedKeymapExtensionsShort": "Tastenzuordnungen", + "showLanguageExtensions": "Spracherweiterungen anzeigen", + "showLanguageExtensionsShort": "Spracherweiterungen", "configureWorkspaceRecommendedExtensions": "Empfohlene Erweiterungen konfigurieren (Arbeitsbereich)", "ConfigureWorkspaceRecommendations.noWorkspace": "Empfehlungen sind nur für einen Arbeitsbereichsordner verfügbar.", "OpenExtensionsFile.failed": "Die Datei \"extensions.json\" kann nicht im Ordner \".vscode\" erstellt werden ({0}).", @@ -51,5 +55,8 @@ "disableAll": "Alle installierten Erweiterungen löschen", "disableAllWorkspace": "Alle installierten Erweiterungen für diesen Arbeitsbereich deaktivieren", "enableAll": "Alle installierten Erweiterungen aktivieren", - "enableAllWorkspace": "Alle installierten Erweiterungen für diesen Arbeitsbereich aktivieren" + "enableAllWorkspace": "Alle installierten Erweiterungen für diesen Arbeitsbereich aktivieren", + "extensionButtonProminentBackground": "Hintergrundfarbe für markante Aktionenerweiterungen (z. B. die Schaltfläche zum Installieren).", + "extensionButtonProminentForeground": "Vordergrundfarbe für markante Aktionenerweiterungen (z. B. die Schaltfläche zum Installieren).", + "extensionButtonProminentHoverBackground": "Hoverhintergrundfarbe für markante Aktionenerweiterungen (z. B. die Schaltfläche zum Installieren)." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json index e5f434b98b2f0..6772e6da40560 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "manage": "Drücken Sie die EINGABETASTE, um Ihre Extensions zu verwalten.", + "manage": "Drücken Sie die EINGABETASTE, um Ihre Erweiterungen zu verwalten.", "searchFor": "Drücken Sie die EINGABETASTE, um nach \"{0}\" in Marketplace zu suchen.", - "noExtensionsToInstall": "Geben Sie einen Extensionnamen ein." + "noExtensionsToInstall": "Geben Sie einen Erweiterungsnamen ein." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.i18n.json index 1ae72bd988c80..66703e1315f2d 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "app.extensions.json.title": "Extensions", + "app.extensions.json.title": "Erweiterungen", "app.extensions.json.recommendations": "Liste der Erweiterungsempfehlungen. Der Bezeichner einer Erweiterung lautet immer \"${publisher}.${name}\". Beispiel: \"vscode.csharp\".", "app.extension.identifier.errorMessage": "Erwartetes Format: \"${publisher}.${name}\". Beispiel: \"vscode.csharp\"." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json index d2cb0550504c7..0e1519f5cd423 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "extensionsInputName": "Extension: {0}" + "extensionsInputName": "Erweiterung: {0}" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index 9ae60f8de9b3e..b580aff8fbe56 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -4,8 +4,13 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "reallyRecommended2": "Für diesen Dateityp wird die Erweiterung \"{0}\" empfohlen.", "showRecommendations": "Empfehlungen anzeigen", "neverShowAgain": "Nicht mehr anzeigen", "close": "Schließen", - "workspaceRecommended": "Für diesen Arbeitsbereich sind Extensionempfehlungen verfügbar." + "workspaceRecommended": "Für diesen Arbeitsbereich sind Erweiterungsempfehlungen verfügbar.", + "ignoreExtensionRecommendations": "Möchten Sie alle Erweiterungsempfehlungen ignorieren?", + "ignoreAll": "Ja, alles ignorieren", + "no": "Nein", + "cancel": "Abbrechen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index b2acacf886cbe..18b47398935e6 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -4,11 +4,12 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "extensionsCommands": "Extensions verwalten", - "galleryExtensionsCommands": "Katalogextensions installieren", - "extension": "Extension", - "extensions": "Extensions", + "extensionsCommands": "Erweiterungen verwalten", + "galleryExtensionsCommands": "Katalogerweiterungen installieren", + "extension": "Erweiterung", + "extensions": "Erweiterungen", "view": "Anzeigen", - "extensionsConfigurationTitle": "Extensions", - "extensionsAutoUpdate": "Extensions automatisch aktualisieren" + "extensionsConfigurationTitle": "Erweiterungen", + "extensionsAutoUpdate": "Erweiterungen automatisch aktualisieren", + "extensionsIgnoreRecommendations": "Erweiterungsempfehlungen ignorieren" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json index b323c51e402db..56a4056096228 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "openExtensionsFolder": "Extensionordner öffnen", + "openExtensionsFolder": "Erweiterungsordner öffnen", "installVSIX": "Aus VSIX installieren...", "InstallVSIXAction.success": "Die Erweiterung wurde erfolgreich installiert. Führen Sie einen Neustart aus, um sie zu aktivieren.", "InstallVSIXAction.reloadNow": "Jetzt erneut laden" diff --git a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json new file mode 100644 index 0000000000000..48aabfdf0bfe8 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "disableOtherKeymapsConfirmation": "Deaktivere Tastenzuordnungen ({0}) um Konfilkte mit anderen zu vermeiden?", + "yes": "Ja", + "no": "Nein", + "betterMergeDisabled": "Die \"Better Merge\" Erweiterung ist jetzt integriert, die alte Erweiterung wurde deaktiviert und kann deinstalliert werden.", + "uninstall": "Deinstallieren", + "later": "Später" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json index 90b8ce77edcdc..701164e629f68 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json @@ -4,11 +4,13 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "searchExtensions": "Nach Extensions in Marketplace suchen", - "extensions": "Extensions", + "installedExtensions": "Installiert", + "searchInstalledExtensions": "Installiert", + "searchExtensions": "Nach Erweiterungen im Marketplace suchen", "sort by installs": "Sortieren nach: Installationsanzahl", "sort by rating": "Sortieren nach: Bewertung", - "no extensions found": "Es wurden keine Erweiterungen gefunden.", + "sort by name": "Sortieren nach: Name", "suggestProxyError": "Marketplace hat \"ECONNREFUSED\" zurückgegeben. Überprüfen Sie die Einstellung \"http.proxy\".", - "outdatedExtensions": "{0} veraltete Extensions" + "extensions": "Erweiterungen", + "outdatedExtensions": "{0} veraltete Erweiterungen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json new file mode 100644 index 0000000000000..c0a30509eeb4c --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensions": "Erweiterungen", + "no extensions found": "Es wurden keine Erweiterungen gefunden.", + "suggestProxyError": "Marketplace hat \"ECONNREFUSED\" zurückgegeben. Überprüfen Sie die Einstellung \"http.proxy\"." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json index abeceea97366b..7a6f233aab640 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json @@ -13,5 +13,7 @@ "cancel": "Abbrechen", "singleDependentError": "Die Erweiterung \"{0}\" kann nicht deaktiviert werden. Die Erweiterung \"{1}\" ist davon abhängig.", "twoDependentsError": "Die Erweiterung \"{0}\" kann nicht deaktiviert werden. Die Erweiterungen \"{1}\" und \"{2}\" sind davon abhängig.", - "multipleDependentsError": "Die Erweiterung \"{0}\" kann nicht deaktiviert werden. Die Erweiterungen \"{1}\", \"{2}\" und andere sind davon abhängig." + "multipleDependentsError": "Die Erweiterung \"{0}\" kann nicht deaktiviert werden. Die Erweiterungen \"{1}\", \"{2}\" und andere sind davon abhängig.", + "installConfirmation": "Möchten sie die Erweiterung \"{0}\" installieren?", + "install": "Installieren" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index 6613fe557a2cd..575c8f77bea2b 100644 --- a/i18n/deu/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,7 +16,7 @@ "associations": "Konfigurieren Sie Dateizuordnungen zu Sprachen (beispielsweise \"*.extension\": \"html\"). Diese besitzen Vorrang vor den Standardzuordnungen der installierten Sprachen.", "encoding": "Die Standardzeichensatz-Codierung, die beim Lesen und Schreiben von Dateien verwendet werden soll.", "autoGuessEncoding": "Ist diese Option aktiviert, wird beim Öffnen von Dateien versucht, die Zeichensatzcodierung automatisch zu ermitteln.", - "eol": "Das Zeilenende-Standardzeichen.", + "eol": "Das Zeilenende-Standardzeichen. Verwenden Sie \\n für LF und \\r\\n für CRLF.", "trimTrailingWhitespace": "Bei Aktivierung werden nachgestellte Leerzeichen beim Speichern einer Datei gekürzt.", "insertFinalNewline": "Bei Aktivierung wird beim Speichern einer Datei eine abschließende neue Zeile am Dateiende eingefügt.", "files.autoSave.off": "Eine geänderte Datei wird nie automatisch gespeichert.", @@ -25,10 +25,8 @@ "files.autoSave.onWindowChange": "Eine geänderte Datei wird automatisch gespeichert, wenn das Fenster den Fokus verliert.", "autoSave": "Steuert die automatische Speicherung geänderter Dateien. Zulässige Werte: \"{0}\", \"{1}\", \"{2}\" (Editor verliert den Fokus), \"{3}\" (Fenster verliert den Fokus). Wenn diese Angabe auf \"{4}\" festgelegt ist, können Sie die Verzögerung in \"files.autoSaveDelay\" konfigurieren.", "autoSaveDelay": "Steuert die Verzögerung in Millisekunden, nach der eine geänderte Datei automatisch gespeichert wird. Nur gültig, wenn \"files.autoSave\" auf \"{0}\" festgelegt ist.", - "watcherExclude": "Konfigurieren Sie Globmuster von Dateipfaden, die aus der Dateiüberwachung ausgeschlossen werden sollen. Das Ändern dieser Einstellung erfordert einen Neustart. Wenn Ihr Code beim Starten viel CPU-Zeit benötigt, können Sie große Ordner ausschließen, um die Anfangslast zu verringern.", "hotExit.off": "Hot Exit deaktivieren.", "hotExit.onExit": "Hot Exit wird beim Schließen der Anwendung ausgelöst, d. h. wenn unter Windows/Linux das letzte Fenster geschlossen wird oder wenn der Befehl \"workbench.action.quit\" ausgelöst wird (Befehlspalette, Tastenzuordnung, Menü). Alle Fenster mit Sicherungen werden beim nächsten Start wiederhergestellt.", - "hotExit.onExitAndWindowClose": "Hot Exit wird beim Schließen der Anwendung ausgelöst, d. h. wenn unter Windows/Linux das letzte Fenster geschlossen wird oder wenn der Befehl \"workbench.action.quit\" ausgelöst wird (Befehlspalette, Tastenzuordnung, Menü) sowie für jedes Fenster mit einem geöffneten Ordner, unabhängig davon, ob dies das letzte Fenster ist. Alle Fenster ohne geöffnete Ordner werden beim nächsten Start wiederhergestellt. Legen Sie \"window.reopenFolders\" auf \"all\" fest, damit die Ordnerfenster wie vor dem Heruntergefahren wiederhergestellt werden.", "hotExit": "Steuert, ob nicht gespeicherten Dateien zwischen den Sitzungen beibehlten werden, die Aufforderung zum Speichern wird beim Beenden des Editors übersprungen.", "defaultLanguage": "Der Standardsprachmodus, der neuen Dateien zugewiesen wird.", "editorConfigurationTitle": "Editor", diff --git a/i18n/deu/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json b/i18n/deu/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json index 7bf4de77404d3..6c52ba6976658 100644 --- a/i18n/deu/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json @@ -11,5 +11,6 @@ "genericSaveError": "Fehler beim Speichern von \"{0}\": {1}.", "staleSaveError": "Fehler beim Speichern von \"{0}\": Der Inhalt auf dem Datenträger ist neuer. Klicken Sie auf **Vergleichen**, um Ihre Version mit der Version auf dem Datenträger zu vergleichen.", "compareChanges": "Vergleichen", + "saveConflictDiffLabel": "{0} (auf Datenträger) ↔ {1} (in {2}): Speicherkonflikt lösen", "userGuide": "Verwenden Sie die Aktionen in der Editor-Symbolleiste, um Ihre Änderungen **rückgängig zu machen** oder den Inhalt auf dem Datenträger mit Ihren Änderungen zu **überschreiben**." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json b/i18n/deu/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json index 0402d68c71d79..e04313a820899 100644 --- a/i18n/deu/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "explorerSection": "Datei-Explorer-Abschnitt", "noWorkspace": "Es ist kein Ordner geöffnet.", + "explorerSection": "Datei-Explorer-Abschnitt", "noWorkspaceHelp": "Sie haben noch keinen Ordner geöffnet.", "openFolder": "Ordner öffnen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json b/i18n/deu/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json index 02b807c765760..ac1fd2f5acbc6 100644 --- a/i18n/deu/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "openEditosrSection": "Abschnitt \"Geöffnete Editoren\"", "openEditors": "Geöffnete Editoren", + "openEditosrSection": "Abschnitt \"Geöffnete Editoren\"", "treeAriaLabel": "Geöffnete Editoren: Liste der aktiven Dateien", "dirtyCounter": "{0} nicht gespeichert" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index 96d83227f6771..7fb4c04c827ae 100644 --- a/i18n/deu/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -5,5 +5,11 @@ // Do not edit this file. It is machine generated. { "slow": "Langsamer Start erkannt", - "slow.detail": "Es tut uns leid, dass Ihr Start so langsam war. Starten Sie \"{0}\" mit aktivierter Profilerstellung neu, geben Sie die Profile für uns frei, und wir tun unser Bestes, damit der Start bald wieder perfekt funktioniert." + "slow.detail": "Es tut uns leid, dass Ihr Start so langsam war. Starten Sie \"{0}\" mit aktivierter Profilerstellung neu, geben Sie die Profile für uns frei, und wir tun unser Bestes, damit der Start bald wieder perfekt funktioniert.", + "prof.message": "Profile wurden erfolgreich erstellt.", + "prof.detail": "Erstellen Sie ein Problem, und fügen Sie die folgenden Dateien manuell an:\n{0}", + "prof.restartAndFileIssue": "Problem erstellen und neu starten", + "prof.restart": "Neu starten", + "prof.thanks": "Danke für Ihre Hilfe.", + "prof.detail.restart": "Ein abschließender Neustart ist erforderlich um '{0}' nutzen zu können. Danke für Ihre Hilfe." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json index e81b3231b59a4..b5dc5a9cd693e 100644 --- a/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -7,6 +7,7 @@ "keybindingsInputName": "Tastenkombinationen", "SearchKeybindings.AriaLabel": "Tastenzuordnungen suchen", "SearchKeybindings.Placeholder": "Tastenzuordnungen suchen", + "sortByPrecedene": "Nach Priorität sortieren", "header-message": "Öffnen und bearbeiten Sie die folgende Datei, um erweiterte Anpassungen vorzunehmen:", "keybindings-file-name": "keybindings.json", "keybindingsLabel": "Tastenzuordnungen", @@ -14,6 +15,7 @@ "addLabel": "Tastenzuordnung hinzufügen", "removeLabel": "Tastenzuordnung entfernen", "resetLabel": "Tastenbindung zurücksetzen", + "showConflictsLabel": "Konflikte anzeigen", "copyLabel": "Kopieren", "error": "Fehler '{0}' beim Bearbeiten der Tastenzuordnung. Überprüfen Sie die Datei 'keybindings.json'.", "command": "Befehlstaste", diff --git a/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index 4680427977426..959f4d64674da 100644 --- a/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -5,7 +5,7 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.start": "Tastenbindung definieren", - "defineKeybinding.kbLayoutInfoMessage": "Drücken Sie für Ihr aktuelles Tastaturlayout ", "defineKeybinding.kbLayoutErrorMessage": "Sie können diese Tastenkombination mit Ihrem aktuellen Tastaturlayout nicht generieren.", - "DefineKeybindingAction": "Tastenbindung definieren" + "defineKeybinding.kbLayoutLocalAndUSMessage": "**{0}** für Ihr aktuelles Tastaturlayout (**{1}** für USA, Standard).", + "defineKeybinding.kbLayoutLocalMessage": "**{0}** für Ihr aktuelles Tastaturlayout." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index b3f77a860dbb7..157325389a5f2 100644 --- a/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -6,6 +6,7 @@ { "openGlobalSettings": "Benutzereinstellungen öffnen", "openGlobalKeybindings": "Tastaturkurzbefehle öffnen", + "openGlobalKeybindingsFile": "Datei mit Tastaturkurzbefehlen öffnen", "openWorkspaceSettings": "Arbeitsbereichseinstellungen öffnen", "configureLanguageBasedSettings": "Sprachspezifische Einstellungen konfigurieren...", "languageDescriptionConfigured": "({0})", diff --git a/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index 701fa77e7a58f..2a931f496f19c 100644 --- a/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "errorInvalidConfiguration": "Einstellungen können nicht geschrieben werden. Öffnen Sie die Datei, um Fehler/Warnungen in der Datei zu korrigieren. Versuchen Sie es anschließend noch mal.", + "defaultSettingsTitle": "Standardeinstellungen", "editTtile": "Bearbeiten", "replaceDefaultValue": "In Einstellungen ersetzen", "copyDefaultValue": "In Einstellungen kopieren", diff --git a/i18n/deu/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json b/i18n/deu/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json index f73934f542eee..794bf9b0aaffb 100644 --- a/i18n/deu/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json @@ -5,5 +5,7 @@ // Do not edit this file. It is machine generated. { "default": "Standard", - "user": "Benutzer" + "user": "Benutzer", + "meta": "meta", + "option": "option" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json b/i18n/deu/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json index 9d86b8f724410..37e4e48936217 100644 --- a/i18n/deu/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "showTriggerActions": "Alle Befehle anzeigen", + "showCommands.label": "Befehlspalette...", "entryAriaLabelWithKey": "{0}, {1}, Befehle", "entryAriaLabel": "{0}, Befehle", "canNotRun": "Der Befehl '{0}' kann nicht an dieser Stelle ausgeführt werden.", diff --git a/i18n/deu/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json new file mode 100644 index 0000000000000..30e347510d43c --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "relaunchSettingMessage": "Eine Einstellung wurde geändert, welche einen Neustart benötigt.", + "relaunchSettingDetail": "Drücke den Neu starten-Button, um {0} neuzustarten und die Einstellung zu aktivieren.", + "restart": "Neu starten", + "reload": "Neu starten" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/deu/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json new file mode 100644 index 0000000000000..3a19632777036 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGutterModifiedBackground": "Hintergrundfarbe für die Editor-Leiste für Zeilen, die geändert wurden.", + "editorGutterAddedBackground": "Hintergrundfarbe für die Editor-Leiste für Zeilen, die hinzugefügt wurden.", + "editorGutterDeletedBackground": "Hintergrundfarbe für die Editor-Leiste für Zeilen, die gelöscht wurden." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json index cfb59dde79057..11d322e71292a 100644 --- a/i18n/deu/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "toggleGitViewlet": "Git anzeigen", + "installAdditionalSCMProviders": "Installiere weiter SCM Provider...", "source control": "Quellcodeverwaltung", "toggleSCMViewlet": "SCM anzeigen", "view": "Anzeigen" diff --git a/i18n/deu/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json b/i18n/deu/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json index 07930885971eb..d2a2095a234b2 100644 --- a/i18n/deu/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "installAdditionalSCMProviders": "Installiere weiter SCM Provider...", "switch provider": "SCM-Anbieter wechseln..." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/deu/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json index c15dc7a27b912..8ec0049b3b37b 100644 --- a/i18n/deu/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -7,6 +7,6 @@ "searchMatches": "{0} Übereinstimmungen gefunden", "searchMatch": "{0} Übereinstimmung gefunden", "fileMatchAriaLabel": "{0} Übereinstimmungen in der Datei \"{1}\" des Ordners \"{2}\", Suchergebnis", - "replacePreviewResultAria": "Vorschauergebnis ersetzen, {0}", - "searchResultAria": "{0}, Suchergebnis" + "replacePreviewResultAria": "Ersetze Term {0} mit {1} an Spaltenposition {2} in Zeile mit Text {3}", + "searchResultAria": "Term {0} an Spaltenposition {1} in Zeile mit Text {2} gefunden" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json b/i18n/deu/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json index 60f40269ae400..18717d8b12c17 100644 --- a/i18n/deu/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json @@ -6,8 +6,9 @@ { "vscode.extension.contributes.snippets": "Trägt Codeausschnitte bei.", "vscode.extension.contributes.snippets-language": "Der Sprachbezeichner, für den dieser Codeausschnitt beigetragen wird.", - "vscode.extension.contributes.snippets-path": "Der Pfad der Codeausschnittdatei. Der Pfad ist relativ zum Extensionordner und beginnt normalerweise mit \". /snippets/\".", + "vscode.extension.contributes.snippets-path": "Der Pfad der Codeausschnittdatei. Der Pfad ist relativ zum Erweiterungsordner und beginnt normalerweise mit \". /snippets/\".", "invalid.language": "Unbekannte Sprache in \"contributes.{0}.language\". Bereitgestellter Wert: {1}", "invalid.path.0": "In \"contributes.{0}.path\" wurde eine Zeichenfolge erwartet. Bereitgestellter Wert: {1}", - "invalid.path.1": "Es wurde erwartet, dass \"contributes.{0}.path\" ({1}) im Ordner ({2}) der Extension enthalten ist. Dies führt ggf. dazu, dass die Extension nicht portierbar ist." + "invalid.path.1": "Es wurde erwartet, dass \"contributes.{0}.path\" ({1}) im Ordner ({2}) der Erweiterung enthalten ist. Dies führt ggf. dazu, dass die Erweiterung nicht portierbar ist.", + "badVariableUse": "Das \"{0}\"-Snippet verwirrt wahrscheinlich Snippet-Variablen und Snippet-Paltzhalter. Schaue https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax für weitere Informationen." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json index 086f7561431e4..ff4eb3dd4ad30 100644 --- a/i18n/deu/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json @@ -11,6 +11,6 @@ "snippetSchema.json.default": "Leerer Codeausschnitt", "snippetSchema.json": "Benutzerkonfiguration des Codeausschnitts", "snippetSchema.json.prefix": "Das Präfix, das beim Auswählen des Codeausschnitts in IntelliSense verwendet werden soll.", - "snippetSchema.json.body": "Der Inhalt des Codeausschnitts. Verwenden Sie \"${id}\", \"${id:label}\", \"${1:label}\" für Variablen und \"$0\", \"$1\" für die Cursorpositionen.", + "snippetSchema.json.body": "Der Inhalt des Codeausschnitts. Verwenden Sie \"$1\", \"${1:defaultText}\", um Cursorpositionen zu definieren, und \"$0\" für die finale Cursorposition. Fügen Sie mit \"${varName}\" und \"${varName:defaultText}\" Variablenwerte ein, z. B. \"This is file: $TM_FILENAME\".", "snippetSchema.json.description": "Die Beschreibung des Codeausschnitts." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json new file mode 100644 index 0000000000000..b04bf830fa17e --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "helpUs": "Helfen Sie uns die Unterstützung für {0} zu verbessern", + "takeShortSurvey": "An kurzer Umfrage teilnehmen", + "remindLater": "Später erinnern", + "neverAgain": "Nicht mehr anzeigen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..5082c06fc4a4f --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "Wir würden uns freuen, wenn Sie an einer schnellen Umfrage teilnehmen.", + "takeSurvey": "An Umfrage teilnehmen", + "remindLater": "Später erinnern", + "neverAgain": "Nicht mehr anzeigen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json new file mode 100644 index 0000000000000..b8a1db0f78fd4 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "Keine übereinstimmenden Aufgaben" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json index 272bcf769ea51..5c23eff8b3c34 100644 --- a/i18n/deu/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tasks", "tasksAriaLabel": "Name einer neu zu startenden Aufgabe eingeben", "noTasksMatching": "Keine übereinstimmenden Aufgaben", "noTasksFound": "Keine neu zu startenden Aufgaben gefunden." diff --git a/i18n/deu/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json index 7add7130d906c..6a58cd9cf4ca2 100644 --- a/i18n/deu/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tasks", "tasksAriaLabel": "Geben Sie den Namen des auszuführenden Tasks ein.", "noTasksMatching": "Keine übereinstimmenden Tasks", "noTasksFound": "Es wurden keine Tasks gefunden." diff --git a/i18n/deu/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json new file mode 100644 index 0000000000000..b8a1db0f78fd4 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "Keine übereinstimmenden Aufgaben" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index a72e1281b77a6..b78817aed4ca2 100644 --- a/i18n/deu/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -5,8 +5,8 @@ // Do not edit this file. It is machine generated. { "ConfigurationParser.invalidCWD": "Warnung: \"options.cwd\" muss vom Typ \"string\" sein. Der Wert {0} wird ignoriert.\n", - "ConfigurationParser.noShell": "Warnung: Die Shell-Konfiguration wird nur beim Ausführen von Tasks im Terminal unterstützt.", "ConfigurationParser.noargs": "Fehler: Befehlsargumente müssen ein Array aus Zeichenfolgen sein. Angegebener Wert:\n{0}", + "ConfigurationParser.noShell": "Warnung: Die Shell-Konfiguration wird nur beim Ausführen von Tasks im Terminal unterstützt.", "ConfigurationParser.noName": "Fehler: Der Problemabgleich im Deklarationsbereich muss einen Namen besitzen:\n{0}\n", "ConfigurationParser.unknownMatcherKind": "Warnung: Der definierte Problemabgleich ist unbekannt. Die folgenden Typen werden unterstützt: string | ProblemMatcher | (string | ProblemMatcher)[].\n{0}\n", "ConfigurationParser.invalidVaraibleReference": "Fehler: Ungültiger ProblemMatcher-Verweis: {0}\n", diff --git a/i18n/deu/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json index cd80eb864b231..9ff4103430b77 100644 --- a/i18n/deu/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "tsc.config": "Kompiliert ein TypeScript-Projekt.", - "tsc.watch": "Kompiliert ein TypeScript-Projekt im Überwachungsmodus.", "dotnetCore": "Führt den .NET Core-Buildbefehl aus.", "msbuild": "Führt das Buildziel aus.", "externalCommand": "Ein Beispiel für das Ausführen eines beliebigen externen Befehls.", diff --git a/i18n/deu/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json index 386f8b115b1ed..0570db2cdce1b 100644 --- a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json @@ -7,6 +7,7 @@ "JsonSchema.options": "Weitere Befehlsoptionen", "JsonSchema.options.cwd": "Das aktuelle Arbeitsverzeichnis des ausgeführten Programms oder Skripts. Wenn keine Angabe erfolgt, wird das aktuelle Arbeitsbereich-Stammverzeichnis des Codes verwendet.", "JsonSchema.options.env": "Die Umgebung des ausgeführten Programms oder der Shell. Wenn keine Angabe erfolgt, wird Umgebung des übergeordneten Prozesses verwendet.", + "JsonSchema.shellConfiguration": "Konfiguriert die zu verwendende Shell.", "JsonSchema.shell.executable": "Die zu verwendende Shell.", "JsonSchema.shell.args": "Die Shell-Argumente.", "JsonSchema.command": "Der auszuführende Befehl. Es kann sich um ein externes Programm oder einen Shellbefehl handeln.", diff --git a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json index ce023819c120a..1bfe4d70cd96d 100644 --- a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json @@ -5,6 +5,8 @@ // Do not edit this file. It is machine generated. { "JsonSchema.version": "Die Versionsnummer der Konfiguration.", + "JsonSchema._runner": "Die Ausführung ist abgestuft. Verwenden Sie die offizielle Ausführungseigenschaft.", + "JsonSchema.runner": "Definiert, ob die Aufgabe als Prozess ausgeführt wird, und die Ausgabe wird im Ausgabefenster oder innerhalb des Terminals angezeigt.", "JsonSchema.windows": "Windows-spezifische Befehlskonfiguration", "JsonSchema.mac": "Mac-spezifische Befehlskonfiguration", "JsonSchema.linux": "Linux-spezifische Befehlskonfiguration", diff --git a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json index e52c61e82c75a..701e94916a073 100644 --- a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -4,11 +4,16 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "JsonSchema.shell": "Gibt an, ob der Befehl ein Shellbefehl oder ein externes Programm ist. Wenn keine Angabe erfolgt, ist der Standardwert \"false\".", + "JsonSchema.tasks.dependsOn.string": "Eine weitere Aufgabe, von der diese Aufgabe abhängt.", + "JsonSchema.tasks.dependsOn.array": "Die anderen Aufgaben, von denen diese Aufgabe abhängt.", + "JsonSchema.tasks.type": "Definiert, ob die Aufgabe als Prozess oder als Befehl innerhalb einer Shell ausgeführt wird. Standardmäßig wird sie als Prozess ausgeführt.", "JsonSchema.version": "Die Versionsnummer der Konfiguration.", + "JsonSchema.tasks.taskName": "Der Name des Tasks.", + "JsonSchema.tasks.background": "Ob die ausgeführte Aufgabe weiterhin besteht und im Hintergrund ausgeführt wird.", + "JsonSchema.tasks.promptOnClose": "Ob der Benutzer aufgefordert wird, wenn VS Code bei einer aktuell ausgeführten Aufgabe geschlossen wird.", + "JsonSchema.tasks.matchers": "Die zu verwendenden Problemabgleicher. Es kann sich um eine Zeichenfolge, eine Problemabgleicherdefinition oder ein Array aus Zeichenfolgen und Problemabgleichern handeln.", "JsonSchema.windows": "Windows-spezifische Befehlskonfiguration", "JsonSchema.mac": "Mac-spezifische Befehlskonfiguration", - "JsonSchema.linux": "Linux-spezifische Befehlskonfiguration", - "JsonSchema.shell": "Gibt an, ob der Befehl ein Shellbefehl oder ein externes Programm ist. Wenn keine Angabe erfolgt, ist der Standardwert \"false\".", - "JsonSchema.tasks.dependsOn.string": "Eine weitere Aufgabe, von der diese Aufgabe abhängt.", - "JsonSchema.tasks.dependsOn.array": "Die anderen Aufgaben, von denen diese Aufgabe abhängt." + "JsonSchema.linux": "Linux-spezifische Befehlskonfiguration" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 5eb77bdab0b95..a468bab4cb752 100644 --- a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -9,6 +9,7 @@ "ConfigureTaskRunnerAction.quickPick.template": "Taskausführung auswählen", "ConfigureTaskRunnerAction.autoDetecting": "Tasks für {0} werden automatisch erkannt.", "ConfigureTaskRunnerAction.autoDetect": "Fehler bei der automatischen Erkennung des Tasksystems. Die Standardvorlage wird verwendet. Einzelheiten finden Sie in der Taskausgabe.", + "ConfigureTaskRunnerAction.autoDetectError": "Bei der automatischen Erkennung des Tasksystems sind Fehler aufgetreten. Einzelheiten finden Sie in der Taskausgabe.", "ConfigureTaskRunnerAction.failed": "Die Datei \"tasks.json\" kann nicht im Ordner \".vscode\" erstellt werden. Einzelheiten finden Sie in der Taskausgabe.", "ConfigureTaskRunnerAction.label": "Taskausführung konfigurieren", "ConfigureBuildTaskAction.label": "Buildtask konfigurieren", @@ -18,10 +19,11 @@ "manyMarkers": "mehr als 99", "tasks": "Aufgaben", "TaskSystem.noHotSwap": "Zum Ändern des Aufgabenausführungsmoduls muss VS Code neu gestartet werden. Die Änderung wird ignoriert.", - "TaskService.noBuildTask": "Keine Buildaufgabe definiert. Markieren Sie eine Aufgabe mit 'isBuildCommand' in der tasks.json-Datei.", - "TaskService.noTestTask": "Keine Testaufgabe definiert. Markieren Sie eine Aufgabe mit 'isTestCommand' in der tasks.json-Datei.", + "TaskService.noBuildTask1": "Keine Buildaufgabe definiert. Markieren Sie eine Aufgabe mit 'isBuildCommand' in der tasks.json-Datei.", + "TaskService.noTestTask1": "Keine Testaufgabe definiert. Markieren Sie eine Aufgabe mit 'isTestCommand' in der tasks.json-Datei.", "TaskServer.noTask": "Die angeforderte auszuführende Aufgabe {0} wurde nicht gefunden.", - "TaskSystem.activeSame": "Der Task ist bereits aktiv und im Überwachungsmodus. Um den Task zu beenden, verwenden Sie \"F1 > Task beenden\".", + "customizeParseErrors": "Die aktuelle Aufgabenkonfiguration weist Fehler auf. Beheben Sie die Fehler, bevor Sie eine Aufgabe anpassen.", + "moreThanOneBuildTask": "In \"tasks.json\" sind mehrere Buildaufgaben definiert. Die erste wird ausgeführt.\n", "TaskSystem.active": "Eine aktive Aufgabe wird bereits ausgeführt. Beenden Sie diese, bevor Sie eine andere Aufgabe ausführen.", "TaskSystem.restartFailed": "Fehler beim Beenden und Neustarten der Aufgabe \"{0}\".", "TaskSystem.configurationErrors": "Fehler: Die angegebene Aufgabenkonfiguration weist Validierungsfehler auf und kann nicht verwendet werden. Beheben Sie zuerst die Fehler.", @@ -30,17 +32,14 @@ "TaskSystem.terminateTask": "&&Task beenden", "TaskSystem.noProcess": "Der gestartete Task ist nicht mehr vorhanden. Wenn der Task Hintergrundprozesse erzeugt hat, kann das Beenden von VS Code ggf. zu verwaisten Prozessen führen. Starten Sie den letzten Hintergrundprozess mit einer wait-Kennzeichnung, um dies zu vermeiden.", "TaskSystem.exitAnyways": "&&Trotzdem beenden", - "TerminateAction.label": "Ausgeführten Task beenden", + "TerminateAction.label": "Aufgabe beenden", "TaskSystem.unknownError": "Fehler beim Ausführen eines Tasks. Details finden Sie im Taskprotokoll.", "TaskService.noWorkspace": "Aufgaben sind nur für einen Arbeitsbereichsordner verfügbar.", "TerminateAction.noProcess": "Der gestartete Prozess ist nicht mehr vorhanden. Wenn der Task Hintergrundtasks erzeugt hat, kann das Beenden von VS Code ggf. zu verwaisten Prozessen führen.", "TerminateAction.failed": "Fehler beim Beenden des ausgeführten Tasks.", "ShowLogAction.label": "Taskprotokoll anzeigen", "RunTaskAction.label": "Task ausführen", - "RestartTaskAction.label": "Task neu starten", "BuildAction.label": "Buildtask ausführen", "TestAction.label": "Testtask ausführen", - "quickOpen.task": "Task ausführen", - "quickOpen.terminateTask": "Task beenden", - "quickOpen.restartTask": "Task neu starten" + "quickOpen.task": "Task ausführen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index a619f8880ba7b..0ad146b37850f 100644 --- a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -6,5 +6,7 @@ { "TerminalTaskSystem.unknownError": "Unbekannter Fehler beim Ausführen eines Tasks. Details finden Sie im Taskausgabeprotokoll.", "TerminalTaskSystem.terminalName": "Aufgabe - {0}", - "TerminalTaskSystem": "Ein Shell-Befehl kann nicht auf einem UNC-Laufwerk ausgeführt werden." + "reuseTerminal": "Das Terminal wird von Aufgaben wiederverwendet, drücken Sie zum Schließen eine beliebige Taste.", + "TerminalTaskSystem": "Ein Shell-Befehl kann nicht auf einem UNC-Laufwerk ausgeführt werden.", + "unkownProblemMatcher": "Der Problemabgleicher {0} kann nicht aufgelöst werden. Der Abgleicher wird ignoriert." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json index 8a66033683fd7..b6c2bea0eab6b 100644 --- a/i18n/deu/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json @@ -7,5 +7,6 @@ "TaskRunnerSystem.unknownError": "Unbekannter Fehler beim Ausführen eines Tasks. Details finden Sie im Taskausgabeprotokoll.", "TaskRunnerSystem.watchingBuildTaskFinished": "\nDie Überwachung der Buildtasks wurde beendet.", "TaskRunnerSystem.childProcessError": "Failed to launch external program {0} {1}.", - "TaskRunnerSystem.cancelRequested": "\nDer Task \"{0}\" wurde durch eine Benutzeranforderung beendet." + "TaskRunnerSystem.cancelRequested": "\nDer Task \"{0}\" wurde durch eine Benutzeranforderung beendet.", + "unkownProblemMatcher": "Der Problemabgleicher {0} kann nicht aufgelöst werden. Der Abgleicher wird ignoriert." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json new file mode 100644 index 0000000000000..b78817aed4ca2 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ConfigurationParser.invalidCWD": "Warnung: \"options.cwd\" muss vom Typ \"string\" sein. Der Wert {0} wird ignoriert.\n", + "ConfigurationParser.noargs": "Fehler: Befehlsargumente müssen ein Array aus Zeichenfolgen sein. Angegebener Wert:\n{0}", + "ConfigurationParser.noShell": "Warnung: Die Shell-Konfiguration wird nur beim Ausführen von Tasks im Terminal unterstützt.", + "ConfigurationParser.noName": "Fehler: Der Problemabgleich im Deklarationsbereich muss einen Namen besitzen:\n{0}\n", + "ConfigurationParser.unknownMatcherKind": "Warnung: Der definierte Problemabgleich ist unbekannt. Die folgenden Typen werden unterstützt: string | ProblemMatcher | (string | ProblemMatcher)[].\n{0}\n", + "ConfigurationParser.invalidVaraibleReference": "Fehler: Ungültiger ProblemMatcher-Verweis: {0}\n", + "ConfigurationParser.noTaskName": "Fehler: Tasks müssen eine Eigenschaft \"TaskName\" angeben. Der Task wird ignoriert.\n{0}\n", + "taskConfiguration.shellArgs": "Warnung: Die Aufgabe \"{0}\" ist ein Shellbefehl, und der Befehlsname oder eines seiner Argumente enthält Leerzeichen ohne Escapezeichen. Führen Sie Argumente im Befehl zusammen, um eine korrekte Angabe der Befehlszeile sicherzustellen.", + "taskConfiguration.noCommandOrDependsOn": "Fehler: Aufgabe \"{0}\" definiert keinen Befehl bzw. keine depondsOn-Eigenschaft. Die Aufgabe wird ignoriert. Die Definition lautet:\n{1}", + "taskConfiguration.noCommand": "Fehler: Aufgabe \"{0}\" definiert keinen Befehl. Die Aufgabe wird ignoriert. Die Definition lautet:\n{1}" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json index 27454dd2e39bd..b89b0239d1c4c 100644 --- a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -16,6 +16,7 @@ "terminal.integrated.fontLigatures": "Steuert, ob Schriftartligaturen im Terminal aktiviert sind.", "terminal.integrated.fontSize": "Steuert den Schriftgrad des Terminals in Pixeln.", "terminal.integrated.lineHeight": "Steuert die Zeilenhöhe für das Terminal. Dieser Wert wird mit dem Schriftgrad des Terminals multipliziert, um die tatsächliche Zeilenhöhe in Pixeln zu erhalten.", + "terminal.integrated.enableBold": "Gibt an, ob Fettdruck im Terminal aktiviert werden soll. Dies muss durch die Terminalshell unterstützt werden.", "terminal.integrated.cursorBlinking": "Steuert, ob der Terminalcursor blinkt.", "terminal.integrated.cursorStyle": "Steuert den Stil des Terminalcursors.", "terminal.integrated.scrollback": "Steuert die maximale Anzahl von Zeilen, die das Terminal im Puffer beibehält.", diff --git a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json index 2b0635fb08d60..2bbcb5a8073ba 100644 --- a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -8,6 +8,7 @@ "workbench.action.terminal.kill": "Aktive Terminalinstanz beenden", "workbench.action.terminal.kill.short": "Terminal beenden", "workbench.action.terminal.copySelection": "Auswahl kopieren", + "workbench.action.terminal.selectAll": "Alles auswählen", "workbench.action.terminal.new": "Neues integriertes Terminal erstellen", "workbench.action.terminal.new.short": "Neues Terminal", "workbench.action.terminal.focus": "Fokus im Terminal", @@ -26,5 +27,8 @@ "workbench.action.terminal.scrollUp": "Nach oben scrollen (Zeile)", "workbench.action.terminal.scrollUpPage": "Nach oben scrollen (Seite)", "workbench.action.terminal.scrollToTop": "Bildlauf nach oben", - "workbench.action.terminal.clear": "Löschen" + "workbench.action.terminal.clear": "Löschen", + "workbench.action.terminal.allowWorkspaceShell": "Shell-Konfiguration des Arbeitsbereichs zulassen", + "workbench.action.terminal.disallowWorkspaceShell": "Verbiete Workspace Shell Konfiguration", + "workbench.action.terminal.rename": "Umbenennen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json index 209097e71ed31..9d4810761f243 100644 --- a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.background": "Die Hintergrundfarbe des Terminals, dies ermöglicht eine unterschiedliche Färbung des Terminals im Panel.", + "terminal.foreground": "Die Vordergrundfarbe des Terminal.", "terminal.ansiColor": "\"{0}\": ANSI-Farbe im Terminal" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json index 1ed48f98d5802..db78986c6f08c 100644 --- a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.integrated.allowWorkspaceShell": "Möchten Sie zulassen, dass {0} (als Arbeitsbereichseinstellung definiert) im Terminal gestartet wird?", "allow": "Allow", "disallow": "Disallow" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json new file mode 100644 index 0000000000000..32db8ee0bd6e9 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Suchen", + "placeholder.find": "Suchen", + "label.previousMatchButton": "Vorherige Übereinstimmung", + "label.nextMatchButton": "Nächste Übereinstimmung", + "label.closeButton": "Schließen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json index 656e6a048aeef..ed2d8c3d2122c 100644 --- a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "terminal.integrated.copySelection.noSelection": "Die Terminalauswahl kann nicht kopiert werden, wenn das Terminal nicht den Fokus besitzt.", "terminal.integrated.exitedWithCode": "Der Terminalprozess wurde mit folgendem Exitcode beendet: {0}", "terminal.integrated.waitOnExit": "Betätigen Sie eine beliebige Taste, um das Terminal zu schließen.", "terminal.integrated.launchFailed": "Fehler beim Starten des Terminalprozessbefehls \"{0}{1}\" (Exitcode: {2})." diff --git a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json index 7a934e07fff01..76adb37bcfb6c 100644 --- a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminalLinkHandler.followLinkAlt": "ALT + Mausklick zum Aufrufen des Links", "terminalLinkHandler.followLinkCmd": "BEFEHLSTASTE + Mausklick zum Aufrufen des Links", "terminalLinkHandler.followLinkCtrl": "STRG + Mausklick zum Aufrufen des Links" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json index 9f48d96248036..558f228c1f18a 100644 --- a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json @@ -7,5 +7,6 @@ "copy": "Kopieren", "createNewTerminal": "Neues Terminal", "paste": "Einfügen", + "selectAll": "Alles auswählen", "clear": "Löschen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 50faf2f175c27..5b38193cdecf0 100644 --- a/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,13 +6,14 @@ { "selectTheme.label": "Farbdesign", "installColorThemes": "Zusätzliche Farbschemas installieren...", - "problemChangingTheme": "Problem beim Festlegen des Designs: {0}", - "themes.selectTheme": "Farbdesign auswählen", + "themes.selectTheme": "Farbdesign auswählen (eine Vorschau wird mit den Tasten NACH OBEN/NACH UNTEN angezeigt)", "selectIconTheme.label": "Dateisymboldesign", "installIconThemes": "Zusätzliche Dateisymbolschemas installieren...", "noIconThemeLabel": "Keine", "noIconThemeDesc": "Dateisymbole deaktivieren", "problemChangingIconTheme": "Problem beim Festlegen des Symboldesigns: {0}", "themes.selectIconTheme": "Dateisymboldesign auswählen", - "preferences": "Einstellungen" + "generateColorTheme.label": "Farbdesign aus aktuellen Einstellungen erstellen", + "preferences": "Einstellungen", + "developer": "Entwickler" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/update/electron-browser/update.i18n.json b/i18n/deu/src/vs/workbench/parts/update/electron-browser/update.i18n.json index 22510793b9c98..511b2ad344bcb 100644 --- a/i18n/deu/src/vs/workbench/parts/update/electron-browser/update.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/update/electron-browser/update.i18n.json @@ -13,7 +13,19 @@ "read the release notes": "Willkommen bei {0} v{1}! Möchten Sie die Hinweise zu dieser Version lesen?", "licenseChanged": "Unsere Lizenzbedingungen haben sich geändert. Bitte lesen Sie die neuen Bedingungen.", "license": "Lizenz lesen", - "updateAvailable": "{0} wird nach dem Neustart aktualisiert.", + "updateIsReady": "Neue Aktualisierung verfügbar.", "thereIsUpdateAvailable": "Ein Update ist verfügbar.", - "noUpdatesAvailable": "Zurzeit sind keine Updates verfügbar." + "updateAvailable": "{0} wird nach dem Neustart aktualisiert.", + "noUpdatesAvailable": "Zurzeit sind keine Updates verfügbar.", + "commandPalette": "Befehlspalette...", + "settings": "Einstellungen", + "keyboardShortcuts": "Tastenkombinationen", + "selectTheme.label": "Farbdesign", + "themes.selectIconTheme.label": "Dateisymboldesign", + "not available": "Aktualisierungen nicht verfügbar", + "checkingForUpdates": "Überprüfen auf Updates...", + "DownloadUpdate": "Verfügbares Update herunterladen", + "DownloadingUpdate": "Das Update wird heruntergeladen...", + "InstallingUpdate": "Update wird installiert...", + "checkForUpdates": "Nach Aktualisierungen suchen..." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/views/browser/views.i18n.json b/i18n/deu/src/vs/workbench/parts/views/browser/views.i18n.json new file mode 100644 index 0000000000000..b7eb39e941ebe --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/views/browser/views.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewToolbarAriaLabel": "{0}-Aktionen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json b/i18n/deu/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json new file mode 100644 index 0000000000000..69d939fd7d16c --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "Ansichten müssen ein Array sein.", + "requirestring": "Die Eigenschaft \"{0}\" ist erforderlich. Sie muss vom Typ \"string\" sein.", + "optstring": "Die Eigenschaft \"{0}\" kann ausgelassen werden oder muss vom Typ \"string\" sein.", + "vscode.extension.contributes.view.id": "Bezeichner der Ansicht. Damit können Sie einen Datenanbieter über die API \"vscode.window.registerTreeDataProviderForView\" registrieren. Er dient auch zum Aktivieren Ihrer Erweiterung, indem Sie das Ereignis \"onView:${id}\" für \"activationEvents\" registrieren.", + "vscode.extension.contributes.view.name": "Der visuell lesbare Name der Ansicht. Wird angezeigt", + "vscode.extension.contributes.views": "Trägt Ansichten zum Editor bei.", + "views.explorer": "Explorer-Ansicht", + "locationId.invalid": "{0}\" ist kein gültiger Ansichtenspeicherort" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json b/i18n/deu/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json index 2a4569f34320c..db8fc1c5e7e4f 100644 --- a/i18n/deu/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json @@ -14,10 +14,6 @@ "watermark.toggleTerminal": "Terminal umschalten", "watermark.findInFiles": "In Dateien suchen", "watermark.startDebugging": "Debuggen starten", - "watermark.selectTheme": "Design ändern", - "watermark.selectKeymap": "Tastenzuordnung ändern", - "watermark.keybindingsReference": "Tastaturreferenz", - "watermark.openGlobalKeybindings": "Tastenkombinationen", "watermark.unboundCommand": "Ungebunden", "workbenchConfigurationTitle": "Workbench", "tips.enabled": "Wenn diese Option aktiviert ist, werden Tipps zu Wasserzeichen angezeigt, wenn kein Editor geöffnet ist." diff --git a/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 96b687256c67e..89fcf6e01edf2 100644 --- a/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -4,40 +4,40 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "welcomePage.vscode": "Visual Studio-Code", + "welcomePage.vscode": "Visual Studio Code", "welcomePage.editingEvolved": "Fortschrittliche Bearbeitung", "welcomePage.start": "Starten", "welcomePage.newFile": "Neue Datei", "welcomePage.openFolder": "Ordner öffnen...", "welcomePage.cloneGitRepository": "Git-Repository klonen...", "welcomePage.recent": "Zuletzt verwendet", + "welcomePage.moreRecent": "Weitere Informationen...", "welcomePage.noRecentFolders": "Keine kürzlich verwendeten Ordner", "welcomePage.help": "Hilfe", - "welcomePage.productDocumentation": "Produktdokumentation", + "welcomePage.keybindingsCheatsheet": "Druckbare Tastaturübersicht", "welcomePage.introductoryVideos": "Einführungsvideos", + "welcomePage.productDocumentation": "Produktdokumentation", "welcomePage.gitHubRepository": "GitHub-Repository", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "Willkommensseite beim Start anzeigen", - "welcomePage.quickLinks": "Direktlinks", - "welcomePage.interactivePlayground": "Interaktiver Playground", - "welcomePage.interactivePlaygroundDescription": "Testen Sie die wichtigsten Editorfunktionen in einer kurzen exemplarischen Vorgehensweise.", - "welcomePage.interfaceOverview": "Überblick über die Schnittstelle", - "welcomePage.interfaceOverviewDescription": "Erhalten Sie eine visuelle Überlagerung, die die wichtigsten Komponenten der Benutzeroberfläche hervorhebt.", + "welcomePage.customize": "Anpassen", + "welcomePage.installExtensionPacks": "Tools und Sprachen", + "welcomePage.installExtensionPacksDescription": "Unterstützung für {0} und {1} installieren", + "welcomePage.moreExtensions": "mehr", + "welcomePage.installKeymapDescription": "Tastenkombinationen installieren", + "welcomePage.installKeymapExtension": "Installieren Sie die Tastenkombinationen von {0} und {1}.", + "welcomePage.others": "Andere", "welcomePage.colorTheme": "Farbdesign", "welcomePage.colorThemeDescription": "Passen Sie das Aussehen des Editors und Ihres Codes an Ihre Wünsche an.", + "welcomePage.learn": "Lernen", + "welcomePage.showCommands": "Alle Befehle suchen und ausführen", + "welcomePage.interfaceOverview": "Überblick über die Schnittstelle", + "welcomePage.interfaceOverviewDescription": "Erhalten Sie eine visuelle Überlagerung, die die wichtigsten Komponenten der Benutzeroberfläche hervorhebt.", + "welcomePage.interactivePlayground": "Interaktiver Playground", + "welcomePage.interactivePlaygroundDescription": "Testen Sie die wichtigsten Editorfunktionen in einer kurzen exemplarischen Vorgehensweise.", + "welcomePage.quickLinks": "Direktlinks", "welcomePage.keybindingsReference": "Referenz für Tastenkombinationen", "welcomePage.keybindingsReferenceDescription": "Eine druckbare PDF mit den wichtigsten Tastenkombinationen", - "welcomePage.showCommands": "Alle Befehle suchen und ausführen", - "welcomePage.showCommandsDescription": "Über die Einstellungen ({0}) können Sie Befehle schnell suchen und darauf zugreifen.", "welcomePage.configureSettings": "Einstellungen konfigurieren", - "welcomePage.configureSettingsDescription": "Optimieren Sie die Einstellungen, um VS Code bestmöglich zu nutzen.", - "welcomePage.installKeymapDescription": "Tastenkombinationen installieren", - "welcomePage.installKeymap": "Installieren Sie die Tastenkombinationen von {0} {1}, {2} und {3}.", - "welcomePage.vim": "Vim", - "welcomePage.vimCurrent": "Vim (aktuell)", - "welcomePage.sublime": "Sublime", - "welcomePage.sublimeCurrent": "Sublime (aktuell)", - "welcomePage.atom": "Atom", - "welcomePage.atomCurrent": "Atom (aktuell)", - "welcomePage.others": "Andere" + "welcomePage.configureSettingsDescription": "Optimieren Sie die Einstellungen, um VS Code bestmöglich zu nutzen." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json index f83bfd761c786..bb8cc4c2b8a4d 100644 --- a/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "workbenchConfigurationTitle": "Workbench", - "welcomePage.enabled": "Wenn diese Option aktiviert ist, wird die Willkommensseite beim Start angezeigt.", "help": "Hilfe" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index ce4f274eb9024..99cd19e8bb573 100644 --- a/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,11 +5,32 @@ // Do not edit this file. It is machine generated. { "welcomePage": "Willkommen", - "welcome.title": "Willkommen", + "welcomePage.javaScript": "JavaScript", + "welcomePage.typeScript": "TypeScript", + "welcomePage.python": "Python", + "welcomePage.php": "PHP", + "welcomePage.docker": "Docker", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", + "welcomePage.extensionPackAlreadyInstalled": "Unterstützung für {0} ist bereits installiert.", + "welcomePage.willReloadAfterInstallingExtensionPack": "Nach dem Installieren zusätzlicher Unterstützung für {0} wird das Fenster neu geladen.", + "welcomePage.installingExtensionPack": "Zusätzliche Unterstützung für {0} wird installiert...", + "welcomePage.extensionPackNotFound": "Unterstützung für {0} mit der ID {1} wurde nicht gefunden.", "welcomePage.keymapAlreadyInstalled": "Die {0} Tastenkombinationen sind bereits installiert.", "welcomePage.willReloadAfterInstallingKeymap": "Das Fenster wird nach der Installation der {0}-Tastaturbefehle neu geladen.", - "ok": "OK", "welcomePage.installingKeymap": "Die {0}-Tastenkombinationen werden installiert...", "welcomePage.keymapNotFound": "Die {0} Tastenkombinationen mit der ID {1} wurden nicht gefunden.", - "cancel": "Abbrechen" + "welcome.title": "Willkommen", + "welcomePage.openFolderWithPath": "Ordner {0} mit Pfad {1} öffnen", + "welcomePage.extensionListSeparator": ",", + "welcomePage.installKeymap": "Tastenzuordnung {0} öffnen", + "welcomePage.installExtensionPack": "Zusätzliche Unterstützung für {0} installieren", + "welcomePage.installedKeymap": "Die Tastaturzuordnung {0} ist bereits installiert.", + "welcomePage.installedExtensionPack": "Unterstützung für {0} ist bereits installiert.", + "ok": "OK", + "details": "Details", + "cancel": "Abbrechen", + "welcomePage.buttonBackground": "Hintergrundfarbe für die Schaltflächen auf der Willkommensseite.", + "welcomePage.buttonHoverBackground": "Hoverhintergrundfarbe für die Schaltflächen auf der Willkommensseite." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/deu/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json index 72f6389099983..f8c9526c03a23 100644 --- a/i18n/deu/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "walkThrough.unboundCommand": "Ungebunden" + "walkThrough.unboundCommand": "Ungebunden", + "walkThrough.gitNotFound": "Git scheint auf Ihrem System nicht installiert zu sein.", + "walkThrough.embeddedEditorBackground": "Hintergrundfarbe für die eingebetteten Editoren im Interaktiven Playground." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/services/configuration/node/configuration.i18n.json b/i18n/deu/src/vs/workbench/services/configuration/node/configuration.i18n.json new file mode 100644 index 0000000000000..57926d3c88c40 --- /dev/null +++ b/i18n/deu/src/vs/workbench/services/configuration/node/configuration.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.configuration": "Trägt Konfigurationseigenschaften bei.", + "vscode.extension.contributes.configuration.title": "Eine Zusammenfassung der Einstellungen. Diese Bezeichnung wird in der Einstellungsdatei als trennender Kommentar verwendet.", + "vscode.extension.contributes.configuration.properties": "Die Beschreibung der Konfigurationseigenschaften.", + "invalid.type": "Wenn eine Festlegung erfolgt, muss \"configuration.type\" auf \"object\" festgelegt werden.", + "invalid.title": "configuration.title muss eine Zeichenfolge sein.", + "vscode.extension.contributes.defaultConfiguration": "Trägt zu Konfigurationeinstellungen des Standard-Editors für die jeweilige Sprache bei.", + "invalid.properties": "\"configuration.properties\" muss ein Objekt sein." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/deu/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index 58ed1dbea5cba..8f33c300c01e8 100644 --- a/i18n/deu/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/deu/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -4,11 +4,14 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "open": "Einstellungen öffnen", + "close": "Schließen", + "saveAndRetry": "Änderungen Speichern und Wiederholen", "errorUnknownKey": "Die Konfigurationsdatei kann nicht geschrieben werden (unbekannter Schlüssel).", "errorInvalidTarget": "In die Konfigurationsdatei kann nicht geschrieben werden (ungültiges Ziel).", - "errorNoWorkspaceOpened": "Einstellungen können nicht geschrieben werden, weil kein Ordner geöffnet ist. Öffnen Sie zuerst einen Ordner, und versuchen Sie es erneut.", - "errorInvalidConfiguration": "Einstellungen können nicht geschrieben werden. Öffnen Sie **Benutzereinstellungen**, um Fehler/Warnungen in der Datei zu korrigieren, und versuchen Sie es erneut.", - "errorInvalidConfigurationWorkspace": "Einstellungen können nicht geschrieben werden. Öffnen Sie **Arbeitsbereichseinstellungen**, um Fehler/Warnungen in der Datei zu korrigieren, und versuchen Sie es erneut.", - "errorConfigurationFileDirty": "Einstellungen können nicht geschrieben werden, weil die Datei geändert wurde. Speichern Sie die Datei **Benutzereinstellungen\", und versuchen Sie es erneut.", - "errorConfigurationFileDirtyWorkspace": "Einstellungen können nicht geschrieben werden, weil die Datei geändert wurde. Speichern Sie die Datei **Arbeitsbereichseinstellungen\", und versuchen Sie es erneut." + "errorNoWorkspaceOpened": "In die Einstellungen kann nicht geschrieben werden, weil kein Ordner geöffnet ist. Öffnen Sie zuerst einen Ordner, und versuchen Sie es noch mal.", + "errorInvalidConfiguration": "In die Einstellungen kann nicht geschrieben werden. Öffnen Sie **Benutzereinstellungen**, um Fehler/Warnungen in der Datei zu korrigieren, und versuchen Sie es noch mal.", + "errorInvalidConfigurationWorkspace": "In die Einstellungen kann nicht geschrieben werden. Öffnen Sie die **Arbeitsbereichseinstellungen**, um Fehler/Warnungen in der Datei zu korrigieren, und versuchen Sie es noch mal.", + "errorConfigurationFileDirty": "In die Einstellungen kann nicht geschrieben werden, weil die Datei geändert wurde. Speichern Sie die Datei **Benutzereinstellungen**, und versuchen Sie es noch mal.", + "errorConfigurationFileDirtyWorkspace": "In die Einstellungen kann nicht geschrieben werden, weil die Datei geändert wurde. Speichern Sie die Datei **Arbeitsbereichseinstellungen**, und versuchen Sie es noch mal." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json b/i18n/deu/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json new file mode 100644 index 0000000000000..f7a2d1f0c3ff4 --- /dev/null +++ b/i18n/deu/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Telemetrie", + "telemetry.enableCrashReporting": "Aktiviert Absturzberichte, die an Microsoft gesendet werden.\nDiese Option erfordert einen Neustart, damit sie wirksam wird." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/deu/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index 96626f238f8af..3244f6c7d64b5 100644 --- a/i18n/deu/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/deu/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -8,15 +8,11 @@ "requirestring": "Die Eigenschaft \"{0}\" ist erforderlich. Sie muss vom Typ \"string\" sein.", "optstring": "Die Eigenschaft \"{0}\" kann ausgelassen werden oder muss vom Typ \"string\" sein.", "vscode.extension.contributes.keybindings.command": "Der Bezeichner des Befehls, der ausgeführt werden soll, wenn die Tastenbindung ausgelöst wird.", - "vscode.extension.contributes.keybindings.key": "Der Schlüssel oder die Schlüsselsequenz (separate Schlüssel mit Pluszeichen und Sequenzen mit Leerzeichen, z. B. STRG+O und STRG+L L für einen Akkord).", "vscode.extension.contributes.keybindings.mac": "Der Mac-spezifische Schlüssel oder die Schlüsselsequenz.", "vscode.extension.contributes.keybindings.linux": "Der Linux-spezifische Schlüssel oder die Schlüsselsequenz.", "vscode.extension.contributes.keybindings.win": "Der Windows-spezifische Schlüssel oder die Schlüsselsequenz.", "vscode.extension.contributes.keybindings.when": "Die Bedingung, wann der Schlüssel aktiv ist.", "vscode.extension.contributes.keybindings": "Trägt Tastenbindungen bei.", - "openDocumentation": "Weitere Informationen", - "keybindingMigration.ok": "OK", - "keybindingMigration.prompt": "Für Ihr Tastaturlayout haben sich einige Tastenkombinationen geändert.", "invalid.keybindings": "Ungültige Angabe \"contributes.{0}\": {1}", "unboundCommands": "Die folgenden weiteren Befehle sind verfügbar: ", "keybindings.json.title": "Tastenbindungskonfiguration", diff --git a/i18n/deu/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json b/i18n/deu/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json index 8579de366f44f..1fcfe6d574115 100644 --- a/i18n/deu/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json +++ b/i18n/deu/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json @@ -4,6 +4,15 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "vscode.extension.contributes.languages": "Contributes-Sprachdeklarationen", + "vscode.extension.contributes.languages.id": "Die ID der Sprache.", + "vscode.extension.contributes.languages.aliases": "Namealiase für die Sprache.", + "vscode.extension.contributes.languages.extensions": "Dateierweiterungen, die der Sprache zugeordnet sind.", + "vscode.extension.contributes.languages.filenames": "Dateinamen, die der Sprache zugeordnet sind.", + "vscode.extension.contributes.languages.filenamePatterns": "Dateinamen-Globmuster, die Sprache zugeordnet sind.", + "vscode.extension.contributes.languages.mimetypes": "MIME-Typen, die der Sprache zugeordnet sind.", + "vscode.extension.contributes.languages.firstLine": "Ein regulärer Ausdruck, der mit der ersten Zeile einer Datei der Sprache übereinstimmt.", + "vscode.extension.contributes.languages.configuration": "Ein relativer Pfad zu einer Datei mit Konfigurationsoptionen für die Sprache.", "invalid": "Ungültige Angabe \"contributes.{0}\". Es wurde ein Array erwartet.", "invalid.empty": "Leerer Wert für \"contributes.{0}\".", "require.id": "Die Eigenschaft \"{0}\" ist erforderlich. Sie muss vom Typ \"string\" sein.", diff --git a/i18n/deu/src/vs/workbench/services/progress/browser/progressService2.i18n.json b/i18n/deu/src/vs/workbench/services/progress/browser/progressService2.i18n.json new file mode 100644 index 0000000000000..6db7d6aae514a --- /dev/null +++ b/i18n/deu/src/vs/workbench/services/progress/browser/progressService2.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "progress.text": "{0} - {1}", + "progress.title": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json b/i18n/deu/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json new file mode 100644 index 0000000000000..4701a601deebf --- /dev/null +++ b/i18n/deu/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.grammars": "Trägt TextMate-Tokenizer bei.", + "vscode.extension.contributes.grammars.language": "Der Sprachbezeichner, für den diese Syntax beigetragen wird.", + "vscode.extension.contributes.grammars.scopeName": "Der TextMate-Bereichsname, der von der tmLanguage-Datei verwendet wird.", + "vscode.extension.contributes.grammars.path": "Der Pfad der tmLanguage-Datei. Der Pfad ist relativ zum Extensionordner und beginnt normalerweise mit \". /syntaxes/\".", + "vscode.extension.contributes.grammars.embeddedLanguages": "Eine Zuordnung zwischen Bereichsname und Sprach-ID, wenn diese Grammatik eingebettete Sprachen enthält.", + "vscode.extension.contributes.grammars.injectTo": "Die Liste der Sprachbereichsnamen, in die diese Grammatik injiziert wird." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json b/i18n/deu/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json new file mode 100644 index 0000000000000..b97a9d9bdae69 --- /dev/null +++ b/i18n/deu/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid.language": "Unbekannte Sprache in \"contributes.{0}.language\". Bereitgestellter Wert: {1}", + "invalid.scopeName": "In \"contributes.{0}.scopeName\" wurde eine Zeichenfolge erwartet. Bereitgestellter Wert: {1}", + "invalid.path.0": "Expected string in `contributes.{0}.path`. Provided value: {1}", + "invalid.injectTo": "Ungültiger Wert in \"contributes.{0}.injectTo\". Es muss sich um ein Array von Sprachbereichsnamen handeln. Bereitgestellter Wert: {1}", + "invalid.embeddedLanguages": "Ungültiger Wert in \"contributes.{0}.embeddedLanguages\". Muss eine Objektzuordnung von Bereichsname zu Sprache sein. Angegebener Wert: {1}", + "invalid.path.1": "Es wurde erwartet, dass \"contributes.{0}.path\" ({1}) im Ordner ({2}) der Erweiterung enthalten ist. Dies führt ggf. dazu, dass die Erweiterung nicht portierbar ist.", + "no-tm-grammar": "Keine TM-Grammatik für diese Sprache registriert." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json b/i18n/deu/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json index 125841ae8560e..132f19f4c7b82 100644 --- a/i18n/deu/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json +++ b/i18n/deu/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json @@ -6,5 +6,6 @@ { "schema.colors": "Farben für die Syntaxhervorhebung", "schema.properties.name": "Beschreibung der Regel", - "schema.fontStyle": "Schriftschnitt der Regel: kursiv, fett und unterstrichen (einzeln oder in Kombination)" + "schema.fontStyle": "Schriftschnitt der Regel: kursiv, fett und unterstrichen (einzeln oder in Kombination)", + "schema.tokenColors.path": "Pfad zu einer tmTheme-Designdatei (relativ zur aktuellen Datei)" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/deu/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json index 0e7b162df04b4..2d04a1d985b58 100644 --- a/i18n/deu/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json +++ b/i18n/deu/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -5,8 +5,9 @@ // Do not edit this file. It is machine generated. { "error.cannotparsejson": "Probleme beim Analysieren der JSON-Designdatei: {0}", - "error.invalidformat": "Problem beim Analysieren der JSON-Designdatei: {0}. \"tokenColors\" und \"colors\" wird erwartet.", - "error.plist.invalidformat": "Probleme beim Analysieren der Designdatei: {0}. \"settings\" ist kein Array", - "error.cannotparse": "Probleme beim Analysieren der Designdatei: {0}", - "error.cannotload": "Probleme beim Laden der Designdatei {0}: {1}" + "error.invalidformat.colors": "Probleme beim Analysieren der Farbdesigndatei: {0}. Die Eigenschaft \"colors\" ist nicht vom Typ \"object\".", + "error.invalidformat.tokenColors": "Probleme beim Analysieren der Farbdesigndatei: {0}. Die Eigenschaft \"tokenColors\" muss entweder ein Array sein, das Farben angibt, oder ein Pfad zu einer TextMate-Designdatei.", + "error.plist.invalidformat": "Probleme beim Analysieren der tmTheme-Designdatei: {0}. \"settings\" ist kein Array", + "error.cannotparse": "Probleme beim Analysieren der tmTheme-Designdatei: {0}", + "error.cannotload": "Probleme beim Laden der tmTheme-Designdatei {0}: {1}" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/deu/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index 1f3a72388129a..ce985f40f33f8 100644 --- a/i18n/deu/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/deu/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -17,14 +17,15 @@ "error.cannotloadtheme": "Unable to load {0}: {1}", "reqarray": "Extension point `{0}` must be an array.", "reqpath": "In \"contributes.{0}.path\" wurde eine Zeichenfolge erwartet. Bereitgestellter Wert: {1}", - "invalid.path.1": "Es wurde erwartet, dass \"contributes.{0}.path\" ({1}) im Ordner ({2}) der Extension enthalten ist. Dies führt ggf. dazu, dass die Extension nicht portierbar ist.", + "invalid.path.1": "Es wurde erwartet, dass \"contributes.{0}.path\" ({1}) im Ordner ({2}) der Erweiterung enthalten ist. Dies führt ggf. dazu, dass die Erweiterung nicht portierbar ist.", "reqid": "In \"contributes.{0}.id\" wurde eine Zeichenfolge erwartet. Bereitgestellter Wert: {1}", "error.cannotloadicontheme": "Unable to load {0}", "error.cannotparseicontheme": "Problems parsing file icons file: {0}", "colorTheme": "Specifies the color theme used in the workbench.", "colorThemeError": "Theme is unknown or not installed.", - "iconTheme": "Specifies the icon theme used in the workbench.", "noIconThemeDesc": "No file icons", "iconThemeError": "File icon theme is unknown or not installed.", - "workbenchColors": "Überschreibt Farben aus dem derzeit ausgewählte Farbdesign. Diese Einstellung ist experimentell, da sich die Namen der Farben in der nächsten Version ändern." + "workbenchColors": "Überschreibt Farben aus dem derzeit ausgewählte Farbdesign.", + "workbenchColors.deprecated": "Diese Einstellung ist nicht mehr experimentell und wurde in \"workbench.colorCustomizations\" umbenannt.", + "workbenchColors.deprecatedDescription": "Verwenden Sie stattdessen \"workbench.colorCustomizations\"." } \ No newline at end of file diff --git a/i18n/esn/extensions/configuration-editing/out/extension.i18n.json b/i18n/esn/extensions/configuration-editing/out/extension.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/extensions/configuration-editing/out/extension.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json b/i18n/esn/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json index 306c4211da817..fb4a7aff29173 100644 --- a/i18n/esn/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json +++ b/i18n/esn/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json @@ -7,7 +7,6 @@ "activeEditorShort": "p. ej. myFile.txt", "activeEditorMedium": "e.g. myFolder/myFile.txt", "activeEditorLong": "e.g. /Users/Development/myProject/myFolder/myFile.txt", - "rootName": "p. ej. myProject", "rootPath": "p. ej. /Users/Development/myProject", "appName": "p. ej. VS Code", "dirty": "un indicador con modificaciones si el editor activo tiene modificaciones", diff --git a/i18n/esn/extensions/extension-editing/out/extensionLinter.i18n.json b/i18n/esn/extensions/extension-editing/out/extensionLinter.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/extensions/extension-editing/out/extensionLinter.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/extensions/git/out/askpass-main.i18n.json b/i18n/esn/extensions/git/out/askpass-main.i18n.json index 8b6ad71cd4e6d..1c3a1d90636cd 100644 --- a/i18n/esn/extensions/git/out/askpass-main.i18n.json +++ b/i18n/esn/extensions/git/out/askpass-main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "missOrInvalid": "Faltan las credenciales o no son válidas." +} \ No newline at end of file diff --git a/i18n/esn/extensions/git/out/commands.i18n.json b/i18n/esn/extensions/git/out/commands.i18n.json index 15d16fa77c71e..6ace96fe6d2c1 100644 --- a/i18n/esn/extensions/git/out/commands.i18n.json +++ b/i18n/esn/extensions/git/out/commands.i18n.json @@ -4,10 +4,31 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "tag at": "Etiqueta en {0}", + "remote branch at": "Rama remota en {0}", + "repourl": "URL del repositorio", "parent": "Directorio principal", + "cloning": "Clonando el repositorio GIT...", + "openrepo": "Abrir repositorio", + "proposeopen": "¿Desea abrir el repositorio clonado?", "confirm revert": "¿Está seguro de que desea revertir los cambios seleccionados en {0}?", "revert": "Revertir cambios", + "confirm discard": "¿Está seguro de que quiere descartar los cambios de {0}?", + "confirm discard multiple": "¿Está seguro de que quiere descartar los cambios de {0} archivos?", + "discard": "Descartar cambios", "confirm discard all": "¿Está seguro de que quiere descartar TODOS los cambios? Esta acción es irreversible.", + "discardAll": "Descartar cambios", + "no staged changes": "No hay elementos almacenados provisionalmente.\n\n¿Desea almacenar de forma provisional todos sus cambios y confirmarlos directamente?", + "yes": "Sí", + "always": "Siempre", + "no changes": "No hay cambios para confirmar.", + "commit message": "Mensaje de confirmación", + "provide commit message": "Proporcione un mensaje de confirmación", + "branch name": "Nombre de rama", + "provide branch name": "Especifique un nombre para la rama", + "select branch to delete": "Seleccione una rama para borrar", + "confirm force delete branch": "La rama '{0}' no está completamente fusionada. ¿Borrarla de todas formas?", + "delete branch": "Borrar rama...", "no remotes to pull": "El repositorio no tiene remotos configurados de los que extraer.", "no remotes to push": "El repositorio no tiene remotos configurados en los que insertar.", "nobranch": "Extraiga del repositorio una rama para insertar un remoto.", @@ -18,6 +39,7 @@ "no remotes to publish": "El repositorio no tiene remotos configurados en los que publicar.", "disabled": "GIT está deshabilitado o no se admite en esta área de trabajo", "clean repo": "Limpie el árbol de trabajo del repositorio antes de la desprotección.", + "cant push": " No puede ejecutar la solicitud de inserción remotamente. Solicite un Pull para integrar los cambios.", "git error details": "GIT: {0}", "git error": "Error de GIT", "open git log": "Abrir registro de GIT" diff --git a/i18n/esn/extensions/git/package.i18n.json b/i18n/esn/extensions/git/package.i18n.json index 85e968decdc41..a0af3b336aa12 100644 --- a/i18n/esn/extensions/git/package.i18n.json +++ b/i18n/esn/extensions/git/package.i18n.json @@ -10,11 +10,14 @@ "command.openChange": "Abrir cambios", "command.openFile": "Abrir archivo", "command.stage": "Almacenar cambios provisionalmente", + "command.stageAll": "Almacenar todos los cambios", "command.stageSelectedRanges": "Realizar copia intermedia de los intervalos seleccionados", "command.revertSelectedRanges": "Revertir los intervalos seleccionados", "command.unstage": "Cancelar almacenamiento provisional de los cambios", "command.unstageAll": "Cancelar almacenamiento provisional de todos los cambios", "command.unstageSelectedRanges": "Cancelar almacenamiento provisional de los intervalos seleccionados", + "command.clean": "Descartar cambios", + "command.cleanAll": "Descartar todos los cambios", "command.commit": "Confirmar", "command.commitStaged": "Confirmar almacenados provisionalmente", "command.commitStagedSigned": "Confirmar por etapas (Aprobado)", @@ -23,12 +26,13 @@ "command.undoCommit": "Deshacer última confirmación", "command.checkout": "Desproteger en...", "command.branch": "Crear rama...", + "command.deleteBranch": "Borrar rama...", "command.pull": "Incorporación de cambios", "command.pullRebase": "Incorporación de cambios (fusionar mediante cambio de base)", "command.push": "Insertar", "command.pushTo": "Insertar en...", "command.sync": "Sincronizar", - "command.publish": "Publicar", + "command.publish": "Publicar rama", "command.showOutput": "Mostrar salida de GIT", "config.enabled": "Si GIT está habilitado", "config.path": "Ruta de acceso del ejecutable de GIT", @@ -36,8 +40,9 @@ "config.autofetch": "Si la búsqueda automática está habilitada", "config.enableLongCommitWarning": "Si se debe advertir sobre los mensajes de confirmación largos", "config.confirmSync": "Confirmar antes de sincronizar repositorios GIT", - "config.countBadge": "Controla el contador de señales GIT", - "config.checkoutType": "Controla qué tipo de ramas figuran en la lista", + "config.countBadge": "Controla el contador de insignia de Git. \"Todo\" cuenta todos los cambios. \"Seguimiento\" solamente cuenta los cambios realizados. \"Desactivado\" lo desconecta.", + "config.checkoutType": "Controla el tipo de ramas listadas cuando ejecuta \"Desproteger\". \"Todo\" muetra todas las referencias, \"local\" solamente las ramas locales y \"remoto\" las ramas remotas.", "config.ignoreLegacyWarning": "Ignora las advertencias hereradas de Git", - "config.ignoreLimitWarning": "\nIgnora advertencias cuando se encuentran muchos cambios en un repositorio." + "config.ignoreLimitWarning": "\nIgnora advertencias cuando se encuentran muchos cambios en un repositorio.", + "config.defaultCloneDirectory": "La ubicación predeterminada en la que se clona un repositorio git" } \ No newline at end of file diff --git a/i18n/esn/extensions/gulp/package.i18n.json b/i18n/esn/extensions/gulp/package.i18n.json index 53e22e1765391..b8595f4e95f15 100644 --- a/i18n/esn/extensions/gulp/package.i18n.json +++ b/i18n/esn/extensions/gulp/package.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "config.gulp.autoDetect": "Controla si la detección automática de tareas gulp esrta activada/desactivada. El vsalor predeterminado es \"activada\"." + "config.gulp.autoDetect": "Controla si la detección automática de tareas Gulp esta activada/desactivada. El valor predeterminado es \"activada\"." } \ No newline at end of file diff --git a/i18n/esn/extensions/jake/out/main.i18n.json b/i18n/esn/extensions/jake/out/main.i18n.json new file mode 100644 index 0000000000000..1b387f2707002 --- /dev/null +++ b/i18n/esn/extensions/jake/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "La detección automática de Jake falló con el error: {0}" +} \ No newline at end of file diff --git a/i18n/esn/extensions/jake/package.i18n.json b/i18n/esn/extensions/jake/package.i18n.json new file mode 100644 index 0000000000000..c22d4c52c9202 --- /dev/null +++ b/i18n/esn/extensions/jake/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.jake.autoDetect": "Controla si la detección automática de tareas Jake estan activada/desactivada. El valor predeterminado es \"activada\"." +} \ No newline at end of file diff --git a/i18n/esn/extensions/markdown/out/extension.i18n.json b/i18n/esn/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..360f0b974b76f --- /dev/null +++ b/i18n/esn/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "onPreviewStyleLoadError": "No se pudo cargar 'markdown.styles': {0}" +} \ No newline at end of file diff --git a/i18n/esn/extensions/markdown/package.i18n.json b/i18n/esn/extensions/markdown/package.i18n.json index 0980d334b4318..f33c351326900 100644 --- a/i18n/esn/extensions/markdown/package.i18n.json +++ b/i18n/esn/extensions/markdown/package.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "markdown.preview.breaks.desc": "Establece cómo los saltos de línea son representados en la vista previa de markdown. Estableciendolo en 'true' crea un
para cada nueva línea.", "markdown.preview.doubleClickToSwitchToEditor.desc": "Haga doble clic en la vista previa de Markdown para cambiar al editor.", "markdown.preview.fontFamily.desc": "Controla la familia de la fuente utilizada en la previsualización del descuento.", "markdown.preview.fontSize.desc": "Controla el tamaño de la fuente en píxeles utilizado en la previsualización del descuento.", diff --git a/i18n/esn/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/esn/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..22ca13053b59f --- /dev/null +++ b/i18n/esn/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "acceptCurrentChange": "Aceptar cambio actual", + "acceptIncomingChange": "Aceptar cambio entrante", + "acceptBothChanges": "Aceptar ambos cambios", + "compareChanges": "Comparar cambios" +} \ No newline at end of file diff --git a/i18n/esn/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/esn/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..e94eadacd8d8c --- /dev/null +++ b/i18n/esn/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "cursorNotInConflict": "El cursor de edición no se encuentra en un conflicto de fusión", + "compareChangesTitle": "{0}: Cambios actuales ⟷ Cambios entrantes", + "cursorOnCommonAncestorsRange": "El cursor del editor está dentro del bloque de ancestros comunes, por favor muévalo al bloque \"actual\" o al \"entrante\"", + "cursorOnSplitterRange": "El cursor del editor está dentro del separador de conflictos de fusión, muévalo al bloque \"actual\" o al \"entrante\" ", + "noConflicts": "No se encontraron conflictos en este archivo", + "noOtherConflictsInThisFile": "No hay más conflictos en este archivo" +} \ No newline at end of file diff --git a/i18n/esn/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/esn/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..9cf24c3ecc5e0 --- /dev/null +++ b/i18n/esn/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "currentChange": "(Cambio actual)", + "incomingChange": "(Cambio entrante)" +} \ No newline at end of file diff --git a/i18n/esn/extensions/merge-conflict/package.i18n.json b/i18n/esn/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..b72c99c527d15 --- /dev/null +++ b/i18n/esn/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "command.category": "Fusionar conflicto", + "command.accept.all-incoming": "Aceptar todos los entrantes", + "command.accept.all-both": "Aceptar ambos", + "command.accept.current": "Aceptar actuales", + "command.accept.incoming": "Aceptar entrantes", + "command.accept.selection": "Aceptar selección", + "command.accept.both": "Aceptar ambos", + "command.next": "Siguiente conflicto", + "command.previous": "Conflicto anterior", + "command.compare": "Comparar conflicto actual", + "config.title": "Fusionar conflicto", + "config.codeLensEnabled": "Habilitar/deshabilitar CodeLens de fusionar bloque de conflictos en el editor", + "config.decoratorsEnabled": "Habilitar/deshabilitar decoradores de conflictos de fusión en el editor" +} \ No newline at end of file diff --git a/i18n/esn/extensions/npm/package.i18n.json b/i18n/esn/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..d71e21915daba --- /dev/null +++ b/i18n/esn/extensions/npm/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.npm.autoDetect": "Controla si la detección automática de scripts npm está activada o desactivada. Por defecto está activada." +} \ No newline at end of file diff --git a/i18n/esn/extensions/typescript/out/features/bufferSyncSupport.i18n.json b/i18n/esn/extensions/typescript/out/features/bufferSyncSupport.i18n.json index ce77997be34a4..d7310fe0e4602 100644 --- a/i18n/esn/extensions/typescript/out/features/bufferSyncSupport.i18n.json +++ b/i18n/esn/extensions/typescript/out/features/bufferSyncSupport.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "versionMismatch": "Las versiones no coinciden; global tsc ({0}) != servicio de lenguaje de VS Code ({1}). Pueden producirse errores de compilación incoherente.", + "versionMismatch": "Usando TypeScript ({1}) para las características del editor. TypeScript ({0}) es instalado globalmente en su máquina. Los errores en VS Code pueden diferir de los de TSC", "moreInformation": "Más información", "doNotCheckAgain": "No volver a comprobar", "close": "Cerrar", diff --git a/i18n/esn/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/esn/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json new file mode 100644 index 0000000000000..e95800399794f --- /dev/null +++ b/i18n/esn/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ts-check": "Habilita la verificación semántica en un archivo de JavaScript. Debe estar al principio del archivo.", + "ts-nocheck": "Deshabilita la verificación semántica en un archivo de JavaScript. Debe estar al principio del archivo.", + "ts-ignore": "Suprime los errores @ts-check en la siguiente línea de un archivo. " +} \ No newline at end of file diff --git a/i18n/esn/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/esn/extensions/typescript/out/typescriptServiceClient.i18n.json index d93aa704842d3..dd6d27fed4a8a 100644 --- a/i18n/esn/extensions/typescript/out/typescriptServiceClient.i18n.json +++ b/i18n/esn/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -4,10 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "restartTsServerTitle": "Reiniciar", - "restartTypeScriptServerBlurb": "Reinicie el servidor de TypeScript para aplicar cambios", - "later": "Más tarde", - "channelName": "TypeScript", "noServerFound": "La ruta de acceso {0} no apunta a una instalación válida de tsserver. Se usará la versión de TypeScript del paquete.", "noBundledServerFound": "Otra aplicación (por ejemplo, una herramienta de detección de virus con un comportamiento erróneo) eliminó el tsserver de VSCode. Debe reinstalar VS Code.", "versionNumber.custom": "personalizada", diff --git a/i18n/esn/extensions/typescript/out/utils/logger.i18n.json b/i18n/esn/extensions/typescript/out/utils/logger.i18n.json new file mode 100644 index 0000000000000..bc738f43d0c37 --- /dev/null +++ b/i18n/esn/extensions/typescript/out/utils/logger.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "channelName": "TypeScript" +} \ No newline at end of file diff --git a/i18n/esn/extensions/typescript/out/utils/projectStatus.i18n.json b/i18n/esn/extensions/typescript/out/utils/projectStatus.i18n.json index 22620be6b2223..1248c23303354 100644 --- a/i18n/esn/extensions/typescript/out/utils/projectStatus.i18n.json +++ b/i18n/esn/extensions/typescript/out/utils/projectStatus.i18n.json @@ -6,7 +6,6 @@ { "hintExclude": "Para habilitar las características de lenguaje de JavaScript/TypeScript en todo el proyecto, excluya las carpetas con muchos archivos, como: {0}", "hintExclude.generic": "Para habilitar las características de idioma de JavaScript/TypeScript IntelliSense en todo el proyecto, excluya las carpetas de tamaño grande con archivos de origen en los que no trabaje.", - "open": "Configurar exclusiones", "large.label": "Configurar exclusiones", "hintExclude.tooltip": "Para habilitar las características de idioma de JavaScript/TypeScript IntelliSense en todo el proyecto, excluya las carpetas de tamaño grande con archivos de origen en los que no trabaje." } \ No newline at end of file diff --git a/i18n/esn/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/esn/extensions/typescript/out/utils/typingsStatus.i18n.json index 2f04fc83513d0..0d41f3ba91cef 100644 --- a/i18n/esn/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/esn/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,7 +5,7 @@ // Do not edit this file. It is machine generated. { "installingPackages": "Recuperando cambios en los datos para un mejor rendimiento de TypeScript IntelliSense", - "typesInstallerInitializationFailed.title": "No se pudo instalar los archivos de lenguaje de JavaScript . Asegúrese que NPM esté instalado. ", + "typesInstallerInitializationFailed.title": "No se pudieron instalar archivos de términos para las características de lenguaje de JavaScript. Asegúrese de que NPM está instalado o configure \"typescript.npm\" en la configuración de usuario", "typesInstallerInitializationFailed.moreInformation": "Más información", "typesInstallerInitializationFailed.doNotCheckAgain": "No volver a comprobar", "typesInstallerInitializationFailed.close": "Cerrar" diff --git a/i18n/esn/extensions/typescript/package.i18n.json b/i18n/esn/extensions/typescript/package.i18n.json index 28c86fc60602c..8ecc46adb413c 100644 --- a/i18n/esn/extensions/typescript/package.i18n.json +++ b/i18n/esn/extensions/typescript/package.i18n.json @@ -13,11 +13,11 @@ "typescript.check.tscVersion": "Compruebe si un compilador de TypeScript de instalación global (p. ej., tsc) difiere del servicio de lenguaje de TypeScript usado.", "typescript.tsserver.log": "votes Habilita los registros del servidor TS a un archivo. Este registro se puede utilizar para diagnosticar problemas en el servidor TS. Este registro puede contener rutas de acceso, código fuente y posiblemente otra información sensitiva acerca del proyecto.", "typescript.tsserver.trace": "Habilita el seguimiento de mensajes al servidor TS. Este seguimiento se puede utilizar para diagnosticar problemas en el servidor TS. Este seguimiento puede contener rutas de acceso, código fuente y posiblemente otra información sensitiva acerca del proyecto.", - "typescript.tsserver.experimentalAutoBuild": "Permite la generación automática experimental. Requiere la versión de desarrollo 1.9 o tsserver 2.x y un reinicio de VS Code después de modificarlo.", "typescript.validate.enable": "Habilita o deshabilita la validación de TypeScript.", "typescript.format.enable": "Habilita o deshabilita el formateador predeterminado de TypeScript.", "javascript.format.enable": "Habilita o deshabilita el formateador predeterminado de JavaScript.", "format.insertSpaceAfterCommaDelimiter": "Define el tratamiento del espacio después de un delimitador de coma.", + "format.insertSpaceAfterConstructor": "Define el manejo del espacio después de la palabra clave constructor. Requiere TypeScript >= 2.3.0", "format.insertSpaceAfterSemicolonInForStatements": " Define el tratamiento del espacio después de punto y coma en una instrucción for.", "format.insertSpaceBeforeAndAfterBinaryOperators": "Define el tratamiento del espacio después de un operador binario.", "format.insertSpaceAfterKeywordsInControlFlowStatements": "Define el tratamiento del espacio después de las palabras clave en una instrucción de flujo de control.", @@ -33,11 +33,16 @@ "javascript.validate.enable": "Habilita o deshabilita la validación de JavaScript.", "typescript.goToProjectConfig.title": "Ir a configuración del proyecto", "javascript.goToProjectConfig.title": "Ir a configuración del proyecto", - "typescript.referencesCodeLens.enabled": "Habilita o deshabilita referencias de CodeLens. Requiere TypeScript >= 2.0.6.", + "javascript.referencesCodeLens.enabled": "Habilitar/deshabilitar las referencias de CodeLens en los archivos de JavaScript.", + "typescript.referencesCodeLens.enabled": "Habilitar/deshabilitar las referencias de CodeLens en los archivos de TypeScript. Requiere TypeScript >= 2.0.6.", "typescript.implementationsCodeLens.enabled": "Habilita o deshabilita implementaciones de CodeLens. Requiere TypeScript >= 2.2.0.", - "typescript.openTsServerLog.title": "Abrir archivo de registro del servidor de TS", + "typescript.openTsServerLog.title": "Abrir registro del servidor de TS", + "typescript.restartTsServer": "Reiniciar servidor TS", "typescript.selectTypeScriptVersion.title": "Seleccionar versión de TypeScript", "jsDocCompletion.enabled": "Habilita o deshabilita comentarios automaticos de JSDoc", "javascript.implicitProjectConfig.checkJs": "Habilita/deshabilita la comprobación semántica de los archivos JavaScript. Los archivos jsconfig.json o tsconfig.json reemplazan esta configuración. Se requiere TypeScript >=2.3.1.", - "typescript.check.npmIsInstalled": "Comprueba si NPM esta instalado para recibir adquisiciones automaticas de Typings" + "typescript.npm": "Especifica la ruta de acceso al archivo ejecutable de NPM usada para la adquisición automática de tipos. Requiere TypeScript >= 2.3.4.", + "typescript.check.npmIsInstalled": "Compruebe si NPM está instalado para la adquisición automática de tipos.", + "javascript.nameSuggestions": "Habilitar/deshabilitar nombres únicos de la lista de sugerencias en los archivos de JavaScript. ", + "typescript.tsc.autoDetect": "Controla si la detección automática de tareas TSC está activada o desactivada." } \ No newline at end of file diff --git a/i18n/esn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/esn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index f706005311588..169c17eadd6d0 100644 --- a/i18n/esn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/esn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,8 +6,7 @@ { "imgMeta": "{0} x {1} {2}", "largeImageError": "La imagen es muy grande para mostrar en el editor", - "resourceOpenExternalButton": "Abrir imagen", - "resourceOpenExternalText": "usar programa externo?", + "resourceOpenExternalButton": "¿Abrir la imagen mediante un programa externo?", "nativeBinaryError": "El archivo no se mostrará en el editor porque es binario, muy grande o usa una codificación de texto no compatible.", "sizeB": "{0} B", "sizeKB": "{0} KB", diff --git a/i18n/esn/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/esn/src/vs/base/common/jsonErrorMessages.i18n.json new file mode 100644 index 0000000000000..a9b302bfa978a --- /dev/null +++ b/i18n/esn/src/vs/base/common/jsonErrorMessages.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error.invalidSymbol": "Símbolo no válido", + "error.invalidNumberFormat": "Formato de número no válido", + "error.propertyNameExpected": "Se esperaba el nombre de la propiedad", + "error.valueExpected": "Se esperaba un valor", + "error.colonExpected": "Se esperaban dos puntos", + "error.commaExpected": "Se esperaba una coma", + "error.closeBraceExpected": "Se esperaba una llave de cierre", + "error.closeBracketExpected": "Se esperaba un corchete de cierre", + "error.endOfFileExpected": "Se esperaba un fin de archivo" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/base/common/keybindingLabels.i18n.json b/i18n/esn/src/vs/base/common/keybindingLabels.i18n.json new file mode 100644 index 0000000000000..0a7ced2a7928e --- /dev/null +++ b/i18n/esn/src/vs/base/common/keybindingLabels.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ctrlKey": "Ctrl", + "shiftKey": "Mayús", + "altKey": "Alt", + "windowsKey": "Windows", + "ctrlKey.long": "Control", + "shiftKey.long": "Mayús", + "altKey.long": "Alt", + "cmdKey.long": "Comando", + "windowsKey.long": "Windows" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/code/electron-main/menus.i18n.json b/i18n/esn/src/vs/code/electron-main/menus.i18n.json index 5e16ab703c732..807cecbeee92c 100644 --- a/i18n/esn/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/esn/src/vs/code/electron-main/menus.i18n.json @@ -14,6 +14,7 @@ "mHelp": "Ayuda", "miNewWindow": "&&Nueva ventana", "mAbout": "Acerca de {0}", + "mServices": "Servicios", "mHide": "Ocultar {0}", "mHideOthers": "Ocultar otros", "mShowAll": "Mostrar todo", @@ -40,6 +41,7 @@ "miSelectIconTheme": "&&Tema de icono de archivo", "miPreferences": "&&Preferencias", "miReopenClosedEditor": "&&Volver a abrir el editor cerrado", + "miMore": "&&Más...", "miClearRecentOpen": "&&Borrar archivos recientes", "miUndo": "&&Deshacer", "miRedo": "&&Rehacer", @@ -69,7 +71,7 @@ "miSmartSelectShrink": "&&Reducir selección", "miViewExplorer": "&&Explorador", "miViewSearch": "&&Buscar", - "miViewGit": "&&Git", + "miViewSCM": "S&&CM", "miViewDebug": "&&Depurar", "miViewExtensions": "E&&xtensiones", "miToggleOutput": "&&Salida", @@ -114,6 +116,8 @@ "miGotoSymbolInFile": "Ir al &&símbolo en el archivo...", "miGotoSymbolInWorkspace": "Ir al símbolo en el área de &&trabajo...", "miGotoDefinition": "Ir a &&definición", + "miGotoTypeDefinition": "Ir a la definición de &&Tipo", + "miGotoImplementation": "Ir a la &&Implementación", "miGotoLine": "Ir a la &&línea...", "miStartDebugging": "I&&niciar depuración", "miStartWithoutDebugging": "Iniciar &&sin depurar", @@ -130,16 +134,19 @@ "miColumnBreakpoint": "Punto de interrupción de c&&olumna", "miFunctionBreakpoint": "Punto de interrupción de &&función...", "miNewBreakpoint": "&&Nuevo punto de interrupción", + "miEnableAllBreakpoints": "Habilitar todos los puntos de interrupción", "miDisableAllBreakpoints": "&&Deshabilitar todos los puntos de interrupción", "miRemoveAllBreakpoints": "Quitar &&todos los puntos de interrupción", "miInstallAdditionalDebuggers": "&&Instalar los depuradores adicionales...", "mMinimize": "Minimizar", - "mClose": "Cerrar", + "mZoom": "Zoom", "mBringToFront": "Traer todo al frente", + "miSwitchWindow": "Cambiar &&Ventana...", "miToggleDevTools": "&&Alternar herramientas de desarrollo", "miAccessibilityOptions": "&&Opciones de accesibilidad", "miReportIssues": "&&Notificar problemas", "miWelcome": "&&Bienvenido", + "miInteractivePlayground": "Área de juegos &&interactiva", "miDocumentation": "&&Documentación", "miReleaseNotes": "&&Notas de la versión", "miKeyboardShortcuts": "&&Referencia de métodos abreviados de teclado", @@ -149,7 +156,8 @@ "miLicense": "Ver &&licencia", "miPrivacyStatement": "&&Declaración de privacidad", "miAbout": "&&Acerca de", - "miRestartToUpdate": "Reiniciar para actualizar...", + "miRunTask": "&&Ejecutar Tarea...", + "accessibilityOptionsWindowTitle": "Opciones de accesibilidad", "miCheckingForUpdates": "Buscando actualizaciones...", "miDownloadUpdate": "Descargar actualización disponible", "miDownloadingUpdate": "Descargando actualización...", diff --git a/i18n/esn/src/vs/code/electron-main/windows.i18n.json b/i18n/esn/src/vs/code/electron-main/windows.i18n.json index fd891dfad9464..f6ded97afe145 100644 --- a/i18n/esn/src/vs/code/electron-main/windows.i18n.json +++ b/i18n/esn/src/vs/code/electron-main/windows.i18n.json @@ -7,7 +7,6 @@ "ok": "Aceptar", "pathNotExistTitle": "La ruta no existe", "pathNotExistDetail": "Parece que la ruta '{0}' ya no existe en el disco.", - "accessibilityOptionsWindowTitle": "Opciones de accesibilidad", "reopen": "Volver a abrir", "wait": "Siga esperando", "close": "Cerrar", @@ -15,8 +14,6 @@ "appStalledDetail": "Puede volver a abrir la ventana, cerrarla o seguir esperando.", "appCrashed": "La ventana se bloqueó", "appCrashedDetail": "Sentimos las molestias. Puede volver a abrir la ventana para continuar donde se detuvo.", - "newWindow": "Nueva ventana", - "newWindowDesc": "Abre una ventana nueva.", - "recentFolders": "Carpetas recientes", - "folderDesc": "{0} {1}" + "openFile": "Abrir archivo", + "openFolder": "Abrir carpeta" } \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/browser/widget/diffEditorWidget.i18n.json b/i18n/esn/src/vs/editor/browser/widget/diffEditorWidget.i18n.json index c5040c18c929d..86449ea9fcd9d 100644 --- a/i18n/esn/src/vs/editor/browser/widget/diffEditorWidget.i18n.json +++ b/i18n/esn/src/vs/editor/browser/widget/diffEditorWidget.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "diffInserted": "Color de fondo para el texto insertado.", - "diffRemoved": "Color de fondo para el texto quitado.", - "diffInsertedOutline": "Color de contorno para el texto insertado.", - "diffRemovedOutline": "Color de contorno para el texto quitado." + "diffEditorInserted": "Color de fondo para el texto insertado.", + "diffEditorRemoved": "Color de fondo para el texto quitado.", + "diffEditorInsertedOutline": "Color de contorno para el texto insertado.", + "diffEditorRemovedOutline": "Color de contorno para el texto quitado." } \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/browser/widget/diffReview.i18n.json b/i18n/esn/src/vs/editor/browser/widget/diffReview.i18n.json new file mode 100644 index 0000000000000..3f371d287a027 --- /dev/null +++ b/i18n/esn/src/vs/editor/browser/widget/diffReview.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "Cerrar", + "header": "Diferencia {0} de {1}: original {2}, {3} líneas, modificado {4}, {5} líneas", + "blankLine": "vacío" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json index deeb605c6a664..b22cec3a515e4 100644 --- a/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -9,6 +9,7 @@ "fontWeight": "Controla el grosor de la fuente.", "fontSize": "Controla el tamaño de fuente en píxeles.", "lineHeight": "Controla la altura de línea. Utilice 0 para calcular el valor de lineHeight a partir de fontSize.", + "letterSpacing": "Controla el espacio entre letras en pixels.", "lineNumbers": "Controla la presentación de los números de línea. Los valores posibles son \"on\", \"off\" y \"relative\". \"relative\" muestra el número de líneas desde la posición actual del cursor.", "rulers": "Columnas en las que mostrar reglas verticales", "wordSeparators": "Caracteres que se usarán como separadores de palabras al realizar operaciones o navegaciones relacionadas con palabras.", @@ -20,8 +21,11 @@ "roundedSelection": "Controla si las selecciones tienen esquinas redondeadas", "scrollBeyondLastLine": "Controla si el editor se seguirá desplazando después de la última línea", "minimap.enabled": "Controla si se muestra el minimapa", + "minimap.showSlider": "Controla si el control deslizante del minimapa es ocultado automáticamente.", "minimap.renderCharacters": "Presentar los caracteres reales en una línea (por oposición a bloques de color)", "minimap.maxColumn": "Limitar el ancho del minimapa para presentar como mucho un número de columnas determinado", + "find.seedSearchStringFromSelection": "Controla si se inicializa la cadena de búsqueda en Buscar widget en la selección del editor", + "find.autoFindInSelection": "Controla si el indicador Buscar en selección se activa cuando se seleccionan varios caracteres o líneas de texto en el editor", "wordWrap.off": "Las líneas no se ajustarán nunca.", "wordWrap.on": "Las líneas se ajustarán en el ancho de la ventanilla.", "wordWrap.wordWrapColumn": "Las líneas se ajustarán en \"editor.wordWrapColumn\".", @@ -30,17 +34,20 @@ "wordWrapColumn": "Controls the wrapping column of the editor when `editor.wordWrap` is 'wordWrapColumn' or 'bounded'.", "wrappingIndent": "Controla el sangrado de las líneas ajustadas. Puede ser uno los valores 'none', 'same' o 'indent'.", "mouseWheelScrollSensitivity": "Se utilizará un multiplicador en los eventos de desplazamiento de la rueda del mouse `deltaX` y `deltaY`", + "multiCursorModifier.ctrlCmd": "Se asigna a \"Control\" en Windows y Linux y a \"Comando\" en OSX.", + "multiCursorModifier.alt": "Se asigna a \"Alt\" en Windows y Linux y a \"Opción\" en OSX.", + "multiCursorModifier": "El modificador que se usará para agregar varios cursores con el mouse. \"ctrlCmd\" se asigna a \"Control\" en Windows y Linux y a \"Comando\" en OSX. Los gestos del mouse Ir a la definición y Abrir vínculo se adaptarán de modo que no entren en conflicto con el modificador multicursor.", "quickSuggestions.strings": "Habilita sugerencias rápidas en las cadenas.", "quickSuggestions.comments": "Habilita sugerencias rápidas en los comentarios.", "quickSuggestions.other": "Habilita sugerencias rápidas fuera de las cadenas y los comentarios.", "quickSuggestions": "Controla si las sugerencias deben mostrarse automáticamente mientras se escribe", "quickSuggestionsDelay": "Controla el retardo en ms tras el cual aparecerán sugerencias rápidas", - "parameterHints": "Habilita sugerencias de parámetro", + "parameterHints": "Habilita el desplegable que muestra documentación de los parámetros e información de los tipos mientras escribe", "autoClosingBrackets": "Controla si el editor debe cerrar automáticamente los corchetes después de abrirlos", "formatOnType": "Controla si el editor debe dar formato automáticamente a la línea después de escribirla", "formatOnPaste": "Controla si el editor debe formatear automáticamente el contenido pegado. Debe haber disponible un formateador capaz de aplicar formato a un intervalo dentro de un documento.", "suggestOnTriggerCharacters": "Controla si las sugerencias deben aparecer de forma automática al escribir caracteres desencadenadores", - "acceptSuggestionOnEnter": "Controla si las sugerencias deben aceptarse en \"Entrar\" (además de \"TAB\"). Ayuda a evitar la ambigüedad entre insertar nuevas líneas o aceptar sugerencias.", + "acceptSuggestionOnEnter": "Controla si las sugerencias deben aceptarse en \"Entrar\" (además de \"TAB\"). Ayuda a evitar la ambigüedad entre insertar nuevas líneas o aceptar sugerencias. El valor \"smart\" significa que solo se acepta una sugerencia con Entrar cuando se realiza un cambio textual.", "acceptSuggestionOnCommitCharacter": "Controla si se deben aceptar sugerencias en los caracteres de confirmación. Por ejemplo, en Javascript, el punto y coma (\";\") puede ser un carácter de confirmación que acepta una sugerencia y escribe ese carácter.", "snippetSuggestions": "Controla si se muestran los fragmentos de código con otras sugerencias y cómo se ordenan.", "emptySelectionClipboard": "Controla si al copiar sin selección se copia la línea actual.", @@ -62,12 +69,18 @@ "renderLineHighlight": "Controla cómo el editor debe presentar el resaltado de línea. Las posibilidades son \"ninguno\", \"margen\", \"línea\" y \"todo\".", "codeLens": "Controla si el editor muestra lentes de código", "folding": "Controla si el editor tiene habilitado el plegado de código.", + "showFoldingControls": "Controla cuándo los controles de plegado del margen son ocultados automáticamente.", "matchBrackets": "Resaltar corchetes coincidentes cuando se seleccione uno de ellos.", "glyphMargin": "Controla si el editor debe representar el margen de glifo vertical. El margen de glifo se usa, principalmente, para depuración.", "useTabStops": "La inserción y eliminación del espacio en blanco sigue a las tabulaciones.", "trimAutoWhitespace": "Quitar espacio en blanco final autoinsertado", "stablePeek": "Mantiene abierto el editor interactivo incluso al hacer doble clic en su contenido o presionar Escape.", "dragAndDrop": "Controla si el editor debe permitir mover selecciones mediante arrastrar y colocar.", + "accessibilitySupport.auto": "El editor usará API de plataforma para detectar cuándo está conectado un lector de pantalla.", + "accessibilitySupport.on": "El editor se optimizará de forma permanente para su uso con un editor de pantalla.", + "accessibilitySupport.off": "El editor nunca se optimizará para su uso con un lector de pantalla.", + "accessibilitySupport": "Controla si el editor se debe ejecutar en un modo optimizado para lectores de pantalla.", + "links": "Controla si el editor debe detectar enlaces y hacerlos cliqueables", "sideBySide": "Controla si el editor de diferencias muestra las diferencias en paralelo o alineadas.", "ignoreTrimWhitespace": "Controla si el editor de diferencias muestra los cambios de espacio inicial o espacio final como diferencias.", "renderIndicators": "Controla si el editor de diff muestra indicadores +/- para cambios agregados/quitados", diff --git a/i18n/esn/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/esn/src/vs/editor/common/config/editorOptions.i18n.json new file mode 100644 index 0000000000000..c82ce8730064c --- /dev/null +++ b/i18n/esn/src/vs/editor/common/config/editorOptions.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "accessibilityOffAriaLabel": "No se puede acceder al editor en este momento. Presione Alt+F1 para ver opciones.", + "editorViewAccessibleLabel": "Contenido del editor" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/esn/src/vs/editor/common/view/editorColorRegistry.i18n.json index 6c525e9a52824..e5d0cfe1b5bae 100644 --- a/i18n/esn/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/esn/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -10,5 +10,15 @@ "caret": "Color del cursor del editor.", "editorWhitespaces": "Color de los caracteres de espacio en blanco del editor.", "editorIndentGuides": "Color de las guías de sangría del editor.", - "editorLineNumbers": "Color de números de línea del editor." + "editorLineNumbers": "Color de números de línea del editor.", + "editorRuler": "Color de las reglas del editor", + "editorCodeLensForeground": "Color principal de lentes de código en el editor", + "editorBracketMatchBackground": "Color de fondo tras corchetes coincidentes", + "editorBracketMatchBorder": "Color de bloques con corchetes coincidentes", + "editorOverviewRulerBorder": "Color del borde de la regla de visión general.", + "editorGutter": "Color de fondo del margen del editor. Este espacio contiene los márgenes de glifos y los números de línea.", + "errorForeground": "Color de primer plano de squigglies de error en el editor.", + "errorBorder": "Color de borde de squigglies de error en el editor.", + "warningForeground": "Color de primer plano de squigglies de advertencia en el editor.", + "warningBorder": "Color de borde de squigglies de advertencia en el editor." } \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/find/common/findController.i18n.json b/i18n/esn/src/vs/editor/contrib/find/common/findController.i18n.json index a16ef436a2016..2832cf62696ae 100644 --- a/i18n/esn/src/vs/editor/contrib/find/common/findController.i18n.json +++ b/i18n/esn/src/vs/editor/contrib/find/common/findController.i18n.json @@ -14,6 +14,6 @@ "addSelectionToPreviousFindMatch": "Agregar selección hasta la anterior coincidencia de búsqueda", "moveSelectionToNextFindMatch": "Mover última selección hasta la siguiente coincidencia de búsqueda", "moveSelectionToPreviousFindMatch": "Mover última selección hasta la anterior coincidencia de búsqueda", - "selectAllOccurencesOfFindMatch": "Seleccionar todas las repeticiones de coincidencia de búsqueda", + "selectAllOccurrencesOfFindMatch": "Seleccionar todas las repeticiones de coincidencia de búsqueda", "changeAll.label": "Cambiar todas las ocurrencias" } \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/format/browser/formatActions.i18n.json b/i18n/esn/src/vs/editor/contrib/format/browser/formatActions.i18n.json index d1fd1741e7486..5415844b0f887 100644 --- a/i18n/esn/src/vs/editor/contrib/format/browser/formatActions.i18n.json +++ b/i18n/esn/src/vs/editor/contrib/format/browser/formatActions.i18n.json @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "hint11": "Made 1 formatting edit on line {0}", - "hintn1": "Made {0} formatting edits on line {1}", - "hint1n": "Made 1 formatting edit between lines {0} and {1}", - "hintnn": "Made {0} formatting edits between lines {1} and {2}", - "formatDocument.label": "Format Document", - "formatSelection.label": "Format Selection" + "hint11": "1 edición de formato en la línea {0}", + "hintn1": "{0} ediciones de formato en la línea {1}", + "hint1n": "1 edición de formato entre las líneas {0} y {1}", + "hintnn": "{0} ediciones de formato entre las líneas {1} y {2}", + "formatDocument.label": "Dar formato al documento", + "formatSelection.label": "Dar formato a la selección" } \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/esn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..d9243b761356e --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "No se encontró ninguna definición para \"{0}\"", + "generic.noResults": "No se encontró ninguna definición", + "meta.title": " – {0} definiciones", + "actions.goToDecl.label": "Ir a definición", + "actions.goToDeclToSide.label": "Abrir definición en el lateral", + "actions.previewDecl.label": "Ver la definición", + "goToImplementation.noResultWord": "No se encontró ninguna implementación para \"{0}\"", + "goToImplementation.generic.noResults": "No se encontró ninguna implementación", + "meta.implementations.title": "{0} implementaciones", + "actions.goToImplementation.label": "Ir a implementación", + "actions.peekImplementation.label": "Inspeccionar implementación", + "goToTypeDefinition.noResultWord": "No se encontró ninguna definición de tipo para \"{0}\"", + "goToTypeDefinition.generic.noResults": "No se encontró ninguna definición de tipo", + "meta.typeDefinitions.title": " – {0} definiciones de tipo", + "actions.goToTypeDefinition.label": "Ir a la definición de tipo", + "actions.peekTypeDefinition.label": "Inspeccionar definición de tipo" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/esn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..d35f93e7fae0b --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "Haga clic para mostrar {0} definiciones." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/hover/browser/hover.i18n.json b/i18n/esn/src/vs/editor/contrib/hover/browser/hover.i18n.json index 0ed29121caedb..c190af1321dad 100644 --- a/i18n/esn/src/vs/editor/contrib/hover/browser/hover.i18n.json +++ b/i18n/esn/src/vs/editor/contrib/hover/browser/hover.i18n.json @@ -4,8 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "showHover": "Mostrar al mantener el puntero", - "hoverHighlight": "Resaltado debajo de la palabra para la que se muestra un recuadro al mantener el puntero.", - "hoverBackground": "Color de fondo al mantener el puntero en el editor.", - "hoverBorder": "Color del borde al mantener el puntero en el editor." + "showHover": "Mostrar al mantener el puntero" } \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/links/browser/links.i18n.json b/i18n/esn/src/vs/editor/contrib/links/browser/links.i18n.json index 9446261fac5d8..7b9ee53d86a2c 100644 --- a/i18n/esn/src/vs/editor/contrib/links/browser/links.i18n.json +++ b/i18n/esn/src/vs/editor/contrib/links/browser/links.i18n.json @@ -6,6 +6,7 @@ { "links.navigate.mac": "Cmd + clic para abrir el vínculo", "links.navigate": "Ctrl + clic para abrir el vínculo", + "links.navigate.al": "Alt + clic para seguir el vínculo", "invalid.url": "No se pudo abrir este vínculo porque no tiene un formato correcto: {0}", "missing.url": "No se pudo abrir este vínculo porque falta el destino.", "label": "Abrir vínculo" diff --git a/i18n/esn/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/esn/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index 9622f6f18deab..63882c346ccbc 100644 --- a/i18n/esn/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/esn/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -4,6 +4,9 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "aria.oneReference": "símbolo en {0} linea {1} en la columna {2}", + "aria.fileReferences.1": "1 símbolo en {0}, ruta de acceso completa {1}", + "aria.fileReferences.N": "{0} símbolos en {1}, ruta de acceso completa {2}", "aria.result.0": "No se encontraron resultados", "aria.result.1": "Encontró 1 símbolo en {0}", "aria.result.n1": "Encontró {0} símbolos en {1}", diff --git a/i18n/esn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/esn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index 9d5f0bccdc4bb..1e3309b1cf63b 100644 --- a/i18n/esn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/esn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -7,23 +7,21 @@ "referencesFailre": "Error al resolver el archivo.", "referencesCount": "{0} referencias", "referenceCount": "{0} referencia", - "aria.fileReferences.1": "1 referencia en {0}", - "aria.fileReferences.N": "{0} referencias en {1}", - "aria.oneReference": "referencia en {0} linea {1} en la columna {2}", "missingPreviewMessage": "vista previa no disponible", "treeAriaLabel": "Referencias", "noResults": "No hay resultados.", "peekView.alternateTitle": "Referencias", "peekViewTitleBackground": "Color de fondo del área de título de la vista de inspección.", - "peekViewTitle": "Color del título de la vista de inpección.", - "peekViewTitleInfo": "Color de la información del título de la vista de inspección.", + "peekViewTitleForeground": "Color del título de la vista de inpección.", + "peekViewTitleInfoForeground": "Color de la información del título de la vista de inspección.", "peekViewBorder": "Color de los bordes y la flecha de la vista de inspección.", "peekViewResultsBackground": "Color de fondo de la lista de resultados de vista de inspección.", - "peekViewResultsMatchForeground": "Buscar coincidencia con el primer plano de entrada de la lista de resultados de vista de inspección.", - "peekViewResultsFileForeground": "Primer plano de la entrada de archivo en la lista de resultados de vista de inspección.", + "peekViewResultsMatchForeground": "Color de primer plano de los nodos de inspección en la lista de resultados.", + "peekViewResultsFileForeground": "Color de primer plano de los archivos de inspección en la lista de resultados.", "peekViewResultsSelectionBackground": "Color de fondo de la entrada seleccionada en la lista de resultados de vista de inspección.", "peekViewResultsSelectionForeground": "Color de primer plano de la entrada seleccionada en la lista de resultados de vista de inspección.", "peekViewEditorBackground": "Color de fondo del editor de vista de inspección.", + "peekViewEditorGutterBackground": "Color de fondo del margen en el editor de vista de inspección.", "peekViewResultsMatchHighlight": "Buscar coincidencia con el color de resaltado de la lista de resultados de vista de inspección.", "peekViewEditorMatchHighlight": "Buscar coincidencia del color de resultado del editor de vista de inspección." } \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 196d64bddd7b9..bf3d8015426a1 100644 --- a/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -6,11 +6,13 @@ { "editorSuggestWidgetBackground": "Color de fondo del widget sugerido.", "editorSuggestWidgetBorder": "Color de borde del widget sugerido.", - "editorSuggestMatchHighlight": "Color del resaltado coincidido en el widget sugerido.", + "editorSuggestWidgetForeground": "Color de primer plano del widget sugerido.", + "editorSuggestWidgetSelectedBackground": "Color de fondo de la entrada seleccionada del widget sugerido.", + "editorSuggestWidgetHighlightForeground": "Color del resaltado coincidido en el widget sugerido.", "readMore": "Leer más...{0}", "suggestionWithDetailsAriaLabel": "{0}, sugerencia, con detalles", "suggestionAriaLabel": "{0}, sugerencia", - "goback": "Volver", + "readLess": "Leer menos...{0}", "suggestWidget.loading": "Cargando...", "suggestWidget.noSuggestions": "No hay sugerencias.", "suggestionAriaAccepted": "{0}, aceptada", diff --git a/i18n/esn/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/esn/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json index df256b0ca88ad..43ec87cbde1f6 100644 --- a/i18n/esn/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json +++ b/i18n/esn/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -15,5 +15,9 @@ "schema.brackets": "Define los corchetes que aumentan o reducen la sangría.", "schema.autoClosingPairs": "Define el par de corchetes. Cuando se escribe un corchete de apertura, se inserta automáticamente el corchete de cierre.", "schema.autoClosingPairs.notIn": "Define una lista de ámbitos donde los pares automáticos están deshabilitados.", - "schema.surroundingPairs": "Define los pares de corchetes que se pueden usar para encerrar una cadena seleccionada." + "schema.surroundingPairs": "Define los pares de corchetes que se pueden usar para encerrar una cadena seleccionada.", + "schema.wordPattern": " La definición de la palabra en el idioma.", + "schema.wordPattern.pattern": "El patrón de expresión regular utilizado para localizar palabras.", + "schema.wordPattern.flags": "Los flags de expresión regular utilizados para localizar palabras.", + "schema.wordPattern.flags.errorMessage": "Debe coincidir con el patrón `/^([gimuy]+)$/`." } \ No newline at end of file diff --git a/i18n/esn/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/esn/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json index 963cc3dbe3d5a..253f50641c33f 100644 --- a/i18n/esn/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json +++ b/i18n/esn/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -14,13 +14,15 @@ "vscode.extension.contributes.menus": "Contribuye con elementos de menú al editor", "menus.commandPalette": "La paleta de comandos", "menus.editorTitle": "El menú de título del editor", - "menus.editorContext": "El menú conextual del editor", + "menus.editorContext": "El menú contextual del editor", "menus.explorerContext": "El menú contextual del explorador de archivos", - "menus.editorTabContext": "Menú contextual de pestañas del editor", + "menus.editorTabContext": "El menú contextual de pestañas del editor", "menus.debugCallstackContext": "El menú contextual de la pila de llamadas de depuración", "menus.scmTitle": "El menú del título Control de código fuente", "menus.resourceGroupContext": "El menú contextual del grupo de recursos de Control de código fuente", "menus.resourceStateContext": "El menú contextual de estado de recursos de Control de código fuente", + "view.viewTitle": "El menú de título de vista contribuida", + "view.itemContext": "El menú contextual del elemento de vista contribuida", "nonempty": "se esperaba un valor no vacío.", "opticon": "la propiedad `icon` se puede omitir o debe ser una cadena o un literal como `{dark, light}`", "requireStringOrObject": "La propiedad \"{0}\" es obligatoria y debe ser de tipo \"string\" u \"object\"", diff --git a/i18n/esn/src/vs/platform/configuration/common/configurationRegistry.i18n.json b/i18n/esn/src/vs/platform/configuration/common/configurationRegistry.i18n.json index a2af815467e09..7b9b24c4d8e62 100644 --- a/i18n/esn/src/vs/platform/configuration/common/configurationRegistry.i18n.json +++ b/i18n/esn/src/vs/platform/configuration/common/configurationRegistry.i18n.json @@ -7,13 +7,6 @@ "defaultConfigurations.title": "La configuración predeterminada se reemplaza", "overrideSettings.description": "Establecer los valores de configuración que se reemplazarán para el lenguaje {0}.", "overrideSettings.defaultDescription": "Establecer los valores de configuración que se reemplazarán para un lenguaje.", - "vscode.extension.contributes.configuration": "Aporta opciones de configuración.", - "vscode.extension.contributes.configuration.title": "Resumen de la configuración. Esta etiqueta se usará en el archivo de configuración como comentario divisor.", - "vscode.extension.contributes.configuration.properties": "Descripción de las propiedades de configuración.", "config.property.languageDefault": "No se puede registrar \"{0}\". Coincide con el patrón de propiedad '\\\\[.*\\\\]$' para describir la configuración del editor específica del lenguaje. Utilice la contribución \"configurationDefaults\".", - "config.property.duplicate": "No se puede registrar \"{0}\". Esta propiedad ya está registrada.", - "invalid.properties": "configuration.properties debe ser un objeto", - "invalid.type": "si se establece, \"configuration.type\" debe establecerse en \"object\"", - "invalid.title": "configuration.title debe ser una cadena", - "vscode.extension.contributes.defaultConfiguration": "Contribuye a la configuración de los parámetros del editor predeterminados por lenguaje." + "config.property.duplicate": "No se puede registrar \"{0}\". Esta propiedad ya está registrada." } \ No newline at end of file diff --git a/i18n/esn/src/vs/platform/environment/node/argv.i18n.json b/i18n/esn/src/vs/platform/environment/node/argv.i18n.json index 7023f1d6e99d1..1a1f18154df7d 100644 --- a/i18n/esn/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/esn/src/vs/platform/environment/node/argv.i18n.json @@ -20,6 +20,7 @@ "showVersions": "Muestra las versiones de las extensiones instaladas cuando se usa --list-extension.", "installExtension": "Instala una extensión.", "uninstallExtension": "Desinstala una extensión.", + "experimentalApis": "Habilita características de API propuestas para una extensión.", "disableExtensions": "Deshabilite todas las extensiones instaladas.", "disableGPU": "Deshabilita la aceleración de hardware de GPU.", "version": "Versión de impresión.", diff --git a/i18n/esn/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/esn/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index 09295c5362ba4..b7b9d3c4f35f0 100644 --- a/i18n/esn/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/esn/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -14,6 +14,12 @@ "vscode.extension.contributes": "Todas las contribuciones de la extensión VS Code representadas por este paquete.", "vscode.extension.preview": "Establece la extensión que debe marcarse como versión preliminar en Marketplace.", "vscode.extension.activationEvents": "Eventos de activación de la extensión VS Code.", + "vscode.extension.activationEvents.onLanguage": "Un evento de activación emitido cada vez que se abre un archivo que se resuelve en el idioma especificado.", + "vscode.extension.activationEvents.onCommand": "Un evento de activación emitido cada vez que se invoca el comando especificado.", + "vscode.extension.activationEvents.onDebug": "Un evento de activación emitido cada vez que se inicia una sesión de depuración del tipo especificado.", + "vscode.extension.activationEvents.workspaceContains": "Un evento de activación emitido cada vez que se abre una carpeta que contiene al menos un archivo que coincide con el patrón global especificado.", + "vscode.extension.activationEvents.onView": "Un evento de activación emitido cada vez que se expande la vista especificada.", + "vscode.extension.activationEvents.star": "Un evento de activación emitido al inicio de VS Code. Para garantizar una buena experiencia para el usuario final, use este evento de activación en su extensión solo cuando no le sirva ninguna otra combinación de eventos de activación en su caso.", "vscode.extension.badges": "Matriz de distintivos que se muestran en la barra lateral de la página de extensiones de Marketplace.", "vscode.extension.badges.url": "URL de la imagen del distintivo.", "vscode.extension.badges.href": "Vínculo del distintivo.", diff --git a/i18n/esn/src/vs/platform/history/electron-main/historyMainService.i18n.json b/i18n/esn/src/vs/platform/history/electron-main/historyMainService.i18n.json new file mode 100644 index 0000000000000..ef4f14a4e2963 --- /dev/null +++ b/i18n/esn/src/vs/platform/history/electron-main/historyMainService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "newWindow": "Nueva ventana", + "newWindowDesc": "Abre una ventana nueva.", + "recentFolders": "Carpetas recientes", + "folderDesc": "{0} {1}" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/esn/src/vs/platform/markers/common/problemMatcher.i18n.json index dac524375156a..1aeb24bd42ed0 100644 --- a/i18n/esn/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/esn/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -34,7 +34,7 @@ "ProblemMatcherParser.noValidIdentifier": "Error: La propiedad pattern {0} no es un nombre de variable de patrón válido.", "ProblemMatcherParser.problemPattern.watchingMatcher": "Un buscador de coincidencias de problemas debe definir tanto un patrón de inicio como un patrón de finalización para la inspección.", "ProblemMatcherParser.invalidRegexp": "Error: La cadena {0} no es una expresión regular válida.\n", - "WatchingPatternSchema.regexp": "Expresión regular para detectar el principio o el final de una tarea de inspección.", + "WatchingPatternSchema.regexp": "Expresión regular para detectar el principio o el final de una tarea en segundo plano.", "WatchingPatternSchema.file": "Índice de grupo de coincidencias del nombre de archivo. Se puede omitir.", "PatternTypeSchema.name": "Nombre de un patrón aportado o predefinido", "PatternTypeSchema.description": "Patrón de problema o nombre de un patrón de problema que se ha aportado o predefinido. Se puede omitir si se especifica la base.", @@ -43,14 +43,18 @@ "ProblemMatcherSchema.severity": "Gravedad predeterminada para los problemas de capturas. Se usa si el patrón no define un grupo de coincidencias para \"severity\".", "ProblemMatcherSchema.applyTo": "Controla si un problema notificado en un documento de texto se aplica solamente a los documentos abiertos, cerrados o a todos los documentos.", "ProblemMatcherSchema.fileLocation": "Define cómo deben interpretarse los nombres de archivo notificados en un patrón de problema.", + "ProblemMatcherSchema.background": "Patrones para hacer seguimiento del comienzo y el final en un comprobador activo de la tarea en segundo plano.", + "ProblemMatcherSchema.background.activeOnStart": "Si se establece en True, el monitor está en modo activo cuando la tarea empieza. Esto es equivalente a emitir una línea que coincide con beginPattern", + "ProblemMatcherSchema.background.beginsPattern": "Si se encuentran coincidencias en la salida, se señala el inicio de una tarea en segundo plano.", + "ProblemMatcherSchema.background.endsPattern": "Si se encuentran coincidencias en la salida, se señala el fin de una tarea en segundo plano.", + "ProblemMatcherSchema.watching.deprecated": "Esta propiedad está en desuso. Use la propiedad en segundo plano.", + "ProblemMatcherSchema.watching": "Patrones para hacer un seguimiento del comienzo y el final de un patrón de supervisión.", "ProblemMatcherSchema.watching.activeOnStart": "Si se establece en true, el monitor está en modo activo cuando la tarea empieza. Esto es equivalente a emitir una línea que coincide con beginPattern", "ProblemMatcherSchema.watching.beginsPattern": "Si se encuentran coincidencias en la salida, se señala el inicio de una tarea de inspección.", "ProblemMatcherSchema.watching.endsPattern": "Si se encuentran coincidencias en la salida, se señala el fin de una tarea de inspección", - "ProblemMatcherSchema.watching": "Patrones para hacer un seguimiento del comienzo y el final de un patrón de supervisión.", "LegacyProblemMatcherSchema.watchedBegin.deprecated": "This property is deprecated. Use the watching property instead.", "LegacyProblemMatcherSchema.watchedBegin": "Expresión regular que señala que una tarea inspeccionada comienza a ejecutarse desencadenada a través de la inspección de archivos.", "LegacyProblemMatcherSchema.watchedEnd.deprecated": "This property is deprecated. Use the watching property instead.", "LegacyProblemMatcherSchema.watchedEnd": "Expresión regular que señala que una tarea inspeccionada termina de ejecutarse.", - "NamedProblemMatcherSchema.name": "Nombre del buscador de coincidencias de problemas.", "ProblemMatcherExtPoint": "Aporta buscadores de coincidencias de problemas" } \ No newline at end of file diff --git a/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json index cfcf545ed6a9c..795035a79f8d7 100644 --- a/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -4,44 +4,86 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.color": "Formato de color no válido. Use #RRGGBB o #RRGGBBAA", + "invalid.color": "Formato de color no válido. Use #TGB, #RBGA, #RRGGBB o #RRGGBBAA", "schema.colors": "Colores usados en el área de trabajo.", "foreground": "Color de primer plano general. Este color solo se usa si un componente no lo invalida.", - "focusedElementOutline": "Color general de contorno/borde de los elementos con foco. Este color solo se usa si un componente no lo invalida.", - "highContrastBorder": "Color de borde para separar componentes cuando está habilitado el tema de contraste alto.", - "highContrastOutline": "Color de contorno de componentes activos cuando está habilitado el tema de contraste alto.", + "errorForeground": "Color de primer plano general para los mensajes de erroe. Este color solo se usa si un componente no lo invalida.", + "descriptionForeground": "Color de primer plano para el texto descriptivo que proporciona información adicional, por ejemplo para una etiqueta.", + "focusBorder": "Color de borde de los elementos con foco. Este color solo se usa si un componente no lo invalida.", + "contrastBorder": "Un borde adicional alrededor de los elementos para separarlos unos de otros y así mejorar el contraste.", + "activeContrastBorder": "Un borde adicional alrededor de los elementos activos para separarlos unos de otros y así mejorar el contraste.", + "selectionBackground": "El color de fondo del texto seleccionado en el área de trabajo (por ejemplo, campos de entrada o áreas de texto). Esto no se aplica a las selecciones dentro del editor.", + "textSeparatorForeground": "Color para los separadores de texto.", + "textLinkForeground": "Color de primer plano para los vínculos en el texto.", + "textLinkActiveForeground": "Color de primer plano para los vínculos activos en el texto.", + "textPreformatForeground": "Color de primer plano para los segmentos de texto con formato previo.", + "textBlockQuoteBackground": "Color de fondo para los bloques en texto.", + "textBlockQuoteBorder": "Color de borde para los bloques en texto.", + "textCodeBlockBackground": "Color de fondo para los bloques de código en el texto.", + "widgetShadow": "Color de sombra de los widgets dentro del editor, como buscar/reemplazar", "inputBoxBackground": "Fondo de cuadro de entrada.", "inputBoxForeground": "Primer plano de cuadro de entrada.", "inputBoxBorder": "Borde de cuadro de entrada.", "inputBoxActiveOptionBorder": "Color de borde de opciones activadas en campos de entrada.", + "inputPlaceholderForeground": "Color de primer plano para el marcador de posición de texto", + "inputValidationInfoBackground": "Color de fondo de validación de entrada para gravedad de información.", + "inputValidationInfoBorder": "Color de borde de validación de entrada para gravedad de información.", + "inputValidationWarningBackground": "Color de fondo de validación de entrada para advertencia de información.", + "inputValidationWarningBorder": "Color de borde de validación de entrada para gravedad de advertencia.", + "inputValidationErrorBackground": "Color de fondo de validación de entrada para gravedad de error.", + "inputValidationErrorBorder": "Color de borde de valdación de entrada para gravedad de error.", "dropdownBackground": "Fondo de lista desplegable.", "dropdownForeground": "Primer plano de lista desplegable.", "dropdownBorder": "Borde de lista desplegable.", - "listFocusBackground": "List/Tree enfoca el fondo cuando está activo.", - "listInactiveFocusBackground": "List/Tree enfoca el fondo cuando está inactivo.", - "listActiveSelectionBackground": "List/Tree selección de fondo cuando está activo.", - "listActiveSelectionForeground": "List/Tree selección de primer plano cuando está activo.", - "listFocusAndSelectionBackground": "List/Tree enfocar y seleccionar fondo.", - "listFocusAndSelectionForeground": "List/Tree enfocar y seleccionar primer plano.", - "listInactiveSelectionBackground": "List/Tree selección de fondo cuando está inactivo.", - "listHoverBackground": "List/Tree mantener fondo.", - "listDropBackground": "List/Tree arrastrar y colocar fondo.", - "listFocusOutline": "List/Tree enfoca el color del contorno cuando está activo.", - "listInactiveFocusOutline": "List/Tree enfoca el color del contorno cuando está inactivo.", - "listSelectionOutline": "List/Tree selección de color del contorno.", - "listHoverOutline": "List/Tree mantener el color del contorno.", + "listFocusBackground": "Color de fondo de la lista o el árbol del elemento con el foco cuando la lista o el árbol están activos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no.", + "listFocusForeground": "Color de fondo de la lista o el árbol del elemento con el foco cuando la lista o el árbol están activos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no.", + "listActiveSelectionBackground": "Color de fondo de la lista o el árbol del elemento seleccionado cuando la lista o el árbol están activos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no.", + "listActiveSelectionForeground": "Color de primer plano de la lista o el árbol del elemento con el foco cuando la lista o el árbol están activos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no.", + "listInactiveSelectionBackground": "Color de fondo de la lista o el árbol del elemento seleccionado cuando la lista o el árbol están inactivos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no.", + "listInactiveSelectionForeground": "Color de primer plano de la lista o el árbol del elemento con el foco cuando la lista o el árbol esta inactiva. Una lista o un árbol tiene el foco del teclado cuando está activo, cuando esta inactiva no.", + "listHoverBackground": "Fondo de la lista o el árbol al mantener el mouse sobre los elementos.", + "listHoverForeground": "Color de primer plano de la lista o el árbol al pasar por encima de los elementos con el ratón.", + "listDropBackground": "Fondo de arrastrar y colocar la lista o el árbol al mover los elementos con el mouse.", + "highlight": "Color de primer plano de la lista o el árbol de las coincidencias resaltadas al buscar dentro de la lista o el ábol.", "pickerGroupForeground": "Selector de color rápido para la agrupación de etiquetas.", "pickerGroupBorder": "Selector de color rápido para la agrupación de bordes.", + "buttonForeground": "Color de primer plano del botón.", + "buttonBackground": "Color de fondo del botón.", + "buttonHoverBackground": "Color de fondo del botón al mantener el puntero.", + "badgeBackground": "Color de fondo de la insignia. Las insignias son pequeñas etiquetas de información, por ejemplo los resultados de un número de resultados.", + "badgeForeground": "Color de fondo de la insignia. Las insignias son pequeñas etiquetas de información, por ejemplo los resultados de un número de resultados.", + "scrollbarShadow": "Sombra de la barra de desplazamiento indica que la vista se ha despazado.", + "scrollbarSliderBackground": "Color de fondo del control deslizante.", + "scrollbarSliderHoverBackground": "Color de fondo del control deslizante al mantener el puntero.", + "scrollbarSliderActiveBackground": "Color de fondo del control deslizante cuando está activo.", + "progressBarBackground": "Color de fondo para la barra de progreso que se puede mostrar para las operaciones de larga duración.", "editorBackground": "Color de fondo del editor.", "editorForeground": "Color de primer plano predeterminado del editor.", - "editorSelection": "Color de la selección del editor.", + "editorWidgetBackground": "Color de fondo del editor de widgets como buscar/reemplazar", + "editorWidgetBorder": "Color de borde de los widgets del editor. El color solo se usa si el widget elige tener un borde y no invalida el color.", + "editorSelectionBackground": "Color de la selección del editor.", + "editorSelectionForeground": "Color del texto seleccionado para alto contraste.", "editorInactiveSelection": "Color de la selección en un editor inactivo.", "editorSelectionHighlight": "Color de las regiones con el mismo contenido que la selección.", "editorFindMatch": "Color de la coincidencia de búsqueda actual.", "findMatchHighlight": "Color de las demás coincidencias de búsqueda.", "findRangeHighlight": "Color del intervalo que limita la búsqueda.", + "hoverHighlight": "Resaltado debajo de la palabra para la que se muestra un recuadro al mantener el puntero.", + "hoverBackground": "Color de fondo al mantener el puntero en el editor.", + "hoverBorder": "Color del borde al mantener el puntero en el editor.", "activeLinkForeground": "Color de los vínculos activos.", - "linkForeground": "Color de los vínculos.", - "editorWidgetBackground": "Color de fondo del editor de widgets como buscar/reemplazar", - "editorWidgetShadow": "Color de sombra del editor de widgets como buscar/reemplazar" + "diffEditorInserted": "Color de fondo para el texto insertado.", + "diffEditorRemoved": "Color de fondo para el texto quitado.", + "diffEditorInsertedOutline": "Color de contorno para el texto insertado.", + "diffEditorRemovedOutline": "Color de contorno para el texto quitado.", + "mergeCurrentHeaderBackground": "Fondo del encabezado actual en conflictos de combinación alineados.", + "mergeCurrentContentBackground": "Fondo del contenido actual en conflictos de combinación alineados.", + "mergeIncomingHeaderBackground": "Fondo del encabezado de entrada en conflictos de combinación alineados.", + "mergeIncomingContentBackground": "Fondo del contenido de entrada en conflcitos de combinación alineados.", + "mergeCommonHeaderBackground": "Fondo del encabezado de ancestros comunes en conflictos de combinación alineados.", + "mergeCommonContentBackground": "Fondo del contenido de ancestros comunes en conflictos de combinación alineados.", + "mergeBorder": "Color del borde en los encabezados y el divisor en conflictos de combinación alineados.", + "overviewRulerCurrentContentForeground": "Primer plano de la regla de visión general actual para conflictos de combinación alineados.", + "overviewRulerIncomingContentForeground": "Primer plano de regla de visión general de entrada para conflictos de combinación alineados.", + "overviewRulerCommonContentForeground": "Primer plano de la regla de visión general de ancestros comunes para conflictos de combinación alineados." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/esn/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json new file mode 100644 index 0000000000000..c8303dca7e88d --- /dev/null +++ b/i18n/esn/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "overwritingExtension": "Sobrescribiendo la extensión {0} con {1}.", + "extensionUnderDevelopment": "Cargando la extensión de desarrollo en {0}" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/esn/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json new file mode 100644 index 0000000000000..68632e8f819ac --- /dev/null +++ b/i18n/esn/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "Cerrar", + "cancel": "Cancelar", + "ok": "Aceptar" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/api/node/extHostExplorerView.i18n.json b/i18n/esn/src/vs/workbench/api/node/extHostExplorerView.i18n.json new file mode 100644 index 0000000000000..7d556561528df --- /dev/null +++ b/i18n/esn/src/vs/workbench/api/node/extHostExplorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "No hay registrado ningún TreeExplorerNodeProvider con el identificador \"{0}\".", + "treeExplorer.failedToProvideRootNode": "TreeExplorerNodeProvider \"{0}\" no pudo proporcionar el nodo raíz." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/esn/src/vs/workbench/api/node/extHostTask.i18n.json new file mode 100644 index 0000000000000..4b90a12aaf247 --- /dev/null +++ b/i18n/esn/src/vs/workbench/api/node/extHostTask.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "task.label": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/api/node/extHostTreeView.i18n.json b/i18n/esn/src/vs/workbench/api/node/extHostTreeView.i18n.json new file mode 100644 index 0000000000000..7d556561528df --- /dev/null +++ b/i18n/esn/src/vs/workbench/api/node/extHostTreeView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "No hay registrado ningún TreeExplorerNodeProvider con el identificador \"{0}\".", + "treeExplorer.failedToProvideRootNode": "TreeExplorerNodeProvider \"{0}\" no pudo proporcionar el nodo raíz." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/esn/src/vs/workbench/api/node/extHostTreeViews.i18n.json new file mode 100644 index 0000000000000..1127a4ec4f832 --- /dev/null +++ b/i18n/esn/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeView.notRegistered": "No se ha registrado ninga vista del árbol con id '{0}'.", + "treeItem.notFound": "No se encontró ningún item del árbol con id '{0}'.", + "treeView.duplicateElement": "El elemento '{0}' ya está registrado" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/browser/actions/configureLocale.i18n.json b/i18n/esn/src/vs/workbench/browser/actions/configureLocale.i18n.json index 21745b9eaa003..949ae20646f9a 100644 --- a/i18n/esn/src/vs/workbench/browser/actions/configureLocale.i18n.json +++ b/i18n/esn/src/vs/workbench/browser/actions/configureLocale.i18n.json @@ -7,7 +7,7 @@ "configureLocale": "Configurar idioma", "displayLanguage": "Define el lenguaje para mostrar de VSCode.", "doc": "Consulte {0} para obtener una lista de idiomas compatibles.", - "restart": "Al cambiar el valor, es necesario reiniciar VSCode.", + "restart": "Al cambiar el valor se requiere reiniciar VSCode.", "fail.createSettings": "No se puede crear '{0}' ({1}).", "JsonSchema.locale": "Idioma de la interfaz de usuario que debe usarse." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json b/i18n/esn/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json index 86c8b000ea6ea..bfe695f895bca 100644 --- a/i18n/esn/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json +++ b/i18n/esn/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "hideActivitBar": "Ocultar barra de actividades", - "activityBarAriaLabel": "Modificador de vista activa" + "activityBarAriaLabel": "Modificador de vista activa", + "globalActions": "Acciones globales" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/esn/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index 88b1764fba97d..8c22a6eafe0b9 100644 --- a/i18n/esn/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/esn/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -19,6 +19,7 @@ "closeEditorsToTheLeft": "Cerrar los editores a la izquierda", "closeEditorsToTheRight": "Cerrar los editores a la derecha", "closeAllEditors": "Cerrar todos los editores", + "closeUnmodifiedEditors": "Cerrar los editores en el grupo sin modificar", "closeEditorsInOtherGroups": "Cerrar los editores de otros grupos", "closeOtherEditorsInGroup": "Cerrar otros editores", "closeEditorsInGroup": "Cerrar todos los editores del grupo", @@ -44,6 +45,8 @@ "openPreviousRecentlyUsedEditorInGroup": "Abrir el editor recientemente usado anterior en el grupo", "openNextRecentlyUsedEditorInGroup": "Abrir el siguiente editor recientemente usado en el grupo", "navigateEditorHistoryByInput": "Abrir el editor anterior desde el historial", + "openNextRecentlyUsedEditor": "Abrir el siguiente editor recientemente usado", + "openPreviousRecentlyUsedEditor": "Abrir el anterior editor recientemente usado", "clearEditorHistory": "Borrar historial del editor", "focusLastEditorInStack": "Abrir el último editor del grupo", "moveEditorLeft": "Mover el editor a la izquierda", diff --git a/i18n/esn/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/esn/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index 399678bda1960..7aae7a06e05de 100644 --- a/i18n/esn/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/esn/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -10,7 +10,9 @@ "multiSelection": "{0} selecciones", "endOfLineLineFeed": "LF", "endOfLineCarriageReturnLineFeed": "CRLF", - "tabFocusModeEnabled": "La tabulación mueve el foco", + "tabFocusModeEnabled": "Tabulación Mueve el Foco", + "screenReaderDetected": "Lector de Pantalla Detectado", + "screenReaderDetectedExtra": "Si no va a usar un lector de pantalla, cambie el valor de configuración \"editor.accessibilitySupport\" a \"desactivado\".", "disableTabMode": "Deshabilitar modo de accesibilidad", "gotoLine": "Ir a la línea", "indentation": "Sangría", diff --git a/i18n/esn/src/vs/workbench/browser/parts/editor/titleControl.i18n.json b/i18n/esn/src/vs/workbench/browser/parts/editor/titleControl.i18n.json index 21f680deedaa6..49c85dbc05257 100644 --- a/i18n/esn/src/vs/workbench/browser/parts/editor/titleControl.i18n.json +++ b/i18n/esn/src/vs/workbench/browser/parts/editor/titleControl.i18n.json @@ -8,6 +8,7 @@ "closeOthers": "Cerrar otros", "closeRight": "Cerrar a la derecha", "closeAll": "Cerrar todo", + "closeAllUnmodified": "Cerrar los no modificados", "keepOpen": "Mantener abierto", "showOpenedEditors": "Mostrar editores abiertos", "araLabelEditorActions": "Acciones del editor" diff --git a/i18n/esn/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json b/i18n/esn/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json new file mode 100644 index 0000000000000..7a95e7a0c694e --- /dev/null +++ b/i18n/esn/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpen": "Ir al archivo...", + "quickNavigateNext": "Navegar a siguiente en Quick Open", + "quickNavigatePrevious": "Navegar a anterior en Quick Open", + "quickSelectNext": "Seleccionar Siguiente en Quick Open", + "quickSelectPrevious": "Seleccionar Anterior en Quick Open" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/browser/quickopen.i18n.json b/i18n/esn/src/vs/workbench/browser/quickopen.i18n.json index bc196c6f3577f..6677960aba0d7 100644 --- a/i18n/esn/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/esn/src/vs/workbench/browser/quickopen.i18n.json @@ -6,6 +6,5 @@ { "noResultsMatching": "No hay resultados coincidentes", "noResultsFound2": "No se encontraron resultados", - "entryAriaLabel": "{0}, comando", - "noCommands": "No hay comandos coincidentes" + "entryAriaLabel": "{0}, comando" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/browser/viewlet.i18n.json b/i18n/esn/src/vs/workbench/browser/viewlet.i18n.json index 26b81eaef9214..ff2c96161787b 100644 --- a/i18n/esn/src/vs/workbench/browser/viewlet.i18n.json +++ b/i18n/esn/src/vs/workbench/browser/viewlet.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "collapse": "Contraer todo", - "viewToolbarAriaLabel": "{0} acciones" + "collapse": "Contraer todo" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/common/theme.i18n.json b/i18n/esn/src/vs/workbench/common/theme.i18n.json index b79ad5ecaea57..80233c0237bec 100644 --- a/i18n/esn/src/vs/workbench/common/theme.i18n.json +++ b/i18n/esn/src/vs/workbench/common/theme.i18n.json @@ -4,40 +4,58 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "tabsContainerBackground": "Color de fondo del contenedor de las pestañas. Las pestañas son contenedores de editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores y puede haber varios grupos de editores.", - "activeTabBackground": "Color de fondo de la pestaña activa. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", - "inactiveTabBackground": "Color de fondo de la pestaña inactiva. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", - "activeTabActiveGroupForeground": "Color de primer plano de la pestaña activa en un grupo activo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", - "activeTabInactiveGroupForeground": "Color de primer plano de la pestaña activa en un grupo inactivo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", - "inactiveTabActiveGroupForeground": "Color de primer plano de la pestaña inactiva en un grupo activo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", - "inactiveTabInactiveGroupForeground": "Color de primer plano de la pestaña inactiva en un grupo inactivo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", + "tabActiveBackground": "Color de fondo de la pestaña activa. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", + "tabInactiveBackground": "Color de fondo de la pestaña inactiva. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", "tabBorder": "Borde para separar las pestañas entre sí. Las pestañas son contenedores de editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", - "editorHeaderBackground": "Color de fondo del encabezado del titulo del editor cuando no hay pestañas habilitadas.", + "tabActiveForeground": "Color de primer plano de la pestaña activa en un grupo activo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", + "tabInactiveForeground": "Color de primer plano de la pestaña inactiva en un grupo activo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", + "tabUnfocusedActiveForeground": "Color de primer plano de la pestaña activa en un grupo inactivo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", + "tabUnfocusedInactiveForeground": "Color de primer plano de la pestaña inactiva en un grupo inactivo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", + "editorGroupBackground": "Color de fondo de un grupo de editores. Los grupos de editores son los contenedores de los editores. El color de fondo se ve cuando se mueven arrastrando los grupos de editores.", + "tabsContainerBackground": "Color de fondo del encabezado del título del grupo de editores cuando las fichas están habilitadas. Los grupos de editores son contenedores de editores.", + "tabsContainerBorder": "Color de borde del encabezado del título del grupo de editores cuando las fichas están habilitadas. Los grupos de editores son contenedores de editores.", + "editorGroupHeaderBackground": "Color de fondo del encabezado del título del grupo de editores cuando las fichas están deshabilitadas. Los grupos de editores son contenedores de editores.", "editorGroupBorder": "Color para separar varios grupos de editores entre sí. Los grupos de editores son los contenedores de los editores.", - "editorGroupBackground": "Color de fondo de un grupo de editores. Los grupos de editores son los contenedores de los editores.", - "editorDragAndDropBackground": "Color de fondo cuando se arrastran editores.", - "editorSideBySideBorder": "Color del borde para separar los detalles del lado maestro de editores en paralelo.", + "editorDragAndDropBackground": "Color de fondo cuando se arrastran los editores. El color debería tener transparencia para que el contenido del editor pueda brillar a su través.", "panelBackground": "Color de fondo del panel. Los paneles se muestran debajo del área de editores y contienen vistas, como Salida y Terminal integrado.", - "panelTopBorder": "Color del borde superior del panel que lo separa del editor. Los paneles se muestran debajo del área de editores y contienen vistas, como Salida y Terminal integrado.", + "panelBorder": "Color del borde superior del panel que lo separa del editor. Los paneles se muestran debajo del área de editores y contienen vistas, como Salida y Terminal integrado.", "panelActiveTitleForeground": "Color del título del panel activo. Los paneles se muestran debajo del área del editor y contienen vistas como Salida y Terminal integrado.", "panelInactiveTitleForeground": "Color del título del panel inactivo. Los paneles se muestran debajo del área del editor y contienen vistas como Salida y Terminal integrado.", "panelActiveTitleBorder": "Color de borde del título del panel activo. Los paneles se muestran debajo del área del editor y contienen vistas como Salida y Terminal integrado.", "statusBarForeground": "Color de primer plano de la barra de estado, que se muestra en la parte inferior de la ventana.", "statusBarBackground": "Color de fondo de la barra de estado estándar, que se muestra en la parte inferior de la ventana.", + "statusBarBorder": "Color de borde de la barra de estado que separa la barra lateral y el editor. La barra de estado se muestra en la parte inferior de la ventana.", "statusBarNoFolderBackground": "Color de fondo de la barra de estado cuando no hay ninguna carpeta abierta. La barra de estado se muestra en la parte inferior de la ventana.", + "statusBarNoFolderForeground": "Color de primer plano de la barra de estado cuando no hay ninguna carpeta abierta. La barra de estado se muestra en la parte inferior de la ventana.", "statusBarItemActiveBackground": "Color de fondo de un elemento de la barra de estado al hacer clic. La barra de estado se muestra en la parte inferior de la ventana.", "statusBarItemHoverBackground": "Color de fondo de un elemento de la barra de estado al mantener el puntero. La barra de estado se muestra en la parte inferior de la ventana.", - "statusBarInfoItemBackground": "Color de fondo del elemento de información de la barra de estado, que se muestra en la parte inferior de la ventana.", - "statusBarInfoItemHoverBackground": "Color de fondo del elemento de información de la barra de estado, que se muestra en la parte inferior de la ventana.", + "statusBarProminentItemBackground": "Color de fondo de los elementos destacados en la barra de estado. Estos elementos sobresalen para indicar importancia. La barra de estado está ubicada en la parte inferior de la ventana.", + "statusBarProminentItemHoverBackground": "Color de fondo de los elementos destacados en la barra de estado cuando se mantiene el mouse sobre estos elementos. Estos elementos sobresalen para indicar importancia. La barra de estado está ubicada en la parte inferior de la ventana.", "activityBarBackground": "Color de fondo de la barra de actividad, que se muestra en el lado izquierdo o derecho y que permite cambiar entre diferentes vistas de la barra lateral.", "activityBarForeground": "Color de fondo de la barra de actividad (por ejemplo utilizado por los iconos). La barra de actividad muestra en el lado izquierdo o derecho y permite cambiar entre diferentes vistas de la barra lateral.", - "activityBarDragAndDropBackground": "Color de arrastrar y colocar comentarios de la barra de actividad. La barra de actividad se muestra en el extremo izquierdo o derecho y permite cambiar entre vistas de la barra lateral.", - "activityBadgeBackground": "Color de fondo de distintivo de notificación de actividad. La barra de actividad se muestra en el extremo izquierdo o derecho y permite cambiar entre vistas de la barra lateral.", - "activityBadgeForeground": "Color de primer plano de distintivo de notificación de actividad. La barra de actividad se muestra en el extremo izquierdo o derecho y permite cambiar entre vistas de la barra lateral.", + "activityBarBorder": "Color de borde de la barra de actividad que separa la barra lateral. La barra de actividad se muestra en el extremo derecho o izquierdo y permite cambiar entre las vistas de la barra lateral.", + "activityBarDragAndDropBackground": "Arrastre y suelte el color de las sugerencias para los elementos de la barra de actividad. El color debería tener transparencias, de forma que los elementos de la barra continúen siendo visibles a través de él. La barra de actividad se muestra en el extremo izquierdo o derecho y permite cambiar entre distintas vistas de la barra lateral.", + "activityBarBadgeBackground": "Color de fondo de distintivo de notificación de actividad. La barra de actividad se muestra en el extremo izquierdo o derecho y permite cambiar entre vistas de la barra lateral.", + "activityBarBadgeForeground": "Color de primer plano de distintivo de notificación de actividad. La barra de actividad se muestra en el extremo izquierdo o derecho y permite cambiar entre vistas de la barra lateral.", "sideBarBackground": "Color de fondo de la barra lateral, que es el contenedor de vistas como Explorador y Búsqueda.", + "sideBarForeground": "Color de primer plano de la barra lateral, que es el contenedor de vistas como Explorador y Búsqueda.", + "sideBarBorder": "Color de borde de la barra lateral en el lado que separa el editor. La barra lateral es el contenedor de vistas como Explorador y Búsqueda.", "sideBarTitleForeground": "Color de primer plano del título de la barra lateral, que es el contenedor de vistas como Explorador y Búsqueda.", + "sideBarSectionHeaderBackground": "Color de fondo del encabezado de sección de la barra lateral, que es el contenedor de vistas como Explorador y Búsqueda.", + "sideBarSectionHeaderForeground": "Color de primer plano del encabezado de sección de la barra lateral, que es el contenedor de vistas como Explorador y Búsqueda.", "titleBarActiveForeground": "Color de primer plano de la barra de título cuando la ventana está activa. Tenga en cuenta que, actualmente, este clor solo se admite en macOS.", "titleBarInactiveForeground": "Color de primer plano de la barra de título cuando la ventana está inactiva. Tenga en cuenta que, actualmente, este color solo se admite en macOS.", "titleBarActiveBackground": "Fondo de la barra de título cuando la ventana está activa. Tenga en cuenta que, actualmente, este color solo se admite en macOS.", - "titleBarInactiveBackground": "Color de fondo de la barra de título cuando la ventana está inactiva. Tenga en cuenta que, actualmente, este color solo se admite en macOS." + "titleBarInactiveBackground": "Color de fondo de la barra de título cuando la ventana está inactiva. Tenga en cuenta que, actualmente, este color solo se admite en macOS.", + "notificationsForeground": "Color de primer plano de las notificaciones. Estas se deslizan en la parte superior de la ventana. ", + "notificationsBackground": "Color de fondo de las notificaciones. Estas se deslizan en la parte superior de la ventana. ", + "notificationsButtonBackground": "Color de fondo del botón de notificaciones. Estas se deslizan en la parte superior de la ventana.", + "notificationsButtonHoverBackground": "Color de fondo del botón de notificaciones al desplazar el ratón sobre él. Estas se deslizan en la parte superior de la ventana.", + "notificationsButtonForeground": "Color de primer plano del botón de notificaciones. Estas se deslizan en la parte superior de la ventana.", + "notificationsInfoBackground": "Color de fondo de la información de notificaciones. Estas se deslizan en la parte superior de la ventana.", + "notificationsInfoForeground": "Color de primer plano de la información de notificaciones. Estas se deslizan en la parte superior de la ventana.", + "notificationsWarningBackground": "Color de fondo del aviso de notificaciones. Estas se deslizan en la parte superior de la ventana.", + "notificationsWarningForeground": "Color de primer plano del aviso de notificaciones. Estas se deslizan en la parte superior de la ventana.", + "notificationsErrorBackground": "Color de fondo del error de notificaciones. Estas se deslizan en la parte superior de la ventana.", + "notificationsErrorForeground": "Color de primer plano del error de notificaciones. Estas se deslizan en la parte superior de la ventana." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/esn/src/vs/workbench/electron-browser/actions.i18n.json index cf43b7ec441f9..c290dc9153ea5 100644 --- a/i18n/esn/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/esn/src/vs/workbench/electron-browser/actions.i18n.json @@ -6,9 +6,6 @@ { "closeActiveEditor": "Cerrar editor", "closeWindow": "Cerrar ventana", - "switchWindow": "Cambiar de ventana", - "switchWindowPlaceHolder": "Seleccionar una ventana", - "current": "Ventana actual", "closeFolder": "Cerrar carpeta", "noFolderOpened": "No hay ninguna carpeta abierta en esta instancia para cerrar.", "newWindow": "Nueva ventana", @@ -20,11 +17,16 @@ "zoomReset": "Restablecer zoom", "appPerf": "Rendimiento de inicio", "reloadWindow": "Recargar ventana", - "openRecent": "Abrir recientes", + "switchWindowPlaceHolder": "Seleccionar una ventana a la que cambiar", + "current": "Ventana actual", + "switchWindow": "Cambiar de Ventana...", + "quickSwitchWindow": "Cambio Rápido de Ventana...", "folders": "carpetas", "files": "archivos", "openRecentPlaceHolderMac": "Seleccione una ruta de acceso (mantenga presionada la tecla Cmd para abrirla en una nueva ventana)", "openRecentPlaceHolder": "Seleccione una ruta de acceso para abrir (mantenga presionada la tecla Ctrl para abrirla en una nueva ventana)", + "openRecent": "Abrir Reciente...", + "quickOpenRecent": "Abrir Reciente Rapidamente...", "closeMessages": "Cerrar mensajes de notificación", "reportIssues": "Notificar problemas", "reportPerformanceIssue": "Notificar problema de rendimiento", @@ -32,10 +34,10 @@ "openDocumentationUrl": "Documentación", "openIntroductoryVideosUrl": "Vídeos de introducción", "toggleSharedProcess": "Alternar proceso compartido", - "navigateLeft": "Mover a la vista de la izquierda", - "navigateRight": "Mover a la vista de la derecha", - "navigateUp": "Mover a la vista superior", - "navigateDown": "Mover a la vista inferior", + "navigateLeft": "Navegar a la Vista de la Izquierda", + "navigateRight": "Navegar a la Vista de la Derecha", + "navigateUp": "Navegar a la Vista Superior", + "navigateDown": "Navegar a la Vista Inferior", "increaseViewSize": "Aumentar tamaño de vista actual", "decreaseViewSize": "Reducir tamaño de vista actual" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/electron-browser/extensionHost.i18n.json b/i18n/esn/src/vs/workbench/electron-browser/extensionHost.i18n.json index 5defdba5c56c3..6fbb60d36bdf6 100644 --- a/i18n/esn/src/vs/workbench/electron-browser/extensionHost.i18n.json +++ b/i18n/esn/src/vs/workbench/electron-browser/extensionHost.i18n.json @@ -7,5 +7,6 @@ "extensionHostProcess.startupFailDebug": "El host de extensiones no se inició en 10 segundos, puede que se detenga en la primera línea y necesita un depurador para continuar.", "extensionHostProcess.startupFail": "El host de extensiones no se inició en 10 segundos, lo cual puede ser un problema.", "extensionHostProcess.error": "Error del host de extensiones: {0}", + "devTools": "Herramientas de desarrollo", "extensionHostProcess.crash": "El host de extensiones finalizó inesperadamente. Recargue la ventana para recuperarlo." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/esn/src/vs/workbench/electron-browser/main.contribution.i18n.json index 4ebbc371d0d4c..4640c93e0a4c1 100644 --- a/i18n/esn/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,6 +7,7 @@ "view": "Ver", "help": "Ayuda", "file": "Archivo", + "developer": "Desarrollador", "showEditorTabs": "Controla si los editores abiertos se deben mostrar o no en pestañas.", "editorTabCloseButton": "Controla la posición de los botones de cierre de pestañas del editor o los deshabilita si se establece en \"off\".", "showIcons": "Controla si los editores abiertos deben mostrarse o no con un icono. Requiere que también se habilite un tema de icono.", @@ -14,6 +15,8 @@ "enablePreviewFromQuickOpen": "Controla si los editores abiertos mediante Quick Open se muestran en modo de vista previa. Los editores en modo de vista previa se reutilizan hasta que se conservan (por ejemplo, mediante doble clic o editándolos).", "editorOpenPositioning": "Controla dónde se abren los editores. Seleccione 'izquierda' o 'derecha' para abrir los editores situados a la izquierda o la derecha del que está actualmente activo. Seleccione 'primero' o 'último' para abrir los editores con independencia del que esté actualmente activo.", "revealIfOpen": "Controla si un editor se muestra en alguno de los grupos visibles cuando se abre. Si se deshabilita esta opción, un editor preferirá abrirse en el grupo de editores activo en ese momento. Si se habilita, un editor ya abierto se mostrará en lugar de volver a abrirse en el grupo de editores activo. Tenga en cuenta que hay casos en los que esta opción se omite; por ejemplo, cuando se fuerza la apertura de un editor en un grupo específico o junto al grupo activo actual.", + "commandHistory": "Controla el número de comandos usados recientemente a almacenar en el historial para la paleta de comandos. Establezca a 0 para deshabilitar el historial de comandos.", + "preserveInput": "Controla si la última entrada introducida en la paleta de comandos debería ser restaurada cuando sea abierta la próxima vez.", "closeOnFocusLost": "Controla si Quick Open debe cerrarse automáticamente cuando pierde el foco.", "openDefaultSettings": "Controla si la configuración de apertura también abre un editor que muestra todos los valores predeterminados.", "sideBarLocation": "Controla la ubicación de la barra lateral. Puede mostrarse a la izquierda o a la derecha del área de trabajo.", @@ -30,23 +33,24 @@ "window.openFoldersInNewWindow.off": "Las carpetas reemplazarán la ventana activa más reciente", "window.openFoldersInNewWindow.default": "Las carpetas se abrirán en una nueva ventana a menos que se seleccione una carpeta desde la aplicación (p. ej. mediante el menú Archivo)", "openFoldersInNewWindow": "Controla si las carpetas deben abrirse en una ventana nueva o reemplazar la última ventana activa.\n- default: las carpetas se abrirán en una ventana nueva, a menos que se seleccione una carpeta desde la aplicación (por ejemplo, desde el menú Archivo)\n- on: las carpetas se abrirán en una ventana nueva\n- off: las carpetas reemplazarán la última ventana activa\nTenga en cuenta que aún puede haber casos en los que este parámetro se ignore (por ejemplo, al usar la opción de la línea de comandos -new-window o -reuse-window).", - "window.reopenFolders.none": "No volver a abrir nunca una carpeta.", - "window.reopenFolders.one": "Volver a abrir la carpeta activa más reciente.", - "window.reopenFolders.all": "Volver a abrir todas las carpetas de la sesión más reciente.", - "reopenFolders": "Controla cómo se vuelven a abrir las carpetas tras un reinicio. Seleccione \"none\" para no volver a abrir jamás una carpeta, \"one\" para volver a abrir la última carpeta en la que trabajó o seleccione \"all\" para volver a abrir todas las carpetas de la última sesión.", + "window.reopenFolders.all": "Reabrir todas las ventanas.", + "window.reopenFolders.folders": "Reabrir todas las carpetas. Las ventanas vacías no serán restauradas.", + "window.reopenFolders.one": "Reabrir la última ventana activa.", + "window.reopenFolders.none": "Nunca reabrir una ventana. Empezar siempre con una vacía.", + "restoreWindows": "Controla cómo se vuelven a abrir las ventanas tras un reinicio. Seleccione 'none' para no volver a abrir jamás una ventana, 'one' para volver a abrir la última ventana en la que trabajó, 'folders' para volver a abrir todas las carpetas que tenía abiertas o seleccione 'all' para volver a abrir todas las ventanas de la última sesión.", "restoreFullscreen": "Controla si una ventana se debe restaurar al modo de pantalla completa si se salió de ella en dicho modo.", "zoomLevel": "Ajuste el nivel de zoom de la ventana. El tamaño original es 0 y cada incremento (por ejemplo, 1) o disminución (por ejemplo, -1) representa una aplicación de zoom un 20 % más grande o más pequeño. También puede especificar decimales para ajustar el nivel de zoom con una granularidad más precisa.", - "title": "Controla el título de la ventana según el editor activo. Las variables se sustituyen según el contexto: ${activeEditorShort}: por ejemplo, myFile.txt ${activeEditorMedium}: por ejemplo, myFolder/myFile.txt ${activeEditorLong}: por ejemplo, /Users/Development/myProject/myFolder/myFile.txt ${rootName}: por ejemplo, myProject ${rootPath}: por ejemplo, /Users/Development/myProject ${appName}: por ejemplo, VS Code ${dirty}: un indicador con modificaciones si el editor activo está desfasado ${separator}: un separador condicional (\" - \") que solo se muestra cuando está rodeado por variables con valores", "window.newWindowDimensions.default": "Abrir las nuevas ventanas en el centro de la pantalla.", "window.newWindowDimensions.inherit": "Abrir las nuevas ventanas con la misma dimensión que la última activa.", "window.newWindowDimensions.maximized": "Abrir las nuevas ventanas maximizadas.", "window.newWindowDimensions.fullscreen": "Abrir las nuevas ventanas en modo de pantalla completa.", - "newWindowDimensions": "Controla las dimensiones de la apertura de una nueva ventana. De manera predeterminada, una nueva ventana se abrirá en el centro de la pantalla con dimensiones reducidas. Si se establece en \"inherit\", la ventana tendrá las mismas dimensiones que la última activa. Si se establece en \"maximized\", la ventana se abrirá en su valor máximo y a pantalla completa si se establece en \"fullscreen\".", + "newWindowDimensions": "Controla las dimensiones de la nueva ventana cuando ya existe alguna ventana abierta. Por defecto, una nueva ventana se abrirá en el centro de la pantalla con dimensiones pequeñas. Cuando se establece como 'heredar', la ventana tomará las dimensiones de la última ventana activa. Cuando se establece a 'maximizar', la ventana se abrirá maximizada, y a pantalla completa si fue configurada como 'pantalla completa'. Tenga en cuenta que esta configuración no afecta a la primera ventana abierta. La primera ventana siempre restaurará el tamaño y posición en la que quedó antes de ser cerrada.", "window.menuBarVisibility.default": "El menú solo está oculto en modo de pantalla completa.", "window.menuBarVisibility.visible": "El menú está siempre visible incluso en modo de pantalla completa.", "window.menuBarVisibility.toggle": "El menú está oculto pero se puede mostrar mediante la tecla Alt.", "window.menuBarVisibility.hidden": "El menú está siempre oculto.", "menuBarVisibility": "Controla la visibilidad de la barra de menús. El valor \"alternar\" significa que la barra de menús está oculta y que se mostrará al presionar una sola vez la tecla Alt. La barra de menús estará visible de forma predeterminada, a menos que se use el modo de pantalla completa para la ventana.", + "enableMenuBarMnemonics": "Si se activa, los menús principales se pueden abrir por mediación de los métodos abreviados Alt-tecla. Desactivar los mnemónicos permite vincular estos métodos Alt-tecla a comandos del editor.", "autoDetectHighContrast": "Si está habilitado, se cambiará automáticamente al tema de contraste alto si Windows utiliza un tema de contraste alto, y al tema oscuro si cambia desde un tema de contraste alto de Windows.", "titleBarStyle": "Ajuste la apariencia de la barra de título de la ventana. Se debe realizar un reinicio completo para aplicar los cambios.", "window.nativeTabs": "Habilita las fichas de ventana en macOS Sierra. Note que los cambios requieren que reinicie el equipo y las fichas nativas deshabilitan cualquier estilo personalizado que haya configurado.", @@ -56,5 +60,9 @@ "zenMode.hideTabs": "Controla si la activación del modo zen también oculta las pestañas del área de trabajo.", "zenMode.hideStatusBar": "Controla si la activación del modo zen oculta también la barra de estado en la parte inferior del área de trabajo.", "zenMode.hideActivityBar": "Controla si la activación del modo zen oculta también la barra de estado en la parte izquierda del área de trabajo.", - "zenMode.restore": "Controla si una ventana debe restaurarse a modo zen si se cerró en modo zen." + "zenMode.restore": "Controla si una ventana debe restaurarse a modo zen si se cerró en modo zen.", + "workspaceConfigurationTitle": "Área de trabajo", + "workspaces.title": "Configuración de carpetas para el área de trabajo", + "files.exclude.boolean": "El patrón global con el que se harán coincidir las rutas de acceso de los archivos. Establézcalo en true o false para habilitarlo o deshabilitarlo.", + "workspaces.additionalFolders": "Carpetas en este área de trabajo" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/electron-browser/shell.i18n.json b/i18n/esn/src/vs/workbench/electron-browser/shell.i18n.json index b9f16ccb05c73..403b7012cbef9 100644 --- a/i18n/esn/src/vs/workbench/electron-browser/shell.i18n.json +++ b/i18n/esn/src/vs/workbench/electron-browser/shell.i18n.json @@ -4,9 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "runningAsRoot": "Se recomienda no ejecutar Code como 'root'.", - "prof.message": "Los perfiles se crearon correctamente.", - "prof.detail": "Cree un problema y asóciele manualmente los siguientes archivos: {0}", - "prof.restartAndFileIssue": "Crear problema y reiniciar", - "prof.restart": "Reiniciar" + "runningAsRoot": "Se recomienda no ejecutar Code como 'root'." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/electron-browser/window.i18n.json b/i18n/esn/src/vs/workbench/electron-browser/window.i18n.json index f3b1f414ce3e0..8622e2e3d7dbe 100644 --- a/i18n/esn/src/vs/workbench/electron-browser/window.i18n.json +++ b/i18n/esn/src/vs/workbench/electron-browser/window.i18n.json @@ -11,7 +11,5 @@ "paste": "Pegar", "selectAll": "Seleccionar todo", "confirmOpen": "¿Seguro que desea abrir {0} carpetas?", - "confirmOpenButton": "&&Abrir...", - "developer": "Desarrollador", - "file": "Archivo" + "confirmOpenButton": "&&Abrir..." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/esn/src/vs/workbench/electron-browser/workbench.i18n.json new file mode 100644 index 0000000000000..24a3d974637a1 --- /dev/null +++ b/i18n/esn/src/vs/workbench/electron-browser/workbench.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "developer": "Desarrollador", + "file": "Archivo" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json b/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json new file mode 100644 index 0000000000000..58480e0cd81d8 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emergencyConfOn": "Se cambiará ahora el valor de configuración \"editor.accessibilitySupport\" a \"activado\".", + "openingDocs": "Se abrirá ahora la página de documentación de accesibilidad de VS Code.", + "introMsg": "Gracias por probar las opciones de accesibilidad de VS Code.", + "status": "Estado:", + "changeConfigToOnMac": "Para configurar el editor de forma que esté optimizado de permanentemente para su uso con un lector de pantalla, presione ahora Comando+E.", + "changeConfigToOnWinLinux": "Para configurar el editor de forma que esté optimizado permanentemente para su uso con un lector de pantalla, presione ahora Control+E.", + "auto_unknown": "El editor está configurado para usar API de plataforma para detectar cuándo está conectado un lector de pantalla, pero el entorno actual de tiempo de ejecución no admite esta característica.", + "auto_on": "El editor ha detectado automáticamente un lector de pantalla conectado.", + "auto_off": "El editor está configurado para detectar automáticamente cuándo está conectado un lector de pantalla, lo que no es el caso en este momento.", + "configuredOn": "El editor está configurado para optimizarse permanentemente para su uso con un lector de pantalla; para cambiar este comportamiento, edite el valor de configuración \"editor.accessibilitySupport\".", + "configuredOff": "El editor está configurado de forma que no esté nunca optimizado para su uso con un lector de pantalla.", + "tabFocusModeOnMsg": "Al presionar TAB en el editor actual, el foco se mueve al siguiente elemento activable. Presione {0} para activar o desactivar este comportamiento.", + "tabFocusModeOnMsgNoKb": "Al presionar TAB en el editor actual, el foco se mueve al siguiente elemento activable. El comando {0} no se puede desencadenar actualmente mediante un enlace de teclado.", + "tabFocusModeOffMsg": "Al presionar TAB en el editor actual, se insertará el carácter de tabulación. Presione {0} para activar o desactivar este comportamiento.", + "tabFocusModeOffMsgNoKb": "Al presionar TAB en el editor actual, se insertará el carácter de tabulación. El comando {0} no se puede desencadenar actualmente mediante un enlace de teclado.", + "openDocMac": "Presione Comando+H ahora para abrir una ventana de explorador con más información de VS Code relacionada con la accesibilidad.", + "openDocWinLinux": "Presione Control+H ahora para abrir una ventana de explorador con más información de VS Code relacionada con la accesibilidad.", + "outroMsg": "Para descartar esta información sobre herramientas y volver al editor, presione Esc o Mayús+Escape.", + "ShowAccessibilityHelpAction": "Mostrar ayuda de accesibilidad" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json index c5e4314489b8e..1a9d83970b8bd 100644 --- a/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "workbench.action.inspectKeyMap": "Developer: Inspect Key Mapppings" + "workbench.action.inspectKeyMap": "Desarrollador: inspeccionar asignaciones de teclas " } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json b/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..3c11c7eb06259 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inspectTMScopes": "Desarrollador: Inspeccionar ámbitos de TM", + "inspectTMScopesWidget.loading": "Cargando..." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json b/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json new file mode 100644 index 0000000000000..49bec3bfc316d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parseErrors": "Errores al analizar {0}: {1}", + "schema.openBracket": "Secuencia de cadena o corchete de apertura.", + "schema.closeBracket": "Secuencia de cadena o corchete de cierre.", + "schema.comments": "Define los símbolos de comentario", + "schema.blockComments": "Define cómo se marcan los comentarios de bloque.", + "schema.blockComment.begin": "Secuencia de caracteres que inicia un comentario de bloque.", + "schema.blockComment.end": "Secuencia de caracteres que finaliza un comentario de bloque.", + "schema.lineComment": "Secuencia de caracteres que inicia un comentario de línea.", + "schema.brackets": "Define los corchetes que aumentan o reducen la sangría.", + "schema.autoClosingPairs": "Define el par de corchetes. Cuando se escribe un corchete de apertura, se inserta automáticamente el corchete de cierre.", + "schema.autoClosingPairs.notIn": "Define una lista de ámbitos donde los pares automáticos están deshabilitados.", + "schema.surroundingPairs": "Define los pares de corchetes que se pueden usar para encerrar una cadena seleccionada.", + "schema.wordPattern": " La definición de la palabra en el idioma.", + "schema.wordPattern.pattern": "El patrón de expresión regular utilizado para localizar palabras.", + "schema.wordPattern.flags": "Los flags de expresión regular utilizados para localizar palabras.", + "schema.wordPattern.flags.errorMessage": "Debe coincidir con el patrón `/^([gimuy]+)$/`.", + "schema.indentationRules.increaseIndentPattern.errorMessage": "Debe coincidir con el patrón `/^([gimuy]+)$/`.", + "schema.indentationRules.decreaseIndentPattern.errorMessage": "Debe coincidir con el patrón `/^([gimuy]+)$/`.", + "schema.indentationRules.indentNextLinePattern.errorMessage": "Debe coincidir con el patrón `/^([gimuy]+)$/`.", + "schema.indentationRules.unIndentedLinePattern.errorMessage": "Debe coincidir con el patrón `/^([gimuy]+)$/`." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json b/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..3c11c7eb06259 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inspectTMScopes": "Desarrollador: Inspeccionar ámbitos de TM", + "inspectTMScopesWidget.loading": "Cargando..." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json b/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json new file mode 100644 index 0000000000000..6612e373361ce --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "Alternar modificador multicursor" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index 5850e2e3bb205..f03e5fb4d1c84 100644 --- a/i18n/esn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -6,6 +6,7 @@ { "openLaunchJson": "Abrir {0}", "launchJsonNeedsConfigurtion": "Configurar o reparar 'launch.json'", + "noFolderDebugConfig": "Abra una carpeta para trabajar con la configuración avanzada de depuración.", "startDebug": "Iniciar depuración", "startWithoutDebugging": "Iniciar sin depurar", "selectAndStartDebugging": "Seleccionar e iniciar la depuración", @@ -34,6 +35,7 @@ "editConditionalBreakpoint": "Editar punto de interrupción...", "setValue": "Establecer valor", "addWatchExpression": "Agregar expresión", + "editWatchExpression": "Editar expresión", "addToWatchExpressions": "Agregar a inspección", "removeWatchExpression": "Quitar expresión", "removeAllWatchExpressions": "Quitar todas las expresiones", diff --git a/i18n/esn/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json new file mode 100644 index 0000000000000..807b2b2952eb9 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugToolBarBackground": "Color de fondo de la barra de herramientas de depuración" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json new file mode 100644 index 0000000000000..7b43ce773f7bd --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileLinkMac": "Clic para seguir (Cmd + clic se abre en el lateral)", + "fileLink": "Clic para seguir (Ctrl + clic se abre en el lateral)" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/debug/common/debug.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/common/debug.i18n.json new file mode 100644 index 0000000000000..ba49f6334da9d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/debug/common/debug.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "internalConsoleOptions": "Controla el comportamiento de la consola de depuración interna." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/debug/common/debugModel.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/common/debugModel.i18n.json index 1556a2e309e3e..e01a623f5d084 100644 --- a/i18n/esn/src/vs/workbench/parts/debug/common/debugModel.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/debug/common/debugModel.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "unknownSource": "Origen desconocido", "notAvailable": "no disponible", - "startDebugFirst": "Inicie una sesión de depuración para evaluar", - "unknownStack": "Ubicación de pila desconocida" + "startDebugFirst": "Inicie una sesión de depuración para evaluar" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/debug/common/debugSource.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/common/debugSource.i18n.json new file mode 100644 index 0000000000000..733c87f80991d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/debug/common/debugSource.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownSource": "Origen desconocido" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json new file mode 100644 index 0000000000000..516affc120439 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noFolderDebugConfig": "Abra una carpeta para trabajar con la configuración avanzada de depuración." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index 96a50f5d740f8..ce2f816c86847 100644 --- a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -5,8 +5,8 @@ // Do not edit this file. It is machine generated. { "snapshotObj": "Solo se muestran valores primitivos para este objeto.", - "debuggingStarted": "La depuración se ha iniciado.", "debuggingPaused": "La depuración se ha pausado. Motivo: {0}, {1} {2}", + "debuggingStarted": "La depuración se ha iniciado.", "debuggingStopped": "La depuración se ha detenido.", "breakpointAdded": "Punto de interrupción agregado, línea {0}, archivo {1}", "breakpointRemoved": "Punto de interrupción quitado, línea {0}, archivo {1}", diff --git a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json index 62859637baa26..8155a083b752d 100644 --- a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json @@ -6,5 +6,6 @@ { "copyValue": "Copiar valor", "copy": "Copiar", + "copyAll": "Copiar todo", "copyStackTrace": "Copiar pila de llamadas" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json index f9e4f7ece7f03..da521a326ccf1 100644 --- a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json @@ -7,5 +7,6 @@ "replAriaLabel": "Panel de read–eval–print loop", "actions.repl.historyPrevious": "Historial anterior", "actions.repl.historyNext": "Historial siguiente", - "actions.repl.acceptInput": "REPL - Aceptar entrada" + "actions.repl.acceptInput": "REPL - Aceptar entrada", + "actions.repl.copyAll": "Depuración: Consola Copiar Todo" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json index e430f864249bb..c71edc9f51f89 100644 --- a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json @@ -5,8 +5,6 @@ // Do not edit this file. It is machine generated. { "stateCapture": "El estado del objeto se captura desde la primera evaluación", - "fileLinkMac": "Clic para seguir (Cmd + clic se abre en el lateral)", - "fileLink": "Clic para seguir (Ctrl + clic se abre en el lateral)", "replVariableAriaLabel": "La variable {0} tiene el valor {1}, read–eval–print loop, depuración", "replExpressionAriaLabel": "La expresión {0} tiene el valor {1}, read–eval–print loop, depuración", "replValueOutputAriaLabel": "{0}, read–eval–print loop, depuración", diff --git a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json index 916ac3e48848c..ff677b59a60d7 100644 --- a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "statusBarDebuggingBackground": "Color de fondo de la barra de estado cuando se está depurando un programa. La barra de estado se muestra en la parte inferior de la ventana" + "statusBarDebuggingBackground": "Color de fondo de la barra de estado cuando se está depurando un programa. La barra de estado se muestra en la parte inferior de la ventana", + "statusBarDebuggingForeground": "Color de primer plano de la barra de estado cuando se está depurando un programa. La barra de estado se muestra en la parte inferior de la ventana" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index 3ebe0e2280865..00a55728fff7c 100644 --- a/i18n/esn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,12 +7,12 @@ "debugAdapterBinNotFound": "El ejecutable del adaptador de depuración \"{0}\" no existe.", "debugAdapterCannotDetermineExecutable": "No se puede determinar el ejecutable para el adaptador de depuración \"{0}\".", "debugType": "Tipo de configuración.", + "debugTypeNotRecognised": "Este tipo de depuración no se reconoce. Compruebe que tiene instalada la correspondiente extensión de depuración y que está habilitada.", "node2NotSupported": "\"node2\" ya no se admite; use \"node\" en su lugar y establezca el atributo \"protocol\" en \"inspector\".", "debugName": "Nombre de la configuración. Aparece en el menú desplegable de la configuración de inicio.", "debugRequest": "Tipo de solicitud de la configuración. Puede ser \"launch\" o \"attach\".", "debugServer": "Solo para el desarrollo de extensiones de depuración: si se especifica un puerto, VS Code intenta conectarse a un adaptador de depuración que se ejecuta en modo servidor", "debugPrelaunchTask": "Tarea que se va a ejecutar antes de iniciarse la sesión de depuración.", - "internalConsoleOptions": "Controla el comportamiento de la consola de depuración interna.", "debugWindowsConfiguration": "Atributos de configuración de inicio específicos de Windows.", "debugOSXConfiguration": "Atributos de configuración de inicio específicos de OS X.", "debugLinuxConfiguration": "Atributos de configuración de inicio específicos de Linux.", diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json new file mode 100644 index 0000000000000..80bd75c0a090d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "balanceInward": "Emmet: Equilibrio (entrante)", + "balanceOutward": "Emmet: Equilibrio (saliente)" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json new file mode 100644 index 0000000000000..a06b5c267dd11 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "previousEditPoint": "Emmet: Ir al punto de edición anterior", + "nextEditPoint": "Emmet: Ir al punto de edición siguiente" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json new file mode 100644 index 0000000000000..0cc657ddc149a --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "evaluateMathExpression": "Emmet: Evaluar expresión matemática" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json new file mode 100644 index 0000000000000..89f65c5221b5a --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "expandAbbreviationAction": "Emmet: Expandir abreviatura" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json new file mode 100644 index 0000000000000..ad86576118f83 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "incrementNumberByOneTenth": "Emmet: Aumentar por 0.1", + "incrementNumberByOne": "Emmet: Aumentar por 1", + "incrementNumberByTen": "Emmet: Aumentar por 10", + "decrementNumberByOneTenth": "Emmet: Disminuir por 0.1", + "decrementNumberByOne": "Emmet: Disminuir por 1", + "decrementNumberByTen": "Emmet: Disminuir por 10" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json new file mode 100644 index 0000000000000..d87b661b4e8a9 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "matchingPair": "Emmet: Ir al par coincidente" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json new file mode 100644 index 0000000000000..c0708b46d94b2 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mergeLines": "Emmet: Combinar líneas" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json new file mode 100644 index 0000000000000..13ab5650e82d9 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reflectCSSValue": "Emmet: Reflejar valor CSS" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json new file mode 100644 index 0000000000000..376b817f89ecc --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeTag": "Emmet: Quitar etiqueta" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json new file mode 100644 index 0000000000000..632ec2d3325ba --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "selectPreviousItem": "Emmet: Seleccionar elemento anterior", + "selectNextItem": "Emmet: Seleccionar elemento siguiente" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json new file mode 100644 index 0000000000000..7daa550395100 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "splitJoinTag": "Emmet: Dividir/combinar etiqueta" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json new file mode 100644 index 0000000000000..4c135de0f9c27 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleComment": "Emmet: Alternar comentario" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json new file mode 100644 index 0000000000000..7e29db1791985 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateImageSize": "Emmet: Actualizar tamaño de la imagen" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json new file mode 100644 index 0000000000000..b09f7caa8be15 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateTag": "Emmet: Actualizar etiqueta", + "enterTag": "Ingresar etiqueta", + "tag": "Etiqueta" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json new file mode 100644 index 0000000000000..5b686426df5ee --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wrapWithAbbreviationAction": "Emmet: Encapsular con abreviatura", + "enterAbbreviation": "Ingresar abreviatura", + "abbreviation": "Abreviatura" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json new file mode 100644 index 0000000000000..a1f452f38ff14 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emmetConfigurationTitle": "Emmet", + "triggerExpansionOnTab": "Cuando se habilita, se expande la abreviación Emmet al presionar la tecla TAB.", + "emmetPreferences": "Preferencias usadas para modificar el comportamiento de algunas acciones y resoluciones de Emmet.", + "emmetSyntaxProfiles": "Defina el perfil de la sintaxis especificada o use su propio perfil con reglas específicas.", + "emmetExclude": "Matriz de lenguajes donde no deben expandirse la abreviación Emmet.", + "emmetExtensionsPath": "Ruta de acceso a una carpeta que contiene perfiles de Emmet, fragmentos de código y preferencias", + "useNewEmmet": "Pruebe los nuevos módulos de Emmet (que finalmente sustituirán a la biblioteca anterior de Emmet) para conocer todas las características de Emmet." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index 48ebc8de8ee27..37239ff3cca88 100644 --- a/i18n/esn/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -4,10 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "vscode.extension.contributes.explorer": "Aporta viewlet de Tree Explorer personalizado a la barra lateral", - "vscode.extension.contributes.explorer.treeExplorerNodeProviderId": "Identificador único usado para identificar el proveedor registrado a través de vscode.workspace.registerTreeExplorerNodeProvider", - "vscode.extension.contributes.explorer.treeLabel": "Cadena en lenguaje natural usada para representar el Tree Explorer personalizado", - "vscode.extension.contributes.explorer.icon": "Ruta de acceso al icono de viewlet en la barra de actividades", + "vscode.extension.contributes.view": "Aporta una vista personalizada", + "vscode.extension.contributes.view.id": "Identificador único usado para identificar la vista creada a través de vscode.workspace.createTreeView", + "vscode.extension.contributes.view.label": "Cadena en lenguaje natural usada para representar la vista.", + "vscode.extension.contributes.view.icon": "Ruta de acceso al icono de la vista", + "vscode.extension.contributes.views": "Aporta vistas personalizada", "showViewlet": "Mostrar {0}", "view": "Ver" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index bd5f70d9a8dc7..e68b4424c5280 100644 --- a/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -24,6 +24,10 @@ "default": "Predeterminado", "debuggers": "Depuradores ({0})", "debugger name": "Nombre", + "views": "Vistas ({0})", + "view id": "Id.", + "view name": "Nombre", + "view location": "Donde", "themes": "Temas ({0})", "JSON Validation": "Validación JSON ({0})", "commands": "Comandos ({0})", diff --git a/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index 7da24054556a5..5e236865193d6 100644 --- a/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -22,6 +22,8 @@ "disableGloballyAction": "Siempre", "disableAction": "Deshabilitar", "checkForUpdates": "Buscar actualizaciones", + "enableAutoUpdate": "Habilitar extensiones de actualización automática", + "disableAutoUpdate": "Deshabilitar extensiones de actualización automática", "updateAll": "Actualizar todas las extensiones", "reloadAction": "Recargar", "postUpdateTooltip": "Recargar para actualizar", @@ -44,6 +46,8 @@ "showWorkspaceRecommendedExtensions": "Mostrar extensiones recomendadas del área de trabajo", "showRecommendedKeymapExtensions": "Mostrar asignaciones de teclado recomendadas", "showRecommendedKeymapExtensionsShort": "Asignaciones de teclado", + "showLanguageExtensions": "Mostrar extensiones del lenguaje", + "showLanguageExtensionsShort": "Extensiones del lenguaje", "configureWorkspaceRecommendedExtensions": "Configurar extensiones recomendadas (área de trabajo)", "ConfigureWorkspaceRecommendations.noWorkspace": "Las recomendaciones solo están disponibles en una carpeta de área de trabajo.", "OpenExtensionsFile.failed": "No se puede crear el archivo \"extensions.json\" dentro de la carpeta \".vscode\" ({0}).", @@ -51,5 +55,8 @@ "disableAll": "Deshabilitar todas las extensiones instaladas", "disableAllWorkspace": "Deshabilitar todas las extensiones instaladas para esta área de trabajo", "enableAll": "Habilitar todas las extensiones instaladas", - "enableAllWorkspace": "Habilitar todas las extensiones instaladas para esta área de trabajo" + "enableAllWorkspace": "Habilitar todas las extensiones instaladas para esta área de trabajo", + "extensionButtonProminentBackground": "Color de fondo del botón para la extensión de acciones que se destacan (por ejemplo, el botón de instalación).", + "extensionButtonProminentForeground": "Color de primer plano del botón para la extensión de acciones que se destacan (por ejemplo, botón de instalación).", + "extensionButtonProminentHoverBackground": "Color de fondo del botón al mantener el mouse para la extensión de acciones que se destacan (por ejemplo, el botón de instalación)." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index e9448e4adfd8e..845e8de1c17f9 100644 --- a/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -8,5 +8,9 @@ "showRecommendations": "Mostrar recomendaciones", "neverShowAgain": "No volver a mostrar", "close": "Cerrar", - "workspaceRecommended": "Esta área de trabajo tiene recomendaciones de extensión." + "workspaceRecommended": "Esta área de trabajo tiene recomendaciones de extensión.", + "ignoreExtensionRecommendations": "¿Desea despreciar todas las recomendaciones de extensión?", + "ignoreAll": "Sí, despreciar todas.", + "no": "No", + "cancel": "Cancelar" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index c7bb64b9c26ec..cfbe38f24db78 100644 --- a/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -10,5 +10,6 @@ "extensions": "Extensiones", "view": "Ver", "extensionsConfigurationTitle": "Extensiones", - "extensionsAutoUpdate": "Actualizar extensiones automáticamente" + "extensionsAutoUpdate": "Actualizar extensiones automáticamente", + "extensionsIgnoreRecommendations": "No tener en cuenta las recomendaciones de extensión." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json new file mode 100644 index 0000000000000..6151f36cc6b22 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "disableOtherKeymapsConfirmation": "¿Quiere deshabilitar otras asignaciones de teclas ({0}) para evitar conflictos entre enlaces de teclado?", + "yes": "Sí", + "no": "No", + "betterMergeDisabled": "La extensión Mejor combinación está ahora integrada, la extensión instalada se deshabilitó y no se puede desinstalar.", + "uninstall": "Desinstalación", + "later": "Más tarde" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json index 3b0b63868166e..a1c4d4fecbb94 100644 --- a/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json @@ -5,11 +5,10 @@ // Do not edit this file. It is machine generated. { "searchExtensions": "Buscar extensiones en Marketplace", - "extensions": "Extensiones", "sort by installs": "Criterio de ordenación: Número de instalaciones", "sort by rating": "Criterio de ordenación: Clasificación", "sort by name": "Ordenar por: Nombre", - "no extensions found": "No se encontraron extensiones.", "suggestProxyError": "Marketplace devolvió 'ECONNREFUSED'. Compruebe la configuración de 'http.proxy'.", + "extensions": "Extensiones", "outdatedExtensions": "{0} extensiones obsoletas" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json new file mode 100644 index 0000000000000..8ac45ecccd592 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensions": "Extensiones", + "no extensions found": "No se encontraron extensiones.", + "suggestProxyError": "Marketplace devolvió 'ECONNREFUSED'. Compruebe la configuración de 'http.proxy'." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json b/i18n/esn/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json index a92af235225c7..9500b95413885 100644 --- a/i18n/esn/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json @@ -13,5 +13,7 @@ "cancel": "Cancelar", "singleDependentError": "No se puede deshabilitar la extensión \"{0}\". La extensión \"{1}\" depende de ella.", "twoDependentsError": "No se puede deshabilitar la extensión \"{0}\". Las extensiones \"{1}\" y \"{2}\" dependen de ella.", - "multipleDependentsError": "No se puede deshabilitar la extensión \"{0}\". Las extensiones \"{1}\", \"{2}\" y otras dependen de ella." + "multipleDependentsError": "No se puede deshabilitar la extensión \"{0}\". Las extensiones \"{1}\", \"{2}\" y otras dependen de ella.", + "installConfirmation": "Desea instalar la extensión '{0}' ?", + "install": "Instalar" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index d7457f5305a42..4e2aa17a2a936 100644 --- a/i18n/esn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,7 +16,7 @@ "associations": "Configure asociaciones de archivo para los lenguajes (por ejemplo, \"*.extension\": \"html\"). Estas asociaciones tienen prioridad sobre las asociaciones predeterminadas de los lenguajes instalados.", "encoding": "La codificación del juego de caracteres predeterminada que debe utilizarse al leer y escribir archivos.", "autoGuessEncoding": "Si está opción está habilitada, se intentará adivinar la codificación del juego de caracteres al abrir los archivos", - "eol": "Carácter predeterminado de final de línea.", + "eol": "Carácter predeterminado de final de línea. Utilice \\n para LF y \\r\\n para CRLF.", "trimTrailingWhitespace": "Si se habilita, se recortará el espacio final cuando se guarde un archivo.", "insertFinalNewline": "Si se habilita, inserte una nueva línea final al final del archivo cuando lo guarde.", "files.autoSave.off": "Un archivo con modificaciones no se guarda nunca automáticamente.", @@ -25,10 +25,9 @@ "files.autoSave.onWindowChange": "Un archivo con modificaciones se guarda automáticamente cuando la ventana deja de fijarse en él.", "autoSave": "Controla el guardado automático de los archivos modificados. Valores aceptados: \"{0}\", \"{1}\", \"{2}\" (el editor pierde el foco), \"{3}\" (la ventana pierde el foco) . Si se establece en \"{4}\", puede configurar el retraso en \"files.autoSaveDelay\".", "autoSaveDelay": "Controla el retraso en MS tras el cual un archivo con modificaciones se guarda automáticamente. Solo se aplica si \"files.autoSave\" está establecido en \"{0}\"", - "watcherExclude": "Configure patrones globales de las rutas de acceso de archivo que se van a excluir de la inspección de archivos. Al cambiar esta configuración, es necesario reiniciar. Si observa que Code consume mucho tiempo de CPU al iniciarse, puede excluir las carpetas grandes para reducir la carga inicial.", "hotExit.off": "Deshabilita la salida rápida.", - "hotExit.onExit": "La salida rápida se desencadena al cerrar la aplicación, es decir, al cerrarse la última ventana en Windows o Linux, o cuando se desencadena el comando workbench.action.quit (paleta de comandos, enlace de teclado, menú). Todas las ventanas con copias de seguridad se restaurarán en el próximo inicio.", - "hotExit.onExitAndWindowClose": "hotExit se desencadena al cerrar la aplicación, es decir, al cerrarse la última ventana en Windows/Linux o cuando se desencadena el comando workbench.action.quit (paleta de comandos, enlace de teclado, menú). También para cualquier ventana que tenga una carpeta abierta, independientemente de que sea o no la última ventana. Todas las ventanas sin carpetas abiertas se restaurarán la próxima vez que se inicie. Para restaurar las ventanas con carpetas tal cual estaban antes de cerrarse, establezca \"window.reopenFolders\" en \"all\".", + "hotExit.onExit": "hotExit se desencadena al cerrar la aplicación, es decir, al cerrarse la última ventana en Windows/Linux o cuando se desencadena el comando workbench.action.quit (paleta de comandos, enlace de teclado, menú). Todas las ventanas con copias de seguridad se restaurarán la próxima vez que se inicie.", + "hotExit.onExitAndWindowClose": "La salida rápida se desencadena al cerrar la aplicación, es decir, al cerrarse la última ventana en Windows/Linux o cuando se desencadena el comando workbench.action.quit (paleta de comandos, enlace de teclado, menú), y también para cualquier ventana que tenga una carpeta abierta, independientemente de que sea o no la última ventana. Todas las ventanas sin carpetas abiertas se restaurarán la próxima vez que se inicie. Para restaurar las ventanas con carpetas tal cual estaban antes de cerrarse, establezca \"window.restoreWindows\" a \"all\".", "hotExit": "Controla si los archivos no guardados se recuerdan entre las sesiones, lo que permite omitir el mensaje para guardar al salir del editor.", "defaultLanguage": "El modo de lenguaje predeterminado que se asigna a nuevos archivos.", "editorConfigurationTitle": "Editor", diff --git a/i18n/esn/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json b/i18n/esn/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json index f62bf00d0ebca..ed00449cce30c 100644 --- a/i18n/esn/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "explorerSection": "Sección del Explorador de archivos", "noWorkspace": "No hay ninguna carpeta abierta", + "explorerSection": "Sección del Explorador de archivos", "noWorkspaceHelp": "Todavía no ha abierto ninguna carpeta.", "openFolder": "Abrir carpeta" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json b/i18n/esn/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json index 1b3168622ee33..30c064adf3d1d 100644 --- a/i18n/esn/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "openEditosrSection": "Sección Editores abiertos", "openEditors": "Editores abiertos", + "openEditosrSection": "Sección Editores abiertos", "treeAriaLabel": "Editores abiertos: lista de archivos activos", "dirtyCounter": "{0} sin guardar" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json b/i18n/esn/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json index 454894ac2bbc8..f3bd7912e4015 100644 --- a/i18n/esn/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json @@ -7,6 +7,7 @@ "editorGroupAriaLabel": "{0}, grupo de editores", "openEditorAriaLabel": "{0}, abrir editor", "saveAll": "Guardar todos", + "closeAllUnmodified": "Cerrar los que no se han modificado", "closeAll": "Cerrar todo", "close": "Cerrar", "closeOthers": "Cerrar otros" diff --git a/i18n/esn/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index 712641fcab11d..81f5a667ca8d3 100644 --- a/i18n/esn/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -5,5 +5,11 @@ // Do not edit this file. It is machine generated. { "slow": "Inicio lento detectado", - "slow.detail": "Lamentamos que haya tenido un inicio lento. Reinicie \"{0}\" con la generación de perfiles habilitada, comparta los perfiles con nosotros y trabajaremos a fondo para que vuelva a disfrutar de un inicio increíble." + "slow.detail": "Lamentamos que haya tenido un inicio lento. Reinicie \"{0}\" con la generación de perfiles habilitada, comparta los perfiles con nosotros y trabajaremos a fondo para que vuelva a disfrutar de un inicio increíble.", + "prof.message": "Los perfiles se crearon correctamente.", + "prof.detail": "Cree un problema y asóciele manualmente los siguientes archivos: {0}", + "prof.restartAndFileIssue": "Crear problema y reiniciar", + "prof.restart": "Reiniciar", + "prof.thanks": "Gracias por ayudarnos.", + "prof.detail.restart": "Se necesita un reinicio final para continuar utilizando '{0}'. De nuevo, gracias por su aportación." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/esn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index 194bd2ec3ecb9..e8414e42d1430 100644 --- a/i18n/esn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -5,7 +5,7 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.start": "Definir enlace de teclado", - "defineKeybinding.kbLayoutInfoMessage": "Para la distribución del teclado actual, presione ", "defineKeybinding.kbLayoutErrorMessage": "La distribución del teclado actual no permite reproducir esta combinación de teclas.", - "DefineKeybindingAction": "Definir enlace de teclado" + "defineKeybinding.kbLayoutLocalAndUSMessage": "**{0}** para su distribución de teclado actual (**{1}** para EE. UU. estándar).", + "defineKeybinding.kbLayoutLocalMessage": "**{0}** para su distribución de teclado actual." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index 7ef1283f9ade4..3131805763058 100644 --- a/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -6,6 +6,7 @@ { "openGlobalSettings": "Abrir configuración de usuario", "openGlobalKeybindings": "Abrir métodos abreviados de teclado", + "openGlobalKeybindingsFile": "Abrir el archivo de métodos abreviados de teclado", "openWorkspaceSettings": "Abrir configuración del área de trabajo", "configureLanguageBasedSettings": "Configurar opciones específicas del lenguaje...", "languageDescriptionConfigured": "({0})", diff --git a/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index 7f0f754882e22..dda3b9ded3fba 100644 --- a/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "errorInvalidConfiguration": "No se puede escribir la configuración. Corrija los errores o advertencias del archivo y vuelva a intentarlo.", + "defaultSettingsTitle": "Configuración predeterminada", "editTtile": "Editar", "replaceDefaultValue": "Reemplazar en Configuración", "copyDefaultValue": "Copiar en Configuración", diff --git a/i18n/esn/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json b/i18n/esn/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json index 787f634d2872c..5b11b46879d59 100644 --- a/i18n/esn/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json @@ -5,10 +5,14 @@ // Do not edit this file. It is machine generated. { "showTriggerActions": "Mostrar todos los comandos", + "clearCommandHistory": "Borrar historial de comandos", + "showCommands.label": "Paleta de comandos...", "entryAriaLabelWithKey": "{0}, {1}, comandos", "entryAriaLabel": "{0}, comandos", "canNotRun": "El comando '{0}' no puede ejecutarse desde aquí.", "actionNotEnabled": "El comando '{0}' no está habilitado en el contexto actual.", + "recentlyUsed": "usado recientemente", + "morecCommands": "otros comandos", "commandLabel": "{0}: {1}", "cat.title": "{0}: {1}", "noCommandsMatching": "No hay comandos coincidentes" diff --git a/i18n/esn/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json new file mode 100644 index 0000000000000..498d20e2ecd40 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "relaunchSettingMessage": "Ha cambiado un ajuste que requiere un reinicio para ser efectivo.", + "relaunchSettingDetail": "Pulse el botón de reinicio para reiniciar {0} y habilitar el ajuste.", + "restart": "Reiniciar", + "reload": "Recargar" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/esn/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json new file mode 100644 index 0000000000000..5fe13ab86c431 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGutterModifiedBackground": "Color de fondo del medianil del editor para las líneas modificadas.", + "editorGutterAddedBackground": "Color de fondo del medianil del editor para las líneas agregadas.", + "editorGutterDeletedBackground": "Color de fondo del medianil del editor para las líneas eliminadas." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json index 2d44f58d5145a..a77a22117808a 100644 --- a/i18n/esn/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "toggleGitViewlet": "Mostrar GIT", + "installAdditionalSCMProviders": "Instalar proveedores adicionales de SCM...", "source control": "Control de código fuente", "toggleSCMViewlet": "Mostrar SCM", "view": "Ver" diff --git a/i18n/esn/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json b/i18n/esn/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json index 58e5c2559c839..048db5a28d068 100644 --- a/i18n/esn/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "installAdditionalSCMProviders": "Instalar proveedores adicionales de SCM...", "switch provider": "Cambiar proveedor de SCM..." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/esn/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json index c7aea1a3bf640..06b841c9cab76 100644 --- a/i18n/esn/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -7,6 +7,6 @@ "searchMatches": "{0} coincidencias encontradas", "searchMatch": "{0} coincidencia encontrada", "fileMatchAriaLabel": "{0} coincidencias en el archivo {1} de la carpeta {2}, resultados de la búsqueda", - "replacePreviewResultAria": "Reemplazar resultado de vista previa, {0}", - "searchResultAria": "{0}, resultado de la búsqueda" + "replacePreviewResultAria": "Reemplazar el termino {0} con {1} en la columna con posición {2} en la línea de texto {3}", + "searchResultAria": "Encontró el término {0} en la columna de posición {1} en la línea con el texto {2}." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json b/i18n/esn/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json index 2841d09230e04..08084e884982f 100644 --- a/i18n/esn/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json @@ -9,5 +9,6 @@ "vscode.extension.contributes.snippets-path": "Ruta de acceso del archivo de fragmentos de código. La ruta es relativa a la carpeta de extensión y normalmente empieza por \"./snippets/\".", "invalid.language": "Lenguaje desconocido en \"contributes.{0}.language\". Valor proporcionado: {1}", "invalid.path.0": "Se esperaba una cadena en \"contributes.{0}.path\". Valor proporcionado: {1}", - "invalid.path.1": "Se esperaba que \"contributes.{0}.path\" ({1}) se incluyera en la carpeta de la extensión ({2}). Esto puede hacer que la extensión no sea portátil." + "invalid.path.1": "Se esperaba que \"contributes.{0}.path\" ({1}) se incluyera en la carpeta de la extensión ({2}). Esto puede hacer que la extensión no sea portátil.", + "badVariableUse": "Es muy probable que el fragmento de código \"{0}\" confunda las variables de fragmento de código y los marcadores de posición de fragmento de código. Consulte https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax para más informacion." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json index 6bb2b76ad2be3..4a006c7f57175 100644 --- a/i18n/esn/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json @@ -11,6 +11,6 @@ "snippetSchema.json.default": "Fragmento de código vacío", "snippetSchema.json": "Configuración de fragmento de código del usuario", "snippetSchema.json.prefix": "El prefijo que se debe usar al seleccionar el fragmento de código en Intellisense", - "snippetSchema.json.body": "Contenido del fragmento de código. Use '${id}', '${id:label}', '${1:label}' para las variables y '$0', '$1' para las posiciones del cursor", + "snippetSchema.json.body": "El contenido del fragmento de código. Use \"$1', \"${1:defaultText}\" para definir las posiciones del cursor, use \"$0\" para la posición final del cursor. Inserte valores de variable con \"${varName}\" y \"${varName:defaultText}\", por ejemplo, \"This is file: $TM_FILENAME\".", "snippetSchema.json.description": "La descripción del fragmento de código." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json new file mode 100644 index 0000000000000..411c12dbc4608 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "helpUs": "Ayúdenos a mejorar nuestro soporte para {0}", + "takeShortSurvey": "Realizar una breve encuesta", + "remindLater": "Recordármelo más tarde", + "neverAgain": "No volver a mostrar" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..2e4d1ea682fef --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "¿Le importaría realizar una breve encuesta de opinión?", + "takeSurvey": "Realizar encuesta", + "remindLater": "Recordármelo más tarde", + "neverAgain": "No volver a mostrar" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json new file mode 100644 index 0000000000000..2c1bc4f27d206 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Escribir el nombre de una tarea de compilación", + "noTasksMatching": "No tasks matching", + "noTasksFound": "No se encontraron tareas de compilación" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json index e5995f59713d9..42a34753cb121 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -4,5 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tareas" + "entryAriaLabel": "{0}, tareas", + "recentlyUsed": "Tareas usadas recientemente", + "configured": "tareas configuradas", + "detected": "tareas detectadas" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json index 7050d4b273130..743e9be299c07 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tareas", "tasksAriaLabel": "Escriba el nombre de una tarea para reiniciar", "noTasksMatching": "No tasks matching", "noTasksFound": "No se encontró ninguna tarea para reiniciar" diff --git a/i18n/esn/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json index d4bed99f1a222..e6855cb8a9c06 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tareas", "tasksAriaLabel": "Escribir el nombre de una tarea para ejecutar", "noTasksMatching": "No tasks matching", "noTasksFound": "No se encontraron tareas" diff --git a/i18n/esn/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json new file mode 100644 index 0000000000000..d7102735ae77a --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Escribir el nombre de una tarea de prueba", + "noTasksMatching": "No tasks matching", + "noTasksFound": "No se encontraron tareas de prueba" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index 14c75ef21d985..71a6380a7abf0 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -5,13 +5,13 @@ // Do not edit this file. It is machine generated. { "ConfigurationParser.invalidCWD": "Advertencia: options.cwd debe ser de tipo cadena. Se ignora el valor {0}.", - "ConfigurationParser.noShell": "Advertencia: La configuración del shell solo se admite al ejecutar tareas en el terminal.", "ConfigurationParser.noargs": "Error: Los argumentos de comando deben ser una matriz de cadenas. El valor proporcionado es: {0}", + "ConfigurationParser.noShell": "Advertencia: La configuración del shell solo se admite al ejecutar tareas en el terminal.", "ConfigurationParser.noName": "Error: El buscador de coincidencias de problemas del ámbito de declaración debe tener un nombre: {0}", "ConfigurationParser.unknownMatcherKind": "Advertencia: El buscador de coincidencias de problemas definido se desconoce. Los tipos admitidos son string | ProblemMatcher | (string | ProblemMatcher). {0}", "ConfigurationParser.invalidVaraibleReference": "Error: Referencia a problemMatcher no válida: {0}", "ConfigurationParser.noTaskName": "Error: Las tareas deben proporcionar una propiedad taskName. La tarea se ignorará. {0}", "taskConfiguration.shellArgs": "Advertencia: La tarea \"{0}\" es un comando de shell y su nombre de comando o uno de sus argumentos tiene espacios sin escape. Para asegurarse de que la línea de comandos se cite correctamente, combine mediante fusión los argumentos en el comando.", - "taskConfiguration.noCommandOrDependsOn": "Error: La tarea \"{0}\" no especifica un comando ni una propiedad dependsOn. La tarea se ignorará. Su definición es: {1}", + "taskConfiguration.noCommandOrDependsOn": "Error: La tarea \"{0}\" no especifica un comando ni una propiedad dependsOn. La tarea se ignorará. Su definición es: \n{1}", "taskConfiguration.noCommand": "Error: La tarea \"{0}\" no define un comando. La tarea se ignorará. Su definición es: {1}" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json index a70801ca56655..ace5e4bc79db7 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "tsc.config": "Compila un proyecto de TypeScript", - "tsc.watch": "Compila un proyecto de TypeScript en modo de inspección", "dotnetCore": "Ejecuta el comando de compilación de .NET Core", "msbuild": "Ejecuta el destino de compilación", "externalCommand": "Ejemplo para ejecutar un comando arbitrario externo", diff --git a/i18n/esn/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json index 20c5a4af69853..b148f0ec22a9b 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json @@ -7,6 +7,7 @@ "JsonSchema.options": "Opciones de comando adicionales", "JsonSchema.options.cwd": "Directorio de trabajo actual del script o el programa ejecutado. Si se omite, se usa la raíz del área de trabajo actual de Code.", "JsonSchema.options.env": "Entorno del shell o el programa ejecutado. Si se omite, se usa el entorno del proceso primario.", + "JsonSchema.shellConfiguration": "Configura el shell que se usará.", "JsonSchema.shell.executable": "Shell que se va a usar.", "JsonSchema.shell.args": "Argumentos de shell.", "JsonSchema.command": "El comando que se va a ejecutar. Puede ser un programa externo o un comando shell.", diff --git a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json index 9c0e9c0db0b47..d8137d279a8da 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json @@ -5,6 +5,8 @@ // Do not edit this file. It is machine generated. { "JsonSchema.version": "Número de versión de la configuración", + "JsonSchema._runner": "El ejecutador se ha graduado. Use el ejecutador oficial correctamente", + "JsonSchema.runner": "Define si la tarea se ejecuta como un proceso y la salida se muestra en la ventana de salida o dentro del terminal.", "JsonSchema.windows": "Configuración de comando específico de Windows", "JsonSchema.mac": "Configuración de comando específico de Mac", "JsonSchema.linux": "Configuración de comando específico de Linux", diff --git a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json index 35f7a06e8d6c1..a4f0dc82d5181 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -4,11 +4,21 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "JsonSchema.version": "Número de versión de la configuración", - "JsonSchema.windows": "Configuración de comando específico de Windows", - "JsonSchema.mac": "Configuración de comando específico de Mac", - "JsonSchema.linux": "Configuración de comando específico de Linux", "JsonSchema.shell": "Especifica si el comando es un comando shell o un programa externo. Si se omite, el valor predeterminado es false.", "JsonSchema.tasks.dependsOn.string": "Otra tarea de la que depende esta tarea.", - "JsonSchema.tasks.dependsOn.array": "Las otras tareas de las que depende esta tarea." + "JsonSchema.tasks.dependsOn.array": "Las otras tareas de las que depende esta tarea.", + "JsonSchema.tasks.presentation": "Configura el panel que se utiliza para presentar las salidas de la tarea y lee sus entradas.", + "JsonSchema.tasks.presentation.echo": "Controla si se presenta en el panel un eco del comando ejecutado. El valor predeterminado es verdadero.", + "JsonSchema.tasks.presentation.focus": "Controla si el panel recibe el foco. El valor predeterminado es falso. Si se establece a verdadero, el panel además se revela.", + "JsonSchema.tasks.presentation.reveals": "Controla si el panel que ejecuta la tarea se revela o no. El valor predeterminado es \"siempre\".", + "JsonSchema.tasks.presentation.instance": "Controla si el panel se comparte entre tareas, está dedicado a esta tarea, o se crea uno nuevo por cada ejecución.", + "JsonSchema.tasks.type": "Define si la tarea se ejecuta como un proceso o como un comando dentro de un shell. El valor predeterminado es proceso.", + "JsonSchema.version": "El número de versión de la configuración.", + "JsonSchema.tasks.taskName": "Nombre de la tarea", + "JsonSchema.tasks.background": "Indica si la tarea ejecutada se mantiene y está en ejecución en segundo plano.", + "JsonSchema.tasks.promptOnClose": "Indica si se pregunta al usuario cuando VS Code se cierra con una tarea en ejecución.", + "JsonSchema.tasks.matchers": "Buscadores de coincidencias de problemas que se van a usar. Puede ser una definición de cadena o de buscador de coincidencias de problemas, o bien una matriz de cadenas y de buscadores de coincidencias de problemas.", + "JsonSchema.windows": "Configuración de comando específico de Windows", + "JsonSchema.mac": "Configuración de comando específico de Mac", + "JsonSchema.linux": "Configuración de comando específico de Linux" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index b8ae0ec102fa9..22bef70d6847a 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -9,6 +9,7 @@ "ConfigureTaskRunnerAction.quickPick.template": "Seleccionar un ejecutador de tareas", "ConfigureTaskRunnerAction.autoDetecting": "Detectando tareas automáticamente para {0}", "ConfigureTaskRunnerAction.autoDetect": "Error de detección automática del sistema de tareas. Se usa la plantilla predeterminada. Consulte el resultado de la tarea para obtener más detalles", + "ConfigureTaskRunnerAction.autoDetectError": "Error de detección automática del sistema de tareas. Consulte el resultado de la tarea para obtener más detalles", "ConfigureTaskRunnerAction.failed": "No se puede crear el archivo \"tasks.json\" dentro de la carpeta \".vscode\". Consulte el resultado de la tarea para obtener más detalles.", "ConfigureTaskRunnerAction.label": "Configurar ejecutor de tareas", "ConfigureBuildTaskAction.label": "Configurar tarea de compilación", @@ -18,10 +19,13 @@ "manyMarkers": "Más de 99", "tasks": "Tareas", "TaskSystem.noHotSwap": "El cambio del motor de ejecución de tareas requiere reiniciar VS Code. Se omite el cambio.", - "TaskService.noBuildTask": "No se ha definido ninguna tarea de compilación. Marque una tarea con \"isBuildCommand\" en el archivo tasks.json.", - "TaskService.noTestTask": "No se ha definido ninguna tarea de prueba. Marque una tarea con \"isTestCommand\" en el archivo tasks.json.", + "TaskService.noBuildTask1": "No se ha definido ninguna tarea de compilación. Marque una tarea con \"isBuildCommand\" en el archivo tasks.json.", + "TaskService.noTestTask1": "No se ha definido ninguna tarea de prueba. Marque una tarea con \"isTestCommand\" en el archivo tasks.json.", "TaskServer.noTask": "No se encuentra la tarea {0} que se ha solicitado para ejecutarla.", - "TaskSystem.activeSame": "La tarea ya está activa y en modo de inspección. Para finalizar la tarea, use \"F1 > finalizar tarea\"", + "customizeParseErrors": "La configuración actual de tareas contiene errores. Antes de personalizar una tarea, corrija los errores.", + "moreThanOneBuildTask": "Hay muchas tareas de compilación definidas en el archivo tasks.json. Se ejecutará la primera.\n", + "TaskSystem.activeSame.background": "La tarea ya está activa y en modo de fondo. Para finalizar la tarea, use `F1 > finalizar tarea`", + "TaskSystem.activeSame.noBackground": "La tarea ya está activa. Para finalizar la tarea use `F1 > finalizar tarea`", "TaskSystem.active": "Ya hay una tarea en ejecución. Finalícela antes de ejecutar otra tarea.", "TaskSystem.restartFailed": "No se pudo terminar y reiniciar la tarea {0}", "TaskSystem.configurationErrors": "Error: La configuración de la tarea proporcionada tiene errores de validación y no se puede usar. Corrija los errores primero.", @@ -30,17 +34,19 @@ "TaskSystem.terminateTask": "&&Finalizar tarea", "TaskSystem.noProcess": "La tarea iniciada ya no existe. Si la tarea generó procesos en segundo plano al salir de VS Code, puede dar lugar a procesos huérfanos. Para evitarlo, inicie el último proceso en segundo plano con una marca de espera.", "TaskSystem.exitAnyways": "&&Salir de todos modos", - "TerminateAction.label": "Finalizar tarea en ejecución", + "TerminateAction.label": "Finalizar tarea", "TaskSystem.unknownError": "Error durante la ejecución de una tarea. Consulte el registro de tareas para obtener más detalles.", "TaskService.noWorkspace": "Las tareas solo están disponibles en una carpeta del área de trabajo.", + "recentlyUsed": "Tareas usadas recientemente", + "configured": "tareas configuradas", + "detected": "tareas detectadas", + "TaskService.fetchingBuildTasks": "Obteniendo tareas de compilación...", + "TaskService.noBuildTaskTerminal": "No se encontraron Tareas de Compilación. Pulse 'Configurar Tarea de Compilación' para definir una.", "TerminateAction.noProcess": "El proceso iniciado ya no existe. Si la tarea generó procesos en segundo plano al salir de VS Code, puede dar lugar a procesos huérfanos.", "TerminateAction.failed": "No se pudo finalizar la tarea en ejecución", "ShowLogAction.label": "Mostrar registro de tareas", "RunTaskAction.label": "Ejecutar tarea", - "RestartTaskAction.label": "Reiniciar tarea", "BuildAction.label": "Ejecutar tarea de compilación", "TestAction.label": "Ejecutar tarea de prueba", - "quickOpen.task": "Ejecutar tarea", - "quickOpen.terminateTask": "Finalizar tarea", - "quickOpen.restartTask": "Reiniciar tarea" + "quickOpen.task": "Ejecutar tarea" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index 930b60298c1c3..99a6eef0566be 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -6,5 +6,7 @@ { "TerminalTaskSystem.unknownError": "Error desconocido durante la ejecución de una tarea. Vea el registro de resultados de la tarea para obtener más detalles.", "TerminalTaskSystem.terminalName": "Tarea - {0}", - "TerminalTaskSystem": "No se puede ejecutar un comando shell en una unidad UNC." + "reuseTerminal": "Las tareas reutilizarán el terminal, presione cualquier tecla para cerrarlo.", + "TerminalTaskSystem": "No se puede ejecutar un comando shell en una unidad UNC.", + "unkownProblemMatcher": "No puede resolver el comprobador de problemas {0}. Será omitido." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json index 651c8b00513f4..b300e0e061aa5 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json @@ -7,5 +7,6 @@ "TaskRunnerSystem.unknownError": "Error desconocido durante la ejecución de una tarea. Vea el registro de resultados de la tarea para obtener más detalles.", "TaskRunnerSystem.watchingBuildTaskFinished": "La inspección de las tareas de compilación ha finalizado.", "TaskRunnerSystem.childProcessError": "Failed to launch external program {0} {1}.", - "TaskRunnerSystem.cancelRequested": "La tarea '{0}' se finalizó por solicitud del usuario." + "TaskRunnerSystem.cancelRequested": "La tarea '{0}' se finalizó por solicitud del usuario.", + "unkownProblemMatcher": "No puede resolver el comprobador de problemas {0}. Será omitido" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json new file mode 100644 index 0000000000000..71a6380a7abf0 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ConfigurationParser.invalidCWD": "Advertencia: options.cwd debe ser de tipo cadena. Se ignora el valor {0}.", + "ConfigurationParser.noargs": "Error: Los argumentos de comando deben ser una matriz de cadenas. El valor proporcionado es: {0}", + "ConfigurationParser.noShell": "Advertencia: La configuración del shell solo se admite al ejecutar tareas en el terminal.", + "ConfigurationParser.noName": "Error: El buscador de coincidencias de problemas del ámbito de declaración debe tener un nombre: {0}", + "ConfigurationParser.unknownMatcherKind": "Advertencia: El buscador de coincidencias de problemas definido se desconoce. Los tipos admitidos son string | ProblemMatcher | (string | ProblemMatcher). {0}", + "ConfigurationParser.invalidVaraibleReference": "Error: Referencia a problemMatcher no válida: {0}", + "ConfigurationParser.noTaskName": "Error: Las tareas deben proporcionar una propiedad taskName. La tarea se ignorará. {0}", + "taskConfiguration.shellArgs": "Advertencia: La tarea \"{0}\" es un comando de shell y su nombre de comando o uno de sus argumentos tiene espacios sin escape. Para asegurarse de que la línea de comandos se cite correctamente, combine mediante fusión los argumentos en el comando.", + "taskConfiguration.noCommandOrDependsOn": "Error: La tarea \"{0}\" no especifica un comando ni una propiedad dependsOn. La tarea se ignorará. Su definición es: \n{1}", + "taskConfiguration.noCommand": "Error: La tarea \"{0}\" no define un comando. La tarea se ignorará. Su definición es: {1}" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json index 29e623a5d20e8..a2abb93e39c68 100644 --- a/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -8,6 +8,7 @@ "workbench.action.terminal.kill": "Terminar la instancia del terminal activo", "workbench.action.terminal.kill.short": "Terminar el terminal", "workbench.action.terminal.copySelection": "Copiar selección", + "workbench.action.terminal.selectAll": "Seleccionar todo", "workbench.action.terminal.new": "Crear nuevo terminal integrado", "workbench.action.terminal.new.short": "Nuevo terminal", "workbench.action.terminal.focus": "Enfocar terminal", @@ -26,5 +27,11 @@ "workbench.action.terminal.scrollUp": "Desplazar hacia arriba (línea)", "workbench.action.terminal.scrollUpPage": "Desplazar hacia arriba (página)", "workbench.action.terminal.scrollToTop": "Desplazar al principio", - "workbench.action.terminal.clear": "Borrar" + "workbench.action.terminal.clear": "Borrar", + "workbench.action.terminal.allowWorkspaceShell": "Permitir la configuración del área de trabajo Shell", + "workbench.action.terminal.disallowWorkspaceShell": "No permitir la configuración del área de trabajo Shell", + "workbench.action.terminal.rename": "Cambiar nombre", + "workbench.action.terminal.rename.prompt": "Introducir nombre del terminal", + "workbench.action.terminal.focusFindWidget": "Foco Encontrar Widget", + "workbench.action.terminal.hideFindWidget": "Ocultar Encontrar Widget" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json b/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json index eb668d70a13a0..d371b1e3d8c96 100644 --- a/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.background": "El color de fondo del terminal, esto permite colorear el terminal de forma diferente al panel.", + "terminal.foreground": "El color de primer plano del terminal.", "terminal.ansiColor": "Color ANSI \"{0}\" en el terminal." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json b/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json new file mode 100644 index 0000000000000..213a60a3c4fea --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Buscar", + "placeholder.find": "Buscar", + "label.previousMatchButton": "Coincidencia anterior", + "label.nextMatchButton": "Coincidencia siguiente", + "label.closeButton": "Cerrar" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json b/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json index af3664237c856..6fde9b3d45dba 100644 --- a/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "terminal.integrated.copySelection.noSelection": "No se puede copiar la selección del terminal cuando el terminal no tiene el foco", + "terminal.integrated.copySelection.noSelection": "El terminal no tiene ninguna selección para copiar", "terminal.integrated.exitedWithCode": "El proceso del terminal finalizó con el código de salida: {0}", "terminal.integrated.waitOnExit": "Presione cualquier tecla para cerrar el terminar", "terminal.integrated.launchFailed": "No se pudo iniciar el comando de proceso terminal \"{0}{1}\" (código de salida: {2})" diff --git a/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json b/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json index 896c5a134c282..79af3c46749cb 100644 --- a/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminalLinkHandler.followLinkAlt": "Alt + clic para seguir el vínculo", "terminalLinkHandler.followLinkCmd": "Cmd + clic para abrir el vínculo", "terminalLinkHandler.followLinkCtrl": "Ctrl + clic para abrir el vínculo" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json b/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json index 5efb446c287a1..1b04639ccd544 100644 --- a/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json @@ -7,5 +7,6 @@ "copy": "Copiar", "createNewTerminal": "Nuevo terminal", "paste": "Pegar", + "selectAll": "Seleccionar todo", "clear": "Borrar" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 082899399d171..107a0eecf8aef 100644 --- a/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,13 +6,14 @@ { "selectTheme.label": "Tema de color", "installColorThemes": "Instalar temas de color adicionales...", - "problemChangingTheme": "Problema al configurar el tema: {0}", - "themes.selectTheme": "Seleccionar tema de color", + "themes.selectTheme": "Seleccione el tema de color (flecha arriba/abajo para vista previa)", "selectIconTheme.label": "Tema de icono de archivo", "installIconThemes": "Instalar temas de icono de archivo adicionles...", "noIconThemeLabel": "Ninguno", "noIconThemeDesc": "Deshabilitar iconos de archivo", "problemChangingIconTheme": "Problema al configurar el tema de icono: {0}", "themes.selectIconTheme": "Seleccionar tema de icono de archivo", - "preferences": "Preferencias" + "generateColorTheme.label": "General el tema de color desde la configuración actual", + "preferences": "Preferencias", + "developer": "Desarrollador" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/update/electron-browser/update.i18n.json b/i18n/esn/src/vs/workbench/parts/update/electron-browser/update.i18n.json index 2d90eac682801..b11d1c3bf5c06 100644 --- a/i18n/esn/src/vs/workbench/parts/update/electron-browser/update.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/update/electron-browser/update.i18n.json @@ -13,7 +13,20 @@ "read the release notes": "{0} v{1}. ¿Quiere leer las notas de la versión?", "licenseChanged": "Los términos de licencia han cambiado, revíselos.", "license": "Leer licencia", - "updateAvailable": "{0} se actualizará después de reiniciarse.", + "updateIsReady": "Nueva actualización disponible.", "thereIsUpdateAvailable": "Hay una actualización disponible.", - "noUpdatesAvailable": "Actualmente no hay actualizaciones disponibles." + "updateAvailable": "{0} se actualizará después de reiniciarse.", + "noUpdatesAvailable": "Actualmente no hay actualizaciones disponibles.", + "commandPalette": "Paleta de comandos...", + "settings": "Configuración", + "keyboardShortcuts": "Métodos abreviados de teclado", + "selectTheme.label": "Tema de color", + "themes.selectIconTheme.label": "Tema de icono de archivo", + "not available": "Actualizaciones no disponibles", + "checkingForUpdates": "Buscando actualizaciones...", + "DownloadUpdate": "Descargar actualización disponible", + "DownloadingUpdate": "Descargando actualización...", + "InstallingUpdate": "Instalando actualización...", + "restartToUpdate": "Reiniciar para actualizar...", + "checkForUpdates": "Buscar actualizaciones..." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/views/browser/views.i18n.json b/i18n/esn/src/vs/workbench/parts/views/browser/views.i18n.json new file mode 100644 index 0000000000000..62933f6b509ea --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/views/browser/views.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewToolbarAriaLabel": "{0} acciones" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json b/i18n/esn/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json new file mode 100644 index 0000000000000..9088eb8260579 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "views debe ser una mariz", + "requirestring": "la propiedad `{0}` es obligatoria y debe ser de tipo \"string\"", + "optstring": "la propiedad `{0}` se puede omitir o debe ser de tipo \"string\"", + "vscode.extension.contributes.view.id": "Identificador de la vista. Úselo para registrar un proveedor de datos mediante la API \"vscode.window.registerTreeDataProviderForView\". También para desencadenar la activación de su extensión al registrar el evento \"onView:${id}\" en \"activationEvents\".", + "vscode.extension.contributes.view.name": "Nombre de la vista en lenguaje natural. Será mostrado", + "vscode.extension.contributes.view.when": "Condición que se debe cumplir para mostrar esta vista", + "vscode.extension.contributes.views": "Aporta vistas al editor", + "views.explorer": "Vista del explorador", + "locationId.invalid": "`{0}` no es una ubicación de vista válida" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json b/i18n/esn/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json index e7627b142621d..5e291dfc74cd1 100644 --- a/i18n/esn/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json @@ -14,10 +14,6 @@ "watermark.toggleTerminal": "Alternar terminal", "watermark.findInFiles": "Buscar en archivos", "watermark.startDebugging": "Iniciar depuración", - "watermark.selectTheme": "Cambiar tema", - "watermark.selectKeymap": "Cambiar mapa de teclas", - "watermark.keybindingsReference": "Referencia de teclado", - "watermark.openGlobalKeybindings": "Métodos abreviados de teclado", "watermark.unboundCommand": "sin enlazar", "workbenchConfigurationTitle": "Área de trabajo", "tips.enabled": "Si esta opción está habilitada, se muestran sugerencias de marca de agua cuando no hay ningún editor abierto." diff --git a/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 560b16de17cd8..508e1d09a1224 100644 --- a/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -11,33 +11,34 @@ "welcomePage.openFolder": "Abrir carpeta...", "welcomePage.cloneGitRepository": "Clonar el repositorio GIT...", "welcomePage.recent": "Reciente", + "welcomePage.moreRecent": "Más...", "welcomePage.noRecentFolders": "No hay ninguna carpeta reciente", "welcomePage.help": "Ayuda", - "welcomePage.productDocumentation": "Documentación del producto", + "welcomePage.keybindingsCheatsheet": "Hoja imprimible con ayudas de teclado", "welcomePage.introductoryVideos": "Vídeos de introducción", + "welcomePage.productDocumentation": "Documentación del producto", "welcomePage.gitHubRepository": "Repositorio de GitHub", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "Mostrar página principal al inicio", - "welcomePage.quickLinks": "Vínculos rápidos", - "welcomePage.interactivePlayground": "Área de juegos interactiva", - "welcomePage.interactivePlaygroundDescription": "Pruebe las características esenciales del editor en un tutorial corto", - "welcomePage.interfaceOverview": "Introducción a la interfaz", - "welcomePage.interfaceOverviewDescription": "Obtenga una superposición que resalta los componentes principales de la interfaz de usuario", + "welcomePage.customize": "Personalizar", + "welcomePage.installExtensionPacks": "Herramientas y lenguajes", + "welcomePage.installExtensionPacksDescription": "Instalar soporte para {0} y {1}", + "welcomePage.moreExtensions": "más", + "welcomePage.installKeymapDescription": "Instalar los métodos abreviados de teclado", + "welcomePage.installKeymapExtension": "Instalar los métodos abreviados de teclado de {0} y {1}", + "welcomePage.others": "otros", "welcomePage.colorTheme": "Tema de color", "welcomePage.colorThemeDescription": "Modifique a su gusto la apariencia del editor y el código", + "welcomePage.learn": "Más información", + "welcomePage.showCommands": "Buscar y ejecutar todos los comandos", + "welcomePage.showCommandsDescription": "Acceda rápidamente y busque comandos desde la Paleta de Comandos ({0})", + "welcomePage.interfaceOverview": "Introducción a la interfaz", + "welcomePage.interfaceOverviewDescription": "Obtenga una superposición que resalta los componentes principales de la interfaz de usuario", + "welcomePage.interactivePlayground": "Área de juegos interactiva", + "welcomePage.interactivePlaygroundDescription": "Pruebe las características esenciales del editor en un tutorial corto", + "welcomePage.quickLinks": "Vínculos rápidos", "welcomePage.keybindingsReference": "Referencia de métodos abreviados de teclado", "welcomePage.keybindingsReferenceDescription": "Un PDF imprimible con los métodos abreviados de teclado más comunes", - "welcomePage.showCommands": "Buscar y ejecutar todos los comandos", - "welcomePage.showCommandsDescription": "Acceda rápidamente y busque comandos desde el panel de control ({0})", "welcomePage.configureSettings": "Definir la configuración", - "welcomePage.configureSettingsDescription": "Revele el poder total de VS Code cambiando la configuración", - "welcomePage.installKeymapDescription": "Instalar los métodos abreviados de teclado", - "welcomePage.installKeymap": "Instale los métodos abreviados de teclado de {0}, {1} {2} y {3}", - "welcomePage.vim": "Vim", - "welcomePage.vimCurrent": "Vim (actual)", - "welcomePage.sublime": "Sublime", - "welcomePage.sublimeCurrent": "Sublime (actual)", - "welcomePage.atom": "Atom", - "welcomePage.atomCurrent": "Atom (actual)", - "welcomePage.others": "otros" + "welcomePage.configureSettingsDescription": "Revele el poder total de VS Code cambiando la configuración" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json index f366b9af6fd84..550edf12c09d4 100644 --- a/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "workbenchConfigurationTitle": "Área de trabajo", - "welcomePage.enabled": "Cuando está habilitado, se mostrará la página principal en el inicio.", "help": "Ayuda" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 78fdb50afd68f..b1be3bd220646 100644 --- a/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,11 +5,32 @@ // Do not edit this file. It is machine generated. { "welcomePage": "Bienvenido", - "welcome.title": "Bienvenido", + "welcomePage.javaScript": "JavaScript", + "welcomePage.typeScript": "TypeScript", + "welcomePage.python": "Python", + "welcomePage.php": "PHP", + "welcomePage.docker": "Docker", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", + "welcomePage.extensionPackAlreadyInstalled": "El soporte para '{0}' ya está instalado.", + "welcomePage.willReloadAfterInstallingExtensionPack": "La ventana se volverá a cargar después de instalar compatibilidad adicional con {0}.", + "welcomePage.installingExtensionPack": "Instalando compatibilidad adicional con {0}...", + "welcomePage.extensionPackNotFound": "No se pudo encontrar el soporte para {0} con id {1}.", "welcomePage.keymapAlreadyInstalled": "Los métodos abreviados de teclado {0} ya están instalados.", "welcomePage.willReloadAfterInstallingKeymap": "La ventana se volverá a cargar después de instalar los métodos abreviados de teclado {0}.", - "ok": "Aceptar", "welcomePage.installingKeymap": "Instalando los métodos abreviados de teclado de {0}...", "welcomePage.keymapNotFound": "No se pudieron encontrar los métodos abreviados de teclado {0} con el identificador {1}.", - "cancel": "Cancelar" + "welcome.title": "Bienvenido", + "welcomePage.openFolderWithPath": "Abrir la carpeta {0} con la ruta de acceso {1}", + "welcomePage.extensionListSeparator": ", ", + "welcomePage.installKeymap": "Instalar mapa de teclas de {0}", + "welcomePage.installExtensionPack": "Instalar compatibilidad adicional con {0}", + "welcomePage.installedKeymap": "El mapa de teclas de {0} ya está instalado", + "welcomePage.installedExtensionPack": "La compatibilidad con {0} ya está instalada", + "ok": "Aceptar", + "details": "Detalles", + "cancel": "Cancelar", + "welcomePage.buttonBackground": "Color de fondo de los botones en la página principal.", + "welcomePage.buttonHoverBackground": "Color de fondo al mantener el mouse en los botones de la página principal." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/esn/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json index b18644a031aff..7dc0e8efbdfbc 100644 --- a/i18n/esn/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "walkThrough.unboundCommand": "sin enlazar" + "walkThrough.unboundCommand": "sin enlazar", + "walkThrough.gitNotFound": "Parece que GIT no está instalado en el sistema.", + "walkThrough.embeddedEditorBackground": "Color de fondo de los editores incrustrados en la área de juegos" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/services/configuration/node/configuration.i18n.json b/i18n/esn/src/vs/workbench/services/configuration/node/configuration.i18n.json new file mode 100644 index 0000000000000..05e79aa04fc5e --- /dev/null +++ b/i18n/esn/src/vs/workbench/services/configuration/node/configuration.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.configuration": "Aporta opciones de configuración.", + "vscode.extension.contributes.configuration.title": "Resumen de la configuración. Esta etiqueta se usará en el archivo de configuración como comentario divisor.", + "vscode.extension.contributes.configuration.properties": "Descripción de las propiedades de configuración.", + "invalid.type": "si se establece, \"configuration.type\" debe establecerse en \"object\"", + "invalid.title": "configuration.title debe ser una cadena", + "vscode.extension.contributes.defaultConfiguration": "Contribuye a la configuración de los parámetros del editor predeterminados por lenguaje.", + "invalid.properties": "configuration.properties debe ser un objeto" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/esn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index e1dbe78e59e6f..c8e25212f8bab 100644 --- a/i18n/esn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/esn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -4,11 +4,14 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "open": "Abrir configuración", + "close": "Cerrar", + "saveAndRetry": "Guardar la configuración y reintentar. ", "errorUnknownKey": "No se puede escribir en el archivo de configuración (clave desconocida)", "errorInvalidTarget": "No se puede escribir en el archivo de configuración (destino no válido).", - "errorNoWorkspaceOpened": "No se puede escribir la configuración porque no hay ninguna carpeta abierta. Abra una carpeta primero y vuelva a intentarlo.", - "errorInvalidConfiguration": "No se puede escribir la configuración. Abra el archivo **Configuración de usuario** para corregir los errores o advertencias del archivo y vuelva a intentarlo.", - "errorInvalidConfigurationWorkspace": "No se puede escribir la configuración. Abra **Configuración de área de trabajo** para corregir los errores o advertencias del archivo y vuelva a intentarlo.", - "errorConfigurationFileDirty": "No se puede escribir la configuración porque el archivo se ha modificado. Guarde el archivo **Configuración de usuario** y vuelva a intentarlo.", - "errorConfigurationFileDirtyWorkspace": "No se puede escribir la configuración porque el archivo se ha modificado. Guarde el archivo **Configuración de área de trabajo** y vuelva a intentarlo." + "errorNoWorkspaceOpened": "No se pudo guardar la configuración porque no tiene una carpeta abierta. Abra una carpeta primero y vuelva a intentarlo.", + "errorInvalidConfiguration": "No se pudo guardar la configuración. Abra el archivo **Configuración de usuario** para corregir los errores o advertencias del archivo y vuelva a intentarlo.", + "errorInvalidConfigurationWorkspace": "No se pudo guardar la configuración. Abra **Configuración de área de trabajo** para corregir los errores o advertencias del archivo y vuelva a intentarlo.", + "errorConfigurationFileDirty": "No se pudo guardar la configuración porque el archivo se ha modificado. Guarde el archivo **Configuración de usuario** y vuelva a intentarlo.", + "errorConfigurationFileDirtyWorkspace": "No se pudo guardar la configuración porque el archivo se ha modificado. Guarde el archivo **Configuración de área de trabajo** y vuelva a intentarlo." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json b/i18n/esn/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json new file mode 100644 index 0000000000000..fb3b052d7b4b0 --- /dev/null +++ b/i18n/esn/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Telemetría", + "telemetry.enableCrashReporting": "Habilite los informes de bloqueo para enviarlos a Microsoft. Esta opción requiere reiniciar para que tenga efecto." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/services/files/node/fileService.i18n.json b/i18n/esn/src/vs/workbench/services/files/node/fileService.i18n.json index 92f8ae8e59382..fc60db843fa36 100644 --- a/i18n/esn/src/vs/workbench/services/files/node/fileService.i18n.json +++ b/i18n/esn/src/vs/workbench/services/files/node/fileService.i18n.json @@ -6,9 +6,13 @@ { "fileInvalidPath": "Recurso de archivo no válido ({0})", "fileIsDirectoryError": "El archivo es un directorio ({0})", + "fileNotModifiedError": "Archivo no modificado desde", + "fileTooLargeError": "Archivo demasiado grande para abrirlo", "fileBinaryError": "El archivo parece ser binario y no se puede abrir como texto", "fileNotFoundError": "Archivo no encontrado ({0})", + "fileMoveConflict": "No se puede mover o copiar. El archivo ya existe en la ubicación de destino. ", "unableToMoveCopyError": "No se puede mover o copiar. El archivo reemplazaría a la carpeta que lo contiene.", "foldersCopyError": "No se pueden copiar carpetas en el área de trabajo. Seleccione archivos individuales para copiarlos.", + "fileModifiedError": "Archivo Modificado Desde", "fileReadOnlyError": "El archivo es de solo lectura" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/esn/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index 0ae924e19329a..3c4bba8db16d8 100644 --- a/i18n/esn/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/esn/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -8,15 +8,12 @@ "requirestring": "la propiedad `{0}` es obligatoria y debe ser de tipo \"string\"", "optstring": "la propiedad `{0}` se puede omitir o debe ser de tipo \"string\"", "vscode.extension.contributes.keybindings.command": "Identificador del comando que se va a ejecutar cuando se desencadena el enlace de teclado.", - "vscode.extension.contributes.keybindings.key": "Tecla o secuencia de teclas (las teclas se separan con el signo más y las secuencias con un espacio, por ejemplo, Ctrl+O y Ctrl+L L para una presión simultánea)", + "vscode.extension.contributes.keybindings.key": "Tecla o secuencia de teclas (las teclas se separan con el signo más y las secuencias con un espacio, por ejemplo, Ctrl+O y Ctrl+L L para una presión simultánea).", "vscode.extension.contributes.keybindings.mac": "Tecla o secuencia de teclas específica de Mac.", "vscode.extension.contributes.keybindings.linux": "Tecla o secuencia de teclas específica de Linux.", "vscode.extension.contributes.keybindings.win": "Tecla o secuencia de teclas específica de Windows.", "vscode.extension.contributes.keybindings.when": "Condición cuando la tecla está activa.", "vscode.extension.contributes.keybindings": "Aporta enlaces de teclado.", - "openDocumentation": "Más información", - "keybindingMigration.ok": "Aceptar", - "keybindingMigration.prompt": "Algunos métodos abreviados de teclado han cambiado para su distribución de teclado.", "invalid.keybindings": "Valor de \"contributes.{0}\" no válido: {1}", "unboundCommands": "Aquí hay otros comandos disponibles: ", "keybindings.json.title": "Configuración de enlaces de teclado", diff --git a/i18n/esn/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json b/i18n/esn/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json index d28f4963f0d22..1875bdd4e2a86 100644 --- a/i18n/esn/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json +++ b/i18n/esn/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json @@ -4,6 +4,15 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "vscode.extension.contributes.languages": "Aporta declaraciones de lenguaje.", + "vscode.extension.contributes.languages.id": "Identificador del lenguaje.", + "vscode.extension.contributes.languages.aliases": "Alias de nombre para el lenguaje.", + "vscode.extension.contributes.languages.extensions": "Extensiones de archivo asociadas al lenguaje.", + "vscode.extension.contributes.languages.filenames": "Nombres de archivo asociados al lenguaje.", + "vscode.extension.contributes.languages.filenamePatterns": "Patrones globales de nombre de archivo asociados al lenguaje.", + "vscode.extension.contributes.languages.mimetypes": "Tipos MIME asociados al lenguaje.", + "vscode.extension.contributes.languages.firstLine": "Expresión regular que coincide con la primera línea de un archivo del lenguaje.", + "vscode.extension.contributes.languages.configuration": "Ruta de acceso relativa a un archivo que contiene opciones de configuración para el lenguaje.", "invalid": "Elemento \"contributes.{0}\" no válido. Se esperaba una matriz.", "invalid.empty": "Valor vacío para \"contributes.{0}\"", "require.id": "la propiedad `{0}` es obligatoria y debe ser de tipo \"string\"", diff --git a/i18n/esn/src/vs/workbench/services/progress/browser/progressService2.i18n.json b/i18n/esn/src/vs/workbench/services/progress/browser/progressService2.i18n.json new file mode 100644 index 0000000000000..ee9bbb9d071d3 --- /dev/null +++ b/i18n/esn/src/vs/workbench/services/progress/browser/progressService2.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "progress.text": "{0} - {1} ", + "progress.title": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json b/i18n/esn/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json new file mode 100644 index 0000000000000..bca2124994e09 --- /dev/null +++ b/i18n/esn/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.grammars": "Aporta tokenizadores de TextMate.", + "vscode.extension.contributes.grammars.language": "Identificador del lenguaje para el que se aporta esta sintaxis.", + "vscode.extension.contributes.grammars.scopeName": "Nombre del ámbito de TextMate que usa el archivo tmLanguage.", + "vscode.extension.contributes.grammars.path": "Ruta de acceso del archivo tmLanguage. La ruta es relativa a la carpeta de extensión y normalmente empieza por \"./syntaxes/\".", + "vscode.extension.contributes.grammars.embeddedLanguages": "Asignación de un nombre de ámbito al identificador de lenguaje si esta gramática contiene lenguajes incrustados.", + "vscode.extension.contributes.grammars.injectTo": "Lista de nombres de ámbito de lenguaje al que se inyecta esta gramática." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json b/i18n/esn/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json new file mode 100644 index 0000000000000..431db97694e3f --- /dev/null +++ b/i18n/esn/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid.language": "Lenguaje desconocido en \"contributes.{0}.language\". Valor proporcionado: {1}", + "invalid.scopeName": "Se esperaba una cadena en \"contributes.{0}.scopeName\". Valor proporcionado: {1}", + "invalid.path.0": "Se esperaba una cadena en \"contributes.{0}.path\". Valor proporcionado: {1}", + "invalid.injectTo": "Valor no válido en `contributes.{0}.injectTo`. Debe ser una matriz de nombres de ámbito de lenguaje. Valor proporcionado: {1}", + "invalid.embeddedLanguages": "Valor no válido en \"contributes.{0}.embeddedLanguages\". Debe ser una asignación de objeto del nombre del ámbito al lenguaje. Valor proporcionado: {1}", + "invalid.path.1": "Se esperaba que \"contributes.{0}.path\" ({1}) se incluyera en la carpeta de la extensión ({2}). Esto puede hacer que la extensión no sea portátil.", + "no-tm-grammar": "No hay ninguna gramática de TM registrada para este lenguaje." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json b/i18n/esn/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json index a9799ee79c856..a21b957751a11 100644 --- a/i18n/esn/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json +++ b/i18n/esn/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json @@ -6,5 +6,6 @@ { "schema.colors": "Colores para resaltado de sintaxis", "schema.properties.name": "Descripción de la regla", - "schema.fontStyle": "Estilo de fuente de la regla: una opción de \"italic\", \"bold\" y \"underline\", o una combinación de ellas." + "schema.fontStyle": "Estilo de fuente de la regla: una opción de \"italic\", \"bold\" y \"underline\", o una combinación de ellas.", + "schema.tokenColors.path": "Ruta de acceso de la archivo de tema (relativa al archivo actual)" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/esn/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json index 3de654dadd4d2..464fd1a886e83 100644 --- a/i18n/esn/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json +++ b/i18n/esn/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -5,8 +5,9 @@ // Do not edit this file. It is machine generated. { "error.cannotparsejson": "Problemas al analizar el archivo de tema JSON: {0}", - "error.invalidformat": "Hubo un problema al analizar el archivo de tema JSON: {0}. Se esperaba \"tokenColors\" y \"colors\".", + "error.invalidformat.colors": "Problema al analizar el archivo de tema: {0}. La propiedad \"colors\" no es tipo \"object\".", + "error.invalidformat.tokenColors": "Problema al analizar el archivo de tema: {0}. La propiedad 'tokenColors' debería ser una matriz de colores o una ruta de acceso a un archivo texto de tema.", "error.plist.invalidformat": "Problema al analizar el archivo de tema: {0}. \"settings\" no es una matriz.", "error.cannotparse": "Problemas al analizar el archivo de tema: {0}", - "error.cannotload": "Hubo problemas al cargar el archivo de tema {0}: {1}" + "error.cannotload": "Problemas al analizar el archivo de tema: {0}:{1}" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/esn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index d2927b70a397f..5a3fcc01f7528 100644 --- a/i18n/esn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/esn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -23,8 +23,9 @@ "error.cannotparseicontheme": "Problems parsing file icons file: {0}", "colorTheme": "Specifies the color theme used in the workbench.", "colorThemeError": "Theme is unknown or not installed.", - "iconTheme": "Specifies the icon theme used in the workbench.", "noIconThemeDesc": "No file icons", "iconThemeError": "File icon theme is unknown or not installed.", - "workbenchColors": "Reemplaza los colores del tema de color seleccionado actualmente. Esta configuración es experimental ya que los nombres de los colores cambiarán en la próxima versión." + "workbenchColors": "Reemplaza los colores del tema de color actual", + "workbenchColors.deprecated": "Esta configuracion no es experimental y se ha cambiado de nombre a 'workbench.colorCustomizations'", + "workbenchColors.deprecatedDescription": "Utilice 'workbench.colorCustomizations' en su lugar" } \ No newline at end of file diff --git a/i18n/fra/extensions/configuration-editing/out/extension.i18n.json b/i18n/fra/extensions/configuration-editing/out/extension.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/extensions/configuration-editing/out/extension.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json b/i18n/fra/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json index db84de5a6b49a..bb25f51ed1589 100644 --- a/i18n/fra/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json +++ b/i18n/fra/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json @@ -7,7 +7,6 @@ "activeEditorShort": "exemple : myFile.txt", "activeEditorMedium": "exemple : myFolder/myFile.txt", "activeEditorLong": "exemple : /Users/Development/myProject/myFolder/myFile.txt", - "rootName": "exemple : myProject", "rootPath": "exemple : /Users/Development/myProject", "appName": "exemple : VS Code", "dirty": "indicateur d'intégrité si l'intégrité de l'éditeur actif est compromise", diff --git a/i18n/fra/extensions/extension-editing/out/extensionLinter.i18n.json b/i18n/fra/extensions/extension-editing/out/extensionLinter.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/extensions/extension-editing/out/extensionLinter.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/extensions/git/out/commands.i18n.json b/i18n/fra/extensions/git/out/commands.i18n.json index 738f408aeaa24..f1b007aaf1ec7 100644 --- a/i18n/fra/extensions/git/out/commands.i18n.json +++ b/i18n/fra/extensions/git/out/commands.i18n.json @@ -16,11 +16,19 @@ "confirm discard": "Voulez-vous vraiment abandonner les changements apportés à {0} ?", "confirm discard multiple": "Voulez-vous vraiment abandonner les changements apportés à {0} fichiers ?", "discard": "Ignorer les modifications", + "confirm discard all": "Voulez-vous vraiment ignorer TOUTES les modifications ? Cette action est IRRÉVERSIBLE.", + "discardAll": "Ignorer TOUTES les modifications", + "no staged changes": "Aucune modification en attente à valider.\n\nVoulez-vous automatiquement mettre en attente toutes vos modifications et les valider directement ?", + "yes": "Oui", + "always": "Toujours", "no changes": "Il n'existe aucun changement à valider.", "commit message": "Message de validation", "provide commit message": "Indiquez un message de validation", "branch name": "Nom de la branche", "provide branch name": "Fournissez un nom de branche", + "select branch to delete": "Sélectionner une branche à supprimer", + "confirm force delete branch": "La branche '{0}' n'est pas complètement fusionnée. Supprimer quand même ?", + "delete branch": "Supprimer la branche", "no remotes to pull": "Votre dépôt n'a aucun dépôt distant configuré pour un Pull.", "no remotes to push": "Votre dépôt n'a aucun dépôt distant configuré pour un Push.", "nobranch": "Vous devez extraire une branche dont vous souhaitez effectuer le Push vers un emplacement distant.", @@ -31,6 +39,7 @@ "no remotes to publish": "Votre dépôt n'a aucun dépôt distant configuré pour une publication.", "disabled": "Git est désactivé ou non pris en charge dans cet espace de travail", "clean repo": "Nettoyez l'arborescence de travail de votre dépôt avant l'extraction.", + "cant push": "Push impossible des références vers la branche distante. Exécutez d'abord 'Extraire' pour intégrer vos modifications.", "git error details": "Git : {0}", "git error": "Erreur Git", "open git log": "Ouvrir le journal Git" diff --git a/i18n/fra/extensions/git/out/main.i18n.json b/i18n/fra/extensions/git/out/main.i18n.json index 253875106faa9..7ce7bde078c23 100644 --- a/i18n/fra/extensions/git/out/main.i18n.json +++ b/i18n/fra/extensions/git/out/main.i18n.json @@ -6,5 +6,6 @@ { "using git": "Utilisation de git {0} à partir de {1}", "updateGit": "Mettre à jour Git", - "neverShowAgain": "Ne plus afficher" + "neverShowAgain": "Ne plus afficher", + "git20": "Git {0} semble installé. Le code fonctionne mieux avec git >= 2" } \ No newline at end of file diff --git a/i18n/fra/extensions/git/out/model.i18n.json b/i18n/fra/extensions/git/out/model.i18n.json index ccd13dfdb2c62..70565ab624865 100644 --- a/i18n/fra/extensions/git/out/model.i18n.json +++ b/i18n/fra/extensions/git/out/model.i18n.json @@ -8,5 +8,7 @@ "merge changes": "Fusionner les modifications", "staged changes": "Modifications en zone de transit", "changes": "Modifications", - "ok": "OK" + "ok": "OK", + "neveragain": "Ne plus afficher", + "huge": "Le dépôt Git dans '{0}' a trop de modifications actives, seul un sous-ensemble de fonctionnalités Git sera activé." } \ No newline at end of file diff --git a/i18n/fra/extensions/git/package.i18n.json b/i18n/fra/extensions/git/package.i18n.json index 475cd6fdd1f46..719e7ec3da9cf 100644 --- a/i18n/fra/extensions/git/package.i18n.json +++ b/i18n/fra/extensions/git/package.i18n.json @@ -26,12 +26,13 @@ "command.undoCommit": "Annuler la dernière validation", "command.checkout": "Extraire vers...", "command.branch": "Créer une branche...", + "command.deleteBranch": "Supprimer la branche...", "command.pull": "Pull", "command.pullRebase": "Pull (rebaser)", "command.push": "Push", "command.pushTo": "Transfert (Push) vers...", "command.sync": "Synchroniser", - "command.publish": "Publier", + "command.publish": "Publier la branche", "command.showOutput": "Afficher la sortie Git", "config.enabled": "Indique si git est activé", "config.path": "Chemin d'accès à l'exécutable git", @@ -39,6 +40,9 @@ "config.autofetch": "Indique si la récupération automatique est activée", "config.enableLongCommitWarning": "Indique si les longs messages de validation doivent faire l'objet d'un avertissement", "config.confirmSync": "Confirmer avant de synchroniser des dépôts git", - "config.countBadge": "Contrôle le compteur de badges git", - "config.checkoutType": "Contrôle le type des branches listées" + "config.countBadge": "Contrôle le compteur de badges Git. La valeur 'toutes' compte toutes les modifications. La valeur 'suivies' compte uniquement les modifications suivies. La valeur 'désactivé' désactive le compteur.", + "config.checkoutType": "Contrôle le type des branches répertoriées pendant l'exécution de 'Extraire vers...'. La valeur 'toutes' montre toutes les références, la valeur 'locales' montre uniquement les branches locales, la valeur 'balises' montre uniquement les balises et la valeur 'distantes' montre uniquement les branches distantes.", + "config.ignoreLegacyWarning": "Ignore l'avertissement Git hérité", + "config.ignoreLimitWarning": "Ignore l'avertissement quand il y a trop de modifications dans un dépôt", + "config.defaultCloneDirectory": "Emplacement par défaut où cloner un dépôt git" } \ No newline at end of file diff --git a/i18n/fra/extensions/grunt/out/main.i18n.json b/i18n/fra/extensions/grunt/out/main.i18n.json index 8b6ad71cd4e6d..831ac201fd974 100644 --- a/i18n/fra/extensions/grunt/out/main.i18n.json +++ b/i18n/fra/extensions/grunt/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Échec de la détection automatique des tâches Grunt avec l'erreur : {0}" +} \ No newline at end of file diff --git a/i18n/fra/extensions/grunt/package.i18n.json b/i18n/fra/extensions/grunt/package.i18n.json index 8b6ad71cd4e6d..bb010c3589a38 100644 --- a/i18n/fra/extensions/grunt/package.i18n.json +++ b/i18n/fra/extensions/grunt/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.grunt.autoDetect": "Contrôle si la détection automatique des tâches Grunt est activée ou désactivée. La valeur par défaut est activée." +} \ No newline at end of file diff --git a/i18n/fra/extensions/gulp/out/main.i18n.json b/i18n/fra/extensions/gulp/out/main.i18n.json index 8b6ad71cd4e6d..5baf80d099dfe 100644 --- a/i18n/fra/extensions/gulp/out/main.i18n.json +++ b/i18n/fra/extensions/gulp/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Échec de la détection automatique des tâches Gulp avec l'erreur : {0}" +} \ No newline at end of file diff --git a/i18n/fra/extensions/gulp/package.i18n.json b/i18n/fra/extensions/gulp/package.i18n.json index 8b6ad71cd4e6d..98a28783ec8d4 100644 --- a/i18n/fra/extensions/gulp/package.i18n.json +++ b/i18n/fra/extensions/gulp/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.gulp.autoDetect": "Contrôle si la détection automatique des tâches Gulp est activée ou désactivée. La valeur par défaut est activée." +} \ No newline at end of file diff --git a/i18n/fra/extensions/jake/out/main.i18n.json b/i18n/fra/extensions/jake/out/main.i18n.json new file mode 100644 index 0000000000000..4811debb9a3c0 --- /dev/null +++ b/i18n/fra/extensions/jake/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "Échec de la détection automatique des tâches Jake avec l'erreur : {0}" +} \ No newline at end of file diff --git a/i18n/fra/extensions/jake/package.i18n.json b/i18n/fra/extensions/jake/package.i18n.json new file mode 100644 index 0000000000000..0a21c419d8f27 --- /dev/null +++ b/i18n/fra/extensions/jake/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.jake.autoDetect": "Contrôle si la détection automatique des tâches Jake est activée ou désactivée. La valeur par défaut est activée." +} \ No newline at end of file diff --git a/i18n/fra/extensions/markdown/out/extension.i18n.json b/i18n/fra/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..34001f88bb7ee --- /dev/null +++ b/i18n/fra/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "onPreviewStyleLoadError": "Impossible de charger 'markdown.styles' : {0}" +} \ No newline at end of file diff --git a/i18n/fra/extensions/markdown/package.i18n.json b/i18n/fra/extensions/markdown/package.i18n.json index 2593fd137d5e7..5ec4dc8caeb28 100644 --- a/i18n/fra/extensions/markdown/package.i18n.json +++ b/i18n/fra/extensions/markdown/package.i18n.json @@ -16,5 +16,7 @@ "markdown.previewSide.title": "Ouvrir l'aperçu sur le côté", "markdown.showSource.title": "Afficher la source", "markdown.styles.dec": "Liste d'URL ou de chemins locaux de feuilles de style CSS à utiliser dans l'aperçu Markdown. Les chemins relatifs sont interprétés par rapport au dossier ouvert dans l'explorateur. S'il n'y a aucun dossier ouvert, ils sont interprétés par rapport à l'emplacement du fichier Markdown. Tous les signes '\\' doivent être écrits sous la forme '\\\\'.", - "markdown.showPreviewSecuritySelector.title": "Changer les paramètres de sécurité de l'aperçu Markdown" + "markdown.showPreviewSecuritySelector.title": "Changer les paramètres de sécurité de l'aperçu Markdown", + "markdown.preview.enableExperimentalExtensionApi.desc": "[Expérimental] Autorise les extensions à étendre l'aperçu Markdown.", + "markdown.trace.desc": "Active la journalisation du débogage pour l'extension Markdown." } \ No newline at end of file diff --git a/i18n/fra/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/fra/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..96643427968fa --- /dev/null +++ b/i18n/fra/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "acceptCurrentChange": "Accepter la modification actuelle", + "acceptIncomingChange": "Accepter la modification entrante", + "acceptBothChanges": "Accepter les deux modifications", + "compareChanges": "Comparer les modifications" +} \ No newline at end of file diff --git a/i18n/fra/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/fra/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..ef10c1f10639d --- /dev/null +++ b/i18n/fra/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "cursorNotInConflict": "Le curseur de l'éditeur ne se trouve pas dans un conflit de fusion", + "compareChangesTitle": "{0} : Modifications actuelles ⟷ Modifications entrantes", + "cursorOnSplitterRange": "Le curseur de l'éditeur se trouve dans le séparateur du conflit de fusion, déplacez-le dans le bloc \"actuelles\" ou \"entrantes\"", + "noConflicts": "Aucun conflit de fusion dans ce fichier", + "noOtherConflictsInThisFile": "Aucun autre conflit de fusion dans ce fichier" +} \ No newline at end of file diff --git a/i18n/fra/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/fra/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..1dfd58679b3d5 --- /dev/null +++ b/i18n/fra/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "currentChange": "(Modification actuelle)", + "incomingChange": "(Modification entrante)" +} \ No newline at end of file diff --git a/i18n/fra/extensions/merge-conflict/package.i18n.json b/i18n/fra/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..6f812b18e76d1 --- /dev/null +++ b/i18n/fra/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "command.category": "Conflit de fusion", + "command.accept.all-incoming": "Accepter toutes les modifications entrantes", + "command.accept.all-both": "Accepter les deux", + "command.accept.current": "Accepter les modifications actuelles", + "command.accept.incoming": "Accepter les modifications entrantes", + "command.accept.selection": "Accepter la sélection", + "command.accept.both": "Accepter les deux", + "command.next": "Conflit suivant", + "command.previous": "Conflit précédent", + "command.compare": "Conflit de comparaison des modifications actuelles", + "config.title": "Conflit de fusion", + "config.codeLensEnabled": "Activer/désactiver le bloc CodeLens du conflit de fusion dans l'éditeur", + "config.decoratorsEnabled": "Activer/désactiver les éléments décoratifs du conflit de fusion dans l'éditeur" +} \ No newline at end of file diff --git a/i18n/fra/extensions/npm/package.i18n.json b/i18n/fra/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..df84303decb34 --- /dev/null +++ b/i18n/fra/extensions/npm/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.npm.autoDetect": "Contrôle si la détection automatique des scripts npm est activée ou désactivée. La valeur par défaut est activée." +} \ No newline at end of file diff --git a/i18n/fra/extensions/php/package.i18n.json b/i18n/fra/extensions/php/package.i18n.json index c214e78c0aae9..ff6a902e3814a 100644 --- a/i18n/fra/extensions/php/package.i18n.json +++ b/i18n/fra/extensions/php/package.i18n.json @@ -9,5 +9,6 @@ "configuration.validate.executablePath": "Pointe vers l'exécutable PHP.", "configuration.validate.run": "Spécifie si linter est exécuté au moment de l'enregistrement ou de la saisie.", "configuration.title": "PHP", - "commands.categroy.php": "PHP" + "commands.categroy.php": "PHP", + "command.untrustValidationExecutable": "Interdire l'exécutable de validation PHP (défini comme paramètre d'espace de travail)" } \ No newline at end of file diff --git a/i18n/fra/extensions/typescript/out/features/bufferSyncSupport.i18n.json b/i18n/fra/extensions/typescript/out/features/bufferSyncSupport.i18n.json index 26cde295cd569..3187cd8f22f85 100644 --- a/i18n/fra/extensions/typescript/out/features/bufferSyncSupport.i18n.json +++ b/i18n/fra/extensions/typescript/out/features/bufferSyncSupport.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "versionMismatch": "Incompatibilité de version ! global tsc ({0}) != Service de langage de VS Code ({1}). Des erreurs de compilation incohérentes risquent de se produire", "moreInformation": "Informations", "doNotCheckAgain": "Ne plus vérifier", "close": "Fermer", diff --git a/i18n/fra/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/fra/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json new file mode 100644 index 0000000000000..052fa717730f1 --- /dev/null +++ b/i18n/fra/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ts-check": "Active la vérification sémantique dans un fichier JavaScript. Doit se trouver au début d'un fichier.", + "ts-nocheck": "Désactive la vérification sémantique dans un fichier JavaScript. Doit se trouver au début d'un fichier.", + "ts-ignore": "Supprime les erreurs @ts-check sur la ligne suivante d'un fichier." +} \ No newline at end of file diff --git a/i18n/fra/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/fra/extensions/typescript/out/typescriptServiceClient.i18n.json index d6b2ab81b4189..85899be0806e1 100644 --- a/i18n/fra/extensions/typescript/out/typescriptServiceClient.i18n.json +++ b/i18n/fra/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -4,9 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "restartTsServerTitle": "Redémarrer", - "later": "Plus tard", - "channelName": "TypeScript", "noServerFound": "Le chemin {0} ne pointe pas vers une installation tsserver valide. Utilisation par défaut de la version TypeScript groupée.", "noBundledServerFound": "Le tsserver de VSCode a été supprimé par une autre application, par exemple un outil de détection de virus mal configuré. Réinstallez VS Code.", "versionNumber.custom": "personnalisé", @@ -17,6 +14,8 @@ "learnMore": "En savoir plus", "selectTsVersion": "Sélectionner la version TypeScript utilisée pour les fonctionnalités de langage JavaScript et TypeScript", "typescript.openTsServerLog.notSupported": "La journalisation du serveur TS nécessite TS 2.2.2+", + "typescript.openTsServerLog.loggingNotEnabled": "La journalisation du serveur TS est désactivée. Définissez 'typescript.tsserver.log' et redémarrez le serveur TS pour activer la journalisation", + "typescript.openTsServerLog.enableAndReloadOption": "Activer la journalisation et redémarrer le serveur TS", "typescript.openTsServerLog.noLogFile": "Le serveur TS n'a pas démarré la journalisation.", "openTsServerLog.openFileFailedFailed": "Impossible d'ouvrir le fichier journal du serveur TS", "serverDiedAfterStart": "Le service de langage TypeScript s'est subitement arrêté 5 fois juste après avoir démarré. Il n'y aura pas d'autres redémarrages.", diff --git a/i18n/fra/extensions/typescript/out/utils/logger.i18n.json b/i18n/fra/extensions/typescript/out/utils/logger.i18n.json new file mode 100644 index 0000000000000..bc738f43d0c37 --- /dev/null +++ b/i18n/fra/extensions/typescript/out/utils/logger.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "channelName": "TypeScript" +} \ No newline at end of file diff --git a/i18n/fra/extensions/typescript/out/utils/projectStatus.i18n.json b/i18n/fra/extensions/typescript/out/utils/projectStatus.i18n.json index 9f6a19db97f04..7890a4f6439a6 100644 --- a/i18n/fra/extensions/typescript/out/utils/projectStatus.i18n.json +++ b/i18n/fra/extensions/typescript/out/utils/projectStatus.i18n.json @@ -6,7 +6,6 @@ { "hintExclude": "Pour activer les fonctionnalités de langage JavaScript/TypeScript à l'échelle du projet, excluez les dossiers contenant de nombreux fichiers, par exemple : {0}", "hintExclude.generic": "Pour activer les fonctionnalités de langage JavaScript/TypeScript à l'échelle du projet, excluez les dossiers volumineux contenant des fichiers sources inutilisés.", - "open": "Configurer les exclusions", "large.label": "Configurer les exclusions", "hintExclude.tooltip": "Pour activer les fonctionnalités de langage JavaScript/TypeScript à l'échelle du projet, excluez les dossiers volumineux contenant des fichiers sources inutilisés." } \ No newline at end of file diff --git a/i18n/fra/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/fra/extensions/typescript/out/utils/typingsStatus.i18n.json index 0b61796218ce7..36ca9606c1cf2 100644 --- a/i18n/fra/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/fra/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "installingPackages": "Récupération (fetch) des données pour l'amélioration de TypeScript IntelliSense", + "typesInstallerInitializationFailed.title": "Impossible d'installer des fichiers de typages pour les fonctionnalités de langage JavaScript. Vérifiez que NPM est installé ou configurez 'typescript.npm' dans vos paramètres utilisateur", "typesInstallerInitializationFailed.moreInformation": "Informations", "typesInstallerInitializationFailed.doNotCheckAgain": "Ne plus vérifier", "typesInstallerInitializationFailed.close": "Fermer" diff --git a/i18n/fra/extensions/typescript/package.i18n.json b/i18n/fra/extensions/typescript/package.i18n.json index 3ea163efd6e6a..53c76f9a4c4e5 100644 --- a/i18n/fra/extensions/typescript/package.i18n.json +++ b/i18n/fra/extensions/typescript/package.i18n.json @@ -11,7 +11,8 @@ "typescript.tsdk.desc": "Spécifie le chemin de dossier contenant les fichiers tsserver et lib*.d.ts à utiliser.", "typescript.disableAutomaticTypeAcquisition": "Désactive l'acquisition de type automatique. Nécessite TypeScript >= 2.0.6 et un redémarrage, une fois le changement effectué.", "typescript.check.tscVersion": "Vérifiez si un compilateur TypeScript installé globalement (par exemple tsc) est différent du service de langage TypeScript.", - "typescript.tsserver.experimentalAutoBuild": "Active la build automatique expérimentale. Nécessite la version 1.9 dev ou 2.x tsserver et le redémarrage du code VS une fois celui-ci modifié.", + "typescript.tsserver.log": "Active la journalisation du serveur TS dans un fichier. Ce journal peut être utilisé pour diagnostiquer les problèmes du serveur TS. Il peut contenir des chemins de fichier, du code source et d'autres informations potentiellement sensibles de votre projet.", + "typescript.tsserver.trace": "Active le traçage des messages envoyés au serveur TS. Cette trace peut être utilisée pour diagnostiquer les problèmes du serveur TS. Elle peut contenir des chemins de fichier, du code source et d'autres informations potentiellement sensibles de votre projet.", "typescript.validate.enable": "Activez/désactivez la validation TypeScript.", "typescript.format.enable": "Activez/désactivez le formateur TypeScript par défaut.", "javascript.format.enable": "Activez/désactivez le formateur JavaScript par défaut.", @@ -23,6 +24,7 @@ "format.insertSpaceBeforeFunctionParenthesis": "Définit la gestion des espaces avant les parenthèses des arguments d'une fonction. Nécessite TypeScript >= 2.1.5.", "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": "Définit le traitement des espaces après l'ouverture et avant la fermeture de parenthèses non vides.", "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": "Définit le traitement des espaces après l'ouverture et avant la fermeture de crochets non vides.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": "Définit la gestion de l'espace après l'ouverture et avant la fermeture des accolades non vides. Nécessite TypeScript >= 2.3.0.", "format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": "Définit la gestion de l'espace après l'ouverture et avant la fermeture des accolades de la chaîne de modèle. Nécessite TypeScript >= 2.0.6.", "format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": "Définit la gestion de l'espace après l'ouverture et avant la fermeture des accolades de l'expression JSX. Nécessite TypeScript >= 2.0.6.", "format.placeOpenBraceOnNewLineForFunctions": "Définit si une accolade ouvrante dans une fonction est placée ou non sur une nouvelle ligne.", @@ -30,6 +32,16 @@ "javascript.validate.enable": "Activez/désactivez la validation JavaScript.", "typescript.goToProjectConfig.title": "Accéder à la configuration du projet", "javascript.goToProjectConfig.title": "Accéder à la configuration du projet", - "typescript.openTsServerLog.title": "Ouvrir le fichier journal du serveur TS", - "typescript.selectTypeScriptVersion.title": "Sélectionner la version de TypeScript" + "javascript.referencesCodeLens.enabled": "Activez/désactivez les références CodeLens dans les fichiers JavaScript.", + "typescript.referencesCodeLens.enabled": "Activez/désactivez les références CodeLens dans les fichiers TypeScript. Nécessite TypeScript >= 2.0.6.", + "typescript.implementationsCodeLens.enabled": "Activer/désactiver CodeLens dans les implémentations. Nécessite TypeScript >= 2.2.0.", + "typescript.openTsServerLog.title": "Ouvrir le journal du serveur TS", + "typescript.restartTsServer": "Redémarrer le serveur TS", + "typescript.selectTypeScriptVersion.title": "Sélectionner la version de TypeScript", + "jsDocCompletion.enabled": "Activer/désactiver les commentaires JSDoc automatiques", + "javascript.implicitProjectConfig.checkJs": "Activer/désactiver la vérification sémantique des fichiers JavaScript. Les fichiers jsconfig.json ou tsconfig.json existants remplacent ce paramètre. Nécessite TypeScript >=2.3.1.", + "typescript.npm": "Spécifie le chemin de l'exécutable NPM utilisé pour l'acquisition de type automatique. Nécessite TypeScript >= 2.3.4.", + "typescript.check.npmIsInstalled": "Vérifie si NPM est installé pour l'acquisition de type automatique.", + "javascript.nameSuggestions": "Activez/désactivez l'inclusion de noms uniques à partir du fichier dans les listes de suggestions JavaScript.", + "typescript.tsc.autoDetect": "Contrôle si la détection automatique des tâches tsc est activée ou désactivée." } \ No newline at end of file diff --git a/i18n/fra/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/fra/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index d6968482f68eb..e5800681aa307 100644 --- a/i18n/fra/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/fra/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,8 +6,7 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "L'image est trop grande pour être affichée dans l'éditeur. ", - "resourceOpenExternalButton": "Ouvrir l'image", - "resourceOpenExternalText": " en utilisant un programme externe ?", + "resourceOpenExternalButton": " Ouvrir l'image en utilisant un programme externe ?", "nativeBinaryError": "Impossible d'afficher le fichier dans l'éditeur : soit il est binaire, soit il est très volumineux, soit il utilise un encodage de texte non pris en charge.", "sizeB": "{0} o", "sizeKB": "{0} Ko", diff --git a/i18n/fra/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/fra/src/vs/base/common/jsonErrorMessages.i18n.json new file mode 100644 index 0000000000000..5c2fcbf92b847 --- /dev/null +++ b/i18n/fra/src/vs/base/common/jsonErrorMessages.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error.invalidSymbol": "Symbole non valide", + "error.invalidNumberFormat": "Format de nombre non valide", + "error.propertyNameExpected": "Nom de propriété attendu", + "error.valueExpected": "Valeur attendue", + "error.colonExpected": "Signe des deux points attendu", + "error.commaExpected": "Virgule attendue", + "error.closeBraceExpected": "Accolade fermante attendue", + "error.closeBracketExpected": "Crochet fermant attendu", + "error.endOfFileExpected": "Fin de fichier attendue" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/base/common/keybindingLabels.i18n.json b/i18n/fra/src/vs/base/common/keybindingLabels.i18n.json new file mode 100644 index 0000000000000..7e3da801c82a7 --- /dev/null +++ b/i18n/fra/src/vs/base/common/keybindingLabels.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ctrlKey": "Ctrl", + "shiftKey": "Maj", + "altKey": "Alt", + "windowsKey": "Windows", + "ctrlKey.long": "Contrôle", + "shiftKey.long": "Maj", + "altKey.long": "Alt", + "cmdKey.long": "Commande", + "windowsKey.long": "Windows" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/code/electron-main/menus.i18n.json b/i18n/fra/src/vs/code/electron-main/menus.i18n.json index a0ef32b732c72..fbd2864cbea64 100644 --- a/i18n/fra/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/fra/src/vs/code/electron-main/menus.i18n.json @@ -6,11 +6,15 @@ { "mFile": "&&Fichier", "mEdit": "&&Modifier", + "mSelection": "&&Sélection", + "mView": "&&Afficher", + "mGoto": "&&Accéder", "mDebug": "&&Déboguer", "mWindow": "Fenêtre", "mHelp": "&&Aide", "miNewWindow": "Nouvelle &&fenêtre", "mAbout": "À propos de {0}", + "mServices": "Services", "mHide": "Masquer {0}", "mHideOthers": "Masquer les autres", "mShowAll": "Afficher tout", @@ -28,6 +32,7 @@ "miCloseWindow": "Ferm&&er la fenêtre", "miCloseFolder": "&&Fermer le dossier", "miCloseEditor": "Fermer l'édit&&eur", + "miExit": "Q&&uitter", "miOpenSettings": "&&Paramètres", "miOpenKeymap": "Racco&&urcis clavier", "miOpenKeymapExtensions": "&&Extensions de mappage de touches", @@ -39,6 +44,7 @@ "miClearRecentOpen": "&&Effacer les fichiers récents", "miUndo": "&&Annuler", "miRedo": "&&Rétablir", + "miCut": "Coupe&&r", "miCopy": "&&Copier", "miPaste": "&&Coller", "miFind": "&&Rechercher", @@ -64,7 +70,7 @@ "miSmartSelectShrink": "&&Réduire la sélection", "miViewExplorer": "&&Explorateur", "miViewSearch": "&&Rechercher", - "miViewGit": "&&Git", + "miViewSCM": "S&&CM", "miViewDebug": "&&Déboguer", "miViewExtensions": "E&&xtensions", "miToggleOutput": "&&Sortie", @@ -92,6 +98,7 @@ "miZoomIn": "&&Zoom avant", "miZoomOut": "Zoo&&m arrière", "miZoomReset": "&&Réinitialiser le zoom", + "miBack": "&&Précédent", "miForward": "&&Suivant", "miNextEditor": "Éditeur &&suivant", "miPreviousEditor": "Éditeur pré&&cédent", @@ -108,6 +115,8 @@ "miGotoSymbolInFile": "Atteindre le &&symbole dans le fichier...", "miGotoSymbolInWorkspace": "Atteindre le symbole dans l'espace de &&travail...", "miGotoDefinition": "Atteindre la &&définition", + "miGotoTypeDefinition": "Accéder à la définition de &&type", + "miGotoImplementation": "Accéder à l'&&implémentation", "miGotoLine": "Atteindre la &&ligne...", "miStartDebugging": "&&Démarrer le débogage", "miStartWithoutDebugging": "Démarrer &&sans débogage", @@ -124,16 +133,17 @@ "miColumnBreakpoint": "P&&oint d'arrêt de la colonne", "miFunctionBreakpoint": "Point d'arrêt sur &&fonction...", "miNewBreakpoint": "&&Nouveau point d'arrêt", + "miEnableAllBreakpoints": "Activer tous les points d'arrêt", "miDisableAllBreakpoints": "Désacti&&ver tous les points d'arrêt", "miRemoveAllBreakpoints": "Supprimer &&tous les points d'arrêt", "miInstallAdditionalDebuggers": "&&Installer des débogueurs supplémentaires...", "mMinimize": "Réduire", - "mClose": "Fermer", "mBringToFront": "Mettre tout au premier plan", "miToggleDevTools": "Activer/désactiver les ou&&tils de développement", "miAccessibilityOptions": "&&Options d'accessibilité", "miReportIssues": "S&&ignaler les problèmes", "miWelcome": "&&Bienvenue", + "miInteractivePlayground": "Terrain de jeu &&interactif", "miDocumentation": "&&Documentation", "miReleaseNotes": "Notes de pu&&blication", "miKeyboardShortcuts": "Référence des racco&&urcis clavier", @@ -143,7 +153,7 @@ "miLicense": "Affic&&her la licence", "miPrivacyStatement": "Déc&&laration de confidentialité", "miAbout": "À pr&&opos de", - "miRestartToUpdate": "Redémarrer pour mettre à jour...", + "accessibilityOptionsWindowTitle": "Options d'accessibilité", "miCheckingForUpdates": "Recherche des mises à jour...", "miDownloadUpdate": "Télécharger la mise à jour disponible", "miDownloadingUpdate": "Téléchargement de la mise à jour...", diff --git a/i18n/fra/src/vs/code/electron-main/windows.i18n.json b/i18n/fra/src/vs/code/electron-main/windows.i18n.json index 7893fb77cc30a..d1f659dfa2004 100644 --- a/i18n/fra/src/vs/code/electron-main/windows.i18n.json +++ b/i18n/fra/src/vs/code/electron-main/windows.i18n.json @@ -7,7 +7,6 @@ "ok": "OK", "pathNotExistTitle": "Le chemin d'accès n'existe pas", "pathNotExistDetail": "Le chemin d'accès '{0}' ne semble plus exister sur le disque.", - "accessibilityOptionsWindowTitle": "Options d'accessibilité", "reopen": "Rouvrir", "wait": "Continuer à attendre", "close": "Fermer", @@ -15,8 +14,6 @@ "appStalledDetail": "Vous pouvez rouvrir ou fermer la fenêtre, ou continuer à patienter.", "appCrashed": "La fenêtre s'est bloquée", "appCrashedDetail": "Nous vous prions de nous excuser pour ce désagrément. Vous pouvez rouvrir la fenêtre pour reprendre l'action au moment où elle a été interrompue.", - "newWindow": "Nouvelle fenêtre", - "newWindowDesc": "Ouvre une nouvelle fenêtre", - "recentFolders": "Dossiers récents", - "folderDesc": "{0} {1}" + "openFile": "Ouvrir le fichier", + "openFolder": "Ouvrir le dossier" } \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/browser/widget/diffEditorWidget.i18n.json b/i18n/fra/src/vs/editor/browser/widget/diffEditorWidget.i18n.json index 8b6ad71cd4e6d..102e04a7a89f0 100644 --- a/i18n/fra/src/vs/editor/browser/widget/diffEditorWidget.i18n.json +++ b/i18n/fra/src/vs/editor/browser/widget/diffEditorWidget.i18n.json @@ -3,4 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "diffEditorInserted": "Couleur d'arrière-plan du texte inséré.", + "diffEditorRemoved": "Couleur d'arrière-plan du texte supprimé.", + "diffEditorInsertedOutline": "Couleur de contour du texte inséré.", + "diffEditorRemovedOutline": "Couleur de contour du texte supprimé." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/browser/widget/diffReview.i18n.json b/i18n/fra/src/vs/editor/browser/widget/diffReview.i18n.json new file mode 100644 index 0000000000000..e7284c958c2a7 --- /dev/null +++ b/i18n/fra/src/vs/editor/browser/widget/diffReview.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "Fermer" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json index 93596cccabe56..62075c8e70118 100644 --- a/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -9,6 +9,7 @@ "fontWeight": "Contrôle l'épaisseur de police.", "fontSize": "Contrôle la taille de police en pixels.", "lineHeight": "Contrôle la hauteur de ligne. Utilisez 0 pour calculer lineHeight à partir de fontSize.", + "letterSpacing": "Définit l'espacement des caractères en pixels.", "lineNumbers": "Contrôle l'affichage des numéros de ligne. Les valeurs possibles sont 'activé', 'désactivé' et 'relatif'. La valeur 'relatif' indique le numéro de ligne à partir de la position actuelle du curseur.", "rulers": "Colonnes où afficher les règles verticales", "wordSeparators": "Caractères utilisés comme séparateurs de mots durant la navigation ou les opérations basées sur les mots", @@ -20,8 +21,11 @@ "roundedSelection": "Contrôle si les sélections ont des angles arrondis", "scrollBeyondLastLine": "Contrôle si l'éditeur défile au-delà de la dernière ligne", "minimap.enabled": "Contrôle si la minicarte est affichée", + "minimap.showSlider": "Contrôle si le curseur de la minicarte est automatiquement masqué", "minimap.renderCharacters": "Afficher les caractères réels sur une ligne (par opposition aux blocs de couleurs)", "minimap.maxColumn": "Limiter la largeur de la minicarte pour afficher au maximum un certain nombre de colonnes", + "find.seedSearchStringFromSelection": "Contrôle si nous remplissons la chaîne à rechercher dans le Widget Recherche à partir de la sélection de l'éditeur", + "find.autoFindInSelection": "Contrôle si l'indicateur Rechercher dans la sélection est activé quand plusieurs caractères ou lignes de texte sont sélectionnés dans l'éditeur", "wordWrap.off": "Le retour automatique à la ligne n'est jamais effectué.", "wordWrap.on": "Le retour automatique à la ligne s'effectue en fonction de la largeur de la fenêtre d'affichage.", "wordWrap.wordWrapColumn": "Le retour automatique à la ligne s'effectue en fonction de 'editor.wordWrapColumn'.", @@ -30,17 +34,20 @@ "wordWrapColumn": "Contrôle la colonne de retour automatique à la ligne de l'éditeur quand 'editor.wordWrap' a la valeur 'wordWrapColumn' ou 'bounded'.", "wrappingIndent": "Contrôle le retrait des lignes renvoyées. La valeur peut être 'none', 'same' ou 'indent'.", "mouseWheelScrollSensitivity": "Multiplicateur à utiliser pour le 'deltaX' et le 'deltaY' des événements de défilement de la roulette de la souris", + "multiCursorModifier.ctrlCmd": "Mappe vers 'Contrôle' dans Windows et Linux, et vers 'Commande' dans OSX.", + "multiCursorModifier.alt": "Mappe vers 'Alt' dans Windows et Linux, et vers 'Option' dans OSX.", + "multiCursorModifier": "Modificateur à utiliser pour ajouter plusieurs curseurs avec la souris. 'ctrlCmd' mappe vers 'Contrôle' dans Windows et Linux, et vers 'Commande' dans OSX. Les mouvements de souris Accéder à la définition et Ouvrir le lien s'adaptent pour ne pas entrer en conflit avec le modificateur multicurseur.", "quickSuggestions.strings": "Activez les suggestions rapides dans les chaînes.", "quickSuggestions.comments": "Activez les suggestions rapides dans les commentaires.", "quickSuggestions.other": "Activez les suggestions rapides en dehors des chaînes et des commentaires.", "quickSuggestions": "Contrôle si les suggestions doivent s'afficher automatiquement en cours de frappe", "quickSuggestionsDelay": "Contrôle le délai en ms au bout duquel les suggestions rapides s'affichent", - "parameterHints": "Active les indicateurs de paramètres", + "parameterHints": "Active la pop up qui affiche la documentation des paramètres et écrit de l'information pendant que vous écrivez", "autoClosingBrackets": "Contrôle si l'éditeur doit automatiquement fermer les crochets après les avoir ouverts", "formatOnType": "Contrôle si l'éditeur doit automatiquement mettre en forme la ligne après la saisie", "formatOnPaste": "Contrôle si l'éditeur doit automatiquement mettre en forme le contenu collé. Un formateur doit être disponible et doit pouvoir mettre en forme une plage dans un document.", "suggestOnTriggerCharacters": "Contrôle si les suggestions doivent s'afficher automatiquement durant la saisie de caractères de déclenchement", - "acceptSuggestionOnEnter": "Contrôle si les suggestions peuvent être acceptées avec Entrée (en plus de Tab). Cela permet d'éviter toute ambiguïté entre l'insertion de nouvelles lignes et l'acceptation de suggestions.", + "acceptSuggestionOnEnter": "Contrôle si les suggestions doivent être acceptées avec 'Entrée', en plus de 'Tab'. Cela permet d'éviter toute ambiguïté entre l'insertion de nouvelles lignes et l'acceptation de suggestions. La valeur 'smart' signifie que vous acceptez uniquement une suggestion avec Entrée quand elle applique une modification de texte", "acceptSuggestionOnCommitCharacter": "Contrôle si les suggestions doivent être acceptées avec des caractères de validation. Par exemple, en JavaScript, le point-virgule (';') peut être un caractère de validation qui permet d'accepter une suggestion et de taper ce caractère.", "snippetSuggestions": "Contrôle si les extraits de code s'affichent en même temps que d'autres suggestions, ainsi que leur mode de tri.", "emptySelectionClipboard": "Contrôle si la copie sans sélection permet de copier la ligne actuelle.", @@ -62,12 +69,18 @@ "renderLineHighlight": "Contrôle la façon dont l'éditeur doit afficher la surbrillance de la ligne active. Les différentes possibilités sont 'none', 'gutter', 'line' et 'all'.", "codeLens": "Contrôle si l'éditeur affiche les indicateurs CodeLens", "folding": "Contrôle si le pliage de code est activé dans l'éditeur", + "showFoldingControls": "Définit si les contrôles de réduction sur la bordure sont cachés automatiquement", "matchBrackets": "Met en surbrillance les crochets correspondants quand l'un d'eux est sélectionné.", "glyphMargin": "Contrôle si l'éditeur doit afficher la marge de glyphes verticale. La marge de glyphes sert principalement au débogage.", "useTabStops": "L'insertion et la suppression d'un espace blanc suit les taquets de tabulation", "trimAutoWhitespace": "Supprimer l'espace blanc de fin inséré automatiquement", "stablePeek": "Garder les éditeurs d'aperçu ouverts même si l'utilisateur double-clique sur son contenu ou appuie sur la touche Échap.", "dragAndDrop": "Contrôle si l'éditeur autorise le déplacement des sélections par glisser-déplacer.", + "accessibilitySupport.auto": "L'éditeur utilise les API de la plateforme pour détecter si un lecteur d'écran est attaché.", + "accessibilitySupport.on": "L'éditeur est optimisé en permanence pour une utilisation avec un lecteur d'écran.", + "accessibilitySupport.off": "L'éditeur n'est jamais optimisé pour une utilisation avec un lecteur d'écran.", + "accessibilitySupport": "Contrôle si l'éditeur doit s'exécuter dans un mode optimisé pour les lecteurs d'écran.", + "links": "Contrôle si l'éditeur doit détecter les liens et les rendre cliquables", "sideBySide": "Contrôle si l'éditeur de différences affiche les différences en mode côte à côte ou inline", "ignoreTrimWhitespace": "Contrôle si l'éditeur de différences affiche les changements liés aux espaces blancs de début ou de fin comme des différences", "renderIndicators": "Contrôle si l'éditeur de différences affiche les indicateurs +/- pour les modifications ajoutées/supprimées", diff --git a/i18n/fra/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/fra/src/vs/editor/common/config/editorOptions.i18n.json new file mode 100644 index 0000000000000..452e3e365b7d6 --- /dev/null +++ b/i18n/fra/src/vs/editor/common/config/editorOptions.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "accessibilityOffAriaLabel": "L'éditeur n'est pas accessible pour le moment. Appuyez sur Alt+F1 pour connaître les options.", + "editorViewAccessibleLabel": "Contenu d'éditeur" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/common/services/bulkEdit.i18n.json b/i18n/fra/src/vs/editor/common/services/bulkEdit.i18n.json index 4d5385f386dd2..9a1e91ba2a5ce 100644 --- a/i18n/fra/src/vs/editor/common/services/bulkEdit.i18n.json +++ b/i18n/fra/src/vs/editor/common/services/bulkEdit.i18n.json @@ -4,5 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "conflict": "Ces fichiers ont changé pendant ce temps : {0}" + "conflict": "Ces fichiers ont changé pendant ce temps : {0}", + "summary.0": "Aucune modification effectuée", + "summary.nm": "{0} modifications de texte effectuées dans {1} fichiers", + "summary.n0": "{0} modifications de texte effectuées dans un fichier" } \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/fra/src/vs/editor/common/view/editorColorRegistry.i18n.json index b8302d62f69c2..0025ed5f438c3 100644 --- a/i18n/fra/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/fra/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -10,5 +10,15 @@ "caret": "Couleur du curseur de l'éditeur.", "editorWhitespaces": "Couleur des espaces blancs dans l'éditeur.", "editorIndentGuides": "Couleur des repères de retrait de l'éditeur.", - "editorLineNumbers": "Couleur des numéros de ligne de l'éditeur." + "editorLineNumbers": "Couleur des numéros de ligne de l'éditeur.", + "editorRuler": "Couleur des règles de l'éditeur", + "editorCodeLensForeground": "Couleur pour les indicateurs CodeLens", + "editorBracketMatchBackground": "Couleur d'arrière-plan pour les accolades associées", + "editorBracketMatchBorder": "Couleur pour le contour des accolades associées", + "editorOverviewRulerBorder": "Couleur de la bordure de la règle d'apperçu.", + "editorGutter": "Couleur de fond pour la bordure de l'éditeur. La bordure contient les marges pour les symboles et les numéros de ligne.", + "errorForeground": "Couleur de premier plan de la ligne ondulée marquant les erreurs dans l'éditeur.", + "errorBorder": "Couleur de bordure de la ligne ondulée marquant les erreurs dans l'éditeur.", + "warningForeground": "Couleur de premier plan de la ligne ondulée marquant les avertissements dans l'éditeur.", + "warningBorder": "Couleur de bordure de la ligne ondulée marquant les avertissements dans l'éditeur." } \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/find/common/findController.i18n.json b/i18n/fra/src/vs/editor/contrib/find/common/findController.i18n.json index 83dcc17be9b65..7517a404783a2 100644 --- a/i18n/fra/src/vs/editor/contrib/find/common/findController.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/find/common/findController.i18n.json @@ -14,6 +14,6 @@ "addSelectionToPreviousFindMatch": "Ajouter la sélection à la correspondance de recherche précédente", "moveSelectionToNextFindMatch": "Déplacer la dernière sélection vers la correspondance de recherche suivante", "moveSelectionToPreviousFindMatch": "Déplacer la dernière sélection à la correspondance de recherche précédente", - "selectAllOccurencesOfFindMatch": "Sélectionner toutes les occurrences des correspondances de la recherche", + "selectAllOccurrencesOfFindMatch": "Sélectionner toutes les occurrences des correspondances de la recherche", "changeAll.label": "Modifier toutes les occurrences" } \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/format/browser/formatActions.i18n.json b/i18n/fra/src/vs/editor/contrib/format/browser/formatActions.i18n.json index d1fd1741e7486..b684a5befec53 100644 --- a/i18n/fra/src/vs/editor/contrib/format/browser/formatActions.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/format/browser/formatActions.i18n.json @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "hint11": "Made 1 formatting edit on line {0}", - "hintn1": "Made {0} formatting edits on line {1}", - "hint1n": "Made 1 formatting edit between lines {0} and {1}", - "hintnn": "Made {0} formatting edits between lines {1} and {2}", - "formatDocument.label": "Format Document", - "formatSelection.label": "Format Selection" + "hint11": "1 modification de format effectuée à la ligne {0}", + "hintn1": "{0} modifications de format effectuées à la ligne {1}", + "hint1n": "1 modification de format effectuée entre les lignes {0} et {1}", + "hintnn": "{0} modifications de format effectuées entre les lignes {1} et {2}", + "formatDocument.label": "Mettre en forme le document", + "formatSelection.label": "Mettre en forme la sélection" } \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.i18n.json b/i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.i18n.json index 938a77b32036f..5fee5001dd06d 100644 --- a/i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.i18n.json @@ -12,10 +12,12 @@ "actions.previewDecl.label": "Apercu de définition", "goToImplementation.noResultWord": "Implémentation introuvable pour '{0}'", "goToImplementation.generic.noResults": "Implémentation introuvable", + "meta.implementations.title": "– Implémentations {0}", "actions.goToImplementation.label": "Accéder à l'implémentation", "actions.peekImplementation.label": "Aperçu de l'implémentation", "goToTypeDefinition.noResultWord": "Définition de type introuvable pour '{0}'", "goToTypeDefinition.generic.noResults": "Définition de type introuvable", + "meta.typeDefinitions.title": " – Définitions de type {0}", "actions.goToTypeDefinition.label": "Atteindre la définition de type", "actions.peekTypeDefinition.label": "Aperçu de la définition du type", "multipleResults": "Cliquez pour afficher {0} définitions." diff --git a/i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..0488ff4835459 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "Définition introuvable pour '{0}'", + "generic.noResults": "Définition introuvable", + "meta.title": " – {0} définitions", + "actions.goToDecl.label": "Atteindre la définition", + "actions.goToDeclToSide.label": "Ouvrir la définition sur le côté", + "actions.previewDecl.label": "Apercu de définition", + "goToImplementation.noResultWord": "Implémentation introuvable pour '{0}'", + "goToImplementation.generic.noResults": "Implémentation introuvable", + "meta.implementations.title": "– Implémentations {0}", + "actions.goToImplementation.label": "Accéder à l'implémentation", + "actions.peekImplementation.label": "Aperçu de l'implémentation", + "goToTypeDefinition.noResultWord": "Définition de type introuvable pour '{0}'", + "goToTypeDefinition.generic.noResults": "Définition de type introuvable", + "meta.typeDefinitions.title": " – Définitions de type {0}", + "actions.goToTypeDefinition.label": "Atteindre la définition de type", + "actions.peekTypeDefinition.label": "Aperçu de la définition du type" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..247bd9d24da5d --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "Cliquez pour afficher {0} définitions." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/hover/browser/hover.i18n.json b/i18n/fra/src/vs/editor/contrib/hover/browser/hover.i18n.json index c2d6b7a05c852..f2c7ed175601d 100644 --- a/i18n/fra/src/vs/editor/contrib/hover/browser/hover.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/hover/browser/hover.i18n.json @@ -4,8 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "showHover": "Afficher par pointage", - "hoverHighlight": "Mettez en surbrillance ci-dessous le mot pour lequel un pointage s'affiche.", - "hoverBackground": "Couleur d'arrière-plan du pointage de l'éditeur.", - "hoverBorder": "Couleur de bordure du pointage de l'éditeur." + "showHover": "Afficher par pointage" } \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/links/browser/links.i18n.json b/i18n/fra/src/vs/editor/contrib/links/browser/links.i18n.json index f16f009895594..3b71097e7dfb4 100644 --- a/i18n/fra/src/vs/editor/contrib/links/browser/links.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/links/browser/links.i18n.json @@ -6,6 +6,7 @@ { "links.navigate.mac": "Commande + clic pour suivre le lien", "links.navigate": "Ctrl + clic pour suivre le lien", + "links.navigate.al": "Alt + clic pour suivre le lien", "invalid.url": "Échec de l'ouverture de ce lien, car il n'est pas bien formé : {0}", "missing.url": "Échec de l'ouverture de ce lien, car sa cible est manquante.", "label": "Ouvrir le lien" diff --git a/i18n/fra/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json b/i18n/fra/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json index 22c40bdd6d094..081fbcf0bec0a 100644 --- a/i18n/fra/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "mutlicursor.insertAbove": "Ajouter un curseur au-dessus", - "mutlicursor.insertBelow": "Ajouter un curseur en dessous" + "mutlicursor.insertBelow": "Ajouter un curseur en dessous", + "mutlicursor.insertAtEndOfEachLineSelected": "Ajouter des curseurs à la fin des lignes" } \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index d4516cedc780c..9093716125456 100644 --- a/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -4,5 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "aria.result.0": "Résultats introuvables" + "aria.oneReference": "symbole dans {0} sur la ligne {1}, colonne {2}", + "aria.fileReferences.1": "1 symbole dans {0}, chemin complet {1}", + "aria.fileReferences.N": "{0} symboles dans {1}, chemin complet {2}", + "aria.result.0": "Résultats introuvables", + "aria.result.1": "1 symbole dans {0}", + "aria.result.n1": "{0} symboles dans {1}", + "aria.result.nm": "{0} symboles dans {1} fichiers" } \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index ff2057cf4f807..498b3551c287b 100644 --- a/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -12,15 +12,16 @@ "noResults": "Aucun résultat", "peekView.alternateTitle": "Références", "peekViewTitleBackground": "Couleur d'arrière-plan de la zone de titre de l'affichage d'aperçu.", - "peekViewTitle": "Couleur du titre de l'affichage d'aperçu.", - "peekViewTitleInfo": "Couleur des informations sur le titre de l'affichage d'aperçu.", + "peekViewTitleForeground": "Couleur du titre de l'affichage d'aperçu.", + "peekViewTitleInfoForeground": "Couleur des informations sur le titre de l'affichage d'aperçu.", "peekViewBorder": "Couleur des bordures et de la flèche de l'affichage d'aperçu.", "peekViewResultsBackground": "Couleur d'arrière-plan de la liste des résultats de l'affichage d'aperçu.", - "peekViewResultsMatchForeground": "Premier plan de l'entrée correspondante dans la liste des résultats de l'affichage d'aperçu.", - "peekViewResultsFileForeground": "Premier plan de l'entrée de fichier dans la liste des résultats de l'affichage d'aperçu.", + "peekViewResultsMatchForeground": "Couleur de premier plan des noeuds de lignes dans la liste des résultats de l'affichage d'aperçu.", + "peekViewResultsFileForeground": "Couleur de premier plan des noeuds de fichiers dans la liste des résultats de l'affichage d'aperçu.", "peekViewResultsSelectionBackground": "Couleur d'arrière-plan de l'entrée sélectionnée dans la liste des résultats de l'affichage d'aperçu.", "peekViewResultsSelectionForeground": "Couleur de premier plan de l'entrée sélectionnée dans la liste des résultats de l'affichage d'aperçu.", "peekViewEditorBackground": "Couleur d'arrière-plan de l'éditeur d'affichage d'aperçu.", + "peekViewEditorGutterBackground": "Couleur d'arrière-plan de la bordure de l'éditeur d'affichage d'aperçu.", "peekViewResultsMatchHighlight": "Couleur de mise en surbrillance d'une correspondance dans la liste des résultats de l'affichage d'aperçu.", "peekViewEditorMatchHighlight": "Couleur de mise en surbrillance d'une correspondance dans l'éditeur de l'affichage d'aperçu." } \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/rename/browser/rename.i18n.json b/i18n/fra/src/vs/editor/contrib/rename/browser/rename.i18n.json index 9233f050e7582..d6f02080b63a5 100644 --- a/i18n/fra/src/vs/editor/contrib/rename/browser/rename.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/rename/browser/rename.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "no result": "Aucun résultat.", + "aria": "'{0}' renommé en '{1}'. Récapitulatif : {2}", "rename.failed": "Échec de l'exécution du renommage.", "rename.label": "Renommer le symbole" } \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json b/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json index ce300ab5ae627..6715662ea09e6 100644 --- a/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "arai.alert.snippet": "L'acceptation de '{0}' a inséré le texte suivant : {1}", "suggest.trigger.label": "Suggestions pour Trigger" } \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 47653595d2e1c..75285eb257ef9 100644 --- a/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -4,10 +4,15 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "editorSuggestWidgetBackground": "Couleur d'arrière-plan du widget de suggestion.", + "editorSuggestWidgetBorder": "Couleur de bordure du widget de suggestion.", + "editorSuggestWidgetForeground": "Couleur de premier plan du widget de suggestion.", + "editorSuggestWidgetSelectedBackground": "Couleur d'arrière-plan de l'entrée sélectionnée dans le widget de suggestion.", + "editorSuggestWidgetHighlightForeground": "Couleur de la surbrillance des correspondances dans le widget de suggestion.", "readMore": "En savoir plus...{0}", "suggestionWithDetailsAriaLabel": "{0}, suggestion, avec détails", "suggestionAriaLabel": "{0}, suggestion", - "goback": "Précédent", + "readLess": "En savoir moins...{0}", "suggestWidget.loading": "Chargement...", "suggestWidget.noSuggestions": "Pas de suggestions.", "suggestionAriaAccepted": "{0}, accepté", diff --git a/i18n/fra/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/fra/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json index bdd70d229dba5..1d2d1988d2fae 100644 --- a/i18n/fra/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json +++ b/i18n/fra/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -15,5 +15,9 @@ "schema.brackets": "Définit les symboles de type crochet qui augmentent ou diminuent le retrait.", "schema.autoClosingPairs": "Définit les paires de crochets. Quand vous entrez un crochet ouvrant, le crochet fermant est inséré automatiquement.", "schema.autoClosingPairs.notIn": "Définit une liste d'étendues où les paires automatiques sont désactivées.", - "schema.surroundingPairs": "Définit les paires de crochets qui peuvent être utilisées pour entourer la chaîne sélectionnée." + "schema.surroundingPairs": "Définit les paires de crochets qui peuvent être utilisées pour entourer la chaîne sélectionnée.", + "schema.wordPattern": "La définition du mot dans le langage", + "schema.wordPattern.pattern": "L'expression régulière utilisée pour la recherche", + "schema.wordPattern.flags": "Les options d'expression régulière utilisées pour la recherche", + "schema.wordPattern.flags.errorMessage": "Doit valider l'expression régulière `/^([gimuy]+)$/`." } \ No newline at end of file diff --git a/i18n/fra/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/fra/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json index a0e16db5a082e..4ec0caa12c157 100644 --- a/i18n/fra/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json +++ b/i18n/fra/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "requirearray": "les éléments de menu doivent figurer dans un tableau", "requirestring": "la propriété '{0}' est obligatoire et doit être de type 'string'", "optstring": "La propriété '{0}' peut être omise ou doit être de type 'string'", "vscode.extension.contributes.menuItem.command": "Identificateur de la commande à exécuter. La commande doit être déclarée dans la section 'commands'", @@ -20,6 +21,8 @@ "menus.scmTitle": "Menu du titre du contrôle de code source", "menus.resourceGroupContext": "Menu contextuel du groupe de ressources du contrôle de code source", "menus.resourceStateContext": "Menu contextuel de l'état des ressources du contrôle de code source", + "view.viewTitle": "Menu de titre de la vue ajoutée", + "view.itemContext": "Menu contextuel de l'élément de vue ajoutée", "nonempty": "valeur non vide attendue.", "opticon": "la propriété 'icon' peut être omise, ou bien elle doit être une chaîne ou un littéral tel que '{dark, light}'", "requireStringOrObject": "la propriété `{0}` est obligatoire et doit être de type `string` ou `object`", diff --git a/i18n/fra/src/vs/platform/configuration/common/configurationRegistry.i18n.json b/i18n/fra/src/vs/platform/configuration/common/configurationRegistry.i18n.json index 19a7fe4baeeed..a9374accfc30b 100644 --- a/i18n/fra/src/vs/platform/configuration/common/configurationRegistry.i18n.json +++ b/i18n/fra/src/vs/platform/configuration/common/configurationRegistry.i18n.json @@ -7,13 +7,6 @@ "defaultConfigurations.title": "Substitutions de configuration par défaut", "overrideSettings.description": "Configurez les paramètres d'éditeur à remplacer pour le langage {0}.", "overrideSettings.defaultDescription": "Configurez les paramètres d'éditeur à remplacer pour un langage.", - "vscode.extension.contributes.configuration": "Ajoute des paramètres de configuration.", - "vscode.extension.contributes.configuration.title": "Résumé des paramètres. Cette étiquette va être utilisée dans le fichier de paramètres en tant que commentaire de séparation.", - "vscode.extension.contributes.configuration.properties": "Description des propriétés de configuration.", "config.property.languageDefault": "Impossible d'inscrire '{0}'. Ceci correspond au modèle de propriété '\\\\[.*\\\\]$' permettant de décrire les paramètres d'éditeur spécifiques à un langage. Utilisez la contribution 'configurationDefaults'.", - "config.property.duplicate": "Impossible d'inscrire '{0}'. Cette propriété est déjà inscrite.", - "invalid.properties": "'configuration.properties' doit être un objet", - "invalid.type": "s'il est défini, 'configuration.type' doit avoir la valeur 'object", - "invalid.title": "'configuration.title' doit être une chaîne", - "vscode.extension.contributes.defaultConfiguration": "Contribue aux paramètres de configuration d'éditeur par défaut en fonction du langage." + "config.property.duplicate": "Impossible d'inscrire '{0}'. Cette propriété est déjà inscrite." } \ No newline at end of file diff --git a/i18n/fra/src/vs/platform/environment/node/argv.i18n.json b/i18n/fra/src/vs/platform/environment/node/argv.i18n.json index 49e7a2656683a..b4a7b53c42bea 100644 --- a/i18n/fra/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/fra/src/vs/platform/environment/node/argv.i18n.json @@ -20,6 +20,7 @@ "showVersions": "Affichez les versions des extensions installées, quand --list-extension est utilisé.", "installExtension": "Installe une extension.", "uninstallExtension": "Désinstalle une extension.", + "experimentalApis": "Active les fonctionnalités d'API proposées pour une extension.", "disableExtensions": "Désactivez toutes les extensions installées.", "disableGPU": "Désactivez l'accélération matérielle du GPU.", "version": "Affichez la version.", diff --git a/i18n/fra/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/fra/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index 23d586b47fb73..1b99c644dbbe3 100644 --- a/i18n/fra/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/fra/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -14,6 +14,12 @@ "vscode.extension.contributes": "Toutes les contributions de l'extension VS Code représentées par ce package.", "vscode.extension.preview": "Définit l'extension à marquer en tant que préversion dans Marketplace.", "vscode.extension.activationEvents": "Événements d'activation pour l'extension VS Code.", + "vscode.extension.activationEvents.onLanguage": "Événement d'activation envoyé quand un fichier résolu dans le langage spécifié est ouvert.", + "vscode.extension.activationEvents.onCommand": "Événement d'activation envoyé quand la commande spécifiée est appelée.", + "vscode.extension.activationEvents.onDebug": "Événement d'activation envoyé quand une session de débogage du type spécifié est démarrée.", + "vscode.extension.activationEvents.workspaceContains": "Événement d'activation envoyé quand un dossier ouvert contient au moins un fichier correspondant au modèle glob spécifié.", + "vscode.extension.activationEvents.onView": "Événement d'activation envoyé quand la vue spécifiée est développée.", + "vscode.extension.activationEvents.star": "Événement d'activation envoyé au démarrage de VS Code. Pour garantir la qualité de l'expérience utilisateur, utilisez cet événement d'activation dans votre extension uniquement quand aucune autre combinaison d'événements d'activation ne fonctionne dans votre cas d'utilisation.", "vscode.extension.badges": "Ensemble de badges à afficher dans la barre latérale de la page d'extensions de Marketplace.", "vscode.extension.badges.url": "URL de l'image du badge.", "vscode.extension.badges.href": "Lien du badge.", diff --git a/i18n/fra/src/vs/platform/history/electron-main/historyMainService.i18n.json b/i18n/fra/src/vs/platform/history/electron-main/historyMainService.i18n.json new file mode 100644 index 0000000000000..316d8cd9473a9 --- /dev/null +++ b/i18n/fra/src/vs/platform/history/electron-main/historyMainService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "newWindow": "Nouvelle fenêtre", + "newWindowDesc": "Ouvre une nouvelle fenêtre", + "recentFolders": "Dossiers récents", + "folderDesc": "{0} {1}" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/fra/src/vs/platform/markers/common/problemMatcher.i18n.json index 144b90a8319ff..cf96c88aba122 100644 --- a/i18n/fra/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/fra/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -34,7 +34,7 @@ "ProblemMatcherParser.noValidIdentifier": "Erreur : la propriété de modèle {0} n'est pas un nom de variable de modèle valide.", "ProblemMatcherParser.problemPattern.watchingMatcher": "Un détecteur de problèmes de correspondance doit définir un modèle de début et un modèle de fin à observer.", "ProblemMatcherParser.invalidRegexp": "Erreur : la chaîne {0} est une expression régulière non valide.\n", - "WatchingPatternSchema.regexp": "Expression régulière permettant de détecter le début ou la fin d'une tâche de suivi.", + "WatchingPatternSchema.regexp": "Expression régulière permettant de détecter le début ou la fin d'une tâche en arrière-plan.", "WatchingPatternSchema.file": "Index de groupe de correspondance du nom de fichier. Peut être omis.", "PatternTypeSchema.name": "Nom d'un modèle faisant l'objet d'une contribution ou prédéfini", "PatternTypeSchema.description": "Modèle de problème ou bien nom d'un modèle de problème faisant l'objet d'une contribution ou prédéfini. Peut être omis si base est spécifié.", @@ -43,14 +43,18 @@ "ProblemMatcherSchema.severity": "Gravité par défaut des problèmes de capture. Est utilisé si le modèle ne définit aucun groupe de correspondance pour la gravité.", "ProblemMatcherSchema.applyTo": "Contrôle si un problème signalé pour un document texte s'applique uniquement aux documents ouverts ou fermés, ou bien à l'ensemble des documents.", "ProblemMatcherSchema.fileLocation": "Définit la façon dont les noms de fichiers signalés dans un modèle de problème doivent être interprétés.", + "ProblemMatcherSchema.background": "Modèles de suivi du début et de la fin d'un détecteur de problèmes de correspondance actif sur une tâche en arrière-plan.", + "ProblemMatcherSchema.background.activeOnStart": "Si la valeur est true, le moniteur d'arrière-plan est actif au démarrage de la tâche. Cela revient à envoyer une ligne qui correspond à beginPattern", + "ProblemMatcherSchema.background.beginsPattern": "En cas de correspondance dans la sortie, le début d'une tâche en arrière-plan est signalé.", + "ProblemMatcherSchema.background.endsPattern": "En cas de correspondance dans la sortie, la fin d'une tâche en arrière-plan est signalée.", + "ProblemMatcherSchema.watching.deprecated": "La propriété espion est déconseillée. Utilisez l'arrière-plan à la place.", + "ProblemMatcherSchema.watching": "Modèles de suivi du début et de la fin d'un détecteur de problèmes de correspondance espion.", "ProblemMatcherSchema.watching.activeOnStart": "Si la valeur est true, le mode espion est actif au démarrage de la tâche. Cela revient à émettre une ligne qui correspond à beginPattern", "ProblemMatcherSchema.watching.beginsPattern": "En cas de correspondance dans la sortie, le début d'une tâche de suivi est signalé.", "ProblemMatcherSchema.watching.endsPattern": "En cas de correspondance dans la sortie, la fin d'une tâche de suivi est signalée.", - "ProblemMatcherSchema.watching": "Modèles de suivi du début et de la fin d'un modèle espion.", "LegacyProblemMatcherSchema.watchedBegin.deprecated": "Cette propriété est déconseillée. Utilisez la propriété espion à la place.", "LegacyProblemMatcherSchema.watchedBegin": "Expression régulière signalant qu'une tâche faisant l'objet d'un suivi commence à s'exécuter via le suivi d'un fichier.", "LegacyProblemMatcherSchema.watchedEnd.deprecated": "Cette propriété est déconseillée. Utilisez la propriété espion à la place.", "LegacyProblemMatcherSchema.watchedEnd": "Expression régulière signalant qu'une tâche faisant l'objet d'un suivi a fini de s'exécuter.", - "NamedProblemMatcherSchema.name": "Nom du détecteur de problèmes de correspondance.", "ProblemMatcherExtPoint": "Contribue aux détecteurs de problèmes de correspondance" } \ No newline at end of file diff --git a/i18n/fra/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/fra/src/vs/platform/theme/common/colorRegistry.i18n.json index 645fb819b1981..157e3416b2fe1 100644 --- a/i18n/fra/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/fra/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -4,27 +4,84 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.color": "Format de couleur non valide. Utilisez #RRGGBB ou #RRGGBBAA", + "invalid.color": "Format de couleur non valide. Utilisez #RGB, #RGBA, #RRGGBB ou #RRGGBBAA", "schema.colors": "Couleurs utilisées dans le banc d'essai.", "foreground": "Couleur de premier plan globale. Cette couleur est utilisée si elle n'est pas remplacée par un composant.", - "focusedElementOutline": "Couleur de plan/bordure globale des éléments ayant le focus. Cette couleur est utilisée si elle n'est pas remplacée par un composant.", - "highContrastBorder": "Couleur de bordure séparant les composants quand un thème à contraste élevé est activé.", - "highContrastOutline": "Couleur de contour des composants actifs quand un thème à contraste élevé est activé.", + "errorForeground": "Couleur principale de premier plan pour les messages d'erreur. Cette couleur est utilisée uniquement si elle n'est pas redéfinie par un composant.", + "descriptionForeground": "Couleur de premier plan du texte descriptif fournissant des informations supplémentaires, par exemple pour un label.", + "focusBorder": "Couleur de bordure globale des éléments ayant le focus. Cette couleur est utilisée si elle n'est pas remplacée par un composant.", + "contrastBorder": "Bordure supplémentaire autour des éléments pour les séparer des autres et obtenir un meilleur contraste.", + "activeContrastBorder": "Bordure supplémentaire autour des éléments actifs pour les séparer des autres et obtenir un meilleur contraste.", + "selectionBackground": "La couleur d'arrière-plan des sélections de texte dans le banc d'essai (par ex., pour les champs d'entrée ou les zones de texte). Notez que cette couleur ne s'applique pas aux sélections dans l'éditeur et le terminal.", + "textSeparatorForeground": "Couleur pour les séparateurs de texte.", + "textLinkForeground": "Couleur des liens dans le texte.", + "textLinkActiveForeground": "Couleur des liens actifs dans le texte.", + "textPreformatForeground": "Couleur des segments de texte préformatés.", + "textBlockQuoteBackground": "Couleur d'arrière-plan des citations dans le texte.", + "textBlockQuoteBorder": "Couleur de bordure des citations dans le texte.", + "textCodeBlockBackground": "Couleur d'arrière-plan des blocs de code dans le texte.", + "widgetShadow": "Couleur de l'ombre des widgets, comme rechercher/remplacer, au sein de l'éditeur.", "inputBoxBackground": "Arrière-plan de la zone d'entrée.", "inputBoxForeground": "Premier plan de la zone d'entrée.", "inputBoxBorder": "Bordure de la zone d'entrée.", "inputBoxActiveOptionBorder": "Couleur de la bordure des options activées dans les champs d'entrée.", + "inputPlaceholderForeground": "Couleur de premier plan de la zone d'entrée pour le texte d'espace réservé.", + "inputValidationInfoBackground": "Couleur d'arrière-plan de la validation d'entrée pour la gravité des informations.", + "inputValidationInfoBorder": "Couleur de bordure de la validation d'entrée pour la gravité des informations.", + "inputValidationWarningBackground": "Couleur d'arrière-plan de la validation d'entrée pour l'avertissement sur les informations.", + "inputValidationWarningBorder": "Couleur de bordure de la validation d'entrée pour la gravité de l'avertissement.", + "inputValidationErrorBackground": "Couleur d'arrière-plan de la validation d'entrée pour la gravité de l'erreur.", + "inputValidationErrorBorder": "Couleur de bordure de la validation d'entrée pour la gravité de l'erreur. ", "dropdownBackground": "Arrière-plan de la liste déroulante.", "dropdownForeground": "Premier plan de la liste déroulante.", "dropdownBorder": "Bordure de la liste déroulante.", + "listFocusBackground": "Couleur d'arrière-plan de la liste/l'arborescence pour l'élément ayant le focus quand la liste/l'arborescence est active. Une liste/aborescence active peut être sélectionnée au clavier, elle ne l'est pas quand elle est inactive.", + "listFocusForeground": "Couleur de premier plan de la liste/l'arborescence pour l'élément ayant le focus quand la liste/l'arborescence est active. Une liste/aborescence active peut être sélectionnée au clavier, elle ne l'est pas quand elle est inactive.", + "listActiveSelectionBackground": "Couleur d'arrière-plan de la liste/l'arborescence de l'élément sélectionné quand la liste/l'arborescence est active. Une liste/arborescence active peut être sélectionnée au clavier, elle ne l'est pas quand elle est inactive.", + "listActiveSelectionForeground": "Couleur de premier plan de la liste/l'arborescence pour l'élément sélectionné quand la liste/l'arborescence est active. Une liste/aborescence active peut être sélectionnée au clavier, elle ne l'est pas quand elle est inactive.", + "listInactiveSelectionBackground": "Couleur d'arrière-plan de la liste/l'arborescence pour l'élément sélectionné quand la liste/l'arborescence est inactive. Une liste/aborescence active peut être sélectionnée au clavier, elle ne l'est pas quand elle est inactive.", + "listInactiveSelectionForeground": "Couleur de premier plan de la liste/l'arborescence pour l'élément sélectionné quand la liste/l'arborescence est active. Une liste/aborescence active peut être sélectionnée au clavier, elle ne l'est pas quand elle est inactive.", + "listHoverBackground": "Arrière-plan de la liste/l'arborescence pendant le pointage sur des éléments avec la souris.", + "listHoverForeground": "Premier plan de la liste/l'arborescence pendant le pointage sur des éléments avec la souris.", + "listDropBackground": "Arrière-plan de l'opération de glisser-déplacer dans une liste/arborescence pendant le déplacement d'éléments avec la souris.", + "highlight": "Couleur de premier plan dans la liste/l'arborescence pour la surbrillance des correspondances pendant la recherche dans une liste/arborescence.", + "pickerGroupForeground": "Couleur du sélecteur rapide pour les étiquettes de regroupement.", + "pickerGroupBorder": "Couleur du sélecteur rapide pour les bordures de regroupement.", + "buttonForeground": "Couleur de premier plan du bouton.", + "buttonBackground": "Couleur d'arrière-plan du bouton.", + "buttonHoverBackground": "Couleur d'arrière-plan du bouton pendant le pointage.", + "badgeBackground": "Couleur de fond des badges. Les badges sont de courts libelés d'information, ex. le nombre de résultats de recherche.", + "badgeForeground": "Couleur des badges. Les badges sont de courts libelés d'information, ex. le nombre de résultats de recherche.", + "scrollbarShadow": "Ombre de la barre de défilement pour indiquer que la vue défile.", + "scrollbarSliderBackground": "Couleur d'arrière-plan du curseur.", + "scrollbarSliderHoverBackground": "Couleur d'arrière-plan du curseur pendant le pointage.", + "scrollbarSliderActiveBackground": "Couleur d'arrière-plan du curseur actif.", + "progressBarBackground": "Couleur de fond pour la barre de progression qui peut s'afficher lors d'opérations longues.", "editorBackground": "Couleur d'arrière-plan de l'éditeur.", "editorForeground": "Couleur de premier plan par défaut de l'éditeur.", - "editorSelection": "Couleur de la sélection de l'éditeur.", + "editorWidgetBackground": "Couleur d'arrière-plan des gadgets de l'éditeur tels que rechercher/remplacer.", + "editorWidgetBorder": "Couleur de bordure des widgets de l'éditeur. La couleur est utilisée uniquement si le widget choisit d'avoir une bordure et si la couleur n'est pas remplacée par un widget.", "editorInactiveSelection": "Couleur de la sélection dans un éditeur inactif.", "editorSelectionHighlight": "Couleur des régions dont le contenu est identique à la sélection.", "editorFindMatch": "Couleur du résultat de recherche actif.", "findMatchHighlight": "Couleur des autres résultats de recherche.", "findRangeHighlight": "Couleur de la plage limitant la recherche.", + "hoverHighlight": "Mettez en surbrillance ci-dessous le mot pour lequel un pointage s'affiche.", + "hoverBackground": "Couleur d'arrière-plan du pointage de l'éditeur.", + "hoverBorder": "Couleur de bordure du pointage de l'éditeur.", "activeLinkForeground": "Couleur des liens actifs.", - "linkForeground": "Couleur des liens." + "diffEditorInserted": "Couleur d'arrière-plan du texte inséré.", + "diffEditorRemoved": "Couleur d'arrière-plan du texte supprimé.", + "diffEditorInsertedOutline": "Couleur de contour du texte inséré.", + "diffEditorRemovedOutline": "Couleur de contour du texte supprimé.", + "mergeCurrentHeaderBackground": "Arrière-plan de l'en-tête actuel dans les conflits de fusion inline.", + "mergeCurrentContentBackground": "Arrière-plan du contenu actuel dans les conflits de fusion inline.", + "mergeIncomingHeaderBackground": "Arrière-plan de l'en-tête entrant dans les conflits de fusion inline.", + "mergeIncomingContentBackground": "Arrière-plan du contenu entrant dans les conflits de fusion inline.", + "mergeCommonHeaderBackground": "Arrière-plan de l'en-tête de l'ancêtre commun dans les conflits de fusion inline.", + "mergeCommonContentBackground": "Arrière-plan du contenu de l'ancêtre commun dans les conflits de fusion inline.", + "mergeBorder": "Couleur de bordure des en-têtes et du séparateur dans les conflits de fusion inline.", + "overviewRulerCurrentContentForeground": "Premier plan de la règle d'aperçu actuelle pour les conflits de fusion inline.", + "overviewRulerIncomingContentForeground": "Premier plan de la règle d'aperçu entrante pour les conflits de fusion inline.", + "overviewRulerCommonContentForeground": "Arrière-plan de la règle d'aperçu de l'ancêtre commun dans les conflits de fusion inline." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/fra/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json new file mode 100644 index 0000000000000..7e050bb0177bc --- /dev/null +++ b/i18n/fra/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "overwritingExtension": "Remplacement de l'extension {0} par {1}.", + "extensionUnderDevelopment": "Chargement de l'extension de développement sur {0}" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/fra/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json new file mode 100644 index 0000000000000..560eb4d7f2691 --- /dev/null +++ b/i18n/fra/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "Fermer", + "cancel": "Annuler", + "ok": "OK" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/api/node/extHostExplorerView.i18n.json b/i18n/fra/src/vs/workbench/api/node/extHostExplorerView.i18n.json new file mode 100644 index 0000000000000..ff14373fbdcb2 --- /dev/null +++ b/i18n/fra/src/vs/workbench/api/node/extHostExplorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "Aucun TreeExplorerNodeProvider ayant l'ID '{0}' n'est inscrit.", + "treeExplorer.failedToProvideRootNode": "Le TreeExplorerNodeProvider '{0}' n'a pas pu fournir le nœud racine." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/fra/src/vs/workbench/api/node/extHostTask.i18n.json new file mode 100644 index 0000000000000..c9b8882d43762 --- /dev/null +++ b/i18n/fra/src/vs/workbench/api/node/extHostTask.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "task.label": "{0} : {1}" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/api/node/extHostTreeView.i18n.json b/i18n/fra/src/vs/workbench/api/node/extHostTreeView.i18n.json new file mode 100644 index 0000000000000..ff14373fbdcb2 --- /dev/null +++ b/i18n/fra/src/vs/workbench/api/node/extHostTreeView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "Aucun TreeExplorerNodeProvider ayant l'ID '{0}' n'est inscrit.", + "treeExplorer.failedToProvideRootNode": "Le TreeExplorerNodeProvider '{0}' n'a pas pu fournir le nœud racine." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/fra/src/vs/workbench/api/node/extHostTreeViews.i18n.json new file mode 100644 index 0000000000000..2c25d01eeb19c --- /dev/null +++ b/i18n/fra/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeView.notRegistered": "Aucune arborescence avec l'ID '{0}' n'est inscrite.", + "treeItem.notFound": "L'élément d'arborescence avec l'ID '{0}' est introuvable.", + "treeView.duplicateElement": "L'élément '{0}' est déjà inscrit" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/browser/actions/configureLocale.i18n.json b/i18n/fra/src/vs/workbench/browser/actions/configureLocale.i18n.json index 97d34c7a9e910..a8e6e2e51470c 100644 --- a/i18n/fra/src/vs/workbench/browser/actions/configureLocale.i18n.json +++ b/i18n/fra/src/vs/workbench/browser/actions/configureLocale.i18n.json @@ -7,7 +7,7 @@ "configureLocale": "Configurer la langue", "displayLanguage": "Définit le langage affiché par VSCode.", "doc": "Consultez {0} pour connaître la liste des langues prises en charge.", - "restart": "Si la valeur change, VSCode doit redémarrer.", + "restart": "Le changement de la valeur nécessite le redémarrage de VS Code.", "fail.createSettings": "Impossible de créer '{0}' ({1}).", "JsonSchema.locale": "Langue d'interface utilisateur (IU) à utiliser." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json b/i18n/fra/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json index 7b7e61c23f48c..a04b897abfe8b 100644 --- a/i18n/fra/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json +++ b/i18n/fra/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "hideActivitBar": "Masquer la barre d'activités", - "activityBarAriaLabel": "Sélecteur d'affichage actif" + "activityBarAriaLabel": "Sélecteur d'affichage actif", + "globalActions": "Actions globales" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/fra/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index 461dbd7c73bbe..044f984b1ac38 100644 --- a/i18n/fra/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/fra/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -44,6 +44,8 @@ "openPreviousRecentlyUsedEditorInGroup": "Ouvrir l'éditeur précédent du groupe", "openNextRecentlyUsedEditorInGroup": "Ouvrir l'éditeur suivant du groupe", "navigateEditorHistoryByInput": "Ouvrir l'éditeur précédent dans l'historique", + "openNextRecentlyUsedEditor": "Ouvrir l'éditeur suivant", + "openPreviousRecentlyUsedEditor": "Ouvrir l'éditeur précédent", "clearEditorHistory": "Effacer l'historique de l'éditeur", "focusLastEditorInStack": "Ouvrir le dernier éditeur du groupe", "moveEditorLeft": "Déplacer l'éditeur vers la gauche", diff --git a/i18n/fra/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/fra/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index a96ef282603f6..625e22d6bcd49 100644 --- a/i18n/fra/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/fra/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -10,7 +10,7 @@ "multiSelection": "{0} sélections", "endOfLineLineFeed": "LF", "endOfLineCarriageReturnLineFeed": "CRLF", - "tabFocusModeEnabled": "La touche Tab déplace le focus", + "screenReaderDetectedExtra": "Si vous n'utilisez pas de lecteur d'écran, définissez le paramètre 'editor.accessibilitySupport' sur \"désactivé\".", "disableTabMode": "Désactiver le mode d'accessibilité", "gotoLine": "Atteindre la ligne", "indentation": "Retrait", diff --git a/i18n/fra/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json b/i18n/fra/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json new file mode 100644 index 0000000000000..4ae604a5c68fd --- /dev/null +++ b/i18n/fra/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpen": "Atteindre le fichier...", + "quickNavigateNext": "Naviguer vers l'élément suivant dans Quick Open", + "quickNavigatePrevious": "Naviguer vers l'élément précédent dans Quick Open", + "quickSelectNext": "Sélectionner l'élément suivant dans Quick Open", + "quickSelectPrevious": "Sélectionner l'élément précédent dans Quick Open" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/browser/quickopen.i18n.json b/i18n/fra/src/vs/workbench/browser/quickopen.i18n.json index 553ab99539ca4..6c5413c9c047c 100644 --- a/i18n/fra/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/fra/src/vs/workbench/browser/quickopen.i18n.json @@ -6,6 +6,5 @@ { "noResultsMatching": "Aucun résultat correspondant", "noResultsFound2": "Résultats introuvables", - "entryAriaLabel": "{0}, commande", - "noCommands": "Aucune commande correspondante" + "entryAriaLabel": "{0}, commande" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/browser/viewlet.i18n.json b/i18n/fra/src/vs/workbench/browser/viewlet.i18n.json index a2b2c00414d0b..0c0be9aff9bee 100644 --- a/i18n/fra/src/vs/workbench/browser/viewlet.i18n.json +++ b/i18n/fra/src/vs/workbench/browser/viewlet.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "collapse": "Réduire tout", - "viewToolbarAriaLabel": "{0} actions" + "collapse": "Réduire tout" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/common/theme.i18n.json b/i18n/fra/src/vs/workbench/common/theme.i18n.json index 079c95390e018..33eccb30b80b3 100644 --- a/i18n/fra/src/vs/workbench/common/theme.i18n.json +++ b/i18n/fra/src/vs/workbench/common/theme.i18n.json @@ -4,39 +4,49 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "tabsContainerBackground": "Couleur d'arrière-plan du conteneur d'onglets. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", - "activeTabBackground": "Couleur d'arrière-plan de l'onglet actif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", - "inactiveTabBackground": "Couleur d'arrière-plan de l'onglet inactif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", - "activeTabActiveGroupForeground": "Couleur de premier plan de l'onglet actif dans un groupe actif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", - "activeTabInactiveGroupForeground": "Couleur de premier plan de l'onglet actif dans un groupe inactif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", - "inactiveTabActiveGroupForeground": "Couleur de premier plan de l'onglet inactif dans un groupe actif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", - "inactiveTabInactiveGroupForeground": "Couleur de premier plan de l'onglet inactif dans un groupe inactif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", + "tabActiveBackground": "Couleur d'arrière-plan de l'onglet actif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", + "tabInactiveBackground": "Couleur d'arrière-plan de l'onglet inactif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", "tabBorder": "Bordure séparant les onglets les uns des autres. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", - "editorHeaderBackground": "Couleur d'arrière-plan de l'en-tête du titre de l'éditeur quand aucun onglet n'est activé.", + "tabActiveForeground": "Couleur de premier plan de l'onglet actif dans un groupe actif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", + "tabInactiveForeground": "Couleur de premier plan de l'onglet inactif dans un groupe actif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", + "tabUnfocusedActiveForeground": "Couleur de premier plan de l'onglet actif dans un groupe inactif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", + "tabUnfocusedInactiveForeground": "Couleur de premier plan de l'onglet inactif dans un groupe inactif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", + "editorGroupBackground": "Couleur d'arrière-plan d'un groupe d'éditeurs. Les groupes d'éditeurs sont les conteneurs des éditeurs. La couleur d'arrière-plan s'affiche pendant le glissement de groupes d'éditeurs.", + "tabsContainerBackground": "Couleur d'arrière-plan de l'en-tête du titre du groupe d'éditeurs quand les onglets sont activés. Les groupes d'éditeurs sont les conteneurs des éditeurs.", + "tabsContainerBorder": "Couleur de bordure de l'en-tête du titre du groupe d'éditeurs quand les onglets sont activés. Les groupes d'éditeurs sont les conteneurs des éditeurs.", + "editorGroupHeaderBackground": "Couleur d'arrière-plan de l'en-tête du titre du groupe d'éditeurs quand les onglets sont désactivés. Les groupes d'éditeurs sont les conteneurs des éditeurs.", "editorGroupBorder": "Couleur séparant plusieurs groupes d'éditeurs les uns des autres. Les groupes d'éditeurs sont les conteneurs des éditeurs.", - "editorGroupBackground": "Couleur d'arrière-plan d'un groupe d'éditeurs. Les groupes d'éditeurs sont les conteneurs des éditeurs.", - "editorDragAndDropBackground": "Couleur d'arrière-plan durant le déplacement des éditeurs.", - "editorSideBySideBorder": "Couleur de bordure séparant les détails par rapport au côté maître pour les éditeurs côte à côte.", + "editorDragAndDropBackground": "Couleur d'arrière-plan lors du déplacement des éditeurs par glissement. La couleur doit avoir une transparence pour que le contenu de l'éditeur soit visible à travers.", "panelBackground": "Couleur d'arrière-plan du panneau. Les panneaux s'affichent sous la zone d'éditeurs et contiennent des affichages tels que la sortie et le terminal intégré.", - "panelTopBorder": "Couleur de bordure de panneau dans la partie supérieure de séparation de l'éditeur. Les panneaux s'affichent sous la zone d'éditeurs et contiennent des affichages tels que la sortie et le terminal intégré.", + "panelBorder": "Couleur de bordure de panneau dans la partie supérieure de séparation de l'éditeur. Les panneaux s'affichent sous la zone d'éditeurs et contiennent des affichages tels que la sortie et le terminal intégré.", "panelActiveTitleForeground": "Couleur du titre du panneau actif. Les panneaux se situent sous la zone de l'éditeur et contiennent des affichages comme la sortie et le terminal intégré.", "panelInactiveTitleForeground": "Couleur du titre du panneau inactif. Les panneaux se situent sous la zone de l'éditeur et contiennent des affichages comme la sortie et le terminal intégré.", "panelActiveTitleBorder": "Couleur de la bordure du titre du panneau actif. Les panneaux se situent sous la zone de l'éditeur et contiennent des affichages comme la sortie et le terminal intégré.", "statusBarForeground": "Couleur de premier plan de la barre d'état. La barre d'état est affichée en bas de la fenêtre.", "statusBarBackground": "Couleur d'arrière-plan de la barre d'état standard. La barre d'état est affichée en bas de la fenêtre.", + "statusBarBorder": "Couleur de bordure de la barre d'état faisant la séparation avec la barre latérale et l'éditeur. La barre d'état est affichée en bas de la fenêtre.", "statusBarNoFolderBackground": "Couleur d'arrière-plan de la barre d'état quand aucun dossier n'est ouvert. La barre d'état est affichée en bas de la fenêtre.", + "statusBarNoFolderForeground": "Couleur de premier plan de la barre d'état quand aucun dossier n'est ouvert. La barre d'état est affichée en bas de la fenêtre.", "statusBarItemActiveBackground": "Couleur d'arrière-plan de l'élément de la barre d'état durant un clic. La barre d'état est affichée en bas de la fenêtre.", "statusBarItemHoverBackground": "Couleur d'arrière-plan de l'élément de la barre d'état durant un pointage. La barre d'état est affichée en bas de la fenêtre.", - "statusBarInfoItemBackground": "Couleur d'arrière-plan de l'élément d'information de la barre d'état. La barre d'état est affichée en bas de la fenêtre.", - "statusBarInfoItemHoverBackground": "Couleur d'arrière-plan de l'élément d'information de la barre d'état durant un pointage. La barre d'état est affichée en bas de la fenêtre.", + "statusBarProminentItemBackground": "Couleur d'arrière-plan des éléments importants de la barre d'état. Les éléments importants se différencient des autres entrées de la barre d'état pour indiquer l'importance. La barre d'état est affichée en bas de la fenêtre.", + "statusBarProminentItemHoverBackground": "Couleur d'arrière-plan des éléments importants de la barre d'état pendant le pointage. Les éléments importants se différencient des autres entrées de la barre d'état pour indiquer l'importance. La barre d'état est affichée en bas de la fenêtre.", "activityBarBackground": "Couleur d'arrière-plan de la barre d'activités. La barre d'activités s'affiche complètement à gauche ou à droite, et permet de naviguer entre les affichages de la barre latérale.", - "activityBarDragAndDropBackground": "Couleur des commentaires sur une opération de glisser-déplacer pour les éléments de la barre d'activités. La barre d'activités, située à l'extrême gauche ou droite, permet de basculer entre les affichages de la barre latérale.", - "activityBadgeBackground": "Couleur d'arrière-plan du badge de notification d'activité. La barre d'activités, située à l'extrême gauche ou droite, permet de basculer entre les affichages de la barre latérale.", - "activityBadgeForeground": "Couleur de premier plan du badge de notification d'activité. La barre d'activités, située à l'extrême gauche ou droite, permet de basculer entre les affichages de la barre latérale.", + "activityBarForeground": "Couleur de premier plan de la barre d'activités (par ex., utilisée pour les icônes). La barre d'activités s'affiche complètement à gauche ou à droite, et permet de parcourir les vues de la barre latérale.", + "activityBarBorder": "Couleur de bordure de la barre d'activités faisant la séparation avec la barre latérale. La barre d'activités, située à l'extrême droite ou gauche, permet de parcourir les vues de la barre latérale.", + "activityBarDragAndDropBackground": "Couleur des commentaires sur une opération de glisser-déplacer pour les éléments de la barre d'activités. La couleur doit avoir une transparence pour que les entrées de la barre d'activités soient visibles à travers. La barre d'activités, située à l'extrême droite ou gauche, permet de parcourir les vues de la barre latérale.", + "activityBarBadgeBackground": "Couleur d'arrière-plan du badge de notification d'activité. La barre d'activités, située à l'extrême gauche ou droite, permet de basculer entre les affichages de la barre latérale.", + "activityBarBadgeForeground": "Couleur de premier plan du badge de notification d'activité. La barre d'activités, située à l'extrême gauche ou droite, permet de basculer entre les affichages de la barre latérale.", "sideBarBackground": "Couleur d'arrière-plan de la barre latérale. La barre latérale est le conteneur des affichages tels que ceux de l'exploration et la recherche.", + "sideBarForeground": "Couleur de premier plan de la barre latérale. La barre latérale est le conteneur des vues comme celles de l'explorateur et de la recherche.", + "sideBarBorder": "Couleur de bordure de la barre latérale faisant la séparation avec l'éditeur. La barre latérale est le conteneur des vues comme celles de l'explorateur et de la recherche.", "sideBarTitleForeground": "Couleur de premier plan du titre de la barre latérale. La barre latérale est le conteneur des affichages tels que ceux de l'exploration et la recherche.", + "sideBarSectionHeaderBackground": "Couleur d'arrière-plan de l'en-tête de section de la barre latérale. La barre latérale est le conteneur des vues comme celles de l'explorateur et la recherche.", + "sideBarSectionHeaderForeground": "Couleur de premier plan de l'en-tête de section de la barre latérale. La barre latérale est le conteneur des vues comme celles de l'explorateur et de la recherche.", "titleBarActiveForeground": "Premier plan de la barre de titre quand la fenêtre est active. Notez que cette couleur est uniquement prise en charge sur macOS.", "titleBarInactiveForeground": "Premier plan de la barre de titre quand la fenêtre est inactive. Notez que cette couleur est uniquement prise en charge sur macOS.", "titleBarActiveBackground": "Arrière-plan de la barre de titre quand la fenêtre est active. Notez que cette couleur est uniquement prise en charge sur macOS.", - "titleBarInactiveBackground": "Arrière-plan de la barre de titre quand la fenêtre est inactive. Notez que cette couleur est uniquement prise en charge sur macOS." + "titleBarInactiveBackground": "Arrière-plan de la barre de titre quand la fenêtre est inactive. Notez que cette couleur est uniquement prise en charge sur macOS.", + "notificationsForeground": "Couleur de premier plan des notifications. Les notifications défilent à partir du haut de la fenêtre.", + "notificationsBackground": "Couleur d'arrière-plan des notifications. Les notifications défilent à paritr du haut de la fenêtre." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/fra/src/vs/workbench/electron-browser/actions.i18n.json index 89d053f8d1df4..96da96abc3d9c 100644 --- a/i18n/fra/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/fra/src/vs/workbench/electron-browser/actions.i18n.json @@ -6,9 +6,6 @@ { "closeActiveEditor": "Fermer l'éditeur", "closeWindow": "Fermer la fenêtre", - "switchWindow": "Changer de fenêtre", - "switchWindowPlaceHolder": "Sélectionner une fenêtre", - "current": "Fenêtre active", "closeFolder": "Fermer un dossier", "noFolderOpened": "Il n'existe actuellement aucun dossier ouvert à fermer dans cette instance.", "newWindow": "Nouvelle fenêtre", @@ -20,7 +17,7 @@ "zoomReset": "Réinitialiser le zoom", "appPerf": "Performance de démarrage", "reloadWindow": "Recharger la fenêtre", - "openRecent": "Ouvrir les éléments récents", + "current": "Fenêtre active", "folders": "dossiers", "files": "fichiers", "openRecentPlaceHolderMac": "Sélectionner un chemin (maintenir la touche Cmd enfoncée pour l'ouvrir dans une nouvelle fenêtre)", @@ -32,10 +29,6 @@ "openDocumentationUrl": "Documentation", "openIntroductoryVideosUrl": "Vidéos d'introduction", "toggleSharedProcess": "Activer/désactiver le processus partagé", - "navigateLeft": "Déplacer vers l'affichage à gauche", - "navigateRight": "Déplacer vers l'affichage à droite", - "navigateUp": "Déplacer vers l'affichage au-dessus", - "navigateDown": "Déplacer vers l'affichage en dessous", "increaseViewSize": "Augmenter la taille de l'affichage actuel", "decreaseViewSize": "Diminuer la taille de l'affichage actuel" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/fra/src/vs/workbench/electron-browser/main.contribution.i18n.json index 072882d123a12..889bccddeb955 100644 --- a/i18n/fra/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,6 +7,7 @@ "view": "Affichage", "help": "Aide", "file": "Fichier", + "developer": "Développeur", "showEditorTabs": "Contrôle si les éditeurs ouverts doivent s'afficher ou non sous des onglets.", "editorTabCloseButton": "Contrôle la position des boutons de fermeture des onglets de l'éditeur, ou les désactive quand le paramètre a la valeur 'off'.", "showIcons": "Contrôle si les éditeurs ouverts doivent s'afficher ou non avec une icône. Cela implique notamment l'activation d'un thème d'icône.", @@ -20,6 +21,7 @@ "statusBarVisibility": "Contrôle la visibilité de la barre d'état au bas du banc d'essai.", "activityBarVisibility": "Contrôle la visibilité de la barre d'activités dans le banc d'essai.", "closeOnFileDelete": "Contrôle si les éditeurs qui affichent un fichier doivent se fermer automatiquement quand ce fichier est supprimé ou renommé par un autre processus. Si vous désactivez cette option, l'éditeur reste ouvert dans un état indiquant une intégrité compromise. Notez que la suppression de fichiers à partir de l'application entraîne toujours la fermeture de l'éditeur, et que les fichiers à l'intégrité compromise ne sont jamais fermés pour permettre la conservation de vos données.", + "swipeToNavigate": "Parcourez les fichiers ouverts en faisant glisser trois doigts horizontalement. ", "workbenchConfigurationTitle": "Banc d'essai", "window.openFilesInNewWindow.on": "Les fichiers s'ouvrent dans une nouvelle fenêtre", "window.openFilesInNewWindow.off": "Les fichiers s'ouvrent dans la fenêtre du dossier conteneur ouvert ou dans la dernière fenêtre active", @@ -29,29 +31,29 @@ "window.openFoldersInNewWindow.off": "Les dossiers remplacent la dernière fenêtre active", "window.openFoldersInNewWindow.default": "Les dossiers s'ouvrent dans une nouvelle fenêtre, sauf si un dossier est sélectionné depuis l'application (par exemple, via le menu Fichier)", "openFoldersInNewWindow": "Contrôle si les dossiers doivent s'ouvrir dans une nouvelle fenêtre ou remplacer la dernière fenêtre active.\n- default : les dossiers s'ouvrent dans une nouvelle fenêtre, sauf si un dossier est sélectionné depuis l'application (par exemple, via le menu Fichier)\n- on : les dossiers s'ouvrent dans une nouvelle fenêtre\n- off : les dossiers remplacent la dernière fenêtre active\nNotez que dans certains cas, ce paramètre est ignoré (par exemple, quand vous utilisez l'option de ligne de commande -new-window ou -reuse-window).", - "window.reopenFolders.none": "Permet de ne jamais rouvrir un dossier.", - "window.reopenFolders.one": "Permet de rouvrir le dernier dossier actif.", - "window.reopenFolders.all": "Permet de rouvrir tous les dossiers de la dernière session.", - "reopenFolders": "Contrôle la façon dont les dossiers sont rouverts après un redémarrage. Sélectionnez 'none' pour ne jamais rouvrir un dossier, 'one' pour rouvrir le dernier dossier utilisé, ou 'all' pour rouvrir tous les dossiers de votre dernière session.", "restoreFullscreen": "Contrôle si une fenêtre doit être restaurée en mode plein écran si elle a été fermée dans ce mode.", "zoomLevel": "Modifiez le niveau de zoom de la fenêtre. La taille d'origine est 0. Chaque incrément supérieur (exemple : 1) ou inférieur (exemple : -1) représente un zoom 20 % plus gros ou plus petit. Vous pouvez également entrer des décimales pour changer le niveau de zoom avec une granularité plus fine.", - "title": "Contrôle le titre de la fenêtre en fonction de l'éditeur actif. Les variables sont remplacées en fonction du contexte :\n${activeEditorShort} : exemple : myFile.txt\n${activeEditorMedium} : exemple : myFolder/myFile.txt\n${activeEditorLong} : exemple : /Users/Development/myProject/myFolder/myFile.txt\n${rootName} : exemple : myProject\n${rootPath} : exemple : /Users/Development/myProject\n${appName} : exemple : VS Code\n${dirty} : indicateur d'intégrité si l'intégrité de l'éditeur actif est compromise\n${separator} : séparateur conditionnel (\" - \") qui s'affiche uniquement quand il est entouré de variables avec des valeurs", "window.newWindowDimensions.default": "Permet d'ouvrir les nouvelles fenêtres au centre de l'écran.", "window.newWindowDimensions.inherit": "Permet d'ouvrir les nouvelles fenêtres avec la même dimension que la dernière fenêtre active.", "window.newWindowDimensions.maximized": "Permet d'ouvrir les nouvelles fenêtres de manière agrandie.", "window.newWindowDimensions.fullscreen": "Permet d'ouvrir les nouvelles fenêtres en mode plein écran.", - "newWindowDimensions": "Contrôle les dimensions d'ouverture d'une nouvelle fenêtre. Par défaut, une nouvelle fenêtre s'ouvre au centre de l'écran avec des dimensions réduites. Quand le paramètre a la valeur 'inherit', la fenêtre a les mêmes dimensions que la dernière fenêtre active. Quand le paramètre a la valeur 'maximized', la fenêtre s'ouvre en mode plein écran et dans sa taille maximale, si elle est configurée avec la valeur 'fullscreen'.", + "newWindowDimensions": "Contrôle les dimensions d'ouverture d'une nouvelle fenêtre quand au moins une fenêtre est déjà ouverte. Par défaut, une nouvelle fenêtre s'ouvre au centre de l'écran avec des dimensions réduites. Quand la valeur est 'inherit', la fenêtre a les mêmes dimensions que la dernière fenêtre active. Quand la valeur est 'maximized', la fenêtre s'ouvre dans sa taille maximale et quand la valeur est 'fullscreen', elle s'ouvre en mode plein écran. Notez que ce paramètre n'a aucun impact sur la première fenêtre ouverte, laquelle est toujours restaurée à la taille et l'emplacement définis au moment de sa fermeture.", "window.menuBarVisibility.default": "Le menu n'est masqué qu'en mode plein écran.", "window.menuBarVisibility.visible": "Le menu est toujours visible même en mode plein écran.", "window.menuBarVisibility.toggle": "Le menu est masqué mais il peut être affiché via la touche Alt.", "window.menuBarVisibility.hidden": "Le menu est toujours masqué.", "menuBarVisibility": "Contrôle la visibilité de la barre de menus. Le paramètre 'toggle' signifie que la barre de menus est masquée, et qu'une seule pression sur la touche Alt permet de l'afficher. Par défaut, la barre de menus est visible, sauf si la fenêtre est en mode plein écran.", + "enableMenuBarMnemonics": "S'ils sont activés, les menus principaux peuvent être ouverts via des raccourcis avec la touche Alt. La désactivation des mnémoniques permet plutôt de lier ces raccourcis avec la touche Alt aux commandes de l'éditeur.", "autoDetectHighContrast": "Si cette option est activée, le thème à contraste élevé est automatiquement choisi quand Windows utilise un thème à contraste élevé. À l'inverse, le thème sombre est automatiquement choisi quand Windows n'utilise plus le thème à contraste élevé.", "titleBarStyle": "Ajustez l'apparence de la barre de titre de la fenêtre. Vous devez effectuer un redémarrage complet pour que les changements soient appliqués.", + "window.nativeTabs": "Active les onglets macOS Sierra. Notez que vous devez redémarrer l'ordinateur pour appliquer les modifications et que les onglets natifs désactivent tout style de barre de titre personnalisé configuré, le cas échéant.", "windowConfigurationTitle": "Fenêtre", "zenModeConfigurationTitle": "Mode Zen", "zenMode.fullScreen": "Contrôle si l'activation de Zen Mode met également le banc d'essai en mode plein écran.", "zenMode.hideTabs": "Contrôle si l'activation du mode Zen masque également les onglets du banc d'essai.", "zenMode.hideStatusBar": "Contrôle si l'activation du mode Zen masque également la barre d'état au bas du banc d'essai.", - "zenMode.restore": "Contrôle si une fenêtre doit être restaurée en mode zen, si elle a été fermée en mode zen." + "zenMode.hideActivityBar": "Contrôle si l'activation du mode Zen masque également la barre d'activités à gauche du banc d'essai.", + "zenMode.restore": "Contrôle si une fenêtre doit être restaurée en mode zen, si elle a été fermée en mode zen.", + "workspaceConfigurationTitle": "Espace de travail", + "files.exclude.boolean": "Modèle Glob auquel les chemins de fichiers doivent correspondre. Affectez la valeur true ou false pour activer ou désactiver le modèle." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/electron-browser/shell.i18n.json b/i18n/fra/src/vs/workbench/electron-browser/shell.i18n.json index 6a2b2ffff3f03..a24bedcde3d85 100644 --- a/i18n/fra/src/vs/workbench/electron-browser/shell.i18n.json +++ b/i18n/fra/src/vs/workbench/electron-browser/shell.i18n.json @@ -4,9 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "runningAsRoot": "Il est déconseillé d'exécuter du code en tant qu'utilisateur 'root'.", - "prof.message": "Création réussie des profils.", - "prof.detail": "Créez un problème et joignez manuellement les fichiers suivants :\n{0}", - "prof.restartAndFileIssue": "Créer le problème et redémarrer", - "prof.restart": "Redémarrer" + "runningAsRoot": "Il est déconseillé d'exécuter du code en tant qu'utilisateur 'root'." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/electron-browser/window.i18n.json b/i18n/fra/src/vs/workbench/electron-browser/window.i18n.json index 133473eb18087..4bb9062991df2 100644 --- a/i18n/fra/src/vs/workbench/electron-browser/window.i18n.json +++ b/i18n/fra/src/vs/workbench/electron-browser/window.i18n.json @@ -11,7 +11,5 @@ "paste": "Coller", "selectAll": "Tout Sélectionner", "confirmOpen": "Voulez-vous vraiment ouvrir {0} dossiers ?", - "confirmOpenButton": "&&Ouvrir...", - "developer": "Développeur", - "file": "Fichier" + "confirmOpenButton": "&&Ouvrir..." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/fra/src/vs/workbench/electron-browser/workbench.i18n.json new file mode 100644 index 0000000000000..771fa003a693f --- /dev/null +++ b/i18n/fra/src/vs/workbench/electron-browser/workbench.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "developer": "Développeur", + "file": "Fichier" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json b/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json new file mode 100644 index 0000000000000..a99450230b2d2 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emergencyConfOn": "Définition du paramètre 'editor.accessibilitySupport' sur 'activé'.", + "openingDocs": "Ouverture de la page de documentation sur l'accessibilité dans VS Code.", + "introMsg": "Nous vous remercions de tester les options d'accessibilité de VS Code.", + "status": "État :", + "changeConfigToOnMac": "Pour configurer l'éditeur de sorte qu'il soit optimisé en permanence pour une utilisation avec un lecteur d'écran, appuyez sur Commande+E.", + "changeConfigToOnWinLinux": "Pour configurer l'éditeur de sorte qu'il soit optimisé en permanence pour une utilisation avec un lecteur d'écran, appuyez sur Ctrl+E.", + "auto_unknown": "L'éditeur est configuré pour utiliser les API de la plateforme afin de détecter si un lecteur d'écran est attaché, mais le runtime actuel ne prend pas en charge cette configuration.", + "auto_on": "L'éditeur a automatiquement détecté qu'un lecteur d'écran est attaché.", + "auto_off": "L'éditeur est configuré pour détecter automatiquement si un lecteur d'écran est attaché, ce qui n'est pas le cas pour le moment.", + "configuredOn": "L'éditeur est configuré de sorte qu'il soit optimisé en permanence pour une utilisation avec un lecteur d'écran. Vous pouvez changer ce comportement en modifiant le paramètre 'editor.accessibilitySupport'.", + "configuredOff": "L'éditeur est configuré de sorte à ne jamais être optimisé pour une utilisation avec un lecteur d'écran.", + "tabFocusModeOnMsg": "Appuyez sur Tab dans l'éditeur pour déplacer le focus vers le prochain élément pouvant être désigné comme élément actif. Activez ou désactivez ce comportement en appuyant sur {0}.", + "tabFocusModeOnMsgNoKb": "Appuyez sur Tab dans l'éditeur pour déplacer le focus vers le prochain élément pouvant être désigné comme élément actif. La commande {0} ne peut pas être déclenchée par une combinaison de touches.", + "tabFocusModeOffMsg": "Appuyez sur Tab dans l'éditeur pour insérer le caractère de tabulation. Activez ou désactivez ce comportement en appuyant sur {0}.", + "tabFocusModeOffMsgNoKb": "Appuyez sur Tab dans l'éditeur pour insérer le caractère de tabulation. La commande {0} ne peut pas être déclenchée par une combinaison de touches.", + "openDocMac": "Appuyez sur Commande+H pour ouvrir une fenêtre de navigateur contenant plus d'informations sur l'accessibilité dans VS Code.", + "openDocWinLinux": "Appuyez sur Ctrl+H pour ouvrir une fenêtre de navigateur contenant plus d'informations sur l'accessibilité dans VS Code.", + "outroMsg": "Vous pouvez masquer cette info-bulle et revenir à l'éditeur en appuyant sur Échap ou Maj+Échap.", + "ShowAccessibilityHelpAction": "Afficher l'aide sur l'accessibilité" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json index c5e4314489b8e..e677c5f357140 100644 --- a/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "workbench.action.inspectKeyMap": "Developer: Inspect Key Mapppings" + "workbench.action.inspectKeyMap": "Développeur : Inspecter les mappages de touches" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json b/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..a204ab1b8658d --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inspectTMScopes": "Développeur : inspecter les portées TextMate", + "inspectTMScopesWidget.loading": "Chargement..." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json b/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json new file mode 100644 index 0000000000000..96fe1751ef891 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parseErrors": "Erreurs durant l'analyse de {0} : {1}", + "schema.openBracket": "Séquence de chaînes ou de caractères de crochets ouvrants.", + "schema.closeBracket": "Séquence de chaînes ou de caractères de crochets fermants.", + "schema.comments": "Définit les symboles de commentaire", + "schema.blockComments": "Définit le marquage des commentaires de bloc.", + "schema.blockComment.begin": "Séquence de caractères au début d'un commentaire de bloc.", + "schema.blockComment.end": "Séquence de caractères à la fin d'un commentaire de bloc.", + "schema.lineComment": "Séquence de caractères au début d'un commentaire de ligne.", + "schema.brackets": "Définit les symboles de type crochet qui augmentent ou diminuent le retrait.", + "schema.autoClosingPairs": "Définit les paires de crochets. Quand vous entrez un crochet ouvrant, le crochet fermant est inséré automatiquement.", + "schema.autoClosingPairs.notIn": "Définit une liste d'étendues où les paires automatiques sont désactivées.", + "schema.surroundingPairs": "Définit les paires de crochets qui peuvent être utilisées pour entourer la chaîne sélectionnée.", + "schema.wordPattern": "La définition du mot dans le langage", + "schema.wordPattern.pattern": "L'expression régulière utilisée pour la recherche", + "schema.wordPattern.flags": "Les options d'expression régulière utilisées pour la recherche", + "schema.wordPattern.flags.errorMessage": "Doit valider l'expression régulière `/^([gimuy]+)$/`.", + "schema.indentationRules.increaseIndentPattern.errorMessage": "Doit valider l'expression régulière `/^([gimuy]+)$/`.", + "schema.indentationRules.decreaseIndentPattern.errorMessage": "Doit valider l'expression régulière `/^([gimuy]+)$/`.", + "schema.indentationRules.indentNextLinePattern.errorMessage": "Doit valider l'expression régulière `/^([gimuy]+)$/`.", + "schema.indentationRules.unIndentedLinePattern.errorMessage": "Doit valider l'expression régulière `/^([gimuy]+)$/`." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json b/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..a204ab1b8658d --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inspectTMScopes": "Développeur : inspecter les portées TextMate", + "inspectTMScopesWidget.loading": "Chargement..." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json b/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json new file mode 100644 index 0000000000000..a18dfa416d981 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "Changer le modificateur multicurseur" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index e52f1c8e8ea34..fd1a330f1c0af 100644 --- a/i18n/fra/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -6,6 +6,7 @@ { "openLaunchJson": "Ouvrir {0}", "launchJsonNeedsConfigurtion": "Configurer ou corriger 'launch.json'", + "noFolderDebugConfig": "Ouvrez d'abord un dossier pour effectuer une configuration de débogage avancée.", "startDebug": "Démarrer le débogage", "startWithoutDebugging": "Exécuter sans débogage", "selectAndStartDebugging": "Sélectionner et démarrer le débogage", @@ -34,6 +35,7 @@ "editConditionalBreakpoint": "Modifier un point d'arrêt...", "setValue": "Définir la valeur", "addWatchExpression": "Ajouter une expression", + "editWatchExpression": "Modifier l'expression", "addToWatchExpressions": "Ajouter à la fenêtre Espion", "removeWatchExpression": "Supprimer une expression", "removeAllWatchExpressions": "Supprimer toutes les expressions", diff --git a/i18n/fra/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json new file mode 100644 index 0000000000000..2cfe628ea3985 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugToolBarBackground": "Couleur d'arrière-plan de la barre d'outils de débogage." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json new file mode 100644 index 0000000000000..7b029bfc1e7dd --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileLinkMac": "Cliquez pour suivre (Commande + clic permet d'ouvrir sur le côté)", + "fileLink": "Cliquez pour suivre (Ctrl + clic permet d'ouvrir sur le côté)" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/common/debug.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/common/debug.i18n.json new file mode 100644 index 0000000000000..23ae9b5eef67e --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/debug/common/debug.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "internalConsoleOptions": "Contrôle le comportement de la console de débogage interne." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/common/debugModel.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/common/debugModel.i18n.json index f7685a761f1b5..6211ec4dc53f6 100644 --- a/i18n/fra/src/vs/workbench/parts/debug/common/debugModel.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/debug/common/debugModel.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "unknownSource": "Source inconnue", "notAvailable": "non disponible", - "startDebugFirst": "Démarrez une session de débogage pour évaluation", - "unknownStack": "Emplacement de pile inconnu" + "startDebugFirst": "Démarrez une session de débogage pour évaluation" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/common/debugSource.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/common/debugSource.i18n.json new file mode 100644 index 0000000000000..5573a24d50eae --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/debug/common/debugSource.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownSource": "Source inconnue" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json index 65f0c5f78ba94..f3fe279805361 100644 --- a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -15,5 +15,6 @@ "allowBreakpointsEverywhere": "Permet de définir un point d'arrêt dans un fichier", "openExplorerOnEnd": "Ouvrir automatiquement le mode explorateur à la fin d'une session de débogage", "inlineValues": "Afficher les valeurs des variables inline dans l'éditeur pendant le débogage", - "hideActionBar": "Contrôle si la barre d'action de débogage flottante doit être masquée" + "hideActionBar": "Contrôle si la barre d'action de débogage flottante doit être masquée", + "launch": "Configuration du lancement du débogage global. Doit être utilisée comme alternative à 'launch.json' qui est partagé entre les espaces de travail" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json new file mode 100644 index 0000000000000..9ea33c457e4d9 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noFolderDebugConfig": "Ouvrez d'abord un dossier pour effectuer une configuration de débogage avancée." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index 377b069eb131a..afd0c7bd38686 100644 --- a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -5,8 +5,8 @@ // Do not edit this file. It is machine generated. { "snapshotObj": "Seules les valeurs primitives sont affichées pour cet objet.", - "debuggingStarted": "Débogage démarré.", "debuggingPaused": "Débogage en pause. Raison : {0}, {1} {2}", + "debuggingStarted": "Débogage démarré.", "debuggingStopped": "Débogage arrêté.", "breakpointAdded": "Point d'arrêt ajouté, ligne {0}, fichier {1}", "breakpointRemoved": "Point d'arrêt supprimé, ligne {0}, fichier {1}", diff --git a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json index 213e8a8ab69b9..e963a7127e706 100644 --- a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json @@ -6,5 +6,6 @@ { "copyValue": "Copier la valeur", "copy": "Copier", + "copyAll": "Copier tout", "copyStackTrace": "Copier la pile des appels" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json index 837c20b08ffaa..9fa5e84fe4ae3 100644 --- a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json @@ -5,8 +5,6 @@ // Do not edit this file. It is machine generated. { "stateCapture": "L'état de l'objet est capturé à partir de la première évaluation", - "fileLinkMac": "Cliquez pour suivre (Commande + clic permet d'ouvrir sur le côté)", - "fileLink": "Cliquez pour suivre (Ctrl + clic permet d'ouvrir sur le côté)", "replVariableAriaLabel": "La variable {0} a la valeur {1}, boucle REPL (Read Eval Print Loop), débogage", "replExpressionAriaLabel": "L'expression {0} a la valeur {1}, boucle REPL (Read Eval Print Loop), débogage", "replValueOutputAriaLabel": "{0}, boucle REPL (Read Eval Print Loop), débogage", diff --git a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json index ea381e994a065..b4fa3eab63698 100644 --- a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "statusBarDebuggingBackground": "Couleur d'arrière-plan de la barre d'état quand un programme est en cours de débogage. La barre d'état est affichée en bas de la fenêtre" + "statusBarDebuggingBackground": "Couleur d'arrière-plan de la barre d'état quand un programme est en cours de débogage. La barre d'état est affichée en bas de la fenêtre", + "statusBarDebuggingForeground": "Couleur de premier plan de la barre d'état quand un programme est en cours de débogage. La barre d'état est affichée en bas de la fenêtre" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index 37eac1f96200e..8b0cfe2f540cb 100644 --- a/i18n/fra/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,12 +7,12 @@ "debugAdapterBinNotFound": "L'exécutable d'adaptateur de débogage '{0}' n'existe pas.", "debugAdapterCannotDetermineExecutable": "Impossible de déterminer l'exécutable pour l'adaptateur de débogage '{0}'.", "debugType": "Type de configuration.", + "debugTypeNotRecognised": "Le type de débogage n'est pas reconnu. Vérifiez que vous avez installé l'extension de débogage correspondante et qu'elle est activée.", "node2NotSupported": "\"node2\" n'est plus pris en charge. Utilisez \"node\" à la place, et affectez la valeur \"inspector\" à l'attribut \"protocol\".", "debugName": "Le nom de la configuration s'affiche dans le menu déroulant de la configuration de lancement.", "debugRequest": "Type de requête de configuration. Il peut s'agir de \"launch\" ou \"attach\".", "debugServer": "Pour le développement d'une extension de débogage uniquement : si un port est spécifié, VS Code tente de se connecter à un adaptateur de débogage s'exécutant en mode serveur", "debugPrelaunchTask": "Tâche à exécuter avant le démarrage de la session de débogage.", - "internalConsoleOptions": "Contrôle le comportement de la console de débogage interne.", "debugWindowsConfiguration": "Attributs de configuration de lancement spécifiques à Windows.", "debugOSXConfiguration": "Attributs de configuration de lancement spécifiques à OS X.", "debugLinuxConfiguration": "Attributs de configuration de lancement spécifiques à Linux.", diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json new file mode 100644 index 0000000000000..b64bb8a15ccd6 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "balanceInward": "Emmet : Balance (inward)", + "balanceOutward": "Emmet : Balance (outward)" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json new file mode 100644 index 0000000000000..ad194859cdcfe --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "previousEditPoint": "Emmet : Go to Previous Edit Point", + "nextEditPoint": "Emmet : Go to Next Edit Point" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json new file mode 100644 index 0000000000000..4f8041f2fb1b3 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "evaluateMathExpression": "Emmet : Evaluate Math Expression" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json new file mode 100644 index 0000000000000..29b06df4dcee7 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "expandAbbreviationAction": "Emmet : Expand Abbreviation" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json new file mode 100644 index 0000000000000..89cee185d4d45 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "incrementNumberByOneTenth": "Emmet : Increment by 0.1", + "incrementNumberByOne": "Emmet : Increment by 1", + "incrementNumberByTen": "Emmet : Increment by 10", + "decrementNumberByOneTenth": "Emmet : Decrement by 0.1", + "decrementNumberByOne": "Emmet : Decrement by 1", + "decrementNumberByTen": "Emmet : Decrement by 10" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json new file mode 100644 index 0000000000000..fd27599315ae8 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "matchingPair": "Emmet : Go to Matching Pair" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json new file mode 100644 index 0000000000000..172231ee72ccf --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mergeLines": "Emmet : Merge Lines" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json new file mode 100644 index 0000000000000..e15d8ff52bc8a --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reflectCSSValue": "Emmet : Reflect CSS Value" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json new file mode 100644 index 0000000000000..1764345605f84 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeTag": "Emmet : Remove Tag" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json new file mode 100644 index 0000000000000..b53add8790941 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "selectPreviousItem": "Emmet : Select Previous Item", + "selectNextItem": "Emmet : Select Next Item" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json new file mode 100644 index 0000000000000..701bd61f9b934 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "splitJoinTag": "Emmet : Split/Join Tag" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json new file mode 100644 index 0000000000000..46ab423bdfc7f --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleComment": "Emmet : Toggle Comment" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json new file mode 100644 index 0000000000000..ce110b0e82d9b --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateImageSize": "Emmet : Update Image Size" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json new file mode 100644 index 0000000000000..948679f37cfbc --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateTag": "Emmet : Update Tag", + "enterTag": "Entrer une balise", + "tag": "Balise" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json new file mode 100644 index 0000000000000..4e4c925168c85 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wrapWithAbbreviationAction": "Emmet : Wrap with Abbreviation", + "enterAbbreviation": "Entrer une abréviation", + "abbreviation": "Abréviation" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json new file mode 100644 index 0000000000000..3bd0a45f5943a --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emmetConfigurationTitle": "Emmet", + "triggerExpansionOnTab": "Une fois les abréviations Emmet activées, elles se développent quand vous appuyez sur la touche Tab.", + "emmetPreferences": "Préférences utilisées pour modifier le comportement de certaines actions et résolveurs d'Emmet.", + "emmetSyntaxProfiles": "Définissez le profil pour la syntaxe spécifiée ou utilisez votre propre profil avec des règles spécifiques.", + "emmetExclude": "Ensemble de langages où les abréviations emmet ne doivent pas être développées.", + "emmetExtensionsPath": "Chemin d'un dossier contenant les profils, extraits et préférences Emmet", + "useNewEmmet": "Essayez les nouveaux modules Emmet (qui remplaceront à terme l'ancienne bibliothèque Emmet) pour toutes les fonctionnalités Emmet." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index 5d874fb9c0ec4..82bea9c4375fd 100644 --- a/i18n/fra/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -4,10 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "vscode.extension.contributes.explorer": "Utilise la viewlet du Tree Explorer personnalisé dans la barre latérale", - "vscode.extension.contributes.explorer.treeExplorerNodeProviderId": "ID unique permettant d'identifier le fournisseur inscrit via vscode.workspace.registerTreeExplorerNodeProvider", - "vscode.extension.contributes.explorer.treeLabel": "Chaîne contrôlable de visu permettant d'afficher le Tree Explorer personnalisé", - "vscode.extension.contributes.explorer.icon": "Chemin de l'icône de viewlet dans la barre d'activités", + "vscode.extension.contributes.view": "Ajoute une vue personnalisée", + "vscode.extension.contributes.view.id": "ID unique utilisé pour identifier la vue créée avec vscode.workspace.createTreeView", + "vscode.extension.contributes.view.label": "Chaîne contrôlable de visu permettant d'afficher la vue", + "vscode.extension.contributes.view.icon": "Chemin de l'icône de la vue", + "vscode.extension.contributes.views": "Ajoute des vues personnalisées", "showViewlet": "Afficher {0}", "view": "Affichage" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index 5dd842e57ef7f..df8369170ce58 100644 --- a/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -24,6 +24,10 @@ "default": "Par défaut", "debuggers": "Débogueurs ({0})", "debugger name": "Nom", + "views": "Vues ({0})", + "view id": "ID", + "view name": "Nom", + "view location": "Emplacement", "themes": "Thèmes ({0})", "JSON Validation": "Validation JSON ({0})", "commands": "Commandes ({0})", diff --git a/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index 5b7a7ecda7f31..0112a21db366d 100644 --- a/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -22,6 +22,8 @@ "disableGloballyAction": "Toujours", "disableAction": "Désactiver", "checkForUpdates": "Rechercher les mises à jour", + "enableAutoUpdate": "Activer la mise à jour automatique des extensions", + "disableAutoUpdate": "Désactiver la mise à jour automatique des extensions", "updateAll": "Mettre à jour toutes les extensions", "reloadAction": "Recharger", "postUpdateTooltip": "Recharger pour mettre à jour", @@ -44,6 +46,8 @@ "showWorkspaceRecommendedExtensions": "Afficher les extensions recommandées pour l'espace de travail", "showRecommendedKeymapExtensions": "Afficher les mappages de touches recommandés", "showRecommendedKeymapExtensionsShort": "Mappages de touches", + "showLanguageExtensions": "Afficher les extensions de langage", + "showLanguageExtensionsShort": "Extensions de langage", "configureWorkspaceRecommendedExtensions": "Configurer les extensions recommandées (espace de travail)", "ConfigureWorkspaceRecommendations.noWorkspace": "Les recommandations ne sont disponibles que pour un dossier d'espace de travail.", "OpenExtensionsFile.failed": "Impossible de créer le fichier 'extensions.json' dans le dossier '.vscode' ({0}).", @@ -51,5 +55,8 @@ "disableAll": "Désactiver toutes les extensions installées", "disableAllWorkspace": "Désactiver toutes les extensions installées pour cet espace de travail", "enableAll": "Activer toutes les extensions installées", - "enableAllWorkspace": "Activer toutes les extensions installées pour cet espace de travail" + "enableAllWorkspace": "Activer toutes les extensions installées pour cet espace de travail", + "extensionButtonProminentBackground": "Couleur d'arrière-plan du bouton pour les extension d'actions importantes (par ex., le bouton d'installation).", + "extensionButtonProminentForeground": "Couleur d'arrière-plan du bouton pour l'extension d'actions importantes (par ex., le bouton d'installation).", + "extensionButtonProminentHoverBackground": "Couleur d'arrière-plan du pointage de bouton pour l'extension d'actions importantes (par ex., le bouton d'installation)." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index 18cf1088366c9..ba4825598d4c7 100644 --- a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -4,8 +4,13 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "reallyRecommended2": "L'extension '{0}' est recommandée pour ce type de fichier.", "showRecommendations": "Afficher les recommandations", "neverShowAgain": "Ne plus afficher", "close": "Fermer", - "workspaceRecommended": "Cet espace de travail a des recommandations d'extension." + "workspaceRecommended": "Cet espace de travail a des recommandations d'extension.", + "ignoreExtensionRecommendations": "Voulez-vous ignorer toutes les recommandations d'extension ?", + "ignoreAll": "Oui, ignorer tout", + "no": "Non", + "cancel": "Annuler" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index 89edbc50c8928..be819e14deb67 100644 --- a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -10,5 +10,6 @@ "extensions": "Extensions", "view": "Affichage", "extensionsConfigurationTitle": "Extensions", - "extensionsAutoUpdate": "Mettre à jour automatiquement les extensions" + "extensionsAutoUpdate": "Mettre à jour automatiquement les extensions", + "extensionsIgnoreRecommendations": "Ignorer les recommandations d'extension" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json new file mode 100644 index 0000000000000..3eea012e3732d --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "disableOtherKeymapsConfirmation": "Désactiver les autres mappages de touches ({0}) pour éviter les conflits de combinaisons de touches ?", + "yes": "Oui", + "no": "Non", + "betterMergeDisabled": "L'extension Better Merge est désormais intégrée, l'extension installée est désactivée et peut être désinstallée.", + "uninstall": "Désinstaller", + "later": "Plus tard" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json index 1c100c20c5a8d..4eafb4c238dee 100644 --- a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json @@ -5,10 +5,10 @@ // Do not edit this file. It is machine generated. { "searchExtensions": "Rechercher des extensions dans Marketplace", - "extensions": "Extensions", "sort by installs": "Trier par : nombre d'installations", "sort by rating": "Trier par : évaluation", - "no extensions found": "Extensions introuvables.", + "sort by name": "Trier par : Nom", "suggestProxyError": "Marketplace a retourné 'ECONNREFUSED'. Vérifiez le paramètre 'http.proxy'.", + "extensions": "Extensions", "outdatedExtensions": "{0} extensions obsolètes" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json new file mode 100644 index 0000000000000..99aec842fdfc7 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensions": "Extensions", + "no extensions found": "Extensions introuvables.", + "suggestProxyError": "Marketplace a retourné 'ECONNREFUSED'. Vérifiez le paramètre 'http.proxy'." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json index 3e64210f5f56c..0c3d89f5c88e6 100644 --- a/i18n/fra/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json @@ -13,5 +13,6 @@ "cancel": "Annuler", "singleDependentError": "Impossible de désactiver l'extension '{0}'. L'extension '{1}' en dépend.", "twoDependentsError": "Impossible de désactiver l'extension '{0}'. Les extensions '{1}' et '{2}' en dépendent.", - "multipleDependentsError": "Impossible de désactiver l'extension '{0}'. Les extensions '{1}', '{2}' et d'autres extensions en dépendent." + "multipleDependentsError": "Impossible de désactiver l'extension '{0}'. Les extensions '{1}', '{2}' et d'autres extensions en dépendent.", + "install": "Installer" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index 13f0487e367c2..0899ce84e3de6 100644 --- a/i18n/fra/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,7 +16,7 @@ "associations": "Configurez les associations entre les fichiers et les langages (par exemple, \"*.extension\": \"html\"). Celles-ci ont priorité sur les associations par défaut des langages installés.", "encoding": "Encodage du jeu de caractères par défaut à utiliser durant la lecture et l'écriture des fichiers.", "autoGuessEncoding": "Quand cette option est activée, tente de deviner l'encodage du jeu de caractères à l'ouverture des fichiers", - "eol": "Caractère de fin de ligne par défaut.", + "eol": "Caractère de fin de ligne par défaut. Utilisez \\n pour LF et \\r\\n pour CRLF.", "trimTrailingWhitespace": "Si l'option est activée, l'espace blanc de fin est supprimé au moment de l'enregistrement d'un fichier.", "insertFinalNewline": "Quand l'option est activée, une nouvelle ligne finale est insérée à la fin du fichier au moment de son enregistrement.", "files.autoSave.off": "Un fichier dont l'intégrité est compromise n'est jamais enregistré automatiquement.", @@ -25,10 +25,8 @@ "files.autoSave.onWindowChange": "Un fichier dont l'intégrité est compromise est automatiquement enregistré quand la fenêtre perd le focus.", "autoSave": "Contrôle l'enregistrement automatique des fichiers dont l'intégrité est compromise. Valeurs acceptées : '{0}', '{1}', '{2}' (l'éditeur perd le focus), '{3}' (la fenêtre perd le focus). Si la valeur est '{4}', vous pouvez configurer le délai dans 'files.autoSaveDelay'.", "autoSaveDelay": "Contrôle le délai en ms au bout duquel un fichier à l'intégrité compromise est enregistré automatiquement. S'applique uniquement quand 'files.autoSave' a la valeur '{0}'", - "watcherExclude": "Configurez les modèles Glob des chemins de fichiers à exclure de la surveillance des fichiers. La modification de ce paramètre nécessite un redémarrage. Si vous constatez que le code consomme beaucoup de temps processeur au démarrage, excluez les dossiers volumineux pour réduire la charge initiale.", "hotExit.off": "Désactivez la sortie à chaud.", - "hotExit.onExit": "La sortie à chaud se déclenche à la fermeture de l'application, c'est-à-dire quand la dernière fenêtre est fermée dans Windows/Linux, ou quand la commande workbench.action.quit se déclenche (palette de commandes, combinaison de touches, menu). Toutes les fenêtres avec des sauvegardes sont restaurées au prochain lancement.", - "hotExit.onExitAndWindowClose": "La sortie à chaud se déclenche à la fermeture de l'application, c'est-à-dire quand la dernière fenêtre est fermée dans Windows/Linux, ou quand la commande workbench.action.quit se déclenche (palette de commandes, combinaison de touches, menu), ainsi que toute fenêtre comportant un dossier ouvert, qu'il s'agisse ou non de la dernière fenêtre. Toutes les fenêtres qui n'ont pas de dossiers ouverts sont restaurées au prochain lancement. Pour restaurer les fenêtres de dossiers telles qu'elles étaient avant l'arrêt, affectez à \"window.reopenFolders\" la valeur \"all\".", + "hotExit.onExit": "La sortie à chaud se déclenche à la fermeture de l'application, c'est-à-dire quand la dernière fenêtre est fermée dans Windows/Linux, ou quand la commande workbench.action.quit est déclenchée (palette de commandes, combinaison de touches, menu). Toutes les fenêtres avec des sauvegardes sont restaurées au prochain lancement.", "hotExit": "Contrôle si les fichiers non enregistrés sont mémorisés entre les sessions, ce qui permet d'ignorer la demande d'enregistrement à la sortie de l'éditeur.", "defaultLanguage": "Mode de langage par défaut affecté aux nouveaux fichiers.", "editorConfigurationTitle": "Éditeur", diff --git a/i18n/fra/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json b/i18n/fra/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json index aa46d6e9d153d..b3c02d74e398e 100644 --- a/i18n/fra/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json @@ -11,5 +11,6 @@ "genericSaveError": "Échec d'enregistrement de '{0}' ({1}).", "staleSaveError": "Échec de l'enregistrement de '{0}' : le contenu sur disque est plus récent. Cliquez sur **Comparer** pour comparer votre version à celle située sur le disque.", "compareChanges": "Comparer", + "saveConflictDiffLabel": "{0} (sur le disque) ↔ {1} (dans {2}) - Résoudre le conflit d'enregistrement", "userGuide": "Utilisez les actions de la barre d'outils de l'éditeur pour **annuler** vos modifications, ou pour **remplacer** le contenu sur disque par le contenu incluant vos changements" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json b/i18n/fra/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json index 3b4a98a5b1ac2..8d920cf85edb2 100644 --- a/i18n/fra/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "explorerSection": "Section de l'Explorateur de fichiers", "noWorkspace": "Aucun dossier ouvert", + "explorerSection": "Section de l'Explorateur de fichiers", "noWorkspaceHelp": "Vous n'avez pas encore ouvert de dossier.", "openFolder": "Ouvrir le dossier" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json b/i18n/fra/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json index 049ecf726f012..edcca33816cda 100644 --- a/i18n/fra/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "openEditosrSection": "Section des éditeurs ouverts", "openEditors": "Éditeurs ouverts", + "openEditosrSection": "Section des éditeurs ouverts", "treeAriaLabel": "Éditeurs ouverts : liste des fichiers actifs", "dirtyCounter": "{0} non enregistré(s)" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index fb432045fcc8d..13b60d7dd5c53 100644 --- a/i18n/fra/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -5,5 +5,11 @@ // Do not edit this file. It is machine generated. { "slow": "Démarrage lent détecté", - "slow.detail": "Le démarrage a été très lent. Redémarrez '{0}' en ayant activé le profilage, partagez les profils avec nous, et nous ferons en sorte que le démarrage retrouve sa rapidité d'exécution." + "slow.detail": "Le démarrage a été très lent. Redémarrez '{0}' en ayant activé le profilage, partagez les profils avec nous, et nous ferons en sorte que le démarrage retrouve sa rapidité d'exécution.", + "prof.message": "Création réussie des profils.", + "prof.detail": "Créez un problème et joignez manuellement les fichiers suivants :\n{0}", + "prof.restartAndFileIssue": "Créer le problème et redémarrer", + "prof.restart": "Redémarrer", + "prof.thanks": "Merci de votre aide.", + "prof.detail.restart": "Un redémarrage final est nécessaire pour continuer à utiliser '{0}'. Nous vous remercions une fois de plus pour votre contribution." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json index daa7e32feafaf..7d18aea5f66e3 100644 --- a/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -7,6 +7,7 @@ "keybindingsInputName": "Raccourcis clavier", "SearchKeybindings.AriaLabel": "Rechercher dans les combinaisons de touches", "SearchKeybindings.Placeholder": "Rechercher dans les combinaisons de touches", + "sortByPrecedene": "Trier par priorité", "header-message": "Pour des personnalisations avancées, ouvrez et modifiez", "keybindings-file-name": "keybindings.json", "keybindingsLabel": "Combinaisons de touches", @@ -14,6 +15,7 @@ "addLabel": "Ajouter une combinaison de touches", "removeLabel": "Supprimer la combinaison de touches", "resetLabel": "Définir une combinaison de touches", + "showConflictsLabel": "Afficher les conflits", "copyLabel": "Copier", "error": "Erreur '{0}' durant la modification de la combinaison de touches. Ouvrez le fichier 'keybindings.json', puis effectuez la vérification.", "command": "Commande", diff --git a/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index 4d183869763e7..0fa91c30616a0 100644 --- a/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -5,7 +5,7 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.start": "Définir une combinaison de touches", - "defineKeybinding.kbLayoutInfoMessage": "Pour votre disposition actuelle du clavier, appuyez sur ", "defineKeybinding.kbLayoutErrorMessage": "Vous ne pouvez pas produire cette combinaison de touches avec la disposition actuelle du clavier.", - "DefineKeybindingAction": "Définir une combinaison de touches" + "defineKeybinding.kbLayoutLocalAndUSMessage": "**{0}** pour votre disposition actuelle du clavier (**{1}** pour le clavier États-Unis standard).", + "defineKeybinding.kbLayoutLocalMessage": "**{0}** pour votre disposition actuelle du clavier." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index 5f3ed88ebd24b..61742507b3662 100644 --- a/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -6,6 +6,7 @@ { "openGlobalSettings": "Ouvrir les paramètres utilisateur", "openGlobalKeybindings": "Ouvrir les raccourcis clavier", + "openGlobalKeybindingsFile": "Ouvrir le fichier des raccourcis clavier", "openWorkspaceSettings": "Ouvrir les paramètres d'espace de travail", "configureLanguageBasedSettings": "Configurer les paramètres spécifiques au langage...", "languageDescriptionConfigured": "({0})", diff --git a/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index 6d2534d7624c3..59dedf11e5b5d 100644 --- a/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "errorInvalidConfiguration": "Impossible d'écrire les paramètres. Corrigez les erreurs/avertissements présents dans le fichier, puis réessayez.", + "defaultSettingsTitle": "Paramètres par défaut", "editTtile": "Modifier", "replaceDefaultValue": "Remplacer dans les paramètres", "copyDefaultValue": "Copier dans Paramètres", diff --git a/i18n/fra/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json b/i18n/fra/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json index ded62d720502b..7ee69533a0995 100644 --- a/i18n/fra/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json @@ -5,5 +5,7 @@ // Do not edit this file. It is machine generated. { "default": "Par défaut", - "user": "Utilisateur" + "user": "Utilisateur", + "meta": "méta", + "option": "option" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json b/i18n/fra/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json index 54c588725ce40..261570184f127 100644 --- a/i18n/fra/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "showTriggerActions": "Afficher toutes les commandes", + "showCommands.label": "Palette de commandes...", "entryAriaLabelWithKey": "{0}, {1}, commandes", "entryAriaLabel": "{0}, commandes", "canNotRun": "La commande '{0}' ne peut pas être exécutée à partir d'ici.", diff --git a/i18n/fra/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json new file mode 100644 index 0000000000000..7507a7f217ace --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "relaunchSettingMessage": "Un paramètre a changé et nécessite un redémarrage pour être appliqué.", + "relaunchSettingDetail": "Appuyez sur le bouton de redémarrage pour redémarrer {0} et activer le paramètre.", + "restart": "Redémarrer", + "reload": "Recharger" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/fra/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json new file mode 100644 index 0000000000000..3fe2c3e213dbe --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGutterModifiedBackground": "Couleur d'arrière-plan de la reliure de l'éditeur pour les lignes modifiées.", + "editorGutterAddedBackground": "Couleur d'arrière-plan de la reliure de l'éditeur pour les lignes ajoutées.", + "editorGutterDeletedBackground": "Couleur d'arrière-plan de la reliure de l'éditeur pour les lignes supprimées." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json index 015c5898f64a1..50606f11e00f0 100644 --- a/i18n/fra/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "toggleGitViewlet": "Afficher Git", + "installAdditionalSCMProviders": "Installer des fournisseurs SCM supplémentaires...", "source control": "Contrôle de code source", "toggleSCMViewlet": "Afficher SCM", "view": "Afficher" diff --git a/i18n/fra/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json b/i18n/fra/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json index 28a54af77fa66..90044a6bbbc57 100644 --- a/i18n/fra/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "installAdditionalSCMProviders": "Installer des fournisseurs SCM supplémentaires...", "switch provider": "Changer de fournisseur GCL..." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/fra/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json index ea443e85fbe92..052e41c13ac83 100644 --- a/i18n/fra/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -7,6 +7,6 @@ "searchMatches": "{0} correspondances trouvées", "searchMatch": "{0} correspondance trouvée", "fileMatchAriaLabel": "{0} correspondances dans le fichier {1} du dossier {2}, Résultat de la recherche", - "replacePreviewResultAria": "Résultat de l'aperçu du remplacement, {0}", - "searchResultAria": "{0}, Résultat de la recherche" + "replacePreviewResultAria": "Remplacer le terme {0} par {1} à la position de colonne {2} dans la ligne avec le texte {3}", + "searchResultAria": "Terme {0} trouvé à la position de colonne {1} dans la ligne avec le texte {2}" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json b/i18n/fra/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json index 379815030a8ed..ce5cfc948495d 100644 --- a/i18n/fra/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json @@ -9,5 +9,6 @@ "vscode.extension.contributes.snippets-path": "Chemin du fichier d'extraits de code. Le chemin est relatif au dossier d'extensions et commence généralement par './snippets/'.", "invalid.language": "Langage inconnu dans 'contributes.{0}.language'. Valeur fournie : {1}", "invalid.path.0": "Chaîne attendue dans 'contributes.{0}.path'. Valeur fournie : {1}", - "invalid.path.1": "'contributes.{0}.path' ({1}) est censé être inclus dans le dossier ({2}) de l'extension. Cela risque de rendre l'extension non portable." + "invalid.path.1": "'contributes.{0}.path' ({1}) est censé être inclus dans le dossier ({2}) de l'extension. Cela risque de rendre l'extension non portable.", + "badVariableUse": "L'extrait de code \"{0}\" confond très probablement les variables et les espaces réservés d'extrait de code. Consultez https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax pour plus d'informations." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json index 0b77278c9389a..af0ca524f41df 100644 --- a/i18n/fra/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json @@ -11,6 +11,6 @@ "snippetSchema.json.default": "Extrait de code vide", "snippetSchema.json": "Configuration de l'extrait de code utilisateur", "snippetSchema.json.prefix": "Préfixe à utiliser durant la sélection de l'extrait de code dans IntelliSense", - "snippetSchema.json.body": "Contenu de l'extrait de code. Utilisez '${id}', '${id:label}', '${1:label}' pour les variables, et '$0', '$1' pour les positions du curseur", + "snippetSchema.json.body": "Contenu de l'extrait de code. Utilisez '$1', '${1:defaultText}' pour définir les positions du curseur, utilisez '$0' pour la position finale du curseur. Insérez les valeurs de variable avec '${varName}' et '${varName:defaultText}', par ex., 'Il s'agit du fichier : $TM_FILENAME'.", "snippetSchema.json.description": "Description de l'extrait de code." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json new file mode 100644 index 0000000000000..b68d1b3bcbbf2 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "helpUs": "Aidez-nous à améliorer le support de {0}", + "takeShortSurvey": "Répondre à une enquête rapide", + "remindLater": "Me le rappeler plus tard", + "neverAgain": "Ne plus afficher" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..18c8f1427ffb0 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "Acceptez-vous de répondre à une enquête rapide ?", + "takeSurvey": "Répondre à l'enquête", + "remindLater": "Me le rappeler plus tard", + "neverAgain": "Ne plus afficher" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json new file mode 100644 index 0000000000000..c4f5420f0963b --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "Aucune tâche correspondante" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json index 523b1b3eedffa..03c80a19e007f 100644 --- a/i18n/fra/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tasks", "tasksAriaLabel": "Tapez le nom d'une tâche à redémarrer", "noTasksMatching": "Aucune tâche correspondante", "noTasksFound": "Aucune tâche à recommencer n'a été trouvée" diff --git a/i18n/fra/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json index dbe8afe6d875f..f1a32f4b7bfb6 100644 --- a/i18n/fra/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tasks", "tasksAriaLabel": "Tapez le nom d'une tâche à exécuter", "noTasksMatching": "No tasks matching", "noTasksFound": "Tâches introuvables" diff --git a/i18n/fra/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json new file mode 100644 index 0000000000000..c4f5420f0963b --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "Aucune tâche correspondante" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index ae9887787513b..cfdcd7341c0d1 100644 --- a/i18n/fra/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -5,13 +5,13 @@ // Do not edit this file. It is machine generated. { "ConfigurationParser.invalidCWD": "Warning: options.cwd must be of type string. Ignoring value {0}\n", - "ConfigurationParser.noShell": "Avertissement : La configuration de l'interpréteur de commandes n'est prise en charge que durant l'exécution des tâches dans le terminal.", "ConfigurationParser.noargs": "Erreur : les arguments de commande doivent correspondre à un tableau de chaînes. La valeur fournie est :\n{0}", + "ConfigurationParser.noShell": "Avertissement : La configuration de l'interpréteur de commandes n'est prise en charge que durant l'exécution des tâches dans le terminal.", "ConfigurationParser.noName": "Erreur : le détecteur de problèmes de correspondance dans la portée de déclaration doit avoir un nom :\n{0}\n", "ConfigurationParser.unknownMatcherKind": "Avertissement : le détecteur de problèmes de correspondance défini est inconnu. Les types pris en charge sont string | ProblemMatcher | (string | ProblemMatcher)[].\n{0}\n", "ConfigurationParser.invalidVaraibleReference": "Erreur : référence à problemMatcher non valide : {0}\n", "ConfigurationParser.noTaskName": "Erreur : les tâches doivent fournir une propriété taskName. La tâche va être ignorée.\n{0}\n", "taskConfiguration.shellArgs": "Avertissement : La tâche '{0}' est une commande d'interpréteur de commandes, et le nom de la commande ou l'un de ses arguments contient des espaces non précédés d'un caractère d'échappement. Pour garantir une ligne de commande correcte, fusionnez les arguments dans la commande.", - "taskConfiguration.noCommandOrDependsOn": "Erreur : La tâche '{0}' ne spécifie ni une commande, ni une propriété dependsOn. La tâche va être ignorée. Sa définition est :\n{1}", + "taskConfiguration.noCommandOrDependsOn": "Erreur : La tâche '{0}' ne spécifie ni une commande, ni une propriété dependsOn. La tâche est ignorée. Sa définition est :\n{1}", "taskConfiguration.noCommand": "Erreur : La tâche '{0}' ne définit aucune commande. La tâche va être ignorée. Sa définition est :\n{1}" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json index 2e2a8f156d326..d68d9745bf5d7 100644 --- a/i18n/fra/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "tsc.config": "Compile un projet TypeScript", - "tsc.watch": "Compile un projet TypeScript en mode espion", "dotnetCore": "Exécute une commande de génération .NET Core", "msbuild": "Exécute la cible de génération", "externalCommand": "Exemple d'exécution d'une commande externe arbitraire", diff --git a/i18n/fra/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json index f9b47cd0ac4cf..4a1e27d2714b1 100644 --- a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json @@ -7,6 +7,7 @@ "JsonSchema.options": "Options de commande supplémentaires", "JsonSchema.options.cwd": "Répertoire de travail actif du programme ou script exécuté. En cas d'omission, la racine de l'espace de travail actif de Code est utilisée.", "JsonSchema.options.env": "Environnement du programme ou de l'interpréteur de commandes exécuté. En cas d'omission, l'environnement du processus parent est utilisé.", + "JsonSchema.shellConfiguration": "Configure l'interpréteur de commandes à utiliser.", "JsonSchema.shell.executable": "Interpréteur de commandes à utiliser.", "JsonSchema.shell.args": "Arguments de l'interpréteur de commandes.", "JsonSchema.command": "Commande à exécuter. Il peut s'agir d'un programme externe ou d'une commande d'interpréteur de commandes.", diff --git a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json index c2cb490358eee..d125a6f5534f4 100644 --- a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json @@ -5,6 +5,8 @@ // Do not edit this file. It is machine generated. { "JsonSchema.version": "Numéro de version de la configuration", + "JsonSchema._runner": "Le runner est dégradé. Utiliser la propriété runner officielle", + "JsonSchema.runner": "Définit si la tâche est exécutée sous forme de processus, et si la sortie s'affiche dans la fenêtre de sortie ou dans le terminal.", "JsonSchema.windows": "Configuration de commande spécifique à Windows", "JsonSchema.mac": "Configuration de commande spécifique à Mac", "JsonSchema.linux": "Configuration de commande spécifique à Linux", diff --git a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json index 19b06a2f22400..c226c9750297e 100644 --- a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -4,11 +4,16 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "JsonSchema.version": "Numéro de version de la configuration", - "JsonSchema.windows": "Configuration de commande spécifique à Windows", - "JsonSchema.mac": "Configuration de commande spécifique à Mac", - "JsonSchema.linux": "Configuration de commande spécifique à Linux", "JsonSchema.shell": "Spécifie si la commande est une commande d'interpréteur de commandes ou un programme externe. La valeur par défaut est false, en cas d'omission.", "JsonSchema.tasks.dependsOn.string": "Autre tâche dont cette tâche dépend.", - "JsonSchema.tasks.dependsOn.array": "Autres tâches dont cette tâche dépend." + "JsonSchema.tasks.dependsOn.array": "Autres tâches dont cette tâche dépend.", + "JsonSchema.tasks.type": "Définit si la tâche est exécutée sous forme de processus ou d'une commande d'un interpréteur de commandes. La valeur par défaut est un processus.", + "JsonSchema.version": "Numéro de version de la configuration.", + "JsonSchema.tasks.taskName": "Nom de la tâche", + "JsonSchema.tasks.background": "Spécifie si la tâche exécutée est persistante, et si elle s'exécute en arrière-plan.", + "JsonSchema.tasks.promptOnClose": "Spécifie si l'utilisateur est prévenu quand VS Code se ferme avec une tâche en cours d'exécution.", + "JsonSchema.tasks.matchers": "Détecteur(s) de problèmes de correspondance à utiliser. Il peut s'agir d'une chaîne ou d'une définition de détecteur de problèmes de correspondance, ou encore d'un tableau de chaînes et de détecteurs de problèmes de correspondance.", + "JsonSchema.windows": "Configuration de commande spécifique à Windows", + "JsonSchema.mac": "Configuration de commande spécifique à Mac", + "JsonSchema.linux": "Configuration de commande spécifique à Linux" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 0c1b20136eabb..0c22bd0c8d264 100644 --- a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -9,6 +9,7 @@ "ConfigureTaskRunnerAction.quickPick.template": "Sélectionner un exécuteur de tâches", "ConfigureTaskRunnerAction.autoDetecting": "Détection automatique des tâches pour {0}", "ConfigureTaskRunnerAction.autoDetect": "En raison de l'échec de la détection automatique du système de tâche, le modèle par défaut va être utilisé. Pour plus d'informations, consultez la sortie de la tâche.", + "ConfigureTaskRunnerAction.autoDetectError": "La détection automatique du système de tâche a produit des erreurs. Consultez la sortie de la tâche pour plus d'informations.", "ConfigureTaskRunnerAction.failed": "Impossible de créer le fichier 'tasks.json' dans le dossier '.vscode'. Pour plus d'informations, consultez la sortie de la tâche.", "ConfigureTaskRunnerAction.label": "Configurer l'exécuteur de tâches", "ConfigureBuildTaskAction.label": "Configurer une tâche de build", @@ -18,10 +19,11 @@ "manyMarkers": "99", "tasks": "Tâches", "TaskSystem.noHotSwap": "Le changement du moteur d'exécution de tâches nécessite le redémarrage de VS Code. Changement ignoré.", - "TaskService.noBuildTask": "Aucune tâche de build définie. Marquez une tâche avec 'isBuildCommand' dans le fichier tasks.json.", - "TaskService.noTestTask": "Aucune tâche de test définie. Marquez une tâche avec 'isTestCommand' dans le fichier tasks.json.", + "TaskService.noBuildTask1": "Aucune tâche de build définie. Marquez une tâche avec 'isBuildCommand' dans le fichier tasks.json.", + "TaskService.noTestTask1": "Aucune tâche de test définie. Marquez une tâche avec 'isTestCommand' dans le fichier tasks.json.", "TaskServer.noTask": "La tâche {0} à exécuter est introuvable.", - "TaskSystem.activeSame": "La tâche est déjà active et en mode espion. Pour terminer la tâche, utilisez 'F1 > terminer la tâche'", + "customizeParseErrors": "La configuration de tâche actuelle contient des erreurs. Corrigez-les avant de personnaliser une tâche. ", + "moreThanOneBuildTask": "De nombreuses tâches de génération sont définies dans le fichier tasks.json. Exécution de la première.\n", "TaskSystem.active": "Une tâche est déjà en cours d'exécution. Terminez-la avant d'exécuter une autre tâche.", "TaskSystem.restartFailed": "Échec de la fin de l'exécution de la tâche {0}", "TaskSystem.configurationErrors": "Erreur : la configuration de tâche fournie comporte des erreurs de validation et ne peut pas être utilisée. Corrigez d'abord les erreurs.", @@ -30,17 +32,14 @@ "TaskSystem.terminateTask": "&&Terminer la tâche", "TaskSystem.noProcess": "La tâche lancée n'existe plus. Si la tâche a engendré des processus en arrière-plan, la sortie de VS Code risque de donner lieu à des processus orphelins. Pour éviter ce problème, démarrez le dernier processus en arrière-plan avec un indicateur d'attente.", "TaskSystem.exitAnyways": "&&Quitter quand même", - "TerminateAction.label": "Terminer l'exécution de la tâche", + "TerminateAction.label": "Terminer la tâche", "TaskSystem.unknownError": "Une erreur s'est produite durant l'exécution d'une tâche. Pour plus d'informations, consultez le journal des tâches.", "TaskService.noWorkspace": "Les tâches ne sont disponibles que dans un dossier d'espace de travail.", "TerminateAction.noProcess": "Le processus lancé n'existe plus. Si la tâche a engendré des tâches en arrière-plan, la sortie de VS Code risque de donner lieu à des processus orphelins.", "TerminateAction.failed": "Échec de la fin de l'exécution de la tâche", "ShowLogAction.label": "Afficher le journal des tâches", "RunTaskAction.label": "Exécuter la tâche", - "RestartTaskAction.label": "Redémarrer la tâche", "BuildAction.label": "Exécuter la tâche de génération", "TestAction.label": "Exécuter la tâche de test", - "quickOpen.task": "Exécuter la tâche", - "quickOpen.terminateTask": "&&Terminer la tâche", - "quickOpen.restartTask": "Redémarrer la tâche" + "quickOpen.task": "Exécuter la tâche" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index 32ff4c480d3b6..413680671bf49 100644 --- a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -6,5 +6,7 @@ { "TerminalTaskSystem.unknownError": "Une erreur inconnue s'est produite durant l'exécution d'une tâche. Pour plus d'informations, consultez le journal de sortie des tâches.", "TerminalTaskSystem.terminalName": "Tâche - {0}", - "TerminalTaskSystem": "Impossible d'exécuter une commande d'interpréteur de commandes sur un lecteur UNC." + "reuseTerminal": "Le terminal sera réutilisé par les tâches, appuyez sur une touche pour le fermer.", + "TerminalTaskSystem": "Impossible d'exécuter une commande d'interpréteur de commandes sur un lecteur UNC.", + "unkownProblemMatcher": "Impossible de résoudre le détecteur de problèmes {0}. Le détecteur est ignoré" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json index a2ea447d1055a..50a093077839a 100644 --- a/i18n/fra/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json @@ -7,5 +7,6 @@ "TaskRunnerSystem.unknownError": "Une erreur inconnue s'est produite durant l'exécution d'une tâche. Pour plus d'informations, consultez le journal de sortie des tâches.", "TaskRunnerSystem.watchingBuildTaskFinished": "\nFin du suivi des tâches de génération.", "TaskRunnerSystem.childProcessError": "Failed to launch external program {0} {1}.", - "TaskRunnerSystem.cancelRequested": "\nThe task '{0}' was terminated per user request." + "TaskRunnerSystem.cancelRequested": "\nThe task '{0}' was terminated per user request.", + "unkownProblemMatcher": "Impossible de résoudre le détecteur de problèmes {0}. Le détecteur est ignoré" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json new file mode 100644 index 0000000000000..cfdcd7341c0d1 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ConfigurationParser.invalidCWD": "Warning: options.cwd must be of type string. Ignoring value {0}\n", + "ConfigurationParser.noargs": "Erreur : les arguments de commande doivent correspondre à un tableau de chaînes. La valeur fournie est :\n{0}", + "ConfigurationParser.noShell": "Avertissement : La configuration de l'interpréteur de commandes n'est prise en charge que durant l'exécution des tâches dans le terminal.", + "ConfigurationParser.noName": "Erreur : le détecteur de problèmes de correspondance dans la portée de déclaration doit avoir un nom :\n{0}\n", + "ConfigurationParser.unknownMatcherKind": "Avertissement : le détecteur de problèmes de correspondance défini est inconnu. Les types pris en charge sont string | ProblemMatcher | (string | ProblemMatcher)[].\n{0}\n", + "ConfigurationParser.invalidVaraibleReference": "Erreur : référence à problemMatcher non valide : {0}\n", + "ConfigurationParser.noTaskName": "Erreur : les tâches doivent fournir une propriété taskName. La tâche va être ignorée.\n{0}\n", + "taskConfiguration.shellArgs": "Avertissement : La tâche '{0}' est une commande d'interpréteur de commandes, et le nom de la commande ou l'un de ses arguments contient des espaces non précédés d'un caractère d'échappement. Pour garantir une ligne de commande correcte, fusionnez les arguments dans la commande.", + "taskConfiguration.noCommandOrDependsOn": "Erreur : La tâche '{0}' ne spécifie ni une commande, ni une propriété dependsOn. La tâche est ignorée. Sa définition est :\n{1}", + "taskConfiguration.noCommand": "Erreur : La tâche '{0}' ne définit aucune commande. La tâche va être ignorée. Sa définition est :\n{1}" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json index ea30b101883e2..4f049d61996a8 100644 --- a/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -16,6 +16,7 @@ "terminal.integrated.fontLigatures": "Contrôle si les ligatures de police sont activées sur le terminal.", "terminal.integrated.fontSize": "Contrôle la taille de police en pixels du terminal.", "terminal.integrated.lineHeight": "Contrôle la hauteur de ligne du terminal. La multiplication de ce nombre par la taille de police du terminal permet d'obtenir la hauteur de ligne réelle en pixels.", + "terminal.integrated.enableBold": "Indique s'il faut activer ou non le texte en gras dans le terminal, ce qui nécessite une prise en charge de l'interpréteur de commandes du terminal.", "terminal.integrated.cursorBlinking": "Contrôle si le curseur du terminal clignote.", "terminal.integrated.cursorStyle": "Contrôle le style du curseur du terminal.", "terminal.integrated.scrollback": "Contrôle la quantité maximale de lignes que le terminal conserve dans sa mémoire tampon.", diff --git a/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json index fdfee189e15bd..b2f5634cfe83e 100644 --- a/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -8,6 +8,7 @@ "workbench.action.terminal.kill": "Tuer l'instance active du terminal", "workbench.action.terminal.kill.short": "Tuer le terminal", "workbench.action.terminal.copySelection": "Copier la sélection", + "workbench.action.terminal.selectAll": "Tout Sélectionner", "workbench.action.terminal.new": "Créer un terminal intégré", "workbench.action.terminal.new.short": "Nouveau terminal", "workbench.action.terminal.focus": "Focus sur le terminal", @@ -26,5 +27,8 @@ "workbench.action.terminal.scrollUp": "Faire défiler vers le haut (ligne)", "workbench.action.terminal.scrollUpPage": "Faire défiler vers le haut (page)", "workbench.action.terminal.scrollToTop": "Faire défiler jusqu'en haut", - "workbench.action.terminal.clear": "Effacer" + "workbench.action.terminal.clear": "Effacer", + "workbench.action.terminal.allowWorkspaceShell": "Autoriser la configuration de l'interpréteur de commandes de l'espace de travail", + "workbench.action.terminal.disallowWorkspaceShell": "Interdire la configuration de l'interpréteur de commandes de l'espace de travail", + "workbench.action.terminal.rename": "Renommer" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json b/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json index 24d7761697ecc..2a639927b494a 100644 --- a/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.background": "Couleur d'arrière-plan du terminal, permet d'appliquer au terminal une couleur différente de celle du panneau.", + "terminal.foreground": "Couleur de premier plan du terminal.", "terminal.ansiColor": "Couleur ansi '{0}' dans le terminal." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json b/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json index 1ed48f98d5802..e1e7e6597fa17 100644 --- a/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.integrated.allowWorkspaceShell": "Autorisez-vous le lancement de {0} (défini comme paramètre d'espace de travail) dans le terminal ?", "allow": "Allow", "disallow": "Disallow" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json b/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json new file mode 100644 index 0000000000000..6183484b59cad --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Rechercher", + "placeholder.find": "Rechercher", + "label.previousMatchButton": "Correspondance précédente", + "label.nextMatchButton": "Correspondance suivante", + "label.closeButton": "Fermer" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json b/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json index e783aa11ec074..1129e824638a8 100644 --- a/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "terminal.integrated.copySelection.noSelection": "Impossible de copier la sélection du terminal quand il n'a pas le focus", "terminal.integrated.exitedWithCode": "Le processus du terminal s'est achevé avec le code de sortie {0}", "terminal.integrated.waitOnExit": "Appuyez sur une touche pour fermer le terminal", "terminal.integrated.launchFailed": "Échec du lancement de la commande de traitement du terminal '{0}{1}' (code de sortie : {2})" diff --git a/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json b/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json index 2ad01c5bf99a3..b80da36137f48 100644 --- a/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminalLinkHandler.followLinkAlt": "Alt + clic pour suivre le lien", "terminalLinkHandler.followLinkCmd": "Commande + clic pour suivre le lien", "terminalLinkHandler.followLinkCtrl": "Ctrl + clic pour suivre le lien" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json b/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json index 3108dfa33f287..7aeb29b6337f3 100644 --- a/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json @@ -7,5 +7,6 @@ "copy": "Copier", "createNewTerminal": "Nouveau terminal", "paste": "Coller", + "selectAll": "Tout Sélectionner", "clear": "Effacer" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index b7953670b20fb..ae4ba496061e0 100644 --- a/i18n/fra/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,13 +6,14 @@ { "selectTheme.label": "Thème de couleur", "installColorThemes": "Installer des thèmes de couleurs supplémentaires...", - "problemChangingTheme": "Problème de définition du thème : {0}", - "themes.selectTheme": "Sélectionner le thème de couleur", + "themes.selectTheme": "Sélectionner un thème de couleur (flèches bas/haut pour afficher l'aperçu)", "selectIconTheme.label": "Thème d'icône de fichier", "installIconThemes": "Installer des thèmes d'icônes de fichiers supplémentaires...", "noIconThemeLabel": "Aucun", "noIconThemeDesc": "Désactiver les icônes de fichiers", "problemChangingIconTheme": "Problème de définition du thème d'icône : {0}", "themes.selectIconTheme": "Sélectionner un thème d'icône de fichier", - "preferences": "Préférences" + "generateColorTheme.label": "Générer le thème de couleur à partir des paramètres actuels", + "preferences": "Préférences", + "developer": "Développeur" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/update/electron-browser/update.i18n.json b/i18n/fra/src/vs/workbench/parts/update/electron-browser/update.i18n.json index 641b395e494d6..796eccd6b6e3f 100644 --- a/i18n/fra/src/vs/workbench/parts/update/electron-browser/update.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/update/electron-browser/update.i18n.json @@ -13,7 +13,19 @@ "read the release notes": "Bienvenue dans {0} v{1} ! Voulez-vous lire les notes de publication ?", "licenseChanged": "Nos termes du contrat de licence ont changé. Prenez un instant pour les consulter.", "license": "Lire la licence", - "updateAvailable": "{0} sera mis à jour après avoir redémarré.", + "updateIsReady": "Nouvelle mise à jour disponible.", "thereIsUpdateAvailable": "Une mise à jour est disponible.", - "noUpdatesAvailable": "Aucune mise à jour n'est disponible actuellement." + "updateAvailable": "{0} sera mis à jour après avoir redémarré.", + "noUpdatesAvailable": "Aucune mise à jour n'est disponible actuellement.", + "commandPalette": "Palette de commandes...", + "settings": "Paramètres", + "keyboardShortcuts": "Raccourcis clavier", + "selectTheme.label": "Thème de couleur", + "themes.selectIconTheme.label": "Thème d'icône de fichier", + "not available": "Mises à jour non disponibles", + "checkingForUpdates": "Recherche des mises à jour...", + "DownloadUpdate": "Télécharger la mise à jour disponible", + "DownloadingUpdate": "Téléchargement de la mise à jour...", + "InstallingUpdate": "Installation de la mise à jour...", + "checkForUpdates": "Rechercher les mises à jour..." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/views/browser/views.i18n.json b/i18n/fra/src/vs/workbench/parts/views/browser/views.i18n.json new file mode 100644 index 0000000000000..4868e0b0e1194 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/views/browser/views.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewToolbarAriaLabel": "{0} actions" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json b/i18n/fra/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json new file mode 100644 index 0000000000000..792b28b26828d --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "les vues doivent figurer dans un tableau", + "requirestring": "la propriété '{0}' est obligatoire et doit être de type 'string'", + "optstring": "La propriété '{0}' peut être omise ou doit être de type 'string'", + "vscode.extension.contributes.view.id": "Identificateur de la vue. Utilisez-le pour inscrire un fournisseur de données au moyen de l'API 'vscode.window.registerTreeDataProviderForView', ainsi que pour déclencher l'activation de votre extension en inscrivant l'événement 'onView:${id}' dans 'activationEvents'.", + "vscode.extension.contributes.view.name": "Nom de la vue, contrôlable de visu. Affiché", + "vscode.extension.contributes.views": "Ajoute des vues à l'éditeur", + "views.explorer": "Mode Explorateur", + "locationId.invalid": "'{0}' n'est pas un emplacement de vue valide" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json b/i18n/fra/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json index e043f4c5dee54..e984041493565 100644 --- a/i18n/fra/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json @@ -14,10 +14,6 @@ "watermark.toggleTerminal": "Activer/désactiver le terminal", "watermark.findInFiles": "Chercher dans les fichiers", "watermark.startDebugging": "Démarrer le débogage", - "watermark.selectTheme": "Changer le thème", - "watermark.selectKeymap": "Modifier le mappage de clés", - "watermark.keybindingsReference": "Référence de clavier", - "watermark.openGlobalKeybindings": "Racco&&urcis clavier", "watermark.unboundCommand": "indépendant", "workbenchConfigurationTitle": "Banc d'essai", "tips.enabled": "Si cette option est activée, les conseils en filigrane s'affichent quand aucun éditeur n'est ouvert." diff --git a/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 2c738238b0dc4..97f83a61230f5 100644 --- a/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -11,33 +11,33 @@ "welcomePage.openFolder": "Ouvrir un dossier...", "welcomePage.cloneGitRepository": "Cloner le dépôt Git...", "welcomePage.recent": "Récent", + "welcomePage.moreRecent": "Plus...", "welcomePage.noRecentFolders": "Aucun dossier récent", "welcomePage.help": "Aide", - "welcomePage.productDocumentation": "Documentation du produit", + "welcomePage.keybindingsCheatsheet": "Fiche de révision du clavier imprimable", "welcomePage.introductoryVideos": "Vidéos d'introduction", + "welcomePage.productDocumentation": "Documentation du produit", "welcomePage.gitHubRepository": "Dépôt GitHub", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "Afficher la page d'accueil au démarrage", - "welcomePage.quickLinks": "Liens rapides", - "welcomePage.interactivePlayground": "Terrain de jeu interactif", - "welcomePage.interactivePlaygroundDescription": "Essayez les fonctionnalités essentielles de l'éditeur en suivant une brève procédure pas à pas", - "welcomePage.interfaceOverview": "Vue d'ensemble de l'interface", - "welcomePage.interfaceOverviewDescription": "Obtenez une superposition visuelle mettant en évidence les principaux composants de l'IU", + "welcomePage.customize": "Personnaliser", + "welcomePage.installExtensionPacks": "Outils et langages", + "welcomePage.installExtensionPacksDescription": "Installer un support pour {0} et {1}", + "welcomePage.moreExtensions": "plus", + "welcomePage.installKeymapDescription": "Installer les raccourcis clavier", + "welcomePage.installKeymapExtension": "Installer les raccourcis clavier de {0} et {1}", + "welcomePage.others": "autres", "welcomePage.colorTheme": "Thème de couleur", "welcomePage.colorThemeDescription": "Personnalisez l'apparence de l'éditeur et de votre code", + "welcomePage.learn": "Apprendre", + "welcomePage.showCommands": "Rechercher et exécuter toutes les commandes", + "welcomePage.interfaceOverview": "Vue d'ensemble de l'interface", + "welcomePage.interfaceOverviewDescription": "Obtenez une superposition visuelle mettant en évidence les principaux composants de l'IU", + "welcomePage.interactivePlayground": "Terrain de jeu interactif", + "welcomePage.interactivePlaygroundDescription": "Essayez les fonctionnalités essentielles de l'éditeur en suivant une brève procédure pas à pas", + "welcomePage.quickLinks": "Liens rapides", "welcomePage.keybindingsReference": "Référence des raccourcis clavier", "welcomePage.keybindingsReferenceDescription": "Fichier PDF imprimable avec les raccourcis clavier les plus usuels", - "welcomePage.showCommands": "Rechercher et exécuter toutes les commandes", - "welcomePage.showCommandsDescription": "Utilisez et recherchez rapidement des commandes dans le Panneau de configuration ({0})", "welcomePage.configureSettings": "Configurer les paramètres", - "welcomePage.configureSettingsDescription": "Déverrouillez toute la puissance de VS Code en adaptant les paramètres", - "welcomePage.installKeymapDescription": "Installer les raccourcis clavier", - "welcomePage.installKeymap": "Installez les raccourcis clavier de {0}, {1}, {2} et {3}", - "welcomePage.vim": "Vim", - "welcomePage.vimCurrent": "Vim (actuel)", - "welcomePage.sublime": "Sublime", - "welcomePage.sublimeCurrent": "Sublime (actuel)", - "welcomePage.atom": "Atom", - "welcomePage.atomCurrent": "Atom (actuel)", - "welcomePage.others": "autres" + "welcomePage.configureSettingsDescription": "Déverrouillez toute la puissance de VS Code en adaptant les paramètres" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json index 8cf53ce388ea5..779823155a79e 100644 --- a/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "workbenchConfigurationTitle": "Banc d'essai", - "welcomePage.enabled": "Quand cette option est activée, la page de bienvenue s'affiche au démarrage.", "help": "Aide" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 3d4de6c3ca3fa..7e1598eb34721 100644 --- a/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,11 +5,32 @@ // Do not edit this file. It is machine generated. { "welcomePage": "Bienvenue", - "welcome.title": "Bienvenue", + "welcomePage.javaScript": "JavaScript", + "welcomePage.typeScript": "TypeScript", + "welcomePage.python": "Python", + "welcomePage.php": "PHP", + "welcomePage.docker": "Docker", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", + "welcomePage.extensionPackAlreadyInstalled": "Le support pour {0} est déjà installé.", + "welcomePage.willReloadAfterInstallingExtensionPack": "La fenêtre se recharge après l'installation d'un support supplémentaire pour {0}.", + "welcomePage.installingExtensionPack": "Installation d'un support supplémentaire pour {0}...", + "welcomePage.extensionPackNotFound": "Le support pour {0} avec l'ID {1} est introuvable.", "welcomePage.keymapAlreadyInstalled": "Les raccourcis clavier {0} sont déjà installés.", "welcomePage.willReloadAfterInstallingKeymap": "La fenêtre se recharge après l'installation des raccourcis clavier {0}.", - "ok": "OK", "welcomePage.installingKeymap": "Installation des raccourcis clavier de {0}...", "welcomePage.keymapNotFound": "Les raccourcis clavier {0} ayant l'ID {1} sont introuvables.", - "cancel": "Annuler" + "welcome.title": "Bienvenue", + "welcomePage.openFolderWithPath": "Ouvrir le dossier {0} avec le chemin {1}", + "welcomePage.extensionListSeparator": ", ", + "welcomePage.installKeymap": "Installer le mappage de touches {0}", + "welcomePage.installExtensionPack": "Installer un support supplémentaire pour {0} ", + "welcomePage.installedKeymap": "Le mappage de touches '{0}' est déjà installé", + "welcomePage.installedExtensionPack": "Le support {0} est déjà installé.", + "ok": "OK", + "details": "Détails", + "cancel": "Annuler", + "welcomePage.buttonBackground": "Couleur d'arrière-plan des boutons de la page d'accueil.", + "welcomePage.buttonHoverBackground": "Couleur d'arrière-plan du pointage des boutons de la page d'accueil." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/fra/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json index 1b65f474a566f..4fd64e5f282e1 100644 --- a/i18n/fra/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "walkThrough.unboundCommand": "indépendant" + "walkThrough.unboundCommand": "indépendant", + "walkThrough.gitNotFound": "Git semble ne pas être installé sur votre système.", + "walkThrough.embeddedEditorBackground": "Couleur d'arrière-plan des éditeurs incorporés dans le terrain de jeu interactif." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/services/configuration/node/configuration.i18n.json b/i18n/fra/src/vs/workbench/services/configuration/node/configuration.i18n.json new file mode 100644 index 0000000000000..77c399f7d6669 --- /dev/null +++ b/i18n/fra/src/vs/workbench/services/configuration/node/configuration.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.configuration": "Ajoute des paramètres de configuration.", + "vscode.extension.contributes.configuration.title": "Résumé des paramètres. Cette étiquette va être utilisée dans le fichier de paramètres en tant que commentaire de séparation.", + "vscode.extension.contributes.configuration.properties": "Description des propriétés de configuration.", + "invalid.type": "s'il est défini, 'configuration.type' doit avoir la valeur 'object", + "invalid.title": "'configuration.title' doit être une chaîne", + "vscode.extension.contributes.defaultConfiguration": "Contribue aux paramètres de configuration d'éditeur par défaut en fonction du langage.", + "invalid.properties": "'configuration.properties' doit être un objet" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/fra/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index df367cb95ef5e..1e0860c2647e9 100644 --- a/i18n/fra/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/fra/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -4,6 +4,9 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "open": "Ouvrir les paramètres", + "close": "Fermer", + "saveAndRetry": "Enregistrer les paramètres et recommencer", "errorUnknownKey": "Impossible d'écrire dans le fichier de configuration (clé inconnue)", "errorInvalidTarget": "Impossible d'écrire dans le fichier config (cible non valide)", "errorNoWorkspaceOpened": "Impossible d'écrire les paramètres, car aucun dossier n'est ouvert. Ouvrez d'abord un dossier, puis réessayez.", diff --git a/i18n/fra/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json b/i18n/fra/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json new file mode 100644 index 0000000000000..42bafb09091ba --- /dev/null +++ b/i18n/fra/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Télémétrie", + "telemetry.enableCrashReporting": "Activez l'envoi de rapports d'incidents à Microsoft.\nCette option nécessite un redémarrage pour être prise en compte." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/fra/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index e70e749cfa810..bf5860ddc2621 100644 --- a/i18n/fra/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/fra/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -8,15 +8,11 @@ "requirestring": "la propriété '{0}' est obligatoire et doit être de type 'string'", "optstring": "La propriété '{0}' peut être omise ou doit être de type 'string'", "vscode.extension.contributes.keybindings.command": "Identificateur de la commande à exécuter quand la combinaison de touches est déclenchée.", - "vscode.extension.contributes.keybindings.key": "Touche ou séquence de touches (séparation des touches avec le signe plus et des séquences de touches avec un espace. Exemple : Ctrl+O et Ctrl+L L pour une pression simultanée", "vscode.extension.contributes.keybindings.mac": "Touche ou séquence de touches spécifique à Mac.", "vscode.extension.contributes.keybindings.linux": "Touche ou séquence de touches spécifique à Linux.", "vscode.extension.contributes.keybindings.win": "Touche ou séquence de touches spécifique à Windows.", "vscode.extension.contributes.keybindings.when": "Condition quand la touche est active.", "vscode.extension.contributes.keybindings": "Ajoute des combinaisons de touches.", - "openDocumentation": "En savoir plus", - "keybindingMigration.ok": "OK", - "keybindingMigration.prompt": "Certains raccourcis clavier ont changé pour votre disposition de clavier.", "invalid.keybindings": "'contributes.{0}' non valide : {1}", "unboundCommands": "Voici d'autres commandes disponibles : ", "keybindings.json.title": "Configuration des combinaisons de touches", diff --git a/i18n/fra/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json b/i18n/fra/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json index 2e136f33b535c..0a9b16d5e8b0d 100644 --- a/i18n/fra/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json +++ b/i18n/fra/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json @@ -4,6 +4,15 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "vscode.extension.contributes.languages": "Ajoute des déclarations de langage.", + "vscode.extension.contributes.languages.id": "ID du langage.", + "vscode.extension.contributes.languages.aliases": "Alias de nom du langage.", + "vscode.extension.contributes.languages.extensions": "Extensions de fichier associées au langage.", + "vscode.extension.contributes.languages.filenames": "Noms de fichiers associés au langage.", + "vscode.extension.contributes.languages.filenamePatterns": "Modèles Glob de noms de fichiers associés au langage.", + "vscode.extension.contributes.languages.mimetypes": "Types MIME associés au langue.", + "vscode.extension.contributes.languages.firstLine": "Expression régulière correspondant à la première ligne d'un fichier du langage.", + "vscode.extension.contributes.languages.configuration": "Chemin relatif d'un fichier contenant les options de configuration du langage.", "invalid": "'contributes.{0}' non valide. Tableau attendu.", "invalid.empty": "Valeur vide pour 'contributes.{0}'", "require.id": "la propriété '{0}' est obligatoire et doit être de type 'string'", diff --git a/i18n/fra/src/vs/workbench/services/progress/browser/progressService2.i18n.json b/i18n/fra/src/vs/workbench/services/progress/browser/progressService2.i18n.json new file mode 100644 index 0000000000000..541b82ff55a2e --- /dev/null +++ b/i18n/fra/src/vs/workbench/services/progress/browser/progressService2.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "progress.text": "{0} - {1}", + "progress.title": "{0} : {1}" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json b/i18n/fra/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json new file mode 100644 index 0000000000000..a18ac142a7e2c --- /dev/null +++ b/i18n/fra/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.grammars": "Ajoute des générateurs de jetons TextMate.", + "vscode.extension.contributes.grammars.language": "Identificateur de langue pour lequel cette syntaxe est ajoutée.", + "vscode.extension.contributes.grammars.scopeName": "Nom de portée TextMate utilisé par le fichier tmLanguage.", + "vscode.extension.contributes.grammars.path": "Chemin du fichier tmLanguage. Le chemin est relatif au dossier d'extensions et commence généralement par './syntaxes/'.", + "vscode.extension.contributes.grammars.embeddedLanguages": "Mappage du nom de portée à l'ID de langage si cette grammaire contient des langages incorporés.", + "vscode.extension.contributes.grammars.injectTo": "Liste de noms des portées de langage auxquelles cette grammaire est injectée." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json b/i18n/fra/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json new file mode 100644 index 0000000000000..61da2f152d088 --- /dev/null +++ b/i18n/fra/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid.language": "Langage inconnu dans 'contributes.{0}.language'. Valeur fournie : {1}", + "invalid.scopeName": "Chaîne attendue dans 'contributes.{0}.scopeName'. Valeur fournie : {1}", + "invalid.path.0": "Chaîne attendue dans 'contributes.{0}.path'. Valeur fournie : {1}", + "invalid.injectTo": "Valeur non valide dans 'contributes.{0}.injectTo'. Il doit s'agir d'un tableau de noms de portées de langage. Valeur fournie : {1}", + "invalid.embeddedLanguages": "Valeur non valide dans 'contributes.{0}.embeddedLanguages'. Il doit s'agir d'un mappage d'objets entre le nom de portée et le langage. Valeur fournie : {1}", + "invalid.path.1": "'contributes.{0}.path' ({1}) est censé être inclus dans le dossier ({2}) de l'extension. Cela risque de rendre l'extension non portable.", + "no-tm-grammar": "Aucune grammaire TM n'est inscrite pour ce langage." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json b/i18n/fra/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json index d48cbf383ce4a..2eb4254690560 100644 --- a/i18n/fra/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json +++ b/i18n/fra/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json @@ -6,5 +6,6 @@ { "schema.colors": "Couleurs de la coloration syntaxique", "schema.properties.name": "Description de la règle", - "schema.fontStyle": "Style de police de la règle : 'italique', 'gras' ou 'souligné', ou une combinaison de ces styles" + "schema.fontStyle": "Style de police de la règle : 'italique', 'gras' ou 'souligné', ou une combinaison de ces styles", + "schema.tokenColors.path": "Chemin d'un fichier tmTheme (relatif au fichier actuel)" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/fra/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json index 7bc684ce1fb5e..2d6a6848e2769 100644 --- a/i18n/fra/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json +++ b/i18n/fra/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -5,8 +5,9 @@ // Do not edit this file. It is machine generated. { "error.cannotparsejson": "Problèmes durant l'analyse du fichier de thème JSON : {0}", - "error.invalidformat": "Problème durant l'analyse du fichier de thème JSON : {0}. 'tokenColors' et 'colors' attendus.", - "error.plist.invalidformat": "Problème durant l'analyse du fichier de thème : {0}. 'settings' n'est pas un tableau.", - "error.cannotparse": "Problèmes durant l'analyse du fichier de thème : {0}", - "error.cannotload": "Problèmes durant le chargement du fichier de thème {0} : {1}" + "error.invalidformat.colors": "Problème pendant l'analyse du fichier de thème de couleur : {0}. La propriété 'colors' n'est pas de type 'object'.", + "error.invalidformat.tokenColors": "Problème pendant l'analyse du fichier de thème de couleur : {0}. La propriété 'tokenColors' doit être un tableau spécifiant des couleurs ou le chemin d'un fichier de thème TextMate", + "error.plist.invalidformat": "Problème pendant l'analyse du fichier tmTheme : {0}. 'settings' n'est pas un tableau.", + "error.cannotparse": "Problèmes pendant l'analyse du fichier tmTheme : {0}", + "error.cannotload": "Problèmes pendant le chargement du fichier tmTheme {0} : {1}" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/fra/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index 412a961a7e863..49cf0bb1ef735 100644 --- a/i18n/fra/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/fra/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -23,8 +23,9 @@ "error.cannotparseicontheme": "Problems parsing file icons file: {0}", "colorTheme": "Specifies the color theme used in the workbench.", "colorThemeError": "Theme is unknown or not installed.", - "iconTheme": "Specifies the icon theme used in the workbench.", "noIconThemeDesc": "No file icons", "iconThemeError": "File icon theme is unknown or not installed.", - "workbenchColors": "Remplace les couleurs du thème de couleurs actuellement sélectionné. Ce paramètre est expérimental, et les noms des couleurs seront différents dans la prochaine version." + "workbenchColors": "Remplace les couleurs du thème de couleur sélectionné.", + "workbenchColors.deprecated": "Le paramètre n'est plus expérimental et a été renommé 'workbench.colorCustomizations'", + "workbenchColors.deprecatedDescription": "Utiliser 'workbench.colorCustomizations' à la place" } \ No newline at end of file diff --git a/i18n/hun/extensions/configuration-editing/out/extension.i18n.json b/i18n/hun/extensions/configuration-editing/out/extension.i18n.json new file mode 100644 index 0000000000000..480e87c48984a --- /dev/null +++ b/i18n/hun/extensions/configuration-editing/out/extension.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "exampleExtension": "Példa" +} \ No newline at end of file diff --git a/i18n/hun/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json b/i18n/hun/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json new file mode 100644 index 0000000000000..73e2b227f47a2 --- /dev/null +++ b/i18n/hun/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json @@ -0,0 +1,38 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "activeEditorShort": "pl.: myFile.txt", + "activeEditorMedium": "pl.: myFolder/myFile.txt", + "activeEditorLong": "pl.: /Users/Development/myProject/myFolder/myFile.txt", + "rootName": "pl.: myFolder1, myFolder2, myFolder3", + "rootPath": "pl.: /Users/Development/myProject", + "folderName": "pl.: myFolder", + "folderPath": "pl.: /Users/Development/myProject", + "appName": "pl.: VS Code", + "dirty": "módosításjelző, ami akkor jelenik meg, ha az aktív szerkesztőablak tartalma módosítva lett", + "separator": "egy feltételes elválasztó (' - '), ami akkor jelenik meg, ha olyan változókkal van körülvéve, amelyeknek van értéke", + "assocLabelFile": "Fájlok kiterjesztésekkel", + "assocDescriptionFile": "A megadott azonosítójú nyelvhez tartozó glob mintának megfelelő fájlok feltérképezése.", + "assocLabelPath": "Fájlok elérési úttal", + "assocDescriptionPath": "A megadott azonosítójú nyelvhez tartozó abszolút elérési utas glob mintának megfelelő fájlok feltérképezése.", + "fileLabel": "Fájlok kiterjesztés szerint", + "fileDescription": "Adott kiterjesztéssel rendelkező fájlok keresése.", + "filesLabel": "Fájlok több kiterjesztés szerint", + "filesDescription": "A megadott kiterjesztések bármelyikével rendelkező fájlok keresése.", + "derivedLabel": "Testvérekkel rendelkező fájlok név szerint", + "derivedDescription": "Olyan fájlok keresése, amelyek azonos nevű, de különböző kiterjesztésű testvérekkel rendelkeznek.", + "topFolderLabel": "Mappák név szerint (legfelső szinten)", + "topFolderDescription": "Adott névvel rendelkező, legfelső szintű mappák keresése", + "topFoldersLabel": "Fájlok több név szerint (legfelső szinten)", + "topFoldersDescription": "Több legfelső szintű mappa keresése.", + "folderLabel": "Mappa név szerint (bármely helyen)", + "folderDescription": "Adott névvel rendelkező mappa keresése helytől függetlenül.", + "falseDescription": "A minta letiltása.", + "trueDescription": "A minta engedélyezése.", + "siblingsDescription": "Olyan fájlok keresése, amelyek azonos nevű, de különböző kiterjesztésű testvérekkel rendelkeznek.", + "languageSpecificEditorSettings": "Nyelvspecifikus szerkesztőbeállítások", + "languageSpecificEditorSettingsDescription": "A szerkesztő beállításainak felülírása az adott nyelvre vonatkozóan" +} \ No newline at end of file diff --git a/i18n/hun/extensions/css/client/out/cssMain.i18n.json b/i18n/hun/extensions/css/client/out/cssMain.i18n.json new file mode 100644 index 0000000000000..ded2c0dd4761a --- /dev/null +++ b/i18n/hun/extensions/css/client/out/cssMain.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "cssserver.name": "CSS nyelvi szerver" +} \ No newline at end of file diff --git a/i18n/hun/extensions/css/package.i18n.json b/i18n/hun/extensions/css/package.i18n.json new file mode 100644 index 0000000000000..5f6b8a4014be0 --- /dev/null +++ b/i18n/hun/extensions/css/package.i18n.json @@ -0,0 +1,67 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "css.lint.argumentsInColorFunction.desc": "Nem megfelelő számú paraméter", + "css.lint.boxModel.desc": "A width és a height tulajdonság kerülése a padding és a border tulajdonság használata esetén", + "css.lint.compatibleVendorPrefixes.desc": "Gyártóspecifikus előtag használata esetén minden más gyártóspecifikus tulajdonságot is meg kell adni", + "css.lint.duplicateProperties.desc": "Duplikált stílusdefiníciók kerülése", + "css.lint.emptyRules.desc": "Üres szabályhalmazok kerülése", + "css.lint.float.desc": "A float tulajdonságérték kerülése, mivel könnyen váratlan eredményt idézhet elő az elrendezés változásakor.", + "css.lint.fontFaceProperties.desc": "A @font-face szabályokban az src és a font-family tulajdonságot is definiálni kell", + "css.lint.hexColorLength.desc": "A hexadecimális formában megadott színeknek három vagy hat hexadecimális számjegyből kell állniuk", + "css.lint.idSelector.desc": "A szelektorok nem tartalmazhatnak azonosítókat, mivel az ilyen szabályok túl szorosan kötődnek a HTML-hez.", + "css.lint.ieHack.desc": "Az IE hangolása csak az IE7 vagy régebbi verziók támogatása esetén szükséges", + "css.lint.important.desc": "Az !important attribútum mellőzése. Az attribútum jelenléte arra utal, hogy a CSS-struktúra átláthatatlanná vált, és refaktorálásra szorul.", + "css.lint.importStatement.desc": "Ne töltődjenek párhuzamosan az importálási utasítások", + "css.lint.propertyIgnoredDueToDisplay.desc": "A megjelenítési mód miatt a megjelenítőkomponensek nem fogják figyelembe venni a tulajdonságot. Ha például a display tulajdonság értéke inline, akkor a megjelenítők figyelmen kívül hagyják a width, a height, a margin-top, a margin-bottom és a float tulajdonságot.", + "css.lint.universalSelector.desc": "Az univerzális szelektor (*) lassú működést eredményez", + "css.lint.unknownProperties.desc": "Ismeretlen tulajdonság.", + "css.lint.unknownVendorSpecificProperties.desc": "Ismeretlen gyártóspecifikus tulajdonság.", + "css.lint.vendorPrefix.desc": "Gyártóspecifikus előtagok használata esetén az adott tulajdonság szabványos változatát is meg kell adni", + "css.lint.zeroUnits.desc": "A 0 értékhez nem szükséges mértékegység", + "css.validate.desc": "Összes validálás engedélyezése vagy letiltása", + "less.lint.argumentsInColorFunction.desc": "Nem megfelelő számú paraméter", + "less.lint.boxModel.desc": "A width és a height tulajdonság kerülése a padding és a border tulajdonság használata esetén", + "less.lint.compatibleVendorPrefixes.desc": "Gyártóspecifikus előtag használata esetén minden más gyártóspecifikus tulajdonságot is meg kell adni", + "less.lint.duplicateProperties.desc": "Duplikált stílusdefiníciók kerülése", + "less.lint.emptyRules.desc": "Üres szabályhalmazok kerülése", + "less.lint.float.desc": "A float tulajdonságérték kerülése, mivel könnyen váratlan eredményt idézhet elő az elrendezés változásakor.", + "less.lint.fontFaceProperties.desc": "A @font-face szabályokban az src és a font-family tulajdonságot is definiálni kell", + "less.lint.hexColorLength.desc": "A hexadecimális formában megadott színeknek három vagy hat hexadecimális számjegyből kell állniuk", + "less.lint.idSelector.desc": "A szelektorok nem tartalmazhatnak azonosítókat, mivel az ilyen szabályok túl szorosan kötődnek a HTML-hez.", + "less.lint.ieHack.desc": "Az IE hangolása csak az IE7 vagy régebbi verziók támogatása esetén szükséges", + "less.lint.important.desc": "Az !important attribútum mellőzése. Az attribútum jelenléte arra utal, hogy a CSS-struktúra átláthatatlanná vált, és refaktorálásra szorul.", + "less.lint.importStatement.desc": "Ne töltődjenek párhuzamosan az importálási utasítások", + "less.lint.propertyIgnoredDueToDisplay.desc": "A megjelenítési mód miatt a megjelenítőkomponensek nem fogják figyelembe venni a tulajdonságot. Ha például a display tulajdonság értéke inline, akkor a megjelenítők figyelmen kívül hagyják a width, a height, a margin-top, a margin-bottom és a float tulajdonságot.", + "less.lint.universalSelector.desc": "Az univerzális szelektor (*) lassú működést eredményez", + "less.lint.unknownProperties.desc": "Ismeretlen tulajdonság.", + "less.lint.unknownVendorSpecificProperties.desc": "Ismeretlen gyártóspecifikus tulajdonság.", + "less.lint.vendorPrefix.desc": "Gyártóspecifikus előtagok használata esetén az adott tulajdonság szabványos változatát is meg kell adni", + "less.lint.zeroUnits.desc": "A 0 értékhez nem szükséges mértékegység", + "less.validate.desc": "Összes validálás engedélyezése vagy letiltása", + "scss.lint.argumentsInColorFunction.desc": "Nem megfelelő számú paraméter", + "scss.lint.boxModel.desc": "A width és a height tulajdonság kerülése a padding és a border tulajdonság használata esetén", + "scss.lint.compatibleVendorPrefixes.desc": "Gyártóspecifikus előtag használata esetén minden más gyártóspecifikus tulajdonságot is meg kell adni", + "scss.lint.duplicateProperties.desc": "Duplikált stílusdefiníciók kerülése", + "scss.lint.emptyRules.desc": "Üres szabályhalmazok kerülése", + "scss.lint.float.desc": "A float tulajdonságérték kerülése, mivel könnyen váratlan eredményt idézhet elő az elrendezés változásakor.", + "scss.lint.fontFaceProperties.desc": "A @font-face szabályokban az src és a font-family tulajdonságot is definiálni kell", + "scss.lint.hexColorLength.desc": "A hexadecimális formában megadott színeknek három vagy hat hexadecimális számjegyből kell állniuk", + "scss.lint.idSelector.desc": "A szelektorok nem tartalmazhatnak azonosítókat, mivel az ilyen szabályok túl szorosan kötődnek a HTML-hez.", + "scss.lint.ieHack.desc": "Az IE hangolása csak az IE7 vagy régebbi verziók támogatása esetén szükséges", + "scss.lint.important.desc": "Az !important attribútum mellőzése. Az attribútum jelenléte arra utal, hogy a CSS-struktúra átláthatatlanná vált, és refaktorálásra szorul.", + "scss.lint.importStatement.desc": "Ne töltődjenek párhuzamosan az importálási utasítások", + "scss.lint.propertyIgnoredDueToDisplay.desc": "A megjelenítési mód miatt a megjelenítőkomponensek nem fogják figyelembe venni a tulajdonságot. Ha például a display tulajdonság értéke inline, akkor a megjelenítők figyelmen kívül hagyják a width, a height, a margin-top, a margin-bottom és a float tulajdonságot.", + "scss.lint.universalSelector.desc": "Az univerzális szelektor (*) lassú működést eredményez", + "scss.lint.unknownProperties.desc": "Ismeretlen tulajdonság.", + "scss.lint.unknownVendorSpecificProperties.desc": "Ismeretlen gyártóspecifikus tulajdonság.", + "scss.lint.vendorPrefix.desc": "Gyártóspecifikus előtagok használata esetén az adott tulajdonság szabványos változatát is meg kell adni", + "scss.lint.zeroUnits.desc": "A 0 értékhez nem szükséges mértékegység", + "scss.validate.desc": "Összes validálás engedélyezése vagy letiltása", + "less.colorDecorators.enable.desc": "Színdekorátorok engedélyezése vagy letiltása", + "scss.colorDecorators.enable.desc": "Színdekorátorok engedélyezése vagy letiltása", + "css.colorDecorators.enable.desc": "Színdekorátorok engedélyezése vagy letiltása" +} \ No newline at end of file diff --git a/i18n/hun/extensions/extension-editing/out/extensionLinter.i18n.json b/i18n/hun/extensions/extension-editing/out/extensionLinter.i18n.json new file mode 100644 index 0000000000000..928d3ddceca28 --- /dev/null +++ b/i18n/hun/extensions/extension-editing/out/extensionLinter.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "httpsRequired": "A képek csak HTTPS-protokollt használhatnak.", + "svgsNotValid": "Az SVG-k nem érvényes képforrások.", + "embeddedSvgsNotValid": "A beágyazott SVG-k nem érvényes képforrások.", + "dataUrlsNotValid": "A data URL-ek nem érvényes képforrások.", + "relativeUrlRequiresHttpsRepository": "A relatív kép URL-ekhez egy HTTPS-protokollal rendelkező forráskódtárat kell megadni a package.json-ban." +} \ No newline at end of file diff --git a/i18n/hun/extensions/extension-editing/out/packageDocumentHelper.i18n.json b/i18n/hun/extensions/extension-editing/out/packageDocumentHelper.i18n.json new file mode 100644 index 0000000000000..12ff7e4eb5a04 --- /dev/null +++ b/i18n/hun/extensions/extension-editing/out/packageDocumentHelper.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "languageSpecificEditorSettings": "Nyelvspecifikus szerkesztőbeállítások", + "languageSpecificEditorSettingsDescription": "A szerkesztő beállításainak felülírása az adott nyelvre vonatkozóan" +} \ No newline at end of file diff --git a/i18n/hun/extensions/git/out/askpass-main.i18n.json b/i18n/hun/extensions/git/out/askpass-main.i18n.json new file mode 100644 index 0000000000000..f81c61e88da5c --- /dev/null +++ b/i18n/hun/extensions/git/out/askpass-main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "missOrInvalid": "Hiányzó vagy érvénytelen hitelesítési adatok." +} \ No newline at end of file diff --git a/i18n/hun/extensions/git/out/commands.i18n.json b/i18n/hun/extensions/git/out/commands.i18n.json new file mode 100644 index 0000000000000..c1c3a7978addc --- /dev/null +++ b/i18n/hun/extensions/git/out/commands.i18n.json @@ -0,0 +1,51 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tag at": "Címke, a következőre mutat: {0}", + "remote branch at": "Távoli ág, a következőre mutat: {0}", + "repourl": "Forráskódtár URL-címe", + "parent": "Szülőkönyvtár", + "cloning": "Git-forráskódtár klónozása...", + "openrepo": "Forráskódtár megnyitása", + "proposeopen": "Szeretné megnyitni a klónozott forráskódtárat?", + "HEAD not available": "A(z) '{0}' HEAD-verziója nem elérhető.", + "confirm revert": "Visszaállítja a kijelölt módosításokat a következő helyen: {0}?", + "revert": "Módosítások visszaállítása", + "confirm discard": "Elveti a módosításokat a következő helyen: {0}?", + "confirm discard multiple": "Elveti {0} fájl módosításait?", + "discard": "Módosítások elvetése", + "confirm discard all": "Elveti az ÖSSZES módosítást? A művelet NEM VONHATÓ VISSZA!", + "discardAll": "ÖSSZES módosítás elvetése", + "no staged changes": "Nincs beadáshoz (commithoz) előjegyzett módosítás. Szeretné automatikusan előjegyeztetni a módosításokat és közvetlenül beadni őket?", + "yes": "Igen", + "always": "Mindig", + "no changes": "Nincs beadandó módosítás.", + "commit message": "Beadási (commit) üzenet", + "provide commit message": "Adja meg a beadási (commit) üzenetet", + "select a ref to checkout": "Válassza ki a refet a checkouthoz", + "branch name": "Ág neve", + "provide branch name": "Adja meg az ág nevét", + "select branch to delete": "Válassza ki a törlendő ágat", + "confirm force delete branch": "A(z) '{0}' ág nincs teljesen beolvasztva. Mégis törli?", + "delete branch": "Ág törlése", + "select a branch to merge from": "Válassza ki az ágat, amit olvasztani szeretne", + "merge conflicts": "Összeolvasztási konfliktusok keletkeztek. Oldja fel őket a beadás (commit) előtt!", + "no remotes to pull": "A forráskódtárhoz nincsenek távoli szerverek konfigurálva, ahonnan pullozni lehetne.", + "pick remote pull repo": "Válassza ki a távoli szervert, ahonnan pullozni szeretné az ágat", + "no remotes to push": "A forráskódtárhoz nincsenek távoli szerverek konfigurálva, ahová pusholni lehetne.", + "nobranch": "Válasszon egy ágat a távoli szerverre való pusholáshot!", + "pick remote": "Válassza ki a távoli szervert, ahová publikálni szeretné a(z) '{0}' ágat:", + "sync is unpredictable": "Ez a művelet pusholja és pullozza a commitokat a következő helyről: '{0}'.", + "ok": "OK", + "never again": "Rendben, ne jelenítse meg újra", + "no remotes to publish": "A forráskódtárhoz nincsenek távoli szerverek konfigurálva, ahová publikálni lehetne.", + "disabled": "A git le van tiltva vagy nem támogatott ezen a munkaterületen", + "clean repo": "Takarítsa ki a forráskódtár munkafáját, mielőtt checkoutolna!", + "cant push": "Nem lehet pusholni a távoli szerverre. Futtassa a 'Pull' parancsot a módosításai integrálásához!", + "git error details": "Git: {0}", + "git error": "Git-hiba", + "open git log": "Git-napló megnyitása" +} \ No newline at end of file diff --git a/i18n/hun/extensions/git/out/main.i18n.json b/i18n/hun/extensions/git/out/main.i18n.json new file mode 100644 index 0000000000000..914f704e3d8c9 --- /dev/null +++ b/i18n/hun/extensions/git/out/main.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "using git": "Git {0} használata a következő helyről: {1}", + "updateGit": "Git frissítése", + "neverShowAgain": "Ne jelenjen meg újra", + "git20": "Úgy tűnik, hogy a git {0} van telepítve. A Code a git >= 2 verzióival működik együtt a legjobban." +} \ No newline at end of file diff --git a/i18n/hun/extensions/git/out/model.i18n.json b/i18n/hun/extensions/git/out/model.i18n.json new file mode 100644 index 0000000000000..3744b7c2b5977 --- /dev/null +++ b/i18n/hun/extensions/git/out/model.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "open": "Megnyitás", + "merge changes": "Módosítások összeolvasztása", + "staged changes": "Beadásra előjegyzett módosítások", + "changes": "Módosítások", + "ok": "OK", + "neveragain": "Soha ne jelenítse meg újra", + "huge": "A(z) '{0}' forráskódtárban túl sok aktív módosítás van. A Git-funkciók csak egy része lesz engedélyezve." +} \ No newline at end of file diff --git a/i18n/hun/extensions/git/out/scmProvider.i18n.json b/i18n/hun/extensions/git/out/scmProvider.i18n.json new file mode 100644 index 0000000000000..7fded37328a95 --- /dev/null +++ b/i18n/hun/extensions/git/out/scmProvider.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "commit": "Commit" +} \ No newline at end of file diff --git a/i18n/hun/extensions/git/out/statusbar.i18n.json b/i18n/hun/extensions/git/out/statusbar.i18n.json new file mode 100644 index 0000000000000..9312f343102a6 --- /dev/null +++ b/i18n/hun/extensions/git/out/statusbar.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "checkout": "Checkout...", + "sync changes": "Módosítások szinkronizálása", + "publish changes": "Módosítások publikálása", + "syncing changes": "Módosítások szinkronizálása..." +} \ No newline at end of file diff --git a/i18n/hun/extensions/git/package.i18n.json b/i18n/hun/extensions/git/package.i18n.json new file mode 100644 index 0000000000000..9495998160638 --- /dev/null +++ b/i18n/hun/extensions/git/package.i18n.json @@ -0,0 +1,53 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "command.clone": "Klónozás", + "command.init": "Forráskódtár előkészítése", + "command.refresh": "Frissítés", + "command.openChange": "Módosítások megnyitása", + "command.openFile": "Fájl megnyitása", + "command.openHEADFile": "Fájl megnyitása (HEAD)", + "command.stage": "Módosítások előjegyzése beadásra", + "command.stageAll": "Összes módosítás előjegyzése beadásra", + "command.stageSelectedRanges": "Kijelölt területek előjegyzése beadásra", + "command.revertSelectedRanges": "Kijelölt területek visszaállítása", + "command.unstage": "Módosítások előjegyzésének törlése", + "command.unstageAll": "Minden módosítás előjegyzésének törlése", + "command.unstageSelectedRanges": "Kijelölt területek előjegyzésének törlése", + "command.clean": "Módosítások elvetése", + "command.cleanAll": "Összes módosítás elvetése", + "command.commit": "Commit", + "command.commitStaged": "Előjegyzettek beadása (commit)", + "command.commitStagedSigned": "Előjegyzettek beadása (commit) aláírással", + "command.commitAll": "Összes beadása (commit)", + "command.commitAllSigned": "Összes beadása (commit) aláírással", + "command.undoCommit": "Legutolsó beadás (commit) visszavonása", + "command.checkout": "Checkout adott helyre...", + "command.branch": "Ág létrehozása...", + "command.deleteBranch": "Új ág létrehozása", + "command.merge": "Ág beolvasztása...", + "command.pull": "Pull", + "command.pullRebase": "Pull (Rebase)", + "command.pullFrom": "Pullozás...", + "command.push": "Push", + "command.pushTo": "Push adott helyre...", + "command.sync": "Szinkronizálás", + "command.publish": "Ág publikálása", + "command.showOutput": "Git-kimenet megjelenítése", + "command.ignore": "Fájl hozzáadása a .gitignore-hoz", + "config.enabled": "Meghatározza, hogy a git engedélyezve van-e", + "config.path": "A git végrehajtható fájl elérési útja", + "config.autorefresh": "Meghatározza, hogy engedélyezve van-e az automatikus frissítés", + "config.autofetch": "Meghatározza, hogy engedélyezve van-e az automatikus lekérés", + "config.enableLongCommitWarning": "Figyelmeztessen-e az alkalmazás hosszú beadási üzenet esetén", + "config.confirmSync": "Megerősítés kérése git forráskódtárak szinkronizálása előtt", + "config.countBadge": "Meghatározza a git jelvényen megjelenő számláló működését. Az `all` minden módosítást számol, a `tracked` csak a követkett változtatásokat. Az `off` kikapcsolja a jelvényt.", + "config.checkoutType": "Meghatározza, hogy milyen típusú ágak jelenjenek meg a `Checkout adott helyről... ` parancs futtatása esetén. Az `all` esetén az összes ref megjelenik, `local` esetén csak a helyi ágak, `tags` esetén csak a címkék, `remote` esetén pedig csak a távoli ágak.", + "config.ignoreLegacyWarning": "Régi gittel kapcsolatos figyelmeztetés figyelmen kívül hagyása", + "config.ignoreLimitWarning": "Túl sok módosítás esetén megjelenő figyelmeztetés figyelmen kívül hagyása", + "config.defaultCloneDirectory": "Git-forráskódtárak klónozásának alapértelmezett helye.", + "config.enableSmartCommit": "Összes módosítás beadása (commit), ha nincsenek előjegyzett módosítások." +} \ No newline at end of file diff --git a/i18n/hun/extensions/grunt/out/main.i18n.json b/i18n/hun/extensions/grunt/out/main.i18n.json new file mode 100644 index 0000000000000..9c9746663158b --- /dev/null +++ b/i18n/hun/extensions/grunt/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "A Grunt automatikus felderítése nem sikerült a következő hiba miatt: {0}" +} \ No newline at end of file diff --git a/i18n/hun/extensions/grunt/package.i18n.json b/i18n/hun/extensions/grunt/package.i18n.json new file mode 100644 index 0000000000000..9888b20bc6a5f --- /dev/null +++ b/i18n/hun/extensions/grunt/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.grunt.autoDetect": "Meghatározza, hogy a Grunt feladatok automatikus felderításe be van-e kapcsolva. A beállítás alapértelmezetten aktív." +} \ No newline at end of file diff --git a/i18n/hun/extensions/gulp/out/main.i18n.json b/i18n/hun/extensions/gulp/out/main.i18n.json new file mode 100644 index 0000000000000..8c8ac9db0317f --- /dev/null +++ b/i18n/hun/extensions/gulp/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "A gulp automatikus felderítése nem sikerült a következő hiba miatt: {0}" +} \ No newline at end of file diff --git a/i18n/hun/extensions/gulp/package.i18n.json b/i18n/hun/extensions/gulp/package.i18n.json new file mode 100644 index 0000000000000..ecaab76d9c785 --- /dev/null +++ b/i18n/hun/extensions/gulp/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.gulp.autoDetect": "Meghatározza, hogy a Gulp feladatok automatikus felderításe be van-e kapcsolva. A beállítás alapértelmezetten aktív." +} \ No newline at end of file diff --git a/i18n/hun/extensions/html/client/out/htmlMain.i18n.json b/i18n/hun/extensions/html/client/out/htmlMain.i18n.json new file mode 100644 index 0000000000000..3aff5dce6a06a --- /dev/null +++ b/i18n/hun/extensions/html/client/out/htmlMain.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "htmlserver.name": "HTML nyelvi szerver" +} \ No newline at end of file diff --git a/i18n/hun/extensions/html/package.i18n.json b/i18n/hun/extensions/html/package.i18n.json new file mode 100644 index 0000000000000..1eea9c9eee661 --- /dev/null +++ b/i18n/hun/extensions/html/package.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "html.format.enable.desc": "Alapértelmezett HTML-formázó engedélyezése vagy letiltása (újraindítást igényel)", + "html.format.wrapLineLength.desc": "Maximális karakterszám soronként (0 = letiltás)", + "html.format.unformatted.desc": "Azon elemek vesszővel elválasztott listája, melyek ne legyenek újraformázva. 'null' érték esetén a https://www.w3.org/TR/html5/dom.html#phrasing-content oldalon listázott elemek lesznek használva.", + "html.format.contentUnformatted.desc": "Azon elemek vesszővel elválasztott listája, melyek ne legyenek újraformázva. 'null' érték esetén a 'pre' tag lesz használva.", + "html.format.indentInnerHtml.desc": "- és -szakaszok indentálása.", + "html.format.preserveNewLines.desc": "Az elemek előtt lévő sortörések meg legyenek-e hagyva. Csak elemek előtt működik, elemek belsejében vagy szövegben nem.", + "html.format.maxPreserveNewLines.desc": "Az egymás után megőrzött sortörések maximális száma. Ha nem szeretné korlátozni, használja a 'null' értéket!", + "html.format.indentHandlebars.desc": "{{#foo}} és {{/foo}} formázása és indentálása.", + "html.format.endWithNewline.desc": "Lezárás új sorral.", + "html.format.extraLiners.desc": "Azon elemek veszővel elválasztott listája, amelyek előtt lennie kell egy extra új sornak. 'null' érték esetén a \"head,body,/html\" érték van használva.", + "html.format.wrapAttributes.desc": "Attribútumok tördelése.", + "html.format.wrapAttributes.auto": "Az attribútumok csak akkor vannak tördelve, ha a sorhossz túl lett lépve.", + "html.format.wrapAttributes.force": "Minden egyes attribútum tördelve van, kivéve az elsőt.", + "html.format.wrapAttributes.forcealign": "Minden egyes attribútum tördelve van, kivéve az elsőt, és igazítva vannak.", + "html.format.wrapAttributes.forcemultiline": "Minden egyes attribútum tördelve van.", + "html.suggest.angular1.desc": "Meghatározza, hogy a beépített HTML nyelvi támogatás ajánl-e Angular V1 elemeket és tulajdonságokat.", + "html.suggest.ionic.desc": "Meghatározza, hogy a beépített HTML nyelvi támogatás ajánl-e Ionic elemeket, tulajdonságokat és értékeket.", + "html.suggest.html5.desc": "Meghatározza, hogy a beépített HTML nyelvi támogatás ajánl-e HTML5-ös elemeket, tulajdonságokat és értékeket.", + "html.validate.scripts": "Meghatározza, hogy a beépített HTML nyelvi támogatás validálja-e a beágyazott parancsafájlokat.", + "html.validate.styles": "Meghatározza, hogy a beépített HTML nyelvi támogatás validálja-e a beágyazott stílusfájlokat." +} \ No newline at end of file diff --git a/i18n/hun/extensions/jake/out/main.i18n.json b/i18n/hun/extensions/jake/out/main.i18n.json new file mode 100644 index 0000000000000..c73ae9cac7e91 --- /dev/null +++ b/i18n/hun/extensions/jake/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "A Jake automatikus felderítése nem sikerült a következő hiba miatt: {0}" +} \ No newline at end of file diff --git a/i18n/hun/extensions/jake/package.i18n.json b/i18n/hun/extensions/jake/package.i18n.json new file mode 100644 index 0000000000000..4ac74e50f940f --- /dev/null +++ b/i18n/hun/extensions/jake/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.jake.autoDetect": "Meghatározza, hogy a Jake-feladatok automatikus felderításe be van-e kapcsolva. A beállítás alapértelmezetten aktív." +} \ No newline at end of file diff --git a/i18n/hun/extensions/javascript/out/features/bowerJSONContribution.i18n.json b/i18n/hun/extensions/javascript/out/features/bowerJSONContribution.i18n.json new file mode 100644 index 0000000000000..c1e4df9ef0141 --- /dev/null +++ b/i18n/hun/extensions/javascript/out/features/bowerJSONContribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "json.bower.default": "Alapértelmezett bower.json", + "json.bower.error.repoaccess": "A bower-adattár lekérdezése nem sikerült: {0}", + "json.bower.latest.version": "legutóbbi" +} \ No newline at end of file diff --git a/i18n/hun/extensions/javascript/out/features/packageJSONContribution.i18n.json b/i18n/hun/extensions/javascript/out/features/packageJSONContribution.i18n.json new file mode 100644 index 0000000000000..364a0ae2d172f --- /dev/null +++ b/i18n/hun/extensions/javascript/out/features/packageJSONContribution.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "json.package.default": "Alapértelmezett package.json", + "json.npm.error.repoaccess": "Az NPM-adattár lekérdezése nem sikerült: {0}", + "json.npm.latestversion": "A csomag jelenlegi legújabb verziója", + "json.npm.majorversion": "A legfrissebb főverzió keresése (1.x.x)", + "json.npm.minorversion": "A legfrissebb alverzió keresése (1.2.x)", + "json.npm.version.hover": "Legújabb verzió: {0}" +} \ No newline at end of file diff --git a/i18n/hun/extensions/json/client/out/jsonMain.i18n.json b/i18n/hun/extensions/json/client/out/jsonMain.i18n.json new file mode 100644 index 0000000000000..a71a351271b11 --- /dev/null +++ b/i18n/hun/extensions/json/client/out/jsonMain.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "jsonserver.name": "JSON nyelvi szerver" +} \ No newline at end of file diff --git a/i18n/hun/extensions/json/package.i18n.json b/i18n/hun/extensions/json/package.i18n.json new file mode 100644 index 0000000000000..9357a63ffaf86 --- /dev/null +++ b/i18n/hun/extensions/json/package.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "json.schemas.desc": "Sémák hozzárendelése JSON-fájlokhoz a jelenlegi projektben", + "json.schemas.url.desc": "Egy séma URL-címe vagy egy séma relatív elérési útja az aktuális könyvtárban", + "json.schemas.fileMatch.desc": "Fájlminták tömbje, amely a JSON-fájlok sémákhoz való rendelésénél van használva.", + "json.schemas.fileMatch.item.desc": "Fájlminták tömbje, amely a JSON-fájlok sémákhoz való rendelésénél van használva. Tartalmazhat '*'-ot.", + "json.schemas.schema.desc": "Az adott URL-cím sémadefiníciója. A sémát csak a séma URL-címéhez való fölösleges lekérdezések megakadályozása érdekében kell megadni.", + "json.format.enable.desc": "Alapértelmezett JSON-formázó engedélyezése vagy letiltása (újraindítást igényel)", + "json.tracing.desc": "A VS Code és a JSON nyelvi szerver közötti kommunikáció naplózása.", + "json.colorDecorators.enable.desc": "Színdekorátorok engedélyezése vagy letiltása" +} \ No newline at end of file diff --git a/i18n/hun/extensions/markdown/out/extension.i18n.json b/i18n/hun/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..5f2c5343afb28 --- /dev/null +++ b/i18n/hun/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "onPreviewStyleLoadError": "A 'markdown.styles' nem tölthető be: {0}" +} \ No newline at end of file diff --git a/i18n/hun/extensions/markdown/out/previewContentProvider.i18n.json b/i18n/hun/extensions/markdown/out/previewContentProvider.i18n.json new file mode 100644 index 0000000000000..9e943e324b8ac --- /dev/null +++ b/i18n/hun/extensions/markdown/out/previewContentProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "preview.securityMessage.text": "A parancsfájlok futtatása le van tiltva az aktuális dokumentumban", + "preview.securityMessage.title": "A parancsfájlok futtatása le van tiltva a markdown-előnézetben. Módosítsa a markdown-előnézet biztonsági beállításait a parancsfájlok engedélyezéséhez", + "preview.securityMessage.label": "Biztonsági figyelmeztetés: a parancsfájlok le vannak tiltva" +} \ No newline at end of file diff --git a/i18n/hun/extensions/markdown/out/security.i18n.json b/i18n/hun/extensions/markdown/out/security.i18n.json new file mode 100644 index 0000000000000..2bba397346ffc --- /dev/null +++ b/i18n/hun/extensions/markdown/out/security.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "preview.showPreviewSecuritySelector.disallowScriptsForWorkspaceTitle": "Parancsfájlok futtatásának letiltása a markdown-előnézetben ezen a munkaterületen", + "preview.showPreviewSecuritySelector.currentSelection": "Aktuális beállítás", + "preview.showPreviewSecuritySelector.allowScriptsForWorkspaceTitle": "Parancsfájlok futtatásának engedélyezése a markdown-előnézetben ezen a munkaterületen", + "preview.showPreviewSecuritySelector.title": "A markdown-előnézet biztonsági beállításainak módosítása" +} \ No newline at end of file diff --git a/i18n/hun/extensions/markdown/package.i18n.json b/i18n/hun/extensions/markdown/package.i18n.json new file mode 100644 index 0000000000000..6bfa7efc1dd9d --- /dev/null +++ b/i18n/hun/extensions/markdown/package.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "markdown.preview.breaks.desc": "Meghatározza, hogy a sortörések hogyan vannak megjelenítve a markdown-előnézetben. Ha az értéke 'true', akkor minden egyes újsor esetén
jön létre.", + "markdown.preview.doubleClickToSwitchToEditor.desc": "Kattintson duplán a markdown-előnézetre a szerkesztőre való átváltáshoz.", + "markdown.preview.fontFamily.desc": "Meghatározza a markdown-előnézeten használt betűkészletet.", + "markdown.preview.fontSize.desc": "Meghatározza a markdown-előnézet betűméretét, pixelekben.", + "markdown.preview.lineHeight.desc": "Meghatározza a markdown-előnézeten használt sormagasságot. Az érték relatív a betűmérethez képest.", + "markdown.preview.markEditorSelection.desc": "Az aktuális kijelölés megjelölése a markdown-előnézeten", + "markdown.preview.scrollEditorWithPreview.desc": "Amikor a markdown-előnézetet görgetik, a szerkesztőnézet is aktualizálódik", + "markdown.preview.scrollPreviewWithEditorSelection.desc": "A markdown-előnézetet úgy görgeti, hogy látni lehessen az aktuálisan kijelölt sort", + "markdown.preview.title": "Előnézet megnyitása", + "markdown.previewFrontMatter.dec": "Meghatározza, hogy a YAML konfiguráció (front matter) hogyan legyen megjelenítve a markdown-előnézetben. A 'hide' elrejti a konfigurációt, minden más esetben a front matter markdown-tartalomként van kezelve.", + "markdown.previewSide.title": "Előnézet megnyitása oldalt", + "markdown.showSource.title": "Forrás megjelenítése", + "markdown.styles.dec": "CSS-stíluslapok URL-címeinek vagy helyi elérési útjainak listája, amelyek a markdown-előnézeten használva vannak. A relatív elérési utak az intézőben megnyitott mappához képest vannak relatívan értelmezve. Ha nincs mappa megnyitva, akkor a markdown-fájl elréséi útjához képest. Minden '\\' karaktert '\\\\' formában kell megadni.", + "markdown.showPreviewSecuritySelector.title": "A markdown-előnézet biztonsági beállításainak módosítása", + "markdown.preview.enableExperimentalExtensionApi.desc": "[Kísérleti] Kiterjesztések módosíthatják a markdown előnézetet.", + "markdown.trace.desc": "Hibakeresési napló engedélyezése a markdown kiterjesztésben." +} \ No newline at end of file diff --git a/i18n/hun/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/hun/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..7dfc4ee0d5de0 --- /dev/null +++ b/i18n/hun/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "acceptCurrentChange": "Helyi változtatás elfogadása", + "acceptIncomingChange": "Beérkező változtatás elfogadása", + "acceptBothChanges": "Változtatások elfogadása mindkét oldalról", + "compareChanges": "Változtatások összehasonlítása" +} \ No newline at end of file diff --git a/i18n/hun/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/hun/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..16d242a669ce6 --- /dev/null +++ b/i18n/hun/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "cursorNotInConflict": "A szerkesztőablak kurzora nem egy összeolvasztási konfliktuson belül van.", + "compareChangesTitle": "{0}: Helyi változtatások ⟷ Beérkező változtatások", + "cursorOnCommonAncestorsRange": "A szerkesztőablak kurzora a közös ős blokkján van. Vigye vagy a \"helyi\" vagy a \"beérkező\" blokkra.", + "cursorOnSplitterRange": "A szerkesztőablak kurzora az összeolvasztási konfliktus elválasztójánál van. Vigye vagy a \"helyi\" vagy a \"beérkező\" blokkra.", + "noConflicts": "Ebben a fájlban nincsenek összeolvasztási konfliktusok", + "noOtherConflictsInThisFile": "Ebben a fájlban nincsenek további összeolvasztási konfliktusok" +} \ No newline at end of file diff --git a/i18n/hun/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/hun/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..dac641cdd1099 --- /dev/null +++ b/i18n/hun/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "currentChange": "(Helyi változtatás)", + "incomingChange": "(Beérkező változtatás)" +} \ No newline at end of file diff --git a/i18n/hun/extensions/merge-conflict/package.i18n.json b/i18n/hun/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..b3814f8d7e637 --- /dev/null +++ b/i18n/hun/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "command.category": "Összeolvasztási konfliktus", + "command.accept.all-incoming": "Összes beérkező változás elfogadása", + "command.accept.all-both": "Változások elfogadása mindkét oldalról", + "command.accept.current": "Helyi változtatás elfogadása", + "command.accept.incoming": "Beérkező változtatás elfogadása", + "command.accept.selection": "Kijelölt változtatás elfogadása", + "command.accept.both": "Változás elfogadása mindkét oldalról", + "command.next": "Következő konfliktus", + "command.previous": "Előző konfliktus", + "command.compare": "Aktuális konfliktus összehasonlítása", + "config.title": "Összeolvasztási konfliktus", + "config.codeLensEnabled": "Összeolvasztási konfliktust jelző kódlencsék engedélyezése vagy letiltása a szerkesztőablakban.", + "config.decoratorsEnabled": "Összeolvasztási konfliktust jelző dekorátorok engedélyezése vagy letiltása a szerkesztőablakban." +} \ No newline at end of file diff --git a/i18n/hun/extensions/npm/package.i18n.json b/i18n/hun/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..89c11886b21ac --- /dev/null +++ b/i18n/hun/extensions/npm/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.npm.autoDetect": "Meghatározza, hogy az npm-parancsfájlok automatikus felderításe be van-e kapcsolva. A beállítás alapértelmezetten aktív." +} \ No newline at end of file diff --git a/i18n/hun/extensions/php/out/features/validationProvider.i18n.json b/i18n/hun/extensions/php/out/features/validationProvider.i18n.json new file mode 100644 index 0000000000000..2786c871df69c --- /dev/null +++ b/i18n/hun/extensions/php/out/features/validationProvider.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "php.useExecutablePath": "Engedélyezi a(z) {0} (munkaterületi beállításként megadott) végrehajtását a PHP-fájlok linteléséhez?", + "php.yes": "Engedélyezés", + "php.no": "Tiltás", + "wrongExecutable": "A validáció nem sikerült, mivel a(z) {0} nem egy érvényes php végrehajtható fájl. Használja a 'php.validate.executablePath' beállítást a PHP végrehajtható fájl konfigurálásához!", + "noExecutable": "A validáció nem sikerült, mivel nincs beállítva PHP végrehajtható fájl. Használja a 'php.validate.executablePath' beállítást a PHP végrehajtható fájl konfigurálásához!", + "unknownReason": "Nem sikerült futtatni a PHP-t a következő elérési út használatával: {0}. Az ok ismeretlen." +} \ No newline at end of file diff --git a/i18n/hun/extensions/php/package.i18n.json b/i18n/hun/extensions/php/package.i18n.json new file mode 100644 index 0000000000000..59e189e72c4c4 --- /dev/null +++ b/i18n/hun/extensions/php/package.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "configuration.suggest.basic": "Meghatározza, hogy a beépített PHP nyelvi támogatás ajánl-e PHP globálisokat és változókat.", + "configuration.validate.enable": "Beépített PHP-validáció engedélyezése vagy letiltása", + "configuration.validate.executablePath": "A PHP végrehajtható fájljának elérési útja.", + "configuration.validate.run": "A linter mentéskor vagy gépeléskor fut-e.", + "configuration.title": "PHP", + "commands.categroy.php": "PHP", + "command.untrustValidationExecutable": "PHP-validációs végrehajtható fájl letiltása (munkaterületi beállításként megadva)" +} \ No newline at end of file diff --git a/i18n/hun/extensions/typescript/out/features/bufferSyncSupport.i18n.json b/i18n/hun/extensions/typescript/out/features/bufferSyncSupport.i18n.json new file mode 100644 index 0000000000000..36e9902ff5e78 --- /dev/null +++ b/i18n/hun/extensions/typescript/out/features/bufferSyncSupport.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "versionMismatch": "TypeScript ({1}) használata a szerkesztőfunkciókhoz. A számítógére TypeScript (01}) van globálisan telepítve. A VS Code-ban látható hibák eltérhetnek a TSC által visszaadott hibáktól.", + "moreInformation": "További információ", + "doNotCheckAgain": "Ne ellenőrizze újra", + "close": "Bezárás", + "updateTscCheck": "A 'typescript.check.tscVersion' felhasználói beállítás értéke módosítva false-ra" +} \ No newline at end of file diff --git a/i18n/hun/extensions/typescript/out/features/completionItemProvider.i18n.json b/i18n/hun/extensions/typescript/out/features/completionItemProvider.i18n.json new file mode 100644 index 0000000000000..69b50af008f82 --- /dev/null +++ b/i18n/hun/extensions/typescript/out/features/completionItemProvider.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "acquiringTypingsLabel": "Típusdefiníciók letöltése...", + "acquiringTypingsDetail": "Típusdefiníciók letöltése az IntelliSense-hez." +} \ No newline at end of file diff --git a/i18n/hun/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/hun/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json new file mode 100644 index 0000000000000..4785b97e7228d --- /dev/null +++ b/i18n/hun/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ts-check": "Engedélyezi a JavaScript-fájlok szemantikai ellenőrzését. A fájl tetején kell szerepelnie.", + "ts-nocheck": "Letiltja a JavaScript-fájlok szemantikai ellenőrzését. A fájl tetején kell szerepelnie.", + "ts-ignore": "Elfedi a fájl következő sorában található @ts-check-hibákat." +} \ No newline at end of file diff --git a/i18n/hun/extensions/typescript/out/features/implementationsCodeLensProvider.i18n.json b/i18n/hun/extensions/typescript/out/features/implementationsCodeLensProvider.i18n.json new file mode 100644 index 0000000000000..f5a576fa8a74e --- /dev/null +++ b/i18n/hun/extensions/typescript/out/features/implementationsCodeLensProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "oneImplementationLabel": "1 implementáció", + "manyImplementationLabel": "{0} implementáció", + "implementationsErrorLabel": "Nem sikerült meghatározni az implementációkat" +} \ No newline at end of file diff --git a/i18n/hun/extensions/typescript/out/features/jsDocCompletionProvider.i18n.json b/i18n/hun/extensions/typescript/out/features/jsDocCompletionProvider.i18n.json new file mode 100644 index 0000000000000..c1b25917e3b52 --- /dev/null +++ b/i18n/hun/extensions/typescript/out/features/jsDocCompletionProvider.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "typescript.jsDocCompletionItem.documentation": "JSDoc-megjegyzés" +} \ No newline at end of file diff --git a/i18n/hun/extensions/typescript/out/features/referencesCodeLensProvider.i18n.json b/i18n/hun/extensions/typescript/out/features/referencesCodeLensProvider.i18n.json new file mode 100644 index 0000000000000..797518b509102 --- /dev/null +++ b/i18n/hun/extensions/typescript/out/features/referencesCodeLensProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "oneReferenceLabel": "1 referencia", + "manyReferenceLabel": "{0} referencia", + "referenceErrorLabel": "Nem sikerült meghatározni a referenciákat" +} \ No newline at end of file diff --git a/i18n/hun/extensions/typescript/out/typescriptMain.i18n.json b/i18n/hun/extensions/typescript/out/typescriptMain.i18n.json new file mode 100644 index 0000000000000..c521fb331a6d2 --- /dev/null +++ b/i18n/hun/extensions/typescript/out/typescriptMain.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "typescript.projectConfigNoWorkspace": "Nyisson meg egy mappát a VS Code-ban typescriptes vagy javascriptes projekt használatához!", + "typescript.projectConfigUnsupportedFile": "Nem sikerült meghatározni a TypeScript- vagy JavaScript-projektet. Nem támogatott fájltípus", + "typescript.projectConfigCouldNotGetInfo": "Nem sikerült meghatározni a TypeScript- vagy JavaScript-projektet", + "typescript.noTypeScriptProjectConfig": "A fájl nem része egy TypeScript-projektnek", + "typescript.noJavaScriptProjectConfig": "A fájl nem része egy JavaScript-projektnek", + "typescript.configureTsconfigQuickPick": "tsconfig.json konfigurálása", + "typescript.configureJsconfigQuickPick": "jsconfig.json konfigurálása", + "typescript.projectConfigLearnMore": "További információ" +} \ No newline at end of file diff --git a/i18n/hun/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/hun/extensions/typescript/out/typescriptServiceClient.i18n.json new file mode 100644 index 0000000000000..e46f95c0a626a --- /dev/null +++ b/i18n/hun/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noServerFound": "A(z) {0} elérési út nem egy érvényes tsserver-telepítésre mutat. A beépített TypeScript-verzió lesz használva.", + "noBundledServerFound": "A VSCode beépített TS-szerverét törölte egy másik alkalmazás, például egy hibásan viselkedő víruskereső eszköz. Telepítse újra a VSCode-ot! ", + "versionNumber.custom": "egyedi", + "serverCouldNotBeStarted": "Nem sikerült elindítani a TypeScript nyelvi szervert. Hibaüzenet: {0}", + "useVSCodeVersionOption": "A VSCode verziójának használata", + "activeVersion": "Jelenleg aktív", + "useWorkspaceVersionOption": "A munkaterület verziójának használata", + "learnMore": "További információ", + "selectTsVersion": "Válassza ki a javascriptes és typescriptes nyelvi funkciókhoz használt TypeScript-verziót", + "typescript.openTsServerLog.notSupported": "A TS-szerver naplózáshoz TS 2.2.2+ szükséges", + "typescript.openTsServerLog.loggingNotEnabled": "A TS-szervernaplózás ki van kapcsolva. Állítsa be a `typescript.tsserver.log` beállítást, majd indítsa újra a TS-szervert a naplózás engedélyezéséhez!", + "typescript.openTsServerLog.enableAndReloadOption": "Naplózás engedélyezése és TS-szerver újraindítása", + "typescript.openTsServerLog.noLogFile": "A TS-szerver nem kezdett el naplózni", + "openTsServerLog.openFileFailedFailed": "A TS-szervernapló nem nyitható meg", + "serverDiedAfterStart": "A TypeScript nyelvi szolgáltatás öt alkalommal omlott össze rögtön azután, hogy el lett indítva. A szolgáltatás nem lesz újraindítva.", + "serverDiedReportIssue": "Probléma jelentése", + "serverDied": "A TypeScript nyelvi szolgáltatás öt alkalommal omlott össze az elmúlt öt percben." +} \ No newline at end of file diff --git a/i18n/hun/extensions/typescript/out/utils/logger.i18n.json b/i18n/hun/extensions/typescript/out/utils/logger.i18n.json new file mode 100644 index 0000000000000..bc738f43d0c37 --- /dev/null +++ b/i18n/hun/extensions/typescript/out/utils/logger.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "channelName": "TypeScript" +} \ No newline at end of file diff --git a/i18n/hun/extensions/typescript/out/utils/projectStatus.i18n.json b/i18n/hun/extensions/typescript/out/utils/projectStatus.i18n.json new file mode 100644 index 0000000000000..a75ecaf059829 --- /dev/null +++ b/i18n/hun/extensions/typescript/out/utils/projectStatus.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hintExclude": "A JavaScript/TypeScript funkciók teljes projektre való engedélyezéséhez zárja ki a sok fájlt tartalmazó mappákat. Például: {0}", + "hintExclude.generic": "A JavaScript/TypeScript funkciók teljes projektre való engedélyezéséhez zárja ki azokat a mappákat, amelyben olyan forrásfájlok találhatók, melyen nem dolgozik.", + "large.label": "Kivételek konfigurálása", + "hintExclude.tooltip": "A JavaScript/TypeScript funkciók teljes projektre való engedélyezéséhez zárja ki azokat a mappákat, amelyben olyan forrásfájlok találhatók, melyen nem dolgozik. " +} \ No newline at end of file diff --git a/i18n/hun/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/hun/extensions/typescript/out/utils/typingsStatus.i18n.json new file mode 100644 index 0000000000000..4b308f26e0425 --- /dev/null +++ b/i18n/hun/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "installingPackages": "Adatok lekérése a jobb typescriptes IntelliSense-hez", + "typesInstallerInitializationFailed.title": "Nem sikerült telepíteni a típusdefiníciós fájlokat a javascriptes nyelvi funkciókhoz. Győződjön meg róla, hogy az NPM telepítve van vagy módosítsa a 'typescript.npm' beállítás értékét a felhasználói beállításokban", + "typesInstallerInitializationFailed.moreInformation": "További információ", + "typesInstallerInitializationFailed.doNotCheckAgain": "Ne ellenőrizze újra", + "typesInstallerInitializationFailed.close": "Bezárás" +} \ No newline at end of file diff --git a/i18n/hun/extensions/typescript/package.i18n.json b/i18n/hun/extensions/typescript/package.i18n.json new file mode 100644 index 0000000000000..28e9377ea061d --- /dev/null +++ b/i18n/hun/extensions/typescript/package.i18n.json @@ -0,0 +1,51 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "typescript.reloadProjects.title": "Projekt újratöltése", + "javascript.reloadProjects.title": "Projekt újratöltése", + "configuration.typescript": "TypeScript", + "typescript.useCodeSnippetsOnMethodSuggest.dec": "Függvények kiegészítése paraméterdefiníciójukkal.", + "typescript.tsdk.desc": "A tsservert és a lib*.d.ts fájlokat tartalmazó mappa elérési útja.", + "typescript.disableAutomaticTypeAcquisition": "Automatikus típusdefiníció-letöltés letiltása. Legalább 2.0.6-os TypeScriptet igényel, és a módosítás után újraindítás szükséges.", + "typescript.check.tscVersion": "Megvizsgálja, hogy a globálisan telepített TypeScript fordító (pl. tsc) különbözik-e a TypeScript nyelvi szolgáltatás által használttól.", + "typescript.tsserver.log": "Engedélyezi a TS-szerver naplózását egy fájlba. Ez a napló a TS-szerverrel kapcsolatos problémák diagnosztizálására használható. A napló tartalmazhat elérési utakat, forráskódot és más potenciálisan érzékeny, projekttel kapcsolatos adatot.", + "typescript.tsserver.trace": "Engedélyezi a TS-szervernek küldött üzenetek naplózását. Ez a napló a TS-szerverrel kapcsolatos problémák diagnosztizálására használható. A napló tartalmazhat elérési utakat, forráskódot és más potenciálisan érzékeny, projekttel kapcsolatos adatot. ", + "typescript.validate.enable": "TypeScript-validálás engedélyezése vagy letiltása.", + "typescript.format.enable": "Alapértelmezett TypeScript-formázó engedélyezése vagy letiltása.", + "javascript.format.enable": "Alapértelmezett JavaScript-formázó engedélyezése vagy letiltása.", + "format.insertSpaceAfterCommaDelimiter": "Meghatározza a szóközök kezelését vessző elválasztókarakter után.", + "format.insertSpaceAfterConstructor": "Meghatározza a szóközök kezelését a constructor kulcsszó után. TypeScript >= 2.3.0-t igényel.", + "format.insertSpaceAfterSemicolonInForStatements": "Meghatározza a szóközök kezelését pontosvessző után a for ciklusban.", + "format.insertSpaceBeforeAndAfterBinaryOperators": "Meghatározza a szóközök kezelését bináris operátorok után.", + "format.insertSpaceAfterKeywordsInControlFlowStatements": "Meghatározza a szóközök kezelését vezérlési szerkezetek kulcsszavai után.", + "format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": "Meghatározza a szóközök kezelését a névtelen függvényekben található function kulcsszó után.", + "format.insertSpaceBeforeFunctionParenthesis": "Meghatározza a szóközök kezelését a függvényargumentumokat tartalmazó zárójel előtt. TypeScript >= 2.1.5-öt igényel.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": "Meghatározza a szóközök kezelését nem üres zárójelek nyitása után és zárása előtt.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": "Meghatározza a szóközök kezelését nem üres szögletes zárójelek nyitása után és zárása előtt.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": "Meghatározza a szóközök kezelését nem üres kapcsos zárójelek nyitása után és zárása előtt. TypeScript >= 2.3.0-t igényel.", + "format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": "Meghatározza a szóközök kezelését a sablonkarakterláncok (template stringek) kapcsos zárójeleinek nyitása után és zárása előtt. TypeScript >= 2.0.6-ot igényel.", + "format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": "Meghatározza a szóközök kezelését JSX-kifejezések kapcsos zárójeleinek nyitása után és zárása előtt. TypeScript >= 2.0.6-ot igényel.", + "format.insertSpaceAfterTypeAssertion": "Meghatározza a szóközök kezelését a típuskényszerítések utn. TypeScript >= 2.4-t igényel.", + "format.placeOpenBraceOnNewLineForFunctions": "Meghatározza, hogy a függvények nyitó kapcsos zárójelei új sorba kerüljenek-e vagy sem.", + "format.placeOpenBraceOnNewLineForControlBlocks": "Meghatározza, hogy a vezérlőblokkok nyitó kapcsos zárójelei új sorba kerüljenek-e vagy sem.", + "javascript.validate.enable": "JavaScript-validálás engedélyezése vagy letiltása.", + "typescript.goToProjectConfig.title": "Projektkonfiguráció megkeresése", + "javascript.goToProjectConfig.title": "Projektkonfiguráció megkeresése", + "javascript.referencesCodeLens.enabled": "Referencia kódlencsék engedélyezése vagy letiltása a JavaScript-fájlokban.", + "typescript.referencesCodeLens.enabled": "Referencia kódlencsék engedélyezése vagy letiltása a TypeScript-fájlokban. TypeScript >= 2.0.6-ot igényel.", + "typescript.implementationsCodeLens.enabled": "Implementációs kódlencsék engedélyezése vagy letiltása. TypeScript >= 2.2.0-t igényel.", + "typescript.openTsServerLog.title": "TS-szervernapló megnyitása", + "typescript.restartTsServer": "TS-szerver újraindítása", + "typescript.selectTypeScriptVersion.title": "TypeScript-verzió kiválasztása", + "jsDocCompletion.enabled": "Automatikus JSDoc-megjegyzések engedélyezése vagy letiltása", + "javascript.implicitProjectConfig.checkJs": "JavaScript-fájlok szemantikai ellenőrzésének engedélyezése vagy letiltása. A meglévő jsconfig.json vagy tsconfig.json fájlok felülírják ezt a beállítást. TypeScript >= 2.3.1-et igényel.", + "typescript.npm": "Az automatikus típusdefiníció-letöltéshez használt NPM végrehajtható fájl elérési útja. TypeScript 2.3.4-et igényel.", + "typescript.check.npmIsInstalled": "Ellenőrizze, hogy az NPM telepítve van-e az automatikus típusdefiníció-letöltéshez.", + "javascript.nameSuggestions": "Egyedi nevek listázásának engedélyezése a javascriptes javaslati listákban.", + "typescript.tsc.autoDetect": "Meghatározza, hogy a tsc-feladatok automatikus felderítése be van-e kapcsolva.", + "typescript.problemMatchers.tsc.label": "TypeScript-problémák", + "typescript.problemMatchers.tscWatch.label": "TypeScript-problémák (figyelő módban)" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/browser/ui/actionbar/actionbar.i18n.json b/i18n/hun/src/vs/base/browser/ui/actionbar/actionbar.i18n.json new file mode 100644 index 0000000000000..4ecb2c803f4cd --- /dev/null +++ b/i18n/hun/src/vs/base/browser/ui/actionbar/actionbar.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "titleLabel": "{0} ({1})" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/browser/ui/aria/aria.i18n.json b/i18n/hun/src/vs/base/browser/ui/aria/aria.i18n.json new file mode 100644 index 0000000000000..3bc0f0c0e684b --- /dev/null +++ b/i18n/hun/src/vs/base/browser/ui/aria/aria.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "repeated": "{0} (ismét előfordult)" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/browser/ui/findinput/findInput.i18n.json b/i18n/hun/src/vs/base/browser/ui/findinput/findInput.i18n.json new file mode 100644 index 0000000000000..d43a176512b4d --- /dev/null +++ b/i18n/hun/src/vs/base/browser/ui/findinput/findInput.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultLabel": "bemeneti adat" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/browser/ui/findinput/findInputCheckboxes.i18n.json b/i18n/hun/src/vs/base/browser/ui/findinput/findInputCheckboxes.i18n.json new file mode 100644 index 0000000000000..d165fd190240a --- /dev/null +++ b/i18n/hun/src/vs/base/browser/ui/findinput/findInputCheckboxes.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "caseDescription": "Kis- és nagybetűk megkülönböztetése", + "wordsDescription": "Csak teljes szavas egyezés", + "regexDescription": "Reguláris kifejezés használata" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/browser/ui/inputbox/inputBox.i18n.json b/i18n/hun/src/vs/base/browser/ui/inputbox/inputBox.i18n.json new file mode 100644 index 0000000000000..f6a7c8c5b2069 --- /dev/null +++ b/i18n/hun/src/vs/base/browser/ui/inputbox/inputBox.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "alertErrorMessage": "Hiba: {0}", + "alertWarningMessage": "Figyelmeztetés: {0}", + "alertInfoMessage": "Információ: {0}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/hun/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json new file mode 100644 index 0000000000000..a5030e9187205 --- /dev/null +++ b/i18n/hun/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "imgMeta": "{0}x{1} {2}", + "largeImageError": "A kép túl nagy a szerkesztőben való megjelenítéshez.", + "resourceOpenExternalButton": "Kép megnyitása külső program használatával?", + "nativeBinaryError": "A fájl nem jeleníthető meg a szerkesztőben, mert bináris adatokat tartalmaz, túl nagy vagy nem támogatott szövegkódolást használ.", + "sizeB": "{0} B", + "sizeKB": "{0} KB", + "sizeMB": "{0} MB", + "sizeGB": "{0} GB", + "sizeTB": "{0} TB" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/browser/ui/toolbar/toolbar.i18n.json b/i18n/hun/src/vs/base/browser/ui/toolbar/toolbar.i18n.json new file mode 100644 index 0000000000000..d28a4867625d1 --- /dev/null +++ b/i18n/hun/src/vs/base/browser/ui/toolbar/toolbar.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "more": "Tovább" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/common/errorMessage.i18n.json b/i18n/hun/src/vs/base/common/errorMessage.i18n.json new file mode 100644 index 0000000000000..adc4bbc9fdd2d --- /dev/null +++ b/i18n/hun/src/vs/base/common/errorMessage.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "message": "{0}: {1}", + "error.permission.verbose": "Engedélyhiány (HTTP {0})", + "error.permission": "Engedélyhiány", + "error.http.verbose": "{0} (HTTP {1}: {2})", + "error.http": "{0} (HTTP {1})", + "error.connection.unknown.verbose": "Ismeretlen csatlakozási hiba ({0})", + "error.connection.unknown": "Ismeretlen csatlakozási hiba történt. Vagy megszakadt az internetkapcsolat, vagy a kiszolgáló vált offline-ná.", + "stackTrace.format": "{0}: {1}", + "error.defaultMessage": "Ismeretlen hiba történt. Részletek a naplóban.", + "nodeExceptionMessage": "Rendszerhiba történt ({0})", + "error.moreErrors": "{0} (összesen {1} hiba)" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/hun/src/vs/base/common/jsonErrorMessages.i18n.json new file mode 100644 index 0000000000000..c73ba839ef696 --- /dev/null +++ b/i18n/hun/src/vs/base/common/jsonErrorMessages.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error.invalidSymbol": "Érvénytelen szimbólum", + "error.invalidNumberFormat": "Érvénytelen számformátum.", + "error.propertyNameExpected": "Hiányzó tulajdonságnév", + "error.valueExpected": "Hiányzó érték.", + "error.colonExpected": "Hiányzó kettőspont.", + "error.commaExpected": "Hiányzó vessző", + "error.closeBraceExpected": "Hiányzó záró kapcsos zárójel", + "error.closeBracketExpected": "Hiányzó záró szögletes zárójel", + "error.endOfFileExpected": "Itt fájlvége jelnek kellene szerepelnie." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/common/keybindingLabels.i18n.json b/i18n/hun/src/vs/base/common/keybindingLabels.i18n.json new file mode 100644 index 0000000000000..f84d49a93b4f6 --- /dev/null +++ b/i18n/hun/src/vs/base/common/keybindingLabels.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ctrlKey": "Ctrl", + "shiftKey": "Shift", + "altKey": "Alt", + "windowsKey": "Windows", + "ctrlKey.long": "Control", + "shiftKey.long": "Shift", + "altKey.long": "Alt", + "cmdKey.long": "Parancs", + "windowsKey.long": "Windows" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/common/processes.i18n.json b/i18n/hun/src/vs/base/common/processes.i18n.json new file mode 100644 index 0000000000000..d80423e4ca777 --- /dev/null +++ b/i18n/hun/src/vs/base/common/processes.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ExecutableParser.commandMissing": "Hiba: a végrehajtási információnak definiálnia kell egy karakterlánc típusú parancsot.", + "ExecutableParser.isShellCommand": "Figyelmeztetés: az isShellCommand értékének boolean típusúnak kell lennie. A következő érték figyelmen kívül van hagyva: {0}.", + "ExecutableParser.args": "Figyelmeztetés: az args értékének string[] típusúnak kell lennie. A következő érték figyelmen kívül van hagyva: {0}.", + "ExecutableParser.invalidCWD": "Figyelmeztetés: az options.cwd értékének string típusúnak kell lennie. A következő érték figyelmen kívül van hagyva: {0}." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/common/severity.i18n.json b/i18n/hun/src/vs/base/common/severity.i18n.json new file mode 100644 index 0000000000000..5c503caf27981 --- /dev/null +++ b/i18n/hun/src/vs/base/common/severity.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "sev.error": "Hiba", + "sev.warning": "Figyelmeztetés", + "sev.info": "Információ" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/node/processes.i18n.json b/i18n/hun/src/vs/base/node/processes.i18n.json new file mode 100644 index 0000000000000..9e3ad98b69c3a --- /dev/null +++ b/i18n/hun/src/vs/base/node/processes.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TaskRunner.UNC": "Rendszerparancsok UNC-meghajtókon nem hajthatók végre." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/node/zip.i18n.json b/i18n/hun/src/vs/base/node/zip.i18n.json new file mode 100644 index 0000000000000..feb34282ee736 --- /dev/null +++ b/i18n/hun/src/vs/base/node/zip.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "notFound": "{0} nem található a zipen belül." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/parts/quickopen/browser/quickOpenModel.i18n.json b/i18n/hun/src/vs/base/parts/quickopen/browser/quickOpenModel.i18n.json new file mode 100644 index 0000000000000..fb2705ff3c83b --- /dev/null +++ b/i18n/hun/src/vs/base/parts/quickopen/browser/quickOpenModel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpenAriaLabelEntry": "{0}, választó", + "quickOpenAriaLabel": "választó" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/parts/quickopen/browser/quickOpenWidget.i18n.json b/i18n/hun/src/vs/base/parts/quickopen/browser/quickOpenWidget.i18n.json new file mode 100644 index 0000000000000..095139488e0b5 --- /dev/null +++ b/i18n/hun/src/vs/base/parts/quickopen/browser/quickOpenWidget.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpenAriaLabel": "Gyorsválasztó. Kezdjen el gépelni a találati lista szűkítéséhez!", + "treeAriaLabel": "Gyorsválasztó" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/parts/tree/browser/treeDefaults.i18n.json b/i18n/hun/src/vs/base/parts/tree/browser/treeDefaults.i18n.json new file mode 100644 index 0000000000000..1bb27ebb3237f --- /dev/null +++ b/i18n/hun/src/vs/base/parts/tree/browser/treeDefaults.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "collapse": "Összecsukás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/code/electron-main/menus.i18n.json b/i18n/hun/src/vs/code/electron-main/menus.i18n.json new file mode 100644 index 0000000000000..c3284fde6075c --- /dev/null +++ b/i18n/hun/src/vs/code/electron-main/menus.i18n.json @@ -0,0 +1,180 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mFile": "&&Fájl", + "mEdit": "Sz&&erkesztés", + "mSelection": "Kijelölé&&s", + "mView": "&&Nézet", + "mGoto": "U&&grás", + "mDebug": "Hi&&bakeresés", + "mWindow": "Ablak", + "mHelp": "&&Súgó", + "mTask": "&&Feladatok", + "miNewWindow": "Új &&ablak", + "mAbout": "A(z) {0} névjegye", + "mServices": "Szolgáltatások", + "mHide": "{0} elrejtése", + "mHideOthers": "Egyebek elrejtése", + "mShowAll": "Az összes megjelenítése", + "miQuit": "Kilépés innen: {0}", + "miNewFile": "Ú&&j fájl", + "miOpen": "&&Megnyitás", + "miOpenFolder": "Ma&&ppa megnyitása", + "miOpenFile": "&&Fájl megnyitása", + "miOpenRecent": "&&Legutóbbi megnyitása", + "miAddFolderToWorkspace": "&&Mappa hozzáadása a munkaterülethez...", + "miSave": "Menté&&s", + "miSaveAs": "M&&entés másként", + "miSaveAll": "Összes men&&tése", + "miAutoSave": "Automatikus mentés", + "miRevert": "Fájl &&visszaállítása", + "miCloseWindow": "Ablak be&&zárása", + "miCloseFolder": "Mappa &&bezárása", + "miCloseEditor": "Szer&&kesztőablak bezárása", + "miExit": "&&Kilépés", + "miOpenSettings": "&&Beállítások", + "miOpenKeymap": "&&Billentyűparancsok", + "miOpenKeymapExtensions": "Billentyűparancs-kiegészítő&&k", + "miOpenSnippets": "Felhasználói kód&&részletek", + "miSelectColorTheme": "Szín&&téma", + "miSelectIconTheme": "Fájl&&ikonok témája", + "miPreferences": "&&Beállítások", + "miReopenClosedEditor": "Bezárt szerkesztőablak ú&&jranyitása", + "miMore": "&&Továbbiak...", + "miClearRecentOpen": "Leg&&utóbbi fájlok listájának törlése", + "miUndo": "&&Visszavonás", + "miRedo": "Ú&&jra", + "miCut": "&&Kivágás", + "miCopy": "&&Másolás", + "miPaste": "&&Beillesztés", + "miFind": "K&&eresés", + "miReplace": "&&Csere", + "miFindInFiles": "Keresés a &&fájlokban", + "miReplaceInFiles": "Csere a fá&&jlokban", + "miEmmetExpandAbbreviation": "Emmet: Rövidítés k&&ibontása", + "miShowEmmetCommands": "E&&mmet...", + "miToggleLineComment": "&&Egysoros megjegyzés ki-/bekapcsolása", + "miToggleBlockComment": "Me&&gjegyzésblokk ki-/bekapcsolása", + "miMultiCursorAlt": "Váltás Alt+kattintásra több kurzorhoz", + "miMultiCursorCmd": "Váltás Cmd+kattintásra több kurzorhoz", + "miMultiCursorCtrl": "Váltás Ctrl+kattintásra több kurzorhoz", + "miInsertCursorAbove": "&&Kurzor beszúrása egy sorral feljebb", + "miInsertCursorBelow": "Ku&&rzor beszúrása egy sorral feljebb", + "miInsertCursorAtEndOfEachLineSelected": "K&&urzor beszúrása a sorok végére", + "miAddSelectionToNextFindMatch": "&&Következő találat kijelölése", + "miAddSelectionToPreviousFindMatch": "&&Előző találat kijelölése", + "miSelectHighlights": "Az összes keresési találat &&kijelölése", + "miCopyLinesUp": "Sor másolása eggyel &&feljebb", + "miCopyLinesDown": "Sor másolása eggyel &&lejjebb", + "miMoveLinesUp": "Sor feljebb &&helyezése", + "miMoveLinesDown": "Sor lejje&&bb helyezése", + "miSelectAll": "Az össze&&s kijelölése", + "miSmartSelectGrow": "Kijelölés &&bővítése", + "miSmartSelectShrink": "Ki&&jelölés szűkítése", + "miViewExplorer": "Fájlk&&ezelő", + "miViewSearch": "&&Keresés", + "miViewSCM": "&&Verziókezelés", + "miViewDebug": "&&Hibakeresés", + "miViewExtensions": "Kiegé&&szítők", + "miToggleOutput": "&&Kimenet", + "miToggleDebugConsole": "Hi&&bakeresési konzol", + "miToggleIntegratedTerminal": "Beépített term&&inál", + "miMarker": "&&Problémák", + "miAdditionalViews": "További &&nézetek", + "miCommandPalette": "Paran&&cskatalógus...", + "miToggleFullScreen": "&&Teljes képernyő be- és kikapcsolása", + "miToggleZenMode": "Zen mód be- és kikapcsolása", + "miToggleMenuBar": "Menüsáv &&be- és kikapcsolása", + "miSplitEditor": "Szerkesztőablak k&&ettéosztása", + "miToggleEditorLayout": "Szerkesztőablak-csoport e&&lrendezésének váltása", + "miToggleSidebar": "&&Oldalsáv be- és kikapcsolása", + "miMoveSidebarRight": "Oldalsáv áthelyezése &&jobbra", + "miMoveSidebarLeft": "Oldalsáv áthelyezése &&balra", + "miTogglePanel": "&&Panel be- és kikapcsolása", + "miHideStatusbar": "Állapotsor &&elrejtése", + "miShowStatusbar": "Állapotsor &&megjelenítése", + "miHideActivityBar": "&&Tevékenységsáv elrejtése", + "miShowActivityBar": "&&Tevékenységsáv megjelenítése", + "miToggleWordWrap": "&&Sortörés be- és kikapcsolása", + "miToggleRenderWhitespace": "S&&zóközök kirajzolásának be- és kikapcsolása", + "miToggleRenderControlCharacters": "&&Vezérlőkarakterek kirajzolásának be- és kikapcsolása", + "miZoomIn": "&&Nagyítás", + "miZoomOut": "&&Kicsinyítés", + "miZoomReset": "&&Nagyítási szint alaphelyzetbe állítása", + "miBack": "&&Vissza", + "miForward": "&&Előre", + "miNextEditor": "&&Következő szerkesztőablak", + "miPreviousEditor": "&&Előző szerkesztőablak", + "miNextEditorInGroup": "Következő &&használt szerkesztőablak a csoportban", + "miPreviousEditorInGroup": "Következő h&&asznált szerkesztőablak a csoportban", + "miSwitchEditor": "Sz&&szerkesztőablak váltása", + "miFocusFirstGroup": "&&Első csoport", + "miFocusSecondGroup": "&&Második csoport", + "miFocusThirdGroup": "&&Harmadik csoport", + "miNextGroup": "&&Következő csoport", + "miPreviousGroup": "&&Előző csoport", + "miSwitchGroup": "Csoport &&váltása", + "miGotoFile": "Ugrás &&fájlhoz...", + "miGotoSymbolInFile": "Ugrás szim&&bólumhoz egy fájlban...", + "miGotoSymbolInWorkspace": "Ugrás szimbólumhoz a &&munkaterületen...", + "miGotoDefinition": "Ugrás a &&definícióra", + "miGotoTypeDefinition": "Ugrás a &&típusdefinícióra", + "miGotoImplementation": "Ugrás az &&implementációra", + "miGotoLine": "&&Sor megkeresáse...", + "miStartDebugging": "Hibakeresés indítá&&sa", + "miStartWithoutDebugging": "Indítás hibakeresés &&nélkül", + "miStopDebugging": "Hibakeresés leállítá&&sa", + "miRestart Debugging": "Hibakeresés új&&raindítása", + "miOpenConfigurations": "&&Konfigurációk megnyitása", + "miAddConfiguration": "Konfiguráció hozzáadása...", + "miStepOver": "Á&&tugrás", + "miStepInto": "&&Belépés", + "miStepOut": "&&Kilépés", + "miContinue": "&&Folytatás", + "miToggleBreakpoint": "&&Töréspont be- és kikapcsolása", + "miConditionalBreakpoint": "Feltételes törés&&pont", + "miColumnBreakpoint": "Töréspont &&oszlopnál", + "miFunctionBreakpoint": "Töréspont&&funkció...", + "miNewBreakpoint": "Ú&&j töréspont", + "miEnableAllBreakpoints": "Összes töréspont engedélyezése", + "miDisableAllBreakpoints": "Összes töréspont leti&<ása", + "miRemoveAllBreakpoints": "Összes töréspont eltávolítás&&a", + "miInstallAdditionalDebuggers": "Tovább&&i hibakeresők telepítése", + "mMinimize": "Kis méret", + "mZoom": "Nagyítás", + "mBringToFront": "Legyen az összes előtérben", + "miSwitchWindow": "&&Ablak váltása...", + "miToggleDevTools": "&&Fejlesztői eszközök be- és kikapcsolása", + "miAccessibilityOptions": "&&Kisegítő lehetőségek", + "miReportIssues": "&&Problémák jelentése", + "miWelcome": "Üdvözlő&&oldal", + "miInteractivePlayground": "&&Interaktív játszótér", + "miDocumentation": "&&Dokumentáció", + "miReleaseNotes": "&&Kiadási jegyzék", + "miKeyboardShortcuts": "Billentyűparancs-&&referencia", + "miIntroductoryVideos": "Bemutató&&videók", + "miTipsAndTricks": "&&Tippek és trükkök", + "miTwitter": "&&Csatlakozzon hozzánk a Twitteren", + "miUserVoice": "Funkcióigények keresé&&se", + "miLicense": "&&Licenc megtekintése", + "miPrivacyStatement": "&&Adatvédelmi nyilatkozat", + "miAbout": "&&Névjegy", + "miRunTask": "&&Feladat futtatása...", + "miRestartTask": "Futó f&&eladat újraindítása...", + "miTerminateTask": "Felada&&t megszakítása...", + "miBuildTask": "&&Buildelési feladat futtatása...", + "miConfigureTask": "Feladatok &&konfigurálása", + "miConfigureBuildTask": "Alapértelmezett buildelési &&feladat beállítása", + "accessibilityOptionsWindowTitle": "Kisegítő lehetőségek beállításai", + "miRestartToUpdate": "Újraindítás a frissítéshez...", + "miCheckingForUpdates": "Frissítések keresése...", + "miDownloadUpdate": "Elérhető frissítés letöltése", + "miDownloadingUpdate": "Frissítés letöltése...", + "miInstallingUpdate": "Frissítés telepítése...", + "miCheckForUpdates": "Frissítések keresése...", + "aboutDetail": "\nVerzió: {0}\nCommit: {1}\nDátum: {2}\nShell: {3}\nRendelő: {4}\nNode: {5}", + "okButton": "OK" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/code/electron-main/window.i18n.json b/i18n/hun/src/vs/code/electron-main/window.i18n.json new file mode 100644 index 0000000000000..4acca80d5c4d8 --- /dev/null +++ b/i18n/hun/src/vs/code/electron-main/window.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hiddenMenuBar": "A menüsáv továbbra is elréhető az **Alt** billentyű leütésével." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/code/electron-main/windows.i18n.json b/i18n/hun/src/vs/code/electron-main/windows.i18n.json new file mode 100644 index 0000000000000..035c87c63bf94 --- /dev/null +++ b/i18n/hun/src/vs/code/electron-main/windows.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ok": "OK", + "pathNotExistTitle": "Az elérési út nem létezik", + "pathNotExistDetail": "Úgy tűnik, hogy a(z) „{0}” elérési út már nem létezik a lemezen.", + "reopen": "Újranyitás", + "wait": "Várakozás tovább", + "close": "Bezárás", + "appStalled": "Az ablak nem válaszol", + "appStalledDetail": "Bezárhatja vagy újranyithatja az ablakot vagy várakozhat tovább.", + "appCrashed": "Az ablak összeomlott", + "appCrashedDetail": "Elnézést kérünk az okozott kellemetlenségért. Nyissa újra az ablakot, ha onnan szeretné folytatni a munkát, ahol abbahagyta.", + "openFile": "Fájl megnyitása", + "openFolder": "Mappa megnyitása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/code/node/cliProcessMain.i18n.json b/i18n/hun/src/vs/code/node/cliProcessMain.i18n.json new file mode 100644 index 0000000000000..fe8c039d35fd9 --- /dev/null +++ b/i18n/hun/src/vs/code/node/cliProcessMain.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "notFound": "A(z) '{0}' kiegészítő nem található.", + "notInstalled": "A(z) '{0}' kiegészítő nincs telepítve.", + "useId": "Bizonyosodjon meg róla, hogy a kiegészítő teljes azonosítóját használja, beleértve a kiadót, pl.: {0}", + "successVsixInstall": "A(z) '{0}' kiegszítő sikeresen telepítve lett.", + "alreadyInstalled": "A(z) '{0}' kiegészítő már telepítve van.", + "foundExtension": "A(z) '{0}' kiegészítő megtalálva a piactéren.", + "installing": "Telepítés...", + "successInstall": "A(z) '{0}' v{1} kiegészítő sikeresen telepítve lett.", + "uninstalling": "{0} eltávolítása...", + "successUninstall": "A(z) '{0}' kiegészítő sikeresen el lett távolítva." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/browser/widget/diffReview.i18n.json b/i18n/hun/src/vs/editor/browser/widget/diffReview.i18n.json new file mode 100644 index 0000000000000..c51100ae53c84 --- /dev/null +++ b/i18n/hun/src/vs/editor/browser/widget/diffReview.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "Bezárás", + "header": "{0}. eltérés, összesen: {1}. Eredeti: {2}., {3}. sorok, módosított: {4}., {5}. sorok", + "blankLine": "üres", + "equalLine": "eredeti {0}., módosított {1}.: {2}", + "insertLine": "+ módosított {0}.: {1}", + "deleteLine": "- eredeti {0}.: {1}", + "editor.action.diffReview.next": "Ugrás a következő eltérésre", + "editor.action.diffReview.prev": "Ugrás az előző eltérésre" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/hun/src/vs/editor/common/config/commonEditorConfig.i18n.json new file mode 100644 index 0000000000000..d420928962c0b --- /dev/null +++ b/i18n/hun/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -0,0 +1,89 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorConfigurationTitle": "Szerkesztőablak", + "fontFamily": "Ez a beállítás a betűkészletet határozza meg.", + "fontWeight": "Meghatározza a betűvastagságot.", + "fontSize": "Meghatározza a betű méretét, pixelekben.", + "lineHeight": "Meghatározza a sormagasságot. A 0 érték használata esetén a sormagasság a fontSize értékéből van számolva.", + "letterSpacing": "Meghatározza a betűközt, pixelekben.", + "lineNumbers": "Meghatározza, hogy megjelenjenek-e a sorszámok. A lehetséges értékek 'on', 'off' és 'relative'. A 'relative' érték használata esetén a kurzor aktuális pozíciójához képest számított sorszám jelenik meg.", + "rulers": "Azon oszlopok listája, ahol függőleges segédvonal jelenjen meg.", + "wordSeparators": "Azon karakterek listája, amelyek szóelválasztónak vannak tekintve szavakkal kapcsolatos navigáció vagy műveletek során.", + "tabSize": "Egy tabulátor hány szóköznek felel meg. Ez a beállítás felülírásra kerül a fájl tartalma alapján, ha az 'editor.detectIndentation' beállítás aktív.", + "tabSize.errorMessage": "A várt érték 'number' típusú. Megjegyzés: az \"auto\" értéket az 'editor.detectIndentation' beállítás helyettesíti.", + "insertSpaces": "Tabulátor billentyű lenyomásánál szóközök legyenek-e beszúrva. Ez a beállítás felülírásra kerül a fájl tartalma alapján, ha az 'editor.detectIndentation' beállítás aktív.", + "insertSpaces.errorMessage": "A várt érték 'boolean' típusú. Megjegyzés: az \"auto\" értéket az 'editor.detectIndentation' beállítás helyettesíti.", + "detectIndentation": "Fájl megnyitásakor az `editor.tabSize` és az `editor.insertSpaces` értéke a fájl tartalma alapján lesz meghatározva.", + "roundedSelection": "Itt adható meg, hogy a kijelölt elemek sarkai lekerekítettek legyenek-e", + "scrollBeyondLastLine": "Meghatározza, hogy a szerkesztőablak görgethető-e az utolsó sor után.", + "minimap.enabled": "Meghatározza, hogy megjelenjen-e a kódtérkép.", + "minimap.showSlider": "Meghatározza, hogy automatikusan el legyen-e rejtve a kódtérképes görgetősáv.", + "minimap.renderCharacters": "Meghatározza, hogy a tényleges karakterek legyenek-e megjelenítve (színes téglalapok helyett)", + "minimap.maxColumn": "Meghatározza, hogy a kódtérképen legfeljebb hány oszlop legyen kirajzolva.", + "find.seedSearchStringFromSelection": "Meghatározza, hogy a keresés modulba automatikusan bekerüljön-e a szerkesztőablakban kiválasztott szöveg.", + "find.autoFindInSelection": "Meghatározza, hogy a keresés a kijelölésben beállítás be van-e kapcsolva, ha több karakternyi vagy sornyi szöveg ki van jelölve a szerkesztőablakban.", + "wordWrap.off": "A sorok soha nem lesznek tördelve.", + "wordWrap.on": "A sorok tördelve lesznek a nézetablak szélességénél.", + "wordWrap.wordWrapColumn": "A sorok tördelve lesznek az `editor.wordWrapColumn` oszlopnál.", + "wordWrap.bounded": "A sorok tördelve lesznek a nézetablak szélességének és az `editor.wordWrapColumn` értékének minimumánál.", + "wordWrap": "Ez a beállítás meghatározza, hogy a sorok hogyan legyenek tördelve. Lehetséges értékek:\n- 'off' (nincs sortörés)\n- 'on' (sortörés a nézetablakban)\n- 'wordWrapColumn' (sortörés az `editor.wordWrapColumn` oszlopnál) vagy\n- 'bounded' (sortörés az `editor.wordWrapColumn` és a nézetablak minimumánál)", + "wordWrapColumn": "Meghatározza a sortöréshez használt oszlopszámot a szerkesztőablakban, ha az `editor.wordWrap` értéke 'wordWrapColumn' vagy 'bounded'.", + "wrappingIndent": "Meghatározza a tördelt sorok behúzását. Értéke 'none', 'same' vagy 'indent' lehet.", + "mouseWheelScrollSensitivity": "Az egér görgetési eseményeinél keletkező `deltaX` és `deltaY` paraméterek szorzója", + "multiCursorModifier.ctrlCmd": "Windows és Linux alatt a `Control`, OSX alatt a `Command` billentyűt jelenti.", + "multiCursorModifier.alt": "Windows és Linux alatt az `Alt`, OSX alatt az `Option` billentyűt jelenti.", + "multiCursorModifier": "Több kurzor hozzáadásához használt módosítóbillentyű. A `ctrlCmd` Windows és Linux alatt a `Control`, OSX alatt a `Command` billentyűt jelenti. A Definíció megkeresése és Hivatkozás megnyitása egérgesztusok automatikusan alkalmazkodnak úgy, hogy ne ütközzenek a többkurzorhoz tartozó módosítóval.", + "quickSuggestions.strings": "Kiegészítési javaslatok engedélyezése karakterláncokban (stringekben)", + "quickSuggestions.comments": "Kiegészítési javaslatok engedélyezése megjegyzésekben", + "quickSuggestions.other": "Kiegészítési javaslatok engedélyezése karakterláncokon (stringeken) és megjegyzéseken kívül", + "quickSuggestions": "Meghatározza, hogy automatikusan megjelenjenek-e a javaslatok gépelés közben", + "quickSuggestionsDelay": "Meghatározza, hogy hány ezredmásodperc késleltetéssel jelenjenek meg a kiegészítési javaslatok", + "parameterHints": "Paraméterinformációkat és típusinformációkat tartalmazó felugró ablak engedélyezése gépelés közben", + "autoClosingBrackets": "Meghatározza, hogy a szerkesztő automatikusan beszúrja-e a nyitó zárójelek záró párját", + "formatOnType": "Meghatározza, hogy a szerkesztő automatikusan formázza-e a sort a gépelés után", + "formatOnPaste": "Meghatározza, hogy a szerkesztő automatikusan formázza-e a beillesztett tartalmat. Ehhez szükség van egy formázóra, illetve a formázónak tudnia kell a dokumentum egy részét formázni.", + "autoIndent": "Meghatározza, hogy a szerkesztőablak automatikusan állítsa-e az indentálást miközben a felhasználó gépel, beilleszt vagy mozgatja a sorokat. Az adott nyelv indentálási szabályainak rendelkezésre kell állnia.", + "suggestOnTriggerCharacters": "Itt adható meg, hogy eseményindító karakterek beírásakor automatikusan megjelenjenek-e a javaslatok", + "acceptSuggestionOnEnter": "Meghatározza, hogy a javaslatok az 'Enter' gomb leütésére is el legyenek fogadva a 'Tab' mellett. Segít feloldani a bizonytalanságot az új sorok beillesztése és a javaslatok elfogadása között. A 'smart' érték azt jelenti, hogy csak akkor fogadja el a javaslatot az Enter leütése esetén, ha az módosítja a szöveget.", + "acceptSuggestionOnCommitCharacter": "Meghatározza, hogy a javaslaok a zárókarakterek leütésére is el legyenek fogadva. A JavaScriptben például a pontosvessző (';') számít zárókarakternek, leütésére a javaslat elfogadásra kerül és beillesztődik az adott karakter. ", + "snippetSuggestions": "Meghatározza, hogy a kódtöredékek megjelenjenek-e a javaslatok között, illetve hogy hogyan legyenek rendezve.", + "emptySelectionClipboard": "Meghatározza, hogy kijelölés nélküli másolás esetén a teljes sor legyen-e másolva.", + "wordBasedSuggestions": "Meghatározza, hogy a kiegészítések listája a dokumentumban lévő szövegek alapján legyen-e meghatározva.", + "suggestFontSize": "Az ajánlásokat tartalmazó modul betűmérete", + "suggestLineHeight": "Az ajánlásokat tartalmazó modul sormagassága", + "selectionHighlight": "Itt adható meg, hogy a szerkesztő kiemelje-e a kijelöléshez hasonló találatokat", + "occurrencesHighlight": "Meghatározza, hogy a szerkesztőablakban ki legyenek-e emelve a szimbólum szemantikailag hozzá tartozó előfordulásai.", + "overviewRulerLanes": "Meghatározza, hogy hány dekoráció jelenhet meg azonos pozícióban az áttekintő sávon.", + "overviewRulerBorder": "Meghatározza, hogy legyen-e kerete az áttekintő sávnak.", + "cursorBlinking": "Meghatározza a kurzor animációjának stílusát. Lehetséges értékek: 'blink', 'smooth', 'phase', 'expand' vagy 'solid'", + "mouseWheelZoom": "A szerkesztőablak betűtípusának nagyítása vagy kicsinyítése az egérgörgő Ctrl lenyomása mellett történő használata esetén", + "cursorStyle": "Meghatározza a kurzor stílusát. Lehetséges értékek: 'block', 'block-outline', 'line', 'line-thin', 'underline' vagy 'underline-thin'", + "fontLigatures": "Engedélyezi a betűtípusban található ligatúrák használatát", + "hideCursorInOverviewRuler": "Meghatározza, hogy a kurzor pozíciója el legyen-e rejtve az áttekintő sávon.", + "renderWhitespace": "Meghatározza, hogy a szerkesztőablakban hogyan legyenek kirajzolva a szóköz karakterek. Lehetséges értékek: 'none', 'boundary', vagy 'all'. A 'boundary' beállítás esetén, ha szavak között egyetlen szóköz található, akkor az nem lesz kirajzolva.", + "renderControlCharacters": "Meghatározza, hogy a szerkesztőablakban ki legyenek-e rajzolva a vezérlőkarakterek.", + "renderIndentGuides": "Meghatározza, hogy a szerkesztőablakban ki legyenek-e rajzolva az indentálási segédvonalak.", + "renderLineHighlight": "Meghatározza, hogy a szerkesztőablakban hogyan legyen kirajzolva az aktuális sor kiemelése. Lehetséges értékek: 'none', 'gutter', 'line', vagy 'all'.", + "codeLens": "Meghatározza, hogy megjelenjenek-e a kódlencsék", + "folding": "Meghatározza, hogy engedélyezve van-e a kódrészletek bezárása a szerkesztőablakban.", + "showFoldingControls": "Meghatározza, hogy a kódrészletek bezárásához tartozó vezérlőelemek automatikusan el legyenek-e rejtve.", + "matchBrackets": "Zárójel kiválasztása esetén a hozzátartozó zárójel kiemelése.", + "glyphMargin": "Meghatározza, hogy legyen-e vertikális szimbólummargó a szerkesztőablakban. A szimbólummargó elsősorban hibakeresésnél van használva.", + "useTabStops": "Szóközök beillesztése és törlése során követve vannak a tabulátorok.", + "trimAutoWhitespace": "A sorok végén lévő, automatikusan beillesztett szóközök eltávolítása", + "stablePeek": "A betekintőablakok maradjanak nyitva akkor is, ha duplán kattintanak a tartalmára vagy megnyomják az Escape gombot.", + "dragAndDrop": "Meghatározza, hogy a szerkesztőablakban engedélyezett-e a kijelölt szövegrészletek áhelyezése húzással.", + "accessibilitySupport.auto": "A szerkesztő a platform által biztosított API-kat használja annak megállapításához, hogy van-e képernyőolvasó csatlakoztatva.", + "accessibilitySupport.on": "A szerkesztő folyamatos képernyőolvasóval való használatára van optimalizálva.", + "accessibilitySupport.off": "A szerkesztő soha nincs képernyőolvasó használatára optimalizálva.", + "accessibilitySupport": "Meghatározza, hogy a szerkesztő olyan módban fusson-e, ami optimalizálva van képernyőolvasóval való használathoz.", + "links": "Meghatározza, hogy a szerkesztőablak érzékelje-e a hivatkozásokat, és kattinthatóvá tegye-e őket.", + "sideBySide": "Meghatározza, hogy a differenciaszerkesztő ablakban egymás mellett vagy a sorban jelenjenek meg az eltérések", + "ignoreTrimWhitespace": "Meghatározza, hogy a differenciaszerkesztő ablakban megjelenjenek-e a sor elején vagy végén a szóközökben talált különbségek", + "renderIndicators": "Meghatározza, hogy a differenciaszerkesztő ablakban megjelenjenek-e a +/- jelzők az hozzáadott/eltávolított változásoknál", + "selectionClipboard": "Meghatározza-e, hogy támogatva van-e az elsődleges vágólap Linux alatt" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/hun/src/vs/editor/common/config/editorOptions.i18n.json new file mode 100644 index 0000000000000..6a2e047821187 --- /dev/null +++ b/i18n/hun/src/vs/editor/common/config/editorOptions.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "accessibilityOffAriaLabel": "A szerkesztőablak jelenleg nem elérhető. Nyomja meg az Alt+F1-et a beállítási lehetőségek megjelenítéséhez!", + "editorViewAccessibleLabel": "Szerkesztőablak tartalma" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/common/controller/cursor.i18n.json b/i18n/hun/src/vs/editor/common/controller/cursor.i18n.json new file mode 100644 index 0000000000000..6b33fa4e18eca --- /dev/null +++ b/i18n/hun/src/vs/editor/common/controller/cursor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "corrupt.commands": "Váratlan kivétel egy parancs végrehajtása során." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/common/model/textModelWithTokens.i18n.json b/i18n/hun/src/vs/editor/common/model/textModelWithTokens.i18n.json new file mode 100644 index 0000000000000..41687561a2e4b --- /dev/null +++ b/i18n/hun/src/vs/editor/common/model/textModelWithTokens.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mode.tokenizationSupportFailed": "Ebben az üzemmódban nem sikerült lexikális elemekre bontani a bemenetet." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/common/modes/modesRegistry.i18n.json b/i18n/hun/src/vs/editor/common/modes/modesRegistry.i18n.json new file mode 100644 index 0000000000000..26fe7e29f4c19 --- /dev/null +++ b/i18n/hun/src/vs/editor/common/modes/modesRegistry.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "plainText.alias": "Egyszerű szöveg" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/common/services/bulkEdit.i18n.json b/i18n/hun/src/vs/editor/common/services/bulkEdit.i18n.json new file mode 100644 index 0000000000000..b0bbd29edb052 --- /dev/null +++ b/i18n/hun/src/vs/editor/common/services/bulkEdit.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "conflict": "A következő fájlok módosultak időközben: {0}", + "summary.0": "Nem történtek változtatások", + "summary.nm": "{0} változtatást végzett {0} fájlban", + "summary.n0": "{0} változtatást végzett egy fájlban" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/common/services/modeServiceImpl.i18n.json b/i18n/hun/src/vs/editor/common/services/modeServiceImpl.i18n.json new file mode 100644 index 0000000000000..b85462146b6e1 --- /dev/null +++ b/i18n/hun/src/vs/editor/common/services/modeServiceImpl.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.languages": "Nyelvdeklarációkat szolgáltat.", + "vscode.extension.contributes.languages.id": "A nyelv azonosítója", + "vscode.extension.contributes.languages.aliases": "A nyelv kiegészítő nevei.", + "vscode.extension.contributes.languages.extensions": "A nyelvhez hozzárendelt fájlkiterjesztések.", + "vscode.extension.contributes.languages.filenames": "A nyelvhez hozzárendelt fájlnevek.", + "vscode.extension.contributes.languages.filenamePatterns": "A nyelvhez hozzárendelt globális minták.", + "vscode.extension.contributes.languages.mimetypes": "A nyelvhez hozzárendelt MIME-típusok.", + "vscode.extension.contributes.languages.firstLine": "Reguláris kifejezés, ami az adott nyelven írt fájl első sorára illeszkedik.", + "vscode.extension.contributes.languages.configuration": "A nyelvhez tartozó konfigurációkat tartalmazó fájl relatív elérési útja." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/common/services/modelServiceImpl.i18n.json b/i18n/hun/src/vs/editor/common/services/modelServiceImpl.i18n.json new file mode 100644 index 0000000000000..a12e01358bbaf --- /dev/null +++ b/i18n/hun/src/vs/editor/common/services/modelServiceImpl.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "diagAndSourceMultiline": "[{0}]\n{1}", + "diagAndSource": "[{0}] {1}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/hun/src/vs/editor/common/view/editorColorRegistry.i18n.json new file mode 100644 index 0000000000000..94d90edc0717e --- /dev/null +++ b/i18n/hun/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "lineHighlight": "A kurzor pozícióján található sor kiemelési háttérszíne.", + "lineHighlightBorderBox": "A kurzor pozícióján található sor keretszíne.", + "rangeHighlight": "A kiemelt területek háttérszíne, pl. a gyors megnyitás és keresés funkcióknál.", + "caret": "A szerkesztőablak kurzorának színe.", + "editorWhitespaces": "A szerkesztőablakban található szóköz karakterek színe.", + "editorIndentGuides": "A szerkesztőablak segédvonalainak színe.", + "editorLineNumbers": "A szerkesztőablak sorszámainak színe.", + "editorRuler": "A szerkesztőablak sávjainak színe.", + "editorCodeLensForeground": "A szerkesztőablakban található kódlencsék előtérszíne", + "editorBracketMatchBackground": "Hozzátartozó zárójelek háttérszíne", + "editorBracketMatchBorder": "Az összetartozó zárójelek dobozának színe", + "editorOverviewRulerBorder": "Az áttekintő sáv keretszíne.", + "editorGutter": "A szerkesztőablag margójának háttérszíne. A margón található a szimbólummargó és a sorszámok.", + "errorForeground": "A hibákat jelző hullámvonal előtérszíne a szerkesztőablakban.", + "errorBorder": "A hibákat jelző hullámvonal keretszíne a szerkesztőablakban.", + "warningForeground": "A figyelmeztetéseket jelző hullámvonal előtérszíne a szerkesztőablakban.", + "warningBorder": "A figyelmeztetéseket jelző hullámvonal keretszíne a szerkesztőablakban." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json b/i18n/hun/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json new file mode 100644 index 0000000000000..647a263affcf5 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.jumpBracket": "Ugrás a zárójelre" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json b/i18n/hun/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json new file mode 100644 index 0000000000000..1fc37d076840c --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "caret.moveLeft": "Kurzor mozgatása balra", + "caret.moveRight": "Kurzor mozgatása jobbra" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/caretOperations/common/transpose.i18n.json b/i18n/hun/src/vs/editor/contrib/caretOperations/common/transpose.i18n.json new file mode 100644 index 0000000000000..e8cbbca5cf4d6 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/caretOperations/common/transpose.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "transposeLetters.label": "Betűk megcserélése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/clipboard/browser/clipboard.i18n.json b/i18n/hun/src/vs/editor/contrib/clipboard/browser/clipboard.i18n.json new file mode 100644 index 0000000000000..09439c237cb30 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/clipboard/browser/clipboard.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "actions.clipboard.cutLabel": "Kivágás", + "actions.clipboard.copyLabel": "Másolás", + "actions.clipboard.pasteLabel": "Beillesztés", + "actions.clipboard.copyWithSyntaxHighlightingLabel": "Másolás szintaktikai kiemeléssel" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/comment/common/comment.i18n.json b/i18n/hun/src/vs/editor/contrib/comment/common/comment.i18n.json new file mode 100644 index 0000000000000..219553bdc4e1a --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/comment/common/comment.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "comment.line": "Egysoros megjegyzés ki-/bekapcsolása", + "comment.line.add": "Egysoros megjegyzés hozzáadása", + "comment.line.remove": "Egysoros megjegyzés eltávolítása", + "comment.block": "Megjegyzésblokk ki-/bekapcsolása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/contextmenu/browser/contextmenu.i18n.json b/i18n/hun/src/vs/editor/contrib/contextmenu/browser/contextmenu.i18n.json new file mode 100644 index 0000000000000..78d9a20aae1c9 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/contextmenu/browser/contextmenu.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "action.showContextMenu.label": "Szerkesztőablak helyi menüjének megjelenítése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/find/browser/findWidget.i18n.json b/i18n/hun/src/vs/editor/contrib/find/browser/findWidget.i18n.json new file mode 100644 index 0000000000000..2e445d0ec2eb9 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/find/browser/findWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Keresés", + "placeholder.find": "Keresés", + "label.previousMatchButton": "Előző találat", + "label.nextMatchButton": "Következő találat", + "label.toggleSelectionFind": "Keresés kijelölésben", + "label.closeButton": "Bezárás", + "label.replace": "Csere", + "placeholder.replace": "Csere", + "label.replaceButton": "Csere", + "label.replaceAllButton": "Az összes előfordulás cseréje", + "label.toggleReplaceButton": "Váltás csere módra", + "title.matchesCountLimit": "Csak az első 999 találat van kiemelve, de minden keresési művelet a teljes szöveggel dolgozik.", + "label.matchesLocation": "{0} (összesen {1})", + "label.noResults": "Nincs eredmény" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/find/common/findController.i18n.json b/i18n/hun/src/vs/editor/contrib/find/common/findController.i18n.json new file mode 100644 index 0000000000000..bae1b7e817b7d --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/find/common/findController.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "startFindAction": "Keresés", + "findNextMatchAction": "Következő találat", + "findPreviousMatchAction": "Előző találat", + "nextSelectionMatchFindAction": "Következő kijelölés", + "previousSelectionMatchFindAction": "Előző kijelölés", + "startReplace": "Csere", + "addSelectionToNextFindMatch": "Kijelölés hozzáadása a következő keresési találathoz", + "addSelectionToPreviousFindMatch": "Kijelölés hozzáadása az előző keresési találathoz", + "moveSelectionToNextFindMatch": "Utolsó kijelölés áthelyezése a következő keresési találatra", + "moveSelectionToPreviousFindMatch": "Utolsó kijelölés áthelyezése az előző keresési találatra", + "selectAllOccurrencesOfFindMatch": "Az összes keresési találat kijelölése", + "changeAll.label": "Minden előfordulás módosítása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/folding/browser/folding.i18n.json b/i18n/hun/src/vs/editor/contrib/folding/browser/folding.i18n.json new file mode 100644 index 0000000000000..07da29ad41aa9 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/folding/browser/folding.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unfoldAction.label": "Kibontás", + "unFoldRecursivelyAction.label": "Kibontás rekurzívan", + "foldAction.label": "Bezárás", + "foldRecursivelyAction.label": "Bezárás rekurzívan", + "foldAllAction.label": "Az összes bezárása", + "unfoldAllAction.label": "Az összes kinyitása", + "foldLevelAction.label": "{0} szintű blokkok bezárása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/format/browser/formatActions.i18n.json b/i18n/hun/src/vs/editor/contrib/format/browser/formatActions.i18n.json new file mode 100644 index 0000000000000..6ef4ffd2eedc1 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/format/browser/formatActions.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint11": "Egy formázást végzett a(z) {0}. sorban", + "hintn1": "{0} formázást végzett a(z) {1}. sorban", + "hint1n": "Egy formázást végzett a(z) {0}. és {1}. sorok között", + "hintnn": "{0} formázást végzett a(z) {1}. és {2}. sorok között", + "formatDocument.label": "Dokumentum formázása", + "formatSelection.label": "Kijelölt tartalom formázása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/hun/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..50e0679aba908 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "Nem található a(z) '{0}' definíciója", + "generic.noResults": "Definíció nem található", + "meta.title": " – {0} definíció", + "actions.goToDecl.label": "Ugrás a definícióra", + "actions.goToDeclToSide.label": "Definíció megnyitása oldalt", + "actions.previewDecl.label": "Betekintés a definícióba", + "goToImplementation.noResultWord": "Nem található a(z) '{0}' implementációja", + "goToImplementation.generic.noResults": "Implementáció nem található", + "meta.implementations.title": " – {0} implementáció", + "actions.goToImplementation.label": "Ugrás az implementációra", + "actions.peekImplementation.label": "Betekintés az implementációba", + "goToTypeDefinition.noResultWord": "Nem található a(z) '{0}' típusdefiníciója", + "goToTypeDefinition.generic.noResults": "Típusdefiníció nem található", + "meta.typeDefinitions.title": " – {0} típusdefiníció", + "actions.goToTypeDefinition.label": "Ugrás a típusdefinícióra", + "actions.peekTypeDefinition.label": "Betekintés a típusdefinícióba" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/hun/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..782190fef044c --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "Kattintson {0} definíció megjelenítéséhez." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json b/i18n/hun/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json new file mode 100644 index 0000000000000..ce65a365e4533 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "title.wo_source": "({0}/{1})", + "markerAction.next.label": "Következő hiba vagy figyelmeztetés", + "markerAction.previous.label": "Előző hiba vagy figyelmeztetés", + "editorMarkerNavigationError": "A szerkesztőablak jelzőnavigációs moduljának színe hiba esetén.", + "editorMarkerNavigationWarning": "A szerkesztőablak jelzőnavigációs moduljának színe figyelmeztetés esetén.", + "editorMarkerNavigationBackground": "A szerkesztőablak jelzőnavigációs moduljának háttérszíne." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/hover/browser/hover.i18n.json b/i18n/hun/src/vs/editor/contrib/hover/browser/hover.i18n.json new file mode 100644 index 0000000000000..e9de48281ee8f --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/hover/browser/hover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showHover": "Súgószöveg megjelenítése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/hover/browser/modesContentHover.i18n.json b/i18n/hun/src/vs/editor/contrib/hover/browser/modesContentHover.i18n.json new file mode 100644 index 0000000000000..a9cab1dd0d559 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/hover/browser/modesContentHover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "modesContentHover.loading": "Betöltés..." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.i18n.json b/i18n/hun/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.i18n.json new file mode 100644 index 0000000000000..0339e509b33a4 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "InPlaceReplaceAction.previous.label": "Csere az előző értékre", + "InPlaceReplaceAction.next.label": "Csere a következő értékre" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/indentation/common/indentation.i18n.json b/i18n/hun/src/vs/editor/contrib/indentation/common/indentation.i18n.json new file mode 100644 index 0000000000000..4b8870d20ac8b --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/indentation/common/indentation.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "indentationToSpaces": "Indentálások átalakítása szóközökké", + "indentationToTabs": "Indentálások átalakítása tabulátorokká", + "configuredTabSize": "Beállított tabulátorméret", + "selectTabWidth": "Tabulátorméret kiválasztása az aktuális fájlhoz", + "indentUsingTabs": "Indentálás tabulátorral", + "indentUsingSpaces": "Indentálás szóközzel", + "detectIndentation": "Indentálás felismerése a tartalom alapján", + "editor.reindentlines": "Sorok újraindentálása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json b/i18n/hun/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json new file mode 100644 index 0000000000000..d5c935359b070 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "lines.copyUp": "Sor másolása eggyel feljebb", + "lines.copyDown": "Sor másolása eggyel lejjebb", + "lines.moveUp": "Sor feljebb helyezése", + "lines.moveDown": "Sor lejjebb helyezése", + "lines.sortAscending": "Rendezés növekvő sorrendben", + "lines.sortDescending": "Rendezés csökkenő sorrendben", + "lines.trimTrailingWhitespace": "Sor végén található szóközök levágása", + "lines.delete": "Sor törlése", + "lines.indent": "Sor behúzása", + "lines.outdent": "Sor kihúzása", + "lines.insertBefore": "Sor beszúrása eggyel feljebb", + "lines.insertAfter": "Sor beszúrása eggyel lejjebb", + "lines.deleteAllLeft": "Balra lévő tartalom törlése", + "lines.deleteAllRight": "Jobbra lévő tartalom törlése", + "lines.joinLines": "Sorok egyesítése", + "editor.transpose": "A kurzor körüli karakterek felcserélése", + "editor.transformToUppercase": "Átalakítás nagybetűssé", + "editor.transformToLowercase": "Átalakítás kisbetűssé" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/links/browser/links.i18n.json b/i18n/hun/src/vs/editor/contrib/links/browser/links.i18n.json new file mode 100644 index 0000000000000..ece9320a75896 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/links/browser/links.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "links.navigate.mac": "Hivatkozott oldal megnyitása Cmd + kattintás paranccsal", + "links.navigate": "Hivatkozott oldal megnyitása Ctrl + kattintás paranccsal", + "links.navigate.al": "Hivatkozás megnyitása Alt + kattintás paranccsal", + "invalid.url": "A hivatkozást nem sikerült megnyitni, mert nem jól formázott: {0}", + "missing.url": "A hivatkozást nem sikerült megnyitni, hiányzik a célja.", + "label": "Hivatkozás megnyitása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json b/i18n/hun/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json new file mode 100644 index 0000000000000..8aa3dbca9ff72 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mutlicursor.insertAbove": "Kurzor beszúrása egy sorral feljebb", + "mutlicursor.insertBelow": "Kurzor beszúrása egy sorral lejjebb", + "mutlicursor.insertAtEndOfEachLineSelected": "Kurzor beszúrása a sorok végére" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/parameterHints/browser/parameterHints.i18n.json b/i18n/hun/src/vs/editor/contrib/parameterHints/browser/parameterHints.i18n.json new file mode 100644 index 0000000000000..973e6d7ae912e --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/parameterHints/browser/parameterHints.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parameterHints.trigger.label": "Paraméterinformációk megjelenítése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.i18n.json b/i18n/hun/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.i18n.json new file mode 100644 index 0000000000000..f05a169d614ff --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint": "{0}, információ" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/quickFix/browser/quickFixCommands.i18n.json b/i18n/hun/src/vs/editor/contrib/quickFix/browser/quickFixCommands.i18n.json new file mode 100644 index 0000000000000..1fef02c03eb52 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/quickFix/browser/quickFixCommands.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickFixWithKb": "Javítások megjelenítése ({0})", + "quickFix": "Javítások megjelenítése", + "quickfix.trigger.label": "Gyorsjavítás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.i18n.json b/i18n/hun/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.i18n.json new file mode 100644 index 0000000000000..bc4f4f5abd630 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "meta.titleReference": " – {0} referencia", + "references.action.label": "Minden hivatkozás megkeresése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/referenceSearch/browser/referencesController.i18n.json b/i18n/hun/src/vs/editor/contrib/referenceSearch/browser/referencesController.i18n.json new file mode 100644 index 0000000000000..b93a507d5d9bd --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/referenceSearch/browser/referencesController.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "labelLoading": "Betöltés..." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/hun/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json new file mode 100644 index 0000000000000..4ab9002859c96 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "aria.oneReference": "szimbólum a következő helyen: {0}, sor: {1}, oszlop: {2}", + "aria.fileReferences.1": "Egy szimbólum a következő helyen: {0}, teljes elérési út: {1}", + "aria.fileReferences.N": "{0} szimbólum a következő helyen: {1}, teljes elérési út: {2}", + "aria.result.0": "Nincs találat", + "aria.result.1": "Egy szimbólum a következő helyen: {0}", + "aria.result.n1": "{0} szimbólum a következő helyen: {1}", + "aria.result.nm": "{0} szimbólum {1} fájlban" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/hun/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json new file mode 100644 index 0000000000000..2701fadac42d9 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "referencesFailre": "Nem sikerült feloldani a fájlt.", + "referencesCount": "{0} referencia", + "referenceCount": "{0} referencia", + "missingPreviewMessage": "előnézet nem érhető el", + "treeAriaLabel": "Referenciák", + "noResults": "Nincs eredmény", + "peekView.alternateTitle": "Referenciák", + "peekViewTitleBackground": "A betekintőablak címsorának háttérszíne.", + "peekViewTitleForeground": "A betekintőablak címének színe.", + "peekViewTitleInfoForeground": "A betekintőablak címsorában található információ színe.", + "peekViewBorder": "A betekintőablak keretének és nyilainak színe.", + "peekViewResultsBackground": "A betekintőablak eredménylistájának háttérszíne.", + "peekViewResultsMatchForeground": "A betekintőablak eredménylistájában található sorhivatkozások előtérszíne.", + "peekViewResultsFileForeground": "A betekintőablak eredménylistájában található fájlhivatkozások előtérszíne.", + "peekViewResultsSelectionBackground": "A betekintőablak eredménylistájában kiválaszott elem háttérszíne.", + "peekViewResultsSelectionForeground": "A betekintőablak eredménylistájában kiválaszott elem előtérszíne.", + "peekViewEditorBackground": "A betekintőablak szerkesztőablakának háttérszíne.", + "peekViewEditorGutterBackground": "A betekintőablak szerkesztőablakában található margó háttérszíne.", + "peekViewResultsMatchHighlight": "Kiemelt keresési eredmények színe a betekintőablak eredménylistájában.", + "peekViewEditorMatchHighlight": "Kiemelt keresési eredmények színe a betekintőablak szerkesztőablakában." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/rename/browser/rename.i18n.json b/i18n/hun/src/vs/editor/contrib/rename/browser/rename.i18n.json new file mode 100644 index 0000000000000..c6eac10add61f --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/rename/browser/rename.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "no result": "Nincs eredmény.", + "aria": "'{0}' sikeresen át lett nevezve a következőre: '{1}'. Összefoglaló: {2}", + "rename.failed": "Az átnevezést nem sikerült végrehajtani.", + "rename.label": "Szimbólum átnevezése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/rename/browser/renameInputField.i18n.json b/i18n/hun/src/vs/editor/contrib/rename/browser/renameInputField.i18n.json new file mode 100644 index 0000000000000..cd26c078ae05b --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/rename/browser/renameInputField.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "renameAriaLabel": "Átnevezésre szolgáló beviteli mező. Adja meg az új nevet, majd nyomja meg az Enter gombot a változtatások elvégzéséhez." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/smartSelect/common/smartSelect.i18n.json b/i18n/hun/src/vs/editor/contrib/smartSelect/common/smartSelect.i18n.json new file mode 100644 index 0000000000000..463be33cb03fa --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/smartSelect/common/smartSelect.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.grow": "Kijelölés bővítése", + "smartSelect.shrink": "Kijelölés szűkítése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json b/i18n/hun/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json new file mode 100644 index 0000000000000..d7050253ff13e --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "arai.alert.snippet": "A(z) '{0}' elfogadása a következő szöveg beszúrását eredményezte: {1}", + "suggest.trigger.label": "Javaslatok megjelenítése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/hun/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json new file mode 100644 index 0000000000000..1ea907a2db039 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorSuggestWidgetBackground": "A javaslatokat tartalmazó modul háttérszíne.", + "editorSuggestWidgetBorder": "A javaslatokat tartalmazó modul keretszíne.", + "editorSuggestWidgetForeground": "A javaslatokat tartalmazó modul előtérszíne.", + "editorSuggestWidgetSelectedBackground": "A javaslatokat tartalmazó modulban kiválasztott elem háttérszíne.", + "editorSuggestWidgetHighlightForeground": "Az illeszkedő szövegrészletek kiemelése a javaslatok modulban.", + "readMore": "További információk megjelenítése...{0}", + "suggestionWithDetailsAriaLabel": "{0}, javaslat, részletekkel", + "suggestionAriaLabel": "{0}, javaslat", + "readLess": "Kevesebb információ megjelenítése...{0}", + "suggestWidget.loading": "Betöltés...", + "suggestWidget.noSuggestions": "Nincsenek javaslatok.", + "suggestionAriaAccepted": "{0}, elfogadva", + "ariaCurrentSuggestionWithDetails": "{0}, javaslat, részletekkel", + "ariaCurrentSuggestion": "{0}, javaslat" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json b/i18n/hun/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json new file mode 100644 index 0000000000000..dc4360652cbf4 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggle.tabMovesFocus": "Tab billentyűvel mozgatott fókusz ki- és bekapcsolása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.i18n.json b/i18n/hun/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.i18n.json new file mode 100644 index 0000000000000..6192eaea44a97 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wordHighlight": "Szimbólumok háttérszíne olvasási hozzáférés, páldául változó olvasása esetén.", + "wordHighlightStrong": "Szimbólumok háttérszíne írási hozzáférés, páldául változó írása esetén." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.i18n.json b/i18n/hun/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.i18n.json new file mode 100644 index 0000000000000..a40829f1ae605 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "Bezárás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/electron-browser/textMate/TMSyntax.i18n.json b/i18n/hun/src/vs/editor/electron-browser/textMate/TMSyntax.i18n.json new file mode 100644 index 0000000000000..be4ee2e798998 --- /dev/null +++ b/i18n/hun/src/vs/editor/electron-browser/textMate/TMSyntax.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid.language": "Ismeretlen nyelv található a következőben: `contributes.{0}.language`. A megadott érték: {1}", + "invalid.scopeName": "Hiányzó karakterlánc a `contributes.{0}.scopeName`-ben. A megadott érték: {1}", + "invalid.path.0": "Hiányzó karakterlánc a `contributes.{0}.path`-ban. A megadott érték: {1}", + "invalid.injectTo": "A `contributes.{0}.injectTo` értéke érvénytelen. Az értéke egy tömb lehet, ami nyelvhatókörök neveit tartalmazza. A megadott érték: {1}", + "invalid.embeddedLanguages": "A `contributes.{0}.embeddedLanguages` értéke érvénytelen. Az értéke egy hatókörnév-nyelv kulcs-érték párokat tartalmazó objektum lehet. A megadott érték: {1}", + "invalid.path.1": "A `contributes.{0}.path` ({1}) nem a kiegészítő mappáján belül található ({2}). Emiatt előfordulhat, hogy a kiegészítő nem lesz hordozható.", + "no-tm-grammar": "Nincs TM Grammar regisztrálva ehhez a nyelvhez." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/hun/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json new file mode 100644 index 0000000000000..45673b13e303e --- /dev/null +++ b/i18n/hun/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parseErrors": "Hiba a(z) {0} feldolgozása közben: {1}", + "schema.openBracket": "A nyitó zárójelet definiáló karakter vagy karaktersorozat", + "schema.closeBracket": "A záró zárójelet definiáló karakter vagy karaktersorozat", + "schema.comments": "Meghatározza a megjegyzésszimbólumokat", + "schema.blockComments": "Meghatározza, hogyan vannak jelölve a megjegyzésblokkok.", + "schema.blockComment.begin": "A megjegyzésblokk kezdetét definiáló karaktersorozat.", + "schema.blockComment.end": "A megjegyzésblokk végét definiáló karaktersorozat.", + "schema.lineComment": "A megjegyzéssor kezdetét definiáló karaktersorozat.", + "schema.brackets": "Meghatározza azokat a zárójelszimbólumokat, amelyek növeik vagy csökkentik az indentálást.", + "schema.autoClosingPairs": "Meghatározza a zárójelpárokat. Ha egy nyitó zárójelet írnak be a szerkesztőbe, a záró párja automatikusan be lesz illesztve.", + "schema.autoClosingPairs.notIn": "Azon hatókörök listája, ahol az automatikus zárójelek automatikus párosítása le van tiltve.", + "schema.surroundingPairs": "Meghatározza azok zárójelpárok listáját, melyek használhatók a kijelölt szöveg körbezárására.", + "schema.wordPattern": "A nyelvben található szavak definíciója.", + "schema.wordPattern.pattern": "A szavak illesztésére használt reguláris kifejezés.", + "schema.wordPattern.flags": "A szavak illesztésére használt reguláris kifejezés beállításai.", + "schema.wordPattern.flags.errorMessage": "Illeszkednie kell a következő mintára: `/^([gimuy]+)$/`." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/node/textMate/TMGrammars.i18n.json b/i18n/hun/src/vs/editor/node/textMate/TMGrammars.i18n.json new file mode 100644 index 0000000000000..4ae6117a727d9 --- /dev/null +++ b/i18n/hun/src/vs/editor/node/textMate/TMGrammars.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.grammars": "TextMate-tokenizálókat szolgáltat.", + "vscode.extension.contributes.grammars.language": "Annak a nyelvnek az azonosítója, amely számára szolgáltatva van ez a szintaxis.", + "vscode.extension.contributes.grammars.scopeName": "A tmLanguage-fájl által használt TextMate-hatókör neve.", + "vscode.extension.contributes.grammars.path": "A tmLanguage-fájl elérési útja. Az elérési út relatív a kiegészítő mappájához képest, és általában './syntaxes/'-zal kezdődik.", + "vscode.extension.contributes.grammars.embeddedLanguages": "Hatókörnév-nyelvazonosító kulcs-érték párokat tartalmazó objektum, ha a nyelvtan tartalmaz beágyazott nyelveket.", + "vscode.extension.contributes.grammars.injectTo": "Azon nyelvi hatókörök nevei, ahová be lesz ágyazva ez a nyelvtan." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/actions/browser/menuItemActionItem.i18n.json b/i18n/hun/src/vs/platform/actions/browser/menuItemActionItem.i18n.json new file mode 100644 index 0000000000000..e64a7d0ed09f0 --- /dev/null +++ b/i18n/hun/src/vs/platform/actions/browser/menuItemActionItem.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "titleAndKb": "{0} ({1})" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/hun/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json new file mode 100644 index 0000000000000..e935364b995c1 --- /dev/null +++ b/i18n/hun/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "a menüelemeket tömbként kell megadni", + "requirestring": "a(z) `{0}` tulajdonság kötelező és `string` típusúnak kell lennie", + "optstring": "a(z) `{0}` tulajdonság elhagyható vagy `string` típusúnak kell lennie", + "vscode.extension.contributes.menuItem.command": "A végrehajtandó parancs azonosítója. A parancsot a 'commands'-szakaszban kell deklarálni", + "vscode.extension.contributes.menuItem.alt": "Egy alternatív végrehajtandó parancs azonosítója. A parancsot a 'commands'-szakaszban kell deklarálni", + "vscode.extension.contributes.menuItem.when": "A feltételnek igaznak kell lennie az elem megjelenítéséhez", + "vscode.extension.contributes.menuItem.group": "A csoport, amibe a parancs tartozik", + "vscode.extension.contributes.menus": "Menüket szolgáltat a szerkesztőhöz", + "menus.commandPalette": "A parancskatalógus", + "menus.editorTitle": "A szerkesztőablak címsora menüje", + "menus.editorContext": "A szerkesztőablak helyi menüje", + "menus.explorerContext": "A fájlkezelő helyi menüje", + "menus.editorTabContext": "A szerkesztőablak füleinek helyi menüje", + "menus.debugCallstackContext": "A hibakeresési hívási verem helyi menüje", + "menus.scmTitle": "A verziókezelő címsora menüje", + "menus.resourceGroupContext": "A verziókezelő erőforráscsoportja helyi menüje", + "menus.resourceStateContext": "A verziókzeleő erőforrásállapot helyi menüje", + "view.viewTitle": "A szolgáltatott nézet címsorának menüje", + "view.itemContext": "A szolgáltatott nézet elemének helyi menüje", + "nonempty": "az érték nem lehet üres.", + "opticon": "a(z) `icon` tulajdonság elhagyható vagy ha van értéke, akkor string vagy literál (pl. `{dark, light}`) típusúnak kell lennie", + "requireStringOrObject": "a(z) `{0}` tulajdonság kötelező és `string` vagy `object` típusúnak kell lennie", + "requirestrings": "a(z) `{0}` és `{1}` tulajdonságok kötelezők és `string` típusúnak kell lenniük", + "vscode.extension.contributes.commandType.command": "A végrehajtandó parancs azonosítója", + "vscode.extension.contributes.commandType.title": "A cím, amivel a parancs meg fog jelenni a felhasználói felületen", + "vscode.extension.contributes.commandType.category": "(Nem kötelező) Kategória neve, amibe a felületen csoportosítva lesz a parancs", + "vscode.extension.contributes.commandType.icon": "(Nem kötelező) Ikon, ami reprezentálni fogja a parancsot a felhasználói felületen. Egy fájl elérési útja vagy egy színtéma-konfiguráció", + "vscode.extension.contributes.commandType.icon.light": "Az ikon elérési útja, ha világos téma van használatban", + "vscode.extension.contributes.commandType.icon.dark": "Az ikon elérési útja, ha sötét téma van használatban", + "vscode.extension.contributes.commands": "Parancsokat szolgáltat a parancskatalógushoz.", + "dup": "A(z) `{0}` parancs többször szerepel a `commands`-szakaszban.", + "menuId.invalid": "A(z) `{0}` nem érvényes menüazonosító", + "missing.command": "A menüpont a(z) `{0}` parancsra hivatkozik, ami nincs deklarálva a 'commands'-szakaszban.", + "missing.altCommand": "A menüpont a(z) `{0}` alternatív parancsra hivatkozik, ami nincs deklarálva a 'commands'-szakaszban.", + "dupe.command": "A menüpont ugyanazt a parancsot hivatkozza alapértelmezett és alternatív parancsként", + "nosupport.altCommand": "Jelenleg csak az 'editor/title' menü 'navigation' csoportja támogatja az alternatív parancsokat" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/configuration/common/configurationRegistry.i18n.json b/i18n/hun/src/vs/platform/configuration/common/configurationRegistry.i18n.json new file mode 100644 index 0000000000000..28d32f3188954 --- /dev/null +++ b/i18n/hun/src/vs/platform/configuration/common/configurationRegistry.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultConfigurations.title": "Felülírt alapértelmezett konfigurációk", + "overrideSettings.description": "A szerkesztő beállításainak felülírása a(z) {0} nyelvre vonatkozóan", + "overrideSettings.defaultDescription": "A szerkesztő beállításainak felülírása egy adott nyelvre vonatkozóan", + "config.property.languageDefault": "A(z) '{0}' nem regisztrálható. Ez a beállítás illeszkedik a '\\\\[.*\\\\]$' mintára, ami a nyelvspecifikus szerkesztőbeállításokhoz van használva. Használja a 'configurationDefaults' szolgáltatási lehetőséget.", + "config.property.duplicate": "A(z) '{0}' nem regisztrálható: ez a tulajdonság már regisztrálva van." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/environment/node/argv.i18n.json b/i18n/hun/src/vs/platform/environment/node/argv.i18n.json new file mode 100644 index 0000000000000..e6ca14e40be7d --- /dev/null +++ b/i18n/hun/src/vs/platform/environment/node/argv.i18n.json @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "gotoValidation": "`--goto` mód esetén az argumentumokat a következő formában kell megadni: `FÁJL(:SOR(:OSZLOP))`.", + "diff": "Megnyit egy diffszerkesztőt. Argumentumként két fájl elérési útját kell átadni.", + "goto": "Megnyitja a megadott elérési úton található fájlt a megadott sornál és oszlopnál (a :sor[:oszlop] információt az elérési út végére kell fűzni)", + "locale": "A használt lokalizáció (pl. en-US vagy zh-TW)", + "newWindow": "Mindenképp induljon új példány a Code-ból.", + "performance": "Indítás a 'Developer: Startup Performance' parancs engedélyezésével.", + "prof-startup": "Processzorhasználat profilozása induláskor", + "reuseWindow": "Fájl vagy mappa megnyitása a legutoljára aktív ablakban.", + "userDataDir": "Meghatározza a könyvtárat, ahol a felhasználói adatok vannak tárolva. Hasznás, ha rootként van futtatva.", + "verbose": "Részletes kimenet kiírása (magába foglalja a --wait kapcsolót)", + "wait": "Várjon az ablak bezárására a visszatérés előtt.", + "extensionHomePath": "A kiegészítők gyökérkönyvtárának beállítása.", + "listExtensions": "Telepített kiegészítők listázása.", + "showVersions": "Telepített kiegészítők verziójának megjelenítése a --list-extension kapcsoló használata esetén.", + "installExtension": "Kiegészítő telepítése.", + "uninstallExtension": "Kiegészítő eltávolítása.", + "experimentalApis": "Tervezett API-funkciók engedélyezése egy kiegészítő számára.", + "disableExtensions": "Összes telepített kiegészítő letiltása.", + "disableGPU": "Hardveres gyorsítás letiltása.", + "version": "Verzió kiírása.", + "help": "Használati útmutató kiírása.", + "usage": "Használat", + "options": "beállítások", + "paths": "elérési utak", + "optionsUpperCase": "Beálítások" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/extensionManagement/common/extensionEnablementService.i18n.json b/i18n/hun/src/vs/platform/extensionManagement/common/extensionEnablementService.i18n.json new file mode 100644 index 0000000000000..5da094f11e357 --- /dev/null +++ b/i18n/hun/src/vs/platform/extensionManagement/common/extensionEnablementService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noWorkspace": "Nincs munkaterület." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/extensionManagement/common/extensionManagement.i18n.json b/i18n/hun/src/vs/platform/extensionManagement/common/extensionManagement.i18n.json new file mode 100644 index 0000000000000..c6aca38bd35a8 --- /dev/null +++ b/i18n/hun/src/vs/platform/extensionManagement/common/extensionManagement.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensions": "Kiegészítők", + "preferences": "Beállítások" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/hun/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json new file mode 100644 index 0000000000000..62fa385ee0481 --- /dev/null +++ b/i18n/hun/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "notFound": "Kiegészítő nem található", + "noCompatible": "A(z) {0} kiegészítőnek nincs ezzel a Code-verzióval kompatibilis változata." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json b/i18n/hun/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json new file mode 100644 index 0000000000000..9a21167685a8b --- /dev/null +++ b/i18n/hun/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalidManifest": "A kiegészítő érvénytelen: a package.json nem egy JSON-fájl.", + "restartCode": "Indítsa újra a Code-ot a(z) {0} újratelepítése előtt.", + "installDependeciesConfirmation": "A(z) '{0}' teleítése során annak függőségei is telepítve lesznek. Szeretné folytatni?", + "install": "Igen", + "doNotInstall": "Nem", + "uninstallDependeciesConfirmation": "Csak a(z) '{0}' kiegészítőt szeretné eltávolítani vagy annak függőségeit is?", + "uninstallOnly": "Csak ezt", + "uninstallAll": "Mindent", + "cancel": "Mégse", + "uninstallConfirmation": "Biztosan szeretné eltávolítani a(z) '{0}' kiegészítőt?", + "ok": "OK", + "singleDependentError": "Nem sikerült eltávolítani a(z) '{0}' kiegészítőt: a(z) '{1}' kiegészítő függ tőle.", + "twoDependentsError": "Nem sikerült eltávolítani a(z) '{0}' kiegészítőt: a(z) '{1}' és '{2}' kiegészítők függnek tőle.", + "multipleDependentsError": "Nem sikerült eltávolítani a(z) '{0}' kiegészítőt: a(z) '{1}', '{2}' és más kiegészítők függnek tőle.", + "notExists": "Nem sikerült megtalálni a kiegészítőt" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/extensions/common/abstractExtensionService.i18n.json b/i18n/hun/src/vs/platform/extensions/common/abstractExtensionService.i18n.json new file mode 100644 index 0000000000000..a4e5d9f9437b0 --- /dev/null +++ b/i18n/hun/src/vs/platform/extensions/common/abstractExtensionService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownDep": "A(z) `{1}` kiegészítőt nem sikerült aktiválni. Oka: ismeretlen függőség: `{0}`.", + "failedDep1": "A(z) `{1}` kiegészítőt nem sikerült aktiválni. Oka: a(z) `{0}` függőséget nem sikerült aktiválni.", + "failedDep2": "A(z) `{0}` kiegészítőt nem sikerült aktiválni. Oka: több, mint 10 szintnyi függőség van (nagy valószínűséggel egy függőségi hurok miatt).", + "activationError": "A(z) `{0}` kiegészítő aktiválása nem sikerült: {1}." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/hun/src/vs/platform/extensions/common/extensionsRegistry.i18n.json new file mode 100644 index 0000000000000..d7c85757ebd94 --- /dev/null +++ b/i18n/hun/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.engines.vscode": "VS Code kiegészítőkhöz. Meghatározza azt a VS Code-verziót, amivel a kiegészítő kompatibilis. Nem lehet *. Például a ^0.10.5 a VS Code minimum 0.10.5-ös verziójával való kompatibilitást jelzi.", + "vscode.extension.publisher": "A VS Code-kiegészítő kiadója.", + "vscode.extension.displayName": "A kiegészítő VS Code galériában megjelenített neve.", + "vscode.extension.categories": "A VS Code-galériában való kategorizálásra használt kategóriák.", + "vscode.extension.galleryBanner": "A VS Code piactéren használt szalagcím.", + "vscode.extension.galleryBanner.color": "A VS Code piactéren használt szalagcím színe.", + "vscode.extension.galleryBanner.theme": "A szalagcímben használt betűtípus színsémája.", + "vscode.extension.contributes": "A csomagban található összes szolgáltatás, amit ez a VS Code kiterjesztés tartalmaz.", + "vscode.extension.preview": "A kiegészítő előnézetesnek jelölése a piactéren.", + "vscode.extension.activationEvents": "A VS Code kiegészítő aktiválási eseményei.", + "vscode.extension.activationEvents.onLanguage": "Aktiváló esemény, ami akkor fut le, ha az adott nyelvhez társított fájl kerül megnyitásra.", + "vscode.extension.activationEvents.onCommand": "Aktiváló esemény, ami akkor fut le, amikor a megadott parancsot meghívják.", + "vscode.extension.activationEvents.onDebug": "Aktiváló esemény, ami akkor fut le, amikor elindul az adott típusú hibakeresési folyamat.", + "vscode.extension.activationEvents.workspaceContains": "Aktiváló esemény, ami akkor fut le, ha egy olyan mappa kerül megnyitásra, amiben legalább egy olyan fájl van, amely illeszkedik a megadott globális mintára.", + "vscode.extension.activationEvents.onView": "Aktiváló esemény, ami akkor fut le, amikor a megadott nézetet kiterjesztik.", + "vscode.extension.activationEvents.star": "Aktiváló esemény, ami a VS Code indításakor fut le. A jó felhasználói élmény érdekében csak akkor használja ezt az eseményt, ha más aktiváló események nem alkalmasak az adott kiegészítő esetében.", + "vscode.extension.badges": "A kiegészítő piactéren található oldalának oldalsávjában megjelenő jelvények listája.", + "vscode.extension.badges.url": "A jelvény kép URL-je.", + "vscode.extension.badges.href": "A jelvény hivatkozása.", + "vscode.extension.badges.description": "A jelvény leírása.", + "vscode.extension.extensionDependencies": "Más kiegészítők, melyek függőségei ennek a kiegészítőnek. A kiegészítők azonosítója mindig ${publisher}.${name} formájú. Például: vscode.csharp.", + "vscode.extension.scripts.prepublish": "A VS Code kiegészítő publikálása előtt végrehajtott parancsfájl.", + "vscode.extension.icon": "Egy 128x128 pixeles ikon elérési útja." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/extensions/node/extensionValidator.i18n.json b/i18n/hun/src/vs/platform/extensions/node/extensionValidator.i18n.json new file mode 100644 index 0000000000000..6d0f5c97cf419 --- /dev/null +++ b/i18n/hun/src/vs/platform/extensions/node/extensionValidator.i18n.json @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "versionSyntax": "Nem sikerült feldolgozni az `engines.vscode` beállítás értékét ({0}). Használja például a következők egyikét: ^0.10.0, ^1.2.3, ^0.11.0, ^0.10.x stb.", + "versionSpecificity1": "Az `engines.vscode` beállításban megadott érték ({0}) nem elég konkrét. A vscode 1.0.0 előtti verzióihoz legalább a kívánt fő- és alverziót is meg kell adni. Pl.: ^0.10.0, 0.10.x, 0.11.0 stb.", + "versionSpecificity2": "Az `engines.vscode` beállításban megadott érték ({0}) nem elég konkrét. A vscode 1.0.0 utáni verzióihoz legalább a kívánt főverziót meg kell adni. Pl.: ^1.10.0, 1.10.x, 1.x.x, 2.x.x stb.", + "versionMismatch": "A kiegészítő nem kompatibilis a Code {0} verziójával. A következő szükséges hozzá: {1}.", + "extensionDescription.empty": "A kiegészítő leírása üres", + "extensionDescription.publisher": "a(z) `{0}` tulajdonság kötelező és `string` típusúnak kell lennie", + "extensionDescription.name": "a(z) `{0}` tulajdonság kötelező és `string` típusúnak kell lennie", + "extensionDescription.version": "a(z) `{0}` tulajdonság kötelező és `string` típusúnak kell lennie", + "extensionDescription.engines": "a(z) `{0}` tulajdonság kötelező és `object` típusúnak kell lennie", + "extensionDescription.engines.vscode": "a(z) `{0}` tulajdonság kötelező és `string` típusúnak kell lennie", + "extensionDescription.extensionDependencies": "a(z) `{0}` tulajdonság elhagyható vagy `string[]` típusúnak kell lennie", + "extensionDescription.activationEvents1": "a(z) `{0}` tulajdonság elhagyható vagy `string[]` típusúnak kell lennie", + "extensionDescription.activationEvents2": "a(z) `{0}` és `{1}` megadása kötelező vagy mindkettőt el kell hagyni", + "extensionDescription.main1": "a(z) `{0}` tulajdonság elhagyható vagy `string` típusúnak kell lennie", + "extensionDescription.main2": "A `main` ({0}) nem a kiegészítő mappáján belül található ({1}). Emiatt előfordulhat, hogy a kiegészítő nem lesz hordozható.", + "extensionDescription.main3": "a(z) `{0}` és `{1}` megadása kötelező vagy mindkettőt el kell hagyni", + "notSemver": "A kiegészítő verziója nem semver-kompatibilis." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/history/electron-main/historyMainService.i18n.json b/i18n/hun/src/vs/platform/history/electron-main/historyMainService.i18n.json new file mode 100644 index 0000000000000..a8e30a812a242 --- /dev/null +++ b/i18n/hun/src/vs/platform/history/electron-main/historyMainService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "newWindow": "Új ablak", + "newWindowDesc": "Nyit egy új ablakot", + "recentFolders": "Legutóbbi mappák", + "folderDesc": "{0} {1}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/integrity/node/integrityServiceImpl.i18n.json b/i18n/hun/src/vs/platform/integrity/node/integrityServiceImpl.i18n.json new file mode 100644 index 0000000000000..b60e588de5f64 --- /dev/null +++ b/i18n/hun/src/vs/platform/integrity/node/integrityServiceImpl.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "integrity.ok": "OK", + "integrity.dontShowAgain": "Ne jelenítse meg újra", + "integrity.moreInfo": "További információ", + "integrity.prompt": "A feltelepített {0} hibásnak tűnik. Telepítse újra!" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/jsonschemas/common/jsonValidationExtensionPoint.i18n.json b/i18n/hun/src/vs/platform/jsonschemas/common/jsonValidationExtensionPoint.i18n.json new file mode 100644 index 0000000000000..8e300a2fd3874 --- /dev/null +++ b/i18n/hun/src/vs/platform/jsonschemas/common/jsonValidationExtensionPoint.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "contributes.jsonValidation": "JSON-sémakonfigurációkat szolgáltat.", + "contributes.jsonValidation.fileMatch": "Az illesztendő fájlok mintája, például \"package.json\" vagy \"*.launch\".", + "contributes.jsonValidation.url": "A séma URL-címe ('http:', 'https:') vagy relatív elérési útja a kiegészítő mappájához képest ('./').", + "invalid.jsonValidation": "a 'configuration.jsonValidation' értékét tömbként kell megadni", + "invalid.fileMatch": "a 'configuration.jsonValidation.fileMatch' tulajdonság kötelező", + "invalid.url": "a 'configuration.jsonValidation.url' értéke URL-cím vagy relatív elérési út lehet", + "invalid.url.fileschema": "a 'configuration.jsonValidation.url' érvénytelen relatív elérési utat tartalmaz: {0}", + "invalid.url.schema": "a 'configuration.jsonValidation.url' érténének 'http:'-tal, 'https:'-tal, vagy a kiegészítőben elhelyezett sémák hivatkozása esetén './'-rel kell kezdődnie." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/keybinding/common/abstractKeybindingService.i18n.json b/i18n/hun/src/vs/platform/keybinding/common/abstractKeybindingService.i18n.json new file mode 100644 index 0000000000000..3e93e9b7ff5fc --- /dev/null +++ b/i18n/hun/src/vs/platform/keybinding/common/abstractKeybindingService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "first.chord": "Lenyomta a következőt: ({0}). Várakozás a kombináció második billentyűjére...", + "missing.chord": "A(z) ({0}, {1}) billentyűkombináció nem egy parancs." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/hun/src/vs/platform/markers/common/problemMatcher.i18n.json new file mode 100644 index 0000000000000..a798666f204eb --- /dev/null +++ b/i18n/hun/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -0,0 +1,70 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ProblemPatternParser.loopProperty.notLast": "A loop tulajdonság csak az utolsó, sorra illesztő kifejezésnél támogatott.", + "ProblemPatternParser.problemPattern.missingRegExp": "A problémamintából hiányzik egy reguláris kifejezés.", + "ProblemPatternParser.problemPattern.missingProperty": "A probléma mintája érvénytelen. Mindenképp tartalmaznia kell egy fájlra, egy üzenetre és egy sorra vagy helyre illesztő csoportot.", + "ProblemPatternParser.invalidRegexp": "Hiba: A(z) {0} karakterlánc nem érvényes reguláris kifejezés.\n", + "ProblemPatternSchema.regexp": "A kimenetben található hibák, figyelmeztetések és információk megkeresésére használt reguláris kifejezés.", + "ProblemPatternSchema.file": "Annak az illesztési csoportnak az indexe, amely tartalmazza azt, hogy a probléma melyik fájlban található. Ha nincs megadva, akkor az alapértelmezett érték, 1 van használva.", + "ProblemPatternSchema.location": "Annak az illesztési csoportnak az indexe, amely tartalmazza a probléma helyét. Az érvényes minták helyek illesztésére: (line), (line,column) és (startLine,startColumn,endLine,endColumn). Ha nincs megadva, akkor a (line,column) van feltételezve.", + "ProblemPatternSchema.line": "Annak az illesztési csoportnak az indexe, amely tartalmazza azt, hogy a probléma hanyadik sorban található. Alapértelmezett értéke 2.", + "ProblemPatternSchema.column": "Annak az illesztési csoportnak az indexe, amely tartalmazza azt, hogy a probléma az adott soron belül mely oszlopban található. Alapértelmezett értéke 3.", + "ProblemPatternSchema.endLine": "Annak az illesztési csoportnak az indexe, amely tartalmazza azt, hogy a probléma mely sorban ér véget. Alapértelmezett értéke határozatlan.", + "ProblemPatternSchema.endColumn": "Annak az illesztési csoportnak az indexe, amely tartalmazza azt, hogy a probléma vége a zárósoron belül mely oszlopban található. Alapértelmezett értéke határozatlan.", + "ProblemPatternSchema.severity": "Annak az illesztési csoportnak az indexe, amely tartalmazza a probléma súlyosságát. Alapértelmezett értéke határozatlan.", + "ProblemPatternSchema.code": "Annak az illesztési csoportnak az indexe, amely tartalmazza a problémás kódrészletet. Alapértelmezett értéke határozatlan.", + "ProblemPatternSchema.message": "Annak az illesztési csoportnak az indexe, amely tartalmazza az üzenetet. Ha nincs megadva, és a location paraméternek van értéke, akkor a 4, minden más esetben 5 az alapértelmezett érték.", + "ProblemPatternSchema.loop": "Több soros illesztés esetén meghatározza, hogy az aktuális minta mindaddig végre legyen-e hajtva, amíg eredményt talál. Csak többsoros minta esetén használható, utolsóként.", + "NamedProblemPatternSchema.name": "A problémaminta neve.", + "NamedMultiLineProblemPatternSchema.name": "A többsoros problémaminta neve.", + "NamedMultiLineProblemPatternSchema.patterns": "A konkrét minkák.", + "ProblemPatternExtPoint": "Problémamintákat szolgáltat.", + "ProblemPatternRegistry.error": "Érvénytelen problémaminta. A minta figyelmen kívül lesz hagyva.", + "ProblemMatcherParser.noProblemMatcher": "Hiba: a leírást nem sikerült problémaillesztővé alakítani:\n{0}\n", + "ProblemMatcherParser.noProblemPattern": "Hiba: a leírás nem definiál érvényes problémamintát:\n{0}\n", + "ProblemMatcherParser.noOwner": "Hiba: a leírás nem határoz meg tulajdonost:\n{0}\n", + "ProblemMatcherParser.noFileLocation": "Hiba: a leírás nem határoz meg fájlhelyszínt:\n{0}\n", + "ProblemMatcherParser.unknownSeverity": "Információ: ismeretlen súlyosság: {0}. Az érvényes értékek: error, warning és info.\n", + "ProblemMatcherParser.noDefinedPatter": "Hiba: nem létezik {0} azonosítóval rendelkező minta.", + "ProblemMatcherParser.noIdentifier": "Hiba: a minta tulajdonság egy üres azonosítóra hivatkozik.", + "ProblemMatcherParser.noValidIdentifier": "Hiba: a minta {0} tulajdonsága nem érvényes mintaváltozónév.", + "ProblemMatcherParser.problemPattern.watchingMatcher": "A problémaillesztőnek definiálnia kell a kezdőmintát és a zárómintát is a figyeléshez.", + "ProblemMatcherParser.invalidRegexp": "Hiba: A(z) {0} karakterlánc nem érvényes reguláris kifejezés.\n", + "WatchingPatternSchema.regexp": "Reguláris kifejezés a háttérben futó feladat indulásának vagy befejeződésének detektálására.", + "WatchingPatternSchema.file": "Annak az illesztési csoportnak az indexe, amely tartalmazza azt, hogy a probléma melyik fájlban található. Elhagyható.", + "PatternTypeSchema.name": "Egy szolgáltatott vagy elődefiniált minta neve", + "PatternTypeSchema.description": "Egy problémaminta vagy egy szolgáltatott vagy elődefiniált problémaminta neve. Elhagyható, ha az alapként használandó minta meg van adva.", + "ProblemMatcherSchema.base": "A alapként használni kívánt problémaillesztő neve.", + "ProblemMatcherSchema.owner": "A probléma tulajdonosa a Code-on belül. Elhagyható, ha az alapként használt minta meg van adva. Alapértelmezett értéke 'external', ha nem létezik és az alapként használt minta nincs meghatározva.", + "ProblemMatcherSchema.severity": "Az elkapott problémák alapértelmezett súlyossága. Ez az érték van használva, ha a minta nem definiál illesztési csoportot a súlyossághoz.", + "ProblemMatcherSchema.applyTo": "Meghatározza, hogy a szöveges dokumentumhoz jelentett probléma megnyitott, bezárt vagy minden dokumentumra legyen alkalmazva.", + "ProblemMatcherSchema.fileLocation": "Meghatározza, hogy a problémamintában talált fájlnevek hogyan legyenek értelmezve.", + "ProblemMatcherSchema.background": "Minták, melyekkel követhető egy háttérben futó feladaton aktív illesztő indulása és befejeződése.", + "ProblemMatcherSchema.background.activeOnStart": "Ha értéke igaz, akkor a háttérfeladat aktív módban van, amikor a feladat indul. Ez egyenlő egy olyan sor kimenetre történő kiírásával, ami illeszkedik a beginPatternre.", + "ProblemMatcherSchema.background.beginsPattern": "Ha illeszkedik a kimenetre, akkor a háttérben futó feladat elindulása lesz jelezve.", + "ProblemMatcherSchema.background.endsPattern": "Ha illeszkedik a kimenetre, akkor a háttérben futó feladat befejeződése lesz jelezve.", + "ProblemMatcherSchema.watching.deprecated": "A watching tulajdonság elavult. Használja a backgroundot helyette.", + "ProblemMatcherSchema.watching": "Minták, melyekkel következő a figyelő illesztők indulása és befejeződése.", + "ProblemMatcherSchema.watching.activeOnStart": "Ha értéke igaz, akkor a figyelő aktív módban van, amikor a feladat indul. Ez egyenlő egy olyan sor kimenetre történő kiírásával, ami illeszkedik a beginPatternre.", + "ProblemMatcherSchema.watching.beginsPattern": "Ha illeszkedik a kimenetre, akkor a figyelő feladat elindulása lesz jelezve.", + "ProblemMatcherSchema.watching.endsPattern": "Ha illeszkedik a kimenetre, akkor a figyelő feladat befejeződése lesz jelezve.", + "LegacyProblemMatcherSchema.watchedBegin.deprecated": "Ez a tulajdonság elavult. Használja a watching tulajdonságot helyette.", + "LegacyProblemMatcherSchema.watchedBegin": "Reguláris kifejezés, mely jelzi, hogy a figyeltő feladatok fájlmódosítás miatt éppen műveletet hajtanak végre.", + "LegacyProblemMatcherSchema.watchedEnd.deprecated": "Ez a tulajdonság elavult. Használja a watching tulajdonságot helyette.", + "LegacyProblemMatcherSchema.watchedEnd": "Reguláros kifejezés, ami jelzi, hogy a figyelő feladat befejezte a végrehajtást.", + "NamedProblemMatcherSchema.name": "A problémaillesztő neve, amivel hivatkozni lehet rá.", + "NamedProblemMatcherSchema.label": "A problémaillesztő leírása emberek számára.", + "ProblemMatcherExtPoint": "Problémaillesztőket szolgáltat.", + "msCompile": "Microsoft fordítói problémák", + "lessCompile": "Less-problémák", + "gulp-tsc": "Gulp TSC-problémák", + "jshint": "JSHint-problémák", + "jshint-stylish": "JSHint stylish-problémák", + "eslint-compact": "ESLint compact-problémák", + "eslint-stylish": "ESLint stylish-problémák", + "go": "Go-problémák" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/message/common/message.i18n.json b/i18n/hun/src/vs/platform/message/common/message.i18n.json new file mode 100644 index 0000000000000..a4f556eb01c23 --- /dev/null +++ b/i18n/hun/src/vs/platform/message/common/message.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "Bezárás", + "later": "Később", + "cancel": "Mégse" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/request/node/request.i18n.json b/i18n/hun/src/vs/platform/request/node/request.i18n.json new file mode 100644 index 0000000000000..83987512ccd7c --- /dev/null +++ b/i18n/hun/src/vs/platform/request/node/request.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "httpConfigurationTitle": "HTTP", + "proxy": "A használni kívánt proxybeállítás. Ha nincs beállítva, a http_proxy és a https_proxy környezeti változókból lesz átvéve", + "strictSSL": "A proxyszerver tanúsítványa hitelesítve legyen-e a megadott hitelesítésszolgáltatóknál.", + "proxyAuthorization": "Minden hálózati kérés 'Proxy-Authorization' fejlécében küldendő érték." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/telemetry/common/telemetryService.i18n.json b/i18n/hun/src/vs/platform/telemetry/common/telemetryService.i18n.json new file mode 100644 index 0000000000000..312528f889138 --- /dev/null +++ b/i18n/hun/src/vs/platform/telemetry/common/telemetryService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Telemetria", + "telemetry.enableTelemetry": "Használati adatok és hibák küldésének engedélyezése a Microsoft felé." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/hun/src/vs/platform/theme/common/colorRegistry.i18n.json new file mode 100644 index 0000000000000..a99f22077dcb7 --- /dev/null +++ b/i18n/hun/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -0,0 +1,89 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid.color": "Érvénytelen színformátum. Az #RGB, #RGBA, #RRGGBB vagy #RRGGBBAA formátum használható.", + "schema.colors": "A munkaterületen használt színek.", + "foreground": "Általános előtérszín. Csak akkor van használva, ha nem írja felül az adott komponens.", + "errorForeground": "A hibaüzenetek általános előtérszíne. Csak akkor van használva, ha nem írja felül az adott komponens.", + "descriptionForeground": "A további információkat szolgáltató leíró szövegek, pl. a címkék előtérszíne.", + "focusBorder": "Fókuszált elemek keretének általános színe. Csak akkor van használva, ha nem írja felül az adott komponens.", + "contrastBorder": "Az elemek körüli extra keret, mely arra szolgál, hogy elválassza egymástól őket, így növelve a kontrasztot.", + "activeContrastBorder": "Az aktív elemek körüli extra keret, mely arra szolgál, hogy elválassza egymástól őket, így növelve a kontrasztot.", + "selectionBackground": "A munkaterületen kijelölt szövegek háttérszíne (pl. beviteli mezők vagy szövegmezők esetén). Ez a beállítás nem vonatkozik a szerkesztőablakban végzett kijelölésekre. ", + "textSeparatorForeground": "A szövegelválasztók színe.", + "textLinkForeground": "A szövegben található hivatkozások előtérszíne.", + "textLinkActiveForeground": "A szövegben található aktív hivatkozások előtérszíne.", + "textPreformatForeground": "Az előformázott szövegrészek előtérszíne.", + "textBlockQuoteBackground": "A szövegben található idézetblokkok háttérszíne.", + "textBlockQuoteBorder": "A szövegben található idézetblokkok keretszíne.", + "textCodeBlockBackground": "A szövegben található kódblokkok háttérszíne.", + "widgetShadow": "A szerkesztőablakon belül található modulok, pl. a keresés/csere árnyékának színe.", + "inputBoxBackground": "A beviteli mezők háttérszíne.", + "inputBoxForeground": "A beviteli mezők előtérszíne.", + "inputBoxBorder": "A beviteli mezők kerete.", + "inputBoxActiveOptionBorder": "A beviteli mezőben található aktivált beállítások keretszíne.", + "inputPlaceholderForeground": "A beviteli mezőkben használt helykitöltő szövegek előtérszíne.", + "inputValidationInfoBackground": "Beviteli mezők háttérszíne információs szintű validációs állapot esetén.", + "inputValidationInfoBorder": "Beviteli mezők keretszíne információs szintű validációs állapot esetén.", + "inputValidationWarningBackground": "Beviteli mezők háttérszíne figyelmeztetés szintű validációs állapot esetén.", + "inputValidationWarningBorder": "Beviteli mezők keretszíne figyelmeztetés szintű validációs állapot esetén.", + "inputValidationErrorBackground": "Beviteli mezők háttérszíne hiba szintű validációs állapot esetén.", + "inputValidationErrorBorder": "Beviteli mezők keretszíne hiba szintű validációs állapot esetén.", + "dropdownBackground": "A legördülő menük háttérszíne.", + "dropdownForeground": "A legördülő menük előtérszíne.", + "dropdownBorder": "A legördülő menük kerete.", + "listFocusBackground": "Listák/fák fókuszált elemének háttérszine, amikor a lista aktív. Egy aktív listának/fának van billentyűfőkusza, míg egy inaktívnak nincs.", + "listFocusForeground": "Listák/fák fókuszált elemének előtérszíne, amikor a lista aktív. Egy aktív listának/fának van billentyűfőkusza, míg egy inaktívnak nincs.", + "listActiveSelectionBackground": "Listák/fák kiválasztott elemének háttérszíne, amikor a lista aktív. Egy aktív listának/fának van billentyűfőkusza, míg egy inaktívnak nincs.", + "listActiveSelectionForeground": "Listák/fák kiválasztott elemének előtérszíne, amikor a lista aktív. Egy aktív listának/fának van billentyűfőkusza, míg egy inaktívnak nincs.", + "listInactiveSelectionBackground": "Listák/fák kiválasztott elemének háttérszíne, amikor a lista inaktív. Egy aktív listának/fának van billentyűfőkusza, míg egy inaktívnak nincs.", + "listInactiveSelectionForeground": "Listák/fák kiválasztott elemének előtérszíne, amikor a lista inaktív. Egy aktív listának/fának van billentyűfőkusza, míg egy inaktívnak nincs.", + "listHoverBackground": "A lista/fa háttérszíne, amikor az egérkurzor egy adott elem fölé kerül.", + "listHoverForeground": "A lista/fa előtérszíne, amikor az egérkurzor egy adott elem fölé kerül.", + "listDropBackground": "A lista/fa háttérszíne, amikor az elemek az egérkurzorral vannak mozgatva egyik helyről a másikra.", + "highlight": "Kiemelt találatok előtérszíne a listában/fában való keresés esetén.", + "pickerGroupForeground": "Csoportcímkék színe a gyorsválasztóban.", + "pickerGroupBorder": "Csoportok keretszíne a gyorsválasztóban.", + "buttonForeground": "A gombok előtérszíne.", + "buttonBackground": "A gombok háttérszíne.", + "buttonHoverBackground": "A gomb háttérszine, ha az egérkurzor fölötte van.", + "badgeBackground": "A jelvények háttérszíne. A jelvények apró információs címkék, pl. a keresési eredmények számának jelzésére.", + "badgeForeground": "A jelvények előtérszíne. A jelvények apró információs címkék, pl. a keresési eredmények számának jelzésére.", + "scrollbarShadow": "A görgetősáv árnyéka, ami jelzi, hogy a nézet el van görgetve.", + "scrollbarSliderBackground": "A csúszkák háttérszíne.", + "scrollbarSliderHoverBackground": "A csúszkák háttérszíne, ha az egérkurzor felette van.", + "scrollbarSliderActiveBackground": "Az aktív csúszkák háttérszíne.", + "progressBarBackground": "A hosszú ideig tartó folyamatok esetén megjelenített folyamatjelző háttérszíne.", + "editorBackground": "A szerkesztőablak háttérszíne.", + "editorForeground": "A szerkesztőablak alapértelmezett előtérszíne.", + "editorWidgetBackground": "A szerkesztőablak moduljainak háttérszíne, pl. a keresés/cserének.", + "editorWidgetBorder": "A szerkesztőablak-modulok keretszíne. A szín csak akkor van használva, ha a modul beállítása alapján rendelkezik kerettel, és a színt nem írja felül a modul.", + "editorSelectionBackground": "A szerkesztőablak-szakasz színe.", + "editorSelectionForeground": "A kijelölt szöveg színe nagy kontrasztú téma esetén.", + "editorInactiveSelection": "Az inaktív szerkesztőablakban található kijelölések színe.", + "editorSelectionHighlight": "A kijelöléssel megegyező tartalmú területek színe.", + "editorFindMatch": "A keresés jelenlegi találatának színe.", + "findMatchHighlight": "A keresés további találatainak színe.", + "findRangeHighlight": "A keresést korlátozó terület színe.", + "hoverHighlight": "Kiemelés azon szó alatt, amely fölött lebegő elem jelenik meg.", + "hoverBackground": "A szerkesztőablakban lebegő elemek háttérszíne.", + "hoverBorder": "A szerkesztőablakban lebegő elemek keretszíne.", + "activeLinkForeground": "Az aktív hivatkozások háttérszíne.", + "diffEditorInserted": "A beillesztett szövegek háttérszíne.", + "diffEditorRemoved": "Az eltávolított szövegek háttérszíne.", + "diffEditorInsertedOutline": "A beillesztett szövegek körvonalának színe.", + "diffEditorRemovedOutline": "Az eltávolított szövegek körvonalának színe.", + "mergeCurrentHeaderBackground": "A helyi tartalom fejlécének háttérszíne sorok között megjelenített összeolvasztási konfliktusok esetén.", + "mergeCurrentContentBackground": "A helyi tartalom háttérszíne sorok között megjelenített összeolvasztási konfliktusok esetén.", + "mergeIncomingHeaderBackground": "A beérkező tartalom fejlécének háttérszíne sorok között megjelenített összeolvasztási konfliktusok esetén.", + "mergeIncomingContentBackground": "A beérkező tartalom háttérszíne sorok között megjelenített összeolvasztási konfliktusok esetén.", + "mergeCommonHeaderBackground": "A közös ős tartalom fejlécének háttérszíne sorok között megjelenített összeolvasztási konfliktusok esetén. ", + "mergeCommonContentBackground": "A közös ős tartalom háttérszíne sorok között megjelenített összeolvasztási konfliktusok esetén. ", + "mergeBorder": "A fejlécek és az elválasztó sáv keretszíne a sorok között megjelenített összeolvasztási konfliktusok esetén.", + "overviewRulerCurrentContentForeground": "A helyi tartalom előtérszíne az áttekintő sávon összeolvasztási konfliktusok esetén.", + "overviewRulerIncomingContentForeground": "A beérkező tartalom előtérszíne az áttekintő sávon összeolvasztási konfliktusok esetén.", + "overviewRulerCommonContentForeground": "A közös ős tartalom előtérszíne az áttekintő sávon összeolvasztási konfliktusok esetén. " +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/hun/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json new file mode 100644 index 0000000000000..c9ac5c4a1264f --- /dev/null +++ b/i18n/hun/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "overwritingExtension": "A(z) {0} kiegészítő felülírása a következővel: {1}.", + "extensionUnderDevelopment": "A(z) {0} elérési úton található fejlesztői kiegészítő betöltése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/hun/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json new file mode 100644 index 0000000000000..32ac1f41978bc --- /dev/null +++ b/i18n/hun/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "Bezárás", + "cancel": "Mégse", + "ok": "OK" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/api/node/extHostDiagnostics.i18n.json b/i18n/hun/src/vs/workbench/api/node/extHostDiagnostics.i18n.json new file mode 100644 index 0000000000000..4b78aadacdece --- /dev/null +++ b/i18n/hun/src/vs/workbench/api/node/extHostDiagnostics.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "limitHit": "{0} további hiba és figyelmeztetés nem jelenik meg." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/hun/src/vs/workbench/api/node/extHostTask.i18n.json new file mode 100644 index 0000000000000..4b90a12aaf247 --- /dev/null +++ b/i18n/hun/src/vs/workbench/api/node/extHostTask.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "task.label": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/hun/src/vs/workbench/api/node/extHostTreeViews.i18n.json new file mode 100644 index 0000000000000..ad630367cbae5 --- /dev/null +++ b/i18n/hun/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeView.notRegistered": "Nincs '{0}' azonosítóval regisztrált fanézet.", + "treeItem.notFound": "Nincs '{0}' azonosítójú elem a fában.", + "treeView.duplicateElement": "A(z) {0} elem már regisztrálva van" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/actions/configureLocale.i18n.json b/i18n/hun/src/vs/workbench/browser/actions/configureLocale.i18n.json new file mode 100644 index 0000000000000..fde77c790146f --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/actions/configureLocale.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "configureLocale": "Nyelv beállítása", + "displayLanguage": "Meghatározza a VSCode felületének nyelvét.", + "doc": "Az elérhető nyelvek listája a következő címen tekinthető meg: {0}", + "restart": "Az érték módosítása után újra kell indítani a VSCode-ot.", + "fail.createSettings": "A(z) '{0}' nem hozható létre ({1})", + "JsonSchema.locale": "A felhasználói felületen használt nyelv." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/actions/fileActions.i18n.json b/i18n/hun/src/vs/workbench/browser/actions/fileActions.i18n.json new file mode 100644 index 0000000000000..3aa4638c36778 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/actions/fileActions.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFolder": "Mappa megnyitása...", + "openFileFolder": "Megnyitás...", + "addFolderToWorkspace": "Mappa hozzáadása a munkaterülethez...", + "add": "Hozzáadás", + "addFolderToWorkspaceTitle": "Mappa hozzáadása a munkaterülethez", + "removeFolderFromWorkspace": "Mappa eltávolítása a munkaterületről" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/actions/toggleActivityBarVisibility.i18n.json b/i18n/hun/src/vs/workbench/browser/actions/toggleActivityBarVisibility.i18n.json new file mode 100644 index 0000000000000..5855d42c943d0 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/actions/toggleActivityBarVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleActivityBar": "Tevékenységsáv be- és kikapcsolása", + "view": "Nézet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/actions/toggleEditorLayout.i18n.json b/i18n/hun/src/vs/workbench/browser/actions/toggleEditorLayout.i18n.json new file mode 100644 index 0000000000000..3880a172e267e --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/actions/toggleEditorLayout.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleEditorGroupLayout": "Szerkesztőablak-csoport vízszintes/függőleges elrendezésének váltása", + "horizontalLayout": "Szerkesztőablak-csoport elrendezése vízszintesen", + "verticalLayout": "Szerkesztőablak-csoport elrendezése függőlegesen", + "view": "Nézet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json b/i18n/hun/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json new file mode 100644 index 0000000000000..b5b22901d6a80 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "Oldalsáv helyének váltása", + "view": "Nézet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/actions/toggleSidebarVisibility.i18n.json b/i18n/hun/src/vs/workbench/browser/actions/toggleSidebarVisibility.i18n.json new file mode 100644 index 0000000000000..851dacaba5cea --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/actions/toggleSidebarVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleSidebar": "Oldalsáv be- és kikapcsolása", + "view": "Nézet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/actions/toggleStatusbarVisibility.i18n.json b/i18n/hun/src/vs/workbench/browser/actions/toggleStatusbarVisibility.i18n.json new file mode 100644 index 0000000000000..b2087b12af601 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/actions/toggleStatusbarVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleStatusbar": "Állapotsor be- és kikapcsolása", + "view": "Nézet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/actions/toggleZenMode.i18n.json b/i18n/hun/src/vs/workbench/browser/actions/toggleZenMode.i18n.json new file mode 100644 index 0000000000000..de2a4b219be26 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/actions/toggleZenMode.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleZenMode": "Zen mód be- és kikapcsolása", + "view": "Nézet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/activitybar/activitybarActions.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/activitybar/activitybarActions.i18n.json new file mode 100644 index 0000000000000..38f496cc0eecb --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/activitybar/activitybarActions.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeFromActivityBar": "Eltávolítás a tevékenységsávról", + "keepInActivityBar": "Megtartás a tevékenységsávon", + "titleKeybinding": "{0} ({1})", + "additionalViews": "További nézetek", + "numberBadge": "{0} ({1})", + "manageExtension": "Kiegészítő kezelése", + "toggle": "Nézet rögzítésének be- és kikapcsolása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json new file mode 100644 index 0000000000000..266ac56433e84 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hideActivitBar": "Tevékenységsáv elrejtése", + "activityBarAriaLabel": "Az aktív nézet váltása", + "globalActions": "Globális műveletek" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/compositePart.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/compositePart.i18n.json new file mode 100644 index 0000000000000..46148b0c7c3bd --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/compositePart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ariaCompositeToolbarLabel": "{0} művelet", + "titleTooltip": "{0} ({1})" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/binaryDiffEditor.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/binaryDiffEditor.i18n.json new file mode 100644 index 0000000000000..a38af02d66352 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/binaryDiffEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "metadataDiff": "{0} ↔ {1}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/binaryEditor.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/binaryEditor.i18n.json new file mode 100644 index 0000000000000..a8bbd66e2e814 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/binaryEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "binaryEditor": "Bináris megjelenítő" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json new file mode 100644 index 0000000000000..186c2e66b64ba --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "textEditor": "Szövegszerkesztő", + "textDiffEditor": "Szöveges tartalmak differenciaszerkesztő ablaka", + "binaryDiffEditor": "Bináris tartalmak differenciaszerkesztő ablaka", + "sideBySideEditor": "Párhuzamos szerkesztőablakok", + "groupOnePicker": "Az első csoportban található szerkesztőablakok megjelenítése", + "groupTwoPicker": "A második csoportban található szerkesztőablakok megjelenítése", + "groupThreePicker": "A harmadik csoportban található szerkesztőablakok megjelenítése", + "allEditorsPicker": "Összes megnyitott szerkesztőablak megjelenítése", + "view": "Nézet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/editorActions.i18n.json new file mode 100644 index 0000000000000..e2495b74e21de --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -0,0 +1,56 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "splitEditor": "Szerkesztő kettéosztása", + "joinTwoGroups": "Két szerkesztőcsoport összevonása", + "navigateEditorGroups": "Váltás szerkesztőcsoportok között", + "focusActiveEditorGroup": "Váltás az aktív szerkesztőcsoportra", + "focusFirstEditorGroup": "Váltás az első szerkesztőcsoportra", + "focusSecondEditorGroup": "Váltás a második szerkesztőcsoportra", + "focusThirdEditorGroup": "Váltás a harmadik szerkesztőcsoportra", + "focusPreviousGroup": "Váltás az előző csoportra", + "focusNextGroup": "Váltás a következő csoportra", + "openToSide": "Megnyitás oldalt", + "closeEditor": "Szerkesztőablak bezárása", + "revertAndCloseActiveEditor": "Visszaállítás és szerkesztőablak bezárása", + "closeEditorsToTheLeft": "Balra lévő szerkesztőablakok bezárása", + "closeEditorsToTheRight": "Jobbra lévő szerkesztőablakok bezárása", + "closeAllEditors": "Összes szerkesztőablak bezárása", + "closeUnmodifiedEditors": "Nem módosult szerkesztőablakok bezárása a csoportban", + "closeEditorsInOtherGroups": "A többi csoport szerkesztőablakainak bezárása", + "closeOtherEditorsInGroup": "Többi szerkesztőablak bezárása", + "closeEditorsInGroup": "A csoportban lévő összes szerkesztőablak bezárása", + "moveActiveGroupLeft": "Szerkesztőablak-csoport mozgatása balra", + "moveActiveGroupRight": "Szerkesztőablak-csoport mozgatása jobbra", + "minimizeOtherEditorGroups": "Többi szerkesztőablak-csoport kis méretűvé tétele", + "evenEditorGroups": "Szerkesztőablak-csoportok egyenlő méretűvé tétele", + "maximizeEditor": "Szerkesztőablak-csoport nagy méretűvé tétele és oldalsáv elrejtése", + "keepEditor": "Szerkesztőablak nyitva tartása", + "openNextEditor": "Következő szerkesztőablak megnyitása", + "openPreviousEditor": "Előző szerkesztőablak megnyitása", + "nextEditorInGroup": "A csoport következő szerkesztőablakának megnyitása", + "openPreviousEditorInGroup": "A csoport előző szerkesztőablakának megnyitása", + "navigateNext": "Ugrás előre", + "navigatePrevious": "Ugrás vissza", + "reopenClosedEditor": "Bezárt szerkesztőablak újranyitása", + "clearRecentFiles": "Legutóbbi fájlok listájának törlése", + "showEditorsInFirstGroup": "Az első csoportban található szerkesztőablakok megjelenítése", + "showEditorsInSecondGroup": "A második csoportban található szerkesztőablakok megjelenítése", + "showEditorsInThirdGroup": "A harmadik csoportban található szerkesztőablakok megjelenítése", + "showEditorsInGroup": "A csoportban található szerkesztőablakok megjelenítése", + "showAllEditors": "Összes szerkesztőablak megjelenítése", + "openPreviousRecentlyUsedEditorInGroup": "A csoportban előző legutoljára használt szerksztőablak megnyitása", + "openNextRecentlyUsedEditorInGroup": "A csoportban következő legutoljára használt szerksztőablak megnyitása", + "navigateEditorHistoryByInput": "Előző szerkesztőablak menyitása az előzményekből", + "openNextRecentlyUsedEditor": "A következő legutoljára használt szerksztőablak megnyitása", + "openPreviousRecentlyUsedEditor": "Az előző legutoljára használt szerksztőablak megnyitása", + "clearEditorHistory": "Szerkesztőablak-előzmények törlése", + "focusLastEditorInStack": "Csoport utolsó szerkesztőablakának megnyitása", + "moveEditorLeft": "Szerkesztőablak mozgatása balra", + "moveEditorRight": "Szerkesztőablak mozgatása jobbra", + "moveEditorToPreviousGroup": "Szerkesztőablak mozgatása az előző csoportba", + "moveEditorToNextGroup": "Szerkesztőablak mozgatása a következő csoportba" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json new file mode 100644 index 0000000000000..6e6ffe92dbd1e --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorCommand.activeEditorMove.description": "Aktív szerkesztőablak mozgatása fülek vagy csoportok között", + "editorCommand.activeEditorMove.arg.name": "Aktív szerkesztőablak mozgatási argumentum", + "editorCommand.activeEditorMove.arg.description": "Argumentumtulajdonságok:\n\t\t\t\t\t\t* 'to': karakterlánc, a mozgatás célpontja.\n\t\t\t\t\t\t* 'by': karakterlánc, a mozgatás egysége. Fülek (tab) vagy csoportok (group) alapján.\n\t\t\t\t\t\t* 'value': szám, ami meghatározza, hogy hány pozíciót kell mozgatni, vagy egy abszolút pozíciót, ahová mozgatni kell.\n\t\t\t\t\t", + "commandDeprecated": "A(z) **{0}** parancs el lett távolítva. A(z) **{1}** használható helyette", + "openKeybindings": "Billentyűparancsok beállítása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/editorPart.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/editorPart.i18n.json new file mode 100644 index 0000000000000..6936103772894 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/editorPart.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "groupOneVertical": "Bal", + "groupTwoVertical": "Középső", + "groupThreeVertical": "Jobb", + "groupOneHorizontal": "Felső", + "groupTwoHorizontal": "Középső", + "groupThreeHorizontal": "Alsó", + "editorOpenError": "Nem sikerült megnyitni a(z) '{0}' fájlt: {1}." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/editorPicker.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/editorPicker.i18n.json new file mode 100644 index 0000000000000..51a1f4752547d --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/editorPicker.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, szerkesztőcsoport-választó", + "groupLabel": "Csoport: {0}", + "noResultsFoundInGroup": "A csoportban nem található ilyen nyitott szerkesztőablak", + "noOpenedEditors": "A csoportban jelenleg nincs megnyitott szerkesztőablak", + "noResultsFound": "Nem található ilyen nyitott szerkesztőablak", + "noOpenedEditorsAllGroups": "Jelenleg nincs megnyitott szerkesztőablak" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json new file mode 100644 index 0000000000000..cf37b615cda9c --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -0,0 +1,51 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "singleSelectionRange": "{0}. sor, {1}. oszlop ({2} kijelölve)", + "singleSelection": "{0}. sor, {1}. oszlop", + "multiSelectionRange": "{0} kijelölés ({1} karakter kijelölve)", + "multiSelection": "{0} kijelölés", + "endOfLineLineFeed": "LF", + "endOfLineCarriageReturnLineFeed": "CRLF", + "tabFocusModeEnabled": "Tab fókuszt vált", + "screenReaderDetected": "Képernyőolvasó érzékelve", + "screenReaderDetectedExtra": "Ha nem használ képernyőolvasót, állítsa az `editor.accessibilitySupport` értékét \"off\"-ra.", + "disableTabMode": "Kisegítő mód letiltása", + "gotoLine": "Sor megkeresése", + "indentation": "Indentálás", + "selectEncoding": "Kódolás kiválasztása", + "selectEOL": "Sorvégjel kiválasztása", + "selectLanguageMode": "Nyelvmód kiválasztása", + "fileInfo": "Fájlinformáció", + "spacesSize": "Szóközök: {0}", + "tabSize": "Tabulátorméret: {0}", + "showLanguageExtensions": "'{0}' kiegészítő keresése a piactéren...", + "changeMode": "Nyelvmód váltása", + "noEditor": "Jelenleg nincs aktív szerkesztőablak", + "languageDescription": "({0}) - Beállított nyelv", + "languageDescriptionConfigured": "({0})", + "languagesPicks": "nyelvek (azonosító)", + "configureModeSettings": "'{0}' nyelvi beállítások módosítása...", + "configureAssociationsExt": "'{0}' fájlhozzárendelések módosítása...", + "autoDetect": "Automatikus felderítés", + "pickLanguage": "Nyelvmód kiválasztása", + "currentAssociation": "Jelenlegi társítás", + "pickLanguageToConfigure": "A(z) '{0}' kiterjesztéshez társított nyelvmód kiválasztása", + "changeIndentation": "Indentálás módosítása", + "noWritableCodeEditor": "Az aktív kódszerkesztő-ablak írásvédett módban van.", + "indentView": "nézet váltása", + "indentConvert": "fájl konvertálása", + "pickAction": "Művelet kiválasztása", + "changeEndOfLine": "Sorvégjel módosítása", + "pickEndOfLine": "Sorvégjel kiválasztása", + "changeEncoding": "Fájlkódolás módosítása", + "noFileEditor": "Jelenleg nincs aktív fájl", + "saveWithEncoding": "Mentés adott kódolással", + "reopenWithEncoding": "Újranyitás adott kódolással", + "guessedEncoding": "Kitalálva a tartalomból", + "pickEncodingForReopen": "Válassza ki a kódolást a fájl újranyitásához", + "pickEncodingForSave": "Válassza ki a mentéshez használandó kódolást" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/tabsTitleControl.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/tabsTitleControl.i18n.json new file mode 100644 index 0000000000000..716abaa9fd041 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/tabsTitleControl.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "araLabelTabActions": "Fülműveletek" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/textDiffEditor.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/textDiffEditor.i18n.json new file mode 100644 index 0000000000000..0cb7c46cb05e4 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/textDiffEditor.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "textDiffEditor": "Szöveges tartalmak differenciaszerkesztő ablaka", + "readonlyEditorWithInputAriaLabel": "{0}. Írásvédett szövegösszehasonlító.", + "readonlyEditorAriaLabel": "Írásvédett szövegösszehasonlító.", + "editableEditorWithInputAriaLabel": "{0}. Szövegfájl-összehasonlító.", + "editableEditorAriaLabel": "Szövegfájl-összehasonlító.", + "navigate.next.label": "Következő módosítás", + "navigate.prev.label": "Előző módosítás", + "inlineDiffLabel": "Váltás inline nézetre", + "sideBySideDiffLabel": "Váltás párhuzamos nézetre" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/textEditor.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/textEditor.i18n.json new file mode 100644 index 0000000000000..bc6c6d9162f3d --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/textEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorLabelWithGroup": "{0}, {1}. csoport" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/textResourceEditor.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/textResourceEditor.i18n.json new file mode 100644 index 0000000000000..357b1df914cd4 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/textResourceEditor.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "textEditor": "Szövegszerkesztő", + "readonlyEditorWithInputAriaLabel": "{0}. Írásvédett szövegszerkesztő.", + "readonlyEditorAriaLabel": "Írásvédett szövegszerkesztő.", + "untitledFileEditorWithInputAriaLabel": "{0}. Névtelen szövegszerkesztő.", + "untitledFileEditorAriaLabel": "Névtelen szövegszerkesztő." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/titleControl.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/titleControl.i18n.json new file mode 100644 index 0000000000000..0ef6405cab271 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/titleControl.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "Bezárás", + "closeOthers": "Többi bezárása", + "closeRight": "Jobbra lévők bezárása", + "closeAll": "Összes bezárása", + "closeAllUnmodified": "Nem módosultak bezárása", + "keepOpen": "Maradjon nyitva", + "showOpenedEditors": "Megnyitott szerkesztőablak megjelenítése", + "araLabelEditorActions": "Szerkesztőablak-műveletek" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/panel/panelActions.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/panel/panelActions.i18n.json new file mode 100644 index 0000000000000..79a37ed7da4fa --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/panel/panelActions.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "panelActionTooltip": "{0} ({1})", + "closePanel": "Panel bezárása", + "togglePanel": "Panel be- és kikapcsolása", + "focusPanel": "Váltás a panelra", + "toggleMaximizedPanel": "Teljes méretű panel be- és kikapcsolása", + "maximizePanel": "Panel teljes méretűvé tétele", + "minimizePanel": "Panel méretének visszaállítása", + "view": "Nézet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/panel/panelPart.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/panel/panelPart.i18n.json new file mode 100644 index 0000000000000..6bbddde875317 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/panel/panelPart.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "panelSwitcherBarAriaLabel": "Az aktív panel váltása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/quickopen/quickOpenController.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/quickopen/quickOpenController.i18n.json new file mode 100644 index 0000000000000..d1d7a5732f949 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/quickopen/quickOpenController.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inputModeEntryDescription": "{0} (Nyomjon 'Enter'-t a megerősítéshez vagy 'Escape'-et a megszakításhoz)", + "inputModeEntry": "Nyomjon 'Enter'-t a megerősítéshez vagy 'Escape'-et a megszakításhoz", + "emptyPicks": "Nincs választható elem", + "quickOpenInput": "A végrehajtható műveletek körét a ? karakter beírásával tekintheti meg", + "historyMatches": "legutóbb megnyitott", + "noResultsFound1": "Nincs találat", + "canNotRunPlaceholder": "A jelenlegi kontextusban nem használható a gyorsmegnyitási funkció", + "entryAriaLabel": "{0}, legutóbb megnyitott", + "removeFromEditorHistory": "Eltávolítás az előzményekből", + "pickHistory": "Válassza ki azt a szerkesztőablakot, amit el szeretne távolítani az előzményekből" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json new file mode 100644 index 0000000000000..1686ffdab02d6 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpen": "File megkeresése...", + "quickNavigateNext": "Ugrás a következőre a fájlok gyors megnyitásánál", + "quickNavigatePrevious": "Ugrás az előzőre a fájlok gyors megnyitásánál", + "quickSelectNext": "Következő kiválasztása a fájlok gyors megnyitásánál", + "quickSelectPrevious": "Előző kiválasztása a fájlok gyors megnyitásánál" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/sidebar/sidebarPart.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/sidebar/sidebarPart.i18n.json new file mode 100644 index 0000000000000..f150e0f9ff209 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/sidebar/sidebarPart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "focusSideBar": "Váltás az oldalsávra", + "viewCategory": "Nézet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/statusbar/statusbarPart.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/statusbar/statusbarPart.i18n.json new file mode 100644 index 0000000000000..3cc19480b6240 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/statusbar/statusbarPart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "canNotRun": "A(z) '{0}' parancs jelenleg nem engedélyezett és nem futtatható.", + "manageExtension": "Kiegészítő kezelése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/titlebar/titlebarPart.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/titlebar/titlebarPart.i18n.json new file mode 100644 index 0000000000000..6ed546539cf83 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/titlebar/titlebarPart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "patchedWindowTitle": "[Nem támogatott]", + "devExtensionWindowTitlePrefix": "[Kiegészítő fejlesztői példány]" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/quickopen.i18n.json b/i18n/hun/src/vs/workbench/browser/quickopen.i18n.json new file mode 100644 index 0000000000000..3f67d6f3e139d --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/quickopen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultsMatching": "Nincs eredmény", + "noResultsFound2": "Nincs találat", + "entryAriaLabel": "{0}, parancs" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/viewlet.i18n.json b/i18n/hun/src/vs/workbench/browser/viewlet.i18n.json new file mode 100644 index 0000000000000..1d02ba8d6eed1 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/viewlet.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "collapse": "Összes bezárása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/common/theme.i18n.json b/i18n/hun/src/vs/workbench/common/theme.i18n.json new file mode 100644 index 0000000000000..4966ba698450e --- /dev/null +++ b/i18n/hun/src/vs/workbench/common/theme.i18n.json @@ -0,0 +1,61 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tabActiveBackground": "Az aktív fül háttérszíne. A fülek tartalmazzák a szerkesztőablakoket a szerkesztőterületen. Egy szerkesztőablak-csoportban több fül is megnyitható. Több szerkesztőablak-csoportot is létre lehet hozni.", + "tabInactiveBackground": "Az inaktív fülek háttérszíne. A fülek tartalmazzák a szerkesztőablakoket a szerkesztőterületen. Egy szerkesztőablak-csoportban több fül is megnyitható. Több szerkesztőablak-csoportot is létre lehet hozni.", + "tabBorder": "A füleket egymástól elválasztó keret színe. A fülek tartalmazzák a szerkesztőablakoket a szerkesztőterületen. Egy szerkesztőablak-csoportban több fül is megnyitható. Több szerkesztőablak-csoportot is létre lehet hozni.", + "tabActiveForeground": "Az aktív fül előtérszíne az aktív csoportban. A fülek tartalmazzák a szerkesztőablakoket a szerkesztőterületen. Egy szerkesztőablak-csoportban több fül is megnyitható. Több szerkesztőablak-csoportot is létre lehet hozni.", + "tabInactiveForeground": "Az inaktív fülek előtérszíne az aktív csoportban. A fülek tartalmazzák a szerkesztőablakoket a szerkesztőterületen. Egy szerkesztőablak-csoportban több fül is megnyitható. Több szerkesztőablak-csoportot is létre lehet hozni.", + "tabUnfocusedActiveForeground": "Az aktív fül előtérszíne az inaktív csoportokban. A fülek tartalmazzák a szerkesztőablakoket a szerkesztőterületen. Egy szerkesztőablak-csoportban több fül is megnyitható. Több szerkesztőablak-csoportot is létre lehet hozni.", + "tabUnfocusedInactiveForeground": "Az inaktív fülek előtérszíne inaktív csoportokban. A fülek tartalmazzák a szerkesztőablakoket a szerkesztőterületen. Egy szerkesztőablak-csoportban több fül is megnyitható. Több szerkesztőablak-csoportot is létre lehet hozni.", + "editorGroupBackground": "A szerkesztőcsoportok háttérszíne. A szerkesztőcsoportok szerkesztőablakokat tartalmaznak. A háttérszín akkor jelenik meg, ha a szerkesztőcsoportok mozgatva vannak.", + "tabsContainerBackground": "A szerkesztőcsoport címsorának háttérszíne, ha a fülek engedélyezve vannak. A szerkesztőcsoportok szerkesztőablakokat tartalmaznak.", + "tabsContainerBorder": "A szerkesztőcsoport címsorának keretszíne, ha a fülek engedélyezve vannak. A szerkesztőcsoportok szerkesztőablakokat tartalmaznak.", + "editorGroupHeaderBackground": "A szerkesztőcsoport címsorának keretszíne, ha a fülek le vannak tiltva. A szerkesztőcsoportok szerkesztőablakokat tartalmaznak.", + "editorGroupBorder": "A szerkesztőcsoportokat elválasztó vonal színe. A szerkesztőcsoportok szerkesztőablakokat tartalmaznak.", + "editorDragAndDropBackground": "A szerkesztőablakok mozgatásánál használt háttérszín. Érdemes átlátszó színt választani, hogy a szerkesztőablak tartalma továbbra is látszódjon.", + "panelBackground": "A panelek háttérszíne. A panelek a szerkesztőterület alatt jelennek meg, és pl. itt található a kimenetet és az integrált terminál.", + "panelBorder": "A panelek keretszíne, ami elválasztja őket a szerkesztőablakoktól. A panelek a szerkesztőterület alatt jelennek meg, és pl. itt található a kimenetet és az integrált terminál.", + "panelActiveTitleForeground": "Az aktív panel címsorának színe. A panelek a szerkesztőterület alatt jelennek meg, és pl. itt található a kimenetet és az integrált terminál.", + "panelInactiveTitleForeground": "Az inaktív panelek címsorának színe. A panelek a szerkesztőterület alatt jelennek meg, és pl. itt található a kimenetet és az integrált terminál.", + "panelActiveTitleBorder": "Az aktív panel címsorának keretszíne. A panelek a szerkesztőterület alatt jelennek meg, és pl. itt található a kimenetet és az integrált terminál.", + "statusBarForeground": "Az állapotsor előtérszíne. Az állapotsor az ablak alján jelenik meg.", + "statusBarBackground": "Az állapotsor alapértelmezett háttérszíne. Az állapotsor az ablak alján jelenik meg.", + "statusBarBorder": "Az állapotsort az oldalsávtól és a szerkesztőablakoktól elválasztó keret színe. Az állapotsor az ablak alján jelenik meg.", + "statusBarNoFolderBackground": "Az állapotsor háttérszíne, ha nincs mappa megnyitva. Az állapotsor az ablak alján jelenik meg.", + "statusBarNoFolderForeground": "Az állapotsor előtérszíne, ha nincs mappa megnyitva. Az állapotsor az ablak alján jelenik meg.", + "statusBarItemActiveBackground": "Az állapotsor elemének háttérszíne kattintás esetén. Az állapotsor az ablak alján jelenik meg.", + "statusBarItemHoverBackground": "Az állapotsor elemének háttérszíne, ha az egérkurzor fölötte van. Az állapotsor az ablak alján jelenik meg.", + "statusBarProminentItemBackground": "Az állapotsor kiemelt elemeinek háttérszíne. A kiemelt elemek kitűnnek az állapotsor többi eleme közül, így jelezve a fontosságukat. Az állapotsor az ablak alján jelenik meg.", + "statusBarProminentItemHoverBackground": "Az állapotsor kiemelt elemeinek háttérszíne, ha az egérkurzor fölöttük van. A kiemelt elemek kitűnnek az állapotsor többi eleme közül, így jelezve a fontosságukat. Az állapotsor az ablak alján jelenik meg.", + "activityBarBackground": "A tevékenységsáv háttérszíne. A tevékenységsáv az ablak legszélén jelenik meg bal vagy jobb oldalon, segítségével lehet váltani az oldalsáv nézetei között.", + "activityBarForeground": "A tevékenységsáv előtérszíne (pl. az ikonok színe). A tevékenységsáv az ablak legszélén jelenik meg bal vagy jobb oldalon, segítségével lehet váltani az oldalsáv nézetei között.", + "activityBarBorder": "A tevékenyésgsáv keretszíne, ami elválasztja az oldalsávtól. A tevékenységsáv az ablak legszélén jelenik meg bal vagy jobb oldalon, segítségével lehet váltani az oldalsáv nézetei között.", + "activityBarDragAndDropBackground": "A tevékenységsáv elemeinek mozgatásánál használt visszajelzési szín. Érdemes átlátszó színt választani, hogy a tevékenységsáv elemei láthatóak maradjanak. A tevékenységsáv az ablak legszélén jelenik meg bal vagy jobb oldalon, segítségével lehet váltani az oldalsáv nézetei között.", + "activityBarBadgeBackground": "A tevékenységsáv értesítési jelvényeinek háttérszíne. A tevékenységsáv az ablak legszélén jelenik meg bal vagy jobb oldalon, segítségével lehet váltani az oldalsáv nézetei között.", + "activityBarBadgeForeground": "A tevékenységsáv értesítési jelvényeinek előtérszíne. A tevékenységsáv az ablak legszélén jelenik meg bal vagy jobb oldalon, segítségével lehet váltani az oldalsáv nézetei között.", + "sideBarBackground": "Az oldalsáv háttérszíne. Az oldalsávon található például a fájlkezelő és a keresés nézet.", + "sideBarForeground": "Az oldalsáv előtérszíne. Az oldalsávon található például a fájlkezelő és a keresés nézet.", + "sideBarBorder": "Az oldalsáv keretszíne, ami elválasztja a szerkesztőablaktól. Az oldalsávon található például a fájlkezelő és a keresés nézet.", + "sideBarTitleForeground": "Az oldalsáv címsorának előtérszíne. Az oldalsávon található például a fájlkezelő és a keresés nézet.", + "sideBarSectionHeaderBackground": "Az oldalsáv szakaszfejlécének háttérszíne. Az oldalsávon található például a fájlkezelő és a keresés nézet.", + "sideBarSectionHeaderForeground": "Az oldalsáv szakaszfejlécének előtérszíne. Az oldalsávon található például a fájlkezelő és a keresés nézet.", + "titleBarActiveForeground": "A címsor előtérszíne, ha az ablak aktív. Megjegyzés: ez a beállítás jelenleg csak macOS-en támogatott.", + "titleBarInactiveForeground": "A címsor előtérszíne, ha az ablak inaktív. Megjegyzés: ez a beállítás jelenleg csak macOS-en támogatott.", + "titleBarActiveBackground": "A címsor háttérszíne, ha az ablak aktív. Megjegyzés: ez a beállítás jelenleg csak macOS-en támogatott.", + "titleBarInactiveBackground": "A címsor háttérszíne, ha az ablak inaktív. Megjegyzés: ez a beállítás jelenleg csak macOS-en támogatott.", + "notificationsForeground": "Az értesítések előtérszíne. Az értesítések az ablak tetején ugranak fel.", + "notificationsBackground": "Az értesítések háttérszíne. Az értesítések az ablak tetején ugranak fel.", + "notificationsButtonBackground": "Az értesítések gombjainak háttérszíne. Az értesítések az ablak tetején ugranak fel.", + "notificationsButtonHoverBackground": "Az értesítések gombjainak háttérszíne, ha az egérkurzor fölöttük van. Az értesítések az ablak tetején ugranak fel.", + "notificationsButtonForeground": "Az értesítések gombjainak előtérszíne. Az értesítések az ablak tetején ugranak fel.", + "notificationsInfoBackground": "Az információs értesítések háttérszíne. Az értesítések az ablak tetején ugranak fel.", + "notificationsInfoForeground": "Az információs értesítések előtérszíne. Az értesítések az ablak tetején ugranak fel.", + "notificationsWarningBackground": "A figyelmeztető értesítések háttérszíne. Az értesítések az ablak tetején ugranak fel.", + "notificationsWarningForeground": "A figyelmeztető értesítések előtérszíne. Az értesítések az ablak tetején ugranak fel.", + "notificationsErrorBackground": "A hibajelző értesítések háttérszíne. Az értesítések az ablak tetején ugranak fel.", + "notificationsErrorForeground": "A hibajelző értesítések előtérszíne. Az értesítések az ablak tetején ugranak fel." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/hun/src/vs/workbench/electron-browser/actions.i18n.json new file mode 100644 index 0000000000000..5508f235887e4 --- /dev/null +++ b/i18n/hun/src/vs/workbench/electron-browser/actions.i18n.json @@ -0,0 +1,44 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "closeActiveEditor": "Szerkesztőablak bezárása", + "closeWindow": "Ablak bezárása", + "closeFolder": "Mappa bezárása", + "noFolderOpened": "Ebben a példányban nincs mappa megnyitva, amit be lehetne zárni.", + "newWindow": "Új ablak", + "toggleFullScreen": "Teljes képernyő be- és kikapcsolása", + "toggleMenuBar": "Menüsáv be- és kikapcsolása", + "toggleDevTools": "Fejlesztői eszközök be- és kikapcsolása", + "zoomIn": "Nagyítás", + "zoomOut": "Kicsinyítés", + "zoomReset": "Nagyítási szint alaphelyzetbe állítása", + "appPerf": "Indulási teljesítmény", + "reloadWindow": "Ablak újratöltése", + "switchWindowPlaceHolder": "Válassza ki az ablakot, amire váltani szeretne", + "current": "Aktuális ablak", + "switchWindow": "Ablak váltása...", + "quickSwitchWindow": "Gyors ablakváltás...", + "folders": "mappák", + "files": "fájlok", + "openRecentPlaceHolderMac": "Válasszon egy elérési utat! (A Cmd billentyű lenyomása esetén új ablakban nyílik meg)", + "openRecentPlaceHolder": "Válasszon egy elérési utat! (A Ctrl billentyű lenyomása esetén új ablakban nyílik meg)", + "openRecent": "Legutóbbi megnyitása...", + "quickOpenRecent": "Legutóbbi gyors megnyitása...", + "closeMessages": "Értesítések törlése", + "reportIssues": "Problémák jelentése", + "reportPerformanceIssue": "Teljesítményproblémák jelentése", + "keybindingsReference": "Billentyűparancs-referencia", + "openDocumentationUrl": "Dokumentáció", + "openIntroductoryVideosUrl": "Bemutatóvideók", + "openTipsAndTricksUrl": "Tippek és trükkök", + "toggleSharedProcess": "Megosztott folyamat be- és klikapcsolása", + "navigateLeft": "Navigálás a balra lévő nézetre", + "navigateRight": "Navigálás a jobbra lévő nézetre", + "navigateUp": "Navigálás a felül lévő nézetre", + "navigateDown": "Navigálás az alul lévő nézetre", + "increaseViewSize": "Jelenlegi nézet méretének növelése", + "decreaseViewSize": "Jelenlegi nézet méretének csökkentése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/electron-browser/commands.i18n.json b/i18n/hun/src/vs/workbench/electron-browser/commands.i18n.json new file mode 100644 index 0000000000000..3a1051dcfdad7 --- /dev/null +++ b/i18n/hun/src/vs/workbench/electron-browser/commands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "diffLeftRightLabel": "{0} ⟷ {1}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/electron-browser/extensionHost.i18n.json b/i18n/hun/src/vs/workbench/electron-browser/extensionHost.i18n.json new file mode 100644 index 0000000000000..5968259f60f85 --- /dev/null +++ b/i18n/hun/src/vs/workbench/electron-browser/extensionHost.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensionHostProcess.startupFailDebug": "A kiegészítő gazdafolyamata nem idult el 10 másodperben belül. Elképzelhető, hogy megállt az első soron, és szüksége van a hibakeresőre a folytatáshoz.", + "extensionHostProcess.startupFail": "A kiegészítő gazdafolyamata nem idult el 10 másodperben belül. Ez probléma lehet.", + "extensionHostProcess.error": "A kiegészítő gazdafolyamatától hiba érkezett: {0}", + "devTools": "Fejlesztői eszközök", + "extensionHostProcess.crash": "A kiegészítő gazdafolyamata váratlanul leállt. Töltse újra az ablakot a visszaállításhoz." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/hun/src/vs/workbench/electron-browser/main.contribution.i18n.json new file mode 100644 index 0000000000000..2a2e37b0a787a --- /dev/null +++ b/i18n/hun/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -0,0 +1,69 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "view": "Nézet", + "help": "Súgó", + "file": "Fájl", + "developer": "Fejlesztői", + "showEditorTabs": "Meghatározza, hogy a megnyitott szerkesztőablakok telején megjelenjenek-e a fülek", + "editorTabCloseButton": "Meghatározza a szerkesztőablakok fülein található bezárógomb pozícióját vagy eltávolítja őket, ha a beállítás értéke 'off'.", + "showIcons": "Meghatározza, hogy a megnyitott szerkesztőablakok ikonnal együtt jelenjenek-e meg. A működéshez szükséges egy ikontéma engedélyezése is.", + "enablePreview": "Meghatározza, hogy a megnyitott szerkesztőablakok előnézetként jelenjenek-e meg. Az előnézetként használt szerkesztőablakok újra vannak hasznosítva, amíg meg nem tartja őket a felhasználó (pl. dupla kattintás vagy szerkesztés esetén).", + "enablePreviewFromQuickOpen": "Meghatározza, hogy a gyors megnyitás során megnyitott szerkesztőablakok előnézetként jelenjenek-e meg. Az előnézetként használt szerkesztőablakok újra vannak hasznosítva, amíg meg nem tartja őket a felhasználó (pl. dupla kattintás vagy szerkesztés esetén).", + "editorOpenPositioning": "Meghatározza, hogy hol nyíljanak meg a szerkesztőablakok. A 'left' vagy 'right' használata esetén az aktív szerkesztőablaktól jobbra vagy balra nyílnak meg az újak. A 'first' vagy 'last' esetén a szerkesztőablakok a jelenleg aktív ablaktól függetlenül nyílnak meg.", + "revealIfOpen": "Meghatározza, hogy egy szerkesztőablak fel legyen-e fedve, ha már meg van nyitva a látható csoportok bármelyiképben. Ha le van tiltva, akkor egy új szerkesztőablak nyílik az aktív szerkesztőablak-csoportban. Ha engedélyezve van, akkor a már megnyitott szerkesztőablak lesz felfedve egy új megnyitása helyett. Megjegyzés: vannak esetek, amikor ez a beállítás figyelmen kívül van hagyva, pl. ha egy adott szerkesztőablak egy konkrét csoportban vagy a jelenleg aktív csoport mellett van menyitva.", + "commandHistory": "Meghatározza, hogy mennyi legutóbb használt parancs jelenjen meg a parancskatalógus előzményeinek listájában. Az előzmények kikapcsolásához állítsa az értéket 0-ra.", + "preserveInput": "Meghatározza, hogy a legutóbb beírt parancs automatikusan helyre legyen-e állítva a parancskatalógus következő megnyitása során.", + "closeOnFocusLost": "Meghatározza, hogy a gyors megnyitás automatikusan bezáródjon-e amint elveszíti a fókuszt.", + "openDefaultSettings": "Meghatározza, hogy a beállítások megnyitásakor megnyíljon-e egy szerkesztő az összes alapértelmezett beállítással.", + "sideBarLocation": "Meghatározza az oldalsáv helyét. Az oldalsáv megjelenhet a munkaterület bal vagy jobb oldalán.", + "statusBarVisibility": "Meghatározza, hogy megjelenjen-e az állapotsor a munkaterület alján.", + "activityBarVisibility": "Meghatározza, hogy megjelenjen-e a tevékenységsáv a munkaterületen.", + "closeOnFileDelete": "Meghatározza, hogy bezáródjanak-e azok a szerkesztőablakok, melyekben olyan fájl van megnyitva, amelyet töröl vagy átnevez egy másik folyamat. A beállítás letiltása esetén a szerkesztőablak nyitva marad módosított állapotban ilyen esemény után. Megjegyzés: az alkalmazáson belüli törlések esetén mindig bezáródik a szerkesztőablakok, a módosított fájlok pedig soha nem záródnak be, hogy az adatok megmaradjanak.", + "swipeToNavigate": "Navigálás a nyitott fájlok között háromujjas, vízszintes húzással.", + "workbenchConfigurationTitle": "Munkaterület", + "window.openFilesInNewWindow.on": "A fájlok új ablakban nyílnak meg", + "window.openFilesInNewWindow.off": "A fájlok abban az ablakban nyílnak meg, ahol a mappájuk meg van nyitva vagy a legutoljára aktív ablakban", + "window.openFilesInNewWindow.default": "A fájlok abban az ablakban nyílnak meg, ahol a mappájuk meg van nyitva vagy a legutoljára aktív ablakban, kivéve, ha a dokkról vagy a Finderből lettek megnyitva (csak macOS-en)", + "openFilesInNewWindow": "Meghatározza, hogy a fájlok új ablakban legyenek-e megnyitva.\n- default: A fájlok abban az ablakban nyílnak meg, ahol a mappájuk meg van nyitva vagy a legutoljára aktív ablakban, kivéve, ha a dokkról vagy a Finderből lettek megnyitva (csak macOS-en)\n- on: A fájlok új ablakban nyílnak meg.\n- off: A fájlok abban az ablakban nyílnak meg, ahol a mappájuk meg van nyitva vagy a legutoljára aktív ablakban\nMegjegyzés: vannak esetek, amikor ez a beállítás figyelmen kívül van hagyva (pl. a -new-window vagy a -reuse-window parancssori beállítás használata esetén).", + "window.openFoldersInNewWindow.on": "A mappák új ablakban nyílnak meg", + "window.openFoldersInNewWindow.off": "A mappák lecserélik a legutoljára aktív ablakot", + "window.openFoldersInNewWindow.default": "A mappák új ablakban nyílnak meg, kivéve akkor, ha a mappát az alkalmazáson belül lett kiválasztva (pl. a Fájl menüből)", + "openFoldersInNewWindow": "Meghatározza, hogy a mappák új ablakban legyenek-e megnyitva.\n- alapértelmezett: A mappák új ablakban nyílnak meg, kivéve akkor, ha a mappát az alkalmazáson belül lett kiválasztva (pl. a Fájl menüből)\n- on: A mappák új ablakban nyílnak meg\n- off: A mappák lecserélik a legutoljára aktív ablakot\nMegjegyzés: vannak esetek, amikor ez a beállítás figyelmen kívül van hagyva (pl. a -new-window vagy a -reuse-window parancssori beállítás használata esetén).", + "window.reopenFolders.all": "Összes ablak újranyitása.", + "window.reopenFolders.folders": "Összes mappa újranyitása. Az üres ablakok nem lesznek helyreállítva.", + "window.reopenFolders.one": "A legutóbbi aktív ablak újranyitása.", + "window.reopenFolders.none": "Soha ne nyisson meg újra ablakot. Mindig üresen induljon.", + "restoreWindows": "Meghatározza, hogy újraindítás után hogyan vannak ismét megnyitva az ablakok. A 'none' választása esetén mindig üres ablak indul, 'one' esetén a legutóbb használt ablak nyílik meg újra, a 'folders' megnyitja az összes megnyitott mappát, míg az 'all' újranyitja az összes ablakot az előző munkamenetből.", + "restoreFullscreen": "Meghatározza, hogy az ablak teljesképernyős módban nyíljon-e meg, ha kilépéskor teljes képernyős módban volt.", + "zoomLevel": "Meghatározza az ablak nagyítási szintjét. Az eredei méret 0, és minden egyes plusz (pl. 1) vagy mínusz (pl. -1) 20%-kal nagyobb vagy kisebb nagyítási szintet jelent. Tizedestört megadása esetén a nagyítási szint finomabban állítható.", + "title": "Meghatározza az ablak címét az aktív szerkesztőablak alapján. A változók a környezet alapján vannak behelyettesítve:\n${activeEditorShort}: pl. myFile.txt\n${activeEditorMedium}: pl. myFolder/myFile.txt\n${activeEditorLong}: pl. /Users/Development/myProject/myFolder/myFile.txt\n${folderName}: pl. myFolder\n${folderPath}: pl. /Users/Development/myFolder\n${rootName}: pl. myFolder1, myFolder2, myFolder3\n${rootPath}: pl. /Users/Development/myWorkspace\n${appName}: pl. VS Code\n${dirty}: módosításjelző, ami jelzi, ha az aktív szerkesztőablak tartalma módosítva lett\n${separator}: feltételes elválasztó (\" - \"), ami akkor jelenik meg, ha olyan változókkal van körülvéve, amelyeknek van értéke\n", + "window.newWindowDimensions.default": "Az új ablakok a képernyő közepén nyílnak meg.", + "window.newWindowDimensions.inherit": "Az új ablakok ugyanolyan méretben és ugyanazon a helyen jelennek meg, mint a legutoljára aktív ablak.", + "window.newWindowDimensions.maximized": "Az új ablakok teljes méretben nyílnak meg.", + "window.newWindowDimensions.fullscreen": "Az új ablakok teljes képernyős módban nyílnak meg.", + "newWindowDimensions": "Meghatározza az új ablakok méretét és pozícióját, ha már legalább egy ablak meg van nyitva. Az új ablakok alapértlmezetten a képernyő közepén, kis mérettel nyílnak meg. Ha az értéke 'inherit', az ablak ugyanazon méretben és pozícióban nyílik meg, mint a legutoljára aktív. Ha az értéke 'maximized', teljes méretben, ha pedig 'fullscreen' akkor teljes képernyős módban nyílik meg. Megjegyzés: a beállítás nincs hatással az első megnyitott ablakra. Az első ablak mindig a bezárás előtti mérettel és pozícióban nyílik meg.", + "window.menuBarVisibility.default": "A menü csak teljes képernyős mód esetén van elrejtve.", + "window.menuBarVisibility.visible": "A menü mindig látható, még teljes képernyő módban is.", + "window.menuBarVisibility.toggle": "A menü rejtett, de megjeleníthető az Alt billentyű lenyomásával.", + "window.menuBarVisibility.hidden": "A menü mindig el van rejtve.", + "menuBarVisibility": "Meghatározza a menüsáv láthatóságát. A 'toggle' érték azt jelenti, hogy a menüsáv rejtett, és az Alt billentyű lenyomására megjelenik. A menüsáv alapértelmezetten látható, kivéve, ha az ablak teljes képernyős módban van.", + "enableMenuBarMnemonics": "Ha engedélyezve van, a főmenük megnyithatók Alt-billentyűs billentyűparancsokkal. Letiltás esetén ezek az Alt-billentyűparancsok más parancsokhoz rendelhetők.", + "autoDetectHighContrast": "Ha engedélyezve van, az alkalmazás automatikusan átvált a nagy kontrasztos témára, ha a WIndows a nagy kontrasztos témát használ, és a sötét témára, ha a Windows átvált a nagy kontrasztos témáról.", + "titleBarStyle": "Módosítja az ablak címsorának megjelenését. A változtatás teljes újraindítást igényel.", + "window.nativeTabs": "Engedélyezi a macOS Sierra ablakfüleket. Megjegyzés: a változtatás teljes újraindítást igényel, és a natív fülek letiltják az egyedi címsorstílust, ha azok be vannak konfigurálva.", + "windowConfigurationTitle": "Ablak", + "zenModeConfigurationTitle": "Zen-mód", + "zenMode.fullScreen": "Meghatározza, hogy zen-módban a munakterület teljes képernyős módba vált-e.", + "zenMode.hideTabs": "Meghatározza, hogy zen-módban el vannak-e rejtve a munkaterület fülei.", + "zenMode.hideStatusBar": "Meghatározza, hogy zen-módban el van-e rejtve a munkaterület alján található állapotsor.", + "zenMode.hideActivityBar": "Meghatározza, hogy zen-módban el van-e rejtve a munkaterület bal oldalán található tevékenységsáv.", + "zenMode.restore": "Meghatározza, hogy az ablak zen-módban induljon-e, ha kilépéskor zen-módban volt.", + "workspaceConfigurationTitle": "Munkaterület", + "workspaces.title": "A munkaterület mappakonfiugrációja", + "files.exclude.boolean": "A globális minta, amire illesztve lesznek a fájlok elérési útjai. A minta engedélyezéséhez vagy letiltásához állítsa igaz vagy hamis értékre.", + "workspaces.additionalFolders": "A munkaterület mappái" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/electron-browser/main.i18n.json b/i18n/hun/src/vs/workbench/electron-browser/main.i18n.json new file mode 100644 index 0000000000000..35ad4a784e889 --- /dev/null +++ b/i18n/hun/src/vs/workbench/electron-browser/main.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "loaderError": "Az egyik szükséges fájlt nem sikerült betölteni. Vagy megszakadt az internetkapcsolat, vagy a kiszolgáló vált offline-ná. Frissítse az oldalt a böngészőben, és próbálkozzon újra.", + "loaderErrorNative": "Egy szükséges fájl betöltése nem sikerült. Indítsa újra az alkalmazást, és próbálkozzon újra. Részletek: {0}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/electron-browser/shell.i18n.json b/i18n/hun/src/vs/workbench/electron-browser/shell.i18n.json new file mode 100644 index 0000000000000..f9fefa3fe2d6e --- /dev/null +++ b/i18n/hun/src/vs/workbench/electron-browser/shell.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "runningAsRoot": "Nem ajánlott a Code-ot 'root'-ként futtatni." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/electron-browser/window.i18n.json b/i18n/hun/src/vs/workbench/electron-browser/window.i18n.json new file mode 100644 index 0000000000000..13f0befdb66be --- /dev/null +++ b/i18n/hun/src/vs/workbench/electron-browser/window.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "undo": "Visszavonás", + "redo": "Újra", + "cut": "Kivágás", + "copy": "Másolás", + "paste": "Beillesztés", + "selectAll": "Összes kijelölése", + "confirmOpen": "Biztosan meg akar nyitni {0} mappát?", + "confirmOpenButton": "&&Megnyitás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/hun/src/vs/workbench/electron-browser/workbench.i18n.json new file mode 100644 index 0000000000000..e230783deddd8 --- /dev/null +++ b/i18n/hun/src/vs/workbench/electron-browser/workbench.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "developer": "Fejlesztői", + "file": "Fájl" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/node/extensionHostMain.i18n.json b/i18n/hun/src/vs/workbench/node/extensionHostMain.i18n.json new file mode 100644 index 0000000000000..acba56dc6e902 --- /dev/null +++ b/i18n/hun/src/vs/workbench/node/extensionHostMain.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensionTestError": "Az {0} elérési út nem érvényes kiegészítő tesztfuttató alkalmazásra mutat." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/node/extensionPoints.i18n.json b/i18n/hun/src/vs/workbench/node/extensionPoints.i18n.json new file mode 100644 index 0000000000000..e9cae50ed459f --- /dev/null +++ b/i18n/hun/src/vs/workbench/node/extensionPoints.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "jsonParseFail": "Hiba a(z) {0} feldolgozása közben: {1}.", + "fileReadFail": "A(z) ({0}) fájl nem olvasható: {1}.", + "jsonsParseFail": "Hiba a(z) {0} vagy {1} feldolgozása közben: {2}.", + "missingNLSKey": "A(z) {0} kulcshoz tartozó üzenet nem található." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json new file mode 100644 index 0000000000000..371e0ad88d7c6 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "install": "'{0}' parancs telepítése a PATH-ba", + "not available": "Ez a parancs nem érhető el.", + "successIn": "A(z) '{0}' rendszerparancs sikeresen telepítve lett a PATH-ba.", + "warnEscalation": "A Code adminisztrátori jogosultságot fog kérni az 'osascript'-tel a rendszerparancs telepítéséhez.", + "ok": "OK", + "cantCreateBinFolder": "Nem sikerült létrehozni az '/usr/local/bin' könyvtárat.", + "cancel2": "Mégse", + "aborted": "Megszakítva", + "uninstall": "'{0}' parancs eltávolítása a PATH-ból", + "successFrom": "A(z) '{0}' rendszerparancs sikeresen el lett a PATH-ból.", + "shellCommand": "Rendszerparancs" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json new file mode 100644 index 0000000000000..0edff5007dec9 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emergencyConfOn": "Az `editor.accessibilitySupport` beállítás értékének beállítása a következőre: 'on'.", + "openingDocs": "A VS Code kisegítő lehetőségei dokumentációjának megnyitása.", + "introMsg": "Köszönjük, hogy kipróbálta a VS Code kisegítő lehetőségeit.", + "status": "Állapot:", + "changeConfigToOnMac": "A szerkesztő folyamatos képernyőolvasóval való használatára optimalizálásához nyomja meg a Command+E gombot!", + "changeConfigToOnWinLinux": "A szerkesztő folyamatos képernyőolvasóval való használatára optimalizálásához nyomja meg a Control+E gombot!", + "auto_unknown": "A szerkesztő úgy van konfigurálva, hogy a platform által biztosított API-kat használja annak megállapításához, hogy van-e képernyőolvasó csatlakoztatva, azonban a jelenlegi futtatókörnyezet ezt nem támogatja.", + "auto_on": "A szerkesztő automatikusan észlelte a csatlakoztatott képernyőolvasót.", + "auto_off": "A szerkesztő úgy van konfigurálva, hogy automatikusan érzékelkje, ha képernyőolvasó van csatlakoztatva. Jelenleg nincs csatlakoztatva.", + "configuredOn": "A szerkesztő folyamatos képernyőolvasóval való használatára van optimalizálva – ez az `editor.accessibilitySupport` beállítás módosításával változtatható.", + "configuredOff": "A szerkesztő úgy van konfigurálva, hogy soha nincs képernyőolvasó használatára optimalizálva.", + "tabFocusModeOnMsg": "Az aktuális szerkesztőablakban a Tab billentyű lenyomása esetén a fókusz a következő fókuszálható elemre kerül. Ez a viselkedés a(z) {0} leütésével módosítható.", + "tabFocusModeOnMsgNoKb": "Az aktuális szerkesztőablakban a Tab billentyű lenyomása esetén a fókusz a következő fókuszálható elemre kerül. A(z) {0} parancs jelenleg nem aktiválható billentyűkombinációval.", + "tabFocusModeOffMsg": "Az aktuális szerkesztőablakban a Tab billentyű lenyomása esetén beszúrásra kerül egy tabulátor karakter. Ez a viselkedés a(z) {0} leütésével módosítható.", + "tabFocusModeOffMsgNoKb": "Az aktuális szerkesztőablakban a Tab billentyű lenyomása esetén beszúrásra kerül egy tabulátor karakter. A(z) {0} parancs jelenleg nem aktiválható billentyűkombinációval.", + "openDocMac": "VS Code kisegítő lehetőségeivel kapcsolatos információk böngészőben való megjelenítéséhez nyomja meg a Command+H billentyűkombinációt!", + "openDocWinLinux": "VS Code kisegítő lehetőségeivel kapcsolatos információk böngészőben való megjelenítéséhez nyomja meg a Control+H billentyűkombinációt!", + "outroMsg": "A súgószöveg eltüntetéséhez és a szerkesztőablakba való visszatéréshez nyomja meg az Escape billentyűt vagy a Shift+Escape billentyűkombinációt!", + "ShowAccessibilityHelpAction": "Kisegítő lehetőségek súgó megjelenítése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json new file mode 100644 index 0000000000000..b01c9a81930b8 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "workbench.action.inspectKeyMap": "Fejlesztői: Billentyűkiosztás vizsgálata" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..5c8dff0858d56 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inspectTMScopes": "Fejlesztői: TM-hatókörök vizsgálata", + "inspectTMScopesWidget.loading": "Betöltés..." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json new file mode 100644 index 0000000000000..92cdf30094696 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json @@ -0,0 +1,40 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parseErrors": "Hiba a(z) {0} feldolgozása közben: {1}", + "schema.openBracket": "A nyitó zárójelet definiáló karakter vagy karaktersorozat", + "schema.closeBracket": "A záró zárójelet definiáló karakter vagy karaktersorozat", + "schema.comments": "Meghatározza a megjegyzésszimbólumokat", + "schema.blockComments": "Meghatározza, hogyan vannak jelölve a megjegyzésblokkok.", + "schema.blockComment.begin": "A megjegyzésblokk kezdetét definiáló karaktersorozat.", + "schema.blockComment.end": "A megjegyzésblokk végét definiáló karaktersorozat.", + "schema.lineComment": "A megjegyzéssor kezdetét definiáló karaktersorozat.", + "schema.brackets": "Meghatározza azokat a zárójelszimbólumokat, amelyek növeik vagy csökkentik az indentálást.", + "schema.autoClosingPairs": "Meghatározza a zárójelpárokat. Ha egy nyitó zárójelet írnak be a szerkesztőbe, a záró párja automatikusan be lesz illesztve.", + "schema.autoClosingPairs.notIn": "Azon hatókörök listája, ahol az automatikus zárójelek automatikus párosítása le van tiltve.", + "schema.surroundingPairs": "Meghatározza azok zárójelpárok listáját, melyek használhatók a kijelölt szöveg körbezárására.", + "schema.wordPattern": "A nyelvben található szavak definíciója.", + "schema.wordPattern.pattern": "A szavak illesztésére használt reguláris kifejezés.", + "schema.wordPattern.flags": "A szavak illesztésére használt reguláris kifejezés beállításai.", + "schema.wordPattern.flags.errorMessage": "Illeszkednie kell a következő mintára: `/^([gimuy]+)$/`.", + "schema.indentationRules": "A nyelv indentálási beállításai.", + "schema.indentationRules.increaseIndentPattern": "Ha egy sor illeszkedik erre a mintára, akkor minden utána következő sor eggyel beljebb lesz indentálva (amíg egy újabb szabály nem illeszkedik).", + "schema.indentationRules.increaseIndentPattern.pattern": "Az increaseIndentPatternhöz tartozó reguláris kifejezés.", + "schema.indentationRules.increaseIndentPattern.flags": "Az increaseIndentPatternhöz tartozó reguláris kifejezés beállításai.", + "schema.indentationRules.increaseIndentPattern.errorMessage": "Illeszkednie kell a következő mintára: `/^([gimuy]+)$/`.", + "schema.indentationRules.decreaseIndentPattern": "Ha egy sor illeszkedik erre a mintára, akkor minden utána következő sor eggyel kijjebb lesz indentálva (amíg egy újabb szabály nem illeszkedik).", + "schema.indentationRules.decreaseIndentPattern.pattern": "A decreaseIndentPatternhöz tartozó reguláris kifejezés.", + "schema.indentationRules.decreaseIndentPattern.flags": "A decreaseIndentPatternhöz tartozó reguláris kifejezés beállításai.", + "schema.indentationRules.decreaseIndentPattern.errorMessage": "Illeszkednie kell a következő mintára: `/^([gimuy]+)$/`.", + "schema.indentationRules.indentNextLinePattern": "Ha egy sor illeszkedik erre a mintára, akkor **csak a következő sor** eggyel beljebb lesz indentálva.", + "schema.indentationRules.indentNextLinePattern.pattern": "Az indentNextLinePatternhöz tartozó reguláris kifejezés.", + "schema.indentationRules.indentNextLinePattern.flags": "Az indentNextLinePatternhöz tartozó reguláris kifejezés beállításai.", + "schema.indentationRules.indentNextLinePattern.errorMessage": "Illeszkednie kell a következő mintára: `/^([gimuy]+)$/`.", + "schema.indentationRules.unIndentedLinePattern": "Ha egy sor illeszkedik erre a mintára, akkor az indentálása nem változik, és nem lesz kiértékelve más szabályok alapján.", + "schema.indentationRules.unIndentedLinePattern.pattern": "Az unIndentedLinePatternhöz tartozó reguláris kifejezés.", + "schema.indentationRules.unIndentedLinePattern.flags": "Az unIndentedLinePatternhöz tartozó reguláris kifejezés beállításai.", + "schema.indentationRules.unIndentedLinePattern.errorMessage": "Illeszkednie kell a következő mintára: `/^([gimuy]+)$/`." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..5c8dff0858d56 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inspectTMScopes": "Fejlesztői: TM-hatókörök vizsgálata", + "inspectTMScopesWidget.loading": "Betöltés..." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json new file mode 100644 index 0000000000000..a0a8e4d892847 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "Többkurzoros módosító be- és kikapcsolása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.i18n.json b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.i18n.json new file mode 100644 index 0000000000000..79c5e7716eee6 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleRenderControlCharacters": "Vezérlőkarakterek be- és kikapcsolása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace.i18n.json b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace.i18n.json new file mode 100644 index 0000000000000..e496d62b10240 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleRenderWhitespace": "Szóközök kirajzolásának be- és kikapcsolása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json new file mode 100644 index 0000000000000..02a67dbe14632 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggle.wordwrap": "Nézet: Sortörés be- és kikapcsolása", + "wordWrap.notInDiffEditor": "A sortörés nem kapcsolható be vagy ki differenciaszerkesztőben.", + "unwrapMinified": "Sortörés letiltása ebben a fájlban", + "wrapMinified": "Sortörés engedélyezése ebben a fájlban" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/wordWrapMigration.i18n.json b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/wordWrapMigration.i18n.json new file mode 100644 index 0000000000000..1631851aee5fc --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/wordWrapMigration.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wordWrapMigration.ok": "OK", + "wordWrapMigration.dontShowAgain": "Ne jelenjen meg újra", + "wordWrapMigration.openSettings": "Beállítások megnyitása", + "wordWrapMigration.prompt": "Az `editor.wrappingColumn` beállítás elavult az `editor.wordWrap` bevezetése miatt." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/browser/breakpointWidget.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/browser/breakpointWidget.i18n.json new file mode 100644 index 0000000000000..9a0eccdde5015 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/browser/breakpointWidget.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "breakpointWidgetExpressionPlaceholder": "Futás megállítása, ha a kifejezés értéke igazra értékelődik ki. 'Enter' a megerősítéshez vagy 'Escape' a megszakításhoz.", + "breakpointWidgetAriaLabel": "A program csak akkor áll meg itt, ha a feltétel igaz. Nyomjon 'Enter'-t a megerősítéshez vagy 'Escape'-et a megszakításhoz.", + "breakpointWidgetHitCountPlaceholder": "Futás megállítása, ha adott alkalommal érintve lett. 'Enter' a megerősítéshez vagy 'Escape' a megszakításhoz.", + "breakpointWidgetHitCountAriaLabel": "A program akkor fog megállni itt, ha adott alkalommal érintette ezt a pontot. Nyomjon 'Enter'-t a megerősítéshez vagy 'Escape'-et a megszakításhoz.", + "expression": "Kifejezés", + "hitCount": "Érintések száma" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/browser/debugActionItems.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/browser/debugActionItems.i18n.json new file mode 100644 index 0000000000000..c7cfbc8b3baa9 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/browser/debugActionItems.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "addConfiguration": "Konfiguráció hozzáadása...", + "noConfigurations": "Nincs konfiguráció" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/browser/debugActions.i18n.json new file mode 100644 index 0000000000000..e98acd71fa157 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openLaunchJson": "{0} megnyitása", + "launchJsonNeedsConfigurtion": "'launch.json' konfigurálása vagy javítása", + "noFolderDebugConfig": "Fejlettebb hibakeresési konfigurációk használatához nyisson meg egy mappát!", + "startDebug": "Hibakeresés indítása", + "startWithoutDebugging": "Indítás hibakeresés nélkül", + "selectAndStartDebugging": "Hibakeresés kiválasztása és indítása", + "restartDebug": "Újraindítás", + "reconnectDebug": "Újracsatlakozás", + "stepOverDebug": "Átugrás", + "stepIntoDebug": "Belépés", + "stepOutDebug": "Kilépés", + "stopDebug": "Leállítás", + "disconnectDebug": "Kapcsolat bontása", + "continueDebug": "Folytatás", + "pauseDebug": "Szüneteltetés", + "restartFrame": "Keret újraindítása", + "removeBreakpoint": "Töréspont eltávolítása", + "removeAllBreakpoints": "Összes töréspont eltávolítása", + "enableBreakpoint": "Töréspont engedélyezése", + "disableBreakpoint": "Töréspont letiltása", + "enableAllBreakpoints": "Összes töréspont engedélyezése", + "disableAllBreakpoints": "Összes töréspont letiltása", + "activateBreakpoints": "Töréspontok aktiválása", + "deactivateBreakpoints": "Töréspontok deaktiválása", + "reapplyAllBreakpoints": "Töréspontok felvétele ismét", + "addFunctionBreakpoint": "Függvénytöréspont hozzáadása", + "renameFunctionBreakpoint": "Függvénytöréspont átnevezése", + "addConditionalBreakpoint": "Feltételes töréspont hozzáadása...", + "editConditionalBreakpoint": "Töréspont szerkesztése...", + "setValue": "Érték beállítása", + "addWatchExpression": "Kifejezés hozzáadása", + "editWatchExpression": "Kifejezés szerkesztése", + "addToWatchExpressions": "Hozzáadás a figyelőlistához", + "removeWatchExpression": "Kifejezés eltávolítása", + "removeAllWatchExpressions": "Összes kifejezés eltávolítása", + "clearRepl": "Konzoltartalom törlése", + "debugConsoleAction": "Hibakeresési konzol", + "unreadOutput": "Új kimenet a hibakeresési konzolban", + "debugFocusConsole": "Váltás a hibakeresési konzolra", + "focusProcess": "Váltás a folyamatra", + "stepBackDebug": "Visszalépés", + "reverseContinue": "Visszafordítás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json new file mode 100644 index 0000000000000..fa1bc4e164b69 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugToolBarBackground": "A hibakeresési eszköztár háttérszíne." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/browser/debugContentProvider.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/browser/debugContentProvider.i18n.json new file mode 100644 index 0000000000000..b66b9f52e6897 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/browser/debugContentProvider.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unable": "Az erőforrás nem oldható fel hibakeresési munkamenet nélkül" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/browser/debugEditorActions.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/browser/debugEditorActions.i18n.json new file mode 100644 index 0000000000000..7d9b38824da42 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/browser/debugEditorActions.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleBreakpointAction": "Hibakeresés: Töréspont be- és kikapcsolása", + "columnBreakpointAction": "Hibakeresés: Töréspont oszlopnál", + "columnBreakpoint": "Oszlop töréspont hozzáadása", + "conditionalBreakpointEditorAction": "Hibakeresés: Feltételes töréspont...", + "runToCursor": "Futtatás a kurzorig", + "debugEvaluate": "Hibakeresés: Kiértékelés", + "debugAddToWatch": "Hibakeresés: Hozzáadás a figyelőlistához", + "showDebugHover": "Hibakeresés: Súgószöveg megjelenítése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/browser/debugEditorModelManager.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/browser/debugEditorModelManager.i18n.json new file mode 100644 index 0000000000000..bbe58d3ce4242 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/browser/debugEditorModelManager.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "breakpointDisabledHover": "Letiltott töréspont", + "breakpointUnverifieddHover": "Nem megerősített töréspont", + "breakpointDirtydHover": "Nem megerősített töréspont. A fájl módosult, indítsa újra a hibakeresési munkamenetet.", + "breakpointUnsupported": "Ez a hibakereső nem támogatja a feltételes töréspontokat" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/browser/debugQuickOpen.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/browser/debugQuickOpen.i18n.json new file mode 100644 index 0000000000000..4020242c40ced --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/browser/debugQuickOpen.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, hibakeresés", + "debugAriaLabel": "Írja be a futtatandó konfiguráció nevét.", + "noConfigurationsMatching": "Nincs illeszkedő hibakeresési konfiguráció", + "noConfigurationsFound": "Nem található hibakeresési konfiguráció. Készítsen egy 'launch.json' fájlt." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/browser/exceptionWidget.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/browser/exceptionWidget.i18n.json new file mode 100644 index 0000000000000..37b31bfd19b47 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/browser/exceptionWidget.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugExceptionWidgetBorder": "A kivételmodul keretszíne.", + "debugExceptionWidgetBackground": "A kivételmodul háttérszíne.", + "exceptionThrownWithId": "Kivétel következett be: {0}", + "exceptionThrown": "Kivétel következett be." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json new file mode 100644 index 0000000000000..8e0e584901b1f --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileLinkMac": "Megnyitás kattintásra (Cmd + kattintásra oldalt nyitja meg)", + "fileLink": "Megnyitás kattintásra (Ctrl + kattintásra oldalt nyitja meg)" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/common/debug.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/common/debug.i18n.json new file mode 100644 index 0000000000000..bceb3f2cf21ab --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/common/debug.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "internalConsoleOptions": "Meghatározza a belső hibakeresési konzol viselkedését." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/common/debugModel.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/common/debugModel.i18n.json new file mode 100644 index 0000000000000..a3704d3069835 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/common/debugModel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "notAvailable": "nem elérhető", + "startDebugFirst": "Indítson egy hibakeresési folyamatot a kiértékeléshez" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/common/debugSource.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/common/debugSource.i18n.json new file mode 100644 index 0000000000000..4054145e143a8 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/common/debugSource.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownSource": "Ismeretlen forrás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json new file mode 100644 index 0000000000000..fa24086f10125 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleDebugViewlet": "Hibakeresés megjelenítése", + "toggleDebugPanel": "Hibakeresési konzol", + "debug": "Hibakeresés", + "debugPanel": "Hibakeresési konzol", + "view": "Nézet", + "debugCategory": "Hibakeresés", + "debugCommands": "Hibakeresési konfiguráció", + "debugConfigurationTitle": "Hibakeresés", + "allowBreakpointsEverywhere": "Bármelyik fájlban helyezhető el töréspont", + "openExplorerOnEnd": "Hibakeresési munkamenet végén automatikusan nyíljon meg a fájlkezelő nézet", + "inlineValues": "Változók értékének megjelenítése a sorok között hibakeresés közben", + "hideActionBar": "Meghatározza, hogy megjelenjen-e a lebegő hibakeresési műveletsáv", + "launch": "Globális hibakeresés indítási konfiguráció. Használható a 'launch.json' alternatívájaként, ami meg van osztva több munkaterület között" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json new file mode 100644 index 0000000000000..096d97567fc37 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noFolderDebugConfig": "Fejlettebb hibakeresési konfigurációk használatához nyisson meg egy mappát!" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json new file mode 100644 index 0000000000000..7f6a09aa689f5 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json @@ -0,0 +1,38 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.debuggers": "Hibakeresési illesztőket szolgáltat.", + "vscode.extension.contributes.debuggers.type": "A hibakeresési illesztő egyedi azonosítója.", + "vscode.extension.contributes.debuggers.label": "A hibakeresési illesztő megjelenített neve.", + "vscode.extension.contributes.debuggers.program": "A hibakeresési illesztő program elérési útja. Az elérési út lehet abszolút vagy relatív a kiegészítő mappájához képest.", + "vscode.extension.contributes.debuggers.args": "Az illesztő számára átadott argumentumok.", + "vscode.extension.contributes.debuggers.runtime": "Kiegészítő futtatókörnyezet arra az esetre, ha a program attribútum nem egy futtatható fájl, és futtatókörnyezetre van szüksége.", + "vscode.extension.contributes.debuggers.runtimeArgs": "Kiegészítő argumentumok a futtatókörnyezet számára.", + "vscode.extension.contributes.debuggers.variables": "A `launch.json`-ban található interaktív változók (pl. ${action.pickProcess}) hozzárendelése parancsokhoz.", + "vscode.extension.contributes.debuggers.initialConfigurations": "Konfigurációk a 'launch.json' első változatának elkészítéséhez.", + "vscode.extension.contributes.debuggers.languages": "Azon nyelvek listája, amelyeknél ez a hibakeresési kiegészítő alapértelmezett hibakeresőnek tekinthető.", + "vscode.extension.contributes.debuggers.adapterExecutableCommand": "Ha meg van adva, a VS Code ezt a parancsot fogja hívni a hibakeresési illesztő futtatható állománya elérési útjának és az átadandó argumentumok meghatározásához.", + "vscode.extension.contributes.debuggers.startSessionCommand": "Ha meg van határozva, a VS Code ezt a parancsot fogja hívni az ennek a kiegészítőnek küldött \"debug\" vagy \"run\" parancsok esetén.", + "vscode.extension.contributes.debuggers.configurationSnippets": "Kódtöredékek új 'launch.json'-konfigurációk hozzáadásához.", + "vscode.extension.contributes.debuggers.configurationAttributes": "JSON-sémakonfigurációk a 'launch.json' validálásához.", + "vscode.extension.contributes.debuggers.windows": "Windows-specifikus beállítások.", + "vscode.extension.contributes.debuggers.windows.runtime": "A Windows által használt futtatókörnyezet.", + "vscode.extension.contributes.debuggers.osx": "OS X-specifikus beállítások.", + "vscode.extension.contributes.debuggers.osx.runtime": "Az OSX által használt futtatókörnyezet.", + "vscode.extension.contributes.debuggers.linux": "Linux-specifikus beállítások.", + "vscode.extension.contributes.debuggers.linux.runtime": "A Linux által használt futtatókörnyezet.", + "vscode.extension.contributes.breakpoints": "Töréspontokat szolgáltat.", + "vscode.extension.contributes.breakpoints.language": "Töréspontok engedélyezése ennél a nyelvnél.", + "app.launch.json.title": "Indítás", + "app.launch.json.version": "A fájlformátum verziója.", + "app.launch.json.configurations": "A konfigurációk listája. Új konfigurációk hozzáadhatók vagy a meglévők szerkeszthetők az IntelliSense használatával.", + "app.launch.json.compounds": "A kombinációk listája. Minden kombináció több konfigurációt hivatkozik meg, melyek együtt indulnak el.", + "app.launch.json.compound.name": "A kombináció neve. Az indítási konfiguráció lenyíló menüjében jelenik meg.", + "app.launch.json.compounds.configurations": "Azon konfigurációk neve, melyek elindulnak ezen kombináció részeként.", + "debugNoType": "A hibakeresési illesztő 'type' tulajdonsága kötelező, és 'string' típusúnak kell lennie.", + "DebugConfig.failed": "Nem sikerült létrehozni a 'launch.json' fájlt a '.vscode' mappánan ({0}).", + "selectDebug": "Környezet kiválasztása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.i18n.json new file mode 100644 index 0000000000000..dde289381299c --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeBreakpoints": "Töréspontok eltávolítása", + "removeBreakpointOnColumn": "{0}. oszlopban található töréspont eltávolítása", + "removeLineBreakpoint": "Sorra vonatkozó töréspont eltávolítása", + "editBreakpoints": "Töréspontok szerkesztése", + "editBreakpointOnColumn": "{0}. oszlopban található töréspont szerkesztése", + "editLineBrekapoint": "Sorra vonatkozó töréspont szerkesztése", + "enableDisableBreakpoints": "Töréspontok engedélyezése/letiltása", + "disableColumnBreakpoint": "{0}. oszlopban található töréspont letiltása", + "disableBreakpointOnLine": "Sorszintű töréspont letiltása", + "enableBreakpoints": "{0}. oszlopban található töréspont engedélyezése", + "enableBreakpointOnLine": "Sorszintű töréspont engedélyezése", + "addBreakpoint": "Töréspont hozzáadása", + "addConfiguration": "Konfiguráció hozzáadása..." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugHover.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugHover.i18n.json new file mode 100644 index 0000000000000..c222653e922ef --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugHover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeAriaLabel": "Hibakeresési súgószöveg" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json new file mode 100644 index 0000000000000..644abcafd013b --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "snapshotObj": "Ennél az objektumhoz csak a primitív értékek vannak megjelenítve.", + "debuggingPaused": "Hibakeresés szüneteltetve, oka: {0}, {1} {2}", + "debuggingStarted": "Hibakeresés elindítva.", + "debuggingStopped": "Hibakeresés leállítva.", + "breakpointAdded": "Töréspont hozzáadva, {0}. sor, fájl: {1}", + "breakpointRemoved": "Töréspont eltávoíltva, {0}. sor, fájl: {1}", + "compoundMustHaveConfigurations": "A kombinációk \"configurations\" tulajdonságát be kell állítani több konfiguráció elindításához.", + "configMissing": "A(z) '{0}' konfiguráció hiányzik a 'launch.json'-ból.", + "debugTypeNotSupported": "A megadott hibakeresési típus ('{0}') nem támogatott.", + "debugTypeMissing": "A kiválasztott indítási konfigurációnak hiányzik a 'type' tulajdonsága.", + "preLaunchTaskErrors": "Buildelési hibák léptek fel a(z) '{0}' preLaunchTask futása közben.", + "preLaunchTaskError": "Buildelési hiba lépett fel a(z) '{0}' preLaunchTask futása közben.", + "preLaunchTaskExitCode": "A(z) '{0}' preLaunchTask a következő hibakóddal fejeződött be: {1}.", + "debugAnyway": "Hibakeresés indítása mindenképp", + "noFolderWorkspaceDebugError": "Az aktív fájlon nem lehet hibakeresést végezni. Bizonyosodjon meg róla, hogy el van mentve a lemezre, és hogy az adott fájltípushoz telepítve van a megfelelő hibakeresési kiegészítő.", + "NewLaunchConfig": "Állítson be egy indítási konfigurációt az alkalmazása számára. {0}", + "DebugTaskNotFound": "A(z) '{0}' preLaunchTask nem található.", + "differentTaskRunning": "A(z) {0} feladat már fut. Nem futtatható a(z) {1} indítás előtti feladat." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugViewer.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugViewer.i18n.json new file mode 100644 index 0000000000000..b11dd37762668 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugViewer.i18n.json @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "process": "Folyamat", + "paused": "Szüneteltetve", + "running": "Fut", + "thread": "Szál", + "pausedOn": "Szüneteltetve a következő helyen: {0}", + "loadMoreStackFrames": "További veremkeretek betöltése", + "threadAriaLabel": "Szál: {0}, hívási verem, hibakeresés", + "stackFrameAriaLabel": "{0} veremkeret, {0}. sor {1} {2}, hívási verem, hibakeresés", + "variableValueAriaLabel": "Adja meg a változó új nevét", + "variableScopeAriaLabel": "{0} hatókör, változók, hibakeresés", + "variableAriaLabel": "{0} értéke {1}, változók, hibakeresés", + "watchExpressionPlaceholder": "Figyelendő kifejezés", + "watchExpressionInputAriaLabel": "Adja meg a figyelendő kifejezést", + "watchExpressionAriaLabel": "{0} értéke {1}, figyelt, hibakeresés", + "watchVariableAriaLabel": "{0} értéke {1}, figyelt, hibakeresés", + "functionBreakpointPlaceholder": "A függvény, amin meg kell állni", + "functionBreakPointInputAriaLabel": "Adja meg a függvénytöréspontot", + "functionBreakpointsNotSupported": "Ez a hibakereső nem támogatja a függvénytöréspontokat", + "breakpointAriaLabel": "Töréspont a(z) {0}. sorban {1}, töréspontok, hibakeresés", + "functionBreakpointAriaLabel": "{0} függvénytöréspont, töréspontok, hibakeresés", + "exceptionBreakpointAriaLabel": "{0} kivételtöréspont, töréspontok, hibakeresés" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json new file mode 100644 index 0000000000000..561f5dc9f6d87 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "variablesSection": "Változók szakasz", + "variables": "Változók", + "variablesAriaTreeLabel": "Hibakeresési változók", + "expressionsSection": "Kifejezések szaszasz", + "watch": "Figyelőlista", + "watchAriaTreeLabel": "Hibakeresési figyelőkifejezések", + "callstackSection": "Hívási verem szakasz", + "debugStopped": "Szüneteltetve a következő helyen: {0}", + "callStack": "Hívási verem", + "callStackAriaLabel": "Hibakeresési hívási verem", + "breakpointsSection": "Töréspontok szakasz", + "breakpoints": "Töréspontok", + "breakpointsAriaTreeLabel": "Hibakeresési töréspontok" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json new file mode 100644 index 0000000000000..b71c6795fa6ce --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "copyValue": "Érték másolása", + "copy": "Másolás", + "copyAll": "Összes másolása", + "copyStackTrace": "Hívási verem másolása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json new file mode 100644 index 0000000000000..fb49eeb2cdb18 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "moreInfo": "További információ", + "unableToLaunchDebugAdapter": "Nem sikerült elindítani a hibakeresési illesztőt a következő helyről: '{0}'.", + "unableToLaunchDebugAdapterNoArgs": "Nem sikerült elindítani a hibakeresési illesztőt.", + "stoppingDebugAdapter": "{0}. Hibakeresési illesztő leállítása.", + "debugAdapterCrash": "A hibakeresési illesztő folyamata váratlanul leállt" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json new file mode 100644 index 0000000000000..2490789235bb5 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "replAriaLabel": "REPL-panel", + "actions.repl.historyPrevious": "Előző az előzményekből", + "actions.repl.historyNext": "Következő az előzményekből", + "actions.repl.acceptInput": "REPL bemenet elfogadása", + "actions.repl.copyAll": "Hibakeresés: Összes másolása a konzolból" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json new file mode 100644 index 0000000000000..929096a6c4338 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "stateCapture": "Az objekum állapota az első kiértékelés idején", + "replVariableAriaLabel": "A(z) {0} változó értéke: {1}, REPL, hibakeresés", + "replExpressionAriaLabel": "A(z) {0} kifejezés értéke: {1}, REPL, hibakeresés", + "replValueOutputAriaLabel": "{0}, REPL, hibakeresés", + "replKeyValueOutputAriaLabel": "A(z) {0} kimeneti változó értéke: {1}, REPL, hibakeresés" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json new file mode 100644 index 0000000000000..861e45437c786 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "statusBarDebuggingBackground": "Az állapotsor háttérszíne, ha a programon hibakeresés folyik. Az állapotsor az ablak alján jelenik meg.", + "statusBarDebuggingForeground": "Az állapotsor előtérszíne, ha a programon hibakeresés folyik. Az állapotsor az ablak alján jelenik meg." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/terminalSupport.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/terminalSupport.i18n.json new file mode 100644 index 0000000000000..8e82d560ff027 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/terminalSupport.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debug.terminal.title": "hibakereső", + "debug.terminal.not.available.error": "Az integrált terminál nem elérhető" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json new file mode 100644 index 0000000000000..6b2154af74d90 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugAdapterBinNotFound": "A hibakeresési illesztő futtatható állománya ('{0}') nem létezik.", + "debugAdapterCannotDetermineExecutable": "Nem határozható meg a(z) '{0}' hibakeresési illesztő futtatható állománya.", + "debugType": "A konfiguráció típusa.", + "debugTypeNotRecognised": "Ez a hibakeresési típus nem ismert. Bizonyosodjon meg róla, hogy telepítve és engedélyezve van a megfelelő hibakeresési kiegészítő.", + "node2NotSupported": "A \"node2\" már nem támogatott. Használja helyette a \"node\"-ot, és állítsa a \"protocol\" attribútum értékét \"inspector\"-ra.", + "debugName": "A konfiguráció neve. Az indítási konfiguráció lenyíló menüjében jelenik meg.", + "debugRequest": "A konfiguráció kérési típusa. Lehet \"launch\" vagy \"attach\".", + "debugServer": "Csak hibakeresési kiegészítők fejlesztéséhez: ha a port meg van adva, akkor a VS Code egy szerver módban futó hibakeresési illesztőhöz próbál meg csatlakozni.", + "debugPrelaunchTask": "A hibakeresési folyamat előtt futtatandó feladat.", + "debugWindowsConfiguration": "Windows-specifikus indítási konfigurációs attribútumok.", + "debugOSXConfiguration": "OS X-specifikus indítási konfigurációs attribútumok.", + "debugLinuxConfiguration": "Linux-specifikus indítási konfigurációs attribútumok.", + "deprecatedVariables": "Az 'env.', 'config.' és 'command.' tujdonságok elavultak, használja helyette az 'env:', 'config:' és 'command:' tulajdonságokat." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/browser/actions/showEmmetCommands.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/browser/actions/showEmmetCommands.i18n.json new file mode 100644 index 0000000000000..0f5eb4400f63b --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/browser/actions/showEmmetCommands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showEmmetCommands": "Emmet-parancsok megjelenítése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json new file mode 100644 index 0000000000000..1534d8b6077e9 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "balanceInward": "Emmet: Egyensúlyozás (belefé)", + "balanceOutward": "Emmet: Egyensúlyozás (kifelé)" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json new file mode 100644 index 0000000000000..219aad079bd90 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "previousEditPoint": "Emmet: Ugrás az előző szerkesztési pontra", + "nextEditPoint": "Emmet: Ugrás a következő szerkesztési pontra" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json new file mode 100644 index 0000000000000..ab60a0c6b09da --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "evaluateMathExpression": "Emmet: Matematikai kifejezés kiértékelése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json new file mode 100644 index 0000000000000..646e5adcf6f2d --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "expandAbbreviationAction": "Emmet: Rövidítés kibontása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json new file mode 100644 index 0000000000000..d9e318872d89d --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "incrementNumberByOneTenth": "Emmet: Növelés 0,1-gyel", + "incrementNumberByOne": "Emmet: Növelés 1-gyel", + "incrementNumberByTen": "Emmet: Növelés 10-zel", + "decrementNumberByOneTenth": "Emmet: Csökkentés 0,1-gyel", + "decrementNumberByOne": "Emmet: Csökkentés 1-gyel", + "decrementNumberByTen": "Emmet: Csökkentés 10-zel" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json new file mode 100644 index 0000000000000..cec247d0e8fd3 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "matchingPair": "Emmet: Ugrás az illeszkedő párra" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json new file mode 100644 index 0000000000000..de85d11a1367e --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mergeLines": "Emmet: Sorok összeolvasztása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json new file mode 100644 index 0000000000000..f4fa17b28600a --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reflectCSSValue": "Emmet: CSS-érték tükrözése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json new file mode 100644 index 0000000000000..ee23339dfca23 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeTag": "Emmet: Elem eltávolítása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json new file mode 100644 index 0000000000000..0d67ceb7a0237 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "selectPreviousItem": "Emmet: Előző elem kiválasztása", + "selectNextItem": "Emmet: Következő elem kiválasztása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json new file mode 100644 index 0000000000000..93c0cba54af55 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "splitJoinTag": "Emmet: Elem szétbontása/összeolvasztása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json new file mode 100644 index 0000000000000..cd5b4fc1fe348 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleComment": "Emmet: Megjegyzés be- és kikapcsolása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json new file mode 100644 index 0000000000000..82dab2c362c8b --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateImageSize": "Emmet: Képméret frissítése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json new file mode 100644 index 0000000000000..60dea6fbae0d2 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateTag": "Emmet: Elem frissítése", + "enterTag": "Adja meg az elemet", + "tag": "Elem" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json new file mode 100644 index 0000000000000..7a062455c6270 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wrapWithAbbreviationAction": "Emmet: Becsomagolás rövidítéssel", + "enterAbbreviation": "Adja meg a rövidítést", + "abbreviation": "Rövidítés" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json new file mode 100644 index 0000000000000..a4c1aceb7c643 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emmetConfigurationTitle": "Emmet", + "triggerExpansionOnTab": "Ha engedélyezve van, akkor az Emmet-rövidítések a Tab billentyű lenyomásával bonthatók ki.", + "emmetPreferences": "Beállítások, melyek módosítják az Emmet műveleteinek és feloldó algoritmusainak viselkedését.", + "emmetSyntaxProfiles": "Konkrét szintaktika profiljának meghatározása vagy saját profil használata adott szabályokkal.", + "emmetExclude": "Azon nyelvek listája, ahol az Emmet-rövidítések ne legyenek kibontva.", + "emmetExtensionsPath": "Az Emmet-profilokat, -kódtöredékeket és -beállításokat tartalmazó mappa", + "useNewEmmet": "Új Emmet-modulok használata az összes Emmet-funkcióhoz (ami előbb-utóbb helyettesíteni fogja az egyedülálló Emmet-könyvtárat)." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/execution/electron-browser/terminal.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/execution/electron-browser/terminal.contribution.i18n.json new file mode 100644 index 0000000000000..91f0c001e15c7 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/execution/electron-browser/terminal.contribution.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminalConfigurationTitle": "Külső terminál", + "terminal.external.windowsExec": "Meghatározza, hogy mely terminál fusson Windowson.", + "terminal.external.osxExec": "Meghatározza, hogy mely terminál fusson OS X-en.", + "terminal.external.linuxExec": "Meghatározza, hogy mely terminál fusson Linuxon.", + "globalConsoleActionWin": "Új parancssor megnyitása", + "globalConsoleActionMacLinux": "Új terminál megnyitása", + "scopedConsoleActionWin": "Megnyitás a parancssorban", + "scopedConsoleActionMacLinux": "Megnyitás a terminálban" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/execution/electron-browser/terminalService.i18n.json b/i18n/hun/src/vs/workbench/parts/execution/electron-browser/terminalService.i18n.json new file mode 100644 index 0000000000000..d8480642f6862 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/execution/electron-browser/terminalService.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "console.title": "VS Code-konzol", + "mac.terminal.script.failed": "A(z) '{0}' parancsfájl a következő hibakóddal lépett ki: {1}", + "mac.terminal.type.not.supported": "A(z) '{0}' nem támogatott", + "press.any.key": "A folytatáshoz nyomjon meg egy billentyűt...", + "linux.term.failed": "A(z) '{0}' a következő hibakóddal lépett ki: {1}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json new file mode 100644 index 0000000000000..e441ed0dd6dc6 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.view": "Egyedi nézetet szolgáltat", + "vscode.extension.contributes.view.id": "A vscode.workspace.createTreeView-n keresztül létrehozott nézet azonosítására szolgáló egyedi azonosító", + "vscode.extension.contributes.view.label": "A nézet kirajzolásához használt, emberek által olvasható szöveg", + "vscode.extension.contributes.view.icon": "A nézet ikonjának elérési útja", + "vscode.extension.contributes.views": "Egyedi nézeteket szolgáltat", + "showViewlet": "{0} megjelenítése", + "view": "Nézet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/explorers/browser/treeExplorerActions.i18n.json b/i18n/hun/src/vs/workbench/parts/explorers/browser/treeExplorerActions.i18n.json new file mode 100644 index 0000000000000..982d3cebdfeaa --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/explorers/browser/treeExplorerActions.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "refresh": "Frissítés" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/explorers/browser/treeExplorerService.i18n.json b/i18n/hun/src/vs/workbench/parts/explorers/browser/treeExplorerService.i18n.json new file mode 100644 index 0000000000000..ccb7f2536108a --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/explorers/browser/treeExplorerService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.noMatchingProviderId": "Nincs {0} azonosítójú TreeExplorerNodeProvider regisztrálva" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.i18n.json b/i18n/hun/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.i18n.json new file mode 100644 index 0000000000000..4c975404538f6 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorerViewlet.tree": "Fa-alapú kezelőszakasz" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/browser/dependenciesViewer.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/browser/dependenciesViewer.i18n.json new file mode 100644 index 0000000000000..0ea38cb93c45c --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/extensions/browser/dependenciesViewer.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error": "Hiba", + "Unknown Dependency": "Ismeretlen függőség:" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json new file mode 100644 index 0000000000000..b3bbb32e88603 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -0,0 +1,44 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "name": "Kiegészítő neve", + "extension id": "Kiegészítő azonosítója", + "publisher": "Kiadó neve", + "install count": "Telepítések száma", + "rating": "Értékelés", + "license": "Licenc", + "details": "Részletek", + "contributions": "Szolgáltatások", + "changelog": "Változtatási napló", + "dependencies": "Függőségek", + "noReadme": "Leírás nem található.", + "noChangelog": "Változtatási napló nem található.", + "noContributions": "Nincsenek szolgáltatások", + "noDependencies": "Nincsenek függőségek", + "settings": "Beállítások ({0})", + "setting name": "Név", + "description": "Leírás", + "default": "Alapértelmezett érték", + "debuggers": "Hibakeresők ({0})", + "debugger name": "Név", + "debugger type": "Típus", + "views": "Nézetek ({0})", + "view id": "Azonosító", + "view name": "Név", + "view location": "Hol?", + "themes": "Témák ({0})", + "JSON Validation": "JSON-validációk ({0})", + "commands": "Parancsok ({0})", + "command name": "Név", + "keyboard shortcuts": "Billentyűparancsok", + "menuContexts": "Helyi menük", + "languages": "Nyelvek ({0})", + "language id": "Azonosító", + "language name": "Név", + "file extensions": "Fájlkiterjesztések", + "grammar": "Nyelvtan", + "snippets": "Kódtöredékek" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json new file mode 100644 index 0000000000000..348b2ebb6afb4 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -0,0 +1,62 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "installAction": "Telepítés", + "installing": "Telepítés...", + "uninstallAction": "Eltávolítás", + "Uninstalling": "Eltávolítás...", + "updateAction": "Frissítés", + "updateTo": "Frissítés ({0})", + "enableForWorkspaceAction.label": "Engedélyezés a munkaterületen", + "enableAlwaysAction.label": "Engedélyezés mindig", + "disableForWorkspaceAction.label": "Letiltás a munkaterületen", + "disableAlwaysAction.label": "Letiltás mindig", + "ManageExtensionAction.uninstallingTooltip": "Eltávolítás", + "enableForWorkspaceAction": "Munkaterület", + "enableGloballyAction": "Mindig", + "enableAction": "Engedélyezés", + "disableForWorkspaceAction": "Munkaterület", + "disableGloballyAction": "Mindig", + "disableAction": "Letiltás", + "checkForUpdates": "Frissítések keresése", + "enableAutoUpdate": "Kiegészítők automatikus frissítésének engedélyezése", + "disableAutoUpdate": "Kiegészítők automatikus frissítésének letiltása", + "updateAll": "Összes kiegészítő frissítése", + "reloadAction": "Újratöltés", + "postUpdateTooltip": "Újratöltés a frissítéshez", + "postUpdateMessage": "Újratölti az ablakot a frissített kiegészítő ('{0}') aktiválásához?", + "postEnableTooltip": "Újratöltés az aktiváláshoz", + "postEnableMessage": "Újratölti az ablakot a kiegészítő ('{0}') aktiválásához?", + "postDisableTooltip": "Újratöltés a kikapcsoláshoz", + "postDisableMessage": "Újratölti az ablakot a kiegészítő ('{0}') kikapcsolásához?", + "postUninstallTooltip": "Újratöltés a kikapcsoláshoz", + "postUninstallMessage": "Újratölti az ablakot az eltávolított kiegészítő ('{0}') kikapcsolásához?", + "reload": "Ablak új&&ratöltése", + "toggleExtensionsViewlet": "Kiegészítők megjelenítése", + "installExtensions": "Kiegészítők telepítése", + "showInstalledExtensions": "Telepített kiegészítők megjelenítése", + "showDisabledExtensions": "Letiltott kiegészítők megjelenítése", + "clearExtensionsInput": "Kiegészítők beviteli mező tartalmának törlése", + "showOutdatedExtensions": "Elavult kiegészítők megjelenítése", + "showPopularExtensions": "Népszerű kiegészítők megjelenítése", + "showRecommendedExtensions": "Ajánlott kiegészítők megjelenítése", + "showWorkspaceRecommendedExtensions": "Munkaterülethez ajánlott kiegészítők megjelenítése", + "showRecommendedKeymapExtensions": "Ajánlott billentyűkonfigurációk megjelenítése", + "showRecommendedKeymapExtensionsShort": "Billentyűkonfigurációk", + "showLanguageExtensions": "Nyelvi kiegészítők megjelenítése", + "showLanguageExtensionsShort": "Nyelvi kiegészítők", + "configureWorkspaceRecommendedExtensions": "Ajánlott kiegészítők konfigurálása (munkaterületre vonatkozóan)", + "ConfigureWorkspaceRecommendations.noWorkspace": "Az ajánlatok csak egy munkaterület mappájára vonatkozóan érhetők el.", + "OpenExtensionsFile.failed": "Nem sikerült létrehozni az 'extensions.json' fájlt a '.vscode' mappánan ({0}).", + "builtin": "Beépített", + "disableAll": "Összes telepített kiegészítő letiltása", + "disableAllWorkspace": "Összes telepített kiegészítő letiltása a munkaterületre vonatkozóan", + "enableAll": "Összes telepített kiegészítő engedélyezése", + "enableAllWorkspace": "Összes telepített kiegészítő engedélyezése a munkaterületre vonatkozóan", + "extensionButtonProminentBackground": "A kiegészítőkhöz tartozó kiemelt műveletgombok (pl. a Telepítés gomb) háttérszíne.", + "extensionButtonProminentForeground": "A kiegészítőkhöz tartozó kiemelt műveletgombok (pl. a Telepítés gomb) előtérszíne.", + "extensionButtonProminentHoverBackground": "A kiegészítőkhöz tartozó kiemelt műveletgombok (pl. a Telepítés gomb) háttérszíne, ha az egér fölötte van." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json new file mode 100644 index 0000000000000..85d01b9b53eab --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "manage": "Nyomjon Entert a kiegészítők kezeléséhez.", + "searchFor": "Nyomja meg az Enter gombot a(z) '{0}' kiegészítő kereséséhez a piactéren.", + "noExtensionsToInstall": "Adja meg a kiegészítő nevét" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.i18n.json new file mode 100644 index 0000000000000..81a39e83e429f --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "app.extensions.json.title": "Kiegészítők", + "app.extensions.json.recommendations": "Ajánlott kiegészítők listája. A kiegészítők azonosítója mindig '${publisher}.${name}' formában van. Példa: 'vscode.csharp'.", + "app.extension.identifier.errorMessage": "Az elvárt formátum: '${publisher}.${name}'. Példa: 'vscode.csharp'." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json new file mode 100644 index 0000000000000..ed471bc488cfa --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensionsInputName": "Kiegészítő: {0}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json new file mode 100644 index 0000000000000..09c306397f420 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reallyRecommended2": "Ehhez a fájltípushoz a(z) '{0}' kiegészítő ajánlott", + "showRecommendations": "Ajánlatok megjelenítése", + "neverShowAgain": "Ne jelenítse meg újra", + "close": "Bezárás", + "workspaceRecommended": "A munkaterülethez vannak javasolt kiegészítők", + "ignoreExtensionRecommendations": "Figyelmen kívül akarja hagyni az összes javasolt kiegészítőt?", + "ignoreAll": "Igen, az összes figyelmen kívül hagyása", + "no": "Nem", + "cancel": "Mégse" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json new file mode 100644 index 0000000000000..61b346af2edff --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensionsCommands": "Kiegészítők kezelése", + "galleryExtensionsCommands": "Kiegészítők telepítése a galériából", + "extension": "Kiegészítő", + "extensions": "Kiegészítők", + "view": "Nézet", + "extensionsConfigurationTitle": "Kiegészítők", + "extensionsAutoUpdate": "Kiegészítők automatikus frissítése", + "extensionsIgnoreRecommendations": "Ajánlott kiegészítők figyelmen kívül hagyása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json new file mode 100644 index 0000000000000..aa157cfb84a02 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openExtensionsFolder": "Kiegészítők mappájának megnyitása", + "installVSIX": "Telepítés VSIX-ből...", + "InstallVSIXAction.success": "A kiegészítő sikeresen fel lett telepítve. Indítsa újra az engedélyezéshez.", + "InstallVSIXAction.reloadNow": "Újratöltés most" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json new file mode 100644 index 0000000000000..f71021aaf8793 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "disableOtherKeymapsConfirmation": "Letiltja a többi billentyűkonfigurációt ({0}) a billentyűparancsok közötti konfliktusok megelőzése érdekében?", + "yes": "Igen", + "no": "Nem", + "betterMergeDisabled": "A Better Merge kiegészítő most már be van építve. A telepített kiegészítő le lett tiltva és eltávolítható.", + "uninstall": "Eltávolítás", + "later": "Később" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json new file mode 100644 index 0000000000000..1cfc5763aeba1 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "marketPlace": "Piactér", + "installedExtensions": "Telepítve", + "searchInstalledExtensions": "Telepítve", + "recommendedExtensions": "Ajánlott", + "searchExtensions": "Kiegészítők keresése a piactéren", + "sort by installs": "Rendezés a telepítések száma szerint", + "sort by rating": "Rendezés értékelés szerint", + "sort by name": "Rendezés név szerint", + "suggestProxyError": "A piactér 'ECONNREFUSED' hibával tért vissza. Ellenőrizze a 'http.proxy' beállítást!", + "extensions": "Kiegészítők", + "outdatedExtensions": "{0} elavult kiegészítő" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json new file mode 100644 index 0000000000000..fefe2e3170fb8 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensions": "Kiegészítők", + "no extensions found": "Kiegészítő nem található.", + "suggestProxyError": "A piactér 'ECONNREFUSED' hibával tért vissza. Ellenőrizze a 'http.proxy' beállítást!" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json new file mode 100644 index 0000000000000..4769b5168e942 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "enableDependeciesConfirmation": "A(z) '{0}' engedélyezésével annak függőségei is engedélyezve lesznek. Szeretné folytatni?", + "enable": "Igen", + "doNotEnable": "Nem", + "disableDependeciesConfirmation": "Csak a(z) '{0}' kiegészítőt szeretné letiltani vagy annak függőségeit is?", + "disableOnly": "Csak ezt", + "disableAll": "Az összeset", + "cancel": "Mégse", + "singleDependentError": "Nem sikerült letiltani a(z) '{0}' kiegészítőt: a(z) '{1}' kiegészítő függ tőle.", + "twoDependentsError": "Nem sikerült letiltani a(z) '{0}' kiegészítőt: a(z) '{1}' és '{2}' kiegészítők függnek tőle.", + "multipleDependentsError": "Nem sikerült letiltani a(z) '{0}' kiegészítőt: a(z) '{1}', '{2}' és más kiegészítők függnek tőle.", + "installConfirmation": "Szeretné telepíteni a(z) '{0}' kiegészítőt?", + "install": "Telepítés" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json b/i18n/hun/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json new file mode 100644 index 0000000000000..d2b7c3c88fa26 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "sendFeedback": "Visszajelzés tweetelése", + "label.sendASmile": "Küldje el nekünk egy tweetben a visszajelzését!", + "patchedVersion1": "A telepítés hibás.", + "patchedVersion2": "Az alábbiakat adja meg, ha hibát akar beküldeni.", + "sentiment": "Milyennek találja az alkalmazást?", + "smileCaption": "Elégedett", + "frownCaption": "Elégedetlen vagyok vele", + "other ways to contact us": "Más értesítési módok", + "submit a bug": "Hibajelentés küldése", + "request a missing feature": "Hiányzó funkció kérése", + "tell us why?": "Mondja el, hogy miért", + "commentsHeader": "Visszajelzés", + "tweet": "Tweer", + "character left": "karakter maradt", + "characters left": "karakter maradt", + "feedbackSending": "Küldés", + "feedbackSent": "Köszönjük!", + "feedbackSendingError": "Újrapróbálkozás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/browser/editors/binaryFileEditor.i18n.json b/i18n/hun/src/vs/workbench/parts/files/browser/editors/binaryFileEditor.i18n.json new file mode 100644 index 0000000000000..b0c0567e17920 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/browser/editors/binaryFileEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "binaryFileEditor": "Bináris megjelenítő" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/browser/editors/textFileEditor.i18n.json b/i18n/hun/src/vs/workbench/parts/files/browser/editors/textFileEditor.i18n.json new file mode 100644 index 0000000000000..d37f4ed8778ea --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/browser/editors/textFileEditor.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "textFileEditor": "Szövegfájlszerkesztő", + "createFile": "Fájl létrehozása", + "fileEditorWithInputAriaLabel": "{0}. Szövegfájlszerkesztő.", + "fileEditorAriaLabel": "Szövegfájlszerkesztő" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/browser/fileActions.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/files/browser/fileActions.contribution.i18n.json new file mode 100644 index 0000000000000..a5d582952d07c --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/browser/fileActions.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "filesCategory": "Fájlok", + "revealInSideBar": "Megjelenítés az oldalsávon", + "acceptLocalChanges": "Helyi változtatások használata és a lemezen lévő tartalom felülírása", + "revertLocalChanges": "Helyi változtatások eldobása és visszaállítás a lemezen lévő tartalomra" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/browser/fileActions.i18n.json b/i18n/hun/src/vs/workbench/parts/files/browser/fileActions.i18n.json new file mode 100644 index 0000000000000..a6ef3bb7930a8 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/browser/fileActions.i18n.json @@ -0,0 +1,73 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "retry": "Újra", + "rename": "Átnevezés", + "newFile": "Új fájl", + "newFolder": "Új mappa", + "openFolderFirst": "Mappák vagy fájlok létrehozásához először nyisson meg egy mappát!", + "newUntitledFile": "Új, névtelen fájl", + "createNewFile": "Új fájl", + "createNewFolder": "Új mappa", + "deleteButtonLabelRecycleBin": "Áthelyezés a lo&&mtárba", + "deleteButtonLabelTrash": "Áthelyezés a &&kukába", + "deleteButtonLabel": "&&Törlés", + "dirtyMessageFolderOneDelete": "Törölni készül egy olyan mappát, melyben egy nem mentett változtatásokat tartalmazó fájl van. Folytatja?", + "dirtyMessageFolderDelete": "Törölni készül egy olyan mappát, melyben {0} nem mentett változtatásokat tartalmazó fájl van. Folytatja?", + "dirtyMessageFileDelete": "Törölni készül egy olyan fájlt, amely nem mentett változtatásokat tartalmaz. Folytatja?", + "dirtyWarning": "A módosítások elvesznek, ha nem menti őket.", + "confirmMoveTrashMessageFolder": "Törli a(z) '{0}' nevű mappát és a teljes tartalmát?", + "confirmMoveTrashMessageFile": "Törli a(z) '{0}' nevű fájlt?", + "undoBin": "Helyreállíthatja a lomtárból.", + "undoTrash": "Helyreállíthatja a kukából.", + "confirmDeleteMessageFolder": "Törli a(z) {0} mappát és a teljes tartalmát?", + "confirmDeleteMessageFile": "Véglegesen törli a következőt: {0}?", + "irreversible": "A művelet nem vonható vissza!", + "permDelete": "Végleges törlés", + "delete": "Törlés", + "importFiles": "Fájlok importálása", + "confirmOverwrite": "A célmappában már van ilyen nevű mappa vagy fájl. Le szeretné cserélni?", + "replaceButtonLabel": "&&Csere", + "copyFile": "Másolás", + "pasteFile": "Beillesztés", + "duplicateFile": "Duplikálás", + "openToSide": "Megnyitás oldalt", + "compareSource": "Kijelölés összehasonlításhoz", + "globalCompareFile": "Aktív fájl összehasonlítása...", + "pickHistory": "Válasszon egy korábban megnyitott fájlt az összehasonlításhoz", + "unableToFileToCompare": "A kiválasztott fájl nem hasonlítható össze a következővel: '{0}'.", + "openFileToCompare": "Fájlok összehasonlításához elősször nyisson meg egy fájlt.", + "compareWith": "Összehasonlítás a következővel: '{0}'", + "compareFiles": "Fájlok összehasonlítása", + "refresh": "Frissítés", + "save": "Mentés", + "saveAs": "Mentés másként...", + "saveAll": "Összes mentése", + "saveAllInGroup": "Összes mentése a csoportban", + "saveFiles": "Módosított fájlok mentése", + "revert": "Fájl visszaállítása", + "focusOpenEditors": "Váltás a megnyitott szerkesztőablakok nézetre", + "focusFilesExplorer": "Váltás a fájlkezelőre", + "showInExplorer": "Aktív fájl megjelenítése az oldalsávon", + "openFileToShow": "Fájl fájlkezelőben történő megjelenítéséhez először nyisson meg egy fájlt", + "collapseExplorerFolders": "Mappák összecsukása a fájlkezelőben", + "refreshExplorer": "Fájlkezelő frissítése", + "openFile": "Fájl megnyitása...", + "openFileInNewWindow": "Aktív fájl megnyitása új ablakban", + "openFileToShowInNewWindow": "Fájl új ablakban történő megnyitásához először nyisson meg egy fájlt", + "revealInWindows": "Megjelenítés a fájlkezelőben", + "revealInMac": "Megjelenítés a Finderben", + "openContainer": "Tartalmazó mappa megnyitása", + "revealActiveFileInWindows": "Aktív fájl megjelenítése a Windows Intézőben", + "revealActiveFileInMac": "Aktív fájl megjelenítése a Finderben", + "openActiveFileContainer": "Aktív fájlt tartalmazó mappa megnyitása", + "copyPath": "Elérési út másolása", + "copyPathOfActive": "Aktív fájl elérési útjának másolása", + "emptyFileNameError": "Meg kell adni egy fájl vagy mappa nevét.", + "fileNameExistsError": "Már létezik **{0}** nevű fájl vagy mappa ezen a helyszínen. Adjon meg egy másik nevet!", + "invalidFileNameError": "A(z) **{0}** név nem érvényes fájl- vagy mappanév. Adjon meg egy másik nevet!", + "filePathTooLongError": "A(z) **{0}** név egy olyan elérési utat eredményez, ami túl hosszú. Adjon meg egy másik nevet!" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/browser/fileCommands.i18n.json b/i18n/hun/src/vs/workbench/parts/files/browser/fileCommands.i18n.json new file mode 100644 index 0000000000000..dd9057b1fa4b3 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/browser/fileCommands.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFileToCopy": "Fájlok elérési útjának másolásához elősször nyisson meg egy fájlt", + "openFileToReveal": "Fájlok felfedéséhez elősször nyisson meg egy fájlt" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/files/browser/files.contribution.i18n.json new file mode 100644 index 0000000000000..55fe3cabb683a --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -0,0 +1,42 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showExplorerViewlet": "Fájlkezelő megjelenítése", + "explore": "Fájlkezelő", + "view": "Nézet", + "textFileEditor": "Szövegfájlszerkesztő", + "binaryFileEditor": "Bináris fájlszerkesztő", + "filesConfigurationTitle": "Fájlok", + "exclude": "Globális minták konfigurálása fájlok és mappák kiszűréséhez.", + "files.exclude.boolean": "A globális minta, amire illesztve lesznek a fájlok elérési útjai. A minta engedélyezéséhez vagy letiltásához állítsa igaz vagy hamis értékre.", + "files.exclude.when": "További ellenőrzés elvégzése egy egyező fájl testvérein. Az egyező fájlnévhez használja a $(basename) változót.", + "associations": "Rendeljen nyelveket a fájlokhoz (pl: \"*.kiterjesztés\": \"html\"). Ezek a hozzárendelések elsőbbséget élveznek a telepített nyelvek által definiált alapértelmezett beállításokkal szemben.", + "encoding": "A fájlok olvasásakor és írásakor használt alapértelmezett karakterkódolás.", + "autoGuessEncoding": "Ha engedélyezve van, az alkalmazás automatikusan megpróbálja kitalálni a fájlok kódolását megnyitáskor", + "eol": "Az alapértelmezett sorvégjel. LF-hez használjon \\n-t, CRLF-hez pedig \\r\\n-t.", + "trimTrailingWhitespace": "Ha engedélyezve van, a fájl mentésekor levágja a sor végén található szóközöket.", + "insertFinalNewline": "Ha engedélyezve van, mentéskor beszúr egy záró újsort a fájl végére.", + "files.autoSave.off": "A módosított fájlok soha nincsenek automatikusan mentve.", + "files.autoSave.afterDelay": "A módosított fájlok automatikusan mentésre kerülnek a 'files.autoSaveDelay' beállításban meghatározott időközönként.", + "files.autoSave.onFocusChange": "A módosított fájlok automatikusan mentésre kerülnek, ha a szerkesztőablak elveszíti a fókuszt.", + "files.autoSave.onWindowChange": "A módosított fájlok automatikusan mentésre kerülnek, ha az ablak elveszíti a fókuszt.", + "autoSave": "Meghatározza a módosított fájlok automatikus mentési stratégiáját. Elfogadott értékek: '{0}', '{1}', '{2}' (a szerkesztőablak elveszíti a fókuszt), '{3}' (az ablak elveszíti a fókuszt). Ha az értéke '{4}', megadható a késleltetés a 'files.autoSaveDelay' beállításban.", + "autoSaveDelay": "Meghatározza ezredmásodpercben a késleltetést, ami után a módosított fájlok automatikusan mentésre kerülnek. Csak akkor van hatása, ha a 'files.autoSave' beállítás értéke '{0}'.", + "watcherExclude": "Globális minta, ami meghatározza azoknak a fájloknak a listáját, amelyek ki vannak szűrve a figyelésből. A mintáknak abszolút elérési utakra kell illeszkedniük (azaz előtagként adja hozzá a **-t vagy a teljes elérési utat a megfelelő illeszkedéshez). A beállítás módosítása újraindítást igényel. Ha úgy észleli, hogy a Code túl sok processzort használ indításnál, ki tudja szűrni a nagy mappákat a kezdeti terhelés csökkentés érdekében.", + "hotExit.off": "Gyors kilépés letiltása.", + "hotExit.onExit": "Gyors kilépésről akkor van szó, ha az utolsó ablakot bezárják Windowson és Linuxon, vagy ha a workbench.action.quit parancs van futtatva (a parancskatalógusból, billentyűkombinációval vagy a menüből). Az összes biztonsági mentéssel rendelkező ablak helyre lesz állítva a következő indítás során.", + "hotExit.onExitAndWindowClose": "Gyors kilépésről akkor van szó, ha az utolsó ablakot bezárják Windowson és Linuxon, ha a workbench.action.quit parancs van futtatva (a parancskatalógusból, billentyűkombinációval vagy a menüből), vagy bármely ablak, amelyben mappa van megnyitva, függetlenül attól, hogy az az utolsó ablak-e. Az összes megnyitott, mappa nélküli ablak helyre lesz állítva a következő indítás során. A megnyitott mappát tartalmazó ablakok helyreállításához állítsa a \"window.restoreWindows\" értékét \"all\"-ra.", + "hotExit": "Meghatározza, hogy a nem mentett fájlokra emlékezzen-e az alkalmazás a munkamenetek között, így ki lehet hagyni a mentéssel kapcsolatos felugró ablakokat kilépésnél.", + "useExperimentalFileWatcher": "Új, kísérleti fájlfigyelő használata.", + "defaultLanguage": "Az új fájlokhoz alapértelmezetten hozzárendelt nyelv.", + "editorConfigurationTitle": "Szerkesztőablak", + "formatOnSave": "Fájlok formázása mentéskor. Az adott nyelvhez rendelkezésre kell állni formázónak, nem lehet beállítva automatikus mentés, és a szerkesztő nem állhat éppen lefelé.", + "explorerConfigurationTitle": "Fájlkezelő", + "openEditorsVisible": "A megnyitott szerkesztőablakok panelen megjelenített szerkesztőablakok száma. Állítsa 0-ra, ha el szeretné rejteni a panelt.", + "dynamicHeight": "Meghatározza, hogy a megnyitott szerkesztőablakok szakasz magassága automatikusan illeszkedjen a megnyitott elemek számához vagy sem.", + "autoReveal": "Meghatározza, hogy a fájlkezelőben automatikusan fel legyenek fedve és ki legyenek jelölve a fájlok, amikor megnyitják őket.", + "enableDragAndDrop": "Meghatározza, hogy a fájlkezelőben áthelyezhetők-e a fájlok és mappák húzással." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json b/i18n/hun/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json new file mode 100644 index 0000000000000..bd3c645714af5 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "discard": "Elvetés", + "overwrite": "Felülírás", + "retry": "Újrapróbálkozás", + "readonlySaveError": "Nem sikerült menteni a(z) '{0}' fájlt: a fájl írásvédett. Válassza a 'Felülírás' lehetőséget a védelem eltávolításához.", + "genericSaveError": "Hiba a(z) '{0}' mentése közben: {1}", + "staleSaveError": "Nem sikerült menteni a(z) '{0}' fájlt: a lemezen lévő tartalom újabb. Kattintson az **Összehasonlítás*** gombra a helyi és a lemezen lévő változat összehasonlításához.", + "compareChanges": "Összehasonlítás", + "saveConflictDiffLabel": "{0} (a lemezen) ↔ {1} ({2}) – Mentési konfliktus feloldása", + "userGuide": "Használja a szerkesztői eszköztáron található műveleteket a helyi változtatások **visszavonására** vagy **írja felül** a lemezen lévő tartalmat a változtatásokkal" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json b/i18n/hun/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json new file mode 100644 index 0000000000000..924c7ac55937f --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noWorkspace": "Nincs mappa megnyitva", + "explorerSection": "Fájlkezelő szakasz", + "noWorkspaceHelp": "Még nem nyitott meg mappát", + "openFolder": "Mappa megnyitása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json b/i18n/hun/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json new file mode 100644 index 0000000000000..29868c9294666 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "explorerSection": "Fájlkezelő szakasz", + "folders": "Mappák", + "treeAriaLabel": "Fájlkezelő" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/browser/views/explorerViewer.i18n.json b/i18n/hun/src/vs/workbench/parts/files/browser/views/explorerViewer.i18n.json new file mode 100644 index 0000000000000..d2f6b36195dbd --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/browser/views/explorerViewer.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileInputAriaLabel": "Adja meg a fájl nevét. Nyomjon 'Enter'-t a megerősítéshez vagy 'Escape'-et a megszakításhoz.", + "filesExplorerViewerAriaLabel": "{0}, Fájlkezelő", + "confirmOverwriteMessage": "A célmappában már létezik '{0}' nevű elem. Le szeretné cserélni?", + "irreversible": "A művelet nem vonható vissza!", + "replaceButtonLabel": "&&Csere" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json b/i18n/hun/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json new file mode 100644 index 0000000000000..4a7e281205717 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openEditors": "Megnyitott szerkesztőablakok", + "openEditosrSection": "Megnyitott szerkesztőablakok szakasz", + "treeAriaLabel": "Megnyitott szerkesztőablakok: az aktív fájlok listája", + "dirtyCounter": "{0} nincs mentve" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json b/i18n/hun/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json new file mode 100644 index 0000000000000..4ee03d3f18f04 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGroupAriaLabel": "{0}, Szerkesztőcsoport", + "openEditorAriaLabel": "{0}, megnyitott szerkesztőablak", + "saveAll": "Összes mentése", + "closeAllUnmodified": "Nem módosultak bezárása", + "closeAll": "Összes bezárása", + "close": "Bezárás", + "closeOthers": "Többi bezárása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/common/dirtyFilesTracker.i18n.json b/i18n/hun/src/vs/workbench/parts/files/common/dirtyFilesTracker.i18n.json new file mode 100644 index 0000000000000..24ed237c8feac --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/common/dirtyFilesTracker.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "dirtyFiles": "{0} nem mentett fájl" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json b/i18n/hun/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json new file mode 100644 index 0000000000000..30e3c5f45be9a --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "orphanedFile": "{0} (törölve a lemezről)" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/html/browser/html.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/html/browser/html.contribution.i18n.json new file mode 100644 index 0000000000000..cd4faab781787 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/html/browser/html.contribution.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "html.editor.label": "HTML-előnézet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/html/browser/htmlPreviewPart.i18n.json b/i18n/hun/src/vs/workbench/parts/html/browser/htmlPreviewPart.i18n.json new file mode 100644 index 0000000000000..e0ec7953f3b60 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/html/browser/htmlPreviewPart.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "html.voidInput": "Érvénytelen bemenet a szerkesztőablakból." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/html/browser/webview.i18n.json b/i18n/hun/src/vs/workbench/parts/html/browser/webview.i18n.json new file mode 100644 index 0000000000000..2f238385c100a --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/html/browser/webview.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "devtools.webview": "Fejlesztői: Webview-eszközök" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/markers/common/messages.i18n.json b/i18n/hun/src/vs/workbench/parts/markers/common/messages.i18n.json new file mode 100644 index 0000000000000..f17c3b300c490 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/markers/common/messages.i18n.json @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewCategory": "Nézet", + "problems.view.show.label": "Problémák megjelenítése", + "problems.panel.configuration.title": "Problémák-nézet", + "problems.panel.configuration.autoreveal": "Meghatározza, hogy a problémák nézet automatikusan felfedje-e a fájlokat, amikor megnyitja őket.", + "markers.panel.title.problems": "Problémák", + "markers.panel.aria.label.problems.tree": "Problémák fájlonként csoportosítva", + "markers.panel.no.problems.build": "A munkaterületen eddig egyetlen hiba sem lett érzékelve.", + "markers.panel.no.problems.filters": "A megadott szűrőfeltételnek egyetlen elem sem felel meg.", + "markers.panel.action.filter": "Problémák szűrése", + "markers.panel.filter.placeholder": "Szűrés típus vagy szöveg alapján", + "markers.panel.filter.errors": "hibák", + "markers.panel.filter.warnings": "figyelmeztetések", + "markers.panel.filter.infos": "információk", + "markers.panel.single.error.label": "1 hiba", + "markers.panel.multiple.errors.label": "{0} hiba", + "markers.panel.single.warning.label": "1 figyelmeztetés", + "markers.panel.multiple.warnings.label": "{0} figyelmeztetés", + "markers.panel.single.info.label": "1 információ", + "markers.panel.multiple.infos.label": "{0} információ", + "markers.panel.single.unknown.label": "1 ismeretlen", + "markers.panel.multiple.unknowns.label": "{0} ismeretlen", + "markers.panel.at.ln.col.number": "({0}, {1})", + "problems.tree.aria.label.resource": "{0} {1} problémával", + "problems.tree.aria.label.error.marker": "{0} által generált hiba: {1}, sor: {2}, oszlop: {3}", + "problems.tree.aria.label.error.marker.nosource": "Hiba: {0}, sor: {1}, oszlop: {2}", + "problems.tree.aria.label.warning.marker": "{0} által generált figyelmeztetés: {1}, sor: {2}, oszlop: {3}", + "problems.tree.aria.label.warning.marker.nosource": "Figyelmeztetés: {0}, sor: {1}, oszlop: {2}", + "problems.tree.aria.label.info.marker": "{0} által generált információ: {1}, sor: {2}, oszlop: {3}", + "problems.tree.aria.label.info.marker.nosource": "Információ: {0}, sor: {1}, oszlop: {2}", + "problems.tree.aria.label.marker": "{0} által generált probléma: {1}, sor: {2}, oszlop: {3}", + "problems.tree.aria.label.marker.nosource": "Probléma: {0}, sor: {1}, oszlop: {2}", + "errors.warnings.show.label": "Hibák és figyelmezetések megjelenítése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/markers/electron-browser/markersElectronContributions.i18n.json b/i18n/hun/src/vs/workbench/parts/markers/electron-browser/markersElectronContributions.i18n.json new file mode 100644 index 0000000000000..ef6d4a9d7dbf3 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/markers/electron-browser/markersElectronContributions.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "copyMarker": "Másolás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/nps/electron-browser/nps.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/nps/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..bd0a0d1969614 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/nps/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "Lenne kedve egy gyors elégedettségi felméréshez?", + "takeSurvey": "Felmérés kitöltése", + "remindLater": "Emlékeztessen később", + "neverAgain": "Ne jelenjen meg újra" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/output/browser/output.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/output/browser/output.contribution.i18n.json new file mode 100644 index 0000000000000..06381af2f6892 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/output/browser/output.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "output": "Kimenet", + "viewCategory": "Nézet", + "clearOutput.label": "Kimenet törlése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/output/browser/outputActions.i18n.json b/i18n/hun/src/vs/workbench/parts/output/browser/outputActions.i18n.json new file mode 100644 index 0000000000000..fb409d189e401 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/output/browser/outputActions.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleOutput": "Kimenet be- és kikapcsolása", + "clearOutput": "Kimenet törlése", + "toggleOutputScrollLock": "Kimenet görgetési zárának be- és kikapcsolása", + "switchToOutput.label": "Váltás a kimenetre" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/output/browser/outputPanel.i18n.json b/i18n/hun/src/vs/workbench/parts/output/browser/outputPanel.i18n.json new file mode 100644 index 0000000000000..b910266898226 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/output/browser/outputPanel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "outputPanelWithInputAriaLabel": "{0}, kimenetpanel", + "outputPanelAriaLabel": "Kimenetpanel" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/output/common/output.i18n.json b/i18n/hun/src/vs/workbench/parts/output/common/output.i18n.json new file mode 100644 index 0000000000000..6d78e77e5ec68 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/output/common/output.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "output": "Kimenet", + "channel": "a következőhöz: '{0}'" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json new file mode 100644 index 0000000000000..497bbff0b892d --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "slow": "Lassú indulás érzékelve", + "slow.detail": "Sajnáljuk, hogy lassú volt az alkalmazás indulása. Indítsa újra a(z) '{0}' alkalmazást bekapcsolt profilozással, ossza meg a profilt velünk, és keményen fogunk dolgozni azon, hogy az indulás ismét gyors legyen.", + "prof.message": "Profil sikeresen elkészítve.", + "prof.detail": "Készítsen egy hibajelentést, és manuálisan csatolja a következő fájlokat:\n{0}", + "prof.restartAndFileIssue": "Hibajelentés létrehozása és újraindítás", + "prof.restart": "Újraindítás", + "prof.thanks": "Köszönjük a segítséget!", + "prof.detail.restart": "Egy utolsó újraindítás szükséges a(z) '{0}' használatához. Ismételten köszönjük a közreműködését!" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json b/i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json new file mode 100644 index 0000000000000..f660711dc6b6d --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defineKeybinding.initial": "Üsse le a kívánt billentyűkombinációt, majd nyomjon ENTER-t. ESCAPE a megszakításhoz.", + "defineKeybinding.chordsTo": "kombináció a következőhöz:" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json new file mode 100644 index 0000000000000..1e432a804192a --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "keybindingsInputName": "Billentyűparancsok", + "SearchKeybindings.AriaLabel": "Billentyűparancsok keresése", + "SearchKeybindings.Placeholder": "Billentyűparancsok keresése", + "sortByPrecedene": "Rendezés precedencia szerint", + "header-message": "Haladó beállításokhoz nyissa meg és szerkessze a következőt:", + "keybindings-file-name": "keybindings.json", + "keybindingsLabel": "Billentyűparancsok", + "changeLabel": "Billentyűparancs módosítása", + "addLabel": "Billentyűparancs hozzáadása", + "removeLabel": "Billentyűparancs eltávolítása", + "resetLabel": "Billentyűparancs visszaállítása", + "showConflictsLabel": "Konfliktusok megjelenítése", + "copyLabel": "Másolás", + "error": "'{0}' hiba a billentyűparancsok szerkesztése közben. Nyissa meg a 'keybindings.json' fájlt, és ellenőrizze!", + "command": "Parancs", + "keybinding": "Billentyűparancs", + "source": "Forrás", + "when": "Mikor?", + "editKeybindingLabelWithKey": "{0} billentyűparancs módosítása", + "editKeybindingLabel": "Billentyűparancs módosítása", + "addKeybindingLabelWithKey": "{0} billentyűparancs hozzáadása", + "addKeybindingLabel": "Billentyűparancs hozzáadása", + "commandAriaLabel": "Parancs: {0}.", + "keybindingAriaLabel": "Billentyűparancs: {0}.", + "noKeybinding": "Nincs billentyűparancs hozzárendelve.", + "sourceAriaLabel": "Forrás: {0}.", + "whenAriaLabel": "Mikor: {0}.", + "noWhen": "Nincs 'mikor'-kontextus." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json new file mode 100644 index 0000000000000..bce5ff41424bd --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defineKeybinding.start": "Billentyűparancs megadása", + "defineKeybinding.kbLayoutErrorMessage": "A jelenlegi billentyűkiosztással nem használható ez a billentyűkombináció.", + "defineKeybinding.kbLayoutLocalAndUSMessage": "**{0}** a jelenlegi billentyűkiosztással (**{1}** az alapértelmezett amerikaival.", + "defineKeybinding.kbLayoutLocalMessage": "**{0}** a jelenlegi billentyűkiosztással." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/preferences/browser/preferences.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferences.contribution.i18n.json new file mode 100644 index 0000000000000..b2ceafc3869aa --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferences.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultPreferencesEditor": "Alapértelmezett beállításszerkesztő", + "keybindingsEditor": "Billentyűparancs-szerkesztő", + "preferences": "Beállítások" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json new file mode 100644 index 0000000000000..6b0c1dfa1dace --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openGlobalSettings": "Felhasználói beállítások megnyitása", + "openGlobalKeybindings": "Billentyűparancsok megnyitása", + "openGlobalKeybindingsFile": "Billentyűparancsfájl megnyitása", + "openWorkspaceSettings": "Munkaterület beállításainak megnyitása", + "configureLanguageBasedSettings": "Nyelvspecifikus beállítások konfigurálása...", + "languageDescriptionConfigured": "(({0})", + "pickLanguage": "Nyelv kiválasztása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json new file mode 100644 index 0000000000000..f06c901c35494 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "settingsEditorName": "Alapértelmezett beállítások", + "SearchSettingsWidget.AriaLabel": "Beállítások keresése", + "SearchSettingsWidget.Placeholder": "Beállítások keresése", + "totalSettingsMessage": "Összesen {0} beállítás", + "noSettingsFound": "Nincs eredmény", + "oneSettingFound": "1 illeszkedő beállítás", + "settingsFound": "{0} illeszkedő beállítás", + "preferencesAriaLabel": "Az alapértelmezett beállítások. Írásvédett szerkesztőablak." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json new file mode 100644 index 0000000000000..887d458f31883 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "errorInvalidConfiguration": "Nem sikerült írni a beállításokba. Javítsa a fájlban található hibákat/figyelmeztetéseket, majd próbálja újra!", + "defaultSettingsTitle": "Alapértelmezett beállítások", + "defaultSettingsMessage": "A jobb oldalon lévő fájlban elhelyezett beállítások felülírják az alapértelmezett beállításokat.", + "noSettingsFound": "Beállítás nem található.", + "editTtile": "Szerkesztés", + "replaceDefaultValue": "Csere a beállításokban", + "copyDefaultValue": "Másolás a beállításokba", + "unsupportedPHPExecutablePathSetting": "Ez a beállítás csak a felhasználói beállításokban szerepelhet. A PHP munkaterülethez történő konfigurálásához nyisson meg egy PHP-fájlt, majd kattintson a PHP-elérési útra az állapotsoron!", + "unsupportedWorkspaceSetting": "Ez a beállítás csak a felhasználói beállításokban szerepelhet." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesService.i18n.json b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesService.i18n.json new file mode 100644 index 0000000000000..a7800d606fb5d --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesService.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFolderFirst": "Munkaterületspecifikus beállítások létrehozásához nyisson meg egy mappát", + "emptyKeybindingsHeader": "Az ebben a fájlban elhelyezett billentyűparancsok felülírják az alapértelmezett beállításokat", + "defaultKeybindings": "Alapértelmezett billentyűparancsok", + "emptySettingsHeader": "Az ebben a fájlban elhelyezett beállítások felülírják az alapértelmezett beállításokat", + "emptySettingsHeader1": "Az ebben a fájlban elhelyezett beállítások felülírják az alapértelmezett és felhasználói beállításokat", + "fail.createSettings": "Nem sikerült a(z) '{0}' létrehozás ({1})." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json new file mode 100644 index 0000000000000..b2d1254fb58af --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "settingsSwitcherBarAriaLabel": "Beállításkapcsoló", + "userSettings": "Felhasználói beállítások", + "workspaceSettings": "Munkaterület-beállítások" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json b/i18n/hun/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json new file mode 100644 index 0000000000000..8fb1c62719267 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "default": "Alapértelmezett", + "user": "Felhasználói", + "meta": "meta", + "option": "beállítás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json b/i18n/hun/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json new file mode 100644 index 0000000000000..f246587a26b35 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "commonlyUsed": "Gyakran használt", + "noSettings": "Nincsenek beállítások.", + "defaultKeybindingsHeader": "A billentyűparancsok fájlban elhelyezett billentyűparancsok felülírják az alapértelmezett beállításokat" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json b/i18n/hun/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json new file mode 100644 index 0000000000000..41ec82c33f721 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showTriggerActions": "Minden parancs megjelenítése", + "clearCommandHistory": "Parancselőzmények törlése", + "showCommands.label": "Parancskatalógus...", + "entryAriaLabelWithKey": "{0}, {1}, parancsok", + "entryAriaLabel": "{0}, parancs", + "canNotRun": "Innen nem futtatható a(z) {0} parancs.", + "actionNotEnabled": "Ebben a kontextusban nem engedélyezett a(z) {0} parancs futtatása.", + "recentlyUsed": "legutóbb használt", + "morecCommands": "további parancsok", + "commandLabel": "{0}: {1}", + "cat.title": "{0}: {1}", + "noCommandsMatching": "Parancs nem található" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.i18n.json b/i18n/hun/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.i18n.json new file mode 100644 index 0000000000000..fca514543eac2 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "gotoLine": "Sor megkeresése...", + "gotoLineLabelEmptyWithLimit": "A keresett sor 1 és {0} közötti sorszáma", + "gotoLineLabelEmpty": "A keresett sor száma", + "gotoLineColumnLabel": "Ugrás a(z) {0}. sor {1}. oszlopára", + "gotoLineLabel": "Sor megkeresése {0}", + "gotoLineHandlerAriaLabel": "Adja meg a keresett sor számát!", + "cannotRunGotoLine": "Sor megkereséséhez nyisson meg egy fájlt" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.i18n.json b/i18n/hun/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.i18n.json new file mode 100644 index 0000000000000..25da1f31b6b8b --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.i18n.json @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "gotoSymbol": "Ugrás szimbólumhoz egy fájlban...", + "symbols": "szimbólumok ({0})", + "method": "metódusok ({0})", + "function": "függvények ({0})", + "_constructor": "konstruktorok ({0})", + "variable": "változók ({0})", + "class": "osztályok ({0})", + "interface": "interfészek ({0})", + "namespace": "névterek ({0})", + "package": "csomagok ({0})", + "modules": "modulok ({0})", + "property": "tulajdonságok ({0})", + "enum": "enumerátorok ({0n)", + "string": "karakterláncok ({0})", + "rule": "szabályok ({0})", + "file": "fájlok ({0})", + "array": "tömbök ({0})", + "number": "számok ({0})", + "boolean": "logikai értékek ({0})", + "object": "objektumok ({0})", + "key": "kulcsok ({0})", + "entryAriaLabel": "{0}, szimbólumok", + "noSymbolsMatching": "Nincs illeszkedő szimbólum", + "noSymbolsFound": "Szimbólum nem található", + "gotoSymbolHandlerAriaLabel": "Írjon az aktív szerkesztőablakban található szimbólumok szűréséhez.", + "cannotRunGotoSymbolInFile": "Ehhez a fájlhoz nincs szimbóluminformáció", + "cannotRunGotoSymbol": "Szimbólum megkereséséhez nyisson meg egy szövegfájlt" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/quickopen/browser/helpHandler.i18n.json b/i18n/hun/src/vs/workbench/parts/quickopen/browser/helpHandler.i18n.json new file mode 100644 index 0000000000000..3b68e86853265 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/quickopen/browser/helpHandler.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, választó súgó", + "globalCommands": "globális parancsok", + "editorCommands": "szerkesztőablak parancsai" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.i18n.json new file mode 100644 index 0000000000000..7e61210cdf735 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "commandsHandlerDescriptionDefault": "Parancsok megjelenítése és futtatása", + "gotoLineDescriptionMac": "Sor megkeresése", + "gotoLineDescriptionWin": "Sor megkeresése", + "gotoSymbolDescription": "Ugrás szimbólumhoz egy fájlban...", + "gotoSymbolDescriptionScoped": "Szimbólum megkeresése kategória alapján", + "helpDescription": "Súgó megjelenítése", + "viewPickerDescription": "Nézet megnyitása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json b/i18n/hun/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json new file mode 100644 index 0000000000000..955a8d6a1ecec --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, nézetválasztó", + "views": "Nézetek", + "panels": "Panelek", + "terminals": "Terminál", + "terminalTitle": "{0}: {1}", + "channels": "Kimenet", + "openView": "Nézet megnyitása", + "quickOpenView": "Gyors megnyitás nézet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json new file mode 100644 index 0000000000000..389c19ad24f8a --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "relaunchSettingMessage": "Egy olyan beállítás változott, melynek hatályba lépéséhez újraindítás szükséges.", + "relaunchSettingDetail": "A beállítás engedélyezéséhez nyomja meg az újraindítás gombot a {0} újraindításához.", + "restart": "Újraindítás", + "relaunchWorkspaceMessage": "A munkaterülethez mappa lett hozzáadva vagy eltávolítva, melynek hatályba lépéséhez újraindítás szükséges.", + "relaunchWorkspaceDetail": "Az ablak újratöltéséhez és a beállítások módosításainak érvénybe léptetéséhez nyomja meg az újraindítás gombot!", + "reload": "Újratöltés" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/hun/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json new file mode 100644 index 0000000000000..088f4ecdf1739 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGutterModifiedBackground": "A szerkesztőablak margójának háttérszíne a módosított soroknál.", + "editorGutterAddedBackground": "A szerkesztőablak margójának háttérszíne a hozzáadott soroknál.", + "editorGutterDeletedBackground": "A szerkesztőablak margójának háttérszíne a törölt soroknál." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json new file mode 100644 index 0000000000000..fd2863510afd5 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleGitViewlet": "Git megjelenítése", + "installAdditionalSCMProviders": "További verziókezelő rendszerek telepítése...", + "source control": "Verziókezelő rendszer", + "toggleSCMViewlet": "Verziókezelő megjelenítése", + "view": "Nézet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/scm/electron-browser/scmActivity.i18n.json b/i18n/hun/src/vs/workbench/parts/scm/electron-browser/scmActivity.i18n.json new file mode 100644 index 0000000000000..89a9d4e2341c4 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/scm/electron-browser/scmActivity.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "scmPendingChangesBadge": "{0} függőben lévő módosítás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json b/i18n/hun/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json new file mode 100644 index 0000000000000..a7af703f9fc29 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "installAdditionalSCMProviders": "További verziókezelő rendszerek telepítése...", + "switch provider": "Váltás más verziókezelő rendszerre..." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json b/i18n/hun/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json new file mode 100644 index 0000000000000..529d2491ca21f --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "commitMessage": "Üzenet (nyomja meg a következőt a commithoz: {0})", + "source control": "Verziókezelő rendszer", + "viewletTitle": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/search/browser/openAnythingHandler.i18n.json b/i18n/hun/src/vs/workbench/parts/search/browser/openAnythingHandler.i18n.json new file mode 100644 index 0000000000000..20f5e1c646aa9 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/search/browser/openAnythingHandler.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileAndTypeResults": "fájl- és szimbólumkeresés eredménye", + "fileResults": "fájlkeresés eredménye" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/search/browser/openFileHandler.i18n.json b/i18n/hun/src/vs/workbench/parts/search/browser/openFileHandler.i18n.json new file mode 100644 index 0000000000000..39b05feed4f2d --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/search/browser/openFileHandler.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, fájlválasztó", + "searchResults": "keresési eredmények" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/search/browser/openSymbolHandler.i18n.json b/i18n/hun/src/vs/workbench/parts/search/browser/openSymbolHandler.i18n.json new file mode 100644 index 0000000000000..a8dd776594b11 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/search/browser/openSymbolHandler.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, szimbólumválasztó", + "symbols": "szimbólumkeresési eredmények", + "noSymbolsMatching": "Nincs illeszkedő szimbólum", + "noSymbolsWithoutInput": "Adja meg a keresett szimbólumot" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json b/i18n/hun/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json new file mode 100644 index 0000000000000..0f499bf29572c --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultLabel": "bemeneti adat", + "patternDescription": "Globális minták használata", + "patternHelpInclude": "Az illesztéshez használt minta. Pl. **\\*\\*/*.js** használható az összes JavaScript-fájl, vagy a **myFolder/\\*\\*** egy adott mappa és a benne található összes fájl illesztéséhez.\n\n**Referencia**:\n**\\*** 0 vagy több karakterre illeszkedik\n**?** 1 karakterre illeszkedik\n**\\*\\*** 0 vagy több könyvtárra illeszkedik\n**[a-z]** karakterek tartományára illeszkedik\n**{a,b}** a megadott minták bármelyikére illeszkedik", + "useIgnoreFilesDescription": "Ignore-fájlok használata", + "useExcludeSettingsDescription": "Kizárási beállítások használata" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/search/browser/replaceService.i18n.json b/i18n/hun/src/vs/workbench/parts/search/browser/replaceService.i18n.json new file mode 100644 index 0000000000000..7825dc551c078 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/search/browser/replaceService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileReplaceChanges": "{0} ↔ {1} (csere előnézete)" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/search/browser/search.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/search/browser/search.contribution.i18n.json new file mode 100644 index 0000000000000..47387e215d88a --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/search/browser/search.contribution.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showTriggerActions": "Szimbólum megkeresése a munkaterületen...", + "name": "Keresés", + "showSearchViewlet": "Keresés megjelenítése", + "view": "Nézet", + "findInFiles": "Keresés a fájlokban", + "openAnythingHandlerDescription": "Fájl megkeresése", + "openSymbolDescriptionNormal": "Szimbólum megkeresése a munkaterületen", + "searchOutputChannelTitle": "Keresés", + "searchConfigurationTitle": "Keresés", + "exclude": "Globális minták konfigurálása fájlok és mappák keresésből való kizárásához. Örökli az összes globális mintát a fliex.exclude beállításból.", + "exclude.boolean": "A globális minta, amire illesztve lesznek a fájlok elérési útjai. A minta engedélyezéséhez vagy letiltásához állítsa igaz vagy hamis értékre.", + "exclude.when": "További ellenőrzés elvégzése az illeszkedő fájlok testvérein. Az illeszkedő fájl nevéhez használja a $(basename) változót!", + "useRipgrep": "Meghatározza, hogy a szövegben való kereséshez a ripgrep van-e használva.", + "useIgnoreFilesByDefault": "Meghatározza, hogy a .gitignore és .ignore fájlok használva vannak-e az új munkaterületeken a kereséshez.", + "search.quickOpen.includeSymbols": "Meghatározza, hogy a fájlok gyors megnyitásánál megjelenjenek-e a globális szimbólumkereső találatai." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/search/browser/searchActions.i18n.json b/i18n/hun/src/vs/workbench/parts/search/browser/searchActions.i18n.json new file mode 100644 index 0000000000000..11ab7f2e40ec0 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/search/browser/searchActions.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "nextSearchTerm": "Következő keresőkifejezés megjelenítése", + "previousSearchTerm": "Előző keresőkifejezés megjelenítése", + "focusNextInputBox": "Váltás a következő beviteli mezőre", + "focusPreviousInputBox": "Váltás az előző beviteli mezőre", + "replaceInFiles": "Csere a fájlokban", + "findInFolder": "Keresés mappában", + "RefreshAction.label": "Frissítés", + "ClearSearchResultsAction.label": "Keresési eredmények törlése", + "FocusNextSearchResult.label": "Váltás a következő keresési eredményre", + "FocusPreviousSearchResult.label": "Váltás az előző keresési eredményre", + "RemoveAction.label": "Eltávolítás", + "file.replaceAll.label": "Összes cseréje", + "match.replace.label": "Csere", + "ConfigureGlobalExclusionsAction.label": "Beállítások megnyitása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/hun/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json new file mode 100644 index 0000000000000..d0aadbe17bcf4 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "searchMatches": "{0} találat", + "searchMatch": "{0} találat", + "fileMatchAriaLabel": "{0} találat a(z) {2} mappa {1} fájljában. Keresési eredmény", + "replacePreviewResultAria": "{0} kifejezés cseréje a következőre: {1}, a(z) {2}. oszlopban, a következő szöveget tartalmazó sorban: {3}", + "searchResultAria": "Találat a(z) {0} kifejezésre a(z) {1}. oszlopban, a következő szöveget tartalmazó sorban: {2}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/search/browser/searchViewlet.i18n.json b/i18n/hun/src/vs/workbench/parts/search/browser/searchViewlet.i18n.json new file mode 100644 index 0000000000000..d97ee9906db8e --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/search/browser/searchViewlet.i18n.json @@ -0,0 +1,50 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "moreSearch": "Keresési részletek be- és kikapcsolása", + "searchScope.includes": "bele foglalt fájlok", + "label.includes": "Keresésbe bele foglalt fájlok", + "searchScope.excludes": "kizárt fájlok", + "label.excludes": "Keresésből kizárt fájlok", + "global.searchScope.folders": "keresésből a beállítások miatt kizárt fájlok", + "label.global.excludes": "Beállított keresésből kizáró minták", + "replaceAll.confirmation.title": "Minden előfordulás cseréje", + "replaceAll.confirm.button": "Csere", + "replaceAll.occurrence.file.message": "{0} előfordulás cserélve {1} fájlban a következőre: '{2}'.", + "removeAll.occurrence.file.message": "{0} előfordulás cserélve {1} fájlban.", + "replaceAll.occurrence.files.message": "{0} előfordulás cserélve {1} fájlban a következőre: '{2}'.", + "removeAll.occurrence.files.message": "{0} előfordulás cserélve {1} fájlban.", + "replaceAll.occurrences.file.message": "{0} előfordulás cserélve {1} fájlban a következőre: '{2}'.", + "removeAll.occurrences.file.message": "{0} előfordulás cserélve {1} fájlban.", + "replaceAll.occurrences.files.message": "{0} előfordulás cserélve {1} fájlban a következőre: '{2}'.", + "removeAll.occurrences.files.message": "{0} előfordulás cserélve {1} fájlban.", + "removeAll.occurrence.file.confirmation.message": "Cserél {0} előfordulás {1} fájlban a következőre: '{2}'?", + "replaceAll.occurrence.file.confirmation.message": "Cserél {0} előfordulást {1} fájlban?", + "removeAll.occurrence.files.confirmation.message": "Cserél {0} előfordulás {1} fájlban a következőre: '{2}'?", + "replaceAll.occurrence.files.confirmation.message": "Cserél {0} előfordulást {1} fájlban?", + "removeAll.occurrences.file.confirmation.message": "Cserél {0} előfordulás {1} fájlban a következőre: '{2}'?", + "replaceAll.occurrences.file.confirmation.message": "Cserél {0} előfordulást {1} fájlban?", + "removeAll.occurrences.files.confirmation.message": "Cserél {0} előfordulás {1} fájlban a következőre: '{2}'?", + "replaceAll.occurrences.files.confirmation.message": "Cserél {0} előfordulást {1} fájlban?", + "treeAriaLabel": "Keresési eredmények", + "globLabel": "{0}, ha {1}", + "searchMaxResultsWarning": "Az eredményhalmaz csak a találatok egy részét tartalmazza. Pontosítsa a keresést a keresési eredmények halmazának szűkítéséhez!", + "searchCanceled": "A keresés meg lett szakítva, mielőtt eredményt hozott volna –", + "noResultsIncludesExcludes": "Nincs találat a következő helyen: '{0}', '{1}' kivételével –", + "noResultsIncludes": "Nincs találat a következő helyen: '{0}' –", + "noResultsExcludes": "Nincs találat '{1}' kivételével –", + "noResultsFound": "Nincs találat. Ellenőrizze a kizárási beállításokat –", + "rerunSearch.message": "Keresés megismétlése", + "rerunSearchInAll.message": "Keresés megismétlése az összes fájlban", + "openSettings.message": "Beállítások megnyitása", + "ariaSearchResultsStatus": "A keresés {0} találatot eredményezett {1} fájlban", + "search.file.result": "{0} találat {1} fájlban", + "search.files.result": "{0} találat {1} fájlban", + "search.file.results": "{0} találat {1} fájlban", + "search.files.results": "{0} találat {1} fájlban", + "searchWithoutFolder": "Még nincs mappa megnyitva. Jelenleg csak a nyitott fájlokban történik keresés –", + "openFolder": "Mappa megnyitása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/search/browser/searchWidget.i18n.json b/i18n/hun/src/vs/workbench/parts/search/browser/searchWidget.i18n.json new file mode 100644 index 0000000000000..1bc0f722bcd2f --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/search/browser/searchWidget.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "search.action.replaceAll.disabled.label": "Összes cseréje (küldje el a keresést az engedélyezéshez)", + "search.action.replaceAll.enabled.label": "Összes cseréje", + "search.replace.toggle.button.title": "Cseremd be- és kikapcsolása", + "label.Search": "Keresés: adja meg a keresőkifejezést, majd nyomjon Entert a kereséshez vagy Escape-et a megszakításhoz", + "search.placeHolder": "Keresés", + "label.Replace": "Csere: adja meg a cerekifejezést, majd nyomjon Entert a kereséshez vagy Escape-et a megszakításhoz", + "search.replace.placeHolder": "Csere", + "regexp.validationFailure": "A kifejezés mindenre illeszkedik" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json b/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json new file mode 100644 index 0000000000000..161e797da75ac --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.snippets": "Kódrészleteket szolgáltat.", + "vscode.extension.contributes.snippets-language": "Azon nyelv azonosítója, amely számára szolgáltatva van ez a kódrészlet.", + "vscode.extension.contributes.snippets-path": "A kódrészlet-fájl elérési útja. Az elérési út relatív a kiegészítő mappájához, és általában a következővel kezdődik: './snippets/',", + "invalid.language": "Ismeretlen nyelv található a következőben: `contributes.{0}.language`. A megadott érték: {1}", + "invalid.path.0": "Hiányzó karakterlánc a `contributes.{0}.path`-ban. A megadott érték: {1}", + "invalid.path.1": "A `contributes.{0}.path` ({1}) nem a kiegészítő mappáján belül található ({2}). Emiatt előfordulhat, hogy a kiegészítő nem lesz hordozható.", + "badVariableUse": "A(z) \"{0}\" kódrészlet nagy valószínűséggel keveri a kódrészletváltozók és a kódrészlet-helyjelölők fogalmát. További információ a következő oldalon található: https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/insertSnippet.i18n.json b/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/insertSnippet.i18n.json new file mode 100644 index 0000000000000..8a772b4496230 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/insertSnippet.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "snippet.suggestions.label": "Kódrészlet beszúrása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json new file mode 100644 index 0000000000000..b0d1519ec9082 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openSnippet.label": "Felhasználói kódrészletek megnyitása", + "openSnippet.pickLanguage": "Kódrészlet nyelvének kiválasztása", + "openSnippet.errorOnCreate": "A(z) {0} nem hozható létre", + "preferences": "Beállítások", + "snippetSchema.json.default": "Üres kódrészlet", + "snippetSchema.json": "Felhasználói kódrészlet-konfiguráció", + "snippetSchema.json.prefix": "A kódrészlet IntelliSense-ben történő kiválasztásánál használt előtag", + "snippetSchema.json.body": "A kódrészlet tartalma. Kurzorpozíciók definiálásához használja a '$1' és '${1:defaultText}' jelölőket, a '$0' pedig a végső kurzorpozíció. Változónevek a '${varName}' és '${varName:defaultText}' formában definiálhatók, pl.: 'Ez a fájl: $TM_FILENAME'.", + "snippetSchema.json.description": "A kódrészlet leírása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json b/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json new file mode 100644 index 0000000000000..eff0054bfb526 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "detail.userSnippet": "Felhasználói kódrészlet", + "snippetSuggest.longLabel": "{0}, {1}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/tabCompletion.i18n.json b/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/tabCompletion.i18n.json new file mode 100644 index 0000000000000..0e84caff00bc5 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/tabCompletion.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tabCompletion": "Kódrészletek beszúrása, ha az előtagjuk illeszkedik. Legjobban akkor működik, ha a 'quickSuggestions' nincs engedélyezve." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json new file mode 100644 index 0000000000000..9ed5e0feacca5 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "helpUs": "Segítsen javítani a {0}-támogatásunkat", + "takeShortSurvey": "Rövid felmérés kitöltése", + "remindLater": "Emlékeztessen később", + "neverAgain": "Ne jelenítse meg újra" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..b4f41dcbe89a8 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "Lenne kedve egy gyors elégedettségi felméréshez?", + "takeSurvey": "Felmérés kitöltése", + "remindLater": "Emlékeztessen később", + "neverAgain": "Ne jelenítse meg újra" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json new file mode 100644 index 0000000000000..014090555b3d0 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Adja meg a buildelési feladat nevét!", + "noTasksMatching": "Nincs ilyen feladat", + "noTasksFound": "Buildelési feladat nem található" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json new file mode 100644 index 0000000000000..4404ab4db052b --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, feladatok", + "recentlyUsed": "legutóbb futtatott feladatok", + "configured": "konfigurált feladatok", + "detected": "talált feladatok", + "customizeTask": "Feladat beállítása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json new file mode 100644 index 0000000000000..dad5b6db3e881 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Adja meg az újraindítandó feladat nevét!", + "noTasksMatching": "Nincs ilyen feladat", + "noTasksFound": "Újraindítandó feladat nem található" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json new file mode 100644 index 0000000000000..4b81a1db7741c --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Adja meg a futtatandó feladat nevét!", + "noTasksMatching": "Nincs ilyen feladat", + "noTasksFound": "Feladat nem található" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.i18n.json new file mode 100644 index 0000000000000..76eb0f2619dd6 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Adja meg a megszakítandó feladat nevét!", + "noTasksMatching": "Nincs ilyen feladat", + "noTasksFound": "Megszakítandó feladat nem található" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json new file mode 100644 index 0000000000000..52db1a193d3c7 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Adja meg a tesztelési feladat nevét!", + "noTasksMatching": "Nincs ilyen feladat", + "noTasksFound": "Tesztelési feladat nem találhat" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json new file mode 100644 index 0000000000000..b798f4ca94f82 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ConfigurationParser.invalidCWD": "Figyelmeztetés: az options.cwd értékének string típusúnak kell lennie. A következő érték figyelmen kívül van hagyva: {0}.", + "ConfigurationParser.noargs": "Hiba: a parancssori argumentumokat string típusú tömbként kell megadni. A megadott érték:\n{0}", + "ConfigurationParser.noShell": "Figyelmeztetés: a shellkonfiguráció csak akkor támogatott, ha a feladat a terminálban van végrehajtva.", + "ConfigurationParser.noName": "Hiba: a deklarációs hatókörben lévő problémailleszőnek kötelező nevet adni:\n{0}\n", + "ConfigurationParser.unknownMatcherKind": "Figyelem: a megadott problémaillesztő ismeretlen. A támogatott típusok: string | ProblemMatcher | (string | ProblemMatcher)[].\n{0}\n", + "ConfigurationParser.invalidVaraibleReference": "Hiba: érvénytelen problemMatcher-referencia: {0}\n", + "ConfigurationParser.noTaskName": "Hiba: a feladathoz meg kell adni a taskName tulajdonságot. A feladat figyelmen kívül lesz hagyva.\n{0}\n", + "taskConfiguration.shellArgs": "Figyelmeztetés: a(z) '{0}' feladat egy rendszerparancs, és vagy a parancs nevében vagy az argumentumok egyikében escape nélküli szóköz található. A megfelelő idézőjelezés érdekében olvassza bele az argumentumokat a parancsba.", + "taskConfiguration.noCommandOrDependsOn": "Hiba: a(z) '{0}' feladat nem ad meg parancsot, és nem definiálja a dependsOn tulajdonságot sem. A feladat figyelmen kívül lesz hagyva. A definíciója:\n{1}", + "taskConfiguration.noCommand": "Hiba: a(z) '{0}' feladathoz nincs definiálva a parancs. A feladat figyelmen kívül lesz hagyva. A definíciója:\n{1}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json new file mode 100644 index 0000000000000..b1251558d3c52 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TaskDefinition.description": "A feladat konkrét típusa", + "TaskDefinition.properties": "A feladattípus további tulajdonságai", + "TaskTypeConfiguration.noType": "A feladattípus-konfigurációból hiányzik a kötelező 'taskType' tulajdonság", + "TaskDefinitionExtPoint": "Feladattípusokat szolgáltat" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json new file mode 100644 index 0000000000000..78adfa51e7b27 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "dotnetCore": "Végrehajt egy .NET Core buildelési parancsot", + "msbuild": "Végrehajtja a buildelés célpontját", + "externalCommand": "Példa egy tetszőleges külső parancs futtatására", + "Maven": "Általános maven parancsokat hajt végre" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json new file mode 100644 index 0000000000000..5372bc32e8115 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "JsonSchema.options": "További parancsbeálíltások", + "JsonSchema.options.cwd": "A végrehajtott program vagy parancsfájl munkakönyvtára. Ha nincs megadva, akkor a Code aktuális munkaterületének gyökérkönyvtára van használva.", + "JsonSchema.options.env": "A végrehajtott parancs vagy shell környezete. Ha nincs megadva, akkor a szülőfolyamat környezete van használva.", + "JsonSchema.shellConfiguration": "Meghatározza a használt shellt.", + "JsonSchema.shell.executable": "A használt shell.", + "JsonSchema.shell.args": "Shellargumentumok.", + "JsonSchema.command": "A végrehajtandó parancs. Lehet egy külső parancs vagy egy rendszerparancs.", + "JsonSchema.tasks.args": "A parancs meghívásakor átadott argumentumok.", + "JsonSchema.tasks.taskName": "A feladat neve.", + "JsonSchema.tasks.windows": "Windows-specifikus parancskonfiguráció", + "JsonSchema.tasks.mac": "Mac-specifikus parancskonfiguráció", + "JsonSchema.tasks.linux": "Linux-specifikus parancskonfiguráció", + "JsonSchema.tasks.suppressTaskName": "Meghatározza, hogy a feladat neve hozzá van adva argumentumként a parancshoz. Ha nincs megadva, akkor a globálisan meghatározot érték van használva.", + "JsonSchema.tasks.showOutput": "Meghatározza, hogy a futó feladat kimenete meg van-e jelenítve, vagy sem. Ha nincs megadva, akkor a globálisan meghatározot érték van használva.", + "JsonSchema.echoCommand": "Meghatározza, hogy a végrehajtott parancs ki van-e írva a kimenetre. Alapértelmezett értéke hamis.", + "JsonSchema.tasks.watching.deprecation": "Elavult. Használja helyette az isBackground beállítást.", + "JsonSchema.tasks.watching": "A feladat folyamatosan fut-e és figyeli-e a fájlrendszert.", + "JsonSchema.tasks.background": "A feladat folyamatosan fut-e és a háttérben fut-e.", + "JsonSchema.tasks.promptOnClose": "A felhasználó figyelmeztetve van-e, ha a VS Code egy futó feladat közben záródik be.", + "JsonSchema.tasks.build": "A parancsot a Code alapértelmezett buildelési parancsához rendeli.", + "JsonSchema.tasks.test": "A parancsot a Code alapértelmezett tesztelési parancsához rendeli.", + "JsonSchema.tasks.matchers": "A használt problémaillesztők. Lehet karakterlánc, problémaillesztő, vagy egy tömb, ami karakterláncokat és problémaillesztőket tartalmaz.", + "JsonSchema.args": "A parancsnak átadott további argumentumok.", + "JsonSchema.showOutput": "Meghatározza, hogy a futó feladat kimenete megjelenjen-e vagy sem. Ha nincs megadva, az 'always' érték van használva.", + "JsonSchema.watching.deprecation": "Elavult. Használja helyette az isBackground beállítást.", + "JsonSchema.watching": "A feladat folyamatosan fut-e és figyeli-e a fájlrendszert.", + "JsonSchema.background": "A feladat folyamatosan fut-e és a háttérben fut-e.", + "JsonSchema.promptOnClose": "A felhasználó figyelmeztetve van-e, ha a VS Code egy háttérben futó feladat közben záródik be.", + "JsonSchema.suppressTaskName": "Meghatározza, hogy a feladat neve hozzá van adva argumentumként a parancshoz. Alapértelmezett értéke hamis.", + "JsonSchema.taskSelector": "Előtag, ami jelzi, hogy az argumentum a feladat.", + "JsonSchema.matchers": "A használt problémaillesztők. Lehet karakterlánc, problémaillesztő, vagy egy tömb, ami karakterláncokat és problémaillesztőket tartalmaz.", + "JsonSchema.tasks": "Feladatkonfigurációk. Általában egy külső feladatfuttató rendszerben definiált feladatok kiegészítő beállításokkal ellátott változatai." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json new file mode 100644 index 0000000000000..e288243af01ac --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "JsonSchema.version": "A konfiguráció verziószáma", + "JsonSchema._runner": "A futtató kikerült a kísérleti állapotból. Használja a hivatalos runner tulajdonságot!", + "JsonSchema.runner": "Meghatározza, hogy a feladat folyamatként van-e végrehajtva, és a kimenet a kimeneti ablakban jelenjen-e meg, vagy a terminálban.", + "JsonSchema.windows": "Windows-specifikus parancskonfiguráció", + "JsonSchema.mac": "Mac-specifikus parancskonfiguráció", + "JsonSchema.linux": "Linux-specifikus parancskonfiguráció", + "JsonSchema.shell": "Meghatározza, hogy a parancs egy rendszerparancs vagy egy külső program. Alapértelmezett értéke hamis, ha nincs megadva." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json new file mode 100644 index 0000000000000..1b9f9d7e14786 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "JsonSchema.shell": "Meghatározza, hogy a parancs egy rendszerparancs vagy egy külső program. Alapértelmezett értéke hamis, ha nincs megadva.", + "JsonSchema.tasks.isShellCommand.deprecated": "Az isShellCommand tulajdonság elavult. Használja helyette a feladat type tulajdonságát és a shell tulajdonságot a beállításoknál. További információt az 1.14-es verzió kiadási jegyzékében talál.", + "JsonSchema.tasks.dependsOn.string": "Egy másik feladat, amitől ez a feladat függ.", + "JsonSchema.tasks.dependsOn.array": "Más feladatok, amiktől ez a feladat függ.", + "JsonSchema.tasks.presentation": "A feladat kimenetének megjelenítésére és adatbevitelére használt panelt konfigurálja.", + "JsonSchema.tasks.presentation.echo": "Meghatározza, hogy a végrehajtott parancs ki van-e írva a terminálban. Alapértelmezett értéke true.", + "JsonSchema.tasks.presentation.focus": "Meghatározza, hogy a panel fókuszt kap-e. Az alapértelmezett értéke true. Ha true-ra van állítva, akkor a panel fel is lesz fedve.", + "JsonSchema.tasks.presentation.reveals": "Meghatározza, hogy a feladatot futtató panel fel van-e fedve vagy sem. Alapértelmezett értéke \"always\".", + "JsonSchema.tasks.presentation.instance": "Meghatározza, hogy a panel meg van-e osztva a feladatok között, ennek a feladatnak van-e dedikálva, vagy új készül minden egyes futtatás során.", + "JsonSchema.tasks.terminal": "A terminal tulajdonság elavult. Használja helyette a presentation tulajdonságot!", + "JsonSchema.tasks.group.kind": "A feladat végrehajtási csoportja.", + "JsonSchema.tasks.group.isDefault": "Meghatározza, hogy ez a feladat egy elsődleges feladat-e a csoportban.", + "JsonSchema.tasks.group.defaultBuild": "A feladatot az alapértelmezett buildelési feladatnak jelöli meg.", + "JsonSchema.tasks.group.defaultTest": "A feladatot az alapértelmezett tesztelési feladatnak jelöli meg.", + "JsonSchema.tasks.group.build": "A feladatot a 'Buildelési feladat futtatása' parancson keresztül elérhető buildelési feladatnak jelöli meg.", + "JsonSchema.tasks.group.test": "A feladatot a 'Tesztelési feladat futtatása' parancson keresztül elérhető tesztelési feladatnak jelöli meg.", + "JsonSchema.tasks.group.none": "A feladatot egyetlen csoporthoz sem rendeli", + "JsonSchema.tasks.group": "Meghatározza a feladat végrehajtási csoportját. A \"build\" esetén a buildelési csoportba, a \"test\" esetén a tesztelési csoportba kerül bele a feladat.", + "JsonSchema.tasks.type": "Meghatározza, hogy a feladat folyamatként van-e végrehajtva vagy egy parancsként a shellben. Alapértelmetten folyamatként vannak végrehajtva.", + "JsonSchema.version": "A konfiguráció verziószáma", + "JsonSchema.tasks.identifier": "A feladat felhasználó által definiált azonosítója, amivel hivatkozni lehet a feladatra a lauch.json-ban vagy egy dependsOn-utasításban.", + "JsonSchema.tasks.taskLabel": "A feladat címkéje", + "JsonSchema.tasks.taskName": "A feladat neve.", + "JsonSchema.tasks.taskName.deprecated": "A feladat name tulajdonsága elavult. Használja a label tulajdonságot helyette!", + "JsonSchema.tasks.background": "A feladat folyamatosan fut-e és a háttérben fut-e.", + "JsonSchema.tasks.promptOnClose": "A felhasználó figyelmeztetve van-e, ha a VS Code egy futó feladat közben záródik be.", + "JsonSchema.tasks.matchers": "A használt problémaillesztők. Lehet karakterlánc, problémaillesztő, vagy egy tömb, ami karakterláncokat és problémaillesztőket tartalmaz.", + "JsonSchema.customizations.customizes.type": "Az egyedi konfigurációhoz használt feladattípus", + "JsonSchema.tasks.customize.deprecated": "A customize tulajdonság elavult. A feladat egyedi konfigurálásának új megközelítésével kapcsolatban további információt az 1.14-es verzió kiadási jegyzékében talál.", + "JsonSchema.tasks.showOputput.deprecated": "A showOutput tulajdonság elavult. Használja helyette a presentation tulajdonságon belül a reveal tulajdonságot! További információt az 1.14-es verzió kiadási jegyzékében talál.", + "JsonSchema.tasks.echoCommand.deprecated": "Az echoCommand tulajdonság elavult. Használja helyette a presentation tulajdonságon belül az echo tulajdonságot! További információt az 1.14-es verzió kiadási jegyzékében talál.", + "JsonSchema.tasks.isBuildCommand.deprecated": "Az isBuildCommand tulajdonság elavult. Használja helyette a group tulajdonságot! További információt az 1.14-es verzió kiadási jegyzékében talál.", + "JsonSchema.tasks.isTestCommand.deprecated": "Az isTestCommand tulajdonság elavult. Használja helyette a group tulajdonságot! További információt az 1.14-es verzió kiadási jegyzékében talál.", + "JsonSchema.windows": "Windows-specifikus parancskonfiguráció", + "JsonSchema.mac": "Mac-specifikus parancskonfiguráció", + "JsonSchema.linux": "Linux-specifikus parancskonfiguráció" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json new file mode 100644 index 0000000000000..85028b2ff6298 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -0,0 +1,73 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksCategory": "Feladatok", + "ConfigureTaskRunnerAction.noWorkspace": "A feladatok csak egy munkaterület mappájára vonatkozóan érhetők el.", + "ConfigureTaskRunnerAction.quickPick.template": "Feladatfuttató rendszer választása", + "ConfigureTaskRunnerAction.autoDetecting": "Feladatok automatikus felderítése a következőhöz: {0}", + "ConfigureTaskRunnerAction.autoDetect": "A feladatfuttató rendszer automatikus felderítése nem sikerült. Az alapértelmezett sablon használata. Tekintse meg a feladatkimenetet a részletekért.", + "ConfigureTaskRunnerAction.autoDetectError": "A feladatfuttató rendszer automatikus felderítése hibákat eredményezett. Tekintse meg a feladatkimenetet a részletekért.", + "ConfigureTaskRunnerAction.failed": "Nem sikerült létrehozni a 'tasks.json' fájlt a '.vscode' mappában. Tekintse meg a feladatkimenetet a részletekért.", + "ConfigureTaskRunnerAction.label": "Feladatfuttató rendszer beállítása", + "ConfigureBuildTaskAction.label": "Buildelési feladat beállítása", + "CloseMessageAction.label": "Bezárás", + "ShowTerminalAction.label": "Terminál megtekintése", + "problems": "Problémák", + "manyMarkers": "99+", + "tasks": "Feladatok", + "TaskSystem.noHotSwap": "A feladatvégrehajtó motor megváltoztatása a VS Code újraindítását igényli. A módosítás figyelmen kívül van hagyva.", + "TaskService.noBuildTask1": "Nincs buildelési feladat definiálva. Jelöljön meg egy feladatot az 'isBuildCommand' tulajdonsággal a tasks.json fájlban!", + "TaskService.noBuildTask2": "Nincs buildelési feladat definiálva. Jelöljön meg egy feladatot a 'build' csoporttal a tasks.json fájlban!", + "TaskService.noTestTask1": "Nincs tesztelési feladat definiálva. Jelöljön meg egy feladatot az 'isTestCommand' tulajdonsággal a tasks.json fájlban!", + "TaskService.noTestTask2": "Nincs tesztelési feladat definiálva. Jelöljön meg egy feladatot a 'test' csoporttal a tasks.json fájlban!", + "TaskServer.noTask": "A futtatni kívánt feladat ({0}) nem található.", + "TaskService.attachProblemMatcher.continueWithout": "Folytatás a buildelési kimenet átkutatása nélkül", + "TaskService.attachProblemMatcher.never": "Soha ne kutassa át a buildelési kimenetet", + "TaskService.attachProblemMatcher.learnMoreAbout": "További információk a buildelési kimenet átkutatásáról", + "selectProblemMatcher": "Válassza ki, milyen típusú hibák és figyelmeztetések legyenek keresve a buildelési kimenetben!", + "customizeParseErrors": "A jelenlegi feladatkonfigurációban hibák vannak. Feladat egyedivé tétele előtt javítsa a hibákat!", + "moreThanOneBuildTask": "Túl sok buildelési feladat van definiálva a tasks.json-ban. Az első lesz végrehajtva.\n", + "TaskSystem.activeSame.background": "A feladat már aktív és a háttérben fut. A feladat befejezéséhez használja az `F1 > feladat megszakítása` parancsot! ", + "TaskSystem.activeSame.noBackground": "A feladat már aktív. A feladat befejezéséhez használja `F1 > feladat megszakítása` parancsot!", + "TaskSystem.active": "Már fut egy feladat. Szakítsa meg, mielőtt egy másik feladatot futtatna.", + "TaskSystem.restartFailed": "Nem sikerült a(z) {0} feladat befejezése és újraindítása.", + "TaskSystem.configurationErrors": "Hiba: a megadott feladatkonfigurációban validációs hibák vannak, és nem használható. Először javítsa ezeket a hibákat!", + "TaskSystem.invalidTaskJson": "Hiba. A tasks.json fájlban szintaktikai hibák találhatók. Javítsa ezeket a hibákat feladatvégrehajtás előtt.\n", + "TaskSystem.runningTask": "Már fut egy feladat. Szeretné megszakítani?", + "TaskSystem.terminateTask": "Felada&&t megszakítása", + "TaskSystem.noProcess": "Az elindított feladat már nem létezik. Ha a feladat egy háttérfolyamatot indított, a VS Code-ból való kilépés árva folyamatokat eredményezhet. Ennek megakadályozása érdekében indítsa el a legutóbbi háttérfolyamatot a wait kapcsolóval!", + "TaskSystem.exitAnyways": "Kilépés mind&&enképp", + "TerminateAction.label": "Feladat megszakítása", + "TaskSystem.unknownError": "Hiba történt a feladat futtatása közben. További részletek a feladatnaplóban.", + "TaskService.noWorkspace": "A feladatok csak egy munkaterület mappájára vonatkozóan érhetők el.", + "recentlyUsed": "legutóbb futtatott feladatok", + "configured": "konfigurált feladatok", + "detected": "talált feladatok", + "TaskService.fetchingBuildTasks": "Buildelési feladatok lekérése...", + "TaskService.noBuildTaskTerminal": "Buildelési feladat nem található. Futtassa a 'Buildelési feladat beállítása' parancsot a létrehozáshoz!", + "TaskService.pickBuildTask": "Válassza ki a futtatandó buildelési feladatot!", + "TaskService.fetchingTestTasks": "Tesztelési feladatok lekérése...", + "TaskService.noTestTaskTerminal": "Buildelési feladat nem található. Futtassa a 'Feladatfuttató rendszer beállítása' parancsot a létrehozáshoz!", + "TaskService.pickTestTask": "Válassza ki a futtatandó tesztelési feladatot", + "TaskService.noTaskRunning": "Jelenleg nem fut feladat.", + "TaskService.tastToTerminate": "Válassza ki a megszakítandó feladatot!", + "TerminateAction.noProcess": "Az elindított folyamat már nem létezik. Ha a feladat háttérfeladatokat indított, a VS Code-ból való kilépés árva folyamatokat eredményezhet. ", + "TerminateAction.failed": "Nem sikerült megszakítani a futó feladatot", + "TaskService.noTaskToRestart": "Nincs újraindítható feladat.", + "TaskService.tastToRestart": "Válassza ki az újraindítandó feladatot!", + "TaskService.defaultBuildTaskExists": "A(z) {0} már meg van jelölve alapértelmezett buildelési feladatként.", + "TaskService.pickDefaultBuildTask": "Válassza ki az alpértelmezett buildelési feladatként használt feladatot!", + "TaskService.defaultTestTaskExists": "A(z) {0} már meg van jelölve alapértelmezett tesztelési feladatként.", + "TaskService.pickDefaultTestTask": "Válassza ki az alpértelmezett tesztelési feladatként használt feladatot!", + "ShowLogAction.label": "Feladatnapló megtekintése", + "RunTaskAction.label": "Feladat futtatása", + "RestartTaskAction.label": "Futó feladat újraindítása...", + "BuildAction.label": "Buildelési feladat futtatása", + "TestAction.label": "Tesztelési feladat futtatása", + "ConfigureDefaultBuildTask.label": "Alapértelmezett buildelési feladat beállítása", + "ConfigureDefaultTestTask.label": "Alapértelmezett tesztelési feladat beállítása", + "quickOpen.task": "Feladat futtatása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json new file mode 100644 index 0000000000000..cbc547d3e4aa0 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TerminalTaskSystem.unknownError": "Ismeretlen hiba történt a feladat végrehajtása közben. Részletek a feladat kimeneti naplójában találhatók.", + "TerminalTaskSystem.terminalName": "Feladat – {0}", + "reuseTerminal": "A terminál újra lesz hasznosítva a feladatok által. Nyomjon meg egy billentyűt a bezáráshoz.", + "TerminalTaskSystem": "Rendszerparancsok nem hajthatók végre UNC-meghajtókon.", + "unkownProblemMatcher": "A(z) {0} problémaillesztő nem található. Az illesztő figyelmen kívül lesz hagyva." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/node/processRunnerDetector.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/node/processRunnerDetector.i18n.json new file mode 100644 index 0000000000000..4a631d338efb8 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/node/processRunnerDetector.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TaskSystemDetector.noGulpTasks": "A gulp --tasks-simple futtatása nem listázott egyetlen feladatot sem. Futtatta az npm install parancsot?", + "TaskSystemDetector.noJakeTasks": "A jake --tasks futtatása nem listázott egyetlen feladatot sem. Futtatta az npm install parancsot?", + "TaskSystemDetector.noGulpProgram": "A Gulp nincs telepítve a rendszerre. Futtassa az npm install -g gulp parancsot a telepítéshez!", + "TaskSystemDetector.noJakeProgram": "A Jake nincs telepítve a rendszerre. Futtassa az npm install -g jake parancsot a telepítéshez!", + "TaskSystemDetector.noGruntProgram": "A Grunt nincs telepítve a rendszerre. Futtassa az npm install -g grunt parancsot a telepítéshez!", + "TaskSystemDetector.noProgram": "Az) {0} program nem található. Az üzenet: {1}", + "TaskSystemDetector.buildTaskDetected": "Felderítésre került a következő buildelési feladat: '{0}'.", + "TaskSystemDetector.testTaskDetected": "Felderítésre került a következő tesztelési feladat: '{0}'. " +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json new file mode 100644 index 0000000000000..37fca18236daa --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TaskRunnerSystem.unknownError": "Ismeretlen hiba történt a feladat végrehajtása közben. Részletek a kimeneti naplóban találhatók.", + "TaskRunnerSystem.watchingBuildTaskFinished": "A figyelő buildelési feladat befejeződött.", + "TaskRunnerSystem.childProcessError": "Nem sikerült elindítani a külső programot: {0} {1}.", + "TaskRunnerSystem.cancelRequested": "Az) '{0}' feladat a felhasználó kérésére lett megszakítva.", + "unkownProblemMatcher": "A(z) {0} problémaillesztőt nem lehet feloldani. Az illesztő figyelmen kívül lesz hagyva." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json new file mode 100644 index 0000000000000..cec5de6d41002 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ConfigurationParser.invalidCWD": "Figyelmeztetés: az options.cwd értékének string típusúnak kell lennie. A következő érték figyelmen kívül van hagyva: {0}.", + "ConfigurationParser.noargs": "Hiba: a parancssori argumentumokat string típusú tömbként kell megadni. A megadott érték:\n{0}", + "ConfigurationParser.noShell": "Figyelmeztetés: a shellkonfiguráció csak akkor támogatott, ha a feladat a terminálban van végrehajtva.", + "ConfigurationParser.noName": "Hiba: a deklarációs hatókörben lévő problémailleszőnek kötelező nevet adni:\n{0}\n", + "ConfigurationParser.unknownMatcherKind": "Figyelem: a megadott problémaillesztő ismeretlen. A támogatott típusok: string | ProblemMatcher | (string | ProblemMatcher)[].\n{0}\n", + "ConfigurationParser.invalidVaraibleReference": "Hiba: érvénytelen problemMatcher-referencia: {0}\n", + "ConfigurationParser.noTaskType": "Hiba: a feladatkonfigurációnak rendelkeznie kell type tulajdonsággal. A konfiguráció figyelmen kívül lesz hagyva.\n{0}\n", + "ConfigurationParser.notCustom": "Hiba: a feladat nem egyedi feladatként van definiálva. A konfiguráció figyelmen kívül lesz hagyva.\n{0}\n", + "ConfigurationParser.noTaskName": "Hiba: a feladathoz meg kell adni a taskName tulajdonságot. A feladat figyelmen kívül lesz hagyva.\n{0}\n", + "taskConfiguration.shellArgs": "Figyelmeztetés: a(z) '{0}' feladat egy rendszerparancs, és vagy a parancs nevében vagy az argumentumok egyikében escape nélküli szóköz található. A megfelelő idézőjelezés érdekében olvassza bele az argumentumokat a parancsba.", + "taskConfiguration.noCommandOrDependsOn": "Hiba: a(z) '{0}' feladat nem ad meg parancsot, és nem definiálja a dependsOn tulajdonságot sem. A feladat figyelmen kívül lesz hagyva. A definíciója:\n{1}", + "taskConfiguration.noCommand": "Hiba: a(z) '{0}' feladathoz nincs definiálva a parancs. A feladat figyelmen kívül lesz hagyva. A definíciója:\n{1}", + "TaskParse.noOsSpecificGlobalTasks": "A feladatok 2.0.0-s verziója nem támogatja a globális, operációs rendszer-specifikus feladatokat. Alakítsa át őket operációs rendszer-specifikus parancsot tartalmazó feladattá. Az érintett feladatok:\n{0}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json new file mode 100644 index 0000000000000..47de274f4d6a5 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminalIntegratedConfigurationTitle": "Beépített terminál", + "terminal.integrated.shell.linux": "A terminál által használt shell elérési útja Linuxon.", + "terminal.integrated.shellArgs.linux": "Linux-terminál esetén használt parancssori argumentumok.", + "terminal.integrated.shell.osx": "A terminál által használt shell elérési útja OS X-en.", + "terminal.integrated.shellArgs.osx": "OS X-terminál esetén használt parancssori argumentumok.", + "terminal.integrated.shell.windows": "A terminál által használt shell elérési útja Windowson. Ha a Windows beépített shelljét használja (cmd-t, PowerShellt vagy Bash on Ubuntut), a C:\\Windows\\sysnative elérési utat adja meg a C:\\Windows\\System32 helyett a 64-bites verzió használatához.", + "terminal.integrated.shellArgs.windows": "Windows-terminál esetén használt parancssori argumentumok.", + "terminal.integrated.rightClickCopyPaste": "Ha be van állítva, megakadályozza a helyi menü megjelenését a terminálon történő jobb kattintás esetén. Helyette másol, ha van kijelölés, és beilleszt, ha nincs.", + "terminal.integrated.fontFamily": "Meghatározza a terminál betűtípusát. Alapértelmezett értéke az editor.fontFamily értéke.", + "terminal.integrated.fontLigatures": "Meghatározza, hogy a terminálban engedélyezve vannak-e a betűtípus-ligatúrák.", + "terminal.integrated.fontSize": "Meghatározza a terminálban használt betű méretét, pixelekben.", + "terminal.integrated.lineHeight": "Meghatározza a sormagasságot a terminálban. A tényleges méret a megadott szám és a terminál betűméretének szorzatából jön ki.", + "terminal.integrated.enableBold": "Engedélyezve van-e a félkövér szöveg a terminálban. A működéshez szükséges, hogy a terminál shellje támogassa a félkövér betűket.", + "terminal.integrated.cursorBlinking": "Meghatározza, hogy a terminál kurzora villog-e.", + "terminal.integrated.cursorStyle": "Meghatározza a terminál kurzorának stílusát.", + "terminal.integrated.scrollback": "Meghatározza, hogy a terminál legfeljebb hány sort tárol a pufferben.", + "terminal.integrated.setLocaleVariables": "Meghatározza, hogy a lokálváltozók be vannak-e állítva a terminál indításánál. Alapértelmezett értéke igaz OS X-en, hamis más platformokon.", + "terminal.integrated.cwd": "Explicit elérési út, ahol a terminál indítva lesz. Ez a shellfolyamat munkakönyvtára (cwd) lesz. Ez a beállítás nagyon hasznos olyan munkaterületeken, ahol a gyökérkönyvtár nem felel meg munkakönyvtárnak.", + "terminal.integrated.confirmOnExit": "Meghatározza, hogy megerősítést kér-e az alkalamzás, ha van aktív terminál-munkafolyamat.", + "terminal.integrated.commandsToSkipShell": "Olyan parancsazonosítók listája, melyek nem lesznek elküldve a shellnek, és ehelyett mindig a Code kezeli le őket. Ez lehetővé teszi, hogy az olyan billentyűparancsok, melyeket normál esetben a shell dolgozna fel, ugyanúgy működjenek, mint mikor a terminálon nincs fókusz. Például ilyen a gyorsmegnyitás indításához használt Ctrl+P.", + "terminal": "Terminál", + "terminalCategory": "Terminál", + "viewCategory": "Nézet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json new file mode 100644 index 0000000000000..aa97cc3e5700c --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "workbench.action.terminal.toggleTerminal": "Integrált terminál be- és kikapcsolása", + "workbench.action.terminal.kill": "Az aktív terminálpéldány leállítása", + "workbench.action.terminal.kill.short": "Terminál leállítása", + "workbench.action.terminal.copySelection": "Kijelölés másolása", + "workbench.action.terminal.selectAll": "Összes kijelölése", + "workbench.action.terminal.new": "Új integrált terminál létrehozása", + "workbench.action.terminal.new.short": "Új terminál", + "workbench.action.terminal.focus": "Váltás a terminálra", + "workbench.action.terminal.focusNext": "Váltás a következő terminálra", + "workbench.action.terminal.focusAtIndex": "Váltás a(z) {0}. terminálra", + "workbench.action.terminal.focusPrevious": "Váltás az előző terminálra", + "workbench.action.terminal.paste": "Beillesztés az aktív terminálba", + "workbench.action.terminal.DefaultShell": "Alapértelmezett shell kiválasztása", + "workbench.action.terminal.runSelectedText": "Kijelölt szöveg futtatása az aktív terminálban", + "workbench.action.terminal.runActiveFile": "Aktív fájl futtatása az az aktív terminálban", + "workbench.action.terminal.runActiveFile.noFile": "Csak a lemezen lévő fájlok futtathatók a terminálban", + "workbench.action.terminal.switchTerminalInstance": "Terminálpéldány váltása", + "workbench.action.terminal.scrollDown": "Görgetés lefelé (soronként)", + "workbench.action.terminal.scrollDownPage": "Görgetés lefelé (oldalanként)", + "workbench.action.terminal.scrollToBottom": "Görgetés az aljára", + "workbench.action.terminal.scrollUp": "Görgetés felfelé (soronként)", + "workbench.action.terminal.scrollUpPage": "G9rgetés felfelé (oldalanként)", + "workbench.action.terminal.scrollToTop": "Görgetés a tetejére", + "workbench.action.terminal.clear": "Törlés", + "workbench.action.terminal.allowWorkspaceShell": "Munkaterületspecifikus shellkonfiguráció engedélyezése", + "workbench.action.terminal.disallowWorkspaceShell": "Munkaterületspecifikus shellkonfiguráció letiltása", + "workbench.action.terminal.rename": "Átnevezés", + "workbench.action.terminal.rename.prompt": "Adja meg a terminál nevét!", + "workbench.action.terminal.focusFindWidget": "Váltás a keresőmodulra", + "workbench.action.terminal.hideFindWidget": "Keresőmodul elrejtése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json new file mode 100644 index 0000000000000..890ebc35e3d4e --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminal.background": "A terminál háttérszíne. Ez lehetővé teszi a terminál paneltől eltérő színezését.", + "terminal.foreground": "A terminál előtérszíne.", + "terminal.ansiColor": "A(z) '{0}' ANSI-szín a terminálban." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json new file mode 100644 index 0000000000000..d6881142372df --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminal.integrated.allowWorkspaceShell": "Engedélyezi a(z) {0} (a munkaterületi beállításokban definiálva) terminálról történő indítását?", + "allow": "Engedélyezés", + "disallow": "Tiltás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json new file mode 100644 index 0000000000000..2d5b3af7ef7b1 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Keresés", + "placeholder.find": "Keresés", + "label.previousMatchButton": "Előző találat", + "label.nextMatchButton": "Következő találat", + "label.closeButton": "Bezárás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json new file mode 100644 index 0000000000000..319655fe00e2f --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminal.integrated.copySelection.noSelection": "A terminálban nincs semmi kijelölve a másoláshoz", + "terminal.integrated.exitedWithCode": "A terminálfolyamat a következő kilépési kóddal állt le: {0}", + "terminal.integrated.waitOnExit": "A folytatáshoz nyomjon meg egy billentyűt...", + "terminal.integrated.launchFailed": "A(z) `{0}{1}` terminálfolyamat-parancsot nem sikerült elindítani (kilépési kód: {2})" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json new file mode 100644 index 0000000000000..d5e03484f1db9 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminalLinkHandler.followLinkAlt": "Hivatkozás megnyitása Alt + kattintás paranccsal", + "terminalLinkHandler.followLinkCmd": "Hivatkozott oldal megnyitása Cmd + kattintás paranccsal", + "terminalLinkHandler.followLinkCtrl": "Hivatkozott oldal megnyitása Ctrl + kattintás paranccsal" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json new file mode 100644 index 0000000000000..15f0f130a04a1 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "copy": "Másolás", + "createNewTerminal": "Új terminál", + "paste": "Beillesztés", + "selectAll": "Összes kijelölése", + "clear": "Törlés" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json new file mode 100644 index 0000000000000..babb2962c469e --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminal.integrated.chooseWindowsShellInfo": "Megváltoztathatja az alapértelmezett terminált a testreszabás gomb választásával.", + "customize": "Testreszabás", + "cancel": "Mégse", + "never again": "Rendben, ne jelenítse meg újra", + "terminal.integrated.chooseWindowsShell": "Válassza ki a preferált terminál shellt! Ez később módosítható a beállításokban.", + "terminalService.terminalCloseConfirmationSingular": "Van egy aktív terminálmunkamenet. Szeretné megszakítani?", + "terminalService.terminalCloseConfirmationPlural": "{0} aktív terminálmunkamenet van. Szeretné megszakítani?", + "yes": "Igen" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json new file mode 100644 index 0000000000000..e8ad512ade14a --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "selectTheme.label": "Színtéma", + "installColorThemes": "További színtémák telepítése...", + "themes.selectTheme": "Válasszon színtémát! (Előnézet a fel/le billentyűvel.)", + "selectIconTheme.label": "Fájlikontéma", + "installIconThemes": "További fájlikontémák telepítése...", + "noIconThemeLabel": "Nincs", + "noIconThemeDesc": "Fájlikonok letiltása", + "problemChangingIconTheme": "Hiba történt az ikontéma beállítása közben: {0}", + "themes.selectIconTheme": "Válasszon fájlikontémát!", + "generateColorTheme.label": "Színtéma generálása az aktuális beállítások alapján", + "preferences": "Beállítások", + "developer": "Fejlesztői" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.i18n.json new file mode 100644 index 0000000000000..977546fa1cab3 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unsupportedWorkspaceSettings": "A munkaterület olyan beállításokat tartalmaz, amelyet csak a felhasználói beállításoknál lehet megadni ({0})", + "openWorkspaceSettings": "Munkaterület beállításainak megnyitása", + "openDocumentation": "További információ", + "ignore": "Figyelmen kívül hagyás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.i18n.json b/i18n/hun/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.i18n.json new file mode 100644 index 0000000000000..c6ac7bd9d2fc8 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "releaseNotesInputName": "Kiadási jegyzék: {0}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json new file mode 100644 index 0000000000000..42549a7d35685 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "release notes": "Kiadási jegyzék", + "updateConfigurationTitle": "Frissítés", + "updateChannel": "Meghatározza, hogy érkeznek-e automatikus frissítések a frissítési csatornáról. A beállítás módosítása után újraindítás szükséges." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/update/electron-browser/update.i18n.json b/i18n/hun/src/vs/workbench/parts/update/electron-browser/update.i18n.json new file mode 100644 index 0000000000000..fc8ccab84e74c --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/update/electron-browser/update.i18n.json @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateNow": "Frissítés most", + "later": "Később", + "unassigned": "nincs hozzárendelve", + "releaseNotes": "Kiadási jegyzék", + "showReleaseNotes": "Kiadási jegyzék megjelenítése", + "downloadNow": "Letöltés most", + "read the release notes": "Üdvözöljük a {0} v{1} verziójában. Szeretné megtekinteni a kiadási jegyzéket?", + "licenseChanged": "A licencfeltételek változtak. Olvassa végig!", + "license": "Licenc elolvasása", + "updateIsReady": "Új frissítés érhető el.", + "thereIsUpdateAvailable": "Van elérhető frissítés.", + "updateAvailable": "A {0} frissül az újraindítás után.", + "noUpdatesAvailable": "Jelenleg nincs elérhető frissítés.", + "commandPalette": "Parancskatalógus...", + "settings": "Beállítások", + "keyboardShortcuts": "Billentyűparancsok", + "selectTheme.label": "Színtéma", + "themes.selectIconTheme.label": "Fájlikontéma", + "not available": "A frissítések nem érhetők el", + "checkingForUpdates": "Frissítések keresése...", + "DownloadUpdate": "Elérhető frissítés letöltése", + "DownloadingUpdate": "Frissítés letöltése...", + "InstallingUpdate": "Frissítés telepítése...", + "restartToUpdate": "Újraindítás a frissítéshez...", + "checkForUpdates": "Frissítések keresése..." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/views/browser/views.i18n.json b/i18n/hun/src/vs/workbench/parts/views/browser/views.i18n.json new file mode 100644 index 0000000000000..30ba124e29116 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/views/browser/views.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewToolbarAriaLabel": "{0} művelet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json b/i18n/hun/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json new file mode 100644 index 0000000000000..377ac0a4b979e --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "a nézeteket tömbként kell megadni", + "requirestring": "a(z) `{0}` tulajdonság kötelező és `string` típusúnak kell lennie", + "optstring": "a(z) `{0}` tulajdonság elhagyható vagy `string` típusúnak kell lennie", + "vscode.extension.contributes.view.id": "A nézet azonosítója. Ez használható az adatszolgáltató regisztrálásához a `vscode.window.registerTreeDataProviderForView` API-n keresztül. Ezen túl a kiegészítő aktiválásához regisztrálni kell az `onView:${id}` eseményt az `activationEvents`-nél.", + "vscode.extension.contributes.view.name": "A nézet emberek számára olvasható neve. Meg fog jelenni", + "vscode.extension.contributes.view.when": "A nézet megjelenítésének feltétele", + "vscode.extension.contributes.views": "Nézeteket szolgáltat a szerkesztőhöz", + "views.explorer": "Fájlkezelő-nézet", + "locationId.invalid": "A(z) `{0}` nem érvényes nézethelyszín" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json b/i18n/hun/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json new file mode 100644 index 0000000000000..f6ca0fc99347e --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "watermark.showCommands": "Minden parancs megjelenítése", + "watermark.quickOpen": "Fájl megkeresése", + "watermark.openFile": "Fájl megnyitása", + "watermark.openFolder": "Mappa megnyitása", + "watermark.openFileFolder": "Fájl vagy mappa megnyitása", + "watermark.openRecent": "Legutóbbi megnyitása", + "watermark.newUntitledFile": "Új, névtelen fájl", + "watermark.toggleTerminal": "Terminál be- és kikapcsolása", + "watermark.findInFiles": "Keresés a fájlokban", + "watermark.startDebugging": "Hibakeresés indítása", + "watermark.unboundCommand": "nincs hozzárendelve", + "workbenchConfigurationTitle": "Munkaterület", + "tips.enabled": "Ha engedélyezve van, tippek jelennek meg vízjelként, ha nincs egyetlen szerkesztőablak sem nyitva." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.i18n.json b/i18n/hun/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.i18n.json new file mode 100644 index 0000000000000..9ea3e3e0530b4 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "welcomeOverlay.explorer": "Fájlkezelő", + "welcomeOverlay.search": "Keresés a fájlok között", + "welcomeOverlay.git": "Forráskódkezelés", + "welcomeOverlay.debug": "Indítás és hibakeresés", + "welcomeOverlay.extensions": "Kiterjesztések kezelése", + "welcomeOverlay.problems": "Hibák és figyelmeztetések megtekintése", + "welcomeOverlay.commandPalette": "Összes parancs megkeresése és futtatása", + "welcomeOverlay": "Felhasználói felület áttekintése", + "hideWelcomeOverlay": "Felület áttekintésének elrejtése", + "help": "Segítség" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/hun/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json new file mode 100644 index 0000000000000..4c09138fb709d --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -0,0 +1,45 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "welcomePage.vscode": "Visual Studio Code", + "welcomePage.editingEvolved": "Szerkesztés, továbbfejlesztve", + "welcomePage.start": "Start", + "welcomePage.newFile": "Új fájl", + "welcomePage.openFolder": "Mappa megnyitása...", + "welcomePage.cloneGitRepository": "Git forráskódtár klónozása...", + "welcomePage.recent": "Legutóbbi", + "welcomePage.moreRecent": "Tovább...", + "welcomePage.noRecentFolders": "Nincsenek megnyitott mappák", + "welcomePage.help": "Segítség", + "welcomePage.keybindingsCheatsheet": "Nyomatható billentyűparancs-referencia", + "welcomePage.introductoryVideos": "Bemutatóvideók", + "welcomePage.tipsAndTricks": "Tippek és trükkök", + "welcomePage.productDocumentation": "Termékdokumentáció", + "welcomePage.gitHubRepository": "GitHub-forráskódtár", + "welcomePage.stackOverflow": "Stack Overflow", + "welcomePage.showOnStartup": "Üdvözlőlap megjelenítése induláskor", + "welcomePage.customize": "Testreszabás", + "welcomePage.installExtensionPacks": "Eszközök és nyelvek", + "welcomePage.installExtensionPacksDescription": "{0} és {1} fejlesztőkörnyezetek telepítése ", + "welcomePage.moreExtensions": "további", + "welcomePage.installKeymapDescription": "Billentyűparancsok telepítése", + "welcomePage.installKeymapExtension": "{0} és {1} billentyűparancsok telepítése ", + "welcomePage.others": "további", + "welcomePage.colorTheme": "Színtéma", + "welcomePage.colorThemeDescription": "Alakítsa át szeretett szerkesztőjét úgy, ahogyan szeretné!", + "welcomePage.learn": "További információ", + "welcomePage.showCommands": "Összes parancs megkeresése és futtatása", + "welcomePage.showCommandsDescription": "Parancsok gyors listázása és keresése a parancskatalógusban ({0})", + "welcomePage.interfaceOverview": "Felhasználói felület áttekintése", + "welcomePage.interfaceOverviewDescription": "Fedvény, ami vizuálisan bemutatja a felhasználói felület legfőbb részeit.", + "welcomePage.interactivePlayground": "Interaktív játszótér", + "welcomePage.interactivePlaygroundDescription": "Próbálja ki a szerkesztő funkcióit egy rövid bemutató keretében!", + "welcomePage.quickLinks": "Gyorshivatkozások", + "welcomePage.keybindingsReference": "Billentyűparancs-referencia", + "welcomePage.keybindingsReferenceDescription": "Egy nyomtatható PDF a leggyakrabban használt billentyűparancsokkal", + "welcomePage.configureSettings": "Beállítások módosítása", + "welcomePage.configureSettingsDescription": "Szabadítsa fel a VS Code teljes tudását a beállítások személyre szabásával" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json new file mode 100644 index 0000000000000..94217d5910d4b --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "workbenchConfigurationTitle": "Munkaterület", + "workbench.startupEditor.none": "Indítás szerkesztőablak nélkül.", + "workbench.startupEditor.welcomePage": "Üdvözlőlap megnyitása (alapértelmezett).", + "workbench.startupEditor.newUntitledFile": "Új, névtelen fájl megnyitása.", + "workbench.startupEditor": "Meghatározza, melyik szerkesztőablak jelenjen meg induláskor, ha egyetlen sem lett helyreállítva a korábbi munkamenetből. Válassza a 'none' értéket, ha szerkesztőablak nélkül induljon, a 'welcomePage'-t, ha az üdvözlőlap nyíljon meg (alapértelmezett), a 'newUntitledFile'-t, ha egy új, névtelen fájl nyíljon meg (csak akkor, ha nem mappát nyitnak meg).", + "help": "Segítség" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/hun/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json new file mode 100644 index 0000000000000..7b98229452c4d --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -0,0 +1,36 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "welcomePage": "Üdvözöljük!", + "welcomePage.javaScript": "JavaScript", + "welcomePage.typeScript": "TypeScript", + "welcomePage.python": "Python", + "welcomePage.php": "PHP", + "welcomePage.docker": "Docker", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", + "welcomePage.extensionPackAlreadyInstalled": "A(z) {0}-környezet már telepítve van.", + "welcomePage.willReloadAfterInstallingExtensionPack": "Az ablak újratölt a(z) {0} kiegészítő környezet telepítése után.", + "welcomePage.installingExtensionPack": "{0} kiegészítő környezet telepítése...", + "welcomePage.extensionPackNotFound": "A(z) {1} azonosítójú {0}-környezet nem található.", + "welcomePage.keymapAlreadyInstalled": "A(z) {0} billentyűparancsok már telepítve vannak.", + "welcomePage.willReloadAfterInstallingKeymap": "Az ablak újratölt a(z) {0} billentyűparancsok telepítése után.", + "welcomePage.installingKeymap": "{0} billentyűparancsok telepítése...", + "welcomePage.keymapNotFound": "A(z) {1} azonosítójú {0} billentyűparancsok nem találhatók.", + "welcome.title": "Üdvözöljük!", + "welcomePage.openFolderWithPath": "{1} elérési úton található {0} mappa megnyitása", + "welcomePage.extensionListSeparator": ", ", + "welcomePage.installKeymap": "{0}-billentyűkonfiguráció telepítése", + "welcomePage.installExtensionPack": "{0} kiegészítő környezet telepítése", + "welcomePage.installedKeymap": "A(z) {0}-billenyűkiosztás már telepítve van", + "welcomePage.installedExtensionPack": "A(z) {0}-környezet már telepítve van.", + "ok": "OK", + "details": "Részletek", + "cancel": "Mégse", + "welcomePage.buttonBackground": "Az üdvözlőlapon található gombok háttérszíne", + "welcomePage.buttonHoverBackground": "Az üdvözlőlapon található gombok háttérszíne, amikor a mutató fölöttük áll." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.i18n.json b/i18n/hun/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.i18n.json new file mode 100644 index 0000000000000..0120c6821a0a7 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorWalkThrough": "Interaktív játszótér", + "editorWalkThrough.title": "Interaktív játszótér" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution.i18n.json new file mode 100644 index 0000000000000..493706c26017e --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "walkThrough.editor.label": "Interaktív játszótér", + "help": "Segítség", + "interactivePlayground": "Interaktív játszótér" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughActions.i18n.json b/i18n/hun/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughActions.i18n.json new file mode 100644 index 0000000000000..84bb9fd977824 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughActions.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorWalkThrough.arrowUp": "Görgetés felfelé (soronként)", + "editorWalkThrough.arrowDown": "Görgetés lefelé (soronként)", + "editorWalkThrough.pageUp": "Görgetés felfelé (oldalanként)", + "editorWalkThrough.pageDown": "Görgetés lefelé (oldalanként)" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/hun/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json new file mode 100644 index 0000000000000..027da129b6153 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "walkThrough.unboundCommand": "nincs hozzárendelve", + "walkThrough.gitNotFound": "Úgy tűnik, hogy a Git nincs telepítve a rendszerre.", + "walkThrough.embeddedEditorBackground": "Az interaktív játszótér szerkesztőablakainak háttérszíne." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/configuration/node/configuration.i18n.json b/i18n/hun/src/vs/workbench/services/configuration/node/configuration.i18n.json new file mode 100644 index 0000000000000..513454a0b92e9 --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/configuration/node/configuration.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.configuration": "Konfigurációs beállításokat szolgáltat.", + "vscode.extension.contributes.configuration.title": "A beállítások összefoglaló leírása. Ez a címke jelenik meg a beállítások fájlban egy különálló megjegyzésként.", + "vscode.extension.contributes.configuration.properties": "A konfigurációs tulajdonságok leírása.", + "invalid.type": "ha meg van adva, a 'configuration.type' értékét egy objektumként kell megadnii", + "invalid.title": "a 'configuration.title' értékét karakterláncként kell megadni", + "vscode.extension.contributes.defaultConfiguration": "Adott nyelvre vonatkozóan szerkesztőbeállításokat szolgáltat.", + "invalid.properties": "A 'configuration.properties' értékét egy objektumként kell megadni" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/hun/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json new file mode 100644 index 0000000000000..c75e504c21ced --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "open": "Beállítások megnyitása", + "close": "Bezárás", + "saveAndRetry": "Beállítások mentése és újrapróbálkozás", + "errorUnknownKey": "Nem sikerült írni a konfigurációs fájlt (ismeretlen kulcs)", + "errorInvalidTarget": "Nem sikerült írni a konfigurációs fájlt (érvénytelen cél)", + "errorNoWorkspaceOpened": "Nem sikerült írni a beállításokba, mert nincs mappa megnyitva. Nyisson meg egy mappát, majd próbálja újra!", + "errorInvalidConfiguration": "Nem sikerült írni a beállításokba. Nyissa meg a **Felhasználói beállításokat**, javítsa a hibákat és figyelmeztetéseket a fájlban, majd próbálja újra!", + "errorInvalidConfigurationWorkspace": "Nem sikerült írni a beállításokba. Nyissa meg a **Munkaterült beállításait**, javítsa a hibákat és figyelmeztetéseket a fájlban, majd próbálja újra!", + "errorConfigurationFileDirty": "Nem sikerült írni a beállításokba, mert a fájl módosítva lett. Mentse a **Felhasználói beállítások** fájlt, majd próbálja újra!", + "errorConfigurationFileDirtyWorkspace": "Nem sikerült írni a beállításokba, mert a fájl módosítva lett. Mentse a **Munkaterület beállításai** fájlt, majd próbálja újra!" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json b/i18n/hun/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json new file mode 100644 index 0000000000000..afdabd01421ba --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Telemetria", + "telemetry.enableCrashReporting": "Összeomlási jelentések küldésének engedélyezése a Microsofthoz.\nA beállítás érvénybe lépéséhez újraindítás szükséges." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/editor/browser/editorService.i18n.json b/i18n/hun/src/vs/workbench/services/editor/browser/editorService.i18n.json new file mode 100644 index 0000000000000..50e968f8ee37e --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/editor/browser/editorService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "compareLabels": "{0} ↔ {1}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/files/electron-browser/fileService.i18n.json b/i18n/hun/src/vs/workbench/services/files/electron-browser/fileService.i18n.json new file mode 100644 index 0000000000000..132ee0675af7f --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/files/electron-browser/fileService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "netVersionError": "A működéshez Microsoft .NET-keretrendszer 4.5 szükséges. A telepítéshez kövesse az alábbi hivatkozást!", + "installNet": ".NET Framework 4.5 letöltése", + "neverShowAgain": "Ne jelenítse meg újra", + "trashFailed": "A(z) {0} kukába helyezése nem sikerült" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/files/node/fileService.i18n.json b/i18n/hun/src/vs/workbench/services/files/node/fileService.i18n.json new file mode 100644 index 0000000000000..f303a5e38e247 --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/files/node/fileService.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileInvalidPath": "Érvénytelen fájlerőforrás ({0})", + "fileIsDirectoryError": "A fájl egy kövtár ({0})", + "fileNotModifiedError": "A fájl azóta nem módosult", + "fileTooLargeError": "A fájl túl nagy a megnyitáshoz", + "fileBinaryError": "A fájl binárisnak tűnik és nem nyitható meg szövegként", + "fileNotFoundError": "Fájl nem található ({0})", + "fileMoveConflict": "Nem lehet áthelyezni vagy másolni. A fájl már létezik a célhelyen.", + "unableToMoveCopyError": "Nem lehet áthelyezni vagy másolni. A fájl felülírná a mappát, amiben található.", + "foldersCopyError": "A munkaterületre nem másolhatók mappák. Válasszon ki egyedi fájlokat a másoláshoz.", + "fileModifiedError": "A fájl azóta módosult", + "fileReadOnlyError": "A fájl csak olvasható" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/keybinding/common/keybindingEditing.i18n.json b/i18n/hun/src/vs/workbench/services/keybinding/common/keybindingEditing.i18n.json new file mode 100644 index 0000000000000..36032acbd6ea2 --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/keybinding/common/keybindingEditing.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "errorKeybindingsFileDirty": "Nem lehet írni, mert a fájl módosult. Mentse a **Billentyűparancsok** fájlt, majd próbálja újra.", + "parseErrors": "Nem lehet írni a billentyűparancsokat. Nyissa meg a**Billentyűparancsok fájl**t, javítsa a benne található hibákat vagy figyelmeztetéseket, majd próbálja újra.", + "errorInvalidConfiguration": "Nem lehet írni a billentyűparancsokat. A **Billentyűparancsok fájlban** vagy egy objektum, ami nem tömb típusú. Nyissa meg a fájlt a helyreállításhoz, majd próbálja újra.", + "emptyKeybindingsHeader": "Az ebben a fájlban elhelyezett billentyűparancsok felülírják az alapértelmezett beállításokat" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/hun/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json new file mode 100644 index 0000000000000..df3dd16f4631e --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "nonempty": "az érték nem lehet üres.", + "requirestring": "a(z) `{0}` tulajdonság kötelező és `string` típusúnak kell lennie", + "optstring": "a(z) `{0}` tulajdonság elhagyható vagy `string` típusúnak kell lennie", + "vscode.extension.contributes.keybindings.command": "A billentyűparancs aktiválása esetén futtatandó parancs azonosítója.", + "vscode.extension.contributes.keybindings.key": "Billenty vagy billentyűparancs (különálló billentyűk plusz jellel és sorozatok szóközzel, pl.: Crtl + O és Ctrl+L L).", + "vscode.extension.contributes.keybindings.mac": "Mac-specifikus billentyű vagy billentyűsorozat.", + "vscode.extension.contributes.keybindings.linux": "Linux-specifikus billentyű vagy billentyűsorozat.", + "vscode.extension.contributes.keybindings.win": "Windows-specifikus billentyű vagy billentyűsorozat.", + "vscode.extension.contributes.keybindings.when": "A billentyűparancs aktiválási feltétele.", + "vscode.extension.contributes.keybindings": "Billentyűparancsok kezelését teszi lehetővé.", + "invalid.keybindings": "Érvénytelen `contributes.{0}`: {1}", + "unboundCommands": "A további elérhető parancsok a következők: ", + "keybindings.json.title": "Billentyűparancsok konfigurációja", + "keybindings.json.key": "Billentyű vagy billentyűsorozat (szóközzel elválasztva)", + "keybindings.json.command": "A végrehajtandó parancs neve", + "keybindings.json.when": "A billentyűparancs aktiválási feltétele.", + "keybindings.json.args": "A végrehajtandó parancs számára átadott argumentumok", + "keyboardConfigurationTitle": "Billentyűzet", + "dispatch": "Meghatározza, hogy a billentyűleütések észleléséhez a `keydown.code` (ajánlott) vagy `keydown.keyCode` esemény legyen használva." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/message/browser/messageList.i18n.json b/i18n/hun/src/vs/workbench/services/message/browser/messageList.i18n.json new file mode 100644 index 0000000000000..f97efd6f3ef08 --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/message/browser/messageList.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "alertErrorMessage": "Hiba: {0}", + "alertWarningMessage": "Figyelmeztetés: {0}", + "alertInfoMessage": "Információ: {0}", + "error": "Hiba", + "warning": "Figyelmeztetés", + "info": "Információ", + "close": "Bezárás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/message/electron-browser/messageService.i18n.json b/i18n/hun/src/vs/workbench/services/message/electron-browser/messageService.i18n.json new file mode 100644 index 0000000000000..1da61962be2ed --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/message/electron-browser/messageService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "yesButton": "&&Igen", + "cancelButton": "Mégse" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json b/i18n/hun/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json new file mode 100644 index 0000000000000..61665d51d6f0a --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.languages": "Nyelvdeklarációkat definiál.", + "vscode.extension.contributes.languages.id": "A nyelv azonosítója", + "vscode.extension.contributes.languages.aliases": "A nyelv kiegészítő nevei.", + "vscode.extension.contributes.languages.extensions": "A nyelvhez hozzárendelt fájlkiterjesztések.", + "vscode.extension.contributes.languages.filenames": "A nyelvhez hozzárendelt fájlnevek.", + "vscode.extension.contributes.languages.filenamePatterns": "A nyelvhez hozzárendelt globális minták.", + "vscode.extension.contributes.languages.mimetypes": "A nyelvhez hozzárendelt MIME-típusok.", + "vscode.extension.contributes.languages.firstLine": "Reguláris kifejezés, ami az adott nyelven írt fájl első sorára illeszkedik.", + "vscode.extension.contributes.languages.configuration": "A nyelvhez tartozó konfigurációkat tartalmazó fájl relatív elérési útja.", + "invalid": "Érvénytelen `contributes.{0}`: a várt érték egy tömb.", + "invalid.empty": "A `contributes.{0}` értéke üres", + "require.id": "a(z) `{0}` tulajdonság kötelező és `string` típusúnak kell lennie", + "opt.extensions": "a(z) `{0}` tulajdonság elhagyható és `string[]` típusúnak kell lennie", + "opt.filenames": "a(z) `{0}` tulajdonság elhagyható és `string[]` típusúnak kell lennie", + "opt.firstLine": "a(z) `{0}` tulajdonság elhagyható és `string` típusúnak kell lennie", + "opt.configuration": "a(z) `{0}` tulajdonság elhagyható és `string` típusúnak kell lennie", + "opt.aliases": "a(z) `{0}` tulajdonság elhagyható és `string[]` típusúnak kell lennie", + "opt.mimetypes": "a(z) `{0}` tulajdonság elhagyható és `string[]` típusúnak kell lennie" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/progress/browser/progressService2.i18n.json b/i18n/hun/src/vs/workbench/services/progress/browser/progressService2.i18n.json new file mode 100644 index 0000000000000..1618012de896e --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/progress/browser/progressService2.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "progress.text": "{0} – {1}", + "progress.title": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json b/i18n/hun/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json new file mode 100644 index 0000000000000..4ae6117a727d9 --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.grammars": "TextMate-tokenizálókat szolgáltat.", + "vscode.extension.contributes.grammars.language": "Annak a nyelvnek az azonosítója, amely számára szolgáltatva van ez a szintaxis.", + "vscode.extension.contributes.grammars.scopeName": "A tmLanguage-fájl által használt TextMate-hatókör neve.", + "vscode.extension.contributes.grammars.path": "A tmLanguage-fájl elérési útja. Az elérési út relatív a kiegészítő mappájához képest, és általában './syntaxes/'-zal kezdődik.", + "vscode.extension.contributes.grammars.embeddedLanguages": "Hatókörnév-nyelvazonosító kulcs-érték párokat tartalmazó objektum, ha a nyelvtan tartalmaz beágyazott nyelveket.", + "vscode.extension.contributes.grammars.injectTo": "Azon nyelvi hatókörök nevei, ahová be lesz ágyazva ez a nyelvtan." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json b/i18n/hun/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json new file mode 100644 index 0000000000000..be4ee2e798998 --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid.language": "Ismeretlen nyelv található a következőben: `contributes.{0}.language`. A megadott érték: {1}", + "invalid.scopeName": "Hiányzó karakterlánc a `contributes.{0}.scopeName`-ben. A megadott érték: {1}", + "invalid.path.0": "Hiányzó karakterlánc a `contributes.{0}.path`-ban. A megadott érték: {1}", + "invalid.injectTo": "A `contributes.{0}.injectTo` értéke érvénytelen. Az értéke egy tömb lehet, ami nyelvhatókörök neveit tartalmazza. A megadott érték: {1}", + "invalid.embeddedLanguages": "A `contributes.{0}.embeddedLanguages` értéke érvénytelen. Az értéke egy hatókörnév-nyelv kulcs-érték párokat tartalmazó objektum lehet. A megadott érték: {1}", + "invalid.path.1": "A `contributes.{0}.path` ({1}) nem a kiegészítő mappáján belül található ({2}). Emiatt előfordulhat, hogy a kiegészítő nem lesz hordozható.", + "no-tm-grammar": "Nincs TM Grammar regisztrálva ehhez a nyelvhez." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/textfile/common/textFileEditorModel.i18n.json b/i18n/hun/src/vs/workbench/services/textfile/common/textFileEditorModel.i18n.json new file mode 100644 index 0000000000000..df0fb446988c0 --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/textfile/common/textFileEditorModel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "saveFileFirst": "A fájl módosítva lett. Mentse, mielőtt megnyitná egy másik kódolással.", + "genericSaveError": "Hiba a(z) {0} mentése közben ({1})." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/textfile/common/textFileService.i18n.json b/i18n/hun/src/vs/workbench/services/textfile/common/textFileService.i18n.json new file mode 100644 index 0000000000000..53a5c4f1246c7 --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/textfile/common/textFileService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "files.backup.failSave": "A fájlokról nem sikerült biztonsági másolatot készíteni (Hiba: {0}). Próbálja meg menteni a fájlokat a kilépéshez." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/textfile/electron-browser/textFileService.i18n.json b/i18n/hun/src/vs/workbench/services/textfile/electron-browser/textFileService.i18n.json new file mode 100644 index 0000000000000..a411a51ba5910 --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/textfile/electron-browser/textFileService.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "saveChangesMessage": "Szeretné menteni a(z) {0} fájlban elvégzett módosításokat?", + "saveChangesMessages": "Szeretné menteni a következő {0} fájlban elvégzett módosításokat?", + "moreFile": "...1 további fájl nincs megjelenítve", + "moreFiles": "...{0} további fájl nincs megjelenítve", + "saveAll": "Ö&&sszes mentése", + "save": "Menté&&s", + "dontSave": "&&Ne mentse", + "cancel": "Mégse", + "saveChangesDetail": "A módosítások elvesznek, ha nem menti őket.", + "allFiles": "Összes fájl", + "noExt": "Nincs kiterjesztés" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json b/i18n/hun/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json new file mode 100644 index 0000000000000..0e909264d9875 --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "schema.colors": "A szintaktikai kiemeléshez használt színek", + "schema.properties.name": "A szabály leírása", + "schema.fontStyle": "A szabály betűtípusának stílusa: 'italic', 'bold', 'underline', vagy ezek kombinációja", + "schema.tokenColors.path": "A tmTheme-fájl elérési útja (az aktuális fájlhoz képest relatívan)" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/themes/common/fileIconThemeSchema.i18n.json b/i18n/hun/src/vs/workbench/services/themes/common/fileIconThemeSchema.i18n.json new file mode 100644 index 0000000000000..b93f26958fa4e --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/themes/common/fileIconThemeSchema.i18n.json @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "schema.folderExpanded": "Kinyitott mappánál használt ikon. A kinyitott mappa ikonját nem kötelező megadni. Ha nincs megadva, akkor a mappaikon lesz megjelenítve.", + "schema.folder": "A bezárt mappák ikonja, illetve ha a folderExpanded nincs megadva, akkor a kinyitott mappáké is.", + "schema.file": "Az alapértelmezett fájlikon, ami minden olyan fájlnál megjelenik, ami nem illeszkedik egyetlen kiterjesztésre, fájlnévre vagy nyelvazonosítóra sem.", + "schema.folderNames": "Ikonokat társít mappanevekhez. Az objektum kulcsa a mappa neve elérési útvonalrészletek nélkül. Nem tartalmazhat mintákat és helyettesítő karaktereket. A mappa nevének vizsgálatánál a kis- és nagybetűk nincsenek megkülönböztetve.", + "schema.folderName": "A társításhoz tartozó ikondefiníció azonosítója.", + "schema.folderNamesExpanded": "Ikonokat társít mappanevekhez kinyitott mappák esetén. Az objektum kulcsa a mappa neve elérési útvonalrészletek nélkül. Nem tartalmazhat mintákat és helyettesítő karaktereket. A mappa nevének vizsgálatánál a kis- és nagybetűk nincsenek megkülönböztetve.", + "schema.folderNameExpanded": "A társításhoz tartozó ikondefiníció azonosítója. ", + "schema.fileExtensions": "Ikonokat társít fájlkiterjesztésekhez. Az objektum kulcsa a fájlkiterjesztés neve. A kiterjesztés neve a fájl nevének utolsó része az utolsó pont után (a pont nélkül). A kiterjesztések vizsgálatánál a kis- és nagybetűk nincsenek megkülönböztetve. ", + "schema.fileExtension": "A társításhoz tartozó ikondefiníció azonosítója. ", + "schema.fileNames": "Ikonokat társít fájlnevekhez. Az objektum kulcsa a fájl teljes neve, az elérési út többi része nélkül. A fájlnév tartalmazhat pontokat és fájlkiterjesztést. Nem tartalmazhat mintákat és helyettesítő karaktereket. A fájlnevek vizsgálatánál a kis- és nagybetűk nincsenek megkülönböztetve.", + "schema.fileName": "A társításhoz tartozó ikondefiníció azonosítója. ", + "schema.languageIds": "Ikonokat társít nyelvekhez. Az objektum kulcsa a nyelvet szolgáltató komponens által definiált nyelvazonosító.", + "schema.languageId": "A társításhoz tartozó ikondefiníció azonosítója. ", + "schema.fonts": "Az ikondefiníciókban használt betűkészletek.", + "schema.id": "A betűkészlet azonosítója.", + "schema.src": "A betűkészlet elérési útjai.", + "schema.font-path": "A betűkészlet elérési útja, relatívan az aktuális ikontémafájlhoz képest.", + "schema.font-format": "A betűkészlet formátuma.", + "schema.font-weight": "A betűkészlet betűvastagsága.", + "schema.font-sstyle": "A betűkészlet stílusa.", + "schema.font-size": "A betűkészlet alapértelmezett mérete.", + "schema.iconDefinitions": "A fájlok ikonokhoz történő rendelésénél használható ikonok leírása.", + "schema.iconDefinition": "Egy ikondefiníció. Az objektum kulcsa a definíció azonosítója.", + "schema.iconPath": "SVG vagy PNG használata esetén a kép elérési útja. Az elérési út relatív az ikonkészletfájlhoz képest.", + "schema.fontCharacter": "Betűkészlet használata esetén a betűkészletből használandó karakter.", + "schema.fontColor": "Betűkészlet használata esetén a használt szín.", + "schema.fontSize": "Betűkészlet használata esetén a betűkészlet mérete a szöveg betűkészletének méretéhez képest, százalékban. Ha nincs megadva, akkor a betűkészlet-definícióban megadott érték van használva.", + "schema.fontId": "Betűkészlet használata esetén a betűkészlet azonosítója. Ha nincs megadva, akkor az első betűkészlet-definíció van használva.", + "schema.light": "Fájlikon-társítások világos témák használata esetén. Nem kötelező megadni.", + "schema.highContrast": "Fájlikon-társítások nagy kontrasztú témák használata esetén. Nem kötelező megadni." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/hun/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json new file mode 100644 index 0000000000000..88c2c7411555a --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error.cannotparsejson": "Hiba a JSON témafájl feldolgozása közben: {0}", + "error.invalidformat.colors": "Hiba a színtémafájl feldolgozása közben: {0}. A 'colors' értéke nem 'object' típusú.", + "error.invalidformat.tokenColors": "Hiba a színtémafájl feldolgozása közben: {0}. A 'tokenColors' tulajdonság vagy egy színeket tartalmazó tömb legyen vagy egy TextMate témafájl elérési útja", + "error.plist.invalidformat": "Hiba a tmTheme-fájl feldolgozása közben: {0}. A 'settings' nem egy tömb.", + "error.cannotparse": "Hiba a tmTheme-fájl feldolgozása közben: {0}", + "error.cannotload": "Hiba a(z) {0} tmTheme fájl betöltése közben: {1}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/hun/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json new file mode 100644 index 0000000000000..96fe40c53455b --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.themes": "TextMate-színtémákat szolgáltat.", + "vscode.extension.contributes.themes.id": "A téma felhasználói beállításokban használt azonosítója.", + "vscode.extension.contributes.themes.label": "A színtéma felhasználói felületen megjelenő neve.", + "vscode.extension.contributes.themes.uiTheme": "A szerkesztőablak körül megjelenő elemek alaptémája. A 'vs' a világos, a 'vs-dark' a sötét színtéma, a 'hc-black' pedig a sötét, nagy kontrasztú téma.", + "vscode.extension.contributes.themes.path": "A tmTheme-fájl elérési útja. Az elérési út relatív a kiegészítő mappájához képest, és általában './themes/themeFile.tmTheme'.", + "vscode.extension.contributes.iconThemes": "Fájlikontémákat szolgáltat.", + "vscode.extension.contributes.iconThemes.id": "Az ikontéma felhasználói beállításokban használt azonosítója.", + "vscode.extension.contributes.iconThemes.label": "Az ikontéma felhasználói felületen megjelenő neve.", + "vscode.extension.contributes.iconThemes.path": "A témadefiníciós fájl elérési útja. Az elérési út relatív a kiegészítő mappájához képest, és általában ./icons/awesome-icon-theme.json'.", + "migration.completed": "Új témabeállítások lettek hozzáadva a felhasználói beállításokhoz. Biztonsági mentés a következő helyen érhető el: {0}.", + "error.cannotloadtheme": "Nem sikerült betölteni a(z) '{0}' témát: {1}.", + "reqarray": "a(z) `{0}` kiegszítési pontot tömbként kell megadni", + "reqpath": "Hiányzó karakterlánc a `contributes.{0}.path`-ban. A megadott érték: {1}", + "invalid.path.1": "A `contributes.{0}.path` ({1}) nem a kiegészítő mappáján belül található ({2}). Emiatt előfordulhat, hogy a kiegészítő nem lesz hordozható.", + "reqid": "Hiányzó karakterlánc a `contributes.{0}.id`-ben. A megadott érték: {1}", + "error.cannotloadicontheme": "Nem sikerült megnyitni a(z) '{0}' témát", + "error.cannotparseicontheme": "Hiba a fájlikonokat leíró fájl feldolgozása közben: {0}", + "colorTheme": "Meghatározza a munkaterületen használt színtémát.", + "colorThemeError": "A téma ismeretlen vagy nincs telepítve.", + "iconTheme": "Meghatározza a munkaterületen használt ikontémát. 'null' érték esetén nem jelenik meg egyetlen fájlikon sem.", + "noIconThemeDesc": "Nincsenek fájlikonok", + "iconThemeError": "A fájlikontéma ismeretlen vagy nincs telepítve.", + "workbenchColors": "Felülírja az aktuális színtémában definiált színeket.", + "workbenchColors.deprecated": "A beállítás már nem kísérleti, és át lett nevezve 'workbench.colorCustomizations'-re.", + "workbenchColors.deprecatedDescription": "Használja a 'workbench.colorCustomizations' tulajdonságot helyette." +} \ No newline at end of file diff --git a/i18n/ita/extensions/configuration-editing/out/extension.i18n.json b/i18n/ita/extensions/configuration-editing/out/extension.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/extensions/configuration-editing/out/extension.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json b/i18n/ita/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json index cd92990a7719b..7c04c2478e37a 100644 --- a/i18n/ita/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json +++ b/i18n/ita/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json @@ -7,7 +7,6 @@ "activeEditorShort": "ad esempio myFile.txt", "activeEditorMedium": "ad esempio myFolder/myFile.txt", "activeEditorLong": "ad esempio /Users/Development/myProject/myFolder/myFile.txt", - "rootName": "ad esempio myProject", "rootPath": "ad esempio /Users/Development/myProject", "appName": "ad esempio VS Code", "dirty": "un indicatore dirty se l'editor attivo è dirty", diff --git a/i18n/ita/extensions/extension-editing/out/extensionLinter.i18n.json b/i18n/ita/extensions/extension-editing/out/extensionLinter.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/extensions/extension-editing/out/extensionLinter.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/extensions/git/out/commands.i18n.json b/i18n/ita/extensions/git/out/commands.i18n.json index 341133e58276a..1890044ddd33e 100644 --- a/i18n/ita/extensions/git/out/commands.i18n.json +++ b/i18n/ita/extensions/git/out/commands.i18n.json @@ -16,11 +16,19 @@ "confirm discard": "Rimuovere le modifiche in {0}?", "confirm discard multiple": "Rimuovere le modifiche in {0} file?", "discard": "Rimuovi modifiche", + "confirm discard all": "Sei sicuro di voler annullare TUTTE le modifiche? Quest'azione è IRREVERSIBILE!", + "discardAll": "Rimuovi TUTTE le modifiche", + "no staged changes": "Non ci sono modifiche in stage di cui eseguire il commit.\n\nSI desidera mettere in stage automaticamente tutte le modifiche ed eseguirne il commit direttamente?", + "yes": "Sì", + "always": "Sempre", "no changes": "Non ci sono modifiche di cui eseguire il commit.", "commit message": "Messaggio di commit", "provide commit message": "Specificare un messaggio di commit", "branch name": "Nome ramo", "provide branch name": "Specificare un nome di ramo", + "select branch to delete": "Seleziona un ramo da cancellare", + "confirm force delete branch": "Il merge del ramo '{0}' non è completo. Elimina comunque?", + "delete branch": "Elimina ramo", "no remotes to pull": "Il repository non contiene elementi remoti configurati come origini del pull.", "no remotes to push": "Il repository non contiene elementi remoti configurati come destinazione del push.", "nobranch": "Estrarre un ramo per eseguire il push in un elemento remoto.", @@ -31,6 +39,7 @@ "no remotes to publish": "Il repository non contiene elementi remoti configurati come destinazione della pubblicazione.", "disabled": "GIT è disabilitato oppure non supportato in quest'area di lavoro", "clean repo": "Pulire l'albero di lavoro del repository prima dell'estrazione.", + "cant push": "Impossibile effettuare il push in remoto. Effettua prima un 'pull' per integrare le tue modifiche.", "git error details": "GIT: {0}", "git error": "Errore GIT", "open git log": "Apri log GIT" diff --git a/i18n/ita/extensions/git/out/model.i18n.json b/i18n/ita/extensions/git/out/model.i18n.json index c66808a6fc46a..5cfce3e084435 100644 --- a/i18n/ita/extensions/git/out/model.i18n.json +++ b/i18n/ita/extensions/git/out/model.i18n.json @@ -8,5 +8,7 @@ "merge changes": "Esegui merge delle modifiche", "staged changes": "Modifiche preparate per il commit", "changes": "Modifiche", - "ok": "OK" + "ok": "OK", + "neveragain": "Non visualizzare più questo messaggio", + "huge": "Il repository git '{0}' ha troppe modifiche attive - verrà attivato solo un sottoinsieme delle funzionalità di Git." } \ No newline at end of file diff --git a/i18n/ita/extensions/git/out/statusbar.i18n.json b/i18n/ita/extensions/git/out/statusbar.i18n.json index 06cabeb7330e8..fe9c1294a4150 100644 --- a/i18n/ita/extensions/git/out/statusbar.i18n.json +++ b/i18n/ita/extensions/git/out/statusbar.i18n.json @@ -7,5 +7,5 @@ "checkout": "Estrai...", "sync changes": "Sincronizza modifiche", "publish changes": "Pubblica modifiche", - "syncing changes": "Sincronizzazione delle modifiche..." + "syncing changes": "Sincronizzazione delle modifiche in corso..." } \ No newline at end of file diff --git a/i18n/ita/extensions/git/package.i18n.json b/i18n/ita/extensions/git/package.i18n.json index 9175f30b457e4..bc00249edb9a7 100644 --- a/i18n/ita/extensions/git/package.i18n.json +++ b/i18n/ita/extensions/git/package.i18n.json @@ -26,12 +26,13 @@ "command.undoCommit": "Annulla ultimo commit", "command.checkout": "Estrai in...", "command.branch": "Crea ramo...", + "command.deleteBranch": "Elimina ramo...", "command.pull": "Esegui pull", "command.pullRebase": "Esegui pull (Riassegna)", "command.push": "Esegui push", "command.pushTo": "Esegui push in...", "command.sync": "Sincronizza", - "command.publish": "Pubblica", + "command.publish": "Pubblica ramo", "command.showOutput": "Mostra output GIT", "config.enabled": "Indica se GIT è abilitato", "config.path": "Percorso dell'eseguibile di GIT", @@ -39,7 +40,9 @@ "config.autofetch": "Indica se il recupero automatico è abilitato", "config.enableLongCommitWarning": "Indica se visualizzare un avviso in caso di messaggi di commit lunghi", "config.confirmSync": "Conferma prima di sincronizzare i repository GIT", - "config.countBadge": "Controlla il contatore dei log GIT", - "config.checkoutType": "Controlla il tipo di rami elencati", - "config.ignoreLegacyWarning": "Ignora l'avvertimento legacy di Git" + "config.countBadge": "Controlla il contatore delle notifiche git. Con `all` vengono conteggiate tutte le modifiche. Con `tracked` vengono conteggiate solo le revisioni. Con `off` il contatore è disattivato.", + "config.checkoutType": "Controlla il tipo di branch mostrati eseguendo il comando `Checkout in...`. `all` mostra tutti i refs, `local` mostra solamente i branch locali, `tags` mostra solamente i tag e `remote` mostra solamente i branch remoti.", + "config.ignoreLegacyWarning": "Ignora l'avvertimento legacy di Git", + "config.ignoreLimitWarning": "Ignora il messaggio di avviso quando ci sono troppi cambiamenti in un repository", + "config.defaultCloneDirectory": "Il percorso predefinito dove clonare un repository GIT" } \ No newline at end of file diff --git a/i18n/ita/extensions/grunt/out/main.i18n.json b/i18n/ita/extensions/grunt/out/main.i18n.json index 8b6ad71cd4e6d..8defb3ed9235c 100644 --- a/i18n/ita/extensions/grunt/out/main.i18n.json +++ b/i18n/ita/extensions/grunt/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Rilevamento automatico di Grunt non riuscito - errore: {0}" +} \ No newline at end of file diff --git a/i18n/ita/extensions/grunt/package.i18n.json b/i18n/ita/extensions/grunt/package.i18n.json index 8b6ad71cd4e6d..46f902d3d6155 100644 --- a/i18n/ita/extensions/grunt/package.i18n.json +++ b/i18n/ita/extensions/grunt/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.grunt.autoDetect": "Controlla se la rilevazione automatica delle attività Grunt è on/off. L'impostazione predefinita è 'on'." +} \ No newline at end of file diff --git a/i18n/ita/extensions/jake/out/main.i18n.json b/i18n/ita/extensions/jake/out/main.i18n.json new file mode 100644 index 0000000000000..be50361d378e5 --- /dev/null +++ b/i18n/ita/extensions/jake/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "Rilevamento automatico di Jake non riuscito - errore: {0}" +} \ No newline at end of file diff --git a/i18n/ita/extensions/jake/package.i18n.json b/i18n/ita/extensions/jake/package.i18n.json new file mode 100644 index 0000000000000..76d5185d8c347 --- /dev/null +++ b/i18n/ita/extensions/jake/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.jake.autoDetect": "Controlla se la rilevazione automatica delle attività Jake è on/off. L'impostazione predefinita è 'on'." +} \ No newline at end of file diff --git a/i18n/ita/extensions/markdown/out/extension.i18n.json b/i18n/ita/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..2448cc1f0e072 --- /dev/null +++ b/i18n/ita/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "onPreviewStyleLoadError": "Impossibile caricare 'markdown.styles': {0}" +} \ No newline at end of file diff --git a/i18n/ita/extensions/markdown/package.i18n.json b/i18n/ita/extensions/markdown/package.i18n.json index d271102f8e31d..2b0bebc2a8655 100644 --- a/i18n/ita/extensions/markdown/package.i18n.json +++ b/i18n/ita/extensions/markdown/package.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "markdown.preview.breaks.desc": "Imposta come le interruzioni di riga vengono visualizzate nell'anteprima di markdown. Impostarlo a 'true' crea un
per ogni carattere di nuova riga.", "markdown.preview.doubleClickToSwitchToEditor.desc": "Fare doppio clic nell'anteprima markdown per passare all'editor.", "markdown.preview.fontFamily.desc": "Consente di controllare la famiglia di caratteri usata nell'anteprima markdown.", "markdown.preview.fontSize.desc": "Consente di controllare le dimensioni del carattere in pixel usate nell'anteprima markdown.", @@ -17,5 +18,6 @@ "markdown.showSource.title": "Mostra origine", "markdown.styles.dec": "Elenco di URL o percorsi locali dei fogli di stile CSS da usare dall'anteprima markdown. I percorsi relativi vengono interpretati come relativi alla cartella aperta nella finestra di esplorazione. Se non è presente alcuna cartella aperta, vengono interpretati come relativi al percorso del file markdown. Tutti i caratteri '\\' devono essere scritti come '\\\\'.", "markdown.showPreviewSecuritySelector.title": "Modifica impostazioni di sicurezza anteprima markdown", - "markdown.preview.enableExperimentalExtensionApi.desc": "[Sperimentale] Consentire estensioni per estendere l'anteprima di markdown." + "markdown.preview.enableExperimentalExtensionApi.desc": "[Sperimentale] Consentire estensioni per estendere l'anteprima di markdown.", + "markdown.trace.desc": "Abilitare la registrazione debug per l'estensione markdown." } \ No newline at end of file diff --git a/i18n/ita/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/ita/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..b8b557539d959 --- /dev/null +++ b/i18n/ita/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "acceptCurrentChange": "Accetta modifica corrente", + "acceptIncomingChange": "Accetta modifica in ingresso", + "acceptBothChanges": "Accetta entrambe le modifiche", + "compareChanges": "Confronta le modifiche" +} \ No newline at end of file diff --git a/i18n/ita/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/ita/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..bd26a995d326d --- /dev/null +++ b/i18n/ita/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "cursorNotInConflict": "Il cursore dell'editor non si trova all'interno di un conflitto merge", + "compareChangesTitle": "{0}: modifiche correnti ⟷ modifiche in ingresso", + "cursorOnSplitterRange": "Il cursore si trova sulla barra di divisione di merge conflitti, si prega di spostarlo o al blocco \"corrente\" o a quello \"in ricezione\"", + "noConflicts": "Conflitti merge non trovati in questo file", + "noOtherConflictsInThisFile": "Nessun altro conflitto merge trovato in questo file" +} \ No newline at end of file diff --git a/i18n/ita/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/ita/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..ff68382dadc76 --- /dev/null +++ b/i18n/ita/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "currentChange": "(modifica corrente)", + "incomingChange": "(modifica in ingresso)" +} \ No newline at end of file diff --git a/i18n/ita/extensions/merge-conflict/package.i18n.json b/i18n/ita/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..323397967e172 --- /dev/null +++ b/i18n/ita/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "command.category": "Esegui merge del conflitto", + "command.accept.all-incoming": "Accettare tutte le modifiche in ingresso", + "command.accept.all-both": "Accettare tutte in entrambe", + "command.accept.current": "Accettare corrente", + "command.accept.incoming": "Accettare modifiche in ingresso", + "command.accept.selection": "Accettare selezione", + "command.accept.both": "Accettare entrambe", + "command.next": "Conflitto successivo", + "command.previous": "Conflitto precedente", + "command.compare": "Confronta il conflitto corrente", + "config.title": "Esegui merge del conflitto", + "config.codeLensEnabled": "Abilita/Disabilita le finestre CodeLens del blocco merge di conflitti all'interno di editor", + "config.decoratorsEnabled": "Abilita/Disabilita gli elementi Decorator sul blocco merge di conflitti all'interno di editor" +} \ No newline at end of file diff --git a/i18n/ita/extensions/npm/package.i18n.json b/i18n/ita/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..3e4c81db38dab --- /dev/null +++ b/i18n/ita/extensions/npm/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.npm.autoDetect": "Controlla se la rilevazione automatica degli script npm è on/off. L'impostazione predefinita è 'on'." +} \ No newline at end of file diff --git a/i18n/ita/extensions/typescript/out/features/bufferSyncSupport.i18n.json b/i18n/ita/extensions/typescript/out/features/bufferSyncSupport.i18n.json index 08776b1189332..e6788ac396b00 100644 --- a/i18n/ita/extensions/typescript/out/features/bufferSyncSupport.i18n.json +++ b/i18n/ita/extensions/typescript/out/features/bufferSyncSupport.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "versionMismatch": "Le versioni non corrispondono. Compilatore tsc globale ({0}) != servizio di linguaggio di Visual Studio Code ({1}). Potrebbero verificarsi errori di compilazione incoerente", "moreInformation": "Altre informazioni", "doNotCheckAgain": "Non eseguire più la verifica", "close": "Chiudi", diff --git a/i18n/ita/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/ita/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json new file mode 100644 index 0000000000000..39fde0fced390 --- /dev/null +++ b/i18n/ita/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ts-check": "Attiva il controllo semantico in un file JavaScript. Deve essere all'inizio del file.", + "ts-nocheck": "Disattiva il controllo semantico in un file JavaScript. Deve essere all'inizio del file.", + "ts-ignore": "Elimina errori di @ts-check sulla riga successiva di un file." +} \ No newline at end of file diff --git a/i18n/ita/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/ita/extensions/typescript/out/typescriptServiceClient.i18n.json index 231924f91a9b2..4261bf8e881fa 100644 --- a/i18n/ita/extensions/typescript/out/typescriptServiceClient.i18n.json +++ b/i18n/ita/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -4,10 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "restartTsServerTitle": "Riavvia", - "restartTypeScriptServerBlurb": "Riavviare il Server TypeScript per applicare le modifiche", - "later": "In seguito", - "channelName": "TypeScript", "noServerFound": "Il percorso {0} non punta a un'installazione valida di tsserver. Verrà eseguito il fallback alla versione in bundle di TypeScript.", "noBundledServerFound": "Il file tsserver di VSCode è stato eliminato da un'altra applicazione, ad esempio uno strumento di rilevamento virus che non funziona correttamente. Reinstallare VSCode.", "versionNumber.custom": "personalizzato", diff --git a/i18n/ita/extensions/typescript/out/utils/logger.i18n.json b/i18n/ita/extensions/typescript/out/utils/logger.i18n.json new file mode 100644 index 0000000000000..bc738f43d0c37 --- /dev/null +++ b/i18n/ita/extensions/typescript/out/utils/logger.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "channelName": "TypeScript" +} \ No newline at end of file diff --git a/i18n/ita/extensions/typescript/out/utils/projectStatus.i18n.json b/i18n/ita/extensions/typescript/out/utils/projectStatus.i18n.json index 641adbe5215b8..2a71104630a9a 100644 --- a/i18n/ita/extensions/typescript/out/utils/projectStatus.i18n.json +++ b/i18n/ita/extensions/typescript/out/utils/projectStatus.i18n.json @@ -6,7 +6,6 @@ { "hintExclude": "Per abilitare le funzionalità del linguaggio JavaScript/TypeScript a livello di progetto, escludere le cartelle che contengono molti file, come {0}", "hintExclude.generic": "Per abilitare le funzionalità del linguaggio JavaScript/TypeScript a livello di progetto, escludere le cartelle di grandi dimensioni che contengono file di origine su cui non si lavora.", - "open": "Configura esclusioni", "large.label": "Configura esclusioni", "hintExclude.tooltip": "Per abilitare le funzionalità del linguaggio JavaScript/TypeScript a livello di progetto, escludere le cartelle di grandi dimensioni che contengono file di origine su cui non si lavora." } \ No newline at end of file diff --git a/i18n/ita/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/ita/extensions/typescript/out/utils/typingsStatus.i18n.json index 4cc0b902ae3ef..563d939145df6 100644 --- a/i18n/ita/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/ita/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "installingPackages": "Recupero dei dati per ottimizzare IntelliSense in TypeScript", + "typesInstallerInitializationFailed.title": "Non è stato possibile installare i file di definizione tipi per le funzionalità del linguaggio JavaScript. Verificare che NPM sia installato e o configurare 'typescript.npm' nelle impostazioni utente", "typesInstallerInitializationFailed.moreInformation": "Altre informazioni", "typesInstallerInitializationFailed.doNotCheckAgain": "Non eseguire più la verifica", "typesInstallerInitializationFailed.close": "Chiudi" diff --git a/i18n/ita/extensions/typescript/package.i18n.json b/i18n/ita/extensions/typescript/package.i18n.json index 342c392fcb12a..7db05f3f135b9 100644 --- a/i18n/ita/extensions/typescript/package.i18n.json +++ b/i18n/ita/extensions/typescript/package.i18n.json @@ -11,7 +11,8 @@ "typescript.tsdk.desc": "Specifica il percorso della cartella che contiene i file tsserver e lib*.d.ts da usare.", "typescript.disableAutomaticTypeAcquisition": "Disabilita l'acquisizione automatica del tipo. Richiede TypeScript >= 2.0.6 e un riavvio dopo la modifica.", "typescript.check.tscVersion": "Verifica se un compilatore TypeScript di installazione globale, ad esempio tsc, è diverso dal servizio di linguaggio TypeScript usato.", - "typescript.tsserver.experimentalAutoBuild": "Abilita la compilazione automatica sperimentale. Richiede la versione 1.9 dev o 2.x tsserver e il riavvio di Visual Studio Code dopo la modifica.", + "typescript.tsserver.log": "Abilita la registrazione del server TypeScript in un file. Questo registro può essere utilizzato per diagnosticare problemi del server TypeScript. Il registro può contenere percorsi di file, codice sorgente e altre informazioni del progetto potenzialmente riservate. ", + "typescript.tsserver.trace": "Abilita la traccia dei messaggi inviati al server TypeScript. Questa traccia può essere utilizzata per diagnosticare problemi del server TypeScript. La traccia può contenere percorsi di file, codice sorgente e altre informazioni del progetto potenzialmente riservate.", "typescript.validate.enable": "Abilita/Disabilita la convalida TypeScript.", "typescript.format.enable": "Abilita/Disabilita il formattatore TypeScript predefinito.", "javascript.format.enable": "Abilita/Disabilita il formattatore JavaScript predefinito.", @@ -23,6 +24,7 @@ "format.insertSpaceBeforeFunctionParenthesis": "Consente di definire la gestione dello spazio prima delle parentesi dell'argomento della funzione. Richiede TypeScript >= 2.1.5.", "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": "Consente di definire la gestione dello spazio dopo le parentesi tonde di apertura e di chiusura non vuote.", "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": "Consente di definire la gestione dello spazio dopo le parentesi quadre di apertura e di chiusura non vuote.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": "Consente di definire la gestione dello spazio dopo l'apertura e prima della chiusura di parentesi graffe non vuote. Richiede TypeScript >= 2.3.0.", "format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": "Consente di definire la gestione dello spazio dopo la parentesi graffa iniziale e prima della parentesi graffa finale della stringa del modello. Richiede TypeScript >= 2.0.6", "format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": "Consente di definire la gestione dello spazio dopo la parentesi graffa iniziale e prima della parentesi graffa finale dell'espressione JSX. Richiede TypeScript >= 2.0.6", "format.placeOpenBraceOnNewLineForFunctions": "Consente di definire se una parentesi graffa di apertura viene o meno inserita su una riga per le funzioni.", @@ -30,9 +32,16 @@ "javascript.validate.enable": "Abilita/Disabilita la convalida JavaScript.", "typescript.goToProjectConfig.title": "Passa a Configurazione progetto", "javascript.goToProjectConfig.title": "Passa a Configurazione progetto", - "typescript.referencesCodeLens.enabled": "Abilita/Disabilita le finestre CodeLens per i riferimenti. Richiede una versione di TypeScript uguale o successiva alla 2.0.6.", + "javascript.referencesCodeLens.enabled": "Abilita/disabilita riferimenti CodeLens nei file JavaScript.", + "typescript.referencesCodeLens.enabled": "Abilita/disabilita riferimenti CodeLens nei file TypeScript. Richiede TypeScript >= 2.0.6.", "typescript.implementationsCodeLens.enabled": "Abilita/Disabilita le finestre CodeLens per le implementazioni. Richiede una versione di TypeScript uguale o successiva alla 2.2.0.", - "typescript.openTsServerLog.title": "Apri file di log del server TypeScript", + "typescript.openTsServerLog.title": "Apri il log del server TypeScript", + "typescript.restartTsServer": "Riavvia server TS", "typescript.selectTypeScriptVersion.title": "Seleziona la versione di TypeScript", - "jsDocCompletion.enabled": "Abilita/Disabilita commenti automatici JSDoc" + "jsDocCompletion.enabled": "Abilita/Disabilita commenti automatici JSDoc", + "javascript.implicitProjectConfig.checkJs": "Abilita/disabilita il controllo semantico di file JavaScript. File jsconfig.json o tsconfig.json esistenti sovrascrivono su questa impostazione. Richiede TypeScript >= 2.3.1.", + "typescript.npm": "Specifica il percorso dell'eseguibile NPM utilizzato per l'acquisizione automatica delle definizioni di tipi. Richiede TypeScript >= 2.3.4.", + "typescript.check.npmIsInstalled": "Controlla se NPM è installato per l'acquisizione automatica delle definizioni di tipi", + "javascript.nameSuggestions": "Abilita/disabilita l'inclusione di nomi univoci dal file negli elenchi di suggerimento di JavaScript.", + "typescript.tsc.autoDetect": "Controlla se la rilevazione automatica di attività tsc è on/off." } \ No newline at end of file diff --git a/i18n/ita/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/ita/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index cf5a97543013e..6e295ef1e2c5c 100644 --- a/i18n/ita/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/ita/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,8 +6,7 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "L'immagine è troppo grande per essere visualizzata nell'editor", - "resourceOpenExternalButton": "Apri immagine", - "resourceOpenExternalText": "utilizzando un programma esterno?", + "resourceOpenExternalButton": "Aprire immagine utilizzando un programma esterno?", "nativeBinaryError": "Il file non verrà visualizzato nell'editor perché è binario, è molto grande o usa una codifica testo non supportata.", "sizeB": "{0} B", "sizeKB": "{0} KB", diff --git a/i18n/ita/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/ita/src/vs/base/common/jsonErrorMessages.i18n.json new file mode 100644 index 0000000000000..2ffc2a9d4640d --- /dev/null +++ b/i18n/ita/src/vs/base/common/jsonErrorMessages.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error.invalidSymbol": "Simbolo non valido", + "error.invalidNumberFormat": "Formato di numero non valido", + "error.propertyNameExpected": "È previsto un nome di proprietà", + "error.valueExpected": "È previsto un valore", + "error.colonExpected": "Sono previsti i due punti", + "error.commaExpected": "È prevista la virgola", + "error.closeBraceExpected": "È prevista la parentesi graffa di chiusura", + "error.closeBracketExpected": "È prevista la parentesi quadra di chiusura", + "error.endOfFileExpected": "È prevista la fine del file" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/base/common/keybindingLabels.i18n.json b/i18n/ita/src/vs/base/common/keybindingLabels.i18n.json new file mode 100644 index 0000000000000..e88e90ec70350 --- /dev/null +++ b/i18n/ita/src/vs/base/common/keybindingLabels.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ctrlKey": "CTRL", + "shiftKey": "MAIUSC", + "altKey": "ALT", + "windowsKey": "Windows", + "ctrlKey.long": "CTRL", + "shiftKey.long": "MAIUSC", + "altKey.long": "ALT", + "cmdKey.long": "Comando", + "windowsKey.long": "Windows" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/code/electron-main/menus.i18n.json b/i18n/ita/src/vs/code/electron-main/menus.i18n.json index 0647c24f4082c..64d89168f54a0 100644 --- a/i18n/ita/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/ita/src/vs/code/electron-main/menus.i18n.json @@ -14,6 +14,7 @@ "mHelp": "&&Guida", "miNewWindow": "&&Nuova finestra", "mAbout": "Informazioni su {0}", + "mServices": "Servizi", "mHide": "Nascondi {0}", "mHideOthers": "Nascondi altri", "mShowAll": "Mostra tutto", @@ -69,7 +70,7 @@ "miSmartSelectShrink": "&&Riduci selezione", "miViewExplorer": "&&Esplora risorse", "miViewSearch": "Cerca", - "miViewGit": "&&Git", + "miViewSCM": "S&&CM", "miViewDebug": "&&Debug", "miViewExtensions": "E&&stensioni", "miToggleOutput": "&&Output", @@ -114,6 +115,8 @@ "miGotoSymbolInFile": "Vai al &&simbolo nel file...", "miGotoSymbolInWorkspace": "Vai al &&simbolo nell'area di lavoro...", "miGotoDefinition": "Vai alla &&definizione", + "miGotoTypeDefinition": "Vai alla &&definizione di tipo", + "miGotoImplementation": "Vai all'&&implementazione", "miGotoLine": "Vai alla riga...", "miStartDebugging": "&&Avvia debug", "miStartWithoutDebugging": "Avvia &&senza debug", @@ -130,16 +133,17 @@ "miColumnBreakpoint": "Punto di interruzione &&colonna", "miFunctionBreakpoint": "Punto di interruzione &&funzione...", "miNewBreakpoint": "&&Nuovo punto di interruzione", + "miEnableAllBreakpoints": "Abilita tutti i punti di interruzione", "miDisableAllBreakpoints": "Disabilita tutti i &&punti di interruzione", "miRemoveAllBreakpoints": "Rimuovi &&tutti i punti di interruzione", "miInstallAdditionalDebuggers": "&&Installa debugger aggiuntivi...", "mMinimize": "Riduci a icona", - "mClose": "Chiudi", "mBringToFront": "Porta tutto in primo piano", "miToggleDevTools": "&&Attiva/Disattiva strumenti di sviluppo", "miAccessibilityOptions": "&&Opzioni accessibilità", "miReportIssues": "&&Segnala problemi", "miWelcome": "&&Benvenuti", + "miInteractivePlayground": "Playground &&interattivo", "miDocumentation": "&&Documentazione", "miReleaseNotes": "&&Note sulla versione", "miKeyboardShortcuts": "&&Riferimento per tasti di scelta rapida", @@ -149,7 +153,7 @@ "miLicense": "&&Visualizza licenza", "miPrivacyStatement": "&&Informativa sulla privacy", "miAbout": "&&Informazioni su", - "miRestartToUpdate": "Riavvia per aggiornare...", + "accessibilityOptionsWindowTitle": "Opzioni accessibilità", "miCheckingForUpdates": "Verifica della disponibilità di aggiornamenti...", "miDownloadUpdate": "Scarica l'aggiornamento disponibile", "miDownloadingUpdate": "Download dell'aggiornamento...", diff --git a/i18n/ita/src/vs/code/electron-main/windows.i18n.json b/i18n/ita/src/vs/code/electron-main/windows.i18n.json index 2d2cdf7fee4d6..c16eee44314db 100644 --- a/i18n/ita/src/vs/code/electron-main/windows.i18n.json +++ b/i18n/ita/src/vs/code/electron-main/windows.i18n.json @@ -7,7 +7,6 @@ "ok": "OK", "pathNotExistTitle": "Il percorso non esiste", "pathNotExistDetail": "Il percorso '{0}' sembra non esistere più sul disco.", - "accessibilityOptionsWindowTitle": "Opzioni accessibilità", "reopen": "Riapri", "wait": "Continua ad attendere", "close": "Chiudi", @@ -15,8 +14,6 @@ "appStalledDetail": "È possibile riaprire la finestra, chiuderla oppure attendere.", "appCrashed": "Si è verificato un arresto anomalo della finestra", "appCrashedDetail": "Ci scusiamo per l'inconveniente. Per riprendere dal punto in cui si è verificata l'interruzione, riaprire la finestra.", - "newWindow": "Nuova finestra", - "newWindowDesc": "Apre una nuova finestra", - "recentFolders": "Cartelle recenti", - "folderDesc": "{0} {1}" + "openFile": "Apri file", + "openFolder": "Apri cartella" } \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/browser/widget/diffEditorWidget.i18n.json b/i18n/ita/src/vs/editor/browser/widget/diffEditorWidget.i18n.json index 8b6ad71cd4e6d..cddb1e2e74212 100644 --- a/i18n/ita/src/vs/editor/browser/widget/diffEditorWidget.i18n.json +++ b/i18n/ita/src/vs/editor/browser/widget/diffEditorWidget.i18n.json @@ -3,4 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "diffEditorInserted": "Colore di sfondo del testo che è stato inserito.", + "diffEditorRemoved": "Colore di sfondo del testo che è stato rimosso.", + "diffEditorInsertedOutline": "Colore del contorno del testo che è stato inserito.", + "diffEditorRemovedOutline": "Colore del contorno del testo che è stato rimosso." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/browser/widget/diffReview.i18n.json b/i18n/ita/src/vs/editor/browser/widget/diffReview.i18n.json new file mode 100644 index 0000000000000..fe8e7a6d65354 --- /dev/null +++ b/i18n/ita/src/vs/editor/browser/widget/diffReview.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "Chiudi" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json index 99cb8b5cd77c2..85d69953c4718 100644 --- a/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -9,6 +9,7 @@ "fontWeight": "Controlla lo spessore del carattere.", "fontSize": "Controlla le dimensioni del carattere in pixel.", "lineHeight": "Controlla l'altezza della riga. Usare 0 per calcolare l'altezza della riga dalle dimensioni del carattere.", + "letterSpacing": "Controlla la spaziatura tra le lettere in pixel.", "lineNumbers": "Consente di controllare la visualizzazione dei numeri di riga. I valori possibili sono 'on', 'off' e 'relative'. Con 'relative' viene visualizzato il conteggio delle righe a partire dalla posizione corrente del cursore.", "rulers": "Colonne in corrispondenza delle quali visualizzare i righelli verticali", "wordSeparators": "Caratteri che verranno usati come separatori di parola quando si eseguono operazioni o spostamenti correlati a parole", @@ -20,8 +21,11 @@ "roundedSelection": "Controlla se gli angoli delle selezioni sono arrotondati", "scrollBeyondLastLine": "Controlla se l'editor scorrerà oltre l'ultima riga", "minimap.enabled": "Controlla se la mini mappa è visualizzata", + "minimap.showSlider": "Controlla se lo slider della mini mappa viene nascosto automaticamente.", "minimap.renderCharacters": "Esegue il rendering dei caratteri effettivi di una riga (in contrapposizione ai blocchi colore)", "minimap.maxColumn": "Limita la larghezza della mini mappa in modo da eseguire il rendering al massimo di un certo numero di colonne", + "find.seedSearchStringFromSelection": "Controlla se inizializzare la stringa di ricerca nel Widget Trova con il testo selezionato nell'editor", + "find.autoFindInSelection": "Controlla se l'impostazione Trova nella selezione è attivata quando vengono selezionati più caratteri o righe di testo nell'editor", "wordWrap.off": "Il wrapping delle righe non viene eseguito.", "wordWrap.on": "Verrà eseguito il wrapping delle righe in base alla larghezza del viewport.", "wordWrap.wordWrapColumn": "Verrà eseguito il wrapping delle righe alla posizione corrispondente a `editor.wordWrapColumn`.", @@ -30,17 +34,20 @@ "wordWrapColumn": "Controlla la colonna di wrapping dell'editor quando il valore di `editor.wordWrap` è 'wordWrapColumn' o 'bounded'.", "wrappingIndent": "Controlla il rientro delle righe con ritorno a capo. Può essere uno dei valori seguenti: 'none', 'same' o 'indent'.", "mouseWheelScrollSensitivity": "Moltiplicatore da usare sui valori `deltaX` e `deltaY` degli eventi di scorrimento della rotellina del mouse", + "multiCursorModifier.ctrlCmd": "Rappresenta il tasto 'Control' (ctrl) su Windows e Linux e il tasto 'Comando' (cmd) su OSX.", + "multiCursorModifier.alt": "Rappresenta il tasto 'Alt' su Windows e Linux e il tasto 'Opzione' su OSX.", + "multiCursorModifier": "Il modificatore da utilizzare per aggiungere molteplici cursori con il mouse. 'ctrlCmd' rappresenta il tasto 'Control' su Windows e Linux e il tasto 'Comando' su OSX. I gesti del mouse Vai a definizione e Apri il Link si adatteranno in modo da non entrare in conflitto con il modificatore multi-cursore.", "quickSuggestions.strings": "Abilita i suggerimenti rapidi all'interno di stringhe.", "quickSuggestions.comments": "Abilita i suggerimenti rapidi all'interno di commenti.", "quickSuggestions.other": "Abilita i suggerimenti rapidi all'esterno di stringhe e commenti.", "quickSuggestions": "Controlla se visualizzare automaticamente i suggerimenti durante la digitazione", "quickSuggestionsDelay": "Controlla il ritardo in ms dopo il quale verranno visualizzati i suggerimenti rapidi", - "parameterHints": "Abilita i suggerimenti per i parametri", + "parameterHints": "Abilita un popup che mostra documentazione sui parametri e informazioni sui tipi mentre si digita", "autoClosingBrackets": "Controlla se l'editor deve chiudere automaticamente le parentesi quadre dopo che sono state aperte", "formatOnType": "Controlla se l'editor deve formattare automaticamente la riga dopo la digitazione", "formatOnPaste": "Controlla se l'editor deve formattare automaticamente il contenuto incollato. Deve essere disponibile un formattatore che deve essere in grado di formattare un intervallo in un documento.", "suggestOnTriggerCharacters": "Controlla se i suggerimenti devono essere visualizzati automaticamente durante la digitazione dei caratteri trigger", - "acceptSuggestionOnEnter": "Controlla se i suggerimenti devono essere accettati con 'INVIO' in aggiunta a 'TAB'. In questo modo è possibile evitare ambiguità tra l'inserimento di nuove righe e l'accettazione di suggerimenti.", + "acceptSuggestionOnEnter": "Controlla se i suggerimenti devono essere accettati con 'INVIO' in aggiunta a 'TAB'. In questo modo è possibile evitare ambiguità tra l'inserimento di nuove righe e l'accettazione di suggerimenti. Il valore 'smart' indica di accettare un suggerimento con 'INVIO' quando comporta una modifica al testo", "acceptSuggestionOnCommitCharacter": "Controlla se accettare i suggerimenti con i caratteri di commit. Ad esempio, in JavaScript il punto e virgola (';') può essere un carattere di commit che accetta un suggerimento e digita tale carattere.", "snippetSuggestions": "Controlla se i frammenti di codice sono visualizzati con altri suggerimenti e il modo in cui sono ordinati.", "emptySelectionClipboard": "Consente di controllare se, quando si copia senza aver effettuato una selezione, viene copiata la riga corrente.", @@ -62,12 +69,18 @@ "renderLineHighlight": "Consente di controllare in che modo l'editor deve eseguire il rendering dell'evidenziazione di riga corrente. Le opzioni possibili sono 'none', 'gutter', 'line' e 'all'.", "codeLens": "Controlla se nell'editor sono visualizzate le finestre di CodeLens", "folding": "Controlla se per l'editor è abilitata la riduzione del codice", + "showFoldingControls": "Controlla se i controlli di riduzione sul margine della barra di scorrimento sono automaticamente nascosti.", "matchBrackets": "Evidenzia le parentesi corrispondenti quando se ne seleziona una.", "glyphMargin": "Controlla se l'editor deve eseguire il rendering del margine verticale del glifo. Il margine del glifo viene usato principalmente per il debug.", "useTabStops": "Inserimento ed eliminazione dello spazio vuoto dopo le tabulazioni", "trimAutoWhitespace": "Rimuovi lo spazio vuoto finale inserito automaticamente", "stablePeek": "Mantiene aperti gli editor rapidi anche quando si fa doppio clic sul contenuto o si preme ESC.", "dragAndDrop": "Controlla se l'editor consentire lo spostamento di selezioni tramite trascinamento della selezione.", + "accessibilitySupport.auto": "L'editor utilizzerà API della piattaforma per rilevare quando è collegata un'utilità per la lettura dello schermo.", + "accessibilitySupport.on": "L'editor sarà definitivamente ottimizzato per l'utilizzo con un'utilità per la lettura dello schermo.", + "accessibilitySupport.off": "L'editor non sarà mai ottimizzato per l'utilizzo con un'utilità per la lettura dello schermo.", + "accessibilitySupport": "Controlla se l'editor deve essere eseguito in una modalità ottimizzata per le utilità per la lettura dello schermo.", + "links": "Controlla se l'editor deve individuare i collegamenti e renderli cliccabili", "sideBySide": "Controlla se l'editor diff mostra le differenze affiancate o incorporate", "ignoreTrimWhitespace": "Controlla se l'editor diff mostra come differenze le modifiche relative a spazi vuoti iniziali e finali", "renderIndicators": "Consente di controllare se l'editor diff mostra gli indicatori +/- per le modifiche aggiunte/rimosse", diff --git a/i18n/ita/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/ita/src/vs/editor/common/config/editorOptions.i18n.json new file mode 100644 index 0000000000000..77d08c0ba729b --- /dev/null +++ b/i18n/ita/src/vs/editor/common/config/editorOptions.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "accessibilityOffAriaLabel": "L'editor non è accessibile in questo momento. Premere Alt+F1 per le opzioni.", + "editorViewAccessibleLabel": "Contenuto editor" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/common/services/bulkEdit.i18n.json b/i18n/ita/src/vs/editor/common/services/bulkEdit.i18n.json index 3cdcf98c0a045..10ea73bb963c4 100644 --- a/i18n/ita/src/vs/editor/common/services/bulkEdit.i18n.json +++ b/i18n/ita/src/vs/editor/common/services/bulkEdit.i18n.json @@ -4,5 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "conflict": "Nel frattempo questi file sono stati modificati: {0}" + "conflict": "Nel frattempo questi file sono stati modificati: {0}", + "summary.0": "Non sono state effettuate modifiche", + "summary.nm": "Effettuate {0} modifiche al testo in {1} file", + "summary.n0": "Effettuate {0} modifiche al testo in un file" } \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/ita/src/vs/editor/common/view/editorColorRegistry.i18n.json index 6cf52ddd21ea2..1eb8439fa14a6 100644 --- a/i18n/ita/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/ita/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -10,5 +10,15 @@ "caret": "Colore del cursore dell'editor.", "editorWhitespaces": "Colore dei caratteri di spazio vuoto nell'editor.", "editorIndentGuides": "Colore delle guide per i rientri dell'editor.", - "editorLineNumbers": "Colore dei numeri di riga dell'editor." + "editorLineNumbers": "Colore dei numeri di riga dell'editor.", + "editorRuler": "Colore dei righelli dell'editor.", + "editorCodeLensForeground": "Colore primo piano delle finestre di CodeLens dell'editor", + "editorBracketMatchBackground": "Colore di sfondo delle parentesi corrispondenti", + "editorBracketMatchBorder": "Colore delle caselle di parentesi corrispondenti", + "editorOverviewRulerBorder": "Colore del bordo del righello delle annotazioni.", + "editorGutter": "Colore di sfondo della barra di navigazione dell'editor. La barra contiene i margini di glifo e i numeri di riga.", + "errorForeground": "Colore primo piano degli squiggle di errore nell'editor.", + "errorBorder": "Colore del bordo degli squiggle di errore nell'editor.", + "warningForeground": "Colore primo piano degli squiggle di avviso nell'editor", + "warningBorder": "Colore del bordo degli squggle di avviso nell'editor." } \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json b/i18n/ita/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json index 2fc34fe0c2219..2e610be7babb7 100644 --- a/i18n/ita/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json +++ b/i18n/ita/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "smartSelect.jumpBracket": "Vai alla parentesi quadra" + "smartSelect.jumpBracket": "Vai alla parentesi" } \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/find/common/findController.i18n.json b/i18n/ita/src/vs/editor/contrib/find/common/findController.i18n.json index 7161f553e2f49..acd2bdb447c6f 100644 --- a/i18n/ita/src/vs/editor/contrib/find/common/findController.i18n.json +++ b/i18n/ita/src/vs/editor/contrib/find/common/findController.i18n.json @@ -14,6 +14,6 @@ "addSelectionToPreviousFindMatch": "Aggiungi selezione a risultato ricerca precedente", "moveSelectionToNextFindMatch": "Sposta ultima selezione a risultato ricerca successivo", "moveSelectionToPreviousFindMatch": "Sposta ultima selezione a risultato ricerca precedente", - "selectAllOccurencesOfFindMatch": "Seleziona tutte le occorrenze del risultato ricerca", + "selectAllOccurrencesOfFindMatch": "Seleziona tutte le occorrenze del risultato ricerca", "changeAll.label": "Cambia tutte le occorrenze" } \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/format/browser/formatActions.i18n.json b/i18n/ita/src/vs/editor/contrib/format/browser/formatActions.i18n.json index d1fd1741e7486..7c31ed06f01d4 100644 --- a/i18n/ita/src/vs/editor/contrib/format/browser/formatActions.i18n.json +++ b/i18n/ita/src/vs/editor/contrib/format/browser/formatActions.i18n.json @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "hint11": "Made 1 formatting edit on line {0}", - "hintn1": "Made {0} formatting edits on line {1}", - "hint1n": "Made 1 formatting edit between lines {0} and {1}", - "hintnn": "Made {0} formatting edits between lines {1} and {2}", - "formatDocument.label": "Format Document", - "formatSelection.label": "Format Selection" + "hint11": "È stata apportata 1 modifica di formattazione a riga {0}", + "hintn1": "Sono state apportate {0} modifiche di formattazione a riga {1}", + "hint1n": "È stata apportata 1 modifica di formattazione tra le righe {0} e {1}", + "hintnn": "Sono state apportate {0} modifiche di formattazione tra le righe {1} e {2}", + "formatDocument.label": "Formatta documento", + "formatSelection.label": "Formatta selezione" } \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/ita/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..9df481ec1b5e8 --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "Non è stata trovata alcuna definizione per '{0}'", + "generic.noResults": "Non è stata trovata alcuna definizione", + "meta.title": " - Definizioni di {0}", + "actions.goToDecl.label": "Vai alla definizione", + "actions.goToDeclToSide.label": "Apri definizione lateralmente", + "actions.previewDecl.label": "Visualizza la definizione", + "goToImplementation.noResultWord": "Non sono state trovate implementazioni per '{0}'", + "goToImplementation.generic.noResults": "Non sono state trovate implementazioni", + "meta.implementations.title": "- {0} implementazioni", + "actions.goToImplementation.label": "Vai all'implementazione", + "actions.peekImplementation.label": "Anteprima implementazione", + "goToTypeDefinition.noResultWord": "Non sono state trovate definizioni di tipi per '{0}'", + "goToTypeDefinition.generic.noResults": "Non sono state trovate definizioni di tipi", + "meta.typeDefinitions.title": " - {0} definizioni di tipo", + "actions.goToTypeDefinition.label": "Vai alla definizione di tipo", + "actions.peekTypeDefinition.label": "Anteprima definizione di tipo" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/ita/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..fa526a1f9e6c3 --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "Fare clic per visualizzare {0} definizioni." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/hover/browser/hover.i18n.json b/i18n/ita/src/vs/editor/contrib/hover/browser/hover.i18n.json index b5b21cc37d7d4..385b42e529051 100644 --- a/i18n/ita/src/vs/editor/contrib/hover/browser/hover.i18n.json +++ b/i18n/ita/src/vs/editor/contrib/hover/browser/hover.i18n.json @@ -4,8 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "showHover": "Visualizza passaggio del mouse", - "hoverHighlight": "Evidenzia sotto la parola di cui viene mostrata un'area sensibile al passaggio", - "hoverBackground": "Colore di sfondo dell'area sensibile al passaggio del mouse dell'editor", - "hoverBorder": "Colore di sfondo dell'area sensibile al passaggio del mouse dell'editor" + "showHover": "Visualizza passaggio del mouse" } \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/links/browser/links.i18n.json b/i18n/ita/src/vs/editor/contrib/links/browser/links.i18n.json index e5d5773a69953..969ff8d55c9b9 100644 --- a/i18n/ita/src/vs/editor/contrib/links/browser/links.i18n.json +++ b/i18n/ita/src/vs/editor/contrib/links/browser/links.i18n.json @@ -6,6 +6,7 @@ { "links.navigate.mac": "Cmd + clic per seguire il collegamento", "links.navigate": "CTRL + clic per seguire il collegamento", + "links.navigate.al": "Alt + clic per seguire il collegamento", "invalid.url": "Non è stato possibile aprire questo collegamento perché il formato non è valido: {0}", "missing.url": "Non è stato possibile aprire questo collegamento perché manca la destinazione.", "label": "Apri il collegamento" diff --git a/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index aa37caf90b194..d9f668ac458c1 100644 --- a/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -4,5 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "aria.result.0": "Non sono stati trovati risultati" + "aria.oneReference": "simbolo in {0} alla riga {1} colonna {2}", + "aria.fileReferences.1": "1 simbolo in {0}, percorso completo {1}", + "aria.fileReferences.N": "{0} simboli in {1}, percorso completo {2}", + "aria.result.0": "Non sono stati trovati risultati", + "aria.result.1": "Trovato 1 simbolo in {0}", + "aria.result.n1": "Trovati {0} simboli in {1}", + "aria.result.nm": "Trovati {0} simboli in {1} file" } \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index 3177bb1eccfc6..1b3c14ffa2f41 100644 --- a/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -12,15 +12,16 @@ "noResults": "Nessun risultato", "peekView.alternateTitle": "Riferimenti", "peekViewTitleBackground": "Colore di sfondo dell'area del titolo della visualizzazione rapida.", - "peekViewTitle": "Colore del titolo della visualizzazione rapida.", - "peekViewTitleInfo": "Colore delle informazioni del titolo della visualizzazione rapida.", + "peekViewTitleForeground": "Colore del titolo della visualizzazione rapida.", + "peekViewTitleInfoForeground": "Colore delle informazioni del titolo della visualizzazione rapida.", "peekViewBorder": "Colore dei bordi e della freccia della visualizzazione rapida.", "peekViewResultsBackground": "Colore di sfondo dell'elenco risultati della visualizzazione rapida.", - "peekViewResultsMatchForeground": "Primo piano per l'immissione di corrispondenze nell'elenco risultati della visualizzazione rapida.", - "peekViewResultsFileForeground": "Primo piano per l'immissione di file nell'elenco risultati della visualizzazione rapida.", + "peekViewResultsMatchForeground": "Colore primo piano dei nodi riga nell'elenco risultati della visualizzazione rapida.", + "peekViewResultsFileForeground": "Colore primo piano dei nodi file nell'elenco risultati della visualizzazione rapida.", "peekViewResultsSelectionBackground": "Colore di sfondo della voce selezionata nell'elenco risultati della visualizzazione rapida.", "peekViewResultsSelectionForeground": "Colore primo piano della voce selezionata nell'elenco risultati della visualizzazione rapida.", "peekViewEditorBackground": "Colore di sfondo dell'editor di visualizzazioni rapide.", + "peekViewEditorGutterBackground": "Colore di sfondo della barra di navigazione nell'editor visualizzazione rapida.", "peekViewResultsMatchHighlight": "Colore dell'evidenziazione delle corrispondenze nell'elenco risultati della visualizzazione rapida.", "peekViewEditorMatchHighlight": "Colore dell'evidenziazione delle corrispondenze nell'editor di visualizzazioni rapide." } \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/rename/browser/rename.i18n.json b/i18n/ita/src/vs/editor/contrib/rename/browser/rename.i18n.json index bdc39890b60e2..c1a735fcca6af 100644 --- a/i18n/ita/src/vs/editor/contrib/rename/browser/rename.i18n.json +++ b/i18n/ita/src/vs/editor/contrib/rename/browser/rename.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "no result": "Nessun risultato.", + "aria": "Correttamente rinominato '{0}' in '{1}'. Sommario: {2}", "rename.failed": "L'esecuzione dell'operazione di ridenominazione non è riuscita.", "rename.label": "Rinomina simbolo" } \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json b/i18n/ita/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json index 53dc4fa9aeebe..a68bd5b22dfb5 100644 --- a/i18n/ita/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json +++ b/i18n/ita/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "arai.alert.snippet": "L'accettazione di '{0}' ha inserito il seguente testo: {1}", "suggest.trigger.label": "Attiva suggerimento" } \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/ita/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 0734b51363fbc..eb519f2c5dd12 100644 --- a/i18n/ita/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/ita/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -4,10 +4,15 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "editorSuggestWidgetBackground": "Colore di sfondo del widget dei suggerimenti.", + "editorSuggestWidgetBorder": "Colore del bordo del widget dei suggerimenti.", + "editorSuggestWidgetForeground": "Colore primo piano del widget dei suggerimenti.", + "editorSuggestWidgetSelectedBackground": "Colore di sfondo della voce selezionata del widget dei suggerimenti.", + "editorSuggestWidgetHighlightForeground": "Colore delle evidenziazioni corrispondenze nel widget dei suggerimenti.", "readMore": "Altre informazioni...{0}", "suggestionWithDetailsAriaLabel": "{0}, suggerimento, con dettagli", "suggestionAriaLabel": "{0}, suggerimento", - "goback": "Indietro", + "readLess": "Meno informazioni... {0}", "suggestWidget.loading": "Caricamento...", "suggestWidget.noSuggestions": "Non ci sono suggerimenti.", "suggestionAriaAccepted": "{0}, accettato", diff --git a/i18n/ita/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/ita/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json index 50520a5626eb7..0a974d1491503 100644 --- a/i18n/ita/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json +++ b/i18n/ita/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -15,5 +15,9 @@ "schema.brackets": "Definisce i simboli di parentesi quadra che aumentano o riducono il rientro.", "schema.autoClosingPairs": "Definisce le coppie di parentesi quadre. Quando viene immessa una parentesi quadra di apertura, quella di chiusura viene inserita automaticamente.", "schema.autoClosingPairs.notIn": "Definisce un elenco di ambiti in cui la corrispondenza automatica delle coppie è disabilitata.", - "schema.surroundingPairs": "Definisce le coppie di parentesi quadre che possono essere usate per racchiudere una stringa selezionata." + "schema.surroundingPairs": "Definisce le coppie di parentesi quadre che possono essere usate per racchiudere una stringa selezionata.", + "schema.wordPattern": "La definizione di parola per il linguaggio.", + "schema.wordPattern.pattern": "Il modello di RegExp utilizzato per trovare parole.", + "schema.wordPattern.flags": "I flag di RegExp utilizzati per trovare parole.", + "schema.wordPattern.flags.errorMessage": "Deve corrispondere al modello `/^([gimuy]+)$/`." } \ No newline at end of file diff --git a/i18n/ita/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/ita/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json index 660d820086846..f595c9809b7b3 100644 --- a/i18n/ita/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json +++ b/i18n/ita/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -21,6 +21,8 @@ "menus.scmTitle": "Menu del titolo del controllo del codice sorgente", "menus.resourceGroupContext": "Menu di scelta rapida del gruppo di risorse del controllo del codice sorgente", "menus.resourceStateContext": "Menu di scelta rapida dello stato delle risorse del controllo del codice sorgente", + "view.viewTitle": "Menu del titolo della visualizzazione contribuita", + "view.itemContext": "Menu di contesto dell'elemento visualizzazione contribuita", "nonempty": "è previsto un valore non vuoto.", "opticon": "la proprietà `icon` può essere omessa o deve essere una stringa o un valore letterale come `{dark, light}`", "requireStringOrObject": "la proprietà `{0}` è obbligatoria e deve essere di tipo `object` o `string`", diff --git a/i18n/ita/src/vs/platform/configuration/common/configurationRegistry.i18n.json b/i18n/ita/src/vs/platform/configuration/common/configurationRegistry.i18n.json index a05bd569c158b..ae29f08053608 100644 --- a/i18n/ita/src/vs/platform/configuration/common/configurationRegistry.i18n.json +++ b/i18n/ita/src/vs/platform/configuration/common/configurationRegistry.i18n.json @@ -7,13 +7,6 @@ "defaultConfigurations.title": "Override configurazione predefinita", "overrideSettings.description": "Consente di configurare le impostazioni dell'editor di cui eseguire l'override per il linguaggio {0}.", "overrideSettings.defaultDescription": "Consente di configurare le impostazioni dell'editor di cui eseguire l'override per un linguaggio.", - "vscode.extension.contributes.configuration": "Impostazioni di configurazione di contributes.", - "vscode.extension.contributes.configuration.title": "Riepilogo delle impostazioni. Questa etichetta verrà usata nel file di impostazioni come commento di separazione.", - "vscode.extension.contributes.configuration.properties": "Descrizione delle proprietà di configurazione.", "config.property.languageDefault": "Non è possibile registrare '{0}'. Corrisponde al criterio di proprietà '\\\\[.*\\\\]$' per la descrizione delle impostazioni dell'editor specifiche del linguaggio. Usare il contributo 'configurationDefaults'.", - "config.property.duplicate": "Non è possibile registrare '{0}'. Questa proprietà è già registrata.", - "invalid.properties": "'configuration.properties' deve essere un oggetto", - "invalid.type": "se impostato, 'configuration.type' deve essere impostato su 'object", - "invalid.title": "'configuration.title' deve essere una stringa", - "vscode.extension.contributes.defaultConfiguration": "Aggiunge come contributo le impostazioni di configurazione predefinite dell'editor in base al linguaggio." + "config.property.duplicate": "Non è possibile registrare '{0}'. Questa proprietà è già registrata." } \ No newline at end of file diff --git a/i18n/ita/src/vs/platform/environment/node/argv.i18n.json b/i18n/ita/src/vs/platform/environment/node/argv.i18n.json index ef50677325d0c..e9a4ecff7e02e 100644 --- a/i18n/ita/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/ita/src/vs/platform/environment/node/argv.i18n.json @@ -20,6 +20,7 @@ "showVersions": "Mostra le versioni delle estensioni installate, quando si usa --list-extension.", "installExtension": "Installa un'estensione.", "uninstallExtension": "Disinstalla un'estensione.", + "experimentalApis": "Abilita funzionalità di API proposte per un'estensione specifica.", "disableExtensions": "Disabilita tutte le estensioni installate.", "disableGPU": "Disabilita l'accelerazione hardware della GPU.", "version": "Visualizza la versione.", diff --git a/i18n/ita/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/ita/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index e23bc5864c452..afe0f0f288088 100644 --- a/i18n/ita/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/ita/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -14,6 +14,12 @@ "vscode.extension.contributes": "Tutti i contributi dell'estensione Visual Studio Code rappresentati da questo pacchetto.", "vscode.extension.preview": "Imposta l'estensione in modo che venga contrassegnata come Anteprima nel Marketplace.", "vscode.extension.activationEvents": "Eventi di attivazione per l'estensione Visual Studio Code.", + "vscode.extension.activationEvents.onLanguage": "Un evento di attivazione emesso ogni volta che viene aperto un file che risolve nella lingua specificata.", + "vscode.extension.activationEvents.onCommand": "Un evento di attivazione emesso ogni volta che viene invocato il comando specificato.", + "vscode.extension.activationEvents.onDebug": "Un evento di attivazione emesso ogni volta che viene iniziata una sessione di debug del tipo specificato.", + "vscode.extension.activationEvents.workspaceContains": "Un evento di attivazione emesso ogni volta che si apre una cartella che contiene almeno un file corrispondente al criterio GLOB specificato.", + "vscode.extension.activationEvents.onView": "Un evento di attivazione emesso ogni volta che la visualizzazione specificata viene espansa.", + "vscode.extension.activationEvents.star": "Un evento di attivazione emesso all'avvio di VS Code. Per garantire la migliore esperienza per l'utente finale, sei pregato di utilizzare questo evento di attivazione nella tua estensione solo quando nessun'altra combinazione di eventi di attivazione funziona nel tuo caso.", "vscode.extension.badges": "Matrice di notifiche da visualizzare nella barra laterale della pagina delle estensioni del Marketplace.", "vscode.extension.badges.url": "URL di immagine della notifica.", "vscode.extension.badges.href": "Collegamento della notifica.", diff --git a/i18n/ita/src/vs/platform/history/electron-main/historyMainService.i18n.json b/i18n/ita/src/vs/platform/history/electron-main/historyMainService.i18n.json new file mode 100644 index 0000000000000..53a0dcd14b375 --- /dev/null +++ b/i18n/ita/src/vs/platform/history/electron-main/historyMainService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "newWindow": "Nuova finestra", + "newWindowDesc": "Apre una nuova finestra", + "recentFolders": "Cartelle recenti", + "folderDesc": "{0} {1}" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/ita/src/vs/platform/markers/common/problemMatcher.i18n.json index a69fc6f95b311..71300a573d0ca 100644 --- a/i18n/ita/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/ita/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -34,7 +34,7 @@ "ProblemMatcherParser.noValidIdentifier": "Errore: la proprietà {0} del criterio non è un nome di variabile criterio valido.", "ProblemMatcherParser.problemPattern.watchingMatcher": "Un matcher problemi deve definire un criterio di inizio e un criterio di fine per il controllo.", "ProblemMatcherParser.invalidRegexp": "Errore: la stringa {0} non è un'espressione regolare valida.\n", - "WatchingPatternSchema.regexp": "Espressione regolare per rilevare l'inizio o la fine di un'attività di controllo.", + "WatchingPatternSchema.regexp": "L'espressione regolare per rilevare l'inizio o la fine di un'attività in background.", "WatchingPatternSchema.file": "Indice del gruppo di corrispondenze del nome file. Può essere omesso.", "PatternTypeSchema.name": "Nome di un criterio predefinito o aggiunto come contributo", "PatternTypeSchema.description": "Criterio di problema o nome di un criterio di problema predefinito o aggiunto come contributo. Può essere omesso se si specifica base.", @@ -43,14 +43,18 @@ "ProblemMatcherSchema.severity": "Gravità predefinita per i problemi di acquisizione. Viene usato se il criterio non definisce un gruppo di corrispondenze per la gravità.", "ProblemMatcherSchema.applyTo": "Controlla se un problema segnalato in un documento di testo è valido solo per i documenti aperti o chiusi oppure per tutti i documenti.", "ProblemMatcherSchema.fileLocation": "Consente di definire come interpretare i nomi file indicati in un criterio di problema.", + "ProblemMatcherSchema.background": "Criteri per tenere traccia dell'inizio e della fine di un matcher attivo su un'attività in background.", + "ProblemMatcherSchema.background.activeOnStart": "Se impostato a true, il monitor in backbround è in modalità attiva quando l'attività inizia. Equivale a inviare una riga che corrisponde al beginPattern", + "ProblemMatcherSchema.background.beginsPattern": "Se corrisponde nell'output, viene segnalato l'avvio di un'attività in background.", + "ProblemMatcherSchema.background.endsPattern": "Se corrisponde nell'output, viene segnalata la fine di un'attività in background.", + "ProblemMatcherSchema.watching.deprecated": "La proprietà watching è deprecata. In alternativa, utilizzare background (sfondo).", + "ProblemMatcherSchema.watching": "Criteri per tenere traccia dell'inizio e della fine di un matcher watching.", "ProblemMatcherSchema.watching.activeOnStart": "Se impostato su true, indica che il watcher è in modalità attiva all'avvio dell'attività. Equivale a inviare una riga che corrisponde al criterio di avvio", "ProblemMatcherSchema.watching.beginsPattern": "Se corrisponde nell'output, viene segnalato l'avvio di un'attività di controllo.", "ProblemMatcherSchema.watching.endsPattern": "Se corrisponde nell'output, viene segnalata la fine di un'attività di controllo.", - "ProblemMatcherSchema.watching": "Criteri per tenere traccia dell'inizio e della fine di un criterio di controllo.", "LegacyProblemMatcherSchema.watchedBegin.deprecated": "Questa proprietà è deprecata. In alternativa, usare la proprietà watching.", "LegacyProblemMatcherSchema.watchedBegin": "Espressione regolare con cui viene segnalato l'avvio dell'esecuzione di un'attività controllata attivato tramite il controllo dei file.", "LegacyProblemMatcherSchema.watchedEnd.deprecated": "Questa proprietà è deprecata. In alternativa, usare la proprietà watching.", "LegacyProblemMatcherSchema.watchedEnd": "Espressione regolare con cui viene segnalato il termine dell'esecuzione di un'attività controllata.", - "NamedProblemMatcherSchema.name": "Nome del matcher problemi.", "ProblemMatcherExtPoint": "Aggiunge come contributo i matcher problemi" } \ No newline at end of file diff --git a/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json index 54402b87f21e2..953c680e8e389 100644 --- a/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -4,29 +4,84 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.color": "Formato colore non valido. Usare #RRGGBB o #RRGGBBAA", + "invalid.color": "Formato colore non valido. Usare #RGB, #RGBA, #RRGGBB o #RRGGBBAA", "schema.colors": "Colori usati nell'area di lavoro.", "foreground": "Colore primo piano. Questo colore è utilizzato solo se non viene sovrascritto da un componente.", - "focusedElementOutline": "Colore generale del bordo/contorno per elementi con lo stato attivo. Questo colore viene usato solo se non è sostituito da quello di un componente.", - "highContrastBorder": "Colore del bordo di separazione dei componenti quando è abilitato un tema a contrasto elevato.", - "highContrastOutline": "Colore del contorno dei componenti attivi quando è abilitato un tema a contrasto elevato.", + "errorForeground": "Colore primo piano globale per i messaggi di errore. Questo colore è utilizzato solamente se non viene sottoposto a override da un componente.", + "descriptionForeground": "Colore primo piano del testo che fornisce informazioni aggiuntive, ad esempio per un'etichetta di testo.", + "focusBorder": "Colore dei bordi degli elementi evidenziati. Questo colore è utilizzato solo se non viene sovrascritto da un componente.", + "contrastBorder": "Un bordo supplementare attorno agli elementi per contrastarli maggiormente rispetto agli altri.", + "activeContrastBorder": "Un bordo supplementare intorno agli elementi attivi per contrastarli maggiormente rispetto agli altri.", + "selectionBackground": "Il colore di sfondo delle selezioni di testo nel workbench (ad esempio per i campi di input o aree di testo). Si noti che questo non si applica alle selezioni all'interno dell'editor.", + "textSeparatorForeground": "Colore dei separatori di testo.", + "textLinkForeground": "Colore primo piano dei link nel testo.", + "textLinkActiveForeground": "Colore primo piano dei link attivi nel testo.", + "textPreformatForeground": "Colore primo piano dei segmenti di testo preformattato.", + "textBlockQuoteBackground": "Colore di sfondo per le citazioni nel testo.", + "textBlockQuoteBorder": "Colore bordo per citazioni nel testo.", + "textCodeBlockBackground": "Colore sfondo per blocchi di codice nel testo.", + "widgetShadow": "Colore ombreggiatura dei widget, ad es. Trova/Sostituisci all'interno dell'editor.", "inputBoxBackground": "Sfondo della casella di input.", "inputBoxForeground": "Primo piano della casella di input.", "inputBoxBorder": "Bordo della casella di input.", "inputBoxActiveOptionBorder": "Colore del bordo di opzioni attivate nei campi di input.", + "inputPlaceholderForeground": "Colore primo piano di casella di input per il testo segnaposto.", + "inputValidationInfoBackground": "Colore di sfondo di convalida dell'input di tipo Informazione.", + "inputValidationInfoBorder": "Colore bordo di convalida dell'input di tipo Informazione.", + "inputValidationWarningBackground": "Colore di sfondo di convalida dell'input di tipo Avviso.", + "inputValidationWarningBorder": "Colore bordo di convalida dell'input di tipo Avviso.", + "inputValidationErrorBackground": "Colore di sfondo di convalida dell'input di tipo Errore.", + "inputValidationErrorBorder": "Colore bordo di convalida dell'input di tipo Errore.", "dropdownBackground": "Sfondo dell'elenco a discesa.", "dropdownForeground": "Primo piano dell'elenco a discesa.", "dropdownBorder": "Bordo dell'elenco a discesa.", + "listFocusBackground": "Colore sfondo Elenco/Struttura ad albero per l'elemento evidenziato quando l'Elenco/Struttura ad albero è attivo. Un Elenco/Struttura ad albero attivo\nha il focus della tastiera, uno inattivo no.", + "listFocusForeground": "Colore primo piano Elenco/Struttura ad albero per l'elemento con stato attivo quando l'Elenco/Struttura ad albero è attivo. Un Elenco/Struttura ad albero attivo\nha il focus della tastiera, uno inattivo no.", + "listActiveSelectionBackground": "Colore sfondo Elenco/Struttura ad albero per l'elemento selezionato quando l'Elenco/Struttura ad albero è attivo. Un Elenco/Struttura ad albero attivo\nha il focus della tastiera, uno inattivo no.", + "listActiveSelectionForeground": "Colore primo piano Elenco/Struttura ad albero per l'elemento selezionato quando l'Elenco/Struttura ad albero è attivo. Un Elenco/Struttura ad albero attivo\nha il focus della tastiera, uno inattivo no.", + "listInactiveSelectionBackground": "Colore sfondo Elenco/Struttura ad albero per l'elemento selezionato quando l'Elenco/Struttura ad albero è inattivo. Un Elenco/Struttura ad albero attivo\nha il focus della tastiera, uno inattivo no.", + "listInactiveSelectionForeground": "Colore primo piano Elenco/Struttura ad albero per l'elemento selezionato quando l'Elenco/Struttura ad albero è inattivo. Un Elenco/Struttura ad albero attivo\nha il focus della tastiera, uno inattivo no.", + "listHoverBackground": "Sfondo Elenco/Struttura ad albero al passaggio del mouse sugli elementi.", + "listHoverForeground": "Primo piano Elenco/Struttura ad albero al passaggio del mouse sugli elementi.", + "listDropBackground": "Sfondo Elenco/Struttura ad albero durante il trascinamento degli elementi selezionati.", + "highlight": "Colore primo piano Elenco/Struttura ad albero delle occorrenze trovate durante la ricerca nell'Elenco/Struttura ad albero.", + "pickerGroupForeground": "Colore di selezione rapida per il raggruppamento delle etichette.", + "pickerGroupBorder": "Colore di selezione rapida per il raggruppamento dei bordi.", + "buttonForeground": "Colore primo piano del pulsante.", + "buttonBackground": "Colore di sfondo del pulsante.", + "buttonHoverBackground": "Colore di sfondo del pulsante al passaggio del mouse.", + "badgeBackground": "Colore di sfondo del badge. I badge sono piccole etichette informative, ad esempio per mostrare il conteggio dei risultati di una ricerca.", + "badgeForeground": "Colore primo piano del badge. I badge sono piccole etichette informative, ad esempio per mostrare il conteggio dei risultati di una ricerca.", + "scrollbarShadow": "Ombra di ScrollBar per indicare lo scorrimento della visualizzazione.", + "scrollbarSliderBackground": "Colore di sfondo dello Slider.", + "scrollbarSliderHoverBackground": "Colore di sfondo dello Slider al passaggio del mouse", + "scrollbarSliderActiveBackground": "Colore di sfondo dello Slider quando attivo.", + "progressBarBackground": "Colore di sfondo dell'indicatore di stato che può essere mostrato durante l'esecuzione di operazioni lunghe.", "editorBackground": "Colore di sfondo dell'editor.", "editorForeground": "Colore primo piano predefinito dell'editor.", - "editorSelection": "Colore della selezione dell'editor.", + "editorWidgetBackground": "Colore di sfondo dei widget dell'editor, ad esempio Trova/Sostituisci.", + "editorWidgetBorder": "Colore bordo dei widget dell'editor. Il colore viene utilizzato solo se il widget sceglie di avere un bordo e se il colore non è sottoposto a override da un widget.", "editorInactiveSelection": "Colore della selezione in un editor inattivo.", "editorSelectionHighlight": "Colore delle aree con lo stesso contenuto della selezione.", "editorFindMatch": "Colore della corrispondenza di ricerca corrente.", "findMatchHighlight": "Colore delle altre corrispondenze di ricerca.", "findRangeHighlight": "Colore dell'intervallo di ricerca.", + "hoverHighlight": "Evidenziazione sotto la parola per cui è visualizzata un'area sensibile al passaggio del mouse.", + "hoverBackground": "Colore di sfondo dell'area sensibile al passaggio del mouse dell'editor.", + "hoverBorder": "Colore del bordo dell'area sensibile al passaggio del mouse dell'editor.", "activeLinkForeground": "Colore dei collegamenti attivi.", - "linkForeground": "Colore dei collegamenti.", - "editorWidgetBackground": "Colore di sfondo dei widget dell'editor, ad esempio Trova/Sostituisci.", - "editorWidgetShadow": "Colore ombreggiatura dei widget dell'editor, come Trova/Sostituisci." + "diffEditorInserted": "Colore di sfondo del testo che è stato inserito.", + "diffEditorRemoved": "Colore di sfondo del testo che è stato rimosso.", + "diffEditorInsertedOutline": "Colore del contorno del testo che è stato inserito.", + "diffEditorRemovedOutline": "Colore del contorno del testo che è stato rimosso.", + "mergeCurrentHeaderBackground": "Sfondo intestazione corrente in conflitti di merge in linea.", + "mergeCurrentContentBackground": "Sfondo contenuto corrente in conflitti di merge in linea.", + "mergeIncomingHeaderBackground": "Sfondo intestazione modifica in ingresso in conflitti di merge in linea.", + "mergeIncomingContentBackground": "Sfondo contenuto modifica in ingresso in conflitti di merge in linea.", + "mergeCommonHeaderBackground": "Sfondo dell'intestazione dell'antenato comune nei conflitti di merge in linea.", + "mergeCommonContentBackground": "Sfondo del contenuto dell'antenato comune nei conflitti di merge in linea.", + "mergeBorder": "Colore bordo su intestazioni e sulla barra di divisione di conflitti di merge in linea.", + "overviewRulerCurrentContentForeground": "Colore primo piano righello panoramica attuale per i conflitti di merge in linea.", + "overviewRulerIncomingContentForeground": "Colore primo piano del righello panoramica modifiche in arrivo per i conflitti di merge in linea.", + "overviewRulerCommonContentForeground": "Colore primo piano righello panoramica dell'antenato comune per i conflitti di merge in linea." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/ita/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json new file mode 100644 index 0000000000000..606de953f3a29 --- /dev/null +++ b/i18n/ita/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "overwritingExtension": "Sovrascrittura dell'estensione {0} con {1}.", + "extensionUnderDevelopment": "Caricamento dell'estensione di sviluppo in {0}" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/ita/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json new file mode 100644 index 0000000000000..e2fbc59847fb8 --- /dev/null +++ b/i18n/ita/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "Chiudi", + "cancel": "Annulla", + "ok": "OK" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/api/node/extHostExplorerView.i18n.json b/i18n/ita/src/vs/workbench/api/node/extHostExplorerView.i18n.json new file mode 100644 index 0000000000000..8905123ff84d9 --- /dev/null +++ b/i18n/ita/src/vs/workbench/api/node/extHostExplorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "Non è stato registrato alcun elemento TreeExplorerNodeProvider con ID '{0}'.", + "treeExplorer.failedToProvideRootNode": "Con l'elemento TreeExplorerNodeProvider '{0}' non è stato possibile fornire il nodo radice." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/ita/src/vs/workbench/api/node/extHostTask.i18n.json new file mode 100644 index 0000000000000..4b90a12aaf247 --- /dev/null +++ b/i18n/ita/src/vs/workbench/api/node/extHostTask.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "task.label": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/api/node/extHostTreeView.i18n.json b/i18n/ita/src/vs/workbench/api/node/extHostTreeView.i18n.json new file mode 100644 index 0000000000000..8905123ff84d9 --- /dev/null +++ b/i18n/ita/src/vs/workbench/api/node/extHostTreeView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "Non è stato registrato alcun elemento TreeExplorerNodeProvider con ID '{0}'.", + "treeExplorer.failedToProvideRootNode": "Con l'elemento TreeExplorerNodeProvider '{0}' non è stato possibile fornire il nodo radice." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/ita/src/vs/workbench/api/node/extHostTreeViews.i18n.json new file mode 100644 index 0000000000000..04c4b11db8ce8 --- /dev/null +++ b/i18n/ita/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeView.notRegistered": "Nessuna visualizzazione di struttura ad albero con ID '{0}' registrata.", + "treeItem.notFound": "Nessun elemento di struttura ad albero con id '{0}' trovato.", + "treeView.duplicateElement": "L'elemento {0} è già registrato" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json b/i18n/ita/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json index 16c143386a8ea..d8cbee32bd515 100644 --- a/i18n/ita/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json +++ b/i18n/ita/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "hideActivitBar": "Nascondi barra attività", - "activityBarAriaLabel": "Cambio visualizzazione attiva" + "activityBarAriaLabel": "Cambio visualizzazione attiva", + "globalActions": "Azioni globali" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/ita/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index 5bfe3f067f450..7f7ba33c59baa 100644 --- a/i18n/ita/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/ita/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -44,6 +44,8 @@ "openPreviousRecentlyUsedEditorInGroup": "Apri editor precedente usato di recente nel gruppo", "openNextRecentlyUsedEditorInGroup": "Apri editor successivo usato di recente nel gruppo", "navigateEditorHistoryByInput": "Apri editor precedente dalla cronologia", + "openNextRecentlyUsedEditor": "Apri editor successivo usato di recente", + "openPreviousRecentlyUsedEditor": "Apri editor precedente usato di recente", "clearEditorHistory": "Cancella cronologia degli editor", "focusLastEditorInStack": "Apri ultimo editor del gruppo", "moveEditorLeft": "Sposta editor a sinistra", diff --git a/i18n/ita/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/ita/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index 67fd42257c13d..844b3b480601e 100644 --- a/i18n/ita/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/ita/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -10,7 +10,7 @@ "multiSelection": "{0} selezioni", "endOfLineLineFeed": "LF", "endOfLineCarriageReturnLineFeed": "CRLF", - "tabFocusModeEnabled": "Premere TAB per spostare lo stato attivo", + "screenReaderDetectedExtra": "Se non si utilizza un'utilità per la lettura dello schermo, si prega di impostare 'editor.accessibilitySupport' a \"off\".", "disableTabMode": "Disabilita modalità accessibilità", "gotoLine": "Vai alla riga", "indentation": "Rientro", diff --git a/i18n/ita/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json b/i18n/ita/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json new file mode 100644 index 0000000000000..6a397dbe56c52 --- /dev/null +++ b/i18n/ita/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpen": "Vai al file...", + "quickNavigateNext": "Passa a successiva in Quick Open", + "quickNavigatePrevious": "Passa a precedente in Quick Open", + "quickSelectNext": "Seleziona successiva in Quick Open", + "quickSelectPrevious": "Seleziona precedente in Quick Open" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/browser/quickopen.i18n.json b/i18n/ita/src/vs/workbench/browser/quickopen.i18n.json index 5bd60920cf465..4419620dddd1d 100644 --- a/i18n/ita/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/ita/src/vs/workbench/browser/quickopen.i18n.json @@ -6,6 +6,5 @@ { "noResultsMatching": "Non ci sono risultati corrispondenti", "noResultsFound2": "Non sono stati trovati risultati", - "entryAriaLabel": "{0}, comando", - "noCommands": "Non ci sono comandi corrispondenti" + "entryAriaLabel": "{0}, comando" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/browser/viewlet.i18n.json b/i18n/ita/src/vs/workbench/browser/viewlet.i18n.json index 318000e271811..7ffc4d29a97a2 100644 --- a/i18n/ita/src/vs/workbench/browser/viewlet.i18n.json +++ b/i18n/ita/src/vs/workbench/browser/viewlet.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "collapse": "Comprimi tutto", - "viewToolbarAriaLabel": "Azioni di {0}" + "collapse": "Comprimi tutto" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/common/theme.i18n.json b/i18n/ita/src/vs/workbench/common/theme.i18n.json index 3c4916242c07b..bdefeb9c23695 100644 --- a/i18n/ita/src/vs/workbench/common/theme.i18n.json +++ b/i18n/ita/src/vs/workbench/common/theme.i18n.json @@ -4,39 +4,49 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "tabsContainerBackground": "Colore di sfondo del contenitore delle scehde. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", - "activeTabBackground": "Colore di sfondo delle schede attive. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", - "inactiveTabBackground": "Colore di sfondo delle schede inattive. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", - "activeTabActiveGroupForeground": "Colore di primo piano delle schede attive in un gruppo attivo. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", - "activeTabInactiveGroupForeground": "Colore di primo piano delle schede attive in un gruppo inattivo. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", - "inactiveTabActiveGroupForeground": "Colore di primo piano delle schede inattive in un gruppo attivo. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", - "inactiveTabInactiveGroupForeground": "Colore di primo piano delle schede inattiva in un gruppo inattivo. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", + "tabActiveBackground": "Colore di sfondo delle schede attive. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", + "tabInactiveBackground": "Colore di sfondo delle schede inattive. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", "tabBorder": "Bordo per separare le schede l'una dall'altra. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", - "editorHeaderBackground": "Colore di sfondo dell'intestazione del titolo dell'editor quando non ci sono schede abilitate.", + "tabActiveForeground": "Colore di primo piano delle schede attive in un gruppo attivo. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", + "tabInactiveForeground": "Colore di primo piano delle schede inattive in un gruppo attivo. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", + "tabUnfocusedActiveForeground": "Colore di primo piano delle schede attive in un gruppo inattivo. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", + "tabUnfocusedInactiveForeground": "Colore di primo piano delle schede inattiva in un gruppo inattivo. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", + "editorGroupBackground": "Colore di sfondo di un gruppo di editor. I gruppi di editor sono contenitori di editor. Il colore di sfondo viene visualizzato quando si trascinano i gruppi di editor in un'altra posizione.", + "tabsContainerBackground": "Colore di sfondo dell'intestazione del titolo di gruppo di editor, quando le schede sono abilitate. I gruppi di editor sono i contenitori degli editor.", + "tabsContainerBorder": "Colore del bordo dell'intestazione del titolo di gruppo di editor, quando le schede sono abilitate. I gruppi di editor sono i contenitori degli editor.", + "editorGroupHeaderBackground": "Colore di sfondo dell'intestazione del titolo dell'editor quando le schede sono disabilitate. I gruppi di editor sono contenitori di editor.", "editorGroupBorder": "Colore per separare più gruppi di editor l'uno dall'altro. I gruppi di editor sono i contenitori degli editor.", - "editorGroupBackground": "Colore di sfondo di un gruppo di editor. I gruppi di editor sono contenitori di editor.", - "editorDragAndDropBackground": "Colore di sfondo durante lo spostamento degli editor.", - "editorSideBySideBorder": "Colore del bordo per separare i dettagli dal lato master negli editor fianco a fianco.", + "editorDragAndDropBackground": "Colore di sfondo quando si trascinano gli editor. Il colore dovrebbe avere una trasparenza impostata in modo che il contenuto dell'editor sia ancora visibile.", "panelBackground": "Colore di sfondo dei pannelli. I pannelli sono visualizzati sotto l'area degli editor e contengono visualizzazioni quali quella di output e del terminale integrato.", - "panelTopBorder": "Colore del bordo dei pannelli nella parte superiore di separazione dall'editor. I pannelli sono visualizzati sotto l'area degli editor e contengono visualizzazioni quali quella di output e del terminale integrato.", + "panelBorder": "Colore del bordo dei pannelli nella parte superiore di separazione dall'editor. I pannelli sono visualizzati sotto l'area degli editor e contengono visualizzazioni quali quella di output e del terminale integrato.", "panelActiveTitleForeground": "Colore del titolo del pannello attivo. I pannelli sono visualizzati sotto l'area degli editor e contengono visualizzazioni quali quella di output e quella del terminale integrato.", "panelInactiveTitleForeground": "Colore del titolo del pannello inattivo. I pannelli sono visualizzati sotto l'area degli editor e contengono visualizzazioni quali quella di output e quella del terminale integrato.", "panelActiveTitleBorder": "Colore del bordo del titolo del pannello attivo. I pannelli sono visualizzati sotto l'area degli editor e contengono visualizzazioni quali quella di output e del terminale integrato.", "statusBarForeground": "Colore primo piano della barra di stato. La barra di stato è visualizzata nella parte inferiore della finestra.", "statusBarBackground": "Colore di sfondo della barra di stato standard. La barra di stato è visualizzata nella parte inferiore della finestra.", + "statusBarBorder": "Colore del bordo della barra di stato che la separa dalla sidebar e dall'editor. La barra di stato è visualizzata nella parte inferiore della finestra.", "statusBarNoFolderBackground": "Colore di sfondo della barra di stato quando non ci sono cartelle aperte. La barra di stato è visualizzata nella parte inferiore della finestra.", + "statusBarNoFolderForeground": "Colore primo piano quando non ci sono cartelle aperte. La barra di stato è visualizzata nella parte inferiore della finestra.", "statusBarItemActiveBackground": "Colore di sfondo degli elementi della barra di stato quando si fa clic. La barra di stato è visualizzata nella parte inferiore della finestra.", "statusBarItemHoverBackground": "Colore di sfondo degli elementi della barra di stato al passaggio del mouse. La barra di stato è visualizzata nella parte inferiore della finestra.", - "statusBarInfoItemBackground": "Colore di sfondo degli elementi di informazioni della barra di stato. La barra di stato è visualizzata nella parte inferiore della finestra.", - "statusBarInfoItemHoverBackground": "Colore di sfondo degli elementi di informazioni della barra di stato al passaggio del mouse. La barra di stato è visualizzata nella parte inferiore della finestra.", + "statusBarProminentItemBackground": "Colore di sfondo degli elementi rilevanti della barra di stato. Gli elementi rilevanti spiccano rispetto ad altre voci della barra di stato. La barra di stato è visualizzata nella parte inferiore della finestra.", + "statusBarProminentItemHoverBackground": "Colore di sfondo degli elementi rilevanti della barra di stato al passaggio del mouse. Gli elementi rilevanti spiccano rispetto ad altre voci della barra di stato. La barra di stato è visualizzata nella parte inferiore della finestra.", "activityBarBackground": "Colore di sfondo della barra attività. La barra attività viene visualizzata nella parte inferiore sinistra/destra e consente il passaggio tra diverse visualizzazioni della barra laterale", - "activityBarDragAndDropBackground": "Colore feedback drag and drop degli elementi della barra attività. La barra attività viene visualizzata nella parte inferiore sinistra/destra e consente il passaggio tra diverse visualizzazioni della barra laterale", - "activityBadgeBackground": "Colore di sfondo della notifica attività utente visuale. La barra attività viene visualizzata nella parte inferiore sinistra/destra e consente il passaggio tra diverse visualizzazioni della barra laterale", - "activityBadgeForeground": "Colore primo piano della notifica attività utente visuale. La barra attività viene visualizzata nella parte inferiore sinistra/destra e consente il passaggio tra diverse visualizzazioni della barra laterale", + "activityBarForeground": "Colore primo piano della barra attività (ad es. quello utilizzato per le icone). La barra attività viene mostrata all'estrema sinistra o destra e permette di alternare le visualizzazioni della barra laterale.", + "activityBarBorder": "Colore del bordo della barra attività che la separa dalla barra laterale. La barra di attività viene mostrata all'estrema sinistra o destra e permette di alternare le visualizzazioni della barra laterale.", + "activityBarDragAndDropBackground": "Colore feedback drag and drop per gli elementi della barra di attività. Il colore dovrebbe avere una trasparenza impostata in modo che le voci della barra di attività possano ancora essere visibili. La barra di attività viene mostrata all'estrema sinistra o destra e permette di alternare le visualizzazioni della barra laterale.", + "activityBarBadgeBackground": "Colore di sfondo della notifica utente dell'attività. La barra attività viene visualizzata all'estrema sinistra o all'estrema destra e consente di spostarsi tra le visualizzazioni della barra laterale.", + "activityBarBadgeForeground": "Colore primo piano della notifica utente dell'attività. La barra attività viene visualizzata all'estrema sinistra o all'estrema destra e consente di spostarsi tra le visualizzazioni della barra laterale.", "sideBarBackground": "Colore di sfondo della barra laterale. La barra laterale è il contenitore per visualizzazioni come Explorer e ricerca.", + "sideBarForeground": "Colore primo piano della barra laterale. La barra laterale è il contenitore per le visualizzazioni come Esplora risorse e Cerca.", + "sideBarBorder": "Colore del bordo della barra laterale che la separa all'editor. La barra laterale è il contenitore per visualizzazioni come Esplora risorse e Cerca.", "sideBarTitleForeground": "Colore primo piano del titolo della barra laterale. La barra laterale è il contenitore per visualizzazioni come Explorer e ricerca.", + "sideBarSectionHeaderBackground": "Colore di sfondo dell'intestazione di sezione della barra laterale. La barra laterale è il contenitore di visualizzazioni quali Esplora risorse e Cerca.", + "sideBarSectionHeaderForeground": "Colore primo piano dell'intestazione di sezione della barra laterale. La barra laterale è il contenitore di visualizzazioni come Esplora risorse e Cerca.", "titleBarActiveForeground": "Colore primo piano della barra del titolo quando la finestra è attiva. Si noti che questo colore è attualmente supportato solo su macOS.", "titleBarInactiveForeground": "Colore primo piano della barra del titolo quando la finestra è inattiva. Si noti che questo colore è attualmente supportato solo su macOS.", "titleBarActiveBackground": "Colore di sfondo della barra di titolo quando la finestra è attiva. Si noti che questo colore è attualmente solo supportati su macOS.", - "titleBarInactiveBackground": "Colore di sfondo della barra del titolo quando la finestra è inattiva. Si noti che questo colore è attualmente supportato solo su macOS." + "titleBarInactiveBackground": "Colore di sfondo della barra del titolo quando la finestra è inattiva. Si noti che questo colore è attualmente supportato solo su macOS.", + "notificationsForeground": "Colore primo piano delle notifiche. Le notifiche scorrono dalla parte superiore della finestra.", + "notificationsBackground": "Colore di sfondo delle notifiche. Le notifiche scorrono dalla parte superiore della finestra." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/ita/src/vs/workbench/electron-browser/actions.i18n.json index c1c0558b02c8a..d9d488bcccd33 100644 --- a/i18n/ita/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/ita/src/vs/workbench/electron-browser/actions.i18n.json @@ -6,9 +6,6 @@ { "closeActiveEditor": "Chiudi editor", "closeWindow": "Chiudi finestra", - "switchWindow": "Cambia finestra", - "switchWindowPlaceHolder": "Selezionare una finestra", - "current": "Finestra corrente", "closeFolder": "Chiudi cartella", "noFolderOpened": "In questa istanza non ci sono attualmente cartelle aperte da chiudere.", "newWindow": "Nuova finestra", @@ -20,7 +17,7 @@ "zoomReset": "Reimposta zoom", "appPerf": "Prestazioni all'avvio", "reloadWindow": "Ricarica finestra", - "openRecent": "Apri recenti", + "current": "Finestra corrente", "folders": "cartelle", "files": "file", "openRecentPlaceHolderMac": "Selezionare un percorso (tenere premuto CMD per aprirlo in una nuova finestra)", @@ -32,10 +29,6 @@ "openDocumentationUrl": "Documentazione", "openIntroductoryVideosUrl": "Video introduttivi", "toggleSharedProcess": "Attiva/Disattiva processo condiviso", - "navigateLeft": "Passa alla visualizzazione a sinistra", - "navigateRight": "Passa alla visualizzazione a destra", - "navigateUp": "Passa alla visualizzazione in alto", - "navigateDown": "Passa alla visualizzazione in basso", "increaseViewSize": "Aumenta la dimensione della visualizzazione corrente", "decreaseViewSize": "Diminuisce la dimensione della visualizzazione corrente" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json index 3fbffa2daf14a..89a620c873e99 100644 --- a/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,6 +7,7 @@ "view": "Visualizza", "help": "Guida", "file": "File", + "developer": "Sviluppatore", "showEditorTabs": "Controlla se visualizzare o meno gli editor aperti in schede.", "editorTabCloseButton": "Controlla la posizione dei pulsanti di chiusura delle schede dell'editor oppure li disabilita quando è impostata su 'off'.", "showIcons": "Controlla se visualizzare o meno un'icona per gli editor aperti. Richiede l'abilitazione anche di un tema dell'icona.", @@ -20,6 +21,7 @@ "statusBarVisibility": "Controlla la visibilità della barra di stato nella parte inferiore del workbench.", "activityBarVisibility": "Controlla la visibilità della barra attività nel workbench.", "closeOnFileDelete": "Controlla se gli editor che visualizzano un file devono chiudersi automaticamente quando il file viene eliminato o rinominato da un altro processo. Se si disabilita questa opzione, in una simile circostanza l'editor verrà aperto e i file risulteranno modificati ma non salvati. Nota: se si elimina il file dall'interno dell'applicazione, l'editor verrà sempre chiuso e i file modificati ma non salvati non verranno mai chiusi allo scopo di salvaguardare i dati.", + "swipeToNavigate": "Scorrere orizzontalmente con tre dita per spostarsi tra i file aperti.", "workbenchConfigurationTitle": "Area di lavoro", "window.openFilesInNewWindow.on": "I file verranno aperti in una nuova finestra", "window.openFilesInNewWindow.off": "I file verranno aperti nella finestra con la cartella dei file aperta o nell'ultima finestra attiva", @@ -29,23 +31,19 @@ "window.openFoldersInNewWindow.off": "Le cartelle sostituiranno l'ultima finestra attiva", "window.openFoldersInNewWindow.default": "Le cartelle verranno aperte in una nuova finestra a meno che non si selezioni una cartella dall'interno dell'applicazione, ad esempio tramite il menu File", "openFoldersInNewWindow": "Controlla se le cartelle devono essere aperte in una nuova finestra o sostituire l'ultima finestra attiva.\n- default: le cartelle verranno aperte in una nuova finestra a meno che non si selezioni una cartella dall'interno dell'applicazione, ad esempio tramite il menu File\n- on: le cartelle verranno aperte in una nuova finestra\n- off: le cartelle sostituiranno l'ultima finestra attiva\nNota: possono comunque verificarsi casi in cui questa impostazione viene ignorata, ad esempio quando si usa l'opzione della riga di comando -new-window o -reuse-window.", - "window.reopenFolders.none": "Non apre nessuna cartella.", - "window.reopenFolders.one": "Riapre l'ultima cartella attiva.", - "window.reopenFolders.all": "Riapre tutte le cartelle dell'ultima sessione.", - "reopenFolders": "Controlla la modalità di riapertura delle cartelle dopo un riavvio. Selezionare 'none' per non riaprire mai una cartella, 'one' per riaprire l'ultima cartella usata oppure 'all' per riaprire tutte le cartelle dell'ultima sessione.", "restoreFullscreen": "Controlla se una finestra deve essere ripristinata a schermo intero se è stata chiusa in questa modalità.", "zoomLevel": "Consente di modificare il livello di zoom della finestra. Il valore originale è 0 e ogni incremento superiore (ad esempio 1) o inferiore (ad esempio -1) rappresenta un aumento o una diminuzione del 20% della percentuale di zoom. È anche possibile immettere valori decimali per modificare il livello di zoom con maggiore granularità.", - "title": "Controlla il titolo della finestra in base all'editor attivo. Le variabili vengono sostituite a seconda del contesto:\n${activeEditorShort}: ad esempio myFile.txt\n${activeEditorMedium}: ad esempio myFolder/myFile.txt\n${activeEditorLong}: ad esempio /Users/Development/myProject/myFolder/myFile.txt\n${rootName}: ad esempio myProject\n${rootPath}: ad esempio /Users/Development/myProject\n${appName}: ad esempio VS Code\n${dirty}: un indicatore dirty se l'editor attivo è dirty\n${separator}: un separatore condizionale (\" - \") visualizzato solo se circondato da variabili con valori", "window.newWindowDimensions.default": "Apre nuove finestre al centro della schermata.", "window.newWindowDimensions.inherit": "Apre nuove finestre le cui dimensioni sono uguali a quelle dell'ultima finestra attiva.", "window.newWindowDimensions.maximized": "Apre nuove finestre ingrandite a schermo intero.", "window.newWindowDimensions.fullscreen": "Apre nuove finestre nella modalità a schermo intero.", - "newWindowDimensions": "Controlla le dimensioni relative all'apertura di una nuova finestra. Per impostazione predefinita, una nuova finestra di dimensioni ridotte viene aperta al centro della schermata. Se è impostata su 'inherit', la finestra assumerà le stesse dimensioni dell'ultima finestra attiva. Se è impostata su 'maximized', la finestra aperta risulterà ingrandita, mentre con 'fullscreen' verrà visualizzata a schermo intero.", + "newWindowDimensions": "Controlla le dimensioni relative all'apertura di una nuova finestra quando almeno un'altra finestra è già aperta. Per impostazione predefinita, una nuova finestra di dimensioni ridotte viene aperta al centro della schermata. Se è impostata su 'inherit', la finestra assumerà le stesse dimensioni dell'ultima finestra attiva. Se è impostata su 'maximized', la finestra aperta risulterà ingrandita, mentre con 'fullscreen' verrà visualizzata a schermo intero. Sia noti che questa impostazione non impatta sulla prima finestra che era stata aperta. La prima finestra si riaprirà sempre con la dimensione e la posizione che aveva prima della chiusura.", "window.menuBarVisibility.default": "Il menu è nascosto solo nella modalità a schermo intero.", "window.menuBarVisibility.visible": "Il menu è sempre visibile, anche nella modalità a schermo intero.", "window.menuBarVisibility.toggle": "Il menu è nascosto ma può essere visualizzato premendo ALT.", "window.menuBarVisibility.hidden": "Il menu è sempre nascosto.", "menuBarVisibility": "Controlla la visibilità della barra dei menu. L'impostazione 'toggle' indica che la barra dei menu è nascosta e che per visualizzarla è necessario premere una sola volta il tasto ALT. Per impostazione predefinita, la barra dei menu è visibile a meno che la finestra non sia a schermo intero.", + "enableMenuBarMnemonics": "Se abilitato, i menu principali possono essere aperti tramite tasti di scelta rapida Alt + tasto. Disattivare i tasti di scelta permette invece di associare questi tasti di scelta rapida Alt + tasto ai comandi dell'editor.", "autoDetectHighContrast": "Se è abilitata, passa automaticamente a un tema a contrasto elevato se Windows usa un tema di questo tipo e al tipo scuro quando non si usa più un tema a contrasto elevato Windows.", "titleBarStyle": "Consente di modificare l'aspetto della barra del titolo della finestra. Per applicare le modifiche, è necessario un riavvio completo.", "window.nativeTabs": "Abilita le finestre di tab per macOS Sierra. La modifica richiede un riavvio. Eventuali personalizzazioni della barra del titolo verranno disabilitate", @@ -55,5 +53,7 @@ "zenMode.hideTabs": "Controlla se attivando la modalità Zen vengono nascoste anche le schede del workbench.", "zenMode.hideStatusBar": "Controlla se attivando la modalità Zen viene nascosta anche la barra di stato nella parte inferiore del workbench.", "zenMode.hideActivityBar": "Controlla se attivando la modalità Zen viene nascosta anche la barra di stato alla sinistra del workbench", - "zenMode.restore": "Controlla se una finestra deve essere ripristinata nella modalità Zen se è stata chiusa in questa modalità." + "zenMode.restore": "Controlla se una finestra deve essere ripristinata nella modalità Zen se è stata chiusa in questa modalità.", + "workspaceConfigurationTitle": "Area di lavoro", + "files.exclude.boolean": "Criterio GLOB da usare per trovare percorsi file. Impostare su True o False per abilitare o disabilitare il criterio." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/electron-browser/shell.i18n.json b/i18n/ita/src/vs/workbench/electron-browser/shell.i18n.json index c0bbd0ba75e11..efda81182a137 100644 --- a/i18n/ita/src/vs/workbench/electron-browser/shell.i18n.json +++ b/i18n/ita/src/vs/workbench/electron-browser/shell.i18n.json @@ -4,9 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "runningAsRoot": "È consigliabile non eseguire il codice come 'radice'.", - "prof.message": "I profili sono stati creati.", - "prof.detail": "Creare un problema e allegare manualmente i file seguenti:\n{0}", - "prof.restartAndFileIssue": "Crea problema e riavvia", - "prof.restart": "Riavvia" + "runningAsRoot": "È consigliabile non eseguire il codice come 'radice'." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/electron-browser/window.i18n.json b/i18n/ita/src/vs/workbench/electron-browser/window.i18n.json index e4fdc2f801a34..c3698933985aa 100644 --- a/i18n/ita/src/vs/workbench/electron-browser/window.i18n.json +++ b/i18n/ita/src/vs/workbench/electron-browser/window.i18n.json @@ -11,7 +11,5 @@ "paste": "Incolla", "selectAll": "Seleziona tutto", "confirmOpen": "Aprire le cartelle di {0}?", - "confirmOpenButton": "&&Apri", - "developer": "Sviluppatore", - "file": "File" + "confirmOpenButton": "&&Apri" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/ita/src/vs/workbench/electron-browser/workbench.i18n.json new file mode 100644 index 0000000000000..8392fa958357c --- /dev/null +++ b/i18n/ita/src/vs/workbench/electron-browser/workbench.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "developer": "Sviluppatore", + "file": "File" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json b/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json new file mode 100644 index 0000000000000..01386d943158f --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emergencyConfOn": "Modifica dell'impostazione 'editor.accessibilitySupport' a 'on' in corso.", + "openingDocs": "Apertura della pagina di documentazione sull'accessibilità di VS Code in corso.", + "introMsg": "Grazie per aver provato le opzioni di accessibilità di Visual Studio Code.", + "status": "Stato:", + "changeConfigToOnMac": "Premere Comando+E per configurare l'editor per essere definitivamente ottimizzato per l'utilizzo con un un'utilità per la lettura dello schermo.", + "changeConfigToOnWinLinux": "Premere Control+E per configurare l'editor per essere definitivamente ottimizzato per l'utilizzo con un un'utilità per la lettura dello schermo.", + "auto_unknown": "L'editor è configurato per utilizzare le API della piattaforma per rilevare quando è collegata un'utilità per la lettura dello schermo ma il runtime corrente non lo supporta.", + "auto_on": "L'editor ha rilevato automaticamente che è collegata un'utilità per la lettura dello schermo.", + "auto_off": "L'editor è configurato per rilevare automaticamente quando è collegata un'utilità per la lettura dello schermo, che non è collegata in questo momento.", + "configuredOn": "L'editor è configurato per essere definitivamente ottimizzato per l'utilizzo con un'utilità per la lettura dello schermo - è possibile modificare questo modificando l'impostazione 'editor.accessibilitySupport'.", + "configuredOff": "L'editor è configurato per non essere ottimizzato per l'utilizzo con un'utilità per la lettura dello schermo.", + "tabFocusModeOnMsg": "Premere TAB nell'editor corrente per spostare lo stato attivo sull'elemento con stato attivabile successivo. Per attivare/disattivare questo comportamento, premere {0}.", + "tabFocusModeOnMsgNoKb": "Premere TAB nell'editor corrente per spostare lo stato attivo sull'elemento con stato attivabile successivo. Il comando {0} non può essere attualmente attivato con un tasto di scelta rapida.", + "tabFocusModeOffMsg": "Premere TAB nell'editor corrente per inserire il carattere di tabulazione. Per attivare/disattivare questo comportamento, premere {0}.", + "tabFocusModeOffMsgNoKb": "Premere TAB nell'editor corrente per inserire il carattere di tabulazione. Il comando {0} non può essere attualmente attivato con un tasto di scelta rapida.", + "openDocMac": "Premere Comando+H per aprire una finestra del browser con maggiori informazioni relative all'accessibilità di VS Code.", + "openDocWinLinux": "Premere Control+H per aprire una finestra del browser con maggiori informazioni relative all'accessibilità di VS Code.", + "outroMsg": "Per chiudere questa descrizione comando e tornare all'editor, premere ESC o MAIUSC+ESC.", + "ShowAccessibilityHelpAction": "Visualizza la Guida sull'accessibilità" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json index c5e4314489b8e..e11f9e61fe085 100644 --- a/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "workbench.action.inspectKeyMap": "Developer: Inspect Key Mapppings" + "workbench.action.inspectKeyMap": "Sviluppatore: controlla mapping tasti" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json b/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..9fcc4080ecc55 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inspectTMScopes": "Sviluppatore: controlla ambiti TextMate", + "inspectTMScopesWidget.loading": "Caricamento..." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json b/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json new file mode 100644 index 0000000000000..71e4cf37b99b1 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parseErrors": "Errori durante l'analisi di {0}: {1}", + "schema.openBracket": "Sequenza di stringa o carattere parentesi quadra di apertura.", + "schema.closeBracket": "Sequenza di stringa o carattere parentesi quadra di chiusura.", + "schema.comments": "Definisce i simboli di commento", + "schema.blockComments": "Definisce il modo in cui sono contrassegnati i commenti per il blocco.", + "schema.blockComment.begin": "Sequenza di caratteri che indica l'inizio di un commento per il blocco.", + "schema.blockComment.end": "Sequenza di caratteri che termina i commenti per il blocco.", + "schema.lineComment": "Sequenza di caratteri che indica l'inizio di un commento per la riga.", + "schema.brackets": "Definisce i simboli di parentesi quadra che aumentano o riducono il rientro.", + "schema.autoClosingPairs": "Definisce le coppie di parentesi quadre. Quando viene immessa una parentesi quadra di apertura, quella di chiusura viene inserita automaticamente.", + "schema.autoClosingPairs.notIn": "Definisce un elenco di ambiti in cui la corrispondenza automatica delle coppie è disabilitata.", + "schema.surroundingPairs": "Definisce le coppie di parentesi quadre che possono essere usate per racchiudere una stringa selezionata.", + "schema.wordPattern": "La definizione di parola per il linguaggio.", + "schema.wordPattern.pattern": "Il modello di RegExp utilizzato per trovare parole.", + "schema.wordPattern.flags": "I flag di RegExp utilizzati per trovare parole.", + "schema.wordPattern.flags.errorMessage": "Deve corrispondere al modello `/^([gimuy]+)$/`.", + "schema.indentationRules.increaseIndentPattern.errorMessage": "Deve corrispondere al modello `/^([gimuy]+)$/`.", + "schema.indentationRules.decreaseIndentPattern.errorMessage": "Deve corrispondere al modello `/^([gimuy]+)$/`.", + "schema.indentationRules.indentNextLinePattern.errorMessage": "Deve corrispondere al modello `/^([gimuy]+)$/`.", + "schema.indentationRules.unIndentedLinePattern.errorMessage": "Deve corrispondere al modello `/^([gimuy]+)$/`." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json b/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..9fcc4080ecc55 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inspectTMScopes": "Sviluppatore: controlla ambiti TextMate", + "inspectTMScopesWidget.loading": "Caricamento..." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json b/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json new file mode 100644 index 0000000000000..839633747f522 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "Modificatore per l'attivazione/disattivazione multi-cursore" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index f0e210641bfd9..dbac73dc76fea 100644 --- a/i18n/ita/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -6,6 +6,7 @@ { "openLaunchJson": "Apri {0}", "launchJsonNeedsConfigurtion": "Configurare o correggere 'launch.json'", + "noFolderDebugConfig": "Si prega di aprire prima una cartella per consentire una configurazione di debug avanzato.", "startDebug": "Avvia debug", "startWithoutDebugging": "Avvia senza eseguire debug", "selectAndStartDebugging": "Seleziona e avvia il debug", @@ -34,6 +35,7 @@ "editConditionalBreakpoint": "Modifica punto di interruzione...", "setValue": "Imposta valore", "addWatchExpression": "Aggiungi espressione", + "editWatchExpression": "Modifica espressione", "addToWatchExpressions": "Aggiungi a espressione di controllo", "removeWatchExpression": "Rimuovi espressione", "removeAllWatchExpressions": "Rimuovi tutte le espressioni", diff --git a/i18n/ita/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json new file mode 100644 index 0000000000000..2e0a0d42956f6 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugToolBarBackground": "Colore di sfondo della barra degli strumenti di debug." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json new file mode 100644 index 0000000000000..91b52a6addb63 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileLinkMac": "Fare clic per aprire (CMD+clic apre lateralmente)", + "fileLink": "Fare clic per aprire (CTRL+clic apre lateralmente)" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/debug/common/debug.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/common/debug.i18n.json new file mode 100644 index 0000000000000..17c61dfb9bd71 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/debug/common/debug.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "internalConsoleOptions": "Controlla il comportamento della console di debug interna." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/debug/common/debugModel.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/common/debugModel.i18n.json index 2d0fb0063b3b2..f50b19ba962e5 100644 --- a/i18n/ita/src/vs/workbench/parts/debug/common/debugModel.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/debug/common/debugModel.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "unknownSource": "Origine sconosciuta", "notAvailable": "non disponibile", - "startDebugFirst": "Per eseguire la valutazione, avviare una sessione di debug", - "unknownStack": "Posizione dello stack sconosciuta" + "startDebugFirst": "Per eseguire la valutazione, avviare una sessione di debug" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/debug/common/debugSource.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/common/debugSource.i18n.json new file mode 100644 index 0000000000000..506b3e40c55af --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/debug/common/debugSource.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownSource": "Origine sconosciuta" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json new file mode 100644 index 0000000000000..f521324695bc9 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noFolderDebugConfig": "Si prega di aprire prima una cartella per consentire una configurazione di debug avanzato." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index d5422d908c394..e90a97c9394f8 100644 --- a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -5,8 +5,8 @@ // Do not edit this file. It is machine generated. { "snapshotObj": "Per questo oggetto vengono visualizzati solo i valori primitivi.", - "debuggingStarted": "Il debug è stato avviato.", "debuggingPaused": "Il debug è stato sospeso. Motivo: {0}, {1} {2}", + "debuggingStarted": "Il debug è stato avviato.", "debuggingStopped": "Il debug è stato arrestato.", "breakpointAdded": "Aggiunto un punto di interruzione a riga {0} del file {1}", "breakpointRemoved": "Rimosso un punto di interruzione a riga {0} del file {1}", diff --git a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json index d65947bfcbc85..ae849e1dfbb14 100644 --- a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json @@ -6,5 +6,6 @@ { "copyValue": "Copia valore", "copy": "Copia", + "copyAll": "Copia tutti", "copyStackTrace": "Copia stack di chiamate" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json index 0ba55e0fb51cf..fff7cbcba9e23 100644 --- a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json @@ -5,8 +5,6 @@ // Do not edit this file. It is machine generated. { "stateCapture": "Lo stato dell'oggetto viene acquisito dalla prima valutazione", - "fileLinkMac": "Fare clic per aprire (CMD+clic apre lateralmente)", - "fileLink": "Fare clic per aprire (CTRL+clic apre lateralmente)", "replVariableAriaLabel": "Il valore della variabile {0} è {1}, ciclo Read Eval Print, debug", "replExpressionAriaLabel": "Il valore dell'espressione {0} è {1}, ciclo Read Eval Print, debug", "replValueOutputAriaLabel": "{0}, ciclo Read Eval Print, debug", diff --git a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json index 8de054fa31b72..c13997bfc292d 100644 --- a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "statusBarDebuggingBackground": "Colore di sfondo della barra di stato quando è in corso il debug di un programma. La barra di stato è visualizzata nella parte inferiore della finestra" + "statusBarDebuggingBackground": "Colore di sfondo della barra di stato quando è in corso il debug di un programma. La barra di stato è visualizzata nella parte inferiore della finestra", + "statusBarDebuggingForeground": "Colore primo piano della barra di stato quando è in corso il debug di un programma. La barra di stato è visualizzata nella parte inferiore della finestra" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index 2018bb4806656..d116abf482013 100644 --- a/i18n/ita/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,12 +7,12 @@ "debugAdapterBinNotFound": "Il file eseguibile '{0}' dell'adattatore di debug non esiste.", "debugAdapterCannotDetermineExecutable": "Non è possibile determinare il file eseguibile per l'adattatore di debug '{0}'.", "debugType": "Tipo di configurazione.", + "debugTypeNotRecognised": "Il tipo di debug non è riconosciuto. Assicurarsi di avere un'estensione appropriata per il debug installata e che sia abilitata.", "node2NotSupported": "\"node2\" non è più supportato. In alternativa, usare \"node\" e impostare l'attributo \"protocol\" su \"inspector\".", "debugName": "Nome della configurazione. Viene visualizzato nel menu a discesa della configurazione di avvio.", "debugRequest": "Tipo della richiesta di configurazione. Può essere \"launch\" o \"attach\".", "debugServer": "Solo per lo sviluppo dell'estensione di debug: se si specifica una porta, Visual Studio Code prova a connettersi a un adattatore di debug in esecuzione in modalità server", "debugPrelaunchTask": "Attività da eseguire prima dell'avvio della sessione di debug.", - "internalConsoleOptions": "Controlla il comportamento della console di debug interna.", "debugWindowsConfiguration": "Attributi della configurazione di avvio specifici di Windows.", "debugOSXConfiguration": "Attributi della configurazione di avvio specifici di OS X.", "debugLinuxConfiguration": "Attributi della configurazione di avvio specifici di Linux.", diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json new file mode 100644 index 0000000000000..22f94f4cf3617 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "balanceInward": "Emmet: Saldo (in ingresso)", + "balanceOutward": "Emmet: Saldo (in uscita)" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json new file mode 100644 index 0000000000000..34249d623c89a --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "previousEditPoint": "Emmet: andare al punto di modifica precedente", + "nextEditPoint": "Emmet: andare al punto di modifica successivo" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json new file mode 100644 index 0000000000000..27d67e79fef21 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "evaluateMathExpression": "Emmet: Valuta espressione matematica" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json new file mode 100644 index 0000000000000..71a96f5f840bd --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "expandAbbreviationAction": "Emmet: Espandi abbreviazione" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json new file mode 100644 index 0000000000000..ece4609ebc50d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "incrementNumberByOneTenth": "Emmet: Aumenta di 0,1", + "incrementNumberByOne": "Emmet: Aumenta di 1", + "incrementNumberByTen": "Emmet: Aumenta di 10", + "decrementNumberByOneTenth": "Emmet: Riduci di 0,1", + "decrementNumberByOne": "Emmet: Riduci di 1", + "decrementNumberByTen": "Emmet: Riduci di 10" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json new file mode 100644 index 0000000000000..e7e21455b6baa --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "matchingPair": "Emmet: Vai alla coppia corrispondente" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json new file mode 100644 index 0000000000000..5dc3268b4902b --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mergeLines": "Emmet: Esegui merge delle righe" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json new file mode 100644 index 0000000000000..15cd2c912c486 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reflectCSSValue": "Emmet: Effettua reflection del valore CSS" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json new file mode 100644 index 0000000000000..a375d4ca5766b --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeTag": "Emmet: Rimuovi tag" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json new file mode 100644 index 0000000000000..78c6fd0761bf9 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "selectPreviousItem": "Emmet: Seleziona elemento precedente", + "selectNextItem": "Emmet: Seleziona elemento successivo" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json new file mode 100644 index 0000000000000..006ad09b523b7 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "splitJoinTag": "Emmet: Dividi/Unisci tag" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json new file mode 100644 index 0000000000000..f4338f86f4e18 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleComment": "Emmet: Attiva/Disattiva commento" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json new file mode 100644 index 0000000000000..49c7306573d37 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateImageSize": "Emmet: Aggiorna dimensioni immagine" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json new file mode 100644 index 0000000000000..38caa12dc952d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateTag": "Emmet: Aggiorna tag", + "enterTag": "Immetti tag", + "tag": "Tag" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json new file mode 100644 index 0000000000000..f83f8f8671678 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wrapWithAbbreviationAction": "Emmet: Esegui il wrapping con l'abbreviazione", + "enterAbbreviation": "Immetti abbreviazione", + "abbreviation": "Abbreviazione" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json new file mode 100644 index 0000000000000..dc9fac282b124 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emmetConfigurationTitle": "Emmet", + "triggerExpansionOnTab": "Se abilitate, le abbreviazioni Emmet vengono espanse quando si preme TAB.", + "emmetPreferences": "Preferenze usate per modificare il comportamento di alcune azioni e i resolver di Emmet.", + "emmetSyntaxProfiles": "Consente di definire il profilo per la sintassi specificata oppure di usare un profilo personalizzato con regole specifiche.", + "emmetExclude": "Matrice di linguaggi in cui le abbreviazioni Emmet non devono essere espanse.", + "emmetExtensionsPath": "Percorso di una cartella contenente snippet, preferenze e profili Emmet", + "useNewEmmet": "Prova i nuovi moduli emmet (che andrà a sostituire la vecchia libreria singola emmet) per tutte le funzionalità emmet." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index 5139e3b6469ae..8dbebb2e4a72b 100644 --- a/i18n/ita/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -4,10 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "vscode.extension.contributes.explorer": "Aggiunge come contributo il viewlet Tree Explorer personalizzato alla barra laterale", - "vscode.extension.contributes.explorer.treeExplorerNodeProviderId": "ID univoco usato per identificare il provider registrato tramite vscode.workspace.registerTreeExplorerNodeProvider", - "vscode.extension.contributes.explorer.treeLabel": "Stringa leggibile usata per il rendering dell'istanza personalizzata di Tree Explorer", - "vscode.extension.contributes.explorer.icon": "Percorso dell'icona del viewlet sulla barra attività", + "vscode.extension.contributes.view": "Visualizzazione personalizzata per contributes", + "vscode.extension.contributes.view.id": "ID univoco usato per identificare la visualizzazione creata tramite vscode.workspace.createTreeView", + "vscode.extension.contributes.view.label": "Stringa leggibile usata per il rendering della visualizzazione", + "vscode.extension.contributes.view.icon": "Percorso dell'icona della visualizzazione", + "vscode.extension.contributes.views": "Visualizzazioni personalizzate per contributes", "showViewlet": "Mostra {0}", "view": "Visualizza" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index 9aeb226d9a315..6302bb9a38cfd 100644 --- a/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -24,6 +24,10 @@ "default": "Impostazione predefinita", "debuggers": "Debugger ({0})", "debugger name": "Nome", + "views": "Visualizzazioni ({0})", + "view id": "ID", + "view name": "Nome", + "view location": "Dove", "themes": "Temi ({0})", "JSON Validation": "Convalida JSON ({0})", "commands": "Comandi ({0})", diff --git a/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index 2199a5e0cccf8..2430ac5cd9b3b 100644 --- a/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -22,6 +22,8 @@ "disableGloballyAction": "Sempre", "disableAction": "Disabilita", "checkForUpdates": "Controlla la disponibilità di aggiornamenti", + "enableAutoUpdate": "Abilita l'aggiornamento automatico delle estensioni", + "disableAutoUpdate": "Disabilita l'aggiornamento automatico delle estensioni", "updateAll": "Aggiorna tutte le estensioni", "reloadAction": "Ricarica", "postUpdateTooltip": "Ricaricare per aggiornare", @@ -44,6 +46,8 @@ "showWorkspaceRecommendedExtensions": "Mostra estensioni consigliate per l'area di lavoro", "showRecommendedKeymapExtensions": "Mostra mappature tastiera consigliate", "showRecommendedKeymapExtensionsShort": "Mappature tastiera", + "showLanguageExtensions": "Mostra estensioni del linguaggio", + "showLanguageExtensionsShort": "Estensioni del linguaggio", "configureWorkspaceRecommendedExtensions": "Configura estensioni consigliate (area di lavoro)", "ConfigureWorkspaceRecommendations.noWorkspace": "Gli elementi consigliati sono disponibili solo per una cartella dell'area di lavoro.", "OpenExtensionsFile.failed": "Non è possibile creare il file 'extensions.json' all'interno della cartella '.vscode' ({0}).", @@ -51,5 +55,8 @@ "disableAll": "Disabilita tutte le estensioni installate", "disableAllWorkspace": "Disabilita tutte le estensioni installate per questa area di lavoro", "enableAll": "Abilita tutte le estensioni installate", - "enableAllWorkspace": "Abilita tutte le estensioni installate per questa area di lavoro" + "enableAllWorkspace": "Abilita tutte le estensioni installate per questa area di lavoro", + "extensionButtonProminentBackground": "Colore di sfondo delle azioni di estensioni che si distinguono (es. pulsante Installa).", + "extensionButtonProminentForeground": "Colore primo piano di pulsanti per azioni di estensioni che si distinguono (es. pulsante Installa).", + "extensionButtonProminentHoverBackground": "Colore di sfondo al passaggio del mouse dei pulsanti per azioni di estensione che si distinguono (es. pulsante Installa)." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index 56e75fc5770da..9d16c7dad0f34 100644 --- a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -8,5 +8,9 @@ "showRecommendations": "Mostra gli elementi consigliati", "neverShowAgain": "Non visualizzare più questo messaggio", "close": "Chiudi", - "workspaceRecommended": "Per questa area di lavoro sono disponibili estensioni consigliate." + "workspaceRecommended": "Per questa area di lavoro sono disponibili estensioni consigliate.", + "ignoreExtensionRecommendations": "Si desidera ignorare tutte le raccomandazioni di estensioni?", + "ignoreAll": "Sì, ignora tutti", + "no": "No", + "cancel": "Annulla" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index 1122eeb85cfbf..12c0b28e83dbf 100644 --- a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -10,5 +10,6 @@ "extensions": "Estensioni", "view": "Visualizza", "extensionsConfigurationTitle": "Estensioni", - "extensionsAutoUpdate": "Aggiorna automaticamente le estensioni" + "extensionsAutoUpdate": "Aggiorna automaticamente le estensioni", + "extensionsIgnoreRecommendations": "Ignora le raccomandazioni di estensioni" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json new file mode 100644 index 0000000000000..4822a5d71bc5d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "disableOtherKeymapsConfirmation": "Disabilitare altre mappature tastiera ({0}) per evitare conflitti tra tasti di scelta rapida?", + "yes": "Sì", + "no": "No", + "betterMergeDisabled": "L'estensione Better Merge (miglior merge) è ora incorporata: l'estensione installata è stata disattivata e può essere disinstallata.", + "uninstall": "Disinstalla", + "later": "In seguito" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json index 70d72a9b165ba..619308f4fd372 100644 --- a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json @@ -5,11 +5,10 @@ // Do not edit this file. It is machine generated. { "searchExtensions": "Cerca le estensioni nel Marketplace", - "extensions": "Estensioni", "sort by installs": "Ordina per: conteggio installazioni", "sort by rating": "Ordina per: classificazione", "sort by name": "Ordina per: Nome", - "no extensions found": "Non sono state trovate estensioni.", "suggestProxyError": "Marketplace ha restituito 'ECONNREFUSED'. Controllare l'impostazione 'http.proxy'.", + "extensions": "Estensioni", "outdatedExtensions": "{0} estensioni obsolete" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json new file mode 100644 index 0000000000000..44c103d035eee --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensions": "Estensioni", + "no extensions found": "Non sono state trovate estensioni.", + "suggestProxyError": "Marketplace ha restituito 'ECONNREFUSED'. Controllare l'impostazione 'http.proxy'." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json index 383079301548a..5ebcfe27cef8c 100644 --- a/i18n/ita/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json @@ -13,5 +13,6 @@ "cancel": "Annulla", "singleDependentError": "Non è possibile disabilitare l'estensione '{0}'. L'estensione '{1}' dipende da tale estensione.", "twoDependentsError": "Non è possibile disabilitare l'estensione '{0}'. Le estensioni '{1}' e '{2}' dipendono da tale estensione.", - "multipleDependentsError": "Non è possibile disabilitare l'estensione '{0}'. Alcune estensioni, tra cui '{1}' e '{2}' dipendono da tale estensione." + "multipleDependentsError": "Non è possibile disabilitare l'estensione '{0}'. Alcune estensioni, tra cui '{1}' e '{2}' dipendono da tale estensione.", + "install": "Installa" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index cec14eebc7123..e6510fee16f2c 100644 --- a/i18n/ita/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,7 +16,7 @@ "associations": "Consente di configurare le associazioni tra file e linguaggi, ad esempio \"*.extension\": \"html\". Queste hanno la precedenza sulle associazioni predefinite dei linguaggi installate.", "encoding": "Codifica del set di caratteri predefinita da usare durante la lettura e la scrittura di file.", "autoGuessEncoding": "Quando questa opzione è abilitata, la codifica del set di caratteri viene ipotizzata all'apertura dei file", - "eol": "Carattere di fine riga predefinito.", + "eol": "Il carattere di fine riga predefinito. Utilizzare \\n per LF e \\r\\n per CRLF.", "trimTrailingWhitespace": "Se è abilitato, taglierà lo spazio vuoto quando si salva un file.", "insertFinalNewline": "Se è abilitato, inserisce un carattere di nuova riga finale alla fine del file durante il salvataggio.", "files.autoSave.off": "Un file dirty non viene mai salvato automaticamente.", @@ -25,10 +25,8 @@ "files.autoSave.onWindowChange": "Un file dirty viene salvato automaticamente quando la finestra perde lo stato attivo.", "autoSave": "Controlla il salvataggio automatico dei file dirty. Valori accettati: '{0}', '{1}', '{2}' (l'editor perde lo stato attivo), '{3}' (la finestra perde lo stato attivo). Se è impostato su '{4}', è possibile configurare il ritardo in 'files.autoSaveDelay'.", "autoSaveDelay": "Controlla il ritardo in ms dopo il quale un file dirty viene salvato automaticamente. Si applica solo quando 'files.autoSave' è impostato su '{0}'", - "watcherExclude": "Consente di configurare i criteri GLOB dei percorsi file da escludere dal controllo dei file. Se si modifica questa impostazione, è necessario riavviare. Quando si nota che Code consuma troppo tempo della CPU all'avvio, è possibile escludere le cartelle di grandi dimensioni per ridurre il carico iniziale.", "hotExit.off": "Disabilita Hot Exit.", "hotExit.onExit": "La funzionalità Hot Exit verrà attivata alla chiusura dell'applicazione, ovvero quando si chiude l'ultima finestra in Windows/Linux o quando si attiva il comando workbench.action.quit (riquadro comandi, tasto di scelta rapida, menu). Tutte le finestre con backup verranno ripristinate al successivo avvio.", - "hotExit.onExitAndWindowClose": "La funzionalità Hot Exit verrà attivata alla chiusura dell'applicazione, ovvero quando si chiude l'ultima finestra in Windows/Linux o quando si attiva il comando workbench.action.quit (riquadro comandi, tasto di scelta rapida, menu), nonché per qualsiasi finestra con una cartella aperta indipendentemente dal fatto che sia l'ultima. Tutte le finestre senza cartelle aperte verranno ripristinate al successivo avvio. Per riportare le finestre di cartelle allo stato in cui si trovavano prima dell'arresto, impostare \"window.reopenFolders\" su \"all\".", "hotExit": "Controlla se i file non salvati verranno memorizzati tra una sessione e l'altra, consentendo di ignorare il prompt di salvataggio alla chiusura dell'editor.", "defaultLanguage": "Modalità linguaggio predefinita assegnata ai nuovi file.", "editorConfigurationTitle": "Editor", diff --git a/i18n/ita/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json b/i18n/ita/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json index 71f3a7b410e69..9ae2216ff999e 100644 --- a/i18n/ita/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "explorerSection": "Sezione Esplora file", "noWorkspace": "Nessuna cartella aperta", + "explorerSection": "Sezione Esplora file", "noWorkspaceHelp": "Non ci sono ancora cartelle aperte.", "openFolder": "Apri cartella" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json b/i18n/ita/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json index bc5c38d3fefd9..1f6007832328a 100644 --- a/i18n/ita/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "openEditosrSection": "Sezione Editor aperti", "openEditors": "Editor aperti", + "openEditosrSection": "Sezione Editor aperti", "treeAriaLabel": "Editor aperti: elenco di file attivi", "dirtyCounter": "{0} non salvati" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index 18ae03ff77a60..e72592662b957 100644 --- a/i18n/ita/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -5,5 +5,11 @@ // Do not edit this file. It is machine generated. { "slow": "È stato rilevato un rallentamento all'avvio", - "slow.detail": "È stato appena rilevato un rallentamento all'avvio. Per consentire a Microsoft di analizzare e risolvere il problema, riavviare '{0}' con la profilatura abilitata e condividere i profili." + "slow.detail": "È stato appena rilevato un rallentamento all'avvio. Per consentire a Microsoft di analizzare e risolvere il problema, riavviare '{0}' con la profilatura abilitata e condividere i profili.", + "prof.message": "I profili sono stati creati.", + "prof.detail": "Creare un problema e allegare manualmente i file seguenti:\n{0}", + "prof.restartAndFileIssue": "Crea problema e riavvia", + "prof.restart": "Riavvia", + "prof.thanks": "Grazie per l'aiuto.", + "prof.detail.restart": "È necessario un riavvio alla fine per continuare a utilizzare '{0}'. Ancora una volta, grazie per il vostro contributo." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index 991ee8c1264bb..92488da046352 100644 --- a/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -5,7 +5,7 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.start": "Definisci tasto di scelta rapida", - "defineKeybinding.kbLayoutInfoMessage": "Per il layout di tastiera corrente premere ", "defineKeybinding.kbLayoutErrorMessage": "Non sarà possibile produrre questa combinazione di tasti con il layout di tastiera corrente.", - "DefineKeybindingAction": "Definisci tasto di scelta rapida" + "defineKeybinding.kbLayoutLocalAndUSMessage": "**{0}** per il layout di tastiera corrente (**{1}** per quello standard US).", + "defineKeybinding.kbLayoutLocalMessage": "**{0}** per il layout di tastiera corrente." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index 8fa5a9b9b2aee..12a31fb4c16d1 100644 --- a/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -6,6 +6,7 @@ { "openGlobalSettings": "Apri impostazioni utente", "openGlobalKeybindings": "Apri tasti di scelta rapida", + "openGlobalKeybindingsFile": "Apri file dei tasti di scelta rapida", "openWorkspaceSettings": "Apri impostazioni area di lavoro", "configureLanguageBasedSettings": "Configura impostazioni specifiche del linguaggio...", "languageDescriptionConfigured": "({0})", diff --git a/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index a9d3b766fdac4..948489347544b 100644 --- a/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "errorInvalidConfiguration": "Impossibile scrivere nelle impostazioni. Correggere eventuali errori o avvisi nel file e riprovare.", + "defaultSettingsTitle": "Impostazioni predefinite", "editTtile": "Modifica", "replaceDefaultValue": "Sostituisci nelle impostazioni", "copyDefaultValue": "Copia nelle impostazioni", diff --git a/i18n/ita/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json b/i18n/ita/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json index 5be53aa1550e8..35875c0810541 100644 --- a/i18n/ita/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "showTriggerActions": "Mostra tutti i comandi", + "showCommands.label": "Riquadro comandi...", "entryAriaLabelWithKey": "{0}, {1}, comandi", "entryAriaLabel": "{0}, comandi", "canNotRun": "Non è possibile eseguire il comando '{0}' da questa posizione.", diff --git a/i18n/ita/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json new file mode 100644 index 0000000000000..b04fcadda7a30 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "relaunchSettingMessage": "È necessario riavviare per rendere effettiva un'impostazione modificata.", + "relaunchSettingDetail": "Fare clic sul pulsante di riavvio per riavviare {0} e abilitare l'impostazione.", + "restart": "Riavvia", + "reload": "Ricarica" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/ita/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json new file mode 100644 index 0000000000000..504c42cd09001 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGutterModifiedBackground": "Colore di sfondo della barra di navigazione dell'editor per le righe che sono state modificate.", + "editorGutterAddedBackground": "Colore di sfondo della barra di navigazione dell'editor per le righe che sono state aggiunte.", + "editorGutterDeletedBackground": "Colore di sfondo della barra di navigazione dell'editor per le righe che sono state cancellate." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json index 44389863a6597..acbf024d405ac 100644 --- a/i18n/ita/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "toggleGitViewlet": "Mostra GIT", + "installAdditionalSCMProviders": "Installa ulteriori provider SCM ...", "source control": "Controllo del codice sorgente", "toggleSCMViewlet": "Mostra Gestione controllo servizi", "view": "Visualizza" diff --git a/i18n/ita/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json b/i18n/ita/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json index 529f073603a85..9f3adc546ff35 100644 --- a/i18n/ita/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "installAdditionalSCMProviders": "Installa ulteriori provider SCM ...", "switch provider": "Cambia provider SCM" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/ita/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json index 774cffef37d90..13608466e81d1 100644 --- a/i18n/ita/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -7,6 +7,6 @@ "searchMatches": "{0} corrispondenze trovate", "searchMatch": "{0} corrispondenza trovata", "fileMatchAriaLabel": "{0} corrispondenze nel file {1} della cartella {2}, risultato della ricerca", - "replacePreviewResultAria": "Risultato dell'anteprima sostituzione, {0}", - "searchResultAria": "{0}, risultato della ricerca" + "replacePreviewResultAria": "Sostituisce il termine {0} con {1} alla colonna {2} in linea con il testo {3}", + "searchResultAria": "Trovato termine {0} alla colonna {1} in linea con il testo {2}" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json b/i18n/ita/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json index 78cd10645b450..cd9b550b98aba 100644 --- a/i18n/ita/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json @@ -9,5 +9,6 @@ "vscode.extension.contributes.snippets-path": "Percorso del file snippets. È relativo alla cartella delle estensioni e in genere inizia con './snippets/'.", "invalid.language": "Il linguaggio in `contributes.{0}.language` è sconosciuto. Valore specificato: {1}", "invalid.path.0": "È previsto un valore stringa in `contributes.{0}.path`. Valore specificato: {1}", - "invalid.path.1": "Valore previsto di `contributes.{0}.path` ({1}) da includere nella cartella dell'estensione ({2}). L'estensione potrebbe non essere più portatile." + "invalid.path.1": "Valore previsto di `contributes.{0}.path` ({1}) da includere nella cartella dell'estensione ({2}). L'estensione potrebbe non essere più portatile.", + "badVariableUse": "Il frammento \"{0}\" molto probabilmente confonde variabili-frammento con segnaposti-frammento. Vedere https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax per ulteriori dettagli." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json index 89c9cdec78e4d..ff128cda608c5 100644 --- a/i18n/ita/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json @@ -11,6 +11,6 @@ "snippetSchema.json.default": "Frammento vuoto", "snippetSchema.json": "Configurazione del frammento utente", "snippetSchema.json.prefix": "Prefisso da usare quando si seleziona il frammento in IntelliSense", - "snippetSchema.json.body": "Contenuto del frammento. Usare '${id}', '${id:label}', '${1:label}' per le variabili e '$0', '$1' per le posizioni del cursore", + "snippetSchema.json.body": "Il contenuto del frammento. Usare '$1', '${1:defaultText}' per definire le posizioni del cursore, utilizzare '$0' per la posizione finale del cursore. Inserire i valori delle variabili con '${varName}' e '${varName:defaultText}', ad esempio 'Nome del file: $TM_FILENAME'.", "snippetSchema.json.description": "Descrizione del frammento." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json new file mode 100644 index 0000000000000..07b53da59b30a --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "helpUs": "Aiutaci a migliorare il nostro supporto all'{0}", + "takeShortSurvey": "Partecipa a un breve sondaggio", + "remindLater": "Visualizza più tardi", + "neverAgain": "Non visualizzare più questo messaggio" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..f5bb473c1df02 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "Partecipare a un breve sondaggio?", + "takeSurvey": "Partecipa a sondaggio", + "remindLater": "Visualizza più tardi", + "neverAgain": "Non visualizzare più questo messaggio" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json new file mode 100644 index 0000000000000..6574ffdaef17d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "No tasks matching" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json index a0b8634361dd3..cce0f602a0ff5 100644 --- a/i18n/ita/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tasks", "tasksAriaLabel": "Digitare il nome di un'attività da riavviare", "noTasksMatching": "No tasks matching", "noTasksFound": "Non sono state trovate attività da riavviare" diff --git a/i18n/ita/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json index 1bf6e6b40b958..ed1ead3e156fc 100644 --- a/i18n/ita/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tasks", "tasksAriaLabel": "Digitare il nome di un'attività da eseguire", "noTasksMatching": "No tasks matching", "noTasksFound": "Non sono state trovate attività" diff --git a/i18n/ita/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json new file mode 100644 index 0000000000000..6574ffdaef17d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "No tasks matching" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index 8de23c2bbed6d..f5aa6fc8cdaf2 100644 --- a/i18n/ita/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -5,13 +5,13 @@ // Do not edit this file. It is machine generated. { "ConfigurationParser.invalidCWD": "Avviso: options.cwd deve essere di tipo string. Il valore {0} verrà ignorato.\n", - "ConfigurationParser.noShell": "Avviso: la configurazione della shell è supportata solo quando si eseguono attività nel terminale.", "ConfigurationParser.noargs": "Errore: gli argomenti del comando devono essere un array di stringhe. Il valore specificato è:\n{0}", + "ConfigurationParser.noShell": "Avviso: la configurazione della shell è supportata solo quando si eseguono attività nel terminale.", "ConfigurationParser.noName": "Errore: è necessario specificare un nome per il matcher problemi nell'ambito di dichiarazione:\n{0}\n", "ConfigurationParser.unknownMatcherKind": "Avviso: il matcher problemi definito è sconosciuto. I tipi supportati sono string | ProblemMatcher | (string | ProblemMatcher)[].\n{0}\n", "ConfigurationParser.invalidVaraibleReference": "Errore: il riferimento a problemMatcher non è valido: {0}\n", "ConfigurationParser.noTaskName": "Errore: le attività devono specificare una proprietà taskName. L'attività verrà ignorata.\n{0}\n", "taskConfiguration.shellArgs": "Avviso: l'attività '{0}' è un comando della shell e il nome del comando o uno dei relativi argomenti contiene spazi senza codice di escape. Per garantire la corretta indicazione della riga di comando, unire gli argomenti nel comando.", - "taskConfiguration.noCommandOrDependsOn": "Errore: l'attività '{0}' non specifica un comando o una proprietà dependsOn. L'attività verrà ignorata. Definizione dell'attività:\n{1}", + "taskConfiguration.noCommandOrDependsOn": "Errore: l'attività '{0}' non specifica un comando né una proprietà dependsOn. L'attività verrà ignorata. La sua definizione è:\n{1}", "taskConfiguration.noCommand": "Errore: l'attività '{0}' non definisce un comando. L'attività verrà ignorata. Definizione dell'attività:\n{1}" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json index 2516a9477a32f..71cd7de7b96be 100644 --- a/i18n/ita/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "tsc.config": "Compila un progetto TypeScript", - "tsc.watch": "Compila un progetto TypeScript in modalità espressione di controllo", "dotnetCore": "Esegue il comando di compilazione di .NET Core", "msbuild": "Esegue la destinazione di compilazione", "externalCommand": "Esempio per eseguire un comando esterno arbitrario", diff --git a/i18n/ita/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json index b14b007cde531..2c148fe49001d 100644 --- a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json @@ -7,6 +7,7 @@ "JsonSchema.options": "Opzioni dei comandi aggiuntive", "JsonSchema.options.cwd": "Directory di lavoro corrente del programma o dello script eseguito. Se omesso, viene usata la radice dell'area di lavoro corrente di Visual Studio Code.", "JsonSchema.options.env": "Ambiente della shell o del programma eseguito. Se omesso, viene usato l'ambiente del processo padre.", + "JsonSchema.shellConfiguration": "Configura la shell da utilizzare.", "JsonSchema.shell.executable": "Shell da usare.", "JsonSchema.shell.args": "Argomenti della shell.", "JsonSchema.command": "Comando da eseguire. Può essere un programma esterno o un comando della shell.", diff --git a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json index 2d791579971b3..9aefb1b07c7d0 100644 --- a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json @@ -5,6 +5,8 @@ // Do not edit this file. It is machine generated. { "JsonSchema.version": "Numero di versione della configurazione", + "JsonSchema._runner": "Runner è stata promossa. Utilizzare la proprietà ufficiale runner", + "JsonSchema.runner": "Definisce se l'attività viene eseguita come un processo e l'output viene visualizzato nella finestra di output o all'interno del terminale.", "JsonSchema.windows": "Configurazione dei comandi specifica di Windows", "JsonSchema.mac": "Configurazione dei comandi specifica di Mac", "JsonSchema.linux": "Configurazione dei comandi specifica di Linux", diff --git a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json index 248adfe6f6e43..e89d99e11f969 100644 --- a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -4,11 +4,16 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "JsonSchema.shell": "Specifica se il comando è un comando della shell o un programma esterno. Se omesso, viene usato il valore predefinito false.", + "JsonSchema.tasks.dependsOn.string": "Altra attività da cui dipende questa attività.", + "JsonSchema.tasks.dependsOn.array": "Altre attività da cui dipende questa attività.", + "JsonSchema.tasks.type": "Definisce se l'attività viene eseguita come un processo o come un comando all'interno di una shell. L'impostazione predefinita è processo.", "JsonSchema.version": "Numero di versione della configurazione", + "JsonSchema.tasks.taskName": "Nome dell'attività", + "JsonSchema.tasks.background": "Indica se l'attività eseguita viene mantenuta attiva ed è in esecuzione in background.", + "JsonSchema.tasks.promptOnClose": "Indica se viene visualizzato un prompt utente quando Visual Studio Code viene chiuso con un'attività in esecuzione.", + "JsonSchema.tasks.matchers": "Matcher problemi da usare. Può essere una stringa oppure una definizione di matcher problemi oppure una matrice di stringhe e matcher problemi.", "JsonSchema.windows": "Configurazione dei comandi specifica di Windows", "JsonSchema.mac": "Configurazione dei comandi specifica di Mac", - "JsonSchema.linux": "Configurazione dei comandi specifica di Linux", - "JsonSchema.shell": "Specifica se il comando è un comando della shell o un programma esterno. Se omesso, viene usato il valore predefinito false.", - "JsonSchema.tasks.dependsOn.string": "Altra attività da cui dipende questa attività.", - "JsonSchema.tasks.dependsOn.array": "Altre attività da cui dipende questa attività." + "JsonSchema.linux": "Configurazione dei comandi specifica di Linux" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index fabad77044f3c..7f88fdc830108 100644 --- a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -9,6 +9,7 @@ "ConfigureTaskRunnerAction.quickPick.template": "Seleziona strumento di esecuzione attività", "ConfigureTaskRunnerAction.autoDetecting": "Rilevamento automatico delle attività per {0}", "ConfigureTaskRunnerAction.autoDetect": "Il rilevamento automatico del sistema dell'attività non è riuscito. Verrà usato il modello predefinito. Per i dettagli, vedere l'output dell'attività.", + "ConfigureTaskRunnerAction.autoDetectError": "Il rilevamento automatico del sistema dell'attività ha restituito errori. Per i dettagli, vedere l'output dell'attività.", "ConfigureTaskRunnerAction.failed": "Non è possibile creare il file 'tasks.json' all'interno della cartella '.vscode'. Per dettagli, vedere l'output dell'attività.", "ConfigureTaskRunnerAction.label": "Configura esecuzione attività", "ConfigureBuildTaskAction.label": "Configura attività di compilazione", @@ -18,10 +19,11 @@ "manyMarkers": "Più di 99", "tasks": "Attività", "TaskSystem.noHotSwap": "Per modificare il motore di esecuzione delle attività, è necessario riavviare VS Code. La modifica verrà ignorata.", - "TaskService.noBuildTask": "Non è stata definita alcuna attività di Build. Contrassegnare un'attività con 'isBuildCommand' nel file tasks.json .", - "TaskService.noTestTask": "Non è stata definita alcuna attività di test. Contrassegnare un'attività con 'isTestCommand' nel file tasks.json .", + "TaskService.noBuildTask1": "Non è stata definita alcuna attività di compilazione. Contrassegnare un'attività con 'isBuildCommand' nel file tasks.json.", + "TaskService.noTestTask1": "Non è stata definita alcuna attività di test. Contrassegnare un'attività con 'isTestCommand' nel file tasks.json.", "TaskServer.noTask": "Attività {0} richiesta per l'esecuzione non trovata", - "TaskSystem.activeSame": "L'attività è già attiva e in modalità espressione di controllo. Per terminarla, usare `F1 > Termina attività`", + "customizeParseErrors": "La configurazione dell'attività corrente presenta errori. Per favore correggere gli errori prima di personalizzazione un'attività.", + "moreThanOneBuildTask": "tasks.json contiene molte attività di compilazione. È in corso l'esecuzione della prima.\n", "TaskSystem.active": "Al momento c'è già un'attività in esecuzione. Terminarla prima di eseguirne un'altra.", "TaskSystem.restartFailed": "Non è stato possibile terminare e riavviare l'attività {0}", "TaskSystem.configurationErrors": "Errore: la configurazione delle attività specificata contiene errori di convalida e non è utilizzabile. Correggere prima gli errori.", @@ -30,17 +32,14 @@ "TaskSystem.terminateTask": "&&Termina attività", "TaskSystem.noProcess": "L'attività avviata non esiste più. Se l'attività implica la generazione di processi in background, uscendo da Visual Studio Code potrebbero essere presenti processi orfani. Per evitarlo, avviare l'ultimo processo in background con un flag di attesa.", "TaskSystem.exitAnyways": "&&Esci comunque", - "TerminateAction.label": "Termina attività in esecuzione", + "TerminateAction.label": "Termina attività", "TaskSystem.unknownError": "Si è verificato un errore durante l'esecuzione di un'attività. Per dettagli, vedere il log attività.", "TaskService.noWorkspace": "Le attività sono disponibili solo per una cartella dell'area di lavoro.", "TerminateAction.noProcess": "Il processo avviato non esiste più. Se l'attività implica la generazione di attività in background, uscendo da Visual Studio Code potrebbero essere presenti processi orfani.", "TerminateAction.failed": "Non è stato possibile terminare l'attività in esecuzione", "ShowLogAction.label": "Mostra log attività", "RunTaskAction.label": "Esegui attività", - "RestartTaskAction.label": "Riavvia attività", "BuildAction.label": "Esegui attività di compilazione", "TestAction.label": "Esegui attività di test", - "quickOpen.task": "Esegui attività", - "quickOpen.terminateTask": "&&Termina attività", - "quickOpen.restartTask": "Riavvia attività" + "quickOpen.task": "Esegui attività" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index f2c65d28fb8c2..3d9e3d5f42be4 100644 --- a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -6,5 +6,7 @@ { "TerminalTaskSystem.unknownError": "Si è verificato un errore sconosciuto durante l'esecuzione di un'attività. Per dettagli, vedere il log di output dell'attività.", "TerminalTaskSystem.terminalName": "Attività - {0}", - "TerminalTaskSystem": "Non è possibile eseguire un comando della shell su un'unità UNC." + "reuseTerminal": "Terminale verrà riutilizzato dalle attività, premere un tasto qualsiasi per chiuderlo.", + "TerminalTaskSystem": "Non è possibile eseguire un comando della shell su un'unità UNC.", + "unkownProblemMatcher": "Il matcher problemi {0} non può essere risolto. il matcher verrà ignorato" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json index 7f632a45eea93..fe3fa63dc3b39 100644 --- a/i18n/ita/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json @@ -7,5 +7,6 @@ "TaskRunnerSystem.unknownError": "Si è verificato un errore sconosciuto durante l'esecuzione di un'attività. Per dettagli, vedere il log di output dell'attività.", "TaskRunnerSystem.watchingBuildTaskFinished": "\nIl controllo delle attività di build è terminato.", "TaskRunnerSystem.childProcessError": "Failed to launch external program {0} {1}.", - "TaskRunnerSystem.cancelRequested": "\nL'attività '{0}' è stata terminata come richiesto dall'utente." + "TaskRunnerSystem.cancelRequested": "\nL'attività '{0}' è stata terminata come richiesto dall'utente.", + "unkownProblemMatcher": "Il matcher problemi {0} non può essere risolto. Il matcher verrà ignorato" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json new file mode 100644 index 0000000000000..f5aa6fc8cdaf2 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ConfigurationParser.invalidCWD": "Avviso: options.cwd deve essere di tipo string. Il valore {0} verrà ignorato.\n", + "ConfigurationParser.noargs": "Errore: gli argomenti del comando devono essere un array di stringhe. Il valore specificato è:\n{0}", + "ConfigurationParser.noShell": "Avviso: la configurazione della shell è supportata solo quando si eseguono attività nel terminale.", + "ConfigurationParser.noName": "Errore: è necessario specificare un nome per il matcher problemi nell'ambito di dichiarazione:\n{0}\n", + "ConfigurationParser.unknownMatcherKind": "Avviso: il matcher problemi definito è sconosciuto. I tipi supportati sono string | ProblemMatcher | (string | ProblemMatcher)[].\n{0}\n", + "ConfigurationParser.invalidVaraibleReference": "Errore: il riferimento a problemMatcher non è valido: {0}\n", + "ConfigurationParser.noTaskName": "Errore: le attività devono specificare una proprietà taskName. L'attività verrà ignorata.\n{0}\n", + "taskConfiguration.shellArgs": "Avviso: l'attività '{0}' è un comando della shell e il nome del comando o uno dei relativi argomenti contiene spazi senza codice di escape. Per garantire la corretta indicazione della riga di comando, unire gli argomenti nel comando.", + "taskConfiguration.noCommandOrDependsOn": "Errore: l'attività '{0}' non specifica un comando né una proprietà dependsOn. L'attività verrà ignorata. La sua definizione è:\n{1}", + "taskConfiguration.noCommand": "Errore: l'attività '{0}' non definisce un comando. L'attività verrà ignorata. Definizione dell'attività:\n{1}" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json index 7df189ea6a7d1..a7393d354c76b 100644 --- a/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -8,6 +8,7 @@ "workbench.action.terminal.kill": "Termina istanza attiva del terminale", "workbench.action.terminal.kill.short": "Termina il terminale", "workbench.action.terminal.copySelection": "Copia selezione", + "workbench.action.terminal.selectAll": "Seleziona tutto", "workbench.action.terminal.new": "Crea nuovo terminale integrato", "workbench.action.terminal.new.short": "Nuovo terminale", "workbench.action.terminal.focus": "Sposta stato attivo su terminale", @@ -26,5 +27,8 @@ "workbench.action.terminal.scrollUp": "Scorri su (riga)", "workbench.action.terminal.scrollUpPage": "Scorri su (pagina)", "workbench.action.terminal.scrollToTop": "Scorri all'inizio", - "workbench.action.terminal.clear": "Cancella" + "workbench.action.terminal.clear": "Cancella", + "workbench.action.terminal.allowWorkspaceShell": "Consente la configurazione della Shell dell'area di lavoro", + "workbench.action.terminal.disallowWorkspaceShell": "Non consente la configurazione della Shell dell'area di lavoro", + "workbench.action.terminal.rename": "Rinomina" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json index c56209ab67f48..43f3afaeb3087 100644 --- a/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.background": "Il colore di sfondo del terminale, questo consente di colorare il terminale in modo diverso dal pannello.", + "terminal.foreground": "Il colore di primo piano del terminale.", "terminal.ansiColor": "Colore ANSI '{0}' nel terminale." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json index 1ed48f98d5802..e4b5fdeb3bb26 100644 --- a/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.integrated.allowWorkspaceShell": "Consentire l'esecuzione di {0} (definito come impostazione dell'area di lavoro) nel terminale?", "allow": "Allow", "disallow": "Disallow" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json new file mode 100644 index 0000000000000..a930fde7ffb7b --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Trova", + "placeholder.find": "Trova", + "label.previousMatchButton": "Risultato precedente", + "label.nextMatchButton": "Risultato successivo", + "label.closeButton": "Chiudi" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json index 919a2c26d3b17..713819e122618 100644 --- a/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "terminal.integrated.copySelection.noSelection": "Non è possibile copiare la selezione del terminale quando questo non ha lo stato attivo", "terminal.integrated.exitedWithCode": "Il processo del terminale è stato terminato. Codice di uscita: {0}", "terminal.integrated.waitOnExit": "Premere un tasto qualsiasi per chiudere il terminale", "terminal.integrated.launchFailed": "L'avvio del comando del processo di terminale `{0}{1}` non è riuscito. Codice di uscita: {2}" diff --git a/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json index 4d20eafd76962..e7a06ff96545f 100644 --- a/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminalLinkHandler.followLinkAlt": "Alt + clic per seguire il collegamento", "terminalLinkHandler.followLinkCmd": "Cmd + clic per seguire il collegamento", "terminalLinkHandler.followLinkCtrl": "CTRL + clic per seguire il collegamento" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json index 807c64b9feaba..e32834163e9c2 100644 --- a/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json @@ -7,5 +7,6 @@ "copy": "Copia", "createNewTerminal": "Nuovo terminale", "paste": "Incolla", + "selectAll": "Seleziona tutto", "clear": "Cancella" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 5bffe6bee4014..7801fc1c4368e 100644 --- a/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,13 +6,14 @@ { "selectTheme.label": "Tema colori", "installColorThemes": "Installa temi colori aggiuntivi...", - "problemChangingTheme": "Problema durante l'impostazione del tema: {0}", - "themes.selectTheme": "Seleziona tema colori", + "themes.selectTheme": "Selezionare il Tema colori (tasti su/giù per anteprima)", "selectIconTheme.label": "Tema icona file", "installIconThemes": "Installa temi dell'icona file aggiuntivi...", "noIconThemeLabel": "Nessuno", "noIconThemeDesc": "Disabilita le icone dei file", "problemChangingIconTheme": "Problema durante l'impostazione del tema dell'icona: {0}", "themes.selectIconTheme": "Seleziona il tema dell'icona file", - "preferences": "Preferenze" + "generateColorTheme.label": "Genera tema colore da impostazioni correnti", + "preferences": "Preferenze", + "developer": "Sviluppatore" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/update/electron-browser/update.i18n.json b/i18n/ita/src/vs/workbench/parts/update/electron-browser/update.i18n.json index ddd31ed976db1..6b6a2e8c417b1 100644 --- a/i18n/ita/src/vs/workbench/parts/update/electron-browser/update.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/update/electron-browser/update.i18n.json @@ -13,7 +13,19 @@ "read the release notes": "Benvenuti in {0} versione {1}. Leggere le note sulla versione?", "licenseChanged": "I termini della licenza sono cambiati. Leggerli con attenzione.", "license": "Leggi licenza", - "updateAvailable": "{0} verrà aggiornato dopo il riavvio.", + "updateIsReady": "Nuovo aggiornamento disponibile.", "thereIsUpdateAvailable": "È disponibile un aggiornamento.", - "noUpdatesAvailable": "Al momento non sono disponibili aggiornamenti." + "updateAvailable": "{0} verrà aggiornato dopo il riavvio.", + "noUpdatesAvailable": "Al momento non sono disponibili aggiornamenti.", + "commandPalette": "Riquadro comandi...", + "settings": "Impostazioni", + "keyboardShortcuts": "Scelte rapide da tastiera", + "selectTheme.label": "Tema colori", + "themes.selectIconTheme.label": "Tema icona file", + "not available": "Aggiornamenti non disponibili", + "checkingForUpdates": "Verifica della disponibilità di aggiornamenti...", + "DownloadUpdate": "Scarica l'aggiornamento disponibile", + "DownloadingUpdate": "Download dell'aggiornamento...", + "InstallingUpdate": "Installazione dell'aggiornamento...", + "checkForUpdates": "Verifica disponibilità aggiornamenti..." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/views/browser/views.i18n.json b/i18n/ita/src/vs/workbench/parts/views/browser/views.i18n.json new file mode 100644 index 0000000000000..a7b1c66172688 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/views/browser/views.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewToolbarAriaLabel": "Azioni di {0}" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json b/i18n/ita/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json new file mode 100644 index 0000000000000..c5e18fdd63c83 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "Visualizzazioni devono essere una matrice", + "requirestring": "la proprietà `{0}` è obbligatoria e deve essere di tipo `string`", + "optstring": "la proprietà `{0}` può essere omessa o deve essere di tipo `string`", + "vscode.extension.contributes.view.id": "Identificatore della vista. Utilizzare questo per registrare un provider di dati tramite l'API 'vscode.window.registerTreeDataProviderForView'. Anche per innescare l'attivazione dell'estensione tramite la registrazione dell'evento 'onView: ${id}' a 'activationEvents'.", + "vscode.extension.contributes.view.name": "Il nome della visualizzazione. Verrà mostrato", + "vscode.extension.contributes.views": "Contribuisce visualizzazioni all'editor", + "views.explorer": "Visualizzazione di esplorazione", + "locationId.invalid": "'{0}' non è una posizione valida per la visualizzazione" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json b/i18n/ita/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json index 44f8bb3cf217b..57a4a964983eb 100644 --- a/i18n/ita/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json @@ -14,10 +14,6 @@ "watermark.toggleTerminal": "Attiva/Disattiva terminale", "watermark.findInFiles": "Cerca nei file", "watermark.startDebugging": "Avvia debug", - "watermark.selectTheme": "Cambia tema", - "watermark.selectKeymap": "Modifica mappatura tastiera", - "watermark.keybindingsReference": "Riferimento per tastiera", - "watermark.openGlobalKeybindings": "Tasti di scelta rapida", "watermark.unboundCommand": "non associato", "workbenchConfigurationTitle": "Area di lavoro", "tips.enabled": "Quando questa opzione è abilitata, se non ci sono editor aperti, verranno visualizzati i suggerimenti filigrana." diff --git a/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 3a98deaa2c026..c3e2a0322fe76 100644 --- a/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -11,33 +11,33 @@ "welcomePage.openFolder": "Apri cartella...", "welcomePage.cloneGitRepository": "Clona repository GIT...", "welcomePage.recent": "Recenti", + "welcomePage.moreRecent": "Altro...", "welcomePage.noRecentFolders": "Non ci sono cartelle recenti", "welcomePage.help": "Guida", - "welcomePage.productDocumentation": "Documentazione del prodotto", + "welcomePage.keybindingsCheatsheet": "Bigino combinazione tasti stampabile", "welcomePage.introductoryVideos": "Video introduttivi", + "welcomePage.productDocumentation": "Documentazione del prodotto", "welcomePage.gitHubRepository": "Repository GitHub", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "Mostra la pagina iniziale all'avvio", - "welcomePage.quickLinks": "Collegamenti rapidi", - "welcomePage.interactivePlayground": "Playground interattivo", - "welcomePage.interactivePlaygroundDescription": "Breve panoramica delle funzionalità essenziali dell'editor", - "welcomePage.interfaceOverview": "Panoramica dell'interfaccia", - "welcomePage.interfaceOverviewDescription": "Immagine in sovrimpressione che evidenzia i principali componenti dell'interfaccia utente", + "welcomePage.customize": "Personalizza", + "welcomePage.installExtensionPacks": "Strumenti e linguaggi", + "welcomePage.installExtensionPacksDescription": "Installare il supporto per {0} e {1}", + "welcomePage.moreExtensions": "altro", + "welcomePage.installKeymapDescription": "Installa i tasti di scelta rapida", + "welcomePage.installKeymapExtension": "Installa i tasti di scelta rapida di {0} e {1}", + "welcomePage.others": "altri", "welcomePage.colorTheme": "Tema colori", "welcomePage.colorThemeDescription": "Tutto quel che serve per configurare editor e codice nel modo desiderato", + "welcomePage.learn": "Impara", + "welcomePage.showCommands": "Trova ed esegui tutti i comandi", + "welcomePage.interfaceOverview": "Panoramica dell'interfaccia", + "welcomePage.interfaceOverviewDescription": "Immagine in sovrimpressione che evidenzia i principali componenti dell'interfaccia utente", + "welcomePage.interactivePlayground": "Playground interattivo", + "welcomePage.interactivePlaygroundDescription": "Breve panoramica delle funzionalità essenziali dell'editor", + "welcomePage.quickLinks": "Collegamenti rapidi", "welcomePage.keybindingsReference": "Riferimento per tasti di scelta rapida", "welcomePage.keybindingsReferenceDescription": "PDF stampabile con i tasti di scelta rapida più comuni", - "welcomePage.showCommands": "Trova ed esegui tutti i comandi", - "welcomePage.showCommandsDescription": "Accesso e ricerca rapida di comandi dal pannello di controllo ({0})", "welcomePage.configureSettings": "Configura le impostazioni", - "welcomePage.configureSettingsDescription": "Perfeziona le impostazioni per sfruttare appieno tutta la potenza di Visual Studio Code", - "welcomePage.installKeymapDescription": "Installa i tasti di scelta rapida", - "welcomePage.installKeymap": "Installa i tasti di scelta rapida di {0}, {1}, {2} e {3}", - "welcomePage.vim": "Vim", - "welcomePage.vimCurrent": "Vim (corrente)", - "welcomePage.sublime": "Sublime", - "welcomePage.sublimeCurrent": "Sublime (corrente)", - "welcomePage.atom": "Atom", - "welcomePage.atomCurrent": "Atom (corrente)", - "welcomePage.others": "altri" + "welcomePage.configureSettingsDescription": "Perfeziona le impostazioni per sfruttare appieno tutta la potenza di Visual Studio Code" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json index 20dd0cb2b010c..9ccd50575db63 100644 --- a/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "workbenchConfigurationTitle": "Area di lavoro", - "welcomePage.enabled": "Se è abilitata, visualizzerà la pagina Benvenuti all'avvio.", "help": "Guida" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 6614c86ca0b2d..b6dde7dcf2caf 100644 --- a/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,11 +5,32 @@ // Do not edit this file. It is machine generated. { "welcomePage": "Benvenuti", - "welcome.title": "Benvenuti", + "welcomePage.javaScript": "JavaScript", + "welcomePage.typeScript": "TypeScript", + "welcomePage.python": "Python", + "welcomePage.php": "PHP", + "welcomePage.docker": "Docker", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", + "welcomePage.extensionPackAlreadyInstalled": "Il supporto per {0} è già installato.", + "welcomePage.willReloadAfterInstallingExtensionPack": "La finestra verrà ricaricata dopo l'installazione di supporto aggiuntivo per {0}.", + "welcomePage.installingExtensionPack": "Installazione di supporto aggiuntivo per {0} in corso...", + "welcomePage.extensionPackNotFound": "Il supporto per {0} con ID {1} non è stato trovato.", "welcomePage.keymapAlreadyInstalled": "I tasti di scelta rapida di {0} sono già installati.", "welcomePage.willReloadAfterInstallingKeymap": "La finestra verrà ricaricata dopo l'installazione dei tasti di scelta rapida di {0}.", - "ok": "OK", "welcomePage.installingKeymap": "Installazione dei tasti di scelta rapida di {0}...", "welcomePage.keymapNotFound": "I tasti di scelta rapida di {0} con ID {1} non sono stati trovati.", - "cancel": "Annulla" + "welcome.title": "Benvenuti", + "welcomePage.openFolderWithPath": "Apri la cartella {0} con percorso {1}", + "welcomePage.extensionListSeparator": ",", + "welcomePage.installKeymap": "Installa mappatura tastiera {0}", + "welcomePage.installExtensionPack": "Installa supporto aggiuntivo per {0}", + "welcomePage.installedKeymap": "Mappatura tastiera {0} è già installata", + "welcomePage.installedExtensionPack": "Il supporto {0} è già installato", + "ok": "OK", + "details": "Dettagli", + "cancel": "Annulla", + "welcomePage.buttonBackground": "Colore di sfondo dei pulsanti nella pagina di benvenuto.", + "welcomePage.buttonHoverBackground": "Colore di sfondo al passaggio del mouse dei pulsanti nella pagina di benvenuto." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/ita/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json index 4550587650cf7..1ee1f44cc1d83 100644 --- a/i18n/ita/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "walkThrough.unboundCommand": "non associato" + "walkThrough.unboundCommand": "non associato", + "walkThrough.gitNotFound": "Sembra che GIT non sia installato nel sistema.", + "walkThrough.embeddedEditorBackground": "Colore di sfondo degli editor incorporati nel playground interattivo." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/services/configuration/node/configuration.i18n.json b/i18n/ita/src/vs/workbench/services/configuration/node/configuration.i18n.json new file mode 100644 index 0000000000000..a7e15b8a41426 --- /dev/null +++ b/i18n/ita/src/vs/workbench/services/configuration/node/configuration.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.configuration": "Impostazioni di configurazione di contributes.", + "vscode.extension.contributes.configuration.title": "Riepilogo delle impostazioni. Questa etichetta verrà usata nel file di impostazioni come commento di separazione.", + "vscode.extension.contributes.configuration.properties": "Descrizione delle proprietà di configurazione.", + "invalid.type": "se impostato, 'configuration.type' deve essere impostato su 'object", + "invalid.title": "'configuration.title' deve essere una stringa", + "vscode.extension.contributes.defaultConfiguration": "Aggiunge come contributo le impostazioni di configurazione predefinite dell'editor in base al linguaggio.", + "invalid.properties": "'configuration.properties' deve essere un oggetto" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/ita/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index 3072dac1446f2..4566b1bcc6f46 100644 --- a/i18n/ita/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/ita/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -4,11 +4,14 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "open": "Apri impostazioni", + "close": "Chiudi", + "saveAndRetry": "Salva le impostazioni e riprova", "errorUnknownKey": "Non è possibile scrivere nel file di configurazione. La chiave è sconosciuta", "errorInvalidTarget": "Non è possibile scrivere nel file di configurazione (destinazione non valida)", - "errorNoWorkspaceOpened": "Non è possibile scrivere le impostazioni perché non è stata aperta alcuna cartella. Aprire prima una cartella e riprovare.", - "errorInvalidConfiguration": "Non è possibile scrivere le impostazioni. Aprire **Impostazioni utente** per correggere errori/avvisi nel file e riprovare.", - "errorInvalidConfigurationWorkspace": "Non è possibile scrivere le impostazioni. Aprire **Impostazioni area di lavoro** per correggere errori/avvisi nel file e riprovare.", - "errorConfigurationFileDirty": "Non è possibile scrivere le impostazioni perché il file è stato modificato ma non salvato. Salvare il file delle **Impostazioni utente** e riprovare.", - "errorConfigurationFileDirtyWorkspace": "Non è possibile scrivere le impostazioni perché il file stato modificato ma non salvato. Salvare il file delle **Impostazioni area di lavoro** e riprovare." + "errorNoWorkspaceOpened": "Impossibile scrivere nelle impostazioni perché nessuna cartella è aperta. Si prega di aprire una cartella e riprovare.", + "errorInvalidConfiguration": "Impossibile scrivere nelle impostazioni. Si prega di aprire **Impostazioni utente** per correggere eventuali errori o avvisi nel file e riprovare.", + "errorInvalidConfigurationWorkspace": "Impossibile scrivere in impostazioni. Si prega di aprire **Impostazioni area di lavoro** per correggere eventuali errori o avvisi nel file e riprovare.", + "errorConfigurationFileDirty": "Impossibile scrivere nelle impostazioni perché il file è stato modificato ma non salvato. Si prega di salvare il file **impostazioni utente** e riprovare.", + "errorConfigurationFileDirtyWorkspace": "Non è possibile scrivere in impostazioni perché il file è stato modificato ma non salvato. Salvare il file delle **Impostazioni area di lavoro** e riprovare." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json b/i18n/ita/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json new file mode 100644 index 0000000000000..f3982be9f88ef --- /dev/null +++ b/i18n/ita/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Telemetria", + "telemetry.enableCrashReporting": "Consente l'invio di segnalazioni di arresto anomalo del sistema a Microsoft.\nPer rendere effettiva questa opzione, è necessario riavviare." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/ita/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index d9dd939d22d36..74e4b8e395700 100644 --- a/i18n/ita/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/ita/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -8,15 +8,11 @@ "requirestring": "la proprietà `{0}` è obbligatoria e deve essere di tipo `string`", "optstring": "la proprietà `{0}` può essere omessa o deve essere di tipo `string`", "vscode.extension.contributes.keybindings.command": "Identificatore del comando da eseguire quando si attiva il tasto di scelta rapida.", - "vscode.extension.contributes.keybindings.key": "Tasto o sequenza di tasti (separare i tasti con un segno di addizione e le sequenze con uno spazio, ad esempio CTRL+O e CTRL+L L per una combinazione)", "vscode.extension.contributes.keybindings.mac": "Tasto o sequenza di tasti specifica di Mac.", "vscode.extension.contributes.keybindings.linux": "Tasto o sequenza di tasti specifica di Linux.", "vscode.extension.contributes.keybindings.win": "Tasto o sequenza di tasti specifica di Windows.", "vscode.extension.contributes.keybindings.when": "Condizione quando il tasto è attivo.", "vscode.extension.contributes.keybindings": "Tasti di scelta rapida per contributes.", - "openDocumentation": "Altre informazioni", - "keybindingMigration.ok": "OK", - "keybindingMigration.prompt": "Alcune scelte rapide da tastiera sono state modificate per il layout di tastiera corrente.", "invalid.keybindings": "Il valore di `contributes.{0}` non è valido: {1}", "unboundCommands": "Altri comandi disponibili: ", "keybindings.json.title": "Configurazione dei tasti di scelta rapida", diff --git a/i18n/ita/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json b/i18n/ita/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json index 13649c85e97be..fb78540a771d8 100644 --- a/i18n/ita/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json +++ b/i18n/ita/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json @@ -4,6 +4,15 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "vscode.extension.contributes.languages": "Dichiarazioni del linguaggio per contributes.", + "vscode.extension.contributes.languages.id": "ID del linguaggio.", + "vscode.extension.contributes.languages.aliases": "Alias di nome per il linguaggio.", + "vscode.extension.contributes.languages.extensions": "Estensioni di file associate al linguaggio.", + "vscode.extension.contributes.languages.filenames": "Nomi file associati al linguaggio.", + "vscode.extension.contributes.languages.filenamePatterns": "Criteri GLOB dei nomi file associati al linguaggio.", + "vscode.extension.contributes.languages.mimetypes": "Tipi MIME associati al linguaggio.", + "vscode.extension.contributes.languages.firstLine": "Espressione regolare corrispondente alla prima riga di un file del linguaggio.", + "vscode.extension.contributes.languages.configuration": "Percorso relativo di un file che contiene le opzioni di configurazione per il linguaggio.", "invalid": "Il valore di `contributes.{0}` non è valido. È prevista una matrice.", "invalid.empty": "Il valore di `contributes.{0}` è vuoto", "require.id": "la proprietà `{0}` è obbligatoria e deve essere di tipo `string`", diff --git a/i18n/ita/src/vs/workbench/services/progress/browser/progressService2.i18n.json b/i18n/ita/src/vs/workbench/services/progress/browser/progressService2.i18n.json new file mode 100644 index 0000000000000..6db7d6aae514a --- /dev/null +++ b/i18n/ita/src/vs/workbench/services/progress/browser/progressService2.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "progress.text": "{0} - {1}", + "progress.title": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json b/i18n/ita/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json new file mode 100644 index 0000000000000..0cfd798fe9e97 --- /dev/null +++ b/i18n/ita/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.grammars": "Tokenizer TextMate per contributes.", + "vscode.extension.contributes.grammars.language": "Identificatore di linguaggio per cui si aggiunge come contributo questa sintassi.", + "vscode.extension.contributes.grammars.scopeName": "Nome dell'ambito TextMate usato dal file tmLanguage.", + "vscode.extension.contributes.grammars.path": "Percorso del file tmLanguage. È relativo alla cartella delle estensioni e in genere inizia con './syntaxes/'.", + "vscode.extension.contributes.grammars.embeddedLanguages": "Mapping tra nome ambito e ID linguaggio se questa grammatica contiene linguaggi incorporati.", + "vscode.extension.contributes.grammars.injectTo": "Elenco di nomi di ambito del linguaggio in cui viene inserita questa grammatica." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json b/i18n/ita/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json new file mode 100644 index 0000000000000..0548a8aa6a906 --- /dev/null +++ b/i18n/ita/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid.language": "Il linguaggio in `contributes.{0}.language` è sconosciuto. Valore specificato: {1}", + "invalid.scopeName": "È previsto un valore stringa in `contributes.{0}.scopeName`. Valore specificato: {1}", + "invalid.path.0": "È previsto un valore stringa in `contributes.{0}.path`. Valore specificato: {1}", + "invalid.injectTo": "Il valore in `contributes.{0}.injectTo` non è valido. Deve essere una matrice di nomi di ambito del linguaggio. Valore specificato: {1}", + "invalid.embeddedLanguages": "Il valore in `contributes.{0}.embeddedLanguages` non è valido. Deve essere un mapping di oggetti tra nome ambito e linguaggio. Valore specificato: {1}", + "invalid.path.1": "Valore previsto di `contributes.{0}.path` ({1}) da includere nella cartella dell'estensione ({2}). L'estensione potrebbe non essere più portatile.", + "no-tm-grammar": "Non è stata registrata alcuna grammatica TM per questo linguaggio." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json b/i18n/ita/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json index eca6a3b65b445..4d36ef2de5e09 100644 --- a/i18n/ita/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json +++ b/i18n/ita/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json @@ -6,5 +6,6 @@ { "schema.colors": "Colori per l'evidenziazione della sintassi", "schema.properties.name": "Descrizione della regola", - "schema.fontStyle": "Stile del carattere della regola: uno o combinazione di 'italic', 'bold' e 'underline'" + "schema.fontStyle": "Stile del carattere della regola: uno o combinazione di 'italic', 'bold' e 'underline'", + "schema.tokenColors.path": "Percorso di un file tmTheme (relativo al file corrente)" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/ita/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json index 3214ab31d60ea..0aee1a7594dd1 100644 --- a/i18n/ita/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json +++ b/i18n/ita/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -5,8 +5,9 @@ // Do not edit this file. It is machine generated. { "error.cannotparsejson": "Problemi durante l'analisi del file di tema di JSON: {0}", - "error.invalidformat": "Si è verificato un problema durante l'analisi del file di tema di JSON: {0}. Sono previsti 'tokenColors' e 'colors'.", - "error.plist.invalidformat": "Problema durante l'analisi del file di tema: {0}. 'settings' non corrisponde a una matrice.", - "error.cannotparse": "Problemi durante l'analisi del file di tema: {0}", - "error.cannotload": "Si sono verificati problemi durante il caricamento del file di tema {0}: {1}" + "error.invalidformat.colors": "Si è verificato un problema durante l'analisi del file di tema {0}. La proprietà 'colors' non è di tipo 'object'.", + "error.invalidformat.tokenColors": "Si è verificato un problema durante l'analisi del file di tema {0}. La proprietà 'tokenColors' deve essere una matrice che specifica i colori o un percorso di un file di tema TextMate", + "error.plist.invalidformat": "Si è verificato un problema durante l'analisi del file tmTheme {0}. 'settings' non è una matrice.", + "error.cannotparse": "Si sono verificati problemi durante l'analisi del file tmTheme {0}", + "error.cannotload": "Si sono verificati problemi durante il caricamento del file tmTheme {0}: {1}" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/ita/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index 31d2d4731d5a7..af04726bbabd6 100644 --- a/i18n/ita/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/ita/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -23,8 +23,9 @@ "error.cannotparseicontheme": "Problems parsing file icons file: {0}", "colorTheme": "Specifies the color theme used in the workbench.", "colorThemeError": "Theme is unknown or not installed.", - "iconTheme": "Specifies the icon theme used in the workbench.", "noIconThemeDesc": "No file icons", "iconThemeError": "File icon theme is unknown or not installed.", - "workbenchColors": "Sostituisce i colori del tema colori attualmente selezionato. Questa impostazione è sperimentale perché i nomi dei colori verranno cambiati nella prossima versione." + "workbenchColors": "Sostituisce i colori del tema colori attualmente selezionato.", + "workbenchColors.deprecated": "L'impostazione non è più sperimentale ed è stata rinominata in 'workbench.colorCustomizations'", + "workbenchColors.deprecatedDescription": "In alternativa, usare 'workbench.colorCustomizations'" } \ No newline at end of file diff --git a/i18n/jpn/extensions/configuration-editing/out/extension.i18n.json b/i18n/jpn/extensions/configuration-editing/out/extension.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/extensions/configuration-editing/out/extension.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json b/i18n/jpn/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json index 7433efbdb7780..d64b99599a9ae 100644 --- a/i18n/jpn/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json +++ b/i18n/jpn/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json @@ -7,7 +7,6 @@ "activeEditorShort": "例: myFile.txt", "activeEditorMedium": "例: myFolder/myFile.txt", "activeEditorLong": "例: /Users/Development/myProject/myFolder/myFile.txt", - "rootName": "例: myProject", "rootPath": "例: /Users/Development/myProject", "appName": "例: VS Code", "dirty": "アクティブなエディターがダーティである場合のダーティ インジケーター", diff --git a/i18n/jpn/extensions/extension-editing/out/extensionLinter.i18n.json b/i18n/jpn/extensions/extension-editing/out/extensionLinter.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/extensions/extension-editing/out/extensionLinter.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/extensions/git/out/commands.i18n.json b/i18n/jpn/extensions/git/out/commands.i18n.json index bcbbb2f07dff7..7669146cd1a70 100644 --- a/i18n/jpn/extensions/git/out/commands.i18n.json +++ b/i18n/jpn/extensions/git/out/commands.i18n.json @@ -17,21 +17,29 @@ "confirm discard multiple": "{0} 個のファイルの変更内容を破棄しますか?", "discard": "変更を破棄", "confirm discard all": "すべての変更を破棄しますか? 変更は戻りません!", + "discardAll": "すべての変更を破棄", + "no staged changes": "コミットするステージされた変更がありません。\n\nすべての変更を自動的にステージして、直接コミットしますか?", + "yes": "はい", + "always": "常に行う", "no changes": "コミットする必要のある変更はありません。", "commit message": "コミット メッセージ", "provide commit message": "コミット メッセージを入力してください", "branch name": "ブランチ名", "provide branch name": "ブランチ名を指定してください", + "select branch to delete": "削除するブランチの選択", + "confirm force delete branch": "ブランチ '{0}' はマージされていません。それでも削除しますか?", + "delete branch": "ブランチの削除", "no remotes to pull": "リポジトリには、プル元として構成されているリモートがありません。", "no remotes to push": "リポジトリには、プッシュ先として構成されているリモートがありません。", "nobranch": "リモートにプッシュするブランチをチェックアウトしてください。", "pick remote": "リモートを選んで、ブランチ '{0}' を次に公開します:", "sync is unpredictable": "このアクションはコミットを '{0}' との間でプッシュしたりプルしたりします。", "ok": "OK", - "never again": "了解しました。今後は表示しない", + "never again": "OK、今後は表示しない", "no remotes to publish": "リポジトリには、発行先として構成されているリモートがありません。", "disabled": "このワークスペースでは、Git が無効になっているか、サポートされていません", "clean repo": "チェックアウトの前に、リポジトリの作業ツリーを消去してください。", + "cant push": "参照仕様をリモートにプッシュできません。最初に 'Pull' を実行して変更を統合してください。", "git error details": "Git: {0}", "git error": "Git エラー", "open git log": "Git ログを開く" diff --git a/i18n/jpn/extensions/git/out/model.i18n.json b/i18n/jpn/extensions/git/out/model.i18n.json index ad244859747e5..87fddca568846 100644 --- a/i18n/jpn/extensions/git/out/model.i18n.json +++ b/i18n/jpn/extensions/git/out/model.i18n.json @@ -9,5 +9,6 @@ "staged changes": "ステージング済みの変更", "changes": "変更", "ok": "OK", - "neveragain": "今後は表示しない" + "neveragain": "今後は表示しない", + "huge": "'{0}' のGit リポジトリにアクティブな変更が多いため、 Git 機能の一部のみが有効になります。" } \ No newline at end of file diff --git a/i18n/jpn/extensions/git/out/scmProvider.i18n.json b/i18n/jpn/extensions/git/out/scmProvider.i18n.json index 7fded37328a95..fe8b64ab93b86 100644 --- a/i18n/jpn/extensions/git/out/scmProvider.i18n.json +++ b/i18n/jpn/extensions/git/out/scmProvider.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "commit": "Commit" + "commit": "コミット" } \ No newline at end of file diff --git a/i18n/jpn/extensions/git/package.i18n.json b/i18n/jpn/extensions/git/package.i18n.json index 60aa93df42464..3c62a0cc9db46 100644 --- a/i18n/jpn/extensions/git/package.i18n.json +++ b/i18n/jpn/extensions/git/package.i18n.json @@ -26,12 +26,13 @@ "command.undoCommit": "前回のコミットを元に戻す", "command.checkout": "チェックアウト先...", "command.branch": "分岐の作成...", + "command.deleteBranch": "ブランチの削除...", "command.pull": "プル", "command.pullRebase": "プル (リベース)", "command.push": "プッシュ", "command.pushTo": "プッシュ先...", "command.sync": "同期", - "command.publish": "公開", + "command.publish": "ブランチの発行", "command.showOutput": "Git 出力の表示", "config.enabled": "Git が有効になっているかどうか", "config.path": "Git 実行可能ファイルのパス", @@ -39,8 +40,9 @@ "config.autofetch": "自動フェッチが有効かどうか", "config.enableLongCommitWarning": "長いコミット メッセージについて警告するかどうか", "config.confirmSync": "Git リポジトリを同期する前に確認する", - "config.countBadge": "Git バッジ カウンターを制御する", - "config.checkoutType": "一覧表示するブランチの種類を制御する", + "config.countBadge": "Git バッジ カウンターを制御します。`all` はすべての変更をカウントします。 `tracked` は追跡している変更のみカウントします。 `off` はカウントをオフします。", + "config.checkoutType": "`Checkout to...` を実行するときに表示されるブランチの種類を制御します。`all` はすべての参照を表示します。`local` はローカル ブランチのみ、`tags` はタグのみ、`remote` はリモート ブランチのみを表示します。 ", "config.ignoreLegacyWarning": "旧 Git の警告を無視します", - "config.ignoreLimitWarning": "リポジトリ内に変更が多い場合は警告を無視します" + "config.ignoreLimitWarning": "リポジトリ内に変更が多い場合は警告を無視します", + "config.defaultCloneDirectory": "Git リポジトリをクローンする既定の場所" } \ No newline at end of file diff --git a/i18n/jpn/extensions/grunt/out/main.i18n.json b/i18n/jpn/extensions/grunt/out/main.i18n.json index 8b6ad71cd4e6d..32ff080491f87 100644 --- a/i18n/jpn/extensions/grunt/out/main.i18n.json +++ b/i18n/jpn/extensions/grunt/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Grunt の自動検出が次のエラーで失敗しました: {0}" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/grunt/package.i18n.json b/i18n/jpn/extensions/grunt/package.i18n.json index 8b6ad71cd4e6d..ccfe3f9e22797 100644 --- a/i18n/jpn/extensions/grunt/package.i18n.json +++ b/i18n/jpn/extensions/grunt/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.grunt.autoDetect": "Grunt タスクの自動検出をオンにするかオフにするかを制御します。既定はオンです。" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/gulp/package.i18n.json b/i18n/jpn/extensions/gulp/package.i18n.json index 8b6ad71cd4e6d..1db590a13548c 100644 --- a/i18n/jpn/extensions/gulp/package.i18n.json +++ b/i18n/jpn/extensions/gulp/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.gulp.autoDetect": "Gulp タスクの自動検出をオンにするかオフにするかを制御します。既定はオンです。" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/jake/out/main.i18n.json b/i18n/jpn/extensions/jake/out/main.i18n.json new file mode 100644 index 0000000000000..0f77342ecbcca --- /dev/null +++ b/i18n/jpn/extensions/jake/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "Jake のエラーによる失敗を自動検出: {0}" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/jake/package.i18n.json b/i18n/jpn/extensions/jake/package.i18n.json new file mode 100644 index 0000000000000..def0eab1b4ce2 --- /dev/null +++ b/i18n/jpn/extensions/jake/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.jake.autoDetect": "Jake タスクの自動検出をオンにするかオフにするかを制御します。既定はオンです。" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/markdown/out/extension.i18n.json b/i18n/jpn/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..fd083fda4b6ca --- /dev/null +++ b/i18n/jpn/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "onPreviewStyleLoadError": "'markdown.styles' を読み込むことができません: {0}" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/markdown/package.i18n.json b/i18n/jpn/extensions/markdown/package.i18n.json index 35de3b1558002..da57a02afca0f 100644 --- a/i18n/jpn/extensions/markdown/package.i18n.json +++ b/i18n/jpn/extensions/markdown/package.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "markdown.preview.breaks.desc": "マークダウン プレビューで改行をレンダリングする方法を設定します。'true' に設定すると改行ごとに
を作成します。", "markdown.preview.doubleClickToSwitchToEditor.desc": "マークダウンのプレビューでダブルクリックすると、エディターに切り替わります。", "markdown.preview.fontFamily.desc": "マークダウン プレビューで使用されるフォント ファミリを制御します。", "markdown.preview.fontSize.desc": "マークダウン プレビューで使用されるフォント サイズ (ピクセル単位) を制御します。", diff --git a/i18n/jpn/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/jpn/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..e4f0ccc6045ab --- /dev/null +++ b/i18n/jpn/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "acceptCurrentChange": "現在の変更を取り込む", + "acceptIncomingChange": "入力側の変更を取り込む", + "acceptBothChanges": "両方の変更を取り込む", + "compareChanges": "変更の比較" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/jpn/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..fad8820747084 --- /dev/null +++ b/i18n/jpn/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "cursorNotInConflict": "エディターのカーソルがマージの競合の範囲内にありません", + "compareChangesTitle": "{0}: 現在の変更 ⟷ 入力側の変更", + "cursorOnCommonAncestorsRange": "エディターのカーソルが共通の祖先ブロック内にあります。”現在” または \"入力側\" のいずれかのブロックに移動してください", + "cursorOnSplitterRange": "エディターのカーソルがマージ コンフリクトのスプリッター内にあります。”現在” または \"入力側\" のいずれかのブロックに移動してください", + "noConflicts": "このファイルにマージの競合は存在しません", + "noOtherConflictsInThisFile": "このファイルに他のマージの競合は存在しません" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/jpn/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..6f8b1654a4d4f --- /dev/null +++ b/i18n/jpn/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "currentChange": "(現在の変更)", + "incomingChange": "(入力側の変更)" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/merge-conflict/package.i18n.json b/i18n/jpn/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..3a6930d38af31 --- /dev/null +++ b/i18n/jpn/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "command.category": "マージの競合", + "command.accept.all-incoming": "入力側のすべてを取り込む", + "command.accept.all-both": "両方をすべて取り込む", + "command.accept.current": "現在の方を取り込む", + "command.accept.incoming": "入力側を取り込む", + "command.accept.selection": "選択項目を取り込む", + "command.accept.both": "両方を取り込む", + "command.next": "次の競合", + "command.previous": "前の競合", + "command.compare": "現在の競合を比較", + "config.title": "マージの競合", + "config.codeLensEnabled": "エディター内のマージ競合ブロックで CodeLens を有効/無効にします", + "config.decoratorsEnabled": "エディター内でマージの競合デコレーターを有効/無効にします。" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/npm/package.i18n.json b/i18n/jpn/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..6a332075fd0c7 --- /dev/null +++ b/i18n/jpn/extensions/npm/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.npm.autoDetect": "npm スクリプトの自動検出をオンにするかオフにするかを制御します。既定はオンです。" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/typescript/out/features/bufferSyncSupport.i18n.json b/i18n/jpn/extensions/typescript/out/features/bufferSyncSupport.i18n.json index 01e33938ce2b0..e11a2a2a20f2d 100644 --- a/i18n/jpn/extensions/typescript/out/features/bufferSyncSupport.i18n.json +++ b/i18n/jpn/extensions/typescript/out/features/bufferSyncSupport.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "versionMismatch": "グローバルな tsc ({0}) と VS Code の言語サービス ({1}) の間にバージョンの不一致があります。非整合のコンパイル エラーを引き起こす可能性があります", + "versionMismatch": "エディター機能は TypeScript ({1}) を使用しています。TypeScript ({0}) がコンピューターへグローバルにインストールされているため、VS Code のエラーは TSC エラーと異なる場合があります。", "moreInformation": "詳細情報", "doNotCheckAgain": "今後確認しない", "close": "閉じる", diff --git a/i18n/jpn/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/jpn/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json new file mode 100644 index 0000000000000..d6577333f0d09 --- /dev/null +++ b/i18n/jpn/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ts-check": "JavaScript ファイルのセマンティック チェックを有効にします。 ファイルの先頭にある必要があります。", + "ts-nocheck": "JavaScript ファイルのセマンティック チェックを無効にします。 ファイルの先頭にある必要があります。", + "ts-ignore": "ファイルの次の行で @ts-check エラーを抑制します。" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/jpn/extensions/typescript/out/typescriptServiceClient.i18n.json index a0cf9808433c1..cc6f0e1ea1a73 100644 --- a/i18n/jpn/extensions/typescript/out/typescriptServiceClient.i18n.json +++ b/i18n/jpn/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -4,10 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "restartTsServerTitle": "再起動", - "restartTypeScriptServerBlurb": "変更を適用するために、TypeScript サーバーを再起動します", - "later": "後続", - "channelName": "TypeScript", "noServerFound": "パス {0} は、有効な tsserver インストールを指していません。バンドルされている TypeScript バージョンにフォールバックしています。", "noBundledServerFound": "適切に動作しないウイルス検出ツールなどの他のアプリケーションにより、VSCode の tsserver は削除されました。VS Code を再インストールしてください。", "versionNumber.custom": "カスタム", diff --git a/i18n/jpn/extensions/typescript/out/utils/logger.i18n.json b/i18n/jpn/extensions/typescript/out/utils/logger.i18n.json new file mode 100644 index 0000000000000..bc738f43d0c37 --- /dev/null +++ b/i18n/jpn/extensions/typescript/out/utils/logger.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "channelName": "TypeScript" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/typescript/out/utils/projectStatus.i18n.json b/i18n/jpn/extensions/typescript/out/utils/projectStatus.i18n.json index 2b687b8f1c532..9cd627a0d907a 100644 --- a/i18n/jpn/extensions/typescript/out/utils/projectStatus.i18n.json +++ b/i18n/jpn/extensions/typescript/out/utils/projectStatus.i18n.json @@ -6,7 +6,6 @@ { "hintExclude": "プロジェクト全体の JavaScript/TypeScript 言語機能を有効にするには、多数のファイルが含まれるフォルダーを除外します。例: {0}", "hintExclude.generic": "プロジェクト全体の JavaScript/TypeScript 言語機能を有効にするには、作業していないソース ファイルが含まれるサイズの大きなフォルダーを除外します。", - "open": "除外の構成", "large.label": "除外の構成", "hintExclude.tooltip": "プロジェクト全体の JavaScript/TypeScript 言語機能を有効にするには、作業していないソース ファイルが含まれるサイズの大きなフォルダーを除外します。" } \ No newline at end of file diff --git a/i18n/jpn/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/jpn/extensions/typescript/out/utils/typingsStatus.i18n.json index 3a40c2e29d9d1..1f1eb703bd6b7 100644 --- a/i18n/jpn/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/jpn/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "installingPackages": "より適した TypeScript IntelliSense に関するデータをフェッチしています", + "typesInstallerInitializationFailed.title": "JavaScript 言語機能のための型定義ファイルをインストールできませんでした。NPM のインストールを確認するか、ユーザー設定で 'typescript.npm' を構成してください", "typesInstallerInitializationFailed.moreInformation": "詳細情報", "typesInstallerInitializationFailed.doNotCheckAgain": "今後確認しない", "typesInstallerInitializationFailed.close": "閉じる" diff --git a/i18n/jpn/extensions/typescript/package.i18n.json b/i18n/jpn/extensions/typescript/package.i18n.json index 2f2017c88b372..becb45962a7c8 100644 --- a/i18n/jpn/extensions/typescript/package.i18n.json +++ b/i18n/jpn/extensions/typescript/package.i18n.json @@ -13,11 +13,11 @@ "typescript.check.tscVersion": "グローバル インストール TypeScript コンパイラ (tsc など) が、使用された TypeScript 言語サービスと異なっているかどうかを確認します。", "typescript.tsserver.log": "ファイルへの TS サーバーのログを有効にします。このログは TS サーバーの問題を診断するために使用できます。ログには、プロジェクトのファイルパス、ソースコード、その他の潜在的に機密性の高い情報が含まれている場合があります。", "typescript.tsserver.trace": "TS サーバーに送信されるメッセージのトレースを有効にします。このトレースは TS サーバーの問題を診断するために使用できます。トレースには、プロジェクトのファイルパス、ソースコード、その他の潜在的に機密性の高い情報が含まれている場合があります。", - "typescript.tsserver.experimentalAutoBuild": "試験的な自動ビルドを有効にします。1.9 dev または 2.x tsserver バージョンと、変更後に VS Code の再起動が必要です。", "typescript.validate.enable": "TypeScript の検証を有効/無効にします。", "typescript.format.enable": "既定の TypeScript フォーマッタを有効/無効にします。", "javascript.format.enable": "既定の JavaScript フォーマッタを有効/無効にします。", "format.insertSpaceAfterCommaDelimiter": "コンマ区切り記号の後のスペース処理を定義します。", + "format.insertSpaceAfterConstructor": "コンストラクター キーワードの後にスペース処理を定義します。TypeScript が 2.3.0 以上である必要があります。", "format.insertSpaceAfterSemicolonInForStatements": " for ステートメント内のセミコロンの後のスペース処理を定義します。", "format.insertSpaceBeforeAndAfterBinaryOperators": "2 項演算子の後のスペース処理を定義します。", "format.insertSpaceAfterKeywordsInControlFlowStatements": "制御フロー ステートメント内のキーワードの後のスペース処理を定義します。", @@ -25,6 +25,7 @@ "format.insertSpaceBeforeFunctionParenthesis": "関数の引数のかっこの前にあるスペース処理を定義します。TypeScript が 2.1.5. 以上である必要があります。", "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": "左右の空でないかっこの間のスペース処理を定義します。", "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": "左右の空でない角かっこの間のスペース処理を定義します。", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": "左右の空でないかっこの間のスペース処理を定義します。TypeScript が 2.3.0 以上である必要があります。", "format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": "テンプレート文字列の始め波かっこの後と終わり波かっこの前のスペース処理を定義します。TypeScript が 2.0.6 以上である必要があります。", "format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": "JSX 式の始め波かっこの後と終わり波かっこの前のスペース処理を定義します。TypeScript が 2.0.6 以上である必要があります。", "format.placeOpenBraceOnNewLineForFunctions": "新しい行に関数の始め波かっこを配置するかどうかを定義します。", @@ -32,9 +33,16 @@ "javascript.validate.enable": "JavaScript の検証を有効/無効にします。", "typescript.goToProjectConfig.title": "プロジェクト構成に移動", "javascript.goToProjectConfig.title": "プロジェクト構成に移動", - "typescript.referencesCodeLens.enabled": "CodeLens の参照を有効/無効にします。TypeScript 2.0.6 以上が必要です。", + "javascript.referencesCodeLens.enabled": "JavaScript ファイル内で CodeLens の参照を有効/無効にします。", + "typescript.referencesCodeLens.enabled": "TypeScript ファイル内で CodeLens の参照を有効/無効にします。TypeScript 2.0.6 以上が必要です。", "typescript.implementationsCodeLens.enabled": "CodeLens の実装を有効/無効にします。TypeScript 2.2.0 以上が必要です。", - "typescript.openTsServerLog.title": "TS サーバーのログ ファイルを開く", + "typescript.openTsServerLog.title": "TS サーバーのログを開く", + "typescript.restartTsServer": "TS サーバーを再起動する", "typescript.selectTypeScriptVersion.title": "TypeScript のバージョンの選択", - "jsDocCompletion.enabled": " 自動 JSDoc コメントを有効/無効にします" + "jsDocCompletion.enabled": " 自動 JSDoc コメントを有効/無効にします", + "javascript.implicitProjectConfig.checkJs": "JavaScript ファイルのセマンティック チェックを有効/無効にします。既存の jsconfi.json や tsconfi.json ファイルの設定はこれより優先されます。TypeScript は 2.3.1 以上である必要があります。", + "typescript.npm": "型定義の自動取得に使用される NPM 実行可能ファイルへのパスを指定します。TypeScript 2.3.4 以上が必要です。", + "typescript.check.npmIsInstalled": "型定義の自動取得に NPM がインストールされているかどうかを確認します。", + "javascript.nameSuggestions": "JavaScript の候補リスト内でファイルから一意の名前を含むかどうかを有効/無効にします。", + "typescript.tsc.autoDetect": "tsc タスクの自動検出をオンにするかオフにするかを制御します。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/jpn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index ea2e47d981329..d00ceb129a0f4 100644 --- a/i18n/jpn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/jpn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -5,9 +5,8 @@ // Do not edit this file. It is machine generated. { "imgMeta": "{0}x{1} {2}", - "largeImageError": "イメージが大きすぎてエディターに表示できません。", - "resourceOpenExternalButton": "イメージを開く", - "resourceOpenExternalText": " 外部プログラムを使用していますか?", + "largeImageError": "画像が非常に大きいため、エディターに表示されません。 ", + "resourceOpenExternalButton": "外部のプログラムを使用して画像を開きますか?", "nativeBinaryError": "このファイルはバイナリか、非常に大きいか、またはサポートされていないテキスト エンコードを使用しているため、エディターに表示されません。", "sizeB": "{0}B", "sizeKB": "{0}KB", diff --git a/i18n/jpn/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/jpn/src/vs/base/common/jsonErrorMessages.i18n.json new file mode 100644 index 0000000000000..21cbaadbdbc51 --- /dev/null +++ b/i18n/jpn/src/vs/base/common/jsonErrorMessages.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error.invalidSymbol": "シンボルが無効です", + "error.invalidNumberFormat": "数値表示形式が無効です", + "error.propertyNameExpected": "プロパティ名が必要です", + "error.valueExpected": "値が必要です", + "error.colonExpected": "コロンが必要です", + "error.commaExpected": "コンマが必要です", + "error.closeBraceExpected": "右中かっこが必要です", + "error.closeBracketExpected": "右角かっこが必要です", + "error.endOfFileExpected": "ファイルの終わりが必要です" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/base/common/keybindingLabels.i18n.json b/i18n/jpn/src/vs/base/common/keybindingLabels.i18n.json new file mode 100644 index 0000000000000..013011fc131fd --- /dev/null +++ b/i18n/jpn/src/vs/base/common/keybindingLabels.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ctrlKey": "Ctrl", + "shiftKey": "Shift", + "altKey": "Alt", + "windowsKey": "Windows", + "ctrlKey.long": "Control", + "shiftKey.long": "Shift", + "altKey.long": "Alt", + "cmdKey.long": "コマンド", + "windowsKey.long": "Windows" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/code/electron-main/menus.i18n.json b/i18n/jpn/src/vs/code/electron-main/menus.i18n.json index a1b610411e1bc..2fe6ee8d43e27 100644 --- a/i18n/jpn/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/jpn/src/vs/code/electron-main/menus.i18n.json @@ -14,6 +14,7 @@ "mHelp": "ヘルプ(&&H)", "miNewWindow": "新しいウィンドウ(&&W)", "mAbout": "{0} のバージョン情報", + "mServices": "サービス", "mHide": "{0} を非表示にする", "mHideOthers": "その他を非表示にする", "mShowAll": "すべて表示", @@ -40,6 +41,7 @@ "miSelectIconTheme": "ファイル アイコンのテーマ(&&I)", "miPreferences": "基本設定(&&P)", "miReopenClosedEditor": "閉じたエディターを再度開く(&&R)", + "miMore": "その他(&&M)...", "miClearRecentOpen": "最近使用したファイルのクリア(&&C)", "miUndo": "元に戻す(&&U)", "miRedo": "やり直し(&&R)", @@ -57,7 +59,7 @@ "miInsertCursorAbove": "カーソルを上に挿入(&&A)", "miInsertCursorBelow": "カーソルを下に挿入(&&D)", "miInsertCursorAtEndOfEachLineSelected": "カーソルを行末に挿入(&&U)", - "miAddSelectionToNextFindMatch": "次の出現個所を追加(&&N)", + "miAddSelectionToNextFindMatch": "次の出現箇所を追加(&&N)", "miAddSelectionToPreviousFindMatch": "前の出現箇所を追加(&&R)", "miSelectHighlights": "すべての出現箇所を選択(&&O)", "miCopyLinesUp": "行を上へコピー(&&C)", @@ -69,7 +71,7 @@ "miSmartSelectShrink": "選択範囲の縮小(&&S)", "miViewExplorer": "エクスプローラー(&&E)", "miViewSearch": "検索(&&S)", - "miViewGit": "Git(&&G)", + "miViewSCM": "SCM(&&S)", "miViewDebug": "デバッグ(&&D)", "miViewExtensions": "拡張機能(&&X)", "miToggleOutput": "出力(&&O)", @@ -114,6 +116,8 @@ "miGotoSymbolInFile": "ファイル内のシンボルへ移動(&&S)...", "miGotoSymbolInWorkspace": "ワークスペース内のシンボルへ移動(&&W)...", "miGotoDefinition": "定義に移動(&&D)", + "miGotoTypeDefinition": "型定義に移動(&&T)", + "miGotoImplementation": "実装に移動(&&I)", "miGotoLine": "指定行へ移動(&&L)...", "miStartDebugging": "デバッグの開始(&&S)", "miStartWithoutDebugging": "デバッグなしで開始(&&W)", @@ -130,16 +134,19 @@ "miColumnBreakpoint": "列のブレークポイント(&&O)", "miFunctionBreakpoint": "関数のブレークポイント(&&F)...", "miNewBreakpoint": "新しいブレークポイント(&&N)", + "miEnableAllBreakpoints": "すべてのブレークポイントを有効にする", "miDisableAllBreakpoints": "すべてのブレークポイントを無効にする(&&L)", "miRemoveAllBreakpoints": "すべてのブレークポイントを削除する(&&R)", "miInstallAdditionalDebuggers": "その他のデバッガーをインストールします(&&I)...", "mMinimize": "最小化", - "mClose": "閉じる", + "mZoom": "ズーム", "mBringToFront": "すべてを前面に配置", + "miSwitchWindow": "ウィンドウの切り替え(&&W)...", "miToggleDevTools": "開発者ツールの切り替え(&&T)", "miAccessibilityOptions": "ユーザー補助オプション(&&O)", "miReportIssues": "問題の報告(&&I)", "miWelcome": "ようこそ(&&W)", + "miInteractivePlayground": "対話型プレイグラウンド(&&I)", "miDocumentation": "参照資料(&&D)", "miReleaseNotes": "リリース ノート(&&R)", "miKeyboardShortcuts": "キーボード ショートカットの参照(&&K)", @@ -149,7 +156,8 @@ "miLicense": "ライセンスの表示(&&L)", "miPrivacyStatement": "プライバシーについて(&&P)", "miAbout": "バージョン情報(&&A)", - "miRestartToUpdate": "更新のために再起動します...", + "miRunTask": "タスクの実行(&&R)...", + "accessibilityOptionsWindowTitle": "ユーザー補助オプション", "miCheckingForUpdates": "更新を確認しています...", "miDownloadUpdate": "利用可能な更新プログラムをダウンロードします", "miDownloadingUpdate": "更新をダウンロードしています...", diff --git a/i18n/jpn/src/vs/code/electron-main/windows.i18n.json b/i18n/jpn/src/vs/code/electron-main/windows.i18n.json index 6b0480ce2d2eb..d8c6d81fa40ec 100644 --- a/i18n/jpn/src/vs/code/electron-main/windows.i18n.json +++ b/i18n/jpn/src/vs/code/electron-main/windows.i18n.json @@ -7,7 +7,6 @@ "ok": "OK", "pathNotExistTitle": "パスが存在しません", "pathNotExistDetail": "パス '{0}' はディスクに存在しなくなったようです。", - "accessibilityOptionsWindowTitle": "ユーザー補助オプション", "reopen": "もう一度開く", "wait": "待機を続ける", "close": "閉じる", @@ -15,8 +14,6 @@ "appStalledDetail": "ウィンドウを再度開くか、閉じるか、このまま待機できます。", "appCrashed": "ウィンドウがクラッシュしました", "appCrashedDetail": "ご不便をおかけして申し訳ありません。ウィンドウを再度開いて、中断したところから続行できます。", - "newWindow": "新しいウィンドウ", - "newWindowDesc": "新しいウィンドウを開く", - "recentFolders": "最近使用したフォルダー", - "folderDesc": "{0} {1}" + "openFile": "ファイルを開く", + "openFolder": "フォルダーを開く" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/browser/widget/diffEditorWidget.i18n.json b/i18n/jpn/src/vs/editor/browser/widget/diffEditorWidget.i18n.json index 8b6ad71cd4e6d..a2fb9aab717a5 100644 --- a/i18n/jpn/src/vs/editor/browser/widget/diffEditorWidget.i18n.json +++ b/i18n/jpn/src/vs/editor/browser/widget/diffEditorWidget.i18n.json @@ -3,4 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "diffEditorInserted": "挿入されたテキストの背景色。", + "diffEditorRemoved": "削除されたテキストの背景色。", + "diffEditorInsertedOutline": "挿入されたテキストの輪郭の色。", + "diffEditorRemovedOutline": "削除されたテキストの輪郭の色。" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/browser/widget/diffReview.i18n.json b/i18n/jpn/src/vs/editor/browser/widget/diffReview.i18n.json new file mode 100644 index 0000000000000..e6139bff34906 --- /dev/null +++ b/i18n/jpn/src/vs/editor/browser/widget/diffReview.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "閉じる" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json index 3086fa1d3673b..b100beeb02aaf 100644 --- a/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -9,6 +9,7 @@ "fontWeight": "フォントの太さを制御します。", "fontSize": "フォント サイズをピクセル単位で制御します。", "lineHeight": "行の高さを制御します。fontSize に基づいて lineHeight を計算する場合には、0 を使用します。", + "letterSpacing": "文字の間隔をピクセル単位で制御します。", "lineNumbers": "行番号の表示を制御します。使用可能な値は、'on'、'off'、および 'relative' です。'relative' は現在のカーソル位置からの行数を示します。", "rulers": "垂直ルーラーを表示する列", "wordSeparators": "単語に関連したナビゲーションまたは操作を実行するときに、単語の区切り文字として使用される文字", @@ -20,8 +21,11 @@ "roundedSelection": "選択範囲の角を丸くするかどうかを制御します", "scrollBeyondLastLine": "エディターで最後の行を越えてスクロールするかどうかを制御します", "minimap.enabled": "ミニマップを表示するかどうかを制御します", + "minimap.showSlider": "ミニマップを自動的に非表示にするかどうかを制御します 。", "minimap.renderCharacters": "行に (カラー ブロックではなく) 実際の文字を表示します", "minimap.maxColumn": "表示するミニマップの最大幅を特定の桁数に制限します", + "find.seedSearchStringFromSelection": "エディターの選択から検索ウィジェット内の検索文字列を与えるかどうかを制御します", + "find.autoFindInSelection": "エディター内で複数の文字もしくは行が選択されているときに選択範囲を検索するフラグを有効にするかどうかを制御します", "wordWrap.off": "行を折り返しません。", "wordWrap.on": "行をビューポートの幅で折り返します。", "wordWrap.wordWrapColumn": "行を 'editor.wordWrapColumn' で折り返します。", @@ -30,17 +34,20 @@ "wordWrapColumn": "'editor.wordWrap' が 'wordWrapColumn' または 'bounded' の場合に、エディターの折り返し桁を制御します。", "wrappingIndent": "折り返し行のインデントを制御します。'none'、'same'、または 'indent' のいずれかを指定できます。", "mouseWheelScrollSensitivity": "マウス ホイール スクロール イベントの `deltaX` と `deltaY` で使用される乗数", + "multiCursorModifier.ctrlCmd": "Windows および Linux 上の `Control` と OSX 上の `Command` にマップします。", + "multiCursorModifier.alt": "Windows および Linux 上の `Alt` と OSX 上の `Option` にマップします。", + "multiCursorModifier": "マウスで複数のカーソルを追加するときに使用する修飾キーです。`ctrlCmd` は Windows および Linux 上の `Control` キーと OSX 上の `Command` キーにマップします。「定義に移動」や「リンクを開く」のマウス操作は、マルチカーソルの修飾キーと競合しないように適用されます。", "quickSuggestions.strings": "文字列内でクイック候補を有効にします。", "quickSuggestions.comments": "コメント内でクイック候補を有効にします。", "quickSuggestions.other": "文字列およびコメント外でクイック候補を有効にします。", "quickSuggestions": "入力中に候補を自動的に表示するかどうかを制御します", "quickSuggestionsDelay": "クイック候補が表示されるまでの待ち時間 (ミリ秒) を制御します", - "parameterHints": "パラメーター ヒントを有効にする", + "parameterHints": "入力時にパラメーター ドキュメントと型情報を表示するポップアップを有効にする", "autoClosingBrackets": "エディターで左角かっこの後に自動的に右角かっこを挿入するかどうかを制御します", "formatOnType": "エディターで入力後に自動的に行の書式設定を行うかどうかを制御します", "formatOnPaste": "貼り付けた内容がエディターにより自動的にフォーマットされるかどうかを制御します。フォーマッタを使用可能にする必要があります。また、フォーマッタがドキュメント内の範囲をフォーマットできなければなりません。", "suggestOnTriggerCharacters": "トリガー文字の入力時に候補が自動的に表示されるようにするかどうかを制御します", - "acceptSuggestionOnEnter": "'Tab' キーに加えて 'Enter' キーで候補を受け入れるかどうかを制御します。改行の挿入や候補の反映の間であいまいさを解消するのに役立ちます。", + "acceptSuggestionOnEnter": "'Tab' キーに加えて 'Enter' キーで候補を受け入れるかどうかを制御します。改行の挿入や候補の反映の間であいまいさを解消するのに役立ちます。'smart' 値は文字を変更するときに、Enter キーを押すだけで提案を反映することを意味します。", "acceptSuggestionOnCommitCharacter": "コミット文字で候補を受け入れるかどうかを制御します。たとえば、JavaScript ではセミコロン (';') をコミット文字にして、候補を受け入れてその文字を入力することができます。", "snippetSuggestions": "他の修正候補と一緒にスニペットを表示するかどうか、およびその並び替えの方法を制御します。", "emptySelectionClipboard": "選択範囲を指定しないでコピーする場合に現在の行をコピーするかどうかを制御します。", @@ -60,14 +67,20 @@ "renderControlCharacters": "エディターで制御文字を表示する必要があるかどうかを制御します", "renderIndentGuides": "エディターでインデントのガイドを表示する必要があるかどうかを制御します", "renderLineHighlight": "エディターが現在の行をどのように強調表示するかを制御します。考えられる値は 'none'、'gutter'、'line'、'all' です。", - "codeLens": "エディターでコード レンズを表示するかをどうかを制御する", + "codeLens": "エディターで CodeLens を表示するかどうかを制御する", "folding": "エディターでコードの折りたたみを有効にするかどうかを制御します", + "showFoldingControls": "余白上の折りたたみコントロールを自動的に非表示にするかどうかを制御します 。", "matchBrackets": "かっこを選択すると、対応するかっこを強調表示します。", "glyphMargin": "エディターで縦のグリフ余白が表示されるかどうかを制御します。ほとんどの場合、グリフ余白はデバッグに使用されます。", "useTabStops": "空白の挿入や削除はタブ位置に従って行われます", "trimAutoWhitespace": "自動挿入された末尾の空白を削除する", "stablePeek": "エディターのコンテンツをダブルクリックするか、Esc キーを押しても、ピーク エディターを開いたままにします。", "dragAndDrop": "ドラッグ アンド ドロップによる選択範囲の移動をエディターが許可する必要があるかどうかを制御します。", + "accessibilitySupport.auto": "エディターはスクリーン リーダーがいつ接続されたかを検出するためにプラットフォーム API を使用します。", + "accessibilitySupport.on": "エディターは永続的にスクリーン リーダー向けに最適化されます。", + "accessibilitySupport.off": "エディターはスクリーン リーダー向けに最適化されません。", + "accessibilitySupport": "エディターをスクリーン リーダーに最適化されたモードで実行するかどうかを制御します。", + "links": "エディターがリンクを検出してクリック可能な状態にするかどうかを制御します", "sideBySide": "差分エディターが差分を横に並べて表示するか、行内に表示するかを制御します", "ignoreTrimWhitespace": "差分エディターが、先頭または末尾の空白の変更を差分として表示するかどうかを制御します。", "renderIndicators": "差分エディターが追加/削除された変更に +/- インジケーターを示すかどうかを制御します", diff --git a/i18n/jpn/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/jpn/src/vs/editor/common/config/editorOptions.i18n.json new file mode 100644 index 0000000000000..be8d7821ab4ee --- /dev/null +++ b/i18n/jpn/src/vs/editor/common/config/editorOptions.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "accessibilityOffAriaLabel": "現在エディターにアクセスすることはできません。 Alt + F1 キーを押してオプションを選択します。", + "editorViewAccessibleLabel": "エディターのコンテンツ" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/common/services/bulkEdit.i18n.json b/i18n/jpn/src/vs/editor/common/services/bulkEdit.i18n.json index cc203857d2ae4..4c84c291c572b 100644 --- a/i18n/jpn/src/vs/editor/common/services/bulkEdit.i18n.json +++ b/i18n/jpn/src/vs/editor/common/services/bulkEdit.i18n.json @@ -6,5 +6,6 @@ { "conflict": "この間に次のファイルが変更されました: {0}", "summary.0": "編集は行われませんでした", + "summary.nm": "{1} 個のファイルで {0} 件のテキスト編集を実行", "summary.n0": "1 つのファイルで {0} 個のテキストを編集" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/jpn/src/vs/editor/common/view/editorColorRegistry.i18n.json index 005a4a5743eac..b380e645e9860 100644 --- a/i18n/jpn/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/jpn/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -10,5 +10,15 @@ "caret": "エディターのカーソルの色。", "editorWhitespaces": "エディターのスペース文字の色。", "editorIndentGuides": "エディター インデント ガイドの色。", - "editorLineNumbers": "エディターの行番号の色。" + "editorLineNumbers": "エディターの行番号の色。", + "editorRuler": "エディター ルーラーの色。", + "editorCodeLensForeground": "CodeLens エディターの前景色。", + "editorBracketMatchBackground": "一致するかっこの背景色", + "editorBracketMatchBorder": "一致するかっこ内のボックスの色", + "editorOverviewRulerBorder": "概要ルーラーの境界色。", + "editorGutter": "エディターの余白の背景色。余白にはグリフ マージンと行番号が含まれます。", + "errorForeground": "エディターでエラーを示す波線の前景色。", + "errorBorder": "エディターでエラーを示す波線の境界線の色。", + "warningForeground": "エディターで警告を示す波線の前景色。", + "warningBorder": "エディターで警告を示す波線の境界線の色。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/find/common/findController.i18n.json b/i18n/jpn/src/vs/editor/contrib/find/common/findController.i18n.json index 873ccff036a9b..69f79ae9b1240 100644 --- a/i18n/jpn/src/vs/editor/contrib/find/common/findController.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/find/common/findController.i18n.json @@ -14,6 +14,6 @@ "addSelectionToPreviousFindMatch": "選んだ項目を前の一致項目に追加する", "moveSelectionToNextFindMatch": "最後に選択した項目を次の一致項目に移動", "moveSelectionToPreviousFindMatch": "最後に選んだ項目を前の一致項目に移動する", - "selectAllOccurencesOfFindMatch": "一致するすべての出現箇所を選択します", + "selectAllOccurrencesOfFindMatch": "一致するすべての出現箇所を選択します", "changeAll.label": "すべての出現箇所を変更" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/format/browser/formatActions.i18n.json b/i18n/jpn/src/vs/editor/contrib/format/browser/formatActions.i18n.json index d1fd1741e7486..fb7ac8bef6037 100644 --- a/i18n/jpn/src/vs/editor/contrib/format/browser/formatActions.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/format/browser/formatActions.i18n.json @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "hint11": "Made 1 formatting edit on line {0}", - "hintn1": "Made {0} formatting edits on line {1}", - "hint1n": "Made 1 formatting edit between lines {0} and {1}", - "hintnn": "Made {0} formatting edits between lines {1} and {2}", - "formatDocument.label": "Format Document", - "formatSelection.label": "Format Selection" + "hint11": "行 {0} で 1 つの書式設定を編集", + "hintn1": "行 {1} で {0} 個の書式設定を編集", + "hint1n": "行 {0} と {1} の間で 1 つの書式設定を編集", + "hintnn": "行 {1} と {2} の間で {0} 個の書式設定を編集", + "formatDocument.label": "ドキュメントのフォーマット", + "formatSelection.label": "選択範囲のフォーマット" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/jpn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..624f9b7af7030 --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "'{0}' の定義は見つかりません", + "generic.noResults": "定義が見つかりません", + "meta.title": " – {0} 個の定義", + "actions.goToDecl.label": "定義へ移動", + "actions.goToDeclToSide.label": "定義を横に開く", + "actions.previewDecl.label": "定義をここに表示", + "goToImplementation.noResultWord": "'{0}' の実装が見つかりません", + "goToImplementation.generic.noResults": "実装が見つかりません", + "meta.implementations.title": "– {0} 個の実装", + "actions.goToImplementation.label": "実装に移動", + "actions.peekImplementation.label": "実装のプレビュー", + "goToTypeDefinition.noResultWord": "'{0}' の型定義が見つかりません", + "goToTypeDefinition.generic.noResults": "型定義が見つかりません", + "meta.typeDefinitions.title": " – {0} 個の型定義", + "actions.goToTypeDefinition.label": "型定義へ移動", + "actions.peekTypeDefinition.label": "型定義を表示" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/jpn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..f918ba9f96d5c --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "クリックして、{0} の定義を表示します。" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/hover/browser/hover.i18n.json b/i18n/jpn/src/vs/editor/contrib/hover/browser/hover.i18n.json index 59dfc6718b618..13ad716271957 100644 --- a/i18n/jpn/src/vs/editor/contrib/hover/browser/hover.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/hover/browser/hover.i18n.json @@ -4,8 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "showHover": "ホバーの表示", - "hoverHighlight": "ホバーが表示されているワードの下を強調表示します。", - "hoverBackground": "エディター ホバーの背景色。", - "hoverBorder": "エディター ホバーの境界線の色。" + "showHover": "ホバーの表示" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/links/browser/links.i18n.json b/i18n/jpn/src/vs/editor/contrib/links/browser/links.i18n.json index 178a2d932ba15..67812ff35d18c 100644 --- a/i18n/jpn/src/vs/editor/contrib/links/browser/links.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/links/browser/links.i18n.json @@ -6,6 +6,7 @@ { "links.navigate.mac": "command キーを押しながらクリックしてリンク先を表示", "links.navigate": "Ctrl キーを押しながらクリックしてリンク先を表示", + "links.navigate.al": "Altl キーを押しながらクリックしてリンク先を表示", "invalid.url": "申し訳ありません。このリンクは形式が正しくないため開くことができませんでした: {0}", "missing.url": "申し訳ありません。このリンクはターゲットが存在しないため開くことができませんでした。", "label": "リンクを開く" diff --git a/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index bbd5849c3280b..00407b4d7e343 100644 --- a/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -4,5 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "aria.result.0": "一致する項目はありません" + "aria.oneReference": "列 {2} の {1} 行目に {0} つのシンボル", + "aria.fileReferences.1": "{0} に 1 個のシンボル、完全なパス {1}", + "aria.fileReferences.N": "{1} に {0} 個のシンボル、完全なパス {2}", + "aria.result.0": "一致する項目はありません", + "aria.result.1": "{0} に 1 個のシンボルが見つかりました", + "aria.result.n1": "{1} に {0} 個のシンボルが見つかりました", + "aria.result.nm": "{1} 個のファイルに {0} 個のシンボルが見つかりました" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index f8423f1578979..8fedf2e46b023 100644 --- a/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -12,15 +12,16 @@ "noResults": "結果がありません", "peekView.alternateTitle": "参照", "peekViewTitleBackground": "ピーク ビューのタイトル領域の背景色。", - "peekViewTitle": "ピーク ビュー タイトルの色。", - "peekViewTitleInfo": "ピーク ビューのタイトル情報の色。", + "peekViewTitleForeground": "ピーク ビュー タイトルの色。", + "peekViewTitleInfoForeground": "ピーク ビューのタイトル情報の色。", "peekViewBorder": "ピーク ビューの境界と矢印の色。", "peekViewResultsBackground": "ピーク ビュー結果リストの背景色。", - "peekViewResultsMatchForeground": "ピーク ビュー結果リストの一致したエントリの前景色。", - "peekViewResultsFileForeground": "ピーク ビュー結果リストのファイル エントリの前景色。", + "peekViewResultsMatchForeground": "ピーク ビュー結果リストのライン ノードの前景色。", + "peekViewResultsFileForeground": "ピーク ビュー結果リストのファイル ノードの前景色。", "peekViewResultsSelectionBackground": "ピーク ビュー結果リストの選択済みエントリの背景色。", "peekViewResultsSelectionForeground": "ピーク ビュー結果リストの選択済みエントリの前景色。", "peekViewEditorBackground": "ピーク ビュー エディターの背景色。", + "peekViewEditorGutterBackground": "ピーク ビュー エディターの余白の背景色。", "peekViewResultsMatchHighlight": "ピーク ビュー結果リストの一致した強調表示色。", "peekViewEditorMatchHighlight": "ピーク ビュー エディターの一致した強調表示色。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/rename/browser/rename.i18n.json b/i18n/jpn/src/vs/editor/contrib/rename/browser/rename.i18n.json index ed8c58a40b49d..65225095897b6 100644 --- a/i18n/jpn/src/vs/editor/contrib/rename/browser/rename.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/rename/browser/rename.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "no result": "結果がありません。", + "aria": "'{0}' から '{1}' への名前変更が正常に完了しました。概要: {2}", "rename.failed": "申し訳ありません。名前の変更を実行できませんでした。", "rename.label": "シンボルの名前を変更" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json b/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json index 7042c13c94b8c..1c7707699b8b4 100644 --- a/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "arai.alert.snippet": "'{0}' が次のテキストを挿入したことを承認しています: {1}", "suggest.trigger.label": "候補をトリガー" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index c7b3adcfa1ecb..65e2583d291f2 100644 --- a/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -5,10 +5,14 @@ // Do not edit this file. It is machine generated. { "editorSuggestWidgetBackground": "候補のウィジェットの背景色。", + "editorSuggestWidgetBorder": "候補ウィジェットの境界線色。", + "editorSuggestWidgetForeground": "候補ウィジェットの前景色。", + "editorSuggestWidgetSelectedBackground": "候補ウィジェット内で選択済みエントリの背景色。", + "editorSuggestWidgetHighlightForeground": "候補のウィジェット内で一致したハイライトの色。", "readMore": "詳細を表示...{0}", "suggestionWithDetailsAriaLabel": "{0}、候補、詳細あり", "suggestionAriaLabel": "{0}、候補", - "goback": "戻る", + "readLess": "詳細を隠す...{0}", "suggestWidget.loading": "読み込んでいます...", "suggestWidget.noSuggestions": "候補はありません。", "suggestionAriaAccepted": "{0}、受け入れ済み", diff --git a/i18n/jpn/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/jpn/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json index 918be3ac1a135..7f3e60f73e417 100644 --- a/i18n/jpn/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json +++ b/i18n/jpn/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -15,5 +15,9 @@ "schema.brackets": "インデントを増減する角かっこを定義します。", "schema.autoClosingPairs": "角かっこのペアを定義します。左角かっこが入力されると、右角かっこが自動的に挿入されます。", "schema.autoClosingPairs.notIn": "自動ペアが無効なスコープの一覧を定義します。", - "schema.surroundingPairs": "選択文字列を囲むときに使用できる角かっこのペアを定義します。" + "schema.surroundingPairs": "選択文字列を囲むときに使用できる角かっこのペアを定義します。", + "schema.wordPattern": "言語のための単語の定義。", + "schema.wordPattern.pattern": "言葉の照合に使用する正規表現パターン。", + "schema.wordPattern.flags": "言葉の照合に使用する正規表現フラグ。", + "schema.wordPattern.flags.errorMessage": "`/^([gimuy]+)$/` パターンに一致する必要があります。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/jpn/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json index 5a962ce17d0b2..36b95788727ff 100644 --- a/i18n/jpn/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json +++ b/i18n/jpn/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -5,8 +5,8 @@ // Do not edit this file. It is machine generated. { "requirearray": "メニュー項目は配列にする必要があります", - "requirestring": "プロパティ `{0}` は必須で、型 `string` でなければなりません", - "optstring": "プロパティ `{0}` は省略するか、型 `string` にする必要があります", + "requirestring": "`{0}` プロパティは必須で、`string` 型でなければなりません", + "optstring": "`{0}` プロパティは省略するか、`string` 型にする必要があります", "vscode.extension.contributes.menuItem.command": "実行するコマンドの識別子。コマンドは 'commands' セクションで宣言する必要があります", "vscode.extension.contributes.menuItem.alt": "実行する別のコマンドの識別子。コマンドは 'commands' セクションで宣言する必要があります", "vscode.extension.contributes.menuItem.when": "この項目を表示するために満たす必要がある条件", @@ -21,10 +21,12 @@ "menus.scmTitle": "ソース管理のタイトル メニュー", "menus.resourceGroupContext": "ソース管理リソース グループのコンテキスト メニュー", "menus.resourceStateContext": "ソース管理リソース状態のコンテキスト メニュー", + "view.viewTitle": "提供されたビューのタイトル メニュー", + "view.itemContext": "提供されたビュー項目のコンテキスト メニュー", "nonempty": "空以外の値が必要です。", - "opticon": "プロパティ `icon` は省略できます。指定する場合には、文字列または `{dark, light}` などのリテラルにする必要があります", - "requireStringOrObject": "プロパティ `{0}` は必須で、`string` または `object` の型でなければなりません", - "requirestrings": "プロパティ `{0}` と `{1}` は必須で、型 `string` でなければなりません", + "opticon": "`icon` プロパティは省略できます。指定する場合には、文字列または `{dark, light}` などのリテラルにする必要があります", + "requireStringOrObject": "`{0}` プロパティは必須で、`string` または `object` の型でなければなりません", + "requirestrings": "プロパティの `{0}` と `{1}` は必須で、`string` 型でなければなりません", "vscode.extension.contributes.commandType.command": "実行するコマンドの識別子", "vscode.extension.contributes.commandType.title": "コマンドが UI に表示される際のタイトル", "vscode.extension.contributes.commandType.category": "(省略可能) コマンド別のカテゴリ文字列が UI でグループ分けされます", diff --git a/i18n/jpn/src/vs/platform/configuration/common/configurationRegistry.i18n.json b/i18n/jpn/src/vs/platform/configuration/common/configurationRegistry.i18n.json index e0cc51a300c3f..e9723346c0895 100644 --- a/i18n/jpn/src/vs/platform/configuration/common/configurationRegistry.i18n.json +++ b/i18n/jpn/src/vs/platform/configuration/common/configurationRegistry.i18n.json @@ -7,13 +7,6 @@ "defaultConfigurations.title": "既定の構成オーバーライド", "overrideSettings.description": "{0} 言語に対して上書きされるエディター設定を構成します。", "overrideSettings.defaultDescription": "言語に対して上書きされるエディター設定を構成します。", - "vscode.extension.contributes.configuration": "構成の設定を提供します。", - "vscode.extension.contributes.configuration.title": "設定の概要です。このラベルは、設定ファイルでコメントの区切り文字として使用します。", - "vscode.extension.contributes.configuration.properties": "構成のプロパティの説明です。", "config.property.languageDefault": "'{0}' を登録できません。これは、言語固有のエディター設定を記述するプロパティ パターン '\\\\[.*\\\\]$' に一致しています。'configurationDefaults' コントリビューションを使用してください。", - "config.property.duplicate": "'{0}' を登録できません。このプロパティは既に登録されています。", - "invalid.properties": "'configuration.properties' は、オブジェクトである必要があります", - "invalid.type": "設定すると、'configuration.type' は 'オブジェクトに設定されなければなりません", - "invalid.title": "'configuration.title' は、文字列である必要があります", - "vscode.extension.contributes.defaultConfiguration": "言語ごとに既定のエディター構成の設定を提供します。" + "config.property.duplicate": "'{0}' を登録できません。このプロパティは既に登録されています。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/platform/environment/node/argv.i18n.json b/i18n/jpn/src/vs/platform/environment/node/argv.i18n.json index b51838a0db547..6cd2c2e4b34ac 100644 --- a/i18n/jpn/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/jpn/src/vs/platform/environment/node/argv.i18n.json @@ -6,24 +6,25 @@ { "gotoValidation": "`--goto` モードの引数は `FILE(:LINE(:CHARACTER))` の形式にする必要があります。", "diff": "差分エディターを開きます。引数として 2 つのファイル パスを渡す必要があります。", - "goto": "指定の行と文字のパスのファイルを開きます (パスに :line[:character] を追加します)。", - "locale": "使用するロケール (例: en-US、zh-TW など)。", - "newWindow": "新しいコード インスタンスを強制します。", + "goto": "指定の行と文字の位置でファイルを開きます(パスに :line[:character] を追加してください)。", + "locale": "使用する国と地域 (例:en-US や zh-TW など)。", + "newWindow": "新しい Code のインスタンスを強制します。", "performance": "'Developer: Startup Performance' コマンドを有効にして開始します。", "prof-startup": "起動中に CPU プロファイラーを実行する", "reuseWindow": "最後のアクティブ ウィンドウにファイルまたはフォルダーを強制的に開きます。", "userDataDir": "ユーザー データを保持するディレクトリを指定します。ルートで実行している場合に役立ちます。", - "verbose": "詳細出力を印刷します (お待ちください)。", - "wait": "戻る前にウィンドウが閉じるまでお待ちください。", + "verbose": "詳細出力を表示します (--wait を含みます)。", + "wait": "現在のウィンドウが閉じるまで待機します。", "extensionHomePath": "拡張機能のルート パスを設定します。", "listExtensions": "インストールされている拡張機能を一覧表示します。", - "showVersions": "#NAME?", + "showVersions": "--list-extension と使用するとき、インストールされている拡張機能のバージョンを表示します。", "installExtension": "拡張機能をインストールします。", "uninstallExtension": "拡張機能をアンインストールします。", + "experimentalApis": "拡張機能に対して Proposed API 機能を有効にします。", "disableExtensions": "インストールされたすべての拡張機能を無効にします。", "disableGPU": "GPU ハードウェア アクセラレータを無効にします。", - "version": "バージョンを印刷します。", - "help": "使用法を印刷します。", + "version": "バージョンを表示します。", + "help": "使用法を表示します。", "usage": "使用法", "options": "オプション", "paths": "パス", diff --git a/i18n/jpn/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/jpn/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index ae0dfa88edb83..38e5bf8d7a177 100644 --- a/i18n/jpn/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/jpn/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -14,6 +14,12 @@ "vscode.extension.contributes": "このパッケージで表される VS Code 拡張機能のすべてのコントリビューション。", "vscode.extension.preview": "Marketplace で Preview としてフラグが付けられるように拡張機能を設定します。", "vscode.extension.activationEvents": "VS Code 拡張機能のアクティブ化イベント。", + "vscode.extension.activationEvents.onLanguage": "指定された言語を解決するファイルが開かれるたびにアクティブ化イベントが発行されます。", + "vscode.extension.activationEvents.onCommand": "指定したコマンドが呼び出されるたびにアクティブ化イベントが発行されます。", + "vscode.extension.activationEvents.onDebug": "指定されたタイプのデバッグ セッションが開始されるたびにアクティブ化イベントが発行されます。", + "vscode.extension.activationEvents.workspaceContains": "指定した glob パターンに一致するファイルを少なくとも 1 つ以上含むフォルダーを開くたびにアクティブ化イベントが発行されます。", + "vscode.extension.activationEvents.onView": "指定したビューを展開するたびにアクティブ化イベントが発行されます。", + "vscode.extension.activationEvents.star": "VS Code 起動時にアクティブ化イベントを発行します。優れたエンドユーザー エクスペリエンスを確保するために、他のアクティブ化イベントの組み合わせでは望む動作にならないときのみ使用してください。", "vscode.extension.badges": "Marketplace の拡張機能ページのサイドバーに表示されるバッジの配列。", "vscode.extension.badges.url": "バッジのイメージ URL。", "vscode.extension.badges.href": "バッジのリンク。", diff --git a/i18n/jpn/src/vs/platform/extensions/node/extensionValidator.i18n.json b/i18n/jpn/src/vs/platform/extensions/node/extensionValidator.i18n.json index d8c385410db94..f3a171986705e 100644 --- a/i18n/jpn/src/vs/platform/extensions/node/extensionValidator.i18n.json +++ b/i18n/jpn/src/vs/platform/extensions/node/extensionValidator.i18n.json @@ -9,15 +9,15 @@ "versionSpecificity2": "`engines.vscode` ({0}) で指定されたバージョンが明確ではありません。1.0.0 より後のバージョンの vscode の場合は、少なくとも、想定されているメジャー バージョンを定義してください。例 ^1.10.0、1.10.x、1.x.x、2.x.x など。", "versionMismatch": "拡張機能が Code {0} と互換性がありません。拡張機能に必要なバージョン: {1}。", "extensionDescription.empty": "空の拡張機能の説明を入手しました", - "extensionDescription.publisher": "プロパティ `{0}` は必須で、型 `string` でなければなりません", - "extensionDescription.name": "プロパティ `{0}` は必須で、型 `string` でなければなりません", - "extensionDescription.version": "プロパティ `{0}` は必須で、型 `string` でなければなりません", - "extensionDescription.engines": "プロパティ `{0}` は必須で、型 `object` でなければなりません", - "extensionDescription.engines.vscode": "プロパティ `{0}` は必須で、型 `string` でなければなりません", - "extensionDescription.extensionDependencies": "プロパティ `{0}` は省略するか、型 `string[]` にする必要があります", - "extensionDescription.activationEvents1": "プロパティ `{0}` は省略するか、型 `string[]` にする必要があります", + "extensionDescription.publisher": "`{0}` プロパティは必須で、`string` 型でなければなりません", + "extensionDescription.name": "`{0}` プロパティは必須で、`string` 型でなければなりません", + "extensionDescription.version": "`{0}` プロパティは必須で、`string` 型でなければなりません", + "extensionDescription.engines": "`{0}` プロパティは必須で、`string` 型でなければなりません", + "extensionDescription.engines.vscode": "`{0}` プロパティは必須で、`string` 型でなければなりません", + "extensionDescription.extensionDependencies": "`{0}` プロパティは省略するか、`string[]` 型にする必要があります", + "extensionDescription.activationEvents1": "`{0}` プロパティは省略するか、`string[]` 型にする必要があります", "extensionDescription.activationEvents2": "プロパティ `{0}` と `{1}` は、両方とも指定するか両方とも省略しなければなりません", - "extensionDescription.main1": "プロパティ `{0}` は省略するか、型 `string` にする必要があります", + "extensionDescription.main1": "`{0}` プロパティは省略するか、`string` 型にする必要があります", "extensionDescription.main2": "拡張機能のフォルダー ({1}) の中に `main` ({0}) が含まれることが予期されます。これにより拡張機能を移植できなくなる可能性があります。", "extensionDescription.main3": "プロパティ `{0}` と `{1}` は、両方とも指定するか両方とも省略しなければなりません", "notSemver": "拡張機能のバージョンが semver と互換性がありません。" diff --git a/i18n/jpn/src/vs/platform/history/electron-main/historyMainService.i18n.json b/i18n/jpn/src/vs/platform/history/electron-main/historyMainService.i18n.json new file mode 100644 index 0000000000000..da8dfc2d76350 --- /dev/null +++ b/i18n/jpn/src/vs/platform/history/electron-main/historyMainService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "newWindow": "新しいウィンドウ", + "newWindowDesc": "新しいウィンドウを開く", + "recentFolders": "最近使用したフォルダー", + "folderDesc": "{0} {1}" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/jpn/src/vs/platform/markers/common/problemMatcher.i18n.json index a9185ba12c4db..a7b5bb6b6c55e 100644 --- a/i18n/jpn/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/jpn/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -25,13 +25,16 @@ "ProblemPatternExtPoint": "問題パターンを提供", "ProblemPatternRegistry.error": "無効な問題パターンです。パターンは無視されます。", "ProblemMatcherParser.noProblemMatcher": "エラー: 説明を問題マッチャーに変換することができません:\n{0}\n", + "ProblemMatcherParser.noProblemPattern": "エラー: 説明に有効な問題パターンが定義されていません:\n{0}\n", + "ProblemMatcherParser.noOwner": "エラー: 説明に所有者が定義されていません:\n{0}\n", + "ProblemMatcherParser.noFileLocation": "エラー: 説明にファイルの場所が定義されていません:\n{0}\n", "ProblemMatcherParser.unknownSeverity": "情報: 不明な重大度 {0}。有効な値は、error、warning、info です。\n", "ProblemMatcherParser.noDefinedPatter": "エラー: 識別子 {0} のパターンは存在しません。", "ProblemMatcherParser.noIdentifier": "エラー: パターン プロパティが空の識別子を参照しています。", "ProblemMatcherParser.noValidIdentifier": "エラー: パターン プロパティ {0} は有効なパターン変数名ではありません。", "ProblemMatcherParser.problemPattern.watchingMatcher": "問題マッチャーは、ウォッチ対象の開始パターンと終了パターンの両方を定義する必要があります。", "ProblemMatcherParser.invalidRegexp": "エラー: 文字列 {0} は、有効な正規表現ではありません。\n", - "WatchingPatternSchema.regexp": "ウォッチ中タスクの開始または終了を検出する正規表現。", + "WatchingPatternSchema.regexp": "バックグラウンド タスクの開始または終了を検出する正規表現。", "WatchingPatternSchema.file": "ファイル名の一致グループ インデックス。省略できます。", "PatternTypeSchema.name": "提供されたか事前定義された問題パターンの名前", "PatternTypeSchema.description": "A problem pattern or the name of a contributed or predefined problem pattern. Can be omitted if base is specified.", @@ -40,14 +43,18 @@ "ProblemMatcherSchema.severity": "キャプチャされた問題の既定の重大度。パターンが重要度の一致グループを定義していない場合に使用されます。", "ProblemMatcherSchema.applyTo": "テキスト ドキュメントで報告された問題が、開いているドキュメントのみ、閉じられたドキュメントのみ、すべてのドキュメントのいずれに適用されるかを制御します。", "ProblemMatcherSchema.fileLocation": "問題パターンで報告されたファイル名を解釈する方法を定義します。", + "ProblemMatcherSchema.background": "バックグラウンド タスクでアクティブなマッチャーの開始と終了を追跡するパターン。", + "ProblemMatcherSchema.background.activeOnStart": "true に設定すると、タスクの開始時にバックグラウンド モニターがアクティブ モードになります。これは beginPattern と一致する行の発行と同等です。", + "ProblemMatcherSchema.background.beginsPattern": "出力内で一致すると、バックグラウンド タスクの開始が通知されます。", + "ProblemMatcherSchema.background.endsPattern": "出力内で一致すると、バックグラウンド タスクの終了が通知されます。", + "ProblemMatcherSchema.watching.deprecated": "watching プロパティは使用されなくなりました。代わりに background をご使用ください。", + "ProblemMatcherSchema.watching": "監視パターンの開始と終了を追跡するマッチャー。", "ProblemMatcherSchema.watching.activeOnStart": "true に設定すると、タスクの開始時にウォッチャーがアクティブ モードになります。これは beginPattern と一致する行の発行と同等です。", "ProblemMatcherSchema.watching.beginsPattern": "出力内で一致すると、ウォッチ中のタスクの開始が通知されます。", "ProblemMatcherSchema.watching.endsPattern": "出力内で一致すると、ウォッチ中のタスクの終了が通知されます。", - "ProblemMatcherSchema.watching": "監視パターンの開始と終了を追跡するパターン。", - "LegacyProblemMatcherSchema.watchedBegin.deprecated": "This property is deprecated. Use the watching property instead.", + "LegacyProblemMatcherSchema.watchedBegin.deprecated": "このプロパティは非推奨です。代わりに watching プロパティをご使用ください。", "LegacyProblemMatcherSchema.watchedBegin": "ファイル ウォッチでトリガーされた ウォッチ対象タスクの実行が開始されたことを伝達する正規表現。", - "LegacyProblemMatcherSchema.watchedEnd.deprecated": "This property is deprecated. Use the watching property instead.", + "LegacyProblemMatcherSchema.watchedEnd.deprecated": "このプロパティは非推奨です。代わりに watching プロパティをご使用ください。", "LegacyProblemMatcherSchema.watchedEnd": "ウォッチ対象タスクの実行が終了したことを伝達する正規表現。", - "NamedProblemMatcherSchema.name": "問題マッチャーの名前。", "ProblemMatcherExtPoint": "問題マッチャーを提供" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json index 9a6df198aca14..6834bbd4b79ee 100644 --- a/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -4,27 +4,84 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.color": "無効な色形式です。#RRGGBB または #RRGGBBAA を使用してください", + "invalid.color": "無効な色形式です。 #RGB、#RGBA、#RRGGBB、#RRGGBBAA のいずれかを使用してください", "schema.colors": "ワークベンチで使用する色。", "foreground": "全体の前景色。この色は、コンポーネントによってオーバーライドされていない場合にのみ使用されます。", - "focusedElementOutline": "フォーカスされた要素の輪郭全体の色。この色は、コンポーネントによってオーバーライドされていない場合にのみ使用されます。", - "highContrastBorder": "ハイ コントラスト テーマが有効になっている場合にコンポーネントを見分けるための境界線の色。", - "highContrastOutline": "ハイ コントラスト テーマが有効になっている場合のアクティブなコンポーネントの輪郭の色。", + "errorForeground": "エラー メッセージ全体の前景色。この色は、コンポーネントによって上書きされていない場合にのみ使用されます。", + "descriptionForeground": "追加情報を提供する説明文の前景色、例:ラベル。", + "focusBorder": "フォーカスされた要素の境界線全体の色。この色はコンポーネントによって上書きされていない場合にのみ使用されます。", + "contrastBorder": "コントラストを強めるために、他の要素と隔てる追加の境界線。", + "activeContrastBorder": "コントラストを強めるために、アクティブな他要素と隔てる追加の境界線。", + "selectionBackground": "ワークベンチ内のテキスト選択の背景色 (例: 入力フィールドやテキストエリア)。エディター内の選択には適用されないことに注意してください。", + "textSeparatorForeground": "テキストの区切り文字の色。", + "textLinkForeground": "テキスト内のリンクの前景色。", + "textLinkActiveForeground": "テキスト内のアクティブなリンクの前景色。", + "textPreformatForeground": "フォーマット済みテキスト セグメントの前景色。", + "textBlockQuoteBackground": "テキスト内のブロック引用の背景色。", + "textBlockQuoteBorder": "テキスト内のブロック引用の境界線色。", + "textCodeBlockBackground": "テキスト内のコード ブロックの背景色。", + "widgetShadow": "エディター内の検索/置換窓など、エディター ウィジェットの影の色。", "inputBoxBackground": "入力ボックスの背景。", "inputBoxForeground": "入力ボックスの前景。", "inputBoxBorder": "入力ボックスの境界線。", "inputBoxActiveOptionBorder": "入力フィールドのアクティブ オプションの境界線の色。", + "inputPlaceholderForeground": "入力ボックスのプレースホルダー テキストの前景色。", + "inputValidationInfoBackground": "情報の重大度を示す入力検証の背景色。", + "inputValidationInfoBorder": "情報の重大度を示す入力検証の境界線色。", + "inputValidationWarningBackground": "警告の重大度を示す入力検証の背景色。", + "inputValidationWarningBorder": "警告の重大度を示す入力検証の境界線色。", + "inputValidationErrorBackground": "エラーの重大度を示す入力検証の背景色。", + "inputValidationErrorBorder": "エラーの重大度を示す入力検証の境界線色。", "dropdownBackground": "ドロップダウンの背景。", "dropdownForeground": "ドロップダウンの前景。", "dropdownBorder": "ドロップダウンの境界線。", + "listFocusBackground": "ツリーリストがアクティブのとき、フォーカスされた項目のツリーリスト背景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。", + "listFocusForeground": "ツリーリストがアクティブのとき、フォーカスされた項目のツリーリスト前景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。", + "listActiveSelectionBackground": "ツリーリストがアクティブのとき、選択された項目のツリーリスト背景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。", + "listActiveSelectionForeground": "ツリーリストがアクティブのとき、選択された項目のツリーリスト前景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。", + "listInactiveSelectionBackground": "ツリーリストが非アクティブのとき、フォーカスされた項目のツリーリスト背景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。", + "listInactiveSelectionForeground": "ツリーリストが非アクティブのとき、選択された項目のツリーリスト前景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。", + "listHoverBackground": "マウス操作で項目をホバーするときのツリーリスト背景。", + "listHoverForeground": "マウス操作で項目をホバーするときのツリーリスト前景。", + "listDropBackground": "マウス操作で項目を移動するときのツリーリスト ドラッグ アンド ドロップの背景。", + "highlight": "ツリーリスト内を検索しているとき、一致した強調のツリーリスト前景色。", + "pickerGroupForeground": "ラベルをグループ化するためのクリック選択の色。", + "pickerGroupBorder": "境界線をグループ化するためのクイック選択の色。", + "buttonForeground": "ボタンの前景色。", + "buttonBackground": "ボタンの背景色。", + "buttonHoverBackground": "ホバー時のボタン背景色。", + "badgeBackground": "バッジの背景色。バッジとは小さな情報ラベルのことです。例:検索結果の数", + "badgeForeground": "バッジの前景色。バッジとは小さな情報ラベルのことです。例:検索結果の数", + "scrollbarShadow": "ビューがスクロールされたことを示すスクロール バーの影。", + "scrollbarSliderBackground": "スライダーの背景色。", + "scrollbarSliderHoverBackground": "ホバー時のスライダー背景色。", + "scrollbarSliderActiveBackground": "アクティブ時のスライダー背景色。", + "progressBarBackground": "時間のかかる操作で表示するプログレス バーの背景色。", "editorBackground": "エディターの背景色。", "editorForeground": "エディターの既定の前景色。", - "editorSelection": "エディターの選択範囲の色。", + "editorWidgetBackground": "検索/置換窓など、エディター ウィジェットの背景色。", + "editorWidgetBorder": "エディター ウィジェットの境界線色。ウィジェットに境界線があり、ウィジェットによって配色を上書きされていない場合でのみこの配色は使用されます。", "editorInactiveSelection": "非アクティブなエディターの選択範囲の色。", "editorSelectionHighlight": "選択範囲と同じコンテンツの領域の色。", "editorFindMatch": "現在の検索一致項目の色。", "findMatchHighlight": "他の検索一致項目の色。", "findRangeHighlight": "検索を制限する範囲の色。", + "hoverHighlight": "ホバーが表示されているワードの下を強調表示します。", + "hoverBackground": "エディター ホバーの背景色。", + "hoverBorder": "エディター ホバーの境界線の色。", "activeLinkForeground": "アクティブなリンクの色。", - "linkForeground": "リンクの色。" + "diffEditorInserted": "挿入されたテキストの背景色。", + "diffEditorRemoved": "削除されたテキストの背景色。", + "diffEditorInsertedOutline": "挿入されたテキストの輪郭の色。", + "diffEditorRemovedOutline": "削除されたテキストの輪郭の色。", + "mergeCurrentHeaderBackground": "行内マージ競合の現在のヘッダー背景色。", + "mergeCurrentContentBackground": "行内マージ競合の現在のコンテンツ背景色。", + "mergeIncomingHeaderBackground": "行内マージ競合の入力側ヘッダー背景色。", + "mergeIncomingContentBackground": "行内マージ競合の入力側コンテンツ背景色。", + "mergeCommonHeaderBackground": "行内マージ競合の共通の祖先ヘッダー背景色。", + "mergeCommonContentBackground": "行内マージ競合の共通の祖先コンテンツ背景色。", + "mergeBorder": "行内マージ競合のヘッダーとスプリッターの境界線の色。", + "overviewRulerCurrentContentForeground": "行内マージ競合の現在の概要ルーラー前景色。", + "overviewRulerIncomingContentForeground": "行内マージ競合の入力側の概要ルーラー前景色。", + "overviewRulerCommonContentForeground": "行内マージ競合の共通の祖先概要ルーラー前景色。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/jpn/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json new file mode 100644 index 0000000000000..df697c332c2e4 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "overwritingExtension": "拡張機能 {0} を {1} で上書きしています。", + "extensionUnderDevelopment": "開発の拡張機能を {0} に読み込んでいます" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/jpn/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json new file mode 100644 index 0000000000000..c3df3145deb73 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "閉じる", + "cancel": "キャンセル", + "ok": "OK" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/api/node/extHostExplorerView.i18n.json b/i18n/jpn/src/vs/workbench/api/node/extHostExplorerView.i18n.json new file mode 100644 index 0000000000000..6447043d7ee61 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/api/node/extHostExplorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "ID '{0}' の TreeExplorerNodeProvider は登録されていません。", + "treeExplorer.failedToProvideRootNode": "TreeExplorerNodeProvider '{0}' がルート ノードの指定に失敗しました。" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/jpn/src/vs/workbench/api/node/extHostTask.i18n.json new file mode 100644 index 0000000000000..4b90a12aaf247 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/api/node/extHostTask.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "task.label": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/api/node/extHostTreeView.i18n.json b/i18n/jpn/src/vs/workbench/api/node/extHostTreeView.i18n.json new file mode 100644 index 0000000000000..6447043d7ee61 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/api/node/extHostTreeView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "ID '{0}' の TreeExplorerNodeProvider は登録されていません。", + "treeExplorer.failedToProvideRootNode": "TreeExplorerNodeProvider '{0}' がルート ノードの指定に失敗しました。" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/jpn/src/vs/workbench/api/node/extHostTreeViews.i18n.json new file mode 100644 index 0000000000000..74c5f0eabd702 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeView.notRegistered": "ID '{0}' のツリー ビューは登録されていません。", + "treeItem.notFound": "ID '{0}' のツリー項目は見つかりませんでした。", + "treeView.duplicateElement": " {0} 要素は既に登録されています。" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/browser/actions/configureLocale.i18n.json b/i18n/jpn/src/vs/workbench/browser/actions/configureLocale.i18n.json index ccad0f32648b7..21107d326abd0 100644 --- a/i18n/jpn/src/vs/workbench/browser/actions/configureLocale.i18n.json +++ b/i18n/jpn/src/vs/workbench/browser/actions/configureLocale.i18n.json @@ -7,7 +7,7 @@ "configureLocale": "言語を構成する", "displayLanguage": "VSCode の表示言語を定義します。", "doc": "サポートされている言語の一覧については、{0} をご覧ください。", - "restart": "VSCode の再起動に必要な値を変更します。", + "restart": "値を変更するには VS Code の再起動が必要です。", "fail.createSettings": "'{0}' ({1}) を作成できません。", "JsonSchema.locale": "使用する UI 言語。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/browser/actions/fileActions.i18n.json b/i18n/jpn/src/vs/workbench/browser/actions/fileActions.i18n.json index c05ec38e6806e..07f35cfc628d8 100644 --- a/i18n/jpn/src/vs/workbench/browser/actions/fileActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/browser/actions/fileActions.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "openFolder": "フォルダーを開く...", - "openFileFolder": "開く..." + "openFileFolder": "開く...", + "add": "追加" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json b/i18n/jpn/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json index ad17b1a0a2c45..b9c158c07866f 100644 --- a/i18n/jpn/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json +++ b/i18n/jpn/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "hideActivitBar": "アクティビティ バーを非表示にする", - "activityBarAriaLabel": "アクティブなビュー スイッチャー" + "activityBarAriaLabel": "アクティブなビュー スイッチャー", + "globalActions": "グローバル操作" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/jpn/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index 5f83155a33c87..84ef951c34123 100644 --- a/i18n/jpn/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -19,6 +19,7 @@ "closeEditorsToTheLeft": "左側のエディターを閉じる", "closeEditorsToTheRight": "右側のエディターを閉じる", "closeAllEditors": "すべてのエディターを閉じる", + "closeUnmodifiedEditors": "グループ内の未変更のエディターを閉じる", "closeEditorsInOtherGroups": "他のグループ内のエディターを閉じる", "closeOtherEditorsInGroup": "その他のエディターを閉じる", "closeEditorsInGroup": "グループ内のすべてのエディターを閉じる", @@ -44,6 +45,8 @@ "openPreviousRecentlyUsedEditorInGroup": "グループ内の最近使用したエディターのうち前のエディターを開く", "openNextRecentlyUsedEditorInGroup": "グループ内の最近使用したエディターのうち次のエディターを開く", "navigateEditorHistoryByInput": "履歴から以前のエディターを開く", + "openNextRecentlyUsedEditor": "最近使用したエディターのうち次のエディターを開く", + "openPreviousRecentlyUsedEditor": "最近使用したエディターのうち前のエディターを開く", "clearEditorHistory": "エディター履歴のクリア", "focusLastEditorInStack": "グループ内の最後のエディターを開く", "moveEditorLeft": "エディターを左へ移動", diff --git a/i18n/jpn/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/jpn/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index ff6068c783714..8df7c8826fb21 100644 --- a/i18n/jpn/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/jpn/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -11,6 +11,8 @@ "endOfLineLineFeed": "LF", "endOfLineCarriageReturnLineFeed": "CRLF", "tabFocusModeEnabled": "タブによるフォーカスの移動", + "screenReaderDetected": "スクリーン リーダーが検出されました", + "screenReaderDetectedExtra": "スクリーン リーダーを使用しない場合、`editor.accessibilitySupport` を \"off\" にしてください。", "disableTabMode": "アクセシビリティ モードを無効にする", "gotoLine": "行へ移動", "indentation": "インデント", diff --git a/i18n/jpn/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json b/i18n/jpn/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json new file mode 100644 index 0000000000000..b1dcfefa58e6c --- /dev/null +++ b/i18n/jpn/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpen": "ファイルに移動...", + "quickNavigateNext": "Quick Open で次に移動", + "quickNavigatePrevious": "Quick Open で前に移動", + "quickSelectNext": "Quick Open で [次へ] を選択", + "quickSelectPrevious": "Quick Open で [前へ] を選択" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/browser/quickopen.i18n.json b/i18n/jpn/src/vs/workbench/browser/quickopen.i18n.json index 715d0b6fb8033..b598142bc87f2 100644 --- a/i18n/jpn/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/jpn/src/vs/workbench/browser/quickopen.i18n.json @@ -6,6 +6,5 @@ { "noResultsMatching": "一致する結果はありません", "noResultsFound2": "一致する項目はありません", - "entryAriaLabel": "{0}、コマンド", - "noCommands": "一致するコマンドはありません" + "entryAriaLabel": "{0}、コマンド" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/browser/viewlet.i18n.json b/i18n/jpn/src/vs/workbench/browser/viewlet.i18n.json index e44e917c23baa..cd69288971a77 100644 --- a/i18n/jpn/src/vs/workbench/browser/viewlet.i18n.json +++ b/i18n/jpn/src/vs/workbench/browser/viewlet.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "collapse": "すべて折りたたむ", - "viewToolbarAriaLabel": "{0} 個のアクション" + "collapse": "すべて折りたたむ" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/common/theme.i18n.json b/i18n/jpn/src/vs/workbench/common/theme.i18n.json index 83fe2efbc15b9..423db7eceb239 100644 --- a/i18n/jpn/src/vs/workbench/common/theme.i18n.json +++ b/i18n/jpn/src/vs/workbench/common/theme.i18n.json @@ -4,39 +4,58 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "tabsContainerBackground": "タブ コンテナーの背景色。タブはエディター領域内にあるエディターのコンテナーです。複数のタブを 1 つのエディター グループで開くことができます。複数のエディター グループがある可能性があります。", - "activeTabBackground": "アクティブ タブの背景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", - "inactiveTabBackground": "非アクティブ タブの背景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", - "activeTabActiveGroupForeground": "アクティブ グループ内のアクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", - "activeTabInactiveGroupForeground": "非アクティブ グループ内のアクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", - "inactiveTabActiveGroupForeground": "アクティブ グループ内の非アクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", - "inactiveTabInactiveGroupForeground": "非アクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", + "tabActiveBackground": "アクティブ タブの背景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", + "tabInactiveBackground": "非アクティブ タブの背景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", "tabBorder": "タブ同士を分けるための境界線。タブはエディター領域内にあるエディターのコンテナーです。複数のタブを 1 つのエディター グループで開くことができます。複数のエディター グループがある可能性があります。", - "editorHeaderBackground": "有効なタブが存在しない場合のエディター タイトル ヘッダーの背景色。", + "tabActiveForeground": "アクティブ グループ内のアクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", + "tabInactiveForeground": "アクティブ グループ内の非アクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", + "tabUnfocusedActiveForeground": "非アクティブ グループ内のアクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", + "tabUnfocusedInactiveForeground": "非アクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", + "editorGroupBackground": "エディター グループの背景色。エディター グループはエディターのコンテナーです。背景色はエディター グループをドラッグすると表示されます。", + "tabsContainerBackground": "タブが有効な場合の エディター グループ タイトル ヘッダーの背景色。エディター グループはエディターのコンテナーです。", + "tabsContainerBorder": "タブが有効な場合の エディター グループ タイトル ヘッダーの境界線色。エディター グループはエディターのコンテナーです。", + "editorGroupHeaderBackground": "タブが無効な場合の エディター グループ タイトル ヘッダーの背景色。エディター グループはエディターのコンテナーです。", "editorGroupBorder": "複数のエディター グループを互いに分離するための色。エディター グループはエディターのコンテナーです。", - "editorGroupBackground": "エディター グループの背景色。エディター グループはエディターのコンテナーです。", - "editorDragAndDropBackground": "エディターのドラッグ時の背景色。", - "editorSideBySideBorder": "エディターを横並びに表示している場合に、詳細をマスター側から分けて表示するための境界線の色。", + "editorDragAndDropBackground": "エディターの周囲をドラッグしているときの背景色。エディターのコンテンツが最後まで輝くために、色は透過である必要があります。", "panelBackground": "パネルの背景色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", - "panelTopBorder": "エディターとの区切りを示すパネル上部の罫線の色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", + "panelBorder": "エディターとの区切りを示すパネル上部の罫線の色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", "panelActiveTitleForeground": "アクティブ パネルのタイトルの色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", "panelInactiveTitleForeground": "非アクティブ パネルのタイトルの色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", "panelActiveTitleBorder": "アクティブ パネル タイトルの境界線の色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", "statusBarForeground": "ステータス バーの前景色。ステータス バーはウィンドウの下部に表示されます。", "statusBarBackground": "標準ステータス バーの背景色。ステータス バーはウィンドウの下部に表示されます。", + "statusBarBorder": "サイドバーとエディターを隔てるステータス バーの境界線色。ステータス バーはウィンドウの下部に表示されます。", "statusBarNoFolderBackground": "フォルダーが開いていないときのステータス バーの背景色。ステータス バーはウィンドウの下部に表示されます。", + "statusBarNoFolderForeground": "フォルダーが開いていないときのステータス バーの前景色。ステータス バーはウィンドウの下部に表示されます。", "statusBarItemActiveBackground": "クリック時のステータス バーの項目の背景色。ステータス バーはウィンドウの下部に表示されます。", "statusBarItemHoverBackground": "ホバーしたときのステータス バーの項目の背景色。ステータス バーはウィンドウの下部に表示されます。", - "statusBarInfoItemBackground": "ステータス バーの情報項目の背景色。ステータス バーはウィンドウの下部に表示されます。", - "statusBarInfoItemHoverBackground": "ホバーしたときのステータス バーの情報項目の背景色。ステータス バーはウィンドウの下部に表示されます。", + "statusBarProminentItemBackground": "ステータス バーの重要な項目の背景色。重要な項目は、重要性を示すために他のステータスバーの項目から際立っています。 ステータス バーはウィンドウの下部に表示されます。", + "statusBarProminentItemHoverBackground": "ホバーしたときのステータス バーの重要な項目の背景色。重要な項目は、重要性を示すために他のステータスバーの項目から際立っています。 ステータス バーはウィンドウの下部に表示されます。", "activityBarBackground": "アクティビティ バーの背景色。アクティビティ バーは左端または右端に表示され、サイド バーのビューを切り替えることができます。", - "activityBarDragAndDropBackground": "アクティビティ バーの項目のドラッグ アンド ドロップ フィードバックの色。アクティビティ バーは左端または右端に表示され、サイド バーの表示を切り替えることができます。", - "activityBadgeBackground": "アクティビティ通知バッジの背景色。アクティビティ バーは左端または右端に表示され、サイド バーの表示を切り替えることができます。", - "activityBadgeForeground": "アクティビティ通知バッジの前景色。アクティビティ バーは左端または右端に表示され、サイド バーの表示を切り替えることができます。", + "activityBarForeground": "アクティビティ バーの前景色 (例: アイコンの色)。アクティビティ バーは左端または右端に表示され、サイド バーのビューを切り替えることができます。", + "activityBarBorder": "サイド バーと隔てるアクティビティ バーの境界線色。アクティビティ バーは左端または右端に表示され、サイド バーのビューを切り替えることができます。", + "activityBarDragAndDropBackground": "アクティビティ バーの項目のドラッグ アンド ドロップ フィードバックの色。アクティビティ バーが最後まで輝くために、色は透過である必要があります。アクティビティ バーは左端または右端に表示され、サイド バーの表示を切り替えることができます。", + "activityBarBadgeBackground": "アクティビティ通知バッジの背景色。アクティビティ バーは左端または右端に表示され、サイド バーの表示を切り替えることができます。", + "activityBarBadgeForeground": "アクティビティ通知バッジの前景色。アクティビティ バーは左端または右端に表示され、サイド バーの表示を切り替えることができます。", "sideBarBackground": "サイド バーの背景色。サイド バーは、エクスプローラーや検索などのビューが入るコンテナーです。", + "sideBarForeground": "サイド バーの前景色。サイド バーは、エクスプローラーや検索などのビューが入るコンテナーです。", + "sideBarBorder": "エディターとの区切りを示すサイド バーの境界線の色。サイド バーは、エクスプローラーや検索などのビューが入るコンテナーです。", "sideBarTitleForeground": "サイド バーのタイトルの前景色。サイド バーは、エクスプローラーや検索などのビューが入るコンテナーです。", + "sideBarSectionHeaderBackground": "サイド バーのセクション ヘッダーの背景色。サイド バーは、エクスプローラーや検索などのビューが入るコンテナーです。", + "sideBarSectionHeaderForeground": "サイド バーのセクション ヘッダーの前景色。サイド バーは、エクスプローラーや検索などのビューが入るコンテナーです。", "titleBarActiveForeground": "ウィンドウがアクティブな場合のタイトル バーの前景。現在、この色は macOS でのみサポートされているのでご注意ください。", "titleBarInactiveForeground": "ウィンドウが非アクティブな場合のタイトル バーの前景。現在、この色は macOS でのみサポートされているのでご注意ください。", "titleBarActiveBackground": "ウィンドウがアクティブな場合のタイトル バーの背景。現在、この色は macOS でのみサポートされているのでご注意ください。", - "titleBarInactiveBackground": "ウィンドウが非アクティブな場合のタイトル バーの背景。現在、この色は macOS でのみサポートされているのでご注意ください。" + "titleBarInactiveBackground": "ウィンドウが非アクティブな場合のタイトル バーの背景。現在、この色は macOS でのみサポートされているのでご注意ください。", + "notificationsForeground": "通知の前景色。通知はウィンドウの上部からスライド表示します。", + "notificationsBackground": "通知の背景色。通知はウィンドウの上部からスライド表示します。", + "notificationsButtonBackground": "通知ボタンの背景色。通知はウィンドウの上部からスライド表示します。", + "notificationsButtonHoverBackground": "ホバー時の通知ボタンの背景色。通知はウィンドウの上部からスライド表示します。", + "notificationsButtonForeground": "通知ボタンの前景色。通知はウィンドウの上部からスライド表示します。", + "notificationsInfoBackground": "情報通知の背景色。通知はウィンドウの上部からスライド表示します。", + "notificationsInfoForeground": "情報通知の前景色。通知はウィンドウの上部からスライド表示します。", + "notificationsWarningBackground": "警告通知の背景色。通知はウィンドウの上部からスライド表示します。", + "notificationsWarningForeground": "警告通知の前景色。通知はウィンドウの上部からスライド表示します。", + "notificationsErrorBackground": "エラー通知の背景色。通知はウィンドウの上部からスライド表示します。", + "notificationsErrorForeground": "エラー通知の前景色。通知はウィンドウの上部からスライド表示します。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/jpn/src/vs/workbench/electron-browser/actions.i18n.json index 854573811104d..9bccb66db8c4c 100644 --- a/i18n/jpn/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/jpn/src/vs/workbench/electron-browser/actions.i18n.json @@ -6,9 +6,6 @@ { "closeActiveEditor": "エディターを閉じる", "closeWindow": "ウィンドウを閉じる", - "switchWindow": "切り替えウィンドウ", - "switchWindowPlaceHolder": "ウィンドウの選択", - "current": "現在のウィンドウ", "closeFolder": "フォルダーを閉じる", "noFolderOpened": "このインスタンスで現在開いているフォルダーがないので、閉じられません。", "newWindow": "新しいウィンドウ", @@ -20,11 +17,14 @@ "zoomReset": "ズームのリセット", "appPerf": "スタートアップ パフォーマンス", "reloadWindow": "ウィンドウの再読み込み", - "openRecent": "最近開いた項目", + "switchWindowPlaceHolder": "切り替え先のウィンドウを選択してください", + "current": "現在のウィンドウ", + "switchWindow": "ウィンドウの切り替え...", "folders": "フォルダー", "files": "ファイル", "openRecentPlaceHolderMac": "パスを選択 (Cmd キーを押しながら新しいウィンドウで開く)", "openRecentPlaceHolder": "パスを選択して開く (Ctrl キーを押しながら新しいウィンドウで開く)", + "openRecent": "最近開いた項目…", "closeMessages": "通知メッセージを閉じる", "reportIssues": "問題の報告", "reportPerformanceIssue": "パフォーマンスの問題のレポート", diff --git a/i18n/jpn/src/vs/workbench/electron-browser/extensionHost.i18n.json b/i18n/jpn/src/vs/workbench/electron-browser/extensionHost.i18n.json index 764c96e028c84..a986ab13518d1 100644 --- a/i18n/jpn/src/vs/workbench/electron-browser/extensionHost.i18n.json +++ b/i18n/jpn/src/vs/workbench/electron-browser/extensionHost.i18n.json @@ -7,5 +7,6 @@ "extensionHostProcess.startupFailDebug": "拡張機能ホストが 10 秒以内に開始されませんでした。先頭行で停止している可能性があり、続行するにはデバッガーが必要です。", "extensionHostProcess.startupFail": "拡張機能ホストが 10 秒以内に開始されませんでした。問題が発生している可能性があります。", "extensionHostProcess.error": "拡張機能ホストからのエラー: {0}", + "devTools": "開発者ツール", "extensionHostProcess.crash": "拡張機能ホストが予期せずに終了しました。回復するには、ウィンドウを再度読み込んでください。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json index 6e280627aa378..1d0496ba74021 100644 --- a/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,6 +7,7 @@ "view": "表示", "help": "ヘルプ", "file": "ファイル", + "developer": "開発者", "showEditorTabs": "開いているエディターをタブに表示するかどうかを制御します。", "editorTabCloseButton": "エディター タブの閉じるボタンの位置を制御するか、[off] に設定した場合に無効にします。", "showIcons": "開いているエディターをアイコンで表示するかどうかを制御します。これには、アイコンのテーマを有効にする必要もあります。", @@ -14,12 +15,15 @@ "enablePreviewFromQuickOpen": "Quick Open で開いたエディターをプレビューとして表示するかどうかを制御します。プレビュー エディターは、保持されている間、再利用されます (ダブルクリックまたは編集などによって)。", "editorOpenPositioning": "エディターを開く場所を制御します。[左] または [右] を選択して、現在アクティブになっているエディターの左または右にエディターを開きます。[最初] または [最後] を選択して、現在アクティブになっているエディターとは別個にエディターを開きます。", "revealIfOpen": "任意の表示グループが開かれた場合に、そこにエディターを表示するかどうかを制御します。無効にした場合、エディターは現在のアクティブなエディター グループに優先して開かれます。有効にした場合は、現在のアクティブなエディター グループにもう一度開くのではなく、既に開いているエディターが表示されます。特定のグループ内や現在アクティブなグループの横に強制的にエディターを開いた場合などに、この設定が無視される場合もあることにご注意ください。", + "commandHistory": "コマンド パレットで最近使用したコマンド履歴を保持する数を制御します。0 に設定するとコマンド履歴を無効にします。", + "preserveInput": "次回開いたとき、コマンド パレットの最後の入力を復元するかどうかを制御します。", "closeOnFocusLost": "フォーカスを失ったときに Quick Open を自動的に閉じるかどうかを制御します。", "openDefaultSettings": "設定を開くとすべての既定の設定を表示するエディターも開くかどうかを制御します。", "sideBarLocation": "サイド バーの位置を制御します。ワークベンチの左右のいずれかに表示できます。", "statusBarVisibility": "ワークベンチの下部にステータス バーを表示するかどうかを制御します。", "activityBarVisibility": "ワークベンチでのアクティビティ バーの表示をコントロールします。", "closeOnFileDelete": "ファイルを表示しているエディターを、ファイルが削除されるかその他のプロセスによって名前を変更された場合に、自動的に閉じるかどうかを制御します。これを無効にすると、このような場合にエディターはダーティで開かれたままになります。アプリケーション内で削除すると、必ずエディターは閉じられ、ダーティ ファイルは閉じられることがなく、データは保存されませんのでご注意ください。", + "swipeToNavigate": "3 本の指で横方向にスワイプすると、開いているファイル間を移動できます。", "workbenchConfigurationTitle": "ワークベンチ", "window.openFilesInNewWindow.on": "新しいウィンドウでファイルを開きます", "window.openFilesInNewWindow.off": "ファイルのフォルダーが開かれていたウィンドウまたは最後のアクティブ ウィンドウでファイルを開きます", @@ -29,30 +33,36 @@ "window.openFoldersInNewWindow.off": "フォルダーは、最後のアクティブ ウィンドウで開きます", "window.openFoldersInNewWindow.default": "フォルダーがアプリケーション内から (たとえば、[ファイル] メニューから) 選択された場合を除いて、新しいウィンドウでフォルダーを開きます", "openFoldersInNewWindow": "フォルダーを新しいウィンドウで開くか、最後のアクティブ ウィンドウで開くかを制御します。\n- default: アプリケーション内で ([ファイル] メニューなどから) 選択したものでなければ、新しいウィンドウでフォルダーを開く\n- on: 新しいウィンドウでフォルダーを開く\n- off: 最後のアクティブ ウィンドウでフォルダーを開く\nこの設定は無視される場合もあります (-new-window または -reuse-window コマンド ライン オプションを使用する場合など)。", - "window.reopenFolders.none": "フォルダーを再度開きません。", - "window.reopenFolders.one": "最後にアクティブだったフォルダーを再び開きます。", - "window.reopenFolders.all": "最後のセッションの全フォルダーを再び開きます。", - "reopenFolders": "再起動後にフォルダーを再度開く方法を制御します。'none' を選択するとフォルダーを再度開くことはありません。'one' を選択すると最後に作業したフォルダーを再度開きます。'all' を選択すると前回のセッションのフォルダーすべてを再度開きます。", + "window.reopenFolders.all": "すべてのウィンドウを再度開きます。", + "window.reopenFolders.folders": "すべてのフォルダーを再度開きます。空のウィンドウは復元されません。", + "window.reopenFolders.one": "最後にアクティブだったウィンドウを再び開きます。", + "window.reopenFolders.none": "ウィンドウ再度開きません。常に空のウィンドウで開始します。", + "restoreWindows": "再起動後にウィンドウを再度開く方法を制御します。'none' を選択すると常に空のウィンドウで開始します。'one' を選択すると最後に使用したウィンドウを再度開きます。'folders' を選択すると開いていたすべてのウィンドウを再度開きます。'all' を選択すると前回のセッションのすべてのウィンドウを再度開きます。", "restoreFullscreen": "全画面表示モードで終了した場合に、ウィンドウを全画面表示モードに復元するかどうかを制御します。", "zoomLevel": "ウィンドウのズーム レベルを調整します。元のサイズは 0 で、1 つ上げるごとに (1 など) 20% ずつ拡大することを表し、1 つ下げるごとに (-1 など) 20% ずつ縮小することを表します。小数点以下の桁数を入力して、さらに細かくズーム レベルを調整することもできます。", - "title": "アクティブなエディターに基づいてウィンドウのタイトルを制御します。変数は、コンテキストに基づいて置換されます:\n${activeEditorShort}: 例: myFile.txt\n${activeEditorMedium}: 例: myFolder/myFile.txt\n${activeEditorLong}: 例: /Users/Development/myProject/myFolder/myFile.txt\n${rootName}: 例: myProject\n${rootPath}: 例: /Users/Development/myProject\n${appName}: 例: VS Code\n${dirty}: アクティブなエディターがダーティである場合のダーティ インジケーター\n${separator}: 値のある変数で囲まれた場合にのみ表示される条件付き区切り記号 (\" - \")", "window.newWindowDimensions.default": "新しいウィンドウを画面の中央に開きます。", "window.newWindowDimensions.inherit": "新しいウィンドウを、最後にアクティブだったウィンドウと同じサイズで開きます。", "window.newWindowDimensions.maximized": "新しいウィンドウを最大化した状態で開きます。", "window.newWindowDimensions.fullscreen": "新しいウィンドウを全画面表示モードで開きます。", - "newWindowDimensions": "新しいウィンドウを開くときのサイズを制御します。既定では、新しいウィンドウは画面の中央に小さいサイズで開きます。'inherit' に設定すると、最後のアクティブ ウィンドウと同じサイズで開きます。'maximized' に設定するとウィンドウは最大サイズで開き、'fullscreen' に設定すると全画面になります。", + "newWindowDimensions": "既に 1 つ以上のウィンドウを開いているとき、新しく開くウィンドウのサイズを制御します。既定では、新しいウィンドウを画面中央に小さいサイズで開きます。'inherit' に設定すると、最後のアクティブ ウィンドウと同じサイズで開きます。'maximized' に設定するとウィンドウは最大サイズで開き、'fullscreen' に設定すると全画面になります。この設定は、最初に開いたウィンドウに適用されないことに注意してください。最初のウィンドウは常に、前回閉じたサイズと位置で復元します。", "window.menuBarVisibility.default": "メニューは全画面表示モードの場合にのみ非表示です。", "window.menuBarVisibility.visible": "全画面表示モードの場合も含めて、常にメニューが表示されます。", "window.menuBarVisibility.toggle": "メニューは非表示ですが、Alt キーを押すと表示できます。", "window.menuBarVisibility.hidden": "メニューは常に非表示です。", "menuBarVisibility": "メニュー バーの表示/非表示を制御します。'切り替え' 設定は Alt キーを 1 回押すとメニュー バーの表示/非表示が切り替わることを意味します。既定では、ウィンドウが全画面表示の場合を除き、メニュー バーは表示されます。", + "enableMenuBarMnemonics": "有効にすると、Alt キー ショートカットを使用してメイン メニューを開くことができます。ニーモニックを無効にすると、これらの Alt キー ショートカットをエディター コマンドの代わりにバインドできます。", "autoDetectHighContrast": "有効にすると、Windows でハイ コントラスト テーマが使用されている場合にはハイ コントラスト テーマに自動的に変更され、Windows のハイ コントラスト テーマから切り替えられている場合にはダーク テーマに自動的に変更されます。", "titleBarStyle": "ウィンドウのタイトル バーの外観を調整します。変更を適用するには、完全に再起動する必要があります。", + "window.nativeTabs": "macOS Sierra ウィンドウ タブを有効にします。この変更を適用するには完全な再起動が必要であり、ネイティブ タブでカスタムのタイトル バー スタイルが構成されていた場合はそれが無効になることに注意してください。", "windowConfigurationTitle": "ウィンドウ", "zenModeConfigurationTitle": "Zen Mode", "zenMode.fullScreen": "Zen Mode をオンにするとワークベンチを自動的に全画面モードに切り替えるかどうかを制御します。", "zenMode.hideTabs": "Zen Mode をオンにしたときにワークベンチ タブも非表示にするかどうかを制御します。", "zenMode.hideStatusBar": "Zen Mode をオンにするとワークベンチの下部にあるステータス バーを非表示にするかどうかを制御します。", "zenMode.hideActivityBar": "Zen Mode をオンにするとワークベンチの左側にあるアクティビティ バーを非表示にするかを制御します。", - "zenMode.restore": "Zen Mode で終了したウィンドウを Zen Mode に復元するかどうかを制御します。" + "zenMode.restore": "Zen Mode で終了したウィンドウを Zen Mode に復元するかどうかを制御します。", + "workspaceConfigurationTitle": "ワークスペース", + "workspaces.title": "ワークスペースのフォルダー構成", + "files.exclude.boolean": "ファイル パスの照合基準となる glob パターン。これを true または false に設定すると、パターンがそれぞれ有効/無効になります。", + "workspaces.additionalFolders": "このワークスペースのフォルダー" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/electron-browser/shell.i18n.json b/i18n/jpn/src/vs/workbench/electron-browser/shell.i18n.json index 298d1518ca4d1..7edc0e838e809 100644 --- a/i18n/jpn/src/vs/workbench/electron-browser/shell.i18n.json +++ b/i18n/jpn/src/vs/workbench/electron-browser/shell.i18n.json @@ -4,9 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "runningAsRoot": "コードを 'root ' として実行しないことをお勧めします。", - "prof.message": "プロファイルが正常に作成されました。", - "prof.detail": "案件を作成し、手動で次のファイルを添付してください:\n{0}", - "prof.restartAndFileIssue": "案件を作成し再起動する", - "prof.restart": "再起動" + "runningAsRoot": "コードを 'root ' として実行しないことをお勧めします。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/electron-browser/window.i18n.json b/i18n/jpn/src/vs/workbench/electron-browser/window.i18n.json index acff2870cf903..472d053bdf66a 100644 --- a/i18n/jpn/src/vs/workbench/electron-browser/window.i18n.json +++ b/i18n/jpn/src/vs/workbench/electron-browser/window.i18n.json @@ -11,7 +11,5 @@ "paste": "貼り付け", "selectAll": "すべて選択", "confirmOpen": "{0} 個のフォルダーを開きますか?", - "confirmOpenButton": "&&開く", - "developer": "Developer", - "file": "ファイル" + "confirmOpenButton": "&&開く" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/jpn/src/vs/workbench/electron-browser/workbench.i18n.json new file mode 100644 index 0000000000000..bbe34173584ee --- /dev/null +++ b/i18n/jpn/src/vs/workbench/electron-browser/workbench.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "developer": "開発者", + "file": "ファイル" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json b/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json new file mode 100644 index 0000000000000..1c53dd86bdd77 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emergencyConfOn": "現在 `editor.accessibilitySupport` 設定を 'on' に変更しています。", + "openingDocs": "現在 VS Code のアクセシビリティ ドキュメントページを開いています。", + "introMsg": "VS Code のアクセシビリティ オプションをご利用いただき、ありがとうございます。", + "status": "ステータス:", + "changeConfigToOnMac": "スクリーン リーダーで使用するためにエディターを永続的に最適化するように設定するには、Command + E を押してください。", + "changeConfigToOnWinLinux": "スクリーン リーダーで使用するためにエディターを永続的に最適化するように設定するには、Control + E を押してください。", + "auto_unknown": "エディターは、プラットフォーム API を使用してスクリーン リーダーがいつ接続されたかを検出するように設定されていますが、現在のランタイムはこれをサポートしていません。", + "auto_on": "エディターはスクリーン リーダーの接続を自動検出しました。", + "auto_off": "エディターは、スクリーン リーダーが接続されると自動的に検出するように構成されていますが、今回は検出できませんでした。", + "configuredOn": "エディターはスクリーン リーダーで使用するために永続的に最適化されるように設定されています。これは `editor.accessibilitySupport` の設定を編集することで変更できます。", + "configuredOff": "エディターはスクリーン リーダー向けに最適化しないように構成されています。", + "tabFocusModeOnMsg": "現在のエディターで Tab キーを押すと、次のフォーカス可能な要素にフォーカスを移動します。{0} を押すと、この動作が切り替わります。", + "tabFocusModeOnMsgNoKb": "現在のエディターで Tab キーを押すと、次のフォーカス可能な要素にフォーカスを移動します。コマンド {0} は、キー バインドでは現在トリガーできません。", + "tabFocusModeOffMsg": "現在のエディターで Tab キーを押すと、タブ文字が挿入されます。{0} を押すと、この動作が切り替わります。", + "tabFocusModeOffMsgNoKb": "現在のエディターで Tab キーを押すと、タブ文字が挿入されます。コマンド {0} は、キー バインドでは現在トリガーできません。", + "openDocMac": "command + H キーを押して、ブラウザー ウィンドウを今すぐ開き、アクセシビリティに関連する他の VS Code 情報を確認します。", + "openDocWinLinux": "Ctrl + H キーを押して、ブラウザー ウィンドウを今すぐ開き、アクセシビリティに関連する他の VS Code 情報を確認します。", + "outroMsg": "Esc キー か Shift+Esc を押すと、ヒントを消してエディターに戻ることができます。", + "ShowAccessibilityHelpAction": "アクセシビリティのヘルプを表示します" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json index c5e4314489b8e..d24a34e3065f5 100644 --- a/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "workbench.action.inspectKeyMap": "Developer: Inspect Key Mapppings" + "workbench.action.inspectKeyMap": "開発者: キー マッピングを検査する" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json b/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..1e4f9dabdb2f1 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inspectTMScopes": "開発者: TM スコープの検査", + "inspectTMScopesWidget.loading": "読み込んでいます..." +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json b/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json new file mode 100644 index 0000000000000..eb4dd6d92b064 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parseErrors": "{0} を解析中のエラー: {1}", + "schema.openBracket": "左角かっこまたは文字列シーケンス。", + "schema.closeBracket": "右角かっこまたは文字列シーケンス。", + "schema.comments": "コメント記号を定義します。", + "schema.blockComments": "ブロック コメントのマーク方法を定義します。", + "schema.blockComment.begin": "ブロック コメントを開始する文字シーケンス。", + "schema.blockComment.end": "ブロック コメントを終了する文字シーケンス。", + "schema.lineComment": "行コメントを開始する文字シーケンス。", + "schema.brackets": "インデントを増減する角かっこを定義します。", + "schema.autoClosingPairs": "角かっこのペアを定義します。左角かっこが入力されると、右角かっこが自動的に挿入されます。", + "schema.autoClosingPairs.notIn": "自動ペアが無効なスコープの一覧を定義します。", + "schema.surroundingPairs": "選択文字列を囲むときに使用できる角かっこのペアを定義します。", + "schema.wordPattern": "言語のための単語の定義。", + "schema.wordPattern.pattern": "言葉の照合に使用する正規表現パターン。", + "schema.wordPattern.flags": "言葉の照合に使用する正規表現フラグ。", + "schema.wordPattern.flags.errorMessage": "`/^([gimuy]+)$/` パターンに一致する必要があります。", + "schema.indentationRules": "言語のインデント設定。", + "schema.indentationRules.increaseIndentPattern.errorMessage": "`/^([gimuy]+)$/` パターンに一致する必要があります。", + "schema.indentationRules.decreaseIndentPattern.errorMessage": "`/^([gimuy]+)$/` パターンに一致する必要があります。", + "schema.indentationRules.indentNextLinePattern.errorMessage": "`/^([gimuy]+)$/` パターンに一致する必要があります。", + "schema.indentationRules.unIndentedLinePattern.errorMessage": "`/^([gimuy]+)$/` パターンに一致する必要があります。" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json b/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..1e4f9dabdb2f1 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inspectTMScopes": "開発者: TM スコープの検査", + "inspectTMScopesWidget.loading": "読み込んでいます..." +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json b/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json new file mode 100644 index 0000000000000..3b84ee3fdb42e --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "マルチ カーソルの修飾キーを切り替える" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index 2be30d1f34b25..7e7505788b623 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -6,6 +6,7 @@ { "openLaunchJson": "{0} を開く", "launchJsonNeedsConfigurtion": "'launch.json' を構成または修正してください", + "noFolderDebugConfig": "高度なデバッグ構成を行うには、最初にフォルダーを開いてください。", "startDebug": "デバッグの開始", "startWithoutDebugging": "デバッグなしで開始", "selectAndStartDebugging": "選択してデバッグを開始", @@ -34,6 +35,7 @@ "editConditionalBreakpoint": "ブレークポイントの編集...", "setValue": "値の設定", "addWatchExpression": "式の追加", + "editWatchExpression": "式の編集", "addToWatchExpressions": "ウォッチに追加", "removeWatchExpression": "式の削除", "removeAllWatchExpressions": "すべての式を削除する", diff --git a/i18n/jpn/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json new file mode 100644 index 0000000000000..8876044c17ee8 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugToolBarBackground": "デバッグ ツール バーの背景色。" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json new file mode 100644 index 0000000000000..88f436125ff52 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileLinkMac": "クリックして従う (Cmd を押しながらクリックすると横に開きます)", + "fileLink": "クリックして従う (Ctrl を押しながらクリックすると横に開きます)" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/common/debug.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/common/debug.i18n.json new file mode 100644 index 0000000000000..5f4689ab40415 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/debug/common/debug.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "internalConsoleOptions": "内部デバッグ コンソールの動作を制御します。" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/common/debugModel.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/common/debugModel.i18n.json index 682210ed726b6..f20d079084082 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/common/debugModel.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/common/debugModel.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "unknownSource": "不明なソース", "notAvailable": "使用できません", - "startDebugFirst": "デバッグ セッションを開始して評価してください", - "unknownStack": "スタックの場所が不明です" + "startDebugFirst": "デバッグ セッションを開始して評価してください" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/common/debugSource.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/common/debugSource.i18n.json new file mode 100644 index 0000000000000..72b04323d00d8 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/debug/common/debugSource.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownSource": "不明なソース" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json index 3ea9762c5e759..4b7df0a6d3ce8 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -15,5 +15,6 @@ "allowBreakpointsEverywhere": "任意のファイルにブレークポイントを設定できるようにする", "openExplorerOnEnd": "デバッグ セッションの終わりにエクスプローラ ビューを自動的に開きます", "inlineValues": "デバッグ中にエディターの行内に変数値を表示します", - "hideActionBar": "浮動デバッグ操作バーを非表示にするかどうかを制御します" + "hideActionBar": "浮動デバッグ操作バーを非表示にするかどうかを制御します", + "launch": "グローバル デバッグ起動構成。ワークスペース間で共有される 'launch.json' の代わりとして使用する必要があります" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json new file mode 100644 index 0000000000000..3601388ef3a3b --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noFolderDebugConfig": "高度なデバッグ構成を行うには、最初にフォルダーを開いてください。" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json index aabd2eeb0588d..aef1178470743 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json @@ -32,7 +32,7 @@ "app.launch.json.compounds": "複合の一覧。各複合は、同時に起動される複数の構成を参照します。", "app.launch.json.compound.name": "複合の名前。起動構成のドロップダウン メニューに表示されます。", "app.launch.json.compounds.configurations": "この複合の一部として開始される構成の名前。", - "debugNoType": "デバッグ アダプター 'type' は省略不可で、型 'string' でなければなりません。", + "debugNoType": "デバッグ アダプター 'type' は省略不可で、'string' 型でなければなりません。", "DebugConfig.failed": "'launch.json' ファイルを '.vscode' フォルダー ({0}) 内に作成できません。", "selectDebug": "環境の選択" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index dfffb6e0790da..45728f86746ff 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -5,8 +5,8 @@ // Do not edit this file. It is machine generated. { "snapshotObj": "このオブジェクトのプリミティブ値のみ表示されます。", - "debuggingStarted": "デバッグは開始されました。", "debuggingPaused": "デバッグは一時停止されました、理由 {0}、{1} {2}", + "debuggingStarted": "デバッグは開始されました。", "debuggingStopped": "デバッグは停止されました。", "breakpointAdded": "ブレークポイントを追加しました。行 {0}、ファイル {1}", "breakpointRemoved": "ブレークポイントを削除しました。行 {0}、ファイル {1}", diff --git a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json index e57fd60ee0de5..8943a8809bd0f 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json @@ -6,5 +6,6 @@ { "copyValue": "値のコピー", "copy": "コピー", + "copyAll": "すべてコピー", "copyStackTrace": "呼び出し履歴のコピー" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json index d2422d0728184..3b2b57ca85d48 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json @@ -7,5 +7,6 @@ "replAriaLabel": "Read Eval Print Loop パネル", "actions.repl.historyPrevious": "前の履歴", "actions.repl.historyNext": "次の履歴", - "actions.repl.acceptInput": "REPL での入力を反映" + "actions.repl.acceptInput": "REPL での入力を反映", + "actions.repl.copyAll": "デバッグ: コンソールをすべてコピーする" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json index 0aaca371445f1..38c8479072717 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json @@ -5,8 +5,6 @@ // Do not edit this file. It is machine generated. { "stateCapture": "最初の評価からオブジェクトの状態がキャプチャされます", - "fileLinkMac": "クリックして従う (Cmd を押しながらクリックすると横に開きます)", - "fileLink": "クリックして従う (Ctrl を押しながらクリックすると横に開きます)", "replVariableAriaLabel": "変数 {0} に値 {1} があります、Read Eval Print Loop、デバッグ", "replExpressionAriaLabel": "式 {0} に値 {1} があります、Read Eval Print Loop、デバッグ", "replValueOutputAriaLabel": "{0}、Read Eval Print Loop、デバッグ", diff --git a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json index aa4a05fcb7236..ccdb00421dca2 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "statusBarDebuggingBackground": "プログラムをデバッグしているときのステータス バーの背景色。ステータス バーはウィンドウの下部に表示されます" + "statusBarDebuggingBackground": "プログラムをデバッグしているときのステータス バーの背景色。ステータス バーはウィンドウの下部に表示されます", + "statusBarDebuggingForeground": "プログラムをデバッグしているときのステータス バーの前景色。ステータス バーはウィンドウの下部に表示されます" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index 75ed35238e11c..d63fe387f50b0 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,12 +7,12 @@ "debugAdapterBinNotFound": "デバッグ アダプターの実行可能ファイル '{0}' がありません。", "debugAdapterCannotDetermineExecutable": "デバッグ アダプター '{0}' の実行可能ファイルを判別できません。", "debugType": "構成の種類。", + "debugTypeNotRecognised": "デバッグの種類は認識されませんでした。対応するデバッグの拡張機能がインストールされており、有効になっていることを確認してください。", "node2NotSupported": "\"node2\" はサポートされていません。代わりに \"node\" を使用し、\"protocol\" 属性を \"inspector\" に設定してください。", "debugName": "構成の名前。起動構成のドロップダウン メニューに表示されます。", "debugRequest": "構成の要求の種類。\"launch\" または \"attach\" です。", "debugServer": "デバッグ拡張機能の開発のみ。ポートが指定の VS Code の場合、サーバー モードで実行中のデバッグ アダプターへの接続が試行されます。", "debugPrelaunchTask": "デバッグ セッションの開始前に実行するタスク。", - "internalConsoleOptions": "内部デバッグ コンソールの動作を制御します。", "debugWindowsConfiguration": "Windows 固有の起動構成の属性。", "debugOSXConfiguration": "OS X 固有の起動構成の属性。", "debugLinuxConfiguration": "Linux 固有の起動構成の属性。", diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json new file mode 100644 index 0000000000000..13eb719a34fc3 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "balanceInward": "Emmet: バランス (内側)", + "balanceOutward": "Emmet: バランス (外側)" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json new file mode 100644 index 0000000000000..188f2a3567373 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "previousEditPoint": "Emmet: 前の編集点に移動する", + "nextEditPoint": "Emmet: 次の編集点に移動する" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json new file mode 100644 index 0000000000000..f6a68a59f42aa --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "evaluateMathExpression": "Emmet: 数式の評価" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json new file mode 100644 index 0000000000000..23680f558e5ee --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "expandAbbreviationAction": "Emmet: 略語の展開" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json new file mode 100644 index 0000000000000..4c2a1db638c65 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "incrementNumberByOneTenth": "Emmet: 0.1 ずつ増加", + "incrementNumberByOne": "Emmet: 1 ずつ増加", + "incrementNumberByTen": "Emmet: 10 ずつ増加", + "decrementNumberByOneTenth": "Emmet: 0.1 ずつ減少", + "decrementNumberByOne": "Emmet: 1 減少", + "decrementNumberByTen": "Emmet: 10 ずつ減少" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json new file mode 100644 index 0000000000000..adcbee4abaf0d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "matchingPair": "Emmet: 一致するペアに移動" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json new file mode 100644 index 0000000000000..c834e4b5aaa3d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mergeLines": "Emmet: 行のマージ" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json new file mode 100644 index 0000000000000..ab8fd5a62ba11 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reflectCSSValue": "Emmet: CSS 値の反転" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json new file mode 100644 index 0000000000000..c3bc9dd651f53 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeTag": "Emmet: タグの削除" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json new file mode 100644 index 0000000000000..350aee6aff985 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "selectPreviousItem": "Emmet: 前の項目の選択", + "selectNextItem": "Emmet: 次の項目の選択" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json new file mode 100644 index 0000000000000..4b1dbd8a454c2 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "splitJoinTag": "Emmet: タグの分割/結合" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json new file mode 100644 index 0000000000000..942a483bfa3d7 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleComment": "Emmet: コメントの表示/非表示" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json new file mode 100644 index 0000000000000..ba3773dfcdbeb --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateImageSize": "Emmet: イメージ サイズの更新" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json new file mode 100644 index 0000000000000..873d819f37a59 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateTag": "Emmet: タグの更新", + "enterTag": "タグの入力", + "tag": "タグ" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json new file mode 100644 index 0000000000000..3f72714a048fb --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wrapWithAbbreviationAction": "Emmet: 省略形でラップ", + "enterAbbreviation": "省略形の入力", + "abbreviation": "省略形" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json new file mode 100644 index 0000000000000..470a456bc9d8f --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emmetConfigurationTitle": "Emmet", + "triggerExpansionOnTab": "これをオンにすると、TAB キーを押したときに emmet 省略記法が展開されます.", + "emmetPreferences": "Emmet の一部のアクションやリゾルバーの動作の変更に使用される基本設定。", + "emmetSyntaxProfiles": "指定した構文に対してプロファイルを定義するか、特定の規則がある独自のプロファイルをご使用ください。", + "emmetExclude": "emmet 省略記法を展開すべきでない言語の配列。", + "emmetExtensionsPath": "Emmet のプロファイル、スニペット、基本設定を含むフォルダーへのパス", + "useNewEmmet": "すべての emmet 機能に対して、新しい emmet モジュールをお試しください (最終的に、以前の単一 emmet ライブラリは置き換えられます)。" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index ceb1408af9fa9..497be6143f794 100644 --- a/i18n/jpn/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -4,10 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "vscode.extension.contributes.explorer": "カスタム Tree Explorer Viewlet をサイドバーに追加します", - "vscode.extension.contributes.explorer.treeExplorerNodeProviderId": "vscode.workspace.registerTreeExplorerNodeProvider を介して登録したプロバイダーを識別するための一意の ID", - "vscode.extension.contributes.explorer.treeLabel": "カスタム Tree Explorer の表示に使用される、人が判別できる文字列", - "vscode.extension.contributes.explorer.icon": "アクティビティ バーの Viewlet アイコンへのパス", + "vscode.extension.contributes.view": "カスタム ビューを提供します", + "vscode.extension.contributes.view.id": "vscode.workspace.createTreeView を介して生成した、ビューを認識するための一意の ID", + "vscode.extension.contributes.view.label": "ビューの表示に使用する、他人が解釈できる文字列", + "vscode.extension.contributes.view.icon": "ビュー アイコンへのパス", + "vscode.extension.contributes.views": "複数のカスタム ビューを提供します", "showViewlet": "{0} を表示", "view": "表示" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index 078b21ede6a22..631dbad18af1e 100644 --- a/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -24,6 +24,10 @@ "default": "既定", "debuggers": "デバッガー ({0})", "debugger name": "名前", + "views": "ビュー ({0})", + "view id": "ID", + "view name": "名前", + "view location": "場所", "themes": "テーマ ({0})", "JSON Validation": "JSON 検証 ({0})", "commands": "コマンド ({0})", diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index 644c72bc9958d..d37634ee4857c 100644 --- a/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -22,15 +22,17 @@ "disableGloballyAction": "常に行う", "disableAction": "無効にする", "checkForUpdates": "更新の確認", + "enableAutoUpdate": "拡張機能の自動更新を有効にする", + "disableAutoUpdate": "拡張機能の自動更新を無効にする", "updateAll": "すべての拡張機能を更新します", - "reloadAction": "再読み込む", - "postUpdateTooltip": "再度読み込んで更新する", - "postUpdateMessage": "このウィンドウを再度読み込んで、更新済みの拡張機能 '{0}' をアクティブ化しますか?", - "postEnableTooltip": "再度読み込んでアクティブにする", + "reloadAction": "再読み込み", + "postUpdateTooltip": "再読み込みして更新する", + "postUpdateMessage": "このウィンドウを再読み込みして、更新済みの拡張機能 '{0}' をアクティブ化しますか?", + "postEnableTooltip": "再読み込みしてアクティブにする", "postEnableMessage": "このウィンドウを再度読み込んで、拡張機能 '{0}' をアクティブ化しますか?", - "postDisableTooltip": "読み込んで非アクティブ化する", - "postDisableMessage": "このウィンドウを再度読み込んで、拡張機能 '{0}' を非アクティブ化しますか?", - "postUninstallTooltip": "読み込んで非アクティブ化する", + "postDisableTooltip": "再読み込みして非アクティブ化する", + "postDisableMessage": "このウィンドウを再読み込みして、拡張機能 '{0}' を非アクティブ化しますか?", + "postUninstallTooltip": "再読み込みして非アクティブ化する", "postUninstallMessage": "このウィンドウを再度読み込んで、アンインストール済みの拡張機能 '{0}' を非アクティブ化しますか?", "reload": "ウィンドウの再読み込み(&&R)", "toggleExtensionsViewlet": "拡張機能を表示する", @@ -44,6 +46,8 @@ "showWorkspaceRecommendedExtensions": "ワークスペースのおすすめの拡張機能を表示", "showRecommendedKeymapExtensions": "推奨のキーマップを表示する", "showRecommendedKeymapExtensionsShort": "キーマップ", + "showLanguageExtensions": "言語の拡張機能を表示", + "showLanguageExtensionsShort": "言語の拡張機能", "configureWorkspaceRecommendedExtensions": "お勧めの拡張機能の構成 (ワークスペース)", "ConfigureWorkspaceRecommendations.noWorkspace": "推奨事項はワークスペース フォルダーでのみ利用可能です。", "OpenExtensionsFile.failed": "'.vscode' ファルダー ({0}) 内に 'extensions.json' ファイルを作成できません。", @@ -51,5 +55,8 @@ "disableAll": "インストール済みのすべての拡張機能を無効にする", "disableAllWorkspace": "このワークスペースのインストール済みの拡張機能をすべて無効にする", "enableAll": "インストール済みの拡張機能をすべて有効にする", - "enableAllWorkspace": "このワークスペースのインストール済みの拡張機能をすべて有効にする" + "enableAllWorkspace": "このワークスペースのインストール済みの拡張機能をすべて有効にする", + "extensionButtonProminentBackground": "際立っているアクション拡張機能のボタンの背景色(例: インストールボタン)。", + "extensionButtonProminentForeground": "際立っているアクション拡張機能のボタンの前景色(例: インストールボタン)。", + "extensionButtonProminentHoverBackground": "際立っているアクション拡張機能のボタンのホバー背景色(例: インストールボタン)。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index cd8d804c21890..f7a0d5005fcdc 100644 --- a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -4,8 +4,13 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "reallyRecommended2": "このファイルの種類には拡張機能 '{0}' が推奨されます。", "showRecommendations": "推奨事項を表示", "neverShowAgain": "今後は表示しない", "close": "閉じる", - "workspaceRecommended": "このワークスペースには拡張機能の推奨事項があります。" + "workspaceRecommended": "このワークスペースには拡張機能の推奨事項があります。", + "ignoreExtensionRecommendations": "すべての拡張機能の推奨事項を無視しますか?", + "ignoreAll": "はい、すべて無視します", + "no": "いいえ", + "cancel": "キャンセル" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index 1beba30be548a..e9f31ea4af641 100644 --- a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -10,5 +10,6 @@ "extensions": "拡張機能", "view": "表示", "extensionsConfigurationTitle": "拡張機能", - "extensionsAutoUpdate": "拡張機能を自動的に更新します" + "extensionsAutoUpdate": "拡張機能を自動的に更新します", + "extensionsIgnoreRecommendations": "拡張機能の推奨事項を無視する" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json new file mode 100644 index 0000000000000..4859dfe81bbb3 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "disableOtherKeymapsConfirmation": "キーバインド間の競合を回避するために、他のキーマップ ({0}) を無効にしますか?", + "yes": "はい", + "no": "いいえ", + "betterMergeDisabled": "拡張機能 Better Merge は現在ビルトインです。インストール済みの拡張機能は無効化され、アンインストールできます。", + "uninstall": "アンインストール", + "later": "後続" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json index 47780c8a50510..f5ca28fa3d477 100644 --- a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json @@ -4,12 +4,15 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "marketPlace": "Marketplace", + "installedExtensions": "インストール済み", + "searchInstalledExtensions": "インストール済み", + "recommendedExtensions": "推奨", "searchExtensions": "Marketplace で拡張機能を検索する", - "extensions": "拡張機能", "sort by installs": "並べ替え: インストール数", "sort by rating": "並べ替え: 評価", "sort by name": "並べ替え: 名前", - "no extensions found": "拡張機能が見つかりません", "suggestProxyError": "Marketplace が 'ECONNREFUSED' を返しました。'http.proxy' 設定を確認してください。", + "extensions": "拡張機能", "outdatedExtensions": "{0} 古くなった拡張機能" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json new file mode 100644 index 0000000000000..f386fc5485384 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensions": "拡張機能", + "no extensions found": "拡張機能が見つかりません", + "suggestProxyError": "Marketplace が 'ECONNREFUSED' を返しました。'http.proxy' 設定を確認してください。" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json index 8e907126b7fe3..eb5578bf82e33 100644 --- a/i18n/jpn/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json @@ -13,5 +13,7 @@ "cancel": "キャンセル", "singleDependentError": "拡張機能 '{0}' を無効にできません。これに拡張機能 '{1}' が依存しています。", "twoDependentsError": "拡張機能 '{0}' を無効にできません。これに拡張機能 '{1}' と '{2}' が依存しています。", - "multipleDependentsError": "拡張機能 '{0}' を無効にできません。これに拡張機能 '{1}'、'{2}'、その他が依存しています。" + "multipleDependentsError": "拡張機能 '{0}' を無効にできません。これに拡張機能 '{1}'、'{2}'、その他が依存しています。", + "installConfirmation": "'{0}' 拡張機能をインストールしますか?", + "install": "インストール" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index c77cc35a0f30d..5fef3555491c2 100644 --- a/i18n/jpn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,7 +16,7 @@ "associations": "言語に対するファイルの関連付け (例 \"*.extension\": \"html\") を構成します。これらの関連付けは、インストールされている言語の既定の関連付けより優先されます。", "encoding": "ファイルの読み取り/書き込みで使用する既定の文字セット エンコーディング。", "autoGuessEncoding": "有効な場合、ファイルを開くときに文字セット エンコードを推測します", - "eol": "既定の改行文字。", + "eol": "既定の改行文字。LF の場合には \\n を CRLF の場合には \\r\\n を使用してください。", "trimTrailingWhitespace": "有効にすると、ファイルの保存時に末尾の空白をトリミングします。", "insertFinalNewline": "有効にすると、ファイルの保存時に最新の行を末尾に挿入します。", "files.autoSave.off": "ダーティ ファイルを自動的に保存することはしません。", @@ -25,10 +25,9 @@ "files.autoSave.onWindowChange": "ウィンドウがフォーカスを失った時点で、ダーティ ファイルを自動的に保存します。", "autoSave": "ダーティ ファイルの自動保存を制御します。有効な値: '{0}'、'{1}'、'{2}' (エディターがフォーカスを失います)、'{3}' (ウィンドウがフォーカスを失います)。'{4}' に設定すると、'files.autoSaveDelay' で遅延を構成できます。", "autoSaveDelay": "ダーティ ファイルの自動保存の遅延をミリ秒単位で制御します。'files.autoSave' が '{0}' に設定されている場合のみ適用されます", - "watcherExclude": "ファイル モニタリングから除外するファイル パスの glob パターンを構成します。この設定を変更すると、再起動が必要になります。始動時に Code が消費する CPU 時間が多い場合は、大規模なフォルダーを除外して初期ロードを減らせます。", "hotExit.off": "Hot Exit を無効にします。", "hotExit.onExit": "アプリケーションが閉じると (Windows/Linux で最後のウィンドウが閉じるとき、または workbench.action.quit コマンドがトリガーされるとき (コマンド パレット、キー バインド、メニュー))、Hot Exit がトリガーされます。バックアップされているすべてのウィンドウは、次の起動時に復元されます。", - "hotExit.onExitAndWindowClose": "アプリケーションが閉じると (Windows/Linux で最後のウィンドウが閉じるとき、または workbench.action.quit コマンドがトリガーするとき (コマンド パレット、キー バインド、メニュー))、Hot Exit がトリガーされます。また、フォルダーが開かれているウィンドウについても、それが最後のウィンドウかどうかに関係なく、Hot Exit がトリガーされます。フォルダーが開かれていないウィンドウはすべて、次回の起動時に復元されます。フォルダーのウィンドウをシャットダウン前と同じ状態に復元するには、\"window.reopenFolders\" を \"all\" に設定します。", + "hotExit.onExitAndWindowClose": "アプリケーションが閉じると (Windows/Linux で最後のウィンドウが閉じるとき、または workbench.action.quit コマンドがトリガーするとき (コマンド パレット、キー バインド、メニュー))、Hot Exit がトリガーされます。また、フォルダーが開かれているウィンドウについても、それが最後のウィンドウかどうかに関係なく、Hot Exit がトリガーされます。フォルダーが開かれていないウィンドウはすべて、次回の起動時に復元されます。フォルダーのウィンドウをシャットダウン前と同じ状態に復元するには、\"window.restoreWindows\" を \"all\" に設定します。", "hotExit": "エディターを終了するときに保存を確認するダイアログを省略し、保存されていないファイルをセッション後も保持するかどうかを制御します。", "defaultLanguage": "新しいファイルに割り当てられる既定の言語モード。", "editorConfigurationTitle": "エディター", diff --git a/i18n/jpn/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json b/i18n/jpn/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json index aedf7ed94edc9..c47a75120d044 100644 --- a/i18n/jpn/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json @@ -11,5 +11,6 @@ "genericSaveError": "'{0}' の保存に失敗しました: {1}", "staleSaveError": "'{0} の保存に失敗しました。ディスクの内容の方が新しくなっています。[比較] をクリックしてご使用のバージョンをディスク上のバージョンと比較してください。", "compareChanges": "比較", + "saveConflictDiffLabel": "{0} (ディスク上) ↔ {1} ({2} 内) - 保存の競合を解決", "userGuide": "エディター ツール バーの操作で、変更を [元に戻す] か、ディスクの内容を変更内容で [上書き] します" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json b/i18n/jpn/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json index b6fe55337f3cd..93f172ab42480 100644 --- a/i18n/jpn/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "explorerSection": "ファイル エクスプローラー セクション", "noWorkspace": "開いているフォルダーがありません", + "explorerSection": "ファイル エクスプローラー セクション", "noWorkspaceHelp": "まだフォルダーを開いていません。", "openFolder": "フォルダーを開く" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json b/i18n/jpn/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json index 2397d9a49b42e..5701b9ded9fb0 100644 --- a/i18n/jpn/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "explorerSection": "ファイル エクスプローラー セクション", + "folders": "フォルダー", "treeAriaLabel": "ファイル エクスプローラー" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json b/i18n/jpn/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json index e97af3104a281..489a4baaeebcd 100644 --- a/i18n/jpn/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "openEditosrSection": "[開いているエディター] セクション", "openEditors": "開いているエディター", + "openEditosrSection": "[開いているエディター] セクション", "treeAriaLabel": "開いているエディター: アクティブなファイルのリスト", "dirtyCounter": "未保存 ({0})" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json b/i18n/jpn/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json index 605f5fdda8d53..07e4dff5522c8 100644 --- a/i18n/jpn/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json @@ -7,6 +7,7 @@ "editorGroupAriaLabel": "{0}、エディター グループ", "openEditorAriaLabel": "{0}、開いているエディター", "saveAll": "すべて保存", + "closeAllUnmodified": "未変更を閉じる", "closeAll": "すべて閉じる", "close": "閉じる", "closeOthers": "その他を閉じる" diff --git a/i18n/jpn/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index a71fcb6fc945c..e14e57a90eb79 100644 --- a/i18n/jpn/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -5,5 +5,11 @@ // Do not edit this file. It is machine generated. { "slow": "スタートアップの遅延が検出されました", - "slow.detail": "スタートアップが遅かったとのこと、申し訳ございません。プロファイルを有効にして、'{0}' を再起動し、プロファイルを共有してください。スタートアップの改善のために参考にさせていただきます。" + "slow.detail": "スタートアップが遅かったとのこと、申し訳ございません。プロファイルを有効にして、'{0}' を再起動し、プロファイルを共有してください。スタートアップの改善のために参考にさせていただきます。", + "prof.message": "プロファイルが正常に作成されました。", + "prof.detail": "案件を作成し、手動で次のファイルを添付してください:\\n{0}", + "prof.restartAndFileIssue": "問題を作成して再起動", + "prof.restart": "再起動", + "prof.thanks": "ご協力いただき、ありがとうございます。", + "prof.detail.restart": "'{0}' を引き続き使用するには、最後の再起動が必要です。 改めてあなたの貢献に感謝します。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json index a98cebe13010e..9b0f4ce7178aa 100644 --- a/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -7,6 +7,7 @@ "keybindingsInputName": "キーボード ショートカット", "SearchKeybindings.AriaLabel": "キー バインドの検索", "SearchKeybindings.Placeholder": "キー バインドの検索", + "sortByPrecedene": "優先順位で並べ替え", "header-message": "高度なカスタマイズを行うには、次を開いて編集:", "keybindings-file-name": "keybindings.json", "keybindingsLabel": "キー バインド", @@ -14,6 +15,7 @@ "addLabel": "キー バインドの追加", "removeLabel": "キー バインドの削除", "resetLabel": "キー バインドのリセット", + "showConflictsLabel": "競合の表示", "copyLabel": "コピー", "error": "キー バインドの編集中にエラー '{0}' が発生しました。'keybindings.json' ファイルを開いてご確認ください。", "command": "コマンド", diff --git a/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index 2b92bd3cf1ce4..a4fef8cf3c06d 100644 --- a/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -5,7 +5,7 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.start": "キー バインドの定義", - "defineKeybinding.kbLayoutInfoMessage": "現在のキーボード レイアウト用に", "defineKeybinding.kbLayoutErrorMessage": "現在のキーボード レイアウトでは、このキーの組み合わせを生成することはできません。", - "DefineKeybindingAction": "キー バインドの定義" + "defineKeybinding.kbLayoutLocalAndUSMessage": "現在のキーボード レイアウトで示すと **{0}** です。(US 標準: **{1}**)", + "defineKeybinding.kbLayoutLocalMessage": "現在のキーボード レイアウトで示すと **{0}** です。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index e8b7110516d21..b2c93cd566fb4 100644 --- a/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -6,6 +6,7 @@ { "openGlobalSettings": "ユーザー設定を開く", "openGlobalKeybindings": "キーボード ショートカットを開く", + "openGlobalKeybindingsFile": "キーボード ショートカット ファイルを開く", "openWorkspaceSettings": "ワークスペース設定を開く", "configureLanguageBasedSettings": "言語固有の設定を構成します...", "languageDescriptionConfigured": "({0})", diff --git a/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index 0a35cdb1be9b0..56d1ce3bd0227 100644 --- a/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -4,6 +4,9 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "errorInvalidConfiguration": "設定を書き込めません。ファイル内のエラー/警告を修正してからもう一度お試しください。", + "defaultSettingsTitle": "既定の設定", + "noSettingsFound": "設定が見つかりません。", "editTtile": "編集", "replaceDefaultValue": "設定を置換", "copyDefaultValue": "設定にコピー", diff --git a/i18n/jpn/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json b/i18n/jpn/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json index 12c9ae6255c15..b7f60e7335a2b 100644 --- a/i18n/jpn/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json @@ -6,5 +6,6 @@ { "default": "既定", "user": "ユーザー", + "meta": "meta", "option": "オプション" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json b/i18n/jpn/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json index f28c0310389d8..d4c0f15633071 100644 --- a/i18n/jpn/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "commonlyUsed": "よく使用するもの", + "noSettings": "設定はありません", "defaultKeybindingsHeader": "キー バインド ファイル内にキー バインドを挿入して、キー バインドを上書きします。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json b/i18n/jpn/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json index 6caf000135dbc..b0aca24403efc 100644 --- a/i18n/jpn/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json @@ -5,10 +5,14 @@ // Do not edit this file. It is machine generated. { "showTriggerActions": "すべてのコマンドの表示", + "clearCommandHistory": "コマンド履歴のクリア", + "showCommands.label": "コマンド パレット...", "entryAriaLabelWithKey": "{0}、{1}、コマンド", "entryAriaLabel": "{0}、コマンド", "canNotRun": "コマンド '{0}' はここからは実行できません。", "actionNotEnabled": "コマンド '{0}' は現在のコンテキストでは無効です。", + "recentlyUsed": "最近使用したもの", + "morecCommands": "その他のコマンド", "commandLabel": "{0}: {1}", "cat.title": "{0}: {1}", "noCommandsMatching": "一致するコマンドはありません" diff --git a/i18n/jpn/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json b/i18n/jpn/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json index 10e002dad4b4b..51d21107be084 100644 --- a/i18n/jpn/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json @@ -7,7 +7,7 @@ "entryAriaLabel": "{0}、ビューの選択", "views": "ビュー", "panels": "パネル", - "terminals": "端末", + "terminals": "ターミナル", "terminalTitle": "{0}: {1}", "channels": "出力", "openView": "ビューを開く", diff --git a/i18n/jpn/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json new file mode 100644 index 0000000000000..e23d01f91cb3f --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "relaunchSettingMessage": "再起動が必要な設定を変更しました。", + "relaunchSettingDetail": "{0} を再起動ボタンで再起動して、設定を有効にしてください。", + "restart": "再起動", + "reload": "再読み込み" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json new file mode 100644 index 0000000000000..3902ae7752750 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGutterModifiedBackground": "編集された行を示すエディター余白の背景色。", + "editorGutterAddedBackground": "追加された行を示すエディター余白の背景色。", + "editorGutterDeletedBackground": "削除された行を示すエディター余白の背景色。" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json index b650b0b0eb32f..d45b84374594d 100644 --- a/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "toggleGitViewlet": "Git を表示", + "installAdditionalSCMProviders": "その他の SCM プロバイダーをインストール...", "source control": "ソース管理", "toggleSCMViewlet": "SCM を表示", "view": "表示" diff --git a/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json b/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json index d53de2c62b070..d93c7d2fb84f6 100644 --- a/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "installAdditionalSCMProviders": "その他の SCM プロバイダーをインストール...", "switch provider": "SCM プロバイダーの切り替え..." } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/search/browser/replaceService.i18n.json b/i18n/jpn/src/vs/workbench/parts/search/browser/replaceService.i18n.json index 8b6ad71cd4e6d..2cdb182c5eeef 100644 --- a/i18n/jpn/src/vs/workbench/parts/search/browser/replaceService.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/search/browser/replaceService.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "fileReplaceChanges": "{0} ↔ {1} (置換のプレビュー)" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/jpn/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json index e7c97d566fc1d..ae61bd9d4c991 100644 --- a/i18n/jpn/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -7,6 +7,6 @@ "searchMatches": "一致する項目が {0} 件見つかりました", "searchMatch": "一致する項目が {0} 件見つかりました", "fileMatchAriaLabel": "フォルダー {2} のファイル {1} 内で {0} 件の一致、検索結果", - "replacePreviewResultAria": "プレビュー結果の置換、{0}", - "searchResultAria": "{0}、検索結果" + "replacePreviewResultAria": "テキスト {3} の {2} 列目の {0} を {1} に置換します", + "searchResultAria": "テキスト {2} の {1} 列目に {0} が見つかりました" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json b/i18n/jpn/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json index 54fb4cd8f9366..98112fb116446 100644 --- a/i18n/jpn/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json @@ -9,5 +9,6 @@ "vscode.extension.contributes.snippets-path": "スニペット ファイルのパス。拡張機能フォルダーの相対パスであり、通常 './snippets/' で始まります。", "invalid.language": "`contributes.{0}.language` で不明な言語です。提供された値: {1}", "invalid.path.0": "`contributes.{0}.path` に文字列が必要です。提供された値: {1}", - "invalid.path.1": "拡張機能のフォルダー ({2}) の中に `contributes.{0}.path` ({1}) が含まれている必要があります。これにより拡張を移植できなくなる可能性があります。" + "invalid.path.1": "拡張機能のフォルダー ({2}) の中に `contributes.{0}.path` ({1}) が含まれている必要があります。これにより拡張を移植できなくなる可能性があります。", + "badVariableUse": "スニペット \"{0}\" は、スニペット変数とスニペット プレースホルダーを混乱させる可能性が非常にあります。詳細については https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax をご覧ください。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json index dbc7f6d6a36f7..8f9586b85f4e2 100644 --- a/i18n/jpn/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json @@ -11,6 +11,6 @@ "snippetSchema.json.default": "空のスニペット", "snippetSchema.json": "ユーザー スニペット構成", "snippetSchema.json.prefix": "intellisense でスニペットを選択するときに使用するプレフィックス", - "snippetSchema.json.body": "スニペットの内容。変数には '${id}'、'${id:label}'、'${1:label}' を使用し、カーソル位置には '$0'、'$1' を使用します", + "snippetSchema.json.body": "スニペットのコンテンツです。カーソルの位置を定義するには '$1', '${1:defaultText}' を使用し、最後のカーソルの位置には '$0' を使用します。'${varName}' と '${varName:defaultText}' を使用すると変数値を挿入します。例: 'This is file: $TM_FILENAME'.", "snippetSchema.json.description": "スニペットについての記述。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json new file mode 100644 index 0000000000000..fef6bb6566beb --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "helpUs": "{0} のサポートの改善にご協力ください", + "takeShortSurvey": "簡単なアンケートの実施", + "remindLater": "後で通知する", + "neverAgain": "今後は表示しない" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..1b0a91d1c83f8 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "短いフィードバック アンケートにご協力をお願いできますか?", + "takeSurvey": "アンケートの実施", + "remindLater": "後で通知する", + "neverAgain": "今後は表示しない" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json new file mode 100644 index 0000000000000..d263ab931832d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "ビルド タスクの名前を入力してください", + "noTasksMatching": "一致するタスクがありません", + "noTasksFound": "ビルド タスクが見つかりません" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json index c0432625724e1..216d983635cf6 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -4,5 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tasks" + "entryAriaLabel": "{0}, tasks", + "recentlyUsed": "最近使用したタスク", + "configured": "構成済みのタスク", + "detected": "検出されたタスク" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json index 52ca786c8e4f8..1e77cbdffdfe9 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json @@ -4,8 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tasks", "tasksAriaLabel": "再開するタスクの名前を入力します", - "noTasksMatching": "No tasks matching", + "noTasksMatching": "一致するタスクがありません", "noTasksFound": "再開するタスクはありません" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json index 17dcb80868eb3..5a397f34e036d 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json @@ -4,8 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tasks", "tasksAriaLabel": "実行するタスクの名前を入力します", - "noTasksMatching": "No tasks matching", + "noTasksMatching": "一致するタスクがありません", "noTasksFound": "タスクが見つかりません" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json new file mode 100644 index 0000000000000..19a320bb984e0 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "テスト タスクの名前を入力してください", + "noTasksMatching": "一致するタスクがありません", + "noTasksFound": "テスト タスクが見つかりません" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index 4605e28e85a63..f4de865e7e835 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -4,14 +4,14 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "ConfigurationParser.invalidCWD": "警告: options.cwd は、型 string でなければなりません。値 {0} を無視します\n", - "ConfigurationParser.noShell": "警告: シェル構成がサポートされるのは、ターミナルでタスクを実行している場合のみです。", + "ConfigurationParser.invalidCWD": "警告: options.cwd は、string 型でなければなりません。値 {0} を無視します", "ConfigurationParser.noargs": "エラー: コマンド引数は文字列の配列でなければなりません。指定された値:\n{0}", + "ConfigurationParser.noShell": "警告: シェル構成がサポートされるのは、ターミナルでタスクを実行している場合のみです。", "ConfigurationParser.noName": "エラー: 宣言スコープ内の問題マッチャーに次の名前がなければなりません:\n{0}\n", "ConfigurationParser.unknownMatcherKind": "警告: 定義されている問題マッチャーが不明です。サポートされている型は string | ProblemMatcher | (string | ProblemMatcher)[] です。\n{0}\n", "ConfigurationParser.invalidVaraibleReference": "エラー: 正しくない problemMatcher 参照 {0}\n", "ConfigurationParser.noTaskName": "エラー: タスクが taskName プロパティを提供しなければなりません。このタスクは無視されます。\n{0}\n", "taskConfiguration.shellArgs": "警告: タスク '{0}' はシェル コマンドです。コマンド名または引数の 1 つに、エスケープされていないスペースが含まれています。コマンド ラインの引用が正しく解釈されるように、引数をコマンドにマージしてください。", - "taskConfiguration.noCommandOrDependsOn": "エラー: タスク '{0}' は、コマンドも、dependsOn プロパティも指定していません。このタスクは無視されます。定義は次のとおりです:\n{1}", + "taskConfiguration.noCommandOrDependsOn": "エラー: タスク '{0}' は、コマンドも dependsOn プロパティも指定していません。このタスクは無視されます。定義は次のとおりです:\n{1}", "taskConfiguration.noCommand": "エラー: タスク '{0}' はコマンドを定義していません。このタスクは無視されます。定義は次のとおりです:\n{1}" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json index ca2125eeaacc8..32f09d2174dd6 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "tsc.config": "TypeScript プロジェクトをコンパイル", - "tsc.watch": "ウォッチ モードで TypeScript プロジェクトをコンパイル", "dotnetCore": ".NET Core ビルド コマンドの実行", "msbuild": "ビルド ターゲットを実行", "externalCommand": "任意の外部コマンドを実行する例", diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json index 522b6ddc0ea39..c0f160530b628 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json @@ -7,6 +7,7 @@ "JsonSchema.options": "追加のコマンド オプション", "JsonSchema.options.cwd": "実行されるプログラムまたはスクリプトの現在の作業ディレクトリ。省略すると、Code の現在のワークスペースのルートが使用されます。", "JsonSchema.options.env": "実行されるプログラムまたはシェルの環境。省略すると、親プロセスの環境が使用されます。", + "JsonSchema.shellConfiguration": "使用するシェルを構成します。", "JsonSchema.shell.executable": "使用するシェル。", "JsonSchema.shell.args": "シェル引数。", "JsonSchema.command": "実行されるコマンド。外部プログラムかシェル コマンドです。", diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json index d4e5894c8b6df..fec9e1206745f 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json @@ -5,6 +5,8 @@ // Do not edit this file. It is machine generated. { "JsonSchema.version": "構成のバージョン番号", + "JsonSchema._runner": "ランナーが新しくなります。正式なランナープロパティーを使用してください", + "JsonSchema.runner": "タスクをプロセスとして実行して、出力が出力ウィンドウまたは端末内に表示されるかどうかを定義します。", "JsonSchema.windows": "Windows 固有のコマンド構成", "JsonSchema.mac": "Mac 固有のコマンド構成", "JsonSchema.linux": "Linux 固有のコマンド構成", diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json index fd5f48dd41517..10bb4335669ba 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -4,11 +4,22 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "JsonSchema.shell": "コマンドがシェル コマンドか外部プログラムかを指定します。省略すると、既定は false になります。", + "JsonSchema.tasks.dependsOn.string": "このタスクが依存している別のタスク。", + "JsonSchema.tasks.dependsOn.array": "このタスクが依存している他の複数のタスク。", + "JsonSchema.tasks.presentation": "タスクの出力の表示と入力の読み取りに使用するようにパネルを構成します。", + "JsonSchema.tasks.presentation.echo": "実行されたコマンドがパネルにエコーされるかどうかを制御します。既定は trueです。", + "JsonSchema.tasks.presentation.focus": "パネルがフォーカスされるかどうかを制御します。既定は false です。true に設定した場合、パネルも表示されます。", + "JsonSchema.tasks.presentation.reveals": "タスクを実行しているパネルを表示するかどうかを制御します。既定は \"always\" です。", + "JsonSchema.tasks.presentation.instance": "タスク間でパネルを共有するか、またはこのタスクで占有するか、実行ごとに新しいパネルを作成するかどうかを制御します。", + "JsonSchema.tasks.type": "タスクをプロセスとして実行するか、またはシェル内部でコマンドとして実行するかどうかを定義します。既定は process です。", "JsonSchema.version": "構成のバージョン番号", + "JsonSchema.tasks.taskLabel": "タスクのラベル", + "JsonSchema.tasks.taskName": "タスクの名前", + "JsonSchema.tasks.background": "実行済みのタスクが維持され、バッググラウンドで実行されているかどうか。", + "JsonSchema.tasks.promptOnClose": "タスクの実行中に VS Code を閉じるときにユーザーにダイアログを表示するかどうか。", + "JsonSchema.tasks.matchers": "使用する問題マッチャー。1 つの文字列または問題マッチャー定義か、文字列と問題マッチャーの配列です。", "JsonSchema.windows": "Windows 固有のコマンド構成", "JsonSchema.mac": "Mac 固有のコマンド構成", - "JsonSchema.linux": "Linux 固有のコマンド構成", - "JsonSchema.shell": "コマンドがシェル コマンドか外部プログラムかを指定します。省略すると、既定は false になります。", - "JsonSchema.tasks.dependsOn.string": "このタスクが依存している別のタスク。", - "JsonSchema.tasks.dependsOn.array": "このタスクが依存している他の複数のタスク。" + "JsonSchema.linux": "Linux 固有のコマンド構成" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 7ed8a4fbeae15..8b5f12f8efa72 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -9,37 +9,42 @@ "ConfigureTaskRunnerAction.quickPick.template": "タスク ランナーを選択", "ConfigureTaskRunnerAction.autoDetecting": "{0} のタスクを自動検出", "ConfigureTaskRunnerAction.autoDetect": "タスク システムの自動検出が失敗しました。既定のテンプレートを使用しています。詳細については、タスク出力を参照してください", + "ConfigureTaskRunnerAction.autoDetectError": "タスク システムの自動検出でエラーが発生しました。詳細については、タスク出力を参照してください。", "ConfigureTaskRunnerAction.failed": "'.vscode' フォルダー内に 'tasks.json' ファイルを作成できません。詳細については、タスク出力を参照してください。", "ConfigureTaskRunnerAction.label": "タスク ランナーの構成", "ConfigureBuildTaskAction.label": "ビルド タスクを構成します", "CloseMessageAction.label": "閉じる", - "ShowTerminalAction.label": "端末の表示", + "ShowTerminalAction.label": "ターミナルの表示", "problems": "問題", "manyMarkers": "99+", "tasks": "タスク", "TaskSystem.noHotSwap": "タスク実行エンジンを変更するには VS Code の再起動が必要です。変更は無視されます。", - "TaskService.noBuildTask": "ビルド タスクが定義されていません。tasks.json ファイルでタスクに 'isBuildCommand' というマークを付けてください。", - "TaskService.noTestTask": "テスト タスクが定義されていません。tasks.json ファイルでタスクに 'isTestCommand' というマークを付けてください。", + "TaskService.noBuildTask1": "ビルド タスクが定義されていません。tasks.json ファイルでタスクに 'isBuildCommand' というマークを付けてください。", + "TaskService.noTestTask1": "テスト タスクが定義されていません。tasks.json ファイルでタスクに 'isTestCommand' というマークを付けてください。", "TaskServer.noTask": "実行が要求されたタスク {0} が見つかりません。", - "TaskSystem.activeSame": "タスクは既にアクティブおよびウォッチ モードになっています。タスクを終了するには、`F1 > タスクの終了` を使用します", + "customizeParseErrors": "現在のタスクの構成にはエラーがあります。タスクをカスタマイズする前にエラーを修正してください。", + "moreThanOneBuildTask": "tasks.json で複数のビルド タスクが定義されています。最初のタスクのみを実行します。\\n", + "TaskSystem.activeSame.background": "タスクは既にアクティブおよびバックグランド モードになっています。タスクを終了するには `F1 > タスクの終了` を使用します", + "TaskSystem.activeSame.noBackground": "タスクは既にアクティブになっています。タスクを終了するには、`F1 > タスクの終了` を使用します", "TaskSystem.active": "既に実行中のタスクがあります。まずこのタスクを終了してから、別のタスクを実行してください。", "TaskSystem.restartFailed": "タスク {0} を終了して再開できませんでした", "TaskSystem.configurationErrors": "エラー: 指定したタスク構成に検証エラーがあり、使用できません。最初にエラーを修正してください。", + "TaskSystem.invalidTaskJson": "エラー: tasks.json ファイルの内容に構文エラーがあります。訂正してからタスクを実行してください。\n", "TaskSystem.runningTask": "実行中のタスクがあります。終了しますか?", "TaskSystem.terminateTask": "タスクの終了(&&T)", "TaskSystem.noProcess": "起動したタスクは既に存在しません。タスクを起動したバックグラウンド プロセスが VS コードで終了すると、プロセスが孤立することがあります。これを回避するには、待機フラグを設定して最後のバックグラウンド プロセスを開始します。", "TaskSystem.exitAnyways": "常に終了(&&E)", - "TerminateAction.label": "実行中のタスクの終了", + "TerminateAction.label": "タスクの終了", "TaskSystem.unknownError": "タスクの実行中にエラーが発生しました。詳細については、タスク ログを参照してください。", "TaskService.noWorkspace": "タスクはワークスペース フォルダーでのみ利用可能です。", + "recentlyUsed": "最近使用したタスク", + "configured": "構成済みのタスク", + "detected": "検出されたタスク", "TerminateAction.noProcess": "起動したプロセスは既に存在しません。タスクを起動したバックグラウンド タスクが VS コードで終了すると、プロセスが孤立することがあります。", "TerminateAction.failed": "実行中のタスクの終了に失敗しました", "ShowLogAction.label": "タスク ログの表示", "RunTaskAction.label": "タスクの実行", - "RestartTaskAction.label": "タスクの再開", "BuildAction.label": "ビルド タスクの実行", "TestAction.label": "テスト タスクの実行", - "quickOpen.task": "タスクの実行", - "quickOpen.terminateTask": "タスクの終了", - "quickOpen.restartTask": "タスクの再開" + "quickOpen.task": "タスクの実行" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index 12b9c699bf24f..40f8e647676e6 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -6,5 +6,7 @@ { "TerminalTaskSystem.unknownError": "タスクの実行中に不明なエラーが発生しました。詳細については、タスク出力ログを参照してください。", "TerminalTaskSystem.terminalName": "タスク - {0}", - "TerminalTaskSystem": "UNC ドライブでシェル コマンドを実行できません。" + "reuseTerminal": "端末はタスクで再利用されます、閉じるには任意のキーを押してください。", + "TerminalTaskSystem": "UNC ドライブでシェル コマンドを実行できません。", + "unkownProblemMatcher": "問題マッチャー {0} は解決できませんでした。マッチャーは無視されます" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json index 6f9be6076a6bf..0cc1f921982e6 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json @@ -7,5 +7,6 @@ "TaskRunnerSystem.unknownError": "タスクの実行中に不明なエラーが発生しました。詳細については、タスク出力ログを参照してください。", "TaskRunnerSystem.watchingBuildTaskFinished": "\nビルド タスクのウォッチが終了しました。", "TaskRunnerSystem.childProcessError": "Failed to launch external program {0} {1}.", - "TaskRunnerSystem.cancelRequested": "\nユーザー要求ごとにタスク '{0}' が終了しました。" + "TaskRunnerSystem.cancelRequested": "\nユーザー要求ごとにタスク '{0}' が終了しました。", + "unkownProblemMatcher": "問題マッチャー {0} は解決できませんでした。マッチャーは無視されます" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json new file mode 100644 index 0000000000000..f4de865e7e835 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ConfigurationParser.invalidCWD": "警告: options.cwd は、string 型でなければなりません。値 {0} を無視します", + "ConfigurationParser.noargs": "エラー: コマンド引数は文字列の配列でなければなりません。指定された値:\n{0}", + "ConfigurationParser.noShell": "警告: シェル構成がサポートされるのは、ターミナルでタスクを実行している場合のみです。", + "ConfigurationParser.noName": "エラー: 宣言スコープ内の問題マッチャーに次の名前がなければなりません:\n{0}\n", + "ConfigurationParser.unknownMatcherKind": "警告: 定義されている問題マッチャーが不明です。サポートされている型は string | ProblemMatcher | (string | ProblemMatcher)[] です。\n{0}\n", + "ConfigurationParser.invalidVaraibleReference": "エラー: 正しくない problemMatcher 参照 {0}\n", + "ConfigurationParser.noTaskName": "エラー: タスクが taskName プロパティを提供しなければなりません。このタスクは無視されます。\n{0}\n", + "taskConfiguration.shellArgs": "警告: タスク '{0}' はシェル コマンドです。コマンド名または引数の 1 つに、エスケープされていないスペースが含まれています。コマンド ラインの引用が正しく解釈されるように、引数をコマンドにマージしてください。", + "taskConfiguration.noCommandOrDependsOn": "エラー: タスク '{0}' は、コマンドも dependsOn プロパティも指定していません。このタスクは無視されます。定義は次のとおりです:\n{1}", + "taskConfiguration.noCommand": "エラー: タスク '{0}' はコマンドを定義していません。このタスクは無視されます。定義は次のとおりです:\n{1}" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json index 0465847b15085..1288c0d2584a7 100644 --- a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -4,27 +4,27 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "terminalIntegratedConfigurationTitle": "統合端末", - "terminal.integrated.shell.linux": "端末が Linux で使用するシェルのパス。", - "terminal.integrated.shellArgs.linux": "Linux 端末で使用するコマンド ライン引数。", - "terminal.integrated.shell.osx": "端末が OS X で使用するシェルのパス。", + "terminalIntegratedConfigurationTitle": "統合ターミナル", + "terminal.integrated.shell.linux": "ターミナルが Linux で使用するシェルのパス。", + "terminal.integrated.shellArgs.linux": "Linux のターミナルで使用するコマンド ライン引数。", + "terminal.integrated.shell.osx": "ターミナルが OS X で使用するシェルのパス。", "terminal.integrated.shellArgs.osx": "OS X 端末で使用するコマンド ライン引数。", - "terminal.integrated.shell.windows": "端末が Windows で使用するシェルのパス。Windows に付属のシェル (cmd、PowerShell、または Bash on Ubuntu) を使用する場合、64 ビット バージョンを使用するには、C:\\Windows\\System32 ではなく、C:\\Windows\\sysnative を選びます。", + "terminal.integrated.shell.windows": "ターミナルが Windows で使用するシェルのパス。Windows に付属のシェル (cmd、PowerShell、または Bash on Ubuntu) を使用する場合、64 ビット バージョンを使用するには、C:\\Windows\\System32 ではなく、C:\\Windows\\sysnative を選びます。", "terminal.integrated.shellArgs.windows": "Windows ターミナル上の場合に使用されるコマンド ライン引数。", - "terminal.integrated.rightClickCopyPaste": "設定している場合、端末内で右クリックしたときにコンテキスト メニューを表示させず、選択範囲がある場合はコピー、選択範囲がない場合は貼り付けの操作を行います。", + "terminal.integrated.rightClickCopyPaste": "設定している場合、ターミナル内で右クリックしたときにコンテキスト メニューを表示させず、選択範囲がある場合はコピー、選択範囲がない場合は貼り付けの操作を行います。", "terminal.integrated.fontFamily": "端末のフォント ファミリを制御します。既定値は editor.fontFamily になります。", - "terminal.integrated.fontLigatures": "端末でフォントの合字が有効かどうかを制御します。", - "terminal.integrated.fontSize": "端末のフォント サイズをピクセル単位で制御します。", - "terminal.integrated.lineHeight": "端末の行の高さを制御します。この数値に端末のフォント サイズを乗算すると、実際の行の高さ (ピクセル単位) になります。", + "terminal.integrated.fontLigatures": "ターミナルでフォントの合字が有効かどうかを制御します。", + "terminal.integrated.fontSize": "ターミナルのフォント サイズをピクセル単位で制御します。", + "terminal.integrated.lineHeight": "ターミナルの行の高さを制御します。この数値にターミナルのフォント サイズを乗算すると、実際の行の高さ (ピクセル単位) になります。", "terminal.integrated.enableBold": "ターミナル内で太字を有効にするかどうか。これにはターミナルシェルからのサポートがひつようです。", - "terminal.integrated.cursorBlinking": "端末のカーソルを点滅させるかどうかを制御します。", + "terminal.integrated.cursorBlinking": "ターミナルのカーソルを点滅させるかどうかを制御します。", "terminal.integrated.cursorStyle": "端末のカーソルのスタイルを制御します。", "terminal.integrated.scrollback": "端末がそのバッファーに保持できる最大行数を制御します。", - "terminal.integrated.setLocaleVariables": "端末の開始時にロケール変数を設定するかどうかを制御します。OS X では既定で true になり、その他のプラットフォームでは false です。", + "terminal.integrated.setLocaleVariables": "ターミナルの開始時にロケール変数を設定するかどうかを制御します。OS X では既定で true になり、その他のプラットフォームでは false です。", "terminal.integrated.cwd": "端末を起動する明示的な開始パスです。これはシェル プロセスの現在の作業ディレクトリ (cwd) として使用されます。特にルート ディレクトリが cwd に適していない場合に、ワークスペースの設定で役立ちます。", "terminal.integrated.confirmOnExit": "アクティブなターミナル セッションがある場合に終了の確認をするかどうか。", "terminal.integrated.commandsToSkipShell": "キーバインドがシェルに送信されず、代わりに常に Code で処理されるコマンド ID のセット。これにより、ターミナルがフォーカスされていない場合と同じ動作をするシェルによって通常使用されるキーバインドを使用できるようになります。例: Ctrl+p で Quick Open を起動します。", - "terminal": "端末", - "terminalCategory": "端末", + "terminal": "ターミナル", + "terminalCategory": "ターミナル", "viewCategory": "表示" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json index 1ed0e37207236..c776eb2d15263 100644 --- a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -4,27 +4,34 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "workbench.action.terminal.toggleTerminal": "統合端末の切り替え", + "workbench.action.terminal.toggleTerminal": "統合ターミナルの切り替え", "workbench.action.terminal.kill": "アクティブな端末インスタンスを強制終了", - "workbench.action.terminal.kill.short": "端末の強制終了", + "workbench.action.terminal.kill.short": "ターミナルの強制終了", "workbench.action.terminal.copySelection": "選択内容のコピー", - "workbench.action.terminal.new": "新しい統合端末の作成", - "workbench.action.terminal.new.short": "新しい端末", + "workbench.action.terminal.selectAll": "すべて選択", + "workbench.action.terminal.new": "新しい統合ターミナルの作成", + "workbench.action.terminal.new.short": "新しいターミナル", "workbench.action.terminal.focus": "端末にフォーカス", "workbench.action.terminal.focusNext": "次の端末にフォーカス", "workbench.action.terminal.focusAtIndex": "ターミナル {0} にフォーカス", - "workbench.action.terminal.focusPrevious": "前の端末にフォーカス", - "workbench.action.terminal.paste": "アクティブな端末に貼り付け", + "workbench.action.terminal.focusPrevious": "前のターミナルにフォーカス", + "workbench.action.terminal.paste": "アクティブなターミナルに貼り付け", "workbench.action.terminal.DefaultShell": "既定のシェルの選択", - "workbench.action.terminal.runSelectedText": "アクティブな端末で選択したテキストを実行", + "workbench.action.terminal.runSelectedText": "アクティブなターミナルで選択したテキストを実行", "workbench.action.terminal.runActiveFile": "アクティブなファイルをアクティブなターミナルで実行", "workbench.action.terminal.runActiveFile.noFile": "ターミナルで実行できるのは、ディスク上のファイルのみです", - "workbench.action.terminal.switchTerminalInstance": "端末インスタンスをスイッチ", + "workbench.action.terminal.switchTerminalInstance": "ターミナル インスタンスの切り替え", "workbench.action.terminal.scrollDown": "下にスクロール (行)", "workbench.action.terminal.scrollDownPage": "スクロール ダウン (ページ)", "workbench.action.terminal.scrollToBottom": "一番下にスクロール", "workbench.action.terminal.scrollUp": "上にスクロール (行)", "workbench.action.terminal.scrollUpPage": "スクロール アップ (ページ)", "workbench.action.terminal.scrollToTop": "一番上にスクロール", - "workbench.action.terminal.clear": "クリア" + "workbench.action.terminal.clear": "クリア", + "workbench.action.terminal.allowWorkspaceShell": "ワークスペースでシェルを構成することを許可する", + "workbench.action.terminal.disallowWorkspaceShell": "ワークスペースでシェルを構成することを許可しない", + "workbench.action.terminal.rename": "名前変更", + "workbench.action.terminal.rename.prompt": "ターミナルの名前を入力してください", + "workbench.action.terminal.focusFindWidget": "検索ウィジェットにフォーカスする", + "workbench.action.terminal.hideFindWidget": "検索ウィジェットを非表示にする" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json index 7880bacd288bd..50f3054a32680 100644 --- a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.background": "ターミナルの背景色。パネルごとに異なる色を指定できます。", + "terminal.foreground": "ターミナルの前景色。", "terminal.ansiColor": "ターミナルの '{0}' ANSI カラー。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json index 1ed48f98d5802..981936fe8f6e0 100644 --- a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.integrated.allowWorkspaceShell": "{0} (ワークスペースの設定として定義されている) をターミナルで起動することを許可しますか?", "allow": "Allow", "disallow": "Disallow" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json new file mode 100644 index 0000000000000..19f4b3b0c2deb --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "検索", + "placeholder.find": "検索", + "label.previousMatchButton": "前の一致項目", + "label.nextMatchButton": "次の一致項目", + "label.closeButton": "閉じる" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json index ab5a0deee5d23..0e3e4090a6747 100644 --- a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "terminal.integrated.copySelection.noSelection": "ターミナルにフォーカスがない場合は、ターミナルの選択をコピーできません", - "terminal.integrated.exitedWithCode": "端末処理が終了しました (終了コード: {0})", + "terminal.integrated.copySelection.noSelection": "ターミナルにコピー対象の選択範囲がありません", + "terminal.integrated.exitedWithCode": "ターミナルの処理が終了しました (終了コード: {0})", "terminal.integrated.waitOnExit": "任意のキーを押して端末を終了します", - "terminal.integrated.launchFailed": "端末プロセス コマンド `{0}{1}` を起動できませんでした (終了コード: {2})" + "terminal.integrated.launchFailed": "ターミナル プロセス コマンド `{0}{1}` を起動できませんでした (終了コード: {2})" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json index 568e7d455c16d..829ad2adee64a 100644 --- a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminalLinkHandler.followLinkAlt": "Altl キーを押しながらクリックしてリンク先を表示", "terminalLinkHandler.followLinkCmd": "command キーを押しながらクリックしてリンク先を表示", "terminalLinkHandler.followLinkCtrl": "Ctrl キーを押しながらクリックしてリンク先を表示" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json index e8e8ad9346b13..0c5802f950250 100644 --- a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json @@ -5,7 +5,8 @@ // Do not edit this file. It is machine generated. { "copy": "コピー", - "createNewTerminal": "新しい端末", + "createNewTerminal": "新しいターミナル", "paste": "貼り付け", + "selectAll": "すべて選択", "clear": "クリア" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 7a13ff5d81d24..7592dde26b53f 100644 --- a/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -5,14 +5,15 @@ // Do not edit this file. It is machine generated. { "selectTheme.label": "配色テーマ", - "installColorThemes": "その他の色のテーマをインストール...", - "problemChangingTheme": "テーマの設定で問題が発生しました: {0}", - "themes.selectTheme": "配色テーマの選択", + "installColorThemes": "その他の配色テーマをインストール...", + "themes.selectTheme": "配色テーマの選択 (上/下キーでプレビュー可能)", "selectIconTheme.label": "ファイル アイコンのテーマ", "installIconThemes": "その他のファイル アイコンのテーマをインストール...", "noIconThemeLabel": "なし", "noIconThemeDesc": "ファイル アイコンを無効にする", "problemChangingIconTheme": "アイコン テーマの設定で問題が発生しました: {0}", "themes.selectIconTheme": "ファイル アイコンのテーマを選択します", - "preferences": "基本設定" + "generateColorTheme.label": "現在の設定から配色テーマを生成する", + "preferences": "基本設定", + "developer": "Developer" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/update/electron-browser/update.i18n.json b/i18n/jpn/src/vs/workbench/parts/update/electron-browser/update.i18n.json index a420d7608028d..dbab4eaef8f2c 100644 --- a/i18n/jpn/src/vs/workbench/parts/update/electron-browser/update.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/update/electron-browser/update.i18n.json @@ -13,7 +13,19 @@ "read the release notes": "{0} v{1} へようこそ! リリース ノートを確認しますか?", "licenseChanged": "ライセンス条項が変更されました。内容をご確認ください。", "license": "ライセンスの閲覧", - "updateAvailable": "{0} は再起動後に更新されます。", + "updateIsReady": "新しい更新が利用可能です。", "thereIsUpdateAvailable": "利用可能な更新プログラムがあります。", - "noUpdatesAvailable": "現在入手可能な更新はありません。" + "updateAvailable": "{0} は再起動後に更新されます。", + "noUpdatesAvailable": "現在入手可能な更新はありません。", + "commandPalette": "コマンド パレット...", + "settings": "設定", + "keyboardShortcuts": "キーボード ショートカット", + "selectTheme.label": "配色テーマ", + "themes.selectIconTheme.label": "ファイル アイコンのテーマ", + "not available": "更新は利用できません", + "checkingForUpdates": "更新を確認しています...", + "DownloadUpdate": "利用可能な更新プログラムをダウンロードします", + "DownloadingUpdate": "更新をダウンロードしています...", + "InstallingUpdate": "更新プログラムをインストールしています...", + "checkForUpdates": "更新の確認..." } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/views/browser/views.i18n.json b/i18n/jpn/src/vs/workbench/parts/views/browser/views.i18n.json new file mode 100644 index 0000000000000..6bcbcb522f9b5 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/views/browser/views.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewToolbarAriaLabel": "{0} 個のアクション" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json b/i18n/jpn/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json new file mode 100644 index 0000000000000..8d16415e57321 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "ビューは配列にする必要があります", + "requirestring": " `{0}` プロパティは必須で、`string` 型でなければなりません", + "optstring": "`{0}` プロパティは省略するか、`string` 型にする必要があります", + "vscode.extension.contributes.view.id": "ビューの識別子。`vscode.window.registerTreeDataProviderForView` API を介してデータ プロバイダーを登録するには、これを使用します。また、`onView:${id}` イベントを `activationEvents` に登録することによって、拡張機能のアクティブ化をトリガーするためにも使用できます。", + "vscode.extension.contributes.view.name": "ビューの判読できる名前。表示されます", + "vscode.extension.contributes.view.when": "このビューを表示するために満たす必要がある条件", + "vscode.extension.contributes.views": "ビューをエディターに提供します", + "views.explorer": "エクスプローラー ビュー", + "locationId.invalid": "`{0}` は有効なビューの場所ではありません" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json b/i18n/jpn/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json index e2eae85639cad..c1b06e82401af 100644 --- a/i18n/jpn/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json @@ -11,13 +11,9 @@ "watermark.openFileFolder": "ファイルまたはフォルダーを開く", "watermark.openRecent": "最近開いた項目", "watermark.newUntitledFile": "無題の新規ファイル", - "watermark.toggleTerminal": "端末の切り替え", + "watermark.toggleTerminal": "ターミナルの切り替え", "watermark.findInFiles": "フォルダーを指定して検索", "watermark.startDebugging": "デバッグの開始", - "watermark.selectTheme": "テーマの変更", - "watermark.selectKeymap": "キーマップの変更", - "watermark.keybindingsReference": "キーボード参照", - "watermark.openGlobalKeybindings": "キーボード ショートカット(&&K)", "watermark.unboundCommand": "バインドなし", "workbenchConfigurationTitle": "ワークベンチ", "tips.enabled": "有効にすると、エディターを 1 つも開いていないときに透かしのヒントが表示されます。" diff --git a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index d4254f6ae3603..f40003192dce7 100644 --- a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -11,33 +11,34 @@ "welcomePage.openFolder": "フォルダーを開く...", "welcomePage.cloneGitRepository": "Git リポジトリを複製...", "welcomePage.recent": "最近", + "welcomePage.moreRecent": "その他", "welcomePage.noRecentFolders": "最近使用したフォルダーなし", "welcomePage.help": "ヘルプ", - "welcomePage.productDocumentation": "製品ドキュメント", + "welcomePage.keybindingsCheatsheet": "印刷可能なキーボードのチートシート", "welcomePage.introductoryVideos": "紹介ビデオ", + "welcomePage.productDocumentation": "製品ドキュメント", "welcomePage.gitHubRepository": "GitHub リポジトリ", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "起動時にウェルカム ページを表示", - "welcomePage.quickLinks": "クイック リンク", - "welcomePage.interactivePlayground": "対話型プレイグラウンド", - "welcomePage.interactivePlaygroundDescription": "エディターの基本機能を簡潔なチュートリアルで体験します", - "welcomePage.interfaceOverview": "インターフェイスの概要", - "welcomePage.interfaceOverviewDescription": "UI の主要コンポーネントを解説した視覚オーバーレイを表示します", + "welcomePage.customize": "カスタマイズする", + "welcomePage.installExtensionPacks": "ツールと言語", + "welcomePage.installExtensionPacksDescription": "{0} と {1} のサポートをインストールする ", + "welcomePage.moreExtensions": "その他", + "welcomePage.installKeymapDescription": "キーボード ショートカットをインストールします", + "welcomePage.installKeymapExtension": "{0} と {1} のキーボード ショートカットをインストール", + "welcomePage.others": "その他", "welcomePage.colorTheme": "配色テーマ", "welcomePage.colorThemeDescription": "エディターとコードの外観を自由に設定します", + "welcomePage.learn": "学ぶ", + "welcomePage.showCommands": "すべてのコマンドの検索と実行", + "welcomePage.showCommandsDescription": "コマンド パレットからコマンドを検索してすばやくアクセスします ({0})", + "welcomePage.interfaceOverview": "インターフェイスの概要", + "welcomePage.interfaceOverviewDescription": "UI の主要コンポーネントを解説した視覚オーバーレイを表示します", + "welcomePage.interactivePlayground": "対話型プレイグラウンド", + "welcomePage.interactivePlaygroundDescription": "エディターの基本機能を簡潔なチュートリアルで体験します", + "welcomePage.quickLinks": "クイック リンク", "welcomePage.keybindingsReference": "キーボード ショートカットの参照資料", "welcomePage.keybindingsReferenceDescription": "最も一般的なキーボード ショートカットを掲載した印刷可能な PDF です", - "welcomePage.showCommands": "すべてのコマンドの検索と実行", - "welcomePage.showCommandsDescription": "コントロール パネルからコマンドを検索してすばやくアクセスします ({0})", "welcomePage.configureSettings": "設定を構成する", - "welcomePage.configureSettingsDescription": "VS Code の全機能を活用するために設定を微調整します", - "welcomePage.installKeymapDescription": "キーボード ショートカットをインストールします", - "welcomePage.installKeymap": "{0}、{1}、{2}、{3} のキーボード ショートカットをインストール", - "welcomePage.vim": "Vim", - "welcomePage.vimCurrent": "Vim (最新)", - "welcomePage.sublime": "Sublime", - "welcomePage.sublimeCurrent": "Sublime (最新)", - "welcomePage.atom": "Atom", - "welcomePage.atomCurrent": "Atom (最新)", - "welcomePage.others": "その他" + "welcomePage.configureSettingsDescription": "VS Code の全機能を活用するために設定を微調整します" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json index 57e82748c8e9c..87d1be505a749 100644 --- a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json @@ -5,6 +5,6 @@ // Do not edit this file. It is machine generated. { "workbenchConfigurationTitle": "ワークベンチ", - "welcomePage.enabled": "有効にすると、スタートアップ時に、ようこそページが表示されます。", + "workbench.startupEditor.none": "エディターなしで開始", "help": "ヘルプ" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index e669bacef12ae..6bda9ff535782 100644 --- a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,11 +5,32 @@ // Do not edit this file. It is machine generated. { "welcomePage": "ようこそ", - "welcome.title": "ようこそ", + "welcomePage.javaScript": "JavaScript", + "welcomePage.typeScript": "TypeScript", + "welcomePage.python": "Python", + "welcomePage.php": "PHP", + "welcomePage.docker": "Docker", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", + "welcomePage.extensionPackAlreadyInstalled": "{0} のサポートは既にインストールされています。", + "welcomePage.willReloadAfterInstallingExtensionPack": "{0} に追加のサポートをインストールしたあと、ウィンドウが再度読み込まれます。", + "welcomePage.installingExtensionPack": "{0} に追加のサポートをインストールしています...", + "welcomePage.extensionPackNotFound": "ID {1} のサポート {0} は見つかりませんでした。", "welcomePage.keymapAlreadyInstalled": "キーボード ショートカット {0} は既にインストールされています。", "welcomePage.willReloadAfterInstallingKeymap": "キーボード ショートカット {0} をインストールした後、ウィンドウが再度読み込まれます。", - "ok": "OK", "welcomePage.installingKeymap": "{0} のキーボード ショートカットをインストールしています...", "welcomePage.keymapNotFound": "ID {1} のキーボード ショートカット {0} は見つかりませんでした。", - "cancel": "キャンセル" + "welcome.title": "ようこそ", + "welcomePage.openFolderWithPath": "パス {1} のフォルダー {0} を開く", + "welcomePage.extensionListSeparator": ",", + "welcomePage.installKeymap": "{0} キーマップをインストールする", + "welcomePage.installExtensionPack": "{0} に追加のサポートをインストールする", + "welcomePage.installedKeymap": "{0} キーマップは既にインストールされています", + "welcomePage.installedExtensionPack": "{0} のサポートは既にインストールされています", + "ok": "OK", + "details": "詳細", + "cancel": "キャンセル", + "welcomePage.buttonBackground": "ウェルカム ページのボタンの背景色。", + "welcomePage.buttonHoverBackground": "ウェルカム ページのボタンのホバー背景色。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/jpn/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json index e4999a3c4e895..f2d0c06274d09 100644 --- a/i18n/jpn/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "walkThrough.unboundCommand": "バインドなし" + "walkThrough.unboundCommand": "バインドなし", + "walkThrough.gitNotFound": "システムに Git がインストールされていない可能性があります。", + "walkThrough.embeddedEditorBackground": "対話型プレイグラウンドの埋め込みエディターの背景色。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/services/configuration/node/configuration.i18n.json b/i18n/jpn/src/vs/workbench/services/configuration/node/configuration.i18n.json new file mode 100644 index 0000000000000..1cc84925ba869 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/services/configuration/node/configuration.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.configuration": "構成の設定を提供します。", + "vscode.extension.contributes.configuration.title": "設定の概要です。このラベルは、設定ファイルでコメントの区切り文字として使用します。", + "vscode.extension.contributes.configuration.properties": "構成のプロパティの説明です。", + "invalid.type": "設定すると、'configuration.type' は 'オブジェクトに設定されなければなりません", + "invalid.title": "'configuration.title' は、文字列である必要があります", + "vscode.extension.contributes.defaultConfiguration": "言語ごとに既定のエディター構成の設定を提供します。", + "invalid.properties": "'configuration.properties' は、オブジェクトである必要があります" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/jpn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index 05b5cdcae7bc8..81d7a645e3290 100644 --- a/i18n/jpn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/jpn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -4,6 +4,9 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "open": "設定を開く", + "close": "閉じる", + "saveAndRetry": "設定を保存して再試行", "errorUnknownKey": "構成ファイルに書き込めません (不明なキー)", "errorInvalidTarget": "構成ファイルに書き込めません (無効なターゲット)", "errorNoWorkspaceOpened": "開いているフォルダーがないため、設定を書き込めません。最初にフォルダーを開いてから、もう一度お試しください。", diff --git a/i18n/jpn/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json b/i18n/jpn/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json new file mode 100644 index 0000000000000..7df1ec40941af --- /dev/null +++ b/i18n/jpn/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "テレメトリ", + "telemetry.enableCrashReporting": "クラッシュ レポートを Microsoft に送信するように設定します。\nこのオプションを有効にするには、再起動が必要です。" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/services/files/node/fileService.i18n.json b/i18n/jpn/src/vs/workbench/services/files/node/fileService.i18n.json index fdbbb1f2d60a2..bb035f90aa9d3 100644 --- a/i18n/jpn/src/vs/workbench/services/files/node/fileService.i18n.json +++ b/i18n/jpn/src/vs/workbench/services/files/node/fileService.i18n.json @@ -6,6 +6,7 @@ { "fileInvalidPath": "ファイルのリソース ({0}) が無効です", "fileIsDirectoryError": "ファイルがディレクトリです ({0})", + "fileTooLargeError": "開くファイルが大きすぎます", "fileBinaryError": "ファイルはバイナリのようなので、テキストとして開くことができません", "fileNotFoundError": "ファイルが見つかりません ({0})", "unableToMoveCopyError": "移動/コピーできません。ファイルが含まれるフォルダーが置き換わることになります。", diff --git a/i18n/jpn/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/jpn/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index 7cace13d285a5..6b9b359881358 100644 --- a/i18n/jpn/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/jpn/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -5,18 +5,14 @@ // Do not edit this file. It is machine generated. { "nonempty": "空以外の値が必要です。", - "requirestring": "プロパティ `{0}` は必須で、型 `string` でなければなりません", - "optstring": "プロパティ `{0}` は省略するか、型 `string` にする必要があります", + "requirestring": "`{0}` プロパティは必須で、`string` 型でなければなりません", + "optstring": "`{0}` プロパティは省略するか、`string` 型にする必要があります", "vscode.extension.contributes.keybindings.command": "キー バインドのトリガー時に実行するコマンドの識別子。", - "vscode.extension.contributes.keybindings.key": "キーまたはキー シーケンス (キーは + で区切り、シーケンスはスペースで区切る。例: Ctrl+O、Ctrl+L L で同時に押す", "vscode.extension.contributes.keybindings.mac": "Mac 固有のキーまたはキー シーケンス。", "vscode.extension.contributes.keybindings.linux": "Linux 固有のキーまたはキー シーケンス。", "vscode.extension.contributes.keybindings.win": "Windows 固有のキーまたはキー シーケンス。", "vscode.extension.contributes.keybindings.when": "キーがアクティブの場合の条件。", "vscode.extension.contributes.keybindings": "キー バインドを提供します。", - "openDocumentation": "詳細情報", - "keybindingMigration.ok": "OK", - "keybindingMigration.prompt": "使用中のキーボード レイアウトに合わせて一部のキーボード ショートカットが変更されました。", "invalid.keybindings": "正しくない `contributes.{0}`: {1}", "unboundCommands": "他に使用できるコマンドは次のとおりです: ", "keybindings.json.title": "キー バインドの構成", diff --git a/i18n/jpn/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json b/i18n/jpn/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json index 03cdc9aeaad18..8efb5f674174f 100644 --- a/i18n/jpn/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json +++ b/i18n/jpn/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json @@ -4,13 +4,22 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "vscode.extension.contributes.languages": "言語の宣言を提供します。", + "vscode.extension.contributes.languages.id": "言語の ID。", + "vscode.extension.contributes.languages.aliases": "言語の名前のエイリアス。", + "vscode.extension.contributes.languages.extensions": "言語に関連付けられているファイルの拡張子。", + "vscode.extension.contributes.languages.filenames": "言語に関連付けられたファイル名。", + "vscode.extension.contributes.languages.filenamePatterns": "言語に関連付けられたファイル名の glob パターン。", + "vscode.extension.contributes.languages.mimetypes": "言語に関連付けられている MIME の種類。", + "vscode.extension.contributes.languages.firstLine": "言語のファイルの最初の行に一致する正規表現。", + "vscode.extension.contributes.languages.configuration": "言語の構成オプションを含むファイルへの相対パス。", "invalid": "`contributes.{0}` が無効です。配列が必要です。", "invalid.empty": "`contributes.{0}` に対する空の値", - "require.id": "プロパティ `{0}` は必須で、型 `string` でなければなりません", - "opt.extensions": "プロパティ `{0}` を省略するか、型 `string[]` にする必要があります", - "opt.filenames": "プロパティ `{0}` を省略するか、型 `string[]` にする必要があります", - "opt.firstLine": "プロパティ `{0}` を省略するか、型 `string` にする必要があります", - "opt.configuration": "プロパティ `{0}` を省略するか、型 `string` にする必要があります", - "opt.aliases": "プロパティ `{0}` を省略するか、型 `string[]` にする必要があります", - "opt.mimetypes": "プロパティ `{0}` を省略するか、型 `string[]` にする必要があります" + "require.id": "`{0}` プロパティは必須で、`string` 型でなければなりません", + "opt.extensions": "`{0}` プロパティを省略するか、`string[]` 型にする必要があります", + "opt.filenames": "`{0}` プロパティを省略するか、`string[]` 型にする必要があります", + "opt.firstLine": "`{0}` プロパティを省略するか、`string` 型にする必要があります", + "opt.configuration": "`{0}` プロパティを省略するか、`string` 型にする必要があります", + "opt.aliases": "`{0}` プロパティを省略するか、`string[]` 型にする必要があります", + "opt.mimetypes": "`{0}` プロパティを省略するか、`string[]` 型にする必要があります" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/services/progress/browser/progressService2.i18n.json b/i18n/jpn/src/vs/workbench/services/progress/browser/progressService2.i18n.json new file mode 100644 index 0000000000000..6db7d6aae514a --- /dev/null +++ b/i18n/jpn/src/vs/workbench/services/progress/browser/progressService2.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "progress.text": "{0} - {1}", + "progress.title": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json b/i18n/jpn/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json new file mode 100644 index 0000000000000..bef6d6ac1961e --- /dev/null +++ b/i18n/jpn/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.grammars": "TextMate トークナイザーを提供します。", + "vscode.extension.contributes.grammars.language": "この構文の提供先の言語識別子です。", + "vscode.extension.contributes.grammars.scopeName": "tmLanguage ファイルにより使用される TextMate スコープ名。", + "vscode.extension.contributes.grammars.path": "tmLanguage ファイルのパス。拡張機能フォルダーの相対パスであり、通常 './syntaxes/' で始まります。", + "vscode.extension.contributes.grammars.embeddedLanguages": "この文法に言語が埋め込まれている場合は、言語 ID に対するスコープ名のマップ。", + "vscode.extension.contributes.grammars.injectTo": "この文法が挿入される言語の範囲名の一覧。" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json b/i18n/jpn/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json new file mode 100644 index 0000000000000..8ff4f98ce53cb --- /dev/null +++ b/i18n/jpn/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid.language": "`contributes.{0}.language` で不明な言語です。提供された値: {1}", + "invalid.scopeName": "`contributes.{0}.scopeName` には文字列が必要です。提供された値: {1}", + "invalid.path.0": "`contributes.{0}.path` に文字列が必要です。提供された値: {1}", + "invalid.injectTo": "`contributes.{0}.injectTo` の値が無効です。言語の範囲名の配列である必要があります。指定された値: {1}", + "invalid.embeddedLanguages": "`contributes.{0}.embeddedLanguages` の値が無効です。スコープ名から言語へのオブジェクト マップである必要があります。指定された値: {1}", + "invalid.path.1": "拡張機能のフォルダー ({2}) の中に `contributes.{0}.path` ({1}) が含まれている必要があります。これにより拡張を移植できなくなる可能性があります。", + "no-tm-grammar": "この言語に対して TM 文法は登録されていません。" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json b/i18n/jpn/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json index f0fb6370546c3..978edc391415a 100644 --- a/i18n/jpn/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json +++ b/i18n/jpn/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json @@ -6,5 +6,6 @@ { "schema.colors": "構文の強調表示をする色", "schema.properties.name": "ルールの説明", - "schema.fontStyle": "ルールのフォント スタイル: '斜体'、'太字'、'下線' のいずれかまたはこれらの組み合わせ" + "schema.fontStyle": "ルールのフォント スタイル: '斜体'、'太字'、'下線' のいずれかまたはこれらの組み合わせ", + "schema.tokenColors.path": "tmTheme ファイルへのパス (現在のファイルとの相対パス)" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/jpn/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json index 16b428a254000..782cc7b29de19 100644 --- a/i18n/jpn/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json +++ b/i18n/jpn/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -5,8 +5,9 @@ // Do not edit this file. It is machine generated. { "error.cannotparsejson": "JSON テーマ ファイルの解析中に問題が発生しました: {0}", - "error.invalidformat": "JSON テーマ ファイルの解析中に問題が発生しました: {0}。'tokenColors' と 'colors' が必要です。", - "error.plist.invalidformat": "テーマ ファイルの解析中に問題が発生しました: {0}. 'settings' は配列ではありません。", - "error.cannotparse": "テーマ ファイルの解析中に問題が発生しました: {0}", - "error.cannotload": "テーマ ファイル {0} の読み込み中に問題が発生しました: {1}" + "error.invalidformat.colors": "配色テーマ ファイルの解析中に問題が発生しました: {0}。'colors' プロパティは 'object' 型ではありません。", + "error.invalidformat.tokenColors": "配色テーマ ファイルの解析中に問題が発生しました: {0}。'tokenColors' プロパティは、配色を指定する配列か、TextMate テーマファイルへのパスでなければなりません", + "error.plist.invalidformat": "tmTheme ファイルの解析中に問題が発生しました: {0}。'settings' は配列ではありません。", + "error.cannotparse": "tmTheme ファイルの解析中に問題が発生しました: {0}", + "error.cannotload": "tmTheme ファイル {0} の読み込み中に問題が発生しました: {1}" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/jpn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index cd176bc589646..fa7c08b281e37 100644 --- a/i18n/jpn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/jpn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -23,8 +23,9 @@ "error.cannotparseicontheme": "Problems parsing file icons file: {0}", "colorTheme": "Specifies the color theme used in the workbench.", "colorThemeError": "Theme is unknown or not installed.", - "iconTheme": "Specifies the icon theme used in the workbench.", "noIconThemeDesc": "No file icons", "iconThemeError": "File icon theme is unknown or not installed.", - "workbenchColors": "現在選択されている色のテーマから一部の色が上書きされます。次のリリースで色の名前が変更されるため、この設定は試験的なものです。" + "workbenchColors": "現在選択している配色テーマで配色を上書きします。", + "workbenchColors.deprecated": "この設定はもう試験的なものではなく、名前が 'workbench.colorCustomizations' に変更されています", + "workbenchColors.deprecatedDescription": "代わりに 'workbench.colorCustomizations' を使用してください" } \ No newline at end of file diff --git a/i18n/kor/extensions/configuration-editing/out/extension.i18n.json b/i18n/kor/extensions/configuration-editing/out/extension.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/extensions/configuration-editing/out/extension.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json b/i18n/kor/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json index 016bce0c96635..7553c53d84e36 100644 --- a/i18n/kor/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json +++ b/i18n/kor/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json @@ -7,7 +7,6 @@ "activeEditorShort": "예: myFile.txt", "activeEditorMedium": "예: myFolder/myFile.txt", "activeEditorLong": "예: /Users/Development/myProject/myFolder/myFile.txt", - "rootName": "예: myProject", "rootPath": "예: /Users/Development/myProject", "appName": "예: VS Code", "dirty": "활성 편집기가 더티인 경우 더티 표시기", diff --git a/i18n/kor/extensions/extension-editing/out/extensionLinter.i18n.json b/i18n/kor/extensions/extension-editing/out/extensionLinter.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/extensions/extension-editing/out/extensionLinter.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/extensions/git/out/commands.i18n.json b/i18n/kor/extensions/git/out/commands.i18n.json index 4a4101b4207de..b60ceccaa806e 100644 --- a/i18n/kor/extensions/git/out/commands.i18n.json +++ b/i18n/kor/extensions/git/out/commands.i18n.json @@ -16,11 +16,19 @@ "confirm discard": "{0}의 변경 내용을 취소하시겠습니까?", "confirm discard multiple": "{0}개 파일의 변경 내용을 취소하시겠습니까?", "discard": "변경 내용 취소", + "confirm discard all": "모든 변경 내용을 취소하시겠습니까? 이 작업은 되돌릴 수 없습니다.", + "discardAll": "모든 변경 내용 취소", + "no staged changes": "저장할 단계적 변경 사항이 없습니다.\n\n모든 변경 사항을 자동으로 스테이징하고 직접 저장하시겠습니까?", + "yes": "예", + "always": "항상", "no changes": "커밋할 변경 내용이 없습니다.", "commit message": "커밋 메시지", "provide commit message": "커밋 메시지를 제공하세요.", "branch name": "분기 이름", "provide branch name": "분기 이름을 입력하세요.", + "select branch to delete": "삭제할 분기 선택", + "confirm force delete branch": "'{0}' 분기가 완벽히 병합되지 않았습니다. 그래도 삭제할까요?", + "delete branch": "분기 삭제", "no remotes to pull": "리포지토리에 풀하도록 구성된 원격 항목이 없습니다.", "no remotes to push": "리포지토리에 푸시하도록 구성된 원격이 없습니다.", "nobranch": "원격에 푸시할 분기를 체크 아웃하세요.", @@ -31,6 +39,7 @@ "no remotes to publish": "리포지토리에 게시하도록 구성된 원격이 없습니다.", "disabled": "Git은 이 작업 영역에서 사용하지 않도록 설정되어 있거나 지원되지 않습니다.", "clean repo": "체크 아웃하기 전에 리포지토리 작업 트리를 정리하세요.", + "cant push": "참조를 원격에 푸시할 수 없습니다. 먼저 '풀'을 실행하여 변경 내용을 통합하세요.", "git error details": "Git: {0}", "git error": "Git 오류", "open git log": "Git 로그 열기" diff --git a/i18n/kor/extensions/git/out/model.i18n.json b/i18n/kor/extensions/git/out/model.i18n.json index e46bcb77cc136..79de8a8d0b39d 100644 --- a/i18n/kor/extensions/git/out/model.i18n.json +++ b/i18n/kor/extensions/git/out/model.i18n.json @@ -8,5 +8,7 @@ "merge changes": "변경 내용 병합", "staged changes": "스테이징된 변경 내용", "changes": "변경 내용", - "ok": "확인" + "ok": "확인", + "neveragain": "다시 표시 안 함", + "huge": "'{0}'의 Git 리포지토리에 활성 변경 내용이 너무 많습니다. Git 기능의 하위 집합만 사용할 수 있도록 설정됩니다." } \ No newline at end of file diff --git a/i18n/kor/extensions/git/out/scmProvider.i18n.json b/i18n/kor/extensions/git/out/scmProvider.i18n.json index 7fded37328a95..69250749f7723 100644 --- a/i18n/kor/extensions/git/out/scmProvider.i18n.json +++ b/i18n/kor/extensions/git/out/scmProvider.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "commit": "Commit" + "commit": "커밋" } \ No newline at end of file diff --git a/i18n/kor/extensions/git/package.i18n.json b/i18n/kor/extensions/git/package.i18n.json index e2892cf9cb9be..b21d655387c61 100644 --- a/i18n/kor/extensions/git/package.i18n.json +++ b/i18n/kor/extensions/git/package.i18n.json @@ -26,12 +26,13 @@ "command.undoCommit": "마지막 커밋 실행 취소", "command.checkout": "다음으로 체크 아웃...", "command.branch": "분기 만들기...", + "command.deleteBranch": "분기 삭제...", "command.pull": "풀", "command.pullRebase": "풀(다시 지정)", "command.push": "푸시", "command.pushTo": "다음으로 푸시...", "command.sync": "동기화", - "command.publish": "게시", + "command.publish": "분기 게시", "command.showOutput": "Git 출력 표시", "config.enabled": "Git 사용 여부", "config.path": "Git 실행 파일의 경로", @@ -39,6 +40,9 @@ "config.autofetch": "자동 가져오기 사용 여부", "config.enableLongCommitWarning": "긴 커밋 메시지에 대해 경고할지 여부입니다.", "config.confirmSync": "Git 리포지토리를 동기화하기 전에 확인합니다.", - "config.countBadge": "Git 배지 카운터를 제어합니다.", - "config.checkoutType": "나열되는 분기 유형을 제어합니다." + "config.countBadge": "Git 배지 카운터를 제어합니다. `all`이면 변경 내용을 모두 계산하고, `tracked`이면 추적된 변경 내용만 계산하고, `off`이면 해제합니다.", + "config.checkoutType": "`다음으로 체크 아웃...`을 실행할 때 나열되는 분기 유형을 제어합니다. `all`이면 모든 참조를 표시하고, `local`이면 로컬 분기만 표시하고, `tags`이면 태그만 표시하고, `remote`이면 원격 분기만 표시합니다.", + "config.ignoreLegacyWarning": "레거시 Git 경고를 무시합니다.", + "config.ignoreLimitWarning": "리포지토리에 변경 내용이 너무 많으면 경고를 무시합니다.", + "config.defaultCloneDirectory": "git 리포지토리를 복제할 기본 위치" } \ No newline at end of file diff --git a/i18n/kor/extensions/grunt/out/main.i18n.json b/i18n/kor/extensions/grunt/out/main.i18n.json index 8b6ad71cd4e6d..8456653bb0cb2 100644 --- a/i18n/kor/extensions/grunt/out/main.i18n.json +++ b/i18n/kor/extensions/grunt/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Grunt 자동 검색에 실패하고 [0} 오류가 발생했습니다." +} \ No newline at end of file diff --git a/i18n/kor/extensions/grunt/package.i18n.json b/i18n/kor/extensions/grunt/package.i18n.json index 8b6ad71cd4e6d..927b720ee74cb 100644 --- a/i18n/kor/extensions/grunt/package.i18n.json +++ b/i18n/kor/extensions/grunt/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.grunt.autoDetect": "Grunt 작업의 자동 검색을 사용할지 여부를 제어합니다. 기본값은 [켜기]입니다." +} \ No newline at end of file diff --git a/i18n/kor/extensions/gulp/out/main.i18n.json b/i18n/kor/extensions/gulp/out/main.i18n.json index 8b6ad71cd4e6d..e88e41a1fa9d1 100644 --- a/i18n/kor/extensions/gulp/out/main.i18n.json +++ b/i18n/kor/extensions/gulp/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Gulp 자동 검색에 실패하고 {0} 오류가 발생했습니다." +} \ No newline at end of file diff --git a/i18n/kor/extensions/gulp/package.i18n.json b/i18n/kor/extensions/gulp/package.i18n.json index 8b6ad71cd4e6d..9dc5dc5daa605 100644 --- a/i18n/kor/extensions/gulp/package.i18n.json +++ b/i18n/kor/extensions/gulp/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.gulp.autoDetect": "Gulp 작업의 자동 검색을 사용할지 여부를 제어합니다. 기본값은 [켜기]입니다." +} \ No newline at end of file diff --git a/i18n/kor/extensions/jake/out/main.i18n.json b/i18n/kor/extensions/jake/out/main.i18n.json new file mode 100644 index 0000000000000..2e5af401ba1cb --- /dev/null +++ b/i18n/kor/extensions/jake/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "Jake 자동 검색 실패 오류: {0}" +} \ No newline at end of file diff --git a/i18n/kor/extensions/jake/package.i18n.json b/i18n/kor/extensions/jake/package.i18n.json new file mode 100644 index 0000000000000..8a1b290c1d45b --- /dev/null +++ b/i18n/kor/extensions/jake/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.jake.autoDetect": "Jake 작업에 대한 자동 검색 사용 여부를 설정합니다. 기본값은 [켜기]입니다." +} \ No newline at end of file diff --git a/i18n/kor/extensions/markdown/out/extension.i18n.json b/i18n/kor/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..f38833da5da5d --- /dev/null +++ b/i18n/kor/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "onPreviewStyleLoadError": "'markdown.styles': {0}을 불러올 수 없음" +} \ No newline at end of file diff --git a/i18n/kor/extensions/markdown/package.i18n.json b/i18n/kor/extensions/markdown/package.i18n.json index 40cb44f8c60cc..60b7a9a3727f5 100644 --- a/i18n/kor/extensions/markdown/package.i18n.json +++ b/i18n/kor/extensions/markdown/package.i18n.json @@ -16,5 +16,7 @@ "markdown.previewSide.title": "측면에서 미리 보기 열기", "markdown.showSource.title": "소스 표시", "markdown.styles.dec": "markdown 미리 보기에서 사용할 CSS 스타일시트의 URL 또는 로컬 경로 목록입니다. 상대 경로는 탐색기에서 열린 폴더를 기준으로 해석됩니다. 열린 폴더가 없으면 markdown 파일의 위치를 기준으로 해석됩니다. 모든 '\\'는 '\\\\'로 써야 합니다.", - "markdown.showPreviewSecuritySelector.title": "Markdown 미리 보기 보안 설정 변경" + "markdown.showPreviewSecuritySelector.title": "Markdown 미리 보기 보안 설정 변경", + "markdown.preview.enableExperimentalExtensionApi.desc": "[실험적] Markdown 미리 보기를 확장하는 확장을 허용합니다.", + "markdown.trace.desc": "Markdown 확장에 대해 디버그 로깅을 사용하도록 설정합니다." } \ No newline at end of file diff --git a/i18n/kor/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/kor/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..8b5b2b04aab77 --- /dev/null +++ b/i18n/kor/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "acceptCurrentChange": "현재 변경 사항 수락", + "acceptIncomingChange": "수신 변경 사항 수락", + "acceptBothChanges": "두 변경 사항 모두 수락", + "compareChanges": "변경 사항 비교" +} \ No newline at end of file diff --git a/i18n/kor/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/kor/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..ce73e350da6e6 --- /dev/null +++ b/i18n/kor/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "cursorNotInConflict": "편집기 커서가 병합 충돌 내에 없음", + "compareChangesTitle": "{0}: 현재 변경 사항 ⟷ 수신 변경 사항", + "cursorOnSplitterRange": "편집기 커서가 병합 충돌 스플리터 내에 있습니다. \"현재\" 또는 \"수신\" 블록으로 옮기세요.", + "noConflicts": "이 파일에서 발견된 병합 충돌 없음", + "noOtherConflictsInThisFile": "이 파일 내에 다른 병합 충돌 없음" +} \ No newline at end of file diff --git a/i18n/kor/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/kor/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..41b53ce1e6c59 --- /dev/null +++ b/i18n/kor/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "currentChange": "(현재 변경 사항)", + "incomingChange": "(수신 변경 사항)" +} \ No newline at end of file diff --git a/i18n/kor/extensions/merge-conflict/package.i18n.json b/i18n/kor/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..ceb1a3d504d98 --- /dev/null +++ b/i18n/kor/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "command.category": "충돌 병합", + "command.accept.all-incoming": "수신 모두 수락", + "command.accept.all-both": "둘 다 모두 수락", + "command.accept.current": "현재 수락", + "command.accept.incoming": "수신 수락", + "command.accept.selection": "선택 수락", + "command.accept.both": "둘 다 수락", + "command.next": "다음 충돌", + "command.previous": "이전 충돌", + "command.compare": "현재 충돌 비교", + "config.title": "충돌 병합", + "config.codeLensEnabled": "편집기 내에서 충돌 블록 CodeLense 병합 사용/사용 안 함", + "config.decoratorsEnabled": "편집기 내에서 충돌 병합 사용/사용 안 함" +} \ No newline at end of file diff --git a/i18n/kor/extensions/npm/package.i18n.json b/i18n/kor/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..bae4e5954d08b --- /dev/null +++ b/i18n/kor/extensions/npm/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.npm.autoDetect": "npm 스크립트에 대한 자동 검색 여부를 설정합니다. 기본값은 [켜기]입니다." +} \ No newline at end of file diff --git a/i18n/kor/extensions/php/package.i18n.json b/i18n/kor/extensions/php/package.i18n.json index 43315a6c2a96c..6bf56e30128c4 100644 --- a/i18n/kor/extensions/php/package.i18n.json +++ b/i18n/kor/extensions/php/package.i18n.json @@ -9,5 +9,6 @@ "configuration.validate.executablePath": "PHP 실행 파일을 가리킵니다.", "configuration.validate.run": "저장 시 또는 입력 시 Linter의 실행 여부입니다.", "configuration.title": "PHP", - "commands.categroy.php": "PHP" + "commands.categroy.php": "PHP", + "command.untrustValidationExecutable": "PHP 유효성 검사 실행 파일을 허용하지 않음(작업\n 영역 설정으로 정의됨)" } \ No newline at end of file diff --git a/i18n/kor/extensions/typescript/out/features/bufferSyncSupport.i18n.json b/i18n/kor/extensions/typescript/out/features/bufferSyncSupport.i18n.json index be16b468c9ab5..099f0f45bd182 100644 --- a/i18n/kor/extensions/typescript/out/features/bufferSyncSupport.i18n.json +++ b/i18n/kor/extensions/typescript/out/features/bufferSyncSupport.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "versionMismatch": "버전이 일치하지 않습니다. 전역 tsc({0})가 VS Code의 언어 서비스({1})와 다릅니다. 일관되지 않은 컴파일 오류가 발생할 수 있습니다.", "moreInformation": "추가 정보", "doNotCheckAgain": "다시 확인 안 함", "close": "닫기", diff --git a/i18n/kor/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/kor/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json new file mode 100644 index 0000000000000..cca18a8243ede --- /dev/null +++ b/i18n/kor/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ts-check": "JavaScript 파일에서 의미 검사를 사용합니다. 파일의 최상단에 있어야 합니다.", + "ts-nocheck": "JavaScript 파일에서 의미 검사를 사용하지 않습니다. 파일의 최상단에 있어야 합니다.", + "ts-ignore": "파일의 다음 행에서 @ts-check 오류를 억제합니다." +} \ No newline at end of file diff --git a/i18n/kor/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/kor/extensions/typescript/out/typescriptServiceClient.i18n.json index eab7821856ad7..50cd48bc2e2fb 100644 --- a/i18n/kor/extensions/typescript/out/typescriptServiceClient.i18n.json +++ b/i18n/kor/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -4,9 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "restartTsServerTitle": "다시 시작", - "later": "나중에", - "channelName": "TypeScript", "noServerFound": "경로 {0}이(가) 올바른 tsserver 설치를 가리키지 않습니다. 포함된 TypeScript 버전을 대신 사용합니다.", "noBundledServerFound": "잘못 동작하는 바이러스 감지 도구와 같은 다른 응용 프로그램에서 VSCode의 tsserver가 삭제되었습니다. VS Code를 다시 설치하세요.", "versionNumber.custom": "사용자 지정", @@ -17,6 +14,8 @@ "learnMore": "자세한 정보", "selectTsVersion": "JavaScript 및 TypeScript 언어 기능에 사용되는 TypeScript 버전 선택", "typescript.openTsServerLog.notSupported": "TS 서버 로깅을 사용하려면 TS 2.2.2 이상이 필요합니다.", + "typescript.openTsServerLog.loggingNotEnabled": "TS 서버 로깅이 꺼져 있습니다. `typescript.tsserver.log`를 설정하고 TS 서버를 다시 시작하여 로깅을 사용하도록 설정하세요.", + "typescript.openTsServerLog.enableAndReloadOption": "로깅 사용 및 TS 서버 다시 시작", "typescript.openTsServerLog.noLogFile": "TS 서버에서 로깅을 시작하지 않았습니다.", "openTsServerLog.openFileFailedFailed": "TS 서버 로그 파일을 열 수 없습니다.", "serverDiedAfterStart": "TypeScript 언어 서비스가 시작된 직후 5번 종료되었습니다. 서비스가 다시 시작되지 않습니다.", diff --git a/i18n/kor/extensions/typescript/out/utils/logger.i18n.json b/i18n/kor/extensions/typescript/out/utils/logger.i18n.json new file mode 100644 index 0000000000000..bc738f43d0c37 --- /dev/null +++ b/i18n/kor/extensions/typescript/out/utils/logger.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "channelName": "TypeScript" +} \ No newline at end of file diff --git a/i18n/kor/extensions/typescript/out/utils/projectStatus.i18n.json b/i18n/kor/extensions/typescript/out/utils/projectStatus.i18n.json index 8702bb693609a..bd9076903888b 100644 --- a/i18n/kor/extensions/typescript/out/utils/projectStatus.i18n.json +++ b/i18n/kor/extensions/typescript/out/utils/projectStatus.i18n.json @@ -6,7 +6,6 @@ { "hintExclude": "프로젝트 전체에서 JavaScript/TypeScript 언어 기능을 사용하도록 설정하려면 {0}과(와) 같이 파일이 많은 폴더를 제외하세요.", "hintExclude.generic": "프로젝트 전체에서 JavaScript/TypeScript 언어 기능을 사용하도록 설정하려면 사용하지 않는 소스 파일이 포함된 큰 폴더를 제외하세요.", - "open": "제외 구성", "large.label": "제외 구성", "hintExclude.tooltip": "프로젝트 전체에서 JavaScript/TypeScript 언어 기능을 사용하도록 설정하려면 사용하지 않는 소스 파일이 포함된 큰 폴더를 제외하세요." } \ No newline at end of file diff --git a/i18n/kor/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/kor/extensions/typescript/out/utils/typingsStatus.i18n.json index bba27308a2312..e070552b4200c 100644 --- a/i18n/kor/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/kor/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "installingPackages": "TypeScript IntelliSense를 향상하기 위해 데이터를 페치하는 중", + "typesInstallerInitializationFailed.title": "JavaScript 언어 기능에 대한 입력 파일을 설치할 수 없습니다. NPM이 설치되어 있는지 확인하거나 사용자 설정에서 'typescript.npm'을 구성하세요.", "typesInstallerInitializationFailed.moreInformation": "추가 정보", "typesInstallerInitializationFailed.doNotCheckAgain": "다시 확인 안 함", "typesInstallerInitializationFailed.close": "닫기" diff --git a/i18n/kor/extensions/typescript/package.i18n.json b/i18n/kor/extensions/typescript/package.i18n.json index e2add9ff83c0a..f2cc400f199c7 100644 --- a/i18n/kor/extensions/typescript/package.i18n.json +++ b/i18n/kor/extensions/typescript/package.i18n.json @@ -11,7 +11,8 @@ "typescript.tsdk.desc": "사용할 tsserver 및 lib*.d.ts 파일이 들어 있는 폴더 경로를 지정합니다.", "typescript.disableAutomaticTypeAcquisition": "자동 형식 인식을 사용하지 않습니다. TypeScript >= 2.0.6이 필요하며 변경 후 다시 시작해야 합니다.", "typescript.check.tscVersion": "전역 설치 TypeScript 컴파일러(예: tsc)가 사용된 TypeScript 언어 서비스와 다른지 확인하세요.", - "typescript.tsserver.experimentalAutoBuild": "실험적 자동 빌드를 사용하도록 설정합니다. 1.9 dev 또는 2.x tsserver 버전이 필요하며 변경 후에는 VS Code를 다시 시작해야 합니다.", + "typescript.tsserver.log": "파일에 대해 TS 서버 로깅을 사용하도록 설정합니다. 이 로그는 TS 서버 문제를 진단하는 데 사용될 수 있습니다. 로그에는 파일 경로, 소스 코드 및 프로젝트에서 잠재적으로 중요한 기타 정보가 포함될 수 있습니다.", + "typescript.tsserver.trace": "TS 서버로 전송한 메시지 추적을 사용하도록 설정합니다. 이\n 추적은 TS 서버 문제를 진단하는 데 사용될 수 있습니다. 추적에는 파일 경로, 소스 코드 및 프로젝트에서 잠재적으로 중요한\n 기타 정보가 포함될 수 있습니다.", "typescript.validate.enable": "TypeScript 유효성 검사를 사용하거나 사용하지 않습니다.", "typescript.format.enable": "기본 TypeScript 포맷터를 사용하거나 사용하지 않습니다.", "javascript.format.enable": "기본 JavaScript 포맷터를 사용하거나 사용하지 않습니다.", @@ -23,6 +24,7 @@ "format.insertSpaceBeforeFunctionParenthesis": "함수 인수 괄호 앞에 오는 공백 처리를 정의합니다. TypeScript 2.1.5 이상이 필요합니다.", "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": "비어 있지 않은 여는 괄호 뒤와 닫는 괄호 앞에 오는 공백 처리를 정의합니다.", "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": "비어 있지 않은 여는 대괄호 뒤와 닫는 대괄호 앞에 오는 공백 처리를 정의합니다.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": "비어 있지 않은 여는 중괄호 뒤와 닫는 중괄호 앞의 공백 처리를 정의합니다. TypeScript >= 2.3.0이 필요합니다.", "format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": "템플릿 문자열의 여는 중괄호 뒤와 닫는 중괄호 앞의 공백 처리를 정의합니다. TypeScript >= 2.0.6이 필요합니다.", "format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": "JSX 식의 여는 중괄호 뒤와 닫는 중괄호 앞의 공백 처리를 정의합니다. TypeScript >= 2.0.6이 필요합니다.", "format.placeOpenBraceOnNewLineForFunctions": "함수의 새 줄에 여는 중괄호를 넣을지 정의합니다.", @@ -30,8 +32,16 @@ "javascript.validate.enable": "JavaScript 유효성 검사를 사용하거나 사용하지 않습니다.", "typescript.goToProjectConfig.title": "프로젝트 구성으로 이동", "javascript.goToProjectConfig.title": "프로젝트 구성으로 이동", - "typescript.referencesCodeLens.enabled": "참조 CodeLens 사용하거나 사용하지 않도록 설정합니다. TypeScript >= 2.0.6이 필요합니다.", + "javascript.referencesCodeLens.enabled": "JavaScript 파일에서 CodeLense 참조를 사용/사용 안 함으로 설정합니다.", + "typescript.referencesCodeLens.enabled": "TypeScript 파일에서 참조 CodeLense를 사용/사용 안 함으로 설정합니다. TypeScript >= 2.0.6이 필요합니다.", "typescript.implementationsCodeLens.enabled": "구현 CodeLens를 사용하거나 사용하지 않도록 설정합니다. TypeScript >= 2.2.0이 필요합니다.", - "typescript.openTsServerLog.title": "TS 서버 로그 파일 열기", - "typescript.selectTypeScriptVersion.title": "TypeScript 버전 선택" + "typescript.openTsServerLog.title": "TS 서버 로그 열기", + "typescript.restartTsServer": "TS 서버 다시 시작", + "typescript.selectTypeScriptVersion.title": "TypeScript 버전 선택", + "jsDocCompletion.enabled": "자동 JSDoc 주석 사용/사용 안 함", + "javascript.implicitProjectConfig.checkJs": "JavaScript 파일의 의미 체계 검사를 사용/사용하지 않습니다. 기존 jsconfig.json 또는 tsconfig.json 파일은 이 설정을 재정의합니다. TypeScript >=2.3.1이 필요합니다. ", + "typescript.npm": "자동 입력 인식에 사용된 NPM 실행 파일 경로를 지정합니다. TypeScript >= 2.3.4가 필요합니다.", + "typescript.check.npmIsInstalled": "자동 입력 인식에 대해 NPM이 설치되어 있는지 확인합니다.", + "javascript.nameSuggestions": "JavaScript 제안 목록의 파일에서 고유한 이름 포함을 사용/사용 안 함으로 설정합니다.", + "typescript.tsc.autoDetect": "tsc 작업의 자동 검색을 켜거나 끕니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/kor/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index def2cd28d67c8..6d1aafbc27134 100644 --- a/i18n/kor/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/kor/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,8 +6,7 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "이미지가 너무 커서 편집기에 표시할 수 없습니다. ", - "resourceOpenExternalButton": "이미지 열기", - "resourceOpenExternalText": " 외부 프로그램을 사용할까요?", + "resourceOpenExternalButton": " 외부 프로그램으로 이미지를 열까요?", "nativeBinaryError": "파일이 이진이거나 매우 크거나 지원되지 않는 텍스트 인코딩을 사용하기 때문에 편집기에서 표시되지 않습니다.", "sizeB": "{0}B", "sizeKB": "{0}KB", diff --git a/i18n/kor/src/vs/base/common/errorMessage.i18n.json b/i18n/kor/src/vs/base/common/errorMessage.i18n.json index a1079b639599e..f7f99e392a0a5 100644 --- a/i18n/kor/src/vs/base/common/errorMessage.i18n.json +++ b/i18n/kor/src/vs/base/common/errorMessage.i18n.json @@ -13,6 +13,5 @@ "error.connection.unknown": "알 수 없는 연결 오류가 발생했습니다. 인터넷에 연결되지 않았거나 연결된 서버가 오프라인 상태입니다.", "stackTrace.format": "{0}: {1}", "error.defaultMessage": "알 수 없는 오류가 발생했습니다. 자세한 내용은 로그를 참조하세요.", - "nodeExceptionMessage": "시스템 오류가 발생했습니다({0}).", "error.moreErrors": "{0}(총 {1}개의 오류)" } \ No newline at end of file diff --git a/i18n/kor/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/kor/src/vs/base/common/jsonErrorMessages.i18n.json new file mode 100644 index 0000000000000..ac05a5533ca43 --- /dev/null +++ b/i18n/kor/src/vs/base/common/jsonErrorMessages.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error.invalidSymbol": "잘못된 기호", + "error.invalidNumberFormat": "잘못된 숫자 형식", + "error.propertyNameExpected": "속성 이름 필요", + "error.valueExpected": "값 필요", + "error.colonExpected": "콜론이 필요합니다.", + "error.commaExpected": "쉼표가 필요합니다.", + "error.closeBraceExpected": "닫는 괄호 필요", + "error.closeBracketExpected": "닫는 대괄호 필요", + "error.endOfFileExpected": "파일 끝 필요" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/base/common/keybindingLabels.i18n.json b/i18n/kor/src/vs/base/common/keybindingLabels.i18n.json new file mode 100644 index 0000000000000..0ba381649ae78 --- /dev/null +++ b/i18n/kor/src/vs/base/common/keybindingLabels.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ctrlKey": "Ctrl", + "shiftKey": "", + "altKey": "Alt", + "windowsKey": "Windows", + "ctrlKey.long": "컨트롤", + "shiftKey.long": "", + "altKey.long": "Alt", + "cmdKey.long": "명령", + "windowsKey.long": "Windows" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/code/electron-main/menus.i18n.json b/i18n/kor/src/vs/code/electron-main/menus.i18n.json index 5b7747bc602ac..a626f11e382c7 100644 --- a/i18n/kor/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/kor/src/vs/code/electron-main/menus.i18n.json @@ -6,12 +6,15 @@ { "mFile": "파일(&&F)", "mEdit": "편집(&&E)", + "mSelection": "선택 영역(&S)", "mView": "보기(&&V)", + "mGoto": "이동(&G)", "mDebug": "디버그(&&D)", "mWindow": "창", "mHelp": "도움말(&&H)", "miNewWindow": "새 창(&&W)", "mAbout": "{0} 정보", + "mServices": "서비스", "mHide": "{0} 숨기기", "mHideOthers": "기타 숨기기", "mShowAll": "모두 표시", @@ -29,6 +32,8 @@ "miCloseWindow": "창 닫기(&&E)", "miCloseFolder": "폴더 닫기(&&F)", "miCloseEditor": "편집기 닫기(&&C)", + "miExit": "끝내기(&X)", + "miOpenSettings": "설정(&S)", "miOpenKeymap": "바로 가기 키(&&K)", "miOpenKeymapExtensions": "키맵 확장(&&K)", "miOpenSnippets": "사용자 코드 조각(&&S)", @@ -39,6 +44,7 @@ "miClearRecentOpen": "&&Clear Recent Files", "miUndo": "실행 취소(&&U)", "miRedo": "다시 실행(&&R)", + "miCut": "자르기(&T)", "miCopy": "복사(&&C)", "miPaste": "붙여넣기(&&P)", "miFind": "찾기(&&F)", @@ -64,7 +70,7 @@ "miSmartSelectShrink": "선택 영역 축소(&&S)", "miViewExplorer": "탐색기(&&E)", "miViewSearch": "검색(&&S)", - "miViewGit": "Git(&&G)", + "miViewSCM": "SCM(&&C)", "miViewDebug": "디버그(&&D)", "miViewExtensions": "확장(&&X)", "miToggleOutput": "출력(&&O)", @@ -109,6 +115,8 @@ "miGotoSymbolInFile": "파일의 기호로 이동(&&S)...", "miGotoSymbolInWorkspace": "작업 영역의 기호로 이동(&&W)...", "miGotoDefinition": "정의로 이동(&&D)", + "miGotoTypeDefinition": "형식 정의로 이동( &&T)", + "miGotoImplementation": "구현으로 이동( &&I)", "miGotoLine": "줄 이동(&&L)...", "miStartDebugging": "디버깅 시작(&&S)", "miStartWithoutDebugging": "디버깅하지 않고 시작(&&W)", @@ -125,16 +133,17 @@ "miColumnBreakpoint": "열 중단점(&&O)", "miFunctionBreakpoint": "함수 중단점(&&F)...", "miNewBreakpoint": "새 중단점(&&N)", + "miEnableAllBreakpoints": "모든 중단점 설정", "miDisableAllBreakpoints": "모든 중단점 사용 안 함(&&L)", "miRemoveAllBreakpoints": "모든 중단점 제거(&&A)", "miInstallAdditionalDebuggers": "추가 디버거 설치(&&I)...", "mMinimize": "최소화", - "mClose": "닫기", "mBringToFront": "모두 맨 앞으로 가져오기", "miToggleDevTools": "개발자 도구 설정/해제(&&T)", "miAccessibilityOptions": "접근성 옵션(&&O)", "miReportIssues": "문제 보고(&&I)", "miWelcome": "시작(&&W)", + "miInteractivePlayground": "대화형 실습(&&I)", "miDocumentation": "설명서(&&D)", "miReleaseNotes": "릴리스 정보(&&R)", "miKeyboardShortcuts": "바로 가기 키 참조(&&K)", @@ -144,7 +153,7 @@ "miLicense": "라이선스 보기(&&L)", "miPrivacyStatement": "개인정보처리방침(&&P)", "miAbout": "정보(&&A)", - "miRestartToUpdate": "업데이트하기 위해 다시 시작...", + "accessibilityOptionsWindowTitle": "접근성 옵션", "miCheckingForUpdates": "업데이트를 확인하는 중...", "miDownloadUpdate": "사용 가능한 업데이트 다운로드", "miDownloadingUpdate": "업데이트를 다운로드하는 중...", diff --git a/i18n/kor/src/vs/code/electron-main/windows.i18n.json b/i18n/kor/src/vs/code/electron-main/windows.i18n.json index 0756d51cd469d..827fd75a50f23 100644 --- a/i18n/kor/src/vs/code/electron-main/windows.i18n.json +++ b/i18n/kor/src/vs/code/electron-main/windows.i18n.json @@ -7,7 +7,6 @@ "ok": "확인", "pathNotExistTitle": "경로가 없습니다.", "pathNotExistDetail": "'{0}' 경로가 디스크에 더 이상 없는 것 같습니다.", - "accessibilityOptionsWindowTitle": "접근성 옵션", "reopen": "다시 열기", "wait": "계속 대기", "close": "닫기", @@ -15,8 +14,6 @@ "appStalledDetail": "창을 다시 열거나, 닫거나, 계속 기다릴 수 있습니다.", "appCrashed": "창이 충돌했습니다.", "appCrashedDetail": "불편을 드려서 죄송합니다. 창을 다시 열면 중단된 위치에서 계속할 수 있습니다.", - "newWindow": "새 창", - "newWindowDesc": "새 창을 엽니다.", - "recentFolders": "최근 폴더", - "folderDesc": "{0} {1}" + "openFile": "파일 열기", + "openFolder": "폴더 열기" } \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/browser/widget/diffEditorWidget.i18n.json b/i18n/kor/src/vs/editor/browser/widget/diffEditorWidget.i18n.json index 8b6ad71cd4e6d..84cb0a07a9707 100644 --- a/i18n/kor/src/vs/editor/browser/widget/diffEditorWidget.i18n.json +++ b/i18n/kor/src/vs/editor/browser/widget/diffEditorWidget.i18n.json @@ -3,4 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "diffEditorInserted": "삽입된 텍스트의 배경색입니다.", + "diffEditorRemoved": "제거된 텍스트의 배경색입니다.", + "diffEditorInsertedOutline": "삽입된 텍스트의 윤곽선 색입니다.", + "diffEditorRemovedOutline": "제거된 텍스트의 윤곽선 색입니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/browser/widget/diffReview.i18n.json b/i18n/kor/src/vs/editor/browser/widget/diffReview.i18n.json new file mode 100644 index 0000000000000..9befc5560b17d --- /dev/null +++ b/i18n/kor/src/vs/editor/browser/widget/diffReview.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "닫기" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/kor/src/vs/editor/common/config/commonEditorConfig.i18n.json index 185383233538c..3baffd1c3a9bf 100644 --- a/i18n/kor/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/kor/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -9,6 +9,7 @@ "fontWeight": "글꼴 두께를 제어합니다.", "fontSize": "글꼴 크기(픽셀)를 제어합니다.", "lineHeight": "줄 높이를 제어합니다. fontSize의 lineHeight를 계산하려면 0을 사용합니다.", + "letterSpacing": "글자 간격을 픽셀 단위로 조정합니다.", "lineNumbers": "줄 번호의 표시 여부를 제어합니다. 가능한 값은 'on', 'off', 'relative'입니다. 'relative'는 현재 커서 위치에서 줄 수를 표시합니다.", "rulers": "세로 눈금자를 표시할 열", "wordSeparators": "단어 관련 탐색 또는 작업을 수행할 때 단어 구분 기호로 사용되는 문자입니다.", @@ -22,6 +23,8 @@ "minimap.enabled": "미니맵 표시 여부를 제어합니다.", "minimap.renderCharacters": "줄의 실제 문자(색 블록 아님) 렌더링", "minimap.maxColumn": "최대 특정 수의 열을 렌더링하도록 미니맵의 너비를 제한합니다.", + "find.seedSearchStringFromSelection": "편집기 선택에서 Find Widget의 검색 문자열을 시딩할지 설정합니다.", + "find.autoFindInSelection": "편집기에서 여러 글자 또는 행을 선택했을 때 Find in Selection 플래그를 켤지 설정합니다.", "wordWrap.off": "줄이 바뀌지 않습니다.", "wordWrap.on": "뷰포트 너비에서 줄이 바뀝니다.", "wordWrap.wordWrapColumn": "`editor.wordWrapColumn`에서 줄이 바뀝니다.", @@ -30,12 +33,14 @@ "wordWrapColumn": "`editor.wordWrap`이 'wordWrapColumn' 또는 'bounded'인 경우 편집기의 열 줄 바꿈을 제어합니다.", "wrappingIndent": "줄 바꿈 행의 들여쓰기를 제어합니다. 'none', 'same' 또는 'indent' 중 하나일 수 있습니다.", "mouseWheelScrollSensitivity": "마우스 휠 스크롤 이벤트의 `deltaX` 및 `deltaY`에서 사용할 승수", + "multiCursorModifier.ctrlCmd": "Windows와 Linux의 'Control'을 OSX의 'Command'로 매핑합니다.", + "multiCursorModifier.alt": "Windows와 Linux의 'Alt'를 OSX의 'Option'으로 매핑합니다.", + "multiCursorModifier": "마우스로 여러 커서를 추가할 때 사용할 수정자입니다. `ctrlCmd`는 Windows와 Linux에서 `Control`로 매핑되고 OSX에서 `Command`로 매핑됩니다. Go To Definition 및 Open Link 마우스 제스처가 멀티커서 수정자와 충돌하지 않도록 조정됩니다.", "quickSuggestions.strings": "문자열 내에서 빠른 제안을 사용합니다.", "quickSuggestions.comments": "주석 내에서 빠른 제안을 사용합니다.", "quickSuggestions.other": "문자열 및 주석 외부에서 빠른 제안을 사용합니다.", "quickSuggestions": "입력하는 동안 제안을 자동으로 표시할지 여부를 제어합니다.", "quickSuggestionsDelay": "빠른 제안을 표시할 지연 시간(ms)을 제어합니다.", - "parameterHints": "매개 변수 힌트를 사용하도록 설정합니다.", "autoClosingBrackets": "괄호를 연 다음에 편집기에서 괄호를 자동으로 닫을지 여부를 제어합니다.", "formatOnType": "입력 후 편집기에서 자동으로 줄의 서식을 지정할지 여부를 제어합니다.", "formatOnPaste": "붙여넣은 콘텐츠의 서식을 편집기에서 자동으로 지정할지 여부를 제어합니다. 포맷터는 반드시 사용할 수 있어야 하며 문서에서 범위의 서식을 지정할 수 있어야 합니다.", @@ -62,12 +67,17 @@ "renderLineHighlight": "편집기가 현재 줄 강조 표시를 렌더링하는 방식을 제어합니다. 가능한 값은 'none', 'gutter', 'line' 및 'all'입니다.", "codeLens": "편집기에서 코드 필터를 표시하는지 여부를 제어합니다.", "folding": "편집기에서 코드 접기를 사용할지 여부를 제어합니다.", + "showFoldingControls": "거터의 폴드 컨트롤을 자동으로 숨길지 결정합니다.", "matchBrackets": "대괄호 중 하나를 선택할 때 일치하는 대괄호를 강조 표시합니다.", "glyphMargin": "편집기에서 세로 문자 모양 여백을 렌더링할지 여부를 제어합니다. 문자 모양 여백은 주로 디버깅에 사용됩니다.", "useTabStops": "탭 정지 뒤에 공백 삽입 및 삭제", "trimAutoWhitespace": "끝에 자동 삽입된 공백 제거", "stablePeek": "해당 콘텐츠를 두 번 클릭하거나 키를 누르더라도 Peek 편집기를 열린 상태로 유지합니다.", "dragAndDrop": "편집기에서 끌어서 놓기로 선택 영역을 이동할 수 있는지 여부를 제어합니다.", + "accessibilitySupport.auto": "편집기가 스크린 리더가 연결되면 플랫폼 API를 사용하여 감지합니다.", + "accessibilitySupport.on": "편집기가 스크린 리더 사용을 위해 영구적으로 최적화됩니다.", + "accessibilitySupport.off": "편집기가 스크린 리더 사용을 위해 최적화되지 않습니다.", + "accessibilitySupport": "편집기를 스크린 리더를 위해 최적화된 모드로 실행할지 결정합니다.", "sideBySide": "diff 편집기에서 diff를 나란히 표시할지 인라인으로 표시할지 여부를 제어합니다.", "ignoreTrimWhitespace": "diff 편집기에서 선행 공백 또는 후행 공백 변경을 diffs로 표시할지 여부를 제어합니다.", "renderIndicators": "diff 편집기에서 추가/제거된 변경 내용에 대해 +/- 표시기를 표시하는지 여부를 제어합니다.", diff --git a/i18n/kor/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/kor/src/vs/editor/common/config/editorOptions.i18n.json new file mode 100644 index 0000000000000..f2303e9e3676c --- /dev/null +++ b/i18n/kor/src/vs/editor/common/config/editorOptions.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "accessibilityOffAriaLabel": "지금은 편집기를 사용할 수 없습니다. Alt+F1을 눌러 옵션을 보세요.", + "editorViewAccessibleLabel": "편집기 콘텐츠" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/common/services/bulkEdit.i18n.json b/i18n/kor/src/vs/editor/common/services/bulkEdit.i18n.json index 2d03877793edc..e75053c8837c9 100644 --- a/i18n/kor/src/vs/editor/common/services/bulkEdit.i18n.json +++ b/i18n/kor/src/vs/editor/common/services/bulkEdit.i18n.json @@ -4,5 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "conflict": "이러한 파일이 동시에 변경되었습니다. {0}" + "conflict": "이러한 파일이 동시에 변경되었습니다. {0}", + "summary.0": "편집하지 않음", + "summary.nm": "{1}개 파일에서 {0}개 텍스트 편집을 수행함", + "summary.n0": "1개 파일에서 {0}개 텍스트 편집을 수행함" } \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/kor/src/vs/editor/common/view/editorColorRegistry.i18n.json index e45a777ecdb40..dcef1416eba3b 100644 --- a/i18n/kor/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/kor/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -10,5 +10,15 @@ "caret": "편집기 커서 색입니다.", "editorWhitespaces": "편집기의 공백 문자 색입니다.", "editorIndentGuides": "편집기 들여쓰기 안내선 색입니다.", - "editorLineNumbers": "편집기 줄 번호 색입니다." + "editorLineNumbers": "편집기 줄 번호 색입니다.", + "editorRuler": "편집기 눈금의 색상입니다.", + "editorCodeLensForeground": "편집기 코드 렌즈의 전경색입니다.", + "editorBracketMatchBackground": "일치하는 브래킷 뒤의 배경색입니다.", + "editorBracketMatchBorder": "일치하는 브래킷 박스의 색상", + "editorOverviewRulerBorder": "개요 눈금 경계의 색상입니다.", + "editorGutter": "편집기 거터의 배경색입니다. 거터에는 글리프 여백과 행 수가 있습니다.", + "errorForeground": "편집기 내 오류 표시선의 전경색입니다.", + "errorBorder": "편집기 내 오류 표시선의 테두리 색입니다.", + "warningForeground": "편집기 내 경고 표시선의 전경색입니다.", + "warningBorder": "편집기 내 경고 표시선의 테두리 색입니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/find/common/findController.i18n.json b/i18n/kor/src/vs/editor/contrib/find/common/findController.i18n.json index e49f22d812302..8c6b4441dfce3 100644 --- a/i18n/kor/src/vs/editor/contrib/find/common/findController.i18n.json +++ b/i18n/kor/src/vs/editor/contrib/find/common/findController.i18n.json @@ -14,6 +14,6 @@ "addSelectionToPreviousFindMatch": "이전 일치 항목 찾기에 선택 항목 추가", "moveSelectionToNextFindMatch": "다음 일치 항목 찾기로 마지막 선택 항목 이동", "moveSelectionToPreviousFindMatch": "마지막 선택 항목을 이전 일치 항목 찾기로 이동", - "selectAllOccurencesOfFindMatch": "일치 항목 찾기의 모든 항목 선택", + "selectAllOccurrencesOfFindMatch": "일치 항목 찾기의 모든 항목 선택", "changeAll.label": "모든 항목 변경" } \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/format/browser/formatActions.i18n.json b/i18n/kor/src/vs/editor/contrib/format/browser/formatActions.i18n.json index d1fd1741e7486..bab39c690ec8d 100644 --- a/i18n/kor/src/vs/editor/contrib/format/browser/formatActions.i18n.json +++ b/i18n/kor/src/vs/editor/contrib/format/browser/formatActions.i18n.json @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "hint11": "Made 1 formatting edit on line {0}", - "hintn1": "Made {0} formatting edits on line {1}", - "hint1n": "Made 1 formatting edit between lines {0} and {1}", - "hintnn": "Made {0} formatting edits between lines {1} and {2}", - "formatDocument.label": "Format Document", - "formatSelection.label": "Format Selection" + "hint11": "줄 {0}에서 1개 서식 편집을 수행했습니다.", + "hintn1": "줄 {1}에서 {0}개 서식 편집을 수행했습니다.", + "hint1n": "줄 {0}과(와) {1} 사이에서 1개 서식 편집을 수행했습니다.", + "hintnn": "줄 {1}과(와) {2} 사이에서 {0}개 서식 편집을 수행했습니다.", + "formatDocument.label": "문서 서식", + "formatSelection.label": "선택 영역 서식" } \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.i18n.json b/i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.i18n.json index 50c99b3be5d5c..6180413fbf30e 100644 --- a/i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.i18n.json +++ b/i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.i18n.json @@ -17,6 +17,7 @@ "actions.peekImplementation.label": "구현 미리 보기", "goToTypeDefinition.noResultWord": "'{0}'에 대한 형식 정의를 찾을 수 없습니다.", "goToTypeDefinition.generic.noResults": "형식 정의를 찾을 수 없습니다.", + "meta.typeDefinitions.title": "– {0} 형식 정의", "actions.goToTypeDefinition.label": "형식 정의로 이동", "actions.peekTypeDefinition.label": "형식 정의 미리 보기", "multipleResults": "{0}개 정의를 표시하려면 클릭하세요." diff --git a/i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..eb7148607bdaa --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "'{0}'에 대한 정의를 찾을 수 없습니다.", + "generic.noResults": "정의를 찾을 수 없음", + "meta.title": "– {0} 정의", + "actions.goToDecl.label": "정의로 이동", + "actions.goToDeclToSide.label": "측면에서 정의 열기", + "actions.previewDecl.label": "정의 피킹(Peeking)", + "goToImplementation.noResultWord": "'{0}'에 대한 구현을 찾을 수 없습니다.", + "goToImplementation.generic.noResults": "구현을 찾을 수 없습니다.", + "meta.implementations.title": " – {0} 개 구현", + "actions.goToImplementation.label": "구현으로 이동", + "actions.peekImplementation.label": "구현 미리 보기", + "goToTypeDefinition.noResultWord": "'{0}'에 대한 형식 정의를 찾을 수 없습니다.", + "goToTypeDefinition.generic.noResults": "형식 정의를 찾을 수 없습니다.", + "meta.typeDefinitions.title": "– {0} 형식 정의", + "actions.goToTypeDefinition.label": "형식 정의로 이동", + "actions.peekTypeDefinition.label": "형식 정의 미리 보기" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..57b4929798ff4 --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "{0}개 정의를 표시하려면 클릭하세요." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/hover/browser/hover.i18n.json b/i18n/kor/src/vs/editor/contrib/hover/browser/hover.i18n.json index f2f8c2fde8204..af972da445ac9 100644 --- a/i18n/kor/src/vs/editor/contrib/hover/browser/hover.i18n.json +++ b/i18n/kor/src/vs/editor/contrib/hover/browser/hover.i18n.json @@ -4,8 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "showHover": "가리키기 표시", - "hoverHighlight": "호버가 표시된 단어 아래를 강조 표시합니다.", - "hoverBackground": "편집기 호버의 배경색.", - "hoverBorder": "편집기 호버의 테두리 색입니다." + "showHover": "가리키기 표시" } \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/links/browser/links.i18n.json b/i18n/kor/src/vs/editor/contrib/links/browser/links.i18n.json index e38e83f3a2f5b..ddf7b26a227e8 100644 --- a/i18n/kor/src/vs/editor/contrib/links/browser/links.i18n.json +++ b/i18n/kor/src/vs/editor/contrib/links/browser/links.i18n.json @@ -6,6 +6,7 @@ { "links.navigate.mac": "Cmd 키를 누르고 클릭하여 링크로 이동", "links.navigate": "Ctrl 키를 누르고 클릭하여 링크로 이동", + "links.navigate.al": "Alt 키를 누르고 클릭하여 링크로 이동", "invalid.url": "죄송합니다. 이 링크는 형식이 올바르지 않으므로 열지 못했습니다. {0}", "missing.url": "죄송합니다. 대상이 없으므로 이 링크를 열지 못했습니다.", "label": "링크 열기" diff --git a/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index 19b0aa4d2c005..0bb0099a543f3 100644 --- a/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -4,5 +4,9 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "aria.result.0": "결과 없음" + "aria.oneReference": "{2}열, {1}줄, {0}의 기호", + "aria.result.0": "결과 없음", + "aria.result.1": "{0}에서 기호 1개를 찾았습니다.", + "aria.result.n1": "{1}에서 기호 {0}개를 찾았습니다.", + "aria.result.nm": "{1}개 파일에서 기호 {0}개를 찾았습니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index bf4a925fa9808..bebeacf63465f 100644 --- a/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -12,15 +12,16 @@ "noResults": "결과 없음", "peekView.alternateTitle": "참조", "peekViewTitleBackground": "Peek 뷰 제목 영역의 배경색입니다.", - "peekViewTitle": "Peek 뷰 제목 색입니다.", - "peekViewTitleInfo": "Peek 뷰 제목 정보 색입니다.", + "peekViewTitleForeground": "Peek 뷰 제목 색입니다.", + "peekViewTitleInfoForeground": "Peek 뷰 제목 정보 색입니다.", "peekViewBorder": "Peek 뷰 테두리 및 화살표 색입니다.", "peekViewResultsBackground": "Peek 뷰 결과 목록의 배경색입니다.", - "peekViewResultsMatchForeground": "Peek 뷰 결과 목록의 일치 항목 전경입니다.", - "peekViewResultsFileForeground": "Peek 뷰 결과 목록의 파일 항목 전경입니다.", + "peekViewResultsMatchForeground": "Peek 뷰 결과 목록에서 라인 노드의 전경색입니다.", + "peekViewResultsFileForeground": "Peek 뷰 결과 목록에서 파일 노드의 전경색입니다.", "peekViewResultsSelectionBackground": "Peek 뷰 결과 목록에서 선택된 항목의 배경색입니다.", "peekViewResultsSelectionForeground": "Peek 뷰 결과 목록에서 선택된 항목의 전경색입니다.", "peekViewEditorBackground": "Peek 뷰 편집기의 배경색입니다.", + "peekViewEditorGutterBackground": "Peek 뷰 편집기의 거터 배경색입니다.", "peekViewResultsMatchHighlight": "Peek 뷰 결과 목록의 일치 항목 강조 표시 색입니다.", "peekViewEditorMatchHighlight": "Peek 뷰 편집기의 일치 항목 강조 표시 색입니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/rename/browser/rename.i18n.json b/i18n/kor/src/vs/editor/contrib/rename/browser/rename.i18n.json index de17d2577844d..623526b74324f 100644 --- a/i18n/kor/src/vs/editor/contrib/rename/browser/rename.i18n.json +++ b/i18n/kor/src/vs/editor/contrib/rename/browser/rename.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "no result": "결과가 없습니다.", + "aria": "'{0}'을(를) '{1}'(으)로 이름을 변경했습니다. 요약: {2}", "rename.failed": "죄송합니다. 이름 바꾸기를 실행하지 못했습니다.", "rename.label": "기호 이름 바꾸기" } \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json b/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json index a3ddfaa689737..c9232c0a95d13 100644 --- a/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json +++ b/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "arai.alert.snippet": "'{0}'을(를) 적용하여 다음 텍스트가 삽입되었습니다.\n {1}", "suggest.trigger.label": "제안 항목 트리거" } \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 1873d3575154f..db8bbbe66702b 100644 --- a/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -4,10 +4,15 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "editorSuggestWidgetBackground": "제안 위젯의 배경색입니다.", + "editorSuggestWidgetBorder": "제안 위젯의 테두리 색입니다.", + "editorSuggestWidgetForeground": "제안 위젯의 전경색입니다.", + "editorSuggestWidgetSelectedBackground": "제한 위젯에서 선택된 항목의 배경색입니다.", + "editorSuggestWidgetHighlightForeground": "제안 위젯의 일치 항목 강조 표시 색입니다.", "readMore": "자세히 알아보기...{0}", "suggestionWithDetailsAriaLabel": "{0}, 제안, 세부 정보 있음", "suggestionAriaLabel": "{0}, 제안", - "goback": "뒤로 이동", + "readLess": "간단히 보기...{0}", "suggestWidget.loading": "로드 중...", "suggestWidget.noSuggestions": "제안 항목이 없습니다.", "suggestionAriaAccepted": "{0}, 수락됨", diff --git a/i18n/kor/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/kor/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json index d8b1d74b5f77a..59242661db1f7 100644 --- a/i18n/kor/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json +++ b/i18n/kor/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -15,5 +15,9 @@ "schema.brackets": "들여쓰기를 늘리거나 줄이는 대괄호 기호를 정의합니다.", "schema.autoClosingPairs": "대괄호 쌍을 정의합니다. 여는 대괄호를 입력하면 닫는 대괄호가 자동으로 삽입됩니다.", "schema.autoClosingPairs.notIn": "자동 쌍을 사용하지 않도록 설정된 범위 목록을 정의합니다.", - "schema.surroundingPairs": "선택한 문자열을 둘러싸는 데 사용할 수 있는 대괄호 쌍을 정의합니다." + "schema.surroundingPairs": "선택한 문자열을 둘러싸는 데 사용할 수 있는 대괄호 쌍을 정의합니다.", + "schema.wordPattern": "해당 언어에 대한 단어 정의입니다.", + "schema.wordPattern.pattern": "단어 일치에 사용하는 RegEXP 패턴입니다.", + "schema.wordPattern.flags": "단어 일치에 사용하는 RegExp 플래그입니다.", + "schema.wordPattern.flags.errorMessage": "`/^([gimuy]+)$/` 패턴과 일치해야 합니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/kor/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json index d2433872a7da1..1c5f62b7b236b 100644 --- a/i18n/kor/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json +++ b/i18n/kor/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -21,6 +21,8 @@ "menus.scmTitle": "소스 제어 제목 메뉴", "menus.resourceGroupContext": "소스 제어 리소스 그룹 상황에 맞는 메뉴", "menus.resourceStateContext": "소스 제어 리소스 상태 상황에 맞는 메뉴", + "view.viewTitle": "기여 조회 제목 메뉴", + "view.itemContext": "기여 조회 항목 상황에 맞는 메뉴", "nonempty": "비어 있지 않은 값이 필요합니다.", "opticon": "`icon` 속성은 생략할 수 있거나 문자열 또는 리터럴(예: `{dark, light}`)이어야 합니다.", "requireStringOrObject": "`{0}` 속성은 필수이며 `string` 또는 `object` 형식이어야 합니다.", diff --git a/i18n/kor/src/vs/platform/configuration/common/configurationRegistry.i18n.json b/i18n/kor/src/vs/platform/configuration/common/configurationRegistry.i18n.json index 0a476ed149d7d..8889b7ecd77ad 100644 --- a/i18n/kor/src/vs/platform/configuration/common/configurationRegistry.i18n.json +++ b/i18n/kor/src/vs/platform/configuration/common/configurationRegistry.i18n.json @@ -7,13 +7,6 @@ "defaultConfigurations.title": "기본 구성 재정의", "overrideSettings.description": "{0} 언어에 대해 재정의할 편집기 설정을 구성합니다.", "overrideSettings.defaultDescription": "언어에 대해 재정의할 편집기 설정을 구성합니다.", - "vscode.extension.contributes.configuration": "구성 설정을 적용합니다.", - "vscode.extension.contributes.configuration.title": "설정을 요약합니다. 이 레이블은 설정 파일에서 구분 주석으로 사용됩니다.", - "vscode.extension.contributes.configuration.properties": "구성 속성에 대한 설명입니다.", "config.property.languageDefault": "'{0}'을(를) 등록할 수 없습니다. 이는 언어별 편집기 설정을 설명하는 속성 패턴인 '\\\\[.*\\\\]$'과(와) 일치합니다. 'configurationDefaults' 기여를 사용하세요.", - "config.property.duplicate": "'{0}'을(를) 등록할 수 없습니다. 이 속성은 이미 등록되어 있습니다.", - "invalid.properties": "'configuration.properties'는 개체여야 합니다.", - "invalid.type": "설정된 경우 'configuration.type'을 '개체'로 설정해야 합니다.", - "invalid.title": "'configuration.title'은 문자열이어야 합니다.", - "vscode.extension.contributes.defaultConfiguration": "언어별로 기본 편집기 구성 설정을 적용합니다." + "config.property.duplicate": "'{0}'을(를) 등록할 수 없습니다. 이 속성은 이미 등록되어 있습니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/platform/environment/node/argv.i18n.json b/i18n/kor/src/vs/platform/environment/node/argv.i18n.json index 5596f41cdd4be..95f21567a73b1 100644 --- a/i18n/kor/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/kor/src/vs/platform/environment/node/argv.i18n.json @@ -20,6 +20,7 @@ "showVersions": "#NAME?", "installExtension": "확장을 설치합니다.", "uninstallExtension": "확장을 제거합니다.", + "experimentalApis": "확장에 대해 제안된 API 기능을 사용하도록 설정합니다.", "disableExtensions": "설치된 모든 확장을 사용하지 않도록 설정합니다.", "disableGPU": "GPU 하드웨어 가속을 사용하지 않도록 설정합니다.", "version": "버전을 출력합니다.", diff --git a/i18n/kor/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/kor/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index 2fca8d6643b69..7207158c622dc 100644 --- a/i18n/kor/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/kor/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -14,6 +14,12 @@ "vscode.extension.contributes": "이 패키지에 표시된 VS Code 확장의 전체 기여입니다.", "vscode.extension.preview": "마켓플레이스에서 Preview로 플래그 지정할 확장을 설정합니다.", "vscode.extension.activationEvents": "VS Code 확장에 대한 활성화 이벤트입니다.", + "vscode.extension.activationEvents.onLanguage": "지정된 언어로 확인되는 파일을 열 때마다 활성화 이벤트가 발송됩니다.", + "vscode.extension.activationEvents.onCommand": "지정된 명령을 호출할 때마다 활성화 이벤트가 발송됩니다.", + "vscode.extension.activationEvents.onDebug": "지정된 유형의 디버깅 세션을 시작할 때마다 활성화 알림이 발송됩니다.", + "vscode.extension.activationEvents.workspaceContains": "지정된 glob 패턴과 일치하는 파일이 하나 이상 있는 폴더를 열 때마다 활성화 알림이 발송됩니다.", + "vscode.extension.activationEvents.onView": "지정된 뷰가 확장될 때마다 활성화 이벤트가 내보내 집니다.", + "vscode.extension.activationEvents.star": "VS Code 시작 시 활성화 이벤트가 발송됩니다. 훌륭한 최종 사용자 경험을 보장하려면 사용 케이스에서 다른 활성화 이벤트 조합이 작동하지 않을 때에만 확장에서 이 활성화 이벤트를 사용하세요.", "vscode.extension.badges": "마켓플레이스 확장 페이지의 사이드바에 표시할 배지의 배열입니다.", "vscode.extension.badges.url": "배지 이미지 URL입니다.", "vscode.extension.badges.href": "배지 링크입니다.", diff --git a/i18n/kor/src/vs/platform/history/electron-main/historyMainService.i18n.json b/i18n/kor/src/vs/platform/history/electron-main/historyMainService.i18n.json new file mode 100644 index 0000000000000..6b87a635f59dd --- /dev/null +++ b/i18n/kor/src/vs/platform/history/electron-main/historyMainService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "newWindow": "새 창", + "newWindowDesc": "새 창을 엽니다.", + "recentFolders": "최근 폴더", + "folderDesc": "{0} {1}" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/kor/src/vs/platform/markers/common/problemMatcher.i18n.json index e2cb0557fbc16..7d3007e9ff13e 100644 --- a/i18n/kor/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/kor/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -34,7 +34,7 @@ "ProblemMatcherParser.noValidIdentifier": "오류: 패턴 속성 {0}이(가) 유효한 패턴 변수 이름이 아닙니다.", "ProblemMatcherParser.problemPattern.watchingMatcher": "문제 검사기에서 감시 시작 패턴과 종료 패턴을 모두 정의해야 합니다.", "ProblemMatcherParser.invalidRegexp": "오류: {0} 문자열은 유효한 정규식이 아닙니다.\n", - "WatchingPatternSchema.regexp": "조사 작업의 시작 또는 끝을 검색하는 정규식입니다.", + "WatchingPatternSchema.regexp": "백그라운드 작업의 시작 또는 종료를 감지하는 정규식입니다.", "WatchingPatternSchema.file": "파일 이름의 일치 그룹 인덱스이며 생략할 수 있습니다.", "PatternTypeSchema.name": "제공되거나 미리 정의된 패턴의 이름", "PatternTypeSchema.description": "문제 패턴 또는 제공되거나 미리 정의된 문제 패턴의 이름입니다. 기본이 지정된 경우 생략할 수 있습니다.", @@ -43,14 +43,18 @@ "ProblemMatcherSchema.severity": "캡처 문제에 대한 기본 심각도입니다. 패턴에서 심각도에 대한 일치 그룹을 정의하지 않은 경우에 사용됩니다.", "ProblemMatcherSchema.applyTo": "텍스트 문서에 복된 문제가 열린 문서, 닫힌 문서 또는 모든 문서에 적용되는지를 제어합니다.", "ProblemMatcherSchema.fileLocation": "문제 패턴에 보고된 파일 이름을 해석하는 방법을 정의합니다.", + "ProblemMatcherSchema.background": "백그라운드 작업에서 활성 상태인 matcher의 시작과 끝을 추적하는 패턴입니다.", + "ProblemMatcherSchema.background.activeOnStart": "true로 설정한 경우 작업이 시작되면 백그라운드 모니터가 활성 모드로 전환됩니다. 이는 beginPattern과 일치하는 줄을 실행하는 것과 같습니다.", + "ProblemMatcherSchema.background.beginsPattern": "출력이 일치하는 경우 백그라운드 작업을 시작할 때 신호를 받습니다.", + "ProblemMatcherSchema.background.endsPattern": "출력이 일치하는 경우 백그라운드 작업을 끝날 때 신호를 받습니다.", + "ProblemMatcherSchema.watching.deprecated": "조사 속성은 사용되지 않습니다. 백그라운드 속성을 대신 사용하세요.", + "ProblemMatcherSchema.watching": "조사 matcher의 시작과 끝을 추적하는 패턴입니다.", "ProblemMatcherSchema.watching.activeOnStart": "true로 설정한 경우 작업이 시작되면 선택기가 활성 모드로 전환됩니다. 이는 beginPattern과 일치하는 줄을 실행하는 것과 같습니다.", "ProblemMatcherSchema.watching.beginsPattern": "출력이 일치하는 경우 조사 작업을 시작할 때 신호를 받습니다.", "ProblemMatcherSchema.watching.endsPattern": "출력이 일치하는 경우 조사 작업을 끝날 때 신호를 받습니다.", - "ProblemMatcherSchema.watching": "감시 패턴의 시작과 끝을 추적하는 패턴입니다.", "LegacyProblemMatcherSchema.watchedBegin.deprecated": "이 속성은 사용되지 않습니다. 대신 감시 속성을 사용하세요.", "LegacyProblemMatcherSchema.watchedBegin": "파일 감시를 통해 트리거되는 감시되는 작업이 시작됨을 나타내는 정규식입니다.", "LegacyProblemMatcherSchema.watchedEnd.deprecated": "이 속성은 사용되지 않습니다. 대신 감시 속성을 사용하세요.", "LegacyProblemMatcherSchema.watchedEnd": "감시되는 작업이 종료됨을 나타내는 정규식입니다.", - "NamedProblemMatcherSchema.name": "문제 선택기의 이름입니다.", "ProblemMatcherExtPoint": "문제 선택기를 제공합니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/kor/src/vs/platform/theme/common/colorRegistry.i18n.json index e418155a93109..40c91a13f4936 100644 --- a/i18n/kor/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/kor/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -4,27 +4,80 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.color": "잘못된 색 형식입니다. #RRGGBB 또는 #RRGGBBAA를 사용하세요.", + "invalid.color": "잘못된 색 형식입니다. #RGB, #RGBA, #RRGGBB 또는 #RRGGBBAA를 사용하세요.", "schema.colors": "워크벤치에서 사용되는 색입니다.", "foreground": "전체 전경색입니다. 이 색은 구성 요소에서 재정의하지 않은 경우에만 사용됩니다.", - "focusedElementOutline": "포커스가 있는 요소의 전체 윤곽/테두리 색입니다. 이 색은 구성 요소에서 재정의하지 않은 경우에만 사용됩니다.", - "highContrastBorder": "고대비 테마를 사용하도록 설정한 경우 별도 구성 요소의 테두리 색입니다.", - "highContrastOutline": "고대비 테마를 사용하도록 설정한 경우 활성 구성 요소의 윤곽 색입니다.", + "errorForeground": "오류 메시지에 대한 전체 전경색입니다. 이 색은 구성 요소에서 재정의하지 않은 경우에만 사용됩니다.", + "descriptionForeground": "레이블과 같이 추가 정보를 제공하는 설명 텍스트의 전경색입니다.", + "focusBorder": "포커스가 있는 요소의 전체 테두리 색입니다. 이 색은 구성 요소에서 재정의하지 않은 경우에만 사용됩니다.", + "contrastBorder": "더 뚜렷이 대비되도록 요소를 다른 요소와 구분하는 요소 주위의 추가 테두리입니다.", + "activeContrastBorder": "더 뚜렷이 대비되도록 요소를 다른 요소와 구분하는 활성 요소 주위의 추가 테두리입니다.", + "textSeparatorForeground": "텍스트 구분자 색상입니다.", + "textLinkForeground": "텍스트 내 링크의 전경색입니다.", + "textLinkActiveForeground": "텍스트 내 활성 링크의 전경색입니다.", + "textPreformatForeground": "미리 서식이 지정된 텍스트 세그먼트의 전경색입니다.", + "textBlockQuoteBackground": "텍스트 내 블록 인용의 전경색입니다.", + "textBlockQuoteBorder": "텍스트 내 블록 인용의 테두리 색입니다.", + "textCodeBlockBackground": "텍스트 내 코드 블록의 전경색입니다.", + "widgetShadow": "편집기 내에서 찾기/바꾸기 같은 위젯의 그림자 색입니다.", "inputBoxBackground": "입력 상자 배경입니다.", "inputBoxForeground": "입력 상자 전경입니다.", "inputBoxBorder": "입력 상자 테두리입니다.", "inputBoxActiveOptionBorder": "입력 필드에서 활성화된 옵션의 테두리 색입니다.", + "inputPlaceholderForeground": "위치 표시자 텍스트에 대한 입력 상자 전경색입니다.", + "inputValidationInfoBackground": "정보 심각도의 입력 유효성 검사 배경색입니다.", + "inputValidationInfoBorder": "정보 심각도의 입력 유효성 검사 테두리 색입니다.", + "inputValidationWarningBackground": "정보 경고의 입력 유효성 검사 배경색입니다.", + "inputValidationWarningBorder": "경고 심각도의 입력 유효성 검사 테두리 색입니다.", + "inputValidationErrorBackground": "오류 심각도의 입력 유효성 검사 배경색입니다.", + "inputValidationErrorBorder": "오류 심각도의 입력 유효성 검사 테두리 색입니다.", "dropdownBackground": "드롭다운 배경입니다.", "dropdownForeground": "드롭다운 전경입니다.", "dropdownBorder": "드롭다운 테두리입니다.", + "listFocusBackground": "목록/트리가 활성 상태인 경우 포커스가 있는 항목의 목록/트리 배경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다.", + "listFocusForeground": "목록/트리가 활성 상태인 경우 포커스가 있는 항목의 목록/트리 전경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다.", + "listActiveSelectionBackground": "목록/트리가 활성 상태인 경우 선택한 항목의 목록/트리 배경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다.", + "listActiveSelectionForeground": "목록/트리가 활성 상태인 경우 선택한 항목의 목록/트리 전경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다.", + "listInactiveSelectionBackground": "목록/트리가 비활성 상태인 경우 선택한 항목의 목록/트리 배경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다.", + "listInactiveSelectionForeground": "목록/트리가 비활성 상태인 경우 선택한 항목의 목록/트리 전경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다.", + "listHoverBackground": "마우스로 항목을 가리킬 때 목록/트리 배경입니다.", + "listHoverForeground": "마우스로 항목을 가리킬 때 목록/트리 전경입니다.", + "listDropBackground": "마우스로 항목을 이동할 때 목록/트리 끌어서 놓기 배경입니다.", + "highlight": "목록/트리 내에서 검색할 때 일치 항목 강조 표시의 목록/트리 전경색입니다.", + "pickerGroupForeground": "그룹화 레이블에 대한 빠른 선택기 색입니다.", + "pickerGroupBorder": "그룹화 테두리에 대한 빠른 선택기 색입니다.", + "buttonForeground": "단추 기본 전경색입니다.", + "buttonBackground": "단추 배경색입니다.", + "buttonHoverBackground": "마우스로 가리킬 때 단추 배경색입니다.", + "badgeBackground": "배지 배경색입니다. 배지는 검색 결과 수와 같은 소량의 정보 레이블입니다.", + "badgeForeground": "배지 전경색입니다. 배지는 검색 결과 수와 같은 소량의 정보 레이블입니다.", + "scrollbarShadow": "스크롤되는 보기를 나타내는 스크롤 막대 그림자입니다.", + "scrollbarSliderBackground": "슬라이더 배경색입니다.", + "scrollbarSliderHoverBackground": "마우스로 가리킬 때 슬라이더 배경색입니다.", + "scrollbarSliderActiveBackground": "활성 상태인 경우 슬라이더 배경색입니다.", + "progressBarBackground": "오래 실행 중인 작업에 대해 표시되는 진행률 표시 막대의 배경색입니다.", "editorBackground": "편집기 배경색입니다.", "editorForeground": "편집기 기본 전경색입니다.", - "editorSelection": "편집기 선택 영역의 색입니다.", + "editorWidgetBackground": "찾기/바꾸기 같은 편집기 위젯의 배경색입니다.", + "editorWidgetBorder": "편집기 위젯의 테두리 색입니다. 위젯에 테두리가 있고 위젯이 색상을 무시하지 않을 때만 사용됩니다.", "editorInactiveSelection": "비활성 편집기 선택 영역의 색입니다.", "editorSelectionHighlight": "선택 영역과 동일한 콘텐츠가 있는 영역의 색입니다.", "editorFindMatch": "현재 검색 일치 항목의 색입니다.", "findMatchHighlight": "기타 검색 일치 항목의 색입니다.", "findRangeHighlight": "검색을 제한하는 영역의 색을 지정합니다.", + "hoverHighlight": "호버가 표시된 단어 아래를 강조 표시합니다.", + "hoverBackground": "편집기 호버의 배경색.", + "hoverBorder": "편집기 호버의 테두리 색입니다.", "activeLinkForeground": "활성 링크의 색입니다.", - "linkForeground": "링크 색입니다." + "diffEditorInserted": "삽입된 텍스트의 배경색입니다.", + "diffEditorRemoved": "제거된 텍스트의 배경색입니다.", + "diffEditorInsertedOutline": "삽입된 텍스트의 윤곽선 색입니다.", + "diffEditorRemovedOutline": "제거된 텍스트의 윤곽선 색입니다.", + "mergeCurrentHeaderBackground": "인라인 병합 충돌의 현재 헤더 배경입니다.", + "mergeCurrentContentBackground": "인라인 병합 충돌의 현재 콘텐츠 배경입니다.", + "mergeIncomingHeaderBackground": "인라인 병합 충돌에서 수신 헤더 배경입니다.", + "mergeIncomingContentBackground": "인라인 병합 충돌에서 수신 콘텐츠 배경입니다.", + "mergeBorder": "인라인 병합 충돌에서 헤더 및 스플리터의 테두리 색입니다.", + "overviewRulerCurrentContentForeground": "인라인 병합 충돌에서 현재 개요 눈금 전경색입니다.", + "overviewRulerIncomingContentForeground": "인라인 병합 충돌에서 수신 개요 눈금 전경색입니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/kor/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json new file mode 100644 index 0000000000000..a0a766dacfd23 --- /dev/null +++ b/i18n/kor/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "overwritingExtension": "확장 {0}을(를) {1}(으)로 덮어쓰는 중입니다.", + "extensionUnderDevelopment": "{0}에서 개발 확장 로드 중" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/kor/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json new file mode 100644 index 0000000000000..68f2beaa1e04f --- /dev/null +++ b/i18n/kor/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "닫기", + "cancel": "취소", + "ok": "확인" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/api/node/extHostExplorerView.i18n.json b/i18n/kor/src/vs/workbench/api/node/extHostExplorerView.i18n.json new file mode 100644 index 0000000000000..b5a9320355950 --- /dev/null +++ b/i18n/kor/src/vs/workbench/api/node/extHostExplorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "ID가 '{0}'인 등록된 TreeExplorerNodeProvider가 없습니다.", + "treeExplorer.failedToProvideRootNode": "TreeExplorerNodeProvider '{0}'에서 루트 노드를 제공하지 못했습니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/kor/src/vs/workbench/api/node/extHostTask.i18n.json new file mode 100644 index 0000000000000..4b90a12aaf247 --- /dev/null +++ b/i18n/kor/src/vs/workbench/api/node/extHostTask.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "task.label": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/api/node/extHostTreeView.i18n.json b/i18n/kor/src/vs/workbench/api/node/extHostTreeView.i18n.json new file mode 100644 index 0000000000000..b5a9320355950 --- /dev/null +++ b/i18n/kor/src/vs/workbench/api/node/extHostTreeView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "ID가 '{0}'인 등록된 TreeExplorerNodeProvider가 없습니다.", + "treeExplorer.failedToProvideRootNode": "TreeExplorerNodeProvider '{0}'에서 루트 노드를 제공하지 못했습니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/kor/src/vs/workbench/api/node/extHostTreeViews.i18n.json new file mode 100644 index 0000000000000..4dfa6a6e897b2 --- /dev/null +++ b/i18n/kor/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeView.notRegistered": "ID가 '{0}'인 등록된 트리 뷰가 없습니다.", + "treeItem.notFound": "ID가 '{0}'인 트리 항목을 찾을 수 없습니다.", + "treeView.duplicateElement": "{0} 요소가 이미 등록되어 있습니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json b/i18n/kor/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json index 64445b492e09f..775ac0271857b 100644 --- a/i18n/kor/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json +++ b/i18n/kor/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "hideActivitBar": "작업 막대 숨기기", - "activityBarAriaLabel": "활성 뷰 전환기" + "activityBarAriaLabel": "활성 뷰 전환기", + "globalActions": "전역 작업" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/kor/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index 92d7d86820fb6..66ca4a6169bf8 100644 --- a/i18n/kor/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/kor/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -44,6 +44,8 @@ "openPreviousRecentlyUsedEditorInGroup": "그룹에서 최근에 사용한 이전 편집기 열기", "openNextRecentlyUsedEditorInGroup": "그룹에서 최근에 사용한 다음 편집기 열기", "navigateEditorHistoryByInput": "기록에서 이전 편집기 열기", + "openNextRecentlyUsedEditor": "최근에 사용한 다음 편집기 열기", + "openPreviousRecentlyUsedEditor": "최근에 사용한 이전 편집기 열기", "clearEditorHistory": "편집기 기록 지우기", "focusLastEditorInStack": "그룹의 마지막 편집기 열기", "moveEditorLeft": "왼쪽으로 편집기 이동", diff --git a/i18n/kor/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/kor/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index 8b7506a02d06a..0f9049de2acea 100644 --- a/i18n/kor/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/kor/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -10,7 +10,7 @@ "multiSelection": "{0} 선택 항목", "endOfLineLineFeed": "LF", "endOfLineCarriageReturnLineFeed": "CRLF", - "tabFocusModeEnabled": "Tab으로 포커스 이동", + "screenReaderDetectedExtra": "화면 읽기 프로그램을 사용하지 않는 경우 `editor.accessibilitySupport` 설정을 \"off\"로 변경하세요.", "disableTabMode": "접근성 모드 사용 안 함", "gotoLine": "줄 이동", "indentation": "들여쓰기", diff --git a/i18n/kor/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json b/i18n/kor/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json new file mode 100644 index 0000000000000..8b1fffebc06a3 --- /dev/null +++ b/i18n/kor/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpen": "파일로 이동...", + "quickNavigateNext": "Quick Open에서 다음 탐색", + "quickNavigatePrevious": "Quick Open에서 이전 탐색", + "quickSelectNext": "Quick Open에서 다음 선택", + "quickSelectPrevious": "Quick Open에서 이전 선택" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/browser/quickopen.i18n.json b/i18n/kor/src/vs/workbench/browser/quickopen.i18n.json index 438739dc2828c..15bbb282f5256 100644 --- a/i18n/kor/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/kor/src/vs/workbench/browser/quickopen.i18n.json @@ -6,6 +6,5 @@ { "noResultsMatching": "일치하는 결과 없음", "noResultsFound2": "결과 없음", - "entryAriaLabel": "{0}, 명령", - "noCommands": "일치하는 명령 없음" + "entryAriaLabel": "{0}, 명령" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/browser/viewlet.i18n.json b/i18n/kor/src/vs/workbench/browser/viewlet.i18n.json index c5364af71848c..1b18c6972e499 100644 --- a/i18n/kor/src/vs/workbench/browser/viewlet.i18n.json +++ b/i18n/kor/src/vs/workbench/browser/viewlet.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "collapse": "모두 축소", - "viewToolbarAriaLabel": "{0} 동작" + "collapse": "모두 축소" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/common/theme.i18n.json b/i18n/kor/src/vs/workbench/common/theme.i18n.json index d3f3f890b2f8e..96c96b6d68740 100644 --- a/i18n/kor/src/vs/workbench/common/theme.i18n.json +++ b/i18n/kor/src/vs/workbench/common/theme.i18n.json @@ -4,39 +4,49 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "tabsContainerBackground": "탭 컨테이너의 배경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", - "activeTabBackground": "활성 탭 배경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", - "inactiveTabBackground": "비활성 탭 배경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", - "activeTabActiveGroupForeground": "활성 그룹의 활성 탭 전경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", - "activeTabInactiveGroupForeground": "비활성 그룹의 활성 탭 전경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", - "inactiveTabActiveGroupForeground": "활성 그룹의 비활성 탭 전경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", - "inactiveTabInactiveGroupForeground": "비활성 그룹의 비활성 탭 전경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", + "tabActiveBackground": "활성 탭 배경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", + "tabInactiveBackground": "비활성 탭 배경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", "tabBorder": "탭을 서로 구분하기 위한 테두리입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", - "editorHeaderBackground": "사용하도록 설정된 탭이 없는 경우 편집기 제목 머리글의 배경색입니다.", + "tabActiveForeground": "활성 그룹의 활성 탭 전경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", + "tabInactiveForeground": "활성 그룹의 비활성 탭 전경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", + "tabUnfocusedActiveForeground": "비활성 그룹의 활성 탭 전경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", + "tabUnfocusedInactiveForeground": "비활성 그룹의 비활성 탭 전경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", + "editorGroupBackground": "편집기 그룹의 배경색입니다. 편집기 그룹은 편집기의 컨테이너입니다. 배경색은 편집기 그룹을 끌 때 표시됩니다.", + "tabsContainerBackground": "탭을 사용도록 설정한 경우 편집기 그룹 제목 머리글의 배경색입니다. 편집기 그룹은 편집기의 컨테이너입니다.", + "tabsContainerBorder": "탭을 사용하도록 설정한 경우 편집기 그룹 제목 머리글의 테두리 색입니다. 편집기 그룹은 편집기의 컨테이너입니다.", + "editorGroupHeaderBackground": "탭을 사용하지 않도록 설정한 경우 편집기 그룹 제목 머리글의 배경색입니다. 편집기 그룹은 편집기의 컨테이너입니다.", "editorGroupBorder": "여러 편집기 그룹을 서로 구분하기 위한 색입니다. 편집기 그룹은 편집기의 컨테이너입니다.", - "editorGroupBackground": "편집기 그룹의 배경색입니다. 편집기 그룹은 편집기의 컨테이너입니다.", - "editorDragAndDropBackground": "편집기를 끌어올 때의 배경색입니다.", - "editorSideBySideBorder": "병렬 편집기에서 마스터 쪽의 세부 정보를 구분하기 위한 테두리 색입니다.", + "editorDragAndDropBackground": "편집기를 끌 때 배경색입니다. 편집기 내용이 계속 비추어 보이도록 이 색은 투명해야 합니다.", "panelBackground": "패널 배경색입니다. 패널은 편집기 영역 아래에 표시되며 출력 및 통합 터미널 같은 보기가 포함됩니다.", - "panelTopBorder": "편집기와 구분되는 맨 위의 패널 테두리 색입니다. 패널은 편집기 영역 아래에 표시되며 출력 및 통합 터미널 같은 보기가 포함됩니다.", + "panelBorder": "편집기와 구분되는 맨 위의 패널 테두리 색입니다. 패널은 편집기 영역 아래에 표시되며 출력 및 통합 터미널 같은 보기가 포함됩니다.", "panelActiveTitleForeground": "활성 패널의 제목 색입니다. 패널은 편집기 영역 아래에 표시되며 출력 및 통합 터미널 같은 보기가 포함됩니다.", "panelInactiveTitleForeground": "비활성 패널의 제목 색입니다. 패널은 편집기 영역 아래에 표시되며 출력 및 통합 터미널 같은 보기가 포함됩니다.", "panelActiveTitleBorder": "활성 패널 제목의 테두리 색입니다. 패널은 편집기 영역 아래에 표시되며 출력 및 통합 터미널 같은 보기가 포함됩니다.", "statusBarForeground": "상태 표시줄 전경색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", "statusBarBackground": "표준 상태 표시줄 배경색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", + "statusBarBorder": "사이드바 및 편집기와 구분하는 상태 표시줄 테두리 색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", "statusBarNoFolderBackground": "폴더가 열리지 않았을 때의 상태 표시줄 배경색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", + "statusBarNoFolderForeground": "폴더가 열리지 않았을 때의 상태 표시줄 전경색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", "statusBarItemActiveBackground": "클릭할 때의 상태 표시줄 항목 배경색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", "statusBarItemHoverBackground": "마우스로 가리킬 때의 상태 표시줄 항목 배경색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", - "statusBarInfoItemBackground": "상태 표시줄 정보 항목 배경색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", - "statusBarInfoItemHoverBackground": "마우스로 가리킬 때의 상태 표시줄 정보 항목 배경색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", + "statusBarProminentItemBackground": "상태 표시줄 주요 항목 배경색입니다. 주요 항목은 중요도를 나타내는 다른 상태 표시줄 항목보다 눈에 잘 띕니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", + "statusBarProminentItemHoverBackground": "마우스로 가리킬 때의 상태 표시줄 주요 항목 배경색입니다. 주요 항목은 중요도를를 나타내는 다른 상태 표시줄 항목보다 눈에 잘 띕니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", "activityBarBackground": "작업 막대 배경색입니다. 작업 막대는 맨 왼쪽이나 오른쪽에 표시되며 사이드바의 뷰 간을 전환하는 데 사용할 수 있습니다.", - "activityBarDragAndDropBackground": "작업 막대 항목의 끌어서 놓기 피드백 색입니다. 작업 막대는 왼쪽이나 오른쪽 끝에 표시되며 사이드바의 보기를 전환할 수 있습니다.", - "activityBadgeBackground": "활동 알림 배지 배경색입니다. 작업 막대는 왼쪽이나 오른쪽 끝에 표시되며 사이드바의 보기를 전환할 수 있습니다.", - "activityBadgeForeground": "활동 알림 배지 전경색입니다. 작업 막대는 왼쪽이나 오른쪽 끝에 표시되며 사이드바의 보기를 전환할 수 있습니다.", + "activityBarForeground": "작업 막대 전경 색(예: 아이콘에 사용됨)입니다. 작업 막대는 오른쪽이나 왼쪽 끝에 표시되며 사이드바의 보기 간을 전환할 수 있습니다.", + "activityBarBorder": "사이드바와 구분하는 작업 막대 테두리색입니다. 작업 막대는 오른쪽이나 왼쪽 끝에 표시되며 사이드바의 보기 간을 전환할 수 있습니다.", + "activityBarDragAndDropBackground": "작업 막대 항목의 끌어서 놓기 피드백 색입니다. 작업 막대 항목이 계속 비추어 보이도록 이 색은 투명해야 합니다. 작업 막대는 왼쪽이나 오른쪽 끝에 표시되며 사이드바의 보기를 전환할 수 있습니다.", + "activityBarBadgeBackground": "활동 알림 배지 배경색입니다. 작업 막대는 왼쪽이나 오른쪽 끝에 표시되며 사이드바의 보기를 전환할 수 있습니다.", + "activityBarBadgeForeground": "활동 알림 배지 전경색입니다. 작업 막대는 왼쪽이나 오른쪽 끝에 표시되며 사이드바의 보기를 전환할 수 있습니다.", "sideBarBackground": "사이드바 배경색입니다. 사이드바는 탐색기 및 검색과 같은 뷰의 컨테이너입니다.", + "sideBarForeground": "사이드바 전경색입니다. 사이드바는 탐색기 및 검색과 같은 뷰의 컨테이너입니다.", + "sideBarBorder": "편집기와 구분하는 측면의 사이드바 테두리 색입니다. 사이드바는 탐색기 및 검색과 같은 뷰의 컨테이너입니다.", "sideBarTitleForeground": "사이드바 제목 전경색입니다. 사이드바는 탐색기 및 검색과 같은 뷰의 컨테이너입니다.", + "sideBarSectionHeaderBackground": "사이드바 섹션 헤더 배경색입니다. 사이드바는 탐색기 및 검색과 같은 뷰의 컨테이너입니다.", + "sideBarSectionHeaderForeground": "사이드바 섹션 헤더 전경색입니다. 사이드바는 탐색기 및 검색과 같은 뷰의 컨테이너입니다.", "titleBarActiveForeground": "창이 활성화된 경우의 제목 표시줄 전경입니다. 이 색은 현재 macOS에서만 지원됩니다.", "titleBarInactiveForeground": "창이 비활성화된 경우의 제목 표시줄 전경입니다. 이 색은 현재 macOS에서만 지원됩니다.", "titleBarActiveBackground": "창을 활성화할 때의 제목 표시줄 전경입니다. 이 색은 현재 macOS에서만 지원됩니다.", - "titleBarInactiveBackground": "창이 비활성화된 경우의 제목 표시줄 배경입니다. 이 색은 현재 macOS에서만 지원됩니다." + "titleBarInactiveBackground": "창이 비활성화된 경우의 제목 표시줄 배경입니다. 이 색은 현재 macOS에서만 지원됩니다.", + "notificationsForeground": "알림 전경색입니다. 알림은 창의 위쪽에 표시됩니다.", + "notificationsBackground": "알림 배경색입니다. 알림은 창의 위쪽에 표시됩니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/kor/src/vs/workbench/electron-browser/actions.i18n.json index dce95cceba857..f17d6eb1c6e9d 100644 --- a/i18n/kor/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/kor/src/vs/workbench/electron-browser/actions.i18n.json @@ -6,9 +6,6 @@ { "closeActiveEditor": "편집기 닫기", "closeWindow": "창 닫기", - "switchWindow": "창 전환", - "switchWindowPlaceHolder": "창 선택", - "current": "현재 창", "closeFolder": "폴더 닫기", "noFolderOpened": "이 인스턴스에 현재 열려 있는 닫을 폴더가 없습니다.", "newWindow": "새 창", @@ -20,7 +17,7 @@ "zoomReset": "확대/축소 다시 설정", "appPerf": "시작 성능", "reloadWindow": "창 다시 로드", - "openRecent": "최근 파일 열기", + "current": "현재 창", "folders": "폴더", "files": "파일", "openRecentPlaceHolderMac": "경로 선택(새 창에서 열려면 Cmd 키를 길게 누름)", @@ -32,10 +29,6 @@ "openDocumentationUrl": "설명서", "openIntroductoryVideosUrl": "소개 비디오", "toggleSharedProcess": "공유 프로세스 설정/해제", - "navigateLeft": "뷰 왼쪽으로 이동", - "navigateRight": "뷰 오른쪽으로 이동", - "navigateUp": "뷰 위로 이동", - "navigateDown": "뷰 아래로 이동", "increaseViewSize": "현재 뷰 크기 늘리기", "decreaseViewSize": "현재 뷰 크기 줄이기" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json index 7aea99b100666..a250fe1addc67 100644 --- a/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,6 +7,7 @@ "view": "보기", "help": "도움말", "file": "파일", + "developer": "개발자", "showEditorTabs": "열려 있는 편집기를 탭에서 표시할지 여부를 제어합니다.", "editorTabCloseButton": "편집기의 탭 닫기 단추의 위치를 제어하거나 'off'로 설정된 경우 이 단추를 사용하지 않도록 설정합니다.", "showIcons": "열린 편집기를 아이콘과 함께 표시할지 여부를 제어합니다. 이를 위해서는 아이콘 테마도 사용하도록 설정해야 합니다.", @@ -20,6 +21,7 @@ "statusBarVisibility": "워크벤치 아래쪽에서 상태 표시줄의 표시 유형을 제어합니다.", "activityBarVisibility": "워크벤치에서 작업 막대의 표시 유형을 제어합니다.", "closeOnFileDelete": "일부 다른 프로세스에서 파일을 삭제하거나 이름을 바꿀 때 파일을 표시하는 편집기를 자동으로 닫을지 여부를 제어합니다. 사용하지 않도록 설정하는 경우 이러한 이벤트가 발생하면 편집기가 더티 상태로 계속 열려 있습니다. 응용 프로그램 내에서 삭제하면 항상 편집기가 닫히고 데이터를 유지하기 위해 더티 파일은 닫히지 않습니다.", + "swipeToNavigate": "세 손가락으로 가로로 살짝 밀어 열려 있는 파일 간을 이동합니다.", "workbenchConfigurationTitle": "워크벤치", "window.openFilesInNewWindow.on": "파일이 새 창에서 열립니다.", "window.openFilesInNewWindow.off": "파일이 파일의 폴더가 열려 있는 창 또는 마지막 활성 창에서 열립니다.", @@ -29,29 +31,29 @@ "window.openFoldersInNewWindow.off": "폴더가 마지막 활성 창을 바꿉니다.", "window.openFoldersInNewWindow.default": "폴더를 응용 프로그램 내에서 선택(예: 파일 메뉴를 통해)하는 경우를 제외하고 폴더가 새 창에서 열립니다.", "openFoldersInNewWindow": "폴더를 새 창에서 열지, 마지막 활성 창과 바꿀지를 제어합니다.\n- default: 응용 프로그램 내에서 [파일] 메뉴 등을 통해 폴더를 선택하는 경우를 제외하고, 폴더는 새 창에서 열립니다.\n- on: 폴더가 새 창에서 열립니다.\n- off: 폴더가 마지막 활성 창을 대체합니다\n이 설정이 무시되는 경우도 있을 수 있습니다(예: -new-window 또는 -reuse-window 명령줄 옵션을 사용할 경우).", - "window.reopenFolders.none": "폴더를 다시 열지 않습니다.", - "window.reopenFolders.one": "마지막 활성 폴더를 다시 엽니다.", - "window.reopenFolders.all": "마지막 세션의 모든 폴더를 다시 엽니다.", - "reopenFolders": "다시 시작한 이후에 폴더를 다시 여는 방법을 제어합니다. 폴더를 다시 열지 않으려면 'none'을 선택하고, 마지막으로 작업한 폴더를 다시 열려면 'one'을 선택하고, 마지막 세션의 모든 폴더를 다시 열려면 'all'을 선택합니다.", "restoreFullscreen": "창이 전체 화면 모드에서 종료된 경우 창을 전체 화면 모드로 복원할지 여부를 제어합니다.", "zoomLevel": "창의 확대/축소 수준을 조정합니다. 원래 크기는 0이고 각 상한 증분(예: 1) 또는 하한 증분(예: -1)은 20% 더 크거나 더 작게 확대/축소하는 것을 나타냅니다. 10진수를 입력하여 확대/축소 수준을 세부적으로 조정할 수도 있습니다.", - "title": "활성 편집기를 기반으로 창 제목을 제어합니다. 변수는 컨텍스트를 기반으로 대체됩니다.\n${activeEditorShort}: 예: myFile.txt\n${activeEditorMedium}: 예: myFolder/myFile.txt\n${activeEditorLong}: 예: /Users/Development/myProject/myFolder/myFile.txt\n${rootName}: 예: myProject\n${rootPath}: 예: /Users/Development/myProject\n${appName}: 예: VS Code\n${dirty}: 활성 편집기가 더티인 경우 더티 표시기\n${separator}: 값이 있는 변수로 둘러싸인 경우에만 표시되는 조건부 구분 기호(\" - \")", "window.newWindowDimensions.default": "화면 가운데에서 새 창을 엽니다.", "window.newWindowDimensions.inherit": "마지막 활성 창과 동일한 크기로 새 창을 엽니다.", "window.newWindowDimensions.maximized": "최대화된 새 창을 엽니다.", "window.newWindowDimensions.fullscreen": "전체 화면 모드에서 새 창을 엽니다.", - "newWindowDimensions": "새 창을 열 때 크기를 제어합니다. 기본적으로 새 창은 화면 가운데에 작은 크기로 열립니다. 'inherit'으로 설정할 경우 마지막 활성 창과 동일한 크기로 창이 열립니다. 'maximized'로 설정할 경우 창이 최대화되어 열리고 'fullscreen'으로 구성할 경우 전체 화면으로 열립니다.", + "newWindowDimensions": "하나 이상의 창이 이미 열려 있을 때 여는 새 새 창의 크기를 제어합니다. 기본적으로 새 창은 화면 가운데에 작은 크기로 열립니다. 'inherit'으로 설정할 경우 마지막 활성 창과 동일한 크기로 창이 열립니다. 'maximized'로 설정할 경우 창이 최대화되어 열리고 'fullscreen'으로 구성할 경우 전체 화면으로 열립니다. 이 설정은 여는 첫 번째 창에는 적용되지 않습니다. 첫 번째 창의 경우 항상 창을 닫기 전의 크기와 위치가 복원됩니다.", "window.menuBarVisibility.default": "메뉴가 전체 화면 모드에서만 숨겨집니다.", "window.menuBarVisibility.visible": "메뉴가 전체 화면 모드에서도 항상 표시됩니다.", "window.menuBarVisibility.toggle": "메뉴가 숨겨져 있지만 키를 통해 메뉴를 표시할 수 있습니다.", "window.menuBarVisibility.hidden": "메뉴가 항상 숨겨집니다.", "menuBarVisibility": "메뉴 모음의 표시 여부를 제어합니다. '설정/해제'를 설정함으로써 메뉴 모음이 숨겨지고 키를 누를 때마다 메뉴 모음이 표시됩니다. 기본값으로, 창이 전체 화면인 경우를 제외하고 메뉴 모음이 표시됩니다.", + "enableMenuBarMnemonics": "사용하도록 설정하는 경우 Alt 키 바로 가기를 통해 주 메뉴를 열 수 있습니다. 니모닉을 사용하지 않도록 설정하면 대신 이러한 Alt 키 바로 가기를 편집기 명령에 바인딩할 수 있습니다.", "autoDetectHighContrast": "사용하도록 설정한 경우 Windows에서 고대비 테마를 사용 중이면 고대비 테마로 자동으로 변경되고 Windows 고대비 테마를 해제하면 어두운 테마로 변경됩니다.", "titleBarStyle": "창 제목 표시줄의 모양을 조정합니다. 변경 내용을 적용하려면 전체 다시 시작해야 합니다.", + "window.nativeTabs": "macOS Sierra 창 탭을 사용하도록 설정합니다. 변경\n 내용을 적용하려면 전체 다시 시작해야 하고, 기본 탭에서\n 사용자 지정 제목 표시줄 스타일(구성된 경우)을 비활성화합니다.", "windowConfigurationTitle": "창", "zenModeConfigurationTitle": "Zen 모드", "zenMode.fullScreen": "Zen 모드를 켜면 워크벤치도 전체 화면 모드로 전환되는지 여부를 제어합니다.", "zenMode.hideTabs": "Zen 모드를 켜면 워크벤치 탭도 숨길지를 제어합니다.", "zenMode.hideStatusBar": "Zen 모드를 켜면 워크벤치 하단에서 상태 표시줄도 숨길지를 제어합니다.", - "zenMode.restore": "창이 Zen 모드에서 종료된 경우 Zen 모드로 복원할지 제어합니다." + "zenMode.hideActivityBar": "Zen 모드를 켜면 워크벤치의 왼쪽에 있는 작업 막대도 숨길지\n 여부를 제어합니다.", + "zenMode.restore": "창이 Zen 모드에서 종료된 경우 Zen 모드로 복원할지 제어합니다.", + "workspaceConfigurationTitle": "작업 영역", + "files.exclude.boolean": "파일 경로를 일치시킬 GLOB 패턴입니다. 패턴을 사용하거나 사용하지 않도록 설정하려면 true 또는 false로 설정하세요." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/electron-browser/shell.i18n.json b/i18n/kor/src/vs/workbench/electron-browser/shell.i18n.json index 1233e0b9ff8ab..79ac1b1fdaaf9 100644 --- a/i18n/kor/src/vs/workbench/electron-browser/shell.i18n.json +++ b/i18n/kor/src/vs/workbench/electron-browser/shell.i18n.json @@ -4,9 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "runningAsRoot": "Code를 '루트'로 실행하지 않는 것이 좋습니다.", - "prof.message": "프로필을 만들었습니다.", - "prof.detail": "문제를 발생시키고 다음 파일을 수동으로 첨부하세요.\n{0}", - "prof.restartAndFileIssue": "문제 만들기 및 다시 시작", - "prof.restart": "다시 시작" + "runningAsRoot": "Code를 '루트'로 실행하지 않는 것이 좋습니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/electron-browser/window.i18n.json b/i18n/kor/src/vs/workbench/electron-browser/window.i18n.json index 05bb13702947c..a185383bf4c8f 100644 --- a/i18n/kor/src/vs/workbench/electron-browser/window.i18n.json +++ b/i18n/kor/src/vs/workbench/electron-browser/window.i18n.json @@ -11,7 +11,5 @@ "paste": "붙여넣기", "selectAll": "모두 선택", "confirmOpen": "{0}개의 폴더를 여시겠습니까?", - "confirmOpenButton": "열기(&&O)", - "developer": "개발자", - "file": "파일" + "confirmOpenButton": "열기(&&O)" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/kor/src/vs/workbench/electron-browser/workbench.i18n.json new file mode 100644 index 0000000000000..de8d40eec3b44 --- /dev/null +++ b/i18n/kor/src/vs/workbench/electron-browser/workbench.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "developer": "개발자", + "file": "파일" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json b/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json new file mode 100644 index 0000000000000..e7e010529e224 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emergencyConfOn": "이제 `editor.accessibilitySupport` 설정을 'on'으로 변경합니다.", + "openingDocs": "이제 VS Code 접근성 설명서 페이지를 엽니다.", + "introMsg": "VS Code의 접근성 옵션을 사용해 주셔서 감사합니다.", + "status": "상태:", + "changeConfigToOnMac": "화면 읽기 프로그램에서 사용에 영구적으로 최적화되도록 편집기를 구성하려면 지금 Command+E를 누르세요.", + "changeConfigToOnWinLinux": "화면 읽기 프로그램에서 사용에 영구적으로 최적화되도록 편집기를 구성하려면 지금 Command+E를 누르세요.", + "auto_unknown": "편집기는 플랫폼 API를 사용하여 화면 읽기 프로그램이 연결되는 시기를 검색하도록 구성되어 있지만 현재 런타임에서는 이 구성을 지원하지 않습니다.", + "auto_on": "편집기는 화면 읽기 프로그램이 연결되어 있음을 자동으로\n 검색했습니다.", + "auto_off": "편집기는 화면 편집기가 연결되는 시기를 자동으로 검색하도록 구성되어 있지만, 이 구성은 현재 지원되지 않습니다.", + "configuredOn": "편집기는 화면 읽기 프로그램에서 사용에 영구적으로 최적화되도록 편집기를 구성되어 있습니다. `editor.accessibilitySupport` 설정을 편집하여 이 구성을 변경할 수 있습니다.", + "configuredOff": "편집기는 화면 읽기 프로그램에서 사용에 최적화되지 않도록 구성되었습니다.", + "tabFocusModeOnMsg": "현재 편집기에서 키를 누르면 포커스가 다음 포커스 가능한 요소로 이동합니다. {0}을(를) 눌러서 이 동작을 설정/해제합니다.", + "tabFocusModeOnMsgNoKb": "현재 편집기에서 키를 누르면 포커스가 다음 포커스 가능한 요소로 이동합니다. {0} 명령은 현재 키 바인딩으로 트리거할 수 없습니다.", + "tabFocusModeOffMsg": "현재 편집기에서 키를 누르면 탭 문자가 삽입됩니다. {0}을(를) 눌러서 이 동작을 설정/해제합니다.", + "tabFocusModeOffMsgNoKb": "현재 편집기에서 키를 누르면 탭 문자가 삽입됩니다. {0} 명령은 현재 키 바인딩으로 트리거할 수 없습니다.", + "openDocMac": "브라우저 창에 접근성과 관련된 추가 VS Code 정보를 열려면 Command+H를 누르세요.", + "openDocWinLinux": "브라우저 창에 접근성과 관련된 추가 VS Code 정보를 열려면 지금 Control+H를 누르세요.", + "outroMsg": "이 도구 설명을 해제하고 Esc 키 또는 Shift+Esc를 눌러서 편집기로 돌아갈 수 있습니다.", + "ShowAccessibilityHelpAction": "접근성 도움말 표시" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json index c5e4314489b8e..e7e7cdc921dcf 100644 --- a/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "workbench.action.inspectKeyMap": "Developer: Inspect Key Mapppings" + "workbench.action.inspectKeyMap": "개발자: 키 매핑 검사" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json b/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..b945677181eb6 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inspectTMScopes": "개발자: TM 범위 검사", + "inspectTMScopesWidget.loading": "로드 중..." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json b/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json new file mode 100644 index 0000000000000..3ffd41aa3e0a4 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parseErrors": "{0}을(를) 구문 분석하는 동안 오류가 발생했습니다. {1}", + "schema.openBracket": "여는 대괄호 문자 또는 문자열 시퀀스입니다.", + "schema.closeBracket": "닫는 대괄호 문자 또는 문자열 시퀀스입니다.", + "schema.comments": "주석 기호를 정의합니다.", + "schema.blockComments": "블록 주석이 표시되는 방법을 정의합니다.", + "schema.blockComment.begin": "블록 주석을 시작하는 문자 시퀀스입니다.", + "schema.blockComment.end": "블록 주석을 끝내는 문자 시퀀스입니다.", + "schema.lineComment": "줄 주석을 시작하는 문자 시퀀스입니다.", + "schema.brackets": "들여쓰기를 늘리거나 줄이는 대괄호 기호를 정의합니다.", + "schema.autoClosingPairs": "대괄호 쌍을 정의합니다. 여는 대괄호를 입력하면 닫는 대괄호가 자동으로 삽입됩니다.", + "schema.autoClosingPairs.notIn": "자동 쌍을 사용하지 않도록 설정된 범위 목록을 정의합니다.", + "schema.surroundingPairs": "선택한 문자열을 둘러싸는 데 사용할 수 있는 대괄호 쌍을 정의합니다.", + "schema.wordPattern": "해당 언어에 대한 단어 정의입니다.", + "schema.wordPattern.pattern": "단어 일치에 사용하는 RegEXP 패턴입니다.", + "schema.wordPattern.flags": "단어 일치에 사용하는 RegExp 플래그입니다.", + "schema.wordPattern.flags.errorMessage": "`/^([gimuy]+)$/` 패턴과 일치해야 합니다.", + "schema.indentationRules.increaseIndentPattern.errorMessage": "`/^([gimuy]+)$/` 패턴과 일치해야 합니다.", + "schema.indentationRules.decreaseIndentPattern.errorMessage": "`/^([gimuy]+)$/` 패턴과 일치해야 합니다.", + "schema.indentationRules.indentNextLinePattern.errorMessage": "`/^([gimuy]+)$/` 패턴과 일치해야 합니다.", + "schema.indentationRules.unIndentedLinePattern.errorMessage": "`/^([gimuy]+)$/` 패턴과 일치해야 합니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json b/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..b945677181eb6 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inspectTMScopes": "개발자: TM 범위 검사", + "inspectTMScopesWidget.loading": "로드 중..." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json b/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json new file mode 100644 index 0000000000000..4b0a0af7f76de --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "다중 커서 한정자 설정/해제" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index c3b7509d8a4b5..46ca3defb9b7e 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -6,6 +6,7 @@ { "openLaunchJson": "{0} 열기", "launchJsonNeedsConfigurtion": "'launch.json' 구성 또는 수정", + "noFolderDebugConfig": "고급 디버그 구성을 수행하려면 먼저 폴더를 여세요.", "startDebug": "디버깅 시작", "startWithoutDebugging": "디버깅하지 않고 시작", "selectAndStartDebugging": "디버깅 선택 및 시작", @@ -34,6 +35,7 @@ "editConditionalBreakpoint": "중단점 편집...", "setValue": "값 설정", "addWatchExpression": "식 추가", + "editWatchExpression": "식 편집", "addToWatchExpressions": "조사식에 추가", "removeWatchExpression": "식 제거", "removeAllWatchExpressions": "모든 식 제거", diff --git a/i18n/kor/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json new file mode 100644 index 0000000000000..e3166a31b496d --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugToolBarBackground": "디버그 도구 모음 배경색입니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json new file mode 100644 index 0000000000000..f69056da38c92 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileLinkMac": "클릭하여 이동(측면에서 열려면 Cmd 키를 누르고 클릭)", + "fileLink": "클릭하여 이동(측면에서 열려면 Ctrl 키를 누르고 클릭)" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/common/debug.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/common/debug.i18n.json new file mode 100644 index 0000000000000..1fd1591aa39e7 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/debug/common/debug.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "internalConsoleOptions": "내부 디버그 콘솔의 동작을 제어합니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/common/debugModel.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/common/debugModel.i18n.json index 1100a58f7f991..68754cec55dff 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/common/debugModel.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/common/debugModel.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "unknownSource": "알 수 없는 소스", "notAvailable": "사용할 수 없음", - "startDebugFirst": "평가할 디버그 세션을 시작하세요.", - "unknownStack": "알 수 없는 스택 위치" + "startDebugFirst": "평가할 디버그 세션을 시작하세요." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/common/debugSource.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/common/debugSource.i18n.json new file mode 100644 index 0000000000000..6cb5f97282e99 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/debug/common/debugSource.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownSource": "알 수 없는 소스" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json index f4b073b594339..fc577deeed81d 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -15,5 +15,6 @@ "allowBreakpointsEverywhere": "모든 파일에 대한 중단점을 설정할 수 있습니다.", "openExplorerOnEnd": "디버그 세션 끝에 탐색기 뷰를 자동으로 엽니다.", "inlineValues": "디버그하는 동안 편집기에서 변수 값을 인라인으로 표시합니다.", - "hideActionBar": "부동 디버그 작업 모음을 숨길지 여부를 제거합니다." + "hideActionBar": "부동 디버그 작업 모음을 숨길지 여부를 제거합니다.", + "launch": "전역 디버그 시작 구성입니다. 작업 영역에서 공유되는 \n 'launch.json'에 대한 대체로 사용되어야 합니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json new file mode 100644 index 0000000000000..9f3ccc2a869b8 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noFolderDebugConfig": "고급 디버그 구성을 수행하려면 먼저 폴더를 여세요." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index d56a0b492cd06..a864dd07491c9 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -5,8 +5,8 @@ // Do not edit this file. It is machine generated. { "snapshotObj": "이 개체에 대한 기본 값만 표시됩니다.", - "debuggingStarted": "디버그가 시작되었습니다.", "debuggingPaused": "디버그가 일시 중지되었습니다. 이유 {0}, {1} {2}", + "debuggingStarted": "디버그가 시작되었습니다.", "debuggingStopped": "디버그가 중지되었습니다.", "breakpointAdded": "파일 {1}, 줄 {0}에 중단점이 추가되었습니다.", "breakpointRemoved": "파일 {1}, 줄 {0}에서 중단점이 제거되었습니다.", diff --git a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json index 889e2264a0182..0477024ab5d44 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json @@ -6,5 +6,6 @@ { "copyValue": "값 복사", "copy": "복사", + "copyAll": "모두 복사", "copyStackTrace": "호출 스택 복사" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json index a5beb6f773c4d..1d1055d269125 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "replAriaLabel": "읽기 평가 인쇄 루프 패널", "actions.repl.historyPrevious": "기록 이전", "actions.repl.historyNext": "기록 다음", "actions.repl.acceptInput": "REPL 입력 적용" diff --git a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json index 99f161cebd9bc..9c417b8c7dd35 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json @@ -5,6 +5,8 @@ // Do not edit this file. It is machine generated. { "stateCapture": "개체 상태는 첫 번재 평가에서 캡처됩니다.", - "fileLinkMac": "클릭하여 이동(측면에서 열려면 Cmd 키를 누르고 클릭)", - "fileLink": "클릭하여 이동(측면에서 열려면 Ctrl 키를 누르고 클릭)" + "replVariableAriaLabel": "{0} 변수에 {1} 값이 있습니다. 읽기 평가 인쇄 루프, 디버그", + "replExpressionAriaLabel": "{0} 식에 {1} 값이 있습니다. 읽기 평가 인쇄 루프, 디버그", + "replValueOutputAriaLabel": "{0}, 읽기 평가 인쇄 루프, 디버그", + "replKeyValueOutputAriaLabel": "출력 변수 {0}에 {1} 값이 있습니다. 읽기 평가 인쇄 루프, 디버그" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json index fa9a8cbb690ab..6de8809b45e61 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "statusBarDebuggingBackground": "프로그램이 디버그될 때의 상태 표시줄 배경색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다." + "statusBarDebuggingBackground": "프로그램이 디버그될 때의 상태 표시줄 배경색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", + "statusBarDebuggingForeground": "프로그램이 디버그될 때의 상태 표시줄 전경색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index cdf01baf557a1..6be8b2345dfb0 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,12 +7,12 @@ "debugAdapterBinNotFound": "디버그 어댑터 실행 파일 '{0}'이(가) 없습니다.", "debugAdapterCannotDetermineExecutable": "디버그 어댑터 '{0}'에 대한 실행 파일을 확인할 수 없습니다.", "debugType": "구성의 형식입니다.", + "debugTypeNotRecognised": "디버그 형식이 인식되지 않습니다. 해당하는 디버그 확장을 설치하고 사용하도록 설정했는지 확인하세요.", "node2NotSupported": "\"node2\"는 더 이상 지원되지 않습니다. 대신 \"node\"를 사용하고 \"protocol\" 특성을 \"inspector\"로 설정하세요.", "debugName": "구성 이름이며, 구성 시작 드롭다운 메뉴에 표시됩니다.", "debugRequest": "구성 형식을 요청합니다. \"시작\" 또는 \"연결\"일 수 있습니다.", "debugServer": "디버그 확장 배포 전용입니다. 포트가 지정된 경우 VS Code에서는 서버 모드로 실행하는 디버그 어댑터에 연결을 시도합니다.", "debugPrelaunchTask": "디버그 세션이 시작되기 이전에 실행할 작업입니다.", - "internalConsoleOptions": "내부 디버그 콘솔의 동작을 제어합니다.", "debugWindowsConfiguration": "Windows 특정 시작 구성 특성입니다.", "debugOSXConfiguration": "OS X 특정 시작 구성 특성입니다.", "debugLinuxConfiguration": "Linux 특정 시작 구성 특성입니다.", diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json new file mode 100644 index 0000000000000..82d5698f1e05b --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "balanceInward": "Emmet: 균형있게(안쪽으로)", + "balanceOutward": "Emmet: 균형있게(바깥쪽으로)" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json new file mode 100644 index 0000000000000..12f82e199c95a --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "previousEditPoint": "Emmet: 이전 편집 점으로 이동", + "nextEditPoint": "Emmet: 다음 편집 점으로 이동" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json new file mode 100644 index 0000000000000..5323baf8c0853 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "evaluateMathExpression": "Emmet: 수학 식 평가" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json new file mode 100644 index 0000000000000..15be0c84d97fe --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "expandAbbreviationAction": "Emmet: 약어 확장" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json new file mode 100644 index 0000000000000..2255914bed5c5 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "incrementNumberByOneTenth": "Emmet: 0.1 증가", + "incrementNumberByOne": "Emmet: 1 증가", + "incrementNumberByTen": "Emmet: 10 증가", + "decrementNumberByOneTenth": "Emmet: 0.1 감소", + "decrementNumberByOne": "Emmet: 1 감소", + "decrementNumberByTen": "Emmet: 10 감소" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json new file mode 100644 index 0000000000000..83a77e69884c9 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "matchingPair": "Emmet: 일치하는 쌍으로 이동" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json new file mode 100644 index 0000000000000..161537077b590 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mergeLines": "Emmet: 줄 병합" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json new file mode 100644 index 0000000000000..9de599d6dbe99 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reflectCSSValue": "Emmet: CSS 값 반영" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json new file mode 100644 index 0000000000000..d694fdaa5d8dd --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeTag": "Emmet: 태그 제거" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json new file mode 100644 index 0000000000000..ce90cf1c917bc --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "selectPreviousItem": "Emmet: 이전 항목 선택", + "selectNextItem": "Emmet: 다음 항목 선택" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json new file mode 100644 index 0000000000000..d700fca47b36c --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "splitJoinTag": "Emmet: 태그 분할/조인" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json new file mode 100644 index 0000000000000..47d9fb34230a5 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleComment": "Emmet: 주석 설정/해제" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json new file mode 100644 index 0000000000000..4cf87429ced3b --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateImageSize": "Emmet: 이미지 크기 업데이트" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json new file mode 100644 index 0000000000000..00369305a070c --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateTag": "Emmet: 태그 업데이트", + "enterTag": "태그 입력", + "tag": "태그" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json new file mode 100644 index 0000000000000..d86b2ec66c025 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wrapWithAbbreviationAction": "Emmet: 약어로 래핑", + "enterAbbreviation": "약어 입력", + "abbreviation": "약어" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json new file mode 100644 index 0000000000000..5b243d9a2c538 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emmetConfigurationTitle": "Emmet", + "triggerExpansionOnTab": "사용하도록 설정하면 emmet 약어는 키를 눌렀을 때 확장됩니다.", + "emmetPreferences": "Emmet의 일부 작업 및 해결 프로그램의 동작을 수정하는 데 사용되는 기본 설정입니다.", + "emmetSyntaxProfiles": "지정된 구문에 대한 프로필을 정의하거나 특정 규칙이 포함된 고유한 프로필을 사용하세요.", + "emmetExclude": "Emmet 약어를 확장하면 안 되는 언어의 배열입니다.", + "emmetExtensionsPath": "Emmet 프로필, 코드 조각 및 기본 설정이 포함된 폴더의 경로", + "useNewEmmet": "모든 emmet 기능에 대해 새 emmet 모듈을 사용해 보세요(이전 단일 emmet 라이브러리를 대체함)." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index d190607cb9453..1d9370c72b065 100644 --- a/i18n/kor/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -4,10 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "vscode.extension.contributes.explorer": "사이드바에 사용자 지정 Tree Explorer 뷰렛을 적용합니다.", - "vscode.extension.contributes.explorer.treeExplorerNodeProviderId": "vscode.workspace.registerTreeExplorerNodeProvider를 통해 등록된 공급자를 식별하는 데 사용된 고유 ID", - "vscode.extension.contributes.explorer.treeLabel": "사용자 지정 Tree Explorer를 렌더링하는 데 사용되는 사람이 읽을 수 있는 문자열", - "vscode.extension.contributes.explorer.icon": "작업 막대에서 뷰렛 아이콘에 대한 경로", + "vscode.extension.contributes.view": "사용자 지정 뷰를 적용합니다.", + "vscode.extension.contributes.view.id": "vscode.workspace.createTreeView를 통해 만든 뷰를 식별하는 데 사용된 고유 ID", + "vscode.extension.contributes.view.label": "뷰를 렌더링하는 데 사용되는 사람이 읽을 수 있는 문자열", + "vscode.extension.contributes.view.icon": "뷰 아이콘의 경로", + "vscode.extension.contributes.views": "사용자 지정 뷰를 적용합니다.", "showViewlet": "{0} 표시", "view": "보기" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index e290352a80156..4600edbe9fd57 100644 --- a/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -24,6 +24,10 @@ "default": "기본값", "debuggers": "디버거({0})", "debugger name": "이름", + "views": "뷰({0})", + "view id": "ID", + "view name": "이름", + "view location": "위치", "themes": "테마({0})", "JSON Validation": "JSON 유효성 검사({0})", "commands": "명령({0})", diff --git a/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index 02f4f0241769c..748fbd6e5f8c0 100644 --- a/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -22,6 +22,8 @@ "disableGloballyAction": "항상", "disableAction": "사용 안 함", "checkForUpdates": "업데이트 확인", + "enableAutoUpdate": "확장 자동 업데이트 사용", + "disableAutoUpdate": "확장 자동 업데이트 사용 안 함", "updateAll": "모든 확장 업데이트", "reloadAction": "다시 로드", "postUpdateTooltip": "업데이트하려면 다시 로드", @@ -44,6 +46,8 @@ "showWorkspaceRecommendedExtensions": "작업 영역 권장 확장 표시", "showRecommendedKeymapExtensions": "권장되는 키 맵 표시", "showRecommendedKeymapExtensionsShort": "키 맵", + "showLanguageExtensions": "언어 확장 표시", + "showLanguageExtensionsShort": "언어 확장", "configureWorkspaceRecommendedExtensions": "권장 확장 구성(작업 영역)", "ConfigureWorkspaceRecommendations.noWorkspace": "권장 사항은 작업 영역 폴더에서만 사용할 수 있습니다.", "OpenExtensionsFile.failed": "'.vscode' 폴더({0}) 내에 'extensions.json' 파일을 만들 수 없습니다.", @@ -51,5 +55,8 @@ "disableAll": "설치된 모든 확장 사용 안 함", "disableAllWorkspace": "이 작업 영역에 대해 설치된 모든 확장 사용 안 함", "enableAll": "설치된 모든 확장 사용", - "enableAllWorkspace": "이 작업 영역에 대해 설치된 모든 확장 사용" + "enableAllWorkspace": "이 작업 영역에 대해 설치된 모든 확장 사용", + "extensionButtonProminentBackground": "눈에 잘 띄는 작업 확장의 단추 배경색입니다(예: 설치 단추).", + "extensionButtonProminentForeground": "눈에 잘 띄는 작업 확장의 단추 전경색입니다(예: 설치 단추).", + "extensionButtonProminentHoverBackground": "눈에 잘 띄는 작업 확장의 단추 배경 커서 올리기 색입니다(예: 설치 단추)." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index afec853c06d77..3e7d2bd101a83 100644 --- a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -4,8 +4,13 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "reallyRecommended2": "이 파일 형식에 대해 '{0}' 확장이 권장됩니다.", "showRecommendations": "권장 사항 표시", "neverShowAgain": "다시 표시 안 함", "close": "닫기", - "workspaceRecommended": "이 작업 영역에 확장 권장 사항이 있습니다." + "workspaceRecommended": "이 작업 영역에 확장 권장 사항이 있습니다.", + "ignoreExtensionRecommendations": "확장 권장 사항을 모두 무시하시겠습니까?", + "ignoreAll": "예, 모두 무시", + "no": "아니요", + "cancel": "취소" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index 467a41c361ac4..ef99dee28ef1e 100644 --- a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -10,5 +10,6 @@ "extensions": "확장", "view": "보기", "extensionsConfigurationTitle": "확장", - "extensionsAutoUpdate": "자동으로 확장 업데이트" + "extensionsAutoUpdate": "자동으로 확장 업데이트", + "extensionsIgnoreRecommendations": "확장 권장 사항 무시" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json new file mode 100644 index 0000000000000..f2a02a3a9f95a --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "disableOtherKeymapsConfirmation": "키 바인딩 간 충돌을 피하기 위해 다른 키 맵({0})을 사용하지 않도록 설정할까요?", + "yes": "예", + "no": "아니요", + "betterMergeDisabled": "Better Merge 확장이 이제 빌드되었습니다. 설치된 확장은 사용하지 않도록 설정되었으며 제거할 수 있습니다.", + "uninstall": "제거", + "later": "나중에" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json index 1a0d8c6413199..b04482fff51af 100644 --- a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json @@ -5,10 +5,10 @@ // Do not edit this file. It is machine generated. { "searchExtensions": "마켓플레이스에서 확장 검색", - "extensions": "확장", "sort by installs": "정렬 기준: 설치 수", "sort by rating": "정렬 기준: 등급", - "no extensions found": "확장을 찾을 수 없습니다.", + "sort by name": "정렬 기준: 이름", "suggestProxyError": "마켓플레이스에서 'ECONNREFUSED'를 반환했습니다. 'http.proxy' 설정을 확인하세요.", + "extensions": "확장", "outdatedExtensions": "{0}개의 만료된 확장" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json new file mode 100644 index 0000000000000..f3fa9bb342a53 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensions": "확장", + "no extensions found": "확장을 찾을 수 없습니다.", + "suggestProxyError": "마켓플레이스에서 'ECONNREFUSED'를 반환했습니다. 'http.proxy' 설정을 확인하세요." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json index abac67d844a3d..9d090fc7e8662 100644 --- a/i18n/kor/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json @@ -13,5 +13,6 @@ "cancel": "취소", "singleDependentError": "확장 '{0}'을(를) 사용하지 않도록 설정할 수 없습니다. 확장 '{1}'이(가) 이 확장에 종속됩니다.", "twoDependentsError": "확장 '{0}'을(를) 사용하지 않도록 설정할 수 없습니다. 확장 '{1}' 및 '{2}'이(가) 이 확장에 종속됩니다.", - "multipleDependentsError": "확장 '{0}'을(를) 사용하지 않도록 설정할 수 없습니다. 확장 '{1}', '{2}' 등이 이 확장에 종속됩니다." + "multipleDependentsError": "확장 '{0}'을(를) 사용하지 않도록 설정할 수 없습니다. 확장 '{1}', '{2}' 등이 이 확장에 종속됩니다.", + "install": "설치" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index aafef40ec7e69..47513e3b03d0c 100644 --- a/i18n/kor/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,7 +16,7 @@ "associations": "파일과 언어의 연결을 구성하세요(예: \"*.extension\": \"html\"). 이러한 구성은 설치된 언어의 기본 연결보다 우선 순위가 높습니다.", "encoding": "파일을 읽고 쓸 때 사용할 기본 문자 집합 인코딩입니다.", "autoGuessEncoding": "사용하도록 설정하는 경우 파일을 열 때 문자 집합 인코딩을 추측합니다.", - "eol": "줄 바꿈 문자의 기본 끝입니다.", + "eol": "줄 바꿈 문자의 기본 끝입니다. LF에는 \\n, CRLF에는 \\r\\n을 사용하세요.", "trimTrailingWhitespace": "사용하도록 설정되면 파일을 저장할 때 후행 공백이 잘립니다.", "insertFinalNewline": "사용하도록 설정되면 저장할 때 파일 끝에 마지막 줄바꿈을 삽입합니다.", "files.autoSave.off": "더티 파일이 자동으로 저장되지 않습니다.", @@ -25,10 +25,8 @@ "files.autoSave.onWindowChange": "창이 포커스를 잃으면 더티 파일이 자동으로 저장됩니다.", "autoSave": "더티 파일 자동 저장을 제어합니다. 허용되는 값은 '{0}', '{1}', '{2}'(편집기가 포커스를 잃음), '{3}'(창이 포커스를 잃음)입니다. '{4}'(으)로 설정하는 경우 'files.autoSaveDelay'에서 지연을 구성할 수 있습니다.", "autoSaveDelay": "더티 파일을 자동으로 저장할 때까지의 지연(밀리초)을 제어합니다. 'files.autoSave'를 '{0}'(으)로 설정한 경우에만 적용됩니다.", - "watcherExclude": "파일 감시에서 제외할 파일 경로의 GLOB 패턴을 구성하세요. 이 설정을 변경하려면 다시 시작해야 합니다. 시작 시 Code에서 CPU 시간을 많이 차지하면 대용량 폴더를 제외하여 초기 로드를 줄일 수 있습니다.", "hotExit.off": "핫 종료를 사용하지 않습니다.", "hotExit.onExit": "핫 종료는 응용 프로그램을 닫을 때 트리거됩니다. 즉 Windows/Linux에서 마지막 창을 닫을 때나 workbench.action.quit 명령이 트리거될 때(명령 팔레트, 키 바인딩, 메뉴)입니다. 다음 실행 시 백업을 포함한 모든 창이 복원됩니다.", - "hotExit.onExitAndWindowClose": "핫 종료는 응용 프로그램을 닫을 때 트리거됩니다. 즉 Windows/Linux에서 마지막 창을 닫을 때나 workbench.action.quit 명령이 트리거될 때(명령 팔레트, 키 바인딩, 메뉴), 또한 마지막 창인지 여부에 상관없이 폴더가 열린 모든 창의 경우입니다. 열린 폴더가 없는 모든 창은 다음 실행 시 복원됩니다. 종료되기 전에 폴더 창을 복원하려면 \"window.reopenFolders\"를 \"all\"로 설정합니다.", "hotExit": "저장하지 않은 파일을 세션 간에 기억하여, 편집기를 종료할 때 저장할지 묻는 메시지를 건너뛸지 여부를 제어합니다.", "defaultLanguage": "새 파일에 할당되는 기본 언어 모드입니다.", "editorConfigurationTitle": "편집기", diff --git a/i18n/kor/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json b/i18n/kor/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json index 3aeececa62a3b..643334c6abac9 100644 --- a/i18n/kor/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "explorerSection": "파일 탐색기 섹션", "noWorkspace": "열린 폴더 없음", + "explorerSection": "파일 탐색기 섹션", "noWorkspaceHelp": "아직 폴더를 열지 않았습니다.", "openFolder": "폴더 열기" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json b/i18n/kor/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json index a820c30095af7..cb51b565b3155 100644 --- a/i18n/kor/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "openEditosrSection": "열려 있는 편집기 섹션", "openEditors": "열려 있는 편집기", + "openEditosrSection": "열려 있는 편집기 섹션", "treeAriaLabel": "열린 편집기: 활성 파일 목록", "dirtyCounter": "{0}이(가) 저장되지 않음" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index 4b931297269d4..3eaa6c8350957 100644 --- a/i18n/kor/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -5,5 +5,11 @@ // Do not edit this file. It is machine generated. { "slow": "느린 시작 감지됨", - "slow.detail": "방금 느리게 시작되었습니다. 프로파일링을 사용하도록 설정한 상태로 '{0}'을(를) 다시 시작하세요. 프로필을 공유해 주시면 다시 빠르게 시작될 수 있도록 최선을 다하겠습니다." + "slow.detail": "방금 느리게 시작되었습니다. 프로파일링을 사용하도록 설정한 상태로 '{0}'을(를) 다시 시작하세요. 프로필을 공유해 주시면 다시 빠르게 시작될 수 있도록 최선을 다하겠습니다.", + "prof.message": "프로필을 만들었습니다.", + "prof.detail": "문제를 발생시키고 다음 파일을 수동으로 첨부하세요.\n{0}", + "prof.restartAndFileIssue": "문제 만들기 및 다시 시작", + "prof.restart": "다시 시작", + "prof.thanks": "도움을 주셔서 감사합니다.", + "prof.detail.restart": "계속 '{0}'을(를) 사용하려면 마지막으로 다시 시작해야 합니다. 기여해 주셔서 다시 한번 감사드립니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json index f2497f183b56c..f6f3684850fb6 100644 --- a/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -7,6 +7,7 @@ "keybindingsInputName": "바로 가기 키(&&K)", "SearchKeybindings.AriaLabel": "키 바인딩 검색", "SearchKeybindings.Placeholder": "키 바인딩 검색", + "sortByPrecedene": "우선 순위별 정렬", "header-message": "고급 사용자 지정의 경우 다음 파일을 열고 편집하세요.", "keybindings-file-name": "keybindings.json", "keybindingsLabel": "키 바인딩", @@ -14,6 +15,7 @@ "addLabel": "키 바인딩 추가", "removeLabel": "키 바인딩 제거", "resetLabel": "키 바인딩 다시 설정", + "showConflictsLabel": "충돌 표시", "copyLabel": "복사", "error": "키 바인딩을 편집하는 동안 오류 '{0}'이(가) 발생했습니다. 'keybindings.json' 파일을 열고 확인하세요.", "command": "명령", diff --git a/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index d217d2b183323..aa4e75fa0bcbe 100644 --- a/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -5,7 +5,7 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.start": "키 바인딩 정의", - "defineKeybinding.kbLayoutInfoMessage": "현재 자판 배열의 경우 다음을 누르세요.", "defineKeybinding.kbLayoutErrorMessage": "현재 자판 배열에서는 이 키 조합을 생성할 수 없습니다.", - "DefineKeybindingAction": "키 바인딩 정의" + "defineKeybinding.kbLayoutLocalAndUSMessage": "현재 자판 배열의 경우 **{0}**입니다(**{1}**: 미국 표준).", + "defineKeybinding.kbLayoutLocalMessage": "현재 자판 배열의 경우 **{0}**입니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index d8fa05234c464..474bdeb6edf46 100644 --- a/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -6,6 +6,7 @@ { "openGlobalSettings": "사용자 설정 열기", "openGlobalKeybindings": "바로 가기 키 열기", + "openGlobalKeybindingsFile": "바로 가기 키 파일 열기", "openWorkspaceSettings": "작업 영역 설정 열기", "configureLanguageBasedSettings": "언어별 설정 구성...", "languageDescriptionConfigured": "({0})", diff --git a/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index 353737131fc4a..fe7bfe16616d4 100644 --- a/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "errorInvalidConfiguration": "설정에 쓸 수 없습니다. 파일에서 오류/경고를 해결하고 다시 시도하세요.", + "defaultSettingsTitle": "기본 설정", "editTtile": "편집", "replaceDefaultValue": "설정에서 바꾸기", "copyDefaultValue": "설정에 복사", diff --git a/i18n/kor/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json b/i18n/kor/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json index d4e87482e3fa1..1387ce7c502ba 100644 --- a/i18n/kor/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json @@ -6,5 +6,6 @@ { "default": "기본값", "user": "사용자", + "meta": "메타", "option": "옵션" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json b/i18n/kor/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json index dec2d486f02f9..d410308122c67 100644 --- a/i18n/kor/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "showTriggerActions": "모든 명령 표시", + "showCommands.label": "명령 팔레트...", "entryAriaLabelWithKey": "{0}, {1}, 명령", "entryAriaLabel": "{0}, 명령", "canNotRun": "'{0}' 명령은 여기에서 실행할 수 없습니다.", diff --git a/i18n/kor/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json new file mode 100644 index 0000000000000..4fe2fc0bfe27e --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "relaunchSettingMessage": "설정이 변경되어 다시 시작해야만 적용됩니다.", + "relaunchSettingDetail": "[다시 시작] 단추를 눌러 {0}을(를) 다시 시작하고 설정을 사용하도록 설정하세요.", + "restart": "다시 시작", + "reload": "다시 로드" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/kor/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json new file mode 100644 index 0000000000000..984555805217c --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGutterModifiedBackground": "수정된 줄의 편집기 여백 배경색입니다.", + "editorGutterAddedBackground": "추가된 줄의 편집기 여백 배경색입니다.", + "editorGutterDeletedBackground": "삭제된 줄의 편집기 여백 배경색입니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json index 4b848835e9175..791c967182aa4 100644 --- a/i18n/kor/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "toggleGitViewlet": "Git 표시", + "installAdditionalSCMProviders": "추가 SCM 공급자 설치...", "source control": "소스 제어", "toggleSCMViewlet": "SCM 표시", "view": "보기" diff --git a/i18n/kor/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json b/i18n/kor/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json index 550a8745b89fa..2910b5c28ea46 100644 --- a/i18n/kor/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "installAdditionalSCMProviders": "추가 SCM 공급자 설치...", "switch provider": "SCM 공급자 전환..." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/kor/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json index 50e19120bf9fd..4d21f25e14630 100644 --- a/i18n/kor/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -7,6 +7,6 @@ "searchMatches": "일치하는 {0}개 항목을 찾음", "searchMatch": "일치하는 {0}개 항목을 찾음", "fileMatchAriaLabel": "{2} 폴더의 {1} 파일에 {0}개의 일치 항목이 있음, 검색 결과", - "replacePreviewResultAria": "미리 보기 바꾸기 결과, {0}", - "searchResultAria": "{0}, 검색 결과" + "replacePreviewResultAria": "{3} 텍스트가 있는 줄의 열 위치 {2}에서 용어 {0}을(를) {1}(으)로 바꾸기", + "searchResultAria": "{2} 텍스트가 있는 줄의 열 위치 {1}에서 {0} 용어 찾기" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json b/i18n/kor/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json index 65bffc5144317..c9ce2ccb5f32a 100644 --- a/i18n/kor/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json @@ -9,5 +9,6 @@ "vscode.extension.contributes.snippets-path": "코드 조각 파일의 경로입니다. 이 경로는 확장 폴더의 상대 경로이며 일반적으로 './snippets/'로 시작합니다.", "invalid.language": "`contributes.{0}.language`에 알 수 없는 언어가 있습니다. 제공된 값: {1}", "invalid.path.0": "`contributes.{0}.path`에 문자열이 필요합니다. 제공된 값: {1}", - "invalid.path.1": "확장 폴더({2})에 포함할 `contributes.{0}.path`({1})가 필요합니다. 확장이 이식 불가능해질 수 있습니다." + "invalid.path.1": "확장 폴더({2})에 포함할 `contributes.{0}.path`({1})가 필요합니다. 확장이 이식 불가능해질 수 있습니다.", + "badVariableUse": "\"{0}\"-snippet은 snippet-variables 및 snippet-placeholders와 혼동하기 쉽습니다. 자세한 내용은\n https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax를 참조하세요." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json index 8705a3ff40b1b..c2a063232029b 100644 --- a/i18n/kor/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json @@ -11,6 +11,6 @@ "snippetSchema.json.default": "빈 코드 조각", "snippetSchema.json": "사용자 코드 조각 구성", "snippetSchema.json.prefix": "IntelliSense에서 코드 조각을 선택할 때 사용할 접두사입니다.", - "snippetSchema.json.body": "코드 조각 콘텐츠입니다. '${id}', '${id:label}', '${1:label}'을 변수에 사용하고 '$0', '$1'을 커서 위치에 사용하세요.", + "snippetSchema.json.body": "코드 조각 콘텐츠입니다. '$1', '${1:defaultText}'를 사용하여 커서 위치를 정의하고, '$0'을 최종 커서 위치에 사용하세요. '${varName}' 및 '${varName:defaultText}'에 변수 값을 삽입하세요(예: '$TM_FILENAME 파일입니다').", "snippetSchema.json.description": "코드 조각 설명입니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json new file mode 100644 index 0000000000000..4685b4310b01e --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "helpUs": "{0}에 대한 지원을 개선하는 데 도움을 주세요.", + "takeShortSurvey": "간단한 설문 조사 참여", + "remindLater": "나중에 알림", + "neverAgain": "다시 표시 안 함" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..9cc54c77a3c23 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "간단한 피드백 설문 조사에 참여하시겠어요?", + "takeSurvey": "설문 조사 참여", + "remindLater": "나중에 알림", + "neverAgain": "다시 표시 안 함" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json new file mode 100644 index 0000000000000..1f6208b0c919d --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "일치하는 작업 없음" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json index 61ec0a4e8b140..0417fe610ad27 100644 --- a/i18n/kor/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, 작업", "tasksAriaLabel": "다시 시작할 작업 이름 입력", "noTasksMatching": "일치하는 작업 없음", "noTasksFound": "다시 시작할 작업이 없습니다." diff --git a/i18n/kor/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json index 63feb95524e94..e3f31c9106dc6 100644 --- a/i18n/kor/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, 작업", "tasksAriaLabel": "실행할 작업의 이름 입력", "noTasksMatching": "일치하는 작업 없음", "noTasksFound": "작업을 찾을 수 없음" diff --git a/i18n/kor/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json new file mode 100644 index 0000000000000..1f6208b0c919d --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "일치하는 작업 없음" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index cf0d425f7fd7e..aa72080ed625c 100644 --- a/i18n/kor/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -5,13 +5,13 @@ // Do not edit this file. It is machine generated. { "ConfigurationParser.invalidCWD": "경고: options.cwd는 string 형식이어야 합니다. {0} 값을 무시합니다.\n", - "ConfigurationParser.noShell": "경고: 셸 구성은 작업을 터미널에서 실행 중일 때에만 지원됩니다.", "ConfigurationParser.noargs": "오류: 명령 인수는 문자열의 배열이어야 합니다. 제공된 값:\n{0}", + "ConfigurationParser.noShell": "경고: 셸 구성은 작업을 터미널에서 실행 중일 때에만 지원됩니다.", "ConfigurationParser.noName": "오류: 선언 범위 내의 문제 선택기는 이름이 있어야 합니다.\n{0}\n", "ConfigurationParser.unknownMatcherKind": "경고: 정의된 문제 선택기를 알 수 없습니다. 지원되는 형식은 string | ProblemMatcher |(string | ProblemMatcher)[]입니다.\n{0}\n", "ConfigurationParser.invalidVaraibleReference": "오류: 잘못된 problemMatcher 참조: {0}\n", "ConfigurationParser.noTaskName": "오류: 작업에서 taskName 속성을 제공해야 합니다. 이 작업은 무시됩니다.\n{0}\n", "taskConfiguration.shellArgs": "경고: 작업 '{0}'은(는) 셸 명령이며, 명령 이름이나 인수 중 하나에 이스케이프되지 않은 공백이 있습니다. 명령줄 인용을 올바르게 하려면 인수를 명령으로 병합하세요.", - "taskConfiguration.noCommandOrDependsOn": "오류: 작업 '{0}'에서 명령이나 dependsOn 속성을 지정하지 않습니다. 이 작업은 무시됩니다. 해당 작업의 정의는:\n{1}입니다.", + "taskConfiguration.noCommandOrDependsOn": "오류: 작업 '{0}'에서 명령이나 dependsOn 속성을 지정하지 않습니다. 이 작업은 무시됩니다. 해당 작업의 정의는 {1}입니다.", "taskConfiguration.noCommand": "오류: 작업 '{0}'에서 명령을 정의하지 않습니다. 이 작업은 무시됩니다. 해당 작업의 정의는\n{1}입니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json index e62090acec875..6f1a899ba93fc 100644 --- a/i18n/kor/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "tsc.config": "TypeScript 프로젝트를 컴파일합니다.", - "tsc.watch": "TypeScript 프로젝트를 감시 모드에서 컴파일합니다.", "dotnetCore": ".NET Core 빌드 명령을 실행합니다.", "msbuild": "빌드 대상을 실행합니다.", "externalCommand": "임의의 외부 명령을 실행하는 예", diff --git a/i18n/kor/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json index c0f4066588006..f07448af1127f 100644 --- a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json @@ -7,6 +7,7 @@ "JsonSchema.options": "추가 명령 옵션", "JsonSchema.options.cwd": "실행된 프로그램 또는 스크립트의 현재 작업 디렉터리입니다. 생략된 경우 Code의 현재 작업 영역 루트가 사용됩니다.", "JsonSchema.options.env": "실행할 프로그램 또는 셸의 환경입니다. 생략하면 부모 프로세스의 환경이 사용됩니다.", + "JsonSchema.shellConfiguration": "사용할 셸을 구성합니다.", "JsonSchema.shell.executable": "사용할 셸입니다.", "JsonSchema.shell.args": "셸 인수입니다.", "JsonSchema.command": "실행할 명령이며, 외부 프로그램 또는 셸 명령입니다.", diff --git a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json index 18e49dd95a0a0..06d667c9b1306 100644 --- a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json @@ -5,6 +5,8 @@ // Do not edit this file. It is machine generated. { "JsonSchema.version": "구성의 버전 번호입니다.", + "JsonSchema._runner": "러너가 더 이상 사용되지 않습니다. 공식 러너 속성을 사용하세요.", + "JsonSchema.runner": "작업이 프로세스로 실행되는지 여부와 출력이 출력 창이나 터미널 내부 중 어디에 표시되는지를 정의합니다.", "JsonSchema.windows": "Windows 특정 명령 구성", "JsonSchema.mac": "Mac 특정 명령 구성", "JsonSchema.linux": "Linux 특정 명령 구성", diff --git a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json index 9ae6b6172e576..2aaea50f63903 100644 --- a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -4,11 +4,16 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "JsonSchema.shell": "명령이 셸 명령인지 외부 프로그램인지 여부를 지정합니다. 생략하면 기본값 false가 사용됩니다.", + "JsonSchema.tasks.dependsOn.string": "이 작업이 종속된 또 다른 작업입니다.", + "JsonSchema.tasks.dependsOn.array": "이 작업이 종속된 다른 여러 작업입니다.", + "JsonSchema.tasks.type": "작업이 프로세스로 실행되는지 또는 셸 내의 명령으로 실행되는지를 제어합니다. 기본값은 프로세스입니다.", "JsonSchema.version": "구성의 버전 번호입니다.", + "JsonSchema.tasks.taskName": "작업 이름", + "JsonSchema.tasks.background": "실행한 작업을 활성 상태로 유지하고 배경에서 실행하는지 여부입니다.", + "JsonSchema.tasks.promptOnClose": "실행 중인 작업이 있는 VS Code가 닫힐 때 사용자에게 메시지를 표시할지 여부입니다.", + "JsonSchema.tasks.matchers": "사용할 문제 선택기입니다. 문자열, 문제 선택기 정의 또는 문자열 및 문제 선택기 배열일 수 있습니다.", "JsonSchema.windows": "Windows 특정 명령 구성", "JsonSchema.mac": "Mac 특정 명령 구성", - "JsonSchema.linux": "Linux 특정 명령 구성", - "JsonSchema.shell": "명령이 셸 명령인지 외부 프로그램인지 여부를 지정합니다. 생략하면 기본값 false가 사용됩니다.", - "JsonSchema.tasks.dependsOn.string": "이 작업이 종속된 또 다른 작업입니다.", - "JsonSchema.tasks.dependsOn.array": "이 작업이 종속된 다른 여러 작업입니다." + "JsonSchema.linux": "Linux 특정 명령 구성" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 660da9b820c46..6d982180558da 100644 --- a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -9,6 +9,7 @@ "ConfigureTaskRunnerAction.quickPick.template": "Task Runner 선택", "ConfigureTaskRunnerAction.autoDetecting": "{0} 작업을 자동 검색 중", "ConfigureTaskRunnerAction.autoDetect": "작업 시스템을 자동으로 감지하지 못했습니다. 기본 템플릿을 사용하는 중입니다. 자세한 내용은 작업 출력을 참조하세요.", + "ConfigureTaskRunnerAction.autoDetectError": "작업 시스템을 자동으로 감지하는 중 오류가 발생했습니다. 자세한 내용은 작업 출력을 참조하세요.", "ConfigureTaskRunnerAction.failed": "'.vscode' 폴더 내에 'tasks.json' 파일을 만들 수 없습니다. 자세한 내용은 작업 출력을 참조하세요.", "ConfigureTaskRunnerAction.label": "Task Runner 구성", "ConfigureBuildTaskAction.label": "빌드 작업 구성", @@ -17,11 +18,12 @@ "problems": "문제", "manyMarkers": "99+", "tasks": "작업", - "TaskSystem.noHotSwap": "작업 실행 엔진을 변경하면 VS Code를 다시 시작해야 합니다. 변경이 무시됩니다.", - "TaskService.noBuildTask": "정의된 빌드 작업이 없습니다. tasks.json 파일에서 작업을 'isBuildCommand'로 표시하세요.", - "TaskService.noTestTask": "정의된 테스트 작업이 없습니다. tasks.json 파일에서 작업을 'isTestCommand'로 표시하세요.", + "TaskSystem.noHotSwap": "작업 실행 엔진을 변경하려면 VS Code를 다시 시작해야 합니다. 변경이 무시됩니다.", + "TaskService.noBuildTask1": "정의된 빌드 작업이 없습니다. tasks.json 파일에서 작업을 'isBuildCommand'로 표시하세요.", + "TaskService.noTestTask1": "정의된 테스트 작업이 없습니다. tasks.json 파일에서 작업을 'isTestCommand'로 표시하세요.", "TaskServer.noTask": "실행하도록 요청한 작업 {0}을(를) 찾을 수 없습니다.", - "TaskSystem.activeSame": "작업이 이미 활성 상태이며 감시 모드입니다. 작업을 종료하려면 `F1 > 작업 종료`를 사용하세요.", + "customizeParseErrors": "현재 작성 구성에 오류가 있습니다. 작업을 사용자 지정하기 전에 오류를 수정하세요.\n", + "moreThanOneBuildTask": "tasks.json에 여러 빌드 작업이 정의되어 있습니다. 첫 번째 작업을 실행합니다.\n", "TaskSystem.active": "이미 실행 중인 작업이 있습니다. 다른 작업을 실행하려면 먼저 이 작업을 종료하세요.", "TaskSystem.restartFailed": "{0} 작업을 종료하고 다시 시작하지 못했습니다.", "TaskSystem.configurationErrors": "오류: 제공한 작업 구성에 유효성 검사 오류가 있으며 사용할 수 없습니다. 먼저 오류를 수정하세요.", @@ -30,17 +32,14 @@ "TaskSystem.terminateTask": "작업 종료(&&T)", "TaskSystem.noProcess": "시작된 작업이 더 이상 존재하지 않습니다. 작업에서 생성된, VS Code를 끝내는 백그라운드 프로세스가 분리된 프로세스가 될 수 있습니다. 이를 방지하려면 wait 플래그를 사용하여 마지막 백그라운드 프로세스를 시작하세요.", "TaskSystem.exitAnyways": "끝내기(&&E)", - "TerminateAction.label": "실행 중인 작업 종료", + "TerminateAction.label": "작업 종료", "TaskSystem.unknownError": "작업을 실행하는 동안 오류가 발생했습니다. 자세한 내용은 작업 로그를 참조하세요.", "TaskService.noWorkspace": "작업은 작업 영역 폴더에서만 사용할 수 있습니다.", "TerminateAction.noProcess": "시작된 프로세스가 더 이상 존재하지 않습니다. 작업에서 생성된, VS Code를 끝내는 백그라운드 작업이 분리된 프로세스가 될 수 있습니다.", "TerminateAction.failed": "실행 중인 작업을 종료하지 못했습니다.", "ShowLogAction.label": "작업 로그 표시", "RunTaskAction.label": "작업 실행", - "RestartTaskAction.label": "작업 다시 시작", "BuildAction.label": "빌드 작업 실행", "TestAction.label": "테스트 작업 실행", - "quickOpen.task": "작업 실행", - "quickOpen.terminateTask": "작업 종료(&&T)", - "quickOpen.restartTask": "작업 다시 시작" + "quickOpen.task": "작업 실행" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index 960fcef74d09f..4c053b9817c39 100644 --- a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -6,5 +6,7 @@ { "TerminalTaskSystem.unknownError": "작업을 실행하는 동안 알 수 없는 오류가 발생했습니다. 자세한 내용은 작업 출력 로그를 참조하세요.", "TerminalTaskSystem.terminalName": "작업 - {0}", - "TerminalTaskSystem": "UNC 드라이브에서 셸 명령을 실행할 수 없습니다." + "reuseTerminal": "터미널이 작업에서 다시 사용됩니다. 닫으려면 아무 키나 누르세요.", + "TerminalTaskSystem": "UNC 드라이브에서 셸 명령을 실행할 수 없습니다.", + "unkownProblemMatcher": "문제 선택기 {0}을(를) 확인할 수 없습니다. 이 선택기는 무시됩니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json index 41639c4c051fe..e222c1b151d6a 100644 --- a/i18n/kor/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json @@ -7,5 +7,6 @@ "TaskRunnerSystem.unknownError": "작업을 실행하는 동안 알 수 없는 오류가 발생했습니다. 자세한 내용은 작업 출력 로그를 참조하세요.", "TaskRunnerSystem.watchingBuildTaskFinished": "\n빌드 감시 작업이 완료되었습니다.", "TaskRunnerSystem.childProcessError": "Failed to launch external program {0} {1}.", - "TaskRunnerSystem.cancelRequested": "\n사용자 요청에 따라 '{0}' 작업이 종료되었습니다." + "TaskRunnerSystem.cancelRequested": "\n사용자 요청에 따라 '{0}' 작업이 종료되었습니다.", + "unkownProblemMatcher": "문제 선택기 {0}을(를) 확인할 수 없습니다. 이 선택기는 무시됩니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json new file mode 100644 index 0000000000000..aa72080ed625c --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ConfigurationParser.invalidCWD": "경고: options.cwd는 string 형식이어야 합니다. {0} 값을 무시합니다.\n", + "ConfigurationParser.noargs": "오류: 명령 인수는 문자열의 배열이어야 합니다. 제공된 값:\n{0}", + "ConfigurationParser.noShell": "경고: 셸 구성은 작업을 터미널에서 실행 중일 때에만 지원됩니다.", + "ConfigurationParser.noName": "오류: 선언 범위 내의 문제 선택기는 이름이 있어야 합니다.\n{0}\n", + "ConfigurationParser.unknownMatcherKind": "경고: 정의된 문제 선택기를 알 수 없습니다. 지원되는 형식은 string | ProblemMatcher |(string | ProblemMatcher)[]입니다.\n{0}\n", + "ConfigurationParser.invalidVaraibleReference": "오류: 잘못된 problemMatcher 참조: {0}\n", + "ConfigurationParser.noTaskName": "오류: 작업에서 taskName 속성을 제공해야 합니다. 이 작업은 무시됩니다.\n{0}\n", + "taskConfiguration.shellArgs": "경고: 작업 '{0}'은(는) 셸 명령이며, 명령 이름이나 인수 중 하나에 이스케이프되지 않은 공백이 있습니다. 명령줄 인용을 올바르게 하려면 인수를 명령으로 병합하세요.", + "taskConfiguration.noCommandOrDependsOn": "오류: 작업 '{0}'에서 명령이나 dependsOn 속성을 지정하지 않습니다. 이 작업은 무시됩니다. 해당 작업의 정의는 {1}입니다.", + "taskConfiguration.noCommand": "오류: 작업 '{0}'에서 명령을 정의하지 않습니다. 이 작업은 무시됩니다. 해당 작업의 정의는\n{1}입니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json index de06552d0766b..b87152b958ead 100644 --- a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -16,6 +16,7 @@ "terminal.integrated.fontLigatures": "터미널에서 글꼴 합자가 사용되는지를 제어합니다.", "terminal.integrated.fontSize": "터미널의 글꼴 크기(픽셀)를 제어합니다.", "terminal.integrated.lineHeight": "터미널의 줄 높이를 제어하며, 이 숫자는 터미널 글꼴 크기를 곱하여 실제 줄 높이(픽셀)를 얻습니다.", + "terminal.integrated.enableBold": "터미널 내에서 굵은 텍스트를 사용하도록 설정할지 여부이며, 터미널 셸의 지원이 필요합니다.", "terminal.integrated.cursorBlinking": "터미널 커서 깜박임 여부를 제어합니다.", "terminal.integrated.cursorStyle": "터미널 커서의 스타일을 제어합니다.", "terminal.integrated.scrollback": "터미널에서 버퍼에 유지하는 최대 줄 수를 제어합니다.", diff --git a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json index 2953f126a31a0..8d5763a792bb3 100644 --- a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -8,6 +8,7 @@ "workbench.action.terminal.kill": "활성 터미널 인스턴스 종료", "workbench.action.terminal.kill.short": "터미널 종료", "workbench.action.terminal.copySelection": "선택 영역 복사", + "workbench.action.terminal.selectAll": "모두 선택", "workbench.action.terminal.new": "새 통합 터미널 만들기", "workbench.action.terminal.new.short": "새 터미널", "workbench.action.terminal.focus": "터미널에 포커스", @@ -26,5 +27,8 @@ "workbench.action.terminal.scrollUp": "위로 스크롤(줄)", "workbench.action.terminal.scrollUpPage": "위로 스크롤(페이지)", "workbench.action.terminal.scrollToTop": "맨 위로 스크롤", - "workbench.action.terminal.clear": "지우기" + "workbench.action.terminal.clear": "지우기", + "workbench.action.terminal.allowWorkspaceShell": "작업 영역 셸 구성 허용", + "workbench.action.terminal.disallowWorkspaceShell": "작업 영역 셸 구성 허용 안 함", + "workbench.action.terminal.rename": "이름 바꾸기" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json index 0b29da8897d4b..5923a5bf7d5ca 100644 --- a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.background": "터미널의 배경색입니다. 이 설정을 사용하면 터미널\n 색을 패널과 다르게 지정할 수 있습니다.", + "terminal.foreground": "터미널의 전경색입니다.", "terminal.ansiColor": "터미널의 '{0}' ANSI 색입니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json index 1ed48f98d5802..85f72d33d656a 100644 --- a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.integrated.allowWorkspaceShell": "터미널에서 {0}(작업 영역 설정으로 정의됨)이(가) 시작되도록\n 허용할까요?", "allow": "Allow", "disallow": "Disallow" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json new file mode 100644 index 0000000000000..c45550055e9c4 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "찾기", + "placeholder.find": "찾기", + "label.previousMatchButton": "이전 검색 결과", + "label.nextMatchButton": "다음 검색 결과", + "label.closeButton": "닫기" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json index a35b2cdc8f1a9..7ae3f4f9275ac 100644 --- a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "terminal.integrated.copySelection.noSelection": "터미널에 포커스가 없는 경우 터미널 선택을 복사할 수 없습니다.", "terminal.integrated.exitedWithCode": "터미널 프로세스가 종료 코드 {0}(으)로 종료되었습니다.", "terminal.integrated.waitOnExit": "터미널을 닫으려면 아무 키나 누르세요.", "terminal.integrated.launchFailed": "터미널 프로세스 명령 `{0}{1}`이(가) 시작하지 못했습니다(종료 코드: {2})." diff --git a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json index ebdf7276fe023..f5eb52e9f448f 100644 --- a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminalLinkHandler.followLinkAlt": "Alt 키를 누르고 클릭하여 링크로 이동", "terminalLinkHandler.followLinkCmd": "Cmd 키를 누르고 클릭하여 링크로 이동", "terminalLinkHandler.followLinkCtrl": "Ctrl 키를 누르고 클릭하여 링크로 이동" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json index ebb2de48269ea..9fe74c319a1d0 100644 --- a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json @@ -7,5 +7,6 @@ "copy": "복사", "createNewTerminal": "새 터미널", "paste": "붙여넣기", + "selectAll": "모두 선택", "clear": "지우기" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 37af7b63cbfc3..b3a4598456f78 100644 --- a/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,13 +6,14 @@ { "selectTheme.label": "색 테마", "installColorThemes": "추가 색 테마 설치...", - "problemChangingTheme": "테마를 설정하는 동안 문제 발생: {0}", - "themes.selectTheme": "색 테마 선택", + "themes.selectTheme": "색 테마 선택(미리 보려면 위로/아래로 키 사용)", "selectIconTheme.label": "파일 아이콘 테마", "installIconThemes": "추가 파일 아이콘 테마 설치...", "noIconThemeLabel": "없음", "noIconThemeDesc": "파일 아이콘 사용 안 함", "problemChangingIconTheme": "아이콘 테마를 설정하는 동안 문제 발생: {0}", "themes.selectIconTheme": "파일 아이콘 테마 선택", - "preferences": "기본 설정" + "generateColorTheme.label": "현재 설정에서 색 테마 생성", + "preferences": "기본 설정", + "developer": "개발자" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/update/electron-browser/update.i18n.json b/i18n/kor/src/vs/workbench/parts/update/electron-browser/update.i18n.json index 07b9da83abe77..8bf33b795bd2d 100644 --- a/i18n/kor/src/vs/workbench/parts/update/electron-browser/update.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/update/electron-browser/update.i18n.json @@ -13,7 +13,19 @@ "read the release notes": "{0} v{1}을(를) 시작합니다. 릴리스 정보를 확인하시겠습니까?", "licenseChanged": "사용 조건이 변경되었습니다. 자세히 읽어보세요.", "license": "라이선스 읽기", - "updateAvailable": "다시 시작하면 {0}이(가) 업데이트됩니다.", + "updateIsReady": "새 업데이트를 사용할 수 있습니다.", "thereIsUpdateAvailable": "사용 가능한 업데이트가 있습니다.", - "noUpdatesAvailable": "현재 사용 가능한 업데이트가 없습니다." + "updateAvailable": "다시 시작하면 {0}이(가) 업데이트됩니다.", + "noUpdatesAvailable": "현재 사용 가능한 업데이트가 없습니다.", + "commandPalette": "명령 팔레트...", + "settings": "설정", + "keyboardShortcuts": "바로 가기 키(&&K)", + "selectTheme.label": "색 테마", + "themes.selectIconTheme.label": "파일 아이콘 테마", + "not available": "업데이트를 사용할 수 없음", + "checkingForUpdates": "업데이트를 확인하는 중...", + "DownloadUpdate": "사용 가능한 업데이트 다운로드", + "DownloadingUpdate": "업데이트를 다운로드하는 중...", + "InstallingUpdate": "업데이트를 설치하는 중...", + "checkForUpdates": "업데이트 확인..." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/views/browser/views.i18n.json b/i18n/kor/src/vs/workbench/parts/views/browser/views.i18n.json new file mode 100644 index 0000000000000..8d20ba83c9aa5 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/views/browser/views.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewToolbarAriaLabel": "{0} 동작" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json b/i18n/kor/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json new file mode 100644 index 0000000000000..cb664992fc151 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "뷰는 배열이어야 합니다.", + "requirestring": "속성 `{0}`은(는) 필수이며 `string` 형식이어야 합니다.", + "optstring": "속성 `{0}`은(는) 생략할 수 있으며 `string` 형식이어야 합니다.", + "vscode.extension.contributes.view.id": "뷰의 식별자입니다. 'vscode.window.registerTreeDataProviderForView` API를 통해 데이터 공급자를 등록하는 데 사용합니다. `onView:${id}` 이벤트를 `activationEvents`에 등록하여 확장 활성화를 트리거하는 데에도 사용합니다.", + "vscode.extension.contributes.view.name": "사용자가 읽을 수 있는 뷰 이름입니다. 표시됩니다.", + "vscode.extension.contributes.views": "뷰를 에디터에 적용합니다.", + "views.explorer": "탐색기 뷰", + "locationId.invalid": "`{0}`은(는) 유효한 뷰 위치가 아닙니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json b/i18n/kor/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json index 4f4af4a0d1515..0cc190cfb7661 100644 --- a/i18n/kor/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json @@ -14,10 +14,6 @@ "watermark.toggleTerminal": "터미널 설정/해제", "watermark.findInFiles": "파일에서 찾기", "watermark.startDebugging": "디버깅 시작", - "watermark.selectTheme": "테마 변경", - "watermark.selectKeymap": "키맵 변경", - "watermark.keybindingsReference": "키보드 참조", - "watermark.openGlobalKeybindings": "바로 가기 키", "watermark.unboundCommand": "바인딩 안 됨", "workbenchConfigurationTitle": "워크벤치", "tips.enabled": "사용하도록 설정되면 편집기가 열리지 않았을 때 워터마크 팁이 표시됩니다." diff --git a/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index c7b22dc29a41a..abd099ba950dd 100644 --- a/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -11,33 +11,33 @@ "welcomePage.openFolder": "폴더 열기...", "welcomePage.cloneGitRepository": "Git 리포지토리 복제...", "welcomePage.recent": "최근 항목", + "welcomePage.moreRecent": "자세히...", "welcomePage.noRecentFolders": "최근 폴더 없음", "welcomePage.help": "도움말", - "welcomePage.productDocumentation": "제품 설명서", + "welcomePage.keybindingsCheatsheet": "인쇄 가능 키보드 치트시트", "welcomePage.introductoryVideos": "소개 비디오", + "welcomePage.productDocumentation": "제품 설명서", "welcomePage.gitHubRepository": "GitHub 리포지토리", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "시작 시 시작 페이지 표시", - "welcomePage.quickLinks": "빠른 링크", - "welcomePage.interactivePlayground": "대화형 실습", - "welcomePage.interactivePlaygroundDescription": "짧은 연습에서 기본 편집기 기능 사용해 보기", - "welcomePage.interfaceOverview": "인터페이스 개요", - "welcomePage.interfaceOverviewDescription": "UI의 주요 구성 요소를 강조 표시하는 시각적 오버레이 가져오기", + "welcomePage.customize": "사용자 지정", + "welcomePage.installExtensionPacks": "도구 및 언어", + "welcomePage.installExtensionPacksDescription": "{0} 및 {1}에 대한 지원 설치", + "welcomePage.moreExtensions": "자세히", + "welcomePage.installKeymapDescription": "바로 가기 키 설치", + "welcomePage.installKeymapExtension": "{0} 및 {1}의 바로 가기 키 설치", + "welcomePage.others": "기타", "welcomePage.colorTheme": "색 테마", "welcomePage.colorThemeDescription": "편집기 및 코드가 좋아하는 방식으로 표시되게 만들기", + "welcomePage.learn": "알아보기", + "welcomePage.showCommands": "모든 명령 찾기 및 실행", + "welcomePage.interfaceOverview": "인터페이스 개요", + "welcomePage.interfaceOverviewDescription": "UI의 주요 구성 요소를 강조 표시하는 시각적 오버레이 가져오기", + "welcomePage.interactivePlayground": "대화형 실습", + "welcomePage.interactivePlaygroundDescription": "짧은 연습에서 기본 편집기 기능 사용해 보기", + "welcomePage.quickLinks": "빠른 링크", "welcomePage.keybindingsReference": "바로 가기 키 참조", "welcomePage.keybindingsReferenceDescription": "가장 일반적인 바로 가기 키가 포함된 인쇄 가능한 PDF", - "welcomePage.showCommands": "모든 명령 찾기 및 실행", - "welcomePage.showCommandsDescription": "제어판에서 명령을 빠르게 검색 및 액세스({0})", "welcomePage.configureSettings": "설정 구성", - "welcomePage.configureSettingsDescription": "설정을 조정하여 VS Code 의 전체 기능 잠금 해제", - "welcomePage.installKeymapDescription": "바로 가기 키 설치", - "welcomePage.installKeymap": "{0}, {1}, {2} 및 {3}의 바로 가기 키 설치", - "welcomePage.vim": "Vim", - "welcomePage.vimCurrent": "Vim(현재)", - "welcomePage.sublime": "Sublime", - "welcomePage.sublimeCurrent": "Sublime(현재)", - "welcomePage.atom": "Atom", - "welcomePage.atomCurrent": "Atom(현재)", - "welcomePage.others": "기타" + "welcomePage.configureSettingsDescription": "설정을 조정하여 VS Code 의 전체 기능 잠금 해제" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json index 5f662c88c2eb8..c14eef563240d 100644 --- a/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "workbenchConfigurationTitle": "워크벤치", - "welcomePage.enabled": "사용하도록 설정되면 시작할 때 시작 페이지를 표시합니다.", "help": "도움말" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index f4fb40d07996a..00f1686824099 100644 --- a/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,11 +5,32 @@ // Do not edit this file. It is machine generated. { "welcomePage": "시작", - "welcome.title": "시작", + "welcomePage.javaScript": "JavaScript", + "welcomePage.typeScript": "TypeScript", + "welcomePage.python": "Python", + "welcomePage.php": "PHP", + "welcomePage.docker": "Docker", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", + "welcomePage.extensionPackAlreadyInstalled": "{0}에 대한 지원이 이미 설치되어 있습니다.", + "welcomePage.willReloadAfterInstallingExtensionPack": "{0}에 대한 추가 지원을 설치한 후 창이 다시 로드됩니다.", + "welcomePage.installingExtensionPack": "{0}에 대한 추가 지원을 설치하는 중...", + "welcomePage.extensionPackNotFound": "ID가 {1}인 {0}에 대한 지원을 찾을 수 없습니다.", "welcomePage.keymapAlreadyInstalled": "{0} 바로 가기 키가 이미 설치되어 있습니다.", "welcomePage.willReloadAfterInstallingKeymap": "{0} 바로 가기 키를 설치한 후 창이 다시 로드됩니다.", - "ok": "확인", "welcomePage.installingKeymap": "{0} 바로 가기 키를 설치하는 중...", "welcomePage.keymapNotFound": "ID가 {1}인 {0} 바로 가기 키를 찾을 수 없습니다.", - "cancel": "취소" + "welcome.title": "시작", + "welcomePage.openFolderWithPath": "경로가 {1}인 {0} 폴더 열기", + "welcomePage.extensionListSeparator": ", ", + "welcomePage.installKeymap": "{0} 키맵 설치", + "welcomePage.installExtensionPack": "{0}에 대한 추가 지원 설치", + "welcomePage.installedKeymap": "{0} 키맵이 이미 설치되어 있습니다.", + "welcomePage.installedExtensionPack": "{0} 지원이 이미 설치되어 있습니다.", + "ok": "확인", + "details": "세부 정보", + "cancel": "취소", + "welcomePage.buttonBackground": "시작 페이지에서 단추의 배경색입니다.", + "welcomePage.buttonHoverBackground": "시작 페이지에서 단추의 커서 올리기 배경색입니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/kor/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json index e579f606de72a..25c6b86854dd7 100644 --- a/i18n/kor/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "walkThrough.unboundCommand": "바인딩 안 됨" + "walkThrough.unboundCommand": "바인딩 안 됨", + "walkThrough.gitNotFound": "Git가 시스템에 설치되지 않은 것 같습니다.", + "walkThrough.embeddedEditorBackground": "대화형 실습에서 포함된 편집기의 배경색입니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/services/configuration/node/configuration.i18n.json b/i18n/kor/src/vs/workbench/services/configuration/node/configuration.i18n.json new file mode 100644 index 0000000000000..bea643cae15bf --- /dev/null +++ b/i18n/kor/src/vs/workbench/services/configuration/node/configuration.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.configuration": "구성 설정을 적용합니다.", + "vscode.extension.contributes.configuration.title": "설정을 요약합니다. 이 레이블은 설정 파일에서 구분 주석으로 사용됩니다.", + "vscode.extension.contributes.configuration.properties": "구성 속성에 대한 설명입니다.", + "invalid.type": "설정된 경우 'configuration.type'을 '개체'로 설정해야 합니다.", + "invalid.title": "'configuration.title'은 문자열이어야 합니다.", + "vscode.extension.contributes.defaultConfiguration": "언어별로 기본 편집기 구성 설정을 적용합니다.", + "invalid.properties": "'configuration.properties'는 개체여야 합니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/kor/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index a897bbf9abed7..fa07b04f779b3 100644 --- a/i18n/kor/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/kor/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -4,11 +4,14 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "open": "설정 열기", + "close": "닫기", + "saveAndRetry": "설정 저장 및 다시 시도", "errorUnknownKey": "구성 파일에 쓸 수 없습니다(알 수 없는 키).", "errorInvalidTarget": "구성 파일에 쓸 수 없습니다(잘못된 대상).", - "errorNoWorkspaceOpened": "폴더가 열려 있지 않으므로 설정을 쓸 수 없습니다. 먼저 폴더를 열고 다시 시도하세요.", - "errorInvalidConfiguration": "설정을 쓸 수 없습니다. **사용자 설정**을 열어 파일에서 오류/경고를 해결하고 다시 시도하세요.", - "errorInvalidConfigurationWorkspace": "설정을 쓸 수 없습니다. **작업 영역 설정**을 열어 파일에서 오류/경고를 해결하고 다시 시도하세요.", - "errorConfigurationFileDirty": "파일이 변경되어 설정을 쓸 수 없습니다. **사용자 설정** 파일을 저장하고 다시 시도하세요.", - "errorConfigurationFileDirtyWorkspace": "파일이 변경되어 설정을 쓸 수 없습니다. **작업 영역 설정** 파일을 저장하고 다시 시도하세요." + "errorNoWorkspaceOpened": "폴더가 열려 있지 않으므로 설정에 쓸 수 없습니다. 먼저 폴더를 열고 다시 시도하세요.", + "errorInvalidConfiguration": "설정에 쓸 수 없습니다. **사용자 설정**을 열어 파일에서 오류/경고를 해결하고 다시 시도하세요.", + "errorInvalidConfigurationWorkspace": "설정에 쓸 수 없습니다. **작업 영역 설정**을 열어 파일에서 오류/경고를 해결하고 다시 시도하세요.", + "errorConfigurationFileDirty": "파일이 변경되어 설정에 쓸 수 없습니다. **사용자 설정** 파일을 저장하고 다시 시도하세요.", + "errorConfigurationFileDirtyWorkspace": "파일이 변경되어 설정에 쓸 수 없습니다. **작업 영역 설정** 파일을 저장하고 다시 시도하세요." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json b/i18n/kor/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json new file mode 100644 index 0000000000000..cff423b1f3bf7 --- /dev/null +++ b/i18n/kor/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "원격 분석", + "telemetry.enableCrashReporting": "충돌 보고서를 Microsoft에 전송할 수 있도록 설정합니다.\n이 옵션을 적용하려면 다시 시작해야 합니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/kor/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index 86a6dfd7761e9..14c8182293125 100644 --- a/i18n/kor/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/kor/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -8,15 +8,11 @@ "requirestring": "속성 `{0}`은(는) 필수이며 `string` 형식이어야 합니다.", "optstring": "속성 `{0}`은(는) 생략할 수 있으며 `string` 형식이어야 합니다.", "vscode.extension.contributes.keybindings.command": "키 바인딩이 트리거될 때 실행할 명령의 식별자입니다.", - "vscode.extension.contributes.keybindings.key": "키 또는 키 시퀀스(더하기 기호가 있는 개별 키, 공백이 있는 시퀀스, 예: Ctrl+O 및 Ctrl+L L을 동시에 누름)", "vscode.extension.contributes.keybindings.mac": "Mac 특정 키 또는 키 시퀀스입니다.", "vscode.extension.contributes.keybindings.linux": "Linux 특정 키 또는 키 시퀀스", "vscode.extension.contributes.keybindings.win": "Windows 특정 키 또는 키 시퀀스", "vscode.extension.contributes.keybindings.when": "키가 활성화되는 조건입니다.", "vscode.extension.contributes.keybindings": "키 바인딩을 적용합니다.", - "openDocumentation": "자세한 정보", - "keybindingMigration.ok": "확인", - "keybindingMigration.prompt": "키보드 레이아웃에 대해 일부 바로 가기 키가 변경되었습니다.", "invalid.keybindings": "잘못된 `contributes.{0}`입니다. {1}", "unboundCommands": "사용 가능한 다른 명령:", "keybindings.json.title": "키 바인딩 구성", diff --git a/i18n/kor/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json b/i18n/kor/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json index 48ab564c23da0..4170dd6dafff8 100644 --- a/i18n/kor/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json +++ b/i18n/kor/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json @@ -4,6 +4,15 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "vscode.extension.contributes.languages": "언어 선언을 적용합니다.", + "vscode.extension.contributes.languages.id": "언어의 ID입니다.", + "vscode.extension.contributes.languages.aliases": "언어에 대한 이름 별칭입니다.", + "vscode.extension.contributes.languages.extensions": "파일 확장이 언어에 연결되어 있습니다.", + "vscode.extension.contributes.languages.filenames": "파일 이름이 언어에 연결되어 있습니다.", + "vscode.extension.contributes.languages.filenamePatterns": "파일 이름 GLOB 패턴이 언어에 연결되어 있습니다.", + "vscode.extension.contributes.languages.mimetypes": "Mime 형식이 언어에 연결되어 있습니다.", + "vscode.extension.contributes.languages.firstLine": "언어 파일의 첫 번째 줄과 일치하는 정규식입니다.", + "vscode.extension.contributes.languages.configuration": "언어에 대한 구성 옵션을 포함하는 파일에 대한 상대 경로입니다.", "invalid": "잘못된 `contributes.{0}`입니다. 배열이 필요합니다.", "invalid.empty": "`contributes.{0}`에 대한 빈 값", "require.id": "속성 `{0}`은(는) 필수이며 `string` 형식이어야 합니다.", diff --git a/i18n/kor/src/vs/workbench/services/progress/browser/progressService2.i18n.json b/i18n/kor/src/vs/workbench/services/progress/browser/progressService2.i18n.json new file mode 100644 index 0000000000000..6db7d6aae514a --- /dev/null +++ b/i18n/kor/src/vs/workbench/services/progress/browser/progressService2.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "progress.text": "{0} - {1}", + "progress.title": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json b/i18n/kor/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json new file mode 100644 index 0000000000000..264d88bd8aaef --- /dev/null +++ b/i18n/kor/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.grammars": "textmate 토크나이저를 적용합니다.", + "vscode.extension.contributes.grammars.language": "이 구문이 적용되는 언어 식별자입니다.", + "vscode.extension.contributes.grammars.scopeName": "tmLanguage 파일에 사용되는 Textmate 범위 이름입니다.", + "vscode.extension.contributes.grammars.path": "tmLanguage 파일의 경로입니다. 확장 폴더의 상대 경로이며 일반적으로 './syntaxes/'로 시작합니다.", + "vscode.extension.contributes.grammars.embeddedLanguages": "이 문법에 포함된 언어가 있는 경우 언어 ID에 대한 범위 이름의 맵입니다.", + "vscode.extension.contributes.grammars.injectTo": "이 문법이 삽입되는 언어 범위 이름 목록입니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json b/i18n/kor/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json new file mode 100644 index 0000000000000..f45f3fb57a7b6 --- /dev/null +++ b/i18n/kor/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid.language": "`contributes.{0}.language`에 알 수 없는 언어가 있습니다. 제공된 값: {1}", + "invalid.scopeName": "`contributes.{0}.scopeName`에 문자열이 필요합니다. 제공된 값: {1}", + "invalid.path.0": "`contributes.{0}.path`에 문자열이 필요합니다. 제공된 값: {1}", + "invalid.injectTo": "`contributes.{0}.injectTo`의 값이 잘못되었습니다. 언어 범위 이름 배열이어야 합니다. 제공된 값: {1}", + "invalid.embeddedLanguages": "`contributes.{0}.embeddedLanguages` 값이 잘못되었습니다. 범위 이름에서 언어까지의 개체 맵이어야 합니다. 제공된 값: {1}", + "invalid.path.1": "확장 폴더({2})에 포함할 `contributes.{0}.path`({1})가 필요합니다. 확장이 이식 불가능해질 수 있습니다.", + "no-tm-grammar": "이 언어에 대해 등록된 TM 문법이 없습니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json b/i18n/kor/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json index ef85a3ba9f602..67d59d097a592 100644 --- a/i18n/kor/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json +++ b/i18n/kor/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json @@ -6,5 +6,6 @@ { "schema.colors": "구문 강조 표시를 위한 색", "schema.properties.name": "규칙에 대한 설명", - "schema.fontStyle": "규칙의 글꼴 스타일: '기울임꼴, '굵게' 및 '밑줄' 중 하나 또는 이들의 조합" + "schema.fontStyle": "규칙의 글꼴 스타일: '기울임꼴, '굵게' 및 '밑줄' 중 하나 또는 이들의 조합", + "schema.tokenColors.path": "tmTheme 파일의 경로(현재 파일의 상대 경로)" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/kor/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json index bc1ada8f0ba0f..1acfa7a4ff492 100644 --- a/i18n/kor/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json +++ b/i18n/kor/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -5,8 +5,9 @@ // Do not edit this file. It is machine generated. { "error.cannotparsejson": "JSON 테마 파일을 구문 분석하는 중 문제 발생: {0}", - "error.invalidformat": "JSON 테마 파일을 구문 분석하는 중 문제 발생: {0}. 'tokenColors' 및 'colors'가 필요합니다.", - "error.plist.invalidformat": "테마 파일({0})을 구문 분석하는 중 문제가 발생했습니다. 'settings'가 배열이 아닙니다.", - "error.cannotparse": "테마 파일({0})을 구문 분석하는 중 문제가 발생했습니다.", - "error.cannotload": "테마 파일 {0}을(를) 로드하는 중 문제 발생: {1}" + "error.invalidformat.colors": "색 테마 파일 {0}을(를) 구문 분석하는 중 문제가 발생했습니다. 'colors' 속성이 'object' 형식이 아닙니다.", + "error.invalidformat.tokenColors": "색 테마 파일 {0}을(를) 구문 분석하는 중 문제가 발생했습니다. 'tokenColors' 속성이 'object' 형식이 아닙니다. 'tokenColors' 속성은 색을 지정하는 배열 또는 텍스트 짝 테마 파일의 경로여야 합니다.", + "error.plist.invalidformat": "tmTheme 파일 {0}을(를) 구문 분석하는 중 문제가 발생했습니다. 'settings'가 배열이 아닙니다.", + "error.cannotparse": "tmTheme 파일 {0}을(를) 구문 분석하는 중 문제가 발생했습니다.", + "error.cannotload": "tmTheme 파일 {0}을(를) 로드하는 중 문제가 발생했습니다. {1}" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/kor/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index d6b5488116d42..f153f7613caa9 100644 --- a/i18n/kor/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/kor/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -23,8 +23,9 @@ "error.cannotparseicontheme": "Problems parsing file icons file: {0}", "colorTheme": "Specifies the color theme used in the workbench.", "colorThemeError": "Theme is unknown or not installed.", - "iconTheme": "Specifies the icon theme used in the workbench.", "noIconThemeDesc": "No file icons", "iconThemeError": "File icon theme is unknown or not installed.", - "workbenchColors": "현재 선택한 색 테마의 색을 재정의합니다. 다음 릴리스에서 색 이름이 변경될 예정이므로 이 설정은 실험적입니다." + "workbenchColors": "현재 선택한 색 테마에서 색을 재정의합니다.", + "workbenchColors.deprecated": "이 설정은 더 이상 실험적 설정이 아니며 이름이\n 'workbench.colorCustomizations'로 변경되었습니다.", + "workbenchColors.deprecatedDescription": "대신 'workbench.colorCustomizations'를 사용합니다." } \ No newline at end of file diff --git a/i18n/ptb/extensions/configuration-editing/out/extension.i18n.json b/i18n/ptb/extensions/configuration-editing/out/extension.i18n.json new file mode 100644 index 0000000000000..5f2b18dc178c1 --- /dev/null +++ b/i18n/ptb/extensions/configuration-editing/out/extension.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "exampleExtension": "Exemplo" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json b/i18n/ptb/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json new file mode 100644 index 0000000000000..cd70eb29a4fda --- /dev/null +++ b/i18n/ptb/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json @@ -0,0 +1,38 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "activeEditorShort": "por exemplo meuArquivo.txt", + "activeEditorMedium": "e.g. minhaPasta/meuArquivo.txt", + "activeEditorLong": "por exemplo /Usuários/Desenvolvimento/meuProjeto/minhaPasta/meuArquivo/txt", + "rootName": "por exemplo, myFolder1, myFolder2, myFolder3", + "rootPath": "por exemplo /Usuários/desenvolvimento/meuProjeto", + "folderName": "por exemplo, myFolder", + "folderPath": "por exemplo, /Users/Development/myFolder", + "appName": "e.g. VS Code", + "dirty": "Um indicador de alteração se o editor ativo foi alterado", + "separator": "um separador condicional (' - ') que somente é mostrado quando envolvido por variáveis com valores", + "assocLabelFile": "Arquivos com Extensão", + "assocDescriptionFile": "Mapear todos arquivos que correspondem ao padrão global no seu nome de arquivo à linguagem com o identificador dado", + "assocLabelPath": "Arquivos com Caminho", + "assocDescriptionPath": "Mapear todos os arquivos que correspondem ao caminho absoluto global no seu caminho à linguagem com o identificador dado", + "fileLabel": "Arquivos por Extensão", + "fileDescription": "Combina todos os arquivos de uma extensão de arquivo específica.", + "filesLabel": "Arquivos com Várias Extensões", + "filesDescription": "Combina todos os arquivos com qualquer uma das extensões de arquivo.", + "derivedLabel": "Arquivos com Irmãos por Nome", + "derivedDescription": "Combina arquivos que têm irmãos com o mesmo nome, mas uma extensão diferente.", + "topFolderLabel": "Pasta por Nome (Nível Superior)", + "topFolderDescription": "Combina uma pasta de nível superior com um nome específico.", + "topFoldersLabel": "Pastas com Vários Nomes (Nível Superior)", + "topFoldersDescription": "Combina várias pastas de nível superior.", + "folderLabel": "Pasta por Nome (Qualquer Local)", + "folderDescription": "Combina uma pasta com um nome específico em qualquer local.", + "falseDescription": "Desabilita o padrão.", + "trueDescription": "Habilita o padrão.", + "siblingsDescription": "Combina arquivos que têm irmãos com o mesmo nome, mas uma extensão diferente.", + "languageSpecificEditorSettings": "Configurações do editor especificas para a linguagem", + "languageSpecificEditorSettingsDescription": "Sobrescrever as configurações do editor para a linguagem" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/css/client/out/cssMain.i18n.json b/i18n/ptb/extensions/css/client/out/cssMain.i18n.json new file mode 100644 index 0000000000000..a649796227bda --- /dev/null +++ b/i18n/ptb/extensions/css/client/out/cssMain.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "cssserver.name": "Servidor de linguagem CSS" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/css/package.i18n.json b/i18n/ptb/extensions/css/package.i18n.json new file mode 100644 index 0000000000000..de011d44dcee1 --- /dev/null +++ b/i18n/ptb/extensions/css/package.i18n.json @@ -0,0 +1,67 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "css.lint.argumentsInColorFunction.desc": "Número inválido de parâmetros", + "css.lint.boxModel.desc": "Não use largura ou altura ao usar preenchimento ou borda", + "css.lint.compatibleVendorPrefixes.desc": "Ao usar um prefixo específico de fornecedor, certifique-se de também incluir todas as outras propriedades específicas do fornecedor", + "css.lint.duplicateProperties.desc": "Não use as definições de estilo duplicadas", + "css.lint.emptyRules.desc": "Não use conjuntos de regra em branco", + "css.lint.float.desc": "Evite usar 'float'. Floats levam a CSS frágil, que é fácil de quebrar se um aspecto do layout for alterado.", + "css.lint.fontFaceProperties.desc": "A regra @font-face deve definir propriedades 'src' e 'font-family'", + "css.lint.hexColorLength.desc": "Cores hexadecimais devem consistir em três ou seis números hexadecimais", + "css.lint.idSelector.desc": "Seletores não devem conter IDs, pois essas regras estão firmemente acopladas ao HTML.", + "css.lint.ieHack.desc": "IE hacks somente são necessários ao dar suporte ao IE7 e mais antigos", + "css.lint.important.desc": "Evite usar !important. Esta é uma indicação de que a especificidade do CSS inteiro saiu de controle e precisa ser fatorada novamente.", + "css.lint.importStatement.desc": "Instruções de importação não carregam em paralelo", + "css.lint.propertyIgnoredDueToDisplay.desc": "Propriedade ignorada devido à exibição. Por exemplo, com 'display: inline', as propriedades width, height, margin-top, margin-bottom e float não têm efeito", + "css.lint.universalSelector.desc": "O seletor universal (*) é conhecido por ser lento", + "css.lint.unknownProperties.desc": "Propriedade desconhecida.", + "css.lint.unknownVendorSpecificProperties.desc": "Propriedade específica do fornecedor desconhecida.", + "css.lint.vendorPrefix.desc": "Ao usar um prefixo específico do fornecedor, inclua também a propriedade padrão", + "css.lint.zeroUnits.desc": "Nenhuma unidade para zero é necessária", + "css.validate.desc": "Habilita ou desabilita todas as validações", + "less.lint.argumentsInColorFunction.desc": "Número inválido de parâmetros", + "less.lint.boxModel.desc": "Não use largura ou altura ao usar preenchimento ou borda", + "less.lint.compatibleVendorPrefixes.desc": "Ao usar um prefixo específico de fornecedor, certifique-se de também incluir todas as outras propriedades específicas do fornecedor", + "less.lint.duplicateProperties.desc": "Não use as definições de estilo duplicadas", + "less.lint.emptyRules.desc": "Não use conjuntos de regra em branco", + "less.lint.float.desc": "Evite usar 'float'. Floats levam a CSS frágil, que é fácil de quebrar se um aspecto do layout for alterado.", + "less.lint.fontFaceProperties.desc": "A regra @font-face deve definir propriedades 'src' e 'font-family'", + "less.lint.hexColorLength.desc": "Cores hexadecimais devem consistir em três ou seis números hexadecimais", + "less.lint.idSelector.desc": "Seletores não devem conter IDs, pois essas regras estão firmemente acopladas ao HTML.", + "less.lint.ieHack.desc": "IE hacks somente são necessários ao dar suporte ao IE7 e mais antigos", + "less.lint.important.desc": "Evite usar !important. Esta é uma indicação de que a especificidade do CSS inteiro saiu de controle e precisa ser fatorada novamente.", + "less.lint.importStatement.desc": "Instruções de importação não carregam em paralelo", + "less.lint.propertyIgnoredDueToDisplay.desc": "Propriedade ignorada devido à exibição. Por exemplo, com 'display: inline', as propriedades width, height, margin-top, margin-bottom e float não têm efeito", + "less.lint.universalSelector.desc": "O seletor universal (*) é conhecido por ser lento", + "less.lint.unknownProperties.desc": "Propriedade desconhecida.", + "less.lint.unknownVendorSpecificProperties.desc": "Propriedade específica do fornecedor desconhecida.", + "less.lint.vendorPrefix.desc": "Ao usar um prefixo específico do fornecedor, inclua também a propriedade padrão", + "less.lint.zeroUnits.desc": "Nenhuma unidade para zero é necessária", + "less.validate.desc": "Habilita ou desabilita todas as validações", + "scss.lint.argumentsInColorFunction.desc": "Número inválido de parâmetros", + "scss.lint.boxModel.desc": "Não use largura ou altura ao usar preenchimento ou borda", + "scss.lint.compatibleVendorPrefixes.desc": "Ao usar um prefixo específico de fornecedor, certifique-se de também incluir todas as outras propriedades específicas do fornecedor", + "scss.lint.duplicateProperties.desc": "Não use as definições de estilo duplicadas", + "scss.lint.emptyRules.desc": "Não use conjuntos de regra em branco", + "scss.lint.float.desc": "Evite usar 'float'. Floats levam a CSS frágil, que é fácil de quebrar se um aspecto do layout for alterado.", + "scss.lint.fontFaceProperties.desc": "A regra @font-face deve definir propriedades 'src' e 'font-family'", + "scss.lint.hexColorLength.desc": "Cores hexadecimais devem consistir em três ou seis números hexadecimais", + "scss.lint.idSelector.desc": "Seletores não devem conter IDs, pois essas regras estão firmemente acopladas ao HTML.", + "scss.lint.ieHack.desc": "IE hacks somente são necessários ao dar suporte ao IE7 e mais antigos", + "scss.lint.important.desc": "Evite usar !important. Esta é uma indicação de que a especificidade do CSS inteiro saiu de controle e precisa ser fatorada novamente.", + "scss.lint.importStatement.desc": "Instruções de importação não carregam em paralelo", + "scss.lint.propertyIgnoredDueToDisplay.desc": "Propriedade ignorada devido à exibição. Por exemplo, com 'display: inline', as propriedades width, height, margin-top, margin-bottom e float não têm efeito", + "scss.lint.universalSelector.desc": "O seletor universal (*) é conhecido por ser lento", + "scss.lint.unknownProperties.desc": "Propriedade desconhecida.", + "scss.lint.unknownVendorSpecificProperties.desc": "Propriedade específica do fornecedor desconhecida.", + "scss.lint.vendorPrefix.desc": "Ao usar um prefixo específico do fornecedor, inclua também a propriedade padrão", + "scss.lint.zeroUnits.desc": "Nenhuma unidade para zero é necessária", + "scss.validate.desc": "Habilita ou desabilita todas as validações", + "less.colorDecorators.enable.desc": "Habilita ou desabilita decoradores de cores", + "scss.colorDecorators.enable.desc": "Habilita ou desabilita decoradores de cores", + "css.colorDecorators.enable.desc": "Habilita ou desabilita decoradores de cores" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/extension-editing/out/extensionLinter.i18n.json b/i18n/ptb/extensions/extension-editing/out/extensionLinter.i18n.json new file mode 100644 index 0000000000000..7c87e37b7d5b5 --- /dev/null +++ b/i18n/ptb/extensions/extension-editing/out/extensionLinter.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "httpsRequired": "Imagens devem usar o protocolo HTTPS.", + "svgsNotValid": "SVGs não são uma fonte de imagem válida.", + "embeddedSvgsNotValid": "SVGs embutidos não são uma fonte de imagem válida.", + "dataUrlsNotValid": "URLs de dados não são uma fonte de imagem válida.", + "relativeUrlRequiresHttpsRepository": "URLs de imagens relativas exigem um repositório com protocolo HTTPS no pacote .json." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/extension-editing/out/packageDocumentHelper.i18n.json b/i18n/ptb/extensions/extension-editing/out/packageDocumentHelper.i18n.json new file mode 100644 index 0000000000000..8505afd6d4a89 --- /dev/null +++ b/i18n/ptb/extensions/extension-editing/out/packageDocumentHelper.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "languageSpecificEditorSettings": "Configurações do editor especificas para a linguagem", + "languageSpecificEditorSettingsDescription": "Sobrescrever as configurações do editor para a linguagem" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/git/out/askpass-main.i18n.json b/i18n/ptb/extensions/git/out/askpass-main.i18n.json new file mode 100644 index 0000000000000..280b14bd0d70c --- /dev/null +++ b/i18n/ptb/extensions/git/out/askpass-main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "missOrInvalid": "Credenciais ausentes ou inválidas." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/git/out/commands.i18n.json b/i18n/ptb/extensions/git/out/commands.i18n.json new file mode 100644 index 0000000000000..ddfdd71581f5a --- /dev/null +++ b/i18n/ptb/extensions/git/out/commands.i18n.json @@ -0,0 +1,50 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tag at": "Etiqueta em {0}", + "remote branch at": "Ramo remoto em {0}", + "repourl": "URL do repositório", + "parent": "Diretório pai", + "cloning": "Clonando repositório do Git...", + "openrepo": "Abrir Repositório", + "proposeopen": "Gostaria de abrir o repositório clonado?", + "confirm revert": "Tem certeza que deseja reverter as alterações selecionadas em {0}?", + "revert": "Reverter as alterações", + "confirm discard": "Tem certeza que deseja descartar as alterações em {0}?", + "confirm discard multiple": "Tem certeza que deseja descartar as alterações em {0} arquivos?", + "discard": "Descartar alterações", + "confirm discard all": "Tem certeza que deseja descartar TODAS as alterações? Isso é IRREVERSÍVEL!", + "discardAll": "Descartar TODAS as alterações", + "no staged changes": "Não há nenhuma modificação escalonada para confirmar.\n\nGostaria de escalonar automaticamente todas as suas alterações e confirmá-las diretamente?", + "yes": "Sim", + "always": "Sempre", + "no changes": "Não há mudanças para confirmar.", + "commit message": "Confirmar mensagem", + "provide commit message": "Por favor, forneça uma mensagem de commit", + "select a ref to checkout": "Selecione uma referência para check-out", + "branch name": "Nome do Ramo", + "provide branch name": "Por favor, forneça um nome de ramo", + "select branch to delete": "Selecione uma ramificação para excluir", + "confirm force delete branch": "A ramificação '{0}' não foi totalmente mesclada. Excluir mesmo assim?", + "delete branch": "Excluir ramificação", + "select a branch to merge from": "Selecione uma ramificação para mesclar", + "merge conflicts": "Existem conflitos de mesclagem. Resolva-os antes de confirmar.", + "no remotes to pull": "O seu repositório não possui remotos configurados para efetuar pull.", + "pick remote pull repo": "Selecione um remoto para efeutar o pull da ramificação", + "no remotes to push": "O seu repositório não possui remotos configurados para efetuar push.", + "nobranch": "Por favor, faça checkout em um ramo para fazer push em um remoto.", + "pick remote": "Pegue um remoto para publicar o ramo '{0}':", + "sync is unpredictable": "Esta ação vai fazer push e pull nos commits de e para '{0}'.", + "ok": "OK", + "never again": "Ok, Nunca Mostrar Novamente", + "no remotes to publish": "Seu repositório não possui remotos configurados para publicação.", + "disabled": "Git está desativado ou não é suportado neste espaço de trabalho", + "clean repo": "Por favor, limpe sua árvore de trabalho do repositório antes de fazer check-out.", + "cant push": "Não pode empurrar referências para remoto. Execute 'Pull' primeiro para integrar suas alterações.", + "git error details": "Git: {0}", + "git error": "Erro de Git", + "open git log": "Abrir Histórico do Git" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/git/out/main.i18n.json b/i18n/ptb/extensions/git/out/main.i18n.json new file mode 100644 index 0000000000000..ae1dee2603294 --- /dev/null +++ b/i18n/ptb/extensions/git/out/main.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "using git": "Usando git {0} de {1}", + "updateGit": "Atualizar o Git", + "neverShowAgain": "Não mostrar novamente", + "git20": "Você parece ter o git {0} instalado. Code funciona melhor com git > = 2" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/git/out/model.i18n.json b/i18n/ptb/extensions/git/out/model.i18n.json new file mode 100644 index 0000000000000..717d2b4364a76 --- /dev/null +++ b/i18n/ptb/extensions/git/out/model.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "open": "Abrir", + "merge changes": "Mesclar Alterações", + "staged changes": "Alterações em Etapas", + "changes": "Alterações", + "ok": "OK", + "neveragain": "Nunca Mostrar Novamente", + "huge": "O repositório git em '{0}' tem muitas atualizações ativas, somente um subconjunto de funcionalidades do Git será habilitado." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/git/out/scmProvider.i18n.json b/i18n/ptb/extensions/git/out/scmProvider.i18n.json new file mode 100644 index 0000000000000..490dda3603e0d --- /dev/null +++ b/i18n/ptb/extensions/git/out/scmProvider.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "commit": "Confirmar" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/git/out/statusbar.i18n.json b/i18n/ptb/extensions/git/out/statusbar.i18n.json new file mode 100644 index 0000000000000..a7cb7d22aae22 --- /dev/null +++ b/i18n/ptb/extensions/git/out/statusbar.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "checkout": "Checkout...", + "sync changes": "Sincronizar alterações", + "publish changes": "Publicar Alterações", + "syncing changes": "Sincronizando Alterações..." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/git/package.i18n.json b/i18n/ptb/extensions/git/package.i18n.json new file mode 100644 index 0000000000000..a35009d09e381 --- /dev/null +++ b/i18n/ptb/extensions/git/package.i18n.json @@ -0,0 +1,52 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "command.clone": "Clonar", + "command.init": "Inicializar Repositório", + "command.refresh": "Atualizar", + "command.openChange": "Abrir alterações", + "command.openFile": "Abrir Arquivo", + "command.openHEADFile": "Abrir arquivo (HEAD)", + "command.stage": "Estagiar Alterações", + "command.stageAll": "Estagiar Todas Alterações", + "command.stageSelectedRanges": "Estagiar Faixas Selecionadas", + "command.revertSelectedRanges": "Reverter Faixas Selecionadas", + "command.unstage": "Desestagiar Alterações", + "command.unstageAll": "Desestagiar Todas Alterações", + "command.unstageSelectedRanges": "Desestagiar Faixas Selecionadas", + "command.clean": "Descartar Alterações", + "command.cleanAll": "Descartar Todas as Alterações", + "command.commit": "Confirmar", + "command.commitStaged": "Confirmar os preparados", + "command.commitStagedSigned": "Confirmar Estagiados (Desconectado)", + "command.commitAll": "Confirmar tudo", + "command.commitAllSigned": "Confirmar Tudo (Desconectado)", + "command.undoCommit": "Desfazer Ultima Confirmação", + "command.checkout": "Fazer checkout para...", + "command.branch": "Criar Ramificação...", + "command.deleteBranch": "Excluir Ramificação...", + "command.merge": "Mesclar ramificação...", + "command.pull": "Efetuar pull", + "command.pullRebase": "Efetuar pull (Rebase)", + "command.pullFrom": "Fazer pull de...", + "command.push": "Enviar por push", + "command.pushTo": "Enviar por push para...", + "command.sync": "Sincronizar", + "command.publish": "Publicar Ramo", + "command.showOutput": "Mostrar Saída do Git", + "command.ignore": "Adicionar arquivo ao .gitignore", + "config.enabled": "Se o git estiver habilitado", + "config.path": "Caminho para o executável do git", + "config.autorefresh": "Se a atualização automática estiver habilitada", + "config.autofetch": "Se a recuperação automática estiver habilitada", + "config.enableLongCommitWarning": "Se mensagens longas de confirmação devem ter aviso", + "config.confirmSync": "Confirmar antes de sincronizar repositórios git", + "config.countBadge": "Controla o contador de distintivos do git. 'todos' considera todas as alterações. 'rastreado' considera apenas as alterações controladas. 'desligado' desliga o contador.", + "config.checkoutType": "Controla quais tipos de ramos são listados quando executando `Checkout para... `. `todos` mostra todas as referências, `local` mostra apenas os ramos locais, `etiqueta` mostra apenas etiquetas e `remoto` mostra apenas os ramos remotos.", + "config.ignoreLegacyWarning": "Ignora o aviso de Git legado", + "config.ignoreLimitWarning": "Ignora o aviso quando houver muitas alterações em um repositório", + "config.defaultCloneDirectory": "O local padrão onde clonar um repositório git" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/grunt/out/main.i18n.json b/i18n/ptb/extensions/grunt/out/main.i18n.json new file mode 100644 index 0000000000000..909b68937c6e8 --- /dev/null +++ b/i18n/ptb/extensions/grunt/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "Auto detecção de Grunt falhou com erro: {0}" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/grunt/package.i18n.json b/i18n/ptb/extensions/grunt/package.i18n.json new file mode 100644 index 0000000000000..d79ce76907e73 --- /dev/null +++ b/i18n/ptb/extensions/grunt/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.grunt.autoDetect": "Controla se a deteção automática de tarefas do Grunt está ligado ou desligado. Padrão é ligado." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/gulp/out/main.i18n.json b/i18n/ptb/extensions/gulp/out/main.i18n.json new file mode 100644 index 0000000000000..51b05e4013eff --- /dev/null +++ b/i18n/ptb/extensions/gulp/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "Auto detecção de gulp falhou com erro: {0}" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/gulp/package.i18n.json b/i18n/ptb/extensions/gulp/package.i18n.json new file mode 100644 index 0000000000000..fae292414c287 --- /dev/null +++ b/i18n/ptb/extensions/gulp/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.gulp.autoDetect": "Controla se a detecção automática de tarefas Gulp está ativada ou desativada. Por padrão, é ativado." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/html/client/out/htmlMain.i18n.json b/i18n/ptb/extensions/html/client/out/htmlMain.i18n.json new file mode 100644 index 0000000000000..314d1e5c58ac0 --- /dev/null +++ b/i18n/ptb/extensions/html/client/out/htmlMain.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "htmlserver.name": "Servidor de Linguagem HTML" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/html/package.i18n.json b/i18n/ptb/extensions/html/package.i18n.json new file mode 100644 index 0000000000000..2f255a02e7f1c --- /dev/null +++ b/i18n/ptb/extensions/html/package.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "html.format.enable.desc": "Ativa/desativa o formatador HTML padrão (requer reinicialização)", + "html.format.wrapLineLength.desc": "Quantidade máxima de caracteres por linha (0 = desativar).", + "html.format.unformatted.desc": "Lista de tags, separados por vírgula, que não deveria ser reformatada. o padrão é 'nulo' para todas as tags listadas em https://www.w3.org/TR/html5/dom.html#phrasing-content.", + "html.format.contentUnformatted.desc": "Lista de tags, separada por vírgula, onde o conteúdo não deve ser reformatado. o padrão é 'nulo' para a tag 'pré'.", + "html.format.indentInnerHtml.desc": "Indentar secões e .", + "html.format.preserveNewLines.desc": "Se quebras de linha existentes antes de elementos deveriam ser preservadas. Só funciona antes de elementos, não dentro de rótulos ou para texto.", + "html.format.maxPreserveNewLines.desc": "Número máximo de quebras de linha a serem preservadas em um bloco. Use 'null' para ilimitado.", + "html.format.indentHandlebars.desc": "Formatar e indentar {{#foo}} e {{/ foo}}.", + "html.format.endWithNewline.desc": "Finalizar com uma nova linha.", + "html.format.extraLiners.desc": "Lista de rótulos, separados por vírgulas, que deveriam ter uma quebra de linha extra antes deles. 'null' admite o padrão \"head, body, /html\".", + "html.format.wrapAttributes.desc": "Agrupar atributos.", + "html.format.wrapAttributes.auto": "Agrupar atributos somente quando o tamanho da linha é excedido.", + "html.format.wrapAttributes.force": "Agrupar cada atributo exceto o primeiro.", + "html.format.wrapAttributes.forcealign": "Agrupar cada atributo, exceto o primeiro e manter alinhado.", + "html.format.wrapAttributes.forcemultiline": "Agrupar cada atributo.", + "html.suggest.angular1.desc": "Configura se o suporte da linguagem HTML interna sugere rótulos e propriedades do Angular V1.", + "html.suggest.ionic.desc": "Configura se o suporte da linguagem HTML interna sugere rótulos, propriedades e valores Ionic.", + "html.suggest.html5.desc": "Configura se o suporte da linguagem HTML interna sugere rótulos, propriedades e valores HTML5.", + "html.validate.scripts": "Configura se o suporte da linguagem HTML interna valida scripts embutidos.", + "html.validate.styles": "Configura se o suporte da linguagem HTML interna valida estilos embutidos." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/jake/out/main.i18n.json b/i18n/ptb/extensions/jake/out/main.i18n.json new file mode 100644 index 0000000000000..4cfc54e5fef5f --- /dev/null +++ b/i18n/ptb/extensions/jake/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "Auto detecção de Jake falhou com erro: {0}" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/jake/package.i18n.json b/i18n/ptb/extensions/jake/package.i18n.json new file mode 100644 index 0000000000000..94c08817c8d4e --- /dev/null +++ b/i18n/ptb/extensions/jake/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.jake.autoDetect": "Controla se a detecção automática de tarefas Jake está ativada ou desativada. Por padrão, é ativado." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/javascript/out/features/bowerJSONContribution.i18n.json b/i18n/ptb/extensions/javascript/out/features/bowerJSONContribution.i18n.json new file mode 100644 index 0000000000000..84b277202e8ef --- /dev/null +++ b/i18n/ptb/extensions/javascript/out/features/bowerJSONContribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "json.bower.default": "Bower.json padrão", + "json.bower.error.repoaccess": "Falha na solicitação ao repositório bower: {0}", + "json.bower.latest.version": "último" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/javascript/out/features/packageJSONContribution.i18n.json b/i18n/ptb/extensions/javascript/out/features/packageJSONContribution.i18n.json new file mode 100644 index 0000000000000..9917fa36b2ea1 --- /dev/null +++ b/i18n/ptb/extensions/javascript/out/features/packageJSONContribution.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "json.package.default": "Package.json padrão", + "json.npm.error.repoaccess": "Falha na solicitação ao repositório NPM: {0}", + "json.npm.latestversion": "A versão do pacote mais recente no momento", + "json.npm.majorversion": "Combina com a versão principal mais recente (1.x.x)", + "json.npm.minorversion": "Combina a versão secundária mais recente (1.2.x)", + "json.npm.version.hover": "Última versão: {0}" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/json/client/out/jsonMain.i18n.json b/i18n/ptb/extensions/json/client/out/jsonMain.i18n.json new file mode 100644 index 0000000000000..4391c95a2ba22 --- /dev/null +++ b/i18n/ptb/extensions/json/client/out/jsonMain.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "jsonserver.name": "Servidor de linguagem JSON" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/json/package.i18n.json b/i18n/ptb/extensions/json/package.i18n.json new file mode 100644 index 0000000000000..9d812f5b25317 --- /dev/null +++ b/i18n/ptb/extensions/json/package.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "json.schemas.desc": "Esquemas associadas a arquivos de JSON no projeto atual", + "json.schemas.url.desc": "Um URL para um esquema ou um caminho relativo a um esquema no diretório atual", + "json.schemas.fileMatch.desc": "Uma matriz de padrões de arquivos para correspondência ao resolver arquivos JSON para esquemas.", + "json.schemas.fileMatch.item.desc": "Um padrão de arquivos que pode conter '*' para fazer a correspondência ao resolver arquivos JSON para esquemas.", + "json.schemas.schema.desc": "A definição de esquema para o URL dado. O esquema precisa ser fornecido apenas para evitar acessos ao URL do esquema.", + "json.format.enable.desc": "Habilitar/desabilitar o formatador JSON padrão (requer reinicialização)", + "json.tracing.desc": "Loga a comunicação entre o VS Code e o servidor de linguagem JSON.", + "json.colorDecorators.enable.desc": "Habilita ou desabilita os decoradores de cor" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/markdown/out/extension.i18n.json b/i18n/ptb/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..0f4d1689d7f2e --- /dev/null +++ b/i18n/ptb/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "onPreviewStyleLoadError": "Não foi possível carregar o 'markdown.styles': {0}" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/markdown/out/previewContentProvider.i18n.json b/i18n/ptb/extensions/markdown/out/previewContentProvider.i18n.json new file mode 100644 index 0000000000000..f4e956aa5ebe6 --- /dev/null +++ b/i18n/ptb/extensions/markdown/out/previewContentProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "preview.securityMessage.text": "Scripts foram desabilitados neste documento", + "preview.securityMessage.title": "Scripts são desabilitados na pré-visualização de markdown. Altere a configuração de segurança de pré-visualização do Markdown para habilitar scripts", + "preview.securityMessage.label": "Aviso de segurança de scripts desabilitados" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/markdown/out/security.i18n.json b/i18n/ptb/extensions/markdown/out/security.i18n.json new file mode 100644 index 0000000000000..6b83ed6faed19 --- /dev/null +++ b/i18n/ptb/extensions/markdown/out/security.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "preview.showPreviewSecuritySelector.disallowScriptsForWorkspaceTitle": "Desabilitar a execução de scripts em pré-visualização de markdown para este espaço de trabalho", + "preview.showPreviewSecuritySelector.currentSelection": "Configuração atual", + "preview.showPreviewSecuritySelector.allowScriptsForWorkspaceTitle": "Habilitar a execução de scripts em pré-visualizações de markdown para este espaço de trabalho", + "preview.showPreviewSecuritySelector.title": "Alterar configurações de segurança para a pré-visualização do Markdown" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/markdown/package.i18n.json b/i18n/ptb/extensions/markdown/package.i18n.json new file mode 100644 index 0000000000000..a26926744e50e --- /dev/null +++ b/i18n/ptb/extensions/markdown/package.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "markdown.preview.breaks.desc": "Configura como quebras de linha são processadas na visualização de markdown. Configurando como 'true' cria um
para cada nova linha.", + "markdown.preview.doubleClickToSwitchToEditor.desc": "Duplo clique na pré-visualização markdown para alternar para o editor.", + "markdown.preview.fontFamily.desc": "Controla a família de fonte usada na pré-visualização de markdown.", + "markdown.preview.fontSize.desc": "Controla o tamanho da fonte em pixels usado na pré-visualização de markdown.", + "markdown.preview.lineHeight.desc": "Controla a altura de linha usada na pré-visualização de markdown. Este número é relativo ao tamanho de fonte.", + "markdown.preview.markEditorSelection.desc": "Marca a seleção atual do editor na pré-visualização de markdown.", + "markdown.preview.scrollEditorWithPreview.desc": "Quando a pré-visualização de markdown é rolada, atualiza a exibição do editor.", + "markdown.preview.scrollPreviewWithEditorSelection.desc": "Rola a pré-visualização do markdown para revelar a linha atualmente selecionada do editor.", + "markdown.preview.title": "Abrir a visualização", + "markdown.previewFrontMatter.dec": "Configura como o frontispicio YAML frente questão devem ser processado na pré-visualização de markdown. 'hide' remove o frontispicio. Caso contrário, o frontispicio é tratado como conteúdo de markdown.", + "markdown.previewSide.title": "Abre pré-visualização ao lado", + "markdown.showSource.title": "Exibir Código-Fonte", + "markdown.styles.dec": "Uma lista de URLs ou caminhos locais para folhas de estilo CSS para usar na pré-visualização do markdown. Caminhos relativos são interpretados em relação à pasta aberta no explorer. Se não houver nenhuma pasta aberta, eles são interpretados em relação ao local do arquivo markdown. Todos os ' \\' precisam ser escritos como ' \\ \\ '.", + "markdown.showPreviewSecuritySelector.title": "Alterar as configurações de segurança de pré-visualização do Markdown", + "markdown.preview.enableExperimentalExtensionApi.desc": "[Experimental] Permitir extensões para ampliar a pré-visualização do markdown.", + "markdown.trace.desc": "Habilitar log de depuração para a extensão do markdown." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/ptb/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..e3c986692386c --- /dev/null +++ b/i18n/ptb/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "acceptCurrentChange": "Aceitar a mudança atual", + "acceptIncomingChange": "Aceitar a mudança de entrada", + "acceptBothChanges": "Aceitar as duas alterações", + "compareChanges": "Comparar as mudanças" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/ptb/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..6308a5d70f564 --- /dev/null +++ b/i18n/ptb/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "cursorNotInConflict": "Cursor do editor não está dentro de um conflito de mesclagem", + "compareChangesTitle": "{0}: Alterações Atuais ⟷ Alterações de Entrada", + "cursorOnCommonAncestorsRange": "Cursor do editor está dentro do bloco comum de ancestrais, favor mover para o bloco \"atual\" ou \"entrada\"", + "cursorOnSplitterRange": "Cursor do editor está dentro do separador de conflitos de mesclagem, por favor mova-o para o bloco \"atual\" ou \"entrada\"", + "noConflicts": "Nenhum conflito de mesclagem encontrado neste arquivo", + "noOtherConflictsInThisFile": "Não há outros conflitos de mesclagem dentro desse arquivo" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/ptb/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..2b29ae4a254ca --- /dev/null +++ b/i18n/ptb/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "currentChange": "(Mudança Atual)", + "incomingChange": "(Próxima Mudança)" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/merge-conflict/package.i18n.json b/i18n/ptb/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..ad47caacee95b --- /dev/null +++ b/i18n/ptb/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "command.category": "Conflito de Mesclagem", + "command.accept.all-incoming": "Aceitar todas entradas", + "command.accept.all-both": "Aceitar todas as duas", + "command.accept.current": "Aceitar a corrente", + "command.accept.incoming": "Aceitar entrada", + "command.accept.selection": "Aceitar a seleção", + "command.accept.both": "Aceitar Ambos", + "command.next": "Próximo conflito", + "command.previous": "Conflito anterior", + "command.compare": "Comparar o conflito atual", + "config.title": "Mesclar conflitos", + "config.codeLensEnabled": "Habilitar/Desabilitar o conflito de mesclagem no bloco CodeLens dentro do editor", + "config.decoratorsEnabled": "Habilitar/Desabilitar decoradores de mesclagem de conflitos dentro do editor" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/npm/package.i18n.json b/i18n/ptb/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..8d33aa31e7fdd --- /dev/null +++ b/i18n/ptb/extensions/npm/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.npm.autoDetect": "Controla se a deteção automática de scripts npm está ligado ou desligado. O padrão é ligado." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/php/out/features/validationProvider.i18n.json b/i18n/ptb/extensions/php/out/features/validationProvider.i18n.json new file mode 100644 index 0000000000000..9e0ce64f472fb --- /dev/null +++ b/i18n/ptb/extensions/php/out/features/validationProvider.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "php.useExecutablePath": "Você permite {0} (definido como uma configuração do espaço de trabalho) a ser executado para lint de arquivos PHP?", + "php.yes": "Permitir", + "php.no": "Não permitir", + "wrongExecutable": "Não é possível validar {0} pois não é um executável php válido. Use a configuração 'php.validate.executablePath' para configurar o executável do PHP.", + "noExecutable": "Não é possível validar porque nenhum executável PHP está definido. Use a configuração 'php.validate.executablePath' para configurar o executável do PHP.", + "unknownReason": "Falha ao executar o php usando o caminho: {0}. O motivo é desconhecido." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/php/package.i18n.json b/i18n/ptb/extensions/php/package.i18n.json new file mode 100644 index 0000000000000..7ec916f5dd829 --- /dev/null +++ b/i18n/ptb/extensions/php/package.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "configuration.suggest.basic": "Configura se as sugestões intrínsecas da linguagem PHP estão habilitadas. O suporte sugere globais e variáveis do PHP.", + "configuration.validate.enable": "Habilita/desabilita a validação interna do PHP.", + "configuration.validate.executablePath": "Aponta para o executável do PHP.", + "configuration.validate.run": "Se o linter é executado ao salvar ou ao digitar.", + "configuration.title": "PHP", + "commands.categroy.php": "PHP", + "command.untrustValidationExecutable": "Desabilita a validação de executável do PHP (definida como configuração do espaço de trabalho)" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/features/bufferSyncSupport.i18n.json b/i18n/ptb/extensions/typescript/out/features/bufferSyncSupport.i18n.json new file mode 100644 index 0000000000000..3cc3ca76ce719 --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/features/bufferSyncSupport.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "versionMismatch": "Usando o TypeScript ({1}) para recursos do editor. TypeScript ({0}) está instalado globalmente em sua máquina. Erros no VS Code podem diferir dos erros TSC", + "moreInformation": "Mais informações", + "doNotCheckAgain": "Não verificar novamente", + "close": "Fechar", + "updateTscCheck": "Atualizada configuração de usuário 'typescript.check.tscVersion' para false " +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/features/completionItemProvider.i18n.json b/i18n/ptb/extensions/typescript/out/features/completionItemProvider.i18n.json new file mode 100644 index 0000000000000..58097d90545cc --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/features/completionItemProvider.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "acquiringTypingsLabel": "Adquirindo digitações...", + "acquiringTypingsDetail": "Adquirindo definições de digitações para o Intellisense." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/ptb/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json new file mode 100644 index 0000000000000..99716f32145fd --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ts-check": "Habilita verificação semântica em um arquivo JavaScript. Deve estar no topo de um arquivo.", + "ts-nocheck": "Desabilita verificação semântica em um arquivo JavaScript. Deve estar no topo de um arquivo.", + "ts-ignore": "Suprime erros de @ts-check na próxima linha de um arquivo." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/features/implementationsCodeLensProvider.i18n.json b/i18n/ptb/extensions/typescript/out/features/implementationsCodeLensProvider.i18n.json new file mode 100644 index 0000000000000..ef8dd6423d6a6 --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/features/implementationsCodeLensProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "oneImplementationLabel": "1 implementação", + "manyImplementationLabel": "{0} implementações", + "implementationsErrorLabel": "Não foi possível determinar implementações" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/features/jsDocCompletionProvider.i18n.json b/i18n/ptb/extensions/typescript/out/features/jsDocCompletionProvider.i18n.json new file mode 100644 index 0000000000000..20b08d7679b9d --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/features/jsDocCompletionProvider.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "typescript.jsDocCompletionItem.documentation": "Comentário JSDoc" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/features/referencesCodeLensProvider.i18n.json b/i18n/ptb/extensions/typescript/out/features/referencesCodeLensProvider.i18n.json new file mode 100644 index 0000000000000..1838c3c162117 --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/features/referencesCodeLensProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "oneReferenceLabel": "1 referência", + "manyReferenceLabel": "{0} referências", + "referenceErrorLabel": "Não foi possível determinar as referências" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/typescriptMain.i18n.json b/i18n/ptb/extensions/typescript/out/typescriptMain.i18n.json new file mode 100644 index 0000000000000..82e6c288fb198 --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/typescriptMain.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "typescript.projectConfigNoWorkspace": "Favor abrir uma pasta no VS Code para usar um projeto TypeScript ou JavaScript", + "typescript.projectConfigUnsupportedFile": "Não foi possível determinar o projeto TypeScript ou JavaScript. Tipo de arquivo não suportado", + "typescript.projectConfigCouldNotGetInfo": "Não foi possível determinar o projeto TypeScript ou JavaScript", + "typescript.noTypeScriptProjectConfig": "Arquivo não é parte de um projeto TypeScript", + "typescript.noJavaScriptProjectConfig": "Arquivo não é parte de um projeto JavaScript", + "typescript.configureTsconfigQuickPick": "Configurar tsconfig.json", + "typescript.configureJsconfigQuickPick": "Configurar jsconfig.json", + "typescript.projectConfigLearnMore": "Saber Mais" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/ptb/extensions/typescript/out/typescriptServiceClient.i18n.json new file mode 100644 index 0000000000000..37527e507b0ea --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noServerFound": "O caminho {0} não aponta para uma instalação de tsserver válida. Voltando para a versão do TypeScript empacotada.", + "noBundledServerFound": "O tsserver do VS Code foi excluído por outra aplicação, como por exemplo uma ferramenta de detecção de virus mal-comportada. Favor reinstalar o VS Code.", + "versionNumber.custom": "personalizado", + "serverCouldNotBeStarted": "Servidor de linguagem TypeScript não pôde ser iniciado. Mensagem de erro é: {0}", + "useVSCodeVersionOption": "Usar a Versão do VS Code", + "activeVersion": "Atualmente ativo", + "useWorkspaceVersionOption": "Use a versão de área de trabalho", + "learnMore": "Saiba Mais", + "selectTsVersion": "Selecione a versão do TypeScript usada para os recursos de linguagem JavaScript e TypeScript", + "typescript.openTsServerLog.notSupported": "Logging de TS Server requer TS TS 2.2.2+", + "typescript.openTsServerLog.loggingNotEnabled": "Logging de TS Server está desligado. Por favor configure 'typescript.tsserver.log' e reinicie o TS Server para habilitar o log", + "typescript.openTsServerLog.enableAndReloadOption": "Habilitar logging e reniciar TS server", + "typescript.openTsServerLog.noLogFile": "O TS Server não iniciou o logging.", + "openTsServerLog.openFileFailedFailed": "Não foi possível abrir o arquivo de log do TS Server", + "serverDiedAfterStart": "O serviço de linguagem TypeScript morreu 5 vezes depois que começou. O serviço não será reiniciado.", + "serverDiedReportIssue": "Reportar Problema", + "serverDied": "O serviço TypeScript morreu inesperadamente 5 vezes nos últimos 5 minutos." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/utils/logger.i18n.json b/i18n/ptb/extensions/typescript/out/utils/logger.i18n.json new file mode 100644 index 0000000000000..bc738f43d0c37 --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/utils/logger.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "channelName": "TypeScript" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/utils/projectStatus.i18n.json b/i18n/ptb/extensions/typescript/out/utils/projectStatus.i18n.json new file mode 100644 index 0000000000000..6f06552e9293a --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/utils/projectStatus.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hintExclude": "Para habilitar os recursos de linguagem JavaScript/TypeScipt em todo o projeto, excluir pastas com muitos arquivos, como: {0}", + "hintExclude.generic": "Para habilitar os recursos de linguagem JavaScript/TypeScipt em todo o projeto, excluir pastas grandes com arquivos em que você não trabalha.", + "large.label": "Configurar exclusões", + "hintExclude.tooltip": "Para habilitar os recursos de linguagem JavaScript/TypeScipt em todo o projeto, excluir pastas grandes com arquivos em que você não trabalha." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/ptb/extensions/typescript/out/utils/typingsStatus.i18n.json new file mode 100644 index 0000000000000..e6e29d6431a9b --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "installingPackages": "Buscando dados para melhor IntelliSense do TypeScript", + "typesInstallerInitializationFailed.title": "Não foi possível instalar arquivos de tipagens para recursos da linguagem JavaScript. Por favor, certifique-se de que a NPM está instalado ou configure 'typescript.npm' em suas configurações de usuário", + "typesInstallerInitializationFailed.moreInformation": "Mais informações", + "typesInstallerInitializationFailed.doNotCheckAgain": "Não verificar novamente", + "typesInstallerInitializationFailed.close": "Fechar" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/package.i18n.json b/i18n/ptb/extensions/typescript/package.i18n.json new file mode 100644 index 0000000000000..5537ef4a6eee8 --- /dev/null +++ b/i18n/ptb/extensions/typescript/package.i18n.json @@ -0,0 +1,51 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "typescript.reloadProjects.title": "Recarregar Projeto", + "javascript.reloadProjects.title": "Recarregar Projeto", + "configuration.typescript": "TypeScript", + "typescript.useCodeSnippetsOnMethodSuggest.dec": "Funções completas com a assinatura do parâmetro.", + "typescript.tsdk.desc": "Especifica o caminho da pasta que contém os arquivos tsserver e lib*.d.ts para usar.", + "typescript.disableAutomaticTypeAcquisition": "Desabilita a aquisição automática de tipo. Requer TypeScript > = 2.0.6 e um reinício depois da alteração.", + "typescript.check.tscVersion": "Verifica se um ima instalação global do compilador TypeScript (por exemplo, tsc) difere do serviço de linguagem TypeScript usado.", + "typescript.tsserver.log": "Habilita o log do servidor TS para um arquivo. Este log pode ser usado para diagnosticar problemas do servidor de TS. O log pode conter caminhos de arquivo, código-fonte e outras informações potencialmente confidenciais do seu projeto.", + "typescript.tsserver.trace": "Habilita o rastreamento de mensagens enviadas para o servidor de TS. Este rastreamento pode ser usado para diagnosticar problemas do servidor de TS. O rastreamento pode conter caminhos de arquivo, código-fonte e outras informações potencialmente confidenciais do seu projeto.", + "typescript.validate.enable": "Habilita/Desabilita a validação TypeScript.", + "typescript.format.enable": "Habilita/Desabilita o formatador padrão TypeScript.", + "javascript.format.enable": "Habilita/Desabilita o formatador padrão JavaScript.", + "format.insertSpaceAfterCommaDelimiter": "Define o tratamento de espaços após um delimitador vírgula.", + "format.insertSpaceAfterConstructor": "Define a manipulação de espaços após a palavra-chave do construtor. Requer TypeScript > = 2.3.0.", + "format.insertSpaceAfterSemicolonInForStatements": "Define o tratamento de espaços após um ponto e vírgula para um comando.", + "format.insertSpaceBeforeAndAfterBinaryOperators": "Define o tratamento de espaços após um operador binário.", + "format.insertSpaceAfterKeywordsInControlFlowStatements": "Define o tratamento de espaços após palavras-chave em um comando de controle de fluxo.", + "format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": "Define o tratamento de espaços após uma palavra-chave de função para funções anônimas.", + "format.insertSpaceBeforeFunctionParenthesis": "Define a manipulação de espaços antes de parênteses do argumento de função. Requer TypeScript > = 2.1.5.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": "Define a manipulação de espaços após abrir e antes de fechar parênteses não vazios.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": "Define a manipulação de espaços após abrir e antes de fechar colchetes não vazios.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": "Define a manipulação de espaços após abrir e antes de fechar chaves não vazias. Requer TypeScript >= 2.3.0.", + "format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": "Define a manipulação de espaços após abrir e antes de fechar chaves de cadeias de caracteres de modelos. Requer TypeScript >= 2.0.6.", + "format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": "Define a manipulação de espaços após abrir e antes de fechar chaves de expressões JSX. Requer TypeScript >= 2.0.6.", + "format.insertSpaceAfterTypeAssertion": "Define a manipulação de espaços após asserções de tipo em TypeScript. Requer TypeScript >= 2,4.", + "format.placeOpenBraceOnNewLineForFunctions": "Define-se uma chave de abertura é colocada em uma nova linha para funções ou não.", + "format.placeOpenBraceOnNewLineForControlBlocks": "Define-se uma chave de abertura é colocada em uma nova linha para blocos de controle ou não.", + "javascript.validate.enable": "Habilitar/Desabilitar validação JavaScript.", + "typescript.goToProjectConfig.title": "Ir para a Configuração do Projeto", + "javascript.goToProjectConfig.title": "Ir para a Configuração do Projeto", + "javascript.referencesCodeLens.enabled": "Habilitar/desabilitar referências CodeLens em arquivos JavaScript.", + "typescript.referencesCodeLens.enabled": "Habilitar/desabilitar referências CodeLens em arquivos TypeScript. Requer TypeScript > = 2.0.6.", + "typescript.implementationsCodeLens.enabled": "Habilitar/desabilitar implementações CodeLens. Requer TypeScript > = 2.0.6.", + "typescript.openTsServerLog.title": "Abrir arquivo de log do servidor TS", + "typescript.restartTsServer": "Reiniciar o servidor TS", + "typescript.selectTypeScriptVersion.title": "Selecionar a versão do JavaScript", + "jsDocCompletion.enabled": "Habilitar/Desabilitar comentários JSDoc automáticos.", + "javascript.implicitProjectConfig.checkJs": "Habilitar/desabilitar verificação semântica de arquivos JavaScript. Os arquivos existentes jsconfig.json ou tsconfig.json substituem essa configuração. Requer TypeScript > = 2.3.1.", + "typescript.npm": "Especifica o caminho para o executável do NPM usado para Aquisição de Tipo Automático. Requer TypeScript > = 2.3.4.", + "typescript.check.npmIsInstalled": "Verificar se o NPM está instalado para aquisição automática de tipo.", + "javascript.nameSuggestions": "Habilitar/desabilitar incluindo nomes exclusivos do arquivo nas listas de sugestão de JavaScript.", + "typescript.tsc.autoDetect": "Controla se a auto-detecção de tarefas tsc estão ligadas ou desligadas.", + "typescript.problemMatchers.tsc.label": "Problemas TypeScript", + "typescript.problemMatchers.tscWatch.label": "Problemas TypeScript (modo observação)" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/browser/ui/actionbar/actionbar.i18n.json b/i18n/ptb/src/vs/base/browser/ui/actionbar/actionbar.i18n.json new file mode 100644 index 0000000000000..4ecb2c803f4cd --- /dev/null +++ b/i18n/ptb/src/vs/base/browser/ui/actionbar/actionbar.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "titleLabel": "{0} ({1})" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/browser/ui/aria/aria.i18n.json b/i18n/ptb/src/vs/base/browser/ui/aria/aria.i18n.json new file mode 100644 index 0000000000000..e558eb6187aa1 --- /dev/null +++ b/i18n/ptb/src/vs/base/browser/ui/aria/aria.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "repeated": "{0} (ocorreu novamente)" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/browser/ui/findinput/findInput.i18n.json b/i18n/ptb/src/vs/base/browser/ui/findinput/findInput.i18n.json new file mode 100644 index 0000000000000..524ba7bb4a79b --- /dev/null +++ b/i18n/ptb/src/vs/base/browser/ui/findinput/findInput.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultLabel": "entrada" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/browser/ui/findinput/findInputCheckboxes.i18n.json b/i18n/ptb/src/vs/base/browser/ui/findinput/findInputCheckboxes.i18n.json new file mode 100644 index 0000000000000..1a477ef1e6d2b --- /dev/null +++ b/i18n/ptb/src/vs/base/browser/ui/findinput/findInputCheckboxes.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "caseDescription": "Diferenciar Maiúsculas de Minúsculas", + "wordsDescription": "Coincidir Palavra Inteira", + "regexDescription": "Usar Expressão Regular" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/browser/ui/inputbox/inputBox.i18n.json b/i18n/ptb/src/vs/base/browser/ui/inputbox/inputBox.i18n.json new file mode 100644 index 0000000000000..0b282bdee8a51 --- /dev/null +++ b/i18n/ptb/src/vs/base/browser/ui/inputbox/inputBox.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "alertErrorMessage": "Erro: {0}", + "alertWarningMessage": "Aviso: {0}", + "alertInfoMessage": "Informações: {0}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/ptb/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json new file mode 100644 index 0000000000000..ff9f2c98cbb22 --- /dev/null +++ b/i18n/ptb/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "imgMeta": "{0}x{1} {2}", + "largeImageError": "A imagem é muito grande para ser exibida no editor.", + "resourceOpenExternalButton": "Abrir imagem usando um programa externo?", + "nativeBinaryError": "O arquivo não pode ser exibido no editor porque é binário, muito grande ou usa uma codificação de texto sem suporte.", + "sizeB": "{0}B", + "sizeKB": "{0}KB", + "sizeMB": "{0}MB", + "sizeGB": "{0}GB", + "sizeTB": "{0}TB" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/browser/ui/toolbar/toolbar.i18n.json b/i18n/ptb/src/vs/base/browser/ui/toolbar/toolbar.i18n.json new file mode 100644 index 0000000000000..4a046b57296cd --- /dev/null +++ b/i18n/ptb/src/vs/base/browser/ui/toolbar/toolbar.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "more": "Mais" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/common/errorMessage.i18n.json b/i18n/ptb/src/vs/base/common/errorMessage.i18n.json new file mode 100644 index 0000000000000..257ffd9e14c16 --- /dev/null +++ b/i18n/ptb/src/vs/base/common/errorMessage.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "message": "{0}. Código de erro: {1}", + "error.permission.verbose": "Permissão Negada (HTTP {0})", + "error.permission": "Permissão Negada", + "error.http.verbose": "{0} (HTTP {1}: {2})", + "error.http": "{0} (HTTP {1})", + "error.connection.unknown.verbose": "Erro de Conexão Desconhecido ({0})", + "error.connection.unknown": "Ocorreu um erro de conexão desconhecido. Você não está mais conectado à Internet ou o servidor que você está conectado está offline.", + "stackTrace.format": "{0}: {1}", + "error.defaultMessage": "Ocorreu um erro desconhecido. Consulte o log para obter mais detalhes.", + "nodeExceptionMessage": "Ocorreu um erro de sistema ({0})", + "error.moreErrors": "{0} ({1} erros no total)" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/ptb/src/vs/base/common/jsonErrorMessages.i18n.json new file mode 100644 index 0000000000000..d6108586df8b1 --- /dev/null +++ b/i18n/ptb/src/vs/base/common/jsonErrorMessages.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error.invalidSymbol": "Símbolo inválido", + "error.invalidNumberFormat": "Formato de número inválido", + "error.propertyNameExpected": "Nome de propriedade esperado", + "error.valueExpected": "Valor esperado", + "error.colonExpected": "Dois-pontos esperados", + "error.commaExpected": "Vírgula esperada", + "error.closeBraceExpected": "Chave de fechamento esperada", + "error.closeBracketExpected": "Colchete de fechamento esperado", + "error.endOfFileExpected": "Fim do arquivo esperado" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/common/keybindingLabels.i18n.json b/i18n/ptb/src/vs/base/common/keybindingLabels.i18n.json new file mode 100644 index 0000000000000..bf2baf8390608 --- /dev/null +++ b/i18n/ptb/src/vs/base/common/keybindingLabels.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ctrlKey": "Ctrl", + "shiftKey": "Shift", + "altKey": "Alt", + "windowsKey": "Windows", + "ctrlKey.long": "Controle", + "shiftKey.long": "Shift", + "altKey.long": "Alt", + "cmdKey.long": "Comando", + "windowsKey.long": "Windows" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/common/processes.i18n.json b/i18n/ptb/src/vs/base/common/processes.i18n.json new file mode 100644 index 0000000000000..165322e595234 --- /dev/null +++ b/i18n/ptb/src/vs/base/common/processes.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ExecutableParser.commandMissing": "Erro: informações de executável devem definir um comando do tipo string", + "ExecutableParser.isShellCommand": "Aviso: IsShellCommand deve ser to tipo booleano. Ignorando valor {0}", + "ExecutableParser.args": "Aviso: args deve ser do tipo string[]. Ignorando valor {0}.", + "ExecutableParser.invalidCWD": "Aviso: options.cwd deve ser do tipo string. Ignorando valor {0}." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/common/severity.i18n.json b/i18n/ptb/src/vs/base/common/severity.i18n.json new file mode 100644 index 0000000000000..7aff8041180ff --- /dev/null +++ b/i18n/ptb/src/vs/base/common/severity.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "sev.error": "Erro", + "sev.warning": "Aviso", + "sev.info": "Informações" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/node/processes.i18n.json b/i18n/ptb/src/vs/base/node/processes.i18n.json new file mode 100644 index 0000000000000..3584dc9b15e34 --- /dev/null +++ b/i18n/ptb/src/vs/base/node/processes.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TaskRunner.UNC": "Não é possível executar um comando shell em uma unidade UNC." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/node/zip.i18n.json b/i18n/ptb/src/vs/base/node/zip.i18n.json new file mode 100644 index 0000000000000..a577f90ea2e53 --- /dev/null +++ b/i18n/ptb/src/vs/base/node/zip.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "notFound": "{0} não encontrado dentro do zip." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/parts/quickopen/browser/quickOpenModel.i18n.json b/i18n/ptb/src/vs/base/parts/quickopen/browser/quickOpenModel.i18n.json new file mode 100644 index 0000000000000..1d0f7ebd47a0a --- /dev/null +++ b/i18n/ptb/src/vs/base/parts/quickopen/browser/quickOpenModel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpenAriaLabelEntry": "{0}, seletor", + "quickOpenAriaLabel": "seletor" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/parts/quickopen/browser/quickOpenWidget.i18n.json b/i18n/ptb/src/vs/base/parts/quickopen/browser/quickOpenWidget.i18n.json new file mode 100644 index 0000000000000..ca3d8a5266afb --- /dev/null +++ b/i18n/ptb/src/vs/base/parts/quickopen/browser/quickOpenWidget.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpenAriaLabel": "Seletor rápido. Digite para filtrar resultados.", + "treeAriaLabel": "Seletor rápido" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/parts/tree/browser/treeDefaults.i18n.json b/i18n/ptb/src/vs/base/parts/tree/browser/treeDefaults.i18n.json new file mode 100644 index 0000000000000..5e72c45050c6e --- /dev/null +++ b/i18n/ptb/src/vs/base/parts/tree/browser/treeDefaults.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "collapse": "Recolher" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/code/electron-main/menus.i18n.json b/i18n/ptb/src/vs/code/electron-main/menus.i18n.json new file mode 100644 index 0000000000000..311f8e2400820 --- /dev/null +++ b/i18n/ptb/src/vs/code/electron-main/menus.i18n.json @@ -0,0 +1,176 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mFile": "&&Arquivo", + "mEdit": "&&Editar", + "mSelection": "&&Seleção", + "mView": "&&Visualizar", + "mGoto": "&&Ir", + "mDebug": "&&Depurar", + "mWindow": "Janela", + "mHelp": "&&Ajuda", + "mTask": "&&Tarefas", + "miNewWindow": "Nova &&Janela", + "mAbout": "Sobre {0}", + "mServices": "Serviços", + "mHide": "Ocultar {0}", + "mHideOthers": "Ocultar Outros", + "mShowAll": "Mostrar Tudo", + "miQuit": "Sair de {0}", + "miNewFile": "&&Novo Arquivo", + "miOpen": "&&Abrir", + "miOpenFolder": "Abrir &&Pasta", + "miOpenFile": "&&Abrir Arquivo", + "miOpenRecent": "Abrir &&Recente", + "miAddFolderToWorkspace": "&&Adicionar pasta para área de trabalho...", + "miSave": "&&Salvar", + "miSaveAs": "Salvar &&Como...", + "miSaveAll": "Salvar &&Tudo", + "miAutoSave": "Salvar Automaticamente", + "miRevert": "Re&&verter Arquivo", + "miCloseWindow": "Fe&&char Janela", + "miCloseFolder": "Fechar &&Pasta", + "miCloseEditor": "Fechar &&Editor", + "miExit": "Sai&&r", + "miOpenSettings": "&&Configurações", + "miOpenKeymap": "Atalhos de &&Teclado", + "miOpenKeymapExtensions": "Extensões de &&Mapeamento de Teclado", + "miOpenSnippets": "Trechos de Có&&digo do Usuário", + "miSelectColorTheme": "Cor do T&&ema", + "miSelectIconTheme": "&&Ícone de Arquivo do Tema", + "miPreferences": "&&Preferências", + "miReopenClosedEditor": "&&Reabrir Editor Fechado", + "miMore": "&&Mais...", + "miClearRecentOpen": "&&Limpar Arquivos Recentes", + "miUndo": "&&Desfazer", + "miRedo": "&&Refazer", + "miCut": "Cor&&tar", + "miCopy": "&&Copiar", + "miPaste": "Co&&lar", + "miFind": "&&Localizar", + "miReplace": "&&Substituir", + "miFindInFiles": "Localizar &&nos Arquivos", + "miReplaceInFiles": "Substituir &&nos Arquivos", + "miEmmetExpandAbbreviation": "Emmet: E&&xpandir Abreviação", + "miShowEmmetCommands": "E&&mmet...", + "miToggleLineComment": "&&Alternar Comentário de Linha", + "miToggleBlockComment": "Alternar Comentário de &&Bloco", + "miInsertCursorAbove": "&&Inserir cursor acima", + "miInsertCursorBelow": "Inserir cursor a&&baixo", + "miInsertCursorAtEndOfEachLineSelected": "Adicionar C&&ursores ao Final das Linhas", + "miAddSelectionToNextFindMatch": "Adicionar &&próxima ocorrência", + "miAddSelectionToPreviousFindMatch": "Adicionar ocorrência a&&nterior ", + "miSelectHighlights": "Selecionar todas as &&ocorrências", + "miCopyLinesUp": "&&Copiar linha acima", + "miCopyLinesDown": "C&&opiar linha abaixo", + "miMoveLinesUp": "Mo&&ver linha para cima", + "miMoveLinesDown": "Mover &&linha para baixo", + "miSelectAll": "&&Selecionar Tudo", + "miSmartSelectGrow": "&&Expandir seleção", + "miSmartSelectShrink": "&&Reduzir seleção", + "miViewExplorer": "&&Explorador", + "miViewSearch": "&&Pesquisar", + "miViewSCM": "S&&CM", + "miViewDebug": "&&Depurar", + "miViewExtensions": "E&&xtensões", + "miToggleOutput": "&&Saída", + "miToggleDebugConsole": "Con&&sole de Depuração", + "miToggleIntegratedTerminal": "Terminal &&Integrado", + "miMarker": "&&Problemas", + "miAdditionalViews": "&&Visualizações Adicionais", + "miCommandPalette": "&&Paleta de comando", + "miToggleFullScreen": "Alternar &&Tela Inteira", + "miToggleZenMode": "Alternar modo Zen", + "miToggleMenuBar": "Alternar &&Barra de Menus", + "miSplitEditor": "Dividir &&editor", + "miToggleEditorLayout": "Alternar &&Layout do Grupo de Editor", + "miToggleSidebar": "&&Alternar Barra Lateral", + "miMoveSidebarRight": "&&Mover a barra lateral para a direita", + "miMoveSidebarLeft": "&&Mover a barra lateral para a esquerda", + "miTogglePanel": "Alternar &&Painel", + "miHideStatusbar": "&&Ocultar Barra de Status", + "miShowStatusbar": "&&Mostrar Barra de Status", + "miHideActivityBar": "Ocultar Barra de &&Atividades", + "miShowActivityBar": "Mostrar Barra de &&Atividades", + "miToggleWordWrap": "Alternar &&Quebra de Linha", + "miToggleRenderWhitespace": "Alternar &&Renderização de Espaços em Branco", + "miToggleRenderControlCharacters": "Alternar &&Caracteres de Controle", + "miZoomIn": "&&Ampliar", + "miZoomOut": "Red&&uzir", + "miZoomReset": "&&Reinicializar Zoom", + "miBack": "&&Voltar", + "miForward": "&&Avançar", + "miNextEditor": "&&Próximo Editor", + "miPreviousEditor": "&&Editor Anterior", + "miNextEditorInGroup": "&&Próximo Editor Usado no Grupo", + "miPreviousEditorInGroup": "&&Editor Anterior Usado no Grupo", + "miSwitchEditor": "Trocar &&Editor", + "miFocusFirstGroup": "&&Primeiro Grupo", + "miFocusSecondGroup": "&&Segundo Grupo", + "miFocusThirdGroup": "&&Terceiro Grupo", + "miNextGroup": "&&Próximo Grupo", + "miPreviousGroup": "&&Grupo Anterior", + "miSwitchGroup": "Trocar &&Grupo", + "miGotoFile": "Ir para &&Arquivo...", + "miGotoSymbolInFile": "Ir para o &&Símbolo no Arquivo...", + "miGotoSymbolInWorkspace": "Ir para o Símbolo em &&Área de Trabalho", + "miGotoDefinition": "Ir para &&Definição", + "miGotoTypeDefinition": "Ir para a &&definição de tipo", + "miGotoImplementation": "Ir para a &&implementação", + "miGotoLine": "Ir para &&Linha...", + "miStartDebugging": "Iniciar Depuração", + "miStartWithoutDebugging": "Iniciar &&Sem Depuração", + "miStopDebugging": "&&Parar Depuração", + "miRestart Debugging": "&&Reiniciar Depuração", + "miOpenConfigurations": "Abrir &&Configurações", + "miAddConfiguration": "Adicionar Configuração...", + "miStepOver": "Pular &&Sobre", + "miStepInto": "Pular &&Dentro", + "miStepOut": "Pular &&Fora", + "miContinue": "&&Continuar", + "miToggleBreakpoint": "Alternar &&Ponto de Parada", + "miConditionalBreakpoint": "Ponto de Parada &&Condicional...", + "miColumnBreakpoint": "Ponto de Parada de C&&oluna", + "miFunctionBreakpoint": "Ponto de Parada de &&Função...", + "miNewBreakpoint": "&&Novo Ponto de Parada", + "miEnableAllBreakpoints": "Habilitar Todos os Pontos de Parada", + "miDisableAllBreakpoints": "Desabilitar T&&odos os Pontos de Parada", + "miRemoveAllBreakpoints": "Remover &&Todos os Pontos de Parada", + "miInstallAdditionalDebuggers": "&&Instalar Depuradores Adicionais...", + "mMinimize": "Minimizar", + "mZoom": "Ampliar", + "mBringToFront": "Trazer Tudo para a Frente", + "miSwitchWindow": "Alternar &&Janela...", + "miToggleDevTools": "&&Alternar Ferramentas do Desenvolvedor", + "miAccessibilityOptions": "&&Opções de Acessibilidade", + "miReportIssues": "Relatar &&Problemas", + "miWelcome": "&&Bem-vindo", + "miInteractivePlayground": "Playground &&Interativo", + "miDocumentation": "&&Documentação", + "miReleaseNotes": "&&Notas de Versão", + "miKeyboardShortcuts": "Referência de &&Atalhos de Teclado", + "miIntroductoryVideos": "&&Vídeos Introdutórios", + "miTipsAndTricks": "&&Dicas e truques", + "miTwitter": "&&Junte-se a nós no Twitter", + "miUserVoice": "&&Pesquisar Solicitações de Recursos", + "miLicense": "&&Exibir Licença", + "miPrivacyStatement": "&&Política de Privacidade", + "miAbout": "&&Sobre", + "miRunTask": "&&Executar Tarefa...", + "miRestartTask": "R&&einiciar Tarefa em Execução", + "miTerminateTask": "&&Finalizar Tarefa", + "miBuildTask": "Executar Tarefa de &&compilação", + "miConfigureTask": "&&Configurar tarefas", + "accessibilityOptionsWindowTitle": "Opções de Acessibilidade", + "miRestartToUpdate": "Reinicie para Atualizar...", + "miCheckingForUpdates": "Verificando Atualizações...", + "miDownloadUpdate": "Baixar Atualização Disponível", + "miDownloadingUpdate": "Baixando Atualização...", + "miInstallingUpdate": "Instalando Atualização...", + "miCheckForUpdates": "Verificar Atualizações...", + "aboutDetail": "\nVersão {0}\nConfirmação {1}\nData {2}\nShell {3}\nRenderizador {4}\nNó {5}", + "okButton": "OK" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/code/electron-main/window.i18n.json b/i18n/ptb/src/vs/code/electron-main/window.i18n.json new file mode 100644 index 0000000000000..abee584a9c11d --- /dev/null +++ b/i18n/ptb/src/vs/code/electron-main/window.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hiddenMenuBar": "Você ainda pode acessar a barra de menu pressionando a tecla * * Alt * *." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/code/electron-main/windows.i18n.json b/i18n/ptb/src/vs/code/electron-main/windows.i18n.json new file mode 100644 index 0000000000000..c7c535d2dd2c8 --- /dev/null +++ b/i18n/ptb/src/vs/code/electron-main/windows.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ok": "OK", + "pathNotExistTitle": "O caminho não existe", + "pathNotExistDetail": "O caminho '{0}' não parece mais existir no disco.", + "reopen": "Reabrir", + "wait": "Continuar Esperando", + "close": "Fechar", + "appStalled": "A janela não está mais respondendo", + "appStalledDetail": "Você pode reabrir, fechar a janela ou continuar esperando.", + "appCrashed": "A janela foi fechada inesperadamente", + "appCrashedDetail": "Pedimos desculpas pelo inconveniente! Você pode reabrir a janela para continuar de onde parou.", + "openFile": "Abrir Arquivo", + "openFolder": "Abrir Pasta" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/code/node/cliProcessMain.i18n.json b/i18n/ptb/src/vs/code/node/cliProcessMain.i18n.json new file mode 100644 index 0000000000000..ee0b74f6e41e5 --- /dev/null +++ b/i18n/ptb/src/vs/code/node/cliProcessMain.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "notFound": "Extensão '{0}' não encontrada.", + "notInstalled": "Extensão '{0}' não está instalada.", + "useId": "Certifique-se de usar a ID de extensão completa, incluindo o editor, por exemplo: {0}", + "successVsixInstall": "Extensão '{0}' foi instalada com sucesso!", + "alreadyInstalled": "Extensão '{0}' já está instalada.", + "foundExtension": "Encontrado '{0}' na loja VS Code.", + "installing": "Instalando...", + "successInstall": "Extensão '{0}' v {1} foi instalada com sucesso!", + "uninstalling": "Desinstalando {0}...", + "successUninstall": "Extensão '{0}' foi desinstalada com sucesso!" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/browser/widget/diffReview.i18n.json b/i18n/ptb/src/vs/editor/browser/widget/diffReview.i18n.json new file mode 100644 index 0000000000000..40b318ab1590a --- /dev/null +++ b/i18n/ptb/src/vs/editor/browser/widget/diffReview.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "Fechar", + "header": "Diferença {0} de {1}: original {2}, {3} linhas, modificado {4}, {5} linhas", + "blankLine": "em branco", + "equalLine": "original {0}, {1} modificados: {2}", + "insertLine": "+ modificado {0}: {1}", + "deleteLine": "-original {0}: {1}", + "editor.action.diffReview.next": "Ir para a próxima diferença", + "editor.action.diffReview.prev": "Ir para a diferença anterior" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json new file mode 100644 index 0000000000000..c1f57637d2c77 --- /dev/null +++ b/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -0,0 +1,89 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorConfigurationTitle": "Editor", + "fontFamily": "Controla a família de fontes.", + "fontWeight": "Controla o peso da fonte.", + "fontSize": "Controla o tamanho da fonte em pixels.", + "lineHeight": "Controla a altura da linha. Use 0 para computar a altura da linha a partir do tamanho da fonte.", + "letterSpacing": "Controla o espaçamento da letra em pixels.", + "lineNumbers": "Controla a exibição de números de linha. Valores possíveis são 'on', 'off' e 'relative'. 'relative' mostra a contagem de linhas a partir da posição atual do cursor.", + "rulers": "Colunas nas quais mostrar réguas verticais", + "wordSeparators": "Caracteres que serão usados como separadores de palavras ao fazer navegação relacionada a palavras ou operações", + "tabSize": "O número de espaços equivalentes a uma tabulação. Esta configuração é sobreposta no conteúdo do arquivo quando `editor.detectIndentation` está ligado.", + "tabSize.errorMessage": "Esperado 'número'. Note que o valor \"auto\" foi alterado pela configuração 'editor.detectIndentation'.", + "insertSpaces": "Insere espaços quanto pressionado Tab. Esta configuração é sobrescrita com base no conteúdo do arquivo quando 'editor.detectIndentation' está habilitado.", + "insertSpaces.errorMessage": "Esperado 'booleano'. Note que o valor \"auto\" foi alterado pela configuração 'editor.detectIndentation'.", + "detectIndentation": "Quando um arquivo está sendo aberto, 'editor.tabSize' e 'editor.insertSpace' será detectado com base no conteúdo do arquivo.", + "roundedSelection": "Controla se as seleções têm cantos arredondados", + "scrollBeyondLastLine": "Controla se o editor rolará além da última linha", + "minimap.enabled": "Controla se o mini mapa é exibido", + "minimap.showSlider": "Controla se o controle deslizante minimap é oculto automaticamente.", + "minimap.renderCharacters": "Renderizar os caracteres em uma linha (em oposição a blocos de caracteres)", + "minimap.maxColumn": "Limitar o tamanho de um mini-mapa para renderizar no máximo um número determinado de colunas", + "find.seedSearchStringFromSelection": "Controla se nós inicializamos a string de pesquisa na Ferramenta de Pesquisa a partir da seleção do editor", + "find.autoFindInSelection": "Controla se a configuração Find in Selection deve estar ativada quando vários caracteres ou linhas de texto estão selecionados no editor", + "wordWrap.off": "As linhas nunca serão quebradas.", + "wordWrap.on": "As linhas serão quebradas na largura de visualização", + "wordWrap.wordWrapColumn": "As linhas serão quebradas em `editor.wordWrapColumn`.", + "wordWrap.bounded": "As linhas serão quebradas no mínimo entre a largura de visualização e `editor.wordWrapColumn`.", + "wordWrap": "Controla como as linhas devem ser quebradas automaticamente. Pode ser:\n- 'off' (quebra automática de linha desabilitada)\n- 'on' (quebra automática de linha na largura da janela)\n- 'wordWrapColumn' (quebra automática no numero de colunas definido em `editor.wordWrapColumn`) ou\n- 'bounded' (quebra automática em uma dimensão minima da janela e na largura configurada)", + "wordWrapColumn": "Controla a coluna de quebra de linha do editor quando editor.wordWrap` é 'wordWrapColumn' ou 'bounded'.", + "wrappingIndent": "Controla o recuo de linhas quebradas. Pode ser \"none\", \"same\" ou \"indent\".", + "mouseWheelScrollSensitivity": "Um multiplicador a ser usado em \"deltaX\" e \"deltaY\" dos eventos de rolagem do botão de rolagem do mouse", + "multiCursorModifier.ctrlCmd": "Mapeia para 'Control' no Windows e Linux e 'Command' no OSX.", + "multiCursorModifier.alt": "Mapeia para 'Alt' em Windows e Linux e 'Option' em OSX.", + "multiCursorModifier": "O modificador a ser usado para adicionar vários cursores com o mouse. `ctrlCmd` mapeia 'Control' no Windows e Linux e 'Command' no OSX. Os gestos do mouse Ir para definição e Abrir Link irão adaptar-se tal maneira que eles não entrem em conflito com o modificador multicursor.", + "quickSuggestions.strings": "Habilitar sugestões rápidas dentro de strings.", + "quickSuggestions.comments": "Habilitar sugestões rápidas dentro de comentários.", + "quickSuggestions.other": "Habilitar sugestões rápidas fora de strings e comentários.", + "quickSuggestions": "Controlar se sugestões devem aparecer automaticamente ao digitar", + "quickSuggestionsDelay": "Controla o atraso em ms após o qual sugestões rápidas serão exibidas", + "parameterHints": "Habilita pop-up que mostra documentação de parâmetros e o tipo de informação conforme você digita", + "autoClosingBrackets": "Controla se o editor deve fechar colchetes automaticamente depois de abri-los", + "formatOnType": "Controla se o editor deve formatar automaticamente a linha após a digitação", + "formatOnPaste": "Controla se o editor deve formatar automaticamente o conteúdo colado. Um formatador deve estar disponível e o formatador deve ser capaz de formatar apenas uma parte do documento.", + "autoIndent": "Controles se o editor deve ajustar automaticamente o recuo, quando os usuários digitam, colam ou movem linhas. Regras de recuo da língua devem estar disponíveis. ", + "suggestOnTriggerCharacters": "Controla se as sugestões devem aparecer automaticamente ao digitar caracteres de gatilho", + "acceptSuggestionOnEnter": "Controla se as sugestões devem ser aceitas com 'Enter' - em adição a 'Tab'. Ajuda a evitar a ambiguidade entre a inserção de novas linhas ou aceitar sugestões. O valor 'smart' significa apenas aceitar uma sugestão com Enter quando ela fizer uma mudança textual", + "acceptSuggestionOnCommitCharacter": "Controla se as sugestões devem ser aceitas em caracteres de confirmação. Por exemplo, em JavaScript, o ponto-e-vírgula (';') pode ser um caractere de confirmação que aceita uma sugestão e digita esse caractere.", + "snippetSuggestions": "Controla se os snippets são exibidos juntamente com as outras sugestões e como eles são ordenados.", + "emptySelectionClipboard": "Controla se a cópia sem nenhuma seleção copia a linha atual.", + "wordBasedSuggestions": "Controla se o auto-completar deve ser calculado baseado nas palavras no documento.", + "suggestFontSize": "Tamanho da fonte para a ferramenta de sugestão", + "suggestLineHeight": "Altura de linha para a ferramenta de sugestão", + "selectionHighlight": "Controla se o editor deve realçar correspondências semelhantes à seleção", + "occurrencesHighlight": "Controla se o editor deve realçar ocorrências de símbolos semânticos.", + "overviewRulerLanes": "Controla o número de decorações que podem ser exibidas na mesma posição na régua de visão geral", + "overviewRulerBorder": "Controla se deve desenhar uma borda ao redor da régua de visão geral.", + "cursorBlinking": "Controla o estilo de animação do cursor, os valores possíveis são 'blink', 'smooth', 'phase', 'expand' e 'solid'", + "mouseWheelZoom": "Alterar o zoom da fonte editor quando utilizada a roda do mouse e pressionando Ctrl", + "cursorStyle": "Controla o estilo do cursor, os valores aceitos são 'block', 'block-outline', 'line', 'line-thin', 'underline' e 'underline-thin'", + "fontLigatures": "Habilita ligaduras de fontes", + "hideCursorInOverviewRuler": "Controla se o cursor deve ficar oculto na régua de visão geral.", + "renderWhitespace": "Controla como o editor deve rendenizar caracteres de espaços em branco, possibilidades são 'none', 'boundary' e 'all'. A opção 'boundary' não rendeniza espaços simples entre palavras.", + "renderControlCharacters": "Controla se o editor deve renderizar caracteres de controle", + "renderIndentGuides": "Controla se o editor deve renderizar guias de identação", + "renderLineHighlight": "Controla como o editor deve renderizar a linha atual, as possibilidades são 'none', 'gutter', 'line' e 'all'.", + "codeLens": "Controla se o editor exibirá a lente de códigos.", + "folding": "Controla se o editor tem codigo colapsível hablitado", + "showFoldingControls": "Controla se os controles de desdobramento na divisão são ocultas automaticamente.", + "matchBrackets": "Realça colchetes correspondente quando um deles estiver selecionado.", + "glyphMargin": "Controla se o editor deve renderizar a margem vertical de ícones. A margem vertical de ícones é usada primordialmente na depuração", + "useTabStops": "Inserção e deleção de espaço em branco seguem a tabulação", + "trimAutoWhitespace": "Remove espaços em branco inseridos automaticamente no fim da linha", + "stablePeek": "Mantém os editores de visualização abertos mesmo quando clicando seu conteúdo ou teclando Escape.", + "dragAndDrop": "Controla se o editor deve permitir mover seleções via arrastar e soltar.", + "accessibilitySupport.auto": "O editor irá utilizar a plataforma da API para detectar quando um leitor de tela está conectado.", + "accessibilitySupport.on": "O editor será permanentemente otimizado para o uso de um leitor de tela.", + "accessibilitySupport.off": "O editor nunca será otimizado para o uso de um leitor de tela.", + "accessibilitySupport": "Controla quando o editor deve executar em modo otimizado para leitores de tela.", + "links": "Controla se o editor deve detectar links e torná-los clicáveis", + "sideBySide": "Controla se o editor de diff mostra as diff lado a lado ou inline.", + "ignoreTrimWhitespace": "Controla se o editor de diff mostra alterações nos espaços iniciais ou finais como diferenças", + "renderIndicators": "Controla se o editor de diff mostra indicadores +/- para alterações adicionadas/removidas", + "selectionClipboard": "Controla se a área primária de transferência Linux deve ser suportada." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/ptb/src/vs/editor/common/config/editorOptions.i18n.json new file mode 100644 index 0000000000000..53f11838ed469 --- /dev/null +++ b/i18n/ptb/src/vs/editor/common/config/editorOptions.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "accessibilityOffAriaLabel": "O editor não está acessível neste momento. Por favor pressione Alt+F1 para opções.", + "editorViewAccessibleLabel": "Conteúdo do editor" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/controller/cursor.i18n.json b/i18n/ptb/src/vs/editor/common/controller/cursor.i18n.json new file mode 100644 index 0000000000000..60bcb5f5b5ad5 --- /dev/null +++ b/i18n/ptb/src/vs/editor/common/controller/cursor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "corrupt.commands": "Exceção inesperada ao executar o comando." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/model/textModelWithTokens.i18n.json b/i18n/ptb/src/vs/editor/common/model/textModelWithTokens.i18n.json new file mode 100644 index 0000000000000..fc3574b7fde68 --- /dev/null +++ b/i18n/ptb/src/vs/editor/common/model/textModelWithTokens.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mode.tokenizationSupportFailed": "O modo falhou ao gerar token da entrada." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/modes/modesRegistry.i18n.json b/i18n/ptb/src/vs/editor/common/modes/modesRegistry.i18n.json new file mode 100644 index 0000000000000..509203220c861 --- /dev/null +++ b/i18n/ptb/src/vs/editor/common/modes/modesRegistry.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "plainText.alias": "Texto sem formatação" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/services/bulkEdit.i18n.json b/i18n/ptb/src/vs/editor/common/services/bulkEdit.i18n.json new file mode 100644 index 0000000000000..3fada6ebf5375 --- /dev/null +++ b/i18n/ptb/src/vs/editor/common/services/bulkEdit.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "conflict": "Estes arquivos foram alterados nesse meio tempo: {0}", + "summary.0": "Não foram feitas edições", + "summary.nm": "Feitas {0} edições de texto em {1} arquivos", + "summary.n0": "Feitas {0} edições de texto em um arquivo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/services/modeServiceImpl.i18n.json b/i18n/ptb/src/vs/editor/common/services/modeServiceImpl.i18n.json new file mode 100644 index 0000000000000..85f2d2943f68d --- /dev/null +++ b/i18n/ptb/src/vs/editor/common/services/modeServiceImpl.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.languages": "Contribui às declarações de linguagem.", + "vscode.extension.contributes.languages.id": "ID da linguagem", + "vscode.extension.contributes.languages.aliases": "Aliases de nome para esta linguagem.", + "vscode.extension.contributes.languages.extensions": "Extensões de arquivos associadas a esta linguagem", + "vscode.extension.contributes.languages.filenames": "Nome dos arquivos associados a esta linguagem", + "vscode.extension.contributes.languages.filenamePatterns": "Padrão glob de nomes de arquivos associados a linguagem.", + "vscode.extension.contributes.languages.mimetypes": "Tipos Mime associados à linguagem.", + "vscode.extension.contributes.languages.firstLine": "Uma expressão regular que coincide com a primeira linha de um arquivo da linguaguem.", + "vscode.extension.contributes.languages.configuration": "Um caminho relativo para um arquivo contendo opções de configuração para a linguagem." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/services/modelServiceImpl.i18n.json b/i18n/ptb/src/vs/editor/common/services/modelServiceImpl.i18n.json new file mode 100644 index 0000000000000..b6c528c5a2505 --- /dev/null +++ b/i18n/ptb/src/vs/editor/common/services/modelServiceImpl.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "diagAndSourceMultiline": "[{0}] {1}", + "diagAndSource": "[{0}] {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/ptb/src/vs/editor/common/view/editorColorRegistry.i18n.json new file mode 100644 index 0000000000000..a1bf17d6ec86b --- /dev/null +++ b/i18n/ptb/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "lineHighlight": "Cor de fundo para a posição do cursor na seleção de linhas.", + "lineHighlightBorderBox": "Cor de fundo para a borda em volta da linha na posição do cursor", + "rangeHighlight": "Cor de fundo dos ranges selecionados, assim como abertura instantânea e descoberta de recursos ", + "caret": "Cor do cursor no editor.", + "editorWhitespaces": "Cor dos caracteres em branco no editor", + "editorIndentGuides": "Cor das guias de indentação do editor.", + "editorLineNumbers": "Cor dos números de linha do editor.", + "editorRuler": "Cor das réguas do editor.", + "editorCodeLensForeground": "Cor do primeiro plano das lentes de código do editor", + "editorBracketMatchBackground": "Cor de fundo atrás do colchetes correspondentes", + "editorBracketMatchBorder": "Cor para as caixas de colchetes correspondentes", + "editorOverviewRulerBorder": "Cor da borda da régua de visão geral.", + "editorGutter": "Cor de fundo da separação do editor.O separador contém os glifos das margens e os números de linha.", + "errorForeground": "Cor do primeiro plano das linhas onduladas de erro no editor.", + "errorBorder": "Cor da borda das linhas onduladas de erro no editor.", + "warningForeground": "Cor do primeiro plano de linhas onduladas de aviso no editor.", + "warningBorder": "Cor da borda das linhas onduladas de aviso no editor." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/accessibility/browser/accessibility.i18n.json b/i18n/ptb/src/vs/editor/contrib/accessibility/browser/accessibility.i18n.json new file mode 100644 index 0000000000000..e045839f7c689 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/accessibility/browser/accessibility.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "introMsg": "Obrigado por testar a opção de acessibilidade do VS Code.", + "status": "Status", + "tabFocusModeOnMsg": "Pressionando Tab no editor corrente irá mover o foco para o próximo elemento focável. Mude este comportamento ao pressionar {0}.", + "tabFocusModeOnMsgNoKb": "Pressionando Tab no editor corrente irá mover o foco para o próximo elemento focável. O comando {0} não pode ser ativado atualmente por uma tecla.", + "tabFocusModeOffMsg": "Pressionando Tab no editor atual irá inserir um caractere Tab. Mude este comportamente ao pressionar {0}.", + "tabFocusModeOffMsgNoKb": "Pressionando Tab no editor atual irá inserir um caractere Tab. O comando {0} não pode ser ativado atualmente por uma tecla.", + "outroMsg": "Você pode ignorar essa dica e retornar ao editor apertando a tecla ESC", + "ShowAccessibilityHelpAction": "Mostrar ajuda de acessibilidade" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json b/i18n/ptb/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json new file mode 100644 index 0000000000000..4af1753636d6d --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.jumpBracket": "Ir para colchete" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json b/i18n/ptb/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json new file mode 100644 index 0000000000000..157105c4a358f --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "caret.moveLeft": "Mover cursor para a esquerda", + "caret.moveRight": "Mover cursor para a direita" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/caretOperations/common/transpose.i18n.json b/i18n/ptb/src/vs/editor/contrib/caretOperations/common/transpose.i18n.json new file mode 100644 index 0000000000000..c1d3083b1985c --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/caretOperations/common/transpose.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "transposeLetters.label": "Transport letras" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/clipboard/browser/clipboard.i18n.json b/i18n/ptb/src/vs/editor/contrib/clipboard/browser/clipboard.i18n.json new file mode 100644 index 0000000000000..903f9fc1086fc --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/clipboard/browser/clipboard.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "actions.clipboard.cutLabel": "Recortar", + "actions.clipboard.copyLabel": "Copiar", + "actions.clipboard.pasteLabel": "Colar", + "actions.clipboard.copyWithSyntaxHighlightingLabel": "Copiar com realce de sintaxe" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/comment/common/comment.i18n.json b/i18n/ptb/src/vs/editor/contrib/comment/common/comment.i18n.json new file mode 100644 index 0000000000000..ff1ba569c0c95 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/comment/common/comment.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "comment.line": "Alternar Comentário de Linha", + "comment.line.add": "Adicionar Comentário de Linha", + "comment.line.remove": "Remover Comentário de Linha", + "comment.block": "Alternar Comentário de Bloco" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/contextmenu/browser/contextmenu.i18n.json b/i18n/ptb/src/vs/editor/contrib/contextmenu/browser/contextmenu.i18n.json new file mode 100644 index 0000000000000..e2b1d946bee13 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/contextmenu/browser/contextmenu.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "action.showContextMenu.label": "Mostrar o menu de contexto do editor" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/find/browser/findWidget.i18n.json b/i18n/ptb/src/vs/editor/contrib/find/browser/findWidget.i18n.json new file mode 100644 index 0000000000000..473543c085045 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/find/browser/findWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Localizar", + "placeholder.find": "Localizar", + "label.previousMatchButton": "Correspondência anterior", + "label.nextMatchButton": "Próxima correspondência", + "label.toggleSelectionFind": "Localizar na seleção", + "label.closeButton": "Fechar", + "label.replace": "Substituir", + "placeholder.replace": "Substituir", + "label.replaceButton": "Substituir", + "label.replaceAllButton": "Substituir Tudo", + "label.toggleReplaceButton": "Ativar/desativar modo Substituir", + "title.matchesCountLimit": "Somente os primeiros 999 resultados são realçados, mas todas as operações de pesquisa funcionam em todo o texto.", + "label.matchesLocation": "{0} de {1}", + "label.noResults": "Nenhum resultado" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/find/common/findController.i18n.json b/i18n/ptb/src/vs/editor/contrib/find/common/findController.i18n.json new file mode 100644 index 0000000000000..78998c331959f --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/find/common/findController.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "startFindAction": "Localizar", + "findNextMatchAction": "Localizar Próximo", + "findPreviousMatchAction": "Localizar anterior", + "nextSelectionMatchFindAction": "Localizar Próxima Seleção", + "previousSelectionMatchFindAction": "Localizar Seleção Anterior", + "startReplace": "Substituir", + "addSelectionToNextFindMatch": "Adicionar Seleção ao Próximo Localizar Correspondência", + "addSelectionToPreviousFindMatch": "Adicionar Seleção à Correspondência de Localização Anterior", + "moveSelectionToNextFindMatch": "Mover Última Seleção para Próximo Localizar Correspondência", + "moveSelectionToPreviousFindMatch": "Mover Última Seleção para Correspondência de Localização Anterior", + "selectAllOccurrencesOfFindMatch": "Selecionar Todas as Ocorrências de Localizar Correspondência", + "changeAll.label": "Alterar todas as ocorrências" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/folding/browser/folding.i18n.json b/i18n/ptb/src/vs/editor/contrib/folding/browser/folding.i18n.json new file mode 100644 index 0000000000000..c9d6b88a85279 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/folding/browser/folding.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unfoldAction.label": "Abrir", + "unFoldRecursivelyAction.label": "Abrir recursivamente", + "foldAction.label": "Colapsar", + "foldRecursivelyAction.label": "Colapsar recursivamente", + "foldAllAction.label": "Colapsar tudo", + "unfoldAllAction.label": "Abrir tudo", + "foldLevelAction.label": "Nível de colapsamento {0}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/format/browser/formatActions.i18n.json b/i18n/ptb/src/vs/editor/contrib/format/browser/formatActions.i18n.json new file mode 100644 index 0000000000000..4327e5f6744c2 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/format/browser/formatActions.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint11": "1 edição de formatação feita na linha {0}", + "hintn1": "{0} edições de formatação feitas na linha {1}", + "hint1n": "Feita 1 edição de formatação entre as linhas {0} e {1}", + "hintnn": "Feitas {0} edições de formatação entre as linhas {1} e {2}", + "formatDocument.label": "Formatar Documento", + "formatSelection.label": "Formatar Seleção" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/ptb/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..01753366bca15 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "Não foi encontrada definição para '{0}'", + "generic.noResults": "Nenhuma definição encontrada", + "meta.title": "- {0} definições", + "actions.goToDecl.label": "Ir para Definição", + "actions.goToDeclToSide.label": "Abrir definição ao lado", + "actions.previewDecl.label": "Inspecionar definição", + "goToImplementation.noResultWord": "Nenhuma implementação encontrada para '{0}'", + "goToImplementation.generic.noResults": "Nenhuma implementação encontrada", + "meta.implementations.title": "– {0} implementações", + "actions.goToImplementation.label": "Ir para a implementação", + "actions.peekImplementation.label": "Inspecionar implementação", + "goToTypeDefinition.noResultWord": "Nenhuma definição encontrada para '{0}'", + "goToTypeDefinition.generic.noResults": "Nenhuma definição de tipo encontrada", + "meta.typeDefinitions.title": "– {0} definições de tipos", + "actions.goToTypeDefinition.label": "Ir para a definição de tipo", + "actions.peekTypeDefinition.label": "Inspecionar definição de tipo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/ptb/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..675cbe29ae198 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "Clique para mostrar {0} definições." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json b/i18n/ptb/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json new file mode 100644 index 0000000000000..0ad65de88635a --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "title.wo_source": "({0}/{1})", + "markerAction.next.label": "Ir para o Próximo Erro ou Aviso", + "markerAction.previous.label": "Ir para o Erro ou Aviso Anterior", + "editorMarkerNavigationError": "Ferramenta de marcação de edição apresentando error na cor ", + "editorMarkerNavigationWarning": "Ferramenta de marcação de edição apresentando adventência na cor", + "editorMarkerNavigationBackground": "Cor de fundo da ferramenta de marcação de navegação do editor." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/hover/browser/hover.i18n.json b/i18n/ptb/src/vs/editor/contrib/hover/browser/hover.i18n.json new file mode 100644 index 0000000000000..196a8fb2bb0aa --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/hover/browser/hover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showHover": "Mostrar Item Flutuante" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/hover/browser/modesContentHover.i18n.json b/i18n/ptb/src/vs/editor/contrib/hover/browser/modesContentHover.i18n.json new file mode 100644 index 0000000000000..2c74cf6f1ec3a --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/hover/browser/modesContentHover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "modesContentHover.loading": "Carregando..." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.i18n.json b/i18n/ptb/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.i18n.json new file mode 100644 index 0000000000000..fbbfbd0216101 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "InPlaceReplaceAction.previous.label": "Substituir pelo valor anterior", + "InPlaceReplaceAction.next.label": "Substituir pelo próximo valor" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/indentation/common/indentation.i18n.json b/i18n/ptb/src/vs/editor/contrib/indentation/common/indentation.i18n.json new file mode 100644 index 0000000000000..8edeaaf810408 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/indentation/common/indentation.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "indentationToSpaces": "Converter indentação em espaços.", + "indentationToTabs": "Coverter Indentação a Tabulações.", + "configuredTabSize": "Tamanho de Tabulação Configurado", + "selectTabWidth": "Selecione o Tamanho de Tabulação para o Arquivo Atual", + "indentUsingTabs": "Indentar Usando Tabulações", + "indentUsingSpaces": "Indentar Usando Espaços", + "detectIndentation": "Detectar Indentação a Partir do Conteúdo", + "editor.reindentlines": "Reindentar Linhas" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.i18n.json b/i18n/ptb/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..e715c4d667fe4 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inspectTMScopes": "Desenvolvedor: Inspecionar escopos TM", + "inspectTMScopesWidget.loading": "Carregando..." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json b/i18n/ptb/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json new file mode 100644 index 0000000000000..8a368ab368da1 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "lines.copyUp": "Copiar linha acima", + "lines.copyDown": "Copiar linha abaixo", + "lines.moveUp": "Mover linha para cima", + "lines.moveDown": "Mover linha para baixo", + "lines.sortAscending": "Classificar Linhas Ascendentemente", + "lines.sortDescending": "Classificar Linhas Descendentemente", + "lines.trimTrailingWhitespace": "Cortar Espaço em Branco à Direita", + "lines.delete": "Excluir linha", + "lines.indent": "Recuar linha", + "lines.outdent": "Recuar linha para a esquerda", + "lines.insertBefore": "Inserir linha acima", + "lines.insertAfter": "Inserir linha abaixo", + "lines.deleteAllLeft": "Excluir tudo à Esquerda", + "lines.deleteAllRight": "Excluir Tudo à Direita", + "lines.joinLines": "Unir Linhas", + "editor.transpose": "Transpor caracteres ao redor do cursor", + "editor.transformToUppercase": "Transformar para maiúsculas", + "editor.transformToLowercase": "Transformar para minúsculas" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/links/browser/links.i18n.json b/i18n/ptb/src/vs/editor/contrib/links/browser/links.i18n.json new file mode 100644 index 0000000000000..32cd9d3212a7b --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/links/browser/links.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "links.navigate.mac": "Cmd + clique para seguir o link", + "links.navigate": "Ctrl + clique para seguir o link", + "links.navigate.al": "Alt + clique para seguir o link", + "invalid.url": "Desculpe, falha ao abrir este link porque ele não está bem formatado: {0}", + "missing.url": "Desculpe, falha ao abrir este link porque seu destino está faltando.", + "label": "Abrir link" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json b/i18n/ptb/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json new file mode 100644 index 0000000000000..583be5b3e5c44 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mutlicursor.insertAbove": "Inserir cursor acima", + "mutlicursor.insertBelow": "Inserir cursor abaixo", + "mutlicursor.insertAtEndOfEachLineSelected": "Adicionar Cursores ao Final das Linhas" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/parameterHints/browser/parameterHints.i18n.json b/i18n/ptb/src/vs/editor/contrib/parameterHints/browser/parameterHints.i18n.json new file mode 100644 index 0000000000000..f0450d3f4de44 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/parameterHints/browser/parameterHints.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parameterHints.trigger.label": "Dicas de parâmetro de gatilho" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.i18n.json b/i18n/ptb/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.i18n.json new file mode 100644 index 0000000000000..0f8237adbb3f6 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint": "{0}, dica" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/quickFix/browser/quickFixCommands.i18n.json b/i18n/ptb/src/vs/editor/contrib/quickFix/browser/quickFixCommands.i18n.json new file mode 100644 index 0000000000000..01ae8d7aff8af --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/quickFix/browser/quickFixCommands.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickFixWithKb": "Mostrar correções ({0})", + "quickFix": "Mostrar correções", + "quickfix.trigger.label": "Correção Rápida" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.i18n.json b/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.i18n.json new file mode 100644 index 0000000000000..9d557535df611 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "meta.titleReference": "- {0} referências", + "references.action.label": "Localizar Todas as Referências" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesController.i18n.json b/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesController.i18n.json new file mode 100644 index 0000000000000..65217d2ace886 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesController.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "labelLoading": "Carregando..." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json new file mode 100644 index 0000000000000..2e25322d32c08 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "aria.oneReference": "símbolo em {0} na linha {1} e coluna {2}", + "aria.fileReferences.1": "1 símbolo em {0}, caminho completo {1}", + "aria.fileReferences.N": "{0} símbolos em {1}, caminho completo {2}", + "aria.result.0": "Nenhum resultado encontrado", + "aria.result.1": "Encontrado 1 símbolo em {0}", + "aria.result.n1": "Encontrados {0} símbolos em {1}", + "aria.result.nm": "Encontrados {0} símbolos em {1} arquivos" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json new file mode 100644 index 0000000000000..72f61eeaf832b --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "referencesFailre": "Falha ao resolver arquivo.", + "referencesCount": "{0} referências", + "referenceCount": "{0} referência", + "missingPreviewMessage": "nenhuma visualização disponível", + "treeAriaLabel": "Referências", + "noResults": "Nenhum resultado", + "peekView.alternateTitle": "Referências", + "peekViewTitleBackground": "Cor de fundo da área de visualização do título.", + "peekViewTitleForeground": "Cor de visualização do título.", + "peekViewTitleInfoForeground": "Cor da visualização de informações do título.", + "peekViewBorder": "Cor das bordas e seta da área de visualização", + "peekViewResultsBackground": "Cor de fundo da área de visualização da lista de resultados.", + "peekViewResultsMatchForeground": "Cor de primeiro plano para nós de linha na lista de resultados visualizados.", + "peekViewResultsFileForeground": "Cor de primeiro plano para nós de arquivos na lista de resultados visualizados.", + "peekViewResultsSelectionBackground": "Cor de fundo da entrada selecionada na visualização da lista de resultados.", + "peekViewResultsSelectionForeground": "Cor da entrada selecionada na visualização da lista de resultados.", + "peekViewEditorBackground": "Cor de fundo da visualização do editor.", + "peekViewEditorGutterBackground": "Cor de fundo da separação na visualização rápida do editor.", + "peekViewResultsMatchHighlight": "Corresponder cor de realce com visualização da lista de resultados.", + "peekViewEditorMatchHighlight": "Corresponder cor de realce com visualização do editor." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/rename/browser/rename.i18n.json b/i18n/ptb/src/vs/editor/contrib/rename/browser/rename.i18n.json new file mode 100644 index 0000000000000..a56535f6241cf --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/rename/browser/rename.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "no result": "Nenhum resultado.", + "aria": "Renomeado '{0}' para '{1}'com sucesso. Resumo: {2}", + "rename.failed": "Desculpe, falha na execução de renomear.", + "rename.label": "Renomear Símbolo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/rename/browser/renameInputField.i18n.json b/i18n/ptb/src/vs/editor/contrib/rename/browser/renameInputField.i18n.json new file mode 100644 index 0000000000000..49eba92fa449e --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/rename/browser/renameInputField.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "renameAriaLabel": "Renomear entrada. Digite o novo nome e tecle Enter para gravar." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/smartSelect/common/smartSelect.i18n.json b/i18n/ptb/src/vs/editor/contrib/smartSelect/common/smartSelect.i18n.json new file mode 100644 index 0000000000000..89319f9a26696 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/smartSelect/common/smartSelect.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.grow": "Expandir seleção", + "smartSelect.shrink": "Reduzir seleção" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json b/i18n/ptb/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json new file mode 100644 index 0000000000000..b064152c8be90 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "arai.alert.snippet": "Ao aceitar '{0}' foi inserido o seguinte texto: {1}", + "suggest.trigger.label": "Sugestão de gatilho" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/ptb/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json new file mode 100644 index 0000000000000..c9da4793d67a9 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorSuggestWidgetBackground": "Cor de fundo para a ferramenta de sugestão.", + "editorSuggestWidgetBorder": "Cor da borda para a ferramenta de sugestão.", + "editorSuggestWidgetForeground": "Cor de primeiro plano para a ferramenta de sugestão.", + "editorSuggestWidgetSelectedBackground": "Cor de fundo da entrada selecionada da ferramenta de sugestões.", + "editorSuggestWidgetHighlightForeground": "Cor de realce da correspondência na ferramenta de sugestão.", + "readMore": "Ler Mais...{0}", + "suggestionWithDetailsAriaLabel": "{0}, sugestão, tem detalhes", + "suggestionAriaLabel": "{0}, sugestão", + "readLess": "Ler menos... {0}", + "suggestWidget.loading": "Carregando...", + "suggestWidget.noSuggestions": "Nenhuma sugestão.", + "suggestionAriaAccepted": "{0}, aceito", + "ariaCurrentSuggestionWithDetails": "{0}, sugestão, tem detalhes", + "ariaCurrentSuggestion": "{0}, sugestão" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json b/i18n/ptb/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json new file mode 100644 index 0000000000000..0f3dd0680954e --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggle.tabMovesFocus": "Alterne o uso da tecla Tab para mover o foco" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.i18n.json b/i18n/ptb/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.i18n.json new file mode 100644 index 0000000000000..e8556cb38a817 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wordHighlight": "Cor de fundo de um símbolo durante acesso de leitura, como ao ler uma variável.", + "wordHighlightStrong": "Cor de fundo de um símbolo durante acesso de escrita, como ao escrever uma variável." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.i18n.json b/i18n/ptb/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.i18n.json new file mode 100644 index 0000000000000..41ad7313b7de5 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "Fechar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/electron-browser/textMate/TMSyntax.i18n.json b/i18n/ptb/src/vs/editor/electron-browser/textMate/TMSyntax.i18n.json new file mode 100644 index 0000000000000..dfef3cc47a597 --- /dev/null +++ b/i18n/ptb/src/vs/editor/electron-browser/textMate/TMSyntax.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid.language": "Linguagem desconhecida em `contributes.{0}.language`. Valor fornecido: {1}", + "invalid.scopeName": "Esperada uma string em 'contributes.{0}.scopeName'. Valor informado: {1}", + "invalid.path.0": "Esperada uma string em `contributes.{0}.path`. Valor informado: {1}", + "invalid.injectTo": "Valor inválido em `contributes.{0}.injectTo`. Deve ser uma matriz de nomes de escopo de idioma. Valor fornecido: {1}", + "invalid.embeddedLanguages": "Valor inválido em `contributes.{0}.embeddedLanguages`. Deve ser um objeto de mapeamento do nome do escopo para a linguagem. Valor informado: {1}", + "invalid.path.1": "É esperado que `contributes.{0}.path` ({1}) seja incluído na pasta da extensão ({2}). Isto pode tornar a extensão não portável.", + "no-tm-grammar": "Nenhuma gramática TM registrada para este idioma." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/ptb/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json new file mode 100644 index 0000000000000..04aa2bc703fba --- /dev/null +++ b/i18n/ptb/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parseErrors": "Erros parseando {0}: {1}", + "schema.openBracket": "O colchete de abertura de caractere ou sequência de caracteres.", + "schema.closeBracket": "O colchete de fechamento de caractere ou sequência de caracteres.", + "schema.comments": "Define o símbolo dos comentários", + "schema.blockComments": "Define como comentários em bloco são marcados.", + "schema.blockComment.begin": "A sequência de caracteres que inicia um comentário em bloco.", + "schema.blockComment.end": "A sequência de caracteres que termina um comentário de bloco.", + "schema.lineComment": "A sequência de caracteres que inicia um comentário de linha.", + "schema.brackets": "Define os símbolos de colchetes que aumentam ou diminuem a indentação.", + "schema.autoClosingPairs": "Define os pares de colchetes. Quando é introduzido um colchete de abertura, o colchete de fechamento é inserido automaticamente.", + "schema.autoClosingPairs.notIn": "Define uma lista de escopos onde os auto pares são desativados.", + "schema.surroundingPairs": "Define os pares de colchetes que podem ser usados para cercar uma seqüência selecionada.", + "schema.wordPattern": "A definição da palavra para a linguagem.", + "schema.wordPattern.pattern": "O padrão RegExp usado para coincidir com as palavras.", + "schema.wordPattern.flags": "Os sinalizadores RegExp usados para coincidir com as palavras.", + "schema.wordPattern.flags.errorMessage": "Deve corresponder ao padrão `/^([gimuy]+)$/`." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/node/textMate/TMGrammars.i18n.json b/i18n/ptb/src/vs/editor/node/textMate/TMGrammars.i18n.json new file mode 100644 index 0000000000000..7707ea3401f3b --- /dev/null +++ b/i18n/ptb/src/vs/editor/node/textMate/TMGrammars.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.grammars": "Contibui aos toquenizadores textmate", + "vscode.extension.contributes.grammars.language": "Identificador da linguagem para qual a sintaxe contribui.", + "vscode.extension.contributes.grammars.scopeName": "Nome do escopo Textmate usado pelo arquivo tmLanguage.", + "vscode.extension.contributes.grammars.path": "Caminho para o arquivo tmLanguage. O caminho é relativo a pasta da extensão e geralmente começa com './syntaxes/'.", + "vscode.extension.contributes.grammars.embeddedLanguages": "Um mapeamento no nome do escopo para o Id da linguagem se esta gramática contenha linguagens embutidas.", + "vscode.extension.contributes.grammars.injectTo": "Lista de nomes de escopos de linguagem aos quais esta gramática é injetada." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/actions/browser/menuItemActionItem.i18n.json b/i18n/ptb/src/vs/platform/actions/browser/menuItemActionItem.i18n.json new file mode 100644 index 0000000000000..e64a7d0ed09f0 --- /dev/null +++ b/i18n/ptb/src/vs/platform/actions/browser/menuItemActionItem.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "titleAndKb": "{0} ({1})" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/ptb/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json new file mode 100644 index 0000000000000..d7ef91038db0f --- /dev/null +++ b/i18n/ptb/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "os itens de menu devem ser um array", + "requirestring": "a propriedade `{0}` é obrigatória e deve ser do tipo `string`", + "optstring": "a propriedade `{0}` é opcional ou deve ser do tipo `string`", + "vscode.extension.contributes.menuItem.command": "Identificador do comando para ser executado. O comando deve ser declarado na seção de 'Comandos'", + "vscode.extension.contributes.menuItem.alt": "O identificador de um comando alternativo para executar. O comando deve ser declarado na sessão 'Comandos'", + "vscode.extension.contributes.menuItem.when": "Condição, que deve ser verdadeira, para mostrar esse item", + "vscode.extension.contributes.menuItem.group": "Grupo ao qual pertence este comando", + "vscode.extension.contributes.menus": "Contribui itens de menu ao editor", + "menus.commandPalette": "Paleta de comandos", + "menus.editorTitle": "Meno do título editor", + "menus.editorContext": "Mostrar o menu de contexto do editor", + "menus.explorerContext": "Menu no contexto de explorador de arquivos", + "menus.editorTabContext": "Mostrar o menu de contexto do editor", + "menus.debugCallstackContext": "O menu de contexto de pilha de chamadas de depuração", + "menus.scmTitle": "O menu de título do controle de fonte", + "menus.resourceGroupContext": "O menu de contexto do grupo de recursos de controle de fonte", + "menus.resourceStateContext": "O menu de contexto de estado de recursos do controle de fonte", + "view.viewTitle": "O menu de título da visualização contribuída", + "view.itemContext": "O menu de contexto do item da visualização contribuída", + "nonempty": "Esperado um valor não vazio", + "opticon": "a propriedade '{0}' é opcional ou pode ser do tipo 'string'", + "requireStringOrObject": "a propriedade '{0}' é obrigatória e deve ser do tipo 'string'", + "requirestrings": "a propriedade `{0}` é obrigatória e deve ser do tipo `string`", + "vscode.extension.contributes.commandType.command": "Indentificador de comando para executar", + "vscode.extension.contributes.commandType.title": "Título para o qual o comando é representado na UI", + "vscode.extension.contributes.commandType.category": "(Opcional) Sequência de categoria será agrupada na interface de usuário", + "vscode.extension.contributes.commandType.icon": "(Opcional) Icone utilizado para representar o comando na interface de usuário. Um arquivo ou configuração do tema.", + "vscode.extension.contributes.commandType.icon.light": "Caminho do Ícone quando o tema light for utilizado", + "vscode.extension.contributes.commandType.icon.dark": "Caminho do ícone quando o tema dark for utilizado", + "vscode.extension.contributes.commands": "Contribui comandos à paleta de comandos", + "dup": "Comando '{0}' aparece multiplas vezes na sessão 'comandos'\n", + "menuId.invalid": "'{0}' nao é um identificador de menu válido ", + "missing.command": "Identificador do comando para ser executado. O comando deve ser declarado na seção de 'Comandos'", + "missing.altCommand": "Referências ao item de menu no alt-command '{0}' qual nao é definido na sessão 'comandos'", + "dupe.command": "Itens de referencias do mesmo comando como padrão e alt-command", + "nosupport.altCommand": "Desculpe, mas atualmente somente o groupo 'navegação' do menu 'editor/título' suporta alt-commands" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/configuration/common/configurationRegistry.i18n.json b/i18n/ptb/src/vs/platform/configuration/common/configurationRegistry.i18n.json new file mode 100644 index 0000000000000..dd7ed79077439 --- /dev/null +++ b/i18n/ptb/src/vs/platform/configuration/common/configurationRegistry.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultConfigurations.title": "Sobreposições da Configuração Padrão", + "overrideSettings.description": "Definir que configurações do editor sejam substituídas para idioma {0}.", + "overrideSettings.defaultDescription": "Definir que configurações do editor sejam substituídas para um idioma.", + "config.property.languageDefault": "Não é possível registrar '{0}'. Isto corresponde a propriedade padrão '\\\\[.*\\\\]$' para descrever configurações do editor específico de linguagem. Use a contribuição 'configurationDefaults'.", + "config.property.duplicate": "Não é possível registrar '{0}'. Esta propriedade já está registrada." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/environment/node/argv.i18n.json b/i18n/ptb/src/vs/platform/environment/node/argv.i18n.json new file mode 100644 index 0000000000000..4cec19113d217 --- /dev/null +++ b/i18n/ptb/src/vs/platform/environment/node/argv.i18n.json @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "gotoValidation": "Argumentos no modo '--goto' deve ser no formato de 'Arquivo(:LINHA(:CARACTERE))'.", + "diff": "Abrir um editor de diff. Requer passar dois caminhos de arquivo como argumentos.", + "goto": "Abra o arquivo no caminho, na linha e caractere (addcionar:linha[:caractere] para o caminho).", + "locale": "Para localização utilize (ex. en-US ou zh-TW).", + "newWindow": "Força uma nova instância do Código.", + "performance": "Comece com o 'Desenvolvedor: Desempenho de inicialização' comando habilitado.", + "prof-startup": "Rodar o CPU profiler durante a inicialização", + "reuseWindow": "Forçar a abertura de um arquivo ou pasta na última janela ativa", + "userDataDir": "Especifica o diretório que os dados do usuário serão mantidos, útil quando estiver rodando como root.", + "verbose": "Imprimir a saída detalhada (Implica -- esperar).", + "wait": "Aguarde a janela ser fechada antes de retornar.", + "extensionHomePath": "Defina o caminho raíz para as extensões.", + "listExtensions": "Lista de extensões instaladas", + "showVersions": "Exibir versões de extensões instaladas, quando estiver usando --list-extension", + "installExtension": "Instala uma extensão.", + "uninstallExtension": "Desinstala uma extensão.", + "experimentalApis": "Permite recursos de api propostos para uma extensão.", + "disableExtensions": "Desabilita todas as extensões instaladas.", + "disableGPU": "Desabilita aceleração de hardware da GPU.", + "version": "Versão de impressão", + "help": "Uso de impressão.", + "usage": "Uso", + "options": "opções", + "paths": "caminhos", + "optionsUpperCase": "Opções" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/extensionManagement/common/extensionEnablementService.i18n.json b/i18n/ptb/src/vs/platform/extensionManagement/common/extensionEnablementService.i18n.json new file mode 100644 index 0000000000000..52f37b66ccd23 --- /dev/null +++ b/i18n/ptb/src/vs/platform/extensionManagement/common/extensionEnablementService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noWorkspace": "Não há espaço de trabalho." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/extensionManagement/common/extensionManagement.i18n.json b/i18n/ptb/src/vs/platform/extensionManagement/common/extensionManagement.i18n.json new file mode 100644 index 0000000000000..33ea82613268b --- /dev/null +++ b/i18n/ptb/src/vs/platform/extensionManagement/common/extensionManagement.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensions": "Extensões", + "preferences": "Preferências" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/ptb/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json new file mode 100644 index 0000000000000..76dc4cf48f3d0 --- /dev/null +++ b/i18n/ptb/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "notFound": "Extensão não encontrada", + "noCompatible": "Não foi possível econtrar uma versão de {0} com esta versão do Code." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json b/i18n/ptb/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json new file mode 100644 index 0000000000000..a6c5a37ab058b --- /dev/null +++ b/i18n/ptb/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalidManifest": "Extensão inválida: pacote.json nao é um arquivo JSON válido", + "restartCode": "Por favor reinicie Code antes de reinstalar {0}.", + "installDependeciesConfirmation": "A instalação de '{0}' também inclui suas dependências. Gostaria de continuar?", + "install": "Sim", + "doNotInstall": "Não", + "uninstallDependeciesConfirmation": "Gostaria de desinstalar '{0}' somente, ou suas dependências também?", + "uninstallOnly": "Apenas", + "uninstallAll": "Todos", + "cancel": "Cancelar", + "uninstallConfirmation": "Tem certeza que deseja desinstalar '{0}'?", + "ok": "OK", + "singleDependentError": "Não foi possível desinstalar a extensão '{0}'. A extensão '{1}' depende dela.", + "twoDependentsError": "Não foi possível desinstalar a extensão '{0}'. As extensões '{1}' e '{2}' dependem dela.", + "multipleDependentsError": "Não foi possível desinstalar a extensão '{0}'. As extensões '{1}' e '{2}' e outras dependem dela.", + "notExists": "Não foi possível encontrar a extensão" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/extensions/common/abstractExtensionService.i18n.json b/i18n/ptb/src/vs/platform/extensions/common/abstractExtensionService.i18n.json new file mode 100644 index 0000000000000..d521fce97ffba --- /dev/null +++ b/i18n/ptb/src/vs/platform/extensions/common/abstractExtensionService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownDep": "Extensão '{1}' falhou ao ativar. Motivo: dependência desconhecida '{0}'.", + "failedDep1": "Extensão '{1}' falhou ao ativar. Motivo: a dependência '{0}' falhou ao ativar.", + "failedDep2": "Extensão '{0}' falhou ao ativar. Motivo: mais de 10 níveis de dependências (provavelmente um laço de dependência).", + "activationError": "Ativação da extensão `{0}` falhou: {1}." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/ptb/src/vs/platform/extensions/common/extensionsRegistry.i18n.json new file mode 100644 index 0000000000000..8de8bd11bbfc7 --- /dev/null +++ b/i18n/ptb/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.engines.vscode": "Para extensões do VS Code, especifica a versão do VS Code que a extensão é compatível. Não pode ser *. Por exemplo: ^0.10.5 indica compatibilidade com uma versão mínima de 0.10.5 para o VS Code.", + "vscode.extension.publisher": "O editor da extensão do VS Code.", + "vscode.extension.displayName": "O nome de exibição para a extensão do VS Code.", + "vscode.extension.categories": "As categorias usadas pela galeria do VS Code para categorizar a extensão.", + "vscode.extension.galleryBanner": "Banner usado na loja VS Code.", + "vscode.extension.galleryBanner.color": "A cor do banner usado no cabeçalho de página da loja VS Code.", + "vscode.extension.galleryBanner.theme": "A cor do tema usada para o fonte usado no banner.", + "vscode.extension.contributes": "Todas as contribuições da extensão VS Code representadas por este pacote.", + "vscode.extension.preview": "Configura a extensão para ser marcada como pré-visualização na Loja.", + "vscode.extension.activationEvents": "Eventos de ativação para a extensão VS Code.", + "vscode.extension.activationEvents.onLanguage": "Um evento de ativação emitido sempre que um arquivo que resolve para a linguagem especificada é aberto.", + "vscode.extension.activationEvents.onCommand": "Um evento de ativação emitido sempre que o comando especificado for invocado.", + "vscode.extension.activationEvents.onDebug": "Um evento de ativação emitido sempre que uma sessão de depuração do tipo especificado é iniciada.", + "vscode.extension.activationEvents.workspaceContains": "Um evento de ativação emitido quando uma pasta que contém pelo menos um arquivo correspondente ao padrão global especificado é aberta.", + "vscode.extension.activationEvents.onView": "Um evento de ativação emitido sempre que o modo de visualização especificado é expandido.", + "vscode.extension.activationEvents.star": "Um evento de ativação emitido na inicialização do VS Code. Para garantir uma ótima experiência de usuário, por favor, use este evento de ativação em sua extensão somente quando nenhuma outra combinação de eventos de ativação funcionar em seu caso de uso.", + "vscode.extension.badges": "Matriz de emblemas a mostrar na barra lateral da página da extensão na Loja.", + "vscode.extension.badges.url": "URL da imagem do emblema.", + "vscode.extension.badges.href": "Link do emblema.", + "vscode.extension.badges.description": "Descrição do emblema.", + "vscode.extension.extensionDependencies": "Dependências para outras extensões. O identificador de uma extensão sempre é ${publisher}. ${nome}. Por exemplo: vscode.csharp.", + "vscode.extension.scripts.prepublish": "Script a ser executado antes do pacote ser publicado como uma extensão VS Code.", + "vscode.extension.icon": "O caminho para um ícone de 128x128 pixels." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/extensions/node/extensionValidator.i18n.json b/i18n/ptb/src/vs/platform/extensions/node/extensionValidator.i18n.json new file mode 100644 index 0000000000000..fe37dd1820f45 --- /dev/null +++ b/i18n/ptb/src/vs/platform/extensions/node/extensionValidator.i18n.json @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "versionSyntax": "Não foi possível analisar o valor de 'engines.vscode' {0}. Por favor, utilize, por exemplo: ^ 0.10.0, ^ 1.2.3, ^ 0.11.0, ^ 0.10.x, etc.", + "versionSpecificity1": "Versão especificada em 'engines.vscode' ({0}) não é específica o suficiente. Para versões do vscode anteriores a 1.0.0, por favor defina no mínimo a versão principal e secundária desejada. Por exemplo, ^ 0.10.0, 0.10.x, 0.11.0, etc.", + "versionSpecificity2": "Versão especificada em 'engines.vscode' ({0}) não é específica o suficiente. Para as versões do vscode posteriores a 1.0.0, por favor defina no mínimo a versão principal do desejado. Por exemplo, ^ 1.10.0, 1.10.x 1. XX, 2.x.x, etc.", + "versionMismatch": "Extensão não é compatível com Code {0}. A extensão requer: {1}.", + "extensionDescription.empty": "Descrição de extensão vazia obtida", + "extensionDescription.publisher": "a propriedade `{0}` é obrigatória e deve ser do tipo `string`", + "extensionDescription.name": "a propriedade `{0}` é obrigatória e deve ser do tipo `string`", + "extensionDescription.version": "a propriedade `{0}` é obrigatória e deve ser do tipo `string`", + "extensionDescription.engines": "a propriedade `{0}` é obrigatória e deve ser do tipo `object`", + "extensionDescription.engines.vscode": "a propriedade `{0}` é obrigatória e deve ser do tipo `string`", + "extensionDescription.extensionDependencies": "a propriedade `{0}` pode ser omitida ou deve ser do tipo `string[]`", + "extensionDescription.activationEvents1": "a propriedade `{0}` pode ser omitida ou deve ser do tipo `string[]`", + "extensionDescription.activationEvents2": "Propriedades '{0}' e '{1}' devem ser especificadas ou devem ambas ser omitidas", + "extensionDescription.main1": "a propriedade `{0}` é opcional ou pode ser do tipo `string`", + "extensionDescription.main2": "Esperado 'main' ({0}) ser incluído dentro da pasta da extensão ({1}). Isto pode fazer a extensão não-portável.", + "extensionDescription.main3": "propriedades '{0}' e '{1}' devem ser especificadas ou devem ambas ser omitidas", + "notSemver": "Versão da extensão não é compatível a semver" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/history/electron-main/historyMainService.i18n.json b/i18n/ptb/src/vs/platform/history/electron-main/historyMainService.i18n.json new file mode 100644 index 0000000000000..05f131174eada --- /dev/null +++ b/i18n/ptb/src/vs/platform/history/electron-main/historyMainService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "newWindow": "Nova Janela", + "newWindowDesc": "Abrir uma nova janela", + "recentFolders": "Pastas Recentes", + "folderDesc": "{0} {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/integrity/node/integrityServiceImpl.i18n.json b/i18n/ptb/src/vs/platform/integrity/node/integrityServiceImpl.i18n.json new file mode 100644 index 0000000000000..d252527ac1533 --- /dev/null +++ b/i18n/ptb/src/vs/platform/integrity/node/integrityServiceImpl.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "integrity.ok": "OK", + "integrity.dontShowAgain": "Não mostrar novamente", + "integrity.moreInfo": "Mais informações", + "integrity.prompt": "Sua instalação de {0} parece estar corrompida. Favor reinstalar." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/jsonschemas/common/jsonValidationExtensionPoint.i18n.json b/i18n/ptb/src/vs/platform/jsonschemas/common/jsonValidationExtensionPoint.i18n.json new file mode 100644 index 0000000000000..47ff1ba6badad --- /dev/null +++ b/i18n/ptb/src/vs/platform/jsonschemas/common/jsonValidationExtensionPoint.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "contributes.jsonValidation": "Contribui à configuração do schema json.", + "contributes.jsonValidation.fileMatch": "O padrão de arquivo a corresponder, por exemplo \"package.json\" ou \"*.launch\".", + "contributes.jsonValidation.url": "Um esquema de URL ('http:', 'https:') ou caminho relativo à pasta de extensão('./').", + "invalid.jsonValidation": "'configuration.jsonValidation' deve ser uma matriz", + "invalid.fileMatch": "'configuration.jsonValidation.fileMatch' deve ser definido", + "invalid.url": "'configuration.jsonValidation.url' deve ser uma URL ou caminho relativo", + "invalid.url.fileschema": "'configuration.jsonValidation.url' é uma URL relativa inválida: {0}", + "invalid.url.schema": "'configuration.jsonValidation.url' deve começar com ' http:', ' https: 'ou'. /' para os esquemas de referência localizados na extensão" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/keybinding/common/abstractKeybindingService.i18n.json b/i18n/ptb/src/vs/platform/keybinding/common/abstractKeybindingService.i18n.json new file mode 100644 index 0000000000000..59961c4476a0f --- /dev/null +++ b/i18n/ptb/src/vs/platform/keybinding/common/abstractKeybindingService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "first.chord": "({0}) foi pressionado. Aguardando segunda tecla de pressionamento simultâneo...", + "missing.chord": "A combinação de chave ({0}, {1}) não é um comando." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/keybinding/common/keybindingLabels.i18n.json b/i18n/ptb/src/vs/platform/keybinding/common/keybindingLabels.i18n.json new file mode 100644 index 0000000000000..bf2baf8390608 --- /dev/null +++ b/i18n/ptb/src/vs/platform/keybinding/common/keybindingLabels.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ctrlKey": "Ctrl", + "shiftKey": "Shift", + "altKey": "Alt", + "windowsKey": "Windows", + "ctrlKey.long": "Controle", + "shiftKey.long": "Shift", + "altKey.long": "Alt", + "cmdKey.long": "Comando", + "windowsKey.long": "Windows" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/ptb/src/vs/platform/markers/common/problemMatcher.i18n.json new file mode 100644 index 0000000000000..468301da2b644 --- /dev/null +++ b/i18n/ptb/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -0,0 +1,70 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ProblemPatternParser.loopProperty.notLast": "A propriedade loop só é suportada na última linha correspondente.", + "ProblemPatternParser.problemPattern.missingRegExp": "Está faltando uma expressão regular a problema padrão.", + "ProblemPatternParser.problemPattern.missingProperty": "O problema padrão é inválido. Ele deve ter ao menos um arquivo, mensagem e linha ou local de grupo de correspondência.", + "ProblemPatternParser.invalidRegexp": "Erro: a cadeia de caracteres {0} não é uma expressão regular válida.\n", + "ProblemPatternSchema.regexp": "A expressão regular para procurar um erro, aviso ou informação na saída.", + "ProblemPatternSchema.file": "O índice do grupo de correspondência do arquivo. Se omitido, será usado 1.", + "ProblemPatternSchema.location": "O índice de grupo de correspondência da localização do problema. Padrões de localização válidos são: (linha), (linha, coluna) e (startLine, startColumn, endLine, endColumn). Se omitido (linha, coluna) é assumido.", + "ProblemPatternSchema.line": "O índice de grupo de correspondência da linha do problema. O padrão é 2", + "ProblemPatternSchema.column": "O índice de grupo de correspondência de caractere da linha do problema. O padrão é 3", + "ProblemPatternSchema.endLine": "O índice de grupo de correspondência de linha final do problema. O padrão é indefinido", + "ProblemPatternSchema.endColumn": "O índice de grupo de correspondência de caráter final de linha do problema. O padrão é indefinido", + "ProblemPatternSchema.severity": "O índice de grupo de correspondência da gravidade do problema. O padrão é indefinido", + "ProblemPatternSchema.code": "O índice de grupo de correspondência do código do problema. O padrão é indefinido", + "ProblemPatternSchema.message": "O índice de grupo de correspondência da mensagem. Se omitido o padrão é 4 se o local for especificado. Caso contrário o padrão é 5.", + "ProblemPatternSchema.loop": "Em um loop de correspondência multi linha indica se este padrão é executado em um loop enquanto houver correspondências. Somente pode ser especificado no último padrão em um padrão de linha múltiplas.", + "NamedProblemPatternSchema.name": "O nome do modelo de problema.", + "NamedMultiLineProblemPatternSchema.name": "O nome do modelo de problema multi-linhas.", + "NamedMultiLineProblemPatternSchema.patterns": "Os padrões atuais.", + "ProblemPatternExtPoint": "Contribui aos modelos de problema", + "ProblemPatternRegistry.error": "Modelo de problema inválido. O modelo será ignorado.", + "ProblemMatcherParser.noProblemMatcher": "Erro: a descrição não pode ser convertida em uma correspondência de problema:\n{0}\n\n", + "ProblemMatcherParser.noProblemPattern": "Erro: a descrição nao define um padrão de problema válido: {0}\n", + "ProblemMatcherParser.noOwner": "Erro: a descriçao não define um proprietário:\n{0}\n", + "ProblemMatcherParser.noFileLocation": "Erro: a descrição não define uma localização de arquivo:\n{0}\n", + "ProblemMatcherParser.unknownSeverity": "Info: severidade {0} desconhecida. Valores válidos são erro, aviso e info.\n", + "ProblemMatcherParser.noDefinedPatter": "Erro: o padrão com o identificador {0} não existe.", + "ProblemMatcherParser.noIdentifier": "Erro: a propriedade padrão se refere a um identificador vazio.", + "ProblemMatcherParser.noValidIdentifier": "Erro: a propriedade padrão {0} não é uma variável de padrões válida.", + "ProblemMatcherParser.problemPattern.watchingMatcher": "Um problema de correspondência deve obrigatoriamente definir padrão inicial e um padrão final para monitoramento.", + "ProblemMatcherParser.invalidRegexp": "Erro: a cadeia de caracteres {0} não é uma expressão regular válida.\n", + "WatchingPatternSchema.regexp": "A expressão regular para detectar o início ou o fim de uma tarefa em segundo plano.", + "WatchingPatternSchema.file": "O índice do grupo de correspondência do arquivo. Pode ser omitido.", + "PatternTypeSchema.name": "O nome de um padrão pré-definido ou contribuído.", + "PatternTypeSchema.description": "Um padrão de problema ou o nome de um padrão de problema pré-definido ou contribuído. Pode ser omitido se base for especificada.", + "ProblemMatcherSchema.base": "O nome de uma correspondência de problema base a ser utilizado.", + "ProblemMatcherSchema.owner": "O proprietário de um problema dentro do código. Pode ser omitido se base for especificada. Default para 'externo' se omitido e base não for especificada.", + "ProblemMatcherSchema.severity": "A severidade padrão para captura de problemas. É utilizada se o padrão não definir um grupo correspondente para severidade.", + "ProblemMatcherSchema.applyTo": "Controla se um problema reportado em um documento de texto é aplicado somente para aberto, fechado ou todos os documentos.", + "ProblemMatcherSchema.fileLocation": "Define como os nomes de arquivos reportados em um padrão de problema devem ser interpretados.", + "ProblemMatcherSchema.background": "Padrões para monitorar o início e o término de um pesquisador ativo em uma tarefa em segundo plano.", + "ProblemMatcherSchema.background.activeOnStart": "Se configurado para verdadeiro, o monitor em segundo plano está em modo ativo quando a tarefa inicia. Isto é igual a emissão de uma linha que corresponde ao beginPattern", + "ProblemMatcherSchema.background.beginsPattern": "Se houver correspondência na saída o início de uma tarefa em segundo plano é sinalizada.", + "ProblemMatcherSchema.background.endsPattern": "Se houver correspondência na saída o final de uma tarefa em segundo plano é sinalizada.", + "ProblemMatcherSchema.watching.deprecated": "A propriedade watching foi descontinuada. Use background no lugar dela.", + "ProblemMatcherSchema.watching": "Padrões para monitorar o início e o término de um pesquisador observando.", + "ProblemMatcherSchema.watching.activeOnStart": "Se configurado para verdadeiro, o monitoramento está em modo ativo quando a tarefa inicia. Isto é igual a emissão de uma linha que corresponde ao beginPattern", + "ProblemMatcherSchema.watching.beginsPattern": "Se houver correspondência na saída o início de uma tarefa observada é sinalizada.", + "ProblemMatcherSchema.watching.endsPattern": "Se houver correspondência na saída o final de uma tarefa observada é sinalizada.", + "LegacyProblemMatcherSchema.watchedBegin.deprecated": "Esta propriedade está descontinuada. Ao invés, use a propriedade de observação.", + "LegacyProblemMatcherSchema.watchedBegin": "Uma expressão regular sinalizando que uma tarefa observada é ativada através da observação.", + "LegacyProblemMatcherSchema.watchedEnd.deprecated": "Esta propriedade está descontinuada. Ao invés, use a propriedade de observação.", + "LegacyProblemMatcherSchema.watchedEnd": "Uma expressão regular sinalizando que uma tarefa observada terminou a execução.", + "NamedProblemMatcherSchema.name": "O nome do correspondente do problema usado para se referir a ele.", + "NamedProblemMatcherSchema.label": "Um rótulo legível para o correspondente do problema.", + "ProblemMatcherExtPoint": "Contribui aos correspondentes de problema", + "msCompile": "Problemas do compilador Microsoft", + "lessCompile": "Menos problemas", + "gulp-tsc": "Problemas do Gulp TSC", + "jshint": "Problemas JSHint", + "jshint-stylish": "Problemas de estilo JSHint", + "eslint-compact": "Problemas compactos ESLint", + "eslint-stylish": "Problemas de estilo ESLint", + "go": "Problemas Go" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/message/common/message.i18n.json b/i18n/ptb/src/vs/platform/message/common/message.i18n.json new file mode 100644 index 0000000000000..620c63edd0712 --- /dev/null +++ b/i18n/ptb/src/vs/platform/message/common/message.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "Fechar", + "later": "Mais tarde", + "cancel": "Cancelar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/request/node/request.i18n.json b/i18n/ptb/src/vs/platform/request/node/request.i18n.json new file mode 100644 index 0000000000000..1f7fd75e5aa68 --- /dev/null +++ b/i18n/ptb/src/vs/platform/request/node/request.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "httpConfigurationTitle": "HTTP", + "proxy": "As configurações de proxy a usar. Se não forem configuradas, serão obtidas das variáveis de ambiente http_proxy e https_proxy", + "strictSSL": "Se o certificado do servidor de proxy deve ser verificado contra a lista de autoridades de certificação fornecida.", + "proxyAuthorization": "O valor para enviar como o cabeçalho de 'autorização Proxy' para cada solicitação de rede." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/telemetry/common/telemetryService.i18n.json b/i18n/ptb/src/vs/platform/telemetry/common/telemetryService.i18n.json new file mode 100644 index 0000000000000..a1d67b82fb73f --- /dev/null +++ b/i18n/ptb/src/vs/platform/telemetry/common/telemetryService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Telemetria", + "telemetry.enableTelemetry": "Permitir que os dados de uso e erros sejam enviados à Microsoft." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/ptb/src/vs/platform/theme/common/colorRegistry.i18n.json new file mode 100644 index 0000000000000..f221f95fec5a0 --- /dev/null +++ b/i18n/ptb/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -0,0 +1,89 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid.color": "Formato inválido de cor. Use #RGB, #RGBA, #RRGGBB ou #RRGGBBAA", + "schema.colors": "Cores usadas no workbench.", + "foreground": "Cor de primeiro plano geral. Essa cor é só usada se não for substituída por um componente.", + "errorForeground": "Cor de primeiro plano geral para mensagens de erro. Essa cor é só usada se não for substituída por um componente.", + "descriptionForeground": "Cor de primeiro plano para a descrição do texto provendo informação adicional, por exemplo para uma etiqueta.", + "focusBorder": "Cor geral da borda para elementos focalizados. Essa cor é usada somente se não for substituída por um componente.", + "contrastBorder": "Uma borda extra em torno de elementos para separá-los dos outros de maior contraste.", + "activeContrastBorder": "Uma borda extra em torno de elementos ativos para separá-los dos outros de maior contraste.", + "selectionBackground": "A cor de fundo das seleções de texto na área de trabalho (por exemplo, para campos de entrada ou áreas de texto). Note que isto não se aplica a seleções dentro do editor.", + "textSeparatorForeground": "Cor para separadores de texto.", + "textLinkForeground": "Cor de primeiro plano para links no texto.", + "textLinkActiveForeground": "Cor de primeiro plano para links ativos no texto.", + "textPreformatForeground": "Cor de primeiro plano para segmentos de texto pré-formatados.", + "textBlockQuoteBackground": "Cor de fundo para blocos de citações no texto.", + "textBlockQuoteBorder": "Cor da borda para blocos de citações no texto.", + "textCodeBlockBackground": "Cor de fundo para blocos de código no texto.", + "widgetShadow": "Cor de sombra ferramentas como localizar/substituir dentro do editor.", + "inputBoxBackground": "Cor de fundo da caixa de entrada.", + "inputBoxForeground": "Cor de primeiro plano da caixa de entrada.", + "inputBoxBorder": "Borda da caixa de entrada.", + "inputBoxActiveOptionBorder": "Cor da borda das opções ativas em campos de entrada.", + "inputPlaceholderForeground": "Cor de primeiro plano da caixa de entrada para o texto de espaço reservado.", + "inputValidationInfoBackground": "Cor de fundo de validação de entrada para a severidade de informações.", + "inputValidationInfoBorder": "Cor da borda de validação de entrada para a severidade de informações.", + "inputValidationWarningBackground": "Cor de fundo de validação de entrada para avisos.", + "inputValidationWarningBorder": "Cor da borda de validação para a severidade de avisos.", + "inputValidationErrorBackground": "Cor de fundo de validação de entrada para a severidade do erro.", + "inputValidationErrorBorder": "Cor da borda de validação de entrada para a severidade do erro.", + "dropdownBackground": "Cor de fundo do menu suspenso.", + "dropdownForeground": "Cor de primeiro plano do menu suspenso.", + "dropdownBorder": "Borda do menu suspenso.", + "listFocusBackground": "Cor de fundo para o item focalizado de Lista/árvore quando a lista/árvore está ativa. Uma árvore/lista de ativa tem o foco do teclado, uma inativa não.", + "listFocusForeground": "Cor de fundo da Lista/árvore para o item focalizado quando a lista/árvore está ativa. Uma árvore/lista ativa tem o foco do teclado, uma inativa não.", + "listActiveSelectionBackground": "Cor de fundo para o item selecionado de Lista/árvore quando a lista/árvore está ativa. Uma lista/árvore ativa tem o foco do teclado, uma inativa não.", + "listActiveSelectionForeground": "Cor de primeiro plano para o item selecionado de Lista/árvore quando a lista/árvore está ativa. Uma lista/árvore ativa tem o foco do teclado, uma inativa não.", + "listInactiveSelectionBackground": "Cor de fundo para o item selecionado de Lista/árvore quando a lista/árvore está inativa. Uma lista/árvore ativa tem o foco do teclado, uma inativa não.", + "listInactiveSelectionForeground": "Cor de primeiro plano para Lista/árvore para o item selecionado quando a lista/árvore está inativa. Uma árvore/lista ativa tem o foco do teclado, um inativo não.", + "listHoverBackground": "Cor de fundo de Lista/árvore quando pairando sobre itens usando o mouse.", + "listHoverForeground": "Primeiro plano da Lista/Árvoce quando passar sobre itens usando o mouse.", + "listDropBackground": "Cor de fundo ao arrastar e soltar de Lista/árvore quando movendo itens usando o mouse.", + "highlight": "Cor de primeiro plano de Lista/árvore de destaques de correspondências ao pesquisar na árvore/lista.", + "pickerGroupForeground": "Seletor rápido de cor para rótulos de agrupamento.", + "pickerGroupBorder": "Seletor rápido de cor para bordas de agrupamentos.", + "buttonForeground": "Cor de primeiro plano do botão.", + "buttonBackground": "Cor de fundo do botão.", + "buttonHoverBackground": "Cor de fundo de botão quando flutuar sobre ele.", + "badgeBackground": "Cor de fundo do distintivo. Distintivos são rótulos de pequenas informações, por exemplo, para a contagem de resultados de pesquisa.", + "badgeForeground": "Cor de primeiro plano do distintivo. Distintivos são rótulos de pequenas informações, por exemplo, para a contagem de resultados de pesquisa.", + "scrollbarShadow": "Sombra da barra de rolagem para indicar que a visualização está sendo rolada.", + "scrollbarSliderBackground": "Cor de fundo do controle deslizante.", + "scrollbarSliderHoverBackground": "Cor de fundo de controle deslizante quando estiver flutuando sobre ele.", + "scrollbarSliderActiveBackground": "Cor de fundo de controle deslizante quando ativo.", + "progressBarBackground": "Cor de fundo da barra de progresso que pode ser mostrada em operações de execução demorada.", + "editorBackground": "Cor de plano de fundo do editor.", + "editorForeground": "Cor de primeiro plano padrão do editor.", + "editorWidgetBackground": "Cor de plano de fundo das ferramentas de edição, como pesquisar/substituir.", + "editorWidgetBorder": "Cor da borda das ferramentas do editor. A cor é usada somente se a ferramenta escolhe ter uma borda e a cor não é substituída por uma ferramenta.", + "editorSelectionBackground": "Cor de seleção do editor.", + "editorSelectionForeground": "Cor do texto selecionado para alto contraste.", + "editorInactiveSelection": "Cor de seleção em um editor inativo.", + "editorSelectionHighlight": "Cor de regiões com o mesmo conteúdo da seleção.", + "editorFindMatch": "Cor da correspondência de pesquisa atual.", + "findMatchHighlight": "Cor dos outros resultados de pesquisa.", + "findRangeHighlight": "Cor da faixa que limita a pesquisa.", + "hoverHighlight": "Realçar abaixo da palavra onde é mostrado item flutuante", + "hoverBackground": "Cor de fundo para o item flutuante do editor", + "hoverBorder": "Cor da borda para o item flutuante do editor.", + "activeLinkForeground": "Cor dos links ativos.", + "diffEditorInserted": "Cor de fundo para texto que foi inserido.", + "diffEditorRemoved": "Cor de fundo para texto que foi removido.", + "diffEditorInsertedOutline": "Cor de contorno para o texto que foi inserido.", + "diffEditorRemovedOutline": "Cor de contorno para o texto que foi removido.", + "mergeCurrentHeaderBackground": "Cor de fundo de cabeçalho atual em conflito de mesclagem em linha.", + "mergeCurrentContentBackground": "Cor de fundo de conteúdo atual em conflito de mesclagem em linha.", + "mergeIncomingHeaderBackground": "Cor de fundo de cabeçalho de entrada em conflito de mesclagem em linha.", + "mergeIncomingContentBackground": "Cor de fundo de conteúdo de entrada em conflito de mesclagem em linha.", + "mergeCommonHeaderBackground": "Ancestral comum da cor de fundo do cabeçalho em conflitos de mesclagem inline.", + "mergeCommonContentBackground": "Ancestral comum da cor de fundo do conteúdo em conflitos de mesclagem inline. ", + "mergeBorder": "Cor da borda dos cabeçalhos e separadores estão em conflito de mesclagem em linha.", + "overviewRulerCurrentContentForeground": "Cor de fundo de régua de visuaização atual em conflito de mesclagem em linha.", + "overviewRulerIncomingContentForeground": "Cor de fundo de régua de visuaização de entrada em conflito de mesclagem em linha.", + "overviewRulerCommonContentForeground": "Ancestral comum da cor da régua de visão geral para conflitos de mesclagem inline." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/ptb/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json new file mode 100644 index 0000000000000..d45294dd31757 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "overwritingExtension": "Sobrescrevendo extensão {0} por {1}.", + "extensionUnderDevelopment": "Carregando extensão de desenvolvimento em {0}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/ptb/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json new file mode 100644 index 0000000000000..0feb87677bb4d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "Fechar", + "cancel": "Cancelar", + "ok": "OK" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/api/node/extHostDiagnostics.i18n.json b/i18n/ptb/src/vs/workbench/api/node/extHostDiagnostics.i18n.json new file mode 100644 index 0000000000000..867922ab8d2da --- /dev/null +++ b/i18n/ptb/src/vs/workbench/api/node/extHostDiagnostics.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "limitHit": "Não apresentando {0} erros e avisos a mais." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/ptb/src/vs/workbench/api/node/extHostTask.i18n.json new file mode 100644 index 0000000000000..4b90a12aaf247 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/api/node/extHostTask.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "task.label": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/ptb/src/vs/workbench/api/node/extHostTreeViews.i18n.json new file mode 100644 index 0000000000000..d5ca67a935360 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeView.notRegistered": "Nenhuma visualização de árvore com id '{0}' registrado.", + "treeItem.notFound": "Nenhum item de árvore com id '{0}' encontrado.", + "treeView.duplicateElement": "Elemento {0} já está registrado" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/actions/configureLocale.i18n.json b/i18n/ptb/src/vs/workbench/browser/actions/configureLocale.i18n.json new file mode 100644 index 0000000000000..80686b2c89835 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/actions/configureLocale.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "configureLocale": "Configurar Idioma", + "displayLanguage": "Define o idioma de exibição do VSCode.", + "doc": "Veja {0} para obter uma lista dos idiomas suportados.", + "restart": "Modificar o valor requer reinicialização do VSCode.", + "fail.createSettings": "Não foi possível criar '{0}' ({1}).", + "JsonSchema.locale": "O idioma da interface do usuário a ser usada." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/actions/fileActions.i18n.json b/i18n/ptb/src/vs/workbench/browser/actions/fileActions.i18n.json new file mode 100644 index 0000000000000..b8e87ac4f595b --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/actions/fileActions.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFolder": "Abrir Pasta...", + "openFileFolder": "Abrir...", + "addFolderToWorkspace": "Adicionar pasta ao espaço de trabalho...", + "add": "Adicionar", + "addFolderToWorkspaceTitle": "Adicionar pasta ao espaço de trabalho", + "removeFolderFromWorkspace": "Remover pasta da área de trabalho" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/actions/toggleActivityBarVisibility.i18n.json b/i18n/ptb/src/vs/workbench/browser/actions/toggleActivityBarVisibility.i18n.json new file mode 100644 index 0000000000000..02e74f2918f40 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/actions/toggleActivityBarVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleActivityBar": "Alternar Visibilidade da Barra de Atividades", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/actions/toggleEditorLayout.i18n.json b/i18n/ptb/src/vs/workbench/browser/actions/toggleEditorLayout.i18n.json new file mode 100644 index 0000000000000..4cdb847aaca74 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/actions/toggleEditorLayout.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleEditorGroupLayout": "Alternar Layout Vertical/Horizontal do Grupo de Editor", + "horizontalLayout": "Layout do Grupo de Editor Horizontal", + "verticalLayout": "Layout do Grupo de Editor Vertical", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json b/i18n/ptb/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json new file mode 100644 index 0000000000000..ee4fc5303618d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "Alternar Localização da Barra Lateral", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/actions/toggleSidebarVisibility.i18n.json b/i18n/ptb/src/vs/workbench/browser/actions/toggleSidebarVisibility.i18n.json new file mode 100644 index 0000000000000..5143e35479cc2 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/actions/toggleSidebarVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleSidebar": "Alternar Localização da Barra Lateral", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/actions/toggleStatusbarVisibility.i18n.json b/i18n/ptb/src/vs/workbench/browser/actions/toggleStatusbarVisibility.i18n.json new file mode 100644 index 0000000000000..5376fb36c3a63 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/actions/toggleStatusbarVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleStatusbar": "Alternar Visibilidade da Barra de Status", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/actions/toggleZenMode.i18n.json b/i18n/ptb/src/vs/workbench/browser/actions/toggleZenMode.i18n.json new file mode 100644 index 0000000000000..b0a635982f2ef --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/actions/toggleZenMode.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleZenMode": "Alternar Modo Zen", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/activitybar/activitybarActions.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/activitybar/activitybarActions.i18n.json new file mode 100644 index 0000000000000..8dab311a65fbf --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/activitybar/activitybarActions.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeFromActivityBar": "Remover da Barra de Atividades", + "keepInActivityBar": "Manter na Barra de Atividades", + "titleKeybinding": "{0} ({1})", + "additionalViews": "Visualizações Adicionais", + "numberBadge": "{0} ({1})", + "manageExtension": "Gerenciar Extensão", + "toggle": "Alternar Visualização Fixa" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json new file mode 100644 index 0000000000000..577ad33d0b41f --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hideActivitBar": "Ocultar a Barra de Atividades", + "activityBarAriaLabel": "Chave do Modo de exibição Ativo", + "globalActions": "Ações globais" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/compositePart.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/compositePart.i18n.json new file mode 100644 index 0000000000000..e12e6d4b90e56 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/compositePart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ariaCompositeToolbarLabel": "{0} ações ", + "titleTooltip": "{0} ({1})" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/binaryDiffEditor.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/binaryDiffEditor.i18n.json new file mode 100644 index 0000000000000..a38af02d66352 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/binaryDiffEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "metadataDiff": "{0} ↔ {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/binaryEditor.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/binaryEditor.i18n.json new file mode 100644 index 0000000000000..53321246ac788 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/binaryEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "binaryEditor": "Visualizador binário" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json new file mode 100644 index 0000000000000..dbfae18a9bfb0 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "textEditor": "Editor de texto", + "textDiffEditor": "Editor de Diferentes Textos", + "binaryDiffEditor": "Editor de Diferença Binária", + "sideBySideEditor": "Editor Lado a lado", + "groupOnePicker": "Mostrar editores no primeiro grupo", + "groupTwoPicker": "Mostrar editores no segundo grupo", + "groupThreePicker": "Mostrar editores no terceiro grupo", + "allEditorsPicker": "Mostrar todos editores abertos", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorActions.i18n.json new file mode 100644 index 0000000000000..b49742676674d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -0,0 +1,56 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "splitEditor": "Dividir editor", + "joinTwoGroups": "Juntar editores de dois grupos", + "navigateEditorGroups": "Navegar entre grupos de editores", + "focusActiveEditorGroup": "Focalizar grupo de editores ativo", + "focusFirstEditorGroup": "Focalizar o primeiro grupo de editores", + "focusSecondEditorGroup": "Focalizar o segundo grupo de editores", + "focusThirdEditorGroup": "Focalizar o terceiro grupo de editores", + "focusPreviousGroup": "Focalizar grupo anterior", + "focusNextGroup": "Focalizar próximo grupo", + "openToSide": "Aberto para o lado", + "closeEditor": "Fechar editor", + "revertAndCloseActiveEditor": "Reverter e fechar editor", + "closeEditorsToTheLeft": "Fechar editores à esquerda ", + "closeEditorsToTheRight": "Fechar editores à direita", + "closeAllEditors": "Fechar todos editores", + "closeUnmodifiedEditors": "Fechar os Editores Não Modificados no Grupo", + "closeEditorsInOtherGroups": "Fechar editores nos outros grupos", + "closeOtherEditorsInGroup": "Fechar outros editores", + "closeEditorsInGroup": "Fechar todos editores no grupo", + "moveActiveGroupLeft": "Mover grupo de editores para esquerda", + "moveActiveGroupRight": "Mover grupo de editores para direita", + "minimizeOtherEditorGroups": "Minimizar outros grupos de editores", + "evenEditorGroups": "Igualar larguras de grupos de editores", + "maximizeEditor": "Maximizar grupo de editor e ocultar barra lateral", + "keepEditor": "Manter editor", + "openNextEditor": "Abrir próximo editor", + "openPreviousEditor": "Abrir editor anterior", + "nextEditorInGroup": "Abrir próximo editor no grupo", + "openPreviousEditorInGroup": "Abrir editor anterior no grupo", + "navigateNext": "Avançar", + "navigatePrevious": "Voltar", + "reopenClosedEditor": "Reabrir Editor Fechado", + "clearRecentFiles": "Limpar arquivos recentes", + "showEditorsInFirstGroup": "Mostrar editores no primeiro grupo", + "showEditorsInSecondGroup": "Mostrar editores no segundo grupo", + "showEditorsInThirdGroup": "Mostrar editores no terceiro grupo", + "showEditorsInGroup": "Mostrar editores no grupo", + "showAllEditors": "Mostrar todos editores", + "openPreviousRecentlyUsedEditorInGroup": "Abrir o Editor Anterior Recentemente Usado no Grupo", + "openNextRecentlyUsedEditorInGroup": "Abrir o Próximo Editor Recentemente Usado no Grupo", + "navigateEditorHistoryByInput": "Abrir o Editor Anterior do Histórico", + "openNextRecentlyUsedEditor": "Abrir o Próximo Editor Recentemente Utilizado", + "openPreviousRecentlyUsedEditor": "Abrir o Editor Anterior Recentemente Utilizado", + "clearEditorHistory": "Limpar Histórico do Editor", + "focusLastEditorInStack": "Abrir Último Editor do Grupo", + "moveEditorLeft": "Mover Editor para Esquerda", + "moveEditorRight": "Mover Editor para Direita", + "moveEditorToPreviousGroup": "Mover Editor para o Grupo Anterior", + "moveEditorToNextGroup": "Mover o Editor para o Próximo Grupo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json new file mode 100644 index 0000000000000..f42c45c02f558 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorCommand.activeEditorMove.description": "Mover o editor ativo por guias ou grupos", + "editorCommand.activeEditorMove.arg.name": "Argumento de movimento do editor ativo", + "editorCommand.activeEditorMove.arg.description": "Propriedades do argumento: \n\t\t\t\t\t\t- 'para': sequência de valor fornecendo para onde mover.\n\t\t\t\t\t\t- 'por': sequência de valor, fornecendo a unidade para o movimento. Por guia ou por grupo.\n\t\t\t\t\t\t- 'valor': valor numérico, fornecendo quantas posições ou uma posição absoluta para mover.\n\t\t\t\t\t", + "commandDeprecated": "Comando **{0}** foi removido. Você pode usar **{1}** em vez disso", + "openKeybindings": "Configurar os atalhos de teclado" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/editorPart.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorPart.i18n.json new file mode 100644 index 0000000000000..c6a90d88542a6 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorPart.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "groupOneVertical": "Esquerda", + "groupTwoVertical": "Centro", + "groupThreeVertical": "Direita", + "groupOneHorizontal": "Topo", + "groupTwoHorizontal": "Centro", + "groupThreeHorizontal": "Baixo", + "editorOpenError": "Não foi possível abrir '{0}': {1}." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/editorPicker.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorPicker.i18n.json new file mode 100644 index 0000000000000..e17bc9405654b --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorPicker.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, seletor de grupo editor", + "groupLabel": "Grupo: {0}", + "noResultsFoundInGroup": "Não foi encontrado nennhum editor aberto no grupo", + "noOpenedEditors": "Lista de editores abertos está atualmente vazia no grupo", + "noResultsFound": "Não foi encontrado editor correspondente aberto", + "noOpenedEditorsAllGroups": "A lista de editores abertos está atualmente vazia" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json new file mode 100644 index 0000000000000..7ec5ce6904c27 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -0,0 +1,51 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "singleSelectionRange": "Ln {0}, {1} Col ({2} selecionado)", + "singleSelection": "Ln {0}, {1} Col", + "multiSelectionRange": "{0} seleções ({1} caracteres selecionados)", + "multiSelection": "{0} seleções", + "endOfLineLineFeed": "LF", + "endOfLineCarriageReturnLineFeed": "CRLF", + "tabFocusModeEnabled": "Tabulação Move o Foco", + "screenReaderDetected": "Leitor de Tela Detectado", + "screenReaderDetectedExtra": "Se você não estiver usando um leitor de tela, por favor altere a configuração `editor.accessibilitySupport` para \"desligado\".", + "disableTabMode": "Desativar o modo de acessibilidade", + "gotoLine": "Ir para linha", + "indentation": "Indentação", + "selectEncoding": "Selecionar a codificação", + "selectEOL": "Selecionar a sequência de fim de linha", + "selectLanguageMode": "Selecionar modo de idioma", + "fileInfo": "Informações do arquivo", + "spacesSize": "Espaços: {0}", + "tabSize": "Tamanho de Tabulação: {0}", + "showLanguageExtensions": "Pesquisar extensões na loja para '{0}'...", + "changeMode": "Alterar o modo de linguagem", + "noEditor": "Nenhum editor de texto ativo neste momento", + "languageDescription": "({0}) - linguagem configurada", + "languageDescriptionConfigured": "({0})", + "languagesPicks": "linguagens (identificador)", + "configureModeSettings": "Configurar '{0}' configurações baseadas em linguagem...", + "configureAssociationsExt": "Configurar a associação de arquivo para '{0}'...", + "autoDetect": "Detecção automática", + "pickLanguage": "Selecionar o modo do idioma", + "currentAssociation": "Associação atual", + "pickLanguageToConfigure": "Selecionar o modo de linguagem para associar a '{0}'", + "changeIndentation": "Alterar a indentação", + "noWritableCodeEditor": "O editor de código ativo é somente leitura.", + "indentView": "alterar visualização", + "indentConvert": "converter arquivo", + "pickAction": "Selecionar ação", + "changeEndOfLine": "Alterar sequência de final de linha", + "pickEndOfLine": "Selecionar sequência de final de linha", + "changeEncoding": "Alterar a codificação do arquivo", + "noFileEditor": "Nenhum arquivo ativo neste momento", + "saveWithEncoding": "Salvar com codificação", + "reopenWithEncoding": "Reabrir com codificação", + "guessedEncoding": "Adivinhado a partir do conteúdo", + "pickEncodingForReopen": "Selecione a codificaçãodo arquivo para reabrir o arquivo.", + "pickEncodingForSave": "Selecione a codificação do arquivo para Salvar Com" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/tabsTitleControl.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/tabsTitleControl.i18n.json new file mode 100644 index 0000000000000..9001e58fa9931 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/tabsTitleControl.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "araLabelTabActions": "Ações de tablulação" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/textDiffEditor.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/textDiffEditor.i18n.json new file mode 100644 index 0000000000000..8af2aff62d5e2 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/textDiffEditor.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "textDiffEditor": "Editor de Diferentes Textos", + "readonlyEditorWithInputAriaLabel": "{0}. Editor de comparação de texto somente leitura.", + "readonlyEditorAriaLabel": "Editor de comparação de texto somente leitura.", + "editableEditorWithInputAriaLabel": "{0}. Editor de comparação de arquivos texto.", + "editableEditorAriaLabel": "Editor de comparação de arquivos texto.", + "navigate.next.label": "Próxima Alteração", + "navigate.prev.label": "Alteração Anterior", + "inlineDiffLabel": "Alternar para exibição embutida", + "sideBySideDiffLabel": "Alternar para exibição lado a lado" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/textEditor.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/textEditor.i18n.json new file mode 100644 index 0000000000000..eb58230b85431 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/textEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorLabelWithGroup": "{0}, Grupo {1}." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/textResourceEditor.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/textResourceEditor.i18n.json new file mode 100644 index 0000000000000..77f89efba5f9c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/textResourceEditor.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "textEditor": "Editor de texto", + "readonlyEditorWithInputAriaLabel": "{0}. Editor de texto somente leitura.", + "readonlyEditorAriaLabel": "Editor de texto somente leitura.", + "untitledFileEditorWithInputAriaLabel": "{0}. Editor de texto de arquivo sem nome.", + "untitledFileEditorAriaLabel": "Editor de texto de arquivo sem nome." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/titleControl.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/titleControl.i18n.json new file mode 100644 index 0000000000000..aafa87dc9bf2f --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/titleControl.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "Fechar", + "closeOthers": "Fechar Outros", + "closeRight": "Fechar à direita", + "closeAll": "Fechar todos", + "closeAllUnmodified": "Fechar Não Modificados", + "keepOpen": "Manter aberto", + "showOpenedEditors": "Mostrar editores abertos", + "araLabelEditorActions": "Ações de editor" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/panel/panelActions.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/panel/panelActions.i18n.json new file mode 100644 index 0000000000000..1f98f38c47e8e --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/panel/panelActions.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "panelActionTooltip": "{0} ({1})", + "closePanel": "Fechar Painel", + "togglePanel": "Alternar Painel", + "focusPanel": "Foco no Painel", + "toggleMaximizedPanel": "Alternar Painel Maximizado", + "maximizePanel": "Maximizar Tamanho do Painel", + "minimizePanel": "Restaurar tamanho do Painel", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/panel/panelPart.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/panel/panelPart.i18n.json new file mode 100644 index 0000000000000..48a7b1b2f768e --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/panel/panelPart.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "panelSwitcherBarAriaLabel": "Chave do Painel Ativo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/quickopen/quickOpenController.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/quickopen/quickOpenController.i18n.json new file mode 100644 index 0000000000000..c98dd22d95d37 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/quickopen/quickOpenController.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inputModeEntryDescription": "{0} (Pressione 'Enter' para confirmar ou 'Esc' para cancelar)", + "inputModeEntry": "Pressione 'Enter' para confirmar o texto digitado ou 'Esc' para cancelar", + "emptyPicks": "Não há entradas a serem escolhidas", + "quickOpenInput": "Digite '?' para obter ajuda sobre as ações que você pode realizar a partir daqui", + "historyMatches": "aberto recentemente", + "noResultsFound1": "Nenhum resultado encontrado", + "canNotRunPlaceholder": "Esse manipulador de abertura rápida não pode ser usado no contexto atual", + "entryAriaLabel": "{0}, recentemente aberto", + "removeFromEditorHistory": "Remover do Histórico", + "pickHistory": "Selecionar uma entrada do editor para remover do histórico" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.i18n.json new file mode 100644 index 0000000000000..57f5524e1be3a --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpen": "Ir para o Arquivo...", + "quickNavigateNext": "Navegar ao próximo em modo de abertura rápida", + "quickNavigatePrevious": "Navegar ao anterior em modo de abertura rápida", + "quickSelectNext": "Selecionar próximo em modo de abertura rápida", + "quickSelectPrevious": "Selecionar anterior em modo de abertura rápida" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json new file mode 100644 index 0000000000000..57f5524e1be3a --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpen": "Ir para o Arquivo...", + "quickNavigateNext": "Navegar ao próximo em modo de abertura rápida", + "quickNavigatePrevious": "Navegar ao anterior em modo de abertura rápida", + "quickSelectNext": "Selecionar próximo em modo de abertura rápida", + "quickSelectPrevious": "Selecionar anterior em modo de abertura rápida" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/sidebar/sidebarPart.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/sidebar/sidebarPart.i18n.json new file mode 100644 index 0000000000000..89806e051ea34 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/sidebar/sidebarPart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "focusSideBar": "Foco na Barra Lateral", + "viewCategory": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/statusbar/statusbarPart.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/statusbar/statusbarPart.i18n.json new file mode 100644 index 0000000000000..4a2adabf5a69d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/statusbar/statusbarPart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "canNotRun": "O comando '{0}' não está habilitado e não pode ser executado.", + "manageExtension": "Gerenciar Extensão" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/titlebar/titlebarPart.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/titlebar/titlebarPart.i18n.json new file mode 100644 index 0000000000000..1c3db4d572b50 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/titlebar/titlebarPart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "patchedWindowTitle": "[Sem Suporte]", + "devExtensionWindowTitlePrefix": "[Host de Desenvolvimento de Extensão]" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/quickopen.i18n.json b/i18n/ptb/src/vs/workbench/browser/quickopen.i18n.json new file mode 100644 index 0000000000000..098ead453d829 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/quickopen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultsMatching": "Nenhum resultado encontrado", + "noResultsFound2": "Nenhum resultado encontrado", + "entryAriaLabel": "{0}, comando" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/viewlet.i18n.json b/i18n/ptb/src/vs/workbench/browser/viewlet.i18n.json new file mode 100644 index 0000000000000..4b960693e3567 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/viewlet.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "collapse": "Recolher tudo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/common/theme.i18n.json b/i18n/ptb/src/vs/workbench/common/theme.i18n.json new file mode 100644 index 0000000000000..86cc4957066b4 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/common/theme.i18n.json @@ -0,0 +1,61 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tabActiveBackground": "Cor de fundo da guia ativa. As guias são os recipientes para editores na área do editor. Várias guias podem ser abertas em um grupo de editores. Podem haver vários grupos de editor.", + "tabInactiveBackground": "Cor de fundo da guia inativa. As guias são os recipientes para editores na área do editor. Várias guias podem ser abertas em um grupo de editores. Podem haver vários grupos de editor.", + "tabBorder": "Borda para separar uma guia das outras. As guias são os recipientes para editores na área do editor. Várias guias podem ser abertas em um grupo de editores. Podem haver vários grupos de editor.", + "tabActiveForeground": "Cor de primeiro plano da guia ativa em um grupo ativo. As guias são os recipientes para editores na área do editor. Várias guias podem ser abertas em um grupo de editores. Podem haver vários grupos de editor.", + "tabInactiveForeground": "Cor de primeiro plano da guia inativa em um grupo ativo. As guias são os recipientes para editores na área do editor. Várias guias podem ser abertas em um grupo de editores. Podem haver vários grupos de editor.", + "tabUnfocusedActiveForeground": "Cor de primeiro plano da aba ativa em um grupo inativo. As abas são recipientes para editores na área do editor. Várias abas podem ser abertas em um grupo de editor. Pode haver vários grupos de editor.", + "tabUnfocusedInactiveForeground": "Cor de primeiro plano da aba inativa em um grupo inativo. As abas são recipientes para editores na área do editor. Várias abas podem ser abertas em um grupo de editor. Pode haver vários grupos de editor.", + "editorGroupBackground": "Cor de fundo de um grupo de editor. Grupos de editor são os recipientes dos editores. A cor de fundo é mostrada ao arrastar o editor de grupos ao redor.", + "tabsContainerBackground": "Cor de fundo do cabeçalho do título do grupo de editor quando as guias são habilitadas. Grupos de editor são os recipientes dos editores.", + "tabsContainerBorder": "Cor da borda do cabeçalho do título do grupo de editor quando as guias estão habilitadas. Grupos de editor são os recipientes dos editores.", + "editorGroupHeaderBackground": "Cor de fundo do título do cabeçalho do grupo de editor quando as guias são desabilitadas. Grupos de editor são os recipientes dos editores.", + "editorGroupBorder": "Cor para separar múltiplos grupos de editor de outro. Grupos de editor são os recipientes dos editores.", + "editorDragAndDropBackground": "Cor de fundo ao arrastar editores. A cor deve ter transparência para que o conteúdo do editor ainda possa ser visto.", + "panelBackground": "Cor de fundo do painel. Os painéis são mostrados abaixo da área do editor e contém visualizações como saída e terminal integrado.", + "panelBorder": "Cor da borda do painel no topo separando do editor. Os painéis são mostrados abaixo da área do editor e contém visualizações como saída e terminal integrado.", + "panelActiveTitleForeground": "Cor do título para o painel ativo. Os painéis são mostrados abaixo da área do editor e contém visualizações como saída e terminal integrado.", + "panelInactiveTitleForeground": "Cor do título para o painel inativo. Os painéis são mostrados abaixo da área do editor e contém visualizações como saída e terminal integrado.", + "panelActiveTitleBorder": "Cor da borda para o título do painel ativo. Os painéis são mostrados abaixo da área do editor e contém visualizações como saída e terminal integrado.", + "statusBarForeground": "Cor do primeiro plano da barra de status. A barra de status é mostrada na parte inferior da janela.", + "statusBarBackground": "Cor de fundo da barra de status padrão. A barra de status é mostrada na parte inferior da janela.", + "statusBarBorder": "Cor da borda da barra de status que separa a barra lateral e o editor.A barra de status é mostrada na parte inferior da janela.", + "statusBarNoFolderBackground": "Cor de fundo da barra de status quando nenhuma pasta está aberta. A barra de status é mostrada na parte inferior da janela.", + "statusBarNoFolderForeground": "Cor do primeiro plano da barra de status quando nenhuma pasta está aberta. A barra de status é mostrada na parte inferior da janela.", + "statusBarItemActiveBackground": "Cor de fundo do item da barra de status quando você clicado. A barra de status é mostrada na parte inferior da janela.", + "statusBarItemHoverBackground": "Cor de fundo do item da barra de status quando estiver passando sobre ele. A barra de status é mostrada na parte inferior da janela.", + "statusBarProminentItemBackground": "Cor de fundo de itens proeminentes da barra de status. Itens proeminentes destacam-se outras entradas da barra de status para indicar a importância. A barra de status é mostrada na parte inferior da janela.", + "statusBarProminentItemHoverBackground": "Cor de fundo dos itens proeminentes de barra de status quando estiver passando sobre eles. Itens proeminentes destacam-se outras entradas de barra de status para indicar a importância. A barra de status é mostrada na parte inferior da janela.", + "activityBarBackground": "Cor de fundo da barra de atividades. Barra de atividade está visível à esquerda ou à direita e permite alternar entre as visualizações da barra lateral.", + "activityBarForeground": "Cor de primeiro plano da barra de atividades (por exemplo, usada para os ícones). A barra de atividades está visível à esquerda ou à direita e permite alternar entre as visualizações da barra lateral.", + "activityBarBorder": "Cor da borda da barra de atividades separando a barra lateral. A barra de atividade é mostrada à esquerda ou à direita e permite alternar entre as visualizações da barra lateral.", + "activityBarDragAndDropBackground": "Cor de feedback de arrastar e soltar para os itens da barra de atividades. A cor deve ter transparência para que as entradas de bar de atividade ainda possam brilhar. A barra de atividade está visível à esquerda ou à direita e permite para alternar entre as visualizações da barra lateral.", + "activityBarBadgeBackground": "Cor de fundo da notificação de atividade. A barra de atividade está visível à esquerda ou à direita e permite alternar entre as visualizações da barra lateral.", + "activityBarBadgeForeground": "Cor de primeiro plano da notificação de atividade. A barra de atividade está visível à esquerda ou à direita e permite alternar entre as visualizações da barra lateral.", + "sideBarBackground": "Cor de fundo da barra lateral. A barra lateral é o recipiente para visualizações como explorador e pesquisa.", + "sideBarForeground": "Cor de primeiro plano da barra lateral. A barra lateral é o recipiente para visualizações como o explorador e a busca.", + "sideBarBorder": "Cor da borda da barra lateral separando o editor. A barra lateral é o recipiente para visualizações como explorador e pesquisa.", + "sideBarTitleForeground": "Cor de primeiro plano do título da barra lateral. A barra lateral é o recipiente para visualizações como explorador e pesquisa.", + "sideBarSectionHeaderBackground": "Cor de fundo do cabeçalho de seção lateral. A barra lateral é o recipiente para visões como explorador e pesquisa.", + "sideBarSectionHeaderForeground": "Cor de primeiro plano do cabeçalho de seção da barra lateral. A barra lateral é o recipiente para visualizações como o explorador e pesquisa.", + "titleBarActiveForeground": "Cor da barra de título do primeiro plano quando a janela está ativa. Observe que essa cor atualmente somente é suportada no macOS.", + "titleBarInactiveForeground": "Cor de primeiro plano da barra de título quando a janela está inativa. Observe que essa cor atualmente somente é suportada no macOS.", + "titleBarActiveBackground": "Cor de fundo da barra de título quando a janela está ativa. Observe que essa cor atualmente somente é suportada no macOS.", + "titleBarInactiveBackground": "Cor de fundo de barra de título quando a janela está inativa. Observe que essa cor é atualmente somente suportada no macOS.", + "notificationsForeground": "Cor do primeiro plano de notificações. Notificações deslizam na parte superior da janela.", + "notificationsBackground": "Cor de fundo de notificações. Notificações deslizam na parte superior da janela.", + "notificationsButtonBackground": "Cor de fundo do botão de notificações. Notificações deslizam da parte superior da janela.", + "notificationsButtonHoverBackground": "Cor de fundo do botão de notificações quando passar sobre ele. Notificações deslizam da parte superior da janela. ", + "notificationsButtonForeground": "Cor de primeiro plano do botão de notificações. Notificações deslizam da parte superior da janela. ", + "notificationsInfoBackground": "Cor de fundo da notificação de informações. Notificações deslizam da parte superior da janela. ", + "notificationsInfoForeground": "Cor de primeiro plano das notificações de informação. Notificações deslizam da parte superior da janela. ", + "notificationsWarningBackground": "Cor de fundo das notificações de aviso. Notificações deslizam da parte superior da janela. ", + "notificationsWarningForeground": "Cor de primeiro plano das notificações de aviso. Notificações deslizam da parte superior da janela.", + "notificationsErrorBackground": "Cor de fundo das notificações de erro. Notificações deslizam da parte superior da janela. ", + "notificationsErrorForeground": "Cor de primeiro plano das notificações de erro. Notificações deslizam da parte superior da janela." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/actions.i18n.json new file mode 100644 index 0000000000000..4cdc6bd7cab10 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/electron-browser/actions.i18n.json @@ -0,0 +1,44 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "closeActiveEditor": "Fechar Editor", + "closeWindow": "Fechar Janela", + "closeFolder": "Fechar Pasta", + "noFolderOpened": "Não há nenhuma pasta aberta nesta instância para ser fechada.", + "newWindow": "Nova Janela", + "toggleFullScreen": "Alternar Tela Inteira", + "toggleMenuBar": "Alternar Barra de Menus", + "toggleDevTools": "Alternar Ferramentas do Desenvolvedor", + "zoomIn": "Ampliar", + "zoomOut": "Reduzir", + "zoomReset": "Reinicializar Zoom", + "appPerf": "Desempenho de inicialização", + "reloadWindow": "Recarregar Janela", + "switchWindowPlaceHolder": "Selecionar uma janela para onde alternar", + "current": "Janela Atual", + "switchWindow": "Alternar a janela...", + "quickSwitchWindow": "Troca Rápida de Janela...", + "folders": "pastas", + "files": "arquivos", + "openRecentPlaceHolderMac": "Selecionar um caminho (Pressione a tecla Cmd para abrir em uma nova janela)", + "openRecentPlaceHolder": "Selecionar um caminho para abrir (Pressione a tecla Cmd para abrir em uma nova janela)", + "openRecent": "Abrir Recente...", + "quickOpenRecent": "Abertura Rápida de Recente...", + "closeMessages": "Fechar mensagens de notificação", + "reportIssues": "Reportar Problemas", + "reportPerformanceIssue": "Reportar Problema de Desempenho", + "keybindingsReference": "Referência de Atalhos de Teclado", + "openDocumentationUrl": "Documentação", + "openIntroductoryVideosUrl": "Vídeos Introdutórios", + "openTipsAndTricksUrl": "Dicas e truques", + "toggleSharedProcess": "Alternar processo compartilhado", + "navigateLeft": "Navegar para a Visualização à Esquerda", + "navigateRight": "Navegar para a Visualização à Direita", + "navigateUp": "Navegar para a Visualização Acima", + "navigateDown": "Navegar para a Visualização Abaixo", + "increaseViewSize": "Aumentar o Tamanho da Visualização Atual", + "decreaseViewSize": "Diminuir o Tamanho da Visualização Atual" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/electron-browser/commands.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/commands.i18n.json new file mode 100644 index 0000000000000..3a1051dcfdad7 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/electron-browser/commands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "diffLeftRightLabel": "{0} ⟷ {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/electron-browser/crashReporter.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/crashReporter.i18n.json new file mode 100644 index 0000000000000..10b7a7ff10848 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/electron-browser/crashReporter.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Telemetria", + "telemetry.enableCrashReporting": "Ativar o envio de relatórios de incidentes à Microsoft.\nEsta opção requer reinicialização para ser efetivada." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/electron-browser/extensionHost.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/extensionHost.i18n.json new file mode 100644 index 0000000000000..a27bb9c728f56 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/electron-browser/extensionHost.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensionHostProcess.startupFailDebug": "O host de extensão não iniciou em 10 segundos, ele pode ser interrompido na primeira linha e precisa de um depurador para continuar.", + "extensionHostProcess.startupFail": "Host de extensão não começou em 10 segundos, isso pode ser um problema.", + "extensionHostProcess.error": "Erro do host de extensão: {0}", + "devTools": "Ferramentas do Desenvolvedor", + "extensionHostProcess.crash": "Host de extensão foi encerrado inesperadamente. Por favor recarregar a janela para recuperar." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/main.contribution.i18n.json new file mode 100644 index 0000000000000..11ee241242cef --- /dev/null +++ b/i18n/ptb/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -0,0 +1,69 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "view": "Exibir", + "help": "Ajuda", + "file": "Arquivo", + "developer": "Desenvolvedor", + "showEditorTabs": "Controla se os editores abertos devem ou não serem exibidos em abas.", + "editorTabCloseButton": "Controla a posição dos botões de fechar das abas do editor ou os desabilita quando configurados para 'desligado'.", + "showIcons": "Controla se os editores abertos devem ou não ser exibidos com um ícone. Requer um tema de ícone para ser habilitado. ", + "enablePreview": "Controla se os editores abertos são exibidos como visualização. Editores de visualização são reutilizados até que eles sejam preservados (por exemplo, através de um duplo clique ou edição).", + "enablePreviewFromQuickOpen": "Controla se os editores abertos da Abertura Rápida são exibidos como visualização. Os editores de visualização são reutilizados até serem preservados (por exemplo, através de um duplo clique ou edição).", + "editorOpenPositioning": "Controla onde os editores serão abertos. Escolha 'esquerda' ou 'direita' para abrir os editores à esquerda ou à direita do \neditor ativo. Selecione 'primeiro' ou 'último' para abrir os editores independentemente do atual.", + "revealIfOpen": "Controla se um editor é exibido em qualquer um dos grupos, se aberto. Se desabilitado, um editor será aberto preferencialmente no grupo de editores ativo. Se habilitado, um editor já aberto será exibido no grupo de editores ativo, ao invés de ser aberto novamente. Note que há alguns casos onde esta configuração é ignorada, por exemplo, quando for forçada a abertura de um editor em um grupo específico ou ao lado do grupo atualmente ativo.", + "commandHistory": "Controla o número de comandos recentemente usados mantidos no histórico para a paleta de comandos. Definir como 0 para desativar o histórico de comandos.", + "preserveInput": "Controla se a última entrada digitada na paleta de comandos deve ser restaurada ao abri-la da próxima vez.", + "closeOnFocusLost": "Controla se Abertura Rápida deve fechar automaticamente caso perca o foco.", + "openDefaultSettings": "Controla se a abertura de configurações também abre um editor mostrando todas as configurações padrão.", + "sideBarLocation": "Controla a localização da barra lateral. Ele pode ser exibido à esquerda ou à direita da área de trabalho.", + "statusBarVisibility": "Controla a visibilidade da barra de status na parte inferior da área de trabalho.", + "activityBarVisibility": "Controla a visibilidade da barra de atividades na área de trabalho.", + "closeOnFileDelete": "Controla se os editores que mostram um arquivo devem fechar automaticamente quanto o arquivo é apagado ou renomeado por algum outro processo. Desativar isso manterá o editor aberto como sujo neste evento. Note que apagar do aplicativo sempre fechará o editor e os arquivos sujos nunca fecharão para preservar seus dados.", + "swipeToNavigate": "Navegue entre arquivos abertos usando o deslizamento horizontal de três dedos.", + "workbenchConfigurationTitle": "Área de Trabalho", + "window.openFilesInNewWindow.on": "Arquivos serão abertos em uma nova janela", + "window.openFilesInNewWindow.off": "Arquivos serão abertos em uma nova janela com a pasta de arquivos aberta ou com a última janela ativa.", + "window.openFilesInNewWindow.default": "Os arquivos serão abertos na janela com a pasta de arquivos aberta ou a última janela ativa, a menos que seja aberto através do dock ou do finder (somente macOS)", + "openFilesInNewWindow": "Controla se os arquivos devem ser abertos em uma nova janela\n- padrão: os arquivos serão abertos em uma nova janela com a pasta de arquivos aberta ou na última janela ativa, a menos que seja aberta através do dock ou do finder (apenas macOS)\n- ligado: os arquivos serão abertos em uma nova janela\n- desligado: os arquivos serão abertos em uma janela com a pasta de arquivos aberta ou a última janela ativa\nNota que ainda podem haver casos em que esta configuração será ignorada (por exemplo, quando estiver usando as opções de linha de comando -new-window ou -reuse-window).", + "window.openFoldersInNewWindow.on": "As pastas serão abertas em uma nova janela", + "window.openFoldersInNewWindow.off": "As pastas substituirão a última janela ativa", + "window.openFoldersInNewWindow.default": "As pastas serão abertas em uma nova janela, a menos que uma pasta seja selecionada dentro do aplicativo (por exemplo, através do menu Arquivo)", + "openFoldersInNewWindow": "Controla se as pastas devem ser abertas em uma nova janela ou substituir a última janela ativa\n- padrão: as pastas serão abertas em uma nova janela, a menos que seja selecionada dentro do aplicativo (por exemplo, através do menu Arquivo)\n- ligado: as pastas serão abertas em uma nova janela\n- desligado: as pastas substituirão a última janela ativa\nNote que ainda podem haver casos em que esta configuração será ignorada (por exemplo, quando estiver usando as opções de linha de comando -new-window ou -reuse-window).", + "window.reopenFolders.all": "Reabrir todas as janelas.", + "window.reopenFolders.folders": "Reabrir todas as pastas. Janelas vazias não serão restauradas.", + "window.reopenFolders.one": "Reabrir a última janela ativa.", + "window.reopenFolders.none": "Nunca reabrir uma janela. Sempre começar com uma janela vazia.", + "restoreWindows": "Controla como as janelas serão reabertas após um reinício. Escolha 'none' para sempre iniciar com uma janela vazia, 'one' para reabrir a última janela que você trabalhou, 'folders' para reabrir todas as pastas que foram abertas ou 'all' para reabrir todas as janelas da sua última sessão.", + "restoreFullscreen": "Controla se uma janela deve ser restaurada em modo de tela cheia se ela foi finalizada em modo de tela cheia.", + "zoomLevel": "Ajusta o nível de zoom da janela. O tamanho original é 0 e cada aumento (por exemplo, 1) ou redução (por exemplo, -1) representa um zoom 20% maior ou menor. Você também pode digitar decimais para ajustar o nível de zoom com uma granularidade mais fina.", + "title": "Controla o título de janela baseado no editor do ativo. Variáveis são substituídas com base no contexto:\n${activeEditorShort}: por exemplo, MyFile.txt \n${activeEditorMedium}: por exemplo, myFolder/myFile.txt \n${activeEditorLong}: por exemplo, /Users/Development/myProject/myFolder/myFile.txt \n${folderName}: por exemplo myFolder \n${folderPath}: por exemplo, /Users/Development/myFolder \n${rootName}: por exemplo, myFolder1, myFolder2, myFolder3 \n${rootPath}: por exemplo, /Users/Development/myWorkspace \n${appName}: por exemplo, VS Code \n${dirty}: um indicador que mostra se o editor ativo está modificado\n${separator}: um separador condicional (\"-\") que é mostrado apenas quando cercado por variáveis com valores", + "window.newWindowDimensions.default": "Abrir novas janelas no centro da tela.", + "window.newWindowDimensions.inherit": "Abrir novas janelas com a mesma dimensão da última janela ativa.", + "window.newWindowDimensions.maximized": "Abrir novas janelas maximizadas.", + "window.newWindowDimensions.fullscreen": "Abrir novas janelas em modo de tela cheia.", + "newWindowDimensions": "Controla as dimensões ao abrir uma nova janela quando pelo menos uma janela já está aberta. Por padrão, uma nova janela será aberta no centro da tela com pequena dimensão. Quando definido como 'inherit', a janela vai ter as mesmas dimensões que a última janela que estava ativa. Quando definido como 'maximized', a janela abrirá maximizada e em tela cheia se configurado para 'fullscreen'. Observe que essa configuração não tem um impacto sobre a primeira janela que é aberta. A primeira janela sempre irá restaurar o tamanho e a localização como você deixou antes de fechar.", + "window.menuBarVisibility.default": "O menu está oculto apenas em modo de tela cheia.", + "window.menuBarVisibility.visible": "O menu está sempre visivel mesmo quando em modo de tela cheia.", + "window.menuBarVisibility.toggle": "O menu está oculto, mas pode ser mostrado através da tecla Alt.", + "window.menuBarVisibility.hidden": "O menu está sempre oculto.", + "menuBarVisibility": "Controla a visibilidade da barra de menu. Uma configuração 'alternar' significa que a barra de menus está oculta e pressionar a tecla Alt irá mostrá-la. Por padrão, a barra de menu será visível, a menos que a janela esteja em modo de tela cheia.", + "enableMenuBarMnemonics": "Se habilitado, os menus principais podem ser abertos através de atalhos de tecla Alt. Desativar mnemônicos permite vincular esses atalhos de tecla Alt para comandos do editor.", + "autoDetectHighContrast": "Se habilitado, irá mudar automaticamente para o tema de alto contraste se o Windows estiver utilizando um tema de alto contraste, e para o tema escuro ao mudar de um tema de alto contraste do Windows.", + "titleBarStyle": "Ajusta a aparência da barra de título da janela. As alterações exigem um reinício completo.", + "window.nativeTabs": "Habilita as abas da janela do macOS Sierra. Note que as alterações exigem um reinício completo e que as abas nativas desabilitarão um estilo de barra de título customizado, se configurado.", + "windowConfigurationTitle": "Janela", + "zenModeConfigurationTitle": "Modo Zen", + "zenMode.fullScreen": "Controla se a ativação do modo Zen também coloca o espaço de trabalho em modo de tela cheia.", + "zenMode.hideTabs": "Controla se a ativação do modo Zen também oculta as abas do espaço de trabalho.", + "zenMode.hideStatusBar": "Controla se a ativação do modo Zen também oculta a barra de status no rodapé do espaço de trabalho.", + "zenMode.hideActivityBar": "Controla se a ativação do modo Zen também oculta a barra de atividades à esquerda do espaço de trabalho.", + "zenMode.restore": "Controla se uma janela deve ser restaurada para o modo zen se ela foi finalizada no modo zen.", + "workspaceConfigurationTitle": "Espaço de trabalho", + "workspaces.title": "Configuração de pasta da área de trabalho", + "files.exclude.boolean": "O padrão glob com o qual combinar os caminhos de arquivo. Defina para verdadeiro ou falso para habilitar ou desabilitar o padrão.", + "workspaces.additionalFolders": "Pastas neste espaço de trabalho" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/electron-browser/main.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/main.i18n.json new file mode 100644 index 0000000000000..056d426d27d53 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/electron-browser/main.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "loaderError": "Falha ao carregar o arquivo necessário. Você não está mais conectado à Internet ou o servidor que você está conectado está offline. Atualize o navegador e tente novamente.", + "loaderErrorNative": "Falha ao carregar um arquivo necessário. Reinicie o aplicativo para tentar novamente. Detalhes: {0}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/electron-browser/shell.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/shell.i18n.json new file mode 100644 index 0000000000000..951a140a2ea01 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/electron-browser/shell.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "runningAsRoot": "Não é recomendado executar Code como 'root'." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/electron-browser/window.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/window.i18n.json new file mode 100644 index 0000000000000..50118b77afeb4 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/electron-browser/window.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "undo": "Desfazer", + "redo": "Refazer", + "cut": "Recortar", + "copy": "Copiar", + "paste": "Colar", + "selectAll": "Selecionar Tudo", + "confirmOpen": "Tem certeza de que deseja abrir '{0}' pastas?", + "confirmOpenButton": "&&Abrir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/workbench.i18n.json new file mode 100644 index 0000000000000..46bdaa6720de9 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/electron-browser/workbench.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "developer": "Desenvolvedor", + "file": "Arquivo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/node/extensionHostMain.i18n.json b/i18n/ptb/src/vs/workbench/node/extensionHostMain.i18n.json new file mode 100644 index 0000000000000..f0596b258711c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/node/extensionHostMain.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensionTestError": "Caminho {0} não aponta para um executor de testes com extensão válida." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/node/extensionPoints.i18n.json b/i18n/ptb/src/vs/workbench/node/extensionPoints.i18n.json new file mode 100644 index 0000000000000..18d7b3f26c892 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/node/extensionPoints.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "jsonParseFail": "Falha ao analisar {0}: {1}.", + "fileReadFail": "Não foi possível ler o arquivo {0}: {1}.", + "jsonsParseFail": "Falha ao analisar {0} ou {1}: {2}.", + "missingNLSKey": "Não foi possível encontrar a mensagem para a chave {0}." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json new file mode 100644 index 0000000000000..69df9b15d8773 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "install": "Instalar o comando '{0}' em PATH", + "not available": "Este comando não está disponível", + "successIn": "Comando shell '{0}' instalado com sucesso em PATH.", + "warnEscalation": "O código solicitará com 'osascript' pelos privilégios de Administrador para instalar o comando shell.", + "ok": "OK", + "cantCreateBinFolder": "Não é possível criar '/usr/local/bin'.", + "cancel2": "Cancelar", + "aborted": "Abortado", + "uninstall": "Desinstalar o comando '{0}' de PATH", + "successFrom": "Comando shell '{0}' desinstalado com sucesso de PATH.", + "shellCommand": "Comando shell" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json new file mode 100644 index 0000000000000..21239364c7cfc --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emergencyConfOn": "Modificando a configuração 'editor.accessibilitySupport' para 'on'.", + "openingDocs": "Abrindo a página de documentação de Acessibilidade do VS Code.", + "introMsg": "Obrigado por testar a opção de acessibilidade do VS Code.", + "status": "Status", + "changeConfigToOnMac": "Para configurar o editor para ser permanentemente otimizado para uso com um leitor de tela pressione Command+E agora.", + "changeConfigToOnWinLinux": "Para configurar o editor para ser permanentemente otimizado para uso com um leitor de tela pressione Control+E agora.", + "auto_unknown": "O editor está configurado para usar as APIs de plataforma para detectar quando está conectado a um leitor de tela, mas o tempo de execução atual não oferece suporte a isso.", + "auto_on": "O editor detectou automaticamente que foi anexado um leitor de tela.", + "auto_off": "O editor está configurado para detectar automaticamente quando um leitor de tela é anexado, o que não é o caso neste momento.", + "configuredOn": "O editor está configurado para ser permanentemente otimizado para uso com um leitor de tela - você pode mudar isso editando a configuração 'editor.accessibilitySupport'.", + "configuredOff": "O editor está configurado para nunca ser otimizado para uso com um Leitor de Tela.", + "tabFocusModeOnMsg": "Pressionando Tab no editor corrente irá mover o foco para o próximo elemento focável. Mude este comportamento ao pressionar {0}.", + "tabFocusModeOnMsgNoKb": "Pressionando Tab no editor corrente irá mover o foco para o próximo elemento focável. O comando {0} não pode ser ativado atualmente por uma tecla.", + "tabFocusModeOffMsg": "Pressionando Tab no editor atual irá inserir um caractere Tab. Mude este comportamente ao pressionar {0}.", + "tabFocusModeOffMsgNoKb": "Pressionando Tab no editor atual irá inserir um caractere Tab. O comando {0} não pode ser ativado atualmente por uma tecla.", + "openDocMac": "Pressione Command+H agora para abrir uma janela do navegador com mais informação do VS Code relacionada à Acessibilidade.", + "openDocWinLinux": "Pressione Ctrl+H para abrir uma janela do navegador com mais informação do VS Code relacionada à acessibilidade.", + "outroMsg": "Você pode ignorar esta dica de ferramenta e retornar ao editor pressionando Escape ou Shift+Escape.", + "ShowAccessibilityHelpAction": "Mostrar ajuda de acessibilidade" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json new file mode 100644 index 0000000000000..18ee740ae318e --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "workbench.action.inspectKeyMap": "Desenvolvedor: Inspecionar Mapeamentos de Chave" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..e715c4d667fe4 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inspectTMScopes": "Desenvolvedor: Inspecionar escopos TM", + "inspectTMScopesWidget.loading": "Carregando..." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json new file mode 100644 index 0000000000000..9ac1c136877ad --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json @@ -0,0 +1,36 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parseErrors": "Erros parseando {0}: {1}", + "schema.openBracket": "O colchete de abertura de caractere ou sequência de caracteres.", + "schema.closeBracket": "O colchete de fechamento de caractere ou sequência de caracteres.", + "schema.comments": "Define o símbolo dos comentários", + "schema.blockComments": "Define como comentários em bloco são marcados.", + "schema.blockComment.begin": "A sequência de caracteres que inicia um comentário em bloco.", + "schema.blockComment.end": "A sequência de caracteres que termina um comentário de bloco.", + "schema.lineComment": "A sequência de caracteres que inicia um comentário de linha.", + "schema.brackets": "Define os símbolos de colchetes que aumentam ou diminuem a indentação.", + "schema.autoClosingPairs": "Define os pares de colchetes. Quando é introduzido um colchete de abertura, o colchete de fechamento é inserido automaticamente.", + "schema.autoClosingPairs.notIn": "Define uma lista de escopos onde os auto pares são desativados.", + "schema.surroundingPairs": "Define os pares de colchetes que podem ser usados para cercar uma seqüência selecionada.", + "schema.wordPattern": "A definição da palavra para a linguagem.", + "schema.wordPattern.pattern": "O padrão RegExp usado para coincidir com as palavras.", + "schema.wordPattern.flags": "Os sinalizadores RegExp usados para coincidir com as palavras.", + "schema.wordPattern.flags.errorMessage": "Deve corresponder ao padrão `/^([gimuy]+)$/`.", + "schema.indentationRules": "Configurações de recuo da linguagem.", + "schema.indentationRules.increaseIndentPattern": "Se uma linha corresponder a esse padrão, então todas as linhas depois dela devem ser recuadas uma vez (até que outra regra corresponda).", + "schema.indentationRules.increaseIndentPattern.pattern": "O padrão RegExp para increaseIndentPattern.", + "schema.indentationRules.increaseIndentPattern.errorMessage": "Deve corresponder ao padrão `/^([gimuy]+)$/`.", + "schema.indentationRules.decreaseIndentPattern": "Se uma linha corresponder a esse padrão, então todas as linhas após ela devem ser aproximadas uma vez (até que outra regra corresponda).", + "schema.indentationRules.decreaseIndentPattern.pattern": "O padrão RegExp para decreaseIndentPattern.", + "schema.indentationRules.decreaseIndentPattern.errorMessage": "Deve corresponder ao padrão `/^([gimuy]+)$/`.", + "schema.indentationRules.indentNextLinePattern": "Se uma linha corresponder a esse padrão, então **apenas a próxima linha** após ela deve ser recuada uma vez.", + "schema.indentationRules.indentNextLinePattern.pattern": "O padrão RegExp para indentNextLinePattern.", + "schema.indentationRules.indentNextLinePattern.errorMessage": "Deve corresponder ao padrão `/^([gimuy]+)$/`.", + "schema.indentationRules.unIndentedLinePattern": "Se uma linha corresponder a esse padrão, então seu recuo não deve ser mudado e ela não deve ser avaliada contra as outras regras.", + "schema.indentationRules.unIndentedLinePattern.pattern": "O padrão RegExp para unIndentedLinePattern.", + "schema.indentationRules.unIndentedLinePattern.errorMessage": "Deve corresponder ao padrão `/^([gimuy]+)$/`." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..e715c4d667fe4 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inspectTMScopes": "Desenvolvedor: Inspecionar escopos TM", + "inspectTMScopesWidget.loading": "Carregando..." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json new file mode 100644 index 0000000000000..955efefcac9d3 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "Alternar Modificador de Multi-Cursor" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.i18n.json b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.i18n.json new file mode 100644 index 0000000000000..217bdf1c04ed5 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleRenderControlCharacters": "Alternar caracteres de controle" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace.i18n.json b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace.i18n.json new file mode 100644 index 0000000000000..453104fcc6d60 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleRenderWhitespace": "Alternar Espaço em Branco Renderizado" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json new file mode 100644 index 0000000000000..058048058af44 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggle.wordwrap": "Visualizar: Alternar Quebra de Linha", + "wordWrap.notInDiffEditor": "Não pode alternar quebra de linha em um editor diff.", + "unwrapMinified": "Desabilitar empacotamento para este arquivo", + "wrapMinified": "Habilitar empacotamento para este arquivo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/wordWrapMigration.i18n.json b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/wordWrapMigration.i18n.json new file mode 100644 index 0000000000000..12f93be687c5d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/wordWrapMigration.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wordWrapMigration.ok": "OK", + "wordWrapMigration.dontShowAgain": "Não mostrar novamente", + "wordWrapMigration.openSettings": "Abrir configurações", + "wordWrapMigration.prompt": "A configuração `editor.wrappingColumn` foi descontinuada e substituída pela configuração `editor.wordWrap`" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/breakpointWidget.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/breakpointWidget.i18n.json new file mode 100644 index 0000000000000..3d74879563371 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/breakpointWidget.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "breakpointWidgetExpressionPlaceholder": "Parar quando a expressão for avaliada como true. 'Enter' para aceitar, 'esc' para cancelar.", + "breakpointWidgetAriaLabel": "O programa só vai parar aqui se esta condição for verdadeira. Pressione Enter para aceitar ou Escape para cancelar.", + "breakpointWidgetHitCountPlaceholder": "Parar quando contagem de ocorrências condição for alcançada. 'Enter' para aceitar, 'esc' para cancelar.", + "breakpointWidgetHitCountAriaLabel": "O programa só vai parar aqui, se a contagem de ocorrências for alcançada. Pressione Enter para aceitar ou Escape para cancelar.", + "expression": "Expressão", + "hitCount": "Contagem de ocorrências" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActionItems.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActionItems.i18n.json new file mode 100644 index 0000000000000..32a88b85efd61 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActionItems.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "addConfiguration": "Adicionar Configuração...", + "noConfigurations": "Sem configurações" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActions.i18n.json new file mode 100644 index 0000000000000..1bc052297a12e --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openLaunchJson": "Abrir {0}", + "launchJsonNeedsConfigurtion": "Configurar ou corrigir 'launch.json'", + "noFolderDebugConfig": "Primeiro abra uma pasta para fazer uma configuração de depuração avançada.", + "startDebug": "Iniciar Depuração", + "startWithoutDebugging": "Iniciar Sem Depuração", + "selectAndStartDebugging": "Selecionar e Iniciar a Depuração", + "restartDebug": "Reiniciar", + "reconnectDebug": "Reconectar", + "stepOverDebug": "Pular Sobre", + "stepIntoDebug": "Pular Dentro", + "stepOutDebug": "Pular Fora", + "stopDebug": "Parar", + "disconnectDebug": "Desconectar", + "continueDebug": "Continuar", + "pauseDebug": "Pausa", + "restartFrame": "Reiniciar o Frame", + "removeBreakpoint": "Remover Ponto de Parada", + "removeAllBreakpoints": "Remover Todos os Pontos de Parada", + "enableBreakpoint": "Habilitar ponto de Parada", + "disableBreakpoint": "Desativar Ponto de Parada", + "enableAllBreakpoints": "Habilitar Todos os Pontos de Parada", + "disableAllBreakpoints": "Desabilitar Todos Pontos de Parada", + "activateBreakpoints": "Ativar Pontos de Parada", + "deactivateBreakpoints": "Desativar Pontos de Parada", + "reapplyAllBreakpoints": "Reaplicar Todos os Pontos de Parada", + "addFunctionBreakpoint": "Adicionar Ponto de Parada de Função", + "renameFunctionBreakpoint": "Renomeie o Ponto de Parada de Função", + "addConditionalBreakpoint": "Adicionar Ponto de Parada Condicional...", + "editConditionalBreakpoint": "Editar o Ponto de Parada...", + "setValue": "Definir Valor", + "addWatchExpression": "Adicionar Expressão", + "editWatchExpression": "Editar expressão", + "addToWatchExpressions": "Adicionar ao monitoramento", + "removeWatchExpression": "Remover Expressão", + "removeAllWatchExpressions": "Remover Todas as Expressões", + "clearRepl": "Limpar console", + "debugConsoleAction": "Console do Depurador", + "unreadOutput": "Nova Saída no Console de Depuração", + "debugFocusConsole": "Foco no Console de Depuração", + "focusProcess": "Foco no Processo", + "stepBackDebug": "Passo para trás", + "reverseContinue": "Reverter" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json new file mode 100644 index 0000000000000..421e5b19c79c4 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugToolBarBackground": "Cor de fundo da barra de ferramentas de depuração." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/debugContentProvider.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugContentProvider.i18n.json new file mode 100644 index 0000000000000..d8aa95c869a67 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugContentProvider.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unable": "Não é possível resolver o recurso sem uma sessão de depuração" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/debugEditorActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugEditorActions.i18n.json new file mode 100644 index 0000000000000..ef74c88413dcb --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugEditorActions.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleBreakpointAction": "Depurar: Alternar Ponto de Parada", + "columnBreakpointAction": "Depurar: Ponto de Interrupção de Coluna", + "columnBreakpoint": "Adicionar Ponto de Interrupção de Coluna", + "conditionalBreakpointEditorAction": "Depurar: Adicionar Ponto de Interrupção Condicional...", + "runToCursor": "Executar até o Cursor", + "debugEvaluate": "Depurar: Avaliar", + "debugAddToWatch": "Depurar: Adicionar ao monitoramento", + "showDebugHover": "Mostrar Item Flutuante" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/debugEditorModelManager.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugEditorModelManager.i18n.json new file mode 100644 index 0000000000000..f30b378456b37 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugEditorModelManager.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "breakpointDisabledHover": "Ponto de Parada Desativado", + "breakpointUnverifieddHover": "Ponto de Parada Não Verificado", + "breakpointDirtydHover": "Ponto de parada não verificado. O arquivo foi modificado, por favor reinicie a sessão de depuração.", + "breakpointUnsupported": "Pontos de parada condicionais não são suportados por esse tipo de depurador" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/debugQuickOpen.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugQuickOpen.i18n.json new file mode 100644 index 0000000000000..01955c44965b6 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugQuickOpen.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "depurar {0}", + "debugAriaLabel": "Digite um nome de uma configuração de lançamento para ser executado.", + "noConfigurationsMatching": "Não há configurações de depuração correspondentes", + "noConfigurationsFound": "Configurações de depuração não encontradas. Por favor, crie um arquivo 'launch.json'." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/exceptionWidget.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/exceptionWidget.i18n.json new file mode 100644 index 0000000000000..a8802c1316474 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/exceptionWidget.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugExceptionWidgetBorder": "Cor da borda da ferramenta de exceção.", + "debugExceptionWidgetBackground": "Cor de fundo da ferramenta de exceção.", + "exceptionThrownWithId": "Ocorreu exceção: {0}", + "exceptionThrown": "Ocorreu exceção." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json new file mode 100644 index 0000000000000..8c7a8761f41cc --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileLinkMac": "Clique para seguir (Cmd + clique abre ao lado)", + "fileLink": "Clique para seguir (Cmd + clique abre ao lado)" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/common/debug.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/common/debug.i18n.json new file mode 100644 index 0000000000000..3476b79d9e176 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/common/debug.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "internalConsoleOptions": "Controla o comportamento do console depuração interna." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/common/debugModel.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/common/debugModel.i18n.json new file mode 100644 index 0000000000000..fa2f5e8ada5ce --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/common/debugModel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "notAvailable": "não disponível", + "startDebugFirst": "Por favor, inicie uma sessão de depuração para avaliar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/common/debugSource.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/common/debugSource.i18n.json new file mode 100644 index 0000000000000..0e10c85d8186e --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/common/debugSource.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownSource": "Fonte desconhecida" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json new file mode 100644 index 0000000000000..05a7ccfe82744 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleDebugViewlet": "Visualizar Depurador", + "toggleDebugPanel": "Console do Depurador", + "debug": "Depurar", + "debugPanel": "Console do Depurador", + "view": "Exibir", + "debugCategory": "Depurar", + "debugCommands": "Configuração do Depurador", + "debugConfigurationTitle": "Depurar", + "allowBreakpointsEverywhere": "Permite definir um ponto de interrupção em qualquer arquivo.", + "openExplorerOnEnd": "Automaticamente abre a visualização do explorador no final de uma sessão de depuração", + "inlineValues": "Mostrar valores de variáveis em linha no editor durante a depuração", + "hideActionBar": "Controlar se a barra de ação flutuante do depurador deve ser ocultada", + "launch": "Configuração global do lançamento do depurador. Deve ser usado como uma alternativa para o arquivo 'launch.json' que é compartilhado entre os espaços de trabalho" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json new file mode 100644 index 0000000000000..85b353a37fe00 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noFolderDebugConfig": "Primeiro abra uma pasta para fazer uma configuração de depuração avançada." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json new file mode 100644 index 0000000000000..ada60277e7bf6 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json @@ -0,0 +1,38 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.debuggers": "Contribui adaptadores de depuração.", + "vscode.extension.contributes.debuggers.type": "Identificador único para esse adaptador de depuração.", + "vscode.extension.contributes.debuggers.label": "Nome de exibição para esse adaptador de depuração.", + "vscode.extension.contributes.debuggers.program": "Caminho para o programa adaptador de depuração. O caminho pode ser absoluto ou relativo à pasta de extensão.", + "vscode.extension.contributes.debuggers.args": "Argumentos opcionais a serem informados para o adaptador.", + "vscode.extension.contributes.debuggers.runtime": "Runtime opcional no caso do atributo do programa não ser um executável, mas requerer um runtime.", + "vscode.extension.contributes.debuggers.runtimeArgs": "Argumentos opcionais do runtime.", + "vscode.extension.contributes.debuggers.variables": "Mapeamento de variáveis interativas (por exemplo ${action.pickProcess}) em 'launch.json' para um comando.", + "vscode.extension.contributes.debuggers.initialConfigurations": "Configurações para gerar o 'launch.json' inicial.", + "vscode.extension.contributes.debuggers.languages": "Lista de idiomas para os quais a extensão de depuração pode ser considerada o \"depurador padrão\".", + "vscode.extension.contributes.debuggers.adapterExecutableCommand": "Se especificado VS Code chamará este comando para determinar o caminho do executável do adaptador de depuração e os argumentos para passar.", + "vscode.extension.contributes.debuggers.startSessionCommand": "Se especificado VS Code chamará este comando para as ações de \"depurar\" ou \"executar\" direcionadas para esta extensão.", + "vscode.extension.contributes.debuggers.configurationSnippets": "Trechos de código para adicionar novas configurações em 'launch.json'.", + "vscode.extension.contributes.debuggers.configurationAttributes": "Configurações de esquema JSON para validar 'launch.json'.", + "vscode.extension.contributes.debuggers.windows": "Configurações específicas do Windows.", + "vscode.extension.contributes.debuggers.windows.runtime": "Runtime usado para Windows.", + "vscode.extension.contributes.debuggers.osx": "Configurações específicas do OS X.", + "vscode.extension.contributes.debuggers.osx.runtime": "Runtime usado para o OS X.", + "vscode.extension.contributes.debuggers.linux": "Configurações específicas do Linux.", + "vscode.extension.contributes.debuggers.linux.runtime": "Runtime usado para o Linux.", + "vscode.extension.contributes.breakpoints": "Contribui aos pontos de interrupção.", + "vscode.extension.contributes.breakpoints.language": "Permitir pontos de parada para este idioma.", + "app.launch.json.title": "Executar", + "app.launch.json.version": "Versão deste formato de arquivo.", + "app.launch.json.configurations": "Lista de configurações. Adicionar novas configurações ou editar as existentes usando o IntelliSense.", + "app.launch.json.compounds": "Lista de compostos. Cada composto faz referência a várias configurações que vão ser executadas juntas.", + "app.launch.json.compound.name": "Nome do composto. Aparece no menu drop-down da configuração de execução.", + "app.launch.json.compounds.configurations": "Nomes das configurações que serão iniciadas como parte deste composto.", + "debugNoType": "'type' do adaptador de depuração não pode ser omitido e deve ser do tipo 'string'.", + "DebugConfig.failed": "Não é possível criar o arquivo 'launch.json' dentro da pasta '.vscode' ({0}).", + "selectDebug": "Selecione o ambiente" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.i18n.json new file mode 100644 index 0000000000000..1424499bfccb9 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeBreakpoints": "Remover pontos de interrupção", + "removeBreakpointOnColumn": "Remover ponto de interrupção na coluna {0}", + "removeLineBreakpoint": "Remover ponto de interrupção de linha", + "editBreakpoints": "Editar pontos de interrupção", + "editBreakpointOnColumn": "Editar o ponto de interrupção na coluna {0}", + "editLineBrekapoint": "Editar o ponto de interrupção de linha", + "enableDisableBreakpoints": "Habilitar/Desabilitar pontos de interrupção", + "disableColumnBreakpoint": "Desabilitar ponto de interrupção na coluna {0}", + "disableBreakpointOnLine": "Desabilitar ponto de interrupção de linha", + "enableBreakpoints": "Habilitar o ponto de interrupção na coluna {0}", + "enableBreakpointOnLine": "Habilitar o ponto de interrupção de linha", + "addBreakpoint": "Adicionar ponto de interrupção", + "addConfiguration": "Adicionar Configuração..." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugHover.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugHover.i18n.json new file mode 100644 index 0000000000000..1853865a1ecf9 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugHover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeAriaLabel": "Depurar passando o mouse por cima" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json new file mode 100644 index 0000000000000..de6d591510a0b --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "snapshotObj": "Apenas valores primitivos são mostrados para este objeto.", + "debuggingPaused": "Depuração pausada, razão {0}, {1} {2}", + "debuggingStarted": "Depuração Iniciada.", + "debuggingStopped": "Depuração parada.", + "breakpointAdded": "Adicionado ponto de interrupção, linha {0}, arquivo {1}", + "breakpointRemoved": "Ponto de interrupção removido, linha {0}, arquivo {1}", + "compoundMustHaveConfigurations": "Composição deve ter o atributo \"configurations\" definido para iniciar várias configurações.", + "configMissing": "Configuração '{0}' não tem 'launch.json'.", + "debugTypeNotSupported": "Tipo de depuração configurado '{0}' não é suportado.", + "debugTypeMissing": "Falta a propriedade 'type' para a configuração de lançamento escolhida.", + "preLaunchTaskErrors": "Erros de build foram detectados durante a preLaunchTask '{0}'.", + "preLaunchTaskError": "Erro de build foi detectado durante a preLaunchTask '{0}'.", + "preLaunchTaskExitCode": "A preLaunchTask '{0}' encerrada com código de saída {1}.", + "debugAnyway": "Depurar mesmo assim", + "noFolderWorkspaceDebugError": "O arquivo ativo não pode ser depurado. Certifique-se de que ele está salvo no disco e que tem uma extensão de depuração instalada para esse tipo de arquivo.", + "NewLaunchConfig": "Por favor, configure o arquivo de configuração de lançamento para seu aplicativo. {0}", + "DebugTaskNotFound": "Não foi possível encontrar o preLaunchTask '{0}'.", + "differentTaskRunning": "Há uma tarefa {0} sendo executada. Não pode executar a tarefa de pré-lançamento {1}." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugViewer.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugViewer.i18n.json new file mode 100644 index 0000000000000..ae47cc6a47d15 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugViewer.i18n.json @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "process": "Processar", + "paused": "Em pausa", + "running": "Em execução", + "thread": "Thread", + "pausedOn": "Pausado em {0}", + "loadMoreStackFrames": "Carregar mais segmentos de pilha", + "threadAriaLabel": "Thread {0}, pilha de chamadas, depuração", + "stackFrameAriaLabel": "Segmento de Pilha {0} linha {1} {2}, pilha de chamadas, depuração", + "variableValueAriaLabel": "Digite o novo valor da variável", + "variableScopeAriaLabel": "Escopo {0}, variáveis, depuração", + "variableAriaLabel": "{0} valor {1}, variáveis, depuração", + "watchExpressionPlaceholder": "Expressão para monitorar", + "watchExpressionInputAriaLabel": "Digitar expressão a monitorar", + "watchExpressionAriaLabel": "{0} valor {1}, monitorar, depuração", + "watchVariableAriaLabel": "{0} valor {1}, monitorar, depuração", + "functionBreakpointPlaceholder": "Função de parada", + "functionBreakPointInputAriaLabel": "Digitar Ponto de Parada de Função", + "functionBreakpointsNotSupported": "Pontos de parada de função não são suportados por este tipo de depuração", + "breakpointAriaLabel": "Ponto de parada linha {0} {1}, pontos de parada, depuração", + "functionBreakpointAriaLabel": "Ponto de parada de função {0}, pontos de parada, depuração", + "exceptionBreakpointAriaLabel": "Ponto de parada de exceção {0}, pontos de parada, depuração" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json new file mode 100644 index 0000000000000..d14c4338ceb77 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "variablesSection": "Seção de variáveis", + "variables": "Variáveis", + "variablesAriaTreeLabel": "Variáveis de Depuração", + "expressionsSection": "Seção de Expressões", + "watch": "Monitoramento", + "watchAriaTreeLabel": "Depurar Expressões Monitoradas", + "callstackSection": "Seção de Pilha de Chamada", + "debugStopped": "Pausado em {0}", + "callStack": "Pilha de Chamadas", + "callStackAriaLabel": "Depurar a Pilha de Chamadas", + "breakpointsSection": "Seção de Pontos de Parada", + "breakpoints": "Pontos de Parada", + "breakpointsAriaTreeLabel": "Depurar os Pontos de Parada" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json new file mode 100644 index 0000000000000..227ca95927f6a --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "copyValue": "Copiar valor", + "copy": "Copiar", + "copyAll": "Copiar todos", + "copyStackTrace": "Copiar Pilha de Chamadas" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json new file mode 100644 index 0000000000000..0ce97a8f7969c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "moreInfo": "Mais Informações", + "unableToLaunchDebugAdapter": "Não é possível executar o adaptador de depuração de '{0}'.", + "unableToLaunchDebugAdapterNoArgs": "Não é possível executar o adaptador de depuração.", + "stoppingDebugAdapter": "{0}. Parando o adaptador de depuração.", + "debugAdapterCrash": "Processo do adaptador de depuração foi finalizado inesperadamente" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json new file mode 100644 index 0000000000000..86d901ff7caf6 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "replAriaLabel": "Ler o Painel de Impressão Eval", + "actions.repl.historyPrevious": "História anterior", + "actions.repl.historyNext": "Próxima história", + "actions.repl.acceptInput": "REPL Aceitar Entrada", + "actions.repl.copyAll": "Depurar: Copiar Todos os Consoles" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json new file mode 100644 index 0000000000000..4afd6d64d8257 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "stateCapture": "Estado do objeto é capturado na primeira avaliação", + "replVariableAriaLabel": "Variável {0} tem valor {1}, ler a impressão do valor do loop, depurar", + "replExpressionAriaLabel": "Expressão {0} tem valor {1}, ler o laço de avaliação de impressão, depurar", + "replValueOutputAriaLabel": " impressão da avaliação do laço de leitura, depurar", + "replKeyValueOutputAriaLabel": "Variável de saída {0} tem valor {1}, ler o loop de avaliação de impressão, depurar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json new file mode 100644 index 0000000000000..86bf6e71ecc6a --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "statusBarDebuggingBackground": "Cor de fundo da barra de status quando um programa está sendo depurado. A barra de status é mostrada na parte inferior da janela", + "statusBarDebuggingForeground": "Cor de primeiro plano da barra de status quando um programa está sendo depurado. A barra de status é mostrada na parte inferior da janela" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/terminalSupport.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/terminalSupport.i18n.json new file mode 100644 index 0000000000000..898a18605fbc3 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/terminalSupport.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debug.terminal.title": "depurado", + "debug.terminal.not.available.error": "Terminal integrado não disponível" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json new file mode 100644 index 0000000000000..f0551dfe57b82 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugAdapterBinNotFound": "Executável do adaptador de depuração '{0}' não existe.", + "debugAdapterCannotDetermineExecutable": "Não é possível determinar o executável para o adaptador de depuração '{0}'.", + "debugType": "Tipo de configuração.", + "debugTypeNotRecognised": "O tipo de depuração não é reconhecido. Certifique-se de que você tem uma extensão de depuração correspondente instalada e que ela está habilitada.", + "node2NotSupported": "\"node2\" não é mais suportado, use \"node\" ao invés e defina o atributo \"protocol\" para \"inspector\".", + "debugName": "Nome da configuração; aparece no menu drop-down da configuração de lançamento. ", + "debugRequest": "Requer o tipo de configuração. Pode ser \"launch\" ou \"attach\".", + "debugServer": "Somente para o desenvolvimento de extensão de depuração: se uma porta é especificada, o VS Code tenta se conectar a um adaptador de depuração executando em modo de servidor", + "debugPrelaunchTask": "Tarefa para ser executada antes de começar a sessão de depuração.", + "debugWindowsConfiguration": "Atributos de configuração de lançamento específicos do Windows.", + "debugOSXConfiguration": "Atributos de configuração de lançamento específicos do OS X.", + "debugLinuxConfiguration": "Atributos de configuração de lançamento específicos do Linux.", + "deprecatedVariables": "'env.', 'config.' e 'command.' foram descontinuados, use ' env:', ' config:' e ' command:' em vez disso." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/browser/actions/showEmmetCommands.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/browser/actions/showEmmetCommands.i18n.json new file mode 100644 index 0000000000000..1e3a1c0f277af --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/browser/actions/showEmmetCommands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showEmmetCommands": "Mostrar Comandos do Emmet" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json new file mode 100644 index 0000000000000..1dc5e1e3b6923 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "balanceInward": "Emmet: Saldo (interno)", + "balanceOutward": "Emmet: Saldo (externo)" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json new file mode 100644 index 0000000000000..d9e3601f991af --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "previousEditPoint": "Emmet: Ir para o Ponto de Edição Anterior", + "nextEditPoint": "Emmet: Ir para o Próximo Ponto de Edição" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json new file mode 100644 index 0000000000000..b4a6a03e21357 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "evaluateMathExpression": "Emmet: Avaliar a expressão matemática" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json new file mode 100644 index 0000000000000..5a5dd3cc3e843 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "expandAbbreviationAction": "Emmet: Expandir Abreviação" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json new file mode 100644 index 0000000000000..306332a4af226 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "incrementNumberByOneTenth": "Emmet: Incremento de 0.1", + "incrementNumberByOne": "Emmet: Incremento de 1", + "incrementNumberByTen": "Emmet: Incremento de 10", + "decrementNumberByOneTenth": "Emmet: Decréscimo por 0.1", + "decrementNumberByOne": "Emmet: Decréscimo por 1", + "decrementNumberByTen": "Emmet: Decréscimo por 10" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json new file mode 100644 index 0000000000000..6a742c4d5f91d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "matchingPair": "Emmet: Ir para o par de correspondência" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json new file mode 100644 index 0000000000000..22ed3f5f533ab --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mergeLines": "Emmet: Mesclar linhas" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json new file mode 100644 index 0000000000000..bc0eefc2e0042 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reflectCSSValue": "Emmet: Refletir valor CSS" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json new file mode 100644 index 0000000000000..a30414b08d2d3 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeTag": "Emmet: Remover Rótulo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json new file mode 100644 index 0000000000000..1343e2d6b3664 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "selectPreviousItem": "Emmet: Selecione o Item anterior", + "selectNextItem": "Emmet: Selecione o próximo Item" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json new file mode 100644 index 0000000000000..ea04346ea7cf5 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "splitJoinTag": "Emmet: Dividir/Juntar Rótulo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json new file mode 100644 index 0000000000000..366cb874a0c70 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleComment": "Emmet: Alternar Comentário" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json new file mode 100644 index 0000000000000..1eff88ade9dcd --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateImageSize": "Emmet: Atualizar o Tamanho da Imagem" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json new file mode 100644 index 0000000000000..963a85e1671f5 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateTag": "Emmet: Atualizar Rótulo", + "enterTag": "Insira o Rótulo", + "tag": "Rótulo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json new file mode 100644 index 0000000000000..501253b7dcbb7 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wrapWithAbbreviationAction": "Emmet: Envelope com a abreviatura", + "enterAbbreviation": "Digite a abreviação", + "abbreviation": "Abreviação" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json new file mode 100644 index 0000000000000..ee08d95bf189d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emmetConfigurationTitle": "Emmet", + "triggerExpansionOnTab": "Quando habilitado, abreviações emmet são expandidas ao pressionar TAB.", + "emmetPreferences": "Preferências usadas para modificar o comportamento de algumas ações e resolvedores de Emmet.", + "emmetSyntaxProfiles": "Definir o perfil para a sintaxe especificada ou usar seu próprio perfil com regras específicas.", + "emmetExclude": "Uma matriz de línguagens onde abreviaturas emmet não devem ser expandidas.", + "emmetExtensionsPath": "Caminho para uma pasta contendo perfis emmet, trechos e preferências", + "useNewEmmet": "Experimente os novos módulos emmet (que irão substituir a antiga biblioteca unica emmet) para todos os recursos emmet." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/execution/electron-browser/terminal.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/execution/electron-browser/terminal.contribution.i18n.json new file mode 100644 index 0000000000000..95274daf75039 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/execution/electron-browser/terminal.contribution.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminalConfigurationTitle": "Terminal Externo", + "terminal.external.windowsExec": "Personalizar qual terminal executar no Windows.", + "terminal.external.osxExec": "Personalizar qual aplicativo de terminal executar no OS X.", + "terminal.external.linuxExec": "Personalizar qual terminal executar no Linux.", + "globalConsoleActionWin": "Abrir Novo Prompt de Comando", + "globalConsoleActionMacLinux": "Abrir Novo Terminal", + "scopedConsoleActionWin": "Abrir no Prompt de Comando", + "scopedConsoleActionMacLinux": "Abrir no Terminal" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/execution/electron-browser/terminalService.i18n.json b/i18n/ptb/src/vs/workbench/parts/execution/electron-browser/terminalService.i18n.json new file mode 100644 index 0000000000000..fde640b09c5d2 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/execution/electron-browser/terminalService.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "console.title": "Console VS Code", + "mac.terminal.script.failed": "Script '{0}' falhou com código de saída {1}", + "mac.terminal.type.not.supported": "'{0}' não suportado", + "press.any.key": "Pressione qualquer tecla para continuar...", + "linux.term.failed": "'{0}' falhou com código de saída {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json new file mode 100644 index 0000000000000..d79e3c4ca0ac2 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.view": "Contribui ao modo de exibição personalizado", + "vscode.extension.contributes.view.id": "Identificação única usada para identificar a vista criada por vscode.workspace.createTreeView", + "vscode.extension.contributes.view.label": "Sequência de caracteres legível usada para processar a visualização", + "vscode.extension.contributes.view.icon": "Caminho para o ícone da visualização", + "vscode.extension.contributes.views": "Contribui com visualizações personalizadas", + "showViewlet": "Mostrar {0}", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorerActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorerActions.i18n.json new file mode 100644 index 0000000000000..37735d1000708 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorerActions.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "refresh": "Atualizar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorerService.i18n.json b/i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorerService.i18n.json new file mode 100644 index 0000000000000..7b7f16b3812fc --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorerService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.noMatchingProviderId": "Não há TreeExplorerNodeProvider com id {providerId} registrado." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.i18n.json b/i18n/ptb/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.i18n.json new file mode 100644 index 0000000000000..0e7f5f9cd9210 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorerViewlet.tree": "Seção do Explorador da Árvore" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/browser/dependenciesViewer.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/browser/dependenciesViewer.i18n.json new file mode 100644 index 0000000000000..0ebd24a9fd8a5 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/browser/dependenciesViewer.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error": "Erro", + "Unknown Dependency": "Dependência Desconhecida:" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json new file mode 100644 index 0000000000000..5e56d61c26b80 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -0,0 +1,44 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "name": "Nome da extensão", + "extension id": "Identificador da extensão", + "publisher": "Nome do editor", + "install count": "Quantidade de Instalações", + "rating": "Avaliação", + "license": "Licença", + "details": "Detalhes", + "contributions": "Contribuições", + "changelog": "Registro de Alterações", + "dependencies": "Dependências", + "noReadme": "README não disponível.", + "noChangelog": "Registro de Alterações não disponível.", + "noContributions": "Sem Contribuições", + "noDependencies": "Sem Dependências", + "settings": "Configurações ({0})", + "setting name": "Nome", + "description": "Descrição", + "default": "Valor padrão", + "debuggers": "Depuradores ({0})", + "debugger name": "Nome", + "debugger type": "Tipo", + "views": "Visualizações ({0})", + "view id": "ID", + "view name": "Nome", + "view location": "Onde", + "themes": "Temas ({0})", + "JSON Validation": "Validação JSON ({0})", + "commands": "Comandos ({0})", + "command name": "Nome", + "keyboard shortcuts": "Atalhos de Teclado", + "menuContexts": "Contextos de Menu", + "languages": "Linguagens ({0})", + "language id": "ID", + "language name": "Nome", + "file extensions": "Extensões de Arquivo", + "grammar": "Gramática", + "snippets": "Trechos" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json new file mode 100644 index 0000000000000..61966d0e312bb --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -0,0 +1,62 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "installAction": "Instalar", + "installing": "Instalando", + "uninstallAction": "Desinstalar", + "Uninstalling": "Desinstalando", + "updateAction": "Atualizar", + "updateTo": "Atualizar para {0}", + "enableForWorkspaceAction.label": "Habilitar (Espaço de Trabalho)", + "enableAlwaysAction.label": "Habilitar (Sempre)", + "disableForWorkspaceAction.label": "Desabilitar (Espaço de Trabalho)", + "disableAlwaysAction.label": "Desabilitar (Sempre)", + "ManageExtensionAction.uninstallingTooltip": "Desinstalando", + "enableForWorkspaceAction": "Espaço de trabalho", + "enableGloballyAction": "Sempre", + "enableAction": "Habilitar", + "disableForWorkspaceAction": "Espaço de trabalho", + "disableGloballyAction": "Sempre", + "disableAction": "Desabilitar", + "checkForUpdates": "Verificar Atualizações", + "enableAutoUpdate": "Habilitar Extensões Auto-Atualizáveis", + "disableAutoUpdate": "Desabilitar Extensões Auto-Atualizáveis", + "updateAll": "Atualizar Todas as Extensões", + "reloadAction": "Recarregar", + "postUpdateTooltip": "Recarregar para atualizar", + "postUpdateMessage": "Recarregar esta janela para ativar a extensão atualizada '{0}'?", + "postEnableTooltip": "Recarregar para ativar", + "postEnableMessage": "Recarregar esta janela para ativar a extensão '{0}'?", + "postDisableTooltip": "Recarregar para desativar", + "postDisableMessage": "Recarregar esta janela para desativar a extensão '{0}'?", + "postUninstallTooltip": "Recarregar para desativar", + "postUninstallMessage": "Recarregar esta janela para desativar a extensão desinstalada '{0}'?", + "reload": "&&Recarregar Janela", + "toggleExtensionsViewlet": "Mostrar Extensões", + "installExtensions": "Instalar Extensões", + "showInstalledExtensions": "Mostrar Extensões Instaladas", + "showDisabledExtensions": "Mostrar Extensões Desabilitadas", + "clearExtensionsInput": "Limpar Entrada de Extensões", + "showOutdatedExtensions": "Mostrar Extensões Desatualizadas", + "showPopularExtensions": "Mostrar Extensões Populares", + "showRecommendedExtensions": "Mostrar Extensões Recomendadas", + "showWorkspaceRecommendedExtensions": "Mostrar Extensões Recomendadas para o Espaço de Trabalho", + "showRecommendedKeymapExtensions": "Mostrar Mapeamentos de Teclado Recomendados", + "showRecommendedKeymapExtensionsShort": "Mapeamentos de Teclado", + "showLanguageExtensions": "Mostrar Extensões de Linguagem", + "showLanguageExtensionsShort": "Extensões de Linguagem", + "configureWorkspaceRecommendedExtensions": "Configurar Extensões Recomendadas (Espaço de Trabalho)", + "ConfigureWorkspaceRecommendations.noWorkspace": "As recomendações somente estão disponíveis em uma pasta do espaço de trabalho.", + "OpenExtensionsFile.failed": "Não foi possível criar o arquivo 'extensions.json' na pasta '.vscode' ({0}).", + "builtin": "Intrínseco", + "disableAll": "Desabilitar Todas as Extensões Instaladas", + "disableAllWorkspace": "Desabilitar Todas as Extensões Instaladas para este Espaço de Trabalho", + "enableAll": "Habilitar Todas as Extensões Instaladas", + "enableAllWorkspace": "Habilitar Todas as Extensões Instaladas para este Espaço de Trabalho", + "extensionButtonProminentBackground": "Cor de fundo do botão para a ações de extensão que se destacam (por exemplo, o botão de instalar).", + "extensionButtonProminentForeground": "Cor de primeiro plano do botão para a ações de extensão que se destacam (por exemplo, o botão de instalar).", + "extensionButtonProminentHoverBackground": "Cor de fundo ao passar o mouse sobre o botão para a ações de extensão que se destacam (por exemplo, o botão de instalar)." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json new file mode 100644 index 0000000000000..666a66921792b --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "manage": "Pressione Enter para gerenciar suas extensões.", + "searchFor": "Pressione Enter para pesquisar por '{0}' na Loja.", + "noExtensionsToInstall": "Digite um nome de extensão" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.i18n.json new file mode 100644 index 0000000000000..b90c0d5ac642c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "app.extensions.json.title": "Extensões", + "app.extensions.json.recommendations": "Lista de recomendações de extensões. O identificador de uma extensão é sempre ' ${publisher}. ${nome}'. Por exemplo: 'vscode.csharp'.", + "app.extension.identifier.errorMessage": "Formato esperado '${editor}.${nome}'. Exemplo: 'vscode.csharp'." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json new file mode 100644 index 0000000000000..333627e961989 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensionsInputName": "Extensão: {0}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json new file mode 100644 index 0000000000000..663560d4d78a1 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reallyRecommended2": "A extensão {0} é recomendada para este tipo de arquivo.", + "showRecommendations": "Mostrar Recomendações", + "neverShowAgain": "Não mostrar novamente", + "close": "Fechar", + "workspaceRecommended": "Este espaço de trabalho possui recomendações de extensão.", + "ignoreExtensionRecommendations": "Deseja ignorar todas as recomendações de extensão?", + "ignoreAll": "Sim, Ignorar Tudo", + "no": "Não", + "cancel": "Cancelar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json new file mode 100644 index 0000000000000..76bf037948158 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensionsCommands": "Gerenciar Extensões", + "galleryExtensionsCommands": "Instalar Extensões da Galeria", + "extension": "Extensão", + "extensions": "Extensões", + "view": "Exibir", + "extensionsConfigurationTitle": "Extensões", + "extensionsAutoUpdate": "Atualizar extensões automaticamente", + "extensionsIgnoreRecommendations": "Ignorar recomendações de extensão" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json new file mode 100644 index 0000000000000..731e4ef949173 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openExtensionsFolder": "Abrir a Pasta de Extensões", + "installVSIX": "Instalar do VSIX...", + "InstallVSIXAction.success": "A extensão foi instalada com sucesso. Reinicie para habilitá-la.", + "InstallVSIXAction.reloadNow": "Recarregar Agora" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json new file mode 100644 index 0000000000000..e1aa51729e52b --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "disableOtherKeymapsConfirmation": "Desabilitar outros mapeamentos de teclado ({0}) para evitar conflitos entre as combinações de teclas?", + "yes": "Sim", + "no": "Não", + "betterMergeDisabled": "A extensão Better Merge agora é intrínseca, a extensão instalada foi desabilitada e pode ser desinstalada.", + "uninstall": "Desinstalar", + "later": "Mais tarde" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json new file mode 100644 index 0000000000000..99808cb9a0492 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "marketPlace": "Loja", + "installedExtensions": "Instalado", + "searchInstalledExtensions": "Instalado", + "recommendedExtensions": "Recomendado", + "searchExtensions": "Pesquisar Extensões na Loja", + "sort by installs": "Ordenar por: Quantidade de Instalações", + "sort by rating": "Ordenar por: Avaliação", + "sort by name": "Ordenar por: Nome", + "suggestProxyError": "A Loja retornou 'ECONNREFUSED'. Por favor, verifique a configuração de 'http.proxy'.", + "extensions": "Extensões", + "outdatedExtensions": "{0} Extensões Desatualizadas" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json new file mode 100644 index 0000000000000..9c004614f2092 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensions": "Extensões", + "no extensions found": "Nenhuma extensão encontrada.", + "suggestProxyError": "A Loja retornou 'ECONNREFUSED'. Por favor, verifique a configuração de 'http.proxy'." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json new file mode 100644 index 0000000000000..3ab045563d8dc --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "enableDependeciesConfirmation": "Habilitando '{0}' também habilita suas dependências. Gostaria de continuar?", + "enable": "Sim", + "doNotEnable": "Não", + "disableDependeciesConfirmation": "Gostaria de desabilitar somente '{0}', ou as suas dependências também?", + "disableOnly": "Apenas", + "disableAll": "Todos", + "cancel": "Cancelar", + "singleDependentError": "Não é possível desabilitar a extensão '{0}'. A extensão '{1}' depende dela.", + "twoDependentsError": "Não é possível desabilitar a extensão '{0}'. As extensões '{1}' e '{2}' dependem dela.", + "multipleDependentsError": "Não é possível desabilitar a extensão '{0}'. As extensões '{1}', '{2}' e outras dependem dela.", + "installConfirmation": "Gostaria de instalar a extensão '{0}'?", + "install": "Instalar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json b/i18n/ptb/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json new file mode 100644 index 0000000000000..5d3c22c39a84f --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "sendFeedback": "Tweetar Feedback", + "label.sendASmile": "Tweete feedback para nós", + "patchedVersion1": "Sua instalação está corrompida.", + "patchedVersion2": "Por favor especificar isso ao enviar um bug.", + "sentiment": "Como foi sua experiência?", + "smileCaption": "Feliz", + "frownCaption": "Triste", + "other ways to contact us": "Outras maneiras de nos contatar", + "submit a bug": "Submeter um bug", + "request a missing feature": "Solicitar um recurso ausente", + "tell us why?": "Diga-nos porquê?", + "commentsHeader": "Comentários", + "tweet": "Tweetar", + "character left": "caractere à esquerda", + "characters left": "caracteres à esquerda", + "feedbackSending": "Enviando", + "feedbackSent": "Obrigado", + "feedbackSendingError": "Tentar novamente" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/editors/binaryFileEditor.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/editors/binaryFileEditor.i18n.json new file mode 100644 index 0000000000000..9c33fd25246c0 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/editors/binaryFileEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "binaryFileEditor": "Visualizador de Arquivo Binário" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/editors/textFileEditor.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/editors/textFileEditor.i18n.json new file mode 100644 index 0000000000000..792781bc8c794 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/editors/textFileEditor.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "textFileEditor": "Editor de Arquivo de Texto", + "createFile": "Criar arquivo", + "fileEditorWithInputAriaLabel": "{0}. Editor de Arquivo de Texto.", + "fileEditorAriaLabel": "Editor de Arquivo de Texto" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/fileActions.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/fileActions.contribution.i18n.json new file mode 100644 index 0000000000000..f203671c230bf --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/fileActions.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "filesCategory": "Arquivos", + "revealInSideBar": "Revelar na Barra Lateral", + "acceptLocalChanges": "Usar mudanças locais e sobrescrever o conteúdo do disco", + "revertLocalChanges": "Descartar mudanças locais e reverter para conteúdo do disco" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/fileActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/fileActions.i18n.json new file mode 100644 index 0000000000000..161e7a9a16cdf --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/fileActions.i18n.json @@ -0,0 +1,73 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "retry": "Tentar novamente", + "rename": "Renomear", + "newFile": "Novo Arquivo", + "newFolder": "Nova Pasta", + "openFolderFirst": "Abrir uma pasta primeiro para criar arquivos ou pastas dentro dele.", + "newUntitledFile": "Novo Arquivo Sem Título", + "createNewFile": "Novo Arquivo", + "createNewFolder": "Nova Pasta", + "deleteButtonLabelRecycleBin": "&&Mover para Lixeira", + "deleteButtonLabelTrash": "&&Mover para o Lixo", + "deleteButtonLabel": "&&Excluir", + "dirtyMessageFolderOneDelete": "Você está excluindo uma pasta com alterações não salvas em 1 arquivo. Você quer continuar?", + "dirtyMessageFolderDelete": "Você está excluindo uma pasta com alterações não salvas em {0} arquivos. Você quer continuar?", + "dirtyMessageFileDelete": "Você está excluindo um arquivo com alterações não salvas. Você quer continuar?", + "dirtyWarning": "Suas alterações serão perdidas se você não salvá-las.", + "confirmMoveTrashMessageFolder": "Tem certeza de que deseja excluir '{0}' e seu conteúdo?", + "confirmMoveTrashMessageFile": "Tem certeza de que deseja excluir '{0}'?", + "undoBin": "Você pode restaurar da lixeira.", + "undoTrash": "Você pode restaurar a partir do lixo.", + "confirmDeleteMessageFolder": "Tem certeza de que deseja excluir permanentemente '{0}' e seu conteúdo?", + "confirmDeleteMessageFile": "Tem certeza de que deseja excluir permanentemente '{0}'?", + "irreversible": "Esta ação é irreversível!", + "permDelete": "Excluir permanentemente", + "delete": "Excluir", + "importFiles": "Importar Arquivos", + "confirmOverwrite": "Um arquivo ou pasta com o mesmo nome já existe na pasta de destino. Você quer substituí-lo?", + "replaceButtonLabel": "&&Substituir", + "copyFile": "Copiar", + "pasteFile": "Colar", + "duplicateFile": "Duplicar", + "openToSide": "Aberto para o lado", + "compareSource": "Selecione para comparar", + "globalCompareFile": "Compare o Arquivo Ativo Com...", + "pickHistory": "Selecione um arquivo previamente aberto para comparar com", + "unableToFileToCompare": "O arquivo selecionado não pode ser comparado com '{0}'.", + "openFileToCompare": "Abrir um arquivo primeiro para compará-lo com outro arquivo.", + "compareWith": "Comparar com '{0}'", + "compareFiles": "Comparar Arquivos", + "refresh": "Atualizar", + "save": "Salvar", + "saveAs": "Salvar como...", + "saveAll": "Salvar Todos", + "saveAllInGroup": "Salvar Todos no Grupo", + "saveFiles": "Salvar Arquivos Sujos", + "revert": "Reverter Arquivo", + "focusOpenEditors": "Foco na Visualização dos Editores Abertos", + "focusFilesExplorer": "Foco no Explorador de Arquivos", + "showInExplorer": "Revelar o Arquivo Ativo na Barra Lateral", + "openFileToShow": "Abrir um arquivo primeiro para mostrá-lo no explorer", + "collapseExplorerFolders": "Esconder Pastas no Explorador", + "refreshExplorer": "Atualizar Explorador", + "openFile": "Abrir arquivo...", + "openFileInNewWindow": "Abrir o Arquivo Ativo em uma Nova Janela", + "openFileToShowInNewWindow": "Abrir um arquivo primeiro para abrir em uma nova janela", + "revealInWindows": "Revelar no Explorer", + "revealInMac": "Revelar no Finder", + "openContainer": "Abrir a Pasta", + "revealActiveFileInWindows": "Revelar Arquivo Ativo no Windows Explorer", + "revealActiveFileInMac": "Revelar Arquivo Ativo no Finder", + "openActiveFileContainer": "Abrir a Pasta do Arquivo Ativo.", + "copyPath": "Copiar Caminho", + "copyPathOfActive": "Copiar Caminho do Arquivo Ativo", + "emptyFileNameError": "Um nome de arquivo ou pasta deve ser fornecido.", + "fileNameExistsError": "Um arquivo ou pasta **{0}** já existe neste local. Escolha um nome diferente.", + "invalidFileNameError": "O nome **{0}** não é válido como um nome de arquivo ou pasta. Por favor, escolha um nome diferente.", + "filePathTooLongError": "O nome **{0}** resulta em um caminho muito longo. Escolha um nome mais curto." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/fileCommands.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/fileCommands.i18n.json new file mode 100644 index 0000000000000..2e61a1656c803 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/fileCommands.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFileToCopy": "Abrir um arquivo primeiro para copiar seu caminho", + "openFileToReveal": "Abrir um arquivo primeiro para revelar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/files.contribution.i18n.json new file mode 100644 index 0000000000000..14b3d5388b1c4 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -0,0 +1,41 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showExplorerViewlet": "Mostrar Explorer", + "explore": "Explorador", + "view": "Exibir", + "textFileEditor": "Editor de Arquivo de Texto", + "binaryFileEditor": "Editor de Arquivo Binário", + "filesConfigurationTitle": "Arquivos", + "exclude": "Configure os padrões glob para excluir arquivos e pastas.", + "files.exclude.boolean": "O padrão glob com o qual combinar os caminhos de arquivo. Defina para verdadeiro ou falso para habilitar ou desabilitar o padrão.", + "files.exclude.when": "Verificação adicional nos irmãos de um arquivo correspondente. Use $(basename) como variável para o nome do arquivo correspondente.", + "associations": "Configurar as associações de arquivo para linguagens (por exemplo, \"* Extension\": \"html\"). Estas têm precedência sobre as associações padrão das linguagens instaladas.", + "encoding": "A codificação padrão do conjunto de caracteres para ser usada ao ler e gravar arquivos.", + "autoGuessEncoding": "Quando habilitado, tentará adivinhar a codificação do conjunto de caracteres ao abrir arquivos", + "eol": "O caractere padrão de fim de linha. Use \\n para LF e \\r\\n para CRLF.", + "trimTrailingWhitespace": "Quando habilitado, removerá espaços em branco à direita ao salvar um arquivo.", + "insertFinalNewline": "Quando habilitado, inseririrá uma nova linha no final do arquivo quando salvá-lo.", + "files.autoSave.off": "Um arquivo sujo nunca é automaticamente salvo.", + "files.autoSave.afterDelay": "Um arquivo sujo é salvo automaticamente após configurado em 'files.autoSaveDelay'.", + "files.autoSave.onFocusChange": "Um arquivo sujo é salvo automaticamente quando o editor perde o foco.", + "files.autoSave.onWindowChange": "Um arquivo sujo é salvo automaticamente quando a janela perde o foco.", + "autoSave": "Controla o auto-salvamento de arquivos sujos. Aceita os valores: '{0}', '{1}', '{2}' (editor perde o foco), '{3}' (janela perde o foco). Se definido como '{4}', você pode configurar o atraso em 'files.autoSaveDelay'.", + "autoSaveDelay": "Controla o atraso em milissegundos depois que um arquivo sujo é salvo automaticamente. Só se aplica quando 'files.autoSave' for definida como '{0}'", + "hotExit.off": "Desabilitar a saída à quente.", + "hotExit.onExit": "Saída à quente será acionada quando o aplicativo for fechado, ou seja, quando a última janela é fechada no Windows/Linux ou quando o comando workbench.action.quit é acionado (paleta de comandos, keybinding, menu). Todas as janelas com backups serão restauradas na próxima execução.", + "hotExit.onExitAndWindowClose": "Saída à quente será acionada quando o aplicativo for fechado, ou seja, quando a última janela é fechada no Windows/Linux ou quando o comando workbench.action.quit é acionado (paleta de comando, keybinding, menu), e também para qualquer janela com uma pasta aberta independentemente se é a última janela. Todas as janelas sem pastas abertas serão restauradas no próximo lançamento. Para restaurar janelas de pastas como eram antes do desligamento configure \"window.restoreWindows\" para \"todos\".", + "hotExit": "Controla se os arquivos não salvos são lembrados entre as sessões, permitindo salvar alerta ao sair do editor seja ignorada.", + "useExperimentalFileWatcher": "Usar o novo monitor experimental de arquivo.", + "defaultLanguage": "O modo de linguagem padrão que é atribuída para novos arquivos.", + "editorConfigurationTitle": "Editor", + "formatOnSave": "Formata um arquivo no salvamento. Um formatador deve estar disponível, o arquivo não deve ser salvo automaticamente e editor não deve ser desligado.", + "explorerConfigurationTitle": "Explorador de arquivos", + "openEditorsVisible": "Número de editores mostrado no painel Abrir Editores. Configurá-lo para 0 irá ocultar o painel.", + "dynamicHeight": "Controla se a altura da seção de editores abertos deve adaptar-se dinamicamente para o número de elementos ou não.", + "autoReveal": "Controla se o explorador deve automaticamente revelar e selecionar arquivos ao abri-los.", + "enableDragAndDrop": "Controla se o explorador deve permitir mover arquivos e pastas através de arrastar e soltar." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json new file mode 100644 index 0000000000000..30a0a48f866a0 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "discard": "Descartar", + "overwrite": "Sobrescrever", + "retry": "Tentar novamente", + "readonlySaveError": "Falha ao salvar '{0}': O arquivo está protegido contra gravação. Selecione 'Substituir' para remover a proteção.", + "genericSaveError": "Erro ao salvar '{0}': {1}", + "staleSaveError": "Falha ao salvar '{0}': O conteúdo no disco é mais recente. Clique em **Comparar** para comparar a sua versão com a do disco.", + "compareChanges": "Comparar", + "saveConflictDiffLabel": "{0} (no disco) ↔ {1} (em {2}) - Resolver conflitos de salvamento", + "userGuide": "Use as ações na barra de ferramentas do editor para **desfazer** suas alterações ou **substituir** o conteúdo no disco com as suas alterações" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json new file mode 100644 index 0000000000000..38f98ed942049 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noWorkspace": "Nenhuma Pasta Aberta", + "explorerSection": "Seção de Explorador de Arquivos", + "noWorkspaceHelp": "Você ainda não abriu uma pasta.", + "openFolder": "Abrir Pasta" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json new file mode 100644 index 0000000000000..c38254d5f758e --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "explorerSection": "Seção de Explorador de Arquivos", + "folders": "Pastas", + "treeAriaLabel": "Explorador de Arquivos" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/views/explorerViewer.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/views/explorerViewer.i18n.json new file mode 100644 index 0000000000000..c670883e6ace8 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/views/explorerViewer.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileInputAriaLabel": "Digite o Nome do arquivo. Pressione Enter para confirmar ou Escape para cancelar.", + "filesExplorerViewerAriaLabel": "{0}, Explorador de Arquivos", + "confirmOverwriteMessage": "'{0}' já existe na pasta de destino. Deseja substituí-lo?", + "irreversible": "Esta ação é irreversível!", + "replaceButtonLabel": "&&Substituir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json new file mode 100644 index 0000000000000..1156319992901 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openEditors": "Abrir Editores", + "openEditosrSection": "Abrir Seção de Editores", + "treeAriaLabel": "Abrir Editores: Lista de Arquivos Ativos", + "dirtyCounter": "{0} não salvos" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json new file mode 100644 index 0000000000000..31c95aa9bce41 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGroupAriaLabel": "{0}, Agrupar Editor", + "openEditorAriaLabel": "{0}, Abrir Editor", + "saveAll": "Salvar Todos", + "closeAllUnmodified": "Fechar Não Modificados", + "closeAll": "Fechar todos", + "close": "Fechar", + "closeOthers": "Fechar Outros" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/common/dirtyFilesTracker.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/common/dirtyFilesTracker.i18n.json new file mode 100644 index 0000000000000..9e75b7b2a8904 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/common/dirtyFilesTracker.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "dirtyFiles": "{0} arquivos não salvos" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json new file mode 100644 index 0000000000000..f29992f5d95ab --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "orphanedFile": "{0} (excluído do disco)" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/html/browser/html.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/html/browser/html.contribution.i18n.json new file mode 100644 index 0000000000000..f9530b0f6f6e5 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/html/browser/html.contribution.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "html.editor.label": "Visualização Html" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/html/browser/htmlPreviewPart.i18n.json b/i18n/ptb/src/vs/workbench/parts/html/browser/htmlPreviewPart.i18n.json new file mode 100644 index 0000000000000..8df4c48f58cf1 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/html/browser/htmlPreviewPart.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "html.voidInput": "Entrada inválida do editor." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/html/browser/webview.i18n.json b/i18n/ptb/src/vs/workbench/parts/html/browser/webview.i18n.json new file mode 100644 index 0000000000000..2ef4463deb991 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/html/browser/webview.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "devtools.webview": "Desenvolvedor: Ferramentas Webview" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/markers/common/messages.i18n.json b/i18n/ptb/src/vs/workbench/parts/markers/common/messages.i18n.json new file mode 100644 index 0000000000000..8576955d6093f --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/markers/common/messages.i18n.json @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewCategory": "Exibir", + "problems.view.show.label": "Mostrar Problemas", + "problems.panel.configuration.title": "Visualização de Problemas", + "problems.panel.configuration.autoreveal": "Controla se a visaulização de problemas evela os arquivos automaticamente ao abri-los", + "markers.panel.title.problems": "Problemas", + "markers.panel.aria.label.problems.tree": "Problemas agrupados por arquivos", + "markers.panel.no.problems.build": "Nenhum problema foi detectado na área de trabalho até agora.", + "markers.panel.no.problems.filters": "Nenhum resultado encontrado com os critérios de filtro fornecidos", + "markers.panel.action.filter": "Problemas de Filtro", + "markers.panel.filter.placeholder": "Filtrar por tipo ou texto", + "markers.panel.filter.errors": "erros", + "markers.panel.filter.warnings": "avisos", + "markers.panel.filter.infos": "informações", + "markers.panel.single.error.label": "1 Erro", + "markers.panel.multiple.errors.label": "{0} Erros", + "markers.panel.single.warning.label": "1 Aviso", + "markers.panel.multiple.warnings.label": "{0} Avisos", + "markers.panel.single.info.label": "1 Informação", + "markers.panel.multiple.infos.label": "{0} Informações", + "markers.panel.single.unknown.label": "1 Desconhecido", + "markers.panel.multiple.unknowns.label": "{0} Desconhecidos", + "markers.panel.at.ln.col.number": "({0}, {1})", + "problems.tree.aria.label.resource": "{0} com {1} problemas", + "problems.tree.aria.label.error.marker": "Erro gerado por {0}: {1} na linha {2} e caractere {3}", + "problems.tree.aria.label.error.marker.nosource": "Erro: {0} na linha {1} e caractere {2}", + "problems.tree.aria.label.warning.marker": "Aviso gerado por {0}: {1} na linha {2} e caractere {3}", + "problems.tree.aria.label.warning.marker.nosource": "Aviso: {0} na linha {1} e caractere {2}", + "problems.tree.aria.label.info.marker": "Informação gerada por {0}: {1} na linha {2} e caractere {3}", + "problems.tree.aria.label.info.marker.nosource": "Informação: {0} na linha {1} e caractere {2}", + "problems.tree.aria.label.marker": "Problema gerado por {0}: {1} na linha {2} e caractere {3}", + "problems.tree.aria.label.marker.nosource": "Problema: {0} na linha {1} e caractere {2}", + "errors.warnings.show.label": "Mostrar Erros e Avisos" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/markers/electron-browser/markersElectronContributions.i18n.json b/i18n/ptb/src/vs/workbench/parts/markers/electron-browser/markersElectronContributions.i18n.json new file mode 100644 index 0000000000000..027c80cca307b --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/markers/electron-browser/markersElectronContributions.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "copyMarker": "Copiar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/nps/electron-browser/nps.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/nps/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..1ec18c632a4c6 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/nps/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "Você deseja responder a uma pequena pesquisa?", + "takeSurvey": "Responder a pesquisa", + "remindLater": "Lembrar mais tarde", + "neverAgain": "Não mostrar novamente" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/output/browser/output.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/output/browser/output.contribution.i18n.json new file mode 100644 index 0000000000000..e36bdadf4e9c8 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/output/browser/output.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "output": "Saída", + "viewCategory": "Exibir", + "clearOutput.label": "Limpar saída" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/output/browser/outputActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/output/browser/outputActions.i18n.json new file mode 100644 index 0000000000000..00bca0dc3098c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/output/browser/outputActions.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleOutput": "Alternar Saída", + "clearOutput": "Limpar saída", + "toggleOutputScrollLock": "Alternar Scroll Lock de Saída", + "switchToOutput.label": "Mudar para Saída" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/output/browser/outputPanel.i18n.json b/i18n/ptb/src/vs/workbench/parts/output/browser/outputPanel.i18n.json new file mode 100644 index 0000000000000..ec28fd7b2a324 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/output/browser/outputPanel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "outputPanelWithInputAriaLabel": "{0}, Painel de saída", + "outputPanelAriaLabel": "Painel de saída" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/output/common/output.i18n.json b/i18n/ptb/src/vs/workbench/parts/output/common/output.i18n.json new file mode 100644 index 0000000000000..a083a6e7d9d21 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/output/common/output.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "output": "Saída", + "channel": "para '{0}'" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json new file mode 100644 index 0000000000000..5fda62eb168cf --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "slow": "Inicialização lenta detectada", + "slow.detail": "Pena que você teve uma inicialização lenta. Por favor reinicie '{0}' com perfil de desempenho habilitado, compartilhe os perfis conosco e nós trabalharemos duro para fazer com que a inicialização fique perfeita novamente.", + "prof.message": "Perfis criados com sucesso.", + "prof.detail": "Por favor, crie um problema e anexe manualmente os seguintes arquivos:\n{0}", + "prof.restartAndFileIssue": "Criar Problema e Reiniciar", + "prof.restart": "Reiniciar", + "prof.thanks": "Obrigado por nos ajudar.", + "prof.detail.restart": "É necessário um reinício final para continuar a usar '{0}'. Novamente, obrigado pela sua contribuição." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json new file mode 100644 index 0000000000000..279307d4b8756 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defineKeybinding.initial": "Pressionar a combinação de teclas desejada e ENTER. ESCAPE para cancelar.", + "defineKeybinding.chordsTo": "Acorde para" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json new file mode 100644 index 0000000000000..1cb6541687c6c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "keybindingsInputName": "Atalhos de Teclado", + "SearchKeybindings.AriaLabel": "Pesquisar keybindings", + "SearchKeybindings.Placeholder": "Pesquisar keybindings", + "sortByPrecedene": "Ordenar por precedência", + "header-message": "Para personalizações avançadas abrir e editar", + "keybindings-file-name": "keybindings.json", + "keybindingsLabel": "Keybindings", + "changeLabel": "Alterar Keybinding", + "addLabel": "Adicionar Keybinding", + "removeLabel": "Remover Keybinding", + "resetLabel": "Redefinir Keybinding", + "showConflictsLabel": "Mostrar Conflitos", + "copyLabel": "Copiar", + "error": "Erro '{0}' enquanto edita keybinding. Por favor, abra o arquivo 'keybindings.json' e verifique.", + "command": "Comando", + "keybinding": "KeyBinding", + "source": "Fonte", + "when": "Quando", + "editKeybindingLabelWithKey": "Alterar Keybinding {0}", + "editKeybindingLabel": "Alterar Keybinding", + "addKeybindingLabelWithKey": "Adicionar Keybinding {0}", + "addKeybindingLabel": "Adicionar Keybinding", + "commandAriaLabel": "Comando é {0}.", + "keybindingAriaLabel": "KeyBinding é {0}.", + "noKeybinding": "Nenhum Keybinding atribuído.", + "sourceAriaLabel": "Fonte é {0}.", + "whenAriaLabel": "Quando é {0}.", + "noWhen": "Sem contexto Quando." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json new file mode 100644 index 0000000000000..612db32643fd0 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defineKeybinding.start": "Definir Keybinding", + "defineKeybinding.kbLayoutErrorMessage": "Você não será capaz de produzir esta combinação de teclas sob seu layout de teclado atual.", + "defineKeybinding.kbLayoutLocalAndUSMessage": "**{0}** para o seu layout de teclado atual (**{1}** para US padrão).", + "defineKeybinding.kbLayoutLocalMessage": "**{0}** para o seu layout de teclado atual." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferences.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferences.contribution.i18n.json new file mode 100644 index 0000000000000..40e6d0841da34 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferences.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultPreferencesEditor": "Editor de Preferências Padrão", + "keybindingsEditor": "Editor de Keybindings", + "preferences": "Preferências" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json new file mode 100644 index 0000000000000..461e0fb96f78f --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openGlobalSettings": "Abra as Configurações de Usuário", + "openGlobalKeybindings": "Abrir Atalhos de Teclado", + "openGlobalKeybindingsFile": "Abrir Arquivo de Atalhos de Teclado", + "openWorkspaceSettings": "Abrir as configurações do espaço de trabalho", + "configureLanguageBasedSettings": "Definir Configurações Específicas de Linguagem...", + "languageDescriptionConfigured": "({0})", + "pickLanguage": "Selecionar Linguagem" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json new file mode 100644 index 0000000000000..e3ef1e68a738f --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "settingsEditorName": "Configurações Padrão", + "SearchSettingsWidget.AriaLabel": "Configurações de Pesquisa", + "SearchSettingsWidget.Placeholder": "Configurações de Pesquisa", + "totalSettingsMessage": "Total {0} Configurações", + "noSettingsFound": "Nenhum resultado", + "oneSettingFound": "1 Configuração correspondente", + "settingsFound": "{0} Configurações correspondentes", + "preferencesAriaLabel": "Preferências padrão. Editor de texto somente leitura." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json new file mode 100644 index 0000000000000..34c9bcc87042c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "errorInvalidConfiguration": "Não é possível gravar em configurações. Corrija erros/avisos no arquivo e tente novamente.", + "defaultSettingsTitle": "Configurações Padrão", + "defaultSettingsMessage": "Coloque suas configurações no arquivo à direita para substituir.", + "noSettingsFound": "Não há configurações encontradas.", + "editTtile": "Editar", + "replaceDefaultValue": "Substituir nas Configurações", + "copyDefaultValue": "Copiar para Configurações", + "unsupportedPHPExecutablePathSetting": "Essa configuração deve ser uma Configuração de Usuário. Para configurar o PHP para o espaço de trabalho, abra um arquivo PHP e clique em 'Caminho do PHP' na barra de status.", + "unsupportedWorkspaceSetting": "Essa configuração deve ser uma Configuração de Usuário." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesService.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesService.i18n.json new file mode 100644 index 0000000000000..3d94af6361561 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesService.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFolderFirst": "Abrir uma pasta primeiro para criar configurações de espaço de trabalho", + "emptyKeybindingsHeader": "Coloque suas chaves de ligações neste arquivo para substituir os padrões", + "defaultKeybindings": "Keybindings Padrão", + "emptySettingsHeader": "Colocar suas configurações nesse arquivo para sobrecrever as configurações padrão", + "emptySettingsHeader1": "Colocar as suas configurações nesse arquivo para sobrescrever as configurações e usuário padrão.", + "fail.createSettings": "Não foi possível criar '{0}' ({1})." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json new file mode 100644 index 0000000000000..556ef65c079dd --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "settingsSwitcherBarAriaLabel": "Chave de Configurações", + "userSettings": "Configurações de Usuário", + "workspaceSettings": "Configurações de Espaço de Trabalho" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json new file mode 100644 index 0000000000000..68e05e00daf4d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "default": "Valor padrão", + "user": "Usuário", + "meta": "meta", + "option": "opção" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json new file mode 100644 index 0000000000000..72d0053958632 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "commonlyUsed": "Comumente Utilizado", + "noSettings": "Nenhuma configuração", + "defaultKeybindingsHeader": "Substituir as chaves de ligações, colocando-os em seu arquivo de chave ligações." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json new file mode 100644 index 0000000000000..b6d5cdbd2e527 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showTriggerActions": "Mostrar todos os comandos", + "clearCommandHistory": "Limpar o Histórico de Comandos", + "showCommands.label": "Paleta de comandos...", + "entryAriaLabelWithKey": "{0}, {1}, comandos", + "entryAriaLabel": "{0}, comandos", + "canNotRun": "O comando '{0}' não pode ser executado a partir daqui.", + "actionNotEnabled": "O comando '{0}' não está habilitado no contexto atual.", + "recentlyUsed": "usados recentemente", + "morecCommands": "outros comandos", + "commandLabel": "{0}: {1}", + "cat.title": "{0}: {1}", + "noCommandsMatching": "Não há comandos correspondentes" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.i18n.json new file mode 100644 index 0000000000000..3f922e6decaa0 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "gotoLine": "Ir para linha...", + "gotoLineLabelEmptyWithLimit": "Digite um número de linha entre 1 e {0} para navegar para lá", + "gotoLineLabelEmpty": "Digite um número de linha para navegar para lá", + "gotoLineColumnLabel": "Ir para linha {0} e caractere {1}", + "gotoLineLabel": "Ir para linha {0}", + "gotoLineHandlerAriaLabel": "Digite um número de linha para navegar.", + "cannotRunGotoLine": "Abrir um arquivo de texto primeiro para ir a uma linha" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.i18n.json new file mode 100644 index 0000000000000..5e56bdc5890f9 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.i18n.json @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "gotoSymbol": "Ir para o Símbolo no Arquivo...", + "symbols": "símbolos ({0})", + "method": "métodos ({0})", + "function": "funções ({0})", + "_constructor": "construtores ({0})", + "variable": "variáveis ({0})", + "class": "classes ({0})", + "interface": "interfaces ({0})", + "namespace": "namespaces ({0})", + "package": "pacotes ({0})", + "modules": "módulos ({0})", + "property": "propriedades ({0})", + "enum": "enumerações ({0})", + "string": "cadeias de caracteres ({0})", + "rule": "regras ({0})", + "file": "arquivos ({0})", + "array": "matrizes ({0})", + "number": "números ({0})", + "boolean": "booleanos ({0})", + "object": "objetos ({0})", + "key": "chaves ({0})", + "entryAriaLabel": "{0}, símbolos", + "noSymbolsMatching": "Não há símbolos correspondentes", + "noSymbolsFound": "Nenhum símbolo encontrado", + "gotoSymbolHandlerAriaLabel": "Tipo para reduzir os símbolos do editor ativo atual.", + "cannotRunGotoSymbolInFile": "Não há informações de símbolo para o arquivo", + "cannotRunGotoSymbol": "Abrir um arquivo de texto primeiro para ir a um símbolo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/quickopen/browser/helpHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/helpHandler.i18n.json new file mode 100644 index 0000000000000..0a2fc637f737a --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/helpHandler.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, ajuda do seletor", + "globalCommands": "comandos globais", + "editorCommands": "comandos do editor" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.i18n.json new file mode 100644 index 0000000000000..e3c6204b6055c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "commandsHandlerDescriptionDefault": "Exibir e executar comandos", + "gotoLineDescriptionMac": "Ir para linha", + "gotoLineDescriptionWin": "Ir para linha", + "gotoSymbolDescription": "Ir para o Símbolo no Arquivo", + "gotoSymbolDescriptionScoped": "Ir para o Símbolo no Arquivo Por Categoria", + "helpDescription": "Mostrar ajuda", + "viewPickerDescription": "Abrir Visualização" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json new file mode 100644 index 0000000000000..388043547948b --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, visualizar seletor", + "views": "Modos de exibição", + "panels": "Painéis", + "terminals": "Terminal", + "terminalTitle": "{0}: {1}", + "channels": "Saída", + "openView": "Abrir Visualização", + "quickOpenView": "Abrir Visualização Rápida" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json new file mode 100644 index 0000000000000..2a40beab33167 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "relaunchSettingMessage": "Uma configuração que requer uma reinicialização foi alterada.", + "relaunchSettingDetail": "Pressione o botão de reinicialização para reiniciar {0} e habilitar a configuração.", + "restart": "Reiniciar", + "relaunchWorkspaceMessage": "Uma pasta do espaço de trabalho foi adicionada ou removida e isso exige que seja recarregada para fazer efeito.", + "relaunchWorkspaceDetail": "Pressione o botão de reinicialização para recarregar a janela e habilitar as alterações no espaço de trabalho.", + "reload": "Recarregar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json new file mode 100644 index 0000000000000..1cb8d16e56630 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGutterModifiedBackground": "Cor de fundo da dobra do editor para as linhas que estão modificadas.", + "editorGutterAddedBackground": "Cor de fundo da dobra do editor para as linhas que estão adicionadas.", + "editorGutterDeletedBackground": "Cor de fundo da dobra do editor para as linhas que estão excluídas." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json new file mode 100644 index 0000000000000..1b5369ebeea17 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleGitViewlet": "Mostrar Git", + "installAdditionalSCMProviders": "Instalar provedores de SCM adicionais...", + "source control": "Controle de código-fonte", + "toggleSCMViewlet": "Mostrar SCM", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmActivity.i18n.json b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmActivity.i18n.json new file mode 100644 index 0000000000000..7846e2b872dcc --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmActivity.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "scmPendingChangesBadge": "{0} alterações pendentes" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json new file mode 100644 index 0000000000000..5b93869e8d8f4 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "installAdditionalSCMProviders": "Instalar provedores de SCM adicionais...", + "switch provider": "Mudar Provedor SCM..." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json new file mode 100644 index 0000000000000..c14da8019782d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "commitMessage": "Mensagem (tecle {0} para confirmar)", + "source control": "Controle de código-fonte", + "viewletTitle": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/openAnythingHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/openAnythingHandler.i18n.json new file mode 100644 index 0000000000000..8d52351151529 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/openAnythingHandler.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileAndTypeResults": "resultados do arquivo e símbolo", + "fileResults": "resultados do arquivo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/openFileHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/openFileHandler.i18n.json new file mode 100644 index 0000000000000..016a91f2c3275 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/openFileHandler.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, seletor de arquivo", + "searchResults": "resultados da pesquisa" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/openSymbolHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/openSymbolHandler.i18n.json new file mode 100644 index 0000000000000..ede0a0c718d4e --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/openSymbolHandler.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, selecionador de símbolos", + "symbols": "resultados de símbolo", + "noSymbolsMatching": "Não há símbolos correspondentes", + "noSymbolsWithoutInput": "Digitar para pesquisar símbolos" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json new file mode 100644 index 0000000000000..68c8c0ad6b700 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultLabel": "entrada", + "patternDescription": "Use Padrões Glob", + "patternHelpInclude": "O padrão para combinações. Por exemplo, **\\*\\*/*.js** para corresponder a todos os arquivos JavaScript ou **myFolder/\\*\\*** para corresponder a essa pasta com todas pastas aninhadas.\n\n**Referência**:\n**\\*** corresponde a 0 ou mais caracteres\n**?** corresponde a 1 caractere\n**\\*\\*** corresponde a zero ou mais diretórios\n**[a-z]** corresponde a um intervalo de caracteres\n**{a, b}** corresponde a qualquer um dos padrões)", + "useIgnoreFilesDescription": "Usar Ignorar Arquivos", + "useExcludeSettingsDescription": "Usar Configurações de Exclusão" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/replaceService.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/replaceService.i18n.json new file mode 100644 index 0000000000000..05d7f4e4cd00a --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/replaceService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileReplaceChanges": "{0} ↔ {1} (Substituir Preview)" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/search.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/search.contribution.i18n.json new file mode 100644 index 0000000000000..b14e20a148767 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/search.contribution.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showTriggerActions": "Ir para Símbolo no Espaço de Trabalho...", + "name": "Pesquisar", + "showSearchViewlet": "Mostrar Busca", + "view": "Exibir", + "findInFiles": "Localizar nos Arquivos", + "openAnythingHandlerDescription": "Ir para o Arquivo", + "openSymbolDescriptionNormal": "Ir para o Símbolo em Área de Trabalho", + "searchOutputChannelTitle": "Pesquisar", + "searchConfigurationTitle": "Pesquisar", + "exclude": "Configure os padrões glob para excluir arquivos e pastas nas pesquisas. Herda todos os padrões glob da configuração files.exclude.", + "exclude.boolean": "O padrão glob com o qual combinar os caminhos de arquivo. Defina para verdadeiro ou falso para habilitar ou desabilitar o padrão.", + "exclude.when": "Verificação adicional nos irmãos de um arquivo correspondente. Use $(basename) como variável para o nome do arquivo correspondente.", + "useRipgrep": "Controla se deve utilizar ripgrep na pesquisa de texto", + "useIgnoreFilesByDefault": "Controla se deve utilizar arquivos .gitignore e .ignore por padrão ao fazer pesquisas em um novo espaço de trabalho.", + "search.quickOpen.includeSymbols": "Configurar para incluir resultados de uma pesquisa símbolo global nos resultados do arquivo para Abertura Rápida." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/searchActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/searchActions.i18n.json new file mode 100644 index 0000000000000..94f7c40e78209 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/searchActions.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "nextSearchTerm": "Mostrar o Próximo Termo de Pesquisa", + "previousSearchTerm": "Mostrar Termo de Pesquisa Anterior", + "focusNextInputBox": "Focalizar a Próxima Caixa de Entrada", + "focusPreviousInputBox": "Focalizar a Caixa de Entrada Anterior", + "replaceInFiles": "Substituir nos Arquivos", + "findInFolder": "Encontrar na pasta", + "RefreshAction.label": "Atualizar", + "ClearSearchResultsAction.label": "Limpar os Resultados da Pesquisa", + "FocusNextSearchResult.label": "Focalizar o Próximo Resultado da Pesquisa", + "FocusPreviousSearchResult.label": "Focalizar o Resultado da Pesquisa Anterior", + "RemoveAction.label": "Remover", + "file.replaceAll.label": "Substituir Tudo", + "match.replace.label": "Substituir", + "ConfigureGlobalExclusionsAction.label": "Abrir configurações" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json new file mode 100644 index 0000000000000..3edda1861fb81 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "searchMatches": "{0} correspondências encontradas", + "searchMatch": "{0} correspondência encontrada", + "fileMatchAriaLabel": "{0} correspondências no arquivo {1} da pasta {2}, Resultado da pesquisa", + "replacePreviewResultAria": "Substitua o termo {0} pelo termo {1} na coluna posição {2} correspondente ao texto {3}", + "searchResultAria": "Encontrado o termo {0} na posição da coluna {1} correspondente ao texto {2}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/searchViewlet.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/searchViewlet.i18n.json new file mode 100644 index 0000000000000..4ceea61601025 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/searchViewlet.i18n.json @@ -0,0 +1,50 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "moreSearch": "Alternar Detalhes da Pesquisa", + "searchScope.includes": "arquivos a serem incluídos", + "label.includes": "Pesquisa Padrões de Inclusão", + "searchScope.excludes": "arquivos a serem excluídos", + "label.excludes": "Pesquisa de Padrões de Exclusão", + "global.searchScope.folders": "arquivos excluídos pelas configurações", + "label.global.excludes": "Configurado pesquisa padrões de exclusão", + "replaceAll.confirmation.title": "Substituir Tudo", + "replaceAll.confirm.button": "Substituir", + "replaceAll.occurrence.file.message": "Substituída {0} ocorrência no arquivo {1} com '{2}'.", + "removeAll.occurrence.file.message": "Substituída {0} ocorrência no arquivo {1}'.", + "replaceAll.occurrence.files.message": "Substituída {0} ocorrência no arquivo {1} com '{2}'.", + "removeAll.occurrence.files.message": "Substituída {0} ocorrência nos arquivos {1}", + "replaceAll.occurrences.file.message": "Substituídas {0} ocorrências no arquivo {1} com '{2}'.", + "removeAll.occurrences.file.message": "Substituídas {0} ocorrências nos arquivo {1}.", + "replaceAll.occurrences.files.message": "Substituídas {0} ocorrências nos arquivos {1} com '{2}'.", + "removeAll.occurrences.files.message": "Substituídas {0} ocorrências nos arquivos {1}.", + "removeAll.occurrence.file.confirmation.message": "Substituir {0} ocorrências no arquivo {1} com '{2}'?", + "replaceAll.occurrence.file.confirmation.message": "Substituir {0} ocorrência no arquivo {1}?", + "removeAll.occurrence.files.confirmation.message": "Substituir {0} ocorrência nos arquivos {1} com '{2}'?", + "replaceAll.occurrence.files.confirmation.message": "Substituir {0} ocorrência nos arquivos {1}?", + "removeAll.occurrences.file.confirmation.message": "Substituir {0} ocorrências no arquivo {1} com '{2}'?", + "replaceAll.occurrences.file.confirmation.message": "Substituir {0} ocorrências no arquivo {1}?", + "removeAll.occurrences.files.confirmation.message": "Substituir {0} ocorrências nos arquivos {1} com '{2}'?", + "replaceAll.occurrences.files.confirmation.message": "Substituir {0} ocorrências nos arquivos {1}?", + "treeAriaLabel": "Resultados da Pesquisa", + "globLabel": "{0} quando {1}", + "searchMaxResultsWarning": "O conjunto de resultados contém apenas um subconjunto de todas as correspondências. Seja mais específico na sua pesquisa para diminuir o número de resultados.", + "searchCanceled": "Pesquisa foi cancelada antes de qualquer resultado ser encontrado - ", + "noResultsIncludesExcludes": "Nenhum resultado encontrado em '{0}' excluindo '{1}' - ", + "noResultsIncludes": "Nenhum resultado encontrado em '{0}' -", + "noResultsExcludes": "Nenhum resultado encontrado excluindo '{0}' -", + "noResultsFound": "Nenhum resultado encontrado. Analise as configurações para exclusões configuradas - ", + "rerunSearch.message": "Pesquisar novamente", + "rerunSearchInAll.message": "Pesquisar novamente em todos os arquivos", + "openSettings.message": "Abrir configurações", + "ariaSearchResultsStatus": "Pesquisa retornou {0} resultados em {1} arquivos", + "search.file.result": "{0} resultado no arquivo {1}", + "search.files.result": "{0} resultado nos arquivos {1}", + "search.file.results": "{0} resultados no arquivo {1}", + "search.files.results": "{0} resultados nos arquivos {1}", + "searchWithoutFolder": "Você ainda não abriu uma pasta. Somente arquivos abertos são pesquisados - ", + "openFolder": "Abrir Pasta" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/searchWidget.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/searchWidget.i18n.json new file mode 100644 index 0000000000000..41178af28cc96 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/searchWidget.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "search.action.replaceAll.disabled.label": "Substituir Todos (Submeter Pesquisa para Habilitar)", + "search.action.replaceAll.enabled.label": "Substituir Tudo", + "search.replace.toggle.button.title": "Alternar Substituir", + "label.Search": "Pesquisar: Digite o termo de pesquisa e pressione Enter para pesquisar ou Escape para cancelar", + "search.placeHolder": "Pesquisar", + "label.Replace": "Substituir: Digite o termo a ser substituído e pressione Enter para visualizar ou Escape para cancelar", + "search.replace.placeHolder": "Substituir", + "regexp.validationFailure": "A expressão corresponde a tudo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json new file mode 100644 index 0000000000000..b98cf8d093735 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.snippets": "Contribui aos trechos de código.", + "vscode.extension.contributes.snippets-language": "Identificador de linguagem para o qual este trecho de código contribui.", + "vscode.extension.contributes.snippets-path": "Caminho do arquivo de trechos de código. O caminho é relativo à pasta de extensão e normalmente começa com '. /snippets/'.", + "invalid.language": "Linguagem desconhecida em `contributes.{0}.language`. Valor fornecido: {1}", + "invalid.path.0": "Esperada uma string em `contributes.{0}.path`. Valor informado: {1}", + "invalid.path.1": "É esperado que `contributes.{0}.path` ({1}) seja incluído na pasta da extensão ({2}). Isto pode tornar a extensão não portável.", + "badVariableUse": "O trecho de código \"{0}\" muito provavelmente confunde as variáveis de trecho de código e espaços reservados do trecho de código. Consulte https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax para obter mais detalhes." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/insertSnippet.i18n.json b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/insertSnippet.i18n.json new file mode 100644 index 0000000000000..6c34a620b89ab --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/insertSnippet.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "snippet.suggestions.label": "Inserir trecho de código" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json new file mode 100644 index 0000000000000..61a063374029b --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openSnippet.label": "Abrir trechos de código do usuário", + "openSnippet.pickLanguage": "Selecionar Idioma para o Trecho", + "openSnippet.errorOnCreate": "Não é possível criar {0}", + "preferences": "Preferências", + "snippetSchema.json.default": "Trecho de código vazio", + "snippetSchema.json": "Configuração do trecho do usuário", + "snippetSchema.json.prefix": "O prefixo usado ao selecionar o trecho no intelliSense", + "snippetSchema.json.body": "O conteúdo do trecho. Use '$1', '${1:defaultText}' para definir as posições do cursor, use '$0' para a posição final do cursor. Insira valores de variáveis com '${varName}' e '${varName:defaultText}', por exemplo ' Este é o arquivo: $TM_FILENAME'.", + "snippetSchema.json.description": "A descrição do trecho." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json new file mode 100644 index 0000000000000..a4a18c1e970f9 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "detail.userSnippet": "Trecho de código do usuário", + "snippetSuggest.longLabel": "{0}, {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/tabCompletion.i18n.json b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/tabCompletion.i18n.json new file mode 100644 index 0000000000000..adfb9a4190d5c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/tabCompletion.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tabCompletion": "Inserir trechos de código quando seu prefixo corresponder. Funciona melhor quando 'quickSuggestions' não está habilitado." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json new file mode 100644 index 0000000000000..b16fc8446a452 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "helpUs": "Nos ajude a melhorar o nosso apoio para {0}", + "takeShortSurvey": "Responda a uma pesquisa curta", + "remindLater": "Lembrar mais tarde", + "neverAgain": "Não mostrar novamente" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..1ec18c632a4c6 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "Você deseja responder a uma pequena pesquisa?", + "takeSurvey": "Responder a pesquisa", + "remindLater": "Lembrar mais tarde", + "neverAgain": "Não mostrar novamente" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json new file mode 100644 index 0000000000000..ccd588d452782 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Digite o nome de uma tarefa de compilação", + "noTasksMatching": "Não há tarefas correspondentes", + "noTasksFound": "Tarefas de compilação não encontradas" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json new file mode 100644 index 0000000000000..577ba18ccaae7 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, tarefas", + "recentlyUsed": "tarefas recentemente utilizadas", + "configured": "tarefas configuradas", + "detected": "tarefas detectadas", + "customizeTask": "Configurar a tarefa" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json new file mode 100644 index 0000000000000..4009d3b815416 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Digite o nome de uma tarefa para reiniciar", + "noTasksMatching": "Não há tarefas correspondentes", + "noTasksFound": "Não há tarefa para ser reiniciada" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json new file mode 100644 index 0000000000000..6b4d6134384d8 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Digite o nome de uma tarefa para executar", + "noTasksMatching": "Não há tarefas correspondentes", + "noTasksFound": "Não há tarefas encontradas" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.i18n.json new file mode 100644 index 0000000000000..9c5ee4b4b598d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Digite o nome de uma tarefa para finalizar", + "noTasksMatching": "Não há tarefas correspondentes", + "noTasksFound": "Nenhuma tarefa para finalizar encontrada" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json new file mode 100644 index 0000000000000..07d53a8ee3957 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Digite o nome de uma tarefa de teste", + "noTasksMatching": "Não há tarefas correspondentes", + "noTasksFound": "Tarefas de teste não encontradas" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json new file mode 100644 index 0000000000000..928e36c4c9b6a --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ConfigurationParser.invalidCWD": "Aviso: options.cwd deve ser do tipo string. Ignorando valor {0}\n", + "ConfigurationParser.noargs": "Erro: Argumentos do comando devem ser uma matriz de strings. Valor informado é:\n{0}", + "ConfigurationParser.noShell": "Aviso: A configuração do shell somente é suportada quando estiver executando tarefas no terminal.", + "ConfigurationParser.noName": "Erro: Problem Matcher no escopo declarado deve ter um nome:\n{0}\n", + "ConfigurationParser.unknownMatcherKind": "Aviso: a correspondência de problema definido é desconhecido. Tipos suportados são string | ProblemMatcher | (string | ProblemMatcher)[].\n{0}\n", + "ConfigurationParser.invalidVaraibleReference": "Erro: ProblemMatcher inválido referência: {0}\n", + "ConfigurationParser.noTaskName": "Erro: tarefas devem fornecer uma propriedade taskName. A tarefa será ignorada.\n{0}\n", + "taskConfiguration.shellArgs": "Aviso: a tarefa '{0}' é um comando do shell e o nome de comando ou um dos seus argumentos tem espaços sem escape. Para garantir a linha de comando correta por favor mesclar argumentos no comando.", + "taskConfiguration.noCommandOrDependsOn": "Erro: a tarefa '{0}' não especifica nem um comando nem uma propriedade dependsOn. A tarefa será ignorada. Sua definição é: \n{1}", + "taskConfiguration.noCommand": "Erro: a tarefa '{0}' não define um comando. A tarefa será ignorada. Sua definição é: {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json new file mode 100644 index 0000000000000..fe17f405c7a65 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TaskDefinition.properties": "Propriedades adicionais do tipo de tarefa", + "TaskTypeConfiguration.noType": "A propriedade necessária 'taskType' está faltando na configuração do tipo de tarefa ", + "TaskDefinitionExtPoint": "Contribui com os tipos de tarefa" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json new file mode 100644 index 0000000000000..1a1eda3b1f20d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "dotnetCore": "Executa comando de compilação do .NET Core", + "msbuild": "Executa a compilação destino", + "externalCommand": "Exemplo para executar um comando externo arbitrário", + "Maven": "Executa comandos comuns específicos" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json new file mode 100644 index 0000000000000..4980a7daaa5dc --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "JsonSchema.options": "Opções de comando adicionais", + "JsonSchema.options.cwd": "O diretório de trabalho atual do programa executado ou do script. Se omitido raiz de espaço de trabalho atual do código é usado.", + "JsonSchema.options.env": "O ambiente do programa executado ou comando shell. Se omitido o ambiente do processo pai é usado.", + "JsonSchema.shellConfiguration": "Configura a shell a ser usada.", + "JsonSchema.shell.executable": "O shell a ser usado.", + "JsonSchema.shell.args": "Os argumentos shell.", + "JsonSchema.command": "O comando a ser executado. Pode ser um programa externo ou um comando shell.", + "JsonSchema.tasks.args": "Argumentos passados para o comando quando esta tarefa é invocada.", + "JsonSchema.tasks.taskName": "Nome da tarefa", + "JsonSchema.tasks.windows": "Configuração de comando específica do Windows", + "JsonSchema.tasks.mac": "Configuração de comando específica do Mac", + "JsonSchema.tasks.linux": "Configuração de comando específica do Linux", + "JsonSchema.tasks.suppressTaskName": "Controla se o nome de tarefa é adicionado como um argumento para o comando. Se omitido o valor definido globalmente é usado.", + "JsonSchema.tasks.showOutput": "Controla se a saída da execução de tarefas é mostrada ou não. Se omitido o valor definido globalmente é usado.", + "JsonSchema.echoCommand": "Controla se o comando executado é enviado para a saída. O padrão é false.", + "JsonSchema.tasks.watching.deprecation": "Descontinuado. Use isBackground.", + "JsonSchema.tasks.watching": "Se a tarefa executada é mantida viva e está monitorando o sistema de arquivos.", + "JsonSchema.tasks.background": "Se a tarefa executada é mantida viva e é executado em segundo plano.", + "JsonSchema.tasks.promptOnClose": "Se o usuário é solicitado quando VS Code fecha com uma tarefa sendo executada.", + "JsonSchema.tasks.build": "Esta tarefa é mapeada para o comando de compilação padrão do código.", + "JsonSchema.tasks.test": "Esta tarefa é mapeada para o comando de teste padrão do código.", + "JsonSchema.tasks.matchers": "O problema matcher(s) a seu utilizado. Pode ser uma sequência de caracteres ou uma definição de problem matcher ou uma matriz de sequências de caracteres e problem matchers.", + "JsonSchema.args": "Argumentos adicionais passados para o comando.", + "JsonSchema.showOutput": "Controla se a saída da execução de tarefas é mostrada ou não. Se omitido 'sempre' é usado.", + "JsonSchema.watching.deprecation": "Descontinuado. Use isBackground.", + "JsonSchema.watching": "Se a tarefa executada é mantida viva e está monitorando o sistema de arquivos.", + "JsonSchema.background": "Se a tarefa executada é mantida viva e é executado em segundo plano.", + "JsonSchema.promptOnClose": "Se o usuário é solicitado quando VS Code fecha com uma tarefa de segundo plano em execução.", + "JsonSchema.suppressTaskName": "Controla se o nome de tarefa é adicionado como um argumento para o comando. O padrão é false.", + "JsonSchema.taskSelector": "Prefixo para indicar que um argumento é tarefa.", + "JsonSchema.matchers": "A correspondência de problemas a ser utilizada. Pode ser uma sequência de caracteres ou uma definição de correspondência de problemas ou uma matriz de sequências de caracteres e correspondência de problemas.", + "JsonSchema.tasks": "As configurações de tarefa. Normalmente são ampliações de tarefas já definidas na execução de tarefa externa." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json new file mode 100644 index 0000000000000..46aad8f97eaf1 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "JsonSchema.version": "Número da versão do config", + "JsonSchema._runner": "O runner já se formou. Use a propriedade runner oficial", + "JsonSchema.runner": "Define se a tarefa é executada como um processo e a saída é mostrada na janela de saída ou dentro do terminal.", + "JsonSchema.windows": "Configuração de comando específica do Windows", + "JsonSchema.mac": "Configuração de comando específica do Mac", + "JsonSchema.linux": "Configuração de comando específica do Linux", + "JsonSchema.shell": "Especifica se o comando é um comando shell ou um programa externo. O padrão é falso se omitido." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json new file mode 100644 index 0000000000000..f22c47496b723 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "JsonSchema.shell": "Especifica se o comando é um comando shell ou um programa externo. O padrão é falso se omitido.", + "JsonSchema.tasks.isShellCommand.deprecated": "A propriedade isShellCommand é obsoleta. Use a propriedade type da tarefa e a propriedade shell nas opções. Veja também as notas de versão 1.14.", + "JsonSchema.tasks.dependsOn.string": "Outra tarefa da qual esta tarefa depende.", + "JsonSchema.tasks.dependsOn.array": "A outra tarefa que esta tarefa depende.", + "JsonSchema.tasks.presentation": "Configura o painel que é usado para apresentar a saída da tarefa e ler sua entrada.", + "JsonSchema.tasks.presentation.echo": "Controla se o comando executado é ecoado para o painel. Padrão é true.", + "JsonSchema.tasks.presentation.focus": "Controla se o painel ganha foco. O padrão é false. Se definido como true, o painel é revelado também.", + "JsonSchema.tasks.presentation.reveals": "Controla se o painel executando a tarefa é revelado ou não. O padrão é \"always\".", + "JsonSchema.tasks.presentation.instance": "Controla se o painel é compartilhado entre tarefas, dedicado a esta tarefa ou um novo é criado em cada execução.", + "JsonSchema.tasks.terminal": "A propriedade terminal é obsoleta. Use presentation em seu lugar.", + "JsonSchema.tasks.group.kind": "Grupo de execução da tarefa.", + "JsonSchema.tasks.group.isDefault": "Define-se essa tarefa é a tarefa do padrão do grupo.", + "JsonSchema.tasks.group.defaultBuild": "Marca as tarefas como tarefas padrão de compilação.", + "JsonSchema.tasks.group.defaultTest": "Marca as tarefas como a tarefa de teste padrão.", + "JsonSchema.tasks.group.build": "Marca as tarefas como uma tarefa de compilação acessível através do comando 'Run Build Task'.", + "JsonSchema.tasks.group.test": "Marca as tarefas como uma tarefa de teste acessível através do comando 'Run Test Task'.", + "JsonSchema.tasks.group.none": "Atribui a tarefa para nenhum grupo", + "JsonSchema.tasks.group": "Define a que grupo de execução desta tarefa pertence. Suporta \"build\" para adicioná-lo ao grupo de compilação e \"test\" para adicioná-lo ao grupo de teste.", + "JsonSchema.tasks.type": "Define se a tarefa é executada como um processo ou como um comando dentro de uma shell. O padrão é processo.", + "JsonSchema.version": "O número da versão do config.", + "JsonSchema.tasks.identifier": "Um identificador definido pelo usuário para fazer referência a tarefa em launch.json ou uma cláusula dependsOn.", + "JsonSchema.tasks.taskLabel": "A etiqueta da tarefa", + "JsonSchema.tasks.taskName": "Nome da tarefa", + "JsonSchema.tasks.taskName.deprecated": "A propriedade name da tarefa é obsoleta. Use a propriedade label.", + "JsonSchema.tasks.background": "Se a tarefa executada é mantida viva e é executado em segundo plano.", + "JsonSchema.tasks.promptOnClose": "Se o usuário é solicitado quando VS Code fecha com uma tarefa sendo executada.", + "JsonSchema.tasks.matchers": "A correspondência de problemas a ser utilizada. Pode ser uma sequência de caracteres ou uma definição de correspondência de problemas ou uma matriz de sequências de caracteres e correspondência de problemas.", + "JsonSchema.customizations.customizes.type": "O tipo de tarefa a ser personalizada", + "JsonSchema.tasks.customize.deprecated": "A propriedade customize é obsoleta. Consulte as notas de versão 1.14 sobre como migrar para a nova abordagem de personalização de tarefa", + "JsonSchema.tasks.showOputput.deprecated": "A propriedade showOutput é obsoleta. Use a propriedade reveal dentro da propriedade presentation. Ver também as notas de versão 1.14.", + "JsonSchema.tasks.echoCommand.deprecated": "A propriedade echoCommand é obsoleta. Use a propriedade echo dentro da propriedade presentation. Ver também as notas de versão 1.14.", + "JsonSchema.tasks.isBuildCommand.deprecated": "A propriedade isBuildCommand é obsoleta. Use a propriedade group em seu lugar. Ver também as notas de versão 1.14.", + "JsonSchema.tasks.isTestCommand.deprecated": "A propriedade isTestCommand é obsoleta. Use a propriedade group em seu lugar. Ver também as notas de versão 1.14.", + "JsonSchema.windows": "Configuração de comando específica do Windows", + "JsonSchema.mac": "Configuração de comando específica do Mac", + "JsonSchema.linux": "Configuração de comando específica do Linux" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json new file mode 100644 index 0000000000000..adb324f01dab0 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -0,0 +1,65 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksCategory": "Tarefas", + "ConfigureTaskRunnerAction.noWorkspace": "Tarefas somente estão disponíveis em uma pasta da área de trabalho.", + "ConfigureTaskRunnerAction.quickPick.template": "Selecione um gerenciador de tarefa", + "ConfigureTaskRunnerAction.autoDetecting": "Tarefas de auto detecção para {0}", + "ConfigureTaskRunnerAction.autoDetect": "A tarefa de sistema de auto detecção falhou. Usando o modelo padrão. Consulte a saída da tarefa para detalhes.", + "ConfigureTaskRunnerAction.autoDetectError": "A tarefa de sistema de auto detecção produziu erros. Consulte a saída da tarefa para detalhes.", + "ConfigureTaskRunnerAction.failed": "Não é possível criar o arquivo 'tasks.json' na pasta '.vscode'. Consulte a saída da tarefa para detalhes.", + "ConfigureTaskRunnerAction.label": "Configure o gerenciador de tarefas", + "ConfigureBuildTaskAction.label": "Configurar Tarefa de Compilação", + "CloseMessageAction.label": "Fechar", + "ShowTerminalAction.label": "Terminal Visualização", + "problems": "Problemas", + "manyMarkers": "99+", + "tasks": "Tarefas", + "TaskSystem.noHotSwap": "Alterar o mecanismo de execução de tarefa requer reiniciar o VS Code. A alteração será ignorada.", + "TaskService.noBuildTask1": "Nenhuma tarefa de compilação definida. Marque uma tarefa com 'isBuildCommand' no arquivo tasks.json.", + "TaskService.noBuildTask2": "Nenhuma tarefa de compilação definida. Marque uma tarefa como um grupo 'build' no arquivo tasks.json.", + "TaskService.noTestTask1": "Nenhuma tarefa de teste definida. Marque uma tarefa com 'isTestCommand' no arquivo tasks.json.", + "TaskService.noTestTask2": "Nenhuma tarefa de teste definida. Marque uma tarefa com um grupo 'teste' no arquivo tasks.json.", + "TaskServer.noTask": "Tarefa {0} requisitada para execução não encontrada.", + "TaskService.attachProblemMatcher.continueWithout": "Continuar sem examinar a saída de compilação", + "TaskService.attachProblemMatcher.learnMoreAbout": "Saiba mais sobre o exame da saída de compilação.", + "selectProblemMatcher": "Selecione quais tipos de erros e avisos para examinar na saída de compilação", + "customizeParseErrors": "A configuração da tarefa atual tem erros. Por favor, corrija os erros primeiro antes de personalizar uma tarefa.", + "moreThanOneBuildTask": "Há muitas tarefas de compilação definidas em tasks.json. Executando a primeira.\n", + "TaskSystem.activeSame.background": "A tarefa já está ativa e em modo background. Para finalizar a tarefa use 'F1 > terminar tarefa'", + "TaskSystem.activeSame.noBackground": "A tarefa já está ativa. Para finalizar a tarefa use 'F1>terminar tarefa'", + "TaskSystem.active": "Já existe uma tarefa sendo executada. Finalize-a antes de executar outra tarefa.", + "TaskSystem.restartFailed": "Falha ao finalizar e reiniciar a tarefa {0}", + "TaskSystem.configurationErrors": "Erro: A configuração da tarefa informada possui erros de validação e não pode ser utilizada. Por favor, corrija os erros primeiro.", + "TaskSystem.invalidTaskJson": "Erro: O conteúdo do arquivo tasks.json possui erros de sintaxe. Por favor, corrija-os antes de executar uma tarefa.\n", + "TaskSystem.runningTask": "Há uma tarefa sendo executada. Deseja finalizá-la?", + "TaskSystem.terminateTask": "&&Finalizar Tarefa", + "TaskSystem.noProcess": "A tarefa executada não existe mais. Se a tarefa produziu processos em background, finalizar o VS Code pode resultar em processos órfãos. Para evitar isso inicie o último processo em background com uma flag de espera.", + "TaskSystem.exitAnyways": "&&Sair de qualquer maneira", + "TerminateAction.label": "Finalizar Tarefa", + "TaskSystem.unknownError": "Ocorreu um erro enquanto a tarefa estava sendo executada. Verifique o log de tarefas para detalhes.", + "TaskService.noWorkspace": "Tarefas somente estão disponíveis em uma pasta da área de trabalho.", + "recentlyUsed": "tarefas recentemente utilizadas", + "configured": "tarefas configuradas", + "detected": "tarefas detectadas", + "TaskService.fetchingBuildTasks": "Buscando tarefas de compilação...", + "TaskService.noBuildTaskTerminal": "Nenhuma tarefa de compilação encontrada. Pressione 'Configurar Tarefa de Compilação' para definir um.", + "TaskService.pickBuildTask": "Selecione a tarefa de compilação para executar", + "TaskService.fetchingTestTasks": "Buscando tarefas de teste...", + "TaskService.noTestTaskTerminal": "Nenhuma tarefa de teste encontrada. Pressione 'Configurar Tarefa de Execução' para definir uma.", + "TaskService.pickTestTask": "Selecione a tarefa de teste para executar", + "TaskService.noTaskRunning": "Nenhuma tarefa está sendo executada.", + "TaskService.tastToTerminate": "Selecione a tarefa para terminar", + "TerminateAction.noProcess": "O processo executado não existe mais. Se a tarefa produziu processos em background, finalizar o VS Code pode resultar em processos órfãos.", + "TerminateAction.failed": "Falha ao finalizar a tarefa sendo executada", + "TaskService.noTaskToRestart": "Não há tarefa para reiniciar.", + "TaskService.tastToRestart": "Selecione a tarefa para reiniciar", + "ShowLogAction.label": "Visualizar o Log de Tarefas", + "RunTaskAction.label": "Executar Tarefa", + "BuildAction.label": "Executar Tarefa de compilação", + "TestAction.label": "Executar Tarefa de Teste", + "quickOpen.task": "Executar Tarefa" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json new file mode 100644 index 0000000000000..1421a156ef7f2 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TerminalTaskSystem.unknownError": "Um erro desconhecido ocorreu durante a execução de uma tarefa. Consulte o log de saída de tarefa para obter detalhes.", + "TerminalTaskSystem.terminalName": "Tarefa - {0}", + "reuseTerminal": "Terminal será reutilizado pelas tarefas, pressione qualquer tecla para fechar.", + "TerminalTaskSystem": "Não é possível executar um comando shell em uma unidade UNC.", + "unkownProblemMatcher": "Problem matcher {0} não pode ser resolvido. O matcher será ignorado" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/node/processRunnerDetector.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/node/processRunnerDetector.i18n.json new file mode 100644 index 0000000000000..a4f13c42f7c1c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/node/processRunnerDetector.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TaskSystemDetector.noGulpTasks": "Executando gulp..-tarefas-simples não listam nenhuma tarefa. Você executou a instalação do npm?", + "TaskSystemDetector.noJakeTasks": "Executando jake..-tarefas não listam nenhuma tarefa. Você instalou o npm?", + "TaskSystemDetector.noGulpProgram": "Gulp não está instalado no seu sistema. Execute npm install -g gulp para instalá-lo.", + "TaskSystemDetector.noJakeProgram": "Jake não está instalado no seu sistema. Execute npm install -g jake para instalá-lo.", + "TaskSystemDetector.noGruntProgram": "Grunhido não está instalado no seu sistema. Execute npm install -g grunt para instalá-lo.", + "TaskSystemDetector.noProgram": "Programa {0} não foi encontrado. Mensagem é {1}", + "TaskSystemDetector.buildTaskDetected": "Tarefa de construção chamada '{0}' detectada.", + "TaskSystemDetector.testTaskDetected": "Tarefa de teste chamada '{0}' detectada." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json new file mode 100644 index 0000000000000..72848a8cde1f7 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TaskRunnerSystem.unknownError": "Um erro desconhecido ocorreu durante a execução de uma tarefa. Consulte o log de saída de tarefa para obter detalhes.", + "TaskRunnerSystem.watchingBuildTaskFinished": "\nTarefas de compilação de monitoramento terminaram.", + "TaskRunnerSystem.childProcessError": "Falha ao iniciar o programa externo {0} {1}.", + "TaskRunnerSystem.cancelRequested": "\nA tarefa '{0}' foi finalizada por solicitação do usuário.", + "unkownProblemMatcher": "Problema matcher {0} não pode ser resolvido. O matcher será ignorado" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json new file mode 100644 index 0000000000000..f283a37258f4c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ConfigurationParser.invalidCWD": "Aviso: options.cwd deve ser do tipo string. Ignorando valor {0}\n", + "ConfigurationParser.noargs": "Erro: Argumentos do comando devem ser uma matriz de strings. Valor informado é:\n{0}", + "ConfigurationParser.noShell": "Aviso: A configuração do shell somente é suportada quando estiver executando tarefas no terminal.", + "ConfigurationParser.noName": "Erro: Problem Matcher no escopo declarado deve ter um nome:\n{0}\n", + "ConfigurationParser.unknownMatcherKind": "Aviso: a correspondência de problema definido é desconhecido. Tipos suportados são string | ProblemMatcher | (string | ProblemMatcher)[].\n{0}\n", + "ConfigurationParser.invalidVaraibleReference": "Erro: ProblemMatcher inválido referência: {0}\n", + "ConfigurationParser.noTaskType": "Erro: configuração de tarefas deve ter uma propriedade de tipo. A configuração será ignorada.\n{0}\n", + "ConfigurationParser.notCustom": "Erro: tarefas não está declarada como uma tarefa personalizada. A configuração será ignorada.\n{0}\n", + "ConfigurationParser.noTaskName": "Erro: tarefas devem fornecer uma propriedade taskName. A tarefa será ignorada.\n{0}\n", + "taskConfiguration.shellArgs": "Aviso: a tarefa '{0}' é um comando do shell e o nome de comando ou um dos seus argumentos tem espaços sem escape. Para garantir a linha de comando correta por favor mesclar argumentos no comando.", + "taskConfiguration.noCommandOrDependsOn": "Erro: a tarefa '{0}' não especifica nem um comando nem uma propriedade dependsOn. A tarefa será ignorada. Sua definição é: \n{1}", + "taskConfiguration.noCommand": "Erro: a tarefa '{0}' não define um comando. A tarefa será ignorada. Sua definição é: {1}", + "TaskParse.noOsSpecificGlobalTasks": "Task versão 2.0.0 não oferece suporte a tarefas globais específicas de sistema operacional. Converter para uma tarefa com um comando específico do sistema operacional. As tarefas afetadas são: {0}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json new file mode 100644 index 0000000000000..de21ec3dca10c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminalIntegratedConfigurationTitle": "Terminal Integrado", + "terminal.integrated.shell.linux": "O caminho do shell que o terminal usa no Linux.", + "terminal.integrated.shellArgs.linux": "Os argumentos de linha de comando a serem usados no terminal do Linux.", + "terminal.integrated.shell.osx": "O caminho do shell que o terminal usa no OS X.", + "terminal.integrated.shellArgs.osx": "Os argumentos de linha de comando a serem usados no terminal do OS X.", + "terminal.integrated.shell.windows": "O caminho do shell que o terminal usa no Windows. Quando usar um shell fornecido com o Windows (cmd, PowerShell ou Bash no Ubuntu), prefira utilizar C:\\Windows\\sysnative ao invés de C:\\Windows\\System32 para usar as versões de 64 bits.", + "terminal.integrated.shellArgs.windows": "Os argumentos de linha de comando a serem utilizados no terminal do Windows.", + "terminal.integrated.rightClickCopyPaste": "Quando configurado, isto evitará que o menu de contexto apareça quando pressionado o botão direito do mouse dentro do terminal, em vez disso vai copiar quando há uma seleção e colar quando não há nenhuma seleção.", + "terminal.integrated.fontFamily": "Controla a família de fontes do terminal, este padrão é o valor do editor.fontFamily.", + "terminal.integrated.fontLigatures": "Controla se as ligações de fonte são habilitadas no terminal.", + "terminal.integrated.fontSize": "Controla o tamanho da fonte em pixels do terminal.", + "terminal.integrated.lineHeight": "Controles a altura da linha do terminal, este número é multiplicada pelo tamanho da fonte terminal para obter a altura real da linha em pixels.", + "terminal.integrated.enableBold": "Se habilitar o texto em negrito dentro do terminal requer suporte do terminal shell.", + "terminal.integrated.cursorBlinking": "Controla se o cursor do terminal pisca.", + "terminal.integrated.cursorStyle": "Controla o estilo do cursor do terminal.", + "terminal.integrated.scrollback": "Controla a quantidade máxima de linhas que o terminal mantém em seu buffer.", + "terminal.integrated.setLocaleVariables": "Controla se as variáveis locais são definidas na inicialização do terminal, este padrão é verdadeiro no OS X e falso em outras plataformas.", + "terminal.integrated.cwd": "Um caminho de início explícito onde o terminal será lançado, isso é usado como o diretório de trabalho atual (cwd) para o processo shell. Isto pode ser particularmente útil em configurações de espaço de trabalho se o diretório raiz não é um cwd conveniente.", + "terminal.integrated.confirmOnExit": "Confirmar na saída se ainda houverem sessões de terminal ativas.", + "terminal.integrated.commandsToSkipShell": "Um conjunto de IDs de comando, cujas combinações de teclas não serão enviadas para o shell e sempre serão tratadas por código. Isto permite o uso de combinações de teclas que normalmente seriam consumidas pelo shell para agir da mesma forma quando o terminal não é focado, por exemplo ctrl+p para Execução Rápida.", + "terminal": "Terminal", + "terminalCategory": "Terminal", + "viewCategory": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json new file mode 100644 index 0000000000000..ca6ab1cb9d9c5 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "workbench.action.terminal.toggleTerminal": "Alternar Terminal Integrado", + "workbench.action.terminal.kill": "Finalizar a Instância de Terminal Ativa", + "workbench.action.terminal.kill.short": "Encerrar Terminal", + "workbench.action.terminal.copySelection": "Copiar Seleção", + "workbench.action.terminal.selectAll": "Selecionar Tudo", + "workbench.action.terminal.new": "Criar Novo Terminal Integrado", + "workbench.action.terminal.new.short": "Novo Terminal", + "workbench.action.terminal.focus": "Focalizar Terminal", + "workbench.action.terminal.focusNext": "Focalizar Próximo Terminal", + "workbench.action.terminal.focusAtIndex": "Focalizar Terminal {0}", + "workbench.action.terminal.focusPrevious": "Focalizar Terminal Anterior", + "workbench.action.terminal.paste": "Colar no Terminal Ativo", + "workbench.action.terminal.DefaultShell": "Selecionar Shell Padrão", + "workbench.action.terminal.runSelectedText": "Executar Texto Selecionado no Terminal Ativo", + "workbench.action.terminal.runActiveFile": "Executar Arquivo Ativo no Terminal Ativo", + "workbench.action.terminal.runActiveFile.noFile": "Apenas arquivos em disco podem ser executados no terminal", + "workbench.action.terminal.switchTerminalInstance": "Trocar a instância de Terminal", + "workbench.action.terminal.scrollDown": "Rolar para Baixo (Linha)", + "workbench.action.terminal.scrollDownPage": "Rolar para Baixo (Página)", + "workbench.action.terminal.scrollToBottom": "Rolar para baixo", + "workbench.action.terminal.scrollUp": "Rolar para Cima (Linha)", + "workbench.action.terminal.scrollUpPage": "Rolar para Cima (Página)", + "workbench.action.terminal.scrollToTop": "Rolar para cima", + "workbench.action.terminal.clear": "Limpar", + "workbench.action.terminal.allowWorkspaceShell": "Permitir a Configuração de Shell da Área de Trabalho", + "workbench.action.terminal.disallowWorkspaceShell": "Não Permitir a Configuração de Shell da Área de Trabalho", + "workbench.action.terminal.rename": "Renomear", + "workbench.action.terminal.rename.prompt": "Digite o nome do terminal", + "workbench.action.terminal.focusFindWidget": "Focalizar Ferramenta de Pesquisa", + "workbench.action.terminal.hideFindWidget": "Ocultar Ferramenta de Pesquisa" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json new file mode 100644 index 0000000000000..495bd79c4bb42 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminal.background": "A cor de fundo do terminal, isso permite colorir o terminal com uma cor diferente do painel.", + "terminal.foreground": "A cor de primeiro plano do terminal.", + "terminal.ansiColor": "'{0}' cor ansi no terminal." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json new file mode 100644 index 0000000000000..b2b9a9a984326 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminal.integrated.allowWorkspaceShell": "Você permite {0} (definido como uma configuração de espaço de trabalho) a ser executado no terminal?", + "allow": "Permitir", + "disallow": "Não permitir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json new file mode 100644 index 0000000000000..9172767f77085 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Localizar", + "placeholder.find": "Localizar", + "label.previousMatchButton": "Correspondência anterior", + "label.nextMatchButton": "Próxima correspondência", + "label.closeButton": "Fechar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json new file mode 100644 index 0000000000000..b530cb53e9b48 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminal.integrated.copySelection.noSelection": "O terminal não tem nenhuma seleção para copiar", + "terminal.integrated.exitedWithCode": "O processo terminal encerrado com código de saída: {0}", + "terminal.integrated.waitOnExit": "Pressione qualquer tecla para fechar o terminal", + "terminal.integrated.launchFailed": "O comando de processo de terminal '{0}{1}' falhou ao ser iniciado (código de saída: {2})" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json new file mode 100644 index 0000000000000..b95a09b613c5d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminalLinkHandler.followLinkAlt": "Alt + clique para seguir o link", + "terminalLinkHandler.followLinkCmd": "Cmd + clique para seguir o link", + "terminalLinkHandler.followLinkCtrl": "Ctrl + clique para seguir o link" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json new file mode 100644 index 0000000000000..2bbfefe229777 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "copy": "Copiar", + "createNewTerminal": "Novo Terminal", + "paste": "Colar", + "selectAll": "Selecionar Tudo", + "clear": "Limpar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json new file mode 100644 index 0000000000000..08ec4bd977709 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminal.integrated.chooseWindowsShellInfo": "Você pode alterar o terminal shell padrão selecionando o botão Personalizar.", + "customize": "Personalizar", + "cancel": "Cancelar", + "never again": "Ok, Nunca Mostrar Novamente", + "terminal.integrated.chooseWindowsShell": "Selecione o seu terminal shell preferido, você pode alterar isso mais tarde em suas configurações", + "terminalService.terminalCloseConfirmationSingular": "Há uma sessão ativa de terminal, você quer finalizá-la?", + "terminalService.terminalCloseConfirmationPlural": "Existem {0} sessões ativas de terminal, você quer finalizá-las?", + "yes": "Sim" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json new file mode 100644 index 0000000000000..9968bf0b9b1e5 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "selectTheme.label": "Tema de Cores", + "installColorThemes": "Instalar temas de cor adicionais...", + "themes.selectTheme": "Selecione o tema de cor (teclas cima/baixo para visualização)", + "selectIconTheme.label": "Arquivo de Ícone do Tema", + "installIconThemes": "Instalar Temas de Ícones de Arquivos Adicionais...", + "noIconThemeLabel": "Nenhum", + "noIconThemeDesc": "Desabilitar ícones de arquivos", + "problemChangingIconTheme": "Problema configurando tema de ícones: {0}", + "themes.selectIconTheme": "Selecionar Tema de Ícones de Arquivos", + "generateColorTheme.label": "Gerar Tema de Cores a Partir das Configurações Atuais", + "preferences": "Preferências", + "developer": "Desenvolvedor" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.i18n.json new file mode 100644 index 0000000000000..1fc9c8fe3a4ca --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unsupportedWorkspaceSettings": "Esta área de trabalho contém configurações que só podem ser definidas nas configurações do usuário. ({0})", + "openWorkspaceSettings": "Abrir as configurações do espaço de trabalho", + "openDocumentation": "Saiba Mais", + "ignore": "Ignorar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.i18n.json b/i18n/ptb/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.i18n.json new file mode 100644 index 0000000000000..213c54a3d2484 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "releaseNotesInputName": "Notas da Versão: {0}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json new file mode 100644 index 0000000000000..3634d3c2f2ab0 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "release notes": "Notas da versão", + "updateConfigurationTitle": "Atualizar", + "updateChannel": "Configurar se você recebe atualizações automáticas de um canal de atualização. Requer uma reinicialização depois da mudança." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/update/electron-browser/update.i18n.json b/i18n/ptb/src/vs/workbench/parts/update/electron-browser/update.i18n.json new file mode 100644 index 0000000000000..be7616a99979c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/update/electron-browser/update.i18n.json @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateNow": "Atualizar Agora", + "later": "Mais tarde", + "unassigned": "Não atribuído", + "releaseNotes": "Notas da Versão", + "showReleaseNotes": "Mostrar Notas da Versão", + "downloadNow": "Baixar agora", + "read the release notes": "Bem-vindo a {0} v{1}! Gostaria de ler as Notas da Versão?", + "licenseChanged": "Nossos termos de licença mudaram, favor revisá-los.", + "license": "Ler Licença", + "updateIsReady": "Nova atualização disponível.", + "thereIsUpdateAvailable": "Há uma atualização disponível.", + "updateAvailable": "{0} será atualizado após reiniciar.", + "noUpdatesAvailable": "Não há nenhuma atualização disponível.", + "commandPalette": "Paleta de comandos...", + "settings": "Configurações", + "keyboardShortcuts": "Atalhos de Teclado", + "selectTheme.label": "Tema de Cores", + "themes.selectIconTheme.label": "Arquivo de Ícone do Tema", + "not available": "Atualizações Indisponíveis", + "checkingForUpdates": "Verificando Atualizações...", + "DownloadUpdate": "Baixar Atualização Disponível", + "DownloadingUpdate": "Baixando Atualização...", + "InstallingUpdate": "Instalando Atualização...", + "restartToUpdate": "Reinicie para Atualizar...", + "checkForUpdates": "Verificar atualizações..." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/views/browser/views.i18n.json b/i18n/ptb/src/vs/workbench/parts/views/browser/views.i18n.json new file mode 100644 index 0000000000000..32207b28d401d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/views/browser/views.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewToolbarAriaLabel": "{0} ações " +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json b/i18n/ptb/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json new file mode 100644 index 0000000000000..5128faaa5e4c7 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "visualizações devem ser uma matriz", + "requirestring": "a propriedade `{0}` é obrigatória e deve ser do tipo `string`", + "optstring": "a propriedade `{0}` é opcional ou deve ser do tipo `string`", + "vscode.extension.contributes.view.id": "Identificador da visualiozação. Use isto para registrar um provedor de dados através de 'vscode.window.registerTreeDataProviderForView' API. Também para acionar ativando sua extensão registrando o evento 'onView: ${id}' para 'activationEvents'.", + "vscode.extension.contributes.view.name": "O nome legível da visualização. Será mostrado", + "vscode.extension.contributes.view.when": "Condição que deve ser verdadeira para mostrar esta visualização", + "vscode.extension.contributes.views": "Contribui visualizações ao editor", + "views.explorer": "Visualização do explorador", + "locationId.invalid": "'{0}' não é um local válido de visualização" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json b/i18n/ptb/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json new file mode 100644 index 0000000000000..585f626356a9f --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "watermark.showCommands": "Mostrar todos os comandos", + "watermark.quickOpen": "Ir para o Arquivo", + "watermark.openFile": "Abrir Arquivo", + "watermark.openFolder": "Abrir Pasta", + "watermark.openFileFolder": "Abrir Arquivo ou Pasta", + "watermark.openRecent": "Abrir Recente", + "watermark.newUntitledFile": "Novo Arquivo Sem Título", + "watermark.toggleTerminal": "Alternar Terminal", + "watermark.findInFiles": "Localizar nos Arquivos", + "watermark.startDebugging": "Iniciar Depuração", + "watermark.unboundCommand": "não vinculado", + "workbenchConfigurationTitle": "Área de Trabalho", + "tips.enabled": "Quando habilitado, mostrará as dicas de marca d'água quando nenhum editor estiver aberto." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.i18n.json b/i18n/ptb/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.i18n.json new file mode 100644 index 0000000000000..93d7a695382ad --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "welcomeOverlay.explorer": "Explorador de arquivos", + "welcomeOverlay.search": "Pesquisar em arquivos", + "welcomeOverlay.git": "Gerenciamento de código fonte", + "welcomeOverlay.debug": "Executar e depurar", + "welcomeOverlay.extensions": "Gerenciar extensões", + "welcomeOverlay.problems": "Visualizar erros e avisos", + "welcomeOverlay.commandPalette": "Encontrar e executar todos os comandos", + "welcomeOverlay": "Visão geral da Interface do usuário", + "hideWelcomeOverlay": "Esconder a visão geral da Interface", + "help": "Ajuda" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json new file mode 100644 index 0000000000000..7fe19b77cbeb7 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -0,0 +1,45 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "welcomePage.vscode": "Visual Studio Code", + "welcomePage.editingEvolved": "Edição evoluiu", + "welcomePage.start": "Início", + "welcomePage.newFile": "Novo arquivo", + "welcomePage.openFolder": "Abrir pasta...", + "welcomePage.cloneGitRepository": "Clonar repositório Git...", + "welcomePage.recent": "Recente", + "welcomePage.moreRecent": "Mais...", + "welcomePage.noRecentFolders": "Não há pastas recentes", + "welcomePage.help": "Ajuda", + "welcomePage.keybindingsCheatsheet": "Folha de dicas de teclado para impressão", + "welcomePage.introductoryVideos": "Vídeos introdutórios", + "welcomePage.tipsAndTricks": "Dicas e truques", + "welcomePage.productDocumentation": "Documentação do produto", + "welcomePage.gitHubRepository": "Repositório GitHub", + "welcomePage.stackOverflow": "Stack Overflow", + "welcomePage.showOnStartup": "Mostrar a página de boas-vindas na inicialização", + "welcomePage.customize": "Personalizar", + "welcomePage.installExtensionPacks": "Ferramentas e linguagens", + "welcomePage.installExtensionPacksDescription": "Instalar o suporte para {0} e {1}", + "welcomePage.moreExtensions": "mais", + "welcomePage.installKeymapDescription": "Instalar atalhos de teclado", + "welcomePage.installKeymapExtension": "Instalar os atalhos de teclado de {0} e {1}", + "welcomePage.others": "outros", + "welcomePage.colorTheme": "Tema de cores", + "welcomePage.colorThemeDescription": "Fazer o editor e seu código parecer do jeito que você gosta", + "welcomePage.learn": "Aprender", + "welcomePage.showCommands": "Encontrar e executar todos os comandos", + "welcomePage.showCommandsDescription": "Comandos de acesso rápido e de pesquisa da paleta de comando ({0})", + "welcomePage.interfaceOverview": "Visão geral da interface", + "welcomePage.interfaceOverviewDescription": "Obter uma sobreposição visual, destacando os principais componentes da interface do usuário", + "welcomePage.interactivePlayground": "Playground interativo", + "welcomePage.interactivePlaygroundDescription": "Experimente as características essenciais do editor em um curto passo-a-passo", + "welcomePage.quickLinks": "Links rápidos", + "welcomePage.keybindingsReference": "Referência de atalhos de teclado", + "welcomePage.keybindingsReferenceDescription": "Um PDF para impressão com os atalhos de teclado mais comuns", + "welcomePage.configureSettings": "Configurar definições", + "welcomePage.configureSettingsDescription": "Desbloquear o poder completo do VS Coda ajustando as configurações" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json new file mode 100644 index 0000000000000..13ca5c6bf8d17 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "workbenchConfigurationTitle": "Área de Trabalho", + "workbench.startupEditor.none": "Iniciar sem um editor.", + "workbench.startupEditor.welcomePage": "Abrir a página de boas-vindas (padrão).", + "workbench.startupEditor.newUntitledFile": "Abrir um novo arquivo sem título.", + "workbench.startupEditor": "Controla qual o editor que é mostrado na inicialização, se nenhum for restaurado a partir da sessão anterior. Selecione 'none' para iniciar sem um editor, 'welcomePage' para abrir a página de boas-vindas (padrão), 'newUntitledFile' para abrir um novo arquivo sem título (somente quando não estiver abrindo uma pasta).", + "help": "Ajuda" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json new file mode 100644 index 0000000000000..fcdb7c13f8dad --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -0,0 +1,36 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "welcomePage": "Bem-vindo", + "welcomePage.javaScript": "JavaScript", + "welcomePage.typeScript": "TypeScript", + "welcomePage.python": "Python", + "welcomePage.php": "PHP", + "welcomePage.docker": "Docker", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", + "welcomePage.extensionPackAlreadyInstalled": "Suporte para {0} já está instalado.", + "welcomePage.willReloadAfterInstallingExtensionPack": "A janela irá recarregar depois de instalar o suporte adicional para {0}.", + "welcomePage.installingExtensionPack": "Instalando o suporte adicional para {0}...", + "welcomePage.extensionPackNotFound": "Suporte para {0} com o id {1} não pôde ser encontrado.", + "welcomePage.keymapAlreadyInstalled": "Os atalhos de teclado de {0} já estão instalados.", + "welcomePage.willReloadAfterInstallingKeymap": "A janela irá recarregar depois de instalar os {0} atalhos de teclado.", + "welcomePage.installingKeymap": "Instalando os {0} atalhos de teclado...", + "welcomePage.keymapNotFound": "Os {0} atalhos de teclado com o id {1} não podem ser encontrados.", + "welcome.title": "Bem-vindo", + "welcomePage.openFolderWithPath": "Abrir pasta {0} com o caminho {1}", + "welcomePage.extensionListSeparator": ", ", + "welcomePage.installKeymap": "Instalar {0} keymap", + "welcomePage.installExtensionPack": "Instalar o suporte adicional para {0}", + "welcomePage.installedKeymap": "Mapeamento de tecla '{0}' já está instalado.", + "welcomePage.installedExtensionPack": "Suporte {0} já está instalado.", + "ok": "OK", + "details": "Detalhes", + "cancel": "Cancelar", + "welcomePage.buttonBackground": "Cor de fundo para os botões na página de boas-vindas.", + "welcomePage.buttonHoverBackground": "Cor de fundo ao passar o mouse sobre os botões na página de boas-vindas." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.i18n.json b/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.i18n.json new file mode 100644 index 0000000000000..9c7c7f681fa23 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorWalkThrough": "Playground Interativo", + "editorWalkThrough.title": "Playground Interativo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution.i18n.json new file mode 100644 index 0000000000000..a789ae1c81fd4 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "walkThrough.editor.label": "Playground Interativo", + "help": "Ajuda", + "interactivePlayground": "Playground Interativo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughActions.i18n.json new file mode 100644 index 0000000000000..697623110b08d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughActions.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorWalkThrough.arrowUp": "Rolar para Cima (Linha)", + "editorWalkThrough.arrowDown": "Rolar para Baixo (Linha)", + "editorWalkThrough.pageUp": "Rolar para Cima (Página)", + "editorWalkThrough.pageDown": "Rolar para Baixo (Página)" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json new file mode 100644 index 0000000000000..4131ebae487a7 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "walkThrough.unboundCommand": "não vinculado", + "walkThrough.gitNotFound": "Parece que o Git não está instalado no seu sistema.", + "walkThrough.embeddedEditorBackground": "Cor de fundo para os editores incorporados no Playground Interativo." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/configuration/node/configuration.i18n.json b/i18n/ptb/src/vs/workbench/services/configuration/node/configuration.i18n.json new file mode 100644 index 0000000000000..afe85733689c9 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/configuration/node/configuration.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.configuration": "Contribui às definições de configuração.", + "vscode.extension.contributes.configuration.title": "Um resumo das configurações. Este rótulo será usado no arquivo de configurações como um comentário de separação.", + "vscode.extension.contributes.configuration.properties": "Descrição das propriedades de configuração.", + "invalid.type": "Se definido, 'configuration.type' deve ser do tipo 'object'", + "invalid.title": "'configuration.title' deve ser um string", + "vscode.extension.contributes.defaultConfiguration": "Contribui às definições de configuração padrão do editor por linguagem.", + "invalid.properties": "'configuration.properties' deve ser um objeto" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/ptb/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json new file mode 100644 index 0000000000000..188ab8da37e69 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "open": "Abrir configurações", + "close": "Fechar", + "saveAndRetry": "Salvar as configurações e tentar novamente", + "errorUnknownKey": "Não é possível gravar no arquivo de configuração (chave desconhecida)", + "errorInvalidTarget": "Não é possível gravar no arquivo de configuração (destino inválido)", + "errorNoWorkspaceOpened": "Não é possível gravar em configurações porque nenhuma pasta está aberta. Por favor, abra uma pasta primeiro e tente novamente.", + "errorInvalidConfiguration": "Não é possível gravar em configurações. Por favor abra **User Settings** para corrigir erros/avisos no arquivo e tente novamente.", + "errorInvalidConfigurationWorkspace": "Não é possível gravar em configurações. Por favor abra **Workspace Settings** para corrigir erros/avisos no arquivo e tente novamente.", + "errorConfigurationFileDirty": "Não é possível gravar em configurações, porque o arquivo foi alterado. Por favor, salve o arquivo **User Settings** e tente novamente.", + "errorConfigurationFileDirtyWorkspace": "Não é possível gravar em configurações, porque o arquivo foi alterado. Por favor, salve o arquivo **Workspace Settings** e tente novamente." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json b/i18n/ptb/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json new file mode 100644 index 0000000000000..63fd1d1955daf --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Telemetria", + "telemetry.enableCrashReporting": "Ativar o envio de relatórios de incidentes à Microsoft. Esta opção requer reinicialização para ser efetiva." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/editor/browser/editorService.i18n.json b/i18n/ptb/src/vs/workbench/services/editor/browser/editorService.i18n.json new file mode 100644 index 0000000000000..50e968f8ee37e --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/editor/browser/editorService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "compareLabels": "{0} ↔ {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/files/electron-browser/fileService.i18n.json b/i18n/ptb/src/vs/workbench/services/files/electron-browser/fileService.i18n.json new file mode 100644 index 0000000000000..49e9152a1dbee --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/files/electron-browser/fileService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "netVersionError": "O Microsoft .NET Framework 4.5 é necessário. Por favor siga o link para instalá-lo.", + "installNet": "Baixar o .NET Framework 4.5", + "neverShowAgain": "Não mostrar novamente", + "trashFailed": "Falha em mover '{0}' para a lixeira" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/files/node/fileService.i18n.json b/i18n/ptb/src/vs/workbench/services/files/node/fileService.i18n.json new file mode 100644 index 0000000000000..cb5fa24e4f006 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/files/node/fileService.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileInvalidPath": "Recurso de arquivo inválido ({0})", + "fileIsDirectoryError": "Arquivo é diretório ({0})", + "fileNotModifiedError": "Arquivo não modificado desde", + "fileTooLargeError": "Arquivo muito grande para abrir", + "fileBinaryError": "Arquivo parece ser binário e não pode ser aberto como texto", + "fileNotFoundError": "Arquivo não encontrado ({0})", + "fileMoveConflict": "Não é possível mover/copiar. Arquivo já existe no destino.", + "unableToMoveCopyError": "Não é possível mover/copiar. Arquivo poderia substituir a pasta em que está contida.", + "foldersCopyError": "Pastas não podem ser copiadas para a área de trabalho. Por favor selecione arquivos individuais para serem copiados.", + "fileModifiedError": "Arquivo Modificado Desde", + "fileReadOnlyError": "Arquivo é Somente Leitura" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/keybinding/common/keybindingEditing.i18n.json b/i18n/ptb/src/vs/workbench/services/keybinding/common/keybindingEditing.i18n.json new file mode 100644 index 0000000000000..daa32f59ee979 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/keybinding/common/keybindingEditing.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "errorKeybindingsFileDirty": "Não é possível gravar porque o arquivo está sujo. Por favor, salve o arquivo **Keybindings** e tente novamente.", + "parseErrors": "Não é possível gravar as combinações de teclas. Por favor abra o **arquivo Keybindings** para corrigir erros/avisos no arquivo e tente novamente.", + "errorInvalidConfiguration": "Não é possível gravar as combinações de teclas. **Arquivo Keybindings** tem um objeto que não é do tipo Matriz. Por favor, abra o arquivo para limpar e tentar novamente.", + "emptyKeybindingsHeader": "Coloque suas combinações de teclas neste arquivo para substituir os padrões" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/ptb/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json new file mode 100644 index 0000000000000..b890aa49bd7ea --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "nonempty": "Esperado um valor não vazio", + "requirestring": "a propriedade `{0}` é obrigatória e deve ser do tipo `string`", + "optstring": "a propriedade `{0}` é opcional ou pode ser do tipo `string`", + "vscode.extension.contributes.keybindings.command": "Identificador do comando a ser executado quando keybinding é acionado.", + "vscode.extension.contributes.keybindings.key": "Tecla ou sequência de teclas (teclas separadas com o sinal de adição e sequências com espaço, por exemplo Ctrl+O e Ctrl+L L).", + "vscode.extension.contributes.keybindings.mac": "Chave específica Mac ou sequência de teclas.", + "vscode.extension.contributes.keybindings.linux": "Chave específica Linux ou sequência de teclas.", + "vscode.extension.contributes.keybindings.win": "Chave específica Windows ou sequência de teclas.", + "vscode.extension.contributes.keybindings.when": "Condição quando a chave está ativa.", + "vscode.extension.contributes.keybindings": "Contribui para Atalhos de Teclado.", + "invalid.keybindings": "Inválido `contributes.{0}`: {1}", + "unboundCommands": "Aqui estão outros comandos disponíveis: ", + "keybindings.json.title": "Configuração de combinações de teclas", + "keybindings.json.key": "Tecla ou sequência de teclas (separados por espaço)", + "keybindings.json.command": "Nome do comando a ser executado", + "keybindings.json.when": "Condição quando a chave está ativa.", + "keybindings.json.args": "Argumentos a serem passados para o comando para executar.", + "keyboardConfigurationTitle": "Teclado", + "dispatch": "Controla a lógica de expedição para pressionamentos de teclas para usar `keydown.code` (recomendado) ou 'keydown.keyCode'." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/message/browser/messageList.i18n.json b/i18n/ptb/src/vs/workbench/services/message/browser/messageList.i18n.json new file mode 100644 index 0000000000000..267b62d179d2a --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/message/browser/messageList.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "alertErrorMessage": "Erro: {0}", + "alertWarningMessage": "Aviso: {0}", + "alertInfoMessage": "Informações: {0}", + "error": "Erro", + "warning": "Aviso", + "info": "Informações", + "close": "Fechar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/message/electron-browser/messageService.i18n.json b/i18n/ptb/src/vs/workbench/services/message/electron-browser/messageService.i18n.json new file mode 100644 index 0000000000000..cecec4b4c3aab --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/message/electron-browser/messageService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "yesButton": "&&Sim", + "cancelButton": "Cancelar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json b/i18n/ptb/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json new file mode 100644 index 0000000000000..7ab0c45fad17a --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.languages": "Contribui às declarações de linguagem.", + "vscode.extension.contributes.languages.id": "ID da linguagem", + "vscode.extension.contributes.languages.aliases": "Aliases de nome para esta linguagem.", + "vscode.extension.contributes.languages.extensions": "Extensões de arquivos associadas a esta linguagem", + "vscode.extension.contributes.languages.filenames": "Nome dos arquivos associados a esta linguagem", + "vscode.extension.contributes.languages.filenamePatterns": "Padrão glob de nomes de arquivos associados a linguagem.", + "vscode.extension.contributes.languages.mimetypes": "Tipos Mime associados à linguagem.", + "vscode.extension.contributes.languages.firstLine": "Uma expressão regular que coincide com a primeira linha de um arquivo da linguaguem.", + "vscode.extension.contributes.languages.configuration": "Um caminho relativo para um arquivo contendo opções de configuração para a linguagem.", + "invalid": "Inválido 'contributes.{0}`. Matriz esperada.", + "invalid.empty": "Valor em branco para` contributes.{0}`", + "require.id": "a propriedade `{0}` é obrigatória e deve ser do tipo `string`", + "opt.extensions": "a propriedade `{0}` pode ser omitida e deve ser do tipo `string[]`", + "opt.filenames": "a propriedade `{0}` pode ser omitida e deve ser do tipo `string[]`", + "opt.firstLine": "a propriedade `{0}` pode ser omitida e deve ser do tipo `string`", + "opt.configuration": "a propriedade `{0}` pode ser omitida e deve ser do tipo `string`", + "opt.aliases": "a propriedade `{0}` pode ser omitida e deve ser do tipo `string[]`", + "opt.mimetypes": "a propriedade `{0}` pode ser omitida e deve ser do tipo `string[]`" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/progress/browser/progressService2.i18n.json b/i18n/ptb/src/vs/workbench/services/progress/browser/progressService2.i18n.json new file mode 100644 index 0000000000000..6db7d6aae514a --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/progress/browser/progressService2.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "progress.text": "{0} - {1}", + "progress.title": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json b/i18n/ptb/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json new file mode 100644 index 0000000000000..7707ea3401f3b --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.grammars": "Contibui aos toquenizadores textmate", + "vscode.extension.contributes.grammars.language": "Identificador da linguagem para qual a sintaxe contribui.", + "vscode.extension.contributes.grammars.scopeName": "Nome do escopo Textmate usado pelo arquivo tmLanguage.", + "vscode.extension.contributes.grammars.path": "Caminho para o arquivo tmLanguage. O caminho é relativo a pasta da extensão e geralmente começa com './syntaxes/'.", + "vscode.extension.contributes.grammars.embeddedLanguages": "Um mapeamento no nome do escopo para o Id da linguagem se esta gramática contenha linguagens embutidas.", + "vscode.extension.contributes.grammars.injectTo": "Lista de nomes de escopos de linguagem aos quais esta gramática é injetada." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json b/i18n/ptb/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json new file mode 100644 index 0000000000000..dfef3cc47a597 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid.language": "Linguagem desconhecida em `contributes.{0}.language`. Valor fornecido: {1}", + "invalid.scopeName": "Esperada uma string em 'contributes.{0}.scopeName'. Valor informado: {1}", + "invalid.path.0": "Esperada uma string em `contributes.{0}.path`. Valor informado: {1}", + "invalid.injectTo": "Valor inválido em `contributes.{0}.injectTo`. Deve ser uma matriz de nomes de escopo de idioma. Valor fornecido: {1}", + "invalid.embeddedLanguages": "Valor inválido em `contributes.{0}.embeddedLanguages`. Deve ser um objeto de mapeamento do nome do escopo para a linguagem. Valor informado: {1}", + "invalid.path.1": "É esperado que `contributes.{0}.path` ({1}) seja incluído na pasta da extensão ({2}). Isto pode tornar a extensão não portável.", + "no-tm-grammar": "Nenhuma gramática TM registrada para este idioma." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/textfile/common/textFileEditorModel.i18n.json b/i18n/ptb/src/vs/workbench/services/textfile/common/textFileEditorModel.i18n.json new file mode 100644 index 0000000000000..7eed5484379af --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/textfile/common/textFileEditorModel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "saveFileFirst": "O arquivo está alterado. Por favor, salvá-lo primeiro antes reabri-lo com outra codificação.", + "genericSaveError": "Erro ao salvar '{0}': {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/textfile/common/textFileService.i18n.json b/i18n/ptb/src/vs/workbench/services/textfile/common/textFileService.i18n.json new file mode 100644 index 0000000000000..9fe74ad26f3aa --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/textfile/common/textFileService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "files.backup.failSave": "Arquivos não poderiam ser backupeados (erro: {0}), tente salvar seus arquivos para sair." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/textfile/electron-browser/textFileService.i18n.json b/i18n/ptb/src/vs/workbench/services/textfile/electron-browser/textFileService.i18n.json new file mode 100644 index 0000000000000..491b19e87c4ef --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/textfile/electron-browser/textFileService.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "saveChangesMessage": "Você quer salvar as alterações feitas para {0}?", + "saveChangesMessages": "Você quer salvar as alterações para os seguintes {0} arquivos?", + "moreFile": "... 1 arquivo adicional não está mostrado", + "moreFiles": "... {0} arquivos adicionais não estão mostrados", + "saveAll": "&&Salvar tudo", + "save": "&&Salvar", + "dontSave": "&&Não Salvar", + "cancel": "Cancelar", + "saveChangesDetail": "Suas alterações serão perdidas se você não salvá-las.", + "allFiles": "Todos os arquivos", + "noExt": "Sem extensão" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json b/i18n/ptb/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json new file mode 100644 index 0000000000000..02e2bc182734b --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "schema.colors": "Cores para o realce de sintaxe", + "schema.properties.name": "Descrição da regra", + "schema.fontStyle": "Estilo da fonte da regra: um estilo ou uma combinação de 'itálico', 'negrito' e 'sublinhado'", + "schema.tokenColors.path": "Caminho para um arquivo tmTheme (relativo ao arquivo atual)" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/themes/common/fileIconThemeSchema.i18n.json b/i18n/ptb/src/vs/workbench/services/themes/common/fileIconThemeSchema.i18n.json new file mode 100644 index 0000000000000..3cf20c82de2cb --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/themes/common/fileIconThemeSchema.i18n.json @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "schema.folderExpanded": "O ícone de pasta para pastas expandidas. O ícone da pasta expandido é opcional. Se não definido, o ícone definido para a pasta será mostrado.", + "schema.folder": "O ícone de pasta para pastas colapsadas, e se folderExpanded não estiver definido, também para pastas expandidas.", + "schema.file": "O ícone de arquivo padrão, indicado para todos os arquivos que não correspondem a qualquer extensão, nome de arquivo ou idioma.", + "schema.folderNames": "Associa os nomes de pasta à ícones. A chave do objeto é o nome da pasta, não incluindo quaisquer segmentos de caminho. Nenhum padrão ou curinga são permitidos. O nome da pasta de correspondência diferencia maiusculas de minúsculas.", + "schema.folderName": "A ID da definição do ícone para associação.", + "schema.folderNamesExpanded": "Associa os nomes de pasta a ícones para pastas expandidas. A chave do objeto é o nome da pasta, não incluindo quaisquer segmentos do caminho. Padrões ou curingas não são permitidas. A correspondência do nome de pastas não diferencia maiusculas de minúsculas.", + "schema.folderNameExpanded": "A ID da definição do ícone para a associação.", + "schema.fileExtensions": "Associa as extensões de arquivo aos ícones. A chave do objeto é o nome da extensão do arquivo. O nome da extensão é o último segmento de um nome de arquivo após o último ponto (não incluindo o ponto). As extensões não diferenciam maiúsculas de minúsculas.", + "schema.fileExtension": "A ID da definição do ícone para a associação.", + "schema.fileNames": "Associa os nomes de arquivo à ícones. A chave do objeto é o nome completo do arquivo, mas não incluindo quaisquer segmentos do caminho. O nome do arquivo pode incluir pontos e uma extensão de arquivo. Nenhum padrão ou curinga é permitido. A correspondência de nome de arquivo não diferencia maiúsculas de minúsculas.", + "schema.fileName": "A ID da definição do ícone para a associação.", + "schema.languageIds": "Associa idiomas a ícones. A chave do objeto é o id de idioma definido no ponto de contribuição de linguagem.", + "schema.languageId": "O ID da definição do ícone para a associação.", + "schema.fonts": "Fontes que são usadas nas definições de ícone.", + "schema.id": "O ID da fonte.", + "schema.src": "A localização da fonte.", + "schema.font-path": "O caminho do fonte, relativo ao arquivo de tema de ícone atual.", + "schema.font-format": "O formato da fonte.", + "schema.font-weight": "O peso da fonte.", + "schema.font-sstyle": "O estilo da fonte.", + "schema.font-size": "O tamanho padrão da fonte.", + "schema.iconDefinitions": "Descrição de todos os ícones que podem ser usados quando associar arquivos de ícones.", + "schema.iconDefinition": "Uma definição de ícone. A chave do objeto é o ID da definição.", + "schema.iconPath": "Ao usar um SVG ou PNG: O caminho para a imagem. O caminho é relativo ao arquivo de configuração do ícone.", + "schema.fontCharacter": "Ao usar uma fonte glyph: O caractere na fonte para usar.", + "schema.fontColor": "Ao usar uma fonte glyph: A cor a ser utilizada.", + "schema.fontSize": "Quando estiver utilizando uma fonte: O tamanho da fonte em porcentagem para a fonte de texto. Se não for definido, o padrão é o tamanho na definição de fonte.", + "schema.fontId": "Quando estiver utilizando uma fonte: A identificação da fonte. Se não for definido, o padrão é a primeira definição de fonte.", + "schema.light": "Associações opcionais para ícones de arquivo em temas de cor clara.", + "schema.highContrast": "Associações opcionais para ícones de arquivo em temas de alto contraste." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/ptb/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json new file mode 100644 index 0000000000000..4ef6944ba7352 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error.cannotparsejson": "Problemas ao analisar o arquivo de tema JSON: {0}", + "error.invalidformat.colors": "Problema ao analisar o arquivo de tema de cor: {0}. A propriedade 'colors' não é do tipo 'object'.", + "error.invalidformat.tokenColors": "Problema ao analisar o arquivo de tema de cor: {0}. A propriedade 'tokenColors' deve ser também uma matriz especificando as cores ou um caminho para um arquivo de texto de tema correspondente", + "error.plist.invalidformat": "Problema ao analisar o arquivo tmTheme: {0}. 'settings' não é uma matriz.", + "error.cannotparse": "Problemas ao analisar o arquivo tmTheme: {0}", + "error.cannotload": "Problemas ao carregar o arquivo tmTheme {0}: {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/ptb/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json new file mode 100644 index 0000000000000..dffd432eafb06 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.themes": "Contribui com temas de cores do textmate.", + "vscode.extension.contributes.themes.id": "ID do tema do ícone conforme usado em configurações do usuário.", + "vscode.extension.contributes.themes.label": "Etiqueta da cor do tema como mostrado na interface do usuário.", + "vscode.extension.contributes.themes.uiTheme": "Tema base de definição das cores do editor: 'vs' é o tema de cor clara, 'vs-dark' é o tema de cor escura. 'hc preto' é o tema escuro de alto contraste.", + "vscode.extension.contributes.themes.path": "Caminho do arquivo tmTheme. O caminho é relativo à pasta de extensão e é normalmente './themes/themeFile.tmTheme'.", + "vscode.extension.contributes.iconThemes": "Contribui com temas de ícones de arquivo.", + "vscode.extension.contributes.iconThemes.id": "ID do tema do ícone como usado em configurações do usuário.", + "vscode.extension.contributes.iconThemes.label": "Etiqueta do tema do ícone como mostrado na interface do usuário.", + "vscode.extension.contributes.iconThemes.path": "Caminho do arquivo de definição do tema do ícone. O caminho é relativo à pasta de extensão e é normalmente './icons/awesome-icon-theme.json'.", + "migration.completed": "Foram adicionadas novas configurações de tema para as configurações de usuário. Backup está disponível em {0}.", + "error.cannotloadtheme": "Não é possível carregar {0}: {1}", + "reqarray": "Ponto de extensão '{0}' deve ser uma matriz.", + "reqpath": "Esperada uma string em `contributes.{0}.path`. Valor informado: {1}", + "invalid.path.1": "É esperado que `contributes.{0}.path` ({1}) seja incluído na pasta da extensão ({2}). Isto pode tornar a extensão não portável.", + "reqid": "Esperada sequência em 'contributes.{0}.ID'. Valor fornecido: {1}", + "error.cannotloadicontheme": "Não é possível carregar {0}", + "error.cannotparseicontheme": "Problemas de análise do arquivo de ícones: {0}", + "colorTheme": "Especifica o tema de cores usado no espaço de trabalho.", + "colorThemeError": "Tema é desconhecido ou não está instalado.", + "iconTheme": "Especifica o tema de ícones usado no espaço de trabalho ou 'null' para não mostrar qualquer arquivo de ícones.", + "noIconThemeDesc": "Nenhum arquivo de ícones", + "iconThemeError": "Arquivo de tema de ícones é desconhecido ou não está instalado.", + "workbenchColors": "Substitui as cores do tema do tema de cores atualmente selecionado.", + "workbenchColors.deprecated": "A configuração não é mais experimental e foi renomeada para 'workbench.colorCustomizations'", + "workbenchColors.deprecatedDescription": "Use 'workbench.colorCustomizations'" +} \ No newline at end of file diff --git a/i18n/rus/extensions/configuration-editing/out/extension.i18n.json b/i18n/rus/extensions/configuration-editing/out/extension.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/extensions/configuration-editing/out/extension.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json b/i18n/rus/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json index 2da7bdbe2d504..6f555283ee600 100644 --- a/i18n/rus/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json +++ b/i18n/rus/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json @@ -7,7 +7,6 @@ "activeEditorShort": "например, myFile.txt", "activeEditorMedium": "например, myFolder/myFile.txt", "activeEditorLong": "например, /Users/Development/myProject/myFolder/myFile.txt", - "rootName": "например, myProject", "rootPath": "например, /Users/Development/myProject", "appName": "например, VS Code", "dirty": "индикатор dirty, если активный редактор является \"грязным\"", diff --git a/i18n/rus/extensions/extension-editing/out/extensionLinter.i18n.json b/i18n/rus/extensions/extension-editing/out/extensionLinter.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/extensions/extension-editing/out/extensionLinter.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/extensions/git/out/commands.i18n.json b/i18n/rus/extensions/git/out/commands.i18n.json index dfbba57f8c36a..728d6ecc10935 100644 --- a/i18n/rus/extensions/git/out/commands.i18n.json +++ b/i18n/rus/extensions/git/out/commands.i18n.json @@ -16,11 +16,19 @@ "confirm discard": "Вы действительно хотите отменить изменения в {0}?", "confirm discard multiple": "Вы действительно хотите отменить изменения в файлах ({0})?", "discard": "Отменить изменения", + "confirm discard all": "Вы действительно хотите отменить все изменения? Отменить это действие нельзя!", + "discardAll": "Отменить все изменения", + "no staged changes": "Отсутствуют промежуточные изменения для фиксации.\n\nВы хотите сделать все изменения промежуточными и зафиксировать их напрямую?", + "yes": "Да", + "always": "Всегда", "no changes": "Нет изменений для фиксации.", "commit message": "Сообщение о фиксации", "provide commit message": "Введите сообщение фиксации.", "branch name": "Имя ветви", "provide branch name": "Укажите имя ветви.", + "select branch to delete": "Выберите ветвь для удаления", + "confirm force delete branch": "Ветвь '{0}' объединена не полностью. Удалить ее?", + "delete branch": "Удалить ветвь", "no remotes to pull": "Для вашего репозитория не настроены удаленные репозитории для получения данных.", "no remotes to push": "Для вашего репозитория не настроены удаленные репозитории для отправки данных.", "nobranch": "Извлеките ветвь, чтобы передать данные в удаленный репозиторий.", @@ -31,6 +39,7 @@ "no remotes to publish": "Для вашего репозитория не настроены удаленные репозитории для публикации.", "disabled": "GIT отключен или не поддерживается в этой рабочей области", "clean repo": "Очистите рабочее дерево репозитория перед извлечением.", + "cant push": "Не удается отправить ссылки в удаленную ветвь. Сначала выберите \"Извлечь\", чтобы интегрировать изменения.", "git error details": "Git: {0}", "git error": "Ошибка Git", "open git log": "Открыть журнал GIT" diff --git a/i18n/rus/extensions/git/out/main.i18n.json b/i18n/rus/extensions/git/out/main.i18n.json index b384f20a402a7..175b7f3a7cc39 100644 --- a/i18n/rus/extensions/git/out/main.i18n.json +++ b/i18n/rus/extensions/git/out/main.i18n.json @@ -6,5 +6,6 @@ { "using git": "Использование GIT {0} из {1}", "updateGit": "Обновить Git", - "neverShowAgain": "Больше не показывать" + "neverShowAgain": "Больше не показывать", + "git20": "У вас установлен Git {0}. Код лучше всего работает с Git >= 2." } \ No newline at end of file diff --git a/i18n/rus/extensions/git/out/model.i18n.json b/i18n/rus/extensions/git/out/model.i18n.json index 06cf3dbf85b8d..c349ed7bde0be 100644 --- a/i18n/rus/extensions/git/out/model.i18n.json +++ b/i18n/rus/extensions/git/out/model.i18n.json @@ -8,5 +8,7 @@ "merge changes": "Объединить изменения", "staged changes": "Промежуточно сохраненные изменения", "changes": "Изменения", - "ok": "ОК" + "ok": "ОК", + "neveragain": "Больше не показывать", + "huge": "Репозиторий git в '{0}' имеет очень много активных изменений, только часть функций Git будет доступна." } \ No newline at end of file diff --git a/i18n/rus/extensions/git/out/statusbar.i18n.json b/i18n/rus/extensions/git/out/statusbar.i18n.json index e2a1fb358d8e9..b70a09ca50856 100644 --- a/i18n/rus/extensions/git/out/statusbar.i18n.json +++ b/i18n/rus/extensions/git/out/statusbar.i18n.json @@ -6,6 +6,6 @@ { "checkout": "Извлечь...", "sync changes": "Синхронизировать изменения", - "publish changes": "Публиковать изменения", + "publish changes": "Опубликовать изменения", "syncing changes": "Синхронизация изменений..." } \ No newline at end of file diff --git a/i18n/rus/extensions/git/package.i18n.json b/i18n/rus/extensions/git/package.i18n.json index 447fd871e6b01..9c313215e467c 100644 --- a/i18n/rus/extensions/git/package.i18n.json +++ b/i18n/rus/extensions/git/package.i18n.json @@ -26,12 +26,13 @@ "command.undoCommit": "Отменить последнюю фиксацию", "command.checkout": "Извлечь в...", "command.branch": "Создать ветвь...", + "command.deleteBranch": "Удалить ветвь...", "command.pull": "Получить", "command.pullRebase": "Получить (переместить изменения из одной ветви в другую)", "command.push": "Отправить", "command.pushTo": "Отправить в:", "command.sync": "Синхронизация", - "command.publish": "Опубликовать", + "command.publish": "Опубликовать ветвь", "command.showOutput": "Показать выходные данные GIT", "config.enabled": "Включен ли GIT", "config.path": "Путь к исполняемому файлу GIT", @@ -39,6 +40,9 @@ "config.autofetch": "Включено ли автоматическое получение", "config.enableLongCommitWarning": "Следует ли предупреждать о длинных сообщениях о фиксации", "config.confirmSync": "Подтвердите синхронизацию репозиториев GIT.", - "config.countBadge": "Управляет счетчиком эмблем GIT.", - "config.checkoutType": "Определяет, какие типы ветвей перечисляются." + "config.countBadge": "\nУправляет счетчиком Git. При указании значения \"all\" подсчитываются все изменения, при указании значения \"tracked\" — только отслеживаемые изменения, при указании значения \"off\" счетчик отключается.", + "config.checkoutType": "Определяет типы ветвей, которые выводятся при выборе пункта меню \"Извлечь в...\". При указании значения \"all\" отображаются все ссылки, \"local\" — только локальные ветви, \"tags\" — только теги, а \"remote\" — только удаленные ветви.", + "config.ignoreLegacyWarning": "Игнорирует предупреждение об устаревшей версии Git", + "config.ignoreLimitWarning": "Игнорировать предупреждение, когда в репозитории слишком много изменений", + "config.defaultCloneDirectory": "Расположение по умолчанию, в которое будет клонирован репозиторий Git" } \ No newline at end of file diff --git a/i18n/rus/extensions/grunt/out/main.i18n.json b/i18n/rus/extensions/grunt/out/main.i18n.json index 8b6ad71cd4e6d..7d21b8b17d93b 100644 --- a/i18n/rus/extensions/grunt/out/main.i18n.json +++ b/i18n/rus/extensions/grunt/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Сбой автоматического определений заданий Grunt. Ошибка: {0}" +} \ No newline at end of file diff --git a/i18n/rus/extensions/grunt/package.i18n.json b/i18n/rus/extensions/grunt/package.i18n.json index 8b6ad71cd4e6d..b73dd0e278867 100644 --- a/i18n/rus/extensions/grunt/package.i18n.json +++ b/i18n/rus/extensions/grunt/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.grunt.autoDetect": "Включает или отключает автоматическое определние заданий Grunt. Значение по умолчанию — \"включено\"." +} \ No newline at end of file diff --git a/i18n/rus/extensions/gulp/out/main.i18n.json b/i18n/rus/extensions/gulp/out/main.i18n.json index 8b6ad71cd4e6d..5a72cc938549a 100644 --- a/i18n/rus/extensions/gulp/out/main.i18n.json +++ b/i18n/rus/extensions/gulp/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Автообнаружение галпа с ошибкой {0}" +} \ No newline at end of file diff --git a/i18n/rus/extensions/gulp/package.i18n.json b/i18n/rus/extensions/gulp/package.i18n.json index 8b6ad71cd4e6d..37a145323f2e9 100644 --- a/i18n/rus/extensions/gulp/package.i18n.json +++ b/i18n/rus/extensions/gulp/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.gulp.autoDetect": "Включает или отключает автоматическое определение заданий Gulp. Значение по умолчанию — \"включено\"." +} \ No newline at end of file diff --git a/i18n/rus/extensions/jake/out/main.i18n.json b/i18n/rus/extensions/jake/out/main.i18n.json new file mode 100644 index 0000000000000..3f8458b5b988c --- /dev/null +++ b/i18n/rus/extensions/jake/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "Сбой автоматического определений заданий Jake. Ошибка: {0}" +} \ No newline at end of file diff --git a/i18n/rus/extensions/jake/package.i18n.json b/i18n/rus/extensions/jake/package.i18n.json new file mode 100644 index 0000000000000..57552487f0a66 --- /dev/null +++ b/i18n/rus/extensions/jake/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.jake.autoDetect": "Включает или отключает автоматическое определение заданий Jake. Значение по умолчанию — \"включено\"." +} \ No newline at end of file diff --git a/i18n/rus/extensions/markdown/out/extension.i18n.json b/i18n/rus/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..5c5b3690dc66c --- /dev/null +++ b/i18n/rus/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "onPreviewStyleLoadError": "Не удалось загрузить 'markdown.styles': {0}" +} \ No newline at end of file diff --git a/i18n/rus/extensions/markdown/package.i18n.json b/i18n/rus/extensions/markdown/package.i18n.json index d3ac28369f50b..9583a03ad7738 100644 --- a/i18n/rus/extensions/markdown/package.i18n.json +++ b/i18n/rus/extensions/markdown/package.i18n.json @@ -16,5 +16,7 @@ "markdown.previewSide.title": "Открыть область предварительного просмотра сбоку", "markdown.showSource.title": "Показать источник", "markdown.styles.dec": "Список URL-адресов или локальных путей к таблицам стилей CSS, используемых из области предварительного просмотра файла Markdown. Относительные пути интерпретируются относительно папки, открытой в проводнике. Если папка не открыта, они интерпретируются относительно расположения файла Markdown. Все символы '\\' должны записываться в виде '\\\\'.", - "markdown.showPreviewSecuritySelector.title": "Изменить параметры безопасности для предварительного просмотра Markdown" + "markdown.showPreviewSecuritySelector.title": "Изменить параметры безопасности для предварительного просмотра Markdown", + "markdown.preview.enableExperimentalExtensionApi.desc": "[Экспериментальная функция] Разрешить расширениям расширять предварительный просмотр Markdown.", + "markdown.trace.desc": "Включить ведение журнала отладки для расширения Markdown." } \ No newline at end of file diff --git a/i18n/rus/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/rus/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..8b8980ff83392 --- /dev/null +++ b/i18n/rus/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "acceptCurrentChange": "Принять текущее изменение", + "acceptIncomingChange": "Принять входящее изменение", + "acceptBothChanges": "Принять оба изменения", + "compareChanges": "Сравнить изменения" +} \ No newline at end of file diff --git a/i18n/rus/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/rus/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..8dfda28c73532 --- /dev/null +++ b/i18n/rus/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "cursorNotInConflict": "Курсор не находится на конфликте объединения", + "compareChangesTitle": "{0}: текущие изменения ⟷ входящие изменения", + "cursorOnSplitterRange": "Курсор редактора находится на разделителе блока объединения конфликтов. Переместите его в блок \"Текущее\" или \"Входящее\"", + "noConflicts": "Конфликтов объединения в этом файле не обнаружено", + "noOtherConflictsInThisFile": "Других конфликтов объединения в этом файле не обнаружено" +} \ No newline at end of file diff --git a/i18n/rus/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/rus/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..19166bea62947 --- /dev/null +++ b/i18n/rus/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "currentChange": "(текущее изменение)", + "incomingChange": "(входящее изменение)" +} \ No newline at end of file diff --git a/i18n/rus/extensions/merge-conflict/package.i18n.json b/i18n/rus/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..209c32b7d11b4 --- /dev/null +++ b/i18n/rus/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "command.category": "Объединить конфликт", + "command.accept.all-incoming": "Принять все входящие", + "command.accept.all-both": "Принять все входящие и текущие", + "command.accept.current": "Принять текущее", + "command.accept.incoming": "Принять входящее", + "command.accept.selection": "Принять выделенное", + "command.accept.both": "Принять оба", + "command.next": "Следующий конфликт", + "command.previous": "Предыдущий конфликт", + "command.compare": "Сравнить текущий конфликт", + "config.title": "Объединить конфликт", + "config.codeLensEnabled": "Включить/отключить блок объединения конфликтов CodeLens в редакторе", + "config.decoratorsEnabled": "Включить/отключить декораторы объединения конфликтов в редакторе" +} \ No newline at end of file diff --git a/i18n/rus/extensions/npm/package.i18n.json b/i18n/rus/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..48afb646815e1 --- /dev/null +++ b/i18n/rus/extensions/npm/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.npm.autoDetect": "Включает или отключает автоматическое определение сценариев npm. Значение по умолчанию — \"включено\"." +} \ No newline at end of file diff --git a/i18n/rus/extensions/php/package.i18n.json b/i18n/rus/extensions/php/package.i18n.json index b16d4c3729eb0..f722b3cf8cbb0 100644 --- a/i18n/rus/extensions/php/package.i18n.json +++ b/i18n/rus/extensions/php/package.i18n.json @@ -9,5 +9,6 @@ "configuration.validate.executablePath": "Указывает на исполняемый файл PHP.", "configuration.validate.run": "Запускается ли анализатор кода при сохранении или при печати.", "configuration.title": "PHP", - "commands.categroy.php": "PHP" + "commands.categroy.php": "PHP", + "command.untrustValidationExecutable": "Запретить исполняемый файл проверки PHP (определяется как параметр рабочей области)" } \ No newline at end of file diff --git a/i18n/rus/extensions/typescript/out/features/bufferSyncSupport.i18n.json b/i18n/rus/extensions/typescript/out/features/bufferSyncSupport.i18n.json index 9107be78385c6..14d34e0b45e8d 100644 --- a/i18n/rus/extensions/typescript/out/features/bufferSyncSupport.i18n.json +++ b/i18n/rus/extensions/typescript/out/features/bufferSyncSupport.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "versionMismatch": "Обнаружено несоответствие глобального tsc ({0}) и службы языка VS Code ({1}). Это может привести к ошибкам согласованности компиляции.", "moreInformation": "Дополнительные сведения", "doNotCheckAgain": "Больше не проверять", "close": "Закрыть", diff --git a/i18n/rus/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/rus/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json new file mode 100644 index 0000000000000..5c9f3c06ffc8d --- /dev/null +++ b/i18n/rus/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ts-check": "Включает семантическую проверку в JavaScript файле. Необходимо расположить в самом начале файла.", + "ts-nocheck": "Отключает семантическую проверку в JavaScript файле. Необходимо расположить в самом начале файла.", + "ts-ignore": "Отключает вывод ошибок @ts-check для следующей строки файла." +} \ No newline at end of file diff --git a/i18n/rus/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/rus/extensions/typescript/out/typescriptServiceClient.i18n.json index 43c18c9ae3a9e..bda2060f08735 100644 --- a/i18n/rus/extensions/typescript/out/typescriptServiceClient.i18n.json +++ b/i18n/rus/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -4,9 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "restartTsServerTitle": "Перезапустить", - "later": "Позже", - "channelName": "TypeScript", "noServerFound": "Путь {0} не указывает на допустимый файл программы установки tsserver. Выполняется откат до пакетной версии TypeScript.", "noBundledServerFound": "Файл tsserver VSCode был удален другим приложением, например, в результате ошибочного срабатывания средства обнаружения вирусов. Переустановите VSCode.", "versionNumber.custom": "пользовательский", @@ -17,6 +14,8 @@ "learnMore": "Дополнительные сведения", "selectTsVersion": "Выберите версию TypeScript, используемую для языковых функций JavaScript и TypeScript.", "typescript.openTsServerLog.notSupported": "Для ведения журнала сервера TS требуется TS 2.2.2+", + "typescript.openTsServerLog.loggingNotEnabled": "Вход в TS Server отключен. Задайте \"typescript.tsserver.log\" и перезагрузите VS Code, чтобы включить ведение журнала", + "typescript.openTsServerLog.enableAndReloadOption": "Войдите и перезагрузите TS server", "typescript.openTsServerLog.noLogFile": "Сервер TS не начал ведение журнала.", "openTsServerLog.openFileFailedFailed": "Не удалось открыть файл журнала сервера TS", "serverDiedAfterStart": "Языковая служба TypeScript пять раз завершила работу сразу после запуска. Служба не будет перезапущена.", diff --git a/i18n/rus/extensions/typescript/out/utils/logger.i18n.json b/i18n/rus/extensions/typescript/out/utils/logger.i18n.json new file mode 100644 index 0000000000000..bc738f43d0c37 --- /dev/null +++ b/i18n/rus/extensions/typescript/out/utils/logger.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "channelName": "TypeScript" +} \ No newline at end of file diff --git a/i18n/rus/extensions/typescript/out/utils/projectStatus.i18n.json b/i18n/rus/extensions/typescript/out/utils/projectStatus.i18n.json index 212caa515a98f..436675958f9c5 100644 --- a/i18n/rus/extensions/typescript/out/utils/projectStatus.i18n.json +++ b/i18n/rus/extensions/typescript/out/utils/projectStatus.i18n.json @@ -6,7 +6,6 @@ { "hintExclude": "Чтобы включить языковые функции JavaScript/TypeScript IntelliSense во всем проекте, исключите папки с большим числом файлов, например: {0}.", "hintExclude.generic": "Чтобы включить языковые функции JavaScript/TypeScript IntelliSense во всем проекте, исключите большие папки с исходными файлами, с которыми вы не работаете.", - "open": "Настройка исключений", "large.label": "Настройка исключений", "hintExclude.tooltip": "Чтобы включить языковые функции JavaScript/TypeScript IntelliSense во всем проекте, исключите большие папки с исходными файлами, с которыми вы не работаете." } \ No newline at end of file diff --git a/i18n/rus/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/rus/extensions/typescript/out/utils/typingsStatus.i18n.json index 506fc2b22fb21..8df62bae15bed 100644 --- a/i18n/rus/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/rus/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "installingPackages": "Получение данных для повышения эффективности IntelliSense TypeScript", + "typesInstallerInitializationFailed.title": "Не удалось установить файлы типизации для языка JavaScript. Убедитесь, что NPM установлен или укажите путь к файлу 'typescript.npm' в параметрах среды пользователя", "typesInstallerInitializationFailed.moreInformation": "Дополнительные сведения", "typesInstallerInitializationFailed.doNotCheckAgain": "Больше не проверять", "typesInstallerInitializationFailed.close": "Закрыть" diff --git a/i18n/rus/extensions/typescript/package.i18n.json b/i18n/rus/extensions/typescript/package.i18n.json index 7440e4fab2340..ac2e8ab343ad8 100644 --- a/i18n/rus/extensions/typescript/package.i18n.json +++ b/i18n/rus/extensions/typescript/package.i18n.json @@ -11,7 +11,8 @@ "typescript.tsdk.desc": "Указывает путь к папке, содержащей файлы tsserver и lib*.d.ts, которые необходимо использовать.", "typescript.disableAutomaticTypeAcquisition": "Отключает автоматическое получение типа. Требуется TypeScript 2.0.6 и более поздней версии и перезапуск после его изменения.", "typescript.check.tscVersion": "Проверка отличия компилятора TypeScript глобальной установки (например, tsc) от используемой языковой службы TypeScript.", - "typescript.tsserver.experimentalAutoBuild": "Включает экспериментальную автосборку. Требуется версия 1.9 dev или версия 2.x tsserver и перезапуск VS Code после изменения.", + "typescript.tsserver.log": "Включает ведение журнала для сервера TS. Этот журнал можно использовать для диагностики проблем сервера TS. В журнале могут содержаться пути к файлам, исходный код и другие сведения из вашего проекта, в том числе носящие конфиденциальный характер.", + "typescript.tsserver.trace": "Включает трассировку сообщений, отправляемых на сервер TS. Эту трассировку можно использовать для диагностики проблем сервера TS. Трассировка может содержать пути к файлам, исходный код и другие сведения из вашего проекта, в том числе конфиденциальные данные.", "typescript.validate.enable": "Включение или отключение проверки TypeScript.", "typescript.format.enable": "Включение или отключение модуля форматирования TypeScript по умолчанию.", "javascript.format.enable": "Включение или отключение модуля форматирования JavaScript по умолчанию.", @@ -23,6 +24,7 @@ "format.insertSpaceBeforeFunctionParenthesis": "Определяет метод обработки пробелов перед скобками аргумента функции. Требует TypeScript >= 2.1.5.", "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": "Определяет метод обработки пробелов после открытия и до закрытия непустых круглых скобок.", "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": "Определяет метод обработки пробелов после открытия и до закрытия непустых квадратных скобок.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": "Определяет метод обработки пробелов после открытия и до закрытия непустых скобок. Требуется TypeScript 2.3.0 или более поздней версии.", "format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": "Определяет метод обработки пробелов после открытия и до закрытия скобок в строке шаблона. Требуется TypeScript 2.0.6 или более поздней версии.", "format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": "Определяет метод обработки пробелов после открытия и до закрытия скобок выражения JSX. Требуется TypeScript 2.0.6 или более поздней версии.", "format.placeOpenBraceOnNewLineForFunctions": "Определяет, ставится ли открывающая фигурная скобка с новой строки в функциях.", @@ -30,6 +32,16 @@ "javascript.validate.enable": "Включение или отключение проверки JavaScript.", "typescript.goToProjectConfig.title": "Перейти к конфигурации проекта", "javascript.goToProjectConfig.title": "Перейти к конфигурации проекта", - "typescript.openTsServerLog.title": "Открытие файла журнала сервера TS", - "typescript.selectTypeScriptVersion.title": "Выберите версию TypeScript." + "javascript.referencesCodeLens.enabled": "Включить/отключить ссылки CodeLens для файлов JavaScript.", + "typescript.referencesCodeLens.enabled": "Включить/отключить ссылки CodeLens для файлов TypeScript. Требуется TypeScript версии 2.0.6 или более поздней версии.", + "typescript.implementationsCodeLens.enabled": "Включить или отключить CodeLens для реализаций. Требуется TypeScript >= 2.2.0.", + "typescript.openTsServerLog.title": "Открыть журнал сервера TS", + "typescript.restartTsServer": "Перезапустить сервер TS", + "typescript.selectTypeScriptVersion.title": "Выберите версию TypeScript.", + "jsDocCompletion.enabled": "Включить или отключить JSDoc коментарии", + "javascript.implicitProjectConfig.checkJs": "Включает/отключает семантическую проверку файлов JavaScript. Этот параметр может переопределяться в файле jsconfig.json или tsconfig.json. Требуется TypeScript 2.3.1 или более поздней версии.", + "typescript.npm": "Указывает путь к исполняемому файлу NPM, используемому для автоматического получения типа. Требуется TypeScript версии 2.3.4 или более поздней версии.", + "typescript.check.npmIsInstalled": "Проверяет, установлен ли NPM для автоматического получения типов.", + "javascript.nameSuggestions": "Включить/отключить использование уникальных имен из файла в списках предложений JavaScript.", + "typescript.tsc.autoDetect": "Включает или отключает автоматическое определние заданий tsc." } \ No newline at end of file diff --git a/i18n/rus/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/rus/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index af5b0c29d70d2..3ef6f2cac9f8b 100644 --- a/i18n/rus/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/rus/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,8 +6,7 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "Изображение слишком велико для отображения в редакторе. ", - "resourceOpenExternalButton": "Открыть изображение", - "resourceOpenExternalText": " с помощью внешней программы?", + "resourceOpenExternalButton": "Открыть изображение с помощью внешней программы?", "nativeBinaryError": "Файл не будет отображен в редакторе, так как он двоичный, очень большой или использует неподдерживаемую кодировку текста.", "sizeB": "{0} Б", "sizeKB": "{0} КБ", diff --git a/i18n/rus/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/rus/src/vs/base/common/jsonErrorMessages.i18n.json new file mode 100644 index 0000000000000..ec94fb830233e --- /dev/null +++ b/i18n/rus/src/vs/base/common/jsonErrorMessages.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error.invalidSymbol": "Недопустимый символ", + "error.invalidNumberFormat": "Недопустимый числовой формат", + "error.propertyNameExpected": "Требуется имя свойства", + "error.valueExpected": "Требуется значение", + "error.colonExpected": "Требуется двоеточие", + "error.commaExpected": "Требуется запятая", + "error.closeBraceExpected": "Требуется закрывающая фигурная скобка", + "error.closeBracketExpected": "Требуется закрывающая квадратная скобка", + "error.endOfFileExpected": "Ожидается конец файла" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/base/common/keybindingLabels.i18n.json b/i18n/rus/src/vs/base/common/keybindingLabels.i18n.json new file mode 100644 index 0000000000000..94c6d7cf755f0 --- /dev/null +++ b/i18n/rus/src/vs/base/common/keybindingLabels.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ctrlKey": "CTRL", + "shiftKey": "SHIFT", + "altKey": "ALT", + "windowsKey": "Клавиша Windows", + "ctrlKey.long": "CTRL", + "shiftKey.long": "SHIFT", + "altKey.long": "ALT", + "cmdKey.long": "Команда", + "windowsKey.long": "Клавиша Windows" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/code/electron-main/menus.i18n.json b/i18n/rus/src/vs/code/electron-main/menus.i18n.json index 611a20ee363e5..f50c1219cfce5 100644 --- a/i18n/rus/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/rus/src/vs/code/electron-main/menus.i18n.json @@ -5,13 +5,16 @@ // Do not edit this file. It is machine generated. { "mFile": "&&Файл", - "mEdit": "&&Изменить", - "mSelection": "&&Выделений", + "mEdit": "&&Правка", + "mSelection": "&&Выделение", + "mView": "&&Вид", + "mGoto": "&&Перейти", "mDebug": "&&Отладка", "mWindow": "Окно", "mHelp": "&&Справка", "miNewWindow": "&&Новое окно", "mAbout": "О программе {0}", + "mServices": "Службы", "mHide": "Скрыть {0}", "mHideOthers": "Скрыть другие", "mShowAll": "Показать все", @@ -29,6 +32,7 @@ "miCloseWindow": "Закрыть &&окно", "miCloseFolder": "Закрыть &&папку", "miCloseEditor": "&&Закрыть редактор", + "miExit": "В&&ыход", "miOpenSettings": "&&Параметры", "miOpenKeymap": "&&Сочетания клавиш", "miOpenKeymapExtensions": "&&Расширения раскладки клавиатуры", @@ -40,6 +44,7 @@ "miClearRecentOpen": "Очистить последние файлы", "miUndo": "Отменить", "miRedo": "Вернуть", + "miCut": "Вы&&резать", "miCopy": "Копировать", "miPaste": "Вставить", "miFind": "Найти", @@ -65,7 +70,7 @@ "miSmartSelectShrink": "&&Сжать выделение", "miViewExplorer": "Проводник", "miViewSearch": "Поиск", - "miViewGit": "&&Git", + "miViewSCM": "S&&CM", "miViewDebug": "Отладка", "miViewExtensions": "Р&&асширения", "miToggleOutput": "Вывод", @@ -93,6 +98,7 @@ "miZoomIn": "&&Увеличить", "miZoomOut": "У&&меньшить", "miZoomReset": "&&Сбросить масштаб", + "miBack": "&&Назад", "miForward": "&&Вперед", "miNextEditor": "&&Следующий редактор", "miPreviousEditor": "&&Предыдущий редактор", @@ -109,6 +115,8 @@ "miGotoSymbolInFile": "Перейти к &&символу в файле...", "miGotoSymbolInWorkspace": "Перейти к символу в &&рабочей области...", "miGotoDefinition": "Перейти к &&определению", + "miGotoTypeDefinition": "Перейти к &&определению типа", + "miGotoImplementation": "Перейти к &&реализации", "miGotoLine": "Перейти к &&строке...", "miStartDebugging": "&&Запустить отладку", "miStartWithoutDebugging": "Начать &&без отладки", @@ -125,15 +133,17 @@ "miColumnBreakpoint": "Т&&очка останова столбца", "miFunctionBreakpoint": "&&Точка останова функции...", "miNewBreakpoint": "&&Новая точка останова", + "miEnableAllBreakpoints": "Включить все точки останова", "miDisableAllBreakpoints": "Отключить &&все точки останова", "miRemoveAllBreakpoints": "&&Удалить &&все точки останова", + "miInstallAdditionalDebuggers": "У&&становить дополнительные отладчики...", "mMinimize": "Свернуть", - "mClose": "Закрыть", "mBringToFront": "Переместить все на передний план", "miToggleDevTools": "&&Показать/скрыть средства разработчика", "miAccessibilityOptions": "Специальные &&возможности", "miReportIssues": "&&Сообщить о проблемах", "miWelcome": "&&Приветствие", + "miInteractivePlayground": "&&Интерактивная площадка", "miDocumentation": "&&Документация", "miReleaseNotes": "&&Заметки о выпуске", "miKeyboardShortcuts": "С&&правочник по сочетаниям клавиш", @@ -143,7 +153,7 @@ "miLicense": "Просмотреть &&лицензию", "miPrivacyStatement": "&&Заявление о конфиденциальности", "miAbout": "&&О программе", - "miRestartToUpdate": "Перезапустить для обновления...", + "accessibilityOptionsWindowTitle": "Специальные возможности", "miCheckingForUpdates": "Идет проверка наличия обновлений...", "miDownloadUpdate": "Скачать доступное обновление", "miDownloadingUpdate": "Скачивается обновление...", diff --git a/i18n/rus/src/vs/code/electron-main/windows.i18n.json b/i18n/rus/src/vs/code/electron-main/windows.i18n.json index 6a621782e32d1..eefa41d8a329b 100644 --- a/i18n/rus/src/vs/code/electron-main/windows.i18n.json +++ b/i18n/rus/src/vs/code/electron-main/windows.i18n.json @@ -7,7 +7,6 @@ "ok": "ОК", "pathNotExistTitle": "Путь не существует.", "pathNotExistDetail": "Путь \"{0}\" больше не существует на диске.", - "accessibilityOptionsWindowTitle": "Специальные возможности", "reopen": "Открыть повторно", "wait": "Подождать", "close": "Закрыть", @@ -15,8 +14,6 @@ "appStalledDetail": "Вы можете повторно открыть окно, закрыть его или продолжить ожидание.", "appCrashed": "Сбой окна", "appCrashedDetail": "Приносим извинения за неудобство! Вы можете повторно открыть окно, чтобы продолжить работу с того места, на котором остановились.", - "newWindow": "Новое окно", - "newWindowDesc": "Открывает новое окно", - "recentFolders": "Недавно использованные папки", - "folderDesc": "{0} {1}" + "openFile": "Открыть файл", + "openFolder": "Открыть папку" } \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/browser/widget/diffEditorWidget.i18n.json b/i18n/rus/src/vs/editor/browser/widget/diffEditorWidget.i18n.json index 8b6ad71cd4e6d..8319f2c9379fa 100644 --- a/i18n/rus/src/vs/editor/browser/widget/diffEditorWidget.i18n.json +++ b/i18n/rus/src/vs/editor/browser/widget/diffEditorWidget.i18n.json @@ -3,4 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "diffEditorInserted": "Цвет фона для добавленных строк.", + "diffEditorRemoved": "Цвет фона для удаленных строк.", + "diffEditorInsertedOutline": "Цвет контура для добавленных строк.", + "diffEditorRemovedOutline": "Цвет контура для удаленных строк." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/browser/widget/diffReview.i18n.json b/i18n/rus/src/vs/editor/browser/widget/diffReview.i18n.json new file mode 100644 index 0000000000000..6f6dde161df81 --- /dev/null +++ b/i18n/rus/src/vs/editor/browser/widget/diffReview.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "Закрыть" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/rus/src/vs/editor/common/config/commonEditorConfig.i18n.json index 9b6838aa6656d..64c88138d02a2 100644 --- a/i18n/rus/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/rus/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -9,6 +9,7 @@ "fontWeight": "Управляет насыщенностью шрифта.", "fontSize": "Управляет размером шрифта в пикселях.", "lineHeight": "Управляет высотой строк. Укажите 0 для вычисления высоты строки по размеру шрифта.", + "letterSpacing": "Управляет интервалом между буквами в пикселях.", "lineNumbers": "Управляет видимостью номеров строк. Возможные значения: \"on\", \"off\" и \"relative\". Значение \"relative\" показывает количество строк, начиная с текущего положения курсора.", "rulers": "Столбцы, в которых должны отображаться вертикальные линейки", "wordSeparators": "Символы, которые будут использоваться как разделители слов при выполнении навигации или других операций, связанных со словами.", @@ -22,6 +23,8 @@ "minimap.enabled": "Определяет, отображается ли мини-карта", "minimap.renderCharacters": "Отображает фактические символы в строке вместо цветных блоков.", "minimap.maxColumn": "Ограничивает ширину мини-карты для отображения числа столбцов не больше определенного.", + "find.seedSearchStringFromSelection": "Определяет, можно ли передать строку поиска в мини-приложение поиска из текста, выделенного в редакторе", + "find.autoFindInSelection": "Определяет, будет ли снят флажок \"Поиск в выделенном\", когда в редакторе выбрано несколько символов или строк текста", "wordWrap.off": "Строки не будут переноситься никогда.", "wordWrap.on": "Строки будут переноситься по ширине окна просмотра.", "wordWrap.wordWrapColumn": "Строки будут переноситься по \"editor.wordWrapColumn\".", @@ -30,17 +33,19 @@ "wordWrapColumn": "Определяет столбец переноса редактора, если значение \"editor.wordWrap\" — \"wordWrapColumn\" или \"bounded\".", "wrappingIndent": "Управляет отступом строк с переносом по словам. Допустимые значения: \"none\", \"same\" или \"indent\".", "mouseWheelScrollSensitivity": "Множитель, используемый для параметров deltaX и deltaY событий прокрутки колесика мыши.", + "multiCursorModifier.ctrlCmd": "Соответствует клавише CTRL в Windows и Linux и клавише COMMAND в OS X.", + "multiCursorModifier.alt": "Соответствует клавише ALT в Windows и Linux и клавише OPTION в OS X.", + "multiCursorModifier": "Модификатор, который будет использоваться для добавления нескольких курсоров с помощью мыши. \"ctrlCmd\" соответствует клавише CTRL в Windows и Linux и клавише COMMAND в OS X. Жесты мыши \"Перейти к определению\" и \"Открыть ссылку\" будут изменены так, чтобы они не конфликтовали с несколькими курсорами.", "quickSuggestions.strings": "Разрешение кратких предложений в строках.", "quickSuggestions.comments": "Разрешение кратких предложений в комментариях.", "quickSuggestions.other": "Разрешение кратких предложений вне строк и комментариев.", "quickSuggestions": "Определяет, должны ли при вводе текста автоматически отображаться предложения", "quickSuggestionsDelay": "Управляет длительностью задержки (в мс), перед отображением кратких предложений.", - "parameterHints": "Включение подсказок для параметров", "autoClosingBrackets": "Определяет, должен ли редактор автоматически закрывать скобки после открытия.", "formatOnType": "Управляет параметром, определяющим, должен ли редактор автоматически форматировать строку после ввода.", "formatOnPaste": "Определяет, будет ли редактор автоматически форматировать вставленное содержимое. Модуль форматирования должен быть доступен и иметь возможность форматировать диапазон в документе.", "suggestOnTriggerCharacters": "Определяет, должны ли при вводе триггерных символов автоматически отображаться предложения.", - "acceptSuggestionOnEnter": "Определяет, будут ли предложения приниматься клавишей ВВОД в дополнение к клавише TAB. Это помогает избежать неоднозначности между вставкой новых строк и принятием предложений.", + "acceptSuggestionOnEnter": "Определяет, будут ли предложения приниматься клавишей ВВОД в дополнение к клавише TAB. Это помогает избежать неоднозначности между вставкой новых строк и принятием предложений. Значение \"smart\" означает, что при изменении текста предложения будут приниматься только при нажатии клавиши ВВОД.", "acceptSuggestionOnCommitCharacter": "Определяет, будут ли предложения приниматься символами фиксации. Например, в JavaScript точка с запятой (\";\") может быть символом фиксации, принимающим предложение и вводящим данный символ.", "snippetSuggestions": "Управляет отображением фрагментов вместе с другими предложениями и их сортировкой.", "emptySelectionClipboard": "Управляет тем, копируется ли текущая строка при копировании без выделения.", @@ -62,12 +67,17 @@ "renderLineHighlight": "Определяет, должен ли редактор выделять текущую строку. Возможные значения: none, gutter, line и all.", "codeLens": "Управляет показом групп связанных элементов кода в редакторе", "folding": "Определяет, включено ли сворачивание кода в редакторе.", + "showFoldingControls": "Определяет, будут ли автоматически скрываться элементы управления свертыванием на полях.", "matchBrackets": "Выделяет соответствующие скобки при выборе одной из них.", "glyphMargin": "Управляет отображением вертикальных полей глифа в редакторе. Поля глифа в основном используются для отладки.", "useTabStops": "Вставка и удаление пробелов после позиции табуляции", "trimAutoWhitespace": "Удалить автоматически вставляемый конечный пробел", "stablePeek": "Оставлять быстрые редакторы открытыми, даже если дважды щелкнуто их содержимое или нажата клавиша ESC.", "dragAndDrop": "Определяет, следует ли редактору разрешить перемещение выделенных элементов с помощью перетаскивания.", + "accessibilitySupport.auto": "Редактор будет определять, подключено ли средство чтения с экрана, с помощью API-интерфейсов платформы.", + "accessibilitySupport.on": "Редактор будет оптимизирован для использования со средством чтения с экрана в постоянном режиме.", + "accessibilitySupport.off": "Редактор никогда не будет оптимизироваться для использования со средством чтения с экрана.", + "accessibilitySupport": "Определяет, следует ли запустить редактор в режиме оптимизации для средства чтения с экрана.", "sideBySide": "Определяет, как редактор несовпадений отображает отличия: рядом или в тексте.", "ignoreTrimWhitespace": "Определяет, должен ли редактор несовпадений трактовать несовпадения символов-разделителей как различия.", "renderIndicators": "Определяет отображение редактором несовпадений индикаторов +/- для добавленных или удаленных изменений", diff --git a/i18n/rus/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/rus/src/vs/editor/common/config/editorOptions.i18n.json new file mode 100644 index 0000000000000..38312a5dea7ca --- /dev/null +++ b/i18n/rus/src/vs/editor/common/config/editorOptions.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "accessibilityOffAriaLabel": "Редактор сейчас недоступен. Чтобы открыть список действий, нажмите ALT+F1.", + "editorViewAccessibleLabel": "Содержимое редактора" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/common/services/bulkEdit.i18n.json b/i18n/rus/src/vs/editor/common/services/bulkEdit.i18n.json index 547ede9558e2f..fc197d1c5c6b0 100644 --- a/i18n/rus/src/vs/editor/common/services/bulkEdit.i18n.json +++ b/i18n/rus/src/vs/editor/common/services/bulkEdit.i18n.json @@ -4,5 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "conflict": "Следующие файлы были изменены: {0}" + "conflict": "Следующие файлы были изменены: {0}", + "summary.0": "Нет изменений", + "summary.nm": "Сделано изменений {0} в {1} файлах", + "summary.n0": "Сделано изменений {0} в одном файле" } \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/rus/src/vs/editor/common/view/editorColorRegistry.i18n.json index 84955b080fe0b..0292dc310ce95 100644 --- a/i18n/rus/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/rus/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -10,5 +10,15 @@ "caret": "Цвет курсора редактора.", "editorWhitespaces": "Цвет пробелов в редакторе.", "editorIndentGuides": "Цвет направляющих для отступов редактора.", - "editorLineNumbers": "Цвет номеров строк редактора." + "editorLineNumbers": "Цвет номеров строк редактора.", + "editorRuler": "Цвет линейки редактора.", + "editorCodeLensForeground": "Цвет переднего плана элемента CodeLens в редакторе", + "editorBracketMatchBackground": "Цвет фона парных скобок", + "editorBracketMatchBorder": "Цвет прямоугольников парных скобок", + "editorOverviewRulerBorder": "Цвет границы для линейки в окне просмотра.", + "editorGutter": "Цвет фона поля в редакторе. В поле размещаются отступы глифов и номера строк.", + "errorForeground": "Цвет волнистой линии для выделения ошибок в редакторе.", + "errorBorder": "Цвет границ волнистой линии для выделения ошибок в редакторе.", + "warningForeground": "Цвет волнистой линии для выделения предупреждений в редакторе.", + "warningBorder": "Цвет границ волнистой линии для выделения предупреждений в редакторе." } \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/find/common/findController.i18n.json b/i18n/rus/src/vs/editor/contrib/find/common/findController.i18n.json index 69fbb81b34d9b..fbe127a6eb426 100644 --- a/i18n/rus/src/vs/editor/contrib/find/common/findController.i18n.json +++ b/i18n/rus/src/vs/editor/contrib/find/common/findController.i18n.json @@ -14,6 +14,6 @@ "addSelectionToPreviousFindMatch": "Добавить выделенный фрагмент в предыдущее найденное совпадение", "moveSelectionToNextFindMatch": "Переместить последнее выделение в следующее найденное совпадение", "moveSelectionToPreviousFindMatch": "Переместить последний выделенный фрагмент в предыдущее найденное совпадение", - "selectAllOccurencesOfFindMatch": "Выбрать все вхождения найденных совпадений", + "selectAllOccurrencesOfFindMatch": "Выбрать все вхождения найденных совпадений", "changeAll.label": "Изменить все вхождения" } \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/format/browser/formatActions.i18n.json b/i18n/rus/src/vs/editor/contrib/format/browser/formatActions.i18n.json index d1fd1741e7486..ccda24f006150 100644 --- a/i18n/rus/src/vs/editor/contrib/format/browser/formatActions.i18n.json +++ b/i18n/rus/src/vs/editor/contrib/format/browser/formatActions.i18n.json @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "hint11": "Made 1 formatting edit on line {0}", - "hintn1": "Made {0} formatting edits on line {1}", - "hint1n": "Made 1 formatting edit between lines {0} and {1}", - "hintnn": "Made {0} formatting edits between lines {1} and {2}", - "formatDocument.label": "Format Document", - "formatSelection.label": "Format Selection" + "hint11": "Внесена одна правка форматирования в строке {0}.", + "hintn1": "Внесены правки форматирования ({0}) в строке {1}.", + "hint1n": "Внесена одна правка форматирования между строками {0} и {1}.", + "hintnn": "Внесены правки форматирования ({0}) между строками {1} и {2}.", + "formatDocument.label": "Форматировать документ", + "formatSelection.label": "Форматировать выбранный фрагмент" } \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/rus/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..e61942e5d18e7 --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "Определение для \"{0}\" не найдено.", + "generic.noResults": "Определения не найдены.", + "meta.title": " — определения {0}", + "actions.goToDecl.label": "Перейти к определению", + "actions.goToDeclToSide.label": "Открыть определение сбоку", + "actions.previewDecl.label": "Показать определение", + "goToImplementation.noResultWord": "Не найдена реализация для \"{0}\".", + "goToImplementation.generic.noResults": "Не найдена реализация.", + "meta.implementations.title": "— {0} реализаций", + "actions.goToImplementation.label": "Перейти к реализации", + "actions.peekImplementation.label": "Показать реализацию", + "goToTypeDefinition.noResultWord": "Не найдено определение типа для \"{0}\".", + "goToTypeDefinition.generic.noResults": "Не найдено определение типа.", + "meta.typeDefinitions.title": "— {0} определений типов", + "actions.goToTypeDefinition.label": "Перейти к определению типа", + "actions.peekTypeDefinition.label": "Показать определение типа" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/rus/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..a403ef380f2f7 --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "Щелкните, чтобы отобразить определения ({0})." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/hover/browser/hover.i18n.json b/i18n/rus/src/vs/editor/contrib/hover/browser/hover.i18n.json index 1140ec28ea068..61fdcdb90de91 100644 --- a/i18n/rus/src/vs/editor/contrib/hover/browser/hover.i18n.json +++ b/i18n/rus/src/vs/editor/contrib/hover/browser/hover.i18n.json @@ -4,8 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "showHover": "Показать при наведении", - "hoverHighlight": "Выделение под словом, для которого показано наведение.", - "hoverBackground": "Цвет фона при наведении указателя на редактор.", - "hoverBorder": "Цвет границ при наведении указателя на редактор." + "showHover": "Показать при наведении" } \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/links/browser/links.i18n.json b/i18n/rus/src/vs/editor/contrib/links/browser/links.i18n.json index c2c9343c9c540..9260a3d43678b 100644 --- a/i18n/rus/src/vs/editor/contrib/links/browser/links.i18n.json +++ b/i18n/rus/src/vs/editor/contrib/links/browser/links.i18n.json @@ -6,6 +6,7 @@ { "links.navigate.mac": "Щелкните с нажатой клавишей Cmd, чтобы перейти по ссылке", "links.navigate": "Щелкните с нажатой клавишей Ctrl, чтобы перейти по ссылке", + "links.navigate.al": "Щелкните с нажатой клавишей ALT, чтобы перейти по ссылке.", "invalid.url": "Не удалось открыть ссылку, так как она имеет неправильный формат: {0}", "missing.url": "Не удалось открыть ссылку, у нее отсутствует целевой объект.", "label": "Открыть ссылку" diff --git a/i18n/rus/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/rus/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index 93d50bf6761d6..95c9ccbe774e3 100644 --- a/i18n/rus/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/rus/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -4,5 +4,9 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "aria.result.0": "Результаты не найдены" + "aria.oneReference": "ссылка в {0} в строке {1} и символе {2}", + "aria.result.0": "Результаты не найдены", + "aria.result.1": "Обнаружен 1 символ в {0}", + "aria.result.n1": "Обнаружено {0} символов в {1}", + "aria.result.nm": "Обнаружено {0} символов в {1} файлах" } \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/rus/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index bbc7f37cdf2e4..9b523c27fc1ce 100644 --- a/i18n/rus/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/rus/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -12,15 +12,16 @@ "noResults": "Результаты отсутствуют", "peekView.alternateTitle": "Ссылки", "peekViewTitleBackground": "Цвет фона области заголовка быстрого редактора.", - "peekViewTitle": "Цвет заголовка быстрого редактора.", - "peekViewTitleInfo": "Цвет сведений о заголовке быстрого редактора.", + "peekViewTitleForeground": "Цвет заголовка быстрого редактора.", + "peekViewTitleInfoForeground": "Цвет сведений о заголовке быстрого редактора.", "peekViewBorder": "Цвет границ быстрого редактора и массива.", "peekViewResultsBackground": "Цвет фона в списке результатов представления быстрого редактора.", - "peekViewResultsMatchForeground": "Передний план совпадений в списке результатов быстрого редактора.", - "peekViewResultsFileForeground": "Передний план записи файла в списке результатов быстрого редактора.", + "peekViewResultsMatchForeground": "Цвет переднего плана узлов строки в списке результатов быстрого редактора.", + "peekViewResultsFileForeground": "Цвет переднего плана узлов файла в списке результатов быстрого редактора.", "peekViewResultsSelectionBackground": "Цвет фона выбранной записи в списке результатов быстрого редактора.", "peekViewResultsSelectionForeground": "Цвет переднего плана выбранной записи в списке результатов быстрого редактора.", "peekViewEditorBackground": "Цвет фона быстрого редактора.", + "peekViewEditorGutterBackground": "Цвет фона поля в окне быстрого редактора.", "peekViewResultsMatchHighlight": "Цвет выделения совпадений в списке результатов быстрого редактора.", "peekViewEditorMatchHighlight": "Цвет выделения совпадений в быстром редакторе." } \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/rename/browser/rename.i18n.json b/i18n/rus/src/vs/editor/contrib/rename/browser/rename.i18n.json index a16315cff198d..10cdfc7238dc1 100644 --- a/i18n/rus/src/vs/editor/contrib/rename/browser/rename.i18n.json +++ b/i18n/rus/src/vs/editor/contrib/rename/browser/rename.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "no result": "Результаты отсутствуют.", + "aria": "«{0}» успешно переименован в «{1}». Сводка: {2}", "rename.failed": "Не удалось переименовать.", "rename.label": "Переименовать символ" } \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json b/i18n/rus/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json index 032e964f688d7..b93db54e42c90 100644 --- a/i18n/rus/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json +++ b/i18n/rus/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "arai.alert.snippet": "При принятии \"{0}\" был добавлен следующий текст: \"{1}\"", "suggest.trigger.label": "Переключить предложение" } \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/rus/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index fdc5d78aa6f67..ef1bb257b470e 100644 --- a/i18n/rus/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/rus/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -4,10 +4,15 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "editorSuggestWidgetBackground": "Цвет фона виджета подсказок.", + "editorSuggestWidgetBorder": "Цвет границ виджета подсказок.", + "editorSuggestWidgetForeground": "Цвет переднего плана мини-приложения предложений.", + "editorSuggestWidgetSelectedBackground": "Фоновый цвет выбранной записи в мини-приложении предложений.", + "editorSuggestWidgetHighlightForeground": "Цвет выделения соответствия в мини-приложении предложений.", "readMore": "Подробнее...{0}", "suggestionWithDetailsAriaLabel": "{0}, предложение, содержит данные", "suggestionAriaLabel": "{0}, предложение", - "goback": "Вернуться", + "readLess": "Кратко...{0}", "suggestWidget.loading": "Идет загрузка...", "suggestWidget.noSuggestions": "Предложения отсутствуют.", "suggestionAriaAccepted": "{0}, принято", diff --git a/i18n/rus/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/rus/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json index 103258a862574..ddeb7dc0a6842 100644 --- a/i18n/rus/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json +++ b/i18n/rus/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -15,5 +15,9 @@ "schema.brackets": "Определяет символы скобок, увеличивающие или уменьшающие отступ.", "schema.autoClosingPairs": "Определяет пары скобок. Когда введена открывающая скобка, автоматически добавляется закрывающая.", "schema.autoClosingPairs.notIn": "Определяет список областей, где автоматические пары отключены.", - "schema.surroundingPairs": "Определяет пары скобок, в которые заключается выбранная строка." + "schema.surroundingPairs": "Определяет пары скобок, в которые заключается выбранная строка.", + "schema.wordPattern": "Определение слова для языка.", + "schema.wordPattern.pattern": "Шаблон регулярного выражения, используемый для сопоставления слов.", + "schema.wordPattern.flags": "Флаги регулярного выражения, используемого для сопоставления слов.", + "schema.wordPattern.flags.errorMessage": "Должно соответствовать шаблону \"/^([gimuy]+)$/\"." } \ No newline at end of file diff --git a/i18n/rus/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/rus/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json index 7221481729a28..6b77834c3913b 100644 --- a/i18n/rus/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json +++ b/i18n/rus/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -21,6 +21,8 @@ "menus.scmTitle": "Меню заголовков для системы управления версиями", "menus.resourceGroupContext": "Контекстное меню группы ресурсов для системы управления версиями", "menus.resourceStateContext": "Контекстное меню состояния ресурсов для системы управления версиями", + "view.viewTitle": "Меню заголовка для окна участников", + "view.itemContext": "Контекстное меню элемента для окна участников", "nonempty": "требуется непустое значение.", "opticon": "Свойство icon может быть пропущено или должно быть строкой или литералом, например \"{dark, light}\"", "requireStringOrObject": "Свойство \"{0}\" обязательно и должно иметь тип \"string\" или \"object\"", diff --git a/i18n/rus/src/vs/platform/configuration/common/configurationRegistry.i18n.json b/i18n/rus/src/vs/platform/configuration/common/configurationRegistry.i18n.json index a3aa6c07cb60f..40cf0c76f1f2e 100644 --- a/i18n/rus/src/vs/platform/configuration/common/configurationRegistry.i18n.json +++ b/i18n/rus/src/vs/platform/configuration/common/configurationRegistry.i18n.json @@ -7,13 +7,6 @@ "defaultConfigurations.title": "Переопределения конфигурации по умолчанию", "overrideSettings.description": "Настройка переопределяемых параметров редактора для языка {0}.", "overrideSettings.defaultDescription": "Настройка параметров редактора, переопределяемых для языка.", - "vscode.extension.contributes.configuration": "Добавляет параметры конфигурации.", - "vscode.extension.contributes.configuration.title": "Краткая сводка параметров. Эта метка будет использоваться в файле параметров в качестве разделяющего комментария.", - "vscode.extension.contributes.configuration.properties": "Описание свойств конфигурации.", "config.property.languageDefault": "Невозможно зарегистрировать \"{0}\". Оно соответствует шаблону свойства '\\\\[.*\\\\]$' для описания параметров редактора, определяемых языком. Используйте участие configurationDefaults.", - "config.property.duplicate": "Невозможно зарегистрировать \"{0}\". Это свойство уже зарегистрировано.", - "invalid.properties": "configuration.properties должно быть объектом", - "invalid.type": "Если тип configuration.type задан, то он должен иметь значение object", - "invalid.title": "configuration.title должно быть строкой", - "vscode.extension.contributes.defaultConfiguration": "Предоставляет параметры конфигурации редактора по умолчанию в соответствии с языком." + "config.property.duplicate": "Невозможно зарегистрировать \"{0}\". Это свойство уже зарегистрировано." } \ No newline at end of file diff --git a/i18n/rus/src/vs/platform/environment/node/argv.i18n.json b/i18n/rus/src/vs/platform/environment/node/argv.i18n.json index 0c42ab8ee0159..962ca99076ba6 100644 --- a/i18n/rus/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/rus/src/vs/platform/environment/node/argv.i18n.json @@ -20,6 +20,7 @@ "showVersions": "Показать версии установленных расширений при указании параметра --list-extension.", "installExtension": "Устанавливает расширение.", "uninstallExtension": "Удаляет расширение.", + "experimentalApis": "Включает предложенные функции API для расширения.", "disableExtensions": "Отключить все установленные расширения.", "disableGPU": "Отключить аппаратное ускорение GPU.", "version": "Печать версии.", diff --git a/i18n/rus/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/rus/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index fae3024afe1e2..1cc3bfcebce6b 100644 --- a/i18n/rus/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/rus/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -14,6 +14,12 @@ "vscode.extension.contributes": "Все публикации расширения VS Code, представленные этим пакетом.", "vscode.extension.preview": "Добавляет метку \"Предварительная версия\" для расширения в Marketplace.", "vscode.extension.activationEvents": "События активации для расширения кода VS Code.", + "vscode.extension.activationEvents.onLanguage": "Событие активации выдается каждый раз, когда открывается файл, который разрешается к указанному языку.", + "vscode.extension.activationEvents.onCommand": "Событие активации выдается каждый раз при вызове указанной команды.", + "vscode.extension.activationEvents.onDebug": "Событие активации выдается каждый раз при запуске сеанса отладки указанного типа.", + "vscode.extension.activationEvents.workspaceContains": "Событие активации выдается каждый раз при открытии папки, содержащей по крайней мере один файл, который соответствует указанной стандартной маске.", + "vscode.extension.activationEvents.onView": "Событие активации выдается каждый раз при развертывании указанного окна.", + "vscode.extension.activationEvents.star": "Событие активации выдается при запуске VS Code. Для удобства пользователя используйте это событие в своем расширении только в том случае, если другие сочетания событий не подходят.", "vscode.extension.badges": "Массив эмблем, отображаемых на боковой панели страницы расширения Marketplace.", "vscode.extension.badges.url": "URL-адрес изображения эмблемы.", "vscode.extension.badges.href": "Ссылка на эмблему.", diff --git a/i18n/rus/src/vs/platform/history/electron-main/historyMainService.i18n.json b/i18n/rus/src/vs/platform/history/electron-main/historyMainService.i18n.json new file mode 100644 index 0000000000000..f3243b5f3b96d --- /dev/null +++ b/i18n/rus/src/vs/platform/history/electron-main/historyMainService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "newWindow": "Новое окно", + "newWindowDesc": "Открывает новое окно", + "recentFolders": "Недавно использованные папки", + "folderDesc": "{0} {1}" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/rus/src/vs/platform/markers/common/problemMatcher.i18n.json index 3d34238d89c00..4fc108f4eb95f 100644 --- a/i18n/rus/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/rus/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -34,7 +34,7 @@ "ProblemMatcherParser.noValidIdentifier": "Ошибка: свойство шаблона {0} не является допустимым именем переменной шаблона.", "ProblemMatcherParser.problemPattern.watchingMatcher": "В сопоставителе проблем должны быть определены как начальный, так и конечный шаблоны для отслеживания.", "ProblemMatcherParser.invalidRegexp": "Ошибка: строка {0} не является допустимым регулярным выражением.\n", - "WatchingPatternSchema.regexp": "Регулярное выражение для обнаружения начала или конца задачи наблюдения.", + "WatchingPatternSchema.regexp": "Регулярное выражение для обнаружения начала или конца фоновой задачи.", "WatchingPatternSchema.file": "Индекс группы сопоставления для имени файла. Может быть опущен.", "PatternTypeSchema.name": "Имя добавленного или предопределенного шаблона", "PatternTypeSchema.description": "Шаблон проблем либо имя добавленного или предопределенного шаблона проблем. Его можно опустить, если указано базовое значение.", @@ -43,14 +43,18 @@ "ProblemMatcherSchema.severity": "Серьезность по умолчанию для выявленных проблем. Используется, если в шаблоне не определена группа сопоставления для серьезности.", "ProblemMatcherSchema.applyTo": "Определяет, относится ли проблема, о которой сообщается для текстового документа, только к открытым, только к закрытым или ко всем документам.", "ProblemMatcherSchema.fileLocation": "Определяет способ интерпретации имен файлов, указываемых в шаблоне проблемы.", + "ProblemMatcherSchema.background": "Шаблоны для отслеживания начала и окончания фоновой задачи.", + "ProblemMatcherSchema.background.activeOnStart": "Если задано значение true, средство мониторинга фоновых задач будет находиться в активном режиме при запуске задачи. Это аналогично выдаче строки, соответствующей шаблону начала.", + "ProblemMatcherSchema.background.beginsPattern": "При наличии соответствия в выходных данных выдается сигнал о запуске фоновой задачи.", + "ProblemMatcherSchema.background.endsPattern": "При наличии соответствия в выходных данных выдается сигнал о завершении фоновой задачи.", + "ProblemMatcherSchema.watching.deprecated": "Это свойство для отслеживания устарело. Используйте цвет фона.", + "ProblemMatcherSchema.watching": "Шаблоны для отслеживания начала и окончания шаблона отслеживания.", "ProblemMatcherSchema.watching.activeOnStart": "Если задано значение true, наблюдатель находится в активном режиме, когда задача запускается. Это равносильно выдаче строки, соответствующей шаблону начала.", "ProblemMatcherSchema.watching.beginsPattern": "При соответствии в выходных данных сообщает о запуске задачи наблюдения.", "ProblemMatcherSchema.watching.endsPattern": "При соответствии в выходных данных сообщает о завершении задачи наблюдения.", - "ProblemMatcherSchema.watching": "Шаблоны для отслеживания начала и окончания шаблона просмотра.", "LegacyProblemMatcherSchema.watchedBegin.deprecated": "Это свойство устарело. Используйте свойство просмотра.", "LegacyProblemMatcherSchema.watchedBegin": "Регулярное выражение, сообщающее о том, что отслеживаемая задача начинает выполняться в результате активации отслеживания файлов.", "LegacyProblemMatcherSchema.watchedEnd.deprecated": "Это свойство устарело. Используйте свойство просмотра.", "LegacyProblemMatcherSchema.watchedEnd": "Регулярное выражение, сообщающее о том, что отслеживаемая задача завершает выполнение.", - "NamedProblemMatcherSchema.name": "Имя сопоставителя проблем.", "ProblemMatcherExtPoint": "Публикует сопоставители проблем" } \ No newline at end of file diff --git a/i18n/rus/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/rus/src/vs/platform/theme/common/colorRegistry.i18n.json index 78d1bc291dc31..7c7f72cc80d94 100644 --- a/i18n/rus/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/rus/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -4,29 +4,80 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.color": "Недопустимый формат цвета. Используйте #RRGGBB или #RRGGBBAA", + "invalid.color": "Недопустимый формат цвета. Используйте #RGB, #RGBA, #RRGGBB или #RRGGBBAA", "schema.colors": "Цвета, используемые на рабочем месте.", "foreground": "Общий цвет переднего плана. Этот цвет используется, только если его не переопределит компонент.", - "focusedElementOutline": "Общий цвет структуры и границ для элементов с фокусом. Этот цвет используется, только если его не переопределит компонент.", - "highContrastBorder": "Цвет границ для разделения компонентов при включенной теме с высокой контрастностью.", - "highContrastOutline": "Цвет контура для активных компонентов в теме с высокой контрастностью.", + "errorForeground": "Общий цвет переднего плана для сообщений об ошибках. Этот цвет используется только если его не переопределяет компонент.", + "descriptionForeground": "Цвет текста элемента, содержащего пояснения, например, для метки.", + "focusBorder": "Общий цвет границ для элементов с фокусом. Этот цвет используется только в том случае, если не переопределен в компоненте.", + "contrastBorder": "Дополнительная граница вокруг элементов, которая отделяет их от других элементов для улучшения контраста.", + "activeContrastBorder": "Дополнительная граница вокруг активных элементов, которая отделяет их от других элементов для улучшения контраста.", + "textSeparatorForeground": "Цвет для разделителей текста.", + "textLinkForeground": "Цвет переднего плана для ссылок в тексте.", + "textLinkActiveForeground": "Цвет переднего фона для активных ссылок в тексте.", + "textPreformatForeground": "Цвет текста фиксированного формата.", + "textBlockQuoteBackground": "Цвет фона для блоков с цитатами в тексте.", + "textBlockQuoteBorder": "Цвет границ для блоков с цитатами в тексте.", + "textCodeBlockBackground": "Цвет фона для программного кода в тексте.", + "widgetShadow": "Цвет тени мини-приложений редактора, таких как \"Найти/заменить\".", "inputBoxBackground": "Фон поля ввода.", "inputBoxForeground": "Передний план поля ввода.", "inputBoxBorder": "Граница поля ввода.", "inputBoxActiveOptionBorder": "Цвет границ активированных параметров в полях ввода.", + "inputPlaceholderForeground": "Цвет фона поясняющего текста в элементе ввода.", + "inputValidationInfoBackground": "Фоновый цвет проверки ввода для уровня серьезности \"Сведения\".", + "inputValidationInfoBorder": "Цвет границы проверки ввода для уровня серьезности \"Сведения\".", + "inputValidationWarningBackground": "Фоновый цвет проверки ввода для уровня серьезности \"Предупреждение\".", + "inputValidationWarningBorder": "Цвет границы проверки ввода для уровня серьезности \"Предупреждение\".", + "inputValidationErrorBackground": "Фоновый цвет проверки ввода для уровня серьезности \"Ошибка\".", + "inputValidationErrorBorder": "Цвет границы проверки ввода для уровня серьезности \"Ошибка\".", "dropdownBackground": "Фон раскрывающегося списка.", "dropdownForeground": "Передний план раскрывающегося списка.", "dropdownBorder": "Граница раскрывающегося списка.", + "listFocusBackground": "Фоновый цвет находящегося в фокусе элемента List/Tree, когда элемент List/Tree активен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.", + "listFocusForeground": "Цвет переднего плана находящегося в фокусе элемента List/Tree, когда элемент List/Tree активен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.", + "listActiveSelectionBackground": "Фоновый цвет выбранного элемента List/Tree, когда элемент List/Tree активен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.", + "listActiveSelectionForeground": "Цвет переднего плана выбранного элемента List/Tree, когда элемент List/Tree активен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.", + "listInactiveSelectionBackground": "Фоновый цвет выбранного элемента List/Tree, когда элемент List/Tree неактивен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.", + "listInactiveSelectionForeground": "Цвет текста выбранного элемента List/Tree, когда элемент List/Tree неактивен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.", + "listHoverBackground": "Фоновый цвет элементов List/Tree при наведении курсора мыши.", + "listHoverForeground": "Цвет переднего плана элементов List/Tree при наведении курсора мыши.", + "listDropBackground": "Фоновый цвет элементов List/Tree при перемещении с помощью мыши.", + "highlight": "Цвет переднего плана для выделения соответствия при поиске по элементу List/Tree.", + "pickerGroupForeground": "Цвет средства быстрого выбора для группировки меток.", + "pickerGroupBorder": "Цвет средства быстрого выбора для группировки границ.", + "buttonForeground": "Цвет переднего плана кнопки.", + "buttonBackground": "Цвет фона кнопки.", + "buttonHoverBackground": "Цвет фона кнопки при наведении.", + "badgeBackground": "Цвет фона бэджа. Бэджи - небольшие информационные элементы, отображающие количество, например, результатов поиска.", + "badgeForeground": "Цвет текста бэджа. Бэджи - небольшие информационные элементы, отображающие количество, например, результатов поиска.", + "scrollbarShadow": "Цвет тени полосы прокрутки, которая свидетельствует о том, что содержимое прокручивается.", + "scrollbarSliderBackground": "Цвет фона ползунка.", + "scrollbarSliderHoverBackground": "Цвет фона ползунка при наведении.", + "scrollbarSliderActiveBackground": "Цвет фона активного ползунка.", + "progressBarBackground": "Цвет фона индикатора выполнения, который может отображаться для длительных операций.", "editorBackground": "Цвет фона редактора.", "editorForeground": "Цвет переднего плана редактора по умолчанию.", - "editorSelection": "Цвет выделения редактора.", + "editorWidgetBackground": "Цвет фона виджетов редактора, таких как найти/заменить.", + "editorWidgetBorder": "Цвет границы мини-приложений редактора. Этот цвет используется только в том случае, если у мини-приложения есть граница и если этот цвет не переопределен мини-приложением.", "editorInactiveSelection": "Цвет выделения в неактивном редакторе.", "editorSelectionHighlight": "Цвет регионов с тем же содержимым, что и в выделении.", "editorFindMatch": "Цвет текущего поиска совпадений.", "findMatchHighlight": "Цвет других совпадений поиска.", "findRangeHighlight": "Цвет диапазона, ограничивающего поиск.", + "hoverHighlight": "Выделение под словом, для которого показано наведение.", + "hoverBackground": "Цвет фона при наведении указателя на редактор.", + "hoverBorder": "Цвет границ при наведении указателя на редактор.", "activeLinkForeground": "Цвет активных ссылок.", - "linkForeground": "Цвет ссылок.", - "editorWidgetBackground": "Цвет фона виджетов редактора, таких как найти/заменить.", - "editorWidgetShadow": "Цвет тени виджетов редактора, таких как найти/заменить." + "diffEditorInserted": "Цвет фона для добавленных строк.", + "diffEditorRemoved": "Цвет фона для удаленных строк.", + "diffEditorInsertedOutline": "Цвет контура для добавленных строк.", + "diffEditorRemovedOutline": "Цвет контура для удаленных строк.", + "mergeCurrentHeaderBackground": "Цвет фона текущего заголовка во внутренних конфликтах слияния.", + "mergeCurrentContentBackground": "Цвет фона текущего содержимого во внутренних конфликтах слияния.", + "mergeIncomingHeaderBackground": "Цвет фона входящего заголовка во внутренних конфликтах слияния.", + "mergeIncomingContentBackground": "Цвет фона входящего содержимого во внутренних конфликтах слияния.", + "mergeBorder": "Цвет границы заголовков и разделителя во внутренних конфликтах слияния.", + "overviewRulerCurrentContentForeground": "Цвет переднего плана линейки текущего окна во внутренних конфликтах слияния.", + "overviewRulerIncomingContentForeground": "Цвет переднего плана линейки входящего окна во внутренних конфликтах слияния." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/rus/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json new file mode 100644 index 0000000000000..b44407fa3f2d1 --- /dev/null +++ b/i18n/rus/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "overwritingExtension": "Идет перезапись расширения {0} на {1}.", + "extensionUnderDevelopment": "Идет загрузка расширения разработки в {0}." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/rus/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json new file mode 100644 index 0000000000000..f2dc9ba9a205f --- /dev/null +++ b/i18n/rus/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "Закрыть", + "cancel": "Отмена", + "ok": "ОК" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/api/node/extHostExplorerView.i18n.json b/i18n/rus/src/vs/workbench/api/node/extHostExplorerView.i18n.json new file mode 100644 index 0000000000000..69ab93e32faf9 --- /dev/null +++ b/i18n/rus/src/vs/workbench/api/node/extHostExplorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "TreeExplorerNodeProvider с идентификатором \"{0}\" не зарегистрирован.", + "treeExplorer.failedToProvideRootNode": "TreeExplorerNodeProvider \"{0}\" не удалось предоставить корневой узел." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/rus/src/vs/workbench/api/node/extHostTask.i18n.json new file mode 100644 index 0000000000000..4b90a12aaf247 --- /dev/null +++ b/i18n/rus/src/vs/workbench/api/node/extHostTask.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "task.label": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/api/node/extHostTreeView.i18n.json b/i18n/rus/src/vs/workbench/api/node/extHostTreeView.i18n.json new file mode 100644 index 0000000000000..69ab93e32faf9 --- /dev/null +++ b/i18n/rus/src/vs/workbench/api/node/extHostTreeView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "TreeExplorerNodeProvider с идентификатором \"{0}\" не зарегистрирован.", + "treeExplorer.failedToProvideRootNode": "TreeExplorerNodeProvider \"{0}\" не удалось предоставить корневой узел." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/rus/src/vs/workbench/api/node/extHostTreeViews.i18n.json new file mode 100644 index 0000000000000..9f9c8f9221d82 --- /dev/null +++ b/i18n/rus/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeView.notRegistered": "Отсутствует зарегистрированное представление в виде дерева с идентификатором '{0}'.", + "treeItem.notFound": "Отсутствует элемент дерева с идентификатором '{0}'.", + "treeView.duplicateElement": "Элемент {0} уже зарегистрирован" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json b/i18n/rus/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json index 8eb0fd363dfe2..cdc81741e9ea8 100644 --- a/i18n/rus/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json +++ b/i18n/rus/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "hideActivitBar": "Скрыть панель действий", - "activityBarAriaLabel": "Переключатель активного представления" + "activityBarAriaLabel": "Переключатель активного представления", + "globalActions": "Глобальные действия" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/rus/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index 2259656b83fe2..e8ab2008c4678 100644 --- a/i18n/rus/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/rus/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -44,6 +44,8 @@ "openPreviousRecentlyUsedEditorInGroup": "Открыть предыдущий недавно использованный редактор в группе", "openNextRecentlyUsedEditorInGroup": "Открыть следующий недавно использованный редактор в группе", "navigateEditorHistoryByInput": "Открыть предыдущий редактор из журнала", + "openNextRecentlyUsedEditor": "Открыть следующий недавно использованный редактор", + "openPreviousRecentlyUsedEditor": "Открыть предыдущий недавно использованный редактор", "clearEditorHistory": "Очистить журнал редактора", "focusLastEditorInStack": "Открыть последний редактор в группе", "moveEditorLeft": "Переместить редактор влево", diff --git a/i18n/rus/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/rus/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index fe621363ede54..be54f2a8fa9ac 100644 --- a/i18n/rus/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/rus/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -10,7 +10,7 @@ "multiSelection": "Выделений: {0}", "endOfLineLineFeed": "LF", "endOfLineCarriageReturnLineFeed": "CRLF", - "tabFocusModeEnabled": "Клавиша TAB перемещает фокус", + "screenReaderDetectedExtra": "Если вы не используете средство чтения с экрана, измените значение параметра \"editor.accessibilitySupport\" на \"off\".", "disableTabMode": "Отключить режим специальных возможностей", "gotoLine": "Перейти к строке", "indentation": "Отступ", diff --git a/i18n/rus/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json b/i18n/rus/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json new file mode 100644 index 0000000000000..b00914a41677c --- /dev/null +++ b/i18n/rus/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpen": "Перейти к файлу...", + "quickNavigateNext": "Перейти к следующему элементу в Quick Open.", + "quickNavigatePrevious": "Перейти к предыдущему элементу в Quick Open.", + "quickSelectNext": "Выбрать следующее в Quick Open", + "quickSelectPrevious": "Выбрать предыдущее в Quick Open" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/browser/quickopen.i18n.json b/i18n/rus/src/vs/workbench/browser/quickopen.i18n.json index 2706fe8a1f006..b1992b59c50ff 100644 --- a/i18n/rus/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/rus/src/vs/workbench/browser/quickopen.i18n.json @@ -6,6 +6,5 @@ { "noResultsMatching": "Нет соответствующих результатов", "noResultsFound2": "Результаты не найдены", - "entryAriaLabel": "{0}, команда", - "noCommands": "Нет соответствующих команд" + "entryAriaLabel": "{0}, команда" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/browser/viewlet.i18n.json b/i18n/rus/src/vs/workbench/browser/viewlet.i18n.json index 9df902210c790..c5dc5c2265a2e 100644 --- a/i18n/rus/src/vs/workbench/browser/viewlet.i18n.json +++ b/i18n/rus/src/vs/workbench/browser/viewlet.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "collapse": "Свернуть все", - "viewToolbarAriaLabel": "Действий: {0}" + "collapse": "Свернуть все" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/common/theme.i18n.json b/i18n/rus/src/vs/workbench/common/theme.i18n.json index c1d77ad1616e7..2addbdf64784d 100644 --- a/i18n/rus/src/vs/workbench/common/theme.i18n.json +++ b/i18n/rus/src/vs/workbench/common/theme.i18n.json @@ -4,39 +4,49 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "tabsContainerBackground": "Цвет фона контейнера вкладок. Вкладки — это контейнеры для редакторов в области редакторов. В одной группе редакторов можно открыть несколько вкладок. Может быть несколько групп редакторов.", - "activeTabBackground": "Цвет фона активной вкладки. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", - "inactiveTabBackground": "Цвет фона неактивной вкладки. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", - "activeTabActiveGroupForeground": "Цвет переднего плана активной вкладки в активной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", - "activeTabInactiveGroupForeground": "Цвет переднего плана активной вкладки в неактивной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", - "inactiveTabActiveGroupForeground": "Цвет переднего плана неактивной вкладки в активной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", - "inactiveTabInactiveGroupForeground": "Цвет переднего плана неактивной вкладки в неактивной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", + "tabActiveBackground": "Цвет фона активной вкладки. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", + "tabInactiveBackground": "Цвет фона неактивной вкладки. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", "tabBorder": "Граница для разделения вкладок. Вкладки — это контейнеры для редакторов в области редакторов. В одной группе редакторов можно открыть несколько вкладок. Может быть несколько групп редакторов.", - "editorHeaderBackground": "Цвет фона заголовка редактора, если нет разрешенных вкладок.", + "tabActiveForeground": "Цвет переднего плана активной вкладки в активной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", + "tabInactiveForeground": "Цвет переднего плана неактивной вкладки в активной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", + "tabUnfocusedActiveForeground": "Цвет переднего плана активной вкладки в неактивной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", + "tabUnfocusedInactiveForeground": "Цвет переднего плана неактивной вкладки в неактивной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", + "editorGroupBackground": "Цвет фона группы редакторов. Группы редакторов представляют собой контейнеры редакторов. Цвет фона отображается при перетаскивании групп редакторов.", + "tabsContainerBackground": "Цвет фона для заголовка группы редакторов, когда вкладки включены. Группы редакторов представляют собой контейнеры редакторов.", + "tabsContainerBorder": "Цвет границы для заголовка группы редакторов, когда вкладки включены. Группы редакторов представляют собой контейнеры редакторов.", + "editorGroupHeaderBackground": "Цвет фона для заголовка группы редакторов, когда вкладки отключены. Группы редакторов представляют собой контейнеры редакторов.", "editorGroupBorder": "Цвет для разделения нескольких групп редакторов. Группы редакторов — это контейнеры редакторов.", - "editorGroupBackground": "Цвет фона в группе редакторов. Группы редакторов — это контейнеры редакторов.", - "editorDragAndDropBackground": "Цвет фона при перетаскивании редакторов.", - "editorSideBySideBorder": "Цвет границ для отделения сведений от эталонной боковой панели для параллельных редакторов.", + "editorDragAndDropBackground": "Цвет фона при перетаскивании редакторов. Этот цвет должен обладать прозрачностью, чтобы содержимое редактора оставалось видимым.", "panelBackground": "Цвет фона панели. Панели показаны под областью редактора и содержат такие представления, как выходные данные и встроенный терминал.", - "panelTopBorder": "Цвет верхней границы панели, отделяющей ее от редактора. Панели показаны под областью редактора и содержат такие представления, как выходные данные и встроенный терминал.", + "panelBorder": "Цвет верхней границы панели, отделяющей ее от редактора. Панели показаны под областью редактора и содержат такие представления, как выходные данные и встроенный терминал.", "panelActiveTitleForeground": "Цвет заголовка для активной панели. Панели отображаются под областью редактора и содержат такие представления, как окно вывода и встроенный терминал.", "panelInactiveTitleForeground": "Цвет заголовка для неактивной панели. Панели отображаются под областью редактора и содержат такие представления, как окно вывода и встроенный терминал.", "panelActiveTitleBorder": "Цвет границ для заголовка активной панели. Панели отображаются под областью редактора и содержат такие представления, как окно вывода и встроенный терминал.", "statusBarForeground": "Цвет переднего плана панели состояния. Панель состояния отображается внизу окна.", "statusBarBackground": "Цвет фона стандартной панели состояния. Панель состояния отображается внизу окна.", + "statusBarBorder": "Цвет границы строки состояния, который распространяется на боковую панель и редактор. Строка состояния расположена в нижней части окна.", "statusBarNoFolderBackground": "Цвет фона панели состояния, если папка не открыта. Панель состояния отображается внизу окна.", + "statusBarNoFolderForeground": "Цвет переднего плана строки состояния, если папка не открыта. Строка состояния отображается в нижней части окна.", "statusBarItemActiveBackground": "Цвет фона элементов панели состояния при щелчке. Панель состояния отображается внизу окна.", "statusBarItemHoverBackground": "Цвет фона элементов панели состояния при наведении. Панель состояния отображается внизу окна.", - "statusBarInfoItemBackground": "Цвет фона элементов со сведениями о панели состояния. Панель состояния отображается внизу окна.", - "statusBarInfoItemHoverBackground": "Цвет фона элементов со сведениями о панели состояния при наведении указателя. Панель состояния отображается внизу окна.", + "statusBarProminentItemBackground": "Цвет фона приоритетных элементов панели состояния. Приоритетные элементы выделяются на фоне других элементов панели состояния, чтобы подчеркнуть их значение. Панель состояния отображается в нижней части окна.", + "statusBarProminentItemHoverBackground": "Цвет фона приоритетных элементов панели состояния при наведении. Приоритетные элементы выделяются на фоне других элементов панели состояния, чтобы подчеркнуть их значение. Панель состояния отображается в нижней части окна.", "activityBarBackground": "Цвет фона панели действий. Панель действий отображается слева или справа и позволяет переключаться между представлениями боковой панели.", - "activityBarDragAndDropBackground": "Цвет обратной связи при перетаскивании для элементов панели действий. Панель действий отображается слева или справа и позволяет переключаться между представлениями боковой панели.", - "activityBadgeBackground": "Цвет фона значка уведомлений о действиях. Панель действий отображается слева или справа и позволяет переключаться между представлениями боковой панели.", - "activityBadgeForeground": "Цвет переднего плана значка уведомлений о действиях. Панель действий отображается слева или справа и позволяет переключаться между представлениями боковой панели.", + "activityBarForeground": "Цвет переднего плана панели действий (например, цвет, используемый для значков). Панель действий отображается слева или справа и позволяет переключаться между представлениями боковой панели.", + "activityBarBorder": "Цвет границы панели действий, который распространяется на боковую панель. Панель действий отображается слева или справа и позволяет переключаться между представлениями в боковой панели.", + "activityBarDragAndDropBackground": "Цвет панели обратной связи при перетаскивании для элементов панели действий. Цвет должен обладать прозрачностью, чтобы содержимое панели действий оставалось видимым. Панель действий отображается с правого или с левого края и позволяет переключаться между представлениями в боковой панели.", + "activityBarBadgeBackground": "Цвет фона значка уведомлений о действиях. Панель действий отображается слева или справа и позволяет переключаться между представлениями боковой панели.", + "activityBarBadgeForeground": "Цвет переднего плана значка уведомлений о действиях. Панель действий отображается слева или справа и позволяет переключаться между представлениями боковой панели.", "sideBarBackground": "Цвет фона боковой панели. Боковая панель — это контейнер таких представлений, как проводник и поиск.", + "sideBarForeground": "Цвет переднего плана боковой панели. Боковая панель — это контейнер для таких представлений, как проводник и поиск.", + "sideBarBorder": "Цвет границы боковой панели со стороны редактора. Боковая панель — это контейнер для таких представлений, как проводник и поиск.", "sideBarTitleForeground": "Цвет переднего плана заголовка боковой панели. Боковая панель — это контейнер для таких представлений, как проводник и поиск.", + "sideBarSectionHeaderBackground": "Цвет фона для заголовка раздела боковой панели. Боковая панель — это контейнер для таких представлений, как проводник и поиск.", + "sideBarSectionHeaderForeground": "Цвет переднего плана для заголовка раздела боковой панели. Боковая панель — это контейнер для таких представлений, как проводник и поиск.", "titleBarActiveForeground": "Передний план панели заголовка, если окно активно. Обратите внимание, что этот цвет сейчас поддерживается только в macOS.", "titleBarInactiveForeground": "Передний план панели заголовка, если окно неактивно. Обратите внимание, что этот цвет сейчас поддерживается только в macOS.", "titleBarActiveBackground": "Фон панели заголовка, если окно активно. Обратите внимание, что этот цвет сейчас поддерживается только в macOS.", - "titleBarInactiveBackground": "Фон панели заголовка, если окно неактивно. Обратите внимание, что этот цвет сейчас поддерживается только в macOS." + "titleBarInactiveBackground": "Фон панели заголовка, если окно неактивно. Обратите внимание, что этот цвет сейчас поддерживается только в macOS.", + "notificationsForeground": "Цвет переднего плана для уведомлений. Уведомления отображаются в верхней части окна.", + "notificationsBackground": "Цвет фона для уведомлений. Уведомления отображаются в верхней части окна." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/rus/src/vs/workbench/electron-browser/actions.i18n.json index 867ffadb0a4bd..5d2a1aca0bb2f 100644 --- a/i18n/rus/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/rus/src/vs/workbench/electron-browser/actions.i18n.json @@ -6,9 +6,6 @@ { "closeActiveEditor": "Закрыть редактор", "closeWindow": "Закрыть окно", - "switchWindow": "Переключить окно", - "switchWindowPlaceHolder": "Выберите окно", - "current": "Текущее окно", "closeFolder": "Закрыть папку", "noFolderOpened": "В настоящий момент в этом экземпляре нет открытой папки, которую можно было бы закрыть.", "newWindow": "Новое окно", @@ -20,7 +17,7 @@ "zoomReset": "Сбросить масштаб", "appPerf": "Производительность запуска", "reloadWindow": "Перезагрузить окно", - "openRecent": "Открыть последний", + "current": "Текущее окно", "folders": "папки", "files": "файлы", "openRecentPlaceHolderMac": "Выбрать путь (удерживайте клавишу CMD, чтобы открыть в новом окне)", @@ -32,10 +29,6 @@ "openDocumentationUrl": "Документация", "openIntroductoryVideosUrl": "Вступительные видео", "toggleSharedProcess": "Переключить общий процесс", - "navigateLeft": "Перейти к части представления слева", - "navigateRight": "Перейти к части представления справа", - "navigateUp": "Перейти к части представления вверху", - "navigateDown": "Перейти к части представления внизу", "increaseViewSize": "Увеличить размер текущего представления", "decreaseViewSize": "Уменьшить размер текущего представления" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json index 68ba046d91611..72dc992c86075 100644 --- a/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,6 +7,7 @@ "view": "Просмотреть", "help": "Справка", "file": "Файл", + "developer": "Разработчик", "showEditorTabs": "Определяет, должны ли открытые редакторы отображаться на вкладках или нет.", "editorTabCloseButton": "Определяет положение кнопок закрытия вкладок редактора или отключает их, если задано значение off.", "showIcons": "Определяет, должны ли открытые редакторы отображаться со значком. Требует включить тему значков.", @@ -20,6 +21,7 @@ "statusBarVisibility": "Управляет видимостью строки состояния в нижней части рабочего места.", "activityBarVisibility": "Управляет видимостью панели действий на рабочем месте.", "closeOnFileDelete": "Определяет, следует ли автоматически закрывать редакторы, когда отображаемый в них файл удален или переименован другим процессом. При отключении этой функции редактор остается открытым в качестве черновика. Обратите внимание, что при удалении из приложения редактор закрывается всегда и что файлы черновиков никогда не закрываются для сохранения данных.", + "swipeToNavigate": "Переключайтесь между открытыми файлами, проводя по экрану по горизонтали тремя пальцами.", "workbenchConfigurationTitle": "Workbench", "window.openFilesInNewWindow.on": "Файлы будут открываться в новом окне.", "window.openFilesInNewWindow.off": "Файлы будут открываться в окне с открытой папкой файлов или последнем активном окне.", @@ -29,29 +31,29 @@ "window.openFoldersInNewWindow.off": "Папки будут заменять последнее активное окно.", "window.openFoldersInNewWindow.default": "Папки будут открываться в новом окне, если папка не выбрана в приложении (например, в меню \"Файл\").", "openFoldersInNewWindow": "Определяет, будут ли папки открываться в новом окне или заменять последнее активное окно.\n- default: папки будут открываться в новом окне, если папка не выбрана из приложения (например, из меню \"Файл\").\n- on: папки будут открываться в новом окне.\n- off: папки будут заменять последнее активное окно.\nОбратите внимание, что возможны случаи, когда этот параметр игнорируется (например, при использовании параметра командной строки -new-window или -reuse-window).", - "window.reopenFolders.none": "Запрет повторного открытия папки.", - "window.reopenFolders.one": "Повторное открытие последней активной папки.", - "window.reopenFolders.all": "Повторное открытие всех папок последнего сеанса.", - "reopenFolders": "Управляет повторным открытием папок после перезапуска. Выберите значение \"none\", чтобы не открывать папку повторно, \"one\", чтобы открывалась последняя папка, с которой вы работали, или \"all\", чтобы открывались все папки последнего сеанса.", "restoreFullscreen": "Определяет, должно ли окно восстанавливаться в полноэкранном режиме, если оно было закрыто в полноэкранном режиме.", "zoomLevel": "Настройте масштаб окна. Исходный размер равен 0. Увеличение или уменьшение значения на 1 означает увеличение или уменьшение окна на 20 %. Чтобы более точно задать масштаб, можно также ввести десятичное число.", - "title": "Определяет заголовок окна в зависимости от активного редактора. Переменные заменяются на основании контекста.\n${activeEditorShort}: например, myFile.txt\n${activeEditorMedium}: например, myFolder/myFile.txt\n${activeEditorLong}: например, /Users/Development/myProject/myFolder/myFile.txt\n${rootName}: например, myProject\n${rootPath}: например, /Users/Development/myProject\n${appName}: например, VS Code\n${dirty}: индикатор \"грязного\", если активный редактор является \"грязным\"\n${separator}: условный разделитель (\" - \"), который отображается, только если окружен переменными со значениями.", "window.newWindowDimensions.default": "Открывать новые окна в центре экрана.", "window.newWindowDimensions.inherit": "Открывать новые окна того же размера, что и последнее активное окно.", "window.newWindowDimensions.maximized": "Открывать новые окна в развернутом состоянии.", "window.newWindowDimensions.fullscreen": "Открывать новые окна в полноэкранном режиме.", - "newWindowDimensions": "Определяет размеры открывающегося нового окна. По умолчанию новое окно небольшого размера будет открываться по центру экрана. Если задано значение inherit, окно будет открываться с теми же размерами, что и последнее активное окно. Если задано значение maximized, окно будет открываться в максимальном размере, и в полноэкранном режиме, если задано значение fullscreen.", + "newWindowDimensions": "Определяет размеры нового открывающегося окна, если по крайней мере одно окно уже открыто. По умолчанию новое окно будет открыто в центре экрана в уменьшенном размере. Если указано значение \"inherit\", размеры нового окна будут равны размерам последнего активного окна. Если указано значение \"maximized\", окно будет открыто в максимальном размере, а если указано значение \"fullscreen\", окно будет открыто в полноэкранном режиме. Обратите внимание, что этот параметр не влияет на первое открываемое окно. Размеры и расположение первого окна всегда будут совпдаать с размерами и расположением этого окна перед закрытием.", "window.menuBarVisibility.default": "Меню скрыто только в полноэкранном режиме.", "window.menuBarVisibility.visible": "Меню всегда видимо, даже в полноэкранном режиме.", "window.menuBarVisibility.toggle": "Меню скрыто, но его можно вывести с помощью клавиши ALT.", "window.menuBarVisibility.hidden": "Меню всегда скрыто.", "menuBarVisibility": "Определяет видимость строки меню. Значение toggle указывает, что строка меню скрыта и для ее вывода нужно один раз нажать клавишу ALT. По умолчанию строка меню не будет отображаться только в полноэкранном режиме.", + "enableMenuBarMnemonics": "Если этот параметр установлен, главные меню можно открыть с помощью сочетаний клавиш с клавишей ALT. Отключение назначенных клавиш позволит связать эти сочетания клавиш с клавишей ALT с командами редактора.", "autoDetectHighContrast": "Если включено, будет выполняться автоматический переход к высококонтрастной теме, если в Windows используется тема высокой контрастности, или к темной теме при выходе из темы высокой контрастности Windows.", "titleBarStyle": "Настройка внешнего вида заголовка окна. Чтобы применить изменения, потребуется полный перезапуск.", + "window.nativeTabs": "Включает вкладки окна macOS Sierra. Обратите внимание, что для применения этих изменений потребуется полная перезагрузка, и что для всех внутренних вкладок будет отключен пользовательский стиль заголовка, если он был настроен.", "windowConfigurationTitle": "Окно", "zenModeConfigurationTitle": "Режим Zen", "zenMode.fullScreen": "Определяет, будет ли переключение в режим Zen переключать рабочее пространство в полноэкранный режим.", "zenMode.hideTabs": "Определяет, будет ли включение режима Zen также скрывать вкладки рабочего места.", "zenMode.hideStatusBar": "Определяет, будет ли включение режима Zen также скрывать строку состояния в нижней части рабочего места.", - "zenMode.restore": "Определяет, должно ли окно восстанавливаться в режиме Zen, если закрылось в режиме Zen." + "zenMode.hideActivityBar": "Определяет, будет ли при включении режима Zen скрыта панель действий в левой части рабочей области.", + "zenMode.restore": "Определяет, должно ли окно восстанавливаться в режиме Zen, если закрылось в режиме Zen.", + "workspaceConfigurationTitle": "Рабочая область", + "files.exclude.boolean": "Стандартная маска, соответствующая путям к файлам. Задайте значение true или false, чтобы включить или отключить маску." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/electron-browser/shell.i18n.json b/i18n/rus/src/vs/workbench/electron-browser/shell.i18n.json index b2ec5a62b60f1..39183187ef0ca 100644 --- a/i18n/rus/src/vs/workbench/electron-browser/shell.i18n.json +++ b/i18n/rus/src/vs/workbench/electron-browser/shell.i18n.json @@ -4,9 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "runningAsRoot": "Не рекомендуется запускать код с правами администратора.", - "prof.message": "Профили успешно созданы.", - "prof.detail": "Создайте проблему и вручную вложите следующие файлы:\n{0}", - "prof.restartAndFileIssue": "Создать проблему и выполнить перезапуск", - "prof.restart": "Перезапустить" + "runningAsRoot": "Не рекомендуется запускать код с правами администратора." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/electron-browser/window.i18n.json b/i18n/rus/src/vs/workbench/electron-browser/window.i18n.json index 46ef3c781f0be..fb864141a425d 100644 --- a/i18n/rus/src/vs/workbench/electron-browser/window.i18n.json +++ b/i18n/rus/src/vs/workbench/electron-browser/window.i18n.json @@ -11,7 +11,5 @@ "paste": "Вставить", "selectAll": "Выбрать все", "confirmOpen": "Действительно открыть папки ({0})?", - "confirmOpenButton": "&&Открыть...", - "developer": "Разработчик", - "file": "Файл" + "confirmOpenButton": "&&Открыть..." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/rus/src/vs/workbench/electron-browser/workbench.i18n.json new file mode 100644 index 0000000000000..1aca4f5d59c46 --- /dev/null +++ b/i18n/rus/src/vs/workbench/electron-browser/workbench.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "developer": "Разработчик", + "file": "Файл" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json b/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json new file mode 100644 index 0000000000000..b6a2c9c7653f0 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emergencyConfOn": "Установка значения \"on\" для параметра \"editor.accessibilitySupport\".", + "openingDocs": "Открывается страница документации по специальным возможностям VS Code.", + "introMsg": "Благодарим за ознакомление со специальными возможностями VS Code.", + "status": "Состояние:", + "changeConfigToOnMac": "Чтобы включить постоянную оптимизацию редактора для использования со средствами чтения с экрана, нажмите COMMMAND+E.", + "changeConfigToOnWinLinux": "Чтобы включить постоянную оптимизацию редактора для использования со средствами чтения с экрана, нажмите CTRL+E.", + "auto_unknown": "В редакторе настроено определение средства чтения с экрана с помощью API платформы, но текущая среда выполнения это не поддерживает.", + "auto_on": "Редактор автоматически определил, что средство чтения с экрана подключено.", + "auto_off": "В редакторе настроено автоматическое определение средства чтения с экрана, но сейчас это средство не подключено.", + "configuredOn": "Постоянная оптимизацию редактора для использования со средствами чтения с экрана включена. Чтобы ее отключить, измените параметр \"editor.accessibilitySupport\".", + "configuredOff": "Для редактора не настроена оптимизация для использования со средствами чтения с экрана.", + "tabFocusModeOnMsg": "При нажатии клавиши TAB в текущем редакторе фокус ввода переместится на следующий элемент, способный его принять. Чтобы изменить это поведение, нажмите клавишу {0}.", + "tabFocusModeOnMsgNoKb": "При нажатии клавиши TAB в текущем редакторе фокус ввода переместится на следующий элемент, способный его принять. Команду {0} сейчас невозможно выполнить с помощью настраиваемого сочетания клавиш.", + "tabFocusModeOffMsg": "При нажатии клавиши TAB в текущем редакторе будет вставлен символ табуляции. Чтобы изменить это поведение, нажмите клавишу {0}.", + "tabFocusModeOffMsgNoKb": "При нажатии клавиши TAB в текущем редакторе будет вставлен символ табуляции. Команду {0} сейчас невозможно выполнить с помощью настраиваемого сочетания клавиш.", + "openDocMac": "Нажмите COMMAND+H, чтобы открыть окно браузера с дополнительными сведениями о специальных возможностях VS Code.", + "openDocWinLinux": "Нажмите CTRL+H, чтобы открыть окно браузера с дополнительными сведениями о специальных возможностях VS Code.", + "outroMsg": "Вы можете закрыть эту подсказку и вернуться в редактор, нажав клавиши ESCAPE или SHIFT+ESCAPE.", + "ShowAccessibilityHelpAction": "Показать справку по специальным возможностям" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json index c5e4314489b8e..5e643a6120328 100644 --- a/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "workbench.action.inspectKeyMap": "Developer: Inspect Key Mapppings" + "workbench.action.inspectKeyMap": "Разработчик: исследование сопоставлений ключей" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json b/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..86deb3a5055f0 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inspectTMScopes": "Разработчик: проверка областей TM", + "inspectTMScopesWidget.loading": "Идет загрузка..." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json b/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json new file mode 100644 index 0000000000000..79bbfcb71b618 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parseErrors": "Ошибок при анализе {0}: {1}", + "schema.openBracket": "Открывающий символ скобки или строковая последовательность.", + "schema.closeBracket": "Закрывающий символ скобки или строковая последовательность.", + "schema.comments": "Определяет символы комментариев", + "schema.blockComments": "Определяет способ маркировки комментариев.", + "schema.blockComment.begin": "Последовательность символов, открывающая блок комментариев.", + "schema.blockComment.end": "Последовательность символов, закрывающая блок комментариев.", + "schema.lineComment": "Последовательность символов, с которой начинается строка комментария.", + "schema.brackets": "Определяет символы скобок, увеличивающие или уменьшающие отступ.", + "schema.autoClosingPairs": "Определяет пары скобок. Когда введена открывающая скобка, автоматически добавляется закрывающая.", + "schema.autoClosingPairs.notIn": "Определяет список областей, где автоматические пары отключены.", + "schema.surroundingPairs": "Определяет пары скобок, в которые заключается выбранная строка.", + "schema.wordPattern": "Определение слова для языка.", + "schema.wordPattern.pattern": "Шаблон регулярного выражения, используемый для сопоставления слов.", + "schema.wordPattern.flags": "Флаги регулярного выражения, используемого для сопоставления слов.", + "schema.wordPattern.flags.errorMessage": "Должно соответствовать шаблону \"/^([gimuy]+)$/\".", + "schema.indentationRules.increaseIndentPattern.errorMessage": "Должно соответствовать шаблону \"/^([gimuy]+)$/\".", + "schema.indentationRules.decreaseIndentPattern.errorMessage": "Должно соответствовать шаблону \"/^([gimuy]+)$/\".", + "schema.indentationRules.indentNextLinePattern.errorMessage": "Должно соответствовать шаблону \"/^([gimuy]+)$/\".", + "schema.indentationRules.unIndentedLinePattern.errorMessage": "Должно соответствовать шаблону \"/^([gimuy]+)$/\"." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json b/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..86deb3a5055f0 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inspectTMScopes": "Разработчик: проверка областей TM", + "inspectTMScopesWidget.loading": "Идет загрузка..." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json b/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json new file mode 100644 index 0000000000000..62f29e0311a41 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "Включить или отключить режим с несколькими курсорами" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index d73136084f240..fca987ec80324 100644 --- a/i18n/rus/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -6,6 +6,7 @@ { "openLaunchJson": "Открыть {0}", "launchJsonNeedsConfigurtion": "Настройте или исправьте \"launch.json\"", + "noFolderDebugConfig": "Чтобы перейти к расширенной конфигурации отладки, сначала откройте папку.", "startDebug": "Начать отладку", "startWithoutDebugging": "Начать без отладки", "selectAndStartDebugging": "Выбрать и начать отладку", @@ -34,6 +35,7 @@ "editConditionalBreakpoint": "Изменить точку останова…", "setValue": "Задать значение", "addWatchExpression": "Добавить выражение", + "editWatchExpression": "Изменить выражение", "addToWatchExpressions": "Добавить контрольное значение", "removeWatchExpression": "Удалить выражение", "removeAllWatchExpressions": "Удалить все выражения", diff --git a/i18n/rus/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json new file mode 100644 index 0000000000000..6543390a263a3 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugToolBarBackground": "Цвет фона для панели инструментов отладки." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json new file mode 100644 index 0000000000000..fab9558d4c225 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileLinkMac": "Щелкните, чтобы отслеживать (чтобы открыть сбоку экрана, щелкните, удерживая клавишу CMD)", + "fileLink": "Щелкните, чтобы отслеживать (чтобы открыть сбоку экрана, щелкните, удерживая клавишу CTRL)" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/common/debug.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/common/debug.i18n.json new file mode 100644 index 0000000000000..7f2fb6520d00d --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/debug/common/debug.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "internalConsoleOptions": "Управляет поведением внутренней консоли отладки." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/common/debugModel.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/common/debugModel.i18n.json index 2253dc04d4642..efe04de8244e1 100644 --- a/i18n/rus/src/vs/workbench/parts/debug/common/debugModel.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/debug/common/debugModel.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "unknownSource": "Неизвестный источник", "notAvailable": "недоступно", - "startDebugFirst": "Чтобы произвести вычисление, начните сеанс отладки", - "unknownStack": "Неизвестное расположение стека" + "startDebugFirst": "Чтобы произвести вычисление, начните сеанс отладки" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/common/debugSource.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/common/debugSource.i18n.json new file mode 100644 index 0000000000000..e8f58d654cd3c --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/debug/common/debugSource.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownSource": "Неизвестный источник" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json index a0a2e36433563..9c4ea4ee97580 100644 --- a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -15,5 +15,6 @@ "allowBreakpointsEverywhere": "Разрешает задание точки останова в любом файле", "openExplorerOnEnd": "Автоматически открывать представление обозревателя в конце сеанса отладки", "inlineValues": "Показывать значения переменных в редакторе во время отладки", - "hideActionBar": "Определяет, следует ли скрыть всплывающую панель действий отладки." + "hideActionBar": "Определяет, следует ли скрыть всплывающую панель действий отладки.", + "launch": "Глобальная конфигурация запуска отладки. Должна использоваться в качестве альтернативы для конфигурации \"launch.json\", которая является общей для рабочих пространств" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json new file mode 100644 index 0000000000000..aa388e9709f74 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noFolderDebugConfig": "Перед расширенной настройкой отладки откройте папку." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index 4dceb7811c075..342aae775b878 100644 --- a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -5,8 +5,8 @@ // Do not edit this file. It is machine generated. { "snapshotObj": "Для этого объекта показаны только значения-примитивы.", - "debuggingStarted": "Отладка началась.", "debuggingPaused": "Отладка была приостановлена, причина {0}, {1} {2}", + "debuggingStarted": "Отладка началась.", "debuggingStopped": "Отладка остановилась.", "breakpointAdded": "Добавлена точка останова: строка {0}, файл {1}", "breakpointRemoved": "Удалена точка останова: строка {0}, файл {1}", diff --git a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json index c4b97bcfe108d..3f8d10ed5bd10 100644 --- a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json @@ -6,5 +6,6 @@ { "copyValue": "Копировать значение", "copy": "Копировать", + "copyAll": "Копировать все", "copyStackTrace": "Копировать стек вызовов" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json index 188f271b73e43..4c742d270df2d 100644 --- a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json @@ -5,8 +5,6 @@ // Do not edit this file. It is machine generated. { "stateCapture": "Состояние объекта записывается после первого вычисления", - "fileLinkMac": "Щелкните, чтобы отслеживать (чтобы открыть сбоку экрана, щелкните, удерживая клавишу CMD)", - "fileLink": "Щелкните, чтобы отслеживать (чтобы открыть сбоку экрана, щелкните, удерживая клавишу CTRL)", "replVariableAriaLabel": "Переменная \"{0}\" имеет значение \"{1}\", read–eval–print loop, отладка", "replExpressionAriaLabel": "Выражение \"{0}\" имеет значение \"{1}\", read–eval–print loop, отладка", "replValueOutputAriaLabel": "{0}, read–eval–print loop, отладка", diff --git a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json index fa2fb421cfc1d..bf63a86ed4abb 100644 --- a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "statusBarDebuggingBackground": "Цвет фона панели состояния при отладке программы. Панель состояния показана внизу окна." + "statusBarDebuggingBackground": "Цвет фона панели состояния при отладке программы. Панель состояния показана внизу окна.", + "statusBarDebuggingForeground": "Цвет переднего плана строки состояния при отладке программы. Строка состояния расположена в нижней части окна." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index 88d355f7a2728..109e9178c2dd0 100644 --- a/i18n/rus/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,12 +7,12 @@ "debugAdapterBinNotFound": "Исполняемый файл адаптера отладки \"{0}\" не существует.", "debugAdapterCannotDetermineExecutable": "Невозможно определить исполняемый файл для адаптера отладки \"{0}\".", "debugType": "Тип конфигурации.", + "debugTypeNotRecognised": "Не удается распознать тип отладки. Убедитесь, что соответствующее расширение отладки установлено и включено.", "node2NotSupported": "Значение \"node2\" больше не поддерживается; используйте \"node\" и задайте для атрибута \"protocol\" значение \"inspector\".", "debugName": "Имя конфигурации; отображается в раскрывающемся меню конфигурации запуска.", "debugRequest": "Запросите тип конфигурации. Возможные типы: \"запуск\" и \"подключение\".", "debugServer": "Только для разработки расширений отладки: если указан порт, VS Code пытается подключиться к адаптеру отладки, запущенному в режиме сервера.", "debugPrelaunchTask": "Задача, выполняемая перед началом сеанса отладки.", - "internalConsoleOptions": "Управляет поведением внутренней консоли отладки.", "debugWindowsConfiguration": "Атрибуты конфигурации запуска для Windows.", "debugOSXConfiguration": "Атрибуты конфигурации запуска для OS X.", "debugLinuxConfiguration": "Атрибуты конфигурации запуска для Linux.", diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json new file mode 100644 index 0000000000000..6f2d64eeffbc2 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "balanceInward": "Emmet: баланс (входящий)", + "balanceOutward": "Emmet: баланс (исходящий)" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json new file mode 100644 index 0000000000000..c7a704d95062a --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "previousEditPoint": "Emmet: перейти к предыдущей точке изменения", + "nextEditPoint": "Emmet: перейти к следующей точке изменения" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json new file mode 100644 index 0000000000000..24098651eac22 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "evaluateMathExpression": "Emmet: вычисление математического выражения" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json new file mode 100644 index 0000000000000..982ec32564920 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "expandAbbreviationAction": "Emmet: расшифровать аббревиатуру" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json new file mode 100644 index 0000000000000..1befe3f226483 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "incrementNumberByOneTenth": "Emmet: увеличение значения на 0,1", + "incrementNumberByOne": "Emmet: увеличение значения на 1", + "incrementNumberByTen": "Emmet: увеличение значения на 10", + "decrementNumberByOneTenth": "Emmet: уменьшение значения на 0,1", + "decrementNumberByOne": "Emmet: уменьшение значения на 1", + "decrementNumberByTen": "Emmet: уменьшение значения на 10" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json new file mode 100644 index 0000000000000..526b5d5303f6a --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "matchingPair": "Emmet: перейти к соответствующей паре" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json new file mode 100644 index 0000000000000..81f00b3edbc22 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mergeLines": "Emmet: объединение строк" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json new file mode 100644 index 0000000000000..4673022a248ed --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reflectCSSValue": "Emmet: отражение значения CSS" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json new file mode 100644 index 0000000000000..99b383ac90242 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeTag": "Emmet: удаление тега" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json new file mode 100644 index 0000000000000..50ca8bd70b770 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "selectPreviousItem": "Emmet: выбор предыдущего элемента", + "selectNextItem": "Emmet: выбор следующего элемента" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json new file mode 100644 index 0000000000000..b2b30614cea20 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "splitJoinTag": "Emmet: разделение и объединение тегов" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json new file mode 100644 index 0000000000000..0bb940b0c93a9 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleComment": "Emmet: переключение комментариев" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json new file mode 100644 index 0000000000000..8c273b41250e2 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateImageSize": "Emmet: изменение размера изображения" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json new file mode 100644 index 0000000000000..3c3bd54c27aca --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateTag": "Emmet: изменение тега", + "enterTag": "Ввод тега", + "tag": "Тег" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json new file mode 100644 index 0000000000000..f493f727ad3e0 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wrapWithAbbreviationAction": "Emmet: перенос с сокращением", + "enterAbbreviation": "Ввод сокращения", + "abbreviation": "Сокращение" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json new file mode 100644 index 0000000000000..92ea6283604db --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emmetConfigurationTitle": "Emmet", + "triggerExpansionOnTab": "Если включено, сокращения Emmet разворачиваются при нажатии клавиши TAB.", + "emmetPreferences": "Настройки, которые используются для изменения поведения некоторых действий и сопоставителей Emmet.", + "emmetSyntaxProfiles": "Задайте профиль для указанного синтаксиса или используйте свой собственный профиль с определенными правилами.", + "emmetExclude": "Массив языков, в которых не должны развертываться сокращения Emmet.", + "emmetExtensionsPath": "Путь к папке, содержащей профили Emmet, фрагменты кода и настройки", + "useNewEmmet": "Попробуйте новые модули emmet (которые в конечном итоге заменят устаревшую библиотеку emmet), чтобы ознакомиться со всеми функциями emmet." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index 86d73dd73f7e7..2322bd36fa802 100644 --- a/i18n/rus/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -4,10 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "vscode.extension.contributes.explorer": "Добавляет в боковую панель настраиваемое мини-приложение обозревателя дерева", - "vscode.extension.contributes.explorer.treeExplorerNodeProviderId": "Уникальный идентификатор, используемый для обозначения поставщика, зарегистрированного при помощи vscode.workspace.registerTreeExplorerNodeProvider.", - "vscode.extension.contributes.explorer.treeLabel": "Понятная для пользователей строка, используемая для отображения настраиваемого обозревателя дерева", - "vscode.extension.contributes.explorer.icon": "Путь к значку деморолика на панели действий", + "vscode.extension.contributes.view": "Добавляет пользовательское представление", + "vscode.extension.contributes.view.id": "Уникальный идентификатор представления, созданного с помощью vscode.workspace.createTreeView", + "vscode.extension.contributes.view.label": "Строка для отображения представления в понятном для пользователя формате", + "vscode.extension.contributes.view.icon": "Путь к значку представления", + "vscode.extension.contributes.views": "Добавляет пользовательские представления", "showViewlet": "Показать {0}", "view": "Просмотреть" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index c74eca64051a2..fd46efd995448 100644 --- a/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -24,6 +24,10 @@ "default": "По умолчанию", "debuggers": "Отладчики ({0})", "debugger name": "Имя", + "views": "Представления ({0})", + "view id": "Идентификатор", + "view name": "Имя", + "view location": "Где", "themes": "Темы ({0})", "JSON Validation": "Проверка JSON ({0})", "commands": "Команды ({0})", diff --git a/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index 34a96c349af3c..b01a24938599c 100644 --- a/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -22,6 +22,8 @@ "disableGloballyAction": "Всегда", "disableAction": "Отключить", "checkForUpdates": "Проверка обновлений", + "enableAutoUpdate": "Включить автоматическое обновление расширений", + "disableAutoUpdate": "Отключить автоматическое обновление расширений", "updateAll": "Обновить все расширения", "reloadAction": "Перезагрузка", "postUpdateTooltip": "Обновление окна для обновления", @@ -44,6 +46,8 @@ "showWorkspaceRecommendedExtensions": "Показать рекомендуемые расширения рабочей области", "showRecommendedKeymapExtensions": "Показать рекомендуемые раскладки клавиатуры", "showRecommendedKeymapExtensionsShort": "Раскладки клавиатуры", + "showLanguageExtensions": "Показать расширения языка", + "showLanguageExtensionsShort": "Расширения языка", "configureWorkspaceRecommendedExtensions": "Настроить рекомендуемые расширения (рабочая область)", "ConfigureWorkspaceRecommendations.noWorkspace": "Рекомендации доступны только для папки рабочей области.", "OpenExtensionsFile.failed": "Не удается создать файл \"extensions.json\" в папке \".vscode\" ({0}).", @@ -51,5 +55,8 @@ "disableAll": "Отключить все установленные расширения", "disableAllWorkspace": "Отключить все установленные расширения для этой рабочей области", "enableAll": "Включить все установленные расширения", - "enableAllWorkspace": "Включить все установленные расширения для этой рабочей области" + "enableAllWorkspace": "Включить все установленные расширения для этой рабочей области", + "extensionButtonProminentBackground": "Цвет фона кнопок, соответствующих основным действиям расширения (например, кнопка \"Установить\").", + "extensionButtonProminentForeground": "Цвет переднего плана кнопок, соответствующих основным действиям расширения (например, кнопка \"Установить\").", + "extensionButtonProminentHoverBackground": "Цвет фона кнопок, соответствующих основным действиям расширения, при наведении мыши (например, кнопка \"Установить\")." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index 6d9a00632d2a4..e02b293c5761a 100644 --- a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -4,8 +4,13 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "reallyRecommended2": "Для этого типа файлов рекомендуется использовать расширение '{0}'.", "showRecommendations": "Показать рекомендации", "neverShowAgain": "Больше не показывать", "close": "Закрыть", - "workspaceRecommended": "Эта рабочая область включает рекомендации по расширениям." + "workspaceRecommended": "Эта рабочая область включает рекомендации по расширениям.", + "ignoreExtensionRecommendations": "Вы действительно хотите проигнорировать все рекомендации по расширениям?", + "ignoreAll": "Да, игнорировать все", + "no": "Нет", + "cancel": "Отмена" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index 2796f4f1c1fe2..957fb1a214bbe 100644 --- a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -10,5 +10,6 @@ "extensions": "Расширения", "view": "Просмотреть", "extensionsConfigurationTitle": "Расширения", - "extensionsAutoUpdate": "Автоматически обновлять расширения" + "extensionsAutoUpdate": "Автоматически обновлять расширения", + "extensionsIgnoreRecommendations": "Игнорировать рекомендации по расширениям" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json new file mode 100644 index 0000000000000..0d3592d30b4af --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "disableOtherKeymapsConfirmation": "Отключить другие раскладки клавиатуры ({0}), чтобы избежать конфликта между настраиваемыми сочетаниями клавиш?", + "yes": "Да", + "no": "Нет", + "betterMergeDisabled": "В текущую версию встроено средство слияния с лучшей функциональностью. Установленное расширение было отключено и не может быть удалено.", + "uninstall": "Удаление", + "later": "Позже" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json index 183b5ea953517..7e671d447e7b6 100644 --- a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json @@ -5,10 +5,10 @@ // Do not edit this file. It is machine generated. { "searchExtensions": "Поиск расширений в Marketplace", - "extensions": "Расширения", "sort by installs": "Сортировать по: числу установок", "sort by rating": "Сортировать по: рейтинг", - "no extensions found": "Расширений не найдено.", + "sort by name": "Сортировать по: название", "suggestProxyError": "Marketplace вернул значение \"ECONNREFUSED\". Проверьте параметр \"http.proxy\".", + "extensions": "Расширения", "outdatedExtensions": "Устаревшие расширения: {0}" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json new file mode 100644 index 0000000000000..c4dd2b4125161 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensions": "Расширения", + "no extensions found": "Расширений не найдено.", + "suggestProxyError": "Marketplace вернул значение \"ECONNREFUSED\". Проверьте параметр \"http.proxy\"." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json index cf526dd246b84..2fc77f708ecf5 100644 --- a/i18n/rus/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json @@ -13,5 +13,6 @@ "cancel": "Отмена", "singleDependentError": "Невозможно отключить расширение \"{0}\". От него зависит расширение \"{1}\".", "twoDependentsError": "Невозможно отключить расширение \"{0}\". От него зависят расширения \"{1}\" и \"{2}\".", - "multipleDependentsError": "Невозможно отключить расширение \"{0}\". От него зависят расширения \"{1}\", \"{2}\" и другие." + "multipleDependentsError": "Невозможно отключить расширение \"{0}\". От него зависят расширения \"{1}\", \"{2}\" и другие.", + "install": "Установить" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index a548f83b670c7..d84604cea239f 100644 --- a/i18n/rus/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,7 +16,7 @@ "associations": "Настройте сопоставления файлов с языками (например, \"*.extension\": \"html\"). У них будет приоритет перед заданными по умолчанию сопоставлениями установленных языков.", "encoding": "Кодировка набора символов по умолчанию, используемая при чтении и записи файлов", "autoGuessEncoding": "Если параметр включен, производится попытка определить кодировку набора символов при открытии файлов", - "eol": "Символ конца строки по умолчанию.", + "eol": "Символ конца строки по умолчанию. Используйте \\n для LF и \\r\\n для CRLF.", "trimTrailingWhitespace": "Если этот параметр включен, при сохранении файла будут удалены концевые пробелы.", "insertFinalNewline": "Если этот параметр включен, при сохранении файла в его конец вставляется финальная новая строка.", "files.autoSave.off": "\"Грязный\" файл не сохраняется автоматически.", @@ -25,10 +25,8 @@ "files.autoSave.onWindowChange": "\"Грязный\" файл автоматически сохраняется при потере фокуса окном.", "autoSave": "Управляет автоматическим сохранением \"грязных\" файлов. Допустимые значения: \"{0}\", \"{1}\", \"{2}\" (редактор теряет фокус) и \"{3}\" (окно теряет фокус). Если задано значение \"{4}\", можно настроить задержку в \"files.autoSaveDelay\".", "autoSaveDelay": "Определяет задержку в мс, после которой измененный файл сохраняется автоматически. Действует, только если параметр \"files.autoSave\" имеет значение \"{0}\".", - "watcherExclude": "Настройте стандартные маски путей файлов, чтобы исключить их из списка отслеживаемых файлов. После изменения этого параметра потребуется перезагрузка. При отображении сообщения \"Код потребляет большое количество процессорного времени при запуске\" вы можете исключить большие папки, чтобы уменьшить первоначальную загрузку.", "hotExit.off": "Отключите \"горячий\" выход.", - "hotExit.onExit": "\"Горячий\" выход будет активирован при закрытии приложения, то есть когда закрывается последнее окно в Windows или Linux или при активации команды workbench.action.quit (палитра команд, настраиваемое сочетание клавиш, меню). Все окна с резервными копиями будут восстановлены при следующем запуске.", - "hotExit.onExitAndWindowClose": "\"Горячий\" выход будет активирован при закрытии приложения, то есть когда закрывается последнее окно в Windows или Linux или при активации команды workbench.action.quit (палитра команд, настраиваемое сочетание клавиш, меню) и в любых окнах, где открыта папка, даже если это не последнее окно. Окна без открытых папок будут восстановлены при следующем запуске. Чтобы восстановить окна с папками, перед завершением работы задайте для \"window.reopenFolders\" значение \"all\".", + "hotExit.onExit": "Функция \"горячий выход\" будет активирована при закрытии приложения, то есть при закрытии последнего окна в Windows или Linux или при активации команды workbench.action.quit (палитра команд, настраиваемое сочетание клавиш, меню). Все окна с резервными копиями будут восстановлены при следующем запуске.", "hotExit": "Определяет, запоминаются ли несохраненные файлы между сеансами. В этом случае приглашение на их сохранение при выходе из редактора не появляется.", "defaultLanguage": "Режим языка по умолчанию, который назначается новым файлам.", "editorConfigurationTitle": "Редактор", diff --git a/i18n/rus/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json b/i18n/rus/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json index bc922bbc4b04c..109bbf5c6cdcf 100644 --- a/i18n/rus/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json @@ -11,5 +11,6 @@ "genericSaveError": "Не удалось сохранить \"{0}\": {1}", "staleSaveError": "Не удалось сохранить \"{0}\": содержимое на диске более новое. Чтобы сравнить свою версию с версией на диске, нажмите **Сравнить**.", "compareChanges": "Сравнить", + "saveConflictDiffLabel": "{0} (на диске) ↔ {1} (в {2}) - Разрешить конфликт сохранения", "userGuide": "Используйте команды на панели инструментов для **отмены** изменений или **перезаписи** содержимого на диске" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json b/i18n/rus/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json index 6926e676b12d4..5eb9bd6927b8e 100644 --- a/i18n/rus/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "explorerSection": "Раздел проводника", "noWorkspace": "Нет открытой папки", + "explorerSection": "Раздел проводника", "noWorkspaceHelp": "Вы еще не открыли папку.", "openFolder": "Открыть папку" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json b/i18n/rus/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json index 57e8e68aedc82..908990efe61ce 100644 --- a/i18n/rus/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "openEditosrSection": "Раздел открытых редакторов", "openEditors": "Открытые редакторы", + "openEditosrSection": "Раздел открытых редакторов", "treeAriaLabel": "Открытые редакторы: список активных файлов", "dirtyCounter": "Не сохранено: {0}" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index ef99a2ea9f3d3..c5024f1f1d0ff 100644 --- a/i18n/rus/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -5,5 +5,11 @@ // Do not edit this file. It is machine generated. { "slow": "Обнаружен замедленный запуск.", - "slow.detail": "Сожалеем, что у вас произошел замедленный запуск. Перезапустите \"{0}\" с включенным профилированием и отправьте профили нам, чтобы мы могли ускорить загрузку." + "slow.detail": "Сожалеем, что у вас произошел замедленный запуск. Перезапустите \"{0}\" с включенным профилированием и отправьте профили нам, чтобы мы могли ускорить загрузку.", + "prof.message": "Профили успешно созданы.", + "prof.detail": "Создайте проблему и вручную вложите следующие файлы:\n{0}", + "prof.restartAndFileIssue": "Создать проблему и выполнить перезапуск", + "prof.restart": "Перезапустить", + "prof.thanks": "Спасибо за помощь.", + "prof.detail.restart": "Для продолжения работы с '{0}' необходимо еще раз перезагрузить систему. Благодарим вас за участие." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json index 29ff1ceed65ca..4338bc61e7b6a 100644 --- a/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -7,6 +7,7 @@ "keybindingsInputName": "Сочетания клавиш", "SearchKeybindings.AriaLabel": "Поиск настраиваемых сочетаний клавиш", "SearchKeybindings.Placeholder": "Поиск настраиваемых сочетаний клавиш", + "sortByPrecedene": "Сортировать по приоритету", "header-message": "Для использования расширенных настроек откройте и измените", "keybindings-file-name": "keybindings.json", "keybindingsLabel": "Настраиваемые сочетания клавиш", @@ -14,6 +15,7 @@ "addLabel": "Добавить настраиваемое сочетание клавиш", "removeLabel": "Удаление настраиваемого сочетания клавиш", "resetLabel": "Сбросить настраиваемое сочетание клавиш", + "showConflictsLabel": "Показать конфиликты", "copyLabel": "Копировать", "error": "Произошла ошибка \"{0}\" при редактировании настраиваемого сочетания клавиш. Откройте и проверьте файл \"keybindings.json\".", "command": "Команда", diff --git a/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index 9023a755fd9c7..41c45ab216ed5 100644 --- a/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -5,7 +5,7 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.start": "Определить назначение клавиш", - "defineKeybinding.kbLayoutInfoMessage": "Для текущей раскладки клавиатуры нажмите ", "defineKeybinding.kbLayoutErrorMessage": "Вы не сможете нажать это сочетание клавиш в текущей раскладке клавиатуры.", - "DefineKeybindingAction": "Определить назначение клавиш" + "defineKeybinding.kbLayoutLocalAndUSMessage": "**{0}** для текущей раскладки клавиатуры (**{1}** для стандартной раскладки клавиатуры \"Английский, США\")", + "defineKeybinding.kbLayoutLocalMessage": "**{0}** для текущей раскладки клавиатуры." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index dd62a90ff3e8e..b82ad2f758e37 100644 --- a/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -6,6 +6,7 @@ { "openGlobalSettings": "Открыть пользовательские параметры", "openGlobalKeybindings": "Открыть сочетания клавиш", + "openGlobalKeybindingsFile": "Открыть файл сочетаний клавиш", "openWorkspaceSettings": "Открыть параметры рабочей области", "configureLanguageBasedSettings": "Настроить параметры языка...", "languageDescriptionConfigured": "({0})", diff --git a/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index 234e294922c98..cb2ad503913c3 100644 --- a/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "errorInvalidConfiguration": "Не удается записать параметры. Устраните ошибки и предупреждения в файле и повторите попытку.", + "defaultSettingsTitle": "Параметры по умолчанию", "editTtile": "Изменить", "replaceDefaultValue": "Заменить в параметрах", "copyDefaultValue": "Копировать в параметры", diff --git a/i18n/rus/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json b/i18n/rus/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json index 2ecce32e28ae1..01326f09a14a7 100644 --- a/i18n/rus/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json @@ -5,5 +5,7 @@ // Do not edit this file. It is machine generated. { "default": "По умолчанию", - "user": "Пользователь" + "user": "Пользователь", + "meta": "meta", + "option": "параметр" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json b/i18n/rus/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json index f6f0bf572b20a..12bcf3ccba9e1 100644 --- a/i18n/rus/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "showTriggerActions": "Показать все команды", + "showCommands.label": "Палитра команд...", "entryAriaLabelWithKey": "{0}, {1}, команды", "entryAriaLabel": "{0}, команды", "canNotRun": "Выполнить команду {0} отсюда невозможно.", diff --git a/i18n/rus/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json new file mode 100644 index 0000000000000..155d4022b8eaa --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "relaunchSettingMessage": "После изменения параметра необходима выполнить перезагрузку, чтобы изменения вступили в силу.", + "relaunchSettingDetail": "Нажмите кнопку \"Перезагрузить\", чтобы перезагрузить {0} и включить параметр.", + "restart": "Перезапустить", + "reload": "Перезагрузка" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/rus/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json new file mode 100644 index 0000000000000..ce6c4c198e536 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGutterModifiedBackground": "Цвет фона полей редактора для измененных строк.", + "editorGutterAddedBackground": "Цвет фона полей редактора для добавленных строк.", + "editorGutterDeletedBackground": "Цвет фона полей редактора для удаленных строк." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json index 029a91dd1211a..ba48b09e26359 100644 --- a/i18n/rus/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "toggleGitViewlet": "Показать GIT", + "installAdditionalSCMProviders": "Установить дополнительных поставщиков SCM...", "source control": "Система управления версиями", "toggleSCMViewlet": "Показать SCM", "view": "Просмотреть" diff --git a/i18n/rus/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json b/i18n/rus/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json index 0d1ad24f725d3..f345f2df7faa2 100644 --- a/i18n/rus/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "installAdditionalSCMProviders": "Установить дополнительных поставщиков SCM...", "switch provider": "Переключить поставщик SCM..." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/search/browser/replaceService.i18n.json b/i18n/rus/src/vs/workbench/parts/search/browser/replaceService.i18n.json index 8b6ad71cd4e6d..7f4464d3a78f7 100644 --- a/i18n/rus/src/vs/workbench/parts/search/browser/replaceService.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/search/browser/replaceService.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "fileReplaceChanges": "{0} ↔ {1} (заменить предварительную версию)" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/rus/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json index e7f3725b95324..cd394a2c256ae 100644 --- a/i18n/rus/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -7,6 +7,6 @@ "searchMatches": "Найдено соответствий: {0}", "searchMatch": "Найдено соответствие: {0}", "fileMatchAriaLabel": "Совпадений в файле {1} папки {2}: {0}, результат поиска", - "replacePreviewResultAria": "Результаты предварительного просмотра замены, {0}", - "searchResultAria": "{0}, результат поиска" + "replacePreviewResultAria": "Заменить термин {0} на {1} в столбце {2} и строке {3}", + "searchResultAria": "Обнаружен термин {0} в столбце {1} и строке {2}" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json b/i18n/rus/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json index d4cbde5d13487..1ed22c6e056cd 100644 --- a/i18n/rus/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json @@ -9,5 +9,6 @@ "vscode.extension.contributes.snippets-path": "Путь к файлу фрагментов. Путь указывается относительно папки расширения и обычно начинается с \"./snippets/\".", "invalid.language": "Неизвестный язык в contributes.{0}.language. Указанное значение: {1}", "invalid.path.0": "В contributes.{0}.path требуется строка. Указанное значение: {1}", - "invalid.path.1": "contributes.{0}.path ({1}) должен был быть включен в папку расширения ({2}). Это может сделать расширение непереносимым." + "invalid.path.1": "contributes.{0}.path ({1}) должен был быть включен в папку расширения ({2}). Это может сделать расширение непереносимым.", + "badVariableUse": "Похоже, во фрагменте \"{0}\" перепутаны переменные и заполнители. Дополнительные сведения см. на странице https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json index 328405d58a0ac..cca07302e3cf7 100644 --- a/i18n/rus/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json @@ -11,6 +11,6 @@ "snippetSchema.json.default": "Пустой фрагмент", "snippetSchema.json": "Настройка фрагмента пользователя", "snippetSchema.json.prefix": "Префикс, используемый при выборе фрагмента в Intellisense.", - "snippetSchema.json.body": "Содержимое фрагмента. Используйте \"${id}\", \"${id:label}\", \"${1:label}\" для переменных и \"$0\", \"$1\" для положений курсора", + "snippetSchema.json.body": "Содержимое фрагмента. Используйте '$1', '${1:defaultText}' для определения положения курсора и '$0' для определения конечного положения курсора. Для вставки переменных используйте синтаксис '${varName}' и '${varName:defaultText}', например, \"Это файл: $TM_FILENAME\".", "snippetSchema.json.description": "Описание фрагмента." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json new file mode 100644 index 0000000000000..87ed9681f0cb8 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "helpUs": "Помогите нам улучшить поддержку {0}", + "takeShortSurvey": "Пройдите краткий опрос", + "remindLater": "Напомнить мне позже", + "neverAgain": "Больше не показывать" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..10c206f9d2fbe --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "Вас не затруднит пройти краткий опрос?", + "takeSurvey": "Пройти опрос", + "remindLater": "Напомнить мне позже", + "neverAgain": "Больше не показывать" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json new file mode 100644 index 0000000000000..2037e5496b95c --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "Нет соответствующих задач" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json index 6e9f10d466a54..b24656f0f486a 100644 --- a/i18n/rus/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, задачи", "tasksAriaLabel": "Введите имя задачи для перезапуска", "noTasksMatching": "Нет соответствующих задач", "noTasksFound": "Задачи для перезапуска не найдены" diff --git a/i18n/rus/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json index 3b76f56cac0ad..d68fa91047a01 100644 --- a/i18n/rus/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, задачи", "tasksAriaLabel": "Введите имя задачи, которую нужно выполнить", "noTasksMatching": "Нет соответствующих задач", "noTasksFound": "Задачи не найдены" diff --git a/i18n/rus/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json new file mode 100644 index 0000000000000..2037e5496b95c --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "Нет соответствующих задач" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index 450789f1e668d..90eadea7cc82e 100644 --- a/i18n/rus/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -5,13 +5,13 @@ // Do not edit this file. It is machine generated. { "ConfigurationParser.invalidCWD": "Предупреждение: options.cwd должен иметь тип string. Игнорируется значение {0}\n", - "ConfigurationParser.noShell": "Предупреждение: конфигурация оболочки поддерживается только при выполнении задач в терминале.", "ConfigurationParser.noargs": "Ошибка: аргументы команды должны представлять собой массив строк. Указанное значение:\n{0}", + "ConfigurationParser.noShell": "Предупреждение: конфигурация оболочки поддерживается только при выполнении задач в терминале.", "ConfigurationParser.noName": "Ошибка: сопоставитель проблем в области объявления должен иметь имя:\n{0}\n", "ConfigurationParser.unknownMatcherKind": "Предупреждение: определен неизвестный сопоставитель проблем. Поддерживаемые типы: строка | СопоставительПроблем | (строка | СопоставительПроблем)[].\n{0}\n", "ConfigurationParser.invalidVaraibleReference": "Ошибка: недопустимая ссылка на problemMatcher: {0}\n", "ConfigurationParser.noTaskName": "Ошибка: задачи должны предоставлять свойство taskName. Задача будет проигнорирована.\n{0}\n", "taskConfiguration.shellArgs": "Предупреждение: задача \"{0}\" является командой оболочки, и имя команды или одного из ее аргументов включает пробелы без escape-последовательности. Чтобы обеспечить правильную расстановку кавычек в командной строке, объедините аргументы в команде.", - "taskConfiguration.noCommandOrDependsOn": "Ошибка: задача \"{0}\" не задает команду или свойство dependsOn. Задача будет игнорироваться. Ее определение:\n{1}", + "taskConfiguration.noCommandOrDependsOn": "Ошибка: в задаче \"{0}\" не указаны ни команда, ни свойство dependsOn. Задача будет проигнорирована. Определение задачи:\n{1}", "taskConfiguration.noCommand": "Ошибка: задача \"{0}\" не определяет команду. Задача будет игнорироваться. Ее определение:\n{1}" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json index c5584f8fe3290..f5baaf121912f 100644 --- a/i18n/rus/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "tsc.config": "Компилирует проект TypeScript", - "tsc.watch": "Компилирует проект TypeScript в режиме наблюдения", "dotnetCore": "Выполняет команду сборки .NET Core", "msbuild": "Выполняет целевой объект сборки", "externalCommand": "Пример для запуска произвольной внешней команды", diff --git a/i18n/rus/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json index b2e6776ffdae8..f149850fd4c75 100644 --- a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json @@ -7,6 +7,7 @@ "JsonSchema.options": "Дополнительные параметры команды", "JsonSchema.options.cwd": "Текущий рабочий каталог выполняемой программы или сценария. Если этот параметр опущен, используется корневой каталог текущей рабочей области Code.", "JsonSchema.options.env": "Среда выполняемой программы или оболочки. Если этот параметр опущен, используется среда родительского процесса.", + "JsonSchema.shellConfiguration": "Задает используемую оболочку.", "JsonSchema.shell.executable": "Используемая оболочка.", "JsonSchema.shell.args": "Аргументы оболочки.", "JsonSchema.command": "Выполняемая команда. Это может быть внешняя программа или команда оболочки.", diff --git a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json index 02c579648319e..e387db19de674 100644 --- a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json @@ -5,6 +5,8 @@ // Do not edit this file. It is machine generated. { "JsonSchema.version": "Номер версии конфигурации", + "JsonSchema._runner": "Средство запуска завершило работу. Используйте официальное свойство средства запуска", + "JsonSchema.runner": "Определяет, следует ли запустить задачу в качестве процесса с отображением выходных данных задачи в окне вывода или в терминале.", "JsonSchema.windows": "Настройка команд Windows", "JsonSchema.mac": "Настройка команд Mac", "JsonSchema.linux": "Настройка команд Linux", diff --git a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json index 881457afe777e..8a5b3a06905d1 100644 --- a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -4,11 +4,16 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "JsonSchema.version": "Номер версии конфигурации", - "JsonSchema.windows": "Настройка команд Windows", - "JsonSchema.mac": "Настройка команд Mac", - "JsonSchema.linux": "Настройка команд Linux", "JsonSchema.shell": "Указывает, является ли команда командой оболочки или внешней программой. Если опущено, значение по умолчанию — false.", "JsonSchema.tasks.dependsOn.string": "Другая задача, от которой зависит эта задача.", - "JsonSchema.tasks.dependsOn.array": "Другие задачи, от которых зависит эта задача." + "JsonSchema.tasks.dependsOn.array": "Другие задачи, от которых зависит эта задача.", + "JsonSchema.tasks.type": "Определяет, выполняется ли задача в виде процесса или в виде команды оболочки. Значение по умолчанию — \"процесс\".", + "JsonSchema.version": "Номер версии конфигурации.", + "JsonSchema.tasks.taskName": "Имя задачи", + "JsonSchema.tasks.background": "Поддерживается ли выполняющаяся задача в работающем состоянии и исполняется ли она в фоновом режиме.", + "JsonSchema.tasks.promptOnClose": "Отображается ли для пользователя приглашение, если VS Code закрывается с выполняющейся задачей.", + "JsonSchema.tasks.matchers": "Используемые сопоставители проблем. Это может быть строка, определение сопоставителя проблем или массив строк и сопоставителей проблем.", + "JsonSchema.windows": "Настройка команд Windows", + "JsonSchema.mac": "Настройка команд Mac", + "JsonSchema.linux": "Настройка команд Linux" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index c172163eb520a..46deb121c7046 100644 --- a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -9,6 +9,7 @@ "ConfigureTaskRunnerAction.quickPick.template": "Выбрать средство выполнения задач", "ConfigureTaskRunnerAction.autoDetecting": "Автообнаружение задач для {0}", "ConfigureTaskRunnerAction.autoDetect": "Не удалось автоматически определить систему задачи, используется шаблон по умолчанию. Подробности см. в выходных данных задачи.", + "ConfigureTaskRunnerAction.autoDetectError": "При определении системы задачи возникли ошибки. Дополнительные сведения см. в выходных данных задачи.", "ConfigureTaskRunnerAction.failed": "Не удается создать файл tasks.json в папке .vscode. Подробности см. в выходных данных задачи.", "ConfigureTaskRunnerAction.label": "Настроить средство выполнения задач", "ConfigureBuildTaskAction.label": "Настроить задачу сборки", @@ -18,10 +19,11 @@ "manyMarkers": "99+", "tasks": "Задачи", "TaskSystem.noHotSwap": "Чтобы изменить подсистему выполнения задач, нужно перезапустить VS Code. Изменение игнорируется.", - "TaskService.noBuildTask": "Задача сборки не определена. Отметьте задачу с помощью \"isBuildCommand\" в файле tasks.json.", - "TaskService.noTestTask": "Задача теста не определена. Отметьте задачу с помощью \"isTestCommand\" в файле tasks.json.", + "TaskService.noBuildTask1": "Задача сборки не определена. Отметьте задачу с помощью \"isBuildCommand\" в файле tasks.json.", + "TaskService.noTestTask1": "Задача теста не определена. Отметьте задачу с помощью \"isTestCommand\" в файле tasks.json.", "TaskServer.noTask": "Запрошенная задача {0} для выполнения не найдена.", - "TaskSystem.activeSame": "Задача уже активна и находится в режиме наблюдения. Чтобы завершить задачу, выполните команду \"F1 > terminate task\"", + "customizeParseErrors": "В конфигурации текущей задачи есть ошибки. Исправьте ошибки перед изменением задачи.", + "moreThanOneBuildTask": "В файле tasks.json определено несколько задач сборки. Выполняется первая задача.\n", "TaskSystem.active": "Уже выполняется задача. Завершите ее, прежде чем выполнять другую задачу.", "TaskSystem.restartFailed": "Не удалось завершить и перезапустить задачу {0}", "TaskSystem.configurationErrors": "Ошибка: в конфигурации указанной задачи при проверке были выявлены ошибки, и ее невозможно использовать. Сначала устраните ошибки.", @@ -30,17 +32,14 @@ "TaskSystem.terminateTask": "&&Завершить задачу", "TaskSystem.noProcess": "Запущенная задача больше не существует. Если задача породила фоновые процессы, выход из Visual Studio Code может привести к появлению потерянных процессов. Чтобы избежать этого, запустите последний фоновый процесс с флагом ожидания.", "TaskSystem.exitAnyways": "&&Выйти", - "TerminateAction.label": "Завершить запущенную задачу", + "TerminateAction.label": "Завершить задачу", "TaskSystem.unknownError": "При выполнении задачи произошла ошибка. Подробности см. в журнале задач.", "TaskService.noWorkspace": "Задачи доступны только в папке рабочей области.", "TerminateAction.noProcess": "Запущенный процесс больше не существует. Если задача породила фоновые задачи, выход из Visual Studio Code может привести к появлению потерянных процессов.", "TerminateAction.failed": "Не удалось завершить запущенную задачу", "ShowLogAction.label": "Показать журнал задач", "RunTaskAction.label": "Выполнить задачу", - "RestartTaskAction.label": "Перезапустить задачу", "BuildAction.label": "Выполнить задачу сборки", "TestAction.label": "Выполнить задачу тестирования", - "quickOpen.task": "Выполнить задачу", - "quickOpen.terminateTask": "Завершить задачу", - "quickOpen.restartTask": "Перезапустить задачу" + "quickOpen.task": "Выполнить задачу" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index 32514c87953bd..922550c51cb1f 100644 --- a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -6,5 +6,7 @@ { "TerminalTaskSystem.unknownError": "При выполнении задачи произошла неизвестная ошибка. Подробности см. в журнале выходных данных задач.", "TerminalTaskSystem.terminalName": "Задача — {0}", - "TerminalTaskSystem": "Невозможно выполнить команду оболочки на диске UNC." + "reuseTerminal": "Терминал будет повторно использоваться задачами. Чтобы закрыть его, нажмите любую клавишу.", + "TerminalTaskSystem": "Невозможно выполнить команду оболочки на диске UNC.", + "unkownProblemMatcher": "Не удается разрешить сопоставитель проблем {0}. Сопоставитель будет проигнорирован" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json index 6aeff4e87a2eb..2e6dfe20c1876 100644 --- a/i18n/rus/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json @@ -7,5 +7,6 @@ "TaskRunnerSystem.unknownError": "При выполнении задачи произошла неизвестная ошибка. Подробности см. в журнале выходных данных задач.", "TaskRunnerSystem.watchingBuildTaskFinished": "\nОтслеживание задач сборки завершено.", "TaskRunnerSystem.childProcessError": "Failed to launch external program {0} {1}.", - "TaskRunnerSystem.cancelRequested": "\nЗадача \"{0}\" была завершена по запросу пользователя." + "TaskRunnerSystem.cancelRequested": "\nЗадача \"{0}\" была завершена по запросу пользователя.", + "unkownProblemMatcher": "Не удается разрешить сопоставитель проблем {0}. Сопоставитель будет проигнорирован" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json new file mode 100644 index 0000000000000..90eadea7cc82e --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ConfigurationParser.invalidCWD": "Предупреждение: options.cwd должен иметь тип string. Игнорируется значение {0}\n", + "ConfigurationParser.noargs": "Ошибка: аргументы команды должны представлять собой массив строк. Указанное значение:\n{0}", + "ConfigurationParser.noShell": "Предупреждение: конфигурация оболочки поддерживается только при выполнении задач в терминале.", + "ConfigurationParser.noName": "Ошибка: сопоставитель проблем в области объявления должен иметь имя:\n{0}\n", + "ConfigurationParser.unknownMatcherKind": "Предупреждение: определен неизвестный сопоставитель проблем. Поддерживаемые типы: строка | СопоставительПроблем | (строка | СопоставительПроблем)[].\n{0}\n", + "ConfigurationParser.invalidVaraibleReference": "Ошибка: недопустимая ссылка на problemMatcher: {0}\n", + "ConfigurationParser.noTaskName": "Ошибка: задачи должны предоставлять свойство taskName. Задача будет проигнорирована.\n{0}\n", + "taskConfiguration.shellArgs": "Предупреждение: задача \"{0}\" является командой оболочки, и имя команды или одного из ее аргументов включает пробелы без escape-последовательности. Чтобы обеспечить правильную расстановку кавычек в командной строке, объедините аргументы в команде.", + "taskConfiguration.noCommandOrDependsOn": "Ошибка: в задаче \"{0}\" не указаны ни команда, ни свойство dependsOn. Задача будет проигнорирована. Определение задачи:\n{1}", + "taskConfiguration.noCommand": "Ошибка: задача \"{0}\" не определяет команду. Задача будет игнорироваться. Ее определение:\n{1}" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json index 03b66cf3c552e..4523bac1924f8 100644 --- a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -16,6 +16,7 @@ "terminal.integrated.fontLigatures": "Определяет, будут ли включены лигатуры шрифтов для терминала.", "terminal.integrated.fontSize": "Определяет размер шрифта (в пикселях) для терминала.", "terminal.integrated.lineHeight": "Определяет высоту строки терминала; это число умножается на размер шрифта терминала, что дает фактическую высоту строки в пикселях.", + "terminal.integrated.enableBold": "Следует ли разрешить полужирный текст в терминале. Эта функция должна поддерживаться оболочкой терминала.", "terminal.integrated.cursorBlinking": "Управляет миганием курсора терминала.", "terminal.integrated.cursorStyle": "Определяет стиль курсора терминала.", "terminal.integrated.scrollback": "Определяет предельное число строк в буфере терминала.", diff --git a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json index 8104d226e8800..ccd5870dca1b9 100644 --- a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -8,6 +8,7 @@ "workbench.action.terminal.kill": "Завершить активный экземпляр терминала", "workbench.action.terminal.kill.short": "Завершить работу терминала", "workbench.action.terminal.copySelection": "Скопировать выделение", + "workbench.action.terminal.selectAll": "Выбрать все", "workbench.action.terminal.new": "Создание нового интегрированного терминала", "workbench.action.terminal.new.short": "Новый терминал", "workbench.action.terminal.focus": "Фокус на терминале", @@ -26,5 +27,8 @@ "workbench.action.terminal.scrollUp": "Прокрутить вверх (построчно)", "workbench.action.terminal.scrollUpPage": "Прокрутить вверх (страницу)", "workbench.action.terminal.scrollToTop": "Прокрутить до верхней границы", - "workbench.action.terminal.clear": "Очистить" + "workbench.action.terminal.clear": "Очистить", + "workbench.action.terminal.allowWorkspaceShell": "Разрешить настройку оболочки в рабочей области", + "workbench.action.terminal.disallowWorkspaceShell": "Запретить настройку оболочки в рабочей области", + "workbench.action.terminal.rename": "Переименовать" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json index 227600f316f4d..a43d3077cff1b 100644 --- a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.background": "Цвет фона терминала. С его помощью можно указать цвет терминала, отличный от цвета панели.", + "terminal.foreground": "Цвет переднего плана терминала.", "terminal.ansiColor": "Цвет ANSI \"{0}\" в терминале." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json index 1ed48f98d5802..d683bd1c3d94c 100644 --- a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.integrated.allowWorkspaceShell": "Вы хотите разрешить запуск {0} (определяется как параметр рабочей области) в терминале?", "allow": "Allow", "disallow": "Disallow" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json new file mode 100644 index 0000000000000..e03b15626d2d6 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Найти", + "placeholder.find": "Найти", + "label.previousMatchButton": "Предыдущее соответствие", + "label.nextMatchButton": "Следующее соответствие", + "label.closeButton": "Закрыть" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json index 2034b9a4ca8cd..07fc306b313d4 100644 --- a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "terminal.integrated.copySelection.noSelection": "Невозможно скопировать выделение в терминале, когда терминал не имеет фокуса", "terminal.integrated.exitedWithCode": "Процесс терминала завершен с кодом выхода: {0}", "terminal.integrated.waitOnExit": "Нажмите любую клавишу, чтобы закрыть терминал.", "terminal.integrated.launchFailed": "Не удалось запустить команду процесса терминала \"{0}{1}\" (код выхода: {2})" diff --git a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json index 00b9036f44a5b..82f898e4f9b3e 100644 --- a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminalLinkHandler.followLinkAlt": "Щелкните с нажатой клавишей ALT, чтобы перейти по ссылке.", "terminalLinkHandler.followLinkCmd": "Щелкните с нажатой клавишей Cmd, чтобы перейти по ссылке", "terminalLinkHandler.followLinkCtrl": "Щелкните с нажатой клавишей Ctrl, чтобы перейти по ссылке" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json index 33bdfa635b9c4..92eaeea4fb999 100644 --- a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json @@ -7,5 +7,6 @@ "copy": "Копировать", "createNewTerminal": "Новый терминал", "paste": "Вставить", + "selectAll": "Выбрать все", "clear": "Очистить" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 4c16e55f86088..b252e0872aa67 100644 --- a/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,13 +6,14 @@ { "selectTheme.label": "Цветовая тема", "installColorThemes": "Установить дополнительные цветовые темы...", - "problemChangingTheme": "Проблема при задании темы: {0}", - "themes.selectTheme": "Выберите цветовую тему", + "themes.selectTheme": "Выберите цветовую тему (используйте клавиши стрелок вверх и вниз для предварительного просмотра)", "selectIconTheme.label": "Тема значков файлов", "installIconThemes": "Установить дополнительные темы значков файлов...", "noIconThemeLabel": "Нет", "noIconThemeDesc": "Отключить значки файлов", "problemChangingIconTheme": "Проблема при задании темы значка: {0}", "themes.selectIconTheme": "Выбрать тему значка файла", - "preferences": "Параметры" + "generateColorTheme.label": "Создать цветовую тему на основе текущих параметров", + "preferences": "Параметры", + "developer": "Разработчик" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/update/electron-browser/update.i18n.json b/i18n/rus/src/vs/workbench/parts/update/electron-browser/update.i18n.json index ef31128d567b2..8d028729c6980 100644 --- a/i18n/rus/src/vs/workbench/parts/update/electron-browser/update.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/update/electron-browser/update.i18n.json @@ -13,7 +13,19 @@ "read the release notes": "Вас приветствует {0} v{1}! Вы хотите прочитать заметки о выпуске?", "licenseChanged": "Условия использования лицензии изменились, ознакомьтесь с ними.", "license": "Прочитать условия лицензии", - "updateAvailable": "{0} будет обновлен после перезапуска.", + "updateIsReady": "Доступно новое обновление.", "thereIsUpdateAvailable": "Доступно обновление.", - "noUpdatesAvailable": "В настоящее время нет доступных обновлений." + "updateAvailable": "{0} будет обновлен после перезапуска.", + "noUpdatesAvailable": "В настоящее время нет доступных обновлений.", + "commandPalette": "Палитра команд...", + "settings": "Параметры", + "keyboardShortcuts": "Сочетания клавиш", + "selectTheme.label": "Цветовая тема", + "themes.selectIconTheme.label": "Тема значков файлов", + "not available": "Обновления недоступны", + "checkingForUpdates": "Идет проверка наличия обновлений...", + "DownloadUpdate": "Скачать доступное обновление", + "DownloadingUpdate": "Скачивается обновление...", + "InstallingUpdate": "Идет установка обновления...", + "checkForUpdates": "Проверить наличие обновлений..." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/views/browser/views.i18n.json b/i18n/rus/src/vs/workbench/parts/views/browser/views.i18n.json new file mode 100644 index 0000000000000..761072edd67cf --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/views/browser/views.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewToolbarAriaLabel": "Действий: {0}" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json b/i18n/rus/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json new file mode 100644 index 0000000000000..3c41a4d1bdaa5 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "представления должны быть массивом", + "requirestring": "свойство \"{0}\" является обязательным и должно иметь тип string", + "optstring": "свойство \"{0}\" может быть опущено или должно иметь тип string", + "vscode.extension.contributes.view.id": "Идентификатор представления. Используйте его для регистрации поставщика данных с помощью API-интерфейса \"vscode.window.registerTreeDataProviderForView\", а также для активации расширения с помощью регистрации события \"onView:${id}\" в \"activationEvents\".", + "vscode.extension.contributes.view.name": "Понятное имя представления. Будет отображаться на экране", + "vscode.extension.contributes.views": "Добавляет представления в редактор", + "views.explorer": "Представление проводника", + "locationId.invalid": "\"{0}\" не является допустимым расположением представления" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json b/i18n/rus/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json index df60fc5a7c6c9..7e53870a32d30 100644 --- a/i18n/rus/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json @@ -14,10 +14,6 @@ "watermark.toggleTerminal": "Терминал", "watermark.findInFiles": "Найти в файлах", "watermark.startDebugging": "Начать отладку", - "watermark.selectTheme": "Изменить тему", - "watermark.selectKeymap": "Изменить сопоставление клавиш", - "watermark.keybindingsReference": "Справочник по клавишам", - "watermark.openGlobalKeybindings": "Сочетания клавиш", "watermark.unboundCommand": "свободный", "workbenchConfigurationTitle": "Рабочее место", "tips.enabled": "Если параметр включен, на подложке появляются советы, если нет открытых редакторов." diff --git a/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 4457de0a2d6e6..cbdb68fe6f74b 100644 --- a/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -11,33 +11,33 @@ "welcomePage.openFolder": "Открыть папку...", "welcomePage.cloneGitRepository": "Клонировать репозиторий Git...", "welcomePage.recent": "Последние", + "welcomePage.moreRecent": "Дополнительные сведения...", "welcomePage.noRecentFolders": "Нет последних папок.", "welcomePage.help": "Справка", - "welcomePage.productDocumentation": "Документация по продукту", + "welcomePage.keybindingsCheatsheet": "Список сочетаний клавиш в печатном виде", "welcomePage.introductoryVideos": "Вступительные видео", + "welcomePage.productDocumentation": "Документация по продукту", "welcomePage.gitHubRepository": "Репозиторий GitHub", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "Отображать страницу приветствия при запуске", - "welcomePage.quickLinks": "Быстрые ссылки", - "welcomePage.interactivePlayground": "Интерактивная площадка", - "welcomePage.interactivePlaygroundDescription": "Опробуйте основные функции редактора в ходе краткого пошагового руководства.", - "welcomePage.interfaceOverview": "Общие сведения об интерфейсе", - "welcomePage.interfaceOverviewDescription": "Используйте визуальное наложение с выделением основных компонентов пользовательского интерфейса.", + "welcomePage.customize": "Настроить", + "welcomePage.installExtensionPacks": "Средства и языки", + "welcomePage.installExtensionPacksDescription": "Установить поддержку для {0} и {1}", + "welcomePage.moreExtensions": "Еще", + "welcomePage.installKeymapDescription": "Установка сочетаний клавиш", + "welcomePage.installKeymapExtension": "Настроить сочетания клавиш для {0} и {1}", + "welcomePage.others": "Другие", "welcomePage.colorTheme": "Цветовая тема", "welcomePage.colorThemeDescription": "Настройте редактор и код удобным образом.", + "welcomePage.learn": "Подробнее", + "welcomePage.showCommands": "Найти и выполнить все команды.", + "welcomePage.interfaceOverview": "Общие сведения об интерфейсе", + "welcomePage.interfaceOverviewDescription": "Используйте визуальное наложение с выделением основных компонентов пользовательского интерфейса.", + "welcomePage.interactivePlayground": "Интерактивная площадка", + "welcomePage.interactivePlaygroundDescription": "Опробуйте основные функции редактора в ходе краткого пошагового руководства.", + "welcomePage.quickLinks": "Быстрые ссылки", "welcomePage.keybindingsReference": "Справочник по сочетаниям клавиш", "welcomePage.keybindingsReferenceDescription": "Подготовленный к печати PDF-файл с самыми частыми сочетаниями клавиш", - "welcomePage.showCommands": "Найти и выполнить все команды.", - "welcomePage.showCommandsDescription": "Быстрый доступ и поиск команд на панели управления ({0})", "welcomePage.configureSettings": "Настройка параметров", - "welcomePage.configureSettingsDescription": "Используйте все возможности VS Code, подобрав нужные параметры.", - "welcomePage.installKeymapDescription": "Установка сочетаний клавиш", - "welcomePage.installKeymap": "Установите сочетания клавиш {0}, {1}, {2} и {3}.", - "welcomePage.vim": "Vim", - "welcomePage.vimCurrent": "Vim (текущий)", - "welcomePage.sublime": "Sublime", - "welcomePage.sublimeCurrent": "Sublime (текущий)", - "welcomePage.atom": "Atom", - "welcomePage.atomCurrent": "Atom (текущий)", - "welcomePage.others": "Другие" + "welcomePage.configureSettingsDescription": "Используйте все возможности VS Code, подобрав нужные параметры." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json index 9927d1b163aab..5cc598d29de70 100644 --- a/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "workbenchConfigurationTitle": "Workbench", - "welcomePage.enabled": "Если этот параметр включен, страница приветствия будет отображаться при запуске.", + "workbenchConfigurationTitle": "Рабочее место", "help": "Справка" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 16cf088164da8..47a6fd1a229f5 100644 --- a/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,11 +5,32 @@ // Do not edit this file. It is machine generated. { "welcomePage": "Добро пожаловать", - "welcome.title": "Добро пожаловать", + "welcomePage.javaScript": "JavaScript", + "welcomePage.typeScript": "TypeScript", + "welcomePage.python": "Python", + "welcomePage.php": "PHP", + "welcomePage.docker": "Docker", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", + "welcomePage.extensionPackAlreadyInstalled": "Поддержка {0} уже добавлена.", + "welcomePage.willReloadAfterInstallingExtensionPack": "После установки дополнительной поддержки для {0} окно будет перезагружено.", + "welcomePage.installingExtensionPack": "Установка дополнительной поддержки для {0}...", + "welcomePage.extensionPackNotFound": "Не удается найти поддержку для {0} с идентификатором {1}.", "welcomePage.keymapAlreadyInstalled": "Сочетания клавиш {0} уже установлены.", "welcomePage.willReloadAfterInstallingKeymap": "Окно перезагрузится после установки сочетаний клавиш {0}.", - "ok": "ОК", "welcomePage.installingKeymap": "Устанавливаются сочетания клавиш {0}...", "welcomePage.keymapNotFound": "Не удалось найти сочетания клавиш {0} с идентификатором {1}.", - "cancel": "Отмена" + "welcome.title": "Добро пожаловать", + "welcomePage.openFolderWithPath": "Открыть папку {0} с путем {1}", + "welcomePage.extensionListSeparator": ",", + "welcomePage.installKeymap": "Установить раскладку клавиатуры {0}", + "welcomePage.installExtensionPack": "Установить дополнительную поддержку для {0}", + "welcomePage.installedKeymap": "Раскладка клавиатуры {0} уже установлена", + "welcomePage.installedExtensionPack": "Поддержка {0} уже установлена", + "ok": "ОК", + "details": "Подробности", + "cancel": "Отмена", + "welcomePage.buttonBackground": "Цвет фона кнопок на странице приветствия.", + "welcomePage.buttonHoverBackground": "Цвет фона при наведении указателя для кнопок на странице приветствия." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/rus/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json index d599004ee21dc..e79310b57d6af 100644 --- a/i18n/rus/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "walkThrough.unboundCommand": "свободный" + "walkThrough.unboundCommand": "свободный", + "walkThrough.gitNotFound": "Похоже, Git не установлен в вашей системе.", + "walkThrough.embeddedEditorBackground": "Цвет фона встроенных редакторов для интерактивных площадок." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/configuration/node/configuration.i18n.json b/i18n/rus/src/vs/workbench/services/configuration/node/configuration.i18n.json new file mode 100644 index 0000000000000..a74bc2f57d972 --- /dev/null +++ b/i18n/rus/src/vs/workbench/services/configuration/node/configuration.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.configuration": "Добавляет параметры конфигурации.", + "vscode.extension.contributes.configuration.title": "Краткая сводка параметров. Эта метка будет использоваться в файле параметров в качестве разделяющего комментария.", + "vscode.extension.contributes.configuration.properties": "Описание свойств конфигурации.", + "invalid.type": "Если тип configuration.type задан, то он должен иметь значение object", + "invalid.title": "configuration.title должно быть строкой", + "vscode.extension.contributes.defaultConfiguration": "Предоставляет параметры конфигурации редактора по умолчанию в соответствии с языком.", + "invalid.properties": "configuration.properties должно быть объектом" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/rus/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index 819e2b3d58b67..11dedf614c641 100644 --- a/i18n/rus/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/rus/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -4,11 +4,14 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "open": "Открыть параметры", + "close": "Закрыть", + "saveAndRetry": "Сохранить параметры и повторить попытку", "errorUnknownKey": "Не удается выполнить запись в файл конфигурации (неизвестный ключ)", "errorInvalidTarget": "Не удается выполнить запись в файл конфигурации (недопустимый целевой объект).", "errorNoWorkspaceOpened": "Не удается записать параметры, так как нет открытых папок. Откройте папку и повторите попытку.", - "errorInvalidConfiguration": "Не удается выполнить запись параметров. Откройте файл **User Settings**, чтобы разрешить ошибки и предупреждения в файле, и повторите попытку.", - "errorInvalidConfigurationWorkspace": "Не удается выполнить запись параметров. Откройте файл **Workspace Settings**, чтобы разрешить ошибки и предупреждения в файле, и повторите попытку.", - "errorConfigurationFileDirty": "Не удается выполнить запись параметров, так как файл изменен. Сохраните файл **User Settings** и повторите попытку.", - "errorConfigurationFileDirtyWorkspace": "Не удается выполнить запись параметров, так как файл изменен. Сохраните файл **Workspace Settings** и повторите попытку." + "errorInvalidConfiguration": "Не удается записать параметры. Откройте файл **User Settings**, устраните ошибки и предупреждения в файле и повторите попытку.", + "errorInvalidConfigurationWorkspace": "Не удается записать параметры. Откройте файл **Workspace Settings**, устраните ошибки и предупреждения в файле и повторите попытку.", + "errorConfigurationFileDirty": "Не удается записать параметры, так как файл был изменен. Сохраните файл **User Settings** и повторите попытку.", + "errorConfigurationFileDirtyWorkspace": "Не удается записать параметры, так как файл был изменен. Сохраните файл **Workspace Settings** и повторите попытку." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json b/i18n/rus/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json new file mode 100644 index 0000000000000..b9b24e91bdb0d --- /dev/null +++ b/i18n/rus/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Телеметрия", + "telemetry.enableCrashReporting": "Разрешить отправку отчетов о сбоях в Майкрософт.\nЧтобы этот параметр вступил в силу, требуется перезагрузка." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/rus/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index e710354892646..1910da65b5d80 100644 --- a/i18n/rus/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/rus/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -8,15 +8,11 @@ "requirestring": "свойство \"{0}\" является обязательным и должно иметь тип string", "optstring": "свойство \"{0}\" может быть опущено или должно иметь тип string", "vscode.extension.contributes.keybindings.command": "Идентификатор команды, выполняемой при нажатии настраиваемого сочетания клавиш.", - "vscode.extension.contributes.keybindings.key": "Клавиша или последовательность клавиш (клавиши разделяются знаком плюс, а последовательности — пробелом, например CTRL+O или CTRL+L L для сочетания)", "vscode.extension.contributes.keybindings.mac": "Клавиша или последовательность клавиш для Mac.", "vscode.extension.contributes.keybindings.linux": "Клавиша или последовательность клавиш для Linux.", "vscode.extension.contributes.keybindings.win": "Клавиша или последовательность клавиш для Windows.", "vscode.extension.contributes.keybindings.when": "Условие, когда клавиша нажата.", "vscode.extension.contributes.keybindings": "Добавляет настраиваемые сочетания клавиш.", - "openDocumentation": "Дополнительные сведения", - "keybindingMigration.ok": "ОК", - "keybindingMigration.prompt": "Некоторые сочетания клавиш для вашей раскладки клавиатуры изменились.", "invalid.keybindings": "Недопустимое значение \"contributes.{0}\": {1}", "unboundCommands": "Доступные команды: ", "keybindings.json.title": "Настройка настраиваемых сочетаний клавиш", diff --git a/i18n/rus/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json b/i18n/rus/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json index 65132e406d71e..5a0a549baf346 100644 --- a/i18n/rus/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json +++ b/i18n/rus/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json @@ -4,6 +4,15 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "vscode.extension.contributes.languages": "Добавляет объявления языка.", + "vscode.extension.contributes.languages.id": "Идентификатор языка.", + "vscode.extension.contributes.languages.aliases": "Псевдонимы имен для языка.", + "vscode.extension.contributes.languages.extensions": "Расширения имен файлов, связанные с языком.", + "vscode.extension.contributes.languages.filenames": "Имена файлов, связанные с языком.", + "vscode.extension.contributes.languages.filenamePatterns": "Стандартные маски имен файлов, связанные с языком.", + "vscode.extension.contributes.languages.mimetypes": "Типы MIME, связанные с языком.", + "vscode.extension.contributes.languages.firstLine": "Регулярное выражение, соответствующее первой строке файла языка.", + "vscode.extension.contributes.languages.configuration": "Относительный путь к файлу, содержащему параметры конфигурации для языка.", "invalid": "Недопустимое значение contributes.{0}. Требуется массив.", "invalid.empty": "Пустое значение contributes.{0}", "require.id": "свойство \"{0}\" является обязательным и должно иметь тип string", diff --git a/i18n/rus/src/vs/workbench/services/progress/browser/progressService2.i18n.json b/i18n/rus/src/vs/workbench/services/progress/browser/progressService2.i18n.json new file mode 100644 index 0000000000000..6db7d6aae514a --- /dev/null +++ b/i18n/rus/src/vs/workbench/services/progress/browser/progressService2.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "progress.text": "{0} - {1}", + "progress.title": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json b/i18n/rus/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json new file mode 100644 index 0000000000000..914bf43b33e61 --- /dev/null +++ b/i18n/rus/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.grammars": "Добавляет разметчики TextMate.", + "vscode.extension.contributes.grammars.language": "Идентификатор языка, для которого добавляется этот синтаксис.", + "vscode.extension.contributes.grammars.scopeName": "Имя области TextMate, используемое в файле tmLanguage.", + "vscode.extension.contributes.grammars.path": "Путь к файлу tmLanguage. Путь указывается относительно папки расширения и обычно начинается с \"./syntaxes/\".", + "vscode.extension.contributes.grammars.embeddedLanguages": "Сопоставление имени области и идентификатора языка, если грамматика содержит внедренные языки.", + "vscode.extension.contributes.grammars.injectTo": "Список имен языковых областей, в которые вставляется эта грамматика." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json b/i18n/rus/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json new file mode 100644 index 0000000000000..e3e7f8549df52 --- /dev/null +++ b/i18n/rus/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid.language": "Неизвестный язык в contributes.{0}.language. Указанное значение: {1}", + "invalid.scopeName": "В contributes.{0}.scopeName требуется строка. Указанное значение: {1}", + "invalid.path.0": "В contributes.{0}.path требуется строка. Указанное значение: {1}", + "invalid.injectTo": "Недопустимое значение в \"contributes.{0}.injectTo\". Должен быть задан массив имен языковых областей. Указанное значение: {1}", + "invalid.embeddedLanguages": "Недопустимое значение в \"contributes.{0}.embeddedLanguages\". Оно должно быть сопоставлением объекта между именем области и языком. Указанное значение: {1}.", + "invalid.path.1": "contributes.{0}.path ({1}) должен был быть включен в папку расширения ({2}). Это может сделать расширение непереносимым.", + "no-tm-grammar": "Нет грамматики TM, зарегистрированной для этого языка." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json b/i18n/rus/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json index c953639514d60..9f08b3aed1fa9 100644 --- a/i18n/rus/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json +++ b/i18n/rus/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json @@ -6,5 +6,6 @@ { "schema.colors": "Цвета для выделения синтаксических конструкций", "schema.properties.name": "Описание правила", - "schema.fontStyle": "Начертание шрифта для правила: один либо сочетание курсива, полужирного и подчеркивания." + "schema.fontStyle": "Начертание шрифта для правила: один либо сочетание курсива, полужирного и подчеркивания.", + "schema.tokenColors.path": "Путь к файлу tmTheme (по отношению к текущему файлу)" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/rus/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json index 6362159437b18..ac6d90763578d 100644 --- a/i18n/rus/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json +++ b/i18n/rus/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -5,8 +5,9 @@ // Do not edit this file. It is machine generated. { "error.cannotparsejson": "Возникли проблемы при анализе файла JSON THEME: {0}.", - "error.invalidformat": "Проблемы при анализе файла темы JSON: {0}. Ожидаются \"tokenColors\" и \"colors\".", - "error.plist.invalidformat": "Ошибка при анализе файла темы: {0}. settings не является массивом.", - "error.cannotparse": "Ошибки при анализе файла темы: {0}", - "error.cannotload": "Проблемы при загрузке файла темы {0}: {1}" + "error.invalidformat.colors": "Ошибка при анализе файла цветовой темы: {0}. Свойство 'colors' не имеет тип 'object'.", + "error.invalidformat.tokenColors": "Ошибка при анализе файла цветовой темы: {0}. Свойство 'tokenColors' должно содержать массив цветов или путь к текстовому файлу цветовой темы", + "error.plist.invalidformat": "Ошибка при анализе файла tmTheme: {0}. 'settings' не является массивом.", + "error.cannotparse": "Ошибка при анализе файла tmTheme: {0}", + "error.cannotload": "Ошибка при загрузке файла tmTheme {0}: {1}" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/rus/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index 40df43a9fd257..273e290be88a3 100644 --- a/i18n/rus/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/rus/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -23,8 +23,9 @@ "error.cannotparseicontheme": "Problems parsing file icons file: {0}", "colorTheme": "Specifies the color theme used in the workbench.", "colorThemeError": "Theme is unknown or not installed.", - "iconTheme": "Specifies the icon theme used in the workbench.", "noIconThemeDesc": "No file icons", "iconThemeError": "File icon theme is unknown or not installed.", - "workbenchColors": "Переопределяет цвета из выбранной цветовой темы. Это экспериментальный параметр, так как имена цветов изменятся в следующем выпуске." + "workbenchColors": "Переопределяет цвета из выбранной цветовой темы.", + "workbenchColors.deprecated": "Параметр больше не является экспериментальным и был переименован в 'workbench.colorCustomizations'", + "workbenchColors.deprecatedDescription": "Используйте параметр 'workbench.colorCustomizations'" } \ No newline at end of file diff --git a/i18n/trk/extensions/configuration-editing/out/extension.i18n.json b/i18n/trk/extensions/configuration-editing/out/extension.i18n.json new file mode 100644 index 0000000000000..5e6350bbcf2a1 --- /dev/null +++ b/i18n/trk/extensions/configuration-editing/out/extension.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "exampleExtension": "Örnek" +} \ No newline at end of file diff --git a/i18n/trk/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json b/i18n/trk/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json new file mode 100644 index 0000000000000..cffb38fa05cfc --- /dev/null +++ b/i18n/trk/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json @@ -0,0 +1,38 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "activeEditorShort": "ör. myFile.txt", + "activeEditorMedium": "ör. myFolder/myFile.txt", + "activeEditorLong": "ör. /Users/Development/myProject/myFolder/myFile.txt", + "rootName": "ör: myFolder1, myFolder2, myFolder3", + "rootPath": "ör. /Users/Development/myProject", + "folderName": "ör: myFolder", + "folderPath": "ör: /Users/Development/myFolder", + "appName": "ör. VS Code", + "dirty": "değişiklik göstergesi, aktif düzenleyici kaydedilmemiş değişiklikler içeriyorsa", + "separator": "koşullu ayırıcı ('-') sadece değişkenler tarafından değerlerle çevrildiğinde gösterir", + "assocLabelFile": "Uzantılı Dosyalar", + "assocDescriptionFile": "Dosya adında glob deseniyle eşleşen tüm dosyaları belirtilen tanımlayıcıya sahip olan dile eşleyin.", + "assocLabelPath": "Yollu Dosyalar", + "assocDescriptionPath": "Dosya yolunda mutlak yol glob deseniyle eşleşen tüm dosyaları belirtilen tanımlayıcıya sahip olan dile eşleyin.", + "fileLabel": "Uzantıya Göre Dosyalar", + "fileDescription": "Belirli bir dosya uzantısına sahip tüm dosyaları eşleştirin.", + "filesLabel": "Birden Çok Uzantılı Dosyalar", + "filesDescription": "Tüm dosyaları herhangi bir dosya uzantısıyla eşleştirin.", + "derivedLabel": "Ada Göre Eşdüzeyi Olan Dosyalar", + "derivedDescription": "Aynı ada ancak farklı bir uzantıya sahip eşdüzeyi olan dosyaları eşleştirin.", + "topFolderLabel": "Ada Göre Klasör (En Üst Düzey)", + "topFolderDescription": "En üst düzeydeki bir klasörü belirli bir ad ile eşleştirin.", + "topFoldersLabel": "Birden Çok Ada Sahip Klasör (En Üst Düzey)", + "topFoldersDescription": "Birden çok en üst düzey klasörü eşleştirin.", + "folderLabel": "Ada Göre Klasör (Herhangi Bir Konum)", + "folderDescription": "Bir klasörü herhangi bir konumdaki belirli bir ad ile eşleştirin.", + "falseDescription": "Deseni devre dışı bırakın.", + "trueDescription": "Deseni etkinleştirin.", + "siblingsDescription": "Aynı ada ancak farklı bir uzantıya sahip eşdüzeyi olan dosyaları eşleştirin.", + "languageSpecificEditorSettings": "Dile özel düzenleyici ayarları", + "languageSpecificEditorSettingsDescription": "Dil için düzenleyici ayarlarını geçersiz kıl" +} \ No newline at end of file diff --git a/i18n/trk/extensions/css/client/out/cssMain.i18n.json b/i18n/trk/extensions/css/client/out/cssMain.i18n.json new file mode 100644 index 0000000000000..25a60c398285c --- /dev/null +++ b/i18n/trk/extensions/css/client/out/cssMain.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "cssserver.name": "CSS Dil Sunucusu" +} \ No newline at end of file diff --git a/i18n/trk/extensions/css/package.i18n.json b/i18n/trk/extensions/css/package.i18n.json new file mode 100644 index 0000000000000..215750e00ed3d --- /dev/null +++ b/i18n/trk/extensions/css/package.i18n.json @@ -0,0 +1,67 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "css.lint.argumentsInColorFunction.desc": "Geçersiz sayıda parametre", + "css.lint.boxModel.desc": "Doldurma veya kenarlık kullanırken genişlik veya yükseklik kullanmayın", + "css.lint.compatibleVendorPrefixes.desc": "Satıcıya özgü bir ön ek kullanırken satıcıya özgü diğer tüm özellikleri de dahil ettiğinizden emin olun", + "css.lint.duplicateProperties.desc": "Yinelenen stil tanımları kullanmayın", + "css.lint.emptyRules.desc": "Boş kural kümeleri kullanmayın", + "css.lint.float.desc": "'float' kullanmaktan kaçının. Float'lar, düzenin herhangi bir unsuru değiştiğinde kolayca bozulan kırılgan CSS ile sonuçlanır.", + "css.lint.fontFaceProperties.desc": "@font-face kuralı 'src' ve 'font-family' özelliklerini tanımlamalıdır", + "css.lint.hexColorLength.desc": "Onaltılık renkler üç veya altı onaltılık sayıdan oluşmalıdır", + "css.lint.idSelector.desc": "Bu kurallar HTML'ye çok sıkı bağlı olduğundan seçiciler kimlikleri içermemelidir.", + "css.lint.ieHack.desc": "IE izinsiz girişleri yalnızca IE7 ve daha eski sürümler desteklenirken gereklidir", + "css.lint.important.desc": "!important kullanmaktan kaçının. Tüm CSS'nin belirginlik düzeyi üzerindeki denetimin kaybedildiğinin ve yeniden düzenlenmesi gerektiğinin bir belirtisidir.", + "css.lint.importStatement.desc": "İçe aktarma deyimleri paralel olarak yüklenmez", + "css.lint.propertyIgnoredDueToDisplay.desc": "Özellik gösterim nedeniyle yoksayıldı. Örn. 'display: inline' ile width, height, margin-top, margin-bottom ve float özelliklerinin hiçbir etkisi olmaz", + "css.lint.universalSelector.desc": "Evrensel seçici (*) yavaş olarak bilinir", + "css.lint.unknownProperties.desc": "Bilinmeyen özellik.", + "css.lint.unknownVendorSpecificProperties.desc": "Bilinmeyen satıcıya özel özellik.", + "css.lint.vendorPrefix.desc": "Satıcıya özgü bir ön ek kullanırken standart özelliği de dahil edin", + "css.lint.zeroUnits.desc": "Sıfır için birim gerekmez", + "css.validate.desc": "Tüm doğrulamaları etkinleştirir veya devre dışı bırakır", + "less.lint.argumentsInColorFunction.desc": "Geçersiz sayıda parametre", + "less.lint.boxModel.desc": "Doldurma veya kenarlık kullanırken genişlik veya yükseklik kullanmayın", + "less.lint.compatibleVendorPrefixes.desc": "Satıcıya özgü bir ön ek kullanırken satıcıya özgü diğer tüm özellikleri de dahil ettiğinizden emin olun", + "less.lint.duplicateProperties.desc": "Yinelenen stil tanımları kullanmayın", + "less.lint.emptyRules.desc": "Boş kural kümeleri kullanmayın", + "less.lint.float.desc": "'float' kullanmaktan kaçının. Float'lar, düzenin herhangi bir unsuru değiştiğinde kolayca bozulan kırılgan CSS ile sonuçlanır.", + "less.lint.fontFaceProperties.desc": "@font-face kuralı 'src' ve 'font-family' özelliklerini tanımlamalıdır", + "less.lint.hexColorLength.desc": "Onaltılık renkler üç veya altı onaltılık sayıdan oluşmalıdır", + "less.lint.idSelector.desc": "Bu kurallar HTML'ye çok sıkı bağlı olduğundan seçiciler kimlikleri içermemelidir.", + "less.lint.ieHack.desc": "IE izinsiz girişleri yalnızca IE7 ve daha eski sürümler desteklenirken gereklidir", + "less.lint.important.desc": "!important kullanmaktan kaçının. Tüm CSS'nin belirginlik düzeyi üzerindeki denetimin kaybedildiğinin ve yeniden düzenlenmesi gerektiğinin bir belirtisidir.", + "less.lint.importStatement.desc": "İçe aktarma deyimleri paralel olarak yüklenmez", + "less.lint.propertyIgnoredDueToDisplay.desc": "Özellik gösterim nedeniyle yoksayıldı. Örn. 'display: inline' ile width, height, margin-top, margin-bottom ve float özelliklerinin hiçbir etkisi olmaz", + "less.lint.universalSelector.desc": "Evrensel seçici (*) yavaş olarak bilinir", + "less.lint.unknownProperties.desc": "Bilinmeyen özellik.", + "less.lint.unknownVendorSpecificProperties.desc": "Bilinmeyen satıcıya özel özellik.", + "less.lint.vendorPrefix.desc": "Satıcıya özgü bir ön ek kullanırken standart özelliği de dahil edin", + "less.lint.zeroUnits.desc": "Sıfır için birim gerekmez", + "less.validate.desc": "Tüm doğrulamaları etkinleştirir veya devre dışı bırakır", + "scss.lint.argumentsInColorFunction.desc": "Geçersiz sayıda parametre", + "scss.lint.boxModel.desc": "Doldurma veya kenarlık kullanırken genişlik veya yükseklik kullanmayın", + "scss.lint.compatibleVendorPrefixes.desc": "Satıcıya özgü bir ön ek kullanırken satıcıya özgü diğer tüm özellikleri de dahil ettiğinizden emin olun", + "scss.lint.duplicateProperties.desc": "Yinelenen stil tanımları kullanmayın", + "scss.lint.emptyRules.desc": "Boş kural kümeleri kullanmayın", + "scss.lint.float.desc": "'float' kullanmaktan kaçının. Float'lar, düzenin herhangi bir unsuru değiştiğinde kolayca bozulan kırılgan CSS ile sonuçlanır.", + "scss.lint.fontFaceProperties.desc": "@font-face kuralı 'src' ve 'font-family' özelliklerini tanımlamalıdır", + "scss.lint.hexColorLength.desc": "Onaltılık renkler üç veya altı onaltılık sayıdan oluşmalıdır", + "scss.lint.idSelector.desc": "Bu kurallar HTML'ye çok sıkı bağlı olduğundan seçiciler kimlikleri içermemelidir.", + "scss.lint.ieHack.desc": "IE izinsiz girişleri yalnızca IE7 ve daha eski sürümler desteklenirken gereklidir", + "scss.lint.important.desc": "!important kullanmaktan kaçının. Tüm CSS'nin belirginlik düzeyi üzerindeki denetimin kaybedildiğinin ve yeniden düzenlenmesi gerektiğinin bir belirtisidir.", + "scss.lint.importStatement.desc": "İçe aktarma deyimleri paralel olarak yüklenmez", + "scss.lint.propertyIgnoredDueToDisplay.desc": "Özellik gösterim nedeniyle yoksayıldı. Örn. 'display: inline' ile width, height, margin-top, margin-bottom ve float özelliklerinin hiçbir etkisi olmaz", + "scss.lint.universalSelector.desc": "Evrensel seçici (*) yavaş olarak bilinir", + "scss.lint.unknownProperties.desc": "Bilinmeyen özellik.", + "scss.lint.unknownVendorSpecificProperties.desc": "Bilinmeyen satıcıya özel özellik.", + "scss.lint.vendorPrefix.desc": "Satıcıya özgü bir ön ek kullanırken standart özelliği de dahil edin", + "scss.lint.zeroUnits.desc": "Sıfır için birim gerekmez", + "scss.validate.desc": "Tüm doğrulamaları etkinleştirir veya devre dışı bırakır", + "less.colorDecorators.enable.desc": "Renk dekoratörlerini etkinleştirir veya devre dışı bırakır", + "scss.colorDecorators.enable.desc": "Renk dekoratörlerini etkinleştirir veya devre dışı bırakır", + "css.colorDecorators.enable.desc": "Renk dekoratörlerini etkinleştirir veya devre dışı bırakır" +} \ No newline at end of file diff --git a/i18n/trk/extensions/extension-editing/out/extensionLinter.i18n.json b/i18n/trk/extensions/extension-editing/out/extensionLinter.i18n.json new file mode 100644 index 0000000000000..9de2d4f3706a2 --- /dev/null +++ b/i18n/trk/extensions/extension-editing/out/extensionLinter.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "httpsRequired": "Resimler HTTPS protokolünü kullanmalıdır.", + "svgsNotValid": "SVG'ler geçerli bir resim kaynağı değil.", + "embeddedSvgsNotValid": "Gömülü SVG'ler geçerli bir resim kaynağı değil.", + "dataUrlsNotValid": "Veri URL'leri geçerli bir resim kaynağı değil.", + "relativeUrlRequiresHttpsRepository": "Göreli resim URL'leri, package.json'da HTTPS protokollü bir depo gerektirir." +} \ No newline at end of file diff --git a/i18n/trk/extensions/extension-editing/out/packageDocumentHelper.i18n.json b/i18n/trk/extensions/extension-editing/out/packageDocumentHelper.i18n.json new file mode 100644 index 0000000000000..727dd6640ef4e --- /dev/null +++ b/i18n/trk/extensions/extension-editing/out/packageDocumentHelper.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "languageSpecificEditorSettings": "Dile özel düzenleyici ayarları", + "languageSpecificEditorSettingsDescription": "Dil için düzenleyici ayarlarını geçersiz kıl" +} \ No newline at end of file diff --git a/i18n/trk/extensions/git/out/askpass-main.i18n.json b/i18n/trk/extensions/git/out/askpass-main.i18n.json new file mode 100644 index 0000000000000..56e7f652dd6f5 --- /dev/null +++ b/i18n/trk/extensions/git/out/askpass-main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "missOrInvalid": "Eksik veya geçersiz kimlik bilgisi." +} \ No newline at end of file diff --git a/i18n/trk/extensions/git/out/commands.i18n.json b/i18n/trk/extensions/git/out/commands.i18n.json new file mode 100644 index 0000000000000..e630925a3da66 --- /dev/null +++ b/i18n/trk/extensions/git/out/commands.i18n.json @@ -0,0 +1,51 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tag at": "{0} üzerindeki etiket", + "remote branch at": "{0} üzerindeki uzak dal", + "repourl": "Depo URL'si", + "parent": "Üst Klasör", + "cloning": "Git deposu kopyalanıyor...", + "openrepo": "Depoyu Aç", + "proposeopen": "Kopyalanan depoyu açmak ister misiniz?", + "HEAD not available": "'{0}'e ait HEAD sürümü mevcut değil.", + "confirm revert": "{0} üzerindeki seçili değişiklikleri geri almak istediğinizden emin misiniz?", + "revert": "Değişiklikleri Geri Al", + "confirm discard": "{0} üzerindeki seçili değişiklikleri göz ardı etmek istediğinizden emin misiniz?", + "confirm discard multiple": "{0} dosyadaki değişiklikleri göz ardı etmek istediğinizden emin misiniz?", + "discard": "Değişiklikleri Göz Ardı Et", + "confirm discard all": "TÜM değişiklikleri göz ardı etmek istediğinizden emin misiniz? Bu, GERİ DÖNDÜRÜLEMEZ!", + "discardAll": "TÜM Değişiklikleri Göz Ardı Et", + "no staged changes": "Commit'lenecek hazırlanmış değişiklik yok.\n\nTüm değişikliklerinizi otomatik olarak hazırlamak ve direkt olarak commit'lemek ister misiniz?", + "yes": "Evet", + "always": "Her Zaman", + "no changes": "Commit'lenecek değişiklik yok.", + "commit message": "Commit mesajı", + "provide commit message": "Lütfen bir commit mesajı belirtin.", + "select a ref to checkout": "Geçiş yapılacak bir başvuru seçin", + "branch name": "Dal adı", + "provide branch name": "Lütfen bir dal adı belirtin", + "select branch to delete": "Silinecek dalı seçin", + "confirm force delete branch": "'{0}' dalı tamamen birleştirilmemiş. Yine de silinsin mi?", + "delete branch": "Dalı Sil", + "select a branch to merge from": "Birleştirilmesi için bir dal seçin", + "merge conflicts": "Birleştirme çakışmaları var. Commit'lemeden önce bunları çözün.", + "no remotes to pull": "Deponuzda çekme işleminin yapılacağı hiçbir uzak uçbirim yapılandırılmamış.", + "pick remote pull repo": "Dalın çekileceği bir uzak uçbirim seçin", + "no remotes to push": "Deponuzda gönderimin yapılacağı hiçbir uzak uçbirim yapılandırılmamış.", + "nobranch": "Lütfen uzak uçbirime gönderilecek dala geçiş yapın.", + "pick remote": "'{0}' dalının yayınlanacağı bir uzak uçbirim seçin:", + "sync is unpredictable": "Bu eylem, '{0}' esas projesine commitleri gönderecek ve alacaktır.", + "ok": "Tamam", + "never again": "Tamam, Tekrar Gösterme", + "no remotes to publish": "Deponuzda yayınlamanın yapılacağı hiçbir uzak uçbirim yapılandırılmamış.", + "disabled": "Git, ya devre dışı bırakılmış ya da bu çalışma alanında desteklenmiyor", + "clean repo": "Geçiş yapmadan önce deponuzdaki çalışma ağacınızı temizleyin.", + "cant push": "Başvurular uzak uçbirime gönderilemiyor. Değişikliklerinizi entegre etmeden, ilk olarak 'Çek'i çalıştırın. ", + "git error details": "Git: {0}", + "git error": "Git hatası", + "open git log": "Git Günlüğünü Aç" +} \ No newline at end of file diff --git a/i18n/trk/extensions/git/out/main.i18n.json b/i18n/trk/extensions/git/out/main.i18n.json new file mode 100644 index 0000000000000..eda1b0cc9a934 --- /dev/null +++ b/i18n/trk/extensions/git/out/main.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "using git": "{1} yolundaki git {0} kullanılıyor", + "updateGit": "Git'i Güncelle", + "neverShowAgain": "Tekrar gösterme", + "git20": "git {0} yüklemiş olarak görünüyorsunuz. Code, git >= 2 ile en iyi şekilde çalışır" +} \ No newline at end of file diff --git a/i18n/trk/extensions/git/out/model.i18n.json b/i18n/trk/extensions/git/out/model.i18n.json new file mode 100644 index 0000000000000..282a283d44382 --- /dev/null +++ b/i18n/trk/extensions/git/out/model.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "open": "Aç", + "merge changes": "Değişiklikleri Birleştir", + "staged changes": "Hazırlanmış Değişiklikler", + "changes": "Değişiklikler", + "ok": "Tamam", + "neveragain": "Tekrar Gösterme", + "huge": "'{0}' yolundaki git deposunda çok fazla aktif değişikliklik var, Git özelliklerinin yalnızca bir alt kümesi etkinleştirilecektir." +} \ No newline at end of file diff --git a/i18n/trk/extensions/git/out/scmProvider.i18n.json b/i18n/trk/extensions/git/out/scmProvider.i18n.json new file mode 100644 index 0000000000000..9d509d1398a39 --- /dev/null +++ b/i18n/trk/extensions/git/out/scmProvider.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "commit": "Commit'le" +} \ No newline at end of file diff --git a/i18n/trk/extensions/git/out/statusbar.i18n.json b/i18n/trk/extensions/git/out/statusbar.i18n.json new file mode 100644 index 0000000000000..eb7a0d55141d8 --- /dev/null +++ b/i18n/trk/extensions/git/out/statusbar.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "checkout": "Geçiş yap...", + "sync changes": "Değişiklikleri Senkronize Et", + "publish changes": "Değişiklikleri Yayınla", + "syncing changes": "Değişiklikler Senkronize Ediliyor..." +} \ No newline at end of file diff --git a/i18n/trk/extensions/git/package.i18n.json b/i18n/trk/extensions/git/package.i18n.json new file mode 100644 index 0000000000000..ce903ba937414 --- /dev/null +++ b/i18n/trk/extensions/git/package.i18n.json @@ -0,0 +1,53 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "command.clone": "Klonla", + "command.init": "Depo Oluştur", + "command.refresh": "Yenile", + "command.openChange": "Değişiklikleri Aç", + "command.openFile": "Dosya Aç", + "command.openHEADFile": "Dosya Aç (HEAD)", + "command.stage": "Değişiklikleri Hazırla", + "command.stageAll": "Tüm Değişiklikleri Hazırla", + "command.stageSelectedRanges": "Seçili Aralığı Hazırla", + "command.revertSelectedRanges": "Seçili Aralığı Geri Al", + "command.unstage": "Değişiklikleri Hazırlık Alanından Geri Al", + "command.unstageAll": "Tüm Değişiklikleri Hazırlık Alanından Geri Al", + "command.unstageSelectedRanges": "Seçili Alanı Hazırlık Alanından Geri Al", + "command.clean": "Değişiklikleri Göz Ardı Et", + "command.cleanAll": "Tüm Değişiklikleri Göz Ardı Et", + "command.commit": "Commit'le", + "command.commitStaged": "Hazırlananları Commit'le", + "command.commitStagedSigned": "Hazırlananları Commit'le (İmzalı)", + "command.commitAll": "Tümünü Commit'le", + "command.commitAllSigned": "Tümünü Commit'le (İmzalı)", + "command.undoCommit": "Son Commit'i Geri Al", + "command.checkout": "Geçiş yap...", + "command.branch": "Dal Oluştur...", + "command.deleteBranch": "Dalı Sil...", + "command.merge": "Dalı Birleştir...", + "command.pull": "Çek", + "command.pullRebase": "Çek (Yeniden Adresle)", + "command.pullFrom": "Şuradan Çek...", + "command.push": "Gönder", + "command.pushTo": "Gönder...", + "command.sync": "Senkronize Et", + "command.publish": "Dalı Yayınla", + "command.showOutput": "Git Çıktısını Göster", + "command.ignore": ".gitignore'a Dosya Ekle", + "config.enabled": "Git'in etkinleştirilip etkinleştirilmediği", + "config.path": "Çalıştırılabilir Git dosyasının yolu", + "config.autorefresh": "Otomatik yenilemenin etkinleştirilip etkinleştirilmediği", + "config.autofetch": "Otomatik getirmenin etkinleştirilip etkinleştirilmediği", + "config.enableLongCommitWarning": "Uzun commit mesajları hakkında uyarıda bulunulup bulunulmayacağı", + "config.confirmSync": "Git depolarını senkronize etmeden önce onaylayın", + "config.countBadge": "Git gösterge sayacını denetler. `all` tüm değişiklikleri sayar. `tracked` sadece izlenen değişikliklikleri sayar. `off` ise kapatır.", + "config.checkoutType": "`Geçiş Yap...` çalıştırılırken listelenecek dal türlerini denetler. `all` tüm başvuruları gösterir, `local` sadece yerel dalları gösterir, `tags` sadece etiketleri gösterir ve `remote` sadece uzak uçbirim dallarını gösterir.", + "config.ignoreLegacyWarning": "Eski Git uyarısını görmezden gelir", + "config.ignoreLimitWarning": "Bir depoda çok fazla değişiklik var uyarısını görmezden gelir", + "config.defaultCloneDirectory": "Bir git deposunun kopyalanacağı varsayılan konum", + "config.enableSmartCommit": "Hazırlanan değişiklik yoksa tüm değişiklikleri commit'le." +} \ No newline at end of file diff --git a/i18n/trk/extensions/grunt/out/main.i18n.json b/i18n/trk/extensions/grunt/out/main.i18n.json new file mode 100644 index 0000000000000..a379bb7fabe93 --- /dev/null +++ b/i18n/trk/extensions/grunt/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "Grunt otomatik tespiti hata ile sonuçlandı: {0}" +} \ No newline at end of file diff --git a/i18n/trk/extensions/grunt/package.i18n.json b/i18n/trk/extensions/grunt/package.i18n.json new file mode 100644 index 0000000000000..0a027f4d95479 --- /dev/null +++ b/i18n/trk/extensions/grunt/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.grunt.autoDetect": "Grunt görevlerinin otomatik olarak algılanıp algılanmayacağını denetler. Varsayılan olarak açıktır." +} \ No newline at end of file diff --git a/i18n/trk/extensions/gulp/out/main.i18n.json b/i18n/trk/extensions/gulp/out/main.i18n.json new file mode 100644 index 0000000000000..419e64b90d825 --- /dev/null +++ b/i18n/trk/extensions/gulp/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "Gulp otomatik tespiti hata ile sonuçlandı: {0}" +} \ No newline at end of file diff --git a/i18n/trk/extensions/gulp/package.i18n.json b/i18n/trk/extensions/gulp/package.i18n.json new file mode 100644 index 0000000000000..11a00f49019be --- /dev/null +++ b/i18n/trk/extensions/gulp/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.gulp.autoDetect": "Gulp görevlerinin otomatik olarak algılanıp algılanmayacağını denetler. Varsayılan olarak açıktır." +} \ No newline at end of file diff --git a/i18n/trk/extensions/html/client/out/htmlMain.i18n.json b/i18n/trk/extensions/html/client/out/htmlMain.i18n.json new file mode 100644 index 0000000000000..768300d269bfb --- /dev/null +++ b/i18n/trk/extensions/html/client/out/htmlMain.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "htmlserver.name": "HTML Dil Sunucusu" +} \ No newline at end of file diff --git a/i18n/trk/extensions/html/package.i18n.json b/i18n/trk/extensions/html/package.i18n.json new file mode 100644 index 0000000000000..ee68938c898cc --- /dev/null +++ b/i18n/trk/extensions/html/package.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "html.format.enable.desc": "Varsayılan HTML biçimlendiricisini etkinleştirin/devre dışı bırakın (yeniden başlatma gerektirir)", + "html.format.wrapLineLength.desc": "Satır başına en fazla karakter miktarı (0 = devre dışı bırak)", + "html.format.unformatted.desc": "Yeniden biçimlendirilmeyecek virgülle ayrılmış etiketler listesi. 'null' değeri, https://www.w3.org/TR/html5/dom.html#phrasing-content adresinde listelenen tüm etiketleri varsayılan olarak belirler.", + "html.format.contentUnformatted.desc": "İçeriğin yeniden biçimlendirilmeyeceği virgülle ayrılmış etiketler listesi. 'null' değeri, 'pre' etiketini varsayılan olarak belirler.", + "html.format.indentInnerHtml.desc": " ve bölümlerini girintile.", + "html.format.preserveNewLines.desc": "Ögelerden önceki mevcut satır sonlarının korunup korunmayacağı. Yalnızca ögelerden önce çalışır, etiketler içinde veya metinde çalışmaz.", + "html.format.maxPreserveNewLines.desc": "Bir öbekte korunacak maksimum satır sonu sayısı. Sınırsız için 'null' değerini kullanın.", + "html.format.indentHandlebars.desc": "{{#foo}} ve {{/foo}}'yu biçimlendir ve girintile.", + "html.format.endWithNewline.desc": "Boş bir satırla bitir.", + "html.format.extraLiners.desc": "Kendilerinden önce ek bir boş satır bulunması gereken virgülle ayrılmış etiketler listesi. 'null' değeri, \"head, body, /html\" değerini varsayılan olarak belirler.", + "html.format.wrapAttributes.desc": "Öznitelikleri sarmala.", + "html.format.wrapAttributes.auto": "Öznitelikleri sadece satır uzunluğu aşıldığında sarmala.", + "html.format.wrapAttributes.force": "İlki hariç tüm öznitelikleri sarmala.", + "html.format.wrapAttributes.forcealign": "İlki hariç tüm öznitelikleri sarmala ve hizada tut.", + "html.format.wrapAttributes.forcemultiline": "Tüm öznitelikleri sarmala.", + "html.suggest.angular1.desc": "Yerleşik HTML dili desteğinin Angular V1 etiketlerini ve özelliklerini önerip önermeyeceğini yapılandırır.", + "html.suggest.ionic.desc": "Yerleşik HTML dili desteğinin Ionic etiketlerini, özelliklerini ve değerlerini önerip önermeyeceğini yapılandırır.", + "html.suggest.html5.desc": "Yerleşik HTML dili desteğinin HTML5 etiketlerini, özelliklerini ve değerlerini önerip önermeyeceğini yapılandırır.", + "html.validate.scripts": "Yerleşik HTML dili desteğinin HTML5 gömülü betikleri doğrulayıp doğrulamayacağını yapılandırır.", + "html.validate.styles": "Yerleşik HTML dili desteğinin HTML5 gömülü stilleri doğrulayıp doğrulamayacağını yapılandırır." +} \ No newline at end of file diff --git a/i18n/trk/extensions/jake/out/main.i18n.json b/i18n/trk/extensions/jake/out/main.i18n.json new file mode 100644 index 0000000000000..c94980eca2f63 --- /dev/null +++ b/i18n/trk/extensions/jake/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "Jake otomatik tespiti hata ile sonuçlandı: {0}" +} \ No newline at end of file diff --git a/i18n/trk/extensions/jake/package.i18n.json b/i18n/trk/extensions/jake/package.i18n.json new file mode 100644 index 0000000000000..983e8866dea35 --- /dev/null +++ b/i18n/trk/extensions/jake/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.jake.autoDetect": "Jake görevlerinin otomatik olarak algılanıp algılanmayacağını denetler. Varsayılan olarak açıktır." +} \ No newline at end of file diff --git a/i18n/trk/extensions/javascript/out/features/bowerJSONContribution.i18n.json b/i18n/trk/extensions/javascript/out/features/bowerJSONContribution.i18n.json new file mode 100644 index 0000000000000..8e2b17e627dce --- /dev/null +++ b/i18n/trk/extensions/javascript/out/features/bowerJSONContribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "json.bower.default": "Varsayılan bower.json", + "json.bower.error.repoaccess": "Bower deposuna yapılan istek başarısız oldu: {0}", + "json.bower.latest.version": "en son" +} \ No newline at end of file diff --git a/i18n/trk/extensions/javascript/out/features/packageJSONContribution.i18n.json b/i18n/trk/extensions/javascript/out/features/packageJSONContribution.i18n.json new file mode 100644 index 0000000000000..702ad94d30e0c --- /dev/null +++ b/i18n/trk/extensions/javascript/out/features/packageJSONContribution.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "json.package.default": "Varsayılan package.json", + "json.npm.error.repoaccess": "NPM deposuna yapılan istek başarısız oldu: {0}", + "json.npm.latestversion": "Paketin şu andaki en son sürümü", + "json.npm.majorversion": "En son birincil sürümle eşleşiyor (1.x.x)", + "json.npm.minorversion": "En son ikincil sürümle eşleşiyor (1.2.x)", + "json.npm.version.hover": "En son sürüm: {0}" +} \ No newline at end of file diff --git a/i18n/trk/extensions/json/client/out/jsonMain.i18n.json b/i18n/trk/extensions/json/client/out/jsonMain.i18n.json new file mode 100644 index 0000000000000..f0d4863e7459b --- /dev/null +++ b/i18n/trk/extensions/json/client/out/jsonMain.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "jsonserver.name": "JSON Dil Sunucusu" +} \ No newline at end of file diff --git a/i18n/trk/extensions/json/package.i18n.json b/i18n/trk/extensions/json/package.i18n.json new file mode 100644 index 0000000000000..bc1296fa6f9b9 --- /dev/null +++ b/i18n/trk/extensions/json/package.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "json.schemas.desc": "Şemaları geçerli projedeki JSON dosyalarıyla ilişkilendir", + "json.schemas.url.desc": "Bir şemanın URL'si veya geçerli dizindeki bir şemanın göreli yolu", + "json.schemas.fileMatch.desc": "JSON dosyaları şemalara çözümlenirken eşleşme için kullanılacak bir dosya düzenleri dizisi.", + "json.schemas.fileMatch.item.desc": "JSON dosyaları şemalara çözümlenirken eşleşme için '*' içerebilen bir dosya düzeni.", + "json.schemas.schema.desc": "Verilen URL için şema tanımı. Şema, yalnızca şema URL'sine erişimi önlemek için sağlanmalıdır.", + "json.format.enable.desc": "Varsayılan JSON biçimlendiricisini etkinleştirin/devre dışı bırakın (yeniden başlatma gerektirir)", + "json.tracing.desc": "VS Code ve JSON dil sunucusu arasındaki iletişimi izler.", + "json.colorDecorators.enable.desc": "Renk dekoratörlerini etkinleştirir veya devre dışı bırakır" +} \ No newline at end of file diff --git a/i18n/trk/extensions/markdown/out/extension.i18n.json b/i18n/trk/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..de26700eac418 --- /dev/null +++ b/i18n/trk/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "onPreviewStyleLoadError": "'markdown.styles' yüklenemedi: {0}" +} \ No newline at end of file diff --git a/i18n/trk/extensions/markdown/out/previewContentProvider.i18n.json b/i18n/trk/extensions/markdown/out/previewContentProvider.i18n.json new file mode 100644 index 0000000000000..83d25162ae31e --- /dev/null +++ b/i18n/trk/extensions/markdown/out/previewContentProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "preview.securityMessage.text": "Bu belgede betikler devre dışı bırakıldı", + "preview.securityMessage.title": "Markdown önizlemesinde belgede betikler devre dışı bırakılmıştır. Betikleri etkinleştirmek için Markdown önizleme güvenlik ayarlarını değiştirin", + "preview.securityMessage.label": "Betikler Devre Dışı Güvenlik Uyarısı" +} \ No newline at end of file diff --git a/i18n/trk/extensions/markdown/out/security.i18n.json b/i18n/trk/extensions/markdown/out/security.i18n.json new file mode 100644 index 0000000000000..f6bd3d4536474 --- /dev/null +++ b/i18n/trk/extensions/markdown/out/security.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "preview.showPreviewSecuritySelector.disallowScriptsForWorkspaceTitle": "Bu çalışma alanındaki Markdown önizlemelerinde betik çalıştırmayı devre dışı bırak", + "preview.showPreviewSecuritySelector.currentSelection": "Geçerli ayar", + "preview.showPreviewSecuritySelector.allowScriptsForWorkspaceTitle": "Bu çalışma alanındaki Markdown önizlemelerinde betik çalıştırmayı etkinleştir", + "preview.showPreviewSecuritySelector.title": "Markdown önizlemesi için güvenlik ayarlarını değiştir" +} \ No newline at end of file diff --git a/i18n/trk/extensions/markdown/package.i18n.json b/i18n/trk/extensions/markdown/package.i18n.json new file mode 100644 index 0000000000000..17a9ae3b3df75 --- /dev/null +++ b/i18n/trk/extensions/markdown/package.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "markdown.preview.breaks.desc": "Markdown önizlemesinde satır sonlarının nasıl gösterileceğini ayarlar. 'true' olarak ayarlamak, her yeni satırda bir
oluşturur.", + "markdown.preview.doubleClickToSwitchToEditor.desc": "Düzenleyiciye geçiş yapmak için Markdown önizlemesine çift tıklayın.", + "markdown.preview.fontFamily.desc": "Markdown önizlemesinde kullanılan yazı tipi ailesini denetler.", + "markdown.preview.fontSize.desc": "Markdown önizlemesinde kullanılan yazı tipi boyutunu piksel olarak denetler.", + "markdown.preview.lineHeight.desc": "Markdown önizlemesinde kullanılan satır yüksekliğini denetler. Bu sayı yazı tipi boyutuna görecelidir.", + "markdown.preview.markEditorSelection.desc": "Markdown önizlemesinde geçerli düzenleyici seçimini işaretle.", + "markdown.preview.scrollEditorWithPreview.desc": "Markdown önizlemesi kaydırıldığında, düzenleyicinin görünümünü güncelle.", + "markdown.preview.scrollPreviewWithEditorSelection.desc": "Düzenleyicide seçili satırın görünmesi için Markdown önizlemesini kaydırır.", + "markdown.preview.title": "Önizlemeyi Aç", + "markdown.previewFrontMatter.dec": "YAML ön maddesinin Markdown önizlemesinde nasıl gösterilmesi gerektiğini ayarlar. 'hide' ön maddeyi kaldırır. Diğer türlü; ön madde, Markdown içeriği olarak sayılır.", + "markdown.previewSide.title": "Önizlemeyi Yana Aç", + "markdown.showSource.title": "Kaynağı Göster", + "markdown.styles.dec": "Markdown önizlemesinde kullanılmak üzere CSS stil dosyalarını işaret eden bir URL'ler veya yerel yollar listesi. Göreli yollar, gezginde açılan klasöre göreli olarak yorumlanır.", + "markdown.showPreviewSecuritySelector.title": "Markdown Önizleme Güvenlik Ayarlarını Değiştir", + "markdown.preview.enableExperimentalExtensionApi.desc": "[Deneysel] Eklentilere Markdown önizlemesini genişletmek için izin ver.", + "markdown.trace.desc": "Markdown eklentisi için hata ayıklama günlüğünü etkinleştir." +} \ No newline at end of file diff --git a/i18n/trk/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/trk/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..26571af8cf39c --- /dev/null +++ b/i18n/trk/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "acceptCurrentChange": "Geçerli Değişikliği Kabul Et", + "acceptIncomingChange": "Gelen Değişikliği Kabul Et", + "acceptBothChanges": "Her İki Değişikliği de Kabul Et", + "compareChanges": "Değişiklikleri Karşılaştır" +} \ No newline at end of file diff --git a/i18n/trk/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/trk/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..3811062c8a33c --- /dev/null +++ b/i18n/trk/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "cursorNotInConflict": "Düzenleyici imleci birleştirme çakışması içinde değil", + "compareChangesTitle": "{0}: Geçerli Değişiklikler ⟷ Gelen Değişiklikler", + "cursorOnCommonAncestorsRange": "Düzenleyici imleci ortak atalar bloğunda, imleci lütfen \"geçerli\" veya \"gelen\" bloğundan birine getirin", + "cursorOnSplitterRange": "Düzenleyici imleci birleştirme çakışması ayırıcısında, imleci lütfen \"geçerli\" veya \"gelen\" bloğundan birine getirin", + "noConflicts": "Bu dosyada birleştirme çakışması bulunamadı", + "noOtherConflictsInThisFile": "Bu dosyada başka birleştirme çakışması bulunamadı" +} \ No newline at end of file diff --git a/i18n/trk/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/trk/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..4e7bccae262ac --- /dev/null +++ b/i18n/trk/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "currentChange": "(Geçerli Değişiklik)", + "incomingChange": "(Gelen Değişiklik)" +} \ No newline at end of file diff --git a/i18n/trk/extensions/merge-conflict/package.i18n.json b/i18n/trk/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..75e7f2cd722ed --- /dev/null +++ b/i18n/trk/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "command.category": "Birleştirme Çakışması", + "command.accept.all-incoming": "Gelen Tümünü Kabul Et", + "command.accept.all-both": "Tümünü Birden Kabul Et", + "command.accept.current": "Şuan Geçerli Olanı Kabul Et", + "command.accept.incoming": "Geleni Kabul Et", + "command.accept.selection": "Seçimi Kabul Et", + "command.accept.both": "Her İkisini de Kabul Et", + "command.next": "Sonraki Çakışma", + "command.previous": "Önceki Çakışma", + "command.compare": "Geçerli Çakışmayı Karşılaştır", + "config.title": "Birleştirme Çakışması", + "config.codeLensEnabled": "Düzenleyicideki birleştirme çakışması bloğu kod objektifini etkinleştir veya devre dışı bırak", + "config.decoratorsEnabled": "Düzenleyicideki birleştirme çakışması dekoratörlerini etkinleştir veya devre dışı bırak" +} \ No newline at end of file diff --git a/i18n/trk/extensions/npm/package.i18n.json b/i18n/trk/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..5bda141ad8b60 --- /dev/null +++ b/i18n/trk/extensions/npm/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.npm.autoDetect": "Npm betiklerinin otomatik olarak algılanıp algılanmayacağını denetler. Varsayılan olarak açıktır." +} \ No newline at end of file diff --git a/i18n/trk/extensions/php/out/features/validationProvider.i18n.json b/i18n/trk/extensions/php/out/features/validationProvider.i18n.json new file mode 100644 index 0000000000000..dbfa92074c836 --- /dev/null +++ b/i18n/trk/extensions/php/out/features/validationProvider.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "php.useExecutablePath": "{0} (çalışma alanı ayarı olarak tanımlı) yürütülebilir dosyasına PHP dosyalarını doğrulama izni veriyor musunuz?", + "php.yes": "İzin Ver", + "php.no": "İzin Verme", + "wrongExecutable": "{0} geçerli bir php yürütülebilir dosyası olmadığı için doğrulanamıyor. PHP yürütülebilir dosyasını yapılandırmak için 'php.validate.executablePath' ayarını kullanın.", + "noExecutable": "Hiçbir PHP yürütülebilir dosyası ayarlanmadığı için doğrulanamıyor. PHP yürütülebilir dosyasını yapılandırmak için 'php.validate.executablePath' ayarını kullanın.", + "unknownReason": "{0} yolu kullanılarak php çalıştırılamadı. Sebep bilinmiyor." +} \ No newline at end of file diff --git a/i18n/trk/extensions/php/package.i18n.json b/i18n/trk/extensions/php/package.i18n.json new file mode 100644 index 0000000000000..d0a4266c125c0 --- /dev/null +++ b/i18n/trk/extensions/php/package.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "configuration.suggest.basic": "Yerleşik PHP dili önerilerinin etkinleştirilip etkinleştirilmediğini yapılandırır. Destek, PHP globalleri ve değişkenleri önerir.", + "configuration.validate.enable": "Yerleşik PHP doğrulamasını etkinleştir/devre dışı bırak.", + "configuration.validate.executablePath": "PHP çalıştırılabilir dosyasına işaret eder.", + "configuration.validate.run": "Doğrulayıcının kayıt esnasında mı tuşlama esnasında mı çalışacağı.", + "configuration.title": "PHP", + "commands.categroy.php": "PHP", + "command.untrustValidationExecutable": "PHP doğrulama yürütülebilir dosyasına izin verme (çalışma alanı ayarı olarak tanımlanır)" +} \ No newline at end of file diff --git a/i18n/trk/extensions/typescript/out/features/bufferSyncSupport.i18n.json b/i18n/trk/extensions/typescript/out/features/bufferSyncSupport.i18n.json new file mode 100644 index 0000000000000..a496aae13e050 --- /dev/null +++ b/i18n/trk/extensions/typescript/out/features/bufferSyncSupport.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "versionMismatch": "Düzenleyici özellikleri için TypeScript ({1}) kullanılıyor. TypeScript ({0}) makinanızda global olarak yüklenmiş durumda. VS Code'daki hatalar TSC hatalarından farklı olabilir", + "moreInformation": "Daha Fazla Bilgi", + "doNotCheckAgain": "Tekrar Kontrol Etme", + "close": "Kapat", + "updateTscCheck": "Kullanıcı ayarı 'typescript.check.tscVersion', \"false\" olarak güncellendi" +} \ No newline at end of file diff --git a/i18n/trk/extensions/typescript/out/features/completionItemProvider.i18n.json b/i18n/trk/extensions/typescript/out/features/completionItemProvider.i18n.json new file mode 100644 index 0000000000000..de2a515d9aba7 --- /dev/null +++ b/i18n/trk/extensions/typescript/out/features/completionItemProvider.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "acquiringTypingsLabel": "Tuşlamalar alınıyor...", + "acquiringTypingsDetail": "IntelliSense için tuşlama tanımları alınıyor..." +} \ No newline at end of file diff --git a/i18n/trk/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/trk/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json new file mode 100644 index 0000000000000..de25bb3c5f8d3 --- /dev/null +++ b/i18n/trk/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ts-check": "Bir JavaScript dosyasının anlamsal kontrolünü etkinleştirir. Bir dosyanın en üstünde olmalıdır.", + "ts-nocheck": "Bir JavaScript dosyasının anlamsal kontrolünü devre dışı bırakır. Bir dosyanın en üstünde olmalıdır.", + "ts-ignore": "Bir dosyanın sonraki satırında @ts-check hatalarını bastırır." +} \ No newline at end of file diff --git a/i18n/trk/extensions/typescript/out/features/implementationsCodeLensProvider.i18n.json b/i18n/trk/extensions/typescript/out/features/implementationsCodeLensProvider.i18n.json new file mode 100644 index 0000000000000..05ad64ea38263 --- /dev/null +++ b/i18n/trk/extensions/typescript/out/features/implementationsCodeLensProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "oneImplementationLabel": "1 uygulama", + "manyImplementationLabel": "{0} uygulama", + "implementationsErrorLabel": "Uygulamalar belirlenemedi" +} \ No newline at end of file diff --git a/i18n/trk/extensions/typescript/out/features/jsDocCompletionProvider.i18n.json b/i18n/trk/extensions/typescript/out/features/jsDocCompletionProvider.i18n.json new file mode 100644 index 0000000000000..203488810a2bb --- /dev/null +++ b/i18n/trk/extensions/typescript/out/features/jsDocCompletionProvider.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "typescript.jsDocCompletionItem.documentation": "JSDoc yorumu" +} \ No newline at end of file diff --git a/i18n/trk/extensions/typescript/out/features/referencesCodeLensProvider.i18n.json b/i18n/trk/extensions/typescript/out/features/referencesCodeLensProvider.i18n.json new file mode 100644 index 0000000000000..34242b700576b --- /dev/null +++ b/i18n/trk/extensions/typescript/out/features/referencesCodeLensProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "oneReferenceLabel": "1 başvuru", + "manyReferenceLabel": "{0} başvuru", + "referenceErrorLabel": "Başvurular belirlenemedi" +} \ No newline at end of file diff --git a/i18n/trk/extensions/typescript/out/typescriptMain.i18n.json b/i18n/trk/extensions/typescript/out/typescriptMain.i18n.json new file mode 100644 index 0000000000000..2751d3bb07c45 --- /dev/null +++ b/i18n/trk/extensions/typescript/out/typescriptMain.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "typescript.projectConfigNoWorkspace": "Bir TypeScript veya JavaScript projesini kullanmak için lütfen bir klasör açın", + "typescript.projectConfigUnsupportedFile": "TypeScript mi yoksa JavaScript mi projesi olduğu tespit edilemedi. Desteklenmeyen dosya türü", + "typescript.projectConfigCouldNotGetInfo": "TypeScript mi yoksa JavaScript mi projesi olduğu tespit edilemedi", + "typescript.noTypeScriptProjectConfig": "Dosya bir TypeScript projesinin bir parçası değil", + "typescript.noJavaScriptProjectConfig": "Dosya bir JavaScript projesinin bir parçası değil", + "typescript.configureTsconfigQuickPick": "tsconfig.json'u yapılandır", + "typescript.configureJsconfigQuickPick": "jsconfig.json'u yapılandır", + "typescript.projectConfigLearnMore": "Daha Fazla Bilgi Edin" +} \ No newline at end of file diff --git a/i18n/trk/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/trk/extensions/typescript/out/typescriptServiceClient.i18n.json new file mode 100644 index 0000000000000..3cdde46b706b6 --- /dev/null +++ b/i18n/trk/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noServerFound": "{0} yolu geçerli bir tsserver kurulumuna işaret etmiyor. Paketlenmiş TypeScript sürümüne geri dönülüyor.", + "noBundledServerFound": "VSCode'un tsserver'ı hatalı bir virüs tespit aracı gibi bir uygulama tarafından silindi. Lütfen VS Code'u yeniden yükleyin", + "versionNumber.custom": "özel", + "serverCouldNotBeStarted": "TypeScript dil sunucusu başlatılamadı. Hata mesajı: {0}", + "useVSCodeVersionOption": "VSCode'un Sürümünü Kullan", + "activeVersion": "Şu an aktif", + "useWorkspaceVersionOption": "Çalışma Alanı Sürümünü Kullan", + "learnMore": "Daha Fazla Bilgi Edin", + "selectTsVersion": "JavaScript ve TypeScript dil özellikleri için kullanılacak TypeScript sürümünü seçin", + "typescript.openTsServerLog.notSupported": "TS Sunucu günlüğü için TS 2.2.2+ gerekiyor", + "typescript.openTsServerLog.loggingNotEnabled": "TS Sunucu günlüğü kapalı. Lütfen `typescript.tsserver.log` ögesini ayarlayın ve günlüğe yazmayı etkinleştirmek için TS sunucusunu yeniden başlatın", + "typescript.openTsServerLog.enableAndReloadOption": "Günlüğe yazmayı etkinleştir ve TS sunucusunu yeniden başlat", + "typescript.openTsServerLog.noLogFile": "TS sunucu günlüğe yazmaya başlamadı.", + "openTsServerLog.openFileFailedFailed": "TS Sunucu günlük dosyası açılamadı", + "serverDiedAfterStart": "TypeScript dil hizmeti, başladıktan hemen sonra 5 kez kapandı. Hizmet yeniden başlatılmayacaktır.", + "serverDiedReportIssue": "Sorun Bildir", + "serverDied": "TypeScript dil hizmeti, son 5 dakikada 5 kez beklenmedik şekilde kapandı." +} \ No newline at end of file diff --git a/i18n/trk/extensions/typescript/out/utils/logger.i18n.json b/i18n/trk/extensions/typescript/out/utils/logger.i18n.json new file mode 100644 index 0000000000000..bc738f43d0c37 --- /dev/null +++ b/i18n/trk/extensions/typescript/out/utils/logger.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "channelName": "TypeScript" +} \ No newline at end of file diff --git a/i18n/trk/extensions/typescript/out/utils/projectStatus.i18n.json b/i18n/trk/extensions/typescript/out/utils/projectStatus.i18n.json new file mode 100644 index 0000000000000..3deea612eabfb --- /dev/null +++ b/i18n/trk/extensions/typescript/out/utils/projectStatus.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hintExclude": "Proje çapında JavaScript/TypeScript dil özelliklerini etkinleştirmek için, şunlar gibi birçok dosyaya sahip klasörleri hariç tutun: {0}", + "hintExclude.generic": "Proje çapında JavaScript/TypeScript dil özelliklerini etkinleştirmek için, üzerinde çalışmadığınız kaynak dosyalar içeren büyük klasörleri hariç tutun.", + "large.label": "Hariç Tutmaları Yapılandır", + "hintExclude.tooltip": "Proje çapında JavaScript/TypeScript dil özelliklerini etkinleştirmek için, üzerinde çalışmadığınız kaynak dosyalar içeren büyük klasörleri hariç tutun." +} \ No newline at end of file diff --git a/i18n/trk/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/trk/extensions/typescript/out/utils/typingsStatus.i18n.json new file mode 100644 index 0000000000000..acdcdf70be50d --- /dev/null +++ b/i18n/trk/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "installingPackages": "Daha iyi TypeScript IntelliSense için veri alınıyor", + "typesInstallerInitializationFailed.title": "JavaScript dil özellikleri için tuşlama dosyaları yüklenemedi. Lütfen NPM'in yüklenmiş olduğundan veya kullanıcı ayarlarınızda 'typescript.npm' ögesini yapılandırın", + "typesInstallerInitializationFailed.moreInformation": "Daha Fazla Bilgi", + "typesInstallerInitializationFailed.doNotCheckAgain": "Tekrar Kontrol Etme", + "typesInstallerInitializationFailed.close": "Kapat" +} \ No newline at end of file diff --git a/i18n/trk/extensions/typescript/package.i18n.json b/i18n/trk/extensions/typescript/package.i18n.json new file mode 100644 index 0000000000000..b99c57b16e88c --- /dev/null +++ b/i18n/trk/extensions/typescript/package.i18n.json @@ -0,0 +1,51 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "typescript.reloadProjects.title": "Projeyi Yeniden Yükle", + "javascript.reloadProjects.title": "Projeyi Yeniden Yükle", + "configuration.typescript": "TypeScript", + "typescript.useCodeSnippetsOnMethodSuggest.dec": "İşlevleri parametre imzalarıyla tamamlayın.", + "typescript.tsdk.desc": "Kullanılacak tsserver ve lib*.d.ts dosyalarını içeren klasör yolunu belirtir.", + "typescript.disableAutomaticTypeAcquisition": "Otomatik tür kazanımını devre dışı bırakır. TypeScript >= 2.0.6 ve değiştirildikten sonra yeniden başlatma gerektirir.", + "typescript.check.tscVersion": "Global TypeScript derleyicisinin(ör. tsc) kullanılan TypeScript dil hizmetinden farklı olup olmadığını kontrol et.", + "typescript.tsserver.log": "TS sunucusunun bir dosyaya günlük yazmasını etkinleştirir. Bu günlük, TS Sunucu sorunlarını teşhis etmek için kullanılabilir. Günlük dosya yollarını, kaynak kodunu ve projenizdeki diğer muhtemel hassas bilgileri içerebilir.", + "typescript.tsserver.trace": "TS sunucusuna gönderilen mesajları izlemeyi etkinleştirir. Bu izleme, TS Sunucu sorunlarını teşhis etmek için kullanılabilir. İzleme; dosya yollarını, kaynak kodunu ve projenizdeki diğer muhtemel hassas bilgileri içerebilir.", + "typescript.validate.enable": "TypeScript doğrulamasını etkinleştir veya devre dışı bırak.", + "typescript.format.enable": "Varsayılan TypeScript biçimlendiricisini etkinleştirin/devre dışı bırakın.", + "javascript.format.enable": "Varsayılan JavaScript biçimlendiricisini etkinleştir veya devre dışı bırak.", + "format.insertSpaceAfterCommaDelimiter": "Virgül sınırlayıcısından sonra boşluk eklenmesini tanımlar.", + "format.insertSpaceAfterConstructor": "Oluşturucu anahtar kelimesinden sonra boşluk eklenip eklenmeyeceğini tanımlar. TypeScript >= 2.3.0 gerektirir.", + "format.insertSpaceAfterSemicolonInForStatements": "Bir ifade için noktalı virgülden sonra boşluk eklenmesini tanımlar.", + "format.insertSpaceBeforeAndAfterBinaryOperators": "Bir ikili operatöründen sonra boşluk eklenmesini tanımlar.", + "format.insertSpaceAfterKeywordsInControlFlowStatements": "Bir kontrol akışı ifadesi için anahtar kelimelerden sonra boşluk eklenmesini tanımlar.", + "format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": "Anonim fonksiyonlar için \"function\" anahtar kelimesinden sonra boşluk eklenmesini tanımlar.", + "format.insertSpaceBeforeFunctionParenthesis": "Fonksiyon argüman parantezlerinden önce boşluk eklenmesini tanımlar. TypeScript >= 2.1.5 gerektirir.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": "Boş olmayan parantezler açıldıktan sonra ve kapatılmadan önce boşluk eklenmesini tanımlar.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": "Boş olmayan köşeli parantezler açıldıktan sonra ve kapatılmadan önce boşluk eklenmesini tanımlar.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": "Boş olmayan küme parantezleri açıldıktan sonra ve kapatılmadan önce boşluk eklenmesini tanımlar. TypeScript >= 2.3.0 gerektirir.", + "format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": "Şablon dizesi ayraçları açıldıktan sonra ve kapatılmadan önce boşluk eklenmesini tanımlar. TypeScript >= 2.0.6 gerektirir.", + "format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": "JSX ifadesi ayraçları açıldıktan sonra ve kapatılmadan önce boşluk eklenmesini tanımlar. TypeScript >= 2.0.6 gerektirir.", + "format.insertSpaceAfterTypeAssertion": "TypeScript'te tür iddialarından sonra boşluk eklenip eklenmeyeceğini tanımlar. TypeScript >= 2.4 gerektirir.", + "format.placeOpenBraceOnNewLineForFunctions": "Fonksiyonlarda bir açılış ayracının yeni satıra koyulup koyulmayacağını tanımlar.", + "format.placeOpenBraceOnNewLineForControlBlocks": "Kontrol bloklarında bir açılış ayracının yeni satıra koyulup koyulmayacağını tanımlar.", + "javascript.validate.enable": "JavaScript doğrulamasını etkinleştir veya devre dışı bırak.", + "typescript.goToProjectConfig.title": "Proje Yapılandırmasına Git", + "javascript.goToProjectConfig.title": "Proje Yapılandırmasına Git", + "javascript.referencesCodeLens.enabled": "JavaScript dosyalarında başvuru kod objektifini etkinleştir veya devre dışı bırak.", + "typescript.referencesCodeLens.enabled": "TypeScript dosyalarında başvuru kod objektifini etkinleştir veya devre dışı bırak. TypeScript >= 2.0.6 gerektirir.", + "typescript.implementationsCodeLens.enabled": "Uygulama kod objektifini etkinleştir veya devre dışı bırak. TypeScript >= 2.2.0 gerektirir.", + "typescript.openTsServerLog.title": "TS Sunucu günlüğünü aç", + "typescript.restartTsServer": "TS sunucusunu yeniden başlat", + "typescript.selectTypeScriptVersion.title": "TypeScript Sürümünü Seç", + "jsDocCompletion.enabled": "Otomatik JSDoc yorumlarını etkinleştir veya devre dışı bırak.", + "javascript.implicitProjectConfig.checkJs": "JavaScript dosyalarının anlamsal kontrolünü etkinleştir veya devre dışı bırak. Mevcut jsconfig.json veya tsconfig.json dosyaları bu ayarı geçersiz kılar. TypeScript >= 2.3.1 gerektirir.", + "typescript.npm": "Otomatik Tür Kazanımı için kullanılacak NPM yürütülebilir dosyasının yolunu belirtir. TypeScript >= 2.3.4 gerektirir.", + "typescript.check.npmIsInstalled": "Otomatik Tür Kazanımı için NPM'in yüklü olup olmadığını kontrol et.", + "javascript.nameSuggestions": "JavaScript öneri listelerindeki dosyadan benzersiz adları eklemeyi etkinleştir veya devre dışı bırak.", + "typescript.tsc.autoDetect": "Tsc görevlerinin otomatik olarak algılanıp algılanmayacağını denetler. Varsayılan olarak açıktır.", + "typescript.problemMatchers.tsc.label": "TypeScript sorunları", + "typescript.problemMatchers.tscWatch.label": "TypeScript sorunları (izleme modu)" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/browser/ui/actionbar/actionbar.i18n.json b/i18n/trk/src/vs/base/browser/ui/actionbar/actionbar.i18n.json new file mode 100644 index 0000000000000..4ecb2c803f4cd --- /dev/null +++ b/i18n/trk/src/vs/base/browser/ui/actionbar/actionbar.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "titleLabel": "{0} ({1})" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/browser/ui/aria/aria.i18n.json b/i18n/trk/src/vs/base/browser/ui/aria/aria.i18n.json new file mode 100644 index 0000000000000..4fa2c84df1026 --- /dev/null +++ b/i18n/trk/src/vs/base/browser/ui/aria/aria.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "repeated": "{0} (tekrar oluştu)" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/browser/ui/findinput/findInput.i18n.json b/i18n/trk/src/vs/base/browser/ui/findinput/findInput.i18n.json new file mode 100644 index 0000000000000..93c6910157dff --- /dev/null +++ b/i18n/trk/src/vs/base/browser/ui/findinput/findInput.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultLabel": "giriş" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/browser/ui/findinput/findInputCheckboxes.i18n.json b/i18n/trk/src/vs/base/browser/ui/findinput/findInputCheckboxes.i18n.json new file mode 100644 index 0000000000000..d8764ffb9987e --- /dev/null +++ b/i18n/trk/src/vs/base/browser/ui/findinput/findInputCheckboxes.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "caseDescription": "Büyük/Küçük Harf Eşleştir", + "wordsDescription": "Sözcüğün Tamamını Eşleştir", + "regexDescription": "Normal İfade Kullan" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/browser/ui/inputbox/inputBox.i18n.json b/i18n/trk/src/vs/base/browser/ui/inputbox/inputBox.i18n.json new file mode 100644 index 0000000000000..3981d7f1e2d28 --- /dev/null +++ b/i18n/trk/src/vs/base/browser/ui/inputbox/inputBox.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "alertErrorMessage": "Hata: {0}", + "alertWarningMessage": "Uyarı: {0}", + "alertInfoMessage": "Bilgi: {0}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/trk/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json new file mode 100644 index 0000000000000..8da49a2d7b0a9 --- /dev/null +++ b/i18n/trk/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "imgMeta": "{0}x{1} {2}", + "largeImageError": "Resim, düzenleyicide görüntülemek için çok büyük.", + "resourceOpenExternalButton": "Harici program kullanarak resmi aç", + "nativeBinaryError": "Dosya ikili olduğu, çok büyük olduğu veya desteklenmeyen bir metin kodlaması kullandığı için düzenleyicide görüntülenemiyor.", + "sizeB": "{0}B", + "sizeKB": "{0}KB", + "sizeMB": "{0}MB", + "sizeGB": "{0}GB", + "sizeTB": "{0}TB" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/browser/ui/toolbar/toolbar.i18n.json b/i18n/trk/src/vs/base/browser/ui/toolbar/toolbar.i18n.json new file mode 100644 index 0000000000000..634046fb44b79 --- /dev/null +++ b/i18n/trk/src/vs/base/browser/ui/toolbar/toolbar.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "more": "Diğer" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/common/errorMessage.i18n.json b/i18n/trk/src/vs/base/common/errorMessage.i18n.json new file mode 100644 index 0000000000000..e1e685c3ab220 --- /dev/null +++ b/i18n/trk/src/vs/base/common/errorMessage.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "message": "{0}. Hata kodu: {1}", + "error.permission.verbose": "İzin Verilmedi (HTTP {0})", + "error.permission": "İzin Verilmedi", + "error.http.verbose": "{0} (HTTP {1}: {2})", + "error.http": "{0} (HTTP {1})", + "error.connection.unknown.verbose": "Bilinmeyen Bağlantı Hatası ({0})", + "error.connection.unknown": "Bilinmeyen bir bağlantı hatası oluştu. Artık İnternet'e bağlı değilsiniz veya bağlandığınız sunucu çevrimdışı.", + "stackTrace.format": "{0}: {1}", + "error.defaultMessage": "Bilinmeyen bir hata oluştu. Daha fazla ayrıntı için lütfen günlüğe başvurun.", + "nodeExceptionMessage": "Bir sistem hatası oluştu ({0})", + "error.moreErrors": "{0} (toplam {1} hata)" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/trk/src/vs/base/common/jsonErrorMessages.i18n.json new file mode 100644 index 0000000000000..e9ca243b5118f --- /dev/null +++ b/i18n/trk/src/vs/base/common/jsonErrorMessages.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error.invalidSymbol": "Geçersiz sembol", + "error.invalidNumberFormat": "Geçersiz sayı biçimi", + "error.propertyNameExpected": "Özellik adı bekleniyor", + "error.valueExpected": "Değer bekleniyor", + "error.colonExpected": "İki nokta üst üste bekleniyor", + "error.commaExpected": "Virgül bekleniyor", + "error.closeBraceExpected": "Kapanış ayracı bekleniyor", + "error.closeBracketExpected": "Kapanış köşeli ayracı bekleniyor", + "error.endOfFileExpected": "Dosya sonu bekleniyor" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/common/keybindingLabels.i18n.json b/i18n/trk/src/vs/base/common/keybindingLabels.i18n.json new file mode 100644 index 0000000000000..0e97d8b37c301 --- /dev/null +++ b/i18n/trk/src/vs/base/common/keybindingLabels.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ctrlKey": "Ctrl", + "shiftKey": "Shift", + "altKey": "Alt", + "windowsKey": "Windows", + "ctrlKey.long": "Control", + "shiftKey.long": "Shift", + "altKey.long": "Alt", + "cmdKey.long": "Command", + "windowsKey.long": "Windows" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/common/processes.i18n.json b/i18n/trk/src/vs/base/common/processes.i18n.json new file mode 100644 index 0000000000000..3ffd209b1c97b --- /dev/null +++ b/i18n/trk/src/vs/base/common/processes.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ExecutableParser.commandMissing": "Hata: yürütülebilir bilgi dize türünde bir komut tanımlamalıdır.", + "ExecutableParser.isShellCommand": "Uyarı: isShellCommand boole türünde olmalıdır. {0} değeri yok sayıldı.", + "ExecutableParser.args": "Uyarı: argümanlar \"string[]\" türünde olmalıdır. {0} değeri yok sayıldı.", + "ExecutableParser.invalidCWD": "Uyarı: options.cwd dize türünde olmalıdır. {0} değeri yok sayıldı." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/common/severity.i18n.json b/i18n/trk/src/vs/base/common/severity.i18n.json new file mode 100644 index 0000000000000..5cd096b2c9410 --- /dev/null +++ b/i18n/trk/src/vs/base/common/severity.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "sev.error": "Hata", + "sev.warning": "Uyarı", + "sev.info": "Bilgi" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/node/processes.i18n.json b/i18n/trk/src/vs/base/node/processes.i18n.json new file mode 100644 index 0000000000000..1e9572a9b919d --- /dev/null +++ b/i18n/trk/src/vs/base/node/processes.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TaskRunner.UNC": "UNC sürücüsünde kabuk komutu yürütülemez." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/node/zip.i18n.json b/i18n/trk/src/vs/base/node/zip.i18n.json new file mode 100644 index 0000000000000..1094c4b1628e2 --- /dev/null +++ b/i18n/trk/src/vs/base/node/zip.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "notFound": "{0}, zip içerisinde bulunamadı." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/parts/quickopen/browser/quickOpenModel.i18n.json b/i18n/trk/src/vs/base/parts/quickopen/browser/quickOpenModel.i18n.json new file mode 100644 index 0000000000000..300655f6dbde8 --- /dev/null +++ b/i18n/trk/src/vs/base/parts/quickopen/browser/quickOpenModel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpenAriaLabelEntry": "{0}, seçici", + "quickOpenAriaLabel": "seçici" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/parts/quickopen/browser/quickOpenWidget.i18n.json b/i18n/trk/src/vs/base/parts/quickopen/browser/quickOpenWidget.i18n.json new file mode 100644 index 0000000000000..5603016ef86d2 --- /dev/null +++ b/i18n/trk/src/vs/base/parts/quickopen/browser/quickOpenWidget.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpenAriaLabel": "Hızlı seçici. Sonuçları daraltmak için yazmaya başlayın.", + "treeAriaLabel": "Hızlı Seçici" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/parts/tree/browser/treeDefaults.i18n.json b/i18n/trk/src/vs/base/parts/tree/browser/treeDefaults.i18n.json new file mode 100644 index 0000000000000..b6850a5f7ed26 --- /dev/null +++ b/i18n/trk/src/vs/base/parts/tree/browser/treeDefaults.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "collapse": "Daralt" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/code/electron-main/menus.i18n.json b/i18n/trk/src/vs/code/electron-main/menus.i18n.json new file mode 100644 index 0000000000000..aa0d36ba06632 --- /dev/null +++ b/i18n/trk/src/vs/code/electron-main/menus.i18n.json @@ -0,0 +1,180 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mFile": "&&Dosya", + "mEdit": "Dü&&zen", + "mSelection": "&&Seçim", + "mView": "&&Görünüm", + "mGoto": "G&&it", + "mDebug": "&&Hata Ayıklama", + "mWindow": "Pencere", + "mHelp": "&&Yardım", + "mTask": "Gö&&revler", + "miNewWindow": "Yeni &&Pencere", + "mAbout": "{0} Hakkında", + "mServices": "Hizmetler", + "mHide": "{0} öğesini gizle", + "mHideOthers": "Diğerlerini Gizle", + "mShowAll": "Tümünü Göster", + "miQuit": "{0} Öğesinden Çık", + "miNewFile": "&&Yeni Dosya", + "miOpen": "&&Aç...", + "miOpenFolder": "&&Klasör Aç...", + "miOpenFile": "&&Dosya Aç...", + "miOpenRecent": "&&Son Kullanılanları Aç", + "miAddFolderToWorkspace": "Çalışma Alanına Klasör &&Ekle...", + "miSave": "&&Kaydet", + "miSaveAs": "&&Farklı Kaydet", + "miSaveAll": "&&Tümünü Kaydet", + "miAutoSave": "Otomatik Kaydet", + "miRevert": "Dosyayı &&Geri Al", + "miCloseWindow": "Pen&&cereyi Kapat", + "miCloseFolder": "K&&lasörü Kapat", + "miCloseEditor": "Dü&&zenleyiciyi Kapat", + "miExit": "Çı&&kış", + "miOpenSettings": "&&Ayarlar", + "miOpenKeymap": "&&Klavye Kısayolları", + "miOpenKeymapExtensions": "&&Tuş Haritası Eklentileri", + "miOpenSnippets": "Kullanıcı &&Parçacıkları", + "miSelectColorTheme": "&&Renk Teması", + "miSelectIconTheme": "&&Dosya Simgesi Teması", + "miPreferences": "T&&ercihler", + "miReopenClosedEditor": "&&Kapatılan Düzenleyiciyi Tekrar Aç", + "miMore": "&&Daha Fazlası...", + "miClearRecentOpen": "&&Son Kullanılan Dosyaları Temizle", + "miUndo": "&&Geri Al", + "miRedo": "&&Yinele", + "miCut": "&&Kes", + "miCopy": "K&&opyala", + "miPaste": "Y&&apıştır", + "miFind": "&&Bul", + "miReplace": "&&Değiştir", + "miFindInFiles": "Dosyalarda B&&ul", + "miReplaceInFiles": "Dosyalarda Değiş&&tir", + "miEmmetExpandAbbreviation": "Emmet: Kı&&saltmayı Genişlet", + "miShowEmmetCommands": "E&&mmet...", + "miToggleLineComment": "Satı&&r Yorumunu Aç/Kapat", + "miToggleBlockComment": "Yorum B&&loğunu Aç/Kapat", + "miMultiCursorAlt": "Birden Fazla İmleç İçin Alt+Tıklamaya Geçiş Yap", + "miMultiCursorCmd": "Birden Fazla İmleç İçin Cmd+Tıklamaya Geçiş Yap", + "miMultiCursorCtrl": "Birden Fazla İmleç İçin Ctrl+Tıklamaya Geçiş Yap", + "miInsertCursorAbove": "Yukarıya &&İmleç Ekle", + "miInsertCursorBelow": "Aşağıya İ&&mleç Ekle", + "miInsertCursorAtEndOfEachLineSelected": "&&Satır Sonlarına İmleç Ekle", + "miAddSelectionToNextFindMatch": "S&&onraki Tekrarlamayı Ekle", + "miAddSelectionToPreviousFindMatch": "Ö&&nceki Tekrarlamayı Ekle", + "miSelectHighlights": "Tüm T&&ekrarlamaları Değiştir", + "miCopyLinesUp": "Satırı &&Yukarı Kopyala", + "miCopyLinesDown": "Satırı &&Aşağı Kopyala", + "miMoveLinesUp": "Satırı Y&&ukarı Taşı", + "miMoveLinesDown": "Satı&&rı Aşağı Taşı", + "miSelectAll": "&&Tümünü Seç", + "miSmartSelectGrow": "Seçimi &&Genişlet", + "miSmartSelectShrink": "Seçimi &&Daralt", + "miViewExplorer": "&&Gezgin", + "miViewSearch": "&&Arama", + "miViewSCM": "&&SCM", + "miViewDebug": "&&Hata Ayıklama", + "miViewExtensions": "&&Eklentiler", + "miToggleOutput": "Çı&&ktı", + "miToggleDebugConsole": "Hata &&Ayıklama Konsolu", + "miToggleIntegratedTerminal": "Entegre &&Terminal", + "miMarker": "S&&orunlar", + "miAdditionalViews": "&&Ek Görünümler", + "miCommandPalette": "Komut &&Paleti...", + "miToggleFullScreen": "Tam Ekra&&nı Aç/Kapat", + "miToggleZenMode": "Zen Modunu Aç/Kapat", + "miToggleMenuBar": "&&Menü Çubuğunu Gizle/Göster", + "miSplitEditor": "Düzenleyiciyi &&Böl", + "miToggleEditorLayout": "Dü&&zenleyici Grubu Düzenini Değiştir", + "miToggleSidebar": "Ke&&nar Çubuğunu Aç/Kapat", + "miMoveSidebarRight": "Kenar Çubuğunu S&&ağa Taşı", + "miMoveSidebarLeft": "Kenar Çubuğunu S&&ola Taşı", + "miTogglePanel": "&&Paneli Aç/Kapat", + "miHideStatusbar": "&&Durum Çubuğunu Gizle", + "miShowStatusbar": "&&Durum Çubuğunu Göster", + "miHideActivityBar": "Etkinlik Ç&&ubuğunu Gizle", + "miShowActivityBar": "Etkinlik Ç&&ubuğunu Göster", + "miToggleWordWrap": "&&Sözcük Kaydırmasını Aç/Kapat", + "miToggleRenderWhitespace": "&&Boşlukları Görüntülemeyi Aç/Kapat", + "miToggleRenderControlCharacters": "&&Kontrol Karakterlerini Aç/Kapat", + "miZoomIn": "&&Yakınlaştır", + "miZoomOut": "&&Uzaklaştır", + "miZoomReset": "Yakınlaştırmayı Sı&&fırla", + "miBack": "&&Geri", + "miForward": "&&İleri", + "miNextEditor": "&&Sonraki Düzenleyici", + "miPreviousEditor": "Ö&&nceki Düzenleyici", + "miNextEditorInGroup": "&&Grupta Sonraki Kullanılan Düzenleyici", + "miPreviousEditorInGroup": "G&&rupta Önceki Kullanılan Düzenleyici", + "miSwitchEditor": "&&Düzenleyici Değiştir", + "miFocusFirstGroup": "İ&&lk Grup", + "miFocusSecondGroup": "İ&&kinci Grup", + "miFocusThirdGroup": "Üçün&&cü Grup", + "miNextGroup": "Sonraki Gr&&up", + "miPreviousGroup": "Önceki Gru&&p", + "miSwitchGroup": "Grup &&Değiştir", + "miGotoFile": "D&&osyaya Git...", + "miGotoSymbolInFile": "Dosyada S&&embole Git...", + "miGotoSymbolInWorkspace": "Çalışma &&Alanında Sembole Git...", + "miGotoDefinition": "&&Tanıma Git", + "miGotoTypeDefinition": "Tü&&r Tanımına Git", + "miGotoImplementation": "U&&ygulamaya Git", + "miGotoLine": "&&Satıra Git...", + "miStartDebugging": "&&Hata Ayıklamaya Başla", + "miStartWithoutDebugging": "Hata Ayıklama &&Olmadan Başlat", + "miStopDebugging": "Hata Ayıklamayı D&&urdur", + "miRestart Debugging": "Hata Ayıklamayı &&Yeniden Başlat", + "miOpenConfigurations": "Ya&&pılandırmaları Aç", + "miAddConfiguration": "Yapı&&landırma Ekle...", + "miStepOver": "&&Adım At", + "miStepInto": "&&İçine Adımla", + "miStepOut": "&&Dışına Adımla", + "miContinue": "De&&vam Et", + "miToggleBreakpoint": "Kesme &&Noktası Ekle/Kaldır", + "miConditionalBreakpoint": "&&Koşullu Kesme Noktası...", + "miColumnBreakpoint": "&&Sütun Kesme Noktası", + "miFunctionBreakpoint": "&&Fonksiyon Kesme Noktası", + "miNewBreakpoint": "&&Yeni Kesme Noktası", + "miEnableAllBreakpoints": "Tüm Kesme Noktalarını Etkinleştir", + "miDisableAllBreakpoints": "&&Tüm Kesme Noktalarını Devre Dışı Bırak", + "miRemoveAllBreakpoints": "Tüm Kesme Noktalarını Kaldı&&r", + "miInstallAdditionalDebuggers": "&&Ek Hata Ayıklayıcıları Yükle", + "mMinimize": "Simge Durumuna Küçült", + "mZoom": "Yakınlaştırma", + "mBringToFront": "Tümünü Öne Getir", + "miSwitchWindow": "&&Pencere Değiştir...", + "miToggleDevTools": "&&Geliştirici Araçlarını Aç/Kapat", + "miAccessibilityOptions": "&&Erişilebilirlik Seçenekleri", + "miReportIssues": "So&&run Bildir", + "miWelcome": "&&Hoş Geldiniz", + "miInteractivePlayground": "&&İnteraktif Oyun Alanı", + "miDocumentation": "&&Belgeler", + "miReleaseNotes": "&&Sürüm Notları", + "miKeyboardShortcuts": "&&Klavye Kısayolları Başvurusu", + "miIntroductoryVideos": "Tanıtım &&Videoları", + "miTipsAndTricks": "&&İpuçları ve Püf noktaları", + "miTwitter": "&&Twitter'da Bize Katıl", + "miUserVoice": "Ö&&zellik İsteklerini Ara", + "miLicense": "&&Lisansı Görüntüle", + "miPrivacyStatement": "Gizlilik &&Beyanı", + "miAbout": "H&&akkında", + "miRunTask": "Görevi Ç&&alıştır", + "miRestartTask": "Çalışan Görevi &&Yeniden Başlat...", + "miTerminateTask": "&&Görevi Sonlandır...", + "miBuildTask": "&&Derleme Görevini Çalıştır...", + "miConfigureTask": "Görevleri Ya&&pılandır", + "miConfigureBuildTask": "&&Varsayılan Derleme Görevini Yapılandır", + "accessibilityOptionsWindowTitle": "Erişilebilirlik Seçenekleri", + "miRestartToUpdate": "Güncelleştirmek için Yeniden Başlat...", + "miCheckingForUpdates": "Güncelleştirmeler Denetleniyor...", + "miDownloadUpdate": "Mevcut Güncelleştirmeyi İndir", + "miDownloadingUpdate": "Güncelleştirme İndiriliyor...", + "miInstallingUpdate": "Güncelleştirme Yükleniyor...", + "miCheckForUpdates": "Güncelleştirmeleri Denetle...", + "aboutDetail": "\nSürüm {0}\nCommit {1}\nTarih {2}\nKabuk {3}\nOluşturucu {4}\nNode {5}", + "okButton": "Tamam" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/code/electron-main/window.i18n.json b/i18n/trk/src/vs/code/electron-main/window.i18n.json new file mode 100644 index 0000000000000..ca683aad480e3 --- /dev/null +++ b/i18n/trk/src/vs/code/electron-main/window.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hiddenMenuBar": "Menü çubuğuna **Alt** tuşuna basarak hala erişebilirsiniz." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/code/electron-main/windows.i18n.json b/i18n/trk/src/vs/code/electron-main/windows.i18n.json new file mode 100644 index 0000000000000..1113da7233fb8 --- /dev/null +++ b/i18n/trk/src/vs/code/electron-main/windows.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ok": "Tamam", + "pathNotExistTitle": "Yol yok", + "pathNotExistDetail": "'{0}' yolu artık diskte değil.", + "reopen": "Yeniden Aç", + "wait": "Beklemeye Devam Et", + "close": "Kapat", + "appStalled": "Pencere artık yanıt vermiyor", + "appStalledDetail": "Pencereyi yeniden açabilir, kapatabilir veya bekleyebilirsiniz.", + "appCrashed": "Pencere kilitlendi", + "appCrashedDetail": "Verdiğimiz rahatsızlıktan dolayı özür dileriz! Pencereyi yeniden açıp kaldığınız yerden devam edebilirsiniz.", + "openFile": "Dosya Aç", + "openFolder": "Klasör Aç" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/code/node/cliProcessMain.i18n.json b/i18n/trk/src/vs/code/node/cliProcessMain.i18n.json new file mode 100644 index 0000000000000..8ca0b4fc0b406 --- /dev/null +++ b/i18n/trk/src/vs/code/node/cliProcessMain.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "notFound": "'{0}' eklentisi bulunamadı.", + "notInstalled": "'{0}' eklentisi yüklü değil.", + "useId": "Eklentinin tam ID'sini, yayıncı da dahil olmak üzere kullandığınızdan emin olun, ör: {0}", + "successVsixInstall": "'{0}' eklentisi başarıyla yüklendi.", + "alreadyInstalled": "'{0}' eklentisi zaten yüklü.", + "foundExtension": "'{0}' markette bulundu.", + "installing": "Yükleniyor...", + "successInstall": "'{0}' v{1} eklentisi başarıyla kuruldu!", + "uninstalling": "{0} kaldırılıyor...", + "successUninstall": "'{0}' eklentisi başarıyla kaldırıldı!" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/browser/widget/diffReview.i18n.json b/i18n/trk/src/vs/editor/browser/widget/diffReview.i18n.json new file mode 100644 index 0000000000000..862cc456ef9a4 --- /dev/null +++ b/i18n/trk/src/vs/editor/browser/widget/diffReview.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "Kapat", + "header": "Farklılık {0}/{1}: orijinal {2}, {3} satırları, değiştirilen {4}, {5} satırları", + "blankLine": "boş", + "equalLine": "orijinal {0}, değiştirilen {1}: {2}", + "insertLine": "+ değiştirilen {0}: {1}", + "deleteLine": "- orijinal {0}: {1}", + "editor.action.diffReview.next": "Sonraki Farka Git", + "editor.action.diffReview.prev": "Sonraki Farka Git" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/trk/src/vs/editor/common/config/commonEditorConfig.i18n.json new file mode 100644 index 0000000000000..8bb99ca00de40 --- /dev/null +++ b/i18n/trk/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -0,0 +1,89 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorConfigurationTitle": "Düzenleyici", + "fontFamily": "Yazı tipi ailesini denetler.", + "fontWeight": "Yazı tipi kalınlığını denetler.", + "fontSize": "Yazı tipi boyutunu piksel olarak denetler.", + "lineHeight": "Satır yüksekliğini denetler. lineHeight değerini, fontSize değeri kullanarak hesaplamak için 0 girin.", + "letterSpacing": "Harfler arası boşluğu pixel olarak denetler.", + "lineNumbers": "Satır numaralarının görüntülenmesini denetler. Olası değerler 'on', 'off' ve 'relative'dir. 'relative' satırların geçerli imleç konumundan uzaklıklarını gösterir.", + "rulers": "Dikey cetvellerin gösterileceği sütunlar", + "wordSeparators": "Sözcüklerle ilgili gezinti veya işlem yaparken kelime ayırıcı olarak kullanılacak karakterler", + "tabSize": "Bir sekmenin eşit olduğu boşluk sayısı. Bu ayar, `editor.detectIndentation` açıkken dosya içeriğine bağlı olarak geçersiz kılınır.", + "tabSize.errorMessage": "'sayı' bekleniyor. \"auto\" değerinin `editor.detectIndentation` ile değiştirildiğini unutmayın.", + "insertSpaces": "Tab tuşuna basınca boşluk ekle. Bu ayar, `editor.detectIndentation` açıkken dosya içeriğine bağlı olarak geçersiz kılınır.", + "insertSpaces.errorMessage": "'boole' bekleniyor. \"auto\" değerinin `editor.detectIndentation` ile değiştirildiğini unutmayın.", + "detectIndentation": "Bir dosyayı açarken, `editor.tabSize` ve `editor.insertSpaces` dosya içeriğine bağlı olarak algılanır.", + "roundedSelection": "Seçimlerin köşelerinin yuvarlak olup olmayacağını denetler", + "scrollBeyondLastLine": "Düzenleyicinin son satırın ötesine ilerleyip ilerlemeyeceğini denetler", + "minimap.enabled": "Mini haritanın gösterilip gösterilmeyeceğini denetler", + "minimap.showSlider": "Mini harita kaydıracının otomatik olarak gizlenip gizlenmeyeceğini denetler.", + "minimap.renderCharacters": "(Renk blokları yerine) Bir satırdaki gerçek harfleri göster", + "minimap.maxColumn": "Hazırlanacak mini haritanın azami genişliğini belirli sayıda sütunla sınırla", + "find.seedSearchStringFromSelection": "Bulma Araç Çubuğu'ndaki arama metninin, düzenleyicideki seçili alandan beslenmesini denetler", + "find.autoFindInSelection": "Seçimde bul işaretçisinin, editördeki metnin birden çok karakteri veya satırı seçildiğinde açılmasını denetler.", + "wordWrap.off": "Satırlar hiçbir zaman bir sonraki satıra kaydırılmayacak.", + "wordWrap.on": "Satırlar görüntü alanı genişliğinde bir sonraki satıra kaydırılacak.", + "wordWrap.wordWrapColumn": "Satırlar `editor.wordWrapColumn` değerinde bir sonraki satıra kaydırılacak.", + "wordWrap.bounded": "Satırlar en düşük görüntü alanı genişliğinde ve `editor.wordWrapColumn` değerinde bir sonraki satıra kaydırılacak.", + "wordWrap": "Satırların bir sonraki satıra nasıl kaydırılacağını denetler. Seçenekler:\n - 'off' (kaydırmayı devre dışı bırak),\n - 'on' (görüntü alanında kaydır),\n - 'wordWrapColumn' (`editor.wordWrapColumn` değerinde kaydır) veya\n - 'bounded' (en düşük görüntü alanı genişliğinde ve `editor.wordWrapColumn` değerinde kaydır).", + "wordWrapColumn": "`editor.wordWrap` ögesi, 'wordWrapColumn' veya 'bounded' iken düzenleyicinin kaydırma sütununu denetler.", + "wrappingIndent": "Kaydırılan satır girintisini denetler. 'none', 'same' veya 'indent' değerlerinden biri olabilir.", + "mouseWheelScrollSensitivity": "Fare tekerleği kaydırma olaylarında `deltaX` ve `deltaY` üzerinde kullanılan bir çarpan", + "multiCursorModifier.ctrlCmd": "Windows ve Linux'da `Control` ve OSX'de `Command` ile eşleşir.", + "multiCursorModifier.alt": "Windows ve Linux'da `Alt` ve OSX'de `Option` ile eşleşir.", + "multiCursorModifier": "Fare ile birden çok imleç eklenmesinde kullanılacak değiştirici. `ctrlCmd` Windows ve Linux'da `Control` ve OSX'de `Command` ile eşleşir. Tanıma Git ve Bağlantıyı Aç fare hareketleri, birden çok imleç değiştiricisi ile çakışmayacak şekilde uyum sağlarlar.", + "quickSuggestions.strings": "Dizelerin içinde hızlı önerileri etkinleştir.", + "quickSuggestions.comments": "Yorumların içinde hızlı önerileri etkinleştir.", + "quickSuggestions.other": "Dizeler ve yorumlar dışında hızlı önerileri etkinleştirin.", + "quickSuggestions": "Yazarken önerilerin otomatik olarak gösterilip gösterilmeyeceğini denetler", + "quickSuggestionsDelay": "Hızlı önerilerin gösterilmesinden önce kaç ms bekleneceğini denetler", + "parameterHints": "Siz tuşlara bastıkça parametre belgelerini ve tür bilgisini gösteren açılır pencereyi etkinleştirir.", + "autoClosingBrackets": "Düzenleyicinin köşeli ayracı açtıktan sonra otomatik olarak kapatıp kapatmayacağını denetler", + "formatOnType": "Düzenleyicinin satırı yazıldıktan sonra otomatik biçimlendirip biçimlendirmeyeceğini denetler", + "formatOnPaste": "Düzenleyicinin yapıştırılan içeriği otomatik olarak biçimlendirip biçimlendirmeyeceğini denetler. Bir biçimlendirici mevcut olmalı ve belgede bir aralığı biçimlendirebilmelidir.", + "autoIndent": "Düzenleyicinin, kullanıcılar tuşlara bastığında, satırları yapıştırdığında veya taşıdığında girintiyi otomatik olarak ayarlayıp ayarlamayacağını denetler. Dilin girintileme kuralları mevcut olmalıdır.", + "suggestOnTriggerCharacters": "Tetikleyici karakterler yazılırken otomatik olarak öneri gösterilip gösterilmeyeceğini denetler", + "acceptSuggestionOnEnter": "'Tab' tuşuna ek olarak - önerilerin 'Enter' tuşuna basıldığında kabul edilmesini denetler. Yeni satır ekleme ya da öneri kabul etme arasındaki belirsizlikten kaçınmaya yardımcı olur. 'smart' değeri, bir öneri metinsel değişiklik yapıyorsa, onu sadece Enter tuşu ile kabul etmeyi ifade eder", + "acceptSuggestionOnCommitCharacter": "Önerilerin tamamlama karakterlerinde kabul edilip edilmeyeceğini denetler. Örnek olarak; JavaScript'te noktalı virgül(';') öneri kabul eden ve o karakteri giren tamamlama karakteri olabilir.", + "snippetSuggestions": "Parçacıkların diğer önerilerle gösterilip gösterilmeyeceğini ve bunların nasıl sıralanacaklarını denetler.", + "emptySelectionClipboard": "Bir seçim olmadan geçerli satırı kopyalayıp kopyalamamayı denetler.", + "wordBasedSuggestions": "Tamamlamaların belgedeki sözcüklere dayalı olarak hesaplanıp hesaplanmayacağını denetler.", + "suggestFontSize": "Öneri aracının yazı tipi boyutu", + "suggestLineHeight": "Öneri aracının satır yüksekliği", + "selectionHighlight": "Düzenleyicinin seçime benzer eşleşmeleri vurgulayıp vurgulamayacağını denetler", + "occurrencesHighlight": "Düzenleyicinin semantik sembol tekrarlamalarını vurgulayıp vurgulamayacağını denetler", + "overviewRulerLanes": "Genel bakış cetvelinde aynı konumda gösterilebilecek süsleme sayısını denetler", + "overviewRulerBorder": "Genel bakış cetvelinin etrafına bir kenarlık çizilmesi gerekip gerekmediğini denetler.", + "cursorBlinking": "İmleç animasyon stilini denetler, olası değerler 'blink', 'smooth', 'phase', 'expand' ve 'solid'dir", + "mouseWheelZoom": "Ctrl tuşuna basarken fare tekerleği ile düzenleyici yazı tipini yakınlaştırın", + "cursorStyle": "İmleç stilini denetler, kabul edilen değerler: 'block', 'block-outline', 'line', 'line-thin', 'underline' ve 'underline-thin'", + "fontLigatures": "Yazı tipi ligatürlerini etkinleştirir", + "hideCursorInOverviewRuler": "İmlecin genel bakış cetvelinde gizlenip gizlenmeyeceğini denetler.", + "renderWhitespace": "Düzenleyicinin boşluk karakterlerini nasıl göstereceğini denetler, seçenekler: 'none', 'boundary', ve 'all'. 'boundary' seçeneği sözcükler arasındaki tek boşlukları göstermez.", + "renderControlCharacters": "Düzenleyicinin kontrol karakterlerini gösterip göstermemesini denetler", + "renderIndentGuides": "Düzenleyicinin girinti kılavuzlarını gösterip göstermemesini denetler", + "renderLineHighlight": "Düzenleyicinin geçerli satır vurgusunu nasıl göstereceğini denetler, seçenekler: 'none', 'gutter', 'line', ve 'all'.", + "codeLens": "Düzenleyicinin kod objektiflerini gösterip göstermediğini denetler", + "folding": "Düzenleyicide kod katlamanın etkin olup olmadığını denetler", + "showFoldingControls": "Oluktaki kat kontrollerinin otomatik olarak gizlenip gizlenmeyeceğini denetler.", + "matchBrackets": "Eşleşen ayraçları, onlardan biri seçildiğinde vurgula.", + "glyphMargin": "Düzenleyicinin dikey glif boşluğunu oluşturup oluşturmayacağını kontrol eder. Glif boşluğu çoğunlukla hata ayıklamak için kullanılır.", + "useTabStops": "Boşluk ekleme ve silme sekme duraklarını izler", + "trimAutoWhitespace": "Sondaki otomatik eklenen boşluğu kaldır", + "stablePeek": "Gözetleme düzenleyicilerini, içeriklerine çift tıklandığında veya Escape tuşuna basıldığında bile açık tut.", + "dragAndDrop": "Düzenleyicinin seçimleri sürükleyip bırakarak taşımaya izin verip vermeyeceğini denetler.", + "accessibilitySupport.auto": "Düzenleyici, bir Ekran Okuyucu'nun ne zaman bağlandığını algılamak için platform API'larını kullanacaktır.", + "accessibilitySupport.on": "Düzenleyici bir Ekran Okuyucu ile kullanılmak üzere kalıcı olarak optimize edilecektir.", + "accessibilitySupport.off": "Düzenleyici hiçbir zaman bir Ekran Okuyucu ile kullanılmak üzere optimize edilmeyecektir.", + "accessibilitySupport": "Düzenleyicinin ekran okuyucular için optimize edilmiş bir modda çalışıp çalışmayacağını denetler.", + "links": "Düzenleyicinin bağlantıları otomatik algılayıp, onları tıklanabilir yapıp yapmayacağını denetler", + "sideBySide": "Karşılaştırma düzenleyicisinin farklılıkları yan yana mı yoksa satır içinde mi göstereceğini denetler", + "ignoreTrimWhitespace": "Karşılaştırma düzenleyicisinin baştaki veya sondaki boşluklardaki değişmeleri farklılık olarak gösterip göstermemesini denetler", + "renderIndicators": "Karşılaştırma düzenleyicisinin ekleme/çıkarma değişiklikleri için +/- göstergeleri gösterip göstermemesini denetler.", + "selectionClipboard": "Linux birincil panosunun desteklenip desteklenmeyeceğini denetler." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/trk/src/vs/editor/common/config/editorOptions.i18n.json new file mode 100644 index 0000000000000..e9722574046b5 --- /dev/null +++ b/i18n/trk/src/vs/editor/common/config/editorOptions.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "accessibilityOffAriaLabel": "Düzenleyici şu an erişilebilir değil. Seçenekler için lütfen Alt+F1'e basın.", + "editorViewAccessibleLabel": "Düzenleyici içeriği" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/common/controller/cursor.i18n.json b/i18n/trk/src/vs/editor/common/controller/cursor.i18n.json new file mode 100644 index 0000000000000..5ac37adbc122d --- /dev/null +++ b/i18n/trk/src/vs/editor/common/controller/cursor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "corrupt.commands": "Komut yürütülürken beklenmeyen özel durum oluştu." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/common/model/textModelWithTokens.i18n.json b/i18n/trk/src/vs/editor/common/model/textModelWithTokens.i18n.json new file mode 100644 index 0000000000000..4884bc2418fc4 --- /dev/null +++ b/i18n/trk/src/vs/editor/common/model/textModelWithTokens.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mode.tokenizationSupportFailed": "Mod, girdiyi belirteçlere ayırırken başarısız oldu." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/common/modes/modesRegistry.i18n.json b/i18n/trk/src/vs/editor/common/modes/modesRegistry.i18n.json new file mode 100644 index 0000000000000..e559b82874385 --- /dev/null +++ b/i18n/trk/src/vs/editor/common/modes/modesRegistry.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "plainText.alias": "Düz Metin" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/common/services/bulkEdit.i18n.json b/i18n/trk/src/vs/editor/common/services/bulkEdit.i18n.json new file mode 100644 index 0000000000000..b081029e080ee --- /dev/null +++ b/i18n/trk/src/vs/editor/common/services/bulkEdit.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "conflict": "Bu dosyalar bu arada değiştirildi: {0}", + "summary.0": "Düzenleme yapılmadı", + "summary.nm": "{1} dosyada {0} metin düzenlemesi yapıldı", + "summary.n0": "Bir dosyada {0} metin düzenlemesi yapıldı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/common/services/modeServiceImpl.i18n.json b/i18n/trk/src/vs/editor/common/services/modeServiceImpl.i18n.json new file mode 100644 index 0000000000000..55d69fef9030f --- /dev/null +++ b/i18n/trk/src/vs/editor/common/services/modeServiceImpl.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.languages": "Dil bildirimlerine ekleme yapar.", + "vscode.extension.contributes.languages.id": "Dilin ID'si.", + "vscode.extension.contributes.languages.aliases": "Dilin takma adları.", + "vscode.extension.contributes.languages.extensions": "Dil ile ilişkili dosya uzantıları.", + "vscode.extension.contributes.languages.filenames": "Dil ile ilişkili dosya adları.", + "vscode.extension.contributes.languages.filenamePatterns": "Dil ile ilişkili dosya adı glob desenleri.", + "vscode.extension.contributes.languages.mimetypes": "Dil ile ilişkili MIME türleri.", + "vscode.extension.contributes.languages.firstLine": "Dilin bir dosyasının ilk satırıyla eşleşen bir düzenli ifade.", + "vscode.extension.contributes.languages.configuration": "Dil için yapılandırma seçenekleri içeren dosyaya, bir göreli yol." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/common/services/modelServiceImpl.i18n.json b/i18n/trk/src/vs/editor/common/services/modelServiceImpl.i18n.json new file mode 100644 index 0000000000000..a12e01358bbaf --- /dev/null +++ b/i18n/trk/src/vs/editor/common/services/modelServiceImpl.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "diagAndSourceMultiline": "[{0}]\n{1}", + "diagAndSource": "[{0}] {1}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/trk/src/vs/editor/common/view/editorColorRegistry.i18n.json new file mode 100644 index 0000000000000..e5f9dca329bf8 --- /dev/null +++ b/i18n/trk/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "lineHighlight": "İmlecin bulunduğu satırın vurgusunun arka plan rengi.", + "lineHighlightBorderBox": "İmlecin bulunduğu satırın kenarlığının arka plan rengi.", + "rangeHighlight": "Hızlı açma ve bulma özellikleri gibi vurgulanan alanların arka plan rengi.", + "caret": "Düzenleyici imlecinin rengi.", + "editorWhitespaces": "Düzenleyicideki boşluk karakterlerinin rengi.", + "editorIndentGuides": "Düzenleyici girinti kılavuzlarının rengi.", + "editorLineNumbers": "Düzenleyici satır numaralarının rengi.", + "editorRuler": "Düzenleyici cetvellerinin rengi.", + "editorCodeLensForeground": "Düzenleyici kod objektiflerinin ön plan rengi", + "editorBracketMatchBackground": "Eşleşen parantezlerin arka plan rengi", + "editorBracketMatchBorder": "Eşleşen parantez kutularının rengi", + "editorOverviewRulerBorder": "Genel bakış cetvelinin kenarlık rengi.", + "editorGutter": "Düzenleyici oluğunun arka plan rengi. Oluk, glif boşluklarını ve satır numaralarını içerir.", + "errorForeground": "Düzenleyicideki hata karalamalarının ön plan rengi.", + "errorBorder": "Düzenleyicideki hata karalamalarının kenarlık rengi.", + "warningForeground": "Düzenleyicideki uyarı karalamalarının ön plan rengi.", + "warningBorder": "Düzenleyicideki uyarı karalamalarının kenarlık rengi." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json b/i18n/trk/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json new file mode 100644 index 0000000000000..3156c395100a0 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.jumpBracket": "Köşeli Ayraca Git" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json b/i18n/trk/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json new file mode 100644 index 0000000000000..c5196837029df --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "caret.moveLeft": "İmleci Sola Taşı", + "caret.moveRight": "İmleci Sağa Taşı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/caretOperations/common/transpose.i18n.json b/i18n/trk/src/vs/editor/contrib/caretOperations/common/transpose.i18n.json new file mode 100644 index 0000000000000..5ee978f2342cd --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/caretOperations/common/transpose.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "transposeLetters.label": "Harfleri Birbirleriyle Değiştir" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/clipboard/browser/clipboard.i18n.json b/i18n/trk/src/vs/editor/contrib/clipboard/browser/clipboard.i18n.json new file mode 100644 index 0000000000000..768e8e3511f0a --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/clipboard/browser/clipboard.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "actions.clipboard.cutLabel": "Kes", + "actions.clipboard.copyLabel": "Kopyala", + "actions.clipboard.pasteLabel": "Yapıştır", + "actions.clipboard.copyWithSyntaxHighlightingLabel": "Sentaks Vurgulaması İle Kopyala" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/comment/common/comment.i18n.json b/i18n/trk/src/vs/editor/contrib/comment/common/comment.i18n.json new file mode 100644 index 0000000000000..30ac850837c3b --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/comment/common/comment.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "comment.line": "Satır Yorumunu Aç/Kapat", + "comment.line.add": "Satır Açıklaması Ekle", + "comment.line.remove": "Satır Açıklamasını Kaldır", + "comment.block": "Yorum Bloğunu Aç/Kapat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/contextmenu/browser/contextmenu.i18n.json b/i18n/trk/src/vs/editor/contrib/contextmenu/browser/contextmenu.i18n.json new file mode 100644 index 0000000000000..fbed232705270 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/contextmenu/browser/contextmenu.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "action.showContextMenu.label": "Düzenleyici Bağlam Menüsünü Göster" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/find/browser/findWidget.i18n.json b/i18n/trk/src/vs/editor/contrib/find/browser/findWidget.i18n.json new file mode 100644 index 0000000000000..e483c295f1969 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/find/browser/findWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Bul", + "placeholder.find": "Bul", + "label.previousMatchButton": "Önceki eşleşme", + "label.nextMatchButton": "Sonraki eşleşme", + "label.toggleSelectionFind": "Seçimde bul", + "label.closeButton": "Kapat", + "label.replace": "Değiştir", + "placeholder.replace": "Değiştir", + "label.replaceButton": "Değiştir", + "label.replaceAllButton": "Tümünü Değiştir", + "label.toggleReplaceButton": "Değiştirme modunu değiştir", + "title.matchesCountLimit": "Yalnızca ilk 999 sonuç vurgulandı, ancak tüm bulma işlemleri metnin tamamı üzerinde çalışıyor.", + "label.matchesLocation": "{0}/{1}", + "label.noResults": "Sonuç Yok" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/find/common/findController.i18n.json b/i18n/trk/src/vs/editor/contrib/find/common/findController.i18n.json new file mode 100644 index 0000000000000..c8a636031e9a2 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/find/common/findController.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "startFindAction": "Bul", + "findNextMatchAction": "Sonrakini Bul", + "findPreviousMatchAction": "Öncekini Bul", + "nextSelectionMatchFindAction": "Sonraki Seçimi Bul", + "previousSelectionMatchFindAction": "Önceki Seçimi Bul", + "startReplace": "Değiştir", + "addSelectionToNextFindMatch": "Seçimi Sonraki Bulunan Eşleşmeye Ekle", + "addSelectionToPreviousFindMatch": "Seçimi Önceki Bulunan Eşleşmeye Ekle", + "moveSelectionToNextFindMatch": "Son Seçimi Sonraki Bulunan Eşleşmeye Taşı", + "moveSelectionToPreviousFindMatch": "Son Seçimi Önceki Bulunan Eşleşmeye Taşı", + "selectAllOccurrencesOfFindMatch": "Bulunan Eşleşmenin Tüm Tekrarlamalarını Seç", + "changeAll.label": "Tüm Tekrarlamaları Değiştir" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/folding/browser/folding.i18n.json b/i18n/trk/src/vs/editor/contrib/folding/browser/folding.i18n.json new file mode 100644 index 0000000000000..084b78eafffc1 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/folding/browser/folding.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unfoldAction.label": "Katlamayı Aç", + "unFoldRecursivelyAction.label": "Katlamaları Özyinelemeli Olarak Aç", + "foldAction.label": "Katla", + "foldRecursivelyAction.label": "Özyinelemeli Olarak Katla", + "foldAllAction.label": "Hepsini Katla", + "unfoldAllAction.label": "Tüm Katlamaları Aç", + "foldLevelAction.label": "{0}. Düzeyi Katla" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/format/browser/formatActions.i18n.json b/i18n/trk/src/vs/editor/contrib/format/browser/formatActions.i18n.json new file mode 100644 index 0000000000000..265248d706c1b --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/format/browser/formatActions.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint11": "{0}. satırda 1 biçimlendirme düzenlemesi yapıldı", + "hintn1": "{1}. satırda {0} biçimlendirme düzenlemesi yapıldı", + "hint1n": "{0} ve {1} satırları arasında 1 biçimlendirme düzenlemesi yapıldı", + "hintnn": "{1} ve {2} satırları arasında {0} biçimlendirme düzenlemesi yapıldı", + "formatDocument.label": "Belgeyi Biçimlendir", + "formatSelection.label": "Seçimi Biçimlendir" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/trk/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..fae99c4c772ab --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "'{0}' için tanım bulunamadı", + "generic.noResults": "Tanım bulunamadı", + "meta.title": " – {0} tanım", + "actions.goToDecl.label": "Tanıma Git", + "actions.goToDeclToSide.label": "Tanımı Yana Aç", + "actions.previewDecl.label": "Tanıma Göz At", + "goToImplementation.noResultWord": "'{0}' için uygulama bulunamadı", + "goToImplementation.generic.noResults": "Uygulama bulunamadı", + "meta.implementations.title": " – {0} uygulama", + "actions.goToImplementation.label": "Uygulamaya Git", + "actions.peekImplementation.label": "Uygulamaya Göz At", + "goToTypeDefinition.noResultWord": "'{0}' için tür tanımı bulunamadı", + "goToTypeDefinition.generic.noResults": "Tür tanımı bulunamadı", + "meta.typeDefinitions.title": " – {0} tür tanımı", + "actions.goToTypeDefinition.label": "Tür Tanımına Git", + "actions.peekTypeDefinition.label": "Tür Tanımına Göz At" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/trk/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..010de11a57dae --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "{0} tanımı göstermek için tıklayın." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json b/i18n/trk/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json new file mode 100644 index 0000000000000..715f05193c2e2 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "title.wo_source": "({0}/{1})", + "markerAction.next.label": "Sonraki Hata veya Uyarıya Git", + "markerAction.previous.label": "Önceki Hata veya Uyarıya Git", + "editorMarkerNavigationError": "Düzenleyicinin işaretçi gezinti aracının hata rengi.", + "editorMarkerNavigationWarning": "Düzenleyicinin işaretçi gezinti aracının uyarı rengi.", + "editorMarkerNavigationBackground": "Düzenleyicinin işaretçi gezinti aracının arka planı." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/hover/browser/hover.i18n.json b/i18n/trk/src/vs/editor/contrib/hover/browser/hover.i18n.json new file mode 100644 index 0000000000000..e1a331227025c --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/hover/browser/hover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showHover": "Bağlantı Vurgusunu Göster" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/hover/browser/modesContentHover.i18n.json b/i18n/trk/src/vs/editor/contrib/hover/browser/modesContentHover.i18n.json new file mode 100644 index 0000000000000..1b70c63296f7c --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/hover/browser/modesContentHover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "modesContentHover.loading": "Yükleniyor..." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.i18n.json b/i18n/trk/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.i18n.json new file mode 100644 index 0000000000000..bb4caacacb194 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "InPlaceReplaceAction.previous.label": "Önceki Değerle Değiştir", + "InPlaceReplaceAction.next.label": "Sonraki Değerle Değiştir" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/indentation/common/indentation.i18n.json b/i18n/trk/src/vs/editor/contrib/indentation/common/indentation.i18n.json new file mode 100644 index 0000000000000..76b8b3c839160 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/indentation/common/indentation.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "indentationToSpaces": "Girintiyi Boşluklara Dönüştür", + "indentationToTabs": "Girintiyi Sekmelere Dönüştür", + "configuredTabSize": "Yapılandırılmış Sekme Boyutu", + "selectTabWidth": "Geçerli Dosya İçin Sekme Boyutunu Seç", + "indentUsingTabs": "Sekme Kullanarak Girintile", + "indentUsingSpaces": "Boşluk Kullanarak Girintile", + "detectIndentation": "Girintiyi, İçeriği Kontrol Ederek Algıla", + "editor.reindentlines": "Satır Girintilerini Yeniden Ayarla" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json b/i18n/trk/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json new file mode 100644 index 0000000000000..4ae7163c50c3a --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "lines.copyUp": "Satırı Yukarı Kopyala", + "lines.copyDown": "Satırı Aşağı Kopyala", + "lines.moveUp": "Satırı Yukarı Taşı", + "lines.moveDown": "Satırı Aşağı Taşı", + "lines.sortAscending": "Satırları Artan Şekilde Sırala", + "lines.sortDescending": "Satırları Azalan Şekilde Sırala", + "lines.trimTrailingWhitespace": "Sondaki Boşluğu Kırp", + "lines.delete": "Satırı Sil", + "lines.indent": "Satırı Girintile", + "lines.outdent": "Satırın Girintisini Azalt", + "lines.insertBefore": "Üste Satır Ekle", + "lines.insertAfter": "Alta Satır Ekle", + "lines.deleteAllLeft": "Soldaki Her Şeyi Sil", + "lines.deleteAllRight": "Sağdaki Her Şeyi Sil", + "lines.joinLines": "Satırları Birleştir", + "editor.transpose": "İmlecin etrafındaki karakterleri birbirleriyle değiştir", + "editor.transformToUppercase": "Büyük Harfe Dönüştür", + "editor.transformToLowercase": "Küçük Harfe Dönüştür" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/links/browser/links.i18n.json b/i18n/trk/src/vs/editor/contrib/links/browser/links.i18n.json new file mode 100644 index 0000000000000..0d6ac3279c29f --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/links/browser/links.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "links.navigate.mac": "Bağlantıyı izlemek için Cmd tuşuna basarak tıklayın", + "links.navigate": "Bağlantıyı izlemek için Ctrl tuşuna basarak tıklayın", + "links.navigate.al": "Bağlantıyı izlemek için Alt tuşuna basarak tıklayın", + "invalid.url": "Üzgünüz, bu bağlantı iyi oluşturulmamış olduğu için açılamadı: {0}", + "missing.url": "Üzgünüz; bu bağlantı, hedefi eksik olduğu için açılamadı.", + "label": "Bağlantıyı Aç" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json b/i18n/trk/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json new file mode 100644 index 0000000000000..f3fa18b4184dd --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mutlicursor.insertAbove": "Yukarıya İmleç Ekle", + "mutlicursor.insertBelow": "Aşağıya İmleç Ekle", + "mutlicursor.insertAtEndOfEachLineSelected": "Satır Sonlarına İmleç Ekle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/parameterHints/browser/parameterHints.i18n.json b/i18n/trk/src/vs/editor/contrib/parameterHints/browser/parameterHints.i18n.json new file mode 100644 index 0000000000000..b7a4e43b2b61f --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/parameterHints/browser/parameterHints.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parameterHints.trigger.label": "Parametre İpuçlarını Tetikle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.i18n.json b/i18n/trk/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.i18n.json new file mode 100644 index 0000000000000..ed56fe64626b7 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint": "{0}, ipucu" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/quickFix/browser/quickFixCommands.i18n.json b/i18n/trk/src/vs/editor/contrib/quickFix/browser/quickFixCommands.i18n.json new file mode 100644 index 0000000000000..86586e96e0a7d --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/quickFix/browser/quickFixCommands.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickFixWithKb": "Düzeltmeleri Göster ({0})", + "quickFix": "Düzeltmeleri Göster", + "quickfix.trigger.label": "Hızlı Düzeltme" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.i18n.json b/i18n/trk/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.i18n.json new file mode 100644 index 0000000000000..9ddf0e9fbe023 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "meta.titleReference": "– {0} başvuru", + "references.action.label": "Tüm Başvuruları Bul" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/referenceSearch/browser/referencesController.i18n.json b/i18n/trk/src/vs/editor/contrib/referenceSearch/browser/referencesController.i18n.json new file mode 100644 index 0000000000000..14c77e0d64434 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/referenceSearch/browser/referencesController.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "labelLoading": "Yükleniyor..." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/trk/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json new file mode 100644 index 0000000000000..a3b4193dbe7c3 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "aria.oneReference": "{0} yolunda, {1}. satır {2}. sütundaki sembol", + "aria.fileReferences.1": "{0} içinde 1 sembol, tam yol {1}", + "aria.fileReferences.N": "{1} içinde {0} sembol, tam yol {2}", + "aria.result.0": "Sonuç bulunamadı", + "aria.result.1": "{0} yolunda 1 sembol bulundu", + "aria.result.n1": "{1} yolunda {0} sembol bulundu", + "aria.result.nm": "{1} dosyada {0} sembol bulundu" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/trk/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json new file mode 100644 index 0000000000000..6165a40b9f90e --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "referencesFailre": "Dosya çözümlenemedi.", + "referencesCount": "{0} başvuru", + "referenceCount": "{0} başvuru", + "missingPreviewMessage": "önizleme yok", + "treeAriaLabel": "Başvurular", + "noResults": "Sonuç yok", + "peekView.alternateTitle": "Başvurular", + "peekViewTitleBackground": "Gözetleme görünümü başlık alanının arka plan rengi.", + "peekViewTitleForeground": "Gözetleme görünümü başlığının rengi.", + "peekViewTitleInfoForeground": "Gözetleme görünümü başlık bilgisinin rengi.", + "peekViewBorder": "Gözetleme görünümü kenarlıkları ve ok işaretinin rengi.", + "peekViewResultsBackground": "Gözetleme görünümü sonuç listesinin arka plan rengi.", + "peekViewResultsMatchForeground": "Gözetleme görünümü sonuç listesindeki satır düğümlerinin ön plan rengi.", + "peekViewResultsFileForeground": "Gözetleme görünümü sonuç listesindeki dosya düğümlerinin ön plan rengi.", + "peekViewResultsSelectionBackground": "Gözetleme görünümü sonuç listesindeki seçilen girdinin arka plan rengi.", + "peekViewResultsSelectionForeground": "Gözetleme görünümü sonuç listesindeki seçilen girdinin ön plan rengi.", + "peekViewEditorBackground": "Gözetleme görünümü düzenleyicisinin arka plan rengi.", + "peekViewEditorGutterBackground": "Gözetleme görünümü düzenleyicisindeki oluğun arka plan rengi.", + "peekViewResultsMatchHighlight": "Gözetleme görünümü sonuç listesindeki eşleşme vurgusu rengi.", + "peekViewEditorMatchHighlight": "Gözetleme görünümü düzenleyicisindeki eşleşme vurgusu rengi." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/rename/browser/rename.i18n.json b/i18n/trk/src/vs/editor/contrib/rename/browser/rename.i18n.json new file mode 100644 index 0000000000000..4440b96d71b56 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/rename/browser/rename.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "no result": "Sonuç yok.", + "aria": "'{0}', '{1}' olarak başarıyla yeniden adlandırıldı. Özet: {2}", + "rename.failed": "Üzgünüz, yeniden adlandırma işlemi başarısız oldu.", + "rename.label": "Sembolü Yeniden Adlandır" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/rename/browser/renameInputField.i18n.json b/i18n/trk/src/vs/editor/contrib/rename/browser/renameInputField.i18n.json new file mode 100644 index 0000000000000..eea4501c3d801 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/rename/browser/renameInputField.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "renameAriaLabel": "Girdiyi yeniden adlandır. Yeni adı girin ve işlemek için Enter'a basın." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/smartSelect/common/smartSelect.i18n.json b/i18n/trk/src/vs/editor/contrib/smartSelect/common/smartSelect.i18n.json new file mode 100644 index 0000000000000..b63d95ca27146 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/smartSelect/common/smartSelect.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.grow": "Seçimi Genişlet", + "smartSelect.shrink": "Seçimi Daralt" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json b/i18n/trk/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json new file mode 100644 index 0000000000000..d6c0cfacacb93 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "arai.alert.snippet": "'{0}' kabul edildiği için şu metin eklendi: {1}", + "suggest.trigger.label": "Öneriyi Tetikle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/trk/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json new file mode 100644 index 0000000000000..657260a00490d --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorSuggestWidgetBackground": "Öneri aracının arka plan rengi.", + "editorSuggestWidgetBorder": "Öneri aracının kenarlık rengi.", + "editorSuggestWidgetForeground": "Öneri aracının ön plan rengi.", + "editorSuggestWidgetSelectedBackground": "Öneri aracındaki seçilen girdinin arka plan rengi.", + "editorSuggestWidgetHighlightForeground": "Öneri aracındaki eşleşme vurgularının rengi.", + "readMore": "Devamını Oku...{0}", + "suggestionWithDetailsAriaLabel": "{0}, öneri, detaylı", + "suggestionAriaLabel": "{0}, öneri", + "readLess": "Daha azını oku...{0}", + "suggestWidget.loading": "Yükleniyor...", + "suggestWidget.noSuggestions": "Öneri yok.", + "suggestionAriaAccepted": "{0}, kabul edildi", + "ariaCurrentSuggestionWithDetails": "{0}, öneri, detaylı", + "ariaCurrentSuggestion": "{0}, öneri" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json b/i18n/trk/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json new file mode 100644 index 0000000000000..720f500431fd3 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggle.tabMovesFocus": "Tab Tuşu İle Odak Değiştirmeyi Aç/Kapat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.i18n.json b/i18n/trk/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.i18n.json new file mode 100644 index 0000000000000..25e86b185b818 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wordHighlight": "Bir değişkeni okumak gibi, okuma-erişimi sırasındaki bir sembolün arka plan rengi.", + "wordHighlightStrong": "Bir değişkene yazmak gibi, yazma-erişimi sırasındaki bir sembolün arka plan rengi." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.i18n.json b/i18n/trk/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.i18n.json new file mode 100644 index 0000000000000..8a312782515d9 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "Kapat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/electron-browser/textMate/TMSyntax.i18n.json b/i18n/trk/src/vs/editor/electron-browser/textMate/TMSyntax.i18n.json new file mode 100644 index 0000000000000..cd8f883eda733 --- /dev/null +++ b/i18n/trk/src/vs/editor/electron-browser/textMate/TMSyntax.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid.language": "`contributes.{0}.language` ögesinde bilinmeyen dil. Sağlanan değer: {1}", + "invalid.scopeName": "`contributes.{0}.scopeName` ögesinde dize bekleniyor. Sağlanan değer: {1}", + "invalid.path.0": "`contributes.{0}.path` ögesinde dize bekleniyor. Sağlanan değer: {1}", + "invalid.injectTo": "`contributes.{0}.injectTo` ögesinde geçersiz değer. Dil kapsam adlarından oluşan bir dizi olmalıdır. Sağlanan değer: {1}", + "invalid.embeddedLanguages": "`contributes.{0}.embeddedLanguages` ögesinde geçersiz değer. Kapsam adından dile kadar olan bir nesne haritası olmalıdır. Sağlanan değer: {1}", + "invalid.path.1": "`contributes.{0}.path` ögesinin ({1}) eklentinin klasöründe ({2}) yer alması bekleniyor. Bu, eklentiyi taşınamaz yapabilir.", + "no-tm-grammar": "Bu dil için kayıtlı bir TM Grameri yok." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/trk/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json new file mode 100644 index 0000000000000..270182c4a478e --- /dev/null +++ b/i18n/trk/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parseErrors": "{0} için ayrıştırma hataları: {1}", + "schema.openBracket": "Açılış ayracı karakteri veya dize sırası.", + "schema.closeBracket": "Kapanış ayracı karakteri veya dize sırası.", + "schema.comments": "Yorum sembollerini tanımlar.", + "schema.blockComments": "Blok açıklamalarının nasıl işaretlendiğini tanımlar.", + "schema.blockComment.begin": "Blok açıklamasını başlatan karakter dizisi.", + "schema.blockComment.end": "Blok açıklamasını bitiren karakter dizisi.", + "schema.lineComment": "Satır açıklamasını başlatan karakter dizisi.", + "schema.brackets": "Girintiyi artıran veya azaltan ayraç sembollerini tanımlar.", + "schema.autoClosingPairs": "Ayraç çiftlerini tanımlar. Bir açılış ayracı girildiğinde, kapanış ayracı otomatik olarak eklenir.", + "schema.autoClosingPairs.notIn": "Otomatik çiftlerin devre dışı bırakıldığı bir kapsamlar listesi tanımlar.", + "schema.surroundingPairs": "Seçili bir dizeyi çevrelemek için kullanılabilecek ayraç çiftlerini tanımlar.", + "schema.wordPattern": "Dilin kelime tanımı.", + "schema.wordPattern.pattern": "Sözcükleri eşleştirmek için kullanılacak Düzenli İfade.", + "schema.wordPattern.flags": "Sözcükleri eşleştirmek için kullanılacak Düzenli İfade işaretleri.", + "schema.wordPattern.flags.errorMessage": "`/^([gimuy]+)$/` kalıbı ile eşleşmelidir." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/node/textMate/TMGrammars.i18n.json b/i18n/trk/src/vs/editor/node/textMate/TMGrammars.i18n.json new file mode 100644 index 0000000000000..60439bb3b955c --- /dev/null +++ b/i18n/trk/src/vs/editor/node/textMate/TMGrammars.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.grammars": "textmate tokenizerlere ekleme yapar.", + "vscode.extension.contributes.grammars.language": "Bu söz diziminin ekleneceği dil tanımlayıcısı.", + "vscode.extension.contributes.grammars.scopeName": "tmLanguage dosyası tarafından kullanılan Textmate kapsam adı.", + "vscode.extension.contributes.grammars.path": "tmLanguage dosyasının yolu. Yol, eklenti klasörüne görecelidir ve genellikle './syntaxes/' ile başlar.", + "vscode.extension.contributes.grammars.embeddedLanguages": "Bu dil bilgisinin gömülü dilleri içermesi durumundaki bir dil kimliğinin kapsam adı haritası.", + "vscode.extension.contributes.grammars.injectTo": "Bu dil bilgisinin yerleştirileceği dil kapsam adları listesi." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/actions/browser/menuItemActionItem.i18n.json b/i18n/trk/src/vs/platform/actions/browser/menuItemActionItem.i18n.json new file mode 100644 index 0000000000000..e64a7d0ed09f0 --- /dev/null +++ b/i18n/trk/src/vs/platform/actions/browser/menuItemActionItem.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "titleAndKb": "{0} ({1})" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/trk/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json new file mode 100644 index 0000000000000..1fc7a73569018 --- /dev/null +++ b/i18n/trk/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "menü ögeleri bir dizi olmalıdır", + "requirestring": "`{0}` özelliği zorunludur ve `string` türünde olmalıdır", + "optstring": "`{0}` özelliği atlanabilir veya `string` türünde olmalıdır", + "vscode.extension.contributes.menuItem.command": "Yürütülecek komutun tanımlayıcısı. Komut 'commands' bölümünde tanımlanmalıdır", + "vscode.extension.contributes.menuItem.alt": "Yürütülecek alternatif bir komutun tanımlayıcısı. Komut 'commands' bölümünde tanımlanmalıdır", + "vscode.extension.contributes.menuItem.when": "Bu ögeyi göstermek için doğru olması gereken koşul", + "vscode.extension.contributes.menuItem.group": "Bu komutun ait olduğu gruba ekle", + "vscode.extension.contributes.menus": "Düzenleyiciye menü ögeleri ekler", + "menus.commandPalette": "Komut Paleti", + "menus.editorTitle": "Düzenleyici başlık menüsü", + "menus.editorContext": "Düzenleyici bağlam menüsü", + "menus.explorerContext": "Dosya gezgini bağlam menüsü", + "menus.editorTabContext": "Düzenleyici sekmeleri bağlam menüsü", + "menus.debugCallstackContext": "Hata ayıklama çağrı yığını bağlam menüsü", + "menus.scmTitle": "Kaynak Denetimi başlık menüsü", + "menus.resourceGroupContext": "Kaynak Denetimi kaynak grubu bağlam menüsü", + "menus.resourceStateContext": "Kaynak Denetimi kaynak durumu bağlam menüsü", + "view.viewTitle": "Katkıda bulunan görünümü başlık menüsü", + "view.itemContext": "Katkıda bulunan görünümü öge bağlam menüsü", + "nonempty": "boş olmayan değer beklendi.", + "opticon": "`icon` özelliği atlanabilir veya bir dize ya da `{dark, light}` gibi bir değişmez değer olmalıdır", + "requireStringOrObject": "`{0}` özelliği zorunludur ve `string` veya `object` türünde olmalıdır", + "requirestrings": "`{0}` ve `{1}` özellikleri zorunludur ve `string` türünde olmalıdır", + "vscode.extension.contributes.commandType.command": "Yürütülecek komutun tanımlayıcısı", + "vscode.extension.contributes.commandType.title": "Komutu kullanıcı arayüzünde temsil edecek başlık", + "vscode.extension.contributes.commandType.category": "(İsteğe Bağlı) Kullanıcı arayüzünde komutun gruplanacağı kategori dizesi", + "vscode.extension.contributes.commandType.icon": "(İsteğe Bağlı) Komutun, Kullanıcı Arayüzü'nde temsil edilmesinde kullanılacak simge. Bir dosya yolu veya tema olarak kullanılabilir bir yapılandırmadır", + "vscode.extension.contributes.commandType.icon.light": "Açık bir tema kullanıldığındaki simge yolu", + "vscode.extension.contributes.commandType.icon.dark": "Koyu bir tema kullanıldığındaki simge yolu", + "vscode.extension.contributes.commands": "Komut paletine komutlar ekler.", + "dup": "`{0}` komutu `commands` bölümünde birden çok kez görünüyor.", + "menuId.invalid": "`{0}` geçerli bir menü tanımlayıcısı değil", + "missing.command": "Menü ögesi, 'commands' bölümünde tanımlanmamış bir `{0}` komutuna başvuruyor.", + "missing.altCommand": "Menü ögesi, 'commands' bölümünde tanımlanmamış bir `{0}` alternatif komutuna başvuruyor.", + "dupe.command": "Menü ögesi, aynı varsayılan ve alternatif komutlarına başvuruyor", + "nosupport.altCommand": "Üzgünüz, fakat sadece 'editor/title' menüsünün 'navigation' grubu alternatif komutları destekliyor" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/configuration/common/configurationRegistry.i18n.json b/i18n/trk/src/vs/platform/configuration/common/configurationRegistry.i18n.json new file mode 100644 index 0000000000000..5c8dd6774ff95 --- /dev/null +++ b/i18n/trk/src/vs/platform/configuration/common/configurationRegistry.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultConfigurations.title": "Varsayılan Yapılandırma Geçersiz Kılmaları", + "overrideSettings.description": "{0} dili için geçersiz kılınacak düzenleyici ayarlarını yapılandırın.", + "overrideSettings.defaultDescription": "Bir dil için geçersiz kılınacak düzenleyici ayarlarını yapılandırın.", + "config.property.languageDefault": "'{0}' kaydedilemiyor. Bu, dile özgü düzenleyici ayarlarını tanımlamak için '\\\\[.*\\\\]$' özellik kalıbı ile eşleşir. 'configurationDefaults' ögesini kullanın.", + "config.property.duplicate": "'{0}' kaydedilemiyor. Bu özellik zaten kayıtlı." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/environment/node/argv.i18n.json b/i18n/trk/src/vs/platform/environment/node/argv.i18n.json new file mode 100644 index 0000000000000..f3d197dfba2c1 --- /dev/null +++ b/i18n/trk/src/vs/platform/environment/node/argv.i18n.json @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "gotoValidation": "`--goto` modundaki argümanlar `FILE(:LINE(:CHARACTER))` biçiminde olmalıdır.", + "diff": "Bir karşılaştırma düzenleyicisi aç. İki dosya yolu argüman olarak iletilmelidir.", + "goto": "Yoldaki dosyayı satırda ve sütunda aç (yola :line[:character] ekleyin).", + "locale": "Kullanılacak yerel dil (örnek: en-US veya zh-TW).", + "newWindow": "Yeni bir Code örneğini zorla.", + "performance": "'Geliştirici: Başlangıç Performansı' komutu etkinleştirilmiş olarak başlat.", + "prof-startup": "Başlangıç sırasında CPU profil oluşturucusunu çalıştır", + "reuseWindow": "Bir dosya veya klasörü son etkin pencerede açmaya zorlayın.", + "userDataDir": "Kullanıcı verilerinin tutulacağı klasörü belirtir, root olarak çalışırken yararlıdır.", + "verbose": "Ayrıntılı çıktı oluştur (--wait anlamına gelir).", + "wait": "Geri dönmeden önce pencerenin kapanmasını bekle.", + "extensionHomePath": "Eklentilerin kök dizinini belirle.", + "listExtensions": "Yüklü eklentileri listele.", + "showVersions": "--list-extensions'u kullanırken, yüklü eklentilerin sürümlerini gösterir.", + "installExtension": "Bir eklenti yükler.", + "uninstallExtension": "Bir eklentiyi kaldırır.", + "experimentalApis": "Bir eklenti için önerilen API özelliklerini etkinleştirir.", + "disableExtensions": "Yüklü tüm eklentileri devre dışı bırak.", + "disableGPU": "GPU donanım hızlandırmasını devre dışı bırak.", + "version": "Sürümü göster.", + "help": "Kullanımı göster.", + "usage": "Kullanım", + "options": "seçenekler", + "paths": "yollar", + "optionsUpperCase": "Seçenekler" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/extensionManagement/common/extensionEnablementService.i18n.json b/i18n/trk/src/vs/platform/extensionManagement/common/extensionEnablementService.i18n.json new file mode 100644 index 0000000000000..a616c58befac8 --- /dev/null +++ b/i18n/trk/src/vs/platform/extensionManagement/common/extensionEnablementService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noWorkspace": "Çalışma alanı yok." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/extensionManagement/common/extensionManagement.i18n.json b/i18n/trk/src/vs/platform/extensionManagement/common/extensionManagement.i18n.json new file mode 100644 index 0000000000000..b894836196dec --- /dev/null +++ b/i18n/trk/src/vs/platform/extensionManagement/common/extensionManagement.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensions": "Eklentiler", + "preferences": "Tercihler" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/trk/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json new file mode 100644 index 0000000000000..e335acfc388f2 --- /dev/null +++ b/i18n/trk/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "notFound": "Eklenti bulunamadı", + "noCompatible": "{0} eklentisinin Code'un bu sürümüyle uyumlu bir sürümü bulunamadı." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json b/i18n/trk/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json new file mode 100644 index 0000000000000..46113aaf483da --- /dev/null +++ b/i18n/trk/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalidManifest": "Eklenti geçersiz: package.json bir JSON dosyası değil.", + "restartCode": "{0} eklentisini yeniden yüklemeden önce lütfen Code'u yeniden başlatın.", + "installDependeciesConfirmation": "'{0}' eklentisini yüklediğinizde onun bağımlılıkları da yüklenir. Devam etmek istiyor musunuz?", + "install": "Evet", + "doNotInstall": "Hayır", + "uninstallDependeciesConfirmation": "Yalnızca '{0}' eklentisini mi yoksa bağımlılıklarını da kaldırmak ister misiniz?", + "uninstallOnly": "Sadece Eklenti", + "uninstallAll": "Tümü", + "cancel": "İptal", + "uninstallConfirmation": "'{0}' eklentisini kaldırmak istediğinizden emin misiniz?", + "ok": "Tamam", + "singleDependentError": "'{0}' eklentisi kaldırılamıyor. '{1}' eklentisi buna bağlı.", + "twoDependentsError": "'{0}' eklentisi kaldırılamıyor. '{1}' ve '{2}' eklentileri buna bağlı.", + "multipleDependentsError": "'{0}' eklentisi kaldırılamıyor. '{1}, '{2}' eklentileri ve diğerleri buna bağlı.", + "notExists": "Eklenti bulunamadı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/extensions/common/abstractExtensionService.i18n.json b/i18n/trk/src/vs/platform/extensions/common/abstractExtensionService.i18n.json new file mode 100644 index 0000000000000..f48bbd6079549 --- /dev/null +++ b/i18n/trk/src/vs/platform/extensions/common/abstractExtensionService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownDep": "`{1}` eklentisi etkinleştirilemedi. Neden: bilinmeyen bağımlılık `{0}`.", + "failedDep1": "`{1}` eklentisi etkinleştirilemedi. Neden: bağımlılık `{0}` etkinleştirilemedi.", + "failedDep2": "`{0}` eklentisi etkinleştirilemedi. Neden: 10'dan fazla bağımlılık düzeyi (büyük olasılıkla bağımlılık döngüsü).", + "activationError": "`{0}` eklentisi etkinleştirilemedi: {1}." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/trk/src/vs/platform/extensions/common/extensionsRegistry.i18n.json new file mode 100644 index 0000000000000..c156b75da26f4 --- /dev/null +++ b/i18n/trk/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.engines.vscode": "Eklentinin uyumlu olduğu VS Code sürümünü belirten VS Code eklentileri için. * olamaz. Örneğin: ^0.10.5 uyumlu olduğu minimum VS Code sürümünün 0.10.5 olduğunu gösterir.", + "vscode.extension.publisher": "VS Code eklentisinin yayıncısı.", + "vscode.extension.displayName": "VS Code galerisinde kullanılan eklentinin görünen adı.", + "vscode.extension.categories": "Bu eklentiyi kategorize etmek için VS Code galerisi tarafından kullanılan kategoriler.", + "vscode.extension.galleryBanner": "VS Code markette kullanılan afiş.", + "vscode.extension.galleryBanner.color": "VS Code marketteki sayfa başlığındaki afiş rengi.", + "vscode.extension.galleryBanner.theme": "Afişte kullanılan yazı tipi için renk teması.", + "vscode.extension.contributes": "Bu paketin temsil ettiği VS Code eklentisinin tüm katkıları.", + "vscode.extension.preview": "Markette eklentinin Önizleme olarak işaretlenmesini sağlar.", + "vscode.extension.activationEvents": "VS Code eklentisi için etkinleştirme olayları.", + "vscode.extension.activationEvents.onLanguage": "Belirtilen dilde çözümlenen bir dosya her açıldığında bir etkinleştirme olayı yayınlanır.", + "vscode.extension.activationEvents.onCommand": "Belirtilen komut her çağrıldığında bir etkinleştirme olayı yayınlanır.", + "vscode.extension.activationEvents.onDebug": "Belirtilen türde bir hata ayıklama oturumu her başladığında bir etkinleştirme olayı yayınlanır.", + "vscode.extension.activationEvents.workspaceContains": "Belirtilen glob deseni ile eşleşen en az bir dosya içeren bir klasör her açıldığında bir etkinleştirme olayı yayınlanır.", + "vscode.extension.activationEvents.onView": "Belirtilen görünüm her genişletildiğinde bir etkinleştirme olayı yayınlanır.", + "vscode.extension.activationEvents.star": "VS Code başlatıldığında yayılan etkinleştirme olayı. Mükemmel bir son kullanıcı deneyimi sağlandığından emin olmak için, lütfen bu etkinleştirme olayını eklentinizde sadece kullanım durumunuzda başka hiçbir aktivasyon olayı kombinasyonu çalışmıyorsa kullanın.", + "vscode.extension.badges": "Marketin eklenti sayfasının kenar çubuğunda görüntülenecek göstergeler dizisi.", + "vscode.extension.badges.url": "Gösterge resmi URL'si.", + "vscode.extension.badges.href": "Gösterge bağlantısı.", + "vscode.extension.badges.description": "Gösterge açıklaması.", + "vscode.extension.extensionDependencies": "Diğer uzantılara bağımlılıklar. Bir uzantının tanımlayıcısı her zaman ${publisher}.${name} biçimindedir. Örneğin: vscode.csharp.", + "vscode.extension.scripts.prepublish": "Paket, bir VS Code eklentisi olarak yayımlamadan önce çalıştırılacak betik.", + "vscode.extension.icon": "128x128 piksellik bir simgenin yolu." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/extensions/node/extensionValidator.i18n.json b/i18n/trk/src/vs/platform/extensions/node/extensionValidator.i18n.json new file mode 100644 index 0000000000000..1b6d6ecbb85b0 --- /dev/null +++ b/i18n/trk/src/vs/platform/extensions/node/extensionValidator.i18n.json @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "versionSyntax": "`engines.vscode` değeri {0} ayrıştırılamadı. Lütfen örnekte verilenlere benzer ifadeler kullanın: ^0.10.0, ^1.2.3, ^0.11.0, ^0.10.x, vb.", + "versionSpecificity1": "`engines.vscode`da belirtilen sürüm ({0}) yeterince belirli değil. vscode 1.0.0'dan önceki sürümler için, lütfen istenecek minimum majör ve minör sürüm numarasını tanımlayın. Örneğin: ^0.10.0, 0.10.x, 0.11.0, vb.", + "versionSpecificity2": "`engines.vscode`da belirtilen sürüm ({0}) yeterince belirli değil. vscode 1.0.0'dan sonraki sürümler için, lütfen istenecek minimum majör sürüm numarasını tanımlayın. Örneğin: ^1.10.0, 1.10.x, 1.x.x, 2.x.x, vb.", + "versionMismatch": "Eklenti, Code {0} ile uyumlu değil. Gereken sürüm: {1}.", + "extensionDescription.empty": "Boş eklenti açıklaması alındı", + "extensionDescription.publisher": "`{0}` özelliği zorunludur ve `string` türünde olmalıdır", + "extensionDescription.name": "`{0}` özelliği zorunludur ve `string` türünde olmalıdır", + "extensionDescription.version": "`{0}` özelliği zorunludur ve `string` türünde olmalıdır", + "extensionDescription.engines": "`{0}` özelliği zorunludur ve `object` türünde olmalıdır", + "extensionDescription.engines.vscode": "`{0}` özelliği zorunludur ve `string` türünde olmalıdır", + "extensionDescription.extensionDependencies": "`{0}` özelliği atlanabilir veya `string[]` türünde olmalıdır", + "extensionDescription.activationEvents1": "`{0}` özelliği atlanabilir veya `string[]` türünde olmalıdır", + "extensionDescription.activationEvents2": "`{0}` ve `{1}` özelliklerinin ikisi birden belirtilmeli veya ikisi birden atlanmalıdır", + "extensionDescription.main1": "`{0}` özelliği atlanabilir veya `string` türünde olmalıdır", + "extensionDescription.main2": "`main` ({0}) yolunun eklentinin klasörü içine ({1}) eklenmiş olacağı beklendi. Bu, eklentiyi taşınamaz yapabilir.", + "extensionDescription.main3": "`{0}` ve `{1}` özelliklerinin ikisi birden belirtilmeli veya ikisi birden atlanmalıdır", + "notSemver": "Eklenti sürümü semver ile uyumlu değil." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/history/electron-main/historyMainService.i18n.json b/i18n/trk/src/vs/platform/history/electron-main/historyMainService.i18n.json new file mode 100644 index 0000000000000..9e486dd5b431d --- /dev/null +++ b/i18n/trk/src/vs/platform/history/electron-main/historyMainService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "newWindow": "Yeni Pencere", + "newWindowDesc": "Yeni bir pencere açar", + "recentFolders": "Son Kullanılan Klasörler", + "folderDesc": "{0} {1}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/integrity/node/integrityServiceImpl.i18n.json b/i18n/trk/src/vs/platform/integrity/node/integrityServiceImpl.i18n.json new file mode 100644 index 0000000000000..8d0fe38437997 --- /dev/null +++ b/i18n/trk/src/vs/platform/integrity/node/integrityServiceImpl.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "integrity.ok": "Tamam", + "integrity.dontShowAgain": "Tekrar gösterme", + "integrity.moreInfo": "Daha fazla bilgi", + "integrity.prompt": "{0} kurulumunuz bozuk görünüyor. Lütfen yeniden yükleyin." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/jsonschemas/common/jsonValidationExtensionPoint.i18n.json b/i18n/trk/src/vs/platform/jsonschemas/common/jsonValidationExtensionPoint.i18n.json new file mode 100644 index 0000000000000..8a050918f96ef --- /dev/null +++ b/i18n/trk/src/vs/platform/jsonschemas/common/jsonValidationExtensionPoint.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "contributes.jsonValidation": "json şema yapılandırmasına ekleme yapar.", + "contributes.jsonValidation.fileMatch": "Eşleşecek dosya örüntüsü, örneğin \"package.json\" veya \"*.launch\".", + "contributes.jsonValidation.url": "Bir şema URL'si ('http:', 'https:') veya eklenti klasörüne ('./') göreceli yol.", + "invalid.jsonValidation": "'configuration.jsonValidation' bir dizi olmalıdır", + "invalid.fileMatch": "'configuration.jsonValidation.fileMatch' tanımlanmalıdır", + "invalid.url": "'configuration.jsonValidation.url' bir URL veya göreli yol olmalıdır", + "invalid.url.fileschema": "'configuration.jsonValidation.url' geçersiz bir göreli URL'dir: {0}", + "invalid.url.schema": "'configuration.jsonValidation.url' ögesi eklentide bulunan şemalara başvurmak için 'http:', 'https:' veya './' ile başlamalıdır" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/keybinding/common/abstractKeybindingService.i18n.json b/i18n/trk/src/vs/platform/keybinding/common/abstractKeybindingService.i18n.json new file mode 100644 index 0000000000000..3993824999c6d --- /dev/null +++ b/i18n/trk/src/vs/platform/keybinding/common/abstractKeybindingService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "first.chord": "({0}) öğesine basıldı. Akorun ikinci tuşu bekleniyor...", + "missing.chord": "({0}, {1}) tuş bileşimi bir komut değil." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/trk/src/vs/platform/markers/common/problemMatcher.i18n.json new file mode 100644 index 0000000000000..a8da274ebabcf --- /dev/null +++ b/i18n/trk/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -0,0 +1,70 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ProblemPatternParser.loopProperty.notLast": "Döngü özelliği yalnızca son satır eşleştiricisinde desteklenir.", + "ProblemPatternParser.problemPattern.missingRegExp": "Sorun modelinde bir düzenli ifade eksik.", + "ProblemPatternParser.problemPattern.missingProperty": "Sorun modeli hatalı. En az bir dosya, mesaj ve satır veya konum eşleşme grubu bulundurmalıdır.", + "ProblemPatternParser.invalidRegexp": "Hata: Dize {0}, geçerli bir düzenli ifade değil.\n", + "ProblemPatternSchema.regexp": "Çıktıda bir hata, uyarı veya bilgi bulan düzenli ifade.", + "ProblemPatternSchema.file": "Dosya adının eşleştirme grubu indeksi. Atlanırsa 1 kullanılır.", + "ProblemPatternSchema.location": "Sorunun bulunduğu yerin eşleşme grubu indeksi. Geçerli konum örüntüleri şunlardır: (line), (line,column) ve (startLine,startColumn,endLine,endColumn). Atlanmışsa (line,column) varsayılır.", + "ProblemPatternSchema.line": "Sorunun satırının eşleştirme grubu indeksi. Varsayılan değeri 2'dir", + "ProblemPatternSchema.column": "Sorunun satır karakterinin eşleştirme grubu indeksi. Varsayılan değeri 3'tür", + "ProblemPatternSchema.endLine": "Sorunun satır sonunun eşleştirme grubu indeksi. Varsayılan değeri tanımsızdır", + "ProblemPatternSchema.endColumn": "Sorunun satır sonu karakterinin eşleştirme grubu indeksi. Varsayılan değeri tanımsızdır", + "ProblemPatternSchema.severity": "Sorunun öneminin eşleştirme grubu indeksi. Varsayılan değeri tanımsızdır", + "ProblemPatternSchema.code": "Sorunun kodunun eşleştirme grubu indeksi. Varsayılan değeri tanımsızdır", + "ProblemPatternSchema.message": "Mesajın eşleştirme grubu indeksi. Atlanırsa konum belirtildiğinde varsayılan olarak 4 kullanılır. Aksi taktirde varsayılan olarak 5 kullanılır.", + "ProblemPatternSchema.loop": "Birden çok satırlı eşleşmede döngü, bu kalıbın eşleştiği sürece bir döngüde yürütülüp yürütülmeyeceğini gösterir. Yalnızca birden çok satırlı bir kalıbın son kalıbında belirtilebilir.", + "NamedProblemPatternSchema.name": "Sorun modelinin adı.", + "NamedMultiLineProblemPatternSchema.name": "Birden çok satırlı sorun modelinin adı.", + "NamedMultiLineProblemPatternSchema.patterns": "Gerçek modeller.", + "ProblemPatternExtPoint": "Sorun modellerine ekleme yapar", + "ProblemPatternRegistry.error": "Geçersiz sorun modeli. Model yok sayılacaktır.", + "ProblemMatcherParser.noProblemMatcher": "Hata: açıklama bir sorun eşleştiricisine dönüştürülemez:\n{0}\n", + "ProblemMatcherParser.noProblemPattern": "Hata: açıklama geçerli bir sorun modeli tanımlamıyor:\n{0}\n", + "ProblemMatcherParser.noOwner": "Hata: açıklama bir sahip tanımlamıyor:\n{0}\n", + "ProblemMatcherParser.noFileLocation": "Hata: açıklama bir dosya yolu tanımlamıyor:\n{0}\n", + "ProblemMatcherParser.unknownSeverity": "Bilgi: bilinmeyen önem derecesi {0}. Geçerli değerler: error, warning ve info.\n", + "ProblemMatcherParser.noDefinedPatter": "Hata: tanımlayıcısı {0} olan model mevcut değil.", + "ProblemMatcherParser.noIdentifier": "Hata: model özelliği boş bir tanımlayıcıya karşılık geliyor.", + "ProblemMatcherParser.noValidIdentifier": "Hata: model özelliği {0} geçerli bir model değişkeni adı değil.", + "ProblemMatcherParser.problemPattern.watchingMatcher": "Bir sorun eşleştiricisi izlenecek bir başlangıç örüntüsü ve bir bitiş örüntüsü tanımlamalıdır.", + "ProblemMatcherParser.invalidRegexp": "Hata: Dize {0}, geçerli bir düzenli ifade değil.\n", + "WatchingPatternSchema.regexp": "Bir arka plan görevinin başlangıcını ve sonunu tespit edecek düzenli ifade.", + "WatchingPatternSchema.file": "Dosya adının eşleştirme grubu indeksi. Atlanabilir.", + "PatternTypeSchema.name": "Katkıda bulunulan veya ön tanımlı modelin adı", + "PatternTypeSchema.description": "Bir sorun modeli veya bir katkıda bulunulan veya ön tanımlı sorun modelinin adı. Temel model belirtildiyse atlanabilir.", + "ProblemMatcherSchema.base": "Kullanılacak temel sorun eşleştiricisinin adı.", + "ProblemMatcherSchema.owner": "Code'un içindeki sorunun sahibi. Temel model belirtildiyse atlanabilir. Atlanırsa ve temel belirtilmemişse 'external' varsayılır.", + "ProblemMatcherSchema.severity": "Sorun yakalamanın varsayılan önem derecesi. Model, önem derecesi için bir eşleme grubu tanımlamazsa kullanılır.", + "ProblemMatcherSchema.applyTo": "Bir metin belgesinde bildirilen bir sorunun sadece açık, kapalı veya tüm belgelere uygulanıp uygulanmadığını denetler.", + "ProblemMatcherSchema.fileLocation": "Bir sorun modelinde bildirilen dosya adlarının nasıl yorumlanacağını tanımlar.", + "ProblemMatcherSchema.background": "Bir arka plan görevinde aktif bir eşleştiricinin başlangıcını ve sonunu izlemek için kullanılan kalıplar.", + "ProblemMatcherSchema.background.activeOnStart": "\"true\" olarak ayarlanırsa, görev başladığında arka plan izleyicisi etkin modda olur. Bu, beginsPattern ile başlayan bir satırın verilmesi demektir", + "ProblemMatcherSchema.background.beginsPattern": "Çıktıda eşleşmesi halinde, arka plan görevinin başlatılması sinyali verilir.", + "ProblemMatcherSchema.background.endsPattern": "Çıktıda eşleşmesi halinde, arka plan görevinin sonu sinyali verilir.", + "ProblemMatcherSchema.watching.deprecated": "İzleme özelliği kullanım dışıdır. Onun yerine arka planı kullanın.", + "ProblemMatcherSchema.watching": "Bir izleme eşleştiricisinin başlangıcını ve sonunu izlemek için kullanılan kalıplar.", + "ProblemMatcherSchema.watching.activeOnStart": "\"true\" olarak ayarlanırsa, görev başladığında izleyici etkin modda olur. Bu, beginsPattern ile başlayan bir satırın verilmesi demektir", + "ProblemMatcherSchema.watching.beginsPattern": "Çıktıda eşleşmesi halinde, izleme görevinin başlatılması sinyali verilir.", + "ProblemMatcherSchema.watching.endsPattern": "Çıktıda eşleşmesi halinde, izleme görevinin sonu sinyali verilir.", + "LegacyProblemMatcherSchema.watchedBegin.deprecated": "Bu özellik kullanım dışıdır. Bunun yerine 'watching' özelliğini kullanın.", + "LegacyProblemMatcherSchema.watchedBegin": "İzlenen görevlerin yürütülmeye başlanmasının, dosya izleyerek tetiklendiğini işaret eden bir düzenli ifade.", + "LegacyProblemMatcherSchema.watchedEnd.deprecated": "Bu özellik kullanım dışıdır. Bunun yerine 'watching' özelliğini kullanın.", + "LegacyProblemMatcherSchema.watchedEnd": "İzlenen görevlerin yürütülmesinin sona erdiğini işaret eden bir düzenli ifade.", + "NamedProblemMatcherSchema.name": "Başvuru yapılırken kullanılacak sorun eşleştiricisinin adı.", + "NamedProblemMatcherSchema.label": "Sorun eşleştiricisinin insanlar tarafından okunabilir etiketi.", + "ProblemMatcherExtPoint": "Sorun eşleştiricilerine ekleme yapar", + "msCompile": "Microsoft derleyici sorunları", + "lessCompile": "Less sorunları", + "gulp-tsc": "Gulp TSC Sorunları", + "jshint": "JSHint sorunları", + "jshint-stylish": "JSHint stylish sorunları", + "eslint-compact": "ESLint compact sorunları", + "eslint-stylish": "ESLint stylish sorunları", + "go": "Go sorunları" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/message/common/message.i18n.json b/i18n/trk/src/vs/platform/message/common/message.i18n.json new file mode 100644 index 0000000000000..4f9a44f93833c --- /dev/null +++ b/i18n/trk/src/vs/platform/message/common/message.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "Kapat", + "later": "Daha Sonra", + "cancel": "İptal" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/request/node/request.i18n.json b/i18n/trk/src/vs/platform/request/node/request.i18n.json new file mode 100644 index 0000000000000..90faed28342ff --- /dev/null +++ b/i18n/trk/src/vs/platform/request/node/request.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "httpConfigurationTitle": "HTTP", + "proxy": "Kullanılacak proxy ayarı. Ayarlanmazsa, http_proxy ve https_proxy ortam değişkenlerinden alınır", + "strictSSL": "Proxy sunucu sertifikasının verilen Sertifika Yetkilileri listesine göre doğrulanması gerekip gerekmediği.", + "proxyAuthorization": "Her ağ isteği için 'Proxy-Authorization' başlığı olarak gönderilecek değer." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/telemetry/common/telemetryService.i18n.json b/i18n/trk/src/vs/platform/telemetry/common/telemetryService.i18n.json new file mode 100644 index 0000000000000..6c5812585d717 --- /dev/null +++ b/i18n/trk/src/vs/platform/telemetry/common/telemetryService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Telemetri", + "telemetry.enableTelemetry": "Kullanım verileri ve hataların Microsoft'a gönderilmesini etkinleştirin." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/trk/src/vs/platform/theme/common/colorRegistry.i18n.json new file mode 100644 index 0000000000000..00314571e28b7 --- /dev/null +++ b/i18n/trk/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -0,0 +1,89 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid.color": "Geçersiz renk biçimi. #RGB, #RGBA, #RRGGBB veya #RRGGBBAA kullanın", + "schema.colors": "Çalışma ekranında kullanılan renkler.", + "foreground": "Genel ön plan rengi. Bu renk, bir bileşen tarafından geçersiz kılınmadıkça kullanılır.", + "errorForeground": "Hata mesajları için genel ön plan rengi. Bu renk, bir bileşen tarafından geçersiz kılınmadıkça kullanılır.", + "descriptionForeground": "Ek bilgi sağlayan açıklama metni(örneğin bir etiket) için ön plan rengi.", + "focusBorder": "Odaklanılan ögeler için genel kenarlık rengi. Bu renk, bir bileşen tarafından geçersiz kılınmadıkça kullanılır.", + "contrastBorder": "Daha yüksek karşıtlık için, ögelerin etrafında onları diğerlerinden ayıracak ekstra bir kenarlık.", + "activeContrastBorder": "Daha yüksek karşıtlık için, aktif ögelerin etrafında onları diğerlerinden ayıracak ekstra bir kenarlık.", + "selectionBackground": "Çalışma ekranındaki metin seçimlerinin arka plan rengi(örneğin girdi alanları veya metin alanları). Bunun, düzenleyicideki seçimlere uygulanmayacağını unutmayın.", + "textSeparatorForeground": "Metin ayırıcıların rengi.", + "textLinkForeground": "Metindeki bağlantıların ön plan rengi.", + "textLinkActiveForeground": "Metindeki aktif bağlantıların ön plan rengi.", + "textPreformatForeground": "Önceden biçimlendirilmiş metin parçalarının ön plan rengi.", + "textBlockQuoteBackground": "Metindeki alıntı bloklarının arka plan rengi.", + "textBlockQuoteBorder": "Metindeki alıntı bloklarının kenarlık rengi.", + "textCodeBlockBackground": "Metindeki kod bloklarının arka plan rengi.", + "widgetShadow": "Bul/değiştir gibi düzenleyici içindeki araçların gölge rengi.", + "inputBoxBackground": "Giriş kutusu arka planı.", + "inputBoxForeground": "Giriş kutusu ön planı.", + "inputBoxBorder": "Giriş kutusu kenarlığı.", + "inputBoxActiveOptionBorder": "Girdi alanlarındaki aktif seçeneklerin kenarlık rengi.", + "inputPlaceholderForeground": "Yer tutucu metin için girdi kutusu ön plan rengi.", + "inputValidationInfoBackground": "Bilgi önem derecesi için girdi doğrulama arka plan rengi.", + "inputValidationInfoBorder": "Bilgi önem derecesi için girdi doğrulama kenarlık rengi.", + "inputValidationWarningBackground": "Bilgi uyarısı için girdi doğrulama arka plan rengi.", + "inputValidationWarningBorder": "Uyarı önem derecesi için girdi doğrulama kenarlık rengi.", + "inputValidationErrorBackground": "Hata önem derecesi için girdi doğrulama arka plan rengi.", + "inputValidationErrorBorder": "Hata önem derecesi için girdi doğrulama kenarlık rengi.", + "dropdownBackground": "Açılır kutu arka planı.", + "dropdownForeground": "Açılır kutu ön planı.", + "dropdownBorder": "Açılır kutu kenarlığı.", + "listFocusBackground": "Liste/Ağaç aktifken odaklanılan ögenin Lise/Ağaç arka plan rengi. Bir aktif liste/ağaç, klavye odağındadır; pasif olan odakta değildir.", + "listFocusForeground": "Liste/Ağaç aktifken odaklanılan ögenin Lise/Ağaç ön plan rengi. Bir aktif liste/ağaç, klavye odağındadır; pasif olan odakta değildir.", + "listActiveSelectionBackground": "Liste/Ağaç aktifken seçilen ögenin Lise/Ağaç arka plan rengi. Bir aktif liste/ağaç, klavye odağındadır; pasif olan odakta değildir.", + "listActiveSelectionForeground": "Liste/Ağaç aktifken seçilen ögenin Lise/Ağaç ön plan rengi. Bir aktif liste/ağaç, klavye odağındadır; pasif olan odakta değildir.", + "listInactiveSelectionBackground": "Liste/Ağaç pasifken seçilen ögenin Lise/Ağaç arka plan rengi. Bir aktif liste/ağaç, klavye odağındadır; pasif olan odakta değildir.", + "listInactiveSelectionForeground": "Liste/Ağaç pasifken seçilen ögenin Lise/Ağaç ön plan rengi. Bir aktif liste/ağaç, klavye odağındadır; pasif olan odakta değildir.", + "listHoverBackground": "Fare ile ögelerin üzerine gelindiğinde Liste/Ağaç arka planı.", + "listHoverForeground": "Fare ile ögelerin üzerine gelindiğinde Liste/Ağaç ön planı.", + "listDropBackground": "Fare ile ögeler taşınırken Liste/Ağaç sürükle ve bırak arka planı.", + "highlight": "Liste/Ağaç içinde arama yaparken eşleşme vurgularının Liste/Ağaç ön plan rengi.", + "pickerGroupForeground": "Gruplama etiketleri için hızlı seçici rengi.", + "pickerGroupBorder": "Gruplama kenarlıkları için hızlı seçici rengi.", + "buttonForeground": "Buton ön plan rengi.", + "buttonBackground": "Buton arka plan rengi.", + "buttonHoverBackground": "Fareyle üzerine gelindiğinde buton arka plan rengi.", + "badgeBackground": "Gösterge arka plan rengi. Göstergeler küçük bilgi etiketleridir, ör. arama sonucu sayısı için.", + "badgeForeground": "Gösterge ön plan rengi. Göstergeler küçük bilgi etiketleridir, ör. arama sonucu sayısı için.", + "scrollbarShadow": "Görünümün kaydırıldığını belirtmek için kaydırma çubuğu gölgesi.", + "scrollbarSliderBackground": "Kaydıraç arka plan rengi.", + "scrollbarSliderHoverBackground": "Fareyle üzerine gelindiğinde kaydıraç arka plan rengi.", + "scrollbarSliderActiveBackground": "Aktif kaydıraç arka plan rengi.", + "progressBarBackground": "Uzun süren işlemleri gösterebilen ilerleme çubuğunun arka plan rengi.", + "editorBackground": "Düzenleyici arka plan rengi.", + "editorForeground": "Düzenleyici varsayılan ön plan rengi.", + "editorWidgetBackground": "Bul/değiştir gibi düzenleyici araçlarının arka plan rengi.", + "editorWidgetBorder": "Editör araçlarının kenarlık rengi. Renk, araç bir kenarlığı olmasına karar verdiğinde ve renk hiçbir eklenti tarafından geçersiz kılınmadığında kullanılır.", + "editorSelectionBackground": "Düzenleyici seçiminin rengi.", + "editorSelectionForeground": "Yüksek karşıtlık için seçilen metnin rengi.", + "editorInactiveSelection": "Bir pasif düzenleyicideki seçimin rengi.", + "editorSelectionHighlight": "Seçimle aynı içeriğe sahip bölgelerin rengi.", + "editorFindMatch": "Geçerli arama eşleşmesinin rengi.", + "findMatchHighlight": "Diğer arama eşleşmelerinin rengi.", + "findRangeHighlight": "Aramayı sınırlayan aralığı renklendirin.", + "hoverHighlight": "Bağlantı vurgusu gösterilen bir sözcüğün altını vurgulayın.", + "hoverBackground": "Düzenleyici bağlantı vurgusunun arka plan rengi.", + "hoverBorder": "Düzenleyici bağlantı vurgusunun kenarlık rengi.", + "activeLinkForeground": "Aktif bağlantıların rengi.", + "diffEditorInserted": "Eklenen metnin arka plan rengi.", + "diffEditorRemoved": "Çıkarılan metnin arka plan rengi.", + "diffEditorInsertedOutline": "Eklenen metnin ana hat rengi.", + "diffEditorRemovedOutline": "Çıkarılan metnin ana hat rengi.", + "mergeCurrentHeaderBackground": "Satır içi birleştirme çakışmalarında geçerli üstbilgi arka planı.", + "mergeCurrentContentBackground": "Satır içi birleştirme çakışmalarında geçerli içerik arka planı.", + "mergeIncomingHeaderBackground": "Satır içi birleştirme çakışmalarında gelen üstbilgi arka planı.", + "mergeIncomingContentBackground": "Satır içi birleştirme çakışmalarında gelen içerik arka planı.", + "mergeCommonHeaderBackground": "Satır içi birleştirme çakışmalarında ortak ata üstbilgisi arka planı.", + "mergeCommonContentBackground": "Satır içi birleştirme çakışmalarında ortak ata içeriği arka planı.", + "mergeBorder": "Satır içi birleştirme çakışmalarında üst bilgi ve ayırıcıdaki kenarlık rengi.", + "overviewRulerCurrentContentForeground": "Satır içi birleştirme çakışmalarında geçerli genel bakış cetveli ön planı.", + "overviewRulerIncomingContentForeground": "Satır içi birleştirme çakışmalarında gelen genel bakış cetveli ön planı.", + "overviewRulerCommonContentForeground": "Satır içi birleştirme çakışmalarında ortak ata genel bakış cetveli ön planı." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/trk/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json new file mode 100644 index 0000000000000..0a8ef8463d3a7 --- /dev/null +++ b/i18n/trk/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "overwritingExtension": "{0} eklentisinin üzerine {1} yazılıyor.", + "extensionUnderDevelopment": "{0} konumundaki geliştirme eklentisi yükleniyor" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/trk/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json new file mode 100644 index 0000000000000..d3de90fb241d9 --- /dev/null +++ b/i18n/trk/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "Kapat", + "cancel": "İptal", + "ok": "Tamam" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/api/node/extHostDiagnostics.i18n.json b/i18n/trk/src/vs/workbench/api/node/extHostDiagnostics.i18n.json new file mode 100644 index 0000000000000..ebbdf8fa988c4 --- /dev/null +++ b/i18n/trk/src/vs/workbench/api/node/extHostDiagnostics.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "limitHit": "Diğer {0} hata ve uyarılar gösterilmiyor." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/trk/src/vs/workbench/api/node/extHostTask.i18n.json new file mode 100644 index 0000000000000..4b90a12aaf247 --- /dev/null +++ b/i18n/trk/src/vs/workbench/api/node/extHostTask.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "task.label": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/trk/src/vs/workbench/api/node/extHostTreeViews.i18n.json new file mode 100644 index 0000000000000..a3dd0ab5f9592 --- /dev/null +++ b/i18n/trk/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeView.notRegistered": "Kayıtlı '{0}' Id'li ağaç görünümü yok.", + "treeItem.notFound": "'{0}' Id'li ağaç ögesi yok.", + "treeView.duplicateElement": "{0} ögesi zaten kayıtlı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/actions/configureLocale.i18n.json b/i18n/trk/src/vs/workbench/browser/actions/configureLocale.i18n.json new file mode 100644 index 0000000000000..d7620dc687c54 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/actions/configureLocale.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "configureLocale": "Dili Yapılandır", + "displayLanguage": "VSCode'un görüntüleme dilini tanımlar.", + "doc": "Desteklenen dillerin listesi için göz atın: {0}", + "restart": "Değeri değiştirirseniz VSCode'u yeniden başlatmanız gerekir.", + "fail.createSettings": " '{0}' oluşturulamadı ({1}).", + "JsonSchema.locale": "Kullanılacak Kullanıcı Arayüzü Dili." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/actions/fileActions.i18n.json b/i18n/trk/src/vs/workbench/browser/actions/fileActions.i18n.json new file mode 100644 index 0000000000000..dd1f86a2b56d0 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/actions/fileActions.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFolder": "Klasör Aç...", + "openFileFolder": "Aç...", + "addFolderToWorkspace": "Çalışma Alanına Klasör Ekle...", + "add": "Ekle", + "addFolderToWorkspaceTitle": "Çalışma Alanına Klasör Ekle", + "removeFolderFromWorkspace": "Çalışma Alanından Klasör Kaldır" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/actions/toggleActivityBarVisibility.i18n.json b/i18n/trk/src/vs/workbench/browser/actions/toggleActivityBarVisibility.i18n.json new file mode 100644 index 0000000000000..1af785233f8bd --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/actions/toggleActivityBarVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleActivityBar": "Etkinlik Çubuğunu Gizle/Göster", + "view": "Görüntüle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/actions/toggleEditorLayout.i18n.json b/i18n/trk/src/vs/workbench/browser/actions/toggleEditorLayout.i18n.json new file mode 100644 index 0000000000000..237f4af975ca4 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/actions/toggleEditorLayout.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleEditorGroupLayout": "Düzenleyici Grubunu Dikey/Yatay Düzende Değiştir", + "horizontalLayout": "Yatay Düzenleyici Grubu Düzeni", + "verticalLayout": "Dikey Düzenleyici Grubu Düzeni", + "view": "Görüntüle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json b/i18n/trk/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json new file mode 100644 index 0000000000000..b5c1cbc783e3a --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "Kenar Çubuğu Konumunu Değiştir", + "view": "Görüntüle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/actions/toggleSidebarVisibility.i18n.json b/i18n/trk/src/vs/workbench/browser/actions/toggleSidebarVisibility.i18n.json new file mode 100644 index 0000000000000..714ae09d79009 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/actions/toggleSidebarVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleSidebar": "Kenar Çubuğunu Gizle/Göster", + "view": "Görüntüle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/actions/toggleStatusbarVisibility.i18n.json b/i18n/trk/src/vs/workbench/browser/actions/toggleStatusbarVisibility.i18n.json new file mode 100644 index 0000000000000..8636912355aee --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/actions/toggleStatusbarVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleStatusbar": "Durum Çubuğunu Gizle/Göster", + "view": "Görüntüle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/actions/toggleZenMode.i18n.json b/i18n/trk/src/vs/workbench/browser/actions/toggleZenMode.i18n.json new file mode 100644 index 0000000000000..999c18e1dbdbe --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/actions/toggleZenMode.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleZenMode": "Zen Modunu Aç/Kapat", + "view": "Görüntüle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/activitybar/activitybarActions.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/activitybar/activitybarActions.i18n.json new file mode 100644 index 0000000000000..eaa011efe7e3c --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/activitybar/activitybarActions.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeFromActivityBar": "Etkinlik Çubuğundan Kaldır", + "keepInActivityBar": "Etkinlik Çubuğunda Tut", + "titleKeybinding": "{0} ({1})", + "additionalViews": "Ek Görünümler", + "numberBadge": "{0} ({1})", + "manageExtension": "Eklentiyi Yönet", + "toggle": "Görünüm Sabitlemeyi Aç/Kapat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json new file mode 100644 index 0000000000000..32c2c08ce4c1f --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hideActivitBar": "Etkinlik Çubuğunu Gizle", + "activityBarAriaLabel": "Aktif Görünüm Değiştirici", + "globalActions": "Global Eylemler" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/compositePart.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/compositePart.i18n.json new file mode 100644 index 0000000000000..b9eadbfaa893f --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/compositePart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ariaCompositeToolbarLabel": "{0} eylem", + "titleTooltip": "{0} ({1})" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/editor/binaryDiffEditor.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/editor/binaryDiffEditor.i18n.json new file mode 100644 index 0000000000000..a38af02d66352 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/editor/binaryDiffEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "metadataDiff": "{0} ↔ {1}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/editor/binaryEditor.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/editor/binaryEditor.i18n.json new file mode 100644 index 0000000000000..23b8e1bad3061 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/editor/binaryEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "binaryEditor": "İkili Görüntüleyici" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json new file mode 100644 index 0000000000000..9059d7f92c97e --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "textEditor": "Metin Düzenleyicisi", + "textDiffEditor": "Metin Diff Düzenleyicisi", + "binaryDiffEditor": "İkili Diff Düzenleyicisi", + "sideBySideEditor": "Yan Yana Düzenleyici", + "groupOnePicker": "İlk Gruptaki Düzenleyicileri Göster", + "groupTwoPicker": "İkinci Gruptaki Düzenleyicileri Göster", + "groupThreePicker": "Üçüncü Gruptaki Düzenleyicileri Göster", + "allEditorsPicker": "Açık Tüm Düzenleyicileri Göster", + "view": "Görüntüle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/editor/editorActions.i18n.json new file mode 100644 index 0000000000000..01f0b8ffcc919 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -0,0 +1,56 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "splitEditor": "Düzenleyiciyi Böl", + "joinTwoGroups": "İki Gruptaki Düzenleyicileri Birleştir", + "navigateEditorGroups": "Düzenleyici Grupları Arasında Gezin", + "focusActiveEditorGroup": "Aktif Düzenleyici Grubuna Odakla", + "focusFirstEditorGroup": "İlk Düzenleyici Grubuna Odakla", + "focusSecondEditorGroup": "İkinci Düzenleyici Grubuna Odakla", + "focusThirdEditorGroup": "Üçüncü Düzenleyici Grubuna Odakla", + "focusPreviousGroup": "Önceki Gruba Odakla", + "focusNextGroup": "Sonraki Gruba Odakla", + "openToSide": "Yana Aç", + "closeEditor": "Düzenleyiciyi Kapat", + "revertAndCloseActiveEditor": "Geri Al ve Düzenleyiciyi Kapat", + "closeEditorsToTheLeft": "Düzenleyicinin Solundakileri Kapat", + "closeEditorsToTheRight": "Düzenleyicinin Sağındakileri Kapat", + "closeAllEditors": "Tüm Düzenleyicileri Kapat", + "closeUnmodifiedEditors": "Gruptaki Değiştirilmemiş Düzenleyicileri Kapat", + "closeEditorsInOtherGroups": "Diğer Gruplardaki Tüm Düzenleyicileri Kapat", + "closeOtherEditorsInGroup": "Diğer Düzenleyicileri Kapat", + "closeEditorsInGroup": "Gruptaki Tüm Düzenleyicileri Kapat", + "moveActiveGroupLeft": "Düzenleyici Grubunu Sola Taşı", + "moveActiveGroupRight": "Düzenleyici Grubunu Sağa Taşı", + "minimizeOtherEditorGroups": "Diğer Düzenleyici Gruplarını Küçült", + "evenEditorGroups": "Düzenleyici Grup Genişliklerini Eşitle", + "maximizeEditor": "Düzenleyici Grubunu Olabildiğince Genişlet ve Kenar Çubuğunu Gizle", + "keepEditor": "Düzenleyiciyi Tut", + "openNextEditor": "Sonraki Düzenleyiciyi Aç", + "openPreviousEditor": "Önceki Düzenleyiciyi Aç", + "nextEditorInGroup": "Gruptaki Sonraki Düzenleyiciyi Aç", + "openPreviousEditorInGroup": "Gruptaki Önceki Düzenleyiciyi Aç", + "navigateNext": "İleri Git", + "navigatePrevious": "Geri Dön", + "reopenClosedEditor": "Kapatılan Düzenleyiciyi Yeniden Aç", + "clearRecentFiles": "Son Kullanılan Dosyaları Temizle", + "showEditorsInFirstGroup": "İlk Gruptaki Düzenleyicileri Göster", + "showEditorsInSecondGroup": "İkinci Gruptaki Düzenleyicileri Göster", + "showEditorsInThirdGroup": "Üçüncü Gruptaki Düzenleyicileri Göster", + "showEditorsInGroup": "Gruptaki Düzenleyicileri Göster", + "showAllEditors": "Tüm Düzenleyicileri Göster", + "openPreviousRecentlyUsedEditorInGroup": "Gruptaki Son Kullanılan Önceki Düzenleyiciyi Aç", + "openNextRecentlyUsedEditorInGroup": "Gruptaki Son Kullanılan Sonraki Düzenleyiciyi Aç", + "navigateEditorHistoryByInput": "Geçmişteki Önceki Düzenleyiciyi Aç", + "openNextRecentlyUsedEditor": "Son Kullanılan Sonraki Düzenleyiciyi Aç", + "openPreviousRecentlyUsedEditor": "Son Kullanılan Önceki Düzenleyiciyi Aç", + "clearEditorHistory": "Düzenleyici Geçmişini Temizle", + "focusLastEditorInStack": "Gruptaki Son Düzenleyiciyi Aç", + "moveEditorLeft": "Düzenleyiciyi Sola Taşı", + "moveEditorRight": "Düzenleyiciyi Sağa Taşı", + "moveEditorToPreviousGroup": "Düzenleyiciyi Önceki Gruba Taşı", + "moveEditorToNextGroup": "Düzenleyiciyi Sonraki Gruba Taşı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json new file mode 100644 index 0000000000000..ec6a3cb04f0fb --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorCommand.activeEditorMove.description": "Aktif düzenleyiciyi sekmeler veya gruplar halinde taşıyın", + "editorCommand.activeEditorMove.arg.name": "Aktif düzenleyici taşıma argümanı", + "editorCommand.activeEditorMove.arg.description": "Argüman Özellikleri:\n\t\t\t\t\t\t* 'to': Nereye taşınacağını belirten dize değeri.\n\t\t\t\t\t\t* 'by': Kaç birim taşınacağını belirten dize değeri. Sekme veya grup olarak.\n\t\t\t\t\t\t* 'value': Kaç tane pozisyonun taşınacağını belirten sayı değeri.\n\t\t\t\t\t", + "commandDeprecated": "**{0}** komutu kaldırıldı. Onun yerine **{1}** komutunu kullanabilirsiniz", + "openKeybindings": "Klavye Kısayollarını Yapılandır" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/editor/editorPart.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/editor/editorPart.i18n.json new file mode 100644 index 0000000000000..11fc7d2994182 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/editor/editorPart.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "groupOneVertical": "Sol", + "groupTwoVertical": "Orta", + "groupThreeVertical": "Sağ", + "groupOneHorizontal": "En Üst", + "groupTwoHorizontal": "Orta", + "groupThreeHorizontal": "En Alt", + "editorOpenError": "'{0}' açılamadı: {1}." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/editor/editorPicker.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/editor/editorPicker.i18n.json new file mode 100644 index 0000000000000..3f3f3b4d53858 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/editor/editorPicker.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, düzenleyici grubu seçici", + "groupLabel": "Grup: {0}", + "noResultsFoundInGroup": "Grupta eşleşen açık düzenleyici bulunamadı", + "noOpenedEditors": "Gruptaki açık düzenleyiciler listesi şu an boş", + "noResultsFound": "Eşleşen açık düzenleyici bulunamadı", + "noOpenedEditorsAllGroups": "Açık düzenleyiciler listesi şu an boş" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json new file mode 100644 index 0000000000000..d03a6b69b6a34 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -0,0 +1,51 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "singleSelectionRange": "Sat {0}, Süt {1} ({2} seçili)", + "singleSelection": "Sat {0}, Süt {1}", + "multiSelectionRange": "{0} seçim ({1} karakter seçildi)", + "multiSelection": "{0} seçim", + "endOfLineLineFeed": "LF", + "endOfLineCarriageReturnLineFeed": "CRLF", + "tabFocusModeEnabled": "Tab Odak Değiştirir", + "screenReaderDetected": "Ekran Okuyucu Algılandı", + "screenReaderDetectedExtra": "Bir Ekran Okuyucu kullanmıyorsanız, lütfen `editor.accessibilitySupport` ayarını \"off\" olarak değiştirin", + "disableTabMode": "Erişilebilirlik Modunu Devre Dışı Bırak", + "gotoLine": "Satıra Git", + "indentation": "Girinti", + "selectEncoding": "Kodlamayı Seç", + "selectEOL": "Satır Sonu Sıralamasını Seç", + "selectLanguageMode": "Dil Modunu Seçin", + "fileInfo": "Dosya Bilgisi", + "spacesSize": "Boşluk: {0}", + "tabSize": "Sekme Boyutu: {0}", + "showLanguageExtensions": "'{0}' için Market Eklentilerini Ara...", + "changeMode": "Dil Modunu Değiştir", + "noEditor": "Şu an aktif metin düzenleyici yok", + "languageDescription": "({0}) - Yapılandırılan Dil", + "languageDescriptionConfigured": "({0})", + "languagesPicks": "diller (tanımlayıcı)", + "configureModeSettings": "'{0}' dili tabanlı ayarları yapılandır...", + "configureAssociationsExt": "'{0}' için Dosya İlişkilendirmesini Yapılandır...", + "autoDetect": "Otomatik Algıla", + "pickLanguage": "Dil Modunu Seçin", + "currentAssociation": "Geçerli İlişkilendirme", + "pickLanguageToConfigure": " '{0}' ile İlişkilendirilecek Dil Modunu Seçin", + "changeIndentation": "Girintiyi Değiştir", + "noWritableCodeEditor": "Aktif kod düzenleyici salt okunur.", + "indentView": "görünümü değiştir", + "indentConvert": "dosyayı dönüştür", + "pickAction": "Eylem Seçin", + "changeEndOfLine": "Satır Sonu Sıralamasını Değiştir", + "pickEndOfLine": "Satır Sonu Sıralamasını Seç", + "changeEncoding": "Dosya Kodlamasını Değiştir", + "noFileEditor": "Şu an aktif dosya yok", + "saveWithEncoding": "Kodlama ile Kaydet", + "reopenWithEncoding": "Kodlama ile Yeniden Aç", + "guessedEncoding": "İçerikten tahmin edildi", + "pickEncodingForReopen": "Dosyayı Yeniden Açmak İçin Dosya Kodlaması Seçin", + "pickEncodingForSave": "Kaydedilecek Dosya Kodlamasını Seçin" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/editor/tabsTitleControl.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/editor/tabsTitleControl.i18n.json new file mode 100644 index 0000000000000..43199d98868ca --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/editor/tabsTitleControl.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "araLabelTabActions": "Sekme eylemleri" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/editor/textDiffEditor.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/editor/textDiffEditor.i18n.json new file mode 100644 index 0000000000000..9fb7a026e34e1 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/editor/textDiffEditor.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "textDiffEditor": "Metin Diff Düzenleyicisi", + "readonlyEditorWithInputAriaLabel": "{0}. Salt okunur metin dosyası karşılaştırma düzenleyicisi.", + "readonlyEditorAriaLabel": "Salt okunur metin dosyası karşılaştırma düzenleyicisi.", + "editableEditorWithInputAriaLabel": "{0}. Metin dosyası karşılaştırma düzenleyicisi.", + "editableEditorAriaLabel": "Metin dosyası karşılaştırma düzenleyicisi.", + "navigate.next.label": "Sonraki Değişiklik", + "navigate.prev.label": "Önceki Değişiklik", + "inlineDiffLabel": "Satır İçi Görünüme Geç", + "sideBySideDiffLabel": "Yan Yana Görünüme Geç" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/editor/textEditor.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/editor/textEditor.i18n.json new file mode 100644 index 0000000000000..01f8e840c010e --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/editor/textEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorLabelWithGroup": "{0}, Grup {1}." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/editor/textResourceEditor.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/editor/textResourceEditor.i18n.json new file mode 100644 index 0000000000000..0b04760519918 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/editor/textResourceEditor.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "textEditor": "Metin Düzenleyicisi", + "readonlyEditorWithInputAriaLabel": "{0}. Salt okunur metin düzenleyici.", + "readonlyEditorAriaLabel": "Salt okunur metin düzenleyici.", + "untitledFileEditorWithInputAriaLabel": "{0}. İsimsiz dosya metin düzenleyici.", + "untitledFileEditorAriaLabel": "İsimsiz dosya metin düzenleyici." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/editor/titleControl.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/editor/titleControl.i18n.json new file mode 100644 index 0000000000000..18e318decfd88 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/editor/titleControl.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "Kapat", + "closeOthers": "Diğerlerini Kapat", + "closeRight": "Sağdakileri Kapat", + "closeAll": "Tümünü Kapat", + "closeAllUnmodified": "Değiştirilmeyenleri Kapat", + "keepOpen": "Açık Tut", + "showOpenedEditors": "Açık Düzenleyicileri Göster", + "araLabelEditorActions": "Düzenleyici eylemleri" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/panel/panelActions.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/panel/panelActions.i18n.json new file mode 100644 index 0000000000000..82be0726e3ed6 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/panel/panelActions.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "panelActionTooltip": "{0} ({1})", + "closePanel": "Paneli Kapat", + "togglePanel": "Paneli Aç/Kapat", + "focusPanel": "Panele Odakla", + "toggleMaximizedPanel": "Panelin Ekranı Kaplamasını Aç/Kapat", + "maximizePanel": "Panel Boyutunu Olabildiğince Genişlet", + "minimizePanel": "Panel Boyutunu Geri Al", + "view": "Görüntüle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/panel/panelPart.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/panel/panelPart.i18n.json new file mode 100644 index 0000000000000..de9c6eaf58651 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/panel/panelPart.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "panelSwitcherBarAriaLabel": "Aktif Panel Değiştirici" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/quickopen/quickOpenController.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/quickopen/quickOpenController.i18n.json new file mode 100644 index 0000000000000..8f88539a56e2b --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/quickopen/quickOpenController.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inputModeEntryDescription": "{0} (Onaylamak için 'Enter' veya iptal etmek için 'Escape' tuşuna basın)", + "inputModeEntry": "Girdinizi onaylamak için 'Enter' veya iptal etmek için 'Escape' tuşuna basın", + "emptyPicks": "Seçilecek girdi yok", + "quickOpenInput": "Buradan gerçekleştirebileceğiniz eylemler hakkında yardım almak için '?' yazın", + "historyMatches": "yakınlarda açıldı", + "noResultsFound1": "Sonuç bulunamadı", + "canNotRunPlaceholder": "Bu hızlı açma işleyicisi geçerli bağlamda kullanılamaz", + "entryAriaLabel": "{0}, yakınlarda açıldı", + "removeFromEditorHistory": "Geçmişten Kaldır", + "pickHistory": "Geçmişten kaldırmak için bir düzenleyici girdisi seçin" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json new file mode 100644 index 0000000000000..e6b6bd07b2f78 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpen": "Dosyaya Git...", + "quickNavigateNext": "Hızlı Açta Sonrakine Git", + "quickNavigatePrevious": "Hızlı Açta Öncekine Git", + "quickSelectNext": "Hızlı Açta Sonrakini Seç", + "quickSelectPrevious": "Hızlı Açta Öncekini Seç" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/sidebar/sidebarPart.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/sidebar/sidebarPart.i18n.json new file mode 100644 index 0000000000000..3ad0767c12165 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/sidebar/sidebarPart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "focusSideBar": "Kenar Çubuğuna Odakla", + "viewCategory": "Görüntüle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/statusbar/statusbarPart.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/statusbar/statusbarPart.i18n.json new file mode 100644 index 0000000000000..ea87cdb62294b --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/statusbar/statusbarPart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "canNotRun": "'{0}' komutu şu an etkin değildir ve çalıştırılamaz.", + "manageExtension": "Eklentiyi Yönet" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/titlebar/titlebarPart.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/titlebar/titlebarPart.i18n.json new file mode 100644 index 0000000000000..f143e04de9447 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/titlebar/titlebarPart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "patchedWindowTitle": "[Desteklenmiyor]", + "devExtensionWindowTitlePrefix": "[Eklenti Geliştirme Sunucusu]" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/quickopen.i18n.json b/i18n/trk/src/vs/workbench/browser/quickopen.i18n.json new file mode 100644 index 0000000000000..a0b7b06168e6c --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/quickopen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultsMatching": "Eşleşen sonuç yok", + "noResultsFound2": "Sonuç bulunamadı", + "entryAriaLabel": "{0}, komut" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/viewlet.i18n.json b/i18n/trk/src/vs/workbench/browser/viewlet.i18n.json new file mode 100644 index 0000000000000..0d41777aa74f7 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/viewlet.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "collapse": "Tümünü Daralt" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/common/theme.i18n.json b/i18n/trk/src/vs/workbench/common/theme.i18n.json new file mode 100644 index 0000000000000..3c854c09486e3 --- /dev/null +++ b/i18n/trk/src/vs/workbench/common/theme.i18n.json @@ -0,0 +1,61 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tabActiveBackground": "Aktif sekme arka plan rengi. Sekmeler, düzenleyici alanındaki düzenleyicilerin kapsayıcılarıdır. Bir düzenleyici grubunda birden fazla sekme açılabilir. Birden fazla düzenleyici grupları var olabilir.", + "tabInactiveBackground": "Pasif sekme arka plan rengi. Sekmeler, düzenleyici alanındaki düzenleyicilerin kapsayıcılarıdır. Bir düzenleyici grubunda birden fazla sekme açılabilir. Birden fazla düzenleyici grupları var olabilir.", + "tabBorder": "Sekmeleri birbirinden ayıran kenarlığın rengi. Sekmeler, düzenleyici alanındaki düzenleyicilerin kapsayıcılarıdır. Bir düzenleyici grubunda birden fazla sekme açılabilir. Birden fazla düzenleyici grupları var olabilir.", + "tabActiveForeground": "Aktif bir gruptaki aktif sekmenin ön plan rengi. Sekmeler, düzenleyici alanındaki düzenleyicilerin kapsayıcılarıdır. Bir düzenleyici grubunda birden fazla sekme açılabilir. Birden fazla düzenleyici grupları var olabilir.", + "tabInactiveForeground": "Aktif bir gruptaki pasif sekmenin ön plan rengi. Sekmeler, düzenleyici alanındaki düzenleyicilerin kapsayıcılarıdır. Bir düzenleyici grubunda birden fazla sekme açılabilir. Birden fazla düzenleyici grupları var olabilir.", + "tabUnfocusedActiveForeground": "Pasif bir gruptaki aktif sekmenin ön plan rengi. Sekmeler, düzenleyici alanındaki düzenleyicilerin kapsayıcılarıdır. Bir düzenleyici grubunda birden fazla sekme açılabilir. Birden fazla düzenleyici grupları var olabilir.", + "tabUnfocusedInactiveForeground": "Pasif bir gruptaki pasif sekmenin ön plan rengi. Sekmeler, düzenleyici alanındaki düzenleyicilerin kapsayıcılarıdır. Bir düzenleyici grubunda birden fazla sekme açılabilir. Birden fazla düzenleyici grupları var olabilir.", + "editorGroupBackground": "Bir düzenleyici grubunun arka plan rengi. Düzenleyici grupları, düzenleyicilerin kapsayıcılarıdır. Arka plan rengi, düzenleyici grubunu sürüklerken gösterilir.", + "tabsContainerBackground": "Sekmeler etkinleştirilmiş durumdayken, düzenleyici grubu başlık üstbilgisi arka plan rengi. Düzenleyici grupları, düzenleyicilerin kapsayıcılarıdır. ", + "tabsContainerBorder": "Sekmeler etkinleştirilmiş durumdayken, düzenleyici grubu başlık üstbilgisi kenarlık rengi. Düzenleyici grupları, düzenleyicilerin kapsayıcılarıdır. ", + "editorGroupHeaderBackground": "Sekmeler devre dışı iken, düzenleyici grubu başlık üstbilgisi arka plan rengi. Düzenleyici grupları, düzenleyicilerin kapsayıcılarıdır. ", + "editorGroupBorder": "Birden fazla düzenleyici grubunu birbirinden ayıracak renk. Düzenleyici grupları, düzenleyicilerin kapsayıcılarıdır. ", + "editorDragAndDropBackground": "Düzenleyici grubunu sürüklerken gösterilecek arka plan rengi. Düzenleyici içeriğinin hâlâ iyi görünmeye devam edebilmesi için renk şeffaf olmalıdır.", + "panelBackground": "Panel arka plan rengi. Paneller düzenleyici alanının altında gösterilir ve çıktı ve entegre terminal gibi görünümler içerir.", + "panelBorder": "Paneli düzenleyiciden ayıran üstteki kenarlık rengi. Paneller düzenleyici alanının altında gösterilir ve çıktı ve entegre terminal gibi görünümler içerir.", + "panelActiveTitleForeground": "Aktif panelin başlık rengi. Paneller düzenleyici alanının altında gösterilir ve çıktı ve entegre terminal gibi görünümler içerir.", + "panelInactiveTitleForeground": "Pasif panelin başlık rengi. Paneller düzenleyici alanının altında gösterilir ve çıktı ve entegre terminal gibi görünümler içerir.", + "panelActiveTitleBorder": "Aktif başlığının kenarlık rengi. Paneller düzenleyici alanının altında gösterilir ve çıktı ve entegre terminal gibi görünümler içerir.", + "statusBarForeground": "Durum çubuğu ön plan rengi. Durum çubuğu, pencerenin alt kısmında gösterilir.", + "statusBarBackground": "Standart durum çubuğu arka plan rengi. Durum çubuğu, pencerenin alt kısmında gösterilir.", + "statusBarBorder": "Durum çubuğunu kenar çubuğundan ve düzenleyiciden ayıran kenarlık rengi. Durum çubuğu, pencerenin alt kısmında gösterilir.", + "statusBarNoFolderBackground": "Hiçbir klasör açık değilken durum çubuğu arka plan rengi. Durum çubuğu, pencerenin alt kısmında gösterilir.", + "statusBarNoFolderForeground": "Hiçbir klasör açık değilken durum çubuğu ön plan rengi. Durum çubuğu, pencerenin alt kısmında gösterilir.", + "statusBarItemActiveBackground": "Durum çubuğu ögesi tıklanırken arka plan rengi. Durum çubuğu, pencerenin alt kısmında gösterilir.", + "statusBarItemHoverBackground": "Durum çubuğu ögesinin mouse ile üzerine gelindiğindeki arka plan rengi. Durum çubuğu, pencerenin alt kısmında gösterilir.", + "statusBarProminentItemBackground": "Durum çubuğu belirgin ögelerinin arka plan rengi. Belirgin ögeler, önemi belirtmek için diğer durum çubuğu girdilerinden öne çıkarılır. Durum çubuğu, pencerenin alt kısmında gösterilir.", + "statusBarProminentItemHoverBackground": "Durum çubuğu belirgin ögelerinin mouse ile üzerine gelindiğindeki arka plan rengi. Belirgin ögeler, önemi belirtmek için diğer durum çubuğu girdilerinden öne çıkarılır. Durum çubuğu, pencerenin alt kısmında gösterilir.", + "activityBarBackground": "Etkinlik çubuğu arka plan rengi. Etkinlik çubuğu, en sol veya en sağda gösterilir ve kenar çubuğunun görünümleriyle yer değiştirmeye izin verir.", + "activityBarForeground": "Etkinlik çubuğu ön plan rengi (ör. simgeler için kullanılır). Etkinlik çubuğu, en sol veya en sağda gösterilir ve kenar çubuğunun görünümleriyle yer değiştirmeye izin verir.", + "activityBarBorder": "Etkinlik çubuğunu kenar çubuğundan ayıran kenarlığın rengi. Etkinlik çubuğu, en sol veya en sağda gösterilir ve kenar çubuğunun görünümleriyle yer değiştirmeye izin verir.", + "activityBarDragAndDropBackground": "Etkinlik çubuğu ögeleri için sürükle bırak geri bildirim rengi. Etkinlik çubuğu girdilerinin hâlâ iyi görünmeye devam edebilmesi için renk şeffaf olmalıdır. Etkinlik çubuğu, en sol veya en sağda gösterilir ve kenar çubuğunun görünümleriyle yer değiştirmeye izin verir.", + "activityBarBadgeBackground": "Etkinlik çubuğu bildirim göstergesi arka plan rengi. Etkinlik çubuğu, en sol veya en sağda gösterilir ve kenar çubuğunun görünümleriyle yer değiştirmeye izin verir.", + "activityBarBadgeForeground": "Etkinlik çubuğu bildirim göstergesi ön plan rengi. Etkinlik çubuğu, en sol veya en sağda gösterilir ve kenar çubuğunun görünümleriyle yer değiştirmeye izin verir.", + "sideBarBackground": "Kenar çubuğu arka plan rengi. Kenar çubuğu, gezgin ve arama gibi görünümlerin kapsayıcısıdır.", + "sideBarForeground": "Kenar çubuğu ön plan rengi. Kenar çubuğu, gezgin ve arama gibi görünümlerin kapsayıcısıdır.", + "sideBarBorder": "Kenar çubuğunu düzenleyiciden ayıran taraftaki kenarlığın rengi. Kenar çubuğu, gezgin ve arama gibi görünümlerin kapsayıcısıdır.", + "sideBarTitleForeground": "Kenar çubuğu başlığı ön plan rengi. Kenar çubuğu, gezgin ve arama gibi görünümlerin kapsayıcısıdır.", + "sideBarSectionHeaderBackground": "Kenar çubuğu bölüm başlığı arka plan rengi. Kenar çubuğu, gezgin ve arama gibi görünümlerin kapsayıcısıdır.", + "sideBarSectionHeaderForeground": "Kenar çubuğu bölüm başlığı ön plan rengi. Kenar çubuğu, gezgin ve arama gibi görünümlerin kapsayıcısıdır.", + "titleBarActiveForeground": "Pencere aktifken başlık çubuğu ön planı. Bu rengin sadece macOS'da destekleneceğini unutmayın.", + "titleBarInactiveForeground": "Pencere pasifken başlık çubuğu ön planı. Bu rengin sadece macOS'da destekleneceğini unutmayın.", + "titleBarActiveBackground": "Pencere aktifken başlık çubuğu arka planı. Bu rengin sadece macOS'da destekleneceğini unutmayın.", + "titleBarInactiveBackground": "Pencere pasifken başlık çubuğu arka planı. Bu rengin sadece macOS'da destekleneceğini unutmayın.", + "notificationsForeground": "Bildirim ön plan rengi. Bildirimler pencerenin üst kısmından içeri girer.", + "notificationsBackground": "Bildirim arka plan rengi. Bildirimler pencerenin üst kısmından içeri girer.", + "notificationsButtonBackground": "Bildirim butonu arka plan rengi. Bildirimler pencerenin üst kısmından içeri girer.", + "notificationsButtonHoverBackground": "Fareyle üzerine gelindiğinde bildirim butonu arka plan rengi. Bildirimler pencerenin üst kısmından içeri girer.", + "notificationsButtonForeground": "Bildirim butonu ön plan rengi. Bildirimler pencerenin üst kısmından içeri girer.", + "notificationsInfoBackground": "Bildirimlerdeki bilgi arka plan rengi. Bildirimler pencerenin üst kısmından içeri girer.", + "notificationsInfoForeground": "Bildirimlerdeki bilgi ön plan rengi. Bildirimler pencerenin üst kısmından içeri girer.", + "notificationsWarningBackground": "Bildirim uyarı arka plan rengi. Bildirimler pencerenin üst kısmından içeri girer.", + "notificationsWarningForeground": "Bildirim uyarı ön plan rengi. Bildirimler pencerenin üst kısmından içeri girer.", + "notificationsErrorBackground": "Bildirim hata arka plan rengi. Bildirimler pencerenin üst kısmından içeri girer.", + "notificationsErrorForeground": "Bildirim hata ön plan rengi. Bildirimler pencerenin üst kısmından içeri girer." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/trk/src/vs/workbench/electron-browser/actions.i18n.json new file mode 100644 index 0000000000000..ae0ef9fd63eaa --- /dev/null +++ b/i18n/trk/src/vs/workbench/electron-browser/actions.i18n.json @@ -0,0 +1,44 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "closeActiveEditor": "Düzenleyiciyi Kapat", + "closeWindow": "Pencereyi Kapat", + "closeFolder": "Klasörü Kapat", + "noFolderOpened": "Şu an bu örnekte kapatmak için açık bir klasör bulunmuyor.", + "newWindow": "Yeni Pencere", + "toggleFullScreen": "Tam Ekranı Aç/Kapat", + "toggleMenuBar": "Menü Çubuğunu Gizle/Göster", + "toggleDevTools": "Geliştirici Araçlarını Aç/Kapat", + "zoomIn": "Yakınlaştır", + "zoomOut": "Uzaklaştır", + "zoomReset": "Yakınlaştırmayı Sıfırla", + "appPerf": "Başlangıç Performansı", + "reloadWindow": "Pencereyi Yeniden Yükle", + "switchWindowPlaceHolder": "Geçilecek pencereyi seçin", + "current": "Geçerli Pencere", + "switchWindow": "Pencere Değiştir...", + "quickSwitchWindow": "Hızlı Pencere Değiştir...", + "folders": "klasörler", + "files": "dosyalar", + "openRecentPlaceHolderMac": "Bir yol seçin (yeni pencerede açmak için Cmd tuşunu basılı tutun)", + "openRecentPlaceHolder": "Açılacak yolu seçin (yeni pencerede açmak için Ctrl tuşunu basılı tutun)", + "openRecent": "Son Kullanılanları Aç...", + "quickOpenRecent": "Son Kullanılanları Hızlı Aç...", + "closeMessages": "Bildirim İletilerini Kapat", + "reportIssues": "Sorunları Bildir", + "reportPerformanceIssue": "Performans Sorunu Bildir", + "keybindingsReference": "Klavye Kısayolları Başvurusu", + "openDocumentationUrl": "Belgeler", + "openIntroductoryVideosUrl": "Tanıtım Videoları", + "openTipsAndTricksUrl": "İpuçları ve Püf noktaları", + "toggleSharedProcess": "Paylaşılan İşlemi Göster/Gizle", + "navigateLeft": "Soldaki Görünüme Git", + "navigateRight": "Sağdaki Görünüme Git", + "navigateUp": "Üstteki Görünüme Git", + "navigateDown": "Alttaki Görünüme Git", + "increaseViewSize": "Geçerli Görünüm Boyutunu Artır", + "decreaseViewSize": "Geçerli Görünüm Boyutunu Azalt" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/electron-browser/commands.i18n.json b/i18n/trk/src/vs/workbench/electron-browser/commands.i18n.json new file mode 100644 index 0000000000000..3a1051dcfdad7 --- /dev/null +++ b/i18n/trk/src/vs/workbench/electron-browser/commands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "diffLeftRightLabel": "{0} ⟷ {1}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/electron-browser/extensionHost.i18n.json b/i18n/trk/src/vs/workbench/electron-browser/extensionHost.i18n.json new file mode 100644 index 0000000000000..b6f1f59af2d36 --- /dev/null +++ b/i18n/trk/src/vs/workbench/electron-browser/extensionHost.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensionHostProcess.startupFailDebug": "Eklenti sunucusu 10 saniye içinde başlamadı, ilk satırda durdurulmuş olabilir ve devam etmesi için bir hata ayıklayıcıya ihtiyacı olabilir.", + "extensionHostProcess.startupFail": "Eklenti sunucusu 10 saniye içinde başlamadı, bu bir sorun olabilir.", + "extensionHostProcess.error": "Eklenti sunucusundan hata: {0}", + "devTools": "Geliştirici Araçları", + "extensionHostProcess.crash": "Eklenti sunucusu beklenmeyen biçimde sonlandırıldı. Lütfen kurtarmak için pencereyi yeniden yükleyin." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/trk/src/vs/workbench/electron-browser/main.contribution.i18n.json new file mode 100644 index 0000000000000..92176289faeb6 --- /dev/null +++ b/i18n/trk/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -0,0 +1,69 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "view": "Görüntüle", + "help": "Yardım", + "file": "Dosya", + "developer": "Geliştirici", + "showEditorTabs": "Açık düzenleyicilerin sekmelerde gösterilip gösterilmeyeceğini denetler", + "editorTabCloseButton": "Düzenleyici sekmelerinin kapat butonlarının konumunu denetler veya 'off' olarak ayarlandığında devre dışı bırakır.", + "showIcons": "Açık düzenleyicilerin bir simge ile gösterilip gösterilmemelerini denetler. Bu, bir simge temasının etkinleştirilmesini de gerektirir.", + "enablePreview": "Açık düzenleyicilerin önizleme olarak gösterilip gösterilmeyeceğini denetler. Önizleme düzenleyicileri kalıcı olarak açılana kadar (ör. çift tıklama veya düzenleme ile) tekrar kullanılırlar.", + "enablePreviewFromQuickOpen": "Hızlı Aç'taki açık düzenleyicilerin önizleme olarak gösterilip gösterilmeyeceğini denetler. Önizleme düzenleyicileri kalıcı olarak açılana kadar (ör. çift tıklama veya düzenleme ile) tekrar kullanılırlar.", + "editorOpenPositioning": "Düzenleyicilerin nerede açılacağını denetler. Düzenleyicileri, geçerli olanın soluna veya sağına açmak için 'left' veya 'right' seçeneklerinden birini seçin. Düzenleyicileri, geçerli olandan bağımsız bir şekilde açmak için 'first' veya 'last' seçeneklerinden birini seçin.", + "revealIfOpen": "Düzenleyicinin görünen gruplardan herhangi birinde açıldıysa ortaya çıkarılıp çıkarılmayacağını denetler. Devre dışı bırakılırsa; bir düzenleyici, o an aktif düzenleyici grubunda açılmayı tercih edecektir. Etkinleştirilirse; o an aktif düzenleyici grubunda tekrar açılmak yerine, zaten açık olan düzenleyici ortaya çıkarılacaktır. Bu ayarın yok sayılacağı bazı durumların olduğunu unutmayın, ör. bir düzenleyiciyi, belirli bir grupta veya o an aktif grubun yanına açmaya zorladığınızda. ", + "commandHistory": "Komut paleti geçmişinde tutulacak son kullanılan komutların sayısını denetler. Komut geçmişini kapatmak için 0 olarak ayarlayın.", + "preserveInput": "Komut paletine son girilen girdinin, bir sonraki açılışta tekrar yer alıp almayacağını denetler.", + "closeOnFocusLost": "Hızlı Aç'ın odağını kaybettiğinde otomatik olarak kapanıp kapanmayacağını denetler.", + "openDefaultSettings": "Ayarları açmanın ayrıca tüm varsayılan ayarları gösteren bir düzenleyici açıp açmayacağını denetler.", + "sideBarLocation": "Kenar çubuğunun konumunu denetler. Çalışma ekranının ya solunda ya da sağında gösterilebilir.", + "statusBarVisibility": "Çalışma ekranının altındaki durum çubuğunun görünürlüğünü denetler.", + "activityBarVisibility": "Çalışma ekranındaki etkinlik çubuğunun görünürlüğünü denetler.", + "closeOnFileDelete": "Düzenleyicinin gösterdiği bir dosyanın, başka bir işlem tarafından silinmesi veya yeniden adlandırması durumunda dosyayı otomatik olarak kapatıp kapatmamasını denetler. Bunu devre dışı bırakmak, böyle bir durumda düzenleyicinin kaydedilmemiş değişiklikler içeriyor durumunda kalmasını sağlar. Uygulama içinde silmek, düzenleyiciyi her zaman kapatır ve kaydedilmemiş değişiklikler içeren dosyalar, verilerinizin korunması için otomatik olarak kapatılmaz.", + "swipeToNavigate": "Yatay olarak üç parmakla kaydırma ile açık dosyalar arasında gezinin.", + "workbenchConfigurationTitle": "Çalışma Ekranı", + "window.openFilesInNewWindow.on": "Dosyalar yeni bir pencerede açılacak", + "window.openFilesInNewWindow.off": "Dosyalar, dosyaların klasörünün olduğu pencerede veya son aktif pencerede açılacak", + "window.openFilesInNewWindow.default": "Dosyalar, Dock veya Finder ile açılmadıkça (sadece macOS için) dosyaların klasörünün olduğu pencerede veya son aktif pencerede açılacak", + "openFilesInNewWindow": "Dosyaların yeni bir pencerede açılıp açılmayacağını denetler.\n- default: dosyalar, Dock veya Finder ile açılmadıkça (sadece macOS için) dosyaların klasörünün olduğu pencerede veya son aktif pencerede açılacak\n- on: dosyalar yeni bir pencerede açılacak\n- off: dosyalar, dosyaların klasörünün olduğu pencerede veya son aktif pencerede açılacak\nBu ayarın halen yok sayılacağı durumlar olabilir (ör. -new-window veya -reuse-window komut satırı seçenekleri kullanılırken).", + "window.openFoldersInNewWindow.on": "Klasörler yeni bir pencerede açılacak", + "window.openFoldersInNewWindow.off": "Klasörler son aktif pencereyi değiştirir", + "window.openFoldersInNewWindow.default": "Klasörler, bir klasör uygulama içinden seçilmedikçe (ör. Dosya menüsünden) yeni bir pencerede açılır", + "openFoldersInNewWindow": "Klasörlerin yeni bir pencerede mi açılacağını yoksa son aktif pencereyi mi değiştireceğini denetler.\n- default: klasörler, bir klasör uygulama içinden seçilmedikçe (ör. Dosya menüsünden) yeni bir pencerede açılır\n- on: klasörler yeni bir pencerede açılır\n- off: klasörler son aktif pencereyi değiştirir\nBu ayarın halen yok sayılacağı durumlar olabilir (ör. -new-window veya -reuse-window komut satırı seçenekleri kullanılırken).", + "window.reopenFolders.all": "Tüm pencereleri yeniden aç.", + "window.reopenFolders.folders": "Tüm klasörleri yeniden aç. Boş pencereler eski haline dönmeyecektir.", + "window.reopenFolders.one": "Son aktif pencereyi yeniden aç.", + "window.reopenFolders.none": "Asla bir pencereyi yeniden açma. Her zaman boş bir pencereyle başla.", + "restoreWindows": "Pencerelerin, bir yeniden başlatma sonrası nasıl yeniden açılacağını denetler. Her zaman boş bir pencere ile başlamak için 'none', üzerinde çalıştığınız son pencereyi yeniden açmak için 'one', açık olan tüm klasörleri yeniden açmak için 'folders' veya son oturumunuzdaki tüm pencereleri yeniden açmak için 'all' seçeneğini seçin.", + "restoreFullscreen": "Bir pencere tam ekran modundayken çıkıldıysa, bu pencerenin tam ekran moduna geri dönüp dönmeyeceğini denetler.", + "zoomLevel": "Pencerenin yakınlaştırma düzeyini ayarlayın. Orijinal boyut 0'dır ve üstündeki (ör. 1) veya altındaki (ör. -1) her artırma 20% daha fazla veya az yakınlaştırmayı temsil eder. Yakınlaştırma düzeyini daha ince ayrıntılarla ayarlamak için ondalık değerler de girebilirsiniz.", + "title": "Pencere başlığını aktif düzenleyiciye bağlı olarak denetler. Değişkenler, bağlama göre değiştirilir:\n${activeEditorShort}: ör. myFile.txt\n${activeEditorMedium}: ör. myFolder/myFile.txt\n${activeEditorLong}: ör. /Users/Development/myProject/myFolder/myFile.txt\n${folderName}: ör. myFolder\n${folderPath}: ör. /Users/Development/myFolder\n${rootName}: ör. myFolder1, myFolder2, myFolder3\n${rootPath}: ör. /Users/Development/myWorkspace\n${appName}: ör. VS Code\n${dirty}: etkin düzenleyici kaydedilmemiş değişiklikler içeriyorsa, değişiklik göstergesi\n${separator}: şartlı ayırıcı (\" - \") yalnızca değer içeren değişkenlerle çevrili olduğunda gösterilir", + "window.newWindowDimensions.default": "Yeni pencereleri ekranın ortasında açın.", + "window.newWindowDimensions.inherit": "Yeni pencereleri son aktif pencere ile aynı ölçülerde açın.", + "window.newWindowDimensions.maximized": "Yeni pencereleri ekranı kapla modunda açın.", + "window.newWindowDimensions.fullscreen": "Yeni pencereleri tam ekran modunda açın.", + "newWindowDimensions": "En az bir pencere açıkken, açılacak yeni bir pencerenin boyutlarını denetler. Varsayılan olarak; yeni pencere ekranın ortasında küçük bir boyutta açılır. 'inherit' olarak ayarlandığında, pencere aktif olan son pencere ile aynı boyutları alacaktır. 'maximized' olarak ayarlandığında, ekranı kaplar biçimde açılır ve 'fullscreen' olarak yapılandırılmışsa, tam ekran olarak açılır. Bu ayarın açılan ilk pencere üzerinde bir etkisi olmadığını unutmayın. İlk pencere, daima boyutunu ve konumunu kapanmadan önce bıraktığınız şekilde geri yükler.", + "window.menuBarVisibility.default": "Menü, sadece tam ekran modunda gizlenir.", + "window.menuBarVisibility.visible": "Menü, tam ekran modunda bile daima görünür.", + "window.menuBarVisibility.toggle": "Menü gizlidir, fakat Alt tuşuyla görüntülenebilir.", + "window.menuBarVisibility.hidden": "Menü daima gizlidir.", + "menuBarVisibility": "Menü çubuğunun gizliliğini denetleyin. 'toggle' ayarı, menü çubuğu gizlidir ve Alt tuşuna bir kez basıldığında gösterilir anlamına gelir. Varsayılan olarak; menü çubuğu, pencere tam ekran değilse görünür durumdadır.", + "enableMenuBarMnemonics": "Etkinleştirilirse, ana menüler Alt tuşu kısayollarıyla açılabilir. Anımsatıcıları devre dışı bırakmak, bu Alt tuşu kısayollarının düzenleyici komutlarının yerine kullanılmasını sağlar.", + "autoDetectHighContrast": "Etkinleştirilirse; eğer Windows bir yüksek karşıtlık teması kullanıyorsa, otomatik olarak yüksek karşıtlık temasına geçiş yapılır; ve Windows, yüksek karşıtlık temasını kullanmayı bıraktığında koyu temaya geçiş yapılır.", + "titleBarStyle": "Pencere başlık çubuğunun görünümünü ayarlayın. Değişikliklerin uygulanması için tam yeniden başlatma gerekir.", + "window.nativeTabs": "macOS Sierra pencere sekmelerini etkinleştirir. Değişikliklerin uygulanması için tam yeniden başlatma gerekeceğini ve yerel sekmelerin, eğer yapılandırılmışsa özel başlık çubuğu stilini devre dışı bıracağını unutmayın.", + "windowConfigurationTitle": "Pencere", + "zenModeConfigurationTitle": "Zen Modu", + "zenMode.fullScreen": "Zen Moduna geçmenin ayrıca çalışma ekranını tam ekran moduna geçirip geçirmeyeceğini denetler.", + "zenMode.hideTabs": "Zen Moduna geçmenin ayrıca çalışma ekranı sekmelerini gizleyip gizlemeyeceğini denetler.", + "zenMode.hideStatusBar": "Zen Moduna geçmenin ayrıca çalışma ekranının altındaki durum çubuğunu gizleyip gizlemeyeceğini denetler.", + "zenMode.hideActivityBar": "Zen Moduna geçmenin ayrıca çalışma ekranının solundaki etkinlik çubuğunu gizleyip gizlemeyeceğini denetler.", + "zenMode.restore": "Bir pencere Zen modundayken çıkıldıysa, bu pencerenin Zen moduna geri dönüp dönmeyeceğini denetler.", + "workspaceConfigurationTitle": "Çalışma Alanı", + "workspaces.title": "Bu çalışma alanının klasör yapılandırması", + "files.exclude.boolean": "Dosya yollarının eşleştirileceği glob deseni. Deseni etkinleştirmek veya devre dışı bırakmak için true veya false olarak ayarlayın.", + "workspaces.additionalFolders": "Bu çalışma alanının klasörleri" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/electron-browser/main.i18n.json b/i18n/trk/src/vs/workbench/electron-browser/main.i18n.json new file mode 100644 index 0000000000000..35eeb336c57b5 --- /dev/null +++ b/i18n/trk/src/vs/workbench/electron-browser/main.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "loaderError": "Gerekli bir dosya yüklenemedi. Artık İnternet'e bağlı değilsiniz veya bağlı olduğunuz sunucu çevrimdışı. Yeniden denemek için lütfen tarayıcıyı yenileyin.", + "loaderErrorNative": "Gerekli bir dosya yüklenemedi. Yeniden denemek için lütfen uygulamayı yeniden başlatın. Ayrıntılar: {0}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/electron-browser/shell.i18n.json b/i18n/trk/src/vs/workbench/electron-browser/shell.i18n.json new file mode 100644 index 0000000000000..ef01873077f59 --- /dev/null +++ b/i18n/trk/src/vs/workbench/electron-browser/shell.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "runningAsRoot": "Code'u 'root' olarak çalıştırmamanız önerilir." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/electron-browser/window.i18n.json b/i18n/trk/src/vs/workbench/electron-browser/window.i18n.json new file mode 100644 index 0000000000000..b4855a5a6d23b --- /dev/null +++ b/i18n/trk/src/vs/workbench/electron-browser/window.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "undo": "Geri Al", + "redo": "Yinele", + "cut": "Kes", + "copy": "Kopyala", + "paste": "Yapıştır", + "selectAll": "Tümünü Seç", + "confirmOpen": "{0} klasörü açmak istediğinizden emin misiniz?", + "confirmOpenButton": "&&Aç" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/trk/src/vs/workbench/electron-browser/workbench.i18n.json new file mode 100644 index 0000000000000..d50ab8c895532 --- /dev/null +++ b/i18n/trk/src/vs/workbench/electron-browser/workbench.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "developer": "Geliştirici", + "file": "Dosya" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/node/extensionHostMain.i18n.json b/i18n/trk/src/vs/workbench/node/extensionHostMain.i18n.json new file mode 100644 index 0000000000000..5c33200c410be --- /dev/null +++ b/i18n/trk/src/vs/workbench/node/extensionHostMain.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensionTestError": "{0} yolu, geçerli bir eklenti test çalıştırıcısına işaret etmiyor." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/node/extensionPoints.i18n.json b/i18n/trk/src/vs/workbench/node/extensionPoints.i18n.json new file mode 100644 index 0000000000000..17cb5965e96ef --- /dev/null +++ b/i18n/trk/src/vs/workbench/node/extensionPoints.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "jsonParseFail": "{0} ayrıştırılamadı: {1}.", + "fileReadFail": "{0} dosyası okunamadı: {1}.", + "jsonsParseFail": "{0} veya {1} ayrıştırılamadı: {2}.", + "missingNLSKey": "{0} anahtarı için mesaj bulunamadı." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json new file mode 100644 index 0000000000000..11fb1d3f1d6a3 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "install": "'{0}' kabuk komutunu PATH'e yükle", + "not available": "Bu komut mevcut değil", + "successIn": "'{0}' kabuk komutu PATH'e başarıyla yüklendi.", + "warnEscalation": "Code, şimdi kabuk komutunu yüklemek üzere yönetici ayrıcalıkları için 'osascript' ile izin isteyecektir.", + "ok": "Tamam", + "cantCreateBinFolder": "'/usr/local/bin' oluşturulamadı.", + "cancel2": "İptal", + "aborted": "Durduruldu", + "uninstall": "'{0}' kabuk komutunu PATH'den kaldır", + "successFrom": "'{0}' kabuk komutu PATH'den başarıyla kaldırıldı.", + "shellCommand": "Kabuk Komutu" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json new file mode 100644 index 0000000000000..031f187ac0697 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emergencyConfOn": "Şu an `editor.accessibilitySupport` ayarı 'on' olarak değiştiriliyor.", + "openingDocs": "Şu an VS Code Erişilebilirlik belgeleri sayfası açılıyor.", + "introMsg": "VS Code'un erişilebilirlik seçeneklerini denediğiniz için teşekkür ederiz.", + "status": "Durum:", + "changeConfigToOnMac": "Düzenleyicinin kalıcı olarak bir Ekran Okuyucu ile kullanılmak üzere optimize edilmesini ayarlamak için Command+E tuşlarına basın.", + "changeConfigToOnWinLinux": "Düzenleyicinin kalıcı olarak bir Ekran Okuyucu ile kullanılmak üzere optimize edilmesini ayarlamak için Control+E tuşlarına basın.", + "auto_unknown": "Düzenleyici, bir Ekran Okuyucu'nun ne zaman bağlandığını algılamak için platform API'larını kullanmak üzere ayarlanmış, fakat geçerli çalışma zamanı bunu desteklemiyor.", + "auto_on": "Düzenleyici, bir Ekran Okuyucu'nun bağlandığını otomatik olarak algıladı.", + "auto_off": "Düzenleyici, bir Ekran Okuyucu'nun ne zaman bağlandığını otomatik olarak algılamak için yapılandırılmış, şu anki durum böyle değil.", + "configuredOn": "Düzenleyici kalıcı olarak bir Ekran Okuyucu ile kullanılmak üzere optimize edilmesi için yapılandırılmış - bunu, `editor.accessibilitySupport` ayarını düzenleyerek değiştirebilirsiniz.", + "configuredOff": "Düzenleyici hiçbir zaman bir Ekran Okuyucu ile kullanılmak üzere optimize edilmemesi için yapılandırılmış.", + "tabFocusModeOnMsg": "Geçerli düzenleyicide Tab tuşuna basmak odağı bir sonraki odaklanabilir ögeye kaydıracaktır. {0} tuşuna basarak bu davranışı açıp kapatın.", + "tabFocusModeOnMsgNoKb": "Geçerli düzenleyicide Tab tuşuna basmak odağı bir sonraki odaklanabilir ögeye kaydıracaktır. {0} komutu, şu an bir tuş bağı ile tetiklenemez.", + "tabFocusModeOffMsg": "Geçerli düzenleyicide Tab tuşuna basmak bir sekme karakteri ekleyecektir. {0} tuşuna basarak bu davranışı açıp kapatın.", + "tabFocusModeOffMsgNoKb": "Geçerli düzenleyicide Tab tuşuna basmak bir sekme karakteri ekleyecektir. {0} komutu, şu an bir tuş bağı ile tetiklenemez.", + "openDocMac": "Erişilebilirlik ile ilgili daha fazla VS Code bilgisi içeren bir tarayıcı penceresi açmak için Command+H tuşlarına basın.", + "openDocWinLinux": "Erişilebilirlik ile ilgili daha fazla VS Code bilgisi içeren bir tarayıcı penceresi açmak için Control+H tuşlarına basın.", + "outroMsg": "Escape veya Shift+Escape tuşlarına basarak bu ipucunu kapatabilir ve düzenleyiciye dönebilirsiniz.", + "ShowAccessibilityHelpAction": "Erişilebilirlik Yardımını Göster" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json new file mode 100644 index 0000000000000..670ac26134976 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "workbench.action.inspectKeyMap": "Geliştirici: Tuş Eşlemelerini Denetle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..3566cd50ef9d6 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inspectTMScopes": "Geliştirici: TM Kapsamlarını Denetle", + "inspectTMScopesWidget.loading": "Yükleniyor..." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json new file mode 100644 index 0000000000000..efc71dc00cf91 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.i18n.json @@ -0,0 +1,40 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parseErrors": "{0} için ayrıştırma hataları: {1}", + "schema.openBracket": "Açılış ayracı karakteri veya dize sırası.", + "schema.closeBracket": "Kapanış ayracı karakteri veya dize sırası.", + "schema.comments": "Yorum sembollerini tanımlar.", + "schema.blockComments": "Blok açıklamalarının nasıl işaretlendiğini tanımlar.", + "schema.blockComment.begin": "Blok açıklamasını başlatan karakter dizisi.", + "schema.blockComment.end": "Blok açıklamasını bitiren karakter dizisi.", + "schema.lineComment": "Satır açıklamasını başlatan karakter dizisi.", + "schema.brackets": "Girintiyi artıran veya azaltan ayraç sembollerini tanımlar.", + "schema.autoClosingPairs": "Ayraç çiftlerini tanımlar. Bir açılış ayracı girildiğinde, kapanış ayracı otomatik olarak eklenir.", + "schema.autoClosingPairs.notIn": "Otomatik çiftlerin devre dışı bırakıldığı bir kapsamlar listesi tanımlar.", + "schema.surroundingPairs": "Seçili bir dizeyi çevrelemek için kullanılabilecek ayraç çiftlerini tanımlar.", + "schema.wordPattern": "Dilin kelime tanımı.", + "schema.wordPattern.pattern": "Sözcükleri eşleştirmek için kullanılacak Düzenli İfade.", + "schema.wordPattern.flags": "Sözcükleri eşleştirmek için kullanılacak Düzenli İfade işaretleri.", + "schema.wordPattern.flags.errorMessage": "`/^([gimuy]+)$/` kalıbı ile eşleşmelidir.", + "schema.indentationRules": "Dilin girintileme ayarları.", + "schema.indentationRules.increaseIndentPattern": "Bir satır bu kalıpla eşleşirse, ondan sonraki tüm satırlar (başka bir kuralla eşleşmedikçe) bir kez girintilenmelidir.", + "schema.indentationRules.increaseIndentPattern.pattern": "increaseIndentPattern için Düzenli İfade.", + "schema.indentationRules.increaseIndentPattern.flags": "increaseIndentPattern için Düzenli İfade işaretleri.", + "schema.indentationRules.increaseIndentPattern.errorMessage": "`/^([gimuy]+)$/` kalıbı ile eşleşmelidir.", + "schema.indentationRules.decreaseIndentPattern": "Bir satır bu kalıpla eşleşirse, ondan sonraki tüm satırların (başka bir kuralla eşleşmedikçe) girintisi bir kez azaltılmalıdır.", + "schema.indentationRules.decreaseIndentPattern.pattern": "decreaseIndentPattern için Düzenli İfade.", + "schema.indentationRules.decreaseIndentPattern.flags": "decreaseIndentPattern için Düzenli İfade işaretleri.", + "schema.indentationRules.decreaseIndentPattern.errorMessage": "`/^([gimuy]+)$/` kalıbı ile eşleşmelidir.", + "schema.indentationRules.indentNextLinePattern": "Bir satır bu kalıpla eşleşirse, ondan **sadece bir sonraki satır** bir kez girintilenmelidir.", + "schema.indentationRules.indentNextLinePattern.pattern": "indentNextLinePattern için Düzenli İfade.", + "schema.indentationRules.indentNextLinePattern.flags": "indentNextLinePattern için Düzenli İfade işaretleri.", + "schema.indentationRules.indentNextLinePattern.errorMessage": "`/^([gimuy]+)$/` kalıbı ile eşleşmelidir.", + "schema.indentationRules.unIndentedLinePattern": "Bir satır bu kalıpla eşleşirse, o satırın girintisi değiştirilmemelidir ve diğer kurallara karşı değerlendirilmemelidir.", + "schema.indentationRules.unIndentedLinePattern.pattern": "unIndentedLinePattern için Düzenli İfade.", + "schema.indentationRules.unIndentedLinePattern.flags": "unIndentedLinePattern için Düzenli İfade işaretleri.", + "schema.indentationRules.unIndentedLinePattern.errorMessage": "`/^([gimuy]+)$/` kalıbı ile eşleşmelidir." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..3566cd50ef9d6 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inspectTMScopes": "Geliştirici: TM Kapsamlarını Denetle", + "inspectTMScopesWidget.loading": "Yükleniyor..." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json new file mode 100644 index 0000000000000..e65b16db179e7 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "Çoklu İmleç Değiştiricisini Aç/Kapat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.i18n.json b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.i18n.json new file mode 100644 index 0000000000000..5c757ea1565b5 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleRenderControlCharacters": "Kontrol Karakterlerini Aç/Kapat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace.i18n.json b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace.i18n.json new file mode 100644 index 0000000000000..87c50ce448866 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleRenderWhitespace": "Boşlukları Görüntülemeyi Aç/Kapat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json new file mode 100644 index 0000000000000..44a5560df3829 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggle.wordwrap": "Görünüm: Sözcük Kaydırmasını Aç/Kapat", + "wordWrap.notInDiffEditor": "Diff düzenleyicisinde sözcük kaydırma açılıp kapatılamıyor", + "unwrapMinified": "Bu dosya için sonraki satıra kaydırmayı devre dışı bırak", + "wrapMinified": "Bu dosya için sonraki satıra kaydırmayı etkinleştir" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/wordWrapMigration.i18n.json b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/wordWrapMigration.i18n.json new file mode 100644 index 0000000000000..01e4868daa1a6 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/wordWrapMigration.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wordWrapMigration.ok": "Tamam", + "wordWrapMigration.dontShowAgain": "Tekrar gösterme", + "wordWrapMigration.openSettings": "Ayarları Aç", + "wordWrapMigration.prompt": "`editor.wrappingColumn` ayarı, `editor.wordWrap` yüzünden kullanım dışıdır." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/browser/breakpointWidget.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/browser/breakpointWidget.i18n.json new file mode 100644 index 0000000000000..a6f34090c4d7d --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/browser/breakpointWidget.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "breakpointWidgetExpressionPlaceholder": "İfade değerlendirmesi doğru olduğunda mola ver. Kabul etmek için 'Enter', iptal etmek için 'Esc' tuşuna basın.", + "breakpointWidgetAriaLabel": "Program, burada sadece bu koşul doğruysa durur. Kabul etmek için Enter veya iptal etmek için Escape tuşuna basın. ", + "breakpointWidgetHitCountPlaceholder": "İsabet sayısı koşulu sağlandığında mola ver. Kabul etmek için 'Enter', iptal etmek için 'Esc' tuşuna basın.", + "breakpointWidgetHitCountAriaLabel": "Program, burada sadece isabet sayısı koşulu sağlandığında durur. Kabul etmek için Enter veya iptal etmek için Escape tuşuna basın. ", + "expression": "İfade", + "hitCount": "İsabet Sayısı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/browser/debugActionItems.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/browser/debugActionItems.i18n.json new file mode 100644 index 0000000000000..8a17f02344dcb --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/browser/debugActionItems.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "addConfiguration": "Yapılandırma Ekle...", + "noConfigurations": "Yapılandırma Yok" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/browser/debugActions.i18n.json new file mode 100644 index 0000000000000..3f796ff047d31 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openLaunchJson": "{0} Dosyasını Aç", + "launchJsonNeedsConfigurtion": "'launch.json'u Yapılandır veya Düzelt", + "noFolderDebugConfig": "Gelişmiş hata ayıklama yapılandırması yapmak için lütfen ilk olarak bir klasör açın.", + "startDebug": "Hata Ayıklamaya Başla", + "startWithoutDebugging": "Hata Ayıklama Olmadan Başlat", + "selectAndStartDebugging": "Seç ve Hata Ayıklamaya Başla", + "restartDebug": "Yeniden Başlat", + "reconnectDebug": "Yeniden Bağlan", + "stepOverDebug": "Adım At", + "stepIntoDebug": "İçine Adımla", + "stepOutDebug": "Dışına Adımla", + "stopDebug": "Durdur", + "disconnectDebug": "Bağlantıyı Kes", + "continueDebug": "Devam Et", + "pauseDebug": "Duraklat", + "restartFrame": "Çerçeveyi Yeniden Başlat", + "removeBreakpoint": "Kesme Noktasını Kaldır", + "removeAllBreakpoints": "Tüm Kesme Noktalarını Kaldır", + "enableBreakpoint": "Kesme Noktasını Etkinleştir", + "disableBreakpoint": "Kesme Noktasını Devre Dışı Bırak", + "enableAllBreakpoints": "Tüm Kesme Noktalarını Etkinleştir", + "disableAllBreakpoints": "Tüm Kesme Noktalarını Devre Dışı Bırak", + "activateBreakpoints": "Kesme Noktalarını Etkinleştir", + "deactivateBreakpoints": "Kesme Noktalarını Devre Dışı Bırak", + "reapplyAllBreakpoints": "Tüm Kesme Noktalarını Yeniden Uygula", + "addFunctionBreakpoint": "Fonksiyon Kesme Noktası Ekle", + "renameFunctionBreakpoint": "Fonksiyon Kesme Noktasını Kaldır", + "addConditionalBreakpoint": "Koşullu Kesme Noktası Ekle...", + "editConditionalBreakpoint": "Kesme Noktasını Düzenle...", + "setValue": "Değeri Ayarla", + "addWatchExpression": "İfade Ekle", + "editWatchExpression": "İfadeyi Düzenle", + "addToWatchExpressions": "İzlemeye Ekle", + "removeWatchExpression": "İfadeyi Kaldır", + "removeAllWatchExpressions": "Tüm İfadeleri Kaldır", + "clearRepl": "Konsolu Temizle", + "debugConsoleAction": "Hata Ayıklama Konsolu", + "unreadOutput": "Hata Ayıklama Konsolunda Yeni Çıktı", + "debugFocusConsole": "Hata Ayıklama Konsoluna Odakla", + "focusProcess": "İşleme Odakla", + "stepBackDebug": "Geri Adım At", + "reverseContinue": "Tersine Çevir" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json new file mode 100644 index 0000000000000..a9c04322e91bf --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugToolBarBackground": "Hata ayıklama araç çubuğu arka plan rengi." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/browser/debugContentProvider.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/browser/debugContentProvider.i18n.json new file mode 100644 index 0000000000000..647215e664e9a --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/browser/debugContentProvider.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unable": "Hata ayıklama oturumu olmadan kaynak çözümlenemiyor" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/browser/debugEditorActions.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/browser/debugEditorActions.i18n.json new file mode 100644 index 0000000000000..a5745c5e39e40 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/browser/debugEditorActions.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleBreakpointAction": "Hata Ayıklama: Kesme Noktası Ekle/Kaldır", + "columnBreakpointAction": "Hata Ayıklama: Sütun Kesme Noktası", + "columnBreakpoint": "Sütun Kesme Noktası Ekle", + "conditionalBreakpointEditorAction": "Hata Ayıklama: Koşullu Kesme Noktası Ekle...", + "runToCursor": "İmlece Kadar Çalıştır", + "debugEvaluate": "Hata Ayıklama: Değerlendir", + "debugAddToWatch": "Hata Ayıklama: İzlemeye Ekle", + "showDebugHover": "Hata Ayıklama: Bağlantı Vurgusunu Göster" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/browser/debugEditorModelManager.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/browser/debugEditorModelManager.i18n.json new file mode 100644 index 0000000000000..a9c0632215108 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/browser/debugEditorModelManager.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "breakpointDisabledHover": "Devre Dışı Bırakılmış Kesme Noktası", + "breakpointUnverifieddHover": "Doğrulanmamış Kesme Noktası", + "breakpointDirtydHover": "Doğrulanmamış Kesme Noktası Dosya düzenlendi, lütfen hata ayıklama oturumunu yeniden başlatın.", + "breakpointUnsupported": "Koşullu kesme noktaları bu hata ayıklama türü tarafından desteklenmiyor" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/browser/debugQuickOpen.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/browser/debugQuickOpen.i18n.json new file mode 100644 index 0000000000000..6a22d71e97db6 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/browser/debugQuickOpen.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, hata ayıklama", + "debugAriaLabel": "Çalıştırılacak bir başlatma yapılandırması adı girin.", + "noConfigurationsMatching": "Eşleyen hata ayıklama yapılandırması yok", + "noConfigurationsFound": "Hiçbir hata ayıklama yapılandırması bulunamadı. Lütfen bir 'launch.json' dosyası oluşturun." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/browser/exceptionWidget.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/browser/exceptionWidget.i18n.json new file mode 100644 index 0000000000000..3f77729328589 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/browser/exceptionWidget.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugExceptionWidgetBorder": "İstisna aracı kenarlık rengi.", + "debugExceptionWidgetBackground": "İstisna aracı arka plan rengi.", + "exceptionThrownWithId": "İstisna oluştu: {0}", + "exceptionThrown": "İstisna oluştu." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json new file mode 100644 index 0000000000000..a5db6507a7253 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileLinkMac": "Takip etmek için tıklayın (Cmd + tıklama yana açar)", + "fileLink": "Takip etmek için tıklayın (Ctrl + tıklama yana açar)" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/common/debug.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/common/debug.i18n.json new file mode 100644 index 0000000000000..52e048c8832db --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/common/debug.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "internalConsoleOptions": "Dahili hata ayıklama konsolunun davranışlarını denetler." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/common/debugModel.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/common/debugModel.i18n.json new file mode 100644 index 0000000000000..67633f8688f2a --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/common/debugModel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "notAvailable": "mevcut değil", + "startDebugFirst": "Lütfen değerlendirilecek bir hata ayıklama oturumu başlatın" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/common/debugSource.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/common/debugSource.i18n.json new file mode 100644 index 0000000000000..6d75e32351224 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/common/debugSource.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownSource": "Bilinmeyen Kaynak" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json new file mode 100644 index 0000000000000..14c96d48f155a --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleDebugViewlet": "Hata Ayıklamayı Göster", + "toggleDebugPanel": "Hata Ayıklama Konsolu", + "debug": "Hata Ayıklama", + "debugPanel": "Hata Ayıklama Konsolu", + "view": "Görüntüle", + "debugCategory": "Hata Ayıklama", + "debugCommands": "Hata Ayıklama Yapılandırması", + "debugConfigurationTitle": "Hata Ayıklama", + "allowBreakpointsEverywhere": "Herhangi bir dosyada kesme noktası ayarlamaya izin verir", + "openExplorerOnEnd": "Bir hata ayıklama oturumunun sonunda otomatik olarak gezgin görünümünü açın", + "inlineValues": "Hata ayıklama sırasında değişken değerlerini düzenleyicide satır içinde göster", + "hideActionBar": "Dolaştırılabilir hata ayıklama eylem çubuğunun gizlenip gizlenmeyeceğini denetler", + "launch": "Global hata ayıklama başlatma yapılandırması. Çalışma alanlarında paylaşılan 'launch.json'a alternatif olarak kullanılmalıdır" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json new file mode 100644 index 0000000000000..614f97b48db79 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noFolderDebugConfig": "Gelişmiş hata ayıklama yapılandırması yapmak için lütfen ilk olarak bir klasör açın." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json new file mode 100644 index 0000000000000..594cc3a08e1c9 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json @@ -0,0 +1,38 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.debuggers": "Hata ayıklama bağdaştırıcılarına ekleme yapar.", + "vscode.extension.contributes.debuggers.type": "Bu hata ayıklama bağdaştırıcısnın benzersiz tanımlayıcısı.", + "vscode.extension.contributes.debuggers.label": "Bu hata ayıklama bağdaştırıcısnın görünen adı.", + "vscode.extension.contributes.debuggers.program": "Hata ayıklama bağdaştırıcı programının yolu. Yol, ya mutlak ya da eklenti klasörüne görelidir.", + "vscode.extension.contributes.debuggers.args": "Bağdaştırıcıya iletilecek ek argümanlar.", + "vscode.extension.contributes.debuggers.runtime": "Program özniteliğinin yürütülebilir olmadığı halde bir çalışma zamanını gerektirmesi durumu için isteğe bağlı çalışma zamanı.", + "vscode.extension.contributes.debuggers.runtimeArgs": "İsteğe bağlı çalışma zamanı argümanları.", + "vscode.extension.contributes.debuggers.variables": "`launch.json` dosyasındaki interaktif değişkenlerin (ör. ${action.pickProcess}) bir komuta eşlenmesi.", + "vscode.extension.contributes.debuggers.initialConfigurations": "İlk 'launch.json' dosyasının üretimi için yapılandırmalar.", + "vscode.extension.contributes.debuggers.languages": "Hata ayıklama eklentisinin, \"varsayılan hata ayıklayıcı\" olarak değerlendirilebileceği diller listesi.", + "vscode.extension.contributes.debuggers.adapterExecutableCommand": "Belirtilirse; VS Code, hata ayıklama bağdaştırıcısı yürütülebilir dosyasının yolunu ve ona gönderilecek argümanları belirlemek için bu komutu çağırır.", + "vscode.extension.contributes.debuggers.startSessionCommand": "Belirtilirse; VS Code, bu eklenti için hedeflenen \"hata ayıklama\" ve \"çalıştır\" eylemleri için bu komutu çağırır.", + "vscode.extension.contributes.debuggers.configurationSnippets": "'launch.json' dosyasına yeni yapılandırmalar ekleme parçacıkları.", + "vscode.extension.contributes.debuggers.configurationAttributes": "'launch.json' dosyasını doğrulayacak JSON şema yapılandırmaları.", + "vscode.extension.contributes.debuggers.windows": "Windows'a özel ayarlar.", + "vscode.extension.contributes.debuggers.windows.runtime": "Windows'da kullanılacak çalışma zamanı.", + "vscode.extension.contributes.debuggers.osx": "OS X'e özel ayarlar.", + "vscode.extension.contributes.debuggers.osx.runtime": "OS X'de kullanılacak çalışma zamanı.", + "vscode.extension.contributes.debuggers.linux": "Linux'a özel ayarlar.", + "vscode.extension.contributes.debuggers.linux.runtime": "Linux'da kullanılacak çalışma zamanı.", + "vscode.extension.contributes.breakpoints": "Kesme noktalarına ekleme yapar.", + "vscode.extension.contributes.breakpoints.language": "Bu dil için kesme noktalarını etkinleştir.", + "app.launch.json.title": "Başlat", + "app.launch.json.version": "Bu dosya biçiminin sürümü.", + "app.launch.json.configurations": "Yapılandırma listesi. IntelliSense kullanarak yeni yapılandırmalar ekleyin veya mevcut olanları düzenleyin.", + "app.launch.json.compounds": "Bileşikler listesi. Her bileşik, birlikte çalıştırılacak birden çok yapılandırmaya başvurur.", + "app.launch.json.compound.name": "Bileşiğin adı. Başlatma yapılandırması açılır kutu menüsünde görünür.", + "app.launch.json.compounds.configurations": "Bu bileşiğin parçası olarak başlatılacak yapılandırmaların adları.", + "debugNoType": "Hata ayıklama bağdaştırıcısının 'type' ögesi atlanabilir veya 'dize' türünde olmalıdır.", + "DebugConfig.failed": " '.vscode' klasörü içinde 'launch.json' dosyası oluşturulamıyor ({0}).", + "selectDebug": "Ortam Seçin" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.i18n.json new file mode 100644 index 0000000000000..dd1bf89582dc2 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeBreakpoints": "Kesme Noktalarını Kaldır", + "removeBreakpointOnColumn": "{0}. Sütundaki Kesme Noktasını Kaldır", + "removeLineBreakpoint": "Satır Kesme Noktasını Kaldır", + "editBreakpoints": "Kesme Noktalarını Düzenle", + "editBreakpointOnColumn": "{0}. Sütundaki Kesme Noktasını Düzenle", + "editLineBrekapoint": "Satır Kesme Noktasını Düzenle", + "enableDisableBreakpoints": "Kesme Noktalarını Etkinleştir/Devre Dışı Bırak", + "disableColumnBreakpoint": "{0}. Sütundaki Kesme Noktasını Devre Dışı Bırak", + "disableBreakpointOnLine": "Satır Kesme Noktasını Devre Dışı Bırak", + "enableBreakpoints": "{0}. Sütundaki Kesme Noktasını Etkinleştir", + "enableBreakpointOnLine": "Satır Kesme Noktasını Etkinleştir", + "addBreakpoint": "Kesme Noktası Ekle", + "addConfiguration": "Yapılandırma Ekle..." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugHover.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugHover.i18n.json new file mode 100644 index 0000000000000..f805425af1401 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugHover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeAriaLabel": "Hata Ayıklama Bağlantı Vurgusu" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json new file mode 100644 index 0000000000000..d90aab83c4cf0 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "snapshotObj": "Bu nesne için sadece ilkel türler gösterilir.", + "debuggingPaused": "Hata ayıklama duraklatıldı, sebep {0}, {1} {2}", + "debuggingStarted": "Hata ayıklama başlatıldı.", + "debuggingStopped": "Hata ayıklama durduruldu.", + "breakpointAdded": "Kesme noktası eklendi, {0}. satır, {1} dosyası", + "breakpointRemoved": "Kesme noktası kaldırıldı, {0}. satır, {1} dosyası", + "compoundMustHaveConfigurations": "Bileşik, birden çok yapılandırmayı başlatmak için \"configurations\" özniteliği bulundurmalıdır.", + "configMissing": "'launch.json' dosyasında '{0}' yapılandırması eksik.", + "debugTypeNotSupported": "Yapılandırılan hata ayıklama türü '{0}', desteklenmiyor.", + "debugTypeMissing": "Seçilen başlatma yapılandırması için 'type' özelliği eksik.", + "preLaunchTaskErrors": "'{0}' ön başlatma görevi sırasında derleme hataları algılandı.", + "preLaunchTaskError": "'{0}' ön başlatma görevi sırasında derleme hatası algılandı.", + "preLaunchTaskExitCode": "'{0}' ön başlatma görevi {1} çıkış koduyla sonlandı.", + "debugAnyway": "Yine de Hata Ayıkla", + "noFolderWorkspaceDebugError": "Aktif dosyada hata ayıklama yapılamıyor. Lütfen, dosyanın diskte kayıtlı olduğundan ve bu dosya türü için hata ayıklama eklentinizin olduğundan emin olun.", + "NewLaunchConfig": "Lütfen uygulamanızın başlatma yapılandırması dosyasını ayarlayın. {0}", + "DebugTaskNotFound": "'{0}' ön başlatma görevi bulunamadı.", + "differentTaskRunning": "Çalışan bir {0} görevi var. Ön başlatma görevi {1} çalıştırılamıyor." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugViewer.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugViewer.i18n.json new file mode 100644 index 0000000000000..823377981dd96 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugViewer.i18n.json @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "process": "İşlem", + "paused": "Duraklatıldı", + "running": "Çalışıyor", + "thread": "İş Parçacığı", + "pausedOn": "{0} Üzerinde Duraklatıldı", + "loadMoreStackFrames": "Daha Fazla Yığın Çerçevesi Yükleyin", + "threadAriaLabel": "{0} iş parçacığı, çağrı yığını, hata ayıklama", + "stackFrameAriaLabel": "Yığın Çerçevesi {0} satır {1} {2}, çağrı yığını, hata ayıklama", + "variableValueAriaLabel": "Yeni değişken adını girin", + "variableScopeAriaLabel": "{0} kapsamı, değişkenler, hata ayıklama", + "variableAriaLabel": "{0} değeri {1}, değişkenler, hata ayıklama", + "watchExpressionPlaceholder": "İzlenecek ifade", + "watchExpressionInputAriaLabel": "İzleme ifadesi girin", + "watchExpressionAriaLabel": "{0} değeri {1}, izleme, hata ayıklama", + "watchVariableAriaLabel": "{0} değeri {1}, izleme, hata ayıklama", + "functionBreakpointPlaceholder": "Mola verilecek fonksiyon", + "functionBreakPointInputAriaLabel": "Fonksiyon kesme noktasını girin", + "functionBreakpointsNotSupported": "Fonksiyon kesme noktaları bu hata ayıklama türü tarafından desteklenmiyor", + "breakpointAriaLabel": "Kesme noktası satır {0} {1}, kesme noktaları, hata ayıklama", + "functionBreakpointAriaLabel": "Fonksiyon kesme noktası {0}, kesme noktaları, hata ayıklama", + "exceptionBreakpointAriaLabel": "İstisna kesme noktası {0}, kesme noktaları, hata ayıklama" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json new file mode 100644 index 0000000000000..68da0eb40b51c --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "variablesSection": "Değişkenler Bölümü", + "variables": "Değişkenler", + "variablesAriaTreeLabel": "Hata Ayıklama Değişkenleri", + "expressionsSection": "İfadeler Bölümü", + "watch": "İzle", + "watchAriaTreeLabel": "Hata Ayıklama İzleme İfadeleri", + "callstackSection": "Çağrı Yığını Bölümü", + "debugStopped": "{0} Üzerinde Duraklatıldı", + "callStack": "Çağrı Yığını", + "callStackAriaLabel": "Hata Ayıklama Çağrı Yığını", + "breakpointsSection": "Kesme Noktaları Bölümü", + "breakpoints": "Kesme Noktaları", + "breakpointsAriaTreeLabel": "Hata Ayıklama Kesme Noktaları" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json new file mode 100644 index 0000000000000..52d6e60d75054 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "copyValue": "Değeri Kopyala", + "copy": "Kopyala", + "copyAll": "Tümünü Kopyala", + "copyStackTrace": "Çağrı Yığınını Kopyala" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json new file mode 100644 index 0000000000000..68bc0009a9cd5 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "moreInfo": "Daha Fazla Bilgi", + "unableToLaunchDebugAdapter": "'{0}' tarafından hata ayıklama bağdaştırıcısı başlatılamadı.", + "unableToLaunchDebugAdapterNoArgs": "Hata ayıklama bağdaştırıcısı başlatılamıyor.", + "stoppingDebugAdapter": "{0}. Hata ayıklama bağdaştırıcısı durduruluyor.", + "debugAdapterCrash": "Hata ayıklama bağdaştırıcısı beklenmeyen biçimde sonlandırıldı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json new file mode 100644 index 0000000000000..f3b84b06d7c2b --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "replAriaLabel": "Oku Değerlendir Yaz Döngüsü Paneli", + "actions.repl.historyPrevious": "Önceki Geçmiş", + "actions.repl.historyNext": "Sonraki Geçmiş", + "actions.repl.acceptInput": "REPL Girdiyi Kabul Et", + "actions.repl.copyAll": "Hata Ayıklama: Konsol Tümünü Kopyala" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json new file mode 100644 index 0000000000000..3ee7a24156632 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "stateCapture": "Nesne durumu ilk değerlendirmeden alındı", + "replVariableAriaLabel": "{0} değişkeni, {1} değerine sahip, oku değerlendir yaz döngüsü, hata ayıklama", + "replExpressionAriaLabel": "{0} ifadesi, {1} değerine sahip, oku değerlendir yaz döngüsü, hata ayıklama", + "replValueOutputAriaLabel": "{0}, oku değerlendir yaz döngüsü, hata ayıklama", + "replKeyValueOutputAriaLabel": "{0} çıktı değişkeni, {1} değerine sahip, oku değerlendir yaz döngüsü, hata ayıklama" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json new file mode 100644 index 0000000000000..9d6394edd4c83 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "statusBarDebuggingBackground": "Bir programda hata ayıklama yapılırken durum çubuğu arka plan rengi. Durum çubuğu, pencerenin alt kısmında gösterilir.", + "statusBarDebuggingForeground": "Bir programda hata ayıklama yapılırken durum çubuğu ön plan rengi. Durum çubuğu, pencerenin alt kısmında gösterilir." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/terminalSupport.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/terminalSupport.i18n.json new file mode 100644 index 0000000000000..b5f38fd9078de --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/terminalSupport.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debug.terminal.title": "hata ayıklanan", + "debug.terminal.not.available.error": "Entegre terminal mevcut değil" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json new file mode 100644 index 0000000000000..6d21fb46e92fe --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugAdapterBinNotFound": "Hata ayıklama bağdaştırıcısı yürütülebilir dosyası '{0}', mevcut değil.", + "debugAdapterCannotDetermineExecutable": "Hata ayıklama bağdaştırıcısı yürütülebilir dosyası '{0}' belirlenemedi.", + "debugType": "Yapılandırma türü.", + "debugTypeNotRecognised": "Hata ayıklama türü tanınmıyor. Karşılık gelen hata ayıklama uzantısı yüklemiş olduğunuzdan ve etkinleştirildiğinden emin olun.", + "node2NotSupported": "\"node2\" artık desteklenmiyor, bunun yerine \"node\" kullanın ve \"protocol\" özniteliğini \"inspector\" olarak ayarlayın.", + "debugName": "Yapılandırmanın adı; başlatma yapılandırması açılır kutu menüsünde görünür.", + "debugRequest": "Yapılandırmanın istek türü. \"launch\" veya \"attach\" olabilir.", + "debugServer": "Sadece eklenti geliştirme hata ayıklaması için: eğer port belirtildiyse; Vs Code, bir hata ayıklama bağdaştırıcısına sunucu modunda bağlanmayı dener", + "debugPrelaunchTask": "Hata ayıklama oturumu başlamadan önce çalıştırılacak görev.", + "debugWindowsConfiguration": "Windows'a özel başlangıç yapılandırması öznitelikleri.", + "debugOSXConfiguration": "OS X'e özel başlangıç yapılandırması öznitelikleri.", + "debugLinuxConfiguration": "Linux'a özel başlangıç yapılandırması öznitelikleri.", + "deprecatedVariables": "'env.', 'config.' ve 'command.' kullanım dışıdır, bunların yerine 'env:', 'config:' ve 'command:' kulanın." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/browser/actions/showEmmetCommands.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/browser/actions/showEmmetCommands.i18n.json new file mode 100644 index 0000000000000..7e019e4d696c1 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/browser/actions/showEmmetCommands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showEmmetCommands": "Emmet Komutlarını Göster" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json new file mode 100644 index 0000000000000..7f2cf686977fa --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "balanceInward": "Emmet: Dengele (içe)", + "balanceOutward": "Emmet: Dengele (dışa)" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json new file mode 100644 index 0000000000000..7832e96768804 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "previousEditPoint": "Emmet: Önceki Düzenleme Noktasına Git", + "nextEditPoint": "Emmet: Sonraki Düzenleme Noktasına Git" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json new file mode 100644 index 0000000000000..77713e86bc0f3 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "evaluateMathExpression": "Emmet: Matematik İfadesini Değerlendir" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json new file mode 100644 index 0000000000000..53b34ac42e8e6 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "expandAbbreviationAction": "Emmet: Kısaltmayı Genişlet" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json new file mode 100644 index 0000000000000..6692ba5badb5f --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "incrementNumberByOneTenth": "Emmet: 0.1 Arttır", + "incrementNumberByOne": "Emmet: 1 Arttır", + "incrementNumberByTen": "Emmet: 10 Arttır", + "decrementNumberByOneTenth": "Emmet: 0.1 Azalt", + "decrementNumberByOne": "Emmet: 1 Azalt", + "decrementNumberByTen": "Emmet: 10 Azalt" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json new file mode 100644 index 0000000000000..0bae8eb938d2e --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "matchingPair": "Emmet: Eşleşen Çifte Git" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json new file mode 100644 index 0000000000000..a083c13f1e58e --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mergeLines": "Emmet: Satırları Birleştir" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json new file mode 100644 index 0000000000000..8cceaedbe4bf5 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reflectCSSValue": "Emmet: CSS Değerini Yansıt" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json new file mode 100644 index 0000000000000..13f4115a719a4 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeTag": "Emmet: Etiketi Sil" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json new file mode 100644 index 0000000000000..2507b6d025bbe --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "selectPreviousItem": "Emmet: Önceki Ögeyi Seç", + "selectNextItem": "Emmet: Sonraki Ögeyi Seç" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json new file mode 100644 index 0000000000000..c64d4ead15465 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "splitJoinTag": "Emmet: Etiketi Böl/Birleştir" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json new file mode 100644 index 0000000000000..4f88ade10dcc8 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleComment": "Emmet: Yorumu Aç/Kapat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json new file mode 100644 index 0000000000000..862f8163fb481 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateImageSize": "Emmet: Görüntü Boyutunu Güncelle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json new file mode 100644 index 0000000000000..48f159524925d --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateTag": "Emmet: Etiketi Güncelle", + "enterTag": "Etiketi Gir", + "tag": "Etiket" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json new file mode 100644 index 0000000000000..678b349f5715a --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wrapWithAbbreviationAction": "Emmet: Kısaltma ile Sarmala", + "enterAbbreviation": "Kısaltmayı Gir", + "abbreviation": "Kısaltma" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json new file mode 100644 index 0000000000000..bbcfad4c7f4ad --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emmetConfigurationTitle": "Emmet", + "triggerExpansionOnTab": "Etkinleştirildiğinde, emmet kısaltmaları TAB tuşuna basıldığında genişletilir.", + "emmetPreferences": "Emmet'in bazı eylemleri ve çözümleyicilerinin davranışını değiştirmek için kullanılacak tercihler.", + "emmetSyntaxProfiles": "Belirtilen sentaks için profil tanımlayın veya kendi profilinizi belirli kurallarla kullanın.", + "emmetExclude": "Emmet kısaltmalarının genişletilmeyeceği bir diller dizisi.", + "emmetExtensionsPath": "Emmet profileri, parçacıkları ve tercihlerini içeren bir klasör yolu.", + "useNewEmmet": "Tüm emmet özellikleri için yeni emmet modüllerini deneyin(sonunda eski tekil emmet kütüphanesinin yerini alacaktır)." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/execution/electron-browser/terminal.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/execution/electron-browser/terminal.contribution.i18n.json new file mode 100644 index 0000000000000..72d4755b5b475 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/execution/electron-browser/terminal.contribution.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminalConfigurationTitle": "Harici Terminal", + "terminal.external.windowsExec": "Windows'da hangi terminalin çalışacağını ayarlar.", + "terminal.external.osxExec": "OS X'de hangi terminalin çalışacağını ayarlar.", + "terminal.external.linuxExec": "Linux'da hangi terminalin çalışacağını ayarlar.", + "globalConsoleActionWin": "Yeni Komut İstemi Aç", + "globalConsoleActionMacLinux": "Yeni Terminal Aç", + "scopedConsoleActionWin": "Komut İsteminde Aç", + "scopedConsoleActionMacLinux": "Terminalde Aç" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/execution/electron-browser/terminalService.i18n.json b/i18n/trk/src/vs/workbench/parts/execution/electron-browser/terminalService.i18n.json new file mode 100644 index 0000000000000..6e763ea86813d --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/execution/electron-browser/terminalService.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "console.title": "VS Code Konsolu", + "mac.terminal.script.failed": "'{0}' betiği, {1} çıkış koduyla başarısız oldu", + "mac.terminal.type.not.supported": "'{0}' desteklenmiyor", + "press.any.key": "Devam etmek için bir tuşa basın ...", + "linux.term.failed": "'{0}', {1} çıkış koduyla başarısız oldu" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json new file mode 100644 index 0000000000000..1341aa7a5fab0 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.view": "Özel görünüme ekleme yapar", + "vscode.extension.contributes.view.id": "vscode.workspace.createTreeView aracılığıyla oluşturulan görünümü tanımlamak için kullanılan benzersiz kimlik", + "vscode.extension.contributes.view.label": "Görünümde gösterilecek insanlar tarafından okunabilir dize", + "vscode.extension.contributes.view.icon": "Görünüm simgesinin yolu", + "vscode.extension.contributes.views": "Özel görünümlere ekleme yapar", + "showViewlet": "{0}'i Göster", + "view": "Görüntüle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/explorers/browser/treeExplorerActions.i18n.json b/i18n/trk/src/vs/workbench/parts/explorers/browser/treeExplorerActions.i18n.json new file mode 100644 index 0000000000000..f9ce5d1c2d7ed --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/explorers/browser/treeExplorerActions.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "refresh": "Yenile" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/explorers/browser/treeExplorerService.i18n.json b/i18n/trk/src/vs/workbench/parts/explorers/browser/treeExplorerService.i18n.json new file mode 100644 index 0000000000000..25fbff908a0e7 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/explorers/browser/treeExplorerService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.noMatchingProviderId": "{providerId} kimliği ile kayıtlı \"TreeExplorerNodeProvider\" yok." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.i18n.json b/i18n/trk/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.i18n.json new file mode 100644 index 0000000000000..bc360a62ef3a6 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorerViewlet.tree": "Ağaç Gezgini Bölümü" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/browser/dependenciesViewer.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/browser/dependenciesViewer.i18n.json new file mode 100644 index 0000000000000..36f005e07fc5b --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/extensions/browser/dependenciesViewer.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error": "Hata", + "Unknown Dependency": "Bilinmeyen Bağımlılık:" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json new file mode 100644 index 0000000000000..99ab8e650ad62 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -0,0 +1,44 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "name": "Eklenti adı", + "extension id": "Eklenti tanımlayıcısı", + "publisher": "Yayıncı adı", + "install count": "Yüklenme sayısı", + "rating": "Derecelendirme", + "license": "Lisans", + "details": "Detaylar", + "contributions": "Eklemeler", + "changelog": "Değişim Günlüğü", + "dependencies": "Bağımlılıklar", + "noReadme": "README dosyası yok.", + "noChangelog": "Değişim günlüğü yok.", + "noContributions": "Hiçbir Ekleme Yapmıyor", + "noDependencies": "Bağımlılık Yok", + "settings": "Ayarlar ({0})", + "setting name": "Adı", + "description": "Açıklama", + "default": "Varsayılan", + "debuggers": "Hata Ayıklayıcılar ({0})", + "debugger name": "Adı", + "debugger type": "Tür", + "views": "Görünümler ({0})", + "view id": "ID", + "view name": "Adı", + "view location": "Yeri", + "themes": "Temalar ({0})", + "JSON Validation": "JSON Doğrulama ({0})", + "commands": "Komutlar ({0})", + "command name": "Adı", + "keyboard shortcuts": "Klavye Kısayolları", + "menuContexts": "Menü Bağlamları", + "languages": "Diller ({0})", + "language id": "ID", + "language name": "Adı", + "file extensions": "Dosya Uzantıları", + "grammar": "Gramer", + "snippets": "Parçacıklar" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json new file mode 100644 index 0000000000000..c76e1470bfc35 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -0,0 +1,62 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "installAction": "Yükle", + "installing": "Yükleniyor", + "uninstallAction": "Kaldır", + "Uninstalling": "Kaldırılıyor", + "updateAction": "Güncelle", + "updateTo": "{0} sürümüne güncelle", + "enableForWorkspaceAction.label": "Etkinleştir (Çalışma Alanı)", + "enableAlwaysAction.label": "Etkinleştir (Daima)", + "disableForWorkspaceAction.label": "Devre Dışı Bırak (Çalışma Alanı)", + "disableAlwaysAction.label": "Devre Dışı Bırak (Daima)", + "ManageExtensionAction.uninstallingTooltip": "Kaldırılıyor", + "enableForWorkspaceAction": "Çalışma Alanı", + "enableGloballyAction": "Daima", + "enableAction": "Etkinleştir", + "disableForWorkspaceAction": "Çalışma Alanı", + "disableGloballyAction": "Daima", + "disableAction": "Devre Dışı Bırak", + "checkForUpdates": "Güncelleştirmeleri Denetle", + "enableAutoUpdate": "Eklentileri Otomatik Olarak Güncelleştirmeyi Etkinleştir", + "disableAutoUpdate": "Eklentileri Otomatik Olarak Güncelleştirmeyi Devre Dışı Bırak", + "updateAll": "Tüm Eklentileri Güncelle", + "reloadAction": "Yeniden Yükle", + "postUpdateTooltip": "Güncellemek için yeniden yükleyin", + "postUpdateMessage": "Güncellenen '{0}' eklentisini etkinleştirmek için bu pencere yeniden yüklensin mi?", + "postEnableTooltip": "Etkinleştirmek için yeniden yükleyin", + "postEnableMessage": "'{0}' eklentisini etkinleştirmek için bu pencere yeniden yüklensin mi?", + "postDisableTooltip": "Devre dışı bırakmak için yeniden yükleyin", + "postDisableMessage": "'{0}' eklentisini devre dışı bırakmak için bu pencere yeniden yüklensin mi?", + "postUninstallTooltip": "Devre dışı bırakmak için yeniden yükleyin", + "postUninstallMessage": "Kaldırılan '{0}' eklentisini devre dışı bırakmak için bu pencere yeniden yüklensin mi?", + "reload": "Pencereyi &&Yeniden Yükle", + "toggleExtensionsViewlet": "Eklentileri Göster", + "installExtensions": "Eklenti Yükle", + "showInstalledExtensions": "Yüklenen Eklentileri Göster", + "showDisabledExtensions": "Devre Dışı Bırakılan Eklentileri Göster", + "clearExtensionsInput": "Eklenti Girdisini Temizle", + "showOutdatedExtensions": "Eski Eklentileri Göster", + "showPopularExtensions": "Popüler Eklentileri Göster", + "showRecommendedExtensions": "Tavsiye Edilen Eklentileri Göster", + "showWorkspaceRecommendedExtensions": "Çalışma Alanının Tavsiye Ettiği Eklentileri Göster", + "showRecommendedKeymapExtensions": "Tavsiye Edilen Tuş Haritalarını Göster", + "showRecommendedKeymapExtensionsShort": "Tuş Haritaları", + "showLanguageExtensions": "Dil Eklentilerini Göster", + "showLanguageExtensionsShort": "Dil Eklentileri", + "configureWorkspaceRecommendedExtensions": "Tavsiye Edilen Eklentileri Yapılandır (Çalışma Alanı)", + "ConfigureWorkspaceRecommendations.noWorkspace": "Tavsiyeler, sadece çalışma alanı klasöründe mevcuttur.", + "OpenExtensionsFile.failed": " '.vscode' klasörü içinde 'extensions.json' dosyası oluşturulamıyor ({0}).", + "builtin": "Yerleşik", + "disableAll": "Yüklü Tüm Eklentileri Devre Dışı Bırak", + "disableAllWorkspace": "Bu Çalışma Alanı için Yüklü Tüm Eklentileri Devre Dışı Bırak", + "enableAll": "Yüklü Tüm Eklentileri Etkinleştir", + "enableAllWorkspace": "Bu Çalışma Alanı için Yüklü Tüm Eklentileri Etkinleştir", + "extensionButtonProminentBackground": "Dikkat çeken eklenti eylemleri için buton arka plan rengi (ör. yükle butonu)", + "extensionButtonProminentForeground": "Dikkat çeken eklenti eylemleri için buton ön plan rengi (ör. yükle butonu)", + "extensionButtonProminentHoverBackground": "Dikkat çeken eklenti eylemleri için buton bağlantı vurgusu arka plan rengi (ör. yükle butonu)" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json new file mode 100644 index 0000000000000..1ac44b7c83d36 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "manage": "Eklentilerinizi yönetmek için Enter'a basın.", + "searchFor": "Markette '{0}' için arama yapmak için Enter'a basın.", + "noExtensionsToInstall": "Bir eklenti adı girin" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.i18n.json new file mode 100644 index 0000000000000..006553546294e --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "app.extensions.json.title": "Eklentiler", + "app.extensions.json.recommendations": "Eklenti tavsiyelerinin listesi. Bir eklentinin tanımlayıcısı daima '${yayinci}.${ad}' şeklindedir. Örnek: 'vscode.csharp'.", + "app.extension.identifier.errorMessage": "'${yayinci}.${ad}' biçimi bekleniyor. Örnek: 'vscode.csharp'." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json new file mode 100644 index 0000000000000..93faa852946c7 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensionsInputName": "Eklenti: {0}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json new file mode 100644 index 0000000000000..640d11588c60d --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reallyRecommended2": "'{0}' eklentisi bu dosya türü için tavsiye edilir.", + "showRecommendations": "Tavsiyeleri Göster", + "neverShowAgain": "Tekrar gösterme", + "close": "Kapat", + "workspaceRecommended": "Bu çalışma alanı bazı eklentileri tavsiye ediyor.", + "ignoreExtensionRecommendations": "Tüm eklenti tavsiyelerini yok saymak istiyor musunuz?", + "ignoreAll": "Evet, Tümünü Yok Say", + "no": "Hayır", + "cancel": "İptal" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json new file mode 100644 index 0000000000000..f6176cf12ddcd --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensionsCommands": "Eklentileri Yönet", + "galleryExtensionsCommands": "Galeri Eklentileri Yükle", + "extension": "Eklenti", + "extensions": "Eklentiler", + "view": "Görüntüle", + "extensionsConfigurationTitle": "Eklentiler", + "extensionsAutoUpdate": "Eklentileri otomatik olarak güncelle", + "extensionsIgnoreRecommendations": "Eklenti tavsiyelerini yok say" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json new file mode 100644 index 0000000000000..25237bc8eadfc --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openExtensionsFolder": "Eklentiler Klasörünü Aç", + "installVSIX": "VSIX'ten yükle...", + "InstallVSIXAction.success": "Eklenti başarıyla yüklendi. Etkinleştirmek için yeniden başlatın.", + "InstallVSIXAction.reloadNow": "Şimdi Yeniden Yükle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json new file mode 100644 index 0000000000000..33992c788d0a5 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "disableOtherKeymapsConfirmation": "Tuş bağlamlarında çakışmalardan kaçınmak için diğer tuş haritaları ({0}) devre dışı bırakılsın mı?", + "yes": "Evet", + "no": "Hayır", + "betterMergeDisabled": "\"Better Merge\" artık yerleşik bir eklenti, yüklenen eklendi devre dışı bırakıldı ve kaldırılabilir.", + "uninstall": "Kaldır", + "later": "Daha Sonra" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json new file mode 100644 index 0000000000000..0c3e5b0c42235 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "marketPlace": "Market", + "installedExtensions": "Yüklü", + "searchInstalledExtensions": "Yüklü", + "recommendedExtensions": "Tavsiye Edilen", + "searchExtensions": "Markette Eklenti Ara", + "sort by installs": "Sırala: Yüklenme Sayısına Göre", + "sort by rating": "Sırala: Derecelendirmeye Göre", + "sort by name": "Sırala: Ada Göre", + "suggestProxyError": "Market, 'ECONNREFUSED' döndürdü. Lütfen 'http.proxy' ayarını kontrol edin.", + "extensions": "Eklentiler", + "outdatedExtensions": "{0} Eski Eklenti" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json new file mode 100644 index 0000000000000..61cd287d6b604 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensions": "Eklentiler", + "no extensions found": "Eklenti yok.", + "suggestProxyError": "Market, 'ECONNREFUSED' döndürdü. Lütfen 'http.proxy' ayarını kontrol edin." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json new file mode 100644 index 0000000000000..4a7a26d84ac1d --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "enableDependeciesConfirmation": "'{0}' eklentisini etkinleştirdiğinizde onun bağımlılıkları da etkinleştirilir. Devam etmek istiyor musunuz?", + "enable": "Evet", + "doNotEnable": "Hayır", + "disableDependeciesConfirmation": "Yalnızca '{0}' eklentisini mi devre dışı bırakmak istersiniz yoksa bağımlılıklarını da devre dışı bırakmak ister misiniz?", + "disableOnly": "Sadece Eklenti", + "disableAll": "Tümü", + "cancel": "İptal", + "singleDependentError": "'{0}' eklentisi devre dışı bırakılamıyor. '{1}' eklentisi buna bağlı.", + "twoDependentsError": "'{0}' eklentisi devre dışı bırakılamıyor. '{1}' ve '{2}' eklentileri buna bağlı.", + "multipleDependentsError": "'{0}' eklentisi devre dışı bırakılamıyor. '{1}, '{2}' eklentileri ve diğerleri buna bağlı.", + "installConfirmation": "'{0}' eklentisini yüklemek ister misiniz?", + "install": "Yükle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json b/i18n/trk/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json new file mode 100644 index 0000000000000..d8da171200fdf --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "sendFeedback": "Geri Bildirimi Tweet'le", + "label.sendASmile": "Geri bildiriminizi bize Tweet'leyin.", + "patchedVersion1": "Kurulumunuz bozuk.", + "patchedVersion2": "Eğer bir hata gönderiyorsanız bunu belirtin.", + "sentiment": "Deneyiminiz nasıldı?", + "smileCaption": "Mutlu", + "frownCaption": "Üzgün", + "other ways to contact us": "Bize ulaşmanın diğer yolları", + "submit a bug": "Bir hata gönder", + "request a missing feature": "Eksik bir özellik talebinde bulun", + "tell us why?": "Bize nedenini söyleyin:", + "commentsHeader": "Açıklamalar", + "tweet": "Tweet'le", + "character left": "karakter kaldı", + "characters left": "karakter kaldı", + "feedbackSending": "Gönderiliyor", + "feedbackSent": "Teşekkürler", + "feedbackSendingError": "Yeniden dene" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/browser/editors/binaryFileEditor.i18n.json b/i18n/trk/src/vs/workbench/parts/files/browser/editors/binaryFileEditor.i18n.json new file mode 100644 index 0000000000000..4c60c43f74a29 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/browser/editors/binaryFileEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "binaryFileEditor": "İkili Dosya Görüntüleyici" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/browser/editors/textFileEditor.i18n.json b/i18n/trk/src/vs/workbench/parts/files/browser/editors/textFileEditor.i18n.json new file mode 100644 index 0000000000000..694dd68c04138 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/browser/editors/textFileEditor.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "textFileEditor": "Metin Dosyası Düzenleyicisi", + "createFile": "Dosya Oluştur", + "fileEditorWithInputAriaLabel": "{0}. Metin dosyası düzenleyici.", + "fileEditorAriaLabel": "Metin dosyası düzenleyici." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/browser/fileActions.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/files/browser/fileActions.contribution.i18n.json new file mode 100644 index 0000000000000..c9834694967e7 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/browser/fileActions.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "filesCategory": "Dosyalar", + "revealInSideBar": "Kenar Çubuğunda Ortaya Çıkar", + "acceptLocalChanges": "Yerel değişiklikleri kullan ve diskk içeriklerinin üzerine yaz", + "revertLocalChanges": "Yerel değişiklikleri göz ardı et ve diskteki içeriğe geri dön" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/browser/fileActions.i18n.json b/i18n/trk/src/vs/workbench/parts/files/browser/fileActions.i18n.json new file mode 100644 index 0000000000000..6081aa828c70c --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/browser/fileActions.i18n.json @@ -0,0 +1,73 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "retry": "Yeniden Dene", + "rename": "Yeniden Adlandır", + "newFile": "Yeni Dosya", + "newFolder": "Yeni Klasör", + "openFolderFirst": "İçinde dosyalar veya klasörler oluşturmak için ilk olarak bir klasör açın.", + "newUntitledFile": "Yeni İsimsiz Dosya", + "createNewFile": "Yeni Dosya", + "createNewFolder": "Yeni Klasör", + "deleteButtonLabelRecycleBin": "&&Geri Dönüşüm Kutusuna Taşı", + "deleteButtonLabelTrash": "&&Çöp Kutusuna Taşı", + "deleteButtonLabel": "&&Sil", + "dirtyMessageFolderOneDelete": "1 dosyada kaydedilmemiş değişiklik barındıran bir klasörü siliyorsunuz. Devam etmek istiyor musunuz?", + "dirtyMessageFolderDelete": "{0} dosyada kaydedilmemiş değişiklik barındıran bir klasörü siliyorsunuz. Devam etmek istiyor musunuz?", + "dirtyMessageFileDelete": "Kaydedilmemiş değişiklik barındıran bir dosyayı siliyorsunuz. Devam etmek istiyor musunuz?", + "dirtyWarning": "Değişiklikleriniz, kaydetmezseniz kaybolur.", + "confirmMoveTrashMessageFolder": "'{0}' ve içindekileri silmek istediğinizden emin misiniz?", + "confirmMoveTrashMessageFile": "'{0}' öğesini silmek istediğinize emin misiniz?", + "undoBin": "Geri dönüşüm kutusundan geri alabilirsiniz.", + "undoTrash": "Çöp kutusundan geri alabilirsiniz.", + "confirmDeleteMessageFolder": "'{0}' öğesini ve içindekileri kalıcı olarak silmek istediğinizden emin misiniz?", + "confirmDeleteMessageFile": "'{0}' öğesini kalıcı olarak silmek istediğinizden emin misiniz?", + "irreversible": "Bu eylem geri döndürülemez!", + "permDelete": "Kalıcı Olarak Sil", + "delete": "Sil", + "importFiles": "Dosya İçe Aktar", + "confirmOverwrite": "Hedef klasörde aynı ada sahip bir dosya veya klasör zaten var. Değiştirmek istiyor musunuz?", + "replaceButtonLabel": "&&Değiştir", + "copyFile": "Kopyala", + "pasteFile": "Yapıştır", + "duplicateFile": "Çoğalt", + "openToSide": "Yana Aç", + "compareSource": "Karşılaştırma İçin Seç", + "globalCompareFile": "Aktif Dosyayı Karşılaştır...", + "pickHistory": "Karşılaştırmak için daha önce açılan bir dosyayı seçin", + "unableToFileToCompare": "Seçtiğiniz dosya, '{0}' ile karşılaştırılamaz.", + "openFileToCompare": "Bir başka dosya ile karşılaştırmak için ilk olarak bir dosya açın.", + "compareWith": "'{0}' ile karşılaştır", + "compareFiles": "Dosyaları Karşılaştır", + "refresh": "Yenile", + "save": "Kaydet", + "saveAs": "Farklı Kaydet...", + "saveAll": "Tümünü Kaydet", + "saveAllInGroup": "Gruptaki Tümünü Kadet", + "saveFiles": "Kaydedilmemiş Değişiklikler İçeren Dosyaları Kaydet", + "revert": "Dosyayı Geri Döndür", + "focusOpenEditors": "Açık Düzenleyiciler Görünümüne Odakla", + "focusFilesExplorer": "Dosya Gezginine Odakla", + "showInExplorer": "Aktif Dosyayı Kenar Çubuğunda Ortaya Çıkar", + "openFileToShow": "Gezginde göstermek için ilk olarak bir dosya açın", + "collapseExplorerFolders": "Gezgindeki Klasörleri Daralt", + "refreshExplorer": "Gezgini Yenile", + "openFile": "Dosya Aç...", + "openFileInNewWindow": "Aktif Dosyayı Yeni Pencerede Aç", + "openFileToShowInNewWindow": "Yeni pencerede açmak için ilk olarak bir dosya açın", + "revealInWindows": "Gezginde Ortaya Çıkar", + "revealInMac": "Finder'da Ortaya Çıkar", + "openContainer": "İçeren Klasörü Aç", + "revealActiveFileInWindows": "Aktif Dosyayı Windows Gezgini'nde Ortaya Çıkar", + "revealActiveFileInMac": "Aktif Dosyayı Finder'da Ortaya Çıkar", + "openActiveFileContainer": "Aktif Dosyayı İçeren Klasörü Aç", + "copyPath": "Yolu Kopyala", + "copyPathOfActive": "Aktif Dosyanın Yolunu Kopyala", + "emptyFileNameError": "Bir dosya veya klasör adı sağlanması gerekiyor.", + "fileNameExistsError": "Bu konumda bir **{0}** dosyası veya klasörü zaten mevcut. Lütfen başka bir ad seçin.", + "invalidFileNameError": "**{0}** adı, bir dosya veya klasör adı olarak geçerli değildir. Lütfen başka bir ad seçin.", + "filePathTooLongError": "**{0}** adı çok uzun bir yol ile sonuçlanıyor. Lütfen daha kısa bir ad seçin." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/browser/fileCommands.i18n.json b/i18n/trk/src/vs/workbench/parts/files/browser/fileCommands.i18n.json new file mode 100644 index 0000000000000..699305824d3ed --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/browser/fileCommands.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFileToCopy": "Yolunu kopyalamak için ilk olarak bir dosya açın", + "openFileToReveal": "Ortaya çıkarmak için ilk olarak bir dosya açın" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/files/browser/files.contribution.i18n.json new file mode 100644 index 0000000000000..d5f32fb9bd5bd --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -0,0 +1,42 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showExplorerViewlet": "Gezgini Göster", + "explore": "Gezgin", + "view": "Görüntüle", + "textFileEditor": "Metin Dosyası Düzenleyicisi", + "binaryFileEditor": "İkili Dosya Düzenleyicisi", + "filesConfigurationTitle": "Dosyalar", + "exclude": "Dosya ve klasörleri hariç tutmak için glob desenlerini yapılandırın.", + "files.exclude.boolean": "Dosya yollarının eşleştirileceği glob deseni. Deseni etkinleştirmek veya devre dışı bırakmak için true veya false olarak ayarlayın.", + "files.exclude.when": "Eşleşen bir dosyanın eşdüzey dosyalarında ek denetim. Eşleşen dosya adı için değişken olarak $(basename) kullanın.", + "associations": "Dillerle dosya ilişkilendirmelerini yapılandırın (ör. \"*.uzanti\": \"html\"). Bunların, kurulu olan dillerin varsayılan ilişkilendirmeleri karşısında önceliği vardır.", + "encoding": "Dosyalar okunurken ve yazılırken kullanılacak varsayılan karakter kümesi kodlaması.", + "autoGuessEncoding": "Etkinleştirildiğinde, dosyaları açarken karakter kümesini tahmin etmeye çalışır", + "eol": "Varsayılan satır sonu karakteri. LF için \\n ve CRLF için \\r\\n kullan.", + "trimTrailingWhitespace": "Etkinleştirildiğinde, bir dosyayı kaydettiğinizde sondaki boşluk kırpılır.", + "insertFinalNewline": "Etkinleştirildiğinde, bir dosyayı kaydederken dosya sonuna bir boş satır ekler.", + "files.autoSave.off": "Kaydedilmemiş değişiklikler içeren bir dosya hiçbir zaman otomatik olarak kaydedilmez.", + "files.autoSave.afterDelay": "Kaydedilmemiş değişiklikler içeren bir dosya, 'files.autoSaveDelay' ayarlandıktan sonra otomatik olarak kaydedilir.", + "files.autoSave.onFocusChange": "Kaydedilmemiş değişiklikler içeren bir dosya, düzenleyici odaktan çıktığı an otomatik olarak kaydedilir.", + "files.autoSave.onWindowChange": "Kaydedilmemiş değişiklikler içeren bir dosya, pencere odaktan çıktığı an otomatik olarak kaydedilir.", + "autoSave": "Kaydedilmemiş değişiklikler içeren dosyaların otomatik kaydedilmesini denetler. Kabul edilen değerler: '{0}', '{1}', '{2}' (düzenleyici odaktan çıktığında), '{3}' (pencere odaktan çıktığında). '{4}' olarak ayarlanırsa, gecikmeyi 'files.autoSaveDelay' ile ayarlayabilirsiniz.", + "autoSaveDelay": "Kaydedilmemiş değişiklikler içeren bir dosyanın kaç ms gecikmeli otomatik olarak kaydedileceğini denetler. Sadece 'files.autoSave', '{0}' olarak ayarlandığında uygulanır.", + "watcherExclude": "Dosya izlemeden hariç tutulacak dosya yollarının glob desenlerini yapılandırın. Desenler mutlak yollarla eşleşmelidir (ör. ** ile ön ek veya düzgün eşleştirmek için tam yol). Bu ayar değiştiğinde yeniden başlatma gerektirir. Code'un başlangıçta çok fazla CPU zamanı harcadığını görürseniz, başlangıç yüklemesini azaltmak için büyük klasörleri hariç tutabilirsiniz.", + "hotExit.off": "Hızlı çıkışı devre dışı bırak.", + "hotExit.onExit": "Hızlı çıkış, uygulama kapandığında tetiklenir, yani Windows/Linux'da son pencere kapandığında veya workbench.action.quit komutu tetiklendiği zaman (komut paleti, tuş bağı, menü). Bir sonraki başlatmada tüm pencereler yedekleriyle geri yüklenir.", + "hotExit.onExitAndWindowClose": "Hızlı çıkış, uygulama kapandığında tetiklenir, yani Windows/Linux'da son pencere kapandığında veya workbench.action.quit komutu tetiklendiği zaman (komut paleti, tuş bağı, menü), ve ayrıca son pencere olmasından bağımsız açık bir klasör bulunan herhangi bir pencere varsa. Bir sonraki başlatmada tüm pencereler yedekleriyle geri yüklenir. Klasör pencerelerini kapatılmadan önceki konumlarına geri yüklemek için \"window.restoreWindows\" ögesini \"all\" olarak ayarlayın.", + "hotExit": "Oturumlar arasında kaydedilmemiş dosyaların hatırlanıp hatırlanmayacağını denetler, düzenleyiciden çıkarken kaydetmek için izin istenmesi atlanacaktır.", + "useExperimentalFileWatcher": "Yeni deneysel dosya izleyicisini kullanın.", + "defaultLanguage": "Yeni dosyalara atanan varsayılan dil modu.", + "editorConfigurationTitle": "Düzenleyici", + "formatOnSave": "Dosyayı kaydederken biçimlendir. Bir biçimlendirici mevcut olmalıdır, dosya otomatik olarak kaydedilmemelidir, ve düzenleyici kapanmıyor olmalıdır.", + "explorerConfigurationTitle": "Dosya Gezgini", + "openEditorsVisible": "Açık Editörler bölmesinde gösterilen düzenleyici sayısı. Bölmeyi gizlemek için 0 olarak ayarlayın.", + "dynamicHeight": "Açık düzenleyiciler bölümü yüksekliğinin öge sayısına göre dinamik olarak uyarlanıp uyarlanmayacağını denetler.", + "autoReveal": "Gezginin dosyaları açarken, onları otomatik olarak ortaya çıkartmasını ve seçmesini denetler.", + "enableDragAndDrop": "Gezgeinin sürükle bırak ile dosyaları ve klasörleri taşımaya izin verip vermeyeceğini denetler." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json b/i18n/trk/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json new file mode 100644 index 0000000000000..09d9b7607bd56 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "discard": "At", + "overwrite": "Üzerine Yaz", + "retry": "Yeniden Dene", + "readonlySaveError": "'{0}' kaydedilemedi: Dosya yazmaya karşı korunuyor. Korumayı kaldırmak için 'Üzerine Yaz'ı seçin.", + "genericSaveError": "'{0}' kaydedilemedi: ({1}).", + "staleSaveError": "'{0}' kaydedilemedi: Diskteki içerik daha yeni. Sizdeki sürüm ile disktekini karşılaştırmak için **Karşılaştır**a tıklayın.", + "compareChanges": "Karşılaştır", + "saveConflictDiffLabel": "{0} (diskte) ↔ {1} ({2} uygulamasında) - Kaydetme çakışmasını çöz", + "userGuide": "Değişikliklerinizi **geri al**mak veya diskteki içeriğin **üzerine yaz**mak için düzenleyicideki araç çubuğunu kullanabilirsiniz" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json b/i18n/trk/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json new file mode 100644 index 0000000000000..d14973027f76f --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noWorkspace": "Açık Klasör Yok", + "explorerSection": "Dosya Gezgini Bölümü", + "noWorkspaceHelp": "Henüz bir klasör açmadınız.", + "openFolder": "Klasör Aç" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json b/i18n/trk/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json new file mode 100644 index 0000000000000..569039ced59f0 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "explorerSection": "Dosya Gezgini Bölümü", + "folders": "Klasörler", + "treeAriaLabel": "Dosya Gezgini" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/browser/views/explorerViewer.i18n.json b/i18n/trk/src/vs/workbench/parts/files/browser/views/explorerViewer.i18n.json new file mode 100644 index 0000000000000..9dff53f0852e4 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/browser/views/explorerViewer.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileInputAriaLabel": "Dosya adı girin. Onaylamak için Enter'a, iptal etmek için Escape tuşuna basın.", + "filesExplorerViewerAriaLabel": "{0}, Dosya Gezgini", + "confirmOverwriteMessage": "'{0}' hedef klasörde zaten mevcut. Değiştirmek istiyor musunuz?", + "irreversible": "Bu eylem geri döndürülemez!", + "replaceButtonLabel": "&&Değiştir" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json b/i18n/trk/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json new file mode 100644 index 0000000000000..aa9de346ffc7c --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openEditors": "Açık Düzenleyiciler", + "openEditosrSection": "Açık Düzenleyiciler Bölümü", + "treeAriaLabel": "Açık Düzenleyiciler: Aktif Dosyaların Listesi", + "dirtyCounter": "{0} kaydedilmemiş" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json b/i18n/trk/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json new file mode 100644 index 0000000000000..172555e1368b6 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGroupAriaLabel": "{0}, Düzenleyici Grubu", + "openEditorAriaLabel": "{0}, Açık Düzenleyici", + "saveAll": "Tümünü Kaydet", + "closeAllUnmodified": "Değiştirilmeyenleri Kapat", + "closeAll": "Tümünü Kapat", + "close": "Kapat", + "closeOthers": "Diğerlerini Kapat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/common/dirtyFilesTracker.i18n.json b/i18n/trk/src/vs/workbench/parts/files/common/dirtyFilesTracker.i18n.json new file mode 100644 index 0000000000000..0f88a5b2332ee --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/common/dirtyFilesTracker.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "dirtyFiles": "{0} kaydedilmemiş dosya" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json b/i18n/trk/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json new file mode 100644 index 0000000000000..59355f869fc0c --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "orphanedFile": "{0} (diskten silindi)" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/html/browser/html.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/html/browser/html.contribution.i18n.json new file mode 100644 index 0000000000000..f9aa2193402ca --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/html/browser/html.contribution.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "html.editor.label": "Html Önizlemesi" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/html/browser/htmlPreviewPart.i18n.json b/i18n/trk/src/vs/workbench/parts/html/browser/htmlPreviewPart.i18n.json new file mode 100644 index 0000000000000..13f1ae29ec664 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/html/browser/htmlPreviewPart.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "html.voidInput": "Geçersiz düzenleyici girdisi." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/html/browser/webview.i18n.json b/i18n/trk/src/vs/workbench/parts/html/browser/webview.i18n.json new file mode 100644 index 0000000000000..cc23f3edf72e5 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/html/browser/webview.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "devtools.webview": "Geliştirici: Web Görünümü Araçları" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/markers/common/messages.i18n.json b/i18n/trk/src/vs/workbench/parts/markers/common/messages.i18n.json new file mode 100644 index 0000000000000..80f988e1d75dd --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/markers/common/messages.i18n.json @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewCategory": "Görüntüle", + "problems.view.show.label": "Sorunları Göster", + "problems.panel.configuration.title": "Sorunlar Görünümü", + "problems.panel.configuration.autoreveal": "Sorunlar görünümünün; dosyalar açılırken, dosyaları otomatik olarak ortaya çıkarıp çıkarmayacağını denetler.", + "markers.panel.title.problems": "Sorunlar", + "markers.panel.aria.label.problems.tree": "Dosyalara göre gruplandırılmış sorunlar", + "markers.panel.no.problems.build": "Şu ana kadar çalışma alanında herhangi bir sorun tespit edilmedi.", + "markers.panel.no.problems.filters": "Belirtilen süzgeç ölçütleriyle sonuç bulunamadı", + "markers.panel.action.filter": "Sorunları Süz", + "markers.panel.filter.placeholder": "Türe veya metne göre süz", + "markers.panel.filter.errors": "hatalar", + "markers.panel.filter.warnings": "uyarılar", + "markers.panel.filter.infos": "bilgilendirmeler", + "markers.panel.single.error.label": "1 Hata", + "markers.panel.multiple.errors.label": "{0} Hata", + "markers.panel.single.warning.label": "1 Uyarı", + "markers.panel.multiple.warnings.label": "{0} Uyarı", + "markers.panel.single.info.label": "1 Bilgilendirme", + "markers.panel.multiple.infos.label": "{0} Bilgilendirme", + "markers.panel.single.unknown.label": "1 Bilinmeyen", + "markers.panel.multiple.unknowns.label": "{0} Bilinmeyen", + "markers.panel.at.ln.col.number": "({0}, {1})", + "problems.tree.aria.label.resource": "{0} {1} sorun içeriyor", + "problems.tree.aria.label.error.marker": "{0} tarafından oluşturulan hata: {2}. satırın {3}. karakterinde {1}", + "problems.tree.aria.label.error.marker.nosource": "Hata: {1}. satırın {2}. karakterinde {0}", + "problems.tree.aria.label.warning.marker": "{0} tarafından oluşturulan uyarı: {2}. satırın {3}. karakterinde {1}", + "problems.tree.aria.label.warning.marker.nosource": "Uyarı: {1}. satırın {2}. karakterinde {0}", + "problems.tree.aria.label.info.marker": "{0} tarafından oluşturulan bilgilendirme: {2}. satırın {3}. karakterinde {1}", + "problems.tree.aria.label.info.marker.nosource": "Bilgilendirme: {1}. satırın {2}. karakterinde {0}", + "problems.tree.aria.label.marker": "{0} tarafından oluşturulan sorun: {2}. satırın {3}. karakterinde {1}", + "problems.tree.aria.label.marker.nosource": "Sorun: {1}. satırın {2}. karakterinde {0}", + "errors.warnings.show.label": "Hataları ve Uyarıları Göster" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/markers/electron-browser/markersElectronContributions.i18n.json b/i18n/trk/src/vs/workbench/parts/markers/electron-browser/markersElectronContributions.i18n.json new file mode 100644 index 0000000000000..22387f166cb25 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/markers/electron-browser/markersElectronContributions.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "copyMarker": "Kopyala" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/nps/electron-browser/nps.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/nps/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..821add9841da1 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/nps/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "Hızlı bir geri bildirim anketine katılmak ister misiniz?", + "takeSurvey": "Ankete Katıl", + "remindLater": "Daha Sonra Hatırlat", + "neverAgain": "Tekrar Gösterme" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/output/browser/output.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/output/browser/output.contribution.i18n.json new file mode 100644 index 0000000000000..fe8f6125b1a1e --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/output/browser/output.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "output": "Çıktı", + "viewCategory": "Görüntüle", + "clearOutput.label": "Çıktıyı Temizle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/output/browser/outputActions.i18n.json b/i18n/trk/src/vs/workbench/parts/output/browser/outputActions.i18n.json new file mode 100644 index 0000000000000..c4f84392df6d6 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/output/browser/outputActions.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleOutput": "Çıktıyı Aç/Kapat", + "clearOutput": "Çıktıyı Temizle", + "toggleOutputScrollLock": "Çıktı Kaydırma Kilidini Aç/Kapat", + "switchToOutput.label": "Çıktıya Geçiş Yap" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/output/browser/outputPanel.i18n.json b/i18n/trk/src/vs/workbench/parts/output/browser/outputPanel.i18n.json new file mode 100644 index 0000000000000..1fde8c9ce8a0b --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/output/browser/outputPanel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "outputPanelWithInputAriaLabel": "{0}, Çıktı paneli", + "outputPanelAriaLabel": "Çıktı paneli" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/output/common/output.i18n.json b/i18n/trk/src/vs/workbench/parts/output/common/output.i18n.json new file mode 100644 index 0000000000000..cfbabebaa616e --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/output/common/output.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "output": "Çıktı", + "channel": "'{0}' için" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json new file mode 100644 index 0000000000000..dc3e6110e3467 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "slow": "Yavaş başlangıç tespit edildi", + "slow.detail": "Az önce yavaş başlangıç yaşadığınız için üzgünüz. Lütfen '{0}' uygulamasını profil oluşturucu etkinleştirilmiş olarak başlatın, profilleri bizle paylaşın, ve biz de başlangıcı yeniden harika yapmak için çok çalışalım.", + "prof.message": "Profiller başarıyla oluşturuldu.", + "prof.detail": "Lütfen bir sorun (bildirimi) oluşturun ve aşağıdaki dosyaları manuel olarak ekleyin:\n{0}", + "prof.restartAndFileIssue": "Sorun Oluştur ve Yeniden Başlat", + "prof.restart": "Yeniden Başlat", + "prof.thanks": "Bize yardımcı olduğunuz için teşekkürler.", + "prof.detail.restart": "'{0}' uygulamasını kullanmaya devam etmek için son bir yeniden başlatma gerekiyor. Katkılarınız için tekrar teşekkür ederiz." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json b/i18n/trk/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json new file mode 100644 index 0000000000000..68b1055180c52 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defineKeybinding.initial": "İstenen tuş kombinasyonuna basın ve daha sonra ENTER'a basın. İptal etmek için ESCAPE tuşuna basın.", + "defineKeybinding.chordsTo": "ardından" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/trk/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json new file mode 100644 index 0000000000000..db84724650025 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "keybindingsInputName": "Klavye Kısayolları", + "SearchKeybindings.AriaLabel": "Tuş bağlarını ara", + "SearchKeybindings.Placeholder": "Tuş bağlarını ara", + "sortByPrecedene": "Önceliğe Göre Sırala", + "header-message": "Gelişmiş özelleştirmeler için açın ve düzenleyin:", + "keybindings-file-name": "keybindings.json", + "keybindingsLabel": "Tuş bağları", + "changeLabel": "Tuş Bağını Değiştir", + "addLabel": "Tuş Bağını Ekle", + "removeLabel": "Tuş Bağını Kaldır", + "resetLabel": "Tuş Bağını Sıfırla", + "showConflictsLabel": "Çakışmaları Göster", + "copyLabel": "Kopyala", + "error": "Tuş bağını düzenlerken '{0}' hatası. Lütfen 'keybindings.json' dosyasını açın ve kontrol edin.", + "command": "Command", + "keybinding": "Tuş bağı", + "source": "Kaynak", + "when": "Koşul", + "editKeybindingLabelWithKey": "{0} Tuş Bağını Değiştir", + "editKeybindingLabel": "Tuş Bağını Değiştir", + "addKeybindingLabelWithKey": "{0} Tuş Bağını Ekle", + "addKeybindingLabel": "Tuş Bağını Ekle", + "commandAriaLabel": "Komut {0}'dır.", + "keybindingAriaLabel": "Tuş bağı {0}'dır.", + "noKeybinding": "Tuş bağı atanmamış.", + "sourceAriaLabel": "Kaynak {0}'dır.", + "whenAriaLabel": "Koşul {0} şeklindedir.", + "noWhen": "Koşul içeriği yok." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/trk/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json new file mode 100644 index 0000000000000..15d8c9861aed8 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defineKeybinding.start": "Tuş Bağı Tanımla", + "defineKeybinding.kbLayoutErrorMessage": "Bu tuş kombinasyonunu geçerli klavye düzeninizde üretemeyeceksiniz.", + "defineKeybinding.kbLayoutLocalAndUSMessage": "Geçerli klavye düzeniniz için **{0}** (Birleşik Devletler standardı için **{1}**).", + "defineKeybinding.kbLayoutLocalMessage": "Geçerli klavye düzeniniz için **{0}**." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/preferences/browser/preferences.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferences.contribution.i18n.json new file mode 100644 index 0000000000000..76c311091690f --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferences.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultPreferencesEditor": "Varsayılan Tercihler Düzenleyicisi", + "keybindingsEditor": "Tuş Bağları Düzenleyicisi", + "preferences": "Tercihler" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json new file mode 100644 index 0000000000000..0a5d1d96e7e7d --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openGlobalSettings": "Kullanıcı Ayarlarını Aç", + "openGlobalKeybindings": "Klavye Kısayollarını Aç", + "openGlobalKeybindingsFile": "Klavye Kısayolları Dosyasını Aç", + "openWorkspaceSettings": "Çalışma Alanı Ayarlarını Aç", + "configureLanguageBasedSettings": "Dile Özel Ayarları Yapılandır...", + "languageDescriptionConfigured": "({0})", + "pickLanguage": "Dili Seç" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json new file mode 100644 index 0000000000000..be88513af744e --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "settingsEditorName": "Varsayılan Ayarlar", + "SearchSettingsWidget.AriaLabel": "Ayarları ara", + "SearchSettingsWidget.Placeholder": "Ayarları Ara", + "totalSettingsMessage": "Toplam {0} Ayar", + "noSettingsFound": "Sonuç Yok", + "oneSettingFound": "1 ayar eşleşti", + "settingsFound": "{0} ayar eşleşti", + "preferencesAriaLabel": "Varsayılan tercihler. Salt okunabilir metin editörü." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json new file mode 100644 index 0000000000000..f2791d23237f4 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "errorInvalidConfiguration": "Ayarlara yazılamıyor. Lütfen dosyadaki hataları/uyarıları düzeltin ve tekrar deneyin.", + "defaultSettingsTitle": "Varsayılan Ayarlar", + "defaultSettingsMessage": "Üzerine yazmak için ayarlarınızı dosyaya yerleştirin.", + "noSettingsFound": "Hiçbir Ayar Bulunamadı.", + "editTtile": "Düzenle", + "replaceDefaultValue": "Ayarlarda Değiştir", + "copyDefaultValue": "Ayarlara Kopyala", + "unsupportedPHPExecutablePathSetting": "Bu ayar, bir Kullanıcı Ayarı olmalıdır. PHP'yi çalışma alanı için yapılandırmak için bir PHP dosyasını açın ve durum çubuğundaki 'PHP Yolu'na tıklayın.", + "unsupportedWorkspaceSetting": "Bu ayar, bir Kullanıcı Ayarı olmalıdır." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesService.i18n.json b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesService.i18n.json new file mode 100644 index 0000000000000..edeac2f6a8efb --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesService.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFolderFirst": "Çalışma alanı ayarları oluşturmak için ilk olarak bir klasör açın", + "emptyKeybindingsHeader": "Varsayılanların üzerine yazmak için tuş bağlarınızı bu dosyaya yerleştirin", + "defaultKeybindings": "Varsayılan Tuş Bağları", + "emptySettingsHeader": "Varsayılan ayarların üzerine yazmak için ayarlarınızı bu dosyaya yerleştirin.", + "emptySettingsHeader1": "Varsayılan ayarların ve kullanıcı ayarlarının üzerine yazmak için ayarlarınızı bu dosyaya yerleştirin.", + "fail.createSettings": " '{0}' oluşturulamadı ({1})." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json new file mode 100644 index 0000000000000..1814392bc9671 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "settingsSwitcherBarAriaLabel": "Ayar Değiştirici", + "userSettings": "Kullanıcı Ayarları", + "workspaceSettings": "Çalışma Alanı Ayarları" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json b/i18n/trk/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json new file mode 100644 index 0000000000000..90483c4e7e324 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "default": "Varsayılan", + "user": "Kullanıcı", + "meta": "meta", + "option": "seçenek" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json b/i18n/trk/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json new file mode 100644 index 0000000000000..c618c0f3b1267 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "commonlyUsed": "Yaygın Olarak Kullanılan", + "noSettings": "Ayar Yok", + "defaultKeybindingsHeader": "Tuş bağları dosyanıza yerleştirerek tuş bağlarının üzerine yazın." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json b/i18n/trk/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json new file mode 100644 index 0000000000000..bef4db281adcc --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showTriggerActions": "Tüm Komutları Göster", + "clearCommandHistory": "Komut Geçmişini Temizle", + "showCommands.label": "Komut Paleti...", + "entryAriaLabelWithKey": "{0}, {1}, komutlar", + "entryAriaLabel": "{0}, komutlar", + "canNotRun": "'{0}' komutu buradan çalıştırılamıyor.", + "actionNotEnabled": "'{0}' komutu geçerli bağlamda etkin değil.", + "recentlyUsed": "yakınlarda kullanıldı", + "morecCommands": "diğer komutlar", + "commandLabel": "{0}: {1}", + "cat.title": "{0}: {1}", + "noCommandsMatching": "Eşleşen komut yok" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.i18n.json b/i18n/trk/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.i18n.json new file mode 100644 index 0000000000000..3d25665149913 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "gotoLine": "Satıra Git...", + "gotoLineLabelEmptyWithLimit": "Gitmek için 1 ile {0} arasında bir satır numarası yazın", + "gotoLineLabelEmpty": "Gidilecek satır numarasını yazın", + "gotoLineColumnLabel": "{0}. satırın {1}. karakterine git", + "gotoLineLabel": "{0} satırına git", + "gotoLineHandlerAriaLabel": "Gidilecek satır numarasını yazın.", + "cannotRunGotoLine": "Satıra gitmek için ilk olarak bir metin dosyası açın" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.i18n.json b/i18n/trk/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.i18n.json new file mode 100644 index 0000000000000..0c7d97f09c2c2 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.i18n.json @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "gotoSymbol": "Dosyada Sembole Git...", + "symbols": "semboller ({0})", + "method": "yöntemler ({0})", + "function": "fonksiyonlar ({0})", + "_constructor": "oluşturucular ({0})", + "variable": "değişkenler ({0})", + "class": "sınıflar ({0})", + "interface": "arayüzler ({0})", + "namespace": "isim uzayları ({0})", + "package": "paketler ({0})", + "modules": "modüller ({0})", + "property": "özellikler ({0})", + "enum": "numaralandırmalar ({0})", + "string": "dizeler ({0})", + "rule": "kurallar ({0})", + "file": "dosyalar ({0})", + "array": "diziler ({0})", + "number": "sayılar ({0})", + "boolean": "boole değerleri ({0})", + "object": "nesneler ({0})", + "key": "anahtarlar ({0})", + "entryAriaLabel": "{0}, semboller", + "noSymbolsMatching": "Eşleşen sembol yok", + "noSymbolsFound": "Sembol bulunamadı", + "gotoSymbolHandlerAriaLabel": "Geçerli düzenleyicideki sembolleri daraltmak için yazmaya başlayın.", + "cannotRunGotoSymbolInFile": "Dosya için sembol bilgisi yok", + "cannotRunGotoSymbol": "Sembole gitmek için ilk olarak bir metin dosyası açın" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/quickopen/browser/helpHandler.i18n.json b/i18n/trk/src/vs/workbench/parts/quickopen/browser/helpHandler.i18n.json new file mode 100644 index 0000000000000..81a2056121e20 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/quickopen/browser/helpHandler.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, seçici yardımı", + "globalCommands": "genel komutlar", + "editorCommands": "düzenleyici komutları" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.i18n.json new file mode 100644 index 0000000000000..fe14853bad620 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "commandsHandlerDescriptionDefault": "Komutları Göster ve Çalıştır", + "gotoLineDescriptionMac": "Satıra Git", + "gotoLineDescriptionWin": "Satıra Git", + "gotoSymbolDescription": "Dosyada Sembole Git", + "gotoSymbolDescriptionScoped": "Kategoriye Göre Dosyada Sembole Git", + "helpDescription": "Yardımı Göster", + "viewPickerDescription": "Görünümü Aç" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json b/i18n/trk/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json new file mode 100644 index 0000000000000..4451c9909c1b8 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, görünüm seçici", + "views": "Görünümler", + "panels": "Paneller", + "terminals": "Terminal", + "terminalTitle": "{0}: {1}", + "channels": "Çıktı", + "openView": "Görünümü Aç", + "quickOpenView": "Görünümü Hızlı Aç" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json new file mode 100644 index 0000000000000..b2990d0133204 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "relaunchSettingMessage": "Yürürlüğe girmesi için yeniden başlatma gerektiren bir ayar değişti.", + "relaunchSettingDetail": "{0} uygulamasını yeniden başlatmak ve bu ayarı etkinleştirmek için lütfen yeniden başlat butonuna basın.", + "restart": "Yeniden Başlat", + "relaunchWorkspaceMessage": "Yürürlüğe girmesi için yeniden başlatma gerektiren bir çalışma alanı klasörü eklendi veya kaldırıldı.", + "relaunchWorkspaceDetail": "Pencereyi yeniden yüklemek ve değişiklikleri etkinleştirmek için yeniden başlat butonuna basın.", + "reload": "Yeniden Yükle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/trk/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json new file mode 100644 index 0000000000000..bc11b3fbd68cd --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGutterModifiedBackground": "Değiştirilen satırlar için düzenleyici oluğu arka plan rengi.", + "editorGutterAddedBackground": "Eklenen satırlar için düzenleyici oluğu arka plan rengi.", + "editorGutterDeletedBackground": "Silinen satırlar için düzenleyici oluğu arka plan rengi." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json new file mode 100644 index 0000000000000..2fc322d2c8b84 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleGitViewlet": "Git'i Göster", + "installAdditionalSCMProviders": "Ek SCM Sağlayıcıları Yükle...", + "source control": "Kaynak Kontrolü", + "toggleSCMViewlet": "SCM'yi Göster", + "view": "Görüntüle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/scm/electron-browser/scmActivity.i18n.json b/i18n/trk/src/vs/workbench/parts/scm/electron-browser/scmActivity.i18n.json new file mode 100644 index 0000000000000..e50c48abb0e4e --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/scm/electron-browser/scmActivity.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "scmPendingChangesBadge": "{0} bekleyen değişiklik" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json b/i18n/trk/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json new file mode 100644 index 0000000000000..560a8a41990de --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "installAdditionalSCMProviders": "Ek SCM Sağlayıcıları Yükle...", + "switch provider": "SCM Sağlayıcısı Değiştir..." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json b/i18n/trk/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json new file mode 100644 index 0000000000000..cd21a41cb42be --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "commitMessage": "Mesaj (commit'lemek için {0} tuşlarına basın)", + "source control": "Kaynak Kontrolü", + "viewletTitle": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/search/browser/openAnythingHandler.i18n.json b/i18n/trk/src/vs/workbench/parts/search/browser/openAnythingHandler.i18n.json new file mode 100644 index 0000000000000..248e4e17c5b76 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/search/browser/openAnythingHandler.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileAndTypeResults": "dosya ve sembol sonuçları", + "fileResults": "dosya sonuçları" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/search/browser/openFileHandler.i18n.json b/i18n/trk/src/vs/workbench/parts/search/browser/openFileHandler.i18n.json new file mode 100644 index 0000000000000..31b328bf63982 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/search/browser/openFileHandler.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, dosya seçici", + "searchResults": "arama sonuçları" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/search/browser/openSymbolHandler.i18n.json b/i18n/trk/src/vs/workbench/parts/search/browser/openSymbolHandler.i18n.json new file mode 100644 index 0000000000000..94ab4f458240f --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/search/browser/openSymbolHandler.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, sembol seçici", + "symbols": "sembol sonuçları", + "noSymbolsMatching": "Eşleşen sembol yok", + "noSymbolsWithoutInput": "Sembolleri aramak için yazmaya başlayın" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json b/i18n/trk/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json new file mode 100644 index 0000000000000..55adfb8b09096 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultLabel": "giriş", + "patternDescription": "Glob Desenlerini Kullan", + "patternHelpInclude": "Eşleşecek kalıp. ör. tüm JavaScript dosyaları ile eşleşmek için **\\*\\*/*.js** veya bir klasör ve tüm alt elemanları ile eşleşmek için **myFolder/\\*\\***.  \n\n**Başvuru**:\n**\\*** 0 veya daha fazla karakterle eşleşir\n**?** 1 karakterle eşleşir\n**\\*\\*** sıfır veya daha fazla klasörle eşleşir\n**[a-z]** bir karakterler aralığı ile eşleşir\n**{a,b}** kalıplardan herhangi biri ile eşleşir)", + "useIgnoreFilesDescription": "Yok Sayma Dosyalarını Kullan", + "useExcludeSettingsDescription": "Hariç Tutma Ayarlarını Kullan" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/search/browser/replaceService.i18n.json b/i18n/trk/src/vs/workbench/parts/search/browser/replaceService.i18n.json new file mode 100644 index 0000000000000..279186adb7139 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/search/browser/replaceService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileReplaceChanges": "{0} ↔ {1} (Değiştirme Önizlemesi)" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/search/browser/search.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/search/browser/search.contribution.i18n.json new file mode 100644 index 0000000000000..31355023a7690 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/search/browser/search.contribution.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showTriggerActions": "Çalışma Alanında Sembole Git...", + "name": "Ara", + "showSearchViewlet": "Aramayı Göster", + "view": "Görüntüle", + "findInFiles": "Dosyalarda Bul", + "openAnythingHandlerDescription": "Dosyaya Git", + "openSymbolDescriptionNormal": "Çalışma Alanında Sembole Git", + "searchOutputChannelTitle": "Ara", + "searchConfigurationTitle": "Ara", + "exclude": "Aramalarda dosyaları ve klasörleri hariç tutmak için glob desenlerini yapılandırın. files.exclude ayarından, tüm glob desenlerini devralır.", + "exclude.boolean": "Dosya yollarının eşleştirileceği glob deseni. Deseni etkinleştirmek veya devre dışı bırakmak için true veya false olarak ayarlayın.", + "exclude.when": "Eşleşen bir dosyanın eşdüzey dosyalarında ek denetim. Eşleşen dosya adı için değişken olarak $(basename) kullanın.", + "useRipgrep": "Metin aramasında Ripgrep kullanılıp kullanılmayacağını denetler", + "useIgnoreFilesByDefault": "Yeni bir çalışma alanında arama yaparken .gitignore ve .ignore dosyalarının varsayılan olarak kullanılıp kullanılmayacağını denetler.", + "search.quickOpen.includeSymbols": "Dosya sonuçlarındaki bir global sembol aramasının sonuçlarının Hızlı Aç'a dahil edilip edilmeyeceğini yapılandırın." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/search/browser/searchActions.i18n.json b/i18n/trk/src/vs/workbench/parts/search/browser/searchActions.i18n.json new file mode 100644 index 0000000000000..8b542968177b3 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/search/browser/searchActions.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "nextSearchTerm": "Sonraki Arama Terimini Göster", + "previousSearchTerm": "Önceki Arama Terimini Göster", + "focusNextInputBox": "Sonraki Girdi Kutusuna Odakla", + "focusPreviousInputBox": "Önceki Girdi Kutusuna Odakla", + "replaceInFiles": "Dosyalardakileri Değiştir", + "findInFolder": "Klasörde Bul", + "RefreshAction.label": "Yenile", + "ClearSearchResultsAction.label": "Arama Sonuçlarını Temizle", + "FocusNextSearchResult.label": "Sonraki Arama Sonucuna Odakla", + "FocusPreviousSearchResult.label": "Önceki Arama Sonucuna Odakla", + "RemoveAction.label": "Kaldır", + "file.replaceAll.label": "Tümünü Değiştir", + "match.replace.label": "Değiştir", + "ConfigureGlobalExclusionsAction.label": "Ayarları Aç" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/trk/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json new file mode 100644 index 0000000000000..f94aa8eb8739a --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "searchMatches": "{0} eşleşme bulundu", + "searchMatch": "{0} eşleşme bulundu", + "fileMatchAriaLabel": "{2} klasöründeki {1} dosyasında {0} eşleşme, Arama sonucu", + "replacePreviewResultAria": "{3} metinli satırdaki {2}. sütunda {1} ile arama terimi {0}", + "searchResultAria": "{2} metinli satırdaki {1}. sütunda terim {0} bulundu" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/search/browser/searchViewlet.i18n.json b/i18n/trk/src/vs/workbench/parts/search/browser/searchViewlet.i18n.json new file mode 100644 index 0000000000000..a2fb1ccddfd5f --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/search/browser/searchViewlet.i18n.json @@ -0,0 +1,50 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "moreSearch": "Arama Detaylarını Aç/Kapat", + "searchScope.includes": "dahil edilecek dosyalar", + "label.includes": "Aramaya Dahil Edilen Kalıplar", + "searchScope.excludes": "hariç tutulacak klasörler", + "label.excludes": "Aramada Hariç Tutulan Kalıplar", + "global.searchScope.folders": "ayarlar ile hariç tutulan dosyalar", + "label.global.excludes": "Yapılandırılmış Aramada Hariç Tutulan Kalıplar", + "replaceAll.confirmation.title": "Tümünü Değiştir", + "replaceAll.confirm.button": "Değiştir", + "replaceAll.occurrence.file.message": "{1} dosyadaki {0} tekrarlama '{2}' ile değiştirildi.", + "removeAll.occurrence.file.message": "{1} dosyadaki {0} tekrarlama değiştirildi.", + "replaceAll.occurrence.files.message": "{1} dosyadaki {0} tekrarlama '{2}' ile değiştirildi.", + "removeAll.occurrence.files.message": "{1} dosyadaki {0} tekrarlama değiştirildi.", + "replaceAll.occurrences.file.message": "{1} dosyadaki {0} tekrarlama '{2}' ile değiştirildi.", + "removeAll.occurrences.file.message": "{1} dosyadaki {0} tekrarlama değiştirildi.", + "replaceAll.occurrences.files.message": "{1} dosyadaki {0} tekrarlama '{2}' ile değiştirildi.", + "removeAll.occurrences.files.message": "{1} dosyadaki {0} tekrarlama değiştirildi.", + "removeAll.occurrence.file.confirmation.message": "{1} dosyadaki {0} tekralama '{2}' ile değiştirilsin mi?", + "replaceAll.occurrence.file.confirmation.message": "{1} dosyadaki {0} tekrarlama değiştirilsin mi?", + "removeAll.occurrence.files.confirmation.message": "{1} dosyadaki {0} tekralama '{2}' ile değiştirilsin mi?", + "replaceAll.occurrence.files.confirmation.message": "{1} dosyadaki {0} tekrarlama değiştirilsin mi?", + "removeAll.occurrences.file.confirmation.message": "{1} dosyadaki {0} tekralama '{2}' ile değiştirilsin mi?", + "replaceAll.occurrences.file.confirmation.message": "{1} dosyadaki {0} tekrarlama değiştirilsin mi?", + "removeAll.occurrences.files.confirmation.message": "{1} dosyadaki {0} tekralama '{2}' ile değiştirilsin mi?", + "replaceAll.occurrences.files.confirmation.message": "{1} dosyadaki {0} tekrarlama değiştirilsin mi?", + "treeAriaLabel": "Arama Sonuçları", + "globLabel": "{1} olduğunda {0}", + "searchMaxResultsWarning": "Sonuç kümesi yalnızca tüm eşleşmelerin bir alt kümesini içerir. Lütfen sonuçları daraltmak için aramanızda daha fazla ayrıntı belirtin.", + "searchCanceled": "Arama, hiçbir sonuç bulunamadan iptal edildi - ", + "noResultsIncludesExcludes": "'{0}' içinde '{1}' hariç tutularak sonuç bulunamadı - ", + "noResultsIncludes": "'{0}' içinde sonuç bulunamadı - ", + "noResultsExcludes": "'{0}' hariç tutularak sonuç bulunamadı - ", + "noResultsFound": "Sonuç bulunamadı. Yapılandırılan hariç tutmalar için ayarlarınızı gözden geçirin - ", + "rerunSearch.message": "Yeniden ara", + "rerunSearchInAll.message": "Tüm dosyalarda yeniden ara", + "openSettings.message": "Ayarları Aç", + "ariaSearchResultsStatus": "Arama ile {1} dosyada {0} sonuç bulundu", + "search.file.result": "{1} dosyada {0} sonuç", + "search.files.result": "{1} dosyada {0} sonuç", + "search.file.results": "{1} dosyada {0} sonuç", + "search.files.results": "{1} dosyada {0} sonuç", + "searchWithoutFolder": "Henüz bir klasör açmadınız. Şu an sadece açık dosyalar aranıyor - ", + "openFolder": "Klasör Aç" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/search/browser/searchWidget.i18n.json b/i18n/trk/src/vs/workbench/parts/search/browser/searchWidget.i18n.json new file mode 100644 index 0000000000000..ed5a49ea8eafc --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/search/browser/searchWidget.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "search.action.replaceAll.disabled.label": "Tümünü Değiştir (Etkinleştirmek İçin Aramayı Gönderin)", + "search.action.replaceAll.enabled.label": "Tümünü Değiştir", + "search.replace.toggle.button.title": "Değiştirmeyi Aç/Kapat", + "label.Search": "Ara: Arama Terimi girin ve aramak için Enter'a, iptal etmek için Escape tuşuna basın", + "search.placeHolder": "Ara", + "label.Replace": "Değiştir: Değiştirme terimini girin ve önizlemek için Enter'a, iptal etmek için Escape tuşuna basın", + "search.replace.placeHolder": "Değiştir", + "regexp.validationFailure": "İfade her öğe ile eşleşiyor" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json b/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json new file mode 100644 index 0000000000000..07bddc32f480d --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.snippets": "Parçacıklara ekleme yapar.", + "vscode.extension.contributes.snippets-language": "Bu parçacığın ekleneceği dilin tanımlayıcısı.", + "vscode.extension.contributes.snippets-path": "Parçacıklar dosyasının yolu. Yol, eklenti klasörüne görecelidir ve genellikle './snippets/' ile başlar.", + "invalid.language": "`contributes.{0}.language` ögesinde bilinmeyen dil. Sağlanan değer: {1}", + "invalid.path.0": "`contributes.{0}.path` ögesinde dize bekleniyor. Sağlanan değer: {1}", + "invalid.path.1": "`contributes.{0}.path` ögesinin ({1}) eklentinin klasöründe ({2}) yer alması bekleniyor. Bu, eklentiyi taşınamaz yapabilir.", + "badVariableUse": "\"{0}\"-parçacığı yüksek olasılıkla parçacık değişkenleri ile parçacık yer tutucularını karıştırıyor. Daha fazla bilgi için https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax adresini ziyaret edin." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/insertSnippet.i18n.json b/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/insertSnippet.i18n.json new file mode 100644 index 0000000000000..c8734bde48f3d --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/insertSnippet.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "snippet.suggestions.label": "Parçacık Ekle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json new file mode 100644 index 0000000000000..757de65d2f29f --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openSnippet.label": "Kullanıcı Parçacıklarını Aç", + "openSnippet.pickLanguage": "Parçacık için Dil seçin", + "openSnippet.errorOnCreate": "{0} oluşturulamadı", + "preferences": "Tercihler", + "snippetSchema.json.default": "Boş parçacık", + "snippetSchema.json": "Kullanıcı parçacığı yapılandırması", + "snippetSchema.json.prefix": "Parçacığı IntelliSense'de seçerken kullanılacak ön ek", + "snippetSchema.json.body": "Parçacık içeriği. İmleç konumlarını tanımlamak için '$1', '${1:varsayilanMetin}' kullanın, en son imleç konumu için '$0' kullanın. Değişken değerlerini '${degiskenAdi}' ve '${degiskenAdi:varsayilanMetin}' ile ekleyin, ör. 'Bu bir dosyadır: $TM_FILENAME'.", + "snippetSchema.json.description": "Parçacık açıklaması." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json b/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json new file mode 100644 index 0000000000000..67496ec0c542f --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "detail.userSnippet": "Kullanıcı Parçacığı", + "snippetSuggest.longLabel": "{0}, {1}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/tabCompletion.i18n.json b/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/tabCompletion.i18n.json new file mode 100644 index 0000000000000..534c795a83666 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/tabCompletion.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tabCompletion": "Ön ekleri eşleştiğinde parçacıkları ekleyin. 'quickSuggestions' etkinleştirilmediği zaman en iyi şekilde çalışır." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json new file mode 100644 index 0000000000000..e284a5a8da804 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "helpUs": "{0} için hizmetimizi iyileştirmemize yardımcı olun", + "takeShortSurvey": "Kısa Ankete Katıl", + "remindLater": "Daha Sonra Hatırlat", + "neverAgain": "Tekrar Gösterme" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..821add9841da1 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "Hızlı bir geri bildirim anketine katılmak ister misiniz?", + "takeSurvey": "Ankete Katıl", + "remindLater": "Daha Sonra Hatırlat", + "neverAgain": "Tekrar Gösterme" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json new file mode 100644 index 0000000000000..6d47af97b304c --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Bir derleme görevinin adını girin", + "noTasksMatching": "Eşleşen görev yok", + "noTasksFound": "Derleme görevi bulunamadı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json new file mode 100644 index 0000000000000..7056601c01ba9 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, görevler", + "recentlyUsed": "yakınlarda kullanılan görevler", + "configured": "yapılandırılmış görevler", + "detected": "algılanan görevler", + "customizeTask": "Görevi Yapılandır" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json new file mode 100644 index 0000000000000..d0d2568cfbd5d --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Yeniden başlatılacak görevin adını girin", + "noTasksMatching": "Eşleşen görev yok", + "noTasksFound": "Yeniden başlatılacak bir görev bulunamadı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json new file mode 100644 index 0000000000000..3e235cd503a4c --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Çalıştırılacak görevin adını girin", + "noTasksMatching": "Eşleşen görev yok", + "noTasksFound": "Görev bulunamadı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.i18n.json new file mode 100644 index 0000000000000..94241e9174129 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Sonlandırılacak görevin adını girin", + "noTasksMatching": "Eşleşen görev yok", + "noTasksFound": "Sonlandırılacak bir görev bulunamadı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json new file mode 100644 index 0000000000000..a68d96b3def09 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Bir test görevinin adını girin", + "noTasksMatching": "Eşleşen görev yok", + "noTasksFound": "Test görevi bulunamadı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json new file mode 100644 index 0000000000000..204c5be86e6ff --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ConfigurationParser.invalidCWD": "Uyarı: options.cwd dize türünde olmalıdır. {0} değeri yok sayıldı.\n", + "ConfigurationParser.noargs": "Hata: komut argümanları dizelerden oluşan bir dizi olmalıdır. Belirtilen değer:\n{0}", + "ConfigurationParser.noShell": "Uyarı: kabuk yapılandırması sadece görevler terminalde çalıştırılırken desteklenir.", + "ConfigurationParser.noName": "Hata: Kapsam bildiriminde Sorun Eşleştirici'nin bir adı olmalıdır:\n{0}\n", + "ConfigurationParser.unknownMatcherKind": "Uyarı: tanımlanan sorun eşleştirici bilinmiyor. Desteklenen türler: dize | ProblemMatcher | (dize | ProblemMatcher)[].\n{0}\n", + "ConfigurationParser.invalidVaraibleReference": "Hata: Geçersiz problemMatcher başvusu: {0}\n", + "ConfigurationParser.noTaskName": "Hata: görevler bir taskName özelliği belirtmelidir. Görev yok sayılacaktır.\n{0}\n", + "taskConfiguration.shellArgs": "Uyarı: '{0}' görevi bir kabuk komutudur ve komut adı veya argümanlarından biri kaçış karakteri içermeyen boşluklar içeriyor. Doğru komut satırı alıntılamasını sağlamak için lütfen argümanları komutlarla birleştirin.", + "taskConfiguration.noCommandOrDependsOn": "Hata: '{0}' görevi bir komut veya dependsOn özelliği belirtmiyor. Görev yok sayılacaktır. Görevin tanımı:\n{1}", + "taskConfiguration.noCommand": "Hata: '{0}' görevi bir komut tanımlamıyor. Görev yok sayılacaktır. Görevin tanımı:\n{1}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json new file mode 100644 index 0000000000000..7ed1ecad8aa00 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TaskDefinition.description": "Gerçek görev türü", + "TaskDefinition.properties": "Görev türünün ek özellikleri", + "TaskTypeConfiguration.noType": "Görev türü yapılandırmasında gerekli olan 'taskType' özelliği eksik", + "TaskDefinitionExtPoint": "Görev türlerine ekleme yapar" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json new file mode 100644 index 0000000000000..511b5d0e90a29 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "dotnetCore": ".NET Core derleme komutu çalıştırır", + "msbuild": "Derleme hedefini çalıştırır", + "externalCommand": "İsteğe bağlı bir harici komut çalıştırma örneği", + "Maven": "Yaygın maven komutlarını çalıştırır" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/common/taskTypeRegistry.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json new file mode 100644 index 0000000000000..80d6497ef8807 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "JsonSchema.options": "Ek komut seçenekleri", + "JsonSchema.options.cwd": "Çalıştırılan program veya betiğin geçerli çalışma klasörü. Atlanırsa Code'un geçerli çalışma alanının kök dizini kullanılır.", + "JsonSchema.options.env": "Çalıştırılan program veya kabuğun ortamı. Atlanırsa üst işlemin ortamı kullanılır.", + "JsonSchema.shellConfiguration": "Kullanılacak kabuğu özelleştirir.", + "JsonSchema.shell.executable": "Kullanılacak kabuk.", + "JsonSchema.shell.args": "Kabuk argümanları.", + "JsonSchema.command": "Çalıştırılacak komut. Harici bir program veya bir kabuk komutu olabilir.", + "JsonSchema.tasks.args": "Bu görev çağrıldığında, komuta iletilecek argümanlar.", + "JsonSchema.tasks.taskName": "Görevin adı", + "JsonSchema.tasks.windows": "Windows'a özel komut yapılandırması", + "JsonSchema.tasks.mac": "Mac'e özel komut yapılandırması", + "JsonSchema.tasks.linux": "Linux'a özel komut yapılandırması", + "JsonSchema.tasks.suppressTaskName": "Görev adının komuta argüman olarak eklenip eklenmeyeceğini denetler. Atlanırsa global olarak tanımlanan değer kullanılır.", + "JsonSchema.tasks.showOutput": "Çalışan görev çıktısının görünüp görünmeyeceğini denetler. Atlanırsa global olarak tanımlanan değer kullanılır.", + "JsonSchema.echoCommand": "Çalıştırılan komutun çıktıya yazdırılıp yazdırılmayacağını denetler. Varsayılan olarak kapalıdır.", + "JsonSchema.tasks.watching.deprecation": "Kullanım dışı. Bunun yerine isBackground ögesini kullanın.", + "JsonSchema.tasks.watching": "Çalıştırılan görevin etkin tutulup tutulmadığı ve dosya sistemini izleyip izlemediği.", + "JsonSchema.tasks.background": "Çalıştırılan görevin etkin tutulup tutulmadığı ve arka planda çalışıp çalışmadığı.", + "JsonSchema.tasks.promptOnClose": "VS Code'un çalışan bir görevle kapatılırken kullanıcının uyarılıp uyarılmayacağı.", + "JsonSchema.tasks.build": "Bu görevi, Code'un varsayılan derleme komutuna eşler.", + "JsonSchema.tasks.test": "Bu görevi, Code'un varsayılan test komutuna eşler.", + "JsonSchema.tasks.matchers": "Kullanılacak problem eşleştirici(leri). Bir dize veya bir problem eşleştirici tanımı veya bir dize ve problem eşleştiricileri dizisi.", + "JsonSchema.args": "Komuta iletilecek ek argümanlar.", + "JsonSchema.showOutput": "Çalışan görev çıktısının görünüp görünmeyeceğini denetler. Atlanırsa \"daima\" olarak varsayılır.", + "JsonSchema.watching.deprecation": "Kullanım dışı. Bunun yerine isBackground ögesini kullanın.", + "JsonSchema.watching": "Çalıştırılan görevin etkin tutulup tutulmadığı ve dosya sistemini izleyip izlemediği.", + "JsonSchema.background": "Çalıştırılan görevin etkin tutulup tutulmadığı ve arka planda çalışıp çalışmadığı.", + "JsonSchema.promptOnClose": "VS Code'un arka planda çalışan bir görevle kapatılırken kullanıcının uyarılıp uyarılmayacağı.", + "JsonSchema.suppressTaskName": "Görev adının komuta argüman olarak eklenip eklenmeyeceğini denetler. Varsayılan olarak kapalıdır.", + "JsonSchema.taskSelector": "Bir argümanın, görev olduğunu gösterecek ön ek.", + "JsonSchema.matchers": "Kullanılacak problem eşleştirici(leri). Bir dize veya bir problem eşleştirici tanımı veya bir dize ve problem eşleştiricileri dizisi.", + "JsonSchema.tasks": "Görev yapılandırmaları. Genellikle harici görev çalıştırıcısında tanımlı görevin zenginleştirilmesidir." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json new file mode 100644 index 0000000000000..8717a0ca787ef --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "JsonSchema.version": "Yapılandırmanın sürüm numarası.", + "JsonSchema._runner": "\"runner\" görevini tamamladı. Resmi runner özelliğini kullanın", + "JsonSchema.runner": "Görevin bir işlem olarak çalıştırılıp çalıştırılmayacağını ve çıktının, çıktı penceresinde veya terminalin içinde gösterilip gösterilmeyeceğini denetler.", + "JsonSchema.windows": "Windows'a özel komut yapılandırması", + "JsonSchema.mac": "Mac'e özel komut yapılandırması", + "JsonSchema.linux": "Linux'a özel komut yapılandırması", + "JsonSchema.shell": "Komutun bir kabuk komutu veya harici bir program olup olmadığını belirtir. Atlanırsa hayır olarak kabul edilir." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json new file mode 100644 index 0000000000000..2a2b8f5a6c52c --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "JsonSchema.shell": "Komutun bir kabuk komutu veya harici bir program olup olmadığını belirtir. Atlanırsa hayır olarak kabul edilir.", + "JsonSchema.tasks.isShellCommand.deprecated": "isShellCommand özelliği kullanım dışıdır. Bunun yerine görevin 'type' özelliğini ve 'options' özelliğindeki 'shell' özelliğini kullanın. Ayrıca 1.14 sürüm notlarına bakın.", + "JsonSchema.tasks.dependsOn.string": "Bu görevin bağlı olduğu başka bir görev.", + "JsonSchema.tasks.dependsOn.array": "Bu görevin bağlı olduğu diğer görevler.", + "JsonSchema.tasks.presentation": "Görevin çıktısını gösterip, girdisini okumak için kullanılacak paneli yapılandırır.", + "JsonSchema.tasks.presentation.echo": "Çalıştırılan komutun panele yazdırılıp yazdırılmayacağını denetler. Varsayılan olarak açıktır.", + "JsonSchema.tasks.presentation.focus": "Panelin, kendisine odaklanmaya izin verip vermeyeceğini denetler. Varsayılan olarak kapalıdır. Eğer \"true\" olarak ayarlanırsa panel de açığa çıkar.", + "JsonSchema.tasks.presentation.reveals": "Panelin çalıştırdığı görevin ortaya çıkarılıp çıkarılmayacağını denetler. Varsayılan \"always\"tir.", + "JsonSchema.tasks.presentation.instance": "Panelin görevler arasında paylaşılacağı mı, bu göreve mi tahsis edileceği yoksa her çalıştırmada yeni bir panel mi oluşturulacağını denetler.", + "JsonSchema.tasks.terminal": "'terminal' özelliği kullanım dışıdır. Bunun yerine 'presentation' özelliğini kullanın.", + "JsonSchema.tasks.group.kind": "Görevin yürütme grubu.", + "JsonSchema.tasks.group.isDefault": "Bu görevin, gruptaki varsayılan görev olup olmadığını tanımlar.", + "JsonSchema.tasks.group.defaultBuild": "Bu görevi varsayılan derleme görevi olarak işaretler.", + "JsonSchema.tasks.group.defaultTest": "Bu görevi varsayılan test görevi olarak işaretler.", + "JsonSchema.tasks.group.build": "Görevleri 'Derleme Görevini Çalıştır' komutu ile ulaşılabilecek şekilde bir derleme görevi olarak işaretler.", + "JsonSchema.tasks.group.test": "Görevleri 'Test Görevini Çalıştır' komutu ile ulaşılabilecek şekilde bir test görevi olarak işaretler.", + "JsonSchema.tasks.group.none": "Görevi grupsuz olarak atar", + "JsonSchema.tasks.group": "Bu görevin ait olduğu çalıştırma grubunu tanımlar. Derleme grubuna eklemek için \"build\"ı ve test grubuna eklemek için \"test\"i destekler.", + "JsonSchema.tasks.type": "Görevin bir işlem olarak veya bir kabukta komut olarak çalıştırılıp çalıştırılmayacağını tanımlar. Varsayılan işlem olarak çalıştırmaktır.", + "JsonSchema.version": "Yapılandırmanın sürüm numarası.", + "JsonSchema.tasks.identifier": "launch.json veya dependsOn maddesindeki göreve atıfta başvuracak, kullanıcı tanımlı bir tanımlayıcı.", + "JsonSchema.tasks.taskLabel": "Görevin etiketi", + "JsonSchema.tasks.taskName": "Görevin adı", + "JsonSchema.tasks.taskName.deprecated": "Görevin 'name' özelliği kullanım dışıdır. Bunun yerine label özelliğini kullanın.", + "JsonSchema.tasks.background": "Çalıştırılan görevin etkin tutulup tutulmadığı ve arka planda çalışıp çalışmadığı.", + "JsonSchema.tasks.promptOnClose": "VS Code'un çalışan bir görevle kapatılırken kullanıcının uyarılıp uyarılmayacağı.", + "JsonSchema.tasks.matchers": "Kullanılacak problem eşleştirici(leri). Bir dize veya bir problem eşleştirici tanımı veya bir dize ve problem eşleştiricileri dizisi.", + "JsonSchema.customizations.customizes.type": "Özelleştirilecek görev türü", + "JsonSchema.tasks.customize.deprecated": "customize özelliği kullanım dışıdır. Yeni görev özelleştirme yaklaşımına nasıl geçiş yapılacağı için 1.14 sürüm notlarına bakın", + "JsonSchema.tasks.showOputput.deprecated": "showOutput özelliği kullanım dışıdır. Bunun yerine presentation özelliğinin içindeki reveal özelliğini kullanın. Ayrıca 1.14 sürüm notlarına bakın.", + "JsonSchema.tasks.echoCommand.deprecated": "'echoCommand' özelliği kullanım dışıdır. Bunun yerine 'presentation' özelliğinin içindeki 'echo' özelliğini kullanın. Ayrıca 1.14 sürüm notlarına bakın.", + "JsonSchema.tasks.isBuildCommand.deprecated": "'isBuildCommand' özelliği kullanım dışıdır. Bunun yerine 'group' özelliğini kullanın. Ayrıca 1.14 sürüm notlarına bakın.", + "JsonSchema.tasks.isTestCommand.deprecated": "'isTestCommand' özelliği kullanım dışıdır. Bunun yerine 'group' özelliğini kullanın. Ayrıca 1.14 sürüm notlarına bakın.", + "JsonSchema.windows": "Windows'a özel komut yapılandırması", + "JsonSchema.mac": "Mac'e özel komut yapılandırması", + "JsonSchema.linux": "Linux'a özel komut yapılandırması" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json new file mode 100644 index 0000000000000..a2c1f28938c10 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -0,0 +1,73 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksCategory": "Görevler", + "ConfigureTaskRunnerAction.noWorkspace": "Görevler, sadece çalışma alanı klasöründe mevcuttur.", + "ConfigureTaskRunnerAction.quickPick.template": "Bir Görev Çalıştırıcısı Seç", + "ConfigureTaskRunnerAction.autoDetecting": "{0} görevleri otomatik algılanıyor", + "ConfigureTaskRunnerAction.autoDetect": "Görev sisteminin otomatik algılanması başarısız oldu. Varsayılan şablon kullanılıyor. Ayrıntılar için görev çıktısına bakın.", + "ConfigureTaskRunnerAction.autoDetectError": "Görev sisteminin otomatik algılanması sırasında hatalar oluştu. Ayrıntılar için görev çıktısına bakın.", + "ConfigureTaskRunnerAction.failed": " '.vscode' klasörü içinde 'tasks.json' dosyası oluşturulamıyor. Ayrıntılar için görev çıktısına bakın.", + "ConfigureTaskRunnerAction.label": "Görev Çalıştırıcısını Yapılandır", + "ConfigureBuildTaskAction.label": "Derleme Görevini Yapılandır", + "CloseMessageAction.label": "Kapat", + "ShowTerminalAction.label": "Terminali Görüntüle", + "problems": "Sorunlar", + "manyMarkers": "99+", + "tasks": "Görevler", + "TaskSystem.noHotSwap": "Görev yürütme motorunu değiştirmek VS Code'u yeniden başlatmayı gerektirir. Değişiklik yok sayıldı.", + "TaskService.noBuildTask1": "Derleme görevi tanımlanmamış. tasks.json dosyasındaki bir görevi 'isBuildCommand' ile işaretleyin.", + "TaskService.noBuildTask2": "Derleme görevi tanımlanmamış. tasks.json dosyasındaki bir görevi, bir 'build' grubu olarak işaretleyin.", + "TaskService.noTestTask1": "Test görevi tanımlanmamış. tasks.json dosyasındaki bir testi 'isTestCommand' ile işaretleyin.", + "TaskService.noTestTask2": "Test görevi tanımlanmamış. tasks.json dosyasındaki bir görevi, bir 'test' grubu olarak işaretleyin.", + "TaskServer.noTask": " Çalıştırılmak istenen {0} görevi bulunamadı.", + "TaskService.attachProblemMatcher.continueWithout": "Derleme çıktısını taramadan devam et", + "TaskService.attachProblemMatcher.never": "Hiçbir zaman derleme çıktısını tarama", + "TaskService.attachProblemMatcher.learnMoreAbout": "Derleme çıktısını tarama hakkında daha fazla bilgi edin", + "selectProblemMatcher": "Derleme çıktısında taranacak hata ve uyarı türlerini seçin", + "customizeParseErrors": "Geçerli görev yapılandırmasında hatalar var. Lütfen, bir görevi özelleştirmeden önce ilk olarak hataları düzeltin.", + "moreThanOneBuildTask": "tasks.json dosyasında tanımlı çok fazla derleme görevi var. İlk görev çalıştırılıyor.", + "TaskSystem.activeSame.background": "Görev zaten aktif ve arka plan modunda. Görevi sonlandırmak için `F1 > görevi sonlandır`ı kullanın", + "TaskSystem.activeSame.noBackground": "Görev zaten aktif. Görevi sonlandırmak için `F1 > görevi sonlandır`ı kullanın", + "TaskSystem.active": "Çalışan bir görev zaten var. Bir başkasını çalıştırmadan önce bu görevi sonlandırın.", + "TaskSystem.restartFailed": "{0} görevini sonlandırma ve yeniden başlatma başarısız oldu", + "TaskSystem.configurationErrors": "Hata: belirtilen görev yapılandırmasında doğrulama hataları var ve kullanılamıyor. Lütfen ilk olarak hataları düzeltin.", + "TaskSystem.invalidTaskJson": "Hata: tasks.json dosyasının içeriğinde sentaks hataları var. Lütfen, bir görevi çalıştırmadan önce hataları düzeltin.\n", + "TaskSystem.runningTask": "Çalışan bir görev var. Bu görevi sonlandırmak istiyor musunuz?", + "TaskSystem.terminateTask": "&&Görevi Sonlandır", + "TaskSystem.noProcess": "Başlatılan görev artık mevcut değil. Eğer görev arka plan işlemleri oluşturduysa, VS Code'dan çıkmak işlemlerin sahipsiz kalmasına neden olabilir. Bunu önlemek için son arka plan işlemini bekle işaretçisiyle başlatın.", + "TaskSystem.exitAnyways": "Yine de &&Çık", + "TerminateAction.label": "Görevi Sonlandır", + "TaskSystem.unknownError": "Bir görev çalıştırılırken hata oluştu. Detaylar için görev günlüğüne bakın.", + "TaskService.noWorkspace": "Görevler, sadece çalışma alanı klasöründe mevcuttur.", + "recentlyUsed": "yakınlarda kullanılan görevler", + "configured": "yapılandırılmış görevler", + "detected": "algılanan görevler", + "TaskService.fetchingBuildTasks": "Derleme görevleri alınıyor...", + "TaskService.noBuildTaskTerminal": "Derleme görevi bulunamadı. Yeni bir tane tanımlamak için 'Derleme Görevini Yapılandır'a basın.", + "TaskService.pickBuildTask": "Çalıştırılacak derleme görevini seçin", + "TaskService.fetchingTestTasks": "Test görevleri alınıyor...", + "TaskService.noTestTaskTerminal": "Test görevi bulunamadı. Yeni bir tane tanımlamak için 'Görev Çalıştırıcısını Yapılandır'a basın.", + "TaskService.pickTestTask": "Çalıştırılacak test görevini seçin", + "TaskService.noTaskRunning": "Şu an çalışan bir görev yok.", + "TaskService.tastToTerminate": "Sonlandırılacak görevi seçin", + "TerminateAction.noProcess": "Başlatılan işlem artık mevcut değil. Eğer görev arka plan görevleri oluşturduysa, VS Code'dan çıkmak işlemlerin sahipsiz kalmasına neden olabilir.", + "TerminateAction.failed": "Çalışan görevi sonlandırma başarısız oldu.", + "TaskService.noTaskToRestart": "Yeniden başlatılacak bir görev yok.", + "TaskService.tastToRestart": "Yeniden başlatılacak görevi seçin", + "TaskService.defaultBuildTaskExists": "{0} zaten varsayılan derleme görevi olarak işaretlenmiş.", + "TaskService.pickDefaultBuildTask": "Varsayılan derleme görevi olarak kullanılacak görevi seçin", + "TaskService.defaultTestTaskExists": "{0} zaten varsayılan test görevi olarak işaretlenmiş.", + "TaskService.pickDefaultTestTask": "Varsayılan test görevi olarak kullanılacak görevi seçin", + "ShowLogAction.label": "Görev Günlüğünü Göster", + "RunTaskAction.label": "Görevi Çalıştır", + "RestartTaskAction.label": "Çalışan Görevi Yeniden Başlat", + "BuildAction.label": "Derleme Görevini Çalıştır", + "TestAction.label": "Test Görevini Çalıştır", + "ConfigureDefaultBuildTask.label": "Varsayılan Derleme Görevini Yapılandır", + "ConfigureDefaultTestTask.label": "Varsayılan Test Görevini Yapılandır", + "quickOpen.task": "Görevi Çalıştır" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json new file mode 100644 index 0000000000000..d3492257f35b4 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TerminalTaskSystem.unknownError": "Görev çalıştırılırken bir hata oluştu. Detaylar için görev çıktısı günlüğüne bakın.", + "TerminalTaskSystem.terminalName": "Görev - {0}", + "reuseTerminal": "Terminal görevler tarafından tekrar kullanılacak, kapatmak için herhangi bir tuşa basın.", + "TerminalTaskSystem": "UNC sürücüsünde kabuk komutu yürütülemez.", + "unkownProblemMatcher": "{0} sorun eşleştirici çözümlenemiyor. Eşleştirici yok sayılacaktır." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/node/processRunnerDetector.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/node/processRunnerDetector.i18n.json new file mode 100644 index 0000000000000..bd7194ed6ee5b --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/node/processRunnerDetector.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TaskSystemDetector.noGulpTasks": "gulp --tasks-simple komutu çalıştırıldığında herhangi bir görev listelemedi. npm install komutunu çalıştırdınız mı?", + "TaskSystemDetector.noJakeTasks": "jake --tasks komutu çalıştırıldığında herhangi bir görev listelemedi. npm install komutunu çalıştırdınız mı?", + "TaskSystemDetector.noGulpProgram": "Gulp, sisteminizde yüklü değil. Yüklemek için npm install -g gulp komutunu çalıştırın.", + "TaskSystemDetector.noJakeProgram": "Jake, sisteminizde yüklü değil. Yüklemek için npm install -g jake komutunu çalıştırın.", + "TaskSystemDetector.noGruntProgram": "Grunt, sisteminizde yüklü değil. Yüklemek için npm install -g grunt komutunu çalıştırın.", + "TaskSystemDetector.noProgram": "{0} programı bulunamadı. Mesaj: {1}", + "TaskSystemDetector.buildTaskDetected": "'{0}' olarak adlandırılmış derleme görevi algılandı.", + "TaskSystemDetector.testTaskDetected": "'{0}' olarak adlandırılmış test görevi algılandı." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json new file mode 100644 index 0000000000000..f5da8b2c7db02 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TaskRunnerSystem.unknownError": "Görev çalıştırılırken bir hata oluştu. Detaylar için görev çıktısı günlüğüne bakın.", + "TaskRunnerSystem.watchingBuildTaskFinished": "\nDerleme görevlerinin izlenmesi bitti.", + "TaskRunnerSystem.childProcessError": "Harici program {0} {1} başlatılamadı.", + "TaskRunnerSystem.cancelRequested": "\n'{0}' görevi kullanıcı isteği üzerine sonlandırıldı.", + "unkownProblemMatcher": "{0} sorun eşleştirici çözümlenemiyor. Eşleştirici yok sayılacaktır." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json new file mode 100644 index 0000000000000..0c8941a88db58 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/node/taskConfiguration.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ConfigurationParser.invalidCWD": "Uyarı: options.cwd dize türünde olmalıdır. {0} değeri yok sayıldı.\n", + "ConfigurationParser.noargs": "Hata: komut argümanları dizelerden oluşan bir dizi olmalıdır. Belirtilen değer:\n{0}", + "ConfigurationParser.noShell": "Uyarı: kabuk yapılandırması sadece görevler terminalde çalıştırılırken desteklenir.", + "ConfigurationParser.noName": "Hata: Kapsam bildiriminde Sorun Eşleştirici'nin bir adı olmalıdır:\n{0}\n", + "ConfigurationParser.unknownMatcherKind": "Uyarı: tanımlanan sorun eşleştirici bilinmiyor. Desteklenen türler: dize | ProblemMatcher | (dize | ProblemMatcher)[].\n{0}\n", + "ConfigurationParser.invalidVaraibleReference": "Hata: Geçersiz problemMatcher başvusu: {0}\n", + "ConfigurationParser.noTaskType": "Hata: 'tasks' yapılandırması bir 'type' özelliğine sahip olmalıdır. Yapılandırma yok sayılacaktır.\n{0}\n", + "ConfigurationParser.notCustom": "Hata: 'tasks' bir özel görev olarak tanımlanmamış. Yapılandırma yok sayılacaktır.\n{0}\n", + "ConfigurationParser.noTaskName": "Hata: 'tasks' bir 'taskName' özelliği belirtmelidir. Görev yok sayılacaktır.\n{0}\n", + "taskConfiguration.shellArgs": "Uyarı: '{0}' görevi bir kabuk komutudur ve komut adı veya argümanlarından biri kaçış karakteri içermeyen boşluklar içeriyor. Doğru komut satırı alıntılamasını sağlamak için lütfen argümanları komutlarla birleştirin.", + "taskConfiguration.noCommandOrDependsOn": "Hata: '{0}' görevi bir komut veya dependsOn özelliği belirtmiyor. Görev yok sayılacaktır. Görevin tanımı:\n{1}", + "taskConfiguration.noCommand": "Hata: '{0}' görevi bir komut tanımlamıyor. Görev yok sayılacaktır. Görevin tanımı:\n{1}", + "TaskParse.noOsSpecificGlobalTasks": "2.0.0 görev sürümü genel işletim sistemi özel görevlerini desteklemiyor. Bunları işletim sistemine özel komut içeren bir göreve çevirin. Etkilenen görevler:\n{0}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json new file mode 100644 index 0000000000000..76b62e0169e59 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminalIntegratedConfigurationTitle": "Entegre Terminal", + "terminal.integrated.shell.linux": "Terminalin Linux'da kullandığı kabuğun yolu.", + "terminal.integrated.shellArgs.linux": "Linux terminalindeyken kullanılacak komut satırı argümanları.", + "terminal.integrated.shell.osx": "Terminalin OS X'de kullandığı kabuğun yolu.", + "terminal.integrated.shellArgs.osx": "OS X terminalindeyken kullanılacak komut satırı argümanları.", + "terminal.integrated.shell.windows": "Terminalin Windows'da kullandığı kabuğun yolu. Windows ile birlikte gelen kabukları kullanırken (cmd, PowerShell veya Bash on Ubuntu), 64 bit sürümlerini kullanmak için C:\\Windows\\System32 yerine C:\\Windows\\sysnative yolunu tercih edin.", + "terminal.integrated.shellArgs.windows": "Windows terminalindeyken kullanılacak komut satırı argümanları.", + "terminal.integrated.rightClickCopyPaste": "Ayarlandığında, terminal içinde sağ tıklandığında bağlam menüsünün görünmesini engeller, onun yerine bir seçim varsa kopyalama yapar, bir seçim yoksa yapıştırma yapar.", + "terminal.integrated.fontFamily": "Terminalin yazı tipi ailesini denetler; bu, varsayılan olarak editor.fontFamily'nin değeridir.", + "terminal.integrated.fontLigatures": "Terminalde yazı tipi ligatürlerinin etkinleştirilip etkinleştirilmeyeceğini denetler.", + "terminal.integrated.fontSize": "Terminaldeki yazı tipi boyutunu piksel olarak denetler.", + "terminal.integrated.lineHeight": "Terminalin satır yüksekliğini denetler, bu sayı gerçek satır yüksekliğini piksel olarak elde etmek için terminal yazı tipi boyutu ile çarpılır.", + "terminal.integrated.enableBold": "Terminalde kalın yazının etkinleştirilip etkinleştirilmeyeceği; bu, terminal kabuğunun desteğini gerektirir.", + "terminal.integrated.cursorBlinking": "Terminaldeki imlecin yanıp sönmesini denetler.", + "terminal.integrated.cursorStyle": "Terminaldeki imlecin stilini denetler.", + "terminal.integrated.scrollback": "Terminalin tamponunda tuttuğu maksimum satır sayısını denetler.", + "terminal.integrated.setLocaleVariables": "Terminal başlangıcında yereli içeren değişkenlerin ayarlanıp ayarlanmayacağını denetler; bu, OS X'de varsayılan olarak açıktır, diğer platformlarda kapalıdır.", + "terminal.integrated.cwd": "Terminalin nerede başlatılacağına ait açık bir yol; bu, kabuk işlemleri için geçerli çalışma klasörü (cwd) olarak kullanılır. Bu, çalışma alanı ayarlarında kök dizini uygun bir cwd değilse özellikle yararlı olabilir.", + "terminal.integrated.confirmOnExit": "Aktif terminal oturumları varken çıkışta onay istenip istenmeyeceği.", + "terminal.integrated.commandsToSkipShell": "Tuş bağlarının kabuğa gönderilmeyip bunun yerine her zaman Code tarafından işleneceği bir komut ID'leri kümesi. Bu, tuş bağlarının normalde kabuk tarafından terminal odakta değilken nasılsa öyle davranmasını sağlar, örnek olarak Hızlı Aç'ı başlatmak için ctrl+p.", + "terminal": "Terminal", + "terminalCategory": "Terminal", + "viewCategory": "Görüntüle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json new file mode 100644 index 0000000000000..7ee287790c0e3 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "workbench.action.terminal.toggleTerminal": "Entegre Terminali Aç/Kapat", + "workbench.action.terminal.kill": "Aktif Terminal Örneğini Sonlandır", + "workbench.action.terminal.kill.short": "Terminali Sonlandır", + "workbench.action.terminal.copySelection": "Seçimi Kopyala", + "workbench.action.terminal.selectAll": "Tümünü Seç", + "workbench.action.terminal.new": "Yeni Entegre Terminal Oluştur", + "workbench.action.terminal.new.short": "Yeni Terminal", + "workbench.action.terminal.focus": "Terminale Odakla", + "workbench.action.terminal.focusNext": "Sonraki Terminale Odakla", + "workbench.action.terminal.focusAtIndex": "{0}. Terminale Odakla", + "workbench.action.terminal.focusPrevious": "Önceki Terminale Odakla", + "workbench.action.terminal.paste": "Aktif Terminale Yapıştır", + "workbench.action.terminal.DefaultShell": "Varsayılan Kabuğu Seç", + "workbench.action.terminal.runSelectedText": "Seçili Metni Aktif Terminalde Çalıştır", + "workbench.action.terminal.runActiveFile": "Aktif Dosyayı Aktif Terminalde Çalıştır", + "workbench.action.terminal.runActiveFile.noFile": "Sadece diskteki dosyalar terminalde çalıştırılabilir", + "workbench.action.terminal.switchTerminalInstance": "Terminal Örneğini Değiştir", + "workbench.action.terminal.scrollDown": "Aşağı Kaydır (Satır)", + "workbench.action.terminal.scrollDownPage": "Aşağı Kaydır (Sayfa)", + "workbench.action.terminal.scrollToBottom": "En Alta Kaydır", + "workbench.action.terminal.scrollUp": "Yukarı Kaydır (Satır)", + "workbench.action.terminal.scrollUpPage": "Yukarı Kaydır (Sayfa)", + "workbench.action.terminal.scrollToTop": "En Üste Kaydır", + "workbench.action.terminal.clear": "Temizle", + "workbench.action.terminal.allowWorkspaceShell": "Çalışma Alanı Kabuk Yapılandırmasına İzin Ver", + "workbench.action.terminal.disallowWorkspaceShell": "Çalışma Alanı Kabuk Yapılandırmasına İzin Verme", + "workbench.action.terminal.rename": "Yeniden Adlandır", + "workbench.action.terminal.rename.prompt": "Terminal adını girin", + "workbench.action.terminal.focusFindWidget": "Bulma Aracına Odakla", + "workbench.action.terminal.hideFindWidget": "Bulma Aracını Gizle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json new file mode 100644 index 0000000000000..56cc70a5239aa --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminal.background": "Terminalin arka plan rengi; bu, terminalin panelden farklı olarak renklendirilmesini sağlar.", + "terminal.foreground": "Terminalin ön plan rengi.", + "terminal.ansiColor": "Terminalde '{0}' ANSI rengi." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json new file mode 100644 index 0000000000000..745f1badf0aad --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminal.integrated.allowWorkspaceShell": "{0} ögesinin (çalışma alanı ayarı olarak tanımlı) terminalde başlatılmasına izin veriyor musunuz?", + "allow": "İzin Ver", + "disallow": "İzin Verme" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json new file mode 100644 index 0000000000000..baad53fc2a424 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Bul", + "placeholder.find": "Bul", + "label.previousMatchButton": "Önceki eşleşme", + "label.nextMatchButton": "Sonraki eşleşme", + "label.closeButton": "Kapat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json new file mode 100644 index 0000000000000..38dcd5eb95103 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminal.integrated.copySelection.noSelection": "Terminalde kopyalanacak bir seçim bulunmuyor", + "terminal.integrated.exitedWithCode": "Terminal işlemi şu çıkış koduyla sonlandı: {0}", + "terminal.integrated.waitOnExit": "Terminali kapatmak için lütfen bir tuşa basın", + "terminal.integrated.launchFailed": "Terminal işlem komutu `{0}{1}` başlatılamadı (çıkış kodu: {2})" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json new file mode 100644 index 0000000000000..5b61c08623ad6 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminalLinkHandler.followLinkAlt": "Bağlantıyı izlemek için Alt tuşuna basarak tıklayın", + "terminalLinkHandler.followLinkCmd": "Bağlantıyı izlemek için Cmd tuşuna basarak tıklayın", + "terminalLinkHandler.followLinkCtrl": "Bağlantıyı izlemek için Ctrl tuşuna basarak tıklayın" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json new file mode 100644 index 0000000000000..be9f370adecdb --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "copy": "Kopyala", + "createNewTerminal": "Yeni Terminal", + "paste": "Yapıştır", + "selectAll": "Tümünü Seç", + "clear": "Temizle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json new file mode 100644 index 0000000000000..28fa93d323a9d --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminal.integrated.chooseWindowsShellInfo": "Özelleştir butonuna tıklayıp varsayılan terminal kabuğunu seçebilirsiniz.", + "customize": "Özelleştir", + "cancel": "İptal", + "never again": "Tamam, Tekrar Gösterme", + "terminal.integrated.chooseWindowsShell": "Tercih ettiğiniz terminal kabuğunu seçin, bunu daha sonra ayarlarınızdan değiştirebilirsiniz", + "terminalService.terminalCloseConfirmationSingular": "Aktif bir terminal oturumu var, sonlandırmak istiyor musunuz?", + "terminalService.terminalCloseConfirmationPlural": "{0} aktif terminal oturumu var, bunları sonlandırmak istiyor musunuz?", + "yes": "Evet" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json new file mode 100644 index 0000000000000..ef4e0417b9d60 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "selectTheme.label": "Renk Teması", + "installColorThemes": "Ek Renk Temaları Yükle...", + "themes.selectTheme": "Bir Renk Teması Seç (Yukarı/Aşağı Tuşlarıyla Önizleme Yap)", + "selectIconTheme.label": "Dosya Simgesi Teması", + "installIconThemes": "Ek Dosya Simgesi Temaları Yükle...", + "noIconThemeLabel": "Hiçbiri", + "noIconThemeDesc": "Dosya simgelerini devre dışı bırak", + "problemChangingIconTheme": "Simge temasını ayarlama sorunu: {0}", + "themes.selectIconTheme": "Dosya Simgesi Teması Seç", + "generateColorTheme.label": "Geçerli Ayarlardan Renk Teması Oluştur", + "preferences": "Tercihler", + "developer": "Geliştirici" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.i18n.json new file mode 100644 index 0000000000000..6e2f9a6845f02 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unsupportedWorkspaceSettings": "Bu çalışma alanı sadece Kullanıcı Ayarları'nda ayarlanabilen ayarlar içeriyor. ({0})", + "openWorkspaceSettings": "Çalışma Alanı Ayarlarını Aç", + "openDocumentation": "Daha Fazla Bilgi Edin", + "ignore": "Yok Say" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.i18n.json b/i18n/trk/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.i18n.json new file mode 100644 index 0000000000000..cd4ef89692af2 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "releaseNotesInputName": "Sürüm Notları: {0}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json new file mode 100644 index 0000000000000..a8342747ede92 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "release notes": "Sürüm notları", + "updateConfigurationTitle": "Güncelle", + "updateChannel": "Güncelleştirme kanalından otomatik güncelleştirmeler alıp almayacağınızı ayarlayın. Değişiklikten sonra yeniden başlatma gerektirir." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/update/electron-browser/update.i18n.json b/i18n/trk/src/vs/workbench/parts/update/electron-browser/update.i18n.json new file mode 100644 index 0000000000000..cf42df4649e38 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/update/electron-browser/update.i18n.json @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateNow": "Şimdi Güncelle", + "later": "Daha Sonra", + "unassigned": "atanmamış", + "releaseNotes": "Sürüm Notları", + "showReleaseNotes": "Sürüm Notlarını Göster", + "downloadNow": "Şimdi İndir", + "read the release notes": "{0} v{1} uygulamasına hoş geldiniz! Sürüm Notları'nı okumak ister misiniz?", + "licenseChanged": "Lisans koşullarımız değişti, lütfen inceleyin.", + "license": "Lisansı Oku", + "updateIsReady": "Yeni güncelleştirme var.", + "thereIsUpdateAvailable": "Bir güncelleştirme var.", + "updateAvailable": "{0} yeniden başlatıldıktan sonra güncellenecektir.", + "noUpdatesAvailable": "Şu anda mevcut herhangi bir güncelleme yok.", + "commandPalette": "Komut Paleti...", + "settings": "Ayarlar", + "keyboardShortcuts": "Klavye Kısayolları", + "selectTheme.label": "Renk Teması", + "themes.selectIconTheme.label": "Dosya Simgesi Teması", + "not available": "Güncelleştirme Yok", + "checkingForUpdates": "Güncelleştirmeler Denetleniyor...", + "DownloadUpdate": "Mevcut Güncelleştirmeyi İndir", + "DownloadingUpdate": "Güncelleştirme İndiriliyor...", + "InstallingUpdate": "Güncelleştirme Yükleniyor...", + "restartToUpdate": "Güncelleştirmek için Yeniden Başlatın...", + "checkForUpdates": "Güncelleştirmeleri Denetle..." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/views/browser/views.i18n.json b/i18n/trk/src/vs/workbench/parts/views/browser/views.i18n.json new file mode 100644 index 0000000000000..13520a7bd48b5 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/views/browser/views.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewToolbarAriaLabel": "{0} eylem" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json b/i18n/trk/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json new file mode 100644 index 0000000000000..e6729315d5a4e --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "görünümler bir dizi olmalıdır", + "requirestring": "`{0}` özelliği zorunludur ve `string` türünde olmalıdır", + "optstring": "`{0}` özelliği atlanabilir veya `string` türünde olmalıdır", + "vscode.extension.contributes.view.id": "Görünümün tanımlayıcısı. Bunu, `vscode.window.registerTreeDataProviderForView` API ile bir veri sağlayıcısı kaydetmek için kullanın. Ayrıca `onView:${id}` olayını `activationEvents` ögesine kaydederek eklentinizi etkinleştirmeyi tetikleyin.", + "vscode.extension.contributes.view.name": "Görünümün insanlar tarafından okunabilir adı. Gösterilecektir", + "vscode.extension.contributes.view.when": "Bu görünümü göstermek için doğru olması gereken koşul", + "vscode.extension.contributes.views": "Görünümleri düzenleyiciye ekler.", + "views.explorer": "Gezgin Görünümü", + "locationId.invalid": "`{0}` geçerli bir görünüm konumu değil" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json b/i18n/trk/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json new file mode 100644 index 0000000000000..0f89cbf72a12b --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "watermark.showCommands": "Tüm Komutları Göster", + "watermark.quickOpen": "Dosyaya Git", + "watermark.openFile": "Dosya Aç", + "watermark.openFolder": "Klasör Aç", + "watermark.openFileFolder": "Dosya veya Klasör Aç", + "watermark.openRecent": "Son Kullanılanları Aç", + "watermark.newUntitledFile": "Yeni İsimsiz Dosya", + "watermark.toggleTerminal": "Terminali Aç/Kapat", + "watermark.findInFiles": "Dosyalarda Bul", + "watermark.startDebugging": "Hata Ayıklamaya Başla", + "watermark.unboundCommand": "serbest", + "workbenchConfigurationTitle": "Çalışma Ekranı", + "tips.enabled": "Etkinleştirildiğinde, hiçbir düzenleyici açık değilken filigran ipuçları gösterir" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.i18n.json b/i18n/trk/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.i18n.json new file mode 100644 index 0000000000000..0c942884ab68a --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "welcomeOverlay.explorer": "Dosya gezgini", + "welcomeOverlay.search": "Dosyalar arasında ara", + "welcomeOverlay.git": "Kaynak kodu yönetimi", + "welcomeOverlay.debug": "Başlat ve hata ayıkla", + "welcomeOverlay.extensions": "Eklentileri yönet", + "welcomeOverlay.problems": "Hataları ve uyarıları görüntüle", + "welcomeOverlay.commandPalette": "Tüm komutları bul ve çalıştır", + "welcomeOverlay": "Kullanıcı Arayüzüne Genel Bakış", + "hideWelcomeOverlay": "Arayüz Genel Bakışını Gizle", + "help": "Yardım" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/trk/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json new file mode 100644 index 0000000000000..ab8ec3add64e1 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -0,0 +1,45 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "welcomePage.vscode": "Visual Studio Code", + "welcomePage.editingEvolved": "Düzenleme evrim geçirdi", + "welcomePage.start": "Başlangıç", + "welcomePage.newFile": "Yeni dosya", + "welcomePage.openFolder": "Klasör aç...", + "welcomePage.cloneGitRepository": "Git deposu kopyala...", + "welcomePage.recent": "Son Kullanılanlar", + "welcomePage.moreRecent": "Diğerleri...", + "welcomePage.noRecentFolders": "Son kullanılan klasör yok", + "welcomePage.help": "Yardım", + "welcomePage.keybindingsCheatsheet": "Yazdırılabilir klavye kopya kağıdı", + "welcomePage.introductoryVideos": "Tanıtım videoları", + "welcomePage.tipsAndTricks": "İpuçları ve Püf noktaları", + "welcomePage.productDocumentation": "Ürün belgeleri", + "welcomePage.gitHubRepository": "GitHub deposu", + "welcomePage.stackOverflow": "Stack Overflow", + "welcomePage.showOnStartup": "Başlangıçta hoş geldiniz sayfasını göster", + "welcomePage.customize": "Özelleştir", + "welcomePage.installExtensionPacks": "Araçlar ve diller", + "welcomePage.installExtensionPacksDescription": "{0} ve {1} için destek yükle", + "welcomePage.moreExtensions": "fazlası", + "welcomePage.installKeymapDescription": "Klavye kısayolları yükle", + "welcomePage.installKeymapExtension": "{0} ve {1} için klavye kısayolları yükle", + "welcomePage.others": "diğerleri", + "welcomePage.colorTheme": "Renk teması", + "welcomePage.colorThemeDescription": "Düzenleyici ve kodlarınız sevdiğiniz şekilde görünsün", + "welcomePage.learn": "Öğren", + "welcomePage.showCommands": "Tüm komutları bul ve çalıştır", + "welcomePage.showCommandsDescription": "Komut Paleti'nden hızlıca komutlara erişin ve arayın ({0})", + "welcomePage.interfaceOverview": "Arayüze genel bakış", + "welcomePage.interfaceOverviewDescription": "Kullanıcı arayüzünün ana bileşenlerini vurgulayan bir kaplamayı görüntüleyin", + "welcomePage.interactivePlayground": "İnteraktif oyun alanı", + "welcomePage.interactivePlaygroundDescription": "Başlıca düzenleyici özelliklerini kısa örneklerle deneyin", + "welcomePage.quickLinks": "Hızlı bağlantılar", + "welcomePage.keybindingsReference": "Klavye kısayolları başvurusu", + "welcomePage.keybindingsReferenceDescription": "En yaygın klavye kısayollarının olduğu yazdırılabilir bir PDF dosyası", + "welcomePage.configureSettings": "Ayarları yapılandır", + "welcomePage.configureSettingsDescription": "Ayarları değiştirerek VS Code'un tam gücünü açın" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json new file mode 100644 index 0000000000000..54f7b23e40794 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "workbenchConfigurationTitle": "Çalışma Ekranı", + "workbench.startupEditor.none": "Bir düzenleyici olmadan başlayın.", + "workbench.startupEditor.welcomePage": "Hoş Geldiniz sayfasını açın (varsayılan).", + "workbench.startupEditor.newUntitledFile": "Yeni bir isimsiz dosya açın.", + "workbench.startupEditor": "Önceki oturumdan hiçbiri düzenleyici geri yüklenmeyecekse, başlangıçta hangi düzenleyicinin gösterileceğini denetler. Bir düzenleyici olmadan başlamak için 'none', Hoş Geldiniz sayfasını açmak için 'welcomePage' (varsayılan), (sadece bir klasör açmadığınız zaman) yeni bir isimsiz dosya açmak için 'newUntitledFile'ı seçin.", + "help": "Yardım" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/trk/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json new file mode 100644 index 0000000000000..faac6bda70488 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -0,0 +1,36 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "welcomePage": "Hoş Geldiniz", + "welcomePage.javaScript": "JavaScript", + "welcomePage.typeScript": "TypeScript", + "welcomePage.python": "Python", + "welcomePage.php": "PHP", + "welcomePage.docker": "Docker", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", + "welcomePage.extensionPackAlreadyInstalled": "{0} desteği zaten yüklü.", + "welcomePage.willReloadAfterInstallingExtensionPack": "{0} ek desteği yüklendikten sonra pencere yeniden yüklenecektir.", + "welcomePage.installingExtensionPack": "{0} ek desteği yükleniyor...", + "welcomePage.extensionPackNotFound": "{1} Id'li {0} desteği bulunamadı.", + "welcomePage.keymapAlreadyInstalled": "{0} klavye kısayolları zaten yüklü.", + "welcomePage.willReloadAfterInstallingKeymap": "{0} klavye kısayolları yüklendikten sonra pencere yeniden yüklenecektir.", + "welcomePage.installingKeymap": "{0} klavye kısayolları yükleniyor...", + "welcomePage.keymapNotFound": "{1} Id'li {0} klavye kısayolları bulunamadı.", + "welcome.title": "Hoş Geldiniz", + "welcomePage.openFolderWithPath": "{1} yolundaki {0} klasörünü aç", + "welcomePage.extensionListSeparator": ", ", + "welcomePage.installKeymap": "{0} tuş haritasını yükle", + "welcomePage.installExtensionPack": "{0} ek desteği yükleniyor...", + "welcomePage.installedKeymap": "{0} tuş haritası zaten yüklü", + "welcomePage.installedExtensionPack": "{0} desteği zaten yüklü", + "ok": "Tamam", + "details": "Detaylar", + "cancel": "İptal", + "welcomePage.buttonBackground": "Hoş geldiniz sayfasındaki butonların arka plan rengi.", + "welcomePage.buttonHoverBackground": "Hoş geldiniz sayfasındaki butonların bağlantı vurgusu arka plan rengi." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.i18n.json b/i18n/trk/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.i18n.json new file mode 100644 index 0000000000000..80ad1bc8870bd --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorWalkThrough": "İnteraktif Oyun Alanı", + "editorWalkThrough.title": "İnteraktif Oyun Alanı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution.i18n.json new file mode 100644 index 0000000000000..c56d3c14fe8cd --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "walkThrough.editor.label": "İnteraktif Oyun Alanı", + "help": "Yardım", + "interactivePlayground": "İnteraktif Oyun Alanı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughActions.i18n.json b/i18n/trk/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughActions.i18n.json new file mode 100644 index 0000000000000..9e8d2c57063af --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughActions.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorWalkThrough.arrowUp": "Yukarı Kaydır (Satır)", + "editorWalkThrough.arrowDown": "Aşağı Kaydır (Satır)", + "editorWalkThrough.pageUp": "Yukarı Kaydır (Sayfa)", + "editorWalkThrough.pageDown": "Aşağı Kaydır (Sayfa)" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/trk/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json new file mode 100644 index 0000000000000..add57fa341b54 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "walkThrough.unboundCommand": "serbest", + "walkThrough.gitNotFound": "Git, sisteminizde yüklü değil gibi görünüyor.", + "walkThrough.embeddedEditorBackground": "İnteraktif oyun alanındaki gömülü düzenleyicilerin arka plan rengi." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/configuration/node/configuration.i18n.json b/i18n/trk/src/vs/workbench/services/configuration/node/configuration.i18n.json new file mode 100644 index 0000000000000..ba93a12125f7c --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/configuration/node/configuration.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.configuration": "Yapılandırma ayarlarına ekleme yapar.", + "vscode.extension.contributes.configuration.title": "Ayarların bir özeti. Bu etiket ayar dosyasında ayırıcı yorum olarak kullanılacaktır.", + "vscode.extension.contributes.configuration.properties": "Yapılandırma özelliklerinin açıklaması.", + "invalid.type": "eğer ayarlanırsa, 'configuration.type' ögesi 'object' olarak ayarlanmalıdır", + "invalid.title": "'configuration.title' bir dize olmalıdır", + "vscode.extension.contributes.defaultConfiguration": "Varsayılan düzenleyici yapılandırma ayarlarına dil bazında ekleme yapar.", + "invalid.properties": "'configuration.properties' bir nesne olmalıdır" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/trk/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json new file mode 100644 index 0000000000000..a5088bc7ca639 --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "open": "Ayarları Aç", + "close": "Kapat", + "saveAndRetry": "Ayarları Kaydet ve Yeniden Dene", + "errorUnknownKey": "Yapılandırma dosyasına yazılamıyor (Bilinmeyen Anahtar)", + "errorInvalidTarget": "Yapılandırma dosyasına yazılamıyor (Bilinmeyen Hedef)", + "errorNoWorkspaceOpened": "Hiçbir klasör açık olmadığı için ayarlara yazılamıyor. Lütfen ilk olarak bir klasörü açın ve tekrar deneyin.", + "errorInvalidConfiguration": "Ayarlara yazılamıyor. Lütfen dosyadaki hata/uyarıları düzeltmek için **Kullanıcı Ayarları'nı** açın ve tekrar deneyin.", + "errorInvalidConfigurationWorkspace": "Ayarlara yazılamıyor. Lütfen dosyadaki hata/uyarıları düzeltmek için **Çalışma Alanı Ayarları'nı** açın ve tekrar deneyin.", + "errorConfigurationFileDirty": "Dosya kaydedilmemiş değişiklikler içerdiği için ayarlara yazılamıyor. Lütfen dosyadaki hata/uyarıları düzeltmek için **Kullanıcı Ayarları'nı** açın ve tekrar deneyin.", + "errorConfigurationFileDirtyWorkspace": "Dosya kaydedilmemiş değişiklikler içerdiği için ayarlara yazılamıyor. Lütfen dosyadaki hata/uyarıları düzeltmek için **Çalışma Alanı Ayarları'nı** açın ve tekrar deneyin." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json b/i18n/trk/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json new file mode 100644 index 0000000000000..4289f712979c3 --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Telemetri", + "telemetry.enableCrashReporting": "Kilitlenme raporlarının Microsoft'a gönderilmesini etkinleştirin.\nBu seçeneğin yürürlüğe girmesi için yeniden başlatma gerekir." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/editor/browser/editorService.i18n.json b/i18n/trk/src/vs/workbench/services/editor/browser/editorService.i18n.json new file mode 100644 index 0000000000000..50e968f8ee37e --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/editor/browser/editorService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "compareLabels": "{0} ↔ {1}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/files/electron-browser/fileService.i18n.json b/i18n/trk/src/vs/workbench/services/files/electron-browser/fileService.i18n.json new file mode 100644 index 0000000000000..084090af73457 --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/files/electron-browser/fileService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "netVersionError": "Microsoft .NET Framework 4.5 gerekli. Yüklemek için bağlantıyı izleyin.", + "installNet": ".NET Framework 4.5'i İndir", + "neverShowAgain": "Tekrar Gösterme", + "trashFailed": "'{0}' çöpe taşınamadı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/files/node/fileService.i18n.json b/i18n/trk/src/vs/workbench/services/files/node/fileService.i18n.json new file mode 100644 index 0000000000000..d5fcdc041a1fa --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/files/node/fileService.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileInvalidPath": "Geçersiz dosya kaynağı ({0})", + "fileIsDirectoryError": "Dosya bir dizindir ({0})", + "fileNotModifiedError": "Dosya şu tarihten beri değiştirilmemiş:", + "fileTooLargeError": "Dosya, açmak için çok büyük", + "fileBinaryError": "Dosya ikili olarak görünüyor ve metin olarak açılamıyor", + "fileNotFoundError": "Dosya bulunamadı ({0})", + "fileMoveConflict": "Taşıma/kopyalama yapılamadı. Dosya, hedefte zaten mevcut.", + "unableToMoveCopyError": "Taşıma/kopyalama yapılamadı. Dosya, içinde bulunduğu klasörü değiştiriyor.", + "foldersCopyError": "Klasörler çalışma alanına kopyalanamaz. Lütfen kopyalamak için dosyaları tek tek seçin.", + "fileModifiedError": "Dosya Şu Tarihten Beri Değiştiriliyor", + "fileReadOnlyError": "Dosya Salt Okunur" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/keybinding/common/keybindingEditing.i18n.json b/i18n/trk/src/vs/workbench/services/keybinding/common/keybindingEditing.i18n.json new file mode 100644 index 0000000000000..0e3f3b323f118 --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/keybinding/common/keybindingEditing.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "errorKeybindingsFileDirty": "Dosya kaydedilmemiş değişiklikler içerdiği için yazılamıyor. Lütfen **tuş bağları** dosyasını kaydedin ve tekrar deneyin.", + "parseErrors": "Tuş bağları yazılamadı. Lütfen dosyadaki hata/uyarıları düzeltmek için **tuş bağları dosyasını** açın ve yeniden deneyin.", + "errorInvalidConfiguration": "Tuş bağları yazılamadı. **Tuş bağları dosyasında** Dizi olmayan bir nesne var. Temizlemek için lütfen dosyayı açın ve yeniden deneyin.", + "emptyKeybindingsHeader": "Varsayılanların üzerine yazmak için tuş bağlarınızı bu dosyaya yerleştirin" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/trk/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json new file mode 100644 index 0000000000000..2aa6fbc364a6e --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "nonempty": "boş olmayan değer bekleniyordu.", + "requirestring": "`{0}` özelliği zorunludur ve `string` türünde olmalıdır", + "optstring": "`{0}` özelliği atlanabilir veya `string` türünde olmalıdır", + "vscode.extension.contributes.keybindings.command": "Tuş bağı tetiklendiğinde çalıştırılacak komutun tanımlayıcısı.", + "vscode.extension.contributes.keybindings.key": "Tuş veya tuş dizisi (tuşları artı işaretiyle veya boşluk dizisiyle ayırın, ör. bir akor için Ctrl+O ve Ctrl+L).", + "vscode.extension.contributes.keybindings.mac": "Mac'e özel tuş veya tuş dizisi.", + "vscode.extension.contributes.keybindings.linux": "Linux'a özel tuş veya tuş dizisi.", + "vscode.extension.contributes.keybindings.win": "Windows'a özel tuş veya tuş dizisi.", + "vscode.extension.contributes.keybindings.when": "Tuşun aktif olacağı koşul", + "vscode.extension.contributes.keybindings": "Tuş bağlarına ekleme yapar.", + "invalid.keybindings": "Geçersiz `contributes.{0}`: {1}", + "unboundCommands": "Kullanılabilen diğer komutlar şunlardır: ", + "keybindings.json.title": "Tuş bağları yapılandırması", + "keybindings.json.key": "Tuş veya tuş dizisi (boşluk ile ayrılmış olarak)", + "keybindings.json.command": "Yürütülecek komutun adı", + "keybindings.json.when": "Tuşun aktif olacağı koşul", + "keybindings.json.args": "Yürütülecek komuta iletilecek argümanlar.", + "keyboardConfigurationTitle": "Klavye", + "dispatch": "Tuş basımlarının ya `keydown.code` (önerilen) ya da ` keydown.keyCode` kullanarak gönderilmesini denetler." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/message/browser/messageList.i18n.json b/i18n/trk/src/vs/workbench/services/message/browser/messageList.i18n.json new file mode 100644 index 0000000000000..00c0b8b53d5d2 --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/message/browser/messageList.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "alertErrorMessage": "Hata: {0}", + "alertWarningMessage": "Uyarı: {0}", + "alertInfoMessage": "Bilgi: {0}", + "error": "Hata", + "warning": "Uyar", + "info": "Bilgi", + "close": "Kapat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/message/electron-browser/messageService.i18n.json b/i18n/trk/src/vs/workbench/services/message/electron-browser/messageService.i18n.json new file mode 100644 index 0000000000000..ef993fa147f7c --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/message/electron-browser/messageService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "yesButton": "&&Evet", + "cancelButton": "İptal" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json b/i18n/trk/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json new file mode 100644 index 0000000000000..c05f774a06a75 --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.languages": "Dil bildirimlerine ekleme yapar.", + "vscode.extension.contributes.languages.id": "Dilin ID'si.", + "vscode.extension.contributes.languages.aliases": "Dilin takma adları.", + "vscode.extension.contributes.languages.extensions": "Dil ile ilişkili dosya uzantıları.", + "vscode.extension.contributes.languages.filenames": "Dil ile ilişkili dosya adları.", + "vscode.extension.contributes.languages.filenamePatterns": "Dil ile ilişkili dosya adı glob desenleri.", + "vscode.extension.contributes.languages.mimetypes": "Dil ile ilişkili MIME türleri.", + "vscode.extension.contributes.languages.firstLine": "Dilin bir dosyasının ilk satırıyla eşleşen düzenli ifade.", + "vscode.extension.contributes.languages.configuration": "Dil için yapılandırma seçenekleri içeren dosyaya, bir göreli yol.", + "invalid": "Geçersiz `contributes.{0}`. Bir dizi bekleniyordu.", + "invalid.empty": "`contributes.{0}` için boş değer", + "require.id": "`{0}` özelliği zorunludur ve `string` türünde olmalıdır", + "opt.extensions": "`{0}` özelliği atlanabilir veya `string[]` türünde olmalıdır", + "opt.filenames": "`{0}` özelliği atlanabilir veya `string[]` türünde olmalıdır", + "opt.firstLine": "`{0}` özelliği atlanabilir veya `string` türünde olmalıdır", + "opt.configuration": "`{0}` özelliği atlanabilir veya `string` türünde olmalıdır", + "opt.aliases": "`{0}` özelliği atlanabilir veya `string[]` türünde olmalıdır", + "opt.mimetypes": "`{0}` özelliği atlanabilir veya `string[]` türünde olmalıdır" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/progress/browser/progressService2.i18n.json b/i18n/trk/src/vs/workbench/services/progress/browser/progressService2.i18n.json new file mode 100644 index 0000000000000..6db7d6aae514a --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/progress/browser/progressService2.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "progress.text": "{0} - {1}", + "progress.title": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json b/i18n/trk/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json new file mode 100644 index 0000000000000..60439bb3b955c --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/textMate/electron-browser/TMGrammars.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.grammars": "textmate tokenizerlere ekleme yapar.", + "vscode.extension.contributes.grammars.language": "Bu söz diziminin ekleneceği dil tanımlayıcısı.", + "vscode.extension.contributes.grammars.scopeName": "tmLanguage dosyası tarafından kullanılan Textmate kapsam adı.", + "vscode.extension.contributes.grammars.path": "tmLanguage dosyasının yolu. Yol, eklenti klasörüne görecelidir ve genellikle './syntaxes/' ile başlar.", + "vscode.extension.contributes.grammars.embeddedLanguages": "Bu dil bilgisinin gömülü dilleri içermesi durumundaki bir dil kimliğinin kapsam adı haritası.", + "vscode.extension.contributes.grammars.injectTo": "Bu dil bilgisinin yerleştirileceği dil kapsam adları listesi." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json b/i18n/trk/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json new file mode 100644 index 0000000000000..cd8f883eda733 --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/textMate/electron-browser/TMSyntax.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid.language": "`contributes.{0}.language` ögesinde bilinmeyen dil. Sağlanan değer: {1}", + "invalid.scopeName": "`contributes.{0}.scopeName` ögesinde dize bekleniyor. Sağlanan değer: {1}", + "invalid.path.0": "`contributes.{0}.path` ögesinde dize bekleniyor. Sağlanan değer: {1}", + "invalid.injectTo": "`contributes.{0}.injectTo` ögesinde geçersiz değer. Dil kapsam adlarından oluşan bir dizi olmalıdır. Sağlanan değer: {1}", + "invalid.embeddedLanguages": "`contributes.{0}.embeddedLanguages` ögesinde geçersiz değer. Kapsam adından dile kadar olan bir nesne haritası olmalıdır. Sağlanan değer: {1}", + "invalid.path.1": "`contributes.{0}.path` ögesinin ({1}) eklentinin klasöründe ({2}) yer alması bekleniyor. Bu, eklentiyi taşınamaz yapabilir.", + "no-tm-grammar": "Bu dil için kayıtlı bir TM Grameri yok." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/textfile/common/textFileEditorModel.i18n.json b/i18n/trk/src/vs/workbench/services/textfile/common/textFileEditorModel.i18n.json new file mode 100644 index 0000000000000..7c9f89a2ac813 --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/textfile/common/textFileEditorModel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "saveFileFirst": "Dosya kaydedilmemiş değişiklikler içeriyor. Başka bir kodlama ile yeniden açmadan önce lütfen ilk olarak kaydedin.", + "genericSaveError": "'{0}' kaydedilemedi: ({1})." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/textfile/common/textFileService.i18n.json b/i18n/trk/src/vs/workbench/services/textfile/common/textFileService.i18n.json new file mode 100644 index 0000000000000..d3399a79e656d --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/textfile/common/textFileService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "files.backup.failSave": "Dosyalar yedeklenemedi (Hata: {0}), çıkmak için dosyalarınızı kaydetmeyi deneyin." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/textfile/electron-browser/textFileService.i18n.json b/i18n/trk/src/vs/workbench/services/textfile/electron-browser/textFileService.i18n.json new file mode 100644 index 0000000000000..5284725dbcbe1 --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/textfile/electron-browser/textFileService.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "saveChangesMessage": "{0} dosyasına yaptığınız değişiklikleri kaydetmek istiyor musunuz?", + "saveChangesMessages": "Aşağıdaki {0} dosyaya yaptığınız değişiklikleri kaydetmek istiyor musunuz?", + "moreFile": "...1 ek dosya gösterilmiyor", + "moreFiles": "...{0} ek dosya gösterilmiyor", + "saveAll": "&&Tümünü Kaydet", + "save": "&&Kaydet", + "dontSave": "Kaydet&&me", + "cancel": "İptal", + "saveChangesDetail": "Değişiklikleriniz, kaydetmezseniz kaybolur.", + "allFiles": "Tüm Dosyalar", + "noExt": "Uzantısız" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json b/i18n/trk/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json new file mode 100644 index 0000000000000..70d9757c2552d --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "schema.colors": "Sentaks vurgulaması renkleri", + "schema.properties.name": "Kuralın açıklaması", + "schema.fontStyle": "Kuralın yazı tipi stili: 'italic', 'bold' ve 'underline' kombinasyonu veya bunlardan bir tanesi", + "schema.tokenColors.path": "Bir tmTheme dosyasının yolu (geçerli dosyaya göreli)" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/themes/common/fileIconThemeSchema.i18n.json b/i18n/trk/src/vs/workbench/services/themes/common/fileIconThemeSchema.i18n.json new file mode 100644 index 0000000000000..93ef7b84d6308 --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/themes/common/fileIconThemeSchema.i18n.json @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "schema.folderExpanded": "Genişletilmiş klasörler için klasör simgesi. Genişletilmiş klasör simgesi isteğe bağlıdır. Ayarlanmazsa, klasör için tanımlanan simge gösterilir.", + "schema.folder": "Daraltılmış klasörler için klasör simgesi; eğer folderExpanded ayarlanmamışsa, genişletilen klasörler için de kullanılır.", + "schema.file": "Varsayılan dosya simgesi, bir uzantı, dosya adı veya dil kimliği ile eşleşmeyen tüm dosyalar için gösterilir.", + "schema.folderNames": "Klasör adlarını simgelerle ilişkilendirir. Nesne anahtarı, herhangi bir yol parçası içermeyen klasör adıdır. Örüntüler veya joker karakterlere izin verilmez. Klasör adı eşleştirme büyük/küçük harfe duyarlı değildir.", + "schema.folderName": "İlişkilendirilecek simge tanımı ID'si.", + "schema.folderNamesExpanded": "Klasör adlarını genişletilmiş klasör simgeleriyle ilişkilendirir. Nesne anahtarı, herhangi bir yol parçası içermeyen klasör adıdır. Örüntüler veya joker karakterlere izin verilmez. Klasör adı eşleştirme büyük/küçük harfe duyarlı değildir.", + "schema.folderNameExpanded": "İlişkilendirilecek simge tanımı ID'si.", + "schema.fileExtensions": "Dosya uzantılarını simgelerle ilişkilendirir. Nesne anahtarı, dosya uzantısı adıdır. Uzantı adı, bir dosya adındaki son noktadan sonraki kısmıdır(nokta dahil değil). Uzantılar büyük/küçük harf ayırt etmeksizin karşılaştırılır.", + "schema.fileExtension": "İlişkilendirilecek simge tanımı ID'si.", + "schema.fileNames": "Dosya adlarını simgelerle ilişkilendirir. Nesne anahtarı, herhangi bir yol parçası içermeyen tam dosya adıdır. Dosya adı noktalar ve olası bir dosya uzantısı içerebilir. Örüntüler veya joker karakterlere izin verilmez. Dosya adı eşleştirme büyük/küçük harfe duyarlı değildir.", + "schema.fileName": "İlişkilendirilecek simge tanımı ID'si.", + "schema.languageIds": "Dilleri simgelerle ilişkilendirir. Nesne anahtarı, dil ekleme noktasında tanımlanan dil kimliğidir.", + "schema.languageId": "İlişkilendirilecek simge tanımı ID'si.", + "schema.fonts": "Simge tanımlarında kullanılacak yazı tipleri.", + "schema.id": "Yazı tipinin ID'si.", + "schema.src": "Yazı tipinin konumları.", + "schema.font-path": "Yazı tipi yolu, geçerli simge teması dosyasına göreli yol.", + "schema.font-format": "Yazı tipinin biçimi.", + "schema.font-weight": "Yazı tipinin kalınlığı.", + "schema.font-sstyle": "Yazı tipinin stili.", + "schema.font-size": "Yazı tipinin varsayılan boyutu.", + "schema.iconDefinitions": "Dosyalar simgelerle ilişkilendirirken kullanılabilecek tüm simgelerin açıklaması.", + "schema.iconDefinition": "Bir simge tanımı. Nesne anahtarı, tanımın ID'sidir.", + "schema.iconPath": "SVG veya PNG kullanırken: Görüntünün yolu. Yol, simge kümesi dosyasına görelidir.", + "schema.fontCharacter": "Glif yazı tipi kullanırken: Kullanılacak yazı tipindeki karakter.", + "schema.fontColor": "Glif yazı tipi kullanırken: Kullanılacak renk.", + "schema.fontSize": "Yazı tipi kullanırken: Metin yazı tipi yüzdesine göre yazı tipi boyutu. Ayarlanmazsa, yazı tipi tanımındaki boyut kullanılır.", + "schema.fontId": "Yazı tipi kullanırken: Yazı tipinin kimliği. Ayarlanmazsa, ilk yazı tipi tanımı varsayılan olarak kullanılır.", + "schema.light": "Açık renk temalarındaki dosya simgeleri için isteğe bağlı ilişkilendirmeler.", + "schema.highContrast": "Yüksek karşıtlık renk temalarındaki dosya simgeleri için isteğe bağlı ilişkilendirmeler." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/trk/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json new file mode 100644 index 0000000000000..d00686b6cdd37 --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error.cannotparsejson": "JSON tema dosyasını ayrıştırma sorunları: {0}", + "error.invalidformat.colors": "Renk teması dosyasını ayrıştırma sorunu: {0}. 'colors' özelliği 'nesne' türünde değil.", + "error.invalidformat.tokenColors": "Renk teması dosyasını ayrıştırma sorunu: {0}. 'tokenColors' özelliği ya renkleri belirten bir dizi ya da bir text mate tema dosyasının yolunu içermelidir", + "error.plist.invalidformat": "tmTheme tema dosyasını ayrıştırma sorunları: {0}. 'settings' dizi değil", + "error.cannotparse": "tmTheme tema dosyasını ayrıştırma sorunları: {0}", + "error.cannotload": "{0} tmTheme tema dosyasını yükleme sorunları: {1}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/trk/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json new file mode 100644 index 0000000000000..7cd90e062470b --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.themes": "Textmate renk temalarına ekleme yapar.", + "vscode.extension.contributes.themes.id": "Kullanıcı ayarlarında kullanılan simge teması Id'si.", + "vscode.extension.contributes.themes.label": "Kullanıcı arayüzünde görünen renk temasının etiketi.", + "vscode.extension.contributes.themes.uiTheme": "Editördeki renkleri tanımlayan temel tema: 'vs' açık renk temasıdır, 'vs-dark' koyu renk temasıdır. 'hc-black' ise yüksek kontrast temasıdır.", + "vscode.extension.contributes.themes.path": "tmLanguage dosyasının yolu. Yol, eklenti klasörüne görecelidir ve genellikle './themes/themeFile.tmTheme'dir.", + "vscode.extension.contributes.iconThemes": "Dosya simgesi temalarına ekleme yapar.", + "vscode.extension.contributes.iconThemes.id": "Kullanıcı ayarlarında kullanılan simge teması Id'si.", + "vscode.extension.contributes.iconThemes.label": "Kullanıcı arayüzünde görünen simge temasının etiketi.", + "vscode.extension.contributes.iconThemes.path": "Simge teması tanımlama dosyasının yolu. Yol, eklenti klasörüne görecelidir ve genellikle './icons/awesome-icon-theme.json'dur.", + "migration.completed": "Yeni tema ayarları kullanıcı ayarlarına eklendi. Yedek, {0} konumunda mevcuttur.", + "error.cannotloadtheme": "{0} yüklenemedi: {1}", + "reqarray": "Eklenti noktası `{0}` bir dizi olmalıdır.", + "reqpath": "`contributes.{0}.path` ögesinde dize bekleniyor. Sağlanan değer: {1}", + "invalid.path.1": "`contributes.{0}.path` ögesinin ({1}) eklentinin klasöründe ({2}) yer alması bekleniyor. Bu, eklentiyi taşınamaz yapabilir.", + "reqid": "`contributes.{0}.id` ögesinde dize bekleniyordu. Belirtilen değer: {1}", + "error.cannotloadicontheme": "{0} yüklenemedi", + "error.cannotparseicontheme": "Dosya simgeleri dosyasını ayrıştırma sorunları: {0}", + "colorTheme": "Çalışma ekranında kullanılan renk temasını belirtir.", + "colorThemeError": "Tema bilinmiyor veya yüklenmemiş.", + "iconTheme": "Çalışma ekranında kullanılan simge temasını veya hiçbir dosya simgesi göstermemek için 'null' belirtir.", + "noIconThemeDesc": "Dosya simgesi yok", + "iconThemeError": "Dosya simgesi teması bilinmiyor veya yüklenmemiş.", + "workbenchColors": "Şu an seçili renk temasındaki renkleri geçersiz kılar.", + "workbenchColors.deprecated": "Ayar, artık deneysel değildir ve 'workbench.colorCustomizations' olarak yeniden adlandırılmıştır", + "workbenchColors.deprecatedDescription": "Bunun yerine 'workbench.colorCustomizations' kullanın" +} \ No newline at end of file diff --git a/issue_template.md b/issue_template.md index 81a8470fc44a7..b88df0c6fced7 100644 --- a/issue_template.md +++ b/issue_template.md @@ -1,5 +1,6 @@ - + + - VSCode Version: - OS Version: @@ -7,3 +8,6 @@ Steps to Reproduce: 1. 2. + + +Reproduces without extensions: Yes/No \ No newline at end of file diff --git a/jsconfig.json b/jsconfig.json deleted file mode 100644 index cc732031011de..0000000000000 --- a/jsconfig.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - // See https://go.microsoft.com/fwlink/?LinkId=759670 - // for the documentation about the jsconfig.json format - "compilerOptions": { - "target": "es6", - "module": "commonjs", - "allowSyntheticDefaultImports": true - }, - "exclude": [ - "src", - "extensions", - "test", - "i18n", - "out", - "out-build", - "out-vscode", - "out-vscode-min", - "out-editor", - "out-editor-min", - "out-monaco-editor-core", - "resources", - "scripts", - ".build", - "node_modules", - "build/monaco/node_modules" - ] -} diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index e997f8ba10ad9..e6f66f9833ecb 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1,6 +1,6 @@ { "name": "code-oss-dev", - "version": "1.10.0", + "version": "1.15.0", "dependencies": { "agent-base": { "version": "1.0.2", @@ -293,9 +293,9 @@ "resolved": "https://registry.npmjs.org/nan/-/nan-2.4.0.tgz" }, "native-keymap": { - "version": "1.2.2", - "from": "native-keymap@1.2.2", - "resolved": "https://registry.npmjs.org/native-keymap/-/native-keymap-1.2.2.tgz" + "version": "1.2.4", + "from": "native-keymap@1.2.4", + "resolved": "https://registry.npmjs.org/native-keymap/-/native-keymap-1.2.4.tgz" }, "normalize-path": { "version": "2.0.1", @@ -338,9 +338,9 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" }, "node-pty": { - "version": "0.6.4", - "from": "node-pty@0.6.4", - "resolved": "https://registry.npmjs.org/node-pty/-/node-pty-0.6.4.tgz", + "version": "0.6.8", + "from": "node-pty@0.6.8", + "resolved": "https://registry.npmjs.org/node-pty/-/node-pty-0.6.8.tgz", "dependencies": { "nan": { "version": "2.5.0", @@ -410,9 +410,9 @@ "resolved": "git://github.com/jrieken/v8-profiler.git#bc0803a4d4b2150b8a1bbffa80270769007036c2" }, "vscode-debugprotocol": { - "version": "1.19.0", - "from": "vscode-debugprotocol@1.19.0", - "resolved": "https://registry.npmjs.org/vscode-debugprotocol/-/vscode-debugprotocol-1.19.0.tgz" + "version": "1.21.0", + "from": "vscode-debugprotocol@1.21.0", + "resolved": "https://registry.npmjs.org/vscode-debugprotocol/-/vscode-debugprotocol-1.21.0.tgz" }, "vscode-ripgrep": { "version": "0.0.12", @@ -420,9 +420,9 @@ "resolved": "https://registry.npmjs.org/vscode-ripgrep/-/vscode-ripgrep-0.0.12.tgz" }, "vscode-textmate": { - "version": "3.1.4", - "from": "vscode-textmate@3.1.4", - "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-3.1.4.tgz" + "version": "3.1.5", + "from": "vscode-textmate@3.1.5", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-3.1.5.tgz" }, "windows-foreground-love": { "version": "0.1.0", @@ -440,14 +440,126 @@ "resolved": "https://registry.npmjs.org/winreg/-/winreg-1.2.0.tgz" }, "xterm": { - "version": "2.5.0", - "from": "Tyriar/xterm.js#vscode-release/1.12", - "resolved": "git+https://github.com/Tyriar/xterm.js.git#dd94777309f3ce63952a7604b9c40e77370db3ca" + "version": "2.7.0", + "from": "Tyriar/xterm.js#vscode-release/1.14", + "resolved": "git+https://github.com/Tyriar/xterm.js.git#7d7207a592461f15711f2f5df46eb5b1a7726da4" }, "yauzl": { "version": "2.3.1", "from": "yauzl@2.3.1", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.3.1.tgz" + }, + "nsfw": { + "version": "1.0.15", + "from": "nsfw@1.0.15", + "resolved": "https://registry.npmjs.org/nsfw/-/nsfw-1.0.15.tgz", + "dependencies": { + "asap": { + "version": "2.0.5", + "from": "asap@>=2.0.3 <2.1.0", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.5.tgz" + }, + "balanced-match": { + "version": "1.0.0", + "from": "balanced-match@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz" + }, + "brace-expansion": { + "version": "1.1.8", + "from": "brace-expansion@>=1.1.7 <2.0.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz" + }, + "concat-map": { + "version": "0.0.1", + "from": "concat-map@0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + }, + "fs-extra": { + "version": "0.26.7", + "from": "fs-extra@>=0.26.5 <0.27.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.26.7.tgz" + }, + "fs.realpath": { + "version": "1.0.0", + "from": "fs.realpath@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" + }, + "glob": { + "version": "7.1.2", + "from": "glob@>=7.0.5 <8.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz" + }, + "graceful-fs": { + "version": "4.1.11", + "from": "graceful-fs@>=4.1.2 <5.0.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz" + }, + "inflight": { + "version": "1.0.6", + "from": "inflight@>=1.0.4 <2.0.0", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" + }, + "inherits": { + "version": "2.0.3", + "from": "inherits@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + }, + "jsonfile": { + "version": "2.4.0", + "from": "jsonfile@>=2.1.0 <3.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz" + }, + "klaw": { + "version": "1.3.1", + "from": "klaw@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz" + }, + "lodash": { + "version": "4.17.4", + "from": "lodash@>=4.6.1 <5.0.0", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz" + }, + "minimatch": { + "version": "3.0.4", + "from": "minimatch@>=3.0.4 <4.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz" + }, + "nan": { + "version": "2.6.2", + "from": "nan@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.6.2.tgz" + }, + "nodegit-promise": { + "version": "4.0.0", + "from": "nodegit-promise@>=4.0.0 <4.1.0", + "resolved": "https://registry.npmjs.org/nodegit-promise/-/nodegit-promise-4.0.0.tgz" + }, + "once": { + "version": "1.4.0", + "from": "once@>=1.3.0 <2.0.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz" + }, + "path-is-absolute": { + "version": "1.0.1", + "from": "path-is-absolute@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + }, + "promisify-node": { + "version": "0.3.0", + "from": "promisify-node@>=0.3.0 <0.4.0", + "resolved": "https://registry.npmjs.org/promisify-node/-/promisify-node-0.3.0.tgz" + }, + "rimraf": { + "version": "2.6.1", + "from": "rimraf@>=2.2.8 <3.0.0", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz" + }, + "wrappy": { + "version": "1.0.2", + "from": "wrappy@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + } + } } } } diff --git a/package.json b/package.json index 09aaf0585e3cf..7a5ecb7565ed5 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "code-oss-dev", - "version": "1.12.0", + "version": "1.15.0", "electronVersion": "1.6.6", - "distro": "7a7491277aec9196cb60398d9dbe8520093ed862", + "distro": "3d527860a13c6374d293f95ac2b8d26338d5f428", "author": { "name": "Microsoft Corporation" }, @@ -16,7 +16,10 @@ "watch": "gulp watch --max_old_space_size=4096", "monaco-editor-setup": "node scripts/monaco-editor-setup.js", "monaco-editor-test": "mocha --only-monaco-editor", - "precommit": "node build/gulpfile.hygiene.js" + "precommit": "node build/gulpfile.hygiene.js", + "gulp": "gulp --max_old_space_size=4096", + "7z": "7z", + "update-grammars": "node build/npm/update-all-grammars.js" }, "dependencies": { "applicationinsights": "0.17.1", @@ -31,18 +34,20 @@ "iconv-lite": "0.4.15", "jschardet": "^1.4.2", "minimist": "1.2.0", - "native-keymap": "1.2.2", - "node-pty": "0.6.4", + "native-keymap": "1.2.4", + "node-pty": "0.6.8", + "nsfw": "1.0.15", "semver": "4.3.6", "v8-profiler": "jrieken/v8-profiler#vscode", - "vscode-debugprotocol": "1.19.0", + "vscode-debugprotocol": "1.21.0", "vscode-ripgrep": "0.0.12", - "vscode-textmate": "^3.1.4", + "vscode-textmate": "^3.1.5", "winreg": "1.2.0", - "xterm": "Tyriar/xterm.js#vscode-release/1.12", + "xterm": "Tyriar/xterm.js#vscode-release/1.14", "yauzl": "2.3.1" }, "devDependencies": { + "7zip": "0.0.6", "@types/minimist": "^1.2.0", "@types/mocha": "^2.2.39", "@types/semver": "^5.3.30", @@ -54,18 +59,20 @@ "cson-parser": "^1.3.3", "debounce": "^1.0.0", "documentdb": "^1.5.1", + "electron-mksnapshot": "1.6.0", "eslint": "^3.4.0", "event-stream": "^3.1.7", "express": "^4.13.1", "flatpak-bundler": "^0.1.1", "glob": "^5.0.13", "gulp": "^3.8.9", - "gulp-atom-electron": "^1.9.0", + "gulp-atom-electron": "^1.11.0", "gulp-azure-storage": "^0.7.0", "gulp-bom": "^1.0.0", "gulp-buffer": "0.0.2", "gulp-concat": "^2.6.0", "gulp-cssnano": "^2.1.0", + "gulp-eslint": "^3.0.1", "gulp-filter": "^3.0.0", "gulp-flatmap": "^1.0.0", "gulp-image-resize": "^0.10.0", @@ -78,7 +85,7 @@ "gulp-sourcemaps": "^1.11.0", "gulp-tsb": "^2.0.3", "gulp-tslint": "^7.0.1", - "gulp-uglify": "^2.0.0", + "gulp-uglify": "^3.0.0", "gulp-util": "^3.0.6", "gulp-vinyl-zip": "^1.2.2", "husky": "^0.13.1", @@ -100,12 +107,13 @@ "sinon": "^1.17.2", "source-map": "^0.4.4", "tslint": "^4.3.1", - "typescript": "2.2.2", + "typescript": "2.3.3", "typescript-formatter": "4.0.1", - "uglify-js": "2.4.8", + "uglify-es": "^3.0.18", "underscore": "^1.8.2", "vinyl": "^0.4.5", "vinyl-fs": "^2.4.3", + "vsce": "^1.25.1", "vscode-nls-dev": "^2.0.1" }, "repository": { @@ -120,4 +128,4 @@ "windows-mutex": "^0.2.0", "fsevents": "0.3.8" } -} \ No newline at end of file +} diff --git a/scripts/env.ps1 b/scripts/env.ps1 new file mode 100644 index 0000000000000..afd26f17baab6 --- /dev/null +++ b/scripts/env.ps1 @@ -0,0 +1,3 @@ +$env:npm_config_disturl="https://atom.io/download/electron" +$env:npm_config_target=(node -p "require('./package.json').electronVersion") +$env:npm_config_runtime="electron" \ No newline at end of file diff --git a/scripts/env.sh b/scripts/env.sh new file mode 100755 index 0000000000000..35d09f66bb2c4 --- /dev/null +++ b/scripts/env.sh @@ -0,0 +1,6 @@ +#!/bin/bash +export npm_config_disturl=https://atom.io/download/electron +export npm_config_target=$(node -p "require('./package.json').electronVersion") +export npm_config_runtime=electron +export npm_config_cache="$HOME/.npm-electron" +mkdir -p "$npm_config_cache" \ No newline at end of file diff --git a/scripts/npm.bat b/scripts/npm.bat index 943404a1078b9..3fc75df7b0e7a 100644 --- a/scripts/npm.bat +++ b/scripts/npm.bat @@ -1,12 +1,8 @@ @echo off setlocal - -set npm_config_disturl="https://atom.io/download/atom-shell" +set npm_config_disturl="https://atom.io/download/electron" for /f "tokens=2 delims=:, " %%a in ('findstr /R /C:"\"electronVersion\":.*" "%~dp0..\package.json"') do set npm_config_target=%%~a -set npm_config_arch="ia32" set npm_config_runtime="electron" -set HOME=~\.electron-gyp - +set npm_config_cache=~\.npm-electron npm %* - endlocal diff --git a/scripts/npm.sh b/scripts/npm.sh index b56ec27c7fd3d..69c6d0c48aec6 100755 --- a/scripts/npm.sh +++ b/scripts/npm.sh @@ -22,7 +22,7 @@ ELECTRON_VERSION=$( ELECTRON_GYP_HOME=~/.electron-gyp mkdir -p $ELECTRON_GYP_HOME -npm_config_disturl=https://atom.io/download/atom-shell \ +npm_config_disturl=https://atom.io/download/electron \ npm_config_target=$ELECTRON_VERSION \ npm_config_runtime=electron \ HOME=$ELECTRON_GYP_HOME \ diff --git a/scripts/test.bat b/scripts/test.bat index 0f7ce8e9a853e..6ac41fcc36e6a 100644 --- a/scripts/test.bat +++ b/scripts/test.bat @@ -5,12 +5,22 @@ set ELECTRON_RUN_AS_NODE= pushd %~dp0\.. +:: Get Code.exe location for /f "tokens=2 delims=:," %%a in ('findstr /R /C:"\"nameShort\":.*" product.json') do set NAMESHORT=%%~a set NAMESHORT=%NAMESHORT: "=% set NAMESHORT=%NAMESHORT:"=%.exe set CODE=".build\electron\%NAMESHORT%" -rem Run tests in electron +:: Download Electron if needed +for /f "tokens=2 delims=:," %%a in ('findstr /R /C:"\"electronVersion\":.*" package.json') do set DESIREDVERSION=%%~a +set DESIREDVERSION=%DESIREDVERSION: "=% +set DESIREDVERSION=v%DESIREDVERSION:"=% +if exist .\.build\electron\version (set /p INSTALLEDVERSION=<.\.build\electron\version) else (set INSTALLEDVERSION="") + +if not exist %CODE% node .\node_modules\gulp\bin\gulp.js electron +if not "%INSTALLEDVERSION%" == "%DESIREDVERSION%" node .\node_modules\gulp\bin\gulp.js electron + +:: Run tests %CODE% .\test\electron\index.js %* popd diff --git a/scripts/test.sh b/scripts/test.sh index ebe3977419312..0812c9345fdf7 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -1,5 +1,6 @@ #!/bin/bash + if [[ "$OSTYPE" == "darwin"* ]]; then realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; } ROOT=$(dirname $(dirname $(realpath "$0"))) @@ -26,18 +27,8 @@ test -d node_modules || ./scripts/npm.sh install # Get electron (test -f "$CODE" && [ $INTENDED_VERSION == $INSTALLED_VERSION ]) || ./node_modules/.bin/gulp electron -# Build -test -d out || ./node_modules/.bin/gulp compile -echo "code $CODE" - # Unit Tests -export VSCODE_DEV=1 - -if [[ "$1" == "--xvfb" ]]; then - cd $ROOT ; \ - xvfb-run "$CODE" test/electron/index.js "$@" - -elif [[ "$OSTYPE" == "darwin"* ]]; then +if [[ "$OSTYPE" == "darwin"* ]]; then cd $ROOT ; ulimit -n 4096 ; \ "$CODE" \ test/electron/index.js "$@" diff --git a/src/.eslintrc b/src/.eslintrc index d84b7b2534d67..c25b0d558c2c3 100644 --- a/src/.eslintrc +++ b/src/.eslintrc @@ -1,14 +1,19 @@ { + "parserOptions": { + "ecmaVersion": 6 + }, "env": { "node": true, - "es6": false + "es6": true, + "browser": true, + "amd": true }, "rules": { "no-console": 0, "no-cond-assign": 0, - "no-unused-vars": 1, - "no-extra-semi": "warn", - "semi": "warn" - }, - "extends": "eslint:recommended" + "no-unused-vars": "error", + "no-extra-semi": "error", + "semi": "error", + "no-inner-declarations": 0 + } } \ No newline at end of file diff --git a/src/bootstrap.js b/src/bootstrap.js index 022aa50b6a368..3f94abadd31cd 100644 --- a/src/bootstrap.js +++ b/src/bootstrap.js @@ -126,4 +126,16 @@ if (process.env['VSCODE_PARENT_PID']) { } } +const crashReporterOptionsRaw = process.env['CRASH_REPORTER_START_OPTIONS']; +if (typeof crashReporterOptionsRaw === 'string') { + try { + const crashReporterOptions = JSON.parse(crashReporterOptionsRaw); + if (crashReporterOptions) { + process.crashReporter.start(crashReporterOptions); + } + } catch (error) { + console.error(error); + } +} + require('./bootstrap-amd').bootstrap(process.env['AMD_ENTRYPOINT']); \ No newline at end of file diff --git a/src/main.js b/src/main.js index 60070c76804ba..0f17a6da5542a 100644 --- a/src/main.js +++ b/src/main.js @@ -16,6 +16,9 @@ if (process.argv.indexOf('--prof-startup') >= 0) { // in certain locales (e.g. PL), image metrics are wrongly computed. We explicitly set the // LC_NUMERIC to prevent this from happening (selects the numeric formatting category of the // C locale, http://en.cppreference.com/w/cpp/locale/LC_categories). TODO@Ben temporary. +if (process.env.LC_ALL) { + process.env.LC_ALL = 'C'; +} process.env.LC_NUMERIC = 'C'; // Perf measurements @@ -139,7 +142,7 @@ function getNodeCachedDataDir() { var dir = path.join(app.getPath('userData'), 'CachedData', productJson.commit); - return mkdirp(dir).then(undefined, function (err) { /*ignore*/ }); + return mkdirp(dir).then(undefined, function () { /*ignore*/ }); } function mkdirp(dir) { diff --git a/src/tsconfig.json b/src/tsconfig.json index 0784a90d847b2..ed888ce8a0f47 100644 --- a/src/tsconfig.json +++ b/src/tsconfig.json @@ -12,8 +12,7 @@ "noImplicitReturns": true, "baseUrl": ".", "typeRoots": [ - "typings", - "../node_modules/@types" + "typings" ] } -} +} \ No newline at end of file diff --git a/src/typings/chokidar.d.ts b/src/typings/chokidar.d.ts index 719eae1ea0659..019a9e80e6c22 100644 --- a/src/typings/chokidar.d.ts +++ b/src/typings/chokidar.d.ts @@ -57,6 +57,11 @@ declare module 'chokidar' { * (default: true). When false, only the symlinks themselves will be watched for changes instead of following the link references and bubbling events through the link's path. */ followSymlinks?: boolean; + + /** + * (default: false). If set to true then the strings passed to .watch() and .add() are treated as literal path names, even if they look like globs. + */ + disableGlobbing?: boolean; } export interface FSWatcher { diff --git a/src/typings/electron.d.ts b/src/typings/electron.d.ts index e85bb7d346fdf..05aab3a81619f 100644 --- a/src/typings/electron.d.ts +++ b/src/typings/electron.d.ts @@ -2066,6 +2066,13 @@ declare namespace Electron { * Only string properties are sent correctly, nested objects are not supported. */ extra?: { [prop: string]: string }; + + /** + * Path to a folder where the crashes will be temporarily stored by the electron crash reporter + * Applies only to child processes that need crash reporting. + * Electron figures out the crashesDirectory on its own for Main and Renderer process + */ + crashesDirectory?: string; } interface CrashReport { @@ -4466,7 +4473,7 @@ declare namespace Electron { /** * Sets the maximum and minimum zoom level. */ - setZoomLevelLimits(minimumLevel: number, maximumLevel: number): void; + setVisualZoomLevelLimits(minimumLevel: number, maximumLevel: number): void; /** * Executes the editing command undo in web page. */ @@ -5161,7 +5168,7 @@ declare namespace Electron { /** * Sets the maximum and minimum zoom level. */ - setZoomLevelLimits(minimumLevel: number, maximumLevel: number): void; + setVisualZoomLevelLimits(minimumLevel: number, maximumLevel: number): void; /** * Sets a provider for spell checking in input fields and text areas. */ diff --git a/src/typings/minimist.d.ts b/src/typings/minimist.d.ts new file mode 100644 index 0000000000000..d1e1a05252ac6 --- /dev/null +++ b/src/typings/minimist.d.ts @@ -0,0 +1,35 @@ +// Type definitions for minimist 1.1.3 +// Project: https://github.com/substack/minimist +// Definitions by: Bart van der Schoor , Necroskillz +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module 'minimist' { + function minimist(args?: string[], opts?: minimist.Opts): minimist.ParsedArgs; + + namespace minimist { + export interface Opts { + // a string or array of strings argument names to always treat as strings + string?: string | string[]; + // a string or array of strings to always treat as booleans + boolean?: boolean | string | string[]; + // an object mapping string names to strings or arrays of string argument names to use + alias?: { [key: string]: string | string[] }; + // an object mapping string argument names to default values + default?: { [key: string]: any }; + // when true, populate argv._ with everything after the first non-option + stopEarly?: boolean; + // a function which is invoked with a command line parameter not defined in the opts configuration object. + // If the function returns false, the unknown option is not added to argv + unknown?: (arg: string) => boolean; + // when true, populate argv._ with everything before the -- and argv['--'] with everything after the -- + '--'?: boolean; + } + + export interface ParsedArgs { + [arg: string]: any; + _: string[]; + } + } + + export = minimist; +} diff --git a/src/typings/mocha.d.ts b/src/typings/mocha.d.ts new file mode 100644 index 0000000000000..e4bddbd49b91a --- /dev/null +++ b/src/typings/mocha.d.ts @@ -0,0 +1,234 @@ +// Type definitions for mocha 2.2.5 +// Project: http://mochajs.org/ +// Definitions by: Kazi Manzur Rashid , otiai10 , jt000 , Vadim Macagon +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface MochaSetupOptions { + //milliseconds to wait before considering a test slow + slow?: number; + + // timeout in milliseconds + timeout?: number; + + // ui name "bdd", "tdd", "exports" etc + ui?: string; + + //array of accepted globals + globals?: any[]; + + // reporter instance (function or string), defaults to `mocha.reporters.Spec` + reporter?: any; + + // bail on the first test failure + bail?: boolean; + + // ignore global leaks + ignoreLeaks?: boolean; + + // grep string or regexp to filter tests with + grep?: any; +} + +declare var mocha: Mocha; +declare var describe: Mocha.IContextDefinition; +declare var xdescribe: Mocha.IContextDefinition; +// alias for `describe` +declare var context: Mocha.IContextDefinition; +// alias for `describe` +declare var suite: Mocha.IContextDefinition; +declare var it: Mocha.ITestDefinition; +declare var xit: Mocha.ITestDefinition; +// alias for `it` +declare var test: Mocha.ITestDefinition; +declare var specify: Mocha.ITestDefinition; + +// Used with the --delay flag; see https://mochajs.org/#hooks +declare function run(): void; + +interface MochaDone { + (error?: any): any; +} + +declare function setup(callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => any): void; +declare function teardown(callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => any): void; +declare function suiteSetup(callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void; +declare function suiteTeardown(callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void; +declare function before(callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void; +declare function before(description: string, callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void; +declare function after(callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void; +declare function after(description: string, callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void; +declare function beforeEach(callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => any): void; +declare function beforeEach(description: string, callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => any): void; +declare function afterEach(callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => any): void; +declare function afterEach(description: string, callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => any): void; + +declare class Mocha { + currentTest: Mocha.ITestDefinition; + constructor(options?: { + grep?: RegExp; + ui?: string; + reporter?: string; + timeout?: number; + reporterOptions?: any; + slow?: number; + bail?: boolean; + }); + + /** Setup mocha with the given options. */ + setup(options: MochaSetupOptions): Mocha; + bail(value?: boolean): Mocha; + addFile(file: string): Mocha; + /** Sets reporter by name, defaults to "spec". */ + reporter(name: string): Mocha; + /** Sets reporter constructor, defaults to mocha.reporters.Spec. */ + reporter(reporter: (runner: Mocha.IRunner, options: any) => any): Mocha; + ui(value: string): Mocha; + grep(value: string): Mocha; + grep(value: RegExp): Mocha; + invert(): Mocha; + ignoreLeaks(value: boolean): Mocha; + checkLeaks(): Mocha; + /** + * Function to allow assertion libraries to throw errors directly into mocha. + * This is useful when running tests in a browser because window.onerror will + * only receive the 'message' attribute of the Error. + */ + throwError(error: Error): void; + /** Enables growl support. */ + growl(): Mocha; + globals(value: string): Mocha; + globals(values: string[]): Mocha; + useColors(value: boolean): Mocha; + useInlineDiffs(value: boolean): Mocha; + timeout(value: number): Mocha; + slow(value: number): Mocha; + enableTimeouts(value: boolean): Mocha; + asyncOnly(value: boolean): Mocha; + noHighlighting(value: boolean): Mocha; + /** Runs tests and invokes `onComplete()` when finished. */ + run(onComplete?: (failures: number) => void): Mocha.IRunner; +} + +// merge the Mocha class declaration with a module +declare namespace Mocha { + interface ISuiteCallbackContext { + timeout(ms: number): this; + retries(n: number): this; + slow(ms: number): this; + } + + interface IHookCallbackContext { + skip(): this; + timeout(ms: number): this; + [index: string]: any; + } + + + interface ITestCallbackContext { + skip(): this; + timeout(ms: number): this; + retries(n: number): this; + slow(ms: number): this; + [index: string]: any; + } + + /** Partial interface for Mocha's `Runnable` class. */ + interface IRunnable { + title: string; + fn: Function; + async: boolean; + sync: boolean; + timedOut: boolean; + timeout(n: number): this; + } + + /** Partial interface for Mocha's `Suite` class. */ + interface ISuite { + parent: ISuite; + title: string; + + fullTitle(): string; + } + + /** Partial interface for Mocha's `Test` class. */ + interface ITest extends IRunnable { + parent: ISuite; + pending: boolean; + state: 'failed'|'passed'|undefined; + + fullTitle(): string; + } + + interface IBeforeAndAfterContext extends IHookCallbackContext { + currentTest: ITest; + } + + + /** Partial interface for Mocha's `Runner` class. */ + interface IRunner { } + + interface IContextDefinition { + (description: string, callback: (this: ISuiteCallbackContext) => void): ISuite; + only(description: string, callback: (this: ISuiteCallbackContext) => void): ISuite; + skip(description: string, callback: (this: ISuiteCallbackContext) => void): void; + timeout(ms: number): void; + } + + interface ITestDefinition { + (expectation: string, callback?: (this: ITestCallbackContext, done: MochaDone) => any): ITest; + only(expectation: string, callback?: (this: ITestCallbackContext, done: MochaDone) => any): ITest; + skip(expectation: string, callback?: (this: ITestCallbackContext, done: MochaDone) => any): void; + timeout(ms: number): void; + state: "failed" | "passed"; + } + + export module reporters { + export class Base { + stats: { + suites: number; + tests: number; + passes: number; + pending: number; + failures: number; + }; + + constructor(runner: IRunner); + } + + export class Doc extends Base { } + export class Dot extends Base { } + export class HTML extends Base { } + export class HTMLCov extends Base { } + export class JSON extends Base { } + export class JSONCov extends Base { } + export class JSONStream extends Base { } + export class Landing extends Base { } + export class List extends Base { } + export class Markdown extends Base { } + export class Min extends Base { } + export class Nyan extends Base { } + export class Progress extends Base { + /** + * @param options.open String used to indicate the start of the progress bar. + * @param options.complete String used to indicate a complete test on the progress bar. + * @param options.incomplete String used to indicate an incomplete test on the progress bar. + * @param options.close String used to indicate the end of the progress bar. + */ + constructor(runner: IRunner, options?: { + open?: string; + complete?: string; + incomplete?: string; + close?: string; + }); + } + export class Spec extends Base { } + export class TAP extends Base { } + export class XUnit extends Base { + constructor(runner: IRunner, options?: any); + } + } +} + +declare module "mocha" { + export = Mocha; +} \ No newline at end of file diff --git a/src/typings/native-keymap.d.ts b/src/typings/native-keymap.d.ts index 807935bbb49ff..092191dd75973 100644 --- a/src/typings/native-keymap.d.ts +++ b/src/typings/native-keymap.d.ts @@ -65,5 +65,7 @@ declare module 'native-keymap' { export function getCurrentKeyboardLayout(): IKeyboardLayoutInfo; - export function onDidChangeKeyboardLayout(callback: () => void); + export function onDidChangeKeyboardLayout(callback: () => void): void; + + export function isISOKeyboard(): boolean; } \ No newline at end of file diff --git a/src/typings/node-pty.d.ts b/src/typings/node-pty.d.ts index ef417f1156ed7..e09b1eb47e5ac 100644 --- a/src/typings/node-pty.d.ts +++ b/src/typings/node-pty.d.ts @@ -9,9 +9,11 @@ declare module 'node-pty' { export function createTerminal(file: string, args: string[], options: any): Terminal; export interface Terminal { + pid: number; + /** * The title of the active process. - */ + */ process: string; on(event: string, callback: (data: any) => void): void; @@ -19,5 +21,7 @@ declare module 'node-pty' { resize(columns: number, rows: number): void; write(data: string): void; + + kill(): void; } } \ No newline at end of file diff --git a/src/typings/node.d.ts b/src/typings/node.d.ts index aa5953d8f15fd..8c33c5a8412b5 100644 --- a/src/typings/node.d.ts +++ b/src/typings/node.d.ts @@ -88,10 +88,10 @@ interface NodeModule { // Same as module.exports declare var exports: any; declare var SlowBuffer: { - new (str: string, encoding?: string): Buffer; - new (size: number): Buffer; - new (size: Uint8Array): Buffer; - new (array: any[]): Buffer; + new(str: string, encoding?: string): Buffer; + new(size: number): Buffer; + new(size: Uint8Array): Buffer; + new(array: any[]): Buffer; prototype: Buffer; isBuffer(obj: any): boolean; byteLength(string: string, encoding?: string): number; @@ -115,19 +115,19 @@ declare var Buffer: { * @param str String to store in buffer. * @param encoding encoding to use, optional. Default is 'utf8' */ - new (str: string, encoding?: string): Buffer; + new(str: string, encoding?: string): Buffer; /** * Allocates a new buffer of {size} octets. * * @param size count of octets to allocate. */ - new (size: number): Buffer; + new(size: number): Buffer; /** * Allocates a new buffer containing the given {array} of octets. * * @param array The octets to store. */ - new (array: Uint8Array): Buffer; + new(array: Uint8Array): Buffer; /** * Produces a Buffer backed by the same allocated memory as * the given {ArrayBuffer}. @@ -135,19 +135,19 @@ declare var Buffer: { * * @param arrayBuffer The ArrayBuffer with which to share memory. */ - new (arrayBuffer: ArrayBuffer): Buffer; + new(arrayBuffer: ArrayBuffer): Buffer; /** * Allocates a new buffer containing the given {array} of octets. * * @param array The octets to store. */ - new (array: any[]): Buffer; + new(array: any[]): Buffer; /** * Copies the passed {buffer} data onto a new {Buffer} instance. * * @param buffer The buffer to copy. */ - new (buffer: Buffer): Buffer; + new(buffer: Buffer): Buffer; prototype: Buffer; /** * Allocates a new Buffer using an {array} of octets. @@ -250,7 +250,7 @@ declare var Buffer: { declare namespace NodeJS { export var Console: { prototype: Console; - new (stdout: WritableStream, stderr?: WritableStream): Console; + new(stdout: WritableStream, stderr?: WritableStream): Console; } export interface ErrnoException extends Error { @@ -1324,7 +1324,7 @@ declare module "https" { } export var Agent: { - new (options?: AgentOptions): Agent; + new(options?: AgentOptions): Agent; }; export interface Server extends tls.Server { } export function createServer(options: ServerOptions, requestListener?: Function): Server; @@ -1959,7 +1959,7 @@ declare module "net" { } export var Socket: { - new (options?: { fd?: string; type?: string; allowHalfOpen?: boolean; }): Socket; + new(options?: { fd?: string; type?: string; allowHalfOpen?: boolean; }): Socket; }; export interface ListenOptions { @@ -2464,6 +2464,7 @@ declare module "fs" { */ export function readFileSync(filename: string, options?: { flag?: string; }): Buffer; export function writeFile(filename: string | number, data: any, callback?: (err: NodeJS.ErrnoException) => void): void; + export function writeFile(filename: string | number, data: any, options: string, callback?: (err: NodeJS.ErrnoException) => void): void; export function writeFile(filename: string | number, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void; export function writeFile(filename: string | number, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void; export function writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void; @@ -2780,7 +2781,7 @@ declare module "string_decoder" { end(buffer?: Buffer): string; } export var StringDecoder: { - new (encoding?: string): NodeStringDecoder; + new(encoding?: string): NodeStringDecoder; }; } @@ -3184,7 +3185,7 @@ declare module "crypto" { verifySpkac(spkac: Buffer): boolean; } export var Certificate: { - new (): Certificate; + new(): Certificate; (): Certificate; } @@ -4128,6 +4129,6 @@ declare module "_debugger" { } export var Client: { - new (): ClientInstance + new(): ClientInstance } } diff --git a/src/typings/nsfw.d.ts b/src/typings/nsfw.d.ts new file mode 100644 index 0000000000000..d7d23f3c2b7ae --- /dev/null +++ b/src/typings/nsfw.d.ts @@ -0,0 +1,40 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +declare module 'nsfw' { + interface NsfwWatcher { + start(): any; + stop(): any; + } + + interface NsfwWatchingPromise { + then(): void; + } + + interface NsfwStartWatchingPromise { + then(fn: (watcher: NsfwWatcher) => void): NsfwWatchingPromise; + } + + interface NsfwEvent { + action: number; + directory: string; + file?: string; + newFile?: string; + oldFile?: string; + } + + interface NsfwFunction { + (dir: string, eventHandler: (events: NsfwEvent[]) => void, options?: any): NsfwStartWatchingPromise; + actions: { + CREATED: number; + DELETED: number; + MODIFIED: number; + RENAMED: number; + } + } + + var nsfw: NsfwFunction; + export = nsfw; +} diff --git a/src/typings/semver.d.ts b/src/typings/semver.d.ts new file mode 100644 index 0000000000000..129a83e21fa44 --- /dev/null +++ b/src/typings/semver.d.ts @@ -0,0 +1,125 @@ +// Type definitions for semver v2.2.1 +// Project: https://github.com/isaacs/node-semver +// Definitions by: Bart van der Schoor +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module SemVerModule { + /** + * Return the parsed version, or null if it's not valid. + */ + function valid(v: string, loose?: boolean): string; + /** + * Return the version incremented by the release type (major, minor, patch, or prerelease), or null if it's not valid. + */ + function inc(v: string, release: string, loose?: boolean): string; + + // Comparison + /** + * v1 > v2 + */ + function gt(v1: string, v2: string, loose?: boolean): boolean; + /** + * v1 >= v2 + */ + function gte(v1: string, v2: string, loose?: boolean): boolean; + /** + * v1 < v2 + */ + function lt(v1: string, v2: string, loose?: boolean): boolean; + /** + * v1 <= v2 + */ + function lte(v1: string, v2: string, loose?: boolean): boolean; + /** + * v1 == v2 This is true if they're logically equivalent, even if they're not the exact same string. You already know how to compare strings. + */ + function eq(v1: string, v2: string, loose?: boolean): boolean; + /** + * v1 != v2 The opposite of eq. + */ + function neq(v1: string, v2: string, loose?: boolean): boolean; + /** + * Pass in a comparison string, and it'll call the corresponding semver comparison function. "===" and "!==" do simple string comparison, but are included for completeness. Throws if an invalid comparison string is provided. + */ + function cmp(v1: string, comparator: any, v2: string, loose?: boolean): boolean; + /** + * Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if v2 is greater. Sorts in ascending order if passed to Array.sort(). + */ + function compare(v1: string, v2: string, loose?: boolean): number; + /** + * The reverse of compare. Sorts an array of versions in descending order when passed to Array.sort(). + */ + function rcompare(v1: string, v2: string, loose?: boolean): number; + + // Ranges + /** + * Return the valid range or null if it's not valid + */ + function validRange(range: string, loose?: boolean): string; + /** + * Return true if the version satisfies the range. + */ + function satisfies(version: string, range: string, loose?: boolean): boolean; + /** + * Return the highest version in the list that satisfies the range, or null if none of them do. + */ + function maxSatisfying(versions: string[], range: string, loose?: boolean): string; + /** + * Return true if version is greater than all the versions possible in the range. + */ + function gtr(version: string, range: string, loose?: boolean): boolean; + /** + * Return true if version is less than all the versions possible in the range. + */ + function ltr(version: string, range: string, loose?: boolean): boolean; + /** + * Return true if the version is outside the bounds of the range in either the high or low direction. The hilo argument must be either the string '>' or '<'. (This is the function called by gtr and ltr.) + */ + function outside(version: string, range: string, hilo: string, loose?: boolean): boolean; + + class SemVerBase { + raw: string; + loose: boolean; + format(): string; + inspect(): string; + toString(): string; + } + + class SemVer extends SemVerBase { + constructor(version: string, loose?: boolean); + + major: number; + minor: number; + patch: number; + version: string; + build: string[]; + prerelease: string[]; + + compare(other: SemVer): number; + compareMain(other: SemVer): number; + comparePre(other: SemVer): number; + inc(release: string): SemVer; + } + + class Comparator extends SemVerBase { + constructor(comp: string, loose?: boolean); + + semver: SemVer; + operator: string; + value: boolean; + parse(comp: string): void; + test(version: SemVer): boolean; + } + + class Range extends SemVerBase { + constructor(range: string, loose?: boolean); + + set: Comparator[][]; + parseRange(range: string): Comparator[]; + test(version: SemVer): boolean; + } +} + +declare module "semver" { + export = SemVerModule; +} diff --git a/src/typings/sinon.d.ts b/src/typings/sinon.d.ts new file mode 100644 index 0000000000000..0ca6c3840a063 --- /dev/null +++ b/src/typings/sinon.d.ts @@ -0,0 +1,448 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Type definitions for Sinon 1.16.0 +// Project: http://sinonjs.org/ +// Definitions by: William Sears +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module '~sinon/lib/sinon' { + module Sinon { + export interface SinonSpyCallApi { + // Properties + thisValue: any; + args: any[]; + exception: any; + returnValue: any; + + // Methods + calledOn(obj: any): boolean; + calledWith(...args: any[]): boolean; + calledWithExactly(...args: any[]): boolean; + calledWithMatch(...args: any[]): boolean; + notCalledWith(...args: any[]): boolean; + notCalledWithMatch(...args: any[]): boolean; + returned(value: any): boolean; + threw(): boolean; + threw(type: string): boolean; + threw(obj: any): boolean; + callArg(pos: number): void; + callArgOn(pos: number, obj: any, ...args: any[]): void; + callArgWith(pos: number, ...args: any[]): void; + callArgOnWith(pos: number, obj: any, ...args: any[]): void; + yield(...args: any[]): void; + yieldOn(obj: any, ...args: any[]): void; + yieldTo(property: string, ...args: any[]): void; + yieldToOn(property: string, obj: any, ...args: any[]): void; + } + + export interface SinonSpyCall extends SinonSpyCallApi { + calledBefore(call: SinonSpyCall): boolean; + calledAfter(call: SinonSpyCall): boolean; + calledWithNew(call: SinonSpyCall): boolean; + } + + export interface SinonSpy extends SinonSpyCallApi { + // Properties + callCount: number; + called: boolean; + notCalled: boolean; + calledOnce: boolean; + calledTwice: boolean; + calledThrice: boolean; + firstCall: SinonSpyCall; + secondCall: SinonSpyCall; + thirdCall: SinonSpyCall; + lastCall: SinonSpyCall; + thisValues: any[]; + args: any[][]; + exceptions: any[]; + returnValues: any[]; + + // Methods + (...args: any[]): any; + calledBefore(anotherSpy: SinonSpy): boolean; + calledAfter(anotherSpy: SinonSpy): boolean; + calledWithNew(spy: SinonSpy): boolean; + withArgs(...args: any[]): SinonSpy; + alwaysCalledOn(obj: any): boolean; + alwaysCalledWith(...args: any[]): boolean; + alwaysCalledWithExactly(...args: any[]): boolean; + alwaysCalledWithMatch(...args: any[]): boolean; + neverCalledWith(...args: any[]): boolean; + neverCalledWithMatch(...args: any[]): boolean; + alwaysThrew(): boolean; + alwaysThrew(type: string): boolean; + alwaysThrew(obj: any): boolean; + alwaysReturned(): boolean; + invokeCallback(...args: any[]): void; + getCall(n: number): SinonSpyCall; + getCalls(): SinonSpyCall[]; + reset(): void; + printf(format: string, ...args: any[]): string; + restore(): void; + } + + export interface SinonSpyStatic { + (): SinonSpy; + (func: any): SinonSpy; + (obj: any, method: string): SinonSpy; + } + + export interface SinonStatic { + spy: SinonSpyStatic; + } + + export interface SinonStub extends SinonSpy { + resetBehavior(): void; + returns(obj: any): SinonStub; + returnsArg(index: number): SinonStub; + returnsThis(): SinonStub; + throws(type?: string): SinonStub; + throws(obj: any): SinonStub; + callsArg(index: number): SinonStub; + callsArgOn(index: number, context: any): SinonStub; + callsArgWith(index: number, ...args: any[]): SinonStub; + callsArgOnWith(index: number, context: any, ...args: any[]): SinonStub; + callsArgAsync(index: number): SinonStub; + callsArgOnAsync(index: number, context: any): SinonStub; + callsArgWithAsync(index: number, ...args: any[]): SinonStub; + callsArgOnWithAsync(index: number, context: any, ...args: any[]): SinonStub; + onCall(n: number): SinonStub; + onFirstCall(): SinonStub; + onSecondCall(): SinonStub; + onThirdCall(): SinonStub; + yields(...args: any[]): SinonStub; + yieldsOn(context: any, ...args: any[]): SinonStub; + yieldsTo(property: string, ...args: any[]): SinonStub; + yieldsToOn(property: string, context: any, ...args: any[]): SinonStub; + yieldsAsync(...args: any[]): SinonStub; + yieldsOnAsync(context: any, ...args: any[]): SinonStub; + yieldsToAsync(property: string, ...args: any[]): SinonStub; + yieldsToOnAsync(property: string, context: any, ...args: any[]): SinonStub; + withArgs(...args: any[]): SinonStub; + } + + export interface SinonStubStatic { + (): SinonStub; + (obj: any): SinonStub; + (obj: any, method: string): SinonStub; + (obj: any, method: string, func: any): SinonStub; + } + + export interface SinonStatic { + stub: SinonStubStatic; + } + + export interface SinonExpectation extends SinonStub { + atLeast(n: number): SinonExpectation; + atMost(n: number): SinonExpectation; + never(): SinonExpectation; + once(): SinonExpectation; + twice(): SinonExpectation; + thrice(): SinonExpectation; + exactly(n: number): SinonExpectation; + withArgs(...args: any[]): SinonExpectation; + withExactArgs(...args: any[]): SinonExpectation; + on(obj: any): SinonExpectation; + verify(): SinonExpectation; + restore(): void; + } + + export interface SinonExpectationStatic { + create(methodName?: string): SinonExpectation; + } + + export interface SinonMock { + expects(method: string): SinonExpectation; + restore(): void; + verify(): void; + } + + export interface SinonMockStatic { + (): SinonExpectation; + (obj: any): SinonMock; + } + + export interface SinonStatic { + expectation: SinonExpectationStatic; + mock: SinonMockStatic; + } + + export interface SinonFakeTimers { + now: number; + create(now: number): SinonFakeTimers; + setTimeout(callback: (...args: any[]) => void, timeout: number, ...args: any[]): number; + clearTimeout(id: number): void; + setInterval(callback: (...args: any[]) => void, timeout: number, ...args: any[]): number; + clearInterval(id: number): void; + tick(ms: number): number; + reset(): void; + Date(): Date; + Date(year: number): Date; + Date(year: number, month: number): Date; + Date(year: number, month: number, day: number): Date; + Date(year: number, month: number, day: number, hour: number): Date; + Date(year: number, month: number, day: number, hour: number, minute: number): Date; + Date(year: number, month: number, day: number, hour: number, minute: number, second: number): Date; + Date(year: number, month: number, day: number, hour: number, minute: number, second: number, ms: number): Date; + restore(): void; + + /** + * Simulate the user changing the system clock while your program is running. It changes the 'now' timestamp + * without affecting timers, intervals or immediates. + * @param now The new 'now' in unix milliseconds + */ + setSystemTime(now: number): void; + /** + * Simulate the user changing the system clock while your program is running. It changes the 'now' timestamp + * without affecting timers, intervals or immediates. + * @param now The new 'now' as a JavaScript Date + */ + setSystemTime(date: Date): void; + } + + export interface SinonFakeTimersStatic { + (): SinonFakeTimers; + (...timers: string[]): SinonFakeTimers; + (now: number, ...timers: string[]): SinonFakeTimers; + } + + export interface SinonStatic { + useFakeTimers: SinonFakeTimersStatic; + clock: SinonFakeTimers; + } + + export interface SinonFakeUploadProgress { + eventListeners: { + progress: any[]; + load: any[]; + abort: any[]; + error: any[]; + }; + + addEventListener(event: string, listener: (e: Event) => any): void; + removeEventListener(event: string, listener: (e: Event) => any): void; + dispatchEvent(event: Event): void; + } + + export interface SinonFakeXMLHttpRequest { + // Properties + onCreate: (xhr: SinonFakeXMLHttpRequest) => void; + url: string; + method: string; + requestHeaders: any; + requestBody: string; + status: number; + statusText: string; + async: boolean; + username: string; + password: string; + withCredentials: boolean; + upload: SinonFakeUploadProgress; + responseXML: Document; + getResponseHeader(header: string): string; + getAllResponseHeaders(): any; + + // Methods + restore(): void; + useFilters: boolean; + addFilter(filter: (method: string, url: string, async: boolean, username: string, password: string) => boolean): void; + setResponseHeaders(headers: any): void; + setResponseBody(body: string): void; + respond(status: number, headers: any, body: string): void; + autoRespond(ms: number): void; + } + + export interface SinonFakeXMLHttpRequestStatic { + (): SinonFakeXMLHttpRequest; + } + + export interface SinonStatic { + useFakeXMLHttpRequest: SinonFakeXMLHttpRequestStatic; + FakeXMLHttpRequest: SinonFakeXMLHttpRequest; + } + + export interface SinonFakeServer { + // Properties + autoRespond: boolean; + autoRespondAfter: number; + fakeHTTPMethods: boolean; + getHTTPMethod: (request: SinonFakeXMLHttpRequest) => string; + requests: SinonFakeXMLHttpRequest[]; + respondImmediately: boolean; + + // Methods + respondWith(body: string): void; + respondWith(response: any[]): void; + respondWith(fn: (xhr: SinonFakeXMLHttpRequest) => void): void; + respondWith(url: string, body: string): void; + respondWith(url: string, response: any[]): void; + respondWith(url: string, fn: (xhr: SinonFakeXMLHttpRequest) => void): void; + respondWith(method: string, url: string, body: string): void; + respondWith(method: string, url: string, response: any[]): void; + respondWith(method: string, url: string, fn: (xhr: SinonFakeXMLHttpRequest) => void): void; + respondWith(url: RegExp, body: string): void; + respondWith(url: RegExp, response: any[]): void; + respondWith(url: RegExp, fn: (xhr: SinonFakeXMLHttpRequest) => void): void; + respondWith(method: string, url: RegExp, body: string): void; + respondWith(method: string, url: RegExp, response: any[]): void; + respondWith(method: string, url: RegExp, fn: (xhr: SinonFakeXMLHttpRequest) => void): void; + respond(): void; + restore(): void; + } + + export interface SinonFakeServerStatic { + create(): SinonFakeServer; + } + + export interface SinonStatic { + fakeServer: SinonFakeServerStatic; + fakeServerWithClock: SinonFakeServerStatic; + } + + export interface SinonExposeOptions { + prefix?: string; + includeFail?: boolean; + } + + export interface SinonAssert { + // Properties + failException: string; + fail: (message?: string) => void; // Overridable + pass: (assertion: any) => void; // Overridable + + // Methods + notCalled(spy: SinonSpy): void; + called(spy: SinonSpy): void; + calledOnce(spy: SinonSpy): void; + calledTwice(spy: SinonSpy): void; + calledThrice(spy: SinonSpy): void; + callCount(spy: SinonSpy, count: number): void; + callOrder(...spies: SinonSpy[]): void; + calledOn(spy: SinonSpy, obj: any): void; + alwaysCalledOn(spy: SinonSpy, obj: any): void; + calledWith(spy: SinonSpy, ...args: any[]): void; + alwaysCalledWith(spy: SinonSpy, ...args: any[]): void; + neverCalledWith(spy: SinonSpy, ...args: any[]): void; + calledWithExactly(spy: SinonSpy, ...args: any[]): void; + alwaysCalledWithExactly(spy: SinonSpy, ...args: any[]): void; + calledWithMatch(spy: SinonSpy, ...args: any[]): void; + alwaysCalledWithMatch(spy: SinonSpy, ...args: any[]): void; + neverCalledWithMatch(spy: SinonSpy, ...args: any[]): void; + threw(spy: SinonSpy): void; + threw(spy: SinonSpy, exception: string): void; + threw(spy: SinonSpy, exception: any): void; + alwaysThrew(spy: SinonSpy): void; + alwaysThrew(spy: SinonSpy, exception: string): void; + alwaysThrew(spy: SinonSpy, exception: any): void; + expose(obj: any, options?: SinonExposeOptions): void; + } + + export interface SinonStatic { + assert: SinonAssert; + } + + export interface SinonMatcher { + and(expr: SinonMatcher): SinonMatcher; + or(expr: SinonMatcher): SinonMatcher; + } + + export interface SinonMatch { + (value: number): SinonMatcher; + (value: string): SinonMatcher; + (expr: RegExp): SinonMatcher; + (obj: any): SinonMatcher; + (callback: (value: any) => boolean): SinonMatcher; + any: SinonMatcher; + defined: SinonMatcher; + truthy: SinonMatcher; + falsy: SinonMatcher; + bool: SinonMatcher; + number: SinonMatcher; + string: SinonMatcher; + object: SinonMatcher; + func: SinonMatcher; + array: SinonMatcher; + regexp: SinonMatcher; + date: SinonMatcher; + same(obj: any): SinonMatcher; + typeOf(type: string): SinonMatcher; + instanceOf(type: any): SinonMatcher; + has(property: string, expect?: any): SinonMatcher; + hasOwn(property: string, expect?: any): SinonMatcher; + } + + export interface SinonStatic { + match: SinonMatch; + } + + export interface SinonSandboxConfig { + injectInto?: any; + properties?: string[]; + useFakeTimers?: any; + useFakeServer?: any; + } + + export interface SinonSandbox { + clock: SinonFakeTimers; + requests: SinonFakeXMLHttpRequest; + server: SinonFakeServer; + spy: SinonSpyStatic; + stub: SinonStubStatic; + mock: SinonMockStatic; + useFakeTimers: SinonFakeTimersStatic; + useFakeXMLHttpRequest: SinonFakeXMLHttpRequestStatic; + useFakeServer(): SinonFakeServer; + restore(): void; + } + + export interface SinonSandboxStatic { + create(): SinonSandbox; + create(config: SinonSandboxConfig): SinonSandbox; + } + + export interface SinonStatic { + sandbox: SinonSandboxStatic; + } + + export interface SinonTestConfig { + injectIntoThis?: boolean; + injectInto?: any; + properties?: string[]; + useFakeTimers?: boolean; + useFakeServer?: boolean; + } + + export interface SinonTestWrapper extends SinonSandbox { + (...args: any[]): any; + } + + export interface SinonStatic { + config: SinonTestConfig; + test(fn: (...args: any[]) => any): SinonTestWrapper; + testCase(tests: any): any; + } + + // Utility overridables + export interface SinonStatic { + createStubInstance(constructor: any): SinonStub; + format(obj: any): string; + log(message: string): void; + restore(object: any): void; + } + } + + var Sinon: Sinon.SinonStatic; + + export = Sinon; +} +declare module 'sinon/lib/sinon' { + import main = require('~sinon/lib/sinon'); + export = main; +} +declare module 'sinon' { + import main = require('~sinon/lib/sinon'); + export = main; +} \ No newline at end of file diff --git a/src/typings/winreg.d.ts b/src/typings/winreg.d.ts new file mode 100644 index 0000000000000..70047d8b50f50 --- /dev/null +++ b/src/typings/winreg.d.ts @@ -0,0 +1,338 @@ +// Type definitions for Winreg v1.2.0 +// Project: http://fresc81.github.io/node-winreg/ +// Definitions by: RX14 , BobBuehler +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare var Winreg: WinregStatic; + +interface WinregStatic { + /** + * Creates a registry object, which provides access to a single registry key. + * Note: This class is returned by a call to ```require('winreg')```. + * + * @public + * @class + * + * @param {@link Options} options - the options + * + * @example + * var Registry = require('winreg') + * , autoStartCurrentUser = new Registry({ + * hive: Registry.HKCU, + * key: '\\Software\\Microsoft\\Windows\\CurrentVersion\\Run' + * }); + */ + new (options: Winreg.Options): Winreg.Registry; + + /** + * Registry hive key HKEY_LOCAL_MACHINE. + * Note: For writing to this hive your program has to run with admin privileges. + */ + HKLM: string; + + /** + * Registry hive key HKEY_CURRENT_USER. + */ + HKCU: string; + + /** + * Registry hive key HKEY_CLASSES_ROOT. + * Note: For writing to this hive your program has to run with admin privileges. + */ + HKCR: string; + + /** + * Registry hive key HKEY_USERS. + * Note: For writing to this hive your program has to run with admin privileges. + */ + HKU: string; + + /** + * Registry hive key HKEY_CURRENT_CONFIG. + * Note: For writing to this hive your program has to run with admin privileges. + */ + HKCC: string; + + /** + * Collection of available registry hive keys. + */ + HIVES: Array; + + /** + * Registry value type STRING. + * + * Values of this type contain a string. + */ + REG_SZ: string; + + /** + * Registry value type MULTILINE_STRING. + * + * Values of this type contain a multiline string. + */ + REG_MULTI_SZ: string; + + /** + * Registry value type EXPANDABLE_STRING. + * + * Values of this type contain an expandable string. + */ + REG_EXPAND_SZ: string; + + /** + * Registry value type DOUBLE_WORD. + * + * Values of this type contain a double word (32 bit integer). + */ + REG_DWORD: string; + + /** + * Registry value type QUAD_WORD. + * + * Values of this type contain a quad word (64 bit integer). + */ + REG_QWORD: string; + + /** + * Registry value type BINARY. + * + * Values of this type contain a binary value. + */ + REG_BINARY: string; + + /** + * Registry value type UNKNOWN. + * + * Values of this type contain a value of an unknown type. + */ + REG_NONE: string; + + /** + * Collection of available registry value types. + */ + REG_TYPES: Array; + + /** + * The name of the default value. May be used instead of the empty string literal for better readability. + */ + DEFAULT_VALUE: string; +} + +declare namespace Winreg { + export interface Options { + /** + * Optional hostname, must start with '\\' sequence. + */ + host?: string; + + /** + * Optional hive ID, default is HKLM. + */ + hive?: string; + + /** + * Optional key, default is the root key. + */ + key?: string; + + /** + * Optional registry hive architecture ('x86' or 'x64'; only valid on Windows 64 Bit Operating Systems). + */ + arch?: string; + } + + /** + * A registry object, which provides access to a single registry key. + */ + export interface Registry { + /** + * The hostname. + * @readonly + */ + host: string; + + /** + * The hive id. + * @readonly + */ + hive: string; + + /** + * The registry key name. + * @readonly + */ + key: string; + + /** + * The full path to the registry key. + * @readonly + */ + path: string; + + /** + * The registry hive architecture ('x86' or 'x64'). + * @readonly + */ + arch: string; + + /** + * Creates a new {@link Registry} instance that points to the parent registry key. + * @readonly + */ + parent: Registry; + + /** + * Retrieve all values from this registry key. + * @param {valuesCallback} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @param {array=} cb.items - an array of {@link RegistryItem} objects + * @returns {Registry} this registry key object + */ + values(cb: (err: Error, result: Array) => void): Registry; + + /** + * Retrieve all subkeys from this registry key. + * @param {function (err, items)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @param {array=} cb.items - an array of {@link Registry} objects + * @returns {Registry} this registry key object + */ + keys(cb: (err: Error, result: Array) => void): Registry; + + /** + * Gets a named value from this registry key. + * @param {string} name - the value name, use {@link Registry.DEFAULT_VALUE} or an empty string for the default value + * @param {function (err, item)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @param {RegistryItem=} cb.item - the retrieved registry item + * @returns {Registry} this registry key object + */ + get(name: string, cb: (err: Error, result: Winreg.RegistryItem) => void): Registry; + + /** + * Sets a named value in this registry key, overwriting an already existing value. + * @param {string} name - the value name, use {@link Registry.DEFAULT_VALUE} or an empty string for the default value + * @param {string} type - the value type + * @param {string} value - the value + * @param {function (err)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @returns {Registry} this registry key object + */ + set(name: string, type: string, value: string, cb: (err: Error) => void): Registry; + + /** + * Remove a named value from this registry key. If name is empty, sets the default value of this key. + * Note: This key must be already existing. + * @param {string} name - the value name, use {@link Registry.DEFAULT_VALUE} or an empty string for the default value + * @param {function (err)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @returns {Registry} this registry key object + */ + remove(name: string, cb: (err: Error) => void): Registry; + + /** + * Remove all subkeys and values (including the default value) from this registry key. + * @param {function (err)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @returns {Registry} this registry key object + */ + clear(cb: (err: Error) => void): Registry; + + /** + * Alias for the clear method to keep it backward compatible. + * @method + * @deprecated Use {@link Registry#clear} or {@link Registry#destroy} in favour of this method. + * @param {function (err)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @returns {Registry} this registry key object + */ + erase(cb: (err: Error) => void): Registry; + + /** + * Delete this key and all subkeys from the registry. + * @param {function (err)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @returns {Registry} this registry key object + */ + destroy(cb: (err: Error) => void): Registry; + + /** + * Create this registry key. Note that this is a no-op if the key already exists. + * @param {function (err)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @returns {Registry} this registry key object + */ + create(cb: (err: Error) => void): Registry; + + /** + * Checks if this key already exists. + * @param {function (err, exists)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @param {boolean=} cb.exists - true if a registry key with this name already exists + * @returns {Registry} this registry key object + */ + keyExists(cb: (err: Error, exists: boolean) => void): Registry; + + /** + * Checks if a value with the given name already exists within this key. + * @param {string} name - the value name, use {@link Registry.DEFAULT_VALUE} or an empty string for the default value + * @param {function (err, exists)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @param {boolean=} cb.exists - true if a value with the given name was found in this key + * @returns {Registry} this registry key object + */ + valueExists(name: string, cb: (err: Error, exists: boolean) => void): Registry; + } + + /** + * A single registry value record. + * Objects of this type are created internally and returned by methods of {@link Registry} objects. + */ + export interface RegistryItem { + /** + * The hostname. + * @readonly + */ + host: string; + + /** + * The hive id. + * @readonly + */ + hive: string; + + /** + * The registry key. + * @readonly + */ + key: string; + + /** + * The value name. + * @readonly + */ + name: string; + + /** + * The value type. + * @readonly + */ + type: string; + + /** + * The value. + * @readonly + */ + value: string; + + /** + * The hive architecture. + * @readonly + */ + arch: string; + } +} + +declare module "winreg" { + export = Winreg; +} \ No newline at end of file diff --git a/src/vs/base/browser/browser.ts b/src/vs/base/browser/browser.ts index 558dcf75839bd..447f4fe3b2c9d 100644 --- a/src/vs/base/browser/browser.ts +++ b/src/vs/base/browser/browser.ts @@ -12,51 +12,43 @@ class WindowManager { public static INSTANCE = new WindowManager(); - private _fullscreen: boolean; - + // --- Zoom Level private _zoomLevel: number = 0; - private _zoomFactor: number = 0; - - private _pixelRatioCache: number = 0; - private _pixelRatioComputed: boolean = false; - + private _lastZoomLevelChangeTime: number = 0; private _onDidChangeZoomLevel: Emitter = new Emitter(); - public onDidChangeZoomLevel: Event = this._onDidChangeZoomLevel.event; - - private _onDidChangeFullscreen: Emitter = new Emitter(); - public onDidChangeFullscreen: Event = this._onDidChangeFullscreen.event; + public onDidChangeZoomLevel: Event = this._onDidChangeZoomLevel.event; public getZoomLevel(): number { return this._zoomLevel; } - - public setZoomLevel(zoomLevel: number): void { + public getTimeSinceLastZoomLevelChanged(): number { + return Date.now() - this._lastZoomLevelChangeTime; + } + public setZoomLevel(zoomLevel: number, isTrusted: boolean): void { if (this._zoomLevel === zoomLevel) { return; } this._zoomLevel = zoomLevel; - this._pixelRatioComputed = false; + // See https://github.com/Microsoft/vscode/issues/26151 + this._lastZoomLevelChangeTime = isTrusted ? 0 : Date.now(); this._onDidChangeZoomLevel.fire(this._zoomLevel); } + + // --- Zoom Factor + private _zoomFactor: number = 0; + public getZoomFactor(): number { return this._zoomFactor; } - public setZoomFactor(zoomFactor: number): void { this._zoomFactor = zoomFactor; } - public getPixelRatio(): number { - if (!this._pixelRatioComputed) { - this._pixelRatioCache = this._computePixelRatio(); - this._pixelRatioComputed = true; - } - return this._pixelRatioCache; - } - private _computePixelRatio(): number { + // --- Pixel Ratio + public getPixelRatio(): number { let ctx = document.createElement('canvas').getContext('2d'); let dpr = window.devicePixelRatio || 1; let bsr = (ctx).webkitBackingStorePixelRatio || @@ -67,6 +59,11 @@ class WindowManager { return dpr / bsr; } + // --- Fullscreen + private _fullscreen: boolean; + private _onDidChangeFullscreen: Emitter = new Emitter(); + + public onDidChangeFullscreen: Event = this._onDidChangeFullscreen.event; public setFullscreen(fullscreen: boolean): void { if (this._fullscreen === fullscreen) { return; @@ -75,32 +72,57 @@ class WindowManager { this._fullscreen = fullscreen; this._onDidChangeFullscreen.fire(); } - public isFullscreen(): boolean { return this._fullscreen; } + + // --- Accessibility + private _accessibilitySupport = Platform.AccessibilitySupport.Unknown; + private _onDidChangeAccessibilitySupport: Emitter = new Emitter(); + + public onDidChangeAccessibilitySupport: Event = this._onDidChangeAccessibilitySupport.event; + public setAccessibilitySupport(accessibilitySupport: Platform.AccessibilitySupport): void { + if (this._accessibilitySupport === accessibilitySupport) { + return; + } + + this._accessibilitySupport = accessibilitySupport; + this._onDidChangeAccessibilitySupport.fire(); + } + public getAccessibilitySupport(): Platform.AccessibilitySupport { + return this._accessibilitySupport; + } + + } /** A zoom index, e.g. 1, 2, 3 */ +export function setZoomLevel(zoomLevel: number, isTrusted: boolean): void { + WindowManager.INSTANCE.setZoomLevel(zoomLevel, isTrusted); +} export function getZoomLevel(): number { return WindowManager.INSTANCE.getZoomLevel(); } +/** Returns the time (in ms) since the zoom level was changed */ +export function getTimeSinceLastZoomLevelChanged(): number { + return WindowManager.INSTANCE.getTimeSinceLastZoomLevelChanged(); +} +export function onDidChangeZoomLevel(callback: (zoomLevel: number) => void): IDisposable { + return WindowManager.INSTANCE.onDidChangeZoomLevel(callback); +} + /** The zoom scale for an index, e.g. 1, 1.2, 1.4 */ export function getZoomFactor(): number { return WindowManager.INSTANCE.getZoomFactor(); } -export function getPixelRatio(): number { - return WindowManager.INSTANCE.getPixelRatio(); -} -export function setZoomLevel(zoomLevel: number): void { - WindowManager.INSTANCE.setZoomLevel(zoomLevel); -} export function setZoomFactor(zoomFactor: number): void { WindowManager.INSTANCE.setZoomFactor(zoomFactor); } -export function onDidChangeZoomLevel(callback: (zoomLevel: number) => void): IDisposable { - return WindowManager.INSTANCE.onDidChangeZoomLevel(callback); + +export function getPixelRatio(): number { + return WindowManager.INSTANCE.getPixelRatio(); } + export function setFullscreen(fullscreen: boolean): void { WindowManager.INSTANCE.setFullscreen(fullscreen); } @@ -111,6 +133,16 @@ export function onDidChangeFullscreen(callback: () => void): IDisposable { return WindowManager.INSTANCE.onDidChangeFullscreen(callback); } +export function setAccessibilitySupport(accessibilitySupport: Platform.AccessibilitySupport): void { + WindowManager.INSTANCE.setAccessibilitySupport(accessibilitySupport); +} +export function getAccessibilitySupport(): Platform.AccessibilitySupport { + return WindowManager.INSTANCE.getAccessibilitySupport(); +} +export function onDidChangeAccessibilitySupport(callback: () => void): IDisposable { + return WindowManager.INSTANCE.onDidChangeAccessibilitySupport(callback); +} + const userAgent = navigator.userAgent; export const isIE = (userAgent.indexOf('Trident') >= 0); @@ -124,10 +156,10 @@ export const isChrome = (userAgent.indexOf('Chrome') >= 0); export const isSafari = (userAgent.indexOf('Chrome') === -1) && (userAgent.indexOf('Safari') >= 0); export const isIPad = (userAgent.indexOf('iPad') >= 0); -const isChromev56 = ( - navigator.userAgent.indexOf('Chrome/56.') >= 0 +export const isChromev56 = ( + userAgent.indexOf('Chrome/56.') >= 0 // Edge likes to impersonate Chrome sometimes - && navigator.userAgent.indexOf('Edge/') === -1 + && userAgent.indexOf('Edge/') === -1 ); export const supportsTranslate3d = !isFirefox; @@ -153,8 +185,6 @@ export function canUseTranslate3d(): boolean { return true; } -export const enableEmptySelectionClipboard = isWebKit; - export function supportsExecCommand(command: string): boolean { return ( (isIE || Platform.isNative) diff --git a/src/vs/base/browser/dom.ts b/src/vs/base/browser/dom.ts index efe82b59b3cc7..d0dfb1d885ced 100644 --- a/src/vs/base/browser/dom.ts +++ b/src/vs/base/browser/dom.ts @@ -56,125 +56,139 @@ export function isInDOM(node: Node): boolean { return false; } -let lastStart: number, lastEnd: number; +const _manualClassList = new class { -function _findClassName(node: HTMLElement, className: string): void { + private _lastStart: number; + private _lastEnd: number; - let classes = node.className; - if (!classes) { - lastStart = -1; - return; - } + private _findClassName(node: HTMLElement, className: string): void { - className = className.trim(); + let classes = node.className; + if (!classes) { + this._lastStart = -1; + return; + } - let classesLen = classes.length, - classLen = className.length; + className = className.trim(); - if (classLen === 0) { - lastStart = -1; - return; - } + let classesLen = classes.length, + classLen = className.length; - if (classesLen < classLen) { - lastStart = -1; - return; - } + if (classLen === 0) { + this._lastStart = -1; + return; + } - if (classes === className) { - lastStart = 0; - lastEnd = classesLen; - return; - } + if (classesLen < classLen) { + this._lastStart = -1; + return; + } - let idx = -1, - idxEnd: number; + if (classes === className) { + this._lastStart = 0; + this._lastEnd = classesLen; + return; + } - while ((idx = classes.indexOf(className, idx + 1)) >= 0) { + let idx = -1, + idxEnd: number; - idxEnd = idx + classLen; + while ((idx = classes.indexOf(className, idx + 1)) >= 0) { - // a class that is followed by another class - if ((idx === 0 || classes.charCodeAt(idx - 1) === CharCode.Space) && classes.charCodeAt(idxEnd) === CharCode.Space) { - lastStart = idx; - lastEnd = idxEnd + 1; - return; + idxEnd = idx + classLen; + + // a class that is followed by another class + if ((idx === 0 || classes.charCodeAt(idx - 1) === CharCode.Space) && classes.charCodeAt(idxEnd) === CharCode.Space) { + this._lastStart = idx; + this._lastEnd = idxEnd + 1; + return; + } + + // last class + if (idx > 0 && classes.charCodeAt(idx - 1) === CharCode.Space && idxEnd === classesLen) { + this._lastStart = idx - 1; + this._lastEnd = idxEnd; + return; + } + + // equal - duplicate of cmp above + if (idx === 0 && idxEnd === classesLen) { + this._lastStart = 0; + this._lastEnd = idxEnd; + return; + } } - // last class - if (idx > 0 && classes.charCodeAt(idx - 1) === CharCode.Space && idxEnd === classesLen) { - lastStart = idx - 1; - lastEnd = idxEnd; - return; + this._lastStart = -1; + } + + hasClass(node: HTMLElement, className: string): boolean { + this._findClassName(node, className); + return this._lastStart !== -1; + } + + addClass(node: HTMLElement, className: string): void { + if (!node.className) { // doesn't have it for sure + node.className = className; + } else { + this._findClassName(node, className); // see if it's already there + if (this._lastStart === -1) { + node.className = node.className + ' ' + className; + } } + } - // equal - duplicate of cmp above - if (idx === 0 && idxEnd === classesLen) { - lastStart = 0; - lastEnd = idxEnd; - return; + removeClass(node: HTMLElement, className: string): void { + this._findClassName(node, className); + if (this._lastStart === -1) { + return; // Prevent styles invalidation if not necessary + } else { + node.className = node.className.substring(0, this._lastStart) + node.className.substring(this._lastEnd); } } - lastStart = -1; -} + toggleClass(node: HTMLElement, className: string, shouldHaveIt?: boolean): void { + this._findClassName(node, className); + if (this._lastStart !== -1 && (shouldHaveIt === void 0 || !shouldHaveIt)) { + this.removeClass(node, className); + } + if (this._lastStart === -1 && (shouldHaveIt === void 0 || shouldHaveIt)) { + this.addClass(node, className); + } + } +}; -/** - * @param node a dom node - * @param className a class name - * @return true if the className attribute of the provided node contains the provided className - */ -export function hasClass(node: HTMLElement, className: string): boolean { - _findClassName(node, className); - return lastStart !== -1; -} +const _nativeClassList = new class { + hasClass(node: HTMLElement, className: string): boolean { + return className && node.classList && node.classList.contains(className); + } -/** - * Adds the provided className to the provided node. This is a no-op - * if the class is already set. - * @param node a dom node - * @param className a class name - */ -export function addClass(node: HTMLElement, className: string): void { - if (!node.className) { // doesn't have it for sure - node.className = className; - } else { - _findClassName(node, className); // see if it's already there - if (lastStart === -1) { - node.className = node.className + ' ' + className; + addClass(node: HTMLElement, className: string): void { + if (className && node.classList) { + node.classList.add(className); } } -} -/** - * Removes the className for the provided node. This is a no-op - * if the class isn't present. - * @param node a dom node - * @param className a class name - */ -export function removeClass(node: HTMLElement, className: string): void { - _findClassName(node, className); - if (lastStart === -1) { - return; // Prevent styles invalidation if not necessary - } else { - node.className = node.className.substring(0, lastStart) + node.className.substring(lastEnd); + removeClass(node: HTMLElement, className: string): void { + if (className && node.classList) { + node.classList.remove(className); + } } -} -/** - * @param node a dom node - * @param className a class name - * @param shouldHaveIt - */ -export function toggleClass(node: HTMLElement, className: string, shouldHaveIt?: boolean): void { - _findClassName(node, className); - if (lastStart !== -1 && (shouldHaveIt === void 0 || !shouldHaveIt)) { - removeClass(node, className); - } - if (lastStart === -1 && (shouldHaveIt === void 0 || shouldHaveIt)) { - addClass(node, className); + toggleClass(node: HTMLElement, className: string, shouldHaveIt?: boolean): void { + if (node.classList) { + node.classList.toggle(className, shouldHaveIt); + } } -} +}; + +// In IE11 there is only partial support for `classList` which makes us keep our +// custom implementation. Otherwise use the native implementation, see: http://caniuse.com/#search=classlist +const _classList = browser.isIE ? _manualClassList : _nativeClassList; +export const hasClass: (node: HTMLElement, className: string) => boolean = _classList.hasClass.bind(_classList); +export const addClass: (node: HTMLElement, className: string) => void = _classList.addClass.bind(_classList); +export const removeClass: (node: HTMLElement, className: string) => void = _classList.removeClass.bind(_classList); +export const toggleClass: (node: HTMLElement, className: string, shouldHaveIt?: boolean) => void = _classList.toggleClass.bind(_classList); class DomListener implements IDisposable { @@ -696,7 +710,7 @@ export function createCSSRule(selector: string, cssText: string, style: HTMLStyl return; } - (style.sheet).insertRule(selector + '{' + cssText + '}', 0); + (style.sheet).insertRule(selector + '{' + cssText + '}', 0); } export function getCSSRule(selector: string, style: HTMLStyleElement = sharedStyle): any { @@ -725,8 +739,7 @@ export function removeCSSRulesContainingSelector(ruleName: string, style = share let toDelete: number[] = []; for (let i = 0; i < rules.length; i++) { let rule = rules[i]; - let normalizedSelectorText = rule.selectorText.replace(/::/gi, ':'); - if (normalizedSelectorText.indexOf(ruleName) !== -1) { + if (rule.selectorText.indexOf(ruleName) !== -1) { toDelete.push(i); } } @@ -1027,4 +1040,17 @@ export function domContentLoaded(): TPromise { window.addEventListener('DOMContentLoaded', c, false); } }); -} \ No newline at end of file +} + +/** + * Find a value usable for a dom node size such that the likelihood that it would be + * displayed with constant screen pixels size is as high as possible. + * + * e.g. We would desire for the cursors to be 2px (CSS px) wide. Under a devicePixelRatio + * of 1.25, the cursor will be 2.5 screen pixels wide. Depending on how the dom node aligns/"snaps" + * with the screen pixels, it will sometimes be rendered with 2 screen pixels, and sometimes with 3 screen pixels. + */ +export function computeScreenAwareSize(cssPx: number): number { + const screenPx = window.devicePixelRatio * cssPx; + return Math.max(1, Math.floor(screenPx)) / window.devicePixelRatio; +} diff --git a/src/vs/base/browser/fastDomNode.ts b/src/vs/base/browser/fastDomNode.ts index 661860a4af27f..695b48141e761 100644 --- a/src/vs/base/browser/fastDomNode.ts +++ b/src/vs/base/browser/fastDomNode.ts @@ -6,7 +6,7 @@ import * as dom from 'vs/base/browser/dom'; -export abstract class FastDomNode { +export class FastDomNode { public readonly domNode: T; private _maxWidth: number; @@ -20,11 +20,12 @@ export abstract class FastDomNode { private _fontWeight: string; private _fontSize: number; private _lineHeight: number; + private _letterSpacing: number; private _className: string; private _display: string; private _position: string; private _visibility: string; - private _transform: string; + private _layerHint: boolean; constructor(domNode: T) { this.domNode = domNode; @@ -39,11 +40,12 @@ export abstract class FastDomNode { this._fontWeight = ''; this._fontSize = -1; this._lineHeight = -1; + this._letterSpacing = -100; this._className = ''; this._display = ''; this._position = ''; this._visibility = ''; - this._transform = ''; + this._layerHint = false; } public setMaxWidth(maxWidth: number): void { @@ -78,10 +80,6 @@ export abstract class FastDomNode { this.domNode.style.height = this._height + 'px'; } - public getHeight(): number { - return this._height; - } - public unsetHeight(): void { if (this._height === -1) { return; @@ -98,10 +96,6 @@ export abstract class FastDomNode { this.domNode.style.top = this._top + 'px'; } - public getTop(): number { - return this._top; - } - public unsetTop(): void { if (this._top === -1) { return; @@ -166,6 +160,14 @@ export abstract class FastDomNode { this.domNode.style.lineHeight = this._lineHeight + 'px'; } + public setLetterSpacing(letterSpacing: number): void { + if (this._letterSpacing === letterSpacing) { + return; + } + this._letterSpacing = letterSpacing; + this.domNode.style.letterSpacing = this._letterSpacing + 'px'; + } + public setClassName(className: string): void { if (this._className === className) { return; @@ -213,16 +215,14 @@ export abstract class FastDomNode { this.domNode.style.visibility = this._visibility; } - public setTransform(transform: string): void { - if (this._transform === transform) { + public setLayerHinting(layerHint: boolean): void { + if (this._layerHint === layerHint) { return; } - this._transform = transform; - this._setTransform(this.domNode, this._transform); + this._layerHint = layerHint; + (this.domNode.style).willChange = this._layerHint ? 'transform' : 'auto'; } - protected abstract _setTransform(domNode: T, transform: string): void; - public setAttribute(name: string, value: string): void { this.domNode.setAttribute(name, value); } @@ -248,29 +248,6 @@ export abstract class FastDomNode { } } -class WebKitFastDomNode extends FastDomNode { - protected _setTransform(domNode: T, transform: string): void { - (domNode.style).webkitTransform = transform; - } -} - -class StandardFastDomNode extends FastDomNode { - protected _setTransform(domNode: T, transform: string): void { - domNode.style.transform = transform; - } -} - -let useWebKitFastDomNode = false; -(function () { - let testDomNode = document.createElement('div'); - if (typeof (testDomNode.style).webkitTransform !== 'undefined') { - useWebKitFastDomNode = true; - } -})(); export function createFastDomNode(domNode: T): FastDomNode { - if (useWebKitFastDomNode) { - return new WebKitFastDomNode(domNode); - } else { - return new StandardFastDomNode(domNode); - } + return new FastDomNode(domNode); } diff --git a/src/vs/base/browser/htmlContentRenderer.ts b/src/vs/base/browser/htmlContentRenderer.ts index 638afe7f41f96..8f6e459c75d1a 100644 --- a/src/vs/base/browser/htmlContentRenderer.ts +++ b/src/vs/base/browser/htmlContentRenderer.ts @@ -9,20 +9,50 @@ import DOM = require('vs/base/browser/dom'); import { defaultGenerator } from 'vs/base/common/idGenerator'; import { escape } from 'vs/base/common/strings'; import { TPromise } from 'vs/base/common/winjs.base'; -import { IHTMLContentElement, MarkedString, removeMarkdownEscapes } from 'vs/base/common/htmlContent'; +import { MarkedString, removeMarkdownEscapes } from 'vs/base/common/htmlContent'; import { marked } from 'vs/base/common/marked/marked'; import { IMouseEvent } from 'vs/base/browser/mouseEvent'; -export type RenderableContent = string | IHTMLContentElement | IHTMLContentElement[]; - export interface RenderOptions { + className?: string; + inline?: boolean; actionCallback?: (content: string, event?: IMouseEvent) => void; codeBlockRenderer?: (modeId: string, value: string) => string | TPromise; } +function createElement(options: RenderOptions): HTMLElement { + const tagName = options.inline ? 'span' : 'div'; + const element = document.createElement(tagName); + if (options.className) { + element.className = options.className; + } + return element; +} + + export function renderMarkedString(markedString: MarkedString, options: RenderOptions = {}): Node { - const htmlContentElement = typeof markedString === 'string' ? { markdown: markedString } : { code: markedString }; - return renderHtml(htmlContentElement, options); + // this is sort of legacy given that we have full + // support for markdown. Turn this into markdown + // and continue + let markdown: string; + if (typeof markedString === 'string') { + markdown = markedString; + } else { + markdown = '```' + markedString.language + '\n' + markedString.value + '\n```'; + } + return renderMarkdown(markdown, options); +} + +export function renderText(text: string, options: RenderOptions = {}): Node { + const element = createElement(options); + element.textContent = text; + return element; +} + +export function renderFormattedText(formattedText: string, options: RenderOptions = {}): Node { + const element = createElement(options); + _renderFormattedText(element, parseFormattedText(formattedText), options.actionCallback); + return element; } /** @@ -31,200 +61,114 @@ export function renderMarkedString(markedString: MarkedString, options: RenderOp * @param content a html element description * @param actionCallback a callback function for any action links in the string. Argument is the zero-based index of the clicked action. */ -export function renderHtml(content: RenderableContent, options: RenderOptions = {}): Node { - if (typeof content === 'string') { - return _renderHtml({ isText: true, text: content }, options); - } else if (Array.isArray(content)) { - return _renderHtml({ children: content }, options); - } else if (content) { - return _renderHtml(content, options); - } - return undefined; -} - -function _renderHtml(content: IHTMLContentElement, options: RenderOptions = {}): Node { - - let { codeBlockRenderer, actionCallback } = options; - - if (content.isText) { - return document.createTextNode(content.text); - } - - var tagName = getSafeTagName(content.tagName) || 'div'; - var element = document.createElement(tagName); - - if (content.className) { - element.className = content.className; - } - if (content.text) { - element.textContent = content.text; - } - if (content.style) { - element.setAttribute('style', content.style); - } - if (content.customStyle) { - Object.keys(content.customStyle).forEach((key) => { - element.style[key] = content.customStyle[key]; - }); - } - if (content.children) { - content.children.forEach((child) => { - element.appendChild(renderHtml(child, options)); - }); - } - if (content.formattedText) { - renderFormattedText(element, parseFormattedText(content.formattedText), actionCallback); - } - - if (content.code && codeBlockRenderer) { - // this is sort of legacy given that we have full - // support for markdown. Turn this into markdown - // and continue - let { language, value } = content.code; - content.markdown = '```' + language + '\n' + value + '\n```'; - } - if (content.markdown) { - - // signal to code-block render that the - // element has been created - let signalInnerHTML: Function; - const withInnerHTML = new TPromise(c => signalInnerHTML = c); - - const renderer = new marked.Renderer(); - renderer.image = (href: string, title: string, text: string) => { - let dimensions: string[] = []; - if (href) { - const splitted = href.split('|').map(s => s.trim()); - href = splitted[0]; - const parameters = splitted[1]; - if (parameters) { - const heightFromParams = /height=(\d+)/.exec(parameters); - const widthFromParams = /width=(\d+)/.exec(parameters); - const height = (heightFromParams && heightFromParams[1]); - const width = (widthFromParams && widthFromParams[1]); - const widthIsFinite = isFinite(parseInt(width)); - const heightIsFinite = isFinite(parseInt(height)); - if (widthIsFinite) { - dimensions.push(`width="${width}"`); - } - if (heightIsFinite) { - dimensions.push(`height="${height}"`); - } +export function renderMarkdown(markdown: string, options: RenderOptions = {}): Node { + const element = createElement(options); + + const { codeBlockRenderer, actionCallback } = options; + + // signal to code-block render that the + // element has been created + let signalInnerHTML: Function; + const withInnerHTML = new TPromise(c => signalInnerHTML = c); + + const renderer = new marked.Renderer(); + renderer.image = (href: string, title: string, text: string) => { + let dimensions: string[] = []; + if (href) { + const splitted = href.split('|').map(s => s.trim()); + href = splitted[0]; + const parameters = splitted[1]; + if (parameters) { + const heightFromParams = /height=(\d+)/.exec(parameters); + const widthFromParams = /width=(\d+)/.exec(parameters); + const height = (heightFromParams && heightFromParams[1]); + const width = (widthFromParams && widthFromParams[1]); + const widthIsFinite = isFinite(parseInt(width)); + const heightIsFinite = isFinite(parseInt(height)); + if (widthIsFinite) { + dimensions.push(`width="${width}"`); + } + if (heightIsFinite) { + dimensions.push(`height="${height}"`); } } - let attributes: string[] = []; - if (href) { - attributes.push(`src="${href}"`); - } - if (text) { - attributes.push(`alt="${text}"`); - } - if (title) { - attributes.push(`title="${title}"`); - } - if (dimensions.length) { - attributes = attributes.concat(dimensions); - } - return ''; - }; - renderer.link = (href, title, text): string => { - // Remove markdown escapes. Workaround for https://github.com/chjj/marked/issues/829 - if (href === text) { // raw link case - text = removeMarkdownEscapes(text); - } - title = removeMarkdownEscapes(title); - href = removeMarkdownEscapes(href); - return `
${text}`; - }; - renderer.paragraph = (text): string => { - return `

${text}

`; - }; + } + let attributes: string[] = []; + if (href) { + attributes.push(`src="${href}"`); + } + if (text) { + attributes.push(`alt="${text}"`); + } + if (title) { + attributes.push(`title="${title}"`); + } + if (dimensions.length) { + attributes = attributes.concat(dimensions); + } + return ''; + }; + renderer.link = (href, title, text): string => { + // Remove markdown escapes. Workaround for https://github.com/chjj/marked/issues/829 + if (href === text) { // raw link case + text = removeMarkdownEscapes(text); + } + title = removeMarkdownEscapes(title); + href = removeMarkdownEscapes(href); + if (!href || href.match(/^data:|javascript:/i)) { + return text; + } + return `${text}`; + }; + renderer.paragraph = (text): string => { + return `

${text}

`; + }; - if (options.codeBlockRenderer) { - renderer.code = (code, lang) => { - let value = options.codeBlockRenderer(lang, code); - if (typeof value === 'string') { - return value; - } + if (options.codeBlockRenderer) { + renderer.code = (code, lang) => { + let value = options.codeBlockRenderer(lang, code); + if (typeof value === 'string') { + return value; + } - if (TPromise.is(value)) { - // when code-block rendering is async we return sync - // but update the node with the real result later. - const id = defaultGenerator.nextId(); - TPromise.join([value, withInnerHTML]).done(values => { - let strValue = values[0] as string; - let span = element.querySelector(`span[data-code="${id}"]`); - if (span) { - span.innerHTML = strValue; - } - }, err => { - // ignore - }); - return `${escape(code)}`; - } + if (TPromise.is(value)) { + // when code-block rendering is async we return sync + // but update the node with the real result later. + const id = defaultGenerator.nextId(); + TPromise.join([value, withInnerHTML]).done(values => { + let strValue = values[0] as string; + let span = element.querySelector(`span[data-code="${id}"]`); + if (span) { + span.innerHTML = strValue; + } + }, err => { + // ignore + }); + return `${escape(code)}`; + } - return code; - }; - } + return code; + }; + } - if (options.actionCallback) { - DOM.addStandardDisposableListener(element, 'click', event => { - if (event.target.tagName === 'A') { - const href = event.target.dataset['href']; - if (href) { - options.actionCallback(href, event); - } + if (options.actionCallback) { + DOM.addStandardDisposableListener(element, 'click', event => { + if (event.target.tagName === 'A') { + const href = event.target.dataset['href']; + if (href) { + options.actionCallback(href, event); } - }); - } - - element.innerHTML = marked(content.markdown, { - sanitize: true, - renderer + } }); - signalInnerHTML(); } - return element; -} + element.innerHTML = marked(markdown, { + sanitize: true, + renderer + }); + signalInnerHTML(); -var SAFE_TAG_NAMES = { - a: true, - b: true, - blockquote: true, - code: true, - del: true, - dd: true, - div: true, - dl: true, - dt: true, - em: true, - h1h2h3i: true, - img: true, - kbd: true, - li: true, - ol: true, - p: true, - pre: true, - s: true, - span: true, - sup: true, - sub: true, - strong: true, - strike: true, - ul: true, - br: true, - hr: true, -}; - -function getSafeTagName(tagName: string): string { - if (!tagName) { - return null; - } - if (SAFE_TAG_NAMES.hasOwnProperty(tagName)) { - return tagName; - } - return null; + return element; } // --- formatted string parsing @@ -275,7 +219,7 @@ interface IFormatParseTree { children?: IFormatParseTree[]; } -function renderFormattedText(element: Node, treeNode: IFormatParseTree, actionCallback?: (content: string, event?: IMouseEvent) => void) { +function _renderFormattedText(element: Node, treeNode: IFormatParseTree, actionCallback?: (content: string, event?: IMouseEvent) => void) { var child: Node; if (treeNode.type === FormatType.Text) { @@ -309,7 +253,7 @@ function renderFormattedText(element: Node, treeNode: IFormatParseTree, actionCa if (Array.isArray(treeNode.children)) { treeNode.children.forEach((nodeChild) => { - renderFormattedText(child, nodeChild, actionCallback); + _renderFormattedText(child, nodeChild, actionCallback); }); } } diff --git a/src/vs/base/browser/keyboardEvent.ts b/src/vs/base/browser/keyboardEvent.ts index ca3450b61b495..6f90f1b1b0751 100644 --- a/src/vs/base/browser/keyboardEvent.ts +++ b/src/vs/base/browser/keyboardEvent.ts @@ -120,6 +120,8 @@ let KEY_CODE_MAP: { [keyCode: number]: KeyCode } = {}; KEY_CODE_MAP[190] = KeyCode.US_DOT; KEY_CODE_MAP[191] = KeyCode.US_SLASH; KEY_CODE_MAP[192] = KeyCode.US_BACKTICK; + KEY_CODE_MAP[193] = KeyCode.ABNT_C1; + KEY_CODE_MAP[194] = KeyCode.ABNT_C2; KEY_CODE_MAP[219] = KeyCode.US_OPEN_SQUARE_BRACKET; KEY_CODE_MAP[220] = KeyCode.US_BACKSLASH; KEY_CODE_MAP[221] = KeyCode.US_CLOSE_SQUARE_BRACKET; diff --git a/src/vs/base/browser/touch.ts b/src/vs/base/browser/touch.ts index 7d79a4c19d01b..095e36f8b4bf4 100644 --- a/src/vs/base/browser/touch.ts +++ b/src/vs/base/browser/touch.ts @@ -114,7 +114,6 @@ export class Gesture implements IDisposable { private onTouchStart(e: TouchEvent): void { let timestamp = Date.now(); // use Date.now() because on FF e.timeStamp is not epoch based. e.preventDefault(); - e.stopPropagation(); if (this.handle) { this.handle.dispose(); diff --git a/src/vs/base/browser/ui/actionbar/actionbar.ts b/src/vs/base/browser/ui/actionbar/actionbar.ts index 452b2ece1e530..ca8e4ff683704 100644 --- a/src/vs/base/browser/ui/actionbar/actionbar.ts +++ b/src/vs/base/browser/ui/actionbar/actionbar.ts @@ -218,6 +218,7 @@ export interface IActionItemOptions extends IBaseActionItemOptions { icon?: boolean; label?: boolean; keybinding?: string; + isMenu?: boolean; } export class ActionItem extends BaseActionItem { @@ -239,7 +240,16 @@ export class ActionItem extends BaseActionItem { super.render(container); this.$e = $('a.action-label').appendTo(this.builder); - this.$e.attr({ role: 'button' }); + if (this._action.id === Separator.ID) { + // A separator is a presentation item + this.$e.attr({ role: 'presentation' }); + } else { + if (this.options.isMenu) { + this.$e.attr({ role: 'menuitem' }); + } else { + this.$e.attr({ role: 'button' }); + } + } if (this.options.label && this.options.keybinding) { $('span.keybinding').text(this.options.keybinding).appendTo(this.builder); @@ -343,6 +353,7 @@ export interface IActionBarOptions { actionRunner?: IActionRunner; ariaLabel?: string; animated?: boolean; + isMenu?: boolean; } let defaultOptions: IActionBarOptions = { @@ -458,7 +469,11 @@ export class ActionBar extends EventEmitter implements IActionRunner { this.actionsList = document.createElement('ul'); this.actionsList.className = 'actions-container'; - this.actionsList.setAttribute('role', 'toolbar'); + if (this.options.isMenu) { + this.actionsList.setAttribute('role', 'menubar'); + } else { + this.actionsList.setAttribute('role', 'toolbar'); + } if (this.options.ariaLabel) { this.actionsList.setAttribute('aria-label', this.options.ariaLabel); } diff --git a/src/vs/base/browser/ui/aria/aria.css b/src/vs/base/browser/ui/aria/aria.css index fd795b9af1b0f..75ae8780fe104 100644 --- a/src/vs/base/browser/ui/aria/aria.css +++ b/src/vs/base/browser/ui/aria/aria.css @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -.aria-container { +.monaco-aria-container { position: absolute; /* try to hide from workbench but not from screen readers */ left:-999em; } \ No newline at end of file diff --git a/src/vs/base/browser/ui/aria/aria.ts b/src/vs/base/browser/ui/aria/aria.ts index dd5776ab9f894..40b28f69b443d 100644 --- a/src/vs/base/browser/ui/aria/aria.ts +++ b/src/vs/base/browser/ui/aria/aria.ts @@ -8,16 +8,28 @@ import 'vs/css!./aria'; import nls = require('vs/nls'); import { isMacintosh } from 'vs/base/common/platform'; -import { Builder, $ } from 'vs/base/browser/builder'; +import * as dom from 'vs/base/browser/dom'; -let ariaContainer: Builder; -let alertContainer: Builder; -let statusContainer: Builder; +let ariaContainer: HTMLElement; +let alertContainer: HTMLElement; +let statusContainer: HTMLElement; export function setARIAContainer(parent: HTMLElement) { - ariaContainer = $('.aria-container').appendTo(parent); + ariaContainer = document.createElement('div'); + ariaContainer.className = 'monaco-aria-container'; - alertContainer = $('.alert').appendTo(ariaContainer).attr({ 'role': 'alert', 'aria-atomic': 'true' }); - statusContainer = $('.status').appendTo(ariaContainer).attr({ 'role': 'status', 'aria-atomic': 'true' }); + alertContainer = document.createElement('div'); + alertContainer.className = 'monaco-alert'; + alertContainer.setAttribute('role', 'alert'); + alertContainer.setAttribute('aria-atomic', 'true'); + ariaContainer.appendChild(alertContainer); + + statusContainer = document.createElement('div'); + statusContainer.className = 'monaco-status'; + statusContainer.setAttribute('role', 'status'); + statusContainer.setAttribute('aria-atomic', 'true'); + ariaContainer.appendChild(statusContainer); + + parent.appendChild(ariaContainer); } /** @@ -38,16 +50,20 @@ export function status(msg: string): void { } } -function insertMessage(target: Builder, msg: string): void { +function insertMessage(target: HTMLElement, msg: string): void { if (!ariaContainer) { // console.warn('ARIA support needs a container. Call setARIAContainer() first.'); return; } - - if (target.getHTMLElement().textContent === msg) { + if (target.textContent === msg) { msg = nls.localize('repeated', "{0} (occurred again)", msg); } - $(target).empty(); - $(target).text(msg); + dom.clearNode(target); + target.textContent = msg; + + + // See https://www.paciellogroup.com/blog/2012/06/html5-accessibility-chops-aria-rolealert-browser-support/ + target.style.visibility = 'hidden'; + target.style.visibility = 'visible'; } \ No newline at end of file diff --git a/src/vs/base/browser/ui/button/button.ts b/src/vs/base/browser/ui/button/button.ts index 21db87b36cbcd..356692bf76601 100644 --- a/src/vs/base/browser/ui/button/button.ts +++ b/src/vs/base/browser/ui/button/button.ts @@ -21,6 +21,7 @@ export interface IButtonStyles { buttonBackground?: Color; buttonHoverBackground?: Color; buttonForeground?: Color; + buttonBorder?: Color; } const defaultOptions: IButtonStyles = { @@ -37,6 +38,7 @@ export class Button extends EventEmitter { private buttonBackground: Color; private buttonHoverBackground: Color; private buttonForeground: Color; + private buttonBorder: Color; constructor(container: Builder, options?: IButtonOptions); constructor(container: HTMLElement, options?: IButtonOptions); @@ -49,6 +51,7 @@ export class Button extends EventEmitter { this.buttonBackground = this.options.buttonBackground; this.buttonHoverBackground = this.options.buttonHoverBackground; this.buttonForeground = this.options.buttonForeground; + this.buttonBorder = this.options.buttonBorder; this.$el = $('a.monaco-button').attr({ 'tabIndex': '0', @@ -100,6 +103,7 @@ export class Button extends EventEmitter { this.buttonForeground = styles.buttonForeground; this.buttonBackground = styles.buttonBackground; this.buttonHoverBackground = styles.buttonHoverBackground; + this.buttonBorder = styles.buttonBorder; this.applyStyles(); } @@ -108,9 +112,14 @@ export class Button extends EventEmitter { if (this.$el) { const background = this.buttonBackground ? this.buttonBackground.toString() : null; const foreground = this.buttonForeground ? this.buttonForeground.toString() : null; + const border = this.buttonBorder ? this.buttonBorder.toString() : null; this.$el.style('color', foreground); this.$el.style('background-color', background); + + this.$el.style('border-width', border ? '1px' : null); + this.$el.style('border-style', border ? 'solid' : null); + this.$el.style('border-color', border); } } diff --git a/src/vs/base/browser/ui/countBadge/countBadge.css b/src/vs/base/browser/ui/countBadge/countBadge.css index aef2810df4cd1..e6f36db1adc67 100644 --- a/src/vs/base/browser/ui/countBadge/countBadge.css +++ b/src/vs/base/browser/ui/countBadge/countBadge.css @@ -9,19 +9,5 @@ font-size: 85%; font-weight: normal; text-align: center; - background: #BEBEBE; - color: #FFF; display: inline; -} - -.vs-dark .monaco-count-badge { - color: #FFF; - background: #4D4D4D; -} - -/* High Contrast Theming */ -.hc-black .monaco-count-badge { - background: #000; - border: 1px solid #6FC3DF; - margin-top: 2px; } \ No newline at end of file diff --git a/src/vs/base/browser/ui/countBadge/countBadge.ts b/src/vs/base/browser/ui/countBadge/countBadge.ts index 36031fb9a1e79..8ff58693925e5 100644 --- a/src/vs/base/browser/ui/countBadge/countBadge.ts +++ b/src/vs/base/browser/ui/countBadge/countBadge.ts @@ -8,6 +8,24 @@ import 'vs/css!./countBadge'; import { $, append } from 'vs/base/browser/dom'; import { format } from 'vs/base/common/strings'; +import { Color } from 'vs/base/common/color'; +import { mixin } from 'vs/base/common/objects'; + +export interface ICountBadgeOptions extends ICountBadgetyles { + count?: number; + titleFormat?: string; +} + +export interface ICountBadgetyles { + badgeBackground?: Color; + badgeForeground?: Color; + badgeBorder?: Color; +} + +const defaultOpts = { + badgeBackground: Color.fromHex('#4D4D4D'), + badgeForeground: Color.fromHex('#FFFFFF') +}; export class CountBadge { @@ -15,10 +33,23 @@ export class CountBadge { private count: number; private titleFormat: string; - constructor(container: HTMLElement, count?: number, titleFormat?: string) { + private badgeBackground: Color; + private badgeForeground: Color; + private badgeBorder: Color; + + private options: ICountBadgeOptions; + + constructor(container: HTMLElement, options?: ICountBadgeOptions) { + this.options = options || Object.create(null); + mixin(this.options, defaultOpts, false); + + this.badgeBackground = this.options.badgeBackground; + this.badgeForeground = this.options.badgeForeground; + this.badgeBorder = this.options.badgeBorder; + this.element = append(container, $('.monaco-count-badge')); - this.titleFormat = titleFormat || ''; - this.setCount(count || 0); + this.titleFormat = this.options.titleFormat || ''; + this.setCount(this.options.count || 0); } setCount(count: number) { @@ -34,5 +65,30 @@ export class CountBadge { private render() { this.element.textContent = '' + this.count; this.element.title = format(this.titleFormat, this.count); + + this.applyStyles(); + } + + style(styles: ICountBadgetyles): void { + this.badgeBackground = styles.badgeBackground; + this.badgeForeground = styles.badgeForeground; + this.badgeBorder = styles.badgeBorder; + + this.applyStyles(); + } + + private applyStyles(): void { + if (this.element) { + const background = this.badgeBackground ? this.badgeBackground.toString() : null; + const foreground = this.badgeForeground ? this.badgeForeground.toString() : null; + const border = this.badgeBorder ? this.badgeBorder.toString() : null; + + this.element.style.backgroundColor = background; + this.element.style.color = foreground; + + this.element.style.borderWidth = border ? '1px' : null; + this.element.style.borderStyle = border ? 'solid' : null; + this.element.style.borderColor = border; + } } } diff --git a/src/vs/base/browser/ui/dropdown/dropdown.css b/src/vs/base/browser/ui/dropdown/dropdown.css index dde80747c9718..f48750fa83bb6 100644 --- a/src/vs/base/browser/ui/dropdown/dropdown.css +++ b/src/vs/base/browser/ui/dropdown/dropdown.css @@ -31,25 +31,6 @@ display: inline-block; } -.dropdown > .dropdown-label:not(:empty):not(.tick) { +.dropdown > .dropdown-label:not(:empty) { padding: 0 .5em; -} - -.dropdown > .dropdown-label:empty.tick { - padding: 0 1em 0 0; -} - -.dropdown > .dropdown-label.tick { - padding: 0 1em 0 .5em; -} - -.dropdown > .dropdown-label.tick:after { - content: ''; - width: 0; - height: 0; - position: relative; - top: 1em; - left: .5em; - border: 4px solid transparent; - border-top: 4px solid #fff; } \ No newline at end of file diff --git a/src/vs/base/browser/ui/dropdown/dropdown.ts b/src/vs/base/browser/ui/dropdown/dropdown.ts index f0b5d2ad32d85..b01ac4b60f6fb 100644 --- a/src/vs/base/browser/ui/dropdown/dropdown.ts +++ b/src/vs/base/browser/ui/dropdown/dropdown.ts @@ -8,31 +8,29 @@ import 'vs/css!./dropdown'; import { Builder, $ } from 'vs/base/browser/builder'; import { TPromise } from 'vs/base/common/winjs.base'; -import { Gesture, EventType } from 'vs/base/browser/touch'; +import { Gesture, EventType as GestureEventType } from 'vs/base/browser/touch'; import { ActionRunner, IAction } from 'vs/base/common/actions'; -import { ActionItem, IActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; +import { IActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; import { EventEmitter } from 'vs/base/common/eventEmitter'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { IContextViewProvider } from 'vs/base/browser/ui/contextview/contextview'; import { IMenuOptions } from 'vs/base/browser/ui/menu/menu'; import { ResolvedKeybinding } from 'vs/base/common/keyCodes'; +import { EventHelper, EventType } from 'vs/base/browser/dom'; export interface ILabelRenderer { (container: HTMLElement): IDisposable; } export interface IBaseDropdownOptions { - tick?: boolean; label?: string; labelRenderer?: ILabelRenderer; - action?: IAction; } export class BaseDropdown extends ActionRunner { private _toDispose: IDisposable[]; private $el: Builder; private $boxContainer: Builder; - private $action: Builder; private $label: Builder; private $contents: Builder; @@ -45,29 +43,7 @@ export class BaseDropdown extends ActionRunner { this.$label = $('.dropdown-label'); - if (options.tick || options.action) { - this.$label.addClass('tick'); - } - let labelRenderer = options.labelRenderer; - - if (!labelRenderer && options.action) { - this.$action = $('.dropdown-action').appendTo(this.$el); - - let item = new ActionItem(null, options.action, { - icon: true, - label: true - }); - - item.actionRunner = this; - item.render(this.$action.getHTMLElement()); - - labelRenderer = (container: HTMLElement): IDisposable => { - container.innerText = ''; - return item; - }; - } - if (!labelRenderer) { labelRenderer = (container: HTMLElement): IDisposable => { $(container).text(options.label || ''); @@ -75,11 +51,15 @@ export class BaseDropdown extends ActionRunner { }; } - this.$label.on(['mousedown', EventType.Tap], (e: Event) => { - e.preventDefault(); - e.stopPropagation(); - - this.show(); + this.$label.on([EventType.CLICK, EventType.MOUSE_DOWN, GestureEventType.Tap], (e: Event) => { + EventHelper.stop(e, true); // prevent default click behaviour to trigger + }).on([EventType.MOUSE_DOWN, GestureEventType.Tap], (e: Event) => { + // We want to show the context menu on dropdown so that as a user you can press and hold the + // mouse button, make a choice of action in the menu and release the mouse to trigger that + // action. + // Due to some weird bugs though, we delay showing the menu to unwind event stack + // (see https://github.com/Microsoft/vscode/issues/27648) + setTimeout(() => this.show(), 100); }).appendTo(this.$el); let cleanupFn = labelRenderer(this.$label.getHTMLElement()); diff --git a/src/vs/base/browser/ui/findinput/findInput.css b/src/vs/base/browser/ui/findinput/findInput.css index 413c2dcafb35f..b785b4fa4cc0b 100644 --- a/src/vs/base/browser/ui/findinput/findInput.css +++ b/src/vs/base/browser/ui/findinput/findInput.css @@ -28,28 +28,6 @@ right: 2px; } -.monaco-findInput > .controls > .matchCount { - margin-left: 2px; - float: left; - overflow: hidden; - max-width: 30px; - min-width: 20px; - text-align: center; - - border-radius: 5px; - padding: 0 4px; - - -webkit-box-sizing: border-box; - -o-box-sizing: border-box; - -moz-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; -} - -.vs .monaco-findInput > .controls > .matchCount { - background: #ddd; -} - .vs .monaco-findInput.disabled { background-color: #E1E1E1; } @@ -59,10 +37,6 @@ background-color: #333; } -.vs-dark .monaco-findInput > .controls > .matchCount { - background: #555; -} - /* Highlighting */ .monaco-findInput.highlight-0 .controls { animation: monaco-findInput-highlight-0 100ms linear 0s; diff --git a/src/vs/base/browser/ui/findinput/findInput.ts b/src/vs/base/browser/ui/findinput/findInput.ts index 2d38be64dc965..2d44764697416 100644 --- a/src/vs/base/browser/ui/findinput/findInput.ts +++ b/src/vs/base/browser/ui/findinput/findInput.ts @@ -13,6 +13,7 @@ import { IContextViewProvider } from 'vs/base/browser/ui/contextview/contextview import { Widget } from 'vs/base/browser/ui/widget'; import Event, { Emitter } from 'vs/base/common/event'; import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; +import { IMouseEvent } from 'vs/base/browser/mouseEvent'; import { KeyCode } from 'vs/base/common/keyCodes'; import { CaseSensitiveCheckbox, WholeWordsCheckbox, RegexCheckbox } from 'vs/base/browser/ui/findinput/findInputCheckboxes'; import { Color } from 'vs/base/common/color'; @@ -69,6 +70,9 @@ export class FindInput extends Widget { private _onKeyDown = this._register(new Emitter()); public onKeyDown: Event = this._onKeyDown.event; + private _onMouseDown = this._register(new Emitter()); + public onMouseDown: Event = this._onMouseDown.event; + private _onInput = this._register(new Emitter()); public onInput: Event = this._onInput.event; @@ -113,6 +117,7 @@ export class FindInput extends Widget { this.onkeydown(this.inputBox.inputElement, (e) => this._onKeyDown.fire(e)); this.onkeyup(this.inputBox.inputElement, (e) => this._onKeyUp.fire(e)); this.oninput(this.inputBox.inputElement, (e) => this._onInput.fire()); + this.onmousedown(this.inputBox.inputElement, (e) => this._onMouseDown.fire(e)); } public enable(): void { diff --git a/src/vs/base/browser/ui/iconLabel/iconLabel.ts b/src/vs/base/browser/ui/iconLabel/iconLabel.ts index e4461fc0ca63e..2e75d8666720c 100644 --- a/src/vs/base/browser/ui/iconLabel/iconLabel.ts +++ b/src/vs/base/browser/ui/iconLabel/iconLabel.ts @@ -11,8 +11,7 @@ import { HighlightedLabel } from 'vs/base/browser/ui/highlightedlabel/highlighte import { IMatch } from 'vs/base/common/filters'; import uri from 'vs/base/common/uri'; import paths = require('vs/base/common/paths'); -import types = require('vs/base/common/types'); -import { IWorkspaceProvider, getPathLabel, IUserHomeProvider } from 'vs/base/common/labels'; +import { IRootProvider, getPathLabel, IUserHomeProvider } from 'vs/base/common/labels'; export interface IIconLabelCreationOptions { supportHighlights?: boolean; @@ -99,30 +98,15 @@ export class IconLabel { export class FileLabel extends IconLabel { - constructor(container: HTMLElement, file: uri, provider: IWorkspaceProvider, userHome?: IUserHomeProvider) { + constructor(container: HTMLElement, file: uri, provider: IRootProvider, userHome?: IUserHomeProvider) { super(container); this.setFile(file, provider, userHome); } - public setFile(file: uri, provider: IWorkspaceProvider, userHome: IUserHomeProvider): void { - const path = getPath(file); - const parent = paths.dirname(path); + public setFile(file: uri, provider: IRootProvider, userHome: IUserHomeProvider): void { + const parent = paths.dirname(file.fsPath); - this.setValue(paths.basename(path), parent && parent !== '.' ? getPathLabel(parent, provider, userHome) : '', { title: path }); + this.setValue(paths.basename(file.fsPath), parent && parent !== '.' ? getPathLabel(parent, provider, userHome) : '', { title: file.fsPath }); } -} - -function getPath(arg1: uri | IWorkspaceProvider): string { - if (!arg1) { - return null; - } - - if (types.isFunction((arg1).getWorkspace)) { - const ws = (arg1).getWorkspace(); - - return ws ? ws.resource.fsPath : void 0; - } - - return (arg1).fsPath; } \ No newline at end of file diff --git a/src/vs/base/browser/ui/inputbox/inputBox.ts b/src/vs/base/browser/ui/inputbox/inputBox.ts index 87f6428e526d6..18b09e697e877 100644 --- a/src/vs/base/browser/ui/inputbox/inputBox.ts +++ b/src/vs/base/browser/ui/inputbox/inputBox.ts @@ -9,8 +9,7 @@ import 'vs/css!./inputBox'; import nls = require('vs/nls'); import * as Bal from 'vs/base/browser/browser'; import * as dom from 'vs/base/browser/dom'; -import { IHTMLContentElement } from 'vs/base/common/htmlContent'; -import { renderHtml } from 'vs/base/browser/htmlContentRenderer'; +import { RenderOptions, renderFormattedText, renderText } from 'vs/base/browser/htmlContentRenderer'; import aria = require('vs/base/browser/ui/aria/aria'); import { IAction } from 'vs/base/common/actions'; import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar'; @@ -381,18 +380,14 @@ export class InputBox extends Widget { div = dom.append(container, $('.monaco-inputbox-container')); layout(); - let renderOptions: IHTMLContentElement = { - tagName: 'span', - className: 'monaco-inputbox-message', + const renderOptions: RenderOptions = { + inline: true, + className: 'monaco-inputbox-message' }; - if (this.message.formatContent) { - renderOptions.formattedText = this.message.content; - } else { - renderOptions.text = this.message.content; - } - - let spanElement: HTMLElement = renderHtml(renderOptions); + let spanElement: HTMLElement = (this.message.formatContent + ? renderFormattedText(this.message.content, renderOptions) + : renderText(this.message.content, renderOptions)) as any; dom.addClass(spanElement, this.classForType(this.message.type)); const styles = this.stylesForType(this.message.type); diff --git a/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.css b/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.css index 6c7d094804aa4..bb681b3a86392 100644 --- a/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.css +++ b/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.css @@ -9,11 +9,11 @@ .monaco-kbkey { display: inline-block; - border: solid 1px #ccc; - border-bottom-color: #bbb; + border: solid 1px rgba(204, 204, 204, 0.4); + border-bottom-color: rgba(187, 187, 187, 0.4); border-radius: 3px; - box-shadow: inset 0 -1px 0 #bbb; - background-color: #ddd; + box-shadow: inset 0 -1px 0 rgba(187, 187, 187, 0.4); + background-color: rgba(221, 221, 221, 0.4); vertical-align: middle; color: #555; line-height: 10px; @@ -25,7 +25,7 @@ .vs-dark .monaco-kbkey { background-color: rgba(128, 128, 128, 0.17); color: #ccc; - border: solid 1px #333; - border-bottom-color: #444; - box-shadow: inset 0 -1px 0 #444; + border: solid 1px rgba(51, 51, 51, 0.6); + border-bottom-color: rgba(68, 68, 68, 0.6); + box-shadow: inset 0 -1px 0 rgba(68, 68, 68, 0.6); } \ No newline at end of file diff --git a/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.ts b/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.ts index e2a7ae59e0872..f59b03858115b 100644 --- a/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.ts +++ b/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.ts @@ -8,8 +8,8 @@ import 'vs/css!./keybindingLabel'; import { IDisposable } from 'vs/base/common/lifecycle'; import { equals } from 'vs/base/common/objects'; import { OperatingSystem } from 'vs/base/common/platform'; -import { ResolvedKeybinding } from 'vs/base/common/keycodes'; -import { UILabelProvider } from 'vs/platform/keybinding/common/keybindingLabels'; +import { ResolvedKeybinding, ResolvedKeybindingPart } from 'vs/base/common/keyCodes'; +import { UILabelProvider } from 'vs/base/common/keybindingLabels'; import * as dom from 'vs/base/browser/dom'; const $ = dom.$; @@ -72,21 +72,21 @@ export class KeybindingLabel implements IDisposable { this.didEverRender = true; } - private renderPart(parent: HTMLElement, part: ResolvedKeybinding, match: PartMatches) { + private renderPart(parent: HTMLElement, part: ResolvedKeybindingPart, match: PartMatches) { const modifierLabels = UILabelProvider.modifierLabels[this.os]; - if (part.hasCtrlModifier()) { + if (part.ctrlKey) { this.renderKey(parent, modifierLabels.ctrlKey, match && match.ctrlKey, modifierLabels.separator); } - if (part.hasShiftModifier()) { + if (part.shiftKey) { this.renderKey(parent, modifierLabels.shiftKey, match && match.shiftKey, modifierLabels.separator); } - if (part.hasAltModifier()) { + if (part.altKey) { this.renderKey(parent, modifierLabels.altKey, match && match.altKey, modifierLabels.separator); } - if (part.hasMetaModifier()) { + if (part.metaKey) { this.renderKey(parent, modifierLabels.metaKey, match && match.metaKey, modifierLabels.separator); } - const keyLabel = part.getLabelWithoutModifiers(); + const keyLabel = part.keyLabel; if (keyLabel) { this.renderKey(parent, keyLabel, match && match.keyCode, ''); } diff --git a/src/vs/base/browser/ui/leftRightWidget/leftRightWidget.css b/src/vs/base/browser/ui/leftRightWidget/leftRightWidget.css deleted file mode 100644 index 346b3ec60a173..0000000000000 --- a/src/vs/base/browser/ui/leftRightWidget/leftRightWidget.css +++ /dev/null @@ -1,15 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -.monaco-left-right-widget > .left { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - display: block; -} - -.monaco-left-right-widget > .right { - float: right; -} diff --git a/src/vs/base/browser/ui/leftRightWidget/leftRightWidget.ts b/src/vs/base/browser/ui/leftRightWidget/leftRightWidget.ts deleted file mode 100644 index 85e960a9ce34c..0000000000000 --- a/src/vs/base/browser/ui/leftRightWidget/leftRightWidget.ts +++ /dev/null @@ -1,38 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import 'vs/css!./leftRightWidget'; -import { Builder, $ } from 'vs/base/browser/builder'; -import { IDisposable } from 'vs/base/common/lifecycle'; - -export interface IRenderer { - (container: HTMLElement): IDisposable; -} - -export class LeftRightWidget { - - private $el: Builder; - private toDispose: IDisposable[]; - - constructor(container: Builder, renderLeftFn: IRenderer, renderRightFn: IRenderer); - constructor(container: HTMLElement, renderLeftFn: IRenderer, renderRightFn: IRenderer); - constructor(container: any, renderLeftFn: IRenderer, renderRightFn: IRenderer) { - this.$el = $('.monaco-left-right-widget').appendTo(container); - - this.toDispose = [ - renderRightFn($('.right').appendTo(this.$el).getHTMLElement()), - renderLeftFn($('span.left').appendTo(this.$el).getHTMLElement()) - ].filter(x => !!x); - } - - public dispose() { - if (this.$el) { - this.$el.destroy(); - this.$el = null; - } - } -} diff --git a/src/vs/base/browser/ui/list/listPaging.ts b/src/vs/base/browser/ui/list/listPaging.ts index 70170ab730b83..c11ff0e6f8d1a 100644 --- a/src/vs/base/browser/ui/list/listPaging.ts +++ b/src/vs/base/browser/ui/list/listPaging.ts @@ -85,6 +85,10 @@ export class PagedList { return mapEvent(this.list.onSelectionChange, ({ elements, indexes }) => ({ elements: elements.map(e => this._model.get(e)), indexes })); } + get onPin(): Event> { + return mapEvent(this.list.onPin, ({ elements, indexes }) => ({ elements: elements.map(e => this._model.get(e)), indexes })); + } + get model(): IPagedModel { return this._model; } diff --git a/src/vs/base/browser/ui/list/listView.ts b/src/vs/base/browser/ui/list/listView.ts index 91d89a81e55e0..ae867ee1e2147 100644 --- a/src/vs/base/browser/ui/list/listView.ts +++ b/src/vs/base/browser/ui/list/listView.ts @@ -32,7 +32,8 @@ const MouseEventTypes = [ 'mouseover', 'mousemove', 'mouseout', - 'contextmenu' + 'contextmenu', + 'touchstart' ]; export interface IListViewOptions { @@ -81,7 +82,6 @@ export class ListView implements IDisposable { this.gesture = new Gesture(this.rowsContainer); this.scrollableElement = new ScrollableElement(this.rowsContainer, { - canUseTranslate3d: false, alwaysConsumeMouseWheel: true, horizontal: ScrollbarVisibility.Hidden, vertical: ScrollbarVisibility.Auto, diff --git a/src/vs/base/browser/ui/list/listWidget.ts b/src/vs/base/browser/ui/list/listWidget.ts index c7f365fb2b208..ca25d3e9381c9 100644 --- a/src/vs/base/browser/ui/list/listWidget.ts +++ b/src/vs/base/browser/ui/list/listWidget.ts @@ -183,6 +183,32 @@ class FocusTrait extends Trait { } } +class Aria implements IRenderer, ISpliceable { + + private length = 0; + + get templateId(): string { + return 'aria'; + } + + splice(start: number, deleteCount: number, elements: T[]): void { + this.length += elements.length - deleteCount; + } + + renderTemplate(container: HTMLElement): HTMLElement { + return container; + } + + renderElement(element: T, index: number, container: HTMLElement): void { + container.setAttribute('aria-setsize', `${this.length}`); + container.setAttribute('aria-posinset', `${index + 1}`); + } + + disposeTemplate(container: HTMLElement): void { + // noop + } +} + /** * The TraitSpliceable is used as a util class to be able * to preserve traits across splice calls, given an identity @@ -321,6 +347,8 @@ class MouseController implements IDisposable { this.disposables = []; this.disposables.push(view.addListener('mousedown', e => this.onMouseDown(e))); this.disposables.push(view.addListener('click', e => this.onPointer(e))); + this.disposables.push(view.addListener('dblclick', e => this.onDoubleClick(e))); + this.disposables.push(view.addListener('touchstart', e => this.onMouseDown(e))); this.disposables.push(view.addListener(TouchEventType.Tap, e => this.onPointer(e))); } @@ -362,6 +390,19 @@ class MouseController implements IDisposable { this.list.open(focus); } + private onDoubleClick(e: IListMouseEvent): void { + e.preventDefault(); + e.stopPropagation(); + + if (isSelectionChangeEvent(e)) { + return; + } + + const focus = this.list.getFocus(); + this.list.setSelection(focus); + this.list.pin(focus); + } + private changeSelection(e: IListMouseEvent, reference: number | undefined): void { const focus = e.index; @@ -405,13 +446,16 @@ export interface IListOptions extends IListViewOptions, IMouseControllerOptio export interface IListStyles { listFocusBackground?: Color; + listFocusForeground?: Color; listActiveSelectionBackground?: Color; listActiveSelectionForeground?: Color; listFocusAndSelectionBackground?: Color; listFocusAndSelectionForeground?: Color; listInactiveSelectionBackground?: Color; + listInactiveSelectionForeground?: Color; listInactiveFocusBackground?: Color; listHoverBackground?: Color; + listHoverForeground?: Color; listDropBackground?: Color; listFocusOutline?: Color; listInactiveFocusOutline?: Color; @@ -571,6 +615,11 @@ export class List implements ISpliceable, IDisposable { return mapEvent(this._onOpen.event, indexes => this.toListEvent({ indexes })); } + private _onPin = new Emitter(); + @memoize get onPin(): Event> { + return mapEvent(this._onPin.event, indexes => this.toListEvent({ indexes })); + } + private _onDOMFocus = new Emitter(); get onDOMFocus(): Event { return this._onDOMFocus.event; } @@ -586,12 +635,14 @@ export class List implements ISpliceable, IDisposable { renderers: IRenderer[], options: IListOptions = DefaultOptions ) { + const aria = new Aria(); this.focus = new FocusTrait(i => this.getElementDomId(i)); this.selection = new Trait('selected'); + this.eventBufferer = new EventBufferer(); mixin(options, defaultStyles, false); - renderers = renderers.map(r => new PipelineRenderer(r.templateId, [this.focus.renderer, this.selection.renderer, r])); + renderers = renderers.map(r => new PipelineRenderer(r.templateId, [aria, this.focus.renderer, this.selection.renderer, r])); this.view = new ListView(container, delegate, renderers, options); this.view.domNode.setAttribute('role', 'tree'); @@ -601,6 +652,7 @@ export class List implements ISpliceable, IDisposable { this.styleElement = DOM.createStyleSheet(this.view.domNode); this.spliceable = new CombinedSpliceable([ + aria, new TraitSpliceable(this.focus, this.view, options.identityProvider), new TraitSpliceable(this.selection, this.view, options.identityProvider), this.view @@ -810,15 +862,24 @@ export class List implements ISpliceable, IDisposable { this._onOpen.fire(indexes); } + pin(indexes: number[]): void { + this._onPin.fire(indexes); + } + style(styles: IListStyles): void { - let content: string[] = []; + const content: string[] = []; if (styles.listFocusBackground) { content.push(`.monaco-list.${this.idPrefix}:focus .monaco-list-row.focused { background-color: ${styles.listFocusBackground}; }`); } + if (styles.listFocusForeground) { + content.push(`.monaco-list.${this.idPrefix}:focus .monaco-list-row.focused { color: ${styles.listFocusForeground}; }`); + } + if (styles.listActiveSelectionBackground) { content.push(`.monaco-list.${this.idPrefix}:focus .monaco-list-row.selected { background-color: ${styles.listActiveSelectionBackground}; }`); + content.push(`.monaco-list.${this.idPrefix}:focus .monaco-list-row.selected:hover { background-color: ${styles.listActiveSelectionBackground}; }`); // overwrite :hover style in this case! } if (styles.listActiveSelectionForeground) { @@ -843,12 +904,20 @@ export class List implements ISpliceable, IDisposable { content.push(`.monaco-list.${this.idPrefix} .monaco-list-row.selected:hover { background-color: ${styles.listInactiveSelectionBackground}; }`); // overwrite :hover style in this case! } + if (styles.listInactiveSelectionForeground) { + content.push(`.monaco-list.${this.idPrefix} .monaco-list-row.selected { color: ${styles.listInactiveSelectionForeground}; }`); + } + if (styles.listHoverBackground) { content.push(`.monaco-list.${this.idPrefix} .monaco-list-row:hover { background-color: ${styles.listHoverBackground}; }`); } + if (styles.listHoverForeground) { + content.push(`.monaco-list.${this.idPrefix} .monaco-list-row:hover { color: ${styles.listHoverForeground}; }`); + } + if (styles.listSelectionOutline) { - content.push(`.monaco-list.${this.idPrefix} .monaco-list-row.selected { outline: 1px dotted ${styles.listSelectionOutline}; }`); + content.push(`.monaco-list.${this.idPrefix} .monaco-list-row.selected { outline: 1px dotted ${styles.listSelectionOutline}; outline-offset: -1px; }`); } if (styles.listFocusOutline) { diff --git a/src/vs/base/browser/ui/menu/menu.css b/src/vs/base/browser/ui/menu/menu.css index 291f08b6ade64..a7ea384d8882f 100644 --- a/src/vs/base/browser/ui/menu/menu.css +++ b/src/vs/base/browser/ui/menu/menu.css @@ -51,7 +51,6 @@ display: inline-block; -ms-flex: 2 1 auto; flex: 2 1 auto; - opacity: 0.7; padding: 0.8em 1em; line-height: 1.1em; font-size: 12px; diff --git a/src/vs/base/browser/ui/menu/menu.ts b/src/vs/base/browser/ui/menu/menu.ts index 15a214855361d..2130e8803b76d 100644 --- a/src/vs/base/browser/ui/menu/menu.ts +++ b/src/vs/base/browser/ui/menu/menu.ts @@ -36,7 +36,8 @@ export class Menu extends EventEmitter { orientation: ActionsOrientation.VERTICAL, actionItemProvider: options.actionItemProvider, context: options.context, - actionRunner: options.actionRunner + actionRunner: options.actionRunner, + isMenu: true }); this.listener = this.addEmitter(this.actionBar); diff --git a/src/vs/base/browser/ui/progressbar/progressbar.css b/src/vs/base/browser/ui/progressbar/progressbar.css index b067d6edefb36..cd910840fb86f 100644 --- a/src/vs/base/browser/ui/progressbar/progressbar.css +++ b/src/vs/base/browser/ui/progressbar/progressbar.css @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ .progress-container { width: 100%; - height: 5px; + height: 5px; } .progress-container .progress-bit { @@ -13,7 +13,6 @@ position: absolute; left: 0; display: none; - background-color: #0E70C0; } .progress-container.active .progress-bit { @@ -52,14 +51,6 @@ -moz-animation-timing-function: linear; } -.progress-container.infinite.done .progress-bit { - transition: opacity 200ms linear; - -webkit-transition: opacity 200ms linear; - -o-transition: opacity 200ms linear; - -moz-transition: opacity 200ms linear; - -ms-transition: opacity 200ms linear; -} - @keyframes progress { from { left: 0; width: 2%; } 50% { left: 50%; width: 5%; } to { left: 98%; width: 2%; } } @-ms-keyframes progress { from { left: 0; width: 2%; } 50% { left: 50%; width: 5%; } to { left: 98%; width: 2%; } } @-webkit-keyframes progress { from { left: 0; width: 2%; } 50% { left: 50%; width: 5%; } to { left: 98%; width: 2%; } } diff --git a/src/vs/base/browser/ui/progressbar/progressbar.ts b/src/vs/base/browser/ui/progressbar/progressbar.ts index 70fb8421bc65b..ea34e06e1cbb9 100644 --- a/src/vs/base/browser/ui/progressbar/progressbar.ts +++ b/src/vs/base/browser/ui/progressbar/progressbar.ts @@ -11,6 +11,8 @@ import assert = require('vs/base/common/assert'); import { Builder, $ } from 'vs/base/browser/builder'; import DOM = require('vs/base/browser/dom'); import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import { Color } from 'vs/base/common/color'; +import { mixin } from 'vs/base/common/objects'; const css_done = 'done'; const css_active = 'active'; @@ -19,11 +21,22 @@ const css_discrete = 'discrete'; const css_progress_container = 'progress-container'; const css_progress_bit = 'progress-bit'; +export interface IProgressBarOptions extends IProgressBarStyles { +} + +export interface IProgressBarStyles { + progressBarBackground?: Color; +} + +const defaultOpts = { + progressBarBackground: Color.fromHex('#0E70C0') +}; + /** * A progress bar with support for infinite or discrete progress. */ export class ProgressBar { - + private options: IProgressBarOptions; private toUnbind: IDisposable[]; private workedVal: number; private element: Builder; @@ -31,11 +44,17 @@ export class ProgressBar { private bit: HTMLElement; private totalWork: number; private animationStopToken: ValueCallback; + private progressBarBackground: Color; + + constructor(builder: Builder, options?: IProgressBarOptions) { + this.options = options || Object.create(null); + mixin(this.options, defaultOpts, false); - constructor(builder: Builder) { this.toUnbind = []; this.workedVal = 0; + this.progressBarBackground = this.options.progressBarBackground; + this.create(builder); } @@ -61,6 +80,8 @@ export class ProgressBar { this.bit = builder.getHTMLElement(); }); + + this.applyStyles(); } private off(): void { @@ -189,6 +210,20 @@ export class ProgressBar { return $(this.element); } + public style(styles: IProgressBarStyles): void { + this.progressBarBackground = styles.progressBarBackground; + + this.applyStyles(); + } + + protected applyStyles(): void { + if (this.bit) { + const background = this.progressBarBackground ? this.progressBarBackground.toString() : null; + + this.bit.style.backgroundColor = background; + } + } + public dispose(): void { this.toUnbind = dispose(this.toUnbind); } diff --git a/src/vs/base/browser/ui/resourceviewer/resourceViewer.ts b/src/vs/base/browser/ui/resourceviewer/resourceViewer.ts index c65314275c04a..4244dc01a59b4 100644 --- a/src/vs/base/browser/ui/resourceviewer/resourceViewer.ts +++ b/src/vs/base/browser/ui/resourceviewer/resourceViewer.ts @@ -13,7 +13,7 @@ import paths = require('vs/base/common/paths'); import { Builder, $ } from 'vs/base/browser/builder'; import DOM = require('vs/base/browser/dom'); import { DomScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement'; -import { BoundedLinkedMap } from 'vs/base/common/map'; +import { BoundedMap } from 'vs/base/common/map'; interface MapExtToMediaMimes { @@ -80,7 +80,7 @@ export interface IResourceDescriptor { // we need to bypass the cache or not. We could always bypass the cache everytime we show the image // however that has very bad impact on memory consumption because each time the image gets shown, // memory grows (see also https://github.com/electron/electron/issues/6275) -const IMAGE_RESOURCE_ETAG_CACHE = new BoundedLinkedMap<{ etag: string, src: string }>(100); +const IMAGE_RESOURCE_ETAG_CACHE = new BoundedMap<{ etag: string, src: string }>(100); function imageSrc(descriptor: IResourceDescriptor): string { const src = descriptor.resource.toString(); @@ -166,12 +166,9 @@ export class ResourceViewer { .append($('a', { role: 'button', class: 'open-external', - text: nls.localize('resourceOpenExternalButton', "Open image") + text: nls.localize('resourceOpenExternalButton', "Open image using external program?") }).on(DOM.EventType.CLICK, (e) => { openExternal(descriptor.resource); - })) - .append($('span', { - text: nls.localize('resourceOpenExternalText', ' using external program?') })); } } diff --git a/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts b/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts index 9d6879f176f3b..5d326d59eb4ce 100644 --- a/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts +++ b/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts @@ -6,7 +6,7 @@ import * as Platform from 'vs/base/common/platform'; import * as DomUtils from 'vs/base/browser/dom'; -import { IMouseEvent, StandardMouseEvent, StandardMouseWheelEvent } from 'vs/base/browser/mouseEvent'; +import { IMouseEvent, StandardMouseWheelEvent } from 'vs/base/browser/mouseEvent'; import { GlobalMouseMoveMonitor, IStandardMouseMoveEventData, standardMouseMoveMerger } from 'vs/base/browser/globalMouseMoveMonitor'; import { Widget } from 'vs/base/browser/ui/widget'; import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; @@ -20,8 +20,7 @@ import { Scrollable, ScrollbarVisibility } from 'vs/base/common/scrollable'; */ const MOUSE_DRAG_RESET_DISTANCE = 140; -export interface IMouseMoveEventData { - leftButton: boolean; +export interface ISimplifiedMouseEvent { posx: number; posy: number; } @@ -33,7 +32,6 @@ export interface ScrollbarHost { } export interface AbstractScrollbarOptions { - canUseTranslate3d: boolean; lazyRender: boolean; host: ScrollbarHost; scrollbarState: ScrollbarState; @@ -44,7 +42,6 @@ export interface AbstractScrollbarOptions { export abstract class AbstractScrollbar extends Widget { - protected _canUseTranslate3d: boolean; protected _host: ScrollbarHost; protected _scrollable: Scrollable; private _lazyRender: boolean; @@ -59,7 +56,6 @@ export abstract class AbstractScrollbar extends Widget { constructor(opts: AbstractScrollbarOptions) { super(); - this._canUseTranslate3d = opts.canUseTranslate3d; this._lazyRender = opts.lazyRender; this._host = opts.host; this._scrollable = opts.scrollable; @@ -68,6 +64,8 @@ export abstract class AbstractScrollbar extends Widget { this._mouseMoveMonitor = this._register(new GlobalMouseMoveMonitor()); this._shouldRender = true; this.domNode = createFastDomNode(document.createElement('div')); + this.domNode.setAttribute('role', 'presentation'); + this.domNode.setAttribute('aria-hidden', 'true'); this._visibilityController.setDomNode(this.domNode); this.domNode.setPosition('absolute'); @@ -97,19 +95,20 @@ export abstract class AbstractScrollbar extends Widget { this.slider.setLeft(left); this.slider.setWidth(width); this.slider.setHeight(height); + this.slider.setLayerHinting(true); this.domNode.domNode.appendChild(this.slider.domNode); - this.onmousedown(this.slider.domNode, (e) => this._sliderMouseDown(e)); + this.onmousedown(this.slider.domNode, (e) => { + if (e.leftButton) { + e.preventDefault(); + this._sliderMouseDown(e, () => { /*nothing to do*/ }); + } + }); } // ----------------- Update state - public setCanUseTranslate3d(canUseTranslate3d: boolean): boolean { - this._canUseTranslate3d = canUseTranslate3d; - return true; - } - protected _onElementSize(visibleSize: number): boolean { if (this._scrollbarState.setVisibleSize(visibleSize)) { this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()); @@ -159,13 +158,6 @@ export abstract class AbstractScrollbar extends Widget { } this._shouldRender = false; - if (this._canUseTranslate3d) { - // Put the scrollbar in its own layer - this.domNode.setTransform('translate3d(0px, 0px, 0px)'); - } else { - this.domNode.setTransform(''); - } - this._renderDomNode(this._scrollbarState.getRectangleLargeSize(), this._scrollbarState.getRectangleSmallSize()); this._updateSlider(this._scrollbarState.getSliderSize(), this._scrollbarState.getArrowSize() + this._scrollbarState.getSliderPosition()); } @@ -178,62 +170,66 @@ export abstract class AbstractScrollbar extends Widget { this._onMouseDown(e); } - public delegateMouseDown(browserEvent: MouseEvent): void { - let e = new StandardMouseEvent(browserEvent); + public delegateMouseDown(e: IMouseEvent): void { let domTop = this.domNode.domNode.getClientRects()[0].top; let sliderStart = domTop + this._scrollbarState.getSliderPosition(); let sliderStop = domTop + this._scrollbarState.getSliderPosition() + this._scrollbarState.getSliderSize(); let mousePos = this._sliderMousePosition(e); if (sliderStart <= mousePos && mousePos <= sliderStop) { // Act as if it was a mouse down on the slider - this._sliderMouseDown(e); + if (e.leftButton) { + e.preventDefault(); + this._sliderMouseDown(e, () => { /*nothing to do*/ }); + } } else { // Act as if it was a mouse down on the scrollbar this._onMouseDown(e); } } - private _onMouseDown(e: IMouseEvent): void { - let domNodePosition = DomUtils.getDomNodePagePosition(this.domNode.domNode); - let desiredSliderPosition = this._mouseDownRelativePosition(e, domNodePosition) - this._scrollbarState.getArrowSize() - this._scrollbarState.getSliderSize() / 2; - this.setDesiredScrollPosition(this._scrollbarState.convertSliderPositionToScrollPosition(desiredSliderPosition)); - this._sliderMouseDown(e); + public delegateSliderMouseDown(e: ISimplifiedMouseEvent, onDragFinished: () => void): void { + this._sliderMouseDown(e, onDragFinished); } - private _sliderMouseDown(e: IMouseEvent): void { + private _onMouseDown(e: IMouseEvent): void { + let domNodePosition = DomUtils.getDomNodePagePosition(this.domNode.domNode); + this.setDesiredScrollPosition(this._scrollbarState.getDesiredScrollPositionFromOffset(this._mouseDownRelativePosition(e, domNodePosition))); if (e.leftButton) { - let initialMouseOrthogonalPosition = this._sliderOrthogonalMousePosition(e); - let initialScrollPosition = this._getScrollPosition(); - let draggingDelta = this._sliderMousePosition(e) - this._scrollbarState.getSliderPosition(); - this.slider.toggleClassName('active', true); - - this._mouseMoveMonitor.startMonitoring( - standardMouseMoveMerger, - (mouseMoveData: IStandardMouseMoveEventData) => { - let mouseOrthogonalPosition = this._sliderOrthogonalMousePosition(mouseMoveData); - let mouseOrthogonalDelta = Math.abs(mouseOrthogonalPosition - initialMouseOrthogonalPosition); - // console.log(initialMouseOrthogonalPosition + ' -> ' + mouseOrthogonalPosition + ': ' + mouseOrthogonalDelta); - if (Platform.isWindows && mouseOrthogonalDelta > MOUSE_DRAG_RESET_DISTANCE) { - // The mouse has wondered away from the scrollbar => reset dragging - this.setDesiredScrollPosition(initialScrollPosition); - } else { - let desiredSliderPosition = this._sliderMousePosition(mouseMoveData) - draggingDelta; - this.setDesiredScrollPosition(this._scrollbarState.convertSliderPositionToScrollPosition(desiredSliderPosition)); - } - }, - () => { - this.slider.toggleClassName('active', false); - this._host.onDragEnd(); - } - ); - e.preventDefault(); - this._host.onDragStart(); + this._sliderMouseDown(e, () => { /*nothing to do*/ }); } } - public validateScrollPosition(desiredScrollPosition: number): number { - return this._scrollbarState.validateScrollPosition(desiredScrollPosition); + private _sliderMouseDown(e: ISimplifiedMouseEvent, onDragFinished: () => void): void { + const initialMousePosition = this._sliderMousePosition(e); + const initialMouseOrthogonalPosition = this._sliderOrthogonalMousePosition(e); + const initialScrollbarState = this._scrollbarState.clone(); + this.slider.toggleClassName('active', true); + + this._mouseMoveMonitor.startMonitoring( + standardMouseMoveMerger, + (mouseMoveData: IStandardMouseMoveEventData) => { + const mouseOrthogonalPosition = this._sliderOrthogonalMousePosition(mouseMoveData); + const mouseOrthogonalDelta = Math.abs(mouseOrthogonalPosition - initialMouseOrthogonalPosition); + + if (Platform.isWindows && mouseOrthogonalDelta > MOUSE_DRAG_RESET_DISTANCE) { + // The mouse has wondered away from the scrollbar => reset dragging + this.setDesiredScrollPosition(initialScrollbarState.getScrollPosition()); + return; + } + + const mousePosition = this._sliderMousePosition(mouseMoveData); + const mouseDelta = mousePosition - initialMousePosition; + this.setDesiredScrollPosition(initialScrollbarState.getDesiredScrollPositionFromDelta(mouseDelta)); + }, + () => { + this.slider.toggleClassName('active', false); + this._host.onDragEnd(); + onDragFinished(); + } + ); + + this._host.onDragStart(); } public setDesiredScrollPosition(desiredScrollPosition: number): boolean { @@ -254,9 +250,12 @@ export abstract class AbstractScrollbar extends Widget { protected abstract _renderDomNode(largeSize: number, smallSize: number): void; protected abstract _updateSlider(sliderSize: number, sliderPosition: number): void; - protected abstract _mouseDownRelativePosition(e: IMouseEvent, domNodePosition: DomUtils.IDomNodePagePosition): number; - protected abstract _sliderMousePosition(e: IMouseMoveEventData): number; - protected abstract _sliderOrthogonalMousePosition(e: IMouseMoveEventData): number; + + protected abstract _mouseDownRelativePosition(e: ISimplifiedMouseEvent, domNodePosition: DomUtils.IDomNodePagePosition): number; + protected abstract _sliderMousePosition(e: ISimplifiedMouseEvent): number; + protected abstract _sliderOrthogonalMousePosition(e: ISimplifiedMouseEvent): number; + protected abstract _getScrollPosition(): number; protected abstract _setScrollPosition(elementScrollPosition: number): void; + public abstract validateScrollPosition(desiredScrollPosition: number): number; } diff --git a/src/vs/base/browser/ui/scrollbar/horizontalScrollbar.ts b/src/vs/base/browser/ui/scrollbar/horizontalScrollbar.ts index bb0d255d2dee0..f6da6af6bc36c 100644 --- a/src/vs/base/browser/ui/scrollbar/horizontalScrollbar.ts +++ b/src/vs/base/browser/ui/scrollbar/horizontalScrollbar.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { AbstractScrollbar, ScrollbarHost, IMouseMoveEventData } from 'vs/base/browser/ui/scrollbar/abstractScrollbar'; -import { IMouseEvent, StandardMouseWheelEvent } from 'vs/base/browser/mouseEvent'; +import { AbstractScrollbar, ScrollbarHost, ISimplifiedMouseEvent } from 'vs/base/browser/ui/scrollbar/abstractScrollbar'; +import { StandardMouseWheelEvent } from 'vs/base/browser/mouseEvent'; import { IDomNodePagePosition } from 'vs/base/browser/dom'; import { ScrollableElementResolvedOptions } from 'vs/base/browser/ui/scrollbar/scrollableElementOptions'; import { Scrollable, ScrollEvent, ScrollbarVisibility } from 'vs/base/common/scrollable'; @@ -16,7 +16,6 @@ export class HorizontalScrollbar extends AbstractScrollbar { constructor(scrollable: Scrollable, options: ScrollableElementResolvedOptions, host: ScrollbarHost) { super({ - canUseTranslate3d: options.canUseTranslate3d, lazyRender: options.lazyRender, host: host, scrollbarState: new ScrollbarState( @@ -61,13 +60,7 @@ export class HorizontalScrollbar extends AbstractScrollbar { protected _updateSlider(sliderSize: number, sliderPosition: number): void { this.slider.setWidth(sliderSize); - if (this._canUseTranslate3d) { - this.slider.setTransform('translate3d(' + sliderPosition + 'px, 0px, 0px)'); - this.slider.setLeft(0); - } else { - this.slider.setTransform(''); - this.slider.setLeft(sliderPosition); - } + this.slider.setLeft(sliderPosition); } protected _renderDomNode(largeSize: number, smallSize: number): void { @@ -84,15 +77,15 @@ export class HorizontalScrollbar extends AbstractScrollbar { return this._shouldRender; } - protected _mouseDownRelativePosition(e: IMouseEvent, domNodePosition: IDomNodePagePosition): number { + protected _mouseDownRelativePosition(e: ISimplifiedMouseEvent, domNodePosition: IDomNodePagePosition): number { return e.posx - domNodePosition.left; } - protected _sliderMousePosition(e: IMouseMoveEventData): number { + protected _sliderMousePosition(e: ISimplifiedMouseEvent): number { return e.posx; } - protected _sliderOrthogonalMousePosition(e: IMouseMoveEventData): number { + protected _sliderOrthogonalMousePosition(e: ISimplifiedMouseEvent): number { return e.posy; } @@ -106,4 +99,8 @@ export class HorizontalScrollbar extends AbstractScrollbar { scrollLeft: scrollPosition }); } + + public validateScrollPosition(desiredScrollPosition: number): number { + return this._scrollable.validateScrollLeft(desiredScrollPosition); + } } diff --git a/src/vs/base/browser/ui/scrollbar/scrollableElement.ts b/src/vs/base/browser/ui/scrollbar/scrollableElement.ts index 8e69aa38ffabd..993b7e385df8d 100644 --- a/src/vs/base/browser/ui/scrollbar/scrollableElement.ts +++ b/src/vs/base/browser/ui/scrollbar/scrollableElement.ts @@ -6,7 +6,6 @@ import 'vs/css!./media/scrollbars'; -import * as Browser from 'vs/base/browser/browser'; import * as DomUtils from 'vs/base/browser/dom'; import * as Platform from 'vs/base/common/platform'; import { StandardMouseWheelEvent, IMouseEvent } from 'vs/base/browser/mouseEvent'; @@ -18,7 +17,7 @@ import { Scrollable, ScrollState, ScrollEvent, INewScrollState, ScrollbarVisibil import { Widget } from 'vs/base/browser/ui/widget'; import { TimeoutTimer } from 'vs/base/common/async'; import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; -import { ScrollbarHost } from 'vs/base/browser/ui/scrollbar/abstractScrollbar'; +import { ScrollbarHost, ISimplifiedMouseEvent } from 'vs/base/browser/ui/scrollbar/abstractScrollbar'; import Event, { Emitter } from 'vs/base/common/event'; const HIDE_TIMEOUT = 500; @@ -141,12 +140,16 @@ export class ScrollableElement extends Widget { * Delegate a mouse down event to the vertical scrollbar. * This is to help with clicking somewhere else and having the scrollbar react. */ - public delegateVerticalScrollbarMouseDown(browserEvent: MouseEvent): void { + public delegateVerticalScrollbarMouseDown(browserEvent: IMouseEvent): void { this._verticalScrollbar.delegateMouseDown(browserEvent); } - public getVerticalSliderVerticalCenter(): number { - return this._verticalScrollbar.getVerticalSliderVerticalCenter(); + /** + * Delegate a mouse down event to the vertical scrollbar (directly to the slider!). + * This is to help with clicking somewhere else and having the scrollbar react. + */ + public delegateSliderMouseDown(e: ISimplifiedMouseEvent, onDragFinished: () => void): void { + this._verticalScrollbar.delegateSliderMouseDown(e, onDragFinished); } public updateState(newState: INewScrollState): void { @@ -180,9 +183,6 @@ export class ScrollableElement extends Widget { this._options.mouseWheelScrollSensitivity = massagedOptions.mouseWheelScrollSensitivity; this._setListeningToMouseWheel(this._options.handleMouseWheel); - this._shouldRender = this._horizontalScrollbar.setCanUseTranslate3d(massagedOptions.canUseTranslate3d) || this._shouldRender; - this._shouldRender = this._verticalScrollbar.setCanUseTranslate3d(massagedOptions.canUseTranslate3d) || this._shouldRender; - if (!this._options.lazyRender) { this._render(); } @@ -401,7 +401,6 @@ export class DomScrollableElement extends ScrollableElement { function resolveOptions(opts: ScrollableElementCreationOptions): ScrollableElementResolvedOptions { let result: ScrollableElementResolvedOptions = { - canUseTranslate3d: opts.canUseTranslate3d && Browser.supportsTranslate3d, lazyRender: (typeof opts.lazyRender !== 'undefined' ? opts.lazyRender : false), className: (typeof opts.className !== 'undefined' ? opts.className : ''), useShadows: (typeof opts.useShadows !== 'undefined' ? opts.useShadows : true), diff --git a/src/vs/base/browser/ui/scrollbar/scrollableElementOptions.ts b/src/vs/base/browser/ui/scrollbar/scrollableElementOptions.ts index 032e637d5b51e..5485e4eb84b5a 100644 --- a/src/vs/base/browser/ui/scrollbar/scrollableElementOptions.ts +++ b/src/vs/base/browser/ui/scrollbar/scrollableElementOptions.ts @@ -7,10 +7,6 @@ import { ScrollbarVisibility } from 'vs/base/common/scrollable'; export interface ScrollableElementCreationOptions { - /** - * Allow scrollbar rendering to use translate3d. - */ - canUseTranslate3d: boolean; /** * The scrollable element should not do any DOM mutations until renderNow() is called. * Defaults to false. @@ -105,13 +101,11 @@ export interface ScrollableElementCreationOptions { } export interface ScrollableElementChangeOptions { - canUseTranslate3d: boolean; handleMouseWheel?: boolean; mouseWheelScrollSensitivity?: number; } export interface ScrollableElementResolvedOptions { - canUseTranslate3d: boolean; lazyRender: boolean; className: string; useShadows: boolean; diff --git a/src/vs/base/browser/ui/scrollbar/scrollbarState.ts b/src/vs/base/browser/ui/scrollbar/scrollbarState.ts index b9b8a99849dcb..ee2041c3af24e 100644 --- a/src/vs/base/browser/ui/scrollbar/scrollbarState.ts +++ b/src/vs/base/browser/ui/scrollbar/scrollbarState.ts @@ -11,39 +11,56 @@ const MINIMUM_SLIDER_SIZE = 20; export class ScrollbarState { - // --- immutable - private _scrollbarSize: number; - private _oppositeScrollbarSize: number; - private _arrowSize: number; + /** + * For the vertical scrollbar: the width. + * For the horizontal scrollbar: the height. + */ + private readonly _scrollbarSize: number; - // --- variables - private _visibleSize: number; - private _scrollSize: number; - private _scrollPosition: number; + /** + * For the vertical scrollbar: the height of the pair horizontal scrollbar. + * For the horizontal scrollbar: the width of the pair vertical scrollbar. + */ + private readonly _oppositeScrollbarSize: number; - // --- computed variables + /** + * For the vertical scrollbar: the height of the scrollbar's arrows. + * For the horizontal scrollbar: the width of the scrollbar's arrows. + */ + private readonly _arrowSize: number; + // --- variables /** - * `visibleSize` - `oppositeScrollbarSize` + * For the vertical scrollbar: the viewport height. + * For the horizontal scrollbar: the viewport width. */ - private _computedAvailableSize: number; + private _visibleSize: number; /** - * `computedAvailableSize` - 2 * `arrowSize` + * For the vertical scrollbar: the scroll height. + * For the horizontal scrollbar: the scroll width. */ - private _computedRepresentableSize: number; + private _scrollSize: number; /** - * `computedRepresentableSize` / `scrollSize` + * For the vertical scrollbar: the scroll top. + * For the horizontal scrollbar: the scroll left. */ - private _computedRatio: number; + private _scrollPosition: number; + + // --- computed variables /** - * (`scrollSize` > `visibleSize`) + * `visibleSize` - `oppositeScrollbarSize` + */ + private _computedAvailableSize: number; + /** + * (`scrollSize` > 0 && `scrollSize` > `visibleSize`) */ private _computedIsNeeded: boolean; private _computedSliderSize: number; + private _computedSliderRatio: number; private _computedSliderPosition: number; constructor(arrowSize: number, scrollbarSize: number, oppositeScrollbarSize: number) { @@ -56,15 +73,22 @@ export class ScrollbarState { this._scrollPosition = 0; this._computedAvailableSize = 0; - this._computedRepresentableSize = 0; - this._computedRatio = 0.1; this._computedIsNeeded = false; this._computedSliderSize = 0; + this._computedSliderRatio = 0; this._computedSliderPosition = 0; this._refreshComputedValues(); } + public clone(): ScrollbarState { + let r = new ScrollbarState(this._arrowSize, this._scrollbarSize, this._oppositeScrollbarSize); + r.setVisibleSize(this._visibleSize); + r.setScrollSize(this._scrollSize); + r.setScrollPosition(this._scrollPosition); + return r; + } + public setVisibleSize(visibleSize: number): boolean { let iVisibleSize = Math.round(visibleSize); if (this._visibleSize !== iVisibleSize) { @@ -95,62 +119,56 @@ export class ScrollbarState { return false; } - private _refreshComputedValues(): void { - const oppositeScrollbarSize = this._oppositeScrollbarSize; - const arrowSize = this._arrowSize; - const visibleSize = this._visibleSize; - const scrollSize = this._scrollSize; - const scrollPosition = this._scrollPosition; - - let computedAvailableSize = Math.max(0, visibleSize - oppositeScrollbarSize); - let computedRepresentableSize = Math.max(0, computedAvailableSize - 2 * arrowSize); - let computedRatio = scrollSize > 0 ? (computedRepresentableSize / scrollSize) : 0; - let computedIsNeeded = (scrollSize > visibleSize); - - let computedSliderSize: number; - let computedSliderPosition: number; + private static _computeValues(oppositeScrollbarSize: number, arrowSize: number, visibleSize: number, scrollSize: number, scrollPosition: number) { + const computedAvailableSize = Math.max(0, visibleSize - oppositeScrollbarSize); + const computedRepresentableSize = Math.max(0, computedAvailableSize - 2 * arrowSize); + const computedIsNeeded = (scrollSize > 0 && scrollSize > visibleSize); if (!computedIsNeeded) { - computedSliderSize = computedRepresentableSize; - computedSliderPosition = 0; - } else { - computedSliderSize = Math.floor(visibleSize * computedRatio); - computedSliderPosition = Math.floor(scrollPosition * computedRatio); - - if (computedSliderSize < MINIMUM_SLIDER_SIZE) { - // We must artificially increase the size of the slider, since the slider would be too small otherwise - // The effort is to keep the slider centered around the original position, but we must take into - // account the cases when the slider is too close to the top or too close to the bottom - - let sliderArtificialOffset = (MINIMUM_SLIDER_SIZE - computedSliderSize) / 2; - computedSliderSize = MINIMUM_SLIDER_SIZE; - - computedSliderPosition -= sliderArtificialOffset; - - if (computedSliderPosition + computedSliderSize > computedRepresentableSize) { - // Slider is too close to the bottom, so we glue it to the bottom - computedSliderPosition = computedRepresentableSize - computedSliderSize; - } - - if (computedSliderPosition < 0) { - // Slider is too close to the top, so we glue it to the top - computedSliderPosition = 0; - } - } + // There is no need for a slider + return { + computedAvailableSize: Math.round(computedAvailableSize), + computedIsNeeded: computedIsNeeded, + computedSliderSize: Math.round(computedRepresentableSize), + computedSliderRatio: 0, + computedSliderPosition: 0, + }; } - this._computedAvailableSize = Math.round(computedAvailableSize); - this._computedRepresentableSize = Math.round(computedRepresentableSize); - this._computedRatio = computedRatio; - this._computedIsNeeded = computedIsNeeded; - this._computedSliderSize = Math.round(computedSliderSize); - this._computedSliderPosition = Math.round(computedSliderPosition); + // We must artificially increase the size of the slider if needed, since the slider would be too small to grab with the mouse otherwise + const computedSliderSize = Math.round(Math.max(MINIMUM_SLIDER_SIZE, Math.floor(visibleSize * computedRepresentableSize / scrollSize))); + + // The slider can move from 0 to `computedRepresentableSize` - `computedSliderSize` + // in the same way `scrollPosition` can move from 0 to `scrollSize` - `visibleSize`. + const computedSliderRatio = (computedRepresentableSize - computedSliderSize) / (scrollSize - visibleSize); + const computedSliderPosition = (scrollPosition * computedSliderRatio); + + return { + computedAvailableSize: Math.round(computedAvailableSize), + computedIsNeeded: computedIsNeeded, + computedSliderSize: Math.round(computedSliderSize), + computedSliderRatio: computedSliderRatio, + computedSliderPosition: Math.round(computedSliderPosition), + }; + } + + private _refreshComputedValues(): void { + const r = ScrollbarState._computeValues(this._oppositeScrollbarSize, this._arrowSize, this._visibleSize, this._scrollSize, this._scrollPosition); + this._computedAvailableSize = r.computedAvailableSize; + this._computedIsNeeded = r.computedIsNeeded; + this._computedSliderSize = r.computedSliderSize; + this._computedSliderRatio = r.computedSliderRatio; + this._computedSliderPosition = r.computedSliderPosition; } public getArrowSize(): number { return this._arrowSize; } + public getScrollPosition(): number { + return this._scrollPosition; + } + public getRectangleLargeSize(): number { return this._computedAvailableSize; } @@ -175,14 +193,30 @@ export class ScrollbarState { return (this._computedSliderPosition + this._computedSliderSize / 2); } - public convertSliderPositionToScrollPosition(desiredSliderPosition: number): number { - return desiredSliderPosition / this._computedRatio; + /** + * Compute a desired `scrollPosition` such that `offset` ends up in the center of the slider. + * `offset` is based on the same coordinate system as the `sliderPosition`. + */ + public getDesiredScrollPositionFromOffset(offset: number): number { + if (!this._computedIsNeeded) { + // no need for a slider + return 0; + } + + let desiredSliderPosition = offset - this._arrowSize - this._computedSliderSize / 2; + return Math.round(desiredSliderPosition / this._computedSliderRatio); } - public validateScrollPosition(desiredScrollPosition: number): number { - desiredScrollPosition = Math.round(desiredScrollPosition); - desiredScrollPosition = Math.max(desiredScrollPosition, 0); - desiredScrollPosition = Math.min(desiredScrollPosition, this._scrollSize - this._visibleSize); - return desiredScrollPosition; + /** + * Compute a desired `scrollPosition` such that the slider moves by `delta`. + */ + public getDesiredScrollPositionFromDelta(delta: number): number { + if (!this._computedIsNeeded) { + // no need for a slider + return 0; + } + + let desiredSliderPosition = this._computedSliderPosition + delta; + return Math.round(desiredSliderPosition / this._computedSliderRatio); } } diff --git a/src/vs/base/browser/ui/scrollbar/verticalScrollbar.ts b/src/vs/base/browser/ui/scrollbar/verticalScrollbar.ts index e7b363ef16e9a..373940f95b635 100644 --- a/src/vs/base/browser/ui/scrollbar/verticalScrollbar.ts +++ b/src/vs/base/browser/ui/scrollbar/verticalScrollbar.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { AbstractScrollbar, ScrollbarHost, IMouseMoveEventData } from 'vs/base/browser/ui/scrollbar/abstractScrollbar'; -import { IMouseEvent, StandardMouseWheelEvent } from 'vs/base/browser/mouseEvent'; +import { AbstractScrollbar, ScrollbarHost, ISimplifiedMouseEvent } from 'vs/base/browser/ui/scrollbar/abstractScrollbar'; +import { StandardMouseWheelEvent } from 'vs/base/browser/mouseEvent'; import { IDomNodePagePosition } from 'vs/base/browser/dom'; import { ScrollableElementResolvedOptions } from 'vs/base/browser/ui/scrollbar/scrollableElementOptions'; import { Scrollable, ScrollEvent, ScrollbarVisibility } from 'vs/base/common/scrollable'; @@ -16,7 +16,6 @@ export class VerticalScrollbar extends AbstractScrollbar { constructor(scrollable: Scrollable, options: ScrollableElementResolvedOptions, host: ScrollbarHost) { super({ - canUseTranslate3d: options.canUseTranslate3d, lazyRender: options.lazyRender, host: host, scrollbarState: new ScrollbarState( @@ -60,19 +59,9 @@ export class VerticalScrollbar extends AbstractScrollbar { this._createSlider(0, Math.floor((options.verticalScrollbarSize - options.verticalSliderSize) / 2), options.verticalSliderSize, null); } - public getVerticalSliderVerticalCenter(): number { - return this._scrollbarState.getSliderCenter(); - } - protected _updateSlider(sliderSize: number, sliderPosition: number): void { this.slider.setHeight(sliderSize); - if (this._canUseTranslate3d) { - this.slider.setTransform('translate3d(0px, ' + sliderPosition + 'px, 0px)'); - this.slider.setTop(0); - } else { - this.slider.setTransform(''); - this.slider.setTop(sliderPosition); - } + this.slider.setTop(sliderPosition); } protected _renderDomNode(largeSize: number, smallSize: number): void { @@ -89,15 +78,15 @@ export class VerticalScrollbar extends AbstractScrollbar { return this._shouldRender; } - protected _mouseDownRelativePosition(e: IMouseEvent, domNodePosition: IDomNodePagePosition): number { + protected _mouseDownRelativePosition(e: ISimplifiedMouseEvent, domNodePosition: IDomNodePagePosition): number { return e.posy - domNodePosition.top; } - protected _sliderMousePosition(e: IMouseMoveEventData): number { + protected _sliderMousePosition(e: ISimplifiedMouseEvent): number { return e.posy; } - protected _sliderOrthogonalMousePosition(e: IMouseMoveEventData): number { + protected _sliderOrthogonalMousePosition(e: ISimplifiedMouseEvent): number { return e.posx; } @@ -111,4 +100,8 @@ export class VerticalScrollbar extends AbstractScrollbar { scrollTop: scrollPosition }); } + + public validateScrollPosition(desiredScrollPosition: number): number { + return this._scrollable.validateScrollTop(desiredScrollPosition); + } } diff --git a/src/vs/base/browser/ui/splitview/splitview.css b/src/vs/base/browser/ui/splitview/splitview.css index 8936d95727e08..4a6de69c521c0 100644 --- a/src/vs/base/browser/ui/splitview/splitview.css +++ b/src/vs/base/browser/ui/splitview/splitview.css @@ -30,6 +30,10 @@ display: flex; } +.monaco-split-view > .split-view-view > .header.hide { + display: none; +} + /* Bold font style does not go well with CJK fonts */ .monaco-split-view:lang(zh-Hans) > .split-view-view > .header, .monaco-split-view:lang(zh-Hant) > .split-view-view > .header, diff --git a/src/vs/base/browser/ui/splitview/splitview.ts b/src/vs/base/browser/ui/splitview/splitview.ts index 09df1966a1559..7be647dd58b24 100644 --- a/src/vs/base/browser/ui/splitview/splitview.ts +++ b/src/vs/base/browser/ui/splitview/splitview.ts @@ -9,7 +9,6 @@ import 'vs/css!./splitview'; import lifecycle = require('vs/base/common/lifecycle'); import ee = require('vs/base/common/eventEmitter'); import types = require('vs/base/common/types'); -import objects = require('vs/base/common/objects'); import dom = require('vs/base/browser/dom'); import numbers = require('vs/base/common/numbers'); import sash = require('vs/base/browser/ui/sash/sash'); @@ -102,11 +101,12 @@ export abstract class View extends ee.EventEmitter implements IView { abstract layout(size: number, orientation: Orientation): void; } -export interface IHeaderViewOptions extends IHeaderViewStyles { +export interface IHeaderViewOptions extends IHeaderViewStyles, IViewOptions { headerSize?: number; } export interface IHeaderViewStyles { + headerForeground?: Color; headerBackground?: Color; headerHighContrastBorder?: Color; } @@ -117,34 +117,46 @@ const headerDefaultOpts = { export abstract class HeaderView extends View { - protected headerSize: number; + private _headerSize: number; + private _showHeader: boolean; + protected header: HTMLElement; protected body: HTMLElement; + private headerForeground: Color; private headerBackground: Color; private headerHighContrastBorder; constructor(opts: IHeaderViewOptions) { super(opts); - this.headerSize = types.isUndefined(opts.headerSize) ? 22 : opts.headerSize; + this._headerSize = types.isUndefined(opts.headerSize) ? 22 : opts.headerSize; + this._showHeader = this._headerSize > 0; + this.headerForeground = opts.headerForeground; this.headerBackground = opts.headerBackground || headerDefaultOpts.headerBackground; this.headerHighContrastBorder = opts.headerHighContrastBorder; } style(styles: IHeaderViewStyles): void { + this.headerForeground = styles.headerForeground; this.headerBackground = styles.headerBackground; this.headerHighContrastBorder = styles.headerHighContrastBorder; this.applyStyles(); } + protected get headerSize(): number { + return this._showHeader ? this._headerSize : 0; + } + protected applyStyles(): void { if (this.header) { + const headerForegroundColor = this.headerForeground ? this.headerForeground.toString() : null; const headerBackgroundColor = this.headerBackground ? this.headerBackground.toString() : null; const headerHighContrastBorderColor = this.headerHighContrastBorder ? this.headerHighContrastBorder.toString() : null; + this.header.style.color = headerForegroundColor; this.header.style.backgroundColor = headerBackgroundColor; this.header.style.borderTop = headerHighContrastBorderColor ? `1px solid ${headerHighContrastBorderColor}` : null; } @@ -162,7 +174,7 @@ export abstract class HeaderView extends View { this.header.style.height = headerSize; } - if (this.headerSize > 0) { + if (this._showHeader) { this.renderHeader(this.header); container.appendChild(this.header); } @@ -177,6 +189,28 @@ export abstract class HeaderView extends View { this.applyStyles(); } + showHeader(): boolean { + if (!this._showHeader) { + if (!this.body.parentElement.contains(this.header)) { + this.renderHeader(this.header); + this.body.parentElement.insertBefore(this.header, this.body); + } + dom.removeClass(this.header, 'hide'); + this._showHeader = true; + return true; + } + return false; + } + + hideHeader(): boolean { + if (this._showHeader) { + dom.addClass(this.header, 'hide'); + this._showHeader = false; + return true; + } + return false; + } + layout(size: number, orientation: Orientation): void { this.layoutBodyContainer(orientation); this.layoutBody(size - this.headerSize); @@ -205,10 +239,9 @@ export abstract class HeaderView extends View { } export interface ICollapsibleViewOptions { - ariaHeaderLabel?: string; - fixedSize?: number; - minimumSize?: number; - headerSize?: number; + sizing: ViewSizing; + ariaHeaderLabel: string; + bodySize?: number; initialState?: CollapsibleState; } @@ -225,14 +258,43 @@ export abstract class AbstractCollapsibleView extends HeaderView { private headerClickListener: lifecycle.IDisposable; private headerKeyListener: lifecycle.IDisposable; private focusTracker: dom.IFocusTracker; + private _bodySize: number; + private _previousSize: number = null; + private readonly viewSizing: ViewSizing; constructor(opts: ICollapsibleViewOptions) { super(opts); + this.viewSizing = opts.sizing; + this.ariaHeaderLabel = opts.ariaHeaderLabel; - this.ariaHeaderLabel = opts && opts.ariaHeaderLabel; + this.setBodySize(types.isUndefined(opts.bodySize) ? 22 : opts.bodySize); this.changeState(types.isUndefined(opts.initialState) ? CollapsibleState.EXPANDED : opts.initialState); } + get previousSize(): number { + return this._previousSize; + } + + setBodySize(bodySize: number) { + this._bodySize = bodySize; + this.updateSize(); + } + + private updateSize() { + if (this.viewSizing === ViewSizing.Fixed) { + this.setFixed(this.state === CollapsibleState.EXPANDED ? this._bodySize + this.headerSize : this.headerSize); + } else { + this._minimumSize = this._bodySize + this.headerSize; + this._previousSize = !this.previousSize || this._previousSize < this._minimumSize ? this._minimumSize : this._previousSize; + if (this.state === CollapsibleState.EXPANDED) { + this.setFlexible(this._previousSize || this._minimumSize); + } else { + this._previousSize = this.size || this._minimumSize; + this.setFixed(this.headerSize); + } + } + } + render(container: HTMLElement, orientation: Orientation): void { super.render(container, orientation); @@ -342,6 +404,23 @@ export abstract class AbstractCollapsibleView extends HeaderView { } this.layoutHeader(); + this.updateSize(); + } + + showHeader(): boolean { + const result = super.showHeader(); + if (result) { + this.updateSize(); + } + return result; + } + + hideHeader(): boolean { + const result = super.hideHeader(); + if (result) { + this.updateSize(); + } + return result; } dispose(): void { @@ -364,55 +443,6 @@ export abstract class AbstractCollapsibleView extends HeaderView { } } -export abstract class CollapsibleView extends AbstractCollapsibleView { - - private previousSize: number; - - constructor(opts: ICollapsibleViewOptions) { - super(opts); - this.previousSize = null; - } - - protected changeState(state: CollapsibleState): void { - super.changeState(state); - - if (state === CollapsibleState.EXPANDED) { - this.setFlexible(this.previousSize || this._minimumSize); - } else { - this.previousSize = this.size; - this.setFixed(); - } - } -} - -export interface IFixedCollapsibleViewOptions extends ICollapsibleViewOptions { - expandedBodySize?: number; -} - -export abstract class FixedCollapsibleView extends AbstractCollapsibleView { - - private _expandedBodySize: number; - - constructor(opts: IFixedCollapsibleViewOptions) { - super(objects.mixin({ sizing: ViewSizing.Fixed }, opts)); - this._expandedBodySize = types.isUndefined(opts.expandedBodySize) ? 22 : opts.expandedBodySize; - } - - get fixedSize(): number { return this.state === CollapsibleState.EXPANDED ? this.expandedSize : this.headerSize; } - private get expandedSize(): number { return this.expandedBodySize + this.headerSize; } - - get expandedBodySize(): number { return this._expandedBodySize; } - set expandedBodySize(size: number) { - this._expandedBodySize = size; - this.setFixed(this.fixedSize); - } - - protected changeState(state: CollapsibleState): void { - super.changeState(state); - this.setFixed(this.fixedSize); - } -} - class PlainView extends View { render() { } focus() { } @@ -519,6 +549,11 @@ export class SplitView implements throw new Error('Initial weight must be a positive number.'); } + /** + * Reset size to null. This will layout newly added views to initial weights. + */ + this.size = null; + let viewCount = this.views.length; // Create view container @@ -559,6 +594,14 @@ export class SplitView implements this.viewFocusNextListeners.splice(index, 0, view.addListener('focusNext', () => index < this.views.length && this.views[index + 1].focus())); } + updateWeight(view: IView, weight: number) { + let index = this.views.indexOf(view); + if (index < 0) { + return; + } + this.initialWeights[index] = weight; + } + removeView(view: IView): void { let index = this.views.indexOf(view); @@ -566,13 +609,16 @@ export class SplitView implements return; } + this.size = null; let deadView = new DeadView(view); this.views[index] = deadView; this.onViewChange(deadView, 0); let sashIndex = Math.max(index - 1, 0); - this.sashes[sashIndex].dispose(); - this.sashes.splice(sashIndex, 1); + if (sashIndex < this.sashes.length) { + this.sashes[sashIndex].dispose(); + this.sashes.splice(sashIndex, 1); + } this.viewChangeListeners[index].dispose(); this.viewChangeListeners.splice(index, 1); @@ -587,6 +633,7 @@ export class SplitView implements this.viewFocusNextListeners.splice(index, 1); this.views.splice(index, 1); + this.initialWeights.splice(index, 1); this.el.removeChild(this.viewElements[index]); this.viewElements.splice(index, 1); diff --git a/src/vs/base/browser/ui/toolbar/toolbar.css b/src/vs/base/browser/ui/toolbar/toolbar.css index a6cca1a32a676..4d91d3f5c9ef3 100644 --- a/src/vs/base/browser/ui/toolbar/toolbar.css +++ b/src/vs/base/browser/ui/toolbar/toolbar.css @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -.monaco-toolbar .dropdown > .dropdown-label:not(:empty):not(.tick) { +.monaco-toolbar .dropdown > .dropdown-label:not(:empty) { padding: 0; } diff --git a/src/vs/base/common/actions.ts b/src/vs/base/common/actions.ts index b51eac17ddb40..1a5e7e1acd19f 100644 --- a/src/vs/base/common/actions.ts +++ b/src/vs/base/common/actions.ts @@ -9,7 +9,12 @@ import { IEventEmitter, EventEmitter } from 'vs/base/common/eventEmitter'; import { IDisposable } from 'vs/base/common/lifecycle'; import * as Events from 'vs/base/common/events'; import Event, { Emitter } from 'vs/base/common/event'; -import { ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; + +export interface ITelemetryData { + from?: string; + target?: string; + [key: string]: any; +} export interface IAction extends IDisposable { id: string; diff --git a/src/vs/base/common/arrays.ts b/src/vs/base/common/arrays.ts index e23dde3c9ac92..e014f37cc158c 100644 --- a/src/vs/base/common/arrays.ts +++ b/src/vs/base/common/arrays.ts @@ -66,6 +66,62 @@ export function findFirst(array: T[], p: (x: T) => boolean): number { return low; } +/** + * Like `Array#sort` but always stable. Usually runs a little slower `than Array#sort` + * so only use this when actually needing stable sort. + */ +export function mergeSort(data: T[], compare: (a: T, b: T) => number): T[] { + _divideAndMerge(data, compare); + return data; +} + +function _divideAndMerge(data: T[], compare: (a: T, b: T) => number): void { + if (data.length <= 1) { + // sorted + return; + } + const p = (data.length / 2) | 0; + const left = data.slice(0, p); + const right = data.slice(p); + + _divideAndMerge(left, compare); + _divideAndMerge(right, compare); + + let leftIdx = 0; + let rightIdx = 0; + let i = 0; + while (leftIdx < left.length && rightIdx < right.length) { + let ret = compare(left[leftIdx], right[rightIdx]); + if (ret <= 0) { + // smaller_equal -> take left to preserve order + data[i++] = left[leftIdx++]; + } else { + // greater -> take right + data[i++] = right[rightIdx++]; + } + } + while (leftIdx < left.length) { + data[i++] = left[leftIdx++]; + } + while (rightIdx < right.length) { + data[i++] = right[rightIdx++]; + } +} + +export function groupBy(data: T[], compare: (a: T, b: T) => number): T[][] { + const result: T[][] = []; + let currentGroup: T[]; + for (const element of data.slice(0).sort(compare)) { + if (!currentGroup || compare(currentGroup[0], element) !== 0) { + currentGroup = [element]; + result.push(currentGroup); + } else { + currentGroup.push(element); + } + } + return result; +} + /** * Takes two *sorted* arrays and computes their delta (removed, added elements). * Finishes in `Math.min(before.length, after.length)` steps. @@ -276,3 +332,13 @@ export function insert(array: T[], element: T): () => void { } }; } + +/** + * Insert `insertArr` inside `taget` at `insertIndex`. + * Please don't touch unless you understand https://jsperf.com/inserting-an-array-within-an-array + */ +export function arrayInsert(target: T[], insertIndex: number, insertArr: T[]): T[] { + const before = target.slice(0, insertIndex); + const after = target.slice(insertIndex); + return before.concat(insertArr, after); +} diff --git a/src/vs/base/common/async.ts b/src/vs/base/common/async.ts index 92cb8074ede00..171871d1d7d5e 100644 --- a/src/vs/base/common/async.ts +++ b/src/vs/base/common/async.ts @@ -640,11 +640,11 @@ export class RunOnceScheduler { export function nfcall(fn: Function, ...args: any[]): Promise; export function nfcall(fn: Function, ...args: any[]): TPromise; export function nfcall(fn: Function, ...args: any[]): any { - return new Promise((c, e) => fn(...args, (err, result) => err ? e(err) : c(result))); + return new Promise((c, e) => fn(...args, (err, result) => err ? e(err) : c(result)), () => null); } export function ninvoke(thisArg: any, fn: Function, ...args: any[]): Promise; export function ninvoke(thisArg: any, fn: Function, ...args: any[]): TPromise; export function ninvoke(thisArg: any, fn: Function, ...args: any[]): any { - return new Promise((c, e) => fn.call(thisArg, ...args, (err, result) => err ? e(err) : c(result))); + return new Promise((c, e) => fn.call(thisArg, ...args, (err, result) => err ? e(err) : c(result)), () => null); } diff --git a/src/vs/base/common/collections.ts b/src/vs/base/common/collections.ts index ddd96a7298a89..ca4832b1ccba3 100644 --- a/src/vs/base/common/collections.ts +++ b/src/vs/base/common/collections.ts @@ -27,9 +27,7 @@ const hasOwnProperty = Object.prototype.hasOwnProperty; * Returns an array which contains all values that reside * in the given set. */ -export function values(from: IStringDictionary): T[]; -export function values(from: INumberDictionary): T[]; -export function values(from: any): any[] { +export function values(from: IStringDictionary | INumberDictionary): T[] { const result: T[] = []; for (var key in from) { if (hasOwnProperty.call(from, key)) { @@ -53,10 +51,8 @@ export function size(from: IStringDictionary | INumberDictionary): numb * Iterates over each entry in the provided set. The iterator allows * to remove elements and will stop when the callback returns {{false}}. */ -export function forEach(from: IStringDictionary, callback: (entry: { key: string; value: T; }, remove: Function) => any): void; -export function forEach(from: INumberDictionary, callback: (entry: { key: number; value: T; }, remove: Function) => any): void; -export function forEach(from: any, callback: (entry: { key: any; value: T; }, remove: Function) => any): void { - for (var key in from) { +export function forEach(from: IStringDictionary | INumberDictionary, callback: (entry: { key: any; value: T; }, remove: Function) => any): void { + for (let key in from) { if (hasOwnProperty.call(from, key)) { const result = callback({ key: key, value: from[key] }, function () { delete from[key]; @@ -72,9 +68,7 @@ export function forEach(from: any, callback: (entry: { key: any; value: T; }, * Removes an element from the dictionary. Returns {{false}} if the property * does not exists. */ -export function remove(from: IStringDictionary, key: string): boolean; -export function remove(from: INumberDictionary, key: string): boolean; -export function remove(from: any, key: string): boolean { +export function remove(from: IStringDictionary | INumberDictionary, key: string): boolean { if (!hasOwnProperty.call(from, key)) { return false; } diff --git a/src/vs/base/common/color.ts b/src/vs/base/common/color.ts index ad17cab9171f4..e35bf39d7cb3b 100644 --- a/src/vs/base/common/color.ts +++ b/src/vs/base/common/color.ts @@ -382,6 +382,10 @@ export class Color { return new Color(new RGBA(p.r, p.g, p.b, Math.round(p.a * factor))); } + public isTransparent(): boolean { + return this.rgba.a === 0; + } + public opposite(): Color { return new Color(new RGBA( 255 - this.rgba.r, diff --git a/src/vs/base/common/errorMessage.ts b/src/vs/base/common/errorMessage.ts index 9f5ed7fda90d0..1f587120c5e1c 100644 --- a/src/vs/base/common/errorMessage.ts +++ b/src/vs/base/common/errorMessage.ts @@ -9,7 +9,14 @@ import objects = require('vs/base/common/objects'); import types = require('vs/base/common/types'); import arrays = require('vs/base/common/arrays'); import strings = require('vs/base/common/strings'); -import { IXHRResponse } from 'vs/base/common/http'; + +export interface IXHRResponse { + responseText: string; + status: number; + + readyState: number; + getResponseHeader: (header: string) => string; +} export interface IConnectionErrorData { status: number; @@ -165,7 +172,7 @@ function detectSystemErrorMessage(exception: any): string { // See https://nodejs.org/api/errors.html#errors_class_system_error if (typeof exception.code === 'string' && typeof exception.errno === 'number' && typeof exception.syscall === 'string') { - return nls.localize('nodeExceptionMessage', "A system error occured ({0})", exception.message); + return nls.localize('nodeExceptionMessage', "A system error occurred ({0})", exception.message); } return exception.message; diff --git a/src/vs/base/common/errors.ts b/src/vs/base/common/errors.ts index 7367358de17e9..26d3df040c912 100644 --- a/src/vs/base/common/errors.ts +++ b/src/vs/base/common/errors.ts @@ -8,7 +8,58 @@ import platform = require('vs/base/common/platform'); import types = require('vs/base/common/types'); import { IAction } from 'vs/base/common/actions'; import Severity from 'vs/base/common/severity'; -import { TPromise } from 'vs/base/common/winjs.base'; +import { TPromise, IPromiseError, IPromiseErrorDetail } from 'vs/base/common/winjs.base'; + +// ------ BEGIN Hook up error listeners to winjs promises + +let outstandingPromiseErrors: { [id: string]: IPromiseErrorDetail; } = {}; +function promiseErrorHandler(e: IPromiseError): void { + + // + // e.detail looks like: { exception, error, promise, handler, id, parent } + // + var details = e.detail; + var id = details.id; + + // If the error has a parent promise then this is not the origination of the + // error so we check if it has a handler, and if so we mark that the error + // was handled by removing it from outstandingPromiseErrors + // + if (details.parent) { + if (details.handler && outstandingPromiseErrors) { + delete outstandingPromiseErrors[id]; + } + return; + } + + // Indicate that this error was originated and needs to be handled + outstandingPromiseErrors[id] = details; + + // The first time the queue fills up this iteration, schedule a timeout to + // check if any errors are still unhandled. + if (Object.keys(outstandingPromiseErrors).length === 1) { + setTimeout(function () { + var errors = outstandingPromiseErrors; + outstandingPromiseErrors = {}; + Object.keys(errors).forEach(function (errorId) { + var error = errors[errorId]; + if (error.exception) { + onUnexpectedError(error.exception); + } else if (error.error) { + onUnexpectedError(error.error); + } + console.log('WARNING: Promise with no error callback:' + error.id); + console.log(error); + if (error.exception) { + console.log(error.exception.stack); + } + }); + }, 0); + } +} +TPromise.addEventListener('error', promiseErrorHandler); + +// ------ END Hook up error listeners to winjs promises export interface ErrorListenerCallback { (error: any): void; diff --git a/src/vs/base/common/event.ts b/src/vs/base/common/event.ts index a8d793e83ea47..adbac3e577601 100644 --- a/src/vs/base/common/event.ts +++ b/src/vs/base/common/event.ts @@ -257,6 +257,15 @@ export function fromPromise(promise: TPromise): Event { return emitter.event; } +export function toPromise(event: Event): TPromise { + return new TPromise(complete => { + const sub = event(e => { + sub.dispose(); + complete(e); + }); + }); +} + export function delayed(promise: TPromise>): Event { let toCancel: TPromise = null; let listener: IDisposable = null; @@ -400,11 +409,11 @@ class ChainableEvent implements IChainableEvent { constructor(private _event: Event) { } - map(fn) { + map(fn: (i: T) => O): IChainableEvent { return new ChainableEvent(mapEvent(this._event, fn)); } - filter(fn) { + filter(fn: (e: T) => boolean): IChainableEvent { return new ChainableEvent(filterEvent(this._event, fn)); } @@ -511,4 +520,4 @@ export function echo(event: Event, nextTick = false, buffer: T[] = []): Ev }); return emitter.event; -} \ No newline at end of file +} diff --git a/src/vs/base/common/filters.ts b/src/vs/base/common/filters.ts index dc376f9150b17..228bae7cc617a 100644 --- a/src/vs/base/common/filters.ts +++ b/src/vs/base/common/filters.ts @@ -5,7 +5,7 @@ 'use strict'; import strings = require('vs/base/common/strings'); -import { BoundedLinkedMap } from 'vs/base/common/map'; +import { BoundedMap } from 'vs/base/common/map'; import { CharCode } from 'vs/base/common/charCode'; export interface IFilter { @@ -334,7 +334,7 @@ export enum SubstringMatching { export const fuzzyContiguousFilter = or(matchesPrefix, matchesCamelCase, matchesContiguousSubString); const fuzzySeparateFilter = or(matchesPrefix, matchesCamelCase, matchesSubString); -const fuzzyRegExpCache = new BoundedLinkedMap(10000); // bounded to 10000 elements +const fuzzyRegExpCache = new BoundedMap(10000); // bounded to 10000 elements export function matchesFuzzy(word: string, wordToMatchAgainst: string, enableSeparateSubstringMatching = false): IMatch[] { if (typeof word !== 'string' || typeof wordToMatchAgainst !== 'string') { @@ -358,29 +358,6 @@ export function matchesFuzzy(word: string, wordToMatchAgainst: string, enableSep return enableSeparateSubstringMatching ? fuzzySeparateFilter(word, wordToMatchAgainst) : fuzzyContiguousFilter(word, wordToMatchAgainst); } -export function matchesFuzzy2(pattern: string, word: string): number[] { - - pattern = pattern.toLowerCase(); - word = word.toLowerCase(); - - let matches: number[] = []; - let patternPos = 0; - let wordPos = 0; - while (patternPos < pattern.length && wordPos < word.length) { - if (pattern[patternPos] === word[wordPos]) { - patternPos += 1; - matches.push(wordPos); - } - wordPos += 1; - } - - if (patternPos !== pattern.length) { - return undefined; - } - - return matches; -} - export function createMatches(position: number[]): IMatch[] { let ret: IMatch[] = []; if (!position) { @@ -446,16 +423,36 @@ _seps['/'] = true; _seps['\\'] = true; _seps['\''] = true; _seps['"'] = true; +_seps[':'] = true; + +const _ws: { [ch: string]: boolean } = Object.create(null); +_ws[' '] = true; +_ws['\t'] = true; const enum Arrow { Top = 0b1, Diag = 0b10, Left = 0b100 } -export function fuzzyScore(pattern: string, word: string): [number, number[]] { +export function fuzzyScore(pattern: string, word: string, patternMaxWhitespaceIgnore?: number): [number, number[]] { const patternLen = pattern.length > 100 ? 100 : pattern.length; const wordLen = word.length > 100 ? 100 : word.length; - if (patternLen === 0) { - return [-1, []]; + // Check for leading whitespace in the pattern and + // start matching just after that position. This is + // like `pattern = pattern.rtrim()` but doesn't create + // a new string + let patternStartPos = 0; + if (patternMaxWhitespaceIgnore === undefined) { + patternMaxWhitespaceIgnore = patternLen; + } + while (patternStartPos < patternMaxWhitespaceIgnore) { + if (_ws[pattern[patternStartPos]]) { + patternStartPos += 1; + } else { + break; + } + } + if (patternStartPos === patternLen) { + return [-100, []]; } if (patternLen > wordLen) { @@ -464,43 +461,49 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { const lowPattern = pattern.toLowerCase(); const lowWord = word.toLowerCase(); - let i = 0; - let j = 0; - while (i < patternLen && j < wordLen) { - if (lowPattern[i] === lowWord[j]) { - i += 1; + let patternPos = patternStartPos; + let wordPos = 0; + + // Run a simple check if the characters of pattern occur + // (in order) at all in word. If that isn't the case we + // stop because no match will be possible + while (patternPos < patternLen && wordPos < wordLen) { + if (lowPattern[patternPos] === lowWord[wordPos]) { + patternPos += 1; } - j += 1; + wordPos += 1; } - if (i !== patternLen) { - // no simple matches found -> return early + if (patternPos !== patternLen) { return undefined; } - for (i = 1; i <= patternLen; i++) { + // There will be a mach, fill in tables + for (patternPos = patternStartPos + 1; patternPos <= patternLen; patternPos++) { let lastLowWordChar = ''; - for (j = 1; j <= wordLen; j++) { + for (wordPos = 1; wordPos <= wordLen; wordPos++) { let score = -1; - let lowWordChar = lowWord[j - 1]; - if (lowPattern[i - 1] === lowWordChar) { - - if (j === 1) { - if (pattern[i - 1] === word[j - 1]) { + let lowWordChar = lowWord[wordPos - 1]; + if (lowPattern[patternPos - 1] === lowWordChar) { + if (wordPos === (patternPos - patternStartPos)) { + // common prefix: `foobar <-> foobaz` + if (pattern[patternPos - 1] === word[wordPos - 1]) { score = 7; } else { score = 5; } - } else if (lowWordChar !== word[j - 1]) { - if (pattern[i - 1] === word[j - 1]) { + } else if (lowWordChar !== word[wordPos - 1]) { + // hitting upper-case: `foo <-> forOthers` + if (pattern[patternPos - 1] === word[wordPos - 1]) { score = 7; } else { score = 5; } } else if (_seps[lastLowWordChar]) { + // post separator: `foo <-> bar_foo` score = 5; } else { @@ -508,35 +511,35 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { } } - _scores[i][j] = score; + _scores[patternPos][wordPos] = score; - let diag = _table[i - 1][j - 1] + (score > 1 ? 1 : score); - let top = _table[i - 1][j] + -1; - let left = _table[i][j - 1] + -1; + let diag = _table[patternPos - 1][wordPos - 1] + (score > 1 ? 1 : score); + let top = _table[patternPos - 1][wordPos] + -1; + let left = _table[patternPos][wordPos - 1] + -1; if (left >= top) { // left or diag if (left > diag) { - _table[i][j] = left; - _arrows[i][j] = Arrow.Left; + _table[patternPos][wordPos] = left; + _arrows[patternPos][wordPos] = Arrow.Left; } else if (left === diag) { - _table[i][j] = left; - _arrows[i][j] = Arrow.Left | Arrow.Diag; + _table[patternPos][wordPos] = left; + _arrows[patternPos][wordPos] = Arrow.Left | Arrow.Diag; } else { - _table[i][j] = diag; - _arrows[i][j] = Arrow.Diag; + _table[patternPos][wordPos] = diag; + _arrows[patternPos][wordPos] = Arrow.Diag; } } else { // top or diag if (top > diag) { - _table[i][j] = top; - _arrows[i][j] = Arrow.Top; + _table[patternPos][wordPos] = top; + _arrows[patternPos][wordPos] = Arrow.Top; } else if (top === diag) { - _table[i][j] = top; - _arrows[i][j] = Arrow.Top | Arrow.Diag; + _table[patternPos][wordPos] = top; + _arrows[patternPos][wordPos] = Arrow.Top | Arrow.Diag; } else { - _table[i][j] = diag; - _arrows[i][j] = Arrow.Diag; + _table[patternPos][wordPos] = diag; + _arrows[patternPos][wordPos] = Arrow.Diag; } } @@ -550,34 +553,36 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { console.log(printTable(_scores, pattern, patternLen, word, wordLen)); } - let bucket: [number, number[]][] = []; - findAllMatches(patternLen, patternLen, wordLen, 0, [], bucket, false); + // _bucket is an array of [PrefixArray] we use to keep + // track of scores and matches. After calling `_findAllMatches` + // the best match (if available) is the first item in the array + _bucket.length = 0; + _topScore = -100; + _patternStartPos = patternStartPos; + _findAllMatches(patternLen, wordLen, 0, new LazyArray(), false); - if (bucket.length === 0) { + if (_bucket.length === 0) { return undefined; } - let topMatch = bucket.shift(); - for (const match of bucket) { - if (!topMatch || topMatch[0] < match[0]) { - topMatch = match; - } - } - if (_debug) { - console.log(`${pattern} & ${word} => ${topMatch[0]} points for ${topMatch[1]}`); - } - return topMatch; + return [_topScore, _bucket[0].toArray()]; } -function findAllMatches(patternLen: number, patternPos: number, wordPos: number, total: number, matches: number[], bucket: [number, number[]][], lastMatched: boolean): void { +let _bucket: LazyArray[] = []; +let _topScore: number = 0; +let _patternStartPos: number = 0; + +function _findAllMatches(patternPos: number, wordPos: number, total: number, matches: LazyArray, lastMatched: boolean): void { - if (bucket.length >= 10) { + if (_bucket.length >= 10 || total < -25) { + // stop when having already 10 results, or + // when a potential alignment as already 5 gaps return; } let simpleMatchCount = 0; - while (patternPos > 0 && wordPos > 0) { + while (patternPos > _patternStartPos && wordPos > 0) { let score = _scores[patternPos][wordPos]; let arrow = _arrows[patternPos][wordPos]; @@ -587,7 +592,7 @@ function findAllMatches(patternLen: number, patternPos: number, wordPos: number, wordPos -= 1; if (lastMatched) { total -= 5; // new gap penalty - } else if (matches.length !== 0) { + } else if (!matches.isEmpty()) { total -= 1; // gap penalty after first match } lastMatched = false; @@ -597,11 +602,12 @@ function findAllMatches(patternLen: number, patternPos: number, wordPos: number, if (arrow & Arrow.Left) { // left - findAllMatches( - patternLen, patternPos, + _findAllMatches( + patternPos, wordPos - 1, - matches.length !== 0 ? total - 1 : total, - matches.slice(0), bucket, lastMatched + !matches.isEmpty() ? total - 1 : total, // gap penalty after first match + matches.slice(), + lastMatched ); } @@ -612,9 +618,20 @@ function findAllMatches(patternLen: number, patternPos: number, wordPos: number, matches.unshift(wordPos); lastMatched = true; + // count simple matches and boost a row of + // simple matches when they yield in a + // strong match. if (score === 1) { simpleMatchCount += 1; + + if (patternPos === _patternStartPos) { + // when the first match is a weak + // match we discard it + return undefined; + } + } else { + // boost total += 1 + (simpleMatchCount * (score - 1)); simpleMatchCount = 0; } @@ -624,21 +641,58 @@ function findAllMatches(patternLen: number, patternPos: number, wordPos: number, } } - if (matches.length !== patternLen) { - // doesn't cover whole pattern - return undefined; + total -= wordPos >= 3 ? 9 : wordPos * 3; // late start penalty + + // dynamically keep track of the current top score + // and insert the current best score at head, the rest at tail + if (total > _topScore) { + _topScore = total; + _bucket.unshift(matches); + } else { + _bucket.push(matches); } +} - if (_scores[1][matches[0] + 1] === 1) { - // first match is weak - return undefined; +class LazyArray { + + private _parent: LazyArray; + private _parentLen: number; + private _data: number[]; + + isEmpty(): boolean { + return !this._data && (!this._parent || this._parent.isEmpty()); } - total -= wordPos >= 3 ? 9 : wordPos * 3; // late start penalty + unshift(n: number) { + if (!this._data) { + this._data = [n]; + } else { + this._data.unshift(n); + } + } - bucket.push([total, matches]); -} + slice(): LazyArray { + const ret = new LazyArray(); + ret._parent = this; + ret._parentLen = this._data ? this._data.length : 0; + return ret; + } + toArray(): number[] { + if (!this._data) { + return this._parent.toArray(); + } + const bucket: number[][] = []; + let element = this; + while (element) { + if (element._parent && element._parent._data) { + bucket.push(element._parent._data.slice(element._parent._data.length - element._parentLen)); + } + element = element._parent; + } + return Array.prototype.concat.apply(this._data, bucket); + } +} export function nextTypoPermutation(pattern: string, patternPos: number) { diff --git a/src/vs/base/common/glob.ts b/src/vs/base/common/glob.ts index 7197d9ed8013c..452db98299684 100644 --- a/src/vs/base/common/glob.ts +++ b/src/vs/base/common/glob.ts @@ -7,7 +7,7 @@ import arrays = require('vs/base/common/arrays'); import strings = require('vs/base/common/strings'); import paths = require('vs/base/common/paths'); -import { BoundedLinkedMap } from 'vs/base/common/map'; +import { BoundedMap } from 'vs/base/common/map'; import { CharCode } from 'vs/base/common/charCode'; import { TPromise } from 'vs/base/common/winjs.base'; @@ -224,6 +224,9 @@ export type ParsedPattern = (path: string, basename?: string) => boolean; export type ParsedExpression = (path: string, basename?: string, siblingsFn?: () => string[] | TPromise) => string | TPromise /* the matching pattern */; export interface IGlobOptions { + /** + * Simplify patterns for use as exclusion filters during tree traversal to skip entire subtrees. Cannot be used outside of a tree traversal. + */ trimForExclusions?: boolean; } @@ -242,7 +245,7 @@ interface ParsedExpressionPattern { allPaths?: string[]; } -const CACHE = new BoundedLinkedMap(10000); // bounded to 10000 elements +const CACHE = new BoundedMap(10000); // bounded to 10000 elements const FALSE = function () { return false; @@ -436,7 +439,8 @@ export function parse(arg1: string | IExpression, options: IGlobOptions = {}): a export function parseToAsync(expression: IExpression, options?: IGlobOptions): ParsedExpression { const parsedExpression = parse(expression, options); return (path: string, basename?: string, siblingsFn?: () => TPromise): TPromise => { - return TPromise.as(parsedExpression(path, basename, siblingsFn)); + const result = parsedExpression(path, basename, siblingsFn); + return result instanceof TPromise ? result : TPromise.as(result); }; } diff --git a/src/vs/base/common/history.ts b/src/vs/base/common/history.ts index 22e921b8d7792..82099d63c3090 100644 --- a/src/vs/base/common/history.ts +++ b/src/vs/base/common/history.ts @@ -3,28 +3,27 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ArraySet } from 'vs/base/common/set'; import { INavigator, ArrayNavigator } from 'vs/base/common/iterator'; export class HistoryNavigator implements INavigator { - private _history: ArraySet; + private _history: Set; private _limit: number; private _navigator: ArrayNavigator; constructor(history: T[] = [], limit: number = 10) { - this._history = new ArraySet(history); + this._initialize(history); this._limit = limit; this._onChange(); } public add(t: T) { - this._history.set(t); + this._history.add(t); this._onChange(); } public addIfNotPresent(t: T) { - if (!this._history.contains(t)) { + if (!this._history.has(t)) { this.add(t); } } @@ -63,15 +62,27 @@ export class HistoryNavigator implements INavigator { private _onChange() { this._reduceToLimit(); - this._navigator = new ArrayNavigator(this._history.elements); + this._navigator = new ArrayNavigator(this._elements); this._navigator.last(); } private _reduceToLimit() { - let data = this._history.elements; + let data = this._elements; if (data.length > this._limit) { - this._history = new ArraySet(data.slice(data.length - this._limit)); + this._initialize(data.slice(data.length - this._limit)); } } + private _initialize(history: T[]): void { + this._history = new Set(); + for (const entry of history) { + this._history.add(entry); + } + } + + private get _elements(): T[] { + const elements: T[] = []; + this._history.forEach(e => elements.push(e)); + return elements; + } } \ No newline at end of file diff --git a/src/vs/base/common/htmlContent.ts b/src/vs/base/common/htmlContent.ts index 8dcc73fc332de..4744495a169a3 100644 --- a/src/vs/base/common/htmlContent.ts +++ b/src/vs/base/common/htmlContent.ts @@ -12,11 +12,6 @@ */ export type MarkedString = string | { readonly language: string; readonly value: string }; -export interface IHTMLContentElementCode { - language: string; - value: string; -} - export function markedStringsEquals(a: MarkedString | MarkedString[], b: MarkedString | MarkedString[]): boolean { if (!a && !b) { return true; @@ -29,9 +24,9 @@ export function markedStringsEquals(a: MarkedString | MarkedString[], b: MarkedS if (!Array.isArray(b)) { return false; } - return markedStringArrEquals(a, b); + return markedStringArrEquals(a, b); } - return markedStringEqual(a, b); + return markedStringEqual(a, b as MarkedString); } @@ -77,73 +72,3 @@ export function removeMarkdownEscapes(text: string): string { } return text.replace(/\\([\\`*_{}[\]()#+\-.!])/g, '$1'); } - -export interface IHTMLContentElement { - /** - * supports **bold**, __italics__, and [[actions]] - */ - formattedText?: string; - text?: string; - className?: string; - style?: string; - customStyle?: any; - tagName?: string; - children?: IHTMLContentElement[]; - isText?: boolean; - role?: string; - markdown?: string; - code?: IHTMLContentElementCode; -} - -function htmlContentElementCodeEqual(a: IHTMLContentElementCode, b: IHTMLContentElementCode): boolean { - if (!a && !b) { - return true; - } - if (!a || !b) { - return false; - } - return ( - a.language === b.language - && a.value === b.value - ); -} - -function htmlContentElementEqual(a: IHTMLContentElement, b: IHTMLContentElement): boolean { - return ( - a.formattedText === b.formattedText - && a.text === b.text - && a.className === b.className - && a.style === b.style - && a.customStyle === b.customStyle - && a.tagName === b.tagName - && a.isText === b.isText - && a.role === b.role - && a.markdown === b.markdown - && htmlContentElementCodeEqual(a.code, b.code) - && htmlContentElementArrEquals(a.children, b.children) - ); -} - -export function htmlContentElementArrEquals(a: IHTMLContentElement[], b: IHTMLContentElement[]): boolean { - if (!a && !b) { - return true; - } - if (!a || !b) { - return false; - } - - let aLen = a.length, - bLen = b.length; - - if (aLen !== bLen) { - return false; - } - - for (let i = 0; i < aLen; i++) { - if (!htmlContentElementEqual(a[i], b[i])) { - return false; - } - } - - return true; -} diff --git a/src/vs/base/common/http.ts b/src/vs/base/common/http.ts deleted file mode 100644 index 59feccf6e04bf..0000000000000 --- a/src/vs/base/common/http.ts +++ /dev/null @@ -1,54 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import * as nls from 'vs/nls'; - -export interface IXHROptions { - type?: string; - url?: string; - user?: string; - password?: string; - responseType?: string; - headers?: any; - timeout?: number; - followRedirects?: number; - data?: any; -} - -export interface IXHRResponse { - responseText: string; - status: number; - - readyState: number; - getResponseHeader: (header: string) => string; -} - -export function getErrorStatusDescription(status: number): string { - if (status < 400) { - return void 0; - } - switch (status) { - case 400: return nls.localize('status.400', 'Bad request. The request cannot be fulfilled due to bad syntax.'); - case 401: return nls.localize('status.401', 'Unauthorized. The server is refusing to respond.'); - case 403: return nls.localize('status.403', 'Forbidden. The server is refusing to respond.'); - case 404: return nls.localize('status.404', 'Not Found. The requested location could not be found.'); - case 405: return nls.localize('status.405', 'Method not allowed. A request was made using a request method not supported by that location.'); - case 406: return nls.localize('status.406', 'Not Acceptable. The server can only generate a response that is not accepted by the client.'); - case 407: return nls.localize('status.407', 'Proxy Authentication Required. The client must first authenticate itself with the proxy.'); - case 408: return nls.localize('status.408', 'Request Timeout. The server timed out waiting for the request.'); - case 409: return nls.localize('status.409', 'Conflict. The request could not be completed because of a conflict in the request.'); - case 410: return nls.localize('status.410', 'Gone. The requested page is no longer available.'); - case 411: return nls.localize('status.411', 'Length Required. The "Content-Length" is not defined.'); - case 412: return nls.localize('status.412', 'Precondition Failed. The precondition given in the request evaluated to false by the server.'); - case 413: return nls.localize('status.413', 'Request Entity Too Large. The server will not accept the request, because the request entity is too large.'); - case 414: return nls.localize('status.414', 'Request-URI Too Long. The server will not accept the request, because the URL is too long.'); - case 415: return nls.localize('status.415', 'Unsupported Media Type. The server will not accept the request, because the media type is not supported.'); - case 500: return nls.localize('status.500', 'Internal Server Error.'); - case 501: return nls.localize('status.501', 'Not Implemented. The server either does not recognize the request method, or it lacks the ability to fulfill the request.'); - case 503: return nls.localize('status.503', 'Service Unavailable. The server is currently unavailable (overloaded or down).'); - default: return nls.localize('status.416', 'HTTP status code {0}', status); - } -} diff --git a/src/vs/base/common/json.ts b/src/vs/base/common/json.ts index 03f8216334d93..c54e96c9e9dfa 100644 --- a/src/vs/base/common/json.ts +++ b/src/vs/base/common/json.ts @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { localize } from 'vs/nls'; - export enum ScanError { None, UnexpectedEndOfComment, @@ -232,7 +230,7 @@ export function createScanner(text: string, ignoreTrivia: boolean = false): JSON break; } else { scanError = ScanError.InvalidCharacter; - break; + // mark as error but continue with string } } pos++; @@ -637,22 +635,6 @@ export enum ParseErrorCode { EndOfFileExpected } -export function getParseErrorMessage(errorCode: ParseErrorCode): string { - switch (errorCode) { - case ParseErrorCode.InvalidSymbol: return localize('error.invalidSymbol', 'Invalid symbol'); - case ParseErrorCode.InvalidNumberFormat: return localize('error.invalidNumberFormat', 'Invalid number format'); - case ParseErrorCode.PropertyNameExpected: return localize('error.propertyNameExpected', 'Property name expected'); - case ParseErrorCode.ValueExpected: return localize('error.valueExpected', 'Value expected'); - case ParseErrorCode.ColonExpected: return localize('error.colonExpected', 'Colon expected'); - case ParseErrorCode.CommaExpected: return localize('error.commaExpected', 'Comma expected'); - case ParseErrorCode.CloseBraceExpected: return localize('error.closeBraceExpected', 'Closing brace expected'); - case ParseErrorCode.CloseBracketExpected: return localize('error.closeBracketExpected', 'Closing bracket expected'); - case ParseErrorCode.EndOfFileExpected: return localize('error.endOfFileExpected', 'End of file expected'); - default: - return ''; - } -} - export type NodeType = 'object' | 'array' | 'property' | 'string' | 'number' | 'boolean' | 'null'; function getLiteralNodeType(value: any): NodeType { diff --git a/src/vs/base/common/jsonErrorMessages.ts b/src/vs/base/common/jsonErrorMessages.ts new file mode 100644 index 0000000000000..96edf8e35a45b --- /dev/null +++ b/src/vs/base/common/jsonErrorMessages.ts @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +/** + * Extracted from json.ts to keep json nls free. + */ +import { localize } from 'vs/nls'; +import { ParseErrorCode } from './json'; + +export function getParseErrorMessage(errorCode: ParseErrorCode): string { + switch (errorCode) { + case ParseErrorCode.InvalidSymbol: return localize('error.invalidSymbol', 'Invalid symbol'); + case ParseErrorCode.InvalidNumberFormat: return localize('error.invalidNumberFormat', 'Invalid number format'); + case ParseErrorCode.PropertyNameExpected: return localize('error.propertyNameExpected', 'Property name expected'); + case ParseErrorCode.ValueExpected: return localize('error.valueExpected', 'Value expected'); + case ParseErrorCode.ColonExpected: return localize('error.colonExpected', 'Colon expected'); + case ParseErrorCode.CommaExpected: return localize('error.commaExpected', 'Comma expected'); + case ParseErrorCode.CloseBraceExpected: return localize('error.closeBraceExpected', 'Closing brace expected'); + case ParseErrorCode.CloseBracketExpected: return localize('error.closeBracketExpected', 'Closing bracket expected'); + case ParseErrorCode.EndOfFileExpected: return localize('error.endOfFileExpected', 'End of file expected'); + default: + return ''; + } +} \ No newline at end of file diff --git a/src/vs/base/common/keyCodes.ts b/src/vs/base/common/keyCodes.ts index 5ee3473699295..b3a1ee94fbea1 100644 --- a/src/vs/base/common/keyCodes.ts +++ b/src/vs/base/common/keyCodes.ts @@ -190,6 +190,9 @@ export const enum KeyCode { */ KEY_IN_COMPOSITION = 109, + ABNT_C1 = 110, // Brazilian (ABNT) Keyboard + ABNT_C2 = 111, // Brazilian (ABNT) Keyboard + /** * Placed last to cover the length of the enum. * Please do not depend on this value! @@ -197,218 +200,182 @@ export const enum KeyCode { MAX_VALUE } -export interface IReverseMap { - [str: string]: KeyCode; -} - -export class Mapping { +class KeyCodeStrMap { - _fromKeyCode: string[]; - _toKeyCode: IReverseMap; + private _keyCodeToStr: string[]; + private _strToKeyCode: { [str: string]: KeyCode; }; - constructor(fromKeyCode: string[], toKeyCode: IReverseMap) { - this._fromKeyCode = fromKeyCode; - this._toKeyCode = toKeyCode; + constructor() { + this._keyCodeToStr = []; + this._strToKeyCode = Object.create(null); } - fromKeyCode(keyCode: KeyCode): string { - return this._fromKeyCode[keyCode]; + define(keyCode: KeyCode, str: string): void { + this._keyCodeToStr[keyCode] = str; + this._strToKeyCode[str.toLowerCase()] = keyCode; } - toKeyCode(str: string): KeyCode { - if (this._toKeyCode.hasOwnProperty(str)) { - return this._toKeyCode[str]; - } - return KeyCode.Unknown; + keyCodeToStr(keyCode: KeyCode): string { + return this._keyCodeToStr[keyCode]; } + strToKeyCode(str: string): KeyCode { + return this._strToKeyCode[str.toLowerCase()] || KeyCode.Unknown; + } } -function createMapping(fill1: (map: string[]) => void, fill2: (reverseMap: IReverseMap) => void): Mapping { - let MAP: string[] = []; - fill1(MAP); +const uiMap = new KeyCodeStrMap(); +const userSettingsUSMap = new KeyCodeStrMap(); +const userSettingsGeneralMap = new KeyCodeStrMap(); - let REVERSE_MAP: IReverseMap = {}; - for (let i = 0, len = MAP.length; i < len; i++) { - if (!MAP[i]) { - continue; - } - REVERSE_MAP[MAP[i]] = i; - } - fill2(REVERSE_MAP); +(function () { - let FINAL_REVERSE_MAP: IReverseMap = {}; - for (let entry in REVERSE_MAP) { - if (REVERSE_MAP.hasOwnProperty(entry)) { - FINAL_REVERSE_MAP[entry] = REVERSE_MAP[entry]; - FINAL_REVERSE_MAP[entry.toLowerCase()] = REVERSE_MAP[entry]; - } + function define(keyCode: KeyCode, uiLabel: string, usUserSettingsLabel: string = uiLabel, generalUserSettingsLabel: string = usUserSettingsLabel): void { + uiMap.define(keyCode, uiLabel); + userSettingsUSMap.define(keyCode, usUserSettingsLabel); + userSettingsGeneralMap.define(keyCode, generalUserSettingsLabel); } - return new Mapping(MAP, FINAL_REVERSE_MAP); -} - -let STRING = createMapping((TO_STRING_MAP) => { - TO_STRING_MAP[KeyCode.Unknown] = 'unknown'; - - TO_STRING_MAP[KeyCode.Backspace] = 'Backspace'; - TO_STRING_MAP[KeyCode.Tab] = 'Tab'; - TO_STRING_MAP[KeyCode.Enter] = 'Enter'; - TO_STRING_MAP[KeyCode.Shift] = 'Shift'; - TO_STRING_MAP[KeyCode.Ctrl] = 'Ctrl'; - TO_STRING_MAP[KeyCode.Alt] = 'Alt'; - TO_STRING_MAP[KeyCode.PauseBreak] = 'PauseBreak'; - TO_STRING_MAP[KeyCode.CapsLock] = 'CapsLock'; - TO_STRING_MAP[KeyCode.Escape] = 'Escape'; - TO_STRING_MAP[KeyCode.Space] = 'Space'; - TO_STRING_MAP[KeyCode.PageUp] = 'PageUp'; - TO_STRING_MAP[KeyCode.PageDown] = 'PageDown'; - TO_STRING_MAP[KeyCode.End] = 'End'; - TO_STRING_MAP[KeyCode.Home] = 'Home'; - TO_STRING_MAP[KeyCode.LeftArrow] = 'LeftArrow'; - TO_STRING_MAP[KeyCode.UpArrow] = 'UpArrow'; - TO_STRING_MAP[KeyCode.RightArrow] = 'RightArrow'; - TO_STRING_MAP[KeyCode.DownArrow] = 'DownArrow'; - TO_STRING_MAP[KeyCode.Insert] = 'Insert'; - TO_STRING_MAP[KeyCode.Delete] = 'Delete'; - - TO_STRING_MAP[KeyCode.KEY_0] = '0'; - TO_STRING_MAP[KeyCode.KEY_1] = '1'; - TO_STRING_MAP[KeyCode.KEY_2] = '2'; - TO_STRING_MAP[KeyCode.KEY_3] = '3'; - TO_STRING_MAP[KeyCode.KEY_4] = '4'; - TO_STRING_MAP[KeyCode.KEY_5] = '5'; - TO_STRING_MAP[KeyCode.KEY_6] = '6'; - TO_STRING_MAP[KeyCode.KEY_7] = '7'; - TO_STRING_MAP[KeyCode.KEY_8] = '8'; - TO_STRING_MAP[KeyCode.KEY_9] = '9'; - - TO_STRING_MAP[KeyCode.KEY_A] = 'A'; - TO_STRING_MAP[KeyCode.KEY_B] = 'B'; - TO_STRING_MAP[KeyCode.KEY_C] = 'C'; - TO_STRING_MAP[KeyCode.KEY_D] = 'D'; - TO_STRING_MAP[KeyCode.KEY_E] = 'E'; - TO_STRING_MAP[KeyCode.KEY_F] = 'F'; - TO_STRING_MAP[KeyCode.KEY_G] = 'G'; - TO_STRING_MAP[KeyCode.KEY_H] = 'H'; - TO_STRING_MAP[KeyCode.KEY_I] = 'I'; - TO_STRING_MAP[KeyCode.KEY_J] = 'J'; - TO_STRING_MAP[KeyCode.KEY_K] = 'K'; - TO_STRING_MAP[KeyCode.KEY_L] = 'L'; - TO_STRING_MAP[KeyCode.KEY_M] = 'M'; - TO_STRING_MAP[KeyCode.KEY_N] = 'N'; - TO_STRING_MAP[KeyCode.KEY_O] = 'O'; - TO_STRING_MAP[KeyCode.KEY_P] = 'P'; - TO_STRING_MAP[KeyCode.KEY_Q] = 'Q'; - TO_STRING_MAP[KeyCode.KEY_R] = 'R'; - TO_STRING_MAP[KeyCode.KEY_S] = 'S'; - TO_STRING_MAP[KeyCode.KEY_T] = 'T'; - TO_STRING_MAP[KeyCode.KEY_U] = 'U'; - TO_STRING_MAP[KeyCode.KEY_V] = 'V'; - TO_STRING_MAP[KeyCode.KEY_W] = 'W'; - TO_STRING_MAP[KeyCode.KEY_X] = 'X'; - TO_STRING_MAP[KeyCode.KEY_Y] = 'Y'; - TO_STRING_MAP[KeyCode.KEY_Z] = 'Z'; - - TO_STRING_MAP[KeyCode.Meta] = 'Meta'; - TO_STRING_MAP[KeyCode.ContextMenu] = 'ContextMenu'; - - TO_STRING_MAP[KeyCode.F1] = 'F1'; - TO_STRING_MAP[KeyCode.F2] = 'F2'; - TO_STRING_MAP[KeyCode.F3] = 'F3'; - TO_STRING_MAP[KeyCode.F4] = 'F4'; - TO_STRING_MAP[KeyCode.F5] = 'F5'; - TO_STRING_MAP[KeyCode.F6] = 'F6'; - TO_STRING_MAP[KeyCode.F7] = 'F7'; - TO_STRING_MAP[KeyCode.F8] = 'F8'; - TO_STRING_MAP[KeyCode.F9] = 'F9'; - TO_STRING_MAP[KeyCode.F10] = 'F10'; - TO_STRING_MAP[KeyCode.F11] = 'F11'; - TO_STRING_MAP[KeyCode.F12] = 'F12'; - TO_STRING_MAP[KeyCode.F13] = 'F13'; - TO_STRING_MAP[KeyCode.F14] = 'F14'; - TO_STRING_MAP[KeyCode.F15] = 'F15'; - TO_STRING_MAP[KeyCode.F16] = 'F16'; - TO_STRING_MAP[KeyCode.F17] = 'F17'; - TO_STRING_MAP[KeyCode.F18] = 'F18'; - TO_STRING_MAP[KeyCode.F19] = 'F19'; - - - TO_STRING_MAP[KeyCode.NumLock] = 'NumLock'; - TO_STRING_MAP[KeyCode.ScrollLock] = 'ScrollLock'; - - TO_STRING_MAP[KeyCode.US_SEMICOLON] = ';'; - TO_STRING_MAP[KeyCode.US_EQUAL] = '='; - TO_STRING_MAP[KeyCode.US_COMMA] = ','; - TO_STRING_MAP[KeyCode.US_MINUS] = '-'; - TO_STRING_MAP[KeyCode.US_DOT] = '.'; - TO_STRING_MAP[KeyCode.US_SLASH] = '/'; - TO_STRING_MAP[KeyCode.US_BACKTICK] = '`'; - TO_STRING_MAP[KeyCode.US_OPEN_SQUARE_BRACKET] = '['; - TO_STRING_MAP[KeyCode.US_BACKSLASH] = '\\'; - TO_STRING_MAP[KeyCode.US_CLOSE_SQUARE_BRACKET] = ']'; - TO_STRING_MAP[KeyCode.US_QUOTE] = '\''; - TO_STRING_MAP[KeyCode.OEM_8] = 'OEM_8'; - TO_STRING_MAP[KeyCode.OEM_102] = 'OEM_102'; - - TO_STRING_MAP[KeyCode.NUMPAD_0] = 'NumPad0'; - TO_STRING_MAP[KeyCode.NUMPAD_1] = 'NumPad1'; - TO_STRING_MAP[KeyCode.NUMPAD_2] = 'NumPad2'; - TO_STRING_MAP[KeyCode.NUMPAD_3] = 'NumPad3'; - TO_STRING_MAP[KeyCode.NUMPAD_4] = 'NumPad4'; - TO_STRING_MAP[KeyCode.NUMPAD_5] = 'NumPad5'; - TO_STRING_MAP[KeyCode.NUMPAD_6] = 'NumPad6'; - TO_STRING_MAP[KeyCode.NUMPAD_7] = 'NumPad7'; - TO_STRING_MAP[KeyCode.NUMPAD_8] = 'NumPad8'; - TO_STRING_MAP[KeyCode.NUMPAD_9] = 'NumPad9'; - - TO_STRING_MAP[KeyCode.NUMPAD_MULTIPLY] = 'NumPad_Multiply'; - TO_STRING_MAP[KeyCode.NUMPAD_ADD] = 'NumPad_Add'; - TO_STRING_MAP[KeyCode.NUMPAD_SEPARATOR] = 'NumPad_Separator'; - TO_STRING_MAP[KeyCode.NUMPAD_SUBTRACT] = 'NumPad_Subtract'; - TO_STRING_MAP[KeyCode.NUMPAD_DECIMAL] = 'NumPad_Decimal'; - TO_STRING_MAP[KeyCode.NUMPAD_DIVIDE] = 'NumPad_Divide'; - - // for (let i = 0; i < KeyCode.MAX_VALUE; i++) { - // if (!TO_STRING_MAP[i]) { - // console.warn('Missing string representation for ' + KeyCode[i]); - // } - // } -}, (FROM_STRING_MAP) => { - FROM_STRING_MAP['\r'] = KeyCode.Enter; -}); - - -export let USER_SETTINGS = createMapping((TO_USER_SETTINGS_MAP) => { - for (let i = 0, len = STRING._fromKeyCode.length; i < len; i++) { - TO_USER_SETTINGS_MAP[i] = STRING._fromKeyCode[i]; - } - TO_USER_SETTINGS_MAP[KeyCode.LeftArrow] = 'Left'; - TO_USER_SETTINGS_MAP[KeyCode.UpArrow] = 'Up'; - TO_USER_SETTINGS_MAP[KeyCode.RightArrow] = 'Right'; - TO_USER_SETTINGS_MAP[KeyCode.DownArrow] = 'Down'; -}, (FROM_USER_SETTINGS_MAP) => { - FROM_USER_SETTINGS_MAP['OEM_1'] = KeyCode.US_SEMICOLON; - FROM_USER_SETTINGS_MAP['OEM_PLUS'] = KeyCode.US_EQUAL; - FROM_USER_SETTINGS_MAP['OEM_COMMA'] = KeyCode.US_COMMA; - FROM_USER_SETTINGS_MAP['OEM_MINUS'] = KeyCode.US_MINUS; - FROM_USER_SETTINGS_MAP['OEM_PERIOD'] = KeyCode.US_DOT; - FROM_USER_SETTINGS_MAP['OEM_2'] = KeyCode.US_SLASH; - FROM_USER_SETTINGS_MAP['OEM_3'] = KeyCode.US_BACKTICK; - FROM_USER_SETTINGS_MAP['OEM_4'] = KeyCode.US_OPEN_SQUARE_BRACKET; - FROM_USER_SETTINGS_MAP['OEM_5'] = KeyCode.US_BACKSLASH; - FROM_USER_SETTINGS_MAP['OEM_6'] = KeyCode.US_CLOSE_SQUARE_BRACKET; - FROM_USER_SETTINGS_MAP['OEM_7'] = KeyCode.US_QUOTE; - FROM_USER_SETTINGS_MAP['OEM_8'] = KeyCode.OEM_8; - FROM_USER_SETTINGS_MAP['OEM_102'] = KeyCode.OEM_102; -}); + define(KeyCode.Unknown, 'unknown'); + + define(KeyCode.Backspace, 'Backspace'); + define(KeyCode.Tab, 'Tab'); + define(KeyCode.Enter, 'Enter'); + define(KeyCode.Shift, 'Shift'); + define(KeyCode.Ctrl, 'Ctrl'); + define(KeyCode.Alt, 'Alt'); + define(KeyCode.PauseBreak, 'PauseBreak'); + define(KeyCode.CapsLock, 'CapsLock'); + define(KeyCode.Escape, 'Escape'); + define(KeyCode.Space, 'Space'); + define(KeyCode.PageUp, 'PageUp'); + define(KeyCode.PageDown, 'PageDown'); + define(KeyCode.End, 'End'); + define(KeyCode.Home, 'Home'); + + define(KeyCode.LeftArrow, 'LeftArrow', 'Left'); + define(KeyCode.UpArrow, 'UpArrow', 'Up'); + define(KeyCode.RightArrow, 'RightArrow', 'Right'); + define(KeyCode.DownArrow, 'DownArrow', 'Down'); + define(KeyCode.Insert, 'Insert'); + define(KeyCode.Delete, 'Delete'); + + define(KeyCode.KEY_0, '0'); + define(KeyCode.KEY_1, '1'); + define(KeyCode.KEY_2, '2'); + define(KeyCode.KEY_3, '3'); + define(KeyCode.KEY_4, '4'); + define(KeyCode.KEY_5, '5'); + define(KeyCode.KEY_6, '6'); + define(KeyCode.KEY_7, '7'); + define(KeyCode.KEY_8, '8'); + define(KeyCode.KEY_9, '9'); + + define(KeyCode.KEY_A, 'A'); + define(KeyCode.KEY_B, 'B'); + define(KeyCode.KEY_C, 'C'); + define(KeyCode.KEY_D, 'D'); + define(KeyCode.KEY_E, 'E'); + define(KeyCode.KEY_F, 'F'); + define(KeyCode.KEY_G, 'G'); + define(KeyCode.KEY_H, 'H'); + define(KeyCode.KEY_I, 'I'); + define(KeyCode.KEY_J, 'J'); + define(KeyCode.KEY_K, 'K'); + define(KeyCode.KEY_L, 'L'); + define(KeyCode.KEY_M, 'M'); + define(KeyCode.KEY_N, 'N'); + define(KeyCode.KEY_O, 'O'); + define(KeyCode.KEY_P, 'P'); + define(KeyCode.KEY_Q, 'Q'); + define(KeyCode.KEY_R, 'R'); + define(KeyCode.KEY_S, 'S'); + define(KeyCode.KEY_T, 'T'); + define(KeyCode.KEY_U, 'U'); + define(KeyCode.KEY_V, 'V'); + define(KeyCode.KEY_W, 'W'); + define(KeyCode.KEY_X, 'X'); + define(KeyCode.KEY_Y, 'Y'); + define(KeyCode.KEY_Z, 'Z'); + + define(KeyCode.Meta, 'Meta'); + define(KeyCode.ContextMenu, 'ContextMenu'); + + define(KeyCode.F1, 'F1'); + define(KeyCode.F2, 'F2'); + define(KeyCode.F3, 'F3'); + define(KeyCode.F4, 'F4'); + define(KeyCode.F5, 'F5'); + define(KeyCode.F6, 'F6'); + define(KeyCode.F7, 'F7'); + define(KeyCode.F8, 'F8'); + define(KeyCode.F9, 'F9'); + define(KeyCode.F10, 'F10'); + define(KeyCode.F11, 'F11'); + define(KeyCode.F12, 'F12'); + define(KeyCode.F13, 'F13'); + define(KeyCode.F14, 'F14'); + define(KeyCode.F15, 'F15'); + define(KeyCode.F16, 'F16'); + define(KeyCode.F17, 'F17'); + define(KeyCode.F18, 'F18'); + define(KeyCode.F19, 'F19'); + + define(KeyCode.NumLock, 'NumLock'); + define(KeyCode.ScrollLock, 'ScrollLock'); + + define(KeyCode.US_SEMICOLON, ';', ';', 'OEM_1'); + define(KeyCode.US_EQUAL, '=', '=', 'OEM_PLUS'); + define(KeyCode.US_COMMA, ',', ',', 'OEM_COMMA'); + define(KeyCode.US_MINUS, '-', '-', 'OEM_MINUS'); + define(KeyCode.US_DOT, '.', '.', 'OEM_PERIOD'); + define(KeyCode.US_SLASH, '/', '/', 'OEM_2'); + define(KeyCode.US_BACKTICK, '`', '`', 'OEM_3'); + define(KeyCode.ABNT_C1, 'ABNT_C1'); + define(KeyCode.ABNT_C2, 'ABNT_C2'); + define(KeyCode.US_OPEN_SQUARE_BRACKET, '[', '[', 'OEM_4'); + define(KeyCode.US_BACKSLASH, '\\', '\\', 'OEM_5'); + define(KeyCode.US_CLOSE_SQUARE_BRACKET, ']', ']', 'OEM_6'); + define(KeyCode.US_QUOTE, '\'', '\'', 'OEM_7'); + define(KeyCode.OEM_8, 'OEM_8'); + define(KeyCode.OEM_102, 'OEM_102'); + + define(KeyCode.NUMPAD_0, 'NumPad0'); + define(KeyCode.NUMPAD_1, 'NumPad1'); + define(KeyCode.NUMPAD_2, 'NumPad2'); + define(KeyCode.NUMPAD_3, 'NumPad3'); + define(KeyCode.NUMPAD_4, 'NumPad4'); + define(KeyCode.NUMPAD_5, 'NumPad5'); + define(KeyCode.NUMPAD_6, 'NumPad6'); + define(KeyCode.NUMPAD_7, 'NumPad7'); + define(KeyCode.NUMPAD_8, 'NumPad8'); + define(KeyCode.NUMPAD_9, 'NumPad9'); + + define(KeyCode.NUMPAD_MULTIPLY, 'NumPad_Multiply'); + define(KeyCode.NUMPAD_ADD, 'NumPad_Add'); + define(KeyCode.NUMPAD_SEPARATOR, 'NumPad_Separator'); + define(KeyCode.NUMPAD_SUBTRACT, 'NumPad_Subtract'); + define(KeyCode.NUMPAD_DECIMAL, 'NumPad_Decimal'); + define(KeyCode.NUMPAD_DIVIDE, 'NumPad_Divide'); + +})(); export namespace KeyCodeUtils { - export function toString(key: KeyCode): string { - return STRING.fromKeyCode(key); + export function toString(keyCode: KeyCode): string { + return uiMap.keyCodeToStr(keyCode); } export function fromString(key: string): KeyCode { - return STRING.toKeyCode(key); + return uiMap.strToKeyCode(key); + } + + export function toUserSettingsUS(keyCode: KeyCode): string { + return userSettingsUSMap.keyCodeToStr(keyCode); + } + export function toUserSettingsGeneral(keyCode: KeyCode): string { + return userSettingsGeneralMap.keyCodeToStr(keyCode); + } + export function fromUserSettings(key: string): KeyCode { + return userSettingsUSMap.strToKeyCode(key) || userSettingsGeneralMap.strToKeyCode(key); } } @@ -546,26 +513,37 @@ export class ChordKeybinding { export type Keybinding = SimpleKeybinding | ChordKeybinding; +export class ResolvedKeybindingPart { + readonly ctrlKey: boolean; + readonly shiftKey: boolean; + readonly altKey: boolean; + readonly metaKey: boolean; + + readonly keyLabel: string; + readonly keyAriaLabel: string; + + constructor(ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean, kbLabel: string, kbAriaLabel: string) { + this.ctrlKey = ctrlKey; + this.shiftKey = shiftKey; + this.altKey = altKey; + this.metaKey = metaKey; + this.keyLabel = kbLabel; + this.keyAriaLabel = kbAriaLabel; + } +} + /** - * A resolved keybinding. + * A resolved keybinding. Can be a simple keybinding or a chord keybinding. */ export abstract class ResolvedKeybinding { /** * This prints the binding in a format suitable for displaying in the UI. */ public abstract getLabel(): string; - /** - * Returns the UI label of the binding without modifiers - */ - public abstract getLabelWithoutModifiers(): string; /** * This prints the binding in a format suitable for ARIA. */ public abstract getAriaLabel(): string; - /** - * Returns the ARIA label of the bindings without modifiers - */ - public abstract getAriaLabelWithoutModifiers(): string; /** * This prints the binding in a format suitable for electron's accelerators. * See https://github.com/electron/electron/blob/master/docs/api/accelerator.md @@ -584,33 +562,14 @@ export abstract class ResolvedKeybinding { * Is the binding a chord? */ public abstract isChord(): boolean; - /** - * Does this binding use the ctrl modifier key. - * If it is a chord, it always returns false. - */ - public abstract hasCtrlModifier(): boolean; - /** - * Does this binding use the shift modifier key. - * If it is a chord, it always returns false. - */ - public abstract hasShiftModifier(): boolean; - /** - * Does this binding use the alt modifier key. - * If it is a chord, it always returns false. - */ - public abstract hasAltModifier(): boolean; - /** - * Does this binding use the meta modifier key. - * If it is a chord, it always returns false. - */ - public abstract hasMetaModifier(): boolean; /** * Returns the firstPart, chordPart that should be used for dispatching. */ public abstract getDispatchParts(): [string, string]; /** - * Returns the firstPart, chordPart of the keybinding + * Returns the firstPart, chordPart of the keybinding. + * For simple keybindings, the second element will be null. */ - public abstract getParts(): [ResolvedKeybinding, ResolvedKeybinding]; + public abstract getParts(): [ResolvedKeybindingPart, ResolvedKeybindingPart]; } diff --git a/src/vs/platform/keybinding/common/keybindingLabels.ts b/src/vs/base/common/keybindingLabels.ts similarity index 97% rename from src/vs/platform/keybinding/common/keybindingLabels.ts rename to src/vs/base/common/keybindingLabels.ts index ef961ee79c5fe..c9a7cec8e18d8 100644 --- a/src/vs/platform/keybinding/common/keybindingLabels.ts +++ b/src/vs/base/common/keybindingLabels.ts @@ -23,13 +23,6 @@ export interface Modifiers { readonly metaKey: boolean; } -export const NO_MODIFIERS: Modifiers = { - ctrlKey: false, - shiftKey: false, - altKey: false, - metaKey: false -}; - export class ModifierLabelProvider { public readonly modifierLabels: ModifierLabels[]; diff --git a/src/vs/base/common/labels.ts b/src/vs/base/common/labels.ts index f2aeccb210943..172700a0811e1 100644 --- a/src/vs/base/common/labels.ts +++ b/src/vs/base/common/labels.ts @@ -6,10 +6,8 @@ import URI from 'vs/base/common/uri'; import platform = require('vs/base/common/platform'); -import types = require('vs/base/common/types'); -import { nativeSep, normalize } from 'vs/base/common/paths'; +import { nativeSep, normalize, isEqualOrParent, isEqual, basename, join } from 'vs/base/common/paths'; import { endsWith, ltrim } from 'vs/base/common/strings'; -import { isEqualOrParent, isEqual } from 'vs/platform/files/common/files'; export interface ILabelProvider { @@ -19,9 +17,10 @@ export interface ILabelProvider { getLabel(element: any): string; } -export interface IWorkspaceProvider { - getWorkspace(): { - resource: URI; +export interface IRootProvider { + getRoot(resource: URI): URI; + getWorkspace2(): { + roots: URI[]; }; } @@ -29,39 +28,42 @@ export interface IUserHomeProvider { userHome: string; } -export class PathLabelProvider implements ILabelProvider { - private root: string; - - constructor(arg1?: URI | string | IWorkspaceProvider) { - this.root = arg1 && getPath(arg1); +export function getPathLabel(resource: URI | string, rootProvider?: IRootProvider, userHomeProvider?: IUserHomeProvider): string { + if (!resource) { + return null; } - public getLabel(arg1: URI | string | IWorkspaceProvider): string { - return getPathLabel(getPath(arg1), this.root); + if (typeof resource === 'string') { + resource = URI.file(resource); } -} -export function getPathLabel(resource: URI | string, basePathProvider?: URI | string | IWorkspaceProvider, userHomeProvider?: IUserHomeProvider): string { - const absolutePath = getPath(resource); - if (!absolutePath) { - return null; - } + // return early if we can resolve a relative path label from the root + const baseResource = rootProvider ? rootProvider.getRoot(resource) : null; + if (baseResource) { + const hasMultipleRoots = rootProvider.getWorkspace2().roots.length > 1; - const basepath = basePathProvider && getPath(basePathProvider); + let pathLabel: string; + if (isEqual(baseResource.fsPath, resource.fsPath, !platform.isLinux /* ignorecase */)) { + pathLabel = ''; // no label if pathes are identical + } else { + pathLabel = normalize(ltrim(resource.fsPath.substr(baseResource.fsPath.length), nativeSep), true); + } - if (basepath && isEqualOrParent(absolutePath, basepath, !platform.isLinux /* ignorecase */)) { - if (isEqual(basepath, absolutePath, !platform.isLinux /* ignorecase */)) { - return ''; // no label if pathes are identical + if (hasMultipleRoots) { + const rootName = basename(baseResource.fsPath); + pathLabel = pathLabel ? join(rootName, pathLabel) : rootName; // always show root basename if there are multiple } - return normalize(ltrim(absolutePath.substr(basepath.length), nativeSep), true); + return pathLabel; } - if (platform.isWindows && absolutePath && absolutePath[1] === ':') { - return normalize(absolutePath.charAt(0).toUpperCase() + absolutePath.slice(1), true); // convert c:\something => C:\something + // convert c:\something => C:\something + if (platform.isWindows && resource.fsPath && resource.fsPath[1] === ':') { + return normalize(resource.fsPath.charAt(0).toUpperCase() + resource.fsPath.slice(1), true); } - let res = normalize(absolutePath, true); + // normalize and tildify (macOS, Linux only) + let res = normalize(resource.fsPath, true); if (!platform.isWindows && userHomeProvider) { res = tildify(res, userHomeProvider.userHome); } @@ -69,23 +71,6 @@ export function getPathLabel(resource: URI | string, basePathProvider?: URI | st return res; } -function getPath(arg1: URI | string | IWorkspaceProvider): string { - if (!arg1) { - return null; - } - - if (typeof arg1 === 'string') { - return arg1; - } - - if (types.isFunction((arg1).getWorkspace)) { - const ws = (arg1).getWorkspace(); - return ws ? ws.resource.fsPath : void 0; - } - - return (arg1).fsPath; -} - export function tildify(path: string, userHome: string): string { if (path && (platform.isMacintosh || platform.isLinux) && isEqualOrParent(path, userHome, !platform.isLinux /* ignorecase */)) { path = `~${path.substr(userHome.length)}`; @@ -134,7 +119,7 @@ export function shorten(paths: string[]): string[] { let path = paths[pathIndex]; if (path === '') { - shortenedPaths[pathIndex] = '.'; + shortenedPaths[pathIndex] = `.${nativeSep}`; continue; } diff --git a/src/vs/base/common/lifecycle.ts b/src/vs/base/common/lifecycle.ts index 1a17d2a524f56..2600d72e9ef36 100644 --- a/src/vs/base/common/lifecycle.ts +++ b/src/vs/base/common/lifecycle.ts @@ -41,7 +41,13 @@ export function combinedDisposable(disposables: IDisposable[]): IDisposable { } export function toDisposable(...fns: (() => void)[]): IDisposable { - return combinedDisposable(fns.map(fn => ({ dispose: fn }))); + return { + dispose() { + for (const fn of fns) { + fn(); + } + } + }; } export abstract class Disposable implements IDisposable { @@ -62,22 +68,6 @@ export abstract class Disposable implements IDisposable { } } -export class Disposables extends Disposable { - - public add(e: T): T; - public add(...elements: IDisposable[]): void; - public add(arg: T | T[]): T { - if (!Array.isArray(arg)) { - return this._register(arg); - } else { - for (let element of arg) { - return this._register(element); - } - return undefined; - } - } -} - export class OneDisposable implements IDisposable { private _value: IDisposable; diff --git a/src/vs/base/common/map.ts b/src/vs/base/common/map.ts index 09c03b971b099..45b81888e0aa8 100644 --- a/src/vs/base/common/map.ts +++ b/src/vs/base/common/map.ts @@ -12,147 +12,100 @@ export interface Key { } export interface Entry { - next?: Entry; - prev?: Entry; key: K; value: T; } -/** - * A simple map to store value by a key object. Key can be any object that has toString() function to get - * string value of the key. - */ -export class LinkedMap { - - protected map: { [key: string]: Entry }; - protected _size: number; - - constructor() { - this.map = Object.create(null); - this._size = 0; - } +export function values(map: Map): V[] { + const result: V[] = []; + map.forEach(value => result.push(value)); - public get size(): number { - return this._size; - } - - public get(k: K): T { - const value = this.peek(k); - - return value ? value : null; - } + return result; +} - public getOrSet(k: K, t: T): T { - const res = this.get(k); - if (res) { - return res; - } +export function keys(map: Map): K[] { + const result: K[] = []; + map.forEach((value, key) => result.push(key)); - this.set(k, t); + return result; +} - return t; +export function getOrSet(map: Map, key: K, value: V): V { + let result = map.get(key); + if (result === void 0) { + result = value; + map.set(key, result); } - public keys(): K[] { - const keys: K[] = []; - for (let key in this.map) { - keys.push(this.map[key].key); - } - return keys; - } + return result; +} - public values(): T[] { - const values: T[] = []; - for (let key in this.map) { - values.push(this.map[key].value); - } - return values; - } +export interface ISerializedBoundedLinkedMap { + entries: { key: string; value: T }[]; +} - public entries(): Entry[] { - const entries: Entry[] = []; - for (let key in this.map) { - entries.push(this.map[key]); - } - return entries; - } +interface LinkedEntry extends Entry { + next?: LinkedEntry; + prev?: LinkedEntry; +} - public set(k: K, t: T): boolean { - if (this.get(k)) { - return false; // already present! - } +/** + * A simple Map that optionally allows to set a limit of entries to store. Once the limit is hit, + * the cache will remove the entry that was last recently added. Or, if a ratio is provided below 1, + * all elements will be removed until the ratio is full filled (e.g. 0.75 to remove 25% of old elements). + */ +export class BoundedMap { + private map: Map>; - this.push(k, t); + private head: LinkedEntry; + private tail: LinkedEntry; + private ratio: number; - return true; - } + constructor(private limit = Number.MAX_VALUE, ratio = 1, value?: ISerializedBoundedLinkedMap) { + this.map = new Map>(); + this.ratio = limit * ratio; - public delete(k: K): T { - let value: T = this.get(k); if (value) { - this.pop(k); - return value; + value.entries.forEach(entry => { + this.set(entry.key, entry.value); + }); } - return null; - } - - public has(k: K): boolean { - return !!this.get(k); - } - - public clear(): void { - this.map = Object.create(null); - this._size = 0; } - protected push(key: K, value: T): void { - const entry: Entry = { key, value }; - this.map[key.toString()] = entry; - this._size++; - } + public setLimit(limit: number): void { + if (limit < 0) { + return; // invalid limit + } - protected pop(k: K): void { - delete this.map[k.toString()]; - this._size--; + this.limit = limit; + while (this.map.size > this.limit) { + this.trim(); + } } - protected peek(k: K): T { - const entry = this.map[k.toString()]; - return entry ? entry.value : null; - } -} + public serialize(): ISerializedBoundedLinkedMap { + const serialized: ISerializedBoundedLinkedMap = { entries: [] }; -/** - * A simple Map that optionally allows to set a limit of entries to store. Once the limit is hit, - * the cache will remove the entry that was last recently added. Or, if a ratio is provided below 1, - * all elements will be removed until the ratio is full filled (e.g. 0.75 to remove 25% of old elements). - */ -export class BoundedLinkedMap { - protected map: { [key: string]: Entry }; - private head: Entry; - private tail: Entry; - private _size: number; - private ratio: number; + this.map.forEach(entry => { + serialized.entries.push({ key: entry.key, value: entry.value }); + }); - constructor(private limit = Number.MAX_VALUE, ratio = 1) { - this.map = Object.create(null); - this._size = 0; - this.ratio = limit * ratio; + return serialized; } public get size(): number { - return this._size; + return this.map.size; } public set(key: string, value: T): boolean { - if (this.map[key]) { + if (this.map.has(key)) { return false; // already present! } - const entry: Entry = { key, value }; + const entry: LinkedEntry = { key, value }; this.push(entry); - if (this._size > this.limit) { + if (this.size > this.limit) { this.trim(); } @@ -160,7 +113,7 @@ export class BoundedLinkedMap { } public get(key: string): T { - const entry = this.map[key]; + const entry = this.map.get(key); return entry ? entry.value : null; } @@ -177,11 +130,10 @@ export class BoundedLinkedMap { } public delete(key: string): T { - const entry = this.map[key]; + const entry = this.map.get(key); if (entry) { - this.map[key] = void 0; - this._size--; + this.map.delete(key); if (entry.next) { entry.next.prev = entry.prev; // [A]<-[x]<-[C] = [A]<-[C] @@ -202,17 +154,16 @@ export class BoundedLinkedMap { } public has(key: string): boolean { - return !!this.map[key]; + return this.map.has(key); } public clear(): void { - this.map = Object.create(null); - this._size = 0; + this.map.clear(); this.head = null; this.tail = null; } - protected push(entry: Entry): void { + private push(entry: LinkedEntry): void { if (this.head) { // [A]-[B] = [A]-[B]->[X] entry.prev = this.head; @@ -225,8 +176,7 @@ export class BoundedLinkedMap { this.head = entry; - this.map[entry.key] = entry; - this._size++; + this.map.set(entry.key, entry); } private trim(): void { @@ -239,8 +189,7 @@ export class BoundedLinkedMap { while (current.next) { // Remove the entry - this.map[current.key] = void 0; - this._size--; + this.map.delete(current.key); // if we reached the element that overflows our ratio condition // make its next element the new tail of the Map and adjust the size @@ -259,46 +208,18 @@ export class BoundedLinkedMap { // Just remove the tail element else { - this.map[this.tail.key] = void 0; - this._size--; + this.map.delete(this.tail.key); // [x]-[B] = [B] this.tail = this.tail.next; - this.tail.prev = null; + if (this.tail) { + this.tail.prev = null; + } } } } } -/** - * A subclass of Map that makes an entry the MRU entry as soon - * as it is being accessed. In combination with the limit for the - * maximum number of elements in the cache, it helps to remove those - * entries from the cache that are LRU. - */ -export class LRUCache extends BoundedLinkedMap { - - constructor(limit: number) { - super(limit); - } - - public get(key: string): T { - - // Upon access of an entry, make it the head of - // the linked map so that it is the MRU element - const entry = this.map[key]; - if (entry) { - this.delete(key); - this.push(entry); - - return entry.value; - } - - - return null; - } -} - // --- trie'ish datastructure class Node { @@ -407,7 +328,8 @@ export class TrieMap { } export class ResourceMap { - private map: Map; + + protected map: Map; constructor(private ignoreCase?: boolean) { this.map = new Map(); @@ -442,10 +364,7 @@ export class ResourceMap { } public values(): T[] { - const values: T[] = []; - this.map.forEach(value => values.push(value)); - - return values; + return values(this.map); } private toKey(resource: URI): string { @@ -456,4 +375,324 @@ export class ResourceMap { return key; } +} + +export class StrictResourceMap extends ResourceMap { + + constructor() { + super(); + } + + public keys(): URI[] { + return keys(this.map).map(key => URI.parse(key)); + } + +} + +// We should fold BoundedMap and LinkedMap. See https://github.com/Microsoft/vscode/issues/28496 + +interface Item { + previous: Item | undefined; + next: Item | undefined; + key: K; + value: V; +} + +export namespace Touch { + export const None: 0 = 0; + export const First: 1 = 1; + export const Last: 2 = 2; +} + +export type Touch = 0 | 1 | 2; + +export class LinkedMap { + + private _map: Map>; + private _head: Item | undefined; + private _tail: Item | undefined; + private _size: number; + + constructor() { + this._map = new Map>(); + this._head = undefined; + this._tail = undefined; + this._size = 0; + } + + public clear(): void { + this._map.clear(); + this._head = undefined; + this._tail = undefined; + this._size = 0; + } + + public isEmpty(): boolean { + return !this._head && !this._tail; + } + + public get size(): number { + return this._size; + } + + public has(key: K): boolean { + return this._map.has(key); + } + + public get(key: K): V | undefined { + const item = this._map.get(key); + if (!item) { + return undefined; + } + return item.value; + } + + public set(key: K, value: V, touch: Touch = Touch.None): void { + let item = this._map.get(key); + if (item) { + item.value = value; + if (touch !== Touch.None) { + this.touch(item, touch); + } + } else { + item = { key, value, next: undefined, previous: undefined }; + switch (touch) { + case Touch.None: + this.addItemLast(item); + break; + case Touch.First: + this.addItemFirst(item); + break; + case Touch.Last: + this.addItemLast(item); + break; + default: + this.addItemLast(item); + break; + } + this._map.set(key, item); + this._size++; + } + } + + public delete(key: K): boolean { + return !!this.remove(key); + } + + public remove(key: K): V | undefined { + const item = this._map.get(key); + if (!item) { + return undefined; + } + this._map.delete(key); + this.removeItem(item); + this._size--; + return item.value; + } + + public shift(): V | undefined { + if (!this._head && !this._tail) { + return undefined; + } + if (!this._head || !this._tail) { + throw new Error('Invalid list'); + } + const item = this._head; + this._map.delete(item.key); + this.removeItem(item); + this._size--; + return item.value; + } + + public forEach(callbackfn: (value: V, key: K, map: LinkedMap) => void, thisArg?: any): void { + let current = this._head; + while (current) { + if (thisArg) { + callbackfn.bind(thisArg)(current.value, current.key, this); + } else { + callbackfn(current.value, current.key, this); + } + current = current.next; + } + } + + public forEachReverse(callbackfn: (value: V, key: K, map: LinkedMap) => void, thisArg?: any): void { + let current = this._tail; + while (current) { + if (thisArg) { + callbackfn.bind(thisArg)(current.value, current.key, this); + } else { + callbackfn(current.value, current.key, this); + } + current = current.previous; + } + } + + public values(): V[] { + let result: V[] = []; + let current = this._head; + while (current) { + result.push(current.value); + current = current.next; + } + return result; + } + + public keys(): K[] { + let result: K[] = []; + let current = this._head; + while (current) { + result.push(current.key); + current = current.next; + } + return result; + } + + /* VS Code / Monaco editor runs on es5 which has no Symbol.iterator + public keys(): IterableIterator { + let current = this._head; + let iterator: IterableIterator = { + [Symbol.iterator]() { + return iterator; + }, + next():IteratorResult { + if (current) { + let result = { value: current.key, done: false }; + current = current.next; + return result; + } else { + return { value: undefined, done: true }; + } + } + }; + return iterator; + } + + public values(): IterableIterator { + let current = this._head; + let iterator: IterableIterator = { + [Symbol.iterator]() { + return iterator; + }, + next():IteratorResult { + if (current) { + let result = { value: current.value, done: false }; + current = current.next; + return result; + } else { + return { value: undefined, done: true }; + } + } + }; + return iterator; + } + */ + + private addItemFirst(item: Item): void { + // First time Insert + if (!this._head && !this._tail) { + this._tail = item; + } else if (!this._head) { + throw new Error('Invalid list'); + } else { + item.next = this._head; + this._head.previous = item; + } + this._head = item; + } + + private addItemLast(item: Item): void { + // First time Insert + if (!this._head && !this._tail) { + this._head = item; + } else if (!this._tail) { + throw new Error('Invalid list'); + } else { + item.previous = this._tail; + this._tail.next = item; + } + this._tail = item; + } + + private removeItem(item: Item): void { + if (item === this._head && item === this._tail) { + this._head = undefined; + this._tail = undefined; + } + else if (item === this._head) { + this._head = item.next; + } + else if (item === this._tail) { + this._tail = item.previous; + } + else { + const next = item.next; + const previous = item.previous; + if (!next || !previous) { + throw new Error('Invalid list'); + } + next.previous = previous; + previous.next = next; + } + } + + private touch(item: Item, touch: Touch): void { + if (!this._head || !this._tail) { + throw new Error('Invalid list'); + } + if ((touch !== Touch.First && touch !== Touch.Last)) { + return; + } + + if (touch === Touch.First) { + if (item === this._head) { + return; + } + + const next = item.next; + const previous = item.previous; + + // Unlink the item + if (item === this._tail) { + // previous must be defined since item was not head but is tail + // So there are more than on item in the map + previous!.next = undefined; + this._tail = previous; + } + else { + // Both next and previous are not undefined since item was neither head nor tail. + next!.previous = previous; + previous!.next = next; + } + + // Insert the node at head + item.previous = undefined; + item.next = this._head; + this._head.previous = item; + this._head = item; + } else if (touch === Touch.Last) { + if (item === this._tail) { + return; + } + + const next = item.next; + const previous = item.previous; + + // Unlink the item. + if (item === this._head) { + // next must be defined since item was not tail but is head + // So there are more than on item in the map + next!.previous = undefined; + this._head = next; + } else { + // Both next and previous are not undefined since item was neither head nor tail. + next!.previous = previous; + previous!.next = next; + } + item.next = undefined; + item.previous = this._tail; + this._tail.next = item; + this._tail = item; + } + } } \ No newline at end of file diff --git a/src/vs/base/common/marked/OSSREADME.json b/src/vs/base/common/marked/OSSREADME.json index 5fc985980a476..5bfc34a583baa 100644 --- a/src/vs/base/common/marked/OSSREADME.json +++ b/src/vs/base/common/marked/OSSREADME.json @@ -3,6 +3,6 @@ [{ "name": "chjj-marked", "repositoryURL": "https://github.com/npmcomponent/chjj-marked", - "version": "0.3.2", + "version": "0.3.6", "license": "MIT" }] diff --git a/src/vs/base/common/marked/raw.marked.js b/src/vs/base/common/marked/raw.marked.js index ce02369727acb..0ee6a3b1e6a60 100644 --- a/src/vs/base/common/marked/raw.marked.js +++ b/src/vs/base/common/marked/raw.marked.js @@ -1,4 +1,3 @@ - /** * marked - a markdown parser * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed) @@ -78,8 +77,9 @@ block.normal = merge({}, block); */ block.gfm = merge({}, block.normal, { - fences: /^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/, - paragraph: /^/ + fences: /^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/, + paragraph: /^/, + heading: /^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/ }); block.gfm.paragraph = replace(block.paragraph) @@ -191,7 +191,7 @@ Lexer.prototype.token = function(src, top, bq) { this.tokens.push({ type: 'code', lang: cap[2], - text: cap[3] + text: cap[3] || '' }); continue; } @@ -362,7 +362,8 @@ Lexer.prototype.token = function(src, top, bq) { type: this.options.sanitize ? 'paragraph' : 'html', - pre: cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style', + pre: !this.options.sanitizer + && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'), text: cap[0] }); continue; @@ -457,7 +458,7 @@ var inline = { reflink: /^!?\[(inside)\]\s*\[([^\]]*)\]/, nolink: /^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/, strong: /^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/, - em: /^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/, + em: /^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/, code: /^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/, br: /^ {2,}\n(?!\s*$)/, del: noop, @@ -609,8 +610,10 @@ InlineLexer.prototype.output = function(src) { } src = src.substring(cap[0].length); out += this.options.sanitize - ? escape(cap[0]) - : cap[0]; + ? this.options.sanitizer + ? this.options.sanitizer(cap[0]) + : escape(cap[0]) + : cap[0] continue; } @@ -681,7 +684,7 @@ InlineLexer.prototype.output = function(src) { // text if (cap = this.rules.text.exec(src)) { src = src.substring(cap[0].length); - out += escape(this.smartypants(cap[0])); + out += this.renderer.text(escape(this.smartypants(cap[0]))); continue; } @@ -710,24 +713,24 @@ InlineLexer.prototype.outputLink = function(cap, link) { /** * Smartypants Transformations */ -// TODO MonacoChange: Our build fails over the following lines if they are not commented out + InlineLexer.prototype.smartypants = function(text) { - return text; -// if (!this.options.smartypants) return text; -// return text -// // em-dashes -// .replace(/--/g, '\u2014') -// // opening singles -// .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018') -// // closing singles & apostrophes -// .replace(/'/g, '\u2019') -// // opening doubles -// .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c') -// // closing doubles -// .replace(/"/g, '\u201d') -// // ellipses -// .replace(/\.{3}/g, '\u2026'); -// END MonacoChange + if (!this.options.smartypants) return text; + return text + // em-dashes + .replace(/---/g, '\u2014') + // en-dashes + .replace(/--/g, '\u2013') + // opening singles + .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018') + // closing singles & apostrophes + .replace(/'/g, '\u2019') + // opening doubles + .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c') + // closing doubles + .replace(/"/g, '\u201d') + // ellipses + .replace(/\.{3}/g, '\u2026'); }; /** @@ -735,6 +738,7 @@ InlineLexer.prototype.smartypants = function(text) { */ InlineLexer.prototype.mangle = function(text) { + if (!this.options.mangle) return text; var out = '' , l = text.length , i = 0 @@ -873,7 +877,7 @@ Renderer.prototype.link = function(href, title, text) { } catch (e) { return ''; } - if (prot.indexOf('javascript:') === 0) { + if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) { return ''; } } @@ -894,6 +898,10 @@ Renderer.prototype.image = function(href, title, text) { return out; }; +Renderer.prototype.text = function(text) { + return text; +}; + /** * Parsing & Compiling */ @@ -1088,7 +1096,8 @@ function escape(html, encode) { } function unescape(html) { - return html.replace(/&([#\w]+);/g, function(_, n) { + // explicitly match decimal, hex, and named HTML entities + return html.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g, function(_, n) { n = n.toLowerCase(); if (n === 'colon') return ':'; if (n.charAt(0) === '#') { @@ -1213,7 +1222,7 @@ function marked(src, opt, callback) { } catch (e) { e.message += '\nPlease report this to https://github.com/chjj/marked.'; if ((opt || marked.defaults).silent) { - return '

An error occured:

'
+      return '

An error occurred:

'
         + escape(e.message + '', true)
         + '
'; } @@ -1237,6 +1246,8 @@ marked.defaults = { breaks: false, pedantic: false, sanitize: false, + sanitizer: null, + mangle: true, smartLists: false, silent: false, highlight: null, diff --git a/src/vs/base/common/network.ts b/src/vs/base/common/network.ts index 7444e2c3a5f53..93de044478a53 100644 --- a/src/vs/base/common/network.ts +++ b/src/vs/base/common/network.ts @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { TPromise } from 'vs/base/common/winjs.base'; - export namespace Schemas { /** @@ -42,65 +40,3 @@ export namespace Schemas { export const untitled: string = 'untitled'; } - -export interface IXHROptions { - type?: string; - url?: string; - user?: string; - password?: string; - responseType?: string; - headers?: any; - customRequestInitializer?: (req: any) => void; - data?: any; -} - -export function xhr(options: IXHROptions): TPromise { - let req: XMLHttpRequest = null; - let canceled = false; - - return new TPromise((c, e, p) => { - req = new XMLHttpRequest(); - - req.onreadystatechange = () => { - if (canceled) { - return; - } - - if (req.readyState === 4) { - // Handle 1223: http://bugs.jquery.com/ticket/1450 - if ((req.status >= 200 && req.status < 300) || req.status === 1223) { - c(req); - } else { - e(req); - } - req.onreadystatechange = () => { }; - } else { - p(req); - } - }; - - req.open( - options.type || 'GET', - options.url, - // Promise based XHR does not support sync. - // - true, - options.user, - options.password - ); - req.responseType = options.responseType || ''; - - Object.keys(options.headers || {}).forEach((k) => { - req.setRequestHeader(k, options.headers[k]); - }); - - if (options.customRequestInitializer) { - options.customRequestInitializer(req); - } - - req.send(options.data); - }, () => { - canceled = true; - req.abort(); - }); -} \ No newline at end of file diff --git a/src/vs/base/common/objects.ts b/src/vs/base/common/objects.ts index c073ced725f55..d834bfe2ddd13 100644 --- a/src/vs/base/common/objects.ts +++ b/src/vs/base/common/objects.ts @@ -82,40 +82,6 @@ function _cloneAndChange(obj: any, changer: (orig: any) => any, encounteredObjec return obj; } -// DON'T USE THESE FUNCTION UNLESS YOU KNOW HOW CHROME -// WORKS... WE HAVE SEEN VERY WEIRD BEHAVIOUR WITH CHROME >= 37 - -///** -// * Recursively call Object.freeze on object and any properties that are objects. -// */ -//export function deepFreeze(obj:any):void { -// Object.freeze(obj); -// Object.keys(obj).forEach((key) => { -// if(!(typeof obj[key] === 'object') || Object.isFrozen(obj[key])) { -// return; -// } -// -// deepFreeze(obj[key]); -// }); -// if(!Object.isFrozen(obj)) { -// console.log('too warm'); -// } -//} -// -//export function deepSeal(obj:any):void { -// Object.seal(obj); -// Object.keys(obj).forEach((key) => { -// if(!(typeof obj[key] === 'object') || Object.isSealed(obj[key])) { -// return; -// } -// -// deepSeal(obj[key]); -// }); -// if(!Object.isSealed(obj)) { -// console.log('NOT sealed'); -// } -//} - /** * Copies all properties of source into destination. The optional parameter "overwrite" allows to control * if existing properties on the destination should be overwritten or not. Defaults to true (overwrite). @@ -304,7 +270,7 @@ export function getOrDefault(obj: T, fn: (obj: T) => R, defaultValue: R = * @param obj the object to use for diffing */ export type obj = { [key: string]: any; }; -export function distinct(base: obj, target: obj): obj { +export function distinct(base: obj, target: obj): obj { const result = Object.create(null); if (!base || !target) { diff --git a/src/vs/base/common/paging.ts b/src/vs/base/common/paging.ts index a8f8208c58158..de3319b503863 100644 --- a/src/vs/base/common/paging.ts +++ b/src/vs/base/common/paging.ts @@ -6,7 +6,6 @@ 'use strict'; import { TPromise } from 'vs/base/common/winjs.base'; -import { ArraySet } from 'vs/base/common/set'; import { isArray } from 'vs/base/common/types'; /** @@ -22,7 +21,7 @@ export interface IPager { interface IPage { isResolved: boolean; promise: TPromise; - promiseIndexes: ArraySet; + promiseIndexes: Set; elements: T[]; } @@ -55,12 +54,12 @@ export class PagedModel implements IPagedModel { constructor(private arg: IPager | T[], private pageTimeout: number = 500) { this.pager = isArray(arg) ? singlePagePager(arg) : arg; - this.pages = [{ isResolved: true, promise: null, promiseIndexes: new ArraySet(), elements: this.pager.firstPage.slice() }]; + this.pages = [{ isResolved: true, promise: null, promiseIndexes: new Set(), elements: this.pager.firstPage.slice() }]; const totalPages = Math.ceil(this.pager.total / this.pager.pageSize); for (let i = 0, len = totalPages - 1; i < len; i++) { - this.pages.push({ isResolved: false, promise: null, promiseIndexes: new ArraySet(), elements: [] }); + this.pages.push({ isResolved: false, promise: null, promiseIndexes: new Set(), elements: [] }); } } @@ -102,14 +101,14 @@ export class PagedModel implements IPagedModel { } return new TPromise((c, e) => { - page.promiseIndexes.set(index); + page.promiseIndexes.add(index); page.promise.done(() => c(page.elements[indexInPage])); }, () => { if (!page.promise) { return; } - page.promiseIndexes.unset(index); + page.promiseIndexes.delete(index); if (page.promiseIndexes.size === 0) { page.promise.cancel(); diff --git a/src/vs/base/common/parsers.ts b/src/vs/base/common/parsers.ts index b71e1c8820170..0aa919598e245 100644 --- a/src/vs/base/common/parsers.ts +++ b/src/vs/base/common/parsers.ts @@ -49,6 +49,14 @@ export interface IProblemReporter { status: ValidationStatus; } +export class NullProblemReporter implements IProblemReporter { + info(message: string): void { }; + warn(message: string): void { }; + error(message: string): void { }; + fatal(message: string): void { }; + status: ValidationStatus = new ValidationStatus(); +} + export abstract class Parser { private _problemReporter: IProblemReporter; diff --git a/src/vs/base/common/paths.ts b/src/vs/base/common/paths.ts index 3ad625b365305..5a16223bf2aa2 100644 --- a/src/vs/base/common/paths.ts +++ b/src/vs/base/common/paths.ts @@ -6,7 +6,7 @@ import { isLinux, isWindows } from 'vs/base/common/platform'; import { fill } from 'vs/base/common/arrays'; -import { rtrim } from 'vs/base/common/strings'; +import { rtrim, beginsWithIgnoreCase, equalsIgnoreCase } from 'vs/base/common/strings'; import { CharCode } from 'vs/base/common/charCode'; /** @@ -341,4 +341,88 @@ export function isValidBasename(name: string): boolean { } return true; +} + +export function isEqual(pathA: string, pathB: string, ignoreCase?: boolean): boolean { + const identityEquals = (pathA === pathB); + if (!ignoreCase || identityEquals) { + return identityEquals; + } + + if (!pathA || !pathB) { + return false; + } + + return equalsIgnoreCase(pathA, pathB); +} + +export function isEqualOrParent(path: string, candidate: string, ignoreCase?: boolean): boolean { + if (path === candidate) { + return true; + } + + if (!path || !candidate) { + return false; + } + + if (candidate.length > path.length) { + return false; + } + + if (ignoreCase) { + const beginsWith = beginsWithIgnoreCase(path, candidate); + if (!beginsWith) { + return false; + } + + if (candidate.length === path.length) { + return true; // same path, different casing + } + + let sepOffset = candidate.length; + if (candidate.charAt(candidate.length - 1) === nativeSep) { + sepOffset--; // adjust the expected sep offset in case our candidate already ends in separator character + } + + return path.charAt(sepOffset) === nativeSep; + } + + if (candidate.charAt(candidate.length - 1) !== nativeSep) { + candidate += nativeSep; + } + + return path.indexOf(candidate) === 0; +} + +/** + * Adapted from Node's path.isAbsolute functions + */ +export function isAbsolute(path: string): boolean { + return isWindows ? + isAbsolute_win32(path) : + isAbsolute_posix(path); +} + +export function isAbsolute_win32(path: string): boolean { + if (!path) { + return false; + } + + const char0 = path.charCodeAt(0); + if (char0 === CharCode.Slash || char0 === CharCode.Backslash) { + return true; + } else if ((char0 >= CharCode.A && char0 <= CharCode.Z) || (char0 >= CharCode.a && char0 <= CharCode.z)) { + if (path.length > 2 && path.charCodeAt(1) === CharCode.Colon) { + const char2 = path.charCodeAt(2); + if (char2 === CharCode.Slash || char2 === CharCode.Backslash) { + return true; + } + } + } + + return false; +} + +export function isAbsolute_posix(path: string): boolean { + return path && path.charCodeAt(0) === CharCode.Slash; } \ No newline at end of file diff --git a/src/vs/base/common/platform.ts b/src/vs/base/common/platform.ts index 77311e2dc5817..bf1aa3268f452 100644 --- a/src/vs/base/common/platform.ts +++ b/src/vs/base/common/platform.ts @@ -12,7 +12,6 @@ let _isLinux = false; let _isRootUser = false; let _isNative = false; let _isWeb = false; -let _isQunit = false; let _locale: string = undefined; let _language: string = undefined; @@ -68,7 +67,6 @@ if (typeof process === 'object') { _isWeb = true; _locale = navigator.language; _language = _locale; - _isQunit = !!(self).QUnit; } export enum Platform { @@ -78,7 +76,7 @@ export enum Platform { Windows } -export let _platform: Platform = Platform.Web; +let _platform: Platform = Platform.Web; if (_isNative) { if (_isMacintosh) { _platform = Platform.Mac; @@ -95,7 +93,6 @@ export const isLinux = _isLinux; export const isRootUser = _isRootUser; export const isNative = _isNative; export const isWeb = _isWeb; -export const isQunit = _isQunit; export const platform = _platform; /** @@ -145,3 +142,14 @@ export const enum OperatingSystem { Linux = 3 } export const OS = (_isMacintosh ? OperatingSystem.Macintosh : (_isWindows ? OperatingSystem.Windows : OperatingSystem.Linux)); + +export const enum AccessibilitySupport { + /** + * This should be the browser case where it is not known if a screen reader is attached or no. + */ + Unknown = 0, + + Disabled = 1, + + Enabled = 2 +} diff --git a/src/vs/base/common/scrollable.ts b/src/vs/base/common/scrollable.ts index f7d327627f087..31d821d4ed8ff 100644 --- a/src/vs/base/common/scrollable.ts +++ b/src/vs/base/common/scrollable.ts @@ -154,6 +154,20 @@ export class Scrollable extends Disposable { return this._state; } + public validateScrollTop(desiredScrollTop: number): number { + desiredScrollTop = Math.round(desiredScrollTop); + desiredScrollTop = Math.max(desiredScrollTop, 0); + desiredScrollTop = Math.min(desiredScrollTop, this._state.scrollHeight - this._state.height); + return desiredScrollTop; + } + + public validateScrollLeft(desiredScrollLeft: number): number { + desiredScrollLeft = Math.round(desiredScrollLeft); + desiredScrollLeft = Math.max(desiredScrollLeft, 0); + desiredScrollLeft = Math.min(desiredScrollLeft, this._state.scrollWidth - this._state.width); + return desiredScrollLeft; + } + public updateState(update: INewScrollState): void { const oldState = this._state; const newState = new ScrollState( diff --git a/src/vs/base/common/set.ts b/src/vs/base/common/set.ts deleted file mode 100644 index 245bf7480f89d..0000000000000 --- a/src/vs/base/common/set.ts +++ /dev/null @@ -1,38 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -export class ArraySet { - - private _elements: T[]; - - constructor(elements: T[] = []) { - this._elements = elements.slice(); - } - - get size(): number { - return this._elements.length; - } - - set(element: T): void { - this.unset(element); - this._elements.push(element); - } - - contains(element: T): boolean { - return this._elements.indexOf(element) > -1; - } - - unset(element: T): void { - const index = this._elements.indexOf(element); - - if (index > -1) { - this._elements.splice(index, 1); - } - } - - get elements(): T[] { - return this._elements.slice(); - } -} \ No newline at end of file diff --git a/src/vs/base/common/strings.ts b/src/vs/base/common/strings.ts index 85a902fd56b5a..20b49e48b5416 100644 --- a/src/vs/base/common/strings.ts +++ b/src/vs/base/common/strings.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { BoundedLinkedMap } from 'vs/base/common/map'; +import { BoundedMap } from 'vs/base/common/map'; import { CharCode } from 'vs/base/common/charCode'; /** @@ -202,7 +202,7 @@ export interface RegExpOptions { } export function createRegExp(searchString: string, isRegex: boolean, options: RegExpOptions = {}): RegExp { - if (searchString === '') { + if (!searchString) { throw new Error('Cannot create regex from empty string'); } if (!isRegex) { @@ -251,7 +251,7 @@ export function regExpLeadsToEndlessLoop(regexp: RegExp): boolean { */ export let canNormalize = typeof (('').normalize) === 'function'; const nonAsciiCharactersPattern = /[^\u0000-\u0080]/; -const normalizedCache = new BoundedLinkedMap(10000); // bounded to 10000 elements +const normalizedCache = new BoundedMap(10000); // bounded to 10000 elements export function normalizeNFC(str: string): string { if (!canNormalize || !str) { return str; @@ -293,14 +293,14 @@ export function firstNonWhitespaceIndex(str: string): number { * Returns the leading whitespace of the string. * If the string contains only whitespaces, returns entire string */ -export function getLeadingWhitespace(str: string): string { - for (let i = 0, len = str.length; i < len; i++) { +export function getLeadingWhitespace(str: string, start: number = 0, end: number = str.length): string { + for (let i = start; i < end; i++) { let chCode = str.charCodeAt(i); if (chCode !== CharCode.Space && chCode !== CharCode.Tab) { - return str.substring(0, i); + return str.substring(start, i); } } - return str; + return str.substring(start, end); } /** @@ -339,11 +339,11 @@ export function compareIgnoreCase(a: string, b: string): number { } if (isUpperAsciiLetter(codeA)) { - codeA -= 32; + codeA += 32; } if (isUpperAsciiLetter(codeB)) { - codeB -= 32; + codeB += 32; } const diff = codeA - codeB; @@ -383,9 +383,8 @@ function isAsciiLetter(code: number): boolean { } export function equalsIgnoreCase(a: string, b: string): boolean { - - let len1 = a.length, - len2 = b.length; + const len1 = a ? a.length : 0; + const len2 = b ? b.length : 0; if (len1 !== len2) { return false; @@ -394,7 +393,11 @@ export function equalsIgnoreCase(a: string, b: string): boolean { return doEqualsIgnoreCase(a, b); } -export function doEqualsIgnoreCase(a: string, b: string, stopAt = a.length): boolean { +function doEqualsIgnoreCase(a: string, b: string, stopAt = a.length): boolean { + if (typeof a !== 'string' || typeof b !== 'string') { + return false; + } + for (let i = 0; i < stopAt; i++) { const codeA = a.charCodeAt(i); const codeB = b.charCodeAt(i); @@ -468,6 +471,43 @@ export function commonSuffixLength(a: string, b: string): number { return len; } +function substrEquals(a: string, aStart: number, aEnd: number, b: string, bStart: number, bEnd: number): boolean { + while (aStart < aEnd && bStart < bEnd) { + if (a[aStart] !== b[bStart]) { + return false; + } + aStart += 1; + bStart += 1; + } + return true; +} + +/** + * Return the overlap between the suffix of `a` and the prefix of `b`. + * For instance `overlap("foobar", "arr, I'm a pirate") === 2`. + */ +export function overlap(a: string, b: string): number { + let aEnd = a.length; + let bEnd = b.length; + let aStart = aEnd - bEnd; + + if (aStart === 0) { + return a === b ? aEnd : 0; + } else if (aStart < 0) { + bEnd += aStart; + aStart = 0; + } + + while (aStart < aEnd && bEnd > 0) { + if (substrEquals(a, aStart, aEnd, b, 0, bEnd)) { + return bEnd; + } + bEnd -= 1; + aStart += 1; + } + return 0; +} + // --- unicode // http://en.wikipedia.org/wiki/Surrogate_pair // Returns the code point starting at a specified index in a string @@ -503,6 +543,15 @@ export function containsRTL(str: string): boolean { return CONTAINS_RTL.test(str); } +/** + * Generated using https://github.com/alexandrudima/unicode-utils/blob/master/generate-emoji-test.js + */ +const CONTAINS_EMOJI = /(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEF8]|\uD83E[\uDD00-\uDDE6])/; + +export function containsEmoji(str: string): boolean { + return CONTAINS_EMOJI.test(str); +} + const IS_BASIC_ASCII = /^[\t\n\r\x20-\x7E]*$/; /** * Returns true if `str` contains only basic ASCII characters in the range 32 - 126 (including 32 and 126) or \n, \r, \t @@ -511,6 +560,15 @@ export function isBasicASCII(str: string): boolean { return IS_BASIC_ASCII.test(str); } +export function containsFullWidthCharacter(str: string): boolean { + for (let i = 0, len = str.length; i < len; i++) { + if (isFullWidthCharacter(str.charCodeAt(i))) { + return true; + } + } + return false; +} + export function isFullWidthCharacter(charCode: number): boolean { // Do a cheap trick to better support wrapping of wide characters, treat them as 2 columns // http://jrgraphix.net/research/unicode_blocks.php diff --git a/src/vs/base/common/winjs.base.d.ts b/src/vs/base/common/winjs.base.d.ts index ea35630cf374e..7e3ae270d949d 100644 --- a/src/vs/base/common/winjs.base.d.ts +++ b/src/vs/base/common/winjs.base.d.ts @@ -33,7 +33,7 @@ export declare class Promise { // commented out to speed up adoption of TPromise // static timeout(delay:number):Promise; - static wrapError(error: any): Promise; + static wrapError(error: Error): Promise; // static is(value: any): value is Thenable; // static addEventListener(type: string, fn: EventCallback): void; @@ -55,6 +55,18 @@ export interface TProgressCallback { (progress: T): void; } +interface IPromiseErrorDetail { + parent: TPromise; + error: any; + id: number; + handler: Function; + exception: Error; +} + +interface IPromiseError { + detail: IPromiseErrorDetail; +} + /** * A Promise implementation that supports progress and cancelation. */ @@ -94,7 +106,12 @@ export declare class TPromise { public static wrap(value: Thenable): TPromise; public static wrap(value: ValueType): TPromise; - public static wrapError(error: any): TPromise; + public static wrapError(error: Error): TPromise; + + /** + * @internal + */ + public static addEventListener(event: 'error', promiseErrorHandler: (e: IPromiseError) => void); } // --- Generic promise with generic progress value @@ -117,5 +134,5 @@ export declare class PPromise extends TPromise { public static join(promises: PPromise[]): PPromise; public static join(promises: { [n: string]: PPromise }): PPromise<{ [n: string]: C }, P>; public static any(promises: PPromise[]): PPromise<{ key: string; value: PPromise; }, P>; - public static wrapError(error: any): TPromise; + public static wrapError(error: Error): TPromise; } diff --git a/src/vs/base/common/winjs.base.js b/src/vs/base/common/winjs.base.js index d8e7516a0d938..aea7370ed16e7 100644 --- a/src/vs/base/common/winjs.base.js +++ b/src/vs/base/common/winjs.base.js @@ -3,60 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -define(['./winjs.base.raw', 'vs/base/common/errors'], function (winjs, __Errors__) { +define(['./winjs.base.raw'], function (winjs) { 'use strict'; - - var outstandingPromiseErrors = {}; - function promiseErrorHandler(e) { - - // - // e.detail looks like: { exception, error, promise, handler, id, parent } - // - var details = e.detail; - var id = details.id; - - // If the error has a parent promise then this is not the origination of the - // error so we check if it has a handler, and if so we mark that the error - // was handled by removing it from outstandingPromiseErrors - // - if (details.parent) { - if (details.handler && outstandingPromiseErrors) { - delete outstandingPromiseErrors[id]; - } - return; - } - - // Indicate that this error was originated and needs to be handled - outstandingPromiseErrors[id] = details; - - // The first time the queue fills up this iteration, schedule a timeout to - // check if any errors are still unhandled. - if (Object.keys(outstandingPromiseErrors).length === 1) { - setTimeout(function () { - var errors = outstandingPromiseErrors; - outstandingPromiseErrors = {}; - Object.keys(errors).forEach(function (errorId) { - var error = errors[errorId]; - if(error.exception) { - __Errors__.onUnexpectedError(error.exception); - } else if(error.error) { - __Errors__.onUnexpectedError(error.error); - } - console.log("WARNING: Promise with no error callback:" + error.id); - console.log(error); - if(error.exception) { - console.log(error.exception.stack); - } - }); - }, 0); - } - } - - winjs.Promise.addEventListener("error", promiseErrorHandler); - return { Promise: winjs.Promise, TPromise: winjs.Promise, PPromise: winjs.Promise }; -}); \ No newline at end of file +}); diff --git a/src/vs/base/node/decoder.ts b/src/vs/base/node/decoder.ts index a725903b51013..112c6cdf6cb95 100644 --- a/src/vs/base/node/decoder.ts +++ b/src/vs/base/node/decoder.ts @@ -36,9 +36,6 @@ export class LineDecoder { } let start = 0; let ch: number; - while (start < value.length && ((ch = value.charCodeAt(start)) === CharCode.CarriageReturn || ch === CharCode.LineFeed)) { - start++; - } let idx = start; while (idx < value.length) { ch = value.charCodeAt(idx); diff --git a/src/vs/base/node/extfs.ts b/src/vs/base/node/extfs.ts index ef8680f062a44..6b99256462b6a 100644 --- a/src/vs/base/node/extfs.ts +++ b/src/vs/base/node/extfs.ts @@ -374,13 +374,13 @@ export function writeFileAndFlush(path: string, data: string | NodeBuffer, optio /** * Copied from: https://github.com/Microsoft/vscode-node-debug/blob/master/src/node/pathUtilities.ts#L83 * - * Given an absolute, normalized, and existing file path 'realpath' returns the exact path that the file has on disk. + * Given an absolute, normalized, and existing file path 'realcase' returns the exact path that the file has on disk. * On a case insensitive file system, the returned path might differ from the original path by character casing. * On a case sensitive file system, the returned path will always be identical to the original path. * In case of errors, null is returned. But you cannot use this function to verify that a path exists. - * realpathSync does not handle '..' or '.' path segments and it does not take the locale into account. + * realcaseSync does not handle '..' or '.' path segments and it does not take the locale into account. */ -export function realpathSync(path: string): string { +export function realcaseSync(path: string): string { const dir = paths.dirname(path); if (path === dir) { // end recursion return path; @@ -392,7 +392,7 @@ export function realpathSync(path: string): string { const found = entries.filter(e => e.toLowerCase() === name); // use a case insensitive search if (found.length === 1) { // on a case sensitive filesystem we cannot determine here, whether the file exists or not, hence we need the 'file exists' precondition - const prefix = realpathSync(dir); // recurse + const prefix = realcaseSync(dir); // recurse if (prefix) { return paths.join(prefix, found[0]); } @@ -400,7 +400,7 @@ export function realpathSync(path: string): string { // must be a case sensitive $filesystem const ix = found.indexOf(name); if (ix >= 0) { // case sensitive - const prefix = realpathSync(dir); // recurse + const prefix = realcaseSync(dir); // recurse if (prefix) { return paths.join(prefix, found[ix]); } @@ -411,4 +411,44 @@ export function realpathSync(path: string): string { } return null; -} \ No newline at end of file +} + +export function realpathSync(path: string): string { + try { + return fs.realpathSync(path); + } catch (error) { + + // We hit an error calling fs.realpathSync(). Since fs.realpathSync() is doing some path normalization + // we now do a similar normalization and then try again if we can access the path with read + // permissions at least. If that succeeds, we return that path. + // fs.realpath() is resolving symlinks and that can fail in certain cases. The workaround is + // to not resolve links but to simply see if the path is read accessible or not. + const normalizedPath = normalizePath(path); + fs.accessSync(normalizedPath, fs.constants.R_OK); // throws in case of an error + + return normalizedPath; + } +} + +export function realpath(path: string, callback: (error: Error, realpath: string) => void): void { + return fs.realpath(path, (error, realpath) => { + if (!error) { + return callback(null, realpath); + } + + // We hit an error calling fs.realpath(). Since fs.realpath() is doing some path normalization + // we now do a similar normalization and then try again if we can access the path with read + // permissions at least. If that succeeds, we return that path. + // fs.realpath() is resolving symlinks and that can fail in certain cases. The workaround is + // to not resolve links but to simply see if the path is read accessible or not. + const normalizedPath = normalizePath(path); + + return fs.access(normalizedPath, fs.constants.R_OK, error => { + return callback(error, normalizedPath); + }); + }); +} + +function normalizePath(path: string): string { + return strings.rtrim(paths.normalize(path), paths.sep); +} diff --git a/src/vs/base/node/id.ts b/src/vs/base/node/id.ts index 082983bea7220..f8b65bfcbc997 100644 --- a/src/vs/base/node/id.ts +++ b/src/vs/base/node/id.ts @@ -35,6 +35,9 @@ export const virtualMachineHint: { value(): number } = new class { this._virtualMachineOUIs.insert('00-05-69', true); this._virtualMachineOUIs.insert('00-03-FF', true); this._virtualMachineOUIs.insert('00-1C-42', true); + this._virtualMachineOUIs.insert('00-16-3E', true); + this._virtualMachineOUIs.insert('08-00-27', true); + } return this._virtualMachineOUIs.findSubstr(mac); } diff --git a/src/vs/base/node/pfs.ts b/src/vs/base/node/pfs.ts index 9ff23afdfa17b..3d8e180843975 100644 --- a/src/vs/base/node/pfs.ts +++ b/src/vs/base/node/pfs.ts @@ -72,7 +72,7 @@ export function rimraf(path: string): TPromise { } export function realpath(path: string): TPromise { - return nfcall(fs.realpath, path, null); + return nfcall(extfs.realpath, path); } export function stat(path: string): TPromise { diff --git a/src/vs/base/node/processes.ts b/src/vs/base/node/processes.ts index 40b9365656d98..6895c7c32b3f3 100644 --- a/src/vs/base/node/processes.ts +++ b/src/vs/base/node/processes.ts @@ -168,7 +168,7 @@ export abstract class AbstractProcess { public start(): PPromise { if (Platform.isWindows && ((this.options && this.options.cwd && TPath.isUNC(this.options.cwd)) || !this.options && !this.options.cwd && TPath.isUNC(process.cwd()))) { - return Promise.wrapError(nls.localize('TaskRunner.UNC', 'Can\'t execute a shell command on an UNC drive.')); + return Promise.wrapError(new Error(nls.localize('TaskRunner.UNC', 'Can\'t execute a shell command on an UNC drive.'))); } return this.useExec().then((useExec) => { let cc: TValueCallback; diff --git a/src/vs/base/node/profiler.ts b/src/vs/base/node/profiler.ts index febca07118e76..c19ba021b695b 100644 --- a/src/vs/base/node/profiler.ts +++ b/src/vs/base/node/profiler.ts @@ -45,7 +45,7 @@ export function stopProfiling(dir: string, prefix: string): TPromise { }); } -function removePiiPaths(profile: Profile) { +export function removePiiPaths(profile: Profile) { const stack = [profile.head]; while (stack.length > 0) { const element = stack.pop(); @@ -66,14 +66,14 @@ declare interface Profiler { stopProfiling(): Profile; } -declare interface Profile { +export declare interface Profile { title: string; export(callback: (err, data) => void); delete(); head: ProfileSample; } -declare interface ProfileSample { +export declare interface ProfileSample { // bailoutReason:"" // callUID:2333 // children:Array[39] diff --git a/src/vs/base/node/startupTimers.d.ts b/src/vs/base/node/startupTimers.d.ts new file mode 100644 index 0000000000000..2fae1f8eab1ad --- /dev/null +++ b/src/vs/base/node/startupTimers.d.ts @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { Profile } from './profiler'; + +declare interface TickStart { + name: string; + started: number; +} + +export declare class Tick { + + readonly duration: number; + readonly name: string; + readonly started: number; + readonly stopped: number; + readonly profile: Profile; + + static compareByStart(a: Tick, b: Tick): number; +} + +declare interface TickController { + while>(t: T): T; + stop(stopped?: number): void; +} + +export function startTimer(name: string): TickController; + +export function stopTimer(name: string); + +export function ticks(): Tick[]; + +export function tick(name: string): Tick; + +export function setProfileList(names: string[]): void; + +export function disable(): void; diff --git a/src/vs/base/node/startupTimers.js b/src/vs/base/node/startupTimers.js new file mode 100644 index 0000000000000..7fc81812efc1e --- /dev/null +++ b/src/vs/base/node/startupTimers.js @@ -0,0 +1,128 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +/*global define*/ + +var requireProfiler; + +if (typeof define !== "function" && typeof module === "object" && typeof module.exports === "object") { + // this is commonjs, fake amd + global.define = function (dep, callback) { + module.exports = callback(); + global.define = undefined; + }; + requireProfiler = function () { + return require('v8-profiler'); + }; +} else { + // this is amd + requireProfiler = function () { + return require.__$__nodeRequire('v8-profiler'); + }; +} + +define([], function () { + + function Tick(name, started, stopped, profile) { + this.name = name; + this.started = started; + this.stopped = stopped; + this.duration = Math.round(((stopped[0] * 1.e9 + stopped[1]) - (started[0] * 1e9 + started[1])) / 1.e6); + this.profile = profile; + } + Tick.compareByStart = function (a, b) { + if (a.started < b.started) { + return -1; + } else if (a.started > b.started) { + return 1; + } else { + return 0; + } + }; + + // This module can be loaded in an amd and commonjs-context. + // Because we want both instances to use the same tick-data + // we store them globally + global._perfStarts = global._perfStarts || new Map(); + global._perfTicks = global._perfTicks || new Map(); + global._perfToBeProfiled = global._perfToBeProfiled || new Set(); + + var _starts = global._perfStarts; + var _ticks = global._perfTicks; + var _toBeProfiled = global._perfToBeProfiled; + + function startTimer(name) { + if (_starts.has(name)) { + throw new Error("${name}" + " already exists"); + } + if (_toBeProfiled.has(name)) { + requireProfiler().startProfiling(name, true); + } + _starts.set(name, { name: name, started: process.hrtime() }); + var stop = stopTimer.bind(undefined, name); + return { + stop: stop, + while: function (thenable) { + thenable.then(function () { stop(); }, function () { stop(); }); + return thenable; + } + }; + } + + function stopTimer(name) { + var profile = _toBeProfiled.has(name) ? requireProfiler().stopProfiling(name) : undefined; + var start = _starts.get(name); + if (start !== undefined) { + var tick = new Tick(start.name, start.started, process.hrtime(), profile); + _ticks.set(name, tick); + _starts.delete(name); + } + } + + function ticks() { + var ret = []; + _ticks.forEach(function (value) { ret.push(value); }); + return ret; + } + + function tick(name) { + var ret = _ticks.get(name); + if (!ret) { + var now = Date.now(); + ret = new Tick(name, now, now); + } + return ret; + } + + function setProfileList(names) { + _toBeProfiled.clear(); + names.forEach(function (name) { _toBeProfiled.add(name); }); + } + + var exports = { + Tick: Tick, + startTimer: startTimer, + stopTimer: stopTimer, + ticks: ticks, + tick: tick, + setProfileList: setProfileList, + disable: disable, + }; + + function disable() { + var emptyController = Object.freeze({ while: function (t) { return t; }, stop: function () { } }); + var emptyTicks = Object.create([]); + exports.startTimer = function () { return emptyController; }; + exports.stopTimer = function () { }; + exports.ticks = function () { return emptyTicks; }; + + delete global._perfStarts; + delete global._perfTicks; + } + + return exports; +}); diff --git a/src/vs/base/node/stdForkStart.js b/src/vs/base/node/stdForkStart.js index 92024acf6b851..ffd56771bb632 100644 --- a/src/vs/base/node/stdForkStart.js +++ b/src/vs/base/node/stdForkStart.js @@ -3,16 +3,16 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -var net = require('net'), - fs = require('fs'), - stream = require('stream'), - util = require('util'); +const net = require('net'); +const fs = require('fs'); +// const stream = require('stream'); +// const util = require('util'); var ENABLE_LOGGING = false; -var log = (function() { +var log = (function () { if (!ENABLE_LOGGING) { - return function() {}; + return function () { }; } var isFirst = true; var LOG_LOCATION = 'C:\\stdFork.log'; @@ -23,7 +23,7 @@ var log = (function() { return; } fs.appendFileSync(LOG_LOCATION, str + '\n'); - } + }; })(); var stdInPipeName = process.env['STDIN_PIPE_NAME']; @@ -36,7 +36,7 @@ log('STDERR_PIPE_NAME: ' + stdErrPipeName); log('ELECTRON_RUN_AS_NODE: ' + process.env['ELECTRON_RUN_AS_NODE']); // stdout redirection to named pipe -(function() { +(function () { log('Beginning stdout redirection...'); // Create a writing stream to the stdout pipe @@ -46,7 +46,7 @@ log('ELECTRON_RUN_AS_NODE: ' + process.env['ELECTRON_RUN_AS_NODE']); stdOutStream.unref(); // handle process.stdout - process.__defineGetter__('stdout', function() { return stdOutStream; }); + process.__defineGetter__('stdout', function () { return stdOutStream; }); // Create a writing stream to the stderr pipe var stdErrStream = net.connect(stdErrPipeName); @@ -55,15 +55,15 @@ log('ELECTRON_RUN_AS_NODE: ' + process.env['ELECTRON_RUN_AS_NODE']); stdErrStream.unref(); // handle process.stderr - process.__defineGetter__('stderr', function() { return stdErrStream; }); + process.__defineGetter__('stderr', function () { return stdErrStream; }); - var fsWriteSyncString = function(fd, str, position, encoding) { + var fsWriteSyncString = function (fd, str, position, encoding) { // fs.writeSync(fd, string[, position[, encoding]]); var buf = new Buffer(str, encoding || 'utf8'); return fsWriteSyncBuffer(fd, buf, 0, buf.length); }; - var fsWriteSyncBuffer = function(fd, buffer, off, len, position) { + var fsWriteSyncBuffer = function (fd, buffer, off, len/* , position */) { off = Math.abs(off | 0); len = Math.abs(len | 0); @@ -99,7 +99,7 @@ log('ELECTRON_RUN_AS_NODE: ' + process.env['ELECTRON_RUN_AS_NODE']); // handle fs.writeSync(1, ...) and fs.writeSync(2, ...) var originalWriteSync = fs.writeSync; - fs.writeSync = function(fd, data, position, encoding) { + fs.writeSync = function (fd, data/* , position, encoding */) { if (fd !== 1 && fd !== 2) { return originalWriteSync.apply(fs, arguments); } @@ -124,17 +124,17 @@ log('ELECTRON_RUN_AS_NODE: ' + process.env['ELECTRON_RUN_AS_NODE']); })(); // stdin redirection to named pipe -(function() { +(function () { // Begin listening to stdin pipe - var server = net.createServer(function(stream) { + var server = net.createServer(function (stream) { // Stop accepting new connections, keep the existing one alive server.close(); log('Parent process has connected to my stdin. All should be good now.'); // handle process.stdin - process.__defineGetter__('stdin', function() { + process.__defineGetter__('stdin', function () { return stream; }); @@ -156,7 +156,7 @@ log('ELECTRON_RUN_AS_NODE: ' + process.env['ELECTRON_RUN_AS_NODE']); log('Finished loading program.'); var stdinIsReferenced = true; - var timer = setInterval(function() { + var timer = setInterval(function () { var listenerCount = ( stream.listeners('data').length + stream.listeners('end').length + @@ -189,7 +189,7 @@ log('ELECTRON_RUN_AS_NODE: ' + process.env['ELECTRON_RUN_AS_NODE']); }); - server.listen(stdInPipeName, function() { + server.listen(stdInPipeName, function () { // signal via stdout that the parent process can now begin writing to stdin pipe process.stdout.write('ready'); }); diff --git a/src/vs/base/node/terminateProcess.sh b/src/vs/base/node/terminateProcess.sh index 2ec9e1c2ec329..acdcbf8ed4210 100755 --- a/src/vs/base/node/terminateProcess.sh +++ b/src/vs/base/node/terminateProcess.sh @@ -1,7 +1,7 @@ #!/bin/bash terminateTree() { - for cpid in $(pgrep -P $1); do + for cpid in $(/usr/bin/pgrep -P $1); do terminateTree $cpid done kill -9 $1 > /dev/null 2>&1 diff --git a/src/vs/base/parts/ipc/common/ipc.ts b/src/vs/base/parts/ipc/common/ipc.ts index d581b2dead1d7..c7b613841d1ad 100644 --- a/src/vs/base/parts/ipc/common/ipc.ts +++ b/src/vs/base/parts/ipc/common/ipc.ts @@ -384,7 +384,7 @@ export class IPCServer implements IChannelServer, IRoutingChannelClient, IDispos const id = router.route(command, arg); if (!id) { - return TPromise.wrapError('Client id should be provided'); + return TPromise.wrapError(new Error('Client id should be provided')); } return this.getClient(id).then(client => client.getChannel(channelName).call(command, arg)); diff --git a/src/vs/base/parts/ipc/node/ipc.cp.ts b/src/vs/base/parts/ipc/node/ipc.cp.ts index 940c18638fba3..aa2516f86040a 100644 --- a/src/vs/base/parts/ipc/node/ipc.cp.ts +++ b/src/vs/base/parts/ipc/node/ipc.cp.ts @@ -56,6 +56,14 @@ export interface IIPCOptions { */ debugBrk?: number; + /** + * See https://github.com/Microsoft/vscode/issues/27665 + * Allows to pass in fresh execArgv to the forked process such that it doesn't inherit them from `process.execArgv`. + * e.g. Launching the extension host process with `--debug-brk=xxx` and then forking a process from the extension host + * results in the forked process inheriting `--debug-brk=xxx`. + */ + freshExecArgv?: boolean; + /** * Enables our createQueuedSender helper for this Client. Uses a queue when the internal Node.js queue is * full of messages - see notes on that method. @@ -87,7 +95,7 @@ export class Client implements IChannelClient, IDisposable { protected request(channelName: string, name: string, arg: any): Promise { if (!this.disposeDelayer) { - return Promise.wrapError('disposed'); + return Promise.wrapError(new Error('disposed')); } this.disposeDelayer.cancel(); @@ -125,6 +133,10 @@ export class Client implements IChannelClient, IDisposable { forkOpts.env = assign(forkOpts.env, this.options.env); } + if (this.options && this.options.freshExecArgv) { + forkOpts.execArgv = []; + } + if (this.options && typeof this.options.debug === 'number') { forkOpts.execArgv = ['--nolazy', '--debug=' + this.options.debug]; } diff --git a/src/vs/base/parts/quickopen/browser/quickOpenModel.ts b/src/vs/base/parts/quickopen/browser/quickOpenModel.ts index 06629740fd7cd..e920a9e6da260 100644 --- a/src/vs/base/parts/quickopen/browser/quickOpenModel.ts +++ b/src/vs/base/parts/quickopen/browser/quickOpenModel.ts @@ -21,6 +21,9 @@ import { ActionBar, IActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; import { HighlightedLabel } from 'vs/base/browser/ui/highlightedlabel/highlightedLabel'; import DOM = require('vs/base/browser/dom'); import { IQuickOpenStyles } from 'vs/base/parts/quickopen/browser/quickOpenWidget'; +import { KeybindingLabel } from 'vs/base/browser/ui/keybindingLabel/keybindingLabel'; +import { OS } from 'vs/base/common/platform'; +import { ResolvedKeybinding } from 'vs/base/common/keyCodes'; export interface IContext { event: any; @@ -108,6 +111,13 @@ export class QuickOpenEntry { return null; } + /** + * An optional keybinding to show for an entry. + */ + public getKeybinding(): ResolvedKeybinding { + return null; + } + /** * A resource for this entry. Resource URIs can be used to compare different kinds of entries and group * them together. @@ -389,6 +399,7 @@ export interface IQuickOpenEntryTemplateData { label: IconLabel; detail: HighlightedLabel; description: HighlightedLabel; + keybinding: KeybindingLabel; actionBar: ActionBar; } @@ -449,6 +460,12 @@ class Renderer implements IRenderer { DOM.addClass(descriptionContainer, 'quick-open-entry-description'); const description = new HighlightedLabel(descriptionContainer); + // Keybinding + const keybindingContainer = document.createElement('span'); + row1.appendChild(keybindingContainer); + DOM.addClass(keybindingContainer, 'quick-open-entry-keybinding'); + const keybinding = new KeybindingLabel(keybindingContainer, OS); + // Detail const detailContainer = document.createElement('div'); row2.appendChild(detailContainer); @@ -481,6 +498,7 @@ class Renderer implements IRenderer { label, detail, description, + keybinding, group, actionBar }; @@ -508,6 +526,13 @@ class Renderer implements IRenderer { } }); + // Entry group class + if (entry instanceof QuickOpenEntryGroup && entry.getGroupLabel()) { + DOM.addClass(data.container, 'has-group-label'); + } else { + DOM.removeClass(data.container, 'has-group-label'); + } + // Entry group if (entry instanceof QuickOpenEntryGroup) { const group = entry; @@ -547,6 +572,9 @@ class Renderer implements IRenderer { // Description data.description.set(entry.getDescription(), descriptionHighlights || []); data.description.element.title = entry.getDescription(); + + // Keybinding + data.keybinding.set(entry.getKeybinding(), null); } } @@ -558,6 +586,8 @@ class Renderer implements IRenderer { data.entry = null; data.description.dispose(); data.description = null; + data.keybinding.dispose(); + data.keybinding = null; data.detail.dispose(); data.detail = null; data.group = null; diff --git a/src/vs/base/parts/quickopen/browser/quickOpenViewer.ts b/src/vs/base/parts/quickopen/browser/quickOpenViewer.ts index 9d0d465b63b1d..07817947cbb0d 100644 --- a/src/vs/base/parts/quickopen/browser/quickOpenViewer.ts +++ b/src/vs/base/parts/quickopen/browser/quickOpenViewer.ts @@ -55,6 +55,16 @@ export class AccessibilityProvider implements IAccessibilityProvider { return model.accessibilityProvider && model.accessibilityProvider.getAriaLabel(element); } + + public getPosInSet(tree: ITree, element: any): string { + const model = this.modelProvider.getModel(); + return String(model.entries.indexOf(element) + 1); + } + + public getSetSize(): string { + const model = this.modelProvider.getModel(); + return String(model.entries.length); + } } export class Filter implements IFilter { diff --git a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts b/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts index c5e7f8c2ae7d1..7a4cbcf5a2d2f 100644 --- a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts +++ b/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts @@ -15,7 +15,7 @@ import { IQuickNavigateConfiguration, IAutoFocus, IEntryRunContext, IModel, Mode import { Filter, Renderer, DataSource, IModelProvider, AccessibilityProvider } from 'vs/base/parts/quickopen/browser/quickOpenViewer'; import { Dimension, Builder, $ } from 'vs/base/browser/builder'; import { ISelectionEvent, IFocusEvent, ITree, ContextMenuEvent, IActionProvider, ITreeStyles } from 'vs/base/parts/tree/browser/tree'; -import { InputBox, MessageType, IInputBoxStyles } from 'vs/base/browser/ui/inputbox/inputBox'; +import { InputBox, MessageType, IInputBoxStyles, IRange } from 'vs/base/browser/ui/inputbox/inputBox'; import Severity from 'vs/base/common/severity'; import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; import { ProgressBar } from 'vs/base/browser/ui/progressbar/progressbar'; @@ -53,11 +53,13 @@ export interface IQuickOpenStyles extends IInputBoxStyles, ITreeStyles { pickerGroupForeground?: Color; pickerGroupBorder?: Color; widgetShadow?: Color; + progressBarBackground?: Color; } export interface IShowOptions { quickNavigateConfiguration?: IQuickNavigateConfiguration; autoFocus?: IAutoFocus; + inputSelection?: IRange; } export interface IQuickOpenUsageLogger { @@ -86,7 +88,8 @@ const defaultStyles = { foreground: Color.fromHex('#CCCCCC'), pickerGroupForeground: Color.fromHex('#0097FB'), pickerGroupBorder: Color.fromHex('#3F3F46'), - widgetShadow: Color.fromHex('#000000') + widgetShadow: Color.fromHex('#000000'), + progressBarBackground: Color.fromHex('#0E70C0') }; const DEFAULT_INPUT_ARIA_LABEL = nls.localize('quickOpenAriaLabel', "Quick picker. Type to narrow down results."); @@ -96,6 +99,7 @@ export class QuickOpenWidget implements IModelProvider { private static MAX_WIDTH = 600; // Max total width of quick open widget private static MAX_ITEMS_HEIGHT = 20 * 22; // Max height of item list below input field + private isDisposed: boolean; private options: IQuickOpenOptions; private builder: Builder; private tree: ITree; @@ -120,6 +124,7 @@ export class QuickOpenWidget implements IModelProvider { private renderer: Renderer; constructor(container: HTMLElement, callbacks: IQuickOpenCallbacks, options: IQuickOpenOptions, usageLogger?: IQuickOpenUsageLogger) { + this.isDisposed = false; this.toUnbind = []; this.container = container; this.callbacks = callbacks; @@ -159,7 +164,7 @@ export class QuickOpenWidget implements IModelProvider { .on(DOM.EventType.BLUR, (e: Event) => this.loosingFocus(e), null, true); // Progress Bar - this.progressBar = new ProgressBar(div.clone()); + this.progressBar = new ProgressBar(div.clone(), { progressBarBackground: this.styles.progressBarBackground }); this.progressBar.getContainer().hide(); // Input Field @@ -200,8 +205,11 @@ export class QuickOpenWidget implements IModelProvider { this.navigateInTree(keyboardEvent.keyCode, keyboardEvent.shiftKey); - // Position cursor at the end of input to allow right arrow (open in background) to function immediately - this.inputBox.inputElement.selectionStart = this.inputBox.value.length; + // Position cursor at the end of input to allow right arrow (open in background) + // to function immediately unless the user has made a selection + if (this.inputBox.inputElement.selectionStart === this.inputBox.inputElement.selectionEnd) { + this.inputBox.inputElement.selectionStart = this.inputBox.value.length; + } } // Select element on Enter or on Arrow-Right if we are at the end of the input @@ -279,11 +287,12 @@ export class QuickOpenWidget implements IModelProvider { // Select element when keys are pressed that signal it const quickNavKeys = this.quickNavigateConfiguration.keybindings; const wasTriggerKeyPressed = keyCode === KeyCode.Enter || quickNavKeys.some((k) => { - if (k.isChord()) { + const [firstPart, chordPart] = k.getParts(); + if (chordPart) { return false; } - if (k.hasShiftModifier() && keyCode === KeyCode.Shift) { + if (firstPart.shiftKey && keyCode === KeyCode.Shift) { if (keyboardEvent.ctrlKey || keyboardEvent.altKey || keyboardEvent.metaKey) { return false; // this is an optimistic check for the shift key being used to navigate back in quick open } @@ -291,15 +300,15 @@ export class QuickOpenWidget implements IModelProvider { return true; } - if (k.hasAltModifier() && keyCode === KeyCode.Alt) { + if (firstPart.altKey && keyCode === KeyCode.Alt) { return true; } - if (k.hasCtrlModifier() && keyCode === KeyCode.Ctrl) { + if (firstPart.ctrlKey && keyCode === KeyCode.Ctrl) { return true; } - if (k.hasMetaModifier() && keyCode === KeyCode.Meta) { + if (firstPart.metaKey && keyCode === KeyCode.Meta) { return true; } @@ -346,11 +355,17 @@ export class QuickOpenWidget implements IModelProvider { this.builder.style('color', foreground); this.builder.style('background-color', background); this.builder.style('border-color', borderColor); - this.builder.style('border-width', borderColor ? '2px' : null); + this.builder.style('border-width', borderColor ? '1px' : null); this.builder.style('border-style', borderColor ? 'solid' : null); this.builder.style('box-shadow', widgetShadow ? `0 5px 8px ${widgetShadow}` : null); } + if (this.progressBar) { + this.progressBar.style({ + progressBarBackground: this.styles.progressBarBackground + }); + } + if (this.inputBox) { this.inputBox.style({ inputBackground: this.styles.inputBackground, @@ -383,7 +398,9 @@ export class QuickOpenWidget implements IModelProvider { return false; // no modifiers allowed } - return this.inputBox.inputElement.selectionStart === this.inputBox.value.length; // only when cursor is at the end of the input field value + // validate the cursor is at the end of the input, and if not prevent + // opening in the background such as the selection can be changed + return this.inputBox.inputElement.selectionEnd === this.inputBox.value.length; } private onType(): void { @@ -403,7 +420,7 @@ export class QuickOpenWidget implements IModelProvider { } public navigate(next: boolean, quickNavigate?: IQuickNavigateConfiguration): void { - if (this.isVisible) { + if (this.isVisible()) { // Transition into quick navigate mode if not yet done if (!this.quickNavigateConfiguration && quickNavigate) { @@ -552,6 +569,11 @@ export class QuickOpenWidget implements IModelProvider { this.doShowWithInput(param, options && options.autoFocus ? options.autoFocus : {}); } + // Respect selectAll option + if (options && options.inputSelection && !this.quickNavigateConfiguration) { + this.inputBox.select(options.inputSelection); + } + if (this.callbacks.onShow) { this.callbacks.onShow(); } @@ -924,6 +946,9 @@ export class QuickOpenWidget implements IModelProvider { if (!this.isLoosingFocus) { return; } + if (this.isDisposed) { + return; + } const veto = this.callbacks.onFocusLost && this.callbacks.onFocusLost(); if (!veto) { @@ -933,6 +958,7 @@ export class QuickOpenWidget implements IModelProvider { } public dispose(): void { + this.isDisposed = true; this.toUnbind = dispose(this.toUnbind); this.progressBar.dispose(); diff --git a/src/vs/base/parts/quickopen/browser/quickopen.css b/src/vs/base/parts/quickopen/browser/quickopen.css index 84eb7d781fbc2..dfe35cceb0bdf 100644 --- a/src/vs/base/parts/quickopen/browser/quickopen.css +++ b/src/vs/base/parts/quickopen/browser/quickopen.css @@ -36,7 +36,7 @@ } .quick-open-widget .quick-open-tree { - line-height: 1.8em; + line-height: 22px; } .quick-open-widget .quick-open-tree .monaco-tree-row > .content > .sub-content { @@ -87,6 +87,14 @@ text-overflow: ellipsis; } +.quick-open-widget .quick-open-tree .content.has-group-label .quick-open-entry-keybinding { + margin-right: 8px; +} + +.quick-open-widget .quick-open-tree .quick-open-entry-keybinding .monaco-kbkey { + vertical-align: text-bottom; +} + .quick-open-widget .quick-open-tree .results-group { margin-right: 18px; } @@ -121,7 +129,7 @@ } .monaco-tree .monaco-tree-row > .content.actions > .primary-action-bar { - line-height: 1em; + line-height: 22px; } .monaco-tree .monaco-tree-row > .content.actions > .primary-action-bar { diff --git a/src/vs/base/test/browser/quickopen.test.ts b/src/vs/base/parts/quickopen/test/browser/quickopen.test.ts similarity index 100% rename from src/vs/base/test/browser/quickopen.test.ts rename to src/vs/base/parts/quickopen/test/browser/quickopen.test.ts diff --git a/src/vs/base/parts/tree/browser/tree.css b/src/vs/base/parts/tree/browser/tree.css index 90df70bf9d1a8..6e835d22e0c65 100644 --- a/src/vs/base/parts/tree/browser/tree.css +++ b/src/vs/base/parts/tree/browser/tree.css @@ -50,8 +50,6 @@ .monaco-tree-drag-image { display: inline-block; padding: 1px 7px; - color: white; - background-color: #4A4A4A; border-radius: 10px; font-size: 12px; position: absolute; diff --git a/src/vs/base/parts/tree/browser/tree.ts b/src/vs/base/parts/tree/browser/tree.ts index 59ecc80ad6673..ab01546278c3d 100644 --- a/src/vs/base/parts/tree/browser/tree.ts +++ b/src/vs/base/parts/tree/browser/tree.ts @@ -76,11 +76,6 @@ export interface ITree extends Events.IEventEmitter { */ refresh(element?: any, recursive?: boolean): WinJS.Promise; - /** - * Refreshes all given elements. - */ - refreshAll(elements: any[], recursive?: boolean): WinJS.Promise; - /** * Expands an element. * The returned promise returns a boolean for whether the element was expanded or not. @@ -283,9 +278,10 @@ export interface ITree extends Events.IEventEmitter { focusFirstChild(eventPayload?: any): void; /** - * Focuses the second element, in visible order. + * Focuses the second element, in visible order. Will focus the first + * child from the provided element's parent if any. */ - focusFirst(eventPayload?: any): void; + focusFirst(eventPayload?: any, from?: any): void; /** * Focuses the nth element, in visible order. @@ -293,9 +289,10 @@ export interface ITree extends Events.IEventEmitter { focusNth(index: number, eventPayload?: any): void; /** - * Focuses the last element, in visible order. + * Focuses the last element, in visible order. Will focus the last + * child from the provided element's parent if any. */ - focusLast(eventPayload?: any): void; + focusLast(eventPayload?: any, from?: any): void; /** * Focuses the element at the end of the next page, in visible order. @@ -431,6 +428,18 @@ export interface IAccessibilityProvider { * See also: https://www.w3.org/TR/wai-aria/states_and_properties#aria-label */ getAriaLabel(tree: ITree, element: any): string; + + /** + * Given an element in the tree return its aria-posinset. Should be between 1 and aria-setsize + * https://www.w3.org/TR/wai-aria/states_and_properties#aria-posinset + */ + getPosInSet?(tree: ITree, element: any): string; + + /** + * Return the aria-setsize of the tree. + * https://www.w3.org/TR/wai-aria/states_and_properties#aria-setsize + */ + getSetSize?(): string; } export /* abstract */ class ContextMenuEvent { @@ -665,12 +674,15 @@ export interface ITreeOptions extends ITreeStyles { export interface ITreeStyles { listFocusBackground?: Color; + listFocusForeground?: Color; listActiveSelectionBackground?: Color; listActiveSelectionForeground?: Color; listFocusAndSelectionBackground?: Color; listFocusAndSelectionForeground?: Color; listInactiveSelectionBackground?: Color; + listInactiveSelectionForeground?: Color; listHoverBackground?: Color; + listHoverForeground?: Color; listDropBackground?: Color; listFocusOutline?: Color; } diff --git a/src/vs/base/parts/tree/browser/treeDefaults.ts b/src/vs/base/parts/tree/browser/treeDefaults.ts index 4b0949c9618ab..bc4ccdc1b73f8 100644 --- a/src/vs/base/parts/tree/browser/treeDefaults.ts +++ b/src/vs/base/parts/tree/browser/treeDefaults.ts @@ -16,59 +16,6 @@ import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import _ = require('vs/base/parts/tree/browser/tree'); import { KeyCode, KeyMod, Keybinding, createKeybinding, SimpleKeybinding } from 'vs/base/common/keyCodes'; -export interface ILegacyTemplateData { - root: HTMLElement; - element: any; - previousCleanupFn: _.IElementCallback; -} - -export class LegacyRenderer implements _.IRenderer { - - public getHeight(tree: _.ITree, element: any): number { - return 20; - } - - public getTemplateId(tree: _.ITree, element: any): string { - return 'legacy'; - } - - public renderTemplate(tree: _.ITree, templateId: string, container: HTMLElement): any { - return { - root: container, - element: null, - previousCleanupFn: null - }; - } - - public renderElement(tree: _.ITree, element: any, templateId: string, templateData: ILegacyTemplateData): void { - if (templateData.previousCleanupFn) { - templateData.previousCleanupFn(tree, templateData.element); - } - - while (templateData.root && templateData.root.firstChild) { - templateData.root.removeChild(templateData.root.firstChild); - } - - templateData.element = element; - templateData.previousCleanupFn = this.render(tree, element, templateData.root); - } - - public disposeTemplate(tree: _.ITree, templateId: string, templateData: any): void { - if (templateData.previousCleanupFn) { - templateData.previousCleanupFn(tree, templateData.element); - } - - templateData.root = null; - templateData.element = null; - templateData.previousCleanupFn = null; - } - - protected render(tree: _.ITree, element: any, container: HTMLElement, previousCleanupFn?: _.IElementCallback): _.IElementCallback { - container.textContent = '' + element; - return null; - } -} - export interface IKeyBindingCallback { (tree: _.ITree, event: IKeyboardEvent): void; } diff --git a/src/vs/base/parts/tree/browser/treeImpl.ts b/src/vs/base/parts/tree/browser/treeImpl.ts index f2173a9bb2c4c..8bd111975601f 100644 --- a/src/vs/base/parts/tree/browser/treeImpl.ts +++ b/src/vs/base/parts/tree/browser/treeImpl.ts @@ -41,7 +41,7 @@ export class TreeContext implements _.ITreeContext { } this.dataSource = configuration.dataSource; - this.renderer = configuration.renderer || new TreeDefaults.LegacyRenderer(); + this.renderer = configuration.renderer; this.controller = configuration.controller || new TreeDefaults.DefaultController({ clickBehavior: TreeDefaults.ClickBehavior.ON_MOUSE_UP, keyboardSupport: typeof options.keyboardSupport !== 'boolean' || options.keyboardSupport }); this.dnd = configuration.dnd || new TreeDefaults.DefaultDragAndDrop(); this.filter = configuration.filter || new TreeDefaults.DefaultFilter(); @@ -170,10 +170,6 @@ export class Tree extends Events.EventEmitter implements _.ITree { return this.model.refresh(element, recursive); } - public refreshAll(elements: any[], recursive = true): WinJS.Promise { - return this.model.refreshAll(elements, recursive); - } - public expand(element: any): WinJS.Promise { return this.model.expand(element); } @@ -327,16 +323,16 @@ export class Tree extends Events.EventEmitter implements _.ITree { this.model.focusFirstChild(eventPayload); } - public focusFirst(eventPayload?: any): void { - this.model.focusFirst(eventPayload); + public focusFirst(eventPayload?: any, from?: any): void { + this.model.focusFirst(eventPayload, from); } public focusNth(index: number, eventPayload?: any): void { this.model.focusNth(index, eventPayload); } - public focusLast(eventPayload?: any): void { - this.model.focusLast(eventPayload); + public focusLast(eventPayload?: any, from?: any): void { + this.model.focusLast(eventPayload, from); } public focusNextPage(eventPayload?: any): void { diff --git a/src/vs/base/parts/tree/browser/treeModel.ts b/src/vs/base/parts/tree/browser/treeModel.ts index 1c47debd86198..9ca9f059c7279 100644 --- a/src/vs/base/parts/tree/browser/treeModel.ts +++ b/src/vs/base/parts/tree/browser/treeModel.ts @@ -839,23 +839,6 @@ export class TreeModel extends Events.EventEmitter { }); } - public refreshAll(elements: any[], recursive: boolean = true): WinJS.Promise { - try { - this.beginDeferredEmit(); - return this._refreshAll(elements, recursive); - } finally { - this.endDeferredEmit(); - } - } - - private _refreshAll(elements: any[], recursive: boolean): WinJS.Promise { - var promises = []; - for (var i = 0, len = elements.length; i < len; i++) { - promises.push(this.refresh(elements[i], recursive)); - } - return WinJS.Promise.join(promises); - } - public expand(element: any): WinJS.Promise { var item = this.getItem(element); @@ -1207,12 +1190,13 @@ export class TreeModel extends Events.EventEmitter { } } - public focusFirst(eventPayload?: any): void { - this.focusNth(0, eventPayload); + public focusFirst(eventPayload?: any, from?: any): void { + this.focusNth(0, eventPayload, from); } - public focusNth(index: number, eventPayload?: any): void { - var nav = this.getNavigator(this.input); + public focusNth(index: number, eventPayload?: any, from?: any): void { + var navItem = this.getParent(from); + var nav = this.getNavigator(navItem); var item = nav.first(); for (var i = 0; i < index; i++) { item = nav.next(); @@ -1223,15 +1207,32 @@ export class TreeModel extends Events.EventEmitter { } } - public focusLast(eventPayload?: any): void { - var nav = this.getNavigator(this.input); - var item = nav.last(); + public focusLast(eventPayload?: any, from?: any): void { + var navItem = this.getParent(from); + var item: Item; + if (from) { + item = navItem.lastChild; + } else { + var nav = this.getNavigator(navItem); + item = nav.last(); + } if (item) { this.setFocus(item, eventPayload); } } + private getParent(from?: any): Item { + if (from) { + var fromItem = this.getItem(from); + if (fromItem && fromItem.parent) { + return fromItem.parent; + } + } + + return this.getItem(this.input); + } + public getNavigator(element: any = null, subTreeOnly: boolean = true): INavigator { return new TreeNavigator(this.getItem(element), subTreeOnly); } diff --git a/src/vs/base/parts/tree/browser/treeView.ts b/src/vs/base/parts/tree/browser/treeView.ts index 549608374c158..02a5ce6234379 100644 --- a/src/vs/base/parts/tree/browser/treeView.ts +++ b/src/vs/base/parts/tree/browser/treeView.ts @@ -197,25 +197,26 @@ export class ViewItem implements IViewItem { // ARIA this.element.setAttribute('role', 'treeitem'); + const accessibility = this.context.accessibilityProvider; + const ariaLabel = accessibility.getAriaLabel(this.context.tree, this.model.getElement()); + if (ariaLabel) { + this.element.setAttribute('aria-label', ariaLabel); + } + if (accessibility.getPosInSet && accessibility.getSetSize) { + this.element.setAttribute('aria-setsize', accessibility.getSetSize()); + this.element.setAttribute('aria-posinset', accessibility.getPosInSet(this.context.tree, this.model.getElement())); + } if (this.model.hasTrait('focused')) { const base64Id = strings.safeBtoa(this.model.id); - const ariaLabel = this.context.accessibilityProvider.getAriaLabel(this.context.tree, this.model.getElement()); this.element.setAttribute('aria-selected', 'true'); this.element.setAttribute('id', base64Id); - if (ariaLabel) { - this.element.setAttribute('aria-label', ariaLabel); - } else { - this.element.setAttribute('aria-labelledby', base64Id); // force screen reader to compute label from children (helps NVDA at least) - } } else { this.element.setAttribute('aria-selected', 'false'); this.element.removeAttribute('id'); - this.element.removeAttribute('aria-label'); - this.element.removeAttribute('aria-labelledby'); } if (this.model.hasChildren()) { - this.element.setAttribute('aria-expanded', String(this.model.isExpanded())); + this.element.setAttribute('aria-expanded', String(!!this.model.isExpanded())); } else { this.element.removeAttribute('aria-expanded'); } @@ -464,7 +465,6 @@ export class TreeView extends HeightMap { this.wrapper = document.createElement('div'); this.wrapper.className = 'monaco-tree-wrapper'; this.scrollableElement = new ScrollableElement(this.wrapper, { - canUseTranslate3d: false, alwaysConsumeMouseWheel: true, horizontal: ScrollbarVisibility.Hidden, vertical: (typeof context.options.verticalScrollMode !== 'undefined' ? context.options.verticalScrollMode : ScrollbarVisibility.Auto), @@ -555,32 +555,75 @@ export class TreeView extends HeightMap { } public applyStyles(styles: _.ITreeStyles): void { + const content: string[] = []; + + if (styles.listFocusBackground) { + content.push(`.monaco-tree.monaco-tree-instance-${this.instance}.focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { background-color: ${styles.listFocusBackground}; }`); + } + + if (styles.listFocusForeground) { + content.push(`.monaco-tree.monaco-tree-instance-${this.instance}.focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { color: ${styles.listFocusForeground}; }`); + } - // Indicate selection/focus via background color - if (!styles.listFocusOutline) { - this.styleElement.innerHTML = ` - .monaco-tree.monaco-tree-instance-${this.instance}.focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { background-color: ${styles.listFocusBackground}; } - .monaco-tree.monaco-tree-instance-${this.instance}.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: ${styles.listActiveSelectionBackground}; color: ${styles.listActiveSelectionForeground}; } - .monaco-tree.monaco-tree-instance-${this.instance}.focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { background-color: ${styles.listFocusAndSelectionBackground}; color: ${styles.listFocusAndSelectionForeground}; } - .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: ${styles.listInactiveSelectionBackground}; } - .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { background-color: ${styles.listHoverBackground}; } + if (styles.listActiveSelectionBackground) { + content.push(`.monaco-tree.monaco-tree-instance-${this.instance}.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: ${styles.listActiveSelectionBackground}; }`); + } + + if (styles.listActiveSelectionForeground) { + content.push(`.monaco-tree.monaco-tree-instance-${this.instance}.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: ${styles.listActiveSelectionForeground}; }`); + } + + if (styles.listFocusAndSelectionBackground) { + content.push(` + .monaco-tree-drag-image, + .monaco-tree.monaco-tree-instance-${this.instance}.focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { background-color: ${styles.listFocusAndSelectionBackground}; } + `); + } + + if (styles.listFocusAndSelectionForeground) { + content.push(` + .monaco-tree-drag-image, + .monaco-tree.monaco-tree-instance-${this.instance}.focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { color: ${styles.listFocusAndSelectionForeground}; } + `); + } + + if (styles.listInactiveSelectionBackground) { + content.push(`.monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: ${styles.listInactiveSelectionBackground}; }`); + } + + if (styles.listInactiveSelectionForeground) { + content.push(`.monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: ${styles.listInactiveSelectionForeground}; }`); + } + + if (styles.listHoverBackground) { + content.push(`.monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { background-color: ${styles.listHoverBackground}; }`); + } + + if (styles.listHoverForeground) { + content.push(`.monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { color: ${styles.listHoverForeground}; }`); + } + + if (styles.listDropBackground) { + content.push(` .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-wrapper.drop-target, - .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row.drop-target { background-color: ${styles.listDropBackground} !important; } - `; + .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row.drop-target { background-color: ${styles.listDropBackground} !important; color: inherit !important; } + `); } - // Indicate selection/focus via outline - else { - this.styleElement.innerHTML = ` - .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row { background: none !important; border: 1px solid transparent; } + if (styles.listFocusOutline) { + content.push(` + .monaco-tree-drag-image { border: 1px solid ${styles.listFocusOutline}; background: #000; } + .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row { border: 1px solid transparent; } .monaco-tree.monaco-tree-instance-${this.instance}.focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { border: 1px dotted ${styles.listFocusOutline}; } .monaco-tree.monaco-tree-instance-${this.instance}.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { border: 1px solid ${styles.listFocusOutline}; } .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { border: 1px solid ${styles.listFocusOutline}; } .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { border: 1px dashed ${styles.listFocusOutline}; } .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-wrapper.drop-target, - .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row.drop-target { background: none !important; border: 1px dashed ${styles.listFocusOutline}; } - `; + .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row.drop-target { border: 1px dashed ${styles.listFocusOutline}; } + `); } + + this.styleElement.innerHTML = content.join('\n'); } protected createViewItem(item: Model.Item): IViewItem { @@ -1588,6 +1631,10 @@ export class TreeView extends HeightMap { } private removeItemFromDOM(item: ViewItem): void { + if (!item) { + return; + } + item.removeFromDOM(); } diff --git a/src/vs/base/parts/tree/test/browser/treeModel.test.ts b/src/vs/base/parts/tree/test/browser/treeModel.test.ts index efb3c25a5b8fb..c9c890127e2cb 100644 --- a/src/vs/base/parts/tree/test/browser/treeModel.test.ts +++ b/src/vs/base/parts/tree/test/browser/treeModel.test.ts @@ -293,42 +293,6 @@ suite('TreeModel', () => { }); }); - test('refreshAll(...) refreshes the elements and descendants', (done) => { - model.setInput(SAMPLE.AB).then(() => { - model.expand(SAMPLE.AB.children[0]); - model.expand(SAMPLE.AB.children[2]); - - counter.listen(model, 'refreshing'); // 3 - counter.listen(model, 'refreshed'); // 3 - counter.listen(model, 'item:refresh'); // 7 - counter.listen(model, 'item:childrenRefreshing'); // 2 - counter.listen(model, 'item:childrenRefreshed'); // 2 - - return model.refreshAll([SAMPLE.AB.children[0], SAMPLE.AB.children[1], SAMPLE.AB.children[2]]); - }).done(() => { - assert.equal(counter.count, 17); - done(); - }); - }); - - test('refreshAll(..., false) refreshes the elements', (done) => { - model.setInput(SAMPLE.AB).then(() => { - model.expand(SAMPLE.AB.children[0]); - model.expand(SAMPLE.AB.children[2]); - - counter.listen(model, 'refreshing'); // 3 - counter.listen(model, 'refreshed'); // 3 - counter.listen(model, 'item:refresh'); // 3 - counter.listen(model, 'item:childrenRefreshing'); // 2 - counter.listen(model, 'item:childrenRefreshed'); // 2 - - return model.refreshAll([SAMPLE.AB.children[0], SAMPLE.AB.children[1], SAMPLE.AB.children[2]], false); - }).done(() => { - assert.equal(counter.count, 13); - done(); - }); - }); - test('depths', (done) => { model.setInput(SAMPLE.AB).then(() => { model.expandAll(['a', 'c']); diff --git a/src/vs/base/test/browser/dom.test.ts b/src/vs/base/test/browser/dom.test.ts index 3669f2eec122a..4b8239985f192 100644 --- a/src/vs/base/test/browser/dom.test.ts +++ b/src/vs/base/test/browser/dom.test.ts @@ -58,7 +58,9 @@ suite('dom', () => { test('removeClass should consider hyphens', function () { let element = document.createElement('div'); - dom.addClass(element, 'foo-bar bar'); + dom.addClass(element, 'foo-bar'); + dom.addClass(element, 'bar'); + assert(dom.hasClass(element, 'foo-bar')); assert(dom.hasClass(element, 'bar')); @@ -179,4 +181,4 @@ suite('dom', () => { assert.equal(div.firstChild.textContent, 'hello'); }); }); -}); \ No newline at end of file +}); diff --git a/src/vs/base/test/browser/htmlContent.test.ts b/src/vs/base/test/browser/htmlContent.test.ts index eaa12a6ba26a4..537777365e4e4 100644 --- a/src/vs/base/test/browser/htmlContent.test.ts +++ b/src/vs/base/test/browser/htmlContent.test.ts @@ -6,123 +6,57 @@ import * as assert from 'assert'; import { marked } from 'vs/base/common/marked/marked'; -import { renderHtml } from 'vs/base/browser/htmlContentRenderer'; +import { renderMarkdown, renderText, renderFormattedText } from 'vs/base/browser/htmlContentRenderer'; suite('HtmlContent', () => { - test('render text', () => { - var result = renderHtml({ - text: 'testing', - isText: true - }); - assert.strictEqual(result.nodeType, document.TEXT_NODE); - }); - - test('cannot render script tag', function () { - var host = document.createElement('div'); - document.body.appendChild(host); - host.appendChild(renderHtml({ - tagName: 'script', - text: 'alert(\'owned -- injected script tag via htmlContent!\')' - })); - assert(true); - document.body.removeChild(host); - }); - - test('render simple element', () => { - var result: HTMLElement = renderHtml({ - text: 'testing' - }); + var result: HTMLElement = renderText('testing'); + assert.strictEqual(result.nodeType, document.ELEMENT_NODE); assert.strictEqual(result.textContent, 'testing'); assert.strictEqual(result.tagName, 'DIV'); }); test('render element with class', () => { - var result: HTMLElement = renderHtml({ - text: 'testing', + var result: HTMLElement = renderText('testing', { className: 'testClass' }); assert.strictEqual(result.nodeType, document.ELEMENT_NODE); assert.strictEqual(result.className, 'testClass'); }); - test('render element with style', () => { - var result: HTMLElement = renderHtml({ - text: 'testing', - style: 'width: 100px;' - }); - assert.strictEqual(result.getAttribute('style'), 'width: 100px;'); - }); - - test('render element with custom style', () => { - var result: HTMLElement = renderHtml({ - text: 'testing', - customStyle: { - 'width': '100px' - } - }); - assert.strictEqual(result.style.width, '100px'); - }); - - test('render element with children', () => { - var result: HTMLElement = renderHtml({ - className: 'parent', - children: [{ - text: 'child' - }] - }); - assert.strictEqual(result.children.length, 1); - assert.strictEqual(result.className, 'parent'); - assert.strictEqual(result.firstChild.textContent, 'child'); - }); - test('simple formatting', () => { - var result: HTMLElement = renderHtml({ - formattedText: '**bold**' - }); + var result: HTMLElement = renderFormattedText('**bold**'); assert.strictEqual(result.children.length, 1); assert.strictEqual(result.firstChild.textContent, 'bold'); assert.strictEqual((result.firstChild).tagName, 'B'); assert.strictEqual(result.innerHTML, 'bold'); - result = renderHtml({ - formattedText: '__italics__' - }); - + result = renderFormattedText('__italics__'); assert.strictEqual(result.innerHTML, 'italics'); - result = renderHtml({ - formattedText: 'this string has **bold** and __italics__' - }); - + result = renderFormattedText('this string has **bold** and __italics__'); assert.strictEqual(result.innerHTML, 'this string has bold and italics'); }); test('no formatting', () => { - var result: HTMLElement = renderHtml({ - formattedText: 'this is just a string' - }); + var result: HTMLElement = renderFormattedText('this is just a string'); assert.strictEqual(result.innerHTML, 'this is just a string'); }); test('preserve newlines', () => { - var result: HTMLElement = renderHtml({ - formattedText: 'line one\nline two' - }); + var result: HTMLElement = renderFormattedText('line one\nline two'); assert.strictEqual(result.innerHTML, 'line one
line two'); }); test('action', () => { var callbackCalled = false; - var result: HTMLElement = renderHtml({ - formattedText: '[[action]]' - }, { - actionCallback(content) { - assert.strictEqual(content, '0'); - callbackCalled = true; - } - }); + var result: HTMLElement = renderFormattedText('[[action]]', { + actionCallback(content) { + assert.strictEqual(content, '0'); + callbackCalled = true; + } + }); assert.strictEqual(result.innerHTML, 'action'); var event: MouseEvent = document.createEvent('MouseEvent'); @@ -133,14 +67,12 @@ suite('HtmlContent', () => { test('fancy action', () => { var callbackCalled = false; - var result: HTMLElement = renderHtml({ - formattedText: '__**[[action]]**__' - }, { - actionCallback(content) { - assert.strictEqual(content, '0'); - callbackCalled = true; - } - }); + var result: HTMLElement = renderFormattedText('__**[[action]]**__', { + actionCallback(content) { + assert.strictEqual(content, '0'); + callbackCalled = true; + } + }); assert.strictEqual(result.innerHTML, 'action'); var event: MouseEvent = document.createEvent('MouseEvent'); @@ -150,52 +82,40 @@ suite('HtmlContent', () => { }); test('escaped formatting', () => { - var result: HTMLElement = renderHtml({ - formattedText: '\\*\\*bold\\*\\*' - }); + var result: HTMLElement = renderFormattedText('\\*\\*bold\\*\\*'); assert.strictEqual(result.children.length, 0); assert.strictEqual(result.innerHTML, '**bold**'); }); test('image rendering conforms to default', () => { - const renderableContent = { - markdown: `![image](someimageurl 'caption')` - }; - const result: HTMLElement = renderHtml(renderableContent); + const markdown = `![image](someimageurl 'caption')`; + const result: HTMLElement = renderMarkdown(markdown); const renderer = new marked.Renderer(); - const imageFromMarked = marked(renderableContent.markdown, { + const imageFromMarked = marked(markdown, { sanitize: true, renderer }).trim(); assert.strictEqual(result.innerHTML, imageFromMarked); }); test('image rendering conforms to default without title', () => { - const renderableContent = { - markdown: `![image](someimageurl)` - }; - const result: HTMLElement = renderHtml(renderableContent); + const markdown = `![image](someimageurl)`; + const result: HTMLElement = renderMarkdown(markdown); const renderer = new marked.Renderer(); - const imageFromMarked = marked(renderableContent.markdown, { + const imageFromMarked = marked(markdown, { sanitize: true, renderer }).trim(); assert.strictEqual(result.innerHTML, imageFromMarked); }); test('image width from title params', () => { - var result: HTMLElement = renderHtml({ - markdown: `![image](someimageurl|width=100 'caption')` - }); + var result: HTMLElement = renderMarkdown(`![image](someimageurl|width=100 'caption')`); assert.strictEqual(result.innerHTML, `

image

`); }); test('image height from title params', () => { - var result: HTMLElement = renderHtml({ - markdown: `![image](someimageurl|height=100 'caption')` - }); + var result: HTMLElement = renderMarkdown(`![image](someimageurl|height=100 'caption')`); assert.strictEqual(result.innerHTML, `

image

`); }); test('image width and height from title params', () => { - var result: HTMLElement = renderHtml({ - markdown: `![image](someimageurl|height=200,width=100 'caption')` - }); + var result: HTMLElement = renderMarkdown(`![image](someimageurl|height=200,width=100 'caption')`); assert.strictEqual(result.innerHTML, `

image

`); }); }); \ No newline at end of file diff --git a/src/vs/base/browser/ui/list/test/rangeMap.test.ts b/src/vs/base/test/browser/ui/list/rangeMap.test.ts similarity index 99% rename from src/vs/base/browser/ui/list/test/rangeMap.test.ts rename to src/vs/base/test/browser/ui/list/rangeMap.test.ts index 0ad8b350bef51..e5121fd51066c 100644 --- a/src/vs/base/browser/ui/list/test/rangeMap.test.ts +++ b/src/vs/base/test/browser/ui/list/rangeMap.test.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import assert = require('assert'); -import { RangeMap, intersect, groupIntersect, consolidate } from '../rangeMap'; +import { RangeMap, intersect, groupIntersect, consolidate } from 'vs/base/browser/ui/list/rangeMap'; suite('RangeMap', () => { var rangeMap: RangeMap; diff --git a/src/vs/base/test/browser/ui/scrollbar/scrollbarState.test.ts b/src/vs/base/test/browser/ui/scrollbar/scrollbarState.test.ts new file mode 100644 index 0000000000000..794f2b3155a65 --- /dev/null +++ b/src/vs/base/test/browser/ui/scrollbar/scrollbarState.test.ts @@ -0,0 +1,66 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import * as assert from 'assert'; +import { ScrollbarState } from 'vs/base/browser/ui/scrollbar/scrollbarState'; + +suite('ScrollbarState', () => { + test('inflates slider size', () => { + let actual = new ScrollbarState(0, 14, 0); + actual.setVisibleSize(339); + actual.setScrollSize(42423); + actual.setScrollPosition(32787); + + assert.equal(actual.getArrowSize(), 0); + assert.equal(actual.getScrollPosition(), 32787); + assert.equal(actual.getRectangleLargeSize(), 339); + assert.equal(actual.getRectangleSmallSize(), 14); + assert.equal(actual.isNeeded(), true); + assert.equal(actual.getSliderSize(), 20); + assert.equal(actual.getSliderPosition(), 249); + assert.equal(actual.getSliderCenter(), 259); + + + assert.equal(actual.getDesiredScrollPositionFromOffset(259), 32849); + actual.setScrollPosition(32849); + assert.equal(actual.getArrowSize(), 0); + assert.equal(actual.getScrollPosition(), 32849); + assert.equal(actual.getRectangleLargeSize(), 339); + assert.equal(actual.getRectangleSmallSize(), 14); + assert.equal(actual.isNeeded(), true); + assert.equal(actual.getSliderSize(), 20); + assert.equal(actual.getSliderPosition(), 249); + assert.equal(actual.getSliderCenter(), 259); + }); + + test('inflates slider size with arrows', () => { + let actual = new ScrollbarState(12, 14, 0); + actual.setVisibleSize(339); + actual.setScrollSize(42423); + actual.setScrollPosition(32787); + + assert.equal(actual.getArrowSize(), 12); + assert.equal(actual.getScrollPosition(), 32787); + assert.equal(actual.getRectangleLargeSize(), 339); + assert.equal(actual.getRectangleSmallSize(), 14); + assert.equal(actual.isNeeded(), true); + assert.equal(actual.getSliderSize(), 20); + assert.equal(actual.getSliderPosition(), 230); + assert.equal(actual.getSliderCenter(), 240); + + + assert.equal(actual.getDesiredScrollPositionFromOffset(240 + 12), 32811); + actual.setScrollPosition(32811); + assert.equal(actual.getArrowSize(), 12); + assert.equal(actual.getScrollPosition(), 32811); + assert.equal(actual.getRectangleLargeSize(), 339); + assert.equal(actual.getRectangleSmallSize(), 14); + assert.equal(actual.isNeeded(), true); + assert.equal(actual.getSliderSize(), 20); + assert.equal(actual.getSliderPosition(), 230); + assert.equal(actual.getSliderCenter(), 240); + }); +}); diff --git a/src/vs/base/test/common/arrays.test.ts b/src/vs/base/test/common/arrays.test.ts index 95b7108f98842..4d1e67c20fc5f 100644 --- a/src/vs/base/test/common/arrays.test.ts +++ b/src/vs/base/test/common/arrays.test.ts @@ -33,6 +33,67 @@ suite('Arrays', () => { assert.equal(array[idx], 1); }); + test('stableSort', function () { + let counter = 0; + let data = arrays.fill(10000, () => ({ n: 1, m: counter++ })); + + arrays.mergeSort(data, (a, b) => a.n - b.n); + + let lastM = -1; + for (const element of data) { + assert.ok(lastM < element.m); + lastM = element.m; + } + }); + + test('mergeSort', function () { + let data = arrays.mergeSort([6, 5, 3, 1, 8, 7, 2, 4], (a, b) => a - b); + assert.deepEqual(data, [1, 2, 3, 4, 5, 6, 7, 8]); + }); + + test('mergeSort, is stable', function () { + + let numbers = arrays.mergeSort([33, 22, 11, 4, 99, 1], (a, b) => 0); + assert.deepEqual(numbers, [33, 22, 11, 4, 99, 1]); + }); + + test('mergeSort, many random numbers', function () { + + function compare(a: number, b: number) { + if (a < b) { + return -1; + } else if (a > b) { + return 1; + } else { + return 0; + } + } + + function assertSorted(array: number[]) { + let last = array[0]; + for (let i = 1; i < array.length; i++) { + let n = array[i]; + if (last > n) { + assert.fail(array.slice(i - 10, i + 10)); + } + } + } + const MAX = 101; + const data: number[][] = []; + for (let i = 1; i < MAX; i++) { + let array: number[] = []; + for (let j = 0; j < 10 + i; j++) { + array.push(Math.random() * 10e8 | 0); + } + data.push(array); + } + + for (const array of data) { + arrays.mergeSort(array, compare); + assertSorted(array); + } + }); + test('delta', function () { function compare(a: number, b: number): number { return a - b; diff --git a/src/vs/base/test/common/async.test.ts b/src/vs/base/test/common/async.test.ts index 42075ea137fb3..4c181ef74ba13 100644 --- a/src/vs/base/test/common/async.test.ts +++ b/src/vs/base/test/common/async.test.ts @@ -495,7 +495,7 @@ suite('Async', () => { let f1 = () => TPromise.as(true).then(() => res.push(1)); let f2 = () => TPromise.timeout(10).then(() => res.push(2)); - let f3 = () => TPromise.as(true).then(() => TPromise.wrapError('error')); + let f3 = () => TPromise.as(true).then(() => TPromise.wrapError(new Error('error'))); let f4 = () => TPromise.timeout(20).then(() => res.push(4)); let f5 = () => TPromise.timeout(0).then(() => res.push(5)); diff --git a/src/vs/base/test/common/cache.test.ts b/src/vs/base/test/common/cache.test.ts index 8a8f1515db2d0..521c59b337563 100644 --- a/src/vs/base/test/common/cache.test.ts +++ b/src/vs/base/test/common/cache.test.ts @@ -23,12 +23,12 @@ suite('Cache', () => { test('simple error', () => { let counter = 0; - const cache = new Cache(() => TPromise.wrapError(counter++)); + const cache = new Cache(() => TPromise.wrapError(new Error(String(counter++)))); return cache.get() - .then(() => assert.fail(), err => assert.equal(err, 0)) + .then(() => assert.fail(), err => assert.equal(err.message, 0)) .then(() => cache.get()) - .then(() => assert.fail(), err => assert.equal(err, 0)); + .then(() => assert.fail(), err => assert.equal(err.message, 0)); }); test('should retry cancellations', () => { diff --git a/src/vs/base/test/common/diff/diff.test.ts b/src/vs/base/test/common/diff/diff.test.ts index a1eb6010406d1..b5467da27fc1f 100644 --- a/src/vs/base/test/common/diff/diff.test.ts +++ b/src/vs/base/test/common/diff/diff.test.ts @@ -19,7 +19,7 @@ class StringDiffSequence { return this.source.length; } - getElementHash(i) { + getElementHash(i: number) { return this.source.charAt(i); } } @@ -96,7 +96,7 @@ function lcsTest(Algorithm: any, originalStr: string, modifiedStr: string, answe } } -function lcsTests(Algorithm) { +function lcsTests(Algorithm: any) { lcsTest(Algorithm, 'heLLo world', 'hello orlando', 'heo orld'); lcsTest(Algorithm, 'abcde', 'acd', 'acd'); // simple lcsTest(Algorithm, 'abcdbce', 'bcede', 'bcde'); // skip diff --git a/src/vs/base/test/common/filters.perf.data.d.ts b/src/vs/base/test/common/filters.perf.data.d.ts new file mode 100644 index 0000000000000..b2ef6866955d8 --- /dev/null +++ b/src/vs/base/test/common/filters.perf.data.d.ts @@ -0,0 +1,5 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +export const data: string[]; \ No newline at end of file diff --git a/src/vs/base/test/common/filters.perf.data.js b/src/vs/base/test/common/filters.perf.data.js new file mode 100644 index 0000000000000..84f0e39df2560 --- /dev/null +++ b/src/vs/base/test/common/filters.perf.data.js @@ -0,0 +1,7 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +define(function() { return { data: +["AI_ClearCaptureImportanceBonus","AI_ClearImportance","AI_CreateObjective","AI_DebugAttackEncounterPositionScoringEnable","AI_DebugAttackEncounterPositionScoringIsEnabled","AI_DebugLuaEnable","AI_DebugLuaIsEnabled","AI_DebugRatingEnable","AI_DebugRatingIsEnabled","AI_DebugRenderAllTaskChildrenEnable","AI_DebugRenderAllTaskChildrenIsEnabled","AI_DebugSkirmishCaptureEnable","AI_DebugSkirmishCaptureIsEnabled","AI_DebugSkirmishCombatTargetEnable","AI_DebugSkirmishCombatTargetIsEnabled","AI_DebugSkirmishObjectiveEnable","AI_DebugSkirmishObjectiveIsEnabled","AI_DisableAllEconomyOverrides","AI_Enable","AI_EnableAll","AI_EnableEconomyOverride","AI_GetDifficulty","AI_GetPersonality","AI_GetPersonalityLuaFileName","AI_IsAIPlayer","AI_IsEnabled","AI_LockEntity","AI_LockSquad","AI_LockSquads","AI_RestoreDefaultPersonalitySettings","AI_SetCaptureImportanceBonus","AI_SetDifficulty","AI_SetImportance","AI_SetPersonality","AI_UnlockAll","AI_UnlockEntity","AI_UnlockSquad","AI_UnlockSquads","AI_UpdateStatics","AIAbilityObjective_AbilityGuidance_SetAbilityPBG","AIObjective_Cancel","AIObjective_CombatGuidance_EnableCombatGarrison","AIObjective_CombatGuidance_EnableRetaliateAttacks","AIObjective_CombatGuidance_SetRetaliateAttackTargetAreaRadius","AIObjective_DefenseGuidance_AddFacingPosition","AIObjective_DefenseGuidance_EnableIdleGarrison","AIObjective_DefenseGuidance_ResetFacingPositions","AIObjective_EngagementGuidance_EnableAggressiveEngagementMove","AIObjective_EngagementGuidance_SetAllowReturnToPreviousStages","AIObjective_EngagementGuidance_SetCoordinatedSetup","AIObjective_EngagementGuidance_SetMaxEngagementTime","AIObjective_EngagementGuidance_SetMaxIdleTime","AIObjective_FallbackGuidance_EnableRetreatOnPinned","AIObjective_FallbackGuidance_EnableRetreatOnSuppression","AIObjective_FallbackGuidance_SetEntitiesRemainingThreshold","AIObjective_FallbackGuidance_SetFallbackCapacityPercentage","AIObjective_FallbackGuidance_SetFallbackCombatRatingPercentage","AIObjective_FallbackGuidance_SetFallbackSquadHealthPercentage","AIObjective_FallbackGuidance_SetFallbackVehicleHealthPercentage","AIObjective_FallbackGuidance_SetGlobalFallbackPercentage","AIObjective_FallbackGuidance_SetGlobalFallbackRetreat","AIObjective_FallbackGuidance_SetRetreatCapacityPercentage","AIObjective_FallbackGuidance_SetRetreatCombatRatingPercentage","AIObjective_FallbackGuidance_SetRetreatHealthPercentage","AIObjective_FallbackGuidance_SetTargetPosition","AIObjective_IsValid","AIObjective_MoveGuidance_EnableAggressiveMove","AIObjective_MoveGuidance_ResetPathingLengthFactor","AIObjective_MoveGuidance_ResetSafePathingWeight","AIObjective_MoveGuidance_SetPathingLengthFactor","AIObjective_MoveGuidance_SetSafePathingWeight","AIObjective_MoveGuidance_SetSquadCoherenceRadius","AIObjective_Notify_ClearCallbacks","AIObjective_Notify_SetPlayerEventObjectiveID","AIObjective_ResourceGuidance_ClearSquads","AIObjective_ResourceGuidance_SquadGroup","AIObjective_SetName","AIObjective_TacticFilter_DisableAbility","AIObjective_TacticFilter_DisableAbilityForSquadGroup","AIObjective_TacticFilter_EnableCloseGround","AIObjective_TacticFilter_Reset","AIObjective_TacticFilter_ResetAbilityGuidance","AIObjective_TacticFilter_ResetPriority","AIObjective_TacticFilter_ResetTacticGuidance","AIObjective_TacticFilter_ResetTargetGuidance","AIObjective_TacticFilter_SetAbilityGuidance","AIObjective_TacticFilter_SetDefaultAbilityGuidance","AIObjective_TacticFilter_SetDefaultTacticGuidance","AIObjective_TacticFilter_SetDefaultTargetGuidance","AIObjective_TacticFilter_SetPriority","AIObjective_TacticFilter_SetPriorityForSquadGroup","AIObjective_TacticFilter_SetTacticGuidance","AIObjective_TacticFilter_SetTargetPolicy","AIObjective_TargetGuidance_SetTargetArea","AIObjective_TargetGuidance_SetTargetEntity","AIObjective_TargetGuidance_SetTargetLeash","AIObjective_TargetGuidance_SetTargetPathByName","AIObjective_TargetGuidance_SetTargetPathWander","AIObjective_TargetGuidance_SetTargetPosition","AIObjective_TargetGuidance_SetTargetSquad","BeginnerHint_AddOpportunity","BeginnerHint_RemoveAllOpportunities","BeginnerHint_RemoveOpportunity","BP_GetAbilityBlueprint","BP_GetCamouflageStanceBlueprint","BP_GetCriticalBlueprint","BP_GetEntityBlueprint","BP_GetID","BP_GetMoveTypeBlueprint","BP_GetName","BP_GetPropertyBagGroupCount","BP_GetPropertyBagGroupPathName","BP_GetSlotItemBlueprint","BP_GetSquadBlueprint","BP_GetUpgradeBlueprint","BP_GetWeaponBlueprint","EBP_Exists","SBP_Exists","Camera_CyclePositions","Camera_Follow","Camera_MoveTo","Camera_MoveToIfClose","Camera_SetDefault","Cmd_AbandonTeamWeapon","Cmd_Ability","Cmd_AttachSquads","Cmd_Attack","Cmd_AttackMove","Cmd_AttackMoveThenCapture","Cmd_CaptureTeamWeapon","Cmd_Construct","Cmd_CriticalHit","Cmd_DetonateDemolitions","Cmd_EjectOccupants","Cmd_Garrison","Cmd_InstantReinforceUnit","Cmd_InstantReinforceUnitPos","Cmd_InstantSetupTeamWeapon","Cmd_InstantUpgrade","Cmd_Move","Cmd_MoveAwayFromPos","Cmd_MoveToAndDespawn","Cmd_MoveToClosestMarker","Cmd_MoveToThenCapture","Cmd_RecrewVehicle","Cmd_ReinforceUnit","Cmd_ReinforceUnitPos","Cmd_Retreat","Cmd_RevertOccupiedBuilding","Cmd_SetDemolitions","Cmd_SquadCamouflageStance","Cmd_SquadPath","Cmd_SquadPatrolMarker","Cmd_StaggeredRetreat","Cmd_Stop","Cmd_Surrender","Cmd_UngarrisonSquad","Cmd_Upgrade","Command_Entity","Command_EntityAbility","Command_EntityBuildSquad","Command_EntityEntity","Command_EntityExt","Command_EntityPos","Command_EntityPosAbility","Command_EntityPosDirAbility","Command_EntityPosSquad","Command_EntitySquad","Command_EntityTargetEntityAbility","Command_EntityTargetSquadAbility","Command_EntityUpgrade","Command_Player","Command_PlayerAbility","Command_PlayerEntity","Command_PlayerEntityCriticalHit","Command_PlayerExt","Command_PlayerPos","Command_PlayerPosAbility","Command_PlayerPosDirAbility","Command_PlayerPosExt","Command_PlayerSquadConstructBuilding","Command_PlayerSquadConstructFence","Command_PlayerSquadConstructField","Command_PlayerSquadCriticalHit","Command_PlayerUpgrade","Command_Squad","Command_SquadAbility","Command_SquadAttackMovePos","Command_SquadDoCustomPlan","Command_SquadDoCustomPlanTarget","Command_SquadEntity","Command_SquadEntityAbility","Command_SquadEntityAttack","Command_SquadEntityBool","Command_SquadEntityExt","Command_SquadEntityLoad","Command_SquadExt","Command_SquadMovePos","Command_SquadMovePosFacing","Command_SquadPos","Command_SquadPosAbility","Command_SquadPosExt","Command_SquadPositionAttack","Command_SquadSquad","Command_SquadSquadAbility","Command_SquadSquadAttack","Command_SquadSquadExt","Command_SquadSquadLoad","Command_SquadUpgrade","AutoCinematic","AutoReinforce_AddSGroup","AutoReinforce_RemoveAll","AutoReinforce_RemoveSGroup","AutoRetreat_AddSGroup","AutoRetreat_RemoveAll","AutoRetreat_RemoveSGroup","BridgeTerritory_Add","Ceasefire_AddSGroup","Ceasefire_RemoveSGroup","FireTargettingArtillery","Game_DefaultGameRestore","Game_GetGameRestoreCallbackExists","Game_RemoveGameRestoreCallback","Game_SetGameRestoreCallback","Resources_Disable","Resources_Enable","ShootTheSky_AddSyncWeapon","ShootTheSky_RemoveAll","ShootTheSky_RemoveSyncWeapon","SmokeEntrance_Do","Table_Contains","Table_Copy","Table_GetRandomItem","TeamWeapon_AddGroup","TeamWeapon_RemoveDirections","TeamWeapon_RemoveGroup","EGroup_Add","EGroup_AddEGroup","EGroup_CanSeeEGroup","EGroup_CanSeeSGroup","EGroup_Clear","EGroup_Compare","EGroup_ContainsBlueprints","EGroup_ContainsEGroup","EGroup_ContainsEntity","EGroup_Count","EGroup_CountAlive","EGroup_CountDeSpawned","EGroup_CountSpawned","EGroup_Create","EGroup_CreateIfNotFound","EGroup_CreateKickerMessage","EGroup_DeSpawn","EGroup_Destroy","EGroup_DestroyAllEntities","EGroup_Duplicate","EGroup_EnableMinimapIndicator","EGroup_EnableUIDecorator","EGroup_Exists","EGroup_Filter","EGroup_FilterUnderConstruction","EGroup_ForEach","EGroup_ForEachAllOrAny","EGroup_ForEachAllOrAnyEx","EGroup_ForEachEx","EGroup_FromName","EGroup_GetAvgHealth","EGroup_GetDeSpawnedEntityAt","EGroup_GetInvulnerable","EGroup_GetLastAttacker","EGroup_GetName","EGroup_GetOffsetPosition","EGroup_GetPosition","EGroup_GetRandomSpawnedEntity","EGroup_GetSequence","EGroup_GetSpawnedEntityAt","EGroup_GetSpawnedEntityFilter","EGroup_GetSpread","EGroup_GetSquadsHeld","EGroup_HasUpgrade","EGroup_Hide","EGroup_InstantCaptureStrategicPoint","EGroup_InstantRevertOccupiedBuilding","EGroup_Intersection","EGroup_IsBurning","EGroup_IsCapturedByPlayer","EGroup_IsCapturedByTeam","EGroup_IsDoingAttack","EGroup_IsEmpty","EGroup_IsHoldingAny","EGroup_IsInCover","EGroup_IsMoving","EGroup_IsOnScreen","EGroup_IsProducingSquads","EGroup_IsSpawned","EGroup_IsUnderAttack","EGroup_IsUnderAttackByPlayer","EGroup_IsUnderAttackFromDirection","EGroup_IsUsingAbility","EGroup_Kill","EGroup_NotifyOnPlayerDemolition","EGroup_Remove","EGroup_RemoveDemolitions","EGroup_RemoveGroup","EGroup_RemoveUpgrade","EGroup_ReSpawn","EGroup_SetAnimatorAction","EGroup_SetAnimatorEvent","EGroup_SetAnimatorState","EGroup_SetAnimatorVariable","EGroup_SetAutoTargetting","EGroup_SetAvgHealth","EGroup_SetCrushable","EGroup_SetDemolitions","EGroup_SetHealthMinCap","EGroup_SetInvulnerable","EGroup_SetPlayerOwner","EGroup_SetRallyPoint","EGroup_SetRecrewable","EGroup_SetSelectable","EGroup_SetSharedProductionQueue","EGroup_SetStrategicPointNeutral","EGroup_SetWorldOwned","EGroup_Single","SGroup_HasEntityUpgrade","Ai\\:GetEncountersBySGroup","Ai\\:GetEncountersBySquad","AI_DisableAllEncounters","AI_EnableAllEncounters","AI_GetActiveEncounters","AI_GetNumEncounters","AI_IsMatchingDifficulty","AI_OverrideDifficulty","AI_RemoveAllEncounters","AI_SetDebugLevel","AI_SetStaggeredSpawnDelay","AI_ToggleDebugData","AI_ToggleDebugPrint","AIAbilityGoal_AdjustDefaultGoalData","AIAbilityGoal_SetDefaultGoalData","AIAbilityGoal_SetModifyGoalData","AIAbilityGoal_SetOverrideGoalData","AIAttackGoal_AdjustDefaultGoalData","AIAttackGoal_SetDefaultGoalData","AIAttackGoal_SetModifyGoalData","AIAttackGoal_SetOverrideGoalData","AIBaseGoal_AdjustDefaultGoalData","AIBaseGoal_SetDefaultGoalData","AIBaseGoal_SetModifyGoalData","AIBaseGoal_SetOverrideGoalData","AIDefendGoal_AdjustDefaultGoalData","AIDefendGoal_SetDefaultGoalData","AIDefendGoal_SetModifyGoalData","AIDefendGoal_SetOverrideGoalData","AIMoveGoal_AdjustDefaultGoalData","AIMoveGoal_SetDefaultGoalData","AIMoveGoal_SetModifyGoalData","AIMoveGoal_SetOverrideGoalData","Encounter\\:AddSgroup","Encounter\\:ClearGoal","Encounter\\:ConvertSgroup","Encounter\\:Create","Encounter\\:CreateAbility","Encounter\\:CreateAttack","Encounter\\:CreateBasic","Encounter\\:CreateDefend","Encounter\\:CreateMove","Encounter\\:CreatePatrol","Encounter\\:Disable","Encounter\\:Enable","Encounter\\:GetGoalData","Encounter\\:GetSgroup","Encounter\\:RemoveOnDeath","Encounter\\:RestartGoal","Encounter\\:SetGoal","Encounter\\:SetGoalOnSuccess","Encounter\\:SetOnDeath","Encounter\\:Spawn","Encounter\\:UpdateGoal","MergeClone","Entity_ApplyCritical","Entity_BuildingPanelInfo","Entity_CanAttackNow","Entity_CancelProductionQueueItem","Entity_CanLoadSquad","Entity_CanLoadSquadAndAttackCurrentTarget","Entity_CanSeeEntity","Entity_CanSeeSquad","Entity_ClearPostureSuggestion","Entity_ClearTagDebug","Entity_CompleteUpgrade","Entity_Create","Entity_CreateENV","Entity_DeSpawn","Entity_Destroy","Entity_DisableBuildingDeath","Entity_DoBuildingDamageRay","Entity_EnableAttention","Entity_EnableProductionQueue","Entity_EnableStrategicPoint","Entity_ForceConstruct","Entity_FromWorldID","Entity_GetActiveCommand","Entity_GetBlueprint","Entity_GetBuildingProgress","Entity_GetCoverValue","Entity_GetGameID","Entity_GetHeading","Entity_GetHealth","Entity_GetHealthMax","Entity_GetHealthPercentage","Entity_GetInvulnerable","Entity_GetInvulnerableMinCap","Entity_GetInvulnerableToCritical","Entity_GetLastAttacker","Entity_GetLastAttackers","Entity_GetMaxCaptureCrewSize","Entity_GetOffsetPosition","Entity_GetPlayerOwner","Entity_GetPosition","Entity_GetProductionQueueItem","Entity_GetProductionQueueItemType","Entity_GetProductionQueueSize","Entity_GetResourceType","Entity_GetSightInnerHeight","Entity_GetSightInnerRadius","Entity_GetSightOuterHeight","Entity_GetSightOuterRadius","Entity_GetSquad","Entity_GetSquadsHeld","Entity_GetTotalPanelCount","Entity_GetUndestroyedPanelCount","Entity_GetWeaponBlueprint","Entity_GetWeaponHardpointCount","Entity_HasAnyCritical","Entity_HasCritical","Entity_HasProductionQueue","Entity_HasUpgrade","Entity_InstantCaptureStrategicPoint","Entity_InstantRevertOccupiedBuilding","Entity_IsAlive","Entity_IsAttacking","Entity_IsBuilding","Entity_IsBurning","Entity_IsCamouflaged","Entity_IsCapturableBuilding","Entity_IsCasualty","Entity_IsCuttable","Entity_IsDemolitionReady","Entity_IsEBPBuilding","Entity_IsEBPObjCover","Entity_IsHardpointActive","Entity_IsHoldingAny","Entity_IsInCover","Entity_IsMoving","Entity_IsOfType","Entity_IsPartOfSquad","Entity_IsPlane","Entity_IsSlotItem","Entity_IsSoldier","Entity_IsSpawned","Entity_IsStartingPosition","Entity_IsStrategicPoint","Entity_IsStrategicPointCapturedBy","Entity_IsSyncWeapon","Entity_IsUnderAttack","Entity_IsUnderAttackByPlayer","Entity_IsUnderAttackFromDirection","Entity_IsValid","Entity_IsVaultable","Entity_IsVehicle","Entity_IsVictoryPoint","Entity_Kill","Entity_NotifyOnPlayerDemolition","Entity_RemoveBoobyTraps","Entity_RemoveCritical","Entity_RemoveDemolitions","Entity_RemoveUpgrade","Entity_SetAnimatorAction","Entity_SetAnimatorActionParameter","Entity_SetAnimatorEvent","Entity_SetAnimatorState","Entity_SetAnimatorVariable","Entity_SetBuildingVisualFireState","Entity_SetCrushable","Entity_SetCrushMode","Entity_SetDemolitions","Entity_SetEnableCasualty","Entity_SetHeading","Entity_SetHealth","Entity_SetInvulnerable","Entity_SetInvulnerableMinCap","Entity_SetInvulnerableToCritical","Entity_SetOnFire","Entity_SetPlayerOwner","Entity_SetPosition","Entity_SetProjectileCanExplode","Entity_SetRecrewable","Entity_SetSharedProductionQueue","Entity_SetStrategicPointNeutral","Entity_SetWorldOwned","Entity_SimHide","Entity_Spawn","Entity_StopAbility","Entity_SuggestPosture","Entity_SupportsDemolition","Entity_TagDebug","Entity_VisHide","Misc_DoWeaponHitEffectOnPosition","Misc_GetTerrainHeight","Misc_ToggleEntities","ModMisc_MakeCasualtyAction","ModMisc_MakeWreckAction","ModMisc_OOCAction","UI_EnableEntityDecorator","UI_EnableEntityMinimapIndicator","UI_EnableEntitySelectionVisuals","UI_EnableSquadDecorator","UI_EnableSquadMinimapIndicator","UI_GetAbilityIconName","Event_CreateAND","Event_CreateOR","Event_ElementOnScreen","Event_EncounterIsDead","Event_Exists","Event_GroupBurning","Event_GroupIsDead","Event_GroupIsNotPinned","Event_GroupIsNotSuppressed","Event_GroupIsPinned","Event_GroupIsSuppressed","Event_GroupLeftAlive","Event_IsDoingAttack","Event_IsEngaged","Event_IsHoldingAny","Event_IsInHold","Event_IsSelected","Event_IsUnderAttack","Event_NarrativeEventsNotRunning","Event_NarrativeEventsRunning","Event_OnHealth","Event_PlayerBuildingCount","Event_PlayerCanNotSeeElement","Event_PlayerCanSeeElement","Event_PlayerDoesntOwnTerritory","Event_PlayerOwnsElement","Event_PlayerOwnsTerritory","Event_PlayerResourceLevel","Event_PlayerSquadCount","Event_Proximity","Event_Remove","Event_RemoveAll","Event_TeamBuildingCount","Event_TeamCanNotSeeElement","Event_TeamCanSeeElement","Event_TeamDoesntOwnTerritory","Event_TeamOwnsElement","Event_TeamOwnsTerritory","Event_TeamResourceLevel","Event_TeamSquadCount","Event_Timer","Event_ToggleDebug","Event_View","EventHandler_AssignEncounterGoal","EventHandler_ObjectiveComplete","EventHandler_ObjectiveStart","EventHandler_RemoveHint","EventHandler_RemoveMinimapBlip","EventHandler_RemoveObjectiveUI","EventHandler_Retreat","EventHandler_StaggeredRetreat","EventHandler_StartIntel","EventHandler_StartNislet","EventHandler_StopFlashing","FOW_PlayerExploreAll","FOW_PlayerRevealAll","FOW_PlayerRevealArea","FOW_PlayerUnExploreAll","FOW_PlayerUnRevealAll","FOW_PlayerUnRevealArea","FOW_RevealAll","FOW_RevealArea","FOW_RevealEGroup","FOW_RevealEGroupOnly","FOW_RevealEntity","FOW_RevealMarker","FOW_RevealSGroup","FOW_RevealSGroupOnly","FOW_RevealSquad","FOW_RevealTerritory","FOW_UnRevealAll","FOW_UnRevealArea","FOW_UnRevealMarker","FOW_UnRevealTerritory","EGroup_CreateTable","EGroup_GetWBTable","Marker_GetNonSequentialTable","Marker_GetTable","SGroup_CreateTable","SGroup_GetWBTable","Marker_DoesNumberAttributeExist","Marker_DoesStringAttributeExist","Marker_Exists","Marker_FromName","Marker_GetDirection","Marker_GetName","Marker_GetNumberAttribute","Marker_GetPosition","Marker_GetProximityRadius","Marker_GetProximityType","Marker_GetSequence","Marker_GetStringAttribute","Marker_GetType","Marker_InProximity","Modifier_IsEnabledOnEGroup","Modifier_Remove","Modifier_RemoveAllFromEGroup","Modifier_RemoveAllFromSGroup","Modify_AbilityDelayTime","Modify_AbilityDurationTime","Modify_AbilityManpowerCost","Modify_AbilityMaxCastRange","Modify_AbilityMinCastRange","Modify_AbilityMunitionsCost","Modify_AbilityRechargeTime","Modify_Armor","Modify_CaptureTime","Modify_DisableHold","Modify_Enable_ParadropReinforcements","Modify_EntityBuildTime","Modify_EntityCost","Modify_PlayerExperienceReceived","Modify_PlayerProductionRate","Modify_PlayerResourceCap","Modify_PlayerResourceGift","Modify_PlayerResourceRate","Modify_PlayerSightRadius","Modify_ProductionRate","Modify_ProjectileDelayTime","Modify_ReceivedAccuracy","Modify_ReceivedDamage","Modify_ReceivedSuppression","Modify_SetUpgradeCost","Modify_SightRadius","Modify_SquadAvailability","Modify_SquadCaptureRate","Modify_SquadTypeSightRadius","Modify_TargetPriority","Modify_TeamWeapon","Modify_TerritoryRadius","Modify_UnitSpeed","Modify_UnitVeterancyValue","Modify_UpgradeBuildTime","Modify_Upkeep","Modify_VehicleRepairRate","Modify_VehicleRotationSpeed","Modify_VehicleTurretRotationSpeed","Modify_Vulnerability","Modify_WeaponAccuracy","Modify_WeaponBurstLength","Modify_WeaponBurstRateOfFire","Modify_WeaponCooldown","Modify_WeaponDamage","Modify_WeaponEnabled","Modify_WeaponPenetration","Modify_WeaponRange","Modify_WeaponReload","Modify_WeaponScatter","Modify_WeaponSuppression","MP_BlizzardInit","Objective_AddPing","Objective_AddUIElements","Objective_AreAllPrimaryObjectivesComplete","Objective_Complete","Objective_Fail","Objective_GetCounter","Objective_GetTimerSeconds","Objective_IncreaseCounter","Objective_IsComplete","Objective_IsCounterSet","Objective_IsFailed","Objective_IsStarted","Objective_IsTimerSet","Objective_IsVisible","Objective_PauseTimer","Objective_Register","Objective_RemovePing","Objective_RemoveUIElements","Objective_ResumeTimer","Objective_SetAlwaysShowDetails","Objective_SetCounter","Objective_Show","Objective_Start","Objective_StartTimer","Objective_StopCounter","Objective_StopTimer","Objective_TogglePings","Objective_UpdateText","Cmd_StopSquadsOnly","OpGameSetup","OpNPC_AddSupportGroup","OpNPC_AddSyncWpnGroup","OpNPC_AddTeamWpnGroup","OpNPC_IsGroupActive","OpNPC_Name","OpNPC_RemoveGroup","OpNPC_RetreatGroup","OpNPC_SetGroupActive","OpPlayer_Action","OpUtil_AddModifier","OpUtil_AddResourcesToTeam","OpUtil_AssignSquadSameTypeControlGroup","OpUtil_AssignSquadUnusedControlGroup","OpUtil_ClearPlayZone","OpUtil_EgroupIsCapturedByTeam","OpUtil_EnemyEGroupArrowManager","OpUtil_FindNearestCapturePoint","OpUtil_InvulnerableAdd","OpUtil_InvulnerableRemove","OpUtil_LogSyncWpn","OpUtil_ReturnEnemyNPC","OpUtil_ReturnHumanPlayer","OpUtil_ReturnNPCPlayer","OpUtil_ReturnRace","OpUtil_ReturnTeam","OpUtil_SetPlayZone","OpUtil_TeamOwnsEntity","OpVP_AddPenaltyGroup","OpVP_Name","OpVP_RegisterCaptureablePoints","OpVP_RegisterPointDefense","OpVP_RemoveGroup","UI_PopUpMessage","Util_ProductionRestriction","Util_TutorialIntel","Player_AddAbility","Player_AddAbilityLockoutZone","Player_AddResource","Player_AddSquadsToSGroup","Player_AddUnspentCommandPoints","Player_AreSquadsNearMarker","Player_CanCastAbilityOnEntity","Player_CanCastAbilityOnPlayer","Player_CanCastAbilityOnPosition","Player_CanCastAbilityOnSquad","Player_CanSeeEGroup","Player_CanSeeEntity","Player_CanSeePosition","Player_CanSeeSGroup","Player_CanSeeSquad","Player_ClearArea","Player_ClearAvailabilities","Player_ClearPopCapOverride","Player_CompleteUpgrade","Player_DoParadrop","Player_FindFirstEnemyPlayer","Player_FromId","Player_GetAIType","Player_GetAll","Player_GetAllEntitiesNearMarker","Player_GetAllSquadsNearMarker","Player_GetBuildingID","Player_GetBuildingsCount","Player_GetBuildingsCountExcept","Player_GetBuildingsCountOnly","Player_GetCurrentPopulation","Player_GetDisplayName","Player_GetEntities","Player_GetEntitiesFromType","Player_GetEntityConcentration","Player_GetEntityCount","Player_GetEntityName","Player_GetID","Player_GetMaxPopulation","Player_GetNumStrategicPoints","Player_GetNumVictoryPoints","Player_GetPopulationPercentage","Player_GetRace","Player_GetRaceName","Player_GetRelationship","Player_GetResource","Player_GetResourceRate","Player_GetSquadConcentration","Player_GetSquadCount","Player_GetSquads","Player_GetStartingPosition","Player_GetStrategicPointCaptureProgress","Player_GetTeam","Player_GetUnitCount","Player_GetUpgradeCost","Player_HasAbility","Player_HasBuilding","Player_HasBuildingsExcept","Player_HasBuildingUnderConstruction","Player_HasCapturingSquadNearStrategicPoint","Player_HasLost","Player_HasMapEntryPosition","Player_HasUpgrade","Player_IsAlive","Player_IsAllied","Player_IsHuman","Player_NumUpgradeComplete","Player_OwnsEGroup","Player_OwnsEntity","Player_OwnsSGroup","Player_OwnsSquad","Player_RemoveAbilityLockoutZone","Player_RemoveUpgrade","Player_ResetResource","Player_RestrictAddOnList","Player_RestrictBuildingList","Player_RestrictResearchList","Player_SetAbilityAvailability","Player_SetAllCommandAvailabilityInternal","Player_SetCommandAvailability","Player_SetConstructionMenuAvailability","Player_SetDefaultSquadMoodMode","Player_SetEntityProductionAvailability","Player_SetHeatGainRate","Player_SetHeatLossRate","Player_SetMaxCapPopulation","Player_SetMaxPopulation","Player_SetPopCapOverride","Player_SetResource","Player_SetSquadProductionAvailability","Player_SetUpgradeAvailability","Player_SetUpgradeCost","Player_SpawnGlider","Player_StopAbility","Player_StopEarningActionPoints","Player_Triangulate","Actor_Clear","Actor_PlaySpeech","Actor_PlaySpeechWithoutPortrait","Actor_SetFromSGroup","Actor_SetFromSquad","Prox_AreEntitiesNearMarker","Prox_ArePlayerMembersNearMarker","Prox_ArePlayersNearMarker","Prox_AreSquadMembersNearMarker","Prox_AreSquadsNearMarker","Prox_AreTeamsNearMarker","Prox_EGroupEGroup","Prox_EGroupSGroup","Prox_EntitiesInProximityOfEntities","Prox_GetRandomPosition","Prox_MarkerEGroup","Prox_MarkerSGroup","Prox_PlayerEntitiesInProximityOfEntities","Prox_PlayerEntitiesInProximityOfPlayerSquads","Prox_PlayerEntitiesInProximityOfSquads","Prox_PlayerSquadsInProximityOfEntities","Prox_PlayerSquadsInProximityOfPlayerEntities","Prox_PlayerSquadsInProximityOfPlayerSquads","Prox_PlayerSquadsInProximityOfSquads","Prox_SGroupSGroup","Prox_SquadsInProximityOfEntities","Prox_SquadsInProximityOfSquads","Rule_Add","Rule_AddDelayedInterval","Rule_AddDelayedIntervalEx","Rule_AddEGroupEvent","Rule_AddEntityEvent","Rule_AddGlobalEvent","Rule_AddInterval","Rule_AddIntervalEx","Rule_AddOneShot","Rule_AddPlayerEvent","Rule_AddSGroupEvent","Rule_AddSquadEvent","Rule_ChangeInterval","Rule_Exists","Rule_Remove","Rule_RemoveAll","Rule_RemoveEGroupEvent","Rule_RemoveEntityEvent","Rule_RemoveGlobalEvent","Rule_RemoveIfExist","Rule_RemoveMe","Rule_RemovePlayerEvent","Rule_RemoveSGroupEvent","Rule_RemoveSquadEvent","Setup_Player","Cmd_StopSquadsExcept","Misc_IsEGroupOnScreen","Misc_IsSGroupOnScreen","SGroup_Add","SGroup_AddAbility","SGroup_AddGroup","SGroup_AddGroups","SGroup_AddLeaders","SGroup_AddSlotItemToDropOnDeath","SGroup_CanCastAbilityOnEntity","SGroup_CanCastAbilityOnPosition","SGroup_CanCastAbilityOnSquad","SGroup_CanInstantReinforceNow","SGroup_CanSeeSGroup","SGroup_Clear","SGroup_ClearPostureSuggestion","SGroup_Compare","SGroup_CompleteEntityUpgrade","SGroup_ContainsBlueprints","SGroup_ContainsSGroup","SGroup_ContainsSquad","SGroup_Count","SGroup_CountDeSpawned","SGroup_CountSpawned","SGroup_Create","SGroup_CreateIfNotFound","SGroup_CreateKickerMessage","SGroup_DeSpawn","SGroup_Destroy","SGroup_DestroyAllInMarker","SGroup_DestroyAllSquads","SGroup_DisableCombatPlans","SGroup_Duplicate","SGroup_EnableAttention","SGroup_EnableMinimapIndicator","SGroup_EnableSurprise","SGroup_EnableUIDecorator","SGroup_Exists","SGroup_FaceEachOther","SGroup_FaceMarker","SGroup_Filter","SGroup_FilterCount","SGroup_FilterThreat","SGroup_ForEach","SGroup_ForEachAllOrAny","SGroup_ForEachAllOrAnyEx","SGroup_ForEachEx","SGroup_FromName","SGroup_GetAvgHealth","SGroup_GetAvgLoadout","SGroup_GetDeSpawnedSquadAt","SGroup_GetGarrisonedBuildingEntity","SGroup_GetHoldEGroup","SGroup_GetHoldSGroup","SGroup_GetInvulnerable","SGroup_GetLastAttacker","SGroup_GetLoadedVehicleSquad","SGroup_GetName","SGroup_GetNumSlotItem","SGroup_GetOffsetPosition","SGroup_GetPosition","SGroup_GetRandomSpawnedSquad","SGroup_GetSequence","SGroup_GetSpawnedSquadAt","SGroup_GetSpread","SGroup_GetSquadsHeld","SGroup_GetSuppression","SGroup_GetVeterancyExperience","SGroup_GetVeterancyRank","SGroup_HasCritical","SGroup_HasLeader","SGroup_HasSquadBlueprint","SGroup_HasTeamWeapon","SGroup_HasUpgrade","SGroup_Hide","SGroup_IncreaseVeterancyExperience","SGroup_IncreaseVeterancyRank","SGroup_Intersection","SGroup_IsAlive","SGroup_IsAttackMoving","SGroup_IsCamouflaged","SGroup_IsCapturing","SGroup_IsConstructingBuilding","SGroup_IsDoingAbility","SGroup_IsDoingAttack","SGroup_IsDugIn","SGroup_IsEmpty","SGroup_IsFemale","SGroup_IsHoldingAny","SGroup_IsIdle","SGroup_IsInCover","SGroup_IsInfiltrated","SGroup_IsInHoldEntity","SGroup_IsInHoldSquad","SGroup_IsMoving","SGroup_IsOnScreen","SGroup_IsPinned","SGroup_IsReinforcing","SGroup_IsRetreating","SGroup_IsSettingDemolitions","SGroup_IsSuppressed","SGroup_IsUnderAttack","SGroup_IsUnderAttackByPlayer","SGroup_IsUnderAttackFromDirection","SGroup_IsUpgrading","SGroup_IsUsingAbility","SGroup_Kill","SGroup_Remove","SGroup_RemoveGroup","SGroup_RemoveUpgrade","SGroup_ReSpawn","SGroup_RestoreCombatPlans","SGroup_RewardActionPoints","SGroup_SetAnimatorState","SGroup_SetAutoTargetting","SGroup_SetAvgHealth","SGroup_SetAvgMorale","SGroup_SetCrushable","SGroup_SetInvulnerable","SGroup_SetInvulnerableToCritical","SGroup_SetMoodMode","SGroup_SetMoveType","SGroup_SetPlayerOwner","SGroup_SetRecrewable","SGroup_SetSelectable","SGroup_SetSharedProductionQueue","SGroup_SetSuppression","SGroup_SetTeamWeaponCapturable","SGroup_SetVeterancyDisplayVisibility","SGroup_SetWorldOwned","SGroup_Single","SGroup_SnapFaceEachOther","SGroup_SuggestPosture","SGroup_TotalMembersCount","SGroup_WarpToMarker","SGroup_WarpToPos","Util_Grab","SGroup_FacePosition","SGroup_SnapFacePosition","Squad_AddAbility","Squad_AddSlotItemToDropOnDeath","Squad_CanCaptureStrategicPoint","Squad_CanCaptureTeamWeapon","Squad_CanCastAbilityOnEGroup","Squad_CanCastAbilityOnEntity","Squad_CanCastAbilityOnPosition","Squad_CanCastAbilityOnSGroup","Squad_CanCastAbilityOnSquad","Squad_CancelProductionQueueItem","Squad_CanHold","Squad_CanInstantReinforceNow","Squad_CanLoadSquad","Squad_CanPickupSlotItem","Squad_CanRecrew","Squad_CanSeeEntity","Squad_CanSeeSquad","Squad_ClearPostureSuggestion","Squad_CompleteUpgrade","Squad_Count","Squad_CreateAndSpawnToward","Squad_DeSpawn","Squad_Destroy","Squad_EnableProductionQueue","Squad_EnableSurprise","Squad_EntityAt","Squad_FacePosition","Squad_FaceSquad","Squad_FindCover","Squad_FindCoverCompareCurrent","Squad_FromWorldID","Squad_GetActiveCommand","Squad_GetAttackPlan","Squad_GetAttackTargets","Squad_GetBlueprint","Squad_GetDestination","Squad_GetGameID","Squad_GetHeading","Squad_GetHealth","Squad_GetHealthMax","Squad_GetHealthPercentage","Squad_GetHoldEntity","Squad_GetHoldSquad","Squad_GetInvulnerable","Squad_GetInvulnerableEntityCount","Squad_GetInvulnerableMinCap","Squad_GetLastAttacker","Squad_GetLastAttackers","Squad_GetLastEntityAttacker","Squad_GetMax","Squad_GetNumSlotItem","Squad_GetOffsetPosition","Squad_GetPinnedPlan","Squad_GetPlayerOwner","Squad_GetPosition","Squad_GetPositionDeSpawned","Squad_GetProductionQueueItem","Squad_GetProductionQueueItemType","Squad_GetProductionQueueSize","Squad_GetReactionPlan","Squad_GetRetaliationPlan","Squad_GetSlotItemAt","Squad_GetSlotItemCount","Squad_GetSlotItemsTable","Squad_GetSquadsHeld","Squad_GetSuppression","Squad_GetVeterancyExperience","Squad_GetVeterancyRank","Squad_GiveSlotItem","Squad_GiveSlotItemsFromTable","Squad_HasActiveCommand","Squad_HasAnyCritical","Squad_HasCritical","Squad_HasDestination","Squad_HasProductionQueue","Squad_HasSlotItem","Squad_HasTeamWeapon","Squad_HasUpgrade","Squad_IncreaseVeterancyExperience","Squad_IncreaseVeterancyRank","Squad_InstantSetupTeamWeapon","Squad_IsAttacking","Squad_IsCamouflaged","Squad_IsDoingAbility","Squad_IsFemale","Squad_IsHoldingAny","Squad_IsInCover","Squad_IsInHoldEntity","Squad_IsInHoldSquad","Squad_IsMoving","Squad_IsPinned","Squad_IsReinforcing","Squad_IsRetreating","Squad_IsSuppressed","Squad_IsUnderAttack","Squad_IsUnderAttackByPlayer","Squad_IsUnderAttackFromDirection","Squad_IsUpgrading","Squad_IsUpgradingAny","Squad_IsValid","Squad_Kill","Squad_RemoveAbility","Squad_RemoveUpgrade","Squad_RewardActionPoints","Squad_SetAnimatorState","Squad_SetAttackPlan","Squad_SetHealth","Squad_SetInvulnerable","Squad_SetInvulnerableEntityCount","Squad_SetInvulnerableMinCap","Squad_SetInvulnerableToCritical","Squad_SetMoodMode","Squad_SetMoveType","Squad_SetPinnedPlan","Squad_SetPlayerOwner","Squad_SetPosition","Squad_SetReactionPlan","Squad_SetRecrewable","Squad_SetRetaliationPlan","Squad_SetSharedProductionQueue","Squad_SetSuppression","Squad_SetVeterancyDisplayVisibility","Squad_SetWorldOwned","Squad_Spawn","Squad_SpawnToward","Squad_Split","Squad_StopAbility","Squad_SuggestPosture","Squad_WarpToPos","Stats_BuildingsLost","Stats_InfantryLost","Stats_KillsTotal","Stats_PlayerAt","Stats_PlayerCount","Stats_ResGathered","Stats_ResSpent","Stats_SoldiersKilled","Stats_StructuresKilled","Stats_TeamTally","Stats_TotalDuration","Stats_TotalSquadsLost","Stats_UnitSoldierKills","Stats_UnitStructureKills","Stats_UnitTotalKills","Stats_UnitVehicleKills","Stats_VehiclesKilled","Stats_VehiclesLost","Stinger_AddEvent","Stinger_AddFunction","Stinger_Remove","Team_AddResource","Team_AddSquadsToSGroup","Team_AreSquadsNearMarker","Team_CanSee","Team_ClearArea","Team_DefineAllies","Team_DefineEnemies","Team_FindByRace","Team_ForEachAllOrAny","Team_GetAll","Team_GetAllEntitiesNearMarker","Team_GetAllSquadsNearMarker","Team_GetBuildingID","Team_GetBuildingsCount","Team_GetBuildingsCountExcept","Team_GetBuildingsCountOnly","Team_GetEnemyTeam","Team_GetEntitiesFromType","Team_HasBuilding","Team_HasBuildingsExcept","Team_HasBuildingUnderConstruction","Team_IsAlive","Team_OwnsEGroup","Team_OwnsEntity","Team_OwnsSGroup","Team_OwnsSquad","Team_RestrictAddOnList","Team_RestrictBuildingList","Team_RestrictResearchList","Team_SetAbilityAvailability","Team_SetCommandAvailability","Team_SetConstructionMenuAvailability","Team_SetEntityProductionAvailability","Team_SetMaxCapPopulation","Team_SetMaxPopulation","Team_SetSquadProductionAvailability","Team_SetTechTreeByYear","Team_SetUpgradeAvailability","Team_SetUpgradeCost","ToW_DefenseCreateWave","ToW_SetStandardResources","ToW_SetUpBattleObjectives","ToW_SetUpTechTreeByYear","Timer_Add","Timer_Advance","Timer_Display","Timer_DisplayOnScreen","Timer_End","Timer_Exists","Timer_GetElapsed","Timer_GetMinutesAndSeconds","Timer_GetRemaining","Timer_IsPaused","Timer_Pause","Timer_Resume","Timer_Start","EventCue_Create","FOW_Enable","Game_SubTextFade","HintMouseover_Add","HintMouseover_Remove","HintPoint_Add","HintPoint_Remove","HintPoint_SetDisplayOffset","HintPoint_SetVisible","Misc_IsEGroupSelected","Misc_IsSGroupSelected","ThreatArrow_Add","ThreatArrow_CreateGroup","ThreatArrow_DestroyAllGroups","ThreatArrow_DestroyGroup","ThreatArrow_Remove","UI_AddHintAndFlashAbility","UI_CreateEventCue","UI_CreateMinimapBlip","UI_CreateSGroupKickerMessage","UI_DeleteMinimapBlip","UI_HighlightSGroup","UI_SetAllowLoadAndSave","UI_SetSGroupSpecialLevel","WinWarning_PublishLoseReminder","WinWarning_SetMaxTickers","WinWarning_SetTickers","WinWarning_ShowLoseWarning","Clone","Event_IsAnyRunning","Game_EndSP","Game_FadeToBlack","Import_Once","Loc_FormatText","Sound_PlayOnSquad","Team_GetEntityConcentration","Team_GetSquadConcentration","Util_AddMouseoverSquadToSGroup","Util_ApplyModifier","Util_AutoAmbient","Util_AutoIntel","Util_AutoNISlet","Util_Autosave","Util_ClearWrecksFromMarker","Util_DespawnAll","Util_DifVar","Util_ElementCanSee","Util_EntityLimit","Util_FallBackToGarrisonBuilding","Util_FindHiddenSpawn","Util_ForceRetreatAll","Util_GarrisonNearbyBuilding","Util_GarrisonNearbyVehicle","Util_GetClosestMarker","Util_GetEntitiesByBP","Util_GetHealth","Util_GetMouseoverSGroup","Util_GetPosition","Util_GetPositionAwayFromPlayer","Util_GetPositionFromAtoB","Util_GetRandomPosition","Util_GetSquadsByBP","Util_GetTrailingNumber","Util_HasPosition","Util_HidePlayerForNIS","Util_IsSequenceSkipped","Util_Kill","Util_LogSyncWpn","Util_MarkerFX","Util_MissionTitle","Util_MuteAmbientSound","Util_NewHUDFeatureEvent","Util_PlayMovie","Util_PlayMusic","Util_PrintObject","Util_ReinforceEvent","Util_ReloadScript","Util_RestoreMusic","Util_SetPlayerCanSkipSequence","Util_SetPlayerUnableToSkipSequence","Util_SortPositionsByClosest","Util_StartAmbient","Util_StartIntel","Util_StartNislet","Util_StartQuickIntel","Util_TableContains","Util_ToggleAllowIntelEvents","Util_TriggerEvent","Util_UnitCounts","World_KillAllNeutralEntitesNearMarker","Anim_PlayEntityAnim","bug","Camera_AutoRotate","Camera_ClampToMarker","Camera_FocusOnPosition","Camera_FollowEntity","Camera_FollowSelection","Camera_FollowSquad","Camera_GetCurrentTargetPos","Camera_GetDeclination","Camera_GetOrbit","Camera_GetTargetPos","Camera_GetTuningValue","Camera_GetZoomDist","Camera_IsInputEnabled","Camera_Reload","Camera_ResetFocus","Camera_ResetToDefault","Camera_SetDeclination","Camera_SetInputEnabled","Camera_SetOrbit","Camera_SetSlideTargetRate","Camera_SetTuningValue","Camera_SetZoomDist","Camera_StopAutoRotating","Camera_Unclamp","EGroup_CallEntityFunction","EGroup_CallEntityFunctionAllOrAny","fatal","Game_EnableInput","Game_EndSubTextFade","Game_EndTextTitleFade","Game_GetLocalPlayer","Game_GetMode","Game_GetSPDifficulty","Game_HasLocalPlayer","Game_IsLetterboxed","Game_IsPerformanceTest","Game_IsRTM","Game_Letterbox","Game_LoadAtmosphere","Game_LockRandom","Game_ProfileDumpFrames","Game_QuitApp","Game_ScreenFade","Game_SetLocalPlayer","Game_SetMode","Game_ShowPauseMenu","Game_SkipAllEvents","Game_SkipEvent","Game_StartMuted","Game_TextTitleFade","Game_TriggerLightning","Game_UnlockInputOnLetterBox","Game_UnLockRandom","Ghost_DisableSpotting","Ghost_EnableSpotting","HintPoint_AddToEGroup","HintPoint_AddToEntity","HintPoint_AddToPosition","HintPoint_AddToSGroup","HintPoint_AddToSquad","HintPoint_ClearFacing","HintPoint_RemoveAll","HintPoint_SetDisplayOffsetInternal","HintPoint_SetFacingEntity","HintPoint_SetFacingPosition","HintPoint_SetFacingSquad","HintPoint_SetVisibleInternal","inv_dump","IsOfType","IsSecuringStructure","IsStructure","License_CanPlayRace","LOC","Loc_ConvertNumber","Loc_Empty","Loc_FormatTime","Misc_AbortToFE","Misc_AddRestrictCommandsMarker","Misc_AIControlLocalPlayer","Misc_AreDefaultCommandsEnabled","Misc_DetectKeyboardInput","Misc_DetectMouseInput","Misc_DoWeaponHitEffectOnEntity","Misc_EnablePerformanceTest","Misc_GetCommandLineString","Misc_GetControlGroupContents","Misc_GetEntityControlGroup","Misc_GetHiddenPositionOnPath","Misc_GetMouseOnTerrain","Misc_GetMouseOverEntity","Misc_GetSelectedEntities","Misc_GetSelectedSquads","Misc_GetSquadControlGroup","Misc_IsCommandLineOptionSet","Misc_IsDevMode","Misc_IsEntityOnScreen","Misc_IsEntitySelected","Misc_IsMouseOverEntity","Misc_IsPosOnScreen","Misc_IsSelectionInputEnabled","Misc_IsSquadOnScreen","Misc_IsSquadSelected","Misc_RemoveCommandRestriction","Misc_RestrictCommandsToMarker","Misc_Screenshot","Misc_ScreenshotExt","Misc_SelectEntity","Misc_SelectSquad","Misc_SetDefaultCommandsEnabled","Misc_SetDesignerSplatsVisibility","Misc_SetEntityControlGroup","Misc_SetEntitySelectable","Misc_SetSelectionInputEnabled","Misc_SetSquadControlGroup","Misc_SetSquadSelectable","Mission_Complete","Mission_Fail","Mission_GetSecondaryObjective","Mission_StartBonusObjective","Mission_Win","Modifier_ApplyToEntity","Modifier_ApplyToPlayer","Modifier_ApplyToSquad","Modifier_Create","Modifier_Destroy","Modifier_IsEnabled","nis_setintransitiontime","nis_setouttransitionnis","nis_setouttransitiontime","Obj_Create","Obj_Delete","Obj_DeleteAll","Obj_GetState","Obj_GetVisible","Obj_HideProgress","Obj_SetDescription","Obj_SetIcon","Obj_SetObjectiveFunction","Obj_SetProgressBlinking","Obj_SetState","Obj_SetTitle","Obj_SetVisible","Obj_ShowProgress","Obj_ShowProgress2","Obj_ShowProgressTimer","OpBounty_AddRewardGroup","OpBounty_AddRewardTable","Order227_Init","PrintOnScreen","PrintOnScreen_Add","PrintOnScreen_Remove","PrintOnScreen_RemoveFromScreen","ResourceAmount_Add","ResourceAmount_ClampToZero","ResourceAmount_Has","ResourceAmount_Mult","ResourceAmount_Subtract","ResourceAmount_Sum","ResourceAmount_Zero","Scar_Autosave","Scar_CompleteIntelBulletinTask","Scar_DebugConsoleExecute","Scar_PlayNIS","Scar_PlayNIS2","Scar_ReloadAIScripts","Setup_GetVictoryPointTickerOption","Setup_SetPlayerName","Setup_SetPlayerRace","Setup_SetPlayerTeam","SGroup_CallEntityFunction","SGroup_CallSquadFunction","SGroup_CallSquadFunctionAllOrAny","SitRep_PlayMovie","SitRep_PlaySpeech","SitRep_StopMovie","Sound_ContainerDebug","Sound_DisableSpeechEvent","Sound_IsPlaying","Sound_PerfTest_Play2D","Sound_Play2D","Sound_Play3D","Sound_PlayMusic","Sound_PlayStreamed","Sound_PreCacheSinglePlayerSpeech","Sound_PreCacheSound","Sound_PreCacheSoundFolder","Sound_SetGlobalControlSource","Sound_SetMusicCombatValue","Sound_SetVolume","Sound_SetVolumeDefault","Sound_SetVolumeInv","Sound_StartRecording","Sound_Stop","Sound_StopAll","Sound_StopMusic","Sound_StopRecording","Speech_SetGlobalStealthRead","statgraph","statgraph_channel","statgraph_channel_get_enabled","statgraph_channel_set_enabled","statgraph_clear","statgraph_list","statgraph_pause","Subtitle_EndAllSpeech","Subtitle_EndCurrentSpeech","Subtitle_PlaySpeech","Subtitle_UnstickCurrentSpeech","SyncWeapon_CanAttackNow","SyncWeapon_Exists","SyncWeapon_GetEntity","SyncWeapon_GetFromEGroup","SyncWeapon_GetFromSGroup","SyncWeapon_GetPosition","SyncWeapon_IsAttacking","SyncWeapon_IsOwnedByPlayer","SyncWeapon_SetAutoTargetting","Taskbar_IsVisible","Taskbar_SetVisibility","TaskCountActivePBG","TaskCountPBG","UI_AutosaveMessageHide","UI_AutosaveMessageShow","UI_ClearEventCues","UI_ClearModalAbilityPhaseCallback","UI_ClearNISEndCallback","UI_CoverPreviewHide","UI_CoverPreviewShow","UI_CreateColouredEntityKickerMessage","UI_CreateColouredPositionKickerMessage","UI_CreateColouredSquadKickerMessage","UI_CreateEntityKickerMessage","UI_CreatePositionKickerMessage","UI_CreateSquadKickerMessage","UI_EnableGameEventCueType","UI_EnableResourceTypeKicker","UI_EnableUIEventCueType","UI_FlashAbilityButton","UI_FlashConstructionButton","UI_FlashConstructionMenu","UI_FlashEntity","UI_FlashEntityCommandButton","UI_FlashEventCue","UI_FlashObjectiveCounter","UI_FlashObjectiveIcon","UI_FlashProductionBuildingButton","UI_FlashProductionButton","UI_FlashSquadCommandButton","UI_GetDecoratorsEnabled","UI_HideTacticalMap","UI_HighlightSquad","UI_IsTacticalMapShown","UI_MessageBoxHide","UI_MessageBoxSetButton","UI_MessageBoxSetText","UI_NewHUDFeature","UI_OutOfBoundsLinesHide","UI_OutOfBoundsLinesShow","UI_RestrictBuildingPlacement","UI_ScreenFade","UI_SetAbilityCardVisibility","UI_SetAlliedBandBoxSelection","UI_SetCPMeterVisibility","UI_SetDecoratorsEnabled","UI_SetForceShowSubtitles","UI_SetModalAbilityPhaseCallback","UI_SetNISEndCallback","UI_SetSoviet227Blinking","UI_SetSoviet227Visibility","UI_ShowTacticalMap","UI_StopFlashing","UI_SystemMessageHide","UI_SystemMessageShow","UI_TerritoryHide","UI_TerritoryShow","UI_TitleDestroy","UI_ToggleDecorators","UI_UnrestrictBuildingPlacement","UIWarning_Show","Util_AddProxCheck","Util_ClearProxChecks","Util_CreateEntities","Util_CreateSquads","Util_GetDistance","Util_GetOffsetPosition","Util_GetPlayerOwner","Util_GetRelationship","Util_GetRelativeOffset","Util_MonitorTerritory","Util_RemoveProxCheck","Util_RemoveProxCheckByID","Util_ScarPos","Util_SetPlayerOwner","Util_SpawnDemoCharge","Util_StartNIS","VIS_OccCullToggleOBB","Marker_CleanUpTheDead","Weather_SetType","World_AddPilferLockArea","World_CleanUpTheDead","World_ClearCasualties","World_DamageIce","World_DestroyWallsNearMarker","World_DistanceEGroupToPoint","World_DistancePointToPoint","World_DistanceSGroupToPoint","World_DistanceSquaredPointToPoint","World_EnableReplacementObjectForEmptyPlayers","World_EnableSharedLineOfSight","World_EndSP","World_GetClosest","World_GetCurrentInteractionStage","World_GetEntitiesNearMarker","World_GetEntitiesNearPoint","World_GetEntitiesWithinTerritorySector","World_GetEntity","World_GetFurthest","World_GetGameTime","World_GetHeightAt","World_GetHiddenPositionOnPath","World_GetLength","World_GetNearestInteractablePoint","World_GetNeutralEntitiesNearMarker","World_GetNeutralEntitiesNearPoint","World_GetNeutralEntitiesWithinTerritorySector","World_GetNumEntities","World_GetNumEntitiesNearPoint","World_GetNumStrategicPoints","World_GetNumVictoryPoints","World_GetOffsetPosition","World_GetPlayerAt","World_GetPlayerCount","World_GetPlayerIndex","World_GetPossibleSquadsBlueprint","World_GetPossibleSquadsCount","World_GetRaceIndex","World_GetRand","World_GetSpawnablePosition","World_GetSquadsNearMarker","World_GetSquadsNearPoint","World_GetSquadsWithinTerritorySector","World_GetStrategyPoints","World_GetTeamTerritoryGaps","World_GetTeamVictoryTicker","World_GetTerritorySectorID","World_GetTerritorySectorPosition","World_GetWidth","World_IncreaseInteractionStage","World_IsGameOver","World_IsInSupply","World_IsPointInPlayerTerritory","World_IsTerritorySectorOwnedByPlayer","World_IsWinterMap","World_OwnsEGroup","World_OwnsEntity","World_OwnsSGroup","World_OwnsSquad","World_PointPointProx","World_Pos","World_RemoveAllResourcePoints","World_RemovePilferLockArea","World_SetDesignerSupply","World_SetGameOver","World_SetIceHealingRate","World_SetPlayerCustomSkin","World_SetPlayerLose","World_SetPlayerWin","World_SetSnowHealingRate","World_SetTeamWin","World_SpawnDemolitionCharge","World_TeamTerritoryPointsConnected","Scar_AddInit","scartype","scartype_tostring","import","UI_GetViewportWidth","UI_GetViewportHeight","UI_ButtonAdd","UI_ButtonSetCallback","UI_ButtonSetEnabled","UI_ButtonSetIcon","UI_ButtonSetTag","UI_ButtonSetText","UI_LabelAdd","UI_LabelSetText","UI_IconAdd","UI_IconSetIcon","UI_PanelAdd","UI_StatusIndicatorAdd","UI_StatusIndicatorSetValue","UI_ControlSetColour","UI_ControlSetPosition","UI_ControlSetRect","UI_ControlRemove","UI_ControlClear","BS_NearBase","BS_Defend","BS_Secure","BS_Mines","BS_OuterBase","CPT_VictoryPoint","CPT_MunitionPoint","CPT_NullPoint","CPT_TacticalPoint","CPT_INVALID","CPT_FuelPoint","COMBAT_Default","COMBAT_Defend","COMBAT_Attack","MPT_VictoryPoint","MPT_NullPoint","MPT_NONE","MPT_MunitionPoint","MPT_COUNT","MPT_SupportStructure","MPT_Defence","MPT_Spawner","MPT_HQ","MPT_TacticalPoint","MPT_FuelPoint","MTARGET_Attack","MTARGET_Defend","AI_ProductionQueue","AI_CapturePoint","AI_Squad","AITacticTargetPreference_HighDamage","AITacticTargetPreference_LowHealth","AITacticTargetPreference_None","AITacticTargetPreference_Support","AITacticTargetPreference_Near","AITacticTargetPreference_NearAndBest","AITacticTargetPreference_Best","TACTIC_CapturePoint","TACTIC_Ability","TACTIC_Pickup","TACTIC_ForceAttack","TACTIC_Hold","TACTIC_MinRange","TACTIC_CaptureTeamWeapon","TACTIC_WarmUp","TACTIC_ProvideReinforcementPoint","TACTIC_RushAtTarget","TACTIC_Recrew","TACTIC_Vehicle","TACTIC_Avoid","TACTIC_Cover","TACTIC_FinishHealing","TASK_Leader","TASK_Production","TASK_Ability","TASK_PlayerAbility","TASK_Combat","TASK_Construction","TASK_Capture","TASK_ImmobileCombat","AII_LocalHumanTakeover","AII_RemoteAITakeover","AII_None","AII_RemoteHumanTakeover","AII_Normal","ITEM_REMOVED","ITEM_DEFAULT","ITEM_UNLOCKED","ITEM_LOCKED","BT_AttackHere","BT_SectorArtillery","BT_ObjectivePrimary","BT_Reveal","BT_Combat","BT_General","BT_CaptureHere","BT_DefendHere","BT_ObjectiveSecondary","BT_RallyPoint","BFS_Smoking","BFS_Burning","BFS_NotOnFire","TV_DeclinationEnabled","TV_DistMaxDead","TV_DistRateMouse","TV_NISletDistMin","TV_SlideOrbitRate","TV_PanScaleKeyboardDefZ","TV_PanScaleMouseDefZ","TV_SlideDeclThreshold","TV_PanStartSpeedScalar","TV_EntityMinViewAngle","TV_SlideTargetBase","TV_NearPlaneShifter","TV_DistMin","TV_PanScaleScreenDefZ","TV_NISletDistGroundMin","TV_DeclBelow","TV_SlideTargetThreshold","TV_DeclAbove","TV_DistScale","TV_NISletDistMax","TV_PanMaxSpeedScalar","TV_NISletDeclAbove","TV_NISletDistMinGround","TV_ZoomLocked","TV_CameraMode","TV_DefaultAngle","TV_PanScaleKeyboardMinZ","TV_PanScaleMouseMinZ","TV_DeclBelowClose","TV_TrackElastic","TV_DistExpWheel","TV_DistExpMouse","TV_DistMinGround","TV_DistGroundTargetHeight","TV_ClipFar","TV_DistGroundMin","TV_DistMinDead","TV_DistMax","TV_SlideDeclBase","TV_SlideOrbitThreshold","TV_SlideOrbitBase","TV_SlideDistThreshold","TV_SlideDistBase","TV_SlideTargetRate","TV_ClipNear","TV_PanScaleScreenMinZ","TV_DistRateWheelZoomIn","TV_SlideDistRate","TV_DistRateWheelZoomOut","TV_TrackBoundScale","TV_DefaultDeclination","TV_PanAccelerate","TV_DeclRateMouse","TV_DistExp","TV_DefaultHeight","TV_SlideDeclRate","TV_RotationEnabled","TV_OrbitRateMouse","TV_FieldOfView","TV_NISletDeclBelow","CANPRODUCE_PrerequisitesProducer","CANPRODUCE_Error","CANPRODUCE_ProductionQueueFull","CANPRODUCE_ProductionItemFull","CANPRODUCE_OutOfReinforceRadius","CANPRODUCE_Ok","CANPRODUCE_Disabled","CANPRODUCE_OutOfTerritory","CANPRODUCE_UpgradeItemFull","CANPRODUCE_PopulationCapFull","CANPRODUCE_NoResources","CANPRODUCE_PrerequisitesItem","CANPRODUCE_NoItem","CT_Medic","CT_Vehicle","CT_Personnel","CHECK_BOTH","CHECK_OFFCAMERA","CHECK_IN_FOW","CT_VehicleOpticsDamaged","CT_VehicleExhaustDamaged","CT_VehicleKillCommander","CT_VehicleDriverInjured","CT_VehicleEngineYellow","CT_VehicleBack","CT_VehicleLeft","CT_VehicleRight","CT_VehicleGunnerInjured","CT_VehicleEngineGreen","CT_VehicleCrewShocked","CT_VehicleFront","CT_VehicleEngineBurning","CT_VehicleEngineRed","CT_VehicleSecondaryWeapon","CT_VehicleLoseTreadsOrWheels","CT_VehicleOutOfControl","CT_VehiclePrimaryWeapon","Crush_Heavy","Crush_Off","Crush_Light","Crush_Medium","DB_Button3","DB_Button1","DB_Close","DB_Button2","CMD_InstantBuildSquad","CMD_InstantDeath","CMD_AttackStop","CMD_BuildStructure","CMD_Face","CMD_CancelProduction","CMD_RescueCasualty","CMD_SetHoldHeading","CMD_DefuseMine","CMD_AttackMove","CMD_Fidget","CMD_Stop","CMD_PlaceCharge","CMD_Paradrop","CMD_Destroy","CMD_Load","CMD_Ability","CMD_Move","CMD_InstantUpgrade","CMD_UnloadSquads","CMD_Casualty","CMD_BuildSquad","CMD_Halt","CMD_Attack","CMD_Capture","CMD_AttackForced","CMD_Death","CMD_Unload","CMD_Evacuate","CMD_BuildEntity","CMD_Vault","CMD_AttackFromHold","CMD_RallyPoint","CMD_DefaultAction","CMD_Upgrade","CMD_ChooseResource","CMD_Projectile","STATEID_Capture","STATEID_Idle","STATEID_Evacuate","STATEID_StructureBuilding","STATEID_RepairEngineer","STATEID_Move","STATEID_Dead","STATEID_DefuseMine","GE_ProjectileFired","GE_AIPlayer_Migrated","GE_EntityKilled","GE_TerritoryEntered","GE_ConstructionComplete","GE_NonGlobalCamoDetected","GE_SquadPinned","GE_BuildItemComplete","GE_PlayerKilled","GE_EntityCommandIssued","GE_StrategicPointChanged","GE_PlayerDonation","GE_AbilityExecuted","GE_PlayerDropped","GE_PlayerBeingAttacked","GE_UpgradeComplete","GE_PlayerSkipNIS","GE_AIPlayer_ObjectiveNotification","GE_ResourceDepleted","GE_CustomUIEvent","GE_SquadKilled","GE_PlayerSurrendered","GE_SquadCommandIssued","GE_EntityParadropComplete","GE_PlayerCheat","GE_InfoPointActivated","GE_SpawnActionComplete","GE_PlayerCommandIssued","GE_PlayerHostMigrated","GE_SquadParadropComplete","GE_PlayerPhaseUp","HPAT_Hint","HPAT_MovementLooping","HPAT_Bonus","HPAT_Vaulting","HPAT_Detonation","HPAT_CoverRed","HPAT_CoverYellow","HPAT_Artillery","HPAT_FormationSetup","HPAT_Movement","HPAT_Critical","HPAT_Objective","HPAT_AttackLooping","HPAT_DeepSnow","HPAT_CoverGreen","HPAT_Attack","HPAT_RallyPoint","HUDF_None","HUDF_AbilityCard","HUDF_Upgrades","HUDF_CommandCard","HUDF_MiniMap","LOOP_NORMAL","LOOP_TOGGLE_DIRECTION","LOOP_NONE","MAP_Confirmed","MAP_Placing","MAP_Facing","MAT_Entity","MAT_Player","MAT_Weapon","MAT_Upgrade","MAT_EntityType","MAT_Ability","MAT_Squad","MAT_WeaponType","MAT_SquadType","MUT_Multiplication","MUT_MultiplyAdd","MUT_Addition","MUT_Enable","PBG_Weapon","PBG_MoveType","PBG_SlotItem","PBG_UITacticalMap","PBG_HitMaterial","PBG_PassType","PBG_Race","PBG_UISelection","PBG_Critical","PBG_CamouflageStance","PBG_Material","PBG_Tuning","PBG_Ability","PBG_Upgrade","PBG_Posture","PBG_UITerritory","MM_ForceTense","MM_ForceCalm","MM_Auto","FN_OnShow","FN_OnCounterDisplay","FN_OnActivate","FN_LuaTableQuery","FN_OnSelect","OS_Complete","OS_Incomplete","OS_Off","OS_Failed","OT_Secondary","OT_Primary","OT_Ally","OT_Neutral","OT_Player","OT_Enemy","PCMD_MunitionDonation","PCMD_SlotItemRemove","PCMD_CriticalHit","PCMD_CheatBuildTime","PCMD_Ability","PCMD_SetCommander","PCMD_CheatRevealAll","PCMD_ManpowerDonation","PCMD_UpgradeRemove","PCMD_ConstructField","PCMD_CancelProduction","PCMD_CheatKillSelf","PCMD_Upgrade","PCMD_ConstructFence","PCMD_FuelDonation","PCMD_DetonateCharges","PCMD_CheatResources","PCMD_AIPlayer","PCMD_AIPlayer_ObjectiveNotification","PCMD_ConstructStructure","PCMD_InstantUpgrade","PITEM_SquadUpgrade","PITEM_SquadReinforce","PITEM_Spawn","PITEM_Upgrade","PT_Rectangle","PT_Circle","R_NEUTRAL","R_ENEMY","R_UNDEFINED","R_ALLY","RT_SovietOrder227","RT_Command","RT_SovietProgression","RT_Popcap","RT_Manpower","RT_Munition","RT_Fuel","RT_Action","RUIITEM_Population","RUIITEM_ResourceBar","RUIITEM_Munitions","RUIITEM_Manpower","RUIITEM_Fuel","ST_MARKER","ST_PBG","ST_SCARPOS","ST_AIPLAYER","ST_TABLE","ST_EGROUP","ST_AISTATSMILITARYPOINT","ST_AISQUAD","ST_ENTITY","ST_NUMBER","ST_FUNCTION","ST_SQUAD","ST_PLAYER","ST_BOOLEAN","ST_NIL","ST_CONSTPLAYER","ST_UNKNOWN","ST_SGROUP","ST_STRING","ST_AICAPTUREPOINT","PBG_TurnPlan","PBG_EntityProperties","PBG_SquadFormation","PBG_SquadProperties","PBG_Formation","DEBUG_SELECTOR","DEBUG_COMBATZONES","SCMD_Attack","SCMD_Upgrade","SCMD_StationaryAttack","SCMD_SlotItemRemove","SCMD_Pilfer","SCMD_SetMoveType","SCMD_Ability","SCMD_Move","SCMD_BuildStructure","SCMD_InstantLoad","SCMD_Merge","SCMD_UnloadSquads","SCMD_Retreat","SCMD_DefaultAction","SCMD_RescueCasualty","SCMD_Stop","SCMD_SetCamouflageStance","SCMD_AttackMove","SCMD_RevertFieldSupport","SCMD_CancelProduction","SCMD_Capture","SCMD_Surprise","SCMD_ReinforceUnit","SCMD_CaptureTeamWeapon","SCMD_Patrol","SCMD_Face","SCMD_Recrew","SCMD_DoPlan","SCMD_DefuseCharge","SCMD_PickUpSlotItem","SCMD_BuildSquad","SCMD_InstantReinforceUnit","SCMD_Load","SCMD_InstantSetupTeamWeapon","SCMD_RallyPoint","SCMD_AbandonTeamWeapon","SCMD_Unload","SCMD_DefuseMine","SCMD_Destroy","SCMD_PlaceCharge","SCMD_InstantUpgrade","SQUADSTATEID_Capture","SQUADSTATEID_CaptureTeamWeapon","SQUADSTATEID_Move","SQUADSTATEID_Retreat","SQUADSTATEID_Plan","SQUADSTATEID_AttackMove","SQUADSTATEID_Load","SQUADSTATEID_Defuse","SQUADSTATEID_DefuseMine","SQUADSTATEID_Stop","SQUADSTATEID_Patrol","SQUADSTATEID_Ability","SQUADSTATEID_CombatStance","SQUADSTATEID_RevertFieldSupport","SQUADSTATEID_Unload","SQUADSTATEID_HoldUnload","SQUADSTATEID_PickUpSlotItem","SQUADSTATEID_Construction","SQUADSTATEID_Idle","SQUADSTATEID_WeaponTransition","SQUADSTATEID_Recrew","SQUADSTATEID_PlaceCharges","SQUADSTATEID_Combat","UIE_UpgradeComplete","UIE_PlayerPingOfShameLocal","UIE_EnemyReveal","UIE_InfoPointActivated","UIE_AITakeOver","UIE_VehicleComplete","UIE_AllyAttacked","UIE_CommanderAbilityUnlocked","UIE_CommandersUnlocked","UIE_CommandPointGained","UIE_SquadFreezing","UIE_SquadCold","UIE_CasualtySquadSpawned","UIE_SquadVeterancy","UIE_VehicleReplaced","UIE_InfantryReplaced","UIE_Sniped","UIE_BoobyTrap","UIE_MineDetected","UIE_AbilityExectued","UIE_StrategicPointCaptured","UIE_StrategicPointReverting","UIE_EnemyTerritoryEntered","UIE_TerritoryEntered","UIE_PlayerSurrendered","UIE_PlayerAttacked","UIE_VehicleAttacked","UIE_PlayerKilled","UIE_PlayerKicked","UIE_PlayerLagComplaint","UIE_PlayerPingOfShame","UIE_PlayerDropped","UIE_ConstructionComplete","UIE_StrategicPointSecured","UIE_ResourceDepleted","UIE_SquadPinned","UIE_InfantryAttacked","UIE_InfantryComplete","UIE_PlayerCheated","UIE_PhaseUp","UIE_HostMigrated","UIE_Default","UI_Cinematic","UI_Fullscreen","UI_Normal","UOT_Player","UOT_Self","UOT_None","BIS_Icon","BIS_IconState","LAH_Justify","LAH_Left","LAH_Center","LAH_Right","LAV_None","LAV_Top","LAV_Center","LAV_Bottom","assert","collectgarbage","dofile","error","getmetatable","ipairs","load","loadfile","next","pairs","pcall","print","rawequal","rawget","rawlen","rawset","select","setmetatable","tonumber","tostring","type","xpcall","string.byte","string.char","string.dump","string.find","and","break","do","else","elseif","end","false","for","function","if","in","local","nil","not","or","repeat","return","then","true","until","while","math.huge","math.maxinteger","math.mininteger","math.pi","EBP.WRECKED_VEHICLES.FRONT_HULL01","EBP.WRECKED_VEHICLES.FROZEN_PANZER_IV","EBP.WRECKED_VEHICLES.FROZEN_STUG_III","EBP.WRECKED_VEHICLES.HORSA_COCKPIT","EBP.WRECKED_VEHICLES.HORSA_FRONT_HULL","EBP.WRECKED_VEHICLES.HORSA_LEFT_WING","EBP.WRECKED_VEHICLES.HORSA_LEFT_WING_TIP","EBP.WRECKED_VEHICLES.HORSA_MID_HULL","EBP.WRECKED_VEHICLES.HORSA_REAR_HULL","EBP.WRECKED_VEHICLES.HORSA_RIGHT_WING","EBP.WRECKED_VEHICLES.HORSA_RIGHT_WING_TIP","EBP.WRECKED_VEHICLES.HORSA_TAIL","EBP.WRECKED_VEHICLES.LEFT_WING","EBP.WRECKED_VEHICLES.MAP_OBJECT_M4SHERMAN_105MM","EBP.WRECKED_VEHICLES.MAP_OBJECT_M4SHERMAN_76MM","EBP.WRECKED_VEHICLES.MAP_OBJECT_M4SHERMAN_DOZER","EBP.WRECKED_VEHICLES.MAP_OBJECT_OPELBLITZ","EBP.WRECKED_VEHICLES.MAP_OBJECT_PAK38","EBP.WRECKED_VEHICLES.MAP_OBJECT_PANZERIV","EBP.WRECKED_VEHICLES.MAP_OBJECT_STUGIII_LONG","EBP.WRECKED_VEHICLES.MAP_OBJECT_STUGIII_SHORT","EBP.WRECKED_VEHICLES.PROPELLER","EBP.WRECKED_VEHICLES.RIGHT_WING","EBP.WRECKED_VEHICLES.STUKA_BODY","EBP.WRECKED_VEHICLES.STUKA_DEBRIS","EBP.WRECKED_VEHICLES.STUKA_TAIL","EBP.WRECKED_VEHICLES.STUKA_WING_LEFT","EBP.WRECKED_VEHICLES.STUKA_WING_RIGHT","EBP.WRECKED_VEHICLES.TAIL","EBP.WRECKED_VEHICLES.TAIL_SECTION_01","EBP.WRECKED_VEHICLES.WRECKED_50MM_PAK38_MAP_OBJECT","EBP.WRECKED_VEHICLES.WRECKED_ARMORED_CAR_PUMA_MP","EBP.WRECKED_VEHICLES.WRECKED_ARMORED_CAR_SDKFZ_222","EBP.WRECKED_VEHICLES.WRECKED_ARMORED_CAR_SDKFZ_222_MP","EBP.WRECKED_VEHICLES.WRECKED_ARMORED_CAR_SDKFZ_234","EBP.WRECKED_VEHICLES.WRECKED_ARMORED_CAR_SDKFZ_234_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_ARMORED_CAR_SDKFZ_234_PUMA_MP","EBP.WRECKED_VEHICLES.WRECKED_ATGUN_17_POUNDER","EBP.WRECKED_VEHICLES.WRECKED_ATGUN_45MM","EBP.WRECKED_VEHICLES.WRECKED_ATGUN_75MM_PAK","EBP.WRECKED_VEHICLES.WRECKED_ATGUN_B4_200MM","EBP.WRECKED_VEHICLES.WRECKED_ATGUN_M1_57MM","EBP.WRECKED_VEHICLES.WRECKED_ATGUN_ML20","EBP.WRECKED_VEHICLES.WRECKED_ATGUN_PAK43","EBP.WRECKED_VEHICLES.WRECKED_ATGUN_ZIS3","EBP.WRECKED_VEHICLES.WRECKED_BASE_BUILDING01","EBP.WRECKED_VEHICLES.WRECKED_BASE_BUILDING01_SELF_DESTRUCT","EBP.WRECKED_VEHICLES.WRECKED_BASE_BUILDING02","EBP.WRECKED_VEHICLES.WRECKED_BASE_BUILDING02_SELF_DESTRUCT","EBP.WRECKED_VEHICLES.WRECKED_BASE_BUILDING03","EBP.WRECKED_VEHICLES.WRECKED_BASE_BUILDING03_SELF_DESTRUCT","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_AEC","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_AEC_ARMOURED_CAR_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_ATGUN_6_POUNDER","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_BOFORS","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_CENTAUR","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_CHURCHILL","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_CHURCHILL_AVRE","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_CHURCHILL_AVRE_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_CHURCHILL_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_CHURCHILL_CROCODILE","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_CHURCHILL_CROCODILE_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_COMET","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_COMET_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_CROMWELL","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_CROMWELL_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_GLIDER_HQ_MP","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_GLIDER_MP","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_SEXTON","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_SHERMAN_FIREFLY","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_SHERMAN_FIREFLY_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_UNIVERSAL_CARRIER","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_VALENTINE_COMMAND","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_VALENTINE_COMMAND_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_BRUMMBAR_02","EBP.WRECKED_VEHICLES.WRECKED_BRUMMBAR_STURMPANZER_IV_SDKFZ_166","EBP.WRECKED_VEHICLES.WRECKED_EARLY_WAR_TANK_01","EBP.WRECKED_VEHICLES.WRECKED_ELEFANT_SDKFZ_184","EBP.WRECKED_VEHICLES.WRECKED_FN63_4RM","EBP.WRECKED_VEHICLES.WRECKED_HALFTRACK_SDKFZ_250","EBP.WRECKED_VEHICLES.WRECKED_HALFTRACK_SDKFZ_250_MORTAR","EBP.WRECKED_VEHICLES.WRECKED_HALFTRACK_SDKFZ_251","EBP.WRECKED_VEHICLES.WRECKED_HALFTRACK_SDKFZ_251_17_FLAK","EBP.WRECKED_VEHICLES.WRECKED_HALFTRACK_SDKFZ_251_INFRARED","EBP.WRECKED_VEHICLES.WRECKED_HALFTRACK_SDKFZ_251_MP","EBP.WRECKED_VEHICLES.WRECKED_HALFTRACK_SDKFZ_251_WALKING_STUKA","EBP.WRECKED_VEHICLES.WRECKED_HALFTRACK_SWS","EBP.WRECKED_VEHICLES.WRECKED_HETZER","EBP.WRECKED_VEHICLES.WRECKED_HETZER_BREWUP","EBP.WRECKED_VEHICLES.WRECKED_HOWITZER_105MM_MAP_OBJECT","EBP.WRECKED_VEHICLES.WRECKED_IG18_SUPPORT_GUN","EBP.WRECKED_VEHICLES.WRECKED_IS_2_HEAVY_TANK","EBP.WRECKED_VEHICLES.WRECKED_ISU_152_SPG","EBP.WRECKED_VEHICLES.WRECKED_JAGDPANZER_IV","EBP.WRECKED_VEHICLES.WRECKED_JAGDPANZER_IV_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_JAGDTIGER_TD","EBP.WRECKED_VEHICLES.WRECKED_JAGDTIGER_TD_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_KATYUSHA_BM_13N","EBP.WRECKED_VEHICLES.WRECKED_KATYUSHA_BM_13N_MP","EBP.WRECKED_VEHICLES.WRECKED_KING_TIGER","EBP.WRECKED_VEHICLES.WRECKED_KING_TIGER_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_KUBELWAGEN","EBP.WRECKED_VEHICLES.WRECKED_KV_1","EBP.WRECKED_VEHICLES.WRECKED_KV_1_MP","EBP.WRECKED_VEHICLES.WRECKED_KV_2","EBP.WRECKED_VEHICLES.WRECKED_KV_8","EBP.WRECKED_VEHICLES.WRECKED_LAND_MATTRESS","EBP.WRECKED_VEHICLES.WRECKED_M10","EBP.WRECKED_VEHICLES.WRECKED_M10_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_M15A1_AA_HALFTRACK","EBP.WRECKED_VEHICLES.WRECKED_M15A1_AA_HALFTRACK_MAP_OBJECT","EBP.WRECKED_VEHICLES.WRECKED_M20_UTILITY_CAR","EBP.WRECKED_VEHICLES.WRECKED_M21_MORTAR_HALFTRACK","EBP.WRECKED_VEHICLES.WRECKED_M26_PERSHING","EBP.WRECKED_VEHICLES.WRECKED_M3_HALFTRACK","EBP.WRECKED_VEHICLES.WRECKED_M36","EBP.WRECKED_VEHICLES.WRECKED_M36_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_M3A1_SCOUT_CAR","EBP.WRECKED_VEHICLES.WRECKED_M3A1_SCOUT_CAR_MP","EBP.WRECKED_VEHICLES.WRECKED_M4A3_SHERMAN","EBP.WRECKED_VEHICLES.WRECKED_M4A3_SHERMAN_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_M4A3_SHERMAN_BULLDOZER","EBP.WRECKED_VEHICLES.WRECKED_M4A3_SHERMAN_BULLDOZER_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_M4A3_SHERMAN_EASY_EIGHT","EBP.WRECKED_VEHICLES.WRECKED_M4A3_SHERMAN_EASY_EIGHT_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_M4A3_SHERMAN_MAP_OBJECT","EBP.WRECKED_VEHICLES.WRECKED_M5_HALFTRACK","EBP.WRECKED_VEHICLES.WRECKED_M5_HALFTRACK_MP","EBP.WRECKED_VEHICLES.WRECKED_M5A1_STUART","EBP.WRECKED_VEHICLES.WRECKED_M8_ARMORED_CAR","EBP.WRECKED_VEHICLES.WRECKED_M8_HMC","EBP.WRECKED_VEHICLES.WRECKED_OPEL_BLITZ_TRUCK","EBP.WRECKED_VEHICLES.WRECKED_OSTWIND_FLAK_PANZER","EBP.WRECKED_VEHICLES.WRECKED_PACK_HOWITZER","EBP.WRECKED_VEHICLES.WRECKED_PANTHER_MAP_OBJECT","EBP.WRECKED_VEHICLES.WRECKED_PANTHER_SDKFZ_171","EBP.WRECKED_VEHICLES.WRECKED_PANTHER_SDKFZ_171_BREWUP","EBP.WRECKED_VEHICLES.WRECKED_PANZER_II_LUCHS","EBP.WRECKED_VEHICLES.WRECKED_PANZER_II_LUCHS_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_PANZER_III","EBP.WRECKED_VEHICLES.WRECKED_PANZER_IV_FROZEN","EBP.WRECKED_VEHICLES.WRECKED_PANZER_IV_SDKFZ_161","EBP.WRECKED_VEHICLES.WRECKED_PANZER_IV_SDKFZ_161_COMMAND","EBP.WRECKED_VEHICLES.WRECKED_PANZER_IV_SDKFZ_161_GAMEPLAY","EBP.WRECKED_VEHICLES.WRECKED_PANZER_IV_SDKFZ_161_WEST_GERMAN","EBP.WRECKED_VEHICLES.WRECKED_PANZER_IV_SDKFZ_161_WEST_GERMAN_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_PANZERIV_MAP_OBJECT","EBP.WRECKED_VEHICLES.WRECKED_PANZERWERFER_SDKFZ_4_1","EBP.WRECKED_VEHICLES.WRECKED_PRIEST","EBP.WRECKED_VEHICLES.WRECKED_RAKETENWERFER","EBP.WRECKED_VEHICLES.WRECKED_SOVIET_76MM_SHERMAN","EBP.WRECKED_VEHICLES.WRECKED_STUG_III_E_SDKFZ_141_1","EBP.WRECKED_VEHICLES.WRECKED_STUG_III_FROZEN","EBP.WRECKED_VEHICLES.WRECKED_STUG_III_G_SDKFZ_141_1","EBP.WRECKED_VEHICLES.WRECKED_STUG_III_G_SDKFZ_141_1_GAMEPLAY","EBP.WRECKED_VEHICLES.WRECKED_STURMTIGER","EBP.WRECKED_VEHICLES.WRECKED_SU_76M","EBP.WRECKED_VEHICLES.WRECKED_SU_85","EBP.WRECKED_VEHICLES.WRECKED_T_34_76","EBP.WRECKED_VEHICLES.WRECKED_T_34_76_02","EBP.WRECKED_VEHICLES.WRECKED_T_34_76_MP","EBP.WRECKED_VEHICLES.WRECKED_T_34_85_RED_BANNER","EBP.WRECKED_VEHICLES.WRECKED_T_34_85_RED_BANNER_MP","EBP.WRECKED_VEHICLES.WRECKED_T_34_85_RED_BANNER_TOW","EBP.WRECKED_VEHICLES.WRECKED_T34_CALLIOPE","EBP.WRECKED_VEHICLES.WRECKED_T70","EBP.WRECKED_VEHICLES.WRECKED_T70_MP","EBP.WRECKED_VEHICLES.WRECKED_TIGER_SDKFZ_181","EBP.WRECKED_VEHICLES.WRECKED_TIGER_SDKFZ_181_SINGLEPLAYER_MISSION","EBP.WRECKED_VEHICLES.WRECKED_WC51","EBP.WRECKED_VEHICLES.WRECKED_WC54_AMBULANCE","EBP.AEF.AEF_AIRDROPPED_MINE_CONTACT_MP","EBP.AEF.AEF_AIRDROPPED_MINE_MP","EBP.AEF.AEF_ALLIEDSUPPLY_STACK_L_01_MP","EBP.AEF.AEF_ATTACK_PLANE","EBP.AEF.AEF_BARBED_WIRE_FENCE_MP","EBP.AEF.AEF_BARRACKS","EBP.AEF.AEF_BASE_STAMPER","EBP.AEF.AEF_GARRISON","EBP.AEF.AEF_MG_NEST","EBP.AEF.AEF_MG_NEST_AEF_BASE","EBP.AEF.AEF_MG_NEST_PERIMETER_MP","EBP.AEF.AEF_MINE_MP","EBP.AEF.AEF_MINE_RIFLEMEN_MP","EBP.AEF.AEF_SANDBAG_DIRTWALL_01","EBP.AEF.AEF_SANDBAG_FENCE","EBP.AEF.AEF_SANDBAGS","EBP.AEF.AEF_SANDBAGWALL","EBP.AEF.AEF_SANDBAGWALL_COVER_SPECIALIZATION","EBP.AEF.AEF_STORAGEBUNKER","EBP.AEF.AEF_SUPPLYTENT","EBP.AEF.AEF_TANK_TRAP_IMPASSABLE_MP","EBP.AEF.AEF_TANK_TRAP_MP","EBP.AEF.AEF_WEAPON_RACK_BAZOOKA_MP","EBP.AEF.AEF_WEAPON_RACK_BROWNING_AUTOMATIC_RIFLE_MP","EBP.AEF.AEF_WEAPON_RACK_DEFAULT_MP","EBP.AEF.AEF_WEAPON_RACK_M1919_LMG","EBP.AEF.AEF_WEAPON_RACK_M1C_GARAND","EBP.AEF.AEF_WEAPON_RACK_M9_BAZOOKA_MP","EBP.AEF.AIRBORNE_BEACON_MP","EBP.AEF.ARMOR_COMMAND_MP","EBP.AEF.ARMOR_COMMAND_SP","EBP.AEF.ARMOR_COMMAND_WRECK_MP","EBP.AEF.ARMORED_RIFLE_COMMAND_MP","EBP.AEF.ARMORED_RIFLE_COMMAND_SP","EBP.AEF.ARMORED_RIFLE_COMMAND_WRECK_MP","EBP.AEF.ASSAULT_ENGINEER_MP","EBP.AEF.ASSAULT_ENGINEER_VEHICLE_CREW_MP","EBP.AEF.AT_TEAM_WEAPON_CREW_MP","EBP.AEF.CAPTAIN_MP","EBP.AEF.CAPTAIN_UNLOCK_MP","EBP.AEF.COMPANY_WEAPONS_POOL_MP","EBP.AEF.COMPANY_WEAPONS_POOL_SP","EBP.AEF.COMPANY_WEAPONS_POOL_WRECK_MP","EBP.AEF.DODGE_WC51_50CAL_MP","EBP.AEF.DODGE_WC51_50CAL_PARADROP","EBP.AEF.DODGE_WC51_AMBULANCE_MP","EBP.AEF.DODGE_WC51_MP","EBP.AEF.DODGE_WC51_MP_PATHFINDERS","EBP.AEF.FIGHTING_POSITION_MP","EBP.AEF.FIGHTING_POSITION_RIFLEMEN_MP","EBP.AEF.HMG_TEAM_WEAPON_CREW_MP","EBP.AEF.HOWITZER_TEAM_WEAPON_CREW_MP","EBP.AEF.INVISI_HEAL_STATION_MP","EBP.AEF.INVISI_REPAIR_STATION_MP","EBP.AEF.JACKSON","EBP.AEF.LIEUTENANT_MP","EBP.AEF.LIEUTENANT_UNLOCK_MP","EBP.AEF.M1_57MM_ANTITANK_GUN_MP","EBP.AEF.M1_75MM_PACK_HOWITZER_MP","EBP.AEF.M1_81MM_MORTAR_MP","EBP.AEF.M10_TANK_DESTROYER_MP","EBP.AEF.M15A1_AA_HALFTRACK_MP","EBP.AEF.M1919A4_30CAL_MACHINE_GUN_MP","EBP.AEF.M1919A4_TEAM_WEAPON_CREW_MP","EBP.AEF.M2_60MM_MORTAR_MP","EBP.AEF.M20_M6_AT_MINE_MP","EBP.AEF.M20_UTILITY_CAR_MP","EBP.AEF.M21_MORTAR_HALFTRACK_MP","EBP.AEF.M26_PERSHING_MP","EBP.AEF.M2HB_50CAL_MACHINE_GUN_MP","EBP.AEF.M3_HALFTRACK_ASSAULT_MP","EBP.AEF.M3_HALFTRACK_MP","EBP.AEF.M36_TANK_DESTROYER_MP","EBP.AEF.M4A3_76MM_SHERMAN_MP","EBP.AEF.M4A3_SHERMAN_BULLDOZER_MP","EBP.AEF.M4A3_SHERMAN_DEMO_BURNOUT","EBP.AEF.M4A3_SHERMAN_MP","EBP.AEF.M4A3E8_SHERMAN_EASY_8_MP","EBP.AEF.M5_HALFTRACK_USF_MP","EBP.AEF.M5A1_STUART_MP","EBP.AEF.M7B1_PRIEST_MP","EBP.AEF.M8_GREYHOUND_MP","EBP.AEF.M8A1_HMC_MP","EBP.AEF.MAJOR_MP","EBP.AEF.MAJOR_RETREAT_POINT_MP","EBP.AEF.MAJOR_UNLOCK_MP","EBP.AEF.MORTAR_TEAM_WEAPON_CREW_MP","EBP.AEF.OBSERVATION_POST_FUEL_AEF_MP","EBP.AEF.OBSERVATION_POST_MUNITION_AEF_MP","EBP.AEF.P47_RECON","EBP.AEF.P47_RECON_PLANE_SWEEP","EBP.AEF.P47_RECON_TRACKING","EBP.AEF.P47_ROCKETS","EBP.AEF.P47_STRAFE","EBP.AEF.PARATROOPER_MP","EBP.AEF.PARATROOPERS_COMBAT_GROUP_PLANE","EBP.AEF.PARATROOPERS_PLANE","EBP.AEF.PARATROOPERS_PLANE_ATGUN","EBP.AEF.PARATROOPERS_PLANE_HMG","EBP.AEF.PARATROOPERS_PLANE_MINES","EBP.AEF.PARATROOPERS_PLANE_PARAS","EBP.AEF.PATHFINDER_IR_MP","EBP.AEF.PATHFINDER_RECON_MP","EBP.AEF.PM_AEF_AIR_SUPPORT_RECON","EBP.AEF.PM_AEF_AIR_SUPPORT_ROCKET","EBP.AEF.PM_AEF_AIR_SUPPORT_ROCKET_ELITE","EBP.AEF.PM_AEF_AIR_SUPPORT_STRAFE","EBP.AEF.PM_AEF_AIR_SUPPORT_STRAFE_ELITE","EBP.AEF.PM_AEF_AIRBORNE_PARATROOPERS_PLANE_PARAS","EBP.AEF.PM_AEF_AIRBORNE_PARATROOPERS_PLANE_STRAFE","EBP.AEF.PM_AEF_AIRBORNE_PARATROOPERS_SPAWNER","EBP.AEF.PM_AEF_AIRBORNE_SUPPLY_DROP_PLANE","EBP.AEF.PM_AEF_FIGHTING_POSITION_TEAMWEAPONS","EBP.AEF.PM_AEF_PINPOINT_ARTY_MARKER_MP","EBP.AEF.PM_AEF_PINPOINT_ARTY_THREE_MARKER_MP","EBP.AEF.PM_ARMOR_COMMAND_BAZOOKA_RACK","EBP.AEF.PM_ARMOR_COMMAND_LMG_RACK","EBP.AEF.PM_ATTACHED_MEDIC","EBP.AEF.PM_ATTACHED_SEARGENT","EBP.AEF.PM_P47_FLYBY","EBP.AEF.PM_P47_MG_STRAFE","EBP.AEF.PM_P47_ROCKET_STRAFE","EBP.AEF.RANGER_COMMANDER_MP","EBP.AEF.RANGER_MP","EBP.AEF.REAR_ECHELON_RADIOMAN_MP","EBP.AEF.REAR_ECHELON_RESERVE_TROOP_MP","EBP.AEF.REAR_ECHELON_TROOP_CAPT_MP","EBP.AEF.REAR_ECHELON_TROOP_MP","EBP.AEF.REPLACEMENT_ARMOR_COMMAND_MP","EBP.AEF.REPLACEMENT_ARMORED_RIFLE_COMMAND_MP","EBP.AEF.REPLACEMENT_COMPANY_WEAPONS_POOL_MP","EBP.AEF.RIFLE_COMMAND_MP","EBP.AEF.RIFLE_COMMAND_SP","EBP.AEF.RIFLE_COMMAND_WRECK_MP","EBP.AEF.RIFLEMAN_SOLDIER_CAPTAIN_MP","EBP.AEF.RIFLEMAN_SOLDIER_GROUP_MP","EBP.AEF.RIFLEMAN_SOLDIER_LIEUTENANT_MP","EBP.AEF.RIFLEMAN_SOLDIER_MP","EBP.AEF.SHERMAN_BARRIER_DEFORM_MP","EBP.AEF.SHERMAN_BARRIER_DIRT_MP","EBP.AEF.SHERMAN_BARRIER_MUD_MP","EBP.AEF.SHERMAN_BARRIER_RUBBLE_MP","EBP.AEF.SHERMAN_BARRIER_SNOW_MP","EBP.AEF.T34_CALLIOPE_MP","EBP.AEF.TEMP_ACTIVE_STRUCTURE_SEARCHLIGHT","EBP.AEF.USF_MEDIC_MP","EBP.AEF.VEHICLE_CREW_BAZOOKA_MP","EBP.AEF.VEHICLE_CREW_TROOP_MP","EBP.AEF.VEHICLE_CREW_TROOP_REPAIR_STATION_MP","SBP.AEF.AEF_AIR_SUPPORT_RECON","SBP.AEF.AEF_AIR_SUPPORT_ROCKET","SBP.AEF.AEF_AIR_SUPPORT_ROCKET_ELITE","SBP.AEF.AEF_AIR_SUPPORT_STRAFE","SBP.AEF.AEF_AIR_SUPPORT_STRAFE_ELITE","SBP.AEF.AEF_ATTACK_PLANE_SQUAD","SBP.AEF.AEF_HALFTRACK_SQUAD_MP","SBP.AEF.ASSAULT_ENGINEER_SQUAD_5_MAN_MP","SBP.AEF.ASSAULT_ENGINEER_SQUAD_MP","SBP.AEF.CAPTAIN_SQUAD_MP","SBP.AEF.DODGE_WC51_50CAL_SQUAD_MP","SBP.AEF.DODGE_WC51_AMBULANCE_SQUAD_MP","SBP.AEF.DODGE_WC51_PATHFINDER_SQUAD_MP","SBP.AEF.DODGE_WC51_SQUAD_MP","SBP.AEF.JACKSON_SQUAD","SBP.AEF.LIEUTENANT_SQUAD_MP","SBP.AEF.M1_57MM_AT_GUN_SQUAD_BOB","SBP.AEF.M1_57MM_AT_GUN_SQUAD_MP","SBP.AEF.M1_75MM_PACK_HOWITZER_SQUAD_MP","SBP.AEF.M1_81MM_MORTAR_SQUAD_MP","SBP.AEF.M10_TANK_DESTROYER_SQUAD_MP","SBP.AEF.M15A1_AA_HALFTRACK_SQUAD_MP","SBP.AEF.M1919A4_HMG_SQUAD_MP","SBP.AEF.M2_60MM_MORTAR_CORE_SQUAD_MP","SBP.AEF.M2_60MM_MORTAR_SQUAD_MP","SBP.AEF.M2_60MM_MORTAR_SQUAD_MP_CLONE","SBP.AEF.M20_ASSAULT_ENGY_ANTITANK_SQUAD_MP","SBP.AEF.M20_UTILITY_CAR_SQUAD_MP","SBP.AEF.M21_MORTAR_HALFTRACK_SQUAD_MP","SBP.AEF.M26_PERSHING_MP","SBP.AEF.M2HB_50CAL_HMG_SQUAD_MP","SBP.AEF.M3_HALFTRACK_SQUAD_ASSAULT_MP","SBP.AEF.M3_HALFTRACK_SQUAD_MP","SBP.AEF.M36_TANK_DESTROYER_SQUAD_MP","SBP.AEF.M4A3_76MM_SHERMAN_BULLDOZER_SQUAD_MP","SBP.AEF.M4A3_76MM_SHERMAN_SQUAD_MP","SBP.AEF.M4A3_SHERMAN_SQUAD_DEMO_BURNOUT","SBP.AEF.M4A3_SHERMAN_SQUAD_MP","SBP.AEF.M4A3E8_SHERMAN_EASY_8_SQUAD_MP","SBP.AEF.M5A1_STUART_SQUAD_MP","SBP.AEF.M7B1_PRIEST_SQUAD_MP","SBP.AEF.M8_GREYHOUND_SQUAD_MP","SBP.AEF.M8A1_HMC_SQUAD_MP","SBP.AEF.MAJOR_SQUAD_MP","SBP.AEF.P47_FLYBY","SBP.AEF.P47_MG_STRAFE","SBP.AEF.P47_RECON","SBP.AEF.P47_RECON_PLANE_SWEEP","SBP.AEF.P47_RECON_TRACKING","SBP.AEF.P47_ROCKETS","SBP.AEF.P47_ROCKETS_STRAFE","SBP.AEF.P47_STRAFES","SBP.AEF.PARATROOPER_COMBAT_GROUP_SQUAD_MP","SBP.AEF.PARATROOPER_SQUAD_MP","SBP.AEF.PARATROOPER_SQUAD_SUPPORT_MP","SBP.AEF.PARATROOPERS_COMBAT_GROUP_PLANE","SBP.AEF.PARATROOPERS_PLANE","SBP.AEF.PARATROOPERS_PLANE_ATGUN","SBP.AEF.PARATROOPERS_PLANE_HMG","SBP.AEF.PARATROOPERS_PLANE_MINES","SBP.AEF.PARATROOPERS_PLANE_PARAS","SBP.AEF.PATHFINDER_SQUAD_MP","SBP.AEF.PATHFINDER_SQUAD_RECON_MP","SBP.AEF.PM_AEF_AIRBORNE_PARATROOPERS_PLANE_PARAS","SBP.AEF.PM_AEF_AIRBORNE_PARATROOPERS_PLANE_STRAFE","SBP.AEF.PM_AEF_AIRBORNE_SUPPLY_DROP_PLANE","SBP.AEF.PM_M3_HALFTRACK_SQUAD_OMCG","SBP.AEF.PM_RIFLEMEN_SQUAD_OMCG","SBP.AEF.RANGER_SQUAD_COMMANDER_MP","SBP.AEF.RANGER_SQUAD_MP","SBP.AEF.REAR_ECHELON_SQUAD_MP","SBP.AEF.RIFLEMEN_SQUAD_MP","SBP.AEF.RIFLEMEN_SQUAD_VETERAN_MP","SBP.AEF.T34_CALLIOPE_SQUAD_MP","SBP.AEF.USF_MEDIC_SQUAD_MP","SBP.AEF.VEHICLE_CREW_BAZOOKA_SQUAD_MP","SBP.AEF.VEHICLE_CREW_SQUAD_MP","ABILITY.AEF.ACTIVATE_REPAIR_STATION_MP","ABILITY.AEF.AEF_BARBED_WIRE_CUTTING_ABILITY_ASSUALT_ENGINEERS_MP","ABILITY.AEF.AEF_BARBED_WIRE_CUTTING_ABILITY_MP","ABILITY.AEF.AEF_BARBED_WIRE_CUTTING_ABILITY_NO_REQUIREMENT_MP","ABILITY.AEF.AEF_HQ_ENGINEER_CALL_IN","ABILITY.AEF.AEF_REPAIR_ABILITY_REAR_ECHELON_MP","ABILITY.AEF.AEF_REPAIR_ABILITY_VEHICLE_CREW_MP","ABILITY.AEF.AEF_REPAIR_CRITICAL_MP","ABILITY.AEF.AIR_DROP_COMBAT_GROUP","ABILITY.AEF.AMBULANCE_HEAL_AREA","ABILITY.AEF.ARTILLERY_155MM","ABILITY.AEF.ARTILLERY_SMOKE_BARRAGE","ABILITY.AEF.ASSAULT_ENGINEER_DISPATCH","ABILITY.AEF.BAR_SUPPRESSION_ABILITY","ABILITY.AEF.BAZOOKA_DEPLOY_MP","ABILITY.AEF.BEACON_DISABLE","ABILITY.AEF.CALLIOPE_ROCKET_BARRAGE_MP","ABILITY.AEF.CAPTAIN_SUPERVISE","ABILITY.AEF.CMD_PARATROOPERS_FROM_PATHFINDERS","ABILITY.AEF.COMBAT_ENGINEER_TIMED_DEMO_MP","ABILITY.AEF.COMBINED_ARMS","ABILITY.AEF.DODGE_WC51_DISPATCH","ABILITY.AEF.ELITE_RIFLEMEN","ABILITY.AEF.ELITE_VEHICLE_CREWS","ABILITY.AEF.FATALITY_P47_ROCKET_ATTACK","ABILITY.AEF.FATALITY_PARATROOPERS_PARADROP","ABILITY.AEF.FATALITY_SMOKE_FLARES","ABILITY.AEF.FATALITY_WHITE_PHOSPHOROUS_BARRAGE","ABILITY.AEF.FLANKING_SPEED","ABILITY.AEF.FORWARD_OBSERVERS_ALWAYS_ON","ABILITY.AEF.FORWARD_OBSERVERS_UNLOCK_2","ABILITY.AEF.GREYHOUND_RECON_DISPATCH","ABILITY.AEF.LIEUTENANT_CAPTAIN_ON_ME_AURA_MP","ABILITY.AEF.M1_81MM_MORTAR_TEAM_MORTAR_BARRAGE_MP","ABILITY.AEF.M1_81MM_MORTAR_TEAM_SMOKE_BARRAGE_MP","ABILITY.AEF.M1_81MM_MORTAR_WHITE_PHOSPHOROUS_BARRAGE_ABILITY_MP","ABILITY.AEF.M1_ATGUN_PIERCING_ABILITY","ABILITY.AEF.M1_ATGUN_TAKE_AIM_ABILITY","ABILITY.AEF.M10_APCPC_SHELLS","ABILITY.AEF.M10_APCPC_SHELLS_VET","ABILITY.AEF.M10_DEPLOY","ABILITY.AEF.M15A1_AA_MODE_MP","ABILITY.AEF.M2_60MM_MORTAR_TEAM_MORTAR_BARRAGE_MP","ABILITY.AEF.M2_60MM_MORTAR_TEAM_SMOKE_BARRAGE_MP","ABILITY.AEF.M20_MARK_VEHICLE","ABILITY.AEF.M20_SMOKE","ABILITY.AEF.M21_HEAVY_HE_SHORT_DELAY_MORTAR_BARRAGE_MP","ABILITY.AEF.M21_MORTAR_BARRAGE_MP","ABILITY.AEF.M21_MORTAR_BARRAGE_VICTOR_TARGET_MP","ABILITY.AEF.M21_MORTAR_HALFTRACK_DISPATCH","ABILITY.AEF.M21_MORTAR_WHITE_PHOSPHOROUS_BARRAGE_MP","ABILITY.AEF.M23_SMOKE_STREAM_RIFLE_GRENADE_MP","ABILITY.AEF.M23_SMOKE_STREAM_RIFLE_GRENADE_VET_MP","ABILITY.AEF.M26_PERSHING_DISPATCH","ABILITY.AEF.M2HB_50CAL_AP_ROUNDS_MP","ABILITY.AEF.M2HB_HMG_SPRINT_MP","ABILITY.AEF.M3_HALFTRACK_GROUP","ABILITY.AEF.M3_HALFTRACK_SPEED_BOOST_MP","ABILITY.AEF.M36_M8_CONCEALING_SMOKE_VET","ABILITY.AEF.M5_QUAD_HALFTRACK_DISPATCH","ABILITY.AEF.M5_STUART_DAMAGE_ENGINE","ABILITY.AEF.M5_STUART_SHELL_SHOCK","ABILITY.AEF.M7B1_PRIEST_105MM_BARRAGE_ABILITY_MP","ABILITY.AEF.M7B1_PRIEST_105MM_BARRAGE_ABILITY_VICTOR_TARGET_MP","ABILITY.AEF.M7B1_PRIEST_105MM_SMOKE_BARRAGE_ABILITY_MP","ABILITY.AEF.M8_CANISTER_SHOT","ABILITY.AEF.M8_LAY_HEAVY_MINE","ABILITY.AEF.M8A1_HMC_75MM_BARRAGE_ABILITY_MP","ABILITY.AEF.M8A1_HMC_75MM_BARRAGE_ABILITY_VICTOR_TARGET_MP","ABILITY.AEF.M8A1_HMC_SMOKE_BARRAGE_MP","ABILITY.AEF.MAJOR_ARTILLERY","ABILITY.AEF.MAJOR_ARTILLERY_FAKE","ABILITY.AEF.MAJOR_QUICK_RECON_RUN","ABILITY.AEF.MAJOR_QUICK_RECON_RUN_IMPROVED","ABILITY.AEF.MEDIC_AUTO_HEAL","ABILITY.AEF.MK2_FRAGMENTATION_GRENADE_MP","ABILITY.AEF.OFF_MAP_SMOKE_ARTILLERY","ABILITY.AEF.OFFICER_RETREAT_POINT_MP","ABILITY.AEF.OFFICER_STOP_RETREAT_MP","ABILITY.AEF.OUT_OF_FUEL_SP","ABILITY.AEF.P47_RECON_MP","ABILITY.AEF.P47_ROCKET_ATTACK","ABILITY.AEF.PACK_HOWITZER_75MM_BARRAGE_ABILITY_HEAT_MP","ABILITY.AEF.PACK_HOWITZER_75MM_BARRAGE_ABILITY_MP","ABILITY.AEF.PACK_HOWITZER_75MM_BARRAGE_ABILITY_VET3_MP","ABILITY.AEF.PACK_HOWITZER_75MM_BARRAGE_ABILITY_VICTOR_TARGET_MP","ABILITY.AEF.PACK_HOWITZER_WHITE_PHOSPHOROUS_BARRAGE_ABILITY_MP","ABILITY.AEF.PARADROP_MACHINE_GUN","ABILITY.AEF.PARADROPS_ANTI_TANK_GUN","ABILITY.AEF.PARATROOPER_ASSAULT_MOVE_TEST_MP","ABILITY.AEF.PARATROOPER_MK2_FRAGMENTATION_GRENADE_MP","ABILITY.AEF.PARATROOPER_SUPPRESSING_FIRE_ABILITY_MP","ABILITY.AEF.PARATROOPER_TIMED_DEMO_MP","ABILITY.AEF.PARATROOPERS_PARADROP","ABILITY.AEF.PATHFINDER_ARTILLERY_UNLOCK","ABILITY.AEF.PATHFINDER_IN_COVER_STATIONARY_CAMOUFLAGE_IMPROVED_MP","ABILITY.AEF.PATHFINDER_IN_COVER_STATIONARY_CAMOUFLAGE_MP","ABILITY.AEF.PATHFINDER_PLANT_BEACON","ABILITY.AEF.PATHFINDERS_DISPATCH","ABILITY.AEF.PATHFINDERS_RECON_DISPATCH","ABILITY.AEF.PERSHING_HVAP_PIERCING_SHOT_ABILITY","ABILITY.AEF.PRIEST_ARTILLERY_BARRAGE_CREEPING_MP","ABILITY.AEF.PRIEST_DISPATCH","ABILITY.AEF.RANGER_BUNDLED_GRENADE_MP","ABILITY.AEF.RANGER_LIMITED_DEMO_MP","ABILITY.AEF.RANGER_MK2_FRAGMENTATION_GRENADE_MP","ABILITY.AEF.RANGER_SPRINT_MP","ABILITY.AEF.RANGERS_DISPATCH","ABILITY.AEF.REAR_ECHELON_VOLLEY_FIRE_ABILITY_MP","ABILITY.AEF.RECON_SWEEP","ABILITY.AEF.REFUEL_TANK_SP","ABILITY.AEF.RIFLEMAN_AT_RIFLE_GRENADE_VET","ABILITY.AEF.RIFLEMAN_FIRE_UP","ABILITY.AEF.RIFLEMAN_FIRE_UP_MP","ABILITY.AEF.RIFLEMEN_30_CALIBER_LMG","ABILITY.AEF.RIFLEMEN_DEFENSIVE","ABILITY.AEF.RIFLEMEN_DEFENSIVE_BUILDINGS","ABILITY.AEF.RIFLEMEN_FIRE_FLARES_ABILITY_MP","ABILITY.AEF.RIFLEMEN_FLAMETHROWERS","ABILITY.AEF.RIFLEMEN_FLARES","ABILITY.AEF.SHERMAN_AMMO_SWITCH_AP_SHELL_MP","ABILITY.AEF.SHERMAN_AMMO_SWITCH_HE_SHELL_MP","ABILITY.AEF.SHERMAN_BULLDOZER_CONSTRUCT_BARRIER_MP","ABILITY.AEF.SHERMAN_BULLDOZER_DESTROY_BARRIER_MP","ABILITY.AEF.SHERMAN_BULLDOZER_DISPATCH","ABILITY.AEF.SHERMAN_CALLIOPE_DISPATCH","ABILITY.AEF.SHERMAN_EASY8_DISPATCH","ABILITY.AEF.SIEGE_240MM_BARRAGE","ABILITY.AEF.SMOKE_SHERMAN_MORTAR_BARRAGE_BULLDOZER_MP","ABILITY.AEF.SMOKE_SHERMAN_MORTAR_BARRAGE_MP","ABILITY.AEF.SP_240MM_OFF_MAP_BARRAGE","ABILITY.AEF.SP_QUICK_RECON_RUN","ABILITY.AEF.SUPPORT_ARTILLERY","ABILITY.AEF.SUPPORT_ARTILLERY_DECOY","ABILITY.AEF.TANK_RIDERS_AUTO_UNLOAD_MP","ABILITY.AEF.TIME_ON_TARGET_ARTILLERY","ABILITY.AEF.USF_HOLD_FIRE_MP","ABILITY.AEF.USF_HOLD_FIRE_PACK_HOWITZER_MP","ABILITY.AEF.USF_MEDIC_HEAL_MP","ABILITY.AEF.USF_SHERMAN_BULLDOZER_HOLD_FIRE_MP","ABILITY.AEF.USF_STRAFING_RUN","ABILITY.AEF.USF_VEHICLE_HOLD_FIRE_MP","ABILITY.AEF.VEHICLE_CREW_AUTO_REPAIR","ABILITY.AEF.VEHICLE_DECREW_GENERIC_MP","ABILITY.AEF.VEHICLE_DECREW_M20_CREW_MP","ABILITY.AEF.VEHICLE_DECREW_MEDICS_MP","ABILITY.AEF.VEHICLE_DECREW_VEHICLE_CREW_MP","ABILITY.AEF.WC51_SPEED_BOOST_MP","ABILITY.AEF.WITHDRAW_AND_REFIT","UPG.AEF.ABILITY_LOCK_OUT_CAPTAIN_ABILITIES","UPG.AEF.ABILITY_LOCK_OUT_LIEUTENANT_ABILITIES","UPG.AEF.ABILITY_LOCK_OUT_PARATROOPERS_LANDED","UPG.AEF.ABILITY_REFUEL_LOCKOUT","UPG.AEF.ABILITY_TRANSFER_ORDERS_LOCK_OUT","UPG.AEF.ARTILLERY_155MM","UPG.AEF.ARTILLERY_155MM_BLIND","UPG.AEF.ARTILLERY_WHITE_PHOSPHOROUS","UPG.AEF.ASSAULT_ENGINEER_DISPATCH","UPG.AEF.ASSAULT_ENGINEER_FLAMETHROWER","UPG.AEF.BAR_UPGRADE_MP","UPG.AEF.BAZOOKA_UPGRADE_MP","UPG.AEF.CAPTAIN_BAZOOKA_UPGRADE_MP","UPG.AEF.CAPTAIN_DISPATCHED_UPGRADE_MP","UPG.AEF.COMBINED_ARMS_MP","UPG.AEF.DODGE_WC51_DISPATCH","UPG.AEF.ELITE_RIFLEMEN","UPG.AEF.ELITE_VEHICLE_CREWS","UPG.AEF.FIGHTING_POSITION_MG_ADDITION_MP","UPG.AEF.FIRE_UP_RIFLEMEN","UPG.AEF.FORWARD_OBSERVERS_UNLOCK","UPG.AEF.GREYHOUND_RECON_DISPATCH","UPG.AEF.LIEUTENANT_DISPATCHED_UPGRADE_MP","UPG.AEF.M10_DEPLOY","UPG.AEF.M20_SIDE_SKIRTS_MP","UPG.AEF.M21_MORTAR_HALFTRACK_DISPATCH","UPG.AEF.M26_PERSHING_DISPATCH","UPG.AEF.M3_HALFTRACK_GROUP","UPG.AEF.M3_REPAIR_STATION_MP","UPG.AEF.M5_HALFTRACK_DISPATCH","UPG.AEF.M8_GREYHOUND_SIDE_SKIRTS_MP","UPG.AEF.M8_TOP_GUNNER_MP","UPG.AEF.MAJOR_DISPATCHED_UPGRADE_MP","UPG.AEF.MEDIC_AUTO_HEAL_REFRESH","UPG.AEF.MINESWEEPER_UPGRADE_MP","UPG.AEF.NO_OFFICER_SPAWN_MP","UPG.AEF.OFF_SMOKE_BARRAGE","UPG.AEF.P47_RECON","UPG.AEF.P47_ROCKET_ATTACK","UPG.AEF.PARADROP_ANTI_TANK_GUN","UPG.AEF.PARADROP_MACHINE_GUN","UPG.AEF.PARADROPPED_SUPPORT_DROP","UPG.AEF.PARATROOPER_M1919A6_LMG_MP","UPG.AEF.PARATROOPER_THOMPSON_SUB_MACHINE_GUN_UPGRADE_MP","UPG.AEF.PARATROOPERS","UPG.AEF.PATHFINDERS","UPG.AEF.PATHFINDERS_RECON","UPG.AEF.PRIEST_DISPATCH","UPG.AEF.RANGER_DISPATCH","UPG.AEF.RANGER_THOMPSON_SUB_MACHINE_GUN_UPGRADE_MP","UPG.AEF.REAR_ECHELON_HACK_WITHDRAWING","UPG.AEF.RECON_SWEEP","UPG.AEF.RIFLE_COMMAND_GRENADE_MP","UPG.AEF.RIFLEMEN_30_CALIBER_LMG","UPG.AEF.RIFLEMEN_DEFENSIVE_BUILDINGS","UPG.AEF.RIFLEMEN_FLAMETHROWER","UPG.AEF.RIFLEMEN_FLAMETHROWER_UNLOCK","UPG.AEF.RIFLEMEN_FLARES","UPG.AEF.SHERMAN_BULLDOZER_DISPATCH","UPG.AEF.SHERMAN_EASY8_DISPATCH","UPG.AEF.SHERMAN_HE_ROUNDS","UPG.AEF.SHERMAN_TOP_GUNNER_MP","UPG.AEF.SIEGE_240MM_ARTILLERY","UPG.AEF.SMOKE_BARRAGE","UPG.AEF.T34_SHERMAN_CALLIOPE_DISPATCH","UPG.AEF.TECH_TREE_V1","UPG.AEF.TEMP_SPAWN_BASE_STAMP_MP","UPG.AEF.TIME_ON_TARGET_ARTILLERY","UPG.AEF.TOP_GUNNER_UPGRADED","UPG.AEF.USF_M5_HALFTRACK_72K_AA_GUN_PACKAGE_MP","UPG.AEF.USF_STRAFING_RUN","UPG.AEF.VEHICLE_CREW_THOMPSON_SUB_MACHINE_GUN_UPGRADE_MP","UPG.AEF.WEAPON_RACK_UPGRADE_MP","UPG.AEF.WITHDRAW_AND_REFIT","EBP.BRITISH.AEC_ARMOURED_CAR_MP","EBP.BRITISH.AIR_SUPPORT_OFFICER_MP","EBP.BRITISH.AVRE_VEHICLE_CREW_MP","EBP.BRITISH.BRIT_17_POUNDER_GUN_MP","EBP.BRITISH.BRIT_17_POUNDER_PIT_COMMANDER_MP","EBP.BRITISH.BRIT_17_POUNDER_PIT_MP","EBP.BRITISH.BRIT_25_POUNDER_HOWITZER_MP","EBP.BRITISH.BRIT_25_POUNDER_HOWITZER_TEMP_MP","EBP.BRITISH.BRIT_3_INCH_MORTAR_EMPLACEMENT","EBP.BRITISH.BRIT_3_INCH_MORTAR_EMPLACEMENT_COMMANDER_MP","EBP.BRITISH.BRIT_6_POUNDER_AT_GUN_MP","EBP.BRITISH.BRIT_BARBED_WIRE_FENCE_MP","EBP.BRITISH.BRIT_BOFORS_40MM_AUTOCANNON_COMMANDER_MP","EBP.BRITISH.BRIT_BOFORS_40MM_AUTOCANNON_MP","EBP.BRITISH.BRIT_EMPLACEMENT_SMALL","EBP.BRITISH.BRIT_FORWARD_HQ_COMMANDER_MP","EBP.BRITISH.BRIT_FORWARD_HQ_MP","EBP.BRITISH.BRIT_FWD_HQ_WEAPON_RACK_BREN_LMG_MP","EBP.BRITISH.BRIT_FWD_HQ_WEAPON_RACK_PIAT_LAUNCHER_MP","EBP.BRITISH.BRIT_LAND_MATTRESS_LAUNCHER_MP","EBP.BRITISH.BRIT_MEDIC_EXTRA_ENTITY_MP","EBP.BRITISH.BRIT_MEDIC_WITH_PISTOL_MP","EBP.BRITISH.BRIT_MINE_COMMANDER_MP","EBP.BRITISH.BRIT_MINE_MP","EBP.BRITISH.BRIT_RETREAT_POINT_MP","EBP.BRITISH.BRIT_SANDBAG_FENCE","EBP.BRITISH.BRIT_WEAPON_RACK_BREN_LMG_MP","EBP.BRITISH.BRIT_WEAPON_RACK_PIAT_LAUNCHER_MP","EBP.BRITISH.BRITISH_25LB_HOWITZER_GUN_CREW_MP","EBP.BRITISH.BRITISH_6LB_AT_GUN_CREW_MP","EBP.BRITISH.BRITISH_BASE_STAMPER","EBP.BRITISH.BRITISH_BUILDING_1_MP","EBP.BRITISH.BRITISH_BUILDING_1_UNBUILT_MP","EBP.BRITISH.BRITISH_BUILDING_1_WRECK_MP","EBP.BRITISH.BRITISH_BUILDING_2_MP","EBP.BRITISH.BRITISH_BUILDING_2_UNBUILT_MP","EBP.BRITISH.BRITISH_BUILDING_2_WRECK_MP","EBP.BRITISH.BRITISH_BUNKER_STARTING_POSITION_MP","EBP.BRITISH.BRITISH_HMG_PLANE","EBP.BRITISH.BRITISH_HMG_TEAM_CREW_MP","EBP.BRITISH.BRITISH_HQ_SANDBAGS_01_MP","EBP.BRITISH.BRITISH_HQ_TRUCK_MP","EBP.BRITISH.BRITISH_HQ_TRUCK_WRECK_MP","EBP.BRITISH.BRITISH_LAND_MATTRESS_TEAM_CREW_MP","EBP.BRITISH.BRITISH_MACHINE_GUN_MP","EBP.BRITISH.BRITISH_MORTAR_TEAM_CREW_MP","EBP.BRITISH.BRITISH_RADIO_BEACON","EBP.BRITISH.BRITISH_SANDBAG_FENCE_MP","EBP.BRITISH.CENTAUR_AA_MK2_MP","EBP.BRITISH.CHURCHILL_AVRE_MP","EBP.BRITISH.CHURCHILL_CROCODILE_MP","EBP.BRITISH.CHURCHILL_DEFAULT_MP","EBP.BRITISH.COMET_MP","EBP.BRITISH.COMMANDO_AIR_LANDING_MP","EBP.BRITISH.COMMANDO_MP","EBP.BRITISH.COMMANDO_PIAT_MP","EBP.BRITISH.CROMWELL_MK4_75MM_MP","EBP.BRITISH.FIELD_HOSPITAL_MEDIC_MP","EBP.BRITISH.FORWARD_OBSERVATION_OFFICER_MP","EBP.BRITISH.GLIDER_COMMANDOS_ONLY","EBP.BRITISH.GLIDER_HEADQUARTERS","EBP.BRITISH.HQ_FIELD_ARTILLERY_MP","EBP.BRITISH.INVISIBLE_FLAME_MORTAR_ICON","EBP.BRITISH.M3_HALFTRACK_RESUPPLY_MP","EBP.BRITISH.PARATROOPERS_PLANE_ATGUN_MATT_TEST_MP","EBP.BRITISH.PARATROOPERS_PLANE_VICKERS_MATT_TEST_MP","EBP.BRITISH.RECON_HAWKER_TYPHOON_ASSAULT_MP","EBP.BRITISH.RECON_HAWKER_TYPHOON_MP","EBP.BRITISH.REPAIR_SAPPER_MP","EBP.BRITISH.ROCKET_HAWKER_TYPHOON_MP","EBP.BRITISH.SAPPER_MP","EBP.BRITISH.SAPPER_RECOVERY_MP","EBP.BRITISH.SEXTON_SPG_MP","EBP.BRITISH.SHERMAN_FIREFLY_M4A2_MP","EBP.BRITISH.SLIT_TRENCH_MP","EBP.BRITISH.SNIPER_BRITISH_MP","EBP.BRITISH.SPITFIRE_RECON_PLANE","EBP.BRITISH.STRAFE_HAWKER_TYPHOON_MP","EBP.BRITISH.TOMMY_MP","EBP.BRITISH.TOMMY_RECON_MP","EBP.BRITISH.UNIVERSAL_CARRIER_MP","EBP.BRITISH.UNIVERSAL_CARRIER_RESUPPLY_MP","EBP.BRITISH.VALENTINE_MORTAR","EBP.BRITISH.VALENTINE_OBSERVATION_MP","EBP.BRITISH.VEHICLE_CREW_MP","SBP.BRITISH.AEC_ARMOURED_CAR_SQUAD_MP","SBP.BRITISH.AIR_SUPPORT_OFFICER_SQUAD_MP","SBP.BRITISH.AVRE_VEHICLE_CREW_SQUAD_MP","SBP.BRITISH.BRIT_17_POUNDER_AT_GUN_SQUAD_COMMANDER_MP","SBP.BRITISH.BRIT_17_POUNDER_AT_GUN_SQUAD_MP","SBP.BRITISH.BRIT_25_POUNDER_HOWITZER_SQUAD_MP","SBP.BRITISH.BRIT_25_POUNDER_HOWITZER_SQUAD_TEMP_MP","SBP.BRITISH.BRIT_3_INCH_MORTAR_TEAM_COMMANDER_MP","SBP.BRITISH.BRIT_3_INCH_MORTAR_TEAM_MP","SBP.BRITISH.BRIT_6_POUNDER_AT_GUN_SQUAD_MP","SBP.BRITISH.BRIT_BOFORS_40MM_AUTOCANNON_SQUAD_COMMANDER_MP","SBP.BRITISH.BRIT_BOFORS_40MM_AUTOCANNON_SQUAD_MP","SBP.BRITISH.BRIT_BREN_LMG_WEAPON_RACK_UI_FAKE_MP","SBP.BRITISH.BRIT_FORWARD_HQ_MP","SBP.BRITISH.BRIT_LAND_MATTRESS_LAUNCHER_SQUAD_MP","SBP.BRITISH.BRIT_MEDIC_SQUAD_MP","SBP.BRITISH.BRIT_PIAT_LAUNCHER_WEAPON_RACK_UI_FAKE_MP","SBP.BRITISH.BRITISH_CARGO_PLANE","SBP.BRITISH.BRITISH_HMG_PLANE","SBP.BRITISH.BRITISH_MACHINE_GUN_SQUAD_MP","SBP.BRITISH.CENTAUR_AA_MK2_SQUAD_MP","SBP.BRITISH.CHURCHILL_AVRE_SQUAD_MP","SBP.BRITISH.CHURCHILL_CROCODILE_MP","SBP.BRITISH.CHURCHILL_DEFAULT_SQUAD_MP","SBP.BRITISH.COMET_TANK_SQUAD_MP","SBP.BRITISH.COMMANDO_SQUAD_MP","SBP.BRITISH.COMMANDO_SQUAD_PIAT_MP","SBP.BRITISH.CROMWELL_MK4_75MM_SQUAD_MP","SBP.BRITISH.FORWARD_HQ_MP","SBP.BRITISH.FORWARD_OBSERVATION_SQUAD_MP","SBP.BRITISH.GLIDER_COMMANDOS_ONLY_MP","SBP.BRITISH.GLIDER_HEADQUARTERS_MP","SBP.BRITISH.INFILTRATION_COMMANDO_SQUAD_MP","SBP.BRITISH.M3_HALFTRACK_SQUAD__RESUPPLY_MP","SBP.BRITISH.PARATROOPERS_PLANE_ATGUN_BRITISH_MATT_TEST_MP","SBP.BRITISH.PARATROOPERS_PLANE_VICKERS_BRITISH_MATT_TEST_MP","SBP.BRITISH.RECON_HAWKER_TYPHOON_ASSAULT_MP","SBP.BRITISH.RECON_HAWKER_TYPHOON_MP","SBP.BRITISH.ROCKET_HAWKER_TYPHOON_MP","SBP.BRITISH.SAPPER_SQUAD_DEMOLITION_MP","SBP.BRITISH.SAPPER_SQUAD_MP","SBP.BRITISH.SAPPER_SQUAD_RECOVERY_MP","SBP.BRITISH.SEXTON_SPG_SQUAD_MP","SBP.BRITISH.SHERMAN_FIREFLY_SQUAD_MP","SBP.BRITISH.SNIPER_BRITISH_SQUAD_MP","SBP.BRITISH.SPITFIRE_RECON_PLANE","SBP.BRITISH.STRAFE_HAWKER_TYPHOON_MP","SBP.BRITISH.TOMMY_SQUAD_FLAME_MP","SBP.BRITISH.TOMMY_SQUAD_MP","SBP.BRITISH.TOMMY_SQUAD_RECON_MP","SBP.BRITISH.TOMMY_SQUAD_TANK_HUNTER_MP","SBP.BRITISH.UNIVERSAL_CARRIER_RESUPPLY","SBP.BRITISH.UNIVERSAL_CARRIER_SQUAD_MP","SBP.BRITISH.VALENTINE_MORTAR","SBP.BRITISH.VALENTINE_OBSERVATION_MP","SBP.BRITISH.VEHICLE_CREW_STANDARD_SQUAD_MP","ABILITY.BRITISH.ADVANCED_ASSEMBLY","ABILITY.BRITISH.ADVANCED_COVER_COMBAT","ABILITY.BRITISH.AEC_DEFENSIVE_SMOKE","ABILITY.BRITISH.AEC_TREAD_SHOTS_MP","ABILITY.BRITISH.ALLIED_STRATEGIC_BOMBING","ABILITY.BRITISH.ARTILLERY_COVER","ABILITY.BRITISH.ASSAULT","ABILITY.BRITISH.ASSAULT_GRENADES","ABILITY.BRITISH.AT_GUN_AIRDROP","ABILITY.BRITISH.AVRE_CREW_DEMOLITION_CHARGE_MP","ABILITY.BRITISH.AVRE_CREW_SHRAPNELL_GRENADE_MP","ABILITY.BRITISH.AVRE_SPIGOT_MORTAR_ATTACK_MP","ABILITY.BRITISH.AVRE_SPIGOT_MORTAR_ATTACK_VET_3_MP","ABILITY.BRITISH.AVRE_SPIGOT_MORTAR_RELOAD_MP","ABILITY.BRITISH.AVRE_VEHICLE_DECREW_VEHICLE_CREW_MP","ABILITY.BRITISH.BOFORS_SUPPRESSIVE_BARRAGE_ABILITY_MP","ABILITY.BRITISH.BOFORS_SUPPRESSIVE_BARRAGE_ABILITY_VICTOR_TARGET_MP","ABILITY.BRITISH.BREAKTHROUGH_OPERATION","ABILITY.BRITISH.BRIT_17_POUNDER_FACING_ORDER_MP","ABILITY.BRITISH.BRIT_17_POUNDER_FLARES_ABILITY_MP","ABILITY.BRITISH.BRIT_17_POUNDER_PIERCING_SHELL_ABILITY_MP","ABILITY.BRITISH.BRIT_17_POUNDER_PIERCING_SHELL_ABILITY_VICTOR_TARGET_MP","ABILITY.BRITISH.BRIT_3_INCH_MORTAR_EMPLACEMENT_BARRAGE_MP","ABILITY.BRITISH.BRIT_3_INCH_MORTAR_EMPLACEMENT_BARRAGE_VICTOR_TARGET_MP","ABILITY.BRITISH.BRIT_3_INCH_MORTAR_EMPLACEMENT_SMOKE_BARRAGE_MP","ABILITY.BRITISH.BRIT_6_POUNDER_CRITICAL_SHOT_MP","ABILITY.BRITISH.BRIT_6_POUNDER_RAPID_MANEUVER_MP","ABILITY.BRITISH.BRIT_BARBED_WIRE_CUTTING_ABILITY_MP","ABILITY.BRITISH.BRIT_BASE_BRACED_STATIC_MP","ABILITY.BRITISH.BRIT_BASE_BUILDING_BRACED_OFF_MP","ABILITY.BRITISH.BRIT_BASE_BUILDING_BRACED_ON_MP","ABILITY.BRITISH.BRIT_EMPLACEMENT_BRACED_MP","ABILITY.BRITISH.BRIT_HQ_ENGINEER_CALL_IN","ABILITY.BRITISH.BRIT_MEDIC_HEAL_MP","ABILITY.BRITISH.BRIT_MEDIC_SQUAD_AUTO_HEAL","ABILITY.BRITISH.BRIT_MEDIC_TOMMY_TIMED_AREA_HEAL_MP","ABILITY.BRITISH.BRIT_MORTAR_EMPLACEMENT_HOLD_FIRE","ABILITY.BRITISH.BRIT_RADAR_SWEEP","ABILITY.BRITISH.BRIT_REPAIR_ABILITY_SAPPERS_MP","ABILITY.BRITISH.BRIT_REPAIR_ABILITY_TOMMYS_MP","ABILITY.BRITISH.BRIT_REPAIR_EWS_ABILITY_SAPPERS_MP","ABILITY.BRITISH.BRIT_SNIPER_DELAYED_COVER_AUTO_CAMOUFLAGE_MP","ABILITY.BRITISH.BRIT_TUNE_UP","ABILITY.BRITISH.BRIT_VEHICLE_HOLD_FIRE_MP","ABILITY.BRITISH.BRITISH_HOLD_THE_LINE","ABILITY.BRITISH.BRITISH_MORTAR_HOLD_FIRE_MP","ABILITY.BRITISH.CENTAUR_20MM_BARRAGE_MP","ABILITY.BRITISH.CENTAUR_AA_MODE_MP","ABILITY.BRITISH.CENTAUR_WEAPON_BURST_MP","ABILITY.BRITISH.CENTAUR_WEAPON_BURST_TEST_MP","ABILITY.BRITISH.CHURCHILL_AVRE","ABILITY.BRITISH.CHURCHILL_CREW_GRENADE_TARGETED","ABILITY.BRITISH.CHURCHILL_CROC_FLAME_BURST_MP","ABILITY.BRITISH.CHURCHILL_CROCODILE","ABILITY.BRITISH.CHURCHILL_INF_SUPPORT_SMOKE","ABILITY.BRITISH.COMET_CREW_GRENADE_TARGETED","ABILITY.BRITISH.COMET_SMOKE_SHELL_SHOT_MP","ABILITY.BRITISH.COMET_SMOKE_SHELL_SHOT_WP_MP","ABILITY.BRITISH.COMMAND_HQ","ABILITY.BRITISH.COMMAND_HQ_HE_ARTILLERY","ABILITY.BRITISH.COMMAND_HQ_RECON_PLANE","ABILITY.BRITISH.COMMAND_HQ_SMOKE_ARTILLERY","ABILITY.BRITISH.COMMAND_HQ_STRAFE_PLANE","ABILITY.BRITISH.COMMAND_VEHICLE","ABILITY.BRITISH.COMMAND_VEHICLE_PLANE","ABILITY.BRITISH.COMMANDO_ASSASSINATE_MP","ABILITY.BRITISH.COMMANDO_DEMO_MP","ABILITY.BRITISH.COMMANDO_INFILTRATION_CAMOUFLAGE_MP","ABILITY.BRITISH.COUNTER_BATTERY","ABILITY.BRITISH.COUNTER_BATTERYS","ABILITY.BRITISH.COVER_SMOKE_GRENADES","ABILITY.BRITISH.CREW_REPAIR","ABILITY.BRITISH.CREW_REPAIR_OPERATION","ABILITY.BRITISH.CROMWELL_SMOKE_SHELL_SHOT_MP","ABILITY.BRITISH.DEFENSIVE_OPERATIONS","ABILITY.BRITISH.DESTROY_COVER_MP","ABILITY.BRITISH.DIRECT_BARRAGE","ABILITY.BRITISH.EARLY_WARNING","ABILITY.BRITISH.ENGINEER_COVER_COMBAT_BONUS","ABILITY.BRITISH.FATALITY_BURN_THEM_OUT","ABILITY.BRITISH.FATALITY_MIGHT_OF_THE_AIR_FORCES","ABILITY.BRITISH.FATALITY_ZEROING_STRIKE","ABILITY.BRITISH.FIELD_RECOVERY","ABILITY.BRITISH.FIRE_SUPPORT_TEAM","ABILITY.BRITISH.FIREFLY_TULIP_ROCKET_BARRAGE_MP","ABILITY.BRITISH.FIREFLY_TULIP_ROCKET_BARRAGE_SKILL_SHOT_MP","ABILITY.BRITISH.FORTIFY_OUR_POSITION","ABILITY.BRITISH.FORWARD_HQ_RETREAT_POINT_GLIDER_MP","ABILITY.BRITISH.FORWARD_HQ_RETREAT_POINT_MP","ABILITY.BRITISH.GLIDER_COMMANDOS_ONLY","ABILITY.BRITISH.GLIDER_HEADQUARTERS","ABILITY.BRITISH.GLIDER_RETREAT_POINT_MP","ABILITY.BRITISH.HOWITZER_COUNTER_BARRAGE_ATTACK_COMMANDER_MP","ABILITY.BRITISH.HOWITZER_COUNTER_BARRAGE_COMMANDER_MP","ABILITY.BRITISH.HQ_BUILD_ANVIL_1_MP","ABILITY.BRITISH.HQ_BUILD_ANVIL_2_MP","ABILITY.BRITISH.IMPROVED_FORTIFCATIONS","ABILITY.BRITISH.INFANTRY_RECON_TACTICS","ABILITY.BRITISH.INFANTRY_SMOKE_GRENADE_RESPOSITION","ABILITY.BRITISH.INFILTRATION_COMMANDOS","ABILITY.BRITISH.LAND_MATTRESS","ABILITY.BRITISH.LAND_MATTRESS_25LB_ROCKET","ABILITY.BRITISH.LAND_MATTRESS_60LB_ROCKET","ABILITY.BRITISH.LAND_MATTRESS_BARRAGE","ABILITY.BRITISH.LAND_MATTRESS_BARRAGE_SMOKE","ABILITY.BRITISH.LAND_MATTRESS_BARRAGE_VICTOR_TARGET_MP","ABILITY.BRITISH.LAND_MATTRESS_FIRE_ALL","ABILITY.BRITISH.LAND_MATTRESS_LOAD_ROCKETS_MP","ABILITY.BRITISH.LAND_MATTRESS_PHOSPHORUS_ROCKET","ABILITY.BRITISH.MEDIC_AUTO_HEAL_MP","ABILITY.BRITISH.MORTAR_ARTILLERY","ABILITY.BRITISH.MORTAR_FIRE_ARTILLERY","ABILITY.BRITISH.MORTAR_PIT_COUNTER_BATTERY_MP","ABILITY.BRITISH.OBSERVATION_MODE","ABILITY.BRITISH.OBSERVATION_VALENTINE","ABILITY.BRITISH.OFFICER_ARTILLERY","ABILITY.BRITISH.OFFICER_ARTILLERY_SEXTON_VICTOR_TARGET_AIRBURST_BARRAGE_MP","ABILITY.BRITISH.OFFICER_ARTILLERY_SEXTON_VICTOR_TARGET_CONCENTRATION_BARRAGE_MP","ABILITY.BRITISH.OFFICER_CHARGE_MP","ABILITY.BRITISH.OFFICER_RECON_SWEEP","ABILITY.BRITISH.PASSIVE_17_POUNDER_EMPLACEMENT_MP","ABILITY.BRITISH.PASSIVE_BOFORS_EMPLACEMENT_MP","ABILITY.BRITISH.PASSIVE_MORTAR_EMPLACEMENT_MP","ABILITY.BRITISH.PEPPER_POT","ABILITY.BRITISH.PERCISION_BARRAGE","ABILITY.BRITISH.PIAT_DEPLOY_MP","ABILITY.BRITISH.QF_25_PDR_FLARE_BARRAGE_ABILITY_MP","ABILITY.BRITISH.QF_25LB_ANTITANK_ABILITY_BASE_MP","ABILITY.BRITISH.QF_25LB_ANTITANK_ABILITY_MP","ABILITY.BRITISH.QF_25LB_BARRAGE_ABILITY_BASE_MP","ABILITY.BRITISH.QF_25LB_BARRAGE_ABILITY_MP","ABILITY.BRITISH.QF_25LB_COORDINATED_FIRE_BASE_MP","ABILITY.BRITISH.QF_25LB_COORDINATED_FIRE_MP","ABILITY.BRITISH.QF_25LB_COORDINATED_FIRE_ORDER_BASE_MP","ABILITY.BRITISH.QF_25LB_COORDINATED_FIRE_ORDER_FWD_HQ_MP","ABILITY.BRITISH.QF_25LB_COORDINATED_FIRE_ORDER_MP","ABILITY.BRITISH.QF_25LB_COORDINATED_FIRE_ORDER_OFFICER_MP","ABILITY.BRITISH.QF_25LB_COORDINATED_FIRE_ORDER_SNIPER_MP","ABILITY.BRITISH.QF_25LB_COORDINATED_FIRE_ORDER_VALENTINE_MP","ABILITY.BRITISH.QF_25LB_COORDINATED_SMOKE_SCREEN_BASE_MATT_TEST_VICTOR_TARGET_MP","ABILITY.BRITISH.QF_25LB_CREEPING_SMOKE_BARRAGE_ABILITY_BASE_MP","ABILITY.BRITISH.QF_25LB_CREEPING_SMOKE_BARRAGE_ABILITY_MP","ABILITY.BRITISH.QF_25LB_DIRECT_BARRAGE_BASE_MP","ABILITY.BRITISH.QF_25LB_OVERWATCH_BASE_MP","ABILITY.BRITISH.QF_25LB_RAPID_RESPONSE_BARRAGE_BASE_MP","ABILITY.BRITISH.QF_25LB_RAPID_RESPONSE_BARRAGE_MP","ABILITY.BRITISH.QF_25LB_SMOKE_SCREEN_BASE_MP","ABILITY.BRITISH.RAPID_ADVANCE","ABILITY.BRITISH.RAPID_RESPONSE_ARTILLERY","ABILITY.BRITISH.RECON_SECTION_SPRINT_MP","ABILITY.BRITISH.REINFORCE_THE_FRONT","ABILITY.BRITISH.REINFORCED_STRUCTURES","ABILITY.BRITISH.SAPPER_ANVIL_BOOBY_TRAP","ABILITY.BRITISH.SAPPER_FLAMETHROWERS","ABILITY.BRITISH.SAPPER_GAMMON_BOMB_MEDIUM_MP","ABILITY.BRITISH.SAPPER_SALVAGE_WRECK","ABILITY.BRITISH.SEXTON_ARTILLERY_BARRAGE_CREEPING_VICTOR_TARGET_MP","ABILITY.BRITISH.SEXTON_DISPATCH_BRITISH","ABILITY.BRITISH.SEXTON_SPG_25_CONCENTRATION_BARRAGE_MP","ABILITY.BRITISH.SEXTON_SPG_25_PDR_ARTILLERY_CREEPING_BARRAGE_MP","ABILITY.BRITISH.SEXTON_SPG_25_PDR_BARRAGE_ABILITY_MP","ABILITY.BRITISH.SEXTON_SPG_25_PDR_SUPERCHARGE_AIRBURST_BARRAGE_ABILITY_MP","ABILITY.BRITISH.SEXTON_SPG_25_PDR_SUPERCHARGE_BARRAGE_ABILITY_MP","ABILITY.BRITISH.SMOKE_ASSAULT","ABILITY.BRITISH.SNIPER_BOYS_ANTI_TANK_CRITICAL_SHOT_MP","ABILITY.BRITISH.STAND_FAST","ABILITY.BRITISH.STRAFING_RUN","ABILITY.BRITISH.SUPER_OVERWATCH_TEST","ABILITY.BRITISH.TANK_HUNTER","ABILITY.BRITISH.TOMMY_COVER_COMBAT_BONUS","ABILITY.BRITISH.TOMMY_GAMMON_BOMB_HEAVY_MP","ABILITY.BRITISH.TOMMY_GAMMON_BOMB_MEDIUM_MP","ABILITY.BRITISH.TOMMY_HEAT_GRENADE_MP","ABILITY.BRITISH.TOMMY_MILLS_BOMB_MP","ABILITY.BRITISH.TOMMY_OFFICER_ARTILLERY","ABILITY.BRITISH.TOMMY_STAND_YOUR_GROUND","ABILITY.BRITISH.TUNE_UP_BONUS_MP","ABILITY.BRITISH.UEC_SELF_REPAIR","ABILITY.BRITISH.UEC_SELF_REPAIR_IMPROVED","ABILITY.BRITISH.UNIVERSAL_CARRIER_DROP_LMG","ABILITY.BRITISH.UNIVERSAL_CARRIER_DROP_PIAT","ABILITY.BRITISH.UNIVERSAL_CARRIER_VICKERS_SUPPRESSION_MP","ABILITY.BRITISH.VALENTINE_ARTILLERY_SEXTON_VICTOR_TARGET_CONCENTRATION_BARRAGE_MP","ABILITY.BRITISH.VALENTINE_SMOKE_BARRAGE_MP","ABILITY.BRITISH.VICKERS_AIRDROP","ABILITY.BRITISH.VICKERS_HMG_VET_1_BONUS","UPG.BRITISH.ABILITY_LOCK_OUT_17_POUNDER_ABILITY_ACTIVE","UPG.BRITISH.ABILITY_LOCK_OUT_AVRE_NOT_RELOADED","UPG.BRITISH.ABILITY_LOCK_OUT_AVRE_RELOADING","UPG.BRITISH.ABILITY_LOCK_OUT_BASE_ARTILLERY_COUNTER_BARRAGE_ABILITY_ACTIVE","UPG.BRITISH.ABILITY_LOCK_OUT_BASE_ARTILLERY_OVERWATCH_ABILITY_ACTIVE","UPG.BRITISH.ABILITY_LOCK_OUT_BOFORS_EMPLACEMENT_AA_MODE_ENABLED","UPG.BRITISH.ABILITY_LOCK_OUT_BOFORS_EMPLACEMENT_BARRAGE_ACTIVE","UPG.BRITISH.ABILITY_LOCK_OUT_GLIDER_CUSTOM_LOADOUT_LAUNCH_AVAILABLE","UPG.BRITISH.ABILITY_LOCK_OUT_GLIDER_HARD_LANDED","UPG.BRITISH.ABILITY_LOCK_OUT_GLIDER_NOT_STOPPED","UPG.BRITISH.ABILITY_LOCK_OUT_MORTAR_EMPLACEMENT_BARRAGE_ACTIVE","UPG.BRITISH.ABILITY_LOCK_OUT_MORTAR_EMPLACEMENT_SLOT_1_DEFAULT_LOADED","UPG.BRITISH.ABILITY_LOCK_OUT_MORTAR_EMPLACEMENT_SLOT_1_SPECIAL_1_LOADED","UPG.BRITISH.ABILITY_LOCK_OUT_MORTAR_EMPLACEMENT_SLOT_1_SPECIAL_2_LOADED","UPG.BRITISH.ADVANCED_ASSEMBLY","UPG.BRITISH.ADVANCED_ASSEMBLY_RESEARCH","UPG.BRITISH.ADVANCED_COVER","UPG.BRITISH.AEC_HE_ROUNDS_MP","UPG.BRITISH.AEC_HE_ROUNDS_UNLOCK_MP","UPG.BRITISH.AEC_RAPID_FIRE_MP","UPG.BRITISH.AEC_TARGET_OPTICS_MP","UPG.BRITISH.AEC_TARGET_TURRET_MP","UPG.BRITISH.AEC_TREAD_FIRST_SHOT_MP","UPG.BRITISH.AEC_TREAD_SECOND_SHOT_MP","UPG.BRITISH.ARTY_PIT_LOCKOUT_UPGRADE","UPG.BRITISH.ASSAULT","UPG.BRITISH.ASSAULT_ACTIVE","UPG.BRITISH.AVRE_MORTAR_RELOAD","UPG.BRITISH.BASE_BUILDING_BRACED_MP","UPG.BRITISH.BOYS_AT_RIFLE","UPG.BRITISH.BREN_LMG_UNLOCK_MP","UPG.BRITISH.BRITISH_TANK_COMMANDER","UPG.BRITISH.CAN_TUNE_UP_MP","UPG.BRITISH.COMMAND_HQ","UPG.BRITISH.COMMAND_VEHICLE","UPG.BRITISH.COMMAND_VEHICLE_ACTIVE","UPG.BRITISH.COMMAND_VEHICLE_ACTIVE_PLAYER","UPG.BRITISH.COMMANDO_RETREAT_SMOKE_DELAY","UPG.BRITISH.COMPANY_ANVIL_BUILDING_MP","UPG.BRITISH.COMPANY_ANVIL_MP","UPG.BRITISH.COMPANY_ANVIL_POINT_SIGHT_MP","UPG.BRITISH.COMPANY_HAMMER_BUILDING_MP","UPG.BRITISH.COMPANY_HAMMER_MP","UPG.BRITISH.COUNTER_BATTERY","UPG.BRITISH.COUNTER_BATTERY_MP","UPG.BRITISH.DEFENSIVE_OPERATIONS","UPG.BRITISH.EMPLACEMENT_DEACTIVATE_BRACE_DELAY","UPG.BRITISH.FIREFLY_TULIP_RELOAD","UPG.BRITISH.FIREFLY_TULIP_ROCKET","UPG.BRITISH.FLAMETHROWERS","UPG.BRITISH.FWD_HQ_RETREAT_MP","UPG.BRITISH.IMPROVED_FORTIFCATION","UPG.BRITISH.IMPROVED_FORTIFCATION_ASSSEMBLY_SQUAD","UPG.BRITISH.IMPROVED_FORTIFCATION_SQUAD","UPG.BRITISH.INFILTRATION_COMMANDOS","UPG.BRITISH.LAND_MATTRESS_FIRING","UPG.BRITISH.LAND_MATTRESS_LOADED_ROCKET","UPG.BRITISH.LAND_MATTRESS_LOADING_25LB_ROCKET","UPG.BRITISH.LAND_MATTRESS_LOADING_60LB_ROCKET","UPG.BRITISH.LAND_MATTRESS_LOADING_PHOS_ROCKET","UPG.BRITISH.PIAT","UPG.BRITISH.PIAT_UNLOCK_MP","UPG.BRITISH.PLATOON_AEC_RESEARCH_BUILDING_MP","UPG.BRITISH.PLATOON_AEC_RESEARCH_MP","UPG.BRITISH.PLATOON_BOFORS_RESEARCH_BUILDING_MP","UPG.BRITISH.PLATOON_BOFORS_RESEARCH_MP","UPG.BRITISH.PRECISION_BARRAGE","UPG.BRITISH.QF_25LB_COORDINATED_FIRE_MP","UPG.BRITISH.QF_25LB_COUNTER_BATTERY_MP","UPG.BRITISH.QF_25LB_FIRE_SUPPORT_BASE_MP","UPG.BRITISH.QF_25LB_FIRE_SUPPORT_MP","UPG.BRITISH.QF_25LB_HE_SHELL_MP","UPG.BRITISH.QF_25LB_RAPID_RESPONSE_DELAY_MP","UPG.BRITISH.QF_25LB_RAPID_RESPONSE_MP","UPG.BRITISH.QF_25LB_SHELL_TOGGLE_ABILITY_DELAY_MP","UPG.BRITISH.QF_25LB_TACTICAL_SUPPORT_BASE_MP","UPG.BRITISH.QF_25LB_TACTICAL_SUPPORT_MP","UPG.BRITISH.QF_25LB_TARGET_ACQUISITION_MP","UPG.BRITISH.REINFORCED_STRUCTURE","UPG.BRITISH.SAPPER_FLAMETHROWER","UPG.BRITISH.SAPPERS_HEAVY_SQUAD_MP","UPG.BRITISH.SAPPERS_MINESWEEPER_UPGRADE_MP","UPG.BRITISH.SNIPER_BOYS_AT_RIFLE","UPG.BRITISH.TANK_HUNTER_ACTIVE","UPG.BRITISH.TECH_STRUCTURE_1_CONSTRUCT_MP","UPG.BRITISH.TECH_STRUCTURE_1_MP","UPG.BRITISH.TECH_STRUCTURE_2_CONSTRUCT_MP","UPG.BRITISH.TECH_STRUCTURE_2_MP","UPG.BRITISH.TOMMY_BOYS_AT_RIFLES","UPG.BRITISH.TOMMY_INCREASED_SQUAD_SIZE_MP","UPG.BRITISH.TOMMY_MEDICAL_SUPPLIES","UPG.BRITISH.TOMMY_MILLS_BOMB_MP","UPG.BRITISH.TOMMY_PYROTECHNICS_SUPPLIES","UPG.BRITISH.UNIVERSAL_CARRIER_VICKERS_K_PACKAGE_UPGRADE_MP","UPG.BRITISH.UNIVERSAL_CARRIER_WASP_PACKAGE_UPGRADE_MP","UPG.BRITISH.VALENTINE_OBSERVATION_MODE_MP","UPG.BRITISH.WEAPON_RACK_UNLOCK_MP","EBP.GERMAN.ANTITANK_88MM_PAK43_SANDBAGS","EBP.GERMAN.ARMORED_CAR_SDKFZ_222","EBP.GERMAN.ARMORED_CAR_SDKFZ_222_MP","EBP.GERMAN.ASSAULT_GRENADIERS_LEADER_MP","EBP.GERMAN.ASSAULT_GRENADIERS_MP","EBP.GERMAN.ASSAULT_OFFICER","EBP.GERMAN.ASSAULT_OFFICER_GRENADIERS_BODYGUARD_MP","EBP.GERMAN.ASSAULT_OFFICER_MP","EBP.GERMAN.ATGUN_CREW","EBP.GERMAN.ATGUN_CREW_MP","EBP.GERMAN.ATGUN88_CREW","EBP.GERMAN.ATGUN88_CREW_MP","EBP.GERMAN.AXIS_BUNKER_STARTING_POSITION","EBP.GERMAN.AXIS_BUNKER_STARTING_POSITION_MP","EBP.GERMAN.BEREICH_FESTUNG","EBP.GERMAN.BEREICH_FESTUNG_MP","EBP.GERMAN.BRUMMBAR_STURMPANZER_IV_SDKFZ_166","EBP.GERMAN.BRUMMBAR_STURMPANZER_IV_SDKFZ_166_MP","EBP.GERMAN.BUNKER","EBP.GERMAN.BUNKER_MP","EBP.GERMAN.BUNKER_OF_DEATH_MP","EBP.GERMAN.CARGO_PLANE","EBP.GERMAN.CARGO_PLANE_1","EBP.GERMAN.CARGO_PLANE_FUEL","EBP.GERMAN.CARGO_PLANE_MUNITIONS","EBP.GERMAN.DOLCH_AKTIONEN","EBP.GERMAN.DOLCH_AKTIONEN_MP","EBP.GERMAN.ELEFANT_SDKFZ_184","EBP.GERMAN.ELEFANT_SDKFZ_184_MP","EBP.GERMAN.FUEL_POST_GERMAN","EBP.GERMAN.FUEL_POST_GERMAN_MP","EBP.GERMAN.GERMAN_BASE_STAMPER","EBP.GERMAN.GERMAN_HQ","EBP.GERMAN.GERMAN_HQ_MP","EBP.GERMAN.GERMAN_HQ_WRECK","EBP.GERMAN.GERMAN_HQ_WRECK_MP","EBP.GERMAN.GERMAN_MEDIC","EBP.GERMAN.GERMAN_MEDIC_MP","EBP.GERMAN.GERMAN_MINE","EBP.GERMAN.GERMAN_MINE_MP","EBP.GERMAN.GERMAN_SANDBAG_FENCE","EBP.GERMAN.GRANATEWERFER_34_81MM_MORTAR","EBP.GERMAN.GRANATEWERFER_34_81MM_MORTAR_MP","EBP.GERMAN.GRENADIERS","EBP.GERMAN.GRENADIERS_MP","EBP.GERMAN.GRENADIERS_SP","EBP.GERMAN.HACK_INVISI_PIONEER_MP","EBP.GERMAN.HALFTRACK_RIEGEL_43_MINE_MP","EBP.GERMAN.HALFTRACK_SDKFZ_251","EBP.GERMAN.HALFTRACK_SDKFZ_251_MP","EBP.GERMAN.HINTERE_PANZERWERK","EBP.GERMAN.HINTERE_PANZERWERK_MP","EBP.GERMAN.HINTERE_PANZERWERK_VORONEZH","EBP.GERMAN.HOWITZER_105MM_DUMMY","EBP.GERMAN.HOWITZER_105MM_LE_FH18","EBP.GERMAN.HOWITZER_105MM_LE_FH18_MP","EBP.GERMAN.HOWITZER_CREW","EBP.GERMAN.HOWITZER_CREW_MP","EBP.GERMAN.HULLDOWN_SANDBAG_WALL","EBP.GERMAN.HULLDOWN_SANDBAG_WALL_MP","EBP.GERMAN.INVISIBLE_RETREAT_POINT","EBP.GERMAN.LUFTWAFFE_OFFICER_TOW","EBP.GERMAN.M01_STUKA_DOGFIGHT","EBP.GERMAN.M01_STUKA_GROUND_ATTACK_FAST","EBP.GERMAN.MECHANIZED_250_HALFTRACK_GRENADIER_MP","EBP.GERMAN.MECHANIZED_250_HALFTRACK_MP","EBP.GERMAN.MG42_CREW","EBP.GERMAN.MG42_CREW_MP","EBP.GERMAN.MG42_CREW_SINGLE","EBP.GERMAN.MG42_HMG","EBP.GERMAN.MG42_HMG_ATTACK_GROUND","EBP.GERMAN.MG42_HMG_MP","EBP.GERMAN.MINE_FIELD","EBP.GERMAN.MINE_FIELD_BORDER","EBP.GERMAN.MINE_FIELD_BORDER_MP","EBP.GERMAN.MINE_FIELD_MINE","EBP.GERMAN.MINE_FIELD_MINE_M03","EBP.GERMAN.MINE_FIELD_MINE_MP","EBP.GERMAN.MINE_FIELD_MINE_TOW","EBP.GERMAN.MINE_FIELD_MP","EBP.GERMAN.MORTAR_CREW","EBP.GERMAN.MORTAR_CREW_MP","EBP.GERMAN.MORTAR_LIGHT_HALFTRACK_250_7","EBP.GERMAN.MORTAR_LIGHT_HALFTRACK_250_7_MP","EBP.GERMAN.MUNITION_POST_GERMAN","EBP.GERMAN.MUNITION_POST_GERMAN_MP","EBP.GERMAN.OFFICER","EBP.GERMAN.OFFICER_MP","EBP.GERMAN.OFFICER_TOW_OCCUPATION","EBP.GERMAN.OPEL_BLITZ_SUPPLY_TRUCK_MP","EBP.GERMAN.OPEL_BLITZ_TRUCK","EBP.GERMAN.OSTRUPPEN_SOLDIER","EBP.GERMAN.OSTRUPPEN_SOLDIER_MP","EBP.GERMAN.OSTWIND_FLAK_PANZER","EBP.GERMAN.OSTWIND_FLAK_PANZER_MP","EBP.GERMAN.PAK40_75MM_AT_GUN","EBP.GERMAN.PAK40_75MM_AT_GUN_MP","EBP.GERMAN.PAK43_88MM_AT_GUN","EBP.GERMAN.PAK43_88MM_AT_GUN_MP","EBP.GERMAN.PANTHER_SDKFZ_171","EBP.GERMAN.PANTHER_SDKFZ_171_MP","EBP.GERMAN.PANZER_GRENADIERS","EBP.GERMAN.PANZER_GRENADIERS_MP","EBP.GERMAN.PANZER_III_MP","EBP.GERMAN.PANZER_IV_COMMANDER_SDKFZ_161","EBP.GERMAN.PANZER_IV_COMMANDER_SDKFZ_161_MP","EBP.GERMAN.PANZER_IV_SDKFZ_161","EBP.GERMAN.PANZER_IV_SDKFZ_161_MP","EBP.GERMAN.PANZER_IV_SDKFZ_161_TUTORIAL","EBP.GERMAN.PANZER_IV_SDKFZ_AUSF1","EBP.GERMAN.PANZER_IV_SDKFZ_AUSF1_MP","EBP.GERMAN.PANZER_MG","EBP.GERMAN.PANZERWERFER_SDKFZ_4_1","EBP.GERMAN.PANZERWERFER_SDKFZ_4_1_MP","EBP.GERMAN.PARADROP_SNIPER_SOLDIER_MP","EBP.GERMAN.PIONEER","EBP.GERMAN.PIONEER_MP","EBP.GERMAN.PUMA_EAST_GERMAN","EBP.GERMAN.REPAIR_PIONEER","EBP.GERMAN.REPAIR_PIONEER_MP","EBP.GERMAN.RIEGEL_43_MINE","EBP.GERMAN.RIEGEL_43_MINE_MP","EBP.GERMAN.SCHWERES_KRIEGSWERK","EBP.GERMAN.SCHWERES_KRIEGSWERK_MP","EBP.GERMAN.SDKFZ_221_LIGHT_AT_HALFTRACK","EBP.GERMAN.SLIT_TRENCH_GERMAN","EBP.GERMAN.SLIT_TRENCH_GERMAN_MP","EBP.GERMAN.SNIPER_COVER","EBP.GERMAN.SNIPER_DIGIN_COVER_MP","EBP.GERMAN.SNIPER_SOLDIER","EBP.GERMAN.SNIPER_SOLDIER_MP","EBP.GERMAN.STORMTROOPERS_MP","EBP.GERMAN.STUG_III_E_SDKFZ_141_1","EBP.GERMAN.STUG_III_E_SDKFZ_141_1_COMMANDER_MP","EBP.GERMAN.STUG_III_E_SDKFZ_141_1_MP","EBP.GERMAN.STUG_III_G_SDKFZ_141_1","EBP.GERMAN.STUG_III_G_SDKFZ_141_1_MP","EBP.GERMAN.STUKA_AIR_RECON","EBP.GERMAN.STUKA_AIR_RECON_MP","EBP.GERMAN.STUKA_BOMBING_DIVE","EBP.GERMAN.STUKA_BOMBING_DIVE_MP","EBP.GERMAN.STUKA_BOMBING_RUN_SP","EBP.GERMAN.STUKA_FRAGEMENTATION_BOMB","EBP.GERMAN.STUKA_FRAGEMENTATION_BOMB_MP","EBP.GERMAN.STUKA_GROUND_ATTACK","EBP.GERMAN.STUKA_GROUND_ATTACK_LONG","EBP.GERMAN.STUKA_GROUND_ATTACK_M09","EBP.GERMAN.STUKA_GROUND_ATTACK_MP","EBP.GERMAN.STUKA_GROUND_ATTACK_WEST_AIRBORNE_ASSAULT","EBP.GERMAN.STUKA_INCENDIARY_BOMB","EBP.GERMAN.STUKA_INCENDIARY_BOMB_VICTORY","EBP.GERMAN.STUKA_JU87_ANTI_TANK","EBP.GERMAN.STUKA_JU87_ANTI_TANK_M06","EBP.GERMAN.STUKA_JU87_ANTI_TANK_MP","EBP.GERMAN.STUKA_JU87_ANTI_TANK_SUPERIORITY","EBP.GERMAN.STUKA_SMOKE_BOMB","EBP.GERMAN.STUKA_SMOKE_BOMB_MP","EBP.GERMAN.SUPPLY_TRUCK_METAL_M_01","EBP.GERMAN.SUPPLY_TRUCK_METAL_M_02","EBP.GERMAN.SUPPLY_TRUCK_MUNITIONS_CASE_AX_01","EBP.GERMAN.SUPPLY_TRUCK_MUNITIONS_CASE_AX_03","EBP.GERMAN.SUPPLY_TRUCK_SANDBAG_PILE_02","EBP.GERMAN.TACTICAL_BOMBER","EBP.GERMAN.TACTICAL_BOMBER_ACCURATE","EBP.GERMAN.TANK_TRAP","EBP.GERMAN.TELLER_MINE_MP","EBP.GERMAN.TIER1_MARKER","EBP.GERMAN.TIER2_MARKER","EBP.GERMAN.TIER3_MARKER","EBP.GERMAN.TIER4_MARKER","EBP.GERMAN.TIGER_ACE_SDKFZ_181_MP","EBP.GERMAN.TIGER_SDKFZ_181","EBP.GERMAN.TIGER_SDKFZ_181_MP","EBP.GERMAN.TIGER_SDKFZ_181_SINGLEPLAYER_MISSION","EBP.GERMAN.TIGER_SDKFZ_181_TOW","EBP.GERMAN.URBAN_ASSAULT_PANZER_GRENADIERS_MP","SBP.GERMAN.ASSAULT_GRENADIER_SQUAD_MP","SBP.GERMAN.ASSAULT_OFFICER_SQUAD","SBP.GERMAN.ASSAULT_OFFICER_SQUAD_MP","SBP.GERMAN.BRUMMBAR_SQUAD","SBP.GERMAN.BRUMMBAR_SQUAD_MP","SBP.GERMAN.CARGO_PLANE","SBP.GERMAN.CARGO_PLANE_FUEL","SBP.GERMAN.CARGO_PLANE_MUNITIONS","SBP.GERMAN.COMMAND_OFFICER_SQUAD_TOW","SBP.GERMAN.CONVOY_PIONEER_SQUAD","SBP.GERMAN.ELEFANT_TANK_DESTROYER_SQUAD","SBP.GERMAN.ELEFANT_TANK_DESTROYER_SQUAD_MP","SBP.GERMAN.GRENADIER_SQUAD","SBP.GERMAN.GRENADIER_SQUAD_M14","SBP.GERMAN.GRENADIER_SQUAD_MG42LMG_MP","SBP.GERMAN.GRENADIER_SQUAD_MP","SBP.GERMAN.GRENADIER_SQUAD_SP","SBP.GERMAN.HACK_INVISI_PIONEER_SQUAD_MP","SBP.GERMAN.HOWITZER_105MM_DUMMY_SQUAD","SBP.GERMAN.HOWITZER_105MM_LE_FH18_ARTILLERY","SBP.GERMAN.HOWITZER_105MM_LE_FH18_ARTILLERY_MP","SBP.GERMAN.LUFTWAFFE_OFFICER_SQUAD_TOW","SBP.GERMAN.M01_MG42_HEAVY_MACHINE_GUN_SQUAD_SINGLE","SBP.GERMAN.M01_STUKA_DOGFIGHT","SBP.GERMAN.M01_STUKA_GROUND_ATTACK_SQUAD_FAST","SBP.GERMAN.MECHANIZED_250_HALFTRACK_GRENADIERS_MP","SBP.GERMAN.MECHANIZED_250_HALFTRACK_MP","SBP.GERMAN.MECHANIZED_250_HALFTRACK_TOW","SBP.GERMAN.MG42_HEAVY_MACHINE_GUN_SQUAD","SBP.GERMAN.MG42_HEAVY_MACHINE_GUN_SQUAD_MP","SBP.GERMAN.MORTAR_250_HALFTRACK_SQUAD","SBP.GERMAN.MORTAR_250_HALFTRACK_SQUAD_MP","SBP.GERMAN.MORTAR_TEAM_81MM","SBP.GERMAN.MORTAR_TEAM_81MM_MP","SBP.GERMAN.OFFICER_SQUAD","SBP.GERMAN.OFFICER_SQUAD_MP","SBP.GERMAN.OPEL_BLITZ_SQUAD","SBP.GERMAN.OPEL_BLITZ_SUPPLY_SQUAD","SBP.GERMAN.OSTRUPPEN_SQUAD","SBP.GERMAN.OSTRUPPEN_SQUAD_M14","SBP.GERMAN.OSTRUPPEN_SQUAD_MP","SBP.GERMAN.OSTRUPPEN_SQUAD_RESERVES_MP","SBP.GERMAN.OSTWIND_SQUAD","SBP.GERMAN.OSTWIND_SQUAD_MP","SBP.GERMAN.PAK40_75MM_AT_GUN_SQUAD","SBP.GERMAN.PAK40_75MM_AT_GUN_SQUAD_MP","SBP.GERMAN.PAK43_88MM_AT_GUN_SQUAD","SBP.GERMAN.PAK43_88MM_AT_GUN_SQUAD_MP","SBP.GERMAN.PANTHER_SQUAD","SBP.GERMAN.PANTHER_SQUAD_MP","SBP.GERMAN.PANZER_GRENADIER_SQUAD","SBP.GERMAN.PANZER_GRENADIER_SQUAD_M14","SBP.GERMAN.PANZER_GRENADIER_SQUAD_MP","SBP.GERMAN.PANZER_IV_COMMAND_SQUAD","SBP.GERMAN.PANZER_IV_COMMAND_SQUAD_MP","SBP.GERMAN.PANZER_IV_SQUAD","SBP.GERMAN.PANZER_IV_SQUAD_MP","SBP.GERMAN.PANZER_IV_SQUAD_TUTORIAL","SBP.GERMAN.PANZER_IV_STUBBY_SQUAD","SBP.GERMAN.PANZER_IV_STUBBY_SQUAD_MP","SBP.GERMAN.PANZER_MG_SQUAD","SBP.GERMAN.PANZERWERFER_SQUAD","SBP.GERMAN.PANZERWERFER_SQUAD_MP","SBP.GERMAN.PARTISAN_SQUAD_M13","SBP.GERMAN.PIONEER_SQUAD","SBP.GERMAN.PIONEER_SQUAD_MP","SBP.GERMAN.PIONEER_SQUAD_TOW","SBP.GERMAN.PUMA_EAST_GERMAN_MP","SBP.GERMAN.SCOUTCAR_SDKFZ222","SBP.GERMAN.SCOUTCAR_SDKFZ222_MP","SBP.GERMAN.SDKFZ_221_LIGHT_AT_HALFTRACK","SBP.GERMAN.SDKFZ_251_HALFTRACK_SQUAD","SBP.GERMAN.SDKFZ_251_HALFTRACK_SQUAD_MP","SBP.GERMAN.SNIPER_SQUAD","SBP.GERMAN.SNIPER_SQUAD_MP","SBP.GERMAN.STORMTROOPER_SQUAD_MP","SBP.GERMAN.STUG_III_E_COMMANDER_SQUAD_MP","SBP.GERMAN.STUG_III_E_SQUAD","SBP.GERMAN.STUG_III_E_SQUAD_MP","SBP.GERMAN.STUG_III_SQUAD","SBP.GERMAN.STUG_III_SQUAD_MP","SBP.GERMAN.STUKA_AIR_CAP_SQUAD","SBP.GERMAN.STUKA_AIR_CAP_SQUAD_MP","SBP.GERMAN.STUKA_GROUND_ANTI_TANK_SQUAD","SBP.GERMAN.STUKA_GROUND_ANTI_TANK_SQUAD_M06","SBP.GERMAN.STUKA_GROUND_ANTI_TANK_SQUAD_MP","SBP.GERMAN.STUKA_GROUND_ANTI_TANK_SQUAD_SUPERIORITY","SBP.GERMAN.STUKA_GROUND_ATTACK_SQUAD","SBP.GERMAN.STUKA_GROUND_ATTACK_SQUAD_LONG","SBP.GERMAN.STUKA_GROUND_ATTACK_SQUAD_M09","SBP.GERMAN.STUKA_GROUND_ATTACK_SQUAD_MP","SBP.GERMAN.STUKA_GROUND_ATTACK_WEST_GERMANS_SQUAD","SBP.GERMAN.STUKA_GROUND_FRAGMENTATION_SQUAD","SBP.GERMAN.STUKA_GROUND_FRAGMENTATION_SQUAD_MP","SBP.GERMAN.STUKA_INCENDIARY_BOMB_SQUAD","SBP.GERMAN.STUKA_INCENDIARY_BOMB_VICTORY_SQUAD","SBP.GERMAN.STUKA_SMOKE_SQUAD","SBP.GERMAN.STUKA_SMOKE_SQUAD_MP","SBP.GERMAN.TACTICAL_BOMBERS","SBP.GERMAN.TACTICAL_BOMBERS_ACCURATE","SBP.GERMAN.TIGER_ACE_SQUAD_MP","SBP.GERMAN.TIGER_SQUAD","SBP.GERMAN.TIGER_SQUAD_MP","SBP.GERMAN.TIGER_SQUAD_SP_A2_M02","SBP.GERMAN.TIGER_SQUAD_TOW","SBP.GERMAN.URBAN_ASSAULT_PANZER_GRENADIER_SQUAD_MP","ABILITY.GERMAN.AIR_DROPPED_MEDICAL_SUPPLIES","ABILITY.GERMAN.AIR_DROPPED_MUNITIONS","ABILITY.GERMAN.AMBUSH_CAMO_HOLD_FIRE_MP","ABILITY.GERMAN.AMBUSH_CAMOUFLAGE","ABILITY.GERMAN.AMBUSH_CAMOUFLAGE_AT","ABILITY.GERMAN.AMBUSH_CAMOUFLAGE_MORTAR","ABILITY.GERMAN.AMBUSH_CAMOUFLAGE_PIO","ABILITY.GERMAN.AMBUSH_CAMOUFLAGE_UNLOCK","ABILITY.GERMAN.AMBUSH_CAMOUFLAGE_UPGRADE","ABILITY.GERMAN.ARMOR_COMMANDER","ABILITY.GERMAN.ASSAULT_FIELD_OFFICER","ABILITY.GERMAN.ASSAULT_GRENADIER_GRENADE","ABILITY.GERMAN.ASSAULT_GRENADIER_SPRINT_MP","ABILITY.GERMAN.ASSAULT_GRENADIERS","ABILITY.GERMAN.ASSAULT_OFFICER_INSPIRATION","ABILITY.GERMAN.ASSAULT_OFFICER_INSPIRATION_VET3","ABILITY.GERMAN.ASSAULT_OFFICER_VICTOR_TARGET","ABILITY.GERMAN.AXIS_SNIPER_DELAYED_COVER_AUTO_CAMOUFLAGE_MP","ABILITY.GERMAN.BLINDING_GRENADE","ABILITY.GERMAN.BLINDING_GRENADES_UNLOCK","ABILITY.GERMAN.BREAKTHROUGH","ABILITY.GERMAN.BRUMMBAR_BUNKER_BUSTER_MP","ABILITY.GERMAN.BRUMMBAR_CRITICAL_SHOTS_MP","ABILITY.GERMAN.BRUMMBAR_HOLD_FIRE_MP","ABILITY.GERMAN.CAMOUFLAGE_NETS","ABILITY.GERMAN.CAMOUFLAGE_NETS_UNLOCK","ABILITY.GERMAN.COMMAND_PANTHER_MARK_TARGET","ABILITY.GERMAN.CONVERT_TANK_WRECK","ABILITY.GERMAN.CONVERT_TANK_WRECK_UNLOCK","ABILITY.GERMAN.COUNTERATTACK_TACTICS","ABILITY.GERMAN.CRUSH_THE_POCKET","ABILITY.GERMAN.DEFENSIVE_FORTIFICATIONS","ABILITY.GERMAN.ELEFANT_CRITICAL_SHOTS_MP","ABILITY.GERMAN.ELEFANT_UNLOCK","ABILITY.GERMAN.ELEPHANT_CONE_LOS_TOGGLE_ABILITY","ABILITY.GERMAN.ELEPHANT_CONE_LOS_TOGGLE_ABILITY_MP","ABILITY.GERMAN.FAST_MARCH","ABILITY.GERMAN.FATALITY_PANZERWERFER_BARRAGE","ABILITY.GERMAN.FATALITY_SMOKE_BARRAGE","ABILITY.GERMAN.FATALITY_STUKA_INCENDIARY_AIRSTRIKE","ABILITY.GERMAN.FATALITY_STUKA_SMOKE_STRAFE_AIRSTRIKE","ABILITY.GERMAN.FORWARD_REPAIR_STATION","ABILITY.GERMAN.GERMAN_HQ_PIONEER_CALL_IN","ABILITY.GERMAN.GERMAN_HULLDOWN_ABILITY","ABILITY.GERMAN.GERMAN_HULLDOWN_DISABLE","ABILITY.GERMAN.GERMAN_MORTAR_HOLD_FIRE","ABILITY.GERMAN.GERMAN_MORTAR_HOLD_FIRE_MP","ABILITY.GERMAN.GERMAN_SALVAGE_ABILITY","ABILITY.GERMAN.GERMAN_SALVAGE_ABILITY_CONVOY","ABILITY.GERMAN.GERMAN_SALVAGE_ABILITY_MP","ABILITY.GERMAN.GERMAN_WARNING_SMOKE","ABILITY.GERMAN.GOLIATH_IN_COVER_AUTO_CAMOUFLAGE_MP","ABILITY.GERMAN.GOLIATH_SELF_DESTRUCT_MP","ABILITY.GERMAN.GRENADIER_ANTITANK_RIFLE_GRENADE_ABILITY","ABILITY.GERMAN.GRENADIER_ANTITANK_RIFLE_GRENADE_ABILITY_MP","ABILITY.GERMAN.GRENADIER_PANZERFAUST","ABILITY.GERMAN.GRENADIER_PANZERFAUST_MP","ABILITY.GERMAN.GRENADIER_RIFLE_GRENADE_ABILITY","ABILITY.GERMAN.GRENADIER_RIFLE_GRENADE_ABILITY_MP","ABILITY.GERMAN.GRENADIER_RIFLE_GRENADE_ABILITY_TUTORIAL","ABILITY.GERMAN.HALFTRACK_INCENDIARY_MORTAR_BARRAGE","ABILITY.GERMAN.HALFTRACK_INCENDIARY_MORTAR_BARRAGE_MP","ABILITY.GERMAN.HALFTRACK_MORTAR_BARRAGE","ABILITY.GERMAN.HALFTRACK_MORTAR_BARRAGE_MP","ABILITY.GERMAN.HALFTRACK_MORTAR_VICTORTARGET_BARRAGE_MP","ABILITY.GERMAN.HALFTRACK_SMOKE_BARRAGE","ABILITY.GERMAN.HALFTRACK_SMOKE_BARRAGE_MP","ABILITY.GERMAN.HEAVY_AT_MINE_UNLOCK","ABILITY.GERMAN.HOWITZER_105MM_BARRAGE_ABILITY","ABILITY.GERMAN.HOWITZER_105MM_BARRAGE_ABILITY_MP","ABILITY.GERMAN.HOWITZER_105MM_BARRAGE_VET3_ABILITY_MP","ABILITY.GERMAN.HOWITZER_105MM_EMPLACEMENT_UNLOCK","ABILITY.GERMAN.HOWITZER_105MM_VICTORTARGET_BARRAGE_ABILITY_MP","ABILITY.GERMAN.HOWITZER_COUNTER_BARRAGE_ATTACK_MP","ABILITY.GERMAN.HOWITZER_COUNTER_BARRAGE_MP","ABILITY.GERMAN.HOWITZER_DEFAULT_REFACE_ACTION","ABILITY.GERMAN.HULL_DOWN_UNLOCK","ABILITY.GERMAN.INFANTRY_MEDKITS","ABILITY.GERMAN.INFANTRY_MEDKITS_MP","ABILITY.GERMAN.JAEGER_INFANTRY_UNLOCK","ABILITY.GERMAN.JAEGER_INTERROGATION","ABILITY.GERMAN.LAY_HEAVY_AT_MINE","ABILITY.GERMAN.LIGHT_SUPPORT_ARTILLERY","ABILITY.GERMAN.MECHANIZED_ASSAULT_GROUP","ABILITY.GERMAN.MECHANIZED_GRENADIER_GROUP","ABILITY.GERMAN.MG42_CAMO_HOLD_FIRE_MP","ABILITY.GERMAN.MG42_PHOSPHORUS_ROUNDS","ABILITY.GERMAN.MG42_PHOSPHORUS_ROUNDS_MP","ABILITY.GERMAN.MORTAR_COUNTER_BARRAGE_ATTACK_MP","ABILITY.GERMAN.MORTAR_COUNTER_BARRAGE_MP","ABILITY.GERMAN.MORTAR_COUNTER_BARRAGE_WEAPON_MP","ABILITY.GERMAN.MORTAR_HALFTRACK","ABILITY.GERMAN.MORTAR_INCENDIARY_BARRAGE","ABILITY.GERMAN.MORTAR_TEAM_INCENDIARY_BARRAGE_MP","ABILITY.GERMAN.MORTAR_TEAM_MORTAR_BARRAGE","ABILITY.GERMAN.MORTAR_TEAM_MORTAR_BARRAGE_MP","ABILITY.GERMAN.MORTAR_TEAM_MORTAR_VICTORTARGET_BARRAGE_MP","ABILITY.GERMAN.MORTAR_TEAM_SMOKE_BARRAGE","ABILITY.GERMAN.MORTAR_TEAM_SMOKE_BARRAGE_MP","ABILITY.GERMAN.MUNITIONS_BLITZ","ABILITY.GERMAN.OFFICER_SMOKE_ARTILLERY","ABILITY.GERMAN.OPEL_SUPPLY_TERRITORY_CHECK","ABILITY.GERMAN.OSTRUPPEN","ABILITY.GERMAN.OSTRUPPEN_COVER_BONUS","ABILITY.GERMAN.OSTRUPPEN_RESERVES","ABILITY.GERMAN.PAK_43_EMPLACEMENT_UNLOCK","ABILITY.GERMAN.PAK40_CRITICAL_SHOTS_MP","ABILITY.GERMAN.PAK40_TARGET_WEAK_POINT_MP","ABILITY.GERMAN.PAK43_CRITICAL_SHOTS_MP","ABILITY.GERMAN.PAK43_TARGET_WEAK_POINT_MP","ABILITY.GERMAN.PANTHER_TIGER_BLITZKRIEG_MP","ABILITY.GERMAN.PANZER_COMMANDER_AURA_MP","ABILITY.GERMAN.PANZER_DEFENSIVE_SMOKE","ABILITY.GERMAN.PANZER_GRENADIER_BUNDLED_CAMPAIGN","ABILITY.GERMAN.PANZER_GRENADIER_BUNDLED_GRENADE","ABILITY.GERMAN.PANZER_GRENADIER_BUNDLED_GRENADE_MP","ABILITY.GERMAN.PANZER_GRENADIER_BUNDLED_TUTORIAL","ABILITY.GERMAN.PANZER_PANTHER_TIGER_DEFENSIVE_SMOKE_TOW","ABILITY.GERMAN.PANZER_PANTHER_TIGER_OSTWIND_BLITZKRIEG","ABILITY.GERMAN.PANZER_PANTHER_TIGER_OSTWIND_BLITZKRIEG_MP","ABILITY.GERMAN.PANZER_PANTHER_TIGER_OSTWIND_BLITZKRIEG_TOW","ABILITY.GERMAN.PANZER_PANTHER_TIGER_OSTWIND_FLARES_ABILITY","ABILITY.GERMAN.PANZER_PANTHER_TIGER_OSTWIND_REPAIR_TOW","ABILITY.GERMAN.PANZER_TACTICIAN_UNLOCK","ABILITY.GERMAN.PANZERWERFER_COUNTER_BARRAGE_ATTACK_MP","ABILITY.GERMAN.PANZERWERFER_COUNTER_BARRAGE_MP","ABILITY.GERMAN.PANZERWERFER_ROCKET_BARRAGE","ABILITY.GERMAN.PANZERWERFER_ROCKET_BARRAGE_MP","ABILITY.GERMAN.PANZERWERFER_ROCKET_VICTORTARGET_BARRAGE_MP","ABILITY.GERMAN.PIONEER_BARBED_WIRE_CUTTING_ABILITY","ABILITY.GERMAN.PIONEER_BARBED_WIRE_CUTTING_ABILITY_MP","ABILITY.GERMAN.PIONEER_FLAMETHROWER","ABILITY.GERMAN.PUMA_CRITICAL_SHOTS_MP","ABILITY.GERMAN.PUMA_DISPATCH","ABILITY.GERMAN.RAILWAY_GUN_ARTILLERY","ABILITY.GERMAN.REDISTRIBUTE_RESOURCES","ABILITY.GERMAN.RELIEF_INFANTRY","ABILITY.GERMAN.REMOVE_AMBUSH_CAMOUFLAGE","ABILITY.GERMAN.RESOURCE_REQUISITION","ABILITY.GERMAN.RETREAT_TO_FORWARD_HQ","ABILITY.GERMAN.SCOUT_CAR_HALFTRACK_INFANTRY_AWARENESS","ABILITY.GERMAN.SCOUT_CAR_HALFTRACK_INFANTRY_AWARENESS_MP","ABILITY.GERMAN.SDKFZ_221_LIGHT_AT_HALFTRACK","ABILITY.GERMAN.SECTOR_ARTILLERY","ABILITY.GERMAN.SNIPER_INCENDIARY_ROUND_MP","ABILITY.GERMAN.SPRINT","ABILITY.GERMAN.STATIONARY_LOS_UNLOCK","ABILITY.GERMAN.STORMTROOPER_ASSAULT_AMBUSH_MP","ABILITY.GERMAN.STORMTROOPER_SPRINT_MP","ABILITY.GERMAN.STORMTROOPER_TANK_DETECTION_MP","ABILITY.GERMAN.STORMTROOPERS","ABILITY.GERMAN.STRATEGIC_BOMBING","ABILITY.GERMAN.STUG_CRITICAL_SHOTS_MP","ABILITY.GERMAN.STUG_ELEFANT_PAK40_PAK43_BRUMMBAR_CRITICAL_SHOTS","ABILITY.GERMAN.STUG_ELEFANT_PAK40_PAK43_BRUMMBAR_CRITICAL_SHOTS_MP","ABILITY.GERMAN.STUG_III_E","ABILITY.GERMAN.STUKA_AERIAL_SUPERIORITY_CLOSE_AIR_SUPPORT","ABILITY.GERMAN.STUKA_AERIAL_SUPERIORITY_RECON","ABILITY.GERMAN.STUKA_AERIAL_SUPERIORITY_STRAFING_RUN","ABILITY.GERMAN.STUKA_AIR_RECON","ABILITY.GERMAN.STUKA_BOMBING_RUN_SP","ABILITY.GERMAN.STUKA_BOMBING_STRIKE","ABILITY.GERMAN.STUKA_BOMBING_STRIKE_TOW","ABILITY.GERMAN.STUKA_CLOSE_AIR_M06","ABILITY.GERMAN.STUKA_CLOSE_AIR_M06_MP","ABILITY.GERMAN.STUKA_CLOSE_AIR_SUPPORT","ABILITY.GERMAN.STUKA_FRAGMENTATION_BOMB","ABILITY.GERMAN.STUKA_INCENDIARY_BOMBS","ABILITY.GERMAN.STUKA_SMOKE_BOMB","ABILITY.GERMAN.STUKA_STRAFING_RUN","ABILITY.GERMAN.SUPPLY_BREAK","ABILITY.GERMAN.SUPPLY_TRUCK","ABILITY.GERMAN.SUPPLY_TRUCK_LOCKDOWN","ABILITY.GERMAN.SUPPORT_TEAM_AMBUSH_CAMOUFLAGE","ABILITY.GERMAN.TANK_AWARENESS_UNLOCK","ABILITY.GERMAN.TANK_DETECTION_ABILITY_CONVOY","ABILITY.GERMAN.TIGER_ACE_CRITICAL_SHOTS_MP","ABILITY.GERMAN.TIGER_TANK","ABILITY.GERMAN.TIGER_TANK_ACE","ABILITY.GERMAN.TRENCH_UNLOCK","ABILITY.GERMAN.TROOP_TRAINING","ABILITY.GERMAN.URBAN_ASSAULT_GRENADIERS","ABILITY.GERMAN.URBAN_ASSAULT_SATCHEL_CHARGE_THROW_ABILITY_MP","ABILITY.GERMAN.URBAN_ASSAULT_SMOKE_GRENADE","ABILITY.GERMAN.URBAN_ASSAULT_SMOKE_GRENADE_2","ABILITY.GERMAN.WEHR_VEHICLE_HOLD_FIRE_MP","UPG.GERMAN.AERIAL_SUPERIORITY_RECON_PLANE","UPG.GERMAN.AERIAL_SUPERIORITY_STUKA_CLOSE_AIR_SUPPORT","UPG.GERMAN.AERIAL_SUPERIORITY_STUKA_STRAFE","UPG.GERMAN.AIR_DROP_MEDICAL_SUPPLIES","UPG.GERMAN.AIR_DROP_RESOURCES","UPG.GERMAN.AMBUSH_CAMOU_PACKAGE","UPG.GERMAN.AMBUSH_CAMOUFLAGE","UPG.GERMAN.ARMOR_COMMANDER","UPG.GERMAN.ASSAULT_ARCHETYPE","UPG.GERMAN.ASSAULT_FIELD_OFFICER","UPG.GERMAN.ASSAULT_GRENADIERS","UPG.GERMAN.BATTLE_PHASE_2","UPG.GERMAN.BATTLE_PHASE_2_MP","UPG.GERMAN.BATTLE_PHASE_3","UPG.GERMAN.BATTLE_PHASE_3_MP","UPG.GERMAN.BATTLE_PHASE_4","UPG.GERMAN.BATTLE_PHASE_4_MP","UPG.GERMAN.BLINDING_GRENADES","UPG.GERMAN.BREAKTHROUGH","UPG.GERMAN.BRUMMBAR_TOP_GUNNER","UPG.GERMAN.BRUMMBAR_TOP_GUNNER_MP","UPG.GERMAN.BUNKER_COMMAND","UPG.GERMAN.BUNKER_COMMAND_MP","UPG.GERMAN.BUNKER_MEDIC_STATION","UPG.GERMAN.BUNKER_MEDIC_STATION_MP","UPG.GERMAN.BUNKER_MG42_ADDITION","UPG.GERMAN.BUNKER_MG42_ADDITION_MP","UPG.GERMAN.CAMOUFLAGE_NET_ACTIVATED","UPG.GERMAN.CAMOUFLAGE_NETS","UPG.GERMAN.CAN_CAMOUFLAGE","UPG.GERMAN.COUNTERATTACK_TACTICS","UPG.GERMAN.CRUSH_THE_POCKET","UPG.GERMAN.DEFENSIVE_FORTIFICATIONS","UPG.GERMAN.ELEFANT_UNLOCK","UPG.GERMAN.FAST_MARCH","UPG.GERMAN.FESTUNG_ARCHETYPE","UPG.GERMAN.FORWARD_REPAIR_STATION","UPG.GERMAN.GRENADIER_MG42_LMG","UPG.GERMAN.GRENADIER_MG42_LMG_MP","UPG.GERMAN.HEAVY_AT_MINE","UPG.GERMAN.HOWITZER_105MM_EMPLACEMENT","UPG.GERMAN.HOWITZER_COUNTER_BARRAGE_COOLDOWN_MP","UPG.GERMAN.HULL_DOWN","UPG.GERMAN.HULLDOWN_ACTIVATED","UPG.GERMAN.HULLDOWN_CONSTRUCTING","UPG.GERMAN.JAEGER_ARCHETYPE","UPG.GERMAN.JAEGER_LIGHT_INFANTRY","UPG.GERMAN.LIGHT_ARTILLERY_SUPPORT","UPG.GERMAN.LIGHT_INFANTRY_PACKAGE","UPG.GERMAN.LIGHT_INFANTRY_PANZERGREN_PACKAGE","UPG.GERMAN.MECHANIZED_GRENADIER_GROUP","UPG.GERMAN.MECHANIZED_GROUP","UPG.GERMAN.MG42_HOLDFIRE_CAMOUFLAGE_NET_ACTIVATED","UPG.GERMAN.MORTAR_COUNTER_BARRAGE_COOLDOWN_MP","UPG.GERMAN.MORTAR_COUNTER_BARRAGE_MP","UPG.GERMAN.MORTAR_HALFTRACK","UPG.GERMAN.MORTAR_HALFTRACK_250_UPGRADE","UPG.GERMAN.MORTAR_HALFTRACK_COUNTER_BARRAGE_COOLDOWN_MP","UPG.GERMAN.MORTAR_INCENDIARY_BARRAGE","UPG.GERMAN.MUNITION_BLITZ","UPG.GERMAN.OSTRUPPEN","UPG.GERMAN.OSTRUPPEN_RESERVES","UPG.GERMAN.PAK_43_EMPLACEMENT","UPG.GERMAN.PANTHER_TOP_GUNNER","UPG.GERMAN.PANTHER_TOP_GUNNER_MP","UPG.GERMAN.PANZER_GRENADIER_PANZERSHRECK_ATW_ITEM","UPG.GERMAN.PANZER_GRENADIER_PANZERSHRECK_ATW_ITEM_1_SCHREK_MP","UPG.GERMAN.PANZER_GRENADIER_PANZERSHRECK_ATW_ITEM_MP","UPG.GERMAN.PANZER_GRENADIER_PANZERSHRECK_ATW_ITEM_SECOND","UPG.GERMAN.PANZER_GRENADIER_PANZERSHRECK_ATW_ITEM_SECOND_MP","UPG.GERMAN.PANZER_GRENADIER_PANZERSHRECK_ATW_ITEM_THIRD_MP","UPG.GERMAN.PANZER_TACTICIAN","UPG.GERMAN.PANZER_TOP_GUNNER","UPG.GERMAN.PANZER_TOP_GUNNER_MP","UPG.GERMAN.PANZERBUSCHE_39","UPG.GERMAN.PANZERBUSCHE_39_MP","UPG.GERMAN.PANZERWERFER_COUNTER_BARRAGE_COOLDOWN_MP","UPG.GERMAN.PIONEER_FLAMETHROWER","UPG.GERMAN.PIONEER_FLAMETHROWER_MP","UPG.GERMAN.PIONEER_MINESWEEPER","UPG.GERMAN.PIONEER_MINESWEEPER_MP","UPG.GERMAN.PUMA_DISPATCH","UPG.GERMAN.RAILWAY_ARTILLERY_SUPPORT","UPG.GERMAN.RECON_PLANE","UPG.GERMAN.REDISTRIBUTE_RESOURCES","UPG.GERMAN.RELIEF_INFANTRY","UPG.GERMAN.SDKFZ_222_20MM_GUN","UPG.GERMAN.SDKFZ_222_20MM_GUN_MP","UPG.GERMAN.SDKFZ_251_HALFTRACK_FLAMMPANZERWAGEN_UPGRADE","UPG.GERMAN.SDKFZ_251_HALFTRACK_FLAMMPANZERWAGEN_UPGRADE_MP","UPG.GERMAN.SDKFZ_251_HALFTRACK_MOBILE_MEDIC_STATION_UPGRADE","UPG.GERMAN.SECTOR_ARTILLERY","UPG.GERMAN.SPRINT","UPG.GERMAN.STATIONARY_LOS_GAIN","UPG.GERMAN.STORMTROOPER_ANTITANK_PACKAGE_MP","UPG.GERMAN.STORMTROOPER_ASSAULT_PACKAGE_MP","UPG.GERMAN.STORMTROOPER_PANZERSCHRECK_MP","UPG.GERMAN.STORMTROOPERS","UPG.GERMAN.STRATEGIC_BOMBING","UPG.GERMAN.STUG_III_E_UNLOCK","UPG.GERMAN.STUG_SHORT_BARREL","UPG.GERMAN.STUG_TOP_GUNNER","UPG.GERMAN.STUG_TOP_GUNNER_MP","UPG.GERMAN.STUKA_BOMBING_RUN_UPGRADE","UPG.GERMAN.STUKA_CLOSE_AIR_SUPPORT","UPG.GERMAN.STUKA_FLAME_STRIKE","UPG.GERMAN.STUKA_FRAGMENTATION_BOMB","UPG.GERMAN.STUKA_SMOKE_BOMB","UPG.GERMAN.STUKA_STRAFE","UPG.GERMAN.SUPPLY_BREAK","UPG.GERMAN.SUPPLY_TRUCK_ACTIVE","UPG.GERMAN.SUPPLY_TRUCK_EXIT","UPG.GERMAN.SUPPLY_TRUCK_FILL_STATE","UPG.GERMAN.SUPPLY_TRUCK_FULL","UPG.GERMAN.SUPPLY_TRUCK_LOCKDOWN","UPG.GERMAN.TANK_AWARENESS","UPG.GERMAN.TIGER_TANK","UPG.GERMAN.TIGER_TANK_ACE","UPG.GERMAN.TIGER_TANK_ACE_CALLIN_RESTRICTION","UPG.GERMAN.TIGER_TOP_GUNNER","UPG.GERMAN.TIGER_TOP_GUNNER_MP","UPG.GERMAN.TIGER_TOP_GUNNER_TOW","UPG.GERMAN.TOW_1941_GERMAN","UPG.GERMAN.TRENCH","UPG.GERMAN.TROOP_TRAINING","UPG.GERMAN.URBAN_ASSAULT_ARMOR_UPGRADE","UPG.GERMAN.URBAN_ASSAULT_PANZER_GRENADIERS","UPG.GERMAN.URBAN_ASSAULT_PANZER_GRENADIERS_FLAMETHROWER_MP","UPG.GERMAN.VEHICLES_OPTICS","UPG.GERMAN.XP1_GERMAN_DEMO_UPGRADE","EBP.PROXY.PROXY_MEDIC_MP","EBP.PROXY.PROXY_RIFLEMAN_SOLDIER_A","EBP.PROXY.PROXY_RIFLEMAN_SOLDIER_B","EBP.PROXY.PROXY_RIFLEMAN_SOLDIER_C","EBP.PROXY.PROXY_SNIPER_RECON_MP","SBP.PROXY.PROXY_HMG_SQUAD_MP","SBP.PROXY.PROXY_MECH_SQUAD_MP","SBP.PROXY.PROXY_RIFLEMEN_SQUAD_MP","SBP.PROXY.PROXY_SNIPER_SQUAD_MP","EBP.SOVIET._CIVILIAN_FEMALE","EBP.SOVIET._CIVILIAN_FEMALE_MP","EBP.SOVIET._CIVILIAN_MALE","EBP.SOVIET._CIVILIAN_MALE_MP","EBP.SOVIET.ANTI_PERSONNEL_MINES","EBP.SOVIET.ARTILLERY_203MM_B4","EBP.SOVIET.ATGUN53K_CREW","EBP.SOVIET.ATGUN53K_CREW_MP","EBP.SOVIET.ATGUNZIS_CREW","EBP.SOVIET.ATGUNZIS_CREW_MP","EBP.SOVIET.BARBED_WIRE_FENCE","EBP.SOVIET.BARBED_WIRE_FENCE_MP","EBP.SOVIET.BARBED_WIRE_FIELD","EBP.SOVIET.BARBED_WIRE_FIELD_MP","EBP.SOVIET.BARRACKS","EBP.SOVIET.BARRACKS_MP","EBP.SOVIET.BASE_CONSCRIPT_SOLDIER","EBP.SOVIET.BASE_CONSCRIPT_SOLDIER_MP","EBP.SOVIET.BOAT_01_ENTITY","EBP.SOVIET.CARGO_PLANE_SOVIET","EBP.SOVIET.COMBAT_ENGINEER","EBP.SOVIET.COMBAT_ENGINEER_MP","EBP.SOVIET.COMMISSAR","EBP.SOVIET.COMMISSAR_227","EBP.SOVIET.COMMISSAR_MP","EBP.SOVIET.COMMISSAR_OF_DEATH_227_MP","EBP.SOVIET.CONSCRIPT_SOLDIER","EBP.SOVIET.CONSCRIPT_SOLDIER_CONSCRIPT_BODYGUARD_MP","EBP.SOVIET.CONSCRIPT_SOLDIER_MP","EBP.SOVIET.DHSK_38_MACHINE_GUN","EBP.SOVIET.DHSK_38_MACHINE_GUN_MP","EBP.SOVIET.DSHK_WEAPON_CREW","EBP.SOVIET.DSHK_WEAPON_CREW_MP","EBP.SOVIET.FLARE_FIRE_MP","EBP.SOVIET.FLARE_MINE","EBP.SOVIET.FLARE_MINE_MP","EBP.SOVIET.FORWARD_HQ","EBP.SOVIET.GUARD_TROOPS","EBP.SOVIET.GUARD_TROOPS_ASSAULT_MP","EBP.SOVIET.GUARD_TROOPS_MP","EBP.SOVIET.HM_120_38_MORTAR","EBP.SOVIET.HM_120_38_MORTAR_MP","EBP.SOVIET.HOWITZER_CREW_SOVIET","EBP.SOVIET.HOWITZER_CREW_SOVIET_MP","EBP.SOVIET.HOWITZER_CREW203__SOVIET_MP","EBP.SOVIET.HQ","EBP.SOVIET.HQ_INVISIBLE_SP","EBP.SOVIET.HQ_MP","EBP.SOVIET.HQ_NO_WRECK","EBP.SOVIET.HQ_WRECK","EBP.SOVIET.HQ_WRECK_M06","EBP.SOVIET.HQ_WRECK_MP","EBP.SOVIET.IL_2_STURMOVIK","EBP.SOVIET.IL_2_STURMOVIK_ADVANCED_MP","EBP.SOVIET.IL_2_STURMOVIK_ANTI_TANK_BOMB_MP","EBP.SOVIET.IL_2_STURMOVIK_MARK_VEHICLE_MP","EBP.SOVIET.IL_2_STURMOVIK_MP","EBP.SOVIET.IL_2_STURMOVIK_RECON","EBP.SOVIET.IL_2_STURMOVIK_RECON_MP","EBP.SOVIET.IL_2_STURMOVIK_ROCKET","EBP.SOVIET.IL_2_STURMOVIK_ROCKET_MP","EBP.SOVIET.IL_2_STURMOVIK_ROCKET_SP","EBP.SOVIET.IL_2_STURMOVIK_VICTORY_MP","EBP.SOVIET.IS_2_HEAVY_TANK","EBP.SOVIET.IS_2_HEAVY_TANK_MP","EBP.SOVIET.ISAKOVICH_A01_COMMANDER","EBP.SOVIET.ISAKOVICH_M06","EBP.SOVIET.ISU_152_SPG","EBP.SOVIET.ISU_152_SPG_MP","EBP.SOVIET.KATYUSHA_BM_13N","EBP.SOVIET.KATYUSHA_BM_13N_MP","EBP.SOVIET.KV_1","EBP.SOVIET.KV_1_COMMANDER_MP","EBP.SOVIET.KV_1_MP","EBP.SOVIET.KV_2","EBP.SOVIET.KV_2_MP","EBP.SOVIET.KV_2_TOW","EBP.SOVIET.KV_8","EBP.SOVIET.KV_8_MP","EBP.SOVIET.LIGHT_ANTI_VEHICLE_MINES","EBP.SOVIET.M01_BASE_CONSCRIPT_SOLDIER","EBP.SOVIET.M01_BASE_CONSCRIPT_SOLDIER_DURABLE","EBP.SOVIET.M01_CONSCRIPT_SOLDIER","EBP.SOVIET.M01_CONSCRIPT_SOLDIER_DOCK","EBP.SOVIET.M01_CONSCRIPT_SOLDIER_HARMLESS","EBP.SOVIET.M01_CONSCRIPT_SOLDIER_HARMLESS_DURABLE","EBP.SOVIET.M01_IL_2_STURMOVIK_ROCKET","EBP.SOVIET.M01_IL2_DOGFIGHT","EBP.SOVIET.M01_MEDIC","EBP.SOVIET.M08_T_34_76_SMALLPATH","EBP.SOVIET.M08_TANK_BUSTER_CONSCRIPT","EBP.SOVIET.M11_ANIA_SNIPER","EBP.SOVIET.M11_ISAKOVICH_RECON","EBP.SOVIET.M11_PARTISAN_TROOP_KAR98K","EBP.SOVIET.M11_PARTISAN_TROOP_NAGANT","EBP.SOVIET.M11_PARTISAN_TROOP_NOWEAPON","EBP.SOVIET.M11_SNIPER","EBP.SOVIET.M11_SNIPER_RECON","EBP.SOVIET.M1910_MAXIM_HEAVY_MACHINE_GUN","EBP.SOVIET.M1910_MAXIM_HEAVY_MACHINE_GUN_MP","EBP.SOVIET.M1931_203MM_B_4_HOWITZER_ARTILLERY","EBP.SOVIET.M1931_203MM_B_4_HOWITZER_ARTILLERY_COMMANDER_MP","EBP.SOVIET.M1931_203MM_B_4_HOWITZER_ARTILLERY_MP","EBP.SOVIET.M1937_152MM_ML_20_ARTILLERY","EBP.SOVIET.M1937_152MM_ML_20_ARTILLERY_MP","EBP.SOVIET.M1937_53_K_45MM_AT_GUN","EBP.SOVIET.M1937_53_K_45MM_AT_GUN_MP","EBP.SOVIET.M1942_76MM_DIVISIONAL_GUN_ZIS_3","EBP.SOVIET.M1942_76MM_DIVISIONAL_GUN_ZIS_3_MP","EBP.SOVIET.M3A1_SCOUT_CAR","EBP.SOVIET.M3A1_SCOUT_CAR_MP","EBP.SOVIET.M5_HALFTRACK","EBP.SOVIET.M5_HALFTRACK_ASSAULT_MP","EBP.SOVIET.M5_HALFTRACK_MP","EBP.SOVIET.MACHINE_GUN_NEST","EBP.SOVIET.MACHINE_GUN_NEST_MP","EBP.SOVIET.MAXIM_WEAPON_CREW","EBP.SOVIET.MAXIM_WEAPON_CREW_MP","EBP.SOVIET.MEDIC","EBP.SOVIET.MEDIC_MP","EBP.SOVIET.MORTAR_120MM_WEAPON_CREW_MP","EBP.SOVIET.MORTAR_WEAPON_CREW","EBP.SOVIET.MORTAR_WEAPON_CREW_MP","EBP.SOVIET.MOTORPOOL","EBP.SOVIET.MOTORPOOL_MP","EBP.SOVIET.OBSERVATION_POST_FUEL","EBP.SOVIET.OBSERVATION_POST_FUEL_MP","EBP.SOVIET.OBSERVATION_POST_MUNITION","EBP.SOVIET.OBSERVATION_POST_MUNITION_MP","EBP.SOVIET.PARTISAN_SNIPER","EBP.SOVIET.PARTISAN_TROOP_KAR98K","EBP.SOVIET.PARTISAN_TROOP_KAR98K_2","EBP.SOVIET.PARTISAN_TROOP_KAR98K_2_MP","EBP.SOVIET.PARTISAN_TROOP_KAR98K_MP","EBP.SOVIET.PARTISAN_TROOP_KAR98K_TOW_BD","EBP.SOVIET.PARTISAN_TROOP_KAR98K_TOW_MP","EBP.SOVIET.PARTISAN_TROOP_NAGANT","EBP.SOVIET.PARTISAN_TROOP_NAGANT_MP","EBP.SOVIET.PARTISAN_TROOP_NAGANT_TOW_MP","EBP.SOVIET.PARTISAN_TROOPS_ANTITANK","EBP.SOVIET.PARTISAN_TROOPS_LMG","EBP.SOVIET.PARTISAN_TROOPS_RIFLE","EBP.SOVIET.PARTISAN_TROOPS_SMG","EBP.SOVIET.PENAL_BATTALION_TROOPS","EBP.SOVIET.PENAL_BATTALION_TROOPS_MP","EBP.SOVIET.PM41_82MM_MORTAR","EBP.SOVIET.PM41_82MM_MORTAR_MP","EBP.SOVIET.REFUGEE_FEMALE","EBP.SOVIET.REFUGEE_FEMALE_MP","EBP.SOVIET.REFUGEE_MALE","EBP.SOVIET.REFUGEE_MALE_MP","EBP.SOVIET.REPAIR_ENGINEER","EBP.SOVIET.REPAIR_ENGINEER_MP","EBP.SOVIET.REPAIR_STATION_MP","EBP.SOVIET.SAND_BAG_SOVIET","EBP.SOVIET.SAND_BAG_SOVIET_MP","EBP.SOVIET.SAND_BAG_SOVIET_TUTORIAL","EBP.SOVIET.SHERMAN_SOVIET","EBP.SOVIET.SHOCK_TROOPS","EBP.SOVIET.SHOCK_TROOPS_MP","EBP.SOVIET.SNIPER","EBP.SOVIET.SNIPER_ATK_TARGET","EBP.SOVIET.SNIPER_MP","EBP.SOVIET.SNIPER_RECON","EBP.SOVIET.SNIPER_RECON_MP","EBP.SOVIET.SOVIET_ALLIED_CARGO_PLANE","EBP.SOVIET.SOVIET_BASE_STAMPER","EBP.SOVIET.SOVIET_MINE","EBP.SOVIET.SOVIET_MINE_M08","EBP.SOVIET.SOVIET_MINE_MP","EBP.SOVIET.SOVIET_MINE_SP","EBP.SOVIET.SOVIET_MINE_TOW","EBP.SOVIET.SOVIET_OFFICER","EBP.SOVIET.SOVIET_OFFICER_MP","EBP.SOVIET.STEAM_TRAIN","EBP.SOVIET.SU_76M","EBP.SOVIET.SU_76M_MP","EBP.SOVIET.SU_85","EBP.SOVIET.SU_85_MP","EBP.SOVIET.T_34_76","EBP.SOVIET.T_34_76_MP","EBP.SOVIET.T_34_85","EBP.SOVIET.T_34_85_MP","EBP.SOVIET.T_70M","EBP.SOVIET.T_70M_MP","EBP.SOVIET.TANK_DEPOT","EBP.SOVIET.TANK_DEPOT_MP","EBP.SOVIET.TANKTRAP","EBP.SOVIET.TOW_COLD_WEAETHER_GUARD_TROOPS","EBP.SOVIET.US6_TRUCK","EBP.SOVIET.US6_TRUCK_MP","EBP.SOVIET.WEAPON_SUPPORT_CENTER","EBP.SOVIET.WEAPON_SUPPORT_CENTER_MP","EBP.SOVIET.WIRE_FIELD","EBP.SOVIET.WIRE_FIELD_MP","EBP.SOVIET.ZIS_6_TRANSPORT","EBP.SOVIET.ZIS_6_TRANSPORT_MP","SBP.SOVIET.BASE_CONSCRIPT_SQUAD","SBP.SOVIET.BASE_CONSCRIPT_SQUAD_MP","SBP.SOVIET.BOAT_01","SBP.SOVIET.CARGO_PLANE_SOVIET","SBP.SOVIET.COMBAT_ENGINEER_SQUAD","SBP.SOVIET.COMBAT_ENGINEER_SQUAD_MP","SBP.SOVIET.COMMISSAR_227","SBP.SOVIET.COMMISSAR_SQUAD_BATTLE","SBP.SOVIET.COMMISSAR_SQUAD_MP","SBP.SOVIET.COMMISSAR_SQUAD_TOW","SBP.SOVIET.CONSCRIPT_SQUAD","SBP.SOVIET.CONSCRIPT_SQUAD_MP","SBP.SOVIET.CONSCRIPT_SQUAD_TUTORIAL","SBP.SOVIET.DSHK_38_HMG_SQUAD","SBP.SOVIET.DSHK_38_HMG_SQUAD_MP","SBP.SOVIET.GUARDS_TROOPS","SBP.SOVIET.GUARDS_TROOPS_ASSAULT_MP","SBP.SOVIET.GUARDS_TROOPS_M08","SBP.SOVIET.GUARDS_TROOPS_MP","SBP.SOVIET.HM_120_38_MORTAR_SQUAD","SBP.SOVIET.HM_120_38_MORTAR_SQUAD_MP","SBP.SOVIET.IL_2_STUMOVIK_SQUAD","SBP.SOVIET.IL_2_STUMOVIK_SQUAD_ADVANCED_MP","SBP.SOVIET.IL_2_STUMOVIK_SQUAD_MP","SBP.SOVIET.IL_2_STURMOVIK_ANTI_TANK_BOMB_SQUAD_MP","SBP.SOVIET.IL_2_STURMOVIK_MARK_VEHICLE_SQUAD_MP","SBP.SOVIET.IL_2_STURMOVIK_RECON_SQUAD","SBP.SOVIET.IL_2_STURMOVIK_RECON_SQUAD_MP","SBP.SOVIET.IL_2_STURMOVIK_RECON_SQUAD_SP","SBP.SOVIET.IL_2_STURMOVIK_ROCKET_SP_SQUAD","SBP.SOVIET.IL_2_STURMOVIK_ROCKET_SP_SQUAD_MP","SBP.SOVIET.IL_2_STURMOVIK_ROCKET_SQUAD","SBP.SOVIET.IL_2_STURMOVIK_ROCKET_SQUAD_MP","SBP.SOVIET.IS_2","SBP.SOVIET.IS_2_MP","SBP.SOVIET.IS_2_TOW","SBP.SOVIET.ISU_152","SBP.SOVIET.ISU_152_MP","SBP.SOVIET.KATYUSHA_BM_13N_SQUAD","SBP.SOVIET.KATYUSHA_BM_13N_SQUAD_MP","SBP.SOVIET.KV_1","SBP.SOVIET.KV_1_COMMANDER_MP","SBP.SOVIET.KV_1_MP","SBP.SOVIET.KV_1_SP","SBP.SOVIET.KV_2","SBP.SOVIET.KV_2_MP","SBP.SOVIET.KV_2_TOW","SBP.SOVIET.KV_2_TOW_BATTLE","SBP.SOVIET.KV_8","SBP.SOVIET.KV_8_MP","SBP.SOVIET.M01_CONSCRIPT_SQUAD_DOCKS","SBP.SOVIET.M01_CONSCRIPT_SQUAD_HARMLESS","SBP.SOVIET.M01_CONSCRIPT_SQUAD_HARMLESS_DURABLE","SBP.SOVIET.M01_CONSCRIPT_SQUAD_WOUNDED","SBP.SOVIET.M01_IL_2_STURMOVIK_ROCKET_SQUAD","SBP.SOVIET.M01_IL2_DOGFIGHT","SBP.SOVIET.M01_MEDIC","SBP.SOVIET.M02_COMBAT_ENGINEER_SQUAD","SBP.SOVIET.M02_REFUGEE_SQUAD","SBP.SOVIET.M08_COMBAT_ENGINEER_SQUAD","SBP.SOVIET.M08_T_34_76_SQUAD_SMALLPATH","SBP.SOVIET.M08_TANK_BUSTER_CONSCRIPT_SQUAD","SBP.SOVIET.M11_ANIA_SNIPER_SQUAD","SBP.SOVIET.M11_ISAKOVICH_SQUAD","SBP.SOVIET.M11_PARTISAN_SQUAD_KAR98K_RIFLE","SBP.SOVIET.M11_PARTISAN_SQUAD_NAGANT_RIFLE","SBP.SOVIET.M11_PARTISAN_SQUAD_NOWEAPON","SBP.SOVIET.M11_SNIPER_TEAM","SBP.SOVIET.M1910_MAXIM_HEAVY_MACHINE_GUN_SQUAD","SBP.SOVIET.M1910_MAXIM_HEAVY_MACHINE_GUN_SQUAD_MP","SBP.SOVIET.M1931_203MM_B_4_HOWITZER_ARTILLERY","SBP.SOVIET.M1931_203MM_B_4_HOWITZER_ARTILLERY_COMMANDER_MP","SBP.SOVIET.M1931_203MM_B_4_HOWITZER_ARTILLERY_MP","SBP.SOVIET.M1937_152MM_ML_20_ARTILLERY","SBP.SOVIET.M1937_152MM_ML_20_ARTILLERY_MP","SBP.SOVIET.M1937_53_K_45MM_AT_GUN_SQUAD","SBP.SOVIET.M1937_53_K_45MM_AT_GUN_SQUAD_MP","SBP.SOVIET.M1942_ZIS_3_76MM_AT_GUN_SQUAD","SBP.SOVIET.M1942_ZIS_3_76MM_AT_GUN_SQUAD_MP","SBP.SOVIET.M3A1_SCOUT_CAR_SQUAD","SBP.SOVIET.M3A1_SCOUT_CAR_SQUAD_MP","SBP.SOVIET.M5_HALFTRACK__ASSAULT_SQUAD_MP","SBP.SOVIET.M5_HALFTRACK_SQUAD","SBP.SOVIET.M5_HALFTRACK_SQUAD_MP","SBP.SOVIET.PARTISAN_SQUAD_GRANATEWERFER_34_81MM_MORTAR","SBP.SOVIET.PARTISAN_SQUAD_GRANATEWERFER_34_81MM_MORTAR_MP","SBP.SOVIET.PARTISAN_SQUAD_KAR98K_RIFLE","SBP.SOVIET.PARTISAN_SQUAD_KAR98K_RIFLE_MP","SBP.SOVIET.PARTISAN_SQUAD_MAXIM_HMG","SBP.SOVIET.PARTISAN_SQUAD_MAXIM_HMG_MP","SBP.SOVIET.PARTISAN_SQUAD_MG42_HMG","SBP.SOVIET.PARTISAN_SQUAD_MG42_HMG_MP","SBP.SOVIET.PARTISAN_SQUAD_NAGANT_RIFLE","SBP.SOVIET.PARTISAN_SQUAD_NAGANT_RIFLE_MP","SBP.SOVIET.PARTISAN_SQUAD_PM_82_41_MORTAR","SBP.SOVIET.PARTISAN_SQUAD_PM_82_41_MORTAR_MP","SBP.SOVIET.PARTISANS_LMG_MP","SBP.SOVIET.PARTISANS_PANZERSCHRECK_MP","SBP.SOVIET.PARTISANS_PTRS_MP","SBP.SOVIET.PARTISANS_RIFLE_MP","SBP.SOVIET.PARTISANS_SMG_MP","SBP.SOVIET.PENAL_BATTALION","SBP.SOVIET.PENAL_BATTALION_MP","SBP.SOVIET.PM_82_41_MORTAR_SQUAD","SBP.SOVIET.PM_82_41_MORTAR_SQUAD_MP","SBP.SOVIET.SHOCK_TROOPS","SBP.SOVIET.SHOCK_TROOPS_M11","SBP.SOVIET.SHOCK_TROOPS_MP","SBP.SOVIET.SNIPER_TEAM","SBP.SOVIET.SNIPER_TEAM_MALE","SBP.SOVIET.SNIPER_TEAM_MP","SBP.SOVIET.SOVIET_76MM_SHERMAN_MP","SBP.SOVIET.SOVIET_ALLIED_CARGO_PLANE","SBP.SOVIET.SOVIET_OFFICER_SQUAD","SBP.SOVIET.SOVIET_OFFICER_SQUAD_MP","SBP.SOVIET.STEAM_TRAIN","SBP.SOVIET.SU_76M","SBP.SOVIET.SU_76M_MP","SBP.SOVIET.SU_76M_TOW","SBP.SOVIET.SU_85","SBP.SOVIET.SU_85_MP","SBP.SOVIET.T_34_76_SQUAD","SBP.SOVIET.T_34_76_SQUAD_MP","SBP.SOVIET.T_34_85_ADVANCED_SQUAD_MP","SBP.SOVIET.T_34_85_SQUAD","SBP.SOVIET.T_34_85_SQUAD_MP","SBP.SOVIET.T_70M","SBP.SOVIET.T_70M_MP","SBP.SOVIET.TOW_BRIDGE_PARTISAN_SQUAD_AT","SBP.SOVIET.TOW_BRIDGE_PARTISAN_SQUAD_BASE","SBP.SOVIET.TOW_BRIDGE_PARTISAN_SQUAD_MAXIM","SBP.SOVIET.TOW_BRIDGE_PARTISAN_SQUAD_MORTAR","SBP.SOVIET.TOW_COLD_WEATHER_GUARDS_TROOPS","SBP.SOVIET.TOW_PARTISAN_SQUAD_KAR98K_RIFLE_MP","SBP.SOVIET.TOW_PARTISAN_SQUAD_LMG_SQUAD","SBP.SOVIET.TOW_PARTISAN_SQUAD_MAXIM_HMG_MP","SBP.SOVIET.US6_TRUCK_SQUAD","SBP.SOVIET.ZIS_6_TRANSPORT_TRUCK","SBP.SOVIET.ZIS_6_TRANSPORT_TRUCK_MP","ABILITY.SOVIET.ALLIED_AIR_SUPPLIES","ABILITY.SOVIET.ANTI_PERSONNEL_MINES","ABILITY.SOVIET.ANTI_TANK_GRENADE","ABILITY.SOVIET.ANTI_TANK_GRENADE_ASSAULT","ABILITY.SOVIET.ANTI_TANK_GRENADE_MP","ABILITY.SOVIET.ANTI_TANK_GRENADE_NO_REQUIREMENTS_MP","ABILITY.SOVIET.AT_76MM_HE_BARRAGE_ABILITY","ABILITY.SOVIET.AT_76MM_HE_BARRAGE_ABILITY_MP","ABILITY.SOVIET.AT_GUN_AMBUSH_TACTICS","ABILITY.SOVIET.B4_203MM_BARRAGE","ABILITY.SOVIET.B4_203MM_BARRAGE_COMMANDER_MP","ABILITY.SOVIET.B4_203MM_BARRAGE_COMMANDER_PRECISE_MP","ABILITY.SOVIET.B4_203MM_BARRAGE_COMMANDER_VET3_MP","ABILITY.SOVIET.B4_203MM_BARRAGE_COMMANDER_VICTORTARGET_MP","ABILITY.SOVIET.B4_203MM_BARRAGE_MP","ABILITY.SOVIET.B4_203MM_DIRECT_FIRE","ABILITY.SOVIET.B4_203MM_HOWITZER","ABILITY.SOVIET.BASE_CONSCRIPT_DISPATCH","ABILITY.SOVIET.BASE_CONSCRIPT_DISPATCH_MP","ABILITY.SOVIET.BOMBARDMENT_FX","ABILITY.SOVIET.BOOBY_TRAP","ABILITY.SOVIET.BUTTON_VEHICLE","ABILITY.SOVIET.BUTTON_VEHICLE_MP","ABILITY.SOVIET.BUTTON_VEHICLE_TOW","ABILITY.SOVIET.CAMPAIGN_SHOCK_FIRE_SUPERIORITY","ABILITY.SOVIET.CMD_120MM_MORTAR_CREW","ABILITY.SOVIET.CMD_ADVANCED_T34_85_MEDIUM_TANK","ABILITY.SOVIET.CMD_AT_GUN_AMBUSH_TACTICS_MP","ABILITY.SOVIET.CMD_CONSCRIPT_ASSAULT_PACKAGE","ABILITY.SOVIET.CMD_CONSCRIPT_EVASIVE_TACTICS","ABILITY.SOVIET.CMD_CONSCRIPT_REPAIR_KIT","ABILITY.SOVIET.CMD_GUARD_TROOPS","ABILITY.SOVIET.CMD_IS2_HEAVY_TANK","ABILITY.SOVIET.CMD_ISU_152","ABILITY.SOVIET.CMD_KATYUSHA","ABILITY.SOVIET.CMD_KV_1_UNLOCK","ABILITY.SOVIET.CMD_KV_8_UNLOCK_MP","ABILITY.SOVIET.CMD_ML_20","ABILITY.SOVIET.CMD_PENAL_BATTALION","ABILITY.SOVIET.CMD_RADIO_INTERCEPT","ABILITY.SOVIET.CMD_SHOCK_TROOPS","ABILITY.SOVIET.CMD_SOVIET_INDUSTRY","ABILITY.SOVIET.CMD_T34_85_MEDIUM_TANK","ABILITY.SOVIET.CMD_VEHICLE_CREW_REPAIR_TRAINING","ABILITY.SOVIET.COMMISSAR_SQUAD_MP","ABILITY.SOVIET.CONE_LOS_TOGGLE_ABILITY","ABILITY.SOVIET.CONE_LOS_TOGGLE_ABILITY_MP","ABILITY.SOVIET.CONSCRIPT_ANTI_TANK_GRENADE_ASSAULT_MP","ABILITY.SOVIET.CONSCRIPT_DISPATCH_MP","ABILITY.SOVIET.CONSCRIPT_EVASIVE_TACTICS","ABILITY.SOVIET.CONSCRIPT_EVASIVE_TACTICS_MP","ABILITY.SOVIET.CONSCRIPT_MOLOTOV_COCKTAIL","ABILITY.SOVIET.CONSCRIPT_MOLOTOV_COCKTAIL_MP","ABILITY.SOVIET.CONSCRIPT_OORAH","ABILITY.SOVIET.CONSCRIPT_OORAH_MP","ABILITY.SOVIET.CONSCRIPT_PTRS_UPGRADE","ABILITY.SOVIET.DSHK_ARMOR_PIERCING","ABILITY.SOVIET.DSHK_MP","ABILITY.SOVIET.ENGINEER_SALVAGE_WRECK","ABILITY.SOVIET.FATALITY_FEAR_PROPAGANDA_ARTILLERY","ABILITY.SOVIET.FATALITY_INCENDIARY_ARTILLERY","ABILITY.SOVIET.FATALITY_KATYUSHA_ROCKETS","ABILITY.SOVIET.FEAR_PROPAGANDA_ARTILLERY","ABILITY.SOVIET.FIELDCRAFT_TRIP_FLARE","ABILITY.SOVIET.FIELDCRAFT_TRIP_FLARE_MP","ABILITY.SOVIET.FIRE_ARTILLERY","ABILITY.SOVIET.FOR_MOTHER_RUSSIA_ABILITY","ABILITY.SOVIET.FORWARD_HQ","ABILITY.SOVIET.FRONTOVIKI_CONSCRIPT_DISPATCH","ABILITY.SOVIET.GUARDS_THROW_DEFENSIVE_GRENADE","ABILITY.SOVIET.GUARDS_THROW_DEFENSIVE_GRENADE_MP","ABILITY.SOVIET.HOLD_THE_LINE","ABILITY.SOVIET.IL_2_ANTI_TANK_BOMB_STRIKE","ABILITY.SOVIET.IL_2_ATTACK_STRAFE","ABILITY.SOVIET.IL_2_BOMBING_RUN_SP","ABILITY.SOVIET.IL_2_PRECISION_BOMB_STRIKE","ABILITY.SOVIET.IL_2_RECON","ABILITY.SOVIET.IL_2_RECON_SINGLEPASS_SP","ABILITY.SOVIET.IL_2_RECON_SP","ABILITY.SOVIET.IL_2_STURMOVIK_ATTACK","ABILITY.SOVIET.IL_2_STURMOVIK_ATTACK_ADVANCED","ABILITY.SOVIET.IL_2_SUPPORT","ABILITY.SOVIET.IL_2_SUPPORT_PRECISION_SP","ABILITY.SOVIET.IL_2_SUPPORT_SP","ABILITY.SOVIET.IS2_DISPATCH_SP","ABILITY.SOVIET.IS2_TANK_DEFENSIVE_WEAPON_MP","ABILITY.SOVIET.ISU_152_DISPATCH_SP","ABILITY.SOVIET.ISU_152_PIERCING_SHOT_ABILITY","ABILITY.SOVIET.ISU_152_PIERCING_SHOT_ABILITY_MP","ABILITY.SOVIET.ISU152_AMMO_SWITCH_AP_SHELL_MP","ABILITY.SOVIET.ISU152_AMMO_SWITCH_HE_SHELL_MP","ABILITY.SOVIET.ISU152_CONCRETE_PIERCING_ROUND_MP","ABILITY.SOVIET.KATUSHYA_CREEPING_BARRAGE_MP","ABILITY.SOVIET.KAYTUSHA_ROCKET_TRUCK_BARRAGE","ABILITY.SOVIET.KAYTUSHA_ROCKET_TRUCK_BARRAGE_MP","ABILITY.SOVIET.KAYTUSHA_ROCKET_TRUCK_BARRAGE_VET3_MP","ABILITY.SOVIET.KAYTUSHA_ROCKET_TRUCK_BARRAGE_VICTORTARGET_MP","ABILITY.SOVIET.KAYTUSHA_ROCKET_TRUCK_CREEPING_BARRAGE_MP","ABILITY.SOVIET.KAYTUSHA_ROCKET_TRUCK_PRECISION_BARRAGE","ABILITY.SOVIET.KAYTUSHA_ROCKET_TRUCK_PRECISION_BARRAGE_MP","ABILITY.SOVIET.KV_2","ABILITY.SOVIET.KV_2_SEIGE_MODE","ABILITY.SOVIET.KV_8_FLAME_45MM_TOGGLE_MP","ABILITY.SOVIET.LIGHT_ANTI_VEHICLE_MINES","ABILITY.SOVIET.M_42_AT_GUN","ABILITY.SOVIET.M11_PARTISANS_DISPATCH_KARK98K","ABILITY.SOVIET.M11_PARTISANS_DISPATCH_NAGANT","ABILITY.SOVIET.M11_SNIPER_DISPATCH02","ABILITY.SOVIET.M11_SNIPER_DISPATCH02_MP","ABILITY.SOVIET.M11_SNIPER_HOLD_FIRE","ABILITY.SOVIET.M3A1_M5_MOVING_ACCURACY_MP","ABILITY.SOVIET.M5_HALFTRACK_ASSAULT","ABILITY.SOVIET.M5_M3A1_OVERDRIVE","ABILITY.SOVIET.M5_M3A1_OVERDRIVE_MP","ABILITY.SOVIET.MANPOWER_BLITZ","ABILITY.SOVIET.MARK_VEHICLE","ABILITY.SOVIET.MAXIM_HMG_DISPATCH_SP","ABILITY.SOVIET.MERGE_ABILITY","ABILITY.SOVIET.MERGE_ABILITY_MP","ABILITY.SOVIET.ML_20_152MM_BARRAGE_ABILITY","ABILITY.SOVIET.ML_20_152MM_BARRAGE_ABILITY_MP","ABILITY.SOVIET.ML_20_152MM_BARRAGE_ABILITY_SLOW","ABILITY.SOVIET.ML_20_152MM_BARRAGE_ABILITY_SLOW_MP","ABILITY.SOVIET.ML_20_152MM_BARRAGE_ABILITY_VET_1_MP","ABILITY.SOVIET.ML_20_152MM_BARRAGE_ABILITY_VET3_MP","ABILITY.SOVIET.ML_20_152MM_BARRAGE_ABILITY_VICTORTARGET_MP","ABILITY.SOVIET.ML_20_152MM_BARRAGE_PRECISON_ABILITY_MP","ABILITY.SOVIET.MORTAR_EXPLOSION_FX","ABILITY.SOVIET.MORTAR_EXPLOSION_FX_ICE","ABILITY.SOVIET.MORTAR_FIRE_FLARES_ABILITY_MP","ABILITY.SOVIET.MORTAR_PRECISION_BARRAGE_120MM_VET","ABILITY.SOVIET.MORTAR_PRECISION_BARRAGE_120MM_VET_MP","ABILITY.SOVIET.MORTAR_PRECISION_BARRAGE_82MM","ABILITY.SOVIET.MORTAR_PRECISION_BARRAGE_82MM_MP","ABILITY.SOVIET.NO_RETREAT_NO_SURRENDER","ABILITY.SOVIET.PARTISAN_DISPATCH","ABILITY.SOVIET.PARTISAN_DISPATCH_TOW","ABILITY.SOVIET.PARTISAN_MOLOTOV_COCKTAIL_MP","ABILITY.SOVIET.PARTISANS_COMMANDER_ANTI_INFANTRY","ABILITY.SOVIET.PARTISANS_COMMANDER_ANTI_VEHICLE","ABILITY.SOVIET.PENAL_OORAH_MP","ABILITY.SOVIET.PENAL_TROOP_DISPATCH_SINGLE_SP","ABILITY.SOVIET.PENAL_TROOP_DISPATCH_SP","ABILITY.SOVIET.RAPID_CONSCRIPTION","ABILITY.SOVIET.REPAIR_STATION","ABILITY.SOVIET.RG_42_ANTI_PERSONNEL_GRENADE","ABILITY.SOVIET.RG_42_ANTI_PERSONNEL_GRENADE_MP","ABILITY.SOVIET.RGD_1_SMOKE_GRENADE","ABILITY.SOVIET.RGD_1_SMOKE_GRENADE_MP","ABILITY.SOVIET.RGD_33_PARTISAN_GRENADE_MP","ABILITY.SOVIET.SALVAGE_KITS","ABILITY.SOVIET.SATCHEL_CHARGE_THROW_ABILITY_MP","ABILITY.SOVIET.SCORCHED_EARTH_POLICY","ABILITY.SOVIET.SCORCHED_EARTH_POLICY_MP","ABILITY.SOVIET.SHERMAN_SOVIET_DISPATCH","ABILITY.SOVIET.SHERMAN76MM_AMMO_SWITCH_AP_SHELL_MP","ABILITY.SOVIET.SHERMAN76MM_AMMO_SWITCH_HE_SHELL_MP","ABILITY.SOVIET.SHOCK_TROOP_DISPATCH_SP","ABILITY.SOVIET.SHOCK_TROOP_SMOKE_GRENADES","ABILITY.SOVIET.SMOKE_120MM_MORTAR_BARRAGE","ABILITY.SOVIET.SMOKE_120MM_MORTAR_BARRAGE_MP","ABILITY.SOVIET.SMOKE_SYNC_MORTAR_BARRAGE","ABILITY.SOVIET.SMOKE_SYNC_MORTAR_BARRAGE_MP","ABILITY.SOVIET.SNIPER_DELAYED_COVER_AUTO_CAMOUFLAGE","ABILITY.SOVIET.SNIPER_DELAYED_COVER_AUTO_CAMOUFLAGE_MP","ABILITY.SOVIET.SNIPER_FIRE_FLARES_ABILITY","ABILITY.SOVIET.SNIPER_FIRE_FLARES_ABILITY_MP","ABILITY.SOVIET.SNIPER_HMG_SPRINT","ABILITY.SOVIET.SNIPER_HMG_SPRINT_MP","ABILITY.SOVIET.SNIPER_HOLD_FIRE","ABILITY.SOVIET.SNIPER_HOLD_FIRE_MP","ABILITY.SOVIET.SNIPER_IN_COVER_AUTO_CAMOUFLAGE","ABILITY.SOVIET.SNIPER_IN_COVER_AUTO_CAMOUFLAGE_MP","ABILITY.SOVIET.SNIPER_SUPPRESSION_FIRE_ABILITY","ABILITY.SOVIET.SNIPER_SUPPRESSION_FIRE_ABILITY_MP","ABILITY.SOVIET.SOV_VEHICLE_HOLD_FIRE_MP","ABILITY.SOVIET.SOVIET_BARBED_WIRE_CUTTING_ABILITY","ABILITY.SOVIET.SOVIET_BARBED_WIRE_CUTTING_ABILITY_MP","ABILITY.SOVIET.SOVIET_CAMO_HOLD_FIRE_MP","ABILITY.SOVIET.SOVIET_CONSCRIPT_REPAIR_ABILITY","ABILITY.SOVIET.SOVIET_CONSCRIPT_REPAIR_ABILITY_MP","ABILITY.SOVIET.SOVIET_HQ_ENGINEER_CALL_IN","ABILITY.SOVIET.SOVIET_INDUSTRY","ABILITY.SOVIET.SOVIET_REPAIR_ABILITY","ABILITY.SOVIET.SOVIET_REPAIR_ABILITY_MP","ABILITY.SOVIET.SOVIET_WAR_MACHINE_SP","ABILITY.SOVIET.SPY_NETWORK","ABILITY.SOVIET.SU_76_BARRAGE_ABILITY","ABILITY.SOVIET.SU_76_BARRAGE_ABILITY_MP","ABILITY.SOVIET.SU76_SU85_ZIS3_53K_ISU152_INFANTRY_TRACKING","ABILITY.SOVIET.SU76_SU85_ZIS3_53K_ISU152_INFANTRY_TRACKING_MP","ABILITY.SOVIET.SYNC_MORTAR_BARRAGE","ABILITY.SOVIET.SYNC_MORTAR_BARRAGE_120MM","ABILITY.SOVIET.SYNC_MORTAR_BARRAGE_120MM_MP","ABILITY.SOVIET.SYNC_MORTAR_BARRAGE_120MM_VICTORTARGET_MP","ABILITY.SOVIET.SYNC_MORTAR_BARRAGE_MP","ABILITY.SOVIET.SYNC_MORTAR_BARRAGE_VICTORTARGET_MP","ABILITY.SOVIET.T_34_RAMMING_ABILITY","ABILITY.SOVIET.T_34_RAMMING_ABILITY_MP","ABILITY.SOVIET.T70_CREW_REPAIR_ABILITY","ABILITY.SOVIET.T70_CREW_REPAIR_ABILITY_MP","ABILITY.SOVIET.TANK_DETECTION_ABILITY","ABILITY.SOVIET.TANK_TRAPS","ABILITY.SOVIET.TANK_VET_POINT_CAPTURE_ABILITY","ABILITY.SOVIET.TANK_VET_POINT_CAPTURE_ABILITY_MP","ABILITY.SOVIET.TO_THE_LAST_MAN_MP","ABILITY.SOVIET.VEHICLE_CREW_REPAIR_ABILITY","ABILITY.SOVIET.VEHICLE_CREW_REPAIR_ABILITY_MP","ABILITY.SOVIET.VEHICLE_CREW_REPAIR_TOGGLE_MP","ABILITY.SOVIET.VEHICLE_RECON_TOGGLE","ABILITY.SOVIET.VEHICLE_RECON_TOGGLE_MP","ABILITY.SOVIET.VEHICLE_RECON_TOGGLE_VET2_MP","UPG.SOVIET.ABILITY_LOCK_OUT_CONSCRIPT","UPG.SOVIET.ABILITY_LOCK_OUT_CONSCRIPT_MP","UPG.SOVIET.ALLIED_AIR_SUPPLIES","UPG.SOVIET.ANTI_PERSONNEL_MINES","UPG.SOVIET.ANTI_TANK_GUN_AMBUSH_TACTICS","UPG.SOVIET.BASE_CONSCRIPT_AT_GRENADE_UNLOCK","UPG.SOVIET.BASE_CONSCRIPT_AT_GRENADE_UNLOCK_MP","UPG.SOVIET.BASE_CONSCRIPT_MOLOTOV_UNLOCK","UPG.SOVIET.BASE_CONSCRIPT_MOLOTOV_UNLOCK_MP","UPG.SOVIET.BASE_CONSCRIPT_OORAH_UNLOCK","UPG.SOVIET.BASE_CONSCRIPT_OORAH_UNLOCK_MP","UPG.SOVIET.BASE_CONSCRIPT_REPAIR_UNLOCK_MP","UPG.SOVIET.BASE_CONSCRIPT_RIFLE_UNLOCK_MP","UPG.SOVIET.BOOBY_TRAP","UPG.SOVIET.CAMOUFLAGE_NET_ACTIVATED_SOVIET","UPG.SOVIET.COMMANDER_T34_85_MP","UPG.SOVIET.COMMISSAR_SQUAD","UPG.SOVIET.CONSCRIPT_ASSAULT_PACKAGE","UPG.SOVIET.CONSCRIPT_ASSAULT_PACKAGE_INGAME","UPG.SOVIET.CONSCRIPT_AT_GRENADE_ASSAULT","UPG.SOVIET.CONSCRIPT_DP_28_LMG_PACKAGE","UPG.SOVIET.CONSCRIPT_EVASIVE_TACTICS","UPG.SOVIET.CONSCRIPT_MOBILIZE_UNLOCK","UPG.SOVIET.CONSCRIPT_PTRS","UPG.SOVIET.CONSCRIPT_PTRS_PACKAGE","UPG.SOVIET.CONSCRIPT_REPAIR_KIT","UPG.SOVIET.DEMO_IL_2_STRAFING_RUN","UPG.SOVIET.DSHK_MACHINEGUN","UPG.SOVIET.ENGINEER_FLAMETHROWER","UPG.SOVIET.ENGINEER_FLAMETHROWER_MP","UPG.SOVIET.ENGINEER_MINESWEEPER","UPG.SOVIET.ENGINEER_MINESWEEPER_MP","UPG.SOVIET.ENGINEER_SALVAGE_KIT","UPG.SOVIET.ENGINEER_SALVAGE_KITS_UNLOCK","UPG.SOVIET.EVASIVE_TACTICS_IS_ON","UPG.SOVIET.FEAR_PROPAGANDA","UPG.SOVIET.FIRE_ARTILLERY","UPG.SOVIET.FOR_MOTHER_RUSSIA","UPG.SOVIET.FORWARD_HQ","UPG.SOVIET.FORWARD_HQ_AURA","UPG.SOVIET.GUARD_ARCHETYPE","UPG.SOVIET.GUARD_DP_28_LMG_PACKAGE","UPG.SOVIET.GUARD_DP_28_LMG_PACKAGE_MP","UPG.SOVIET.GUARD_TROOPS","UPG.SOVIET.HM120_MORTAR_UNLOCK","UPG.SOVIET.HOLD_FIRE_SOVIET_CAMMO","UPG.SOVIET.HOLD_THE_LINE","UPG.SOVIET.HOWTIZER_203MM","UPG.SOVIET.HQ_ANTI_TANK_GRENADE","UPG.SOVIET.HQ_ANTI_TANK_GRENADE_MP","UPG.SOVIET.HQ_CONSCRIPT_REPAIR_KIT","UPG.SOVIET.HQ_HEALING_AURA","UPG.SOVIET.HQ_HEALING_AURA_M13","UPG.SOVIET.HQ_HEALING_AURA_MP","UPG.SOVIET.HQ_MOLOTOV_GRENADE_MP","UPG.SOVIET.IL_2_ANTI_TANK_BOMB","UPG.SOVIET.IL_2_BOMB_STRIKE","UPG.SOVIET.IL_2_RECON","UPG.SOVIET.IL_2_STURMOVIK_ATTACK","UPG.SOVIET.IL_2_STURMOVIK_ATTACK_ADVANCED","UPG.SOVIET.IL_2_SUPPORT","UPG.SOVIET.IS_2_SUPPORT","UPG.SOVIET.IS2_TOP_GUNNER","UPG.SOVIET.IS2_TOP_GUNNER_MP","UPG.SOVIET.ISAKOVICH_A01","UPG.SOVIET.ISU152_HE_ROUNDS","UPG.SOVIET.ISU152_TOP_GUNNER","UPG.SOVIET.ISU152_TOP_GUNNER_MP","UPG.SOVIET.ISU152_UNLOCK","UPG.SOVIET.KATYUSHA_UNLOCK","UPG.SOVIET.KV_1_UNLOCK_DEMO","UPG.SOVIET.KV_8_UNLOCK","UPG.SOVIET.KV1_UNLOCK","UPG.SOVIET.KV2_UNLOCK","UPG.SOVIET.LIGHT_ANTI_VEHICLE_MINES","UPG.SOVIET.M_42_AT_GUN","UPG.SOVIET.M3_HALFTRACK_ASSAULT","UPG.SOVIET.M5_HALFTRACK_72K_AA_GUN_PACKAGE","UPG.SOVIET.M5_HALFTRACK_72K_AA_GUN_PACKAGE_MP","UPG.SOVIET.MANPOWER_BLITZ","UPG.SOVIET.MARK_VEHICLE","UPG.SOVIET.ML_20_HOWITZER_UNLOCK","UPG.SOVIET.NKVD_ARCHETYPE","UPG.SOVIET.ORDER_227_DISABLE","UPG.SOVIET.ORDER_227_LOCKDOWN","UPG.SOVIET.ORDER227","UPG.SOVIET.PARTISAN_COMMANDER_ANTIVEHICLE_TROOPS","UPG.SOVIET.PARTISAN_COMMANDER_TROOPS","UPG.SOVIET.PARTISAN_HEALTH_UPGRADE","UPG.SOVIET.PARTISAN_HEALTH_UPGRADE_TANK_HUNTER","UPG.SOVIET.PARTISAN_TROOPS","UPG.SOVIET.PARTISAN_TROOPS_TOW","UPG.SOVIET.PENAL_BATTALION","UPG.SOVIET.PENAL_BATTALION_FLAMETHROWER_PACKAGE","UPG.SOVIET.PENAL_BATTALION_FLAMETHROWER_PACKAGE_MP","UPG.SOVIET.PPSH_41_SUB_MACHINE_GUN_UPGRADE","UPG.SOVIET.PPSH_41_SUB_MACHINE_GUN_UPGRADE_MP","UPG.SOVIET.PTRS_41_AT_RIFLE_PACKAGE_GUARD_TROOP","UPG.SOVIET.PTRS_41_AT_RIFLE_PACKAGE_GUARD_TROOP_ASSAULT_MP","UPG.SOVIET.PTRS_41_AT_RIFLE_PACKAGE_GUARD_TROOP_BETTER_BALANCED","UPG.SOVIET.PTRS_41_AT_RIFLE_PACKAGE_GUARD_TROOP_MP","UPG.SOVIET.RADIO_INTERCEPT","UPG.SOVIET.RAPID_CONSCRIPTION","UPG.SOVIET.REPAIR_BUNKER","UPG.SOVIET.SCORCHED_EARTH_POLICY","UPG.SOVIET.SCORCHED_EARTH_POLICY_MP","UPG.SOVIET.SHERMAN_SOVIET_DISPATCH","UPG.SOVIET.SHERMAN_SOVIET_TOP_GUNNER","UPG.SOVIET.SHOCK_ARCHETYPE","UPG.SOVIET.SHOCK_TROOPS","UPG.SOVIET.SHOCK_TROOPS_SP","UPG.SOVIET.SOVIET_GRENADES_LONG_TIMER","UPG.SOVIET.SOVIET_INDUSTRY","UPG.SOVIET.SPY_NETWORK","UPG.SOVIET.T34_85_ADVANCED_UNLOCK","UPG.SOVIET.T34_85_UNLOCK","UPG.SOVIET.TANK_DETECTION","UPG.SOVIET.TANK_RAID_ENABLED","UPG.SOVIET.TANK_TRAPS","UPG.SOVIET.TOW_1941_SOVIET","UPG.SOVIET.VEHICLE_SELF_REPAIR_TRAINING","EBP.WEST_GERMAN.ANTI_TANK_GUN_CREW_MP","EBP.WEST_GERMAN.ARMORED_CAR_SDKFZ_223","EBP.WEST_GERMAN.ARTY_CREW_MP","EBP.WEST_GERMAN.ASSAULT_PIONEER_MP","EBP.WEST_GERMAN.ASSAULT_PIONEERS_HEAVY_MINE_MP","EBP.WEST_GERMAN.BASE_FLAK_GUN_MP","EBP.WEST_GERMAN.BASE_FLAK_SANDBAGS","EBP.WEST_GERMAN.BUNKER_WESTGERMAN_MP","EBP.WEST_GERMAN.FALLSCHIRMJAGER_MP","EBP.WEST_GERMAN.FIELD_OFFICER_MP","EBP.WEST_GERMAN.FLAK_EMPLACEMENT","EBP.WEST_GERMAN.FLAK_EMPLACEMENT_BASE","EBP.WEST_GERMAN.FLAK_EMPLACEMENT_CREW","EBP.WEST_GERMAN.FLAK_EMPLACEMENT_CREW_BASE","EBP.WEST_GERMAN.GOLIATH_MP","EBP.WEST_GERMAN.GRANATWERFER_34_81MM_MORTAR_WG_MP","EBP.WEST_GERMAN.HALFTRACK_SDKFZ_251_17_FLAK_MP","EBP.WEST_GERMAN.HALFTRACK_SDKFZ_251_20_IR_SEARCHLIGHT_MP","EBP.WEST_GERMAN.HALFTRACK_SDKFZ_251_20_IR_SEARCHLIGHT_SP","EBP.WEST_GERMAN.HALFTRACK_SDKFZ_251_MP_2","EBP.WEST_GERMAN.HALFTRACK_SDKFZ_251_WURFRAHMEN_40_MP","EBP.WEST_GERMAN.HEAVY_ARMOR_SUPPORT_MP","EBP.WEST_GERMAN.HEAVY_ARMOR_SUPPORT_PREPLACED","EBP.WEST_GERMAN.HETZER_MP","EBP.WEST_GERMAN.HMG_CREW_MP","EBP.WEST_GERMAN.HOWITZER_105MM_LE_FH18_MINICHALLENGE","EBP.WEST_GERMAN.HOWITZER_105MM_LONG_RANGE","EBP.WEST_GERMAN.INFANTRY_SUPPORT_MP","EBP.WEST_GERMAN.INFANTRY_SUPPORT_PREPLACED","EBP.WEST_GERMAN.JAEGER_LIGHT_INFANTRY_RECON","EBP.WEST_GERMAN.JAGDPANZER_IV_SDKFZ_162_MP","EBP.WEST_GERMAN.JAGDTIGER_SDKFZ_186_MP","EBP.WEST_GERMAN.JU52_PARATROOPER_PLANE","EBP.WEST_GERMAN.JU52_PLANE","EBP.WEST_GERMAN.KING_TIGER_SDKFZ_182_MP","EBP.WEST_GERMAN.KUBELWAGEN_TYPE_82_MP","EBP.WEST_GERMAN.LE_IG_18_INF_SUPPORT_GUN_MP","EBP.WEST_GERMAN.LIGHT_ARMOR_SUPPORT_MP","EBP.WEST_GERMAN.LIGHT_ARMOR_SUPPORT_PREPLACED","EBP.WEST_GERMAN.MED_SUPPLY_STASH","EBP.WEST_GERMAN.MG34_HMG_CREW","EBP.WEST_GERMAN.MG34_HMG_MP","EBP.WEST_GERMAN.MG42_HMG_WG_MP","EBP.WEST_GERMAN.MINE_FIELD_WESTGERMAN_MP","EBP.WEST_GERMAN.MORTAR_TEAM_CREW_MP","EBP.WEST_GERMAN.OBERSOLDATEN_MP","EBP.WEST_GERMAN.OKW_HOWITZER_105MM_LE_FH18_MP","EBP.WEST_GERMAN.OKW_HOWITZER_CREW_MP","EBP.WEST_GERMAN.OSTWIND_FLAK_PANZER_WEST_GERMAN_MP","EBP.WEST_GERMAN.PAK40_75MM_AT_GUN_WG_MP","EBP.WEST_GERMAN.PAK43_88MM_AT_GUN_WESTGERMAN_MP","EBP.WEST_GERMAN.PANTHER_SDKFZ_171_AUSF_G_MP","EBP.WEST_GERMAN.PANTHER_SDKFZ_171_COMMANDER_MP","EBP.WEST_GERMAN.PANZER_II_LUCHS_SDKFZ_123_MP","EBP.WEST_GERMAN.PANZER_IV_SDKFZ_AUSF_J_MP","EBP.WEST_GERMAN.PANZERFUSILIER_MP","EBP.WEST_GERMAN.PUMA_SDKFZ_234_MP","EBP.WEST_GERMAN.RAKETENWERFER43_88MM_PUPPCHEN_ANTITANK_GUN_MP","EBP.WEST_GERMAN.REINFORCED_BARBED_WIRE_FENCE_MP","EBP.WEST_GERMAN.REINFORCED_BARBED_WIRE_TANK_TRAP_MP","EBP.WEST_GERMAN.SCHU_MINE_42_MP","EBP.WEST_GERMAN.SIPHON_STRUCTURE","EBP.WEST_GERMAN.STURMTIGER_606_38CM_RW_61_MP","EBP.WEST_GERMAN.SWS_HALFTRACK_MP","EBP.WEST_GERMAN.SWS_HALFTRACK_SP","EBP.WEST_GERMAN.TERROR_OFFICER_GUARD_MP","EBP.WEST_GERMAN.TERROR_OFFICER_MP","EBP.WEST_GERMAN.URBAN_ASSAULT_LIGHT_INFANTRY","EBP.WEST_GERMAN.VOLKSGRENADIER_MP","EBP.WEST_GERMAN.WEST_GERMAN_BASE_STAMPER","EBP.WEST_GERMAN.WEST_GERMAN_COMMAND_POST_BARREL","EBP.WEST_GERMAN.WEST_GERMAN_COMMAND_POST_CRATES_01","EBP.WEST_GERMAN.WEST_GERMAN_COMMAND_POST_CRATES_02","EBP.WEST_GERMAN.WEST_GERMAN_COMMAND_POST_GENERATOR","EBP.WEST_GERMAN.WEST_GERMAN_COMMAND_POST_SANDBAG_01","EBP.WEST_GERMAN.WEST_GERMAN_COMMAND_POST_SANDBAG_02","EBP.WEST_GERMAN.WEST_GERMAN_HQ_MP","EBP.WEST_GERMAN.WEST_GERMAN_HQ_WRECK_MP","EBP.WEST_GERMAN.WEST_GERMAN_INVISI_REPAIR_STATION_MP","EBP.WEST_GERMAN.WG_BARBED_WIRE_FENCE_MP","EBP.WEST_GERMAN.WG_SANDBAG_FENCE_MP","SBP.WEST_GERMAN.ARMORED_CAR_SDKFZ_234_SQUAD_MP","SBP.WEST_GERMAN.ASSAULT_PIONEER_SQUAD_MP","SBP.WEST_GERMAN.COMMAND_KING_TIGER_SQUAD_MP","SBP.WEST_GERMAN.FALLSCHIRMJAGER_SQUAD_MP","SBP.WEST_GERMAN.FIELD_OFFICER_SQUAD_MP","SBP.WEST_GERMAN.FLAK_EMPLACEMENT","SBP.WEST_GERMAN.FLAK_EMPLACEMENT_BASE","SBP.WEST_GERMAN.GOLIATH_MP","SBP.WEST_GERMAN.GRW34_81MM_MORTAR_SQUAD_MP","SBP.WEST_GERMAN.HETZER_SQUAD_MP","SBP.WEST_GERMAN.HOWITZER_105MM_LE_FH18_ARTILLERY_MINICHALLENGE","SBP.WEST_GERMAN.HOWITZER_105MM_LONG_RANGE","SBP.WEST_GERMAN.JAEGER_LIGHT_INFANTRY_RECON_SQUAD_MP","SBP.WEST_GERMAN.JAGDPANZER_TANK_DESTROYER_SQUAD_MP","SBP.WEST_GERMAN.JAGDTIGER_TD_SQUAD_MP","SBP.WEST_GERMAN.JU52_PARATROOPER_PLANE","SBP.WEST_GERMAN.JU52_PLANE","SBP.WEST_GERMAN.KING_TIGER_SQUAD_MP","SBP.WEST_GERMAN.KUBELWAGEN_SQUAD_MP","SBP.WEST_GERMAN.LE_IG_18_INF_SUPPORT_GUN_SQUAD_MP","SBP.WEST_GERMAN.MG34_HEAVY_MACHINE_GUN_SQUAD_MP","SBP.WEST_GERMAN.MG42_HEAVY_MACHINE_GUN_SQUAD_WG_MP","SBP.WEST_GERMAN.MORTAR_250_HALFTRACK_SQUAD_WESTGERMAN_MP","SBP.WEST_GERMAN.OBERSOLDATEN_SQUAD_MP","SBP.WEST_GERMAN.OKW_HOWITZER_105MM_LE_FH18_ARTILLERY_MP","SBP.WEST_GERMAN.OSTWIND_SQUAD_WESTGERMAN_MP","SBP.WEST_GERMAN.PAK40_75MM_AT_GUN_SQUAD_WG_MP","SBP.WEST_GERMAN.PAK43_88MM_AT_GUN_SQUAD_WESTGERMAN_MP","SBP.WEST_GERMAN.PANTHER_AUSF_G_SQUAD_MP","SBP.WEST_GERMAN.PANTHER_COMMANDER_SQUAD_MP","SBP.WEST_GERMAN.PANZER_II_LUCHS_SQUAD_MP","SBP.WEST_GERMAN.PANZER_IV_AUSF_J_BATTLE_GROUP_MP","SBP.WEST_GERMAN.PANZERFUSILIER_SQUAD_MP","SBP.WEST_GERMAN.RAKETENWERFER43_88MM_PUPPCHEN_ANTITANK_GUN_SQUAD_MP","SBP.WEST_GERMAN.SCOUTCAR_223_SQUAD","SBP.WEST_GERMAN.SDKFZ_251_17_FLAK_HALFTRACK_SQUAD_MP","SBP.WEST_GERMAN.SDKFZ_251_20_IR_SEARCHLIGHT_HALFTRACK_SQUAD_MP","SBP.WEST_GERMAN.SDKFZ_251_20_IR_SEARCHLIGHT_HALFTRACK_SQUAD_SP","SBP.WEST_GERMAN.SDKFZ_251_HALFTRACK_SQUAD_MP_2","SBP.WEST_GERMAN.SDKFZ_251_WURFRAHMEN_40_HALFTRACK_SQUAD_MP","SBP.WEST_GERMAN.STURMTIGER_SQUAD_MP","SBP.WEST_GERMAN.SWS_HALFTRACK_SQUAD_MP","SBP.WEST_GERMAN.SWS_HALFTRACK_SQUAD_SP","SBP.WEST_GERMAN.TERROR_OFFICER_SQUAD_MP","SBP.WEST_GERMAN.URBAN_ASSAULT_LIGHT_INFANTRY","SBP.WEST_GERMAN.VOLKSGRENADIER_SQUAD_MP","ABILITY.WEST_GERMAN.ADVANCED_SIPHON","ABILITY.WEST_GERMAN.AIRBORNE_ASSAULT","ABILITY.WEST_GERMAN.ARMOR_BLITZ_MP","ABILITY.WEST_GERMAN.ASSAULT_ARTILLERY","ABILITY.WEST_GERMAN.ASSAULT_MOVE_MP","ABILITY.WEST_GERMAN.ASSAULT_PIONEER_BARBED_WIRE_CUTTING_ABILITY_MP","ABILITY.WEST_GERMAN.ASSAULT_PIONEER_DROP_MEDPACK_ABILITY_MP","ABILITY.WEST_GERMAN.BARRAGE_ABILITY_MC","ABILITY.WEST_GERMAN.BASE_BUILDING_RETREAT_POINT_MP","ABILITY.WEST_GERMAN.BLENDKORPER_2H_WAFFEN_ELITE","ABILITY.WEST_GERMAN.BREAKTHROUGH_2","ABILITY.WEST_GERMAN.BREAKTHROUGH_TACTICS","ABILITY.WEST_GERMAN.BUILDING_SELF_DESTRUCT","ABILITY.WEST_GERMAN.BUILDING_SWITCH_FUEL","ABILITY.WEST_GERMAN.BUILDING_SWITCH_MUNITIONS","ABILITY.WEST_GERMAN.COMBAT_BLITZ_MP","ABILITY.WEST_GERMAN.COMMAND_MARK_VEHICLE","ABILITY.WEST_GERMAN.COMMAND_PANTHER","ABILITY.WEST_GERMAN.COMMAND_ROYAL_TIGER_DISPATCH","ABILITY.WEST_GERMAN.CONSTRUCT_ARMORED_INFANTRY_COMMAND","ABILITY.WEST_GERMAN.CONSTRUCT_INFANTRY_BARRACKS","ABILITY.WEST_GERMAN.CONSTRUCT_TANK_COMMAND","ABILITY.WEST_GERMAN.COORDINATED_BARRAGE","ABILITY.WEST_GERMAN.DEFENSIVE_MOVE_MP","ABILITY.WEST_GERMAN.EARLY_WARNING_FLARES","ABILITY.WEST_GERMAN.FALLSCHIRMJAEGER","ABILITY.WEST_GERMAN.FALLSCHIRMJAEGER_GREANDE","ABILITY.WEST_GERMAN.FALLSCHIRMJAEGER_PANZERFAUST","ABILITY.WEST_GERMAN.FALLSCHRIMJAEGER_CAMO","ABILITY.WEST_GERMAN.FATALITY_FLARE_ARTILLERY","ABILITY.WEST_GERMAN.FATALITY_STUKA_FRAGMENTATION_AIRSTRIKE","ABILITY.WEST_GERMAN.FATALITY_STURMTIGER_SATURATION","ABILITY.WEST_GERMAN.FATALITY_WALKING_STUKA_BARRAGE","ABILITY.WEST_GERMAN.FIELD_DEFENSES","ABILITY.WEST_GERMAN.FLAK_EMPLACEMENT_SELF_REPAIR","ABILITY.WEST_GERMAN.FLAK_HALFTRACK_CONCEALING_SMOKE_MP","ABILITY.WEST_GERMAN.FLAME_HALTRACK_DISPATCH","ABILITY.WEST_GERMAN.FLARE_ARTILLERY","ABILITY.WEST_GERMAN.FLARE_TRAP_CAPTURE_POINT","ABILITY.WEST_GERMAN.FOR_THE_FATHERLAND","ABILITY.WEST_GERMAN.FORTIFY_POSITION_MP","ABILITY.WEST_GERMAN.FORWARD_RECIEVERS","ABILITY.WEST_GERMAN.GOLIATH_DISPATCH","ABILITY.WEST_GERMAN.GRW34_MORTAR_COUNTER_BARRAGE_ATTACK_MP","ABILITY.WEST_GERMAN.GRW34_MORTAR_COUNTER_BARRAGE_WEAPON_WG_MP","ABILITY.WEST_GERMAN.GRW34_MORTAR_TEAM_MORTAR_BARRAGE_WG_MP","ABILITY.WEST_GERMAN.GRW34_MORTAR_TEAM_MORTAR_VICTORTARGET_BARRAGE_WG_MP","ABILITY.WEST_GERMAN.GRW34_MORTAR_TEAM_SMOKE_BARRAGE_WG_MP","ABILITY.WEST_GERMAN.HEAT_SHELLS_ABILITY_MP","ABILITY.WEST_GERMAN.HEAT_SHELLS_UNLOCK","ABILITY.WEST_GERMAN.HEAVY_FORTIFICATIONS","ABILITY.WEST_GERMAN.HETZER_DISPATCH","ABILITY.WEST_GERMAN.HOWITZER_105MM_EMPLACEMENT_UNLOCK_OKW","ABILITY.WEST_GERMAN.HOWITZER_105MM_LONG_RANGE_BARRAGE","ABILITY.WEST_GERMAN.HOWITZER_105MM_OFFMAP_BARRAGE","ABILITY.WEST_GERMAN.HOWITZER_TOGGLE_FIRE_PM","ABILITY.WEST_GERMAN.INFILTRATION_TACTICS_GRENADE","ABILITY.WEST_GERMAN.INFILTRATION_TACTICS_UNLOCK","ABILITY.WEST_GERMAN.INFRARED_STG44","ABILITY.WEST_GERMAN.JAEGER_BOOBY_TRAP","ABILITY.WEST_GERMAN.JAEGER_LIGHT_INFANTRY_CAMO","ABILITY.WEST_GERMAN.JAEGER_LIGHT_INFANTRY_RECON_DISPATCH","ABILITY.WEST_GERMAN.JAGDTIGER","ABILITY.WEST_GERMAN.JAGDTIGER_128MM_SUPPORTING_FIRE","ABILITY.WEST_GERMAN.JAGDTIGER_PIERCING_SHELL_ABILITY_MP","ABILITY.WEST_GERMAN.KING_TIGER_COMMAND_MODE_MP","ABILITY.WEST_GERMAN.KING_TIGER_DISPATCH","ABILITY.WEST_GERMAN.KUBELWAGEN_DETECTION_MP","ABILITY.WEST_GERMAN.KUBELWAGEN_HOLD_FIRE_MP","ABILITY.WEST_GERMAN.KUBELWAGEN_IN_COVER_AUTO_CAMOUFLAGE_MP","ABILITY.WEST_GERMAN.LE_IG_18_BARRAGE_WG_MP","ABILITY.WEST_GERMAN.LE_IG_18_BARRAGE_WG_VET_MP","ABILITY.WEST_GERMAN.LE_IG_18_HOLLOW_CHARGE_BARRAGE_WG_MP","ABILITY.WEST_GERMAN.LE_IG_18_HOLLOW_CHARGE_BARRAGE_WG_VET_MP","ABILITY.WEST_GERMAN.MG34_DISPATCH","ABILITY.WEST_GERMAN.MG34_PHOSPHORUS_ROUNDS_MP","ABILITY.WEST_GERMAN.MINESWEEPER_DEPLOY_MP","ABILITY.WEST_GERMAN.MINESWEEPER_PUT_AWAY_MP","ABILITY.WEST_GERMAN.MORTAR_HALFTRACK_WEST_GERMAN","ABILITY.WEST_GERMAN.OFFMAP_NEBEL_BARRAGE_MP","ABILITY.WEST_GERMAN.OKW_HOLD_FIRE_MP","ABILITY.WEST_GERMAN.OKW_RATKEN_VEHICLE_HOLD_FIRE_MP","ABILITY.WEST_GERMAN.OKW_SECTOR_ASSAULT","ABILITY.WEST_GERMAN.OKW_STUKA_AERIAL_SUPERIORITY_RECON","ABILITY.WEST_GERMAN.OKW_VEHICLE_HOLD_FIRE_MP","ABILITY.WEST_GERMAN.OSTWIND_DISPATCH","ABILITY.WEST_GERMAN.PAK40_CRITICAL_SHOTS_WG_MP","ABILITY.WEST_GERMAN.PANZER_IV_GROUP_DISPATCH","ABILITY.WEST_GERMAN.PANZERFUSILIER_AT_RIFLE_GRENADE","ABILITY.WEST_GERMAN.PANZERFUSILIER_GRENADE","ABILITY.WEST_GERMAN.PANZERFUSILIERS_DISPATCH","ABILITY.WEST_GERMAN.PANZERFUSILIERS_FLARE","ABILITY.WEST_GERMAN.PIONEER_STUN_GRENADE_MP","ABILITY.WEST_GERMAN.PIONEER_VOLKS_SALVAGE","ABILITY.WEST_GERMAN.PIONEER_VOLKS_THROUGH_SALVAGE","ABILITY.WEST_GERMAN.PUMA_AIMED_SHOT_MP","ABILITY.WEST_GERMAN.PUMA_SMOKE_SCREEN","ABILITY.WEST_GERMAN.PYRO_VOLKS","ABILITY.WEST_GERMAN.RADIO_SILENCE","ABILITY.WEST_GERMAN.RAKETEN_IN_COVER_AUTO_CAMOUFLAGE_MP","ABILITY.WEST_GERMAN.RAKTEN_CAMOUFLAGE_MP","ABILITY.WEST_GERMAN.RECON_STANCE_MP","ABILITY.WEST_GERMAN.RECOUP_LOSSES","ABILITY.WEST_GERMAN.REFUEL_TANK_WG_SP","ABILITY.WEST_GERMAN.ROCKET_BARRAGE","ABILITY.WEST_GERMAN.SDKFZ_251_17_FLAK_HALFTRACK_DEPLOY_DEFENS","ABILITY.WEST_GERMAN.SDKFZ_251_17_FLAK_HALFTRACK_DEPLOY_WEAPON","ABILITY.WEST_GERMAN.SDKFZ_251_17_FLAK_HALFTRACK_DEPLOY_WEAPON_VET","ABILITY.WEST_GERMAN.SIGNAL_FLAGS","ABILITY.WEST_GERMAN.SIPHON_INCREASE_RESOURCES_ADVANCED_MP","ABILITY.WEST_GERMAN.SIPHON_INCREASE_RESOURCES_MP","ABILITY.WEST_GERMAN.SPEARHEAD_MP","ABILITY.WEST_GERMAN.STALKER_STATE_MP","ABILITY.WEST_GERMAN.STURMTIGER_380MM_ROCKET_ATTACK","ABILITY.WEST_GERMAN.STURMTIGER_380MM_ROCKET_RELOAD","ABILITY.WEST_GERMAN.STURMTIGER_DISPATCH","ABILITY.WEST_GERMAN.STURMTIGER_NAHVW_CLOSE_RANGE_GRENADE_TARGETED","ABILITY.WEST_GERMAN.SUPPORT_TRUCK_GAIN_RESOURCECS","ABILITY.WEST_GERMAN.SUPPORT_TRUCK_TARGET_SETUP","ABILITY.WEST_GERMAN.SUPPORT_TRUCK_TARGET_UNSETUP","ABILITY.WEST_GERMAN.SUPPRESSIVE_FIRE_MP","ABILITY.WEST_GERMAN.SWS_HALFTRACK_DISPATCH","ABILITY.WEST_GERMAN.SWS_HALFTRACK_FORWARD_RECEIVERS","ABILITY.WEST_GERMAN.SWS_HALFTRACK_INTERVAL_DISPATCH","ABILITY.WEST_GERMAN.TANK_COMMANDER_UNLOCK","ABILITY.WEST_GERMAN.TANK_THROW_DEFENSIVE_GRENADE_MP","ABILITY.WEST_GERMAN.TANK_THROW_DEFENSIVE_GRENADE_UNLOCK_MP","ABILITY.WEST_GERMAN.TERROR_OFFICER","ABILITY.WEST_GERMAN.TERROR_OFFICER_FORCE_RETREAT","ABILITY.WEST_GERMAN.TERROR_OFFICER_MARK_TARGET","ABILITY.WEST_GERMAN.THROUGH_SALVAGE","ABILITY.WEST_GERMAN.TIGER_PROWL_JAGDPANZER_MP","ABILITY.WEST_GERMAN.TIGER_PROWL_MP","ABILITY.WEST_GERMAN.URBAN_ASSAULT_LIGHT_INFANTRY","ABILITY.WEST_GERMAN.URBAN_ASSAULT_LIGHT_INFANTRY_THROW_ABILITY_MP","ABILITY.WEST_GERMAN.VALIANT_ASSAULT","ABILITY.WEST_GERMAN.VEHICLE_CRITICAL_REPAIR_UNLOCK","ABILITY.WEST_GERMAN.VEHICLE_EMERGENCY_REPAIR_ABILITY_MP","ABILITY.WEST_GERMAN.VEHICLE_EMERGENCY_REPAIR_ABILITY_SWS_MP","ABILITY.WEST_GERMAN.VOLKS_PANZERFAUST_MP","ABILITY.WEST_GERMAN.VOLKSGRENADIER_FIRE_GRENADE_MP","ABILITY.WEST_GERMAN.VOLKSGRENADIER_GRENADE_MP","ABILITY.WEST_GERMAN.VOLKSGRENADIER_PANZERFAUST_MP","ABILITY.WEST_GERMAN.VOLKSGRENADIER_PANZERFAUST_VET_4_MP","ABILITY.WEST_GERMAN.WAFFEN_BOOBY_TRAP_CAPTURE_POINT","ABILITY.WEST_GERMAN.WAFFEN_ELITE_BUNDLED_ASSAULT_GRENADE","ABILITY.WEST_GERMAN.WALKING_STUKA_ROCKET_BARRAGE_CREEPING_MP","ABILITY.WEST_GERMAN.WALKING_STUKA_ROCKET_BARRAGE_CREEPING_NAPALM_MP","ABILITY.WEST_GERMAN.WEST_GERMAN_REPAIR_ABILITY_MP","ABILITY.WEST_GERMAN.WG_HQ_PIONEER_CALL_IN","ABILITY.WEST_GERMAN.ZEROING_ARTILLERY","UPG.WEST_GERMAN.ABILITY_LOCK_OUT_STURMTIGER_NOT_RELOADED","UPG.WEST_GERMAN.ABILITY_LOCK_OUT_STURMTIGER_RELOADING","UPG.WEST_GERMAN.ABILITY_LOCK_OUT_SWS_TRUCK","UPG.WEST_GERMAN.ADVANCED_SIPHON","UPG.WEST_GERMAN.AERIAL_SUPERIORITY_STUKA_RECON_PLANE","UPG.WEST_GERMAN.AIRBORNE_ASSAULT","UPG.WEST_GERMAN.ASSAULT_ARTILLERY","UPG.WEST_GERMAN.ASSAULT_PIONEER_COMBAT_UPGRADE","UPG.WEST_GERMAN.ASSAULT_PIONEER_PANZERSCHRECK_UPGRADE","UPG.WEST_GERMAN.ASSAULT_PIONEER_REPAIR_UPGRADE","UPG.WEST_GERMAN.BREAKTHROUGH_2","UPG.WEST_GERMAN.BREAKTHROUGH_TACTICS","UPG.WEST_GERMAN.BUILDING_1","UPG.WEST_GERMAN.BUILDING_2","UPG.WEST_GERMAN.BUILDING_3","UPG.WEST_GERMAN.COMMAND_PANTHER","UPG.WEST_GERMAN.COMMAND_ROYAL_TIGER_DISPATCH","UPG.WEST_GERMAN.CONSTRUCT_BASE_BUILDING_UPGRADE","UPG.WEST_GERMAN.FALLSCHRIMJAGER_DISPATCH","UPG.WEST_GERMAN.FIELD_DEFENSES","UPG.WEST_GERMAN.FIRST_SWS_HALFTRACK_LOCKOUT","UPG.WEST_GERMAN.FLAK_GUN_UNLOCK_UPGRADE","UPG.WEST_GERMAN.FLAK_PANZER_DEFENSIVES","UPG.WEST_GERMAN.FLAK_PANZER_IS_SETUP","UPG.WEST_GERMAN.FLAME_HALFTRACK_DISPATCH","UPG.WEST_GERMAN.FLAMMPANZER_38T_HETZER","UPG.WEST_GERMAN.FLARE_ARTILLERY","UPG.WEST_GERMAN.FOR_THE_FATHER_LAND","UPG.WEST_GERMAN.FORWARD_RECIEVERS","UPG.WEST_GERMAN.GOLIATH_REMOTE_CONTROLLED_BOMB","UPG.WEST_GERMAN.HEALING_POINT_UNLOCK_UPGRADE","UPG.WEST_GERMAN.HEAT_SHELLS","UPG.WEST_GERMAN.HEAVY_FORTIFICATIONS","UPG.WEST_GERMAN.HOWITZER_105MM_EMPLACEMENT_OKW","UPG.WEST_GERMAN.HOWITZER_105MM_OFFMAP_BARRAGE","UPG.WEST_GERMAN.INFILTRATION_TACTICS","UPG.WEST_GERMAN.INFRARED_STG44","UPG.WEST_GERMAN.JAEGER_LIGHT_INFANTRY_RECON_DISPATCH","UPG.WEST_GERMAN.JAGDTIGER","UPG.WEST_GERMAN.JAGDTIGER_ABILITY_AP_LOCK_OUT","UPG.WEST_GERMAN.JAGDTIGER_ABILITY_BARRAGE_LOCK_OUT","UPG.WEST_GERMAN.JAGDTIGER_ENGINE_IMPROVEMENTS_I_MP","UPG.WEST_GERMAN.KING_TIGER_TOP_GUNNER_MP","UPG.WEST_GERMAN.MEDIC_HEALING_MP","UPG.WEST_GERMAN.MEDICAL_SUPPLIES_0_USES_REMAINING","UPG.WEST_GERMAN.MEDICAL_SUPPLIES_1_USE_REMAINING","UPG.WEST_GERMAN.MEDICAL_SUPPLIES_2_USES_REMAINING","UPG.WEST_GERMAN.MG34_DISPATCH","UPG.WEST_GERMAN.OKW_SECTOR_ASSAULT","UPG.WEST_GERMAN.OSTWIND_DISPATCH","UPG.WEST_GERMAN.PANZER_IV_GROUP_DISPATCH","UPG.WEST_GERMAN.PANZER_IV_SIDE_SKIRTS_MP","UPG.WEST_GERMAN.PANZERFUSILER_DISPATCH","UPG.WEST_GERMAN.PANZERFUSILIER_G43","UPG.WEST_GERMAN.PANZERSCHRECK_UNLOCKED","UPG.WEST_GERMAN.PYRO_VOLKS","UPG.WEST_GERMAN.RADIO_SILENCE","UPG.WEST_GERMAN.RECOUP_ACTIVE","UPG.WEST_GERMAN.RECOUP_LOSS","UPG.WEST_GERMAN.REPAIR_ENGINEERS_MP","UPG.WEST_GERMAN.REPAIR_POINT_UNLOCK_UPGRADE","UPG.WEST_GERMAN.RESOURCE_POINT_SIPHON","UPG.WEST_GERMAN.RETREAT_POINT_UNLOCK_UPGRADE","UPG.WEST_GERMAN.ROCKET_BARRAGE","UPG.WEST_GERMAN.SDKFZ_251_HALFTRACK_FLAMMPANZERWAGEN_UPGRADE_MP_2","UPG.WEST_GERMAN.SIGNAL_FLAGS","UPG.WEST_GERMAN.SIPHON_LOCK_OUT","UPG.WEST_GERMAN.STURMTIGER_DISPATCH","UPG.WEST_GERMAN.SWS_INTERVAL_UNLOCK","UPG.WEST_GERMAN.SWS_STARTING_DISPATCH_UNLOCK","UPG.WEST_GERMAN.TANK_COMMANDER","UPG.WEST_GERMAN.TANK_COMMANDER_UNLOCK","UPG.WEST_GERMAN.TANK_GRENADE","UPG.WEST_GERMAN.TERROR_OFFICER","UPG.WEST_GERMAN.THROUGH_SALVAGE","UPG.WEST_GERMAN.URBAN_ASSAULT_LIGHT_INFANTRY","UPG.WEST_GERMAN.VALIANT_ASSAULT","UPG.WEST_GERMAN.VEHICLE_CRITICAL_REPAIR","UPG.WEST_GERMAN.VOLKS_FLAMETHROWER_MP","UPG.WEST_GERMAN.VOLKS_STG44_UPGRADE","UPG.WEST_GERMAN.WAFFEN_INFRARED_STG44","UPG.WEST_GERMAN.WAFFEN_MG34_LMG_MP","UPG.WEST_GERMAN.WARNING_FLARES","UPG.WEST_GERMAN.WG_HETZER_TOP_GUNNER_MP","UPG.WEST_GERMAN.WG_PANTHER_TOP_GUNNER_MP","UPG.WEST_GERMAN.ZEROING_ARTILLERY","ABILITY.GLOBAL.ARMY_ITEM_GLOBAL_COVER_TRAINING","ABILITY.GLOBAL.ARMY_ITEM_SOVIET_NOT_GONNA_DIE_LIKE_THIS","ABILITY.GLOBAL.AT_76MM_SINGLE_SHOT_ACCURATE","ABILITY.GLOBAL.BLIZZARD_EFFECT","ABILITY.GLOBAL.BLIZZARD_EFFECT_DEEP_SNOW_CAMO","ABILITY.GLOBAL.BLIZZARD_EFFECT_MORTARS","ABILITY.GLOBAL.BLIZZARD_EFFECT_VEHICLE","ABILITY.GLOBAL.BLIZZARD_HOWITZER","ABILITY.GLOBAL.BONUS_0","ABILITY.GLOBAL.BONUS_1","ABILITY.GLOBAL.BONUS_2","ABILITY.GLOBAL.BONUS_2B","ABILITY.GLOBAL.BONUS_3","ABILITY.GLOBAL.BONUS_3B","ABILITY.GLOBAL.BONUS_3C","ABILITY.GLOBAL.BONUS_BACK","ABILITY.GLOBAL.BREAKTHROUGH_TOW","ABILITY.GLOBAL.CAMOUFLAGE_CONSTRUCTION","ABILITY.GLOBAL.CAMOUFLAGE_CONSTRUCTION_ANIA","ABILITY.GLOBAL.CAMPAIGN_STUKA_STRAFE_LONG","ABILITY.GLOBAL.CAPTURE_SPEED","ABILITY.GLOBAL.COMMISSAR_SHOT_227","ABILITY.GLOBAL.COMMISSAR_SHOT_227_ENEMY","ABILITY.GLOBAL.COMMISSAR_SQUAD_TOW","ABILITY.GLOBAL.CONVOY_BUILDBARRICADE","ABILITY.GLOBAL.COVER_ANIMATION_TEST","ABILITY.GLOBAL.DIG_OUT_OF_MUD","ABILITY.GLOBAL.DISPATCH_BRIDGE_PARTISAN","ABILITY.GLOBAL.DISPATCH_BRIDGE_PARTISAN_AT","ABILITY.GLOBAL.DISPATCH_BRIDGE_PARTISAN_HMG","ABILITY.GLOBAL.DISPATCH_BRIDGE_PARTISAN_MORTAR","ABILITY.GLOBAL.DROP_WEAPONS","ABILITY.GLOBAL.FATALITY_BULLSEYE","ABILITY.GLOBAL.FATALITY_COORDINATED_MORTAR_BOMBARDMENT","ABILITY.GLOBAL.FATALITY_DEFAULT","ABILITY.GLOBAL.FATALITY_HOWITZER_105MM_BARRAGE","ABILITY.GLOBAL.FATALITY_HOWITZER_240MM","ABILITY.GLOBAL.FATALITY_LIGHT_SUPPORT_ARTILLERY","ABILITY.GLOBAL.FATALITY_PROTOTYPE","ABILITY.GLOBAL.FATALITY_RAILWAY_GUN_ARTILLERY","ABILITY.GLOBAL.FATALITY_TIME_ON_TARGET_ARTILLERY","ABILITY.GLOBAL.FIRE_DOT","ABILITY.GLOBAL.FLAME_THROWER_ABILITY","ABILITY.GLOBAL.FORWARD_REPAIR_STATION_TOW","ABILITY.GLOBAL.FROZEN_ICON_TEST","ABILITY.GLOBAL.GARRISONED_SQUAD_FACING","ABILITY.GLOBAL.GARRISONED_SQUAD_FACING_UNSET","ABILITY.GLOBAL.HEAL_IN_COVER","ABILITY.GLOBAL.HOWITZER_105MM_BARRAGE_SHORT","ABILITY.GLOBAL.HOWITZER_105MM_BARRAGE_SHORT_PRECISE","ABILITY.GLOBAL.HOWITZER_105MM_DUMMY","ABILITY.GLOBAL.IL_2_ATTACK_STRAFE_HMG","ABILITY.GLOBAL.IL_2_PRECISION_BOMB_STRIKE_TOW","ABILITY.GLOBAL.KV_2_TOW","ABILITY.GLOBAL.LIGHT_ARTILLERY_M10","ABILITY.GLOBAL.M01_IL2_DOGFIGHT_PASS","ABILITY.GLOBAL.M01_IL2_PRECISION_BOMB_STRIKE","ABILITY.GLOBAL.M01_MEDIC_HEAL","ABILITY.GLOBAL.M01_MEDIC_HEAL_CONSTANT","ABILITY.GLOBAL.M01_MORTAR_SINGLE_PRECISE_HARMLESS","ABILITY.GLOBAL.M01_SPRINT_OUT_OF_COMBAT","ABILITY.GLOBAL.M01_STUKA_BOMBING_STRIKE","ABILITY.GLOBAL.M01_STUKA_DOGFIGHT_PASS","ABILITY.GLOBAL.M01_STUKA_STRAFE_FAST","ABILITY.GLOBAL.M01_WOUNDED","ABILITY.GLOBAL.M11_LIGHT_FIRE","ABILITY.GLOBAL.M12_HOWITZER_BARRAGE","ABILITY.GLOBAL.M14_GUARD_TROOP_DISPATCH","ABILITY.GLOBAL.M14_OFF_MAP_SMOKE_BARRAGE","ABILITY.GLOBAL.M24_ANTI_TANK_BUNDLED_GRENADE","ABILITY.GLOBAL.MECHANIZED_ASSAULT_GROUP_TOW","ABILITY.GLOBAL.MOLTKE_DET_PACK","ABILITY.GLOBAL.MUDDY_POINT","ABILITY.GLOBAL.NO_RETREAT_NO_SURRENDER_TOW","ABILITY.GLOBAL.OFF_MAP_ARTILLERY","ABILITY.GLOBAL.OFF_MAP_ARTILLERY_PERCISE","ABILITY.GLOBAL.OFF_MAP_ARTILLERY_PERCISE_FAST","ABILITY.GLOBAL.OFF_MAP_ARTILLERY_PERCISE_SEP","ABILITY.GLOBAL.OFF_MAP_ARTY_SINGLE_SHOT_INSTANT","ABILITY.GLOBAL.OFFICER_AIR_RECON","ABILITY.GLOBAL.OFFICER_CLOSE_AIR_SUPPORT","ABILITY.GLOBAL.OFFICER_FRAGMENTATION_BOMB","ABILITY.GLOBAL.PARTISAN_REPAIR_ABILITY","ABILITY.GLOBAL.PARTISAN_SPRINT","ABILITY.GLOBAL.PREVENT_SUPPRESSION","ABILITY.GLOBAL.PRODUCTION_SPEED","ABILITY.GLOBAL.RADIO_TOWER_REVEAL","ABILITY.GLOBAL.RAILWAY_GUN_ARTILLERY_SINGLE","ABILITY.GLOBAL.READY_UP","ABILITY.GLOBAL.REV_OUT_OF_MUD","ABILITY.GLOBAL.SHOCK_TROOP_FULL_AUTO","ABILITY.GLOBAL.SP_DROP_WEAPONS","ABILITY.GLOBAL.SP_OFF_MAP_ARTY_HARMLESS","ABILITY.GLOBAL.SP_OFF_MAP_ARTY_REAL","ABILITY.GLOBAL.SP_SINGLE_SHOT_MORTAR","ABILITY.GLOBAL.SP_SINGLE_SHOT_MORTAR_M01","ABILITY.GLOBAL.SP_SPRINT","ABILITY.GLOBAL.SP_SPRINT_TOGGLEABLE","ABILITY.GLOBAL.SPY_NETWORK_TOW","ABILITY.GLOBAL.STUKA_BOMBING_STRIKE_W_SMOKE","ABILITY.GLOBAL.STUKA_FAKE_BOMBING_STRIKE","ABILITY.GLOBAL.STUKA_FAKE_STRAFE","ABILITY.GLOBAL.STUKA_STRAFE","ABILITY.GLOBAL.STUKA_STRAFE_M02","ABILITY.GLOBAL.STUKA_STRAFE_M09","ABILITY.GLOBAL.TANK_BUSTER_CONSCRIPT_DISPATCH","ABILITY.GLOBAL.TOW_AIRFIELD_DISPATCH_KV1","ABILITY.GLOBAL.TOW_AIRFIELD_DISPATCH_KV2","ABILITY.GLOBAL.TOW_AIRFIELD_DISPATCH_KV8","ABILITY.GLOBAL.TOW_AIRFIELD_DISPATCH_T34","ABILITY.GLOBAL.TOW_AIRFIELD_STUKA_BOMBING_RUN","ABILITY.GLOBAL.TOW_STALINGRAD_DISPATCH_IS2","ABILITY.GLOBAL.TOW_STALINGRAD_DISPATCH_KAT","ABILITY.GLOBAL.TOW_STALINGRAD_DISPATCH_KV1","ABILITY.GLOBAL.TOW_STALINGRAD_DISPATCH_SU76","ABILITY.GLOBAL.TOW_STALINGRAD_DISPATCH_T34","ABILITY.GLOBAL.TOW_STALINGRAD_DISPATCH_T70","ABILITY.GLOBAL.TRANSFER_ORDERS","ABILITY.GLOBAL.TROOP_TRAINING_TOW","ABILITY.GLOBAL.TUNSTEN_SHELLS_TOW","ABILITY.GLOBAL.WARMING_ANIMATION_TEST","ABILITY.GLOBAL.WE_SURRENDER","SLOT_ITEM.AEC_TARGET_OPTICS_SLOT_ITEM_MP","SLOT_ITEM.AEC_TARGET_TURRET_SLOT_ITEM_MP","SLOT_ITEM.AEC_TREAD_SHOT_MP","SLOT_ITEM.AEF_CALLIOPE_DUMMY_SLOT_ITEM","SLOT_ITEM.AEF_SHERMAN_DUMMY_SLOT_ITEM","SLOT_ITEM.AEF_VEHICLE_ENTERS_INFANTRY_BUFF_APPLIED","SLOT_ITEM.AEF_WHITE_PHOSPHOROUS_MORTAR_UI_ITEM","SLOT_ITEM.AEF_WHITE_PHOSPHOROUS_SHELLS_UI_ITEM","SLOT_ITEM.AEF_WRENCH_ICON_SLOT_ITEM","SLOT_ITEM.AMBUSH_CAMO_PORTRAIT_ICON_ITEM","SLOT_ITEM.AMBUSH_CAMO_SLOT_ITEM","SLOT_ITEM.AMBUSH_CAMO_VISUAL_ITEM","SLOT_ITEM.ARMOR_BLITZ_ITEM","SLOT_ITEM.ASSAULT_ENGINEER_FLAMETHROWER","SLOT_ITEM.ASSAULT_MOVE_ITEM","SLOT_ITEM.AT_76MM_HE_ROUND_ITEM","SLOT_ITEM.AT_76MM_HE_ROUND_ITEM_MP","SLOT_ITEM.AVRE_CREW_SHRAPNEL_GRENADE_SLOT_ITEM_MP","SLOT_ITEM.AVRE_RELOAD_ACTIVE","SLOT_ITEM.AVRE_SPIGOT_MORTAR_MP","SLOT_ITEM.AVRE_SPIGOT_MORTAR_VET_3_MP","SLOT_ITEM.AXIS_ASSAULT_GRENADIER_GRENADE","SLOT_ITEM.AXIS_BLINDING_GRENADE","SLOT_ITEM.AXIS_BLINDING_GRENADE_MP","SLOT_ITEM.AXIS_PANZER_GRENADIER_GRENADE","SLOT_ITEM.AXIS_PANZER_GRENADIER_GRENADE_MP","SLOT_ITEM.AXIS_PG_GRENADE_CAMPAIGN","SLOT_ITEM.AXIS_PG_GRENADE_CAMPAIGN_MP","SLOT_ITEM.AXIS_PG_GRENADE_TUTORIAL","SLOT_ITEM.BAZOOKA_MP","SLOT_ITEM.BLENDKORPER_2H_SMOKE_GRENADE_ITEM_MP","SLOT_ITEM.BOFOR_40MM_AA_MODE_ACTIVATED_MAIN_GUN","SLOT_ITEM.BOFORS_HOLD_FULL","SLOT_ITEM.BOFORS_SUPPRESSIVE_BARRAGE_ROUND_ITEM_MP","SLOT_ITEM.BOFORS_SUPPRESSIVE_BARRAGE_ROUND_ITEM_VICTOR_TARGET_MP","SLOT_ITEM.BOOT_STOMP","SLOT_ITEM.BOYS_ANTI_TANK_RIFLE_MP","SLOT_ITEM.BOYS_ANTI_TANK_RIFLE_SNIPER_MP","SLOT_ITEM.BOYS_SNIPER_RIFLE_ITEM_MP","SLOT_ITEM.BREN_LMG_ICON_DUMMY","SLOT_ITEM.BRIT_17_POUNDER_FLARE_MP","SLOT_ITEM.BRIT_17_POUNDER_HOLD_FULL","SLOT_ITEM.BRIT_17_POUNDER_PIERCING_SHOT_MP","SLOT_ITEM.BRIT_COMMAND_VEHICLE_ITEM","SLOT_ITEM.BRIT_CROC_DUMMY_SLOT_ITEM","SLOT_ITEM.BRIT_EMPLACEMENT_BRACED","SLOT_ITEM.BRIT_EMPLACEMENT_HOLD_FIRE","SLOT_ITEM.BRIT_FIREFLY_TULIP_SLOT_ITEM","SLOT_ITEM.BRIT_HOLD_THE_LINE","SLOT_ITEM.BRIT_MORTAR_PIT_HOLD_FULL","SLOT_ITEM.BRIT_REINFORCE_THE_FRONT","SLOT_ITEM.BRIT_SNIPER_BOYS_ANTI_TANK_CRITICAL_SHOT_MP","SLOT_ITEM.BRIT_UNIT_LOCK_OUT_SLOT_ITEM","SLOT_ITEM.BRUMMBAR_CRITICAL_SHOT_MP","SLOT_ITEM.CAPTAIN_GARRISON_ITEM","SLOT_ITEM.CAPTURE_INTEL_SLOTITEM","SLOT_ITEM.CARRIER_SUPPRESS_ACTIVE","SLOT_ITEM.CAVALRY_AT_SATCHEL_ITEM","SLOT_ITEM.CENTUAR_AA_MODE_ACTIVATED_MAIN_GUN","SLOT_ITEM.CHURUCHILL_SUPPORT_NEGATE","SLOT_ITEM.COMET_SMOKE_SHELL_SHOT_MP","SLOT_ITEM.COMET_SMOKE_SHELL_WP_SHOT_MP","SLOT_ITEM.COMMAND_PANTHER_AURA","SLOT_ITEM.COMMANDO_BREN_LMG_MP","SLOT_ITEM.COMMANDO_DE_LISLE_CARBINE_MP","SLOT_ITEM.COMMANDO_DE_LISLE_CARBINE_SLOT_MP","SLOT_ITEM.COMMANDO_N69_GRENADE_MP","SLOT_ITEM.COMMANDO_THOMPSON_MP","SLOT_ITEM.COMMANDO_THOMPSON_SLOT_MP","SLOT_ITEM.COMMISSAR_SHOT_227","SLOT_ITEM.COMMISSAR_SHOT_227_ENEMY","SLOT_ITEM.CONSCRIPT_MOLOTOV","SLOT_ITEM.CONSCRIPT_MOLOTOV_MP","SLOT_ITEM.COVER_SMOKE_GRENADE_ITEM","SLOT_ITEM.DEF_MOVE_ITEM","SLOT_ITEM.DOUBLE_SWEEP","SLOT_ITEM.DP_28_LIGHT_MACHINE_GUN_PACKAGE","SLOT_ITEM.DP_28_LIGHT_MACHINE_GUN_PACKAGE_MOVING_MP","SLOT_ITEM.DP_28_LIGHT_MACHINE_GUN_PACKAGE_MOVING_NO_PRONE_MP","SLOT_ITEM.DP_28_LIGHT_MACHINE_GUN_PACKAGE_MP","SLOT_ITEM.DSHK38_TURRET_MOUNTED_IS2","SLOT_ITEM.DSHK38_TURRET_MOUNTED_IS2_MP","SLOT_ITEM.DSHK38_TURRET_MOUNTED_ISU152","SLOT_ITEM.DSHK38_TURRET_MOUNTED_ISU152_MP","SLOT_ITEM.DUMMY_FORTIFIED__SLOT_ITEM","SLOT_ITEM.DUMMY_SLOT_ITEM","SLOT_ITEM.DUMMY_SLOT_ITEM_QUAD","SLOT_ITEM.ELEFANT_CRITICAL_SHOT_MP","SLOT_ITEM.ENGINEER_SALVAGE_KIT_DUMMY","SLOT_ITEM.FLAK_HALFTRACK_ICON_ITEM","SLOT_ITEM.FLAMETHROWER_ROKS3_ACCESSORY","SLOT_ITEM.FLAMETHROWER_ROKS3_FAKE","SLOT_ITEM.FLAMETHROWER_ROKS3_ITEM","SLOT_ITEM.FLAMETHROWER_ROKS3_ITEM_MP","SLOT_ITEM.FOR_THE_FATHERLAND_ACTIVE","SLOT_ITEM.FRWD_HQ_SMOKE_MARKER_GRENADE_MP","SLOT_ITEM.FWD_HQ_EMPLACEMENT_SUPPORT","SLOT_ITEM.G43_SNIPER_INCENDIARY_SLOT_ITEM_MP","SLOT_ITEM.GENERIC_MG34_LMG_MP","SLOT_ITEM.GRENADIER_MG42_LMG","SLOT_ITEM.GRENADIER_MG42_LMG_MOVING_MP","SLOT_ITEM.GRENADIER_MG42_LMG_MOVING_NO_PRONE_MP","SLOT_ITEM.GRENADIER_MG42_LMG_MP","SLOT_ITEM.GRENADIER_PANZERFAUST","SLOT_ITEM.GRENADIER_PANZERFAUST_MP","SLOT_ITEM.GROUND_ATTACK_SNIPER_RIFLE_ITEM","SLOT_ITEM.GUARD_TROOP_ASSAULT_PACKAGE","SLOT_ITEM.HALFTRACK_FLAMETHROWER_LEFT","SLOT_ITEM.HALFTRACK_FLAMETHROWER_LEFT_MP","SLOT_ITEM.HALFTRACK_FLAMETHROWER_RIGHT","SLOT_ITEM.HALFTRACK_FLAMETHROWER_RIGHT_MP","SLOT_ITEM.HETZER_FLAMETHROWER_ITEM_MP","SLOT_ITEM.HULLDOWN_SLOT_ITEM","SLOT_ITEM.INFRARED_SQUAD_SETUP","SLOT_ITEM.ISU_PIERCING_SHOT_ROUND_ITEM","SLOT_ITEM.ISU_PIERCING_SHOT_ROUND_ITEM_MP","SLOT_ITEM.JAEGER_G43_RIFLE_ITEM","SLOT_ITEM.JAEGER_G43_RIFLE_ITEM_MP","SLOT_ITEM.JAEGER_LIGHT_RECON_G43","SLOT_ITEM.JAEGER_PANZERGREN_G43_RIFLE_ITEM_MP","SLOT_ITEM.KAR_98K_ANTITANK_RIFLE_GRENADE_SLOT_ITEM","SLOT_ITEM.KAR_98K_ANTITANK_RIFLE_GRENADE_SLOT_ITEM_MP","SLOT_ITEM.KAR_98K_RIFLE_GRENADE_SLOT_ITEM","SLOT_ITEM.KAR_98K_RIFLE_GRENADE_SLOT_ITEM_MP","SLOT_ITEM.KAR_98K_RIFLE_GRENADE_SLOT_ITEM_TUTORIAL","SLOT_ITEM.KV_8_45MM_GUN_ITEM","SLOT_ITEM.KV_8_ATO_41_FLAMETHROWER_ITEM_MP","SLOT_ITEM.KWK_20MM_222_ARMORED_CAR_MP","SLOT_ITEM.LAND_MATTRESS_25LB_ROCKET","SLOT_ITEM.LAND_MATTRESS_60LB_ROCKET","SLOT_ITEM.LAND_MATTRESS_EMPTY","SLOT_ITEM.LAND_MATTRESS_PHOSPHORUS_ROCKET","SLOT_ITEM.LAND_MATTRESS_ROCKET_MARKER","SLOT_ITEM.LEE_ENFIELD_RIFLE_GRENADE_SLOT_ITEM_MP","SLOT_ITEM.LIEUTENANT_GARRISON_ITEM","SLOT_ITEM.LIGHT_AT_MINE_RECENTLY_HIT_HEAVY_VEHICLE","SLOT_ITEM.LIGHT_AT_MINE_RECENTLY_HIT_LIGHT_VEHICLE","SLOT_ITEM.M01_CONSCRIPT_MOSIN_NAGANT","SLOT_ITEM.M15A1_AA_MODE_ACTIVATED","SLOT_ITEM.M15A1_AA_MODE_ACTIVATED_LEFT","SLOT_ITEM.M15A1_AA_MODE_ACTIVATED_MAIN_GUN","SLOT_ITEM.M17_RIFLE_GRENADE_SLOT_ITEM_MP","SLOT_ITEM.M1919A6_LMG_ICON_DUMMY","SLOT_ITEM.M1C_GARAND","SLOT_ITEM.M1C_PATHFINDER_GARAND","SLOT_ITEM.M23_SMOKE_STREAM_GRENADE_ANTI_TANK_ITEM_MP","SLOT_ITEM.M23_SMOKE_STREAM_GRENADE_ITEM_MP","SLOT_ITEM.M24_ANTI_TANK_GRENADIER_GRENADE","SLOT_ITEM.M2HB_50CAL_SHERMAN","SLOT_ITEM.M2HB_TURRET_MOUNTED_M8_MP","SLOT_ITEM.M2HB_TURRET_MOUNTED_SHERMAN_MP","SLOT_ITEM.M5_STUART_DAMAGE_ENGINE_SHOT_SLOT_ITEM_MP","SLOT_ITEM.M5_STUART_SHELL_SHOCK_SHOT_SLOT_ITEM_MP","SLOT_ITEM.M8_CANISTER_SHOT_SLOT_ITEM_MP","SLOT_ITEM.M8_GREYHOUND_RECON_ACTIVATED","SLOT_ITEM.MAJOR_GARRISON_ITEM","SLOT_ITEM.MG34_PINTLE_HETZER","SLOT_ITEM.MG42_TURRET_MOUNTED_BRUMMBAR","SLOT_ITEM.MG42_TURRET_MOUNTED_BRUMMBAR_MP","SLOT_ITEM.MG42_TURRET_MOUNTED_KING_TIGER_MP","SLOT_ITEM.MG42_TURRET_MOUNTED_PANTHER","SLOT_ITEM.MG42_TURRET_MOUNTED_PANTHER_MP","SLOT_ITEM.MG42_TURRET_MOUNTED_PANTHER_WG_MP","SLOT_ITEM.MG42_TURRET_MOUNTED_PZIV","SLOT_ITEM.MG42_TURRET_MOUNTED_PZIV_MP","SLOT_ITEM.MG42_TURRET_MOUNTED_STUGIV","SLOT_ITEM.MG42_TURRET_MOUNTED_STUGIV_MP","SLOT_ITEM.MG42_TURRET_MOUNTED_TIGER","SLOT_ITEM.MG42_TURRET_MOUNTED_TIGER_MP","SLOT_ITEM.MG42_TURRET_MOUNTED_TIGER_TOW","SLOT_ITEM.MINESWEEPER","SLOT_ITEM.MORTAR_FLARE_MP","SLOT_ITEM.MOSIN_NAGANT_SNIPER_RIFLE_ITEM","SLOT_ITEM.MOSIN_NAGANT_SNIPER_RIFLE_ITEM_MP","SLOT_ITEM.OBERSOLDATEN_MG34_LMG_MOVING_MP","SLOT_ITEM.OBERSOLDATEN_MG34_LMG_MOVING_NO_PRONE_MP","SLOT_ITEM.OBERSOLDATEN_MP44_INFARED","SLOT_ITEM.OPEL_SUPPLY_SLOT_ITEM","SLOT_ITEM.PAK40_CRITICAL_SHOT_MP","SLOT_ITEM.PAK43_CRITICAL_SHOT_MP","SLOT_ITEM.PANZER_GRENADIER_MP44_ITEM","SLOT_ITEM.PANZER_GRENADIER_MP44_ITEM_MP","SLOT_ITEM.PANZERBUSCHE_39","SLOT_ITEM.PANZERBUSCHE_39_MP","SLOT_ITEM.PANZERFUISILIER_FLARE_MP","SLOT_ITEM.PANZERFUSILIER_AT_RIFLE_GRENADE","SLOT_ITEM.PANZERFUSILIER_G43","SLOT_ITEM.PANZERFUSILIER_GRENADE","SLOT_ITEM.PANZERSHRECK","SLOT_ITEM.PANZERSHRECK_AT_WEAPON_ITEM","SLOT_ITEM.PANZERSHRECK_DESTROY_ENGINE","SLOT_ITEM.PANZERSHRECK_MP","SLOT_ITEM.PANZERSHRECK_SLOT1","SLOT_ITEM.PANZERSHRECK_SLOT1_MP","SLOT_ITEM.PANZERSHRECK_SLOT2","SLOT_ITEM.PANZERSHRECK_SLOT2_MP","SLOT_ITEM.PARADROP_REINFORCE_ITEM","SLOT_ITEM.PARATROOPER_M1919A6_LMG_MOVING_NO_PRONE_MP","SLOT_ITEM.PARATROOPER_M1919A6_LMG_MP","SLOT_ITEM.PARATROOPER_MK2_GRENADE_MP","SLOT_ITEM.PARATROOPER_THOMPSON_DUMMY","SLOT_ITEM.PARATROOPER_THOMPSON_MP","SLOT_ITEM.PARTISAN_DP_28_LIGHT_MACHINE_GUN_PACKAGE_MP","SLOT_ITEM.PARTISAN_MG42_LMG_MP","SLOT_ITEM.PATHFINDERS_SNIPER_ITEM","SLOT_ITEM.PENAL_TROOP_SATCHEL_CHARGE_ITEM_MP","SLOT_ITEM.PERSHING_HVAP_PIERCING_ITEM_MP","SLOT_ITEM.PIAT_SPIGOT_MORTAR_MP","SLOT_ITEM.PIONEER_FLAMETHROWER","SLOT_ITEM.PIONEER_FLAMETHROWER_ABILITY","SLOT_ITEM.PIONEER_FLAMETHROWER_ABILITY_MP","SLOT_ITEM.PIONEER_FLAMETHROWER_MP","SLOT_ITEM.PIONEER_STUN_GRENADE_MP","SLOT_ITEM.PM_AEF_OFFENSIVE_PUNCH_ITEM","SLOT_ITEM.PPSH41_ASSAULT_PACKAGE","SLOT_ITEM.PPSH41_ASSAULT_PACKAGE_DUMMY_ITEM_MP","SLOT_ITEM.PPSH41_ASSAULT_PACKAGE_MP","SLOT_ITEM.PTRS_41_ANTI_TANK_RIFLE_CONSCRIPT_MP","SLOT_ITEM.PTRS_41_ANTI_TANK_RIFLE_GUARD_TROOP","SLOT_ITEM.PTRS_41_ANTI_TANK_RIFLE_GUARD_TROOP_ASSAULT_MP","SLOT_ITEM.PTRS_41_ANTI_TANK_RIFLE_GUARD_TROOP_MP","SLOT_ITEM.PTRS_41_ANTI_TANK_RIFLE_PARTISAN_TROOP_MP","SLOT_ITEM.PUMA_AIMED_SHOT_MP","SLOT_ITEM.PUMA_CRITICAL_SHOT_MP","SLOT_ITEM.RANGER_PANZERSHRECK_MP","SLOT_ITEM.REAR_ECHELON_RIFLE_GRENADE_ACTIVATED","SLOT_ITEM.REAR_ECHELON_RIFLE_VOLLEY_FIRE","SLOT_ITEM.RECOUP_ACTIVE","SLOT_ITEM.RGD_1_SMOKE_GRENADE_ITEM","SLOT_ITEM.RGD_1_SMOKE_GRENADE_ITEM_MP","SLOT_ITEM.RGD_33_SLEEVED_GRENADE_ITEM","SLOT_ITEM.RGD_33_SLEEVED_GRENADE_ITEM_LONGTIMER","SLOT_ITEM.RGD_33_SLEEVED_GRENADE_ITEM_MP","SLOT_ITEM.RIFLEMAN_AT_RIFLE_GRENADE","SLOT_ITEM.RIFLEMEN_30_CAL","SLOT_ITEM.RIFLEMEN_FLARE","SLOT_ITEM.RIFLEMEN_M1918_BAR_MP","SLOT_ITEM.RIFLEMEN_MK2_GRENADE_MP","SLOT_ITEM.RIFLEMEN_TRAINING_DUMMY_CARBINE","SLOT_ITEM.RIFLEMEN_TRAINING_SATCHEL_ITEM","SLOT_ITEM.ROKS_2_FLAMETHROWER_ITEM","SLOT_ITEM.ROKS_2_FLAMETHROWER_ITEM_MP","SLOT_ITEM.RPG_40_ANTI_TANK_GRENADE_MP","SLOT_ITEM.RPG_43_ANTI_TANK_GRENADE","SLOT_ITEM.RPG_43_ANTI_TANK_GRENADE_MP","SLOT_ITEM.SAPPER_BREN_LIGHT_MACHINE_GUN_MP","SLOT_ITEM.SAPPER_STUN_GRENADE_MP","SLOT_ITEM.SAPPER_VICKERS_K_LIGHT_MACHINE_GUN_MP","SLOT_ITEM.SATCHEL_CHARGE_ITEM_MP","SLOT_ITEM.SELF_REPAIR_DUMMY_SLOT_ITEM","SLOT_ITEM.SHERMAN_BATTLE_GROUP_ITEM_MP","SLOT_ITEM.SHOCK_TROOP_RG_42_GRENADE","SLOT_ITEM.SHOCK_TROOP_RG_42_GRENADE_MP","SLOT_ITEM.SIPHON_ACTIVE","SLOT_ITEM.SNIPER_FLARE_MP","SLOT_ITEM.SNIPER_RIFLE_ITEM","SLOT_ITEM.SNIPER_RIFLE_ITEM_MP","SLOT_ITEM.SNIPER_SMOKE_MARKER_GRENADE_MP","SLOT_ITEM.SNIPER_SUPPRESSIVE_VOLLEY_MP","SLOT_ITEM.SOVIET_FLAG","SLOT_ITEM.SPEARHEAD_ITEM","SLOT_ITEM.STALK_ITEM","SLOT_ITEM.STORMTROOPER_MP44_MP","SLOT_ITEM.STUG_CRITICAL_SHOT_MP","SLOT_ITEM.STUG_ELEFANT_PAK40_PAK43_BRUMMBAR_CRITICAL_SHOT","SLOT_ITEM.STUG_ELEFANT_PAK40_PAK43_BRUMMBAR_CRITICAL_SHOT_MP","SLOT_ITEM.STURMTIGER_RELOAD_ACTIVE","SLOT_ITEM.SU76M_HE_ROUND_ITEM","SLOT_ITEM.SU76M_HE_ROUND_ITEM_MP","SLOT_ITEM.SUPPORT_SQUAD_SETUP","SLOT_ITEM.SUPPRESS_FIRE_ITEM","SLOT_ITEM.SWS_LOCKDOWN_SETUP","SLOT_ITEM.TANK_HUNTER_SHOCK_BAZOOKA_VET","SLOT_ITEM.TIGER_ACE_CRITICAL_SHOT_MP","SLOT_ITEM.TIGER_FLARE_TOW","SLOT_ITEM.TOMMY_BREN_LIGHT_MACHINE_GUN_MP","SLOT_ITEM.TOMMY_FLAMETHROWER","SLOT_ITEM.TOMMY_GAMMON_BOMB_HEAVY","SLOT_ITEM.TOMMY_GAMMON_BOMB_MEDIUM","SLOT_ITEM.TOMMY_HEAT_GRENADE","SLOT_ITEM.TOMMY_MILLS_BOMB","SLOT_ITEM.TOMMY_MILLS_BOMB_ASSAULT","SLOT_ITEM.TOMMY_OFFICER_SMOKE_MARKER_GRENADE_MP","SLOT_ITEM.TOMMY_SCOPED_RIFLE_ITEM_MP","SLOT_ITEM.TOMMY_STEN_SMG","SLOT_ITEM.TROOP_SUPPORT_DUMMY_MEDIC","SLOT_ITEM.UNIVERSAL_CARRIER_VICKERS_K_PACKAGE_MP","SLOT_ITEM.UNIVERSAL_CARRIER_VICKERS_MMG_SUPPRESSIVE_MP","SLOT_ITEM.URBAN_ASSAULT_FLAMETHROWER_MP","SLOT_ITEM.URBAN_ASSAULT_SATCHEL_CHARGE_ITEM_MP","SLOT_ITEM.VALENTINE_SMOKE_MARKER_GRENADE_MP","SLOT_ITEM.VICKERS_K_LIGHT_MACHINE_GUN_MP","SLOT_ITEM.VOLKSGRENADIER_FIRE_GRENADE_MP","SLOT_ITEM.VOLKSGRENADIER_GRENADE_MP","SLOT_ITEM.VOLKSGRENADIER_MP44_ITEM_MP","SLOT_ITEM.VOLKSGRENADIER_PANZERFAUST_MP","SLOT_ITEM.VOLKSGRENADIER_PANZERFAUST_VET_4_MP","SLOT_ITEM.WAFFEN_BUNDLED_ASSAULT_GRENADE","SLOT_ITEM.WEST_GERMAN_MINESWEEPER","SLOT_ITEM.WG_BLENDKORPER_SMOKE_UI_ITEM","SLOT_ITEM.WG_PANZER_IV_ARMORED_SKIRTS","CRIT._NO_CRITICAL","CRIT._NO_CRITICAL_MINE","CRIT._NO_CRITICAL_REAR","CRIT._SP_ANIA_EXPLOSIVE","CRIT._SP_ANIA_KILLED","CRIT.ASSAULT_MODIFIERS","CRIT.ATTACK_PLAN_MODIFIERS","CRIT.AXIS_ASSAULT_MODIFIERS","CRIT.BRIDGE_DEMOLITION_MAKE_WRECK","CRIT.BRIDGE_MAKE_WRECK","CRIT.BUILDING_ABANDON","CRIT.BUILDING_BRACED","CRIT.BUILDING_DESTROY","CRIT.BUILDING_DESTROY_CONSTRUCTION","CRIT.BUILDING_DESTROY_SUPPLY_CENTER","CRIT.BUILDING_FIRE_DAMAGE_DOT","CRIT.BUILDING_FIRE_DAMAGE_PANEL","CRIT.BUILDING_PANEL_DAMAGE_CRITICAL","CRIT.BUILDING_RED_BUILD_TIME_INCREASE","CRIT.BUILDING_STRONG_CRITICAL","CRIT.BUILDING_WEAK_CRITICAL","CRIT.BUILDING_YELLOW_BUILD_TIME_INCREASE","CRIT.BULLET_HIT_CRITICAL","CRIT.BURN","CRIT.BURN_DEATH","CRIT.BURN_DEATH_OUT_OF_CONTROL","CRIT.BURN_WORLD_OBJECT","CRIT.BURN_WORLD_OBJECT_DEATH","CRIT.CAMOUFLAGE_MINE","CRIT.CHURCHILL_TANK_SHOCK_MODIFIERS","CRIT.DETONATE_BANGALORE","CRIT.DETONATE_DEMOLITION_CHARGE","CRIT.DETONATE_MINE","CRIT.EMPLACEMENT_EMPTY","CRIT.EMPLACEMENT_FLAME_CRITICAL","CRIT.EMPLACEMENT_KILL_LOADER","CRIT.EXPLOSIVE_DESTROY","CRIT.GOLIATH_DESTROY","CRIT.HEROIC_CHARGE_FATIGUE","CRIT.MAKE_CASUALTY","CRIT.SOLDIER_BLIND","CRIT.SOLDIER_EXECUTED","CRIT.SOLDIER_EXPLOSIVE_ROUND","CRIT.SOLDIER_FLAMETHROWER_EXPLODE","CRIT.SOLDIER_FORCE_RETREAT","CRIT.SOLDIER_FROZEN","CRIT.SOLDIER_KILLED","CRIT.SOLDIER_KILLED_DEATH_INTENSITY_100","CRIT.SOLDIER_KILLED_DEATH_INTENSITY_30","CRIT.SOLDIER_KILLED_DEATH_INTENSITY_60","CRIT.SOLDIER_KILLED_HMG_DEATH","CRIT.SOLDIER_PIN","CRIT.SOLDIER_SLOW","CRIT.SOLDIER_SNIPED","CRIT.SOLDIER_SNIPED_IN_HALFTRACK","CRIT.SOLDIER_SNIPED_MAKE_CASUALTY","CRIT.SOLDIER_SNIPED_STILL_ALIVE","CRIT.SOLDIER_STUN","CRIT.SOLDIER_SUPPRESS","CRIT.SQUAD_ITEM_DAMAGED","CRIT.STUNNED_CANNOT_SHOOT_10_SECONDS","CRIT.STUNNED_CANNOT_SHOOT_MOVE_10_SECONDS","CRIT.SUPPLY_DROP_BLOW_UP","CRIT.TANK_TRAP_DESTROY","CRIT.TEAM_WEAPON_DISABLING_SHOT","CRIT.VEHICLE_ABANDON","CRIT.VEHICLE_ABANDON_STURMTIGER","CRIT.VEHICLE_AEC_TEMP_ENGINE_DAMAGE","CRIT.VEHICLE_AEC_TEMP_IMMOBILITY","CRIT.VEHICLE_BLIND","CRIT.VEHICLE_CREW_DAZED_JAGDTIGER","CRIT.VEHICLE_CREW_SHOCKED","CRIT.VEHICLE_CREW_STUNNED","CRIT.VEHICLE_CREW_STUNNED_2","CRIT.VEHICLE_DAMAGE_ENGINE","CRIT.VEHICLE_DAMAGE_ENGINE_INCREMENTAL","CRIT.VEHICLE_DAMAGE_ENGINE_REAR","CRIT.VEHICLE_DAMAGE_ENGINE_REAR_RAMMING","CRIT.VEHICLE_DAMAGE_ENGINE_SNARE","CRIT.VEHICLE_DECREW","CRIT.VEHICLE_DESTROY","CRIT.VEHICLE_DESTROY_BREW_UP","CRIT.VEHICLE_DESTROY_ENGINE","CRIT.VEHICLE_DESTROY_ENGINE_REAR","CRIT.VEHICLE_DESTROY_MAINGUN","CRIT.VEHICLE_DESTROY_MAINGUN_RAMMING","CRIT.VEHICLE_DESTROY_QUAD_50","CRIT.VEHICLE_DESTROY_SEARCHLIGHT_IR_HALFTRACK","CRIT.VEHICLE_DESTROY_WEAPON_TEAM","CRIT.VEHICLE_DRIVER_INJURED","CRIT.VEHICLE_ENGINE_BURNING","CRIT.VEHICLE_EXHAUST_DAMAGED","CRIT.VEHICLE_GUNNER_INJURED","CRIT.VEHICLE_KILL_BRIT_TANK_COMMANDER","CRIT.VEHICLE_KILL_COMMANDER","CRIT.VEHICLE_KILL_DRIVER_RUSSIAN","CRIT.VEHICLE_KILL_GUNNER_RUSSIAN","CRIT.VEHICLE_KILL_RELOADER_RUSSIAN","CRIT.VEHICLE_KILL_TOP_GUNNER_HARDPOINT_1","CRIT.VEHICLE_KILL_TOP_GUNNER_HARDPOINT_2","CRIT.VEHICLE_KILL_TOP_GUNNER_HARDPOINT_4","CRIT.VEHICLE_LIGHT_DAMAGE_ENGINE","CRIT.VEHICLE_LIGHT_DAMAGE_ENGINE_REAR","CRIT.VEHICLE_LIGHT_DESTROY_ENGINE","CRIT.VEHICLE_LIGHT_DESTROY_ENGINE_REAR","CRIT.VEHICLE_LOADER_INJURED","CRIT.VEHICLE_LOSE_TREADS_OR_WHEELS","CRIT.VEHICLE_MAKE_WRECK","CRIT.VEHICLE_OPTICS_DAMAGED","CRIT.VEHICLE_OPTICS_DAMAGED_TEMP","CRIT.VEHICLE_OUT_OF_CONTROL_FAST","CRIT.VEHICLE_OUT_OF_CONTROL_SLOW","CRIT.VEHICLE_OUT_OF_FUEL_GERMAN_SP","CRIT.VEHICLE_SHELL_SHOCKED","CRIT.VEHICLE_SNIPER_SLOW","CRIT.VEHICLE_STUCK_IN_MUD","CRIT.VEHICLE_TANK_GRAB_ABANDON_SP","CRIT.VEHICLE_TEMP_IMMOBILITY","CRIT.VEHICLE_TURRET_DISABLED_TEMP","CRIT.VEHICLE_UNIVERSAL_CARRIER_FLAMETHROWER_EXPLODE","CRIT.VEHICLE_VISION","CRIT.VEHICLE_VISON_BLOCK_DAMAGED","CRIT.VEHICLE_WEAPON_DISABLED_TEMP","CRIT.WORLD_DESTROY_BARRIER","CRIT.WORLD_OBJECT_DESTROY","CRIT.WORLD_OWNED_VEHICLE_ABANDON","BridgeReplace_OnInit","SkinPreviewCapture_Init","SkinPreviewCapture_SpawnVehicles","SkinPreviewCapture_UIInit","SkinPreviewCapture_CycleAndCaptureScreenshots","SkinPreviewCapture_Begin","SkinPreviewCapture_BeginCountdown","SkinPreviewCapture_ExitCountdown","SkinPreviewCapture_Exit","SkinPreviewCapture_StartCountdown","Map_PreInit","SkinPreviewCapture_Configure","AOH_PreInit","AV_PreInit","AV_Init","AV_UpdateObjectiveTimer","AV_UIInit","AV_End","CCM_ActionSpawnUKFSpawner","CCM_ActionSpawnUKFMiscSpawner","Squad_ToClipboardData","Squad_FromClipboardData","Entity_FromClipboardData","Entity_ToDataParameters","Entity_GetHealthPointsString","Squad_ToDataParameters","Squad_GetHealthPointsString","Player_ToDataParameters","Player_GetSetting","Player_SetSetting","Player_GetSettings","LocalPlayer_GetSettings","Data_GetHealthModifiedString","Data_GetOwnerChangedString","CCM_EventCueClickManger","CCM_EventMessage","CCM_EventKickerMessage","CCM_EventKickerMessageEval","CCM_EventKickerHealthMessageEval","CCM_ErrorMessage","Item_GetEnemyPlayer","CCM_SpawnQueueTick","CCM_SpawnQueueInit","CCM_SpawnQueueAdd","CCM_DummyMessage","CCM_PlayerCommandIssued","CCM_SquadCommandIssued","CCM_EntityCommandIssued","CCM_CustomUIEvent","Variable_FromG","Ternary","CCM_PlayerCommandIssued2","CCM_ConfigInit","__subMenu_SetUpdateRate","__subMenu_SpawnUnits","__subMenu_ManipulateSquadMembers","__panel_SelectionHealth","TestFormAdd","TestFormRender","Test_SlotItemRemoveSpam","Test_SlotItemRemoveSpam_Tick","CCM_HealthMonitor_Tick","CCM_HealthMonitor_HandleHealthMessage","CCM_HealthMonitor_RegisterNewItem","CCM_HealthMonitorInit","CCM_SuppressionMonitor_Tick","CCM_SuppressionMonitor_HandleMessage","CCM_SuppressionhMonitor_RegisterNewItem","CCM_SuppressionMonitorInit","CCM_Init","CCM_UIInit","CCM_BroadcastMessageReceived","CCM_Broadcast","CCM_ShowCrosshair","CCM_HideCrosshair","CCM_DisableUI","CCM_EnableUI","CCM_KillSelection","CCM_DeleteSelection","CCM_KillSquad","CCM_DeleteSquad","CCM_KillEntity","CCM_DeleteEntity","CCM_EnableFOW","CCM_DisableFOW","CCM_EnableAI","CCM_DisableAI","CCM_SetAIDifficulty","CCM_SetSelectionHealth","CCM_AddSelectionHealthPercentage","CCM_AddSelectionHealthPoints","CCM_SetSelectionInvulnerability","CCM_SetSelectionOwner","CCM_AddResource","CCM_ResetResource","CCM_AddPopulationCap","CCM_SetInstantProductionEnabled","CCM_SetInstantConstructionEnabled","CCM_SetInstantAbilityRechargeEnabled","CCM_SpawnSquad","CCM_SpawnEntity","CCM_SpawnSlotItem","CCM_IncreaseSelectionXP","CCM_IncreaseSelectionVeterancyLevel","CCM_InstantReinforceSelection","CCM_SplitSelection","CCM_RemoveSelectionCriticals","CCM_RemoveSquadCritical","CCM_RemoveEntityCritical","CCM_ApplyCriticalToSelection","CCM_SetSquadAutoTargetting","CCM_RemoveSquadUpgrade","CCM_RemoveEntityUpgrade","CCM_RemoveSquadSlotItem","CCM_SetSelectionFacing","CCM_TeleportSelection","CCM_KillEverything","CCM_DeleteEverything","CCM_RotateEntity","CCM_SetHealthMonitorEnabled","CCM_SetSuppressionMonitorEnabled","CCM_SelectedTeamWeaponGarrisonFacePosition","CCM_CancelTeamWeaponGarrisonFacingOrder","CCM_AddSelectionSuppression","CCM_SetAllAIPlayersEnabled","CCM_ResetSelectionVeterancy","CCM_SetResourceIncomeEnabled","CCM_SetHealthMonitorUpdateRate","CCM_SetSuppressionMonitorUpdateRate","CCM_UnlockCommanderAbility","CCM_ClearCommanderAbilities","CCM_ModifySquadMovementSpeed","CCM_SetSelectionOwnerToEnemy","CCM_SquadToEntity","CCM_SetEntityAnimatorState","CCM_SetSquadAnimatorState","CCM_SetSelectionAnimatorState","CCM_SetSelectionSkinType","CCM_DropSelectionWeapons","CCM_CaptureAllTerritorySectors","CCM_NeutralizeAllTerritorySectors","CCM_SquadToSkinPreviewEntity","Enhanced_Init","Enhanced_SystemInit","Enhanced_BroadcastMessageReceived","Enhanced_UITick","Enhanced_SetButtonsEnabled","Enhanced_ResetButtonIcons","Enhanced_SetButtonsVisible","Enhanced_PreInit","Enhanced_UIInit","Dude","MyMap_OnInit","MyMap_BonusUnitKilled","prnt","toCharArray","export","include","getBlueprintIfItExists","getBlueprintName","instanceOf","parent","Loc_Create","broadcastMessage","delayedStart","Map_PlayerBonusUnitKilled","MyFunction","Map_OnInit","Gardeners_PreInit","AutoAbandonManager","AutoAbandon_Add","AutoAbandon_Remove","AutoDeleteManager","AutoDelete_Add","AutoDelete_Remove","AutoRetreatManager","AutoRetreat_Add","AutoRetreat_Remove","Parameters_ToStringData","Parameters_FromStringData","Player_FromStringData","Squad_FromStringData","Entity_FromStringData","Broadcast","Camera_MoveToCallback","Camera_MoveToCallback_Tick","CameraPosition","Class","Color","Margin","Padding","Player","Control","Button_CreateConfig","Button_GetIcon","Button","FormControl_Init","FormControl_Refresh","Form","Icon","Label","NumericUpDown_CreateIconConfig","NumericUpDownScroll_Tick","NumericUpDown_RegisterAutoScroll","NumericUpDown_UnregisterAutoScroll","NumericUpDown","MenuControl_Init","Menu_AutoRefresh","Menu_AutoCheckEnabledScan","Menu_AutoCheckCheckedScan","CloseMenus","Menu","Menu_CreateBorderImage","Panel_GetMultipartBackground","Panel","PanelColumn","PanelColumnCollection","Class_GetUniqueID","Class_CreateInstance","Construct","CompanyCommander_Create","ControlSystem_Init","Button_FromTag","ButtonCallbackHandler","Control_GetName","Control_GetX","Control_GetY","Control_GetPath","Control_GetText","Control_GetTag","BPData_GetExtensions","Loc_Get","EBP_HasExtension","EBPData_HasExtension","EBP_GetScreenName","EBP_GetIcon","EBPData_GetUIExt","EBPData_GetScreenName","EBPData_GetIcon","SBP_GetScreenName","SBP_GetIcon","SBPData_GetRaceUIExt","SBPData_GetScreenName","SBPData_GetIcon","Crit_GetScreenName","CritData_GetUIExt","CritData_GetScreenName","CritData_GetIcon","UPG_GetScreenName","UPGData_GetScreenName","SlotItem_GetScreenName","SlotItemData_GetScreenName","EGroup_ToTable","EGroup_IsAlive","EGroup_IsCapturedByTeam2","LocalImport","ImportSystem","ImportDataTables","Library_Load","Lib_EnableMessages","Lib_SetMessagesEnabled","Lib_SetupMod","Mod_GetIcon","Mod_GetAbilityBlueprint","Mod_GetSquadBlueprint","Mod_GetEntityBlueprint","Mod_GetUpgradeBlueprint","Msg_Pos","Msg_3D","Lib_GameOver","Debug_SetMessagesEnabled","TryCatch","Library_Setup","Entity_Validate","Entity_AddHealthPercentage","Entity_AddHealthPoints","Entity_GetOwnerString","Entity_GetBPName","Entity_GetCriticals","Entity_RemoveCriticals","Entity_IsTeamWeapon","Entity_IsValidSafe","Entity_GetUpgrades","Entity_Rotate","Entity_GetTypes","Entity_IsOfType2","Entity_HasUpgrades","EBP_GetTypes","EBP_IsOfType","Entity_Decrew","Entity_PrepareForScreenshot","Entity_SetSkinSeason","Entity_GetBlueprintName","Entity_HasModifierExt","Percentage_Normalize","Round","scientific","Player_GetIndex","Player_SetResourcesEnabled","Player_ResetResources","Player_GetAllSquads","Player_DestroyAllSquads","Player_GetDisplayRaceName","Player_GetDisplayRaceNameLong","Player_GetNameWithFaction","AIDifficulty_Tostring","Player_IsAI","Player_ForEachSquad","Pos_NormalizeHeight","Rule_AddIntervalAndRun","Rule_AddIfNotExists","Rule_AddIntervalIfNotExists","Rule_ChangeIntervalIfExists","Rule_AddDelayed","Rule_AddDelayedIfNotExists","Modify_SetSquadtAutoTargetting","Modify_SetEntityAutoTargetting","Modify_SetEntityAutoTargettingAllHardpoints","Modify_SetSquadAutoTargettingAllHardpoints","Modify_SetSGroupAutoTargettingAllHardpoints","Modify_SetEGroupAutoTargettingAllHardpoints","Modify_SquadTypeEnableCapturing","Selection_UnselectAll","Selection_IsOneEntity","Selection_IsOneSquad","Selection_IsOneSquadOrOneEntity","Selection_IsOneOrMoreSquads","Selection_IsOneOrMoreEntities","Selection_IsSquadsOrEntities","Selection_IsSquadOrEntity","Selection_GetSquad","Selection_GetEntity","Selection_GetSquads","Selection_GetEntities","Misc_SomethingIsSelected","Selection_ForEachSquad","Selection_ForEachEntity","Selection_IsNotInvulnerable","Selection_IsNotNeutralSquadOrEntity","Selection_CountInvulnerables","Selection_IsInvulnerable","SelectionMonitor_Init","SelectionMonitor","SelectionMonitor_GetID","SelectionMonitor_AddSquad","SelectionMonitor_AddEntity","SelectionMonitor_RemoveSquad","SelectionMonitor_RemoveEntity","SelectionMonitor_RemoveItemListener","SelectionMonitor_RemoveSquadLister","SelectionSystem_RemoveEntityLister","SGroup_ToTable","SGroup_SetPosition","SGroup_CountEntities","SGroup_IsAlive2","Squad_CountSpawned","Squad_IsPlane","Squad_SetSelectable","Squad_GetLastAttackerSquad","Squad_IsSelected","Squad_AddHealthPercentage","Squad_AddHealthPoints","Squad_Abandon","Squad_GetOwnerString","Squad_GetBPName","Squad_GetCriticals","Squad_RemoveCriticals","Squad_IsValidSafe","Squad_SetAutoTargetting","__RegisterSquadAutoTargettingModifier","__UnRegisterSquadAutoTargettingModifier","__RegisterEntityAutoTargettingModifier","__UnRegisterEntityAutoTargettingModifier","Squad_SetAllAutoTargetting","Squad_GetAutoTargetting","Squad_GetAllAutoTargetting","Squad_GetUpgrades","Squad_HasUpgrades","Squad_RemoveSlotItem","Squad_RemoveUpgradeFully","Squad_ForEachHeldSquad","Squad_DestroyHeldSquads","Squad_KillHeldSquads","Squad_ModifyVehicleSpeed","Squad_ModifyVehicleRotationSpeed","Squad_ModifyTurretHorizontalSpeed","Squad_ModifyMovementSpeed","Squad_GetTypes","Squad_IsOfType","SBP_GetTypes","SBP_IsOfType","Squad_GetEntityTable","Squad_ToEntities","Squad_ToEntity","Squad_AddMainGunHorizontalRotation","Squad_SetMainGunHorizontalRotation","Squad_Decrew","Squad_SetSkinSeason","Squad_RemoveSlotItems","Squad_GetEntityStateString","Squad_RemoveUpgradeIfPresent","Squad_RemoveUpgradesIfPResent","String_Match","String_Replace","String_AddGenetive","String_Split","Number_TrailingZeroes","Outpost","Outpost_Init","OutpostManager_Register","OutpostManager_Tick","OutpostPatrol","OutpostCaptureTrigger","OutpostPatrolAlarmedSquads_Register","OutpostPatrolAlarmedSquads_Tick","OutpostPatrolManager_Register","OutpostPatrolManager_Tick","OutpostRadioPost","OutpostRadioPostManager_Register","OutpostRadioPostManager_Tick","Table_AddTable","Table_GetSmallest","Table_GetLargest","Table_RemoveValue","Table_IsEmpty","Table_GetRandomBlueprint","Table_Remove","Table_ToIndexableList","Table_Count","Table_Compare","RangeTable_GetRandomValue","OutpostReinforcementsManager_Register","OutpostReinforcementsManager_Tick","Team_GetRandomPlayer","Team_GetRandomPlayers","Time_TicksToSeconds","Time_SecondsToTicks","Time_MinutesToTicks","UI_EnableSelectionVisuals","UI_EnableSquadSelectionVisuals","SelectionVisual_Tick","SelectionVisual_RegisterEntity","UI_ScalePoint","Util_DelaySeconds","Util_DelayMinutes","Util_DelayRandom","Util_DelayRandomSeconds","Util_GetRandomPosExtended","Util_GetRandomHeadingPos","UIFrame_Destroy","Misc_Tester","Util_DistanceFromLine","Util_DistancePointToTeamShortest","HintPoints_Remove","MapIcon_CreateAndFacePosition","toboolean","ResourceType_ToString","ResourceType_FromString","ResourceType_ToDisplayString","Selection_GetPlayer","Objective_UpdateTitle","Objective_StartLocally","Util_CallFunctionsWithParameters","World_ForEachEntity","World_DivideTerritoryBetweenTeams","World_GetWidthRange","World_GetLengthRange","World_RegisterPlayers","World_GetEverythingNearPoint","World_GetAll","World_GetAllSquads","World_ForEeachSquad","World_OneOrMoreAIPlayerIsEnabled","World_OneOrMoreAIPlayerIsDisabled","World_CleanUpTheDeadAll","World_GetAllTerritoryPointEntities","Villagers_PreInit","WarDrive_Init","_getPlayerMineEBP","_spawnMines","WarDrive_GetPlayerReconAbility","WarDrive_ReconSweepBetweenTeams","WarDrive_GetNextEffectDelay","WarDrive_PickRandomEffect","WarDrive_SplitTimeUnits","WarDrive_FormatTime","WarDrive_Monitor","Team_HasTerritoryPoint","WarDrive_EntityKilled","WarDrive_SquadKilled","TestEffect","WarDrive_EnableEffect","WarDrive_RemoveModifiers","WarDrive_GetIcon","WarDrive_RegisterModifier","Modify_SquadBuildTime","Modify_SquadReinforceTime","Modify_EntityCaptureTime","WarDrive_ObjectiveInit","WarDrive_ObjectiveAfterInt","WarDrive_Pager","WarDrive_AbilityExecuted","WarDrive_GetAbilityBlueprint","WarDrive_PreInit","CCM_AddInfiniteResourcesPopcap","CCM_ActionKillSelection","CCM_ActionDeleteSelection","CCM_ActionTeleportSelection","CCM_ActionIncreaseSelectionVeterancy","CCM_ActionIncreaseSelectionHealth","CCM_ActionDecreaseSelectionHealth","CCM_ModifySelectionHealth","CCM_ActionAbandonSelected","CCM_ActionRemoveCriticals","CCM_ActionDropSlotItems","CCM_ActionInstantReinforce","CCM_ActionAddPreciseManpower","CCM_ActionAddPreciseFuel","CCM_ActionAddPreciseMunition","_CCM_SpawnSpawnerSquad","CCM_ActionSpawnSovietSpawner","CCM_ActionSpawnAEFSpawner","CCM_ActionSpawnGermanSpawner","CCM_ActionSpawnWestGermanSpawner","CCM_ActionAddFullHealth","CCM_ActionKillOneEntity","CCM_ActionDeleteOneEntity","CCM_ActionSpawnGermanMiscSpawner","CCM_ActionSpawnSovietMiscSpawner","CCM_ActionSpawnWestGermanMiscSpawner","CCM_ActionSpawnAEFMiscSpawner","CCM_DataInit","CCM_CopySelection","CCM_PasteSelection","Clipboard_Clear","CCM_PreInit","CCM_SystemInit","CCM_PlayerResetAbilities","Player_GetSettingsKey","CCM_PlayerAbilityCompleteListener","CCM_PlayerAbilityListener","CCM_RegisterPlayerAction","Squad_GetSpawnerRaceIndex","Squad_GetSpawnerTable","Squad_GetSpawnAbilityPrefix","CCM_SquadAbilityListener","CCM_CountSpawnTableItems","_CCM_InitSpawnerSquad","CCM_AutoHideAbilities","Entity_CreateAndSpawnTowardTeamWeapon","Entity_GetUpgradeTable","Entity_ApplyCriticalHit","Entity_GetText","Entity_Abandon","EntityBP_IsBuilding","Util_Destroy","Util_GetBPName","Misc_CheckForParentSquad","Squad_GetTableKey","Entity_GetTableKey","Util_GetTablekey","Util_SetInvulnerable","Player_GetIDSafe","Table_ForEach","CCM_Msg","CCM_ClearMSG","CCM_GetAbilityBleprint","CCM_GetSquadBlueprint","CCM_GetEntityBlueprint","CCM_GetUpgradeBlueprint","CCM_GetIcon","CCM_EventCue","Misc_AddSpawnedItemToSystem","Util_AddHealth","Misc_DoPercentageSum","Util_SetPosition","Util_GetGameID","Util_DecodeGameID","Misc_SpawnSlotItemOnGround","Squad_ModifySpeed","Squad_GetHealthTable","Squad_ApplyHealthTable","Squad_GetPlayerOwnerSafe","Squad_GetHeadingTable","Squad_ApplyHeadingTable","Squad_GetUpgradesTable","Squad_GetText","Squad_GetCriticalsTable","Squad_ApplyCriticalHitTable","Squad_ModifyDamage","Squad_DropSlotItems","Squad_RemoveUpgrades","Squad_RemoveCritical","Squad_HasCritical","Squad_GetEntityPositionList","Squad_ApplyEntityPositionList","Squad_SetHealthPercentage","Squad_IsVehicle","CCM_ToggleInstantProduction","CCM_ToggleFOW","CCM_ToggleGlobalAI","CCM_ToggleSelectionInvulnerability","CCM_ToggleSelectionOwner","CCM_ToggleDisableWeapons","CCM_ToggleEngineOrPostureState","CCM_ToggleHealthMonitor","CCM_GetSquadKey","CCM_GetEntityKey","CCM_HealthMonitor","_CCM_HealthMonitor_HandleHealth","_CCM_HealthMonitor_KickerMessage","CTF_PreInit","CTFSystem_Init","CTF_GetRandomFlagSpawnPosition","CTF_FreeFlagSpawnPosition","CTFSystem_InitDelayed","CTF_StartCore","CTF_GetWinScoreLimit","CTF_FlagScoreMonitor","CTF_BlinkFlagCarriers","CTF_FlagRespawnMonitor","CTF_FlagStateMonitor","CTF_EnableResources","CTF_UpdateObjectiveUI","CTF_FixFlagColor","CTF_FixFlagColorDelayed","CTF_StopAlarm","CTF_FlagCarrierAbilityExecuted","CTF_DropFlagRequestManager","CTF_PreventFlagCarrierReCrewAndVehicleGarrisoning","CTF_FlagCaptured","CTF_FlagDropped","CTF_FlagScored","CTF_GetOpposingTeam","CTF_TeamFlagScore","CTF_ObjctiveInit","CTF_AddObjectiveUI","Entity_IsReCrewable","Squad_AddFlagCarrierEffects","Squad_RemoveFlagCarrierEffects","Squad_SetCaptureEnabled","Squad_EnableFlagCarrierUI","Squad_EnableCantHoldUI","Squad_ModifyInfantrySpeed","Squad_MonitorDeath","Squad_DisableFlagCarrierUI","isset","Squad_FlagCarrierDeath","Squad_DropFlag","Squad_CarriesFlag","Squad_IsRegisteredFlagCarrier","Squad_RegisterFlagCarrier","Squad_UnRegisterFlagCarrier","Squad_GetSlotItemTable","Player_EnableMoveFlagHereUI","Player_UnlockRetreat","Player_IsHoldingAnyFlags","SGroup_IsCarryingFlag","UI_LocalKickerMessage","UI_GlobalKickerMessage","CTF_Msg","ClearCTF_Msg","Listener","Table_Shuffle","Ability_GetUniqueKey","Player_AddPopulation","Player_ExecuteLocally","Player_GetEnemyPlayer","Player_SetResourceIncomeNumber","Team_GetFirstPlayer","Team_GetEntitiesNearPoint","Team_GetSquadsNearPoint","Team_GetPlayerCount","Team_ExecuteLocally","SGroup_CreateTemp","EGroup_CreateTemp","EGroup_GetClosest","EGroup_AddGroup","EGroup_FilterByUnitType","Entity_GetGarrisonedSquads","Entity_AutoAlign","Entity_CreateAndSpawnToward","Entity_CreateAndSpawnTowardDelayed","Entity_CreateAndSpawnTowardDelayedRandom","Entity_GetName","Entity_GetTempEGroup","Entity_GetOwnerSafe","Entity_Replace","Entity_IsSelected","Entity_HasProductionQueueItem","Entity_IsValidEntity","Squad_GetUniqueKey","Squad_GetName","Squad_IsIdle","Squad_IsConcstructing","Squad_IsHeadingToPosition","Squad_ForEachEntity","UI_FlashSquad","Util_Repeat","Util_Delay","Util_IsPositionInPolygon","Util_GetDirectionalOffset","Util_GetDirectionalOffsetPosition","Util_GetRandomPos","Util_GetAngleTowardsPos","Util_CopyPosition","Util_CreateUIFrame","Util_Tester","Misc_UnSelectAll","Util_DefaultValue","World_ForEachEntitiesByBlueprint","World_GetEntitiesOfType","Pos_AddHeight","Pos_GetString","dr_text3dpos","Heading_Rotate","Squad_InfraRedReveal","WinCondition_PreInit","WinCondition_MonitorVictoryPoints","Team_GetTitle","Team_GetOpposingTeam","OKWNoCache_PreInit","PK_SystemInit","PK_ScanPlayers","PK_PlayerAbilityListener","Player_RemoveTankDispatchAbilities","Squad_GetTempSGroup","Player_GetMapEntryPositionClosest","Util_SortPositionsByClosestImproved","Pos_GetXYZString","PK_Msg","PK_ClearMSG","PK_GetAbilityBleprint","PK_GetUpgradeBleprint","PK_GetSquadBleprint","PK_EventCue","Player_GetRaceIndex","PK_PreInit","RotateThings","TC_PreInit","TC_Init","TC_TogglePlayerCategory","System_PlayerAbilityComplete","System_PlayerAbilityExecuted","TC_UpdatePlayerCircle","TC_UpdatePlayerArrow","TC_GeneralManager","TC_GetAbilityBlueprint","TC_GetMineIcon","TC_GetMineIconScale","TC_MineIsAllowedToMark","TC_MineIsPartOfSMineField","TC_GetMineMarkerColor","TC_GetIcon","TC_MineMarkerManager","TC_BlibMinePlanted","System_EntityConstructionCompleted","System_EntityKilled","Player_IsLocalPlayer","Player_GetUniqueKey","Player_GetName","Players_ForEach","Players_ForEachInTeam","Entity_GetPlayerOwnerSafe","Entity_GetUniqueKey","Entity_CheckForParentSquad","EntityList_ContainsValidEntities","EGroup_GetEntityIds","Util_GlobalMessage","Util_CreateLocString","Util_GetBlueprint","Util_GetUnitOwner","Game_GetLocalPlayerID","World_OwnsUnit","World_GetEntitiesByBlueprint","World_ForEachEntities","Msg","TC_DataInit_Ebps","TC_DataInit","WinCondition_GameOver","WinCondition_Check","WinCondition_Init","$","AAGUID","ANGLE_instanced_arrays","AbstractWorker","AbstractWorkerEventMap","Account","ActiveXObject","AesCbcParams","AesCfbParams","AesCmacParams","AesCtrParams","AesDerivedKeyParams","AesGcmParams","AesKeyAlgorithm","AesKeyGenParams","Algorithm","AlgorithmIdentifier","AnalyserNode","AnimationEvent","AnimationEventInit","ApplicationCache","ApplicationCacheEventMap","Array","ArrayBuffer","ArrayBufferConstructor","ArrayBufferView","ArrayConstructor","ArrayLike","AssertionOptions","AssignedNodesOptions","Attr","Audio","AudioBuffer","AudioBufferSourceNode","AudioBufferSourceNodeEventMap","AudioContext","AudioContextBase","AudioContextEventMap","AudioDestinationNode","AudioListener","AudioNode","AudioParam","AudioProcessingEvent","AudioTrack","AudioTrackList","AudioTrackListEventMap","BarProp","BaseJQueryEventObject","BeforeUnloadEvent","BiquadFilterNode","Blob","BlobPropertyBag","Body","BodyInit","Boolean","BooleanConstructor","Buffer","BufferEncoding","BufferSource","ByteString","CDATASection","CSS","CSSConditionRule","CSSFontFaceRule","CSSGroupingRule","CSSImportRule","CSSKeyframeRule","CSSKeyframesRule","CSSMediaRule","CSSNamespaceRule","CSSPageRule","CSSRule","CSSRuleList","CSSStyleDeclaration","CSSStyleRule","CSSStyleSheet","CSSSupportsRule","Cache","CacheQueryOptions","CacheStorage","Canvas2DContextAttributes","CanvasGradient","CanvasPathMethods","CanvasPattern","CanvasRenderingContext2D","ChannelMergerNode","ChannelSplitterNode","CharacterData","ChildNode","ClassDecorator","ClientData","ClientRect","ClientRectList","ClipboardEvent","ClipboardEventInit","CloseEvent","CloseEventInit","Comment","CompositionEvent","CompositionEventInit","ConcatParams","ConfirmSiteSpecificExceptionsInformation","Console","ConstrainBoolean","ConstrainBooleanParameters","ConstrainDOMString","ConstrainDOMStringParameters","ConstrainDouble","ConstrainDoubleRange","ConstrainLong","ConstrainLongRange","ConstrainVideoFacingModeParameters","ConvolverNode","Coordinates","Crypto","CryptoKey","CryptoKeyPair","CryptoOperationData","CustomElementRegistry","CustomEvent","CustomEventInit","DOMError","DOMException","DOMImplementation","DOML2DeprecatedColorProperty","DOML2DeprecatedSizeProperty","DOMParser","DOMRectInit","DOMSettableTokenList","DOMStringList","DOMStringMap","DOMTokenList","DataCue","DataTransfer","DataTransferItem","DataTransferItemList","DataView","DataViewConstructor","Date","DateConstructor","DecodeErrorCallback","DecodeSuccessCallback","DeferredPermissionRequest","DelayNode","DeviceAcceleration","DeviceAccelerationDict","DeviceLightEvent","DeviceLightEventInit","DeviceMotionEvent","DeviceMotionEventInit","DeviceOrientationEvent","DeviceOrientationEventInit","DeviceRotationRate","DeviceRotationRateDict","DhImportKeyParams","DhKeyAlgorithm","DhKeyDeriveParams","DhKeyGenParams","Document","DocumentEvent","DocumentEventMap","DocumentFragment","DocumentOrShadowRoot","DocumentType","DoubleRange","DragEvent","DynamicsCompressorNode","EXT_frag_depth","EXT_texture_filter_anisotropic","EcKeyAlgorithm","EcKeyGenParams","EcKeyImportParams","EcdhKeyDeriveParams","EcdsaParams","Element","ElementDefinitionOptions","ElementEventMap","ElementListTagNameMap","ElementTagNameMap","ElementTraversal","Enumerator","EnumeratorConstructor","ErrnoException","Error","ErrorConstructor","ErrorEvent","ErrorEventHandler","ErrorEventInit","EvalError","EvalErrorConstructor","Event","EventEmitter","EventInit","EventListener","EventListenerObject","EventListenerOrEventListenerObject","EventModifierInit","EventTarget","ExceptionInformation","ExtensionScriptApis","External","FFF","FGHJK","File","FileList","FilePropertyBag","FileReader","Float32Array","Float32ArrayConstructor","Float64Array","Float64ArrayConstructor","FocusEvent","FocusEventInit","FocusNavigationEvent","FocusNavigationEventInit","FocusNavigationOrigin","Foo","Foos","ForEachCallback","FormData","FrameRequestCallback","Function","FunctionConstructor","FunctionStringCallback","GLbitfield","GLboolean","GLbyte","GLclampf","GLenum","GLfloat","GLint","GLintptr","GLshort","GLsizei","GLsizeiptr","GLubyte","GLuint","GLushort","GainNode","Gamepad","GamepadButton","GamepadEvent","GamepadEventInit","GeneratorFunction","GeneratorFunctionConstructor","Geolocation","GetNotificationOptions","GetSVGDocument","GlobalEventHandlers","GlobalEventHandlersEventMap","GlobalFetch","HTMLAllCollection","HTMLAnchorElement","HTMLAppletElement","HTMLAreaElement","HTMLAreasCollection","HTMLAudioElement","HTMLBRElement","HTMLBaseElement","HTMLBaseFontElement","HTMLBodyElement","HTMLBodyElementEventMap","HTMLButtonElement","HTMLCanvasElement","HTMLCollection","HTMLCollectionBase","HTMLCollectionOf","HTMLDListElement","HTMLDataElement","HTMLDataListElement","HTMLDirectoryElement","HTMLDivElement","HTMLDocument","HTMLElement","HTMLElementEventMap","HTMLElementTagNameMap","HTMLEmbedElement","HTMLFieldSetElement","HTMLFontElement","HTMLFormControlsCollection","HTMLFormElement","HTMLFrameElement","HTMLFrameElementEventMap","HTMLFrameSetElement","HTMLFrameSetElementEventMap","HTMLHRElement","HTMLHeadElement","HTMLHeadingElement","HTMLHtmlElement","HTMLIFrameElement","HTMLIFrameElementEventMap","HTMLImageElement","HTMLInputElement","HTMLLIElement","HTMLLabelElement","HTMLLegendElement","HTMLLinkElement","HTMLMapElement","HTMLMarqueeElement","HTMLMarqueeElementEventMap","HTMLMediaElement","HTMLMediaElementEventMap","HTMLMenuElement","HTMLMetaElement","HTMLMeterElement","HTMLModElement","HTMLOListElement","HTMLObjectElement","HTMLOptGroupElement","HTMLOptionElement","HTMLOptionsCollection","HTMLOutputElement","HTMLParagraphElement","HTMLParamElement","HTMLPictureElement","HTMLPreElement","HTMLProgressElement","HTMLQuoteElement","HTMLScriptElement","HTMLSelectElement","HTMLSlotElement","HTMLSourceElement","HTMLSpanElement","HTMLStyleElement","HTMLTableAlignment","HTMLTableCaptionElement","HTMLTableCellElement","HTMLTableColElement","HTMLTableDataCellElement","HTMLTableElement","HTMLTableHeaderCellElement","HTMLTableRowElement","HTMLTableSectionElement","HTMLTemplateElement","HTMLTextAreaElement","HTMLTimeElement","HTMLTitleElement","HTMLTrackElement","HTMLUListElement","HTMLUnknownElement","HTMLVideoElement","HTMLVideoElementEventMap","HashChangeEvent","HashChangeEventInit","Headers","HeadersInit","History","HkdfCtrParams","HmacImportParams","HmacKeyAlgorithm","HmacKeyGenParams","I","IArguments","IDBArrayKey","IDBCursor","IDBCursorWithValue","IDBDatabase","IDBDatabaseEventMap","IDBEnvironment","IDBFactory","IDBIndex","IDBIndexParameters","IDBKeyPath","IDBKeyRange","IDBObjectStore","IDBObjectStoreParameters","IDBOpenDBRequest","IDBOpenDBRequestEventMap","IDBRequest","IDBRequestEventMap","IDBTransaction","IDBTransactionEventMap","IDBValidKey","IDBVersionChangeEvent","IFoos","IIRFilterNode","ITextWriter","Image","ImageData","Infinity","Int16Array","Int16ArrayConstructor","Int32Array","Int32ArrayConstructor","Int8Array","Int8ArrayConstructor","IntersectionObserver","IntersectionObserverCallback","IntersectionObserverEntry","IntersectionObserverEntryInit","IntersectionObserverInit","Intl","Iterable","IterableIterator","Iterator","IteratorResult","JQuery","JQueryAjaxSettings","JQueryAnimationOptions","JQueryCallback","JQueryCoordinates","JQueryDeferred","JQueryEventConstructor","JQueryEventObject","JQueryGenericPromise","JQueryInputEventObject","JQueryKeyEventObject","JQueryMouseEventObject","JQueryParam","JQueryPromise","JQueryPromiseCallback","JQueryPromiseOperator","JQuerySerializeArrayElement","JQueryStatic","JQuerySupport","JQueryXHR","JSON","JSX","JsonWebKey","KeyAlgorithm","KeyFormat","KeyType","KeyUsage","KeyboardEvent","KeyboardEventInit","LinkStyle","ListeningStateChangedEvent","Location","LongRange","LongRunningScriptDetectedEvent","MSAccountInfo","MSApp","MSAppAsyncOperation","MSAppAsyncOperationEventMap","MSAssertion","MSAudioLocalClientEvent","MSAudioRecvPayload","MSAudioRecvSignal","MSAudioSendPayload","MSAudioSendSignal","MSBaseReader","MSBaseReaderEventMap","MSBlobBuilder","MSConnectivity","MSCredentialFilter","MSCredentialParameters","MSCredentialSpec","MSCredentials","MSDelay","MSDescription","MSExecAtPriorityFunctionCallback","MSFIDOCredentialAssertion","MSFIDOCredentialParameters","MSFIDOSignature","MSFIDOSignatureAssertion","MSFileSaver","MSGesture","MSGestureEvent","MSGraphicsTrust","MSHTMLWebViewElement","MSIPAddressInfo","MSIceWarningFlags","MSInboundPayload","MSInputMethodContext","MSInputMethodContextEventMap","MSJitter","MSLaunchUriCallback","MSLocalClientEvent","MSLocalClientEventBase","MSManipulationEvent","MSMediaKeyError","MSMediaKeyMessageEvent","MSMediaKeyNeededEvent","MSMediaKeySession","MSMediaKeys","MSNavigatorDoNotTrack","MSNetwork","MSNetworkConnectivityInfo","MSNetworkInterfaceType","MSOutboundNetwork","MSOutboundPayload","MSPacketLoss","MSPayloadBase","MSPointerEvent","MSPortRange","MSRangeCollection","MSRelayAddress","MSSignatureParameters","MSSiteModeEvent","MSStream","MSStreamReader","MSTransportDiagnosticsStats","MSUnsafeFunctionCallback","MSUtilization","MSVideoPayload","MSVideoRecvPayload","MSVideoResolutionDistribution","MSVideoSendPayload","MSWebViewAsyncOperation","MSWebViewAsyncOperationEventMap","MSWebViewSettings","Map","MapConstructor","Math","MediaDeviceInfo","MediaDevices","MediaDevicesEventMap","MediaElementAudioSourceNode","MediaEncryptedEvent","MediaEncryptedEventInit","MediaError","MediaKeyMessageEvent","MediaKeyMessageEventInit","MediaKeySession","MediaKeyStatusMap","MediaKeySystemAccess","MediaKeySystemConfiguration","MediaKeySystemMediaCapability","MediaKeys","MediaList","MediaQueryList","MediaQueryListListener","MediaSource","MediaStream","MediaStreamAudioSourceNode","MediaStreamConstraints","MediaStreamError","MediaStreamErrorEvent","MediaStreamErrorEventInit","MediaStreamEvent","MediaStreamEventInit","MediaStreamEventMap","MediaStreamTrack","MediaStreamTrackEvent","MediaStreamTrackEventInit","MediaStreamTrackEventMap","MediaTrackCapabilities","MediaTrackConstraintSet","MediaTrackConstraints","MediaTrackSettings","MediaTrackSupportedConstraints","MessageChannel","MessageEvent","MessageEventInit","MessagePort","MessagePortEventMap","MethodDecorator","MimeType","MimeTypeArray","Model123","Model456","MouseEvent","MouseEventInit","MouseWheelEvent","MsZoomToOptions","MutationCallback","MutationEvent","MutationObserver","MutationObserverInit","MutationRecord","NaN","NamedNodeMap","NavigationCompletedEvent","NavigationEvent","NavigationEventWithReferrer","Navigator","NavigatorBeacon","NavigatorConcurrentHardware","NavigatorContentUtils","NavigatorGeolocation","NavigatorID","NavigatorOnLine","NavigatorStorageUtils","NavigatorUserMedia","NavigatorUserMediaErrorCallback","NavigatorUserMediaSuccessCallback","Node","NodeBuffer","NodeFilter","NodeIterator","NodeJS","NodeList","NodeListOf","NodeModule","NodeProcess","NodeRequire","NodeRequireFunction","NodeSelector","Notification","NotificationEventMap","NotificationOptions","NotificationPermissionCallback","Number","NumberConstructor","OES_element_index_uint","OES_standard_derivatives","OES_texture_float","OES_texture_float_linear","OES_texture_half_float","OES_texture_half_float_linear","Object","ObjectConstructor","ObjectURLOptions","OfflineAudioCompletionEvent","OfflineAudioContext","OfflineAudioContextEventMap","Option","OscillatorNode","OscillatorNodeEventMap","OverflowEvent","PageTransitionEvent","PannerNode","ParameterDecorator","ParentNode","Partial","Path2D","PaymentAddress","PaymentCurrencyAmount","PaymentDetails","PaymentDetailsModifier","PaymentItem","PaymentMethodData","PaymentOptions","PaymentRequest","PaymentRequestEventMap","PaymentRequestUpdateEvent","PaymentRequestUpdateEventInit","PaymentResponse","PaymentShippingOption","Pbkdf2Params","PerfWidgetExternal","Performance","PerformanceEntry","PerformanceMark","PerformanceMeasure","PerformanceNavigation","PerformanceNavigationTiming","PerformanceResourceTiming","PerformanceTiming","PeriodicWave","PeriodicWaveConstraints","PermissionRequest","PermissionRequestedEvent","Pick","Plugin","PluginArray","PointerEvent","PointerEventInit","PopStateEvent","PopStateEventInit","Position","PositionCallback","PositionError","PositionErrorCallback","PositionOptions","ProcessingInstruction","ProgressEvent","ProgressEventInit","Promise","PromiseConstructor","PromiseConstructorLike","PromiseLike","PromiseRejectionEvent","PromiseRejectionEventInit","PropertyDecorator","PropertyDescriptor","PropertyDescriptorMap","PropertyKey","Proxy","ProxyConstructor","ProxyHandler","PushManager","PushSubscription","PushSubscriptionOptions","PushSubscriptionOptionsInit","RTCConfiguration","RTCDTMFToneChangeEvent","RTCDTMFToneChangeEventInit","RTCDtlsFingerprint","RTCDtlsParameters","RTCDtlsTransport","RTCDtlsTransportEventMap","RTCDtlsTransportStateChangedEvent","RTCDtmfSender","RTCDtmfSenderEventMap","RTCIceCandidate","RTCIceCandidateAttributes","RTCIceCandidateComplete","RTCIceCandidateDictionary","RTCIceCandidateInit","RTCIceCandidatePair","RTCIceCandidatePairChangedEvent","RTCIceCandidatePairStats","RTCIceGatherCandidate","RTCIceGatherOptions","RTCIceGatherer","RTCIceGathererEvent","RTCIceGathererEventMap","RTCIceParameters","RTCIceServer","RTCIceTransport","RTCIceTransportEventMap","RTCIceTransportStateChangedEvent","RTCInboundRTPStreamStats","RTCMediaStreamTrackStats","RTCOfferOptions","RTCOutboundRTPStreamStats","RTCPeerConnection","RTCPeerConnectionErrorCallback","RTCPeerConnectionEventMap","RTCPeerConnectionIceEvent","RTCPeerConnectionIceEventInit","RTCRTPStreamStats","RTCRtcpFeedback","RTCRtcpParameters","RTCRtpCapabilities","RTCRtpCodecCapability","RTCRtpCodecParameters","RTCRtpContributingSource","RTCRtpEncodingParameters","RTCRtpFecParameters","RTCRtpHeaderExtension","RTCRtpHeaderExtensionParameters","RTCRtpParameters","RTCRtpReceiver","RTCRtpReceiverEventMap","RTCRtpRtxParameters","RTCRtpSender","RTCRtpSenderEventMap","RTCRtpUnhandled","RTCSessionDescription","RTCSessionDescriptionCallback","RTCSessionDescriptionInit","RTCSrtpKeyParam","RTCSrtpSdesParameters","RTCSrtpSdesTransport","RTCSrtpSdesTransportEventMap","RTCSsrcConflictEvent","RTCSsrcRange","RTCStats","RTCStatsCallback","RTCStatsProvider","RTCStatsReport","RTCTransport","RTCTransportStats","RandomSource","Range","RangeError","RangeErrorConstructor","React","ReadableStream","ReadableStreamReader","Readonly","ReadonlyArray","ReadonlyMap","ReadonlySet","Record","ReferenceError","ReferenceErrorConstructor","Reflect","RegExp","RegExpConstructor","RegExpExecArray","RegExpMatchArray","RegistrationOptions","Request","RequestInfo","RequestInit","Response","ResponseInit","RsaHashedImportParams","RsaHashedKeyAlgorithm","RsaHashedKeyGenParams","RsaKeyAlgorithm","RsaKeyGenParams","RsaOaepParams","RsaOtherPrimesInfo","RsaPssParams","SVGAElement","SVGAngle","SVGAnimatedAngle","SVGAnimatedBoolean","SVGAnimatedEnumeration","SVGAnimatedInteger","SVGAnimatedLength","SVGAnimatedLengthList","SVGAnimatedNumber","SVGAnimatedNumberList","SVGAnimatedPoints","SVGAnimatedPreserveAspectRatio","SVGAnimatedRect","SVGAnimatedString","SVGAnimatedTransformList","SVGCircleElement","SVGClipPathElement","SVGComponentTransferFunctionElement","SVGDefsElement","SVGDescElement","SVGElement","SVGElementEventMap","SVGElementInstance","SVGElementInstanceList","SVGEllipseElement","SVGFEBlendElement","SVGFEColorMatrixElement","SVGFEComponentTransferElement","SVGFECompositeElement","SVGFEConvolveMatrixElement","SVGFEDiffuseLightingElement","SVGFEDisplacementMapElement","SVGFEDistantLightElement","SVGFEFloodElement","SVGFEFuncAElement","SVGFEFuncBElement","SVGFEFuncGElement","SVGFEFuncRElement","SVGFEGaussianBlurElement","SVGFEImageElement","SVGFEMergeElement","SVGFEMergeNodeElement","SVGFEMorphologyElement","SVGFEOffsetElement","SVGFEPointLightElement","SVGFESpecularLightingElement","SVGFESpotLightElement","SVGFETileElement","SVGFETurbulenceElement","SVGFilterElement","SVGFilterPrimitiveStandardAttributes","SVGFitToViewBox","SVGForeignObjectElement","SVGGElement","SVGGradientElement","SVGGraphicsElement","SVGImageElement","SVGLength","SVGLengthList","SVGLineElement","SVGLinearGradientElement","SVGMarkerElement","SVGMaskElement","SVGMatrix","SVGMetadataElement","SVGNumber","SVGNumberList","SVGPathElement","SVGPathSeg","SVGPathSegArcAbs","SVGPathSegArcRel","SVGPathSegClosePath","SVGPathSegCurvetoCubicAbs","SVGPathSegCurvetoCubicRel","SVGPathSegCurvetoCubicSmoothAbs","SVGPathSegCurvetoCubicSmoothRel","SVGPathSegCurvetoQuadraticAbs","SVGPathSegCurvetoQuadraticRel","SVGPathSegCurvetoQuadraticSmoothAbs","SVGPathSegCurvetoQuadraticSmoothRel","SVGPathSegLinetoAbs","SVGPathSegLinetoHorizontalAbs","SVGPathSegLinetoHorizontalRel","SVGPathSegLinetoRel","SVGPathSegLinetoVerticalAbs","SVGPathSegLinetoVerticalRel","SVGPathSegList","SVGPathSegMovetoAbs","SVGPathSegMovetoRel","SVGPatternElement","SVGPoint","SVGPointList","SVGPolygonElement","SVGPolylineElement","SVGPreserveAspectRatio","SVGRadialGradientElement","SVGRect","SVGRectElement","SVGSVGElement","SVGSVGElementEventMap","SVGScriptElement","SVGStopElement","SVGStringList","SVGStyleElement","SVGSwitchElement","SVGSymbolElement","SVGTSpanElement","SVGTests","SVGTextContentElement","SVGTextElement","SVGTextPathElement","SVGTextPositioningElement","SVGTitleElement","SVGTransform","SVGTransformList","SVGURIReference","SVGUnitTypes","SVGUseElement","SVGViewElement","SVGZoomAndPan","SVGZoomEvent","ScopedCredential","ScopedCredentialDescriptor","ScopedCredentialInfo","ScopedCredentialOptions","ScopedCredentialParameters","Screen","ScreenEventMap","ScriptNotifyEvent","ScriptProcessorNode","ScriptProcessorNodeEventMap","ScrollBehavior","ScrollIntoViewOptions","ScrollLogicalPosition","ScrollOptions","ScrollRestoration","ScrollToOptions","Selection","ServiceWorker","ServiceWorkerContainer","ServiceWorkerContainerEventMap","ServiceWorkerEventMap","ServiceWorkerMessageEvent","ServiceWorkerMessageEventInit","ServiceWorkerRegistration","ServiceWorkerRegistrationEventMap","Set","SetConstructor","ShadowRoot","ShadowRootInit","SlowBuffer","SourceBuffer","SourceBufferList","SpeechSynthesis","SpeechSynthesisEvent","SpeechSynthesisEventInit","SpeechSynthesisEventMap","SpeechSynthesisUtterance","SpeechSynthesisUtteranceEventMap","SpeechSynthesisVoice","StereoPannerNode","Storage","StorageEvent","StorageEventInit","StoreExceptionsInformation","StoreSiteSpecificExceptionsInformation","String","StringConstructor","StyleMedia","StyleSheet","StyleSheetList","StyleSheetPageList","SubtleCrypto","Symbol","SymbolConstructor","SyncManager","SyntaxError","SyntaxErrorConstructor","TemplateStringsArray","Text","TextEvent","TextMetrics","TextStreamBase","TextStreamReader","TextStreamWriter","TextTrack","TextTrackCue","TextTrackCueEventMap","TextTrackCueList","TextTrackEventMap","TextTrackList","TextTrackListEventMap","Thenable","TimeRanges","Touch","TouchEvent","TouchList","TrackEvent","TrackEventInit","TransitionEvent","TransitionEventInit","TreeWalker","TypeError","TypeErrorConstructor","TypedPropertyDescriptor","UIEvent","UIEventInit","URIError","URIErrorConstructor","URL","URLSearchParams","USVString","Uint16Array","Uint16ArrayConstructor","Uint32Array","Uint32ArrayConstructor","Uint8Array","Uint8ArrayConstructor","Uint8ClampedArray","Uint8ClampedArrayConstructor","UnviewableContentIdentifiedEvent","VBArray","VBArrayConstructor","ValidityState","VarDate","VideoPlaybackQuality","VideoTrack","VideoTrackList","VideoTrackListEventMap","VoidFunction","WEBGL_compressed_texture_s3tc","WEBGL_debug_renderer_info","WEBGL_depth_texture","WScript","WaveShaperNode","WeakMap","WeakMapConstructor","WeakSet","WeakSetConstructor","WebAuthentication","WebAuthnAssertion","WebAuthnExtensions","WebGLActiveInfo","WebGLBuffer","WebGLContextAttributes","WebGLContextEvent","WebGLContextEventInit","WebGLFramebuffer","WebGLObject","WebGLProgram","WebGLRenderbuffer","WebGLRenderingContext","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebKitCSSMatrix","WebKitDirectoryEntry","WebKitDirectoryReader","WebKitEntriesCallback","WebKitEntry","WebKitErrorCallback","WebKitFileCallback","WebKitFileEntry","WebKitFileSystem","WebKitPoint","WebSocket","WebSocketEventMap","WheelEvent","WheelEventInit","Window","WindowBase64","WindowConsole","WindowEventMap","WindowLocalStorage","WindowSessionStorage","WindowTimers","WindowTimersExtension","Worker","WorkerEventMap","WritableStream","XMLDocument","XMLHttpRequest","XMLHttpRequestEventMap","XMLHttpRequestEventTarget","XMLHttpRequestEventTargetEventMap","XMLHttpRequestUpload","XMLSerializer","XPathEvaluator","XPathExpression","XPathNSResolver","XPathResult","XSLTProcessor","_","__dirname","__filename","a","abstract","addEventListener","alert","any","applicationCache","as","async","atob","await","b","blur","boolean","break","btoa","caches","cancelAnimationFrame","captureEvents","case","catch","class","clearImmediate","clearInterval","clearTimeout","clientInformation","close","closed","confirm","console","const","constructor","continue","count","crypto","customElements","dddd","debugger","declare","decodeURI","decodeURIComponent","default","defaultStatus","delete","departFocus","devicePixelRatio","dispatchEvent","do","doIt","doNotTrack","doUpdateSnippet","document","element","else","encodeURI","encodeURIComponent","enum","eval","event","export","exports","extends","external","false","fetch","finally","findSnippetById","focus","foo","foon","fooo","for","frameElement","frames","from","function","fuzzy_match","fuzzy_match_simple","get","getComputedStyle","getMatchedCSSRules","getSelection","global","global","history","if","implements","import","importScripts","in","indexedDB","innerHeight","innerWidth","instanceof","interface","is","isFinite","isNaN","isSecureContext","jQuery","keyof","length","let","localStorage","location","locationbar","matchMedia","menubar","module","module","more","moveBy","moveTo","msContentScript","msCredentials","msWriteProfilerMark","name","namespace","navigator","never","new","null","number","object","of","offscreenBuffering","onabort","onafterprint","onbeforeprint","onbeforeunload","onblur","oncanplay","oncanplaythrough","onchange","onclick","oncompassneedscalibration","oncontextmenu","ondblclick","ondevicelight","ondevicemotion","ondeviceorientation","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onmsgesturechange","onmsgesturedoubletap","onmsgestureend","onmsgesturehold","onmsgesturestart","onmsgesturetap","onmsinertiastart","onmspointercancel","onmspointerdown","onmspointerenter","onmspointerleave","onmspointermove","onmspointerout","onmspointerover","onmspointerup","onoffline","ononline","onorientationchange","onpagehide","onpageshow","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onpopstate","onprogress","onratechange","onreadystatechange","onreset","onresize","onscroll","onseeked","onseeking","onselect","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontouchcancel","ontouchend","ontouchmove","ontouchstart","onunload","onvolumechange","onwaiting","onwheel","open","opener","orientation","outerHeight","outerWidth","package","pageXOffset","pageYOffset","parent","parseFloat","parseInt","payloadtype","performance","personalbar","postMessage","print","private","process","prompt","protected","public","readonly","releaseEvents","removeEventListener","requestAnimationFrame","require","require","resizeBy","resizeTo","return","screen","screenLeft","screenTop","screenX","screenY","scroll","scrollBy","scrollTo","scrollX","scrollY","scrollbars","self","sessionStorage","set","setImmediate","setInterval","setTimeout","speechSynthesis","static","status","statusbar","stop","string","styleMedia","super","switch","symbol","this","throw","toString","toolbar","top","true","try","type","typedoc","typeof","undefined","undefined","updateSnippet","uuid","vSomething","var","void","webkitCancelAnimationFrame","webkitConvertPointFromNodeToPage","webkitConvertPointFromPageToNode","webkitRTCPeerConnection","webkitRequestAnimationFrame","while","window","with","yield"] +}; }); \ No newline at end of file diff --git a/src/vs/base/test/common/filters.perf.data.json b/src/vs/base/test/common/filters.perf.data.json deleted file mode 100644 index db8c6391bc1d6..0000000000000 --- a/src/vs/base/test/common/filters.perf.data.json +++ /dev/null @@ -1 +0,0 @@ -["AI_ClearCaptureImportanceBonus","AI_ClearImportance","AI_CreateObjective","AI_DebugAttackEncounterPositionScoringEnable","AI_DebugAttackEncounterPositionScoringIsEnabled","AI_DebugLuaEnable","AI_DebugLuaIsEnabled","AI_DebugRatingEnable","AI_DebugRatingIsEnabled","AI_DebugRenderAllTaskChildrenEnable","AI_DebugRenderAllTaskChildrenIsEnabled","AI_DebugSkirmishCaptureEnable","AI_DebugSkirmishCaptureIsEnabled","AI_DebugSkirmishCombatTargetEnable","AI_DebugSkirmishCombatTargetIsEnabled","AI_DebugSkirmishObjectiveEnable","AI_DebugSkirmishObjectiveIsEnabled","AI_DisableAllEconomyOverrides","AI_Enable","AI_EnableAll","AI_EnableEconomyOverride","AI_GetDifficulty","AI_GetPersonality","AI_GetPersonalityLuaFileName","AI_IsAIPlayer","AI_IsEnabled","AI_LockEntity","AI_LockSquad","AI_LockSquads","AI_RestoreDefaultPersonalitySettings","AI_SetCaptureImportanceBonus","AI_SetDifficulty","AI_SetImportance","AI_SetPersonality","AI_UnlockAll","AI_UnlockEntity","AI_UnlockSquad","AI_UnlockSquads","AI_UpdateStatics","AIAbilityObjective_AbilityGuidance_SetAbilityPBG","AIObjective_Cancel","AIObjective_CombatGuidance_EnableCombatGarrison","AIObjective_CombatGuidance_EnableRetaliateAttacks","AIObjective_CombatGuidance_SetRetaliateAttackTargetAreaRadius","AIObjective_DefenseGuidance_AddFacingPosition","AIObjective_DefenseGuidance_EnableIdleGarrison","AIObjective_DefenseGuidance_ResetFacingPositions","AIObjective_EngagementGuidance_EnableAggressiveEngagementMove","AIObjective_EngagementGuidance_SetAllowReturnToPreviousStages","AIObjective_EngagementGuidance_SetCoordinatedSetup","AIObjective_EngagementGuidance_SetMaxEngagementTime","AIObjective_EngagementGuidance_SetMaxIdleTime","AIObjective_FallbackGuidance_EnableRetreatOnPinned","AIObjective_FallbackGuidance_EnableRetreatOnSuppression","AIObjective_FallbackGuidance_SetEntitiesRemainingThreshold","AIObjective_FallbackGuidance_SetFallbackCapacityPercentage","AIObjective_FallbackGuidance_SetFallbackCombatRatingPercentage","AIObjective_FallbackGuidance_SetFallbackSquadHealthPercentage","AIObjective_FallbackGuidance_SetFallbackVehicleHealthPercentage","AIObjective_FallbackGuidance_SetGlobalFallbackPercentage","AIObjective_FallbackGuidance_SetGlobalFallbackRetreat","AIObjective_FallbackGuidance_SetRetreatCapacityPercentage","AIObjective_FallbackGuidance_SetRetreatCombatRatingPercentage","AIObjective_FallbackGuidance_SetRetreatHealthPercentage","AIObjective_FallbackGuidance_SetTargetPosition","AIObjective_IsValid","AIObjective_MoveGuidance_EnableAggressiveMove","AIObjective_MoveGuidance_ResetPathingLengthFactor","AIObjective_MoveGuidance_ResetSafePathingWeight","AIObjective_MoveGuidance_SetPathingLengthFactor","AIObjective_MoveGuidance_SetSafePathingWeight","AIObjective_MoveGuidance_SetSquadCoherenceRadius","AIObjective_Notify_ClearCallbacks","AIObjective_Notify_SetPlayerEventObjectiveID","AIObjective_ResourceGuidance_ClearSquads","AIObjective_ResourceGuidance_SquadGroup","AIObjective_SetName","AIObjective_TacticFilter_DisableAbility","AIObjective_TacticFilter_DisableAbilityForSquadGroup","AIObjective_TacticFilter_EnableCloseGround","AIObjective_TacticFilter_Reset","AIObjective_TacticFilter_ResetAbilityGuidance","AIObjective_TacticFilter_ResetPriority","AIObjective_TacticFilter_ResetTacticGuidance","AIObjective_TacticFilter_ResetTargetGuidance","AIObjective_TacticFilter_SetAbilityGuidance","AIObjective_TacticFilter_SetDefaultAbilityGuidance","AIObjective_TacticFilter_SetDefaultTacticGuidance","AIObjective_TacticFilter_SetDefaultTargetGuidance","AIObjective_TacticFilter_SetPriority","AIObjective_TacticFilter_SetPriorityForSquadGroup","AIObjective_TacticFilter_SetTacticGuidance","AIObjective_TacticFilter_SetTargetPolicy","AIObjective_TargetGuidance_SetTargetArea","AIObjective_TargetGuidance_SetTargetEntity","AIObjective_TargetGuidance_SetTargetLeash","AIObjective_TargetGuidance_SetTargetPathByName","AIObjective_TargetGuidance_SetTargetPathWander","AIObjective_TargetGuidance_SetTargetPosition","AIObjective_TargetGuidance_SetTargetSquad","BeginnerHint_AddOpportunity","BeginnerHint_RemoveAllOpportunities","BeginnerHint_RemoveOpportunity","BP_GetAbilityBlueprint","BP_GetCamouflageStanceBlueprint","BP_GetCriticalBlueprint","BP_GetEntityBlueprint","BP_GetID","BP_GetMoveTypeBlueprint","BP_GetName","BP_GetPropertyBagGroupCount","BP_GetPropertyBagGroupPathName","BP_GetSlotItemBlueprint","BP_GetSquadBlueprint","BP_GetUpgradeBlueprint","BP_GetWeaponBlueprint","EBP_Exists","SBP_Exists","Camera_CyclePositions","Camera_Follow","Camera_MoveTo","Camera_MoveToIfClose","Camera_SetDefault","Cmd_AbandonTeamWeapon","Cmd_Ability","Cmd_AttachSquads","Cmd_Attack","Cmd_AttackMove","Cmd_AttackMoveThenCapture","Cmd_CaptureTeamWeapon","Cmd_Construct","Cmd_CriticalHit","Cmd_DetonateDemolitions","Cmd_EjectOccupants","Cmd_Garrison","Cmd_InstantReinforceUnit","Cmd_InstantReinforceUnitPos","Cmd_InstantSetupTeamWeapon","Cmd_InstantUpgrade","Cmd_Move","Cmd_MoveAwayFromPos","Cmd_MoveToAndDespawn","Cmd_MoveToClosestMarker","Cmd_MoveToThenCapture","Cmd_RecrewVehicle","Cmd_ReinforceUnit","Cmd_ReinforceUnitPos","Cmd_Retreat","Cmd_RevertOccupiedBuilding","Cmd_SetDemolitions","Cmd_SquadCamouflageStance","Cmd_SquadPath","Cmd_SquadPatrolMarker","Cmd_StaggeredRetreat","Cmd_Stop","Cmd_Surrender","Cmd_UngarrisonSquad","Cmd_Upgrade","Command_Entity","Command_EntityAbility","Command_EntityBuildSquad","Command_EntityEntity","Command_EntityExt","Command_EntityPos","Command_EntityPosAbility","Command_EntityPosDirAbility","Command_EntityPosSquad","Command_EntitySquad","Command_EntityTargetEntityAbility","Command_EntityTargetSquadAbility","Command_EntityUpgrade","Command_Player","Command_PlayerAbility","Command_PlayerEntity","Command_PlayerEntityCriticalHit","Command_PlayerExt","Command_PlayerPos","Command_PlayerPosAbility","Command_PlayerPosDirAbility","Command_PlayerPosExt","Command_PlayerSquadConstructBuilding","Command_PlayerSquadConstructFence","Command_PlayerSquadConstructField","Command_PlayerSquadCriticalHit","Command_PlayerUpgrade","Command_Squad","Command_SquadAbility","Command_SquadAttackMovePos","Command_SquadDoCustomPlan","Command_SquadDoCustomPlanTarget","Command_SquadEntity","Command_SquadEntityAbility","Command_SquadEntityAttack","Command_SquadEntityBool","Command_SquadEntityExt","Command_SquadEntityLoad","Command_SquadExt","Command_SquadMovePos","Command_SquadMovePosFacing","Command_SquadPos","Command_SquadPosAbility","Command_SquadPosExt","Command_SquadPositionAttack","Command_SquadSquad","Command_SquadSquadAbility","Command_SquadSquadAttack","Command_SquadSquadExt","Command_SquadSquadLoad","Command_SquadUpgrade","AutoCinematic","AutoReinforce_AddSGroup","AutoReinforce_RemoveAll","AutoReinforce_RemoveSGroup","AutoRetreat_AddSGroup","AutoRetreat_RemoveAll","AutoRetreat_RemoveSGroup","BridgeTerritory_Add","Ceasefire_AddSGroup","Ceasefire_RemoveSGroup","FireTargettingArtillery","Game_DefaultGameRestore","Game_GetGameRestoreCallbackExists","Game_RemoveGameRestoreCallback","Game_SetGameRestoreCallback","Resources_Disable","Resources_Enable","ShootTheSky_AddSyncWeapon","ShootTheSky_RemoveAll","ShootTheSky_RemoveSyncWeapon","SmokeEntrance_Do","Table_Contains","Table_Copy","Table_GetRandomItem","TeamWeapon_AddGroup","TeamWeapon_RemoveDirections","TeamWeapon_RemoveGroup","EGroup_Add","EGroup_AddEGroup","EGroup_CanSeeEGroup","EGroup_CanSeeSGroup","EGroup_Clear","EGroup_Compare","EGroup_ContainsBlueprints","EGroup_ContainsEGroup","EGroup_ContainsEntity","EGroup_Count","EGroup_CountAlive","EGroup_CountDeSpawned","EGroup_CountSpawned","EGroup_Create","EGroup_CreateIfNotFound","EGroup_CreateKickerMessage","EGroup_DeSpawn","EGroup_Destroy","EGroup_DestroyAllEntities","EGroup_Duplicate","EGroup_EnableMinimapIndicator","EGroup_EnableUIDecorator","EGroup_Exists","EGroup_Filter","EGroup_FilterUnderConstruction","EGroup_ForEach","EGroup_ForEachAllOrAny","EGroup_ForEachAllOrAnyEx","EGroup_ForEachEx","EGroup_FromName","EGroup_GetAvgHealth","EGroup_GetDeSpawnedEntityAt","EGroup_GetInvulnerable","EGroup_GetLastAttacker","EGroup_GetName","EGroup_GetOffsetPosition","EGroup_GetPosition","EGroup_GetRandomSpawnedEntity","EGroup_GetSequence","EGroup_GetSpawnedEntityAt","EGroup_GetSpawnedEntityFilter","EGroup_GetSpread","EGroup_GetSquadsHeld","EGroup_HasUpgrade","EGroup_Hide","EGroup_InstantCaptureStrategicPoint","EGroup_InstantRevertOccupiedBuilding","EGroup_Intersection","EGroup_IsBurning","EGroup_IsCapturedByPlayer","EGroup_IsCapturedByTeam","EGroup_IsDoingAttack","EGroup_IsEmpty","EGroup_IsHoldingAny","EGroup_IsInCover","EGroup_IsMoving","EGroup_IsOnScreen","EGroup_IsProducingSquads","EGroup_IsSpawned","EGroup_IsUnderAttack","EGroup_IsUnderAttackByPlayer","EGroup_IsUnderAttackFromDirection","EGroup_IsUsingAbility","EGroup_Kill","EGroup_NotifyOnPlayerDemolition","EGroup_Remove","EGroup_RemoveDemolitions","EGroup_RemoveGroup","EGroup_RemoveUpgrade","EGroup_ReSpawn","EGroup_SetAnimatorAction","EGroup_SetAnimatorEvent","EGroup_SetAnimatorState","EGroup_SetAnimatorVariable","EGroup_SetAutoTargetting","EGroup_SetAvgHealth","EGroup_SetCrushable","EGroup_SetDemolitions","EGroup_SetHealthMinCap","EGroup_SetInvulnerable","EGroup_SetPlayerOwner","EGroup_SetRallyPoint","EGroup_SetRecrewable","EGroup_SetSelectable","EGroup_SetSharedProductionQueue","EGroup_SetStrategicPointNeutral","EGroup_SetWorldOwned","EGroup_Single","SGroup_HasEntityUpgrade","Ai\\:GetEncountersBySGroup","Ai\\:GetEncountersBySquad","AI_DisableAllEncounters","AI_EnableAllEncounters","AI_GetActiveEncounters","AI_GetNumEncounters","AI_IsMatchingDifficulty","AI_OverrideDifficulty","AI_RemoveAllEncounters","AI_SetDebugLevel","AI_SetStaggeredSpawnDelay","AI_ToggleDebugData","AI_ToggleDebugPrint","AIAbilityGoal_AdjustDefaultGoalData","AIAbilityGoal_SetDefaultGoalData","AIAbilityGoal_SetModifyGoalData","AIAbilityGoal_SetOverrideGoalData","AIAttackGoal_AdjustDefaultGoalData","AIAttackGoal_SetDefaultGoalData","AIAttackGoal_SetModifyGoalData","AIAttackGoal_SetOverrideGoalData","AIBaseGoal_AdjustDefaultGoalData","AIBaseGoal_SetDefaultGoalData","AIBaseGoal_SetModifyGoalData","AIBaseGoal_SetOverrideGoalData","AIDefendGoal_AdjustDefaultGoalData","AIDefendGoal_SetDefaultGoalData","AIDefendGoal_SetModifyGoalData","AIDefendGoal_SetOverrideGoalData","AIMoveGoal_AdjustDefaultGoalData","AIMoveGoal_SetDefaultGoalData","AIMoveGoal_SetModifyGoalData","AIMoveGoal_SetOverrideGoalData","Encounter\\:AddSgroup","Encounter\\:ClearGoal","Encounter\\:ConvertSgroup","Encounter\\:Create","Encounter\\:CreateAbility","Encounter\\:CreateAttack","Encounter\\:CreateBasic","Encounter\\:CreateDefend","Encounter\\:CreateMove","Encounter\\:CreatePatrol","Encounter\\:Disable","Encounter\\:Enable","Encounter\\:GetGoalData","Encounter\\:GetSgroup","Encounter\\:RemoveOnDeath","Encounter\\:RestartGoal","Encounter\\:SetGoal","Encounter\\:SetGoalOnSuccess","Encounter\\:SetOnDeath","Encounter\\:Spawn","Encounter\\:UpdateGoal","MergeClone","Entity_ApplyCritical","Entity_BuildingPanelInfo","Entity_CanAttackNow","Entity_CancelProductionQueueItem","Entity_CanLoadSquad","Entity_CanLoadSquadAndAttackCurrentTarget","Entity_CanSeeEntity","Entity_CanSeeSquad","Entity_ClearPostureSuggestion","Entity_ClearTagDebug","Entity_CompleteUpgrade","Entity_Create","Entity_CreateENV","Entity_DeSpawn","Entity_Destroy","Entity_DisableBuildingDeath","Entity_DoBuildingDamageRay","Entity_EnableAttention","Entity_EnableProductionQueue","Entity_EnableStrategicPoint","Entity_ForceConstruct","Entity_FromWorldID","Entity_GetActiveCommand","Entity_GetBlueprint","Entity_GetBuildingProgress","Entity_GetCoverValue","Entity_GetGameID","Entity_GetHeading","Entity_GetHealth","Entity_GetHealthMax","Entity_GetHealthPercentage","Entity_GetInvulnerable","Entity_GetInvulnerableMinCap","Entity_GetInvulnerableToCritical","Entity_GetLastAttacker","Entity_GetLastAttackers","Entity_GetMaxCaptureCrewSize","Entity_GetOffsetPosition","Entity_GetPlayerOwner","Entity_GetPosition","Entity_GetProductionQueueItem","Entity_GetProductionQueueItemType","Entity_GetProductionQueueSize","Entity_GetResourceType","Entity_GetSightInnerHeight","Entity_GetSightInnerRadius","Entity_GetSightOuterHeight","Entity_GetSightOuterRadius","Entity_GetSquad","Entity_GetSquadsHeld","Entity_GetTotalPanelCount","Entity_GetUndestroyedPanelCount","Entity_GetWeaponBlueprint","Entity_GetWeaponHardpointCount","Entity_HasAnyCritical","Entity_HasCritical","Entity_HasProductionQueue","Entity_HasUpgrade","Entity_InstantCaptureStrategicPoint","Entity_InstantRevertOccupiedBuilding","Entity_IsAlive","Entity_IsAttacking","Entity_IsBuilding","Entity_IsBurning","Entity_IsCamouflaged","Entity_IsCapturableBuilding","Entity_IsCasualty","Entity_IsCuttable","Entity_IsDemolitionReady","Entity_IsEBPBuilding","Entity_IsEBPObjCover","Entity_IsHardpointActive","Entity_IsHoldingAny","Entity_IsInCover","Entity_IsMoving","Entity_IsOfType","Entity_IsPartOfSquad","Entity_IsPlane","Entity_IsSlotItem","Entity_IsSoldier","Entity_IsSpawned","Entity_IsStartingPosition","Entity_IsStrategicPoint","Entity_IsStrategicPointCapturedBy","Entity_IsSyncWeapon","Entity_IsUnderAttack","Entity_IsUnderAttackByPlayer","Entity_IsUnderAttackFromDirection","Entity_IsValid","Entity_IsVaultable","Entity_IsVehicle","Entity_IsVictoryPoint","Entity_Kill","Entity_NotifyOnPlayerDemolition","Entity_RemoveBoobyTraps","Entity_RemoveCritical","Entity_RemoveDemolitions","Entity_RemoveUpgrade","Entity_SetAnimatorAction","Entity_SetAnimatorActionParameter","Entity_SetAnimatorEvent","Entity_SetAnimatorState","Entity_SetAnimatorVariable","Entity_SetBuildingVisualFireState","Entity_SetCrushable","Entity_SetCrushMode","Entity_SetDemolitions","Entity_SetEnableCasualty","Entity_SetHeading","Entity_SetHealth","Entity_SetInvulnerable","Entity_SetInvulnerableMinCap","Entity_SetInvulnerableToCritical","Entity_SetOnFire","Entity_SetPlayerOwner","Entity_SetPosition","Entity_SetProjectileCanExplode","Entity_SetRecrewable","Entity_SetSharedProductionQueue","Entity_SetStrategicPointNeutral","Entity_SetWorldOwned","Entity_SimHide","Entity_Spawn","Entity_StopAbility","Entity_SuggestPosture","Entity_SupportsDemolition","Entity_TagDebug","Entity_VisHide","Misc_DoWeaponHitEffectOnPosition","Misc_GetTerrainHeight","Misc_ToggleEntities","ModMisc_MakeCasualtyAction","ModMisc_MakeWreckAction","ModMisc_OOCAction","UI_EnableEntityDecorator","UI_EnableEntityMinimapIndicator","UI_EnableEntitySelectionVisuals","UI_EnableSquadDecorator","UI_EnableSquadMinimapIndicator","UI_GetAbilityIconName","Event_CreateAND","Event_CreateOR","Event_ElementOnScreen","Event_EncounterIsDead","Event_Exists","Event_GroupBurning","Event_GroupIsDead","Event_GroupIsNotPinned","Event_GroupIsNotSuppressed","Event_GroupIsPinned","Event_GroupIsSuppressed","Event_GroupLeftAlive","Event_IsDoingAttack","Event_IsEngaged","Event_IsHoldingAny","Event_IsInHold","Event_IsSelected","Event_IsUnderAttack","Event_NarrativeEventsNotRunning","Event_NarrativeEventsRunning","Event_OnHealth","Event_PlayerBuildingCount","Event_PlayerCanNotSeeElement","Event_PlayerCanSeeElement","Event_PlayerDoesntOwnTerritory","Event_PlayerOwnsElement","Event_PlayerOwnsTerritory","Event_PlayerResourceLevel","Event_PlayerSquadCount","Event_Proximity","Event_Remove","Event_RemoveAll","Event_TeamBuildingCount","Event_TeamCanNotSeeElement","Event_TeamCanSeeElement","Event_TeamDoesntOwnTerritory","Event_TeamOwnsElement","Event_TeamOwnsTerritory","Event_TeamResourceLevel","Event_TeamSquadCount","Event_Timer","Event_ToggleDebug","Event_View","EventHandler_AssignEncounterGoal","EventHandler_ObjectiveComplete","EventHandler_ObjectiveStart","EventHandler_RemoveHint","EventHandler_RemoveMinimapBlip","EventHandler_RemoveObjectiveUI","EventHandler_Retreat","EventHandler_StaggeredRetreat","EventHandler_StartIntel","EventHandler_StartNislet","EventHandler_StopFlashing","FOW_PlayerExploreAll","FOW_PlayerRevealAll","FOW_PlayerRevealArea","FOW_PlayerUnExploreAll","FOW_PlayerUnRevealAll","FOW_PlayerUnRevealArea","FOW_RevealAll","FOW_RevealArea","FOW_RevealEGroup","FOW_RevealEGroupOnly","FOW_RevealEntity","FOW_RevealMarker","FOW_RevealSGroup","FOW_RevealSGroupOnly","FOW_RevealSquad","FOW_RevealTerritory","FOW_UnRevealAll","FOW_UnRevealArea","FOW_UnRevealMarker","FOW_UnRevealTerritory","EGroup_CreateTable","EGroup_GetWBTable","Marker_GetNonSequentialTable","Marker_GetTable","SGroup_CreateTable","SGroup_GetWBTable","Marker_DoesNumberAttributeExist","Marker_DoesStringAttributeExist","Marker_Exists","Marker_FromName","Marker_GetDirection","Marker_GetName","Marker_GetNumberAttribute","Marker_GetPosition","Marker_GetProximityRadius","Marker_GetProximityType","Marker_GetSequence","Marker_GetStringAttribute","Marker_GetType","Marker_InProximity","Modifier_IsEnabledOnEGroup","Modifier_Remove","Modifier_RemoveAllFromEGroup","Modifier_RemoveAllFromSGroup","Modify_AbilityDelayTime","Modify_AbilityDurationTime","Modify_AbilityManpowerCost","Modify_AbilityMaxCastRange","Modify_AbilityMinCastRange","Modify_AbilityMunitionsCost","Modify_AbilityRechargeTime","Modify_Armor","Modify_CaptureTime","Modify_DisableHold","Modify_Enable_ParadropReinforcements","Modify_EntityBuildTime","Modify_EntityCost","Modify_PlayerExperienceReceived","Modify_PlayerProductionRate","Modify_PlayerResourceCap","Modify_PlayerResourceGift","Modify_PlayerResourceRate","Modify_PlayerSightRadius","Modify_ProductionRate","Modify_ProjectileDelayTime","Modify_ReceivedAccuracy","Modify_ReceivedDamage","Modify_ReceivedSuppression","Modify_SetUpgradeCost","Modify_SightRadius","Modify_SquadAvailability","Modify_SquadCaptureRate","Modify_SquadTypeSightRadius","Modify_TargetPriority","Modify_TeamWeapon","Modify_TerritoryRadius","Modify_UnitSpeed","Modify_UnitVeterancyValue","Modify_UpgradeBuildTime","Modify_Upkeep","Modify_VehicleRepairRate","Modify_VehicleRotationSpeed","Modify_VehicleTurretRotationSpeed","Modify_Vulnerability","Modify_WeaponAccuracy","Modify_WeaponBurstLength","Modify_WeaponBurstRateOfFire","Modify_WeaponCooldown","Modify_WeaponDamage","Modify_WeaponEnabled","Modify_WeaponPenetration","Modify_WeaponRange","Modify_WeaponReload","Modify_WeaponScatter","Modify_WeaponSuppression","MP_BlizzardInit","Objective_AddPing","Objective_AddUIElements","Objective_AreAllPrimaryObjectivesComplete","Objective_Complete","Objective_Fail","Objective_GetCounter","Objective_GetTimerSeconds","Objective_IncreaseCounter","Objective_IsComplete","Objective_IsCounterSet","Objective_IsFailed","Objective_IsStarted","Objective_IsTimerSet","Objective_IsVisible","Objective_PauseTimer","Objective_Register","Objective_RemovePing","Objective_RemoveUIElements","Objective_ResumeTimer","Objective_SetAlwaysShowDetails","Objective_SetCounter","Objective_Show","Objective_Start","Objective_StartTimer","Objective_StopCounter","Objective_StopTimer","Objective_TogglePings","Objective_UpdateText","Cmd_StopSquadsOnly","OpGameSetup","OpNPC_AddSupportGroup","OpNPC_AddSyncWpnGroup","OpNPC_AddTeamWpnGroup","OpNPC_IsGroupActive","OpNPC_Name","OpNPC_RemoveGroup","OpNPC_RetreatGroup","OpNPC_SetGroupActive","OpPlayer_Action","OpUtil_AddModifier","OpUtil_AddResourcesToTeam","OpUtil_AssignSquadSameTypeControlGroup","OpUtil_AssignSquadUnusedControlGroup","OpUtil_ClearPlayZone","OpUtil_EgroupIsCapturedByTeam","OpUtil_EnemyEGroupArrowManager","OpUtil_FindNearestCapturePoint","OpUtil_InvulnerableAdd","OpUtil_InvulnerableRemove","OpUtil_LogSyncWpn","OpUtil_ReturnEnemyNPC","OpUtil_ReturnHumanPlayer","OpUtil_ReturnNPCPlayer","OpUtil_ReturnRace","OpUtil_ReturnTeam","OpUtil_SetPlayZone","OpUtil_TeamOwnsEntity","OpVP_AddPenaltyGroup","OpVP_Name","OpVP_RegisterCaptureablePoints","OpVP_RegisterPointDefense","OpVP_RemoveGroup","UI_PopUpMessage","Util_ProductionRestriction","Util_TutorialIntel","Player_AddAbility","Player_AddAbilityLockoutZone","Player_AddResource","Player_AddSquadsToSGroup","Player_AddUnspentCommandPoints","Player_AreSquadsNearMarker","Player_CanCastAbilityOnEntity","Player_CanCastAbilityOnPlayer","Player_CanCastAbilityOnPosition","Player_CanCastAbilityOnSquad","Player_CanSeeEGroup","Player_CanSeeEntity","Player_CanSeePosition","Player_CanSeeSGroup","Player_CanSeeSquad","Player_ClearArea","Player_ClearAvailabilities","Player_ClearPopCapOverride","Player_CompleteUpgrade","Player_DoParadrop","Player_FindFirstEnemyPlayer","Player_FromId","Player_GetAIType","Player_GetAll","Player_GetAllEntitiesNearMarker","Player_GetAllSquadsNearMarker","Player_GetBuildingID","Player_GetBuildingsCount","Player_GetBuildingsCountExcept","Player_GetBuildingsCountOnly","Player_GetCurrentPopulation","Player_GetDisplayName","Player_GetEntities","Player_GetEntitiesFromType","Player_GetEntityConcentration","Player_GetEntityCount","Player_GetEntityName","Player_GetID","Player_GetMaxPopulation","Player_GetNumStrategicPoints","Player_GetNumVictoryPoints","Player_GetPopulationPercentage","Player_GetRace","Player_GetRaceName","Player_GetRelationship","Player_GetResource","Player_GetResourceRate","Player_GetSquadConcentration","Player_GetSquadCount","Player_GetSquads","Player_GetStartingPosition","Player_GetStrategicPointCaptureProgress","Player_GetTeam","Player_GetUnitCount","Player_GetUpgradeCost","Player_HasAbility","Player_HasBuilding","Player_HasBuildingsExcept","Player_HasBuildingUnderConstruction","Player_HasCapturingSquadNearStrategicPoint","Player_HasLost","Player_HasMapEntryPosition","Player_HasUpgrade","Player_IsAlive","Player_IsAllied","Player_IsHuman","Player_NumUpgradeComplete","Player_OwnsEGroup","Player_OwnsEntity","Player_OwnsSGroup","Player_OwnsSquad","Player_RemoveAbilityLockoutZone","Player_RemoveUpgrade","Player_ResetResource","Player_RestrictAddOnList","Player_RestrictBuildingList","Player_RestrictResearchList","Player_SetAbilityAvailability","Player_SetAllCommandAvailabilityInternal","Player_SetCommandAvailability","Player_SetConstructionMenuAvailability","Player_SetDefaultSquadMoodMode","Player_SetEntityProductionAvailability","Player_SetHeatGainRate","Player_SetHeatLossRate","Player_SetMaxCapPopulation","Player_SetMaxPopulation","Player_SetPopCapOverride","Player_SetResource","Player_SetSquadProductionAvailability","Player_SetUpgradeAvailability","Player_SetUpgradeCost","Player_SpawnGlider","Player_StopAbility","Player_StopEarningActionPoints","Player_Triangulate","Actor_Clear","Actor_PlaySpeech","Actor_PlaySpeechWithoutPortrait","Actor_SetFromSGroup","Actor_SetFromSquad","Prox_AreEntitiesNearMarker","Prox_ArePlayerMembersNearMarker","Prox_ArePlayersNearMarker","Prox_AreSquadMembersNearMarker","Prox_AreSquadsNearMarker","Prox_AreTeamsNearMarker","Prox_EGroupEGroup","Prox_EGroupSGroup","Prox_EntitiesInProximityOfEntities","Prox_GetRandomPosition","Prox_MarkerEGroup","Prox_MarkerSGroup","Prox_PlayerEntitiesInProximityOfEntities","Prox_PlayerEntitiesInProximityOfPlayerSquads","Prox_PlayerEntitiesInProximityOfSquads","Prox_PlayerSquadsInProximityOfEntities","Prox_PlayerSquadsInProximityOfPlayerEntities","Prox_PlayerSquadsInProximityOfPlayerSquads","Prox_PlayerSquadsInProximityOfSquads","Prox_SGroupSGroup","Prox_SquadsInProximityOfEntities","Prox_SquadsInProximityOfSquads","Rule_Add","Rule_AddDelayedInterval","Rule_AddDelayedIntervalEx","Rule_AddEGroupEvent","Rule_AddEntityEvent","Rule_AddGlobalEvent","Rule_AddInterval","Rule_AddIntervalEx","Rule_AddOneShot","Rule_AddPlayerEvent","Rule_AddSGroupEvent","Rule_AddSquadEvent","Rule_ChangeInterval","Rule_Exists","Rule_Remove","Rule_RemoveAll","Rule_RemoveEGroupEvent","Rule_RemoveEntityEvent","Rule_RemoveGlobalEvent","Rule_RemoveIfExist","Rule_RemoveMe","Rule_RemovePlayerEvent","Rule_RemoveSGroupEvent","Rule_RemoveSquadEvent","Setup_Player","Cmd_StopSquadsExcept","Misc_IsEGroupOnScreen","Misc_IsSGroupOnScreen","SGroup_Add","SGroup_AddAbility","SGroup_AddGroup","SGroup_AddGroups","SGroup_AddLeaders","SGroup_AddSlotItemToDropOnDeath","SGroup_CanCastAbilityOnEntity","SGroup_CanCastAbilityOnPosition","SGroup_CanCastAbilityOnSquad","SGroup_CanInstantReinforceNow","SGroup_CanSeeSGroup","SGroup_Clear","SGroup_ClearPostureSuggestion","SGroup_Compare","SGroup_CompleteEntityUpgrade","SGroup_ContainsBlueprints","SGroup_ContainsSGroup","SGroup_ContainsSquad","SGroup_Count","SGroup_CountDeSpawned","SGroup_CountSpawned","SGroup_Create","SGroup_CreateIfNotFound","SGroup_CreateKickerMessage","SGroup_DeSpawn","SGroup_Destroy","SGroup_DestroyAllInMarker","SGroup_DestroyAllSquads","SGroup_DisableCombatPlans","SGroup_Duplicate","SGroup_EnableAttention","SGroup_EnableMinimapIndicator","SGroup_EnableSurprise","SGroup_EnableUIDecorator","SGroup_Exists","SGroup_FaceEachOther","SGroup_FaceMarker","SGroup_Filter","SGroup_FilterCount","SGroup_FilterThreat","SGroup_ForEach","SGroup_ForEachAllOrAny","SGroup_ForEachAllOrAnyEx","SGroup_ForEachEx","SGroup_FromName","SGroup_GetAvgHealth","SGroup_GetAvgLoadout","SGroup_GetDeSpawnedSquadAt","SGroup_GetGarrisonedBuildingEntity","SGroup_GetHoldEGroup","SGroup_GetHoldSGroup","SGroup_GetInvulnerable","SGroup_GetLastAttacker","SGroup_GetLoadedVehicleSquad","SGroup_GetName","SGroup_GetNumSlotItem","SGroup_GetOffsetPosition","SGroup_GetPosition","SGroup_GetRandomSpawnedSquad","SGroup_GetSequence","SGroup_GetSpawnedSquadAt","SGroup_GetSpread","SGroup_GetSquadsHeld","SGroup_GetSuppression","SGroup_GetVeterancyExperience","SGroup_GetVeterancyRank","SGroup_HasCritical","SGroup_HasLeader","SGroup_HasSquadBlueprint","SGroup_HasTeamWeapon","SGroup_HasUpgrade","SGroup_Hide","SGroup_IncreaseVeterancyExperience","SGroup_IncreaseVeterancyRank","SGroup_Intersection","SGroup_IsAlive","SGroup_IsAttackMoving","SGroup_IsCamouflaged","SGroup_IsCapturing","SGroup_IsConstructingBuilding","SGroup_IsDoingAbility","SGroup_IsDoingAttack","SGroup_IsDugIn","SGroup_IsEmpty","SGroup_IsFemale","SGroup_IsHoldingAny","SGroup_IsIdle","SGroup_IsInCover","SGroup_IsInfiltrated","SGroup_IsInHoldEntity","SGroup_IsInHoldSquad","SGroup_IsMoving","SGroup_IsOnScreen","SGroup_IsPinned","SGroup_IsReinforcing","SGroup_IsRetreating","SGroup_IsSettingDemolitions","SGroup_IsSuppressed","SGroup_IsUnderAttack","SGroup_IsUnderAttackByPlayer","SGroup_IsUnderAttackFromDirection","SGroup_IsUpgrading","SGroup_IsUsingAbility","SGroup_Kill","SGroup_Remove","SGroup_RemoveGroup","SGroup_RemoveUpgrade","SGroup_ReSpawn","SGroup_RestoreCombatPlans","SGroup_RewardActionPoints","SGroup_SetAnimatorState","SGroup_SetAutoTargetting","SGroup_SetAvgHealth","SGroup_SetAvgMorale","SGroup_SetCrushable","SGroup_SetInvulnerable","SGroup_SetInvulnerableToCritical","SGroup_SetMoodMode","SGroup_SetMoveType","SGroup_SetPlayerOwner","SGroup_SetRecrewable","SGroup_SetSelectable","SGroup_SetSharedProductionQueue","SGroup_SetSuppression","SGroup_SetTeamWeaponCapturable","SGroup_SetVeterancyDisplayVisibility","SGroup_SetWorldOwned","SGroup_Single","SGroup_SnapFaceEachOther","SGroup_SuggestPosture","SGroup_TotalMembersCount","SGroup_WarpToMarker","SGroup_WarpToPos","Util_Grab","SGroup_FacePosition","SGroup_SnapFacePosition","Squad_AddAbility","Squad_AddSlotItemToDropOnDeath","Squad_CanCaptureStrategicPoint","Squad_CanCaptureTeamWeapon","Squad_CanCastAbilityOnEGroup","Squad_CanCastAbilityOnEntity","Squad_CanCastAbilityOnPosition","Squad_CanCastAbilityOnSGroup","Squad_CanCastAbilityOnSquad","Squad_CancelProductionQueueItem","Squad_CanHold","Squad_CanInstantReinforceNow","Squad_CanLoadSquad","Squad_CanPickupSlotItem","Squad_CanRecrew","Squad_CanSeeEntity","Squad_CanSeeSquad","Squad_ClearPostureSuggestion","Squad_CompleteUpgrade","Squad_Count","Squad_CreateAndSpawnToward","Squad_DeSpawn","Squad_Destroy","Squad_EnableProductionQueue","Squad_EnableSurprise","Squad_EntityAt","Squad_FacePosition","Squad_FaceSquad","Squad_FindCover","Squad_FindCoverCompareCurrent","Squad_FromWorldID","Squad_GetActiveCommand","Squad_GetAttackPlan","Squad_GetAttackTargets","Squad_GetBlueprint","Squad_GetDestination","Squad_GetGameID","Squad_GetHeading","Squad_GetHealth","Squad_GetHealthMax","Squad_GetHealthPercentage","Squad_GetHoldEntity","Squad_GetHoldSquad","Squad_GetInvulnerable","Squad_GetInvulnerableEntityCount","Squad_GetInvulnerableMinCap","Squad_GetLastAttacker","Squad_GetLastAttackers","Squad_GetLastEntityAttacker","Squad_GetMax","Squad_GetNumSlotItem","Squad_GetOffsetPosition","Squad_GetPinnedPlan","Squad_GetPlayerOwner","Squad_GetPosition","Squad_GetPositionDeSpawned","Squad_GetProductionQueueItem","Squad_GetProductionQueueItemType","Squad_GetProductionQueueSize","Squad_GetReactionPlan","Squad_GetRetaliationPlan","Squad_GetSlotItemAt","Squad_GetSlotItemCount","Squad_GetSlotItemsTable","Squad_GetSquadsHeld","Squad_GetSuppression","Squad_GetVeterancyExperience","Squad_GetVeterancyRank","Squad_GiveSlotItem","Squad_GiveSlotItemsFromTable","Squad_HasActiveCommand","Squad_HasAnyCritical","Squad_HasCritical","Squad_HasDestination","Squad_HasProductionQueue","Squad_HasSlotItem","Squad_HasTeamWeapon","Squad_HasUpgrade","Squad_IncreaseVeterancyExperience","Squad_IncreaseVeterancyRank","Squad_InstantSetupTeamWeapon","Squad_IsAttacking","Squad_IsCamouflaged","Squad_IsDoingAbility","Squad_IsFemale","Squad_IsHoldingAny","Squad_IsInCover","Squad_IsInHoldEntity","Squad_IsInHoldSquad","Squad_IsMoving","Squad_IsPinned","Squad_IsReinforcing","Squad_IsRetreating","Squad_IsSuppressed","Squad_IsUnderAttack","Squad_IsUnderAttackByPlayer","Squad_IsUnderAttackFromDirection","Squad_IsUpgrading","Squad_IsUpgradingAny","Squad_IsValid","Squad_Kill","Squad_RemoveAbility","Squad_RemoveUpgrade","Squad_RewardActionPoints","Squad_SetAnimatorState","Squad_SetAttackPlan","Squad_SetHealth","Squad_SetInvulnerable","Squad_SetInvulnerableEntityCount","Squad_SetInvulnerableMinCap","Squad_SetInvulnerableToCritical","Squad_SetMoodMode","Squad_SetMoveType","Squad_SetPinnedPlan","Squad_SetPlayerOwner","Squad_SetPosition","Squad_SetReactionPlan","Squad_SetRecrewable","Squad_SetRetaliationPlan","Squad_SetSharedProductionQueue","Squad_SetSuppression","Squad_SetVeterancyDisplayVisibility","Squad_SetWorldOwned","Squad_Spawn","Squad_SpawnToward","Squad_Split","Squad_StopAbility","Squad_SuggestPosture","Squad_WarpToPos","Stats_BuildingsLost","Stats_InfantryLost","Stats_KillsTotal","Stats_PlayerAt","Stats_PlayerCount","Stats_ResGathered","Stats_ResSpent","Stats_SoldiersKilled","Stats_StructuresKilled","Stats_TeamTally","Stats_TotalDuration","Stats_TotalSquadsLost","Stats_UnitSoldierKills","Stats_UnitStructureKills","Stats_UnitTotalKills","Stats_UnitVehicleKills","Stats_VehiclesKilled","Stats_VehiclesLost","Stinger_AddEvent","Stinger_AddFunction","Stinger_Remove","Team_AddResource","Team_AddSquadsToSGroup","Team_AreSquadsNearMarker","Team_CanSee","Team_ClearArea","Team_DefineAllies","Team_DefineEnemies","Team_FindByRace","Team_ForEachAllOrAny","Team_GetAll","Team_GetAllEntitiesNearMarker","Team_GetAllSquadsNearMarker","Team_GetBuildingID","Team_GetBuildingsCount","Team_GetBuildingsCountExcept","Team_GetBuildingsCountOnly","Team_GetEnemyTeam","Team_GetEntitiesFromType","Team_HasBuilding","Team_HasBuildingsExcept","Team_HasBuildingUnderConstruction","Team_IsAlive","Team_OwnsEGroup","Team_OwnsEntity","Team_OwnsSGroup","Team_OwnsSquad","Team_RestrictAddOnList","Team_RestrictBuildingList","Team_RestrictResearchList","Team_SetAbilityAvailability","Team_SetCommandAvailability","Team_SetConstructionMenuAvailability","Team_SetEntityProductionAvailability","Team_SetMaxCapPopulation","Team_SetMaxPopulation","Team_SetSquadProductionAvailability","Team_SetTechTreeByYear","Team_SetUpgradeAvailability","Team_SetUpgradeCost","ToW_DefenseCreateWave","ToW_SetStandardResources","ToW_SetUpBattleObjectives","ToW_SetUpTechTreeByYear","Timer_Add","Timer_Advance","Timer_Display","Timer_DisplayOnScreen","Timer_End","Timer_Exists","Timer_GetElapsed","Timer_GetMinutesAndSeconds","Timer_GetRemaining","Timer_IsPaused","Timer_Pause","Timer_Resume","Timer_Start","EventCue_Create","FOW_Enable","Game_SubTextFade","HintMouseover_Add","HintMouseover_Remove","HintPoint_Add","HintPoint_Remove","HintPoint_SetDisplayOffset","HintPoint_SetVisible","Misc_IsEGroupSelected","Misc_IsSGroupSelected","ThreatArrow_Add","ThreatArrow_CreateGroup","ThreatArrow_DestroyAllGroups","ThreatArrow_DestroyGroup","ThreatArrow_Remove","UI_AddHintAndFlashAbility","UI_CreateEventCue","UI_CreateMinimapBlip","UI_CreateSGroupKickerMessage","UI_DeleteMinimapBlip","UI_HighlightSGroup","UI_SetAllowLoadAndSave","UI_SetSGroupSpecialLevel","WinWarning_PublishLoseReminder","WinWarning_SetMaxTickers","WinWarning_SetTickers","WinWarning_ShowLoseWarning","Clone","Event_IsAnyRunning","Game_EndSP","Game_FadeToBlack","Import_Once","Loc_FormatText","Sound_PlayOnSquad","Team_GetEntityConcentration","Team_GetSquadConcentration","Util_AddMouseoverSquadToSGroup","Util_ApplyModifier","Util_AutoAmbient","Util_AutoIntel","Util_AutoNISlet","Util_Autosave","Util_ClearWrecksFromMarker","Util_DespawnAll","Util_DifVar","Util_ElementCanSee","Util_EntityLimit","Util_FallBackToGarrisonBuilding","Util_FindHiddenSpawn","Util_ForceRetreatAll","Util_GarrisonNearbyBuilding","Util_GarrisonNearbyVehicle","Util_GetClosestMarker","Util_GetEntitiesByBP","Util_GetHealth","Util_GetMouseoverSGroup","Util_GetPosition","Util_GetPositionAwayFromPlayer","Util_GetPositionFromAtoB","Util_GetRandomPosition","Util_GetSquadsByBP","Util_GetTrailingNumber","Util_HasPosition","Util_HidePlayerForNIS","Util_IsSequenceSkipped","Util_Kill","Util_LogSyncWpn","Util_MarkerFX","Util_MissionTitle","Util_MuteAmbientSound","Util_NewHUDFeatureEvent","Util_PlayMovie","Util_PlayMusic","Util_PrintObject","Util_ReinforceEvent","Util_ReloadScript","Util_RestoreMusic","Util_SetPlayerCanSkipSequence","Util_SetPlayerUnableToSkipSequence","Util_SortPositionsByClosest","Util_StartAmbient","Util_StartIntel","Util_StartNislet","Util_StartQuickIntel","Util_TableContains","Util_ToggleAllowIntelEvents","Util_TriggerEvent","Util_UnitCounts","World_KillAllNeutralEntitesNearMarker","Anim_PlayEntityAnim","bug","Camera_AutoRotate","Camera_ClampToMarker","Camera_FocusOnPosition","Camera_FollowEntity","Camera_FollowSelection","Camera_FollowSquad","Camera_GetCurrentTargetPos","Camera_GetDeclination","Camera_GetOrbit","Camera_GetTargetPos","Camera_GetTuningValue","Camera_GetZoomDist","Camera_IsInputEnabled","Camera_Reload","Camera_ResetFocus","Camera_ResetToDefault","Camera_SetDeclination","Camera_SetInputEnabled","Camera_SetOrbit","Camera_SetSlideTargetRate","Camera_SetTuningValue","Camera_SetZoomDist","Camera_StopAutoRotating","Camera_Unclamp","EGroup_CallEntityFunction","EGroup_CallEntityFunctionAllOrAny","fatal","Game_EnableInput","Game_EndSubTextFade","Game_EndTextTitleFade","Game_GetLocalPlayer","Game_GetMode","Game_GetSPDifficulty","Game_HasLocalPlayer","Game_IsLetterboxed","Game_IsPerformanceTest","Game_IsRTM","Game_Letterbox","Game_LoadAtmosphere","Game_LockRandom","Game_ProfileDumpFrames","Game_QuitApp","Game_ScreenFade","Game_SetLocalPlayer","Game_SetMode","Game_ShowPauseMenu","Game_SkipAllEvents","Game_SkipEvent","Game_StartMuted","Game_TextTitleFade","Game_TriggerLightning","Game_UnlockInputOnLetterBox","Game_UnLockRandom","Ghost_DisableSpotting","Ghost_EnableSpotting","HintPoint_AddToEGroup","HintPoint_AddToEntity","HintPoint_AddToPosition","HintPoint_AddToSGroup","HintPoint_AddToSquad","HintPoint_ClearFacing","HintPoint_RemoveAll","HintPoint_SetDisplayOffsetInternal","HintPoint_SetFacingEntity","HintPoint_SetFacingPosition","HintPoint_SetFacingSquad","HintPoint_SetVisibleInternal","inv_dump","IsOfType","IsSecuringStructure","IsStructure","License_CanPlayRace","LOC","Loc_ConvertNumber","Loc_Empty","Loc_FormatTime","Misc_AbortToFE","Misc_AddRestrictCommandsMarker","Misc_AIControlLocalPlayer","Misc_AreDefaultCommandsEnabled","Misc_DetectKeyboardInput","Misc_DetectMouseInput","Misc_DoWeaponHitEffectOnEntity","Misc_EnablePerformanceTest","Misc_GetCommandLineString","Misc_GetControlGroupContents","Misc_GetEntityControlGroup","Misc_GetHiddenPositionOnPath","Misc_GetMouseOnTerrain","Misc_GetMouseOverEntity","Misc_GetSelectedEntities","Misc_GetSelectedSquads","Misc_GetSquadControlGroup","Misc_IsCommandLineOptionSet","Misc_IsDevMode","Misc_IsEntityOnScreen","Misc_IsEntitySelected","Misc_IsMouseOverEntity","Misc_IsPosOnScreen","Misc_IsSelectionInputEnabled","Misc_IsSquadOnScreen","Misc_IsSquadSelected","Misc_RemoveCommandRestriction","Misc_RestrictCommandsToMarker","Misc_Screenshot","Misc_ScreenshotExt","Misc_SelectEntity","Misc_SelectSquad","Misc_SetDefaultCommandsEnabled","Misc_SetDesignerSplatsVisibility","Misc_SetEntityControlGroup","Misc_SetEntitySelectable","Misc_SetSelectionInputEnabled","Misc_SetSquadControlGroup","Misc_SetSquadSelectable","Mission_Complete","Mission_Fail","Mission_GetSecondaryObjective","Mission_StartBonusObjective","Mission_Win","Modifier_ApplyToEntity","Modifier_ApplyToPlayer","Modifier_ApplyToSquad","Modifier_Create","Modifier_Destroy","Modifier_IsEnabled","nis_setintransitiontime","nis_setouttransitionnis","nis_setouttransitiontime","Obj_Create","Obj_Delete","Obj_DeleteAll","Obj_GetState","Obj_GetVisible","Obj_HideProgress","Obj_SetDescription","Obj_SetIcon","Obj_SetObjectiveFunction","Obj_SetProgressBlinking","Obj_SetState","Obj_SetTitle","Obj_SetVisible","Obj_ShowProgress","Obj_ShowProgress2","Obj_ShowProgressTimer","OpBounty_AddRewardGroup","OpBounty_AddRewardTable","Order227_Init","PrintOnScreen","PrintOnScreen_Add","PrintOnScreen_Remove","PrintOnScreen_RemoveFromScreen","ResourceAmount_Add","ResourceAmount_ClampToZero","ResourceAmount_Has","ResourceAmount_Mult","ResourceAmount_Subtract","ResourceAmount_Sum","ResourceAmount_Zero","Scar_Autosave","Scar_CompleteIntelBulletinTask","Scar_DebugConsoleExecute","Scar_PlayNIS","Scar_PlayNIS2","Scar_ReloadAIScripts","Setup_GetVictoryPointTickerOption","Setup_SetPlayerName","Setup_SetPlayerRace","Setup_SetPlayerTeam","SGroup_CallEntityFunction","SGroup_CallSquadFunction","SGroup_CallSquadFunctionAllOrAny","SitRep_PlayMovie","SitRep_PlaySpeech","SitRep_StopMovie","Sound_ContainerDebug","Sound_DisableSpeechEvent","Sound_IsPlaying","Sound_PerfTest_Play2D","Sound_Play2D","Sound_Play3D","Sound_PlayMusic","Sound_PlayStreamed","Sound_PreCacheSinglePlayerSpeech","Sound_PreCacheSound","Sound_PreCacheSoundFolder","Sound_SetGlobalControlSource","Sound_SetMusicCombatValue","Sound_SetVolume","Sound_SetVolumeDefault","Sound_SetVolumeInv","Sound_StartRecording","Sound_Stop","Sound_StopAll","Sound_StopMusic","Sound_StopRecording","Speech_SetGlobalStealthRead","statgraph","statgraph_channel","statgraph_channel_get_enabled","statgraph_channel_set_enabled","statgraph_clear","statgraph_list","statgraph_pause","Subtitle_EndAllSpeech","Subtitle_EndCurrentSpeech","Subtitle_PlaySpeech","Subtitle_UnstickCurrentSpeech","SyncWeapon_CanAttackNow","SyncWeapon_Exists","SyncWeapon_GetEntity","SyncWeapon_GetFromEGroup","SyncWeapon_GetFromSGroup","SyncWeapon_GetPosition","SyncWeapon_IsAttacking","SyncWeapon_IsOwnedByPlayer","SyncWeapon_SetAutoTargetting","Taskbar_IsVisible","Taskbar_SetVisibility","TaskCountActivePBG","TaskCountPBG","UI_AutosaveMessageHide","UI_AutosaveMessageShow","UI_ClearEventCues","UI_ClearModalAbilityPhaseCallback","UI_ClearNISEndCallback","UI_CoverPreviewHide","UI_CoverPreviewShow","UI_CreateColouredEntityKickerMessage","UI_CreateColouredPositionKickerMessage","UI_CreateColouredSquadKickerMessage","UI_CreateEntityKickerMessage","UI_CreatePositionKickerMessage","UI_CreateSquadKickerMessage","UI_EnableGameEventCueType","UI_EnableResourceTypeKicker","UI_EnableUIEventCueType","UI_FlashAbilityButton","UI_FlashConstructionButton","UI_FlashConstructionMenu","UI_FlashEntity","UI_FlashEntityCommandButton","UI_FlashEventCue","UI_FlashObjectiveCounter","UI_FlashObjectiveIcon","UI_FlashProductionBuildingButton","UI_FlashProductionButton","UI_FlashSquadCommandButton","UI_GetDecoratorsEnabled","UI_HideTacticalMap","UI_HighlightSquad","UI_IsTacticalMapShown","UI_MessageBoxHide","UI_MessageBoxSetButton","UI_MessageBoxSetText","UI_NewHUDFeature","UI_OutOfBoundsLinesHide","UI_OutOfBoundsLinesShow","UI_RestrictBuildingPlacement","UI_ScreenFade","UI_SetAbilityCardVisibility","UI_SetAlliedBandBoxSelection","UI_SetCPMeterVisibility","UI_SetDecoratorsEnabled","UI_SetForceShowSubtitles","UI_SetModalAbilityPhaseCallback","UI_SetNISEndCallback","UI_SetSoviet227Blinking","UI_SetSoviet227Visibility","UI_ShowTacticalMap","UI_StopFlashing","UI_SystemMessageHide","UI_SystemMessageShow","UI_TerritoryHide","UI_TerritoryShow","UI_TitleDestroy","UI_ToggleDecorators","UI_UnrestrictBuildingPlacement","UIWarning_Show","Util_AddProxCheck","Util_ClearProxChecks","Util_CreateEntities","Util_CreateSquads","Util_GetDistance","Util_GetOffsetPosition","Util_GetPlayerOwner","Util_GetRelationship","Util_GetRelativeOffset","Util_MonitorTerritory","Util_RemoveProxCheck","Util_RemoveProxCheckByID","Util_ScarPos","Util_SetPlayerOwner","Util_SpawnDemoCharge","Util_StartNIS","VIS_OccCullToggleOBB","Marker_CleanUpTheDead","Weather_SetType","World_AddPilferLockArea","World_CleanUpTheDead","World_ClearCasualties","World_DamageIce","World_DestroyWallsNearMarker","World_DistanceEGroupToPoint","World_DistancePointToPoint","World_DistanceSGroupToPoint","World_DistanceSquaredPointToPoint","World_EnableReplacementObjectForEmptyPlayers","World_EnableSharedLineOfSight","World_EndSP","World_GetClosest","World_GetCurrentInteractionStage","World_GetEntitiesNearMarker","World_GetEntitiesNearPoint","World_GetEntitiesWithinTerritorySector","World_GetEntity","World_GetFurthest","World_GetGameTime","World_GetHeightAt","World_GetHiddenPositionOnPath","World_GetLength","World_GetNearestInteractablePoint","World_GetNeutralEntitiesNearMarker","World_GetNeutralEntitiesNearPoint","World_GetNeutralEntitiesWithinTerritorySector","World_GetNumEntities","World_GetNumEntitiesNearPoint","World_GetNumStrategicPoints","World_GetNumVictoryPoints","World_GetOffsetPosition","World_GetPlayerAt","World_GetPlayerCount","World_GetPlayerIndex","World_GetPossibleSquadsBlueprint","World_GetPossibleSquadsCount","World_GetRaceIndex","World_GetRand","World_GetSpawnablePosition","World_GetSquadsNearMarker","World_GetSquadsNearPoint","World_GetSquadsWithinTerritorySector","World_GetStrategyPoints","World_GetTeamTerritoryGaps","World_GetTeamVictoryTicker","World_GetTerritorySectorID","World_GetTerritorySectorPosition","World_GetWidth","World_IncreaseInteractionStage","World_IsGameOver","World_IsInSupply","World_IsPointInPlayerTerritory","World_IsTerritorySectorOwnedByPlayer","World_IsWinterMap","World_OwnsEGroup","World_OwnsEntity","World_OwnsSGroup","World_OwnsSquad","World_PointPointProx","World_Pos","World_RemoveAllResourcePoints","World_RemovePilferLockArea","World_SetDesignerSupply","World_SetGameOver","World_SetIceHealingRate","World_SetPlayerCustomSkin","World_SetPlayerLose","World_SetPlayerWin","World_SetSnowHealingRate","World_SetTeamWin","World_SpawnDemolitionCharge","World_TeamTerritoryPointsConnected","Scar_AddInit","scartype","scartype_tostring","import","UI_GetViewportWidth","UI_GetViewportHeight","UI_ButtonAdd","UI_ButtonSetCallback","UI_ButtonSetEnabled","UI_ButtonSetIcon","UI_ButtonSetTag","UI_ButtonSetText","UI_LabelAdd","UI_LabelSetText","UI_IconAdd","UI_IconSetIcon","UI_PanelAdd","UI_StatusIndicatorAdd","UI_StatusIndicatorSetValue","UI_ControlSetColour","UI_ControlSetPosition","UI_ControlSetRect","UI_ControlRemove","UI_ControlClear","BS_NearBase","BS_Defend","BS_Secure","BS_Mines","BS_OuterBase","CPT_VictoryPoint","CPT_MunitionPoint","CPT_NullPoint","CPT_TacticalPoint","CPT_INVALID","CPT_FuelPoint","COMBAT_Default","COMBAT_Defend","COMBAT_Attack","MPT_VictoryPoint","MPT_NullPoint","MPT_NONE","MPT_MunitionPoint","MPT_COUNT","MPT_SupportStructure","MPT_Defence","MPT_Spawner","MPT_HQ","MPT_TacticalPoint","MPT_FuelPoint","MTARGET_Attack","MTARGET_Defend","AI_ProductionQueue","AI_CapturePoint","AI_Squad","AITacticTargetPreference_HighDamage","AITacticTargetPreference_LowHealth","AITacticTargetPreference_None","AITacticTargetPreference_Support","AITacticTargetPreference_Near","AITacticTargetPreference_NearAndBest","AITacticTargetPreference_Best","TACTIC_CapturePoint","TACTIC_Ability","TACTIC_Pickup","TACTIC_ForceAttack","TACTIC_Hold","TACTIC_MinRange","TACTIC_CaptureTeamWeapon","TACTIC_WarmUp","TACTIC_ProvideReinforcementPoint","TACTIC_RushAtTarget","TACTIC_Recrew","TACTIC_Vehicle","TACTIC_Avoid","TACTIC_Cover","TACTIC_FinishHealing","TASK_Leader","TASK_Production","TASK_Ability","TASK_PlayerAbility","TASK_Combat","TASK_Construction","TASK_Capture","TASK_ImmobileCombat","AII_LocalHumanTakeover","AII_RemoteAITakeover","AII_None","AII_RemoteHumanTakeover","AII_Normal","ITEM_REMOVED","ITEM_DEFAULT","ITEM_UNLOCKED","ITEM_LOCKED","BT_AttackHere","BT_SectorArtillery","BT_ObjectivePrimary","BT_Reveal","BT_Combat","BT_General","BT_CaptureHere","BT_DefendHere","BT_ObjectiveSecondary","BT_RallyPoint","BFS_Smoking","BFS_Burning","BFS_NotOnFire","TV_DeclinationEnabled","TV_DistMaxDead","TV_DistRateMouse","TV_NISletDistMin","TV_SlideOrbitRate","TV_PanScaleKeyboardDefZ","TV_PanScaleMouseDefZ","TV_SlideDeclThreshold","TV_PanStartSpeedScalar","TV_EntityMinViewAngle","TV_SlideTargetBase","TV_NearPlaneShifter","TV_DistMin","TV_PanScaleScreenDefZ","TV_NISletDistGroundMin","TV_DeclBelow","TV_SlideTargetThreshold","TV_DeclAbove","TV_DistScale","TV_NISletDistMax","TV_PanMaxSpeedScalar","TV_NISletDeclAbove","TV_NISletDistMinGround","TV_ZoomLocked","TV_CameraMode","TV_DefaultAngle","TV_PanScaleKeyboardMinZ","TV_PanScaleMouseMinZ","TV_DeclBelowClose","TV_TrackElastic","TV_DistExpWheel","TV_DistExpMouse","TV_DistMinGround","TV_DistGroundTargetHeight","TV_ClipFar","TV_DistGroundMin","TV_DistMinDead","TV_DistMax","TV_SlideDeclBase","TV_SlideOrbitThreshold","TV_SlideOrbitBase","TV_SlideDistThreshold","TV_SlideDistBase","TV_SlideTargetRate","TV_ClipNear","TV_PanScaleScreenMinZ","TV_DistRateWheelZoomIn","TV_SlideDistRate","TV_DistRateWheelZoomOut","TV_TrackBoundScale","TV_DefaultDeclination","TV_PanAccelerate","TV_DeclRateMouse","TV_DistExp","TV_DefaultHeight","TV_SlideDeclRate","TV_RotationEnabled","TV_OrbitRateMouse","TV_FieldOfView","TV_NISletDeclBelow","CANPRODUCE_PrerequisitesProducer","CANPRODUCE_Error","CANPRODUCE_ProductionQueueFull","CANPRODUCE_ProductionItemFull","CANPRODUCE_OutOfReinforceRadius","CANPRODUCE_Ok","CANPRODUCE_Disabled","CANPRODUCE_OutOfTerritory","CANPRODUCE_UpgradeItemFull","CANPRODUCE_PopulationCapFull","CANPRODUCE_NoResources","CANPRODUCE_PrerequisitesItem","CANPRODUCE_NoItem","CT_Medic","CT_Vehicle","CT_Personnel","CHECK_BOTH","CHECK_OFFCAMERA","CHECK_IN_FOW","CT_VehicleOpticsDamaged","CT_VehicleExhaustDamaged","CT_VehicleKillCommander","CT_VehicleDriverInjured","CT_VehicleEngineYellow","CT_VehicleBack","CT_VehicleLeft","CT_VehicleRight","CT_VehicleGunnerInjured","CT_VehicleEngineGreen","CT_VehicleCrewShocked","CT_VehicleFront","CT_VehicleEngineBurning","CT_VehicleEngineRed","CT_VehicleSecondaryWeapon","CT_VehicleLoseTreadsOrWheels","CT_VehicleOutOfControl","CT_VehiclePrimaryWeapon","Crush_Heavy","Crush_Off","Crush_Light","Crush_Medium","DB_Button3","DB_Button1","DB_Close","DB_Button2","CMD_InstantBuildSquad","CMD_InstantDeath","CMD_AttackStop","CMD_BuildStructure","CMD_Face","CMD_CancelProduction","CMD_RescueCasualty","CMD_SetHoldHeading","CMD_DefuseMine","CMD_AttackMove","CMD_Fidget","CMD_Stop","CMD_PlaceCharge","CMD_Paradrop","CMD_Destroy","CMD_Load","CMD_Ability","CMD_Move","CMD_InstantUpgrade","CMD_UnloadSquads","CMD_Casualty","CMD_BuildSquad","CMD_Halt","CMD_Attack","CMD_Capture","CMD_AttackForced","CMD_Death","CMD_Unload","CMD_Evacuate","CMD_BuildEntity","CMD_Vault","CMD_AttackFromHold","CMD_RallyPoint","CMD_DefaultAction","CMD_Upgrade","CMD_ChooseResource","CMD_Projectile","STATEID_Capture","STATEID_Idle","STATEID_Evacuate","STATEID_StructureBuilding","STATEID_RepairEngineer","STATEID_Move","STATEID_Dead","STATEID_DefuseMine","GE_ProjectileFired","GE_AIPlayer_Migrated","GE_EntityKilled","GE_TerritoryEntered","GE_ConstructionComplete","GE_NonGlobalCamoDetected","GE_SquadPinned","GE_BuildItemComplete","GE_PlayerKilled","GE_EntityCommandIssued","GE_StrategicPointChanged","GE_PlayerDonation","GE_AbilityExecuted","GE_PlayerDropped","GE_PlayerBeingAttacked","GE_UpgradeComplete","GE_PlayerSkipNIS","GE_AIPlayer_ObjectiveNotification","GE_ResourceDepleted","GE_CustomUIEvent","GE_SquadKilled","GE_PlayerSurrendered","GE_SquadCommandIssued","GE_EntityParadropComplete","GE_PlayerCheat","GE_InfoPointActivated","GE_SpawnActionComplete","GE_PlayerCommandIssued","GE_PlayerHostMigrated","GE_SquadParadropComplete","GE_PlayerPhaseUp","HPAT_Hint","HPAT_MovementLooping","HPAT_Bonus","HPAT_Vaulting","HPAT_Detonation","HPAT_CoverRed","HPAT_CoverYellow","HPAT_Artillery","HPAT_FormationSetup","HPAT_Movement","HPAT_Critical","HPAT_Objective","HPAT_AttackLooping","HPAT_DeepSnow","HPAT_CoverGreen","HPAT_Attack","HPAT_RallyPoint","HUDF_None","HUDF_AbilityCard","HUDF_Upgrades","HUDF_CommandCard","HUDF_MiniMap","LOOP_NORMAL","LOOP_TOGGLE_DIRECTION","LOOP_NONE","MAP_Confirmed","MAP_Placing","MAP_Facing","MAT_Entity","MAT_Player","MAT_Weapon","MAT_Upgrade","MAT_EntityType","MAT_Ability","MAT_Squad","MAT_WeaponType","MAT_SquadType","MUT_Multiplication","MUT_MultiplyAdd","MUT_Addition","MUT_Enable","PBG_Weapon","PBG_MoveType","PBG_SlotItem","PBG_UITacticalMap","PBG_HitMaterial","PBG_PassType","PBG_Race","PBG_UISelection","PBG_Critical","PBG_CamouflageStance","PBG_Material","PBG_Tuning","PBG_Ability","PBG_Upgrade","PBG_Posture","PBG_UITerritory","MM_ForceTense","MM_ForceCalm","MM_Auto","FN_OnShow","FN_OnCounterDisplay","FN_OnActivate","FN_LuaTableQuery","FN_OnSelect","OS_Complete","OS_Incomplete","OS_Off","OS_Failed","OT_Secondary","OT_Primary","OT_Ally","OT_Neutral","OT_Player","OT_Enemy","PCMD_MunitionDonation","PCMD_SlotItemRemove","PCMD_CriticalHit","PCMD_CheatBuildTime","PCMD_Ability","PCMD_SetCommander","PCMD_CheatRevealAll","PCMD_ManpowerDonation","PCMD_UpgradeRemove","PCMD_ConstructField","PCMD_CancelProduction","PCMD_CheatKillSelf","PCMD_Upgrade","PCMD_ConstructFence","PCMD_FuelDonation","PCMD_DetonateCharges","PCMD_CheatResources","PCMD_AIPlayer","PCMD_AIPlayer_ObjectiveNotification","PCMD_ConstructStructure","PCMD_InstantUpgrade","PITEM_SquadUpgrade","PITEM_SquadReinforce","PITEM_Spawn","PITEM_Upgrade","PT_Rectangle","PT_Circle","R_NEUTRAL","R_ENEMY","R_UNDEFINED","R_ALLY","RT_SovietOrder227","RT_Command","RT_SovietProgression","RT_Popcap","RT_Manpower","RT_Munition","RT_Fuel","RT_Action","RUIITEM_Population","RUIITEM_ResourceBar","RUIITEM_Munitions","RUIITEM_Manpower","RUIITEM_Fuel","ST_MARKER","ST_PBG","ST_SCARPOS","ST_AIPLAYER","ST_TABLE","ST_EGROUP","ST_AISTATSMILITARYPOINT","ST_AISQUAD","ST_ENTITY","ST_NUMBER","ST_FUNCTION","ST_SQUAD","ST_PLAYER","ST_BOOLEAN","ST_NIL","ST_CONSTPLAYER","ST_UNKNOWN","ST_SGROUP","ST_STRING","ST_AICAPTUREPOINT","PBG_TurnPlan","PBG_EntityProperties","PBG_SquadFormation","PBG_SquadProperties","PBG_Formation","DEBUG_SELECTOR","DEBUG_COMBATZONES","SCMD_Attack","SCMD_Upgrade","SCMD_StationaryAttack","SCMD_SlotItemRemove","SCMD_Pilfer","SCMD_SetMoveType","SCMD_Ability","SCMD_Move","SCMD_BuildStructure","SCMD_InstantLoad","SCMD_Merge","SCMD_UnloadSquads","SCMD_Retreat","SCMD_DefaultAction","SCMD_RescueCasualty","SCMD_Stop","SCMD_SetCamouflageStance","SCMD_AttackMove","SCMD_RevertFieldSupport","SCMD_CancelProduction","SCMD_Capture","SCMD_Surprise","SCMD_ReinforceUnit","SCMD_CaptureTeamWeapon","SCMD_Patrol","SCMD_Face","SCMD_Recrew","SCMD_DoPlan","SCMD_DefuseCharge","SCMD_PickUpSlotItem","SCMD_BuildSquad","SCMD_InstantReinforceUnit","SCMD_Load","SCMD_InstantSetupTeamWeapon","SCMD_RallyPoint","SCMD_AbandonTeamWeapon","SCMD_Unload","SCMD_DefuseMine","SCMD_Destroy","SCMD_PlaceCharge","SCMD_InstantUpgrade","SQUADSTATEID_Capture","SQUADSTATEID_CaptureTeamWeapon","SQUADSTATEID_Move","SQUADSTATEID_Retreat","SQUADSTATEID_Plan","SQUADSTATEID_AttackMove","SQUADSTATEID_Load","SQUADSTATEID_Defuse","SQUADSTATEID_DefuseMine","SQUADSTATEID_Stop","SQUADSTATEID_Patrol","SQUADSTATEID_Ability","SQUADSTATEID_CombatStance","SQUADSTATEID_RevertFieldSupport","SQUADSTATEID_Unload","SQUADSTATEID_HoldUnload","SQUADSTATEID_PickUpSlotItem","SQUADSTATEID_Construction","SQUADSTATEID_Idle","SQUADSTATEID_WeaponTransition","SQUADSTATEID_Recrew","SQUADSTATEID_PlaceCharges","SQUADSTATEID_Combat","UIE_UpgradeComplete","UIE_PlayerPingOfShameLocal","UIE_EnemyReveal","UIE_InfoPointActivated","UIE_AITakeOver","UIE_VehicleComplete","UIE_AllyAttacked","UIE_CommanderAbilityUnlocked","UIE_CommandersUnlocked","UIE_CommandPointGained","UIE_SquadFreezing","UIE_SquadCold","UIE_CasualtySquadSpawned","UIE_SquadVeterancy","UIE_VehicleReplaced","UIE_InfantryReplaced","UIE_Sniped","UIE_BoobyTrap","UIE_MineDetected","UIE_AbilityExectued","UIE_StrategicPointCaptured","UIE_StrategicPointReverting","UIE_EnemyTerritoryEntered","UIE_TerritoryEntered","UIE_PlayerSurrendered","UIE_PlayerAttacked","UIE_VehicleAttacked","UIE_PlayerKilled","UIE_PlayerKicked","UIE_PlayerLagComplaint","UIE_PlayerPingOfShame","UIE_PlayerDropped","UIE_ConstructionComplete","UIE_StrategicPointSecured","UIE_ResourceDepleted","UIE_SquadPinned","UIE_InfantryAttacked","UIE_InfantryComplete","UIE_PlayerCheated","UIE_PhaseUp","UIE_HostMigrated","UIE_Default","UI_Cinematic","UI_Fullscreen","UI_Normal","UOT_Player","UOT_Self","UOT_None","BIS_Icon","BIS_IconState","LAH_Justify","LAH_Left","LAH_Center","LAH_Right","LAV_None","LAV_Top","LAV_Center","LAV_Bottom","assert","collectgarbage","dofile","error","getmetatable","ipairs","load","loadfile","next","pairs","pcall","print","rawequal","rawget","rawlen","rawset","select","setmetatable","tonumber","tostring","type","xpcall","string.byte","string.char","string.dump","string.find","and","break","do","else","elseif","end","false","for","function","if","in","local","nil","not","or","repeat","return","then","true","until","while","math.huge","math.maxinteger","math.mininteger","math.pi","EBP.WRECKED_VEHICLES.FRONT_HULL01","EBP.WRECKED_VEHICLES.FROZEN_PANZER_IV","EBP.WRECKED_VEHICLES.FROZEN_STUG_III","EBP.WRECKED_VEHICLES.HORSA_COCKPIT","EBP.WRECKED_VEHICLES.HORSA_FRONT_HULL","EBP.WRECKED_VEHICLES.HORSA_LEFT_WING","EBP.WRECKED_VEHICLES.HORSA_LEFT_WING_TIP","EBP.WRECKED_VEHICLES.HORSA_MID_HULL","EBP.WRECKED_VEHICLES.HORSA_REAR_HULL","EBP.WRECKED_VEHICLES.HORSA_RIGHT_WING","EBP.WRECKED_VEHICLES.HORSA_RIGHT_WING_TIP","EBP.WRECKED_VEHICLES.HORSA_TAIL","EBP.WRECKED_VEHICLES.LEFT_WING","EBP.WRECKED_VEHICLES.MAP_OBJECT_M4SHERMAN_105MM","EBP.WRECKED_VEHICLES.MAP_OBJECT_M4SHERMAN_76MM","EBP.WRECKED_VEHICLES.MAP_OBJECT_M4SHERMAN_DOZER","EBP.WRECKED_VEHICLES.MAP_OBJECT_OPELBLITZ","EBP.WRECKED_VEHICLES.MAP_OBJECT_PAK38","EBP.WRECKED_VEHICLES.MAP_OBJECT_PANZERIV","EBP.WRECKED_VEHICLES.MAP_OBJECT_STUGIII_LONG","EBP.WRECKED_VEHICLES.MAP_OBJECT_STUGIII_SHORT","EBP.WRECKED_VEHICLES.PROPELLER","EBP.WRECKED_VEHICLES.RIGHT_WING","EBP.WRECKED_VEHICLES.STUKA_BODY","EBP.WRECKED_VEHICLES.STUKA_DEBRIS","EBP.WRECKED_VEHICLES.STUKA_TAIL","EBP.WRECKED_VEHICLES.STUKA_WING_LEFT","EBP.WRECKED_VEHICLES.STUKA_WING_RIGHT","EBP.WRECKED_VEHICLES.TAIL","EBP.WRECKED_VEHICLES.TAIL_SECTION_01","EBP.WRECKED_VEHICLES.WRECKED_50MM_PAK38_MAP_OBJECT","EBP.WRECKED_VEHICLES.WRECKED_ARMORED_CAR_PUMA_MP","EBP.WRECKED_VEHICLES.WRECKED_ARMORED_CAR_SDKFZ_222","EBP.WRECKED_VEHICLES.WRECKED_ARMORED_CAR_SDKFZ_222_MP","EBP.WRECKED_VEHICLES.WRECKED_ARMORED_CAR_SDKFZ_234","EBP.WRECKED_VEHICLES.WRECKED_ARMORED_CAR_SDKFZ_234_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_ARMORED_CAR_SDKFZ_234_PUMA_MP","EBP.WRECKED_VEHICLES.WRECKED_ATGUN_17_POUNDER","EBP.WRECKED_VEHICLES.WRECKED_ATGUN_45MM","EBP.WRECKED_VEHICLES.WRECKED_ATGUN_75MM_PAK","EBP.WRECKED_VEHICLES.WRECKED_ATGUN_B4_200MM","EBP.WRECKED_VEHICLES.WRECKED_ATGUN_M1_57MM","EBP.WRECKED_VEHICLES.WRECKED_ATGUN_ML20","EBP.WRECKED_VEHICLES.WRECKED_ATGUN_PAK43","EBP.WRECKED_VEHICLES.WRECKED_ATGUN_ZIS3","EBP.WRECKED_VEHICLES.WRECKED_BASE_BUILDING01","EBP.WRECKED_VEHICLES.WRECKED_BASE_BUILDING01_SELF_DESTRUCT","EBP.WRECKED_VEHICLES.WRECKED_BASE_BUILDING02","EBP.WRECKED_VEHICLES.WRECKED_BASE_BUILDING02_SELF_DESTRUCT","EBP.WRECKED_VEHICLES.WRECKED_BASE_BUILDING03","EBP.WRECKED_VEHICLES.WRECKED_BASE_BUILDING03_SELF_DESTRUCT","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_AEC","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_AEC_ARMOURED_CAR_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_ATGUN_6_POUNDER","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_BOFORS","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_CENTAUR","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_CHURCHILL","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_CHURCHILL_AVRE","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_CHURCHILL_AVRE_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_CHURCHILL_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_CHURCHILL_CROCODILE","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_CHURCHILL_CROCODILE_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_COMET","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_COMET_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_CROMWELL","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_CROMWELL_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_GLIDER_HQ_MP","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_GLIDER_MP","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_SEXTON","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_SHERMAN_FIREFLY","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_SHERMAN_FIREFLY_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_UNIVERSAL_CARRIER","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_VALENTINE_COMMAND","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_VALENTINE_COMMAND_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_BRUMMBAR_02","EBP.WRECKED_VEHICLES.WRECKED_BRUMMBAR_STURMPANZER_IV_SDKFZ_166","EBP.WRECKED_VEHICLES.WRECKED_EARLY_WAR_TANK_01","EBP.WRECKED_VEHICLES.WRECKED_ELEFANT_SDKFZ_184","EBP.WRECKED_VEHICLES.WRECKED_FN63_4RM","EBP.WRECKED_VEHICLES.WRECKED_HALFTRACK_SDKFZ_250","EBP.WRECKED_VEHICLES.WRECKED_HALFTRACK_SDKFZ_250_MORTAR","EBP.WRECKED_VEHICLES.WRECKED_HALFTRACK_SDKFZ_251","EBP.WRECKED_VEHICLES.WRECKED_HALFTRACK_SDKFZ_251_17_FLAK","EBP.WRECKED_VEHICLES.WRECKED_HALFTRACK_SDKFZ_251_INFRARED","EBP.WRECKED_VEHICLES.WRECKED_HALFTRACK_SDKFZ_251_MP","EBP.WRECKED_VEHICLES.WRECKED_HALFTRACK_SDKFZ_251_WALKING_STUKA","EBP.WRECKED_VEHICLES.WRECKED_HALFTRACK_SWS","EBP.WRECKED_VEHICLES.WRECKED_HETZER","EBP.WRECKED_VEHICLES.WRECKED_HETZER_BREWUP","EBP.WRECKED_VEHICLES.WRECKED_HOWITZER_105MM_MAP_OBJECT","EBP.WRECKED_VEHICLES.WRECKED_IG18_SUPPORT_GUN","EBP.WRECKED_VEHICLES.WRECKED_IS_2_HEAVY_TANK","EBP.WRECKED_VEHICLES.WRECKED_ISU_152_SPG","EBP.WRECKED_VEHICLES.WRECKED_JAGDPANZER_IV","EBP.WRECKED_VEHICLES.WRECKED_JAGDPANZER_IV_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_JAGDTIGER_TD","EBP.WRECKED_VEHICLES.WRECKED_JAGDTIGER_TD_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_KATYUSHA_BM_13N","EBP.WRECKED_VEHICLES.WRECKED_KATYUSHA_BM_13N_MP","EBP.WRECKED_VEHICLES.WRECKED_KING_TIGER","EBP.WRECKED_VEHICLES.WRECKED_KING_TIGER_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_KUBELWAGEN","EBP.WRECKED_VEHICLES.WRECKED_KV_1","EBP.WRECKED_VEHICLES.WRECKED_KV_1_MP","EBP.WRECKED_VEHICLES.WRECKED_KV_2","EBP.WRECKED_VEHICLES.WRECKED_KV_8","EBP.WRECKED_VEHICLES.WRECKED_LAND_MATTRESS","EBP.WRECKED_VEHICLES.WRECKED_M10","EBP.WRECKED_VEHICLES.WRECKED_M10_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_M15A1_AA_HALFTRACK","EBP.WRECKED_VEHICLES.WRECKED_M15A1_AA_HALFTRACK_MAP_OBJECT","EBP.WRECKED_VEHICLES.WRECKED_M20_UTILITY_CAR","EBP.WRECKED_VEHICLES.WRECKED_M21_MORTAR_HALFTRACK","EBP.WRECKED_VEHICLES.WRECKED_M26_PERSHING","EBP.WRECKED_VEHICLES.WRECKED_M3_HALFTRACK","EBP.WRECKED_VEHICLES.WRECKED_M36","EBP.WRECKED_VEHICLES.WRECKED_M36_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_M3A1_SCOUT_CAR","EBP.WRECKED_VEHICLES.WRECKED_M3A1_SCOUT_CAR_MP","EBP.WRECKED_VEHICLES.WRECKED_M4A3_SHERMAN","EBP.WRECKED_VEHICLES.WRECKED_M4A3_SHERMAN_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_M4A3_SHERMAN_BULLDOZER","EBP.WRECKED_VEHICLES.WRECKED_M4A3_SHERMAN_BULLDOZER_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_M4A3_SHERMAN_EASY_EIGHT","EBP.WRECKED_VEHICLES.WRECKED_M4A3_SHERMAN_EASY_EIGHT_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_M4A3_SHERMAN_MAP_OBJECT","EBP.WRECKED_VEHICLES.WRECKED_M5_HALFTRACK","EBP.WRECKED_VEHICLES.WRECKED_M5_HALFTRACK_MP","EBP.WRECKED_VEHICLES.WRECKED_M5A1_STUART","EBP.WRECKED_VEHICLES.WRECKED_M8_ARMORED_CAR","EBP.WRECKED_VEHICLES.WRECKED_M8_HMC","EBP.WRECKED_VEHICLES.WRECKED_OPEL_BLITZ_TRUCK","EBP.WRECKED_VEHICLES.WRECKED_OSTWIND_FLAK_PANZER","EBP.WRECKED_VEHICLES.WRECKED_PACK_HOWITZER","EBP.WRECKED_VEHICLES.WRECKED_PANTHER_MAP_OBJECT","EBP.WRECKED_VEHICLES.WRECKED_PANTHER_SDKFZ_171","EBP.WRECKED_VEHICLES.WRECKED_PANTHER_SDKFZ_171_BREWUP","EBP.WRECKED_VEHICLES.WRECKED_PANZER_II_LUCHS","EBP.WRECKED_VEHICLES.WRECKED_PANZER_II_LUCHS_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_PANZER_III","EBP.WRECKED_VEHICLES.WRECKED_PANZER_IV_FROZEN","EBP.WRECKED_VEHICLES.WRECKED_PANZER_IV_SDKFZ_161","EBP.WRECKED_VEHICLES.WRECKED_PANZER_IV_SDKFZ_161_COMMAND","EBP.WRECKED_VEHICLES.WRECKED_PANZER_IV_SDKFZ_161_GAMEPLAY","EBP.WRECKED_VEHICLES.WRECKED_PANZER_IV_SDKFZ_161_WEST_GERMAN","EBP.WRECKED_VEHICLES.WRECKED_PANZER_IV_SDKFZ_161_WEST_GERMAN_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_PANZERIV_MAP_OBJECT","EBP.WRECKED_VEHICLES.WRECKED_PANZERWERFER_SDKFZ_4_1","EBP.WRECKED_VEHICLES.WRECKED_PRIEST","EBP.WRECKED_VEHICLES.WRECKED_RAKETENWERFER","EBP.WRECKED_VEHICLES.WRECKED_SOVIET_76MM_SHERMAN","EBP.WRECKED_VEHICLES.WRECKED_STUG_III_E_SDKFZ_141_1","EBP.WRECKED_VEHICLES.WRECKED_STUG_III_FROZEN","EBP.WRECKED_VEHICLES.WRECKED_STUG_III_G_SDKFZ_141_1","EBP.WRECKED_VEHICLES.WRECKED_STUG_III_G_SDKFZ_141_1_GAMEPLAY","EBP.WRECKED_VEHICLES.WRECKED_STURMTIGER","EBP.WRECKED_VEHICLES.WRECKED_SU_76M","EBP.WRECKED_VEHICLES.WRECKED_SU_85","EBP.WRECKED_VEHICLES.WRECKED_T_34_76","EBP.WRECKED_VEHICLES.WRECKED_T_34_76_02","EBP.WRECKED_VEHICLES.WRECKED_T_34_76_MP","EBP.WRECKED_VEHICLES.WRECKED_T_34_85_RED_BANNER","EBP.WRECKED_VEHICLES.WRECKED_T_34_85_RED_BANNER_MP","EBP.WRECKED_VEHICLES.WRECKED_T_34_85_RED_BANNER_TOW","EBP.WRECKED_VEHICLES.WRECKED_T34_CALLIOPE","EBP.WRECKED_VEHICLES.WRECKED_T70","EBP.WRECKED_VEHICLES.WRECKED_T70_MP","EBP.WRECKED_VEHICLES.WRECKED_TIGER_SDKFZ_181","EBP.WRECKED_VEHICLES.WRECKED_TIGER_SDKFZ_181_SINGLEPLAYER_MISSION","EBP.WRECKED_VEHICLES.WRECKED_WC51","EBP.WRECKED_VEHICLES.WRECKED_WC54_AMBULANCE","EBP.AEF.AEF_AIRDROPPED_MINE_CONTACT_MP","EBP.AEF.AEF_AIRDROPPED_MINE_MP","EBP.AEF.AEF_ALLIEDSUPPLY_STACK_L_01_MP","EBP.AEF.AEF_ATTACK_PLANE","EBP.AEF.AEF_BARBED_WIRE_FENCE_MP","EBP.AEF.AEF_BARRACKS","EBP.AEF.AEF_BASE_STAMPER","EBP.AEF.AEF_GARRISON","EBP.AEF.AEF_MG_NEST","EBP.AEF.AEF_MG_NEST_AEF_BASE","EBP.AEF.AEF_MG_NEST_PERIMETER_MP","EBP.AEF.AEF_MINE_MP","EBP.AEF.AEF_MINE_RIFLEMEN_MP","EBP.AEF.AEF_SANDBAG_DIRTWALL_01","EBP.AEF.AEF_SANDBAG_FENCE","EBP.AEF.AEF_SANDBAGS","EBP.AEF.AEF_SANDBAGWALL","EBP.AEF.AEF_SANDBAGWALL_COVER_SPECIALIZATION","EBP.AEF.AEF_STORAGEBUNKER","EBP.AEF.AEF_SUPPLYTENT","EBP.AEF.AEF_TANK_TRAP_IMPASSABLE_MP","EBP.AEF.AEF_TANK_TRAP_MP","EBP.AEF.AEF_WEAPON_RACK_BAZOOKA_MP","EBP.AEF.AEF_WEAPON_RACK_BROWNING_AUTOMATIC_RIFLE_MP","EBP.AEF.AEF_WEAPON_RACK_DEFAULT_MP","EBP.AEF.AEF_WEAPON_RACK_M1919_LMG","EBP.AEF.AEF_WEAPON_RACK_M1C_GARAND","EBP.AEF.AEF_WEAPON_RACK_M9_BAZOOKA_MP","EBP.AEF.AIRBORNE_BEACON_MP","EBP.AEF.ARMOR_COMMAND_MP","EBP.AEF.ARMOR_COMMAND_SP","EBP.AEF.ARMOR_COMMAND_WRECK_MP","EBP.AEF.ARMORED_RIFLE_COMMAND_MP","EBP.AEF.ARMORED_RIFLE_COMMAND_SP","EBP.AEF.ARMORED_RIFLE_COMMAND_WRECK_MP","EBP.AEF.ASSAULT_ENGINEER_MP","EBP.AEF.ASSAULT_ENGINEER_VEHICLE_CREW_MP","EBP.AEF.AT_TEAM_WEAPON_CREW_MP","EBP.AEF.CAPTAIN_MP","EBP.AEF.CAPTAIN_UNLOCK_MP","EBP.AEF.COMPANY_WEAPONS_POOL_MP","EBP.AEF.COMPANY_WEAPONS_POOL_SP","EBP.AEF.COMPANY_WEAPONS_POOL_WRECK_MP","EBP.AEF.DODGE_WC51_50CAL_MP","EBP.AEF.DODGE_WC51_50CAL_PARADROP","EBP.AEF.DODGE_WC51_AMBULANCE_MP","EBP.AEF.DODGE_WC51_MP","EBP.AEF.DODGE_WC51_MP_PATHFINDERS","EBP.AEF.FIGHTING_POSITION_MP","EBP.AEF.FIGHTING_POSITION_RIFLEMEN_MP","EBP.AEF.HMG_TEAM_WEAPON_CREW_MP","EBP.AEF.HOWITZER_TEAM_WEAPON_CREW_MP","EBP.AEF.INVISI_HEAL_STATION_MP","EBP.AEF.INVISI_REPAIR_STATION_MP","EBP.AEF.JACKSON","EBP.AEF.LIEUTENANT_MP","EBP.AEF.LIEUTENANT_UNLOCK_MP","EBP.AEF.M1_57MM_ANTITANK_GUN_MP","EBP.AEF.M1_75MM_PACK_HOWITZER_MP","EBP.AEF.M1_81MM_MORTAR_MP","EBP.AEF.M10_TANK_DESTROYER_MP","EBP.AEF.M15A1_AA_HALFTRACK_MP","EBP.AEF.M1919A4_30CAL_MACHINE_GUN_MP","EBP.AEF.M1919A4_TEAM_WEAPON_CREW_MP","EBP.AEF.M2_60MM_MORTAR_MP","EBP.AEF.M20_M6_AT_MINE_MP","EBP.AEF.M20_UTILITY_CAR_MP","EBP.AEF.M21_MORTAR_HALFTRACK_MP","EBP.AEF.M26_PERSHING_MP","EBP.AEF.M2HB_50CAL_MACHINE_GUN_MP","EBP.AEF.M3_HALFTRACK_ASSAULT_MP","EBP.AEF.M3_HALFTRACK_MP","EBP.AEF.M36_TANK_DESTROYER_MP","EBP.AEF.M4A3_76MM_SHERMAN_MP","EBP.AEF.M4A3_SHERMAN_BULLDOZER_MP","EBP.AEF.M4A3_SHERMAN_DEMO_BURNOUT","EBP.AEF.M4A3_SHERMAN_MP","EBP.AEF.M4A3E8_SHERMAN_EASY_8_MP","EBP.AEF.M5_HALFTRACK_USF_MP","EBP.AEF.M5A1_STUART_MP","EBP.AEF.M7B1_PRIEST_MP","EBP.AEF.M8_GREYHOUND_MP","EBP.AEF.M8A1_HMC_MP","EBP.AEF.MAJOR_MP","EBP.AEF.MAJOR_RETREAT_POINT_MP","EBP.AEF.MAJOR_UNLOCK_MP","EBP.AEF.MORTAR_TEAM_WEAPON_CREW_MP","EBP.AEF.OBSERVATION_POST_FUEL_AEF_MP","EBP.AEF.OBSERVATION_POST_MUNITION_AEF_MP","EBP.AEF.P47_RECON","EBP.AEF.P47_RECON_PLANE_SWEEP","EBP.AEF.P47_RECON_TRACKING","EBP.AEF.P47_ROCKETS","EBP.AEF.P47_STRAFE","EBP.AEF.PARATROOPER_MP","EBP.AEF.PARATROOPERS_COMBAT_GROUP_PLANE","EBP.AEF.PARATROOPERS_PLANE","EBP.AEF.PARATROOPERS_PLANE_ATGUN","EBP.AEF.PARATROOPERS_PLANE_HMG","EBP.AEF.PARATROOPERS_PLANE_MINES","EBP.AEF.PARATROOPERS_PLANE_PARAS","EBP.AEF.PATHFINDER_IR_MP","EBP.AEF.PATHFINDER_RECON_MP","EBP.AEF.PM_AEF_AIR_SUPPORT_RECON","EBP.AEF.PM_AEF_AIR_SUPPORT_ROCKET","EBP.AEF.PM_AEF_AIR_SUPPORT_ROCKET_ELITE","EBP.AEF.PM_AEF_AIR_SUPPORT_STRAFE","EBP.AEF.PM_AEF_AIR_SUPPORT_STRAFE_ELITE","EBP.AEF.PM_AEF_AIRBORNE_PARATROOPERS_PLANE_PARAS","EBP.AEF.PM_AEF_AIRBORNE_PARATROOPERS_PLANE_STRAFE","EBP.AEF.PM_AEF_AIRBORNE_PARATROOPERS_SPAWNER","EBP.AEF.PM_AEF_AIRBORNE_SUPPLY_DROP_PLANE","EBP.AEF.PM_AEF_FIGHTING_POSITION_TEAMWEAPONS","EBP.AEF.PM_AEF_PINPOINT_ARTY_MARKER_MP","EBP.AEF.PM_AEF_PINPOINT_ARTY_THREE_MARKER_MP","EBP.AEF.PM_ARMOR_COMMAND_BAZOOKA_RACK","EBP.AEF.PM_ARMOR_COMMAND_LMG_RACK","EBP.AEF.PM_ATTACHED_MEDIC","EBP.AEF.PM_ATTACHED_SEARGENT","EBP.AEF.PM_P47_FLYBY","EBP.AEF.PM_P47_MG_STRAFE","EBP.AEF.PM_P47_ROCKET_STRAFE","EBP.AEF.RANGER_COMMANDER_MP","EBP.AEF.RANGER_MP","EBP.AEF.REAR_ECHELON_RADIOMAN_MP","EBP.AEF.REAR_ECHELON_RESERVE_TROOP_MP","EBP.AEF.REAR_ECHELON_TROOP_CAPT_MP","EBP.AEF.REAR_ECHELON_TROOP_MP","EBP.AEF.REPLACEMENT_ARMOR_COMMAND_MP","EBP.AEF.REPLACEMENT_ARMORED_RIFLE_COMMAND_MP","EBP.AEF.REPLACEMENT_COMPANY_WEAPONS_POOL_MP","EBP.AEF.RIFLE_COMMAND_MP","EBP.AEF.RIFLE_COMMAND_SP","EBP.AEF.RIFLE_COMMAND_WRECK_MP","EBP.AEF.RIFLEMAN_SOLDIER_CAPTAIN_MP","EBP.AEF.RIFLEMAN_SOLDIER_GROUP_MP","EBP.AEF.RIFLEMAN_SOLDIER_LIEUTENANT_MP","EBP.AEF.RIFLEMAN_SOLDIER_MP","EBP.AEF.SHERMAN_BARRIER_DEFORM_MP","EBP.AEF.SHERMAN_BARRIER_DIRT_MP","EBP.AEF.SHERMAN_BARRIER_MUD_MP","EBP.AEF.SHERMAN_BARRIER_RUBBLE_MP","EBP.AEF.SHERMAN_BARRIER_SNOW_MP","EBP.AEF.T34_CALLIOPE_MP","EBP.AEF.TEMP_ACTIVE_STRUCTURE_SEARCHLIGHT","EBP.AEF.USF_MEDIC_MP","EBP.AEF.VEHICLE_CREW_BAZOOKA_MP","EBP.AEF.VEHICLE_CREW_TROOP_MP","EBP.AEF.VEHICLE_CREW_TROOP_REPAIR_STATION_MP","SBP.AEF.AEF_AIR_SUPPORT_RECON","SBP.AEF.AEF_AIR_SUPPORT_ROCKET","SBP.AEF.AEF_AIR_SUPPORT_ROCKET_ELITE","SBP.AEF.AEF_AIR_SUPPORT_STRAFE","SBP.AEF.AEF_AIR_SUPPORT_STRAFE_ELITE","SBP.AEF.AEF_ATTACK_PLANE_SQUAD","SBP.AEF.AEF_HALFTRACK_SQUAD_MP","SBP.AEF.ASSAULT_ENGINEER_SQUAD_5_MAN_MP","SBP.AEF.ASSAULT_ENGINEER_SQUAD_MP","SBP.AEF.CAPTAIN_SQUAD_MP","SBP.AEF.DODGE_WC51_50CAL_SQUAD_MP","SBP.AEF.DODGE_WC51_AMBULANCE_SQUAD_MP","SBP.AEF.DODGE_WC51_PATHFINDER_SQUAD_MP","SBP.AEF.DODGE_WC51_SQUAD_MP","SBP.AEF.JACKSON_SQUAD","SBP.AEF.LIEUTENANT_SQUAD_MP","SBP.AEF.M1_57MM_AT_GUN_SQUAD_BOB","SBP.AEF.M1_57MM_AT_GUN_SQUAD_MP","SBP.AEF.M1_75MM_PACK_HOWITZER_SQUAD_MP","SBP.AEF.M1_81MM_MORTAR_SQUAD_MP","SBP.AEF.M10_TANK_DESTROYER_SQUAD_MP","SBP.AEF.M15A1_AA_HALFTRACK_SQUAD_MP","SBP.AEF.M1919A4_HMG_SQUAD_MP","SBP.AEF.M2_60MM_MORTAR_CORE_SQUAD_MP","SBP.AEF.M2_60MM_MORTAR_SQUAD_MP","SBP.AEF.M2_60MM_MORTAR_SQUAD_MP_CLONE","SBP.AEF.M20_ASSAULT_ENGY_ANTITANK_SQUAD_MP","SBP.AEF.M20_UTILITY_CAR_SQUAD_MP","SBP.AEF.M21_MORTAR_HALFTRACK_SQUAD_MP","SBP.AEF.M26_PERSHING_MP","SBP.AEF.M2HB_50CAL_HMG_SQUAD_MP","SBP.AEF.M3_HALFTRACK_SQUAD_ASSAULT_MP","SBP.AEF.M3_HALFTRACK_SQUAD_MP","SBP.AEF.M36_TANK_DESTROYER_SQUAD_MP","SBP.AEF.M4A3_76MM_SHERMAN_BULLDOZER_SQUAD_MP","SBP.AEF.M4A3_76MM_SHERMAN_SQUAD_MP","SBP.AEF.M4A3_SHERMAN_SQUAD_DEMO_BURNOUT","SBP.AEF.M4A3_SHERMAN_SQUAD_MP","SBP.AEF.M4A3E8_SHERMAN_EASY_8_SQUAD_MP","SBP.AEF.M5A1_STUART_SQUAD_MP","SBP.AEF.M7B1_PRIEST_SQUAD_MP","SBP.AEF.M8_GREYHOUND_SQUAD_MP","SBP.AEF.M8A1_HMC_SQUAD_MP","SBP.AEF.MAJOR_SQUAD_MP","SBP.AEF.P47_FLYBY","SBP.AEF.P47_MG_STRAFE","SBP.AEF.P47_RECON","SBP.AEF.P47_RECON_PLANE_SWEEP","SBP.AEF.P47_RECON_TRACKING","SBP.AEF.P47_ROCKETS","SBP.AEF.P47_ROCKETS_STRAFE","SBP.AEF.P47_STRAFES","SBP.AEF.PARATROOPER_COMBAT_GROUP_SQUAD_MP","SBP.AEF.PARATROOPER_SQUAD_MP","SBP.AEF.PARATROOPER_SQUAD_SUPPORT_MP","SBP.AEF.PARATROOPERS_COMBAT_GROUP_PLANE","SBP.AEF.PARATROOPERS_PLANE","SBP.AEF.PARATROOPERS_PLANE_ATGUN","SBP.AEF.PARATROOPERS_PLANE_HMG","SBP.AEF.PARATROOPERS_PLANE_MINES","SBP.AEF.PARATROOPERS_PLANE_PARAS","SBP.AEF.PATHFINDER_SQUAD_MP","SBP.AEF.PATHFINDER_SQUAD_RECON_MP","SBP.AEF.PM_AEF_AIRBORNE_PARATROOPERS_PLANE_PARAS","SBP.AEF.PM_AEF_AIRBORNE_PARATROOPERS_PLANE_STRAFE","SBP.AEF.PM_AEF_AIRBORNE_SUPPLY_DROP_PLANE","SBP.AEF.PM_M3_HALFTRACK_SQUAD_OMCG","SBP.AEF.PM_RIFLEMEN_SQUAD_OMCG","SBP.AEF.RANGER_SQUAD_COMMANDER_MP","SBP.AEF.RANGER_SQUAD_MP","SBP.AEF.REAR_ECHELON_SQUAD_MP","SBP.AEF.RIFLEMEN_SQUAD_MP","SBP.AEF.RIFLEMEN_SQUAD_VETERAN_MP","SBP.AEF.T34_CALLIOPE_SQUAD_MP","SBP.AEF.USF_MEDIC_SQUAD_MP","SBP.AEF.VEHICLE_CREW_BAZOOKA_SQUAD_MP","SBP.AEF.VEHICLE_CREW_SQUAD_MP","ABILITY.AEF.ACTIVATE_REPAIR_STATION_MP","ABILITY.AEF.AEF_BARBED_WIRE_CUTTING_ABILITY_ASSUALT_ENGINEERS_MP","ABILITY.AEF.AEF_BARBED_WIRE_CUTTING_ABILITY_MP","ABILITY.AEF.AEF_BARBED_WIRE_CUTTING_ABILITY_NO_REQUIREMENT_MP","ABILITY.AEF.AEF_HQ_ENGINEER_CALL_IN","ABILITY.AEF.AEF_REPAIR_ABILITY_REAR_ECHELON_MP","ABILITY.AEF.AEF_REPAIR_ABILITY_VEHICLE_CREW_MP","ABILITY.AEF.AEF_REPAIR_CRITICAL_MP","ABILITY.AEF.AIR_DROP_COMBAT_GROUP","ABILITY.AEF.AMBULANCE_HEAL_AREA","ABILITY.AEF.ARTILLERY_155MM","ABILITY.AEF.ARTILLERY_SMOKE_BARRAGE","ABILITY.AEF.ASSAULT_ENGINEER_DISPATCH","ABILITY.AEF.BAR_SUPPRESSION_ABILITY","ABILITY.AEF.BAZOOKA_DEPLOY_MP","ABILITY.AEF.BEACON_DISABLE","ABILITY.AEF.CALLIOPE_ROCKET_BARRAGE_MP","ABILITY.AEF.CAPTAIN_SUPERVISE","ABILITY.AEF.CMD_PARATROOPERS_FROM_PATHFINDERS","ABILITY.AEF.COMBAT_ENGINEER_TIMED_DEMO_MP","ABILITY.AEF.COMBINED_ARMS","ABILITY.AEF.DODGE_WC51_DISPATCH","ABILITY.AEF.ELITE_RIFLEMEN","ABILITY.AEF.ELITE_VEHICLE_CREWS","ABILITY.AEF.FATALITY_P47_ROCKET_ATTACK","ABILITY.AEF.FATALITY_PARATROOPERS_PARADROP","ABILITY.AEF.FATALITY_SMOKE_FLARES","ABILITY.AEF.FATALITY_WHITE_PHOSPHOROUS_BARRAGE","ABILITY.AEF.FLANKING_SPEED","ABILITY.AEF.FORWARD_OBSERVERS_ALWAYS_ON","ABILITY.AEF.FORWARD_OBSERVERS_UNLOCK_2","ABILITY.AEF.GREYHOUND_RECON_DISPATCH","ABILITY.AEF.LIEUTENANT_CAPTAIN_ON_ME_AURA_MP","ABILITY.AEF.M1_81MM_MORTAR_TEAM_MORTAR_BARRAGE_MP","ABILITY.AEF.M1_81MM_MORTAR_TEAM_SMOKE_BARRAGE_MP","ABILITY.AEF.M1_81MM_MORTAR_WHITE_PHOSPHOROUS_BARRAGE_ABILITY_MP","ABILITY.AEF.M1_ATGUN_PIERCING_ABILITY","ABILITY.AEF.M1_ATGUN_TAKE_AIM_ABILITY","ABILITY.AEF.M10_APCPC_SHELLS","ABILITY.AEF.M10_APCPC_SHELLS_VET","ABILITY.AEF.M10_DEPLOY","ABILITY.AEF.M15A1_AA_MODE_MP","ABILITY.AEF.M2_60MM_MORTAR_TEAM_MORTAR_BARRAGE_MP","ABILITY.AEF.M2_60MM_MORTAR_TEAM_SMOKE_BARRAGE_MP","ABILITY.AEF.M20_MARK_VEHICLE","ABILITY.AEF.M20_SMOKE","ABILITY.AEF.M21_HEAVY_HE_SHORT_DELAY_MORTAR_BARRAGE_MP","ABILITY.AEF.M21_MORTAR_BARRAGE_MP","ABILITY.AEF.M21_MORTAR_BARRAGE_VICTOR_TARGET_MP","ABILITY.AEF.M21_MORTAR_HALFTRACK_DISPATCH","ABILITY.AEF.M21_MORTAR_WHITE_PHOSPHOROUS_BARRAGE_MP","ABILITY.AEF.M23_SMOKE_STREAM_RIFLE_GRENADE_MP","ABILITY.AEF.M23_SMOKE_STREAM_RIFLE_GRENADE_VET_MP","ABILITY.AEF.M26_PERSHING_DISPATCH","ABILITY.AEF.M2HB_50CAL_AP_ROUNDS_MP","ABILITY.AEF.M2HB_HMG_SPRINT_MP","ABILITY.AEF.M3_HALFTRACK_GROUP","ABILITY.AEF.M3_HALFTRACK_SPEED_BOOST_MP","ABILITY.AEF.M36_M8_CONCEALING_SMOKE_VET","ABILITY.AEF.M5_QUAD_HALFTRACK_DISPATCH","ABILITY.AEF.M5_STUART_DAMAGE_ENGINE","ABILITY.AEF.M5_STUART_SHELL_SHOCK","ABILITY.AEF.M7B1_PRIEST_105MM_BARRAGE_ABILITY_MP","ABILITY.AEF.M7B1_PRIEST_105MM_BARRAGE_ABILITY_VICTOR_TARGET_MP","ABILITY.AEF.M7B1_PRIEST_105MM_SMOKE_BARRAGE_ABILITY_MP","ABILITY.AEF.M8_CANISTER_SHOT","ABILITY.AEF.M8_LAY_HEAVY_MINE","ABILITY.AEF.M8A1_HMC_75MM_BARRAGE_ABILITY_MP","ABILITY.AEF.M8A1_HMC_75MM_BARRAGE_ABILITY_VICTOR_TARGET_MP","ABILITY.AEF.M8A1_HMC_SMOKE_BARRAGE_MP","ABILITY.AEF.MAJOR_ARTILLERY","ABILITY.AEF.MAJOR_ARTILLERY_FAKE","ABILITY.AEF.MAJOR_QUICK_RECON_RUN","ABILITY.AEF.MAJOR_QUICK_RECON_RUN_IMPROVED","ABILITY.AEF.MEDIC_AUTO_HEAL","ABILITY.AEF.MK2_FRAGMENTATION_GRENADE_MP","ABILITY.AEF.OFF_MAP_SMOKE_ARTILLERY","ABILITY.AEF.OFFICER_RETREAT_POINT_MP","ABILITY.AEF.OFFICER_STOP_RETREAT_MP","ABILITY.AEF.OUT_OF_FUEL_SP","ABILITY.AEF.P47_RECON_MP","ABILITY.AEF.P47_ROCKET_ATTACK","ABILITY.AEF.PACK_HOWITZER_75MM_BARRAGE_ABILITY_HEAT_MP","ABILITY.AEF.PACK_HOWITZER_75MM_BARRAGE_ABILITY_MP","ABILITY.AEF.PACK_HOWITZER_75MM_BARRAGE_ABILITY_VET3_MP","ABILITY.AEF.PACK_HOWITZER_75MM_BARRAGE_ABILITY_VICTOR_TARGET_MP","ABILITY.AEF.PACK_HOWITZER_WHITE_PHOSPHOROUS_BARRAGE_ABILITY_MP","ABILITY.AEF.PARADROP_MACHINE_GUN","ABILITY.AEF.PARADROPS_ANTI_TANK_GUN","ABILITY.AEF.PARATROOPER_ASSAULT_MOVE_TEST_MP","ABILITY.AEF.PARATROOPER_MK2_FRAGMENTATION_GRENADE_MP","ABILITY.AEF.PARATROOPER_SUPPRESSING_FIRE_ABILITY_MP","ABILITY.AEF.PARATROOPER_TIMED_DEMO_MP","ABILITY.AEF.PARATROOPERS_PARADROP","ABILITY.AEF.PATHFINDER_ARTILLERY_UNLOCK","ABILITY.AEF.PATHFINDER_IN_COVER_STATIONARY_CAMOUFLAGE_IMPROVED_MP","ABILITY.AEF.PATHFINDER_IN_COVER_STATIONARY_CAMOUFLAGE_MP","ABILITY.AEF.PATHFINDER_PLANT_BEACON","ABILITY.AEF.PATHFINDERS_DISPATCH","ABILITY.AEF.PATHFINDERS_RECON_DISPATCH","ABILITY.AEF.PERSHING_HVAP_PIERCING_SHOT_ABILITY","ABILITY.AEF.PRIEST_ARTILLERY_BARRAGE_CREEPING_MP","ABILITY.AEF.PRIEST_DISPATCH","ABILITY.AEF.RANGER_BUNDLED_GRENADE_MP","ABILITY.AEF.RANGER_LIMITED_DEMO_MP","ABILITY.AEF.RANGER_MK2_FRAGMENTATION_GRENADE_MP","ABILITY.AEF.RANGER_SPRINT_MP","ABILITY.AEF.RANGERS_DISPATCH","ABILITY.AEF.REAR_ECHELON_VOLLEY_FIRE_ABILITY_MP","ABILITY.AEF.RECON_SWEEP","ABILITY.AEF.REFUEL_TANK_SP","ABILITY.AEF.RIFLEMAN_AT_RIFLE_GRENADE_VET","ABILITY.AEF.RIFLEMAN_FIRE_UP","ABILITY.AEF.RIFLEMAN_FIRE_UP_MP","ABILITY.AEF.RIFLEMEN_30_CALIBER_LMG","ABILITY.AEF.RIFLEMEN_DEFENSIVE","ABILITY.AEF.RIFLEMEN_DEFENSIVE_BUILDINGS","ABILITY.AEF.RIFLEMEN_FIRE_FLARES_ABILITY_MP","ABILITY.AEF.RIFLEMEN_FLAMETHROWERS","ABILITY.AEF.RIFLEMEN_FLARES","ABILITY.AEF.SHERMAN_AMMO_SWITCH_AP_SHELL_MP","ABILITY.AEF.SHERMAN_AMMO_SWITCH_HE_SHELL_MP","ABILITY.AEF.SHERMAN_BULLDOZER_CONSTRUCT_BARRIER_MP","ABILITY.AEF.SHERMAN_BULLDOZER_DESTROY_BARRIER_MP","ABILITY.AEF.SHERMAN_BULLDOZER_DISPATCH","ABILITY.AEF.SHERMAN_CALLIOPE_DISPATCH","ABILITY.AEF.SHERMAN_EASY8_DISPATCH","ABILITY.AEF.SIEGE_240MM_BARRAGE","ABILITY.AEF.SMOKE_SHERMAN_MORTAR_BARRAGE_BULLDOZER_MP","ABILITY.AEF.SMOKE_SHERMAN_MORTAR_BARRAGE_MP","ABILITY.AEF.SP_240MM_OFF_MAP_BARRAGE","ABILITY.AEF.SP_QUICK_RECON_RUN","ABILITY.AEF.SUPPORT_ARTILLERY","ABILITY.AEF.SUPPORT_ARTILLERY_DECOY","ABILITY.AEF.TANK_RIDERS_AUTO_UNLOAD_MP","ABILITY.AEF.TIME_ON_TARGET_ARTILLERY","ABILITY.AEF.USF_HOLD_FIRE_MP","ABILITY.AEF.USF_HOLD_FIRE_PACK_HOWITZER_MP","ABILITY.AEF.USF_MEDIC_HEAL_MP","ABILITY.AEF.USF_SHERMAN_BULLDOZER_HOLD_FIRE_MP","ABILITY.AEF.USF_STRAFING_RUN","ABILITY.AEF.USF_VEHICLE_HOLD_FIRE_MP","ABILITY.AEF.VEHICLE_CREW_AUTO_REPAIR","ABILITY.AEF.VEHICLE_DECREW_GENERIC_MP","ABILITY.AEF.VEHICLE_DECREW_M20_CREW_MP","ABILITY.AEF.VEHICLE_DECREW_MEDICS_MP","ABILITY.AEF.VEHICLE_DECREW_VEHICLE_CREW_MP","ABILITY.AEF.WC51_SPEED_BOOST_MP","ABILITY.AEF.WITHDRAW_AND_REFIT","UPG.AEF.ABILITY_LOCK_OUT_CAPTAIN_ABILITIES","UPG.AEF.ABILITY_LOCK_OUT_LIEUTENANT_ABILITIES","UPG.AEF.ABILITY_LOCK_OUT_PARATROOPERS_LANDED","UPG.AEF.ABILITY_REFUEL_LOCKOUT","UPG.AEF.ABILITY_TRANSFER_ORDERS_LOCK_OUT","UPG.AEF.ARTILLERY_155MM","UPG.AEF.ARTILLERY_155MM_BLIND","UPG.AEF.ARTILLERY_WHITE_PHOSPHOROUS","UPG.AEF.ASSAULT_ENGINEER_DISPATCH","UPG.AEF.ASSAULT_ENGINEER_FLAMETHROWER","UPG.AEF.BAR_UPGRADE_MP","UPG.AEF.BAZOOKA_UPGRADE_MP","UPG.AEF.CAPTAIN_BAZOOKA_UPGRADE_MP","UPG.AEF.CAPTAIN_DISPATCHED_UPGRADE_MP","UPG.AEF.COMBINED_ARMS_MP","UPG.AEF.DODGE_WC51_DISPATCH","UPG.AEF.ELITE_RIFLEMEN","UPG.AEF.ELITE_VEHICLE_CREWS","UPG.AEF.FIGHTING_POSITION_MG_ADDITION_MP","UPG.AEF.FIRE_UP_RIFLEMEN","UPG.AEF.FORWARD_OBSERVERS_UNLOCK","UPG.AEF.GREYHOUND_RECON_DISPATCH","UPG.AEF.LIEUTENANT_DISPATCHED_UPGRADE_MP","UPG.AEF.M10_DEPLOY","UPG.AEF.M20_SIDE_SKIRTS_MP","UPG.AEF.M21_MORTAR_HALFTRACK_DISPATCH","UPG.AEF.M26_PERSHING_DISPATCH","UPG.AEF.M3_HALFTRACK_GROUP","UPG.AEF.M3_REPAIR_STATION_MP","UPG.AEF.M5_HALFTRACK_DISPATCH","UPG.AEF.M8_GREYHOUND_SIDE_SKIRTS_MP","UPG.AEF.M8_TOP_GUNNER_MP","UPG.AEF.MAJOR_DISPATCHED_UPGRADE_MP","UPG.AEF.MEDIC_AUTO_HEAL_REFRESH","UPG.AEF.MINESWEEPER_UPGRADE_MP","UPG.AEF.NO_OFFICER_SPAWN_MP","UPG.AEF.OFF_SMOKE_BARRAGE","UPG.AEF.P47_RECON","UPG.AEF.P47_ROCKET_ATTACK","UPG.AEF.PARADROP_ANTI_TANK_GUN","UPG.AEF.PARADROP_MACHINE_GUN","UPG.AEF.PARADROPPED_SUPPORT_DROP","UPG.AEF.PARATROOPER_M1919A6_LMG_MP","UPG.AEF.PARATROOPER_THOMPSON_SUB_MACHINE_GUN_UPGRADE_MP","UPG.AEF.PARATROOPERS","UPG.AEF.PATHFINDERS","UPG.AEF.PATHFINDERS_RECON","UPG.AEF.PRIEST_DISPATCH","UPG.AEF.RANGER_DISPATCH","UPG.AEF.RANGER_THOMPSON_SUB_MACHINE_GUN_UPGRADE_MP","UPG.AEF.REAR_ECHELON_HACK_WITHDRAWING","UPG.AEF.RECON_SWEEP","UPG.AEF.RIFLE_COMMAND_GRENADE_MP","UPG.AEF.RIFLEMEN_30_CALIBER_LMG","UPG.AEF.RIFLEMEN_DEFENSIVE_BUILDINGS","UPG.AEF.RIFLEMEN_FLAMETHROWER","UPG.AEF.RIFLEMEN_FLAMETHROWER_UNLOCK","UPG.AEF.RIFLEMEN_FLARES","UPG.AEF.SHERMAN_BULLDOZER_DISPATCH","UPG.AEF.SHERMAN_EASY8_DISPATCH","UPG.AEF.SHERMAN_HE_ROUNDS","UPG.AEF.SHERMAN_TOP_GUNNER_MP","UPG.AEF.SIEGE_240MM_ARTILLERY","UPG.AEF.SMOKE_BARRAGE","UPG.AEF.T34_SHERMAN_CALLIOPE_DISPATCH","UPG.AEF.TECH_TREE_V1","UPG.AEF.TEMP_SPAWN_BASE_STAMP_MP","UPG.AEF.TIME_ON_TARGET_ARTILLERY","UPG.AEF.TOP_GUNNER_UPGRADED","UPG.AEF.USF_M5_HALFTRACK_72K_AA_GUN_PACKAGE_MP","UPG.AEF.USF_STRAFING_RUN","UPG.AEF.VEHICLE_CREW_THOMPSON_SUB_MACHINE_GUN_UPGRADE_MP","UPG.AEF.WEAPON_RACK_UPGRADE_MP","UPG.AEF.WITHDRAW_AND_REFIT","EBP.BRITISH.AEC_ARMOURED_CAR_MP","EBP.BRITISH.AIR_SUPPORT_OFFICER_MP","EBP.BRITISH.AVRE_VEHICLE_CREW_MP","EBP.BRITISH.BRIT_17_POUNDER_GUN_MP","EBP.BRITISH.BRIT_17_POUNDER_PIT_COMMANDER_MP","EBP.BRITISH.BRIT_17_POUNDER_PIT_MP","EBP.BRITISH.BRIT_25_POUNDER_HOWITZER_MP","EBP.BRITISH.BRIT_25_POUNDER_HOWITZER_TEMP_MP","EBP.BRITISH.BRIT_3_INCH_MORTAR_EMPLACEMENT","EBP.BRITISH.BRIT_3_INCH_MORTAR_EMPLACEMENT_COMMANDER_MP","EBP.BRITISH.BRIT_6_POUNDER_AT_GUN_MP","EBP.BRITISH.BRIT_BARBED_WIRE_FENCE_MP","EBP.BRITISH.BRIT_BOFORS_40MM_AUTOCANNON_COMMANDER_MP","EBP.BRITISH.BRIT_BOFORS_40MM_AUTOCANNON_MP","EBP.BRITISH.BRIT_EMPLACEMENT_SMALL","EBP.BRITISH.BRIT_FORWARD_HQ_COMMANDER_MP","EBP.BRITISH.BRIT_FORWARD_HQ_MP","EBP.BRITISH.BRIT_FWD_HQ_WEAPON_RACK_BREN_LMG_MP","EBP.BRITISH.BRIT_FWD_HQ_WEAPON_RACK_PIAT_LAUNCHER_MP","EBP.BRITISH.BRIT_LAND_MATTRESS_LAUNCHER_MP","EBP.BRITISH.BRIT_MEDIC_EXTRA_ENTITY_MP","EBP.BRITISH.BRIT_MEDIC_WITH_PISTOL_MP","EBP.BRITISH.BRIT_MINE_COMMANDER_MP","EBP.BRITISH.BRIT_MINE_MP","EBP.BRITISH.BRIT_RETREAT_POINT_MP","EBP.BRITISH.BRIT_SANDBAG_FENCE","EBP.BRITISH.BRIT_WEAPON_RACK_BREN_LMG_MP","EBP.BRITISH.BRIT_WEAPON_RACK_PIAT_LAUNCHER_MP","EBP.BRITISH.BRITISH_25LB_HOWITZER_GUN_CREW_MP","EBP.BRITISH.BRITISH_6LB_AT_GUN_CREW_MP","EBP.BRITISH.BRITISH_BASE_STAMPER","EBP.BRITISH.BRITISH_BUILDING_1_MP","EBP.BRITISH.BRITISH_BUILDING_1_UNBUILT_MP","EBP.BRITISH.BRITISH_BUILDING_1_WRECK_MP","EBP.BRITISH.BRITISH_BUILDING_2_MP","EBP.BRITISH.BRITISH_BUILDING_2_UNBUILT_MP","EBP.BRITISH.BRITISH_BUILDING_2_WRECK_MP","EBP.BRITISH.BRITISH_BUNKER_STARTING_POSITION_MP","EBP.BRITISH.BRITISH_HMG_PLANE","EBP.BRITISH.BRITISH_HMG_TEAM_CREW_MP","EBP.BRITISH.BRITISH_HQ_SANDBAGS_01_MP","EBP.BRITISH.BRITISH_HQ_TRUCK_MP","EBP.BRITISH.BRITISH_HQ_TRUCK_WRECK_MP","EBP.BRITISH.BRITISH_LAND_MATTRESS_TEAM_CREW_MP","EBP.BRITISH.BRITISH_MACHINE_GUN_MP","EBP.BRITISH.BRITISH_MORTAR_TEAM_CREW_MP","EBP.BRITISH.BRITISH_RADIO_BEACON","EBP.BRITISH.BRITISH_SANDBAG_FENCE_MP","EBP.BRITISH.CENTAUR_AA_MK2_MP","EBP.BRITISH.CHURCHILL_AVRE_MP","EBP.BRITISH.CHURCHILL_CROCODILE_MP","EBP.BRITISH.CHURCHILL_DEFAULT_MP","EBP.BRITISH.COMET_MP","EBP.BRITISH.COMMANDO_AIR_LANDING_MP","EBP.BRITISH.COMMANDO_MP","EBP.BRITISH.COMMANDO_PIAT_MP","EBP.BRITISH.CROMWELL_MK4_75MM_MP","EBP.BRITISH.FIELD_HOSPITAL_MEDIC_MP","EBP.BRITISH.FORWARD_OBSERVATION_OFFICER_MP","EBP.BRITISH.GLIDER_COMMANDOS_ONLY","EBP.BRITISH.GLIDER_HEADQUARTERS","EBP.BRITISH.HQ_FIELD_ARTILLERY_MP","EBP.BRITISH.INVISIBLE_FLAME_MORTAR_ICON","EBP.BRITISH.M3_HALFTRACK_RESUPPLY_MP","EBP.BRITISH.PARATROOPERS_PLANE_ATGUN_MATT_TEST_MP","EBP.BRITISH.PARATROOPERS_PLANE_VICKERS_MATT_TEST_MP","EBP.BRITISH.RECON_HAWKER_TYPHOON_ASSAULT_MP","EBP.BRITISH.RECON_HAWKER_TYPHOON_MP","EBP.BRITISH.REPAIR_SAPPER_MP","EBP.BRITISH.ROCKET_HAWKER_TYPHOON_MP","EBP.BRITISH.SAPPER_MP","EBP.BRITISH.SAPPER_RECOVERY_MP","EBP.BRITISH.SEXTON_SPG_MP","EBP.BRITISH.SHERMAN_FIREFLY_M4A2_MP","EBP.BRITISH.SLIT_TRENCH_MP","EBP.BRITISH.SNIPER_BRITISH_MP","EBP.BRITISH.SPITFIRE_RECON_PLANE","EBP.BRITISH.STRAFE_HAWKER_TYPHOON_MP","EBP.BRITISH.TOMMY_MP","EBP.BRITISH.TOMMY_RECON_MP","EBP.BRITISH.UNIVERSAL_CARRIER_MP","EBP.BRITISH.UNIVERSAL_CARRIER_RESUPPLY_MP","EBP.BRITISH.VALENTINE_MORTAR","EBP.BRITISH.VALENTINE_OBSERVATION_MP","EBP.BRITISH.VEHICLE_CREW_MP","SBP.BRITISH.AEC_ARMOURED_CAR_SQUAD_MP","SBP.BRITISH.AIR_SUPPORT_OFFICER_SQUAD_MP","SBP.BRITISH.AVRE_VEHICLE_CREW_SQUAD_MP","SBP.BRITISH.BRIT_17_POUNDER_AT_GUN_SQUAD_COMMANDER_MP","SBP.BRITISH.BRIT_17_POUNDER_AT_GUN_SQUAD_MP","SBP.BRITISH.BRIT_25_POUNDER_HOWITZER_SQUAD_MP","SBP.BRITISH.BRIT_25_POUNDER_HOWITZER_SQUAD_TEMP_MP","SBP.BRITISH.BRIT_3_INCH_MORTAR_TEAM_COMMANDER_MP","SBP.BRITISH.BRIT_3_INCH_MORTAR_TEAM_MP","SBP.BRITISH.BRIT_6_POUNDER_AT_GUN_SQUAD_MP","SBP.BRITISH.BRIT_BOFORS_40MM_AUTOCANNON_SQUAD_COMMANDER_MP","SBP.BRITISH.BRIT_BOFORS_40MM_AUTOCANNON_SQUAD_MP","SBP.BRITISH.BRIT_BREN_LMG_WEAPON_RACK_UI_FAKE_MP","SBP.BRITISH.BRIT_FORWARD_HQ_MP","SBP.BRITISH.BRIT_LAND_MATTRESS_LAUNCHER_SQUAD_MP","SBP.BRITISH.BRIT_MEDIC_SQUAD_MP","SBP.BRITISH.BRIT_PIAT_LAUNCHER_WEAPON_RACK_UI_FAKE_MP","SBP.BRITISH.BRITISH_CARGO_PLANE","SBP.BRITISH.BRITISH_HMG_PLANE","SBP.BRITISH.BRITISH_MACHINE_GUN_SQUAD_MP","SBP.BRITISH.CENTAUR_AA_MK2_SQUAD_MP","SBP.BRITISH.CHURCHILL_AVRE_SQUAD_MP","SBP.BRITISH.CHURCHILL_CROCODILE_MP","SBP.BRITISH.CHURCHILL_DEFAULT_SQUAD_MP","SBP.BRITISH.COMET_TANK_SQUAD_MP","SBP.BRITISH.COMMANDO_SQUAD_MP","SBP.BRITISH.COMMANDO_SQUAD_PIAT_MP","SBP.BRITISH.CROMWELL_MK4_75MM_SQUAD_MP","SBP.BRITISH.FORWARD_HQ_MP","SBP.BRITISH.FORWARD_OBSERVATION_SQUAD_MP","SBP.BRITISH.GLIDER_COMMANDOS_ONLY_MP","SBP.BRITISH.GLIDER_HEADQUARTERS_MP","SBP.BRITISH.INFILTRATION_COMMANDO_SQUAD_MP","SBP.BRITISH.M3_HALFTRACK_SQUAD__RESUPPLY_MP","SBP.BRITISH.PARATROOPERS_PLANE_ATGUN_BRITISH_MATT_TEST_MP","SBP.BRITISH.PARATROOPERS_PLANE_VICKERS_BRITISH_MATT_TEST_MP","SBP.BRITISH.RECON_HAWKER_TYPHOON_ASSAULT_MP","SBP.BRITISH.RECON_HAWKER_TYPHOON_MP","SBP.BRITISH.ROCKET_HAWKER_TYPHOON_MP","SBP.BRITISH.SAPPER_SQUAD_DEMOLITION_MP","SBP.BRITISH.SAPPER_SQUAD_MP","SBP.BRITISH.SAPPER_SQUAD_RECOVERY_MP","SBP.BRITISH.SEXTON_SPG_SQUAD_MP","SBP.BRITISH.SHERMAN_FIREFLY_SQUAD_MP","SBP.BRITISH.SNIPER_BRITISH_SQUAD_MP","SBP.BRITISH.SPITFIRE_RECON_PLANE","SBP.BRITISH.STRAFE_HAWKER_TYPHOON_MP","SBP.BRITISH.TOMMY_SQUAD_FLAME_MP","SBP.BRITISH.TOMMY_SQUAD_MP","SBP.BRITISH.TOMMY_SQUAD_RECON_MP","SBP.BRITISH.TOMMY_SQUAD_TANK_HUNTER_MP","SBP.BRITISH.UNIVERSAL_CARRIER_RESUPPLY","SBP.BRITISH.UNIVERSAL_CARRIER_SQUAD_MP","SBP.BRITISH.VALENTINE_MORTAR","SBP.BRITISH.VALENTINE_OBSERVATION_MP","SBP.BRITISH.VEHICLE_CREW_STANDARD_SQUAD_MP","ABILITY.BRITISH.ADVANCED_ASSEMBLY","ABILITY.BRITISH.ADVANCED_COVER_COMBAT","ABILITY.BRITISH.AEC_DEFENSIVE_SMOKE","ABILITY.BRITISH.AEC_TREAD_SHOTS_MP","ABILITY.BRITISH.ALLIED_STRATEGIC_BOMBING","ABILITY.BRITISH.ARTILLERY_COVER","ABILITY.BRITISH.ASSAULT","ABILITY.BRITISH.ASSAULT_GRENADES","ABILITY.BRITISH.AT_GUN_AIRDROP","ABILITY.BRITISH.AVRE_CREW_DEMOLITION_CHARGE_MP","ABILITY.BRITISH.AVRE_CREW_SHRAPNELL_GRENADE_MP","ABILITY.BRITISH.AVRE_SPIGOT_MORTAR_ATTACK_MP","ABILITY.BRITISH.AVRE_SPIGOT_MORTAR_ATTACK_VET_3_MP","ABILITY.BRITISH.AVRE_SPIGOT_MORTAR_RELOAD_MP","ABILITY.BRITISH.AVRE_VEHICLE_DECREW_VEHICLE_CREW_MP","ABILITY.BRITISH.BOFORS_SUPPRESSIVE_BARRAGE_ABILITY_MP","ABILITY.BRITISH.BOFORS_SUPPRESSIVE_BARRAGE_ABILITY_VICTOR_TARGET_MP","ABILITY.BRITISH.BREAKTHROUGH_OPERATION","ABILITY.BRITISH.BRIT_17_POUNDER_FACING_ORDER_MP","ABILITY.BRITISH.BRIT_17_POUNDER_FLARES_ABILITY_MP","ABILITY.BRITISH.BRIT_17_POUNDER_PIERCING_SHELL_ABILITY_MP","ABILITY.BRITISH.BRIT_17_POUNDER_PIERCING_SHELL_ABILITY_VICTOR_TARGET_MP","ABILITY.BRITISH.BRIT_3_INCH_MORTAR_EMPLACEMENT_BARRAGE_MP","ABILITY.BRITISH.BRIT_3_INCH_MORTAR_EMPLACEMENT_BARRAGE_VICTOR_TARGET_MP","ABILITY.BRITISH.BRIT_3_INCH_MORTAR_EMPLACEMENT_SMOKE_BARRAGE_MP","ABILITY.BRITISH.BRIT_6_POUNDER_CRITICAL_SHOT_MP","ABILITY.BRITISH.BRIT_6_POUNDER_RAPID_MANEUVER_MP","ABILITY.BRITISH.BRIT_BARBED_WIRE_CUTTING_ABILITY_MP","ABILITY.BRITISH.BRIT_BASE_BRACED_STATIC_MP","ABILITY.BRITISH.BRIT_BASE_BUILDING_BRACED_OFF_MP","ABILITY.BRITISH.BRIT_BASE_BUILDING_BRACED_ON_MP","ABILITY.BRITISH.BRIT_EMPLACEMENT_BRACED_MP","ABILITY.BRITISH.BRIT_HQ_ENGINEER_CALL_IN","ABILITY.BRITISH.BRIT_MEDIC_HEAL_MP","ABILITY.BRITISH.BRIT_MEDIC_SQUAD_AUTO_HEAL","ABILITY.BRITISH.BRIT_MEDIC_TOMMY_TIMED_AREA_HEAL_MP","ABILITY.BRITISH.BRIT_MORTAR_EMPLACEMENT_HOLD_FIRE","ABILITY.BRITISH.BRIT_RADAR_SWEEP","ABILITY.BRITISH.BRIT_REPAIR_ABILITY_SAPPERS_MP","ABILITY.BRITISH.BRIT_REPAIR_ABILITY_TOMMYS_MP","ABILITY.BRITISH.BRIT_REPAIR_EWS_ABILITY_SAPPERS_MP","ABILITY.BRITISH.BRIT_SNIPER_DELAYED_COVER_AUTO_CAMOUFLAGE_MP","ABILITY.BRITISH.BRIT_TUNE_UP","ABILITY.BRITISH.BRIT_VEHICLE_HOLD_FIRE_MP","ABILITY.BRITISH.BRITISH_HOLD_THE_LINE","ABILITY.BRITISH.BRITISH_MORTAR_HOLD_FIRE_MP","ABILITY.BRITISH.CENTAUR_20MM_BARRAGE_MP","ABILITY.BRITISH.CENTAUR_AA_MODE_MP","ABILITY.BRITISH.CENTAUR_WEAPON_BURST_MP","ABILITY.BRITISH.CENTAUR_WEAPON_BURST_TEST_MP","ABILITY.BRITISH.CHURCHILL_AVRE","ABILITY.BRITISH.CHURCHILL_CREW_GRENADE_TARGETED","ABILITY.BRITISH.CHURCHILL_CROC_FLAME_BURST_MP","ABILITY.BRITISH.CHURCHILL_CROCODILE","ABILITY.BRITISH.CHURCHILL_INF_SUPPORT_SMOKE","ABILITY.BRITISH.COMET_CREW_GRENADE_TARGETED","ABILITY.BRITISH.COMET_SMOKE_SHELL_SHOT_MP","ABILITY.BRITISH.COMET_SMOKE_SHELL_SHOT_WP_MP","ABILITY.BRITISH.COMMAND_HQ","ABILITY.BRITISH.COMMAND_HQ_HE_ARTILLERY","ABILITY.BRITISH.COMMAND_HQ_RECON_PLANE","ABILITY.BRITISH.COMMAND_HQ_SMOKE_ARTILLERY","ABILITY.BRITISH.COMMAND_HQ_STRAFE_PLANE","ABILITY.BRITISH.COMMAND_VEHICLE","ABILITY.BRITISH.COMMAND_VEHICLE_PLANE","ABILITY.BRITISH.COMMANDO_ASSASSINATE_MP","ABILITY.BRITISH.COMMANDO_DEMO_MP","ABILITY.BRITISH.COMMANDO_INFILTRATION_CAMOUFLAGE_MP","ABILITY.BRITISH.COUNTER_BATTERY","ABILITY.BRITISH.COUNTER_BATTERYS","ABILITY.BRITISH.COVER_SMOKE_GRENADES","ABILITY.BRITISH.CREW_REPAIR","ABILITY.BRITISH.CREW_REPAIR_OPERATION","ABILITY.BRITISH.CROMWELL_SMOKE_SHELL_SHOT_MP","ABILITY.BRITISH.DEFENSIVE_OPERATIONS","ABILITY.BRITISH.DESTROY_COVER_MP","ABILITY.BRITISH.DIRECT_BARRAGE","ABILITY.BRITISH.EARLY_WARNING","ABILITY.BRITISH.ENGINEER_COVER_COMBAT_BONUS","ABILITY.BRITISH.FATALITY_BURN_THEM_OUT","ABILITY.BRITISH.FATALITY_MIGHT_OF_THE_AIR_FORCES","ABILITY.BRITISH.FATALITY_ZEROING_STRIKE","ABILITY.BRITISH.FIELD_RECOVERY","ABILITY.BRITISH.FIRE_SUPPORT_TEAM","ABILITY.BRITISH.FIREFLY_TULIP_ROCKET_BARRAGE_MP","ABILITY.BRITISH.FIREFLY_TULIP_ROCKET_BARRAGE_SKILL_SHOT_MP","ABILITY.BRITISH.FORTIFY_OUR_POSITION","ABILITY.BRITISH.FORWARD_HQ_RETREAT_POINT_GLIDER_MP","ABILITY.BRITISH.FORWARD_HQ_RETREAT_POINT_MP","ABILITY.BRITISH.GLIDER_COMMANDOS_ONLY","ABILITY.BRITISH.GLIDER_HEADQUARTERS","ABILITY.BRITISH.GLIDER_RETREAT_POINT_MP","ABILITY.BRITISH.HOWITZER_COUNTER_BARRAGE_ATTACK_COMMANDER_MP","ABILITY.BRITISH.HOWITZER_COUNTER_BARRAGE_COMMANDER_MP","ABILITY.BRITISH.HQ_BUILD_ANVIL_1_MP","ABILITY.BRITISH.HQ_BUILD_ANVIL_2_MP","ABILITY.BRITISH.IMPROVED_FORTIFCATIONS","ABILITY.BRITISH.INFANTRY_RECON_TACTICS","ABILITY.BRITISH.INFANTRY_SMOKE_GRENADE_RESPOSITION","ABILITY.BRITISH.INFILTRATION_COMMANDOS","ABILITY.BRITISH.LAND_MATTRESS","ABILITY.BRITISH.LAND_MATTRESS_25LB_ROCKET","ABILITY.BRITISH.LAND_MATTRESS_60LB_ROCKET","ABILITY.BRITISH.LAND_MATTRESS_BARRAGE","ABILITY.BRITISH.LAND_MATTRESS_BARRAGE_SMOKE","ABILITY.BRITISH.LAND_MATTRESS_BARRAGE_VICTOR_TARGET_MP","ABILITY.BRITISH.LAND_MATTRESS_FIRE_ALL","ABILITY.BRITISH.LAND_MATTRESS_LOAD_ROCKETS_MP","ABILITY.BRITISH.LAND_MATTRESS_PHOSPHORUS_ROCKET","ABILITY.BRITISH.MEDIC_AUTO_HEAL_MP","ABILITY.BRITISH.MORTAR_ARTILLERY","ABILITY.BRITISH.MORTAR_FIRE_ARTILLERY","ABILITY.BRITISH.MORTAR_PIT_COUNTER_BATTERY_MP","ABILITY.BRITISH.OBSERVATION_MODE","ABILITY.BRITISH.OBSERVATION_VALENTINE","ABILITY.BRITISH.OFFICER_ARTILLERY","ABILITY.BRITISH.OFFICER_ARTILLERY_SEXTON_VICTOR_TARGET_AIRBURST_BARRAGE_MP","ABILITY.BRITISH.OFFICER_ARTILLERY_SEXTON_VICTOR_TARGET_CONCENTRATION_BARRAGE_MP","ABILITY.BRITISH.OFFICER_CHARGE_MP","ABILITY.BRITISH.OFFICER_RECON_SWEEP","ABILITY.BRITISH.PASSIVE_17_POUNDER_EMPLACEMENT_MP","ABILITY.BRITISH.PASSIVE_BOFORS_EMPLACEMENT_MP","ABILITY.BRITISH.PASSIVE_MORTAR_EMPLACEMENT_MP","ABILITY.BRITISH.PEPPER_POT","ABILITY.BRITISH.PERCISION_BARRAGE","ABILITY.BRITISH.PIAT_DEPLOY_MP","ABILITY.BRITISH.QF_25_PDR_FLARE_BARRAGE_ABILITY_MP","ABILITY.BRITISH.QF_25LB_ANTITANK_ABILITY_BASE_MP","ABILITY.BRITISH.QF_25LB_ANTITANK_ABILITY_MP","ABILITY.BRITISH.QF_25LB_BARRAGE_ABILITY_BASE_MP","ABILITY.BRITISH.QF_25LB_BARRAGE_ABILITY_MP","ABILITY.BRITISH.QF_25LB_COORDINATED_FIRE_BASE_MP","ABILITY.BRITISH.QF_25LB_COORDINATED_FIRE_MP","ABILITY.BRITISH.QF_25LB_COORDINATED_FIRE_ORDER_BASE_MP","ABILITY.BRITISH.QF_25LB_COORDINATED_FIRE_ORDER_FWD_HQ_MP","ABILITY.BRITISH.QF_25LB_COORDINATED_FIRE_ORDER_MP","ABILITY.BRITISH.QF_25LB_COORDINATED_FIRE_ORDER_OFFICER_MP","ABILITY.BRITISH.QF_25LB_COORDINATED_FIRE_ORDER_SNIPER_MP","ABILITY.BRITISH.QF_25LB_COORDINATED_FIRE_ORDER_VALENTINE_MP","ABILITY.BRITISH.QF_25LB_COORDINATED_SMOKE_SCREEN_BASE_MATT_TEST_VICTOR_TARGET_MP","ABILITY.BRITISH.QF_25LB_CREEPING_SMOKE_BARRAGE_ABILITY_BASE_MP","ABILITY.BRITISH.QF_25LB_CREEPING_SMOKE_BARRAGE_ABILITY_MP","ABILITY.BRITISH.QF_25LB_DIRECT_BARRAGE_BASE_MP","ABILITY.BRITISH.QF_25LB_OVERWATCH_BASE_MP","ABILITY.BRITISH.QF_25LB_RAPID_RESPONSE_BARRAGE_BASE_MP","ABILITY.BRITISH.QF_25LB_RAPID_RESPONSE_BARRAGE_MP","ABILITY.BRITISH.QF_25LB_SMOKE_SCREEN_BASE_MP","ABILITY.BRITISH.RAPID_ADVANCE","ABILITY.BRITISH.RAPID_RESPONSE_ARTILLERY","ABILITY.BRITISH.RECON_SECTION_SPRINT_MP","ABILITY.BRITISH.REINFORCE_THE_FRONT","ABILITY.BRITISH.REINFORCED_STRUCTURES","ABILITY.BRITISH.SAPPER_ANVIL_BOOBY_TRAP","ABILITY.BRITISH.SAPPER_FLAMETHROWERS","ABILITY.BRITISH.SAPPER_GAMMON_BOMB_MEDIUM_MP","ABILITY.BRITISH.SAPPER_SALVAGE_WRECK","ABILITY.BRITISH.SEXTON_ARTILLERY_BARRAGE_CREEPING_VICTOR_TARGET_MP","ABILITY.BRITISH.SEXTON_DISPATCH_BRITISH","ABILITY.BRITISH.SEXTON_SPG_25_CONCENTRATION_BARRAGE_MP","ABILITY.BRITISH.SEXTON_SPG_25_PDR_ARTILLERY_CREEPING_BARRAGE_MP","ABILITY.BRITISH.SEXTON_SPG_25_PDR_BARRAGE_ABILITY_MP","ABILITY.BRITISH.SEXTON_SPG_25_PDR_SUPERCHARGE_AIRBURST_BARRAGE_ABILITY_MP","ABILITY.BRITISH.SEXTON_SPG_25_PDR_SUPERCHARGE_BARRAGE_ABILITY_MP","ABILITY.BRITISH.SMOKE_ASSAULT","ABILITY.BRITISH.SNIPER_BOYS_ANTI_TANK_CRITICAL_SHOT_MP","ABILITY.BRITISH.STAND_FAST","ABILITY.BRITISH.STRAFING_RUN","ABILITY.BRITISH.SUPER_OVERWATCH_TEST","ABILITY.BRITISH.TANK_HUNTER","ABILITY.BRITISH.TOMMY_COVER_COMBAT_BONUS","ABILITY.BRITISH.TOMMY_GAMMON_BOMB_HEAVY_MP","ABILITY.BRITISH.TOMMY_GAMMON_BOMB_MEDIUM_MP","ABILITY.BRITISH.TOMMY_HEAT_GRENADE_MP","ABILITY.BRITISH.TOMMY_MILLS_BOMB_MP","ABILITY.BRITISH.TOMMY_OFFICER_ARTILLERY","ABILITY.BRITISH.TOMMY_STAND_YOUR_GROUND","ABILITY.BRITISH.TUNE_UP_BONUS_MP","ABILITY.BRITISH.UEC_SELF_REPAIR","ABILITY.BRITISH.UEC_SELF_REPAIR_IMPROVED","ABILITY.BRITISH.UNIVERSAL_CARRIER_DROP_LMG","ABILITY.BRITISH.UNIVERSAL_CARRIER_DROP_PIAT","ABILITY.BRITISH.UNIVERSAL_CARRIER_VICKERS_SUPPRESSION_MP","ABILITY.BRITISH.VALENTINE_ARTILLERY_SEXTON_VICTOR_TARGET_CONCENTRATION_BARRAGE_MP","ABILITY.BRITISH.VALENTINE_SMOKE_BARRAGE_MP","ABILITY.BRITISH.VICKERS_AIRDROP","ABILITY.BRITISH.VICKERS_HMG_VET_1_BONUS","UPG.BRITISH.ABILITY_LOCK_OUT_17_POUNDER_ABILITY_ACTIVE","UPG.BRITISH.ABILITY_LOCK_OUT_AVRE_NOT_RELOADED","UPG.BRITISH.ABILITY_LOCK_OUT_AVRE_RELOADING","UPG.BRITISH.ABILITY_LOCK_OUT_BASE_ARTILLERY_COUNTER_BARRAGE_ABILITY_ACTIVE","UPG.BRITISH.ABILITY_LOCK_OUT_BASE_ARTILLERY_OVERWATCH_ABILITY_ACTIVE","UPG.BRITISH.ABILITY_LOCK_OUT_BOFORS_EMPLACEMENT_AA_MODE_ENABLED","UPG.BRITISH.ABILITY_LOCK_OUT_BOFORS_EMPLACEMENT_BARRAGE_ACTIVE","UPG.BRITISH.ABILITY_LOCK_OUT_GLIDER_CUSTOM_LOADOUT_LAUNCH_AVAILABLE","UPG.BRITISH.ABILITY_LOCK_OUT_GLIDER_HARD_LANDED","UPG.BRITISH.ABILITY_LOCK_OUT_GLIDER_NOT_STOPPED","UPG.BRITISH.ABILITY_LOCK_OUT_MORTAR_EMPLACEMENT_BARRAGE_ACTIVE","UPG.BRITISH.ABILITY_LOCK_OUT_MORTAR_EMPLACEMENT_SLOT_1_DEFAULT_LOADED","UPG.BRITISH.ABILITY_LOCK_OUT_MORTAR_EMPLACEMENT_SLOT_1_SPECIAL_1_LOADED","UPG.BRITISH.ABILITY_LOCK_OUT_MORTAR_EMPLACEMENT_SLOT_1_SPECIAL_2_LOADED","UPG.BRITISH.ADVANCED_ASSEMBLY","UPG.BRITISH.ADVANCED_ASSEMBLY_RESEARCH","UPG.BRITISH.ADVANCED_COVER","UPG.BRITISH.AEC_HE_ROUNDS_MP","UPG.BRITISH.AEC_HE_ROUNDS_UNLOCK_MP","UPG.BRITISH.AEC_RAPID_FIRE_MP","UPG.BRITISH.AEC_TARGET_OPTICS_MP","UPG.BRITISH.AEC_TARGET_TURRET_MP","UPG.BRITISH.AEC_TREAD_FIRST_SHOT_MP","UPG.BRITISH.AEC_TREAD_SECOND_SHOT_MP","UPG.BRITISH.ARTY_PIT_LOCKOUT_UPGRADE","UPG.BRITISH.ASSAULT","UPG.BRITISH.ASSAULT_ACTIVE","UPG.BRITISH.AVRE_MORTAR_RELOAD","UPG.BRITISH.BASE_BUILDING_BRACED_MP","UPG.BRITISH.BOYS_AT_RIFLE","UPG.BRITISH.BREN_LMG_UNLOCK_MP","UPG.BRITISH.BRITISH_TANK_COMMANDER","UPG.BRITISH.CAN_TUNE_UP_MP","UPG.BRITISH.COMMAND_HQ","UPG.BRITISH.COMMAND_VEHICLE","UPG.BRITISH.COMMAND_VEHICLE_ACTIVE","UPG.BRITISH.COMMAND_VEHICLE_ACTIVE_PLAYER","UPG.BRITISH.COMMANDO_RETREAT_SMOKE_DELAY","UPG.BRITISH.COMPANY_ANVIL_BUILDING_MP","UPG.BRITISH.COMPANY_ANVIL_MP","UPG.BRITISH.COMPANY_ANVIL_POINT_SIGHT_MP","UPG.BRITISH.COMPANY_HAMMER_BUILDING_MP","UPG.BRITISH.COMPANY_HAMMER_MP","UPG.BRITISH.COUNTER_BATTERY","UPG.BRITISH.COUNTER_BATTERY_MP","UPG.BRITISH.DEFENSIVE_OPERATIONS","UPG.BRITISH.EMPLACEMENT_DEACTIVATE_BRACE_DELAY","UPG.BRITISH.FIREFLY_TULIP_RELOAD","UPG.BRITISH.FIREFLY_TULIP_ROCKET","UPG.BRITISH.FLAMETHROWERS","UPG.BRITISH.FWD_HQ_RETREAT_MP","UPG.BRITISH.IMPROVED_FORTIFCATION","UPG.BRITISH.IMPROVED_FORTIFCATION_ASSSEMBLY_SQUAD","UPG.BRITISH.IMPROVED_FORTIFCATION_SQUAD","UPG.BRITISH.INFILTRATION_COMMANDOS","UPG.BRITISH.LAND_MATTRESS_FIRING","UPG.BRITISH.LAND_MATTRESS_LOADED_ROCKET","UPG.BRITISH.LAND_MATTRESS_LOADING_25LB_ROCKET","UPG.BRITISH.LAND_MATTRESS_LOADING_60LB_ROCKET","UPG.BRITISH.LAND_MATTRESS_LOADING_PHOS_ROCKET","UPG.BRITISH.PIAT","UPG.BRITISH.PIAT_UNLOCK_MP","UPG.BRITISH.PLATOON_AEC_RESEARCH_BUILDING_MP","UPG.BRITISH.PLATOON_AEC_RESEARCH_MP","UPG.BRITISH.PLATOON_BOFORS_RESEARCH_BUILDING_MP","UPG.BRITISH.PLATOON_BOFORS_RESEARCH_MP","UPG.BRITISH.PRECISION_BARRAGE","UPG.BRITISH.QF_25LB_COORDINATED_FIRE_MP","UPG.BRITISH.QF_25LB_COUNTER_BATTERY_MP","UPG.BRITISH.QF_25LB_FIRE_SUPPORT_BASE_MP","UPG.BRITISH.QF_25LB_FIRE_SUPPORT_MP","UPG.BRITISH.QF_25LB_HE_SHELL_MP","UPG.BRITISH.QF_25LB_RAPID_RESPONSE_DELAY_MP","UPG.BRITISH.QF_25LB_RAPID_RESPONSE_MP","UPG.BRITISH.QF_25LB_SHELL_TOGGLE_ABILITY_DELAY_MP","UPG.BRITISH.QF_25LB_TACTICAL_SUPPORT_BASE_MP","UPG.BRITISH.QF_25LB_TACTICAL_SUPPORT_MP","UPG.BRITISH.QF_25LB_TARGET_ACQUISITION_MP","UPG.BRITISH.REINFORCED_STRUCTURE","UPG.BRITISH.SAPPER_FLAMETHROWER","UPG.BRITISH.SAPPERS_HEAVY_SQUAD_MP","UPG.BRITISH.SAPPERS_MINESWEEPER_UPGRADE_MP","UPG.BRITISH.SNIPER_BOYS_AT_RIFLE","UPG.BRITISH.TANK_HUNTER_ACTIVE","UPG.BRITISH.TECH_STRUCTURE_1_CONSTRUCT_MP","UPG.BRITISH.TECH_STRUCTURE_1_MP","UPG.BRITISH.TECH_STRUCTURE_2_CONSTRUCT_MP","UPG.BRITISH.TECH_STRUCTURE_2_MP","UPG.BRITISH.TOMMY_BOYS_AT_RIFLES","UPG.BRITISH.TOMMY_INCREASED_SQUAD_SIZE_MP","UPG.BRITISH.TOMMY_MEDICAL_SUPPLIES","UPG.BRITISH.TOMMY_MILLS_BOMB_MP","UPG.BRITISH.TOMMY_PYROTECHNICS_SUPPLIES","UPG.BRITISH.UNIVERSAL_CARRIER_VICKERS_K_PACKAGE_UPGRADE_MP","UPG.BRITISH.UNIVERSAL_CARRIER_WASP_PACKAGE_UPGRADE_MP","UPG.BRITISH.VALENTINE_OBSERVATION_MODE_MP","UPG.BRITISH.WEAPON_RACK_UNLOCK_MP","EBP.GERMAN.ANTITANK_88MM_PAK43_SANDBAGS","EBP.GERMAN.ARMORED_CAR_SDKFZ_222","EBP.GERMAN.ARMORED_CAR_SDKFZ_222_MP","EBP.GERMAN.ASSAULT_GRENADIERS_LEADER_MP","EBP.GERMAN.ASSAULT_GRENADIERS_MP","EBP.GERMAN.ASSAULT_OFFICER","EBP.GERMAN.ASSAULT_OFFICER_GRENADIERS_BODYGUARD_MP","EBP.GERMAN.ASSAULT_OFFICER_MP","EBP.GERMAN.ATGUN_CREW","EBP.GERMAN.ATGUN_CREW_MP","EBP.GERMAN.ATGUN88_CREW","EBP.GERMAN.ATGUN88_CREW_MP","EBP.GERMAN.AXIS_BUNKER_STARTING_POSITION","EBP.GERMAN.AXIS_BUNKER_STARTING_POSITION_MP","EBP.GERMAN.BEREICH_FESTUNG","EBP.GERMAN.BEREICH_FESTUNG_MP","EBP.GERMAN.BRUMMBAR_STURMPANZER_IV_SDKFZ_166","EBP.GERMAN.BRUMMBAR_STURMPANZER_IV_SDKFZ_166_MP","EBP.GERMAN.BUNKER","EBP.GERMAN.BUNKER_MP","EBP.GERMAN.BUNKER_OF_DEATH_MP","EBP.GERMAN.CARGO_PLANE","EBP.GERMAN.CARGO_PLANE_1","EBP.GERMAN.CARGO_PLANE_FUEL","EBP.GERMAN.CARGO_PLANE_MUNITIONS","EBP.GERMAN.DOLCH_AKTIONEN","EBP.GERMAN.DOLCH_AKTIONEN_MP","EBP.GERMAN.ELEFANT_SDKFZ_184","EBP.GERMAN.ELEFANT_SDKFZ_184_MP","EBP.GERMAN.FUEL_POST_GERMAN","EBP.GERMAN.FUEL_POST_GERMAN_MP","EBP.GERMAN.GERMAN_BASE_STAMPER","EBP.GERMAN.GERMAN_HQ","EBP.GERMAN.GERMAN_HQ_MP","EBP.GERMAN.GERMAN_HQ_WRECK","EBP.GERMAN.GERMAN_HQ_WRECK_MP","EBP.GERMAN.GERMAN_MEDIC","EBP.GERMAN.GERMAN_MEDIC_MP","EBP.GERMAN.GERMAN_MINE","EBP.GERMAN.GERMAN_MINE_MP","EBP.GERMAN.GERMAN_SANDBAG_FENCE","EBP.GERMAN.GRANATEWERFER_34_81MM_MORTAR","EBP.GERMAN.GRANATEWERFER_34_81MM_MORTAR_MP","EBP.GERMAN.GRENADIERS","EBP.GERMAN.GRENADIERS_MP","EBP.GERMAN.GRENADIERS_SP","EBP.GERMAN.HACK_INVISI_PIONEER_MP","EBP.GERMAN.HALFTRACK_RIEGEL_43_MINE_MP","EBP.GERMAN.HALFTRACK_SDKFZ_251","EBP.GERMAN.HALFTRACK_SDKFZ_251_MP","EBP.GERMAN.HINTERE_PANZERWERK","EBP.GERMAN.HINTERE_PANZERWERK_MP","EBP.GERMAN.HINTERE_PANZERWERK_VORONEZH","EBP.GERMAN.HOWITZER_105MM_DUMMY","EBP.GERMAN.HOWITZER_105MM_LE_FH18","EBP.GERMAN.HOWITZER_105MM_LE_FH18_MP","EBP.GERMAN.HOWITZER_CREW","EBP.GERMAN.HOWITZER_CREW_MP","EBP.GERMAN.HULLDOWN_SANDBAG_WALL","EBP.GERMAN.HULLDOWN_SANDBAG_WALL_MP","EBP.GERMAN.INVISIBLE_RETREAT_POINT","EBP.GERMAN.LUFTWAFFE_OFFICER_TOW","EBP.GERMAN.M01_STUKA_DOGFIGHT","EBP.GERMAN.M01_STUKA_GROUND_ATTACK_FAST","EBP.GERMAN.MECHANIZED_250_HALFTRACK_GRENADIER_MP","EBP.GERMAN.MECHANIZED_250_HALFTRACK_MP","EBP.GERMAN.MG42_CREW","EBP.GERMAN.MG42_CREW_MP","EBP.GERMAN.MG42_CREW_SINGLE","EBP.GERMAN.MG42_HMG","EBP.GERMAN.MG42_HMG_ATTACK_GROUND","EBP.GERMAN.MG42_HMG_MP","EBP.GERMAN.MINE_FIELD","EBP.GERMAN.MINE_FIELD_BORDER","EBP.GERMAN.MINE_FIELD_BORDER_MP","EBP.GERMAN.MINE_FIELD_MINE","EBP.GERMAN.MINE_FIELD_MINE_M03","EBP.GERMAN.MINE_FIELD_MINE_MP","EBP.GERMAN.MINE_FIELD_MINE_TOW","EBP.GERMAN.MINE_FIELD_MP","EBP.GERMAN.MORTAR_CREW","EBP.GERMAN.MORTAR_CREW_MP","EBP.GERMAN.MORTAR_LIGHT_HALFTRACK_250_7","EBP.GERMAN.MORTAR_LIGHT_HALFTRACK_250_7_MP","EBP.GERMAN.MUNITION_POST_GERMAN","EBP.GERMAN.MUNITION_POST_GERMAN_MP","EBP.GERMAN.OFFICER","EBP.GERMAN.OFFICER_MP","EBP.GERMAN.OFFICER_TOW_OCCUPATION","EBP.GERMAN.OPEL_BLITZ_SUPPLY_TRUCK_MP","EBP.GERMAN.OPEL_BLITZ_TRUCK","EBP.GERMAN.OSTRUPPEN_SOLDIER","EBP.GERMAN.OSTRUPPEN_SOLDIER_MP","EBP.GERMAN.OSTWIND_FLAK_PANZER","EBP.GERMAN.OSTWIND_FLAK_PANZER_MP","EBP.GERMAN.PAK40_75MM_AT_GUN","EBP.GERMAN.PAK40_75MM_AT_GUN_MP","EBP.GERMAN.PAK43_88MM_AT_GUN","EBP.GERMAN.PAK43_88MM_AT_GUN_MP","EBP.GERMAN.PANTHER_SDKFZ_171","EBP.GERMAN.PANTHER_SDKFZ_171_MP","EBP.GERMAN.PANZER_GRENADIERS","EBP.GERMAN.PANZER_GRENADIERS_MP","EBP.GERMAN.PANZER_III_MP","EBP.GERMAN.PANZER_IV_COMMANDER_SDKFZ_161","EBP.GERMAN.PANZER_IV_COMMANDER_SDKFZ_161_MP","EBP.GERMAN.PANZER_IV_SDKFZ_161","EBP.GERMAN.PANZER_IV_SDKFZ_161_MP","EBP.GERMAN.PANZER_IV_SDKFZ_161_TUTORIAL","EBP.GERMAN.PANZER_IV_SDKFZ_AUSF1","EBP.GERMAN.PANZER_IV_SDKFZ_AUSF1_MP","EBP.GERMAN.PANZER_MG","EBP.GERMAN.PANZERWERFER_SDKFZ_4_1","EBP.GERMAN.PANZERWERFER_SDKFZ_4_1_MP","EBP.GERMAN.PARADROP_SNIPER_SOLDIER_MP","EBP.GERMAN.PIONEER","EBP.GERMAN.PIONEER_MP","EBP.GERMAN.PUMA_EAST_GERMAN","EBP.GERMAN.REPAIR_PIONEER","EBP.GERMAN.REPAIR_PIONEER_MP","EBP.GERMAN.RIEGEL_43_MINE","EBP.GERMAN.RIEGEL_43_MINE_MP","EBP.GERMAN.SCHWERES_KRIEGSWERK","EBP.GERMAN.SCHWERES_KRIEGSWERK_MP","EBP.GERMAN.SDKFZ_221_LIGHT_AT_HALFTRACK","EBP.GERMAN.SLIT_TRENCH_GERMAN","EBP.GERMAN.SLIT_TRENCH_GERMAN_MP","EBP.GERMAN.SNIPER_COVER","EBP.GERMAN.SNIPER_DIGIN_COVER_MP","EBP.GERMAN.SNIPER_SOLDIER","EBP.GERMAN.SNIPER_SOLDIER_MP","EBP.GERMAN.STORMTROOPERS_MP","EBP.GERMAN.STUG_III_E_SDKFZ_141_1","EBP.GERMAN.STUG_III_E_SDKFZ_141_1_COMMANDER_MP","EBP.GERMAN.STUG_III_E_SDKFZ_141_1_MP","EBP.GERMAN.STUG_III_G_SDKFZ_141_1","EBP.GERMAN.STUG_III_G_SDKFZ_141_1_MP","EBP.GERMAN.STUKA_AIR_RECON","EBP.GERMAN.STUKA_AIR_RECON_MP","EBP.GERMAN.STUKA_BOMBING_DIVE","EBP.GERMAN.STUKA_BOMBING_DIVE_MP","EBP.GERMAN.STUKA_BOMBING_RUN_SP","EBP.GERMAN.STUKA_FRAGEMENTATION_BOMB","EBP.GERMAN.STUKA_FRAGEMENTATION_BOMB_MP","EBP.GERMAN.STUKA_GROUND_ATTACK","EBP.GERMAN.STUKA_GROUND_ATTACK_LONG","EBP.GERMAN.STUKA_GROUND_ATTACK_M09","EBP.GERMAN.STUKA_GROUND_ATTACK_MP","EBP.GERMAN.STUKA_GROUND_ATTACK_WEST_AIRBORNE_ASSAULT","EBP.GERMAN.STUKA_INCENDIARY_BOMB","EBP.GERMAN.STUKA_INCENDIARY_BOMB_VICTORY","EBP.GERMAN.STUKA_JU87_ANTI_TANK","EBP.GERMAN.STUKA_JU87_ANTI_TANK_M06","EBP.GERMAN.STUKA_JU87_ANTI_TANK_MP","EBP.GERMAN.STUKA_JU87_ANTI_TANK_SUPERIORITY","EBP.GERMAN.STUKA_SMOKE_BOMB","EBP.GERMAN.STUKA_SMOKE_BOMB_MP","EBP.GERMAN.SUPPLY_TRUCK_METAL_M_01","EBP.GERMAN.SUPPLY_TRUCK_METAL_M_02","EBP.GERMAN.SUPPLY_TRUCK_MUNITIONS_CASE_AX_01","EBP.GERMAN.SUPPLY_TRUCK_MUNITIONS_CASE_AX_03","EBP.GERMAN.SUPPLY_TRUCK_SANDBAG_PILE_02","EBP.GERMAN.TACTICAL_BOMBER","EBP.GERMAN.TACTICAL_BOMBER_ACCURATE","EBP.GERMAN.TANK_TRAP","EBP.GERMAN.TELLER_MINE_MP","EBP.GERMAN.TIER1_MARKER","EBP.GERMAN.TIER2_MARKER","EBP.GERMAN.TIER3_MARKER","EBP.GERMAN.TIER4_MARKER","EBP.GERMAN.TIGER_ACE_SDKFZ_181_MP","EBP.GERMAN.TIGER_SDKFZ_181","EBP.GERMAN.TIGER_SDKFZ_181_MP","EBP.GERMAN.TIGER_SDKFZ_181_SINGLEPLAYER_MISSION","EBP.GERMAN.TIGER_SDKFZ_181_TOW","EBP.GERMAN.URBAN_ASSAULT_PANZER_GRENADIERS_MP","SBP.GERMAN.ASSAULT_GRENADIER_SQUAD_MP","SBP.GERMAN.ASSAULT_OFFICER_SQUAD","SBP.GERMAN.ASSAULT_OFFICER_SQUAD_MP","SBP.GERMAN.BRUMMBAR_SQUAD","SBP.GERMAN.BRUMMBAR_SQUAD_MP","SBP.GERMAN.CARGO_PLANE","SBP.GERMAN.CARGO_PLANE_FUEL","SBP.GERMAN.CARGO_PLANE_MUNITIONS","SBP.GERMAN.COMMAND_OFFICER_SQUAD_TOW","SBP.GERMAN.CONVOY_PIONEER_SQUAD","SBP.GERMAN.ELEFANT_TANK_DESTROYER_SQUAD","SBP.GERMAN.ELEFANT_TANK_DESTROYER_SQUAD_MP","SBP.GERMAN.GRENADIER_SQUAD","SBP.GERMAN.GRENADIER_SQUAD_M14","SBP.GERMAN.GRENADIER_SQUAD_MG42LMG_MP","SBP.GERMAN.GRENADIER_SQUAD_MP","SBP.GERMAN.GRENADIER_SQUAD_SP","SBP.GERMAN.HACK_INVISI_PIONEER_SQUAD_MP","SBP.GERMAN.HOWITZER_105MM_DUMMY_SQUAD","SBP.GERMAN.HOWITZER_105MM_LE_FH18_ARTILLERY","SBP.GERMAN.HOWITZER_105MM_LE_FH18_ARTILLERY_MP","SBP.GERMAN.LUFTWAFFE_OFFICER_SQUAD_TOW","SBP.GERMAN.M01_MG42_HEAVY_MACHINE_GUN_SQUAD_SINGLE","SBP.GERMAN.M01_STUKA_DOGFIGHT","SBP.GERMAN.M01_STUKA_GROUND_ATTACK_SQUAD_FAST","SBP.GERMAN.MECHANIZED_250_HALFTRACK_GRENADIERS_MP","SBP.GERMAN.MECHANIZED_250_HALFTRACK_MP","SBP.GERMAN.MECHANIZED_250_HALFTRACK_TOW","SBP.GERMAN.MG42_HEAVY_MACHINE_GUN_SQUAD","SBP.GERMAN.MG42_HEAVY_MACHINE_GUN_SQUAD_MP","SBP.GERMAN.MORTAR_250_HALFTRACK_SQUAD","SBP.GERMAN.MORTAR_250_HALFTRACK_SQUAD_MP","SBP.GERMAN.MORTAR_TEAM_81MM","SBP.GERMAN.MORTAR_TEAM_81MM_MP","SBP.GERMAN.OFFICER_SQUAD","SBP.GERMAN.OFFICER_SQUAD_MP","SBP.GERMAN.OPEL_BLITZ_SQUAD","SBP.GERMAN.OPEL_BLITZ_SUPPLY_SQUAD","SBP.GERMAN.OSTRUPPEN_SQUAD","SBP.GERMAN.OSTRUPPEN_SQUAD_M14","SBP.GERMAN.OSTRUPPEN_SQUAD_MP","SBP.GERMAN.OSTRUPPEN_SQUAD_RESERVES_MP","SBP.GERMAN.OSTWIND_SQUAD","SBP.GERMAN.OSTWIND_SQUAD_MP","SBP.GERMAN.PAK40_75MM_AT_GUN_SQUAD","SBP.GERMAN.PAK40_75MM_AT_GUN_SQUAD_MP","SBP.GERMAN.PAK43_88MM_AT_GUN_SQUAD","SBP.GERMAN.PAK43_88MM_AT_GUN_SQUAD_MP","SBP.GERMAN.PANTHER_SQUAD","SBP.GERMAN.PANTHER_SQUAD_MP","SBP.GERMAN.PANZER_GRENADIER_SQUAD","SBP.GERMAN.PANZER_GRENADIER_SQUAD_M14","SBP.GERMAN.PANZER_GRENADIER_SQUAD_MP","SBP.GERMAN.PANZER_IV_COMMAND_SQUAD","SBP.GERMAN.PANZER_IV_COMMAND_SQUAD_MP","SBP.GERMAN.PANZER_IV_SQUAD","SBP.GERMAN.PANZER_IV_SQUAD_MP","SBP.GERMAN.PANZER_IV_SQUAD_TUTORIAL","SBP.GERMAN.PANZER_IV_STUBBY_SQUAD","SBP.GERMAN.PANZER_IV_STUBBY_SQUAD_MP","SBP.GERMAN.PANZER_MG_SQUAD","SBP.GERMAN.PANZERWERFER_SQUAD","SBP.GERMAN.PANZERWERFER_SQUAD_MP","SBP.GERMAN.PARTISAN_SQUAD_M13","SBP.GERMAN.PIONEER_SQUAD","SBP.GERMAN.PIONEER_SQUAD_MP","SBP.GERMAN.PIONEER_SQUAD_TOW","SBP.GERMAN.PUMA_EAST_GERMAN_MP","SBP.GERMAN.SCOUTCAR_SDKFZ222","SBP.GERMAN.SCOUTCAR_SDKFZ222_MP","SBP.GERMAN.SDKFZ_221_LIGHT_AT_HALFTRACK","SBP.GERMAN.SDKFZ_251_HALFTRACK_SQUAD","SBP.GERMAN.SDKFZ_251_HALFTRACK_SQUAD_MP","SBP.GERMAN.SNIPER_SQUAD","SBP.GERMAN.SNIPER_SQUAD_MP","SBP.GERMAN.STORMTROOPER_SQUAD_MP","SBP.GERMAN.STUG_III_E_COMMANDER_SQUAD_MP","SBP.GERMAN.STUG_III_E_SQUAD","SBP.GERMAN.STUG_III_E_SQUAD_MP","SBP.GERMAN.STUG_III_SQUAD","SBP.GERMAN.STUG_III_SQUAD_MP","SBP.GERMAN.STUKA_AIR_CAP_SQUAD","SBP.GERMAN.STUKA_AIR_CAP_SQUAD_MP","SBP.GERMAN.STUKA_GROUND_ANTI_TANK_SQUAD","SBP.GERMAN.STUKA_GROUND_ANTI_TANK_SQUAD_M06","SBP.GERMAN.STUKA_GROUND_ANTI_TANK_SQUAD_MP","SBP.GERMAN.STUKA_GROUND_ANTI_TANK_SQUAD_SUPERIORITY","SBP.GERMAN.STUKA_GROUND_ATTACK_SQUAD","SBP.GERMAN.STUKA_GROUND_ATTACK_SQUAD_LONG","SBP.GERMAN.STUKA_GROUND_ATTACK_SQUAD_M09","SBP.GERMAN.STUKA_GROUND_ATTACK_SQUAD_MP","SBP.GERMAN.STUKA_GROUND_ATTACK_WEST_GERMANS_SQUAD","SBP.GERMAN.STUKA_GROUND_FRAGMENTATION_SQUAD","SBP.GERMAN.STUKA_GROUND_FRAGMENTATION_SQUAD_MP","SBP.GERMAN.STUKA_INCENDIARY_BOMB_SQUAD","SBP.GERMAN.STUKA_INCENDIARY_BOMB_VICTORY_SQUAD","SBP.GERMAN.STUKA_SMOKE_SQUAD","SBP.GERMAN.STUKA_SMOKE_SQUAD_MP","SBP.GERMAN.TACTICAL_BOMBERS","SBP.GERMAN.TACTICAL_BOMBERS_ACCURATE","SBP.GERMAN.TIGER_ACE_SQUAD_MP","SBP.GERMAN.TIGER_SQUAD","SBP.GERMAN.TIGER_SQUAD_MP","SBP.GERMAN.TIGER_SQUAD_SP_A2_M02","SBP.GERMAN.TIGER_SQUAD_TOW","SBP.GERMAN.URBAN_ASSAULT_PANZER_GRENADIER_SQUAD_MP","ABILITY.GERMAN.AIR_DROPPED_MEDICAL_SUPPLIES","ABILITY.GERMAN.AIR_DROPPED_MUNITIONS","ABILITY.GERMAN.AMBUSH_CAMO_HOLD_FIRE_MP","ABILITY.GERMAN.AMBUSH_CAMOUFLAGE","ABILITY.GERMAN.AMBUSH_CAMOUFLAGE_AT","ABILITY.GERMAN.AMBUSH_CAMOUFLAGE_MORTAR","ABILITY.GERMAN.AMBUSH_CAMOUFLAGE_PIO","ABILITY.GERMAN.AMBUSH_CAMOUFLAGE_UNLOCK","ABILITY.GERMAN.AMBUSH_CAMOUFLAGE_UPGRADE","ABILITY.GERMAN.ARMOR_COMMANDER","ABILITY.GERMAN.ASSAULT_FIELD_OFFICER","ABILITY.GERMAN.ASSAULT_GRENADIER_GRENADE","ABILITY.GERMAN.ASSAULT_GRENADIER_SPRINT_MP","ABILITY.GERMAN.ASSAULT_GRENADIERS","ABILITY.GERMAN.ASSAULT_OFFICER_INSPIRATION","ABILITY.GERMAN.ASSAULT_OFFICER_INSPIRATION_VET3","ABILITY.GERMAN.ASSAULT_OFFICER_VICTOR_TARGET","ABILITY.GERMAN.AXIS_SNIPER_DELAYED_COVER_AUTO_CAMOUFLAGE_MP","ABILITY.GERMAN.BLINDING_GRENADE","ABILITY.GERMAN.BLINDING_GRENADES_UNLOCK","ABILITY.GERMAN.BREAKTHROUGH","ABILITY.GERMAN.BRUMMBAR_BUNKER_BUSTER_MP","ABILITY.GERMAN.BRUMMBAR_CRITICAL_SHOTS_MP","ABILITY.GERMAN.BRUMMBAR_HOLD_FIRE_MP","ABILITY.GERMAN.CAMOUFLAGE_NETS","ABILITY.GERMAN.CAMOUFLAGE_NETS_UNLOCK","ABILITY.GERMAN.COMMAND_PANTHER_MARK_TARGET","ABILITY.GERMAN.CONVERT_TANK_WRECK","ABILITY.GERMAN.CONVERT_TANK_WRECK_UNLOCK","ABILITY.GERMAN.COUNTERATTACK_TACTICS","ABILITY.GERMAN.CRUSH_THE_POCKET","ABILITY.GERMAN.DEFENSIVE_FORTIFICATIONS","ABILITY.GERMAN.ELEFANT_CRITICAL_SHOTS_MP","ABILITY.GERMAN.ELEFANT_UNLOCK","ABILITY.GERMAN.ELEPHANT_CONE_LOS_TOGGLE_ABILITY","ABILITY.GERMAN.ELEPHANT_CONE_LOS_TOGGLE_ABILITY_MP","ABILITY.GERMAN.FAST_MARCH","ABILITY.GERMAN.FATALITY_PANZERWERFER_BARRAGE","ABILITY.GERMAN.FATALITY_SMOKE_BARRAGE","ABILITY.GERMAN.FATALITY_STUKA_INCENDIARY_AIRSTRIKE","ABILITY.GERMAN.FATALITY_STUKA_SMOKE_STRAFE_AIRSTRIKE","ABILITY.GERMAN.FORWARD_REPAIR_STATION","ABILITY.GERMAN.GERMAN_HQ_PIONEER_CALL_IN","ABILITY.GERMAN.GERMAN_HULLDOWN_ABILITY","ABILITY.GERMAN.GERMAN_HULLDOWN_DISABLE","ABILITY.GERMAN.GERMAN_MORTAR_HOLD_FIRE","ABILITY.GERMAN.GERMAN_MORTAR_HOLD_FIRE_MP","ABILITY.GERMAN.GERMAN_SALVAGE_ABILITY","ABILITY.GERMAN.GERMAN_SALVAGE_ABILITY_CONVOY","ABILITY.GERMAN.GERMAN_SALVAGE_ABILITY_MP","ABILITY.GERMAN.GERMAN_WARNING_SMOKE","ABILITY.GERMAN.GOLIATH_IN_COVER_AUTO_CAMOUFLAGE_MP","ABILITY.GERMAN.GOLIATH_SELF_DESTRUCT_MP","ABILITY.GERMAN.GRENADIER_ANTITANK_RIFLE_GRENADE_ABILITY","ABILITY.GERMAN.GRENADIER_ANTITANK_RIFLE_GRENADE_ABILITY_MP","ABILITY.GERMAN.GRENADIER_PANZERFAUST","ABILITY.GERMAN.GRENADIER_PANZERFAUST_MP","ABILITY.GERMAN.GRENADIER_RIFLE_GRENADE_ABILITY","ABILITY.GERMAN.GRENADIER_RIFLE_GRENADE_ABILITY_MP","ABILITY.GERMAN.GRENADIER_RIFLE_GRENADE_ABILITY_TUTORIAL","ABILITY.GERMAN.HALFTRACK_INCENDIARY_MORTAR_BARRAGE","ABILITY.GERMAN.HALFTRACK_INCENDIARY_MORTAR_BARRAGE_MP","ABILITY.GERMAN.HALFTRACK_MORTAR_BARRAGE","ABILITY.GERMAN.HALFTRACK_MORTAR_BARRAGE_MP","ABILITY.GERMAN.HALFTRACK_MORTAR_VICTORTARGET_BARRAGE_MP","ABILITY.GERMAN.HALFTRACK_SMOKE_BARRAGE","ABILITY.GERMAN.HALFTRACK_SMOKE_BARRAGE_MP","ABILITY.GERMAN.HEAVY_AT_MINE_UNLOCK","ABILITY.GERMAN.HOWITZER_105MM_BARRAGE_ABILITY","ABILITY.GERMAN.HOWITZER_105MM_BARRAGE_ABILITY_MP","ABILITY.GERMAN.HOWITZER_105MM_BARRAGE_VET3_ABILITY_MP","ABILITY.GERMAN.HOWITZER_105MM_EMPLACEMENT_UNLOCK","ABILITY.GERMAN.HOWITZER_105MM_VICTORTARGET_BARRAGE_ABILITY_MP","ABILITY.GERMAN.HOWITZER_COUNTER_BARRAGE_ATTACK_MP","ABILITY.GERMAN.HOWITZER_COUNTER_BARRAGE_MP","ABILITY.GERMAN.HOWITZER_DEFAULT_REFACE_ACTION","ABILITY.GERMAN.HULL_DOWN_UNLOCK","ABILITY.GERMAN.INFANTRY_MEDKITS","ABILITY.GERMAN.INFANTRY_MEDKITS_MP","ABILITY.GERMAN.JAEGER_INFANTRY_UNLOCK","ABILITY.GERMAN.JAEGER_INTERROGATION","ABILITY.GERMAN.LAY_HEAVY_AT_MINE","ABILITY.GERMAN.LIGHT_SUPPORT_ARTILLERY","ABILITY.GERMAN.MECHANIZED_ASSAULT_GROUP","ABILITY.GERMAN.MECHANIZED_GRENADIER_GROUP","ABILITY.GERMAN.MG42_CAMO_HOLD_FIRE_MP","ABILITY.GERMAN.MG42_PHOSPHORUS_ROUNDS","ABILITY.GERMAN.MG42_PHOSPHORUS_ROUNDS_MP","ABILITY.GERMAN.MORTAR_COUNTER_BARRAGE_ATTACK_MP","ABILITY.GERMAN.MORTAR_COUNTER_BARRAGE_MP","ABILITY.GERMAN.MORTAR_COUNTER_BARRAGE_WEAPON_MP","ABILITY.GERMAN.MORTAR_HALFTRACK","ABILITY.GERMAN.MORTAR_INCENDIARY_BARRAGE","ABILITY.GERMAN.MORTAR_TEAM_INCENDIARY_BARRAGE_MP","ABILITY.GERMAN.MORTAR_TEAM_MORTAR_BARRAGE","ABILITY.GERMAN.MORTAR_TEAM_MORTAR_BARRAGE_MP","ABILITY.GERMAN.MORTAR_TEAM_MORTAR_VICTORTARGET_BARRAGE_MP","ABILITY.GERMAN.MORTAR_TEAM_SMOKE_BARRAGE","ABILITY.GERMAN.MORTAR_TEAM_SMOKE_BARRAGE_MP","ABILITY.GERMAN.MUNITIONS_BLITZ","ABILITY.GERMAN.OFFICER_SMOKE_ARTILLERY","ABILITY.GERMAN.OPEL_SUPPLY_TERRITORY_CHECK","ABILITY.GERMAN.OSTRUPPEN","ABILITY.GERMAN.OSTRUPPEN_COVER_BONUS","ABILITY.GERMAN.OSTRUPPEN_RESERVES","ABILITY.GERMAN.PAK_43_EMPLACEMENT_UNLOCK","ABILITY.GERMAN.PAK40_CRITICAL_SHOTS_MP","ABILITY.GERMAN.PAK40_TARGET_WEAK_POINT_MP","ABILITY.GERMAN.PAK43_CRITICAL_SHOTS_MP","ABILITY.GERMAN.PAK43_TARGET_WEAK_POINT_MP","ABILITY.GERMAN.PANTHER_TIGER_BLITZKRIEG_MP","ABILITY.GERMAN.PANZER_COMMANDER_AURA_MP","ABILITY.GERMAN.PANZER_DEFENSIVE_SMOKE","ABILITY.GERMAN.PANZER_GRENADIER_BUNDLED_CAMPAIGN","ABILITY.GERMAN.PANZER_GRENADIER_BUNDLED_GRENADE","ABILITY.GERMAN.PANZER_GRENADIER_BUNDLED_GRENADE_MP","ABILITY.GERMAN.PANZER_GRENADIER_BUNDLED_TUTORIAL","ABILITY.GERMAN.PANZER_PANTHER_TIGER_DEFENSIVE_SMOKE_TOW","ABILITY.GERMAN.PANZER_PANTHER_TIGER_OSTWIND_BLITZKRIEG","ABILITY.GERMAN.PANZER_PANTHER_TIGER_OSTWIND_BLITZKRIEG_MP","ABILITY.GERMAN.PANZER_PANTHER_TIGER_OSTWIND_BLITZKRIEG_TOW","ABILITY.GERMAN.PANZER_PANTHER_TIGER_OSTWIND_FLARES_ABILITY","ABILITY.GERMAN.PANZER_PANTHER_TIGER_OSTWIND_REPAIR_TOW","ABILITY.GERMAN.PANZER_TACTICIAN_UNLOCK","ABILITY.GERMAN.PANZERWERFER_COUNTER_BARRAGE_ATTACK_MP","ABILITY.GERMAN.PANZERWERFER_COUNTER_BARRAGE_MP","ABILITY.GERMAN.PANZERWERFER_ROCKET_BARRAGE","ABILITY.GERMAN.PANZERWERFER_ROCKET_BARRAGE_MP","ABILITY.GERMAN.PANZERWERFER_ROCKET_VICTORTARGET_BARRAGE_MP","ABILITY.GERMAN.PIONEER_BARBED_WIRE_CUTTING_ABILITY","ABILITY.GERMAN.PIONEER_BARBED_WIRE_CUTTING_ABILITY_MP","ABILITY.GERMAN.PIONEER_FLAMETHROWER","ABILITY.GERMAN.PUMA_CRITICAL_SHOTS_MP","ABILITY.GERMAN.PUMA_DISPATCH","ABILITY.GERMAN.RAILWAY_GUN_ARTILLERY","ABILITY.GERMAN.REDISTRIBUTE_RESOURCES","ABILITY.GERMAN.RELIEF_INFANTRY","ABILITY.GERMAN.REMOVE_AMBUSH_CAMOUFLAGE","ABILITY.GERMAN.RESOURCE_REQUISITION","ABILITY.GERMAN.RETREAT_TO_FORWARD_HQ","ABILITY.GERMAN.SCOUT_CAR_HALFTRACK_INFANTRY_AWARENESS","ABILITY.GERMAN.SCOUT_CAR_HALFTRACK_INFANTRY_AWARENESS_MP","ABILITY.GERMAN.SDKFZ_221_LIGHT_AT_HALFTRACK","ABILITY.GERMAN.SECTOR_ARTILLERY","ABILITY.GERMAN.SNIPER_INCENDIARY_ROUND_MP","ABILITY.GERMAN.SPRINT","ABILITY.GERMAN.STATIONARY_LOS_UNLOCK","ABILITY.GERMAN.STORMTROOPER_ASSAULT_AMBUSH_MP","ABILITY.GERMAN.STORMTROOPER_SPRINT_MP","ABILITY.GERMAN.STORMTROOPER_TANK_DETECTION_MP","ABILITY.GERMAN.STORMTROOPERS","ABILITY.GERMAN.STRATEGIC_BOMBING","ABILITY.GERMAN.STUG_CRITICAL_SHOTS_MP","ABILITY.GERMAN.STUG_ELEFANT_PAK40_PAK43_BRUMMBAR_CRITICAL_SHOTS","ABILITY.GERMAN.STUG_ELEFANT_PAK40_PAK43_BRUMMBAR_CRITICAL_SHOTS_MP","ABILITY.GERMAN.STUG_III_E","ABILITY.GERMAN.STUKA_AERIAL_SUPERIORITY_CLOSE_AIR_SUPPORT","ABILITY.GERMAN.STUKA_AERIAL_SUPERIORITY_RECON","ABILITY.GERMAN.STUKA_AERIAL_SUPERIORITY_STRAFING_RUN","ABILITY.GERMAN.STUKA_AIR_RECON","ABILITY.GERMAN.STUKA_BOMBING_RUN_SP","ABILITY.GERMAN.STUKA_BOMBING_STRIKE","ABILITY.GERMAN.STUKA_BOMBING_STRIKE_TOW","ABILITY.GERMAN.STUKA_CLOSE_AIR_M06","ABILITY.GERMAN.STUKA_CLOSE_AIR_M06_MP","ABILITY.GERMAN.STUKA_CLOSE_AIR_SUPPORT","ABILITY.GERMAN.STUKA_FRAGMENTATION_BOMB","ABILITY.GERMAN.STUKA_INCENDIARY_BOMBS","ABILITY.GERMAN.STUKA_SMOKE_BOMB","ABILITY.GERMAN.STUKA_STRAFING_RUN","ABILITY.GERMAN.SUPPLY_BREAK","ABILITY.GERMAN.SUPPLY_TRUCK","ABILITY.GERMAN.SUPPLY_TRUCK_LOCKDOWN","ABILITY.GERMAN.SUPPORT_TEAM_AMBUSH_CAMOUFLAGE","ABILITY.GERMAN.TANK_AWARENESS_UNLOCK","ABILITY.GERMAN.TANK_DETECTION_ABILITY_CONVOY","ABILITY.GERMAN.TIGER_ACE_CRITICAL_SHOTS_MP","ABILITY.GERMAN.TIGER_TANK","ABILITY.GERMAN.TIGER_TANK_ACE","ABILITY.GERMAN.TRENCH_UNLOCK","ABILITY.GERMAN.TROOP_TRAINING","ABILITY.GERMAN.URBAN_ASSAULT_GRENADIERS","ABILITY.GERMAN.URBAN_ASSAULT_SATCHEL_CHARGE_THROW_ABILITY_MP","ABILITY.GERMAN.URBAN_ASSAULT_SMOKE_GRENADE","ABILITY.GERMAN.URBAN_ASSAULT_SMOKE_GRENADE_2","ABILITY.GERMAN.WEHR_VEHICLE_HOLD_FIRE_MP","UPG.GERMAN.AERIAL_SUPERIORITY_RECON_PLANE","UPG.GERMAN.AERIAL_SUPERIORITY_STUKA_CLOSE_AIR_SUPPORT","UPG.GERMAN.AERIAL_SUPERIORITY_STUKA_STRAFE","UPG.GERMAN.AIR_DROP_MEDICAL_SUPPLIES","UPG.GERMAN.AIR_DROP_RESOURCES","UPG.GERMAN.AMBUSH_CAMOU_PACKAGE","UPG.GERMAN.AMBUSH_CAMOUFLAGE","UPG.GERMAN.ARMOR_COMMANDER","UPG.GERMAN.ASSAULT_ARCHETYPE","UPG.GERMAN.ASSAULT_FIELD_OFFICER","UPG.GERMAN.ASSAULT_GRENADIERS","UPG.GERMAN.BATTLE_PHASE_2","UPG.GERMAN.BATTLE_PHASE_2_MP","UPG.GERMAN.BATTLE_PHASE_3","UPG.GERMAN.BATTLE_PHASE_3_MP","UPG.GERMAN.BATTLE_PHASE_4","UPG.GERMAN.BATTLE_PHASE_4_MP","UPG.GERMAN.BLINDING_GRENADES","UPG.GERMAN.BREAKTHROUGH","UPG.GERMAN.BRUMMBAR_TOP_GUNNER","UPG.GERMAN.BRUMMBAR_TOP_GUNNER_MP","UPG.GERMAN.BUNKER_COMMAND","UPG.GERMAN.BUNKER_COMMAND_MP","UPG.GERMAN.BUNKER_MEDIC_STATION","UPG.GERMAN.BUNKER_MEDIC_STATION_MP","UPG.GERMAN.BUNKER_MG42_ADDITION","UPG.GERMAN.BUNKER_MG42_ADDITION_MP","UPG.GERMAN.CAMOUFLAGE_NET_ACTIVATED","UPG.GERMAN.CAMOUFLAGE_NETS","UPG.GERMAN.CAN_CAMOUFLAGE","UPG.GERMAN.COUNTERATTACK_TACTICS","UPG.GERMAN.CRUSH_THE_POCKET","UPG.GERMAN.DEFENSIVE_FORTIFICATIONS","UPG.GERMAN.ELEFANT_UNLOCK","UPG.GERMAN.FAST_MARCH","UPG.GERMAN.FESTUNG_ARCHETYPE","UPG.GERMAN.FORWARD_REPAIR_STATION","UPG.GERMAN.GRENADIER_MG42_LMG","UPG.GERMAN.GRENADIER_MG42_LMG_MP","UPG.GERMAN.HEAVY_AT_MINE","UPG.GERMAN.HOWITZER_105MM_EMPLACEMENT","UPG.GERMAN.HOWITZER_COUNTER_BARRAGE_COOLDOWN_MP","UPG.GERMAN.HULL_DOWN","UPG.GERMAN.HULLDOWN_ACTIVATED","UPG.GERMAN.HULLDOWN_CONSTRUCTING","UPG.GERMAN.JAEGER_ARCHETYPE","UPG.GERMAN.JAEGER_LIGHT_INFANTRY","UPG.GERMAN.LIGHT_ARTILLERY_SUPPORT","UPG.GERMAN.LIGHT_INFANTRY_PACKAGE","UPG.GERMAN.LIGHT_INFANTRY_PANZERGREN_PACKAGE","UPG.GERMAN.MECHANIZED_GRENADIER_GROUP","UPG.GERMAN.MECHANIZED_GROUP","UPG.GERMAN.MG42_HOLDFIRE_CAMOUFLAGE_NET_ACTIVATED","UPG.GERMAN.MORTAR_COUNTER_BARRAGE_COOLDOWN_MP","UPG.GERMAN.MORTAR_COUNTER_BARRAGE_MP","UPG.GERMAN.MORTAR_HALFTRACK","UPG.GERMAN.MORTAR_HALFTRACK_250_UPGRADE","UPG.GERMAN.MORTAR_HALFTRACK_COUNTER_BARRAGE_COOLDOWN_MP","UPG.GERMAN.MORTAR_INCENDIARY_BARRAGE","UPG.GERMAN.MUNITION_BLITZ","UPG.GERMAN.OSTRUPPEN","UPG.GERMAN.OSTRUPPEN_RESERVES","UPG.GERMAN.PAK_43_EMPLACEMENT","UPG.GERMAN.PANTHER_TOP_GUNNER","UPG.GERMAN.PANTHER_TOP_GUNNER_MP","UPG.GERMAN.PANZER_GRENADIER_PANZERSHRECK_ATW_ITEM","UPG.GERMAN.PANZER_GRENADIER_PANZERSHRECK_ATW_ITEM_1_SCHREK_MP","UPG.GERMAN.PANZER_GRENADIER_PANZERSHRECK_ATW_ITEM_MP","UPG.GERMAN.PANZER_GRENADIER_PANZERSHRECK_ATW_ITEM_SECOND","UPG.GERMAN.PANZER_GRENADIER_PANZERSHRECK_ATW_ITEM_SECOND_MP","UPG.GERMAN.PANZER_GRENADIER_PANZERSHRECK_ATW_ITEM_THIRD_MP","UPG.GERMAN.PANZER_TACTICIAN","UPG.GERMAN.PANZER_TOP_GUNNER","UPG.GERMAN.PANZER_TOP_GUNNER_MP","UPG.GERMAN.PANZERBUSCHE_39","UPG.GERMAN.PANZERBUSCHE_39_MP","UPG.GERMAN.PANZERWERFER_COUNTER_BARRAGE_COOLDOWN_MP","UPG.GERMAN.PIONEER_FLAMETHROWER","UPG.GERMAN.PIONEER_FLAMETHROWER_MP","UPG.GERMAN.PIONEER_MINESWEEPER","UPG.GERMAN.PIONEER_MINESWEEPER_MP","UPG.GERMAN.PUMA_DISPATCH","UPG.GERMAN.RAILWAY_ARTILLERY_SUPPORT","UPG.GERMAN.RECON_PLANE","UPG.GERMAN.REDISTRIBUTE_RESOURCES","UPG.GERMAN.RELIEF_INFANTRY","UPG.GERMAN.SDKFZ_222_20MM_GUN","UPG.GERMAN.SDKFZ_222_20MM_GUN_MP","UPG.GERMAN.SDKFZ_251_HALFTRACK_FLAMMPANZERWAGEN_UPGRADE","UPG.GERMAN.SDKFZ_251_HALFTRACK_FLAMMPANZERWAGEN_UPGRADE_MP","UPG.GERMAN.SDKFZ_251_HALFTRACK_MOBILE_MEDIC_STATION_UPGRADE","UPG.GERMAN.SECTOR_ARTILLERY","UPG.GERMAN.SPRINT","UPG.GERMAN.STATIONARY_LOS_GAIN","UPG.GERMAN.STORMTROOPER_ANTITANK_PACKAGE_MP","UPG.GERMAN.STORMTROOPER_ASSAULT_PACKAGE_MP","UPG.GERMAN.STORMTROOPER_PANZERSCHRECK_MP","UPG.GERMAN.STORMTROOPERS","UPG.GERMAN.STRATEGIC_BOMBING","UPG.GERMAN.STUG_III_E_UNLOCK","UPG.GERMAN.STUG_SHORT_BARREL","UPG.GERMAN.STUG_TOP_GUNNER","UPG.GERMAN.STUG_TOP_GUNNER_MP","UPG.GERMAN.STUKA_BOMBING_RUN_UPGRADE","UPG.GERMAN.STUKA_CLOSE_AIR_SUPPORT","UPG.GERMAN.STUKA_FLAME_STRIKE","UPG.GERMAN.STUKA_FRAGMENTATION_BOMB","UPG.GERMAN.STUKA_SMOKE_BOMB","UPG.GERMAN.STUKA_STRAFE","UPG.GERMAN.SUPPLY_BREAK","UPG.GERMAN.SUPPLY_TRUCK_ACTIVE","UPG.GERMAN.SUPPLY_TRUCK_EXIT","UPG.GERMAN.SUPPLY_TRUCK_FILL_STATE","UPG.GERMAN.SUPPLY_TRUCK_FULL","UPG.GERMAN.SUPPLY_TRUCK_LOCKDOWN","UPG.GERMAN.TANK_AWARENESS","UPG.GERMAN.TIGER_TANK","UPG.GERMAN.TIGER_TANK_ACE","UPG.GERMAN.TIGER_TANK_ACE_CALLIN_RESTRICTION","UPG.GERMAN.TIGER_TOP_GUNNER","UPG.GERMAN.TIGER_TOP_GUNNER_MP","UPG.GERMAN.TIGER_TOP_GUNNER_TOW","UPG.GERMAN.TOW_1941_GERMAN","UPG.GERMAN.TRENCH","UPG.GERMAN.TROOP_TRAINING","UPG.GERMAN.URBAN_ASSAULT_ARMOR_UPGRADE","UPG.GERMAN.URBAN_ASSAULT_PANZER_GRENADIERS","UPG.GERMAN.URBAN_ASSAULT_PANZER_GRENADIERS_FLAMETHROWER_MP","UPG.GERMAN.VEHICLES_OPTICS","UPG.GERMAN.XP1_GERMAN_DEMO_UPGRADE","EBP.PROXY.PROXY_MEDIC_MP","EBP.PROXY.PROXY_RIFLEMAN_SOLDIER_A","EBP.PROXY.PROXY_RIFLEMAN_SOLDIER_B","EBP.PROXY.PROXY_RIFLEMAN_SOLDIER_C","EBP.PROXY.PROXY_SNIPER_RECON_MP","SBP.PROXY.PROXY_HMG_SQUAD_MP","SBP.PROXY.PROXY_MECH_SQUAD_MP","SBP.PROXY.PROXY_RIFLEMEN_SQUAD_MP","SBP.PROXY.PROXY_SNIPER_SQUAD_MP","EBP.SOVIET._CIVILIAN_FEMALE","EBP.SOVIET._CIVILIAN_FEMALE_MP","EBP.SOVIET._CIVILIAN_MALE","EBP.SOVIET._CIVILIAN_MALE_MP","EBP.SOVIET.ANTI_PERSONNEL_MINES","EBP.SOVIET.ARTILLERY_203MM_B4","EBP.SOVIET.ATGUN53K_CREW","EBP.SOVIET.ATGUN53K_CREW_MP","EBP.SOVIET.ATGUNZIS_CREW","EBP.SOVIET.ATGUNZIS_CREW_MP","EBP.SOVIET.BARBED_WIRE_FENCE","EBP.SOVIET.BARBED_WIRE_FENCE_MP","EBP.SOVIET.BARBED_WIRE_FIELD","EBP.SOVIET.BARBED_WIRE_FIELD_MP","EBP.SOVIET.BARRACKS","EBP.SOVIET.BARRACKS_MP","EBP.SOVIET.BASE_CONSCRIPT_SOLDIER","EBP.SOVIET.BASE_CONSCRIPT_SOLDIER_MP","EBP.SOVIET.BOAT_01_ENTITY","EBP.SOVIET.CARGO_PLANE_SOVIET","EBP.SOVIET.COMBAT_ENGINEER","EBP.SOVIET.COMBAT_ENGINEER_MP","EBP.SOVIET.COMMISSAR","EBP.SOVIET.COMMISSAR_227","EBP.SOVIET.COMMISSAR_MP","EBP.SOVIET.COMMISSAR_OF_DEATH_227_MP","EBP.SOVIET.CONSCRIPT_SOLDIER","EBP.SOVIET.CONSCRIPT_SOLDIER_CONSCRIPT_BODYGUARD_MP","EBP.SOVIET.CONSCRIPT_SOLDIER_MP","EBP.SOVIET.DHSK_38_MACHINE_GUN","EBP.SOVIET.DHSK_38_MACHINE_GUN_MP","EBP.SOVIET.DSHK_WEAPON_CREW","EBP.SOVIET.DSHK_WEAPON_CREW_MP","EBP.SOVIET.FLARE_FIRE_MP","EBP.SOVIET.FLARE_MINE","EBP.SOVIET.FLARE_MINE_MP","EBP.SOVIET.FORWARD_HQ","EBP.SOVIET.GUARD_TROOPS","EBP.SOVIET.GUARD_TROOPS_ASSAULT_MP","EBP.SOVIET.GUARD_TROOPS_MP","EBP.SOVIET.HM_120_38_MORTAR","EBP.SOVIET.HM_120_38_MORTAR_MP","EBP.SOVIET.HOWITZER_CREW_SOVIET","EBP.SOVIET.HOWITZER_CREW_SOVIET_MP","EBP.SOVIET.HOWITZER_CREW203__SOVIET_MP","EBP.SOVIET.HQ","EBP.SOVIET.HQ_INVISIBLE_SP","EBP.SOVIET.HQ_MP","EBP.SOVIET.HQ_NO_WRECK","EBP.SOVIET.HQ_WRECK","EBP.SOVIET.HQ_WRECK_M06","EBP.SOVIET.HQ_WRECK_MP","EBP.SOVIET.IL_2_STURMOVIK","EBP.SOVIET.IL_2_STURMOVIK_ADVANCED_MP","EBP.SOVIET.IL_2_STURMOVIK_ANTI_TANK_BOMB_MP","EBP.SOVIET.IL_2_STURMOVIK_MARK_VEHICLE_MP","EBP.SOVIET.IL_2_STURMOVIK_MP","EBP.SOVIET.IL_2_STURMOVIK_RECON","EBP.SOVIET.IL_2_STURMOVIK_RECON_MP","EBP.SOVIET.IL_2_STURMOVIK_ROCKET","EBP.SOVIET.IL_2_STURMOVIK_ROCKET_MP","EBP.SOVIET.IL_2_STURMOVIK_ROCKET_SP","EBP.SOVIET.IL_2_STURMOVIK_VICTORY_MP","EBP.SOVIET.IS_2_HEAVY_TANK","EBP.SOVIET.IS_2_HEAVY_TANK_MP","EBP.SOVIET.ISAKOVICH_A01_COMMANDER","EBP.SOVIET.ISAKOVICH_M06","EBP.SOVIET.ISU_152_SPG","EBP.SOVIET.ISU_152_SPG_MP","EBP.SOVIET.KATYUSHA_BM_13N","EBP.SOVIET.KATYUSHA_BM_13N_MP","EBP.SOVIET.KV_1","EBP.SOVIET.KV_1_COMMANDER_MP","EBP.SOVIET.KV_1_MP","EBP.SOVIET.KV_2","EBP.SOVIET.KV_2_MP","EBP.SOVIET.KV_2_TOW","EBP.SOVIET.KV_8","EBP.SOVIET.KV_8_MP","EBP.SOVIET.LIGHT_ANTI_VEHICLE_MINES","EBP.SOVIET.M01_BASE_CONSCRIPT_SOLDIER","EBP.SOVIET.M01_BASE_CONSCRIPT_SOLDIER_DURABLE","EBP.SOVIET.M01_CONSCRIPT_SOLDIER","EBP.SOVIET.M01_CONSCRIPT_SOLDIER_DOCK","EBP.SOVIET.M01_CONSCRIPT_SOLDIER_HARMLESS","EBP.SOVIET.M01_CONSCRIPT_SOLDIER_HARMLESS_DURABLE","EBP.SOVIET.M01_IL_2_STURMOVIK_ROCKET","EBP.SOVIET.M01_IL2_DOGFIGHT","EBP.SOVIET.M01_MEDIC","EBP.SOVIET.M08_T_34_76_SMALLPATH","EBP.SOVIET.M08_TANK_BUSTER_CONSCRIPT","EBP.SOVIET.M11_ANIA_SNIPER","EBP.SOVIET.M11_ISAKOVICH_RECON","EBP.SOVIET.M11_PARTISAN_TROOP_KAR98K","EBP.SOVIET.M11_PARTISAN_TROOP_NAGANT","EBP.SOVIET.M11_PARTISAN_TROOP_NOWEAPON","EBP.SOVIET.M11_SNIPER","EBP.SOVIET.M11_SNIPER_RECON","EBP.SOVIET.M1910_MAXIM_HEAVY_MACHINE_GUN","EBP.SOVIET.M1910_MAXIM_HEAVY_MACHINE_GUN_MP","EBP.SOVIET.M1931_203MM_B_4_HOWITZER_ARTILLERY","EBP.SOVIET.M1931_203MM_B_4_HOWITZER_ARTILLERY_COMMANDER_MP","EBP.SOVIET.M1931_203MM_B_4_HOWITZER_ARTILLERY_MP","EBP.SOVIET.M1937_152MM_ML_20_ARTILLERY","EBP.SOVIET.M1937_152MM_ML_20_ARTILLERY_MP","EBP.SOVIET.M1937_53_K_45MM_AT_GUN","EBP.SOVIET.M1937_53_K_45MM_AT_GUN_MP","EBP.SOVIET.M1942_76MM_DIVISIONAL_GUN_ZIS_3","EBP.SOVIET.M1942_76MM_DIVISIONAL_GUN_ZIS_3_MP","EBP.SOVIET.M3A1_SCOUT_CAR","EBP.SOVIET.M3A1_SCOUT_CAR_MP","EBP.SOVIET.M5_HALFTRACK","EBP.SOVIET.M5_HALFTRACK_ASSAULT_MP","EBP.SOVIET.M5_HALFTRACK_MP","EBP.SOVIET.MACHINE_GUN_NEST","EBP.SOVIET.MACHINE_GUN_NEST_MP","EBP.SOVIET.MAXIM_WEAPON_CREW","EBP.SOVIET.MAXIM_WEAPON_CREW_MP","EBP.SOVIET.MEDIC","EBP.SOVIET.MEDIC_MP","EBP.SOVIET.MORTAR_120MM_WEAPON_CREW_MP","EBP.SOVIET.MORTAR_WEAPON_CREW","EBP.SOVIET.MORTAR_WEAPON_CREW_MP","EBP.SOVIET.MOTORPOOL","EBP.SOVIET.MOTORPOOL_MP","EBP.SOVIET.OBSERVATION_POST_FUEL","EBP.SOVIET.OBSERVATION_POST_FUEL_MP","EBP.SOVIET.OBSERVATION_POST_MUNITION","EBP.SOVIET.OBSERVATION_POST_MUNITION_MP","EBP.SOVIET.PARTISAN_SNIPER","EBP.SOVIET.PARTISAN_TROOP_KAR98K","EBP.SOVIET.PARTISAN_TROOP_KAR98K_2","EBP.SOVIET.PARTISAN_TROOP_KAR98K_2_MP","EBP.SOVIET.PARTISAN_TROOP_KAR98K_MP","EBP.SOVIET.PARTISAN_TROOP_KAR98K_TOW_BD","EBP.SOVIET.PARTISAN_TROOP_KAR98K_TOW_MP","EBP.SOVIET.PARTISAN_TROOP_NAGANT","EBP.SOVIET.PARTISAN_TROOP_NAGANT_MP","EBP.SOVIET.PARTISAN_TROOP_NAGANT_TOW_MP","EBP.SOVIET.PARTISAN_TROOPS_ANTITANK","EBP.SOVIET.PARTISAN_TROOPS_LMG","EBP.SOVIET.PARTISAN_TROOPS_RIFLE","EBP.SOVIET.PARTISAN_TROOPS_SMG","EBP.SOVIET.PENAL_BATTALION_TROOPS","EBP.SOVIET.PENAL_BATTALION_TROOPS_MP","EBP.SOVIET.PM41_82MM_MORTAR","EBP.SOVIET.PM41_82MM_MORTAR_MP","EBP.SOVIET.REFUGEE_FEMALE","EBP.SOVIET.REFUGEE_FEMALE_MP","EBP.SOVIET.REFUGEE_MALE","EBP.SOVIET.REFUGEE_MALE_MP","EBP.SOVIET.REPAIR_ENGINEER","EBP.SOVIET.REPAIR_ENGINEER_MP","EBP.SOVIET.REPAIR_STATION_MP","EBP.SOVIET.SAND_BAG_SOVIET","EBP.SOVIET.SAND_BAG_SOVIET_MP","EBP.SOVIET.SAND_BAG_SOVIET_TUTORIAL","EBP.SOVIET.SHERMAN_SOVIET","EBP.SOVIET.SHOCK_TROOPS","EBP.SOVIET.SHOCK_TROOPS_MP","EBP.SOVIET.SNIPER","EBP.SOVIET.SNIPER_ATK_TARGET","EBP.SOVIET.SNIPER_MP","EBP.SOVIET.SNIPER_RECON","EBP.SOVIET.SNIPER_RECON_MP","EBP.SOVIET.SOVIET_ALLIED_CARGO_PLANE","EBP.SOVIET.SOVIET_BASE_STAMPER","EBP.SOVIET.SOVIET_MINE","EBP.SOVIET.SOVIET_MINE_M08","EBP.SOVIET.SOVIET_MINE_MP","EBP.SOVIET.SOVIET_MINE_SP","EBP.SOVIET.SOVIET_MINE_TOW","EBP.SOVIET.SOVIET_OFFICER","EBP.SOVIET.SOVIET_OFFICER_MP","EBP.SOVIET.STEAM_TRAIN","EBP.SOVIET.SU_76M","EBP.SOVIET.SU_76M_MP","EBP.SOVIET.SU_85","EBP.SOVIET.SU_85_MP","EBP.SOVIET.T_34_76","EBP.SOVIET.T_34_76_MP","EBP.SOVIET.T_34_85","EBP.SOVIET.T_34_85_MP","EBP.SOVIET.T_70M","EBP.SOVIET.T_70M_MP","EBP.SOVIET.TANK_DEPOT","EBP.SOVIET.TANK_DEPOT_MP","EBP.SOVIET.TANKTRAP","EBP.SOVIET.TOW_COLD_WEAETHER_GUARD_TROOPS","EBP.SOVIET.US6_TRUCK","EBP.SOVIET.US6_TRUCK_MP","EBP.SOVIET.WEAPON_SUPPORT_CENTER","EBP.SOVIET.WEAPON_SUPPORT_CENTER_MP","EBP.SOVIET.WIRE_FIELD","EBP.SOVIET.WIRE_FIELD_MP","EBP.SOVIET.ZIS_6_TRANSPORT","EBP.SOVIET.ZIS_6_TRANSPORT_MP","SBP.SOVIET.BASE_CONSCRIPT_SQUAD","SBP.SOVIET.BASE_CONSCRIPT_SQUAD_MP","SBP.SOVIET.BOAT_01","SBP.SOVIET.CARGO_PLANE_SOVIET","SBP.SOVIET.COMBAT_ENGINEER_SQUAD","SBP.SOVIET.COMBAT_ENGINEER_SQUAD_MP","SBP.SOVIET.COMMISSAR_227","SBP.SOVIET.COMMISSAR_SQUAD_BATTLE","SBP.SOVIET.COMMISSAR_SQUAD_MP","SBP.SOVIET.COMMISSAR_SQUAD_TOW","SBP.SOVIET.CONSCRIPT_SQUAD","SBP.SOVIET.CONSCRIPT_SQUAD_MP","SBP.SOVIET.CONSCRIPT_SQUAD_TUTORIAL","SBP.SOVIET.DSHK_38_HMG_SQUAD","SBP.SOVIET.DSHK_38_HMG_SQUAD_MP","SBP.SOVIET.GUARDS_TROOPS","SBP.SOVIET.GUARDS_TROOPS_ASSAULT_MP","SBP.SOVIET.GUARDS_TROOPS_M08","SBP.SOVIET.GUARDS_TROOPS_MP","SBP.SOVIET.HM_120_38_MORTAR_SQUAD","SBP.SOVIET.HM_120_38_MORTAR_SQUAD_MP","SBP.SOVIET.IL_2_STUMOVIK_SQUAD","SBP.SOVIET.IL_2_STUMOVIK_SQUAD_ADVANCED_MP","SBP.SOVIET.IL_2_STUMOVIK_SQUAD_MP","SBP.SOVIET.IL_2_STURMOVIK_ANTI_TANK_BOMB_SQUAD_MP","SBP.SOVIET.IL_2_STURMOVIK_MARK_VEHICLE_SQUAD_MP","SBP.SOVIET.IL_2_STURMOVIK_RECON_SQUAD","SBP.SOVIET.IL_2_STURMOVIK_RECON_SQUAD_MP","SBP.SOVIET.IL_2_STURMOVIK_RECON_SQUAD_SP","SBP.SOVIET.IL_2_STURMOVIK_ROCKET_SP_SQUAD","SBP.SOVIET.IL_2_STURMOVIK_ROCKET_SP_SQUAD_MP","SBP.SOVIET.IL_2_STURMOVIK_ROCKET_SQUAD","SBP.SOVIET.IL_2_STURMOVIK_ROCKET_SQUAD_MP","SBP.SOVIET.IS_2","SBP.SOVIET.IS_2_MP","SBP.SOVIET.IS_2_TOW","SBP.SOVIET.ISU_152","SBP.SOVIET.ISU_152_MP","SBP.SOVIET.KATYUSHA_BM_13N_SQUAD","SBP.SOVIET.KATYUSHA_BM_13N_SQUAD_MP","SBP.SOVIET.KV_1","SBP.SOVIET.KV_1_COMMANDER_MP","SBP.SOVIET.KV_1_MP","SBP.SOVIET.KV_1_SP","SBP.SOVIET.KV_2","SBP.SOVIET.KV_2_MP","SBP.SOVIET.KV_2_TOW","SBP.SOVIET.KV_2_TOW_BATTLE","SBP.SOVIET.KV_8","SBP.SOVIET.KV_8_MP","SBP.SOVIET.M01_CONSCRIPT_SQUAD_DOCKS","SBP.SOVIET.M01_CONSCRIPT_SQUAD_HARMLESS","SBP.SOVIET.M01_CONSCRIPT_SQUAD_HARMLESS_DURABLE","SBP.SOVIET.M01_CONSCRIPT_SQUAD_WOUNDED","SBP.SOVIET.M01_IL_2_STURMOVIK_ROCKET_SQUAD","SBP.SOVIET.M01_IL2_DOGFIGHT","SBP.SOVIET.M01_MEDIC","SBP.SOVIET.M02_COMBAT_ENGINEER_SQUAD","SBP.SOVIET.M02_REFUGEE_SQUAD","SBP.SOVIET.M08_COMBAT_ENGINEER_SQUAD","SBP.SOVIET.M08_T_34_76_SQUAD_SMALLPATH","SBP.SOVIET.M08_TANK_BUSTER_CONSCRIPT_SQUAD","SBP.SOVIET.M11_ANIA_SNIPER_SQUAD","SBP.SOVIET.M11_ISAKOVICH_SQUAD","SBP.SOVIET.M11_PARTISAN_SQUAD_KAR98K_RIFLE","SBP.SOVIET.M11_PARTISAN_SQUAD_NAGANT_RIFLE","SBP.SOVIET.M11_PARTISAN_SQUAD_NOWEAPON","SBP.SOVIET.M11_SNIPER_TEAM","SBP.SOVIET.M1910_MAXIM_HEAVY_MACHINE_GUN_SQUAD","SBP.SOVIET.M1910_MAXIM_HEAVY_MACHINE_GUN_SQUAD_MP","SBP.SOVIET.M1931_203MM_B_4_HOWITZER_ARTILLERY","SBP.SOVIET.M1931_203MM_B_4_HOWITZER_ARTILLERY_COMMANDER_MP","SBP.SOVIET.M1931_203MM_B_4_HOWITZER_ARTILLERY_MP","SBP.SOVIET.M1937_152MM_ML_20_ARTILLERY","SBP.SOVIET.M1937_152MM_ML_20_ARTILLERY_MP","SBP.SOVIET.M1937_53_K_45MM_AT_GUN_SQUAD","SBP.SOVIET.M1937_53_K_45MM_AT_GUN_SQUAD_MP","SBP.SOVIET.M1942_ZIS_3_76MM_AT_GUN_SQUAD","SBP.SOVIET.M1942_ZIS_3_76MM_AT_GUN_SQUAD_MP","SBP.SOVIET.M3A1_SCOUT_CAR_SQUAD","SBP.SOVIET.M3A1_SCOUT_CAR_SQUAD_MP","SBP.SOVIET.M5_HALFTRACK__ASSAULT_SQUAD_MP","SBP.SOVIET.M5_HALFTRACK_SQUAD","SBP.SOVIET.M5_HALFTRACK_SQUAD_MP","SBP.SOVIET.PARTISAN_SQUAD_GRANATEWERFER_34_81MM_MORTAR","SBP.SOVIET.PARTISAN_SQUAD_GRANATEWERFER_34_81MM_MORTAR_MP","SBP.SOVIET.PARTISAN_SQUAD_KAR98K_RIFLE","SBP.SOVIET.PARTISAN_SQUAD_KAR98K_RIFLE_MP","SBP.SOVIET.PARTISAN_SQUAD_MAXIM_HMG","SBP.SOVIET.PARTISAN_SQUAD_MAXIM_HMG_MP","SBP.SOVIET.PARTISAN_SQUAD_MG42_HMG","SBP.SOVIET.PARTISAN_SQUAD_MG42_HMG_MP","SBP.SOVIET.PARTISAN_SQUAD_NAGANT_RIFLE","SBP.SOVIET.PARTISAN_SQUAD_NAGANT_RIFLE_MP","SBP.SOVIET.PARTISAN_SQUAD_PM_82_41_MORTAR","SBP.SOVIET.PARTISAN_SQUAD_PM_82_41_MORTAR_MP","SBP.SOVIET.PARTISANS_LMG_MP","SBP.SOVIET.PARTISANS_PANZERSCHRECK_MP","SBP.SOVIET.PARTISANS_PTRS_MP","SBP.SOVIET.PARTISANS_RIFLE_MP","SBP.SOVIET.PARTISANS_SMG_MP","SBP.SOVIET.PENAL_BATTALION","SBP.SOVIET.PENAL_BATTALION_MP","SBP.SOVIET.PM_82_41_MORTAR_SQUAD","SBP.SOVIET.PM_82_41_MORTAR_SQUAD_MP","SBP.SOVIET.SHOCK_TROOPS","SBP.SOVIET.SHOCK_TROOPS_M11","SBP.SOVIET.SHOCK_TROOPS_MP","SBP.SOVIET.SNIPER_TEAM","SBP.SOVIET.SNIPER_TEAM_MALE","SBP.SOVIET.SNIPER_TEAM_MP","SBP.SOVIET.SOVIET_76MM_SHERMAN_MP","SBP.SOVIET.SOVIET_ALLIED_CARGO_PLANE","SBP.SOVIET.SOVIET_OFFICER_SQUAD","SBP.SOVIET.SOVIET_OFFICER_SQUAD_MP","SBP.SOVIET.STEAM_TRAIN","SBP.SOVIET.SU_76M","SBP.SOVIET.SU_76M_MP","SBP.SOVIET.SU_76M_TOW","SBP.SOVIET.SU_85","SBP.SOVIET.SU_85_MP","SBP.SOVIET.T_34_76_SQUAD","SBP.SOVIET.T_34_76_SQUAD_MP","SBP.SOVIET.T_34_85_ADVANCED_SQUAD_MP","SBP.SOVIET.T_34_85_SQUAD","SBP.SOVIET.T_34_85_SQUAD_MP","SBP.SOVIET.T_70M","SBP.SOVIET.T_70M_MP","SBP.SOVIET.TOW_BRIDGE_PARTISAN_SQUAD_AT","SBP.SOVIET.TOW_BRIDGE_PARTISAN_SQUAD_BASE","SBP.SOVIET.TOW_BRIDGE_PARTISAN_SQUAD_MAXIM","SBP.SOVIET.TOW_BRIDGE_PARTISAN_SQUAD_MORTAR","SBP.SOVIET.TOW_COLD_WEATHER_GUARDS_TROOPS","SBP.SOVIET.TOW_PARTISAN_SQUAD_KAR98K_RIFLE_MP","SBP.SOVIET.TOW_PARTISAN_SQUAD_LMG_SQUAD","SBP.SOVIET.TOW_PARTISAN_SQUAD_MAXIM_HMG_MP","SBP.SOVIET.US6_TRUCK_SQUAD","SBP.SOVIET.ZIS_6_TRANSPORT_TRUCK","SBP.SOVIET.ZIS_6_TRANSPORT_TRUCK_MP","ABILITY.SOVIET.ALLIED_AIR_SUPPLIES","ABILITY.SOVIET.ANTI_PERSONNEL_MINES","ABILITY.SOVIET.ANTI_TANK_GRENADE","ABILITY.SOVIET.ANTI_TANK_GRENADE_ASSAULT","ABILITY.SOVIET.ANTI_TANK_GRENADE_MP","ABILITY.SOVIET.ANTI_TANK_GRENADE_NO_REQUIREMENTS_MP","ABILITY.SOVIET.AT_76MM_HE_BARRAGE_ABILITY","ABILITY.SOVIET.AT_76MM_HE_BARRAGE_ABILITY_MP","ABILITY.SOVIET.AT_GUN_AMBUSH_TACTICS","ABILITY.SOVIET.B4_203MM_BARRAGE","ABILITY.SOVIET.B4_203MM_BARRAGE_COMMANDER_MP","ABILITY.SOVIET.B4_203MM_BARRAGE_COMMANDER_PRECISE_MP","ABILITY.SOVIET.B4_203MM_BARRAGE_COMMANDER_VET3_MP","ABILITY.SOVIET.B4_203MM_BARRAGE_COMMANDER_VICTORTARGET_MP","ABILITY.SOVIET.B4_203MM_BARRAGE_MP","ABILITY.SOVIET.B4_203MM_DIRECT_FIRE","ABILITY.SOVIET.B4_203MM_HOWITZER","ABILITY.SOVIET.BASE_CONSCRIPT_DISPATCH","ABILITY.SOVIET.BASE_CONSCRIPT_DISPATCH_MP","ABILITY.SOVIET.BOMBARDMENT_FX","ABILITY.SOVIET.BOOBY_TRAP","ABILITY.SOVIET.BUTTON_VEHICLE","ABILITY.SOVIET.BUTTON_VEHICLE_MP","ABILITY.SOVIET.BUTTON_VEHICLE_TOW","ABILITY.SOVIET.CAMPAIGN_SHOCK_FIRE_SUPERIORITY","ABILITY.SOVIET.CMD_120MM_MORTAR_CREW","ABILITY.SOVIET.CMD_ADVANCED_T34_85_MEDIUM_TANK","ABILITY.SOVIET.CMD_AT_GUN_AMBUSH_TACTICS_MP","ABILITY.SOVIET.CMD_CONSCRIPT_ASSAULT_PACKAGE","ABILITY.SOVIET.CMD_CONSCRIPT_EVASIVE_TACTICS","ABILITY.SOVIET.CMD_CONSCRIPT_REPAIR_KIT","ABILITY.SOVIET.CMD_GUARD_TROOPS","ABILITY.SOVIET.CMD_IS2_HEAVY_TANK","ABILITY.SOVIET.CMD_ISU_152","ABILITY.SOVIET.CMD_KATYUSHA","ABILITY.SOVIET.CMD_KV_1_UNLOCK","ABILITY.SOVIET.CMD_KV_8_UNLOCK_MP","ABILITY.SOVIET.CMD_ML_20","ABILITY.SOVIET.CMD_PENAL_BATTALION","ABILITY.SOVIET.CMD_RADIO_INTERCEPT","ABILITY.SOVIET.CMD_SHOCK_TROOPS","ABILITY.SOVIET.CMD_SOVIET_INDUSTRY","ABILITY.SOVIET.CMD_T34_85_MEDIUM_TANK","ABILITY.SOVIET.CMD_VEHICLE_CREW_REPAIR_TRAINING","ABILITY.SOVIET.COMMISSAR_SQUAD_MP","ABILITY.SOVIET.CONE_LOS_TOGGLE_ABILITY","ABILITY.SOVIET.CONE_LOS_TOGGLE_ABILITY_MP","ABILITY.SOVIET.CONSCRIPT_ANTI_TANK_GRENADE_ASSAULT_MP","ABILITY.SOVIET.CONSCRIPT_DISPATCH_MP","ABILITY.SOVIET.CONSCRIPT_EVASIVE_TACTICS","ABILITY.SOVIET.CONSCRIPT_EVASIVE_TACTICS_MP","ABILITY.SOVIET.CONSCRIPT_MOLOTOV_COCKTAIL","ABILITY.SOVIET.CONSCRIPT_MOLOTOV_COCKTAIL_MP","ABILITY.SOVIET.CONSCRIPT_OORAH","ABILITY.SOVIET.CONSCRIPT_OORAH_MP","ABILITY.SOVIET.CONSCRIPT_PTRS_UPGRADE","ABILITY.SOVIET.DSHK_ARMOR_PIERCING","ABILITY.SOVIET.DSHK_MP","ABILITY.SOVIET.ENGINEER_SALVAGE_WRECK","ABILITY.SOVIET.FATALITY_FEAR_PROPAGANDA_ARTILLERY","ABILITY.SOVIET.FATALITY_INCENDIARY_ARTILLERY","ABILITY.SOVIET.FATALITY_KATYUSHA_ROCKETS","ABILITY.SOVIET.FEAR_PROPAGANDA_ARTILLERY","ABILITY.SOVIET.FIELDCRAFT_TRIP_FLARE","ABILITY.SOVIET.FIELDCRAFT_TRIP_FLARE_MP","ABILITY.SOVIET.FIRE_ARTILLERY","ABILITY.SOVIET.FOR_MOTHER_RUSSIA_ABILITY","ABILITY.SOVIET.FORWARD_HQ","ABILITY.SOVIET.FRONTOVIKI_CONSCRIPT_DISPATCH","ABILITY.SOVIET.GUARDS_THROW_DEFENSIVE_GRENADE","ABILITY.SOVIET.GUARDS_THROW_DEFENSIVE_GRENADE_MP","ABILITY.SOVIET.HOLD_THE_LINE","ABILITY.SOVIET.IL_2_ANTI_TANK_BOMB_STRIKE","ABILITY.SOVIET.IL_2_ATTACK_STRAFE","ABILITY.SOVIET.IL_2_BOMBING_RUN_SP","ABILITY.SOVIET.IL_2_PRECISION_BOMB_STRIKE","ABILITY.SOVIET.IL_2_RECON","ABILITY.SOVIET.IL_2_RECON_SINGLEPASS_SP","ABILITY.SOVIET.IL_2_RECON_SP","ABILITY.SOVIET.IL_2_STURMOVIK_ATTACK","ABILITY.SOVIET.IL_2_STURMOVIK_ATTACK_ADVANCED","ABILITY.SOVIET.IL_2_SUPPORT","ABILITY.SOVIET.IL_2_SUPPORT_PRECISION_SP","ABILITY.SOVIET.IL_2_SUPPORT_SP","ABILITY.SOVIET.IS2_DISPATCH_SP","ABILITY.SOVIET.IS2_TANK_DEFENSIVE_WEAPON_MP","ABILITY.SOVIET.ISU_152_DISPATCH_SP","ABILITY.SOVIET.ISU_152_PIERCING_SHOT_ABILITY","ABILITY.SOVIET.ISU_152_PIERCING_SHOT_ABILITY_MP","ABILITY.SOVIET.ISU152_AMMO_SWITCH_AP_SHELL_MP","ABILITY.SOVIET.ISU152_AMMO_SWITCH_HE_SHELL_MP","ABILITY.SOVIET.ISU152_CONCRETE_PIERCING_ROUND_MP","ABILITY.SOVIET.KATUSHYA_CREEPING_BARRAGE_MP","ABILITY.SOVIET.KAYTUSHA_ROCKET_TRUCK_BARRAGE","ABILITY.SOVIET.KAYTUSHA_ROCKET_TRUCK_BARRAGE_MP","ABILITY.SOVIET.KAYTUSHA_ROCKET_TRUCK_BARRAGE_VET3_MP","ABILITY.SOVIET.KAYTUSHA_ROCKET_TRUCK_BARRAGE_VICTORTARGET_MP","ABILITY.SOVIET.KAYTUSHA_ROCKET_TRUCK_CREEPING_BARRAGE_MP","ABILITY.SOVIET.KAYTUSHA_ROCKET_TRUCK_PRECISION_BARRAGE","ABILITY.SOVIET.KAYTUSHA_ROCKET_TRUCK_PRECISION_BARRAGE_MP","ABILITY.SOVIET.KV_2","ABILITY.SOVIET.KV_2_SEIGE_MODE","ABILITY.SOVIET.KV_8_FLAME_45MM_TOGGLE_MP","ABILITY.SOVIET.LIGHT_ANTI_VEHICLE_MINES","ABILITY.SOVIET.M_42_AT_GUN","ABILITY.SOVIET.M11_PARTISANS_DISPATCH_KARK98K","ABILITY.SOVIET.M11_PARTISANS_DISPATCH_NAGANT","ABILITY.SOVIET.M11_SNIPER_DISPATCH02","ABILITY.SOVIET.M11_SNIPER_DISPATCH02_MP","ABILITY.SOVIET.M11_SNIPER_HOLD_FIRE","ABILITY.SOVIET.M3A1_M5_MOVING_ACCURACY_MP","ABILITY.SOVIET.M5_HALFTRACK_ASSAULT","ABILITY.SOVIET.M5_M3A1_OVERDRIVE","ABILITY.SOVIET.M5_M3A1_OVERDRIVE_MP","ABILITY.SOVIET.MANPOWER_BLITZ","ABILITY.SOVIET.MARK_VEHICLE","ABILITY.SOVIET.MAXIM_HMG_DISPATCH_SP","ABILITY.SOVIET.MERGE_ABILITY","ABILITY.SOVIET.MERGE_ABILITY_MP","ABILITY.SOVIET.ML_20_152MM_BARRAGE_ABILITY","ABILITY.SOVIET.ML_20_152MM_BARRAGE_ABILITY_MP","ABILITY.SOVIET.ML_20_152MM_BARRAGE_ABILITY_SLOW","ABILITY.SOVIET.ML_20_152MM_BARRAGE_ABILITY_SLOW_MP","ABILITY.SOVIET.ML_20_152MM_BARRAGE_ABILITY_VET_1_MP","ABILITY.SOVIET.ML_20_152MM_BARRAGE_ABILITY_VET3_MP","ABILITY.SOVIET.ML_20_152MM_BARRAGE_ABILITY_VICTORTARGET_MP","ABILITY.SOVIET.ML_20_152MM_BARRAGE_PRECISON_ABILITY_MP","ABILITY.SOVIET.MORTAR_EXPLOSION_FX","ABILITY.SOVIET.MORTAR_EXPLOSION_FX_ICE","ABILITY.SOVIET.MORTAR_FIRE_FLARES_ABILITY_MP","ABILITY.SOVIET.MORTAR_PRECISION_BARRAGE_120MM_VET","ABILITY.SOVIET.MORTAR_PRECISION_BARRAGE_120MM_VET_MP","ABILITY.SOVIET.MORTAR_PRECISION_BARRAGE_82MM","ABILITY.SOVIET.MORTAR_PRECISION_BARRAGE_82MM_MP","ABILITY.SOVIET.NO_RETREAT_NO_SURRENDER","ABILITY.SOVIET.PARTISAN_DISPATCH","ABILITY.SOVIET.PARTISAN_DISPATCH_TOW","ABILITY.SOVIET.PARTISAN_MOLOTOV_COCKTAIL_MP","ABILITY.SOVIET.PARTISANS_COMMANDER_ANTI_INFANTRY","ABILITY.SOVIET.PARTISANS_COMMANDER_ANTI_VEHICLE","ABILITY.SOVIET.PENAL_OORAH_MP","ABILITY.SOVIET.PENAL_TROOP_DISPATCH_SINGLE_SP","ABILITY.SOVIET.PENAL_TROOP_DISPATCH_SP","ABILITY.SOVIET.RAPID_CONSCRIPTION","ABILITY.SOVIET.REPAIR_STATION","ABILITY.SOVIET.RG_42_ANTI_PERSONNEL_GRENADE","ABILITY.SOVIET.RG_42_ANTI_PERSONNEL_GRENADE_MP","ABILITY.SOVIET.RGD_1_SMOKE_GRENADE","ABILITY.SOVIET.RGD_1_SMOKE_GRENADE_MP","ABILITY.SOVIET.RGD_33_PARTISAN_GRENADE_MP","ABILITY.SOVIET.SALVAGE_KITS","ABILITY.SOVIET.SATCHEL_CHARGE_THROW_ABILITY_MP","ABILITY.SOVIET.SCORCHED_EARTH_POLICY","ABILITY.SOVIET.SCORCHED_EARTH_POLICY_MP","ABILITY.SOVIET.SHERMAN_SOVIET_DISPATCH","ABILITY.SOVIET.SHERMAN76MM_AMMO_SWITCH_AP_SHELL_MP","ABILITY.SOVIET.SHERMAN76MM_AMMO_SWITCH_HE_SHELL_MP","ABILITY.SOVIET.SHOCK_TROOP_DISPATCH_SP","ABILITY.SOVIET.SHOCK_TROOP_SMOKE_GRENADES","ABILITY.SOVIET.SMOKE_120MM_MORTAR_BARRAGE","ABILITY.SOVIET.SMOKE_120MM_MORTAR_BARRAGE_MP","ABILITY.SOVIET.SMOKE_SYNC_MORTAR_BARRAGE","ABILITY.SOVIET.SMOKE_SYNC_MORTAR_BARRAGE_MP","ABILITY.SOVIET.SNIPER_DELAYED_COVER_AUTO_CAMOUFLAGE","ABILITY.SOVIET.SNIPER_DELAYED_COVER_AUTO_CAMOUFLAGE_MP","ABILITY.SOVIET.SNIPER_FIRE_FLARES_ABILITY","ABILITY.SOVIET.SNIPER_FIRE_FLARES_ABILITY_MP","ABILITY.SOVIET.SNIPER_HMG_SPRINT","ABILITY.SOVIET.SNIPER_HMG_SPRINT_MP","ABILITY.SOVIET.SNIPER_HOLD_FIRE","ABILITY.SOVIET.SNIPER_HOLD_FIRE_MP","ABILITY.SOVIET.SNIPER_IN_COVER_AUTO_CAMOUFLAGE","ABILITY.SOVIET.SNIPER_IN_COVER_AUTO_CAMOUFLAGE_MP","ABILITY.SOVIET.SNIPER_SUPPRESSION_FIRE_ABILITY","ABILITY.SOVIET.SNIPER_SUPPRESSION_FIRE_ABILITY_MP","ABILITY.SOVIET.SOV_VEHICLE_HOLD_FIRE_MP","ABILITY.SOVIET.SOVIET_BARBED_WIRE_CUTTING_ABILITY","ABILITY.SOVIET.SOVIET_BARBED_WIRE_CUTTING_ABILITY_MP","ABILITY.SOVIET.SOVIET_CAMO_HOLD_FIRE_MP","ABILITY.SOVIET.SOVIET_CONSCRIPT_REPAIR_ABILITY","ABILITY.SOVIET.SOVIET_CONSCRIPT_REPAIR_ABILITY_MP","ABILITY.SOVIET.SOVIET_HQ_ENGINEER_CALL_IN","ABILITY.SOVIET.SOVIET_INDUSTRY","ABILITY.SOVIET.SOVIET_REPAIR_ABILITY","ABILITY.SOVIET.SOVIET_REPAIR_ABILITY_MP","ABILITY.SOVIET.SOVIET_WAR_MACHINE_SP","ABILITY.SOVIET.SPY_NETWORK","ABILITY.SOVIET.SU_76_BARRAGE_ABILITY","ABILITY.SOVIET.SU_76_BARRAGE_ABILITY_MP","ABILITY.SOVIET.SU76_SU85_ZIS3_53K_ISU152_INFANTRY_TRACKING","ABILITY.SOVIET.SU76_SU85_ZIS3_53K_ISU152_INFANTRY_TRACKING_MP","ABILITY.SOVIET.SYNC_MORTAR_BARRAGE","ABILITY.SOVIET.SYNC_MORTAR_BARRAGE_120MM","ABILITY.SOVIET.SYNC_MORTAR_BARRAGE_120MM_MP","ABILITY.SOVIET.SYNC_MORTAR_BARRAGE_120MM_VICTORTARGET_MP","ABILITY.SOVIET.SYNC_MORTAR_BARRAGE_MP","ABILITY.SOVIET.SYNC_MORTAR_BARRAGE_VICTORTARGET_MP","ABILITY.SOVIET.T_34_RAMMING_ABILITY","ABILITY.SOVIET.T_34_RAMMING_ABILITY_MP","ABILITY.SOVIET.T70_CREW_REPAIR_ABILITY","ABILITY.SOVIET.T70_CREW_REPAIR_ABILITY_MP","ABILITY.SOVIET.TANK_DETECTION_ABILITY","ABILITY.SOVIET.TANK_TRAPS","ABILITY.SOVIET.TANK_VET_POINT_CAPTURE_ABILITY","ABILITY.SOVIET.TANK_VET_POINT_CAPTURE_ABILITY_MP","ABILITY.SOVIET.TO_THE_LAST_MAN_MP","ABILITY.SOVIET.VEHICLE_CREW_REPAIR_ABILITY","ABILITY.SOVIET.VEHICLE_CREW_REPAIR_ABILITY_MP","ABILITY.SOVIET.VEHICLE_CREW_REPAIR_TOGGLE_MP","ABILITY.SOVIET.VEHICLE_RECON_TOGGLE","ABILITY.SOVIET.VEHICLE_RECON_TOGGLE_MP","ABILITY.SOVIET.VEHICLE_RECON_TOGGLE_VET2_MP","UPG.SOVIET.ABILITY_LOCK_OUT_CONSCRIPT","UPG.SOVIET.ABILITY_LOCK_OUT_CONSCRIPT_MP","UPG.SOVIET.ALLIED_AIR_SUPPLIES","UPG.SOVIET.ANTI_PERSONNEL_MINES","UPG.SOVIET.ANTI_TANK_GUN_AMBUSH_TACTICS","UPG.SOVIET.BASE_CONSCRIPT_AT_GRENADE_UNLOCK","UPG.SOVIET.BASE_CONSCRIPT_AT_GRENADE_UNLOCK_MP","UPG.SOVIET.BASE_CONSCRIPT_MOLOTOV_UNLOCK","UPG.SOVIET.BASE_CONSCRIPT_MOLOTOV_UNLOCK_MP","UPG.SOVIET.BASE_CONSCRIPT_OORAH_UNLOCK","UPG.SOVIET.BASE_CONSCRIPT_OORAH_UNLOCK_MP","UPG.SOVIET.BASE_CONSCRIPT_REPAIR_UNLOCK_MP","UPG.SOVIET.BASE_CONSCRIPT_RIFLE_UNLOCK_MP","UPG.SOVIET.BOOBY_TRAP","UPG.SOVIET.CAMOUFLAGE_NET_ACTIVATED_SOVIET","UPG.SOVIET.COMMANDER_T34_85_MP","UPG.SOVIET.COMMISSAR_SQUAD","UPG.SOVIET.CONSCRIPT_ASSAULT_PACKAGE","UPG.SOVIET.CONSCRIPT_ASSAULT_PACKAGE_INGAME","UPG.SOVIET.CONSCRIPT_AT_GRENADE_ASSAULT","UPG.SOVIET.CONSCRIPT_DP_28_LMG_PACKAGE","UPG.SOVIET.CONSCRIPT_EVASIVE_TACTICS","UPG.SOVIET.CONSCRIPT_MOBILIZE_UNLOCK","UPG.SOVIET.CONSCRIPT_PTRS","UPG.SOVIET.CONSCRIPT_PTRS_PACKAGE","UPG.SOVIET.CONSCRIPT_REPAIR_KIT","UPG.SOVIET.DEMO_IL_2_STRAFING_RUN","UPG.SOVIET.DSHK_MACHINEGUN","UPG.SOVIET.ENGINEER_FLAMETHROWER","UPG.SOVIET.ENGINEER_FLAMETHROWER_MP","UPG.SOVIET.ENGINEER_MINESWEEPER","UPG.SOVIET.ENGINEER_MINESWEEPER_MP","UPG.SOVIET.ENGINEER_SALVAGE_KIT","UPG.SOVIET.ENGINEER_SALVAGE_KITS_UNLOCK","UPG.SOVIET.EVASIVE_TACTICS_IS_ON","UPG.SOVIET.FEAR_PROPAGANDA","UPG.SOVIET.FIRE_ARTILLERY","UPG.SOVIET.FOR_MOTHER_RUSSIA","UPG.SOVIET.FORWARD_HQ","UPG.SOVIET.FORWARD_HQ_AURA","UPG.SOVIET.GUARD_ARCHETYPE","UPG.SOVIET.GUARD_DP_28_LMG_PACKAGE","UPG.SOVIET.GUARD_DP_28_LMG_PACKAGE_MP","UPG.SOVIET.GUARD_TROOPS","UPG.SOVIET.HM120_MORTAR_UNLOCK","UPG.SOVIET.HOLD_FIRE_SOVIET_CAMMO","UPG.SOVIET.HOLD_THE_LINE","UPG.SOVIET.HOWTIZER_203MM","UPG.SOVIET.HQ_ANTI_TANK_GRENADE","UPG.SOVIET.HQ_ANTI_TANK_GRENADE_MP","UPG.SOVIET.HQ_CONSCRIPT_REPAIR_KIT","UPG.SOVIET.HQ_HEALING_AURA","UPG.SOVIET.HQ_HEALING_AURA_M13","UPG.SOVIET.HQ_HEALING_AURA_MP","UPG.SOVIET.HQ_MOLOTOV_GRENADE_MP","UPG.SOVIET.IL_2_ANTI_TANK_BOMB","UPG.SOVIET.IL_2_BOMB_STRIKE","UPG.SOVIET.IL_2_RECON","UPG.SOVIET.IL_2_STURMOVIK_ATTACK","UPG.SOVIET.IL_2_STURMOVIK_ATTACK_ADVANCED","UPG.SOVIET.IL_2_SUPPORT","UPG.SOVIET.IS_2_SUPPORT","UPG.SOVIET.IS2_TOP_GUNNER","UPG.SOVIET.IS2_TOP_GUNNER_MP","UPG.SOVIET.ISAKOVICH_A01","UPG.SOVIET.ISU152_HE_ROUNDS","UPG.SOVIET.ISU152_TOP_GUNNER","UPG.SOVIET.ISU152_TOP_GUNNER_MP","UPG.SOVIET.ISU152_UNLOCK","UPG.SOVIET.KATYUSHA_UNLOCK","UPG.SOVIET.KV_1_UNLOCK_DEMO","UPG.SOVIET.KV_8_UNLOCK","UPG.SOVIET.KV1_UNLOCK","UPG.SOVIET.KV2_UNLOCK","UPG.SOVIET.LIGHT_ANTI_VEHICLE_MINES","UPG.SOVIET.M_42_AT_GUN","UPG.SOVIET.M3_HALFTRACK_ASSAULT","UPG.SOVIET.M5_HALFTRACK_72K_AA_GUN_PACKAGE","UPG.SOVIET.M5_HALFTRACK_72K_AA_GUN_PACKAGE_MP","UPG.SOVIET.MANPOWER_BLITZ","UPG.SOVIET.MARK_VEHICLE","UPG.SOVIET.ML_20_HOWITZER_UNLOCK","UPG.SOVIET.NKVD_ARCHETYPE","UPG.SOVIET.ORDER_227_DISABLE","UPG.SOVIET.ORDER_227_LOCKDOWN","UPG.SOVIET.ORDER227","UPG.SOVIET.PARTISAN_COMMANDER_ANTIVEHICLE_TROOPS","UPG.SOVIET.PARTISAN_COMMANDER_TROOPS","UPG.SOVIET.PARTISAN_HEALTH_UPGRADE","UPG.SOVIET.PARTISAN_HEALTH_UPGRADE_TANK_HUNTER","UPG.SOVIET.PARTISAN_TROOPS","UPG.SOVIET.PARTISAN_TROOPS_TOW","UPG.SOVIET.PENAL_BATTALION","UPG.SOVIET.PENAL_BATTALION_FLAMETHROWER_PACKAGE","UPG.SOVIET.PENAL_BATTALION_FLAMETHROWER_PACKAGE_MP","UPG.SOVIET.PPSH_41_SUB_MACHINE_GUN_UPGRADE","UPG.SOVIET.PPSH_41_SUB_MACHINE_GUN_UPGRADE_MP","UPG.SOVIET.PTRS_41_AT_RIFLE_PACKAGE_GUARD_TROOP","UPG.SOVIET.PTRS_41_AT_RIFLE_PACKAGE_GUARD_TROOP_ASSAULT_MP","UPG.SOVIET.PTRS_41_AT_RIFLE_PACKAGE_GUARD_TROOP_BETTER_BALANCED","UPG.SOVIET.PTRS_41_AT_RIFLE_PACKAGE_GUARD_TROOP_MP","UPG.SOVIET.RADIO_INTERCEPT","UPG.SOVIET.RAPID_CONSCRIPTION","UPG.SOVIET.REPAIR_BUNKER","UPG.SOVIET.SCORCHED_EARTH_POLICY","UPG.SOVIET.SCORCHED_EARTH_POLICY_MP","UPG.SOVIET.SHERMAN_SOVIET_DISPATCH","UPG.SOVIET.SHERMAN_SOVIET_TOP_GUNNER","UPG.SOVIET.SHOCK_ARCHETYPE","UPG.SOVIET.SHOCK_TROOPS","UPG.SOVIET.SHOCK_TROOPS_SP","UPG.SOVIET.SOVIET_GRENADES_LONG_TIMER","UPG.SOVIET.SOVIET_INDUSTRY","UPG.SOVIET.SPY_NETWORK","UPG.SOVIET.T34_85_ADVANCED_UNLOCK","UPG.SOVIET.T34_85_UNLOCK","UPG.SOVIET.TANK_DETECTION","UPG.SOVIET.TANK_RAID_ENABLED","UPG.SOVIET.TANK_TRAPS","UPG.SOVIET.TOW_1941_SOVIET","UPG.SOVIET.VEHICLE_SELF_REPAIR_TRAINING","EBP.WEST_GERMAN.ANTI_TANK_GUN_CREW_MP","EBP.WEST_GERMAN.ARMORED_CAR_SDKFZ_223","EBP.WEST_GERMAN.ARTY_CREW_MP","EBP.WEST_GERMAN.ASSAULT_PIONEER_MP","EBP.WEST_GERMAN.ASSAULT_PIONEERS_HEAVY_MINE_MP","EBP.WEST_GERMAN.BASE_FLAK_GUN_MP","EBP.WEST_GERMAN.BASE_FLAK_SANDBAGS","EBP.WEST_GERMAN.BUNKER_WESTGERMAN_MP","EBP.WEST_GERMAN.FALLSCHIRMJAGER_MP","EBP.WEST_GERMAN.FIELD_OFFICER_MP","EBP.WEST_GERMAN.FLAK_EMPLACEMENT","EBP.WEST_GERMAN.FLAK_EMPLACEMENT_BASE","EBP.WEST_GERMAN.FLAK_EMPLACEMENT_CREW","EBP.WEST_GERMAN.FLAK_EMPLACEMENT_CREW_BASE","EBP.WEST_GERMAN.GOLIATH_MP","EBP.WEST_GERMAN.GRANATWERFER_34_81MM_MORTAR_WG_MP","EBP.WEST_GERMAN.HALFTRACK_SDKFZ_251_17_FLAK_MP","EBP.WEST_GERMAN.HALFTRACK_SDKFZ_251_20_IR_SEARCHLIGHT_MP","EBP.WEST_GERMAN.HALFTRACK_SDKFZ_251_20_IR_SEARCHLIGHT_SP","EBP.WEST_GERMAN.HALFTRACK_SDKFZ_251_MP_2","EBP.WEST_GERMAN.HALFTRACK_SDKFZ_251_WURFRAHMEN_40_MP","EBP.WEST_GERMAN.HEAVY_ARMOR_SUPPORT_MP","EBP.WEST_GERMAN.HEAVY_ARMOR_SUPPORT_PREPLACED","EBP.WEST_GERMAN.HETZER_MP","EBP.WEST_GERMAN.HMG_CREW_MP","EBP.WEST_GERMAN.HOWITZER_105MM_LE_FH18_MINICHALLENGE","EBP.WEST_GERMAN.HOWITZER_105MM_LONG_RANGE","EBP.WEST_GERMAN.INFANTRY_SUPPORT_MP","EBP.WEST_GERMAN.INFANTRY_SUPPORT_PREPLACED","EBP.WEST_GERMAN.JAEGER_LIGHT_INFANTRY_RECON","EBP.WEST_GERMAN.JAGDPANZER_IV_SDKFZ_162_MP","EBP.WEST_GERMAN.JAGDTIGER_SDKFZ_186_MP","EBP.WEST_GERMAN.JU52_PARATROOPER_PLANE","EBP.WEST_GERMAN.JU52_PLANE","EBP.WEST_GERMAN.KING_TIGER_SDKFZ_182_MP","EBP.WEST_GERMAN.KUBELWAGEN_TYPE_82_MP","EBP.WEST_GERMAN.LE_IG_18_INF_SUPPORT_GUN_MP","EBP.WEST_GERMAN.LIGHT_ARMOR_SUPPORT_MP","EBP.WEST_GERMAN.LIGHT_ARMOR_SUPPORT_PREPLACED","EBP.WEST_GERMAN.MED_SUPPLY_STASH","EBP.WEST_GERMAN.MG34_HMG_CREW","EBP.WEST_GERMAN.MG34_HMG_MP","EBP.WEST_GERMAN.MG42_HMG_WG_MP","EBP.WEST_GERMAN.MINE_FIELD_WESTGERMAN_MP","EBP.WEST_GERMAN.MORTAR_TEAM_CREW_MP","EBP.WEST_GERMAN.OBERSOLDATEN_MP","EBP.WEST_GERMAN.OKW_HOWITZER_105MM_LE_FH18_MP","EBP.WEST_GERMAN.OKW_HOWITZER_CREW_MP","EBP.WEST_GERMAN.OSTWIND_FLAK_PANZER_WEST_GERMAN_MP","EBP.WEST_GERMAN.PAK40_75MM_AT_GUN_WG_MP","EBP.WEST_GERMAN.PAK43_88MM_AT_GUN_WESTGERMAN_MP","EBP.WEST_GERMAN.PANTHER_SDKFZ_171_AUSF_G_MP","EBP.WEST_GERMAN.PANTHER_SDKFZ_171_COMMANDER_MP","EBP.WEST_GERMAN.PANZER_II_LUCHS_SDKFZ_123_MP","EBP.WEST_GERMAN.PANZER_IV_SDKFZ_AUSF_J_MP","EBP.WEST_GERMAN.PANZERFUSILIER_MP","EBP.WEST_GERMAN.PUMA_SDKFZ_234_MP","EBP.WEST_GERMAN.RAKETENWERFER43_88MM_PUPPCHEN_ANTITANK_GUN_MP","EBP.WEST_GERMAN.REINFORCED_BARBED_WIRE_FENCE_MP","EBP.WEST_GERMAN.REINFORCED_BARBED_WIRE_TANK_TRAP_MP","EBP.WEST_GERMAN.SCHU_MINE_42_MP","EBP.WEST_GERMAN.SIPHON_STRUCTURE","EBP.WEST_GERMAN.STURMTIGER_606_38CM_RW_61_MP","EBP.WEST_GERMAN.SWS_HALFTRACK_MP","EBP.WEST_GERMAN.SWS_HALFTRACK_SP","EBP.WEST_GERMAN.TERROR_OFFICER_GUARD_MP","EBP.WEST_GERMAN.TERROR_OFFICER_MP","EBP.WEST_GERMAN.URBAN_ASSAULT_LIGHT_INFANTRY","EBP.WEST_GERMAN.VOLKSGRENADIER_MP","EBP.WEST_GERMAN.WEST_GERMAN_BASE_STAMPER","EBP.WEST_GERMAN.WEST_GERMAN_COMMAND_POST_BARREL","EBP.WEST_GERMAN.WEST_GERMAN_COMMAND_POST_CRATES_01","EBP.WEST_GERMAN.WEST_GERMAN_COMMAND_POST_CRATES_02","EBP.WEST_GERMAN.WEST_GERMAN_COMMAND_POST_GENERATOR","EBP.WEST_GERMAN.WEST_GERMAN_COMMAND_POST_SANDBAG_01","EBP.WEST_GERMAN.WEST_GERMAN_COMMAND_POST_SANDBAG_02","EBP.WEST_GERMAN.WEST_GERMAN_HQ_MP","EBP.WEST_GERMAN.WEST_GERMAN_HQ_WRECK_MP","EBP.WEST_GERMAN.WEST_GERMAN_INVISI_REPAIR_STATION_MP","EBP.WEST_GERMAN.WG_BARBED_WIRE_FENCE_MP","EBP.WEST_GERMAN.WG_SANDBAG_FENCE_MP","SBP.WEST_GERMAN.ARMORED_CAR_SDKFZ_234_SQUAD_MP","SBP.WEST_GERMAN.ASSAULT_PIONEER_SQUAD_MP","SBP.WEST_GERMAN.COMMAND_KING_TIGER_SQUAD_MP","SBP.WEST_GERMAN.FALLSCHIRMJAGER_SQUAD_MP","SBP.WEST_GERMAN.FIELD_OFFICER_SQUAD_MP","SBP.WEST_GERMAN.FLAK_EMPLACEMENT","SBP.WEST_GERMAN.FLAK_EMPLACEMENT_BASE","SBP.WEST_GERMAN.GOLIATH_MP","SBP.WEST_GERMAN.GRW34_81MM_MORTAR_SQUAD_MP","SBP.WEST_GERMAN.HETZER_SQUAD_MP","SBP.WEST_GERMAN.HOWITZER_105MM_LE_FH18_ARTILLERY_MINICHALLENGE","SBP.WEST_GERMAN.HOWITZER_105MM_LONG_RANGE","SBP.WEST_GERMAN.JAEGER_LIGHT_INFANTRY_RECON_SQUAD_MP","SBP.WEST_GERMAN.JAGDPANZER_TANK_DESTROYER_SQUAD_MP","SBP.WEST_GERMAN.JAGDTIGER_TD_SQUAD_MP","SBP.WEST_GERMAN.JU52_PARATROOPER_PLANE","SBP.WEST_GERMAN.JU52_PLANE","SBP.WEST_GERMAN.KING_TIGER_SQUAD_MP","SBP.WEST_GERMAN.KUBELWAGEN_SQUAD_MP","SBP.WEST_GERMAN.LE_IG_18_INF_SUPPORT_GUN_SQUAD_MP","SBP.WEST_GERMAN.MG34_HEAVY_MACHINE_GUN_SQUAD_MP","SBP.WEST_GERMAN.MG42_HEAVY_MACHINE_GUN_SQUAD_WG_MP","SBP.WEST_GERMAN.MORTAR_250_HALFTRACK_SQUAD_WESTGERMAN_MP","SBP.WEST_GERMAN.OBERSOLDATEN_SQUAD_MP","SBP.WEST_GERMAN.OKW_HOWITZER_105MM_LE_FH18_ARTILLERY_MP","SBP.WEST_GERMAN.OSTWIND_SQUAD_WESTGERMAN_MP","SBP.WEST_GERMAN.PAK40_75MM_AT_GUN_SQUAD_WG_MP","SBP.WEST_GERMAN.PAK43_88MM_AT_GUN_SQUAD_WESTGERMAN_MP","SBP.WEST_GERMAN.PANTHER_AUSF_G_SQUAD_MP","SBP.WEST_GERMAN.PANTHER_COMMANDER_SQUAD_MP","SBP.WEST_GERMAN.PANZER_II_LUCHS_SQUAD_MP","SBP.WEST_GERMAN.PANZER_IV_AUSF_J_BATTLE_GROUP_MP","SBP.WEST_GERMAN.PANZERFUSILIER_SQUAD_MP","SBP.WEST_GERMAN.RAKETENWERFER43_88MM_PUPPCHEN_ANTITANK_GUN_SQUAD_MP","SBP.WEST_GERMAN.SCOUTCAR_223_SQUAD","SBP.WEST_GERMAN.SDKFZ_251_17_FLAK_HALFTRACK_SQUAD_MP","SBP.WEST_GERMAN.SDKFZ_251_20_IR_SEARCHLIGHT_HALFTRACK_SQUAD_MP","SBP.WEST_GERMAN.SDKFZ_251_20_IR_SEARCHLIGHT_HALFTRACK_SQUAD_SP","SBP.WEST_GERMAN.SDKFZ_251_HALFTRACK_SQUAD_MP_2","SBP.WEST_GERMAN.SDKFZ_251_WURFRAHMEN_40_HALFTRACK_SQUAD_MP","SBP.WEST_GERMAN.STURMTIGER_SQUAD_MP","SBP.WEST_GERMAN.SWS_HALFTRACK_SQUAD_MP","SBP.WEST_GERMAN.SWS_HALFTRACK_SQUAD_SP","SBP.WEST_GERMAN.TERROR_OFFICER_SQUAD_MP","SBP.WEST_GERMAN.URBAN_ASSAULT_LIGHT_INFANTRY","SBP.WEST_GERMAN.VOLKSGRENADIER_SQUAD_MP","ABILITY.WEST_GERMAN.ADVANCED_SIPHON","ABILITY.WEST_GERMAN.AIRBORNE_ASSAULT","ABILITY.WEST_GERMAN.ARMOR_BLITZ_MP","ABILITY.WEST_GERMAN.ASSAULT_ARTILLERY","ABILITY.WEST_GERMAN.ASSAULT_MOVE_MP","ABILITY.WEST_GERMAN.ASSAULT_PIONEER_BARBED_WIRE_CUTTING_ABILITY_MP","ABILITY.WEST_GERMAN.ASSAULT_PIONEER_DROP_MEDPACK_ABILITY_MP","ABILITY.WEST_GERMAN.BARRAGE_ABILITY_MC","ABILITY.WEST_GERMAN.BASE_BUILDING_RETREAT_POINT_MP","ABILITY.WEST_GERMAN.BLENDKORPER_2H_WAFFEN_ELITE","ABILITY.WEST_GERMAN.BREAKTHROUGH_2","ABILITY.WEST_GERMAN.BREAKTHROUGH_TACTICS","ABILITY.WEST_GERMAN.BUILDING_SELF_DESTRUCT","ABILITY.WEST_GERMAN.BUILDING_SWITCH_FUEL","ABILITY.WEST_GERMAN.BUILDING_SWITCH_MUNITIONS","ABILITY.WEST_GERMAN.COMBAT_BLITZ_MP","ABILITY.WEST_GERMAN.COMMAND_MARK_VEHICLE","ABILITY.WEST_GERMAN.COMMAND_PANTHER","ABILITY.WEST_GERMAN.COMMAND_ROYAL_TIGER_DISPATCH","ABILITY.WEST_GERMAN.CONSTRUCT_ARMORED_INFANTRY_COMMAND","ABILITY.WEST_GERMAN.CONSTRUCT_INFANTRY_BARRACKS","ABILITY.WEST_GERMAN.CONSTRUCT_TANK_COMMAND","ABILITY.WEST_GERMAN.COORDINATED_BARRAGE","ABILITY.WEST_GERMAN.DEFENSIVE_MOVE_MP","ABILITY.WEST_GERMAN.EARLY_WARNING_FLARES","ABILITY.WEST_GERMAN.FALLSCHIRMJAEGER","ABILITY.WEST_GERMAN.FALLSCHIRMJAEGER_GREANDE","ABILITY.WEST_GERMAN.FALLSCHIRMJAEGER_PANZERFAUST","ABILITY.WEST_GERMAN.FALLSCHRIMJAEGER_CAMO","ABILITY.WEST_GERMAN.FATALITY_FLARE_ARTILLERY","ABILITY.WEST_GERMAN.FATALITY_STUKA_FRAGMENTATION_AIRSTRIKE","ABILITY.WEST_GERMAN.FATALITY_STURMTIGER_SATURATION","ABILITY.WEST_GERMAN.FATALITY_WALKING_STUKA_BARRAGE","ABILITY.WEST_GERMAN.FIELD_DEFENSES","ABILITY.WEST_GERMAN.FLAK_EMPLACEMENT_SELF_REPAIR","ABILITY.WEST_GERMAN.FLAK_HALFTRACK_CONCEALING_SMOKE_MP","ABILITY.WEST_GERMAN.FLAME_HALTRACK_DISPATCH","ABILITY.WEST_GERMAN.FLARE_ARTILLERY","ABILITY.WEST_GERMAN.FLARE_TRAP_CAPTURE_POINT","ABILITY.WEST_GERMAN.FOR_THE_FATHERLAND","ABILITY.WEST_GERMAN.FORTIFY_POSITION_MP","ABILITY.WEST_GERMAN.FORWARD_RECIEVERS","ABILITY.WEST_GERMAN.GOLIATH_DISPATCH","ABILITY.WEST_GERMAN.GRW34_MORTAR_COUNTER_BARRAGE_ATTACK_MP","ABILITY.WEST_GERMAN.GRW34_MORTAR_COUNTER_BARRAGE_WEAPON_WG_MP","ABILITY.WEST_GERMAN.GRW34_MORTAR_TEAM_MORTAR_BARRAGE_WG_MP","ABILITY.WEST_GERMAN.GRW34_MORTAR_TEAM_MORTAR_VICTORTARGET_BARRAGE_WG_MP","ABILITY.WEST_GERMAN.GRW34_MORTAR_TEAM_SMOKE_BARRAGE_WG_MP","ABILITY.WEST_GERMAN.HEAT_SHELLS_ABILITY_MP","ABILITY.WEST_GERMAN.HEAT_SHELLS_UNLOCK","ABILITY.WEST_GERMAN.HEAVY_FORTIFICATIONS","ABILITY.WEST_GERMAN.HETZER_DISPATCH","ABILITY.WEST_GERMAN.HOWITZER_105MM_EMPLACEMENT_UNLOCK_OKW","ABILITY.WEST_GERMAN.HOWITZER_105MM_LONG_RANGE_BARRAGE","ABILITY.WEST_GERMAN.HOWITZER_105MM_OFFMAP_BARRAGE","ABILITY.WEST_GERMAN.HOWITZER_TOGGLE_FIRE_PM","ABILITY.WEST_GERMAN.INFILTRATION_TACTICS_GRENADE","ABILITY.WEST_GERMAN.INFILTRATION_TACTICS_UNLOCK","ABILITY.WEST_GERMAN.INFRARED_STG44","ABILITY.WEST_GERMAN.JAEGER_BOOBY_TRAP","ABILITY.WEST_GERMAN.JAEGER_LIGHT_INFANTRY_CAMO","ABILITY.WEST_GERMAN.JAEGER_LIGHT_INFANTRY_RECON_DISPATCH","ABILITY.WEST_GERMAN.JAGDTIGER","ABILITY.WEST_GERMAN.JAGDTIGER_128MM_SUPPORTING_FIRE","ABILITY.WEST_GERMAN.JAGDTIGER_PIERCING_SHELL_ABILITY_MP","ABILITY.WEST_GERMAN.KING_TIGER_COMMAND_MODE_MP","ABILITY.WEST_GERMAN.KING_TIGER_DISPATCH","ABILITY.WEST_GERMAN.KUBELWAGEN_DETECTION_MP","ABILITY.WEST_GERMAN.KUBELWAGEN_HOLD_FIRE_MP","ABILITY.WEST_GERMAN.KUBELWAGEN_IN_COVER_AUTO_CAMOUFLAGE_MP","ABILITY.WEST_GERMAN.LE_IG_18_BARRAGE_WG_MP","ABILITY.WEST_GERMAN.LE_IG_18_BARRAGE_WG_VET_MP","ABILITY.WEST_GERMAN.LE_IG_18_HOLLOW_CHARGE_BARRAGE_WG_MP","ABILITY.WEST_GERMAN.LE_IG_18_HOLLOW_CHARGE_BARRAGE_WG_VET_MP","ABILITY.WEST_GERMAN.MG34_DISPATCH","ABILITY.WEST_GERMAN.MG34_PHOSPHORUS_ROUNDS_MP","ABILITY.WEST_GERMAN.MINESWEEPER_DEPLOY_MP","ABILITY.WEST_GERMAN.MINESWEEPER_PUT_AWAY_MP","ABILITY.WEST_GERMAN.MORTAR_HALFTRACK_WEST_GERMAN","ABILITY.WEST_GERMAN.OFFMAP_NEBEL_BARRAGE_MP","ABILITY.WEST_GERMAN.OKW_HOLD_FIRE_MP","ABILITY.WEST_GERMAN.OKW_RATKEN_VEHICLE_HOLD_FIRE_MP","ABILITY.WEST_GERMAN.OKW_SECTOR_ASSAULT","ABILITY.WEST_GERMAN.OKW_STUKA_AERIAL_SUPERIORITY_RECON","ABILITY.WEST_GERMAN.OKW_VEHICLE_HOLD_FIRE_MP","ABILITY.WEST_GERMAN.OSTWIND_DISPATCH","ABILITY.WEST_GERMAN.PAK40_CRITICAL_SHOTS_WG_MP","ABILITY.WEST_GERMAN.PANZER_IV_GROUP_DISPATCH","ABILITY.WEST_GERMAN.PANZERFUSILIER_AT_RIFLE_GRENADE","ABILITY.WEST_GERMAN.PANZERFUSILIER_GRENADE","ABILITY.WEST_GERMAN.PANZERFUSILIERS_DISPATCH","ABILITY.WEST_GERMAN.PANZERFUSILIERS_FLARE","ABILITY.WEST_GERMAN.PIONEER_STUN_GRENADE_MP","ABILITY.WEST_GERMAN.PIONEER_VOLKS_SALVAGE","ABILITY.WEST_GERMAN.PIONEER_VOLKS_THROUGH_SALVAGE","ABILITY.WEST_GERMAN.PUMA_AIMED_SHOT_MP","ABILITY.WEST_GERMAN.PUMA_SMOKE_SCREEN","ABILITY.WEST_GERMAN.PYRO_VOLKS","ABILITY.WEST_GERMAN.RADIO_SILENCE","ABILITY.WEST_GERMAN.RAKETEN_IN_COVER_AUTO_CAMOUFLAGE_MP","ABILITY.WEST_GERMAN.RAKTEN_CAMOUFLAGE_MP","ABILITY.WEST_GERMAN.RECON_STANCE_MP","ABILITY.WEST_GERMAN.RECOUP_LOSSES","ABILITY.WEST_GERMAN.REFUEL_TANK_WG_SP","ABILITY.WEST_GERMAN.ROCKET_BARRAGE","ABILITY.WEST_GERMAN.SDKFZ_251_17_FLAK_HALFTRACK_DEPLOY_DEFENS","ABILITY.WEST_GERMAN.SDKFZ_251_17_FLAK_HALFTRACK_DEPLOY_WEAPON","ABILITY.WEST_GERMAN.SDKFZ_251_17_FLAK_HALFTRACK_DEPLOY_WEAPON_VET","ABILITY.WEST_GERMAN.SIGNAL_FLAGS","ABILITY.WEST_GERMAN.SIPHON_INCREASE_RESOURCES_ADVANCED_MP","ABILITY.WEST_GERMAN.SIPHON_INCREASE_RESOURCES_MP","ABILITY.WEST_GERMAN.SPEARHEAD_MP","ABILITY.WEST_GERMAN.STALKER_STATE_MP","ABILITY.WEST_GERMAN.STURMTIGER_380MM_ROCKET_ATTACK","ABILITY.WEST_GERMAN.STURMTIGER_380MM_ROCKET_RELOAD","ABILITY.WEST_GERMAN.STURMTIGER_DISPATCH","ABILITY.WEST_GERMAN.STURMTIGER_NAHVW_CLOSE_RANGE_GRENADE_TARGETED","ABILITY.WEST_GERMAN.SUPPORT_TRUCK_GAIN_RESOURCECS","ABILITY.WEST_GERMAN.SUPPORT_TRUCK_TARGET_SETUP","ABILITY.WEST_GERMAN.SUPPORT_TRUCK_TARGET_UNSETUP","ABILITY.WEST_GERMAN.SUPPRESSIVE_FIRE_MP","ABILITY.WEST_GERMAN.SWS_HALFTRACK_DISPATCH","ABILITY.WEST_GERMAN.SWS_HALFTRACK_FORWARD_RECEIVERS","ABILITY.WEST_GERMAN.SWS_HALFTRACK_INTERVAL_DISPATCH","ABILITY.WEST_GERMAN.TANK_COMMANDER_UNLOCK","ABILITY.WEST_GERMAN.TANK_THROW_DEFENSIVE_GRENADE_MP","ABILITY.WEST_GERMAN.TANK_THROW_DEFENSIVE_GRENADE_UNLOCK_MP","ABILITY.WEST_GERMAN.TERROR_OFFICER","ABILITY.WEST_GERMAN.TERROR_OFFICER_FORCE_RETREAT","ABILITY.WEST_GERMAN.TERROR_OFFICER_MARK_TARGET","ABILITY.WEST_GERMAN.THROUGH_SALVAGE","ABILITY.WEST_GERMAN.TIGER_PROWL_JAGDPANZER_MP","ABILITY.WEST_GERMAN.TIGER_PROWL_MP","ABILITY.WEST_GERMAN.URBAN_ASSAULT_LIGHT_INFANTRY","ABILITY.WEST_GERMAN.URBAN_ASSAULT_LIGHT_INFANTRY_THROW_ABILITY_MP","ABILITY.WEST_GERMAN.VALIANT_ASSAULT","ABILITY.WEST_GERMAN.VEHICLE_CRITICAL_REPAIR_UNLOCK","ABILITY.WEST_GERMAN.VEHICLE_EMERGENCY_REPAIR_ABILITY_MP","ABILITY.WEST_GERMAN.VEHICLE_EMERGENCY_REPAIR_ABILITY_SWS_MP","ABILITY.WEST_GERMAN.VOLKS_PANZERFAUST_MP","ABILITY.WEST_GERMAN.VOLKSGRENADIER_FIRE_GRENADE_MP","ABILITY.WEST_GERMAN.VOLKSGRENADIER_GRENADE_MP","ABILITY.WEST_GERMAN.VOLKSGRENADIER_PANZERFAUST_MP","ABILITY.WEST_GERMAN.VOLKSGRENADIER_PANZERFAUST_VET_4_MP","ABILITY.WEST_GERMAN.WAFFEN_BOOBY_TRAP_CAPTURE_POINT","ABILITY.WEST_GERMAN.WAFFEN_ELITE_BUNDLED_ASSAULT_GRENADE","ABILITY.WEST_GERMAN.WALKING_STUKA_ROCKET_BARRAGE_CREEPING_MP","ABILITY.WEST_GERMAN.WALKING_STUKA_ROCKET_BARRAGE_CREEPING_NAPALM_MP","ABILITY.WEST_GERMAN.WEST_GERMAN_REPAIR_ABILITY_MP","ABILITY.WEST_GERMAN.WG_HQ_PIONEER_CALL_IN","ABILITY.WEST_GERMAN.ZEROING_ARTILLERY","UPG.WEST_GERMAN.ABILITY_LOCK_OUT_STURMTIGER_NOT_RELOADED","UPG.WEST_GERMAN.ABILITY_LOCK_OUT_STURMTIGER_RELOADING","UPG.WEST_GERMAN.ABILITY_LOCK_OUT_SWS_TRUCK","UPG.WEST_GERMAN.ADVANCED_SIPHON","UPG.WEST_GERMAN.AERIAL_SUPERIORITY_STUKA_RECON_PLANE","UPG.WEST_GERMAN.AIRBORNE_ASSAULT","UPG.WEST_GERMAN.ASSAULT_ARTILLERY","UPG.WEST_GERMAN.ASSAULT_PIONEER_COMBAT_UPGRADE","UPG.WEST_GERMAN.ASSAULT_PIONEER_PANZERSCHRECK_UPGRADE","UPG.WEST_GERMAN.ASSAULT_PIONEER_REPAIR_UPGRADE","UPG.WEST_GERMAN.BREAKTHROUGH_2","UPG.WEST_GERMAN.BREAKTHROUGH_TACTICS","UPG.WEST_GERMAN.BUILDING_1","UPG.WEST_GERMAN.BUILDING_2","UPG.WEST_GERMAN.BUILDING_3","UPG.WEST_GERMAN.COMMAND_PANTHER","UPG.WEST_GERMAN.COMMAND_ROYAL_TIGER_DISPATCH","UPG.WEST_GERMAN.CONSTRUCT_BASE_BUILDING_UPGRADE","UPG.WEST_GERMAN.FALLSCHRIMJAGER_DISPATCH","UPG.WEST_GERMAN.FIELD_DEFENSES","UPG.WEST_GERMAN.FIRST_SWS_HALFTRACK_LOCKOUT","UPG.WEST_GERMAN.FLAK_GUN_UNLOCK_UPGRADE","UPG.WEST_GERMAN.FLAK_PANZER_DEFENSIVES","UPG.WEST_GERMAN.FLAK_PANZER_IS_SETUP","UPG.WEST_GERMAN.FLAME_HALFTRACK_DISPATCH","UPG.WEST_GERMAN.FLAMMPANZER_38T_HETZER","UPG.WEST_GERMAN.FLARE_ARTILLERY","UPG.WEST_GERMAN.FOR_THE_FATHER_LAND","UPG.WEST_GERMAN.FORWARD_RECIEVERS","UPG.WEST_GERMAN.GOLIATH_REMOTE_CONTROLLED_BOMB","UPG.WEST_GERMAN.HEALING_POINT_UNLOCK_UPGRADE","UPG.WEST_GERMAN.HEAT_SHELLS","UPG.WEST_GERMAN.HEAVY_FORTIFICATIONS","UPG.WEST_GERMAN.HOWITZER_105MM_EMPLACEMENT_OKW","UPG.WEST_GERMAN.HOWITZER_105MM_OFFMAP_BARRAGE","UPG.WEST_GERMAN.INFILTRATION_TACTICS","UPG.WEST_GERMAN.INFRARED_STG44","UPG.WEST_GERMAN.JAEGER_LIGHT_INFANTRY_RECON_DISPATCH","UPG.WEST_GERMAN.JAGDTIGER","UPG.WEST_GERMAN.JAGDTIGER_ABILITY_AP_LOCK_OUT","UPG.WEST_GERMAN.JAGDTIGER_ABILITY_BARRAGE_LOCK_OUT","UPG.WEST_GERMAN.JAGDTIGER_ENGINE_IMPROVEMENTS_I_MP","UPG.WEST_GERMAN.KING_TIGER_TOP_GUNNER_MP","UPG.WEST_GERMAN.MEDIC_HEALING_MP","UPG.WEST_GERMAN.MEDICAL_SUPPLIES_0_USES_REMAINING","UPG.WEST_GERMAN.MEDICAL_SUPPLIES_1_USE_REMAINING","UPG.WEST_GERMAN.MEDICAL_SUPPLIES_2_USES_REMAINING","UPG.WEST_GERMAN.MG34_DISPATCH","UPG.WEST_GERMAN.OKW_SECTOR_ASSAULT","UPG.WEST_GERMAN.OSTWIND_DISPATCH","UPG.WEST_GERMAN.PANZER_IV_GROUP_DISPATCH","UPG.WEST_GERMAN.PANZER_IV_SIDE_SKIRTS_MP","UPG.WEST_GERMAN.PANZERFUSILER_DISPATCH","UPG.WEST_GERMAN.PANZERFUSILIER_G43","UPG.WEST_GERMAN.PANZERSCHRECK_UNLOCKED","UPG.WEST_GERMAN.PYRO_VOLKS","UPG.WEST_GERMAN.RADIO_SILENCE","UPG.WEST_GERMAN.RECOUP_ACTIVE","UPG.WEST_GERMAN.RECOUP_LOSS","UPG.WEST_GERMAN.REPAIR_ENGINEERS_MP","UPG.WEST_GERMAN.REPAIR_POINT_UNLOCK_UPGRADE","UPG.WEST_GERMAN.RESOURCE_POINT_SIPHON","UPG.WEST_GERMAN.RETREAT_POINT_UNLOCK_UPGRADE","UPG.WEST_GERMAN.ROCKET_BARRAGE","UPG.WEST_GERMAN.SDKFZ_251_HALFTRACK_FLAMMPANZERWAGEN_UPGRADE_MP_2","UPG.WEST_GERMAN.SIGNAL_FLAGS","UPG.WEST_GERMAN.SIPHON_LOCK_OUT","UPG.WEST_GERMAN.STURMTIGER_DISPATCH","UPG.WEST_GERMAN.SWS_INTERVAL_UNLOCK","UPG.WEST_GERMAN.SWS_STARTING_DISPATCH_UNLOCK","UPG.WEST_GERMAN.TANK_COMMANDER","UPG.WEST_GERMAN.TANK_COMMANDER_UNLOCK","UPG.WEST_GERMAN.TANK_GRENADE","UPG.WEST_GERMAN.TERROR_OFFICER","UPG.WEST_GERMAN.THROUGH_SALVAGE","UPG.WEST_GERMAN.URBAN_ASSAULT_LIGHT_INFANTRY","UPG.WEST_GERMAN.VALIANT_ASSAULT","UPG.WEST_GERMAN.VEHICLE_CRITICAL_REPAIR","UPG.WEST_GERMAN.VOLKS_FLAMETHROWER_MP","UPG.WEST_GERMAN.VOLKS_STG44_UPGRADE","UPG.WEST_GERMAN.WAFFEN_INFRARED_STG44","UPG.WEST_GERMAN.WAFFEN_MG34_LMG_MP","UPG.WEST_GERMAN.WARNING_FLARES","UPG.WEST_GERMAN.WG_HETZER_TOP_GUNNER_MP","UPG.WEST_GERMAN.WG_PANTHER_TOP_GUNNER_MP","UPG.WEST_GERMAN.ZEROING_ARTILLERY","ABILITY.GLOBAL.ARMY_ITEM_GLOBAL_COVER_TRAINING","ABILITY.GLOBAL.ARMY_ITEM_SOVIET_NOT_GONNA_DIE_LIKE_THIS","ABILITY.GLOBAL.AT_76MM_SINGLE_SHOT_ACCURATE","ABILITY.GLOBAL.BLIZZARD_EFFECT","ABILITY.GLOBAL.BLIZZARD_EFFECT_DEEP_SNOW_CAMO","ABILITY.GLOBAL.BLIZZARD_EFFECT_MORTARS","ABILITY.GLOBAL.BLIZZARD_EFFECT_VEHICLE","ABILITY.GLOBAL.BLIZZARD_HOWITZER","ABILITY.GLOBAL.BONUS_0","ABILITY.GLOBAL.BONUS_1","ABILITY.GLOBAL.BONUS_2","ABILITY.GLOBAL.BONUS_2B","ABILITY.GLOBAL.BONUS_3","ABILITY.GLOBAL.BONUS_3B","ABILITY.GLOBAL.BONUS_3C","ABILITY.GLOBAL.BONUS_BACK","ABILITY.GLOBAL.BREAKTHROUGH_TOW","ABILITY.GLOBAL.CAMOUFLAGE_CONSTRUCTION","ABILITY.GLOBAL.CAMOUFLAGE_CONSTRUCTION_ANIA","ABILITY.GLOBAL.CAMPAIGN_STUKA_STRAFE_LONG","ABILITY.GLOBAL.CAPTURE_SPEED","ABILITY.GLOBAL.COMMISSAR_SHOT_227","ABILITY.GLOBAL.COMMISSAR_SHOT_227_ENEMY","ABILITY.GLOBAL.COMMISSAR_SQUAD_TOW","ABILITY.GLOBAL.CONVOY_BUILDBARRICADE","ABILITY.GLOBAL.COVER_ANIMATION_TEST","ABILITY.GLOBAL.DIG_OUT_OF_MUD","ABILITY.GLOBAL.DISPATCH_BRIDGE_PARTISAN","ABILITY.GLOBAL.DISPATCH_BRIDGE_PARTISAN_AT","ABILITY.GLOBAL.DISPATCH_BRIDGE_PARTISAN_HMG","ABILITY.GLOBAL.DISPATCH_BRIDGE_PARTISAN_MORTAR","ABILITY.GLOBAL.DROP_WEAPONS","ABILITY.GLOBAL.FATALITY_BULLSEYE","ABILITY.GLOBAL.FATALITY_COORDINATED_MORTAR_BOMBARDMENT","ABILITY.GLOBAL.FATALITY_DEFAULT","ABILITY.GLOBAL.FATALITY_HOWITZER_105MM_BARRAGE","ABILITY.GLOBAL.FATALITY_HOWITZER_240MM","ABILITY.GLOBAL.FATALITY_LIGHT_SUPPORT_ARTILLERY","ABILITY.GLOBAL.FATALITY_PROTOTYPE","ABILITY.GLOBAL.FATALITY_RAILWAY_GUN_ARTILLERY","ABILITY.GLOBAL.FATALITY_TIME_ON_TARGET_ARTILLERY","ABILITY.GLOBAL.FIRE_DOT","ABILITY.GLOBAL.FLAME_THROWER_ABILITY","ABILITY.GLOBAL.FORWARD_REPAIR_STATION_TOW","ABILITY.GLOBAL.FROZEN_ICON_TEST","ABILITY.GLOBAL.GARRISONED_SQUAD_FACING","ABILITY.GLOBAL.GARRISONED_SQUAD_FACING_UNSET","ABILITY.GLOBAL.HEAL_IN_COVER","ABILITY.GLOBAL.HOWITZER_105MM_BARRAGE_SHORT","ABILITY.GLOBAL.HOWITZER_105MM_BARRAGE_SHORT_PRECISE","ABILITY.GLOBAL.HOWITZER_105MM_DUMMY","ABILITY.GLOBAL.IL_2_ATTACK_STRAFE_HMG","ABILITY.GLOBAL.IL_2_PRECISION_BOMB_STRIKE_TOW","ABILITY.GLOBAL.KV_2_TOW","ABILITY.GLOBAL.LIGHT_ARTILLERY_M10","ABILITY.GLOBAL.M01_IL2_DOGFIGHT_PASS","ABILITY.GLOBAL.M01_IL2_PRECISION_BOMB_STRIKE","ABILITY.GLOBAL.M01_MEDIC_HEAL","ABILITY.GLOBAL.M01_MEDIC_HEAL_CONSTANT","ABILITY.GLOBAL.M01_MORTAR_SINGLE_PRECISE_HARMLESS","ABILITY.GLOBAL.M01_SPRINT_OUT_OF_COMBAT","ABILITY.GLOBAL.M01_STUKA_BOMBING_STRIKE","ABILITY.GLOBAL.M01_STUKA_DOGFIGHT_PASS","ABILITY.GLOBAL.M01_STUKA_STRAFE_FAST","ABILITY.GLOBAL.M01_WOUNDED","ABILITY.GLOBAL.M11_LIGHT_FIRE","ABILITY.GLOBAL.M12_HOWITZER_BARRAGE","ABILITY.GLOBAL.M14_GUARD_TROOP_DISPATCH","ABILITY.GLOBAL.M14_OFF_MAP_SMOKE_BARRAGE","ABILITY.GLOBAL.M24_ANTI_TANK_BUNDLED_GRENADE","ABILITY.GLOBAL.MECHANIZED_ASSAULT_GROUP_TOW","ABILITY.GLOBAL.MOLTKE_DET_PACK","ABILITY.GLOBAL.MUDDY_POINT","ABILITY.GLOBAL.NO_RETREAT_NO_SURRENDER_TOW","ABILITY.GLOBAL.OFF_MAP_ARTILLERY","ABILITY.GLOBAL.OFF_MAP_ARTILLERY_PERCISE","ABILITY.GLOBAL.OFF_MAP_ARTILLERY_PERCISE_FAST","ABILITY.GLOBAL.OFF_MAP_ARTILLERY_PERCISE_SEP","ABILITY.GLOBAL.OFF_MAP_ARTY_SINGLE_SHOT_INSTANT","ABILITY.GLOBAL.OFFICER_AIR_RECON","ABILITY.GLOBAL.OFFICER_CLOSE_AIR_SUPPORT","ABILITY.GLOBAL.OFFICER_FRAGMENTATION_BOMB","ABILITY.GLOBAL.PARTISAN_REPAIR_ABILITY","ABILITY.GLOBAL.PARTISAN_SPRINT","ABILITY.GLOBAL.PREVENT_SUPPRESSION","ABILITY.GLOBAL.PRODUCTION_SPEED","ABILITY.GLOBAL.RADIO_TOWER_REVEAL","ABILITY.GLOBAL.RAILWAY_GUN_ARTILLERY_SINGLE","ABILITY.GLOBAL.READY_UP","ABILITY.GLOBAL.REV_OUT_OF_MUD","ABILITY.GLOBAL.SHOCK_TROOP_FULL_AUTO","ABILITY.GLOBAL.SP_DROP_WEAPONS","ABILITY.GLOBAL.SP_OFF_MAP_ARTY_HARMLESS","ABILITY.GLOBAL.SP_OFF_MAP_ARTY_REAL","ABILITY.GLOBAL.SP_SINGLE_SHOT_MORTAR","ABILITY.GLOBAL.SP_SINGLE_SHOT_MORTAR_M01","ABILITY.GLOBAL.SP_SPRINT","ABILITY.GLOBAL.SP_SPRINT_TOGGLEABLE","ABILITY.GLOBAL.SPY_NETWORK_TOW","ABILITY.GLOBAL.STUKA_BOMBING_STRIKE_W_SMOKE","ABILITY.GLOBAL.STUKA_FAKE_BOMBING_STRIKE","ABILITY.GLOBAL.STUKA_FAKE_STRAFE","ABILITY.GLOBAL.STUKA_STRAFE","ABILITY.GLOBAL.STUKA_STRAFE_M02","ABILITY.GLOBAL.STUKA_STRAFE_M09","ABILITY.GLOBAL.TANK_BUSTER_CONSCRIPT_DISPATCH","ABILITY.GLOBAL.TOW_AIRFIELD_DISPATCH_KV1","ABILITY.GLOBAL.TOW_AIRFIELD_DISPATCH_KV2","ABILITY.GLOBAL.TOW_AIRFIELD_DISPATCH_KV8","ABILITY.GLOBAL.TOW_AIRFIELD_DISPATCH_T34","ABILITY.GLOBAL.TOW_AIRFIELD_STUKA_BOMBING_RUN","ABILITY.GLOBAL.TOW_STALINGRAD_DISPATCH_IS2","ABILITY.GLOBAL.TOW_STALINGRAD_DISPATCH_KAT","ABILITY.GLOBAL.TOW_STALINGRAD_DISPATCH_KV1","ABILITY.GLOBAL.TOW_STALINGRAD_DISPATCH_SU76","ABILITY.GLOBAL.TOW_STALINGRAD_DISPATCH_T34","ABILITY.GLOBAL.TOW_STALINGRAD_DISPATCH_T70","ABILITY.GLOBAL.TRANSFER_ORDERS","ABILITY.GLOBAL.TROOP_TRAINING_TOW","ABILITY.GLOBAL.TUNSTEN_SHELLS_TOW","ABILITY.GLOBAL.WARMING_ANIMATION_TEST","ABILITY.GLOBAL.WE_SURRENDER","SLOT_ITEM.AEC_TARGET_OPTICS_SLOT_ITEM_MP","SLOT_ITEM.AEC_TARGET_TURRET_SLOT_ITEM_MP","SLOT_ITEM.AEC_TREAD_SHOT_MP","SLOT_ITEM.AEF_CALLIOPE_DUMMY_SLOT_ITEM","SLOT_ITEM.AEF_SHERMAN_DUMMY_SLOT_ITEM","SLOT_ITEM.AEF_VEHICLE_ENTERS_INFANTRY_BUFF_APPLIED","SLOT_ITEM.AEF_WHITE_PHOSPHOROUS_MORTAR_UI_ITEM","SLOT_ITEM.AEF_WHITE_PHOSPHOROUS_SHELLS_UI_ITEM","SLOT_ITEM.AEF_WRENCH_ICON_SLOT_ITEM","SLOT_ITEM.AMBUSH_CAMO_PORTRAIT_ICON_ITEM","SLOT_ITEM.AMBUSH_CAMO_SLOT_ITEM","SLOT_ITEM.AMBUSH_CAMO_VISUAL_ITEM","SLOT_ITEM.ARMOR_BLITZ_ITEM","SLOT_ITEM.ASSAULT_ENGINEER_FLAMETHROWER","SLOT_ITEM.ASSAULT_MOVE_ITEM","SLOT_ITEM.AT_76MM_HE_ROUND_ITEM","SLOT_ITEM.AT_76MM_HE_ROUND_ITEM_MP","SLOT_ITEM.AVRE_CREW_SHRAPNEL_GRENADE_SLOT_ITEM_MP","SLOT_ITEM.AVRE_RELOAD_ACTIVE","SLOT_ITEM.AVRE_SPIGOT_MORTAR_MP","SLOT_ITEM.AVRE_SPIGOT_MORTAR_VET_3_MP","SLOT_ITEM.AXIS_ASSAULT_GRENADIER_GRENADE","SLOT_ITEM.AXIS_BLINDING_GRENADE","SLOT_ITEM.AXIS_BLINDING_GRENADE_MP","SLOT_ITEM.AXIS_PANZER_GRENADIER_GRENADE","SLOT_ITEM.AXIS_PANZER_GRENADIER_GRENADE_MP","SLOT_ITEM.AXIS_PG_GRENADE_CAMPAIGN","SLOT_ITEM.AXIS_PG_GRENADE_CAMPAIGN_MP","SLOT_ITEM.AXIS_PG_GRENADE_TUTORIAL","SLOT_ITEM.BAZOOKA_MP","SLOT_ITEM.BLENDKORPER_2H_SMOKE_GRENADE_ITEM_MP","SLOT_ITEM.BOFOR_40MM_AA_MODE_ACTIVATED_MAIN_GUN","SLOT_ITEM.BOFORS_HOLD_FULL","SLOT_ITEM.BOFORS_SUPPRESSIVE_BARRAGE_ROUND_ITEM_MP","SLOT_ITEM.BOFORS_SUPPRESSIVE_BARRAGE_ROUND_ITEM_VICTOR_TARGET_MP","SLOT_ITEM.BOOT_STOMP","SLOT_ITEM.BOYS_ANTI_TANK_RIFLE_MP","SLOT_ITEM.BOYS_ANTI_TANK_RIFLE_SNIPER_MP","SLOT_ITEM.BOYS_SNIPER_RIFLE_ITEM_MP","SLOT_ITEM.BREN_LMG_ICON_DUMMY","SLOT_ITEM.BRIT_17_POUNDER_FLARE_MP","SLOT_ITEM.BRIT_17_POUNDER_HOLD_FULL","SLOT_ITEM.BRIT_17_POUNDER_PIERCING_SHOT_MP","SLOT_ITEM.BRIT_COMMAND_VEHICLE_ITEM","SLOT_ITEM.BRIT_CROC_DUMMY_SLOT_ITEM","SLOT_ITEM.BRIT_EMPLACEMENT_BRACED","SLOT_ITEM.BRIT_EMPLACEMENT_HOLD_FIRE","SLOT_ITEM.BRIT_FIREFLY_TULIP_SLOT_ITEM","SLOT_ITEM.BRIT_HOLD_THE_LINE","SLOT_ITEM.BRIT_MORTAR_PIT_HOLD_FULL","SLOT_ITEM.BRIT_REINFORCE_THE_FRONT","SLOT_ITEM.BRIT_SNIPER_BOYS_ANTI_TANK_CRITICAL_SHOT_MP","SLOT_ITEM.BRIT_UNIT_LOCK_OUT_SLOT_ITEM","SLOT_ITEM.BRUMMBAR_CRITICAL_SHOT_MP","SLOT_ITEM.CAPTAIN_GARRISON_ITEM","SLOT_ITEM.CAPTURE_INTEL_SLOTITEM","SLOT_ITEM.CARRIER_SUPPRESS_ACTIVE","SLOT_ITEM.CAVALRY_AT_SATCHEL_ITEM","SLOT_ITEM.CENTUAR_AA_MODE_ACTIVATED_MAIN_GUN","SLOT_ITEM.CHURUCHILL_SUPPORT_NEGATE","SLOT_ITEM.COMET_SMOKE_SHELL_SHOT_MP","SLOT_ITEM.COMET_SMOKE_SHELL_WP_SHOT_MP","SLOT_ITEM.COMMAND_PANTHER_AURA","SLOT_ITEM.COMMANDO_BREN_LMG_MP","SLOT_ITEM.COMMANDO_DE_LISLE_CARBINE_MP","SLOT_ITEM.COMMANDO_DE_LISLE_CARBINE_SLOT_MP","SLOT_ITEM.COMMANDO_N69_GRENADE_MP","SLOT_ITEM.COMMANDO_THOMPSON_MP","SLOT_ITEM.COMMANDO_THOMPSON_SLOT_MP","SLOT_ITEM.COMMISSAR_SHOT_227","SLOT_ITEM.COMMISSAR_SHOT_227_ENEMY","SLOT_ITEM.CONSCRIPT_MOLOTOV","SLOT_ITEM.CONSCRIPT_MOLOTOV_MP","SLOT_ITEM.COVER_SMOKE_GRENADE_ITEM","SLOT_ITEM.DEF_MOVE_ITEM","SLOT_ITEM.DOUBLE_SWEEP","SLOT_ITEM.DP_28_LIGHT_MACHINE_GUN_PACKAGE","SLOT_ITEM.DP_28_LIGHT_MACHINE_GUN_PACKAGE_MOVING_MP","SLOT_ITEM.DP_28_LIGHT_MACHINE_GUN_PACKAGE_MOVING_NO_PRONE_MP","SLOT_ITEM.DP_28_LIGHT_MACHINE_GUN_PACKAGE_MP","SLOT_ITEM.DSHK38_TURRET_MOUNTED_IS2","SLOT_ITEM.DSHK38_TURRET_MOUNTED_IS2_MP","SLOT_ITEM.DSHK38_TURRET_MOUNTED_ISU152","SLOT_ITEM.DSHK38_TURRET_MOUNTED_ISU152_MP","SLOT_ITEM.DUMMY_FORTIFIED__SLOT_ITEM","SLOT_ITEM.DUMMY_SLOT_ITEM","SLOT_ITEM.DUMMY_SLOT_ITEM_QUAD","SLOT_ITEM.ELEFANT_CRITICAL_SHOT_MP","SLOT_ITEM.ENGINEER_SALVAGE_KIT_DUMMY","SLOT_ITEM.FLAK_HALFTRACK_ICON_ITEM","SLOT_ITEM.FLAMETHROWER_ROKS3_ACCESSORY","SLOT_ITEM.FLAMETHROWER_ROKS3_FAKE","SLOT_ITEM.FLAMETHROWER_ROKS3_ITEM","SLOT_ITEM.FLAMETHROWER_ROKS3_ITEM_MP","SLOT_ITEM.FOR_THE_FATHERLAND_ACTIVE","SLOT_ITEM.FRWD_HQ_SMOKE_MARKER_GRENADE_MP","SLOT_ITEM.FWD_HQ_EMPLACEMENT_SUPPORT","SLOT_ITEM.G43_SNIPER_INCENDIARY_SLOT_ITEM_MP","SLOT_ITEM.GENERIC_MG34_LMG_MP","SLOT_ITEM.GRENADIER_MG42_LMG","SLOT_ITEM.GRENADIER_MG42_LMG_MOVING_MP","SLOT_ITEM.GRENADIER_MG42_LMG_MOVING_NO_PRONE_MP","SLOT_ITEM.GRENADIER_MG42_LMG_MP","SLOT_ITEM.GRENADIER_PANZERFAUST","SLOT_ITEM.GRENADIER_PANZERFAUST_MP","SLOT_ITEM.GROUND_ATTACK_SNIPER_RIFLE_ITEM","SLOT_ITEM.GUARD_TROOP_ASSAULT_PACKAGE","SLOT_ITEM.HALFTRACK_FLAMETHROWER_LEFT","SLOT_ITEM.HALFTRACK_FLAMETHROWER_LEFT_MP","SLOT_ITEM.HALFTRACK_FLAMETHROWER_RIGHT","SLOT_ITEM.HALFTRACK_FLAMETHROWER_RIGHT_MP","SLOT_ITEM.HETZER_FLAMETHROWER_ITEM_MP","SLOT_ITEM.HULLDOWN_SLOT_ITEM","SLOT_ITEM.INFRARED_SQUAD_SETUP","SLOT_ITEM.ISU_PIERCING_SHOT_ROUND_ITEM","SLOT_ITEM.ISU_PIERCING_SHOT_ROUND_ITEM_MP","SLOT_ITEM.JAEGER_G43_RIFLE_ITEM","SLOT_ITEM.JAEGER_G43_RIFLE_ITEM_MP","SLOT_ITEM.JAEGER_LIGHT_RECON_G43","SLOT_ITEM.JAEGER_PANZERGREN_G43_RIFLE_ITEM_MP","SLOT_ITEM.KAR_98K_ANTITANK_RIFLE_GRENADE_SLOT_ITEM","SLOT_ITEM.KAR_98K_ANTITANK_RIFLE_GRENADE_SLOT_ITEM_MP","SLOT_ITEM.KAR_98K_RIFLE_GRENADE_SLOT_ITEM","SLOT_ITEM.KAR_98K_RIFLE_GRENADE_SLOT_ITEM_MP","SLOT_ITEM.KAR_98K_RIFLE_GRENADE_SLOT_ITEM_TUTORIAL","SLOT_ITEM.KV_8_45MM_GUN_ITEM","SLOT_ITEM.KV_8_ATO_41_FLAMETHROWER_ITEM_MP","SLOT_ITEM.KWK_20MM_222_ARMORED_CAR_MP","SLOT_ITEM.LAND_MATTRESS_25LB_ROCKET","SLOT_ITEM.LAND_MATTRESS_60LB_ROCKET","SLOT_ITEM.LAND_MATTRESS_EMPTY","SLOT_ITEM.LAND_MATTRESS_PHOSPHORUS_ROCKET","SLOT_ITEM.LAND_MATTRESS_ROCKET_MARKER","SLOT_ITEM.LEE_ENFIELD_RIFLE_GRENADE_SLOT_ITEM_MP","SLOT_ITEM.LIEUTENANT_GARRISON_ITEM","SLOT_ITEM.LIGHT_AT_MINE_RECENTLY_HIT_HEAVY_VEHICLE","SLOT_ITEM.LIGHT_AT_MINE_RECENTLY_HIT_LIGHT_VEHICLE","SLOT_ITEM.M01_CONSCRIPT_MOSIN_NAGANT","SLOT_ITEM.M15A1_AA_MODE_ACTIVATED","SLOT_ITEM.M15A1_AA_MODE_ACTIVATED_LEFT","SLOT_ITEM.M15A1_AA_MODE_ACTIVATED_MAIN_GUN","SLOT_ITEM.M17_RIFLE_GRENADE_SLOT_ITEM_MP","SLOT_ITEM.M1919A6_LMG_ICON_DUMMY","SLOT_ITEM.M1C_GARAND","SLOT_ITEM.M1C_PATHFINDER_GARAND","SLOT_ITEM.M23_SMOKE_STREAM_GRENADE_ANTI_TANK_ITEM_MP","SLOT_ITEM.M23_SMOKE_STREAM_GRENADE_ITEM_MP","SLOT_ITEM.M24_ANTI_TANK_GRENADIER_GRENADE","SLOT_ITEM.M2HB_50CAL_SHERMAN","SLOT_ITEM.M2HB_TURRET_MOUNTED_M8_MP","SLOT_ITEM.M2HB_TURRET_MOUNTED_SHERMAN_MP","SLOT_ITEM.M5_STUART_DAMAGE_ENGINE_SHOT_SLOT_ITEM_MP","SLOT_ITEM.M5_STUART_SHELL_SHOCK_SHOT_SLOT_ITEM_MP","SLOT_ITEM.M8_CANISTER_SHOT_SLOT_ITEM_MP","SLOT_ITEM.M8_GREYHOUND_RECON_ACTIVATED","SLOT_ITEM.MAJOR_GARRISON_ITEM","SLOT_ITEM.MG34_PINTLE_HETZER","SLOT_ITEM.MG42_TURRET_MOUNTED_BRUMMBAR","SLOT_ITEM.MG42_TURRET_MOUNTED_BRUMMBAR_MP","SLOT_ITEM.MG42_TURRET_MOUNTED_KING_TIGER_MP","SLOT_ITEM.MG42_TURRET_MOUNTED_PANTHER","SLOT_ITEM.MG42_TURRET_MOUNTED_PANTHER_MP","SLOT_ITEM.MG42_TURRET_MOUNTED_PANTHER_WG_MP","SLOT_ITEM.MG42_TURRET_MOUNTED_PZIV","SLOT_ITEM.MG42_TURRET_MOUNTED_PZIV_MP","SLOT_ITEM.MG42_TURRET_MOUNTED_STUGIV","SLOT_ITEM.MG42_TURRET_MOUNTED_STUGIV_MP","SLOT_ITEM.MG42_TURRET_MOUNTED_TIGER","SLOT_ITEM.MG42_TURRET_MOUNTED_TIGER_MP","SLOT_ITEM.MG42_TURRET_MOUNTED_TIGER_TOW","SLOT_ITEM.MINESWEEPER","SLOT_ITEM.MORTAR_FLARE_MP","SLOT_ITEM.MOSIN_NAGANT_SNIPER_RIFLE_ITEM","SLOT_ITEM.MOSIN_NAGANT_SNIPER_RIFLE_ITEM_MP","SLOT_ITEM.OBERSOLDATEN_MG34_LMG_MOVING_MP","SLOT_ITEM.OBERSOLDATEN_MG34_LMG_MOVING_NO_PRONE_MP","SLOT_ITEM.OBERSOLDATEN_MP44_INFARED","SLOT_ITEM.OPEL_SUPPLY_SLOT_ITEM","SLOT_ITEM.PAK40_CRITICAL_SHOT_MP","SLOT_ITEM.PAK43_CRITICAL_SHOT_MP","SLOT_ITEM.PANZER_GRENADIER_MP44_ITEM","SLOT_ITEM.PANZER_GRENADIER_MP44_ITEM_MP","SLOT_ITEM.PANZERBUSCHE_39","SLOT_ITEM.PANZERBUSCHE_39_MP","SLOT_ITEM.PANZERFUISILIER_FLARE_MP","SLOT_ITEM.PANZERFUSILIER_AT_RIFLE_GRENADE","SLOT_ITEM.PANZERFUSILIER_G43","SLOT_ITEM.PANZERFUSILIER_GRENADE","SLOT_ITEM.PANZERSHRECK","SLOT_ITEM.PANZERSHRECK_AT_WEAPON_ITEM","SLOT_ITEM.PANZERSHRECK_DESTROY_ENGINE","SLOT_ITEM.PANZERSHRECK_MP","SLOT_ITEM.PANZERSHRECK_SLOT1","SLOT_ITEM.PANZERSHRECK_SLOT1_MP","SLOT_ITEM.PANZERSHRECK_SLOT2","SLOT_ITEM.PANZERSHRECK_SLOT2_MP","SLOT_ITEM.PARADROP_REINFORCE_ITEM","SLOT_ITEM.PARATROOPER_M1919A6_LMG_MOVING_NO_PRONE_MP","SLOT_ITEM.PARATROOPER_M1919A6_LMG_MP","SLOT_ITEM.PARATROOPER_MK2_GRENADE_MP","SLOT_ITEM.PARATROOPER_THOMPSON_DUMMY","SLOT_ITEM.PARATROOPER_THOMPSON_MP","SLOT_ITEM.PARTISAN_DP_28_LIGHT_MACHINE_GUN_PACKAGE_MP","SLOT_ITEM.PARTISAN_MG42_LMG_MP","SLOT_ITEM.PATHFINDERS_SNIPER_ITEM","SLOT_ITEM.PENAL_TROOP_SATCHEL_CHARGE_ITEM_MP","SLOT_ITEM.PERSHING_HVAP_PIERCING_ITEM_MP","SLOT_ITEM.PIAT_SPIGOT_MORTAR_MP","SLOT_ITEM.PIONEER_FLAMETHROWER","SLOT_ITEM.PIONEER_FLAMETHROWER_ABILITY","SLOT_ITEM.PIONEER_FLAMETHROWER_ABILITY_MP","SLOT_ITEM.PIONEER_FLAMETHROWER_MP","SLOT_ITEM.PIONEER_STUN_GRENADE_MP","SLOT_ITEM.PM_AEF_OFFENSIVE_PUNCH_ITEM","SLOT_ITEM.PPSH41_ASSAULT_PACKAGE","SLOT_ITEM.PPSH41_ASSAULT_PACKAGE_DUMMY_ITEM_MP","SLOT_ITEM.PPSH41_ASSAULT_PACKAGE_MP","SLOT_ITEM.PTRS_41_ANTI_TANK_RIFLE_CONSCRIPT_MP","SLOT_ITEM.PTRS_41_ANTI_TANK_RIFLE_GUARD_TROOP","SLOT_ITEM.PTRS_41_ANTI_TANK_RIFLE_GUARD_TROOP_ASSAULT_MP","SLOT_ITEM.PTRS_41_ANTI_TANK_RIFLE_GUARD_TROOP_MP","SLOT_ITEM.PTRS_41_ANTI_TANK_RIFLE_PARTISAN_TROOP_MP","SLOT_ITEM.PUMA_AIMED_SHOT_MP","SLOT_ITEM.PUMA_CRITICAL_SHOT_MP","SLOT_ITEM.RANGER_PANZERSHRECK_MP","SLOT_ITEM.REAR_ECHELON_RIFLE_GRENADE_ACTIVATED","SLOT_ITEM.REAR_ECHELON_RIFLE_VOLLEY_FIRE","SLOT_ITEM.RECOUP_ACTIVE","SLOT_ITEM.RGD_1_SMOKE_GRENADE_ITEM","SLOT_ITEM.RGD_1_SMOKE_GRENADE_ITEM_MP","SLOT_ITEM.RGD_33_SLEEVED_GRENADE_ITEM","SLOT_ITEM.RGD_33_SLEEVED_GRENADE_ITEM_LONGTIMER","SLOT_ITEM.RGD_33_SLEEVED_GRENADE_ITEM_MP","SLOT_ITEM.RIFLEMAN_AT_RIFLE_GRENADE","SLOT_ITEM.RIFLEMEN_30_CAL","SLOT_ITEM.RIFLEMEN_FLARE","SLOT_ITEM.RIFLEMEN_M1918_BAR_MP","SLOT_ITEM.RIFLEMEN_MK2_GRENADE_MP","SLOT_ITEM.RIFLEMEN_TRAINING_DUMMY_CARBINE","SLOT_ITEM.RIFLEMEN_TRAINING_SATCHEL_ITEM","SLOT_ITEM.ROKS_2_FLAMETHROWER_ITEM","SLOT_ITEM.ROKS_2_FLAMETHROWER_ITEM_MP","SLOT_ITEM.RPG_40_ANTI_TANK_GRENADE_MP","SLOT_ITEM.RPG_43_ANTI_TANK_GRENADE","SLOT_ITEM.RPG_43_ANTI_TANK_GRENADE_MP","SLOT_ITEM.SAPPER_BREN_LIGHT_MACHINE_GUN_MP","SLOT_ITEM.SAPPER_STUN_GRENADE_MP","SLOT_ITEM.SAPPER_VICKERS_K_LIGHT_MACHINE_GUN_MP","SLOT_ITEM.SATCHEL_CHARGE_ITEM_MP","SLOT_ITEM.SELF_REPAIR_DUMMY_SLOT_ITEM","SLOT_ITEM.SHERMAN_BATTLE_GROUP_ITEM_MP","SLOT_ITEM.SHOCK_TROOP_RG_42_GRENADE","SLOT_ITEM.SHOCK_TROOP_RG_42_GRENADE_MP","SLOT_ITEM.SIPHON_ACTIVE","SLOT_ITEM.SNIPER_FLARE_MP","SLOT_ITEM.SNIPER_RIFLE_ITEM","SLOT_ITEM.SNIPER_RIFLE_ITEM_MP","SLOT_ITEM.SNIPER_SMOKE_MARKER_GRENADE_MP","SLOT_ITEM.SNIPER_SUPPRESSIVE_VOLLEY_MP","SLOT_ITEM.SOVIET_FLAG","SLOT_ITEM.SPEARHEAD_ITEM","SLOT_ITEM.STALK_ITEM","SLOT_ITEM.STORMTROOPER_MP44_MP","SLOT_ITEM.STUG_CRITICAL_SHOT_MP","SLOT_ITEM.STUG_ELEFANT_PAK40_PAK43_BRUMMBAR_CRITICAL_SHOT","SLOT_ITEM.STUG_ELEFANT_PAK40_PAK43_BRUMMBAR_CRITICAL_SHOT_MP","SLOT_ITEM.STURMTIGER_RELOAD_ACTIVE","SLOT_ITEM.SU76M_HE_ROUND_ITEM","SLOT_ITEM.SU76M_HE_ROUND_ITEM_MP","SLOT_ITEM.SUPPORT_SQUAD_SETUP","SLOT_ITEM.SUPPRESS_FIRE_ITEM","SLOT_ITEM.SWS_LOCKDOWN_SETUP","SLOT_ITEM.TANK_HUNTER_SHOCK_BAZOOKA_VET","SLOT_ITEM.TIGER_ACE_CRITICAL_SHOT_MP","SLOT_ITEM.TIGER_FLARE_TOW","SLOT_ITEM.TOMMY_BREN_LIGHT_MACHINE_GUN_MP","SLOT_ITEM.TOMMY_FLAMETHROWER","SLOT_ITEM.TOMMY_GAMMON_BOMB_HEAVY","SLOT_ITEM.TOMMY_GAMMON_BOMB_MEDIUM","SLOT_ITEM.TOMMY_HEAT_GRENADE","SLOT_ITEM.TOMMY_MILLS_BOMB","SLOT_ITEM.TOMMY_MILLS_BOMB_ASSAULT","SLOT_ITEM.TOMMY_OFFICER_SMOKE_MARKER_GRENADE_MP","SLOT_ITEM.TOMMY_SCOPED_RIFLE_ITEM_MP","SLOT_ITEM.TOMMY_STEN_SMG","SLOT_ITEM.TROOP_SUPPORT_DUMMY_MEDIC","SLOT_ITEM.UNIVERSAL_CARRIER_VICKERS_K_PACKAGE_MP","SLOT_ITEM.UNIVERSAL_CARRIER_VICKERS_MMG_SUPPRESSIVE_MP","SLOT_ITEM.URBAN_ASSAULT_FLAMETHROWER_MP","SLOT_ITEM.URBAN_ASSAULT_SATCHEL_CHARGE_ITEM_MP","SLOT_ITEM.VALENTINE_SMOKE_MARKER_GRENADE_MP","SLOT_ITEM.VICKERS_K_LIGHT_MACHINE_GUN_MP","SLOT_ITEM.VOLKSGRENADIER_FIRE_GRENADE_MP","SLOT_ITEM.VOLKSGRENADIER_GRENADE_MP","SLOT_ITEM.VOLKSGRENADIER_MP44_ITEM_MP","SLOT_ITEM.VOLKSGRENADIER_PANZERFAUST_MP","SLOT_ITEM.VOLKSGRENADIER_PANZERFAUST_VET_4_MP","SLOT_ITEM.WAFFEN_BUNDLED_ASSAULT_GRENADE","SLOT_ITEM.WEST_GERMAN_MINESWEEPER","SLOT_ITEM.WG_BLENDKORPER_SMOKE_UI_ITEM","SLOT_ITEM.WG_PANZER_IV_ARMORED_SKIRTS","CRIT._NO_CRITICAL","CRIT._NO_CRITICAL_MINE","CRIT._NO_CRITICAL_REAR","CRIT._SP_ANIA_EXPLOSIVE","CRIT._SP_ANIA_KILLED","CRIT.ASSAULT_MODIFIERS","CRIT.ATTACK_PLAN_MODIFIERS","CRIT.AXIS_ASSAULT_MODIFIERS","CRIT.BRIDGE_DEMOLITION_MAKE_WRECK","CRIT.BRIDGE_MAKE_WRECK","CRIT.BUILDING_ABANDON","CRIT.BUILDING_BRACED","CRIT.BUILDING_DESTROY","CRIT.BUILDING_DESTROY_CONSTRUCTION","CRIT.BUILDING_DESTROY_SUPPLY_CENTER","CRIT.BUILDING_FIRE_DAMAGE_DOT","CRIT.BUILDING_FIRE_DAMAGE_PANEL","CRIT.BUILDING_PANEL_DAMAGE_CRITICAL","CRIT.BUILDING_RED_BUILD_TIME_INCREASE","CRIT.BUILDING_STRONG_CRITICAL","CRIT.BUILDING_WEAK_CRITICAL","CRIT.BUILDING_YELLOW_BUILD_TIME_INCREASE","CRIT.BULLET_HIT_CRITICAL","CRIT.BURN","CRIT.BURN_DEATH","CRIT.BURN_DEATH_OUT_OF_CONTROL","CRIT.BURN_WORLD_OBJECT","CRIT.BURN_WORLD_OBJECT_DEATH","CRIT.CAMOUFLAGE_MINE","CRIT.CHURCHILL_TANK_SHOCK_MODIFIERS","CRIT.DETONATE_BANGALORE","CRIT.DETONATE_DEMOLITION_CHARGE","CRIT.DETONATE_MINE","CRIT.EMPLACEMENT_EMPTY","CRIT.EMPLACEMENT_FLAME_CRITICAL","CRIT.EMPLACEMENT_KILL_LOADER","CRIT.EXPLOSIVE_DESTROY","CRIT.GOLIATH_DESTROY","CRIT.HEROIC_CHARGE_FATIGUE","CRIT.MAKE_CASUALTY","CRIT.SOLDIER_BLIND","CRIT.SOLDIER_EXECUTED","CRIT.SOLDIER_EXPLOSIVE_ROUND","CRIT.SOLDIER_FLAMETHROWER_EXPLODE","CRIT.SOLDIER_FORCE_RETREAT","CRIT.SOLDIER_FROZEN","CRIT.SOLDIER_KILLED","CRIT.SOLDIER_KILLED_DEATH_INTENSITY_100","CRIT.SOLDIER_KILLED_DEATH_INTENSITY_30","CRIT.SOLDIER_KILLED_DEATH_INTENSITY_60","CRIT.SOLDIER_KILLED_HMG_DEATH","CRIT.SOLDIER_PIN","CRIT.SOLDIER_SLOW","CRIT.SOLDIER_SNIPED","CRIT.SOLDIER_SNIPED_IN_HALFTRACK","CRIT.SOLDIER_SNIPED_MAKE_CASUALTY","CRIT.SOLDIER_SNIPED_STILL_ALIVE","CRIT.SOLDIER_STUN","CRIT.SOLDIER_SUPPRESS","CRIT.SQUAD_ITEM_DAMAGED","CRIT.STUNNED_CANNOT_SHOOT_10_SECONDS","CRIT.STUNNED_CANNOT_SHOOT_MOVE_10_SECONDS","CRIT.SUPPLY_DROP_BLOW_UP","CRIT.TANK_TRAP_DESTROY","CRIT.TEAM_WEAPON_DISABLING_SHOT","CRIT.VEHICLE_ABANDON","CRIT.VEHICLE_ABANDON_STURMTIGER","CRIT.VEHICLE_AEC_TEMP_ENGINE_DAMAGE","CRIT.VEHICLE_AEC_TEMP_IMMOBILITY","CRIT.VEHICLE_BLIND","CRIT.VEHICLE_CREW_DAZED_JAGDTIGER","CRIT.VEHICLE_CREW_SHOCKED","CRIT.VEHICLE_CREW_STUNNED","CRIT.VEHICLE_CREW_STUNNED_2","CRIT.VEHICLE_DAMAGE_ENGINE","CRIT.VEHICLE_DAMAGE_ENGINE_INCREMENTAL","CRIT.VEHICLE_DAMAGE_ENGINE_REAR","CRIT.VEHICLE_DAMAGE_ENGINE_REAR_RAMMING","CRIT.VEHICLE_DAMAGE_ENGINE_SNARE","CRIT.VEHICLE_DECREW","CRIT.VEHICLE_DESTROY","CRIT.VEHICLE_DESTROY_BREW_UP","CRIT.VEHICLE_DESTROY_ENGINE","CRIT.VEHICLE_DESTROY_ENGINE_REAR","CRIT.VEHICLE_DESTROY_MAINGUN","CRIT.VEHICLE_DESTROY_MAINGUN_RAMMING","CRIT.VEHICLE_DESTROY_QUAD_50","CRIT.VEHICLE_DESTROY_SEARCHLIGHT_IR_HALFTRACK","CRIT.VEHICLE_DESTROY_WEAPON_TEAM","CRIT.VEHICLE_DRIVER_INJURED","CRIT.VEHICLE_ENGINE_BURNING","CRIT.VEHICLE_EXHAUST_DAMAGED","CRIT.VEHICLE_GUNNER_INJURED","CRIT.VEHICLE_KILL_BRIT_TANK_COMMANDER","CRIT.VEHICLE_KILL_COMMANDER","CRIT.VEHICLE_KILL_DRIVER_RUSSIAN","CRIT.VEHICLE_KILL_GUNNER_RUSSIAN","CRIT.VEHICLE_KILL_RELOADER_RUSSIAN","CRIT.VEHICLE_KILL_TOP_GUNNER_HARDPOINT_1","CRIT.VEHICLE_KILL_TOP_GUNNER_HARDPOINT_2","CRIT.VEHICLE_KILL_TOP_GUNNER_HARDPOINT_4","CRIT.VEHICLE_LIGHT_DAMAGE_ENGINE","CRIT.VEHICLE_LIGHT_DAMAGE_ENGINE_REAR","CRIT.VEHICLE_LIGHT_DESTROY_ENGINE","CRIT.VEHICLE_LIGHT_DESTROY_ENGINE_REAR","CRIT.VEHICLE_LOADER_INJURED","CRIT.VEHICLE_LOSE_TREADS_OR_WHEELS","CRIT.VEHICLE_MAKE_WRECK","CRIT.VEHICLE_OPTICS_DAMAGED","CRIT.VEHICLE_OPTICS_DAMAGED_TEMP","CRIT.VEHICLE_OUT_OF_CONTROL_FAST","CRIT.VEHICLE_OUT_OF_CONTROL_SLOW","CRIT.VEHICLE_OUT_OF_FUEL_GERMAN_SP","CRIT.VEHICLE_SHELL_SHOCKED","CRIT.VEHICLE_SNIPER_SLOW","CRIT.VEHICLE_STUCK_IN_MUD","CRIT.VEHICLE_TANK_GRAB_ABANDON_SP","CRIT.VEHICLE_TEMP_IMMOBILITY","CRIT.VEHICLE_TURRET_DISABLED_TEMP","CRIT.VEHICLE_UNIVERSAL_CARRIER_FLAMETHROWER_EXPLODE","CRIT.VEHICLE_VISION","CRIT.VEHICLE_VISON_BLOCK_DAMAGED","CRIT.VEHICLE_WEAPON_DISABLED_TEMP","CRIT.WORLD_DESTROY_BARRIER","CRIT.WORLD_OBJECT_DESTROY","CRIT.WORLD_OWNED_VEHICLE_ABANDON","BridgeReplace_OnInit","SkinPreviewCapture_Init","SkinPreviewCapture_SpawnVehicles","SkinPreviewCapture_UIInit","SkinPreviewCapture_CycleAndCaptureScreenshots","SkinPreviewCapture_Begin","SkinPreviewCapture_BeginCountdown","SkinPreviewCapture_ExitCountdown","SkinPreviewCapture_Exit","SkinPreviewCapture_StartCountdown","Map_PreInit","SkinPreviewCapture_Configure","AOH_PreInit","AV_PreInit","AV_Init","AV_UpdateObjectiveTimer","AV_UIInit","AV_End","CCM_ActionSpawnUKFSpawner","CCM_ActionSpawnUKFMiscSpawner","Squad_ToClipboardData","Squad_FromClipboardData","Entity_FromClipboardData","Entity_ToDataParameters","Entity_GetHealthPointsString","Squad_ToDataParameters","Squad_GetHealthPointsString","Player_ToDataParameters","Player_GetSetting","Player_SetSetting","Player_GetSettings","LocalPlayer_GetSettings","Data_GetHealthModifiedString","Data_GetOwnerChangedString","CCM_EventCueClickManger","CCM_EventMessage","CCM_EventKickerMessage","CCM_EventKickerMessageEval","CCM_EventKickerHealthMessageEval","CCM_ErrorMessage","Item_GetEnemyPlayer","CCM_SpawnQueueTick","CCM_SpawnQueueInit","CCM_SpawnQueueAdd","CCM_DummyMessage","CCM_PlayerCommandIssued","CCM_SquadCommandIssued","CCM_EntityCommandIssued","CCM_CustomUIEvent","Variable_FromG","Ternary","CCM_PlayerCommandIssued2","CCM_ConfigInit","__subMenu_SetUpdateRate","__subMenu_SpawnUnits","__subMenu_ManipulateSquadMembers","__panel_SelectionHealth","TestFormAdd","TestFormRender","Test_SlotItemRemoveSpam","Test_SlotItemRemoveSpam_Tick","CCM_HealthMonitor_Tick","CCM_HealthMonitor_HandleHealthMessage","CCM_HealthMonitor_RegisterNewItem","CCM_HealthMonitorInit","CCM_SuppressionMonitor_Tick","CCM_SuppressionMonitor_HandleMessage","CCM_SuppressionhMonitor_RegisterNewItem","CCM_SuppressionMonitorInit","CCM_Init","CCM_UIInit","CCM_BroadcastMessageReceived","CCM_Broadcast","CCM_ShowCrosshair","CCM_HideCrosshair","CCM_DisableUI","CCM_EnableUI","CCM_KillSelection","CCM_DeleteSelection","CCM_KillSquad","CCM_DeleteSquad","CCM_KillEntity","CCM_DeleteEntity","CCM_EnableFOW","CCM_DisableFOW","CCM_EnableAI","CCM_DisableAI","CCM_SetAIDifficulty","CCM_SetSelectionHealth","CCM_AddSelectionHealthPercentage","CCM_AddSelectionHealthPoints","CCM_SetSelectionInvulnerability","CCM_SetSelectionOwner","CCM_AddResource","CCM_ResetResource","CCM_AddPopulationCap","CCM_SetInstantProductionEnabled","CCM_SetInstantConstructionEnabled","CCM_SetInstantAbilityRechargeEnabled","CCM_SpawnSquad","CCM_SpawnEntity","CCM_SpawnSlotItem","CCM_IncreaseSelectionXP","CCM_IncreaseSelectionVeterancyLevel","CCM_InstantReinforceSelection","CCM_SplitSelection","CCM_RemoveSelectionCriticals","CCM_RemoveSquadCritical","CCM_RemoveEntityCritical","CCM_ApplyCriticalToSelection","CCM_SetSquadAutoTargetting","CCM_RemoveSquadUpgrade","CCM_RemoveEntityUpgrade","CCM_RemoveSquadSlotItem","CCM_SetSelectionFacing","CCM_TeleportSelection","CCM_KillEverything","CCM_DeleteEverything","CCM_RotateEntity","CCM_SetHealthMonitorEnabled","CCM_SetSuppressionMonitorEnabled","CCM_SelectedTeamWeaponGarrisonFacePosition","CCM_CancelTeamWeaponGarrisonFacingOrder","CCM_AddSelectionSuppression","CCM_SetAllAIPlayersEnabled","CCM_ResetSelectionVeterancy","CCM_SetResourceIncomeEnabled","CCM_SetHealthMonitorUpdateRate","CCM_SetSuppressionMonitorUpdateRate","CCM_UnlockCommanderAbility","CCM_ClearCommanderAbilities","CCM_ModifySquadMovementSpeed","CCM_SetSelectionOwnerToEnemy","CCM_SquadToEntity","CCM_SetEntityAnimatorState","CCM_SetSquadAnimatorState","CCM_SetSelectionAnimatorState","CCM_SetSelectionSkinType","CCM_DropSelectionWeapons","CCM_CaptureAllTerritorySectors","CCM_NeutralizeAllTerritorySectors","CCM_SquadToSkinPreviewEntity","Enhanced_Init","Enhanced_SystemInit","Enhanced_BroadcastMessageReceived","Enhanced_UITick","Enhanced_SetButtonsEnabled","Enhanced_ResetButtonIcons","Enhanced_SetButtonsVisible","Enhanced_PreInit","Enhanced_UIInit","Dude","MyMap_OnInit","MyMap_BonusUnitKilled","prnt","toCharArray","export","include","getBlueprintIfItExists","getBlueprintName","instanceOf","parent","Loc_Create","broadcastMessage","delayedStart","Map_PlayerBonusUnitKilled","MyFunction","Map_OnInit","Gardeners_PreInit","AutoAbandonManager","AutoAbandon_Add","AutoAbandon_Remove","AutoDeleteManager","AutoDelete_Add","AutoDelete_Remove","AutoRetreatManager","AutoRetreat_Add","AutoRetreat_Remove","Parameters_ToStringData","Parameters_FromStringData","Player_FromStringData","Squad_FromStringData","Entity_FromStringData","Broadcast","Camera_MoveToCallback","Camera_MoveToCallback_Tick","CameraPosition","Class","Color","Margin","Padding","Player","Control","Button_CreateConfig","Button_GetIcon","Button","FormControl_Init","FormControl_Refresh","Form","Icon","Label","NumericUpDown_CreateIconConfig","NumericUpDownScroll_Tick","NumericUpDown_RegisterAutoScroll","NumericUpDown_UnregisterAutoScroll","NumericUpDown","MenuControl_Init","Menu_AutoRefresh","Menu_AutoCheckEnabledScan","Menu_AutoCheckCheckedScan","CloseMenus","Menu","Menu_CreateBorderImage","Panel_GetMultipartBackground","Panel","PanelColumn","PanelColumnCollection","Class_GetUniqueID","Class_CreateInstance","Construct","CompanyCommander_Create","ControlSystem_Init","Button_FromTag","ButtonCallbackHandler","Control_GetName","Control_GetX","Control_GetY","Control_GetPath","Control_GetText","Control_GetTag","BPData_GetExtensions","Loc_Get","EBP_HasExtension","EBPData_HasExtension","EBP_GetScreenName","EBP_GetIcon","EBPData_GetUIExt","EBPData_GetScreenName","EBPData_GetIcon","SBP_GetScreenName","SBP_GetIcon","SBPData_GetRaceUIExt","SBPData_GetScreenName","SBPData_GetIcon","Crit_GetScreenName","CritData_GetUIExt","CritData_GetScreenName","CritData_GetIcon","UPG_GetScreenName","UPGData_GetScreenName","SlotItem_GetScreenName","SlotItemData_GetScreenName","EGroup_ToTable","EGroup_IsAlive","EGroup_IsCapturedByTeam2","LocalImport","ImportSystem","ImportDataTables","Library_Load","Lib_EnableMessages","Lib_SetMessagesEnabled","Lib_SetupMod","Mod_GetIcon","Mod_GetAbilityBlueprint","Mod_GetSquadBlueprint","Mod_GetEntityBlueprint","Mod_GetUpgradeBlueprint","Msg_Pos","Msg_3D","Lib_GameOver","Debug_SetMessagesEnabled","TryCatch","Library_Setup","Entity_Validate","Entity_AddHealthPercentage","Entity_AddHealthPoints","Entity_GetOwnerString","Entity_GetBPName","Entity_GetCriticals","Entity_RemoveCriticals","Entity_IsTeamWeapon","Entity_IsValidSafe","Entity_GetUpgrades","Entity_Rotate","Entity_GetTypes","Entity_IsOfType2","Entity_HasUpgrades","EBP_GetTypes","EBP_IsOfType","Entity_Decrew","Entity_PrepareForScreenshot","Entity_SetSkinSeason","Entity_GetBlueprintName","Entity_HasModifierExt","Percentage_Normalize","Round","scientific","Player_GetIndex","Player_SetResourcesEnabled","Player_ResetResources","Player_GetAllSquads","Player_DestroyAllSquads","Player_GetDisplayRaceName","Player_GetDisplayRaceNameLong","Player_GetNameWithFaction","AIDifficulty_Tostring","Player_IsAI","Player_ForEachSquad","Pos_NormalizeHeight","Rule_AddIntervalAndRun","Rule_AddIfNotExists","Rule_AddIntervalIfNotExists","Rule_ChangeIntervalIfExists","Rule_AddDelayed","Rule_AddDelayedIfNotExists","Modify_SetSquadtAutoTargetting","Modify_SetEntityAutoTargetting","Modify_SetEntityAutoTargettingAllHardpoints","Modify_SetSquadAutoTargettingAllHardpoints","Modify_SetSGroupAutoTargettingAllHardpoints","Modify_SetEGroupAutoTargettingAllHardpoints","Modify_SquadTypeEnableCapturing","Selection_UnselectAll","Selection_IsOneEntity","Selection_IsOneSquad","Selection_IsOneSquadOrOneEntity","Selection_IsOneOrMoreSquads","Selection_IsOneOrMoreEntities","Selection_IsSquadsOrEntities","Selection_IsSquadOrEntity","Selection_GetSquad","Selection_GetEntity","Selection_GetSquads","Selection_GetEntities","Misc_SomethingIsSelected","Selection_ForEachSquad","Selection_ForEachEntity","Selection_IsNotInvulnerable","Selection_IsNotNeutralSquadOrEntity","Selection_CountInvulnerables","Selection_IsInvulnerable","SelectionMonitor_Init","SelectionMonitor","SelectionMonitor_GetID","SelectionMonitor_AddSquad","SelectionMonitor_AddEntity","SelectionMonitor_RemoveSquad","SelectionMonitor_RemoveEntity","SelectionMonitor_RemoveItemListener","SelectionMonitor_RemoveSquadLister","SelectionSystem_RemoveEntityLister","SGroup_ToTable","SGroup_SetPosition","SGroup_CountEntities","SGroup_IsAlive2","Squad_CountSpawned","Squad_IsPlane","Squad_SetSelectable","Squad_GetLastAttackerSquad","Squad_IsSelected","Squad_AddHealthPercentage","Squad_AddHealthPoints","Squad_Abandon","Squad_GetOwnerString","Squad_GetBPName","Squad_GetCriticals","Squad_RemoveCriticals","Squad_IsValidSafe","Squad_SetAutoTargetting","__RegisterSquadAutoTargettingModifier","__UnRegisterSquadAutoTargettingModifier","__RegisterEntityAutoTargettingModifier","__UnRegisterEntityAutoTargettingModifier","Squad_SetAllAutoTargetting","Squad_GetAutoTargetting","Squad_GetAllAutoTargetting","Squad_GetUpgrades","Squad_HasUpgrades","Squad_RemoveSlotItem","Squad_RemoveUpgradeFully","Squad_ForEachHeldSquad","Squad_DestroyHeldSquads","Squad_KillHeldSquads","Squad_ModifyVehicleSpeed","Squad_ModifyVehicleRotationSpeed","Squad_ModifyTurretHorizontalSpeed","Squad_ModifyMovementSpeed","Squad_GetTypes","Squad_IsOfType","SBP_GetTypes","SBP_IsOfType","Squad_GetEntityTable","Squad_ToEntities","Squad_ToEntity","Squad_AddMainGunHorizontalRotation","Squad_SetMainGunHorizontalRotation","Squad_Decrew","Squad_SetSkinSeason","Squad_RemoveSlotItems","Squad_GetEntityStateString","Squad_RemoveUpgradeIfPresent","Squad_RemoveUpgradesIfPResent","String_Match","String_Replace","String_AddGenetive","String_Split","Number_TrailingZeroes","Outpost","Outpost_Init","OutpostManager_Register","OutpostManager_Tick","OutpostPatrol","OutpostCaptureTrigger","OutpostPatrolAlarmedSquads_Register","OutpostPatrolAlarmedSquads_Tick","OutpostPatrolManager_Register","OutpostPatrolManager_Tick","OutpostRadioPost","OutpostRadioPostManager_Register","OutpostRadioPostManager_Tick","Table_AddTable","Table_GetSmallest","Table_GetLargest","Table_RemoveValue","Table_IsEmpty","Table_GetRandomBlueprint","Table_Remove","Table_ToIndexableList","Table_Count","Table_Compare","RangeTable_GetRandomValue","OutpostReinforcementsManager_Register","OutpostReinforcementsManager_Tick","Team_GetRandomPlayer","Team_GetRandomPlayers","Time_TicksToSeconds","Time_SecondsToTicks","Time_MinutesToTicks","UI_EnableSelectionVisuals","UI_EnableSquadSelectionVisuals","SelectionVisual_Tick","SelectionVisual_RegisterEntity","UI_ScalePoint","Util_DelaySeconds","Util_DelayMinutes","Util_DelayRandom","Util_DelayRandomSeconds","Util_GetRandomPosExtended","Util_GetRandomHeadingPos","UIFrame_Destroy","Misc_Tester","Util_DistanceFromLine","Util_DistancePointToTeamShortest","HintPoints_Remove","MapIcon_CreateAndFacePosition","toboolean","ResourceType_ToString","ResourceType_FromString","ResourceType_ToDisplayString","Selection_GetPlayer","Objective_UpdateTitle","Objective_StartLocally","Util_CallFunctionsWithParameters","World_ForEachEntity","World_DivideTerritoryBetweenTeams","World_GetWidthRange","World_GetLengthRange","World_RegisterPlayers","World_GetEverythingNearPoint","World_GetAll","World_GetAllSquads","World_ForEeachSquad","World_OneOrMoreAIPlayerIsEnabled","World_OneOrMoreAIPlayerIsDisabled","World_CleanUpTheDeadAll","World_GetAllTerritoryPointEntities","Villagers_PreInit","WarDrive_Init","_getPlayerMineEBP","_spawnMines","WarDrive_GetPlayerReconAbility","WarDrive_ReconSweepBetweenTeams","WarDrive_GetNextEffectDelay","WarDrive_PickRandomEffect","WarDrive_SplitTimeUnits","WarDrive_FormatTime","WarDrive_Monitor","Team_HasTerritoryPoint","WarDrive_EntityKilled","WarDrive_SquadKilled","TestEffect","WarDrive_EnableEffect","WarDrive_RemoveModifiers","WarDrive_GetIcon","WarDrive_RegisterModifier","Modify_SquadBuildTime","Modify_SquadReinforceTime","Modify_EntityCaptureTime","WarDrive_ObjectiveInit","WarDrive_ObjectiveAfterInt","WarDrive_Pager","WarDrive_AbilityExecuted","WarDrive_GetAbilityBlueprint","WarDrive_PreInit","CCM_AddInfiniteResourcesPopcap","CCM_ActionKillSelection","CCM_ActionDeleteSelection","CCM_ActionTeleportSelection","CCM_ActionIncreaseSelectionVeterancy","CCM_ActionIncreaseSelectionHealth","CCM_ActionDecreaseSelectionHealth","CCM_ModifySelectionHealth","CCM_ActionAbandonSelected","CCM_ActionRemoveCriticals","CCM_ActionDropSlotItems","CCM_ActionInstantReinforce","CCM_ActionAddPreciseManpower","CCM_ActionAddPreciseFuel","CCM_ActionAddPreciseMunition","_CCM_SpawnSpawnerSquad","CCM_ActionSpawnSovietSpawner","CCM_ActionSpawnAEFSpawner","CCM_ActionSpawnGermanSpawner","CCM_ActionSpawnWestGermanSpawner","CCM_ActionAddFullHealth","CCM_ActionKillOneEntity","CCM_ActionDeleteOneEntity","CCM_ActionSpawnGermanMiscSpawner","CCM_ActionSpawnSovietMiscSpawner","CCM_ActionSpawnWestGermanMiscSpawner","CCM_ActionSpawnAEFMiscSpawner","CCM_DataInit","CCM_CopySelection","CCM_PasteSelection","Clipboard_Clear","CCM_PreInit","CCM_SystemInit","CCM_PlayerResetAbilities","Player_GetSettingsKey","CCM_PlayerAbilityCompleteListener","CCM_PlayerAbilityListener","CCM_RegisterPlayerAction","Squad_GetSpawnerRaceIndex","Squad_GetSpawnerTable","Squad_GetSpawnAbilityPrefix","CCM_SquadAbilityListener","CCM_CountSpawnTableItems","_CCM_InitSpawnerSquad","CCM_AutoHideAbilities","Entity_CreateAndSpawnTowardTeamWeapon","Entity_GetUpgradeTable","Entity_ApplyCriticalHit","Entity_GetText","Entity_Abandon","EntityBP_IsBuilding","Util_Destroy","Util_GetBPName","Misc_CheckForParentSquad","Squad_GetTableKey","Entity_GetTableKey","Util_GetTablekey","Util_SetInvulnerable","Player_GetIDSafe","Table_ForEach","CCM_Msg","CCM_ClearMSG","CCM_GetAbilityBleprint","CCM_GetSquadBlueprint","CCM_GetEntityBlueprint","CCM_GetUpgradeBlueprint","CCM_GetIcon","CCM_EventCue","Misc_AddSpawnedItemToSystem","Util_AddHealth","Misc_DoPercentageSum","Util_SetPosition","Util_GetGameID","Util_DecodeGameID","Misc_SpawnSlotItemOnGround","Squad_ModifySpeed","Squad_GetHealthTable","Squad_ApplyHealthTable","Squad_GetPlayerOwnerSafe","Squad_GetHeadingTable","Squad_ApplyHeadingTable","Squad_GetUpgradesTable","Squad_GetText","Squad_GetCriticalsTable","Squad_ApplyCriticalHitTable","Squad_ModifyDamage","Squad_DropSlotItems","Squad_RemoveUpgrades","Squad_RemoveCritical","Squad_HasCritical","Squad_GetEntityPositionList","Squad_ApplyEntityPositionList","Squad_SetHealthPercentage","Squad_IsVehicle","CCM_ToggleInstantProduction","CCM_ToggleFOW","CCM_ToggleGlobalAI","CCM_ToggleSelectionInvulnerability","CCM_ToggleSelectionOwner","CCM_ToggleDisableWeapons","CCM_ToggleEngineOrPostureState","CCM_ToggleHealthMonitor","CCM_GetSquadKey","CCM_GetEntityKey","CCM_HealthMonitor","_CCM_HealthMonitor_HandleHealth","_CCM_HealthMonitor_KickerMessage","CTF_PreInit","CTFSystem_Init","CTF_GetRandomFlagSpawnPosition","CTF_FreeFlagSpawnPosition","CTFSystem_InitDelayed","CTF_StartCore","CTF_GetWinScoreLimit","CTF_FlagScoreMonitor","CTF_BlinkFlagCarriers","CTF_FlagRespawnMonitor","CTF_FlagStateMonitor","CTF_EnableResources","CTF_UpdateObjectiveUI","CTF_FixFlagColor","CTF_FixFlagColorDelayed","CTF_StopAlarm","CTF_FlagCarrierAbilityExecuted","CTF_DropFlagRequestManager","CTF_PreventFlagCarrierReCrewAndVehicleGarrisoning","CTF_FlagCaptured","CTF_FlagDropped","CTF_FlagScored","CTF_GetOpposingTeam","CTF_TeamFlagScore","CTF_ObjctiveInit","CTF_AddObjectiveUI","Entity_IsReCrewable","Squad_AddFlagCarrierEffects","Squad_RemoveFlagCarrierEffects","Squad_SetCaptureEnabled","Squad_EnableFlagCarrierUI","Squad_EnableCantHoldUI","Squad_ModifyInfantrySpeed","Squad_MonitorDeath","Squad_DisableFlagCarrierUI","isset","Squad_FlagCarrierDeath","Squad_DropFlag","Squad_CarriesFlag","Squad_IsRegisteredFlagCarrier","Squad_RegisterFlagCarrier","Squad_UnRegisterFlagCarrier","Squad_GetSlotItemTable","Player_EnableMoveFlagHereUI","Player_UnlockRetreat","Player_IsHoldingAnyFlags","SGroup_IsCarryingFlag","UI_LocalKickerMessage","UI_GlobalKickerMessage","CTF_Msg","ClearCTF_Msg","Listener","Table_Shuffle","Ability_GetUniqueKey","Player_AddPopulation","Player_ExecuteLocally","Player_GetEnemyPlayer","Player_SetResourceIncomeNumber","Team_GetFirstPlayer","Team_GetEntitiesNearPoint","Team_GetSquadsNearPoint","Team_GetPlayerCount","Team_ExecuteLocally","SGroup_CreateTemp","EGroup_CreateTemp","EGroup_GetClosest","EGroup_AddGroup","EGroup_FilterByUnitType","Entity_GetGarrisonedSquads","Entity_AutoAlign","Entity_CreateAndSpawnToward","Entity_CreateAndSpawnTowardDelayed","Entity_CreateAndSpawnTowardDelayedRandom","Entity_GetName","Entity_GetTempEGroup","Entity_GetOwnerSafe","Entity_Replace","Entity_IsSelected","Entity_HasProductionQueueItem","Entity_IsValidEntity","Squad_GetUniqueKey","Squad_GetName","Squad_IsIdle","Squad_IsConcstructing","Squad_IsHeadingToPosition","Squad_ForEachEntity","UI_FlashSquad","Util_Repeat","Util_Delay","Util_IsPositionInPolygon","Util_GetDirectionalOffset","Util_GetDirectionalOffsetPosition","Util_GetRandomPos","Util_GetAngleTowardsPos","Util_CopyPosition","Util_CreateUIFrame","Util_Tester","Misc_UnSelectAll","Util_DefaultValue","World_ForEachEntitiesByBlueprint","World_GetEntitiesOfType","Pos_AddHeight","Pos_GetString","dr_text3dpos","Heading_Rotate","Squad_InfraRedReveal","WinCondition_PreInit","WinCondition_MonitorVictoryPoints","Team_GetTitle","Team_GetOpposingTeam","OKWNoCache_PreInit","PK_SystemInit","PK_ScanPlayers","PK_PlayerAbilityListener","Player_RemoveTankDispatchAbilities","Squad_GetTempSGroup","Player_GetMapEntryPositionClosest","Util_SortPositionsByClosestImproved","Pos_GetXYZString","PK_Msg","PK_ClearMSG","PK_GetAbilityBleprint","PK_GetUpgradeBleprint","PK_GetSquadBleprint","PK_EventCue","Player_GetRaceIndex","PK_PreInit","RotateThings","TC_PreInit","TC_Init","TC_TogglePlayerCategory","System_PlayerAbilityComplete","System_PlayerAbilityExecuted","TC_UpdatePlayerCircle","TC_UpdatePlayerArrow","TC_GeneralManager","TC_GetAbilityBlueprint","TC_GetMineIcon","TC_GetMineIconScale","TC_MineIsAllowedToMark","TC_MineIsPartOfSMineField","TC_GetMineMarkerColor","TC_GetIcon","TC_MineMarkerManager","TC_BlibMinePlanted","System_EntityConstructionCompleted","System_EntityKilled","Player_IsLocalPlayer","Player_GetUniqueKey","Player_GetName","Players_ForEach","Players_ForEachInTeam","Entity_GetPlayerOwnerSafe","Entity_GetUniqueKey","Entity_CheckForParentSquad","EntityList_ContainsValidEntities","EGroup_GetEntityIds","Util_GlobalMessage","Util_CreateLocString","Util_GetBlueprint","Util_GetUnitOwner","Game_GetLocalPlayerID","World_OwnsUnit","World_GetEntitiesByBlueprint","World_ForEachEntities","Msg","TC_DataInit_Ebps","TC_DataInit","WinCondition_GameOver","WinCondition_Check","WinCondition_Init","$","AAGUID","ANGLE_instanced_arrays","AbstractWorker","AbstractWorkerEventMap","Account","ActiveXObject","AesCbcParams","AesCfbParams","AesCmacParams","AesCtrParams","AesDerivedKeyParams","AesGcmParams","AesKeyAlgorithm","AesKeyGenParams","Algorithm","AlgorithmIdentifier","AnalyserNode","AnimationEvent","AnimationEventInit","ApplicationCache","ApplicationCacheEventMap","Array","ArrayBuffer","ArrayBufferConstructor","ArrayBufferView","ArrayConstructor","ArrayLike","AssertionOptions","AssignedNodesOptions","Attr","Audio","AudioBuffer","AudioBufferSourceNode","AudioBufferSourceNodeEventMap","AudioContext","AudioContextBase","AudioContextEventMap","AudioDestinationNode","AudioListener","AudioNode","AudioParam","AudioProcessingEvent","AudioTrack","AudioTrackList","AudioTrackListEventMap","BarProp","BaseJQueryEventObject","BeforeUnloadEvent","BiquadFilterNode","Blob","BlobPropertyBag","Body","BodyInit","Boolean","BooleanConstructor","Buffer","BufferEncoding","BufferSource","ByteString","CDATASection","CSS","CSSConditionRule","CSSFontFaceRule","CSSGroupingRule","CSSImportRule","CSSKeyframeRule","CSSKeyframesRule","CSSMediaRule","CSSNamespaceRule","CSSPageRule","CSSRule","CSSRuleList","CSSStyleDeclaration","CSSStyleRule","CSSStyleSheet","CSSSupportsRule","Cache","CacheQueryOptions","CacheStorage","Canvas2DContextAttributes","CanvasGradient","CanvasPathMethods","CanvasPattern","CanvasRenderingContext2D","ChannelMergerNode","ChannelSplitterNode","CharacterData","ChildNode","ClassDecorator","ClientData","ClientRect","ClientRectList","ClipboardEvent","ClipboardEventInit","CloseEvent","CloseEventInit","Comment","CompositionEvent","CompositionEventInit","ConcatParams","ConfirmSiteSpecificExceptionsInformation","Console","ConstrainBoolean","ConstrainBooleanParameters","ConstrainDOMString","ConstrainDOMStringParameters","ConstrainDouble","ConstrainDoubleRange","ConstrainLong","ConstrainLongRange","ConstrainVideoFacingModeParameters","ConvolverNode","Coordinates","Crypto","CryptoKey","CryptoKeyPair","CryptoOperationData","CustomElementRegistry","CustomEvent","CustomEventInit","DOMError","DOMException","DOMImplementation","DOML2DeprecatedColorProperty","DOML2DeprecatedSizeProperty","DOMParser","DOMRectInit","DOMSettableTokenList","DOMStringList","DOMStringMap","DOMTokenList","DataCue","DataTransfer","DataTransferItem","DataTransferItemList","DataView","DataViewConstructor","Date","DateConstructor","DecodeErrorCallback","DecodeSuccessCallback","DeferredPermissionRequest","DelayNode","DeviceAcceleration","DeviceAccelerationDict","DeviceLightEvent","DeviceLightEventInit","DeviceMotionEvent","DeviceMotionEventInit","DeviceOrientationEvent","DeviceOrientationEventInit","DeviceRotationRate","DeviceRotationRateDict","DhImportKeyParams","DhKeyAlgorithm","DhKeyDeriveParams","DhKeyGenParams","Document","DocumentEvent","DocumentEventMap","DocumentFragment","DocumentOrShadowRoot","DocumentType","DoubleRange","DragEvent","DynamicsCompressorNode","EXT_frag_depth","EXT_texture_filter_anisotropic","EcKeyAlgorithm","EcKeyGenParams","EcKeyImportParams","EcdhKeyDeriveParams","EcdsaParams","Element","ElementDefinitionOptions","ElementEventMap","ElementListTagNameMap","ElementTagNameMap","ElementTraversal","Enumerator","EnumeratorConstructor","ErrnoException","Error","ErrorConstructor","ErrorEvent","ErrorEventHandler","ErrorEventInit","EvalError","EvalErrorConstructor","Event","EventEmitter","EventInit","EventListener","EventListenerObject","EventListenerOrEventListenerObject","EventModifierInit","EventTarget","ExceptionInformation","ExtensionScriptApis","External","FFF","FGHJK","File","FileList","FilePropertyBag","FileReader","Float32Array","Float32ArrayConstructor","Float64Array","Float64ArrayConstructor","FocusEvent","FocusEventInit","FocusNavigationEvent","FocusNavigationEventInit","FocusNavigationOrigin","Foo","Foos","ForEachCallback","FormData","FrameRequestCallback","Function","FunctionConstructor","FunctionStringCallback","GLbitfield","GLboolean","GLbyte","GLclampf","GLenum","GLfloat","GLint","GLintptr","GLshort","GLsizei","GLsizeiptr","GLubyte","GLuint","GLushort","GainNode","Gamepad","GamepadButton","GamepadEvent","GamepadEventInit","GeneratorFunction","GeneratorFunctionConstructor","Geolocation","GetNotificationOptions","GetSVGDocument","GlobalEventHandlers","GlobalEventHandlersEventMap","GlobalFetch","HTMLAllCollection","HTMLAnchorElement","HTMLAppletElement","HTMLAreaElement","HTMLAreasCollection","HTMLAudioElement","HTMLBRElement","HTMLBaseElement","HTMLBaseFontElement","HTMLBodyElement","HTMLBodyElementEventMap","HTMLButtonElement","HTMLCanvasElement","HTMLCollection","HTMLCollectionBase","HTMLCollectionOf","HTMLDListElement","HTMLDataElement","HTMLDataListElement","HTMLDirectoryElement","HTMLDivElement","HTMLDocument","HTMLElement","HTMLElementEventMap","HTMLElementTagNameMap","HTMLEmbedElement","HTMLFieldSetElement","HTMLFontElement","HTMLFormControlsCollection","HTMLFormElement","HTMLFrameElement","HTMLFrameElementEventMap","HTMLFrameSetElement","HTMLFrameSetElementEventMap","HTMLHRElement","HTMLHeadElement","HTMLHeadingElement","HTMLHtmlElement","HTMLIFrameElement","HTMLIFrameElementEventMap","HTMLImageElement","HTMLInputElement","HTMLLIElement","HTMLLabelElement","HTMLLegendElement","HTMLLinkElement","HTMLMapElement","HTMLMarqueeElement","HTMLMarqueeElementEventMap","HTMLMediaElement","HTMLMediaElementEventMap","HTMLMenuElement","HTMLMetaElement","HTMLMeterElement","HTMLModElement","HTMLOListElement","HTMLObjectElement","HTMLOptGroupElement","HTMLOptionElement","HTMLOptionsCollection","HTMLOutputElement","HTMLParagraphElement","HTMLParamElement","HTMLPictureElement","HTMLPreElement","HTMLProgressElement","HTMLQuoteElement","HTMLScriptElement","HTMLSelectElement","HTMLSlotElement","HTMLSourceElement","HTMLSpanElement","HTMLStyleElement","HTMLTableAlignment","HTMLTableCaptionElement","HTMLTableCellElement","HTMLTableColElement","HTMLTableDataCellElement","HTMLTableElement","HTMLTableHeaderCellElement","HTMLTableRowElement","HTMLTableSectionElement","HTMLTemplateElement","HTMLTextAreaElement","HTMLTimeElement","HTMLTitleElement","HTMLTrackElement","HTMLUListElement","HTMLUnknownElement","HTMLVideoElement","HTMLVideoElementEventMap","HashChangeEvent","HashChangeEventInit","Headers","HeadersInit","History","HkdfCtrParams","HmacImportParams","HmacKeyAlgorithm","HmacKeyGenParams","I","IArguments","IDBArrayKey","IDBCursor","IDBCursorWithValue","IDBDatabase","IDBDatabaseEventMap","IDBEnvironment","IDBFactory","IDBIndex","IDBIndexParameters","IDBKeyPath","IDBKeyRange","IDBObjectStore","IDBObjectStoreParameters","IDBOpenDBRequest","IDBOpenDBRequestEventMap","IDBRequest","IDBRequestEventMap","IDBTransaction","IDBTransactionEventMap","IDBValidKey","IDBVersionChangeEvent","IFoos","IIRFilterNode","ITextWriter","Image","ImageData","Infinity","Int16Array","Int16ArrayConstructor","Int32Array","Int32ArrayConstructor","Int8Array","Int8ArrayConstructor","IntersectionObserver","IntersectionObserverCallback","IntersectionObserverEntry","IntersectionObserverEntryInit","IntersectionObserverInit","Intl","Iterable","IterableIterator","Iterator","IteratorResult","JQuery","JQueryAjaxSettings","JQueryAnimationOptions","JQueryCallback","JQueryCoordinates","JQueryDeferred","JQueryEventConstructor","JQueryEventObject","JQueryGenericPromise","JQueryInputEventObject","JQueryKeyEventObject","JQueryMouseEventObject","JQueryParam","JQueryPromise","JQueryPromiseCallback","JQueryPromiseOperator","JQuerySerializeArrayElement","JQueryStatic","JQuerySupport","JQueryXHR","JSON","JSX","JsonWebKey","KeyAlgorithm","KeyFormat","KeyType","KeyUsage","KeyboardEvent","KeyboardEventInit","LinkStyle","ListeningStateChangedEvent","Location","LongRange","LongRunningScriptDetectedEvent","MSAccountInfo","MSApp","MSAppAsyncOperation","MSAppAsyncOperationEventMap","MSAssertion","MSAudioLocalClientEvent","MSAudioRecvPayload","MSAudioRecvSignal","MSAudioSendPayload","MSAudioSendSignal","MSBaseReader","MSBaseReaderEventMap","MSBlobBuilder","MSConnectivity","MSCredentialFilter","MSCredentialParameters","MSCredentialSpec","MSCredentials","MSDelay","MSDescription","MSExecAtPriorityFunctionCallback","MSFIDOCredentialAssertion","MSFIDOCredentialParameters","MSFIDOSignature","MSFIDOSignatureAssertion","MSFileSaver","MSGesture","MSGestureEvent","MSGraphicsTrust","MSHTMLWebViewElement","MSIPAddressInfo","MSIceWarningFlags","MSInboundPayload","MSInputMethodContext","MSInputMethodContextEventMap","MSJitter","MSLaunchUriCallback","MSLocalClientEvent","MSLocalClientEventBase","MSManipulationEvent","MSMediaKeyError","MSMediaKeyMessageEvent","MSMediaKeyNeededEvent","MSMediaKeySession","MSMediaKeys","MSNavigatorDoNotTrack","MSNetwork","MSNetworkConnectivityInfo","MSNetworkInterfaceType","MSOutboundNetwork","MSOutboundPayload","MSPacketLoss","MSPayloadBase","MSPointerEvent","MSPortRange","MSRangeCollection","MSRelayAddress","MSSignatureParameters","MSSiteModeEvent","MSStream","MSStreamReader","MSTransportDiagnosticsStats","MSUnsafeFunctionCallback","MSUtilization","MSVideoPayload","MSVideoRecvPayload","MSVideoResolutionDistribution","MSVideoSendPayload","MSWebViewAsyncOperation","MSWebViewAsyncOperationEventMap","MSWebViewSettings","Map","MapConstructor","Math","MediaDeviceInfo","MediaDevices","MediaDevicesEventMap","MediaElementAudioSourceNode","MediaEncryptedEvent","MediaEncryptedEventInit","MediaError","MediaKeyMessageEvent","MediaKeyMessageEventInit","MediaKeySession","MediaKeyStatusMap","MediaKeySystemAccess","MediaKeySystemConfiguration","MediaKeySystemMediaCapability","MediaKeys","MediaList","MediaQueryList","MediaQueryListListener","MediaSource","MediaStream","MediaStreamAudioSourceNode","MediaStreamConstraints","MediaStreamError","MediaStreamErrorEvent","MediaStreamErrorEventInit","MediaStreamEvent","MediaStreamEventInit","MediaStreamEventMap","MediaStreamTrack","MediaStreamTrackEvent","MediaStreamTrackEventInit","MediaStreamTrackEventMap","MediaTrackCapabilities","MediaTrackConstraintSet","MediaTrackConstraints","MediaTrackSettings","MediaTrackSupportedConstraints","MessageChannel","MessageEvent","MessageEventInit","MessagePort","MessagePortEventMap","MethodDecorator","MimeType","MimeTypeArray","Model123","Model456","MouseEvent","MouseEventInit","MouseWheelEvent","MsZoomToOptions","MutationCallback","MutationEvent","MutationObserver","MutationObserverInit","MutationRecord","NaN","NamedNodeMap","NavigationCompletedEvent","NavigationEvent","NavigationEventWithReferrer","Navigator","NavigatorBeacon","NavigatorConcurrentHardware","NavigatorContentUtils","NavigatorGeolocation","NavigatorID","NavigatorOnLine","NavigatorStorageUtils","NavigatorUserMedia","NavigatorUserMediaErrorCallback","NavigatorUserMediaSuccessCallback","Node","NodeBuffer","NodeFilter","NodeIterator","NodeJS","NodeList","NodeListOf","NodeModule","NodeProcess","NodeRequire","NodeRequireFunction","NodeSelector","Notification","NotificationEventMap","NotificationOptions","NotificationPermissionCallback","Number","NumberConstructor","OES_element_index_uint","OES_standard_derivatives","OES_texture_float","OES_texture_float_linear","OES_texture_half_float","OES_texture_half_float_linear","Object","ObjectConstructor","ObjectURLOptions","OfflineAudioCompletionEvent","OfflineAudioContext","OfflineAudioContextEventMap","Option","OscillatorNode","OscillatorNodeEventMap","OverflowEvent","PageTransitionEvent","PannerNode","ParameterDecorator","ParentNode","Partial","Path2D","PaymentAddress","PaymentCurrencyAmount","PaymentDetails","PaymentDetailsModifier","PaymentItem","PaymentMethodData","PaymentOptions","PaymentRequest","PaymentRequestEventMap","PaymentRequestUpdateEvent","PaymentRequestUpdateEventInit","PaymentResponse","PaymentShippingOption","Pbkdf2Params","PerfWidgetExternal","Performance","PerformanceEntry","PerformanceMark","PerformanceMeasure","PerformanceNavigation","PerformanceNavigationTiming","PerformanceResourceTiming","PerformanceTiming","PeriodicWave","PeriodicWaveConstraints","PermissionRequest","PermissionRequestedEvent","Pick","Plugin","PluginArray","PointerEvent","PointerEventInit","PopStateEvent","PopStateEventInit","Position","PositionCallback","PositionError","PositionErrorCallback","PositionOptions","ProcessingInstruction","ProgressEvent","ProgressEventInit","Promise","PromiseConstructor","PromiseConstructorLike","PromiseLike","PromiseRejectionEvent","PromiseRejectionEventInit","PropertyDecorator","PropertyDescriptor","PropertyDescriptorMap","PropertyKey","Proxy","ProxyConstructor","ProxyHandler","PushManager","PushSubscription","PushSubscriptionOptions","PushSubscriptionOptionsInit","RTCConfiguration","RTCDTMFToneChangeEvent","RTCDTMFToneChangeEventInit","RTCDtlsFingerprint","RTCDtlsParameters","RTCDtlsTransport","RTCDtlsTransportEventMap","RTCDtlsTransportStateChangedEvent","RTCDtmfSender","RTCDtmfSenderEventMap","RTCIceCandidate","RTCIceCandidateAttributes","RTCIceCandidateComplete","RTCIceCandidateDictionary","RTCIceCandidateInit","RTCIceCandidatePair","RTCIceCandidatePairChangedEvent","RTCIceCandidatePairStats","RTCIceGatherCandidate","RTCIceGatherOptions","RTCIceGatherer","RTCIceGathererEvent","RTCIceGathererEventMap","RTCIceParameters","RTCIceServer","RTCIceTransport","RTCIceTransportEventMap","RTCIceTransportStateChangedEvent","RTCInboundRTPStreamStats","RTCMediaStreamTrackStats","RTCOfferOptions","RTCOutboundRTPStreamStats","RTCPeerConnection","RTCPeerConnectionErrorCallback","RTCPeerConnectionEventMap","RTCPeerConnectionIceEvent","RTCPeerConnectionIceEventInit","RTCRTPStreamStats","RTCRtcpFeedback","RTCRtcpParameters","RTCRtpCapabilities","RTCRtpCodecCapability","RTCRtpCodecParameters","RTCRtpContributingSource","RTCRtpEncodingParameters","RTCRtpFecParameters","RTCRtpHeaderExtension","RTCRtpHeaderExtensionParameters","RTCRtpParameters","RTCRtpReceiver","RTCRtpReceiverEventMap","RTCRtpRtxParameters","RTCRtpSender","RTCRtpSenderEventMap","RTCRtpUnhandled","RTCSessionDescription","RTCSessionDescriptionCallback","RTCSessionDescriptionInit","RTCSrtpKeyParam","RTCSrtpSdesParameters","RTCSrtpSdesTransport","RTCSrtpSdesTransportEventMap","RTCSsrcConflictEvent","RTCSsrcRange","RTCStats","RTCStatsCallback","RTCStatsProvider","RTCStatsReport","RTCTransport","RTCTransportStats","RandomSource","Range","RangeError","RangeErrorConstructor","React","ReadableStream","ReadableStreamReader","Readonly","ReadonlyArray","ReadonlyMap","ReadonlySet","Record","ReferenceError","ReferenceErrorConstructor","Reflect","RegExp","RegExpConstructor","RegExpExecArray","RegExpMatchArray","RegistrationOptions","Request","RequestInfo","RequestInit","Response","ResponseInit","RsaHashedImportParams","RsaHashedKeyAlgorithm","RsaHashedKeyGenParams","RsaKeyAlgorithm","RsaKeyGenParams","RsaOaepParams","RsaOtherPrimesInfo","RsaPssParams","SVGAElement","SVGAngle","SVGAnimatedAngle","SVGAnimatedBoolean","SVGAnimatedEnumeration","SVGAnimatedInteger","SVGAnimatedLength","SVGAnimatedLengthList","SVGAnimatedNumber","SVGAnimatedNumberList","SVGAnimatedPoints","SVGAnimatedPreserveAspectRatio","SVGAnimatedRect","SVGAnimatedString","SVGAnimatedTransformList","SVGCircleElement","SVGClipPathElement","SVGComponentTransferFunctionElement","SVGDefsElement","SVGDescElement","SVGElement","SVGElementEventMap","SVGElementInstance","SVGElementInstanceList","SVGEllipseElement","SVGFEBlendElement","SVGFEColorMatrixElement","SVGFEComponentTransferElement","SVGFECompositeElement","SVGFEConvolveMatrixElement","SVGFEDiffuseLightingElement","SVGFEDisplacementMapElement","SVGFEDistantLightElement","SVGFEFloodElement","SVGFEFuncAElement","SVGFEFuncBElement","SVGFEFuncGElement","SVGFEFuncRElement","SVGFEGaussianBlurElement","SVGFEImageElement","SVGFEMergeElement","SVGFEMergeNodeElement","SVGFEMorphologyElement","SVGFEOffsetElement","SVGFEPointLightElement","SVGFESpecularLightingElement","SVGFESpotLightElement","SVGFETileElement","SVGFETurbulenceElement","SVGFilterElement","SVGFilterPrimitiveStandardAttributes","SVGFitToViewBox","SVGForeignObjectElement","SVGGElement","SVGGradientElement","SVGGraphicsElement","SVGImageElement","SVGLength","SVGLengthList","SVGLineElement","SVGLinearGradientElement","SVGMarkerElement","SVGMaskElement","SVGMatrix","SVGMetadataElement","SVGNumber","SVGNumberList","SVGPathElement","SVGPathSeg","SVGPathSegArcAbs","SVGPathSegArcRel","SVGPathSegClosePath","SVGPathSegCurvetoCubicAbs","SVGPathSegCurvetoCubicRel","SVGPathSegCurvetoCubicSmoothAbs","SVGPathSegCurvetoCubicSmoothRel","SVGPathSegCurvetoQuadraticAbs","SVGPathSegCurvetoQuadraticRel","SVGPathSegCurvetoQuadraticSmoothAbs","SVGPathSegCurvetoQuadraticSmoothRel","SVGPathSegLinetoAbs","SVGPathSegLinetoHorizontalAbs","SVGPathSegLinetoHorizontalRel","SVGPathSegLinetoRel","SVGPathSegLinetoVerticalAbs","SVGPathSegLinetoVerticalRel","SVGPathSegList","SVGPathSegMovetoAbs","SVGPathSegMovetoRel","SVGPatternElement","SVGPoint","SVGPointList","SVGPolygonElement","SVGPolylineElement","SVGPreserveAspectRatio","SVGRadialGradientElement","SVGRect","SVGRectElement","SVGSVGElement","SVGSVGElementEventMap","SVGScriptElement","SVGStopElement","SVGStringList","SVGStyleElement","SVGSwitchElement","SVGSymbolElement","SVGTSpanElement","SVGTests","SVGTextContentElement","SVGTextElement","SVGTextPathElement","SVGTextPositioningElement","SVGTitleElement","SVGTransform","SVGTransformList","SVGURIReference","SVGUnitTypes","SVGUseElement","SVGViewElement","SVGZoomAndPan","SVGZoomEvent","ScopedCredential","ScopedCredentialDescriptor","ScopedCredentialInfo","ScopedCredentialOptions","ScopedCredentialParameters","Screen","ScreenEventMap","ScriptNotifyEvent","ScriptProcessorNode","ScriptProcessorNodeEventMap","ScrollBehavior","ScrollIntoViewOptions","ScrollLogicalPosition","ScrollOptions","ScrollRestoration","ScrollToOptions","Selection","ServiceWorker","ServiceWorkerContainer","ServiceWorkerContainerEventMap","ServiceWorkerEventMap","ServiceWorkerMessageEvent","ServiceWorkerMessageEventInit","ServiceWorkerRegistration","ServiceWorkerRegistrationEventMap","Set","SetConstructor","ShadowRoot","ShadowRootInit","SlowBuffer","SourceBuffer","SourceBufferList","SpeechSynthesis","SpeechSynthesisEvent","SpeechSynthesisEventInit","SpeechSynthesisEventMap","SpeechSynthesisUtterance","SpeechSynthesisUtteranceEventMap","SpeechSynthesisVoice","StereoPannerNode","Storage","StorageEvent","StorageEventInit","StoreExceptionsInformation","StoreSiteSpecificExceptionsInformation","String","StringConstructor","StyleMedia","StyleSheet","StyleSheetList","StyleSheetPageList","SubtleCrypto","Symbol","SymbolConstructor","SyncManager","SyntaxError","SyntaxErrorConstructor","TemplateStringsArray","Text","TextEvent","TextMetrics","TextStreamBase","TextStreamReader","TextStreamWriter","TextTrack","TextTrackCue","TextTrackCueEventMap","TextTrackCueList","TextTrackEventMap","TextTrackList","TextTrackListEventMap","Thenable","TimeRanges","Touch","TouchEvent","TouchList","TrackEvent","TrackEventInit","TransitionEvent","TransitionEventInit","TreeWalker","TypeError","TypeErrorConstructor","TypedPropertyDescriptor","UIEvent","UIEventInit","URIError","URIErrorConstructor","URL","URLSearchParams","USVString","Uint16Array","Uint16ArrayConstructor","Uint32Array","Uint32ArrayConstructor","Uint8Array","Uint8ArrayConstructor","Uint8ClampedArray","Uint8ClampedArrayConstructor","UnviewableContentIdentifiedEvent","VBArray","VBArrayConstructor","ValidityState","VarDate","VideoPlaybackQuality","VideoTrack","VideoTrackList","VideoTrackListEventMap","VoidFunction","WEBGL_compressed_texture_s3tc","WEBGL_debug_renderer_info","WEBGL_depth_texture","WScript","WaveShaperNode","WeakMap","WeakMapConstructor","WeakSet","WeakSetConstructor","WebAuthentication","WebAuthnAssertion","WebAuthnExtensions","WebGLActiveInfo","WebGLBuffer","WebGLContextAttributes","WebGLContextEvent","WebGLContextEventInit","WebGLFramebuffer","WebGLObject","WebGLProgram","WebGLRenderbuffer","WebGLRenderingContext","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebKitCSSMatrix","WebKitDirectoryEntry","WebKitDirectoryReader","WebKitEntriesCallback","WebKitEntry","WebKitErrorCallback","WebKitFileCallback","WebKitFileEntry","WebKitFileSystem","WebKitPoint","WebSocket","WebSocketEventMap","WheelEvent","WheelEventInit","Window","WindowBase64","WindowConsole","WindowEventMap","WindowLocalStorage","WindowSessionStorage","WindowTimers","WindowTimersExtension","Worker","WorkerEventMap","WritableStream","XMLDocument","XMLHttpRequest","XMLHttpRequestEventMap","XMLHttpRequestEventTarget","XMLHttpRequestEventTargetEventMap","XMLHttpRequestUpload","XMLSerializer","XPathEvaluator","XPathExpression","XPathNSResolver","XPathResult","XSLTProcessor","_","__dirname","__filename","a","abstract","addEventListener","alert","any","applicationCache","as","async","atob","await","b","blur","boolean","break","btoa","caches","cancelAnimationFrame","captureEvents","case","catch","class","clearImmediate","clearInterval","clearTimeout","clientInformation","close","closed","confirm","console","const","constructor","continue","count","crypto","customElements","dddd","debugger","declare","decodeURI","decodeURIComponent","default","defaultStatus","delete","departFocus","devicePixelRatio","dispatchEvent","do","doIt","doNotTrack","doUpdateSnippet","document","element","else","encodeURI","encodeURIComponent","enum","eval","event","export","exports","extends","external","false","fetch","finally","findSnippetById","focus","foo","foon","fooo","for","frameElement","frames","from","function","fuzzy_match","fuzzy_match_simple","get","getComputedStyle","getMatchedCSSRules","getSelection","global","global","history","if","implements","import","importScripts","in","indexedDB","innerHeight","innerWidth","instanceof","interface","is","isFinite","isNaN","isSecureContext","jQuery","keyof","length","let","localStorage","location","locationbar","matchMedia","menubar","module","module","more","moveBy","moveTo","msContentScript","msCredentials","msWriteProfilerMark","name","namespace","navigator","never","new","null","number","object","of","offscreenBuffering","onabort","onafterprint","onbeforeprint","onbeforeunload","onblur","oncanplay","oncanplaythrough","onchange","onclick","oncompassneedscalibration","oncontextmenu","ondblclick","ondevicelight","ondevicemotion","ondeviceorientation","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onmsgesturechange","onmsgesturedoubletap","onmsgestureend","onmsgesturehold","onmsgesturestart","onmsgesturetap","onmsinertiastart","onmspointercancel","onmspointerdown","onmspointerenter","onmspointerleave","onmspointermove","onmspointerout","onmspointerover","onmspointerup","onoffline","ononline","onorientationchange","onpagehide","onpageshow","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onpopstate","onprogress","onratechange","onreadystatechange","onreset","onresize","onscroll","onseeked","onseeking","onselect","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontouchcancel","ontouchend","ontouchmove","ontouchstart","onunload","onvolumechange","onwaiting","onwheel","open","opener","orientation","outerHeight","outerWidth","package","pageXOffset","pageYOffset","parent","parseFloat","parseInt","payloadtype","performance","personalbar","postMessage","print","private","process","prompt","protected","public","readonly","releaseEvents","removeEventListener","requestAnimationFrame","require","require","resizeBy","resizeTo","return","screen","screenLeft","screenTop","screenX","screenY","scroll","scrollBy","scrollTo","scrollX","scrollY","scrollbars","self","sessionStorage","set","setImmediate","setInterval","setTimeout","speechSynthesis","static","status","statusbar","stop","string","styleMedia","super","switch","symbol","this","throw","toString","toolbar","top","true","try","type","typedoc","typeof","undefined","undefined","updateSnippet","uuid","vSomething","var","void","webkitCancelAnimationFrame","webkitConvertPointFromNodeToPage","webkitConvertPointFromPageToNode","webkitRTCPeerConnection","webkitRequestAnimationFrame","while","window","with","yield"] \ No newline at end of file diff --git a/src/vs/base/test/common/filters.perf.test.ts b/src/vs/base/test/common/filters.perf.test.ts index 790e1d3fd678f..7f6359042d7b6 100644 --- a/src/vs/base/test/common/filters.perf.test.ts +++ b/src/vs/base/test/common/filters.perf.test.ts @@ -6,8 +6,8 @@ // import * as assert from 'assert'; import * as filters from 'vs/base/common/filters'; +import { data } from './filters.perf.data'; -const data = require.__$__nodeRequire(require.toUrl('./filters.perf.data.json')); const patterns = ['cci', 'ida', 'pos', 'CCI', 'enbled', 'callback', 'gGame', 'cons']; const _enablePerf = false; @@ -39,7 +39,6 @@ perfSuite('Performance - fuzzyMatch', function () { perfTest('matchesFuzzy', filters.matchesFuzzy); perfTest('fuzzyContiguousFilter', filters.fuzzyContiguousFilter); - perfTest('matchesFuzzy2', filters.matchesFuzzy2); perfTest('fuzzyScore', filters.fuzzyScore); perfTest('fuzzyScoreGraceful', filters.fuzzyScoreGraceful); diff --git a/src/vs/base/test/common/filters.test.ts b/src/vs/base/test/common/filters.test.ts index 3e9c41b735c75..663c7cccf3d84 100644 --- a/src/vs/base/test/common/filters.test.ts +++ b/src/vs/base/test/common/filters.test.ts @@ -195,7 +195,7 @@ suite('Filters', () => { function assertMatches(pattern: string, word: string, decoratedWord: string, filter: typeof fuzzyScore) { let r = filter(pattern, word); - assert.ok(Boolean(r) === Boolean(decoratedWord)); + assert.ok(!decoratedWord === (!r || r[1].length === 0)); if (r) { const [, matches] = r; let pos = 0; @@ -248,6 +248,7 @@ suite('Filters', () => { assertMatches('ccm', 'cacmelCase', '^ca^c^melCase', fuzzyScore); assertMatches('bti', 'the_black_knight', undefined, fuzzyScore); assertMatches('ccm', 'camelCase', undefined, fuzzyScore); + assertMatches('cmcm', 'camelCase', undefined, fuzzyScore); assertMatches('BK', 'the_black_knight', 'the_^black_^knight', fuzzyScore); assertMatches('KeyboardLayout=', 'KeyboardLayout', undefined, fuzzyScore); assertMatches('LLL', 'SVisualLoggerLogsList', 'SVisual^Logger^Logs^List', fuzzyScore); @@ -305,6 +306,41 @@ suite('Filters', () => { ); }); + test('fuzzyScore, issue #26423', function () { + + assertMatches('baba', 'abababab', undefined, fuzzyScore); + + assertMatches( + 'fsfsfs', + 'dsafdsafdsafdsafdsafdsafdsafasdfdsa', + undefined, + fuzzyScore + ); + assertMatches( + 'fsfsfsfsfsfsfsf', + 'dsafdsafdsafdsafdsafdsafdsafasdfdsafdsafdsafdsafdsfdsafdsfdfdfasdnfdsajfndsjnafjndsajlknfdsa', + undefined, + fuzzyScore + ); + }); + + test('Fuzzy IntelliSense matching vs Haxe metadata completion, #26995', function () { + assertMatches('f', ':Foo', ':^Foo', fuzzyScore); + assertMatches('f', ':foo', ':^foo', fuzzyScore); + }); + + test('Vscode 1.12 no longer obeys \'sortText\' in completion items (from language server), #26096', function () { + assertMatches(' ', ' group', undefined, fuzzyScore); + assertMatches(' g', ' group', ' ^group', fuzzyScore); + assertMatches('g', ' group', ' ^group', fuzzyScore); + assertMatches('g g', ' groupGroup', undefined, fuzzyScore); + assertMatches('g g', ' group Group', ' ^group^ ^Group', fuzzyScore); + assertMatches(' g g', ' group Group', ' ^group^ ^Group', fuzzyScore); + assertMatches('zz', 'zzGroup', '^z^zGroup', fuzzyScore); + assertMatches('zzg', 'zzGroup', '^z^z^Group', fuzzyScore); + assertMatches('g', 'zzGroup', 'zz^Group', fuzzyScore); + }); + function assertTopScore(filter: typeof fuzzyScore, pattern: string, expected: number, ...words: string[]) { let topScore = -(100 * 10); let topIdx = 0; @@ -361,6 +397,12 @@ suite('Filters', () => { assertTopScore(fuzzyScore, 'title', 1, 'files.trimTrailingWhitespace', 'window.title'); }); + test('Unexpected suggestion scoring, #28791', function () { + assertTopScore(fuzzyScore, '_lines', 1, '_lineStarts', '_lines'); + assertTopScore(fuzzyScore, '_lines', 1, '_lineS', '_lines'); + assertTopScore(fuzzyScore, '_lineS', 0, '_lineS', '_lines'); + }); + test('nextTypoPermutation', function () { function assertTypos(pattern: string, ...variants: string[]) { diff --git a/src/vs/base/test/common/json.test.ts b/src/vs/base/test/common/json.test.ts index 5ad413c6f36c8..fe129f08808eb 100644 --- a/src/vs/base/test/common/json.test.ts +++ b/src/vs/base/test/common/json.test.ts @@ -6,9 +6,9 @@ import * as assert from 'assert'; import { - SyntaxKind, createScanner, parse, getLocation, Node, ParseError, parseTree, ParseErrorCode, - getParseErrorMessage, ParseOptions, Segment, findNodeAtLocation, getNodeValue, ScanError + SyntaxKind, createScanner, parse, getLocation, Node, ParseError, parseTree, ParseErrorCode, ParseOptions, Segment, findNodeAtLocation, getNodeValue, ScanError } from 'vs/base/common/json'; +import { getParseErrorMessage } from 'vs/base/common/jsonErrorMessages'; function assertKinds(text: string, ...kinds: SyntaxKind[]): void { var scanner = createScanner(text); diff --git a/src/vs/base/test/common/labels.test.ts b/src/vs/base/test/common/labels.test.ts index 4476a121f250a..650b4ee86a6f4 100644 --- a/src/vs/base/test/common/labels.test.ts +++ b/src/vs/base/test/common/labels.test.ts @@ -57,11 +57,11 @@ suite('Labels', () => { assert.deepEqual(labels.shorten(['a\\b\\c', 'd\\b\\C']), ['…\\c', '…\\C']); // empty or null - assert.deepEqual(labels.shorten(['', null]), ['.', null]); + assert.deepEqual(labels.shorten(['', null]), ['.\\', null]); assert.deepEqual(labels.shorten(['a', 'a\\b', 'a\\b\\c', 'd\\b\\c', 'd\\b']), ['a', 'a\\b', 'a\\b\\c', 'd\\b\\c', 'd\\b']); assert.deepEqual(labels.shorten(['a', 'a\\b', 'b']), ['a', 'a\\b', 'b']); - assert.deepEqual(labels.shorten(['', 'a', 'b', 'b\\c', 'a\\c']), ['.', 'a', 'b', 'b\\c', 'a\\c']); + assert.deepEqual(labels.shorten(['', 'a', 'b', 'b\\c', 'a\\c']), ['.\\', 'a', 'b', 'b\\c', 'a\\c']); assert.deepEqual(labels.shorten(['src\\vs\\workbench\\parts\\execution\\electron-browser', 'src\\vs\\workbench\\parts\\execution\\electron-browser\\something', 'src\\vs\\workbench\\parts\\terminal\\electron-browser']), ['…\\execution\\electron-browser', '…\\something', '…\\terminal\\…']); }); @@ -105,11 +105,11 @@ suite('Labels', () => { assert.deepEqual(labels.shorten(['a/b/c', 'd/b/C']), ['…/c', '…/C']); // empty or null - assert.deepEqual(labels.shorten(['', null]), ['.', null]); + assert.deepEqual(labels.shorten(['', null]), ['./', null]); assert.deepEqual(labels.shorten(['a', 'a/b', 'a/b/c', 'd/b/c', 'd/b']), ['a', 'a/b', 'a/b/c', 'd/b/c', 'd/b']); assert.deepEqual(labels.shorten(['a', 'a/b', 'b']), ['a', 'a/b', 'b']); - assert.deepEqual(labels.shorten(['', 'a', 'b', 'b/c', 'a/c']), ['.', 'a', 'b', 'b/c', 'a/c']); + assert.deepEqual(labels.shorten(['', 'a', 'b', 'b/c', 'a/c']), ['./', 'a', 'b', 'b/c', 'a/c']); }); test('template', function () { diff --git a/src/vs/base/test/common/map.test.ts b/src/vs/base/test/common/map.test.ts index 43cbc7b44b944..58c8413ba8406 100644 --- a/src/vs/base/test/common/map.test.ts +++ b/src/vs/base/test/common/map.test.ts @@ -5,14 +5,14 @@ 'use strict'; -import { BoundedLinkedMap, LRUCache, LinkedMap, TrieMap, ResourceMap } from 'vs/base/common/map'; +import { BoundedMap, TrieMap, ResourceMap } from 'vs/base/common/map'; import * as assert from 'assert'; import URI from 'vs/base/common/uri'; suite('Map', () => { - test('LinkedMap - basics', function () { - const map = new LinkedMap(); + test('BoundedMap - basics', function () { + const map = new BoundedMap(); assert.equal(map.size, 0); @@ -72,10 +72,38 @@ suite('Map', () => { assert.equal(res, 'bar'); }); - test('BoundedLinkedMap - basics', function () { - const map = new BoundedLinkedMap(); + test('BoundedMap - serialization', function () { + const map = new BoundedMap(5); - assert.equal(map.size, 0); + map.set('1', 1); + map.set('2', '2'); + map.set('3', true); + + const obj = Object.create(null); + map.set('4', obj); + + const date = Date.now(); + map.set('5', date); + + const mapClone = new BoundedMap(5, 1, map.serialize()); + + assert.deepEqual(map.serialize(), mapClone.serialize()); + + assert.equal(mapClone.size, 5); + assert.equal(mapClone.get('1'), 1); + assert.equal(mapClone.get('2'), '2'); + assert.equal(mapClone.get('3'), true); + assert.equal(mapClone.get('4'), obj); + assert.equal(mapClone.get('5'), date); + assert.ok(!mapClone.get('6')); + + mapClone.set('6', '6'); + assert.equal(mapClone.size, 5); + assert.ok(!mapClone.get('1')); + }); + + test('BoundedMap - setLimit', function () { + const map = new BoundedMap(5); map.set('1', 1); map.set('2', '2'); @@ -95,46 +123,45 @@ suite('Map', () => { assert.equal(map.get('5'), date); assert.ok(!map.get('6')); - map.delete('6'); - assert.equal(map.size, 5); - assert.equal(map.delete('1'), 1); - assert.equal(map.delete('2'), '2'); - assert.equal(map.delete('3'), true); - assert.equal(map.delete('4'), obj); - assert.equal(map.delete('5'), date); + map.setLimit(3); + + assert.equal(map.size, 3); + assert.ok(!map.get('1')); + assert.ok(!map.get('2')); + assert.equal(map.get('3'), true); + assert.equal(map.get('4'), obj); + assert.equal(map.get('5'), date); + + map.setLimit(0); assert.equal(map.size, 0); - assert.ok(!map.get('5')); - assert.ok(!map.get('4')); assert.ok(!map.get('3')); - assert.ok(!map.get('2')); - assert.ok(!map.get('1')); + assert.ok(!map.get('4')); + assert.ok(!map.get('5')); + + map.set('6', 6); + + assert.equal(map.size, 0); + assert.ok(!map.get('6')); + + map.setLimit(100); map.set('1', 1); map.set('2', '2'); - assert.ok(map.set('3', true)); // adding an element returns true - assert.ok(!map.set('3', true)); // adding it again returns false + map.set('3', true); + map.set('4', obj); + map.set('5', date); - assert.ok(map.has('1')); + assert.equal(map.size, 5); assert.equal(map.get('1'), 1); assert.equal(map.get('2'), '2'); assert.equal(map.get('3'), true); - - map.clear(); - - assert.equal(map.size, 0); - assert.ok(!map.get('1')); - assert.ok(!map.get('2')); - assert.ok(!map.get('3')); - assert.ok(!map.has('1')); - - const res = map.getOrSet('foo', 'bar'); - assert.equal(map.get('foo'), res); - assert.equal(res, 'bar'); + assert.equal(map.get('4'), obj); + assert.equal(map.get('5'), date); }); - test('BoundedLinkedMap - bounded', function () { - const map = new BoundedLinkedMap(5); + test('BoundedMap - bounded', function () { + const map = new BoundedMap(5); assert.equal(0, map.size); @@ -202,8 +229,8 @@ suite('Map', () => { assert.equal(map.get('14'), 14); }); - test('BoundedLinkedMap - bounded with ratio', function () { - const map = new BoundedLinkedMap(6, 0.5); + test('BoundedMap - bounded with ratio', function () { + const map = new BoundedMap(6, 0.5); assert.equal(0, map.size); @@ -240,37 +267,47 @@ suite('Map', () => { assert.equal(map.get('10'), 10); }); - test('LRUCache', function () { - const cache = new LRUCache(3); + test('BoundedMap - MRU order', function () { + const map = new BoundedMap(3); + + function peek(key) { + const res = map.get(key); + if (res) { + map.delete(key); + map.set(key, res); + } + + return res; + } - assert.equal(0, cache.size); + assert.equal(0, map.size); - cache.set('1', 1); - cache.set('2', 2); - cache.set('3', 3); + map.set('1', 1); + map.set('2', 2); + map.set('3', 3); - assert.equal(3, cache.size); + assert.equal(3, map.size); - assert.equal(cache.get('1'), 1); - assert.equal(cache.get('2'), 2); - assert.equal(cache.get('3'), 3); + assert.equal(map.get('1'), 1); + assert.equal(map.get('2'), 2); + assert.equal(map.get('3'), 3); - cache.set('4', 4); + map.set('4', 4); - assert.equal(3, cache.size); - assert.equal(cache.get('4'), 4); // this changes MRU order - assert.equal(cache.get('3'), 3); - assert.equal(cache.get('2'), 2); + assert.equal(3, map.size); + assert.equal(peek('4'), 4); // this changes MRU order + assert.equal(peek('3'), 3); + assert.equal(peek('2'), 2); - cache.set('5', 5); - cache.set('6', 6); + map.set('5', 5); + map.set('6', 6); - assert.equal(3, cache.size); - assert.equal(cache.get('2'), 2); - assert.equal(cache.get('5'), 5); - assert.equal(cache.get('6'), 6); - assert.ok(!cache.has('3')); - assert.ok(!cache.has('4')); + assert.equal(3, map.size); + assert.equal(peek('2'), 2); + assert.equal(peek('5'), 5); + assert.equal(peek('6'), 6); + assert.ok(!map.has('3')); + assert.ok(!map.has('4')); }); diff --git a/src/vs/base/test/common/paths.test.ts b/src/vs/base/test/common/paths.test.ts index 230bfb306ed87..54cff7d8c9d83 100644 --- a/src/vs/base/test/common/paths.test.ts +++ b/src/vs/base/test/common/paths.test.ts @@ -201,4 +201,57 @@ suite('Paths', () => { assert.ok(!paths.isValidBasename('tes"t.txt')); } }); + + test('isAbsolute_win', () => { + // Absolute paths + [ + 'C:/', + 'C:\\', + 'C:/foo', + 'C:\\foo', + 'z:/foo/bar.txt', + 'z:\\foo\\bar.txt', + + '\\\\localhost\\c$\\foo', + + '/', + '/foo' + ].forEach(absolutePath => { + assert.ok(paths.isAbsolute_win32(absolutePath), absolutePath); + }); + + // Not absolute paths + [ + '', + 'foo', + 'foo/bar', + './foo', + 'http://foo.com/bar' + ].forEach(nonAbsolutePath => { + assert.ok(!paths.isAbsolute_win32(nonAbsolutePath), nonAbsolutePath); + }); + }); + + test('isAbsolute_posix', () => { + // Absolute paths + [ + '/', + '/foo', + '/foo/bar.txt' + ].forEach(absolutePath => { + assert.ok(paths.isAbsolute_posix(absolutePath), absolutePath); + }); + + // Not absolute paths + [ + '', + 'foo', + 'foo/bar', + './foo', + 'http://foo.com/bar', + 'z:/foo/bar.txt', + ].forEach(nonAbsolutePath => { + assert.ok(!paths.isAbsolute_posix(nonAbsolutePath), nonAbsolutePath); + }); + }); }); \ No newline at end of file diff --git a/src/vs/base/test/common/strings.test.ts b/src/vs/base/test/common/strings.test.ts index ef9e73d6c560e..f6ad8b4beb8fa 100644 --- a/src/vs/base/test/common/strings.test.ts +++ b/src/vs/base/test/common/strings.test.ts @@ -80,6 +80,7 @@ suite('Strings', () => { assertCompareIgnoreCase('aa', 'aA'); assertCompareIgnoreCase('a', 'aa'); assertCompareIgnoreCase('ab', 'aA'); + assertCompareIgnoreCase('O', '/'); }); test('format', function () { @@ -93,6 +94,16 @@ suite('Strings', () => { assert.strictEqual(strings.format('Foo {0} Bar. {1}', '(foo)', '.test'), 'Foo (foo) Bar. .test'); }); + test('overlap', function () { + assert.equal(strings.overlap('foobar', 'arr, I am a priate'), 2); + assert.equal(strings.overlap('no', 'overlap'), 1); + assert.equal(strings.overlap('no', '0verlap'), 0); + assert.equal(strings.overlap('nothing', ''), 0); + assert.equal(strings.overlap('', 'nothing'), 0); + assert.equal(strings.overlap('full', 'full'), 4); + assert.equal(strings.overlap('full', 'fulloverlap'), 4); + }); + test('computeLineStarts', function () { function assertLineStart(text: string, ...offsets: number[]): void { const actual = strings.computeLineStarts(text); @@ -231,6 +242,24 @@ suite('Strings', () => { assert.equal(strings.containsRTL('זוהי עובדה מבוססת שדעתו'), true); }); + test('containsEmoji', () => { + assert.equal(strings.containsEmoji('a'), false); + assert.equal(strings.containsEmoji(''), false); + assert.equal(strings.containsEmoji(strings.UTF8_BOM_CHARACTER + 'a'), false); + assert.equal(strings.containsEmoji('hello world!'), false); + assert.equal(strings.containsEmoji('هناك حقيقة مثبتة منذ زمن طويل'), false); + assert.equal(strings.containsEmoji('זוהי עובדה מבוססת שדעתו'), false); + + assert.equal(strings.containsEmoji('a📚📚b'), true); + assert.equal(strings.containsEmoji('1F600 # 😀 grinning face'), true); + assert.equal(strings.containsEmoji('1F47E # 👾 alien monster'), true); + assert.equal(strings.containsEmoji('1F467 1F3FD # 👧🏽 girl: medium skin tone'), true); + assert.equal(strings.containsEmoji('26EA # ⛪ church'), true); + assert.equal(strings.containsEmoji('231B # ⌛ hourglass'), true); + assert.equal(strings.containsEmoji('2702 # ✂ scissors'), true); + assert.equal(strings.containsEmoji('1F1F7 1F1F4 # 🇷🇴 Romania'), true); + }); + // test('containsRTL speed', () => { // var SIZE = 1000000; // var REPEAT = 10; @@ -306,4 +335,17 @@ suite('Strings', () => { assert(!regExpWithFlags.ignoreCase); assert(regExpWithFlags.multiline); }); + + test('getLeadingWhitespace', () => { + assert.equal(strings.getLeadingWhitespace(' foo'), ' '); + assert.equal(strings.getLeadingWhitespace(' foo', 2), ''); + assert.equal(strings.getLeadingWhitespace(' foo', 1, 1), ''); + assert.equal(strings.getLeadingWhitespace(' foo', 0, 1), ' '); + assert.equal(strings.getLeadingWhitespace(' '), ' '); + assert.equal(strings.getLeadingWhitespace(' ', 1), ' '); + assert.equal(strings.getLeadingWhitespace(' ', 0, 1), ' '); + assert.equal(strings.getLeadingWhitespace('\t\tfunction foo(){', 0, 1), '\t'); + assert.equal(strings.getLeadingWhitespace('\t\tfunction foo(){', 0, 2), '\t\t'); + + }); }); diff --git a/src/vs/base/test/node/config.test.ts b/src/vs/base/test/node/config.test.ts index 01bf5ebdc057d..ad3d09dbd4058 100644 --- a/src/vs/base/test/node/config.test.ts +++ b/src/vs/base/test/node/config.test.ts @@ -98,6 +98,8 @@ suite('Config', () => { }); test('watching', function (done: () => void) { + this.timeout(10000); // watching is timing intense + testFile((error, testFile, cleanUp) => { if (error) { return onError(error, done); @@ -124,6 +126,8 @@ suite('Config', () => { }); test('watching also works when file created later', function (done: () => void) { + this.timeout(10000); // watching is timing intense + testFile((error, testFile, cleanUp) => { if (error) { return onError(error, done); @@ -148,6 +152,8 @@ suite('Config', () => { }); test('watching detects the config file getting deleted', function (done: () => void) { + this.timeout(10000); // watching is timing intense + testFile((error, testFile, cleanUp) => { if (error) { return onError(error, done); diff --git a/src/vs/base/test/node/extfs/extfs.test.ts b/src/vs/base/test/node/extfs/extfs.test.ts index 1eda91cea9d4f..ca184afd097f5 100644 --- a/src/vs/base/test/node/extfs/extfs.test.ts +++ b/src/vs/base/test/node/extfs/extfs.test.ts @@ -203,7 +203,7 @@ suite('Extfs', () => { }); }); - test('realpath', (done) => { + test('realcase', (done) => { const id = uuid.generateUuid(); const parentDir = path.join(os.tmpdir(), 'vsctests', id); const newDir = path.join(parentDir, 'extfs', id); @@ -213,7 +213,7 @@ suite('Extfs', () => { // assume case insensitive file system if (process.platform === 'win32' || process.platform === 'darwin') { const upper = newDir.toUpperCase(); - const real = extfs.realpathSync(upper); + const real = extfs.realcaseSync(upper); if (real) { // can be null in case of permission errors assert.notEqual(real, upper); @@ -224,11 +224,45 @@ suite('Extfs', () => { // linux, unix, etc. -> assume case sensitive file system else { - const real = extfs.realpathSync(newDir); + const real = extfs.realcaseSync(newDir); assert.equal(real, newDir); } extfs.del(parentDir, os.tmpdir(), () => { }, done); }); }); + + test('realpath', (done) => { + const id = uuid.generateUuid(); + const parentDir = path.join(os.tmpdir(), 'vsctests', id); + const newDir = path.join(parentDir, 'extfs', id); + + extfs.mkdirp(newDir, 493, (error) => { + + extfs.realpath(newDir, (error, realpath) => { + assert.ok(realpath); + assert.ok(!error); + + extfs.del(parentDir, os.tmpdir(), () => { }, done); + }); + }); + }); + + test('realpathSync', (done) => { + const id = uuid.generateUuid(); + const parentDir = path.join(os.tmpdir(), 'vsctests', id); + const newDir = path.join(parentDir, 'extfs', id); + + extfs.mkdirp(newDir, 493, (error) => { + let realpath: string; + try { + realpath = extfs.realpathSync(newDir); + } catch (error) { + assert.ok(!error); + } + assert.ok(realpath); + + extfs.del(parentDir, os.tmpdir(), () => { }, done); + }); + }); }); \ No newline at end of file diff --git a/src/vs/base/test/node/glob.test.ts b/src/vs/base/test/node/glob.test.ts index c48e8a3edf7ad..eb9ee5e87560e 100644 --- a/src/vs/base/test/node/glob.test.ts +++ b/src/vs/base/test/node/glob.test.ts @@ -15,12 +15,12 @@ suite('Glob', () => { // let patterns = [ // '{**/*.cs,**/*.json,**/*.csproj,**/*.sln}', // '{**/*.cs,**/*.csproj,**/*.sln}', - // '{**/*.ts,**/*.tsx,**/*.js,**/*.jsx,**/*.es6}', + // '{**/*.ts,**/*.tsx,**/*.js,**/*.jsx,**/*.es6,**/*.mjs}', // '**/*.go', // '{**/*.ps,**/*.ps1}', // '{**/*.c,**/*.cpp,**/*.h}', // '{**/*.fsx,**/*.fsi,**/*.fs,**/*.ml,**/*.mli}', - // '{**/*.js,**/*.jsx,**/*.es6}', + // '{**/*.js,**/*.jsx,**/*.es6,**/*.mjs}', // '{**/*.ts,**/*.tsx}', // '{**/*.php}', // '{**/*.php}', diff --git a/src/vs/base/worker/workerMain.ts b/src/vs/base/worker/workerMain.ts index f80f9d44e16b9..9bf45f0b20260 100644 --- a/src/vs/base/worker/workerMain.ts +++ b/src/vs/base/worker/workerMain.ts @@ -18,7 +18,7 @@ catchError: true }); - let loadCode = function (moduleId) { + let loadCode = function (moduleId: string) { require([moduleId], function (ws) { setTimeout(function () { let messageHandler = ws.create((msg: any) => { diff --git a/src/vs/code/common/windows.ts b/src/vs/code/common/windows.ts deleted file mode 100644 index 96ca219e07fb3..0000000000000 --- a/src/vs/code/common/windows.ts +++ /dev/null @@ -1,59 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import Event from 'vs/base/common/event'; -import { IDisposable, dispose } from 'vs/base/common/lifecycle'; -import { IWindowsService } from 'vs/platform/windows/common/windows'; - -export enum OpenContext { - - // opening when running from the command line - CLI, - - // macOS only: opening from the dock (also when opening files to a running instance from desktop) - DOCK, - - // opening from the main application window - MENU, - - // opening from a file or folder dialog - DIALOG, - - // opening from the OS's UI - DESKTOP, - - // opening through the API - API -} - -export interface IWindowEventService { - _serviceBrand: any; - - onNewWindowOpen: Event; - onWindowFocus: Event; -} - -export class ActiveWindowManager implements IDisposable { - - private disposables: IDisposable[] = []; - private _activeWindowId: number; - - constructor( @IWindowsService windowsService: IWindowsService) { - windowsService.onWindowOpen(this.setActiveWindow, this, this.disposables); - windowsService.onWindowFocus(this.setActiveWindow, this, this.disposables); - } - - private setActiveWindow(windowId: number) { - this._activeWindowId = windowId; - } - - get activeClientId(): string { - return `window:${this._activeWindowId}`; - } - - dispose() { - this.disposables = dispose(this.disposables); - } -} \ No newline at end of file diff --git a/src/vs/code/electron-browser/sharedProcess.html b/src/vs/code/electron-browser/sharedProcess.html index 1c3da8dcb917a..be70dede202b9 100644 --- a/src/vs/code/electron-browser/sharedProcess.html +++ b/src/vs/code/electron-browser/sharedProcess.html @@ -4,6 +4,7 @@ + diff --git a/src/vs/code/electron-browser/sharedProcess.js b/src/vs/code/electron-browser/sharedProcess.js index 835eeee1330b4..9b216f8962210 100644 --- a/src/vs/code/electron-browser/sharedProcess.js +++ b/src/vs/code/electron-browser/sharedProcess.js @@ -3,16 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -// Warning: Do not use the `let` declarator in this file, it breaks our minification - 'use strict'; -/*global window,document,define*/ - const path = require('path'); -const electron = require('electron'); -const remote = electron.remote; -const ipc = electron.ipcRenderer; function assign(destination, source) { return Object.keys(source) @@ -83,12 +76,10 @@ function main() { window.MonacoEnvironment = {}; - const nodeCachedDataErrors = window.MonacoEnvironment.nodeCachedDataErrors = []; require.config({ baseUrl: rootUrl, 'vs/nls': nlsConfig, nodeCachedDataDir: configuration.nodeCachedDataDir, - onNodeCachedDataError: function (err) { nodeCachedDataErrors.push(err) }, nodeModules: [/*BUILD->INSERT_NODE_MODULES*/] }); diff --git a/src/vs/code/electron-browser/sharedProcessMain.ts b/src/vs/code/electron-browser/sharedProcessMain.ts index 0d2d3221490ef..5388d58ef3419 100644 --- a/src/vs/code/electron-browser/sharedProcessMain.ts +++ b/src/vs/code/electron-browser/sharedProcessMain.ts @@ -32,14 +32,36 @@ import { IChoiceService } from 'vs/platform/message/common/message'; import { ChoiceChannelClient } from 'vs/platform/message/common/messageIpc'; import { IWindowsService } from 'vs/platform/windows/common/windows'; import { WindowsChannelClient } from 'vs/platform/windows/common/windowsIpc'; -import { ActiveWindowManager } from 'vs/code/common/windows'; import { ipcRenderer } from 'electron'; +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; interface ISharedProcessInitData { sharedIPCHandle: string; args: ParsedArgs; } +class ActiveWindowManager implements IDisposable { + private disposables: IDisposable[] = []; + private _activeWindowId: number; + + constructor( @IWindowsService windowsService: IWindowsService) { + windowsService.onWindowOpen(this.setActiveWindow, this, this.disposables); + windowsService.onWindowFocus(this.setActiveWindow, this, this.disposables); + } + + private setActiveWindow(windowId: number) { + this._activeWindowId = windowId; + } + + public get activeClientId(): string { + return `window:${this._activeWindowId}`; + } + + public dispose() { + this.disposables = dispose(this.disposables); + } +} + const eventPrefix = 'monacoworkbench'; function main(server: Server, initData: ISharedProcessInitData): void { diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index 151d6ac5b20ed..d0f242435e311 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -7,31 +7,26 @@ import { app, ipcMain as ipc, BrowserWindow } from 'electron'; import * as platform from 'vs/base/common/platform'; -import { OpenContext } from 'vs/code/common/windows'; -import { IWindowsMainService, WindowsManager } from 'vs/code/electron-main/windows'; -import { IWindowsService } from 'vs/platform/windows/common/windows'; +import { WindowsManager } from 'vs/code/electron-main/windows'; +import { IWindowsService, OpenContext } from 'vs/platform/windows/common/windows'; import { WindowsChannel } from 'vs/platform/windows/common/windowsIpc'; import { WindowsService } from 'vs/platform/windows/electron-main/windowsService'; -import { ILifecycleService } from 'vs/code/electron-main/lifecycle'; -import { VSCodeMenu } from 'vs/code/electron-main/menus'; -import { getShellEnvironment } from 'vs/code/electron-main/shellEnv'; +import { ILifecycleService } from 'vs/platform/lifecycle/electron-main/lifecycleMain'; +import { CodeMenu } from 'vs/code/electron-main/menus'; +import { getShellEnvironment } from 'vs/code/node/shellEnv'; import { IUpdateService } from 'vs/platform/update/common/update'; import { UpdateChannel } from 'vs/platform/update/common/updateIpc'; import { UpdateService } from 'vs/platform/update/electron-main/updateService'; import { Server as ElectronIPCServer } from 'vs/base/parts/ipc/electron-main/ipc.electron-main'; import { Server, connect, Client } from 'vs/base/parts/ipc/node/ipc.net'; -import { AskpassChannel } from 'vs/workbench/parts/git/common/gitIpc'; -import { GitAskpassService } from 'vs/workbench/parts/git/electron-main/askpassService'; import { SharedProcess } from 'vs/code/electron-main/sharedProcess'; import { Mutex } from 'windows-mutex'; import { LaunchService, LaunchChannel, ILaunchService } from './launch'; import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; -import { ILogService } from 'vs/code/electron-main/log'; -import { IStorageService } from 'vs/code/electron-main/storage'; -import { IBackupMainService } from 'vs/platform/backup/common/backup'; -import { BackupChannel } from 'vs/platform/backup/common/backupIpc'; +import { ILogService } from 'vs/platform/log/common/log'; +import { IStorageService } from 'vs/platform/storage/node/storage'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IURLService } from 'vs/platform/url/common/url'; @@ -44,11 +39,20 @@ import { resolveCommonProperties, machineIdStorageKey, machineIdIpcChannel } fro import { getDelayedChannel } from 'vs/base/parts/ipc/common/ipc'; import product from 'vs/platform/node/product'; import pkg from 'vs/platform/node/package'; -import { IDisposable, dispose } from 'vs/base/common/lifecycle'; -import { ConfigurationService } from 'vs/platform/configuration/node/configurationService'; +import { ProxyAuthHandler } from './auth'; +import { IDisposable, dispose } from "vs/base/common/lifecycle"; +import { ConfigurationService } from "vs/platform/configuration/node/configurationService"; import { TPromise } from "vs/base/common/winjs.base"; - -export class VSCodeApplication { +import { IWindowsMainService } from "vs/platform/windows/electron-main/windows"; +import { IHistoryMainService } from "vs/platform/history/electron-main/historyMainService"; +import { isUndefinedOrNull } from 'vs/base/common/types'; +import { CodeWindow } from "vs/code/electron-main/window"; +import { isParent } from 'vs/platform/files/common/files'; +import { isEqual } from 'vs/base/common/paths'; +import { KeyboardLayoutMonitor } from "vs/code/electron-main/keyboard"; +import URI from 'vs/base/common/uri'; + +export class CodeApplication { private toDispose: IDisposable[]; private windowsMainService: IWindowsMainService; @@ -65,7 +69,8 @@ export class VSCodeApplication { @IEnvironmentService private environmentService: IEnvironmentService, @ILifecycleService private lifecycleService: ILifecycleService, @IConfigurationService private configurationService: ConfigurationService, - @IStorageService private storageService: IStorageService + @IStorageService private storageService: IStorageService, + @IHistoryMainService private historyService: IHistoryMainService ) { this.toDispose = [mainIpcServer, configurationService]; @@ -102,6 +107,75 @@ export class VSCodeApplication { this.dispose(); }); + app.on('accessibility-support-changed', (event: Event, accessibilitySupportEnabled: boolean) => { + if (this.windowsMainService) { + this.windowsMainService.sendToAll('vscode:accessibilitySupportChanged', accessibilitySupportEnabled); + } + }); + + app.on('activate', (event: Event, hasVisibleWindows: boolean) => { + this.logService.log('App#activate'); + + // Mac only event: open new window when we get activated + if (!hasVisibleWindows && this.windowsMainService) { + this.windowsMainService.openNewWindow(OpenContext.DOCK); + } + }); + + const isValidWebviewSource = (source: string) => + !source || (URI.parse(source.toLowerCase()).toString() as any).startsWith(URI.file(this.environmentService.appRoot.toLowerCase()).toString()); + + app.on('web-contents-created', (event, contents) => { + contents.on('will-attach-webview', (event, webPreferences, params) => { + delete webPreferences.preload; + webPreferences.nodeIntegration = false; + + // Verify URLs being loaded + if (isValidWebviewSource(params.src) && isValidWebviewSource(webPreferences.preloadURL)) { + return; + } + + // Otherwise prevent loading + console.error('Prevented webview attach'); + event.preventDefault(); + }); + + contents.on('will-navigate', event => { + console.error('Prevented webcontent navigation'); + event.preventDefault(); + }); + }); + + let macOpenFiles: string[] = []; + let runningTimeout: number = null; + app.on('open-file', (event: Event, path: string) => { + this.logService.log('App#open-file: ', path); + event.preventDefault(); + + // Keep in array because more might come! + macOpenFiles.push(path); + + // Clear previous handler if any + if (runningTimeout !== null) { + clearTimeout(runningTimeout); + runningTimeout = null; + } + + // Handle paths delayed in case more are coming! + runningTimeout = setTimeout(() => { + if (this.windowsMainService) { + this.windowsMainService.open({ + context: OpenContext.DOCK /* can also be opening from finder while app is running */, + cli: this.environmentService.args, + pathsToOpen: macOpenFiles, + preferNewWindow: true /* dropping on the dock or opening from finder prefers to open in a new window */ + }); + macOpenFiles = []; + runningTimeout = null; + } + }, 100); + }); + ipc.on('vscode:exit', (event, code: number) => { this.logService.log('IPC#vscode:exit', code); @@ -115,14 +189,59 @@ export class VSCodeApplication { }); ipc.on('vscode:fetchShellEnv', (event, windowId) => { - const win = BrowserWindow.fromId(windowId); + const { webContents } = BrowserWindow.fromId(windowId); getShellEnvironment().then(shellEnv => { - win.webContents.send('vscode:acceptShellEnv', shellEnv); + if (!webContents.isDestroyed()) { + webContents.send('vscode:acceptShellEnv', shellEnv); + } }, err => { - win.webContents.send('vscode:acceptShellEnv', {}); + if (!webContents.isDestroyed()) { + webContents.send('vscode:acceptShellEnv', {}); + } console.error('Error fetching shell env', err); }); }); + + ipc.on('vscode:broadcast', (event, windowId: number, target: string, broadcast: { channel: string; payload: any; }) => { + if (this.windowsMainService && broadcast.channel && !isUndefinedOrNull(broadcast.payload)) { + this.logService.log('IPC#vscode:broadcast', target, broadcast.channel, broadcast.payload); + + // Handle specific events on main side + this.onBroadcast(broadcast.channel, broadcast.payload); + + // Send to windows + if (target) { + const otherWindowsWithTarget = this.windowsMainService.getWindows().filter(w => w.id !== windowId && typeof w.openedWorkspacePath === 'string'); + const directTargetMatch = otherWindowsWithTarget.filter(w => isEqual(target, w.openedWorkspacePath, !platform.isLinux /* ignorecase */)); + const parentTargetMatch = otherWindowsWithTarget.filter(w => isParent(target, w.openedWorkspacePath, !platform.isLinux /* ignorecase */)); + + const targetWindow = directTargetMatch.length ? directTargetMatch[0] : parentTargetMatch[0]; // prefer direct match over parent match + if (targetWindow) { + targetWindow.send('vscode:broadcast', broadcast); + } + } else { + this.windowsMainService.sendToAll('vscode:broadcast', broadcast, [windowId]); + } + } + }); + + // Keyboard layout changes + KeyboardLayoutMonitor.INSTANCE.onDidChangeKeyboardLayout(isISOKeyboard => { + if (this.windowsMainService) { + this.windowsMainService.sendToAll('vscode:keyboardLayoutChanged', isISOKeyboard); + } + }); + } + + private onBroadcast(event: string, payload: any): void { + + // Theme changes + if (event === 'vscode:changeColorTheme' && typeof payload === 'string') { + let data = JSON.parse(payload); + + this.storageService.setItem(CodeWindow.themeStorageKey, data.id); + this.storageService.setItem(CodeWindow.themeBackgroundStorageKey, data.background); + } } public startup(): void { @@ -138,23 +257,21 @@ export class VSCodeApplication { app.setAppUserModelId(product.win32AppUserModelId); } - // Register Main IPC connections - const askpassService = new GitAskpassService(); - const askpassChannel = new AskpassChannel(askpassService); - this.mainIpcServer.registerChannel('askpass', askpassChannel); - // Create Electron IPC Server this.electronIpcServer = new ElectronIPCServer(); // Spawn shared process this.sharedProcess = new SharedProcess(this.environmentService, this.userEnv); this.toDispose.push(this.sharedProcess); - this.sharedProcessClient = this.sharedProcess.whenReady() - .then(() => connect(this.environmentService.sharedIPCHandle, 'main')); + this.sharedProcessClient = this.sharedProcess.whenReady().then(() => connect(this.environmentService.sharedIPCHandle, 'main')); // Services const appInstantiationService = this.initServices(); + // Setup Auth Handler + const authHandler = appInstantiationService.createInstance(ProxyAuthHandler); + this.toDispose.push(authHandler); + // Open Windows appInstantiationService.invokeFunction(accessor => this.openFirstWindow(accessor)); @@ -216,10 +333,6 @@ export class VSCodeApplication { const urlChannel = appInstantiationService.createInstance(URLChannel, urlService); this.electronIpcServer.registerChannel('url', urlChannel); - const backupService = accessor.get(IBackupMainService); - const backupChannel = appInstantiationService.createInstance(BackupChannel, backupService); - this.electronIpcServer.registerChannel('backup', backupChannel); - const windowsService = accessor.get(IWindowsService); const windowsChannel = new WindowsChannel(windowsService); this.electronIpcServer.registerChannel('windows', windowsChannel); @@ -259,11 +372,11 @@ export class VSCodeApplication { } // Install Menu - appInstantiationService.createInstance(VSCodeMenu); + appInstantiationService.createInstance(CodeMenu); // Jump List - this.windowsMainService.updateWindowsJumpList(); - this.windowsMainService.onRecentPathsChange(() => this.windowsMainService.updateWindowsJumpList()); + this.historyService.updateWindowsJumpList(); + this.historyService.onRecentPathsChange(() => this.historyService.updateWindowsJumpList()); // Start shared process here this.sharedProcess.spawn(); @@ -272,4 +385,4 @@ export class VSCodeApplication { private dispose(): void { this.toDispose = dispose(this.toDispose); } -} \ No newline at end of file +} diff --git a/src/vs/code/electron-main/auth.html b/src/vs/code/electron-main/auth.html new file mode 100644 index 0000000000000..e27ec2fc02e25 --- /dev/null +++ b/src/vs/code/electron-main/auth.html @@ -0,0 +1,125 @@ + + + + + + + + + + +

+
+

+
+

+

+

+ + +

+
+
+ + + + + \ No newline at end of file diff --git a/src/vs/code/electron-main/auth.ts b/src/vs/code/electron-main/auth.ts new file mode 100644 index 0000000000000..64492f3e3a452 --- /dev/null +++ b/src/vs/code/electron-main/auth.ts @@ -0,0 +1,93 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { localize } from 'vs/nls'; +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import { IWindowsMainService } from 'vs/platform/windows/electron-main/windows'; +import { fromEventEmitter } from 'vs/base/node/event'; +import { BrowserWindow, app } from 'electron'; + +type LoginEvent = { + event: Electron.Event; + webContents: Electron.WebContents; + req: Electron.LoginRequest; + authInfo: Electron.LoginAuthInfo; + cb: (username: string, password: string) => void; +}; + +type Credentials = { + username: string; + password: string; +}; + +export class ProxyAuthHandler { + + _serviceBrand: any; + + private retryCount = 0; + private disposables: IDisposable[] = []; + + constructor( + @IWindowsMainService private windowsService: IWindowsMainService + ) { + const onLogin = fromEventEmitter(app, 'login', (event, webContents, req, authInfo, cb) => ({ event, webContents, req, authInfo, cb })); + onLogin(this.onLogin, this, this.disposables); + } + + private onLogin({ event, authInfo, cb }: LoginEvent): void { + if (!authInfo.isProxy) { + return; + } + + if (this.retryCount++ > 1) { + return; + } + + event.preventDefault(); + + const opts: any = { + alwaysOnTop: true, + skipTaskbar: true, + resizable: false, + width: 450, + height: 220, + show: true, + title: 'VS Code' + }; + + const focusedWindow = this.windowsService.getFocusedWindow(); + + if (focusedWindow) { + opts.parent = focusedWindow.win; + opts.modal = true; + } + + const win = new BrowserWindow(opts); + const config = {}; + const baseUrl = require.toUrl('./auth.html'); + const url = `${baseUrl}?config=${encodeURIComponent(JSON.stringify(config))}`; + const proxyUrl = `${authInfo.host}:${authInfo.port}`; + const title = localize('authRequire', "Proxy Authentication Required"); + const message = localize('proxyauth', "The proxy {0} requires authentication.", proxyUrl); + const data = { title, message }; + const javascript = 'promptForCredentials(' + JSON.stringify(data) + ')'; + + const onWindowClose = () => cb('', ''); + win.on('close', onWindowClose); + + win.loadURL(url); + win.webContents.executeJavaScript(javascript, true).then(({ username, password }: Credentials) => { + cb(username, password); + win.removeListener('close', onWindowClose); + win.close(); + }); + } + + dispose(): void { + this.disposables = dispose(this.disposables); + } +} \ No newline at end of file diff --git a/src/vs/code/electron-main/keyboard.ts b/src/vs/code/electron-main/keyboard.ts new file mode 100644 index 0000000000000..34b6a905e9c6b --- /dev/null +++ b/src/vs/code/electron-main/keyboard.ts @@ -0,0 +1,175 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import * as nativeKeymap from 'native-keymap'; +import { IDisposable } from 'vs/base/common/lifecycle'; +import { isMacintosh } from 'vs/base/common/platform'; +import { IStorageService } from 'vs/platform/storage/node/storage'; +import Event, { Emitter, once } from 'vs/base/common/event'; +import { ConfigWatcher } from 'vs/base/node/config'; +import { IUserFriendlyKeybinding } from 'vs/platform/keybinding/common/keybinding'; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { ipcMain as ipc } from 'electron'; +import { IWindowsMainService } from "vs/platform/windows/electron-main/windows"; + +export class KeyboardLayoutMonitor { + + public static readonly INSTANCE = new KeyboardLayoutMonitor(); + + private _emitter: Emitter; + private _registered: boolean; + private _isISOKeyboard: boolean; + + private constructor() { + this._emitter = new Emitter(); + this._registered = false; + this._isISOKeyboard = this._readIsISOKeyboard(); + } + + public onDidChangeKeyboardLayout(callback: (isISOKeyboard: boolean) => void): IDisposable { + if (!this._registered) { + this._registered = true; + + nativeKeymap.onDidChangeKeyboardLayout(() => { + this._emitter.fire(this._isISOKeyboard); + }); + + if (isMacintosh) { + // See https://github.com/Microsoft/vscode/issues/24153 + // On OSX, on ISO keyboards, Chromium swaps the scan codes + // of IntlBackslash and Backquote. + // + // The C++ methods can give the current keyboard type (ISO or not) + // only after a NSEvent was handled. + // + // We therefore poll. + setInterval(() => { + let newValue = this._readIsISOKeyboard(); + if (this._isISOKeyboard === newValue) { + // no change + return; + } + + this._isISOKeyboard = newValue; + this._emitter.fire(this._isISOKeyboard); + + }, 3000); + } + } + return this._emitter.event(callback); + } + + private _readIsISOKeyboard(): boolean { + if (isMacintosh) { + return nativeKeymap.isISOKeyboard(); + } + return false; + } + + public isISOKeyboard(): boolean { + return this._isISOKeyboard; + } +} + +export interface IKeybinding { + id: string; + label: string; + isNative: boolean; +} + +export class KeybindingsResolver { + + private static lastKnownKeybindingsMapStorageKey = 'lastKnownKeybindings'; + + private commandIds: Set; + private keybindings: { [commandId: string]: IKeybinding }; + private keybindingsWatcher: ConfigWatcher; + + private _onKeybindingsChanged = new Emitter(); + onKeybindingsChanged: Event = this._onKeybindingsChanged.event; + + constructor( + @IStorageService private storageService: IStorageService, + @IEnvironmentService environmentService: IEnvironmentService, + @IWindowsMainService private windowsService: IWindowsMainService + ) { + this.commandIds = new Set(); + this.keybindings = this.storageService.getItem<{ [id: string]: string; }>(KeybindingsResolver.lastKnownKeybindingsMapStorageKey) || Object.create(null); + this.keybindingsWatcher = new ConfigWatcher(environmentService.appKeybindingsPath, { changeBufferDelay: 100 }); + + this.registerListeners(); + } + + private registerListeners(): void { + + // Resolve keybindings when any first window is loaded + const onceOnWindowReady = once(this.windowsService.onWindowReady); + onceOnWindowReady(win => this.resolveKeybindings(win)); + + // Listen to resolved keybindings from window + ipc.on('vscode:keybindingsResolved', (event, rawKeybindings: string) => { + let keybindings: IKeybinding[] = []; + try { + keybindings = JSON.parse(rawKeybindings); + } catch (error) { + // Should not happen + } + + // Fill hash map of resolved keybindings and check for changes + let keybindingsChanged = false; + let keybindingsCount = 0; + const resolvedKeybindings: { [commandId: string]: IKeybinding } = Object.create(null); + keybindings.forEach(keybinding => { + keybindingsCount++; + + resolvedKeybindings[keybinding.id] = keybinding; + + if (!this.keybindings[keybinding.id] || keybinding.label !== this.keybindings[keybinding.id].label) { + keybindingsChanged = true; + } + }); + + // A keybinding might have been unassigned, so we have to account for that too + if (Object.keys(this.keybindings).length !== keybindingsCount) { + keybindingsChanged = true; + } + + if (keybindingsChanged) { + this.keybindings = resolvedKeybindings; + this.storageService.setItem(KeybindingsResolver.lastKnownKeybindingsMapStorageKey, this.keybindings); // keep to restore instantly after restart + + this._onKeybindingsChanged.fire(); + } + }); + + // Resolve keybindings again when keybindings.json changes + this.keybindingsWatcher.onDidUpdateConfiguration(() => this.resolveKeybindings()); + + // Resolve keybindings when window reloads because an installed extension could have an impact + this.windowsService.onWindowReload(() => this.resolveKeybindings()); + } + + private resolveKeybindings(win = this.windowsService.getLastActiveWindow()): void { + if (this.commandIds.size && win) { + const commandIds = []; + this.commandIds.forEach(id => commandIds.push(id)); + win.sendWhenReady('vscode:resolveKeybindings', JSON.stringify(commandIds)); + } + } + + public getKeybinding(commandId: string): IKeybinding { + if (!commandId) { + return void 0; + } + + if (!this.commandIds.has(commandId)) { + this.commandIds.add(commandId); + } + + return this.keybindings[commandId]; + } +} \ No newline at end of file diff --git a/src/vs/code/electron-main/launch.ts b/src/vs/code/electron-main/launch.ts index e69f31b936381..14128133e0626 100644 --- a/src/vs/code/electron-main/launch.ts +++ b/src/vs/code/electron-main/launch.ts @@ -5,17 +5,16 @@ 'use strict'; -import { OpenContext } from 'vs/code/common/windows'; -import { IWindowsMainService } from 'vs/code/electron-main/windows'; -import { VSCodeWindow } from 'vs/code/electron-main/window'; import { TPromise } from 'vs/base/common/winjs.base'; import { IChannel } from 'vs/base/parts/ipc/common/ipc'; -import { ILogService } from 'vs/code/electron-main/log'; +import { ILogService } from 'vs/platform/log/common/log'; import { IURLService } from 'vs/platform/url/common/url'; import { IProcessEnvironment } from 'vs/base/common/platform'; import { ParsedArgs } from 'vs/platform/environment/common/environment'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { once } from 'vs/base/common/event'; +import { OpenContext } from 'vs/platform/windows/common/windows'; +import { IWindowsMainService, ICodeWindow } from "vs/platform/windows/electron-main/windows"; export const ID = 'launchService'; export const ILaunchService = createDecorator(ID); @@ -41,7 +40,7 @@ export class LaunchChannel implements ILaunchChannel { constructor(private service: ILaunchService) { } - call(command: string, arg: any): TPromise { + public call(command: string, arg: any): TPromise { switch (command) { case 'start': const { args, userEnv } = arg as IStartArguments; @@ -50,6 +49,7 @@ export class LaunchChannel implements ILaunchChannel { case 'get-main-process-id': return this.service.getMainProcessId(); } + return undefined; } } @@ -60,11 +60,11 @@ export class LaunchChannelClient implements ILaunchService { constructor(private channel: ILaunchChannel) { } - start(args: ParsedArgs, userEnv: IProcessEnvironment): TPromise { + public start(args: ParsedArgs, userEnv: IProcessEnvironment): TPromise { return this.channel.call('start', { args, userEnv }); } - getMainProcessId(): TPromise { + public getMainProcessId(): TPromise { return this.channel.call('get-main-process-id', null); } } @@ -79,20 +79,21 @@ export class LaunchService implements ILaunchService { @IURLService private urlService: IURLService ) { } - start(args: ParsedArgs, userEnv: IProcessEnvironment): TPromise { + public start(args: ParsedArgs, userEnv: IProcessEnvironment): TPromise { this.logService.log('Received data from other instance: ', args, userEnv); + // Check early for open-url which is handled in URL service const openUrlArg = args['open-url'] || []; const openUrl = typeof openUrlArg === 'string' ? [openUrlArg] : openUrlArg; - const context = !!userEnv['VSCODE_CLI'] ? OpenContext.CLI : OpenContext.DESKTOP; - if (openUrl.length > 0) { openUrl.forEach(url => this.urlService.open(url)); + return TPromise.as(null); } // Otherwise handle in windows service - let usedWindows: VSCodeWindow[]; + const context = !!userEnv['VSCODE_CLI'] ? OpenContext.CLI : OpenContext.DESKTOP; + let usedWindows: ICodeWindow[]; if (!!args.extensionDevelopmentPath) { this.windowsService.openExtensionDevelopmentHostWindow({ context, cli: args, userEnv }); } else if (args._.length === 0 && (args['new-window'] || args['unity-launch'])) { @@ -113,7 +114,7 @@ export class LaunchService implements ILaunchService { // If the other instance is waiting to be killed, we hook up a window listener if one window // is being used and only then resolve the startup promise which will kill this second instance - if (args.wait && usedWindows && usedWindows.length === 1 && usedWindows[0]) { + if (args.wait && usedWindows.length === 1 && usedWindows[0]) { const windowId = usedWindows[0].id; return new TPromise((c, e) => { @@ -129,8 +130,9 @@ export class LaunchService implements ILaunchService { return TPromise.as(null); } - getMainProcessId(): TPromise { + public getMainProcessId(): TPromise { this.logService.log('Received request for process ID from other instance.'); + return TPromise.as(process.pid); } } \ No newline at end of file diff --git a/src/vs/code/electron-main/lifecycle.ts b/src/vs/code/electron-main/lifecycle.ts deleted file mode 100644 index 7623a9170868b..0000000000000 --- a/src/vs/code/electron-main/lifecycle.ts +++ /dev/null @@ -1,267 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import { ipcMain as ipc, app } from 'electron'; -import { TPromise, TValueCallback } from 'vs/base/common/winjs.base'; -import { ReadyState, VSCodeWindow } from 'vs/code/electron-main/window'; -import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { ILogService } from 'vs/code/electron-main/log'; -import { IStorageService } from 'vs/code/electron-main/storage'; -import Event, { Emitter } from 'vs/base/common/event'; -import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; - -export const ILifecycleService = createDecorator('lifecycleService'); - -export enum UnloadReason { - CLOSE, - QUIT, - RELOAD, - LOAD -} - -export interface ILifecycleService { - _serviceBrand: any; - - /** - * Will be true if the program was restarted (e.g. due to explicit request or update). - */ - wasRestarted: boolean; - - /** - * Due to the way we handle lifecycle with eventing, the general app.on('before-quit') - * event cannot be used because it can be called twice on shutdown. Instead the onBeforeQuit - * handler in this module can be used and it is only called once on a shutdown sequence. - */ - onBeforeQuit: Event; - - /** - * We provide our own event when we close a window because the general window.on('close') - * is called even when the window prevents the closing. We want an event that truly fires - * before the window gets closed for real. - */ - onBeforeWindowClose: Event; - - ready(): void; - registerWindow(vscodeWindow: VSCodeWindow): void; - - unload(vscodeWindow: VSCodeWindow, reason: UnloadReason): TPromise; - - relaunch(options?: { addArgs?: string[], removeArgs?: string[] }); - - quit(fromUpdate?: boolean): TPromise; - isQuitRequested(): boolean; - - kill(code?: number); -} - -export class LifecycleService implements ILifecycleService { - - _serviceBrand: any; - - private static QUIT_FROM_RESTART_MARKER = 'quit.from.restart'; // use a marker to find out if the session was restarted - - private windowToCloseRequest: { [windowId: string]: boolean }; - private quitRequested: boolean; - private pendingQuitPromise: TPromise; - private pendingQuitPromiseComplete: TValueCallback; - private oneTimeListenerTokenGenerator: number; - private _wasRestarted: boolean; - - private _onBeforeQuit = new Emitter(); - onBeforeQuit: Event = this._onBeforeQuit.event; - - private _onBeforeWindowClose = new Emitter(); - onBeforeWindowClose: Event = this._onBeforeWindowClose.event; - - constructor( - @IEnvironmentService private environmentService: IEnvironmentService, - @ILogService private logService: ILogService, - @IStorageService private storageService: IStorageService - ) { - this.windowToCloseRequest = Object.create(null); - this.quitRequested = false; - this.oneTimeListenerTokenGenerator = 0; - this._wasRestarted = false; - - this.handleRestarted(); - } - - private handleRestarted(): void { - this._wasRestarted = !!this.storageService.getItem(LifecycleService.QUIT_FROM_RESTART_MARKER); - - if (this._wasRestarted) { - this.storageService.removeItem(LifecycleService.QUIT_FROM_RESTART_MARKER); // remove the marker right after if found - } - } - - public get wasRestarted(): boolean { - return this._wasRestarted; - } - - public ready(): void { - this.registerListeners(); - } - - private registerListeners(): void { - - // before-quit - app.on('before-quit', (e) => { - this.logService.log('Lifecycle#before-quit'); - - if (!this.quitRequested) { - this._onBeforeQuit.fire(); // only send this if this is the first quit request we have - } - - this.quitRequested = true; - }); - - // window-all-closed - app.on('window-all-closed', () => { - this.logService.log('Lifecycle#window-all-closed'); - - // Windows/Linux: we quit when all windows have closed - // Mac: we only quit when quit was requested - // --wait: we quit when all windows are closed - if (this.quitRequested || process.platform !== 'darwin' || this.environmentService.wait) { - app.quit(); - } - }); - } - - public registerWindow(vscodeWindow: VSCodeWindow): void { - - // Window Before Closing: Main -> Renderer - vscodeWindow.win.on('close', (e) => { - const windowId = vscodeWindow.id; - this.logService.log('Lifecycle#window-before-close', windowId); - - // The window already acknowledged to be closed - if (this.windowToCloseRequest[windowId]) { - this.logService.log('Lifecycle#window-close', windowId); - - delete this.windowToCloseRequest[windowId]; - - return; - } - - // Otherwise prevent unload and handle it from window - e.preventDefault(); - this.unload(vscodeWindow, UnloadReason.CLOSE).done(veto => { - if (!veto) { - this.windowToCloseRequest[windowId] = true; - this._onBeforeWindowClose.fire(vscodeWindow); - vscodeWindow.win.close(); - } else { - this.quitRequested = false; - delete this.windowToCloseRequest[windowId]; - } - }); - }); - } - - public unload(vscodeWindow: VSCodeWindow, reason: UnloadReason): TPromise { - - // Always allow to unload a window that is not yet ready - if (vscodeWindow.readyState !== ReadyState.READY) { - return TPromise.as(false); - } - - this.logService.log('Lifecycle#unload()', vscodeWindow.id); - - return new TPromise((c) => { - const oneTimeEventToken = this.oneTimeListenerTokenGenerator++; - const okChannel = `vscode:ok${oneTimeEventToken}`; - const cancelChannel = `vscode:cancel${oneTimeEventToken}`; - - ipc.once(okChannel, () => { - c(false); // no veto - }); - - ipc.once(cancelChannel, () => { - - // Any cancellation also cancels a pending quit if present - if (this.pendingQuitPromiseComplete) { - this.pendingQuitPromiseComplete(true /* veto */); - this.pendingQuitPromiseComplete = null; - this.pendingQuitPromise = null; - } - - c(true); // veto - }); - - vscodeWindow.send('vscode:beforeUnload', { okChannel, cancelChannel, reason: this.quitRequested ? UnloadReason.QUIT : reason }); - }); - } - - /** - * A promise that completes to indicate if the quit request has been veto'd - * by the user or not. - */ - public quit(fromUpdate?: boolean): TPromise { - this.logService.log('Lifecycle#quit()'); - - if (!this.pendingQuitPromise) { - this.pendingQuitPromise = new TPromise(c => { - - // Store as field to access it from a window cancellation - this.pendingQuitPromiseComplete = c; - - app.once('will-quit', () => { - if (this.pendingQuitPromiseComplete) { - if (fromUpdate) { - this.storageService.setItem(LifecycleService.QUIT_FROM_RESTART_MARKER, true); - } - - this.pendingQuitPromiseComplete(false /* no veto */); - this.pendingQuitPromiseComplete = null; - this.pendingQuitPromise = null; - } - }); - - app.quit(); - }); - } - - return this.pendingQuitPromise; - } - - public kill(code?: number): void { - app.exit(code); - } - - public relaunch(options?: { addArgs?: string[], removeArgs?: string[] }): void { - const args = process.argv.slice(1); - if (options && options.addArgs) { - args.push(...options.addArgs); - } - - if (options && options.removeArgs) { - for (const a of options.removeArgs) { - const idx = args.indexOf(a); - if (idx >= 0) { - args.splice(idx, 1); - } - } - } - - let vetod = false; - app.once('quit', () => { - if (!vetod) { - this.storageService.setItem(LifecycleService.QUIT_FROM_RESTART_MARKER, true); - app.relaunch({ args }); - } - }); - - this.quit().then(veto => { - vetod = veto; - }); - } - - public isQuitRequested(): boolean { - return !!this.quitRequested; - } -} \ No newline at end of file diff --git a/src/vs/code/electron-main/main.ts b/src/vs/code/electron-main/main.ts index e76e0685b51b5..8e520e45a6e3a 100644 --- a/src/vs/code/electron-main/main.ts +++ b/src/vs/code/electron-main/main.ts @@ -10,8 +10,8 @@ import { assign } from 'vs/base/common/objects'; import * as platform from 'vs/base/common/platform'; import { parseMainProcessArgv } from 'vs/platform/environment/node/argv'; import { mkdirp } from 'vs/base/node/pfs'; -import { validatePaths } from 'vs/code/electron-main/paths'; -import { LifecycleService, ILifecycleService } from 'vs/code/electron-main/lifecycle'; +import { validatePaths } from 'vs/code/node/paths'; +import { LifecycleService, ILifecycleService } from 'vs/platform/lifecycle/electron-main/lifecycleMain'; import { Server, serve, connect } from 'vs/base/parts/ipc/node/ipc.net'; import { TPromise } from 'vs/base/common/winjs.base'; import { ILaunchChannel, LaunchChannelClient } from './launch'; @@ -19,8 +19,8 @@ import { ServicesAccessor, IInstantiationService } from 'vs/platform/instantiati import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; -import { ILogService, MainLogService } from 'vs/code/electron-main/log'; -import { IStorageService, StorageService } from 'vs/code/electron-main/storage'; +import { ILogService, LogMainService } from 'vs/platform/log/common/log'; +import { IStorageService, StorageService } from 'vs/platform/storage/node/storage'; import { IBackupMainService } from 'vs/platform/backup/common/backup'; import { BackupMainService } from 'vs/platform/backup/electron-main/backupMainService'; import { IEnvironmentService, ParsedArgs } from 'vs/platform/environment/common/environment'; @@ -32,13 +32,15 @@ import { RequestService } from 'vs/platform/request/electron-main/requestService import { IURLService } from 'vs/platform/url/common/url'; import { URLService } from 'vs/platform/url/electron-main/urlService'; import * as fs from 'original-fs'; -import { VSCodeApplication } from "vs/code/electron-main/app"; +import { CodeApplication } from "vs/code/electron-main/app"; +import { HistoryMainService, IHistoryMainService } from "vs/platform/history/electron-main/historyMainService"; function createServices(args: ParsedArgs): IInstantiationService { const services = new ServiceCollection(); services.set(IEnvironmentService, new SyncDescriptor(EnvironmentService, args, process.execPath)); - services.set(ILogService, new SyncDescriptor(MainLogService)); + services.set(ILogService, new SyncDescriptor(LogMainService)); + services.set(IHistoryMainService, new SyncDescriptor(HistoryMainService)); services.set(ILifecycleService, new SyncDescriptor(LifecycleService)); services.set(IStorageService, new SyncDescriptor(StorageService)); services.set(IConfigurationService, new SyncDescriptor(ConfigurationService)); @@ -58,6 +60,10 @@ function createPaths(environmentService: IEnvironmentService): TPromise { return TPromise.join(paths.map(p => p && mkdirp(p))) as TPromise; } +class ExpectedError extends Error { + public readonly isExpected = true; +} + function setupIPC(accessor: ServicesAccessor): TPromise { const logService = accessor.get(ILogService); const environmentService = accessor.get(IEnvironmentService); @@ -107,7 +113,7 @@ function setupIPC(accessor: ServicesAccessor): TPromise { const msg = 'Running extension tests from the command line is currently only supported if no other instance of Code is running.'; console.error(msg); client.dispose(); - return TPromise.wrapError(msg); + return TPromise.wrapError(new Error(msg)); } logService.log('Sending env to running instance...'); @@ -118,7 +124,7 @@ function setupIPC(accessor: ServicesAccessor): TPromise { return allowSetForegroundWindow(service) .then(() => service.start(environmentService.args, process.env)) .then(() => client.dispose()) - .then(() => TPromise.wrapError('Sent env to running instance. Terminating...')); + .then(() => TPromise.wrapError(new ExpectedError('Sent env to running instance. Terminating...'))); }, err => { if (!retry || platform.isWindows || err.code !== 'ECONNREFUSED') { @@ -144,19 +150,23 @@ function setupIPC(accessor: ServicesAccessor): TPromise { return setup(true); } -function quit(accessor: ServicesAccessor, errorOrMessage?: Error | string): void { +function quit(accessor: ServicesAccessor, reason?: ExpectedError | Error): void { const logService = accessor.get(ILogService); const lifecycleService = accessor.get(ILifecycleService); let exitCode = 0; - if (typeof errorOrMessage === 'string') { - logService.log(errorOrMessage); - } else if (errorOrMessage) { - exitCode = 1; // signal error to the outside - if (errorOrMessage.stack) { - console.error(errorOrMessage.stack); + + if (reason) { + if ((reason as ExpectedError).isExpected) { + logService.log(reason.message); } else { - console.error('Startup error: ' + errorOrMessage.toString()); + exitCode = 1; // signal error to the outside + + if (reason.stack) { + console.error(reason.stack); + } else { + console.error(`Startup error: ${reason.toString()}`); + } } } @@ -193,7 +203,7 @@ function main() { return instantiationService.invokeFunction(a => createPaths(a.get(IEnvironmentService))) .then(() => instantiationService.invokeFunction(setupIPC)) .then(mainIpcServer => { - const app = instantiationService.createInstance(VSCodeApplication, mainIpcServer, instanceEnv); + const app = instantiationService.createInstance(CodeApplication, mainIpcServer, instanceEnv); app.startup(); }); }).done(null, err => instantiationService.invokeFunction(quit, err)); diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index 52428d389ee51..90777e2d2f373 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -9,27 +9,19 @@ import * as nls from 'vs/nls'; import { isMacintosh, isLinux, isWindows, language } from 'vs/base/common/platform'; import * as arrays from 'vs/base/common/arrays'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { ipcMain as ipc, app, shell, dialog, Menu, MenuItem } from 'electron'; -import { OpenContext } from 'vs/code/common/windows'; -import { IWindowsMainService } from 'vs/code/electron-main/windows'; -import { VSCodeWindow } from 'vs/code/electron-main/window'; +import { ipcMain as ipc, app, shell, dialog, Menu, MenuItem, BrowserWindow } from 'electron'; +import { OpenContext } from 'vs/platform/windows/common/windows'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { IStorageService } from 'vs/code/electron-main/storage'; import { IFilesConfiguration, AutoSaveConfiguration } from 'vs/platform/files/common/files'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IUpdateService, State as UpdateState } from 'vs/platform/update/common/update'; import product from 'vs/platform/node/product'; import { RunOnceScheduler } from 'vs/base/common/async'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import Event, { Emitter, once } from 'vs/base/common/event'; -import { ConfigWatcher } from 'vs/base/node/config'; -import { IUserFriendlyKeybinding } from 'vs/platform/keybinding/common/keybinding'; - -interface IKeybinding { - id: string; - label: string; - isNative: boolean; -} +import { tildify } from 'vs/base/common/labels'; +import { KeybindingsResolver } from "vs/code/electron-main/keyboard"; +import { IWindowsMainService } from "vs/platform/windows/electron-main/windows"; +import { IHistoryMainService } from "vs/platform/history/electron-main/historyMainService"; interface IExtensionViewlet { id: string; @@ -37,6 +29,9 @@ interface IExtensionViewlet { } interface IConfiguration extends IFilesConfiguration { + window: { + enableMenuBarMnemonics: boolean; + }; workbench: { sideBar: { location: 'left' | 'right'; @@ -48,111 +43,23 @@ interface IConfiguration extends IFilesConfiguration { visible: boolean; } }; -} - -class KeybindingsResolver { - - private static lastKnownKeybindingsMapStorageKey = 'lastKnownKeybindings'; - - private commandIds: Set; - private keybindings: { [commandId: string]: IKeybinding }; - private keybindingsWatcher: ConfigWatcher; - - private _onKeybindingsChanged = new Emitter(); - onKeybindingsChanged: Event = this._onKeybindingsChanged.event; - - constructor( - @IStorageService private storageService: IStorageService, - @IEnvironmentService environmentService: IEnvironmentService, - @IWindowsMainService private windowsService: IWindowsMainService - ) { - this.commandIds = new Set(); - this.keybindings = this.storageService.getItem<{ [id: string]: string; }>(KeybindingsResolver.lastKnownKeybindingsMapStorageKey) || Object.create(null); - this.keybindingsWatcher = new ConfigWatcher(environmentService.appKeybindingsPath, { changeBufferDelay: 100 }); - - this.registerListeners(); - } - - private registerListeners(): void { - - // Resolve keybindings when any first window is loaded - const onceOnWindowReady = once(this.windowsService.onWindowReady); - onceOnWindowReady(win => this.resolveKeybindings(win)); - - // Listen to resolved keybindings from window - ipc.on('vscode:keybindingsResolved', (event, rawKeybindings: string) => { - let keybindings: IKeybinding[] = []; - try { - keybindings = JSON.parse(rawKeybindings); - } catch (error) { - // Should not happen - } - - // Fill hash map of resolved keybindings and check for changes - let keybindingsChanged = false; - let keybindingsCount = 0; - const resolvedKeybindings: { [commandId: string]: IKeybinding } = Object.create(null); - keybindings.forEach(keybinding => { - keybindingsCount++; - - resolvedKeybindings[keybinding.id] = keybinding; - - if (!this.keybindings[keybinding.id] || keybinding.label !== this.keybindings[keybinding.id].label) { - keybindingsChanged = true; - } - }); - - // A keybinding might have been unassigned, so we have to account for that too - if (Object.keys(this.keybindings).length !== keybindingsCount) { - keybindingsChanged = true; - } - - if (keybindingsChanged) { - this.keybindings = resolvedKeybindings; - this.storageService.setItem(KeybindingsResolver.lastKnownKeybindingsMapStorageKey, this.keybindings); // keep to restore instantly after restart - - this._onKeybindingsChanged.fire(); - } - }); - - // Resolve keybindings again when keybindings.json changes - this.keybindingsWatcher.onDidUpdateConfiguration(() => this.resolveKeybindings()); - - // Resolve keybindings when window reloads because an installed extension could have an impact - this.windowsService.onWindowReload(() => this.resolveKeybindings()); - } - - private resolveKeybindings(win: VSCodeWindow = this.windowsService.getLastActiveWindow()): void { - if (this.commandIds.size && win) { - const commandIds = []; - this.commandIds.forEach(id => commandIds.push(id)); - win.sendWhenReady('vscode:resolveKeybindings', JSON.stringify(commandIds)); - } - } - - public getKeybinding(commandId: string): IKeybinding { - if (!commandId) { - return void 0; - } - - if (!this.commandIds.has(commandId)) { - this.commandIds.add(commandId); - } - - return this.keybindings[commandId]; - } + editor: { + multiCursorModifier: 'ctrlCmd' | 'alt' + }; } const telemetryFrom = 'menu'; -export class VSCodeMenu { +export class CodeMenu { private static MAX_MENU_RECENT_ENTRIES = 10; private currentAutoSaveSetting: string; + private currentMultiCursorModifierSetting: string; private currentSidebarLocation: 'left' | 'right'; private currentStatusbarVisible: boolean; private currentActivityBarVisible: boolean; + private currentEnableMenuBarMnemonics: boolean; private isQuitting: boolean; private appMenuInstalled: boolean; @@ -169,7 +76,8 @@ export class VSCodeMenu { @IConfigurationService private configurationService: IConfigurationService, @IWindowsMainService private windowsService: IWindowsMainService, @IEnvironmentService private environmentService: IEnvironmentService, - @ITelemetryService private telemetryService: ITelemetryService + @ITelemetryService private telemetryService: ITelemetryService, + @IHistoryMainService private historyService: IHistoryMainService ) { this.extensionViewlets = []; @@ -192,7 +100,7 @@ export class VSCodeMenu { // Listen to some events from window service this.windowsService.onPathsOpen(paths => this.updateMenu()); - this.windowsService.onRecentPathsChange(paths => this.updateMenu()); + this.historyService.onRecentPathsChange(paths => this.updateMenu()); this.windowsService.onWindowClose(_ => this.onClose(this.windowsService.getWindowCount())); // Listen to extension viewlets @@ -211,7 +119,7 @@ export class VSCodeMenu { }); // Update when auto save config changes - this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated(e.config, true /* update menu if changed */)); + this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated(this.configurationService.getConfiguration(), true /* update menu if changed */)); // Listen to update service this.updateService.onStateChange(() => this.updateMenu()); @@ -228,6 +136,12 @@ export class VSCodeMenu { updateMenu = true; } + const newMultiCursorModifierSetting = config && config.editor && config.editor.multiCursorModifier; + if (newMultiCursorModifierSetting !== this.currentMultiCursorModifierSetting) { + this.currentMultiCursorModifierSetting = newMultiCursorModifierSetting; + updateMenu = true; + } + const newSidebarLocation = config && config.workbench && config.workbench.sideBar && config.workbench.sideBar.location || 'left'; if (newSidebarLocation !== this.currentSidebarLocation) { this.currentSidebarLocation = newSidebarLocation; @@ -252,6 +166,15 @@ export class VSCodeMenu { updateMenu = true; } + let newEnableMenuBarMnemonics = config && config.window && config.window.enableMenuBarMnemonics; + if (typeof newEnableMenuBarMnemonics !== 'boolean') { + newEnableMenuBarMnemonics = true; + } + if (newEnableMenuBarMnemonics !== this.currentEnableMenuBarMnemonics) { + this.currentEnableMenuBarMnemonics = newEnableMenuBarMnemonics; + updateMenu = true; + } + if (handleMenu && updateMenu) { this.updateMenu(); } @@ -298,32 +221,32 @@ export class VSCodeMenu { // File const fileMenu = new Menu(); - const fileMenuItem = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'mFile', comment: ['&& denotes a mnemonic'] }, "&&File")), submenu: fileMenu }); + const fileMenuItem = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'mFile', comment: ['&& denotes a mnemonic'] }, "&&File")), submenu: fileMenu }); this.setFileMenu(fileMenu); // Edit const editMenu = new Menu(); - const editMenuItem = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'mEdit', comment: ['&& denotes a mnemonic'] }, "&&Edit")), submenu: editMenu }); + const editMenuItem = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'mEdit', comment: ['&& denotes a mnemonic'] }, "&&Edit")), submenu: editMenu }); this.setEditMenu(editMenu); // Selection const selectionMenu = new Menu(); - const selectionMenuItem = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'mSelection', comment: ['&& denotes a mnemonic'] }, "&&Selection")), submenu: selectionMenu }); + const selectionMenuItem = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'mSelection', comment: ['&& denotes a mnemonic'] }, "&&Selection")), submenu: selectionMenu }); this.setSelectionMenu(selectionMenu); // View const viewMenu = new Menu(); - const viewMenuItem = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'mView', comment: ['&& denotes a mnemonic'] }, "&&View")), submenu: viewMenu }); + const viewMenuItem = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'mView', comment: ['&& denotes a mnemonic'] }, "&&View")), submenu: viewMenu }); this.setViewMenu(viewMenu); // Goto const gotoMenu = new Menu(); - const gotoMenuItem = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'mGoto', comment: ['&& denotes a mnemonic'] }, "&&Go")), submenu: gotoMenu }); + const gotoMenuItem = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'mGoto', comment: ['&& denotes a mnemonic'] }, "&&Go")), submenu: gotoMenu }); this.setGotoMenu(gotoMenu); // Debug const debugMenu = new Menu(); - const debugMenuItem = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'mDebug', comment: ['&& denotes a mnemonic'] }, "&&Debug")), submenu: debugMenu }); + const debugMenuItem = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'mDebug', comment: ['&& denotes a mnemonic'] }, "&&Debug")), submenu: debugMenu }); this.setDebugMenu(debugMenu); @@ -331,15 +254,20 @@ export class VSCodeMenu { let macWindowMenuItem: Electron.MenuItem; if (isMacintosh) { const windowMenu = new Menu(); - macWindowMenuItem = new MenuItem({ label: mnemonicLabel(nls.localize('mWindow', "Window")), submenu: windowMenu, role: 'window' }); + macWindowMenuItem = new MenuItem({ label: this.mnemonicLabel(nls.localize('mWindow', "Window")), submenu: windowMenu, role: 'window' }); this.setMacWindowMenu(windowMenu); } // Help const helpMenu = new Menu(); - const helpMenuItem = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'mHelp', comment: ['&& denotes a mnemonic'] }, "&&Help")), submenu: helpMenu, role: 'help' }); + const helpMenuItem = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'mHelp', comment: ['&& denotes a mnemonic'] }, "&&Help")), submenu: helpMenu, role: 'help' }); this.setHelpMenu(helpMenu); + // Tasks + const taskMenu = new Menu(); + const taskMenuItem = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'mTask', comment: ['&& denotes a mnemonic'] }, "&&Tasks")), submenu: taskMenu }); + this.setTaskMenu(taskMenu); + // Menu Structure if (macApplicationMenuItem) { menubar.append(macApplicationMenuItem); @@ -351,6 +279,7 @@ export class VSCodeMenu { menubar.append(viewMenuItem); menubar.append(gotoMenuItem); menubar.append(debugMenuItem); + menubar.append(taskMenuItem); if (macWindowMenuItem) { menubar.append(macWindowMenuItem); @@ -365,7 +294,7 @@ export class VSCodeMenu { this.appMenuInstalled = true; const dockMenu = new Menu(); - dockMenu.append(new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miNewWindow', comment: ['&& denotes a mnemonic'] }, "New &&Window")), click: () => this.windowsService.openNewWindow(OpenContext.DOCK) })); + dockMenu.append(new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miNewWindow', comment: ['&& denotes a mnemonic'] }, "New &&Window")), click: () => this.windowsService.openNewWindow(OpenContext.DOCK) })); app.dock.setMenu(dockMenu); } @@ -375,6 +304,8 @@ export class VSCodeMenu { const about = new MenuItem({ label: nls.localize('mAbout', "About {0}", product.nameLong), role: 'about' }); const checkForUpdates = this.getUpdateMenuItems(); const preferences = this.getPreferencesMenu(); + const servicesMenu = new Menu(); + const services = new MenuItem({ label: nls.localize('mServices', "Services"), role: 'services', submenu: servicesMenu }); const hide = new MenuItem({ label: nls.localize('mHide', "Hide {0}", product.nameLong), role: 'hide', accelerator: 'Command+H' }); const hideOthers = new MenuItem({ label: nls.localize('mHideOthers', "Hide Others"), role: 'hideothers', accelerator: 'Command+Alt+H' }); const showAll = new MenuItem({ label: nls.localize('mShowAll', "Show All"), role: 'unhide' }); @@ -386,6 +317,8 @@ export class VSCodeMenu { __separator__(), preferences, __separator__(), + services, + __separator__(), hide, hideOthers, showAll, @@ -401,42 +334,45 @@ export class VSCodeMenu { let newFile: Electron.MenuItem; if (hasNoWindows) { - newFile = new MenuItem(this.likeAction('workbench.action.files.newUntitledFile', { label: mnemonicLabel(nls.localize({ key: 'miNewFile', comment: ['&& denotes a mnemonic'] }, "&&New File")), click: () => this.windowsService.openNewWindow(OpenContext.MENU) })); + newFile = new MenuItem(this.likeAction('workbench.action.files.newUntitledFile', { label: this.mnemonicLabel(nls.localize({ key: 'miNewFile', comment: ['&& denotes a mnemonic'] }, "&&New File")), click: () => this.windowsService.openNewWindow(OpenContext.MENU) })); } else { newFile = this.createMenuItem(nls.localize({ key: 'miNewFile', comment: ['&& denotes a mnemonic'] }, "&&New File"), 'workbench.action.files.newUntitledFile'); } - const open = new MenuItem(this.likeAction('workbench.action.files.openFileFolder', { label: mnemonicLabel(nls.localize({ key: 'miOpen', comment: ['&& denotes a mnemonic'] }, "&&Open...")), click: (menuItem, win, event) => this.windowsService.openFileFolderPicker(this.isOptionClick(event), { from: telemetryFrom }) })); - const openFolder = new MenuItem(this.likeAction('workbench.action.files.openFolder', { label: mnemonicLabel(nls.localize({ key: 'miOpenFolder', comment: ['&& denotes a mnemonic'] }, "Open &&Folder...")), click: (menuItem, win, event) => this.windowsService.openFolderPicker(this.isOptionClick(event), undefined, { from: telemetryFrom }) })); + const open = new MenuItem(this.likeAction('workbench.action.files.openFileFolder', { label: this.mnemonicLabel(nls.localize({ key: 'miOpen', comment: ['&& denotes a mnemonic'] }, "&&Open...")), click: (menuItem, win, event) => this.windowsService.pickFileFolderAndOpen(this.isOptionClick(event), { from: telemetryFrom }) })); + const openFolder = new MenuItem(this.likeAction('workbench.action.files.openFolder', { label: this.mnemonicLabel(nls.localize({ key: 'miOpenFolder', comment: ['&& denotes a mnemonic'] }, "Open &&Folder...")), click: (menuItem, win, event) => this.windowsService.pickFolderAndOpen(this.isOptionClick(event), undefined, { from: telemetryFrom }) })); let openFile: Electron.MenuItem; if (hasNoWindows) { - openFile = new MenuItem(this.likeAction('workbench.action.files.openFile', { label: mnemonicLabel(nls.localize({ key: 'miOpenFile', comment: ['&& denotes a mnemonic'] }, "&&Open File...")), click: (menuItem, win, event) => this.windowsService.openFilePicker(this.isOptionClick(event), undefined, undefined, { from: telemetryFrom }) })); + openFile = new MenuItem(this.likeAction('workbench.action.files.openFile', { label: this.mnemonicLabel(nls.localize({ key: 'miOpenFile', comment: ['&& denotes a mnemonic'] }, "&&Open File...")), click: (menuItem, win, event) => this.windowsService.pickFileAndOpen(this.isOptionClick(event), undefined, undefined, { from: telemetryFrom }) })); } else { openFile = this.createMenuItem(nls.localize({ key: 'miOpenFile', comment: ['&& denotes a mnemonic'] }, "&&Open File..."), ['workbench.action.files.openFile', 'workbench.action.files.openFileInNewWindow']); } const openRecentMenu = new Menu(); this.setOpenRecentMenu(openRecentMenu); - const openRecent = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miOpenRecent', comment: ['&& denotes a mnemonic'] }, "Open &&Recent")), submenu: openRecentMenu, enabled: openRecentMenu.items.length > 0 }); + const openRecent = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miOpenRecent', comment: ['&& denotes a mnemonic'] }, "Open &&Recent")), submenu: openRecentMenu, enabled: openRecentMenu.items.length > 0 }); + + const isMultiRootEnabled = (product.quality !== 'stable'); // TODO@Ben multi root + const addFolder = this.createMenuItem(nls.localize({ key: 'miAddFolderToWorkspace', comment: ['&& denotes a mnemonic'] }, "&&Add Folder to Workspace..."), 'workbench.action.addRootFolder', this.windowsService.getWindowCount() > 0); const saveFile = this.createMenuItem(nls.localize({ key: 'miSave', comment: ['&& denotes a mnemonic'] }, "&&Save"), 'workbench.action.files.save', this.windowsService.getWindowCount() > 0); const saveFileAs = this.createMenuItem(nls.localize({ key: 'miSaveAs', comment: ['&& denotes a mnemonic'] }, "Save &&As..."), 'workbench.action.files.saveAs', this.windowsService.getWindowCount() > 0); const saveAllFiles = this.createMenuItem(nls.localize({ key: 'miSaveAll', comment: ['&& denotes a mnemonic'] }, "Save A&&ll"), 'workbench.action.files.saveAll', this.windowsService.getWindowCount() > 0); const autoSaveEnabled = [AutoSaveConfiguration.AFTER_DELAY, AutoSaveConfiguration.ON_FOCUS_CHANGE, AutoSaveConfiguration.ON_WINDOW_CHANGE].some(s => this.currentAutoSaveSetting === s); - const autoSave = new MenuItem(this.likeAction('vscode.toggleAutoSave', { label: mnemonicLabel(nls.localize('miAutoSave', "Auto Save")), type: 'checkbox', checked: autoSaveEnabled, enabled: this.windowsService.getWindowCount() > 0, click: () => this.windowsService.sendToFocused('vscode.toggleAutoSave') }, false)); + const autoSave = new MenuItem(this.likeAction('vscode.toggleAutoSave', { label: this.mnemonicLabel(nls.localize('miAutoSave', "Auto Save")), type: 'checkbox', checked: autoSaveEnabled, enabled: this.windowsService.getWindowCount() > 0, click: () => this.windowsService.sendToFocused('vscode.toggleAutoSave') }, false)); const preferences = this.getPreferencesMenu(); - const newWindow = new MenuItem(this.likeAction('workbench.action.newWindow', { label: mnemonicLabel(nls.localize({ key: 'miNewWindow', comment: ['&& denotes a mnemonic'] }, "New &&Window")), click: () => this.windowsService.openNewWindow(OpenContext.MENU) })); + const newWindow = new MenuItem(this.likeAction('workbench.action.newWindow', { label: this.mnemonicLabel(nls.localize({ key: 'miNewWindow', comment: ['&& denotes a mnemonic'] }, "New &&Window")), click: () => this.windowsService.openNewWindow(OpenContext.MENU) })); const revertFile = this.createMenuItem(nls.localize({ key: 'miRevert', comment: ['&& denotes a mnemonic'] }, "Re&&vert File"), 'workbench.action.files.revert', this.windowsService.getWindowCount() > 0); - const closeWindow = new MenuItem(this.likeAction('workbench.action.closeWindow', { label: mnemonicLabel(nls.localize({ key: 'miCloseWindow', comment: ['&& denotes a mnemonic'] }, "Clos&&e Window")), click: () => this.windowsService.getLastActiveWindow().win.close(), enabled: this.windowsService.getWindowCount() > 0 })); + const closeWindow = new MenuItem(this.likeAction('workbench.action.closeWindow', { label: this.mnemonicLabel(nls.localize({ key: 'miCloseWindow', comment: ['&& denotes a mnemonic'] }, "Clos&&e Window")), click: () => this.windowsService.getLastActiveWindow().win.close(), enabled: this.windowsService.getWindowCount() > 0 })); const closeFolder = this.createMenuItem(nls.localize({ key: 'miCloseFolder', comment: ['&& denotes a mnemonic'] }, "Close &&Folder"), 'workbench.action.closeFolder'); const closeEditor = this.createMenuItem(nls.localize({ key: 'miCloseEditor', comment: ['&& denotes a mnemonic'] }, "&&Close Editor"), 'workbench.action.closeActiveEditor'); - const exit = new MenuItem(this.likeAction('workbench.action.quit', { label: mnemonicLabel(nls.localize({ key: 'miExit', comment: ['&& denotes a mnemonic'] }, "E&&xit")), click: () => this.windowsService.quit() })); + const exit = new MenuItem(this.likeAction('workbench.action.quit', { label: this.mnemonicLabel(nls.localize({ key: 'miExit', comment: ['&& denotes a mnemonic'] }, "E&&xit")), click: () => this.windowsService.quit() })); arrays.coalesce([ newFile, @@ -446,6 +382,8 @@ export class VSCodeMenu { !isMacintosh ? openFile : null, !isMacintosh ? openFolder : null, openRecent, + isMultiRootEnabled ? __separator__() : null, + isMultiRootEnabled ? addFolder : null, __separator__(), saveFile, saveFileAs, @@ -458,7 +396,7 @@ export class VSCodeMenu { revertFile, closeEditor, closeFolder, - !isMacintosh ? closeWindow : null, + closeWindow, !isMacintosh ? __separator__() : null, !isMacintosh ? exit : null ]).forEach(item => fileMenu.append(item)); @@ -483,19 +421,19 @@ export class VSCodeMenu { preferencesMenu.append(colorThemeSelection); preferencesMenu.append(iconThemeSelection); - return new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miPreferences', comment: ['&& denotes a mnemonic'] }, "&&Preferences")), submenu: preferencesMenu }); + return new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miPreferences', comment: ['&& denotes a mnemonic'] }, "&&Preferences")), submenu: preferencesMenu }); } private setOpenRecentMenu(openRecentMenu: Electron.Menu): void { openRecentMenu.append(this.createMenuItem(nls.localize({ key: 'miReopenClosedEditor', comment: ['&& denotes a mnemonic'] }, "&&Reopen Closed Editor"), 'workbench.action.reopenClosedEditor')); - const { folders, files } = this.windowsService.getRecentPathsList(); + const { folders, files } = this.historyService.getRecentPathsList(); // Folders if (folders.length > 0) { openRecentMenu.append(__separator__()); - for (let i = 0; i < VSCodeMenu.MAX_MENU_RECENT_ENTRIES && i < folders.length; i++) { + for (let i = 0; i < CodeMenu.MAX_MENU_RECENT_ENTRIES && i < folders.length; i++) { openRecentMenu.append(this.createOpenRecentMenuItem(folders[i], 'openRecentFolder')); } } @@ -504,29 +442,26 @@ export class VSCodeMenu { if (files.length > 0) { openRecentMenu.append(__separator__()); - for (let i = 0; i < VSCodeMenu.MAX_MENU_RECENT_ENTRIES && i < files.length; i++) { + for (let i = 0; i < CodeMenu.MAX_MENU_RECENT_ENTRIES && i < files.length; i++) { openRecentMenu.append(this.createOpenRecentMenuItem(files[i], 'openRecentFile')); } } if (folders.length || files.length) { + openRecentMenu.append(__separator__()); + openRecentMenu.append(this.createMenuItem(nls.localize({ key: 'miMore', comment: ['&& denotes a mnemonic'] }, "&&More..."), 'workbench.action.openRecent')); openRecentMenu.append(__separator__()); openRecentMenu.append(this.createMenuItem(nls.localize({ key: 'miClearRecentOpen', comment: ['&& denotes a mnemonic'] }, "&&Clear Recent Files"), 'workbench.action.clearRecentFiles')); } } private createOpenRecentMenuItem(path: string, commandId: string): Electron.MenuItem { - let label = path; - if ((isMacintosh || isLinux) && path.indexOf(this.environmentService.userHome) === 0) { - label = `~${path.substr(this.environmentService.userHome.length)}`; - } - return new MenuItem(this.likeAction(commandId, { - label: unMnemonicLabel(label), click: (menuItem, win, event) => { + label: this.unmnemonicLabel(tildify(path, this.environmentService.userHome)), click: (menuItem, win, event) => { const openInNewWindow = this.isOptionClick(event); - const success = !!this.windowsService.open({ context: OpenContext.MENU, cli: this.environmentService.args, pathsToOpen: [path], forceNewWindow: openInNewWindow }); + const success = this.windowsService.open({ context: OpenContext.MENU, cli: this.environmentService.args, pathsToOpen: [path], forceNewWindow: openInNewWindow }).length > 0; if (!success) { - this.windowsService.removeFromRecentPathsList(path); + this.historyService.removeFromRecentPathsList(path); } } }, false)); @@ -538,7 +473,7 @@ export class VSCodeMenu { private createRoleMenuItem(label: string, commandId: string, role: Electron.MenuItemRole): Electron.MenuItem { const options: Electron.MenuItemOptions = { - label: mnemonicLabel(label), + label: this.mnemonicLabel(label), role, enabled: true }; @@ -599,6 +534,19 @@ export class VSCodeMenu { } private setSelectionMenu(winLinuxEditMenu: Electron.Menu): void { + let multiCursorModifierLabel: string; + if (this.currentMultiCursorModifierSetting === 'ctrlCmd') { + // The default has been overwritten + multiCursorModifierLabel = nls.localize('miMultiCursorAlt', "Switch to Alt+Click for Multi-Cursor"); + } else { + multiCursorModifierLabel = ( + isMacintosh + ? nls.localize('miMultiCursorCmd', "Switch to Cmd+Click for Multi-Cursor") + : nls.localize('miMultiCursorCtrl', "Switch to Ctrl+Click for Multi-Cursor") + ); + } + + const multicursorModifier = this.createMenuItem(multiCursorModifierLabel, 'workbench.action.toggleMultiCursorModifier'); const insertCursorAbove = this.createMenuItem(nls.localize({ key: 'miInsertCursorAbove', comment: ['&& denotes a mnemonic'] }, "&&Add Cursor Above"), 'editor.action.insertCursorAbove'); const insertCursorBelow = this.createMenuItem(nls.localize({ key: 'miInsertCursorBelow', comment: ['&& denotes a mnemonic'] }, "A&&dd Cursor Below"), 'editor.action.insertCursorBelow'); const insertCursorAtEndOfEachLineSelected = this.createMenuItem(nls.localize({ key: 'miInsertCursorAtEndOfEachLineSelected', comment: ['&& denotes a mnemonic'] }, "Add C&&ursors to Line Ends"), 'editor.action.insertCursorAtEndOfEachLineSelected'); @@ -630,6 +578,7 @@ export class VSCodeMenu { moveLinesUp, moveLinesDown, __separator__(), + multicursorModifier, insertCursorAbove, insertCursorBelow, insertCursorAtEndOfEachLineSelected, @@ -642,8 +591,7 @@ export class VSCodeMenu { private setViewMenu(viewMenu: Electron.Menu): void { const explorer = this.createMenuItem(nls.localize({ key: 'miViewExplorer', comment: ['&& denotes a mnemonic'] }, "&&Explorer"), 'workbench.view.explorer'); const search = this.createMenuItem(nls.localize({ key: 'miViewSearch', comment: ['&& denotes a mnemonic'] }, "&&Search"), 'workbench.view.search'); - const git = this.createMenuItem(nls.localize({ key: 'miViewGit', comment: ['&& denotes a mnemonic'] }, "&&Git"), 'workbench.view.git'); - // const scm = this.createMenuItem(nls.localize({ key: 'miViewSCM', comment: ['&& denotes a mnemonic'] }, "S&&CM"), 'workbench.view.scm'); + const scm = this.createMenuItem(nls.localize({ key: 'miViewSCM', comment: ['&& denotes a mnemonic'] }, "S&&CM"), 'workbench.view.scm'); const debug = this.createMenuItem(nls.localize({ key: 'miViewDebug', comment: ['&& denotes a mnemonic'] }, "&&Debug"), 'workbench.view.debug'); const extensions = this.createMenuItem(nls.localize({ key: 'miViewExtensions', comment: ['&& denotes a mnemonic'] }, "E&&xtensions"), 'workbench.view.extensions'); const output = this.createMenuItem(nls.localize({ key: 'miToggleOutput', comment: ['&& denotes a mnemonic'] }, "&&Output"), 'workbench.action.output.toggleOutput'); @@ -659,12 +607,12 @@ export class VSCodeMenu { additionalViewletsMenu.append(this.createMenuItem(viewlet.label, viewlet.id)); }); - additionalViewlets = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miAdditionalViews', comment: ['&& denotes a mnemonic'] }, "Additional &&Views")), submenu: additionalViewletsMenu, enabled: true }); + additionalViewlets = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miAdditionalViews', comment: ['&& denotes a mnemonic'] }, "Additional &&Views")), submenu: additionalViewletsMenu, enabled: true }); } const commands = this.createMenuItem(nls.localize({ key: 'miCommandPalette', comment: ['&& denotes a mnemonic'] }, "&&Command Palette..."), 'workbench.action.showCommands'); - const fullscreen = new MenuItem(this.withKeybinding('workbench.action.toggleFullScreen', { label: mnemonicLabel(nls.localize({ key: 'miToggleFullScreen', comment: ['&& denotes a mnemonic'] }, "Toggle &&Full Screen")), click: () => this.windowsService.getLastActiveWindow().toggleFullScreen(), enabled: this.windowsService.getWindowCount() > 0 })); + const fullscreen = new MenuItem(this.withKeybinding('workbench.action.toggleFullScreen', { label: this.mnemonicLabel(nls.localize({ key: 'miToggleFullScreen', comment: ['&& denotes a mnemonic'] }, "Toggle &&Full Screen")), click: () => this.windowsService.getLastActiveWindow().toggleFullScreen(), enabled: this.windowsService.getWindowCount() > 0 })); const toggleZenMode = this.createMenuItem(nls.localize('miToggleZenMode', "Toggle Zen Mode"), 'workbench.action.toggleZenMode', this.windowsService.getWindowCount() > 0); const toggleMenuBar = this.createMenuItem(nls.localize({ key: 'miToggleMenuBar', comment: ['&& denotes a mnemonic'] }, "Toggle Menu &&Bar"), 'workbench.action.toggleMenuBar'); const splitEditor = this.createMenuItem(nls.localize({ key: 'miSplitEditor', comment: ['&& denotes a mnemonic'] }, "Split &&Editor"), 'workbench.action.splitEditor'); @@ -711,8 +659,7 @@ export class VSCodeMenu { __separator__(), explorer, search, - git, - // scm, + scm, debug, extensions, additionalViewlets, @@ -763,7 +710,7 @@ export class VSCodeMenu { previousEditorInGroup ].forEach(item => switchEditorMenu.append(item)); - const switchEditor = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miSwitchEditor', comment: ['&& denotes a mnemonic'] }, "Switch &&Editor")), submenu: switchEditorMenu, enabled: true }); + const switchEditor = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miSwitchEditor', comment: ['&& denotes a mnemonic'] }, "Switch &&Editor")), submenu: switchEditorMenu, enabled: true }); const switchGroupMenu = new Menu(); @@ -782,12 +729,14 @@ export class VSCodeMenu { previousGroup ].forEach(item => switchGroupMenu.append(item)); - const switchGroup = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miSwitchGroup', comment: ['&& denotes a mnemonic'] }, "Switch &&Group")), submenu: switchGroupMenu, enabled: true }); + const switchGroup = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miSwitchGroup', comment: ['&& denotes a mnemonic'] }, "Switch &&Group")), submenu: switchGroupMenu, enabled: true }); const gotoFile = this.createMenuItem(nls.localize({ key: 'miGotoFile', comment: ['&& denotes a mnemonic'] }, "Go to &&File..."), 'workbench.action.quickOpen'); const gotoSymbolInFile = this.createMenuItem(nls.localize({ key: 'miGotoSymbolInFile', comment: ['&& denotes a mnemonic'] }, "Go to &&Symbol in File..."), 'workbench.action.gotoSymbol'); const gotoSymbolInWorkspace = this.createMenuItem(nls.localize({ key: 'miGotoSymbolInWorkspace', comment: ['&& denotes a mnemonic'] }, "Go to Symbol in &&Workspace..."), 'workbench.action.showAllSymbols'); const gotoDefinition = this.createMenuItem(nls.localize({ key: 'miGotoDefinition', comment: ['&& denotes a mnemonic'] }, "Go to &&Definition"), 'editor.action.goToDeclaration'); + const gotoTypeDefinition = this.createMenuItem(nls.localize({ key: 'miGotoTypeDefinition', comment: ['&& denotes a mnemonic'] }, "Go to &&Type Definition"), 'editor.action.goToTypeDefinition'); + const goToImplementation = this.createMenuItem(nls.localize({ key: 'miGotoImplementation', comment: ['&& denotes a mnemonic'] }, "Go to &&Implementation"), 'editor.action.goToImplementation'); const gotoLine = this.createMenuItem(nls.localize({ key: 'miGotoLine', comment: ['&& denotes a mnemonic'] }, "Go to &&Line..."), 'workbench.action.gotoLine'); [ @@ -801,6 +750,8 @@ export class VSCodeMenu { gotoSymbolInFile, gotoSymbolInWorkspace, gotoDefinition, + gotoTypeDefinition, + goToImplementation, gotoLine ].forEach(item => gotoMenu.append(item)); } @@ -824,7 +775,8 @@ export class VSCodeMenu { breakpointsMenu.append(this.createMenuItem(nls.localize({ key: 'miConditionalBreakpoint', comment: ['&& denotes a mnemonic'] }, "&&Conditional Breakpoint..."), 'editor.debug.action.conditionalBreakpoint')); breakpointsMenu.append(this.createMenuItem(nls.localize({ key: 'miColumnBreakpoint', comment: ['&& denotes a mnemonic'] }, "C&&olumn Breakpoint"), 'editor.debug.action.toggleColumnBreakpoint')); breakpointsMenu.append(this.createMenuItem(nls.localize({ key: 'miFunctionBreakpoint', comment: ['&& denotes a mnemonic'] }, "&&Function Breakpoint..."), 'workbench.debug.viewlet.action.addFunctionBreakpointAction')); - const newBreakpoints = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miNewBreakpoint', comment: ['&& denotes a mnemonic'] }, "&&New Breakpoint")), submenu: breakpointsMenu }); + const newBreakpoints = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miNewBreakpoint', comment: ['&& denotes a mnemonic'] }, "&&New Breakpoint")), submenu: breakpointsMenu }); + const enableAllBreakpoints = this.createMenuItem(nls.localize({ key: 'miEnableAllBreakpoints', comment: ['&& denotes a mnemonic'] }, "Enable All Breakpoints"), 'workbench.debug.viewlet.action.enableAllBreakpoints'); const disableAllBreakpoints = this.createMenuItem(nls.localize({ key: 'miDisableAllBreakpoints', comment: ['&& denotes a mnemonic'] }, "Disable A&&ll Breakpoints"), 'workbench.debug.viewlet.action.disableAllBreakpoints'); const removeAllBreakpoints = this.createMenuItem(nls.localize({ key: 'miRemoveAllBreakpoints', comment: ['&& denotes a mnemonic'] }, "Remove &&All Breakpoints"), 'workbench.debug.viewlet.action.removeAllBreakpoints'); @@ -845,6 +797,7 @@ export class VSCodeMenu { __separator__(), toggleBreakpoint, newBreakpoints, + enableAllBreakpoints, disableAllBreakpoints, removeAllBreakpoints, __separator__(), @@ -855,12 +808,14 @@ export class VSCodeMenu { private setMacWindowMenu(macWindowMenu: Electron.Menu): void { const minimize = new MenuItem({ label: nls.localize('mMinimize', "Minimize"), role: 'minimize', accelerator: 'Command+M', enabled: this.windowsService.getWindowCount() > 0 }); - const close = new MenuItem({ label: nls.localize('mClose', "Close"), role: 'close', accelerator: 'Command+W', enabled: this.windowsService.getWindowCount() > 0 }); + const zoom = new MenuItem({ label: nls.localize('mZoom', "Zoom"), role: 'zoom', enabled: this.windowsService.getWindowCount() > 0 }); const bringAllToFront = new MenuItem({ label: nls.localize('mBringToFront', "Bring All to Front"), role: 'front', enabled: this.windowsService.getWindowCount() > 0 }); + const switchWindow = this.createMenuItem(nls.localize({ key: 'miSwitchWindow', comment: ['&& denotes a mnemonic'] }, "Switch &&Window..."), 'workbench.action.switchWindow', this.windowsService.getWindowCount() > 0); [ minimize, - close, + zoom, + switchWindow, __separator__(), bringAllToFront ].forEach(item => macWindowMenu.append(item)); @@ -880,16 +835,16 @@ export class VSCodeMenu { private setHelpMenu(helpMenu: Electron.Menu): void { const toggleDevToolsItem = new MenuItem(this.likeAction('workbench.action.toggleDevTools', { - label: mnemonicLabel(nls.localize({ key: 'miToggleDevTools', comment: ['&& denotes a mnemonic'] }, "&&Toggle Developer Tools")), + label: this.mnemonicLabel(nls.localize({ key: 'miToggleDevTools', comment: ['&& denotes a mnemonic'] }, "&&Toggle Developer Tools")), click: () => this.toggleDevTools(), enabled: (this.windowsService.getWindowCount() > 0) })); const showAccessibilityOptions = new MenuItem(this.likeAction('accessibilityOptions', { - label: mnemonicLabel(nls.localize({ key: 'miAccessibilityOptions', comment: ['&& denotes a mnemonic'] }, "Accessibility &&Options")), + label: this.mnemonicLabel(nls.localize({ key: 'miAccessibilityOptions', comment: ['&& denotes a mnemonic'] }, "Accessibility &&Options")), accelerator: null, click: () => { - this.windowsService.openAccessibilityOptions(); + this.openAccessibilityOptions(); } }, false)); @@ -900,25 +855,27 @@ export class VSCodeMenu { if (this.windowsService.getWindowCount() > 0) { reportIssuesItem = this.createMenuItem(label, 'workbench.action.reportIssues'); } else { - reportIssuesItem = new MenuItem({ label: mnemonicLabel(label), click: () => this.openUrl(product.reportIssueUrl, 'openReportIssues') }); + reportIssuesItem = new MenuItem({ label: this.mnemonicLabel(label), click: () => this.openUrl(product.reportIssueUrl, 'openReportIssues') }); } } const keyboardShortcutsUrl = isLinux ? product.keyboardShortcutsUrlLinux : isMacintosh ? product.keyboardShortcutsUrlMac : product.keyboardShortcutsUrlWin; arrays.coalesce([ - new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miWelcome', comment: ['&& denotes a mnemonic'] }, "&&Welcome")), click: () => this.windowsService.sendToFocused('vscode:runAction', 'workbench.action.showWelcomePage') }), - product.documentationUrl ? new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miDocumentation', comment: ['&& denotes a mnemonic'] }, "&&Documentation")), click: () => this.windowsService.sendToFocused('vscode:runAction', 'workbench.action.openDocumentationUrl') }) : null, - product.releaseNotesUrl ? new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miReleaseNotes', comment: ['&& denotes a mnemonic'] }, "&&Release Notes")), click: () => this.windowsService.sendToFocused('vscode:runAction', 'update.showCurrentReleaseNotes') }) : null, + new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miWelcome', comment: ['&& denotes a mnemonic'] }, "&&Welcome")), click: () => this.windowsService.sendToFocused('vscode:runAction', 'workbench.action.showWelcomePage') }), + new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miInteractivePlayground', comment: ['&& denotes a mnemonic'] }, "&&Interactive Playground")), click: () => this.windowsService.sendToFocused('vscode:runAction', 'workbench.action.showInteractivePlayground') }), + product.documentationUrl ? new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miDocumentation', comment: ['&& denotes a mnemonic'] }, "&&Documentation")), click: () => this.windowsService.sendToFocused('vscode:runAction', 'workbench.action.openDocumentationUrl') }) : null, + product.releaseNotesUrl ? new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miReleaseNotes', comment: ['&& denotes a mnemonic'] }, "&&Release Notes")), click: () => this.windowsService.sendToFocused('vscode:runAction', 'update.showCurrentReleaseNotes') }) : null, __separator__(), - keyboardShortcutsUrl ? new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miKeyboardShortcuts', comment: ['&& denotes a mnemonic'] }, "&&Keyboard Shortcuts Reference")), click: () => this.windowsService.sendToFocused('vscode:runAction', 'workbench.action.keybindingsReference') }) : null, - product.introductoryVideosUrl ? new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miIntroductoryVideos', comment: ['&& denotes a mnemonic'] }, "Introductory &&Videos")), click: () => this.windowsService.sendToFocused('vscode:runAction', 'workbench.action.openIntroductoryVideosUrl') }) : null, + keyboardShortcutsUrl ? new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miKeyboardShortcuts', comment: ['&& denotes a mnemonic'] }, "&&Keyboard Shortcuts Reference")), click: () => this.windowsService.sendToFocused('vscode:runAction', 'workbench.action.keybindingsReference') }) : null, + product.introductoryVideosUrl ? new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miIntroductoryVideos', comment: ['&& denotes a mnemonic'] }, "Introductory &&Videos")), click: () => this.windowsService.sendToFocused('vscode:runAction', 'workbench.action.openIntroductoryVideosUrl') }) : null, + product.tipsAndTricksUrl ? new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miTipsAndTricks', comment: ['&& denotes a mnemonic'] }, "&&Tips and Tricks")), click: () => this.windowsService.sendToFocused('vscode:runAction', 'workbench.action.openTipsAndTricksUrl') }) : null, (product.introductoryVideosUrl || keyboardShortcutsUrl) ? __separator__() : null, - product.twitterUrl ? new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miTwitter', comment: ['&& denotes a mnemonic'] }, "&&Join us on Twitter")), click: () => this.openUrl(product.twitterUrl, 'openTwitterUrl') }) : null, - product.requestFeatureUrl ? new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miUserVoice', comment: ['&& denotes a mnemonic'] }, "&&Search Feature Requests")), click: () => this.openUrl(product.requestFeatureUrl, 'openUserVoiceUrl') }) : null, + product.twitterUrl ? new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miTwitter', comment: ['&& denotes a mnemonic'] }, "&&Join us on Twitter")), click: () => this.openUrl(product.twitterUrl, 'openTwitterUrl') }) : null, + product.requestFeatureUrl ? new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miUserVoice', comment: ['&& denotes a mnemonic'] }, "&&Search Feature Requests")), click: () => this.openUrl(product.requestFeatureUrl, 'openUserVoiceUrl') }) : null, reportIssuesItem, (product.twitterUrl || product.requestFeatureUrl || product.reportIssueUrl) ? __separator__() : null, product.licenseUrl ? new MenuItem({ - label: mnemonicLabel(nls.localize({ key: 'miLicense', comment: ['&& denotes a mnemonic'] }, "View &&License")), click: () => { + label: this.mnemonicLabel(nls.localize({ key: 'miLicense', comment: ['&& denotes a mnemonic'] }, "View &&License")), click: () => { if (language) { const queryArgChar = product.licenseUrl.indexOf('?') > 0 ? '&' : '?'; this.openUrl(`${product.licenseUrl}${queryArgChar}lang=${language}`, 'openLicenseUrl'); @@ -928,7 +885,7 @@ export class VSCodeMenu { } }) : null, product.privacyStatementUrl ? new MenuItem({ - label: mnemonicLabel(nls.localize({ key: 'miPrivacyStatement', comment: ['&& denotes a mnemonic'] }, "&&Privacy Statement")), click: () => { + label: this.mnemonicLabel(nls.localize({ key: 'miPrivacyStatement', comment: ['&& denotes a mnemonic'] }, "&&Privacy Statement")), click: () => { if (language) { const queryArgChar = product.licenseUrl.indexOf('?') > 0 ? '&' : '?'; this.openUrl(`${product.privacyStatementUrl}${queryArgChar}lang=${language}`, 'openPrivacyStatement'); @@ -950,10 +907,53 @@ export class VSCodeMenu { } helpMenu.append(__separator__()); - helpMenu.append(new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miAbout', comment: ['&& denotes a mnemonic'] }, "&&About")), click: () => this.openAboutDialog() })); + helpMenu.append(new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miAbout', comment: ['&& denotes a mnemonic'] }, "&&About")), click: () => this.openAboutDialog() })); } } + private setTaskMenu(taskMenu: Electron.Menu): void { + const runTask = this.createMenuItem(nls.localize({ key: 'miRunTask', comment: ['&& denotes a mnemonic'] }, "&&Run Task..."), 'workbench.action.tasks.runTask'); + const restartTask = this.createMenuItem(nls.localize({ key: 'miRestartTask', comment: ['&& denotes a mnemonic'] }, "R&&estart Running Task..."), 'workbench.action.tasks.restartTask'); + const terminateTask = this.createMenuItem(nls.localize({ key: 'miTerminateTask', comment: ['&& denotes a mnemonic'] }, "&&Terminate Task..."), 'workbench.action.tasks.terminate'); + const buildTask = this.createMenuItem(nls.localize({ key: 'miBuildTask', comment: ['&& denotes a mnemonic'] }, "Run &&Build Task..."), 'workbench.action.tasks.build'); + // const testTask = this.createMenuItem(nls.localize({ key: 'miTestTask', comment: ['&& denotes a mnemonic'] }, "Run Test T&&ask..."), 'workbench.action.tasks.test'); + // const showTaskLog = this.createMenuItem(nls.localize({ key: 'miShowTaskLog', comment: ['&& denotes a mnemonic'] }, "&&Show Task Log"), 'workbench.action.tasks.showLog'); + const configureTask = this.createMenuItem(nls.localize({ key: 'miConfigureTask', comment: ['&& denotes a mnemonic'] }, "&&Configure Tasks"), 'workbench.action.tasks.configureTaskRunner'); + const configureBuildTask = this.createMenuItem(nls.localize({ key: 'miConfigureBuildTask', comment: ['&& denotes a mnemonic'] }, "Configure De&&fault Build Task"), 'workbench.action.tasks.configureDefaultBuildTask'); + // const configureTestTask = this.createMenuItem(nls.localize({ key: 'miConfigureTestTask', comment: ['&& denotes a mnemonic'] }, "Configure Defau&< Test Task"), 'workbench.action.tasks.configureDefaultTestTask'); + + [ + //__separator__(), + runTask, + buildTask, + // testTask, + __separator__(), + terminateTask, + restartTask, + __separator__(), + //showTaskLog, + configureTask, + configureBuildTask + // configureTestTask + ].forEach(item => taskMenu.append(item)); + } + + private openAccessibilityOptions(): void { + let win = new BrowserWindow({ + alwaysOnTop: true, + skipTaskbar: true, + resizable: false, + width: 450, + height: 300, + show: true, + title: nls.localize('accessibilityOptionsWindowTitle', "Accessibility Options") + }); + + win.setMenuBarVisibility(false); + + win.loadURL('chrome://accessibility'); + } + private getUpdateMenuItems(): Electron.MenuItem[] { switch (this.updateService.state) { case UpdateState.Uninitialized: @@ -961,7 +961,7 @@ export class VSCodeMenu { case UpdateState.UpdateDownloaded: return [new MenuItem({ - label: nls.localize('miRestartToUpdate', "Restart To Update..."), click: () => { + label: nls.localize('miRestartToUpdate', "Restart to Update..."), click: () => { this.reportMenuActionTelemetry('RestartToUpdate'); this.updateService.quitAndInstall(); } @@ -987,7 +987,7 @@ export class VSCodeMenu { default: const result = [new MenuItem({ - label: nls.localize('miCheckForUpdates', "Check For Updates..."), click: () => setTimeout(() => { + label: nls.localize('miCheckForUpdates', "Check for Updates..."), click: () => setTimeout(() => { this.reportMenuActionTelemetry('CheckForUpdate'); this.updateService.checkForUpdates(true); }, 0) @@ -1000,7 +1000,7 @@ export class VSCodeMenu { private createMenuItem(label: string, commandId: string | string[], enabled?: boolean, checked?: boolean): Electron.MenuItem; private createMenuItem(label: string, click: () => void, enabled?: boolean, checked?: boolean): Electron.MenuItem; private createMenuItem(arg1: string, arg2: any, arg3?: boolean, arg4?: boolean): Electron.MenuItem { - const label = mnemonicLabel(arg1); + const label = this.mnemonicLabel(arg1); const click: () => void = (typeof arg2 === 'function') ? arg2 : (menuItem, win, event) => { let commandId = arg2; if (Array.isArray(arg2)) { @@ -1033,7 +1033,7 @@ export class VSCodeMenu { private createDevToolsAwareMenuItem(label: string, commandId: string, devToolsFocusedFn: (contents: Electron.WebContents) => void): Electron.MenuItem { return new MenuItem(this.withKeybinding(commandId, { - label: mnemonicLabel(label), + label: this.mnemonicLabel(label), enabled: this.windowsService.getWindowCount() > 0, click: () => { const windowInFocus = this.windowsService.getFocusedWindow(); @@ -1128,24 +1128,24 @@ export class VSCodeMenu { private reportMenuActionTelemetry(id: string): void { this.telemetryService.publicLog('workbenchActionExecuted', { id, from: telemetryFrom }); } -} -function __separator__(): Electron.MenuItem { - return new MenuItem({ type: 'separator' }); -} + private mnemonicLabel(label: string): string { + if (isMacintosh || !this.currentEnableMenuBarMnemonics) { + return label.replace(/\(&&\w\)|&&/g, ''); // no mnemonic support on mac + } -function mnemonicLabel(label: string): string { - if (isMacintosh) { - return label.replace(/\(&&\w\)|&&/g, ''); // no mnemonic support on mac + return label.replace(/&&/g, '&'); } - return label.replace(/&&/g, '&'); -} + private unmnemonicLabel(label: string): string { + if (isMacintosh || !this.currentEnableMenuBarMnemonics) { + return label; // no mnemonic support on mac + } -function unMnemonicLabel(label: string): string { - if (isMacintosh) { - return label; // no mnemonic support on mac + return label.replace(/&/g, '&&'); } +} - return label.replace(/&/g, '&&'); +function __separator__(): Electron.MenuItem { + return new MenuItem({ type: 'separator' }); } diff --git a/src/vs/code/electron-main/sharedProcess.ts b/src/vs/code/electron-main/sharedProcess.ts index c70ce1239f688..2422ab62c9a4e 100644 --- a/src/vs/code/electron-main/sharedProcess.ts +++ b/src/vs/code/electron-main/sharedProcess.ts @@ -11,15 +11,25 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { IProcessEnvironment } from 'vs/base/common/platform'; import { BrowserWindow, ipcMain } from 'electron'; import { PromiseSource } from 'vs/base/common/async'; +import { ISharedProcess } from "vs/platform/windows/electron-main/windows"; -export class SharedProcess { +export class SharedProcess implements ISharedProcess { + + private spawnPromiseSource: PromiseSource; private window: Electron.BrowserWindow; private disposables: IDisposable[] = []; @memoize private get _whenReady(): TPromise { - this.window = new BrowserWindow({ show: false }); + this.window = new BrowserWindow({ + show: false, + webPreferences: { + images: false, + webaudio: false, + webgl: false + } + }); const config = assign({ appRoot: this.environmentService.appRoot, nodeCachedDataDir: this.environmentService.nodeCachedDataDir, @@ -41,6 +51,7 @@ export class SharedProcess { this.disposables.push(toDisposable(() => this.window.removeListener('close', onClose))); this.disposables.push(toDisposable(() => { + // Electron seems to crash on Windows without this setTimeout :| setTimeout(() => { try { @@ -65,8 +76,6 @@ export class SharedProcess { }); } - private spawnPromiseSource: PromiseSource; - constructor( private environmentService: IEnvironmentService, private userEnv: IProcessEnvironment @@ -74,15 +83,15 @@ export class SharedProcess { this.spawnPromiseSource = new PromiseSource(); } - spawn(): void { + public spawn(): void { this.spawnPromiseSource.complete(); } - whenReady(): TPromise { + public whenReady(): TPromise { return this.spawnPromiseSource.value.then(() => this._whenReady); } - toggle(): void { + public toggle(): void { if (this.window.isVisible()) { this.hide(); } else { @@ -90,17 +99,17 @@ export class SharedProcess { } } - show(): void { + public show(): void { this.window.show(); this.window.webContents.openDevTools(); } - hide(): void { + public hide(): void { this.window.webContents.closeDevTools(); this.window.hide(); } - dispose(): void { + public dispose(): void { this.disposables = dispose(this.disposables); } } diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index a2cdf2f52a193..7b2796150c059 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -6,23 +6,23 @@ 'use strict'; import * as path from 'path'; -import * as platform from 'vs/base/common/platform'; import * as objects from 'vs/base/common/objects'; import { stopProfiling } from 'vs/base/node/profiler'; import nls = require('vs/nls'); -import { IStorageService } from 'vs/code/electron-main/storage'; +import { IStorageService } from 'vs/platform/storage/node/storage'; import { shell, screen, BrowserWindow, systemPreferences, app } from 'electron'; import { TPromise, TValueCallback } from 'vs/base/common/winjs.base'; import { IEnvironmentService, ParsedArgs } from 'vs/platform/environment/common/environment'; -import { ILogService } from 'vs/code/electron-main/log'; +import { ILogService } from 'vs/platform/log/common/log'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { IWorkbenchEditorConfiguration } from 'vs/workbench/common/editor'; import { parseArgs } from 'vs/platform/environment/node/argv'; import product from 'vs/platform/node/product'; import { getCommonHTTPHeaders } from 'vs/platform/environment/node/http'; -import { IWindowSettings, MenuBarVisibility } from 'vs/platform/windows/common/windows'; +import { IWindowSettings, MenuBarVisibility, IWindowConfiguration, ReadyState } from 'vs/platform/windows/common/windows'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; - +import { KeyboardLayoutMonitor } from 'vs/code/electron-main/keyboard'; +import { isLinux, isMacintosh, isWindows } from 'vs/base/common/platform'; +import { ICodeWindow } from "vs/platform/windows/electron-main/windows"; export interface IWindowState { width?: number; @@ -30,6 +30,7 @@ export interface IWindowState { x?: number; y?: number; mode?: WindowMode; + display?: number; } export interface IWindowCreationOptions { @@ -41,7 +42,7 @@ export interface IWindowCreationOptions { export enum WindowMode { Maximized, Normal, - Minimized, + Minimized, // not used anymore, but also cannot remove due to existing stored UI state (needs migration) Fullscreen } @@ -53,82 +54,15 @@ export const defaultWindowState = function (mode = WindowMode.Normal): IWindowSt }; }; -export interface IPath { - - // the workspace spath for a VSCode instance which can be null - workspacePath?: string; - - // the file path to open within a VSCode instance - filePath?: string; - - // the line number in the file path to open - lineNumber?: number; - - // the column number in the file path to open - columnNumber?: number; - - // indicator to create the file path in the VSCode instance - createFilePath?: boolean; -} - -export interface IWindowConfiguration extends ParsedArgs { - appRoot: string; - execPath: string; - - userEnv: platform.IProcessEnvironment; - - zoomLevel?: number; - fullscreen?: boolean; - highContrast?: boolean; - baseTheme?: string; - backgroundColor?: string; - accessibilitySupport?: boolean; - - isInitialStartup?: boolean; - - perfStartTime?: number; - perfAppReady?: number; - perfWindowLoadTime?: number; - - workspacePath?: string; - - filesToOpen?: IPath[]; - filesToCreate?: IPath[]; - filesToDiff?: IPath[]; - - nodeCachedDataDir: string; -} - -export enum ReadyState { - - /** - * This window has not loaded any HTML yet - */ - NONE, - - /** - * This window is loading HTML - */ - LOADING, - - /** - * This window is navigating to another HTML - */ - NAVIGATING, - - /** - * This window is done loading HTML - */ - READY -} - -interface IConfiguration { - window: { - menuBarVisibility: MenuBarVisibility; +interface IWorkbenchEditorConfiguration { + workbench: { + editor: { + swipeToNavigate: boolean + } }; } -export class VSCodeWindow { +export class CodeWindow implements ICodeWindow { public static themeStorageKey = 'theme'; public static themeBackgroundStorageKey = 'themeBackground'; @@ -147,10 +81,10 @@ export class VSCodeWindow { private _isExtensionTestHost: boolean; private windowState: IWindowState; private currentMenuBarVisibility: MenuBarVisibility; - private currentWindowMode: WindowMode; private toDispose: IDisposable[]; + private representedFilename: string; - private whenReadyCallbacks: TValueCallback[]; + private whenReadyCallbacks: TValueCallback[]; private currentConfig: IWindowConfiguration; private pendingLoadConfig: IWindowConfiguration; @@ -170,11 +104,27 @@ export class VSCodeWindow { this.whenReadyCallbacks = []; this.toDispose = []; + // create browser window + this.createBrowserWindow(config); + + // respect configured menu bar visibility + this.onConfigurationUpdated(); + + // TODO@joao: hook this up to some initialization routine this causes a race between setting the headers and doing + // a request that needs them. chances are low + this.setCommonHTTPHeaders(); + + // Eventing + this.registerListeners(); + } + + private createBrowserWindow(config: IWindowCreationOptions): void { + // Load window state - this.restoreWindowState(config.state); + this.windowState = this.restoreWindowState(config.state); // in case we are maximized or fullscreen, only show later after the call to maximize/fullscreen (see below) - const isFullscreenOrMaximized = (this.currentWindowMode === WindowMode.Maximized || this.currentWindowMode === WindowMode.Fullscreen); + const isFullscreenOrMaximized = (this.windowState.mode === WindowMode.Maximized || this.windowState.mode === WindowMode.Fullscreen); const options: Electron.BrowserWindowOptions = { width: this.windowState.width, @@ -182,8 +132,8 @@ export class VSCodeWindow { x: this.windowState.x, y: this.windowState.y, backgroundColor: this.getBackgroundColor(), - minWidth: VSCodeWindow.MIN_WIDTH, - minHeight: VSCodeWindow.MIN_HEIGHT, + minWidth: CodeWindow.MIN_WIDTH, + minHeight: CodeWindow.MIN_HEIGHT, show: !isFullscreenOrMaximized, title: product.nameLong, webPreferences: { @@ -192,7 +142,7 @@ export class VSCodeWindow { } }; - if (platform.isLinux) { + if (isLinux) { options.icon = path.join(this.environmentService.appRoot, 'resources/linux/code.png'); // Windows and Mac are better off using the embedded icon(s) } @@ -205,7 +155,7 @@ export class VSCodeWindow { } let useCustomTitleStyle = false; - if (platform.isMacintosh && (!windowConfig || !windowConfig.titleBarStyle || windowConfig.titleBarStyle === 'custom')) { + if (isMacintosh && (!windowConfig || !windowConfig.titleBarStyle || windowConfig.titleBarStyle === 'custom')) { const isDev = !this.environmentService.isBuilt || !!config.extensionDevelopmentPath; if (!isDev) { useCustomTitleStyle = true; // not enabled when developing due to https://github.com/electron/electron/issues/3647 @@ -230,7 +180,7 @@ export class VSCodeWindow { } // Set relaunch command - if (platform.isWindows && product.win32AppUserModelId && typeof this._win.setAppDetails === 'function') { + if (isWindows && product.win32AppUserModelId && typeof this._win.setAppDetails === 'function') { this._win.setAppDetails({ appId: product.win32AppUserModelId, relaunchCommand: `"${process.execPath}" -n`, @@ -239,28 +189,18 @@ export class VSCodeWindow { } if (isFullscreenOrMaximized) { - this.win.maximize(); + this._win.maximize(); - if (this.currentWindowMode === WindowMode.Fullscreen) { - this.win.setFullScreen(true); + if (this.windowState.mode === WindowMode.Fullscreen) { + this._win.setFullScreen(true); } - if (!this.win.isVisible()) { - this.win.show(); // to reduce flicker from the default window size to maximize, we only show after maximize + if (!this._win.isVisible()) { + this._win.show(); // to reduce flicker from the default window size to maximize, we only show after maximize } } this._lastFocusTime = Date.now(); // since we show directly, we need to set the last focus time too - - // respect configured menu bar visibility - this.onConfigurationUpdated(); - - // TODO@joao: hook this up to some initialization routine this causes a race between setting the headers and doing - // a request that needs them. chances are low - this.setCommonHTTPHeaders(); - - // Eventing - this.registerListeners(); } private setCommonHTTPHeaders(): void { @@ -305,6 +245,22 @@ export class VSCodeWindow { return this._win; } + public setRepresentedFilename(filename: string): void { + if (isMacintosh) { + this.win.setRepresentedFilename(filename); + } else { + this.representedFilename = filename; + } + } + + public getRepresentedFilename(): string { + if (isMacintosh) { + return this.win.getRepresentedFilename(); + } + + return this.representedFilename; + } + public focus(): void { if (!this._win) { return; @@ -322,11 +278,15 @@ export class VSCodeWindow { } public get openedWorkspacePath(): string { - return this.currentConfig.workspacePath; + return this.currentConfig ? this.currentConfig.workspacePath : void 0; + } + + public get backupPath(): string { + return this.currentConfig ? this.currentConfig.backupPath : void 0; } public get openedFilePath(): string { - return this.currentConfig.filesToOpen && this.currentConfig.filesToOpen[0] && this.currentConfig.filesToOpen[0].filePath; + return this.currentConfig && this.currentConfig.filesToOpen && this.currentConfig.filesToOpen[0] && this.currentConfig.filesToOpen[0].filePath; } public setReady(): void { @@ -338,8 +298,8 @@ export class VSCodeWindow { } } - public ready(): TPromise { - return new TPromise((c) => { + public ready(): TPromise { + return new TPromise((c) => { if (this._readyState === ReadyState.READY) { return c(this); } @@ -353,20 +313,6 @@ export class VSCodeWindow { return this._readyState; } - private registerNavigationListenerOn(command: 'swipe' | 'app-command', back: 'left' | 'browser-backward', forward: 'right' | 'browser-forward', acrossEditors: boolean) { - this._win.on(command, (e, cmd) => { - if (this.readyState !== ReadyState.READY) { - return; // window must be ready - } - - if (cmd === back) { - this.send('vscode:runAction', acrossEditors ? 'workbench.action.openPreviousRecentlyUsedEditor' : 'workbench.action.navigateBack'); - } else if (cmd === forward) { - this.send('vscode:runAction', acrossEditors ? 'workbench.action.openNextRecentlyUsedEditor' : 'workbench.action.navigateForward'); - } - }); - } - private registerListeners(): void { // Remember that we loaded @@ -380,14 +326,14 @@ export class VSCodeWindow { this.pendingLoadConfig = null; } - // To prevent flashing, we set the window visible after the page has finished to load but before VSCode is loaded - if (!this.win.isVisible()) { - if (this.currentWindowMode === WindowMode.Maximized) { - this.win.maximize(); + // To prevent flashing, we set the window visible after the page has finished to load but before Code is loaded + if (!this._win.isVisible()) { + if (this.windowState.mode === WindowMode.Maximized) { + this._win.maximize(); } - if (!this.win.isVisible()) { // maximize also makes visible - this.win.show(); + if (!this._win.isVisible()) { // maximize also makes visible + this._win.show(); } } }); @@ -416,17 +362,6 @@ export class VSCodeWindow { this.sendWhenReady('vscode:leaveFullScreen'); }); - // React to HC color scheme changes (Windows) - if (platform.isWindows) { - systemPreferences.on('inverted-color-scheme-changed', () => { - if (systemPreferences.isInvertedColorScheme()) { - this.sendWhenReady('vscode:enterHighContrast'); - } else { - this.sendWhenReady('vscode:leaveHighContrast'); - } - }); - } - // Window Failed to load this._win.webContents.on('did-fail-load', (event: Event, errorCode: string, errorDescription: string) => { console.warn('[electron event]: fail to load, ', errorDescription); @@ -454,7 +389,7 @@ export class VSCodeWindow { } // Swipe command support (macOS) - if (platform.isMacintosh) { + if (isMacintosh) { const config = this.configurationService.getConfiguration(); if (config && config.workbench && config.workbench.editor && config.workbench.editor.swipeToNavigate) { this.registerNavigationListenerOn('swipe', 'left', 'right', true); @@ -464,6 +399,20 @@ export class VSCodeWindow { } }; + private registerNavigationListenerOn(command: 'swipe' | 'app-command', back: 'left' | 'browser-backward', forward: 'right' | 'browser-forward', acrossEditors: boolean) { + this._win.on(command, (e, cmd) => { + if (this.readyState !== ReadyState.READY) { + return; // window must be ready + } + + if (cmd === back) { + this.send('vscode:runAction', acrossEditors ? 'workbench.action.openPreviousRecentlyUsedEditor' : 'workbench.action.navigateBack'); + } else if (cmd === forward) { + this.send('vscode:runAction', acrossEditors ? 'workbench.action.openNextRecentlyUsedEditor' : 'workbench.action.navigateForward'); + } + }); + } + public load(config: IWindowConfiguration): void { // If this is the first time the window is loaded, we associate the paths @@ -482,7 +431,7 @@ export class VSCodeWindow { } // Make sure to clear any previous edited state - if (platform.isMacintosh && this._win.isDocumentEdited()) { + if (isMacintosh && this._win.isDocumentEdited()) { this._win.setDocumentEdited(false); } @@ -504,8 +453,7 @@ export class VSCodeWindow { // (--prof-startup) save profile to disk const { profileStartup } = this.environmentService; if (profileStartup) { - stopProfiling(profileStartup.dir, profileStartup.prefix) - .done(undefined, err => console.error(err)); + stopProfiling(profileStartup.dir, profileStartup.prefix).done(undefined, err => console.error(err)); } } @@ -533,7 +481,6 @@ export class VSCodeWindow { } private getUrl(windowConfiguration: IWindowConfiguration): string { - let url = require.toUrl('vs/workbench/electron-browser/bootstrap/index.html'); // Set zoomlevel const windowConfig = this.configurationService.getConfiguration('window'); @@ -546,9 +493,12 @@ export class VSCodeWindow { windowConfiguration.fullscreen = this._win.isFullScreen(); // Set Accessibility Config - windowConfiguration.highContrast = platform.isWindows && systemPreferences.isInvertedColorScheme() && (!windowConfig || windowConfig.autoDetectHighContrast); + windowConfiguration.highContrast = isWindows && systemPreferences.isInvertedColorScheme() && (!windowConfig || windowConfig.autoDetectHighContrast); windowConfiguration.accessibilitySupport = app.isAccessibilitySupportEnabled(); + // Set Keyboard Config + windowConfiguration.isISOKeyboard = KeyboardLayoutMonitor.INSTANCE.isISOKeyboard(); + // Theme windowConfiguration.baseTheme = this.getBaseTheme(); windowConfiguration.backgroundColor = this.getBackgroundColor(); @@ -567,37 +517,44 @@ export class VSCodeWindow { } } - url += '?config=' + encodeURIComponent(JSON.stringify(config)); - - return url; + return `${require.toUrl('vs/workbench/electron-browser/bootstrap/index.html')}?config=${encodeURIComponent(JSON.stringify(config))}`; } private getBaseTheme(): string { - if (platform.isWindows && systemPreferences.isInvertedColorScheme()) { + if (isWindows && systemPreferences.isInvertedColorScheme()) { return 'hc-black'; } - const theme = this.storageService.getItem(VSCodeWindow.themeStorageKey, 'vs-dark'); + + const theme = this.storageService.getItem(CodeWindow.themeStorageKey, 'vs-dark'); + return theme.split(' ')[0]; } private getBackgroundColor(): string { - if (platform.isWindows && systemPreferences.isInvertedColorScheme()) { + if (isWindows && systemPreferences.isInvertedColorScheme()) { return '#000000'; } - let background = this.storageService.getItem(VSCodeWindow.themeBackgroundStorageKey, null); + const background = this.storageService.getItem(CodeWindow.themeBackgroundStorageKey, null); if (!background) { - let baseTheme = this.getBaseTheme(); - return baseTheme === 'hc-black' ? '#000000' : (baseTheme === 'vs' ? '#FFFFFF' : (platform.isMacintosh ? '#171717' : '#1E1E1E')); // https://github.com/electron/electron/issues/5150 + const baseTheme = this.getBaseTheme(); + + return baseTheme === 'hc-black' ? '#000000' : (baseTheme === 'vs' ? '#FFFFFF' : (isMacintosh ? '#171717' : '#1E1E1E')); // https://github.com/electron/electron/issues/5150 } return background; } public serializeWindowState(): IWindowState { - if (this.win.isFullScreen()) { + + // fullscreen gets special treatment + if (this._win.isFullScreen()) { + const display = screen.getDisplayMatching(this.getBounds()); + return { mode: WindowMode.Fullscreen, + display: display ? display.id : void 0, + // still carry over window dimensions from previous sessions! width: this.windowState.width, height: this.windowState.height, @@ -610,10 +567,8 @@ export class VSCodeWindow { let mode: WindowMode; // get window mode - if (!platform.isMacintosh && this.win.isMaximized()) { + if (!isMacintosh && this._win.isMaximized()) { mode = WindowMode.Maximized; - } else if (this.win.isMinimized()) { - mode = WindowMode.Minimized; } else { mode = WindowMode.Normal; } @@ -621,25 +576,24 @@ export class VSCodeWindow { // we don't want to save minimized state, only maximized or normal if (mode === WindowMode.Maximized) { state.mode = WindowMode.Maximized; - } else if (mode !== WindowMode.Minimized) { + } else { state.mode = WindowMode.Normal; } // only consider non-minimized window states if (mode === WindowMode.Normal || mode === WindowMode.Maximized) { - const pos = this.win.getPosition(); - const size = this.win.getSize(); + const bounds = this.getBounds(); - state.x = pos[0]; - state.y = pos[1]; - state.width = size[0]; - state.height = size[1]; + state.x = bounds.x; + state.y = bounds.y; + state.width = bounds.width; + state.height = bounds.height; } return state; } - private restoreWindowState(state?: IWindowState): void { + private restoreWindowState(state?: IWindowState): IWindowState { if (state) { try { state = this.validateWindowState(state); @@ -652,8 +606,7 @@ export class VSCodeWindow { state = defaultWindowState(); } - this.windowState = state; - this.currentWindowMode = this.windowState.mode; + return state; } private validateWindowState(state: IWindowState): IWindowState { @@ -709,7 +662,19 @@ export class VSCodeWindow { return state; } - // Multi Monitor: be less strict because metrics can be crazy + // Multi Montior (fullscreen): try to find the previously used display + if (state.display && state.mode === WindowMode.Fullscreen) { + const display = displays.filter(d => d.id === state.display)[0]; + if (display && display.bounds && typeof display.bounds.x === 'number' && typeof display.bounds.y === 'number') { + const defaults = defaultWindowState(WindowMode.Fullscreen); // make sure we have good values when the user restores the window + defaults.x = display.bounds.x; // carefull to use displays x/y position so that the window ends up on the correct monitor + defaults.y = display.bounds.y; + + return defaults; + } + } + + // Multi Monitor (non-fullscreen): be less strict because metrics can be crazy const bounds = { x: state.x, y: state.y, width: state.width, height: state.height }; const display = screen.getDisplayMatching(bounds); if (display && display.bounds.x + display.bounds.width > bounds.x && display.bounds.y + display.bounds.height > bounds.y) { @@ -728,17 +693,17 @@ export class VSCodeWindow { } public getBounds(): Electron.Rectangle { - const pos = this.win.getPosition(); - const dimension = this.win.getSize(); + const pos = this._win.getPosition(); + const dimension = this._win.getSize(); return { x: pos[0], y: pos[1], width: dimension[0], height: dimension[1] }; } public toggleFullScreen(): void { - const willBeFullScreen = !this.win.isFullScreen(); + const willBeFullScreen = !this._win.isFullScreen(); // set fullscreen flag on window - this.win.setFullScreen(willBeFullScreen); + this._win.setFullScreen(willBeFullScreen); // respect configured menu bar visibility or default to toggle if not set this.setMenuBarVisibility(this.currentMenuBarVisibility, false); @@ -759,26 +724,26 @@ export class VSCodeWindow { } public setMenuBarVisibility(visibility: MenuBarVisibility, notify: boolean = true): void { - if (platform.isMacintosh) { + if (isMacintosh) { return; // ignore for macOS platform } - const isFullscreen = this.win.isFullScreen(); + const isFullscreen = this._win.isFullScreen(); switch (visibility) { case ('default'): - this.win.setMenuBarVisibility(!isFullscreen); - this.win.setAutoHideMenuBar(isFullscreen); + this._win.setMenuBarVisibility(!isFullscreen); + this._win.setAutoHideMenuBar(isFullscreen); break; case ('visible'): - this.win.setMenuBarVisibility(true); - this.win.setAutoHideMenuBar(false); + this._win.setMenuBarVisibility(true); + this._win.setAutoHideMenuBar(false); break; case ('toggle'): - this.win.setMenuBarVisibility(false); - this.win.setAutoHideMenuBar(true); + this._win.setMenuBarVisibility(false); + this._win.setAutoHideMenuBar(true); if (notify) { this.send('vscode:showInfoMessage', nls.localize('hiddenMenuBar', "You can still access the menu bar by pressing the **Alt** key.")); @@ -792,13 +757,46 @@ export class VSCodeWindow { // fact that we want to hide the menu without being able to bring it back via Alt key makes Electron // still show the menu. Unable to reproduce from a simple Hello World application though... setTimeout(() => { - this.win.setMenuBarVisibility(false); - this.win.setAutoHideMenuBar(false); + this._win.setMenuBarVisibility(false); + this._win.setAutoHideMenuBar(false); }); break; }; } + public onWindowTitleDoubleClick(): void { + + // Respect system settings on mac with regards to title click on windows title + if (isMacintosh) { + const action = systemPreferences.getUserDefault('AppleActionOnDoubleClick', 'string'); + switch (action) { + case 'Minimize': + this.win.minimize(); + break; + case 'None': + break; + case 'Maximize': + default: + this.win.maximize(); + } + } + + // Linux/Windows: just toggle maximize/minimized state + else { + if (this.win.isMaximized()) { + this.win.unmaximize(); + } else { + this.win.maximize(); + } + } + } + + public close(): void { + if (this._win) { + this._win.close(); + } + } + public sendWhenReady(channel: string, ...args: any[]): void { this.ready().then(() => { this.send(channel, ...args); diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index 1308d9e82aa96..1692cdca4a0e4 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -7,148 +7,101 @@ import * as path from 'path'; import * as fs from 'original-fs'; -import * as platform from 'vs/base/common/platform'; import * as nls from 'vs/nls'; -import * as types from 'vs/base/common/types'; import * as arrays from 'vs/base/common/arrays'; import { assign, mixin } from 'vs/base/common/objects'; +import URI from 'vs/base/common/uri'; import { IBackupMainService } from 'vs/platform/backup/common/backup'; -import { trim } from 'vs/base/common/strings'; import { IEnvironmentService, ParsedArgs } from 'vs/platform/environment/common/environment'; -import { IStorageService } from 'vs/code/electron-main/storage'; -import { IPath, VSCodeWindow, IWindowConfiguration, IWindowState as ISingleWindowState, defaultWindowState, WindowMode } from 'vs/code/electron-main/window'; -import { ipcMain as ipc, app, screen, BrowserWindow, dialog } from 'electron'; -import { IPathWithLineAndColumn, parseLineAndColumnAware } from 'vs/code/electron-main/paths'; -import { ILifecycleService, UnloadReason } from 'vs/code/electron-main/lifecycle'; +import { IStorageService } from 'vs/platform/storage/node/storage'; +import { CodeWindow, IWindowState as ISingleWindowState, defaultWindowState, WindowMode } from 'vs/code/electron-main/window'; +import { ipcMain as ipc, screen, BrowserWindow, dialog, systemPreferences } from 'electron'; +import { IPathWithLineAndColumn, parseLineAndColumnAware } from 'vs/code/node/paths'; +import { ILifecycleService, UnloadReason } from 'vs/platform/lifecycle/electron-main/lifecycleMain'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { ILogService } from 'vs/code/electron-main/log'; -import { getPathLabel } from 'vs/base/common/labels'; -import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; -import { IWindowSettings } from 'vs/platform/windows/common/windows'; +import { ILogService } from 'vs/platform/log/common/log'; +import { IWindowSettings, OpenContext, IPath, IWindowConfiguration } from 'vs/platform/windows/common/windows'; import { getLastActiveWindow, findBestWindowOrFolder } from 'vs/code/node/windowsUtils'; import CommonEvent, { Emitter } from 'vs/base/common/event'; import product from 'vs/platform/node/product'; -import { OpenContext } from 'vs/code/common/windows'; import { ITelemetryService, ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; -import { isParent, isEqual, isEqualOrParent } from 'vs/platform/files/common/files'; -import * as nativeKeymap from 'native-keymap'; -import { IDisposable } from 'vs/base/common/lifecycle'; +import { isEqual, isEqualOrParent } from 'vs/base/common/paths'; +import { IWindowsMainService, IOpenConfiguration } from "vs/platform/windows/electron-main/windows"; +import { IHistoryMainService } from "vs/platform/history/electron-main/historyMainService"; +import { IProcessEnvironment, isLinux, isMacintosh, isWindows } from 'vs/base/common/platform'; +import { TPromise } from "vs/base/common/winjs.base"; + enum WindowError { UNRESPONSIVE, CRASHED } -export interface IOpenConfiguration { - context: OpenContext; - cli: ParsedArgs; - userEnv?: platform.IProcessEnvironment; - pathsToOpen?: string[]; - preferNewWindow?: boolean; - forceNewWindow?: boolean; - forceReuseWindow?: boolean; - forceEmpty?: boolean; - windowToUse?: VSCodeWindow; - diffMode?: boolean; - initialStartup?: boolean; -} - interface INewWindowState extends ISingleWindowState { hasDefaultState?: boolean; } interface IWindowState { workspacePath?: string; + backupPath: string; uiState: ISingleWindowState; } interface IWindowsState { lastActiveWindow?: IWindowState; lastPluginDevelopmentHostWindow?: IWindowState; - openedFolders: IWindowState[]; + openedWindows: IWindowState[]; + openedFolders?: IWindowState[]; // TODO@Ben deprecated } -export interface IRecentPathsList { - folders: string[]; - files: string[]; -} +type RestoreWindowsSetting = 'all' | 'folders' | 'one' | 'none'; + +interface IOpenBrowserWindowOptions { + userEnv?: IProcessEnvironment; + cli?: ParsedArgs; + workspacePath?: string; + + initialStartup?: boolean; + + filesToOpen?: IPath[]; + filesToCreate?: IPath[]; + filesToDiff?: IPath[]; -interface INativeOpenDialogOptions { - pickFolders?: boolean; - pickFiles?: boolean; - path?: string; forceNewWindow?: boolean; - window?: VSCodeWindow; + windowToUse?: CodeWindow; + + emptyWorkspaceBackupFolder?: string; } -const ReopenFoldersSetting = { - ALL: 'all', - ONE: 'one', - NONE: 'none' -}; +interface IWindowToOpen extends IPath { -export const IWindowsMainService = createDecorator('windowsMainService'); + // the workspace spath for a Code instance to open + workspacePath?: string; -export interface IWindowsMainService { - _serviceBrand: any; + // the backup spath for a Code instance to use + backupPath?: string; - // events - onWindowReady: CommonEvent; - onWindowClose: CommonEvent; - onWindowReload: CommonEvent; - onPathsOpen: CommonEvent; - onRecentPathsChange: CommonEvent; - - // methods - ready(initialUserEnv: platform.IProcessEnvironment): void; - reload(win: VSCodeWindow, cli?: ParsedArgs): void; - open(openConfig: IOpenConfiguration): VSCodeWindow[]; - openExtensionDevelopmentHostWindow(openConfig: IOpenConfiguration): void; - openFileFolderPicker(forceNewWindow?: boolean, data?: ITelemetryData): void; - openFilePicker(forceNewWindow?: boolean, path?: string, window?: VSCodeWindow, data?: ITelemetryData): void; - openFolderPicker(forceNewWindow?: boolean, window?: VSCodeWindow, data?: ITelemetryData): void; - openAccessibilityOptions(): void; - focusLastActive(cli: ParsedArgs, context: OpenContext): VSCodeWindow; - getLastActiveWindow(): VSCodeWindow; - findWindow(workspacePath: string, filePath?: string, extensionDevelopmentPath?: string): VSCodeWindow; - openNewWindow(context: OpenContext): void; - sendToFocused(channel: string, ...args: any[]): void; - sendToAll(channel: string, payload: any, windowIdsToIgnore?: number[]): void; - getFocusedWindow(): VSCodeWindow; - getWindowById(windowId: number): VSCodeWindow; - getWindows(): VSCodeWindow[]; - getWindowCount(): number; - addToRecentPathsList(paths: { path: string; isFile?: boolean; }[]): void; - getRecentPathsList(workspacePath?: string, filesToOpen?: IPath[]): IRecentPathsList; - removeFromRecentPathsList(path: string): void; - removeFromRecentPathsList(paths: string[]): void; - clearRecentPathsList(): void; - updateWindowsJumpList(): void; - quit(): void; + // indicator to create the file path in the Code instance + createFilePath?: boolean; } export class WindowsManager implements IWindowsMainService { _serviceBrand: any; - private static MAX_TOTAL_RECENT_ENTRIES = 100; - - private static recentPathsListStorageKey = 'openedPathsList'; - private static workingDirPickerStorageKey = 'pickerWorkingDir'; private static windowsStateStorageKey = 'windowsState'; - private static WINDOWS: VSCodeWindow[] = []; + private static WINDOWS: CodeWindow[] = []; - private initialUserEnv: platform.IProcessEnvironment; + private initialUserEnv: IProcessEnvironment; private windowsState: IWindowsState; private lastClosedWindowState: IWindowState; - private _onRecentPathsChange = new Emitter(); - onRecentPathsChange: CommonEvent = this._onRecentPathsChange.event; + private fileDialog: FileDialog; - private _onWindowReady = new Emitter(); - onWindowReady: CommonEvent = this._onWindowReady.event; + private _onWindowReady = new Emitter(); + onWindowReady: CommonEvent = this._onWindowReady.event; private _onWindowClose = new Emitter(); onWindowClose: CommonEvent = this._onWindowClose.event; @@ -166,54 +119,31 @@ export class WindowsManager implements IWindowsMainService { @ILifecycleService private lifecycleService: ILifecycleService, @IBackupMainService private backupService: IBackupMainService, @ITelemetryService private telemetryService: ITelemetryService, - @IConfigurationService private configurationService: IConfigurationService - ) { } + @IConfigurationService private configurationService: IConfigurationService, + @IHistoryMainService private historyService: IHistoryMainService + ) { + this.windowsState = this.storageService.getItem(WindowsManager.windowsStateStorageKey) || { openedWindows: [] }; + + // TODO@Ben migration from previous openedFolders to new openedWindows property + if (Array.isArray(this.windowsState.openedFolders) && this.windowsState.openedFolders.length > 0) { + this.windowsState.openedWindows = this.windowsState.openedFolders; + this.windowsState.openedFolders = void 0; + } else if (!this.windowsState.openedWindows) { + this.windowsState.openedWindows = []; + } - public ready(initialUserEnv: platform.IProcessEnvironment): void { - this.registerListeners(); + this.fileDialog = new FileDialog(environmentService, telemetryService, storageService, this); + } + public ready(initialUserEnv: IProcessEnvironment): void { this.initialUserEnv = initialUserEnv; - this.windowsState = this.storageService.getItem(WindowsManager.windowsStateStorageKey) || { openedFolders: [] }; + + this.registerListeners(); } private registerListeners(): void { - app.on('activate', (event: Event, hasVisibleWindows: boolean) => { - this.logService.log('App#activate'); - - // Mac only event: open new window when we get activated - if (!hasVisibleWindows) { - this.openNewWindow(OpenContext.DOCK); - } - }); - - let macOpenFiles: string[] = []; - let runningTimeout: number = null; - app.on('open-file', (event: Event, path: string) => { - this.logService.log('App#open-file: ', path); - event.preventDefault(); - - // Keep in array because more might come! - macOpenFiles.push(path); - - // Clear previous handler if any - if (runningTimeout !== null) { - clearTimeout(runningTimeout); - runningTimeout = null; - } - - // Handle paths delayed in case more are coming! - runningTimeout = setTimeout(() => { - this.open({ - context: OpenContext.DOCK /* can also be opening from finder while app is running */, - cli: this.environmentService.args, - pathsToOpen: macOpenFiles, - preferNewWindow: true /* dropping on the dock or opening from finder prefers to open in a new window */ - }); - macOpenFiles = []; - runningTimeout = null; - }, 100); - }); + // React to workbench loaded events from windows ipc.on('vscode:workbenchLoaded', (event, windowId: number) => { this.logService.log('IPC#vscode-workbenchLoaded'); @@ -226,38 +156,20 @@ export class WindowsManager implements IWindowsMainService { } }); - ipc.on('vscode:broadcast', (event, windowId: number, target: string, broadcast: { channel: string; payload: any; }) => { - if (broadcast.channel && !types.isUndefinedOrNull(broadcast.payload)) { - this.logService.log('IPC#vscode:broadcast', target, broadcast.channel, broadcast.payload); - - // Handle specific events on main side - this.onBroadcast(broadcast.channel, broadcast.payload); - - // Send to windows - if (target) { - const otherWindowsWithTarget = WindowsManager.WINDOWS.filter(w => w.id !== windowId && typeof w.openedWorkspacePath === 'string'); - const directTargetMatch = otherWindowsWithTarget.filter(w => isEqual(target, w.openedWorkspacePath, !platform.isLinux /* ignorecase */)); - const parentTargetMatch = otherWindowsWithTarget.filter(w => isParent(target, w.openedWorkspacePath, !platform.isLinux /* ignorecase */)); - - const targetWindow = directTargetMatch.length ? directTargetMatch[0] : parentTargetMatch[0]; // prefer direct match over parent match - if (targetWindow) { - targetWindow.send('vscode:broadcast', broadcast); - } + // React to HC color scheme changes (Windows) + if (isWindows) { + systemPreferences.on('inverted-color-scheme-changed', () => { + if (systemPreferences.isInvertedColorScheme()) { + this.sendToAll('vscode:enterHighContrast'); } else { - this.sendToAll('vscode:broadcast', broadcast, [windowId]); + this.sendToAll('vscode:leaveHighContrast'); } - } - }); + }); + } // Update our windows state before quitting and before closing windows - this.lifecycleService.onBeforeWindowClose(win => this.onBeforeWindowClose(win)); + this.lifecycleService.onBeforeWindowClose(win => this.onBeforeWindowClose(win as CodeWindow)); this.lifecycleService.onBeforeQuit(() => this.onBeforeQuit()); - - KeyboardLayoutMonitor.INSTANCE.onDidChangeKeyboardLayout(() => { - WindowsManager.WINDOWS.forEach((window) => { - window.sendWhenReady('vscode:keyboardLayoutChanged'); - }); - }); } // Note that onBeforeQuit() and onBeforeWindowClose() are fired in different order depending on the OS: @@ -269,9 +181,10 @@ export class WindowsManager implements IWindowsMainService { // and then onBeforeWindowClose(). private onBeforeQuit(): void { const currentWindowsState: IWindowsState = { - openedFolders: [], + openedWindows: [], + openedFolders: [], // TODO@Ben migration so that old clients do not fail over data (prevents NPEs) lastPluginDevelopmentHostWindow: this.windowsState.lastPluginDevelopmentHostWindow, - lastActiveWindow: this.lastClosedWindowState //will be set on Win/Linux if last window was closed, resulting in an exit + lastActiveWindow: this.lastClosedWindowState }; // 1.) Find a last active window (pick any other first window otherwise) @@ -282,26 +195,27 @@ export class WindowsManager implements IWindowsMainService { } if (activeWindow) { - currentWindowsState.lastActiveWindow = { workspacePath: activeWindow.openedWorkspacePath, uiState: activeWindow.serializeWindowState() }; + currentWindowsState.lastActiveWindow = { workspacePath: activeWindow.openedWorkspacePath, uiState: activeWindow.serializeWindowState(), backupPath: activeWindow.backupPath }; } } // 2.) Find extension host window const extensionHostWindow = WindowsManager.WINDOWS.filter(w => w.isExtensionDevelopmentHost && !w.isExtensionTestHost)[0]; if (extensionHostWindow) { - currentWindowsState.lastPluginDevelopmentHostWindow = { workspacePath: extensionHostWindow.openedWorkspacePath, uiState: extensionHostWindow.serializeWindowState() }; + currentWindowsState.lastPluginDevelopmentHostWindow = { workspacePath: extensionHostWindow.openedWorkspacePath, uiState: extensionHostWindow.serializeWindowState(), backupPath: extensionHostWindow.backupPath }; } - // 3.) All windows with opened folders for N >= 2 to support reopenFolders: all or for auto update + // 3.) All windows (except extension host) for N >= 2 to support restoreWindows: all or for auto update // // Carefull here: asking a window for its window state after it has been closed returns bogus values (width: 0, height: 0) // so if we ever want to persist the UI state of the last closed window (window count === 1), it has // to come from the stored lastClosedWindowState on Win/Linux at least if (this.getWindowCount() > 1) { - currentWindowsState.openedFolders = WindowsManager.WINDOWS.filter(w => !!w.openedWorkspacePath && !w.isExtensionDevelopmentHost).map(w => { + currentWindowsState.openedWindows = WindowsManager.WINDOWS.filter(w => !w.isExtensionDevelopmentHost).map(w => { return { workspacePath: w.openedWorkspacePath, - uiState: w.serializeWindowState() + uiState: w.serializeWindowState(), + backupPath: w.backupPath }; }); } @@ -311,21 +225,21 @@ export class WindowsManager implements IWindowsMainService { } // See note on #onBeforeQuit() for details how these events are flowing - private onBeforeWindowClose(win: VSCodeWindow): void { + private onBeforeWindowClose(win: CodeWindow): void { if (this.lifecycleService.isQuitRequested()) { return; // during quit, many windows close in parallel so let it be handled in the before-quit handler } // On Window close, update our stored UI state of this window - const state: IWindowState = { workspacePath: win.openedWorkspacePath, uiState: win.serializeWindowState() }; + const state: IWindowState = { workspacePath: win.openedWorkspacePath, uiState: win.serializeWindowState(), backupPath: win.backupPath }; if (win.isExtensionDevelopmentHost && !win.isExtensionTestHost) { this.windowsState.lastPluginDevelopmentHostWindow = state; // do not let test run window state overwrite our extension development state } // Any non extension host window with same workspace else if (!win.isExtensionDevelopmentHost && !!win.openedWorkspacePath) { - this.windowsState.openedFolders.forEach(o => { - if (isEqual(o.workspacePath, win.openedWorkspacePath, !platform.isLinux /* ignorecase */)) { + this.windowsState.openedWindows.forEach(o => { + if (isEqual(o.workspacePath, win.openedWorkspacePath, !isLinux /* ignorecase */)) { o.uiState = state.uiState; } }); @@ -333,132 +247,95 @@ export class WindowsManager implements IWindowsMainService { // On Windows and Linux closing the last window will trigger quit. Since we are storing all UI state // before quitting, we need to remember the UI state of this window to be able to persist it. - if (!platform.isMacintosh && this.getWindowCount() === 1) { + // On macOS we keep the last closed window state ready in case the user wants to quit right after or + // wants to open another window, in which case we use this state over the persisted one. + if (this.getWindowCount() === 1) { this.lastClosedWindowState = state; } } - private onBroadcast(event: string, payload: any): void { - // Theme changes - if (event === 'vscode:changeColorTheme' && typeof payload === 'string') { + public open(openConfig: IOpenConfiguration): CodeWindow[] { + const windowsToOpen = this.getWindowsToOpen(openConfig); - let data = JSON.parse(payload); - this.storageService.setItem(VSCodeWindow.themeStorageKey, data.id); - this.storageService.setItem(VSCodeWindow.themeBackgroundStorageKey, data.background); + // + // These are windows to open to show either folders or files (including diffing files or creating them) + // + const foldersToOpen = arrays.distinct(windowsToOpen.filter(win => win.workspacePath && !win.filePath).map(win => win.workspacePath), folder => isLinux ? folder : folder.toLowerCase()); // prevent duplicates + const emptyToOpen = windowsToOpen.filter(win => !win.workspacePath && !win.filePath && !win.backupPath).length; + + let filesToOpen = windowsToOpen.filter(path => !!path.filePath && !path.createFilePath); + let filesToCreate = windowsToOpen.filter(path => !!path.filePath && path.createFilePath); + let filesToDiff: IPath[]; + if (openConfig.diffMode && filesToOpen.length === 2) { + filesToDiff = filesToOpen; + filesToOpen = []; + filesToCreate = []; // diff ignores other files that do not exist + } else { + filesToDiff = []; } - } - public reload(win: VSCodeWindow, cli?: ParsedArgs): void { - - // Only reload when the window has not vetoed this - this.lifecycleService.unload(win, UnloadReason.RELOAD).done(veto => { - if (!veto) { - win.reload(cli); - // Emit - this._onWindowReload.fire(win.id); + // + // These are windows to restore because of hot-exit + // + const hotExitRestore = (openConfig.initialStartup && !openConfig.cli.extensionDevelopmentPath); + const foldersToRestore = hotExitRestore ? this.backupService.getWorkspaceBackupPaths() : []; + let emptyToRestore = hotExitRestore ? this.backupService.getEmptyWorkspaceBackupPaths() : []; + emptyToRestore.push(...windowsToOpen.filter(w => !w.workspacePath && w.backupPath).map(w => path.basename(w.backupPath))); // add empty windows with backupPath + emptyToRestore = arrays.distinct(emptyToRestore); // prevent duplicates + + // Open based on config + const usedWindows = this.doOpen(openConfig, foldersToOpen, foldersToRestore, emptyToRestore, emptyToOpen, filesToOpen, filesToCreate, filesToDiff); + + // Make sure the last active window gets focus if we opened multiple + if (usedWindows.length > 1 && this.windowsState.lastActiveWindow) { + let lastActiveWindw = usedWindows.filter(w => w.backupPath === this.windowsState.lastActiveWindow.backupPath); + if (lastActiveWindw.length) { + lastActiveWindw[0].focus(); } - }); - } - - public open(openConfig: IOpenConfiguration): VSCodeWindow[] { - const windowConfig = this.configurationService.getConfiguration('window'); + } - let iPathsToOpen: IPath[]; - const usedWindows: VSCodeWindow[] = []; + // Remember in recent document list (unless this opens for extension development) + // Also do not add paths when files are opened for diffing, only if opened individually + if (!usedWindows.some(w => w.isExtensionDevelopmentHost) && !openConfig.cli.diff) { + const recentPaths: { path: string; isFile?: boolean; }[] = []; - // Find paths from provided paths if any - if (openConfig.pathsToOpen && openConfig.pathsToOpen.length > 0) { - iPathsToOpen = openConfig.pathsToOpen.map(pathToOpen => { - const iPath = this.toIPath(pathToOpen, false, openConfig.cli && openConfig.cli.goto); - - // Warn if the requested path to open does not exist - if (!iPath) { - const options: Electron.ShowMessageBoxOptions = { - title: product.nameLong, - type: 'info', - buttons: [nls.localize('ok', "OK")], - message: nls.localize('pathNotExistTitle', "Path does not exist"), - detail: nls.localize('pathNotExistDetail', "The path '{0}' does not seem to exist anymore on disk.", pathToOpen), - noLink: true - }; - - const activeWindow = BrowserWindow.getFocusedWindow(); - if (activeWindow) { - dialog.showMessageBox(activeWindow, options); - } else { - dialog.showMessageBox(options); - } + windowsToOpen.forEach(win => { + if (win.filePath || win.workspacePath) { + recentPaths.push({ path: win.filePath || win.workspacePath, isFile: !!win.filePath }); } - - return iPath; }); - // get rid of nulls - iPathsToOpen = arrays.coalesce(iPathsToOpen); - - if (iPathsToOpen.length === 0) { - return null; // indicate to outside that open failed + if (recentPaths.length) { + this.historyService.addToRecentPathsList(recentPaths); } } - // Check for force empty - else if (openConfig.forceEmpty) { - iPathsToOpen = [Object.create(null)]; + // Emit events + if (windowsToOpen.length) { + this._onPathsOpen.fire(windowsToOpen); } - // Otherwise infer from command line arguments - else { - const ignoreFileNotFound = openConfig.cli._.length > 0; // we assume the user wants to create this file from command line - iPathsToOpen = this.cliToPaths(openConfig.cli, ignoreFileNotFound); - } + return usedWindows; + } - let foldersToOpen = arrays.distinct(iPathsToOpen.filter(iPath => iPath.workspacePath && !iPath.filePath).map(iPath => iPath.workspacePath), folder => platform.isLinux ? folder : folder.toLowerCase()); // prevent duplicates - let foldersToRestore = (openConfig.initialStartup && !openConfig.cli.extensionDevelopmentPath) ? this.backupService.getWorkspaceBackupPaths() : []; - let filesToOpen: IPath[] = []; - let filesToDiff: IPath[] = []; - let emptyToOpen = iPathsToOpen.filter(iPath => !iPath.workspacePath && !iPath.filePath); - let emptyToRestore = (openConfig.initialStartup && !openConfig.cli.extensionDevelopmentPath) ? this.backupService.getEmptyWorkspaceBackupPaths() : []; - let filesToCreate = iPathsToOpen.filter(iPath => !!iPath.filePath && iPath.createFilePath); - - // Diff mode needs special care - const candidates = iPathsToOpen.filter(iPath => !!iPath.filePath && !iPath.createFilePath); - if (openConfig.diffMode) { - if (candidates.length === 2) { - filesToDiff = candidates; - } else { - emptyToOpen = [Object.create(null)]; // improper use of diffMode, open empty - } + private doOpen( + openConfig: IOpenConfiguration, + foldersToOpen: string[], + foldersToRestore: string[], + emptyToRestore: string[], + emptyToOpen: number, + filesToOpen: IPath[], + filesToCreate: IPath[], + filesToDiff: IPath[] + ) { - foldersToOpen = []; // diff is always in empty workspace - foldersToRestore = []; // diff is always in empty workspace - filesToCreate = []; // diff ignores other files that do not exist - } else { - filesToOpen = candidates; - } - - // let the user settings override how folders are open in a new window or same window unless we are forced - let openFolderInNewWindow = (openConfig.preferNewWindow || openConfig.forceNewWindow) && !openConfig.forceReuseWindow; - if (!openConfig.forceNewWindow && !openConfig.forceReuseWindow && windowConfig && (windowConfig.openFoldersInNewWindow === 'on' || windowConfig.openFoldersInNewWindow === 'off')) { - openFolderInNewWindow = (windowConfig.openFoldersInNewWindow === 'on'); - } + // Settings can decide if files/folders open in new window or not + let { openFolderInNewWindow, openFilesInNewWindow } = this.shouldOpenNewWindow(openConfig); // Handle files to open/diff or to create when we dont open a folder and we do not restore any folder/untitled from hot-exit + const usedWindows: CodeWindow[] = []; if (!foldersToOpen.length && !foldersToRestore.length && !emptyToRestore.length && (filesToOpen.length > 0 || filesToCreate.length > 0 || filesToDiff.length > 0)) { - // let the user settings override how files are open in a new window or same window unless we are forced (not for extension development though) - let openFilesInNewWindow: boolean; - if (openConfig.forceNewWindow || openConfig.forceReuseWindow) { - openFilesInNewWindow = openConfig.forceNewWindow && !openConfig.forceReuseWindow; - } else { - if (openConfig.context === OpenContext.DOCK) { - openFilesInNewWindow = true; // only on macOS do we allow to open files in a new window if this is triggered via DOCK context - } - - if (!openConfig.cli.extensionDevelopmentPath && windowConfig && (windowConfig.openFilesInNewWindow === 'on' || windowConfig.openFilesInNewWindow === 'off')) { - openFilesInNewWindow = (windowConfig.openFilesInNewWindow === 'on'); - } - } - // Open Files in last instance if any and flag tells us so const fileToCheck = filesToOpen[0] || filesToCreate[0] || filesToDiff[0]; const windowOrFolder = findBestWindowOrFolder({ @@ -469,7 +346,8 @@ export class WindowsManager implements IWindowsMainService { filePath: fileToCheck && fileToCheck.filePath, userHome: this.environmentService.userHome }); - if (windowOrFolder instanceof VSCodeWindow) { + + if (windowOrFolder instanceof CodeWindow) { windowOrFolder.focus(); const files = { filesToOpen, filesToCreate, filesToDiff }; // copy to object because they get reset shortly after windowOrFolder.ready().then(readyWindow => { @@ -481,8 +359,16 @@ export class WindowsManager implements IWindowsMainService { // Otherwise open instance with files else { - const configuration = this.toConfiguration(openConfig, windowOrFolder, filesToOpen, filesToCreate, filesToDiff); - const browserWindow = this.openInBrowserWindow(configuration, true /* new window */); + const browserWindow = this.openInBrowserWindow({ + userEnv: openConfig.userEnv, + cli: openConfig.cli, + initialStartup: openConfig.initialStartup, + workspacePath: windowOrFolder, + filesToOpen, + filesToCreate, + filesToDiff, + forceNewWindow: true + }); usedWindows.push(browserWindow); openFolderInNewWindow = true; // any other folders to open must open in new window then @@ -495,7 +381,7 @@ export class WindowsManager implements IWindowsMainService { } // Handle folders to open (instructed and to restore) - let allFoldersToOpen = arrays.distinct([...foldersToOpen, ...foldersToRestore], folder => platform.isLinux ? folder : folder.toLowerCase()); // prevent duplicates + let allFoldersToOpen = arrays.distinct([...foldersToOpen, ...foldersToRestore], folder => isLinux ? folder : folder.toLowerCase()); // prevent duplicates if (allFoldersToOpen.length > 0) { // Check for existing instances @@ -503,6 +389,7 @@ export class WindowsManager implements IWindowsMainService { if (windowsOnWorkspacePath.length > 0) { const browserWindow = windowsOnWorkspacePath[0]; browserWindow.focus(); // just focus one of them + const files = { filesToOpen, filesToCreate, filesToDiff }; // copy to object because they get reset shortly after browserWindow.ready().then(readyWindow => { readyWindow.send('vscode:openFiles', files); @@ -520,12 +407,21 @@ export class WindowsManager implements IWindowsMainService { // Open remaining ones allFoldersToOpen.forEach(folderToOpen => { - if (windowsOnWorkspacePath.some(win => isEqual(win.openedWorkspacePath, folderToOpen, !platform.isLinux /* ignorecase */))) { + if (windowsOnWorkspacePath.some(win => isEqual(win.openedWorkspacePath, folderToOpen, !isLinux /* ignorecase */))) { return; // ignore folders that are already open } - const configuration = this.toConfiguration(openConfig, folderToOpen, filesToOpen, filesToCreate, filesToDiff); - const browserWindow = this.openInBrowserWindow(configuration, openFolderInNewWindow, openFolderInNewWindow ? void 0 : openConfig.windowToUse); + const browserWindow = this.openInBrowserWindow({ + userEnv: openConfig.userEnv, + cli: openConfig.cli, + initialStartup: openConfig.initialStartup, + workspacePath: folderToOpen, + filesToOpen, + filesToCreate, + filesToDiff, + forceNewWindow: openFolderInNewWindow, + windowToUse: openFolderInNewWindow ? void 0 : openConfig.windowToUse as CodeWindow + }); usedWindows.push(browserWindow); // Reset these because we handled them @@ -540,8 +436,16 @@ export class WindowsManager implements IWindowsMainService { // Handle empty if (emptyToRestore.length > 0) { emptyToRestore.forEach(emptyWorkspaceBackupFolder => { - const configuration = this.toConfiguration(openConfig, void 0, filesToOpen, filesToCreate, filesToDiff); - const browserWindow = this.openInBrowserWindow(configuration, true /* new window */, null, emptyWorkspaceBackupFolder); + const browserWindow = this.openInBrowserWindow({ + userEnv: openConfig.userEnv, + cli: openConfig.cli, + initialStartup: openConfig.initialStartup, + filesToOpen, + filesToCreate, + filesToDiff, + forceNewWindow: true, + emptyWorkspaceBackupFolder + }); usedWindows.push(browserWindow); // Reset these because we handled them @@ -554,190 +458,179 @@ export class WindowsManager implements IWindowsMainService { } // Only open empty if no empty workspaces were restored - else if (emptyToOpen.length > 0) { - emptyToOpen.forEach(() => { - const configuration = this.toConfiguration(openConfig); - const browserWindow = this.openInBrowserWindow(configuration, openFolderInNewWindow, openFolderInNewWindow ? void 0 : openConfig.windowToUse); + else if (emptyToOpen > 0) { + for (let i = 0; i < emptyToOpen; i++) { + const browserWindow = this.openInBrowserWindow({ + userEnv: openConfig.userEnv, + cli: openConfig.cli, + initialStartup: openConfig.initialStartup, + forceNewWindow: openFolderInNewWindow, + windowToUse: openFolderInNewWindow ? void 0 : openConfig.windowToUse as CodeWindow + }); usedWindows.push(browserWindow); openFolderInNewWindow = true; // any other folders to open must open in new window then - }); + } } - // Remember in recent document list (unless this opens for extension development) - // Also do not add paths when files are opened for diffing, only if opened individually - if (!usedWindows.some(w => w.isExtensionDevelopmentHost) && !openConfig.cli.diff) { - const recentPaths: { path: string; isFile?: boolean; }[] = []; + return arrays.distinct(usedWindows); + } - iPathsToOpen.forEach(iPath => { - if (iPath.filePath || iPath.workspacePath) { - app.addRecentDocument(iPath.filePath || iPath.workspacePath); - recentPaths.push({ path: iPath.filePath || iPath.workspacePath, isFile: !!iPath.filePath }); - } - }); + private getWindowsToOpen(openConfig: IOpenConfiguration): IWindowToOpen[] { + let windowsToOpen: IWindowToOpen[]; - if (recentPaths.length) { - this.addToRecentPathsList(recentPaths); - } + // Extract paths: from API + if (openConfig.pathsToOpen && openConfig.pathsToOpen.length > 0) { + windowsToOpen = this.doExtractPathsFromAPI(openConfig.pathsToOpen, openConfig.cli && openConfig.cli.goto); } - // Emit events - this._onPathsOpen.fire(iPathsToOpen); + // Check for force empty + else if (openConfig.forceEmpty) { + windowsToOpen = [Object.create(null)]; + } - return arrays.distinct(usedWindows); - } + // Extract paths: from CLI + else if (openConfig.cli._.length > 0) { + windowsToOpen = this.doExtractPathsFromCLI(openConfig.cli); + } - public addToRecentPathsList(paths: { path: string; isFile?: boolean; }[]): void { - if (!paths || !paths.length) { - return; + // Extract windows: from previous session + else { + windowsToOpen = this.doGetWindowsFromLastSession(); } - const mru = this.getRecentPathsList(); - paths.forEach(p => { - const { path, isFile } = p; + return windowsToOpen; + } + + private doExtractPathsFromAPI(paths: string[], gotoLineMode: boolean): IPath[] { + let pathsToOpen = paths.map(pathToOpen => { + const path = this.parsePath(pathToOpen, false, gotoLineMode); + + // Warn if the requested path to open does not exist + if (!path) { + const options: Electron.ShowMessageBoxOptions = { + title: product.nameLong, + type: 'info', + buttons: [nls.localize('ok', "OK")], + message: nls.localize('pathNotExistTitle', "Path does not exist"), + detail: nls.localize('pathNotExistDetail', "The path '{0}' does not seem to exist anymore on disk.", pathToOpen), + noLink: true + }; - if (isFile) { - mru.files.unshift(path); - mru.files = arrays.distinct(mru.files, (f) => platform.isLinux ? f : f.toLowerCase()); - } else { - mru.folders.unshift(path); - mru.folders = arrays.distinct(mru.folders, (f) => platform.isLinux ? f : f.toLowerCase()); + const activeWindow = BrowserWindow.getFocusedWindow(); + if (activeWindow) { + dialog.showMessageBox(activeWindow, options); + } else { + dialog.showMessageBox(options); + } } - // Make sure its bounded - mru.folders = mru.folders.slice(0, WindowsManager.MAX_TOTAL_RECENT_ENTRIES); - mru.files = mru.files.slice(0, WindowsManager.MAX_TOTAL_RECENT_ENTRIES); + return path; }); - this.storageService.setItem(WindowsManager.recentPathsListStorageKey, mru); - this._onRecentPathsChange.fire(); + // get rid of nulls + pathsToOpen = arrays.coalesce(pathsToOpen); + + return pathsToOpen; } - public removeFromRecentPathsList(path: string): void; - public removeFromRecentPathsList(paths: string[]): void; - public removeFromRecentPathsList(arg1: any): void { - let paths: string[]; - if (Array.isArray(arg1)) { - paths = arg1; - } else { - paths = [arg1]; + private doExtractPathsFromCLI(cli: ParsedArgs): IPath[] { + const pathsToOpen = cli._.map(candidate => this.parsePath(candidate, true /* ignoreFileNotFound */, cli.goto)).filter(path => !!path); + if (pathsToOpen.length > 0) { + return pathsToOpen; } - const mru = this.getRecentPathsList(); - let update = false; + // No path provided, return empty to open empty + return [Object.create(null)]; + } - paths.forEach(path => { - let index = mru.files.indexOf(path); - if (index >= 0) { - mru.files.splice(index, 1); - update = true; - } + private doGetWindowsFromLastSession(): IWindowToOpen[] { + const restoreWindows = this.getRestoreWindowsSetting(); + const lastActiveWindow = this.windowsState.lastActiveWindow; - index = mru.folders.indexOf(path); - if (index >= 0) { - mru.folders.splice(index, 1); - update = true; - } - }); + switch (restoreWindows) { - if (update) { - this.storageService.setItem(WindowsManager.recentPathsListStorageKey, mru); - this._onRecentPathsChange.fire(); - } - } + // none: we always open an empty window + case 'none': + return [Object.create(null)]; - public clearRecentPathsList(): void { - this.storageService.setItem(WindowsManager.recentPathsListStorageKey, { folders: [], files: [] }); - app.clearRecentDocuments(); + // one: restore last opened folder or empty window + case 'one': + if (lastActiveWindow) { - // Event - this._onRecentPathsChange.fire(); - } + // return folder path if it is valid + const folder = lastActiveWindow.workspacePath; + if (folder) { + const validatedFolderPath = this.parsePath(folder); + if (validatedFolderPath) { + return [validatedFolderPath]; + } + } - public getRecentPathsList(workspacePath?: string, filesToOpen?: IPath[]): IRecentPathsList { - let files: string[]; - let folders: string[]; + // otherwise use backup path to restore empty windows + else if (lastActiveWindow.backupPath) { + return [{ backupPath: lastActiveWindow.backupPath }]; + } + } + break; - // Get from storage - const storedRecents = this.storageService.getItem(WindowsManager.recentPathsListStorageKey); - if (storedRecents) { - files = storedRecents.files || []; - folders = storedRecents.folders || []; - } else { - files = []; - folders = []; - } + // all: restore all windows + // folders: restore last opened folders only + case 'all': + case 'folders': - // Add currently files to open to the beginning if any - if (filesToOpen) { - files.unshift(...filesToOpen.map(f => f.filePath)); - } + // Windows with Folders + const lastOpenedFolders = this.windowsState.openedWindows.filter(w => !!w.workspacePath).map(o => o.workspacePath); + const lastActiveFolder = lastActiveWindow && lastActiveWindow.workspacePath; + if (lastActiveFolder) { + lastOpenedFolders.push(lastActiveFolder); + } - // Add current workspace path to beginning if set - if (workspacePath) { - folders.unshift(workspacePath); - } + const windowsToOpen = lastOpenedFolders.map(candidate => this.parsePath(candidate)).filter(path => !!path); - // Clear those dupes - files = arrays.distinct(files); - folders = arrays.distinct(folders); + // Windows that were Empty + if (restoreWindows === 'all') { + const lastOpenedEmpty = this.windowsState.openedWindows.filter(w => !w.workspacePath && w.backupPath).map(w => w.backupPath); + const lastActiveEmpty = lastActiveWindow && !lastActiveWindow.workspacePath && lastActiveWindow.backupPath; + if (lastActiveEmpty) { + lastOpenedEmpty.push(lastActiveEmpty); + } - return { files, folders }; - } + windowsToOpen.push(...lastOpenedEmpty.map(backupPath => ({ backupPath }))); + } - private getWindowUserEnv(openConfig: IOpenConfiguration): platform.IProcessEnvironment { - return assign({}, this.initialUserEnv, openConfig.userEnv || {}); - } + if (windowsToOpen.length > 0) { + return windowsToOpen; + } - public openExtensionDevelopmentHostWindow(openConfig: IOpenConfiguration): void { + break; + } - // Reload an existing extension development host window on the same path - // We currently do not allow more than one extension development window - // on the same extension path. - let res = WindowsManager.WINDOWS.filter(w => w.config && isEqual(w.config.extensionDevelopmentPath, openConfig.cli.extensionDevelopmentPath, !platform.isLinux /* ignorecase */)); - if (res && res.length === 1) { - this.reload(res[0], openConfig.cli); - res[0].focus(); // make sure it gets focus and is restored + // Always fallback to empty window + return [Object.create(null)]; + } - return; - } + private getRestoreWindowsSetting(): RestoreWindowsSetting { + let restoreWindows: RestoreWindowsSetting; + if (this.lifecycleService.wasRestarted) { + restoreWindows = 'all'; // always reopen all windows when an update was applied + } else { + const windowConfig = this.configurationService.getConfiguration('window'); + restoreWindows = ((windowConfig && windowConfig.restoreWindows) || 'one') as RestoreWindowsSetting; - // Fill in previously opened workspace unless an explicit path is provided and we are not unit testing - if (openConfig.cli._.length === 0 && !openConfig.cli.extensionTestsPath) { - const workspaceToOpen = this.windowsState.lastPluginDevelopmentHostWindow && this.windowsState.lastPluginDevelopmentHostWindow.workspacePath; - if (workspaceToOpen) { - openConfig.cli._ = [workspaceToOpen]; + if (restoreWindows === 'one' /* default */ && windowConfig && windowConfig.reopenFolders) { + restoreWindows = windowConfig.reopenFolders; // TODO@Ben migration } - } - // Make sure we are not asked to open a path that is already opened - if (openConfig.cli._.length > 0) { - res = WindowsManager.WINDOWS.filter(w => w.openedWorkspacePath && openConfig.cli._.indexOf(w.openedWorkspacePath) >= 0); - if (res.length) { - openConfig.cli._ = []; + if (['all', 'folders', 'one', 'none'].indexOf(restoreWindows) === -1) { + restoreWindows = 'one'; } } - // Open it - this.open({ context: openConfig.context, cli: openConfig.cli, forceNewWindow: true, forceEmpty: openConfig.cli._.length === 0, userEnv: openConfig.userEnv }); - } - - private toConfiguration(config: IOpenConfiguration, workspacePath?: string, filesToOpen?: IPath[], filesToCreate?: IPath[], filesToDiff?: IPath[]): IWindowConfiguration { - const configuration: IWindowConfiguration = mixin({}, config.cli); // inherit all properties from CLI - configuration.appRoot = this.environmentService.appRoot; - configuration.execPath = process.execPath; - configuration.userEnv = this.getWindowUserEnv(config); - configuration.isInitialStartup = config.initialStartup; - configuration.workspacePath = workspacePath; - configuration.filesToOpen = filesToOpen; - configuration.filesToCreate = filesToCreate; - configuration.filesToDiff = filesToDiff; - configuration.nodeCachedDataDir = this.environmentService.nodeCachedDataDir; - - return configuration; + return restoreWindows; } - private toIPath(anyPath: string, ignoreFileNotFound?: boolean, gotoLineMode?: boolean): IPath { + private parsePath(anyPath: string, ignoreFileNotFound?: boolean, gotoLineMode?: boolean): IWindowToOpen { if (!anyPath) { return null; } @@ -761,7 +654,7 @@ export class WindowsManager implements IWindowsMainService { { workspacePath: candidate }; } } catch (error) { - this.removeFromRecentPathsList(candidate); // since file does not seem to exist anymore, remove from recent + this.historyService.removeFromRecentPathsList(candidate); // since file does not seem to exist anymore, remove from recent if (ignoreFileNotFound) { return { filePath: candidate, createFilePath: true }; // assume this is a file that does not yet exist @@ -771,67 +664,102 @@ export class WindowsManager implements IWindowsMainService { return null; } - private cliToPaths(cli: ParsedArgs, ignoreFileNotFound?: boolean): IPath[] { + private shouldOpenNewWindow(openConfig: IOpenConfiguration): { openFolderInNewWindow: boolean; openFilesInNewWindow: boolean; } { + + // let the user settings override how folders are open in a new window or same window unless we are forced + const windowConfig = this.configurationService.getConfiguration('window'); + const openFolderInNewWindowConfig = (windowConfig && windowConfig.openFoldersInNewWindow) || 'default' /* default */; + const openFilesInNewWindowConfig = (windowConfig && windowConfig.openFilesInNewWindow) || 'off' /* default */; - // Check for pass in candidate or last opened path - let candidates: string[] = []; - if (cli._.length > 0) { - candidates = cli._; + let openFolderInNewWindow = (openConfig.preferNewWindow || openConfig.forceNewWindow) && !openConfig.forceReuseWindow; + if (!openConfig.forceNewWindow && !openConfig.forceReuseWindow && (openFolderInNewWindowConfig === 'on' || openFolderInNewWindowConfig === 'off')) { + openFolderInNewWindow = (openFolderInNewWindowConfig === 'on'); } - // No path argument, check settings for what to do now - else { - let reopenFolders: string; - if (this.lifecycleService.wasRestarted) { - reopenFolders = ReopenFoldersSetting.ALL; // always reopen all folders when an update was applied - } else { - const windowConfig = this.configurationService.getConfiguration('window'); - reopenFolders = (windowConfig && windowConfig.reopenFolders) || ReopenFoldersSetting.ONE; + // let the user settings override how files are open in a new window or same window unless we are forced (not for extension development though) + let openFilesInNewWindow: boolean; + if (openConfig.forceNewWindow || openConfig.forceReuseWindow) { + openFilesInNewWindow = openConfig.forceNewWindow && !openConfig.forceReuseWindow; + } else { + if (openConfig.context === OpenContext.DOCK) { + openFilesInNewWindow = true; // only on macOS do we allow to open files in a new window if this is triggered via DOCK context + } + + if (!openConfig.cli.extensionDevelopmentPath && (openFilesInNewWindowConfig === 'on' || openFilesInNewWindowConfig === 'off')) { + openFilesInNewWindow = (openFilesInNewWindowConfig === 'on'); } + } - const lastActiveFolder = this.windowsState.lastActiveWindow && this.windowsState.lastActiveWindow.workspacePath; + return { openFolderInNewWindow, openFilesInNewWindow }; + } - // Restore all - if (reopenFolders === ReopenFoldersSetting.ALL) { - const lastOpenedFolders = this.windowsState.openedFolders.map(o => o.workspacePath); + public openExtensionDevelopmentHostWindow(openConfig: IOpenConfiguration): void { - // If we have a last active folder, move it to the end - if (lastActiveFolder) { - lastOpenedFolders.splice(lastOpenedFolders.indexOf(lastActiveFolder), 1); - lastOpenedFolders.push(lastActiveFolder); - } + // Reload an existing extension development host window on the same path + // We currently do not allow more than one extension development window + // on the same extension path. + let res = WindowsManager.WINDOWS.filter(w => w.config && isEqual(w.config.extensionDevelopmentPath, openConfig.cli.extensionDevelopmentPath, !isLinux /* ignorecase */)); + if (res && res.length === 1) { + this.reload(res[0], openConfig.cli); + res[0].focus(); // make sure it gets focus and is restored - candidates.push(...lastOpenedFolders); - } + return; + } - // Restore last active - else if (lastActiveFolder && (reopenFolders === ReopenFoldersSetting.ONE || reopenFolders !== ReopenFoldersSetting.NONE)) { - candidates.push(lastActiveFolder); + // Fill in previously opened workspace unless an explicit path is provided and we are not unit testing + if (openConfig.cli._.length === 0 && !openConfig.cli.extensionTestsPath) { + const workspaceToOpen = this.windowsState.lastPluginDevelopmentHostWindow && this.windowsState.lastPluginDevelopmentHostWindow.workspacePath; + if (workspaceToOpen) { + openConfig.cli._ = [workspaceToOpen]; } } - const iPaths = candidates.map(candidate => this.toIPath(candidate, ignoreFileNotFound, cli.goto)).filter(path => !!path); - if (iPaths.length > 0) { - return iPaths; + // Make sure we are not asked to open a path that is already opened + if (openConfig.cli._.length > 0) { + res = WindowsManager.WINDOWS.filter(w => w.openedWorkspacePath && openConfig.cli._.indexOf(w.openedWorkspacePath) >= 0); + if (res.length) { + openConfig.cli._ = []; + } } - // No path provided, return empty to open empty - return [Object.create(null)]; + // Open it + this.open({ context: openConfig.context, cli: openConfig.cli, forceNewWindow: true, forceEmpty: openConfig.cli._.length === 0, userEnv: openConfig.userEnv }); } - private openInBrowserWindow(configuration: IWindowConfiguration, forceNewWindow?: boolean, windowToUse?: VSCodeWindow, emptyWorkspaceBackupFolder?: string): VSCodeWindow { - let vscodeWindow: VSCodeWindow; + private openInBrowserWindow(options: IOpenBrowserWindowOptions): CodeWindow { + + // Build IWindowConfiguration from config and options + const configuration: IWindowConfiguration = mixin({}, options.cli); // inherit all properties from CLI + configuration.appRoot = this.environmentService.appRoot; + configuration.execPath = process.execPath; + configuration.userEnv = assign({}, this.initialUserEnv, options.userEnv || {}); + configuration.isInitialStartup = options.initialStartup; + configuration.workspacePath = options.workspacePath; + configuration.filesToOpen = options.filesToOpen; + configuration.filesToCreate = options.filesToCreate; + configuration.filesToDiff = options.filesToDiff; + configuration.nodeCachedDataDir = this.environmentService.nodeCachedDataDir; + + // if we know the backup folder upfront (for empty workspaces to restore), we can set it + // directly here which helps for restoring UI state associated with that window. + // For all other cases we first call into registerWindowForBackupsSync() to set it before + // loading the window. + if (options.emptyWorkspaceBackupFolder) { + configuration.backupPath = path.join(this.environmentService.backupHome, options.emptyWorkspaceBackupFolder); + } + + let codeWindow: CodeWindow; - if (!forceNewWindow) { - vscodeWindow = windowToUse || this.getLastActiveWindow(); + if (!options.forceNewWindow) { + codeWindow = options.windowToUse || this.getLastActiveWindow(); - if (vscodeWindow) { - vscodeWindow.focus(); + if (codeWindow) { + codeWindow.focus(); } } // New window - if (!vscodeWindow) { + if (!codeWindow) { const windowConfig = this.configurationService.getConfiguration('window'); const state = this.getNewWindowState(configuration); @@ -850,7 +778,7 @@ export class WindowsManager implements IWindowsMainService { state.mode = WindowMode.Normal; } - vscodeWindow = new VSCodeWindow({ + codeWindow = new CodeWindow({ state, extensionDevelopmentPath: configuration.extensionDevelopmentPath, isExtensionTestHost: !!configuration.extensionTestsPath @@ -861,17 +789,36 @@ export class WindowsManager implements IWindowsMainService { this.storageService ); - WindowsManager.WINDOWS.push(vscodeWindow); + WindowsManager.WINDOWS.push(codeWindow); // Window Events - vscodeWindow.win.webContents.removeAllListeners('devtools-reload-page'); // remove built in listener so we can handle this on our own - vscodeWindow.win.webContents.on('devtools-reload-page', () => this.reload(vscodeWindow)); - vscodeWindow.win.webContents.on('crashed', () => this.onWindowError(vscodeWindow, WindowError.CRASHED)); - vscodeWindow.win.on('unresponsive', () => this.onWindowError(vscodeWindow, WindowError.UNRESPONSIVE)); - vscodeWindow.win.on('closed', () => this.onWindowClosed(vscodeWindow)); + codeWindow.win.webContents.removeAllListeners('devtools-reload-page'); // remove built in listener so we can handle this on our own + codeWindow.win.webContents.on('devtools-reload-page', () => this.reload(codeWindow)); + codeWindow.win.webContents.on('crashed', () => this.onWindowError(codeWindow, WindowError.CRASHED)); + codeWindow.win.on('unresponsive', () => this.onWindowError(codeWindow, WindowError.UNRESPONSIVE)); + codeWindow.win.on('closed', () => this.onWindowClosed(codeWindow)); + + // Prevent loading on svgs in main renderer + codeWindow.win.webContents.session.webRequest.onBeforeRequest((details, callback) => { + if (details.url.indexOf('.svg') > 0) { + const uri = URI.parse(details.url); + if (uri && !uri.scheme.match(/file/i) && (uri.path as any).endsWith('.svg')) { + return callback({ cancel: true }); + } + } + return callback({}); + }); + + codeWindow.win.webContents.session.webRequest.onHeadersReceived((details, callback) => { + const contentType: string[] = (details.responseHeaders['content-type'] || details.responseHeaders['Content-Type']) as any; + if (contentType && Array.isArray(contentType) && contentType.some(x => x.toLowerCase().indexOf('image/svg') >= 0)) { + return callback({ cancel: true }); + } + return callback({ cancel: false, responseHeaders: details.responseHeaders }); + }); // Lifecycle - this.lifecycleService.registerWindow(vscodeWindow); + this.lifecycleService.registerWindow(codeWindow); } // Existing window @@ -879,7 +826,7 @@ export class WindowsManager implements IWindowsMainService { // Some configuration things get inherited if the window is being reused and we are // in extension development host mode. These options are all development related. - const currentWindowConfig = vscodeWindow.config; + const currentWindowConfig = codeWindow.config; if (!configuration.extensionDevelopmentPath && currentWindowConfig && !!currentWindowConfig.extensionDevelopmentPath) { configuration.extensionDevelopmentPath = currentWindowConfig.extensionDevelopmentPath; configuration.verbose = currentWindowConfig.verbose; @@ -890,20 +837,21 @@ export class WindowsManager implements IWindowsMainService { } // Only load when the window has not vetoed this - this.lifecycleService.unload(vscodeWindow, UnloadReason.LOAD).done(veto => { + this.lifecycleService.unload(codeWindow, UnloadReason.LOAD).done(veto => { if (!veto) { // Register window for backups if (!configuration.extensionDevelopmentPath) { - this.backupService.registerWindowForBackupsSync(vscodeWindow.id, !configuration.workspacePath, emptyWorkspaceBackupFolder, configuration.workspacePath); + const backupPath = this.backupService.registerWindowForBackupsSync(codeWindow.id, !configuration.workspacePath, options.emptyWorkspaceBackupFolder, configuration.workspacePath); + configuration.backupPath = backupPath; } // Load it - vscodeWindow.load(configuration); + codeWindow.load(configuration); } }); - return vscodeWindow; + return codeWindow; } private getNewWindowState(configuration: IWindowConfiguration): INewWindowState { @@ -915,7 +863,15 @@ export class WindowsManager implements IWindowsMainService { // Known Folder - load from stored settings if any if (configuration.workspacePath) { - const stateForWorkspace = this.windowsState.openedFolders.filter(o => isEqual(o.workspacePath, configuration.workspacePath, !platform.isLinux /* ignorecase */)).map(o => o.uiState); + const stateForWorkspace = this.windowsState.openedWindows.filter(o => isEqual(o.workspacePath, configuration.workspacePath, !isLinux /* ignorecase */)).map(o => o.uiState); + if (stateForWorkspace.length) { + return stateForWorkspace[0]; + } + } + + // Empty workspace with backups + else if (configuration.backupPath) { + const stateForWorkspace = this.windowsState.openedWindows.filter(o => o.backupPath === configuration.backupPath).map(o => o.uiState); if (stateForWorkspace.length) { return stateForWorkspace[0]; } @@ -923,8 +879,9 @@ export class WindowsManager implements IWindowsMainService { // First Window const lastActive = this.getLastActiveWindow(); - if (!lastActive && this.windowsState.lastActiveWindow) { - return this.windowsState.lastActiveWindow.uiState; + const lastActiveState = this.lastClosedWindowState || this.windowsState.lastActiveWindow; + if (!lastActive && lastActiveState) { + return lastActiveState.uiState; } // @@ -944,7 +901,7 @@ export class WindowsManager implements IWindowsMainService { else { // on mac there is 1 menu per window so we need to use the monitor where the cursor currently is - if (platform.isMacintosh) { + if (isMacintosh) { const cursorPoint = screen.getCursorScreenPoint(); displayToUse = screen.getDisplayNearestPoint(cursorPoint); } @@ -1009,77 +966,20 @@ export class WindowsManager implements IWindowsMainService { return state; } - public openFileFolderPicker(forceNewWindow?: boolean, data?: ITelemetryData): void { - this.doPickAndOpen({ pickFolders: true, pickFiles: true, forceNewWindow }, 'openFileFolder', data); - } - - public openFilePicker(forceNewWindow?: boolean, path?: string, window?: VSCodeWindow, data?: ITelemetryData): void { - this.doPickAndOpen({ pickFiles: true, forceNewWindow, path, window }, 'openFile', data); - } - - public openFolderPicker(forceNewWindow?: boolean, window?: VSCodeWindow, data?: ITelemetryData): void { - this.doPickAndOpen({ pickFolders: true, forceNewWindow, window }, 'openFolder', data); - } - - public openAccessibilityOptions(): void { - let win = new BrowserWindow({ - alwaysOnTop: true, - skipTaskbar: true, - resizable: false, - width: 450, - height: 300, - show: true, - title: nls.localize('accessibilityOptionsWindowTitle', "Accessibility Options") - }); - - win.setMenuBarVisibility(false); - - win.loadURL('chrome://accessibility'); - } - - private doPickAndOpen(options: INativeOpenDialogOptions, eventName: string, data?: ITelemetryData): void { - this.getFileOrFolderPaths(options, (paths: string[]) => { - const nOfPaths = paths ? paths.length : 0; - if (nOfPaths) { - this.open({ context: OpenContext.DIALOG, cli: this.environmentService.args, pathsToOpen: paths, forceNewWindow: options.forceNewWindow }); - } - this.telemetryService.publicLog(eventName, { - ...data, - outcome: nOfPaths ? 'success' : 'canceled', - nOfPaths - }); - }); - } - - private getFileOrFolderPaths(options: INativeOpenDialogOptions, clb: (paths: string[]) => void): void { - const workingDir = options.path || this.storageService.getItem(WindowsManager.workingDirPickerStorageKey); - const focussedWindow = options.window || this.getFocusedWindow(); - - let pickerProperties: ('openFile' | 'openDirectory' | 'multiSelections' | 'createDirectory')[]; - if (options.pickFiles && options.pickFolders) { - pickerProperties = ['multiSelections', 'openDirectory', 'openFile', 'createDirectory']; - } else { - pickerProperties = ['multiSelections', options.pickFolders ? 'openDirectory' : 'openFile', 'createDirectory']; - } - - dialog.showOpenDialog(focussedWindow && focussedWindow.win, { - defaultPath: workingDir, - properties: pickerProperties - }, paths => { - if (paths && paths.length > 0) { + public reload(win: CodeWindow, cli?: ParsedArgs): void { - // Remember path in storage for next time - this.storageService.setItem(WindowsManager.workingDirPickerStorageKey, path.dirname(paths[0])); + // Only reload when the window has not vetoed this + this.lifecycleService.unload(win, UnloadReason.RELOAD).done(veto => { + if (!veto) { + win.reload(cli); - // Return - clb(paths); - } else { - clb(void (0)); + // Emit + this._onWindowReload.fire(win.id); } }); } - public focusLastActive(cli: ParsedArgs, context: OpenContext): VSCodeWindow { + public focusLastActive(cli: ParsedArgs, context: OpenContext): CodeWindow { const lastActive = this.getLastActiveWindow(); if (lastActive) { lastActive.focus(); @@ -1088,16 +988,14 @@ export class WindowsManager implements IWindowsMainService { } // No window - open new empty one - const res = this.open({ context, cli, forceEmpty: true }); - - return res && res[0]; + return this.open({ context, cli, forceEmpty: true })[0]; } - public getLastActiveWindow(): VSCodeWindow { + public getLastActiveWindow(): CodeWindow { return getLastActiveWindow(WindowsManager.WINDOWS); } - public findWindow(workspacePath: string, filePath?: string, extensionDevelopmentPath?: string): VSCodeWindow { + public findWindow(workspacePath: string, filePath?: string, extensionDevelopmentPath?: string): CodeWindow { if (WindowsManager.WINDOWS.length) { // Sort the last active window to the front of the array of windows to test @@ -1112,22 +1010,22 @@ export class WindowsManager implements IWindowsMainService { const res = windowsToTest.filter(w => { // match on workspace - if (typeof w.openedWorkspacePath === 'string' && (isEqual(w.openedWorkspacePath, workspacePath, !platform.isLinux /* ignorecase */))) { + if (typeof w.openedWorkspacePath === 'string' && (isEqual(w.openedWorkspacePath, workspacePath, !isLinux /* ignorecase */))) { return true; } // match on file - if (typeof w.openedFilePath === 'string' && isEqual(w.openedFilePath, filePath, !platform.isLinux /* ignorecase */)) { + if (typeof w.openedFilePath === 'string' && isEqual(w.openedFilePath, filePath, !isLinux /* ignorecase */)) { return true; } // match on file path - if (typeof w.openedWorkspacePath === 'string' && filePath && isEqualOrParent(filePath, w.openedWorkspacePath, !platform.isLinux /* ignorecase */)) { + if (typeof w.openedWorkspacePath === 'string' && filePath && isEqualOrParent(filePath, w.openedWorkspacePath, !isLinux /* ignorecase */)) { return true; } // match on extension development path - if (typeof extensionDevelopmentPath === 'string' && isEqual(w.extensionDevelopmentPath, extensionDevelopmentPath, !platform.isLinux /* ignorecase */)) { + if (typeof extensionDevelopmentPath === 'string' && isEqual(w.extensionDevelopmentPath, extensionDevelopmentPath, !isLinux /* ignorecase */)) { return true; } @@ -1154,7 +1052,7 @@ export class WindowsManager implements IWindowsMainService { } } - public sendToAll(channel: string, payload: any, windowIdsToIgnore?: number[]): void { + public sendToAll(channel: string, payload?: any, windowIdsToIgnore?: number[]): void { WindowsManager.WINDOWS.forEach(w => { if (windowIdsToIgnore && windowIdsToIgnore.indexOf(w.id) >= 0) { return; // do not send if we are instructed to ignore it @@ -1164,7 +1062,7 @@ export class WindowsManager implements IWindowsMainService { }); } - public getFocusedWindow(): VSCodeWindow { + public getFocusedWindow(): CodeWindow { const win = BrowserWindow.getFocusedWindow(); if (win) { return this.getWindowById(win.id); @@ -1173,7 +1071,7 @@ export class WindowsManager implements IWindowsMainService { return null; } - public getWindowById(windowId: number): VSCodeWindow { + public getWindowById(windowId: number): CodeWindow { const res = WindowsManager.WINDOWS.filter(w => w.id === windowId); if (res && res.length === 1) { return res[0]; @@ -1182,7 +1080,7 @@ export class WindowsManager implements IWindowsMainService { return null; } - public getWindows(): VSCodeWindow[] { + public getWindows(): CodeWindow[] { return WindowsManager.WINDOWS; } @@ -1190,12 +1088,12 @@ export class WindowsManager implements IWindowsMainService { return WindowsManager.WINDOWS.length; } - private onWindowError(vscodeWindow: VSCodeWindow, error: WindowError): void { + private onWindowError(codeWindow: CodeWindow, error: WindowError): void { console.error(error === WindowError.CRASHED ? '[VS Code]: render process crashed!' : '[VS Code]: detected unresponsive'); // Unresponsive if (error === WindowError.UNRESPONSIVE) { - dialog.showMessageBox(vscodeWindow.win, { + dialog.showMessageBox(codeWindow.win, { title: product.nameLong, type: 'warning', buttons: [nls.localize('reopen', "Reopen"), nls.localize('wait', "Keep Waiting"), nls.localize('close', "Close")], @@ -1203,18 +1101,22 @@ export class WindowsManager implements IWindowsMainService { detail: nls.localize('appStalledDetail', "You can reopen or close the window or keep waiting."), noLink: true }, result => { + if (!codeWindow.win) { + return; // Return early if the window has been going down already + } + if (result === 0) { - vscodeWindow.reload(); + codeWindow.reload(); } else if (result === 2) { - this.onBeforeWindowClose(vscodeWindow); // 'close' event will not be fired on destroy(), so run it manually - vscodeWindow.win.destroy(); // make sure to destroy the window as it is unresponsive + this.onBeforeWindowClose(codeWindow); // 'close' event will not be fired on destroy(), so run it manually + codeWindow.win.destroy(); // make sure to destroy the window as it is unresponsive } }); } // Crashed else { - dialog.showMessageBox(vscodeWindow.win, { + dialog.showMessageBox(codeWindow.win, { title: product.nameLong, type: 'warning', buttons: [nls.localize('reopen', "Reopen"), nls.localize('close', "Close")], @@ -1222,17 +1124,21 @@ export class WindowsManager implements IWindowsMainService { detail: nls.localize('appCrashedDetail', "We are sorry for the inconvenience! You can reopen the window to continue where you left off."), noLink: true }, result => { + if (!codeWindow.win) { + return; // Return early if the window has been going down already + } + if (result === 0) { - vscodeWindow.reload(); + codeWindow.reload(); } else if (result === 1) { - this.onBeforeWindowClose(vscodeWindow); // 'close' event will not be fired on destroy(), so run it manually - vscodeWindow.win.destroy(); // make sure to destroy the window as it has crashed + this.onBeforeWindowClose(codeWindow); // 'close' event will not be fired on destroy(), so run it manually + codeWindow.win.destroy(); // make sure to destroy the window as it has crashed } }); } } - private onWindowClosed(win: VSCodeWindow): void { + private onWindowClosed(win: CodeWindow): void { // Tell window win.dispose(); @@ -1245,75 +1151,33 @@ export class WindowsManager implements IWindowsMainService { this._onWindowClose.fire(win.id); } - public updateWindowsJumpList(): void { - if (!platform.isWindows) { - return; // only on windows - } + public pickFileFolderAndOpen(forceNewWindow?: boolean, data?: ITelemetryData): void { + this.fileDialog.pickAndOpen({ pickFolders: true, pickFiles: true, forceNewWindow }, 'openFileFolder', data); + } - const jumpList: Electron.JumpListCategory[] = []; - - // Tasks - jumpList.push({ - type: 'tasks', - items: [ - { - type: 'task', - title: nls.localize('newWindow', "New Window"), - description: nls.localize('newWindowDesc', "Opens a new window"), - program: process.execPath, - args: '-n', // force new window - iconPath: process.execPath, - iconIndex: 0 - } - ] - }); + public pickFileAndOpen(forceNewWindow?: boolean, path?: string, window?: CodeWindow, data?: ITelemetryData): void { + this.fileDialog.pickAndOpen({ pickFiles: true, forceNewWindow, path, window, title: nls.localize('openFile', "Open File") }, 'openFile', data); + } - // Recent Folders - if (this.getRecentPathsList().folders.length > 0) { - - // The user might have meanwhile removed items from the jump list and we have to respect that - // so we need to update our list of recent paths with the choice of the user to not add them again - // Also: Windows will not show our custom category at all if there is any entry which was removed - // by the user! See https://github.com/Microsoft/vscode/issues/15052 - this.removeFromRecentPathsList(app.getJumpListSettings().removedItems.map(r => trim(r.args, '"'))); - - // Add entries - jumpList.push({ - type: 'custom', - name: nls.localize('recentFolders', "Recent Folders"), - items: this.getRecentPathsList().folders.slice(0, 7 /* limit number of entries here */).map(folder => { - return { - type: 'task', - title: path.basename(folder) || folder, // use the base name to show shorter entries in the list - description: nls.localize('folderDesc', "{0} {1}", path.basename(folder), getPathLabel(path.dirname(folder))), - program: process.execPath, - args: `"${folder}"`, // open folder (use quotes to support paths with whitespaces) - iconPath: 'explorer.exe', // simulate folder icon - iconIndex: 0 - }; - }).filter(i => !!i) - }); - } + public pickFolderAndOpen(forceNewWindow?: boolean, window?: CodeWindow, data?: ITelemetryData): void { + this.fileDialog.pickAndOpen({ pickFolders: true, forceNewWindow, window, title: nls.localize('openFolder', "Open Folder") }, 'openFolder', data); + } - // Recent - jumpList.push({ - type: 'recent' // this enables to show files in the "recent" category + public pickFolder(options?: { buttonLabel: string; title: string; }): TPromise { + return new TPromise((c, e) => { + this.fileDialog.getFileOrFolderPaths({ pickFolders: true, buttonLabel: options && options.buttonLabel }, folders => { + c(folders || []); + }); }); - - try { - app.setJumpList(jumpList); - } catch (error) { - this.logService.log('#setJumpList', error); // since setJumpList is relatively new API, make sure to guard for errors - } } public quit(): void { // If the user selected to exit from an extension development host window, do not quit, but just // close the window unless this is the last window that is opened. - const vscodeWindow = this.getFocusedWindow(); - if (vscodeWindow && vscodeWindow.isExtensionDevelopmentHost && this.getWindowCount() > 1) { - vscodeWindow.win.close(); + const codeWindow = this.getFocusedWindow(); + if (codeWindow && codeWindow.isExtensionDevelopmentHost && this.getWindowCount() > 1) { + codeWindow.win.close(); } // Otherwise: normal quit @@ -1325,25 +1189,69 @@ export class WindowsManager implements IWindowsMainService { } } -class KeyboardLayoutMonitor { +interface INativeOpenDialogOptions { + title?: string; + pickFolders?: boolean; + pickFiles?: boolean; + path?: string; + forceNewWindow?: boolean; + window?: CodeWindow; + buttonLabel?: string; +} - public static INSTANCE = new KeyboardLayoutMonitor(); +class FileDialog { - private _emitter: Emitter; - private _registered: boolean; + private static workingDirPickerStorageKey = 'pickerWorkingDir'; - private constructor() { - this._emitter = new Emitter(); - this._registered = false; + constructor( + private environmentService: IEnvironmentService, + private telemetryService: ITelemetryService, + private storageService: IStorageService, + private windowsMainService: IWindowsMainService + ) { } - public onDidChangeKeyboardLayout(callback: () => void): IDisposable { - if (!this._registered) { - this._registered = true; - nativeKeymap.onDidChangeKeyboardLayout(() => { - this._emitter.fire(); + public pickAndOpen(options: INativeOpenDialogOptions, eventName: string, data?: ITelemetryData): void { + this.getFileOrFolderPaths(options, (paths: string[]) => { + const nOfPaths = paths ? paths.length : 0; + if (nOfPaths) { + this.windowsMainService.open({ context: OpenContext.DIALOG, cli: this.environmentService.args, pathsToOpen: paths, forceNewWindow: options.forceNewWindow }); + } + this.telemetryService.publicLog(eventName, { + ...data, + outcome: nOfPaths ? 'success' : 'canceled', + nOfPaths }); + }); + } + + public getFileOrFolderPaths(options: INativeOpenDialogOptions, clb: (paths: string[]) => void): void { + const workingDir = options.path || this.storageService.getItem(FileDialog.workingDirPickerStorageKey); + const focussedWindow = options.window || this.windowsMainService.getFocusedWindow(); + + let pickerProperties: ('openFile' | 'openDirectory' | 'multiSelections' | 'createDirectory')[]; + if (options.pickFiles && options.pickFolders) { + pickerProperties = ['multiSelections', 'openDirectory', 'openFile', 'createDirectory']; + } else { + pickerProperties = ['multiSelections', options.pickFolders ? 'openDirectory' : 'openFile', 'createDirectory']; } - return this._emitter.event(callback); + + dialog.showOpenDialog(focussedWindow && focussedWindow.win, { + title: options && options.title ? options.title : void 0, + defaultPath: workingDir, + properties: pickerProperties, + buttonLabel: options && options.buttonLabel ? options.buttonLabel : void 0 + }, paths => { + if (paths && paths.length > 0) { + + // Remember path in storage for next time + this.storageService.setItem(FileDialog.workingDirPickerStorageKey, path.dirname(paths[0])); + + // Return + clb(paths); + } else { + clb(void (0)); + } + }); } -} +} \ No newline at end of file diff --git a/src/vs/code/node/cliProcessMain.ts b/src/vs/code/node/cliProcessMain.ts index 5b5c84c0be986..99fb1e05f6eed 100644 --- a/src/vs/code/node/cliProcessMain.ts +++ b/src/vs/code/node/cliProcessMain.ts @@ -116,7 +116,7 @@ class Main { const [extension] = result.firstPage; if (!extension) { - return TPromise.wrapError(`${notFound(id)}\n${useId}`); + return TPromise.wrapError(new Error(`${notFound(id)}\n${useId}`)); } console.log(localize('foundExtension', "Found '{0}' in the marketplace.", id)); @@ -137,7 +137,7 @@ class Main { const [extension] = installed.filter(e => getId(e.manifest) === id); if (!extension) { - return TPromise.wrapError(`${notInstalled(id)}\n${useId}`); + return TPromise.wrapError(new Error(`${notInstalled(id)}\n${useId}`)); } console.log(localize('uninstalling', "Uninstalling {0}...", id)); diff --git a/src/vs/code/electron-main/paths.ts b/src/vs/code/node/paths.ts similarity index 97% rename from src/vs/code/electron-main/paths.ts rename to src/vs/code/node/paths.ts index 8ad9d19591031..848b77a3c8734 100644 --- a/src/vs/code/electron-main/paths.ts +++ b/src/vs/code/node/paths.ts @@ -5,7 +5,6 @@ 'use strict'; -import * as fs from 'original-fs'; import * as path from 'path'; import * as arrays from 'vs/base/common/arrays'; import * as strings from 'vs/base/common/strings'; @@ -13,6 +12,7 @@ import * as paths from 'vs/base/common/paths'; import * as platform from 'vs/base/common/platform'; import * as types from 'vs/base/common/types'; import { ParsedArgs } from 'vs/platform/environment/common/environment'; +import { realpathSync } from 'vs/base/node/extfs'; export function validatePaths(args: ParsedArgs): ParsedArgs { @@ -43,7 +43,7 @@ function doValidatePaths(args: string[], gotoLineMode?: boolean): string[] { let realPath: string; try { - realPath = fs.realpathSync(pathCandidate); + realPath = realpathSync(pathCandidate); } catch (error) { // in case of an error, assume the user wants to create this file // if the path is relative, we join it to the cwd diff --git a/src/vs/code/electron-main/shellEnv.ts b/src/vs/code/node/shellEnv.ts similarity index 100% rename from src/vs/code/electron-main/shellEnv.ts rename to src/vs/code/node/shellEnv.ts index 2afa773a34138..92c146fefaeef 100644 --- a/src/vs/code/electron-main/shellEnv.ts +++ b/src/vs/code/node/shellEnv.ts @@ -11,7 +11,6 @@ import { generateUuid } from 'vs/base/common/uuid'; import { TPromise } from 'vs/base/common/winjs.base'; import { isWindows } from 'vs/base/common/platform'; - function getUnixShellEnvironment(): TPromise { const promise = new TPromise((c, e) => { const runAsNode = process.env['ELECTRON_RUN_AS_NODE']; @@ -88,5 +87,6 @@ export function getShellEnvironment(): TPromise { _shellEnv = getUnixShellEnvironment(); } } + return _shellEnv; } diff --git a/src/vs/code/node/windowsUtils.ts b/src/vs/code/node/windowsUtils.ts index 31a4f00b35417..0727611a54383 100644 --- a/src/vs/code/node/windowsUtils.ts +++ b/src/vs/code/node/windowsUtils.ts @@ -9,11 +9,10 @@ import * as path from 'path'; import * as fs from 'fs'; import * as platform from 'vs/base/common/platform'; import * as paths from 'vs/base/common/paths'; -import { OpenContext } from 'vs/code/common/windows'; -import { isEqualOrParent } from 'vs/platform/files/common/files'; +import { OpenContext } from 'vs/platform/windows/common/windows'; /** - * Exported subset of VSCodeWindow for testing. + * Exported subset of CodeWindow for testing. */ export interface ISimpleWindow { openedWorkspacePath: string; @@ -43,14 +42,16 @@ export function findBestWindowOrFolder({ win } else if (bestFolder) { return bestFolder; } + return !newWindow ? getLastActiveWindow(windows) : null; } function findBestWindow(windows: WINDOW[], filePath: string): WINDOW { - const containers = windows.filter(window => typeof window.openedWorkspacePath === 'string' && isEqualOrParent(filePath, window.openedWorkspacePath, !platform.isLinux /* ignorecase */)); + const containers = windows.filter(window => typeof window.openedWorkspacePath === 'string' && paths.isEqualOrParent(filePath, window.openedWorkspacePath, !platform.isLinux /* ignorecase */)); if (containers.length) { return containers.sort((a, b) => -(a.openedWorkspacePath.length - b.openedWorkspacePath.length))[0]; } + return null; } @@ -60,6 +61,7 @@ function findBestFolder(filePath: string, userHome?: string, vscodeFolder?: stri if (!platform.isLinux) { homeFolder = homeFolder && homeFolder.toLowerCase(); } + let previous = null; try { while (folder !== previous) { @@ -72,22 +74,23 @@ function findBestFolder(filePath: string, userHome?: string, vscodeFolder?: stri } catch (err) { // assume impossible to access } + return null; } function isProjectFolder(folder: string, normalizedUserHome?: string, vscodeFolder = '.vscode') { try { if ((platform.isLinux ? folder : folder.toLowerCase()) === normalizedUserHome) { - // ~/.vscode/extensions is used for extensions - return fs.statSync(path.join(folder, vscodeFolder, 'settings.json')).isFile(); - } else { - return fs.statSync(path.join(folder, vscodeFolder)).isDirectory(); + return fs.statSync(path.join(folder, vscodeFolder, 'settings.json')).isFile(); // ~/.vscode/extensions is used for extensions } + + return fs.statSync(path.join(folder, vscodeFolder)).isDirectory(); } catch (err) { if (!(err && err.code === 'ENOENT')) { throw err; } } + return false; } diff --git a/src/vs/code/test/node/windowsUtils.test.ts b/src/vs/code/test/node/windowsUtils.test.ts index 42649abda76c9..026ce3040d1ed 100644 --- a/src/vs/code/test/node/windowsUtils.test.ts +++ b/src/vs/code/test/node/windowsUtils.test.ts @@ -7,7 +7,7 @@ import assert = require('assert'); import path = require('path'); import { findBestWindowOrFolder, ISimpleWindow, IBestWindowOrFolderOptions } from 'vs/code/node/windowsUtils'; -import { OpenContext } from 'vs/code/common/windows'; +import { OpenContext } from 'vs/platform/windows/common/windows'; const fixturesFolder = require.toUrl('./fixtures'); diff --git a/src/vs/css.build.js b/src/vs/css.build.js new file mode 100644 index 0000000000000..7f34c9b158a53 --- /dev/null +++ b/src/vs/css.build.js @@ -0,0 +1,362 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +/*--------------------------------------------------------------------------------------------- + *--------------------------------------------------------------------------------------------- + *--------------------------------------------------------------------------------------------- + *--------------------------------------------------------------------------------------------- + *--------------------------------------------------------------------------------------------- + * Please make sure to make edits in the .ts file at https://github.com/Microsoft/vscode-loader/ + *--------------------------------------------------------------------------------------------- + *--------------------------------------------------------------------------------------------- + *--------------------------------------------------------------------------------------------- + *--------------------------------------------------------------------------------------------- + *--------------------------------------------------------------------------------------------*/ +'use strict'; +var _cssPluginGlobal = this; +var CSSBuildLoaderPlugin; +(function (CSSBuildLoaderPlugin) { + var global = _cssPluginGlobal || {}; + /** + * Known issue: + * - In IE there is no way to know if the CSS file loaded successfully or not. + */ + var BrowserCSSLoader = (function () { + function BrowserCSSLoader() { + this._pendingLoads = 0; + } + BrowserCSSLoader.prototype.attachListeners = function (name, linkNode, callback, errorback) { + var unbind = function () { + linkNode.removeEventListener('load', loadEventListener); + linkNode.removeEventListener('error', errorEventListener); + }; + var loadEventListener = function (e) { + unbind(); + callback(); + }; + var errorEventListener = function (e) { + unbind(); + errorback(e); + }; + linkNode.addEventListener('load', loadEventListener); + linkNode.addEventListener('error', errorEventListener); + }; + BrowserCSSLoader.prototype._onLoad = function (name, callback) { + this._pendingLoads--; + callback(); + }; + BrowserCSSLoader.prototype._onLoadError = function (name, errorback, err) { + this._pendingLoads--; + errorback(err); + }; + BrowserCSSLoader.prototype._insertLinkNode = function (linkNode) { + this._pendingLoads++; + var head = document.head || document.getElementsByTagName('head')[0]; + var other = head.getElementsByTagName('link') || document.head.getElementsByTagName('script'); + if (other.length > 0) { + head.insertBefore(linkNode, other[other.length - 1]); + } + else { + head.appendChild(linkNode); + } + }; + BrowserCSSLoader.prototype.createLinkTag = function (name, cssUrl, externalCallback, externalErrorback) { + var _this = this; + var linkNode = document.createElement('link'); + linkNode.setAttribute('rel', 'stylesheet'); + linkNode.setAttribute('type', 'text/css'); + linkNode.setAttribute('data-name', name); + var callback = function () { return _this._onLoad(name, externalCallback); }; + var errorback = function (err) { return _this._onLoadError(name, externalErrorback, err); }; + this.attachListeners(name, linkNode, callback, errorback); + linkNode.setAttribute('href', cssUrl); + return linkNode; + }; + BrowserCSSLoader.prototype._linkTagExists = function (name, cssUrl) { + var i, len, nameAttr, hrefAttr, links = document.getElementsByTagName('link'); + for (i = 0, len = links.length; i < len; i++) { + nameAttr = links[i].getAttribute('data-name'); + hrefAttr = links[i].getAttribute('href'); + if (nameAttr === name || hrefAttr === cssUrl) { + return true; + } + } + return false; + }; + BrowserCSSLoader.prototype.load = function (name, cssUrl, externalCallback, externalErrorback) { + if (this._linkTagExists(name, cssUrl)) { + externalCallback(); + return; + } + var linkNode = this.createLinkTag(name, cssUrl, externalCallback, externalErrorback); + this._insertLinkNode(linkNode); + }; + return BrowserCSSLoader; + }()); + var NodeCSSLoader = (function () { + function NodeCSSLoader() { + this.fs = require.nodeRequire('fs'); + } + NodeCSSLoader.prototype.load = function (name, cssUrl, externalCallback, externalErrorback) { + var contents = this.fs.readFileSync(cssUrl, 'utf8'); + // Remove BOM + if (contents.charCodeAt(0) === NodeCSSLoader.BOM_CHAR_CODE) { + contents = contents.substring(1); + } + externalCallback(contents); + }; + return NodeCSSLoader; + }()); + NodeCSSLoader.BOM_CHAR_CODE = 65279; + // ------------------------------ Finally, the plugin + var CSSPlugin = (function () { + function CSSPlugin(cssLoader) { + this.cssLoader = cssLoader; + } + CSSPlugin.prototype.load = function (name, req, load, config) { + config = config || {}; + var myConfig = config['vs/css'] || {}; + global.inlineResources = myConfig.inlineResources; + global.inlineResourcesLimit = myConfig.inlineResourcesLimit || 5000; + var cssUrl = req.toUrl(name + '.css'); + this.cssLoader.load(name, cssUrl, function (contents) { + // Contents has the CSS file contents if we are in a build + if (config.isBuild) { + CSSPlugin.BUILD_MAP[name] = contents; + CSSPlugin.BUILD_PATH_MAP[name] = cssUrl; + } + load({}); + }, function (err) { + if (typeof load.error === 'function') { + load.error('Could not find ' + cssUrl + ' or it was empty'); + } + }); + }; + CSSPlugin.prototype.write = function (pluginName, moduleName, write) { + // getEntryPoint is a Monaco extension to r.js + var entryPoint = write.getEntryPoint(); + // r.js destroys the context of this plugin between calling 'write' and 'writeFile' + // so the only option at this point is to leak the data to a global + global.cssPluginEntryPoints = global.cssPluginEntryPoints || {}; + global.cssPluginEntryPoints[entryPoint] = global.cssPluginEntryPoints[entryPoint] || []; + global.cssPluginEntryPoints[entryPoint].push({ + moduleName: moduleName, + contents: CSSPlugin.BUILD_MAP[moduleName], + fsPath: CSSPlugin.BUILD_PATH_MAP[moduleName], + }); + write.asModule(pluginName + '!' + moduleName, 'define([\'vs/css!' + entryPoint + '\'], {});'); + }; + CSSPlugin.prototype.writeFile = function (pluginName, moduleName, req, write, config) { + if (global.cssPluginEntryPoints && global.cssPluginEntryPoints.hasOwnProperty(moduleName)) { + var fileName = req.toUrl(moduleName + '.css'); + var contents = [ + '/*---------------------------------------------------------', + ' * Copyright (c) Microsoft Corporation. All rights reserved.', + ' *--------------------------------------------------------*/' + ], entries = global.cssPluginEntryPoints[moduleName]; + for (var i = 0; i < entries.length; i++) { + if (global.inlineResources) { + contents.push(Utilities.rewriteOrInlineUrls(entries[i].fsPath, entries[i].moduleName, moduleName, entries[i].contents, global.inlineResources === 'base64', global.inlineResourcesLimit)); + } + else { + contents.push(Utilities.rewriteUrls(entries[i].moduleName, moduleName, entries[i].contents)); + } + } + write(fileName, contents.join('\r\n')); + } + }; + CSSPlugin.prototype.getInlinedResources = function () { + return global.cssInlinedResources || []; + }; + return CSSPlugin; + }()); + CSSPlugin.BUILD_MAP = {}; + CSSPlugin.BUILD_PATH_MAP = {}; + CSSBuildLoaderPlugin.CSSPlugin = CSSPlugin; + var Utilities = (function () { + function Utilities() { + } + Utilities.startsWith = function (haystack, needle) { + return haystack.length >= needle.length && haystack.substr(0, needle.length) === needle; + }; + /** + * Find the path of a file. + */ + Utilities.pathOf = function (filename) { + var lastSlash = filename.lastIndexOf('/'); + if (lastSlash !== -1) { + return filename.substr(0, lastSlash + 1); + } + else { + return ''; + } + }; + /** + * A conceptual a + b for paths. + * Takes into account if `a` contains a protocol. + * Also normalizes the result: e.g.: a/b/ + ../c => a/c + */ + Utilities.joinPaths = function (a, b) { + function findSlashIndexAfterPrefix(haystack, prefix) { + if (Utilities.startsWith(haystack, prefix)) { + return Math.max(prefix.length, haystack.indexOf('/', prefix.length)); + } + return 0; + } + var aPathStartIndex = 0; + aPathStartIndex = aPathStartIndex || findSlashIndexAfterPrefix(a, '//'); + aPathStartIndex = aPathStartIndex || findSlashIndexAfterPrefix(a, 'http://'); + aPathStartIndex = aPathStartIndex || findSlashIndexAfterPrefix(a, 'https://'); + function pushPiece(pieces, piece) { + if (piece === './') { + // Ignore + return; + } + if (piece === '../') { + var prevPiece = (pieces.length > 0 ? pieces[pieces.length - 1] : null); + if (prevPiece && prevPiece === '/') { + // Ignore + return; + } + if (prevPiece && prevPiece !== '../') { + // Pop + pieces.pop(); + return; + } + } + // Push + pieces.push(piece); + } + function push(pieces, path) { + while (path.length > 0) { + var slashIndex = path.indexOf('/'); + var piece = (slashIndex >= 0 ? path.substring(0, slashIndex + 1) : path); + path = (slashIndex >= 0 ? path.substring(slashIndex + 1) : ''); + pushPiece(pieces, piece); + } + } + var pieces = []; + push(pieces, a.substr(aPathStartIndex)); + if (b.length > 0 && b.charAt(0) === '/') { + pieces = []; + } + push(pieces, b); + return a.substring(0, aPathStartIndex) + pieces.join(''); + }; + Utilities.commonPrefix = function (str1, str2) { + var len = Math.min(str1.length, str2.length); + for (var i = 0; i < len; i++) { + if (str1.charCodeAt(i) !== str2.charCodeAt(i)) { + break; + } + } + return str1.substring(0, i); + }; + Utilities.commonFolderPrefix = function (fromPath, toPath) { + var prefix = Utilities.commonPrefix(fromPath, toPath); + var slashIndex = prefix.lastIndexOf('/'); + if (slashIndex === -1) { + return ''; + } + return prefix.substring(0, slashIndex + 1); + }; + Utilities.relativePath = function (fromPath, toPath) { + if (Utilities.startsWith(toPath, '/') || Utilities.startsWith(toPath, 'http://') || Utilities.startsWith(toPath, 'https://')) { + return toPath; + } + // Ignore common folder prefix + var prefix = Utilities.commonFolderPrefix(fromPath, toPath); + fromPath = fromPath.substr(prefix.length); + toPath = toPath.substr(prefix.length); + var upCount = fromPath.split('/').length; + var result = ''; + for (var i = 1; i < upCount; i++) { + result += '../'; + } + return result + toPath; + }; + Utilities._replaceURL = function (contents, replacer) { + // Use ")" as the terminator as quotes are oftentimes not used at all + return contents.replace(/url\(\s*([^\)]+)\s*\)?/g, function (_) { + var matches = []; + for (var _i = 1; _i < arguments.length; _i++) { + matches[_i - 1] = arguments[_i]; + } + var url = matches[0]; + // Eliminate starting quotes (the initial whitespace is not captured) + if (url.charAt(0) === '"' || url.charAt(0) === '\'') { + url = url.substring(1); + } + // The ending whitespace is captured + while (url.length > 0 && (url.charAt(url.length - 1) === ' ' || url.charAt(url.length - 1) === '\t')) { + url = url.substring(0, url.length - 1); + } + // Eliminate ending quotes + if (url.charAt(url.length - 1) === '"' || url.charAt(url.length - 1) === '\'') { + url = url.substring(0, url.length - 1); + } + if (!Utilities.startsWith(url, 'data:') && !Utilities.startsWith(url, 'http://') && !Utilities.startsWith(url, 'https://')) { + url = replacer(url); + } + return 'url(' + url + ')'; + }); + }; + Utilities.rewriteUrls = function (originalFile, newFile, contents) { + return this._replaceURL(contents, function (url) { + var absoluteUrl = Utilities.joinPaths(Utilities.pathOf(originalFile), url); + return Utilities.relativePath(newFile, absoluteUrl); + }); + }; + Utilities.rewriteOrInlineUrls = function (originalFileFSPath, originalFile, newFile, contents, forceBase64, inlineByteLimit) { + var fs = require.nodeRequire('fs'); + var path = require.nodeRequire('path'); + return this._replaceURL(contents, function (url) { + if (/\.(svg|png)$/.test(url)) { + var fsPath = path.join(path.dirname(originalFileFSPath), url); + var fileContents = fs.readFileSync(fsPath); + if (fileContents.length < inlineByteLimit) { + global.cssInlinedResources = global.cssInlinedResources || []; + var normalizedFSPath = fsPath.replace(/\\/g, '/'); + if (global.cssInlinedResources.indexOf(normalizedFSPath) >= 0) { + console.warn('CSS INLINING IMAGE AT ' + fsPath + ' MORE THAN ONCE. CONSIDER CONSOLIDATING CSS RULES'); + } + global.cssInlinedResources.push(normalizedFSPath); + var MIME = /\.svg$/.test(url) ? 'image/svg+xml' : 'image/png'; + var DATA = ';base64,' + fileContents.toString('base64'); + if (!forceBase64 && /\.svg$/.test(url)) { + // .svg => url encode as explained at https://codepen.io/tigt/post/optimizing-svgs-in-data-uris + var newText = fileContents.toString() + .replace(/"/g, '\'') + .replace(//g, '%3E') + .replace(/&/g, '%26') + .replace(/#/g, '%23') + .replace(/\s+/g, ' '); + var encodedData = ',' + newText; + if (encodedData.length < DATA.length) { + DATA = encodedData; + } + } + return '"data:' + MIME + DATA + '"'; + } + } + var absoluteUrl = Utilities.joinPaths(Utilities.pathOf(originalFile), url); + return Utilities.relativePath(newFile, absoluteUrl); + }); + }; + return Utilities; + }()); + CSSBuildLoaderPlugin.Utilities = Utilities; + (function () { + var cssLoader = null; + var isElectron = (typeof process !== 'undefined' && typeof process.versions !== 'undefined' && typeof process.versions['electron'] !== 'undefined'); + if (typeof process !== 'undefined' && process.versions && !!process.versions.node && !isElectron) { + cssLoader = new NodeCSSLoader(); + } + else { + cssLoader = new BrowserCSSLoader(); + } + define('vs/css', new CSSPlugin(cssLoader)); + })(); +})(CSSBuildLoaderPlugin || (CSSBuildLoaderPlugin = {})); diff --git a/src/vs/css.js b/src/vs/css.js index d99cc03293241..ae281dacb7bbf 100644 --- a/src/vs/css.js +++ b/src/vs/css.js @@ -14,10 +14,8 @@ *--------------------------------------------------------------------------------------------- *--------------------------------------------------------------------------------------------*/ 'use strict'; -var _cssPluginGlobal = this; var CSSLoaderPlugin; (function (CSSLoaderPlugin) { - var global = _cssPluginGlobal || {}; /** * Known issue: * - In IE there is no way to know if the CSS file loaded successfully or not. @@ -94,38 +92,14 @@ var CSSLoaderPlugin; }; return BrowserCSSLoader; }()); - var NodeCSSLoader = (function () { - function NodeCSSLoader() { - this.fs = require.nodeRequire('fs'); - } - NodeCSSLoader.prototype.load = function (name, cssUrl, externalCallback, externalErrorback) { - var contents = this.fs.readFileSync(cssUrl, 'utf8'); - // Remove BOM - if (contents.charCodeAt(0) === NodeCSSLoader.BOM_CHAR_CODE) { - contents = contents.substring(1); - } - externalCallback(contents); - }; - return NodeCSSLoader; - }()); - NodeCSSLoader.BOM_CHAR_CODE = 65279; // ------------------------------ Finally, the plugin var CSSPlugin = (function () { - function CSSPlugin(cssLoader) { - this.cssLoader = cssLoader; + function CSSPlugin() { + this._cssLoader = new BrowserCSSLoader(); } - CSSPlugin.prototype.load = function (name, req, load, config) { - config = config || {}; - var myConfig = config['vs/css'] || {}; - global.inlineResources = myConfig.inlineResources; - global.inlineResourcesLimit = myConfig.inlineResourcesLimit || 5000; + CSSPlugin.prototype.load = function (name, req, load) { var cssUrl = req.toUrl(name + '.css'); - this.cssLoader.load(name, cssUrl, function (contents) { - // Contents has the CSS file contents if we are in a build - if (config.isBuild) { - CSSPlugin.BUILD_MAP[name] = contents; - CSSPlugin.BUILD_PATH_MAP[name] = cssUrl; - } + this._cssLoader.load(name, cssUrl, function (contents) { load({}); }, function (err) { if (typeof load.error === 'function') { @@ -133,230 +107,15 @@ var CSSLoaderPlugin; } }); }; - CSSPlugin.prototype.write = function (pluginName, moduleName, write) { - // getEntryPoint is a Monaco extension to r.js - var entryPoint = write.getEntryPoint(); - // r.js destroys the context of this plugin between calling 'write' and 'writeFile' - // so the only option at this point is to leak the data to a global - global.cssPluginEntryPoints = global.cssPluginEntryPoints || {}; - global.cssPluginEntryPoints[entryPoint] = global.cssPluginEntryPoints[entryPoint] || []; - global.cssPluginEntryPoints[entryPoint].push({ - moduleName: moduleName, - contents: CSSPlugin.BUILD_MAP[moduleName], - fsPath: CSSPlugin.BUILD_PATH_MAP[moduleName], - }); - write.asModule(pluginName + '!' + moduleName, 'define([\'vs/css!' + entryPoint + '\'], {});'); - }; - CSSPlugin.prototype.writeFile = function (pluginName, moduleName, req, write, config) { - if (global.cssPluginEntryPoints && global.cssPluginEntryPoints.hasOwnProperty(moduleName)) { - var fileName = req.toUrl(moduleName + '.css'); - var contents = [ - '/*---------------------------------------------------------', - ' * Copyright (c) Microsoft Corporation. All rights reserved.', - ' *--------------------------------------------------------*/' - ], entries = global.cssPluginEntryPoints[moduleName]; - for (var i = 0; i < entries.length; i++) { - if (global.inlineResources) { - contents.push(Utilities.rewriteOrInlineUrls(entries[i].fsPath, entries[i].moduleName, moduleName, entries[i].contents, global.inlineResources === 'base64', global.inlineResourcesLimit)); - } - else { - contents.push(Utilities.rewriteUrls(entries[i].moduleName, moduleName, entries[i].contents)); - } - } - write(fileName, contents.join('\r\n')); - } - }; - CSSPlugin.prototype.getInlinedResources = function () { - return global.cssInlinedResources || []; - }; return CSSPlugin; }()); - CSSPlugin.BUILD_MAP = {}; - CSSPlugin.BUILD_PATH_MAP = {}; CSSLoaderPlugin.CSSPlugin = CSSPlugin; - var Utilities = (function () { - function Utilities() { - } - Utilities.startsWith = function (haystack, needle) { - return haystack.length >= needle.length && haystack.substr(0, needle.length) === needle; - }; - /** - * Find the path of a file. - */ - Utilities.pathOf = function (filename) { - var lastSlash = filename.lastIndexOf('/'); - if (lastSlash !== -1) { - return filename.substr(0, lastSlash + 1); - } - else { - return ''; - } - }; - /** - * A conceptual a + b for paths. - * Takes into account if `a` contains a protocol. - * Also normalizes the result: e.g.: a/b/ + ../c => a/c - */ - Utilities.joinPaths = function (a, b) { - function findSlashIndexAfterPrefix(haystack, prefix) { - if (Utilities.startsWith(haystack, prefix)) { - return Math.max(prefix.length, haystack.indexOf('/', prefix.length)); - } - return 0; - } - var aPathStartIndex = 0; - aPathStartIndex = aPathStartIndex || findSlashIndexAfterPrefix(a, '//'); - aPathStartIndex = aPathStartIndex || findSlashIndexAfterPrefix(a, 'http://'); - aPathStartIndex = aPathStartIndex || findSlashIndexAfterPrefix(a, 'https://'); - function pushPiece(pieces, piece) { - if (piece === './') { - // Ignore - return; - } - if (piece === '../') { - var prevPiece = (pieces.length > 0 ? pieces[pieces.length - 1] : null); - if (prevPiece && prevPiece === '/') { - // Ignore - return; - } - if (prevPiece && prevPiece !== '../') { - // Pop - pieces.pop(); - return; - } - } - // Push - pieces.push(piece); - } - function push(pieces, path) { - while (path.length > 0) { - var slashIndex = path.indexOf('/'); - var piece = (slashIndex >= 0 ? path.substring(0, slashIndex + 1) : path); - path = (slashIndex >= 0 ? path.substring(slashIndex + 1) : ''); - pushPiece(pieces, piece); - } - } - var pieces = []; - push(pieces, a.substr(aPathStartIndex)); - if (b.length > 0 && b.charAt(0) === '/') { - pieces = []; - } - push(pieces, b); - return a.substring(0, aPathStartIndex) + pieces.join(''); - }; - Utilities.commonPrefix = function (str1, str2) { - var len = Math.min(str1.length, str2.length); - for (var i = 0; i < len; i++) { - if (str1.charCodeAt(i) !== str2.charCodeAt(i)) { - break; - } - } - return str1.substring(0, i); - }; - Utilities.commonFolderPrefix = function (fromPath, toPath) { - var prefix = Utilities.commonPrefix(fromPath, toPath); - var slashIndex = prefix.lastIndexOf('/'); - if (slashIndex === -1) { - return ''; - } - return prefix.substring(0, slashIndex + 1); - }; - Utilities.relativePath = function (fromPath, toPath) { - if (Utilities.startsWith(toPath, '/') || Utilities.startsWith(toPath, 'http://') || Utilities.startsWith(toPath, 'https://')) { - return toPath; - } - // Ignore common folder prefix - var prefix = Utilities.commonFolderPrefix(fromPath, toPath); - fromPath = fromPath.substr(prefix.length); - toPath = toPath.substr(prefix.length); - var upCount = fromPath.split('/').length; - var result = ''; - for (var i = 1; i < upCount; i++) { - result += '../'; - } - return result + toPath; - }; - Utilities._replaceURL = function (contents, replacer) { - // Use ")" as the terminator as quotes are oftentimes not used at all - return contents.replace(/url\(\s*([^\)]+)\s*\)?/g, function (_) { - var matches = []; - for (var _i = 1; _i < arguments.length; _i++) { - matches[_i - 1] = arguments[_i]; - } - var url = matches[0]; - // Eliminate starting quotes (the initial whitespace is not captured) - if (url.charAt(0) === '"' || url.charAt(0) === '\'') { - url = url.substring(1); - } - // The ending whitespace is captured - while (url.length > 0 && (url.charAt(url.length - 1) === ' ' || url.charAt(url.length - 1) === '\t')) { - url = url.substring(0, url.length - 1); - } - // Eliminate ending quotes - if (url.charAt(url.length - 1) === '"' || url.charAt(url.length - 1) === '\'') { - url = url.substring(0, url.length - 1); - } - if (!Utilities.startsWith(url, 'data:') && !Utilities.startsWith(url, 'http://') && !Utilities.startsWith(url, 'https://')) { - url = replacer(url); - } - return 'url(' + url + ')'; - }); - }; - Utilities.rewriteUrls = function (originalFile, newFile, contents) { - return this._replaceURL(contents, function (url) { - var absoluteUrl = Utilities.joinPaths(Utilities.pathOf(originalFile), url); - return Utilities.relativePath(newFile, absoluteUrl); - }); - }; - Utilities.rewriteOrInlineUrls = function (originalFileFSPath, originalFile, newFile, contents, forceBase64, inlineByteLimit) { - var fs = require.nodeRequire('fs'); - var path = require.nodeRequire('path'); - return this._replaceURL(contents, function (url) { - if (/\.(svg|png)$/.test(url)) { - var fsPath = path.join(path.dirname(originalFileFSPath), url); - var fileContents = fs.readFileSync(fsPath); - if (fileContents.length < inlineByteLimit) { - global.cssInlinedResources = global.cssInlinedResources || []; - var normalizedFSPath = fsPath.replace(/\\/g, '/'); - if (global.cssInlinedResources.indexOf(normalizedFSPath) >= 0) { - console.warn('CSS INLINING IMAGE AT ' + fsPath + ' MORE THAN ONCE. CONSIDER CONSOLIDATING CSS RULES'); - } - global.cssInlinedResources.push(normalizedFSPath); - var MIME = /\.svg$/.test(url) ? 'image/svg+xml' : 'image/png'; - var DATA = ';base64,' + fileContents.toString('base64'); - if (!forceBase64 && /\.svg$/.test(url)) { - // .svg => url encode as explained at https://codepen.io/tigt/post/optimizing-svgs-in-data-uris - var newText = fileContents.toString() - .replace(/"/g, '\'') - .replace(//g, '%3E') - .replace(/&/g, '%26') - .replace(/#/g, '%23') - .replace(/\s+/g, ' '); - var encodedData = ',' + newText; - if (encodedData.length < DATA.length) { - DATA = encodedData; - } - } - return '"data:' + MIME + DATA + '"'; - } - } - var absoluteUrl = Utilities.joinPaths(Utilities.pathOf(originalFile), url); - return Utilities.relativePath(newFile, absoluteUrl); - }); - }; - return Utilities; - }()); - CSSLoaderPlugin.Utilities = Utilities; - (function () { - var cssLoader = null; - var isElectron = (typeof process !== 'undefined' && typeof process.versions !== 'undefined' && typeof process.versions['electron'] !== 'undefined'); - if (typeof process !== 'undefined' && process.versions && !!process.versions.node && !isElectron) { - cssLoader = new NodeCSSLoader(); - } - else { - cssLoader = new BrowserCSSLoader(); - } - define('vs/css', new CSSPlugin(cssLoader)); - })(); + function init() { + define('vs/css', new CSSPlugin()); + } + CSSLoaderPlugin.init = init; + ; + if (typeof doNotInitLoader === 'undefined') { + init(); + } })(CSSLoaderPlugin || (CSSLoaderPlugin = {})); diff --git a/src/vs/editor/browser/codeEditor.ts b/src/vs/editor/browser/codeEditor.ts index 721d90d9bdd45..77271726ba2bc 100644 --- a/src/vs/editor/browser/codeEditor.ts +++ b/src/vs/editor/browser/codeEditor.ts @@ -13,6 +13,7 @@ import { CodeEditorWidget } from 'vs/editor/browser/widget/codeEditorWidget'; import { EditorAction, CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; import { EditorBrowserRegistry } from 'vs/editor/browser/editorBrowserExtensions'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; export class CodeEditor extends CodeEditorWidget { @@ -22,9 +23,10 @@ export class CodeEditor extends CodeEditorWidget { @IInstantiationService instantiationService: IInstantiationService, @ICodeEditorService codeEditorService: ICodeEditorService, @ICommandService commandService: ICommandService, - @IContextKeyService contextKeyService: IContextKeyService + @IContextKeyService contextKeyService: IContextKeyService, + @IThemeService themeService: IThemeService ) { - super(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService); + super(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService, themeService); } protected _getContributions(): IEditorContributionCtor[] { diff --git a/src/vs/editor/browser/config/charWidthReader.ts b/src/vs/editor/browser/config/charWidthReader.ts index d1e0b07bf1ecb..6e5d782a037f6 100644 --- a/src/vs/editor/browser/config/charWidthReader.ts +++ b/src/vs/editor/browser/config/charWidthReader.ts @@ -77,6 +77,7 @@ class DomCharWidthReader implements ICharWidthReader { regularDomNode.style.fontWeight = this._bareFontInfo.fontWeight; regularDomNode.style.fontSize = this._bareFontInfo.fontSize + 'px'; regularDomNode.style.lineHeight = this._bareFontInfo.lineHeight + 'px'; + regularDomNode.style.letterSpacing = this._bareFontInfo.letterSpacing + 'px'; container.appendChild(regularDomNode); let boldDomNode = document.createElement('div'); @@ -84,6 +85,7 @@ class DomCharWidthReader implements ICharWidthReader { boldDomNode.style.fontWeight = 'bold'; boldDomNode.style.fontSize = this._bareFontInfo.fontSize + 'px'; boldDomNode.style.lineHeight = this._bareFontInfo.lineHeight + 'px'; + boldDomNode.style.letterSpacing = this._bareFontInfo.letterSpacing + 'px'; container.appendChild(boldDomNode); let italicDomNode = document.createElement('div'); @@ -91,6 +93,7 @@ class DomCharWidthReader implements ICharWidthReader { italicDomNode.style.fontWeight = this._bareFontInfo.fontWeight; italicDomNode.style.fontSize = this._bareFontInfo.fontSize + 'px'; italicDomNode.style.lineHeight = this._bareFontInfo.lineHeight + 'px'; + italicDomNode.style.letterSpacing = this._bareFontInfo.letterSpacing + 'px'; italicDomNode.style.fontStyle = 'italic'; container.appendChild(italicDomNode); diff --git a/src/vs/editor/browser/config/configuration.ts b/src/vs/editor/browser/config/configuration.ts index 23a4a86c292d9..0a7787b49260b 100644 --- a/src/vs/editor/browser/config/configuration.ts +++ b/src/vs/editor/browser/config/configuration.ts @@ -8,7 +8,7 @@ import Event, { Emitter } from 'vs/base/common/event'; import { Disposable } from 'vs/base/common/lifecycle'; import * as platform from 'vs/base/common/platform'; import * as browser from 'vs/base/browser/browser'; -import { CommonEditorConfiguration } from 'vs/editor/common/config/commonEditorConfig'; +import { CommonEditorConfiguration, IEnvConfiguration } from 'vs/editor/common/config/commonEditorConfig'; import { IDimension } from 'vs/editor/common/editorCommon'; import { FontInfo, BareFontInfo } from 'vs/editor/common/config/fontInfo'; import { ElementSizeObserver } from 'vs/editor/browser/config/elementSizeObserver'; @@ -90,6 +90,7 @@ export interface ISerializedFontInfo { readonly fontWeight: string; readonly fontSize: number; readonly lineHeight: number; + readonly letterSpacing: number; readonly isMonospace: boolean; readonly typicalHalfwidthCharacterWidth: number; readonly typicalFullwidthCharacterWidth: number; @@ -102,7 +103,7 @@ class CSSBasedConfiguration extends Disposable { public static INSTANCE = new CSSBasedConfiguration(); private _cache: CSSBasedConfigurationCache; - private _changeMonitorTimeout: number = -1; + private _evictUntrustedReadingsTimeout: number; private _onDidChange = this._register(new Emitter()); public onDidChange: Event = this._onDidChange.event; @@ -111,16 +112,44 @@ class CSSBasedConfiguration extends Disposable { super(); this._cache = new CSSBasedConfigurationCache(); + this._evictUntrustedReadingsTimeout = -1; } public dispose(): void { - if (this._changeMonitorTimeout !== -1) { - clearTimeout(this._changeMonitorTimeout); - this._changeMonitorTimeout = -1; + if (this._evictUntrustedReadingsTimeout !== -1) { + clearTimeout(this._evictUntrustedReadingsTimeout); + this._evictUntrustedReadingsTimeout = -1; } super.dispose(); } + private _writeToCache(item: BareFontInfo, value: FontInfo): void { + this._cache.put(item, value); + + if (!value.isTrusted && this._evictUntrustedReadingsTimeout === -1) { + // Try reading again after some time + this._evictUntrustedReadingsTimeout = setTimeout(() => { + this._evictUntrustedReadingsTimeout = -1; + this._evictUntrustedReadings(); + }, 5000); + } + } + + private _evictUntrustedReadings(): void { + let values = this._cache.getValues(); + let somethingRemoved = false; + for (let i = 0, len = values.length; i < len; i++) { + let item = values[i]; + if (!item.isTrusted) { + somethingRemoved = true; + this._cache.remove(item); + } + } + if (somethingRemoved) { + this._onDidChange.fire(); + } + } + public saveFontInfo(): ISerializedFontInfo[] { // Only save trusted font info (that has been measured in this running instance) return this._cache.getValues().filter(item => item.isTrusted); @@ -131,25 +160,8 @@ class CSSBasedConfiguration extends Disposable { // The reason for this is that a font might have been installed on the OS in the meantime. for (let i = 0, len = savedFontInfo.length; i < len; i++) { let fontInfo = new FontInfo(savedFontInfo[i], false); - this._cache.put(fontInfo, fontInfo); + this._writeToCache(fontInfo, fontInfo); } - - // Remove saved font info that does not have the trusted flag. - // (this forces it to be re-read). - setTimeout(() => { - let values = this._cache.getValues(); - let somethingRemoved = false; - for (let i = 0, len = values.length; i < len; i++) { - let item = values[i]; - if (!item.isTrusted) { - somethingRemoved = true; - this._cache.remove(item); - } - } - if (somethingRemoved) { - this._onDidChange.fire(); - } - }, 5000); } public readConfiguration(bareFontInfo: BareFontInfo): FontInfo { @@ -164,50 +176,20 @@ class CSSBasedConfiguration extends Disposable { fontWeight: readConfig.fontWeight, fontSize: readConfig.fontSize, lineHeight: readConfig.lineHeight, + letterSpacing: readConfig.letterSpacing, isMonospace: readConfig.isMonospace, typicalHalfwidthCharacterWidth: Math.max(readConfig.typicalHalfwidthCharacterWidth, 5), typicalFullwidthCharacterWidth: Math.max(readConfig.typicalFullwidthCharacterWidth, 5), spaceWidth: Math.max(readConfig.spaceWidth, 5), maxDigitWidth: Math.max(readConfig.maxDigitWidth, 5), - }, true); - this._installChangeMonitor(); + }, false); } - this._cache.put(bareFontInfo, readConfig); + this._writeToCache(bareFontInfo, readConfig); } return this._cache.get(bareFontInfo); } - private _installChangeMonitor(): void { - if (this._changeMonitorTimeout === -1) { - this._changeMonitorTimeout = setTimeout(() => { - this._changeMonitorTimeout = -1; - this._monitorForChanges(); - }, 500); - } - } - - private _monitorForChanges(): void { - let shouldInstallChangeMonitor = false; - let keys = this._cache.getKeys(); - for (let i = 0; i < keys.length; i++) { - let styling = keys[i]; - - let newValue = CSSBasedConfiguration._actualReadConfiguration(styling); - - if (newValue.typicalHalfwidthCharacterWidth <= 2 || newValue.typicalFullwidthCharacterWidth <= 2 || newValue.maxDigitWidth <= 2) { - // We still couldn't read the CSS config - shouldInstallChangeMonitor = true; - } else { - this._cache.put(styling, newValue); - this._onDidChange.fire(); - } - } - if (shouldInstallChangeMonitor) { - this._installChangeMonitor(); - } - } - private static createRequest(chr: string, type: CharWidthRequestType, all: CharWidthRequest[], monospace: CharWidthRequest[]): CharWidthRequest { let result = new CharWidthRequest(chr, type); all.push(result); @@ -278,18 +260,21 @@ class CSSBasedConfiguration extends Disposable { } } + // let's trust the zoom level only 2s after it was changed. + const canTrustBrowserZoomLevel = (browser.getTimeSinceLastZoomLevelChanged() > 2000); return new FontInfo({ zoomLevel: browser.getZoomLevel(), fontFamily: bareFontInfo.fontFamily, fontWeight: bareFontInfo.fontWeight, fontSize: bareFontInfo.fontSize, lineHeight: bareFontInfo.lineHeight, + letterSpacing: bareFontInfo.letterSpacing, isMonospace: isMonospace, typicalHalfwidthCharacterWidth: typicalHalfwidthCharacter.width, typicalFullwidthCharacterWidth: typicalFullwidthCharacter.width, spaceWidth: space.width, maxDigitWidth: maxDigitWidth - }, true); + }, canTrustBrowserZoomLevel); } } @@ -300,6 +285,7 @@ export class Configuration extends CommonEditorConfiguration { domNode.style.fontWeight = fontInfo.fontWeight; domNode.style.fontSize = fontInfo.fontSize + 'px'; domNode.style.lineHeight = fontInfo.lineHeight + 'px'; + domNode.style.letterSpacing = fontInfo.letterSpacing + 'px'; } public static applyFontInfo(domNode: FastDomNode, fontInfo: BareFontInfo): void { @@ -307,18 +293,26 @@ export class Configuration extends CommonEditorConfiguration { domNode.setFontWeight(fontInfo.fontWeight); domNode.setFontSize(fontInfo.fontSize); domNode.setLineHeight(fontInfo.lineHeight); + domNode.setLetterSpacing(fontInfo.letterSpacing); } + private readonly _elementSizeObserver: ElementSizeObserver; + constructor(options: IEditorOptions, referenceDomElement: HTMLElement = null) { - super(options, new ElementSizeObserver(referenceDomElement, () => this._onReferenceDomElementSizeChanged())); + super(options); + + this._elementSizeObserver = this._register(new ElementSizeObserver(referenceDomElement, () => this._onReferenceDomElementSizeChanged())); this._register(CSSBasedConfiguration.INSTANCE.onDidChange(() => this._onCSSBasedConfigurationChanged())); - if (this._configWithDefaults.getEditorOptions().automaticLayout) { + if (this._validatedOptions.automaticLayout) { this._elementSizeObserver.startObserving(); } this._register(browser.onDidChangeZoomLevel(_ => this._recomputeOptions())); + this._register(browser.onDidChangeAccessibilitySupport(() => this._recomputeOptions())); + + this._recomputeOptions(); } private _onReferenceDomElementSizeChanged(): void { @@ -334,11 +328,10 @@ export class Configuration extends CommonEditorConfiguration { } public dispose(): void { - this._elementSizeObserver.dispose(); super.dispose(); } - protected _getEditorClassName(theme: string, fontLigatures: boolean, mouseStyle: 'text' | 'default' | 'copy'): string { + private _getExtraEditorClassName(): string { let extra = ''; if (browser.isIE) { extra += 'ie '; @@ -350,38 +343,22 @@ export class Configuration extends CommonEditorConfiguration { if (platform.isMacintosh) { extra += 'mac '; } - if (fontLigatures) { - extra += 'enable-ligatures '; - } - if (mouseStyle === 'default') { - extra += 'mouse-default '; - } else if (mouseStyle === 'copy') { - extra += 'mouse-copy '; - } - return 'monaco-editor ' + extra + theme; + return extra; } - protected getOuterWidth(): number { - return this._elementSizeObserver.getWidth(); - } - - protected getOuterHeight(): number { - return this._elementSizeObserver.getHeight(); - } - - protected _getCanUseTranslate3d(): boolean { - return browser.canUseTranslate3d(); - } - - protected _getPixelRatio(): number { - return browser.getPixelRatio(); + protected _getEnvConfiguration(): IEnvConfiguration { + return { + extraEditorClassName: this._getExtraEditorClassName(), + outerWidth: this._elementSizeObserver.getWidth(), + outerHeight: this._elementSizeObserver.getHeight(), + emptySelectionClipboard: browser.isWebKit, + pixelRatio: browser.getPixelRatio(), + zoomLevel: browser.getZoomLevel(), + accessibilitySupport: browser.getAccessibilitySupport() + }; } protected readConfiguration(bareFontInfo: BareFontInfo): FontInfo { return CSSBasedConfiguration.INSTANCE.readConfiguration(bareFontInfo); } - - protected getZoomLevel(): number { - return browser.getZoomLevel(); - } } diff --git a/src/vs/editor/browser/config/elementSizeObserver.ts b/src/vs/editor/browser/config/elementSizeObserver.ts index ee21f6c21bda6..bd8814cace914 100644 --- a/src/vs/editor/browser/config/elementSizeObserver.ts +++ b/src/vs/editor/browser/config/elementSizeObserver.ts @@ -6,9 +6,8 @@ import { Disposable } from 'vs/base/common/lifecycle'; import { IDimension } from 'vs/editor/common/editorCommon'; -import { IElementSizeObserver } from 'vs/editor/common/config/commonEditorConfig'; -export class ElementSizeObserver extends Disposable implements IElementSizeObserver { +export class ElementSizeObserver extends Disposable { private referenceDomElement: HTMLElement; private measureReferenceDomElementToken: number; diff --git a/src/vs/editor/browser/controller/input/textAreaWrapper.ts b/src/vs/editor/browser/controller/input/textAreaWrapper.ts deleted file mode 100644 index ab895c1831f60..0000000000000 --- a/src/vs/editor/browser/controller/input/textAreaWrapper.ts +++ /dev/null @@ -1,202 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import Event, { Emitter } from 'vs/base/common/event'; -import { Disposable } from 'vs/base/common/lifecycle'; -import * as browser from 'vs/base/browser/browser'; -import * as dom from 'vs/base/browser/dom'; -import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; -import { IClipboardEvent, ICompositionEvent, IKeyboardEventWrapper, ITextAreaWrapper } from 'vs/editor/common/controller/textAreaState'; -import { FastDomNode } from 'vs/base/browser/fastDomNode'; - -class ClipboardEventWrapper implements IClipboardEvent { - - private _event: ClipboardEvent; - - constructor(event: ClipboardEvent) { - this._event = event; - } - - public canUseTextData(): boolean { - if (this._event.clipboardData) { - return true; - } - if ((window).clipboardData) { - return true; - } - return false; - } - - public setTextData(text: string, richText: string): void { - if (this._event.clipboardData) { - this._event.clipboardData.setData('text/plain', text); - if (richText !== null) { - this._event.clipboardData.setData('text/html', richText); - } - this._event.preventDefault(); - return; - } - - if ((window).clipboardData) { - (window).clipboardData.setData('Text', text); - this._event.preventDefault(); - return; - } - - throw new Error('ClipboardEventWrapper.setTextData: Cannot use text data!'); - } - - public getTextData(): string { - if (this._event.clipboardData) { - this._event.preventDefault(); - return this._event.clipboardData.getData('text/plain'); - } - - if ((window).clipboardData) { - this._event.preventDefault(); - return (window).clipboardData.getData('Text'); - } - - throw new Error('ClipboardEventWrapper.getTextData: Cannot use text data!'); - } -} - -class KeyboardEventWrapper implements IKeyboardEventWrapper { - - public _actual: IKeyboardEvent; - - constructor(actual: IKeyboardEvent) { - this._actual = actual; - } - - public equals(keybinding: number): boolean { - return this._actual.equals(keybinding); - } - - public preventDefault(): void { - this._actual.preventDefault(); - } - - public stopPropagation(): void { - this._actual.stopPropagation(); - } - - public isDefaultPrevented(): boolean { - if (this._actual.browserEvent) { - return this._actual.browserEvent.defaultPrevented; - } - return false; - } -} - -export class TextAreaWrapper extends Disposable implements ITextAreaWrapper { - - private _textArea: FastDomNode; - - private _onKeyDown = this._register(new Emitter()); - public onKeyDown: Event = this._onKeyDown.event; - - private _onKeyUp = this._register(new Emitter()); - public onKeyUp: Event = this._onKeyUp.event; - - private _onKeyPress = this._register(new Emitter()); - public onKeyPress: Event = this._onKeyPress.event; - - private _onCompositionStart = this._register(new Emitter()); - public onCompositionStart: Event = this._onCompositionStart.event; - - private _onCompositionUpdate = this._register(new Emitter()); - public onCompositionUpdate: Event = this._onCompositionUpdate.event; - - private _onCompositionEnd = this._register(new Emitter()); - public onCompositionEnd: Event = this._onCompositionEnd.event; - - private _onInput = this._register(new Emitter()); - public onInput: Event = this._onInput.event; - - private _onCut = this._register(new Emitter()); - public onCut: Event = this._onCut.event; - - private _onCopy = this._register(new Emitter()); - public onCopy: Event = this._onCopy.event; - - private _onPaste = this._register(new Emitter()); - public onPaste: Event = this._onPaste.event; - - constructor(_textArea: FastDomNode) { - super(); - this._textArea = _textArea; - - const textArea = this._textArea.domNode; - this._register(dom.addStandardDisposableListener(textArea, 'keydown', (e) => this._onKeyDown.fire(new KeyboardEventWrapper(e)))); - this._register(dom.addStandardDisposableListener(textArea, 'keyup', (e) => this._onKeyUp.fire(new KeyboardEventWrapper(e)))); - this._register(dom.addStandardDisposableListener(textArea, 'keypress', (e) => this._onKeyPress.fire(new KeyboardEventWrapper(e)))); - this._register(dom.addDisposableListener(textArea, 'compositionstart', (e) => this._onCompositionStart.fire(e))); - this._register(dom.addDisposableListener(textArea, 'compositionupdate', (e) => this._onCompositionUpdate.fire(e))); - this._register(dom.addDisposableListener(textArea, 'compositionend', (e) => this._onCompositionEnd.fire(e))); - this._register(dom.addDisposableListener(textArea, 'input', (e) => this._onInput.fire())); - this._register(dom.addDisposableListener(textArea, 'cut', (e: ClipboardEvent) => this._onCut.fire(new ClipboardEventWrapper(e)))); - this._register(dom.addDisposableListener(textArea, 'copy', (e: ClipboardEvent) => this._onCopy.fire(new ClipboardEventWrapper(e)))); - this._register(dom.addDisposableListener(textArea, 'paste', (e: ClipboardEvent) => this._onPaste.fire(new ClipboardEventWrapper(e)))); - } - - public get actual(): FastDomNode { - return this._textArea; - } - - public getValue(): string { - // console.log('current value: ' + this._textArea.value); - const textArea = this._textArea.domNode; - return textArea.value; - } - - public setValue(reason: string, value: string): void { - // console.log('reason: ' + reason + ', current value: ' + this._textArea.value + ' => new value: ' + value); - const textArea = this._textArea.domNode; - textArea.value = value; - } - - public getSelectionStart(): number { - const textArea = this._textArea.domNode; - return textArea.selectionStart; - } - - public getSelectionEnd(): number { - const textArea = this._textArea.domNode; - return textArea.selectionEnd; - } - - public setSelectionRange(selectionStart: number, selectionEnd: number): void { - const textArea = this._textArea.domNode; - const activeElement = document.activeElement; - if (activeElement === textArea) { - textArea.setSelectionRange(selectionStart, selectionEnd); - } else { - this._setSelectionRangeJumpy(selectionStart, selectionEnd); - } - } - - private _setSelectionRangeJumpy(selectionStart: number, selectionEnd: number): void { - const textArea = this._textArea.domNode; - try { - let scrollState = dom.saveParentsScrollTop(textArea); - textArea.focus(); - textArea.setSelectionRange(selectionStart, selectionEnd); - dom.restoreParentsScrollTop(textArea, scrollState); - } catch (e) { - // Sometimes IE throws when setting selection (e.g. textarea is off-DOM) - console.log('an error has been thrown!'); - } - } - - public isInOverwriteMode(): boolean { - // In IE, pressing Insert will bring the typing into overwrite mode - if (browser.isIE && document.queryCommandValue('OverWrite')) { - return true; - } - return false; - } -} diff --git a/src/vs/editor/browser/controller/keyboardHandler.ts b/src/vs/editor/browser/controller/keyboardHandler.ts deleted file mode 100644 index e138406fa13a5..0000000000000 --- a/src/vs/editor/browser/controller/keyboardHandler.ts +++ /dev/null @@ -1,225 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import * as browser from 'vs/base/browser/browser'; -import * as dom from 'vs/base/browser/dom'; -import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; -import { GlobalScreenReaderNVDA } from 'vs/editor/common/config/commonEditorConfig'; -import { TextAreaHandler } from 'vs/editor/common/controller/textAreaHandler'; -import { TextAreaStrategy } from 'vs/editor/common/controller/textAreaState'; -import { Range } from 'vs/editor/common/core/range'; -import { ViewEventHandler } from 'vs/editor/common/viewModel/viewEventHandler'; -import { Configuration } from 'vs/editor/browser/config/configuration'; -import { ViewContext } from 'vs/editor/common/view/viewContext'; -import { HorizontalRange } from 'vs/editor/common/view/renderingContext'; -import { TextAreaWrapper } from 'vs/editor/browser/controller/input/textAreaWrapper'; -import * as viewEvents from 'vs/editor/common/view/viewEvents'; -import { FastDomNode } from 'vs/base/browser/fastDomNode'; -import { VerticalRevealType } from 'vs/editor/common/controller/cursorEvents'; -import { ViewController } from 'vs/editor/browser/view/viewController'; - -export interface IKeyboardHandlerHelper { - viewDomNode: FastDomNode; - textArea: FastDomNode; - visibleRangeForPositionRelativeToEditor(lineNumber: number, column: number): HorizontalRange; - getVerticalOffsetForLineNumber(lineNumber: number): number; -} - -class TextAreaVisiblePosition { - _textAreaVisiblePosition: void; - - public readonly top: number; - public readonly left: number; - - constructor(top: number, left: number) { - this.top = top; - this.left = left; - } -} -export class KeyboardHandler extends ViewEventHandler { - - private _context: ViewContext; - private viewController: ViewController; - private viewHelper: IKeyboardHandlerHelper; - private textArea: TextAreaWrapper; - private textAreaHandler: TextAreaHandler; - - private contentLeft: number; - private contentWidth: number; - private scrollLeft: number; - private scrollTop: number; - - private visiblePosition: TextAreaVisiblePosition; - - constructor(context: ViewContext, viewController: ViewController, viewHelper: IKeyboardHandlerHelper) { - super(); - - this._context = context; - this.viewController = viewController; - this.textArea = new TextAreaWrapper(viewHelper.textArea); - Configuration.applyFontInfo(this.textArea.actual, this._context.configuration.editor.fontInfo); - this.viewHelper = viewHelper; - this.visiblePosition = null; - - this.contentLeft = this._context.configuration.editor.layoutInfo.contentLeft; - this.contentWidth = this._context.configuration.editor.layoutInfo.contentWidth; - this.scrollLeft = 0; - this.scrollTop = 0; - - this.textAreaHandler = new TextAreaHandler(browser, this._getStrategy(), this.textArea, this._context.model); - - this._register(this.textAreaHandler.onKeyDown((e) => this.viewController.emitKeyDown(e._actual))); - this._register(this.textAreaHandler.onKeyUp((e) => this.viewController.emitKeyUp(e._actual))); - this._register(this.textAreaHandler.onPaste((e) => this.viewController.paste('keyboard', e.text, e.pasteOnNewLine))); - this._register(this.textAreaHandler.onCut((e) => this.viewController.cut('keyboard'))); - this._register(this.textAreaHandler.onType((e) => { - if (e.replaceCharCnt) { - this.viewController.replacePreviousChar('keyboard', e.text, e.replaceCharCnt); - } else { - this.viewController.type('keyboard', e.text); - } - })); - this._register(this.textAreaHandler.onCompositionStart((e) => { - const lineNumber = e.showAtLineNumber; - const column = e.showAtColumn; - - this._context.privateViewEventBus.emit(new viewEvents.ViewRevealRangeRequestEvent( - new Range(lineNumber, column, lineNumber, column), - VerticalRevealType.Simple, - true - )); - - // Find range pixel position - const visibleRange = this.viewHelper.visibleRangeForPositionRelativeToEditor(lineNumber, column); - - if (visibleRange) { - this.visiblePosition = new TextAreaVisiblePosition( - this.viewHelper.getVerticalOffsetForLineNumber(lineNumber), - visibleRange.left - ); - this.textArea.actual.setTop(this.visiblePosition.top - this.scrollTop); - this.textArea.actual.setLeft(this.contentLeft + this.visiblePosition.left - this.scrollLeft); - } - - // Show the textarea - this.textArea.actual.setHeight(this._context.configuration.editor.lineHeight); - this.viewHelper.viewDomNode.addClassName('ime-input'); - - this.viewController.compositionStart('keyboard'); - })); - - this._register(this.textAreaHandler.onCompositionUpdate((e) => { - if (browser.isEdgeOrIE) { - // Due to isEdgeOrIE (where the textarea was not cleared initially) - // we cannot assume the text consists only of the composited text - this.textArea.actual.setWidth(0); - } else { - // adjust width by its size - let canvasElem = document.createElement('canvas'); - let context = canvasElem.getContext('2d'); - let cs = dom.getComputedStyle(this.textArea.actual.domNode); - if (browser.isFirefox) { - // computedStyle.font is empty in Firefox... - context.font = `${cs.fontStyle} ${cs.fontVariant} ${cs.fontWeight} ${cs.fontStretch} ${cs.fontSize} / ${cs.lineHeight} ${cs.fontFamily}`; - let metrics = context.measureText(e.data); - this.textArea.actual.setWidth(metrics.width + 2); // +2 for Japanese... - } else { - context.font = cs.font; - let metrics = context.measureText(e.data); - this.textArea.actual.setWidth(metrics.width); - } - } - })); - - this._register(this.textAreaHandler.onCompositionEnd((e) => { - this.textArea.actual.unsetHeight(); - this.textArea.actual.unsetWidth(); - this.textArea.actual.setLeft(0); - this.textArea.actual.setTop(0); - this.viewHelper.viewDomNode.removeClassName('ime-input'); - - this.visiblePosition = null; - - this.viewController.compositionEnd('keyboard'); - })); - this._register(GlobalScreenReaderNVDA.onChange((value) => { - this.textAreaHandler.setStrategy(this._getStrategy()); - })); - - - this._context.addEventHandler(this); - } - - public dispose(): void { - this._context.removeEventHandler(this); - this.textAreaHandler.dispose(); - this.textArea.dispose(); - super.dispose(); - } - - private _getStrategy(): TextAreaStrategy { - if (GlobalScreenReaderNVDA.getValue()) { - return TextAreaStrategy.NVDA; - } - if (this._context.configuration.editor.viewInfo.experimentalScreenReader) { - return TextAreaStrategy.NVDA; - } - return TextAreaStrategy.IENarrator; - } - - public focusTextArea(): void { - this.textAreaHandler.focusTextArea(); - } - - // --- begin event handlers - - public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { - // Give textarea same font size & line height as editor, for the IME case (when the textarea is visible) - if (e.fontInfo) { - Configuration.applyFontInfo(this.textArea.actual, this._context.configuration.editor.fontInfo); - } - if (e.viewInfo.experimentalScreenReader) { - this.textAreaHandler.setStrategy(this._getStrategy()); - } - if (e.layoutInfo) { - this.contentLeft = this._context.configuration.editor.layoutInfo.contentLeft; - this.contentWidth = this._context.configuration.editor.layoutInfo.contentWidth; - } - return false; - } - - private _lastCursorSelectionChanged: viewEvents.ViewCursorSelectionChangedEvent = null; - public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { - this._lastCursorSelectionChanged = e; - return false; - } - - public onFocusChanged(e: viewEvents.ViewFocusChangedEvent): boolean { - this.textAreaHandler.setHasFocus(e.isFocused); - return false; - } - - public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { - this.scrollLeft = e.scrollLeft; - this.scrollTop = e.scrollTop; - if (this.visiblePosition) { - this.textArea.actual.setTop(this.visiblePosition.top - this.scrollTop); - this.textArea.actual.setLeft(this.contentLeft + this.visiblePosition.left - this.scrollLeft); - } - return false; - } - - // --- end event handlers - - public writeToTextArea(): void { - if (this._lastCursorSelectionChanged) { - let e = this._lastCursorSelectionChanged; - this._lastCursorSelectionChanged = null; - this.textAreaHandler.setCursorSelections(e.selection, e.secondarySelections); - } - } - -} \ No newline at end of file diff --git a/src/vs/editor/browser/controller/mouseHandler.ts b/src/vs/editor/browser/controller/mouseHandler.ts index aaa0a3203e8d7..60ff6e4d650c5 100644 --- a/src/vs/editor/browser/controller/mouseHandler.ts +++ b/src/vs/editor/browser/controller/mouseHandler.ts @@ -10,7 +10,6 @@ import * as browser from 'vs/base/browser/browser'; import * as dom from 'vs/base/browser/dom'; import { Position } from 'vs/editor/common/core/position'; import { Selection } from 'vs/editor/common/core/selection'; -import * as editorCommon from 'vs/editor/common/editorCommon'; import { ViewEventHandler } from 'vs/editor/common/viewModel/viewEventHandler'; import { MouseTarget, MouseTargetFactory, IViewZoneData } from 'vs/editor/browser/controller/mouseTarget'; import * as editorBrowser from 'vs/editor/browser/editorBrowser'; @@ -22,7 +21,6 @@ import { StandardMouseWheelEvent } from 'vs/base/browser/mouseEvent'; import { EditorZoom } from 'vs/editor/common/config/editorZoom'; import { IViewCursorRenderData } from 'vs/editor/browser/viewParts/viewCursors/viewCursor'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; -import { IViewWhitespaceViewportData } from 'vs/editor/common/viewModel/viewModel'; import { ViewController } from 'vs/editor/browser/view/viewController'; /** @@ -47,16 +45,6 @@ export interface IPointerHandlerHelper { focusTextArea(): void; - getScrollLeft(): number; - getScrollTop(): number; - - setScrollPosition(position: editorCommon.INewScrollPosition): void; - - isAfterLines(verticalOffset: number): boolean; - getLineNumberAtVerticalOffset(verticalOffset: number): number; - getVerticalOffsetForLineNumber(lineNumber: number): number; - getWhitespaceAtVerticalOffset(verticalOffset: number): IViewWhitespaceViewportData; - /** * Get the last rendered information of the cursors. */ @@ -146,8 +134,8 @@ export class MouseHandler extends ViewEventHandler { } // --- begin event handlers - public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { - this._mouseDownOperation.onCursorSelectionChanged(e); + public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { + this._mouseDownOperation.onCursorStateChanged(e); return false; } private _isFocused = false; @@ -197,7 +185,7 @@ export class MouseHandler extends ViewEventHandler { } let actualMouseMoveTime = e.timestamp; if (actualMouseMoveTime < this.lastMouseLeaveTime) { - // Due to throttling, this event occured before the mouse left the editor, therefore ignore it. + // Due to throttling, this event occurred before the mouse left the editor, therefore ignore it. return; } @@ -277,20 +265,18 @@ export class MouseHandler extends ViewEventHandler { class MouseDownOperation extends Disposable { - private _context: ViewContext; - private _viewController: ViewController; - private _viewHelper: IPointerHandlerHelper; - private _createMouseTarget: (e: EditorMouseEvent, testEventTarget: boolean) => editorBrowser.IMouseTarget; - private _getMouseColumn: (e: EditorMouseEvent) => number; + private readonly _context: ViewContext; + private readonly _viewController: ViewController; + private readonly _viewHelper: IPointerHandlerHelper; + private readonly _createMouseTarget: (e: EditorMouseEvent, testEventTarget: boolean) => editorBrowser.IMouseTarget; + private readonly _getMouseColumn: (e: EditorMouseEvent) => number; - private _mouseMoveMonitor: GlobalEditorMouseMoveMonitor; + private readonly _mouseMoveMonitor: GlobalEditorMouseMoveMonitor; + private readonly _onScrollTimeout: TimeoutTimer; + private readonly _mouseState: MouseDownState; private _currentSelection: Selection; - private _mouseState: MouseDownState; - - private _onScrollTimeout: TimeoutTimer; private _isActive: boolean; - private _lastMouseEvent: EditorMouseEvent; constructor( @@ -307,15 +293,13 @@ class MouseDownOperation extends Disposable { this._createMouseTarget = createMouseTarget; this._getMouseColumn = getMouseColumn; - this._currentSelection = new Selection(1, 1, 1, 1); + this._mouseMoveMonitor = this._register(new GlobalEditorMouseMoveMonitor(this._viewHelper.viewDomNode)); + this._onScrollTimeout = this._register(new TimeoutTimer()); this._mouseState = new MouseDownState(); - this._onScrollTimeout = this._register(new TimeoutTimer()); + this._currentSelection = new Selection(1, 1, 1, 1); this._isActive = false; - this._lastMouseEvent = null; - - this._mouseMoveMonitor = this._register(new GlobalEditorMouseMoveMonitor(this._viewHelper.viewDomNode)); } public dispose(): void { @@ -427,33 +411,35 @@ class MouseDownOperation extends Disposable { }, 10); } - public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): void { - this._currentSelection = e.selection; + public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): void { + this._currentSelection = e.selections[0]; } private _getPositionOutsideEditor(e: EditorMouseEvent): MouseTarget { const editorContent = e.editorPos; + const model = this._context.model; + const viewLayout = this._context.viewLayout; - let mouseColumn = this._getMouseColumn(e); + const mouseColumn = this._getMouseColumn(e); if (e.posy < editorContent.y) { - let aboveLineNumber = this._viewHelper.getLineNumberAtVerticalOffset(Math.max(this._viewHelper.getScrollTop() - (editorContent.y - e.posy), 0)); + let aboveLineNumber = viewLayout.getLineNumberAtVerticalOffset(Math.max(viewLayout.getScrollTop() - (editorContent.y - e.posy), 0)); return new MouseTarget(null, editorBrowser.MouseTargetType.OUTSIDE_EDITOR, mouseColumn, new Position(aboveLineNumber, 1)); } if (e.posy > editorContent.y + editorContent.height) { - let belowLineNumber = this._viewHelper.getLineNumberAtVerticalOffset(this._viewHelper.getScrollTop() + (e.posy - editorContent.y)); - return new MouseTarget(null, editorBrowser.MouseTargetType.OUTSIDE_EDITOR, mouseColumn, new Position(belowLineNumber, this._context.model.getLineMaxColumn(belowLineNumber))); + let belowLineNumber = viewLayout.getLineNumberAtVerticalOffset(viewLayout.getScrollTop() + (e.posy - editorContent.y)); + return new MouseTarget(null, editorBrowser.MouseTargetType.OUTSIDE_EDITOR, mouseColumn, new Position(belowLineNumber, model.getLineMaxColumn(belowLineNumber))); } - let possibleLineNumber = this._viewHelper.getLineNumberAtVerticalOffset(this._viewHelper.getScrollTop() + (e.posy - editorContent.y)); + let possibleLineNumber = viewLayout.getLineNumberAtVerticalOffset(viewLayout.getScrollTop() + (e.posy - editorContent.y)); if (e.posx < editorContent.x) { return new MouseTarget(null, editorBrowser.MouseTargetType.OUTSIDE_EDITOR, mouseColumn, new Position(possibleLineNumber, 1)); } if (e.posx > editorContent.x + editorContent.width) { - return new MouseTarget(null, editorBrowser.MouseTargetType.OUTSIDE_EDITOR, mouseColumn, new Position(possibleLineNumber, this._context.model.getLineMaxColumn(possibleLineNumber))); + return new MouseTarget(null, editorBrowser.MouseTargetType.OUTSIDE_EDITOR, mouseColumn, new Position(possibleLineNumber, model.getLineMaxColumn(possibleLineNumber))); } return null; diff --git a/src/vs/editor/browser/controller/mouseTarget.ts b/src/vs/editor/browser/controller/mouseTarget.ts index 253c5bc8421af..b91b491be6bcd 100644 --- a/src/vs/editor/browser/controller/mouseTarget.ts +++ b/src/vs/editor/browser/controller/mouseTarget.ts @@ -228,7 +228,7 @@ class HitTestContext { public getZoneAtCoord(mouseVerticalOffset: number): IViewZoneData { // The target is either a view zone or the empty space after the last view-line - let viewZoneWhitespace = this._viewHelper.getWhitespaceAtVerticalOffset(mouseVerticalOffset); + let viewZoneWhitespace = this._context.viewLayout.getWhitespaceAtVerticalOffset(mouseVerticalOffset); if (viewZoneWhitespace) { let viewZoneMiddle = viewZoneWhitespace.verticalOffset + viewZoneWhitespace.height / 2, @@ -268,7 +268,7 @@ class HitTestContext { } public getFullLineRangeAtCoord(mouseVerticalOffset: number): { range: EditorRange; isAfterLines: boolean; } { - if (this._viewHelper.isAfterLines(mouseVerticalOffset)) { + if (this._context.viewLayout.isAfterLines(mouseVerticalOffset)) { // Below the last line let lineNumber = this._context.model.getLineCount(); let maxLineColumn = this._context.model.getLineMaxColumn(lineNumber); @@ -278,7 +278,7 @@ class HitTestContext { }; } - let lineNumber = this._viewHelper.getLineNumberAtVerticalOffset(mouseVerticalOffset); + let lineNumber = this._context.viewLayout.getLineNumberAtVerticalOffset(mouseVerticalOffset); let maxLineColumn = this._context.model.getLineMaxColumn(lineNumber); return { range: new EditorRange(lineNumber, 1, lineNumber, maxLineColumn), @@ -287,15 +287,15 @@ class HitTestContext { } public getLineNumberAtVerticalOffset(mouseVerticalOffset: number): number { - return this._viewHelper.getLineNumberAtVerticalOffset(mouseVerticalOffset); + return this._context.viewLayout.getLineNumberAtVerticalOffset(mouseVerticalOffset); } public isAfterLines(mouseVerticalOffset: number): boolean { - return this._viewHelper.isAfterLines(mouseVerticalOffset); + return this._context.viewLayout.isAfterLines(mouseVerticalOffset); } public getVerticalOffsetForLineNumber(lineNumber: number): number { - return this._viewHelper.getVerticalOffsetForLineNumber(lineNumber); + return this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber); } public findAttribute(element: Element, attr: string): string { @@ -328,11 +328,11 @@ class HitTestContext { } public getScrollTop(): number { - return this._viewHelper.getScrollTop(); + return this._context.viewLayout.getScrollTop(); } public getScrollLeft(): number { - return this._viewHelper.getScrollLeft(); + return this._context.viewLayout.getScrollLeft(); } } @@ -649,7 +649,7 @@ export class MouseTargetFactory { public getMouseColumn(editorPos: EditorPagePosition, pos: PageCoordinates): number { let layoutInfo = this._context.configuration.editor.layoutInfo; - let mouseContentHorizontalOffset = this._viewHelper.getScrollLeft() + pos.x - editorPos.x - layoutInfo.contentLeft; + let mouseContentHorizontalOffset = this._context.viewLayout.getScrollLeft() + pos.x - editorPos.x - layoutInfo.contentLeft; return MouseTargetFactory._getMouseColumn(mouseContentHorizontalOffset, this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth); } diff --git a/src/vs/editor/browser/controller/pointerHandler.ts b/src/vs/editor/browser/controller/pointerHandler.ts index 96f6c01434370..fdd809a2e1a8f 100644 --- a/src/vs/editor/browser/controller/pointerHandler.ts +++ b/src/vs/editor/browser/controller/pointerHandler.ts @@ -99,9 +99,10 @@ class MsPointerHandler extends MouseHandler implements IDisposable { } private _onGestureChange(e: IThrottledGestureEvent): void { - this.viewHelper.setScrollPosition({ - scrollLeft: this.viewHelper.getScrollLeft() - e.translationX, - scrollTop: this.viewHelper.getScrollTop() - e.translationY, + const viewLayout = this._context.viewLayout; + viewLayout.setScrollPosition({ + scrollLeft: viewLayout.getScrollLeft() - e.translationX, + scrollTop: viewLayout.getScrollTop() - e.translationY, }); } @@ -180,9 +181,10 @@ class StandardPointerHandler extends MouseHandler implements IDisposable { } private _onGestureChange(e: IThrottledGestureEvent): void { - this.viewHelper.setScrollPosition({ - scrollLeft: this.viewHelper.getScrollLeft() - e.translationX, - scrollTop: this.viewHelper.getScrollTop() - e.translationY, + const viewLayout = this._context.viewLayout; + viewLayout.setScrollPosition({ + scrollLeft: viewLayout.getScrollLeft() - e.translationX, + scrollTop: viewLayout.getScrollTop() - e.translationY, }); } @@ -225,9 +227,10 @@ class TouchHandler extends MouseHandler { } private onChange(e: GestureEvent): void { - this.viewHelper.setScrollPosition({ - scrollLeft: this.viewHelper.getScrollLeft() - e.translationX, - scrollTop: this.viewHelper.getScrollTop() - e.translationY, + const viewLayout = this._context.viewLayout; + viewLayout.setScrollPosition({ + scrollLeft: viewLayout.getScrollLeft() - e.translationX, + scrollTop: viewLayout.getScrollTop() - e.translationY, }); } } diff --git a/src/vs/editor/browser/controller/textAreaHandler.css b/src/vs/editor/browser/controller/textAreaHandler.css new file mode 100644 index 0000000000000..19036f1115f5d --- /dev/null +++ b/src/vs/editor/browser/controller/textAreaHandler.css @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +.monaco-editor .inputarea { + min-width: 0; + min-height: 0; + margin: 0; + padding: 0; + position: absolute; + outline: none !important; + resize: none; + border: none; + overflow: hidden; + color: transparent; + background-color: transparent; +} +/*.monaco-editor .inputarea { + position: fixed !important; + width: 800px !important; + height: 500px !important; + top: initial !important; + left: initial !important; + bottom: 0 !important; + right: 0 !important; + color: black !important; + background: white !important; + line-height: 15px !important; + font-size: 14px !important; +}*/ +.monaco-editor .inputarea.ime-input { + z-index: 10; +} diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts new file mode 100644 index 0000000000000..23acec9b60416 --- /dev/null +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -0,0 +1,499 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import 'vs/css!./textAreaHandler'; +import * as platform from 'vs/base/common/platform'; +import * as browser from 'vs/base/browser/browser'; +import { TextAreaInput, ITextAreaInputHost, IPasteData, ICompositionData } from 'vs/editor/browser/controller/textAreaInput'; +import { ISimpleModel, ITypeData, TextAreaState, PagedScreenReaderStrategy } from 'vs/editor/browser/controller/textAreaState'; +import { Range } from 'vs/editor/common/core/range'; +import { Selection } from 'vs/editor/common/core/selection'; +import { Position } from 'vs/editor/common/core/position'; +import { Configuration } from 'vs/editor/browser/config/configuration'; +import { ViewContext } from 'vs/editor/common/view/viewContext'; +import { HorizontalRange, RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/view/renderingContext'; +import * as viewEvents from 'vs/editor/common/view/viewEvents'; +import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; +import { ViewController } from 'vs/editor/browser/view/viewController'; +import { EndOfLinePreference } from 'vs/editor/common/editorCommon'; +import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; +import { PartFingerprints, PartFingerprint, ViewPart } from 'vs/editor/browser/view/viewPart'; +import { Margin } from 'vs/editor/browser/viewParts/margin/margin'; +import { LineNumbersOverlay } from 'vs/editor/browser/viewParts/lineNumbers/lineNumbers'; +import { BareFontInfo } from 'vs/editor/common/config/fontInfo'; + +export interface ITextAreaHandlerHelper { + visibleRangeForPositionRelativeToEditor(lineNumber: number, column: number): HorizontalRange; +} + +class VisibleTextAreaData { + _visibleTextAreaBrand: void; + + public readonly top: number; + public readonly left: number; + public readonly width: number; + + constructor(top: number, left: number, width: number) { + this.top = top; + this.left = left; + this.width = width; + } + + public setWidth(width: number): VisibleTextAreaData { + return new VisibleTextAreaData(this.top, this.left, width); + } +} + +const canUseZeroSizeTextarea = (browser.isEdgeOrIE || browser.isFirefox); + +export class TextAreaHandler extends ViewPart { + + private readonly _viewController: ViewController; + private readonly _viewHelper: ITextAreaHandlerHelper; + + private _pixelRatio: number; + private _accessibilitySupport: platform.AccessibilitySupport; + private _contentLeft: number; + private _contentWidth: number; + private _contentHeight: number; + private _scrollLeft: number; + private _scrollTop: number; + private _fontInfo: BareFontInfo; + private _lineHeight: number; + private _emptySelectionClipboard: boolean; + + /** + * Defined only when the text area is visible (composition case). + */ + private _visibleTextArea: VisibleTextAreaData; + private _selections: Selection[]; + private _lastCopiedValue: string; + private _lastCopiedValueIsFromEmptySelection: boolean; + + public readonly textArea: FastDomNode; + public readonly textAreaCover: FastDomNode; + private readonly _textAreaInput: TextAreaInput; + + constructor(context: ViewContext, viewController: ViewController, viewHelper: ITextAreaHandlerHelper) { + super(context); + + this._viewController = viewController; + this._viewHelper = viewHelper; + + const conf = this._context.configuration.editor; + + this._pixelRatio = conf.pixelRatio; + this._accessibilitySupport = conf.accessibilitySupport; + this._contentLeft = conf.layoutInfo.contentLeft; + this._contentWidth = conf.layoutInfo.contentWidth; + this._contentHeight = conf.layoutInfo.contentHeight; + this._scrollLeft = 0; + this._scrollTop = 0; + this._fontInfo = conf.fontInfo; + this._lineHeight = conf.lineHeight; + this._emptySelectionClipboard = conf.emptySelectionClipboard; + + this._visibleTextArea = null; + this._selections = [new Selection(1, 1, 1, 1)]; + this._lastCopiedValue = null; + this._lastCopiedValueIsFromEmptySelection = false; + + // Text Area (The focus will always be in the textarea when the cursor is blinking) + this.textArea = createFastDomNode(document.createElement('textarea')); + PartFingerprints.write(this.textArea, PartFingerprint.TextArea); + this.textArea.setClassName('inputarea'); + this.textArea.setAttribute('wrap', 'off'); + this.textArea.setAttribute('autocorrect', 'off'); + this.textArea.setAttribute('autocapitalize', 'off'); + this.textArea.setAttribute('autocomplete', 'off'); + this.textArea.setAttribute('spellcheck', 'false'); + this.textArea.setAttribute('aria-label', conf.viewInfo.ariaLabel); + this.textArea.setAttribute('role', 'textbox'); + this.textArea.setAttribute('aria-multiline', 'true'); + this.textArea.setAttribute('aria-haspopup', 'false'); + this.textArea.setAttribute('aria-autocomplete', 'both'); + + this.textAreaCover = createFastDomNode(document.createElement('div')); + this.textAreaCover.setPosition('absolute'); + + const simpleModel: ISimpleModel = { + getLineCount: (): number => { + return this._context.model.getLineCount(); + }, + getLineMaxColumn: (lineNumber: number): number => { + return this._context.model.getLineMaxColumn(lineNumber); + }, + getValueInRange: (range: Range, eol: EndOfLinePreference): string => { + return this._context.model.getValueInRange(range, eol); + } + }; + + const textAreaInputHost: ITextAreaInputHost = { + getPlainTextToCopy: (): string => { + const whatToCopy = this._context.model.getPlainTextToCopy(this._selections, this._emptySelectionClipboard); + + if (this._emptySelectionClipboard) { + if (browser.isFirefox) { + // When writing "LINE\r\n" to the clipboard and then pasting, + // Firefox pastes "LINE\n", so let's work around this quirk + this._lastCopiedValue = whatToCopy.replace(/\r\n/g, '\n'); + } else { + this._lastCopiedValue = whatToCopy; + } + + let selections = this._selections; + this._lastCopiedValueIsFromEmptySelection = (selections.length === 1 && selections[0].isEmpty()); + } + + return whatToCopy; + }, + + getHTMLToCopy: (): string => { + return this._context.model.getHTMLToCopy(this._selections, this._emptySelectionClipboard); + }, + + getScreenReaderContent: (currentState: TextAreaState): TextAreaState => { + + if (browser.isIPad) { + // Do not place anything in the textarea for the iPad + return TextAreaState.EMPTY; + } + + if (this._accessibilitySupport === platform.AccessibilitySupport.Disabled) { + // We know for a fact that a screen reader is not attached + return TextAreaState.EMPTY; + } + + return PagedScreenReaderStrategy.fromEditorSelection(currentState, simpleModel, this._selections[0]); + } + }; + + this._textAreaInput = this._register(new TextAreaInput(textAreaInputHost, this.textArea)); + + this._register(this._textAreaInput.onKeyDown((e: IKeyboardEvent) => { + this._viewController.emitKeyDown(e); + })); + + this._register(this._textAreaInput.onKeyUp((e: IKeyboardEvent) => { + this._viewController.emitKeyUp(e); + })); + + this._register(this._textAreaInput.onPaste((e: IPasteData) => { + let pasteOnNewLine = false; + if (this._emptySelectionClipboard) { + pasteOnNewLine = (e.text === this._lastCopiedValue && this._lastCopiedValueIsFromEmptySelection); + } + this._viewController.paste('keyboard', e.text, pasteOnNewLine); + })); + + this._register(this._textAreaInput.onCut(() => { + this._viewController.cut('keyboard'); + })); + + this._register(this._textAreaInput.onType((e: ITypeData) => { + if (e.replaceCharCnt) { + this._viewController.replacePreviousChar('keyboard', e.text, e.replaceCharCnt); + } else { + this._viewController.type('keyboard', e.text); + } + })); + + this._register(this._textAreaInput.onCompositionStart(() => { + const lineNumber = this._selections[0].startLineNumber; + const column = this._selections[0].startColumn; + + this._context.privateViewEventBus.emit(new viewEvents.ViewRevealRangeRequestEvent( + new Range(lineNumber, column, lineNumber, column), + viewEvents.VerticalRevealType.Simple, + true + )); + + // Find range pixel position + const visibleRange = this._viewHelper.visibleRangeForPositionRelativeToEditor(lineNumber, column); + + if (visibleRange) { + this._visibleTextArea = new VisibleTextAreaData( + this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber), + visibleRange.left, + canUseZeroSizeTextarea ? 0 : 1 + ); + this._render(); + } + + // Show the textarea + this.textArea.setClassName('inputarea ime-input'); + + this._viewController.compositionStart('keyboard'); + })); + + this._register(this._textAreaInput.onCompositionUpdate((e: ICompositionData) => { + if (browser.isEdgeOrIE) { + // Due to isEdgeOrIE (where the textarea was not cleared initially) + // we cannot assume the text consists only of the composited text + this._visibleTextArea = this._visibleTextArea.setWidth(0); + } else { + // adjust width by its size + this._visibleTextArea = this._visibleTextArea.setWidth(measureText(e.data, this._fontInfo)); + } + this._render(); + })); + + this._register(this._textAreaInput.onCompositionEnd(() => { + + this._visibleTextArea = null; + this._render(); + + this.textArea.setClassName('inputarea'); + this._viewController.compositionEnd('keyboard'); + })); + + this._register(this._textAreaInput.onFocus(() => { + this._context.privateViewEventBus.emit(new viewEvents.ViewFocusChangedEvent(true)); + })); + + this._register(this._textAreaInput.onBlur(() => { + this._context.privateViewEventBus.emit(new viewEvents.ViewFocusChangedEvent(false)); + })); + } + + public dispose(): void { + super.dispose(); + } + + // --- begin event handlers + + public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { + const conf = this._context.configuration.editor; + + if (e.fontInfo) { + this._fontInfo = conf.fontInfo; + } + if (e.viewInfo) { + this.textArea.setAttribute('aria-label', conf.viewInfo.ariaLabel); + } + if (e.layoutInfo) { + this._contentLeft = conf.layoutInfo.contentLeft; + this._contentWidth = conf.layoutInfo.contentWidth; + this._contentHeight = conf.layoutInfo.contentHeight; + } + if (e.lineHeight) { + this._lineHeight = conf.lineHeight; + } + if (e.pixelRatio) { + this._pixelRatio = conf.pixelRatio; + } + if (e.accessibilitySupport) { + this._accessibilitySupport = conf.accessibilitySupport; + this._textAreaInput.writeScreenReaderContent('strategy changed'); + } + if (e.emptySelectionClipboard) { + this._emptySelectionClipboard = conf.emptySelectionClipboard; + } + + return true; + } + public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { + this._selections = e.selections.slice(0); + this._textAreaInput.writeScreenReaderContent('selection changed'); + return true; + } + public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { + // true for inline decorations that can end up relayouting text + return true; + } + public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { + return true; + } + public onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean { + return true; + } + public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { + return true; + } + public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { + return true; + } + public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { + this._scrollLeft = e.scrollLeft; + this._scrollTop = e.scrollTop; + return true; + } + public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { + return true; + } + + // --- end event handlers + + // --- begin view API + + public isFocused(): boolean { + return this._textAreaInput.isFocused(); + } + + public focusTextArea(): void { + this._textAreaInput.focusTextArea(); + } + + public setAriaActiveDescendant(id: string): void { + if (id) { + this.textArea.setAttribute('role', 'combobox'); + if (this.textArea.getAttribute('aria-activedescendant') !== id) { + this.textArea.setAttribute('aria-haspopup', 'true'); + this.textArea.setAttribute('aria-activedescendant', id); + } + } else { + this.textArea.setAttribute('role', 'textbox'); + this.textArea.removeAttribute('aria-activedescendant'); + this.textArea.removeAttribute('aria-haspopup'); + } + } + + // --- end view API + + private _primaryCursorVisibleRange: HorizontalRange = null; + + public prepareRender(ctx: RenderingContext): void { + if (this._accessibilitySupport === platform.AccessibilitySupport.Enabled) { + // Do not move the textarea with the cursor, as this generates accessibility events that might confuse screen readers + // See https://github.com/Microsoft/vscode/issues/26730 + this._primaryCursorVisibleRange = null; + } else { + const primaryCursorPosition = new Position(this._selections[0].positionLineNumber, this._selections[0].positionColumn); + this._primaryCursorVisibleRange = ctx.visibleRangeForPosition(primaryCursorPosition); + } + } + + public render(ctx: RestrictedRenderingContext): void { + this._textAreaInput.writeScreenReaderContent('render'); + this._render(); + } + + private _render(): void { + if (this._visibleTextArea) { + // The text area is visible for composition reasons + this._renderInsideEditor( + this._visibleTextArea.top - this._scrollTop, + this._contentLeft + this._visibleTextArea.left - this._scrollLeft, + this._visibleTextArea.width, + this._lineHeight, + true + ); + return; + } + + if (!this._primaryCursorVisibleRange) { + // The primary cursor is outside the viewport => place textarea to the top left + this._renderAtTopLeft(); + return; + } + + const left = this._contentLeft + this._primaryCursorVisibleRange.left - this._scrollLeft; + if (left < this._contentLeft || left > this._contentLeft + this._contentWidth) { + // cursor is outside the viewport + this._renderAtTopLeft(); + return; + } + + const top = this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber) - this._scrollTop; + if (top < 0 || top > this._contentHeight) { + // cursor is outside the viewport + this._renderAtTopLeft(); + return; + } + + // The primary cursor is in the viewport (at least vertically) => place textarea on the cursor + this._renderInsideEditor( + top, left, + canUseZeroSizeTextarea ? 0 : 1, canUseZeroSizeTextarea ? 0 : 1, + false + ); + } + + private _renderInsideEditor(top: number, left: number, width: number, height: number, useEditorFont: boolean): void { + const ta = this.textArea; + const tac = this.textAreaCover; + + if (useEditorFont) { + Configuration.applyFontInfo(ta, this._fontInfo); + } else { + ta.setFontSize(1); + ta.setLineHeight(this._fontInfo.lineHeight); + } + + ta.setTop(top); + ta.setLeft(left); + ta.setWidth(width); + ta.setHeight(height); + + tac.setTop(0); + tac.setLeft(0); + tac.setWidth(0); + tac.setHeight(0); + } + + private _renderAtTopLeft(): void { + const ta = this.textArea; + const tac = this.textAreaCover; + + Configuration.applyFontInfo(ta, this._fontInfo); + ta.setTop(0); + ta.setLeft(0); + tac.setTop(0); + tac.setLeft(0); + + if (canUseZeroSizeTextarea) { + ta.setWidth(0); + ta.setHeight(0); + tac.setWidth(0); + tac.setHeight(0); + return; + } + + // (in WebKit the textarea is 1px by 1px because it cannot handle input to a 0x0 textarea) + // specifically, when doing Korean IME, setting the textare to 0x0 breaks IME badly. + + ta.setWidth(1); + ta.setHeight(1); + tac.setWidth(1); + tac.setHeight(1); + + if (this._context.configuration.editor.viewInfo.glyphMargin) { + tac.setClassName('monaco-editor-background textAreaCover ' + Margin.CLASS_NAME); + } else { + if (this._context.configuration.editor.viewInfo.renderLineNumbers) { + tac.setClassName('monaco-editor-background textAreaCover ' + LineNumbersOverlay.CLASS_NAME); + } else { + tac.setClassName('monaco-editor-background textAreaCover'); + } + } + } +} + +function measureText(text: string, fontInfo: BareFontInfo): number { + // adjust width by its size + const canvasElem = document.createElement('canvas'); + const context = canvasElem.getContext('2d'); + context.font = createFontString(fontInfo); + const metrics = context.measureText(text); + + if (browser.isFirefox) { + return metrics.width + 2; // +2 for Japanese... + } else { + return metrics.width; + } +} + +function createFontString(bareFontInfo: BareFontInfo): string { + return doCreateFontString('normal', bareFontInfo.fontWeight, bareFontInfo.fontSize, bareFontInfo.lineHeight, bareFontInfo.fontFamily); +} + +function doCreateFontString(fontStyle: string, fontWeight: string, fontSize: number, lineHeight: number, fontFamily: string): string { + // The full font syntax is: + // style | variant | weight | stretch | size/line-height | fontFamily + // (https://developer.mozilla.org/en-US/docs/Web/CSS/font) + // But it appears Edge and IE11 cannot properly parse `stretch`. + return `${fontStyle} normal ${fontWeight} ${fontSize}px / ${lineHeight}px ${fontFamily}`; +} diff --git a/src/vs/editor/browser/controller/textAreaInput.ts b/src/vs/editor/browser/controller/textAreaInput.ts new file mode 100644 index 0000000000000..e1f99b036e89e --- /dev/null +++ b/src/vs/editor/browser/controller/textAreaInput.ts @@ -0,0 +1,468 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import { RunOnceScheduler } from 'vs/base/common/async'; +import * as strings from 'vs/base/common/strings'; +import Event, { Emitter } from 'vs/base/common/event'; +import { KeyCode } from 'vs/base/common/keyCodes'; +import { Disposable } from 'vs/base/common/lifecycle'; +import { ITypeData, TextAreaState, ITextAreaWrapper } from 'vs/editor/browser/controller/textAreaState'; +import * as browser from 'vs/base/browser/browser'; +import * as platform from 'vs/base/common/platform'; +import * as dom from 'vs/base/browser/dom'; +import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; +import { FastDomNode } from 'vs/base/browser/fastDomNode'; + +export interface ICompositionData { + data: string; +} + +export const CopyOptions = { + forceCopyWithSyntaxHighlighting: false +}; + +const enum ReadFromTextArea { + Type, + Paste +} + +export interface IPasteData { + text: string; +} + +export interface ITextAreaInputHost { + getPlainTextToCopy(): string; + getHTMLToCopy(): string; + getScreenReaderContent(currentState: TextAreaState): TextAreaState; +} + +/** + * Writes screen reader content to the textarea and is able to analyze its input events to generate: + * - onCut + * - onPaste + * - onType + * + * Composition events are generated for presentation purposes (composition input is reflected in onType). + */ +export class TextAreaInput extends Disposable { + + private _onFocus = this._register(new Emitter()); + public onFocus: Event = this._onFocus.event; + + private _onBlur = this._register(new Emitter()); + public onBlur: Event = this._onBlur.event; + + private _onKeyDown = this._register(new Emitter()); + public onKeyDown: Event = this._onKeyDown.event; + + private _onKeyUp = this._register(new Emitter()); + public onKeyUp: Event = this._onKeyUp.event; + + private _onCut = this._register(new Emitter()); + public onCut: Event = this._onCut.event; + + private _onPaste = this._register(new Emitter()); + public onPaste: Event = this._onPaste.event; + + private _onType = this._register(new Emitter()); + public onType: Event = this._onType.event; + + private _onCompositionStart = this._register(new Emitter()); + public onCompositionStart: Event = this._onCompositionStart.event; + + private _onCompositionUpdate = this._register(new Emitter()); + public onCompositionUpdate: Event = this._onCompositionUpdate.event; + + private _onCompositionEnd = this._register(new Emitter()); + public onCompositionEnd: Event = this._onCompositionEnd.event; + + // --- + + private readonly _host: ITextAreaInputHost; + private readonly _textArea: TextAreaWrapper; + private readonly _asyncTriggerCut: RunOnceScheduler; + + private _textAreaState: TextAreaState; + + private _hasFocus: boolean; + private _isDoingComposition: boolean; + private _nextCommand: ReadFromTextArea; + + constructor(host: ITextAreaInputHost, textArea: FastDomNode) { + super(); + this._host = host; + this._textArea = this._register(new TextAreaWrapper(textArea)); + this._asyncTriggerCut = this._register(new RunOnceScheduler(() => this._onCut.fire(), 0)); + + this._textAreaState = TextAreaState.EMPTY; + this.writeScreenReaderContent('ctor'); + + this._hasFocus = false; + this._isDoingComposition = false; + this._nextCommand = ReadFromTextArea.Type; + + this._register(dom.addStandardDisposableListener(textArea.domNode, 'keydown', (e: IKeyboardEvent) => { + if (this._isDoingComposition && e.equals(KeyCode.KEY_IN_COMPOSITION)) { + // Stop propagation for keyDown events if the IME is processing key input + e.stopPropagation(); + } + + if (e.equals(KeyCode.Escape)) { + // Prevent default always for `Esc`, otherwise it will generate a keypress + // See https://msdn.microsoft.com/en-us/library/ie/ms536939(v=vs.85).aspx + e.preventDefault(); + } + this._onKeyDown.fire(e); + })); + + this._register(dom.addStandardDisposableListener(textArea.domNode, 'keyup', (e: IKeyboardEvent) => { + this._onKeyUp.fire(e); + })); + + this._register(dom.addDisposableListener(textArea.domNode, 'compositionstart', (e: CompositionEvent) => { + if (this._isDoingComposition) { + return; + } + this._isDoingComposition = true; + + // In IE we cannot set .value when handling 'compositionstart' because the entire composition will get canceled. + if (!browser.isEdgeOrIE) { + this._setAndWriteTextAreaState('compositionstart', TextAreaState.EMPTY); + } + + this._onCompositionStart.fire(); + })); + + /** + * Deduce the typed input from a text area's value and the last observed state. + */ + const deduceInputFromTextAreaValue = (couldBeEmojiInput: boolean): [TextAreaState, ITypeData] => { + const oldState = this._textAreaState; + const newState = this._textAreaState.readFromTextArea(this._textArea); + return [newState, TextAreaState.deduceInput(oldState, newState, couldBeEmojiInput)]; + }; + + /** + * Deduce the composition input from a string. + */ + const deduceComposition = (text: string): [TextAreaState, ITypeData] => { + const oldState = this._textAreaState; + const newState = TextAreaState.selectedText(text); + const typeInput: ITypeData = { + text: newState.value, + replaceCharCnt: oldState.selectionEnd - oldState.selectionStart + }; + return [newState, typeInput]; + }; + + this._register(dom.addDisposableListener(textArea.domNode, 'compositionupdate', (e: CompositionEvent) => { + if (browser.isChromev56) { + // See https://github.com/Microsoft/monaco-editor/issues/320 + // where compositionupdate .data is broken in Chrome v55 and v56 + // See https://bugs.chromium.org/p/chromium/issues/detail?id=677050#c9 + // The textArea doesn't get the composition update yet, the value of textarea is still obsolete + // so we can't correct e at this moment. + return; + } + + if (browser.isEdgeOrIE && e.locale === 'ja') { + // https://github.com/Microsoft/monaco-editor/issues/339 + // Multi-part Japanese compositions reset cursor in Edge/IE, Chinese and Korean IME don't have this issue. + // The reason that we can't use this path for all CJK IME is IE and Edge behave differently when handling Korean IME, + // which breaks this path of code. + const [newState, typeInput] = deduceInputFromTextAreaValue(/*couldBeEmojiInput*/false); + this._textAreaState = newState; + this._onType.fire(typeInput); + this._onCompositionUpdate.fire(e); + return; + } + + const [newState, typeInput] = deduceComposition(e.data); + this._textAreaState = newState; + this._onType.fire(typeInput); + this._onCompositionUpdate.fire(e); + })); + + this._register(dom.addDisposableListener(textArea.domNode, 'compositionend', (e: CompositionEvent) => { + if (browser.isEdgeOrIE && e.locale === 'ja') { + // https://github.com/Microsoft/monaco-editor/issues/339 + const [newState, typeInput] = deduceInputFromTextAreaValue(/*couldBeEmojiInput*/false); + this._textAreaState = newState; + this._onType.fire(typeInput); + } + else { + const [newState, typeInput] = deduceComposition(e.data); + this._textAreaState = newState; + this._onType.fire(typeInput); + } + + // Due to isEdgeOrIE (where the textarea was not cleared initially) and isChrome (the textarea is not updated correctly when composition ends) + // we cannot assume the text at the end consists only of the composited text + if (browser.isEdgeOrIE || browser.isChrome) { + this._textAreaState = this._textAreaState.readFromTextArea(this._textArea); + } + + if (!this._isDoingComposition) { + return; + } + this._isDoingComposition = false; + + this._onCompositionEnd.fire(); + })); + + this._register(dom.addDisposableListener(textArea.domNode, 'input', () => { + if (this._isDoingComposition) { + // See https://github.com/Microsoft/monaco-editor/issues/320 + if (browser.isChromev56) { + const [newState, typeInput] = deduceComposition(this._textArea.getValue()); + this._textAreaState = newState; + + this._onType.fire(typeInput); + let e: ICompositionData = { + data: typeInput.text + }; + this._onCompositionUpdate.fire(e); + } + return; + } + + const [newState, typeInput] = deduceInputFromTextAreaValue(/*couldBeEmojiInput*/platform.isMacintosh); + if (typeInput.replaceCharCnt === 0 && typeInput.text.length === 1 && strings.isHighSurrogate(typeInput.text.charCodeAt(0))) { + // Ignore invalid input but keep it around for next time + return; + } + + this._textAreaState = newState; + // console.log('==> DEDUCED INPUT: ' + JSON.stringify(typeInput)); + if (this._nextCommand === ReadFromTextArea.Type) { + if (typeInput.text !== '') { + this._onType.fire(typeInput); + } + } else { + if (typeInput.text !== '') { + this._onPaste.fire({ + text: typeInput.text + }); + } + this._nextCommand = ReadFromTextArea.Type; + } + })); + + // --- Clipboard operations + + this._register(dom.addDisposableListener(textArea.domNode, 'cut', (e: ClipboardEvent) => { + this._ensureClipboardGetsEditorSelection(e); + this._asyncTriggerCut.schedule(); + })); + + this._register(dom.addDisposableListener(textArea.domNode, 'copy', (e: ClipboardEvent) => { + this._ensureClipboardGetsEditorSelection(e); + })); + + this._register(dom.addDisposableListener(textArea.domNode, 'paste', (e: ClipboardEvent) => { + if (ClipboardEventUtils.canUseTextData(e)) { + const pastePlainText = ClipboardEventUtils.getTextData(e); + if (pastePlainText !== '') { + this._onPaste.fire({ + text: pastePlainText + }); + } + } else { + if (this._textArea.getSelectionStart() !== this._textArea.getSelectionEnd()) { + // Clean up the textarea, to get a clean paste + this._setAndWriteTextAreaState('paste', TextAreaState.EMPTY); + } + this._nextCommand = ReadFromTextArea.Paste; + } + })); + + this._register(dom.addDisposableListener(textArea.domNode, 'focus', () => this._setHasFocus(true))); + this._register(dom.addDisposableListener(textArea.domNode, 'blur', () => this._setHasFocus(false))); + } + + public dispose(): void { + super.dispose(); + } + + public focusTextArea(): void { + // Setting this._hasFocus and writing the screen reader content + // will result in a focus() and setSelectionRange() in the textarea + this._setHasFocus(true); + } + + public isFocused(): boolean { + return this._hasFocus; + } + + private _setHasFocus(newHasFocus: boolean): void { + if (this._hasFocus === newHasFocus) { + // no change + return; + } + this._hasFocus = newHasFocus; + + if (this._hasFocus) { + if (browser.isEdge) { + // Edge has a bug where setting the selection range while the focus event + // is dispatching doesn't work. To reproduce, "tab into" the editor. + this._setAndWriteTextAreaState('focusgain', TextAreaState.EMPTY); + } else { + this.writeScreenReaderContent('focusgain'); + } + } + + if (this._hasFocus) { + this._onFocus.fire(); + } else { + this._onBlur.fire(); + } + } + + private _setAndWriteTextAreaState(reason: string, textAreaState: TextAreaState): void { + if (!this._hasFocus) { + textAreaState = textAreaState.collapseSelection(); + } + + textAreaState.writeToTextArea(reason, this._textArea, this._hasFocus); + this._textAreaState = textAreaState; + } + + public writeScreenReaderContent(reason: string): void { + if (this._isDoingComposition) { + // Do not write to the text area when doing composition + return; + } + + this._setAndWriteTextAreaState(reason, this._host.getScreenReaderContent(this._textAreaState)); + } + + private _ensureClipboardGetsEditorSelection(e: ClipboardEvent): void { + const copyPlainText = this._host.getPlainTextToCopy(); + if (!ClipboardEventUtils.canUseTextData(e)) { + // Looks like an old browser. The strategy is to place the text + // we'd like to be copied to the clipboard in the textarea and select it. + this._setAndWriteTextAreaState('copy or cut', TextAreaState.selectedText(copyPlainText)); + return; + } + + let copyHTML: string = null; + if (!browser.isEdgeOrIE && (copyPlainText.length < 65536 || CopyOptions.forceCopyWithSyntaxHighlighting)) { + copyHTML = this._host.getHTMLToCopy(); + } + ClipboardEventUtils.setTextData(e, copyPlainText, copyHTML); + } +} + +class ClipboardEventUtils { + + public static canUseTextData(e: ClipboardEvent): boolean { + if (e.clipboardData) { + return true; + } + if ((window).clipboardData) { + return true; + } + return false; + } + + public static getTextData(e: ClipboardEvent): string { + if (e.clipboardData) { + e.preventDefault(); + return e.clipboardData.getData('text/plain'); + } + + if ((window).clipboardData) { + e.preventDefault(); + return (window).clipboardData.getData('Text'); + } + + throw new Error('ClipboardEventUtils.getTextData: Cannot use text data!'); + } + + public static setTextData(e: ClipboardEvent, text: string, richText: string): void { + if (e.clipboardData) { + e.clipboardData.setData('text/plain', text); + if (richText !== null) { + e.clipboardData.setData('text/html', richText); + } + e.preventDefault(); + return; + } + + if ((window).clipboardData) { + (window).clipboardData.setData('Text', text); + e.preventDefault(); + return; + } + + throw new Error('ClipboardEventUtils.setTextData: Cannot use text data!'); + } +} + +class TextAreaWrapper extends Disposable implements ITextAreaWrapper { + + private readonly _actual: FastDomNode; + + constructor(_textArea: FastDomNode) { + super(); + this._actual = _textArea; + } + + public getValue(): string { + // console.log('current value: ' + this._textArea.value); + return this._actual.domNode.value; + } + + public setValue(reason: string, value: string): void { + const textArea = this._actual.domNode; + if (textArea.value === value) { + // No change + return; + } + // console.log('reason: ' + reason + ', current value: ' + textArea.value + ' => new value: ' + value); + textArea.value = value; + } + + public getSelectionStart(): number { + return this._actual.domNode.selectionStart; + } + + public getSelectionEnd(): number { + return this._actual.domNode.selectionEnd; + } + + public setSelectionRange(reason: string, selectionStart: number, selectionEnd: number): void { + const textArea = this._actual.domNode; + + const currentIsFocused = (document.activeElement === textArea); + const currentSelectionStart = textArea.selectionStart; + const currentSelectionEnd = textArea.selectionEnd; + + if (currentIsFocused && currentSelectionStart === selectionStart && currentSelectionEnd === selectionEnd) { + // No change + return; + } + + // console.log('reason: ' + reason + ', setSelectionRange: ' + selectionStart + ' -> ' + selectionEnd); + + if (currentIsFocused) { + // No need to focus, only need to change the selection range + textArea.setSelectionRange(selectionStart, selectionEnd); + return; + } + + // If the focus is outside the textarea, browsers will try really hard to reveal the textarea. + // Here, we try to undo the browser's desperate reveal. + try { + const scrollState = dom.saveParentsScrollTop(textArea); + textArea.focus(); + textArea.setSelectionRange(selectionStart, selectionEnd); + dom.restoreParentsScrollTop(textArea, scrollState); + } catch (e) { + // Sometimes IE throws when setting selection (e.g. textarea is off-DOM) + } + } +} diff --git a/src/vs/editor/browser/controller/textAreaState.ts b/src/vs/editor/browser/controller/textAreaState.ts new file mode 100644 index 0000000000000..d398f5101476c --- /dev/null +++ b/src/vs/editor/browser/controller/textAreaState.ts @@ -0,0 +1,256 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import { Range } from 'vs/editor/common/core/range'; +import { EndOfLinePreference } from 'vs/editor/common/editorCommon'; +import * as strings from 'vs/base/common/strings'; + +export interface ITextAreaWrapper { + getValue(): string; + setValue(reason: string, value: string): void; + + getSelectionStart(): number; + getSelectionEnd(): number; + setSelectionRange(reason: string, selectionStart: number, selectionEnd: number): void; +} + +export interface ISimpleModel { + getLineCount(): number; + getLineMaxColumn(lineNumber: number): number; + getValueInRange(range: Range, eol: EndOfLinePreference): string; +} + +export interface ITypeData { + text: string; + replaceCharCnt: number; +} + +export class TextAreaState { + + public static EMPTY = new TextAreaState('', 0, 0); + + public readonly value: string; + public readonly selectionStart: number; + public readonly selectionEnd: number; + + constructor(value: string, selectionStart: number, selectionEnd: number) { + this.value = value; + this.selectionStart = selectionStart; + this.selectionEnd = selectionEnd; + } + + public equals(other: TextAreaState): boolean { + if (other instanceof TextAreaState) { + return ( + this.value === other.value + && this.selectionStart === other.selectionStart + && this.selectionEnd === other.selectionEnd + ); + } + return false; + } + + public toString(): string { + return '[ <' + this.value + '>, selectionStart: ' + this.selectionStart + ', selectionEnd: ' + this.selectionEnd + ']'; + } + + public readFromTextArea(textArea: ITextAreaWrapper): TextAreaState { + return new TextAreaState(textArea.getValue(), textArea.getSelectionStart(), textArea.getSelectionEnd()); + } + + public collapseSelection(): TextAreaState { + return new TextAreaState(this.value, this.value.length, this.value.length); + } + + public writeToTextArea(reason: string, textArea: ITextAreaWrapper, select: boolean): void { + // console.log(Date.now() + ': applyToTextArea ' + reason + ': ' + this.toString()); + textArea.setValue(reason, this.value); + if (select) { + textArea.setSelectionRange(reason, this.selectionStart, this.selectionEnd); + } + } + + public static selectedText(text: string): TextAreaState { + return new TextAreaState(text, 0, text.length); + } + + public static deduceInput(previousState: TextAreaState, currentState: TextAreaState, couldBeEmojiInput: boolean): ITypeData { + if (!previousState) { + // This is the EMPTY state + return { + text: '', + replaceCharCnt: 0 + }; + } + + // console.log('------------------------deduceInput'); + // console.log('PREVIOUS STATE: ' + previousState.toString()); + // console.log('CURRENT STATE: ' + currentState.toString()); + + let previousValue = previousState.value; + let previousSelectionStart = previousState.selectionStart; + let previousSelectionEnd = previousState.selectionEnd; + let currentValue = currentState.value; + let currentSelectionStart = currentState.selectionStart; + let currentSelectionEnd = currentState.selectionEnd; + + // Strip the previous suffix from the value (without interfering with the current selection) + const previousSuffix = previousValue.substring(previousSelectionEnd); + const currentSuffix = currentValue.substring(currentSelectionEnd); + const suffixLength = strings.commonSuffixLength(previousSuffix, currentSuffix); + currentValue = currentValue.substring(0, currentValue.length - suffixLength); + previousValue = previousValue.substring(0, previousValue.length - suffixLength); + + const previousPrefix = previousValue.substring(0, previousSelectionStart); + const currentPrefix = currentValue.substring(0, currentSelectionStart); + const prefixLength = strings.commonPrefixLength(previousPrefix, currentPrefix); + currentValue = currentValue.substring(prefixLength); + previousValue = previousValue.substring(prefixLength); + currentSelectionStart -= prefixLength; + previousSelectionStart -= prefixLength; + currentSelectionEnd -= prefixLength; + previousSelectionEnd -= prefixLength; + + // console.log('AFTER DIFFING PREVIOUS STATE: <' + previousValue + '>, selectionStart: ' + previousSelectionStart + ', selectionEnd: ' + previousSelectionEnd); + // console.log('AFTER DIFFING CURRENT STATE: <' + currentValue + '>, selectionStart: ' + currentSelectionStart + ', selectionEnd: ' + currentSelectionEnd); + + if (couldBeEmojiInput && currentSelectionStart === currentSelectionEnd && previousValue.length > 0) { + // on OSX, emojis from the emoji picker are inserted at random locations + // the only hints we can use is that the selection is immediately after the inserted emoji + // and that none of the old text has been deleted + + let potentialEmojiInput: string = null; + + if (currentSelectionStart === currentValue.length) { + // emoji potentially inserted "somewhere" after the previous selection => it should appear at the end of `currentValue` + if (strings.startsWith(currentValue, previousValue)) { + // only if all of the old text is accounted for + potentialEmojiInput = currentValue.substring(previousValue.length); + } + } else { + // emoji potentially inserted "somewhere" before the previous selection => it should appear at the start of `currentValue` + if (strings.endsWith(currentValue, previousValue)) { + // only if all of the old text is accounted for + potentialEmojiInput = currentValue.substring(0, currentValue.length - previousValue.length); + } + } + + if (potentialEmojiInput !== null && potentialEmojiInput.length > 0) { + // now we check that this is indeed an emoji + // emojis can grow quite long, so a length check is of no help + // e.g. 1F3F4 E0067 E0062 E0065 E006E E0067 E007F ; fully-qualified # 🏴󠁧󠁢󠁥󠁮󠁧󠁿 England + + // Oftentimes, emojis use Variation Selector-16 (U+FE0F), so that is a good hint + // http://emojipedia.org/variation-selector-16/ + // > An invisible codepoint which specifies that the preceding character + // > should be displayed with emoji presentation. Only required if the + // > preceding character defaults to text presentation. + if (/\uFE0F/.test(potentialEmojiInput) || strings.containsEmoji(potentialEmojiInput)) { + return { + text: potentialEmojiInput, + replaceCharCnt: 0 + }; + } + } + } + + if (currentSelectionStart === currentSelectionEnd) { + // composition accept case (noticed in FF + Japanese) + // [blahblah] => blahblah| + if ( + previousValue === currentValue + && previousSelectionStart === 0 + && previousSelectionEnd === previousValue.length + && currentSelectionStart === currentValue.length + && currentValue.indexOf('\n') === -1 + ) { + if (strings.containsFullWidthCharacter(currentValue)) { + return { + text: '', + replaceCharCnt: 0 + }; + } + } + + // no current selection + const replacePreviousCharacters = (previousPrefix.length - prefixLength); + // console.log('REMOVE PREVIOUS: ' + (previousPrefix.length - prefixLength) + ' chars'); + + return { + text: currentValue, + replaceCharCnt: replacePreviousCharacters + }; + } + + // there is a current selection => composition case + const replacePreviousCharacters = previousSelectionEnd - previousSelectionStart; + return { + text: currentValue, + replaceCharCnt: replacePreviousCharacters + }; + } +} + +export class PagedScreenReaderStrategy { + private static _LINES_PER_PAGE = 10; + + private static _getPageOfLine(lineNumber: number): number { + return Math.floor((lineNumber - 1) / PagedScreenReaderStrategy._LINES_PER_PAGE); + } + + private static _getRangeForPage(page: number): Range { + let offset = page * PagedScreenReaderStrategy._LINES_PER_PAGE; + let startLineNumber = offset + 1; + let endLineNumber = offset + PagedScreenReaderStrategy._LINES_PER_PAGE; + return new Range(startLineNumber, 1, endLineNumber + 1, 1); + } + + public static fromEditorSelection(previousState: TextAreaState, model: ISimpleModel, selection: Range): TextAreaState { + + let selectionStartPage = PagedScreenReaderStrategy._getPageOfLine(selection.startLineNumber); + let selectionStartPageRange = PagedScreenReaderStrategy._getRangeForPage(selectionStartPage); + + let selectionEndPage = PagedScreenReaderStrategy._getPageOfLine(selection.endLineNumber); + let selectionEndPageRange = PagedScreenReaderStrategy._getRangeForPage(selectionEndPage); + + let pretextRange = selectionStartPageRange.intersectRanges(new Range(1, 1, selection.startLineNumber, selection.startColumn)); + let pretext = model.getValueInRange(pretextRange, EndOfLinePreference.LF); + + let lastLine = model.getLineCount(); + let lastLineMaxColumn = model.getLineMaxColumn(lastLine); + let posttextRange = selectionEndPageRange.intersectRanges(new Range(selection.endLineNumber, selection.endColumn, lastLine, lastLineMaxColumn)); + let posttext = model.getValueInRange(posttextRange, EndOfLinePreference.LF); + + let text: string = null; + if (selectionStartPage === selectionEndPage || selectionStartPage + 1 === selectionEndPage) { + // take full selection + text = model.getValueInRange(selection, EndOfLinePreference.LF); + } else { + let selectionRange1 = selectionStartPageRange.intersectRanges(selection); + let selectionRange2 = selectionEndPageRange.intersectRanges(selection); + text = ( + model.getValueInRange(selectionRange1, EndOfLinePreference.LF) + + String.fromCharCode(8230) + + model.getValueInRange(selectionRange2, EndOfLinePreference.LF) + ); + } + + // Chromium handles very poorly text even of a few thousand chars + // Cut text to avoid stalling the entire UI + const LIMIT_CHARS = 500; + if (pretext.length > LIMIT_CHARS) { + pretext = pretext.substring(pretext.length - LIMIT_CHARS, pretext.length); + } + if (posttext.length > LIMIT_CHARS) { + posttext = posttext.substring(0, LIMIT_CHARS); + } + if (text.length > 2 * LIMIT_CHARS) { + text = text.substring(0, LIMIT_CHARS) + String.fromCharCode(8230) + text.substring(text.length - LIMIT_CHARS, text.length); + } + + return new TextAreaState(pretext + text + posttext, pretext.length, pretext.length + text.length); + } +} diff --git a/src/vs/editor/browser/editorBrowserExtensions.ts b/src/vs/editor/browser/editorBrowserExtensions.ts index ea76aeaa64454..88a7a7ac175f6 100644 --- a/src/vs/editor/browser/editorBrowserExtensions.ts +++ b/src/vs/editor/browser/editorBrowserExtensions.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import { IEditorContributionCtor } from 'vs/editor/browser/editorBrowser'; export function editorContribution(ctor: IEditorContributionCtor): void { diff --git a/src/vs/editor/browser/editorDom.ts b/src/vs/editor/browser/editorDom.ts index 78427527605bc..504c830dda130 100644 --- a/src/vs/editor/browser/editorDom.ts +++ b/src/vs/editor/browser/editorDom.ts @@ -146,17 +146,35 @@ export class GlobalEditorMouseMoveMonitor extends Disposable { private _editorViewDomNode: HTMLElement; private _globalMouseMoveMonitor: GlobalMouseMoveMonitor; + private _keydownListener: IDisposable; constructor(editorViewDomNode: HTMLElement) { super(); this._editorViewDomNode = editorViewDomNode; this._globalMouseMoveMonitor = this._register(new GlobalMouseMoveMonitor()); + this._keydownListener = null; } public startMonitoring(merger: EditorMouseEventMerger, mouseMoveCallback: (e: EditorMouseEvent) => void, onStopCallback: () => void): void { + + // Add a <> keydown event listener that will cancel the monitoring + // if something other than a modifier key is pressed + this._keydownListener = dom.addStandardDisposableListener(document, 'keydown', (e) => { + const kb = e.toKeybinding(); + if (kb.isModifierKey()) { + // Allow modifier keys + return; + } + this._globalMouseMoveMonitor.stopMonitoring(true); + }, true); + let myMerger: dom.IEventMerger = (lastEvent: EditorMouseEvent, currentEvent: MouseEvent): EditorMouseEvent => { return merger(lastEvent, new EditorMouseEvent(currentEvent, this._editorViewDomNode)); }; - this._globalMouseMoveMonitor.startMonitoring(myMerger, mouseMoveCallback, onStopCallback); + + this._globalMouseMoveMonitor.startMonitoring(myMerger, mouseMoveCallback, () => { + this._keydownListener.dispose(); + onStopCallback(); + }); } } diff --git a/src/vs/editor/browser/services/codeEditorServiceImpl.ts b/src/vs/editor/browser/services/codeEditorServiceImpl.ts index f79bca4879d89..35f14e0b0e4ec 100644 --- a/src/vs/editor/browser/services/codeEditorServiceImpl.ts +++ b/src/vs/editor/browser/services/codeEditorServiceImpl.ts @@ -4,36 +4,43 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import * as objects from 'vs/base/common/objects'; -import { parse, stringify } from 'vs/base/common/marshalling'; import * as strings from 'vs/base/common/strings'; import URI from 'vs/base/common/uri'; import * as dom from 'vs/base/browser/dom'; import { IDecorationRenderOptions, IModelDecorationOptions, IModelDecorationOverviewRulerOptions, IThemeDecorationRenderOptions, - IContentDecorationRenderOptions, OverviewRulerLane, TrackedRangeStickiness + IContentDecorationRenderOptions, OverviewRulerLane, TrackedRangeStickiness, isThemeColor } from 'vs/editor/common/editorCommon'; import { AbstractCodeEditorService } from 'vs/editor/common/services/abstractCodeEditorService'; -import { IDisposable, toDisposable } from 'vs/base/common/lifecycle'; +import { IDisposable, dispose as disposeAll } from 'vs/base/common/lifecycle'; +import { IThemeService, ITheme, ThemeColor } from 'vs/platform/theme/common/themeService'; export class CodeEditorServiceImpl extends AbstractCodeEditorService { private _styleSheet: HTMLStyleElement; private _decorationOptionProviders: { [key: string]: IModelDecorationOptionsProvider }; + private _themeService: IThemeService; - constructor(styleSheet = dom.createStyleSheet()) { + constructor( @IThemeService themeService: IThemeService, styleSheet = dom.createStyleSheet()) { super(); this._styleSheet = styleSheet; this._decorationOptionProviders = Object.create(null); + this._themeService = themeService; } public registerDecorationType(key: string, options: IDecorationRenderOptions, parentTypeKey?: string): void { let provider = this._decorationOptionProviders[key]; if (!provider) { + let providerArgs: ProviderArguments = { + styleSheet: this._styleSheet, + key: key, + parentTypeKey: parentTypeKey, + options: options + }; if (!parentTypeKey) { - provider = new DecorationTypeOptionsProvider(this._styleSheet, key, options); + provider = new DecorationTypeOptionsProvider(this._themeService, providerArgs); } else { - provider = new DecorationSubTypeOptionsProvider(this._styleSheet, key, parentTypeKey, options); + provider = new DecorationSubTypeOptionsProvider(this._themeService, providerArgs); } this._decorationOptionProviders[key] = provider; } @@ -71,67 +78,52 @@ class DecorationSubTypeOptionsProvider implements IModelDecorationOptionsProvide public refCount: number; - private _disposable: IDisposable; private _parentTypeKey: string; - private _beforeContentClassName: string; - private _afterContentClassName: string; + private _beforeContentRules: DecorationCSSRules; + private _afterContentRules: DecorationCSSRules; - constructor(styleSheet: HTMLStyleElement, key: string, parentTypeKey: string, options: IDecorationRenderOptions) { - this._parentTypeKey = parentTypeKey; + constructor(themeService: IThemeService, providerArgs: ProviderArguments) { + this._parentTypeKey = providerArgs.parentTypeKey; this.refCount = 0; - let themedOpts = getThemedRenderOptions(options); - - this._beforeContentClassName = DecorationRenderHelper.createCSSRules( - styleSheet, - key, - parentTypeKey, - ModelDecorationCSSRuleType.BeforeContentClassName, - { - light: DecorationRenderHelper.getCSSTextForModelDecorationContentClassName(themedOpts.light.before), - dark: DecorationRenderHelper.getCSSTextForModelDecorationContentClassName(themedOpts.dark.before) - } - ); - - this._afterContentClassName = DecorationRenderHelper.createCSSRules( - styleSheet, - key, - parentTypeKey, - ModelDecorationCSSRuleType.AfterContentClassName, - { - light: DecorationRenderHelper.getCSSTextForModelDecorationContentClassName(themedOpts.light.after), - dark: DecorationRenderHelper.getCSSTextForModelDecorationContentClassName(themedOpts.dark.after) - } - ); - if (this._beforeContentClassName || this._afterContentClassName) { - this._disposable = toDisposable(() => { - dom.removeCSSRulesContainingSelector(CSSNameHelper.getDeletionSubstring(key), styleSheet); - }); - } + this._beforeContentRules = new DecorationCSSRules(ModelDecorationCSSRuleType.BeforeContentClassName, providerArgs, themeService); + this._afterContentRules = new DecorationCSSRules(ModelDecorationCSSRuleType.AfterContentClassName, providerArgs, themeService); } public getOptions(codeEditorService: AbstractCodeEditorService, writable: boolean): IModelDecorationOptions { let options = codeEditorService.resolveDecorationOptions(this._parentTypeKey, true); - if (this._beforeContentClassName) { - options.beforeContentClassName = this._beforeContentClassName; + if (this._beforeContentRules) { + options.beforeContentClassName = this._beforeContentRules.className; } - if (this._afterContentClassName) { - options.afterContentClassName = this._afterContentClassName; + if (this._afterContentRules) { + options.afterContentClassName = this._afterContentRules.className; } return options; } public dispose(): void { - if (this._disposable) { - this._disposable.dispose(); - delete this._disposable; + if (this._beforeContentRules) { + this._beforeContentRules.dispose(); + this._beforeContentRules = null; + } + if (this._afterContentRules) { + this._afterContentRules.dispose(); + this._afterContentRules = null; } } } +interface ProviderArguments { + styleSheet: HTMLStyleElement; + key: string; + parentTypeKey?: string; + options: IDecorationRenderOptions; +} + + class DecorationTypeOptionsProvider implements IModelDecorationOptionsProvider { - private _disposable: IDisposable; + private _disposables: IDisposable[]; public refCount: number; public className: string; @@ -143,82 +135,41 @@ class DecorationTypeOptionsProvider implements IModelDecorationOptionsProvider { public overviewRuler: IModelDecorationOverviewRulerOptions; public stickiness: TrackedRangeStickiness; - constructor(styleSheet: HTMLStyleElement, key: string, options: IDecorationRenderOptions) { + constructor(themeService: IThemeService, providerArgs: ProviderArguments) { this.refCount = 0; + this._disposables = []; - let themedOpts = getThemedRenderOptions(options); - - this.className = DecorationRenderHelper.createCSSRules( - styleSheet, - key, - null, - ModelDecorationCSSRuleType.ClassName, - { - light: DecorationRenderHelper.getCSSTextForModelDecorationClassName(themedOpts.light), - dark: DecorationRenderHelper.getCSSTextForModelDecorationClassName(themedOpts.dark) - } - ); - - this.inlineClassName = DecorationRenderHelper.createCSSRules( - styleSheet, - key, - null, - ModelDecorationCSSRuleType.InlineClassName, - { - light: DecorationRenderHelper.getCSSTextForModelDecorationInlineClassName(themedOpts.light), - dark: DecorationRenderHelper.getCSSTextForModelDecorationInlineClassName(themedOpts.dark) - } - ); - - this.beforeContentClassName = DecorationRenderHelper.createCSSRules( - styleSheet, - key, - null, - ModelDecorationCSSRuleType.BeforeContentClassName, - { - light: DecorationRenderHelper.getCSSTextForModelDecorationContentClassName(themedOpts.light.before), - dark: DecorationRenderHelper.getCSSTextForModelDecorationContentClassName(themedOpts.dark.before) - } - ); - - this.afterContentClassName = DecorationRenderHelper.createCSSRules( - styleSheet, - key, - null, - ModelDecorationCSSRuleType.AfterContentClassName, - { - light: DecorationRenderHelper.getCSSTextForModelDecorationContentClassName(themedOpts.light.after), - dark: DecorationRenderHelper.getCSSTextForModelDecorationContentClassName(themedOpts.dark.after) - } - ); - - this.glyphMarginClassName = DecorationRenderHelper.createCSSRules( - styleSheet, - key, - null, - ModelDecorationCSSRuleType.GlyphMarginClassName, - { - light: DecorationRenderHelper.getCSSTextForModelDecorationGlyphMarginClassName(themedOpts.light), - dark: DecorationRenderHelper.getCSSTextForModelDecorationGlyphMarginClassName(themedOpts.dark) + let createCSSRules = (type: ModelDecorationCSSRuleType) => { + let rules = new DecorationCSSRules(type, providerArgs, themeService); + if (rules.hasContent) { + this._disposables.push(rules); + return rules.className; } - ); + return void 0; + }; + + this.className = createCSSRules(ModelDecorationCSSRuleType.ClassName); + this.inlineClassName = createCSSRules(ModelDecorationCSSRuleType.InlineClassName); + this.beforeContentClassName = createCSSRules(ModelDecorationCSSRuleType.BeforeContentClassName); + this.afterContentClassName = createCSSRules(ModelDecorationCSSRuleType.AfterContentClassName); + this.glyphMarginClassName = createCSSRules(ModelDecorationCSSRuleType.GlyphMarginClassName); + let options = providerArgs.options; this.isWholeLine = Boolean(options.isWholeLine); + this.stickiness = options.rangeBehavior; + let lightOverviewRulerColor = options.light && options.light.overviewRulerColor || options.overviewRulerColor; + let darkOverviewRulerColor = options.dark && options.dark.overviewRulerColor || options.overviewRulerColor; if ( - typeof themedOpts.light.overviewRulerColor !== 'undefined' - || typeof themedOpts.dark.overviewRulerColor !== 'undefined' + typeof lightOverviewRulerColor !== 'undefined' + || typeof darkOverviewRulerColor !== 'undefined' ) { this.overviewRuler = { - color: themedOpts.light.overviewRulerColor || themedOpts.dark.overviewRulerColor, - darkColor: themedOpts.dark.overviewRulerColor || themedOpts.light.overviewRulerColor, + color: lightOverviewRulerColor || darkOverviewRulerColor, + darkColor: darkOverviewRulerColor || lightOverviewRulerColor, position: options.overviewRulerLane || OverviewRulerLane.Center }; } - - this._disposable = toDisposable(() => { - dom.removeCSSRulesContainingSelector(CSSNameHelper.getDeletionSubstring(key), styleSheet); - }); } public getOptions(codeEditorService: AbstractCodeEditorService, writable: boolean): IModelDecorationOptions { @@ -238,85 +189,202 @@ class DecorationTypeOptionsProvider implements IModelDecorationOptionsProvider { } public dispose(): void { - if (this._disposable) { - this._disposable.dispose(); - delete this._disposable; - } + this._disposables = disposeAll(this._disposables); } } -class DecorationRenderHelper { - private static _CSS_MAP = { - color: 'color:{0} !important;', - backgroundColor: 'background-color:{0};', - - outline: 'outline:{0};', - outlineColor: 'outline-color:{0};', - outlineStyle: 'outline-style:{0};', - outlineWidth: 'outline-width:{0};', - - border: 'border:{0};', - borderColor: 'border-color:{0};', - borderRadius: 'border-radius:{0};', - borderSpacing: 'border-spacing:{0};', - borderStyle: 'border-style:{0};', - borderWidth: 'border-width:{0};', - - textDecoration: 'text-decoration:{0};', - cursor: 'cursor:{0};', - letterSpacing: 'letter-spacing:{0};', - - gutterIconPath: 'background:url(\'{0}\') center center no-repeat;', - gutterIconSize: 'background-size:{0};', - - contentText: 'content:\'{0}\';', - contentIconPath: 'content:url(\'{0}\');', - margin: 'margin:{0};', - width: 'width:{0};', - height: 'height:{0};' - }; + +const _CSS_MAP = { + color: 'color:{0} !important;', + backgroundColor: 'background-color:{0};', + + outline: 'outline:{0};', + outlineColor: 'outline-color:{0};', + outlineStyle: 'outline-style:{0};', + outlineWidth: 'outline-width:{0};', + + border: 'border:{0};', + borderColor: 'border-color:{0};', + borderRadius: 'border-radius:{0};', + borderSpacing: 'border-spacing:{0};', + borderStyle: 'border-style:{0};', + borderWidth: 'border-width:{0};', + + textDecoration: 'text-decoration:{0};', + cursor: 'cursor:{0};', + letterSpacing: 'letter-spacing:{0};', + + gutterIconPath: 'background:url(\'{0}\') center center no-repeat;', + gutterIconSize: 'background-size:{0};', + + contentText: 'content:\'{0}\';', + contentIconPath: 'content:url(\'{0}\');', + margin: 'margin:{0};', + width: 'width:{0};', + height: 'height:{0};' +}; + + +class DecorationCSSRules { + + private _theme: ITheme; + private _className: string; + private _unThemedSelector: string; + private _hasContent: boolean; + private _ruleType: ModelDecorationCSSRuleType; + private _themeListener: IDisposable; + private _providerArgs: ProviderArguments; + private _usesThemeColors: boolean; + + public constructor(ruleType: ModelDecorationCSSRuleType, providerArgs: ProviderArguments, themeService: IThemeService) { + this._theme = themeService.getTheme(); + this._ruleType = ruleType; + this._providerArgs = providerArgs; + this._usesThemeColors = false; + this._hasContent = false; + + let className = CSSNameHelper.getClassName(this._providerArgs.key, ruleType); + if (this._providerArgs.parentTypeKey) { + className = className + ' ' + CSSNameHelper.getClassName(this._providerArgs.parentTypeKey, ruleType); + } + this._className = className; + + this._unThemedSelector = CSSNameHelper.getSelector(this._providerArgs.key, this._providerArgs.parentTypeKey, ruleType); + + this._buildCSS(); + + if (this._usesThemeColors) { + this._themeListener = themeService.onThemeChange(theme => { + this._theme = themeService.getTheme(); + this._removeCSS(); + this._buildCSS(); + }); + } + } + + public dispose() { + if (this._hasContent) { + this._removeCSS(); + this._hasContent = false; + } + if (this._themeListener) { + this._themeListener.dispose(); + this._themeListener = null; + } + } + + public get hasContent(): boolean { + return this._hasContent; + } + + public get className(): string { + return this._className; + } + + private _buildCSS(): void { + let options = this._providerArgs.options; + let unthemedCSS, lightCSS, darkCSS: string; + switch (this._ruleType) { + case ModelDecorationCSSRuleType.ClassName: + unthemedCSS = this.getCSSTextForModelDecorationClassName(options); + lightCSS = this.getCSSTextForModelDecorationClassName(options.light); + darkCSS = this.getCSSTextForModelDecorationClassName(options.dark); + break; + case ModelDecorationCSSRuleType.InlineClassName: + unthemedCSS = this.getCSSTextForModelDecorationInlineClassName(options); + lightCSS = this.getCSSTextForModelDecorationInlineClassName(options.light); + darkCSS = this.getCSSTextForModelDecorationInlineClassName(options.dark); + break; + case ModelDecorationCSSRuleType.GlyphMarginClassName: + unthemedCSS = this.getCSSTextForModelDecorationGlyphMarginClassName(options); + lightCSS = this.getCSSTextForModelDecorationGlyphMarginClassName(options.light); + darkCSS = this.getCSSTextForModelDecorationGlyphMarginClassName(options.dark); + break; + case ModelDecorationCSSRuleType.BeforeContentClassName: + unthemedCSS = this.getCSSTextForModelDecorationContentClassName(options.before); + lightCSS = this.getCSSTextForModelDecorationContentClassName(options.light && options.light.before); + darkCSS = this.getCSSTextForModelDecorationContentClassName(options.dark && options.dark.before); + break; + case ModelDecorationCSSRuleType.AfterContentClassName: + unthemedCSS = this.getCSSTextForModelDecorationContentClassName(options.after); + lightCSS = this.getCSSTextForModelDecorationContentClassName(options.light && options.light.after); + darkCSS = this.getCSSTextForModelDecorationContentClassName(options.dark && options.dark.after); + break; + default: + throw new Error('Unknown rule type: ' + this._ruleType); + } + let sheet = this._providerArgs.styleSheet.sheet; + + let hasContent = false; + if (unthemedCSS.length > 0) { + sheet.insertRule(`${this._unThemedSelector} {${unthemedCSS}}`, 0); + hasContent = true; + } + if (lightCSS.length > 0) { + sheet.insertRule(`.vs${this._unThemedSelector} {${lightCSS}}`, 0); + hasContent = true; + } + if (darkCSS.length > 0) { + sheet.insertRule(`.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector} {${darkCSS}}`, 0); + hasContent = true; + } + this._hasContent = hasContent; + } + + private _removeCSS(): void { + dom.removeCSSRulesContainingSelector(this._unThemedSelector, this._providerArgs.styleSheet); + } /** * Build the CSS for decorations styled via `className`. */ - public static getCSSTextForModelDecorationClassName(opts: IThemeDecorationRenderOptions): string { - let cssTextArr = []; - DecorationRenderHelper.collectCSSText(opts, ['backgroundColor', 'outline', 'outlineColor', 'outlineStyle', 'outlineWidth'], cssTextArr); - DecorationRenderHelper.collectBorderSettingsCSSText(opts, cssTextArr); - + private getCSSTextForModelDecorationClassName(opts: IThemeDecorationRenderOptions): string { + if (!opts) { + return ''; + } + let cssTextArr: string[] = []; + this.collectCSSText(opts, ['backgroundColor'], cssTextArr); + this.collectCSSText(opts, ['outline', 'outlineColor', 'outlineStyle', 'outlineWidth'], cssTextArr); + this.collectBorderSettingsCSSText(opts, cssTextArr); return cssTextArr.join(''); } /** * Build the CSS for decorations styled via `inlineClassName`. */ - public static getCSSTextForModelDecorationInlineClassName(opts: IThemeDecorationRenderOptions): string { - let cssTextArr = []; - DecorationRenderHelper.collectCSSText(opts, ['textDecoration', 'cursor', 'color', 'letterSpacing'], cssTextArr); + private getCSSTextForModelDecorationInlineClassName(opts: IThemeDecorationRenderOptions): string { + if (!opts) { + return ''; + } + let cssTextArr: string[] = []; + this.collectCSSText(opts, ['textDecoration', 'cursor', 'color', 'letterSpacing'], cssTextArr); return cssTextArr.join(''); } /** * Build the CSS for decorations styled before or after content. */ - public static getCSSTextForModelDecorationContentClassName(opts: IContentDecorationRenderOptions): string { - let cssTextArr = []; + private getCSSTextForModelDecorationContentClassName(opts: IContentDecorationRenderOptions): string { + if (!opts) { + return ''; + } + let cssTextArr: string[] = []; if (typeof opts !== 'undefined') { - DecorationRenderHelper.collectBorderSettingsCSSText(opts, cssTextArr); + this.collectBorderSettingsCSSText(opts, cssTextArr); if (typeof opts.contentIconPath === 'string') { - cssTextArr.push(strings.format(this._CSS_MAP.contentIconPath, URI.file(opts.contentIconPath).toString().replace(/'/g, '%27'))); + cssTextArr.push(strings.format(_CSS_MAP.contentIconPath, URI.file(opts.contentIconPath).toString().replace(/'/g, '%27'))); } else if (opts.contentIconPath instanceof URI) { - cssTextArr.push(strings.format(this._CSS_MAP.contentIconPath, opts.contentIconPath.toString(true).replace(/'/g, '%27'))); + cssTextArr.push(strings.format(_CSS_MAP.contentIconPath, opts.contentIconPath.toString(true).replace(/'/g, '%27'))); } if (typeof opts.contentText === 'string') { const truncated = opts.contentText.match(/^.*$/m)[0]; // only take first line const escaped = truncated.replace(/['\\]/g, '\\$&'); - cssTextArr.push(strings.format(this._CSS_MAP.contentText, escaped)); + cssTextArr.push(strings.format(_CSS_MAP.contentText, escaped)); } - DecorationRenderHelper.collectCSSText(opts, ['textDecoration', 'color', 'backgroundColor', 'margin'], cssTextArr); - if (DecorationRenderHelper.collectCSSText(opts, ['width', 'height'], cssTextArr)) { + this.collectCSSText(opts, ['textDecoration', 'color', 'backgroundColor', 'margin'], cssTextArr); + if (this.collectCSSText(opts, ['width', 'height'], cssTextArr)) { cssTextArr.push('display:inline-block;'); } } @@ -327,78 +395,58 @@ class DecorationRenderHelper { /** * Build the CSS for decorations styled via `glpyhMarginClassName`. */ - public static getCSSTextForModelDecorationGlyphMarginClassName(opts: IThemeDecorationRenderOptions): string { + private getCSSTextForModelDecorationGlyphMarginClassName(opts: IThemeDecorationRenderOptions): string { + if (!opts) { + return ''; + } let cssTextArr = []; if (typeof opts.gutterIconPath !== 'undefined') { if (typeof opts.gutterIconPath === 'string') { - cssTextArr.push(strings.format(this._CSS_MAP.gutterIconPath, URI.file(opts.gutterIconPath).toString())); + cssTextArr.push(strings.format(_CSS_MAP.gutterIconPath, URI.file(opts.gutterIconPath).toString())); } else { - cssTextArr.push(strings.format(this._CSS_MAP.gutterIconPath, opts.gutterIconPath.toString(true).replace(/'/g, '%27'))); + cssTextArr.push(strings.format(_CSS_MAP.gutterIconPath, opts.gutterIconPath.toString(true).replace(/'/g, '%27'))); } if (typeof opts.gutterIconSize !== 'undefined') { - cssTextArr.push(strings.format(this._CSS_MAP.gutterIconSize, opts.gutterIconSize)); + cssTextArr.push(strings.format(_CSS_MAP.gutterIconSize, opts.gutterIconSize)); } } return cssTextArr.join(''); } - private static border_rules = ['border', 'borderRadius', 'borderColor', 'borderSpacing', 'borderStyle', 'borderWidth']; - - public static collectBorderSettingsCSSText(opts: any, cssTextArr: string[]): boolean { - if (DecorationRenderHelper.collectCSSText(opts, DecorationRenderHelper.border_rules, cssTextArr)) { + private collectBorderSettingsCSSText(opts: any, cssTextArr: string[]): boolean { + if (this.collectCSSText(opts, ['border', 'borderColor', 'borderRadius', 'borderSpacing', 'borderStyle', 'borderWidth'], cssTextArr)) { cssTextArr.push(strings.format('box-sizing: border-box;')); return true; } return false; } - private static collectCSSText(opts: any, properties: string[], cssTextArr: string[]): boolean { + private collectCSSText(opts: any, properties: string[], cssTextArr: string[]): boolean { let lenBefore = cssTextArr.length; for (let property of properties) { - if (typeof opts[property] !== 'undefined') { - cssTextArr.push(strings.format(this._CSS_MAP[property], opts[property])); + let value = this.resolveValue(opts[property]); + if (typeof value === 'string') { + cssTextArr.push(strings.format(_CSS_MAP[property], value)); } } return cssTextArr.length !== lenBefore; } - /** - * Create CSS rules for `cssTexts` with the generated class names from `ruleType` - */ - public static createCSSRules(styleSheet: HTMLStyleElement, key: string, parentKey: string, ruleType: ModelDecorationCSSRuleType, cssTexts: { light: string, dark: string }): string { - function createCSSSelector(themeType: ThemeType, cssText: string) { - let selector = CSSNameHelper.getSelector(themeType, key, parentKey, ruleType); - dom.createCSSRule(selector, cssText, styleSheet); - } - - let hasContent = false; - if (cssTexts.light.length > 0) { - createCSSSelector(ThemeType.Light, cssTexts.light); - hasContent = true; - } - if (cssTexts.dark.length > 0) { - createCSSSelector(ThemeType.Dark, cssTexts.dark); - createCSSSelector(ThemeType.HighContrastBlack, cssTexts.dark); - hasContent = true; - } - if (hasContent) { - let className = CSSNameHelper.getClassName(key, ruleType); - if (parentKey) { - className = className + ' ' + CSSNameHelper.getClassName(parentKey, ruleType); + private resolveValue(value: string | ThemeColor): string { + if (isThemeColor(value)) { + this._usesThemeColors = true; + let color = this._theme.getColor(value.id); + if (color) { + return color.toString(); } - return className; + return 'transparent'; } - return void 0; + return value; } } -const enum ThemeType { - Light = 0, - Dark = 1, - HighContrastBlack = 2 -} const enum ModelDecorationCSSRuleType { ClassName = 0, InlineClassName = 1, @@ -409,22 +457,12 @@ const enum ModelDecorationCSSRuleType { class CSSNameHelper { - private static _getSelectorPrefixOf(theme: ThemeType): string { - if (theme === ThemeType.Light) { - return '.monaco-editor.vs'; - } - if (theme === ThemeType.Dark) { - return '.monaco-editor.vs-dark'; - } - return '.monaco-editor.hc-black'; - } - public static getClassName(key: string, type: ModelDecorationCSSRuleType): string { return 'ced-' + key + '-' + type; } - public static getSelector(themeType: ThemeType, key: string, parentKey: string, ruleType: ModelDecorationCSSRuleType): string { - let selector = this._getSelectorPrefixOf(themeType) + ' .' + this.getClassName(key, ruleType); + public static getSelector(key: string, parentKey: string, ruleType: ModelDecorationCSSRuleType): string { + let selector = '.monaco-editor .' + this.getClassName(key, ruleType); if (parentKey) { selector = selector + '.' + this.getClassName(parentKey, ruleType); } @@ -435,31 +473,4 @@ class CSSNameHelper { } return selector; } - - public static getDeletionSubstring(key: string): string { - return '.ced-' + key + '-'; - } -} - -// ---- Normalize decoration render options per theme -interface IResolvedDecorationRenderOptions { - light: IThemeDecorationRenderOptions; - dark: IThemeDecorationRenderOptions; } -function getThemedRenderOptions(opts: { light?: T, dark?: T }): { light?: T, dark?: T } { - // TODO@alex,joh - not really how/what deep clone is being used - // for here but it will break the URI TODO@martin - - // let light = objects.deepClone(opts); - let light = parse(stringify(opts)); - objects.mixin(light, opts.light); - - // let dark = objects.deepClone(opts); - let dark = parse(stringify(opts)); - objects.mixin(dark, opts.dark); - - return { - light: light, - dark: dark - }; -} \ No newline at end of file diff --git a/src/vs/editor/browser/standalone/media/standalone-tokens.css b/src/vs/editor/browser/standalone/media/standalone-tokens.css deleted file mode 100644 index 89184ea1f6670..0000000000000 --- a/src/vs/editor/browser/standalone/media/standalone-tokens.css +++ /dev/null @@ -1,30 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -/* Default standalone editor font */ -.monaco-editor { - font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif; -} - -.monaco-menu .monaco-action-bar.vertical .action-item [tabindex="0"]:focus { - color: deepskyblue; -} - -.monaco-editor-hover p { - margin: 0; -} - -/*.monaco-editor.vs [tabindex="0"]:focus { - outline: 1px solid rgba(0, 122, 204, 0.4); - outline-offset: -1px; - opacity: 1 !important; -} - -.monaco-editor.vs-dark [tabindex="0"]:focus { - outline: 1px solid rgba(14, 99, 156, 0.6); - outline-offset: -1px; - opacity: 1 !important; -}*/ diff --git a/src/vs/editor/browser/view/viewController.ts b/src/vs/editor/browser/view/viewController.ts index 34828bc9f9226..1ace89fcdacbe 100644 --- a/src/vs/editor/browser/view/viewController.ts +++ b/src/vs/editor/browser/view/viewController.ts @@ -11,7 +11,8 @@ import { IEditorMouseEvent } from 'vs/editor/browser/editorBrowser'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { IViewModel } from 'vs/editor/common/viewModel/viewModel'; import { ViewOutgoingEvents } from 'vs/editor/browser/view/viewOutgoingEvents'; -import { CoreCommands, CoreEditorCommand } from 'vs/editor/common/controller/coreCommands'; +import { CoreNavigationCommands, CoreEditorCommand } from 'vs/editor/common/controller/coreCommands'; +import { Configuration } from 'vs/editor/browser/config/configuration'; export interface ExecCoreEditorCommandFunc { (editorCommand: CoreEditorCommand, args: any): void; @@ -35,17 +36,20 @@ export interface IMouseDispatchData { export class ViewController { + private readonly configuration: Configuration; private readonly viewModel: IViewModel; private readonly _execCoreEditorCommandFunc: ExecCoreEditorCommandFunc; private readonly outgoingEvents: ViewOutgoingEvents; private readonly commandService: ICommandService; constructor( + configuration: Configuration, viewModel: IViewModel, execCommandFunc: ExecCoreEditorCommandFunc, outgoingEvents: ViewOutgoingEvents, commandService: ICommandService ) { + this.configuration = configuration; this.viewModel = viewModel; this._execCoreEditorCommandFunc = execCommandFunc; this.outgoingEvents = outgoingEvents; @@ -97,10 +101,34 @@ export class ViewController { return viewPosition; } + private _hasMulticursorModifier(data: IMouseDispatchData): boolean { + switch (this.configuration.editor.multiCursorModifier) { + case 'altKey': + return data.altKey; + case 'ctrlKey': + return data.ctrlKey; + case 'metaKey': + return data.metaKey; + } + return false; + } + + private _hasNonMulticursorModifier(data: IMouseDispatchData): boolean { + switch (this.configuration.editor.multiCursorModifier) { + case 'altKey': + return data.ctrlKey || data.metaKey; + case 'ctrlKey': + return data.altKey || data.metaKey; + case 'metaKey': + return data.ctrlKey || data.altKey; + } + return false; + } + public dispatchMouse(data: IMouseDispatchData): void { if (data.startedOnLineNumbers) { // If the dragging started on the gutter, then have operations work on the entire line - if (data.altKey) { + if (this._hasMulticursorModifier(data)) { if (data.inSelectionMode) { this.lastCursorLineSelect(data.position); } else { @@ -116,7 +144,7 @@ export class ViewController { } else if (data.mouseDownCount >= 4) { this.selectAll(); } else if (data.mouseDownCount === 3) { - if (data.altKey) { + if (this._hasMulticursorModifier(data)) { if (data.inSelectionMode) { this.lastCursorLineSelectDrag(data.position); } else { @@ -130,7 +158,7 @@ export class ViewController { } } } else if (data.mouseDownCount === 2) { - if (data.altKey) { + if (this._hasMulticursorModifier(data)) { this.lastCursorWordSelect(data.position); } else { if (data.inSelectionMode) { @@ -140,8 +168,8 @@ export class ViewController { } } } else { - if (data.altKey) { - if (!data.ctrlKey && !data.metaKey) { + if (this._hasMulticursorModifier(data)) { + if (!this._hasNonMulticursorModifier(data)) { if (data.shiftKey) { this.columnSelect(data.position, data.mouseColumn); } else { @@ -163,25 +191,25 @@ export class ViewController { } } - public moveTo(viewPosition: Position): void { + private _usualArgs(viewPosition: Position) { viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreCommands.MoveTo, { + return { position: this.convertViewToModelPosition(viewPosition), viewPosition: viewPosition - }); + }; + } + + public moveTo(viewPosition: Position): void { + this._execMouseCommand(CoreNavigationCommands.MoveTo, this._usualArgs(viewPosition)); } private moveToSelect(viewPosition: Position): void { - viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreCommands.MoveToSelect, { - position: this.convertViewToModelPosition(viewPosition), - viewPosition: viewPosition - }); + this._execMouseCommand(CoreNavigationCommands.MoveToSelect, this._usualArgs(viewPosition)); } private columnSelect(viewPosition: Position, mouseColumn: number): void { viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreCommands.ColumnSelect, { + this._execMouseCommand(CoreNavigationCommands.ColumnSelect, { position: this.convertViewToModelPosition(viewPosition), viewPosition: viewPosition, mouseColumn: mouseColumn @@ -190,7 +218,7 @@ export class ViewController { private createCursor(viewPosition: Position, wholeLine: boolean): void { viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreCommands.CreateCursor, { + this._execMouseCommand(CoreNavigationCommands.CreateCursor, { position: this.convertViewToModelPosition(viewPosition), viewPosition: viewPosition, wholeLine: wholeLine @@ -198,68 +226,39 @@ export class ViewController { } private lastCursorMoveToSelect(viewPosition: Position): void { - viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreCommands.LastCursorMoveToSelect, { - position: this.convertViewToModelPosition(viewPosition), - viewPosition: viewPosition - }); + this._execMouseCommand(CoreNavigationCommands.LastCursorMoveToSelect, this._usualArgs(viewPosition)); } private wordSelect(viewPosition: Position): void { - viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreCommands.WordSelect, { - position: this.convertViewToModelPosition(viewPosition) - }); + this._execMouseCommand(CoreNavigationCommands.WordSelect, this._usualArgs(viewPosition)); } private wordSelectDrag(viewPosition: Position): void { - viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreCommands.WordSelectDrag, { - position: this.convertViewToModelPosition(viewPosition) - }); + this._execMouseCommand(CoreNavigationCommands.WordSelectDrag, this._usualArgs(viewPosition)); } private lastCursorWordSelect(viewPosition: Position): void { - viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreCommands.LastCursorWordSelect, { - position: this.convertViewToModelPosition(viewPosition) - }); + this._execMouseCommand(CoreNavigationCommands.LastCursorWordSelect, this._usualArgs(viewPosition)); } private lineSelect(viewPosition: Position): void { - viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreCommands.LineSelect, { - position: this.convertViewToModelPosition(viewPosition), - viewPosition: viewPosition - }); + this._execMouseCommand(CoreNavigationCommands.LineSelect, this._usualArgs(viewPosition)); } private lineSelectDrag(viewPosition: Position): void { - viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreCommands.LineSelectDrag, { - position: this.convertViewToModelPosition(viewPosition), - viewPosition: viewPosition - }); + this._execMouseCommand(CoreNavigationCommands.LineSelectDrag, this._usualArgs(viewPosition)); } private lastCursorLineSelect(viewPosition: Position): void { - viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreCommands.LastCursorLineSelect, { - position: this.convertViewToModelPosition(viewPosition), - viewPosition: viewPosition - }); + this._execMouseCommand(CoreNavigationCommands.LastCursorLineSelect, this._usualArgs(viewPosition)); } private lastCursorLineSelectDrag(viewPosition: Position): void { - viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreCommands.LastCursorLineSelectDrag, { - position: this.convertViewToModelPosition(viewPosition), - viewPosition: viewPosition - }); + this._execMouseCommand(CoreNavigationCommands.LastCursorLineSelectDrag, this._usualArgs(viewPosition)); } private selectAll(): void { - this._execMouseCommand(CoreCommands.SelectAll, {}); + this._execMouseCommand(CoreNavigationCommands.SelectAll, {}); } // ---------------------- diff --git a/src/vs/editor/browser/view/viewImpl.ts b/src/vs/editor/browser/view/viewImpl.ts index 82d1a1914bbfb..792c2356cdc0e 100644 --- a/src/vs/editor/browser/view/viewImpl.ts +++ b/src/vs/editor/browser/view/viewImpl.ts @@ -6,21 +6,18 @@ import { onUnexpectedError } from 'vs/base/common/errors'; import { IDisposable } from 'vs/base/common/lifecycle'; -import * as browser from 'vs/base/browser/browser'; import * as dom from 'vs/base/browser/dom'; import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { Range } from 'vs/editor/common/core/range'; -import * as editorCommon from 'vs/editor/common/editorCommon'; import { ViewEventHandler } from 'vs/editor/common/viewModel/viewEventHandler'; import { Configuration } from 'vs/editor/browser/config/configuration'; -import { KeyboardHandler, IKeyboardHandlerHelper } from 'vs/editor/browser/controller/keyboardHandler'; +import { TextAreaHandler, ITextAreaHandlerHelper } from 'vs/editor/browser/controller/textAreaHandler'; import { PointerHandler } from 'vs/editor/browser/controller/pointerHandler'; import * as editorBrowser from 'vs/editor/browser/editorBrowser'; import { ViewController, ExecCoreEditorCommandFunc } from 'vs/editor/browser/view/viewController'; import { ViewEventDispatcher } from 'vs/editor/common/view/viewEventDispatcher'; import { ContentViewOverlays, MarginViewOverlays } from 'vs/editor/browser/view/viewOverlays'; -import { LayoutProvider } from 'vs/editor/common/viewLayout/viewLayout'; import { ViewContentWidgets } from 'vs/editor/browser/viewParts/contentWidgets/contentWidgets'; import { CurrentLineHighlightOverlay } from 'vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight'; import { CurrentLineMarginHighlightOverlay } from 'vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight'; @@ -50,7 +47,9 @@ import { ViewportData } from 'vs/editor/common/viewLayout/viewLinesViewportData' import { EditorScrollbar } from 'vs/editor/browser/viewParts/editorScrollbar/editorScrollbar'; import { Minimap } from 'vs/editor/browser/viewParts/minimap/minimap'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; -import { IEditorWhitespace } from 'vs/editor/common/viewLayout/whitespaceComputer'; +import { IThemeService, getThemeTypeSelector } from 'vs/platform/theme/common/themeService'; +import { Cursor } from 'vs/editor/common/controller/cursor'; +import { IMouseEvent } from 'vs/base/browser/mouseEvent'; export interface IContentWidgetData { widget: editorBrowser.IContentWidget; @@ -66,9 +65,9 @@ export class View extends ViewEventHandler { private eventDispatcher: ViewEventDispatcher; - private layoutProvider: LayoutProvider; private _scrollbar: EditorScrollbar; - public _context: ViewContext; + private _context: ViewContext; + private _cursor: Cursor; // The view lines private viewLines: ViewLines; @@ -80,20 +79,17 @@ export class View extends ViewEventHandler { private viewCursors: ViewCursors; private viewParts: ViewPart[]; - private keyboardHandler: KeyboardHandler; - private pointerHandler: PointerHandler; + private readonly _textAreaHandler: TextAreaHandler; + private readonly pointerHandler: PointerHandler; - private outgoingEvents: ViewOutgoingEvents; + private readonly outgoingEvents: ViewOutgoingEvents; // Dom nodes private linesContent: FastDomNode; public domNode: FastDomNode; - public textArea: FastDomNode; - private textAreaCover: FastDomNode; private overflowGuardContainer: FastDomNode; // Actual mutable state - private hasFocus: boolean; private _isDisposed: boolean; private _renderAnimationFrame: IDisposable; @@ -101,15 +97,18 @@ export class View extends ViewEventHandler { constructor( commandService: ICommandService, configuration: Configuration, + themeService: IThemeService, model: IViewModel, + cursor: Cursor, execCoreEditorCommandFunc: ExecCoreEditorCommandFunc ) { super(); this._isDisposed = false; + this._cursor = cursor; this._renderAnimationFrame = null; this.outgoingEvents = new ViewOutgoingEvents(model); - let viewController = new ViewController(model, execCoreEditorCommandFunc, this.outgoingEvents, commandService); + let viewController = new ViewController(configuration, model, execCoreEditorCommandFunc, this.outgoingEvents, commandService); // The event dispatcher will always go through _renderOnce before dispatching any events this.eventDispatcher = new ViewEventDispatcher((callback: () => void) => this._renderOnce(callback)); @@ -117,71 +116,34 @@ export class View extends ViewEventHandler { // Ensure the view is the first event handler in order to update the layout this.eventDispatcher.addEventHandler(this); - // The layout provider has such responsibilities as: - // - scrolling (i.e. viewport / full size) & co. - // - whitespaces (a.k.a. view zones) management & co. - // - line heights updating & co. - this.layoutProvider = new LayoutProvider(configuration, model.getLineCount(), this.eventDispatcher); - // The view context is passed on to most classes (basically to reduce param. counts in ctors) - this._context = new ViewContext(configuration, model, this.eventDispatcher); + this._context = new ViewContext(configuration, themeService.getTheme(), model, this.eventDispatcher); - this.createTextArea(); - this.createViewParts(); - this._setLayout(); + this._register(themeService.onThemeChange(theme => { + this._context.theme = theme; + this.eventDispatcher.emit(new viewEvents.ViewThemeChangedEvent()); + this.render(true, false); + })); + + this.viewParts = []; // Keyboard handler - this.keyboardHandler = new KeyboardHandler(this._context, viewController, this.createKeyboardHandlerHelper()); + this._textAreaHandler = new TextAreaHandler(this._context, viewController, this.createTextAreaHandlerHelper()); + this.viewParts.push(this._textAreaHandler); + + this.createViewParts(); + this._setLayout(); // Pointer handler this.pointerHandler = new PointerHandler(this._context, viewController, this.createPointerHandlerHelper()); - this.hasFocus = false; - this._register(model.addEventListener((events: viewEvents.ViewEvent[]) => { this.eventDispatcher.emitMany(events); })); - } - private createTextArea(): void { - // Text Area (The focus will always be in the textarea when the cursor is blinking) - this.textArea = createFastDomNode(document.createElement('textarea')); - PartFingerprints.write(this.textArea, PartFingerprint.TextArea); - this.textArea.setClassName('inputarea'); - this.textArea.setAttribute('wrap', 'off'); - this.textArea.setAttribute('autocorrect', 'off'); - this.textArea.setAttribute('autocapitalize', 'off'); - this.textArea.setAttribute('spellcheck', 'false'); - this.textArea.setAttribute('aria-label', this._context.configuration.editor.viewInfo.ariaLabel); - this.textArea.setAttribute('role', 'textbox'); - this.textArea.setAttribute('aria-multiline', 'true'); - this.textArea.setAttribute('aria-haspopup', 'false'); - this.textArea.setAttribute('aria-autocomplete', 'both'); - - this.textArea.setTop(0); - this.textArea.setLeft(0); - - this._register(dom.addDisposableListener(this.textArea.domNode, 'focus', () => this._setHasFocus(true))); - this._register(dom.addDisposableListener(this.textArea.domNode, 'blur', () => this._setHasFocus(false))); - - // On top of the text area, we position a dom node to cover it up - // (there have been reports of tiny blinking cursors) - // (in WebKit the textarea is 1px by 1px because it cannot handle input to a 0x0 textarea) - this.textAreaCover = createFastDomNode(document.createElement('div')); - if (this._context.configuration.editor.viewInfo.glyphMargin) { - this.textAreaCover.setClassName('monaco-editor-background ' + Margin.CLASS_NAME + ' ' + 'textAreaCover'); - } else { - if (this._context.configuration.editor.viewInfo.renderLineNumbers) { - this.textAreaCover.setClassName('monaco-editor-background ' + LineNumbersOverlay.CLASS_NAME + ' ' + 'textAreaCover'); - } else { - this.textAreaCover.setClassName('monaco-editor-background ' + 'textAreaCover'); - } - } - this.textAreaCover.setPosition('absolute'); - this.textAreaCover.setWidth(1); - this.textAreaCover.setHeight(1); - this.textAreaCover.setTop(0); - this.textAreaCover.setLeft(0); + this._register(this._cursor.addEventListener((events: viewEvents.ViewEvent[]) => { + this.eventDispatcher.emitMany(events); + })); } private createViewParts(): void { @@ -191,29 +153,24 @@ export class View extends ViewEventHandler { this.linesContent.setPosition('absolute'); this.domNode = createFastDomNode(document.createElement('div')); - this.domNode.setClassName(this._context.configuration.editor.viewInfo.editorClassName); + this.domNode.setClassName(this.getEditorClassName()); this.overflowGuardContainer = createFastDomNode(document.createElement('div')); PartFingerprints.write(this.overflowGuardContainer, PartFingerprint.OverflowGuard); this.overflowGuardContainer.setClassName('overflow-guard'); - this.viewParts = []; - - this._scrollbar = new EditorScrollbar(this._context, this.layoutProvider.getScrollable(), this.linesContent, this.domNode, this.overflowGuardContainer); + this._scrollbar = new EditorScrollbar(this._context, this.linesContent, this.domNode, this.overflowGuardContainer); this.viewParts.push(this._scrollbar); // View Lines - this.viewLines = new ViewLines(this._context, this.linesContent, this.layoutProvider); + this.viewLines = new ViewLines(this._context, this.linesContent); // View Zones - this.viewZones = new ViewZones(this._context, this.layoutProvider); + this.viewZones = new ViewZones(this._context); this.viewParts.push(this.viewZones); // Decorations overview ruler - let decorationsOverviewRuler = new DecorationsOverviewRuler( - this._context, this.layoutProvider.getScrollHeight(), - (lineNumber: number) => this.layoutProvider.getVerticalOffsetForLineNumber(lineNumber) - ); + let decorationsOverviewRuler = new DecorationsOverviewRuler(this._context); this.viewParts.push(decorationsOverviewRuler); @@ -254,7 +211,7 @@ export class View extends ViewEventHandler { let rulers = new Rulers(this._context); this.viewParts.push(rulers); - let minimap = new Minimap(this._context, this.layoutProvider, this._scrollbar); + let minimap = new Minimap(this._context); this.viewParts.push(minimap); // -------------- Wire dom nodes up @@ -273,9 +230,9 @@ export class View extends ViewEventHandler { this.overflowGuardContainer.appendChild(margin.getDomNode()); this.overflowGuardContainer.appendChild(this._scrollbar.getDomNode()); this.overflowGuardContainer.appendChild(scrollDecoration.getDomNode()); + this.overflowGuardContainer.appendChild(this._textAreaHandler.textArea); + this.overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover); this.overflowGuardContainer.appendChild(this.overlayWidgets.getDomNode()); - this.overflowGuardContainer.appendChild(this.textArea); - this.overflowGuardContainer.appendChild(this.textAreaCover); this.overflowGuardContainer.appendChild(minimap.getDomNode()); this.domNode.appendChild(this.overflowGuardContainer); this.domNode.appendChild(this.contentWidgets.overflowingContentWidgetsDomNode); @@ -294,29 +251,6 @@ export class View extends ViewEventHandler { this.focus(); }, - getScrollLeft: () => { - return this.layoutProvider.getScrollLeft(); - }, - getScrollTop: () => { - return this.layoutProvider.getScrollTop(); - }, - - setScrollPosition: (position: editorCommon.INewScrollPosition) => { - this.layoutProvider.setScrollPosition(position); - }, - - isAfterLines: (verticalOffset: number) => { - return this.layoutProvider.isAfterLines(verticalOffset); - }, - getLineNumberAtVerticalOffset: (verticalOffset: number) => { - return this.layoutProvider.getLineNumberAtVerticalOffset(verticalOffset); - }, - getVerticalOffsetForLineNumber: (lineNumber: number) => { - return this.layoutProvider.getVerticalOffsetForLineNumber(lineNumber); - }, - getWhitespaceAtVerticalOffset: (verticalOffset: number) => { - return this.layoutProvider.getWhitespaceAtVerticalOffset(verticalOffset); - }, getLastViewCursorsRenderData: () => { return this.viewCursors.getLastRenderData() || []; }, @@ -347,10 +281,8 @@ export class View extends ViewEventHandler { }; } - private createKeyboardHandlerHelper(): IKeyboardHandlerHelper { + private createTextAreaHandlerHelper(): ITextAreaHandlerHelper { return { - viewDomNode: this.domNode, - textArea: this.textArea, visibleRangeForPositionRelativeToEditor: (lineNumber: number, column: number) => { this._flushAccumulatedAndRenderNow(); let visibleRanges = this.viewLines.visibleRangesForRange2(new Range(lineNumber, column, lineNumber, column)); @@ -358,22 +290,12 @@ export class View extends ViewEventHandler { return null; } return visibleRanges[0]; - }, - getVerticalOffsetForLineNumber: (lineNumber: number) => { - return this.layoutProvider.getVerticalOffsetForLineNumber(lineNumber); } }; } private _setLayout(): void { const layoutInfo = this._context.configuration.editor.layoutInfo; - if (browser.isChrome) { - /* tslint:disable:no-unused-variable */ - // Access overflowGuardContainer.clientWidth to prevent relayouting bug in Chrome - // See Bug 19676: Editor misses a layout event - let clientWidth = this.overflowGuardContainer.domNode.clientWidth + 'px'; - /* tslint:enable:no-unused-variable */ - } this.domNode.setWidth(layoutInfo.width); this.domNode.setHeight(layoutInfo.height); @@ -385,23 +307,19 @@ export class View extends ViewEventHandler { } + private getEditorClassName() { + return this._context.configuration.editor.editorClassName + ' ' + getThemeTypeSelector(this._context.theme.type); + } + // --- begin event handlers public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { - if (e.viewInfo.editorClassName) { - this.domNode.setClassName(this._context.configuration.editor.viewInfo.editorClassName); - } - if (e.viewInfo.ariaLabel) { - this.textArea.setAttribute('aria-label', this._context.configuration.editor.viewInfo.ariaLabel); + if (e.editorClassName) { + this.domNode.setClassName(this.getEditorClassName()); } if (e.layoutInfo) { this._setLayout(); } - this.layoutProvider.onConfigurationChanged(e); - return false; - } - public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { - this.layoutProvider.onFlushed(this._context.model.getLineCount()); return false; } public onFocusChanged(e: viewEvents.ViewFocusChangedEvent): boolean { @@ -413,22 +331,12 @@ export class View extends ViewEventHandler { } return false; } - public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { - this.layoutProvider.onLinesDeleted(e); - return false; - } - public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { - this.layoutProvider.onLinesInserted(e); - return false; - } public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { this.outgoingEvents.emitScrollChanged(e); return false; } - public onScrollRequest(e: viewEvents.ViewScrollRequestEvent): boolean { - this.layoutProvider.setScrollPosition({ - scrollTop: e.desiredScrollTop - }); + public onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean { + this.domNode.setClassName(this.getEditorClassName()); return false; } @@ -444,7 +352,6 @@ export class View extends ViewEventHandler { this.eventDispatcher.removeEventHandler(this); this.outgoingEvents.dispose(); - this.keyboardHandler.dispose(); this.pointerHandler.dispose(); this.viewLines.dispose(); @@ -455,8 +362,6 @@ export class View extends ViewEventHandler { } this.viewParts = []; - this.layoutProvider.dispose(); - super.dispose(); } @@ -501,28 +406,28 @@ export class View extends ViewEventHandler { if (!this.viewLines.shouldRender() && viewPartsToRender.length === 0) { // Nothing to render - this.keyboardHandler.writeToTextArea(); return; } - let partialViewportData = this.layoutProvider.getLinesViewportData(); + const partialViewportData = this._context.viewLayout.getLinesViewportData(); this._context.model.setViewport(partialViewportData.startLineNumber, partialViewportData.endLineNumber, partialViewportData.centeredLineNumber); - let viewportData = new ViewportData(partialViewportData, this._context.model); + let viewportData = new ViewportData( + this._cursor.getViewSelections(), + partialViewportData, + this._context.viewLayout.getWhitespaceViewportData(), + this._context.model + ); if (this.viewLines.shouldRender()) { - this.viewLines.renderText(viewportData, () => { - this.keyboardHandler.writeToTextArea(); - }); + this.viewLines.renderText(viewportData); this.viewLines.onDidRender(); // Rendering of viewLines might cause scroll events to occur, so collect view parts to render again viewPartsToRender = this._getViewPartsToRender(); - } else { - this.keyboardHandler.writeToTextArea(); } - let renderingContext = new RenderingContext(this.layoutProvider, viewportData, this.viewLines); + let renderingContext = new RenderingContext(this._context.viewLayout, viewportData, this.viewLines); // Render the rest of the parts for (let i = 0, len = viewPartsToRender.length; i < len; i++) { @@ -537,40 +442,9 @@ export class View extends ViewEventHandler { } } - private _setHasFocus(newHasFocus: boolean): void { - if (this.hasFocus !== newHasFocus) { - this.hasFocus = newHasFocus; - this._context.privateViewEventBus.emit(new viewEvents.ViewFocusChangedEvent(this.hasFocus)); - } - } - // --- BEGIN CodeEditor helpers - public getScrollWidth(): number { - return this.layoutProvider.getScrollWidth(); - } - - public getScrollLeft(): number { - return this.layoutProvider.getScrollLeft(); - } - - public getScrollHeight(): number { - return this.layoutProvider.getScrollHeight(); - } - - public getScrollTop(): number { - return this.layoutProvider.getScrollTop(); - } - - public setScrollPosition(scrollPosition: editorCommon.INewScrollPosition): void { - this.layoutProvider.setScrollPosition(scrollPosition); - } - - public getVerticalOffsetForViewLineNumber(viewLineNumber: number): number { - return this.layoutProvider.getVerticalOffsetForLineNumber(viewLineNumber); - } - - public delegateVerticalScrollbarMouseDown(browserEvent: MouseEvent): void { + public delegateVerticalScrollbarMouseDown(browserEvent: IMouseEvent): void { this._scrollbar.delegateVerticalScrollbarMouseDown(browserEvent); } @@ -592,37 +466,12 @@ export class View extends ViewEventHandler { return this.pointerHandler.getTargetAtClientPoint(clientX, clientY); } - public getCompletelyVisibleViewRange(): Range { - const partialData = this.layoutProvider.getLinesViewportData(); - const startViewLineNumber = partialData.completelyVisibleStartLineNumber; - const endViewLineNumber = partialData.completelyVisibleEndLineNumber; - - return new Range( - startViewLineNumber, this._context.model.getLineMinColumn(startViewLineNumber), - endViewLineNumber, this._context.model.getLineMaxColumn(endViewLineNumber) - ); - } - - public getCompletelyVisibleViewRangeAtScrollTop(scrollTop: number): Range { - const partialData = this.layoutProvider.getLinesViewportDataAtScrollTop(scrollTop); - const startViewLineNumber = partialData.completelyVisibleStartLineNumber; - const endViewLineNumber = partialData.completelyVisibleEndLineNumber; - - return new Range( - startViewLineNumber, this._context.model.getLineMinColumn(startViewLineNumber), - endViewLineNumber, this._context.model.getLineMaxColumn(endViewLineNumber) - ); - } - public getInternalEventBus(): ViewOutgoingEvents { return this.outgoingEvents; } public createOverviewRuler(cssClassName: string, minimumHeight: number, maximumHeight: number): OverviewRuler { - return new OverviewRuler( - this._context, cssClassName, this.layoutProvider.getScrollHeight(), minimumHeight, maximumHeight, - (lineNumber: number) => this.layoutProvider.getVerticalOffsetForLineNumber(lineNumber) - ); + return new OverviewRuler(this._context, cssClassName, minimumHeight, maximumHeight); } public change(callback: (changeAccessor: editorBrowser.IViewZoneChangeAccessor) => any): boolean { @@ -655,17 +504,13 @@ export class View extends ViewEventHandler { changeAccessor.removeZone = null; if (zonesHaveChanged) { - this.layoutProvider.onHeightMaybeChanged(); + this._context.viewLayout.onHeightMaybeChanged(); this._context.privateViewEventBus.emit(new viewEvents.ViewZonesChangedEvent()); } }); return zonesHaveChanged; } - public getWhitespaces(): IEditorWhitespace[] { - return this.layoutProvider.getWhitespaces(); - } - public render(now: boolean, everything: boolean): void { if (everything) { // Force everything to render... @@ -683,38 +528,15 @@ export class View extends ViewEventHandler { } public setAriaActiveDescendant(id: string): void { - if (id) { - this.textArea.setAttribute('role', 'combobox'); - if (this.textArea.getAttribute('aria-activedescendant') !== id) { - this.textArea.setAttribute('aria-haspopup', 'true'); - this.textArea.setAttribute('aria-activedescendant', id); - } - } else { - this.textArea.setAttribute('role', 'textbox'); - this.textArea.removeAttribute('aria-activedescendant'); - this.textArea.removeAttribute('aria-haspopup'); - } - } - - public saveState(): editorCommon.IViewState { - return this.layoutProvider.saveState(); - } - - public restoreState(state: editorCommon.IViewState): void { - return this.layoutProvider.restoreState(state); + this._textAreaHandler.setAriaActiveDescendant(id); } public focus(): void { - this.keyboardHandler.focusTextArea(); - - // IE does not trigger the focus event immediately, so we must help it a little bit - if (document.activeElement === this.textArea.domNode) { - this._setHasFocus(true); - } + this._textAreaHandler.focusTextArea(); } public isFocused(): boolean { - return this.hasFocus; + return this._textAreaHandler.isFocused(); } public addContentWidget(widgetData: IContentWidgetData): void { diff --git a/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts b/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts index 3a2a8ae1fe1bb..15adceca2e1f3 100644 --- a/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts +++ b/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts @@ -14,36 +14,6 @@ import { RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/v import { Position, IPosition } from 'vs/editor/common/core/position'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; -interface IWidgetData { - allowEditorOverflow: boolean; - widget: IContentWidget; - position: IPosition; - preference: ContentWidgetPositionPreference[]; - isVisible: boolean; - domNode: FastDomNode; -} - -interface IWidgetMap { - [key: string]: IWidgetData; -} - -interface IBoxLayoutResult { - aboveTop: number; - fitsAbove: boolean; - belowTop: number; - fitsBelow: boolean; - left: number; -} - -interface IMyWidgetRenderData { - top: number; - left: number; -} - -interface IMyRenderData { - [id: string]: IMyWidgetRenderData; -} - class Coordinate { _coordinateBrand: void; @@ -58,25 +28,16 @@ class Coordinate { export class ViewContentWidgets extends ViewPart { - private _widgets: IWidgetMap; - private _contentWidth: number; - private _contentLeft: number; - private _lineHeight: number; - private _renderData: IMyRenderData; + private _viewDomNode: FastDomNode; + private _widgets: { [key: string]: Widget; }; public domNode: FastDomNode; public overflowingContentWidgetsDomNode: FastDomNode; - private _viewDomNode: FastDomNode; constructor(context: ViewContext, viewDomNode: FastDomNode) { super(context); this._viewDomNode = viewDomNode; - this._widgets = {}; - this._contentWidth = this._context.configuration.editor.layoutInfo.contentWidth; - this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft; - this._lineHeight = this._context.configuration.editor.lineHeight; - this._renderData = {}; this.domNode = createFastDomNode(document.createElement('div')); PartFingerprints.write(this.domNode, PartFingerprint.ContentWidgets); @@ -98,39 +59,16 @@ export class ViewContentWidgets extends ViewPart { // --- begin event handlers public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { - if (e.lineHeight) { - this._lineHeight = this._context.configuration.editor.lineHeight; - } - if (e.layoutInfo) { - this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft; - - if (this._contentWidth !== this._context.configuration.editor.layoutInfo.contentWidth) { - this._contentWidth = this._context.configuration.editor.layoutInfo.contentWidth; - // update the maxWidth on widgets nodes, such that `onReadAfterForcedLayout` - // below can read out the adjusted width/height of widgets - let keys = Object.keys(this._widgets); - for (let i = 0, len = keys.length; i < len; i++) { - const widgetId = keys[i]; - const widgetData = this._widgets[widgetId]; - const maxWidth = widgetData.allowEditorOverflow - ? window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth - : this._contentWidth; - - widgetData.domNode.setMaxWidth(maxWidth); - } - } + let keys = Object.keys(this._widgets); + for (let i = 0, len = keys.length; i < len; i++) { + const widgetId = keys[i]; + this._widgets[widgetId].onConfigurationChanged(e); } return true; } - public onCursorPositionChanged(e: viewEvents.ViewCursorPositionChangedEvent): boolean { - return false; - } - public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { - return false; - } public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { // true for inline decorations that can end up relayouting text - return true;//e.inlineDecorationsChanged; + return true; } public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { return true; @@ -144,9 +82,6 @@ export class ViewContentWidgets extends ViewPart { public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { return true; } - public onRevealRangeRequest(e: viewEvents.ViewRevealRangeRequestEvent): boolean { - return false; - } public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return true; } @@ -156,49 +91,33 @@ export class ViewContentWidgets extends ViewPart { // ---- end view event handlers - public addWidget(widget: IContentWidget): void { - const domNode = createFastDomNode(widget.getDomNode()); + public addWidget(_widget: IContentWidget): void { + const myWidget = new Widget(this._context, this._viewDomNode, _widget); + this._widgets[myWidget.id] = myWidget; - const widgetData: IWidgetData = { - allowEditorOverflow: widget.allowEditorOverflow || false, - widget: widget, - position: null, - preference: null, - isVisible: false, - domNode: domNode - }; - this._widgets[widget.getId()] = widgetData; - - domNode.setPosition((this._context.configuration.editor.viewInfo.fixedOverflowWidgets && widget.allowEditorOverflow) ? 'fixed' : 'absolute'); - domNode.setMaxWidth(this._contentWidth); - domNode.setVisibility('hidden'); - domNode.setAttribute('widgetId', widget.getId()); - - if (widgetData.allowEditorOverflow) { - this.overflowingContentWidgetsDomNode.appendChild(domNode); + if (myWidget.allowEditorOverflow) { + this.overflowingContentWidgetsDomNode.appendChild(myWidget.domNode); } else { - this.domNode.appendChild(domNode); + this.domNode.appendChild(myWidget.domNode); } this.setShouldRender(); } public setWidgetPosition(widget: IContentWidget, position: IPosition, preference: ContentWidgetPositionPreference[]): void { - let widgetData = this._widgets[widget.getId()]; - - widgetData.position = position; - widgetData.preference = preference; + const myWidget = this._widgets[widget.getId()]; + myWidget.setPosition(position, preference); this.setShouldRender(); } public removeWidget(widget: IContentWidget): void { - let widgetId = widget.getId(); + const widgetId = widget.getId(); if (this._widgets.hasOwnProperty(widgetId)) { - let widgetData = this._widgets[widgetId]; + const myWidget = this._widgets[widgetId]; delete this._widgets[widgetId]; - const domNode = widgetData.domNode.domNode; + const domNode = myWidget.domNode.domNode; domNode.parentNode.removeChild(domNode); domNode.removeAttribute('monaco-visible-content-widget'); @@ -208,12 +127,107 @@ export class ViewContentWidgets extends ViewPart { public shouldSuppressMouseDownOnWidget(widgetId: string): boolean { if (this._widgets.hasOwnProperty(widgetId)) { - let widgetData = this._widgets[widgetId]; - return widgetData.widget.suppressMouseDown; + return this._widgets[widgetId].suppressMouseDown; } return false; } + public prepareRender(ctx: RenderingContext): void { + let keys = Object.keys(this._widgets); + for (let i = 0, len = keys.length; i < len; i++) { + const widgetId = keys[i]; + this._widgets[widgetId].prepareRender(ctx); + } + } + + public render(ctx: RestrictedRenderingContext): void { + let keys = Object.keys(this._widgets); + for (let i = 0, len = keys.length; i < len; i++) { + const widgetId = keys[i]; + this._widgets[widgetId].render(ctx); + } + } +} + +interface IBoxLayoutResult { + aboveTop: number; + fitsAbove: boolean; + belowTop: number; + fitsBelow: boolean; + left: number; +} + +class Widget { + private readonly _context: ViewContext; + private readonly _viewDomNode: FastDomNode; + private readonly _actual: IContentWidget; + + public readonly domNode: FastDomNode; + public readonly id: string; + public readonly allowEditorOverflow: boolean; + public readonly suppressMouseDown: boolean; + + private _fixedOverflowWidgets: boolean; + private _contentWidth: number; + private _contentLeft: number; + private _lineHeight: number; + + private _position: IPosition; + private _preference: ContentWidgetPositionPreference[]; + private _isVisible: boolean; + private _renderData: Coordinate; + + constructor(context: ViewContext, viewDomNode: FastDomNode, actual: IContentWidget) { + this._context = context; + this._viewDomNode = viewDomNode; + this._actual = actual; + this.domNode = createFastDomNode(this._actual.getDomNode()); + + this.id = this._actual.getId(); + this.allowEditorOverflow = this._actual.allowEditorOverflow || false; + this.suppressMouseDown = this._actual.suppressMouseDown || false; + + this._fixedOverflowWidgets = this._context.configuration.editor.viewInfo.fixedOverflowWidgets; + this._contentWidth = this._context.configuration.editor.layoutInfo.contentWidth; + this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft; + this._lineHeight = this._context.configuration.editor.lineHeight; + + this._position = null; + this._preference = null; + this._isVisible = false; + this._renderData = null; + + this.domNode.setPosition((this._fixedOverflowWidgets && this.allowEditorOverflow) ? 'fixed' : 'absolute'); + this._updateMaxWidth(); + this.domNode.setVisibility('hidden'); + this.domNode.setAttribute('widgetId', this.id); + } + + public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): void { + if (e.lineHeight) { + this._lineHeight = this._context.configuration.editor.lineHeight; + } + if (e.layoutInfo) { + this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft; + this._contentWidth = this._context.configuration.editor.layoutInfo.contentWidth; + + this._updateMaxWidth(); + } + } + + private _updateMaxWidth(): void { + const maxWidth = this.allowEditorOverflow + ? window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth + : this._contentWidth; + + this.domNode.setMaxWidth(maxWidth); + } + + public setPosition(position: IPosition, preference: ContentWidgetPositionPreference[]): void { + this._position = position; + this._preference = preference; + } + private _layoutBoxInViewport(topLeft: Coordinate, width: number, height: number, ctx: RenderingContext): IBoxLayoutResult { // Our visible box is split horizontally by the current line => 2 boxes @@ -285,7 +299,7 @@ export class ViewContentWidgets extends ViewPart { left -= delta; } - if (this._context.configuration.editor.viewInfo.fixedOverflowWidgets) { + if (this._fixedOverflowWidgets) { aboveTop = absoluteAboveTop; belowTop = absoluteBelowTop; left = absoluteLeft; @@ -294,17 +308,8 @@ export class ViewContentWidgets extends ViewPart { return { aboveTop, fitsAbove, belowTop, fitsBelow, left }; } - private _prepareRenderWidgetAtExactPosition(topLeft: Coordinate): IMyWidgetRenderData { - return { - top: topLeft.top, - left: topLeft.left - }; - } - - private _prepareRenderWidgetAtExactPositionOverflowing(topLeft: Coordinate): IMyWidgetRenderData { - let r = this._prepareRenderWidgetAtExactPosition(topLeft); - r.left += this._contentLeft; - return r; + private _prepareRenderWidgetAtExactPositionOverflowing(topLeft: Coordinate): Coordinate { + return new Coordinate(topLeft.top, topLeft.left + this._contentLeft); } private _getTopLeft(ctx: RenderingContext, position: Position): Coordinate { @@ -317,13 +322,13 @@ export class ViewContentWidgets extends ViewPart { return new Coordinate(top, visibleRange.left); } - private _prepareRenderWidget(widgetData: IWidgetData, ctx: RenderingContext): IMyWidgetRenderData { - if (!widgetData.position || !widgetData.preference) { + private _prepareRenderWidget(ctx: RenderingContext): Coordinate { + if (!this._position || !this._preference) { return null; } // Do not trust that widgets have a valid position - let validModelPosition = this._context.model.validateModelPosition(widgetData.position); + let validModelPosition = this._context.model.validateModelPosition(this._position); if (!this._context.model.coordinatesConverter.modelPositionIsVisible(validModelPosition)) { // this position is hidden by the view model @@ -333,21 +338,21 @@ export class ViewContentWidgets extends ViewPart { let position = this._context.model.coordinatesConverter.convertModelPositionToViewPosition(validModelPosition); let placement: IBoxLayoutResult = null; - let fetchPlacement = () => { + let fetchPlacement = (): void => { if (placement) { return; } const topLeft = this._getTopLeft(ctx, position); if (!topLeft) { - return null; + return; } - const domNode = widgetData.domNode.domNode; + const domNode = this.domNode.domNode; const width = domNode.clientWidth; const height = domNode.clientHeight; - if (widgetData.allowEditorOverflow) { + if (this.allowEditorOverflow) { placement = this._layoutBoxInPage(topLeft, width, height, ctx); } else { placement = this._layoutBoxInViewport(topLeft, width, height, ctx); @@ -356,8 +361,8 @@ export class ViewContentWidgets extends ViewPart { // Do two passes, first for perfect fit, second picks first option for (let pass = 1; pass <= 2; pass++) { - for (let i = 0; i < widgetData.preference.length; i++) { - let pref = widgetData.preference[i]; + for (let i = 0; i < this._preference.length; i++) { + let pref = this._preference[i]; if (pref === ContentWidgetPositionPreference.ABOVE) { fetchPlacement(); if (!placement) { @@ -365,10 +370,7 @@ export class ViewContentWidgets extends ViewPart { return null; } if (pass === 2 || placement.fitsAbove) { - return { - top: placement.aboveTop, - left: placement.left - }; + return new Coordinate(placement.aboveTop, placement.left); } } else if (pref === ContentWidgetPositionPreference.BELOW) { fetchPlacement(); @@ -377,10 +379,7 @@ export class ViewContentWidgets extends ViewPart { return null; } if (pass === 2 || placement.fitsBelow) { - return { - top: placement.belowTop, - left: placement.left - }; + return new Coordinate(placement.belowTop, placement.left); } } else { const topLeft = this._getTopLeft(ctx, position); @@ -388,10 +387,10 @@ export class ViewContentWidgets extends ViewPart { // Widget outside of viewport return null; } - if (widgetData.allowEditorOverflow) { + if (this.allowEditorOverflow) { return this._prepareRenderWidgetAtExactPositionOverflowing(topLeft); } else { - return this._prepareRenderWidgetAtExactPosition(topLeft); + return topLeft; } } } @@ -400,49 +399,33 @@ export class ViewContentWidgets extends ViewPart { } public prepareRender(ctx: RenderingContext): void { - let data: IMyRenderData = {}; - - let keys = Object.keys(this._widgets); - for (let i = 0, len = keys.length; i < len; i++) { - let widgetId = keys[i]; - let renderData = this._prepareRenderWidget(this._widgets[widgetId], ctx); - if (renderData) { - data[widgetId] = renderData; - } - } - - this._renderData = data; + this._renderData = this._prepareRenderWidget(ctx); } public render(ctx: RestrictedRenderingContext): void { - let data = this._renderData; + if (!this._renderData) { + // This widget should be invisible + if (this._isVisible) { + this.domNode.removeAttribute('monaco-visible-content-widget'); + this._isVisible = false; + this.domNode.setVisibility('hidden'); + } + return; + } - let keys = Object.keys(this._widgets); - for (let i = 0, len = keys.length; i < len; i++) { - const widgetId = keys[i]; - const widget = this._widgets[widgetId]; - const domNode = widget.domNode; + // This widget should be visible + if (this.allowEditorOverflow) { + this.domNode.setTop(this._renderData.top); + this.domNode.setLeft(this._renderData.left); + } else { + this.domNode.setTop(this._renderData.top + ctx.scrollTop - ctx.bigNumbersDelta); + this.domNode.setLeft(this._renderData.left); + } - if (data.hasOwnProperty(widgetId)) { - if (widget.allowEditorOverflow) { - domNode.setTop(data[widgetId].top); - domNode.setLeft(data[widgetId].left); - } else { - domNode.setTop(data[widgetId].top + ctx.scrollTop - ctx.bigNumbersDelta); - domNode.setLeft(data[widgetId].left); - } - if (!widget.isVisible) { - domNode.setVisibility('inherit'); - domNode.setAttribute('monaco-visible-content-widget', 'true'); - widget.isVisible = true; - } - } else { - if (widget.isVisible) { - domNode.removeAttribute('monaco-visible-content-widget'); - widget.isVisible = false; - domNode.setVisibility('hidden'); - } - } + if (!this._isVisible) { + this.domNode.setVisibility('inherit'); + this.domNode.setAttribute('monaco-visible-content-widget', 'true'); + this._isVisible = true; } } } diff --git a/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts b/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts index e0ec23a3868d5..58e4ee7b40c08 100644 --- a/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts +++ b/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts @@ -55,7 +55,7 @@ export class CurrentLineHighlightOverlay extends DynamicViewOverlay { if (e.readOnly) { this._readOnly = this._context.configuration.editor.readOnly; } - if (e.viewInfo.renderLineHighlight) { + if (e.viewInfo) { this._renderLineHighlight = this._context.configuration.editor.viewInfo.renderLineHighlight; } if (e.layoutInfo) { @@ -63,30 +63,30 @@ export class CurrentLineHighlightOverlay extends DynamicViewOverlay { } return true; } - public onCursorPositionChanged(e: viewEvents.ViewCursorPositionChangedEvent): boolean { + public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { let hasChanged = false; + if (this._primaryCursorIsInEditableRange !== e.isInEditableRange) { this._primaryCursorIsInEditableRange = e.isInEditableRange; hasChanged = true; } - if (this._primaryCursorLineNumber !== e.position.lineNumber) { - this._primaryCursorLineNumber = e.position.lineNumber; + + const primaryCursorLineNumber = e.selections[0].positionLineNumber; + if (this._primaryCursorLineNumber !== primaryCursorLineNumber) { + this._primaryCursorLineNumber = primaryCursorLineNumber; hasChanged = true; } - return hasChanged; - } - public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { - let isEmpty = e.selection.isEmpty(); - if (this._selectionIsEmpty !== isEmpty) { - this._selectionIsEmpty = isEmpty; + + const selectionIsEmpty = e.selections[0].isEmpty(); + if (this._selectionIsEmpty !== selectionIsEmpty) { + this._selectionIsEmpty = selectionIsEmpty; + hasChanged = true; return true; } - return false; + + return hasChanged; } public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { - this._primaryCursorIsInEditableRange = true; - this._selectionIsEmpty = true; - this._primaryCursorLineNumber = 1; return true; } public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { @@ -134,14 +134,15 @@ export class CurrentLineHighlightOverlay extends DynamicViewOverlay { registerThemingParticipant((theme, collector) => { let lineHighlight = theme.getColor(editorLineHighlight); if (lineHighlight) { - collector.addRule(`.monaco-editor.${theme.selector} .view-overlays .current-line { background-color: ${lineHighlight}; border: none; }`); - } else { + collector.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${lineHighlight}; }`); + } + if (!lineHighlight || lineHighlight.isTransparent() || theme.defines(editorLineHighlightBorder)) { let lineHighlightBorder = theme.getColor(editorLineHighlightBorder); if (lineHighlightBorder) { - collector.addRule(`.monaco-editor.${theme.selector} .view-overlays .current-line { border: 2px solid ${lineHighlightBorder}; }`); - } - if (theme.type === 'hc') { - collector.addRule(`.monaco-editor.${theme.selector} .view-overlays .current-line { border-width: 1px; }`); + collector.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${lineHighlightBorder}; }`); + if (theme.type === 'hc') { + collector.addRule(`.monaco-editor .view-overlays .current-line { border-width: 1px; }`); + } } } }); diff --git a/src/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.ts b/src/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.ts index 1ceb0914cc8ef..38d980922e96f 100644 --- a/src/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.ts +++ b/src/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.ts @@ -46,7 +46,7 @@ export class CurrentLineMarginHighlightOverlay extends DynamicViewOverlay { if (e.lineHeight) { this._lineHeight = this._context.configuration.editor.lineHeight; } - if (e.viewInfo.renderLineHighlight) { + if (e.viewInfo) { this._renderLineHighlight = this._context.configuration.editor.viewInfo.renderLineHighlight; } if (e.layoutInfo) { @@ -54,21 +54,23 @@ export class CurrentLineMarginHighlightOverlay extends DynamicViewOverlay { } return true; } - public onCursorPositionChanged(e: viewEvents.ViewCursorPositionChangedEvent): boolean { + public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { let hasChanged = false; + if (this._primaryCursorIsInEditableRange !== e.isInEditableRange) { this._primaryCursorIsInEditableRange = e.isInEditableRange; hasChanged = true; } - if (this._primaryCursorLineNumber !== e.position.lineNumber) { - this._primaryCursorLineNumber = e.position.lineNumber; + + const primaryCursorLineNumber = e.selections[0].positionLineNumber; + if (this._primaryCursorLineNumber !== primaryCursorLineNumber) { + this._primaryCursorLineNumber = primaryCursorLineNumber; hasChanged = true; } + return hasChanged; } public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { - this._primaryCursorIsInEditableRange = true; - this._primaryCursorLineNumber = 1; return true; } public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { @@ -110,14 +112,14 @@ export class CurrentLineMarginHighlightOverlay extends DynamicViewOverlay { registerThemingParticipant((theme, collector) => { let lineHighlight = theme.getColor(editorLineHighlight); if (lineHighlight) { - collector.addRule(`.monaco-editor.${theme.selector} .margin-view-overlays .current-line-margin { background-color: ${lineHighlight}; border: none; }`); + collector.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${lineHighlight}; border: none; }`); } else { let lineHighlightBorder = theme.getColor(editorLineHighlightBorder); if (lineHighlightBorder) { - collector.addRule(`.monaco-editor.${theme.selector} .margin-view-overlays .current-line-margin { border: 2px solid ${lineHighlightBorder}; }`); + collector.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${lineHighlightBorder}; }`); } if (theme.type === 'hc') { - collector.addRule(`.monaco-editor.${theme.selector} .margin-view-overlays .current-line-margin { border-width: 1px; }`); + collector.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }`); } } }); diff --git a/src/vs/editor/browser/viewParts/decorations/decorations.ts b/src/vs/editor/browser/viewParts/decorations/decorations.ts index fc067376be2be..2cc107d4037d7 100644 --- a/src/vs/editor/browser/viewParts/decorations/decorations.ts +++ b/src/vs/editor/browser/viewParts/decorations/decorations.ts @@ -9,7 +9,7 @@ import 'vs/css!./decorations'; import { DynamicViewOverlay } from 'vs/editor/browser/view/dynamicViewOverlay'; import { Range } from 'vs/editor/common/core/range'; import { ViewContext } from 'vs/editor/common/view/viewContext'; -import { RenderingContext } from 'vs/editor/common/view/renderingContext'; +import { RenderingContext, HorizontalRange } from 'vs/editor/common/view/renderingContext'; import { ViewModelDecoration } from 'vs/editor/common/viewModel/viewModel'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; @@ -17,12 +17,14 @@ export class DecorationsOverlay extends DynamicViewOverlay { private _context: ViewContext; private _lineHeight: number; + private _typicalHalfwidthCharacterWidth: number; private _renderResult: string[]; constructor(context: ViewContext) { super(); this._context = context; this._lineHeight = this._context.configuration.editor.lineHeight; + this._typicalHalfwidthCharacterWidth = this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth; this._renderResult = null; this._context.addEventHandler(this); @@ -41,14 +43,11 @@ export class DecorationsOverlay extends DynamicViewOverlay { if (e.lineHeight) { this._lineHeight = this._context.configuration.editor.lineHeight; } + if (e.fontInfo) { + this._typicalHalfwidthCharacterWidth = this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth; + } return true; } - public onCursorPositionChanged(e: viewEvents.ViewCursorPositionChangedEvent): boolean { - return false; - } - public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { - return false; - } public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { return true; } @@ -64,9 +63,6 @@ export class DecorationsOverlay extends DynamicViewOverlay { public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { return true; } - public onRevealRangeRequest(e: viewEvents.ViewRevealRangeRequestEvent): boolean { - return false; - } public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return e.scrollTopChanged || e.scrollWidthChanged; } @@ -150,26 +146,40 @@ export class DecorationsOverlay extends DynamicViewOverlay { let visibleStartLineNumber = ctx.visibleRange.startLineNumber; for (let i = 0, lenI = decorations.length; i < lenI; i++) { - let d = decorations[i]; + const d = decorations[i]; if (d.source.options.isWholeLine) { continue; } - let className = d.source.options.className; + const className = d.source.options.className; + const showIfCollapsed = d.source.options.showIfCollapsed; + + let range = d.range; + if (showIfCollapsed && range.endColumn === 1 && range.endLineNumber !== range.startLineNumber) { + range = new Range(range.startLineNumber, range.startColumn, range.endLineNumber - 1, this._context.model.getLineMaxColumn(range.endLineNumber - 1)); + } - let linesVisibleRanges = ctx.linesVisibleRangesForRange(d.range, /*TODO@Alex*/className === 'findMatch'); + let linesVisibleRanges = ctx.linesVisibleRangesForRange(range, /*TODO@Alex*/className === 'findMatch'); if (!linesVisibleRanges) { continue; } for (let j = 0, lenJ = linesVisibleRanges.length; j < lenJ; j++) { let lineVisibleRanges = linesVisibleRanges[j]; - let lineIndex = lineVisibleRanges.lineNumber - visibleStartLineNumber; + const lineIndex = lineVisibleRanges.lineNumber - visibleStartLineNumber; + + if (showIfCollapsed && lineVisibleRanges.ranges.length === 1) { + const singleVisibleRange = lineVisibleRanges.ranges[0]; + if (singleVisibleRange.width === 0) { + // collapsed range case => make the decoration visible by faking its width + lineVisibleRanges.ranges[0] = new HorizontalRange(singleVisibleRange.left, this._typicalHalfwidthCharacterWidth); + } + } for (let k = 0, lenK = lineVisibleRanges.ranges.length; k < lenK; k++) { - let visibleRange = lineVisibleRanges.ranges[k]; - let decorationOutput = ( + const visibleRange = lineVisibleRanges.ranges[k]; + const decorationOutput = ( '
`; + result += `
`; left += tabWidth; } @@ -118,6 +120,6 @@ export class IndentGuidesOverlay extends DynamicViewOverlay { registerThemingParticipant((theme, collector) => { let editorGuideColor = theme.getColor(editorIndentGuides); if (editorGuideColor) { - collector.addRule(`.monaco-editor.${theme.selector} .lines-content .cigr { background-color: ${editorGuideColor}; }`); + collector.addRule(`.monaco-editor .lines-content .cigr { background-color: ${editorGuideColor}; }`); } }); diff --git a/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts b/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts index 677b42f4b53b4..f22cabdff440a 100644 --- a/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts +++ b/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts @@ -13,31 +13,45 @@ import { DynamicViewOverlay } from 'vs/editor/browser/view/dynamicViewOverlay'; import { ViewContext } from 'vs/editor/common/view/viewContext'; import { RenderingContext } from 'vs/editor/common/view/renderingContext'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; +import { Position } from 'vs/editor/common/core/position'; export class LineNumbersOverlay extends DynamicViewOverlay { public static CLASS_NAME = 'line-numbers'; private _context: ViewContext; + private _lineHeight: number; private _renderLineNumbers: boolean; + private _renderCustomLineNumbers: (lineNumber: number) => string; private _renderRelativeLineNumbers: boolean; private _lineNumbersLeft: number; private _lineNumbersWidth: number; + + private _lastCursorModelPosition: Position; private _renderResult: string[]; constructor(context: ViewContext) { super(); this._context = context; - this._lineHeight = this._context.configuration.editor.lineHeight; - this._renderLineNumbers = this._context.configuration.editor.viewInfo.renderLineNumbers; - this._renderRelativeLineNumbers = this._context.configuration.editor.viewInfo.renderRelativeLineNumbers; - this._lineNumbersLeft = this._context.configuration.editor.layoutInfo.lineNumbersLeft; - this._lineNumbersWidth = this._context.configuration.editor.layoutInfo.lineNumbersWidth; + + this._readConfig(); + + this._lastCursorModelPosition = new Position(1, 1); this._renderResult = null; this._context.addEventHandler(this); } + private _readConfig(): void { + const config = this._context.configuration.editor; + this._lineHeight = config.lineHeight; + this._renderLineNumbers = config.viewInfo.renderLineNumbers; + this._renderCustomLineNumbers = config.viewInfo.renderCustomLineNumbers; + this._renderRelativeLineNumbers = config.viewInfo.renderRelativeLineNumbers; + this._lineNumbersLeft = config.layoutInfo.lineNumbersLeft; + this._lineNumbersWidth = config.layoutInfo.lineNumbersWidth; + } + public dispose(): void { this._context.removeEventHandler(this); this._context = null; @@ -48,33 +62,18 @@ export class LineNumbersOverlay extends DynamicViewOverlay { // --- begin event handlers public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { - if (e.lineHeight) { - this._lineHeight = this._context.configuration.editor.lineHeight; - } - if (e.viewInfo.renderLineNumbers) { - this._renderLineNumbers = this._context.configuration.editor.viewInfo.renderLineNumbers; - } - if (e.viewInfo.renderRelativeLineNumbers) { - this._renderRelativeLineNumbers = this._context.configuration.editor.viewInfo.renderRelativeLineNumbers; - } - if (e.layoutInfo) { - this._lineNumbersLeft = this._context.configuration.editor.layoutInfo.lineNumbersLeft; - this._lineNumbersWidth = this._context.configuration.editor.layoutInfo.lineNumbersWidth; - } + this._readConfig(); return true; } - public onCursorPositionChanged(e: viewEvents.ViewCursorPositionChangedEvent): boolean { + public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { + const primaryViewPosition = e.selections[0].getPosition(); + this._lastCursorModelPosition = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(primaryViewPosition); + if (this._renderRelativeLineNumbers) { return true; } return false; } - public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { - return false; - } - public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { - return false; - } public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { return true; } @@ -87,9 +86,6 @@ export class LineNumbersOverlay extends DynamicViewOverlay { public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { return true; } - public onRevealRangeRequest(e: viewEvents.ViewRevealRangeRequestEvent): boolean { - return false; - } public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return e.scrollTopChanged; } @@ -99,6 +95,28 @@ export class LineNumbersOverlay extends DynamicViewOverlay { // --- end event handlers + private _getLineRenderLineNumber(viewLineNumber: number): string { + const modelPosition = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new Position(viewLineNumber, 1)); + if (modelPosition.column !== 1) { + return ''; + } + let modelLineNumber = modelPosition.lineNumber; + + if (this._renderCustomLineNumbers) { + return this._renderCustomLineNumbers(modelLineNumber); + } + + if (this._renderRelativeLineNumbers) { + let diff = Math.abs(this._lastCursorModelPosition.lineNumber - modelLineNumber); + if (diff === 0) { + return '' + modelLineNumber + ''; + } + return String(diff); + } + + return String(modelLineNumber); + } + public prepareRender(ctx: RenderingContext): void { if (!this._renderLineNumbers) { this._renderResult = null; @@ -114,7 +132,7 @@ export class LineNumbersOverlay extends DynamicViewOverlay { for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) { let lineIndex = lineNumber - visibleStartLineNumber; - let renderLineNumber = this._context.model.getLineRenderLineNumber(lineNumber); + let renderLineNumber = this._getLineRenderLineNumber(lineNumber); if (renderLineNumber) { output[lineIndex] = ( common @@ -146,6 +164,6 @@ export class LineNumbersOverlay extends DynamicViewOverlay { registerThemingParticipant((theme, collector) => { let lineNumbers = theme.getColor(editorLineNumbers); if (lineNumbers) { - collector.addRule(`.monaco-editor.${theme.selector} .line-numbers { color: ${lineNumbers}; }`); + collector.addRule(`.monaco-editor .line-numbers { color: ${lineNumbers}; }`); } }); \ No newline at end of file diff --git a/src/vs/editor/browser/viewParts/lines/viewLine.ts b/src/vs/editor/browser/viewParts/lines/viewLine.ts index 9ece4d64b19f0..48f82147dc4ca 100644 --- a/src/vs/editor/browser/viewParts/lines/viewLine.ts +++ b/src/vs/editor/browser/viewParts/lines/viewLine.ts @@ -15,6 +15,7 @@ import { IVisibleLine } from 'vs/editor/browser/view/viewLayer'; import { RangeUtil } from 'vs/editor/browser/viewParts/lines/rangeUtil'; import { HorizontalRange } from 'vs/editor/common/view/renderingContext'; import { ViewportData } from 'vs/editor/common/viewLayout/viewLinesViewportData'; +import { ThemeType, HIGH_CONTRAST } from 'vs/platform/theme/common/themeService'; const canUseFastRenderedViewLine = (function () { if (platform.isNative) { @@ -40,6 +41,8 @@ const canUseFastRenderedViewLine = (function () { return true; })(); +const alwaysRenderInlineSelection = (browser.isEdgeOrIE); + export class DomReadingContext { private readonly _domNode: HTMLElement; @@ -65,6 +68,7 @@ export class DomReadingContext { } export class ViewLineOptions { + public readonly themeType: ThemeType; public readonly renderWhitespace: 'none' | 'boundary' | 'all'; public readonly renderControlCharacters: boolean; public readonly spaceWidth: number; @@ -73,7 +77,8 @@ export class ViewLineOptions { public readonly stopRenderingLineAfter: number; public readonly fontLigatures: boolean; - constructor(config: IConfiguration) { + constructor(config: IConfiguration, themeType: ThemeType) { + this.themeType = themeType; this.renderWhitespace = config.editor.viewInfo.renderWhitespace; this.renderControlCharacters = config.editor.viewInfo.renderControlCharacters; this.spaceWidth = config.editor.fontInfo.spaceWidth; @@ -88,7 +93,8 @@ export class ViewLineOptions { public equals(other: ViewLineOptions): boolean { return ( - this.renderWhitespace === other.renderWhitespace + this.themeType === other.themeType + && this.renderWhitespace === other.renderWhitespace && this.renderControlCharacters === other.renderControlCharacters && this.spaceWidth === other.spaceWidth && this.useMonospaceOptimizations === other.useMonospaceOptimizations @@ -142,6 +148,13 @@ export class ViewLine implements IVisibleLine { this._isMaybeInvalid = true; this._options = newOptions; } + public onSelectionChanged(): boolean { + if (alwaysRenderInlineSelection || this._options.themeType === HIGH_CONTRAST) { + this._isMaybeInvalid = true; + return true; + } + return false; + } public renderLine(lineNumber: number, deltaTop: number, viewportData: ViewportData): string { if (this._isMaybeInvalid === false) { @@ -154,6 +167,26 @@ export class ViewLine implements IVisibleLine { const lineData = viewportData.getViewLineRenderingData(lineNumber); const options = this._options; const actualInlineDecorations = LineDecoration.filter(lineData.inlineDecorations, lineNumber, lineData.minColumn, lineData.maxColumn); + + if (alwaysRenderInlineSelection || options.themeType === HIGH_CONTRAST) { + const selections = viewportData.selections; + for (let i = 0, len = selections.length; i < len; i++) { + const selection = selections[i]; + + if (selection.endLineNumber < lineNumber || selection.startLineNumber > lineNumber) { + // Selection does not intersect line + continue; + } + + let startColumn = (selection.startLineNumber === lineNumber ? selection.startColumn : lineData.minColumn); + let endColumn = (selection.endLineNumber === lineNumber ? selection.endColumn : lineData.maxColumn); + + if (startColumn < endColumn) { + actualInlineDecorations.push(new LineDecoration(startColumn, endColumn, 'inline-selected-text', false)); + } + } + } + let renderLineInput = new RenderLineInput( options.useMonospaceOptimizations, lineData.content, diff --git a/src/vs/editor/browser/viewParts/lines/viewLines.ts b/src/vs/editor/browser/viewParts/lines/viewLines.ts index a5fdd8b254a83..60a1d51c3ed62 100644 --- a/src/vs/editor/browser/viewParts/lines/viewLines.ts +++ b/src/vs/editor/browser/viewParts/lines/viewLines.ts @@ -15,10 +15,9 @@ import { Configuration } from 'vs/editor/browser/config/configuration'; import { ViewContext } from 'vs/editor/common/view/viewContext'; import { ViewportData } from 'vs/editor/common/viewLayout/viewLinesViewportData'; import { IViewLines, HorizontalRange, LineVisibleRanges } from 'vs/editor/common/view/renderingContext'; -import { IViewLayout, Viewport } from 'vs/editor/common/viewModel/viewModel'; +import { Viewport } from 'vs/editor/common/viewModel/viewModel'; import { ViewPart, PartFingerprint, PartFingerprints } from 'vs/editor/browser/view/viewPart'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; -import { VerticalRevealType } from 'vs/editor/common/controller/cursorEvents'; class LastRenderedData { @@ -38,26 +37,22 @@ class LastRenderedData { } export class ViewLines extends ViewPart implements IVisibleLinesHost, IViewLines { - /** - * Width to extends a line to render the line feed at the end of the line - */ - private static LINE_FEED_WIDTH = 10; /** * Adds this ammount of pixels to the right of lines (no-one wants to type near the edge of the viewport) */ private static HORIZONTAL_EXTRA_PX = 30; private readonly _linesContent: FastDomNode; - private readonly _viewLayout: IViewLayout; private readonly _textRangeRestingSpot: HTMLElement; private readonly _visibleLines: VisibleLinesCollection; private readonly domNode: FastDomNode; // --- config private _lineHeight: number; + private _typicalHalfwidthCharacterWidth: number; private _isViewportWrapping: boolean; private _revealHorizontalRightPadding: number; - private _canUseTranslate3d: boolean; + private _canUseLayerHinting: boolean; private _viewLineOptions: ViewLineOptions; // --- width @@ -67,23 +62,25 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, private _lastCursorRevealRangeHorizontallyEvent: viewEvents.ViewRevealRangeRequestEvent; private _lastRenderedData: LastRenderedData; - constructor(context: ViewContext, linesContent: FastDomNode, viewLayout: IViewLayout) { + constructor(context: ViewContext, linesContent: FastDomNode) { super(context); this._linesContent = linesContent; - this._viewLayout = viewLayout; this._textRangeRestingSpot = document.createElement('div'); this._visibleLines = new VisibleLinesCollection(this); this.domNode = this._visibleLines.domNode; - this._lineHeight = this._context.configuration.editor.lineHeight; - this._isViewportWrapping = this._context.configuration.editor.wrappingInfo.isViewportWrapping; - this._revealHorizontalRightPadding = this._context.configuration.editor.viewInfo.revealHorizontalRightPadding; - this._canUseTranslate3d = this._context.configuration.editor.viewInfo.canUseTranslate3d; - this._viewLineOptions = new ViewLineOptions(this._context.configuration); + const conf = this._context.configuration; + + this._lineHeight = conf.editor.lineHeight; + this._typicalHalfwidthCharacterWidth = conf.editor.fontInfo.typicalHalfwidthCharacterWidth; + this._isViewportWrapping = conf.editor.wrappingInfo.isViewportWrapping; + this._revealHorizontalRightPadding = conf.editor.viewInfo.revealHorizontalRightPadding; + this._canUseLayerHinting = conf.editor.canUseLayerHinting; + this._viewLineOptions = new ViewLineOptions(conf, this._context.theme.type); PartFingerprints.write(this.domNode, PartFingerprint.ViewLines); this.domNode.setClassName('view-lines'); - Configuration.applyFontInfo(this.domNode, this._context.configuration.editor.fontInfo); + Configuration.applyFontInfo(this.domNode, conf.editor.fontInfo); // --- width & height this._maxLineWidth = 0; @@ -121,23 +118,39 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, this._maxLineWidth = 0; } + const conf = this._context.configuration; + if (e.lineHeight) { - this._lineHeight = this._context.configuration.editor.lineHeight; + this._lineHeight = conf.editor.lineHeight; + } + if (e.fontInfo) { + this._typicalHalfwidthCharacterWidth = conf.editor.fontInfo.typicalHalfwidthCharacterWidth; } if (e.wrappingInfo) { - this._isViewportWrapping = this._context.configuration.editor.wrappingInfo.isViewportWrapping; + this._isViewportWrapping = conf.editor.wrappingInfo.isViewportWrapping; } - if (e.viewInfo.revealHorizontalRightPadding) { - this._revealHorizontalRightPadding = this._context.configuration.editor.viewInfo.revealHorizontalRightPadding; + if (e.viewInfo) { + this._revealHorizontalRightPadding = conf.editor.viewInfo.revealHorizontalRightPadding; } - if (e.viewInfo.canUseTranslate3d) { - this._canUseTranslate3d = this._context.configuration.editor.viewInfo.canUseTranslate3d; + if (e.canUseLayerHinting) { + this._canUseLayerHinting = conf.editor.canUseLayerHinting; } if (e.fontInfo) { - Configuration.applyFontInfo(this.domNode, this._context.configuration.editor.fontInfo); + Configuration.applyFontInfo(this.domNode, conf.editor.fontInfo); } - let newViewLineOptions = new ViewLineOptions(this._context.configuration); + this._onOptionsMaybeChanged(); + + if (e.layoutInfo) { + this._maxLineWidth = 0; + } + + return true; + } + private _onOptionsMaybeChanged(): boolean { + const conf = this._context.configuration; + + let newViewLineOptions = new ViewLineOptions(conf, this._context.theme.type); if (!this._viewLineOptions.equals(newViewLineOptions)) { this._viewLineOptions = newViewLineOptions; @@ -147,13 +160,19 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, let line = this._visibleLines.getVisibleLine(lineNumber); line.onOptionsChanged(this._viewLineOptions); } + return true; } - if (e.layoutInfo) { - this._maxLineWidth = 0; + return false; + } + public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { + let rendStartLineNumber = this._visibleLines.getStartLineNumber(); + let rendEndLineNumber = this._visibleLines.getEndLineNumber(); + let r = false; + for (let lineNumber = rendStartLineNumber; lineNumber <= rendEndLineNumber; lineNumber++) { + r = this._visibleLines.getVisibleLine(lineNumber).onSelectionChanged() || r; } - - return true; + return r; } public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { if (true/*e.inlineDecorationsChanged*/) { @@ -180,13 +199,13 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, return this._visibleLines.onLinesInserted(e); } public onRevealRangeRequest(e: viewEvents.ViewRevealRangeRequestEvent): boolean { - let newScrollTop = this._computeScrollTopToRevealRange(this._viewLayout.getCurrentViewport(), e.range, e.verticalType); + let newScrollTop = this._computeScrollTopToRevealRange(this._context.viewLayout.getCurrentViewport(), e.range, e.verticalType); if (e.revealHorizontal) { this._lastCursorRevealRangeHorizontallyEvent = e; } - this._viewLayout.setScrollPosition({ + this._context.viewLayout.setScrollPosition({ // TODO@Alex: scrolling vertically can be moved to the view model scrollTop: newScrollTop }); @@ -203,6 +222,9 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { return this._visibleLines.onZonesChanged(e); } + public onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean { + return this._onOptionsMaybeChanged(); + } // ---- end view event handlers @@ -324,7 +346,7 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, nextLineModelLineNumber = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new Position(lineNumber + 1, 1)).lineNumber; if (currentLineModelLineNumber !== nextLineModelLineNumber) { - visibleRangesForLine[visibleRangesForLine.length - 1].width += ViewLines.LINE_FEED_WIDTH; + visibleRangesForLine[visibleRangesForLine.length - 1].width += this._typicalHalfwidthCharacterWidth; } } @@ -408,17 +430,14 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, throw new Error('Not supported'); } - public renderText(viewportData: ViewportData, onAfterLinesRendered: () => void): void { + public renderText(viewportData: ViewportData): void { // (1) render lines - ensures lines are in the DOM this._visibleLines.renderLines(viewportData); this._lastRenderedData.setCurrentVisibleRange(viewportData.visibleRange); - this.domNode.setWidth(this._viewLayout.getScrollWidth()); - this.domNode.setHeight(Math.min(this._viewLayout.getScrollHeight(), 1000000)); + this.domNode.setWidth(this._context.viewLayout.getScrollWidth()); + this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(), 1000000)); - // (2) execute DOM writing that forces sync layout (e.g. textArea manipulation) - onAfterLinesRendered(); - - // (3) compute horizontal scroll position: + // (2) compute horizontal scroll position: // - this must happen after the lines are in the DOM since it might need a line that rendered just now // - it might change `scrollWidth` and `scrollLeft` if (this._lastCursorRevealRangeHorizontallyEvent) { @@ -438,23 +457,16 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, } // set `scrollLeft` - this._viewLayout.setScrollPosition({ + this._context.viewLayout.setScrollPosition({ scrollLeft: newScrollLeft.scrollLeft }); } - // (4) handle scrolling - const adjustedScrollTop = this._viewLayout.getScrollTop() - viewportData.bigNumbersDelta; - if (this._canUseTranslate3d) { - let transform = 'translate3d(' + -this._viewLayout.getScrollLeft() + 'px, ' + -adjustedScrollTop + 'px, 0px)'; - this._linesContent.setTransform(transform); - this._linesContent.setTop(0); - this._linesContent.setLeft(0); - } else { - this._linesContent.setTransform(''); - this._linesContent.setTop(-adjustedScrollTop); - this._linesContent.setLeft(-this._viewLayout.getScrollLeft()); - } + // (3) handle scrolling + this._linesContent.setLayerHinting(this._canUseLayerHinting); + const adjustedScrollTop = this._context.viewLayout.getScrollTop() - viewportData.bigNumbersDelta; + this._linesContent.setTop(-adjustedScrollTop); + this._linesContent.setLeft(-this._context.viewLayout.getScrollLeft()); // Update max line width (not so important, it is just so the horizontal scrollbar doesn't get too small) this._asyncUpdateLineWidths.schedule(); @@ -466,11 +478,11 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, let iLineWidth = Math.ceil(lineWidth); if (this._maxLineWidth < iLineWidth) { this._maxLineWidth = iLineWidth; - this._viewLayout.onMaxLineWidthChanged(this._maxLineWidth); + this._context.viewLayout.onMaxLineWidthChanged(this._maxLineWidth); } } - private _computeScrollTopToRevealRange(viewport: Viewport, range: Range, verticalType: VerticalRevealType): number { + private _computeScrollTopToRevealRange(viewport: Viewport, range: Range, verticalType: viewEvents.VerticalRevealType): number { let viewportStartY = viewport.top; let viewportHeight = viewport.height; let viewportEndY = viewportStartY + viewportHeight; @@ -478,17 +490,17 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, let boxEndY: number; // Have a box that includes one extra line height (for the horizontal scrollbar) - boxStartY = this._viewLayout.getVerticalOffsetForLineNumber(range.startLineNumber); - boxEndY = this._viewLayout.getVerticalOffsetForLineNumber(range.endLineNumber) + this._lineHeight; - if (verticalType === VerticalRevealType.Simple || verticalType === VerticalRevealType.Bottom) { + boxStartY = this._context.viewLayout.getVerticalOffsetForLineNumber(range.startLineNumber); + boxEndY = this._context.viewLayout.getVerticalOffsetForLineNumber(range.endLineNumber) + this._lineHeight; + if (verticalType === viewEvents.VerticalRevealType.Simple || verticalType === viewEvents.VerticalRevealType.Bottom) { // Reveal one line more when the last line would be covered by the scrollbar - arrow down case or revealing a line explicitly at bottom boxEndY += this._lineHeight; } let newScrollTop: number; - if (verticalType === VerticalRevealType.Center || verticalType === VerticalRevealType.CenterIfOutsideViewport) { - if (verticalType === VerticalRevealType.CenterIfOutsideViewport && viewportStartY <= boxStartY && boxEndY <= viewportEndY) { + if (verticalType === viewEvents.VerticalRevealType.Center || verticalType === viewEvents.VerticalRevealType.CenterIfOutsideViewport) { + if (verticalType === viewEvents.VerticalRevealType.CenterIfOutsideViewport && viewportStartY <= boxStartY && boxEndY <= viewportEndY) { // Box is already in the viewport... do nothing newScrollTop = viewportStartY; } else { @@ -497,7 +509,7 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, newScrollTop = Math.max(0, boxMiddleY - viewportHeight / 2); } } else { - newScrollTop = this._computeMinimumScrolling(viewportStartY, viewportEndY, boxStartY, boxEndY, verticalType === VerticalRevealType.Top, verticalType === VerticalRevealType.Bottom); + newScrollTop = this._computeMinimumScrolling(viewportStartY, viewportEndY, boxStartY, boxEndY, verticalType === viewEvents.VerticalRevealType.Top, verticalType === viewEvents.VerticalRevealType.Bottom); } return newScrollTop; @@ -515,7 +527,7 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, }; } - let viewport = this._viewLayout.getCurrentViewport(); + let viewport = this._context.viewLayout.getCurrentViewport(); let viewportStartX = viewport.left; let viewportEndX = viewportStartX + viewport.width; diff --git a/src/vs/editor/browser/viewParts/linesDecorations/linesDecorations.ts b/src/vs/editor/browser/viewParts/linesDecorations/linesDecorations.ts index a5e31040b9d85..d9492ecd0fcff 100644 --- a/src/vs/editor/browser/viewParts/linesDecorations/linesDecorations.ts +++ b/src/vs/editor/browser/viewParts/linesDecorations/linesDecorations.ts @@ -44,12 +44,6 @@ export class LinesDecorationsOverlay extends DedupOverlay { } return true; } - public onCursorPositionChanged(e: viewEvents.ViewCursorPositionChangedEvent): boolean { - return false; - } - public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { - return false; - } public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { return true; } @@ -65,9 +59,6 @@ export class LinesDecorationsOverlay extends DedupOverlay { public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { return true; } - public onRevealRangeRequest(e: viewEvents.ViewRevealRangeRequestEvent): boolean { - return false; - } public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return e.scrollTopChanged; } diff --git a/src/vs/editor/browser/viewParts/margin/margin.ts b/src/vs/editor/browser/viewParts/margin/margin.ts index fb3de087cbfa2..bd3fc8b97a67e 100644 --- a/src/vs/editor/browser/viewParts/margin/margin.ts +++ b/src/vs/editor/browser/viewParts/margin/margin.ts @@ -16,7 +16,7 @@ export class Margin extends ViewPart { public static CLASS_NAME = 'glyph-margin'; private _domNode: FastDomNode; - private _canUseTranslate3d: boolean; + private _canUseLayerHinting: boolean; private _contentLeft: number; private _glyphMarginLeft: number; private _glyphMarginWidth: number; @@ -24,7 +24,7 @@ export class Margin extends ViewPart { constructor(context: ViewContext) { super(context); - this._canUseTranslate3d = this._context.configuration.editor.viewInfo.canUseTranslate3d; + this._canUseLayerHinting = this._context.configuration.editor.canUseLayerHinting; this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft; this._glyphMarginLeft = this._context.configuration.editor.layoutInfo.glyphMarginLeft; this._glyphMarginWidth = this._context.configuration.editor.layoutInfo.glyphMarginWidth; @@ -42,7 +42,7 @@ export class Margin extends ViewPart { private _createDomNode(): FastDomNode { let domNode = createFastDomNode(document.createElement('div')); - domNode.setClassName('margin' + ' monaco-editor-background'); + domNode.setClassName('margin'); domNode.setPosition('absolute'); domNode.setAttribute('role', 'presentation'); domNode.setAttribute('aria-hidden', 'true'); @@ -57,8 +57,8 @@ export class Margin extends ViewPart { // --- begin event handlers public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { - if (e.viewInfo.canUseTranslate3d) { - this._canUseTranslate3d = this._context.configuration.editor.viewInfo.canUseTranslate3d; + if (e.canUseLayerHinting) { + this._canUseLayerHinting = this._context.configuration.editor.canUseLayerHinting; } if (e.layoutInfo) { @@ -80,15 +80,9 @@ export class Margin extends ViewPart { } public render(ctx: RestrictedRenderingContext): void { + this._domNode.setLayerHinting(this._canUseLayerHinting); const adjustedScrollTop = ctx.scrollTop - ctx.bigNumbersDelta; - if (this._canUseTranslate3d) { - let transform = 'translate3d(0px, ' + -adjustedScrollTop + 'px, 0px)'; - this._domNode.setTransform(transform); - this._domNode.setTop(0); - } else { - this._domNode.setTransform(''); - this._domNode.setTop(-adjustedScrollTop); - } + this._domNode.setTop(-adjustedScrollTop); let height = Math.min(ctx.scrollHeight, 1000000); this._domNode.setHeight(height); diff --git a/src/vs/editor/browser/viewParts/marginDecorations/marginDecorations.ts b/src/vs/editor/browser/viewParts/marginDecorations/marginDecorations.ts index 07a6ea886598c..e1880451dd70b 100644 --- a/src/vs/editor/browser/viewParts/marginDecorations/marginDecorations.ts +++ b/src/vs/editor/browser/viewParts/marginDecorations/marginDecorations.ts @@ -34,12 +34,6 @@ export class MarginViewLineDecorationsOverlay extends DedupOverlay { public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { return true; } - public onCursorPositionChanged(e: viewEvents.ViewCursorPositionChangedEvent): boolean { - return false; - } - public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { - return false; - } public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { return true; } @@ -55,9 +49,6 @@ export class MarginViewLineDecorationsOverlay extends DedupOverlay { public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { return true; } - public onRevealRangeRequest(e: viewEvents.ViewRevealRangeRequestEvent): boolean { - return false; - } public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return e.scrollTopChanged; } diff --git a/src/vs/editor/browser/viewParts/minimap/minimap.css b/src/vs/editor/browser/viewParts/minimap/minimap.css index 636eee6a6c6d3..f3692e7e4dcdb 100644 --- a/src/vs/editor/browser/viewParts/minimap/minimap.css +++ b/src/vs/editor/browser/viewParts/minimap/minimap.css @@ -3,44 +3,18 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -.monaco-editor .minimap-slider { +/* START cover the case that slider is visible on mouseover */ +.monaco-editor .minimap.slider-mouseover .minimap-slider { opacity: 0; transition: opacity 100ms linear; } -.monaco-editor .minimap:hover .minimap-slider { +.monaco-editor .minimap.slider-mouseover:hover .minimap-slider { opacity: 1; } -.monaco-editor .minimap-slider.active { +.monaco-editor .minimap.slider-mouseover .minimap-slider.active { opacity: 1; } - -.monaco-editor.vs .minimap-slider { - background: rgba(100, 100, 100, .4); -} -.monaco-editor.vs-dark .minimap-slider { - background: rgba(121, 121, 121, .4); -} -.monaco-editor.hc-black .minimap-slider { - background: rgba(111, 195, 223, .6); -} - -.monaco-editor.vs .minimap-slider:hover, -.monaco-editor.vs-dark .minimap-slider:hover { - background: rgba(100, 100, 100, .7); -} -.monaco-editor.hc-black .minimap-slider:hover { - background: rgba(111, 195, 223, .8); -} - -.monaco-editor.vs .minimap-slider.active { - background: rgba(0, 0, 0, .6); -} -.monaco-editor.vs-dark .minimap-slider.active { - background: rgba(191, 191, 191, .4); -} -.monaco-editor.hc-black .minimap-slider.active { - background: rgba(111, 195, 223, 1); -} +/* END cover the case that slider is visible on mouseover */ .monaco-editor .minimap-shadow-hidden { position: absolute; @@ -50,9 +24,4 @@ position: absolute; left: -6px; width: 6px; - box-shadow: #DDD -6px 0 6px -6px inset; -} - -.monaco-editor.vs-dark .minimap-shadow-visible { - box-shadow: #000 -6px 0 6px -6px inset; } diff --git a/src/vs/editor/browser/viewParts/minimap/minimap.ts b/src/vs/editor/browser/viewParts/minimap/minimap.ts index a3c3dbae71daa..c60b9b2dbca02 100644 --- a/src/vs/editor/browser/viewParts/minimap/minimap.ts +++ b/src/vs/editor/browser/viewParts/minimap/minimap.ts @@ -10,23 +10,22 @@ import { ViewPart, PartFingerprint, PartFingerprints } from 'vs/editor/browser/v import { ViewContext } from 'vs/editor/common/view/viewContext'; import { RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/view/renderingContext'; import { getOrCreateMinimapCharRenderer } from 'vs/editor/common/view/runtimeMinimapCharRenderer'; -import * as browser from 'vs/base/browser/browser'; import * as dom from 'vs/base/browser/dom'; import { MinimapCharRenderer, MinimapTokensColorTracker, Constants } from 'vs/editor/common/view/minimapCharRenderer'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { CharCode } from 'vs/base/common/charCode'; -import { IViewLayout, ViewLineData } from 'vs/editor/common/viewModel/viewModel'; +import { ViewLineData } from 'vs/editor/common/viewModel/viewModel'; import { ColorId } from 'vs/editor/common/modes'; import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; import { IDisposable } from 'vs/base/common/lifecycle'; -import { EditorScrollbar } from 'vs/editor/browser/viewParts/editorScrollbar/editorScrollbar'; import { RenderedLinesCollection, ILine } from 'vs/editor/browser/view/viewLayer'; import { Range } from 'vs/editor/common/core/range'; import { RGBA } from 'vs/base/common/color'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { GlobalMouseMoveMonitor, IStandardMouseMoveEventData, standardMouseMoveMerger } from 'vs/base/browser/globalMouseMoveMonitor'; import * as platform from 'vs/base/common/platform'; -import { VerticalRevealType } from 'vs/editor/common/controller/cursorEvents'; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { scrollbarSliderBackground, scrollbarSliderHoverBackground, scrollbarSliderActiveBackground, scrollbarShadow } from 'vs/platform/theme/common/colorRegistry'; const enum RenderMinimap { None = 0, @@ -73,8 +72,14 @@ class MinimapOptions { public readonly renderMinimap: RenderMinimap; + public readonly scrollBeyondLastLine: boolean; + + public readonly showSlider: 'always' | 'mouseover'; + public readonly pixelRatio: number; + public readonly typicalHalfwidthCharacterWidth: number; + public readonly lineHeight: number; /** @@ -105,17 +110,22 @@ class MinimapOptions { public readonly canvasOuterHeight: number; constructor(configuration: editorCommon.IConfiguration) { - const pixelRatio = browser.getPixelRatio(); + const pixelRatio = configuration.editor.pixelRatio; const layoutInfo = configuration.editor.layoutInfo; + const viewInfo = configuration.editor.viewInfo; + const fontInfo = configuration.editor.fontInfo; this.renderMinimap = layoutInfo.renderMinimap | 0; + this.scrollBeyondLastLine = viewInfo.scrollBeyondLastLine; + this.showSlider = viewInfo.minimap.showSlider; this.pixelRatio = pixelRatio; + this.typicalHalfwidthCharacterWidth = fontInfo.typicalHalfwidthCharacterWidth; this.lineHeight = configuration.editor.lineHeight; this.minimapWidth = layoutInfo.minimapWidth; this.minimapHeight = layoutInfo.height; - this.canvasInnerWidth = Math.floor(pixelRatio * this.minimapWidth); - this.canvasInnerHeight = Math.floor(pixelRatio * this.minimapHeight); + this.canvasInnerWidth = Math.max(1, Math.floor(pixelRatio * this.minimapWidth)); + this.canvasInnerHeight = Math.max(1, Math.floor(pixelRatio * this.minimapHeight)); this.canvasOuterWidth = this.canvasInnerWidth / pixelRatio; this.canvasOuterHeight = this.canvasInnerHeight / pixelRatio; @@ -123,7 +133,10 @@ class MinimapOptions { public equals(other: MinimapOptions): boolean { return (this.renderMinimap === other.renderMinimap + && this.scrollBeyondLastLine === other.scrollBeyondLastLine + && this.showSlider === other.showSlider && this.pixelRatio === other.pixelRatio + && this.typicalHalfwidthCharacterWidth === other.typicalHalfwidthCharacterWidth && this.lineHeight === other.lineHeight && this.minimapWidth === other.minimapWidth && this.minimapHeight === other.minimapHeight @@ -137,6 +150,18 @@ class MinimapOptions { class MinimapLayout { + /** + * The given editor scrollTop (input). + */ + public readonly scrollTop: number; + + /** + * The given editor scrollHeight (input). + */ + public readonly scrollHeight: number; + + private readonly _computedSliderRatio: number; + /** * slider dom node top (in CSS px) */ @@ -156,145 +181,113 @@ class MinimapLayout { public readonly endLineNumber: number; constructor( - lastRenderData: RenderData, + scrollTop: number, + scrollHeight: number, + computedSliderRatio: number, + sliderTop: number, + sliderHeight: number, + startLineNumber: number, + endLineNumber: number + ) { + this.scrollTop = scrollTop; + this.scrollHeight = scrollHeight; + this._computedSliderRatio = computedSliderRatio; + this.sliderTop = sliderTop; + this.sliderHeight = sliderHeight; + this.startLineNumber = startLineNumber; + this.endLineNumber = endLineNumber; + } + + /** + * Compute a desired `scrollPosition` such that the slider moves by `delta`. + */ + public getDesiredScrollTopFromDelta(delta: number): number { + let desiredSliderPosition = this.sliderTop + delta; + return Math.round(desiredSliderPosition / this._computedSliderRatio); + } + + public static create( options: MinimapOptions, viewportStartLineNumber: number, viewportEndLineNumber: number, viewportHeight: number, + viewportContainsWhitespaceGaps: boolean, lineCount: number, - scrollbarSliderCenter: number - ) { + scrollTop: number, + scrollHeight: number, + previousLayout: MinimapLayout + ): MinimapLayout { const pixelRatio = options.pixelRatio; const minimapLineHeight = getMinimapLineHeight(options.renderMinimap); const minimapLinesFitting = Math.floor(options.canvasInnerHeight / minimapLineHeight); const lineHeight = options.lineHeight; - // Sometimes, the number of rendered lines varies for a constant viewport height. - // The reason is that only parts of the viewportStartLineNumber or viewportEndLineNumber are visible. - // This leads to an apparent tremor in the minimap's slider height. - // We try here to compensate, making the slider slightly incorrect in these cases, but more pleasing to the eye. - let viewportLineCount = viewportEndLineNumber - viewportStartLineNumber + 1; - const expectedViewportLineCount = Math.round(viewportHeight / lineHeight); - if (viewportLineCount > expectedViewportLineCount) { - viewportLineCount = expectedViewportLineCount; + // The visible line count in a viewport can change due to a number of reasons: + // a) with the same viewport width, different scroll positions can result in partial lines being visible: + // e.g. for a line height of 20, and a viewport height of 600 + // * scrollTop = 0 => visible lines are [1, 30] + // * scrollTop = 10 => visible lines are [1, 31] (with lines 1 and 31 partially visible) + // * scrollTop = 20 => visible lines are [2, 31] + // b) whitespace gaps might make their way in the viewport (which results in a decrease in the visible line count) + // c) we could be in the scroll beyond last line case (which also results in a decrease in the visible line count, down to possibly only one line being visible) + + // We must first establish a desirable slider height. + let sliderHeight: number; + if (viewportContainsWhitespaceGaps && viewportEndLineNumber !== lineCount) { + // case b) from above: there are whitespace gaps in the viewport. + // In this case, the height of the slider directly reflects the visible line count. + const viewportLineCount = viewportEndLineNumber - viewportStartLineNumber + 1; + sliderHeight = Math.floor(viewportLineCount * minimapLineHeight / pixelRatio); + } else { + // The slider has a stable height + const expectedViewportLineCount = viewportHeight / lineHeight; + sliderHeight = Math.floor(expectedViewportLineCount * minimapLineHeight / pixelRatio); } - if (minimapLinesFitting >= lineCount) { - // All lines fit in the minimap => no minimap scrolling - this.startLineNumber = 1; - this.endLineNumber = lineCount; + let maxMinimapSliderTop: number; + if (options.scrollBeyondLastLine) { + // The minimap slider, when dragged all the way down, will contain the last line at its top + maxMinimapSliderTop = (lineCount - 1) * minimapLineHeight / pixelRatio; } else { - // The desire is to align (centers) the minimap's slider with the scrollbar's slider - - // For a resolved this.startLineNumber, we can compute the minimap's slider's center with the following formula: - // scrollbarSliderCenter = (viewportStartLineNumber - this.startLineNumber + viewportLineCount/2) * minimapLineHeight / pixelRatio; - // => - // scrollbarSliderCenter = (viewportStartLineNumber - this.startLineNumber + viewportLineCount/2) * minimapLineHeight / pixelRatio; - // scrollbarSliderCenter * pixelRatio / minimapLineHeight = viewportStartLineNumber - this.startLineNumber + viewportLineCount/2 - // this.startLineNumber = viewportStartLineNumber + viewportLineCount/2 - scrollbarSliderCenter * pixelRatio / minimapLineHeight - let desiredStartLineNumber = Math.floor(viewportStartLineNumber + viewportLineCount / 2 - scrollbarSliderCenter * pixelRatio / minimapLineHeight); - let desiredEndLineNumber = desiredStartLineNumber + minimapLinesFitting - 1; - - // Aligning the slider's centers can result (correctly) in tremor. - // i.e. scrolling down might result in the startLineNumber going up. - // Avoid this tremor by being consistent w.r.t. the previous computed result - if (lastRenderData) { - const lastLayoutDecision = lastRenderData.renderedLayout; - if (lastLayoutDecision.viewportStartLineNumber <= viewportStartLineNumber) { - // going down => make sure we don't go above our previous decision - if (desiredStartLineNumber < lastLayoutDecision.startLineNumber) { - desiredStartLineNumber = lastLayoutDecision.startLineNumber; - desiredEndLineNumber = desiredStartLineNumber + minimapLinesFitting - 1; - } - } - if (lastLayoutDecision.viewportStartLineNumber >= viewportStartLineNumber) { - // going up => make sure we don't go below our previous decision - if (desiredEndLineNumber > lastLayoutDecision.endLineNumber) { - desiredEndLineNumber = lastLayoutDecision.endLineNumber; - desiredStartLineNumber = desiredEndLineNumber - minimapLinesFitting + 1; - } - } - } + // The minimap slider, when dragged all the way down, will contain the last line at its bottom + maxMinimapSliderTop = Math.max(0, lineCount * minimapLineHeight / pixelRatio - sliderHeight); + } + maxMinimapSliderTop = Math.min(options.minimapHeight - sliderHeight, maxMinimapSliderTop); - // Aligning the slider's centers is a very good thing, but this would make - // the minimap never scroll all the way to the top or to the bottom of the file. - // We therefore check that the viewport lines are in the minimap viewport. + // The slider can move from 0 to `maxMinimapSliderTop` + // in the same way `scrollTop` can move from 0 to `scrollHeight` - `viewportHeight`. + const computedSliderRatio = (maxMinimapSliderTop) / (scrollHeight - viewportHeight); + const sliderTop = (scrollTop * computedSliderRatio); - // (a) validate on start line number - if (desiredStartLineNumber < 1) { - // must start after 1 - desiredStartLineNumber = 1; - desiredEndLineNumber = desiredStartLineNumber + minimapLinesFitting - 1; - } - if (desiredStartLineNumber > viewportStartLineNumber) { - // must contain the viewport's start line number - desiredStartLineNumber = viewportStartLineNumber; - desiredEndLineNumber = desiredStartLineNumber + minimapLinesFitting - 1; - } + if (minimapLinesFitting >= lineCount) { + // All lines fit in the minimap + const startLineNumber = 1; + const endLineNumber = lineCount; - // (b) validate on end line number - if (desiredEndLineNumber > lineCount) { - // must end before line count - desiredEndLineNumber = lineCount; - desiredStartLineNumber = desiredEndLineNumber - minimapLinesFitting + 1; - } - if (desiredEndLineNumber < viewportEndLineNumber) { - // must contain the viewport's end line number - desiredEndLineNumber = viewportEndLineNumber; - desiredStartLineNumber = desiredEndLineNumber - minimapLinesFitting + 1; + return new MinimapLayout(scrollTop, scrollHeight, computedSliderRatio, sliderTop, sliderHeight, startLineNumber, endLineNumber); + } else { + let startLineNumber = Math.max(1, Math.floor(viewportStartLineNumber - sliderTop * pixelRatio / minimapLineHeight)); + + // Avoid flickering caused by a partial viewport start line + // by being consistent w.r.t. the previous layout decision + if (previousLayout && previousLayout.scrollHeight === scrollHeight) { + if (previousLayout.scrollTop > scrollTop) { + // Scrolling up => never increase `startLineNumber` + startLineNumber = Math.min(startLineNumber, previousLayout.startLineNumber); + } + if (previousLayout.scrollTop < scrollTop) { + // Scrolling down => never decrease `startLineNumber` + startLineNumber = Math.max(startLineNumber, previousLayout.startLineNumber); + } } - this.startLineNumber = desiredStartLineNumber; - this.endLineNumber = desiredEndLineNumber; - } + const endLineNumber = Math.min(lineCount, startLineNumber + minimapLinesFitting - 1); - this.sliderTop = Math.floor((viewportStartLineNumber - this.startLineNumber) * minimapLineHeight / pixelRatio); - if (viewportEndLineNumber === lineCount) { - // The last line is in the viewport => try to extend slider height below the painted lines - let desiredSliderHeight = Math.floor(expectedViewportLineCount * minimapLineHeight / pixelRatio); - if (this.sliderTop + desiredSliderHeight > options.minimapHeight) { - this.sliderHeight = options.minimapHeight - this.sliderTop; - } else { - this.sliderHeight = desiredSliderHeight; - } - } else { - this.sliderHeight = Math.floor(viewportLineCount * minimapLineHeight / pixelRatio); + return new MinimapLayout(scrollTop, scrollHeight, computedSliderRatio, sliderTop, sliderHeight, startLineNumber, endLineNumber); } } } -class RenderedLayout { - /** - * editor viewport start line number. - */ - public readonly viewportStartLineNumber: number; - /** - * editor viewport end line number. - */ - public readonly viewportEndLineNumber: number; - - /** - * minimap rendered start line number. - */ - public readonly startLineNumber: number; - /** - * minimap rendered end line number. - */ - public readonly endLineNumber: number; - - constructor( - viewportStartLineNumber: number, - viewportEndLineNumber: number, - startLineNumber: number, - endLineNumber: number - ) { - this.viewportStartLineNumber = viewportStartLineNumber; - this.viewportEndLineNumber = viewportEndLineNumber; - this.startLineNumber = startLineNumber; - this.endLineNumber = endLineNumber; - } -} - class MinimapLine implements ILine { public static INVALID = new MinimapLine(-1); @@ -318,12 +311,12 @@ class RenderData { /** * last rendered layout. */ - public readonly renderedLayout: RenderedLayout; + public readonly renderedLayout: MinimapLayout; private readonly _imageData: ImageData; private readonly _renderedLines: RenderedLinesCollection; constructor( - renderedLayout: RenderedLayout, + renderedLayout: MinimapLayout, imageData: ImageData, lines: MinimapLine[] ) { @@ -335,6 +328,29 @@ class RenderData { this._renderedLines._set(renderedLayout.startLineNumber, lines); } + /** + * Check if the current RenderData matches accurately the new desired layout and no painting is needed. + */ + public linesEquals(layout: MinimapLayout): boolean { + if (this.renderedLayout.startLineNumber !== layout.startLineNumber) { + return false; + } + if (this.renderedLayout.endLineNumber !== layout.endLineNumber) { + return false; + } + + const tmp = this._renderedLines._get(); + const lines = tmp.lines; + for (let i = 0, len = lines.length; i < len; i++) { + if (lines[i].dy === -1) { + // This line is invalid + return false; + } + } + + return true; + } + _get(): { imageData: ImageData; rendLineNumberStart: number; lines: MinimapLine[]; } { let tmp = this._renderedLines._get(); return { @@ -413,13 +429,11 @@ class MinimapBuffers { export class Minimap extends ViewPart { - private readonly _viewLayout: IViewLayout; - private readonly _editorScrollbar: EditorScrollbar; - private readonly _domNode: FastDomNode; private readonly _shadow: FastDomNode; private readonly _canvas: FastDomNode; private readonly _slider: FastDomNode; + private readonly _sliderHorizontal: FastDomNode; private readonly _tokensColorTracker: MinimapTokensColorTracker; private readonly _mouseDownListener: IDisposable; private readonly _sliderMouseMoveMonitor: GlobalMouseMoveMonitor; @@ -431,10 +445,8 @@ export class Minimap extends ViewPart { private _lastRenderData: RenderData; private _buffers: MinimapBuffers; - constructor(context: ViewContext, viewLayout: IViewLayout, editorScrollbar: EditorScrollbar) { + constructor(context: ViewContext) { super(context); - this._viewLayout = viewLayout; - this._editorScrollbar = editorScrollbar; this._options = new MinimapOptions(this._context.configuration); this._lastRenderData = null; @@ -442,8 +454,10 @@ export class Minimap extends ViewPart { this._domNode = createFastDomNode(document.createElement('div')); PartFingerprints.write(this._domNode, PartFingerprint.Minimap); - this._domNode.setClassName('minimap'); + this._domNode.setClassName(this._getMinimapDomNodeClassName()); this._domNode.setPosition('absolute'); + this._domNode.setAttribute('role', 'presentation'); + this._domNode.setAttribute('aria-hidden', 'true'); this._domNode.setRight(this._context.configuration.editor.layoutInfo.verticalScrollbarWidth); this._shadow = createFastDomNode(document.createElement('div')); @@ -458,8 +472,14 @@ export class Minimap extends ViewPart { this._slider = createFastDomNode(document.createElement('div')); this._slider.setPosition('absolute'); this._slider.setClassName('minimap-slider'); + this._slider.setLayerHinting(true); this._domNode.appendChild(this._slider); + this._sliderHorizontal = createFastDomNode(document.createElement('div')); + this._sliderHorizontal.setPosition('absolute'); + this._sliderHorizontal.setClassName('minimap-slider-horizontal'); + this._slider.appendChild(this._sliderHorizontal); + this._tokensColorTracker = MinimapTokensColorTracker.getInstance(); this._minimapCharRenderer = getOrCreateMinimapCharRenderer(); @@ -485,7 +505,7 @@ export class Minimap extends ViewPart { this._context.privateViewEventBus.emit(new viewEvents.ViewRevealRangeRequestEvent( new Range(lineNumber, 1, lineNumber, 1), - VerticalRevealType.Center, + viewEvents.VerticalRevealType.Center, false )); }); @@ -494,45 +514,30 @@ export class Minimap extends ViewPart { this._sliderMouseDownListener = dom.addStandardDisposableListener(this._slider.domNode, 'mousedown', (e) => { e.preventDefault(); + if (e.leftButton && this._lastRenderData) { - if (e.leftButton) { + const initialMousePosition = e.posy; const initialMouseOrthogonalPosition = e.posx; - const initialScrollTop = this._viewLayout.getScrollTop(); - const initialSliderCenter = (this._slider.getTop() + this._slider.getHeight() / 2); - const draggingDeltaCenter = e.posy - initialSliderCenter; + const initialSliderState = this._lastRenderData.renderedLayout; this._slider.toggleClassName('active', true); this._sliderMouseMoveMonitor.startMonitoring( standardMouseMoveMerger, (mouseMoveData: IStandardMouseMoveEventData) => { - const mouseOrthogonalPosition = mouseMoveData.posx; - const mouseOrthogonalDelta = Math.abs(mouseOrthogonalPosition - initialMouseOrthogonalPosition); + const mouseOrthogonalDelta = Math.abs(mouseMoveData.posx - initialMouseOrthogonalPosition); + if (platform.isWindows && mouseOrthogonalDelta > MOUSE_DRAG_RESET_DISTANCE) { - // The mouse has wondered away from the slider => reset dragging - this._viewLayout.setScrollPosition({ - scrollTop: initialScrollTop - }); - } else { - const pixelRatio = this._options.pixelRatio; - const minimapLineHeight = getMinimapLineHeight(this._options.renderMinimap); - const entireCanvasOuterHeight = this._context.model.getLineCount() * minimapLineHeight / pixelRatio; - const representableHeight = Math.min(entireCanvasOuterHeight, this._options.canvasOuterHeight); - - // Account for the fact that the minimap does not render the extra space below the viewport - let discountScrollHeight = 0; - if (this._context.configuration.editor.viewInfo.scrollBeyondLastLine) { - discountScrollHeight = this._canvas.getHeight() - this._context.configuration.editor.lineHeight; - } - const scrollHeight = this._viewLayout.getScrollHeight() - discountScrollHeight; - - const desiredSliderCenter = mouseMoveData.posy - draggingDeltaCenter; - const desiredScrollCenter = desiredSliderCenter * (scrollHeight / representableHeight); - const desiredScrollTop = desiredScrollCenter - this._canvas.getHeight() / 2; - - this._viewLayout.setScrollPosition({ - scrollTop: desiredScrollTop + // The mouse has wondered away from the scrollbar => reset dragging + this._context.viewLayout.setScrollPosition({ + scrollTop: initialSliderState.scrollTop }); + return; } + + const mouseDelta = mouseMoveData.posy - initialMousePosition; + this._context.viewLayout.setScrollPosition({ + scrollTop: initialSliderState.getDesiredScrollTopFromDelta(mouseDelta) + }); }, () => { this._slider.toggleClassName('active', false); @@ -549,6 +554,13 @@ export class Minimap extends ViewPart { super.dispose(); } + private _getMinimapDomNodeClassName(): string { + if (this._options.showSlider === 'always') { + return 'minimap slider-always'; + } + return 'minimap slider-mouseover'; + } + public getDomNode(): FastDomNode { return this._domNode; } @@ -585,6 +597,7 @@ export class Minimap extends ViewPart { this._lastRenderData = null; this._buffers = null; this._applyLayout(); + this._domNode.setClassName(this._getMinimapDomNodeClassName()); return true; } @@ -652,22 +665,46 @@ export class Minimap extends ViewPart { this._shadow.setClassName('minimap-shadow-visible'); } - const layout = new MinimapLayout( - this._lastRenderData, + const layout = MinimapLayout.create( this._options, renderingCtx.visibleRange.startLineNumber, renderingCtx.visibleRange.endLineNumber, renderingCtx.viewportHeight, + (renderingCtx.viewportData.whitespaceViewportData.length > 0), this._context.model.getLineCount(), - this._editorScrollbar.getVerticalSliderVerticalCenter() + renderingCtx.scrollTop, + renderingCtx.scrollHeight, + this._lastRenderData ? this._lastRenderData.renderedLayout : null ); this._slider.setTop(layout.sliderTop); this._slider.setHeight(layout.sliderHeight); + // Compute horizontal slider coordinates + const scrollLeftChars = renderingCtx.scrollLeft / this._options.typicalHalfwidthCharacterWidth; + const horizontalSliderLeft = Math.min(this._options.minimapWidth, Math.round(scrollLeftChars * getMinimapCharWidth(this._options.renderMinimap) / this._options.pixelRatio)); + this._sliderHorizontal.setLeft(horizontalSliderLeft); + this._sliderHorizontal.setWidth(this._options.minimapWidth - horizontalSliderLeft); + this._sliderHorizontal.setTop(0); + this._sliderHorizontal.setHeight(layout.sliderHeight); + + this._lastRenderData = this.renderLines(layout); + } + + private renderLines(layout: MinimapLayout): RenderData { + const renderMinimap = this._options.renderMinimap; const startLineNumber = layout.startLineNumber; const endLineNumber = layout.endLineNumber; const minimapLineHeight = getMinimapLineHeight(renderMinimap); + // Check if nothing changed w.r.t. lines from last frame + if (this._lastRenderData && this._lastRenderData.linesEquals(layout)) { + const _lastData = this._lastRenderData._get(); + // Nice!! Nothing changed from last frame + return new RenderData(layout, _lastData.imageData, _lastData.lines); + } + + // Oh well!! We need to repaint some lines... + const imageData = this._getBuffer(); // Render untouched lines by using last rendered data. @@ -706,21 +743,16 @@ export class Minimap extends ViewPart { dy += minimapLineHeight; } + // Finally, paint to the canvas + const ctx = this._canvas.domNode.getContext('2d'); + ctx.putImageData(imageData, 0, 0); + // Save rendered data for reuse on next frame if possible - this._lastRenderData = new RenderData( - new RenderedLayout( - renderingCtx.visibleRange.startLineNumber, - renderingCtx.visibleRange.endLineNumber, - startLineNumber, - endLineNumber - ), + return new RenderData( + layout, imageData, renderedLines ); - - // Finally, paint to the canvas - const ctx = this._canvas.domNode.getContext('2d'); - ctx.putImageData(imageData, 0, 0); } private static _renderUntouchedLines( @@ -799,7 +831,7 @@ export class Minimap extends ViewPart { private static _renderLine( target: ImageData, backgroundColor: RGBA, - useLighterFont, + useLighterFont: boolean, renderMinimap: RenderMinimap, colorTracker: MinimapTokensColorTracker, minimapCharRenderer: MinimapCharRenderer, @@ -854,3 +886,25 @@ export class Minimap extends ViewPart { } } } + +registerThemingParticipant((theme, collector) => { + const sliderBackground = theme.getColor(scrollbarSliderBackground); + if (sliderBackground) { + const halfSliderBackground = sliderBackground.transparent(0.5); + collector.addRule(`.monaco-editor .minimap-slider, .monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${halfSliderBackground}; }`); + } + const sliderHoverBackground = theme.getColor(scrollbarSliderHoverBackground); + if (sliderHoverBackground) { + const halfSliderHoverBackground = sliderHoverBackground.transparent(0.5); + collector.addRule(`.monaco-editor .minimap-slider:hover, .monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${halfSliderHoverBackground}; }`); + } + const sliderActiveBackground = theme.getColor(scrollbarSliderActiveBackground); + if (sliderActiveBackground) { + const halfSliderActiveBackground = sliderActiveBackground.transparent(0.5); + collector.addRule(`.monaco-editor .minimap-slider.active, .monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${halfSliderActiveBackground}; }`); + } + const shadow = theme.getColor(scrollbarShadow); + if (shadow) { + collector.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${shadow} -6px 0 6px -6px inset; }`); + } +}); \ No newline at end of file diff --git a/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts b/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts index 37eaae0f2b74a..f88a38ed4dd83 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import * as themes from 'vs/platform/theme/common/themes'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { ViewPart } from 'vs/editor/browser/view/viewPart'; import { OverviewRulerImpl } from 'vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl'; @@ -15,32 +14,22 @@ import { TokenizationRegistry } from 'vs/editor/common/modes'; import { IDisposable } from 'vs/base/common/lifecycle'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { OverviewRulerZone } from 'vs/editor/common/view/overviewZoneManager'; - -function getThemeType(themeId: string): editorCommon.ThemeType { - if (themes.isHighContrastTheme(themeId)) { - return editorCommon.ThemeType.HighContrast; - } - if (themes.isLightTheme(themeId)) { - return editorCommon.ThemeType.Light; - } - return editorCommon.ThemeType.Dark; -} +import { editorOverviewRulerBorder, editorCursor } from 'vs/editor/common/view/editorColorRegistry'; +import { Color } from 'vs/base/common/color'; +import { ThemeColor } from 'vs/platform/theme/common/themeService'; export class DecorationsOverviewRuler extends ViewPart { static MIN_DECORATION_HEIGHT = 6; static MAX_DECORATION_HEIGHT = 60; - private static _CURSOR_COLOR = 'rgba(0, 0, 102, 0.8)'; - private static _CURSOR_COLOR_DARK = 'rgba(152, 152, 152, 0.8)'; - - private static _BORDER_COLOR = 'rgba(127,127,127,0.3)'; - private readonly _tokensColorTrackerListener: IDisposable; private _overviewRuler: OverviewRulerImpl; private _renderBorder: boolean; + private _borderColor: string; + private _cursorColor: string; private _shouldUpdateDecorations: boolean; private _shouldUpdateCursorPosition: boolean; @@ -51,25 +40,25 @@ export class DecorationsOverviewRuler extends ViewPart { private _zonesFromDecorations: OverviewRulerZone[]; private _zonesFromCursors: OverviewRulerZone[]; - constructor(context: ViewContext, scrollHeight: number, getVerticalOffsetForLine: (lineNumber: number) => number) { + constructor(context: ViewContext) { super(context); this._overviewRuler = new OverviewRulerImpl( 1, 'decorationsOverviewRuler', - scrollHeight, + this._context.viewLayout.getScrollHeight(), this._context.configuration.editor.lineHeight, - this._context.configuration.editor.viewInfo.canUseTranslate3d, + this._context.configuration.editor.pixelRatio, DecorationsOverviewRuler.MIN_DECORATION_HEIGHT, DecorationsOverviewRuler.MAX_DECORATION_HEIGHT, - getVerticalOffsetForLine + (lineNumber: number) => this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber) ); this._overviewRuler.setLanesCount(this._context.configuration.editor.viewInfo.overviewRulerLanes, false); - let theme = this._context.configuration.editor.viewInfo.theme; - this._overviewRuler.setThemeType(getThemeType(theme), false); this._overviewRuler.setLayout(this._context.configuration.editor.layoutInfo.overviewRuler, false); this._renderBorder = this._context.configuration.editor.viewInfo.overviewRulerBorder; + this._updateColors(); + this._updateBackground(false); this._tokensColorTrackerListener = TokenizationRegistry.onDidChange((e) => { if (e.changedColorMap) { @@ -104,57 +93,38 @@ export class DecorationsOverviewRuler extends ViewPart { let prevLanesCount = this._overviewRuler.getLanesCount(); let newLanesCount = this._context.configuration.editor.viewInfo.overviewRulerLanes; - let shouldRender = false; + if (prevLanesCount !== newLanesCount) { + this._overviewRuler.setLanesCount(newLanesCount, false); + } if (e.lineHeight) { this._overviewRuler.setLineHeight(this._context.configuration.editor.lineHeight, false); - shouldRender = true; - } - - if (e.viewInfo.canUseTranslate3d) { - this._overviewRuler.setCanUseTranslate3d(this._context.configuration.editor.viewInfo.canUseTranslate3d, false); - shouldRender = true; } - if (prevLanesCount !== newLanesCount) { - this._overviewRuler.setLanesCount(newLanesCount, false); - shouldRender = true; + if (e.pixelRatio) { + this._overviewRuler.setPixelRatio(this._context.configuration.editor.pixelRatio, false); } - if (e.viewInfo.overviewRulerBorder) { + if (e.viewInfo) { this._renderBorder = this._context.configuration.editor.viewInfo.overviewRulerBorder; - shouldRender = true; - } - - if (e.viewInfo.hideCursorInOverviewRuler) { this._hideCursor = this._context.configuration.editor.viewInfo.hideCursorInOverviewRuler; this._shouldUpdateCursorPosition = true; - shouldRender = true; - } - - if (e.viewInfo.theme) { - let theme = this._context.configuration.editor.viewInfo.theme; - this._overviewRuler.setThemeType(getThemeType(theme), false); - shouldRender = true; - } - - if (e.viewInfo.minimap) { this._updateBackground(false); - shouldRender = true; } if (e.layoutInfo) { this._overviewRuler.setLayout(this._context.configuration.editor.layoutInfo.overviewRuler, false); - shouldRender = true; } - return shouldRender; + return true; } - public onCursorPositionChanged(e: viewEvents.ViewCursorPositionChangedEvent): boolean { + public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { this._shouldUpdateCursorPosition = true; - this._cursorPositions = [e.position]; - this._cursorPositions = this._cursorPositions.concat(e.secondaryPositions); + this._cursorPositions = []; + for (let i = 0, len = e.selections.length; i < len; i++) { + this._cursorPositions[i] = e.selections[i].getPosition(); + } return true; } @@ -178,12 +148,29 @@ export class DecorationsOverviewRuler extends ViewPart { return true; } + public onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean { + this._updateColors(); + this._shouldUpdateDecorations = true; + this._shouldUpdateCursorPosition = true; + return true; + } + // ---- end view event handlers public getDomNode(): HTMLElement { return this._overviewRuler.getDomNode(); } + private _updateColors() { + let borderColor = this._context.theme.getColor(editorOverviewRulerBorder); + this._borderColor = borderColor ? borderColor.toString() : null; + + let cursorColor = this._context.theme.getColor(editorCursor); + this._cursorColor = cursorColor ? cursorColor.transparent(0.7).toString() : null; + + this._overviewRuler.setThemeType(this._context.theme.type, false); + } + private _createZonesFromDecorations(): OverviewRulerZone[] { let decorations = this._context.model.getAllOverviewRulerDecorations(); let zones: OverviewRulerZone[] = []; @@ -196,15 +183,23 @@ export class DecorationsOverviewRuler extends ViewPart { dec.range.endLineNumber, overviewRuler.position, 0, - overviewRuler.color, - overviewRuler.darkColor, - overviewRuler.hcColor + this.resolveRulerColor(overviewRuler.color), + this.resolveRulerColor(overviewRuler.darkColor), + this.resolveRulerColor(overviewRuler.hcColor) )); } return zones; } + private resolveRulerColor(color: string | ThemeColor): string { + if (editorCommon.isThemeColor(color)) { + let c = this._context.theme.getColor(color.id) || Color.transparent; + return c.toString(); + } + return color; + } + private _createZonesFromCursors(): OverviewRulerZone[] { let zones: OverviewRulerZone[] = []; @@ -216,9 +211,9 @@ export class DecorationsOverviewRuler extends ViewPart { cursor.lineNumber, editorCommon.OverviewRulerLane.Full, 2, - DecorationsOverviewRuler._CURSOR_COLOR, - DecorationsOverviewRuler._CURSOR_COLOR_DARK, - DecorationsOverviewRuler._CURSOR_COLOR_DARK + this._cursorColor, + this._cursorColor, + this._cursorColor )); } @@ -255,11 +250,11 @@ export class DecorationsOverviewRuler extends ViewPart { let hasRendered = this._overviewRuler.render(false); - if (hasRendered && this._renderBorder && this._overviewRuler.getLanesCount() > 0 && (this._zonesFromDecorations.length > 0 || this._zonesFromCursors.length > 0)) { + if (hasRendered && this._renderBorder && this._borderColor && this._overviewRuler.getLanesCount() > 0 && (this._zonesFromDecorations.length > 0 || this._zonesFromCursors.length > 0)) { let ctx2 = this._overviewRuler.getDomNode().getContext('2d'); ctx2.beginPath(); ctx2.lineWidth = 1; - ctx2.strokeStyle = DecorationsOverviewRuler._BORDER_COLOR; + ctx2.strokeStyle = this._borderColor; ctx2.moveTo(0, 0); ctx2.lineTo(0, this._overviewRuler.getPixelHeight()); ctx2.stroke(); diff --git a/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts b/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts index b3d8613c2d3e9..bb2b4ee58cea8 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts @@ -17,11 +17,19 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler { private _context: ViewContext; private _overviewRuler: OverviewRulerImpl; - constructor(context: ViewContext, cssClassName: string, scrollHeight: number, minimumHeight: number, maximumHeight: number, getVerticalOffsetForLine: (lineNumber: number) => number) { + constructor(context: ViewContext, cssClassName: string, minimumHeight: number, maximumHeight: number) { super(); this._context = context; - this._overviewRuler = new OverviewRulerImpl(0, cssClassName, scrollHeight, this._context.configuration.editor.lineHeight, - this._context.configuration.editor.viewInfo.canUseTranslate3d, minimumHeight, maximumHeight, getVerticalOffsetForLine); + this._overviewRuler = new OverviewRulerImpl( + 0, + cssClassName, + this._context.viewLayout.getScrollHeight(), + this._context.configuration.editor.lineHeight, + this._context.configuration.editor.pixelRatio, + minimumHeight, + maximumHeight, + (lineNumber: number) => this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber) + ); this._context.addEventHandler(this); } @@ -37,15 +45,13 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler { public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { if (e.lineHeight) { this._overviewRuler.setLineHeight(this._context.configuration.editor.lineHeight, true); - return true; } - if (e.viewInfo.canUseTranslate3d) { - this._overviewRuler.setCanUseTranslate3d(this._context.configuration.editor.viewInfo.canUseTranslate3d, true); - return true; + if (e.pixelRatio) { + this._overviewRuler.setPixelRatio(this._context.configuration.editor.pixelRatio, true); } - return false; + return true; } public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { diff --git a/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts b/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts index 3cce58aa44c1a..2e6a03a39d836 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts @@ -5,12 +5,11 @@ 'use strict'; import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; -import { OverviewRulerLane, ThemeType } from 'vs/editor/common/editorCommon'; -import { IDisposable } from 'vs/base/common/lifecycle'; -import * as browser from 'vs/base/browser/browser'; +import { OverviewRulerLane } from 'vs/editor/common/editorCommon'; import { OverviewZoneManager, ColorZone, OverviewRulerZone } from 'vs/editor/common/view/overviewZoneManager'; import { Color } from 'vs/base/common/color'; import { OverviewRulerPosition } from 'vs/editor/common/config/editorOptions'; +import { ThemeType, LIGHT } from 'vs/platform/theme/common/themeService'; export class OverviewRulerImpl { @@ -18,46 +17,38 @@ export class OverviewRulerImpl { private _domNode: FastDomNode; private _lanesCount: number; private _zoneManager: OverviewZoneManager; - private _canUseTranslate3d: boolean; private _background: Color; - private _zoomListener: IDisposable; - - constructor(canvasLeftOffset: number, cssClassName: string, scrollHeight: number, lineHeight: number, canUseTranslate3d: boolean, minimumHeight: number, maximumHeight: number, getVerticalOffsetForLine: (lineNumber: number) => number) { + constructor( + canvasLeftOffset: number, cssClassName: string, scrollHeight: number, lineHeight: number, + pixelRatio: number, minimumHeight: number, maximumHeight: number, + getVerticalOffsetForLine: (lineNumber: number) => number + ) { this._canvasLeftOffset = canvasLeftOffset; this._domNode = createFastDomNode(document.createElement('canvas')); this._domNode.setClassName(cssClassName); this._domNode.setPosition('absolute'); + this._domNode.setLayerHinting(true); this._lanesCount = 3; - this._canUseTranslate3d = canUseTranslate3d; this._background = null; this._zoneManager = new OverviewZoneManager(getVerticalOffsetForLine); this._zoneManager.setMinimumHeight(minimumHeight); this._zoneManager.setMaximumHeight(maximumHeight); - this._zoneManager.setThemeType(ThemeType.Light); + this._zoneManager.setThemeType(LIGHT); this._zoneManager.setDOMWidth(0); this._zoneManager.setDOMHeight(0); this._zoneManager.setOuterHeight(scrollHeight); this._zoneManager.setLineHeight(lineHeight); - this._zoomListener = browser.onDidChangeZoomLevel(() => { - this._zoneManager.setPixelRatio(browser.getPixelRatio()); - this._domNode.setWidth(this._zoneManager.getDOMWidth()); - this._domNode.setHeight(this._zoneManager.getDOMHeight()); - this._domNode.domNode.width = this._zoneManager.getCanvasWidth(); - this._domNode.domNode.height = this._zoneManager.getCanvasHeight(); - this.render(true); - }); - this._zoneManager.setPixelRatio(browser.getPixelRatio()); + this._zoneManager.setPixelRatio(pixelRatio); } public dispose(): void { - this._zoomListener.dispose(); this._zoneManager = null; } @@ -135,8 +126,12 @@ export class OverviewRulerImpl { } } - public setCanUseTranslate3d(canUseTranslate3d: boolean, render: boolean): void { - this._canUseTranslate3d = canUseTranslate3d; + public setPixelRatio(pixelRatio: number, render: boolean): void { + this._zoneManager.setPixelRatio(pixelRatio); + this._domNode.setWidth(this._zoneManager.getDOMWidth()); + this._domNode.setHeight(this._zoneManager.getDOMHeight()); + this._domNode.domNode.width = this._zoneManager.getCanvasWidth(); + this._domNode.domNode.height = this._zoneManager.getCanvasHeight(); if (render) { this.render(true); } @@ -153,11 +148,6 @@ export class OverviewRulerImpl { if (this._zoneManager.getOuterHeight() === 0) { return false; } - if (this._canUseTranslate3d) { - this._domNode.setTransform('translate3d(0px, 0px, 0px)'); - } else { - this._domNode.setTransform(''); - } const width = this._zoneManager.getCanvasWidth(); const height = this._zoneManager.getCanvasHeight(); diff --git a/src/vs/editor/browser/viewParts/rulers/rulers.css b/src/vs/editor/browser/viewParts/rulers/rulers.css index c2e819de64971..d3d2d26ec95a3 100644 --- a/src/vs/editor/browser/viewParts/rulers/rulers.css +++ b/src/vs/editor/browser/viewParts/rulers/rulers.css @@ -5,10 +5,5 @@ .monaco-editor .view-ruler { position: absolute; - width: 1px; top: 0; - background: lightgrey; -} -.monaco-editor.vs-dark .view-ruler { - background: #5A5A5A; } \ No newline at end of file diff --git a/src/vs/editor/browser/viewParts/rulers/rulers.ts b/src/vs/editor/browser/viewParts/rulers/rulers.ts index 6d4f6247bffae..6a5e95b0b8cd0 100644 --- a/src/vs/editor/browser/viewParts/rulers/rulers.ts +++ b/src/vs/editor/browser/viewParts/rulers/rulers.ts @@ -11,6 +11,9 @@ import { ViewPart } from 'vs/editor/browser/view/viewPart'; import { ViewContext } from 'vs/editor/common/view/viewContext'; import { RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/view/renderingContext'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { editorRuler } from 'vs/editor/common/view/editorColorRegistry'; +import * as dom from 'vs/base/browser/dom'; export class Rulers extends ViewPart { @@ -23,6 +26,8 @@ export class Rulers extends ViewPart { constructor(context: ViewContext) { super(context); this.domNode = createFastDomNode(document.createElement('div')); + this.domNode.setAttribute('role', 'presentation'); + this.domNode.setAttribute('aria-hidden', 'true'); this.domNode.setClassName('view-rulers'); this._renderedRulers = []; this._rulers = this._context.configuration.editor.viewInfo.rulers; @@ -37,7 +42,7 @@ export class Rulers extends ViewPart { // --- begin event handlers public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { - if (e.viewInfo.rulers || e.layoutInfo || e.fontInfo) { + if (e.viewInfo || e.layoutInfo || e.fontInfo) { this._rulers = this._context.configuration.editor.viewInfo.rulers; this._height = this._context.configuration.editor.layoutInfo.contentHeight; this._typicalHalfwidthCharacterWidth = this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth; @@ -46,7 +51,7 @@ export class Rulers extends ViewPart { return false; } public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { - return super.onScrollChanged(e) || e.scrollHeightChanged; + return e.scrollHeightChanged; } // --- end event handlers @@ -65,11 +70,12 @@ export class Rulers extends ViewPart { } if (currentCount < desiredCount) { - // Add more rulers + const rulerWidth = dom.computeScreenAwareSize(1); let addCount = desiredCount - currentCount; while (addCount > 0) { let node = createFastDomNode(document.createElement('div')); node.setClassName('view-ruler'); + node.setWidth(rulerWidth); this.domNode.appendChild(node); this._renderedRulers.push(node); addCount--; @@ -97,3 +103,10 @@ export class Rulers extends ViewPart { } } } + +registerThemingParticipant((theme, collector) => { + let rulerColor = theme.getColor(editorRuler); + if (rulerColor) { + collector.addRule(`.monaco-editor .view-ruler { background-color: ${rulerColor}; }`); + } +}); diff --git a/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css b/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css index 1950c6abc4da0..1eabd692f83d0 100644 --- a/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css +++ b/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css @@ -8,13 +8,4 @@ top: 0; left: 0; height: 6px; - box-shadow: #DDD 0 6px 6px -6px inset; -} - -.monaco-editor.vs-dark .scroll-decoration { - box-shadow: #000 0 6px 6px -6px inset; -} - -.monaco-editor.hc-black .scroll-decoration { - box-shadow: none; } \ No newline at end of file diff --git a/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.ts b/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.ts index b0dd4ccee28fc..e4086a1e00a59 100644 --- a/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.ts +++ b/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.ts @@ -11,6 +11,8 @@ import { ViewPart } from 'vs/editor/browser/view/viewPart'; import { ViewContext } from 'vs/editor/common/view/viewContext'; import { RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/view/renderingContext'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { scrollbarShadow } from 'vs/platform/theme/common/colorRegistry'; export class ScrollDecorationViewPart extends ViewPart { @@ -29,6 +31,8 @@ export class ScrollDecorationViewPart extends ViewPart { this._shouldShow = false; this._useShadows = this._context.configuration.editor.viewInfo.scrollbar.useShadows; this._domNode = createFastDomNode(document.createElement('div')); + this._domNode.setAttribute('role', 'presentation'); + this._domNode.setAttribute('aria-hidden', 'true'); } public dispose(): void { @@ -62,7 +66,7 @@ export class ScrollDecorationViewPart extends ViewPart { public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { let shouldRender = false; - if (e.viewInfo.scrollbar) { + if (e.viewInfo) { this._useShadows = this._context.configuration.editor.viewInfo.scrollbar.useShadows; } if (e.layoutInfo) { @@ -86,3 +90,10 @@ export class ScrollDecorationViewPart extends ViewPart { this._domNode.setClassName(this._shouldShow ? 'scroll-decoration' : ''); } } + +registerThemingParticipant((theme, collector) => { + let shadow = theme.getColor(scrollbarShadow); + if (shadow) { + collector.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${shadow} 0 6px 6px -6px inset; }`); + } +}); \ No newline at end of file diff --git a/src/vs/editor/browser/viewParts/selections/selections.ts b/src/vs/editor/browser/viewParts/selections/selections.ts index 38ee5869922dc..25354eff6c3b0 100644 --- a/src/vs/editor/browser/viewParts/selections/selections.ts +++ b/src/vs/editor/browser/viewParts/selections/selections.ts @@ -7,7 +7,7 @@ import 'vs/css!./selections'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -import { editorSelection, editorInactiveSelection, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; +import { editorSelectionBackground, editorInactiveSelection, editorSelectionForeground } from 'vs/platform/theme/common/colorRegistry'; import { DynamicViewOverlay } from 'vs/editor/browser/view/dynamicViewOverlay'; import { ViewContext } from 'vs/editor/common/view/viewContext'; import { HorizontalRange, LineVisibleRanges, RenderingContext } from 'vs/editor/common/view/renderingContext'; @@ -105,17 +105,13 @@ export class SelectionsOverlay extends DynamicViewOverlay { if (e.lineHeight) { this._lineHeight = this._context.configuration.editor.lineHeight; } - if (e.viewInfo.roundedSelection) { + if (e.viewInfo) { this._roundedSelection = this._context.configuration.editor.viewInfo.roundedSelection; } return true; } - public onCursorPositionChanged(e: viewEvents.ViewCursorPositionChangedEvent): boolean { - return false; - } - public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { - this._selections = [e.selection]; - this._selections = this._selections.concat(e.secondarySelections); + public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { + this._selections = e.selections.slice(0); return true; } public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { @@ -134,9 +130,6 @@ export class SelectionsOverlay extends DynamicViewOverlay { public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { return true; } - public onRevealRangeRequest(e: viewEvents.ViewRevealRangeRequestEvent): boolean { - return false; - } public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return e.scrollTopChanged; } @@ -401,18 +394,16 @@ export class SelectionsOverlay extends DynamicViewOverlay { } registerThemingParticipant((theme, collector) => { - let editorSelectionColor = theme.getColor(editorSelection); + let editorSelectionColor = theme.getColor(editorSelectionBackground); if (editorSelectionColor) { - collector.addRule(`.monaco-editor.${theme.selector} .focused .selected-text { background-color: ${editorSelectionColor}; }`); + collector.addRule(`.monaco-editor .focused .selected-text { background-color: ${editorSelectionColor}; }`); } let editorInactiveSelectionColor = theme.getColor(editorInactiveSelection); if (editorInactiveSelectionColor) { - collector.addRule(`.monaco-editor.${theme.selector} .selected-text { background-color: ${editorInactiveSelectionColor}; }`); + collector.addRule(`.monaco-editor .selected-text { background-color: ${editorInactiveSelectionColor}; }`); } - // IE/Edge specific rules - let outline = theme.getColor(activeContrastBorder); - if (outline) { - collector.addRule(`.monaco-editor.ie.hc-black .view-overlays.focused .selected-text { background: none; border: 2px solid ${outline}; }`); - collector.addRule(`.monaco-editor.edge.hc-black .view-overlays.focused .selected-text { background: none; border: 2px solid ${outline}; }`); + let editorSelectionForegroundColor = theme.getColor(editorSelectionForeground); + if (editorSelectionForegroundColor) { + collector.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${editorSelectionForegroundColor}; }`); } -}); \ No newline at end of file +}); diff --git a/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts b/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts index b89689b8a8afd..5288f92d7ea0c 100644 --- a/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts +++ b/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts @@ -12,6 +12,7 @@ import { Configuration } from 'vs/editor/browser/config/configuration'; import { ViewContext } from 'vs/editor/common/view/viewContext'; import { RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/view/renderingContext'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; +import * as dom from 'vs/base/browser/dom'; export interface IViewCursorRenderData { domNode: HTMLElement; @@ -72,8 +73,6 @@ export class ViewCursor { this._domNode.setHeight(this._lineHeight); this._domNode.setTop(0); this._domNode.setLeft(0); - this._domNode.setAttribute('role', 'presentation'); - this._domNode.setAttribute('aria-hidden', 'true'); Configuration.applyFontInfo(this._domNode, this._context.configuration.editor.fontInfo); this._domNode.setDisplay('none'); @@ -114,7 +113,7 @@ export class ViewCursor { if (e.lineHeight) { this._lineHeight = this._context.configuration.editor.lineHeight; } - if (e.viewInfo.cursorStyle) { + if (e.viewInfo) { this._cursorStyle = this._context.configuration.editor.viewInfo.cursorStyle; } if (e.fontInfo) { @@ -130,12 +129,6 @@ export class ViewCursor { return true; } - public onFlushed(): boolean { - this.updatePosition(new Position(1, 1)); - this._isInEditableRange = true; - return true; - } - private _prepareRender(ctx: RenderingContext): ViewCursorRenderData { if (this._cursorStyle === TextEditorCursorStyle.Line || this._cursorStyle === TextEditorCursorStyle.LineThin) { const visibleRange = ctx.visibleRangeForPosition(this._position); @@ -145,9 +138,9 @@ export class ViewCursor { } let width: number; if (this._cursorStyle === TextEditorCursorStyle.Line) { - width = 2; + width = dom.computeScreenAwareSize(2); } else { - width = 1; + width = dom.computeScreenAwareSize(1); } const top = ctx.getVerticalOffsetForLineNumber(this._position.lineNumber) - ctx.bigNumbersDelta; return new ViewCursorRenderData(top, visibleRange.left, width, ''); diff --git a/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts b/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts index e9c9ea9fe7874..a5362a124b8f0 100644 --- a/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts +++ b/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts @@ -54,6 +54,8 @@ export class ViewCursors extends ViewPart { this._renderData = []; this._domNode = createFastDomNode(document.createElement('div')); + this._domNode.setAttribute('role', 'presentation'); + this._domNode.setAttribute('aria-hidden', 'true'); this._updateDomClassName(); this._domNode.appendChild(this._primaryCursor.getDomNode()); @@ -84,16 +86,14 @@ export class ViewCursors extends ViewPart { if (e.readOnly) { this._readOnly = this._context.configuration.editor.readOnly; } - if (e.viewInfo.cursorBlinking) { + if (e.viewInfo) { this._cursorBlinking = this._context.configuration.editor.viewInfo.cursorBlinking; - } - if (e.viewInfo.cursorStyle) { this._cursorStyle = this._context.configuration.editor.viewInfo.cursorStyle; } this._primaryCursor.onConfigurationChanged(e); this._updateBlinking(); - if (e.viewInfo.cursorStyle || e.viewInfo.cursorBlinking) { + if (e.viewInfo) { this._updateDomClassName(); } for (let i = 0, len = this._secondaryCursors.length; i < len; i++) { @@ -101,51 +101,53 @@ export class ViewCursors extends ViewPart { } return true; } - public onCursorPositionChanged(e: viewEvents.ViewCursorPositionChangedEvent): boolean { - this._primaryCursor.onCursorPositionChanged(e.position, e.isInEditableRange); + private _onCursorPositionChanged(position: Position, secondaryPositions: Position[], isInEditableRange: boolean): void { + this._primaryCursor.onCursorPositionChanged(position, isInEditableRange); this._updateBlinking(); - if (this._secondaryCursors.length < e.secondaryPositions.length) { + if (this._secondaryCursors.length < secondaryPositions.length) { // Create new cursors - let addCnt = e.secondaryPositions.length - this._secondaryCursors.length; + let addCnt = secondaryPositions.length - this._secondaryCursors.length; for (let i = 0; i < addCnt; i++) { let newCursor = new ViewCursor(this._context, true); this._domNode.domNode.insertBefore(newCursor.getDomNode().domNode, this._primaryCursor.getDomNode().domNode.nextSibling); this._secondaryCursors.push(newCursor); } - } else if (this._secondaryCursors.length > e.secondaryPositions.length) { + } else if (this._secondaryCursors.length > secondaryPositions.length) { // Remove some cursors - let removeCnt = this._secondaryCursors.length - e.secondaryPositions.length; + let removeCnt = this._secondaryCursors.length - secondaryPositions.length; for (let i = 0; i < removeCnt; i++) { this._domNode.removeChild(this._secondaryCursors[0].getDomNode()); this._secondaryCursors.splice(0, 1); } } - for (let i = 0; i < e.secondaryPositions.length; i++) { - this._secondaryCursors[i].onCursorPositionChanged(e.secondaryPositions[i], e.isInEditableRange); + for (let i = 0; i < secondaryPositions.length; i++) { + this._secondaryCursors[i].onCursorPositionChanged(secondaryPositions[i], isInEditableRange); } - return true; } - public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { - let selectionIsEmpty = e.selection.isEmpty(); + public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { + let positions: Position[] = []; + for (let i = 0, len = e.selections.length; i < len; i++) { + positions[i] = e.selections[i].getPosition(); + } + this._onCursorPositionChanged(positions[0], positions.slice(1), e.isInEditableRange); + + const selectionIsEmpty = e.selections[0].isEmpty(); if (this._selectionIsEmpty !== selectionIsEmpty) { this._selectionIsEmpty = selectionIsEmpty; this._updateDomClassName(); } - return false; + + return true; } + public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { // true for inline decorations that can end up relayouting text - return true;//e.inlineDecorationsChanged; + return true; } public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { - this._primaryCursor.onFlushed(); - for (let i = 0, len = this._secondaryCursors.length; i < len; i++) { - this._domNode.removeChild(this._secondaryCursors[i].getDomNode()); - } - this._secondaryCursors = []; return true; } public onFocusChanged(e: viewEvents.ViewFocusChangedEvent): boolean { @@ -347,9 +349,9 @@ registerThemingParticipant((theme, collector) => { let caret = theme.getColor(editorCursor); if (caret) { let oppositeCaret = caret.opposite(); - collector.addRule(`.monaco-editor.${theme.selector} .cursor { background-color: ${caret}; border-color: ${caret}; color: ${oppositeCaret}; }`); + collector.addRule(`.monaco-editor .cursor { background-color: ${caret}; border-color: ${caret}; color: ${oppositeCaret}; }`); if (theme.type === 'hc') { - collector.addRule(`.monaco-editor.${theme.selector} .cursors-layer.has-selection .cursor { border-left: 1px solid ${oppositeCaret}; border-right: 1px solid ${oppositeCaret}; }`); + collector.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${oppositeCaret}; border-right: 1px solid ${oppositeCaret}; }`); } } diff --git a/src/vs/editor/browser/viewParts/viewZones/viewZones.ts b/src/vs/editor/browser/viewParts/viewZones/viewZones.ts index a56f4457cf4fb..a02489ace2cbd 100644 --- a/src/vs/editor/browser/viewParts/viewZones/viewZones.ts +++ b/src/vs/editor/browser/viewParts/viewZones/viewZones.ts @@ -11,7 +11,7 @@ import { ViewPart } from 'vs/editor/browser/view/viewPart'; import { ViewContext } from 'vs/editor/common/view/viewContext'; import { Position } from 'vs/editor/common/core/position'; import { RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/view/renderingContext'; -import { IViewLayout, IViewWhitespaceViewportData } from 'vs/editor/common/viewModel/viewModel'; +import { IViewWhitespaceViewportData } from 'vs/editor/common/viewModel/viewModel'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; export interface IMyViewZone { @@ -33,7 +33,6 @@ interface IComputedViewZoneProps { export class ViewZones extends ViewPart { - private _viewLayout: IViewLayout; private _zones: { [id: string]: IMyViewZone; }; private _lineHeight: number; private _contentWidth: number; @@ -43,12 +42,11 @@ export class ViewZones extends ViewPart { public marginDomNode: FastDomNode; - constructor(context: ViewContext, viewLayout: IViewLayout) { + constructor(context: ViewContext) { super(context); this._lineHeight = this._context.configuration.editor.lineHeight; this._contentWidth = this._context.configuration.editor.layoutInfo.contentWidth; this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft; - this._viewLayout = viewLayout; this.domNode = createFastDomNode(document.createElement('div')); this.domNode.setClassName('view-zones'); @@ -67,7 +65,6 @@ export class ViewZones extends ViewPart { public dispose(): void { super.dispose(); - this._viewLayout = null; this._zones = {}; } @@ -81,7 +78,7 @@ export class ViewZones extends ViewPart { let id = keys[i]; let zone = this._zones[id]; let props = this._computeWhitespaceProps(zone.delegate); - if (this._viewLayout.changeWhitespace(parseInt(id, 10), props.afterViewLineNumber, props.heightInPx)) { + if (this._context.viewLayout.changeWhitespace(parseInt(id, 10), props.afterViewLineNumber, props.heightInPx)) { this._safeCallOnComputedHeight(zone.delegate, props.heightInPx); hadAChange = true; } @@ -186,7 +183,7 @@ export class ViewZones extends ViewPart { public addZone(zone: IViewZone): number { let props = this._computeWhitespaceProps(zone); - let whitespaceId = this._viewLayout.addWhitespace(props.afterViewLineNumber, this._getZoneOrdinal(zone), props.heightInPx); + let whitespaceId = this._context.viewLayout.addWhitespace(props.afterViewLineNumber, this._getZoneOrdinal(zone), props.heightInPx); let myZone: IMyViewZone = { whitespaceId: whitespaceId, @@ -224,7 +221,7 @@ export class ViewZones extends ViewPart { if (this._zones.hasOwnProperty(id.toString())) { let zone = this._zones[id.toString()]; delete this._zones[id.toString()]; - this._viewLayout.removeWhitespace(zone.whitespaceId); + this._context.viewLayout.removeWhitespace(zone.whitespaceId); zone.domNode.removeAttribute('monaco-visible-view-zone'); zone.domNode.removeAttribute('monaco-view-zone'); @@ -249,7 +246,7 @@ export class ViewZones extends ViewPart { let zone = this._zones[id.toString()]; let props = this._computeWhitespaceProps(zone.delegate); // let newOrdinal = this._getZoneOrdinal(zone.delegate); - changed = this._viewLayout.changeWhitespace(zone.whitespaceId, props.afterViewLineNumber, props.heightInPx) || changed; + changed = this._context.viewLayout.changeWhitespace(zone.whitespaceId, props.afterViewLineNumber, props.heightInPx) || changed; // TODO@Alex: change `newOrdinal` too if (changed) { @@ -303,7 +300,7 @@ export class ViewZones extends ViewPart { } public render(ctx: RestrictedRenderingContext): void { - let visibleWhitespaces = this._viewLayout.getWhitespaceViewportData(); + const visibleWhitespaces = ctx.viewportData.whitespaceViewportData; let visibleZones: { [id: string]: IViewWhitespaceViewportData; } = {}; let hasVisibleZone = false; diff --git a/src/vs/editor/browser/widget/codeEditorWidget.ts b/src/vs/editor/browser/widget/codeEditorWidget.ts index 1287263b4c3c5..6717aa0219366 100644 --- a/src/vs/editor/browser/widget/codeEditorWidget.ts +++ b/src/vs/editor/browser/widget/codeEditorWidget.ts @@ -5,11 +5,9 @@ 'use strict'; import 'vs/css!./media/editor'; -import 'vs/editor/common/view/editorColorRegistry'; // initialze editor theming partcicpants import 'vs/css!./media/tokens'; import { onUnexpectedError } from 'vs/base/common/errors'; import { TPromise } from 'vs/base/common/winjs.base'; -import * as browser from 'vs/base/browser/browser'; import * as dom from 'vs/base/browser/dom'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ICommandService } from 'vs/platform/commands/common/commands'; @@ -17,13 +15,11 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { CommonCodeEditor } from 'vs/editor/common/commonCodeEditor'; import { CommonEditorConfiguration } from 'vs/editor/common/config/commonEditorConfig'; import { Range, IRange } from 'vs/editor/common/core/range'; -import { Selection } from 'vs/editor/common/core/selection'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { EditorAction } from 'vs/editor/common/editorCommonExtensions'; import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; import { Configuration } from 'vs/editor/browser/config/configuration'; import * as editorBrowser from 'vs/editor/browser/editorBrowser'; -import { Colorizer } from 'vs/editor/browser/standalone/colorizer'; import { View, IOverlayWidgetData, IContentWidgetData } from 'vs/editor/browser/view/viewImpl'; import { Disposable } from 'vs/base/common/lifecycle'; import Event, { Emitter } from 'vs/base/common/event'; @@ -33,6 +29,10 @@ import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { IPosition } from 'vs/editor/common/core/position'; import { IEditorWhitespace } from 'vs/editor/common/viewLayout/whitespaceComputer'; import { CoreEditorCommand } from 'vs/editor/common/controller/coreCommands'; +import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { editorErrorForeground, editorErrorBorder, editorWarningForeground, editorWarningBorder } from 'vs/editor/common/view/editorColorRegistry'; +import { Color } from 'vs/base/common/color'; +import { IMouseEvent } from 'vs/base/browser/mouseEvent'; export abstract class CodeEditorWidget extends CommonCodeEditor implements editorBrowser.ICodeEditor { @@ -71,6 +71,7 @@ export abstract class CodeEditorWidget extends CommonCodeEditor implements edito private _codeEditorService: ICodeEditorService; private _commandService: ICommandService; + private _themeService: IThemeService; protected domElement: HTMLElement; private _focusTracker: CodeEditorWidgetFocusTracker; @@ -88,14 +89,16 @@ export abstract class CodeEditorWidget extends CommonCodeEditor implements edito @IInstantiationService instantiationService: IInstantiationService, @ICodeEditorService codeEditorService: ICodeEditorService, @ICommandService commandService: ICommandService, - @IContextKeyService contextKeyService: IContextKeyService + @IContextKeyService contextKeyService: IContextKeyService, + @IThemeService themeService: IThemeService ) { super(domElement, options, instantiationService, contextKeyService); this._codeEditorService = codeEditorService; this._commandService = commandService; + this._themeService = themeService; this._focusTracker = new CodeEditorWidgetFocusTracker(domElement); - this._focusTracker.onChage(() => { + this._focusTracker.onChange(() => { let hasFocus = this._focusTracker.hasFocus(); if (hasFocus) { @@ -155,28 +158,6 @@ export abstract class CodeEditorWidget extends CommonCodeEditor implements edito super.dispose(); } - public updateOptions(newOptions: IEditorOptions): void { - let oldTheme = this._configuration.editor.viewInfo.theme; - super.updateOptions(newOptions); - let newTheme = this._configuration.editor.viewInfo.theme; - - if (oldTheme !== newTheme) { - this.render(); - } - } - - public colorizeModelLine(lineNumber: number, model: editorCommon.IModel = this.model): string { - if (!model) { - return ''; - } - let content = model.getLineContent(lineNumber); - model.forceTokenization(lineNumber); - let tokens = model.getLineTokens(lineNumber); - let inflatedTokens = tokens.inflate(); - let tabSize = model.getOptions().tabSize; - return Colorizer.colorizeLine(content, model.mightContainRTL(), inflatedTokens, tabSize); - } - public createOverviewRuler(cssClassName: string, minimumHeight: number, maximumHeight: number): editorBrowser.IOverviewRuler { return this._view.createOverviewRuler(cssClassName, minimumHeight, maximumHeight); } @@ -188,152 +169,21 @@ export abstract class CodeEditorWidget extends CommonCodeEditor implements edito return this._view.domNode.domNode; } - public getCenteredRangeInViewport(): Range { - if (!this.hasView) { - return null; - } - return this.viewModel.getCenteredRangeInViewport(); - } - - protected _getCompletelyVisibleViewRange(): Range { - if (!this.hasView) { - return null; - } - return this._view.getCompletelyVisibleViewRange(); - } - - protected _getCompletelyVisibleViewRangeAtScrollTop(scrollTop: number): Range { + public getCompletelyVisibleLinesRangeInViewport(): Range { if (!this.hasView) { return null; } - return this._view.getCompletelyVisibleViewRangeAtScrollTop(scrollTop); - } - - protected _getVerticalOffsetForViewLineNumber(viewLineNumber: number): number { - if (!this.hasView) { - return 0; - } - return this._view.getVerticalOffsetForViewLineNumber(viewLineNumber); - } - - public getCompletelyVisibleLinesRangeInViewport(): Range { - const viewRange = this._getCompletelyVisibleViewRange(); + const viewRange = this.viewModel.getCompletelyVisibleViewRange(); return this.viewModel.coordinatesConverter.convertViewRangeToModelRange(viewRange); } - public getScrollWidth(): number { - if (!this.hasView) { - return -1; - } - return this._view.getScrollWidth(); - } - public getScrollLeft(): number { - if (!this.hasView) { - return -1; - } - return this._view.getScrollLeft(); - } - - public getScrollHeight(): number { - if (!this.hasView) { - return -1; - } - return this._view.getScrollHeight(); - } - public getScrollTop(): number { - if (!this.hasView) { - return -1; - } - return this._view.getScrollTop(); - } - - public setScrollLeft(newScrollLeft: number): void { - if (!this.hasView) { - return; - } - if (typeof newScrollLeft !== 'number') { - throw new Error('Invalid arguments'); - } - this._view.setScrollPosition({ - scrollLeft: newScrollLeft - }); - } - public setScrollTop(newScrollTop: number): void { - if (!this.hasView) { - return; - } - if (typeof newScrollTop !== 'number') { - throw new Error('Invalid arguments'); - } - this._view.setScrollPosition({ - scrollTop: newScrollTop - }); - } - public setScrollPosition(position: editorCommon.INewScrollPosition): void { - if (!this.hasView) { - return; - } - this._view.setScrollPosition(position); - } - - public delegateVerticalScrollbarMouseDown(browserEvent: MouseEvent): void { + public delegateVerticalScrollbarMouseDown(browserEvent: IMouseEvent): void { if (!this.hasView) { return; } this._view.delegateVerticalScrollbarMouseDown(browserEvent); } - public saveViewState(): editorCommon.ICodeEditorViewState { - if (!this.cursor || !this.hasView) { - return null; - } - let contributionsState: { [key: string]: any } = {}; - - let keys = Object.keys(this._contributions); - for (let i = 0, len = keys.length; i < len; i++) { - let id = keys[i]; - let contribution = this._contributions[id]; - if (typeof contribution.saveViewState === 'function') { - contributionsState[id] = contribution.saveViewState(); - } - } - - let cursorState = this.cursor.saveState(); - let viewState = this._view.saveState(); - return { - cursorState: cursorState, - viewState: viewState, - contributionsState: contributionsState - }; - } - - public restoreViewState(s: editorCommon.ICodeEditorViewState): void { - if (!this.cursor || !this.hasView) { - return; - } - if (s && s.cursorState && s.viewState) { - let codeEditorState = s; - let cursorState = codeEditorState.cursorState; - if (Array.isArray(cursorState)) { - this.cursor.restoreState(cursorState); - } else { - // Backwards compatibility - this.cursor.restoreState([cursorState]); - } - this._view.restoreState(codeEditorState.viewState); - - let contributionsState = s.contributionsState || {}; - let keys = Object.keys(this._contributions); - for (let i = 0, len = keys.length; i < len; i++) { - let id = keys[i]; - let contribution = this._contributions[id]; - if (typeof contribution.restoreViewState === 'function') { - contribution.restoreViewState(contributionsState[id]); - } - } - } - } - public layout(dimension?: editorCommon.IDimension): void { this._configuration.observeReferenceElement(dimension); this.render(); @@ -446,7 +296,7 @@ export abstract class CodeEditorWidget extends CommonCodeEditor implements edito if (!this.hasView) { return []; } - return this._view.getWhitespaces(); + return this.viewModel.viewLayout.getWhitespaces(); } private _getVerticalOffsetForPosition(modelLineNumber: number, modelColumn: number): number { @@ -455,7 +305,7 @@ export abstract class CodeEditorWidget extends CommonCodeEditor implements edito column: modelColumn }); let viewPosition = this.viewModel.coordinatesConverter.convertModelPositionToViewPosition(modelPosition); - return this._view.getVerticalOffsetForViewLineNumber(viewPosition.lineNumber); + return this.viewModel.viewLayout.getVerticalOffsetForLineNumber(viewPosition.lineNumber); } public getTopForLineNumber(lineNumber: number): number { @@ -487,8 +337,8 @@ export abstract class CodeEditorWidget extends CommonCodeEditor implements edito let position = this.model.validatePosition(rawPosition); let layoutInfo = this._configuration.editor.layoutInfo; - let top = this._getVerticalOffsetForPosition(position.lineNumber, position.column) - this._view.getScrollTop(); - let left = this._view.getOffsetForColumn(position.lineNumber, position.column) + layoutInfo.glyphMarginWidth + layoutInfo.lineNumbersWidth + layoutInfo.decorationsWidth - this._view.getScrollLeft(); + let top = this._getVerticalOffsetForPosition(position.lineNumber, position.column) - this.getScrollTop(); + let left = this._view.getOffsetForColumn(position.lineNumber, position.column) + layoutInfo.glyphMarginWidth + layoutInfo.lineNumbersWidth + layoutInfo.decorationsWidth - this.getScrollLeft(); return { top: top, @@ -553,15 +403,13 @@ export abstract class CodeEditorWidget extends CommonCodeEditor implements edito } } - protected _enableEmptySelectionClipboard(): boolean { - return browser.enableEmptySelectionClipboard; - } - protected _createView(): void { this._view = new View( this._commandService, this._configuration, + this._themeService, this.viewModel, + this.cursor, (editorCommand: CoreEditorCommand, args: any) => { if (!this.cursor) { return; @@ -664,7 +512,7 @@ class CodeEditorWidgetFocusTracker extends Disposable { private _domFocusTracker: dom.IFocusTracker; private _onChange: Emitter = this._register(new Emitter()); - public onChage: Event = this._onChange.event; + public onChange: Event = this._onChange.event; constructor(domElement: HTMLElement) { super(); @@ -687,98 +535,29 @@ class CodeEditorWidgetFocusTracker extends Disposable { } } -class OverlayWidget2 implements editorBrowser.IOverlayWidget { - - private _id: string; - private _position: editorBrowser.IOverlayWidgetPosition; - private _domNode: HTMLElement; - - constructor(id: string, position: editorBrowser.IOverlayWidgetPosition) { - this._id = id; - this._position = position; - this._domNode = document.createElement('div'); - this._domNode.className = this._id.replace(/\./g, '-').replace(/[^a-z0-9\-]/, ''); - } - - public getId(): string { - return this._id; - } - - public getDomNode(): HTMLElement { - return this._domNode; - } - - public getPosition(): editorBrowser.IOverlayWidgetPosition { - return this._position; - } -} +const squigglyStart = encodeURIComponent(``); -export enum EditCursorState { - EndOfLastEditOperation = 0 +function getSquigglySVGData(color: Color) { + return squigglyStart + encodeURIComponent(color.toString()) + squigglyEnd; } -class SingleEditOperation { - - range: Range; - text: string; - forceMoveMarkers: boolean; - - constructor(source: editorCommon.ISingleEditOperation) { - this.range = new Range(source.range.startLineNumber, source.range.startColumn, source.range.endLineNumber, source.range.endColumn); - this.text = source.text; - this.forceMoveMarkers = source.forceMoveMarkers || false; +registerThemingParticipant((theme, collector) => { + let errorBorderColor = theme.getColor(editorErrorBorder); + if (errorBorderColor) { + collector.addRule(`.monaco-editor .redsquiggly { border-bottom: 4px double ${errorBorderColor}; }`); } - -} - -export class CommandRunner implements editorCommon.ICommand { - - private _ops: SingleEditOperation[]; - private _editCursorState: EditCursorState; - - constructor(ops: editorCommon.ISingleEditOperation[], editCursorState: EditCursorState) { - this._ops = ops.map(op => new SingleEditOperation(op)); - this._editCursorState = editCursorState; + let errorForeground = theme.getColor(editorErrorForeground); + if (errorForeground) { + collector.addRule(`.monaco-editor .redsquiggly { background: url("data:image/svg+xml,${getSquigglySVGData(errorForeground)}") repeat-x bottom left; }`); } - public getEditOperations(model: editorCommon.ITokenizedModel, builder: editorCommon.IEditOperationBuilder): void { - if (this._ops.length === 0) { - return; - } - - // Sort them in ascending order by range starts - this._ops.sort((o1, o2) => { - return Range.compareRangesUsingStarts(o1.range, o2.range); - }); - - // Merge operations that touch each other - let resultOps: editorCommon.ISingleEditOperation[] = []; - let previousOp = this._ops[0]; - for (let i = 1; i < this._ops.length; i++) { - if (previousOp.range.endLineNumber === this._ops[i].range.startLineNumber && previousOp.range.endColumn === this._ops[i].range.startColumn) { - // These operations are one after another and can be merged - previousOp.range = Range.plusRange(previousOp.range, this._ops[i].range); - previousOp.text = previousOp.text + this._ops[i].text; - } else { - resultOps.push(previousOp); - previousOp = this._ops[i]; - } - } - resultOps.push(previousOp); - - for (let i = 0; i < resultOps.length; i++) { - builder.addEditOperation(Range.lift(resultOps[i].range), resultOps[i].text); - } + let warningBorderColor = theme.getColor(editorWarningBorder); + if (warningBorderColor) { + collector.addRule(`.monaco-editor .greensquiggly { border-bottom: 4px double ${warningBorderColor}; }`); } - - public computeCursorState(model: editorCommon.ITokenizedModel, helper: editorCommon.ICursorStateComputerData): Selection { - let inverseEditOperations = helper.getInverseEditOperations(); - let srcRange = inverseEditOperations[inverseEditOperations.length - 1].range; - return new Selection( - srcRange.endLineNumber, - srcRange.endColumn, - srcRange.endLineNumber, - srcRange.endColumn - ); + let warningForeground = theme.getColor(editorWarningForeground); + if (warningForeground) { + collector.addRule(`.monaco-editor .greensquiggly { background: url("data:image/svg+xml;utf8,${getSquigglySVGData(warningForeground)}") repeat-x bottom left; }`); } -} +}); \ No newline at end of file diff --git a/src/vs/editor/browser/widget/diffEditorWidget.ts b/src/vs/editor/browser/widget/diffEditorWidget.ts index df8c421914bc8..99d25e8a316f3 100644 --- a/src/vs/editor/browser/widget/diffEditorWidget.ts +++ b/src/vs/editor/browser/widget/diffEditorWidget.ts @@ -6,7 +6,6 @@ 'use strict'; import 'vs/css!./media/diffEditor'; -import * as nls from 'vs/nls'; import { RunOnceScheduler } from 'vs/base/common/async'; import { Disposable } from 'vs/base/common/lifecycle'; import * as objects from 'vs/base/common/objects'; @@ -16,7 +15,6 @@ import { ISashEvent, IVerticalSashLayoutProvider, Sash } from 'vs/base/browser/u import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; -import { DefaultConfig } from 'vs/editor/common/config/defaultConfig'; import { Range, IRange } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService'; @@ -33,11 +31,13 @@ import { ServiceCollection } from 'vs/platform/instantiation/common/serviceColle import { ColorId, MetadataConsts, FontStyle } from 'vs/editor/common/modes'; import Event, { Emitter } from 'vs/base/common/event'; import * as editorOptions from 'vs/editor/common/config/editorOptions'; -import { registerThemingParticipant, IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; -import { registerColor } from 'vs/platform/theme/common/colorRegistry'; -import { Color, RGBA } from 'vs/base/common/color'; +import { registerThemingParticipant, IThemeService, ITheme, getThemeTypeSelector } from 'vs/platform/theme/common/themeService'; +import { scrollbarShadow, diffInserted, diffRemoved, defaultInsertColor, defaultRemoveColor, diffInsertedOutline, diffRemovedOutline } from 'vs/platform/theme/common/colorRegistry'; +import { Color } from 'vs/base/common/color'; import { OverviewRulerZone } from 'vs/editor/common/view/overviewZoneManager'; import { IEditorWhitespace } from 'vs/editor/common/viewLayout/whitespaceComputer'; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; +import { DiffReview } from 'vs/editor/browser/widget/diffReview'; interface IEditorDiffDecorations { decorations: editorCommon.IModelDeltaDecoration[]; @@ -48,11 +48,6 @@ interface IEditorDiffDecorationsWithZones extends IEditorDiffDecorations { zones: editorBrowser.IViewZone[]; } -interface IEditorsDiffDecorations { - original: IEditorDiffDecorations; - modified: IEditorDiffDecorations; -} - interface IEditorsDiffDecorationsWithZones { original: IEditorDiffDecorationsWithZones; modified: IEditorDiffDecorationsWithZones; @@ -149,7 +144,6 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE private readonly id: number; - private _theme: string; private _domElement: HTMLElement; protected readonly _containerDomElement: HTMLElement; private readonly _overviewDomElement: HTMLElement; @@ -157,6 +151,7 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE private _width: number; private _height: number; + private _reviewHeight: number; private readonly _measureDomElementToken: number; private originalEditor: CodeEditor; @@ -192,6 +187,8 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE private _codeEditorService: ICodeEditorService; private _themeService: IThemeService; + private _reviewPane: DiffReview; + constructor( domElement: HTMLElement, options: editorOptions.IDiffEditorOptions, @@ -214,7 +211,6 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE this._domElement = domElement; options = options || {}; - this._theme = options.theme || DefaultConfig.editor.theme; // renderSideBySide this._renderSideBySide = true; if (typeof options.renderSideBySide !== 'undefined') { @@ -241,7 +237,7 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE this._updateDecorationsRunner = this._register(new RunOnceScheduler(() => this._updateDecorations(), 0)); this._containerDomElement = document.createElement('div'); - this._containerDomElement.className = DiffEditorWidget._getClassName(this._theme, this._renderSideBySide); + this._containerDomElement.className = DiffEditorWidget._getClassName(this._themeService.getTheme(), this._renderSideBySide); this._containerDomElement.style.position = 'relative'; this._containerDomElement.style.height = '100%'; this._domElement.appendChild(this._containerDomElement); @@ -253,11 +249,10 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE this._overviewDomElement = document.createElement('div'); this._overviewDomElement.className = 'diffOverview'; this._overviewDomElement.style.position = 'absolute'; - this._overviewDomElement.style.height = '100%'; this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode); - this._register(dom.addDisposableListener(this._overviewDomElement, 'mousedown', (e: MouseEvent) => { + this._register(dom.addStandardDisposableListener(this._overviewDomElement, 'mousedown', (e) => { this.modifiedEditor.delegateVerticalScrollbarMouseDown(e); })); this._containerDomElement.appendChild(this._overviewDomElement); @@ -277,6 +272,7 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE this._width = 0; this._height = 0; + this._reviewHeight = 0; this._lineChanges = null; @@ -288,6 +284,11 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE this._createLeftHandSideEditor(options, scopedInstantiationService); this._createRightHandSideEditor(options, scopedInstantiationService); + this._reviewPane = new DiffReview(this); + this._containerDomElement.appendChild(this._reviewPane.domNode.domNode); + this._containerDomElement.appendChild(this._reviewPane.shadow.domNode); + this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode); + if (options.automaticLayout) { this._measureDomElementToken = window.setInterval(() => this._measureDomElement(false), 100); } @@ -306,11 +307,12 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE this._codeEditorService.addDiffEditor(this); - themeService.onThemeChange(t => { + this._register(themeService.onThemeChange(t => { if (this._strategy && this._strategy.applyColors(t)) { this._updateDecorationsRunner.schedule(); } - }); + this._containerDomElement.className = DiffEditorWidget._getClassName(this._themeService.getTheme(), this._renderSideBySide); + })); } public get ignoreTrimWhitespace(): boolean { @@ -325,12 +327,24 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE return this._renderIndicators; } - private static _getClassName(theme: string, renderSideBySide: boolean): string { + public hasWidgetFocus(): boolean { + return dom.isAncestor(document.activeElement, this._domElement); + } + + public diffReviewNext(): void { + this._reviewPane.next(); + } + + public diffReviewPrev(): void { + this._reviewPane.prev(); + } + + private static _getClassName(theme: ITheme, renderSideBySide: boolean): string { let result = 'monaco-diff-editor monaco-editor-background '; if (renderSideBySide) { result += 'side-by-side '; } - result += theme; + result += getThemeTypeSelector(theme.type); return result; } @@ -375,7 +389,7 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE if (this._isHandlingScrollEvent) { return; } - if (!e.scrollTopChanged && !e.scrollLeftChanged) { + if (!e.scrollTopChanged && !e.scrollLeftChanged && !e.scrollHeightChanged) { return; } this._isHandlingScrollEvent = true; @@ -406,7 +420,7 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE if (this._isHandlingScrollEvent) { return; } - if (!e.scrollTopChanged && !e.scrollLeftChanged) { + if (!e.scrollTopChanged && !e.scrollLeftChanged && !e.scrollHeightChanged) { return; } this._isHandlingScrollEvent = true; @@ -459,6 +473,8 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE this._strategy.dispose(); + this._reviewPane.dispose(); + this._onDidDispose.fire(); super.dispose(); @@ -487,8 +503,6 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE } public updateOptions(newOptions: editorOptions.IDiffEditorOptions): void { - // Handle new theme - this._theme = newOptions && newOptions.theme ? newOptions.theme : this._theme; // Handle side by side let renderSideBySideChanged = false; @@ -524,9 +538,6 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE this._originalIsEditable = Boolean(newOptions.originalEditable); } - // Update class name - this._containerDomElement.className = DiffEditorWidget._getClassName(this._theme, this._renderSideBySide); - this.modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(newOptions)); this.originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(newOptions, this._originalIsEditable)); @@ -543,6 +554,8 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE } else { this._setStrategy(new DiffEdtorWidgetInline(this._createDataSource(), this._enableSplitViewResizing)); } + // Update class name + this._containerDomElement.className = DiffEditorWidget._getClassName(this._themeService.getTheme(), this._renderSideBySide); } } @@ -760,6 +773,7 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE if (dimensions.width <= 0) { this._width = 0; this._height = 0; + this._reviewHeight = 0; return; } @@ -770,6 +784,7 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE this._width = dimensions.width; this._height = dimensions.height; + this._reviewHeight = this._reviewPane.isVisible() ? this._height : 0; this._doLayout(); } @@ -778,18 +793,18 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE let freeSpace = DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH - 2 * DiffEditorWidget.ONE_OVERVIEW_WIDTH; let layoutInfo = this.modifiedEditor.getLayoutInfo(); if (layoutInfo) { - this._originalOverviewRuler.setLayout(new editorOptions.OverviewRulerPosition({ + this._originalOverviewRuler.setLayout({ top: 0, width: DiffEditorWidget.ONE_OVERVIEW_WIDTH, right: freeSpace + DiffEditorWidget.ONE_OVERVIEW_WIDTH, - height: this._height - })); - this._modifiedOverviewRuler.setLayout(new editorOptions.OverviewRulerPosition({ + height: (this._height - this._reviewHeight) + }); + this._modifiedOverviewRuler.setLayout({ top: 0, right: 0, width: DiffEditorWidget.ONE_OVERVIEW_WIDTH, - height: this._height - })); + height: (this._height - this._reviewHeight) + }); } } @@ -813,7 +828,9 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE private _beginUpdateDecorations(): void { this._beginUpdateDecorationsTimeout = -1; - if (!this.modifiedEditor.getModel()) { + const currentOriginalModel = this.originalEditor.getModel(); + const currentModifiedModel = this.modifiedEditor.getModel(); + if (!currentOriginalModel || !currentModifiedModel) { return; } @@ -822,8 +839,6 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE // yet supported, so using tokens for now. this._diffComputationToken++; let currentToken = this._diffComputationToken; - let currentOriginalModel = this.originalEditor.getModel(); - let currentModifiedModel = this.modifiedEditor.getModel(); this._editorWorkerService.computeDiff(currentOriginalModel.uri, currentModifiedModel.uri, this._ignoreTrimWhitespace).then((result) => { if (currentToken === this._diffComputationToken @@ -893,18 +908,22 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE let result = this._adjustOptionsForSubEditor(options); result.readOnly = !isEditable; result.overviewRulerLanes = 1; - result.theme = this._theme + ' original-in-monaco-diff-editor'; + result.extraEditorClassName = 'original-in-monaco-diff-editor'; return result; } private _adjustOptionsForRightHandSide(options: editorOptions.IDiffEditorOptions): editorOptions.IEditorOptions { let result = this._adjustOptionsForSubEditor(options); - result.revealHorizontalRightPadding = DefaultConfig.editor.revealHorizontalRightPadding + DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH; + result.revealHorizontalRightPadding = editorOptions.EDITOR_DEFAULTS.viewInfo.revealHorizontalRightPadding + DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH; result.scrollbar.verticalHasArrows = false; - result.theme = this._theme + ' modified-in-monaco-diff-editor'; + result.extraEditorClassName = 'modified-in-monaco-diff-editor'; return result; } + public doLayout(): void { + this._measureDomElement(true); + } + private _doLayout(): void { let splitPoint = this._strategy.layout(); @@ -915,18 +934,21 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE this._modifiedDomNode.style.left = splitPoint + 'px'; this._overviewDomElement.style.top = '0px'; + this._overviewDomElement.style.height = (this._height - this._reviewHeight) + 'px'; this._overviewDomElement.style.width = DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH + 'px'; this._overviewDomElement.style.left = (this._width - DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH) + 'px'; this._overviewViewportDomElement.setWidth(DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH); this._overviewViewportDomElement.setHeight(30); - this.originalEditor.layout({ width: splitPoint, height: this._height }); - this.modifiedEditor.layout({ width: this._width - splitPoint - DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH, height: this._height }); + this.originalEditor.layout({ width: splitPoint, height: (this._height - this._reviewHeight) }); + this.modifiedEditor.layout({ width: this._width - splitPoint - DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH, height: (this._height - this._reviewHeight) }); if (this._originalOverviewRuler || this._modifiedOverviewRuler) { this._layoutOverviewRulers(); } + this._reviewPane.layout(this._height - this._reviewHeight, this._width, this._reviewHeight); + this._layoutOverviewViewport(); } @@ -954,7 +976,7 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE let computedRepresentableSize = Math.max(0, computedAvailableSize - 2 * 0); let computedRatio = scrollHeight > 0 ? (computedRepresentableSize / scrollHeight) : 0; - let computedSliderSize = Math.max(1, Math.floor(layoutInfo.contentHeight * computedRatio)); + let computedSliderSize = Math.max(0, Math.floor(layoutInfo.contentHeight * computedRatio)); let computedSliderPosition = Math.floor(scrollTop * computedRatio); return { @@ -970,7 +992,7 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE }, getHeight: () => { - return this._height; + return (this._height - this._reviewHeight); }, getContainerDomNode: () => { @@ -1384,6 +1406,61 @@ abstract class ViewZonesComputer { protected abstract _produceModifiedFromDiff(lineChange: editorCommon.ILineChange, lineChangeOriginalLength: number, lineChangeModifiedLength: number): IMyViewZone; } +function createDecoration(startLineNumber: number, startColumn: number, endLineNumber: number, endColumn: number, options: ModelDecorationOptions) { + return { + range: new Range(startLineNumber, startColumn, endLineNumber, endColumn), + options: options + }; +} + +const DECORATIONS = { + + charDelete: ModelDecorationOptions.register({ + className: 'char-delete' + }), + charDeleteWholeLine: ModelDecorationOptions.register({ + className: 'char-delete', + isWholeLine: true + }), + + charInsert: ModelDecorationOptions.register({ + className: 'char-insert' + }), + charInsertWholeLine: ModelDecorationOptions.register({ + className: 'char-insert', + isWholeLine: true + }), + + lineInsert: ModelDecorationOptions.register({ + className: 'line-insert', + marginClassName: 'line-insert', + isWholeLine: true + }), + lineInsertWithSign: ModelDecorationOptions.register({ + className: 'line-insert', + linesDecorationsClassName: 'insert-sign', + marginClassName: 'line-insert', + isWholeLine: true + }), + + lineDelete: ModelDecorationOptions.register({ + className: 'line-delete', + marginClassName: 'line-delete', + isWholeLine: true + }), + lineDeleteWithSign: ModelDecorationOptions.register({ + className: 'line-delete', + linesDecorationsClassName: 'delete-sign', + marginClassName: 'line-delete', + isWholeLine: true + + }), + lineDeleteMargin: ModelDecorationOptions.register({ + marginClassName: 'line-delete', + }) + +}; + class DiffEdtorWidgetSideBySide extends DiffEditorWidgetStyle implements IDiffEditorWidgetStyle, IVerticalSashLayoutProvider { static MINIMUM_EDITOR_WIDTH = 100; @@ -1514,15 +1591,10 @@ class DiffEdtorWidgetSideBySide extends DiffEditorWidgetStyle implements IDiffEd if (isChangeOrDelete(lineChange)) { result.decorations.push({ range: new Range(lineChange.originalStartLineNumber, 1, lineChange.originalEndLineNumber, Number.MAX_VALUE), - options: { - className: 'line-delete', - linesDecorationsClassName: renderIndicators ? 'delete-sign' : undefined, - marginClassName: 'line-delete', - isWholeLine: true - } + options: (renderIndicators ? DECORATIONS.lineDeleteWithSign : DECORATIONS.lineDelete) }); if (!isChangeOrInsert(lineChange) || !lineChange.charChanges) { - result.decorations.push(createDecoration(lineChange.originalStartLineNumber, 1, lineChange.originalEndLineNumber, Number.MAX_VALUE, 'char-delete', true)); + result.decorations.push(createDecoration(lineChange.originalStartLineNumber, 1, lineChange.originalEndLineNumber, Number.MAX_VALUE, DECORATIONS.charDeleteWholeLine)); } let color = this._removeColor.toString(); @@ -1555,10 +1627,10 @@ class DiffEdtorWidgetSideBySide extends DiffEditorWidgetStyle implements IDiffEd } else { endColumn = originalModel.getLineLastNonWhitespaceColumn(lineNumber); } - result.decorations.push(createDecoration(lineNumber, startColumn, lineNumber, endColumn, 'char-delete', false)); + result.decorations.push(createDecoration(lineNumber, startColumn, lineNumber, endColumn, DECORATIONS.charDelete)); } } else { - result.decorations.push(createDecoration(charChange.originalStartLineNumber, charChange.originalStartColumn, charChange.originalEndLineNumber, charChange.originalEndColumn, 'char-delete', false)); + result.decorations.push(createDecoration(charChange.originalStartLineNumber, charChange.originalStartColumn, charChange.originalEndLineNumber, charChange.originalEndColumn, DECORATIONS.charDelete)); } } } @@ -1585,15 +1657,10 @@ class DiffEdtorWidgetSideBySide extends DiffEditorWidgetStyle implements IDiffEd result.decorations.push({ range: new Range(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedEndLineNumber, Number.MAX_VALUE), - options: { - className: 'line-insert', - linesDecorationsClassName: renderIndicators ? 'insert-sign' : undefined, - marginClassName: 'line-insert', - isWholeLine: true - } + options: (renderIndicators ? DECORATIONS.lineInsertWithSign : DECORATIONS.lineInsert) }); if (!isChangeOrDelete(lineChange) || !lineChange.charChanges) { - result.decorations.push(createDecoration(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedEndLineNumber, Number.MAX_VALUE, 'char-insert', true)); + result.decorations.push(createDecoration(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedEndLineNumber, Number.MAX_VALUE, DECORATIONS.charInsertWholeLine)); } let color = this._insertColor.toString(); result.overviewZones.push(new OverviewRulerZone( @@ -1624,10 +1691,10 @@ class DiffEdtorWidgetSideBySide extends DiffEditorWidgetStyle implements IDiffEd } else { endColumn = modifiedModel.getLineLastNonWhitespaceColumn(lineNumber); } - result.decorations.push(createDecoration(lineNumber, startColumn, lineNumber, endColumn, 'char-insert', false)); + result.decorations.push(createDecoration(lineNumber, startColumn, lineNumber, endColumn, DECORATIONS.charInsert)); } } else { - result.decorations.push(createDecoration(charChange.modifiedStartLineNumber, charChange.modifiedStartColumn, charChange.modifiedEndLineNumber, charChange.modifiedEndColumn, 'char-insert', false)); + result.decorations.push(createDecoration(charChange.modifiedStartLineNumber, charChange.modifiedStartColumn, charChange.modifiedEndLineNumber, charChange.modifiedEndColumn, DECORATIONS.charInsert)); } } } @@ -1711,9 +1778,7 @@ class DiffEdtorWidgetInline extends DiffEditorWidgetStyle implements IDiffEditor if (isChangeOrDelete(lineChange)) { result.decorations.push({ range: new Range(lineChange.originalStartLineNumber, 1, lineChange.originalEndLineNumber, Number.MAX_VALUE), - options: { - marginClassName: 'line-delete', - } + options: DECORATIONS.lineDeleteMargin }); let color = this._removeColor.toString(); @@ -1748,12 +1813,7 @@ class DiffEdtorWidgetInline extends DiffEditorWidgetStyle implements IDiffEditor if (isChangeOrInsert(lineChange)) { result.decorations.push({ range: new Range(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedEndLineNumber, Number.MAX_VALUE), - options: { - className: 'line-insert', - linesDecorationsClassName: renderIndicators ? 'insert-sign' : undefined, - marginClassName: 'line-insert', - isWholeLine: true - } + options: (renderIndicators ? DECORATIONS.lineInsertWithSign : DECORATIONS.lineInsert) }); let color = this._insertColor.toString(); @@ -1785,15 +1845,15 @@ class DiffEdtorWidgetInline extends DiffEditorWidgetStyle implements IDiffEditor } else { endColumn = modifiedModel.getLineLastNonWhitespaceColumn(lineNumber); } - result.decorations.push(createDecoration(lineNumber, startColumn, lineNumber, endColumn, 'char-insert', false)); + result.decorations.push(createDecoration(lineNumber, startColumn, lineNumber, endColumn, DECORATIONS.charInsert)); } } else { - result.decorations.push(createDecoration(charChange.modifiedStartLineNumber, charChange.modifiedStartColumn, charChange.modifiedEndLineNumber, charChange.modifiedEndColumn, 'char-insert', false)); + result.decorations.push(createDecoration(charChange.modifiedStartLineNumber, charChange.modifiedStartColumn, charChange.modifiedEndLineNumber, charChange.modifiedEndColumn, DECORATIONS.charInsert)); } } } } else { - result.decorations.push(createDecoration(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedEndLineNumber, Number.MAX_VALUE, 'char-insert', true)); + result.decorations.push(createDecoration(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedEndLineNumber, Number.MAX_VALUE, DECORATIONS.charInsertWholeLine)); } } } @@ -1935,40 +1995,23 @@ function isChangeOrDelete(lineChange: editorCommon.IChange): boolean { return lineChange.originalEndLineNumber > 0; } -function createDecoration(startLineNumber: number, startColumn: number, endLineNumber: number, endColumn: number, className: string, isWholeLine: boolean) { - return { - range: new Range(startLineNumber, startColumn, endLineNumber, endColumn), - options: { - className: className, - isWholeLine: isWholeLine - } - }; -} - function createFakeLinesDiv(): HTMLElement { let r = document.createElement('div'); r.className = 'diagonal-fill'; return r; } -const defaultInsertColor = Color.fromRGBA(new RGBA(155, 185, 85, 255 * 0.2)); -const defaultRemoveColor = Color.fromRGBA(new RGBA(255, 0, 0, 255 * 0.2)); - -export const diffInserted = registerColor('diffEditorInserted', { dark: defaultInsertColor, light: defaultInsertColor, hc: null }, nls.localize('diffEditorInserted', 'Background color for text that got inserted.')); -export const diffRemoved = registerColor('diffEditorRemoved', { dark: defaultRemoveColor, light: defaultRemoveColor, hc: null }, nls.localize('diffEditorRemoved', 'Background color for text that got removed.')); -export const diffInsertedOutline = registerColor('diffEditorInsertedOutline', { dark: null, light: null, hc: '#33ff2eff' }, nls.localize('diffEditorInsertedOutline', 'Outline color for the text that got inserted.')); -export const diffRemovedOutline = registerColor('diffEditorRemovedOutline', { dark: null, light: null, hc: '#FF008F' }, nls.localize('diffEditorRemovedOutline', 'Outline color for text that got removed.')); - - registerThemingParticipant((theme, collector) => { let added = theme.getColor(diffInserted); if (added) { collector.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { background-color: ${added}; }`); + collector.addRule(`.monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: ${added}; }`); collector.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${added}; }`); } let removed = theme.getColor(diffRemoved); if (removed) { collector.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { background-color: ${removed}; }`); + collector.addRule(`.monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: ${removed}; }`); collector.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${removed}; }`); } let addedOutline = theme.getColor(diffInsertedOutline); @@ -1979,4 +2022,8 @@ registerThemingParticipant((theme, collector) => { if (removedOutline) { collector.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px dashed ${removedOutline}; }`); } + let shadow = theme.getColor(scrollbarShadow); + if (shadow) { + collector.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${shadow}; }`); + } }); \ No newline at end of file diff --git a/src/vs/editor/contrib/diffNavigator/common/diffNavigator.ts b/src/vs/editor/browser/widget/diffNavigator.ts similarity index 100% rename from src/vs/editor/contrib/diffNavigator/common/diffNavigator.ts rename to src/vs/editor/browser/widget/diffNavigator.ts diff --git a/src/vs/editor/browser/widget/diffReview.ts b/src/vs/editor/browser/widget/diffReview.ts new file mode 100644 index 0000000000000..777054eee0624 --- /dev/null +++ b/src/vs/editor/browser/widget/diffReview.ts @@ -0,0 +1,822 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import 'vs/css!./media/diffReview'; +import * as nls from 'vs/nls'; +import { Disposable } from 'vs/base/common/lifecycle'; +import * as dom from 'vs/base/browser/dom'; +import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; +import * as editorCommon from 'vs/editor/common/editorCommon'; +import { renderViewLine, RenderLineInput } from 'vs/editor/common/viewLayout/viewLineRenderer'; +import { ViewLineToken } from 'vs/editor/common/core/viewLineToken'; +import { Configuration } from 'vs/editor/browser/config/configuration'; +import { Position } from 'vs/editor/common/core/position'; +import { ColorId, MetadataConsts, FontStyle } from 'vs/editor/common/modes'; +import * as editorOptions from 'vs/editor/common/config/editorOptions'; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { scrollbarShadow } from 'vs/platform/theme/common/colorRegistry'; +import { DiffEditorWidget } from 'vs/editor/browser/widget/diffEditorWidget'; +import { DomScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement'; +import { editorLineNumbers } from 'vs/editor/common/view/editorColorRegistry'; +import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; +import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar'; +import { Action } from 'vs/base/common/actions'; +import { editorAction, EditorAction, ServicesAccessor } from 'vs/editor/common/editorCommonExtensions'; +import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; +import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; + +const DIFF_LINES_PADDING = 3; + +const enum DiffEntryType { + Equal = 0, + Insert = 1, + Delete = 2 +} + +class DiffEntry { + readonly originalLineStart: number; + readonly originalLineEnd: number; + readonly modifiedLineStart: number; + readonly modifiedLineEnd: number; + + constructor(originalLineStart: number, originalLineEnd: number, modifiedLineStart: number, modifiedLineEnd: number) { + this.originalLineStart = originalLineStart; + this.originalLineEnd = originalLineEnd; + this.modifiedLineStart = modifiedLineStart; + this.modifiedLineEnd = modifiedLineEnd; + } + + public getType(): DiffEntryType { + if (this.originalLineStart === 0) { + return DiffEntryType.Insert; + } + if (this.modifiedLineStart === 0) { + return DiffEntryType.Delete; + } + return DiffEntryType.Equal; + } +} + +class Diff { + readonly entries: DiffEntry[]; + + constructor(entries: DiffEntry[]) { + this.entries = entries; + } +} + +export class DiffReview extends Disposable { + + private readonly _diffEditor: DiffEditorWidget; + private _isVisible: boolean; + public readonly shadow: FastDomNode; + private readonly _actionBar: ActionBar; + public readonly actionBarContainer: FastDomNode; + public readonly domNode: FastDomNode; + private readonly _content: FastDomNode; + private readonly scrollbar: DomScrollableElement; + private _diffs: Diff[]; + private _currentDiff: Diff; + + constructor(diffEditor: DiffEditorWidget) { + super(); + this._diffEditor = diffEditor; + this._isVisible = false; + + this.shadow = createFastDomNode(document.createElement('div')); + this.shadow.setClassName('diff-review-shadow'); + + this.actionBarContainer = createFastDomNode(document.createElement('div')); + this.actionBarContainer.setClassName('diff-review-actions'); + this._actionBar = this._register(new ActionBar( + this.actionBarContainer.domNode + )); + + this._actionBar.push(new Action('diffreview.close', nls.localize('label.close', "Close"), 'close-diff-review', true, () => { + this.hide(); + return null; + }), { label: false, icon: true }); + + this.domNode = createFastDomNode(document.createElement('div')); + this.domNode.setClassName('diff-review monaco-editor-background'); + + this._content = createFastDomNode(document.createElement('div')); + this._content.setClassName('diff-review-content'); + this.scrollbar = this._register(new DomScrollableElement(this._content.domNode, {})); + this.domNode.domNode.appendChild(this.scrollbar.getDomNode()); + + this._register(diffEditor.onDidUpdateDiff(() => { + if (!this._isVisible) { + return; + } + this._diffs = this._compute(); + this._render(); + })); + this._register(diffEditor.getModifiedEditor().onDidChangeCursorPosition(() => { + if (!this._isVisible) { + return; + } + this._render(); + })); + this._register(diffEditor.getOriginalEditor().onDidFocusEditor(() => { + if (this._isVisible) { + this.hide(); + } + })); + this._register(diffEditor.getModifiedEditor().onDidFocusEditor(() => { + if (this._isVisible) { + this.hide(); + } + })); + this._register(dom.addStandardDisposableListener(this.domNode.domNode, 'click', (e) => { + e.preventDefault(); + + let row = dom.findParentWithClass(e.target, 'diff-review-row'); + if (row) { + this._goToRow(row); + } + })); + this._register(dom.addStandardDisposableListener(this.domNode.domNode, 'keydown', (e) => { + if ( + e.equals(KeyCode.DownArrow) + || e.equals(KeyMod.CtrlCmd | KeyCode.DownArrow) + || e.equals(KeyMod.Alt | KeyCode.DownArrow) + ) { + e.preventDefault(); + this._goToRow(this._getNextRow()); + } + + if ( + e.equals(KeyCode.UpArrow) + || e.equals(KeyMod.CtrlCmd | KeyCode.UpArrow) + || e.equals(KeyMod.Alt | KeyCode.UpArrow) + ) { + e.preventDefault(); + this._goToRow(this._getPrevRow()); + } + + if ( + e.equals(KeyCode.Escape) + || e.equals(KeyMod.CtrlCmd | KeyCode.Escape) + || e.equals(KeyMod.Alt | KeyCode.Escape) + || e.equals(KeyMod.Shift | KeyCode.Escape) + ) { + e.preventDefault(); + this.hide(); + } + + if ( + e.equals(KeyCode.Space) + || e.equals(KeyCode.Enter) + ) { + e.preventDefault(); + this.accept(); + } + })); + this._diffs = []; + this._currentDiff = null; + } + + public prev(): void { + let index = 0; + + if (!this._isVisible) { + this._diffs = this._compute(); + } + + if (this._isVisible) { + let currentIndex = -1; + for (let i = 0, len = this._diffs.length; i < len; i++) { + if (this._diffs[i] === this._currentDiff) { + currentIndex = i; + break; + } + } + index = (this._diffs.length + currentIndex - 1); + } else { + index = this._findDiffIndex(this._diffEditor.getPosition()); + } + + if (this._diffs.length === 0) { + // Nothing to do + return; + } + + index = index % this._diffs.length; + this._diffEditor.setPosition(new Position(this._diffs[index].entries[0].modifiedLineStart, 1)); + this._isVisible = true; + this._diffEditor.doLayout(); + this._render(); + this._goToRow(this._getNextRow()); + } + + public next(): void { + let index = 0; + + if (!this._isVisible) { + this._diffs = this._compute(); + } + + if (this._isVisible) { + let currentIndex = -1; + for (let i = 0, len = this._diffs.length; i < len; i++) { + if (this._diffs[i] === this._currentDiff) { + currentIndex = i; + break; + } + } + index = (currentIndex + 1); + } else { + index = this._findDiffIndex(this._diffEditor.getPosition()); + } + + if (this._diffs.length === 0) { + // Nothing to do + return; + } + + index = index % this._diffs.length; + this._diffEditor.setPosition(new Position(this._diffs[index].entries[0].modifiedLineStart, 1)); + this._isVisible = true; + this._diffEditor.doLayout(); + this._render(); + this._goToRow(this._getNextRow()); + } + + private accept(): void { + let jumpToLineNumber = -1; + let current = this._getCurrentFocusedRow(); + if (current) { + let lineNumber = parseInt(current.getAttribute('data-line'), 10); + if (!isNaN(lineNumber)) { + jumpToLineNumber = lineNumber; + } + } + this.hide(); + + if (jumpToLineNumber !== -1) { + this._diffEditor.setPosition(new Position(jumpToLineNumber, 1)); + this._diffEditor.revealPosition(new Position(jumpToLineNumber, 1)); + } + } + + private hide(): void { + this._isVisible = false; + this._diffEditor.focus(); + this._diffEditor.doLayout(); + this._render(); + } + + private _getPrevRow(): HTMLElement { + let current = this._getCurrentFocusedRow(); + if (!current) { + return this._getFirstRow(); + } + if (current.previousElementSibling) { + return current.previousElementSibling; + } + return current; + } + + private _getNextRow(): HTMLElement { + let current = this._getCurrentFocusedRow(); + if (!current) { + return this._getFirstRow(); + } + if (current.nextElementSibling) { + return current.nextElementSibling; + } + return current; + } + + private _getFirstRow(): HTMLElement { + return this.domNode.domNode.querySelector('.diff-review-row'); + } + + private _getCurrentFocusedRow(): HTMLElement { + let result = document.activeElement; + if (result && /diff-review-row/.test(result.className)) { + return result; + } + return null; + } + + private _goToRow(row: HTMLElement): void { + let prev = this._getCurrentFocusedRow(); + row.tabIndex = 0; + row.focus(); + if (prev && prev !== row) { + prev.tabIndex = -1; + } + this.scrollbar.scanDomNode(); + } + + public isVisible(): boolean { + return this._isVisible; + } + + private _width: number = 0; + + public layout(top: number, width: number, height: number): void { + this._width = width; + this.shadow.setTop(top - 6); + this.shadow.setWidth(width); + this.shadow.setHeight(this._isVisible ? 6 : 0); + this.domNode.setTop(top); + this.domNode.setWidth(width); + this.domNode.setHeight(height); + this._content.setHeight(height); + this._content.setWidth(width); + + if (this._isVisible) { + this.actionBarContainer.setAttribute('aria-hidden', 'false'); + this.actionBarContainer.setDisplay('block'); + } else { + this.actionBarContainer.setAttribute('aria-hidden', 'true'); + this.actionBarContainer.setDisplay('none'); + } + } + + private _compute(): Diff[] { + const lineChanges = this._diffEditor.getLineChanges(); + if (!lineChanges || lineChanges.length === 0) { + return []; + } + const originalModel = this._diffEditor.getOriginalEditor().getModel(); + const modifiedModel = this._diffEditor.getModifiedEditor().getModel(); + + if (!originalModel || !modifiedModel) { + return []; + } + + return DiffReview._mergeAdjacent(lineChanges, originalModel.getLineCount(), modifiedModel.getLineCount()); + } + + private static _mergeAdjacent(lineChanges: editorCommon.ILineChange[], originalLineCount: number, modifiedLineCount: number): Diff[] { + if (!lineChanges || lineChanges.length === 0) { + return []; + } + + let diffs: Diff[] = [], diffsLength = 0; + + for (let i = 0, len = lineChanges.length; i < len; i++) { + const lineChange = lineChanges[i]; + + const originalStart = lineChange.originalStartLineNumber; + const originalEnd = lineChange.originalEndLineNumber; + const modifiedStart = lineChange.modifiedStartLineNumber; + const modifiedEnd = lineChange.modifiedEndLineNumber; + + let r: DiffEntry[] = [], rLength = 0; + + // Emit before anchors + { + const originalEqualAbove = (originalEnd === 0 ? originalStart : originalStart - 1); + const modifiedEqualAbove = (modifiedEnd === 0 ? modifiedStart : modifiedStart - 1); + + // Make sure we don't step into the previous diff + let minOriginal = 1; + let minModified = 1; + if (i > 0) { + const prevLineChange = lineChanges[i - 1]; + + if (prevLineChange.originalEndLineNumber === 0) { + minOriginal = prevLineChange.originalStartLineNumber + 1; + } else { + minOriginal = prevLineChange.originalEndLineNumber + 1; + } + + if (prevLineChange.modifiedEndLineNumber === 0) { + minModified = prevLineChange.modifiedStartLineNumber + 1; + } else { + minModified = prevLineChange.modifiedEndLineNumber + 1; + } + } + + let fromOriginal = originalEqualAbove - DIFF_LINES_PADDING + 1; + let fromModified = modifiedEqualAbove - DIFF_LINES_PADDING + 1; + if (fromOriginal < minOriginal) { + const delta = minOriginal - fromOriginal; + fromOriginal = fromOriginal + delta; + fromModified = fromModified + delta; + } + if (fromModified < minModified) { + const delta = minModified - fromModified; + fromOriginal = fromOriginal + delta; + fromModified = fromModified + delta; + } + + r[rLength++] = new DiffEntry( + fromOriginal, originalEqualAbove, + fromModified, modifiedEqualAbove + ); + } + + // Emit deleted lines + { + if (originalEnd !== 0) { + r[rLength++] = new DiffEntry(originalStart, originalEnd, 0, 0); + } + } + + // Emit inserted lines + { + if (modifiedEnd !== 0) { + r[rLength++] = new DiffEntry(0, 0, modifiedStart, modifiedEnd); + } + } + + // Emit after anchors + { + const originalEqualBelow = (originalEnd === 0 ? originalStart + 1 : originalEnd + 1); + const modifiedEqualBelow = (modifiedEnd === 0 ? modifiedStart + 1 : modifiedEnd + 1); + + // Make sure we don't step into the next diff + let maxOriginal = originalLineCount; + let maxModified = modifiedLineCount; + if (i + 1 < len) { + const nextLineChange = lineChanges[i + 1]; + + if (nextLineChange.originalEndLineNumber === 0) { + maxOriginal = nextLineChange.originalStartLineNumber; + } else { + maxOriginal = nextLineChange.originalStartLineNumber - 1; + } + + if (nextLineChange.modifiedEndLineNumber === 0) { + maxModified = nextLineChange.modifiedStartLineNumber; + } else { + maxModified = nextLineChange.modifiedStartLineNumber - 1; + } + } + + let toOriginal = originalEqualBelow + DIFF_LINES_PADDING - 1; + let toModified = modifiedEqualBelow + DIFF_LINES_PADDING - 1; + + if (toOriginal > maxOriginal) { + const delta = maxOriginal - toOriginal; + toOriginal = toOriginal + delta; + toModified = toModified + delta; + } + if (toModified > maxModified) { + const delta = maxModified - toModified; + toOriginal = toOriginal + delta; + toModified = toModified + delta; + } + + r[rLength++] = new DiffEntry( + originalEqualBelow, toOriginal, + modifiedEqualBelow, toModified, + ); + } + + diffs[diffsLength++] = new Diff(r); + } + + // Merge adjacent diffs + let curr: DiffEntry[] = diffs[0].entries; + let r: Diff[] = [], rLength = 0; + for (let i = 1, len = diffs.length; i < len; i++) { + const thisDiff = diffs[i].entries; + + const currLast = curr[curr.length - 1]; + const thisFirst = thisDiff[0]; + + if ( + currLast.getType() === DiffEntryType.Equal + && thisFirst.getType() === DiffEntryType.Equal + && thisFirst.originalLineStart <= currLast.originalLineEnd + ) { + // We are dealing with equal lines that overlap + + curr[curr.length - 1] = new DiffEntry( + currLast.originalLineStart, thisFirst.originalLineEnd, + currLast.modifiedLineStart, thisFirst.modifiedLineEnd + ); + curr = curr.concat(thisDiff.slice(1)); + continue; + } + + r[rLength++] = new Diff(curr); + curr = thisDiff; + } + r[rLength++] = new Diff(curr); + return r; + } + + private _findDiffIndex(pos: Position): number { + const lineNumber = pos.lineNumber; + for (let i = 0, len = this._diffs.length; i < len; i++) { + const diff = this._diffs[i].entries; + const lastModifiedLine = diff[diff.length - 1].modifiedLineEnd; + if (lineNumber <= lastModifiedLine) { + return i; + } + } + return 0; + } + + private _render(): void { + + const originalOpts = this._diffEditor.getOriginalEditor().getConfiguration(); + const modifiedOpts = this._diffEditor.getModifiedEditor().getConfiguration(); + + const originalModel = this._diffEditor.getOriginalEditor().getModel(); + const modifiedModel = this._diffEditor.getModifiedEditor().getModel(); + + const originalModelOpts = originalModel.getOptions(); + const modifiedModelOpts = modifiedModel.getOptions(); + + if (!this._isVisible || !originalModel || !modifiedModel) { + dom.clearNode(this._content.domNode); + this._currentDiff = null; + this.scrollbar.scanDomNode(); + return; + } + + const pos = this._diffEditor.getPosition(); + const diffIndex = this._findDiffIndex(pos); + + if (this._diffs[diffIndex] === this._currentDiff) { + return; + } + this._currentDiff = this._diffs[diffIndex]; + + const diffs = this._diffs[diffIndex].entries; + let container = document.createElement('div'); + container.className = 'diff-review-table'; + container.setAttribute('role', 'list'); + Configuration.applyFontInfoSlow(container, modifiedOpts.fontInfo); + + let minOriginalLine = 0; + let maxOriginalLine = 0; + let minModifiedLine = 0; + let maxModifiedLine = 0; + for (let i = 0, len = diffs.length; i < len; i++) { + const diffEntry = diffs[i]; + const originalLineStart = diffEntry.originalLineStart; + const originalLineEnd = diffEntry.originalLineEnd; + const modifiedLineStart = diffEntry.modifiedLineStart; + const modifiedLineEnd = diffEntry.modifiedLineEnd; + + if (originalLineStart !== 0 && ((minOriginalLine === 0 || originalLineStart < minOriginalLine))) { + minOriginalLine = originalLineStart; + } + if (originalLineEnd !== 0 && ((maxOriginalLine === 0 || originalLineEnd > maxOriginalLine))) { + maxOriginalLine = originalLineEnd; + } + if (modifiedLineStart !== 0 && ((minModifiedLine === 0 || modifiedLineStart < minModifiedLine))) { + minModifiedLine = modifiedLineStart; + } + if (modifiedLineEnd !== 0 && ((maxModifiedLine === 0 || modifiedLineEnd > maxModifiedLine))) { + maxModifiedLine = modifiedLineEnd; + } + } + + let header = document.createElement('div'); + header.className = 'diff-review-row'; + + let cell = document.createElement('div'); + cell.className = 'diff-review-cell diff-review-summary'; + cell.appendChild(document.createTextNode(`${diffIndex + 1}/${this._diffs.length}: @@ -${minOriginalLine},${maxOriginalLine - minOriginalLine + 1} +${minModifiedLine},${maxModifiedLine - minModifiedLine + 1} @@`)); + header.setAttribute('data-line', String(minModifiedLine)); + header.setAttribute('aria-label', nls.localize('header', "Difference {0} of {1}: original {2}, {3} lines, modified {4}, {5} lines", (diffIndex + 1), this._diffs.length, minOriginalLine, maxOriginalLine - minOriginalLine + 1, minModifiedLine, maxModifiedLine - minModifiedLine + 1)); + header.appendChild(cell); + + // @@ -504,7 +517,7 @@ + header.setAttribute('role', 'listitem'); + container.appendChild(header); + + let modLine = minModifiedLine; + for (let i = 0, len = diffs.length; i < len; i++) { + const diffEntry = diffs[i]; + DiffReview._renderSection(container, diffEntry, modLine, this._width, originalOpts, originalModel, originalModelOpts, modifiedOpts, modifiedModel, modifiedModelOpts); + if (diffEntry.modifiedLineStart !== 0) { + modLine = diffEntry.modifiedLineEnd; + } + } + + dom.clearNode(this._content.domNode); + this._content.domNode.appendChild(container); + this.scrollbar.scanDomNode(); + } + + private static _renderSection( + dest: HTMLElement, diffEntry: DiffEntry, modLine: number, width: number, + originalOpts: editorOptions.InternalEditorOptions, originalModel: editorCommon.IModel, originalModelOpts: editorCommon.TextModelResolvedOptions, + modifiedOpts: editorOptions.InternalEditorOptions, modifiedModel: editorCommon.IModel, modifiedModelOpts: editorCommon.TextModelResolvedOptions + ): void { + + const type = diffEntry.getType(); + + let rowClassName: string = 'diff-review-row'; + let lineNumbersExtraClassName: string = ''; + let spacerClassName: string = 'diff-review-spacer'; + switch (type) { + case DiffEntryType.Insert: + rowClassName = 'diff-review-row line-insert'; + lineNumbersExtraClassName = ' char-insert'; + spacerClassName = 'diff-review-spacer insert-sign'; + break; + case DiffEntryType.Delete: + rowClassName = 'diff-review-row line-delete'; + lineNumbersExtraClassName = ' char-delete'; + spacerClassName = 'diff-review-spacer delete-sign'; + break; + } + + const originalLineStart = diffEntry.originalLineStart; + const originalLineEnd = diffEntry.originalLineEnd; + const modifiedLineStart = diffEntry.modifiedLineStart; + const modifiedLineEnd = diffEntry.modifiedLineEnd; + + const cnt = Math.max( + modifiedLineEnd - modifiedLineStart, + originalLineEnd - originalLineStart + ); + + const originalLineNumbersWidth = originalOpts.layoutInfo.glyphMarginWidth + originalOpts.layoutInfo.lineNumbersWidth; + const modifiedLineNumbersWidth = 10 + modifiedOpts.layoutInfo.glyphMarginWidth + modifiedOpts.layoutInfo.lineNumbersWidth; + + for (let i = 0; i <= cnt; i++) { + const originalLine = (originalLineStart === 0 ? 0 : originalLineStart + i); + const modifiedLine = (modifiedLineStart === 0 ? 0 : modifiedLineStart + i); + + const row = document.createElement('div'); + row.style.minWidth = width + 'px'; + row.className = rowClassName; + row.setAttribute('role', 'listitem'); + if (modifiedLine !== 0) { + modLine = modifiedLine; + } + row.setAttribute('data-line', String(modLine)); + + let cell = document.createElement('div'); + cell.className = 'diff-review-cell'; + row.appendChild(cell); + + const originalLineNumber = document.createElement('span'); + originalLineNumber.style.width = (originalLineNumbersWidth + 'px'); + originalLineNumber.style.minWidth = (originalLineNumbersWidth + 'px'); + originalLineNumber.className = 'diff-review-line-number' + lineNumbersExtraClassName; + if (originalLine !== 0) { + originalLineNumber.appendChild(document.createTextNode(String(originalLine))); + } else { + originalLineNumber.innerHTML = ' '; + } + cell.appendChild(originalLineNumber); + + const modifiedLineNumber = document.createElement('span'); + modifiedLineNumber.style.width = (modifiedLineNumbersWidth + 'px'); + modifiedLineNumber.style.minWidth = (modifiedLineNumbersWidth + 'px'); + modifiedLineNumber.style.paddingRight = '10px'; + modifiedLineNumber.className = 'diff-review-line-number' + lineNumbersExtraClassName; + if (modifiedLine !== 0) { + modifiedLineNumber.appendChild(document.createTextNode(String(modifiedLine))); + } else { + modifiedLineNumber.innerHTML = ' '; + } + cell.appendChild(modifiedLineNumber); + + const spacer = document.createElement('span'); + spacer.className = spacerClassName; + spacer.innerHTML = '  '; + cell.appendChild(spacer); + + let lineContent: string; + if (modifiedLine !== 0) { + cell.insertAdjacentHTML('beforeend', + this._renderLine(modifiedModel, modifiedOpts, modifiedModelOpts.tabSize, modifiedLine) + ); + lineContent = modifiedModel.getLineContent(modifiedLine); + } else { + cell.insertAdjacentHTML('beforeend', + this._renderLine(originalModel, originalOpts, originalModelOpts.tabSize, originalLine) + ); + lineContent = originalModel.getLineContent(originalLine); + } + + if (lineContent.length === 0) { + lineContent = nls.localize('blankLine', "blank"); + } + + let ariaLabel: string; + switch (type) { + case DiffEntryType.Equal: + ariaLabel = nls.localize('equalLine', "original {0}, modified {1}: {2}", originalLine, modifiedLine, lineContent); + break; + case DiffEntryType.Insert: + ariaLabel = nls.localize('insertLine', "+ modified {0}: {1}", modifiedLine, lineContent); + break; + case DiffEntryType.Delete: + ariaLabel = nls.localize('deleteLine', "- original {0}: {1}", originalLine, lineContent); + break; + } + row.setAttribute('aria-label', ariaLabel); + + dest.appendChild(row); + } + } + + private static _renderLine(model: editorCommon.IModel, config: editorOptions.InternalEditorOptions, tabSize: number, lineNumber: number): string { + const lineContent = model.getLineContent(lineNumber); + + const defaultMetadata = ( + (FontStyle.None << MetadataConsts.FONT_STYLE_OFFSET) + | (ColorId.DefaultForeground << MetadataConsts.FOREGROUND_OFFSET) + | (ColorId.DefaultBackground << MetadataConsts.BACKGROUND_OFFSET) + ) >>> 0; + + const r = renderViewLine(new RenderLineInput( + (config.fontInfo.isMonospace && !config.viewInfo.disableMonospaceOptimizations), + lineContent, + model.mightContainRTL(), + 0, + [new ViewLineToken(lineContent.length, defaultMetadata)], + [], + tabSize, + config.fontInfo.spaceWidth, + config.viewInfo.stopRenderingLineAfter, + config.viewInfo.renderWhitespace, + config.viewInfo.renderControlCharacters, + config.viewInfo.fontLigatures + )); + + return r.html; + } +} + +// theming + +registerThemingParticipant((theme, collector) => { + let lineNumbers = theme.getColor(editorLineNumbers); + if (lineNumbers) { + collector.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${lineNumbers}; }`); + } + + const shadow = theme.getColor(scrollbarShadow); + if (shadow) { + collector.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${shadow} 0 -6px 6px -6px inset; }`); + } +}); + +@editorAction +class DiffReviewNext extends EditorAction { + constructor() { + super({ + id: 'editor.action.diffReview.next', + label: nls.localize('editor.action.diffReview.next', "Go to Next Difference"), + alias: 'Go to Next Difference', + precondition: ContextKeyExpr.has('isInDiffEditor'), + kbOpts: { + kbExpr: null, + primary: KeyCode.F7 + } + }); + } + + public run(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor): void { + const diffEditor = findFocusedDiffEditor(accessor); + if (diffEditor) { + diffEditor.diffReviewNext(); + } + } +} + +@editorAction +class DiffReviewPrev extends EditorAction { + constructor() { + super({ + id: 'editor.action.diffReview.prev', + label: nls.localize('editor.action.diffReview.prev', "Go to Previous Difference"), + alias: 'Go to Previous Difference', + precondition: ContextKeyExpr.has('isInDiffEditor'), + kbOpts: { + kbExpr: null, + primary: KeyMod.Shift | KeyCode.F7 + } + }); + } + + public run(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor): void { + const diffEditor = findFocusedDiffEditor(accessor); + if (diffEditor) { + diffEditor.diffReviewPrev(); + } + } +} + +function findFocusedDiffEditor(accessor: ServicesAccessor): DiffEditorWidget { + const codeEditorService = accessor.get(ICodeEditorService); + const diffEditors = codeEditorService.listDiffEditors(); + for (let i = 0, len = diffEditors.length; i < len; i++) { + const diffEditor = diffEditors[i]; + if (diffEditor.hasWidgetFocus()) { + return diffEditor; + } + } + return null; +} diff --git a/src/vs/editor/browser/widget/embeddedCodeEditorWidget.ts b/src/vs/editor/browser/widget/embeddedCodeEditorWidget.ts index 0956a3e7d811a..185f3537c5186 100644 --- a/src/vs/editor/browser/widget/embeddedCodeEditorWidget.ts +++ b/src/vs/editor/browser/widget/embeddedCodeEditorWidget.ts @@ -12,6 +12,7 @@ import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService' import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { CodeEditor } from 'vs/editor/browser/codeEditor'; import { IConfigurationChangedEvent, IEditorOptions } from 'vs/editor/common/config/editorOptions'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; export class EmbeddedCodeEditorWidget extends CodeEditor { @@ -25,9 +26,10 @@ export class EmbeddedCodeEditorWidget extends CodeEditor { @IInstantiationService instantiationService: IInstantiationService, @ICodeEditorService codeEditorService: ICodeEditorService, @ICommandService commandService: ICommandService, - @IContextKeyService contextKeyService: IContextKeyService + @IContextKeyService contextKeyService: IContextKeyService, + @IThemeService themeService: IThemeService ) { - super(domElement, parentEditor.getRawConfiguration(), instantiationService, codeEditorService, commandService, contextKeyService); + super(domElement, parentEditor.getRawConfiguration(), instantiationService, codeEditorService, commandService, contextKeyService, themeService); this._parentEditor = parentEditor; this._overwriteOptions = options; diff --git a/src/vs/editor/browser/widget/media/close-inverse.svg b/src/vs/editor/browser/widget/media/close-inverse.svg new file mode 100644 index 0000000000000..751e89b3b0215 --- /dev/null +++ b/src/vs/editor/browser/widget/media/close-inverse.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vs/editor/browser/widget/media/close.svg b/src/vs/editor/browser/widget/media/close.svg new file mode 100644 index 0000000000000..fde34404d4eb8 --- /dev/null +++ b/src/vs/editor/browser/widget/media/close.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vs/editor/browser/widget/media/diffEditor.css b/src/vs/editor/browser/widget/media/diffEditor.css index 0c1bb226785a7..08829aa00e744 100644 --- a/src/vs/editor/browser/widget/media/diffEditor.css +++ b/src/vs/editor/browser/widget/media/diffEditor.css @@ -31,25 +31,44 @@ .modified-in-monaco-diff-editor .slider.active { background: rgba(171, 171, 171, .4); } .modified-in-monaco-diff-editor.hc-black .slider.active { background: none; } -.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px #DDD; } -.monaco-diff-editor.side-by-side.vs-dark .editor.modified { box-shadow: -6px 0 5px -5px black; } - /* ---------- Diff ---------- */ -.monaco-editor .insert-sign, .monaco-editor .delete-sign { +.monaco-editor .insert-sign, +.monaco-diff-editor .insert-sign, +.monaco-editor .delete-sign, +.monaco-diff-editor .delete-sign { background-size: 60%; opacity: 0.7; background-repeat: no-repeat; background-position: 50% 50%; } -.monaco-editor.hc-black .insert-sign, .monaco-editor.hc-black .delete-sign { +.monaco-editor.hc-black .insert-sign, +.monaco-diff-editor.hc-black .insert-sign, +.monaco-editor.hc-black .delete-sign, +.monaco-diff-editor.hc-black .delete-sign { opacity: 1; } -.monaco-editor .insert-sign { background-image: url('addition.svg'); } -.monaco-editor .delete-sign { background-image: url('deletion.svg'); } +.monaco-editor .insert-sign, +.monaco-diff-editor .insert-sign { + background-image: url('addition.svg'); +} +.monaco-editor .delete-sign, +.monaco-diff-editor .delete-sign { + background-image: url('deletion.svg'); +} -.monaco-editor.vs-dark .insert-sign, .monaco-editor.hc-black .insert-sign { background-image: url('addition-inverse.svg'); } -.monaco-editor.vs-dark .delete-sign, .monaco-editor.hc-black .delete-sign { background-image: url('deletion-inverse.svg'); } +.monaco-editor.vs-dark .insert-sign, +.monaco-diff-editor.vs-dark .insert-sign, +.monaco-editor.hc-black .insert-sign, +.monaco-diff-editor.hc-black .insert-sign { + background-image: url('addition-inverse.svg'); +} +.monaco-editor.vs-dark .delete-sign, +.monaco-diff-editor.vs-dark .delete-sign, +.monaco-editor.hc-black .delete-sign, +.monaco-diff-editor.hc-black .delete-sign { + background-image: url('deletion-inverse.svg'); +} .monaco-editor .inline-deleted-margin-view-zone { text-align: right; diff --git a/src/vs/editor/browser/widget/media/diffReview.css b/src/vs/editor/browser/widget/media/diffReview.css new file mode 100644 index 0000000000000..edb9317dd80f5 --- /dev/null +++ b/src/vs/editor/browser/widget/media/diffReview.css @@ -0,0 +1,70 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +.monaco-diff-editor .diff-review-line-number { + text-align: right; + display: inline-block; +} + +.monaco-diff-editor .diff-review { + position: absolute; + -webkit-user-select: none; + -ms-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -o-user-select: none; + user-select: none; +} + +.monaco-diff-editor .diff-review-summary { + padding-left: 10px; +} + +.monaco-diff-editor .diff-review-shadow { + position: absolute; +} + +.monaco-diff-editor .diff-review-row { + white-space: pre; +} + +.monaco-diff-editor .diff-review-table { + display: table; + min-width: 100%; +} + +.monaco-diff-editor .diff-review-row { + display: table-row; + width: 100%; +} + +.monaco-diff-editor .diff-review-cell { + display: table-cell; +} + +.monaco-diff-editor .diff-review-spacer { + display: inline-block; + width: 10px; +} + +.monaco-diff-editor .diff-review-actions { + display: inline-block; + position: absolute; + right: 10px; + top: 2px; +} + +.monaco-diff-editor .diff-review-actions .action-label { + width: 16px; + height: 16px; + margin: 2px 0; +} +.monaco-diff-editor .action-label.icon.close-diff-review { + background: url('close.svg') center center no-repeat; +} +.monaco-diff-editor.hc-black .action-label.icon.close-diff-review, +.monaco-diff-editor.vs-dark .action-label.icon.close-diff-review { + background: url('close-inverse.svg') center center no-repeat; +} \ No newline at end of file diff --git a/src/vs/editor/browser/widget/media/editor.css b/src/vs/editor/browser/widget/media/editor.css index 90a691620e89e..3266ae96364c4 100644 --- a/src/vs/editor/browser/widget/media/editor.css +++ b/src/vs/editor/browser/widget/media/editor.css @@ -15,13 +15,12 @@ color: inherit; } -/* -------------------- Editor, inputarea and background -------------------- */ +/* -------------------- Editor -------------------- */ .monaco-editor { position: relative; overflow: visible; -webkit-text-size-adjust: 100%; - -ms-high-contrast-adjust: none; -webkit-font-feature-settings: "liga" off, "calt" off; font-feature-settings: "liga" off, "calt" off; } @@ -29,69 +28,6 @@ -webkit-font-feature-settings: "liga" on, "calt" on; font-feature-settings: "liga" on, "calt" on; } -.monaco-editor .inputarea { - /*Chrome cannot handle typing in a 0x0 textarea*/ - width: 1px; - height: 1px; - min-width: 0; - min-height: 0; - margin: 0; - padding: 0; - position: absolute; - outline: none !important; - resize: none; - border: none; - overflow: hidden; -} -/*.monaco-editor .inputarea { - position: fixed !important; - width: 800px !important; - height: 200px !important; - top: initial !important; - left: initial !important; - bottom: 0 !important; - right: 0 !important; -}*/ -.monaco-editor.ff .inputarea, -.monaco-editor.ie .inputarea { - width: 0; - height: 0; -} -.monaco-editor.ime-input .inputarea { - z-index: 10; -} - -.monaco-editor, -.monaco-editor .inputarea { - color: #333; - /* - * WORKAROUND: - * Because of bug https://monacotools.visualstudio.com/DefaultCollection/Monaco/_workitems/edit/13254 - * we are *not* using the color white (or #ffffff, rgba(255,255,255)) but something very close to white. - */ - background: #fffffe; -} -.monaco-editor.ime-input .inputarea { - background: rgba(255, 255, 255, 0.85); -} - -.monaco-editor.vs-dark, -.monaco-editor.vs-dark .inputarea, -.monaco-editor.vs-dark .zone-widget .monaco-editor { - color: #BBB; - background: #1E1E1E; -} -.monaco-editor.vs-dark.ime-input .inputarea { - background: rgba(0, 0, 0, 0.65); -} - -.monaco-editor.hc-black, -.monaco-editor.hc-black .inputarea, -.monaco-editor.hc-black .zone-widget .monaco-editor { - color: #fff; - background: #000; -} - /* -------------------- Misc -------------------- */ @@ -103,14 +39,4 @@ .monaco-editor .view-overlays { position: absolute; top: 0; -} - -/* -------------------- Squigglies -------------------- */ - -.monaco-editor.vs .redsquiggly, -.monaco-editor.vs-dark .redsquiggly { background: url("red-squiggly.svg") repeat-x bottom left; } -.monaco-editor.hc-black .redsquiggly { border-bottom: 4px double #E47777; opacity: 0.8; } - -.monaco-editor.vs .greensquiggly, -.monaco-editor.vs-dark .greensquiggly { background: url("green-squiggly.svg") repeat-x bottom left; } -.monaco-editor.hc-black .greensquiggly { border-bottom: 4px double #71B771; opacity: 0.8; } +} \ No newline at end of file diff --git a/src/vs/editor/browser/widget/media/green-squiggly.svg b/src/vs/editor/browser/widget/media/green-squiggly.svg deleted file mode 100644 index 8fc5c6f099bcb..0000000000000 --- a/src/vs/editor/browser/widget/media/green-squiggly.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/editor/browser/widget/media/red-squiggly.svg b/src/vs/editor/browser/widget/media/red-squiggly.svg deleted file mode 100644 index 690406efa15a0..0000000000000 --- a/src/vs/editor/browser/widget/media/red-squiggly.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/editor/browser/widget/media/tokens.css b/src/vs/editor/browser/widget/media/tokens.css index b94b6851a06be..3b0784d077acf 100644 --- a/src/vs/editor/browser/widget/media/tokens.css +++ b/src/vs/editor/browser/widget/media/tokens.css @@ -6,9 +6,4 @@ .monaco-editor .vs-whitespace { display:inline-block; } -.monaco-editor.hc-black .view-line { - mix-blend-mode: difference; -} -.monaco-editor.vs .vs-whitespace { color: rgba(51, 51, 51, 0.2); } -.monaco-editor.vs-dark .vs-whitespace { color: rgba(227, 228, 226, 0.16); } -.monaco-editor.hc-black .vs-whitespace { color: rgba(227, 228, 226, 0.16); } + diff --git a/src/vs/editor/common/commands/replaceCommand.ts b/src/vs/editor/common/commands/replaceCommand.ts index e0c8e3ffee281..1083964b0ff6d 100644 --- a/src/vs/editor/common/commands/replaceCommand.ts +++ b/src/vs/editor/common/commands/replaceCommand.ts @@ -10,28 +10,18 @@ import { Range } from 'vs/editor/common/core/range'; export class ReplaceCommand implements editorCommon.ICommand { - private _range: Range; - private _text: string; + private readonly _range: Range; + private readonly _text: string; + public readonly insertsAutoWhitespace: boolean; - constructor(range: Range, text: string) { + constructor(range: Range, text: string, insertsAutoWhitespace: boolean = false) { this._range = range; this._text = text; - } - - public getText(): string { - return this._text; - } - - public getRange(): Range { - return this._range; - } - - public setRange(newRange: Range): void { - this._range = newRange; + this.insertsAutoWhitespace = insertsAutoWhitespace; } public getEditOperations(model: editorCommon.ITokenizedModel, builder: editorCommon.IEditOperationBuilder): void { - builder.addEditOperation(this._range, this._text); + builder.addTrackedEditOperation(this._range, this._text); } public computeCursorState(model: editorCommon.ITokenizedModel, helper: editorCommon.ICursorStateComputerData): Selection { @@ -46,10 +36,20 @@ export class ReplaceCommand implements editorCommon.ICommand { } } -export class ReplaceCommandWithoutChangingPosition extends ReplaceCommand { +export class ReplaceCommandWithoutChangingPosition implements editorCommon.ICommand { + + private readonly _range: Range; + private readonly _text: string; + public readonly insertsAutoWhitespace: boolean; - constructor(range: Range, text: string) { - super(range, text); + constructor(range: Range, text: string, insertsAutoWhitespace: boolean = false) { + this._range = range; + this._text = text; + this.insertsAutoWhitespace = insertsAutoWhitespace; + } + + public getEditOperations(model: editorCommon.ITokenizedModel, builder: editorCommon.IEditOperationBuilder): void { + builder.addTrackedEditOperation(this._range, this._text); } public computeCursorState(model: editorCommon.ITokenizedModel, helper: editorCommon.ICursorStateComputerData): Selection { @@ -64,15 +64,24 @@ export class ReplaceCommandWithoutChangingPosition extends ReplaceCommand { } } -export class ReplaceCommandWithOffsetCursorState extends ReplaceCommand { +export class ReplaceCommandWithOffsetCursorState implements editorCommon.ICommand { - private _columnDeltaOffset: number; - private _lineNumberDeltaOffset: number; + private readonly _range: Range; + private readonly _text: string; + private readonly _columnDeltaOffset: number; + private readonly _lineNumberDeltaOffset: number; + public readonly insertsAutoWhitespace: boolean; - constructor(range: Range, text: string, lineNumberDeltaOffset: number, columnDeltaOffset: number) { - super(range, text); + constructor(range: Range, text: string, lineNumberDeltaOffset: number, columnDeltaOffset: number, insertsAutoWhitespace: boolean = false) { + this._range = range; + this._text = text; this._columnDeltaOffset = columnDeltaOffset; this._lineNumberDeltaOffset = lineNumberDeltaOffset; + this.insertsAutoWhitespace = insertsAutoWhitespace; + } + + public getEditOperations(model: editorCommon.ITokenizedModel, builder: editorCommon.IEditOperationBuilder): void { + builder.addTrackedEditOperation(this._range, this._text); } public computeCursorState(model: editorCommon.ITokenizedModel, helper: editorCommon.ICursorStateComputerData): Selection { @@ -87,19 +96,21 @@ export class ReplaceCommandWithOffsetCursorState extends ReplaceCommand { } } -export class ReplaceCommandThatPreservesSelection extends ReplaceCommand { +export class ReplaceCommandThatPreservesSelection implements editorCommon.ICommand { + private _range: Range; + private _text: string; private _initialSelection: Selection; private _selectionId: string; constructor(editRange: Range, text: string, initialSelection: Selection) { - super(editRange, text); + this._range = editRange; + this._text = text; this._initialSelection = initialSelection; } public getEditOperations(model: editorCommon.ITokenizedModel, builder: editorCommon.IEditOperationBuilder): void { - super.getEditOperations(model, builder); - + builder.addEditOperation(this._range, this._text); this._selectionId = builder.trackSelection(this._initialSelection); } diff --git a/src/vs/editor/common/commands/shiftCommand.ts b/src/vs/editor/common/commands/shiftCommand.ts index 9733d30135e3a..209e93d7fcb5e 100644 --- a/src/vs/editor/common/commands/shiftCommand.ts +++ b/src/vs/editor/common/commands/shiftCommand.ts @@ -7,7 +7,7 @@ import * as strings from 'vs/base/common/strings'; import { CursorColumns } from 'vs/editor/common/controller/cursorCommon'; import { Range } from 'vs/editor/common/core/range'; -import { Selection } from 'vs/editor/common/core/selection'; +import { Selection, SelectionDirection } from 'vs/editor/common/core/selection'; import { ICommand, ICursorStateComputerData, IEditOperationBuilder, ITokenizedModel } from 'vs/editor/common/editorCommon'; import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; import { CharCode } from 'vs/base/common/charCode'; @@ -45,11 +45,21 @@ export class ShiftCommand implements ICommand { private _selection: Selection; private _selectionId: string; private _useLastEditRangeForCursorEndPosition: boolean; + private _selectionStartColumnStaysPut: boolean; constructor(range: Selection, opts: IShiftCommandOpts) { this._opts = opts; this._selection = range; this._useLastEditRangeForCursorEndPosition = false; + this._selectionStartColumnStaysPut = false; + } + + private _addEditOperation(builder: IEditOperationBuilder, range: Range, text: string) { + if (this._useLastEditRangeForCursorEndPosition) { + builder.addTrackedEditOperation(range, text); + } else { + builder.addEditOperation(range, text); + } } public getEditOperations(model: ITokenizedModel, builder: IEditOperationBuilder): void { @@ -147,7 +157,11 @@ export class ShiftCommand implements ICommand { indents[j] = indents[j - 1] + oneIndent; } - builder.addEditOperation(new Range(lineNumber, 1, lineNumber, indentationEndIndex + 1), indents[desiredIndentCount]); + this._addEditOperation(builder, new Range(lineNumber, 1, lineNumber, indentationEndIndex + 1), indents[desiredIndentCount]); + if (lineNumber === startLine) { + // Force the startColumn to stay put because we're inserting after it + this._selectionStartColumnStaysPut = (this._selection.startColumn <= indentationEndIndex + 1); + } } } else { @@ -186,9 +200,13 @@ export class ShiftCommand implements ICommand { } } - builder.addEditOperation(new Range(lineNumber, 1, lineNumber, indentationEndIndex + 1), ''); + this._addEditOperation(builder, new Range(lineNumber, 1, lineNumber, indentationEndIndex + 1), ''); } else { - builder.addEditOperation(new Range(lineNumber, 1, lineNumber, 1), oneIndent); + this._addEditOperation(builder, new Range(lineNumber, 1, lineNumber, 1), oneIndent); + if (lineNumber === startLine) { + // Force the startColumn to stay put because we're inserting after it + this._selectionStartColumnStaysPut = (this._selection.startColumn === 1); + } } } } @@ -201,6 +219,22 @@ export class ShiftCommand implements ICommand { let lastOp = helper.getInverseEditOperations()[0]; return new Selection(lastOp.range.endLineNumber, lastOp.range.endColumn, lastOp.range.endLineNumber, lastOp.range.endColumn); } - return helper.getTrackedSelection(this._selectionId); + const result = helper.getTrackedSelection(this._selectionId); + + if (this._selectionStartColumnStaysPut) { + // The selection start should not move + let initialStartColumn = this._selection.startColumn; + let resultStartColumn = result.startColumn; + if (resultStartColumn <= initialStartColumn) { + return result; + } + + if (result.getDirection() === SelectionDirection.LTR) { + return new Selection(result.startLineNumber, initialStartColumn, result.endLineNumber, result.endColumn); + } + return new Selection(result.endLineNumber, result.endColumn, result.startLineNumber, initialStartColumn); + } + + return result; } } diff --git a/src/vs/editor/common/commands/surroundSelectionCommand.ts b/src/vs/editor/common/commands/surroundSelectionCommand.ts index 177e4812a677e..2a83cefac1b78 100644 --- a/src/vs/editor/common/commands/surroundSelectionCommand.ts +++ b/src/vs/editor/common/commands/surroundSelectionCommand.ts @@ -20,14 +20,14 @@ export class SurroundSelectionCommand implements ICommand { } public getEditOperations(model: ITokenizedModel, builder: IEditOperationBuilder): void { - builder.addEditOperation(new Range( + builder.addTrackedEditOperation(new Range( this._range.startLineNumber, this._range.startColumn, this._range.startLineNumber, this._range.startColumn ), this._charBeforeSelection); - builder.addEditOperation(new Range( + builder.addTrackedEditOperation(new Range( this._range.endLineNumber, this._range.endColumn, this._range.endLineNumber, diff --git a/src/vs/editor/common/commonCodeEditor.ts b/src/vs/editor/common/commonCodeEditor.ts index c21b629a895ce..c636c9f8f5fc3 100644 --- a/src/vs/editor/common/commonCodeEditor.ts +++ b/src/vs/editor/common/commonCodeEditor.ts @@ -12,15 +12,12 @@ import { ServicesAccessor, IInstantiationService } from 'vs/platform/instantiati import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { IContextKey, IContextKeyServiceTarget, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { CommonEditorConfiguration } from 'vs/editor/common/config/commonEditorConfig'; -import { DefaultConfig } from 'vs/editor/common/config/defaultConfig'; -import { Cursor } from 'vs/editor/common/controller/cursor'; -import { CursorColumns, IViewModelHelper, ICursors } from 'vs/editor/common/controller/cursorCommon'; +import { Cursor, CursorStateChangedEvent } from 'vs/editor/common/controller/cursor'; +import { CursorColumns, ICursors, CursorConfiguration } from 'vs/editor/common/controller/cursorCommon'; import { Position, IPosition } from 'vs/editor/common/core/position'; import { Range, IRange } from 'vs/editor/common/core/range'; import { Selection, ISelection } from 'vs/editor/common/core/selection'; import * as editorCommon from 'vs/editor/common/editorCommon'; -import { CharacterHardWrappingLineMapperFactory } from 'vs/editor/common/viewModel/characterHardWrappingLineMapper'; -import { SplitLinesCollection } from 'vs/editor/common/viewModel/splitLinesCollection'; import { ViewModel } from 'vs/editor/common/viewModel/viewModelImpl'; import { hash } from 'vs/base/common/hash'; import { EditorModeContext } from 'vs/editor/common/modes/editorModeContext'; @@ -29,8 +26,10 @@ import { IModelLanguageChangedEvent, IModelOptionsChangedEvent, TextModelEventType } from 'vs/editor/common/model/textModelEvents'; import * as editorOptions from 'vs/editor/common/config/editorOptions'; -import { CursorEventType, ICursorPositionChangedEvent, VerticalRevealType, ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; +import { ICursorPositionChangedEvent, ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; +import { CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; +import { VerticalRevealType } from 'vs/editor/common/view/viewEvents'; let EDITOR_ID = 0; @@ -126,9 +125,6 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo this._decorationTypeSubtypes = {}; options = options || {}; - if (typeof options.ariaLabel === 'undefined') { - options.ariaLabel = DefaultConfig.editor.ariaLabel; - } this._configuration = this._register(this._createConfiguration(options)); this._register(this._configuration.onDidChange((e) => { this._onDidChangeConfiguration.fire(e); @@ -191,7 +187,7 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo } public getConfiguration(): editorOptions.InternalEditorOptions { - return this._configuration.editorClone; + return this._configuration.editor; } public getRawConfiguration(): editorOptions.IEditorOptions { @@ -240,11 +236,12 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo this._postDetachModelCleanup(detachedModel); } - public abstract getCenteredRangeInViewport(): Range; - - protected abstract _getCompletelyVisibleViewRange(): Range; - protected abstract _getCompletelyVisibleViewRangeAtScrollTop(scrollTop: number): Range; - protected abstract _getVerticalOffsetForViewLineNumber(viewLineNumber: number): number; + public getCenteredRangeInViewport(): Range { + if (!this.hasView) { + return null; + } + return this.viewModel.getCenteredRangeInViewport(); + } public getVisibleColumnFromPosition(rawPosition: IPosition): number { if (!this.model) { @@ -282,16 +279,17 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo } } - private _sendRevealRange(range: Range, verticalType: VerticalRevealType, revealHorizontal: boolean): void { + private _sendRevealRange(modelRange: Range, verticalType: VerticalRevealType, revealHorizontal: boolean): void { if (!this.model || !this.cursor) { return; } - if (!Range.isIRange(range)) { + if (!Range.isIRange(modelRange)) { throw new Error('Invalid arguments'); } - let validatedRange = this.model.validateRange(range); + const validatedModelRange = this.model.validateRange(modelRange); + const viewRange = this.viewModel.coordinatesConverter.convertModelRangeToViewRange(validatedModelRange); - this.cursor.emitCursorRevealRange(validatedRange, null, verticalType, revealHorizontal); + this.cursor.emitCursorRevealRange(viewRange, verticalType, revealHorizontal); } public revealLine(lineNumber: number): void { @@ -505,18 +503,111 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo this.cursor.setSelections('api', ranges); } - public abstract getScrollWidth(): number; - public abstract getScrollLeft(): number; + public getScrollWidth(): number { + if (!this.hasView) { + return -1; + } + return this.viewModel.viewLayout.getScrollWidth(); + } + public getScrollLeft(): number { + if (!this.hasView) { + return -1; + } + return this.viewModel.viewLayout.getScrollLeft(); + } + + public getScrollHeight(): number { + if (!this.hasView) { + return -1; + } + return this.viewModel.viewLayout.getScrollHeight(); + } + public getScrollTop(): number { + if (!this.hasView) { + return -1; + } + return this.viewModel.viewLayout.getScrollTop(); + } + + public setScrollLeft(newScrollLeft: number): void { + if (!this.hasView) { + return; + } + if (typeof newScrollLeft !== 'number') { + throw new Error('Invalid arguments'); + } + this.viewModel.viewLayout.setScrollPosition({ + scrollLeft: newScrollLeft + }); + } + public setScrollTop(newScrollTop: number): void { + if (!this.hasView) { + return; + } + if (typeof newScrollTop !== 'number') { + throw new Error('Invalid arguments'); + } + this.viewModel.viewLayout.setScrollPosition({ + scrollTop: newScrollTop + }); + } + public setScrollPosition(position: editorCommon.INewScrollPosition): void { + if (!this.hasView) { + return; + } + this.viewModel.viewLayout.setScrollPosition(position); + } + + public saveViewState(): editorCommon.ICodeEditorViewState { + if (!this.cursor || !this.hasView) { + return null; + } + let contributionsState: { [key: string]: any } = {}; - public abstract getScrollHeight(): number; - public abstract getScrollTop(): number; + let keys = Object.keys(this._contributions); + for (let i = 0, len = keys.length; i < len; i++) { + let id = keys[i]; + let contribution = this._contributions[id]; + if (typeof contribution.saveViewState === 'function') { + contributionsState[id] = contribution.saveViewState(); + } + } - public abstract setScrollLeft(newScrollLeft: number): void; - public abstract setScrollTop(newScrollTop: number): void; - public abstract setScrollPosition(position: editorCommon.INewScrollPosition): void; + let cursorState = this.cursor.saveState(); + let viewState = this.viewModel.viewLayout.saveState(); + return { + cursorState: cursorState, + viewState: viewState, + contributionsState: contributionsState + }; + } - public abstract saveViewState(): editorCommon.ICodeEditorViewState; - public abstract restoreViewState(state: editorCommon.IEditorViewState): void; + public restoreViewState(s: editorCommon.ICodeEditorViewState): void { + if (!this.cursor || !this.hasView) { + return; + } + if (s && s.cursorState && s.viewState) { + let codeEditorState = s; + let cursorState = codeEditorState.cursorState; + if (Array.isArray(cursorState)) { + this.cursor.restoreState(cursorState); + } else { + // Backwards compatibility + this.cursor.restoreState([cursorState]); + } + this.viewModel.viewLayout.restoreState(codeEditorState.viewState); + + let contributionsState = s.contributionsState || {}; + let keys = Object.keys(this._contributions); + for (let i = 0, len = keys.length; i < len; i++) { + let id = keys[i]; + let contribution = this._contributions[id]; + if (typeof contribution.restoreViewState === 'function') { + contribution.restoreViewState(contributionsState[id]); + } + } + } + } public onVisible(): void { } @@ -577,6 +668,7 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo return; } + // Special case for pasting if (handlerId === editorCommon.Handler.Paste) { if (!this.cursor || typeof payload.text !== 'string' || payload.text.length === 0) { // nothing to do @@ -593,31 +685,37 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo return; } - let candidate = this.getAction(handlerId); - if (candidate !== null) { - TPromise.as(candidate.run()).done(null, onUnexpectedError); - } else { - if (!this.cursor) { - return; - } - this.cursor.trigger(source, handlerId, payload); + const action = this.getAction(handlerId); + if (action) { + TPromise.as(action.run()).done(null, onUnexpectedError); + return; + } + + if (!this.cursor) { + return; } + + const command = CommonEditorRegistry.getEditorCommand(handlerId); + if (command) { + payload = payload || {}; + payload.source = source; + TPromise.as(command.runEditorCommand(null, this, payload)).done(null, onUnexpectedError); + return; + } + + this.cursor.trigger(source, handlerId, payload); } public _getCursors(): ICursors { return this.cursor; } - public executeCommand(source: string, command: editorCommon.ICommand): void { - if (!this.cursor) { - return; - } - this.cursor.trigger(source, editorCommon.Handler.ExecuteCommand, command); + public _getCursorConfiguration(): CursorConfiguration { + return this.cursor.context.config; } public pushUndoStop(): boolean { - if (!this.cursor) { - // no view, no cursor + if (!this.model) { return false; } if (this._configuration.editor.readOnly) { @@ -649,6 +747,13 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo return true; } + public executeCommand(source: string, command: editorCommon.ICommand): void { + if (!this.cursor) { + return; + } + this.cursor.trigger(source, editorCommon.Handler.ExecuteCommand, command); + } + public executeCommands(source: string, commands: editorCommon.ICommand[]): void { if (!this.cursor) { return; @@ -753,47 +858,11 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo if (this.model) { this.domElement.setAttribute('data-mode-id', this.model.getLanguageIdentifier().language); this._configuration.setIsDominatedByLongLines(this.model.isDominatedByLongLines()); + this._configuration.setMaxLineNumber(this.model.getLineCount()); this.model.onBeforeAttached(); - let hardWrappingLineMapperFactory = new CharacterHardWrappingLineMapperFactory( - this._configuration.editor.wrappingInfo.wordWrapBreakBeforeCharacters, - this._configuration.editor.wrappingInfo.wordWrapBreakAfterCharacters, - this._configuration.editor.wrappingInfo.wordWrapBreakObtrusiveCharacters - ); - - let linesCollection = new SplitLinesCollection( - this.model, - hardWrappingLineMapperFactory, - this.model.getOptions().tabSize, - this._configuration.editor.wrappingInfo.wrappingColumn, - this._configuration.editor.fontInfo.typicalFullwidthCharacterWidth / this._configuration.editor.fontInfo.typicalHalfwidthCharacterWidth, - this._configuration.editor.wrappingInfo.wrappingIndent - ); - - this.viewModel = new ViewModel( - linesCollection, - this.id, - this._configuration, - this.model - ); - - let viewModelHelper: IViewModelHelper = { - viewModel: this.viewModel, - coordinatesConverter: this.viewModel.coordinatesConverter, - getScrollTop: (): number => { - return this.getScrollTop(); - }, - getCompletelyVisibleViewRange: (): Range => { - return this._getCompletelyVisibleViewRange(); - }, - getCompletelyVisibleViewRangeAtScrollTop: (scrollTop: number): Range => { - return this._getCompletelyVisibleViewRangeAtScrollTop(scrollTop); - }, - getVerticalOffsetForViewLineNumber: (viewLineNumber: number): number => { - return this._getVerticalOffsetForViewLineNumber(viewLineNumber); - } - }; + this.viewModel = new ViewModel(this.id, this._configuration, this.model); this.listenersToRemove.push(this.model.addBulkListener((events) => { for (let i = 0, len = events.length; i < len; i++) { @@ -832,40 +901,40 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo this.cursor = new Cursor( this._configuration, this.model, - viewModelHelper, - this._enableEmptySelectionClipboard() + this.viewModel ); - this.viewModel.addEventSource(this.cursor); - this._createView(); - this.listenersToRemove.push(this.cursor.addBulkListener((events) => { - for (let i = 0, len = events.length; i < len; i++) { - let eventType = events[i].type; - let e = events[i].data; - - switch (eventType) { - case CursorEventType.CursorPositionChanged: - this._onDidChangeCursorPosition.fire(e); - break; - - case CursorEventType.CursorSelectionChanged: - this._onDidChangeCursorSelection.fire(e); - break; + this.listenersToRemove.push(this.cursor.onDidChange((e: CursorStateChangedEvent) => { - default: - // console.warn("Unhandled cursor event: ", e); - } + let positions: Position[] = []; + for (let i = 0, len = e.selections.length; i < len; i++) { + positions[i] = e.selections[i].getPosition(); } + + const e1: ICursorPositionChangedEvent = { + position: positions[0], + secondaryPositions: positions.slice(1), + reason: e.reason, + source: e.source + }; + this._onDidChangeCursorPosition.fire(e1); + + const e2: ICursorSelectionChangedEvent = { + selection: e.selections[0], + secondarySelections: e.selections.slice(1), + source: e.source, + reason: e.reason + }; + this._onDidChangeCursorSelection.fire(e2); })); + } else { this.hasView = false; } } - protected abstract _enableEmptySelectionClipboard(): boolean; - protected abstract _createView(): void; protected _postDetachModelCleanup(detachedModel: editorCommon.IModel): void { diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index c8655516e9fea..35bc4780d44cd 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -9,16 +9,15 @@ import Event, { Emitter } from 'vs/base/common/event'; import { Disposable } from 'vs/base/common/lifecycle'; import * as objects from 'vs/base/common/objects'; import * as platform from 'vs/base/common/platform'; -import { Extensions, IConfigurationRegistry, IConfigurationNode } from 'vs/platform/configuration/common/configurationRegistry'; -import { Registry } from 'vs/platform/platform'; -import { DefaultConfig, DEFAULT_INDENTATION, DEFAULT_TRIM_AUTO_WHITESPACE } from 'vs/editor/common/config/defaultConfig'; +import { Extensions, IConfigurationRegistry, IConfigurationNode, ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry'; +import { Registry } from 'vs/platform/registry/common/platform'; import * as editorCommon from 'vs/editor/common/editorCommon'; -import { EditorLayoutProvider } from 'vs/editor/common/viewLayout/editorLayoutProvider'; -import { ScrollbarVisibility } from 'vs/base/common/scrollable'; import { FontInfo, BareFontInfo } from 'vs/editor/common/config/fontInfo'; -import { Constants } from 'vs/editor/common/core/uint'; import { EditorZoom } from 'vs/editor/common/config/editorZoom'; import * as editorOptions from 'vs/editor/common/config/editorOptions'; +import EDITOR_DEFAULTS = editorOptions.EDITOR_DEFAULTS; +import EDITOR_FONT_DEFAULTS = editorOptions.EDITOR_FONT_DEFAULTS; +import EDITOR_MODEL_DEFAULTS = editorOptions.EDITOR_MODEL_DEFAULTS; /** * Control what pressing Tab does. @@ -52,470 +51,41 @@ export const TabFocus: ITabFocus = new class { } }; -/** - * Experimental screen reader support toggle - */ -export class GlobalScreenReaderNVDA { - - private static _value = false; - private static _onChange = new Emitter(); - public static onChange: Event = GlobalScreenReaderNVDA._onChange.event; - - public static getValue(): boolean { - return this._value; - } - - public static setValue(value: boolean): void { - if (this._value === value) { - return; - } - this._value = value; - this._onChange.fire(this._value); - } -} - -export class ConfigurationWithDefaults { - - private _editor: editorOptions.IEditorOptions; - - constructor(options: editorOptions.IEditorOptions) { - this._editor = objects.clone(DefaultConfig.editor); - - this._mergeOptionsIn(options); - } - - public getEditorOptions(): editorOptions.IEditorOptions { - return this._editor; - } - - private _mergeOptionsIn(newOptions: editorOptions.IEditorOptions): void { - this._editor = objects.mixin(this._editor, newOptions || {}); - } - - public updateOptions(newOptions: editorOptions.IEditorOptions): void { - // Apply new options - this._mergeOptionsIn(newOptions); - } -} - -class InternalEditorOptionsHelper { - - constructor() { - } - - public static createInternalEditorOptions( - outerWidth: number, - outerHeight: number, - opts: editorOptions.IEditorOptions, - fontInfo: FontInfo, - editorClassName: string, - isDominatedByLongLines: boolean, - lineNumbersDigitCount: number, - canUseTranslate3d: boolean, - pixelRatio: number - ): editorOptions.InternalEditorOptions { - - let stopRenderingLineAfter: number; - if (typeof opts.stopRenderingLineAfter !== 'undefined') { - stopRenderingLineAfter = toInteger(opts.stopRenderingLineAfter, -1); - } else { - stopRenderingLineAfter = 10000; - } - - let scrollbar = this._sanitizeScrollbarOpts(opts.scrollbar, toFloat(opts.mouseWheelScrollSensitivity, 1)); - let minimap = this._sanitizeMinimapOpts(opts.minimap); - - let glyphMargin = toBoolean(opts.glyphMargin); - let lineNumbersMinChars = toInteger(opts.lineNumbersMinChars, 1); - - let lineDecorationsWidth: number; - if (typeof opts.lineDecorationsWidth === 'string' && /^\d+(\.\d+)?ch$/.test(opts.lineDecorationsWidth)) { - let multiple = parseFloat(opts.lineDecorationsWidth.substr(0, opts.lineDecorationsWidth.length - 2)); - lineDecorationsWidth = multiple * fontInfo.typicalHalfwidthCharacterWidth; - } else { - lineDecorationsWidth = toInteger(opts.lineDecorationsWidth, 0); - } - if (opts.folding) { - lineDecorationsWidth += 16; - } - - let renderLineNumbers: boolean; - let renderCustomLineNumbers: (lineNumber: number) => string; - let renderRelativeLineNumbers: boolean; - { - let lineNumbers = opts.lineNumbers; - // Compatibility with old true or false values - if (lineNumbers === true) { - lineNumbers = 'on'; - } else if (lineNumbers === false) { - lineNumbers = 'off'; - } - - if (typeof lineNumbers === 'function') { - renderLineNumbers = true; - renderCustomLineNumbers = lineNumbers; - renderRelativeLineNumbers = false; - } else if (lineNumbers === 'relative') { - renderLineNumbers = true; - renderCustomLineNumbers = null; - renderRelativeLineNumbers = true; - } else if (lineNumbers === 'on') { - renderLineNumbers = true; - renderCustomLineNumbers = null; - renderRelativeLineNumbers = false; - } else { - renderLineNumbers = false; - renderCustomLineNumbers = null; - renderRelativeLineNumbers = false; - } - } - - let layoutInfo = EditorLayoutProvider.compute({ - outerWidth: outerWidth, - outerHeight: outerHeight, - showGlyphMargin: glyphMargin, - lineHeight: fontInfo.lineHeight, - showLineNumbers: renderLineNumbers, - lineNumbersMinChars: lineNumbersMinChars, - lineNumbersDigitCount: lineNumbersDigitCount, - lineDecorationsWidth: lineDecorationsWidth, - typicalHalfwidthCharacterWidth: fontInfo.typicalHalfwidthCharacterWidth, - maxDigitWidth: fontInfo.maxDigitWidth, - verticalScrollbarWidth: scrollbar.verticalScrollbarSize, - horizontalScrollbarHeight: scrollbar.horizontalScrollbarSize, - scrollbarArrowSize: scrollbar.arrowSize, - verticalScrollbarHasArrows: scrollbar.verticalHasArrows, - minimap: minimap.enabled, - minimapRenderCharacters: minimap.renderCharacters, - minimapMaxColumn: minimap.maxColumn, - pixelRatio: pixelRatio - }); - - let bareWrappingInfo: { isWordWrapMinified: boolean; isViewportWrapping: boolean; wrappingColumn: number; } = null; - { - let wordWrap = opts.wordWrap; - let wordWrapColumn = toInteger(opts.wordWrapColumn, 1); - let wordWrapMinified = toBoolean(opts.wordWrapMinified); - - // Compatibility with old true or false values - if (wordWrap === true) { - wordWrap = 'on'; - } else if (wordWrap === false) { - wordWrap = 'off'; - } - - if (wordWrapMinified && isDominatedByLongLines) { - // Force viewport width wrapping if model is dominated by long lines - bareWrappingInfo = { - isWordWrapMinified: true, - isViewportWrapping: true, - wrappingColumn: Math.max(1, layoutInfo.viewportColumn) - }; - } else if (wordWrap === 'on') { - bareWrappingInfo = { - isWordWrapMinified: false, - isViewportWrapping: true, - wrappingColumn: Math.max(1, layoutInfo.viewportColumn) - }; - } else if (wordWrap === 'bounded') { - bareWrappingInfo = { - isWordWrapMinified: false, - isViewportWrapping: true, - wrappingColumn: Math.min(Math.max(1, layoutInfo.viewportColumn), wordWrapColumn) - }; - } else if (wordWrap === 'wordWrapColumn') { - bareWrappingInfo = { - isWordWrapMinified: false, - isViewportWrapping: false, - wrappingColumn: wordWrapColumn - }; - } else { - bareWrappingInfo = { - isWordWrapMinified: false, - isViewportWrapping: false, - wrappingColumn: -1 - }; - } - } - - let wrappingInfo = new editorOptions.EditorWrappingInfo({ - inDiffEditor: Boolean(opts.inDiffEditor), - isDominatedByLongLines: isDominatedByLongLines, - isWordWrapMinified: bareWrappingInfo.isWordWrapMinified, - isViewportWrapping: bareWrappingInfo.isViewportWrapping, - wrappingColumn: bareWrappingInfo.wrappingColumn, - wrappingIndent: wrappingIndentFromString(opts.wrappingIndent), - wordWrapBreakBeforeCharacters: String(opts.wordWrapBreakBeforeCharacters), - wordWrapBreakAfterCharacters: String(opts.wordWrapBreakAfterCharacters), - wordWrapBreakObtrusiveCharacters: String(opts.wordWrapBreakObtrusiveCharacters), - }); - - let readOnly = toBoolean(opts.readOnly); - - let tabFocusMode = TabFocus.getTabFocusMode(); - if (readOnly) { - tabFocusMode = true; - } - - - let renderWhitespace = opts.renderWhitespace; - // Compatibility with old true or false values - if (renderWhitespace === true) { - renderWhitespace = 'boundary'; - } else if (renderWhitespace === false) { - renderWhitespace = 'none'; - } - - let renderLineHighlight = opts.renderLineHighlight; - // Compatibility with old true or false values - if (renderLineHighlight === true) { - renderLineHighlight = 'line'; - } else if (renderLineHighlight === false) { - renderLineHighlight = 'none'; - } - - let viewInfo = new editorOptions.InternalEditorViewOptions({ - theme: opts.theme, - canUseTranslate3d: canUseTranslate3d, - disableMonospaceOptimizations: (toBoolean(opts.disableMonospaceOptimizations) || toBoolean(opts.fontLigatures)), - experimentalScreenReader: toBoolean(opts.experimentalScreenReader), - rulers: toSortedIntegerArray(opts.rulers), - ariaLabel: String(opts.ariaLabel), - renderLineNumbers: renderLineNumbers, - renderCustomLineNumbers: renderCustomLineNumbers, - renderRelativeLineNumbers: renderRelativeLineNumbers, - selectOnLineNumbers: toBoolean(opts.selectOnLineNumbers), - glyphMargin: glyphMargin, - revealHorizontalRightPadding: toInteger(opts.revealHorizontalRightPadding, 0), - roundedSelection: toBoolean(opts.roundedSelection), - overviewRulerLanes: toInteger(opts.overviewRulerLanes, 0, 3), - overviewRulerBorder: toBoolean(opts.overviewRulerBorder), - cursorBlinking: cursorBlinkingStyleFromString(opts.cursorBlinking), - mouseWheelZoom: toBoolean(opts.mouseWheelZoom), - cursorStyle: cursorStyleFromString(opts.cursorStyle), - hideCursorInOverviewRuler: toBoolean(opts.hideCursorInOverviewRuler), - scrollBeyondLastLine: toBoolean(opts.scrollBeyondLastLine), - editorClassName: editorClassName, - stopRenderingLineAfter: stopRenderingLineAfter, - renderWhitespace: renderWhitespace, - renderControlCharacters: toBoolean(opts.renderControlCharacters), - fontLigatures: toBoolean(opts.fontLigatures), - renderIndentGuides: toBoolean(opts.renderIndentGuides), - renderLineHighlight: renderLineHighlight, - scrollbar: scrollbar, - minimap: minimap, - fixedOverflowWidgets: toBoolean(opts.fixedOverflowWidgets) - }); - - let contribInfo = new editorOptions.EditorContribOptions({ - selectionClipboard: toBoolean(opts.selectionClipboard), - hover: toBoolean(opts.hover), - contextmenu: toBoolean(opts.contextmenu), - quickSuggestions: typeof opts.quickSuggestions === 'object' ? { other: true, ...opts.quickSuggestions } : toBoolean(opts.quickSuggestions), - quickSuggestionsDelay: toInteger(opts.quickSuggestionsDelay), - parameterHints: toBoolean(opts.parameterHints), - iconsInSuggestions: toBoolean(opts.iconsInSuggestions), - formatOnType: toBoolean(opts.formatOnType), - formatOnPaste: toBoolean(opts.formatOnPaste), - suggestOnTriggerCharacters: toBoolean(opts.suggestOnTriggerCharacters), - acceptSuggestionOnEnter: toBoolean(opts.acceptSuggestionOnEnter), - acceptSuggestionOnCommitCharacter: toBoolean(opts.acceptSuggestionOnCommitCharacter), - snippetSuggestions: opts.snippetSuggestions, - emptySelectionClipboard: opts.emptySelectionClipboard, - wordBasedSuggestions: opts.wordBasedSuggestions, - suggestFontSize: opts.suggestFontSize, - suggestLineHeight: opts.suggestLineHeight, - selectionHighlight: toBoolean(opts.selectionHighlight), - occurrencesHighlight: toBoolean(opts.occurrencesHighlight), - codeLens: opts.referenceInfos && opts.codeLens, - folding: toBoolean(opts.folding), - matchBrackets: toBoolean(opts.matchBrackets), - }); - - return new editorOptions.InternalEditorOptions({ - lineHeight: fontInfo.lineHeight, // todo -> duplicated in styling - readOnly: readOnly, - wordSeparators: String(opts.wordSeparators), - autoClosingBrackets: toBoolean(opts.autoClosingBrackets), - useTabStops: toBoolean(opts.useTabStops), - tabFocusMode: tabFocusMode, - dragAndDrop: toBoolean(opts.dragAndDrop), - layoutInfo: layoutInfo, - fontInfo: fontInfo, - viewInfo: viewInfo, - wrappingInfo: wrappingInfo, - contribInfo: contribInfo, - }); - } - - private static _sanitizeScrollbarOpts(raw: editorOptions.IEditorScrollbarOptions, mouseWheelScrollSensitivity: number): editorOptions.InternalEditorScrollbarOptions { - - let visibilityFromString = (visibility: string) => { - switch (visibility) { - case 'hidden': - return ScrollbarVisibility.Hidden; - case 'visible': - return ScrollbarVisibility.Visible; - default: - return ScrollbarVisibility.Auto; - } - }; - - let horizontalScrollbarSize = toIntegerWithDefault(raw.horizontalScrollbarSize, 10); - let verticalScrollbarSize = toIntegerWithDefault(raw.verticalScrollbarSize, 14); - return new editorOptions.InternalEditorScrollbarOptions({ - vertical: visibilityFromString(raw.vertical), - horizontal: visibilityFromString(raw.horizontal), - - arrowSize: toIntegerWithDefault(raw.arrowSize, 11), - useShadows: toBooleanWithDefault(raw.useShadows, true), - - verticalHasArrows: toBooleanWithDefault(raw.verticalHasArrows, false), - horizontalHasArrows: toBooleanWithDefault(raw.horizontalHasArrows, false), - - horizontalScrollbarSize: horizontalScrollbarSize, - horizontalSliderSize: toIntegerWithDefault(raw.horizontalSliderSize, horizontalScrollbarSize), - - verticalScrollbarSize: verticalScrollbarSize, - verticalSliderSize: toIntegerWithDefault(raw.verticalSliderSize, verticalScrollbarSize), - - handleMouseWheel: toBooleanWithDefault(raw.handleMouseWheel, true), - mouseWheelScrollSensitivity: mouseWheelScrollSensitivity - }); - } - - private static _sanitizeMinimapOpts(raw: editorOptions.IEditorMinimapOptions): editorOptions.InternalEditorMinimapOptions { - let maxColumn = toIntegerWithDefault(raw.maxColumn, DefaultConfig.editor.minimap.maxColumn); - if (maxColumn < 1) { - maxColumn = 1; - } - return new editorOptions.InternalEditorMinimapOptions({ - enabled: toBooleanWithDefault(raw.enabled, DefaultConfig.editor.minimap.enabled), - renderCharacters: toBooleanWithDefault(raw.renderCharacters, DefaultConfig.editor.minimap.renderCharacters), - maxColumn: maxColumn, - }); - } -} - -function toBoolean(value: any): boolean { - return value === 'false' ? false : Boolean(value); -} - -function toBooleanWithDefault(value: any, defaultValue: boolean): boolean { - if (typeof value === 'undefined') { - return defaultValue; - } - return toBoolean(value); -} - -function toFloat(source: any, defaultValue: number): number { - let r = parseFloat(source); - if (isNaN(r)) { - r = defaultValue; - } - return r; -} - -function toInteger(source: any, minimum: number = Constants.MIN_SAFE_SMALL_INTEGER, maximum: number = Constants.MAX_SAFE_SMALL_INTEGER): number { - let r = parseInt(source, 10); - if (isNaN(r)) { - r = 0; - } - r = Math.max(minimum, r); - r = Math.min(maximum, r); - return r | 0; -} - -function toSortedIntegerArray(source: any): number[] { - if (!Array.isArray(source)) { - return []; - } - let arrSource = source; - let r = arrSource.map(el => toInteger(el)); - r.sort(); - return r; -} - -function wrappingIndentFromString(wrappingIndent: string): editorOptions.WrappingIndent { - if (wrappingIndent === 'indent') { - return editorOptions.WrappingIndent.Indent; - } else if (wrappingIndent === 'same') { - return editorOptions.WrappingIndent.Same; - } else { - return editorOptions.WrappingIndent.None; - } -} - -function cursorStyleFromString(cursorStyle: string): editorOptions.TextEditorCursorStyle { - if (cursorStyle === 'line') { - return editorOptions.TextEditorCursorStyle.Line; - } else if (cursorStyle === 'block') { - return editorOptions.TextEditorCursorStyle.Block; - } else if (cursorStyle === 'underline') { - return editorOptions.TextEditorCursorStyle.Underline; - } else if (cursorStyle === 'line-thin') { - return editorOptions.TextEditorCursorStyle.LineThin; - } else if (cursorStyle === 'block-outline') { - return editorOptions.TextEditorCursorStyle.BlockOutline; - } else if (cursorStyle === 'underline-thin') { - return editorOptions.TextEditorCursorStyle.UnderlineThin; - } - return editorOptions.TextEditorCursorStyle.Line; -} - -function cursorBlinkingStyleFromString(cursorBlinkingStyle: string): editorOptions.TextEditorCursorBlinkingStyle { - switch (cursorBlinkingStyle) { - case 'blink': - return editorOptions.TextEditorCursorBlinkingStyle.Blink; - case 'smooth': - return editorOptions.TextEditorCursorBlinkingStyle.Smooth; - case 'phase': - return editorOptions.TextEditorCursorBlinkingStyle.Phase; - case 'expand': - return editorOptions.TextEditorCursorBlinkingStyle.Expand; - case 'visible': // maintain compatibility - case 'solid': - return editorOptions.TextEditorCursorBlinkingStyle.Solid; - } - return editorOptions.TextEditorCursorBlinkingStyle.Blink; -} - -function toIntegerWithDefault(source: any, defaultValue: number): number { - if (typeof source === 'undefined') { - return defaultValue; - } - return toInteger(source); -} - -export interface IElementSizeObserver { - startObserving(): void; - observe(dimension?: editorCommon.IDimension): void; - dispose(): void; - getWidth(): number; - getHeight(): number; +export interface IEnvConfiguration { + extraEditorClassName: string; + outerWidth: number; + outerHeight: number; + emptySelectionClipboard: boolean; + pixelRatio: number; + zoomLevel: number; + accessibilitySupport: platform.AccessibilitySupport; } export abstract class CommonEditorConfiguration extends Disposable implements editorCommon.IConfiguration { + protected _rawOptions: editorOptions.IEditorOptions; + protected _validatedOptions: editorOptions.IValidatedEditorOptions; public editor: editorOptions.InternalEditorOptions; - public editorClone: editorOptions.InternalEditorOptions; - - protected _configWithDefaults: ConfigurationWithDefaults; - protected _elementSizeObserver: IElementSizeObserver; private _isDominatedByLongLines: boolean; private _lineNumbersDigitCount: number; private _onDidChange = this._register(new Emitter()); public onDidChange: Event = this._onDidChange.event; - constructor(options: editorOptions.IEditorOptions, elementSizeObserver: IElementSizeObserver = null) { + constructor(options: editorOptions.IEditorOptions) { super(); - this._configWithDefaults = new ConfigurationWithDefaults(options); - this._elementSizeObserver = elementSizeObserver; + + // Do a "deep clone of sorts" on the incoming options + this._rawOptions = objects.mixin({}, options || {}); + this._rawOptions.scrollbar = objects.mixin({}, this._rawOptions.scrollbar || {}); + this._rawOptions.minimap = objects.mixin({}, this._rawOptions.minimap || {}); + this._rawOptions.find = objects.mixin({}, this._rawOptions.find || {}); + + this._validatedOptions = editorOptions.EditorOptionsValidator.validate(this._rawOptions, EDITOR_DEFAULTS); + this.editor = null; this._isDominatedByLongLines = false; this._lineNumbersDigitCount = 1; - this.editor = this._computeInternalOptions(); - this.editorClone = this.editor.clone(); + this._register(EditorZoom.onDidChangeZoomLevel(_ => this._recomputeOptions())); this._register(TabFocus.onDidChangeTabFocus(_ => this._recomputeOptions())); } @@ -525,52 +95,46 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed } protected _recomputeOptions(): void { - this._setOptions(this._computeInternalOptions()); - } + const oldOptions = this.editor; + const newOptions = this._computeInternalOptions(); - private _setOptions(newOptions: editorOptions.InternalEditorOptions): void { - if (this.editor && this.editor.equals(newOptions)) { + if (oldOptions && oldOptions.equals(newOptions)) { return; } - let changeEvent = this.editor.createChangeEvent(newOptions); this.editor = newOptions; - this.editorClone = this.editor.clone(); - this._onDidChange.fire(changeEvent); + + if (oldOptions) { + this._onDidChange.fire(oldOptions.createChangeEvent(newOptions)); + } } public getRawOptions(): editorOptions.IEditorOptions { - return this._configWithDefaults.getEditorOptions(); + return this._rawOptions; } private _computeInternalOptions(): editorOptions.InternalEditorOptions { - let opts = this._configWithDefaults.getEditorOptions(); - - let editorClassName = this._getEditorClassName(opts.theme, toBoolean(opts.fontLigatures), opts.mouseStyle); - - let disableTranslate3d = toBoolean(opts.disableTranslate3d); - let canUseTranslate3d = this._getCanUseTranslate3d(); - if (disableTranslate3d) { - canUseTranslate3d = false; - } - - let bareFontInfo = BareFontInfo.createFromRawSettings(opts, this.getZoomLevel()); - - return InternalEditorOptionsHelper.createInternalEditorOptions( - this.getOuterWidth(), - this.getOuterHeight(), - opts, - this.readConfiguration(bareFontInfo), - editorClassName, - this._isDominatedByLongLines, - this._lineNumbersDigitCount, - canUseTranslate3d, - this._getPixelRatio() - ); + const opts = this._validatedOptions; + const partialEnv = this._getEnvConfiguration(); + const bareFontInfo = BareFontInfo.createFromRawSettings(this._rawOptions, partialEnv.zoomLevel); + const env: editorOptions.IEnvironmentalOptions = { + outerWidth: partialEnv.outerWidth, + outerHeight: partialEnv.outerHeight, + fontInfo: this.readConfiguration(bareFontInfo), + extraEditorClassName: partialEnv.extraEditorClassName, + isDominatedByLongLines: this._isDominatedByLongLines, + lineNumbersDigitCount: this._lineNumbersDigitCount, + emptySelectionClipboard: partialEnv.emptySelectionClipboard, + pixelRatio: partialEnv.pixelRatio, + tabFocusMode: TabFocus.getTabFocusMode(), + accessibilitySupport: partialEnv.accessibilitySupport + }; + return editorOptions.InternalEditorOptionsFactory.createInternalEditorOptions(env, opts); } public updateOptions(newOptions: editorOptions.IEditorOptions): void { - this._configWithDefaults.updateOptions(newOptions); + this._rawOptions = objects.mixin(this._rawOptions, newOptions || {}); + this._validatedOptions = editorOptions.EditorOptionsValidator.validate(this._rawOptions, EDITOR_DEFAULTS); this._recomputeOptions(); } @@ -580,7 +144,7 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed } public setMaxLineNumber(maxLineNumber: number): void { - let digitCount = CommonEditorConfiguration.digitCount(maxLineNumber); + let digitCount = CommonEditorConfiguration._digitCount(maxLineNumber); if (this._lineNumbersDigitCount === digitCount) { return; } @@ -588,7 +152,7 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed this._recomputeOptions(); } - private static digitCount(n: number): number { + private static _digitCount(n: number): number { var r = 0; while (n) { n = Math.floor(n / 10); @@ -596,20 +160,10 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed } return r ? r : 1; } - - protected abstract _getEditorClassName(theme: string, fontLigatures: boolean, mouseDrag: 'text' | 'default' | 'copy'): string; - - protected abstract getOuterWidth(): number; - - protected abstract getOuterHeight(): number; - - protected abstract _getCanUseTranslate3d(): boolean; - - protected abstract _getPixelRatio(): number; + protected abstract _getEnvConfiguration(): IEnvConfiguration; protected abstract readConfiguration(styling: BareFontInfo): FontInfo; - protected abstract getZoomLevel(): number; } const configurationRegistry = Registry.as(Extensions.Configuration); @@ -619,32 +173,38 @@ const editorConfiguration: IConfigurationNode = { 'type': 'object', 'title': nls.localize('editorConfigurationTitle', "Editor"), 'overridable': true, + 'scope': ConfigurationScope.FOLDER, 'properties': { 'editor.fontFamily': { 'type': 'string', - 'default': DefaultConfig.editor.fontFamily, + 'default': EDITOR_FONT_DEFAULTS.fontFamily, 'description': nls.localize('fontFamily', "Controls the font family.") }, 'editor.fontWeight': { 'type': 'string', 'enum': ['normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900'], - 'default': DefaultConfig.editor.fontWeight, + 'default': EDITOR_FONT_DEFAULTS.fontWeight, 'description': nls.localize('fontWeight', "Controls the font weight.") }, 'editor.fontSize': { 'type': 'number', - 'default': DefaultConfig.editor.fontSize, + 'default': EDITOR_FONT_DEFAULTS.fontSize, 'description': nls.localize('fontSize', "Controls the font size in pixels.") }, 'editor.lineHeight': { 'type': 'number', - 'default': DefaultConfig.editor.lineHeight, + 'default': EDITOR_FONT_DEFAULTS.lineHeight, 'description': nls.localize('lineHeight', "Controls the line height. Use 0 to compute the lineHeight from the fontSize.") }, + 'editor.letterSpacing': { + 'type': 'number', + 'default': EDITOR_FONT_DEFAULTS.letterSpacing, + 'description': nls.localize('letterSpacing', "Controls the letter spacing in pixels.") + }, 'editor.lineNumbers': { 'type': 'string', 'enum': ['off', 'on', 'relative'], - 'default': DefaultConfig.editor.lineNumbers, + 'default': 'on', 'description': nls.localize('lineNumbers', "Controls the display of line numbers. Possible values are 'on', 'off', and 'relative'. 'relative' shows the line count from the current cursor position.") }, 'editor.rulers': { @@ -652,57 +212,73 @@ const editorConfiguration: IConfigurationNode = { 'items': { 'type': 'number' }, - 'default': DefaultConfig.editor.rulers, + 'default': EDITOR_DEFAULTS.viewInfo.rulers, 'description': nls.localize('rulers', "Columns at which to show vertical rulers") }, 'editor.wordSeparators': { 'type': 'string', - 'default': DefaultConfig.editor.wordSeparators, + 'default': EDITOR_DEFAULTS.wordSeparators, 'description': nls.localize('wordSeparators', "Characters that will be used as word separators when doing word related navigations or operations") }, 'editor.tabSize': { 'type': 'number', - 'default': DEFAULT_INDENTATION.tabSize, + 'default': EDITOR_MODEL_DEFAULTS.tabSize, 'minimum': 1, 'description': nls.localize('tabSize', "The number of spaces a tab is equal to. This setting is overriden based on the file contents when `editor.detectIndentation` is on."), 'errorMessage': nls.localize('tabSize.errorMessage', "Expected 'number'. Note that the value \"auto\" has been replaced by the `editor.detectIndentation` setting.") }, 'editor.insertSpaces': { 'type': 'boolean', - 'default': DEFAULT_INDENTATION.insertSpaces, + 'default': EDITOR_MODEL_DEFAULTS.insertSpaces, 'description': nls.localize('insertSpaces', "Insert spaces when pressing Tab. This setting is overriden based on the file contents when `editor.detectIndentation` is on."), 'errorMessage': nls.localize('insertSpaces.errorMessage', "Expected 'boolean'. Note that the value \"auto\" has been replaced by the `editor.detectIndentation` setting.") }, 'editor.detectIndentation': { 'type': 'boolean', - 'default': DEFAULT_INDENTATION.detectIndentation, + 'default': EDITOR_MODEL_DEFAULTS.detectIndentation, 'description': nls.localize('detectIndentation', "When opening a file, `editor.tabSize` and `editor.insertSpaces` will be detected based on the file contents.") }, 'editor.roundedSelection': { 'type': 'boolean', - 'default': DefaultConfig.editor.roundedSelection, + 'default': EDITOR_DEFAULTS.viewInfo.roundedSelection, 'description': nls.localize('roundedSelection', "Controls if selections have rounded corners") }, 'editor.scrollBeyondLastLine': { 'type': 'boolean', - 'default': DefaultConfig.editor.scrollBeyondLastLine, + 'default': EDITOR_DEFAULTS.viewInfo.scrollBeyondLastLine, 'description': nls.localize('scrollBeyondLastLine', "Controls if the editor will scroll beyond the last line") }, 'editor.minimap.enabled': { 'type': 'boolean', - 'default': DefaultConfig.editor.minimap.enabled, + 'default': EDITOR_DEFAULTS.viewInfo.minimap.enabled, 'description': nls.localize('minimap.enabled', "Controls if the minimap is shown") }, + 'editor.minimap.showSlider': { + 'type': 'string', + 'enum': ['always', 'mouseover'], + 'default': EDITOR_DEFAULTS.viewInfo.minimap.showSlider, + 'description': nls.localize('minimap.showSlider', "Controls whether the minimap slider is automatically hidden.") + }, 'editor.minimap.renderCharacters': { 'type': 'boolean', - 'default': DefaultConfig.editor.minimap.renderCharacters, + 'default': EDITOR_DEFAULTS.viewInfo.minimap.renderCharacters, 'description': nls.localize('minimap.renderCharacters', "Render the actual characters on a line (as opposed to color blocks)") }, 'editor.minimap.maxColumn': { 'type': 'number', - 'default': DefaultConfig.editor.minimap.maxColumn, + 'default': EDITOR_DEFAULTS.viewInfo.minimap.maxColumn, 'description': nls.localize('minimap.maxColumn', "Limit the width of the minimap to render at most a certain number of columns") }, + 'editor.find.seedSearchStringFromSelection': { + 'type': 'boolean', + 'default': EDITOR_DEFAULTS.contribInfo.find.seedSearchStringFromSelection, + 'description': nls.localize('find.seedSearchStringFromSelection', "Controls if we seed the search string in Find Widget from editor selection") + }, + 'editor.find.autoFindInSelection': { + 'type': 'boolean', + 'default': EDITOR_DEFAULTS.contribInfo.find.autoFindInSelection, + 'description': nls.localize('find.autoFindInSelection', "Controls if Find in Selection flag is turned on when multiple characters or lines of text are selected in the editor") + }, 'editor.wordWrap': { 'type': 'string', 'enum': ['off', 'on', 'wordWrapColumn', 'bounded'], @@ -723,7 +299,7 @@ const editorConfiguration: IConfigurationNode = { ] }, "Lines will wrap at the minimum of viewport and `editor.wordWrapColumn`."), ], - 'default': DefaultConfig.editor.wordWrap, + 'default': EDITOR_DEFAULTS.wordWrap, 'description': nls.localize({ key: 'wordWrap', comment: [ @@ -734,7 +310,7 @@ const editorConfiguration: IConfigurationNode = { }, 'editor.wordWrapColumn': { 'type': 'integer', - 'default': DefaultConfig.editor.wordWrapColumn, + 'default': EDITOR_DEFAULTS.wordWrapColumn, 'minimum': 1, 'description': nls.localize({ key: 'wordWrapColumn', @@ -747,14 +323,30 @@ const editorConfiguration: IConfigurationNode = { 'editor.wrappingIndent': { 'type': 'string', 'enum': ['none', 'same', 'indent'], - 'default': DefaultConfig.editor.wrappingIndent, + 'default': 'same', 'description': nls.localize('wrappingIndent', "Controls the indentation of wrapped lines. Can be one of 'none', 'same' or 'indent'.") }, 'editor.mouseWheelScrollSensitivity': { 'type': 'number', - 'default': DefaultConfig.editor.mouseWheelScrollSensitivity, + 'default': EDITOR_DEFAULTS.viewInfo.scrollbar.mouseWheelScrollSensitivity, 'description': nls.localize('mouseWheelScrollSensitivity', "A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events") }, + 'editor.multiCursorModifier': { + 'type': 'string', + 'enum': ['ctrlCmd', 'alt'], + 'enumDescriptions': [ + nls.localize('multiCursorModifier.ctrlCmd', "Maps to `Control` on Windows and Linux and to `Command` on OSX."), + nls.localize('multiCursorModifier.alt', "Maps to `Alt` on Windows and Linux and to `Option` on OSX.") + ], + 'default': 'alt', + 'description': nls.localize({ + key: 'multiCursorModifier', + comment: [ + '- `ctrlCmd` refers to a value the setting can take and should not be localized.', + '- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized.' + ] + }, "The modifier to be used to add multiple cursors with the mouse. `ctrlCmd` maps to `Control` on Windows and Linux and to `Command` on OSX. The Go To Definition and Open Link mouse gestures will adapt such that they do not conflict with the multicursor modifier.") + }, 'editor.quickSuggestions': { 'anyOf': [ { @@ -781,64 +373,70 @@ const editorConfiguration: IConfigurationNode = { } } ], - 'default': DefaultConfig.editor.quickSuggestions, + 'default': EDITOR_DEFAULTS.contribInfo.quickSuggestions, 'description': nls.localize('quickSuggestions', "Controls if suggestions should automatically show up while typing") }, 'editor.quickSuggestionsDelay': { 'type': 'integer', - 'default': DefaultConfig.editor.quickSuggestionsDelay, + 'default': EDITOR_DEFAULTS.contribInfo.quickSuggestionsDelay, 'minimum': 0, 'description': nls.localize('quickSuggestionsDelay', "Controls the delay in ms after which quick suggestions will show up") }, 'editor.parameterHints': { 'type': 'boolean', - 'default': DefaultConfig.editor.parameterHints, - 'description': nls.localize('parameterHints', "Enables parameter hints") + 'default': EDITOR_DEFAULTS.contribInfo.parameterHints, + 'description': nls.localize('parameterHints', "Enables pop-up that shows parameter documentation and type information as you type") }, 'editor.autoClosingBrackets': { 'type': 'boolean', - 'default': DefaultConfig.editor.autoClosingBrackets, + 'default': EDITOR_DEFAULTS.autoClosingBrackets, 'description': nls.localize('autoClosingBrackets', "Controls if the editor should automatically close brackets after opening them") }, 'editor.formatOnType': { 'type': 'boolean', - 'default': DefaultConfig.editor.formatOnType, + 'default': EDITOR_DEFAULTS.contribInfo.formatOnType, 'description': nls.localize('formatOnType', "Controls if the editor should automatically format the line after typing") }, 'editor.formatOnPaste': { 'type': 'boolean', - 'default': DefaultConfig.editor.formatOnPaste, + 'default': EDITOR_DEFAULTS.contribInfo.formatOnPaste, 'description': nls.localize('formatOnPaste', "Controls if the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.") }, + 'editor.autoIndent': { + 'type': 'boolean', + 'default': EDITOR_DEFAULTS.autoIndent, + 'description': nls.localize('autoIndent', "Controls if the editor should automatically adjust the indentation when users type, paste or move lines. Indentation rules of the language must be available. ") + }, 'editor.suggestOnTriggerCharacters': { 'type': 'boolean', - 'default': DefaultConfig.editor.suggestOnTriggerCharacters, + 'default': EDITOR_DEFAULTS.contribInfo.suggestOnTriggerCharacters, 'description': nls.localize('suggestOnTriggerCharacters', "Controls if suggestions should automatically show up when typing trigger characters") }, 'editor.acceptSuggestionOnEnter': { - 'type': 'boolean', - 'default': DefaultConfig.editor.acceptSuggestionOnEnter, - 'description': nls.localize('acceptSuggestionOnEnter', "Controls if suggestions should be accepted on 'Enter' - in addition to 'Tab'. Helps to avoid ambiguity between inserting new lines or accepting suggestions.") + 'type': 'string', + 'enum': ['on', 'smart', 'off'], + 'default': EDITOR_DEFAULTS.contribInfo.acceptSuggestionOnEnter, + 'description': nls.localize('acceptSuggestionOnEnter', "Controls if suggestions should be accepted on 'Enter' - in addition to 'Tab'. Helps to avoid ambiguity between inserting new lines or accepting suggestions. The value 'smart' means only accept a suggestion with Enter when it makes a textual change") }, 'editor.acceptSuggestionOnCommitCharacter': { 'type': 'boolean', - 'default': DefaultConfig.editor.acceptSuggestionOnCommitCharacter, + 'default': EDITOR_DEFAULTS.contribInfo.acceptSuggestionOnCommitCharacter, 'description': nls.localize('acceptSuggestionOnCommitCharacter', "Controls if suggestions should be accepted on commit characters. For instance in JavaScript the semi-colon (';') can be a commit character that accepts a suggestion and types that character.") }, 'editor.snippetSuggestions': { 'type': 'string', 'enum': ['top', 'bottom', 'inline', 'none'], - 'default': DefaultConfig.editor.snippetSuggestions, + 'default': EDITOR_DEFAULTS.contribInfo.snippetSuggestions, 'description': nls.localize('snippetSuggestions', "Controls whether snippets are shown with other suggestions and how they are sorted.") }, 'editor.emptySelectionClipboard': { 'type': 'boolean', - 'default': DefaultConfig.editor.emptySelectionClipboard, + 'default': EDITOR_DEFAULTS.emptySelectionClipboard, 'description': nls.localize('emptySelectionClipboard', "Controls whether copying without a selection copies the current line.") }, 'editor.wordBasedSuggestions': { 'type': 'boolean', - 'default': DefaultConfig.editor.wordBasedSuggestions, + 'default': EDITOR_DEFAULTS.contribInfo.wordBasedSuggestions, 'description': nls.localize('wordBasedSuggestions', "Controls whether completions should be computed based on words in the document.") }, 'editor.suggestFontSize': { @@ -855,12 +453,12 @@ const editorConfiguration: IConfigurationNode = { }, 'editor.selectionHighlight': { 'type': 'boolean', - 'default': DefaultConfig.editor.selectionHighlight, + 'default': EDITOR_DEFAULTS.contribInfo.selectionHighlight, 'description': nls.localize('selectionHighlight', "Controls whether the editor should highlight similar matches to the selection") }, 'editor.occurrencesHighlight': { 'type': 'boolean', - 'default': DefaultConfig.editor.occurrencesHighlight, + 'default': EDITOR_DEFAULTS.contribInfo.occurrencesHighlight, 'description': nls.localize('occurrencesHighlight', "Controls whether the editor should highlight semantic symbol occurrences") }, 'editor.overviewRulerLanes': { @@ -870,86 +468,92 @@ const editorConfiguration: IConfigurationNode = { }, 'editor.overviewRulerBorder': { 'type': 'boolean', - 'default': DefaultConfig.editor.overviewRulerBorder, + 'default': EDITOR_DEFAULTS.viewInfo.overviewRulerBorder, 'description': nls.localize('overviewRulerBorder', "Controls if a border should be drawn around the overview ruler.") }, 'editor.cursorBlinking': { 'type': 'string', 'enum': ['blink', 'smooth', 'phase', 'expand', 'solid'], - 'default': DefaultConfig.editor.cursorBlinking, + 'default': editorOptions.blinkingStyleToString(EDITOR_DEFAULTS.viewInfo.cursorBlinking), 'description': nls.localize('cursorBlinking', "Control the cursor animation style, possible values are 'blink', 'smooth', 'phase', 'expand' and 'solid'") }, 'editor.mouseWheelZoom': { 'type': 'boolean', - 'default': DefaultConfig.editor.mouseWheelZoom, + 'default': EDITOR_DEFAULTS.viewInfo.mouseWheelZoom, 'description': nls.localize('mouseWheelZoom', "Zoom the font of the editor when using mouse wheel and holding Ctrl") }, 'editor.cursorStyle': { 'type': 'string', 'enum': ['block', 'block-outline', 'line', 'line-thin', 'underline', 'underline-thin'], - 'default': DefaultConfig.editor.cursorStyle, + 'default': editorOptions.cursorStyleToString(EDITOR_DEFAULTS.viewInfo.cursorStyle), 'description': nls.localize('cursorStyle', "Controls the cursor style, accepted values are 'block', 'block-outline', 'line', 'line-thin', 'underline' and 'underline-thin'") }, 'editor.fontLigatures': { 'type': 'boolean', - 'default': DefaultConfig.editor.fontLigatures, + 'default': EDITOR_DEFAULTS.viewInfo.fontLigatures, 'description': nls.localize('fontLigatures', "Enables font ligatures") }, 'editor.hideCursorInOverviewRuler': { 'type': 'boolean', - 'default': DefaultConfig.editor.hideCursorInOverviewRuler, + 'default': EDITOR_DEFAULTS.viewInfo.hideCursorInOverviewRuler, 'description': nls.localize('hideCursorInOverviewRuler', "Controls if the cursor should be hidden in the overview ruler.") }, 'editor.renderWhitespace': { 'type': 'string', 'enum': ['none', 'boundary', 'all'], - default: DefaultConfig.editor.renderWhitespace, + default: EDITOR_DEFAULTS.viewInfo.renderWhitespace, description: nls.localize('renderWhitespace', "Controls how the editor should render whitespace characters, possibilities are 'none', 'boundary', and 'all'. The 'boundary' option does not render single spaces between words.") }, 'editor.renderControlCharacters': { 'type': 'boolean', - default: DefaultConfig.editor.renderControlCharacters, + default: EDITOR_DEFAULTS.viewInfo.renderControlCharacters, description: nls.localize('renderControlCharacters', "Controls whether the editor should render control characters") }, 'editor.renderIndentGuides': { 'type': 'boolean', - default: DefaultConfig.editor.renderIndentGuides, + default: EDITOR_DEFAULTS.viewInfo.renderIndentGuides, description: nls.localize('renderIndentGuides', "Controls whether the editor should render indent guides") }, 'editor.renderLineHighlight': { 'type': 'string', 'enum': ['none', 'gutter', 'line', 'all'], - default: DefaultConfig.editor.renderLineHighlight, + default: EDITOR_DEFAULTS.viewInfo.renderLineHighlight, description: nls.localize('renderLineHighlight', "Controls how the editor should render the current line highlight, possibilities are 'none', 'gutter', 'line', and 'all'.") }, 'editor.codeLens': { 'type': 'boolean', - 'default': DefaultConfig.editor.codeLens, + 'default': EDITOR_DEFAULTS.contribInfo.codeLens, 'description': nls.localize('codeLens', "Controls if the editor shows code lenses") }, 'editor.folding': { 'type': 'boolean', - 'default': DefaultConfig.editor.folding, + 'default': EDITOR_DEFAULTS.contribInfo.folding, 'description': nls.localize('folding', "Controls whether the editor has code folding enabled") }, + 'editor.showFoldingControls': { + 'type': 'string', + 'enum': ['always', 'mouseover'], + 'default': EDITOR_DEFAULTS.contribInfo.showFoldingControls, + 'description': nls.localize('showFoldingControls', "Controls whether the fold controls on the gutter are automatically hidden.") + }, 'editor.matchBrackets': { 'type': 'boolean', - 'default': DefaultConfig.editor.matchBrackets, + 'default': EDITOR_DEFAULTS.contribInfo.matchBrackets, 'description': nls.localize('matchBrackets', "Highlight matching brackets when one of them is selected.") }, 'editor.glyphMargin': { 'type': 'boolean', - 'default': DefaultConfig.editor.glyphMargin, + 'default': EDITOR_DEFAULTS.viewInfo.glyphMargin, 'description': nls.localize('glyphMargin', "Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.") }, 'editor.useTabStops': { 'type': 'boolean', - 'default': DefaultConfig.editor.useTabStops, + 'default': EDITOR_DEFAULTS.useTabStops, 'description': nls.localize('useTabStops', "Inserting and deleting whitespace follows tab stops") }, 'editor.trimAutoWhitespace': { 'type': 'boolean', - 'default': DEFAULT_TRIM_AUTO_WHITESPACE, + 'default': EDITOR_MODEL_DEFAULTS.trimAutoWhitespace, 'description': nls.localize('trimAutoWhitespace', "Remove trailing auto inserted whitespace") }, 'editor.stablePeek': { @@ -959,9 +563,25 @@ const editorConfiguration: IConfigurationNode = { }, 'editor.dragAndDrop': { 'type': 'boolean', - 'default': DefaultConfig.editor.dragAndDrop, + 'default': EDITOR_DEFAULTS.dragAndDrop, 'description': nls.localize('dragAndDrop', "Controls if the editor should allow to move selections via drag and drop.") }, + 'editor.accessibilitySupport': { + 'type': 'string', + 'enum': ['auto', 'on', 'off'], + 'enumDescriptions': [ + nls.localize('accessibilitySupport.auto', "The editor will use platform APIs to detect when a Screen Reader is attached."), + nls.localize('accessibilitySupport.on', "The editor will be permanently optimized for usage with a Screen Reader."), + nls.localize('accessibilitySupport.off', "The editor will never be optimized for usage with a Screen Reader."), + ], + 'default': EDITOR_DEFAULTS.accessibilitySupport, + 'description': nls.localize('accessibilitySupport', "Controls whether the editor should run in a mode where it is optimized for screen readers.") + }, + 'editor.links': { + 'type': 'boolean', + 'default': EDITOR_DEFAULTS.contribInfo.links, + 'description': nls.localize('links', "Controls whether the editor should detect links and make them clickable") + }, 'diffEditor.renderSideBySide': { 'type': 'boolean', 'default': true, @@ -983,7 +603,7 @@ const editorConfiguration: IConfigurationNode = { if (platform.isLinux) { editorConfiguration['properties']['editor.selectionClipboard'] = { 'type': 'boolean', - 'default': DefaultConfig.editor.selectionClipboard, + 'default': EDITOR_DEFAULTS.contribInfo.selectionClipboard, 'description': nls.localize('selectionClipboard', "Controls if the Linux primary clipboard should be supported.") }; } diff --git a/src/vs/editor/common/config/config.ts b/src/vs/editor/common/config/config.ts deleted file mode 100644 index 543f74bf91a3e..0000000000000 --- a/src/vs/editor/common/config/config.ts +++ /dev/null @@ -1,172 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { TPromise } from 'vs/base/common/winjs.base'; -import { IEditorService } from 'vs/platform/editor/common/editor'; -import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; -import { IContextKeyService, ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; -import { ICommandAndKeybindingRule, IKeybindings } from 'vs/platform/keybinding/common/keybindingsRegistry'; -import * as editorCommon from 'vs/editor/common/editorCommon'; -import { ICodeEditorService, getCodeEditor } from 'vs/editor/common/services/codeEditorService'; -import { CommandsRegistry, ICommandHandler, ICommandHandlerDescription } from 'vs/platform/commands/common/commands'; -import H = editorCommon.Handler; - -export interface ICommandKeybindingsOptions extends IKeybindings { - kbExpr?: ContextKeyExpr; - weight?: number; -} - -export interface ICommandOptions { - id: string; - precondition: ContextKeyExpr; - kbOpts?: ICommandKeybindingsOptions; - description?: ICommandHandlerDescription; -} - -export abstract class Command { - public id: string; - public precondition: ContextKeyExpr; - private kbOpts: ICommandKeybindingsOptions; - private description: ICommandHandlerDescription; - - constructor(opts: ICommandOptions) { - this.id = opts.id; - this.precondition = opts.precondition; - this.kbOpts = opts.kbOpts; - this.description = opts.description; - } - - public abstract runCommand(accessor: ServicesAccessor, args: any): void | TPromise; - - public toCommandAndKeybindingRule(defaultWeight: number): ICommandAndKeybindingRule { - const kbOpts = this.kbOpts || { primary: 0 }; - - let kbWhen = kbOpts.kbExpr; - if (this.precondition) { - if (kbWhen) { - kbWhen = ContextKeyExpr.and(kbWhen, this.precondition); - } else { - kbWhen = this.precondition; - } - } - - const weight = (typeof kbOpts.weight === 'number' ? kbOpts.weight : defaultWeight); - - return { - id: this.id, - handler: (accessor, args) => this.runCommand(accessor, args), - weight: weight, - when: kbWhen, - primary: kbOpts.primary, - secondary: kbOpts.secondary, - win: kbOpts.win, - linux: kbOpts.linux, - mac: kbOpts.mac, - description: this.description - }; - } -} - -export interface EditorControllerCommand { - new (opts: IContributionCommandOptions): EditorCommand; -} - -export interface IContributionCommandOptions extends ICommandOptions { - handler: (controller: T) => void; -} - -export abstract class EditorCommand extends Command { - - public static bindToContribution(controllerGetter: (editor: editorCommon.ICommonCodeEditor) => T): EditorControllerCommand { - - return class EditorControllerCommandImpl extends EditorCommand { - private _callback: (controller: T) => void; - - constructor(opts: IContributionCommandOptions) { - super(opts); - - this._callback = opts.handler; - } - - public runEditorCommand(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor, args: any): void { - let controller = controllerGetter(editor); - if (controller) { - this._callback(controllerGetter(editor)); - } - } - }; - } - - constructor(opts: ICommandOptions) { - super(opts); - } - - public runCommand(accessor: ServicesAccessor, args: any): void | TPromise { - let editor = findFocusedEditor(accessor); - if (!editor) { - editor = getActiveEditorWidget(accessor); - } - if (!editor) { - // well, at least we tried... - return; - } - return editor.invokeWithinContext((editorAccessor) => { - const kbService = editorAccessor.get(IContextKeyService); - if (!kbService.contextMatchesRules(this.precondition)) { - // precondition does not hold - return; - } - - return this.runEditorCommand(editorAccessor, editor, args); - }); - } - - public abstract runEditorCommand(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor, args: any): void | TPromise; -} - -function findFocusedEditor(accessor: ServicesAccessor): editorCommon.ICommonCodeEditor { - return accessor.get(ICodeEditorService).getFocusedCodeEditor(); -} - -function withCodeEditorFromCommandHandler(accessor: ServicesAccessor, callback: (editor: editorCommon.ICommonCodeEditor) => void): void { - let editor = findFocusedEditor(accessor); - if (editor) { - callback(editor); - } -} - -function getActiveEditorWidget(accessor: ServicesAccessor): editorCommon.ICommonCodeEditor { - const editorService = accessor.get(IEditorService); - let activeEditor = (editorService).getActiveEditor && (editorService).getActiveEditor(); - return getCodeEditor(activeEditor); -} - -function triggerEditorHandler(handlerId: string, accessor: ServicesAccessor, args: any): void { - withCodeEditorFromCommandHandler(accessor, (editor) => { - editor.trigger('keyboard', handlerId, args); - }); -} - -class CoreCommand extends Command { - public runCommand(accessor: ServicesAccessor, args: any): void { - triggerEditorHandler(this.id, accessor, args); - } -} - -function registerOverwritableCommand(handlerId: string, handler: ICommandHandler): void { - CommandsRegistry.registerCommand(handlerId, handler); - CommandsRegistry.registerCommand('default:' + handlerId, handler); -} - -function registerCoreDispatchCommand(handlerId: string): void { - registerOverwritableCommand(handlerId, triggerEditorHandler.bind(null, handlerId)); -} -registerCoreDispatchCommand(H.Type); -registerCoreDispatchCommand(H.ReplacePreviousChar); -registerCoreDispatchCommand(H.CompositionStart); -registerCoreDispatchCommand(H.CompositionEnd); -registerCoreDispatchCommand(H.Paste); -registerCoreDispatchCommand(H.Cut); diff --git a/src/vs/editor/common/config/defaultConfig.ts b/src/vs/editor/common/config/defaultConfig.ts deleted file mode 100644 index 7bd8bc3ea12ff..0000000000000 --- a/src/vs/editor/common/config/defaultConfig.ts +++ /dev/null @@ -1,129 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import * as nls from 'vs/nls'; -import * as platform from 'vs/base/common/platform'; -import { USUAL_WORD_SEPARATORS } from 'vs/editor/common/model/wordHelper'; -import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; - -export interface IConfiguration { - editor: IEditorOptions; -} - -export const DEFAULT_INDENTATION = { - tabSize: 4, - insertSpaces: true, - detectIndentation: true -}; -export const DEFAULT_TRIM_AUTO_WHITESPACE = true; - -const DEFAULT_WINDOWS_FONT_FAMILY = 'Consolas, \'Courier New\', monospace'; -const DEFAULT_MAC_FONT_FAMILY = 'Menlo, Monaco, \'Courier New\', monospace'; -const DEFAULT_LINUX_FONT_FAMILY = '\'Droid Sans Mono\', \'Courier New\', monospace, \'Droid Sans Fallback\''; - -/** - * Determined from empirical observations. - */ -export const GOLDEN_LINE_HEIGHT_RATIO = platform.isMacintosh ? 1.5 : 1.35; - -class ConfigClass implements IConfiguration { - - public editor: IEditorOptions; - - constructor() { - this.editor = { - experimentalScreenReader: true, - rulers: [], - wordSeparators: USUAL_WORD_SEPARATORS, - selectionClipboard: true, - ariaLabel: nls.localize('editorViewAccessibleLabel', "Editor content"), - lineNumbers: 'on', - selectOnLineNumbers: true, - lineNumbersMinChars: 5, - glyphMargin: true, - lineDecorationsWidth: 10, - revealHorizontalRightPadding: 30, - roundedSelection: true, - theme: 'vs', - readOnly: false, - scrollbar: { - verticalScrollbarSize: 14, - horizontal: 'auto', - useShadows: true, - verticalHasArrows: false, - horizontalHasArrows: false - }, - minimap: { - enabled: false, - renderCharacters: true, - maxColumn: 120 - }, - fixedOverflowWidgets: false, - overviewRulerLanes: 2, - overviewRulerBorder: true, - cursorBlinking: 'blink', - mouseWheelZoom: false, - cursorStyle: 'line', - mouseStyle: 'text', - fontLigatures: false, - disableTranslate3d: false, - disableMonospaceOptimizations: false, - hideCursorInOverviewRuler: false, - scrollBeyondLastLine: true, - automaticLayout: false, - wordWrap: 'off', - wordWrapColumn: 80, - wordWrapMinified: true, - wrappingIndent: 'same', - wordWrapBreakBeforeCharacters: '([{‘“〈《「『【〔([{「£¥$£¥++', - wordWrapBreakAfterCharacters: ' \t})]?|&,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー’”〉》」』】〕)]}」', - wordWrapBreakObtrusiveCharacters: '.', - - // Features - hover: true, - contextmenu: true, - mouseWheelScrollSensitivity: 1, - quickSuggestions: { other: true, comments: false, strings: false }, - quickSuggestionsDelay: 10, - parameterHints: true, - iconsInSuggestions: true, - autoClosingBrackets: true, - formatOnType: false, - formatOnPaste: false, - suggestOnTriggerCharacters: true, - acceptSuggestionOnEnter: true, - acceptSuggestionOnCommitCharacter: true, - snippetSuggestions: 'bottom', - emptySelectionClipboard: true, - wordBasedSuggestions: true, - suggestFontSize: 0, - suggestLineHeight: 0, - selectionHighlight: true, - occurrencesHighlight: true, - codeLens: true, - referenceInfos: true, - folding: true, - renderWhitespace: 'none', - renderControlCharacters: false, - renderIndentGuides: false, - renderLineHighlight: 'line', - useTabStops: true, - matchBrackets: true, - dragAndDrop: false, - - fontFamily: ( - platform.isMacintosh ? DEFAULT_MAC_FONT_FAMILY : (platform.isLinux ? DEFAULT_LINUX_FONT_FAMILY : DEFAULT_WINDOWS_FONT_FAMILY) - ), - fontWeight: 'normal', - fontSize: ( - platform.isMacintosh ? 12 : 14 - ), - lineHeight: 0 - }; - } -} - -export const DefaultConfig: IConfiguration = new ConfigClass(); diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index e8bee72579b05..5c90ebb782f30 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -4,9 +4,12 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; +import * as nls from 'vs/nls'; +import * as platform from 'vs/base/common/platform'; import { ScrollbarVisibility } from 'vs/base/common/scrollable'; import { FontInfo } from 'vs/editor/common/config/fontInfo'; -import * as objects from 'vs/base/common/objects'; +import { Constants } from 'vs/editor/common/core/uint'; +import { USUAL_WORD_SEPARATORS } from 'vs/editor/common/model/wordHelper'; /** * Configuration options for editor scrollbars @@ -71,6 +74,20 @@ export interface IEditorScrollbarOptions { horizontalSliderSize?: number; } +/** + * Configuration options for editor find widget + */ +export interface IEditorFindOptions { + /** + * Controls if we seed search string in the Find Widget with editor selection. + */ + seedSearchStringFromSelection?: boolean; + /** + * Controls if Find in Selection flag is turned on when multiple lines of text are selected in the editor. + */ + autoFindInSelection: boolean; +} + /** * Configuration options for editor minimap */ @@ -80,6 +97,11 @@ export interface IEditorMinimapOptions { * Defaults to false. */ enabled?: boolean; + /** + * Control the rendering of the minimap slider. + * Defaults to 'mouseover'. + */ + showSlider?: 'always' | 'mouseover'; /** * Render the actual text on a line (as opposed to color blocks). * Defaults to true. @@ -92,8 +114,6 @@ export interface IEditorMinimapOptions { maxColumn?: number; } -export type LineNumbersOption = 'on' | 'off' | 'relative' | ((lineNumber: number) => string); - /** * Configuration options for the editor. */ @@ -103,11 +123,6 @@ export interface IEditorOptions { * @internal */ inDiffEditor?: boolean; - /** - * Enable experimental screen reader support. - * Defaults to `true`. - */ - experimentalScreenReader?: boolean; /** * The aria label for the editor's textarea (when it is focused). */ @@ -134,7 +149,7 @@ export interface IEditorOptions { * Otherwise, line numbers will not be rendered. * Defaults to true. */ - lineNumbers?: LineNumbersOption; + lineNumbers?: 'on' | 'off' | 'relative' | ((lineNumber: number) => string); /** * Should the corresponding line be selected when clicking on the line number? * Defaults to true. @@ -169,11 +184,9 @@ export interface IEditorOptions { */ roundedSelection?: boolean; /** - * Theme to be used for rendering. - * The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'. - * You can create custom themes via `monaco.editor.defineTheme`. + * Class name to be added to the editor. */ - theme?: string; + extraEditorClassName?: string; /** * Should the editor be read only. * Defaults to false. @@ -187,6 +200,10 @@ export interface IEditorOptions { * Control the behavior and rendering of the minimap. */ minimap?: IEditorMinimapOptions; + /** + * Control the behavior of the find widget. + */ + find?: IEditorFindOptions; /** * Display overflow widgets as `fixed`. * Defaults to `false`. @@ -229,10 +246,11 @@ export interface IEditorOptions { */ fontLigatures?: boolean; /** - * Disable the use of `translate3d`. + * Disable the use of `will-change` for the editor margin and lines layers. + * The usage of `will-change` acts as a hint for browsers to create an extra layer. * Defaults to false. */ - disableTranslate3d?: boolean; + disableLayerHinting?: boolean; /** * Disable the optimizations for monospace fonts. * Defaults to false. @@ -309,6 +327,11 @@ export interface IEditorOptions { * Defaults to true. */ hover?: boolean; + /** + * Enable detecting links and making them clickable. + * Defaults to true. + */ + links?: boolean; /** * Enable custom contextmenu. * Defaults to true. @@ -319,6 +342,16 @@ export interface IEditorOptions { * Defaults to 1. */ mouseWheelScrollSensitivity?: number; + /** + * The modifier to be used to add multiple cursors with the mouse. + * Defaults to 'alt' + */ + multiCursorModifier?: 'ctrlCmd' | 'alt'; + /** + * Configure the editor's accessibility support. + * Defaults to 'auto'. It is best to leave this to 'auto'. + */ + accessibilitySupport?: 'auto' | 'off' | 'on'; /** * Enable quick suggestions (shadow suggestions) * Defaults to true. @@ -343,6 +376,11 @@ export interface IEditorOptions { * Defaults to true. */ autoClosingBrackets?: boolean; + /** + * Enable auto indentation adjustment. + * Defaults to false. + */ + autoIndent?: boolean; /** * Enable format on type. * Defaults to false. @@ -365,9 +403,9 @@ export interface IEditorOptions { suggestOnTriggerCharacters?: boolean; /** * Accept suggestions on ENTER. - * Defaults to true. + * Defaults to 'on'. */ - acceptSuggestionOnEnter?: boolean; + acceptSuggestionOnEnter?: 'on' | 'smart' | 'off'; /** * Accept suggestions on provider defined characters. * Defaults to true. @@ -420,6 +458,11 @@ export interface IEditorOptions { * Defaults to true in vscode and to false in monaco-editor. */ folding?: boolean; + /** + * Controls whether the fold actions in the gutter stay always visible or hide unless the mouse is over the gutter. + * Defaults to 'mouseover'. + */ + showFoldingControls?: 'always' | 'mouseover'; /** * Enable highlighting of matching brackets. * Defaults to true. @@ -465,6 +508,10 @@ export interface IEditorOptions { * The line height */ lineHeight?: number; + /** + * The letter spacing + */ + letterSpacing?: number; } /** @@ -553,6 +600,24 @@ export enum TextEditorCursorBlinkingStyle { */ Solid = 5 } +/** + * @internal + */ +export function blinkingStyleToString(blinkingStyle: TextEditorCursorBlinkingStyle): string { + if (blinkingStyle === TextEditorCursorBlinkingStyle.Blink) { + return 'blink'; + } else if (blinkingStyle === TextEditorCursorBlinkingStyle.Expand) { + return 'expand'; + } else if (blinkingStyle === TextEditorCursorBlinkingStyle.Phase) { + return 'phase'; + } else if (blinkingStyle === TextEditorCursorBlinkingStyle.Smooth) { + return 'smooth'; + } else if (blinkingStyle === TextEditorCursorBlinkingStyle.Solid) { + return 'solid'; + } else { + throw new Error('blinkingStyleToString: Unknown blinkingStyle'); + } +} /** * The style in which the editor's cursor should be rendered. @@ -605,9 +670,27 @@ export function cursorStyleToString(cursorStyle: TextEditorCursorStyle): string } } -export class InternalEditorScrollbarOptions { - readonly _internalEditorScrollbarOptionsBrand: void; +function _cursorStyleFromString(cursorStyle: string, defaultValue: TextEditorCursorStyle): TextEditorCursorStyle { + if (typeof cursorStyle !== 'string') { + return defaultValue; + } + if (cursorStyle === 'line') { + return TextEditorCursorStyle.Line; + } else if (cursorStyle === 'block') { + return TextEditorCursorStyle.Block; + } else if (cursorStyle === 'underline') { + return TextEditorCursorStyle.Underline; + } else if (cursorStyle === 'line-thin') { + return TextEditorCursorStyle.LineThin; + } else if (cursorStyle === 'block-outline') { + return TextEditorCursorStyle.BlockOutline; + } else if (cursorStyle === 'underline-thin') { + return TextEditorCursorStyle.UnderlineThin; + } + return TextEditorCursorStyle.Line; +} +export interface InternalEditorScrollbarOptions { readonly arrowSize: number; readonly vertical: ScrollbarVisibility; readonly horizontal: ScrollbarVisibility; @@ -620,108 +703,21 @@ export class InternalEditorScrollbarOptions { readonly verticalScrollbarSize: number; readonly verticalSliderSize: number; readonly mouseWheelScrollSensitivity: number; - - /** - * @internal - */ - constructor(source: { - arrowSize: number; - vertical: ScrollbarVisibility; - horizontal: ScrollbarVisibility; - useShadows: boolean; - verticalHasArrows: boolean; - horizontalHasArrows: boolean; - handleMouseWheel: boolean; - horizontalScrollbarSize: number; - horizontalSliderSize: number; - verticalScrollbarSize: number; - verticalSliderSize: number; - mouseWheelScrollSensitivity: number; - }) { - this.arrowSize = source.arrowSize | 0; - this.vertical = source.vertical | 0; - this.horizontal = source.horizontal | 0; - this.useShadows = Boolean(source.useShadows); - this.verticalHasArrows = Boolean(source.verticalHasArrows); - this.horizontalHasArrows = Boolean(source.horizontalHasArrows); - this.handleMouseWheel = Boolean(source.handleMouseWheel); - this.horizontalScrollbarSize = source.horizontalScrollbarSize | 0; - this.horizontalSliderSize = source.horizontalSliderSize | 0; - this.verticalScrollbarSize = source.verticalScrollbarSize | 0; - this.verticalSliderSize = source.verticalSliderSize | 0; - this.mouseWheelScrollSensitivity = Number(source.mouseWheelScrollSensitivity); - } - - /** - * @internal - */ - public equals(other: InternalEditorScrollbarOptions): boolean { - return ( - this.arrowSize === other.arrowSize - && this.vertical === other.vertical - && this.horizontal === other.horizontal - && this.useShadows === other.useShadows - && this.verticalHasArrows === other.verticalHasArrows - && this.horizontalHasArrows === other.horizontalHasArrows - && this.handleMouseWheel === other.handleMouseWheel - && this.horizontalScrollbarSize === other.horizontalScrollbarSize - && this.horizontalSliderSize === other.horizontalSliderSize - && this.verticalScrollbarSize === other.verticalScrollbarSize - && this.verticalSliderSize === other.verticalSliderSize - && this.mouseWheelScrollSensitivity === other.mouseWheelScrollSensitivity - ); - } - - /** - * @internal - */ - public clone(): InternalEditorScrollbarOptions { - return new InternalEditorScrollbarOptions(this); - } } -export class InternalEditorMinimapOptions { - readonly _internalEditorMinimapOptionsBrand: void; - +export interface InternalEditorMinimapOptions { readonly enabled: boolean; + readonly showSlider: 'always' | 'mouseover'; readonly renderCharacters: boolean; readonly maxColumn: number; - - /** - * @internal - */ - constructor(source: { - enabled: boolean; - renderCharacters: boolean; - maxColumn: number; - }) { - this.enabled = Boolean(source.enabled); - this.renderCharacters = Boolean(source.renderCharacters); - this.maxColumn = source.maxColumn | 0; - } - - /** - * @internal - */ - public equals(other: InternalEditorMinimapOptions): boolean { - return ( - this.enabled === other.enabled - && this.renderCharacters === other.renderCharacters - && this.maxColumn === other.maxColumn - ); - } - - /** - * @internal - */ - public clone(): InternalEditorMinimapOptions { - return new InternalEditorMinimapOptions(this); - } } -export class EditorWrappingInfo { - readonly _editorWrappingInfoBrand: void; +export interface InternalEditorFindOptions { + readonly seedSearchStringFromSelection: boolean; + readonly autoFindInSelection: boolean; +} +export interface EditorWrappingInfo { readonly inDiffEditor: boolean; readonly isDominatedByLongLines: boolean; readonly isWordWrapMinified: boolean; @@ -731,64 +727,11 @@ export class EditorWrappingInfo { readonly wordWrapBreakBeforeCharacters: string; readonly wordWrapBreakAfterCharacters: string; readonly wordWrapBreakObtrusiveCharacters: string; - - /** - * @internal - */ - constructor(source: { - inDiffEditor: boolean; - isDominatedByLongLines: boolean; - isWordWrapMinified: boolean; - isViewportWrapping: boolean; - wrappingColumn: number; - wrappingIndent: WrappingIndent; - wordWrapBreakBeforeCharacters: string; - wordWrapBreakAfterCharacters: string; - wordWrapBreakObtrusiveCharacters: string; - }) { - this.inDiffEditor = Boolean(source.inDiffEditor); - this.isDominatedByLongLines = Boolean(source.isDominatedByLongLines); - this.isWordWrapMinified = Boolean(source.isWordWrapMinified); - this.isViewportWrapping = Boolean(source.isViewportWrapping); - this.wrappingColumn = source.wrappingColumn | 0; - this.wrappingIndent = source.wrappingIndent | 0; - this.wordWrapBreakBeforeCharacters = String(source.wordWrapBreakBeforeCharacters); - this.wordWrapBreakAfterCharacters = String(source.wordWrapBreakAfterCharacters); - this.wordWrapBreakObtrusiveCharacters = String(source.wordWrapBreakObtrusiveCharacters); - } - - /** - * @internal - */ - public equals(other: EditorWrappingInfo): boolean { - return ( - this.inDiffEditor === other.inDiffEditor - && this.isDominatedByLongLines === other.isDominatedByLongLines - && this.isWordWrapMinified === other.isWordWrapMinified - && this.isViewportWrapping === other.isViewportWrapping - && this.wrappingColumn === other.wrappingColumn - && this.wrappingIndent === other.wrappingIndent - && this.wordWrapBreakBeforeCharacters === other.wordWrapBreakBeforeCharacters - && this.wordWrapBreakAfterCharacters === other.wordWrapBreakAfterCharacters - && this.wordWrapBreakObtrusiveCharacters === other.wordWrapBreakObtrusiveCharacters - ); - } - - /** - * @internal - */ - public clone(): EditorWrappingInfo { - return new EditorWrappingInfo(this); - } } -export class InternalEditorViewOptions { - readonly _internalEditorViewOptionsBrand: void; - - readonly theme: string; - readonly canUseTranslate3d: boolean; +export interface InternalEditorViewOptions { + readonly extraEditorClassName: string; readonly disableMonospaceOptimizations: boolean; - readonly experimentalScreenReader: boolean; readonly rulers: number[]; readonly ariaLabel: string; readonly renderLineNumbers: boolean; @@ -805,7 +748,6 @@ export class InternalEditorViewOptions { readonly cursorStyle: TextEditorCursorStyle; readonly hideCursorInOverviewRuler: boolean; readonly scrollBeyondLastLine: boolean; - readonly editorClassName: string; readonly stopRenderingLineAfter: number; readonly renderWhitespace: 'none' | 'boundary' | 'all'; readonly renderControlCharacters: boolean; @@ -815,189 +757,12 @@ export class InternalEditorViewOptions { readonly scrollbar: InternalEditorScrollbarOptions; readonly minimap: InternalEditorMinimapOptions; readonly fixedOverflowWidgets: boolean; - - /** - * @internal - */ - constructor(source: { - theme: string; - canUseTranslate3d: boolean; - disableMonospaceOptimizations: boolean; - experimentalScreenReader: boolean; - rulers: number[]; - ariaLabel: string; - renderLineNumbers: boolean; - renderCustomLineNumbers: (lineNumber: number) => string; - renderRelativeLineNumbers: boolean; - selectOnLineNumbers: boolean; - glyphMargin: boolean; - revealHorizontalRightPadding: number; - roundedSelection: boolean; - overviewRulerLanes: number; - overviewRulerBorder: boolean; - cursorBlinking: TextEditorCursorBlinkingStyle; - mouseWheelZoom: boolean; - cursorStyle: TextEditorCursorStyle; - hideCursorInOverviewRuler: boolean; - scrollBeyondLastLine: boolean; - editorClassName: string; - stopRenderingLineAfter: number; - renderWhitespace: 'none' | 'boundary' | 'all'; - renderControlCharacters: boolean; - fontLigatures: boolean; - renderIndentGuides: boolean; - renderLineHighlight: 'none' | 'gutter' | 'line' | 'all'; - scrollbar: InternalEditorScrollbarOptions; - minimap: InternalEditorMinimapOptions; - fixedOverflowWidgets: boolean; - }) { - this.theme = String(source.theme); - this.canUseTranslate3d = Boolean(source.canUseTranslate3d); - this.disableMonospaceOptimizations = Boolean(source.disableMonospaceOptimizations); - this.experimentalScreenReader = Boolean(source.experimentalScreenReader); - this.rulers = InternalEditorViewOptions._toSortedIntegerArray(source.rulers); - this.ariaLabel = String(source.ariaLabel); - this.renderLineNumbers = Boolean(source.renderLineNumbers); - this.renderCustomLineNumbers = source.renderCustomLineNumbers; - this.renderRelativeLineNumbers = Boolean(source.renderRelativeLineNumbers); - this.selectOnLineNumbers = Boolean(source.selectOnLineNumbers); - this.glyphMargin = Boolean(source.glyphMargin); - this.revealHorizontalRightPadding = source.revealHorizontalRightPadding | 0; - this.roundedSelection = Boolean(source.roundedSelection); - this.overviewRulerLanes = source.overviewRulerLanes | 0; - this.overviewRulerBorder = Boolean(source.overviewRulerBorder); - this.cursorBlinking = source.cursorBlinking | 0; - this.mouseWheelZoom = Boolean(source.mouseWheelZoom); - this.cursorStyle = source.cursorStyle | 0; - this.hideCursorInOverviewRuler = Boolean(source.hideCursorInOverviewRuler); - this.scrollBeyondLastLine = Boolean(source.scrollBeyondLastLine); - this.editorClassName = String(source.editorClassName); - this.stopRenderingLineAfter = source.stopRenderingLineAfter | 0; - this.renderWhitespace = source.renderWhitespace; - this.renderControlCharacters = Boolean(source.renderControlCharacters); - this.fontLigatures = Boolean(source.fontLigatures); - this.renderIndentGuides = Boolean(source.renderIndentGuides); - this.renderLineHighlight = source.renderLineHighlight; - this.scrollbar = source.scrollbar.clone(); - this.minimap = source.minimap.clone(); - this.fixedOverflowWidgets = Boolean(source.fixedOverflowWidgets); - } - - private static _toSortedIntegerArray(source: any): number[] { - if (!Array.isArray(source)) { - return []; - } - let arrSource = source; - let result = arrSource.map(el => { - let r = parseInt(el, 10); - if (isNaN(r)) { - return 0; - } - return r; - }); - result.sort(); - return result; - } - - private static _numberArraysEqual(a: number[], b: number[]): boolean { - if (a.length !== b.length) { - return false; - } - for (let i = 0; i < a.length; i++) { - if (a[i] !== b[i]) { - return false; - } - } - return true; - } - - /** - * @internal - */ - public equals(other: InternalEditorViewOptions): boolean { - return ( - this.theme === other.theme - && this.canUseTranslate3d === other.canUseTranslate3d - && this.disableMonospaceOptimizations === other.disableMonospaceOptimizations - && this.experimentalScreenReader === other.experimentalScreenReader - && InternalEditorViewOptions._numberArraysEqual(this.rulers, other.rulers) - && this.ariaLabel === other.ariaLabel - && this.renderLineNumbers === other.renderLineNumbers - && this.renderCustomLineNumbers === other.renderCustomLineNumbers - && this.renderRelativeLineNumbers === other.renderRelativeLineNumbers - && this.selectOnLineNumbers === other.selectOnLineNumbers - && this.glyphMargin === other.glyphMargin - && this.revealHorizontalRightPadding === other.revealHorizontalRightPadding - && this.roundedSelection === other.roundedSelection - && this.overviewRulerLanes === other.overviewRulerLanes - && this.overviewRulerBorder === other.overviewRulerBorder - && this.cursorBlinking === other.cursorBlinking - && this.mouseWheelZoom === other.mouseWheelZoom - && this.cursorStyle === other.cursorStyle - && this.hideCursorInOverviewRuler === other.hideCursorInOverviewRuler - && this.scrollBeyondLastLine === other.scrollBeyondLastLine - && this.editorClassName === other.editorClassName - && this.stopRenderingLineAfter === other.stopRenderingLineAfter - && this.renderWhitespace === other.renderWhitespace - && this.renderControlCharacters === other.renderControlCharacters - && this.fontLigatures === other.fontLigatures - && this.renderIndentGuides === other.renderIndentGuides - && this.renderLineHighlight === other.renderLineHighlight - && this.scrollbar.equals(other.scrollbar) - && this.minimap.equals(other.minimap) - && this.fixedOverflowWidgets === other.fixedOverflowWidgets - ); - } - - /** - * @internal - */ - public createChangeEvent(newOpts: InternalEditorViewOptions): IViewConfigurationChangedEvent { - return { - theme: this.theme !== newOpts.theme, - canUseTranslate3d: this.canUseTranslate3d !== newOpts.canUseTranslate3d, - disableMonospaceOptimizations: this.disableMonospaceOptimizations !== newOpts.disableMonospaceOptimizations, - experimentalScreenReader: this.experimentalScreenReader !== newOpts.experimentalScreenReader, - rulers: (!InternalEditorViewOptions._numberArraysEqual(this.rulers, newOpts.rulers)), - ariaLabel: this.ariaLabel !== newOpts.ariaLabel, - renderLineNumbers: this.renderLineNumbers !== newOpts.renderLineNumbers, - renderCustomLineNumbers: this.renderCustomLineNumbers !== newOpts.renderCustomLineNumbers, - renderRelativeLineNumbers: this.renderRelativeLineNumbers !== newOpts.renderRelativeLineNumbers, - selectOnLineNumbers: this.selectOnLineNumbers !== newOpts.selectOnLineNumbers, - glyphMargin: this.glyphMargin !== newOpts.glyphMargin, - revealHorizontalRightPadding: this.revealHorizontalRightPadding !== newOpts.revealHorizontalRightPadding, - roundedSelection: this.roundedSelection !== newOpts.roundedSelection, - overviewRulerLanes: this.overviewRulerLanes !== newOpts.overviewRulerLanes, - overviewRulerBorder: this.overviewRulerBorder !== newOpts.overviewRulerBorder, - cursorBlinking: this.cursorBlinking !== newOpts.cursorBlinking, - mouseWheelZoom: this.mouseWheelZoom !== newOpts.mouseWheelZoom, - cursorStyle: this.cursorStyle !== newOpts.cursorStyle, - hideCursorInOverviewRuler: this.hideCursorInOverviewRuler !== newOpts.hideCursorInOverviewRuler, - scrollBeyondLastLine: this.scrollBeyondLastLine !== newOpts.scrollBeyondLastLine, - editorClassName: this.editorClassName !== newOpts.editorClassName, - stopRenderingLineAfter: this.stopRenderingLineAfter !== newOpts.stopRenderingLineAfter, - renderWhitespace: this.renderWhitespace !== newOpts.renderWhitespace, - renderControlCharacters: this.renderControlCharacters !== newOpts.renderControlCharacters, - fontLigatures: this.fontLigatures !== newOpts.fontLigatures, - renderIndentGuides: this.renderIndentGuides !== newOpts.renderIndentGuides, - renderLineHighlight: this.renderLineHighlight !== newOpts.renderLineHighlight, - scrollbar: (!this.scrollbar.equals(newOpts.scrollbar)), - minimap: (!this.minimap.equals(newOpts.minimap)), - fixedOverflowWidgets: this.fixedOverflowWidgets !== newOpts.fixedOverflowWidgets - }; - } - - /** - * @internal - */ - public clone(): InternalEditorViewOptions { - return new InternalEditorViewOptions(this); - } } -export class EditorContribOptions { +export interface EditorContribOptions { readonly selectionClipboard: boolean; readonly hover: boolean; + readonly links: boolean; readonly contextmenu: boolean; readonly quickSuggestions: boolean | { other: boolean, comments: boolean, strings: boolean }; readonly quickSuggestionsDelay: number; @@ -1006,10 +771,9 @@ export class EditorContribOptions { readonly formatOnType: boolean; readonly formatOnPaste: boolean; readonly suggestOnTriggerCharacters: boolean; - readonly acceptSuggestionOnEnter: boolean; + readonly acceptSuggestionOnEnter: 'on' | 'smart' | 'off'; readonly acceptSuggestionOnCommitCharacter: boolean; readonly snippetSuggestions: 'top' | 'bottom' | 'inline' | 'none'; - readonly emptySelectionClipboard: boolean; readonly wordBasedSuggestions: boolean; readonly suggestFontSize: number; readonly suggestLineHeight: number; @@ -1017,95 +781,42 @@ export class EditorContribOptions { readonly occurrencesHighlight: boolean; readonly codeLens: boolean; readonly folding: boolean; + readonly showFoldingControls: 'always' | 'mouseover'; readonly matchBrackets: boolean; + readonly find: InternalEditorFindOptions; +} - /** - * @internal - */ - constructor(source: { - selectionClipboard: boolean; - hover: boolean; - contextmenu: boolean; - quickSuggestions: boolean | { other: boolean, comments: boolean, strings: boolean }; - quickSuggestionsDelay: number; - parameterHints: boolean; - iconsInSuggestions: boolean; - formatOnType: boolean; - formatOnPaste: boolean; - suggestOnTriggerCharacters: boolean; - acceptSuggestionOnEnter: boolean; - acceptSuggestionOnCommitCharacter: boolean; - snippetSuggestions: 'top' | 'bottom' | 'inline' | 'none'; - emptySelectionClipboard: boolean; - wordBasedSuggestions: boolean; - suggestFontSize: number; - suggestLineHeight: number; - selectionHighlight: boolean; - occurrencesHighlight: boolean; - codeLens: boolean; - folding: boolean; - matchBrackets: boolean; - }) { - this.selectionClipboard = Boolean(source.selectionClipboard); - this.hover = Boolean(source.hover); - this.contextmenu = Boolean(source.contextmenu); - this.quickSuggestions = source.quickSuggestions; - this.quickSuggestionsDelay = source.quickSuggestionsDelay || 0; - this.parameterHints = Boolean(source.parameterHints); - this.iconsInSuggestions = Boolean(source.iconsInSuggestions); - this.formatOnType = Boolean(source.formatOnType); - this.formatOnPaste = Boolean(source.formatOnPaste); - this.suggestOnTriggerCharacters = Boolean(source.suggestOnTriggerCharacters); - this.acceptSuggestionOnEnter = Boolean(source.acceptSuggestionOnEnter); - this.acceptSuggestionOnCommitCharacter = Boolean(source.acceptSuggestionOnCommitCharacter); - this.snippetSuggestions = source.snippetSuggestions; - this.emptySelectionClipboard = source.emptySelectionClipboard; - this.wordBasedSuggestions = source.wordBasedSuggestions; - this.suggestFontSize = source.suggestFontSize; - this.suggestLineHeight = source.suggestLineHeight; - this.selectionHighlight = Boolean(source.selectionHighlight); - this.occurrencesHighlight = Boolean(source.occurrencesHighlight); - this.codeLens = Boolean(source.codeLens); - this.folding = Boolean(source.folding); - this.matchBrackets = Boolean(source.matchBrackets); - } - - /** - * @internal - */ - public equals(other: EditorContribOptions): boolean { - return ( - this.selectionClipboard === other.selectionClipboard - && this.hover === other.hover - && this.contextmenu === other.contextmenu - && objects.equals(this.quickSuggestions, other.quickSuggestions) - && this.quickSuggestionsDelay === other.quickSuggestionsDelay - && this.parameterHints === other.parameterHints - && this.iconsInSuggestions === other.iconsInSuggestions - && this.formatOnType === other.formatOnType - && this.formatOnPaste === other.formatOnPaste - && this.suggestOnTriggerCharacters === other.suggestOnTriggerCharacters - && this.acceptSuggestionOnEnter === other.acceptSuggestionOnEnter - && this.acceptSuggestionOnCommitCharacter === other.acceptSuggestionOnCommitCharacter - && this.snippetSuggestions === other.snippetSuggestions - && this.emptySelectionClipboard === other.emptySelectionClipboard - && objects.equals(this.wordBasedSuggestions, other.wordBasedSuggestions) - && this.suggestFontSize === other.suggestFontSize - && this.suggestLineHeight === other.suggestLineHeight - && this.selectionHighlight === other.selectionHighlight - && this.occurrencesHighlight === other.occurrencesHighlight - && this.codeLens === other.codeLens - && this.folding === other.folding - && this.matchBrackets === other.matchBrackets - ); - } +/** + * Validated configuration options for the editor. + * This is a 1 to 1 validated/parsed version of IEditorOptions merged on top of the defaults. + * @internal + */ +export interface IValidatedEditorOptions { + readonly inDiffEditor: boolean; + readonly wordSeparators: string; + readonly lineNumbersMinChars: number; + readonly lineDecorationsWidth: number | string; + readonly readOnly: boolean; + readonly mouseStyle: 'text' | 'default' | 'copy'; + readonly disableLayerHinting: boolean; + readonly automaticLayout: boolean; + readonly wordWrap: 'off' | 'on' | 'wordWrapColumn' | 'bounded'; + readonly wordWrapColumn: number; + readonly wordWrapMinified: boolean; + readonly wrappingIndent: WrappingIndent; + readonly wordWrapBreakBeforeCharacters: string; + readonly wordWrapBreakAfterCharacters: string; + readonly wordWrapBreakObtrusiveCharacters: string; + readonly autoClosingBrackets: boolean; + readonly autoIndent: boolean; + readonly dragAndDrop: boolean; + readonly emptySelectionClipboard: boolean; + readonly useTabStops: boolean; + readonly multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; + readonly accessibilitySupport: 'auto' | 'off' | 'on'; - /** - * @internal - */ - public clone(): EditorContribOptions { - return new EditorContribOptions(this); - } + readonly viewInfo: InternalEditorViewOptions; + readonly contribInfo: EditorContribOptions; } /** @@ -1114,15 +825,26 @@ export class EditorContribOptions { export class InternalEditorOptions { readonly _internalEditorOptionsBrand: void; - readonly lineHeight: number; // todo: move to fontInfo - + readonly canUseLayerHinting: boolean; + readonly pixelRatio: number; + readonly editorClassName: string; + readonly lineHeight: number; readonly readOnly: boolean; + /** + * @internal + */ + readonly accessibilitySupport: platform.AccessibilitySupport; + readonly multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; + // ---- cursor options readonly wordSeparators: string; readonly autoClosingBrackets: boolean; + readonly autoIndent: boolean; readonly useTabStops: boolean; readonly tabFocusMode: boolean; readonly dragAndDrop: boolean; + readonly emptySelectionClipboard: boolean; + // ---- grouped options readonly layoutInfo: EditorLayoutInfo; readonly fontInfo: FontInfo; @@ -1134,31 +856,45 @@ export class InternalEditorOptions { * @internal */ constructor(source: { + canUseLayerHinting: boolean; + pixelRatio: number; + editorClassName: string; lineHeight: number; readOnly: boolean; + accessibilitySupport: platform.AccessibilitySupport; + multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; wordSeparators: string; autoClosingBrackets: boolean; + autoIndent: boolean; useTabStops: boolean; tabFocusMode: boolean; dragAndDrop: boolean; + emptySelectionClipboard: boolean; layoutInfo: EditorLayoutInfo; fontInfo: FontInfo; viewInfo: InternalEditorViewOptions; wrappingInfo: EditorWrappingInfo; contribInfo: EditorContribOptions; }) { + this.canUseLayerHinting = source.canUseLayerHinting; + this.pixelRatio = source.pixelRatio; + this.editorClassName = source.editorClassName; this.lineHeight = source.lineHeight | 0; - this.readOnly = Boolean(source.readOnly); - this.wordSeparators = String(source.wordSeparators); - this.autoClosingBrackets = Boolean(source.autoClosingBrackets); - this.useTabStops = Boolean(source.useTabStops); - this.tabFocusMode = Boolean(source.tabFocusMode); - this.dragAndDrop = Boolean(source.dragAndDrop); - this.layoutInfo = source.layoutInfo.clone(); - this.fontInfo = source.fontInfo.clone(); - this.viewInfo = source.viewInfo.clone(); - this.wrappingInfo = source.wrappingInfo.clone(); - this.contribInfo = source.contribInfo.clone(); + this.readOnly = source.readOnly; + this.accessibilitySupport = source.accessibilitySupport; + this.multiCursorModifier = source.multiCursorModifier; + this.wordSeparators = source.wordSeparators; + this.autoClosingBrackets = source.autoClosingBrackets; + this.autoIndent = source.autoIndent; + this.useTabStops = source.useTabStops; + this.tabFocusMode = source.tabFocusMode; + this.dragAndDrop = source.dragAndDrop; + this.emptySelectionClipboard = source.emptySelectionClipboard; + this.layoutInfo = source.layoutInfo; + this.fontInfo = source.fontInfo; + this.viewInfo = source.viewInfo; + this.wrappingInfo = source.wrappingInfo; + this.contribInfo = source.contribInfo; } /** @@ -1166,18 +902,25 @@ export class InternalEditorOptions { */ public equals(other: InternalEditorOptions): boolean { return ( - this.lineHeight === other.lineHeight + this.canUseLayerHinting === other.canUseLayerHinting + && this.pixelRatio === other.pixelRatio + && this.editorClassName === other.editorClassName + && this.lineHeight === other.lineHeight && this.readOnly === other.readOnly + && this.accessibilitySupport === other.accessibilitySupport + && this.multiCursorModifier === other.multiCursorModifier && this.wordSeparators === other.wordSeparators && this.autoClosingBrackets === other.autoClosingBrackets + && this.autoIndent === other.autoIndent && this.useTabStops === other.useTabStops && this.tabFocusMode === other.tabFocusMode && this.dragAndDrop === other.dragAndDrop - && this.layoutInfo.equals(other.layoutInfo) + && this.emptySelectionClipboard === other.emptySelectionClipboard + && InternalEditorOptions._equalsLayoutInfo(this.layoutInfo, other.layoutInfo) && this.fontInfo.equals(other.fontInfo) - && this.viewInfo.equals(other.viewInfo) - && this.wrappingInfo.equals(other.wrappingInfo) - && this.contribInfo.equals(other.contribInfo) + && InternalEditorOptions._equalsViewOptions(this.viewInfo, other.viewInfo) + && InternalEditorOptions._equalsWrappingInfo(this.wrappingInfo, other.wrappingInfo) + && InternalEditorOptions._equalsContribOptions(this.contribInfo, other.contribInfo) ); } @@ -1186,92 +929,251 @@ export class InternalEditorOptions { */ public createChangeEvent(newOpts: InternalEditorOptions): IConfigurationChangedEvent { return { + canUseLayerHinting: (this.canUseLayerHinting !== newOpts.canUseLayerHinting), + pixelRatio: (this.pixelRatio !== newOpts.pixelRatio), + editorClassName: (this.editorClassName !== newOpts.editorClassName), lineHeight: (this.lineHeight !== newOpts.lineHeight), readOnly: (this.readOnly !== newOpts.readOnly), + accessibilitySupport: (this.accessibilitySupport !== newOpts.accessibilitySupport), + multiCursorModifier: (this.multiCursorModifier !== newOpts.multiCursorModifier), wordSeparators: (this.wordSeparators !== newOpts.wordSeparators), autoClosingBrackets: (this.autoClosingBrackets !== newOpts.autoClosingBrackets), + autoIndent: (this.autoIndent !== newOpts.autoIndent), useTabStops: (this.useTabStops !== newOpts.useTabStops), tabFocusMode: (this.tabFocusMode !== newOpts.tabFocusMode), dragAndDrop: (this.dragAndDrop !== newOpts.dragAndDrop), - layoutInfo: (!this.layoutInfo.equals(newOpts.layoutInfo)), + emptySelectionClipboard: (this.emptySelectionClipboard !== newOpts.emptySelectionClipboard), + layoutInfo: (!InternalEditorOptions._equalsLayoutInfo(this.layoutInfo, newOpts.layoutInfo)), fontInfo: (!this.fontInfo.equals(newOpts.fontInfo)), - viewInfo: this.viewInfo.createChangeEvent(newOpts.viewInfo), - wrappingInfo: (!this.wrappingInfo.equals(newOpts.wrappingInfo)), - contribInfo: (!this.contribInfo.equals(newOpts.contribInfo)), + viewInfo: (!InternalEditorOptions._equalsViewOptions(this.viewInfo, newOpts.viewInfo)), + wrappingInfo: (!InternalEditorOptions._equalsWrappingInfo(this.wrappingInfo, newOpts.wrappingInfo)), + contribInfo: (!InternalEditorOptions._equalsContribOptions(this.contribInfo, newOpts.contribInfo)) }; } /** * @internal */ - public clone(): InternalEditorOptions { - return new InternalEditorOptions(this); + private static _equalsLayoutInfo(a: EditorLayoutInfo, b: EditorLayoutInfo): boolean { + return ( + a.width === b.width + && a.height === b.height + && a.glyphMarginLeft === b.glyphMarginLeft + && a.glyphMarginWidth === b.glyphMarginWidth + && a.glyphMarginHeight === b.glyphMarginHeight + && a.lineNumbersLeft === b.lineNumbersLeft + && a.lineNumbersWidth === b.lineNumbersWidth + && a.lineNumbersHeight === b.lineNumbersHeight + && a.decorationsLeft === b.decorationsLeft + && a.decorationsWidth === b.decorationsWidth + && a.decorationsHeight === b.decorationsHeight + && a.contentLeft === b.contentLeft + && a.contentWidth === b.contentWidth + && a.contentHeight === b.contentHeight + && a.renderMinimap === b.renderMinimap + && a.minimapWidth === b.minimapWidth + && a.viewportColumn === b.viewportColumn + && a.verticalScrollbarWidth === b.verticalScrollbarWidth + && a.horizontalScrollbarHeight === b.horizontalScrollbarHeight + && this._equalsOverviewRuler(a.overviewRuler, b.overviewRuler) + ); } -} - -/** - * A description for the overview ruler position. - */ -export class OverviewRulerPosition { - readonly _overviewRulerPositionBrand: void; /** - * Width of the overview ruler + * @internal */ - readonly width: number; + private static _equalsOverviewRuler(a: OverviewRulerPosition, b: OverviewRulerPosition): boolean { + return ( + a.width === b.width + && a.height === b.height + && a.top === b.top + && a.right === b.right + ); + } + /** - * Height of the overview ruler + * @internal */ - readonly height: number; + private static _equalsViewOptions(a: InternalEditorViewOptions, b: InternalEditorViewOptions): boolean { + return ( + a.extraEditorClassName === b.extraEditorClassName + && a.disableMonospaceOptimizations === b.disableMonospaceOptimizations + && this._equalsNumberArrays(a.rulers, b.rulers) + && a.ariaLabel === b.ariaLabel + && a.renderLineNumbers === b.renderLineNumbers + && a.renderCustomLineNumbers === b.renderCustomLineNumbers + && a.renderRelativeLineNumbers === b.renderRelativeLineNumbers + && a.selectOnLineNumbers === b.selectOnLineNumbers + && a.glyphMargin === b.glyphMargin + && a.revealHorizontalRightPadding === b.revealHorizontalRightPadding + && a.roundedSelection === b.roundedSelection + && a.overviewRulerLanes === b.overviewRulerLanes + && a.overviewRulerBorder === b.overviewRulerBorder + && a.cursorBlinking === b.cursorBlinking + && a.mouseWheelZoom === b.mouseWheelZoom + && a.cursorStyle === b.cursorStyle + && a.hideCursorInOverviewRuler === b.hideCursorInOverviewRuler + && a.scrollBeyondLastLine === b.scrollBeyondLastLine + && a.stopRenderingLineAfter === b.stopRenderingLineAfter + && a.renderWhitespace === b.renderWhitespace + && a.renderControlCharacters === b.renderControlCharacters + && a.fontLigatures === b.fontLigatures + && a.renderIndentGuides === b.renderIndentGuides + && a.renderLineHighlight === b.renderLineHighlight + && this._equalsScrollbarOptions(a.scrollbar, b.scrollbar) + && this._equalsMinimapOptions(a.minimap, b.minimap) + && a.fixedOverflowWidgets === b.fixedOverflowWidgets + ); + } + /** - * Top position for the overview ruler + * @internal */ - readonly top: number; + private static _equalsScrollbarOptions(a: InternalEditorScrollbarOptions, b: InternalEditorScrollbarOptions): boolean { + return ( + a.arrowSize === b.arrowSize + && a.vertical === b.vertical + && a.horizontal === b.horizontal + && a.useShadows === b.useShadows + && a.verticalHasArrows === b.verticalHasArrows + && a.horizontalHasArrows === b.horizontalHasArrows + && a.handleMouseWheel === b.handleMouseWheel + && a.horizontalScrollbarSize === b.horizontalScrollbarSize + && a.horizontalSliderSize === b.horizontalSliderSize + && a.verticalScrollbarSize === b.verticalScrollbarSize + && a.verticalSliderSize === b.verticalSliderSize + && a.mouseWheelScrollSensitivity === b.mouseWheelScrollSensitivity + ); + } + /** - * Right position for the overview ruler + * @internal */ - readonly right: number; + private static _equalsMinimapOptions(a: InternalEditorMinimapOptions, b: InternalEditorMinimapOptions): boolean { + return ( + a.enabled === b.enabled + && a.showSlider === b.showSlider + && a.renderCharacters === b.renderCharacters + && a.maxColumn === b.maxColumn + ); + } + + private static _equalsNumberArrays(a: number[], b: number[]): boolean { + if (a.length !== b.length) { + return false; + } + for (let i = 0; i < a.length; i++) { + if (a[i] !== b[i]) { + return false; + } + } + return true; + } /** * @internal */ - constructor(source: { - width: number; - height: number; - top: number; - right: number; - }) { - this.width = source.width | 0; - this.height = source.height | 0; - this.top = source.top | 0; - this.right = source.right | 0; + + private static _equalFindOptions(a: InternalEditorFindOptions, b: InternalEditorFindOptions): boolean { + return ( + a.seedSearchStringFromSelection === b.seedSearchStringFromSelection + && a.autoFindInSelection === b.autoFindInSelection + ); } /** * @internal */ - public equals(other: OverviewRulerPosition): boolean { + private static _equalsWrappingInfo(a: EditorWrappingInfo, b: EditorWrappingInfo): boolean { return ( - this.width === other.width - && this.height === other.height - && this.top === other.top - && this.right === other.right + a.inDiffEditor === b.inDiffEditor + && a.isDominatedByLongLines === b.isDominatedByLongLines + && a.isWordWrapMinified === b.isWordWrapMinified + && a.isViewportWrapping === b.isViewportWrapping + && a.wrappingColumn === b.wrappingColumn + && a.wrappingIndent === b.wrappingIndent + && a.wordWrapBreakBeforeCharacters === b.wordWrapBreakBeforeCharacters + && a.wordWrapBreakAfterCharacters === b.wordWrapBreakAfterCharacters + && a.wordWrapBreakObtrusiveCharacters === b.wordWrapBreakObtrusiveCharacters ); } /** * @internal */ - public clone(): OverviewRulerPosition { - return new OverviewRulerPosition(this); + private static _equalsContribOptions(a: EditorContribOptions, b: EditorContribOptions): boolean { + return ( + a.selectionClipboard === b.selectionClipboard + && a.hover === b.hover + && a.links === b.links + && a.contextmenu === b.contextmenu + && InternalEditorOptions._equalsQuickSuggestions(a.quickSuggestions, b.quickSuggestions) + && a.quickSuggestionsDelay === b.quickSuggestionsDelay + && a.parameterHints === b.parameterHints + && a.iconsInSuggestions === b.iconsInSuggestions + && a.formatOnType === b.formatOnType + && a.formatOnPaste === b.formatOnPaste + && a.suggestOnTriggerCharacters === b.suggestOnTriggerCharacters + && a.acceptSuggestionOnEnter === b.acceptSuggestionOnEnter + && a.acceptSuggestionOnCommitCharacter === b.acceptSuggestionOnCommitCharacter + && a.snippetSuggestions === b.snippetSuggestions + && a.wordBasedSuggestions === b.wordBasedSuggestions + && a.suggestFontSize === b.suggestFontSize + && a.suggestLineHeight === b.suggestLineHeight + && a.selectionHighlight === b.selectionHighlight + && a.occurrencesHighlight === b.occurrencesHighlight + && a.codeLens === b.codeLens + && a.folding === b.folding + && a.showFoldingControls === b.showFoldingControls + && a.matchBrackets === b.matchBrackets + && this._equalFindOptions(a.find, b.find) + ); + } + + private static _equalsQuickSuggestions(a: boolean | { other: boolean, comments: boolean, strings: boolean }, b: boolean | { other: boolean, comments: boolean, strings: boolean }): boolean { + if (typeof a === 'boolean') { + if (typeof b !== 'boolean') { + return false; + } + return a === b; + } + if (typeof b === 'boolean') { + return false; + } + return ( + a.comments === b.comments + && a.other === b.other + && a.strings === b.strings + ); } } +/** + * A description for the overview ruler position. + */ +export interface OverviewRulerPosition { + /** + * Width of the overview ruler + */ + readonly width: number; + /** + * Height of the overview ruler + */ + readonly height: number; + /** + * Top position for the overview ruler + */ + readonly top: number; + /** + * Right position for the overview ruler + */ + readonly right: number; +} + /** * The internal layout details of the editor. */ -export class EditorLayoutInfo { - readonly _editorLayoutInfoBrand: void; +export interface EditorLayoutInfo { /** * Full editor width. @@ -1362,137 +1264,928 @@ export class EditorLayoutInfo { * The position of the overview ruler. */ readonly overviewRuler: OverviewRulerPosition; - - /** - * @internal - */ - constructor(source: { - width: number; - height: number; - glyphMarginLeft: number; - glyphMarginWidth: number; - glyphMarginHeight: number; - lineNumbersLeft: number; - lineNumbersWidth: number; - lineNumbersHeight: number; - decorationsLeft: number; - decorationsWidth: number; - decorationsHeight: number; - contentLeft: number; - contentWidth: number; - contentHeight: number; - renderMinimap: RenderMinimap; - minimapWidth: number; - viewportColumn: number; - verticalScrollbarWidth: number; - horizontalScrollbarHeight: number; - overviewRuler: OverviewRulerPosition; - }) { - this.width = source.width | 0; - this.height = source.height | 0; - this.glyphMarginLeft = source.glyphMarginLeft | 0; - this.glyphMarginWidth = source.glyphMarginWidth | 0; - this.glyphMarginHeight = source.glyphMarginHeight | 0; - this.lineNumbersLeft = source.lineNumbersLeft | 0; - this.lineNumbersWidth = source.lineNumbersWidth | 0; - this.lineNumbersHeight = source.lineNumbersHeight | 0; - this.decorationsLeft = source.decorationsLeft | 0; - this.decorationsWidth = source.decorationsWidth | 0; - this.decorationsHeight = source.decorationsHeight | 0; - this.contentLeft = source.contentLeft | 0; - this.contentWidth = source.contentWidth | 0; - this.contentHeight = source.contentHeight | 0; - this.renderMinimap = source.renderMinimap | 0; - this.minimapWidth = source.minimapWidth | 0; - this.viewportColumn = source.viewportColumn | 0; - this.verticalScrollbarWidth = source.verticalScrollbarWidth | 0; - this.horizontalScrollbarHeight = source.horizontalScrollbarHeight | 0; - this.overviewRuler = source.overviewRuler.clone(); - } - - /** - * @internal - */ - public equals(other: EditorLayoutInfo): boolean { - return ( - this.width === other.width - && this.height === other.height - && this.glyphMarginLeft === other.glyphMarginLeft - && this.glyphMarginWidth === other.glyphMarginWidth - && this.glyphMarginHeight === other.glyphMarginHeight - && this.lineNumbersLeft === other.lineNumbersLeft - && this.lineNumbersWidth === other.lineNumbersWidth - && this.lineNumbersHeight === other.lineNumbersHeight - && this.decorationsLeft === other.decorationsLeft - && this.decorationsWidth === other.decorationsWidth - && this.decorationsHeight === other.decorationsHeight - && this.contentLeft === other.contentLeft - && this.contentWidth === other.contentWidth - && this.contentHeight === other.contentHeight - && this.renderMinimap === other.renderMinimap - && this.minimapWidth === other.minimapWidth - && this.viewportColumn === other.viewportColumn - && this.verticalScrollbarWidth === other.verticalScrollbarWidth - && this.horizontalScrollbarHeight === other.horizontalScrollbarHeight - && this.overviewRuler.equals(other.overviewRuler) - ); - } - - /** - * @internal - */ - public clone(): EditorLayoutInfo { - return new EditorLayoutInfo(this); - } -} - -export interface IViewConfigurationChangedEvent { - readonly theme: boolean; - readonly canUseTranslate3d: boolean; - readonly disableMonospaceOptimizations: boolean; - readonly experimentalScreenReader: boolean; - readonly rulers: boolean; - readonly ariaLabel: boolean; - readonly renderLineNumbers: boolean; - readonly renderCustomLineNumbers: boolean; - readonly renderRelativeLineNumbers: boolean; - readonly selectOnLineNumbers: boolean; - readonly glyphMargin: boolean; - readonly revealHorizontalRightPadding: boolean; - readonly roundedSelection: boolean; - readonly overviewRulerLanes: boolean; - readonly overviewRulerBorder: boolean; - readonly cursorBlinking: boolean; - readonly mouseWheelZoom: boolean; - readonly cursorStyle: boolean; - readonly hideCursorInOverviewRuler: boolean; - readonly scrollBeyondLastLine: boolean; - readonly editorClassName: boolean; - readonly stopRenderingLineAfter: boolean; - readonly renderWhitespace: boolean; - readonly renderControlCharacters: boolean; - readonly fontLigatures: boolean; - readonly renderIndentGuides: boolean; - readonly renderLineHighlight: boolean; - readonly scrollbar: boolean; - readonly minimap: boolean; - readonly fixedOverflowWidgets: boolean; } /** * An event describing that the configuration of the editor has changed. */ export interface IConfigurationChangedEvent { + readonly canUseLayerHinting: boolean; + readonly pixelRatio: boolean; + readonly editorClassName: boolean; readonly lineHeight: boolean; readonly readOnly: boolean; + readonly accessibilitySupport: boolean; + readonly multiCursorModifier: boolean; readonly wordSeparators: boolean; readonly autoClosingBrackets: boolean; + readonly autoIndent: boolean; readonly useTabStops: boolean; readonly tabFocusMode: boolean; readonly dragAndDrop: boolean; + readonly emptySelectionClipboard: boolean; readonly layoutInfo: boolean; readonly fontInfo: boolean; - readonly viewInfo: IViewConfigurationChangedEvent; + readonly viewInfo: boolean; readonly wrappingInfo: boolean; readonly contribInfo: boolean; } + +/** + * @internal + */ +export interface IEnvironmentalOptions { + readonly outerWidth: number; + readonly outerHeight: number; + readonly fontInfo: FontInfo; + readonly extraEditorClassName: string; + readonly isDominatedByLongLines: boolean; + readonly lineNumbersDigitCount: number; + readonly emptySelectionClipboard: boolean; + readonly pixelRatio: number; + readonly tabFocusMode: boolean; + readonly accessibilitySupport: platform.AccessibilitySupport; +} + +function _boolean(value: any, defaultValue: T): boolean | T { + if (typeof value === 'undefined') { + return defaultValue; + } + if (value === 'false') { + // treat the string 'false' as false + return false; + } + return Boolean(value); +} + +function _string(value: any, defaultValue: string): string { + if (typeof value !== 'string') { + return defaultValue; + } + return value; +} + +function _stringSet(value: any, defaultValue: T, allowedValues: string[]): T { + if (typeof value !== 'string') { + return defaultValue; + } + if (allowedValues.indexOf(value) === -1) { + return defaultValue; + } + return value; +} + +function _clampedInt(value: any, defaultValue: number, minimum: number, maximum: number): number { + let r: number; + if (typeof value === 'undefined') { + r = defaultValue; + } else { + r = parseInt(value, 10); + if (isNaN(r)) { + r = defaultValue; + } + } + r = Math.max(minimum, r); + r = Math.min(maximum, r); + return r | 0; +} + +function _float(value: any, defaultValue: number): number { + let r = parseFloat(value); + if (isNaN(r)) { + r = defaultValue; + } + return r; +} + +function _wrappingIndentFromString(wrappingIndent: string, defaultValue: WrappingIndent): WrappingIndent { + if (typeof wrappingIndent !== 'string') { + return defaultValue; + } + if (wrappingIndent === 'indent') { + return WrappingIndent.Indent; + } else if (wrappingIndent === 'same') { + return WrappingIndent.Same; + } else { + return WrappingIndent.None; + } +} + +function _cursorBlinkingStyleFromString(cursorBlinkingStyle: string, defaultValue: TextEditorCursorBlinkingStyle): TextEditorCursorBlinkingStyle { + if (typeof cursorBlinkingStyle !== 'string') { + return defaultValue; + } + switch (cursorBlinkingStyle) { + case 'blink': + return TextEditorCursorBlinkingStyle.Blink; + case 'smooth': + return TextEditorCursorBlinkingStyle.Smooth; + case 'phase': + return TextEditorCursorBlinkingStyle.Phase; + case 'expand': + return TextEditorCursorBlinkingStyle.Expand; + case 'visible': // maintain compatibility + case 'solid': + return TextEditorCursorBlinkingStyle.Solid; + } + return TextEditorCursorBlinkingStyle.Blink; +} + +function _scrollbarVisibilityFromString(visibility: string, defaultValue: ScrollbarVisibility): ScrollbarVisibility { + if (typeof visibility !== 'string') { + return defaultValue; + } + switch (visibility) { + case 'hidden': + return ScrollbarVisibility.Hidden; + case 'visible': + return ScrollbarVisibility.Visible; + default: + return ScrollbarVisibility.Auto; + } +} + +/** + * @internal + */ +export class EditorOptionsValidator { + + /** + * Validate raw editor options. + * i.e. since they can be defined by the user, they might be invalid. + */ + public static validate(opts: IEditorOptions, defaults: IValidatedEditorOptions): IValidatedEditorOptions { + let wordWrap = opts.wordWrap; + { + // Compatibility with old true or false values + if (wordWrap === true) { + wordWrap = 'on'; + } else if (wordWrap === false) { + wordWrap = 'off'; + } + + wordWrap = _stringSet<'off' | 'on' | 'wordWrapColumn' | 'bounded'>(wordWrap, defaults.wordWrap, ['off', 'on', 'wordWrapColumn', 'bounded']); + } + + const viewInfo = this._sanitizeViewInfo(opts, defaults.viewInfo); + const contribInfo = this._sanitizeContribInfo(opts, defaults.contribInfo); + + let configuredMulticursorModifier: 'altKey' | 'metaKey' | 'ctrlKey'; + if (typeof opts.multiCursorModifier === 'string') { + if (opts.multiCursorModifier === 'ctrlCmd') { + configuredMulticursorModifier = platform.isMacintosh ? 'metaKey' : 'ctrlKey'; + } else { + configuredMulticursorModifier = 'altKey'; + } + } + const multiCursorModifier = _stringSet<'altKey' | 'metaKey' | 'ctrlKey'>(configuredMulticursorModifier, defaults.multiCursorModifier, ['altKey', 'metaKey', 'ctrlKey']); + + return { + inDiffEditor: _boolean(opts.inDiffEditor, defaults.inDiffEditor), + wordSeparators: _string(opts.wordSeparators, defaults.wordSeparators), + lineNumbersMinChars: _clampedInt(opts.lineNumbersMinChars, defaults.lineNumbersMinChars, 1, 10), + lineDecorationsWidth: (typeof opts.lineDecorationsWidth === 'undefined' ? defaults.lineDecorationsWidth : opts.lineDecorationsWidth), + readOnly: _boolean(opts.readOnly, defaults.readOnly), + mouseStyle: _stringSet<'text' | 'default' | 'copy'>(opts.mouseStyle, defaults.mouseStyle, ['text', 'default', 'copy']), + disableLayerHinting: _boolean(opts.disableLayerHinting, defaults.disableLayerHinting), + automaticLayout: _boolean(opts.automaticLayout, defaults.automaticLayout), + wordWrap: wordWrap, + wordWrapColumn: _clampedInt(opts.wordWrapColumn, defaults.wordWrapColumn, 1, Constants.MAX_SAFE_SMALL_INTEGER), + wordWrapMinified: _boolean(opts.wordWrapMinified, defaults.wordWrapMinified), + wrappingIndent: _wrappingIndentFromString(opts.wrappingIndent, defaults.wrappingIndent), + wordWrapBreakBeforeCharacters: _string(opts.wordWrapBreakBeforeCharacters, defaults.wordWrapBreakBeforeCharacters), + wordWrapBreakAfterCharacters: _string(opts.wordWrapBreakAfterCharacters, defaults.wordWrapBreakAfterCharacters), + wordWrapBreakObtrusiveCharacters: _string(opts.wordWrapBreakObtrusiveCharacters, defaults.wordWrapBreakObtrusiveCharacters), + autoClosingBrackets: _boolean(opts.autoClosingBrackets, defaults.autoClosingBrackets), + autoIndent: _boolean(opts.autoIndent, defaults.autoIndent), + dragAndDrop: _boolean(opts.dragAndDrop, defaults.dragAndDrop), + emptySelectionClipboard: _boolean(opts.emptySelectionClipboard, defaults.emptySelectionClipboard), + useTabStops: _boolean(opts.useTabStops, defaults.useTabStops), + multiCursorModifier: multiCursorModifier, + accessibilitySupport: _stringSet<'auto' | 'on' | 'off'>(opts.accessibilitySupport, defaults.accessibilitySupport, ['auto', 'on', 'off']), + viewInfo: viewInfo, + contribInfo: contribInfo, + }; + } + + private static _sanitizeScrollbarOpts(opts: IEditorScrollbarOptions, defaults: InternalEditorScrollbarOptions, mouseWheelScrollSensitivity: number): InternalEditorScrollbarOptions { + if (typeof opts !== 'object') { + return defaults; + } + const horizontalScrollbarSize = _clampedInt(opts.horizontalScrollbarSize, defaults.horizontalScrollbarSize, 0, 1000); + const verticalScrollbarSize = _clampedInt(opts.verticalScrollbarSize, defaults.verticalScrollbarSize, 0, 1000); + return { + vertical: _scrollbarVisibilityFromString(opts.vertical, defaults.vertical), + horizontal: _scrollbarVisibilityFromString(opts.horizontal, defaults.horizontal), + + arrowSize: _clampedInt(opts.arrowSize, defaults.arrowSize, 0, 1000), + useShadows: _boolean(opts.useShadows, defaults.useShadows), + + verticalHasArrows: _boolean(opts.verticalHasArrows, defaults.verticalHasArrows), + horizontalHasArrows: _boolean(opts.horizontalHasArrows, defaults.horizontalHasArrows), + + horizontalScrollbarSize: horizontalScrollbarSize, + horizontalSliderSize: _clampedInt(opts.horizontalSliderSize, horizontalScrollbarSize, 0, 1000), + + verticalScrollbarSize: verticalScrollbarSize, + verticalSliderSize: _clampedInt(opts.verticalSliderSize, verticalScrollbarSize, 0, 1000), + + handleMouseWheel: _boolean(opts.handleMouseWheel, defaults.handleMouseWheel), + mouseWheelScrollSensitivity: mouseWheelScrollSensitivity + }; + } + + private static _sanitizeMinimapOpts(opts: IEditorMinimapOptions, defaults: InternalEditorMinimapOptions): InternalEditorMinimapOptions { + if (typeof opts !== 'object') { + return defaults; + } + return { + enabled: _boolean(opts.enabled, defaults.enabled), + showSlider: _stringSet<'always' | 'mouseover'>(opts.showSlider, defaults.showSlider, ['always', 'mouseover']), + renderCharacters: _boolean(opts.renderCharacters, defaults.renderCharacters), + maxColumn: _clampedInt(opts.maxColumn, defaults.maxColumn, 1, 10000), + }; + } + + private static _santizeFindOpts(opts: IEditorFindOptions, defaults: InternalEditorFindOptions): InternalEditorFindOptions { + if (typeof opts !== 'object') { + return defaults; + } + + return { + seedSearchStringFromSelection: _boolean(opts.seedSearchStringFromSelection, defaults.seedSearchStringFromSelection), + autoFindInSelection: _boolean(opts.autoFindInSelection, defaults.autoFindInSelection) + }; + } + + private static _sanitizeViewInfo(opts: IEditorOptions, defaults: InternalEditorViewOptions): InternalEditorViewOptions { + + let rulers: number[] = []; + if (Array.isArray(opts.rulers)) { + for (let i = 0, len = opts.rulers.length; i < len; i++) { + rulers.push(_clampedInt(opts.rulers[i], 0, 0, 10000)); + } + rulers.sort(); + } + + let renderLineNumbers: boolean = defaults.renderLineNumbers; + let renderCustomLineNumbers: (lineNumber: number) => string = defaults.renderCustomLineNumbers; + let renderRelativeLineNumbers: boolean = defaults.renderRelativeLineNumbers; + + if (typeof opts.lineNumbers !== 'undefined') { + let lineNumbers = opts.lineNumbers; + + // Compatibility with old true or false values + if (lineNumbers === true) { + lineNumbers = 'on'; + } else if (lineNumbers === false) { + lineNumbers = 'off'; + } + + if (typeof lineNumbers === 'function') { + renderLineNumbers = true; + renderCustomLineNumbers = lineNumbers; + renderRelativeLineNumbers = false; + } else if (lineNumbers === 'relative') { + renderLineNumbers = true; + renderCustomLineNumbers = null; + renderRelativeLineNumbers = true; + } else if (lineNumbers === 'on') { + renderLineNumbers = true; + renderCustomLineNumbers = null; + renderRelativeLineNumbers = false; + } else { + renderLineNumbers = false; + renderCustomLineNumbers = null; + renderRelativeLineNumbers = false; + } + } + + const fontLigatures = _boolean(opts.fontLigatures, defaults.fontLigatures); + const disableMonospaceOptimizations = _boolean(opts.disableMonospaceOptimizations, defaults.disableMonospaceOptimizations) || fontLigatures; + + let renderWhitespace = opts.renderWhitespace; + { + // Compatibility with old true or false values + if (renderWhitespace === true) { + renderWhitespace = 'boundary'; + } else if (renderWhitespace === false) { + renderWhitespace = 'none'; + } + renderWhitespace = _stringSet<'none' | 'boundary' | 'all'>(opts.renderWhitespace, defaults.renderWhitespace, ['none', 'boundary', 'all']); + } + + let renderLineHighlight = opts.renderLineHighlight; + { + // Compatibility with old true or false values + if (renderLineHighlight === true) { + renderLineHighlight = 'line'; + } else if (renderLineHighlight === false) { + renderLineHighlight = 'none'; + } + renderLineHighlight = _stringSet<'none' | 'gutter' | 'line' | 'all'>(opts.renderLineHighlight, defaults.renderLineHighlight, ['none', 'gutter', 'line', 'all']); + } + + const mouseWheelScrollSensitivity = _float(opts.mouseWheelScrollSensitivity, defaults.scrollbar.mouseWheelScrollSensitivity); + const scrollbar = this._sanitizeScrollbarOpts(opts.scrollbar, defaults.scrollbar, mouseWheelScrollSensitivity); + const minimap = this._sanitizeMinimapOpts(opts.minimap, defaults.minimap); + + return { + extraEditorClassName: _string(opts.extraEditorClassName, defaults.extraEditorClassName), + disableMonospaceOptimizations: disableMonospaceOptimizations, + rulers: rulers, + ariaLabel: _string(opts.ariaLabel, defaults.ariaLabel), + renderLineNumbers: renderLineNumbers, + renderCustomLineNumbers: renderCustomLineNumbers, + renderRelativeLineNumbers: renderRelativeLineNumbers, + selectOnLineNumbers: _boolean(opts.selectOnLineNumbers, defaults.selectOnLineNumbers), + glyphMargin: _boolean(opts.glyphMargin, defaults.glyphMargin), + revealHorizontalRightPadding: _clampedInt(opts.revealHorizontalRightPadding, defaults.revealHorizontalRightPadding, 0, 1000), + roundedSelection: _boolean(opts.roundedSelection, defaults.roundedSelection), + overviewRulerLanes: _clampedInt(opts.overviewRulerLanes, defaults.overviewRulerLanes, 0, 3), + overviewRulerBorder: _boolean(opts.overviewRulerBorder, defaults.overviewRulerBorder), + cursorBlinking: _cursorBlinkingStyleFromString(opts.cursorBlinking, defaults.cursorBlinking), + mouseWheelZoom: _boolean(opts.mouseWheelZoom, defaults.mouseWheelZoom), + cursorStyle: _cursorStyleFromString(opts.cursorStyle, defaults.cursorStyle), + hideCursorInOverviewRuler: _boolean(opts.hideCursorInOverviewRuler, defaults.hideCursorInOverviewRuler), + scrollBeyondLastLine: _boolean(opts.scrollBeyondLastLine, defaults.scrollBeyondLastLine), + stopRenderingLineAfter: _clampedInt(opts.stopRenderingLineAfter, defaults.stopRenderingLineAfter, -1, Constants.MAX_SAFE_SMALL_INTEGER), + renderWhitespace: renderWhitespace, + renderControlCharacters: _boolean(opts.renderControlCharacters, defaults.renderControlCharacters), + fontLigatures: fontLigatures, + renderIndentGuides: _boolean(opts.renderIndentGuides, defaults.renderIndentGuides), + renderLineHighlight: renderLineHighlight, + scrollbar: scrollbar, + minimap: minimap, + fixedOverflowWidgets: _boolean(opts.fixedOverflowWidgets, defaults.fixedOverflowWidgets), + }; + } + + private static _sanitizeContribInfo(opts: IEditorOptions, defaults: EditorContribOptions): EditorContribOptions { + let quickSuggestions: boolean | { other: boolean, comments: boolean, strings: boolean }; + if (typeof opts.quickSuggestions === 'object') { + quickSuggestions = { other: true, ...opts.quickSuggestions }; + } else { + quickSuggestions = _boolean(opts.quickSuggestions, defaults.quickSuggestions); + } + const find = this._santizeFindOpts(opts.find, defaults.find); + return { + selectionClipboard: _boolean(opts.selectionClipboard, defaults.selectionClipboard), + hover: _boolean(opts.hover, defaults.hover), + links: _boolean(opts.links, defaults.links), + contextmenu: _boolean(opts.contextmenu, defaults.contextmenu), + quickSuggestions: quickSuggestions, + quickSuggestionsDelay: _clampedInt(opts.quickSuggestionsDelay, defaults.quickSuggestionsDelay, Constants.MIN_SAFE_SMALL_INTEGER, Constants.MAX_SAFE_SMALL_INTEGER), + parameterHints: _boolean(opts.parameterHints, defaults.parameterHints), + iconsInSuggestions: _boolean(opts.iconsInSuggestions, defaults.iconsInSuggestions), + formatOnType: _boolean(opts.formatOnType, defaults.formatOnType), + formatOnPaste: _boolean(opts.formatOnPaste, defaults.formatOnPaste), + suggestOnTriggerCharacters: _boolean(opts.suggestOnTriggerCharacters, defaults.suggestOnTriggerCharacters), + acceptSuggestionOnEnter: _stringSet<'on' | 'smart' | 'off'>(opts.acceptSuggestionOnEnter, defaults.acceptSuggestionOnEnter, ['on', 'smart', 'off']), + acceptSuggestionOnCommitCharacter: _boolean(opts.acceptSuggestionOnCommitCharacter, defaults.acceptSuggestionOnCommitCharacter), + snippetSuggestions: _stringSet<'top' | 'bottom' | 'inline' | 'none'>(opts.snippetSuggestions, defaults.snippetSuggestions, ['top', 'bottom', 'inline', 'none']), + wordBasedSuggestions: _boolean(opts.wordBasedSuggestions, defaults.wordBasedSuggestions), + suggestFontSize: _clampedInt(opts.suggestFontSize, defaults.suggestFontSize, 0, 1000), + suggestLineHeight: _clampedInt(opts.suggestLineHeight, defaults.suggestLineHeight, 0, 1000), + selectionHighlight: _boolean(opts.selectionHighlight, defaults.selectionHighlight), + occurrencesHighlight: _boolean(opts.occurrencesHighlight, defaults.occurrencesHighlight), + codeLens: _boolean(opts.codeLens, defaults.codeLens) && _boolean(opts.referenceInfos, true), + folding: _boolean(opts.folding, defaults.folding), + showFoldingControls: _stringSet<'always' | 'mouseover'>(opts.showFoldingControls, defaults.showFoldingControls, ['always', 'mouseover']), + matchBrackets: _boolean(opts.matchBrackets, defaults.matchBrackets), + find: find + }; + } +} + +/** + * @internal + */ +export class InternalEditorOptionsFactory { + + private static _tweakValidatedOptions(opts: IValidatedEditorOptions, accessibilitySupport: platform.AccessibilitySupport): IValidatedEditorOptions { + const accessibilityIsOn = (accessibilitySupport === platform.AccessibilitySupport.Enabled); + const accessibilityIsOff = (accessibilitySupport === platform.AccessibilitySupport.Disabled); + return { + inDiffEditor: opts.inDiffEditor, + wordSeparators: opts.wordSeparators, + lineNumbersMinChars: opts.lineNumbersMinChars, + lineDecorationsWidth: opts.lineDecorationsWidth, + readOnly: opts.readOnly, + mouseStyle: opts.mouseStyle, + disableLayerHinting: opts.disableLayerHinting, + automaticLayout: opts.automaticLayout, + wordWrap: opts.wordWrap, + wordWrapColumn: opts.wordWrapColumn, + wordWrapMinified: opts.wordWrapMinified, + wrappingIndent: opts.wrappingIndent, + wordWrapBreakBeforeCharacters: opts.wordWrapBreakBeforeCharacters, + wordWrapBreakAfterCharacters: opts.wordWrapBreakAfterCharacters, + wordWrapBreakObtrusiveCharacters: opts.wordWrapBreakObtrusiveCharacters, + autoClosingBrackets: opts.autoClosingBrackets, + autoIndent: opts.autoIndent, + dragAndDrop: opts.dragAndDrop, + emptySelectionClipboard: opts.emptySelectionClipboard, + useTabStops: opts.useTabStops, + multiCursorModifier: opts.multiCursorModifier, + accessibilitySupport: opts.accessibilitySupport, + + viewInfo: { + extraEditorClassName: opts.viewInfo.extraEditorClassName, + disableMonospaceOptimizations: opts.viewInfo.disableMonospaceOptimizations, + rulers: opts.viewInfo.rulers, + ariaLabel: (accessibilityIsOff ? nls.localize('accessibilityOffAriaLabel', "The editor is not accessible at this time. Press Alt+F1 for options.") : opts.viewInfo.ariaLabel), + renderLineNumbers: opts.viewInfo.renderLineNumbers, + renderCustomLineNumbers: opts.viewInfo.renderCustomLineNumbers, + renderRelativeLineNumbers: opts.viewInfo.renderRelativeLineNumbers, + selectOnLineNumbers: opts.viewInfo.selectOnLineNumbers, + glyphMargin: opts.viewInfo.glyphMargin, + revealHorizontalRightPadding: opts.viewInfo.revealHorizontalRightPadding, + roundedSelection: (accessibilityIsOn ? false : opts.viewInfo.roundedSelection), // DISABLED WHEN SCREEN READER IS ATTACHED + overviewRulerLanes: opts.viewInfo.overviewRulerLanes, + overviewRulerBorder: opts.viewInfo.overviewRulerBorder, + cursorBlinking: opts.viewInfo.cursorBlinking, + mouseWheelZoom: opts.viewInfo.mouseWheelZoom, + cursorStyle: opts.viewInfo.cursorStyle, + hideCursorInOverviewRuler: opts.viewInfo.hideCursorInOverviewRuler, + scrollBeyondLastLine: opts.viewInfo.scrollBeyondLastLine, + stopRenderingLineAfter: opts.viewInfo.stopRenderingLineAfter, + renderWhitespace: (accessibilityIsOn ? 'none' : opts.viewInfo.renderWhitespace), // DISABLED WHEN SCREEN READER IS ATTACHED + renderControlCharacters: (accessibilityIsOn ? false : opts.viewInfo.renderControlCharacters), // DISABLED WHEN SCREEN READER IS ATTACHED + fontLigatures: (accessibilityIsOn ? false : opts.viewInfo.fontLigatures), // DISABLED WHEN SCREEN READER IS ATTACHED + renderIndentGuides: (accessibilityIsOn ? false : opts.viewInfo.renderIndentGuides), // DISABLED WHEN SCREEN READER IS ATTACHED + renderLineHighlight: (accessibilityIsOn ? 'none' : opts.viewInfo.renderLineHighlight), // DISABLED WHEN SCREEN READER IS ATTACHED + scrollbar: opts.viewInfo.scrollbar, + minimap: { + enabled: (accessibilityIsOn ? false : opts.viewInfo.minimap.enabled), // DISABLED WHEN SCREEN READER IS ATTACHED + renderCharacters: opts.viewInfo.minimap.renderCharacters, + showSlider: opts.viewInfo.minimap.showSlider, + maxColumn: opts.viewInfo.minimap.maxColumn + }, + fixedOverflowWidgets: opts.viewInfo.fixedOverflowWidgets + }, + + contribInfo: { + selectionClipboard: opts.contribInfo.selectionClipboard, + hover: opts.contribInfo.hover, + links: (accessibilityIsOn ? false : opts.contribInfo.links), // DISABLED WHEN SCREEN READER IS ATTACHED + contextmenu: opts.contribInfo.contextmenu, + quickSuggestions: opts.contribInfo.quickSuggestions, + quickSuggestionsDelay: opts.contribInfo.quickSuggestionsDelay, + parameterHints: opts.contribInfo.parameterHints, + iconsInSuggestions: opts.contribInfo.iconsInSuggestions, + formatOnType: opts.contribInfo.formatOnType, + formatOnPaste: opts.contribInfo.formatOnPaste, + suggestOnTriggerCharacters: opts.contribInfo.suggestOnTriggerCharacters, + acceptSuggestionOnEnter: opts.contribInfo.acceptSuggestionOnEnter, + acceptSuggestionOnCommitCharacter: opts.contribInfo.acceptSuggestionOnCommitCharacter, + snippetSuggestions: opts.contribInfo.snippetSuggestions, + wordBasedSuggestions: opts.contribInfo.wordBasedSuggestions, + suggestFontSize: opts.contribInfo.suggestFontSize, + suggestLineHeight: opts.contribInfo.suggestLineHeight, + selectionHighlight: (accessibilityIsOn ? false : opts.contribInfo.selectionHighlight), // DISABLED WHEN SCREEN READER IS ATTACHED + occurrencesHighlight: (accessibilityIsOn ? false : opts.contribInfo.occurrencesHighlight), // DISABLED WHEN SCREEN READER IS ATTACHED + codeLens: (accessibilityIsOn ? false : opts.contribInfo.codeLens), // DISABLED WHEN SCREEN READER IS ATTACHED + folding: (accessibilityIsOn ? false : opts.contribInfo.folding), // DISABLED WHEN SCREEN READER IS ATTACHED + showFoldingControls: opts.contribInfo.showFoldingControls, + matchBrackets: (accessibilityIsOn ? false : opts.contribInfo.matchBrackets), // DISABLED WHEN SCREEN READER IS ATTACHED + find: opts.contribInfo.find + } + }; + } + + public static createInternalEditorOptions(env: IEnvironmentalOptions, _opts: IValidatedEditorOptions) { + + let accessibilitySupport: platform.AccessibilitySupport; + if (_opts.accessibilitySupport === 'auto') { + // The editor reads the `accessibilitySupport` from the environment + accessibilitySupport = env.accessibilitySupport; + } else if (_opts.accessibilitySupport === 'on') { + accessibilitySupport = platform.AccessibilitySupport.Enabled; + } else { + accessibilitySupport = platform.AccessibilitySupport.Disabled; + } + + // Disable some non critical features to get as best performance as possible + // See https://github.com/Microsoft/vscode/issues/26730 + const opts = this._tweakValidatedOptions(_opts, accessibilitySupport); + + let lineDecorationsWidth: number; + if (typeof opts.lineDecorationsWidth === 'string' && /^\d+(\.\d+)?ch$/.test(opts.lineDecorationsWidth)) { + const multiple = parseFloat(opts.lineDecorationsWidth.substr(0, opts.lineDecorationsWidth.length - 2)); + lineDecorationsWidth = multiple * env.fontInfo.typicalHalfwidthCharacterWidth; + } else { + lineDecorationsWidth = _clampedInt(opts.lineDecorationsWidth, 0, 0, 1000); + } + if (opts.contribInfo.folding) { + lineDecorationsWidth += 16; + } + + const layoutInfo = EditorLayoutProvider.compute({ + outerWidth: env.outerWidth, + outerHeight: env.outerHeight, + showGlyphMargin: opts.viewInfo.glyphMargin, + lineHeight: env.fontInfo.lineHeight, + showLineNumbers: opts.viewInfo.renderLineNumbers, + lineNumbersMinChars: opts.lineNumbersMinChars, + lineNumbersDigitCount: env.lineNumbersDigitCount, + lineDecorationsWidth: lineDecorationsWidth, + typicalHalfwidthCharacterWidth: env.fontInfo.typicalHalfwidthCharacterWidth, + maxDigitWidth: env.fontInfo.maxDigitWidth, + verticalScrollbarWidth: opts.viewInfo.scrollbar.verticalScrollbarSize, + horizontalScrollbarHeight: opts.viewInfo.scrollbar.horizontalScrollbarSize, + scrollbarArrowSize: opts.viewInfo.scrollbar.arrowSize, + verticalScrollbarHasArrows: opts.viewInfo.scrollbar.verticalHasArrows, + minimap: opts.viewInfo.minimap.enabled, + minimapRenderCharacters: opts.viewInfo.minimap.renderCharacters, + minimapMaxColumn: opts.viewInfo.minimap.maxColumn, + pixelRatio: env.pixelRatio + }); + + let bareWrappingInfo: { isWordWrapMinified: boolean; isViewportWrapping: boolean; wrappingColumn: number; } = null; + { + const wordWrap = opts.wordWrap; + const wordWrapColumn = opts.wordWrapColumn; + const wordWrapMinified = opts.wordWrapMinified; + + if (accessibilitySupport === platform.AccessibilitySupport.Enabled) { + // See https://github.com/Microsoft/vscode/issues/27766 + // Never enable wrapping when a screen reader is attached + // because arrow down etc. will not move the cursor in the way + // a screen reader expects. + bareWrappingInfo = { + isWordWrapMinified: false, + isViewportWrapping: false, + wrappingColumn: -1 + }; + } else if (wordWrapMinified && env.isDominatedByLongLines) { + // Force viewport width wrapping if model is dominated by long lines + bareWrappingInfo = { + isWordWrapMinified: true, + isViewportWrapping: true, + wrappingColumn: Math.max(1, layoutInfo.viewportColumn) + }; + } else if (wordWrap === 'on') { + bareWrappingInfo = { + isWordWrapMinified: false, + isViewportWrapping: true, + wrappingColumn: Math.max(1, layoutInfo.viewportColumn) + }; + } else if (wordWrap === 'bounded') { + bareWrappingInfo = { + isWordWrapMinified: false, + isViewportWrapping: true, + wrappingColumn: Math.min(Math.max(1, layoutInfo.viewportColumn), wordWrapColumn) + }; + } else if (wordWrap === 'wordWrapColumn') { + bareWrappingInfo = { + isWordWrapMinified: false, + isViewportWrapping: false, + wrappingColumn: wordWrapColumn + }; + } else { + bareWrappingInfo = { + isWordWrapMinified: false, + isViewportWrapping: false, + wrappingColumn: -1 + }; + } + } + + const wrappingInfo: EditorWrappingInfo = { + inDiffEditor: opts.inDiffEditor, + isDominatedByLongLines: env.isDominatedByLongLines, + isWordWrapMinified: bareWrappingInfo.isWordWrapMinified, + isViewportWrapping: bareWrappingInfo.isViewportWrapping, + wrappingColumn: bareWrappingInfo.wrappingColumn, + wrappingIndent: opts.wrappingIndent, + wordWrapBreakBeforeCharacters: opts.wordWrapBreakBeforeCharacters, + wordWrapBreakAfterCharacters: opts.wordWrapBreakAfterCharacters, + wordWrapBreakObtrusiveCharacters: opts.wordWrapBreakObtrusiveCharacters, + }; + + let className = 'monaco-editor'; + if (opts.viewInfo.extraEditorClassName) { + className += ' ' + opts.viewInfo.extraEditorClassName; + } + if (env.extraEditorClassName) { + className += ' ' + env.extraEditorClassName; + } + if (opts.viewInfo.fontLigatures) { + className += ' enable-ligatures'; + } + if (opts.mouseStyle === 'default') { + className += ' mouse-default'; + } else if (opts.mouseStyle === 'copy') { + className += ' mouse-copy'; + } + + return new InternalEditorOptions({ + canUseLayerHinting: opts.disableLayerHinting ? false : true, + pixelRatio: env.pixelRatio, + editorClassName: className, + lineHeight: env.fontInfo.lineHeight, + readOnly: opts.readOnly, + accessibilitySupport: accessibilitySupport, + multiCursorModifier: opts.multiCursorModifier, + wordSeparators: opts.wordSeparators, + autoClosingBrackets: opts.autoClosingBrackets, + autoIndent: opts.autoIndent, + useTabStops: opts.useTabStops, + tabFocusMode: opts.readOnly ? true : env.tabFocusMode, + dragAndDrop: opts.dragAndDrop, + emptySelectionClipboard: opts.emptySelectionClipboard && env.emptySelectionClipboard, + layoutInfo: layoutInfo, + fontInfo: env.fontInfo, + viewInfo: opts.viewInfo, + wrappingInfo: wrappingInfo, + contribInfo: opts.contribInfo + }); + } +} + +/** + * @internal + */ +export interface IEditorLayoutProviderOpts { + outerWidth: number; + outerHeight: number; + + showGlyphMargin: boolean; + lineHeight: number; + + showLineNumbers: boolean; + lineNumbersMinChars: number; + lineNumbersDigitCount: number; + + lineDecorationsWidth: number; + + typicalHalfwidthCharacterWidth: number; + maxDigitWidth: number; + + verticalScrollbarWidth: number; + verticalScrollbarHasArrows: boolean; + scrollbarArrowSize: number; + horizontalScrollbarHeight: number; + + minimap: boolean; + minimapRenderCharacters: boolean; + minimapMaxColumn: number; + pixelRatio: number; +} + +/** + * @internal + */ +export class EditorLayoutProvider { + public static compute(_opts: IEditorLayoutProviderOpts): EditorLayoutInfo { + const outerWidth = _opts.outerWidth | 0; + const outerHeight = _opts.outerHeight | 0; + const showGlyphMargin = _opts.showGlyphMargin; + const lineHeight = _opts.lineHeight | 0; + const showLineNumbers = _opts.showLineNumbers; + const lineNumbersMinChars = _opts.lineNumbersMinChars | 0; + const lineNumbersDigitCount = _opts.lineNumbersDigitCount | 0; + const lineDecorationsWidth = _opts.lineDecorationsWidth | 0; + const typicalHalfwidthCharacterWidth = _opts.typicalHalfwidthCharacterWidth; + const maxDigitWidth = _opts.maxDigitWidth; + const verticalScrollbarWidth = _opts.verticalScrollbarWidth | 0; + const verticalScrollbarHasArrows = _opts.verticalScrollbarHasArrows; + const scrollbarArrowSize = _opts.scrollbarArrowSize | 0; + const horizontalScrollbarHeight = _opts.horizontalScrollbarHeight | 0; + const minimap = _opts.minimap; + const minimapRenderCharacters = _opts.minimapRenderCharacters; + const minimapMaxColumn = _opts.minimapMaxColumn | 0; + const pixelRatio = _opts.pixelRatio; + + let lineNumbersWidth = 0; + if (showLineNumbers) { + const digitCount = Math.max(lineNumbersDigitCount, lineNumbersMinChars); + lineNumbersWidth = Math.round(digitCount * maxDigitWidth); + } + + let glyphMarginWidth = 0; + if (showGlyphMargin) { + glyphMarginWidth = lineHeight; + } + + const glyphMarginLeft = 0; + const lineNumbersLeft = glyphMarginLeft + glyphMarginWidth; + const decorationsLeft = lineNumbersLeft + lineNumbersWidth; + const contentLeft = decorationsLeft + lineDecorationsWidth; + + const remainingWidth = outerWidth - glyphMarginWidth - lineNumbersWidth - lineDecorationsWidth; + + let renderMinimap: RenderMinimap; + let minimapWidth: number; + let contentWidth: number; + if (!minimap) { + minimapWidth = 0; + renderMinimap = RenderMinimap.None; + contentWidth = remainingWidth; + } else { + let minimapCharWidth: number; + if (pixelRatio >= 2) { + renderMinimap = minimapRenderCharacters ? RenderMinimap.Large : RenderMinimap.LargeBlocks; + minimapCharWidth = 2 / pixelRatio; + } else { + renderMinimap = minimapRenderCharacters ? RenderMinimap.Small : RenderMinimap.SmallBlocks; + minimapCharWidth = 1 / pixelRatio; + } + + // Given: + // viewportColumn = (contentWidth - verticalScrollbarWidth) / typicalHalfwidthCharacterWidth + // minimapWidth = viewportColumn * minimapCharWidth + // contentWidth = remainingWidth - minimapWidth + // What are good values for contentWidth and minimapWidth ? + + // minimapWidth = ((contentWidth - verticalScrollbarWidth) / typicalHalfwidthCharacterWidth) * minimapCharWidth + // typicalHalfwidthCharacterWidth * minimapWidth = (contentWidth - verticalScrollbarWidth) * minimapCharWidth + // typicalHalfwidthCharacterWidth * minimapWidth = (remainingWidth - minimapWidth - verticalScrollbarWidth) * minimapCharWidth + // (typicalHalfwidthCharacterWidth + minimapCharWidth) * minimapWidth = (remainingWidth - verticalScrollbarWidth) * minimapCharWidth + // minimapWidth = ((remainingWidth - verticalScrollbarWidth) * minimapCharWidth) / (typicalHalfwidthCharacterWidth + minimapCharWidth) + + minimapWidth = Math.max(0, Math.floor(((remainingWidth - verticalScrollbarWidth) * minimapCharWidth) / (typicalHalfwidthCharacterWidth + minimapCharWidth))); + let minimapColumns = minimapWidth / minimapCharWidth; + if (minimapColumns > minimapMaxColumn) { + minimapWidth = Math.floor(minimapMaxColumn * minimapCharWidth); + } + contentWidth = remainingWidth - minimapWidth; + } + + const viewportColumn = Math.max(1, Math.floor((contentWidth - verticalScrollbarWidth) / typicalHalfwidthCharacterWidth)); + + const verticalArrowSize = (verticalScrollbarHasArrows ? scrollbarArrowSize : 0); + + return { + width: outerWidth, + height: outerHeight, + + glyphMarginLeft: glyphMarginLeft, + glyphMarginWidth: glyphMarginWidth, + glyphMarginHeight: outerHeight, + + lineNumbersLeft: lineNumbersLeft, + lineNumbersWidth: lineNumbersWidth, + lineNumbersHeight: outerHeight, + + decorationsLeft: decorationsLeft, + decorationsWidth: lineDecorationsWidth, + decorationsHeight: outerHeight, + + contentLeft: contentLeft, + contentWidth: contentWidth, + contentHeight: outerHeight, + + renderMinimap: renderMinimap, + minimapWidth: minimapWidth, + + viewportColumn: viewportColumn, + + verticalScrollbarWidth: verticalScrollbarWidth, + horizontalScrollbarHeight: horizontalScrollbarHeight, + + overviewRuler: { + top: verticalArrowSize, + width: verticalScrollbarWidth, + height: (outerHeight - 2 * verticalArrowSize), + right: 0 + } + }; + } +} + +const DEFAULT_WINDOWS_FONT_FAMILY = 'Consolas, \'Courier New\', monospace'; +const DEFAULT_MAC_FONT_FAMILY = 'Menlo, Monaco, \'Courier New\', monospace'; +const DEFAULT_LINUX_FONT_FAMILY = '\'Droid Sans Mono\', \'Courier New\', monospace, \'Droid Sans Fallback\''; + +/** + * @internal + */ +export const EDITOR_FONT_DEFAULTS = { + fontFamily: ( + platform.isMacintosh ? DEFAULT_MAC_FONT_FAMILY : (platform.isLinux ? DEFAULT_LINUX_FONT_FAMILY : DEFAULT_WINDOWS_FONT_FAMILY) + ), + fontWeight: 'normal', + fontSize: ( + platform.isMacintosh ? 12 : 14 + ), + lineHeight: 0, + letterSpacing: 0, +}; + +/** + * @internal + */ +export const EDITOR_MODEL_DEFAULTS = { + tabSize: 4, + insertSpaces: true, + detectIndentation: true, + trimAutoWhitespace: true +}; + +/** + * @internal + */ +export const EDITOR_DEFAULTS: IValidatedEditorOptions = { + inDiffEditor: false, + wordSeparators: USUAL_WORD_SEPARATORS, + lineNumbersMinChars: 5, + lineDecorationsWidth: 10, + readOnly: false, + mouseStyle: 'text', + disableLayerHinting: false, + automaticLayout: false, + wordWrap: 'off', + wordWrapColumn: 80, + wordWrapMinified: true, + wrappingIndent: WrappingIndent.Same, + wordWrapBreakBeforeCharacters: '([{‘“〈《「『【〔([{「£¥$£¥++', + wordWrapBreakAfterCharacters: ' \t})]?|&,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」', + wordWrapBreakObtrusiveCharacters: '.', + autoClosingBrackets: true, + autoIndent: true, + dragAndDrop: true, + emptySelectionClipboard: true, + useTabStops: true, + multiCursorModifier: 'altKey', + accessibilitySupport: 'auto', + + viewInfo: { + extraEditorClassName: '', + disableMonospaceOptimizations: false, + rulers: [], + ariaLabel: nls.localize('editorViewAccessibleLabel', "Editor content"), + renderLineNumbers: true, + renderCustomLineNumbers: null, + renderRelativeLineNumbers: false, + selectOnLineNumbers: true, + glyphMargin: true, + revealHorizontalRightPadding: 30, + roundedSelection: true, + overviewRulerLanes: 2, + overviewRulerBorder: true, + cursorBlinking: TextEditorCursorBlinkingStyle.Blink, + mouseWheelZoom: false, + cursorStyle: TextEditorCursorStyle.Line, + hideCursorInOverviewRuler: false, + scrollBeyondLastLine: true, + stopRenderingLineAfter: 10000, + renderWhitespace: 'none', + renderControlCharacters: false, + fontLigatures: false, + renderIndentGuides: true, + renderLineHighlight: 'line', + scrollbar: { + vertical: ScrollbarVisibility.Auto, + horizontal: ScrollbarVisibility.Auto, + arrowSize: 11, + useShadows: true, + verticalHasArrows: false, + horizontalHasArrows: false, + horizontalScrollbarSize: 10, + horizontalSliderSize: 10, + verticalScrollbarSize: 14, + verticalSliderSize: 14, + handleMouseWheel: true, + mouseWheelScrollSensitivity: 1, + }, + minimap: { + enabled: true, + showSlider: 'mouseover', + renderCharacters: true, + maxColumn: 120 + }, + fixedOverflowWidgets: false, + }, + + contribInfo: { + selectionClipboard: true, + hover: true, + links: true, + contextmenu: true, + quickSuggestions: { other: true, comments: false, strings: false }, + quickSuggestionsDelay: 10, + parameterHints: true, + iconsInSuggestions: true, + formatOnType: false, + formatOnPaste: false, + suggestOnTriggerCharacters: true, + acceptSuggestionOnEnter: 'on', + acceptSuggestionOnCommitCharacter: true, + snippetSuggestions: 'inline', + wordBasedSuggestions: true, + suggestFontSize: 0, + suggestLineHeight: 0, + selectionHighlight: true, + occurrencesHighlight: true, + codeLens: true, + folding: true, + showFoldingControls: 'mouseover', + matchBrackets: true, + find: { + seedSearchStringFromSelection: true, + autoFindInSelection: false + } + }, +}; diff --git a/src/vs/editor/common/config/fontInfo.ts b/src/vs/editor/common/config/fontInfo.ts index 1c291d02cf6c3..af6a2d8287372 100644 --- a/src/vs/editor/common/config/fontInfo.ts +++ b/src/vs/editor/common/config/fontInfo.ts @@ -4,8 +4,15 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { DefaultConfig, GOLDEN_LINE_HEIGHT_RATIO } from 'vs/editor/common/config/defaultConfig'; +import * as platform from 'vs/base/common/platform'; import { EditorZoom } from 'vs/editor/common/config/editorZoom'; +import { EDITOR_FONT_DEFAULTS } from 'vs/editor/common/config/editorOptions'; + +/** + * Determined from empirical observations. + * @internal + */ +const GOLDEN_LINE_HEIGHT_RATIO = platform.isMacintosh ? 1.5 : 1.35; function safeParseFloat(n: number | string, defaultValue: number): number { if (typeof n === 'number') { @@ -39,6 +46,13 @@ function clamp(n: number, min: number, max: number): number { return n; } +function _string(value: any, defaultValue: string): string { + if (typeof value !== 'string') { + return defaultValue; + } + return value; +} + export class BareFontInfo { readonly _bareFontInfoBrand: void; @@ -50,23 +64,31 @@ export class BareFontInfo { fontWeight?: string; fontSize?: number | string; lineHeight?: number | string; + letterSpacing?: number | string; }, zoomLevel: number): BareFontInfo { - let fontFamily = String(opts.fontFamily) || DefaultConfig.editor.fontFamily; - let fontWeight = String(opts.fontWeight) || DefaultConfig.editor.fontWeight; + let fontFamily = _string(opts.fontFamily, EDITOR_FONT_DEFAULTS.fontFamily); + let fontWeight = _string(opts.fontWeight, EDITOR_FONT_DEFAULTS.fontWeight); - let fontSize = safeParseFloat(opts.fontSize, DefaultConfig.editor.fontSize); + let fontSize = safeParseFloat(opts.fontSize, EDITOR_FONT_DEFAULTS.fontSize); fontSize = clamp(fontSize, 0, 100); if (fontSize === 0) { - fontSize = DefaultConfig.editor.fontSize; + fontSize = EDITOR_FONT_DEFAULTS.fontSize; + } else if (fontSize < 8) { + fontSize = 8; } let lineHeight = safeParseInt(opts.lineHeight, 0); lineHeight = clamp(lineHeight, 0, 150); if (lineHeight === 0) { lineHeight = Math.round(GOLDEN_LINE_HEIGHT_RATIO * fontSize); + } else if (lineHeight < 8) { + lineHeight = 8; } + let letterSpacing = safeParseFloat(opts.letterSpacing, 0); + letterSpacing = clamp(letterSpacing, -20, 20); + let editorZoomLevelMultiplier = 1 + (EditorZoom.getZoomLevel() * 0.1); fontSize *= editorZoomLevelMultiplier; lineHeight *= editorZoomLevelMultiplier; @@ -76,7 +98,8 @@ export class BareFontInfo { fontFamily: fontFamily, fontWeight: fontWeight, fontSize: fontSize, - lineHeight: lineHeight + lineHeight: lineHeight, + letterSpacing: letterSpacing }); } @@ -85,6 +108,7 @@ export class BareFontInfo { readonly fontWeight: string; readonly fontSize: number; readonly lineHeight: number; + readonly letterSpacing: number; /** * @internal @@ -95,19 +119,21 @@ export class BareFontInfo { fontWeight: string; fontSize: number; lineHeight: number; + letterSpacing: number; }) { this.zoomLevel = opts.zoomLevel; this.fontFamily = String(opts.fontFamily); this.fontWeight = String(opts.fontWeight); this.fontSize = opts.fontSize; this.lineHeight = opts.lineHeight | 0; + this.letterSpacing = opts.letterSpacing; } /** * @internal */ public getId(): string { - return this.zoomLevel + '-' + this.fontFamily + '-' + this.fontWeight + '-' + this.fontSize + '-' + this.lineHeight; + return this.zoomLevel + '-' + this.fontFamily + '-' + this.fontWeight + '-' + this.fontSize + '-' + this.lineHeight + '-' + this.letterSpacing; } } @@ -130,6 +156,7 @@ export class FontInfo extends BareFontInfo { fontWeight: string; fontSize: number; lineHeight: number; + letterSpacing: number; isMonospace: boolean; typicalHalfwidthCharacterWidth: number; typicalFullwidthCharacterWidth: number; @@ -154,17 +181,11 @@ export class FontInfo extends BareFontInfo { && this.fontWeight === other.fontWeight && this.fontSize === other.fontSize && this.lineHeight === other.lineHeight + && this.letterSpacing === other.letterSpacing && this.typicalHalfwidthCharacterWidth === other.typicalHalfwidthCharacterWidth && this.typicalFullwidthCharacterWidth === other.typicalFullwidthCharacterWidth && this.spaceWidth === other.spaceWidth && this.maxDigitWidth === other.maxDigitWidth ); } - - /** - * @internal - */ - public clone(): FontInfo { - return new FontInfo(this, this.isTrusted); - } -} \ No newline at end of file +} diff --git a/src/vs/editor/common/controller/coreCommands.ts b/src/vs/editor/common/controller/coreCommands.ts index 004c19921ecef..3794e7ace1361 100644 --- a/src/vs/editor/common/controller/coreCommands.ts +++ b/src/vs/editor/common/controller/coreCommands.ts @@ -9,11 +9,10 @@ import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { CursorState, ICursors, RevealTarget, IColumnSelectData, CursorContext } from 'vs/editor/common/controller/cursorCommon'; -import { CursorChangeReason, VerticalRevealType } from 'vs/editor/common/controller/cursorEvents'; +import { CursorChangeReason } from 'vs/editor/common/controller/cursorEvents'; import { CursorMoveCommands, CursorMove as CursorMove_ } from 'vs/editor/common/controller/cursorMoveCommands'; -import { EditorCommand, ICommandOptions, Command } from 'vs/editor/common/config/config'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; -import { registerEditorCommand } from 'vs/editor/common/editorCommonExtensions'; +import { registerEditorCommand, ICommandOptions, EditorCommand, Command } from 'vs/editor/common/editorCommonExtensions'; import { IColumnSelectResult, ColumnSelection } from 'vs/editor/common/controller/cursorColumnSelection'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; @@ -24,6 +23,9 @@ import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import * as types from 'vs/base/common/types'; import { ICommandHandlerDescription } from 'vs/platform/commands/common/commands'; import { IEditorService } from 'vs/platform/editor/common/editor'; +import { TypeOperations } from 'vs/editor/common/controller/cursorTypeOperations'; +import { DeleteOperations } from 'vs/editor/common/controller/cursorDeleteOperations'; +import { VerticalRevealType } from 'vs/editor/common/view/viewEvents'; const CORE_WEIGHT = KeybindingsRegistry.WEIGHT.editorCore(); @@ -37,7 +39,7 @@ export abstract class CoreEditorCommand extends EditorCommand { export namespace EditorScroll_ { - const isEditorScrollArgs = function (arg): boolean { + const isEditorScrollArgs = function (arg: any): boolean { if (!types.isObject(arg)) { return false; } @@ -181,7 +183,7 @@ export namespace EditorScroll_ { export namespace RevealLine_ { - const isRevealLineArgs = function (arg): boolean { + const isRevealLineArgs = function (arg: any): boolean { if (!types.isObject(arg)) { return false; } @@ -234,7 +236,7 @@ export namespace RevealLine_ { }; } -export namespace CoreCommands { +export namespace CoreNavigationCommands { class BaseMoveToCommand extends CoreEditorCommand { @@ -710,14 +712,45 @@ export namespace CoreCommands { newState = CursorMoveCommands.moveTo(context, cursors.getPrimaryCursor(), false, args.position, args.viewPosition); } - let newStates = cursors.getAll().slice(0); - newStates.push(newState); + const states = cursors.getAll(); + + // Check if we should remove a cursor (sort of like a toggle) + if (states.length > 1) { + const newModelPosition = (newState.modelState ? newState.modelState.position : null); + const newViewPosition = (newState.viewState ? newState.viewState.position : null); + + for (let i = 0, len = states.length; i < len; i++) { + const state = states[i]; + + if (newModelPosition && !state.modelState.selection.containsPosition(newModelPosition)) { + continue; + } + + if (newViewPosition && !state.viewState.selection.containsPosition(newViewPosition)) { + continue; + } + + // => Remove the cursor + states.splice(i, 1); + + cursors.context.model.pushStackElement(); + cursors.setStates( + args.source, + CursorChangeReason.Explicit, + states + ); + return; + } + } + + // => Add the new cursor + states.push(newState); cursors.context.model.pushStackElement(); cursors.setStates( args.source, CursorChangeReason.Explicit, - newStates + states ); } }); @@ -782,7 +815,7 @@ export namespace CoreCommands { weight: CORE_WEIGHT, kbExpr: EditorContextKeys.textFocus, primary: KeyCode.Home, - mac: { primary: KeyCode.Home, secondary: [KeyMod.CtrlCmd | KeyCode.LeftArrow, KeyMod.WinCtrl | KeyCode.KEY_A] } + mac: { primary: KeyCode.Home, secondary: [KeyMod.CtrlCmd | KeyCode.LeftArrow] } } })); @@ -798,6 +831,44 @@ export namespace CoreCommands { } })); + export const CursorLineStart: CoreEditorCommand = registerEditorCommand(new class extends CoreEditorCommand { + constructor() { + super({ + id: 'cursorLineStart', + precondition: null, + kbOpts: { + weight: CORE_WEIGHT, + kbExpr: EditorContextKeys.textFocus, + primary: 0, + mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_A } + } + }); + } + + public runCoreEditorCommand(cursors: ICursors, args: any): void { + cursors.context.model.pushStackElement(); + cursors.setStates( + args.source, + CursorChangeReason.Explicit, + CursorState.ensureInEditableRange( + cursors.context, + this._exec(cursors.context, cursors.getAll()) + ) + ); + cursors.reveal(true, RevealTarget.Primary); + } + + private _exec(context: CursorContext, cursors: CursorState[]): CursorState[] { + let result: CursorState[] = []; + for (let i = 0, len = cursors.length; i < len; i++) { + const cursor = cursors[i]; + const lineNumber = cursor.modelState.position.lineNumber; + result[i] = CursorState.fromModelState(cursor.modelState.move(false, lineNumber, 1, 0)); + } + return result; + } + }); + class EndCommand extends CoreEditorCommand { private readonly _inSelectionMode: boolean; @@ -829,7 +900,7 @@ export namespace CoreCommands { weight: CORE_WEIGHT, kbExpr: EditorContextKeys.textFocus, primary: KeyCode.End, - mac: { primary: KeyCode.End, secondary: [KeyMod.CtrlCmd | KeyCode.RightArrow, KeyMod.WinCtrl | KeyCode.KEY_E] } + mac: { primary: KeyCode.End, secondary: [KeyMod.CtrlCmd | KeyCode.RightArrow] } } })); @@ -845,6 +916,45 @@ export namespace CoreCommands { } })); + export const CursorLineEnd: CoreEditorCommand = registerEditorCommand(new class extends CoreEditorCommand { + constructor() { + super({ + id: 'cursorLineEnd', + precondition: null, + kbOpts: { + weight: CORE_WEIGHT, + kbExpr: EditorContextKeys.textFocus, + primary: 0, + mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_E } + } + }); + } + + public runCoreEditorCommand(cursors: ICursors, args: any): void { + cursors.context.model.pushStackElement(); + cursors.setStates( + args.source, + CursorChangeReason.Explicit, + CursorState.ensureInEditableRange( + cursors.context, + this._exec(cursors.context, cursors.getAll()) + ) + ); + cursors.reveal(true, RevealTarget.Primary); + } + + private _exec(context: CursorContext, cursors: CursorState[]): CursorState[] { + let result: CursorState[] = []; + for (let i = 0, len = cursors.length; i < len; i++) { + const cursor = cursors[i]; + const lineNumber = cursor.modelState.position.lineNumber; + const maxColumn = context.model.getLineMaxColumn(lineNumber); + result[i] = CursorState.fromModelState(cursor.modelState.move(false, lineNumber, maxColumn, 0)); + } + return result; + } + }); + class TopCommand extends CoreEditorCommand { private readonly _inSelectionMode: boolean; @@ -1372,7 +1482,9 @@ export namespace CoreCommands { } } - cursors.revealRange(false, range, null, revealAt); + const viewRange = cursors.context.convertModelRangeToViewRange(range); + + cursors.revealRange(false, viewRange, revealAt); } }); @@ -1395,103 +1507,148 @@ export namespace CoreCommands { ); } }); -}; - -namespace Config { +} - function findFocusedEditor(accessor: ServicesAccessor): editorCommon.ICommonCodeEditor { - return accessor.get(ICodeEditorService).getFocusedCodeEditor(); - } +export namespace CoreEditingCommands { - function getActiveEditorWidget(accessor: ServicesAccessor): editorCommon.ICommonCodeEditor { - const editorService = accessor.get(IEditorService); - let activeEditor = (editorService).getActiveEditor && (editorService).getActiveEditor(); - return getCodeEditor(activeEditor); - } + export const LineBreakInsert: EditorCommand = registerEditorCommand(new class extends EditorCommand { + constructor() { + super({ + id: 'lineBreakInsert', + precondition: EditorContextKeys.writable, + kbOpts: { + weight: CORE_WEIGHT, + kbExpr: EditorContextKeys.textFocus, + primary: null, + mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_O } + } + }); + } - function withCodeEditorFromCommandHandler(accessor: ServicesAccessor, callback: (editor: editorCommon.ICommonCodeEditor) => void): void { - let editor = findFocusedEditor(accessor); - if (editor) { - callback(editor); + public runEditorCommand(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor, args: any): void { + editor.pushUndoStop(); + editor.executeCommands(this.id, TypeOperations.lineBreakInsert(editor._getCursorConfiguration(), editor.getModel(), editor.getSelections())); } - } + }); - function triggerEditorHandler(handlerId: string, accessor: ServicesAccessor, args: any): void { - withCodeEditorFromCommandHandler(accessor, (editor) => { - editor.trigger('keyboard', handlerId, args); - }); - } + export const Outdent: EditorCommand = registerEditorCommand(new class extends EditorCommand { + constructor() { + super({ + id: 'outdent', + precondition: EditorContextKeys.writable, + kbOpts: { + weight: CORE_WEIGHT, + kbExpr: ContextKeyExpr.and( + EditorContextKeys.textFocus, + EditorContextKeys.tabDoesNotMoveFocus + ), + primary: KeyMod.Shift | KeyCode.Tab + } + }); + } - class CoreCommand extends Command { - public runCommand(accessor: ServicesAccessor, args: any): void { - triggerEditorHandler(this.id, accessor, args); + public runEditorCommand(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor, args: any): void { + editor.pushUndoStop(); + editor.executeCommands(this.id, TypeOperations.outdent(editor._getCursorConfiguration(), editor.getModel(), editor.getSelections())); + editor.pushUndoStop(); } - } + }); - function registerCommand(command: Command) { - KeybindingsRegistry.registerCommandAndKeybindingRule(command.toCommandAndKeybindingRule(CORE_WEIGHT)); - } + export const Tab: EditorCommand = registerEditorCommand(new class extends EditorCommand { + constructor() { + super({ + id: 'tab', + precondition: EditorContextKeys.writable, + kbOpts: { + weight: CORE_WEIGHT, + kbExpr: ContextKeyExpr.and( + EditorContextKeys.textFocus, + EditorContextKeys.tabDoesNotMoveFocus + ), + primary: KeyCode.Tab + } + }); + } - registerCommand(new CoreCommand({ - id: H.Tab, - precondition: EditorContextKeys.writable, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: ContextKeyExpr.and( - EditorContextKeys.textFocus, - EditorContextKeys.tabDoesNotMoveFocus - ), - primary: KeyCode.Tab + public runEditorCommand(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor, args: any): void { + editor.pushUndoStop(); + editor.executeCommands(this.id, TypeOperations.tab(editor._getCursorConfiguration(), editor.getModel(), editor.getSelections())); + editor.pushUndoStop(); } - })); - registerCommand(new CoreCommand({ - id: H.Outdent, - precondition: EditorContextKeys.writable, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: ContextKeyExpr.and( - EditorContextKeys.textFocus, - EditorContextKeys.tabDoesNotMoveFocus - ), - primary: KeyMod.Shift | KeyCode.Tab + }); + + export const DeleteLeft: EditorCommand = registerEditorCommand(new class extends EditorCommand { + constructor() { + super({ + id: 'deleteLeft', + precondition: EditorContextKeys.writable, + kbOpts: { + weight: CORE_WEIGHT, + kbExpr: EditorContextKeys.textFocus, + primary: KeyCode.Backspace, + secondary: [KeyMod.Shift | KeyCode.Backspace], + mac: { primary: KeyCode.Backspace, secondary: [KeyMod.Shift | KeyCode.Backspace, KeyMod.WinCtrl | KeyCode.KEY_H, KeyMod.WinCtrl | KeyCode.Backspace] } + } + }); } - })); - registerCommand(new CoreCommand({ - id: H.DeleteLeft, - precondition: EditorContextKeys.writable, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: EditorContextKeys.textFocus, - primary: KeyCode.Backspace, - secondary: [KeyMod.Shift | KeyCode.Backspace], - mac: { primary: KeyCode.Backspace, secondary: [KeyMod.Shift | KeyCode.Backspace, KeyMod.WinCtrl | KeyCode.KEY_H, KeyMod.WinCtrl | KeyCode.Backspace] } + public runEditorCommand(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor, args: any): void { + const [shouldPushStackElementBefore, commands] = DeleteOperations.deleteLeft(editor._getCursorConfiguration(), editor.getModel(), editor.getSelections()); + if (shouldPushStackElementBefore) { + editor.pushUndoStop(); + } + editor.executeCommands(this.id, commands); } - })); - registerCommand(new CoreCommand({ - id: H.DeleteRight, - precondition: EditorContextKeys.writable, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: EditorContextKeys.textFocus, - primary: KeyCode.Delete, - mac: { primary: KeyCode.Delete, secondary: [KeyMod.WinCtrl | KeyCode.KEY_D, KeyMod.WinCtrl | KeyCode.Delete] } + }); + + export const DeleteRight: EditorCommand = registerEditorCommand(new class extends EditorCommand { + constructor() { + super({ + id: 'deleteRight', + precondition: EditorContextKeys.writable, + kbOpts: { + weight: CORE_WEIGHT, + kbExpr: EditorContextKeys.textFocus, + primary: KeyCode.Delete, + mac: { primary: KeyCode.Delete, secondary: [KeyMod.WinCtrl | KeyCode.KEY_D, KeyMod.WinCtrl | KeyCode.Delete] } + } + }); } - })); - registerCommand(new CoreCommand({ - id: H.LineBreakInsert, - precondition: EditorContextKeys.writable, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: EditorContextKeys.textFocus, - primary: null, - mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_O } + public runEditorCommand(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor, args: any): void { + const [shouldPushStackElementBefore, commands] = DeleteOperations.deleteRight(editor._getCursorConfiguration(), editor.getModel(), editor.getSelections()); + if (shouldPushStackElementBefore) { + editor.pushUndoStop(); + } + editor.executeCommands(this.id, commands); } - })); + }); +} + +namespace Config { + + function findFocusedEditor(accessor: ServicesAccessor): editorCommon.ICommonCodeEditor { + return accessor.get(ICodeEditorService).getFocusedCodeEditor(); + } + + function getWorkbenchActiveEditor(accessor: ServicesAccessor): editorCommon.ICommonCodeEditor { + const editorService = accessor.get(IEditorService); + let activeEditor = (editorService).getActiveEditor && (editorService).getActiveEditor(); + return getCodeEditor(activeEditor); + } + + function registerCommand(command: Command) { + KeybindingsRegistry.registerCommandAndKeybindingRule(command.toCommandAndKeybindingRule(CORE_WEIGHT)); + } - class BaseTextInputAwareCommand extends Command { + /** + * A command that will: + * 1. invoke a command on the focused editor. + * 2. otherwise, invoke a browser built-in command on the `activeElement`. + * 3. otherwise, invoke a command on the workbench active editor. + */ + class EditorOrNativeTextInputCommand extends Command { private readonly _editorHandler: string | EditorCommand; private readonly _inputHandler: string; @@ -1518,7 +1675,7 @@ namespace Config { } // Redirecting to last active editor - let activeEditor = getActiveEditorWidget(accessor); + let activeEditor = getWorkbenchActiveEditor(accessor); if (activeEditor) { activeEditor.focus(); return this._runEditorHandler(activeEditor, args); @@ -1537,8 +1694,8 @@ namespace Config { } } - registerCommand(new BaseTextInputAwareCommand({ - editorHandler: CoreCommands.SelectAll, + registerCommand(new EditorOrNativeTextInputCommand({ + editorHandler: CoreNavigationCommands.SelectAll, inputHandler: 'selectAll', id: 'editor.action.selectAll', precondition: null, @@ -1549,7 +1706,7 @@ namespace Config { } })); - registerCommand(new BaseTextInputAwareCommand({ + registerCommand(new EditorOrNativeTextInputCommand({ editorHandler: H.Undo, inputHandler: 'undo', id: H.Undo, @@ -1561,7 +1718,7 @@ namespace Config { } })); - registerCommand(new BaseTextInputAwareCommand({ + registerCommand(new EditorOrNativeTextInputCommand({ editorHandler: H.Redo, inputHandler: 'redo', id: H.Redo, @@ -1575,4 +1732,41 @@ namespace Config { } })); + /** + * A command that will invoke a command on the focused editor. + */ + class EditorHandlerCommand extends Command { + + private readonly _handlerId: string; + + constructor(id: string, handlerId: string) { + super({ + id: id, + precondition: null + }); + this._handlerId = handlerId; + } + + public runCommand(accessor: ServicesAccessor, args: any): void { + const editor = findFocusedEditor(accessor); + if (!editor) { + return; + } + + editor.trigger('keyboard', this._handlerId, args); + } + } + + function registerOverwritableCommand(handlerId: string): void { + registerCommand(new EditorHandlerCommand('default:' + handlerId, handlerId)); + registerCommand(new EditorHandlerCommand(handlerId, handlerId)); + } + + registerOverwritableCommand(H.Type); + registerOverwritableCommand(H.ReplacePreviousChar); + registerOverwritableCommand(H.CompositionStart); + registerOverwritableCommand(H.CompositionEnd); + registerOverwritableCommand(H.Paste); + registerOverwritableCommand(H.Cut); + } diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index a8098e199dbef..3084299a2fec8 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -7,113 +7,113 @@ import * as nls from 'vs/nls'; import * as strings from 'vs/base/common/strings'; import { onUnexpectedError } from 'vs/base/common/errors'; -import { EventEmitter, BulkListenerCallback } from 'vs/base/common/eventEmitter'; -import { IDisposable, Disposable } from 'vs/base/common/lifecycle'; import { CursorCollection } from 'vs/editor/common/controller/cursorCollection'; import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import { Selection, SelectionDirection, ISelection } from 'vs/editor/common/core/selection'; import * as editorCommon from 'vs/editor/common/editorCommon'; -import { CursorColumns, CursorConfiguration, EditOperationResult, SingleCursorState, IViewModelHelper, CursorContext, CursorState, RevealTarget, IColumnSelectData, ICursors } from 'vs/editor/common/controller/cursorCommon'; +import { CursorColumns, CursorConfiguration, EditOperationResult, CursorContext, CursorState, RevealTarget, IColumnSelectData, ICursors } from 'vs/editor/common/controller/cursorCommon'; import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; import { DeleteOperations } from 'vs/editor/common/controller/cursorDeleteOperations'; import { TypeOperations } from 'vs/editor/common/controller/cursorTypeOperations'; import { TextModelEventType, ModelRawContentChangedEvent, RawContentChangedType } from 'vs/editor/common/model/textModelEvents'; -import { CursorEventType, CursorChangeReason, ICursorPositionChangedEvent, VerticalRevealType, ICursorSelectionChangedEvent, ICursorRevealRangeEvent, CursorScrollRequest } from 'vs/editor/common/controller/cursorEvents'; -import { CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; -import { CoreEditorCommand } from 'vs/editor/common/controller/coreCommands'; - -interface IMultipleCursorOperationContext { - cursorPositionChangeReason: CursorChangeReason; - shouldReveal: boolean; - shouldPushStackElementBefore: boolean; - shouldPushStackElementAfter: boolean; - eventSource: string; - eventData: any; - executeCommands: editorCommon.ICommand[]; - isAutoWhitespaceCommand: boolean[]; -} +import { CursorChangeReason } from 'vs/editor/common/controller/cursorEvents'; +import { IViewModel } from 'vs/editor/common/viewModel/viewModel'; +import * as viewEvents from 'vs/editor/common/view/viewEvents'; +import Event, { Emitter } from 'vs/base/common/event'; +// import { ScreenReaderMessageGenerator } from "vs/editor/common/controller/accGenerator"; -interface IExecContext { - selectionStartMarkers: string[]; - positionMarkers: string[]; +function containsLineMappingChanged(events: viewEvents.ViewEvent[]): boolean { + for (let i = 0, len = events.length; i < len; i++) { + if (events[i].type === viewEvents.ViewEventType.ViewLineMappingChanged) { + return true; + } + } + return false; } -interface ICommandData { - operations: editorCommon.IIdentifiedSingleEditOperation[]; - hadTrackedRange: boolean; +export class CursorStateChangedEvent { + /** + * The new selections. + * The primary selection is always at index 0. + */ + readonly selections: Selection[]; + /** + * Source of the call that caused the event. + */ + readonly source: string; + /** + * Reason. + */ + readonly reason: CursorChangeReason; + + constructor(selections: Selection[], source: string, reason: CursorChangeReason) { + this.selections = selections; + this.source = source; + this.reason = reason; + } } -interface ICommandsData { - operations: editorCommon.IIdentifiedSingleEditOperation[]; - hadTrackedRanges: boolean[]; - anyoneHadTrackedRange: boolean; -} +/** + * A snapshot of the cursor and the model state + */ +export class CursorModelState { -export class Cursor extends Disposable implements ICursors { + public readonly modelVersionId: number; + public readonly cursorState: CursorState[]; - public onDidChangePosition(listener: (e: ICursorPositionChangedEvent) => void): IDisposable { - return this._eventEmitter.addListener(CursorEventType.CursorPositionChanged, listener); + constructor(model: editorCommon.IModel, cursor: Cursor) { + this.modelVersionId = model.getVersionId(); + this.cursorState = cursor.getAll(); } - public onDidChangeSelection(listener: (e: ICursorSelectionChangedEvent) => void): IDisposable { - return this._eventEmitter.addListener(CursorEventType.CursorSelectionChanged, listener); + + public equals(other: CursorModelState): boolean { + if (!other) { + return false; + } + if (this.modelVersionId !== other.modelVersionId) { + return false; + } + if (this.cursorState.length !== other.cursorState.length) { + return false; + } + for (let i = 0, len = this.cursorState.length; i < len; i++) { + if (!this.cursorState[i].equals(other.cursorState[i])) { + return false; + } + } + return true; } +} - private configuration: editorCommon.IConfiguration; - public context: CursorContext; - private model: editorCommon.IModel; - private _eventEmitter: EventEmitter; +export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { - public addBulkListener(listener: BulkListenerCallback): IDisposable { - return this._eventEmitter.addBulkListener(listener); - } + private readonly _onDidChange: Emitter = this._register(new Emitter()); + public readonly onDidChange: Event = this._onDidChange.event; - private cursors: CursorCollection; - private viewModelHelper: IViewModelHelper; + private readonly _configuration: editorCommon.IConfiguration; + private readonly _model: editorCommon.IModel; + private readonly _viewModel: IViewModel; + public context: CursorContext; + private _cursors: CursorCollection; private _isHandling: boolean; private _isDoingComposition: boolean; private _columnSelectData: IColumnSelectData; - private enableEmptySelectionClipboard: boolean; - - private _handlers: { - [key: string]: (ctx: IMultipleCursorOperationContext) => void; - }; - - constructor(configuration: editorCommon.IConfiguration, model: editorCommon.IModel, viewModelHelper: IViewModelHelper, enableEmptySelectionClipboard: boolean) { + constructor(configuration: editorCommon.IConfiguration, model: editorCommon.IModel, viewModel: IViewModel) { super(); - this._eventEmitter = this._register(new EventEmitter()); - this.configuration = configuration; - this.model = model; - this.viewModelHelper = viewModelHelper; - this.enableEmptySelectionClipboard = enableEmptySelectionClipboard; - - const createCursorContext = () => { - const config = new CursorConfiguration( - this.model.getLanguageIdentifier(), - this.model.getOneIndent(), - this.model.getOptions(), - this.configuration - ); - this.context = new CursorContext( - this.model, - this.viewModelHelper, - config - ); - if (this.cursors) { - this.cursors.updateContext(this.context); - } - }; - createCursorContext(); - - this.cursors = new CursorCollection(this.context); + this._configuration = configuration; + this._model = model; + this._viewModel = viewModel; + this.context = new CursorContext(this._configuration, this._model, this._viewModel); + this._cursors = new CursorCollection(this.context); this._isHandling = false; this._isDoingComposition = false; this._columnSelectData = null; - this._register(this.model.addBulkListener((events) => { + this._register(this._model.addBulkListener((events) => { if (this._isHandling) { return; } @@ -126,14 +126,8 @@ export class Cursor extends Disposable implements ICursors { if (eventType === TextModelEventType.ModelRawContentChanged2) { hadContentChange = true; - const changeEvent = event.data; - - for (let j = 0, lenJ = changeEvent.changes.length; j < lenJ; j++) { - const change = changeEvent.changes[j]; - if (change.changeType === RawContentChangedType.Flush) { - hadFlushEvent = true; - } - } + const rawChangeEvent = event.data; + hadFlushEvent = hadFlushEvent || rawChangeEvent.containsEvent(RawContentChangedType.Flush); } } @@ -144,82 +138,63 @@ export class Cursor extends Disposable implements ICursors { this._onModelContentChanged(hadFlushEvent); })); - this._register(this.model.onDidChangeLanguage((e) => { - createCursorContext(); + this._register(viewModel.addEventListener((events: viewEvents.ViewEvent[]) => { + if (!containsLineMappingChanged(events)) { + return; + } + + // Ensure valid state + this.setStates('viewModel', CursorChangeReason.NotSet, this.getAll()); + })); + + const updateCursorContext = () => { + this.context = new CursorContext(this._configuration, this._model, this._viewModel); + this._cursors.updateContext(this.context); + }; + this._register(this._model.onDidChangeLanguage((e) => { + updateCursorContext(); })); this._register(LanguageConfigurationRegistry.onDidChange(() => { // TODO@Alex: react only if certain supports changed? (and if my model's mode changed) - createCursorContext(); + updateCursorContext(); })); this._register(model.onDidChangeOptions(() => { - createCursorContext(); + updateCursorContext(); })); - this._register(this.configuration.onDidChange((e) => { + this._register(this._configuration.onDidChange((e) => { if (CursorConfiguration.shouldRecreate(e)) { - createCursorContext(); + updateCursorContext(); } })); - - this._handlers = {}; - this._registerHandlers(); } public dispose(): void { - this.model = null; - this.cursors.dispose(); - this.cursors = null; - this.configuration = null; - this.viewModelHelper = null; + this._cursors.dispose(); super.dispose(); } + // ------ some getters/setters + public getPrimaryCursor(): CursorState { - return this.cursors.getPrimaryCursor(); + return this._cursors.getPrimaryCursor(); } public getLastAddedCursorIndex(): number { - return this.cursors.getLastAddedCursorIndex(); + return this._cursors.getLastAddedCursorIndex(); } public getAll(): CursorState[] { - return this.cursors.getAll(); + return this._cursors.getAll(); } public setStates(source: string, reason: CursorChangeReason, states: CursorState[]): void { - const oldSelections = this.cursors.getSelections(); - const oldViewSelections = this.cursors.getViewSelections(); - - // TODO@Alex - // ensure valid state on all cursors - // this.cursors.ensureValidState(); + const oldState = new CursorModelState(this._model, this); - this.cursors.setStates(states); - this.cursors.normalize(); + this._cursors.setStates(states); + this._cursors.normalize(); this._columnSelectData = null; - const newSelections = this.cursors.getSelections(); - const newViewSelections = this.cursors.getViewSelections(); - - let somethingChanged = false; - if (oldSelections.length !== newSelections.length) { - somethingChanged = true; - } else { - for (let i = 0, len = oldSelections.length; !somethingChanged && i < len; i++) { - if (!oldSelections[i].equalsSelection(newSelections[i])) { - somethingChanged = true; - } - } - for (let i = 0, len = oldViewSelections.length; !somethingChanged && i < len; i++) { - if (!oldViewSelections[i].equalsSelection(newViewSelections[i])) { - somethingChanged = true; - } - } - } - - if (somethingChanged) { - this.emitCursorPositionChanged(source, reason); - this.emitCursorSelectionChanged(source, reason); - } + this._emitStateChangedIfNecessary(source, reason, oldState); } public setColumnSelectData(columnSelectData: IColumnSelectData): void { @@ -227,27 +202,26 @@ export class Cursor extends Disposable implements ICursors { } public reveal(horizontal: boolean, target: RevealTarget): void { - this._revealRange(target, VerticalRevealType.Simple, horizontal); + this._revealRange(target, viewEvents.VerticalRevealType.Simple, horizontal); } - public revealRange(revealHorizontal: boolean, modelRange: Range, viewRange: Range, verticalType: VerticalRevealType) { - this.emitCursorRevealRange(modelRange, viewRange, verticalType, revealHorizontal); + public revealRange(revealHorizontal: boolean, viewRange: Range, verticalType: viewEvents.VerticalRevealType) { + this.emitCursorRevealRange(viewRange, verticalType, revealHorizontal); } public scrollTo(desiredScrollTop: number): void { - this._eventEmitter.emit(CursorEventType.CursorScrollRequest, new CursorScrollRequest( - desiredScrollTop - )); + this._viewModel.viewLayout.setScrollPosition({ + scrollTop: desiredScrollTop + }); } public saveState(): editorCommon.ICursorState[] { - var selections = this.cursors.getSelections(), - result: editorCommon.ICursorState[] = [], - selection: Selection; + let result: editorCommon.ICursorState[] = []; - for (var i = 0; i < selections.length; i++) { - selection = selections[i]; + const selections = this._cursors.getSelections(); + for (let i = 0, len = selections.length; i < len; i++) { + const selection = selections[i]; result.push({ inSelectionMode: !selection.isEmpty(), @@ -267,13 +241,13 @@ export class Cursor extends Disposable implements ICursors { public restoreState(states: editorCommon.ICursorState[]): void { - var desiredSelections: ISelection[] = [], - state: editorCommon.ICursorState; + let desiredSelections: ISelection[] = []; - for (var i = 0; i < states.length; i++) { - state = states[i]; + for (let i = 0, len = states.length; i < len; i++) { + const state = states[i]; - var positionLineNumber = 1, positionColumn = 1; + let positionLineNumber = 1; + let positionColumn = 1; // Avoid missing properties on the literal if (state.position && state.position.lineNumber) { @@ -283,7 +257,8 @@ export class Cursor extends Disposable implements ICursors { positionColumn = state.position.column; } - var selectionStartLineNumber = positionLineNumber, selectionStartColumn = positionColumn; + let selectionStartLineNumber = positionLineNumber; + let selectionStartColumn = positionColumn; // Avoid missing properties on the literal if (state.selectionStart && state.selectionStart.lineNumber) { @@ -301,430 +276,416 @@ export class Cursor extends Disposable implements ICursors { }); } - this._onHandler('restoreState', (ctx: IMultipleCursorOperationContext) => { - this.cursors.setSelections(desiredSelections); - return false; - }, 'restoreState', null); + this.setStates('restoreState', CursorChangeReason.NotSet, CursorState.fromModelSelections(desiredSelections)); + this.reveal(true, RevealTarget.Primary); } private _onModelContentChanged(hadFlushEvent: boolean): void { if (hadFlushEvent) { // a model.setValue() was called - this.cursors.dispose(); - - this.cursors = new CursorCollection(this.context); + this._cursors.dispose(); + this._cursors = new CursorCollection(this.context); - this.emitCursorPositionChanged('model', CursorChangeReason.ContentFlush); - this.emitCursorSelectionChanged('model', CursorChangeReason.ContentFlush); + this._emitStateChangedIfNecessary('model', CursorChangeReason.ContentFlush, null); } else { - if (!this._isHandling) { - // Read the markers before entering `_onHandler`, since that would validate - // the position and ruin the markers - const selectionsFromMarkers = this.cursors.readSelectionFromMarkers(); - this._onHandler('recoverSelectionFromMarkers', (ctx: IMultipleCursorOperationContext) => { - ctx.cursorPositionChangeReason = CursorChangeReason.RecoverFromMarkers; - ctx.shouldReveal = false; - ctx.shouldPushStackElementBefore = false; - ctx.shouldPushStackElementAfter = false; - this.cursors.setSelections(selectionsFromMarkers); - }, 'modelChange', null); - } + const selectionsFromMarkers = this._cursors.readSelectionFromMarkers(); + this.setStates('modelChange', CursorChangeReason.RecoverFromMarkers, CursorState.fromModelSelections(selectionsFromMarkers)); } } - // ------ some getters/setters - public getSelection(): Selection { - return this.cursors.getPrimaryCursor().modelState.selection; + return this._cursors.getPrimaryCursor().modelState.selection; + } + + public getColumnSelectData(): IColumnSelectData { + if (this._columnSelectData) { + return this._columnSelectData; + } + const primaryCursor = this._cursors.getPrimaryCursor(); + const primaryPos = primaryCursor.viewState.position; + return { + toViewLineNumber: primaryPos.lineNumber, + toViewVisualColumn: CursorColumns.visibleColumnFromColumn2(this.context.config, this.context.viewModel, primaryPos) + }; } public getSelections(): Selection[] { - return this.cursors.getSelections(); + return this._cursors.getSelections(); + } + + public getViewSelections(): Selection[] { + return this._cursors.getViewSelections(); } public getPosition(): Position { - return this.cursors.getPrimaryCursor().modelState.position; + return this._cursors.getPrimaryCursor().modelState.position; } public setSelections(source: string, selections: ISelection[]): void { - this._onHandler('setSelections', (ctx: IMultipleCursorOperationContext) => { - ctx.shouldReveal = false; - this.cursors.setSelections(selections); - return false; - }, source, null); + this.setStates(source, CursorChangeReason.NotSet, CursorState.fromModelSelections(selections)); } // ------ auxiliary handling logic - private _createAndInterpretHandlerCtx(eventSource: string, eventData: any, callback: (currentHandlerCtx: IMultipleCursorOperationContext) => void): void { + private _executeEditOperation(opResult: EditOperationResult): void { - var ctx: IMultipleCursorOperationContext = { - cursorPositionChangeReason: CursorChangeReason.NotSet, - shouldReveal: true, - eventSource: eventSource, - eventData: eventData, - executeCommands: [], - isAutoWhitespaceCommand: [], - shouldPushStackElementBefore: false, - shouldPushStackElementAfter: false - }; + if (!opResult) { + // Nothing to execute + return; + } - callback(ctx); + if (this._configuration.editor.readOnly) { + // Cannot execute when read only + return; + } + + if (opResult.shouldPushStackElementBefore) { + this._model.pushStackElement(); + } + + const result = CommandExecutor.executeCommands(this._model, this._cursors.getSelections(), opResult.commands); + if (result) { + // The commands were applied correctly + this._interpretCommandResult(result); + } - this._interpretHandlerContext(ctx); - this.cursors.normalize(); + if (opResult.shouldPushStackElementAfter) { + this._model.pushStackElement(); + } } - private _onHandler(command: string, handler: (ctx: IMultipleCursorOperationContext) => void, source: string, data: any): void { + private _interpretCommandResult(cursorState: Selection[]): void { + if (!cursorState || cursorState.length === 0) { + return; + } - this._isHandling = true; + this._columnSelectData = null; + this._cursors.setSelections(cursorState); + this._cursors.normalize(); + } - try { - const oldSelections = this.cursors.getSelections(); - const oldViewSelections = this.cursors.getViewSelections(); + // ----------------------------------------------------------------------------------------------------------- + // ----- emitting events - // ensure valid state on all cursors - this.cursors.ensureValidState(); + private _emitStateChangedIfNecessary(source: string, reason: CursorChangeReason, oldState: CursorModelState): boolean { + const newState = new CursorModelState(this._model, this); + if (newState.equals(oldState)) { + return false; + } - let cursorPositionChangeReason: CursorChangeReason; - let shouldReveal: boolean; - this._createAndInterpretHandlerCtx(source, data, (currentHandlerCtx: IMultipleCursorOperationContext) => { - handler(currentHandlerCtx); + let isInEditableRange: boolean = true; + if (this._model.hasEditableRange()) { + const editableRange = this._model.getEditableRange(); + if (!editableRange.containsPosition(newState.cursorState[0].modelState.position)) { + isInEditableRange = false; + } + } - cursorPositionChangeReason = currentHandlerCtx.cursorPositionChangeReason; - shouldReveal = currentHandlerCtx.shouldReveal; - }); + const selections = this._cursors.getSelections(); + const viewSelections = this._cursors.getViewSelections(); - const newSelections = this.cursors.getSelections(); - const newViewSelections = this.cursors.getViewSelections(); + let screenReaderMessage: string = null; + // if (oldState) { + // screenReaderMessage = ScreenReaderMessageGenerator.generateMessage( + // source, + // this._model, + // oldState.modelVersionId, + // oldState.cursorState[0].modelState.selection, + // newState.modelVersionId, + // newState.cursorState[0].modelState.selection + // ); + // } - let somethingChanged = false; - if (oldSelections.length !== newSelections.length) { - somethingChanged = true; - } else { - for (let i = 0, len = oldSelections.length; !somethingChanged && i < len; i++) { - if (!oldSelections[i].equalsSelection(newSelections[i])) { - somethingChanged = true; - } - } - for (let i = 0, len = oldViewSelections.length; !somethingChanged && i < len; i++) { - if (!oldViewSelections[i].equalsSelection(newViewSelections[i])) { - somethingChanged = true; - } - } - } + // Let the view get the event first. + this._emit([new viewEvents.ViewCursorStateChangedEvent(viewSelections, isInEditableRange, screenReaderMessage)]); + + // Only after the view has been notified, let the rest of the world know... + this._onDidChange.fire(new CursorStateChangedEvent(selections, source || 'keyboard', reason)); - if (somethingChanged) { - this.emitCursorPositionChanged(source, cursorPositionChangeReason); + return true; + } - if (shouldReveal) { - this._revealRange(RevealTarget.Primary, VerticalRevealType.Simple, true); + private _revealRange(revealTarget: RevealTarget, verticalType: viewEvents.VerticalRevealType, revealHorizontal: boolean): void { + const viewPositions = this._cursors.getViewPositions(); + + let viewPosition = viewPositions[0]; + + if (revealTarget === RevealTarget.TopMost) { + for (let i = 1; i < viewPositions.length; i++) { + if (viewPositions[i].isBefore(viewPosition)) { + viewPosition = viewPositions[i]; } - this.emitCursorSelectionChanged(source, cursorPositionChangeReason); } - - } catch (err) { - onUnexpectedError(err); + } else if (revealTarget === RevealTarget.BottomMost) { + for (let i = 1; i < viewPositions.length; i++) { + if (viewPosition.isBeforeOrEqual(viewPositions[i])) { + viewPosition = viewPositions[i]; + } + } + } else { + if (viewPositions.length > 1) { + // no revealing! + return; + } } - this._isHandling = false; + const viewRange = new Range(viewPosition.lineNumber, viewPosition.column, viewPosition.lineNumber, viewPosition.column); + this.emitCursorRevealRange(viewRange, verticalType, revealHorizontal); } - private _interpretHandlerContext(ctx: IMultipleCursorOperationContext): void { - if (ctx.shouldPushStackElementBefore) { - this.model.pushStackElement(); - ctx.shouldPushStackElementBefore = false; - } + public emitCursorRevealRange(viewRange: Range, verticalType: viewEvents.VerticalRevealType, revealHorizontal: boolean) { + this._emit([new viewEvents.ViewRevealRangeRequestEvent(viewRange, verticalType, revealHorizontal)]); + } - this._columnSelectData = null; + // ----------------------------------------------------------------------------------------------------------- + // ----- handlers beyond this point - this._internalExecuteCommands(ctx.executeCommands, ctx.isAutoWhitespaceCommand); - ctx.executeCommands = []; + public trigger(source: string, handlerId: string, payload: any): void { + const H = editorCommon.Handler; - if (ctx.shouldPushStackElementAfter) { - this.model.pushStackElement(); - ctx.shouldPushStackElementAfter = false; + if (handlerId === H.CompositionStart) { + this._isDoingComposition = true; + return; } - } - private _interpretCommandResult(cursorState: Selection[]): void { - if (!cursorState || cursorState.length === 0) { + if (handlerId === H.CompositionEnd) { + this._isDoingComposition = false; return; } - this.cursors.setSelections(cursorState); - } - - private _getEditOperationsFromCommand(ctx: IExecContext, majorIdentifier: number, command: editorCommon.ICommand, isAutoWhitespaceCommand: boolean): ICommandData { - // This method acts as a transaction, if the command fails - // everything it has done is ignored - var operations: editorCommon.IIdentifiedSingleEditOperation[] = [], - operationMinor = 0; + const oldState = new CursorModelState(this._model, this); + let cursorChangeReason = CursorChangeReason.NotSet; - var addEditOperation = (selection: Range, text: string) => { - if (selection.isEmpty() && text === '') { - // This command wants to add a no-op => no thank you - return; - } - operations.push({ - identifier: { - major: majorIdentifier, - minor: operationMinor++ - }, - range: selection, - text: text, - forceMoveMarkers: false, - isAutoWhitespaceEdit: isAutoWhitespaceCommand - }); - }; + // ensure valid state on all cursors + this._cursors.ensureValidState(); - var hadTrackedRange = false; - var trackSelection = (selection: Selection, trackPreviousOnEmpty?: boolean) => { - var selectionMarkerStickToPreviousCharacter: boolean, - positionMarkerStickToPreviousCharacter: boolean; + this._isHandling = true; - if (selection.isEmpty()) { - // Try to lock it with surrounding text - if (typeof trackPreviousOnEmpty === 'boolean') { - selectionMarkerStickToPreviousCharacter = trackPreviousOnEmpty; - positionMarkerStickToPreviousCharacter = trackPreviousOnEmpty; - } else { - var maxLineColumn = this.model.getLineMaxColumn(selection.startLineNumber); - if (selection.startColumn === maxLineColumn) { - selectionMarkerStickToPreviousCharacter = true; - positionMarkerStickToPreviousCharacter = true; - } else { - selectionMarkerStickToPreviousCharacter = false; - positionMarkerStickToPreviousCharacter = false; - } - } - } else { - if (selection.getDirection() === SelectionDirection.LTR) { - selectionMarkerStickToPreviousCharacter = false; - positionMarkerStickToPreviousCharacter = true; - } else { - selectionMarkerStickToPreviousCharacter = true; - positionMarkerStickToPreviousCharacter = false; - } + try { + switch (handlerId) { + case H.Type: + this._type(source, payload.text); + break; + + case H.ReplacePreviousChar: + this._replacePreviousChar(payload.text, payload.replaceCharCnt); + break; + + case H.Paste: + cursorChangeReason = CursorChangeReason.Paste; + this._paste(payload.text, payload.pasteOnNewLine); + break; + + case H.Cut: + this._cut(); + break; + + case H.Undo: + cursorChangeReason = CursorChangeReason.Undo; + this._interpretCommandResult(this._model.undo()); + break; + + case H.Redo: + cursorChangeReason = CursorChangeReason.Redo; + this._interpretCommandResult(this._model.redo()); + break; + + case H.ExecuteCommand: + this._externalExecuteCommand(payload); + break; + + case H.ExecuteCommands: + this._externalExecuteCommands(payload); + break; } + } catch (err) { + onUnexpectedError(err); + } - var l = ctx.selectionStartMarkers.length; - ctx.selectionStartMarkers[l] = this.model._addMarker(0, selection.selectionStartLineNumber, selection.selectionStartColumn, selectionMarkerStickToPreviousCharacter); - ctx.positionMarkers[l] = this.model._addMarker(0, selection.positionLineNumber, selection.positionColumn, positionMarkerStickToPreviousCharacter); - return l.toString(); - }; - - var editOperationBuilder: editorCommon.IEditOperationBuilder = { - addEditOperation: addEditOperation, - trackSelection: trackSelection - }; + this._isHandling = false; - try { - command.getEditOperations(this.model, editOperationBuilder); - } catch (e) { - e.friendlyMessage = nls.localize('corrupt.commands', "Unexpected exception while executing command."); - onUnexpectedError(e); - return { - operations: [], - hadTrackedRange: false - }; + if (this._emitStateChangedIfNecessary(source, cursorChangeReason, oldState)) { + this._revealRange(RevealTarget.Primary, viewEvents.VerticalRevealType.Simple, true); } - - return { - operations: operations, - hadTrackedRange: hadTrackedRange - }; } - private _getEditOperations(ctx: IExecContext, commands: editorCommon.ICommand[], isAutoWhitespaceCommand: boolean[]): ICommandsData { - var oneResult: ICommandData; - var operations: editorCommon.IIdentifiedSingleEditOperation[] = []; - var hadTrackedRanges: boolean[] = []; - var anyoneHadTrackedRange: boolean; + private _type(source: string, text: string): void { + if (!this._isDoingComposition && source === 'keyboard') { + // If this event is coming straight from the keyboard, look for electric characters and enter - for (var i = 0; i < commands.length; i++) { - if (commands[i]) { - oneResult = this._getEditOperationsFromCommand(ctx, i, commands[i], isAutoWhitespaceCommand[i]); - operations = operations.concat(oneResult.operations); - hadTrackedRanges[i] = oneResult.hadTrackedRange; - anyoneHadTrackedRange = anyoneHadTrackedRange || hadTrackedRanges[i]; - } else { - hadTrackedRanges[i] = false; + for (let i = 0, len = text.length; i < len; i++) { + let charCode = text.charCodeAt(i); + let chr: string; + if (strings.isHighSurrogate(charCode) && i + 1 < len) { + chr = text.charAt(i) + text.charAt(i + 1); + i++; + } else { + chr = text.charAt(i); + } + + // Here we must interpret each typed character individually, that's why we create a new context + this._executeEditOperation(TypeOperations.typeWithInterceptors(this.context.config, this.context.model, this.getSelections(), chr)); } + + } else { + this._executeEditOperation(TypeOperations.typeWithoutInterceptors(this.context.config, this.context.model, this.getSelections(), text)); } - return { - operations: operations, - hadTrackedRanges: hadTrackedRanges, - anyoneHadTrackedRange: anyoneHadTrackedRange - }; } - private _getLoserCursorMap(operations: editorCommon.IIdentifiedSingleEditOperation[]): { [index: string]: boolean; } { - // This is destructive on the array - operations = operations.slice(0); + private _replacePreviousChar(text: string, replaceCharCnt: number): void { + this._executeEditOperation(TypeOperations.replacePreviousChar(this.context.config, this.context.model, this.getSelections(), text, replaceCharCnt)); + } - // Sort operations with last one first - operations.sort((a: editorCommon.IIdentifiedSingleEditOperation, b: editorCommon.IIdentifiedSingleEditOperation): number => { - // Note the minus! - return -(Range.compareRangesUsingEnds(a.range, b.range)); - }); + private _paste(text: string, pasteOnNewLine: boolean): void { + this._executeEditOperation(TypeOperations.paste(this.context.config, this.context.model, this.getSelections(), pasteOnNewLine, text)); + } - // Operations can not overlap! - var loserCursorsMap: { [index: string]: boolean; } = {}; + private _cut(): void { + this._executeEditOperation(DeleteOperations.cut(this.context.config, this.context.model, this.getSelections())); + } - var previousOp: editorCommon.IIdentifiedSingleEditOperation; - var currentOp: editorCommon.IIdentifiedSingleEditOperation; - var loserMajor: number; + private _externalExecuteCommand(command: editorCommon.ICommand): void { + this._cursors.killSecondaryCursors(); - for (var i = 1; i < operations.length; i++) { - previousOp = operations[i - 1]; - currentOp = operations[i]; + this._executeEditOperation(new EditOperationResult([command], { + shouldPushStackElementBefore: false, + shouldPushStackElementAfter: false + })); + } - if (previousOp.range.getStartPosition().isBefore(currentOp.range.getEndPosition())) { + private _externalExecuteCommands(commands: editorCommon.ICommand[]): void { + this._executeEditOperation(new EditOperationResult(commands, { + shouldPushStackElementBefore: false, + shouldPushStackElementAfter: false + })); + } +} - if (previousOp.identifier.major > currentOp.identifier.major) { - // previousOp loses the battle - loserMajor = previousOp.identifier.major; - } else { - loserMajor = currentOp.identifier.major; - } +interface IExecContext { + readonly model: editorCommon.IModel; + readonly selectionsBefore: Selection[]; + readonly selectionStartMarkers: string[]; + readonly positionMarkers: string[]; +} - loserCursorsMap[loserMajor.toString()] = true; +interface ICommandData { + operations: editorCommon.IIdentifiedSingleEditOperation[]; + hadTrackedEditOperation: boolean; +} - for (var j = 0; j < operations.length; j++) { - if (operations[j].identifier.major === loserMajor) { - operations.splice(j, 1); - if (j < i) { - i--; - } - j--; - } - } +interface ICommandsData { + operations: editorCommon.IIdentifiedSingleEditOperation[]; + hadTrackedEditOperation: boolean; +} - if (i > 0) { - i--; - } - } - } +class CommandExecutor { - return loserCursorsMap; - } + public static executeCommands(model: editorCommon.IModel, selectionsBefore: Selection[], commands: editorCommon.ICommand[]): Selection[] { - private _internalExecuteCommands(commands: editorCommon.ICommand[], isAutoWhitespaceCommand: boolean[]): void { - var ctx: IExecContext = { + const ctx: IExecContext = { + model: model, + selectionsBefore: selectionsBefore, selectionStartMarkers: [], positionMarkers: [] }; - this._innerExecuteCommands(ctx, commands, isAutoWhitespaceCommand); - for (var i = 0; i < ctx.selectionStartMarkers.length; i++) { - this.model._removeMarker(ctx.selectionStartMarkers[i]); - this.model._removeMarker(ctx.positionMarkers[i]); - } - } + const result = this._innerExecuteCommands(ctx, commands); - private _arrayIsEmpty(commands: editorCommon.ICommand[]): boolean { - var i: number, - len: number; - - for (i = 0, len = commands.length; i < len; i++) { - if (commands[i]) { - return false; - } + for (let i = 0; i < ctx.selectionStartMarkers.length; i++) { + ctx.model._removeMarker(ctx.selectionStartMarkers[i]); + ctx.model._removeMarker(ctx.positionMarkers[i]); } - return true; + return result; } - private _innerExecuteCommands(ctx: IExecContext, commands: editorCommon.ICommand[], isAutoWhitespaceCommand: boolean[]): void { - - if (this.configuration.editor.readOnly) { - return; - } + private static _innerExecuteCommands(ctx: IExecContext, commands: editorCommon.ICommand[]): Selection[] { if (this._arrayIsEmpty(commands)) { - return; + return null; } - var selectionsBefore = this.cursors.getSelections(); - - var commandsData = this._getEditOperations(ctx, commands, isAutoWhitespaceCommand); - if (commandsData.operations.length === 0 && !commandsData.anyoneHadTrackedRange) { - return; + const commandsData = this._getEditOperations(ctx, commands); + if (commandsData.operations.length === 0) { + return null; } - var rawOperations = commandsData.operations; + const rawOperations = commandsData.operations; - var editableRange = this.model.getEditableRange(); - var editableRangeStart = editableRange.getStartPosition(); - var editableRangeEnd = editableRange.getEndPosition(); - for (var i = 0; i < rawOperations.length; i++) { - var operationRange = rawOperations[i].range; + const editableRange = ctx.model.getEditableRange(); + const editableRangeStart = editableRange.getStartPosition(); + const editableRangeEnd = editableRange.getEndPosition(); + for (let i = 0, len = rawOperations.length; i < len; i++) { + const operationRange = rawOperations[i].range; if (!editableRangeStart.isBeforeOrEqual(operationRange.getStartPosition()) || !operationRange.getEndPosition().isBeforeOrEqual(editableRangeEnd)) { // These commands are outside of the editable range - return; + return null; } } - var loserCursorsMap = this._getLoserCursorMap(rawOperations); + const loserCursorsMap = this._getLoserCursorMap(rawOperations); if (loserCursorsMap.hasOwnProperty('0')) { // These commands are very messed up console.warn('Ignoring commands'); - return; + return null; } // Remove operations belonging to losing cursors - var filteredOperations: editorCommon.IIdentifiedSingleEditOperation[] = []; - for (var i = 0; i < rawOperations.length; i++) { + let filteredOperations: editorCommon.IIdentifiedSingleEditOperation[] = []; + for (let i = 0, len = rawOperations.length; i < len; i++) { if (!loserCursorsMap.hasOwnProperty(rawOperations[i].identifier.major.toString())) { filteredOperations.push(rawOperations[i]); } } - var selectionsAfter = this.model.pushEditOperations(selectionsBefore, filteredOperations, (inverseEditOperations: editorCommon.IIdentifiedSingleEditOperation[]): Selection[] => { - var groupedInverseEditOperations: editorCommon.IIdentifiedSingleEditOperation[][] = []; - for (var i = 0; i < selectionsBefore.length; i++) { + // TODO@Alex: find a better way to do this. + // give the hint that edit operations are tracked to the model + if (commandsData.hadTrackedEditOperation && filteredOperations.length > 0) { + filteredOperations[0]._isTracked = true; + } + const selectionsAfter = ctx.model.pushEditOperations(ctx.selectionsBefore, filteredOperations, (inverseEditOperations: editorCommon.IIdentifiedSingleEditOperation[]): Selection[] => { + let groupedInverseEditOperations: editorCommon.IIdentifiedSingleEditOperation[][] = []; + for (let i = 0; i < ctx.selectionsBefore.length; i++) { groupedInverseEditOperations[i] = []; } - for (var i = 0; i < inverseEditOperations.length; i++) { - var op = inverseEditOperations[i]; + for (let i = 0; i < inverseEditOperations.length; i++) { + const op = inverseEditOperations[i]; if (!op.identifier) { // perhaps auto whitespace trim edits continue; } groupedInverseEditOperations[op.identifier.major].push(op); } - var minorBasedSorter = (a: editorCommon.IIdentifiedSingleEditOperation, b: editorCommon.IIdentifiedSingleEditOperation) => { + const minorBasedSorter = (a: editorCommon.IIdentifiedSingleEditOperation, b: editorCommon.IIdentifiedSingleEditOperation) => { return a.identifier.minor - b.identifier.minor; }; - var cursorSelections: Selection[] = []; - for (var i = 0; i < selectionsBefore.length; i++) { - if (groupedInverseEditOperations[i].length > 0 || commandsData.hadTrackedRanges[i]) { + let cursorSelections: Selection[] = []; + for (let i = 0; i < ctx.selectionsBefore.length; i++) { + if (groupedInverseEditOperations[i].length > 0) { groupedInverseEditOperations[i].sort(minorBasedSorter); - cursorSelections[i] = commands[i].computeCursorState(this.model, { + cursorSelections[i] = commands[i].computeCursorState(ctx.model, { getInverseEditOperations: () => { return groupedInverseEditOperations[i]; }, getTrackedSelection: (id: string) => { - var idx = parseInt(id, 10); - var selectionStartMarker = this.model._getMarker(ctx.selectionStartMarkers[idx]); - var positionMarker = this.model._getMarker(ctx.positionMarkers[idx]); + const idx = parseInt(id, 10); + const selectionStartMarker = ctx.model._getMarker(ctx.selectionStartMarkers[idx]); + const positionMarker = ctx.model._getMarker(ctx.positionMarkers[idx]); return new Selection(selectionStartMarker.lineNumber, selectionStartMarker.column, positionMarker.lineNumber, positionMarker.column); } }); } else { - cursorSelections[i] = selectionsBefore[i]; + cursorSelections[i] = ctx.selectionsBefore[i]; } } return cursorSelections; }); // Extract losing cursors - var losingCursorIndex: string; - var losingCursors: number[] = []; - for (losingCursorIndex in loserCursorsMap) { + let losingCursors: number[] = []; + for (let losingCursorIndex in loserCursorsMap) { if (loserCursorsMap.hasOwnProperty(losingCursorIndex)) { losingCursors.push(parseInt(losingCursorIndex, 10)); } @@ -736,353 +697,172 @@ export class Cursor extends Disposable implements ICursors { }); // Remove losing cursors - for (var i = 0; i < losingCursors.length; i++) { + for (let i = 0; i < losingCursors.length; i++) { selectionsAfter.splice(losingCursors[i], 1); } - this._interpretCommandResult(selectionsAfter); + return selectionsAfter; } - - // ----------------------------------------------------------------------------------------------------------- - // ----- emitting events - - private emitCursorPositionChanged(source: string, reason: CursorChangeReason): void { - var positions = this.cursors.getPositions(); - var primaryPosition = positions[0]; - var secondaryPositions = positions.slice(1); - - var viewPositions = this.cursors.getViewPositions(); - var primaryViewPosition = viewPositions[0]; - var secondaryViewPositions = viewPositions.slice(1); - - var isInEditableRange: boolean = true; - if (this.model.hasEditableRange()) { - var editableRange = this.model.getEditableRange(); - if (!editableRange.containsPosition(primaryPosition)) { - isInEditableRange = false; + private static _arrayIsEmpty(commands: editorCommon.ICommand[]): boolean { + for (let i = 0, len = commands.length; i < len; i++) { + if (commands[i]) { + return false; } } - var e: ICursorPositionChangedEvent = { - position: primaryPosition, - viewPosition: primaryViewPosition, - secondaryPositions: secondaryPositions, - secondaryViewPositions: secondaryViewPositions, - reason: reason, - source: source, - isInEditableRange: isInEditableRange - }; - this._eventEmitter.emit(CursorEventType.CursorPositionChanged, e); - } - - private emitCursorSelectionChanged(source: string, reason: CursorChangeReason): void { - let selections = this.cursors.getSelections(); - let primarySelection = selections[0]; - let secondarySelections = selections.slice(1); - - let viewSelections = this.cursors.getViewSelections(); - let primaryViewSelection = viewSelections[0]; - let secondaryViewSelections = viewSelections.slice(1); - - let e: ICursorSelectionChangedEvent = { - selection: primarySelection, - viewSelection: primaryViewSelection, - secondarySelections: secondarySelections, - secondaryViewSelections: secondaryViewSelections, - source: source || 'keyboard', - reason: reason - }; - this._eventEmitter.emit(CursorEventType.CursorSelectionChanged, e); + return true; } - private _revealRange(revealTarget: RevealTarget, verticalType: VerticalRevealType, revealHorizontal: boolean): void { - var positions = this.cursors.getPositions(); - var viewPositions = this.cursors.getViewPositions(); + private static _getEditOperations(ctx: IExecContext, commands: editorCommon.ICommand[]): ICommandsData { + let operations: editorCommon.IIdentifiedSingleEditOperation[] = []; + let hadTrackedEditOperation: boolean = false; - var position = positions[0]; - var viewPosition = viewPositions[0]; - - if (revealTarget === RevealTarget.TopMost) { - for (var i = 1; i < positions.length; i++) { - if (positions[i].isBefore(position)) { - position = positions[i]; - viewPosition = viewPositions[i]; - } - } - } else if (revealTarget === RevealTarget.BottomMost) { - for (var i = 1; i < positions.length; i++) { - if (position.isBeforeOrEqual(positions[i])) { - position = positions[i]; - viewPosition = viewPositions[i]; - } - } - } else { - if (positions.length > 1) { - // no revealing! - return; + for (let i = 0, len = commands.length; i < len; i++) { + if (commands[i]) { + const r = this._getEditOperationsFromCommand(ctx, i, commands[i]); + operations = operations.concat(r.operations); + hadTrackedEditOperation = hadTrackedEditOperation || r.hadTrackedEditOperation; } } - - var range = new Range(position.lineNumber, position.column, position.lineNumber, position.column); - var viewRange = new Range(viewPosition.lineNumber, viewPosition.column, viewPosition.lineNumber, viewPosition.column); - this.emitCursorRevealRange(range, viewRange, verticalType, revealHorizontal); - } - - public emitCursorRevealRange(range: Range, viewRange: Range, verticalType: VerticalRevealType, revealHorizontal: boolean) { - var e: ICursorRevealRangeEvent = { - range: range, - viewRange: viewRange, - verticalType: verticalType, - revealHorizontal: revealHorizontal + return { + operations: operations, + hadTrackedEditOperation: hadTrackedEditOperation }; - this._eventEmitter.emit(CursorEventType.CursorRevealRange, e); } - // ----------------------------------------------------------------------------------------------------------- - // ----- handlers beyond this point + private static _getEditOperationsFromCommand(ctx: IExecContext, majorIdentifier: number, command: editorCommon.ICommand): ICommandData { + // This method acts as a transaction, if the command fails + // everything it has done is ignored + let operations: editorCommon.IIdentifiedSingleEditOperation[] = []; + let operationMinor = 0; - public trigger(source: string, handlerId: string, payload: any): void { - if (!this._handlers.hasOwnProperty(handlerId)) { - const command = CommonEditorRegistry.getEditorCommand(handlerId); - if (!command || !(command instanceof CoreEditorCommand)) { + const addEditOperation = (selection: Range, text: string) => { + if (selection.isEmpty() && text === '') { + // This command wants to add a no-op => no thank you return; } + operations.push({ + identifier: { + major: majorIdentifier, + minor: operationMinor++ + }, + range: selection, + text: text, + forceMoveMarkers: false, + isAutoWhitespaceEdit: command.insertsAutoWhitespace + }); + }; - payload = payload || {}; - payload.source = source; - command.runCoreEditorCommand(this, payload); - return; - } - let handler = this._handlers[handlerId]; - this._onHandler(handlerId, handler, source, payload); - } - - private _registerHandlers(): void { - let H = editorCommon.Handler; - - this._handlers[H.LineInsertBefore] = (ctx) => this._lineInsertBefore(ctx); - this._handlers[H.LineInsertAfter] = (ctx) => this._lineInsertAfter(ctx); - this._handlers[H.LineBreakInsert] = (ctx) => this._lineBreakInsert(ctx); - - this._handlers[H.Type] = (ctx) => this._type(ctx); - this._handlers[H.ReplacePreviousChar] = (ctx) => this._replacePreviousChar(ctx); - this._handlers[H.CompositionStart] = (ctx) => this._compositionStart(ctx); - this._handlers[H.CompositionEnd] = (ctx) => this._compositionEnd(ctx); - this._handlers[H.Tab] = (ctx) => this._tab(ctx); - this._handlers[H.Indent] = (ctx) => this._indent(ctx); - this._handlers[H.Outdent] = (ctx) => this._outdent(ctx); - this._handlers[H.Paste] = (ctx) => this._paste(ctx); + let hadTrackedEditOperation = false; + const addTrackedEditOperation = (selection: Range, text: string) => { + hadTrackedEditOperation = true; + addEditOperation(selection, text); + }; - this._handlers[H.DeleteLeft] = (ctx) => this._deleteLeft(ctx); - this._handlers[H.DeleteRight] = (ctx) => this._deleteRight(ctx); + const trackSelection = (selection: Selection, trackPreviousOnEmpty?: boolean) => { + let selectionMarkerStickToPreviousCharacter: boolean; + let positionMarkerStickToPreviousCharacter: boolean; - this._handlers[H.Cut] = (ctx) => this._cut(ctx); + if (selection.isEmpty()) { + // Try to lock it with surrounding text + if (typeof trackPreviousOnEmpty === 'boolean') { + selectionMarkerStickToPreviousCharacter = trackPreviousOnEmpty; + positionMarkerStickToPreviousCharacter = trackPreviousOnEmpty; + } else { + const maxLineColumn = ctx.model.getLineMaxColumn(selection.startLineNumber); + if (selection.startColumn === maxLineColumn) { + selectionMarkerStickToPreviousCharacter = true; + positionMarkerStickToPreviousCharacter = true; + } else { + selectionMarkerStickToPreviousCharacter = false; + positionMarkerStickToPreviousCharacter = false; + } + } + } else { + if (selection.getDirection() === SelectionDirection.LTR) { + selectionMarkerStickToPreviousCharacter = false; + positionMarkerStickToPreviousCharacter = true; + } else { + selectionMarkerStickToPreviousCharacter = true; + positionMarkerStickToPreviousCharacter = false; + } + } - this._handlers[H.Undo] = (ctx) => this._undo(ctx); - this._handlers[H.Redo] = (ctx) => this._redo(ctx); + const l = ctx.selectionStartMarkers.length; + ctx.selectionStartMarkers[l] = ctx.model._addMarker(0, selection.selectionStartLineNumber, selection.selectionStartColumn, selectionMarkerStickToPreviousCharacter); + ctx.positionMarkers[l] = ctx.model._addMarker(0, selection.positionLineNumber, selection.positionColumn, positionMarkerStickToPreviousCharacter); + return l.toString(); + }; - this._handlers[H.ExecuteCommand] = (ctx) => this._externalExecuteCommand(ctx); - this._handlers[H.ExecuteCommands] = (ctx) => this._externalExecuteCommands(ctx); - } + const editOperationBuilder: editorCommon.IEditOperationBuilder = { + addEditOperation: addEditOperation, + addTrackedEditOperation: addTrackedEditOperation, + trackSelection: trackSelection + }; - public getColumnSelectData(): IColumnSelectData { - if (this._columnSelectData) { - return this._columnSelectData; + try { + command.getEditOperations(ctx.model, editOperationBuilder); + } catch (e) { + e.friendlyMessage = nls.localize('corrupt.commands', "Unexpected exception while executing command."); + onUnexpectedError(e); + return { + operations: [], + hadTrackedEditOperation: false + }; } - const primaryCursor = this.cursors.getPrimaryCursor(); - const primaryPos = primaryCursor.viewState.position; + return { - toViewLineNumber: primaryPos.lineNumber, - toViewVisualColumn: CursorColumns.visibleColumnFromColumn2(this.context.config, this.context.viewModel, primaryPos) + operations: operations, + hadTrackedEditOperation: hadTrackedEditOperation }; } - // -------------------- START editing operations - - private _applyEdits(ctx: IMultipleCursorOperationContext, edits: EditOperationResult): void { - ctx.shouldReveal = true; - ctx.shouldPushStackElementBefore = edits.shouldPushStackElementBefore; - ctx.shouldPushStackElementAfter = edits.shouldPushStackElementAfter; - - const commands = edits.commands; - for (let i = 0, len = commands.length; i < len; i++) { - const command = commands[i]; - ctx.executeCommands[i] = command ? command.command : null; - ctx.isAutoWhitespaceCommand[i] = command ? command.isAutoWhitespaceCommand : false; - } - } - - private _getAllCursorsModelState(sorted: boolean = false): SingleCursorState[] { - let cursors = this.cursors.getAll(); - - if (sorted) { - cursors = cursors.sort((a, b) => { - return Range.compareRangesUsingStarts(a.modelState.selection, b.modelState.selection); - }); - } - - let r: SingleCursorState[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - r[i] = cursors[i].modelState; - } - return r; - } + private static _getLoserCursorMap(operations: editorCommon.IIdentifiedSingleEditOperation[]): { [index: string]: boolean; } { + // This is destructive on the array + operations = operations.slice(0); - private _lineInsertBefore(ctx: IMultipleCursorOperationContext): void { - this._applyEdits(ctx, TypeOperations.lineInsertBefore(this.context.config, this.context.model, this._getAllCursorsModelState())); - } + // Sort operations with last one first + operations.sort((a: editorCommon.IIdentifiedSingleEditOperation, b: editorCommon.IIdentifiedSingleEditOperation): number => { + // Note the minus! + return -(Range.compareRangesUsingEnds(a.range, b.range)); + }); - private _lineInsertAfter(ctx: IMultipleCursorOperationContext): void { - this._applyEdits(ctx, TypeOperations.lineInsertAfter(this.context.config, this.context.model, this._getAllCursorsModelState())); - } + // Operations can not overlap! + let loserCursorsMap: { [index: string]: boolean; } = {}; - private _lineBreakInsert(ctx: IMultipleCursorOperationContext): void { - this._applyEdits(ctx, TypeOperations.lineBreakInsert(this.context.config, this.context.model, this._getAllCursorsModelState())); - } + for (let i = 1; i < operations.length; i++) { + const previousOp = operations[i - 1]; + const currentOp = operations[i]; - private _type(ctx: IMultipleCursorOperationContext): void { - var text = ctx.eventData.text; + if (previousOp.range.getStartPosition().isBefore(currentOp.range.getEndPosition())) { - if (!this._isDoingComposition && ctx.eventSource === 'keyboard') { - // If this event is coming straight from the keyboard, look for electric characters and enter + let loserMajor: number; - for (let i = 0, len = text.length; i < len; i++) { - let charCode = text.charCodeAt(i); - let chr: string; - if (strings.isHighSurrogate(charCode) && i + 1 < len) { - chr = text.charAt(i) + text.charAt(i + 1); - i++; + if (previousOp.identifier.major > currentOp.identifier.major) { + // previousOp loses the battle + loserMajor = previousOp.identifier.major; } else { - chr = text.charAt(i); + loserMajor = currentOp.identifier.major; } - // Here we must interpret each typed character individually, that's why we create a new context - this._createAndInterpretHandlerCtx(ctx.eventSource, ctx.eventData, (charHandlerCtx: IMultipleCursorOperationContext) => { - - // Decide what all cursors will do up-front - this._applyEdits(charHandlerCtx, TypeOperations.typeWithInterceptors(this.context.config, this.context.model, this._getAllCursorsModelState(), chr)); - - // The last typed character gets to win - ctx.cursorPositionChangeReason = charHandlerCtx.cursorPositionChangeReason; - ctx.shouldReveal = charHandlerCtx.shouldReveal; - }); - - } - } else { - this._applyEdits(ctx, TypeOperations.typeWithoutInterceptors(this.context.config, this.context.model, this._getAllCursorsModelState(), text)); - } - } - - private _replacePreviousChar(ctx: IMultipleCursorOperationContext): void { - let text = ctx.eventData.text; - let replaceCharCnt = ctx.eventData.replaceCharCnt; - this._applyEdits(ctx, TypeOperations.replacePreviousChar(this.context.config, this.context.model, this._getAllCursorsModelState(), text, replaceCharCnt)); - } - - private _compositionStart(ctx: IMultipleCursorOperationContext): void { - this._isDoingComposition = true; - } - - private _compositionEnd(ctx: IMultipleCursorOperationContext): void { - this._isDoingComposition = false; - } - - private _tab(ctx: IMultipleCursorOperationContext): void { - this._applyEdits(ctx, TypeOperations.tab(this.context.config, this.context.model, this._getAllCursorsModelState())); - } - - private _indent(ctx: IMultipleCursorOperationContext): void { - this._applyEdits(ctx, TypeOperations.indent(this.context.config, this.context.model, this._getAllCursorsModelState())); - } - - private _outdent(ctx: IMultipleCursorOperationContext): void { - this._applyEdits(ctx, TypeOperations.outdent(this.context.config, this.context.model, this._getAllCursorsModelState())); - } - - private _distributePasteToCursors(ctx: IMultipleCursorOperationContext): string[] { - if (ctx.eventData.pasteOnNewLine) { - return null; - } + loserCursorsMap[loserMajor.toString()] = true; - var selections = this.cursors.getSelections(); - if (selections.length === 1) { - return null; - } + for (let j = 0; j < operations.length; j++) { + if (operations[j].identifier.major === loserMajor) { + operations.splice(j, 1); + if (j < i) { + i--; + } + j--; + } + } - for (var i = 0; i < selections.length; i++) { - if (selections[i].startLineNumber !== selections[i].endLineNumber) { - return null; + if (i > 0) { + i--; + } } } - var pastePieces = ctx.eventData.text.split(/\r\n|\r|\n/); - if (pastePieces.length !== selections.length) { - return null; - } - - return pastePieces; - } - - private _paste(ctx: IMultipleCursorOperationContext): void { - var distributedPaste = this._distributePasteToCursors(ctx); - - ctx.cursorPositionChangeReason = CursorChangeReason.Paste; - if (distributedPaste) { - this._applyEdits(ctx, TypeOperations.distributedPaste(this.context.config, this.context.model, this._getAllCursorsModelState(true), distributedPaste)); - } else { - this._applyEdits(ctx, TypeOperations.paste(this.context.config, this.context.model, this._getAllCursorsModelState(), ctx.eventData.text, ctx.eventData.pasteOnNewLine)); - } - } - - private _deleteLeft(ctx: IMultipleCursorOperationContext): void { - this._applyEdits(ctx, DeleteOperations.deleteLeft(this.context.config, this.context.model, this._getAllCursorsModelState())); - } - - private _deleteRight(ctx: IMultipleCursorOperationContext): void { - this._applyEdits(ctx, DeleteOperations.deleteRight(this.context.config, this.context.model, this._getAllCursorsModelState())); - } - - private _cut(ctx: IMultipleCursorOperationContext): void { - this._applyEdits(ctx, DeleteOperations.cut(this.context.config, this.context.model, this._getAllCursorsModelState(), this.enableEmptySelectionClipboard)); - } - - // -------------------- END editing operations - - private _undo(ctx: IMultipleCursorOperationContext): void { - ctx.cursorPositionChangeReason = CursorChangeReason.Undo; - this._interpretCommandResult(this.model.undo()); - } - - private _redo(ctx: IMultipleCursorOperationContext): void { - ctx.cursorPositionChangeReason = CursorChangeReason.Redo; - this._interpretCommandResult(this.model.redo()); - } - - private _externalExecuteCommand(ctx: IMultipleCursorOperationContext): void { - const command = ctx.eventData; - - this.cursors.killSecondaryCursors(); - - ctx.shouldReveal = true; - - ctx.shouldPushStackElementBefore = true; - ctx.shouldPushStackElementAfter = true; - - ctx.executeCommands[0] = command; - ctx.isAutoWhitespaceCommand[0] = false; - } - - private _externalExecuteCommands(ctx: IMultipleCursorOperationContext): void { - const commands = ctx.eventData; - - ctx.shouldReveal = true; - - ctx.shouldPushStackElementBefore = true; - ctx.shouldPushStackElementAfter = true; - - for (let i = 0; i < commands.length; i++) { - ctx.executeCommands[i] = commands[i]; - ctx.isAutoWhitespaceCommand[i] = false; - } + return loserCursorsMap; } } diff --git a/src/vs/editor/common/controller/cursorCollection.ts b/src/vs/editor/common/controller/cursorCollection.ts index 49633b4b90fbe..9fcae512f2f9d 100644 --- a/src/vs/editor/common/controller/cursorCollection.ts +++ b/src/vs/editor/common/controller/cursorCollection.ts @@ -51,13 +51,6 @@ export class CursorCollection { return result; } - private _getAll(): OneCursor[] { - var result: OneCursor[] = []; - result.push(this.primaryCursor); - result = result.concat(this.secondaryCursors); - return result; - } - public getAll(): CursorState[] { let result: CursorState[] = []; result[0] = this.primaryCursor.asCursorState(); @@ -67,45 +60,35 @@ export class CursorCollection { return result; } - public getPositions(): Position[] { - var result: Position[] = []; - result.push(this.primaryCursor.modelState.position); - for (var i = 0, len = this.secondaryCursors.length; i < len; i++) { - result.push(this.secondaryCursors[i].modelState.position); - } - return result; - } - public getViewPositions(): Position[] { - var result: Position[] = []; - result.push(this.primaryCursor.viewState.position); - for (var i = 0, len = this.secondaryCursors.length; i < len; i++) { - result.push(this.secondaryCursors[i].viewState.position); + let result: Position[] = []; + result[0] = this.primaryCursor.viewState.position; + for (let i = 0, len = this.secondaryCursors.length; i < len; i++) { + result[i + 1] = this.secondaryCursors[i].viewState.position; } return result; } public getSelections(): Selection[] { - var result: Selection[] = []; - result.push(this.primaryCursor.modelState.selection); - for (var i = 0, len = this.secondaryCursors.length; i < len; i++) { - result.push(this.secondaryCursors[i].modelState.selection); + let result: Selection[] = []; + result[0] = this.primaryCursor.modelState.selection; + for (let i = 0, len = this.secondaryCursors.length; i < len; i++) { + result[i + 1] = this.secondaryCursors[i].modelState.selection; } return result; } public getViewSelections(): Selection[] { - var result: Selection[] = []; - result.push(this.primaryCursor.viewState.selection); - for (var i = 0, len = this.secondaryCursors.length; i < len; i++) { - result.push(this.secondaryCursors[i].viewState.selection); + let result: Selection[] = []; + result[0] = this.primaryCursor.viewState.selection; + for (let i = 0, len = this.secondaryCursors.length; i < len; i++) { + result[i + 1] = this.secondaryCursors[i].viewState.selection; } return result; } public setSelections(selections: ISelection[]): void { - this.primaryCursor.setSelection(this.context, selections[0]); - this._setSecondarySelections(selections.slice(1)); + this.setStates(CursorState.fromModelSelections(selections)); } public getPrimaryCursor(): CursorState { @@ -130,7 +113,7 @@ export class CursorCollection { if (secondaryCursorsLength < secondaryStatesLength) { let createCnt = secondaryStatesLength - secondaryCursorsLength; for (let i = 0; i < createCnt; i++) { - this._addSecondaryCursor(null); + this._addSecondaryCursor(); } } else if (secondaryCursorsLength > secondaryStatesLength) { let removeCnt = secondaryCursorsLength - secondaryStatesLength; @@ -144,20 +127,12 @@ export class CursorCollection { } } - public killSecondaryCursors(): boolean { - return (this._setSecondarySelections([]) > 0); - } - - public normalize(): void { - this._mergeCursorsIfNecessary(); + public killSecondaryCursors(): void { + this._setSecondaryStates([]); } - private _addSecondaryCursor(selection: ISelection): void { - var newCursor = new OneCursor(this.context); - if (selection) { - newCursor.setSelection(this.context, selection); - } - this.secondaryCursors.push(newCursor); + private _addSecondaryCursor(): void { + this.secondaryCursors.push(new OneCursor(this.context)); this.lastAddedCursorIndex = this.secondaryCursors.length; } @@ -168,39 +143,6 @@ export class CursorCollection { return this.lastAddedCursorIndex; } - /** - * Creates or disposes secondary cursors as necessary to match the number of `secondarySelections`. - * Return value: - * - a positive number indicates the number of secondary cursors added - * - a negative number indicates the number of secondary cursors removed - * - 0 indicates that no changes have been done to the secondary cursors list - */ - private _setSecondarySelections(secondarySelections: ISelection[]): number { - var secondaryCursorsLength = this.secondaryCursors.length; - var secondarySelectionsLength = secondarySelections.length; - var returnValue = secondarySelectionsLength - secondaryCursorsLength; - - if (secondaryCursorsLength < secondarySelectionsLength) { - var createCnt = secondarySelectionsLength - secondaryCursorsLength; - for (var i = 0; i < createCnt; i++) { - this._addSecondaryCursor(null); - } - } else if (secondaryCursorsLength > secondarySelectionsLength) { - var removeCnt = secondaryCursorsLength - secondarySelectionsLength; - for (var i = 0; i < removeCnt; i++) { - this._removeSecondaryCursor(this.secondaryCursors.length - 1); - } - } - - for (var i = 0; i < secondarySelectionsLength; i++) { - if (secondarySelections[i]) { - this.secondaryCursors[i].setSelection(this.context, secondarySelections[i]); - } - } - - return returnValue; - } - private _removeSecondaryCursor(removeIndex: number): void { if (this.lastAddedCursorIndex >= removeIndex + 1) { this.lastAddedCursorIndex--; @@ -209,24 +151,34 @@ export class CursorCollection { this.secondaryCursors.splice(removeIndex, 1); } - private _mergeCursorsIfNecessary(): void { + private _getAll(): OneCursor[] { + let result: OneCursor[] = []; + result[0] = this.primaryCursor; + for (let i = 0, len = this.secondaryCursors.length; i < len; i++) { + result[i + 1] = this.secondaryCursors[i]; + } + return result; + } + + public normalize(): void { if (this.secondaryCursors.length === 0) { return; } - var cursors = this._getAll(); - var sortedCursors: { + let cursors = this._getAll(); + + interface SortedCursor { index: number; selection: Selection; viewSelection: Selection; - }[] = []; - for (var i = 0; i < cursors.length; i++) { + } + let sortedCursors: SortedCursor[] = []; + for (let i = 0, len = cursors.length; i < len; i++) { sortedCursors.push({ index: i, selection: cursors[i].modelState.selection, viewSelection: cursors[i].viewState.selection }); } - sortedCursors.sort((a, b) => { if (a.viewSelection.startLineNumber === b.viewSelection.startLineNumber) { return a.viewSelection.startColumn - b.viewSelection.startColumn; @@ -234,30 +186,39 @@ export class CursorCollection { return a.viewSelection.startLineNumber - b.viewSelection.startLineNumber; }); - for (var sortedCursorIndex = 0; sortedCursorIndex < sortedCursors.length - 1; sortedCursorIndex++) { - var current = sortedCursors[sortedCursorIndex]; - var next = sortedCursors[sortedCursorIndex + 1]; + for (let sortedCursorIndex = 0; sortedCursorIndex < sortedCursors.length - 1; sortedCursorIndex++) { + const current = sortedCursors[sortedCursorIndex]; + const next = sortedCursors[sortedCursorIndex + 1]; - var currentViewSelection = current.viewSelection; - var nextViewSelection = next.viewSelection; + const currentViewSelection = current.viewSelection; + const nextViewSelection = next.viewSelection; + + let shouldMergeCursors: boolean; + if (nextViewSelection.isEmpty() || currentViewSelection.isEmpty()) { + // Merge touching cursors if one of them is collapsed + shouldMergeCursors = nextViewSelection.getStartPosition().isBeforeOrEqual(currentViewSelection.getEndPosition()); + } else { + // Merge only overlapping cursors (i.e. allow touching ranges) + shouldMergeCursors = nextViewSelection.getStartPosition().isBefore(currentViewSelection.getEndPosition()); + } - if (nextViewSelection.getStartPosition().isBeforeOrEqual(currentViewSelection.getEndPosition())) { - var winnerSortedCursorIndex = current.index < next.index ? sortedCursorIndex : sortedCursorIndex + 1; - var looserSortedCursorIndex = current.index < next.index ? sortedCursorIndex + 1 : sortedCursorIndex; + if (shouldMergeCursors) { + const winnerSortedCursorIndex = current.index < next.index ? sortedCursorIndex : sortedCursorIndex + 1; + const looserSortedCursorIndex = current.index < next.index ? sortedCursorIndex + 1 : sortedCursorIndex; - var looserIndex = sortedCursors[looserSortedCursorIndex].index; - var winnerIndex = sortedCursors[winnerSortedCursorIndex].index; + const looserIndex = sortedCursors[looserSortedCursorIndex].index; + const winnerIndex = sortedCursors[winnerSortedCursorIndex].index; - var looserSelection = sortedCursors[looserSortedCursorIndex].selection; - var winnerSelection = sortedCursors[winnerSortedCursorIndex].selection; + const looserSelection = sortedCursors[looserSortedCursorIndex].selection; + const winnerSelection = sortedCursors[winnerSortedCursorIndex].selection; if (!looserSelection.equalsSelection(winnerSelection)) { - var resultingRange = looserSelection.plusRange(winnerSelection); - var looserSelectionIsLTR = (looserSelection.selectionStartLineNumber === looserSelection.startLineNumber && looserSelection.selectionStartColumn === looserSelection.startColumn); - var winnerSelectionIsLTR = (winnerSelection.selectionStartLineNumber === winnerSelection.startLineNumber && winnerSelection.selectionStartColumn === winnerSelection.startColumn); + const resultingRange = looserSelection.plusRange(winnerSelection); + const looserSelectionIsLTR = (looserSelection.selectionStartLineNumber === looserSelection.startLineNumber && looserSelection.selectionStartColumn === looserSelection.startColumn); + const winnerSelectionIsLTR = (winnerSelection.selectionStartLineNumber === winnerSelection.startLineNumber && winnerSelection.selectionStartColumn === winnerSelection.startColumn); // Give more importance to the last added cursor (think Ctrl-dragging + hitting another cursor) - var resultingSelectionIsLTR: boolean; + let resultingSelectionIsLTR: boolean; if (looserIndex === this.lastAddedCursorIndex) { resultingSelectionIsLTR = looserSelectionIsLTR; this.lastAddedCursorIndex = winnerIndex; @@ -266,7 +227,7 @@ export class CursorCollection { resultingSelectionIsLTR = winnerSelectionIsLTR; } - var resultingSelection: Selection; + let resultingSelection: Selection; if (resultingSelectionIsLTR) { resultingSelection = new Selection(resultingRange.startLineNumber, resultingRange.startColumn, resultingRange.endLineNumber, resultingRange.endColumn); } else { @@ -274,10 +235,11 @@ export class CursorCollection { } sortedCursors[winnerSortedCursorIndex].selection = resultingSelection; - cursors[winnerIndex].setSelection(this.context, resultingSelection); + const resultingState = CursorState.fromModelSelection(resultingSelection); + cursors[winnerIndex].setState(this.context, resultingState.modelState, resultingState.viewState); } - for (var j = 0; j < sortedCursors.length; j++) { + for (let j = 0; j < sortedCursors.length; j++) { if (sortedCursors[j].index > looserIndex) { sortedCursors[j].index--; } diff --git a/src/vs/editor/common/controller/cursorCommon.ts b/src/vs/editor/common/controller/cursorCommon.ts index dd98c3479d4eb..eb7b37719647c 100644 --- a/src/vs/editor/common/controller/cursorCommon.ts +++ b/src/vs/editor/common/controller/cursorCommon.ts @@ -9,15 +9,16 @@ import { CharCode } from 'vs/base/common/charCode'; import * as strings from 'vs/base/common/strings'; import { ICommand, TextModelResolvedOptions, IConfiguration, IModel } from 'vs/editor/common/editorCommon'; import { TextModel } from 'vs/editor/common/model/textModel'; -import { Selection } from 'vs/editor/common/core/selection'; +import { Selection, ISelection } from 'vs/editor/common/core/selection'; import { Range } from 'vs/editor/common/core/range'; import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; import { onUnexpectedError } from 'vs/base/common/errors'; import { LanguageIdentifier } from 'vs/editor/common/modes'; import { IAutoClosingPair } from 'vs/editor/common/modes/languageConfiguration'; import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; -import { ICoordinatesConverter } from 'vs/editor/common/viewModel/viewModel'; -import { CursorChangeReason, VerticalRevealType } from 'vs/editor/common/controller/cursorEvents'; +import { IViewModel } from 'vs/editor/common/viewModel/viewModel'; +import { CursorChangeReason } from 'vs/editor/common/controller/cursorEvents'; +import { VerticalRevealType } from 'vs/editor/common/view/viewEvents'; export interface IColumnSelectData { toViewLineNumber: number; @@ -41,7 +42,7 @@ export interface ICursors { setStates(source: string, reason: CursorChangeReason, states: CursorState[]): void; reveal(horizontal: boolean, target: RevealTarget): void; - revealRange(revealHorizontal: boolean, modelRange: Range, viewRange: Range, verticalType: VerticalRevealType); + revealRange(revealHorizontal: boolean, viewRange: Range, verticalType: VerticalRevealType): void; scrollTo(desiredScrollTop: number): void; } @@ -61,7 +62,9 @@ export class CursorConfiguration { public readonly lineHeight: number; public readonly useTabStops: boolean; public readonly wordSeparators: string; + public readonly emptySelectionClipboard: boolean; public readonly autoClosingBrackets: boolean; + public readonly autoIndent: boolean; public readonly autoClosingPairsOpen: CharacterMap; public readonly autoClosingPairsClose: CharacterMap; public readonly surroundingPairs: CharacterMap; @@ -71,6 +74,7 @@ export class CursorConfiguration { return ( e.layoutInfo || e.wordSeparators + || e.emptySelectionClipboard || e.autoClosingBrackets || e.useTabStops || e.lineHeight @@ -94,7 +98,9 @@ export class CursorConfiguration { this.lineHeight = c.lineHeight; this.useTabStops = c.useTabStops; this.wordSeparators = c.wordSeparators; + this.emptySelectionClipboard = c.emptySelectionClipboard; this.autoClosingBrackets = c.autoClosingBrackets; + this.autoIndent = c.autoIndent; this.autoClosingPairsOpen = {}; this.autoClosingPairsClose = {}; @@ -256,87 +262,72 @@ export class SingleCursorState { } } -export interface IViewModelHelper { - - coordinatesConverter: ICoordinatesConverter; - - viewModel: ICursorSimpleModel; - - getScrollTop(): number; - - getCompletelyVisibleViewRange(): Range; - - getCompletelyVisibleViewRangeAtScrollTop(scrollTop: number): Range; - - getVerticalOffsetForViewLineNumber(viewLineNumber: number): number; -} - export class CursorContext { _cursorContextBrand: void; public readonly model: IModel; - public readonly viewModel: ICursorSimpleModel; + public readonly viewModel: IViewModel; public readonly config: CursorConfiguration; - private readonly _viewModelHelper: IViewModelHelper; - private readonly _coordinatesConverter: ICoordinatesConverter; - - constructor(model: IModel, viewModelHelper: IViewModelHelper, config: CursorConfiguration) { + constructor(configuration: IConfiguration, model: IModel, viewModel: IViewModel) { this.model = model; - this.viewModel = viewModelHelper.viewModel; - this.config = config; - this._viewModelHelper = viewModelHelper; - this._coordinatesConverter = viewModelHelper.coordinatesConverter; + this.viewModel = viewModel; + this.config = new CursorConfiguration( + this.model.getLanguageIdentifier(), + this.model.getOneIndent(), + this.model.getOptions(), + configuration + ); } public validateViewPosition(viewPosition: Position, modelPosition: Position): Position { - return this._coordinatesConverter.validateViewPosition(viewPosition, modelPosition); + return this.viewModel.coordinatesConverter.validateViewPosition(viewPosition, modelPosition); } public validateViewRange(viewRange: Range, expectedModelRange: Range): Range { - return this._coordinatesConverter.validateViewRange(viewRange, expectedModelRange); + return this.viewModel.coordinatesConverter.validateViewRange(viewRange, expectedModelRange); } public convertViewRangeToModelRange(viewRange: Range): Range { - return this._coordinatesConverter.convertViewRangeToModelRange(viewRange); + return this.viewModel.coordinatesConverter.convertViewRangeToModelRange(viewRange); } public convertViewPositionToModelPosition(lineNumber: number, column: number): Position { - return this._coordinatesConverter.convertViewPositionToModelPosition(new Position(lineNumber, column)); + return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Position(lineNumber, column)); } public convertModelPositionToViewPosition(modelPosition: Position): Position { - return this._coordinatesConverter.convertModelPositionToViewPosition(modelPosition); + return this.viewModel.coordinatesConverter.convertModelPositionToViewPosition(modelPosition); } public convertModelRangeToViewRange(modelRange: Range): Range { - return this._coordinatesConverter.convertModelRangeToViewRange(modelRange); + return this.viewModel.coordinatesConverter.convertModelRangeToViewRange(modelRange); } public getScrollTop(): number { - return this._viewModelHelper.getScrollTop(); + return this.viewModel.viewLayout.getScrollTop(); } public getCompletelyVisibleViewRange(): Range { - return this._viewModelHelper.getCompletelyVisibleViewRange(); + return this.viewModel.getCompletelyVisibleViewRange(); } public getCompletelyVisibleModelRange(): Range { - const viewRange = this._viewModelHelper.getCompletelyVisibleViewRange(); - return this._coordinatesConverter.convertViewRangeToModelRange(viewRange); + const viewRange = this.viewModel.getCompletelyVisibleViewRange(); + return this.viewModel.coordinatesConverter.convertViewRangeToModelRange(viewRange); } public getCompletelyVisibleViewRangeAtScrollTop(scrollTop: number): Range { - return this._viewModelHelper.getCompletelyVisibleViewRangeAtScrollTop(scrollTop); + return this.viewModel.getCompletelyVisibleViewRangeAtScrollTop(scrollTop); } public getCompletelyVisibleModelRangeAtScrollTop(scrollTop: number): Range { - const viewRange = this._viewModelHelper.getCompletelyVisibleViewRangeAtScrollTop(scrollTop); - return this._coordinatesConverter.convertViewRangeToModelRange(viewRange); + const viewRange = this.viewModel.getCompletelyVisibleViewRangeAtScrollTop(scrollTop); + return this.viewModel.coordinatesConverter.convertViewRangeToModelRange(viewRange); } public getVerticalOffsetForViewLine(viewLineNumber: number): number { - return this._viewModelHelper.getVerticalOffsetForViewLineNumber(viewLineNumber); + return this.viewModel.viewLayout.getVerticalOffsetForLineNumber(viewLineNumber); } } @@ -351,6 +342,26 @@ export class CursorState { return new CursorState(null, viewState); } + public static fromModelSelection(modelSelection: ISelection): CursorState { + const selectionStartLineNumber = modelSelection.selectionStartLineNumber; + const selectionStartColumn = modelSelection.selectionStartColumn; + const positionLineNumber = modelSelection.positionLineNumber; + const positionColumn = modelSelection.positionColumn; + const modelState = new SingleCursorState( + new Range(selectionStartLineNumber, selectionStartColumn, selectionStartLineNumber, selectionStartColumn), 0, + new Position(positionLineNumber, positionColumn), 0 + ); + return CursorState.fromModelState(modelState); + } + + public static fromModelSelections(modelSelections: ISelection[]): CursorState[] { + let states: CursorState[] = []; + for (let i = 0, len = modelSelections.length; i < len; i++) { + states[i] = this.fromModelSelection(modelSelections[i]); + } + return states; + } + public static ensureInEditableRange(context: CursorContext, states: CursorState[]): CursorState[] { const model = context.model; if (!model.hasEditableRange()) { @@ -402,29 +413,21 @@ export class CursorState { this.modelState = modelState; this.viewState = viewState; } -} - -export class CommandResult { - _commandResultBrand: void; - - readonly command: ICommand; - readonly isAutoWhitespaceCommand: boolean; - constructor(command: ICommand, isAutoWhitespaceCommand: boolean) { - this.command = command; - this.isAutoWhitespaceCommand = isAutoWhitespaceCommand; + public equals(other: CursorState): boolean { + return (this.viewState.equals(other.viewState) && this.modelState.equals(other.viewState)); } } export class EditOperationResult { _editOperationResultBrand: void; - readonly commands: CommandResult[]; + readonly commands: ICommand[]; readonly shouldPushStackElementBefore: boolean; readonly shouldPushStackElementAfter: boolean; constructor( - commands: CommandResult[], + commands: ICommand[], opts: { shouldPushStackElementBefore: boolean; shouldPushStackElementAfter: boolean; diff --git a/src/vs/editor/common/controller/cursorDeleteOperations.ts b/src/vs/editor/common/controller/cursorDeleteOperations.ts index ffcfaf8530d90..7951ab91b83e9 100644 --- a/src/vs/editor/common/controller/cursorDeleteOperations.ts +++ b/src/vs/editor/common/controller/cursorDeleteOperations.ts @@ -5,23 +5,25 @@ 'use strict'; import { ReplaceCommand } from 'vs/editor/common/commands/replaceCommand'; -import { SingleCursorState, CursorColumns, CursorConfiguration, ICursorSimpleModel, EditOperationResult, CommandResult } from 'vs/editor/common/controller/cursorCommon'; +import { CursorColumns, CursorConfiguration, ICursorSimpleModel, EditOperationResult } from 'vs/editor/common/controller/cursorCommon'; import { Range } from 'vs/editor/common/core/range'; +import { Selection } from 'vs/editor/common/core/selection'; import { MoveOperations } from 'vs/editor/common/controller/cursorMoveOperations'; import * as strings from 'vs/base/common/strings'; +import { ICommand } from 'vs/editor/common/editorCommon'; export class DeleteOperations { - public static deleteRight(config: CursorConfiguration, model: ICursorSimpleModel, cursors: SingleCursorState[]): EditOperationResult { - let commands: CommandResult[] = []; + public static deleteRight(config: CursorConfiguration, model: ICursorSimpleModel, selections: Selection[]): [boolean, ICommand[]] { + let commands: ICommand[] = []; let shouldPushStackElementBefore = false; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; + for (let i = 0, len = selections.length; i < len; i++) { + const selection = selections[i]; - let deleteSelection: Range = cursor.selection; + let deleteSelection: Range = selection; if (deleteSelection.isEmpty()) { - let position = cursor.position; + let position = selection.getPosition(); let rightOfPosition = MoveOperations.right(config, model, position.lineNumber, position.column); deleteSelection = new Range( rightOfPosition.lineNumber, @@ -41,23 +43,19 @@ export class DeleteOperations { shouldPushStackElementBefore = true; } - commands[i] = new CommandResult(new ReplaceCommand(deleteSelection, ''), false); + commands[i] = new ReplaceCommand(deleteSelection, ''); } - return new EditOperationResult(commands, { - shouldPushStackElementBefore: shouldPushStackElementBefore, - shouldPushStackElementAfter: false - }); + return [shouldPushStackElementBefore, commands]; } - private static _isAutoClosingPairDelete(config: CursorConfiguration, model: ICursorSimpleModel, cursors: SingleCursorState[]): boolean { + private static _isAutoClosingPairDelete(config: CursorConfiguration, model: ICursorSimpleModel, selections: Selection[]): boolean { if (!config.autoClosingBrackets) { return false; } - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - const selection = cursor.selection; - const position = cursor.position; + for (let i = 0, len = selections.length; i < len; i++) { + const selection = selections[i]; + const position = selection.getPosition(); if (!selection.isEmpty()) { return false; @@ -81,40 +79,36 @@ export class DeleteOperations { return true; } - private static _runAutoClosingPairDelete(config: CursorConfiguration, model: ICursorSimpleModel, cursors: SingleCursorState[]): EditOperationResult { - let commands: CommandResult[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - const position = cursor.position; + private static _runAutoClosingPairDelete(config: CursorConfiguration, model: ICursorSimpleModel, selections: Selection[]): [boolean, ICommand[]] { + let commands: ICommand[] = []; + for (let i = 0, len = selections.length; i < len; i++) { + const position = selections[i].getPosition(); const deleteSelection = new Range( position.lineNumber, position.column - 1, position.lineNumber, position.column + 1 ); - commands[i] = new CommandResult(new ReplaceCommand(deleteSelection, ''), false); + commands[i] = new ReplaceCommand(deleteSelection, ''); } - return new EditOperationResult(commands, { - shouldPushStackElementBefore: true, - shouldPushStackElementAfter: false - }); + return [true, commands]; } - public static deleteLeft(config: CursorConfiguration, model: ICursorSimpleModel, cursors: SingleCursorState[]): EditOperationResult { + public static deleteLeft(config: CursorConfiguration, model: ICursorSimpleModel, selections: Selection[]): [boolean, ICommand[]] { - if (this._isAutoClosingPairDelete(config, model, cursors)) { - return this._runAutoClosingPairDelete(config, model, cursors); + if (this._isAutoClosingPairDelete(config, model, selections)) { + return this._runAutoClosingPairDelete(config, model, selections); } - let commands: CommandResult[] = []; + let commands: ICommand[] = []; let shouldPushStackElementBefore = false; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; + for (let i = 0, len = selections.length; i < len; i++) { + const selection = selections[i]; - let deleteSelection: Range = cursor.selection; + let deleteSelection: Range = selection; if (deleteSelection.isEmpty()) { - let position = cursor.position; + let position = selection.getPosition(); if (config.useTabStops && position.column > 1) { let lineContent = model.getLineContent(position.lineNumber); @@ -155,25 +149,21 @@ export class DeleteOperations { shouldPushStackElementBefore = true; } - commands[i] = new CommandResult(new ReplaceCommand(deleteSelection, ''), false); + commands[i] = new ReplaceCommand(deleteSelection, ''); } - return new EditOperationResult(commands, { - shouldPushStackElementBefore: shouldPushStackElementBefore, - shouldPushStackElementAfter: false - }); + return [shouldPushStackElementBefore, commands]; } - public static cut(config: CursorConfiguration, model: ICursorSimpleModel, cursors: SingleCursorState[], enableEmptySelectionClipboard: boolean): EditOperationResult { - let commands: CommandResult[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - let selection = cursor.selection; + public static cut(config: CursorConfiguration, model: ICursorSimpleModel, selections: Selection[]): EditOperationResult { + let commands: ICommand[] = []; + for (let i = 0, len = selections.length; i < len; i++) { + const selection = selections[i]; if (selection.isEmpty()) { - if (enableEmptySelectionClipboard) { + if (config.emptySelectionClipboard) { // This is a full line cut - let position = cursor.position; + let position = selection.getPosition(); let startLineNumber: number, startColumn: number, @@ -208,7 +198,7 @@ export class DeleteOperations { ); if (!deleteSelection.isEmpty()) { - commands[i] = new CommandResult(new ReplaceCommand(deleteSelection, ''), false); + commands[i] = new ReplaceCommand(deleteSelection, ''); } else { commands[i] = null; } @@ -217,7 +207,7 @@ export class DeleteOperations { commands[i] = null; } } else { - commands[i] = new CommandResult(new ReplaceCommand(selection, ''), false); + commands[i] = new ReplaceCommand(selection, ''); } } return new EditOperationResult(commands, { @@ -225,5 +215,4 @@ export class DeleteOperations { shouldPushStackElementAfter: true }); } - -} \ No newline at end of file +} diff --git a/src/vs/editor/common/controller/cursorEvents.ts b/src/vs/editor/common/controller/cursorEvents.ts index 5b0992d96f18d..9c7b978944573 100644 --- a/src/vs/editor/common/controller/cursorEvents.ts +++ b/src/vs/editor/common/controller/cursorEvents.ts @@ -6,19 +6,8 @@ 'use strict'; import { Position } from 'vs/editor/common/core/position'; -import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; -/** - * @internal - */ -export const CursorEventType = { - CursorPositionChanged: 'positionChanged', - CursorSelectionChanged: 'selectionChanged', - CursorRevealRange: 'revealRange', - CursorScrollRequest: 'scrollRequest', -}; - /** * Describes the reason the cursor has changed its position. */ @@ -60,18 +49,10 @@ export interface ICursorPositionChangedEvent { * Primary cursor's position. */ readonly position: Position; - /** - * Primary cursor's view position - */ - readonly viewPosition: Position; /** * Secondary cursors' position. */ readonly secondaryPositions: Position[]; - /** - * Secondary cursors' view position. - */ - readonly secondaryViewPositions: Position[]; /** * Reason. */ @@ -80,10 +61,6 @@ export interface ICursorPositionChangedEvent { * Source of the call that caused the event. */ readonly source: string; - /** - * Is the primary cursor in the editable range? - */ - readonly isInEditableRange: boolean; } /** * An event describing that the cursor selection has changed. @@ -93,18 +70,10 @@ export interface ICursorSelectionChangedEvent { * The primary selection. */ readonly selection: Selection; - /** - * The primary selection in view coordinates. - */ - readonly viewSelection: Selection; /** * The secondary selections. */ readonly secondarySelections: Selection[]; - /** - * The secondary selections in view coordinates. - */ - readonly secondaryViewSelections: Selection[]; /** * Source of the call that caused the event. */ @@ -114,46 +83,3 @@ export interface ICursorSelectionChangedEvent { */ readonly reason: CursorChangeReason; } -/** - * @internal - */ -export const enum VerticalRevealType { - Simple = 0, - Center = 1, - CenterIfOutsideViewport = 2, - Top = 3, - Bottom = 4 -} -/** - * An event describing a request to reveal a specific range in the view of the editor. - * @internal - */ -export interface ICursorRevealRangeEvent { - /** - * Range to be reavealed. - */ - readonly range: Range; - /** - * View range to be reavealed. - */ - readonly viewRange: Range; - - readonly verticalType: VerticalRevealType; - /** - * If true: there should be a horizontal & vertical revealing - * If false: there should be just a vertical revealing - */ - readonly revealHorizontal: boolean; -} - -/** - * @internal - */ -export class CursorScrollRequest { - - public readonly desiredScrollTop: number; - - constructor(desiredScrollTop: number) { - this.desiredScrollTop = desiredScrollTop; - } -} diff --git a/src/vs/editor/common/controller/cursorMoveCommands.ts b/src/vs/editor/common/controller/cursorMoveCommands.ts index 37f6197d6ec01..97925d92dcced 100644 --- a/src/vs/editor/common/controller/cursorMoveCommands.ts +++ b/src/vs/editor/common/controller/cursorMoveCommands.ts @@ -38,20 +38,78 @@ export class CursorMoveCommands { let result: CursorState[] = []; for (let i = 0, len = cursors.length; i < len; i++) { const cursor = cursors[i]; - result[i] = CursorState.fromViewState(MoveOperations.moveToBeginningOfLine(context.config, context.viewModel, cursor.viewState, inSelectionMode)); + result[i] = this._moveToLineStart(context, cursor, inSelectionMode); } + return result; } + private static _moveToLineStart(context: CursorContext, cursor: CursorState, inSelectionMode: boolean): CursorState { + const currentViewStateColumn = cursor.viewState.position.column; + const currentModelStateColumn = cursor.modelState.position.column; + const isFirstLineOfWrappedLine = currentViewStateColumn === currentModelStateColumn; + + const currentViewStatelineNumber = cursor.viewState.position.lineNumber; + const firstNonBlankColumn = context.viewModel.getLineFirstNonWhitespaceColumn(currentViewStatelineNumber); + const isBeginningOfViewLine = currentViewStateColumn === firstNonBlankColumn; + + if (!isFirstLineOfWrappedLine && !isBeginningOfViewLine) { + return this._moveToLineStartByView(context, cursor, inSelectionMode); + } else { + return this._moveToLineStartByModel(context, cursor, inSelectionMode); + } + } + + private static _moveToLineStartByView(context: CursorContext, cursor: CursorState, inSelectionMode: boolean): CursorState { + return CursorState.fromViewState( + MoveOperations.moveToBeginningOfLine(context.config, context.viewModel, cursor.viewState, inSelectionMode) + ); + } + + private static _moveToLineStartByModel(context: CursorContext, cursor: CursorState, inSelectionMode: boolean): CursorState { + return CursorState.fromModelState( + MoveOperations.moveToBeginningOfLine(context.config, context.model, cursor.modelState, inSelectionMode) + ); + } + public static moveToEndOfLine(context: CursorContext, cursors: CursorState[], inSelectionMode: boolean): CursorState[] { let result: CursorState[] = []; for (let i = 0, len = cursors.length; i < len; i++) { const cursor = cursors[i]; - result[i] = CursorState.fromViewState(MoveOperations.moveToEndOfLine(context.config, context.viewModel, cursor.viewState, inSelectionMode)); + result[i] = this._moveToLineEnd(context, cursor, inSelectionMode); } + return result; } + private static _moveToLineEnd(context: CursorContext, cursor: CursorState, inSelectionMode: boolean): CursorState { + const viewStatePosition = cursor.viewState.position; + const viewModelMaxColumn = context.viewModel.getLineMaxColumn(viewStatePosition.lineNumber); + const isEndOfViewLine = viewStatePosition.column === viewModelMaxColumn; + + const modelStatePosition = cursor.modelState.position; + const modelMaxColumn = context.model.getLineMaxColumn(modelStatePosition.lineNumber); + const isEndLineOfWrappedLine = viewModelMaxColumn - viewStatePosition.column === modelMaxColumn - modelStatePosition.column; + + if (isEndOfViewLine || isEndLineOfWrappedLine) { + return this._moveToLineEndByModel(context, cursor, inSelectionMode); + } else { + return this._moveToLineEndByView(context, cursor, inSelectionMode); + } + } + + private static _moveToLineEndByView(context: CursorContext, cursor: CursorState, inSelectionMode: boolean): CursorState { + return CursorState.fromViewState( + MoveOperations.moveToEndOfLine(context.config, context.viewModel, cursor.viewState, inSelectionMode) + ); + } + + private static _moveToLineEndByModel(context: CursorContext, cursor: CursorState, inSelectionMode: boolean): CursorState { + return CursorState.fromModelState( + MoveOperations.moveToEndOfLine(context.config, context.model, cursor.modelState, inSelectionMode) + ); + } + public static expandLineSelection(context: CursorContext, cursors: CursorState[]): CursorState[] { let result: CursorState[] = []; for (let i = 0, len = cursors.length; i < len; i++) { @@ -498,7 +556,7 @@ export class CursorMoveCommands { export namespace CursorMove { - const isCursorMoveArgs = function (arg): boolean { + const isCursorMoveArgs = function (arg: any): boolean { if (!types.isObject(arg)) { return false; } diff --git a/src/vs/editor/common/controller/cursorTypeOperations.ts b/src/vs/editor/common/controller/cursorTypeOperations.ts index d50d128f0d573..e1d89fda09899 100644 --- a/src/vs/editor/common/controller/cursorTypeOperations.ts +++ b/src/vs/editor/common/controller/cursorTypeOperations.ts @@ -6,7 +6,7 @@ import { onUnexpectedError } from 'vs/base/common/errors'; import { ReplaceCommand, ReplaceCommandWithoutChangingPosition, ReplaceCommandWithOffsetCursorState } from 'vs/editor/common/commands/replaceCommand'; -import { SingleCursorState, CursorColumns, CursorConfiguration, ICursorSimpleModel, EditOperationResult, CommandResult } from 'vs/editor/common/controller/cursorCommon'; +import { CursorColumns, CursorConfiguration, ICursorSimpleModel, EditOperationResult } from 'vs/editor/common/controller/cursorCommon'; import { Range } from 'vs/editor/common/core/range'; import { ICommand, ITokenizedModel } from 'vs/editor/common/editorCommon'; import * as strings from 'vs/base/common/strings'; @@ -16,47 +16,34 @@ import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageCo import { IndentAction } from 'vs/editor/common/modes/languageConfiguration'; import { SurroundSelectionCommand } from 'vs/editor/common/commands/surroundSelectionCommand'; import { IElectricAction } from 'vs/editor/common/modes/supports/electricCharacter'; +import { getMapForWordSeparators, WordCharacterClass } from 'vs/editor/common/controller/wordCharacterClassifier'; export class TypeOperations { - public static indent(config: CursorConfiguration, model: ICursorSimpleModel, cursors: SingleCursorState[]): EditOperationResult { - let commands: CommandResult[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - commands[i] = new CommandResult( - new ShiftCommand(cursor.selection, { - isUnshift: false, - tabSize: config.tabSize, - oneIndent: config.oneIndent, - useTabStops: config.useTabStops - }), - false - ); + public static indent(config: CursorConfiguration, model: ICursorSimpleModel, selections: Selection[]): ICommand[] { + let commands: ICommand[] = []; + for (let i = 0, len = selections.length; i < len; i++) { + commands[i] = new ShiftCommand(selections[i], { + isUnshift: false, + tabSize: config.tabSize, + oneIndent: config.oneIndent, + useTabStops: config.useTabStops + }); } - return new EditOperationResult(commands, { - shouldPushStackElementBefore: true, - shouldPushStackElementAfter: true - }); + return commands; } - public static outdent(config: CursorConfiguration, model: ICursorSimpleModel, cursors: SingleCursorState[]): EditOperationResult { - let commands: CommandResult[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - commands[i] = new CommandResult( - new ShiftCommand(cursor.selection, { - isUnshift: true, - tabSize: config.tabSize, - oneIndent: config.oneIndent, - useTabStops: config.useTabStops - }), - false - ); + public static outdent(config: CursorConfiguration, model: ICursorSimpleModel, selections: Selection[]): ICommand[] { + let commands: ICommand[] = []; + for (let i = 0, len = selections.length; i < len; i++) { + commands[i] = new ShiftCommand(selections[i], { + isUnshift: true, + tabSize: config.tabSize, + oneIndent: config.oneIndent, + useTabStops: config.useTabStops + }); } - return new EditOperationResult(commands, { - shouldPushStackElementBefore: true, - shouldPushStackElementAfter: true - }); + return commands; } public static shiftIndent(config: CursorConfiguration, indentation: string, count?: number): string { @@ -81,12 +68,10 @@ export class TypeOperations { return newIndentation; } - public static distributedPaste(config: CursorConfiguration, model: ICursorSimpleModel, cursors: SingleCursorState[], text: string[]): EditOperationResult { - let commands: CommandResult[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - let selection = cursor.selection; - commands[i] = new CommandResult(new ReplaceCommand(selection, text[i]), false); + private static _distributedPaste(config: CursorConfiguration, model: ICursorSimpleModel, selections: Selection[], text: string[]): EditOperationResult { + let commands: ICommand[] = []; + for (let i = 0, len = selections.length; i < len; i++) { + commands[i] = new ReplaceCommand(selections[i], text[i]); } return new EditOperationResult(commands, { shouldPushStackElementBefore: true, @@ -94,12 +79,11 @@ export class TypeOperations { }); } - public static paste(config: CursorConfiguration, model: ICursorSimpleModel, cursors: SingleCursorState[], text: string, pasteOnNewLine: boolean): EditOperationResult { - let commands: CommandResult[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - let position = cursor.position; - let selection = cursor.selection; + private static _simplePaste(config: CursorConfiguration, model: ICursorSimpleModel, selections: Selection[], text: string, pasteOnNewLine: boolean): EditOperationResult { + let commands: ICommand[] = []; + for (let i = 0, len = selections.length; i < len; i++) { + const selection = selections[i]; + let position = selection.getPosition(); if (pasteOnNewLine && text.indexOf('\n') !== text.length - 1) { pasteOnNewLine = false; @@ -114,9 +98,9 @@ export class TypeOperations { if (pasteOnNewLine) { // Paste entire line at the beginning of line let typeSelection = new Range(position.lineNumber, 1, position.lineNumber, 1); - commands[i] = new CommandResult(new ReplaceCommand(typeSelection, text), false); + commands[i] = new ReplaceCommand(typeSelection, text); } else { - commands[i] = new CommandResult(new ReplaceCommand(selection, text), false); + commands[i] = new ReplaceCommand(selection, text); } } return new EditOperationResult(commands, { @@ -125,8 +109,42 @@ export class TypeOperations { }); } + private static _distributePasteToCursors(selections: Selection[], pasteOnNewLine: boolean, text: string): string[] { + if (pasteOnNewLine) { + return null; + } + + if (selections.length === 1) { + return null; + } + + for (let i = 0; i < selections.length; i++) { + if (selections[i].startLineNumber !== selections[i].endLineNumber) { + return null; + } + } + + let pastePieces = text.split(/\r\n|\r|\n/); + if (pastePieces.length !== selections.length) { + return null; + } + + return pastePieces; + } + + public static paste(config: CursorConfiguration, model: ICursorSimpleModel, selections: Selection[], pasteOnNewLine: boolean, text: string): EditOperationResult { + const distributedPaste = this._distributePasteToCursors(selections, pasteOnNewLine, text); + + if (distributedPaste) { + selections = selections.sort(Range.compareRangesUsingStarts); + return this._distributedPaste(config, model, selections, distributedPaste); + } else { + return this._simplePaste(config, model, selections, text, pasteOnNewLine); + } + } + private static _goodIndentForLine(config: CursorConfiguration, model: ITokenizedModel, lineNumber: number): string { - let expectedIndentAction = LanguageConfigurationRegistry.getGoodIndentActionForLine(model, lineNumber); + let expectedIndentAction = LanguageConfigurationRegistry.getInheritIndentForLine(model, lineNumber, false); if (expectedIndentAction) { if (expectedIndentAction.action) { @@ -156,7 +174,7 @@ export class TypeOperations { return null; } - private static _replaceJumpToNextIndent(config: CursorConfiguration, model: ICursorSimpleModel, selection: Selection): ReplaceCommand { + private static _replaceJumpToNextIndent(config: CursorConfiguration, model: ICursorSimpleModel, selection: Selection, insertsAutoWhitespace: boolean): ReplaceCommand { let typeText = ''; let position = selection.getStartPosition(); @@ -171,14 +189,13 @@ export class TypeOperations { typeText = '\t'; } - return new ReplaceCommand(selection, typeText); + return new ReplaceCommand(selection, typeText, insertsAutoWhitespace); } - public static tab(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[]): EditOperationResult { - let commands: CommandResult[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - let selection = cursor.selection; + public static tab(config: CursorConfiguration, model: ITokenizedModel, selections: Selection[]): ICommand[] { + let commands: ICommand[] = []; + for (let i = 0, len = selections.length; i < len; i++) { + const selection = selections[i]; if (selection.isEmpty()) { @@ -189,48 +206,48 @@ export class TypeOperations { goodIndent = goodIndent || '\t'; let possibleTypeText = config.normalizeIndentation(goodIndent); if (!strings.startsWith(lineText, possibleTypeText)) { - let command = new ReplaceCommand(new Range(selection.startLineNumber, 1, selection.startLineNumber, lineText.length + 1), possibleTypeText); - commands[i] = new CommandResult(command, true); + commands[i] = new ReplaceCommand(new Range(selection.startLineNumber, 1, selection.startLineNumber, lineText.length + 1), possibleTypeText, true); continue; } } - commands[i] = new CommandResult(this._replaceJumpToNextIndent(config, model, selection), true); + commands[i] = this._replaceJumpToNextIndent(config, model, selection, true); } else { if (selection.startLineNumber === selection.endLineNumber) { let lineMaxColumn = model.getLineMaxColumn(selection.startLineNumber); if (selection.startColumn !== 1 || selection.endColumn !== lineMaxColumn) { // This is a single line selection that is not the entire line - commands[i] = new CommandResult(this._replaceJumpToNextIndent(config, model, selection), false); + commands[i] = this._replaceJumpToNextIndent(config, model, selection, false); continue; } } - commands[i] = new CommandResult( - new ShiftCommand(selection, { - isUnshift: false, - tabSize: config.tabSize, - oneIndent: config.oneIndent, - useTabStops: config.useTabStops - }), - false - ); + commands[i] = new ShiftCommand(selection, { + isUnshift: false, + tabSize: config.tabSize, + oneIndent: config.oneIndent, + useTabStops: config.useTabStops + }); } } - return new EditOperationResult(commands, { - shouldPushStackElementBefore: true, - shouldPushStackElementAfter: true - }); + return commands; } - public static replacePreviousChar(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[], txt: string, replaceCharCnt: number): EditOperationResult { - let commands: CommandResult[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - let pos = cursor.position; + public static replacePreviousChar(config: CursorConfiguration, model: ITokenizedModel, selections: Selection[], txt: string, replaceCharCnt: number): EditOperationResult { + let commands: ICommand[] = []; + for (let i = 0, len = selections.length; i < len; i++) { + const selection = selections[i]; + if (!selection.isEmpty()) { + // looks like https://github.com/Microsoft/vscode/issues/2773 + // where a cursor operation occurred before a canceled composition + // => ignore composition + commands[i] = null; + continue; + } + let pos = selection.getPosition(); let startColumn = Math.max(1, pos.column - replaceCharCnt); let range = new Range(pos.lineNumber, startColumn, pos.lineNumber, pos.column); - commands[i] = new CommandResult(new ReplaceCommand(range, txt), false); + commands[i] = new ReplaceCommand(range, txt); } return new EditOperationResult(commands, { shouldPushStackElementBefore: false, @@ -238,86 +255,147 @@ export class TypeOperations { }); } - public static typeCommand(range: Range, text: string, keepPosition: boolean): ICommand { + private static _typeCommand(range: Range, text: string, keepPosition: boolean): ICommand { if (keepPosition) { - return new ReplaceCommandWithoutChangingPosition(range, text); + return new ReplaceCommandWithoutChangingPosition(range, text, true); } else { - return new ReplaceCommand(range, text); + return new ReplaceCommand(range, text, true); } } - private static _enter(config: CursorConfiguration, model: ITokenizedModel, keepPosition: boolean, range: Range): CommandResult { + private static _enter(config: CursorConfiguration, model: ITokenizedModel, keepPosition: boolean, range: Range): ICommand { let r = LanguageConfigurationRegistry.getEnterAction(model, range); - let enterAction = r.enterAction; - let indentation = r.indentation; + if (r) { + let enterAction = r.enterAction; + let indentation = r.indentation; - let beforeText = ''; + if (enterAction.indentAction === IndentAction.None) { + // Nothing special + return TypeOperations._typeCommand(range, '\n' + config.normalizeIndentation(indentation + enterAction.appendText), keepPosition); - if (!r.ignoreCurrentLine) { - // textBeforeEnter doesn't match unIndentPattern. - let goodIndent = this._goodIndentForLine(config, model, range.startLineNumber); + } else if (enterAction.indentAction === IndentAction.Indent) { + // Indent once + return TypeOperations._typeCommand(range, '\n' + config.normalizeIndentation(indentation + enterAction.appendText), keepPosition); - if (goodIndent !== null && goodIndent === r.indentation) { - if (enterAction.outdentCurrentLine) { - goodIndent = TypeOperations.unshiftIndent(config, goodIndent); - } + } else if (enterAction.indentAction === IndentAction.IndentOutdent) { + // Ultra special + let normalIndent = config.normalizeIndentation(indentation); + let increasedIndent = config.normalizeIndentation(indentation + enterAction.appendText); - let lineText = model.getLineContent(range.startLineNumber); - if (config.normalizeIndentation(goodIndent) !== config.normalizeIndentation(indentation)) { - beforeText = config.normalizeIndentation(goodIndent) + lineText.substring(indentation.length, range.startColumn - 1); - indentation = goodIndent; - range = new Range(range.startLineNumber, 1, range.endLineNumber, range.endColumn); + let typeText = '\n' + increasedIndent + '\n' + normalIndent; + + if (keepPosition) { + return new ReplaceCommandWithoutChangingPosition(range, typeText, true); + } else { + return new ReplaceCommandWithOffsetCursorState(range, typeText, -1, increasedIndent.length - normalIndent.length, true); } + } else if (enterAction.indentAction === IndentAction.Outdent) { + let actualIndentation = TypeOperations.unshiftIndent(config, indentation); + return TypeOperations._typeCommand(range, '\n' + config.normalizeIndentation(actualIndentation + enterAction.appendText), keepPosition); } } - if (enterAction.removeText) { - indentation = indentation.substring(0, indentation.length - enterAction.removeText); - } + // no enter rules applied, we should check indentation rules then. + let ir = LanguageConfigurationRegistry.getIndentForEnter(model, range, { + unshiftIndent: (indent) => { + return TypeOperations.unshiftIndent(config, indent); + }, + shiftIndent: (indent) => { + return TypeOperations.shiftIndent(config, indent); + }, + normalizeIndentation: (indent) => { + return config.normalizeIndentation(indent); + } + }, config.autoIndent); - let executeCommand: ICommand; - if (enterAction.indentAction === IndentAction.None) { - // Nothing special - executeCommand = TypeOperations.typeCommand(range, beforeText + '\n' + config.normalizeIndentation(indentation + enterAction.appendText), keepPosition); + let lineText = model.getLineContent(range.startLineNumber); + let indentation = strings.getLeadingWhitespace(lineText).substring(0, range.startColumn - 1); - } else if (enterAction.indentAction === IndentAction.Indent) { - // Indent once - executeCommand = TypeOperations.typeCommand(range, beforeText + '\n' + config.normalizeIndentation(indentation + enterAction.appendText), keepPosition); + if (ir) { + let oldEndViewColumn = CursorColumns.visibleColumnFromColumn2(config, model, range.getEndPosition()); + let oldEndColumn = range.endColumn; - } else if (enterAction.indentAction === IndentAction.IndentOutdent) { - // Ultra special - let normalIndent = config.normalizeIndentation(indentation); - let increasedIndent = config.normalizeIndentation(indentation + enterAction.appendText); + let beforeText = '\n'; + if (indentation !== config.normalizeIndentation(ir.beforeEnter)) { + beforeText = config.normalizeIndentation(ir.beforeEnter) + lineText.substring(indentation.length, range.startColumn - 1) + '\n'; + range = new Range(range.startLineNumber, 1, range.endLineNumber, range.endColumn); + } - let typeText = beforeText + '\n' + increasedIndent + '\n' + normalIndent; + let newLineContent = model.getLineContent(range.endLineNumber); + let firstNonWhitespace = strings.firstNonWhitespaceIndex(newLineContent); + if (firstNonWhitespace >= 0) { + range = range.setEndPosition(range.endLineNumber, Math.max(range.endColumn, firstNonWhitespace + 1)); + } else { + range = range.setEndPosition(range.endLineNumber, model.getLineMaxColumn(range.endLineNumber)); + } if (keepPosition) { - executeCommand = new ReplaceCommandWithoutChangingPosition(range, typeText); + return new ReplaceCommandWithoutChangingPosition(range, beforeText + config.normalizeIndentation(ir.afterEnter), true); } else { - executeCommand = new ReplaceCommandWithOffsetCursorState(range, typeText, -1, increasedIndent.length - normalIndent.length); + let offset = 0; + if (oldEndColumn <= firstNonWhitespace + 1) { + if (!config.insertSpaces) { + oldEndViewColumn = Math.ceil(oldEndViewColumn / config.tabSize); + } + offset = Math.min(oldEndViewColumn + 1 - config.normalizeIndentation(ir.afterEnter).length - 1, 0); + } + return new ReplaceCommandWithOffsetCursorState(range, beforeText + config.normalizeIndentation(ir.afterEnter), 0, offset, true); } - } else if (enterAction.indentAction === IndentAction.Outdent) { - let actualIndentation = TypeOperations.unshiftIndent(config, indentation); - executeCommand = TypeOperations.typeCommand(range, beforeText + '\n' + config.normalizeIndentation(actualIndentation + enterAction.appendText), keepPosition); + + } else { + return TypeOperations._typeCommand(range, '\n' + config.normalizeIndentation(indentation), keepPosition); + } + } + + private static _runAutoIndentType(config: CursorConfiguration, model: ITokenizedModel, range: Range, ch: string): ICommand { + let currentIndentation = LanguageConfigurationRegistry.getIndentationAtPosition(model, range.startLineNumber, range.startColumn); + let actualIndentation = LanguageConfigurationRegistry.getIndentActionForType(model, range, ch, { + shiftIndent: (indentation) => { + return TypeOperations.shiftIndent(config, indentation); + }, + unshiftIndent: (indentation) => { + return TypeOperations.unshiftIndent(config, indentation); + }, + }); + + if (actualIndentation === null) { + return null; } - return new CommandResult(executeCommand, true); + if (actualIndentation !== config.normalizeIndentation(currentIndentation)) { + let firstNonWhitespace = model.getLineFirstNonWhitespaceColumn(range.startLineNumber); + if (firstNonWhitespace === 0) { + return TypeOperations._typeCommand( + new Range(range.startLineNumber, 0, range.endLineNumber, range.endColumn), + config.normalizeIndentation(actualIndentation) + ch, + false + ); + } else { + return TypeOperations._typeCommand( + new Range(range.startLineNumber, 0, range.endLineNumber, range.endColumn), + config.normalizeIndentation(actualIndentation) + + model.getLineContent(range.startLineNumber).substring(firstNonWhitespace - 1, range.startColumn - 1) + ch, + false + ); + } + } + + return null; } - private static _isAutoClosingCloseCharType(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[], ch: string): boolean { + private static _isAutoClosingCloseCharType(config: CursorConfiguration, model: ITokenizedModel, selections: Selection[], ch: string): boolean { if (!config.autoClosingBrackets || !config.autoClosingPairsClose.hasOwnProperty(ch)) { return false; } - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - const selection = cursor.selection; + for (let i = 0, len = selections.length; i < len; i++) { + const selection = selections[i]; if (!selection.isEmpty()) { return false; } - const position = cursor.position; + const position = selection.getPosition(); const lineText = model.getLineContent(position.lineNumber); const afterCharacter = lineText.charAt(position.column - 1); @@ -329,13 +407,13 @@ export class TypeOperations { return true; } - private static _runAutoClosingCloseCharType(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[], ch: string): EditOperationResult { - let commands: CommandResult[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - const position = cursor.position; + private static _runAutoClosingCloseCharType(config: CursorConfiguration, model: ITokenizedModel, selections: Selection[], ch: string): EditOperationResult { + let commands: ICommand[] = []; + for (let i = 0, len = selections.length; i < len; i++) { + const selection = selections[i]; + const position = selection.getPosition(); const typeSelection = new Range(position.lineNumber, position.column, position.lineNumber, position.column + 1); - commands[i] = new CommandResult(new ReplaceCommand(typeSelection, ch), false); + commands[i] = new ReplaceCommand(typeSelection, ch); } return new EditOperationResult(commands, { shouldPushStackElementBefore: false, @@ -343,24 +421,33 @@ export class TypeOperations { }); } - private static _isAutoClosingOpenCharType(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[], ch: string): boolean { + private static _isAutoClosingOpenCharType(config: CursorConfiguration, model: ITokenizedModel, selections: Selection[], ch: string): boolean { if (!config.autoClosingBrackets || !config.autoClosingPairsOpen.hasOwnProperty(ch)) { return false; } - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - const selection = cursor.selection; + for (let i = 0, len = selections.length; i < len; i++) { + const selection = selections[i]; if (!selection.isEmpty()) { return false; } - const position = cursor.position; + const position = selection.getPosition(); const lineText = model.getLineContent(position.lineNumber); - const afterCharacter = lineText.charAt(position.column - 1); + + // Do not auto-close ' or " after a word character + if ((ch === '\'' || ch === '"') && position.column > 1) { + const wordSeparators = getMapForWordSeparators(config.wordSeparators); + const characterBeforeCode = lineText.charCodeAt(position.column - 2); + const characterBeforeType = wordSeparators.get(characterBeforeCode); + if (characterBeforeType === WordCharacterClass.Regular) { + return false; + } + } // Only consider auto closing the pair if a space follows or if another autoclosed pair follows - if (afterCharacter) { + const characterAfter = lineText.charAt(position.column - 1); + if (characterAfter) { const thisBraceIsSymmetric = (config.autoClosingPairsOpen[ch] === ch); let isBeforeCloseBrace = false; @@ -369,12 +456,12 @@ export class TypeOperations { if (!thisBraceIsSymmetric && otherBraceIsSymmetric) { continue; } - if (afterCharacter === otherCloseBrace) { + if (characterAfter === otherCloseBrace) { isBeforeCloseBrace = true; break; } } - if (!isBeforeCloseBrace && !/\s/.test(afterCharacter)) { + if (!isBeforeCloseBrace && !/\s/.test(characterAfter)) { return false; } } @@ -397,16 +484,12 @@ export class TypeOperations { return true; } - private static _runAutoClosingOpenCharType(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[], ch: string): EditOperationResult { - let commands: CommandResult[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - const selection = cursor.selection; + private static _runAutoClosingOpenCharType(config: CursorConfiguration, model: ITokenizedModel, selections: Selection[], ch: string): EditOperationResult { + let commands: ICommand[] = []; + for (let i = 0, len = selections.length; i < len; i++) { + const selection = selections[i]; const closeCharacter = config.autoClosingPairsOpen[ch]; - commands[i] = new CommandResult( - new ReplaceCommandWithOffsetCursorState(selection, ch + closeCharacter, 0, -closeCharacter.length), - false - ); + commands[i] = new ReplaceCommandWithOffsetCursorState(selection, ch + closeCharacter, 0, -closeCharacter.length); } return new EditOperationResult(commands, { shouldPushStackElementBefore: true, @@ -414,14 +497,13 @@ export class TypeOperations { }); } - private static _isSurroundSelectionType(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[], ch: string): boolean { + private static _isSurroundSelectionType(config: CursorConfiguration, model: ITokenizedModel, selections: Selection[], ch: string): boolean { if (!config.autoClosingBrackets || !config.surroundingPairs.hasOwnProperty(ch)) { return false; } - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - const selection = cursor.selection; + for (let i = 0, len = selections.length; i < len; i++) { + const selection = selections[i]; if (selection.isEmpty()) { return false; @@ -449,13 +531,12 @@ export class TypeOperations { return true; } - private static _runSurroundSelectionType(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[], ch: string): EditOperationResult { - let commands: CommandResult[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - const selection = cursor.selection; + private static _runSurroundSelectionType(config: CursorConfiguration, model: ITokenizedModel, selections: Selection[], ch: string): EditOperationResult { + let commands: ICommand[] = []; + for (let i = 0, len = selections.length; i < len; i++) { + const selection = selections[i]; const closeCharacter = config.surroundingPairs[ch]; - commands[i] = new CommandResult(new SurroundSelectionCommand(selection, ch, closeCharacter), false); + commands[i] = new SurroundSelectionCommand(selection, ch, closeCharacter); } return new EditOperationResult(commands, { shouldPushStackElementBefore: true, @@ -463,12 +544,12 @@ export class TypeOperations { }); } - private static _typeInterceptorElectricChar(config: CursorConfiguration, model: ITokenizedModel, cursor: SingleCursorState, ch: string): EditOperationResult { - if (!config.electricChars.hasOwnProperty(ch)) { + private static _typeInterceptorElectricChar(config: CursorConfiguration, model: ITokenizedModel, selections: Selection, ch: string): EditOperationResult { + if (!config.electricChars.hasOwnProperty(ch) || !selections.isEmpty()) { return null; } - let position = cursor.position; + let position = selections.getPosition(); model.forceTokenization(position.lineNumber); let lineTokens = model.getLineTokens(position.lineNumber); @@ -484,7 +565,7 @@ export class TypeOperations { } if (electricAction.appendText) { - const command = new CommandResult(new ReplaceCommandWithOffsetCursorState(cursor.selection, ch + electricAction.appendText, 0, -electricAction.appendText.length), false); + const command = new ReplaceCommandWithOffsetCursorState(selections, ch + electricAction.appendText, 0, -electricAction.appendText.length); return new EditOperationResult([command], { shouldPushStackElementBefore: false, shouldPushStackElementAfter: true @@ -515,7 +596,7 @@ export class TypeOperations { let typeSelection = new Range(position.lineNumber, 1, position.lineNumber, position.column); - const command = new CommandResult(new ReplaceCommand(typeSelection, typeText), false); + const command = new ReplaceCommand(typeSelection, typeText); return new EditOperationResult([command], { shouldPushStackElementBefore: false, shouldPushStackElementAfter: true @@ -526,12 +607,12 @@ export class TypeOperations { return null; } - public static typeWithInterceptors(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[], ch: string): EditOperationResult { + public static typeWithInterceptors(config: CursorConfiguration, model: ITokenizedModel, selections: Selection[], ch: string): EditOperationResult { if (ch === '\n') { - let commands: CommandResult[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - commands[i] = TypeOperations._enter(config, model, false, cursors[i].selection); + let commands: ICommand[] = []; + for (let i = 0, len = selections.length; i < len; i++) { + commands[i] = TypeOperations._enter(config, model, false, selections[i]); } return new EditOperationResult(commands, { shouldPushStackElementBefore: true, @@ -539,35 +620,44 @@ export class TypeOperations { }); } - if (this._isAutoClosingCloseCharType(config, model, cursors, ch)) { - return this._runAutoClosingCloseCharType(config, model, cursors, ch); + if (config.autoIndent) { + let indentCommand = this._runAutoIndentType(config, model, selections[0], ch); + if (indentCommand) { + return new EditOperationResult([indentCommand], { + shouldPushStackElementBefore: true, + shouldPushStackElementAfter: false, + }); + } } - if (this._isAutoClosingOpenCharType(config, model, cursors, ch)) { - return this._runAutoClosingOpenCharType(config, model, cursors, ch); + if (this._isAutoClosingCloseCharType(config, model, selections, ch)) { + return this._runAutoClosingCloseCharType(config, model, selections, ch); } - if (this._isSurroundSelectionType(config, model, cursors, ch)) { - return this._runSurroundSelectionType(config, model, cursors, ch); + if (this._isAutoClosingOpenCharType(config, model, selections, ch)) { + return this._runAutoClosingOpenCharType(config, model, selections, ch); + } + + if (this._isSurroundSelectionType(config, model, selections, ch)) { + return this._runSurroundSelectionType(config, model, selections, ch); } // Electric characters make sense only when dealing with a single cursor, // as multiple cursors typing brackets for example would interfer with bracket matching - if (cursors.length === 1) { - const r = this._typeInterceptorElectricChar(config, model, cursors[0], ch); + if (selections.length === 1) { + const r = this._typeInterceptorElectricChar(config, model, selections[0], ch); if (r) { return r; } } - return this.typeWithoutInterceptors(config, model, cursors, ch); + return this.typeWithoutInterceptors(config, model, selections, ch); } - public static typeWithoutInterceptors(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[], str: string): EditOperationResult { - let commands: CommandResult[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - commands[i] = new CommandResult(new ReplaceCommand(cursor.selection, str), false); + public static typeWithoutInterceptors(config: CursorConfiguration, model: ITokenizedModel, selections: Selection[], str: string): EditOperationResult { + let commands: ICommand[] = []; + for (let i = 0, len = selections.length; i < len; i++) { + commands[i] = new ReplaceCommand(selections[i], str); } return new EditOperationResult(commands, { shouldPushStackElementBefore: false, @@ -575,14 +665,13 @@ export class TypeOperations { }); } - public static lineInsertBefore(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[]): EditOperationResult { - let commands: CommandResult[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - let lineNumber = cursor.position.lineNumber; + public static lineInsertBefore(config: CursorConfiguration, model: ITokenizedModel, selections: Selection[]): ICommand[] { + let commands: ICommand[] = []; + for (let i = 0, len = selections.length; i < len; i++) { + let lineNumber = selections[i].positionLineNumber; if (lineNumber === 1) { - commands[i] = new CommandResult(new ReplaceCommandWithoutChangingPosition(new Range(1, 1, 1, 1), '\n'), false); + commands[i] = new ReplaceCommandWithoutChangingPosition(new Range(1, 1, 1, 1), '\n'); } else { lineNumber--; let column = model.getLineMaxColumn(lineNumber); @@ -590,35 +679,24 @@ export class TypeOperations { commands[i] = this._enter(config, model, false, new Range(lineNumber, column, lineNumber, column)); } } - return new EditOperationResult(commands, { - shouldPushStackElementBefore: true, - shouldPushStackElementAfter: false, - }); + return commands; } - public static lineInsertAfter(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[]): EditOperationResult { - let commands: CommandResult[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - let position = cursor.position; - let column = model.getLineMaxColumn(position.lineNumber); - commands[i] = this._enter(config, model, false, new Range(position.lineNumber, column, position.lineNumber, column)); + public static lineInsertAfter(config: CursorConfiguration, model: ITokenizedModel, selections: Selection[]): ICommand[] { + let commands: ICommand[] = []; + for (let i = 0, len = selections.length; i < len; i++) { + const lineNumber = selections[i].positionLineNumber; + let column = model.getLineMaxColumn(lineNumber); + commands[i] = this._enter(config, model, false, new Range(lineNumber, column, lineNumber, column)); } - return new EditOperationResult(commands, { - shouldPushStackElementBefore: true, - shouldPushStackElementAfter: false, - }); + return commands; } - public static lineBreakInsert(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[]): EditOperationResult { - let commands: CommandResult[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - commands[i] = this._enter(config, model, true, cursor.selection); + public static lineBreakInsert(config: CursorConfiguration, model: ITokenizedModel, selections: Selection[]): ICommand[] { + let commands: ICommand[] = []; + for (let i = 0, len = selections.length; i < len; i++) { + commands[i] = this._enter(config, model, true, selections[i]); } - return new EditOperationResult(commands, { - shouldPushStackElementBefore: true, - shouldPushStackElementAfter: false, - }); + return commands; } } diff --git a/src/vs/editor/common/controller/cursorWordOperations.ts b/src/vs/editor/common/controller/cursorWordOperations.ts index 42515e24450b7..3666961a2a283 100644 --- a/src/vs/editor/common/controller/cursorWordOperations.ts +++ b/src/vs/editor/common/controller/cursorWordOperations.ts @@ -6,8 +6,7 @@ import { SingleCursorState, CursorConfiguration, ICursorSimpleModel } from 'vs/editor/common/controller/cursorCommon'; import { Position } from 'vs/editor/common/core/position'; -import { CharCode } from 'vs/base/common/charCode'; -import { CharacterClassifier } from 'vs/editor/common/core/characterClassifier'; +import { WordCharacterClassifier, WordCharacterClass, getMapForWordSeparators } from 'vs/editor/common/controller/wordCharacterClassifier'; import * as strings from 'vs/base/common/strings'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; @@ -33,46 +32,11 @@ const enum WordType { Separator = 2 } -export const enum WordCharacterClass { - Regular = 0, - Whitespace = 1, - WordSeparator = 2 -} - export const enum WordNavigationType { WordStart = 0, WordEnd = 1 } -export class WordCharacterClassifier extends CharacterClassifier { - - constructor(wordSeparators: string) { - super(WordCharacterClass.Regular); - - for (let i = 0, len = wordSeparators.length; i < len; i++) { - this.set(wordSeparators.charCodeAt(i), WordCharacterClass.WordSeparator); - } - - this.set(CharCode.Space, WordCharacterClass.Whitespace); - this.set(CharCode.Tab, WordCharacterClass.Whitespace); - } - -} - -function once(computeFn: (input: string) => R): (input: string) => R { - let cache: { [key: string]: R; } = {}; // TODO@Alex unbounded cache - return (input: string): R => { - if (!cache.hasOwnProperty(input)) { - cache[input] = computeFn(input); - } - return cache[input]; - }; -} - -export const getMapForWordSeparators = once( - (input) => new WordCharacterClassifier(input) -); - export class WordOperations { private static _createWord(lineContent: string, wordType: WordType, start: number, end: number): IFindWordResult { @@ -293,16 +257,11 @@ export class WordOperations { if (prevWordOnLine) { column = prevWordOnLine.start + 1; } else { - if (column > 1 || lineNumber === 1) { + if (column > 1) { column = 1; } else { lineNumber--; - prevWordOnLine = WordOperations._findPreviousWordOnLine(wordSeparators, model, new Position(lineNumber, model.getLineMaxColumn(lineNumber))); - if (prevWordOnLine) { - column = prevWordOnLine.start + 1; - } else { - column = 1; - } + column = model.getLineMaxColumn(lineNumber); } } } else { @@ -312,16 +271,11 @@ export class WordOperations { if (prevWordOnLine) { column = prevWordOnLine.end + 1; } else { - if (column > 1 || lineNumber === 1) { + if (column > 1) { column = 1; } else { lineNumber--; - prevWordOnLine = WordOperations._findPreviousWordOnLine(wordSeparators, model, new Position(lineNumber, model.getLineMaxColumn(lineNumber))); - if (prevWordOnLine) { - column = prevWordOnLine.end + 1; - } else { - column = 1; - } + column = model.getLineMaxColumn(lineNumber); } } } diff --git a/src/vs/editor/common/controller/oneCursor.ts b/src/vs/editor/common/controller/oneCursor.ts index 6fde100b0b8f2..ae9c990ec4a3d 100644 --- a/src/vs/editor/common/controller/oneCursor.ts +++ b/src/vs/editor/common/controller/oneCursor.ts @@ -7,7 +7,7 @@ import { SingleCursorState, CursorContext, CursorState } from 'vs/editor/common/controller/cursorCommon'; import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; -import { Selection, SelectionDirection, ISelection } from 'vs/editor/common/core/selection'; +import { Selection, SelectionDirection } from 'vs/editor/common/core/selection'; export class OneCursor { @@ -49,22 +49,6 @@ export class OneCursor { this._setState(context, this.modelState, this.viewState); } - public setSelection(context: CursorContext, selection: ISelection): void { - const selectionStartLineNumber = selection.selectionStartLineNumber; - const selectionStartColumn = selection.selectionStartColumn; - const positionLineNumber = selection.positionLineNumber; - const positionColumn = selection.positionColumn; - const modelState = new SingleCursorState( - new Range(selectionStartLineNumber, selectionStartColumn, selectionStartLineNumber, selectionStartColumn), 0, - new Position(positionLineNumber, positionColumn), 0 - ); - this._setState( - context, - modelState, - null - ); - } - public setState(context: CursorContext, modelState: SingleCursorState, viewState: SingleCursorState): void { this._setState(context, modelState, viewState); } diff --git a/src/vs/editor/common/controller/textAreaHandler.ts b/src/vs/editor/common/controller/textAreaHandler.ts deleted file mode 100644 index f448f6a6d87f6..0000000000000 --- a/src/vs/editor/common/controller/textAreaHandler.ts +++ /dev/null @@ -1,386 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { RunOnceScheduler } from 'vs/base/common/async'; -import * as strings from 'vs/base/common/strings'; -import Event, { Emitter } from 'vs/base/common/event'; -import { KeyCode } from 'vs/base/common/keyCodes'; -import { Disposable } from 'vs/base/common/lifecycle'; -import { IClipboardEvent, ICompositionEvent, IKeyboardEventWrapper, ISimpleModel, ITextAreaWrapper, ITypeData, TextAreaState, TextAreaStrategy, createTextAreaState } from 'vs/editor/common/controller/textAreaState'; -import { Range } from 'vs/editor/common/core/range'; - -export const CopyOptions = { - forceCopyWithSyntaxHighlighting: false -}; - -const enum ReadFromTextArea { - Type, - Paste -} - -export interface IBrowser { - isIPad: boolean; - isChrome: boolean; - isEdgeOrIE: boolean; - isFirefox: boolean; - enableEmptySelectionClipboard: boolean; -} - -export interface IPasteData { - text: string; - pasteOnNewLine: boolean; -} - -export interface ICompositionStartData { - showAtLineNumber: number; - showAtColumn: number; -} - -// See https://github.com/Microsoft/monaco-editor/issues/320 -const isChromev55_v56 = ( - (navigator.userAgent.indexOf('Chrome/55.') >= 0 || navigator.userAgent.indexOf('Chrome/56.') >= 0) - /* Edge likes to impersonate Chrome sometimes */ - && navigator.userAgent.indexOf('Edge/') === -1 -); - -export class TextAreaHandler extends Disposable { - - private _onKeyDown = this._register(new Emitter()); - public onKeyDown: Event = this._onKeyDown.event; - - private _onKeyUp = this._register(new Emitter()); - public onKeyUp: Event = this._onKeyUp.event; - - private _onCut = this._register(new Emitter()); - public onCut: Event = this._onCut.event; - - private _onPaste = this._register(new Emitter()); - public onPaste: Event = this._onPaste.event; - - private _onType = this._register(new Emitter()); - public onType: Event = this._onType.event; - - private _onCompositionStart = this._register(new Emitter()); - public onCompositionStart: Event = this._onCompositionStart.event; - - private _onCompositionUpdate = this._register(new Emitter()); - public onCompositionUpdate: Event = this._onCompositionUpdate.event; - - private _onCompositionEnd = this._register(new Emitter()); - public onCompositionEnd: Event = this._onCompositionEnd.event; - - private Browser: IBrowser; - private textArea: ITextAreaWrapper; - private model: ISimpleModel; - - private selection: Range; - private selections: Range[]; - private hasFocus: boolean; - - private asyncTriggerCut: RunOnceScheduler; - - private lastCompositionEndTime: number; - - private textAreaState: TextAreaState; - private textareaIsShownAtCursor: boolean; - - private lastCopiedValue: string; - private lastCopiedValueIsFromEmptySelection: boolean; - - private _nextCommand: ReadFromTextArea; - - constructor(Browser: IBrowser, strategy: TextAreaStrategy, textArea: ITextAreaWrapper, model: ISimpleModel) { - super(); - this.Browser = Browser; - this.textArea = textArea; - this.model = model; - this.selection = new Range(1, 1, 1, 1); - this.selections = [new Range(1, 1, 1, 1)]; - this._nextCommand = ReadFromTextArea.Type; - - this.asyncTriggerCut = new RunOnceScheduler(() => this._onCut.fire(), 0); - - this.lastCopiedValue = null; - this.lastCopiedValueIsFromEmptySelection = false; - this.textAreaState = createTextAreaState(strategy); - - this.hasFocus = false; - - this.lastCompositionEndTime = 0; - - this._register(this.textArea.onKeyDown((e) => this._onKeyDownHandler(e))); - this._register(this.textArea.onKeyUp((e) => this._onKeyUp.fire(e))); - this._register(this.textArea.onKeyPress((e) => this._onKeyPressHandler(e))); - - this.textareaIsShownAtCursor = false; - let compositionLocale = null; - - this._register(this.textArea.onCompositionStart((e) => { - - if (this.textareaIsShownAtCursor) { - return; - } - - this.textareaIsShownAtCursor = true; - - // In IE we cannot set .value when handling 'compositionstart' because the entire composition will get canceled. - if (!this.Browser.isEdgeOrIE) { - this.setTextAreaState('compositionstart', this.textAreaState.toEmpty(), false); - } - - this._onCompositionStart.fire({ - showAtLineNumber: this.selection.startLineNumber, - showAtColumn: this.selection.startColumn - }); - })); - - this._register(this.textArea.onCompositionUpdate((e) => { - if (isChromev55_v56) { - // See https://github.com/Microsoft/monaco-editor/issues/320 - // where compositionupdate .data is broken in Chrome v55 and v56 - // See https://bugs.chromium.org/p/chromium/issues/detail?id=677050#c9 - compositionLocale = e.locale; - // The textArea doesn't get the composition update yet, the value of textarea is still obsolete - // so we can't correct e at this moment. - return; - } - - if (Browser.isEdgeOrIE && e.locale === 'ja') { - // https://github.com/Microsoft/monaco-editor/issues/339 - // Multi-part Japanese compositions reset cursor in Edge/IE, Chinese and Korean IME don't have this issue. - // The reason that we can't use this path for all CJK IME is IE and Edge behave differently when handling Korean IME, - // which breaks this path of code. - this.textAreaState = this.textAreaState.fromTextArea(this.textArea); - let typeInput = this.textAreaState.deduceInput(); - this._onType.fire(typeInput); - this._onCompositionUpdate.fire(e); - return; - } - - this.textAreaState = this.textAreaState.fromText(e.data); - let typeInput = this.textAreaState.updateComposition(); - this._onType.fire(typeInput); - this._onCompositionUpdate.fire(e); - })); - - let readFromTextArea = () => { - let tempTextAreaState = this.textAreaState.fromTextArea(this.textArea); - let typeInput = tempTextAreaState.deduceInput(); - if (typeInput.replaceCharCnt === 0 && typeInput.text.length === 1 && strings.isHighSurrogate(typeInput.text.charCodeAt(0))) { - // Ignore invalid input but keep it around for next time - return; - } - - this.textAreaState = tempTextAreaState; - // console.log('==> DEDUCED INPUT: ' + JSON.stringify(typeInput)); - if (this._nextCommand === ReadFromTextArea.Type) { - if (typeInput.text !== '') { - this._onType.fire(typeInput); - } - } else { - this.executePaste(typeInput.text); - this._nextCommand = ReadFromTextArea.Type; - } - }; - - this._register(this.textArea.onCompositionEnd((e) => { - // console.log('onCompositionEnd: ' + e.data); - if (Browser.isEdgeOrIE && e.locale === 'ja') { - // https://github.com/Microsoft/monaco-editor/issues/339 - this.textAreaState = this.textAreaState.fromTextArea(this.textArea); - let typeInput = this.textAreaState.deduceInput(); - this._onType.fire(typeInput); - } - else { - this.textAreaState = this.textAreaState.fromText(e.data); - let typeInput = this.textAreaState.updateComposition(); - this._onType.fire(typeInput); - } - - // Due to isEdgeOrIE (where the textarea was not cleared initially) and isChrome (the textarea is not updated correctly when composition ends) - // we cannot assume the text at the end consists only of the composited text - if (Browser.isEdgeOrIE || Browser.isChrome) { - this.textAreaState = this.textAreaState.fromTextArea(this.textArea); - } - - this.lastCompositionEndTime = (new Date()).getTime(); - if (!this.textareaIsShownAtCursor) { - return; - } - this.textareaIsShownAtCursor = false; - - this._onCompositionEnd.fire(); - })); - - this._register(this.textArea.onInput(() => { - // console.log('onInput: ' + this.textArea.getValue()); - if (this.textareaIsShownAtCursor) { - // See https://github.com/Microsoft/monaco-editor/issues/320 - if (isChromev55_v56) { - let text = this.textArea.getValue(); - this.textAreaState = this.textAreaState.fromText(text); - let typeInput = this.textAreaState.updateComposition(); - this._onType.fire(typeInput); - let e = { - locale: compositionLocale, - data: text - }; - this._onCompositionUpdate.fire(e); - } - // console.log('::ignoring input event because the textarea is shown at cursor: ' + this.textArea.getValue()); - return; - } - - readFromTextArea(); - })); - - // --- Clipboard operations - - this._register(this.textArea.onCut((e) => { - this._ensureClipboardGetsEditorSelection(e); - this.asyncTriggerCut.schedule(); - })); - - this._register(this.textArea.onCopy((e) => { - this._ensureClipboardGetsEditorSelection(e); - })); - - this._register(this.textArea.onPaste((e) => { - if (e.canUseTextData()) { - this.executePaste(e.getTextData()); - } else { - if (this.textArea.getSelectionStart() !== this.textArea.getSelectionEnd()) { - // Clean up the textarea, to get a clean paste - this.setTextAreaState('paste', this.textAreaState.toEmpty(), false); - } - this._nextCommand = ReadFromTextArea.Paste; - } - })); - - this._writePlaceholderAndSelectTextArea('ctor', false); - } - - public dispose(): void { - this.asyncTriggerCut.dispose(); - super.dispose(); - } - - // --- begin event handlers - - public setStrategy(strategy: TextAreaStrategy): void { - this.textAreaState = this.textAreaState.toStrategy(strategy); - } - - public setHasFocus(isFocused: boolean): void { - if (this.hasFocus === isFocused) { - // no change - return; - } - this.hasFocus = isFocused; - if (this.hasFocus) { - this._writePlaceholderAndSelectTextArea('focusgain', false); - } - } - - public setCursorSelections(primary: Range, secondary: Range[]): void { - this.selection = primary; - this.selections = [primary].concat(secondary); - this._writePlaceholderAndSelectTextArea('selection changed', false); - } - - // --- end event handlers - - private setTextAreaState(reason: string, textAreaState: TextAreaState, forceFocus: boolean): void { - if (!this.hasFocus) { - textAreaState = textAreaState.resetSelection(); - } - - textAreaState.applyToTextArea(reason, this.textArea, this.hasFocus || forceFocus); - this.textAreaState = textAreaState; - } - - private _onKeyDownHandler(e: IKeyboardEventWrapper): void { - if (this.textareaIsShownAtCursor && e.equals(KeyCode.KEY_IN_COMPOSITION)) { - // Stop propagation for keyDown events if the IME is processing key input - e.stopPropagation(); - } - - if (e.equals(KeyCode.Escape)) { - // Prevent default always for `Esc`, otherwise it will generate a keypress - // See https://msdn.microsoft.com/en-us/library/ie/ms536939(v=vs.85).aspx - e.preventDefault(); - } - this._onKeyDown.fire(e); - } - - private _onKeyPressHandler(e: IKeyboardEventWrapper): void { - if (!this.hasFocus) { - // Sometimes, when doing Alt-Tab, in FF, a 'keypress' is sent before a 'focus' - return; - } - } - - // ------------- Operations that are always executed asynchronously - - private executePaste(txt: string): void { - if (txt === '') { - return; - } - - let pasteOnNewLine = false; - if (this.Browser.enableEmptySelectionClipboard) { - pasteOnNewLine = (txt === this.lastCopiedValue && this.lastCopiedValueIsFromEmptySelection); - } - this._onPaste.fire({ - text: txt, - pasteOnNewLine: pasteOnNewLine - }); - } - - public focusTextArea(): void { - this._writePlaceholderAndSelectTextArea('focusTextArea', true); - } - - private _writePlaceholderAndSelectTextArea(reason: string, forceFocus: boolean): void { - if (!this.textareaIsShownAtCursor) { - // Do not write to the textarea if it is visible. - if (this.Browser.isIPad) { - // Do not place anything in the textarea for the iPad - this.setTextAreaState(reason, this.textAreaState.toEmpty(), forceFocus); - } else { - this.setTextAreaState(reason, this.textAreaState.fromEditorSelection(this.model, this.selection), forceFocus); - } - } - } - - // ------------- Clipboard operations - - private _ensureClipboardGetsEditorSelection(e: IClipboardEvent): void { - let whatToCopy = this.model.getPlainTextToCopy(this.selections, this.Browser.enableEmptySelectionClipboard); - if (e.canUseTextData()) { - let whatHTMLToCopy: string = null; - if (!this.Browser.isEdgeOrIE && (whatToCopy.length < 65536 || CopyOptions.forceCopyWithSyntaxHighlighting)) { - whatHTMLToCopy = this.model.getHTMLToCopy(this.selections, this.Browser.enableEmptySelectionClipboard); - } - e.setTextData(whatToCopy, whatHTMLToCopy); - } else { - this.setTextAreaState('copy or cut', this.textAreaState.fromText(whatToCopy), false); - } - - if (this.Browser.enableEmptySelectionClipboard) { - if (this.Browser.isFirefox) { - // When writing "LINE\r\n" to the clipboard and then pasting, - // Firefox pastes "LINE\n", so let's work around this quirk - this.lastCopiedValue = whatToCopy.replace(/\r\n/g, '\n'); - } else { - this.lastCopiedValue = whatToCopy; - } - - let selections = this.selections; - this.lastCopiedValueIsFromEmptySelection = (selections.length === 1 && selections[0].isEmpty()); - } - } -} \ No newline at end of file diff --git a/src/vs/editor/common/controller/textAreaState.ts b/src/vs/editor/common/controller/textAreaState.ts deleted file mode 100644 index 1090e2a10dc4e..0000000000000 --- a/src/vs/editor/common/controller/textAreaState.ts +++ /dev/null @@ -1,508 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import Event from 'vs/base/common/event'; -import { commonPrefixLength, commonSuffixLength } from 'vs/base/common/strings'; -import { Range } from 'vs/editor/common/core/range'; -import { EndOfLinePreference } from 'vs/editor/common/editorCommon'; -import { Position } from 'vs/editor/common/core/position'; -import { Constants } from 'vs/editor/common/core/uint'; - -export interface IClipboardEvent { - canUseTextData(): boolean; - setTextData(text: string, richText: string): void; - getTextData(): string; -} - -export interface ICompositionEvent { - data: string; - locale: string; -} - -export interface IKeyboardEventWrapper { - _actual: any; - equals(keybinding: number): boolean; - preventDefault(): void; - stopPropagation(): void; - isDefaultPrevented(): boolean; -} - -export interface ITextAreaWrapper { - onKeyDown: Event; - onKeyUp: Event; - onKeyPress: Event; - onCompositionStart: Event; - onCompositionUpdate: Event; - onCompositionEnd: Event; - onInput: Event; - onCut: Event; - onCopy: Event; - onPaste: Event; - - getValue(): string; - setValue(reason: string, value: string): void; - getSelectionStart(): number; - getSelectionEnd(): number; - - setSelectionRange(selectionStart: number, selectionEnd: number): void; - isInOverwriteMode(): boolean; -} - -export interface ISimpleModel { - getLineMaxColumn(lineNumber: number): number; - getEOL(): string; - getValueInRange(range: Range, eol: EndOfLinePreference): string; - getModelLineContent(lineNumber: number): string; - getLineCount(): number; - getPlainTextToCopy(ranges: Range[], enableEmptySelectionClipboard: boolean): string; - getHTMLToCopy(ranges: Range[], enableEmptySelectionClipboard: boolean): string; - - coordinatesConverter: { - convertViewPositionToModelPosition(viewPosition: Position): Position; - }; -} - -export interface ITypeData { - text: string; - replaceCharCnt: number; -} - -export enum TextAreaStrategy { - IENarrator, - NVDA -} - -const USE_NVDA_FULL_TEXT = false; - -export function createTextAreaState(strategy: TextAreaStrategy): TextAreaState { - if (strategy === TextAreaStrategy.IENarrator) { - return IENarratorTextAreaState.EMPTY; - } - if (USE_NVDA_FULL_TEXT) { - return NVDAFullTextAreaState.EMPTY; - } - return NVDAPagedTextAreaState.EMPTY; -} - -export abstract class TextAreaState { - - protected previousState: TextAreaState; - protected value: string; - protected selectionStart: number; - protected selectionEnd: number; - protected isInOverwriteMode: boolean; - - constructor(previousState: TextAreaState, value: string, selectionStart: number, selectionEnd: number, isInOverwriteMode: boolean) { - this.previousState = previousState ? previousState.shallowClone() : null; - this.value = value; - this.selectionStart = selectionStart; - this.selectionEnd = selectionEnd; - this.isInOverwriteMode = isInOverwriteMode; - } - - protected abstract shallowClone(): TextAreaState; - - public abstract toEmpty(): TextAreaState; - - public abstract toString(): string; - - public abstract toStrategy(strategy: TextAreaStrategy): TextAreaState; - - public abstract equals(other: TextAreaState): boolean; - - public abstract fromTextArea(textArea: ITextAreaWrapper): TextAreaState; - - public abstract fromEditorSelection(model: ISimpleModel, selection: Range); - - public abstract fromText(text: string): TextAreaState; - - public updateComposition(): ITypeData { - if (!this.previousState) { - // This is the EMPTY state - return { - text: '', - replaceCharCnt: 0 - }; - } - - return { - text: this.value, - replaceCharCnt: this.previousState.selectionEnd - this.previousState.selectionStart - }; - } - - public abstract resetSelection(): TextAreaState; - - public getSelectionStart(): number { - return this.selectionStart; - } - - public getValue(): string { - return this.value; - } - - public applyToTextArea(reason: string, textArea: ITextAreaWrapper, select: boolean): void { - // console.log(Date.now() + ': applyToTextArea ' + reason + ': ' + this.toString()); - if (textArea.getValue() !== this.value) { - textArea.setValue(reason, this.value); - } - if (select) { - textArea.setSelectionRange(this.selectionStart, this.selectionEnd); - } - } - - public deduceInput(): ITypeData { - if (!this.previousState) { - // This is the EMPTY state - return { - text: '', - replaceCharCnt: 0 - }; - } - - // console.log('------------------------deduceInput'); - // console.log('CURRENT STATE: ' + this.toString()); - // console.log('PREVIOUS STATE: ' + this.previousState.toString()); - - let previousValue = this.previousState.value; - let previousSelectionStart = this.previousState.selectionStart; - let previousSelectionEnd = this.previousState.selectionEnd; - let currentValue = this.value; - let currentSelectionStart = this.selectionStart; - let currentSelectionEnd = this.selectionEnd; - - // Strip the previous suffix from the value (without interfering with the current selection) - let previousSuffix = previousValue.substring(previousSelectionEnd); - let currentSuffix = currentValue.substring(currentSelectionEnd); - let suffixLength = commonSuffixLength(previousSuffix, currentSuffix); - currentValue = currentValue.substring(0, currentValue.length - suffixLength); - previousValue = previousValue.substring(0, previousValue.length - suffixLength); - - let previousPrefix = previousValue.substring(0, previousSelectionStart); - let currentPrefix = currentValue.substring(0, currentSelectionStart); - let prefixLength = commonPrefixLength(previousPrefix, currentPrefix); - currentValue = currentValue.substring(prefixLength); - previousValue = previousValue.substring(prefixLength); - currentSelectionStart -= prefixLength; - previousSelectionStart -= prefixLength; - currentSelectionEnd -= prefixLength; - previousSelectionEnd -= prefixLength; - - // console.log('AFTER DIFFING CURRENT STATE: <' + currentValue + '>, selectionStart: ' + currentSelectionStart + ', selectionEnd: ' + currentSelectionEnd); - // console.log('AFTER DIFFING PREVIOUS STATE: <' + previousValue + '>, selectionStart: ' + previousSelectionStart + ', selectionEnd: ' + previousSelectionEnd); - - if (currentSelectionStart === currentSelectionEnd) { - // composition accept case - // [blahblah] => blahblah| - if ( - previousValue === currentValue - && previousSelectionStart === 0 - && previousSelectionEnd === previousValue.length - && currentSelectionStart === currentValue.length - && currentValue.indexOf('\n') === -1 - ) { - return { - text: '', - replaceCharCnt: 0 - }; - } - - // no current selection - let replacePreviousCharacters = (previousPrefix.length - prefixLength); - // console.log('REMOVE PREVIOUS: ' + (previousPrefix.length - prefixLength) + ' chars'); - - return { - text: currentValue, - replaceCharCnt: replacePreviousCharacters - }; - } - - // there is a current selection => composition case - let replacePreviousCharacters = previousSelectionEnd - previousSelectionStart; - return { - text: currentValue, - replaceCharCnt: replacePreviousCharacters - }; - } -} - -export class IENarratorTextAreaState extends TextAreaState { - public static EMPTY = new IENarratorTextAreaState(null, '', 0, 0, false, 0); - - private selectionToken: number; - - constructor(previousState: TextAreaState, value: string, selectionStart: number, selectionEnd: number, isInOverwriteMode: boolean, selectionToken: number) { - super(previousState, value, selectionStart, selectionEnd, isInOverwriteMode); - this.selectionToken = selectionToken; - } - - protected shallowClone(): TextAreaState { - return new IENarratorTextAreaState(null, this.value, this.selectionStart, this.selectionEnd, this.isInOverwriteMode, this.selectionToken); - } - - public toEmpty(): TextAreaState { - return IENarratorTextAreaState.EMPTY; - } - - public toString(): string { - return '[ <' + this.value + '>, selectionStart: ' + this.selectionStart + ', selectionEnd: ' + this.selectionEnd + ', isInOverwriteMode: ' + this.isInOverwriteMode + ', selectionToken: ' + this.selectionToken + ']'; - } - - public toStrategy(strategy: TextAreaStrategy): TextAreaState { - if (strategy === TextAreaStrategy.IENarrator) { - return this; - } - if (USE_NVDA_FULL_TEXT) { - return new NVDAFullTextAreaState(this.previousState, this.value, this.selectionStart, this.selectionEnd, this.isInOverwriteMode); - } - return new NVDAPagedTextAreaState(this.previousState, this.value, this.selectionStart, this.selectionEnd, this.isInOverwriteMode); - } - - public equals(other: TextAreaState): boolean { - if (other instanceof IENarratorTextAreaState) { - return ( - this.value === other.value - && this.selectionStart === other.selectionStart - && this.selectionEnd === other.selectionEnd - && this.isInOverwriteMode === other.isInOverwriteMode - && this.selectionToken === other.selectionToken - ); - } - return false; - } - - public fromTextArea(textArea: ITextAreaWrapper): TextAreaState { - return new IENarratorTextAreaState(this, textArea.getValue(), textArea.getSelectionStart(), textArea.getSelectionEnd(), textArea.isInOverwriteMode(), this.selectionToken); - } - - public fromEditorSelection(model: ISimpleModel, selection: Range): TextAreaState { - let LIMIT_CHARS = 100; - let PADDING_LINES_COUNT = 0; - - let selectionStartLineNumber = selection.startLineNumber, - selectionStartColumn = selection.startColumn, - selectionEndLineNumber = selection.endLineNumber, - selectionEndColumn = selection.endColumn, - selectionEndLineNumberMaxColumn = model.getLineMaxColumn(selectionEndLineNumber); - - // If the selection is empty and we have switched line numbers, expand selection to full line (helps Narrator trigger a full line read) - if (selection.isEmpty() && this.selectionToken !== selectionStartLineNumber) { - selectionStartColumn = 1; - selectionEndColumn = selectionEndLineNumberMaxColumn; - } - - // `pretext` contains the text before the selection - let pretext = ''; - let startLineNumber = Math.max(1, selectionStartLineNumber - PADDING_LINES_COUNT); - if (startLineNumber < selectionStartLineNumber) { - pretext = model.getValueInRange(new Range(startLineNumber, 1, selectionStartLineNumber, 1), EndOfLinePreference.LF); - } - pretext += model.getValueInRange(new Range(selectionStartLineNumber, 1, selectionStartLineNumber, selectionStartColumn), EndOfLinePreference.LF); - if (pretext.length > LIMIT_CHARS) { - pretext = pretext.substring(pretext.length - LIMIT_CHARS, pretext.length); - } - - - // `posttext` contains the text after the selection - let posttext = ''; - let endLineNumber = Math.min(selectionEndLineNumber + PADDING_LINES_COUNT, model.getLineCount()); - posttext += model.getValueInRange(new Range(selectionEndLineNumber, selectionEndColumn, selectionEndLineNumber, selectionEndLineNumberMaxColumn), EndOfLinePreference.LF); - if (endLineNumber > selectionEndLineNumber) { - posttext = '\n' + model.getValueInRange(new Range(selectionEndLineNumber + 1, 1, endLineNumber, model.getLineMaxColumn(endLineNumber)), EndOfLinePreference.LF); - } - if (posttext.length > LIMIT_CHARS) { - posttext = posttext.substring(0, LIMIT_CHARS); - } - - - // `text` contains the text of the selection - let text = model.getValueInRange(new Range(selectionStartLineNumber, selectionStartColumn, selectionEndLineNumber, selectionEndColumn), EndOfLinePreference.LF); - if (text.length > 2 * LIMIT_CHARS) { - text = text.substring(0, LIMIT_CHARS) + String.fromCharCode(8230) + text.substring(text.length - LIMIT_CHARS, text.length); - } - - return new IENarratorTextAreaState(this, pretext + text + posttext, pretext.length, pretext.length + text.length, false, selectionStartLineNumber); - } - - public fromText(text: string): TextAreaState { - return new IENarratorTextAreaState(this, text, 0, text.length, false, 0); - } - - public resetSelection(): TextAreaState { - return new IENarratorTextAreaState(this.previousState, this.value, this.value.length, this.value.length, this.isInOverwriteMode, this.selectionToken); - } -} - -export class NVDAPagedTextAreaState extends TextAreaState { - public static EMPTY = new NVDAPagedTextAreaState(null, '', 0, 0, false); - private static _LINES_PER_PAGE = 10; - - constructor(previousState: TextAreaState, value: string, selectionStart: number, selectionEnd: number, isInOverwriteMode: boolean) { - super(previousState, value, selectionStart, selectionEnd, isInOverwriteMode); - } - - protected shallowClone(): TextAreaState { - return new NVDAPagedTextAreaState(null, this.value, this.selectionStart, this.selectionEnd, this.isInOverwriteMode); - } - - public toEmpty(): TextAreaState { - return NVDAPagedTextAreaState.EMPTY; - } - - public toString(): string { - return '[ <' + this.value + '>, selectionStart: ' + this.selectionStart + ', selectionEnd: ' + this.selectionEnd + ', isInOverwriteMode: ' + this.isInOverwriteMode + ']'; - } - - public toStrategy(strategy: TextAreaStrategy): TextAreaState { - if (strategy === TextAreaStrategy.NVDA) { - return this; - } - return new IENarratorTextAreaState(this.previousState, this.value, this.selectionStart, this.selectionEnd, this.isInOverwriteMode, 0); - } - - public equals(other: TextAreaState): boolean { - if (other instanceof NVDAPagedTextAreaState) { - return ( - this.value === other.value - && this.selectionStart === other.selectionStart - && this.selectionEnd === other.selectionEnd - && this.isInOverwriteMode === other.isInOverwriteMode - ); - } - return false; - } - - public fromTextArea(textArea: ITextAreaWrapper): TextAreaState { - return new NVDAPagedTextAreaState(this, textArea.getValue(), textArea.getSelectionStart(), textArea.getSelectionEnd(), textArea.isInOverwriteMode()); - } - - private static _getPageOfLine(lineNumber: number): number { - return Math.floor((lineNumber - 1) / NVDAPagedTextAreaState._LINES_PER_PAGE); - } - - private static _getRangeForPage(page: number): Range { - let offset = page * NVDAPagedTextAreaState._LINES_PER_PAGE; - let startLineNumber = offset + 1; - let endLineNumber = offset + NVDAPagedTextAreaState._LINES_PER_PAGE; - return new Range(startLineNumber, 1, endLineNumber, Constants.MAX_SAFE_SMALL_INTEGER); - } - - public fromEditorSelection(model: ISimpleModel, selection: Range): TextAreaState { - - let selectionStartPage = NVDAPagedTextAreaState._getPageOfLine(selection.startLineNumber); - let selectionStartPageRange = NVDAPagedTextAreaState._getRangeForPage(selectionStartPage); - - let selectionEndPage = NVDAPagedTextAreaState._getPageOfLine(selection.endLineNumber); - let selectionEndPageRange = NVDAPagedTextAreaState._getRangeForPage(selectionEndPage); - - let pretextRange = selectionStartPageRange.intersectRanges(new Range(1, 1, selection.startLineNumber, selection.startColumn)); - let pretext = model.getValueInRange(pretextRange, EndOfLinePreference.LF); - - let lastLine = model.getLineCount(); - let lastLineMaxColumn = model.getLineMaxColumn(lastLine); - let posttextRange = selectionEndPageRange.intersectRanges(new Range(selection.endLineNumber, selection.endColumn, lastLine, lastLineMaxColumn)); - let posttext = model.getValueInRange(posttextRange, EndOfLinePreference.LF); - - let text: string = null; - if (selectionStartPage === selectionEndPage || selectionStartPage + 1 === selectionEndPage) { - // take full selection - text = model.getValueInRange(selection, EndOfLinePreference.LF); - } else { - let selectionRange1 = selectionStartPageRange.intersectRanges(selection); - let selectionRange2 = selectionEndPageRange.intersectRanges(selection); - text = ( - model.getValueInRange(selectionRange1, EndOfLinePreference.LF) - + String.fromCharCode(8230) - + model.getValueInRange(selectionRange2, EndOfLinePreference.LF) - ); - } - - // Chromium handles very poorly text even of a few thousand chars - // Cut text to avoid stalling the entire UI - const LIMIT_CHARS = 500; - if (pretext.length > LIMIT_CHARS) { - pretext = pretext.substring(pretext.length - LIMIT_CHARS, pretext.length); - } - if (posttext.length > LIMIT_CHARS) { - posttext = posttext.substring(0, LIMIT_CHARS); - } - if (text.length > 2 * LIMIT_CHARS) { - text = text.substring(0, LIMIT_CHARS) + String.fromCharCode(8230) + text.substring(text.length - LIMIT_CHARS, text.length); - } - - return new NVDAPagedTextAreaState(this, pretext + text + posttext, pretext.length, pretext.length + text.length, false); - } - - public fromText(text: string): TextAreaState { - return new NVDAPagedTextAreaState(this, text, 0, text.length, false); - } - - public resetSelection(): TextAreaState { - return new NVDAPagedTextAreaState(this.previousState, this.value, this.value.length, this.value.length, this.isInOverwriteMode); - } -} - - -export class NVDAFullTextAreaState extends TextAreaState { - public static EMPTY = new NVDAFullTextAreaState(null, '', 0, 0, false); - - constructor(previousState: TextAreaState, value: string, selectionStart: number, selectionEnd: number, isInOverwriteMode: boolean) { - super(previousState, value, selectionStart, selectionEnd, isInOverwriteMode); - } - - protected shallowClone(): TextAreaState { - return new NVDAFullTextAreaState(null, this.value, this.selectionStart, this.selectionEnd, this.isInOverwriteMode); - } - - public toEmpty(): TextAreaState { - return NVDAFullTextAreaState.EMPTY; - } - - public toString(): string { - return '[ , selectionStart: ' + this.selectionStart + ', selectionEnd: ' + this.selectionEnd + ', isInOverwriteMode: ' + this.isInOverwriteMode + ']'; - } - - public toStrategy(strategy: TextAreaStrategy): TextAreaState { - if (strategy === TextAreaStrategy.NVDA) { - return this; - } - return new IENarratorTextAreaState(this.previousState, this.value, this.selectionStart, this.selectionEnd, this.isInOverwriteMode, 0); - } - - public equals(other: TextAreaState): boolean { - if (other instanceof NVDAFullTextAreaState) { - return ( - this.value === other.value - && this.selectionStart === other.selectionStart - && this.selectionEnd === other.selectionEnd - && this.isInOverwriteMode === other.isInOverwriteMode - ); - } - return false; - } - - public fromTextArea(textArea: ITextAreaWrapper): TextAreaState { - return new NVDAFullTextAreaState(this, textArea.getValue(), textArea.getSelectionStart(), textArea.getSelectionEnd(), textArea.isInOverwriteMode()); - } - - public fromEditorSelection(model: ISimpleModel, selection: Range): TextAreaState { - let pretext = model.getValueInRange(new Range(1, 1, selection.startLineNumber, selection.startColumn), EndOfLinePreference.LF); - let text = model.getValueInRange(selection, EndOfLinePreference.LF); - let lastLine = model.getLineCount(); - let lastLineMaxColumn = model.getLineMaxColumn(lastLine); - let posttext = model.getValueInRange(new Range(selection.endLineNumber, selection.endColumn, lastLine, lastLineMaxColumn), EndOfLinePreference.LF); - - return new NVDAFullTextAreaState(this, pretext + text + posttext, pretext.length, pretext.length + text.length, false); - } - - public fromText(text: string): TextAreaState { - return new NVDAFullTextAreaState(this, text, 0, text.length, false); - } - - public resetSelection(): TextAreaState { - return new NVDAFullTextAreaState(this.previousState, this.value, this.value.length, this.value.length, this.isInOverwriteMode); - } -} diff --git a/src/vs/editor/common/controller/wordCharacterClassifier.ts b/src/vs/editor/common/controller/wordCharacterClassifier.ts new file mode 100644 index 0000000000000..c8399717727c6 --- /dev/null +++ b/src/vs/editor/common/controller/wordCharacterClassifier.ts @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import { CharCode } from 'vs/base/common/charCode'; +import { CharacterClassifier } from 'vs/editor/common/core/characterClassifier'; + +export const enum WordCharacterClass { + Regular = 0, + Whitespace = 1, + WordSeparator = 2 +} + +export class WordCharacterClassifier extends CharacterClassifier { + + constructor(wordSeparators: string) { + super(WordCharacterClass.Regular); + + for (let i = 0, len = wordSeparators.length; i < len; i++) { + this.set(wordSeparators.charCodeAt(i), WordCharacterClass.WordSeparator); + } + + this.set(CharCode.Space, WordCharacterClass.Whitespace); + this.set(CharCode.Tab, WordCharacterClass.Whitespace); + } + +} + +function once(computeFn: (input: string) => R): (input: string) => R { + let cache: { [key: string]: R; } = {}; // TODO@Alex unbounded cache + return (input: string): R => { + if (!cache.hasOwnProperty(input)) { + cache[input] = computeFn(input); + } + return cache[input]; + }; +} + +export const getMapForWordSeparators = once( + (input) => new WordCharacterClassifier(input) +); diff --git a/src/vs/editor/common/core/range.ts b/src/vs/editor/common/core/range.ts index e04ac3ef677d5..06255c480ec09 100644 --- a/src/vs/editor/common/core/range.ts +++ b/src/vs/editor/common/core/range.ts @@ -290,6 +290,10 @@ export class Range { // --- + public static fromPositions(start: IPosition, end: IPosition = start): Range { + return new Range(start.lineNumber, start.column, end.lineNumber, end.column); + } + /** * Create a `Range` from an `IRange`. */ diff --git a/src/vs/editor/common/core/selection.ts b/src/vs/editor/common/core/selection.ts index e0aa9ecb31497..10705ad4fe8d8 100644 --- a/src/vs/editor/common/core/selection.ts +++ b/src/vs/editor/common/core/selection.ts @@ -5,6 +5,7 @@ 'use strict'; import { Range } from 'vs/editor/common/core/range'; +import { Position, IPosition } from 'vs/editor/common/core/position'; /** * A selection in the editor. @@ -128,6 +129,13 @@ export class Selection extends Range { return new Selection(endLineNumber, endColumn, this.startLineNumber, this.startColumn); } + /** + * Get the position at `positionLineNumber` and `positionColumn`. + */ + public getPosition(): Position { + return new Position(this.positionLineNumber, this.positionColumn); + } + /** * Create a new selection with a different `selectionStartLineNumber` and `selectionStartColumn`. */ @@ -140,6 +148,13 @@ export class Selection extends Range { // ---- + /** + * Create a `Selection` from one or two positions + */ + public static fromPositions(start: IPosition, end: IPosition = start): Selection { + return new Selection(start.lineNumber, start.column, end.lineNumber, end.column); + } + /** * Create a `Selection` from an `ISelection`. */ @@ -192,4 +207,4 @@ export class Selection extends Range { return new Selection(endLineNumber, endColumn, startLineNumber, startColumn); } -} \ No newline at end of file +} diff --git a/src/vs/editor/common/editorCommon.ts b/src/vs/editor/common/editorCommon.ts index bace38517a3fb..af362596afe6a 100644 --- a/src/vs/editor/common/editorCommon.ts +++ b/src/vs/editor/common/editorCommon.ts @@ -23,7 +23,8 @@ import { } from 'vs/editor/common/model/textModelEvents'; import * as editorOptions from 'vs/editor/common/config/editorOptions'; import { ICursorPositionChangedEvent, ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; -import { ICursors } from 'vs/editor/common/controller/cursorCommon'; +import { ICursors, CursorConfiguration } from 'vs/editor/common/controller/cursorCommon'; +import { ThemeColor } from 'vs/platform/theme/common/themeService'; /** * Vertical Lane in the overview ruler of the editor. @@ -41,19 +42,19 @@ export enum OverviewRulerLane { export interface IModelDecorationOverviewRulerOptions { /** * CSS color to render in the overview ruler. - * e.g.: rgba(100, 100, 100, 0.5) + * e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry */ - color: string; + color: string | ThemeColor; /** * CSS color to render in the overview ruler. - * e.g.: rgba(100, 100, 100, 0.5) + * e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry */ - darkColor: string; + darkColor: string | ThemeColor; /** * CSS color to render in the overview ruler. - * e.g.: rgba(100, 100, 100, 0.5) + * e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry */ - hcColor?: string; + hcColor?: string | ThemeColor; /** * The position in the overview ruler. */ @@ -65,7 +66,7 @@ export interface IModelDecorationOverviewRulerOptions { */ export interface IModelDecorationOptions { /** - * Customize the growing behaviour of the decoration when typing at the edges of the decoration. + * Customize the growing behavior of the decoration when typing at the edges of the decoration. * Defaults to TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges */ stickiness?: TrackedRangeStickiness; @@ -86,9 +87,10 @@ export interface IModelDecorationOptions { */ isWholeLine?: boolean; /** - * @deprecated : Use `overviewRuler` instead + * Always render the decoration (even when the range it encompasses is collapsed). + * @internal */ - showInOverviewRuler?: string; + readonly showIfCollapsed?: boolean; /** * If set, render this decoration in the overview ruler. */ @@ -291,6 +293,14 @@ export interface IEditOperationBuilder { */ addEditOperation(range: Range, text: string): void; + /** + * Add a new edit operation (a replace operation). + * The inverse edits will be accessible in `ICursorStateComputerData.getInverseEditOperations()` + * @param range The range to replace (delete). May be empty to represent a simple insert. + * @param text The text to replace with. May be null to represent a simple delete. + */ + addTrackedEditOperation(range: Range, text: string): void; + /** * Track `selection` when applying edit operations. * A best effort will be made to not grow/expand the selection. @@ -323,12 +333,20 @@ export interface ICursorStateComputerData { * A command that modifies text / cursor state on a model. */ export interface ICommand { + + /** + * Signal that this command is inserting automatic whitespace that should be trimmed if possible. + * @internal + */ + readonly insertsAutoWhitespace?: boolean; + /** * Get the edit operations needed to execute this command. * @param model The model the command will execute on. * @param builder A helper to collect the needed edit operations and to track selections. */ getEditOperations(model: ITokenizedModel, builder: IEditOperationBuilder): void; + /** * Compute the cursor state after the edit operations were applied. * @param model The model the commad has executed on. @@ -384,6 +402,11 @@ export interface IIdentifiedSingleEditOperation { * that can be removed on next model edit operation if `config.trimAutoWhitespace` is true. */ isAutoWhitespaceEdit?: boolean; + /** + * This indicates that this operation is in a set of operations that are tracked and should not be "simplified". + * @internal + */ + _isTracked?: boolean; } /** @@ -685,46 +708,46 @@ export interface ITextModel { * @param searchOnlyEditableRange Limit the searching to only search inside the editable range of the model. * @param isRegex Used to indicate that `searchString` is a regular expression. * @param matchCase Force the matching to match lower/upper case exactly. - * @param wholeWord Force the matching to match entire words only. + * @param wordSeparators Force the matching to match entire words only. Pass null otherwise. * @param captureMatches The result will contain the captured groups. * @param limitResultCount Limit the number of results * @return The ranges where the matches are. It is empty if not matches have been found. */ - findMatches(searchString: string, searchOnlyEditableRange: boolean, isRegex: boolean, matchCase: boolean, wholeWord: boolean, captureMatches: boolean, limitResultCount?: number): FindMatch[]; + findMatches(searchString: string, searchOnlyEditableRange: boolean, isRegex: boolean, matchCase: boolean, wordSeparators: string, captureMatches: boolean, limitResultCount?: number): FindMatch[]; /** * Search the model. * @param searchString The string used to search. If it is a regular expression, set `isRegex` to true. * @param searchScope Limit the searching to only search inside this range. * @param isRegex Used to indicate that `searchString` is a regular expression. * @param matchCase Force the matching to match lower/upper case exactly. - * @param wholeWord Force the matching to match entire words only. + * @param wordSeparators Force the matching to match entire words only. Pass null otherwise. * @param captureMatches The result will contain the captured groups. * @param limitResultCount Limit the number of results * @return The ranges where the matches are. It is empty if no matches have been found. */ - findMatches(searchString: string, searchScope: IRange, isRegex: boolean, matchCase: boolean, wholeWord: boolean, captureMatches: boolean, limitResultCount?: number): FindMatch[]; + findMatches(searchString: string, searchScope: IRange, isRegex: boolean, matchCase: boolean, wordSeparators: string, captureMatches: boolean, limitResultCount?: number): FindMatch[]; /** * Search the model for the next match. Loops to the beginning of the model if needed. * @param searchString The string used to search. If it is a regular expression, set `isRegex` to true. * @param searchStart Start the searching at the specified position. * @param isRegex Used to indicate that `searchString` is a regular expression. * @param matchCase Force the matching to match lower/upper case exactly. - * @param wholeWord Force the matching to match entire words only. + * @param wordSeparators Force the matching to match entire words only. Pass null otherwise. * @param captureMatches The result will contain the captured groups. * @return The range where the next match is. It is null if no next match has been found. */ - findNextMatch(searchString: string, searchStart: IPosition, isRegex: boolean, matchCase: boolean, wholeWord: boolean, captureMatches: boolean): FindMatch; + findNextMatch(searchString: string, searchStart: IPosition, isRegex: boolean, matchCase: boolean, wordSeparators: string, captureMatches: boolean): FindMatch; /** * Search the model for the previous match. Loops to the end of the model if needed. * @param searchString The string used to search. If it is a regular expression, set `isRegex` to true. * @param searchStart Start the searching at the specified position. * @param isRegex Used to indicate that `searchString` is a regular expression. * @param matchCase Force the matching to match lower/upper case exactly. - * @param wholeWord Force the matching to match entire words only. + * @param wordSeparators Force the matching to match entire words only. Pass null otherwise. * @param captureMatches The result will contain the captured groups. * @return The range where the previous match is. It is null if no previous match has been found. */ - findPreviousMatch(searchString: string, searchStart: IPosition, isRegex: boolean, matchCase: boolean, wholeWord: boolean, captureMatches: boolean): FindMatch; + findPreviousMatch(searchString: string, searchStart: IPosition, isRegex: boolean, matchCase: boolean, wordSeparators: string, captureMatches: boolean): FindMatch; } export class FindMatch { @@ -903,7 +926,8 @@ export interface ITextModelWithMarkers extends ITextModel { } /** - * Describes the behaviour of decorations when typing/editing near their edges. + * Describes the behavior of decorations when typing/editing near their edges. + * Note: Please do not edit the values, as they very carefully match `DecorationRangeBehavior` */ export enum TrackedRangeStickiness { AlwaysGrowsWhenTypingAtEdges = 0, @@ -1599,19 +1623,26 @@ export interface IEditorContribution { restoreViewState?(state: any): void; } +/** + * @internal + */ +export function isThemeColor(o): o is ThemeColor { + return o && typeof o.id === 'string'; +} + /** * @internal */ export interface IThemeDecorationRenderOptions { - backgroundColor?: string; + backgroundColor?: string | ThemeColor; outline?: string; - outlineColor?: string; + outlineColor?: string | ThemeColor; outlineStyle?: string; outlineWidth?: string; border?: string; - borderColor?: string; + borderColor?: string | ThemeColor; borderRadius?: string; borderSpacing?: string; borderStyle?: string; @@ -1619,13 +1650,13 @@ export interface IThemeDecorationRenderOptions { textDecoration?: string; cursor?: string; - color?: string; + color?: string | ThemeColor; letterSpacing?: string; gutterIconPath?: string | URI; gutterIconSize?: string; - overviewRulerColor?: string; + overviewRulerColor?: string | ThemeColor; before?: IContentDecorationRenderOptions; after?: IContentDecorationRenderOptions; @@ -1639,9 +1670,10 @@ export interface IContentDecorationRenderOptions { contentIconPath?: string | URI; border?: string; + borderColor?: string | ThemeColor; textDecoration?: string; - color?: string; - backgroundColor?: string; + color?: string | ThemeColor; + backgroundColor?: string | ThemeColor; margin?: string; width?: string; @@ -1653,6 +1685,7 @@ export interface IContentDecorationRenderOptions { */ export interface IDecorationRenderOptions extends IThemeDecorationRenderOptions { isWholeLine?: boolean; + rangeBehavior?: TrackedRangeStickiness; overviewRulerLane?: OverviewRulerLane; light?: IThemeDecorationRenderOptions; @@ -1803,7 +1836,7 @@ export interface ICommonCodeEditor extends IEditor { getConfiguration(): editorOptions.InternalEditorOptions; /** - * Returns the 'raw' editor's configuration, as it was applied over the defaults, but without any computed members. + * Returns the 'raw' editor's configuration (without any validation or defaults). * @internal */ getRawConfiguration(): editorOptions.IEditorOptions; @@ -1860,6 +1893,7 @@ export interface ICommonCodeEditor extends IEditor { /** * Execute a command on the editor. + * The edits will land on the undo-redo stack, but no "undo stop" will be pushed. * @param source The source of the call. * @param command The command to execute */ @@ -1872,6 +1906,7 @@ export interface ICommonCodeEditor extends IEditor { /** * Execute edits on the editor. + * The edits will land on the undo-redo stack, but no "undo stop" will be pushed. * @param source The source of the call. * @param edits The edits to execute. * @param endCursoState Cursor state after the edits were applied. @@ -1890,6 +1925,11 @@ export interface ICommonCodeEditor extends IEditor { */ _getCursors(): ICursors; + /** + * @internal + */ + _getCursorConfiguration(): CursorConfiguration; + /** * Get all the decorations on a line (filtering out decorations from other editors). */ @@ -2038,28 +2078,8 @@ export var Handler = { CompositionEnd: 'compositionEnd', Paste: 'paste', - Tab: 'tab', - Indent: 'indent', - Outdent: 'outdent', - - DeleteLeft: 'deleteLeft', - DeleteRight: 'deleteRight', - Cut: 'cut', Undo: 'undo', Redo: 'redo', - - LineInsertBefore: 'lineInsertBefore', - LineInsertAfter: 'lineInsertAfter', - LineBreakInsert: 'lineBreakInsert', }; - -/** - * @internal - */ -export const enum ThemeType { - Light = 1, - Dark = 2, - HighContrast = 3 -} diff --git a/src/vs/editor/common/editorCommonExtensions.ts b/src/vs/editor/common/editorCommonExtensions.ts index f9f6e49c9703e..dfc672ab721f4 100644 --- a/src/vs/editor/common/editorCommonExtensions.ts +++ b/src/vs/editor/common/editorCommonExtensions.ts @@ -8,22 +8,148 @@ import { illegalArgument } from 'vs/base/common/errors'; import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; import { ServicesAccessor, IConstructorSignature1 } from 'vs/platform/instantiation/common/instantiation'; -import { CommandsRegistry } from 'vs/platform/commands/common/commands'; -import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; -import { Registry } from 'vs/platform/platform'; +import { CommandsRegistry, ICommandHandlerDescription } from 'vs/platform/commands/common/commands'; +import { KeybindingsRegistry, ICommandAndKeybindingRule, IKeybindings } from 'vs/platform/keybinding/common/keybindingsRegistry'; +import { Registry } from 'vs/platform/registry/common/platform'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { ICommandOptions, Command as ConfigBasicCommand, EditorCommand as ConfigEditorCommand } from 'vs/editor/common/config/config'; import { Position } from 'vs/editor/common/core/position'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { IModelService } from 'vs/editor/common/services/modelService'; import { MenuId, MenuRegistry, IMenuItem } from 'vs/platform/actions/common/actions'; +import { IEditorService } from 'vs/platform/editor/common/editor'; +import { IContextKeyService, ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; +import { ICodeEditorService, getCodeEditor } from 'vs/editor/common/services/codeEditorService'; export type ServicesAccessor = ServicesAccessor; -export const Command = ConfigBasicCommand; -export const EditorCommand = ConfigEditorCommand; -export type ICommandOptions = ICommandOptions; export type ICommonEditorContributionCtor = IConstructorSignature1; +// ----- Generic Command + +export interface ICommandKeybindingsOptions extends IKeybindings { + kbExpr?: ContextKeyExpr; + weight?: number; +} +export interface ICommandOptions { + id: string; + precondition: ContextKeyExpr; + kbOpts?: ICommandKeybindingsOptions; + description?: ICommandHandlerDescription; +} +export abstract class Command { + public readonly id: string; + public readonly precondition: ContextKeyExpr; + private readonly _kbOpts: ICommandKeybindingsOptions; + private readonly _description: ICommandHandlerDescription; + + constructor(opts: ICommandOptions) { + this.id = opts.id; + this.precondition = opts.precondition; + this._kbOpts = opts.kbOpts; + this._description = opts.description; + } + + public toCommandAndKeybindingRule(defaultWeight: number): ICommandAndKeybindingRule { + const kbOpts = this._kbOpts || { primary: 0 }; + + let kbWhen = kbOpts.kbExpr; + if (this.precondition) { + if (kbWhen) { + kbWhen = ContextKeyExpr.and(kbWhen, this.precondition); + } else { + kbWhen = this.precondition; + } + } + + const weight = (typeof kbOpts.weight === 'number' ? kbOpts.weight : defaultWeight); + + return { + id: this.id, + handler: (accessor, args) => this.runCommand(accessor, args), + weight: weight, + when: kbWhen, + primary: kbOpts.primary, + secondary: kbOpts.secondary, + win: kbOpts.win, + linux: kbOpts.linux, + mac: kbOpts.mac, + description: this._description + }; + } + + public abstract runCommand(accessor: ServicesAccessor, args: any): void | TPromise; +} + +// ----- Editor Command & Editor Contribution Command + +function findFocusedEditor(accessor: ServicesAccessor): editorCommon.ICommonCodeEditor { + return accessor.get(ICodeEditorService).getFocusedCodeEditor(); +} +function getWorkbenchActiveEditor(accessor: ServicesAccessor): editorCommon.ICommonCodeEditor { + const editorService = accessor.get(IEditorService); + let activeEditor = (editorService).getActiveEditor && (editorService).getActiveEditor(); + return getCodeEditor(activeEditor); +} + +export interface IContributionCommandOptions extends ICommandOptions { + handler: (controller: T) => void; +} +export interface EditorControllerCommand { + new (opts: IContributionCommandOptions): EditorCommand; +} +export abstract class EditorCommand extends Command { + + /** + * Create a command class that is bound to a certain editor contribution. + */ + public static bindToContribution(controllerGetter: (editor: editorCommon.ICommonCodeEditor) => T): EditorControllerCommand { + return class EditorControllerCommandImpl extends EditorCommand { + private _callback: (controller: T) => void; + + constructor(opts: IContributionCommandOptions) { + super(opts); + + this._callback = opts.handler; + } + + public runEditorCommand(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor, args: any): void { + let controller = controllerGetter(editor); + if (controller) { + this._callback(controllerGetter(editor)); + } + } + }; + } + + public runCommand(accessor: ServicesAccessor, args: any): void | TPromise { + // Find the editor with text focus + let editor = findFocusedEditor(accessor); + + if (!editor) { + // Fallback to use what the workbench considers the active editor + editor = getWorkbenchActiveEditor(accessor); + } + + if (!editor) { + // well, at least we tried... + return; + } + + return editor.invokeWithinContext((editorAccessor) => { + const kbService = editorAccessor.get(IContextKeyService); + if (!kbService.contextMatchesRules(this.precondition)) { + // precondition does not hold + return; + } + + return this.runEditorCommand(editorAccessor, editor, args); + }); + } + + public abstract runEditorCommand(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor, args: any): void | TPromise; +} + +// ----- Editor Action + export interface IEditorCommandMenuOptions { group?: string; order?: number; @@ -33,7 +159,7 @@ export interface IActionOptions extends ICommandOptions { alias: string; menuOpts?: IEditorCommandMenuOptions; } -export abstract class EditorAction extends ConfigEditorCommand { +export abstract class EditorAction extends EditorCommand { public label: string; public alias: string; @@ -64,7 +190,7 @@ export abstract class EditorAction extends ConfigEditorCommand { public runEditorCommand(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor, args: any): void | TPromise { this.reportTelemetry(accessor, editor); - return this.run(accessor, editor, args); + return this.run(accessor, editor, args || {}); } protected reportTelemetry(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor) { @@ -74,33 +200,17 @@ export abstract class EditorAction extends ConfigEditorCommand { public abstract run(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor, args: any): void | TPromise; } -export interface IHandlerActionOptions extends IActionOptions { - handlerId: string; -} -export abstract class HandlerEditorAction extends EditorAction { - private _handlerId: string; - - constructor(opts: IHandlerActionOptions) { - super(opts); - this._handlerId = opts.handlerId; - } - - public run(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor): void { - editor.trigger(this.id, this._handlerId, null); - } -} - -// --- Editor Actions +// --- Registration of commands and actions export function editorAction(ctor: { new (): EditorAction; }): void { CommonEditorRegistry.registerEditorAction(new ctor()); } -export function editorCommand(ctor: { new (): ConfigEditorCommand }): void { +export function editorCommand(ctor: { new (): EditorCommand }): void { registerEditorCommand(new ctor()); } -export function registerEditorCommand(editorCommand: T): T { +export function registerEditorCommand(editorCommand: T): T { CommonEditorRegistry.registerEditorCommand(editorCommand); return editorCommand; } @@ -119,7 +229,7 @@ export module CommonEditorRegistry { export function getEditorActions(): EditorAction[] { return EditorContributionRegistry.INSTANCE.getEditorActions(); } - export function getEditorCommand(commandId: string): ConfigEditorCommand { + export function getEditorCommand(commandId: string): EditorCommand { return EditorContributionRegistry.INSTANCE.getEditorCommand(commandId); } @@ -135,7 +245,7 @@ export module CommonEditorRegistry { return KeybindingsRegistry.WEIGHT.editorContrib(importance); } - export function registerEditorCommand(editorCommand: ConfigEditorCommand): void { + export function registerEditorCommand(editorCommand: EditorCommand): void { EditorContributionRegistry.INSTANCE.registerEditorCommand(editorCommand); } @@ -177,7 +287,7 @@ class EditorContributionRegistry { private editorContributions: ICommonEditorContributionCtor[]; private editorActions: EditorAction[]; - private editorCommands: { [commandId: string]: ConfigEditorCommand; }; + private editorCommands: { [commandId: string]: EditorCommand; }; constructor() { this.editorContributions = []; @@ -209,12 +319,12 @@ class EditorContributionRegistry { return this.editorActions.slice(0); } - public registerEditorCommand(editorCommand: ConfigEditorCommand) { + public registerEditorCommand(editorCommand: EditorCommand) { KeybindingsRegistry.registerCommandAndKeybindingRule(editorCommand.toCommandAndKeybindingRule(KeybindingsRegistry.WEIGHT.editorContrib())); this.editorCommands[editorCommand.id] = editorCommand; } - public getEditorCommand(commandId: string): ConfigEditorCommand { + public getEditorCommand(commandId: string): EditorCommand { return (this.editorCommands[commandId] || null); } diff --git a/src/vs/editor/common/model/editableTextModel.ts b/src/vs/editor/common/model/editableTextModel.ts index 990306afc62c1..34f1fdfe8043d 100644 --- a/src/vs/editor/common/model/editableTextModel.ts +++ b/src/vs/editor/common/model/editableTextModel.ts @@ -8,8 +8,9 @@ import { Range, IRange } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { EditStack } from 'vs/editor/common/model/editStack'; import { ILineEdit, LineMarker, ModelLine, MarkersTracker } from 'vs/editor/common/model/modelLine'; -import { TextModelWithDecorations } from 'vs/editor/common/model/textModelWithDecorations'; +import { TextModelWithDecorations, ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; import * as strings from 'vs/base/common/strings'; +import * as arrays from 'vs/base/common/arrays'; import { Selection } from 'vs/editor/common/core/selection'; import { Position } from 'vs/editor/common/core/position'; import { IDisposable } from 'vs/base/common/lifecycle'; @@ -289,10 +290,14 @@ export class EditableTextModel extends TextModelWithDecorations implements edito let mightContainRTL = this._mightContainRTL; let mightContainNonBasicASCII = this._mightContainNonBasicASCII; + let canReduceOperations = true; let operations: IValidatedEditOperation[] = []; for (let i = 0; i < rawOperations.length; i++) { let op = rawOperations[i]; + if (canReduceOperations && op._isTracked) { + canReduceOperations = false; + } let validatedRange = this.validateRange(op.range); if (!mightContainRTL && op.text) { // check if the new inserted text contains RTL @@ -325,7 +330,9 @@ export class EditableTextModel extends TextModelWithDecorations implements edito } } - operations = this._reduceOperations(operations); + if (canReduceOperations) { + operations = this._reduceOperations(operations); + } let editableRange = this.getEditableRange(); let editableRangeStart = editableRange.getStartPosition(); @@ -469,7 +476,7 @@ export class EditableTextModel extends TextModelWithDecorations implements edito let contentChanges: textModelEvents.IModelContentChange[] = []; let lineEditsQueue: IIdentifiedLineEdit[] = []; - let queueLineEdit = (lineEdit: IIdentifiedLineEdit) => { + const queueLineEdit = (lineEdit: IIdentifiedLineEdit) => { if (lineEdit.startColumn === lineEdit.endColumn && lineEdit.text.length === 0) { // empty edit => ignore it return; @@ -477,7 +484,7 @@ export class EditableTextModel extends TextModelWithDecorations implements edito lineEditsQueue.push(lineEdit); }; - let flushLineEdits = () => { + const flushLineEdits = () => { if (lineEditsQueue.length === 0) { return; } @@ -489,7 +496,7 @@ export class EditableTextModel extends TextModelWithDecorations implements edito let currentLineNumberStart = 0; for (let i = 1, len = lineEditsQueue.length; i < len; i++) { - let lineNumber = lineEditsQueue[i].lineNumber; + const lineNumber = lineEditsQueue[i].lineNumber; if (lineNumber === currentLineNumber) { continue; @@ -527,7 +534,7 @@ export class EditableTextModel extends TextModelWithDecorations implements edito let totalLinesCountDelta = 0; for (let i = 0, len = operations.length; i < len; i++) { - let op = operations[i]; + const op = operations[i]; // console.log(); // console.log('-------------------'); @@ -535,26 +542,26 @@ export class EditableTextModel extends TextModelWithDecorations implements edito // console.log('op: ', op); // console.log('<<<\n' + this._lines.map(l => l.text).join('\n') + '\n>>>'); - let startLineNumber = op.range.startLineNumber; - let startColumn = op.range.startColumn; - let endLineNumber = op.range.endLineNumber; - let endColumn = op.range.endColumn; + const startLineNumber = op.range.startLineNumber; + const startColumn = op.range.startColumn; + const endLineNumber = op.range.endLineNumber; + const endColumn = op.range.endColumn; if (startLineNumber === endLineNumber && startColumn === endColumn && (!op.lines || op.lines.length === 0)) { // no-op continue; } - let deletingLinesCnt = endLineNumber - startLineNumber; - let insertingLinesCnt = (op.lines ? op.lines.length - 1 : 0); - let editingLinesCnt = Math.min(deletingLinesCnt, insertingLinesCnt); + const deletingLinesCnt = endLineNumber - startLineNumber; + const insertingLinesCnt = (op.lines ? op.lines.length - 1 : 0); + const editingLinesCnt = Math.min(deletingLinesCnt, insertingLinesCnt); totalLinesCountDelta += (insertingLinesCnt - deletingLinesCnt); // Iterating descending to overlap with previous op // in case there are common lines being edited in both for (let j = editingLinesCnt; j >= 0; j--) { - let editLineNumber = startLineNumber + j; + const editLineNumber = startLineNumber + j; queueLineEdit({ lineNumber: editLineNumber, @@ -571,19 +578,22 @@ export class EditableTextModel extends TextModelWithDecorations implements edito // Flush any pending line edits flushLineEdits(); - let spliceStartLineNumber = startLineNumber + editingLinesCnt; - let spliceStartColumn = this.getLineMaxColumn(spliceStartLineNumber); + const spliceStartLineNumber = startLineNumber + editingLinesCnt; + const spliceStartColumn = this.getLineMaxColumn(spliceStartLineNumber); - let endLineRemains = this._lines[endLineNumber - 1].split(markersTracker, endColumn, false, tabSize); + const endLineRemains = this._lines[endLineNumber - 1].split(markersTracker, endColumn, false, tabSize); this._invalidateLine(spliceStartLineNumber - 1); - let spliceCnt = endLineNumber - spliceStartLineNumber; + const spliceCnt = endLineNumber - spliceStartLineNumber; // Collect all these markers let markersOnDeletedLines: LineMarker[] = []; for (let j = 0; j < spliceCnt; j++) { - let deleteLineIndex = spliceStartLineNumber + j; - markersOnDeletedLines = markersOnDeletedLines.concat(this._lines[deleteLineIndex].deleteLine()); + const deleteLineIndex = spliceStartLineNumber + j; + const deleteLineMarkers = this._lines[deleteLineIndex].getMarkers(); + if (deleteLineMarkers) { + markersOnDeletedLines = markersOnDeletedLines.concat(deleteLineMarkers); + } } this._lines.splice(spliceStartLineNumber, spliceCnt); @@ -600,7 +610,7 @@ export class EditableTextModel extends TextModelWithDecorations implements edito } // Update deleted markers - let deletedMarkersPosition = new Position(spliceStartLineNumber, spliceStartColumn); + const deletedMarkersPosition = new Position(spliceStartLineNumber, spliceStartColumn); for (let j = 0, lenJ = markersOnDeletedLines.length; j < lenJ; j++) { markersOnDeletedLines[j].updatePosition(markersTracker, deletedMarkersPosition); } @@ -621,7 +631,7 @@ export class EditableTextModel extends TextModelWithDecorations implements edito // Flush any pending line edits flushLineEdits(); - let spliceLineNumber = startLineNumber + editingLinesCnt; + const spliceLineNumber = startLineNumber + editingLinesCnt; let spliceColumn = (spliceLineNumber === startLineNumber ? startColumn : 1); if (op.lines) { spliceColumn += op.lines[editingLinesCnt].length; @@ -639,14 +649,16 @@ export class EditableTextModel extends TextModelWithDecorations implements edito this._invalidateLine(spliceLineNumber - 1); // Lines in the middle + let newLines: ModelLine[] = []; let newLinesContent: string[] = []; let newLinesLengths = new Uint32Array(insertingLinesCnt - editingLinesCnt); for (let j = editingLinesCnt + 1; j <= insertingLinesCnt; j++) { let newLineNumber = startLineNumber + j; - this._lines.splice(newLineNumber - 1, 0, new ModelLine(newLineNumber, op.lines[j], tabSize)); + newLines.push(new ModelLine(newLineNumber, op.lines[j], tabSize)); newLinesContent.push(op.lines[j]); newLinesLengths[j - editingLinesCnt - 1] = op.lines[j].length + this._EOL.length; } + this._lines = arrays.arrayInsert(this._lines, startLineNumber + editingLinesCnt, newLines); newLinesContent[newLinesContent.length - 1] += leftoverLine.text; if (this._lineStarts) { // update prefix sum @@ -807,13 +819,15 @@ export class EditableTextModel extends TextModelWithDecorations implements edito if (range) { this._hasEditableRange = true; - this._editableRangeId = changeAccessor.addDecoration(range, { - stickiness: editorCommon.TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges - }); + this._editableRangeId = changeAccessor.addDecoration(range, EditableTextModel._DECORATION_OPTION); } }); } + private static _DECORATION_OPTION = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges + }); + public hasEditableRange(): boolean { return this._hasEditableRange; } diff --git a/src/vs/editor/common/model/modelLine.ts b/src/vs/editor/common/model/modelLine.ts index 2d64bc4dec51f..4a1b012f60d00 100644 --- a/src/vs/editor/common/model/modelLine.ts +++ b/src/vs/editor/common/model/modelLine.ts @@ -416,11 +416,11 @@ export class ModelLine { // var markers = this._markers; - // var printMarker = (m:ILineMarker) => { + // var printMarker = (m:LineMarker) => { // if (m.stickToPreviousCharacter) { - // return '|' + m.column; + // return '|' + m.position.column; // } - // return m.column + '|'; + // return m.position.column + '|'; // }; // return '[' + markers.map(printMarker).join(', ') + ']'; // } @@ -741,13 +741,6 @@ export class ModelLine { this._lineNumber = newLineNumber; } - public deleteLine(): LineMarker[] { - if (!this._markers) { - return []; - } - return this._markers; - } - private _indexOfMarkerId(markerId: string): number { let markers = this._markers; for (let i = 0, len = markers.length; i < len; i++) { diff --git a/src/vs/editor/common/model/textModel.ts b/src/vs/editor/common/model/textModel.ts index 3bc7ddc2490cb..d15842430f3b6 100644 --- a/src/vs/editor/common/model/textModel.ts +++ b/src/vs/editor/common/model/textModel.ts @@ -11,7 +11,7 @@ import { Range, IRange } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { ModelLine } from 'vs/editor/common/model/modelLine'; import { guessIndentation } from 'vs/editor/common/model/indentationGuesser'; -import { DEFAULT_INDENTATION, DEFAULT_TRIM_AUTO_WHITESPACE } from 'vs/editor/common/config/defaultConfig'; +import { EDITOR_MODEL_DEFAULTS } from 'vs/editor/common/config/editorOptions'; import { PrefixSumComputer } from 'vs/editor/common/viewModel/prefixSumComputer'; import { IndentRange, computeRanges } from 'vs/editor/common/model/indentRanges'; import { TextModelSearch, SearchParams } from 'vs/editor/common/model/textModelSearch'; @@ -32,11 +32,11 @@ export class TextModel implements editorCommon.ITextModel { private static MODEL_TOKENIZATION_LIMIT = 20 * 1024 * 1024; // 20 MB public static DEFAULT_CREATION_OPTIONS: editorCommon.ITextModelCreationOptions = { - tabSize: DEFAULT_INDENTATION.tabSize, - insertSpaces: DEFAULT_INDENTATION.insertSpaces, + tabSize: EDITOR_MODEL_DEFAULTS.tabSize, + insertSpaces: EDITOR_MODEL_DEFAULTS.insertSpaces, detectIndentation: false, defaultEOL: editorCommon.DefaultEndOfLine.LF, - trimAutoWhitespace: DEFAULT_TRIM_AUTO_WHITESPACE, + trimAutoWhitespace: EDITOR_MODEL_DEFAULTS.trimAutoWhitespace, }; public static createFromString(text: string, options: editorCommon.ITextModelCreationOptions = TextModel.DEFAULT_CREATION_OPTIONS): TextModel { @@ -588,7 +588,7 @@ export class TextModel implements editorCommon.ITextModel { this._emitModelRawContentChangedEvent( new textModelEvents.ModelRawContentChangedEvent( [ - new textModelEvents.ModelRawFlush() + new textModelEvents.ModelRawEOLChanged() ], this._versionId, false, @@ -782,7 +782,7 @@ export class TextModel implements editorCommon.ITextModel { throw new Error('Unknown EOL preference'); } - public findMatches(searchString: string, rawSearchScope: any, isRegex: boolean, matchCase: boolean, wholeWord: boolean, captureMatches: boolean, limitResultCount: number = LIMIT_FIND_COUNT): editorCommon.FindMatch[] { + public findMatches(searchString: string, rawSearchScope: any, isRegex: boolean, matchCase: boolean, wordSeparators: string, captureMatches: boolean, limitResultCount: number = LIMIT_FIND_COUNT): editorCommon.FindMatch[] { this._assertNotDisposed(); let searchRange: Range; @@ -792,18 +792,18 @@ export class TextModel implements editorCommon.ITextModel { searchRange = this.getFullModelRange(); } - return TextModelSearch.findMatches(this, new SearchParams(searchString, isRegex, matchCase, wholeWord), searchRange, captureMatches, limitResultCount); + return TextModelSearch.findMatches(this, new SearchParams(searchString, isRegex, matchCase, wordSeparators), searchRange, captureMatches, limitResultCount); } - public findNextMatch(searchString: string, rawSearchStart: IPosition, isRegex: boolean, matchCase: boolean, wholeWord: boolean, captureMatches: boolean): editorCommon.FindMatch { + public findNextMatch(searchString: string, rawSearchStart: IPosition, isRegex: boolean, matchCase: boolean, wordSeparators: string, captureMatches: boolean): editorCommon.FindMatch { this._assertNotDisposed(); const searchStart = this.validatePosition(rawSearchStart); - return TextModelSearch.findNextMatch(this, new SearchParams(searchString, isRegex, matchCase, wholeWord), searchStart, captureMatches); + return TextModelSearch.findNextMatch(this, new SearchParams(searchString, isRegex, matchCase, wordSeparators), searchStart, captureMatches); } - public findPreviousMatch(searchString: string, rawSearchStart: IPosition, isRegex: boolean, matchCase: boolean, wholeWord: boolean, captureMatches: boolean): editorCommon.FindMatch { + public findPreviousMatch(searchString: string, rawSearchStart: IPosition, isRegex: boolean, matchCase: boolean, wordSeparators: string, captureMatches: boolean): editorCommon.FindMatch { this._assertNotDisposed(); const searchStart = this.validatePosition(rawSearchStart); - return TextModelSearch.findPreviousMatch(this, new SearchParams(searchString, isRegex, matchCase, wholeWord), searchStart, captureMatches); + return TextModelSearch.findPreviousMatch(this, new SearchParams(searchString, isRegex, matchCase, wordSeparators), searchStart, captureMatches); } } diff --git a/src/vs/editor/common/model/textModelEvents.ts b/src/vs/editor/common/model/textModelEvents.ts index 05e0d478f067b..890dd25df46c5 100644 --- a/src/vs/editor/common/model/textModelEvents.ts +++ b/src/vs/editor/common/model/textModelEvents.ts @@ -124,7 +124,8 @@ export const enum RawContentChangedType { Flush = 1, LineChanged = 2, LinesDeleted = 3, - LinesInserted = 4 + LinesInserted = 4, + EOLChanged = 5 } /** @@ -204,9 +205,17 @@ export class ModelRawLinesInserted { } /** + * An event describing that a model has had its EOL changed. * @internal */ -export type ModelRawChange = ModelRawFlush | ModelRawLineChanged | ModelRawLinesDeleted | ModelRawLinesInserted; +export class ModelRawEOLChanged { + public readonly changeType = RawContentChangedType.EOLChanged; +} + +/** + * @internal + */ +export type ModelRawChange = ModelRawFlush | ModelRawLineChanged | ModelRawLinesDeleted | ModelRawLinesInserted | ModelRawEOLChanged; /** * An event describing a change in the text of a model. @@ -234,4 +243,14 @@ export class ModelRawContentChangedEvent { this.isUndoing = isUndoing; this.isRedoing = isRedoing; } + + public containsEvent(type: RawContentChangedType): boolean { + for (let i = 0, len = this.changes.length; i < len; i++) { + const change = this.changes[i]; + if (change.changeType === type) { + return true; + } + } + return false; + } } diff --git a/src/vs/editor/common/model/textModelSearch.ts b/src/vs/editor/common/model/textModelSearch.ts index 4c6bd91c3b284..867d52204e5ce 100644 --- a/src/vs/editor/common/model/textModelSearch.ts +++ b/src/vs/editor/common/model/textModelSearch.ts @@ -10,6 +10,7 @@ import { Range } from 'vs/editor/common/core/range'; import { FindMatch, EndOfLinePreference } from 'vs/editor/common/editorCommon'; import { CharCode } from 'vs/base/common/charCode'; import { TextModel } from 'vs/editor/common/model/textModel'; +import { getMapForWordSeparators, WordCharacterClassifier, WordCharacterClass } from 'vs/editor/common/controller/wordCharacterClassifier'; const LIMIT_FIND_COUNT = 999; @@ -17,13 +18,13 @@ export class SearchParams { public readonly searchString: string; public readonly isRegex: boolean; public readonly matchCase: boolean; - public readonly wholeWord: boolean; + public readonly wordSeparators: string; - constructor(searchString: string, isRegex: boolean, matchCase: boolean, wholeWord: boolean) { + constructor(searchString: string, isRegex: boolean, matchCase: boolean, wordSeparators: string) { this.searchString = searchString; this.isRegex = isRegex; this.matchCase = matchCase; - this.wholeWord = wholeWord; + this.wordSeparators = wordSeparators; } private static _isMultilineRegexSource(searchString: string): boolean { @@ -71,8 +72,8 @@ export class SearchParams { try { regex = strings.createRegExp(this.searchString, this.isRegex, { matchCase: this.matchCase, - wholeWord: this.wholeWord, - multiline, + wholeWord: false, + multiline: multiline, global: true }); } catch (err) { @@ -83,13 +84,13 @@ export class SearchParams { return null; } - let canUseSimpleSearch = (!this.isRegex && !this.wholeWord && !multiline); + let canUseSimpleSearch = (!this.isRegex && !multiline); if (canUseSimpleSearch && this.searchString.toLowerCase() !== this.searchString.toUpperCase()) { // casing might make a difference canUseSimpleSearch = this.matchCase; } - return new SearchData(regex, canUseSimpleSearch ? this.searchString : null); + return new SearchData(regex, this.wordSeparators ? getMapForWordSeparators(this.wordSeparators) : null, canUseSimpleSearch ? this.searchString : null); } } @@ -99,13 +100,18 @@ export class SearchData { * The regex to search for. Always defined. */ public readonly regex: RegExp; + /** + * The word separator classifier. + */ + public readonly wordSeparators: WordCharacterClassifier; /** * The simple string to search for (if possible). */ public readonly simpleSearch: string; - constructor(regex: RegExp, simpleSearch: string) { + constructor(regex: RegExp, wordSeparators: WordCharacterClassifier, simpleSearch: string) { this.regex = regex; + this.wordSeparators = wordSeparators; this.simpleSearch = simpleSearch; } } @@ -130,7 +136,7 @@ export class TextModelSearch { } if (searchData.regex.multiline) { - return this._doFindMatchesMultiline(model, searchRange, searchData.regex, captureMatches, limitResultCount); + return this._doFindMatchesMultiline(model, searchRange, new Searcher(searchData.wordSeparators, searchData.regex), captureMatches, limitResultCount); } return this._doFindMatchesLineByLine(model, searchRange, searchData, captureMatches, limitResultCount); } @@ -173,7 +179,7 @@ export class TextModelSearch { return new Range(startPosition.lineNumber, startPosition.column, endPosition.lineNumber, endPosition.column); } - private static _doFindMatchesMultiline(model: TextModel, searchRange: Range, searchRegex: RegExp, captureMatches: boolean, limitResultCount: number): FindMatch[] { + private static _doFindMatchesMultiline(model: TextModel, searchRange: Range, searcher: Searcher, captureMatches: boolean, limitResultCount: number): FindMatch[] { const deltaOffset = model.getOffsetAt(searchRange.getStartPosition()); // We always execute multiline search over the lines joined with \n // This makes it that \n will match the EOL for both CRLF and LF models @@ -181,31 +187,15 @@ export class TextModelSearch { const text = model.getValueInRange(searchRange, EndOfLinePreference.LF); const result: FindMatch[] = []; - let prevStartOffset = 0; - let prevEndOffset = 0; let counter = 0; let m: RegExpExecArray; - while ((m = searchRegex.exec(text))) { - const startOffset = deltaOffset + m.index; - const endOffset = startOffset + m[0].length; - - if (prevStartOffset === startOffset && prevEndOffset === endOffset) { - // Exit early if the regex matches the same range - return result; - } - - result[counter++] = createFindMatch( - this._getMultilineMatchRange(model, deltaOffset, text, m.index, m[0]), - m, - captureMatches - ); + searcher.reset(0); + while ((m = searcher.next(text))) { + result[counter++] = createFindMatch(this._getMultilineMatchRange(model, deltaOffset, text, m.index, m[0]), m, captureMatches); if (counter >= limitResultCount) { return result; } - - prevStartOffset = startOffset; - prevEndOffset = endOffset; } return result; @@ -241,41 +231,35 @@ export class TextModelSearch { } private static _findMatchesInLine(searchData: SearchData, text: string, lineNumber: number, deltaOffset: number, resultLen: number, result: FindMatch[], captureMatches: boolean, limitResultCount: number): number { + const wordSeparators = searchData.wordSeparators; if (!captureMatches && searchData.simpleSearch) { const searchString = searchData.simpleSearch; const searchStringLen = searchString.length; + const textLength = text.length; let lastMatchIndex = -searchStringLen; while ((lastMatchIndex = text.indexOf(searchString, lastMatchIndex + searchStringLen)) !== -1) { - const range = new Range(lineNumber, lastMatchIndex + 1 + deltaOffset, lineNumber, lastMatchIndex + 1 + searchStringLen + deltaOffset); - result[resultLen++] = new FindMatch(range, null); - if (resultLen >= limitResultCount) { - return resultLen; + if (!wordSeparators || isValidMatch(wordSeparators, text, textLength, lastMatchIndex, searchStringLen)) { + result[resultLen++] = new FindMatch(new Range(lineNumber, lastMatchIndex + 1 + deltaOffset, lineNumber, lastMatchIndex + 1 + searchStringLen + deltaOffset), null); + if (resultLen >= limitResultCount) { + return resultLen; + } } } return resultLen; } - const searchRegex = searchData.regex; + const searcher = new Searcher(searchData.wordSeparators, searchData.regex); let m: RegExpExecArray; // Reset regex to search from the beginning - searchRegex.lastIndex = 0; + searcher.reset(0); do { - m = searchRegex.exec(text); + m = searcher.next(text); if (m) { - const range = new Range(lineNumber, m.index + 1 + deltaOffset, lineNumber, m.index + 1 + m[0].length + deltaOffset); - if (result.length > 0 && range.equalsRange(result[result.length - 1].range)) { - // Exit early if the regex matches the same range - return resultLen; - } - result[resultLen++] = createFindMatch(range, m, captureMatches); + result[resultLen++] = createFindMatch(new Range(lineNumber, m.index + 1 + deltaOffset, lineNumber, m.index + 1 + m[0].length + deltaOffset), m, captureMatches); if (resultLen >= limitResultCount) { return resultLen; } - if (m.index + m[0].length === text.length) { - // Reached the end of the line - return resultLen; - } } } while (m); return resultLen; @@ -287,13 +271,15 @@ export class TextModelSearch { return null; } + const searcher = new Searcher(searchData.wordSeparators, searchData.regex); + if (searchData.regex.multiline) { - return this._doFindNextMatchMultiline(model, searchStart, searchData.regex, captureMatches); + return this._doFindNextMatchMultiline(model, searchStart, searcher, captureMatches); } - return this._doFindNextMatchLineByLine(model, searchStart, searchData.regex, captureMatches); + return this._doFindNextMatchLineByLine(model, searchStart, searcher, captureMatches); } - private static _doFindNextMatchMultiline(model: TextModel, searchStart: Position, searchRegex: RegExp, captureMatches: boolean): FindMatch { + private static _doFindNextMatchMultiline(model: TextModel, searchStart: Position, searcher: Searcher, captureMatches: boolean): FindMatch { const searchTextStart = new Position(searchStart.lineNumber, 1); const deltaOffset = model.getOffsetAt(searchTextStart); const lineCount = model.getLineCount(); @@ -301,8 +287,8 @@ export class TextModelSearch { // This makes it that \n will match the EOL for both CRLF and LF models // We compensate for offset errors in `_getMultilineMatchRange` const text = model.getValueInRange(new Range(searchTextStart.lineNumber, searchTextStart.column, lineCount, model.getLineMaxColumn(lineCount)), EndOfLinePreference.LF); - searchRegex.lastIndex = searchStart.column - 1; - let m = searchRegex.exec(text); + searcher.reset(searchStart.column - 1); + let m = searcher.next(text); if (m) { return createFindMatch( this._getMultilineMatchRange(model, deltaOffset, text, m.index, m[0]), @@ -313,19 +299,19 @@ export class TextModelSearch { if (searchStart.lineNumber !== 1 || searchStart.column !== 1) { // Try again from the top - return this._doFindNextMatchMultiline(model, new Position(1, 1), searchRegex, captureMatches); + return this._doFindNextMatchMultiline(model, new Position(1, 1), searcher, captureMatches); } return null; } - private static _doFindNextMatchLineByLine(model: TextModel, searchStart: Position, searchRegex: RegExp, captureMatches: boolean): FindMatch { + private static _doFindNextMatchLineByLine(model: TextModel, searchStart: Position, searcher: Searcher, captureMatches: boolean): FindMatch { const lineCount = model.getLineCount(); const startLineNumber = searchStart.lineNumber; // Look in first line const text = model.getLineContent(startLineNumber); - const r = this._findFirstMatchInLine(searchRegex, text, startLineNumber, searchStart.column, captureMatches); + const r = this._findFirstMatchInLine(searcher, text, startLineNumber, searchStart.column, captureMatches); if (r) { return r; } @@ -333,7 +319,7 @@ export class TextModelSearch { for (let i = 1; i <= lineCount; i++) { const lineIndex = (startLineNumber + i - 1) % lineCount; const text = model.getLineContent(lineIndex + 1); - const r = this._findFirstMatchInLine(searchRegex, text, lineIndex + 1, 1, captureMatches); + const r = this._findFirstMatchInLine(searcher, text, lineIndex + 1, 1, captureMatches); if (r) { return r; } @@ -342,10 +328,10 @@ export class TextModelSearch { return null; } - private static _findFirstMatchInLine(searchRegex: RegExp, text: string, lineNumber: number, fromColumn: number, captureMatches: boolean): FindMatch { + private static _findFirstMatchInLine(searcher: Searcher, text: string, lineNumber: number, fromColumn: number, captureMatches: boolean): FindMatch { // Set regex to search from column - searchRegex.lastIndex = fromColumn - 1; - const m: RegExpExecArray = searchRegex.exec(text); + searcher.reset(fromColumn - 1); + const m: RegExpExecArray = searcher.next(text); if (m) { return createFindMatch( new Range(lineNumber, m.index + 1, lineNumber, m.index + 1 + m[0].length), @@ -362,14 +348,16 @@ export class TextModelSearch { return null; } + const searcher = new Searcher(searchData.wordSeparators, searchData.regex); + if (searchData.regex.multiline) { - return this._doFindPreviousMatchMultiline(model, searchStart, searchData.regex, captureMatches); + return this._doFindPreviousMatchMultiline(model, searchStart, searcher, captureMatches); } - return this._doFindPreviousMatchLineByLine(model, searchStart, searchData.regex, captureMatches); + return this._doFindPreviousMatchLineByLine(model, searchStart, searcher, captureMatches); } - private static _doFindPreviousMatchMultiline(model: TextModel, searchStart: Position, searchRegex: RegExp, captureMatches: boolean): FindMatch { - const matches = this._doFindMatchesMultiline(model, new Range(1, 1, searchStart.lineNumber, searchStart.column), searchRegex, captureMatches, 10 * LIMIT_FIND_COUNT); + private static _doFindPreviousMatchMultiline(model: TextModel, searchStart: Position, searcher: Searcher, captureMatches: boolean): FindMatch { + const matches = this._doFindMatchesMultiline(model, new Range(1, 1, searchStart.lineNumber, searchStart.column), searcher, captureMatches, 10 * LIMIT_FIND_COUNT); if (matches.length > 0) { return matches[matches.length - 1]; } @@ -377,19 +365,19 @@ export class TextModelSearch { const lineCount = model.getLineCount(); if (searchStart.lineNumber !== lineCount || searchStart.column !== model.getLineMaxColumn(lineCount)) { // Try again with all content - return this._doFindPreviousMatchMultiline(model, new Position(lineCount, model.getLineMaxColumn(lineCount)), searchRegex, captureMatches); + return this._doFindPreviousMatchMultiline(model, new Position(lineCount, model.getLineMaxColumn(lineCount)), searcher, captureMatches); } return null; } - private static _doFindPreviousMatchLineByLine(model: TextModel, searchStart: Position, searchRegex: RegExp, captureMatches: boolean): FindMatch { + private static _doFindPreviousMatchLineByLine(model: TextModel, searchStart: Position, searcher: Searcher, captureMatches: boolean): FindMatch { const lineCount = model.getLineCount(); const startLineNumber = searchStart.lineNumber; // Look in first line const text = model.getLineContent(startLineNumber).substring(0, searchStart.column - 1); - const r = this._findLastMatchInLine(searchRegex, text, startLineNumber, captureMatches); + const r = this._findLastMatchInLine(searcher, text, startLineNumber, captureMatches); if (r) { return r; } @@ -397,7 +385,7 @@ export class TextModelSearch { for (let i = 1; i <= lineCount; i++) { const lineIndex = (lineCount + startLineNumber - i - 1) % lineCount; const text = model.getLineContent(lineIndex + 1); - const r = this._findLastMatchInLine(searchRegex, text, lineIndex + 1, captureMatches); + const r = this._findLastMatchInLine(searcher, text, lineIndex + 1, captureMatches); if (r) { return r; } @@ -406,20 +394,119 @@ export class TextModelSearch { return null; } - private static _findLastMatchInLine(searchRegex: RegExp, text: string, lineNumber: number, captureMatches: boolean): FindMatch { + private static _findLastMatchInLine(searcher: Searcher, text: string, lineNumber: number, captureMatches: boolean): FindMatch { let bestResult: FindMatch = null; let m: RegExpExecArray; - while ((m = searchRegex.exec(text))) { - const result = new Range(lineNumber, m.index + 1, lineNumber, m.index + 1 + m[0].length); - if (bestResult && result.equalsRange(bestResult.range)) { - break; - } - bestResult = createFindMatch(result, m, captureMatches); - if (m.index + m[0].length === text.length) { - // Reached the end of the line - break; - } + searcher.reset(0); + while ((m = searcher.next(text))) { + bestResult = createFindMatch(new Range(lineNumber, m.index + 1, lineNumber, m.index + 1 + m[0].length), m, captureMatches); } return bestResult; } } + +function leftIsWordBounday(wordSeparators: WordCharacterClassifier, text: string, textLength: number, matchStartIndex: number, matchLength: number): boolean { + if (matchStartIndex === 0) { + // Match starts at start of string + return true; + } + + const charBefore = text.charCodeAt(matchStartIndex - 1); + if (wordSeparators.get(charBefore) !== WordCharacterClass.Regular) { + // The character before the match is a word separator + return true; + } + + if (matchLength > 0) { + const firstCharInMatch = text.charCodeAt(matchStartIndex); + if (wordSeparators.get(firstCharInMatch) !== WordCharacterClass.Regular) { + // The first character inside the match is a word separator + return true; + } + } + + return false; +} + +function rightIsWordBounday(wordSeparators: WordCharacterClassifier, text: string, textLength: number, matchStartIndex: number, matchLength: number): boolean { + if (matchStartIndex + matchLength === textLength) { + // Match ends at end of string + return true; + } + + const charAfter = text.charCodeAt(matchStartIndex + matchLength); + if (wordSeparators.get(charAfter) !== WordCharacterClass.Regular) { + // The character after the match is a word separator + return true; + } + + if (matchLength > 0) { + const lastCharInMatch = text.charCodeAt(matchStartIndex + matchLength - 1); + if (wordSeparators.get(lastCharInMatch) !== WordCharacterClass.Regular) { + // The last character in the match is a word separator + return true; + } + } + + return false; +} + +function isValidMatch(wordSeparators: WordCharacterClassifier, text: string, textLength: number, matchStartIndex: number, matchLength: number): boolean { + return ( + leftIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength) + && rightIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength) + ); +} + +class Searcher { + private _wordSeparators: WordCharacterClassifier; + private _searchRegex: RegExp; + private _prevMatchStartIndex: number; + private _prevMatchLength: number; + + constructor(wordSeparators: WordCharacterClassifier, searchRegex: RegExp, ) { + this._wordSeparators = wordSeparators; + this._searchRegex = searchRegex; + this._prevMatchStartIndex = -1; + this._prevMatchLength = 0; + } + + public reset(lastIndex: number): void { + this._searchRegex.lastIndex = lastIndex; + this._prevMatchStartIndex = -1; + this._prevMatchLength = 0; + } + + public next(text: string): RegExpExecArray { + const textLength = text.length; + + let m: RegExpExecArray; + do { + if (this._prevMatchStartIndex + this._prevMatchLength === textLength) { + // Reached the end of the line + return null; + } + + m = this._searchRegex.exec(text); + if (!m) { + return null; + } + + const matchStartIndex = m.index; + const matchLength = m[0].length; + if (matchStartIndex === this._prevMatchStartIndex && matchLength === this._prevMatchLength) { + // Exit early if the regex matches the same range twice + return null; + } + this._prevMatchStartIndex = matchStartIndex; + this._prevMatchLength = matchLength; + + if (!this._wordSeparators || isValidMatch(this._wordSeparators, text, textLength, matchStartIndex, matchLength)) { + return m; + } + + } while (m); + + return null; + } +} diff --git a/src/vs/editor/common/model/textModelWithDecorations.ts b/src/vs/editor/common/model/textModelWithDecorations.ts index 92ca064f41ddd..932d6a2c6ecef 100644 --- a/src/vs/editor/common/model/textModelWithDecorations.ts +++ b/src/vs/editor/common/model/textModelWithDecorations.ts @@ -16,6 +16,7 @@ import { INewMarker, TextModelWithMarkers } from 'vs/editor/common/model/textMod import { LanguageIdentifier } from 'vs/editor/common/modes'; import { ITextSource, IRawTextSource } from 'vs/editor/common/model/textSource'; import * as textModelEvents from 'vs/editor/common/model/textModelEvents'; +import { ThemeColor } from 'vs/platform/theme/common/themeService'; export const ClassName = { EditorWarningDecoration: 'greensquiggly', @@ -839,29 +840,81 @@ function cleanClassName(className: string): string { return className.replace(/[^a-z0-9\-]/gi, ' '); } +export class ModelDecorationOverviewRulerOptions implements editorCommon.IModelDecorationOverviewRulerOptions { + readonly color: string | ThemeColor; + readonly darkColor: string | ThemeColor; + readonly hcColor: string | ThemeColor; + readonly position: editorCommon.OverviewRulerLane; + + constructor(options: editorCommon.IModelDecorationOverviewRulerOptions) { + this.color = strings.empty; + this.darkColor = strings.empty; + this.hcColor = strings.empty; + this.position = editorCommon.OverviewRulerLane.Center; + + if (options && options.color) { + this.color = options.color; + } + if (options && options.darkColor) { + this.darkColor = options.darkColor; + this.hcColor = options.darkColor; + } + if (options && options.hcColor) { + this.hcColor = options.hcColor; + } + if (options && options.hasOwnProperty('position')) { + this.position = options.position; + } + } + + public equals(other: ModelDecorationOverviewRulerOptions): boolean { + return ( + this.color === other.color + && this.darkColor === other.darkColor + && this.hcColor === other.hcColor + && this.position === other.position + ); + } +} + +let lastStaticId = 0; + export class ModelDecorationOptions implements editorCommon.IModelDecorationOptions { - stickiness: editorCommon.TrackedRangeStickiness; - className: string; - hoverMessage: MarkedString | MarkedString[]; - glyphMarginHoverMessage: MarkedString | MarkedString[]; - isWholeLine: boolean; - showInOverviewRuler: string; - overviewRuler: editorCommon.IModelDecorationOverviewRulerOptions; - glyphMarginClassName: string; - linesDecorationsClassName: string; - marginClassName: string; - inlineClassName: string; - beforeContentClassName: string; - afterContentClassName: string; - - constructor(options: editorCommon.IModelDecorationOptions) { + public static EMPTY: ModelDecorationOptions; + + public static register(options: editorCommon.IModelDecorationOptions): ModelDecorationOptions { + return new ModelDecorationOptions(++lastStaticId, options); + } + + public static createDynamic(options: editorCommon.IModelDecorationOptions): ModelDecorationOptions { + return new ModelDecorationOptions(0, options); + } + + readonly staticId: number; + readonly stickiness: editorCommon.TrackedRangeStickiness; + readonly className: string; + readonly hoverMessage: MarkedString | MarkedString[]; + readonly glyphMarginHoverMessage: MarkedString | MarkedString[]; + readonly isWholeLine: boolean; + readonly showIfCollapsed: boolean; + readonly overviewRuler: ModelDecorationOverviewRulerOptions; + readonly glyphMarginClassName: string; + readonly linesDecorationsClassName: string; + readonly marginClassName: string; + readonly inlineClassName: string; + readonly beforeContentClassName: string; + readonly afterContentClassName: string; + + private constructor(staticId: number, options: editorCommon.IModelDecorationOptions) { + this.staticId = staticId; this.stickiness = options.stickiness || editorCommon.TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges; this.className = options.className ? cleanClassName(options.className) : strings.empty; this.hoverMessage = options.hoverMessage || []; this.glyphMarginHoverMessage = options.glyphMarginHoverMessage || strings.empty; this.isWholeLine = options.isWholeLine || false; - this.overviewRuler = _normalizeOverviewRulerOptions(options.overviewRuler, options.showInOverviewRuler); + this.showIfCollapsed = options.showIfCollapsed || false; + this.overviewRuler = new ModelDecorationOverviewRulerOptions(options.overviewRuler); this.glyphMarginClassName = options.glyphMarginClassName ? cleanClassName(options.glyphMarginClassName) : strings.empty; this.linesDecorationsClassName = options.linesDecorationsClassName ? cleanClassName(options.linesDecorationsClassName) : strings.empty; this.marginClassName = options.marginClassName ? cleanClassName(options.marginClassName) : strings.empty; @@ -870,20 +923,16 @@ export class ModelDecorationOptions implements editorCommon.IModelDecorationOpti this.afterContentClassName = options.afterContentClassName ? cleanClassName(options.afterContentClassName) : strings.empty; } - private static _overviewRulerEquals(a: editorCommon.IModelDecorationOverviewRulerOptions, b: editorCommon.IModelDecorationOverviewRulerOptions): boolean { - return ( - a.color === b.color - && a.position === b.position - && a.darkColor === b.darkColor - ); - } - public equals(other: ModelDecorationOptions): boolean { + if (this.staticId > 0 || other.staticId > 0) { + return this.staticId === other.staticId; + } + return ( this.stickiness === other.stickiness && this.className === other.className && this.isWholeLine === other.isWholeLine - && this.showInOverviewRuler === other.showInOverviewRuler + && this.showIfCollapsed === other.showIfCollapsed && this.glyphMarginClassName === other.glyphMarginClassName && this.linesDecorationsClassName === other.linesDecorationsClassName && this.marginClassName === other.marginClassName @@ -892,10 +941,11 @@ export class ModelDecorationOptions implements editorCommon.IModelDecorationOpti && this.afterContentClassName === other.afterContentClassName && markedStringsEquals(this.hoverMessage, other.hoverMessage) && markedStringsEquals(this.glyphMarginHoverMessage, other.glyphMarginHoverMessage) - && ModelDecorationOptions._overviewRulerEquals(this.overviewRuler, other.overviewRuler) + && this.overviewRuler.equals(other.overviewRuler) ); } } +ModelDecorationOptions.EMPTY = ModelDecorationOptions.register({}); class ModelDeltaDecoration implements editorCommon.IModelDeltaDecoration { @@ -911,40 +961,8 @@ class ModelDeltaDecoration implements editorCommon.IModelDeltaDecoration { } function _normalizeOptions(options: editorCommon.IModelDecorationOptions): ModelDecorationOptions { - return new ModelDecorationOptions(options); -} - -class ModelDecorationOverviewRulerOptions implements editorCommon.IModelDecorationOverviewRulerOptions { - color: string; - darkColor: string; - hcColor: string; - position: editorCommon.OverviewRulerLane; - - constructor(options: editorCommon.IModelDecorationOverviewRulerOptions, legacyShowInOverviewRuler: string) { - this.color = strings.empty; - this.darkColor = strings.empty; - this.hcColor = strings.empty; - this.position = editorCommon.OverviewRulerLane.Center; - - if (legacyShowInOverviewRuler) { - this.color = legacyShowInOverviewRuler; - } - if (options && options.color) { - this.color = options.color; - } - if (options && options.darkColor) { - this.darkColor = options.darkColor; - this.hcColor = options.darkColor; - } - if (options && options.hcColor) { - this.hcColor = options.hcColor; - } - if (options && options.hasOwnProperty('position')) { - this.position = options.position; - } + if (options instanceof ModelDecorationOptions) { + return options; } -} - -function _normalizeOverviewRulerOptions(options: editorCommon.IModelDecorationOverviewRulerOptions, legacyShowInOverviewRuler: string = null): editorCommon.IModelDecorationOverviewRulerOptions { - return new ModelDecorationOverviewRulerOptions(options, legacyShowInOverviewRuler); + return ModelDecorationOptions.createDynamic(options); } diff --git a/src/vs/editor/common/modes.ts b/src/vs/editor/common/modes.ts index dcc2fab9afb6f..4d85cdfa5ac5a 100644 --- a/src/vs/editor/common/modes.ts +++ b/src/vs/editor/common/modes.ts @@ -538,7 +538,12 @@ export const symbolKindToCssClass = (function () { }; })(); - +/** + * @internal + */ +export interface IOutline { + entries: SymbolInformation[]; +} /** * Represents information about programming constructs like variables, classes, * interfaces etc. diff --git a/src/vs/editor/common/modes/languageConfigurationRegistry.ts b/src/vs/editor/common/modes/languageConfigurationRegistry.ts index c4c5ee6a9e1c6..62c345586faae 100644 --- a/src/vs/editor/common/modes/languageConfigurationRegistry.ts +++ b/src/vs/editor/common/modes/languageConfigurationRegistry.ts @@ -7,6 +7,7 @@ import { CharacterPairSupport } from 'vs/editor/common/modes/supports/characterPair'; import { BracketElectricCharacterSupport, IElectricAction } from 'vs/editor/common/modes/supports/electricCharacter'; import { IOnEnterSupportOptions, OnEnterSupport } from 'vs/editor/common/modes/supports/onEnter'; +import { IndentRulesSupport, IndentConsts } from 'vs/editor/common/modes/supports/indentRules'; import { RichEditBrackets } from 'vs/editor/common/modes/supports/richEditBrackets'; import Event, { Emitter } from 'vs/base/common/event'; import { ITokenizedModel } from 'vs/editor/common/editorCommon'; @@ -29,6 +30,19 @@ export interface ICommentsConfiguration { blockCommentEndToken?: string; } +export interface IVirtualModel { + getLineTokens(lineNumber: number): LineTokens; + getLanguageIdentifier(): LanguageIdentifier; + getLanguageIdAtPosition(lineNumber: number, column: number): LanguageId; + getLineContent(lineNumber: number): string; +} + +export interface IIndentConverter { + shiftIndent?(indentation: string): string; + unshiftIndent?(indentation: string): string; + normalizeIndentation?(indentation: string): string; +} + export class RichEditSupport { private readonly _conf: LanguageConfiguration; @@ -38,6 +52,7 @@ export class RichEditSupport { public readonly characterPair: CharacterPairSupport; public readonly wordDefinition: RegExp; public readonly onEnter: OnEnterSupport; + public readonly indentRulesSupport: IndentRulesSupport; public readonly brackets: RichEditBrackets; public readonly indentationRules: IndentationRule; @@ -64,6 +79,9 @@ export class RichEditSupport { this.wordDefinition = this._conf.wordPattern || DEFAULT_WORD_REGEXP; this.indentationRules = this._conf.indentationRules; + if (this._conf.indentationRules) { + this.indentRulesSupport = new IndentRulesSupport(this._conf.indentationRules); + } } private static _mergeConf(prev: LanguageConfiguration, current: LanguageConfiguration): LanguageConfiguration { @@ -250,6 +268,391 @@ export class LanguageConfigurationRegistryImpl { return ensureValidWordDefinition(value.wordDefinition || null); } + + + // beigin Indent Rules + + public getIndentRulesSupport(languageId: LanguageId): IndentRulesSupport { + let value = this._getRichEditSupport(languageId); + if (!value) { + return null; + } + return value.indentRulesSupport || null; + } + + /** + * Get nearest preceiding line which doesn't match unIndentPattern or contains all whitespace. + */ + private getPrecedingValidLine(model: IVirtualModel, lineNumber: number, indentRulesSupport: IndentRulesSupport) { + let languageID = model.getLanguageIdAtPosition(lineNumber, 0); + if (lineNumber > 1) { + let lastLineNumber = lineNumber - 1; + let resultLineNumber = -1; + + for (lastLineNumber = lineNumber - 1; lastLineNumber >= 1; lastLineNumber--) { + if (model.getLanguageIdAtPosition(lastLineNumber, 0) !== languageID) { + return resultLineNumber; + } + let text = model.getLineContent(lastLineNumber); + if (indentRulesSupport.shouldIgnore(text) || /^\s+$/.test(text) || text === '') { + resultLineNumber = lastLineNumber; + continue; + } + + return lastLineNumber; + } + } + + return -1; + } + + /** + * Get inherited indentation from above lines. + * 1. Find the nearest preceding line which doesn't match unIndentedLinePattern. + * 2. If this line matches indentNextLinePattern or increaseIndentPattern, it means that the indent level of `lineNumber` should be 1 greater than this line. + * 3. If this line doesn't match any indent rules + * a. check whether the line above it matches indentNextLinePattern + * b. If not, the indent level of this line is the result + * c. If so, it means the indent of this line is *temporary*, go upward utill we find a line whose indent is not temporary (the same workflow a -> b -> c). + * 4. Otherwise, we fail to get an inherited indent from aboves. Return null and we should not touch the indent of `lineNumber` + * + * This function only return the inherited indent based on above lines, it doesn't check whether current line should decrease or not. + */ + public getInheritIndentForLine(model: IVirtualModel, lineNumber: number, honorIntentialIndent: boolean = true): { indentation: string, action: IndentAction, line?: number } { + let indentRulesSupport = this.getIndentRulesSupport(model.getLanguageIdentifier().id); + if (!indentRulesSupport) { + return null; + } + + if (lineNumber <= 1) { + return { + indentation: '', + action: null + }; + } + + let precedingUnIgnoredLine = this.getPrecedingValidLine(model, lineNumber, indentRulesSupport); + if (precedingUnIgnoredLine < 1) { + return { + indentation: '', + action: null + }; + } + + let precedingUnIgnoredLineContent = model.getLineContent(precedingUnIgnoredLine); + + if (indentRulesSupport.shouldIncrease(precedingUnIgnoredLineContent) || indentRulesSupport.shouldIndentNextLine(precedingUnIgnoredLineContent)) { + return { + indentation: strings.getLeadingWhitespace(precedingUnIgnoredLineContent), + action: IndentAction.Indent, + line: precedingUnIgnoredLine + }; + } else if (indentRulesSupport.shouldDecrease(precedingUnIgnoredLineContent)) { + return { + indentation: strings.getLeadingWhitespace(precedingUnIgnoredLineContent), + action: null, + line: precedingUnIgnoredLine + }; + } else { + // precedingUnIgnoredLine can not be ignored. + // it doesn't increase indent of following lines + // it doesn't increase just next line + // so current line is not affect by precedingUnIgnoredLine + // and then we should get a correct inheritted indentation from above lines + if (precedingUnIgnoredLine === 1) { + return { + indentation: strings.getLeadingWhitespace(model.getLineContent(precedingUnIgnoredLine)), + action: null, + line: precedingUnIgnoredLine + }; + } + + let previousLine = precedingUnIgnoredLine - 1; + + let previousLineIndentMetadata = indentRulesSupport.getIndentMetadata(model.getLineContent(previousLine)); + if (!(previousLineIndentMetadata & (IndentConsts.INCREASE_MASK | IndentConsts.DECREASE_MASK)) && + (previousLineIndentMetadata & IndentConsts.INDENT_NEXTLINE_MASK)) { + let stopLine = 0; + for (let i = previousLine - 1; i > 0; i--) { + if (indentRulesSupport.shouldIndentNextLine(model.getLineContent(i))) { + continue; + } + stopLine = i; + break; + } + + return { + indentation: strings.getLeadingWhitespace(model.getLineContent(stopLine + 1)), + action: null, + line: stopLine + 1 + }; + } + + if (honorIntentialIndent) { + return { + indentation: strings.getLeadingWhitespace(model.getLineContent(precedingUnIgnoredLine)), + action: null, + line: precedingUnIgnoredLine + }; + } else { + // search from precedingUnIgnoredLine until we find one whose indent is not temporary + for (let i = precedingUnIgnoredLine; i > 0; i--) { + let lineContent = model.getLineContent(i); + if (indentRulesSupport.shouldIncrease(lineContent)) { + return { + indentation: strings.getLeadingWhitespace(lineContent), + action: IndentAction.Indent, + line: i + }; + } else if (indentRulesSupport.shouldIndentNextLine(lineContent)) { + let stopLine = 0; + for (let j = i - 1; j > 0; j--) { + if (indentRulesSupport.shouldIndentNextLine(model.getLineContent(i))) { + continue; + } + stopLine = j; + break; + } + + return { + indentation: strings.getLeadingWhitespace(model.getLineContent(stopLine + 1)), + action: null, + line: stopLine + 1 + }; + } else if (indentRulesSupport.shouldDecrease(lineContent)) { + return { + indentation: strings.getLeadingWhitespace(lineContent), + action: null, + line: i + }; + } + } + + return { + indentation: strings.getLeadingWhitespace(model.getLineContent(1)), + action: null, + line: 1 + }; + } + } + } + + public getGoodIndentForLine(virtualModel: IVirtualModel, languageId: LanguageId, lineNumber: number, indentConverter: IIndentConverter): string { + let indentRulesSupport = this.getIndentRulesSupport(languageId); + if (!indentRulesSupport) { + return null; + } + + let indent = this.getInheritIndentForLine(virtualModel, lineNumber); + let lineContent = virtualModel.getLineContent(lineNumber); + + if (indent) { + let inheritLine = indent.line; + if (inheritLine !== undefined) { + let onEnterSupport = this._getOnEnterSupport(languageId); + let enterResult: EnterAction = null; + try { + enterResult = onEnterSupport.onEnter('', virtualModel.getLineContent(inheritLine), ''); + } catch (e) { + onUnexpectedError(e); + } + + if (enterResult) { + let indentation = strings.getLeadingWhitespace(virtualModel.getLineContent(inheritLine)); + + if (enterResult.removeText) { + indentation = indentation.substring(0, indentation.length - enterResult.removeText); + } + + if ( + (enterResult.indentAction === IndentAction.Indent) || + (enterResult.indentAction === IndentAction.IndentOutdent) + ) { + indentation = indentConverter.shiftIndent(indentation); + } else if (enterResult.indentAction === IndentAction.Outdent) { + indentation = indentConverter.unshiftIndent(indentation); + } + + if (indentRulesSupport.shouldDecrease(lineContent)) { + indentation = indentConverter.unshiftIndent(indentation); + } + + if (enterResult.appendText) { + indentation += enterResult.appendText; + } + + return strings.getLeadingWhitespace(indentation); + } + } + + if (indentRulesSupport.shouldDecrease(lineContent)) { + if (indent.action === IndentAction.Indent) { + return indent.indentation; + } else { + return indentConverter.unshiftIndent(indent.indentation); + } + } else { + if (indent.action === IndentAction.Indent) { + return indentConverter.shiftIndent(indent.indentation); + } else { + return indent.indentation; + } + } + } + return null; + } + + public getIndentForEnter(model: ITokenizedModel, range: Range, indentConverter: IIndentConverter, autoIndent: boolean): { beforeEnter: string, afterEnter: string } { + model.forceTokenization(range.startLineNumber); + let lineTokens = model.getLineTokens(range.startLineNumber); + + let beforeEnterText; + let tokenIndexUnderCursor = lineTokens.findTokenIndexAtOffset(range.startColumn); + let tokenIndexAtBeginning = lineTokens.findTokenIndexAtOffset(0); + let scopedLineTokens = createScopedLineTokens(lineTokens, range.startColumn); + let scopedLineText = scopedLineTokens.getLineContent(); + + if (lineTokens.getLanguageId(tokenIndexAtBeginning) === lineTokens.getLanguageId(tokenIndexUnderCursor)) { + beforeEnterText = lineTokens.getLineContent().substring(0, range.startColumn - 1); + } else { + beforeEnterText = scopedLineText.substr(0, range.startColumn - 1 - scopedLineTokens.firstCharOffset); + } + + let afterEnterText; + + if (range.isEmpty()) { + afterEnterText = scopedLineText.substr(range.startColumn - 1 - scopedLineTokens.firstCharOffset); + } else { + const endScopedLineTokens = this.getScopedLineTokens(model, range.endLineNumber, range.endColumn); + afterEnterText = endScopedLineTokens.getLineContent().substr(range.endColumn - 1 - scopedLineTokens.firstCharOffset); + } + + let indentRulesSupport = this.getIndentRulesSupport(scopedLineTokens.languageId); + + if (!indentRulesSupport) { + return null; + } + + let beforeEnterResult = beforeEnterText; + let beforeEnterIndent = strings.getLeadingWhitespace(beforeEnterText); + + if (!autoIndent) { + let beforeEnterIndentAction = this.getInheritIndentForLine(model, range.startLineNumber); + let beforeEnterIndent = strings.getLeadingWhitespace(beforeEnterText); + + if (indentRulesSupport.shouldDecrease(beforeEnterText)) { + if (beforeEnterIndentAction) { + beforeEnterIndent = beforeEnterIndentAction.indentation; + if (beforeEnterIndentAction.action !== IndentAction.Indent) { + beforeEnterIndent = indentConverter.unshiftIndent(beforeEnterIndent); + } + } + } + + beforeEnterResult = beforeEnterIndent + strings.ltrim(strings.ltrim(beforeEnterText, ' '), '\t'); + } + + let virtualModel: IVirtualModel = { + getLineTokens: (lineNumber: number) => { + return model.getLineTokens(lineNumber); + }, + getLanguageIdentifier: () => { + return model.getLanguageIdentifier(); + }, + getLanguageIdAtPosition: (lineNumber: number, column: number) => { + return model.getLanguageIdAtPosition(lineNumber, column); + }, + getLineContent: (lineNumber: number) => { + if (lineNumber === range.startLineNumber) { + return beforeEnterResult; + } else { + return model.getLineContent(lineNumber); + } + } + }; + + let afterEnterAction = this.getInheritIndentForLine(virtualModel, range.startLineNumber + 1); + if (!afterEnterAction) { + return { + beforeEnter: beforeEnterIndent, + afterEnter: beforeEnterIndent + }; + } + + let afterEnterIndent = afterEnterAction.indentation; + + if (afterEnterAction.action === IndentAction.Indent) { + afterEnterIndent = indentConverter.shiftIndent(afterEnterIndent); + } + + if (indentRulesSupport.shouldDecrease(afterEnterText)) { + afterEnterIndent = indentConverter.unshiftIndent(afterEnterIndent); + } + + return { + beforeEnter: beforeEnterIndent, + afterEnter: afterEnterIndent + }; + } + + /** + * We should always allow intentional indentation. It means, if users change the indentation of `lineNumber` and the content of + * this line doesn't match decreaseIndentPattern, we should not adjust the indentation. + */ + public getIndentActionForType(model: ITokenizedModel, range: Range, ch: string, indentConverter: IIndentConverter): string { + let scopedLineTokens = this.getScopedLineTokens(model, range.startLineNumber, range.startColumn); + let indentRulesSupport = this.getIndentRulesSupport(scopedLineTokens.languageId); + if (!indentRulesSupport) { + return null; + } + + let scopedLineText = scopedLineTokens.getLineContent(); + let beforeTypeText = scopedLineText.substr(0, range.startColumn - 1 - scopedLineTokens.firstCharOffset); + let afterTypeText; + + // selection support + if (range.isEmpty()) { + afterTypeText = scopedLineText.substr(range.startColumn - 1 - scopedLineTokens.firstCharOffset); + } else { + const endScopedLineTokens = this.getScopedLineTokens(model, range.endLineNumber, range.endColumn); + afterTypeText = endScopedLineTokens.getLineContent().substr(range.endColumn - 1 - scopedLineTokens.firstCharOffset); + } + + if (indentRulesSupport.shouldDecrease(beforeTypeText + ch + afterTypeText)) { + // after typing `ch`, the content matches decreaseIndentPattern, we should adjust the indent to a good manner. + // 1. Get inherited indent action + let r = this.getInheritIndentForLine(model, range.startLineNumber, false); + if (!r) { + return null; + } + + let indentation = r.indentation; + + if (r.action !== IndentAction.Indent) { + indentation = indentConverter.unshiftIndent(indentation); + } + + return indentation; + } + + return null; + } + + public getIndentMetadata(model: ITokenizedModel, lineNumber: number): number { + let indentRulesSupport = this.getIndentRulesSupport(model.getLanguageIdentifier().id); + if (!indentRulesSupport) { + return null; + } + + if (lineNumber < 1 || lineNumber > model.getLineCount()) { + return null; + } + + return indentRulesSupport.getIndentMetadata(model.getLineContent(lineNumber)); + } + + // end Indent Rules + // begin onEnter private _getOnEnterSupport(languageId: LanguageId): OnEnterSupport { @@ -266,18 +669,13 @@ export class LanguageConfigurationRegistryImpl { return r ? r.enterAction : null; } - public getEnterAction(model: ITokenizedModel, range: Range): { enterAction: EnterAction; indentation: string; ignoreCurrentLine: boolean } { + public getEnterAction(model: ITokenizedModel, range: Range): { enterAction: EnterAction; indentation: string; } { let indentation = this.getIndentationAtPosition(model, range.startLineNumber, range.startColumn); - let ignoreCurrentLine = false; - let scopedLineTokens = this.getScopedLineTokens(model, range.startLineNumber); + let scopedLineTokens = this.getScopedLineTokens(model, range.startLineNumber, range.startColumn); let onEnterSupport = this._getOnEnterSupport(scopedLineTokens.languageId); if (!onEnterSupport) { - return { - enterAction: { indentAction: IndentAction.None, appendText: '' }, - indentation: indentation, - ignoreCurrentLine: false - }; + return null; } let scopedLineText = scopedLineTokens.getLineContent(); @@ -288,50 +686,23 @@ export class LanguageConfigurationRegistryImpl { if (range.isEmpty()) { afterEnterText = scopedLineText.substr(range.startColumn - 1 - scopedLineTokens.firstCharOffset); } else { - let endScopedLineTokens = this.getScopedLineTokens(model, range.endLineNumber); - afterEnterText = endScopedLineTokens.getLineContent().substr(range.endColumn - 1 - endScopedLineTokens.firstCharOffset); + const endScopedLineTokens = this.getScopedLineTokens(model, range.endLineNumber, range.endColumn); + afterEnterText = endScopedLineTokens.getLineContent().substr(range.endColumn - 1 - scopedLineTokens.firstCharOffset); } let lineNumber = range.startLineNumber; - - // if the text before the cursor/range start position is empty or matches `unIndentedLinePattern` - // this line is actually ignored after the enter action - if (onEnterSupport.shouldIgnore(beforeEnterText)) { - ignoreCurrentLine = true; - let lastLineNumber = this.getLastValidLine(model, lineNumber, onEnterSupport); - - if (lastLineNumber <= 0) { - return { - enterAction: { indentAction: IndentAction.None, appendText: '' }, - indentation: '', - ignoreCurrentLine: ignoreCurrentLine - }; - } - - scopedLineTokens = this.getScopedLineTokens(model, lastLineNumber); - beforeEnterText = this.getLineContent(model, lastLineNumber); - lineNumber = lastLineNumber; - indentation = this.getIndentationAtPosition(model, lineNumber, model.getLineMaxColumn(lineNumber)); - } - let oneLineAboveText = ''; if (lineNumber > 1 && scopedLineTokens.firstCharOffset === 0) { // This is not the first line and the entire line belongs to this mode - let lastLineNumber = this.getLastValidLine(model, lineNumber, onEnterSupport); - - if (lastLineNumber >= 1) { - // No previous line with content found - let oneLineAboveScopedLineTokens = this.getScopedLineTokens(model, lastLineNumber); - if (oneLineAboveScopedLineTokens.languageId === scopedLineTokens.languageId) { - // The line above ends with text belonging to the same mode - oneLineAboveText = oneLineAboveScopedLineTokens.getLineContent(); - } + let oneLineAboveScopedLineTokens = this.getScopedLineTokens(model, lineNumber - 1); + if (oneLineAboveScopedLineTokens.languageId === scopedLineTokens.languageId) { + // The line above ends with text belonging to the same mode + oneLineAboveText = oneLineAboveScopedLineTokens.getLineContent(); } } let enterResult: EnterAction = null; - try { enterResult = onEnterSupport.onEnter(oneLineAboveText, beforeEnterText, afterEnterText); } catch (e) { @@ -339,7 +710,7 @@ export class LanguageConfigurationRegistryImpl { } if (!enterResult) { - enterResult = { indentAction: IndentAction.None, appendText: '' }; + return null; } else { // Here we add `\t` to appendText first because enterAction is leveraging appendText and removeText to change indentation. if (!enterResult.appendText) { @@ -354,14 +725,17 @@ export class LanguageConfigurationRegistryImpl { } } + if (enterResult.removeText) { + indentation = indentation.substring(0, indentation.length - enterResult.removeText); + } + return { enterAction: enterResult, indentation: indentation, - ignoreCurrentLine: ignoreCurrentLine }; } - private getIndentationAtPosition(model: ITokenizedModel, lineNumber: number, column: number): string { + public getIndentationAtPosition(model: ITokenizedModel, lineNumber: number, column: number): string { let lineText = model.getLineContent(lineNumber); let indentation = strings.getLeadingWhitespace(lineText); if (indentation.length > column - 1) { @@ -371,87 +745,14 @@ export class LanguageConfigurationRegistryImpl { return indentation; } - private getLastValidLine(model: ITokenizedModel, lineNumber: number, onEnterSupport: OnEnterSupport): number { - if (lineNumber > 1) { - let lastLineNumber = lineNumber - 1; - - for (lastLineNumber = lineNumber - 1; lastLineNumber >= 1; lastLineNumber--) { - let lineText = model.getLineContent(lastLineNumber); - if (!onEnterSupport.shouldIgnore(lineText) && onEnterSupport.containNonWhitespace(lineText)) { - break; - } - } - - if (lastLineNumber >= 1) { - return lastLineNumber; - } - } - - return -1; - } - - private getLineContent(model: ITokenizedModel, lineNumber: number): string { - let scopedLineTokens = this.getScopedLineTokens(model, lineNumber); - let column = model.getLineMaxColumn(lineNumber); - let scopedLineText = scopedLineTokens.getLineContent(); - let lineText = scopedLineText.substr(0, column - 1 - scopedLineTokens.firstCharOffset); - return lineText; - } - - private getScopedLineTokens(model: ITokenizedModel, lineNumber: number) { + private getScopedLineTokens(model: ITokenizedModel, lineNumber: number, columnNumber?: number) { model.forceTokenization(lineNumber); let lineTokens = model.getLineTokens(lineNumber); - let column = model.getLineMaxColumn(lineNumber); - let scopedLineTokens = createScopedLineTokens(lineTokens, column - 1); + let column = isNaN(columnNumber) ? model.getLineMaxColumn(lineNumber) - 1 : columnNumber; + let scopedLineTokens = createScopedLineTokens(lineTokens, column); return scopedLineTokens; } - public getGoodIndentActionForLine(model: ITokenizedModel, lineNumber: number) { - let onEnterSupport = this._getOnEnterSupport(model.getLanguageIdentifier().id); - if (!onEnterSupport) { - return null; - } - - /** - * In order to get correct indentation for current line - * we need to loop backwards the content from current line until - * 1. a line contains non whitespace characters, - * 2. and the line doesn't match `unIndentedLinePattern` pattern - */ - let lastLineNumber = this.getLastValidLine(model, lineNumber, onEnterSupport); - - if (lastLineNumber < 1) { - // No previous line with content found - return null; - } - - // it's Okay that lineNumber > model.getLineCount(), a good example is guessing the indentation of next potential line - // when the cursor is at the end of file. - if (lineNumber <= model.getLineCount()) { - let currentLineScopedLineTokens = this.getScopedLineTokens(model, lineNumber); - let lastLineScopedLineTokens = this.getScopedLineTokens(model, lastLineNumber); - - if (currentLineScopedLineTokens.languageId !== lastLineScopedLineTokens.languageId) { - // The language mode of last valid line is not the same as current line. - return null; - } - } - - let lineText = model.getLineContent(lastLineNumber); - let oneLineAboveText: string; - if (lastLineNumber > 1) { - oneLineAboveText = model.getLineContent(lastLineNumber - 1); - } - - let indentation = strings.getLeadingWhitespace(lineText); - let onEnterAction = onEnterSupport.onEnter(oneLineAboveText, lineText, ''); - - return { - indentation: indentation, - action: onEnterAction ? onEnterAction.indentAction : null - }; - } - // end onEnter public getBracketsSupport(languageId: LanguageId): RichEditBrackets { diff --git a/src/vs/editor/common/modes/modesRegistry.ts b/src/vs/editor/common/modes/modesRegistry.ts index 259fdda2dcfe0..8995c2dc4e1f4 100644 --- a/src/vs/editor/common/modes/modesRegistry.ts +++ b/src/vs/editor/common/modes/modesRegistry.ts @@ -6,7 +6,7 @@ import * as nls from 'vs/nls'; import Event, { Emitter } from 'vs/base/common/event'; -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import { ILanguageExtensionPoint } from 'vs/editor/common/services/modeService'; import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; import { LanguageIdentifier, LanguageId } from 'vs/editor/common/modes'; diff --git a/src/vs/editor/common/modes/supports/indentRules.ts b/src/vs/editor/common/modes/supports/indentRules.ts new file mode 100644 index 0000000000000..b88860741b13d --- /dev/null +++ b/src/vs/editor/common/modes/supports/indentRules.ts @@ -0,0 +1,102 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import * as strings from 'vs/base/common/strings'; +import { IndentationRule, IndentAction } from 'vs/editor/common/modes/languageConfiguration'; + +export const enum IndentConsts { + INCREASE_MASK = 0b00000001, + DECREASE_MASK = 0b00000010, + INDENT_NEXTLINE_MASK = 0b00000100, + UNINDENT_MASK = 0b00001000, +}; + +export class IndentRulesSupport { + + private readonly _indentationRules: IndentationRule; + + constructor(indentationRules: IndentationRule) { + this._indentationRules = indentationRules; + } + + public onType(text: string): IndentAction { + if (this._indentationRules) { + if (this._indentationRules.unIndentedLinePattern && this._indentationRules.unIndentedLinePattern.test(text)) { + return null; + } + + if (this._indentationRules.decreaseIndentPattern && this._indentationRules.decreaseIndentPattern.test(text)) { + return IndentAction.Outdent; + } + } + return null; + } + + public containNonWhitespace(text: string): boolean { + // the text doesn't contain any non-whitespace character. + let nonWhitespaceIdx = strings.lastNonWhitespaceIndex(text); + + if (nonWhitespaceIdx >= 0) { + return true; + } + + return false; + } + + public shouldIncrease(text: string): boolean { + if (this._indentationRules) { + if (this._indentationRules.increaseIndentPattern && this._indentationRules.increaseIndentPattern.test(text)) { + return true; + } + // if (this._indentationRules.indentNextLinePattern && this._indentationRules.indentNextLinePattern.test(text)) { + // return true; + // } + } + return false; + } + + public shouldDecrease(text: string): boolean { + if (this._indentationRules && this._indentationRules.decreaseIndentPattern && this._indentationRules.decreaseIndentPattern.test(text)) { + return true; + } + return false; + } + + public shouldIndentNextLine(text: string): boolean { + if (this._indentationRules && this._indentationRules.indentNextLinePattern && this._indentationRules.indentNextLinePattern.test(text)) { + return true; + } + + return false; + } + + public shouldIgnore(text: string): boolean { + // the text matches `unIndentedLinePattern` + if (this._indentationRules && this._indentationRules.unIndentedLinePattern && this._indentationRules.unIndentedLinePattern.test(text)) { + return true; + } + + return false; + } + + public getIndentMetadata(text: string): number { + let ret = 0; + if (this.shouldIncrease(text)) { + ret += IndentConsts.INCREASE_MASK; + } + if (this.shouldDecrease(text)) { + ret += IndentConsts.DECREASE_MASK; + } + if (this.shouldIndentNextLine(text)) { + ret += IndentConsts.INDENT_NEXTLINE_MASK; + } + if (this.shouldIgnore(text)) { + ret += IndentConsts.UNINDENT_MASK; + } + return ret; + } +} + diff --git a/src/vs/editor/common/modes/supports/onEnter.ts b/src/vs/editor/common/modes/supports/onEnter.ts index 3bddd1f856647..2287829bb1d7b 100644 --- a/src/vs/editor/common/modes/supports/onEnter.ts +++ b/src/vs/editor/common/modes/supports/onEnter.ts @@ -72,45 +72,6 @@ export class OnEnterSupport { } } - // (3): Indentation Support - if (this._indentationRules) { - let indentOffset: null | number = null; - let outdentCurrentLine = false; - - if (this._indentationRules.increaseIndentPattern && this._indentationRules.increaseIndentPattern.test(beforeEnterText)) { - indentOffset = 1; - } - if (this._indentationRules.indentNextLinePattern && this._indentationRules.indentNextLinePattern.test(beforeEnterText)) { - indentOffset = 1; - } - - /** - * Since the indentation of `beforeEnterText` might not be correct, we still provide the correct indent action - * even if there is nothing to outdent from. - */ - if (this._indentationRules.decreaseIndentPattern && this._indentationRules.decreaseIndentPattern.test(afterEnterText)) { - indentOffset = indentOffset ? indentOffset - 1 : -1; - } - if (this._indentationRules.indentNextLinePattern && this._indentationRules.indentNextLinePattern.test(oneLineAboveText)) { - indentOffset = indentOffset ? indentOffset - 1 : -1; - } - if (this._indentationRules.decreaseIndentPattern && this._indentationRules.decreaseIndentPattern.test(beforeEnterText)) { - outdentCurrentLine = true; - } - - if (indentOffset !== null || outdentCurrentLine) { - // this means at least one indentation rule is matched so we should handle it - indentOffset = indentOffset || 0; - switch (indentOffset) { - case -1: - return { indentAction: IndentAction.Outdent, outdentCurrentLine: outdentCurrentLine }; - case 0: - return { indentAction: IndentAction.None, outdentCurrentLine: outdentCurrentLine }; - case 1: - return { indentAction: IndentAction.Indent, outdentCurrentLine: outdentCurrentLine }; - } - } - } // (4): Open bracket based logic if (beforeEnterText.length > 0) { @@ -125,26 +86,6 @@ export class OnEnterSupport { return null; } - public containNonWhitespace(text: string): boolean { - // the text doesn't contain any non-whitespace character. - let nonWhitespaceIdx = strings.lastNonWhitespaceIndex(text); - - if (nonWhitespaceIdx >= 0) { - return true; - } - - return false; - } - - public shouldIgnore(text: string): boolean { - // the text matches `unIndentedLinePattern` - if (this._indentationRules && this._indentationRules.unIndentedLinePattern && this._indentationRules.unIndentedLinePattern.test(text)) { - return true; - } - - return false; - } - private static _createOpenBracketRegExp(bracket: string): RegExp { var str = strings.escapeRegExpCharacters(bracket); if (!/\B/.test(str.charAt(0))) { diff --git a/src/vs/editor/common/services/bulkEdit.ts b/src/vs/editor/common/services/bulkEdit.ts index 2f63c6f64a718..7e60f9069b300 100644 --- a/src/vs/editor/common/services/bulkEdit.ts +++ b/src/vs/editor/common/services/bulkEdit.ts @@ -10,7 +10,7 @@ import { IStringDictionary, forEach, values, groupBy, size } from 'vs/base/commo import { IDisposable, dispose, IReference } from 'vs/base/common/lifecycle'; import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; -import { ITextModelResolverService, ITextEditorModel } from 'vs/editor/common/services/resolverService'; +import { ITextModelService, ITextEditorModel } from 'vs/editor/common/services/resolverService'; import { IFileService, IFileChange } from 'vs/platform/files/common/files'; import { EditOperation } from 'vs/editor/common/core/editOperation'; import { Range, IRange } from 'vs/editor/common/core/range'; @@ -183,7 +183,7 @@ class SourceModelEditTask extends EditTask { class BulkEditModel implements IDisposable { - private _textModelResolverService: ITextModelResolverService; + private _textModelResolverService: ITextModelService; private _numberOfResourcesToModify: number = 0; private _numberOfChanges: number = 0; private _edits: IStringDictionary = Object.create(null); @@ -192,7 +192,7 @@ class BulkEditModel implements IDisposable { private _sourceSelections: Selection[]; private _sourceModelTask: SourceModelEditTask; - constructor(textModelResolverService: ITextModelResolverService, sourceModel: URI, sourceSelections: Selection[], edits: IResourceEdit[], private progress: IProgressRunner = null) { + constructor(textModelResolverService: ITextModelService, sourceModel: URI, sourceSelections: Selection[], edits: IResourceEdit[], private progress: IProgressRunner = null) { this._textModelResolverService = textModelResolverService; this._sourceModel = sourceModel; this._sourceSelections = sourceSelections; @@ -274,7 +274,7 @@ class BulkEditModel implements IDisposable { return r; } - private applyTask(task): void { + private applyTask(task: EditTask): void { task.apply(); if (this.progress) { this.progress.worked(1); @@ -287,20 +287,20 @@ class BulkEditModel implements IDisposable { } export interface BulkEdit { - progress(progress: IProgressRunner); + progress(progress: IProgressRunner): void; add(edit: IResourceEdit[]): void; finish(): TPromise; ariaMessage(): string; } -export function bulkEdit(textModelResolverService: ITextModelResolverService, editor: ICommonCodeEditor, edits: IResourceEdit[], fileService?: IFileService, progress: IProgressRunner = null): TPromise { +export function bulkEdit(textModelResolverService: ITextModelService, editor: ICommonCodeEditor, edits: IResourceEdit[], fileService?: IFileService, progress: IProgressRunner = null): TPromise { let bulk = createBulkEdit(textModelResolverService, editor, fileService); bulk.add(edits); bulk.progress(progress); return bulk.finish(); } -export function createBulkEdit(textModelResolverService: ITextModelResolverService, editor?: ICommonCodeEditor, fileService?: IFileService): BulkEdit { +export function createBulkEdit(textModelResolverService: ITextModelService, editor?: ICommonCodeEditor, fileService?: IFileService): BulkEdit { let all: IResourceEdit[] = []; let recording = new ChangeRecorder(fileService).start(); @@ -338,7 +338,7 @@ export function createBulkEdit(textModelResolverService: ITextModelResolverServi let concurrentEdits = getConcurrentEdits(); if (concurrentEdits) { - return TPromise.wrapError(concurrentEdits); + return TPromise.wrapError(new Error(concurrentEdits)); } let uri: URI; diff --git a/src/vs/editor/common/services/editorSimpleWorker.ts b/src/vs/editor/common/services/editorSimpleWorker.ts index 88d5690bd139f..5d36b8f6c4b5f 100644 --- a/src/vs/editor/common/services/editorSimpleWorker.ts +++ b/src/vs/editor/common/services/editorSimpleWorker.ts @@ -474,7 +474,7 @@ export abstract class BaseEditorSimpleWorker { public loadForeignModule(moduleId: string, createData: any): TPromise { return new TPromise((c, e) => { // Use the global require to be sure to get the global config - (self).require([moduleId], (foreignModule) => { + (self).require([moduleId], (foreignModule: { create: (ctx: IWorkerContext, createData: any) => any; }) => { let ctx: IWorkerContext = { getMirrorModels: (): IMirrorModel[] => { return this._getModels(); diff --git a/src/vs/editor/common/services/editorWorkerServiceImpl.ts b/src/vs/editor/common/services/editorWorkerServiceImpl.ts index 77afcaec5dee7..62401d3df919b 100644 --- a/src/vs/editor/common/services/editorWorkerServiceImpl.ts +++ b/src/vs/editor/common/services/editorWorkerServiceImpl.ts @@ -17,7 +17,7 @@ import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerServ import { IModelService } from 'vs/editor/common/services/modelService'; import { EditorSimpleWorkerImpl } from 'vs/editor/common/services/editorSimpleWorker'; import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; -import { IConfigurationService, IConfigurationOptions } from 'vs/platform/configuration/common/configuration'; +import { ITextResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { IRange } from 'vs/editor/common/core/range'; import { IModeService } from 'vs/editor/common/services/modeService'; @@ -39,7 +39,7 @@ export class EditorWorkerServiceImpl extends Disposable implements IEditorWorker constructor( @IModelService modelService: IModelService, - @IConfigurationService configurationService: IConfigurationService, + @ITextResourceConfigurationService configurationService: ITextResourceConfigurationService, @IModeService modeService: IModeService ) { super(); @@ -82,19 +82,17 @@ export class EditorWorkerServiceImpl extends Disposable implements IEditorWorker class WordBasedCompletionItemProvider implements modes.ISuggestSupport { private readonly _workerManager: WorkerManager; - private readonly _configurationService: IConfigurationService; + private readonly _configurationService: ITextResourceConfigurationService; private readonly _modeService: IModeService; - constructor(workerManager: WorkerManager, configurationService: IConfigurationService, modeService: IModeService) { + constructor(workerManager: WorkerManager, configurationService: ITextResourceConfigurationService, modeService: IModeService) { this._workerManager = workerManager; this._configurationService = configurationService; this._modeService = modeService; } provideCompletionItems(model: editorCommon.IModel, position: Position): TPromise { - const { language } = this._modeService.getLanguageIdentifier(model.getLanguageIdAtPosition(position.lineNumber, position.column)); - const options = { section: 'editor', overrideIdentifier: language }; - const { wordBasedSuggestions } = this._configurationService.getConfiguration(options); + const { wordBasedSuggestions } = this._configurationService.getConfiguration(model.uri, position, 'editor'); if (!wordBasedSuggestions) { return undefined; } diff --git a/src/vs/editor/common/services/languagesRegistry.ts b/src/vs/editor/common/services/languagesRegistry.ts index 6c14559a26d86..0159f694c7026 100644 --- a/src/vs/editor/common/services/languagesRegistry.ts +++ b/src/vs/editor/common/services/languagesRegistry.ts @@ -7,7 +7,7 @@ import { onUnexpectedError } from 'vs/base/common/errors'; import * as mime from 'vs/base/common/mime'; import * as strings from 'vs/base/common/strings'; -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import { ModesRegistry } from 'vs/editor/common/modes/modesRegistry'; import { ILanguageExtensionPoint } from 'vs/editor/common/services/modeService'; import { LanguageId, LanguageIdentifier } from 'vs/editor/common/modes'; diff --git a/src/vs/editor/common/services/modeServiceImpl.ts b/src/vs/editor/common/services/modeServiceImpl.ts index e03585bdb33e7..d75ed1aafb627 100644 --- a/src/vs/editor/common/services/modeServiceImpl.ts +++ b/src/vs/editor/common/services/modeServiceImpl.ts @@ -4,75 +4,13 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import * as nls from 'vs/nls'; import { onUnexpectedError } from 'vs/base/common/errors'; import Event, { Emitter } from 'vs/base/common/event'; import { TPromise } from 'vs/base/common/winjs.base'; -import { IExtensionPoint, ExtensionsRegistry } from 'vs/platform/extensions/common/extensionsRegistry'; import { IMode, LanguageId, LanguageIdentifier } from 'vs/editor/common/modes'; import { FrankensteinMode } from 'vs/editor/common/modes/abstractMode'; import { LanguagesRegistry } from 'vs/editor/common/services/languagesRegistry'; -import { ILanguageExtensionPoint, IModeLookupResult, IModeService } from 'vs/editor/common/services/modeService'; - -export const languagesExtPoint: IExtensionPoint = ExtensionsRegistry.registerExtensionPoint('languages', [], { - description: nls.localize('vscode.extension.contributes.languages', 'Contributes language declarations.'), - type: 'array', - items: { - type: 'object', - defaultSnippets: [{ body: { id: '${1:languageId}', aliases: ['${2:label}'], extensions: ['${3:extension}'], configuration: './language-configuration.json' } }], - properties: { - id: { - description: nls.localize('vscode.extension.contributes.languages.id', 'ID of the language.'), - type: 'string' - }, - aliases: { - description: nls.localize('vscode.extension.contributes.languages.aliases', 'Name aliases for the language.'), - type: 'array', - items: { - type: 'string' - } - }, - extensions: { - description: nls.localize('vscode.extension.contributes.languages.extensions', 'File extensions associated to the language.'), - default: ['.foo'], - type: 'array', - items: { - type: 'string' - } - }, - filenames: { - description: nls.localize('vscode.extension.contributes.languages.filenames', 'File names associated to the language.'), - type: 'array', - items: { - type: 'string' - } - }, - filenamePatterns: { - description: nls.localize('vscode.extension.contributes.languages.filenamePatterns', 'File name glob patterns associated to the language.'), - type: 'array', - items: { - type: 'string' - } - }, - mimetypes: { - description: nls.localize('vscode.extension.contributes.languages.mimetypes', 'Mime types associated to the language.'), - type: 'array', - items: { - type: 'string' - } - }, - firstLine: { - description: nls.localize('vscode.extension.contributes.languages.firstLine', 'A regular expression matching the first line of a file of the language.'), - type: 'string' - }, - configuration: { - description: nls.localize('vscode.extension.contributes.languages.configuration', 'A relative path to a file containing configuration options for the language.'), - type: 'string', - default: './language-configuration.json' - } - } - } -}); +import { IModeLookupResult, IModeService } from 'vs/editor/common/services/modeService'; export class ModeServiceImpl implements IModeService { public _serviceBrand: any; diff --git a/src/vs/editor/common/services/modelServiceImpl.ts b/src/vs/editor/common/services/modelServiceImpl.ts index 9bbb35747dc5b..24040eb3e5467 100644 --- a/src/vs/editor/common/services/modelServiceImpl.ts +++ b/src/vs/editor/common/services/modelServiceImpl.ts @@ -21,7 +21,7 @@ import { IMode, LanguageIdentifier } from 'vs/editor/common/modes'; import { IModelService } from 'vs/editor/common/services/modelService'; import * as platform from 'vs/base/common/platform'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { DEFAULT_INDENTATION, DEFAULT_TRIM_AUTO_WHITESPACE } from 'vs/editor/common/config/defaultConfig'; +import { EDITOR_MODEL_DEFAULTS } from 'vs/editor/common/config/editorOptions'; import { PLAINTEXT_LANGUAGE_IDENTIFIER } from 'vs/editor/common/modes/modesRegistry'; import { IRawTextSource, TextSource, RawTextSource } from 'vs/editor/common/model/textSource'; import * as textModelEvents from 'vs/editor/common/model/textModelEvents'; @@ -157,6 +157,7 @@ class ModelMarkerHandler { stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, className, hoverMessage, + showIfCollapsed: true, overviewRuler: { color, darkColor, @@ -223,7 +224,7 @@ export class ModelServiceImpl implements IModelService { } private static _readModelOptions(config: IRawConfig): editorCommon.ITextModelCreationOptions { - let tabSize = DEFAULT_INDENTATION.tabSize; + let tabSize = EDITOR_MODEL_DEFAULTS.tabSize; if (config.editor && typeof config.editor.tabSize !== 'undefined') { let parsedTabSize = parseInt(config.editor.tabSize, 10); if (!isNaN(parsedTabSize)) { @@ -231,25 +232,25 @@ export class ModelServiceImpl implements IModelService { } } - let insertSpaces = DEFAULT_INDENTATION.insertSpaces; + let insertSpaces = EDITOR_MODEL_DEFAULTS.insertSpaces; if (config.editor && typeof config.editor.insertSpaces !== 'undefined') { insertSpaces = (config.editor.insertSpaces === 'false' ? false : Boolean(config.editor.insertSpaces)); } let newDefaultEOL = DEFAULT_EOL; - const eol = config.files && config.files.eol; + const eol = config.files && config.files.eol; // TODO@Sandeep (https://github.com/Microsoft/vscode/issues/29119) if (eol === '\r\n') { newDefaultEOL = editorCommon.DefaultEndOfLine.CRLF; } else if (eol === '\n') { newDefaultEOL = editorCommon.DefaultEndOfLine.LF; } - let trimAutoWhitespace = DEFAULT_TRIM_AUTO_WHITESPACE; + let trimAutoWhitespace = EDITOR_MODEL_DEFAULTS.trimAutoWhitespace; if (config.editor && typeof config.editor.trimAutoWhitespace !== 'undefined') { trimAutoWhitespace = (config.editor.trimAutoWhitespace === 'false' ? false : Boolean(config.editor.trimAutoWhitespace)); } - let detectIndentation = DEFAULT_INDENTATION.detectIndentation; + let detectIndentation = EDITOR_MODEL_DEFAULTS.detectIndentation; if (config.editor && typeof config.editor.detectIndentation !== 'undefined') { detectIndentation = (config.editor.detectIndentation === 'false' ? false : Boolean(config.editor.detectIndentation)); } @@ -266,7 +267,7 @@ export class ModelServiceImpl implements IModelService { public getCreationOptions(language: string): editorCommon.ITextModelCreationOptions { let creationOptions = this._modelCreationOptionsByLanguage[language]; if (!creationOptions) { - creationOptions = ModelServiceImpl._readModelOptions(this._configurationService.getConfiguration({ overrideIdentifier: language })); + creationOptions = ModelServiceImpl._readModelOptions(this._configurationService.getConfiguration(null, { overrideIdentifier: language })); this._modelCreationOptionsByLanguage[language] = creationOptions; } return creationOptions; diff --git a/src/vs/editor/common/services/resolverService.ts b/src/vs/editor/common/services/resolverService.ts index aacd94b9622b4..f476280d339c5 100644 --- a/src/vs/editor/common/services/resolverService.ts +++ b/src/vs/editor/common/services/resolverService.ts @@ -11,9 +11,9 @@ import { IModel } from 'vs/editor/common/editorCommon'; import { IEditorModel } from 'vs/platform/editor/common/editor'; import { IDisposable, IReference } from 'vs/base/common/lifecycle'; -export const ITextModelResolverService = createDecorator('textModelResolverService'); +export const ITextModelService = createDecorator('textModelService'); -export interface ITextModelResolverService { +export interface ITextModelService { _serviceBrand: any; /** @@ -42,4 +42,4 @@ export interface ITextEditorModel extends IEditorModel { * Provides access to the underlying IModel. */ textEditorModel: IModel; -} \ No newline at end of file +} diff --git a/src/vs/editor/common/services/resourceConfiguration.ts b/src/vs/editor/common/services/resourceConfiguration.ts new file mode 100644 index 0000000000000..2a959539e9ba4 --- /dev/null +++ b/src/vs/editor/common/services/resourceConfiguration.ts @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import Event from 'vs/base/common/event'; +import URI from 'vs/base/common/uri'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; +import { IPosition } from 'vs/editor/common/core/position'; + +export const ITextResourceConfigurationService = createDecorator('textResourceConfigurationService'); + +export interface ITextResourceConfigurationService { + + _serviceBrand: any; + + /** + * Event that fires when the configuration changes. + */ + onDidUpdateConfiguration: Event; + + /** + * Fetches the appropriate section of the for the given resource with appropriate overrides (e.g. language). + * This will be an object keyed off the section name. + * + * @param resource - Resource for which the configuration has to be fetched. Can be `null` or `undefined`. + * @param postion - Position in the resource for which configuration has to be fetched. Can be `null` or `undefined`. + * @param section - Section of the configuraion. Can be `null` or `undefined`. + * + */ + getConfiguration(resource: URI, section?: string): T; + getConfiguration(resource: URI, position?: IPosition, section?: string): T; + +} \ No newline at end of file diff --git a/src/vs/editor/common/services/resourceConfigurationImpl.ts b/src/vs/editor/common/services/resourceConfigurationImpl.ts new file mode 100644 index 0000000000000..453395b648870 --- /dev/null +++ b/src/vs/editor/common/services/resourceConfigurationImpl.ts @@ -0,0 +1,47 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import Event, { Emitter } from 'vs/base/common/event'; +import { Disposable } from 'vs/base/common/lifecycle'; +import URI from 'vs/base/common/uri'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import { ITextResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration'; +import { IPosition, Position } from 'vs/editor/common/core/position'; +import { IModeService } from 'vs/editor/common/services/modeService'; +import { IModelService } from 'vs/editor/common/services/modelService'; + +export class TextResourceConfigurationService extends Disposable implements ITextResourceConfigurationService { + + public _serviceBrand: any; + + private readonly _onDidUpdateConfiguration: Emitter = this._register(new Emitter()); + public readonly onDidUpdateConfiguration: Event = this._onDidUpdateConfiguration.event; + + constructor( + @IConfigurationService private configurationService: IConfigurationService, + @IModelService private modelService: IModelService, + @IModeService private modeService: IModeService, + ) { + super(); + this._register(this.configurationService.onDidUpdateConfiguration(() => this._onDidUpdateConfiguration.fire())); + } + + getConfiguration(resource: URI, section?: string): T + getConfiguration(resource: URI, at?: IPosition, section?: string): T + getConfiguration(resource: URI, arg2?: any, arg3?: any): T { + const position: IPosition = Position.isIPosition(arg2) ? arg2 : null; + const section: string = position ? (typeof arg3 === 'string' ? arg3 : void 0) : (typeof arg2 === 'string' ? arg2 : void 0); + const language = resource ? this.getLanguage(resource, position) : void 0; + return this.configurationService.getConfiguration(section, { resource, overrideIdentifier: language }); + } + + private getLanguage(resource: URI, position: IPosition): string { + const model = this.modelService.getModel(resource); + if (model) { + return position ? this.modeService.getLanguageIdentifier(model.getLanguageIdAtPosition(position.lineNumber, position.column)).language : model.getLanguageIdentifier().language; + } + return this.modeService.getModeIdByFilenameOrFirstLine(resource.fsPath); + } +} \ No newline at end of file diff --git a/src/vs/editor/common/standalone/standaloneBase.ts b/src/vs/editor/common/standalone/standaloneBase.ts index fcab19ff6e82d..695aa77b9bfdb 100644 --- a/src/vs/editor/common/standalone/standaloneBase.ts +++ b/src/vs/editor/common/standalone/standaloneBase.ts @@ -16,6 +16,7 @@ import URI from 'vs/base/common/uri'; // -------------------------------------------- // This is repeated here so it can be exported +// because TS inlines const enums // -------------------------------------------- export enum Severity { Ignore = 0, @@ -26,6 +27,7 @@ export enum Severity { // -------------------------------------------- // This is repeated here so it can be exported +// because TS inlines const enums // -------------------------------------------- export class KeyMod { public static readonly CtrlCmd: number = ConstKeyMod.CtrlCmd; @@ -40,6 +42,7 @@ export class KeyMod { // -------------------------------------------- // This is repeated here so it can be exported +// because TS inlines const enums // -------------------------------------------- /** * Virtual Key Codes, the value does not hold any inherent meaning. @@ -213,6 +216,8 @@ export enum KeyCode { * Cover all key codes when IME is processing input. */ KEY_IN_COMPOSITION = 109, + ABNT_C1 = 110, + ABNT_C2 = 111, /** * Placed last to cover the length of the enum. * Please do not depend on this value! diff --git a/src/vs/editor/common/standalone/themes.ts b/src/vs/editor/common/standalone/themes.ts deleted file mode 100644 index ade2a884b7654..0000000000000 --- a/src/vs/editor/common/standalone/themes.ts +++ /dev/null @@ -1,208 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import { IStandaloneThemeData } from 'vs/editor/common/services/standaloneThemeService'; - -/* -------------------------------- Begin vs theme -------------------------------- */ -export const vs: IStandaloneThemeData = { - base: 'vs', - inherit: false, - rules: [ - { token: '', foreground: '000000', background: 'fffffe' }, - { token: 'invalid', foreground: 'cd3131' }, - { token: 'emphasis', fontStyle: 'italic' }, - { token: 'strong', fontStyle: 'bold' }, - - { token: 'variable', foreground: '001188' }, - { token: 'variable.predefined', foreground: '4864AA' }, - { token: 'constant', foreground: 'dd0000' }, - { token: 'comment', foreground: '008000' }, - { token: 'number', foreground: '09885A' }, - { token: 'number.hex', foreground: '3030c0' }, - { token: 'regexp', foreground: '800000' }, - { token: 'annotation', foreground: '808080' }, - { token: 'type', foreground: '008080' }, - - { token: 'delimiter', foreground: '000000' }, - { token: 'delimiter.html', foreground: '383838' }, - { token: 'delimiter.xml', foreground: '0000FF' }, - - { token: 'tag', foreground: '800000' }, - { token: 'tag.id.jade', foreground: '4F76AC' }, - { token: 'tag.class.jade', foreground: '4F76AC' }, - { token: 'meta.scss', foreground: '800000' }, - { token: 'metatag', foreground: 'e00000' }, - { token: 'metatag.content.html', foreground: 'FF0000' }, - { token: 'metatag.html', foreground: '808080' }, - { token: 'metatag.xml', foreground: '808080' }, - { token: 'metatag.php', fontStyle: 'bold' }, - - { token: 'key', foreground: '863B00' }, - { token: 'string.key.json', foreground: 'A31515' }, - { token: 'string.value.json', foreground: '0451A5' }, - - { token: 'attribute.name', foreground: 'FF0000' }, - { token: 'attribute.value', foreground: '0451A5' }, - { token: 'attribute.value.number', foreground: '09885A' }, - { token: 'attribute.value.unit', foreground: '09885A' }, - { token: 'attribute.value.html', foreground: '0000FF' }, - { token: 'attribute.value.xml', foreground: '0000FF' }, - - { token: 'string', foreground: 'A31515' }, - { token: 'string.html', foreground: '0000FF' }, - { token: 'string.sql', foreground: 'FF0000' }, - { token: 'string.yaml', foreground: '0451A5' }, - - { token: 'keyword', foreground: '0000FF' }, - { token: 'keyword.json', foreground: '0451A5' }, - { token: 'keyword.flow', foreground: 'AF00DB' }, - { token: 'keyword.flow.scss', foreground: '0000FF' }, - - { token: 'operator.scss', foreground: '666666' }, - { token: 'operator.sql', foreground: '778899' }, - { token: 'operator.swift', foreground: '666666' }, - { token: 'predefined.sql', foreground: 'FF00FF' }, - ], - colors: { - editorBackground: '#FFFFFE', - editorForeground: '#000000', - editorInactiveSelection: '#E5EBF1', - editorIndentGuides: '#D3D3D3', - editorSelectionHighlight: '#ADD6FF4D' - } -}; -/* -------------------------------- End vs theme -------------------------------- */ - - -/* -------------------------------- Begin vs-dark theme -------------------------------- */ -export const vs_dark: IStandaloneThemeData = { - base: 'vs-dark', - inherit: false, - rules: [ - { token: '', foreground: 'D4D4D4', background: '1E1E1E' }, - { token: 'invalid', foreground: 'f44747' }, - { token: 'emphasis', fontStyle: 'italic' }, - { token: 'strong', fontStyle: 'bold' }, - - { token: 'variable', foreground: '74B0DF' }, - { token: 'variable.predefined', foreground: '4864AA' }, - { token: 'variable.parameter', foreground: '9CDCFE' }, - { token: 'constant', foreground: '569CD6' }, - { token: 'comment', foreground: '608B4E' }, - { token: 'number', foreground: 'B5CEA8' }, - { token: 'number.hex', foreground: '5BB498' }, - { token: 'regexp', foreground: 'B46695' }, - { token: 'annotation', foreground: 'cc6666' }, - { token: 'type', foreground: '3DC9B0' }, - - { token: 'delimiter', foreground: 'DCDCDC' }, - { token: 'delimiter.html', foreground: '808080' }, - { token: 'delimiter.xml', foreground: '808080' }, - - { token: 'tag', foreground: '569CD6' }, - { token: 'tag.id.jade', foreground: '4F76AC' }, - { token: 'tag.class.jade', foreground: '4F76AC' }, - { token: 'meta.scss', foreground: 'A79873' }, - { token: 'meta.tag', foreground: 'CE9178' }, - { token: 'metatag', foreground: 'DD6A6F' }, - { token: 'metatag.content.html', foreground: '9CDCFE' }, - { token: 'metatag.html', foreground: '569CD6' }, - { token: 'metatag.xml', foreground: '569CD6' }, - { token: 'metatag.php', fontStyle: 'bold' }, - - { token: 'key', foreground: '9CDCFE' }, - { token: 'string.key.json', foreground: '9CDCFE' }, - { token: 'string.value.json', foreground: 'CE9178' }, - - { token: 'attribute.name', foreground: '9CDCFE' }, - { token: 'attribute.value', foreground: 'CE9178' }, - { token: 'attribute.value.number.css', foreground: 'B5CEA8' }, - { token: 'attribute.value.unit.css', foreground: 'B5CEA8' }, - { token: 'attribute.value.hex.css', foreground: 'D4D4D4' }, - - { token: 'string', foreground: 'CE9178' }, - { token: 'string.sql', foreground: 'FF0000' }, - - { token: 'keyword', foreground: '569CD6' }, - { token: 'keyword.flow', foreground: 'C586C0' }, - { token: 'keyword.json', foreground: 'CE9178' }, - { token: 'keyword.flow.scss', foreground: '569CD6' }, - - { token: 'operator.scss', foreground: '909090' }, - { token: 'operator.sql', foreground: '778899' }, - { token: 'operator.swift', foreground: '909090' }, - { token: 'predefined.sql', foreground: 'FF00FF' }, - ], - colors: { - editorBackground: '#1E1E1E', - editorForeground: '#D4D4D4', - editorInactiveSelection: '#3A3D41', - editorIndentGuides: '#404040', - editorSelectionHighlight: '#ADD6FF26' - } -}; -/* -------------------------------- End vs-dark theme -------------------------------- */ - - - -/* -------------------------------- Begin hc-black theme -------------------------------- */ -export const hc_black: IStandaloneThemeData = { - base: 'hc-black', - inherit: false, - rules: [ - { token: '', foreground: 'FFFFFF', background: '000000' }, - { token: 'invalid', foreground: 'f44747' }, - { token: 'emphasis', fontStyle: 'italic' }, - { token: 'strong', fontStyle: 'bold' }, - - { token: 'variable', foreground: '1AEBFF' }, - { token: 'variable.parameter', foreground: '9CDCFE' }, - { token: 'constant', foreground: '569CD6' }, - { token: 'comment', foreground: '608B4E' }, - { token: 'number', foreground: 'FFFFFF' }, - { token: 'regexp', foreground: 'C0C0C0' }, - { token: 'annotation', foreground: '569CD6' }, - { token: 'type', foreground: '3DC9B0' }, - - { token: 'delimiter', foreground: 'FFFF00' }, - { token: 'delimiter.html', foreground: 'FFFF00' }, - - { token: 'tag', foreground: '569CD6' }, - { token: 'tag.id.jade', foreground: '4F76AC' }, - { token: 'tag.class.jade', foreground: '4F76AC' }, - { token: 'meta', foreground: 'D4D4D4' }, - { token: 'meta.tag', foreground: 'CE9178' }, - { token: 'metatag', foreground: '569CD6' }, - { token: 'metatag.content.html', foreground: '1AEBFF' }, - { token: 'metatag.html', foreground: '569CD6' }, - { token: 'metatag.xml', foreground: '569CD6' }, - { token: 'metatag.php', fontStyle: 'bold' }, - - { token: 'key', foreground: '9CDCFE' }, - { token: 'string.key', foreground: '9CDCFE' }, - { token: 'string.value', foreground: 'CE9178' }, - - { token: 'attribute.name', foreground: '569CD6' }, - { token: 'attribute.value', foreground: '3FF23F' }, - - { token: 'string', foreground: 'CE9178' }, - { token: 'string.sql', foreground: 'FF0000' }, - - { token: 'keyword', foreground: '569CD6' }, - { token: 'keyword.flow', foreground: 'C586C0' }, - - { token: 'operator.sql', foreground: '778899' }, - { token: 'operator.swift', foreground: '909090' }, - { token: 'predefined.sql', foreground: 'FF00FF' }, - ], - colors: { - editorBackground: '#000000', - editorForeground: '#FFFFFF', - editorIndentGuides: '#FFFFFF', - } -}; -/* -------------------------------- End hc-black theme -------------------------------- */ diff --git a/src/vs/editor/common/view/editorColorRegistry.ts b/src/vs/editor/common/view/editorColorRegistry.ts index 662f89656a815..855522bd9fae6 100644 --- a/src/vs/editor/common/view/editorColorRegistry.ts +++ b/src/vs/editor/common/view/editorColorRegistry.ts @@ -11,40 +11,57 @@ import { Color } from 'vs/base/common/color'; /** * Definition of the editor colors */ -export const editorLineHighlight = registerColor('editorLineHighlight', { dark: null, light: null, hc: null }, nls.localize('lineHighlight', 'Background color for the highlight of line at the cursor position.')); -export const editorLineHighlightBorder = registerColor('editorLineHighlightBorder', { dark: '#282828', light: '#eeeeee', hc: '#f38518' }, nls.localize('lineHighlightBorderBox', 'Background color for the border around the line at the cursor position.')); -export const editorRangeHighlight = registerColor('editorRangeHighlight', { dark: '#ffffff0b', light: '#fdff0033', hc: null }, nls.localize('rangeHighlight', 'Background color of highlighted ranges, like by quick open and find features.')); -export const editorCursor = registerColor('editorCursor', { dark: '#AEAFAD', light: Color.black, hc: Color.white }, nls.localize('caret', 'Color of the editor cursor.')); -export const editorWhitespaces = registerColor('editorWhitespaces', { dark: '#e3e4e229', light: '#33333333', hc: '#e3e4e229' }, nls.localize('editorWhitespaces', 'Color of whitespace characters in the editor.')); -export const editorIndentGuides = registerColor('editorIndentGuides', { dark: editorWhitespaces, light: editorWhitespaces, hc: editorWhitespaces }, nls.localize('editorIndentGuides', 'Color of the editor indentation guides.')); -export const editorLineNumbers = registerColor('editorLineNumbers', { dark: '#5A5A5A', light: '#2B91AF', hc: Color.white }, nls.localize('editorLineNumbers', 'Color of editor line numbers.')); +export const editorLineHighlight = registerColor('editor.lineHighlightBackground', { dark: null, light: null, hc: null }, nls.localize('lineHighlight', 'Background color for the highlight of line at the cursor position.')); +export const editorLineHighlightBorder = registerColor('editor.lineHighlightBorder', { dark: '#282828', light: '#eeeeee', hc: '#f38518' }, nls.localize('lineHighlightBorderBox', 'Background color for the border around the line at the cursor position.')); +export const editorRangeHighlight = registerColor('editor.rangeHighlightBackground', { dark: '#ffffff0b', light: '#fdff0033', hc: null }, nls.localize('rangeHighlight', 'Background color of highlighted ranges, like by quick open and find features.')); +export const editorCursor = registerColor('editorCursor.foreground', { dark: '#AEAFAD', light: Color.black, hc: Color.white }, nls.localize('caret', 'Color of the editor cursor.')); +export const editorWhitespaces = registerColor('editorWhitespace.foreground', { dark: '#e3e4e229', light: '#33333333', hc: '#e3e4e229' }, nls.localize('editorWhitespaces', 'Color of whitespace characters in the editor.')); +export const editorIndentGuides = registerColor('editorIndentGuide.background', { dark: editorWhitespaces, light: editorWhitespaces, hc: editorWhitespaces }, nls.localize('editorIndentGuides', 'Color of the editor indentation guides.')); +export const editorLineNumbers = registerColor('editorLineNumber.foreground', { dark: '#5A5A5A', light: '#2B91AF', hc: Color.white }, nls.localize('editorLineNumbers', 'Color of editor line numbers.')); +export const editorRuler = registerColor('editorRuler.foreground', { dark: '#5A5A5A', light: Color.lightgrey, hc: Color.white }, nls.localize('editorRuler', 'Color of the editor rulers.')); +export const editorCodeLensForeground = registerColor('editorCodeLens.foreground', { dark: '#999999', light: '#999999', hc: '#999999' }, nls.localize('editorCodeLensForeground', 'Foreground color of editor code lenses')); + +export const editorBracketMatchBackground = registerColor('editorBracketMatch.background', { dark: '#0064001a', light: '#0064001a', hc: '#0064001a' }, nls.localize('editorBracketMatchBackground', 'Background color behind matching brackets')); +export const editorBracketMatchBorder = registerColor('editorBracketMatch.border', { dark: '#888', light: '#B9B9B9', hc: '#fff' }, nls.localize('editorBracketMatchBorder', 'Color for matching brackets boxes')); + +export const editorOverviewRulerBorder = registerColor('editorOverviewRuler.border', { dark: '#7f7f7f4d', light: '#7f7f7f4d', hc: '#7f7f7f4d' }, nls.localize('editorOverviewRulerBorder', 'Color of the overview ruler border.')); + +export const editorGutter = registerColor('editorGutter.background', { dark: editorBackground, light: editorBackground, hc: editorBackground }, nls.localize('editorGutter', 'Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.')); + +export const editorErrorForeground = registerColor('editorError.foreground', { dark: '#FF0000', light: '#FF0000', hc: null }, nls.localize('errorForeground', 'Foreground color of error squigglies in the editor.')); +export const editorErrorBorder = registerColor('editorError.border', { dark: null, light: null, hc: Color.fromHex('#E47777').transparent(0.8) }, nls.localize('errorBorder', 'Border color of error squigglies in the editor.')); + +export const editorWarningForeground = registerColor('editorWarning.foreground', { dark: '#008000', light: '#008000', hc: null }, nls.localize('warningForeground', 'Foreground color of warning squigglies in the editor.')); +export const editorWarningBorder = registerColor('editorWarning.border', { dark: null, light: null, hc: Color.fromHex('#71B771').transparent(0.8) }, nls.localize('warningBorder', 'Border color of warning squigglies in the editor.')); // contains all color rules that used to defined in editor/browser/widget/editor.css registerThemingParticipant((theme, collector) => { - let background = theme.getColor(editorBackground); if (background) { - collector.addRule(`.monaco-editor.${theme.selector} .monaco-editor-background { background-color: ${background}; }`); + collector.addRule(`.monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${background}; }`); } let foreground = theme.getColor(editorForeground); if (foreground) { - collector.addRule(`.monaco-editor.${theme.selector}, .monaco-editor.${theme.selector} .inputarea { color: ${foreground}; }`); + collector.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${foreground}; }`); + } + + let gutter = theme.getColor(editorGutter); + if (gutter) { + collector.addRule(`.monaco-editor .margin { background-color: ${gutter}; }`); } let rangeHighlight = theme.getColor(editorRangeHighlight); if (rangeHighlight) { - collector.addRule(`.monaco-editor.${theme.selector} .rangeHighlight { background-color: ${rangeHighlight}; }`); + collector.addRule(`.monaco-editor .rangeHighlight { background-color: ${rangeHighlight}; }`); } let outline = theme.getColor(activeContrastBorder); if (outline) { - collector.addRule(`.monaco-editor.${theme.selector} .rangeHighlight { border: 1px dotted ${outline}; }; }`); + collector.addRule(`.monaco-editor .rangeHighlight { border: 1px dotted ${outline}; }; }`); } let invisibles = theme.getColor(editorWhitespaces); if (invisibles) { collector.addRule(`.vs-whitespace { color: ${invisibles} !important; }`); } -}); - - +}); \ No newline at end of file diff --git a/src/vs/editor/common/view/minimapCharRenderer.ts b/src/vs/editor/common/view/minimapCharRenderer.ts index ac1d59a029ff2..cdf67f31294f1 100644 --- a/src/vs/editor/common/view/minimapCharRenderer.ts +++ b/src/vs/editor/common/view/minimapCharRenderer.ts @@ -253,7 +253,7 @@ export class MinimapCharRenderer { const deltaG = color.g - backgroundG; const deltaB = color.b - backgroundB; - const colorR = backgroundR + deltaR * c;; + const colorR = backgroundR + deltaR * c; const colorG = backgroundG + deltaG * c; const colorB = backgroundB + deltaB * c; @@ -325,7 +325,7 @@ export class MinimapCharRenderer { const deltaG = color.g - backgroundG; const deltaB = color.b - backgroundB; - const colorR = backgroundR + deltaR * c;; + const colorR = backgroundR + deltaR * c; const colorG = backgroundG + deltaG * c; const colorB = backgroundB + deltaB * c; diff --git a/src/vs/editor/common/view/overviewZoneManager.ts b/src/vs/editor/common/view/overviewZoneManager.ts index 1db950495ccc2..a13baf1e0d24d 100644 --- a/src/vs/editor/common/view/overviewZoneManager.ts +++ b/src/vs/editor/common/view/overviewZoneManager.ts @@ -4,7 +4,8 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { OverviewRulerLane, ThemeType } from 'vs/editor/common/editorCommon'; +import { OverviewRulerLane } from 'vs/editor/common/editorCommon'; +import { ThemeType, DARK, HIGH_CONTRAST, LIGHT } from 'vs/platform/theme/common/themeService'; export class ColorZone { _colorZoneBrand: void; @@ -57,9 +58,9 @@ export class OverviewRulerZone { public getColor(themeType: ThemeType): string { switch (themeType) { - case ThemeType.HighContrast: + case HIGH_CONTRAST: return this._hcColor; - case ThemeType.Dark: + case DARK: return this._darkColor; } return this._color; @@ -125,7 +126,7 @@ export class OverviewZoneManager { private _themeType: ThemeType; private _pixelRatio: number; - private _lastAssignedId; + private _lastAssignedId: number; private _color2Id: { [color: string]: number; }; private _id2Color: string[]; @@ -139,7 +140,7 @@ export class OverviewZoneManager { this._outerHeight = 0; this._maximumHeight = 0; this._minimumHeight = 0; - this._themeType = ThemeType.Light; + this._themeType = LIGHT; this._pixelRatio = 1; this._lastAssignedId = 0; diff --git a/src/vs/editor/common/view/viewContext.ts b/src/vs/editor/common/view/viewContext.ts index c37c88756d9f5..7aae15aebabf8 100644 --- a/src/vs/editor/common/view/viewContext.ts +++ b/src/vs/editor/common/view/viewContext.ts @@ -5,23 +5,30 @@ 'use strict'; import { IConfiguration } from 'vs/editor/common/editorCommon'; -import { IViewModel } from 'vs/editor/common/viewModel/viewModel'; +import { IViewModel, IViewLayout } from 'vs/editor/common/viewModel/viewModel'; import { ViewEventHandler } from 'vs/editor/common/viewModel/viewEventHandler'; import { ViewEventDispatcher } from 'vs/editor/common/view/viewEventDispatcher'; +import { ITheme } from 'vs/platform/theme/common/themeService'; export class ViewContext { public readonly configuration: IConfiguration; public readonly model: IViewModel; + public readonly viewLayout: IViewLayout; public readonly privateViewEventBus: ViewEventDispatcher; + public theme: ITheme; // will be updated + constructor( configuration: IConfiguration, + theme: ITheme, model: IViewModel, privateViewEventBus: ViewEventDispatcher ) { this.configuration = configuration; + this.theme = theme; this.model = model; + this.viewLayout = model.viewLayout; this.privateViewEventBus = privateViewEventBus; } diff --git a/src/vs/editor/common/view/viewEvents.ts b/src/vs/editor/common/view/viewEvents.ts index 3bb4059a38e16..b4a6e4bbf28df 100644 --- a/src/vs/editor/common/view/viewEvents.ts +++ b/src/vs/editor/common/view/viewEvents.ts @@ -4,46 +4,55 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import { ScrollEvent } from 'vs/base/common/scrollable'; -import { IViewConfigurationChangedEvent, IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; -import { VerticalRevealType } from 'vs/editor/common/controller/cursorEvents'; +import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; +import * as errors from 'vs/base/common/errors'; +import { IDisposable, Disposable } from 'vs/base/common/lifecycle'; export const enum ViewEventType { ViewConfigurationChanged = 1, - ViewCursorPositionChanged = 2, - ViewCursorSelectionChanged = 3, - ViewDecorationsChanged = 4, - ViewFlushed = 5, - ViewFocusChanged = 6, - ViewLineMappingChanged = 7, - ViewLinesChanged = 8, - ViewLinesDeleted = 9, - ViewLinesInserted = 10, - ViewRevealRangeRequest = 11, - ViewScrollChanged = 12, - ViewScrollRequest = 13, - ViewTokensChanged = 14, - ViewTokensColorsChanged = 15, - ViewZonesChanged = 16, + ViewCursorStateChanged = 2, + ViewDecorationsChanged = 3, + ViewFlushed = 4, + ViewFocusChanged = 5, + ViewLineMappingChanged = 6, + ViewLinesChanged = 7, + ViewLinesDeleted = 8, + ViewLinesInserted = 9, + ViewRevealRangeRequest = 10, + ViewScrollChanged = 11, + ViewTokensChanged = 12, + ViewTokensColorsChanged = 13, + ViewZonesChanged = 14, + ViewThemeChanged = 15 } export class ViewConfigurationChangedEvent { public readonly type = ViewEventType.ViewConfigurationChanged; + public readonly canUseLayerHinting: boolean; + public readonly pixelRatio: boolean; + public readonly editorClassName: boolean; public readonly lineHeight: boolean; public readonly readOnly: boolean; + public readonly accessibilitySupport: boolean; + public readonly emptySelectionClipboard: boolean; public readonly layoutInfo: boolean; public readonly fontInfo: boolean; - public readonly viewInfo: IViewConfigurationChangedEvent; + public readonly viewInfo: boolean; public readonly wrappingInfo: boolean; constructor(source: IConfigurationChangedEvent) { + this.canUseLayerHinting = source.canUseLayerHinting; + this.pixelRatio = source.pixelRatio; + this.editorClassName = source.editorClassName; this.lineHeight = source.lineHeight; this.readOnly = source.readOnly; + this.accessibilitySupport = source.accessibilitySupport; + this.emptySelectionClipboard = source.emptySelectionClipboard; this.layoutInfo = source.layoutInfo; this.fontInfo = source.fontInfo; this.viewInfo = source.viewInfo; @@ -51,46 +60,27 @@ export class ViewConfigurationChangedEvent { } } -export class ViewCursorPositionChangedEvent { +export class ViewCursorStateChangedEvent { - public readonly type = ViewEventType.ViewCursorPositionChanged; + public readonly type = ViewEventType.ViewCursorStateChanged; /** - * Primary cursor's position. + * The primary selection is always at index 0. */ - public readonly position: Position; - /** - * Secondary cursors' position. - */ - public readonly secondaryPositions: Position[]; + public readonly selections: Selection[]; /** * Is the primary cursor in the editable range? */ public readonly isInEditableRange: boolean; - - constructor(position: Position, secondaryPositions: Position[], isInEditableRange: boolean) { - this.position = position; - this.secondaryPositions = secondaryPositions; - this.isInEditableRange = isInEditableRange; - } -} - -export class ViewCursorSelectionChangedEvent { - - public readonly type = ViewEventType.ViewCursorSelectionChanged; - - /** - * The primary selection. - */ - public readonly selection: Selection; /** - * The secondary selections. + * A message that can be presented to screen readers. */ - public readonly secondarySelections: Selection[]; + public readonly screenReaderMessage: string; - constructor(selection: Selection, secondarySelections: Selection[]) { - this.selection = selection; - this.secondarySelections = secondarySelections; + constructor(selections: Selection[], isInEditableRange: boolean, screenReaderMessage: string) { + this.selections = selections; + this.isInEditableRange = isInEditableRange; + this.screenReaderMessage = screenReaderMessage; } } @@ -189,6 +179,14 @@ export class ViewLinesInsertedEvent { } } +export const enum VerticalRevealType { + Simple = 0, + Center = 1, + CenterIfOutsideViewport = 2, + Top = 3, + Bottom = 4 +} + export class ViewRevealRangeRequestEvent { public readonly type = ViewEventType.ViewRevealRangeRequest; @@ -239,17 +237,6 @@ export class ViewScrollChangedEvent { } } -export class ViewScrollRequestEvent { - - public readonly type = ViewEventType.ViewScrollRequest; - - public readonly desiredScrollTop: number; - - constructor(desiredScrollTop: number) { - this.desiredScrollTop = desiredScrollTop; - } -} - export class ViewTokensChangedEvent { public readonly type = ViewEventType.ViewTokensChanged; @@ -270,6 +257,14 @@ export class ViewTokensChangedEvent { } } +export class ViewThemeChangedEvent { + + public readonly type = ViewEventType.ViewThemeChanged; + + constructor() { + } +} + export class ViewTokensColorsChangedEvent { public readonly type = ViewEventType.ViewTokensColorsChanged; @@ -290,8 +285,7 @@ export class ViewZonesChangedEvent { export type ViewEvent = ( ViewConfigurationChangedEvent - | ViewCursorPositionChangedEvent - | ViewCursorSelectionChangedEvent + | ViewCursorStateChangedEvent | ViewDecorationsChangedEvent | ViewFlushedEvent | ViewFocusChangedEvent @@ -301,8 +295,56 @@ export type ViewEvent = ( | ViewLinesInsertedEvent | ViewRevealRangeRequestEvent | ViewScrollChangedEvent - | ViewScrollRequestEvent | ViewTokensChangedEvent | ViewTokensColorsChangedEvent | ViewZonesChangedEvent + | ViewThemeChangedEvent ); + +export interface IViewEventListener { + (events: ViewEvent[]): void; +} + +export class ViewEventEmitter extends Disposable { + private _listeners: IViewEventListener[]; + + constructor() { + super(); + this._listeners = []; + } + + public dispose(): void { + this._listeners = []; + super.dispose(); + } + + protected _emit(events: ViewEvent[]): void { + const listeners = this._listeners.slice(0); + for (let i = 0, len = listeners.length; i < len; i++) { + safeInvokeListener(listeners[i], events); + } + } + + public addEventListener(listener: (events: ViewEvent[]) => void): IDisposable { + this._listeners.push(listener); + return { + dispose: () => { + let listeners = this._listeners; + for (let i = 0, len = listeners.length; i < len; i++) { + if (listeners[i] === listener) { + listeners.splice(i, 1); + break; + } + } + } + }; + } +} + +function safeInvokeListener(listener: IViewEventListener, events: ViewEvent[]): void { + try { + listener(events); + } catch (e) { + errors.onUnexpectedError(e); + } +} diff --git a/src/vs/editor/common/viewLayout/editorLayoutProvider.ts b/src/vs/editor/common/viewLayout/editorLayoutProvider.ts deleted file mode 100644 index daf1522ab9230..0000000000000 --- a/src/vs/editor/common/viewLayout/editorLayoutProvider.ts +++ /dev/null @@ -1,154 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { RenderMinimap, EditorLayoutInfo, OverviewRulerPosition } from 'vs/editor/common/config/editorOptions'; - -export interface IEditorLayoutProviderOpts { - outerWidth: number; - outerHeight: number; - - showGlyphMargin: boolean; - lineHeight: number; - - showLineNumbers: boolean; - lineNumbersMinChars: number; - lineNumbersDigitCount: number; - - lineDecorationsWidth: number; - - typicalHalfwidthCharacterWidth: number; - maxDigitWidth: number; - - verticalScrollbarWidth: number; - verticalScrollbarHasArrows: boolean; - scrollbarArrowSize: number; - horizontalScrollbarHeight: number; - - minimap: boolean; - minimapRenderCharacters: boolean; - minimapMaxColumn: number; - pixelRatio: number; -} - -export class EditorLayoutProvider { - public static compute(_opts: IEditorLayoutProviderOpts): EditorLayoutInfo { - const outerWidth = _opts.outerWidth | 0; - const outerHeight = _opts.outerHeight | 0; - const showGlyphMargin = Boolean(_opts.showGlyphMargin); - const lineHeight = _opts.lineHeight | 0; - const showLineNumbers = Boolean(_opts.showLineNumbers); - const lineNumbersMinChars = _opts.lineNumbersMinChars | 0; - const lineNumbersDigitCount = _opts.lineNumbersDigitCount | 0; - const lineDecorationsWidth = _opts.lineDecorationsWidth | 0; - const typicalHalfwidthCharacterWidth = Number(_opts.typicalHalfwidthCharacterWidth); - const maxDigitWidth = Number(_opts.maxDigitWidth); - const verticalScrollbarWidth = _opts.verticalScrollbarWidth | 0; - const verticalScrollbarHasArrows = Boolean(_opts.verticalScrollbarHasArrows); - const scrollbarArrowSize = _opts.scrollbarArrowSize | 0; - const horizontalScrollbarHeight = _opts.horizontalScrollbarHeight | 0; - const minimap = Boolean(_opts.minimap); - const minimapRenderCharacters = Boolean(_opts.minimapRenderCharacters); - const minimapMaxColumn = _opts.minimapMaxColumn | 0; - const pixelRatio = Number(_opts.pixelRatio); - - let lineNumbersWidth = 0; - if (showLineNumbers) { - let digitCount = Math.max(lineNumbersDigitCount, lineNumbersMinChars); - lineNumbersWidth = Math.round(digitCount * maxDigitWidth); - } - - let glyphMarginWidth = 0; - if (showGlyphMargin) { - glyphMarginWidth = lineHeight; - } - - let glyphMarginLeft = 0; - let lineNumbersLeft = glyphMarginLeft + glyphMarginWidth; - let decorationsLeft = lineNumbersLeft + lineNumbersWidth; - let contentLeft = decorationsLeft + lineDecorationsWidth; - - let remainingWidth = outerWidth - glyphMarginWidth - lineNumbersWidth - lineDecorationsWidth; - - let renderMinimap: RenderMinimap; - let minimapWidth: number; - let contentWidth: number; - if (!minimap) { - minimapWidth = 0; - renderMinimap = RenderMinimap.None; - contentWidth = remainingWidth; - } else { - let minimapCharWidth: number; - if (pixelRatio >= 2) { - renderMinimap = minimapRenderCharacters ? RenderMinimap.Large : RenderMinimap.LargeBlocks; - minimapCharWidth = 2 / pixelRatio; - } else { - renderMinimap = minimapRenderCharacters ? RenderMinimap.Small : RenderMinimap.SmallBlocks; - minimapCharWidth = 1 / pixelRatio; - } - - // Given: - // viewportColumn = (contentWidth - verticalScrollbarWidth) / typicalHalfwidthCharacterWidth - // minimapWidth = viewportColumn * minimapCharWidth - // contentWidth = remainingWidth - minimapWidth - // What are good values for contentWidth and minimapWidth ? - - // minimapWidth = ((contentWidth - verticalScrollbarWidth) / typicalHalfwidthCharacterWidth) * minimapCharWidth - // typicalHalfwidthCharacterWidth * minimapWidth = (contentWidth - verticalScrollbarWidth) * minimapCharWidth - // typicalHalfwidthCharacterWidth * minimapWidth = (remainingWidth - minimapWidth - verticalScrollbarWidth) * minimapCharWidth - // (typicalHalfwidthCharacterWidth + minimapCharWidth) * minimapWidth = (remainingWidth - verticalScrollbarWidth) * minimapCharWidth - // minimapWidth = ((remainingWidth - verticalScrollbarWidth) * minimapCharWidth) / (typicalHalfwidthCharacterWidth + minimapCharWidth) - - minimapWidth = Math.max(0, Math.floor(((remainingWidth - verticalScrollbarWidth) * minimapCharWidth) / (typicalHalfwidthCharacterWidth + minimapCharWidth))); - let minimapColumns = minimapWidth / minimapCharWidth; - if (minimapColumns > minimapMaxColumn) { - minimapWidth = Math.floor(minimapMaxColumn * minimapCharWidth); - } - contentWidth = remainingWidth - minimapWidth; - } - - let viewportColumn = Math.max(1, Math.floor((contentWidth - verticalScrollbarWidth) / typicalHalfwidthCharacterWidth)); - - let verticalArrowSize = (verticalScrollbarHasArrows ? scrollbarArrowSize : 0); - - return new EditorLayoutInfo({ - width: outerWidth, - height: outerHeight, - - glyphMarginLeft: glyphMarginLeft, - glyphMarginWidth: glyphMarginWidth, - glyphMarginHeight: outerHeight, - - lineNumbersLeft: lineNumbersLeft, - lineNumbersWidth: lineNumbersWidth, - lineNumbersHeight: outerHeight, - - decorationsLeft: decorationsLeft, - decorationsWidth: lineDecorationsWidth, - decorationsHeight: outerHeight, - - contentLeft: contentLeft, - contentWidth: contentWidth, - contentHeight: outerHeight, - - renderMinimap: renderMinimap, - minimapWidth: minimapWidth, - - viewportColumn: viewportColumn, - - verticalScrollbarWidth: verticalScrollbarWidth, - horizontalScrollbarHeight: horizontalScrollbarHeight, - - overviewRuler: new OverviewRulerPosition({ - top: verticalArrowSize, - width: verticalScrollbarWidth, - height: (outerHeight - 2 * verticalArrowSize), - right: 0 - }) - }); - } - - -} diff --git a/src/vs/editor/common/viewLayout/viewLayout.ts b/src/vs/editor/common/viewLayout/viewLayout.ts index dc1daf701f2f2..4af8cbd523567 100644 --- a/src/vs/editor/common/viewLayout/viewLayout.ts +++ b/src/vs/editor/common/viewLayout/viewLayout.ts @@ -10,34 +10,32 @@ import * as editorCommon from 'vs/editor/common/editorCommon'; import { LinesLayout } from 'vs/editor/common/viewLayout/linesLayout'; import { IViewLayout, IViewWhitespaceViewportData, Viewport } from 'vs/editor/common/viewModel/viewModel'; import { IPartialViewLinesViewportData } from 'vs/editor/common/viewLayout/viewLinesViewportData'; -import { ViewEventDispatcher } from 'vs/editor/common/view/viewEventDispatcher'; -import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { IEditorWhitespace } from 'vs/editor/common/viewLayout/whitespaceComputer'; +import Event from 'vs/base/common/event'; +import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; -export class LayoutProvider extends Disposable implements IViewLayout { +export class ViewLayout extends Disposable implements IViewLayout { static LINES_HORIZONTAL_EXTRA_PX = 30; - private _configuration: editorCommon.IConfiguration; - private _privateViewEventBus: ViewEventDispatcher; - private _linesLayout: LinesLayout; - private _scrollable: Scrollable; + private readonly _configuration: editorCommon.IConfiguration; + private readonly _linesLayout: LinesLayout; - constructor(configuration: editorCommon.IConfiguration, lineCount: number, privateViewEventBus: ViewEventDispatcher) { + public readonly scrollable: Scrollable; + public readonly onDidScroll: Event; + + constructor(configuration: editorCommon.IConfiguration, lineCount: number) { super(); this._configuration = configuration; - this._privateViewEventBus = privateViewEventBus; this._linesLayout = new LinesLayout(lineCount, this._configuration.editor.lineHeight); - this._scrollable = this._register(new Scrollable()); - this._scrollable.updateState({ + this.scrollable = this._register(new Scrollable()); + this.scrollable.updateState({ width: configuration.editor.layoutInfo.contentWidth, height: configuration.editor.layoutInfo.contentHeight }); - this._register(this._scrollable.onScroll((e: ScrollEvent) => { - this._privateViewEventBus.emit(new viewEvents.ViewScrollChangedEvent(e)); - })); + this.onDidScroll = this.scrollable.onScroll; this._updateHeight(); } @@ -47,7 +45,7 @@ export class LayoutProvider extends Disposable implements IViewLayout { } public getScrollable(): Scrollable { - return this._scrollable; + return this.scrollable; } public onHeightMaybeChanged(): void { @@ -56,12 +54,12 @@ export class LayoutProvider extends Disposable implements IViewLayout { // ---- begin view event handlers - public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): void { + public onConfigurationChanged(e: IConfigurationChangedEvent): void { if (e.lineHeight) { this._linesLayout.setLineHeight(this._configuration.editor.lineHeight); } if (e.layoutInfo) { - this._scrollable.updateState({ + this.scrollable.updateState({ width: this._configuration.editor.layoutInfo.contentWidth, height: this._configuration.editor.layoutInfo.contentHeight }); @@ -72,12 +70,12 @@ export class LayoutProvider extends Disposable implements IViewLayout { this._linesLayout.onFlushed(lineCount); this._updateHeight(); } - public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): void { - this._linesLayout.onLinesDeleted(e.fromLineNumber, e.toLineNumber); + public onLinesDeleted(fromLineNumber: number, toLineNumber: number): void { + this._linesLayout.onLinesDeleted(fromLineNumber, toLineNumber); this._updateHeight(); } - public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): void { - this._linesLayout.onLinesInserted(e.fromLineNumber, e.toLineNumber); + public onLinesInserted(fromLineNumber: number, toLineNumber: number): void { + this._linesLayout.onLinesInserted(fromLineNumber, toLineNumber); this._updateHeight(); } @@ -96,7 +94,7 @@ export class LayoutProvider extends Disposable implements IViewLayout { } private _getTotalHeight(): number { - const scrollState = this._scrollable.getState(); + const scrollState = this.scrollable.getState(); let result = this._linesLayout.getLinesTotalHeight(); if (this._configuration.editor.viewInfo.scrollBeyondLastLine) { @@ -109,7 +107,7 @@ export class LayoutProvider extends Disposable implements IViewLayout { } private _updateHeight(): void { - this._scrollable.updateState({ + this.scrollable.updateState({ scrollHeight: this._getTotalHeight() }); } @@ -117,7 +115,7 @@ export class LayoutProvider extends Disposable implements IViewLayout { // ---- Layouting logic public getCurrentViewport(): Viewport { - const scrollState = this._scrollable.getState(); + const scrollState = this.scrollable.getState(); return new Viewport( scrollState.scrollTop, scrollState.scrollLeft, @@ -129,14 +127,14 @@ export class LayoutProvider extends Disposable implements IViewLayout { private _computeScrollWidth(maxLineWidth: number, viewportWidth: number): number { let isViewportWrapping = this._configuration.editor.wrappingInfo.isViewportWrapping; if (!isViewportWrapping) { - return Math.max(maxLineWidth + LayoutProvider.LINES_HORIZONTAL_EXTRA_PX, viewportWidth); + return Math.max(maxLineWidth + ViewLayout.LINES_HORIZONTAL_EXTRA_PX, viewportWidth); } return Math.max(maxLineWidth, viewportWidth); } public onMaxLineWidthChanged(maxLineWidth: number): void { let newScrollWidth = this._computeScrollWidth(maxLineWidth, this.getCurrentViewport().width); - this._scrollable.updateState({ + this.scrollable.updateState({ scrollWidth: newScrollWidth }); @@ -147,7 +145,7 @@ export class LayoutProvider extends Disposable implements IViewLayout { // ---- view state public saveState(): editorCommon.IViewState { - const scrollState = this._scrollable.getState(); + const scrollState = this.scrollable.getState(); let scrollTop = scrollState.scrollTop; let firstLineNumberInViewport = this._linesLayout.getLineNumberAtOrAfterVerticalOffset(scrollTop); let whitespaceAboveFirstLine = this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(firstLineNumberInViewport); @@ -163,7 +161,7 @@ export class LayoutProvider extends Disposable implements IViewLayout { if (typeof state.scrollTopWithoutViewZones === 'number' && !this._linesLayout.hasWhitespace()) { restoreScrollTop = state.scrollTopWithoutViewZones; } - this._scrollable.updateState({ + this.scrollable.updateState({ scrollLeft: state.scrollLeft, scrollTop: restoreScrollTop }); @@ -199,7 +197,7 @@ export class LayoutProvider extends Disposable implements IViewLayout { } public getLinesViewportDataAtScrollTop(scrollTop: number): IPartialViewLinesViewportData { // do some minimal validations on scrollTop - const scrollState = this._scrollable.getState(); + const scrollState = this.scrollable.getState(); if (scrollTop + scrollState.height > scrollState.scrollHeight) { scrollTop = scrollState.scrollHeight - scrollState.height; } @@ -220,23 +218,23 @@ export class LayoutProvider extends Disposable implements IViewLayout { public getScrollWidth(): number { - const scrollState = this._scrollable.getState(); + const scrollState = this.scrollable.getState(); return scrollState.scrollWidth; } public getScrollLeft(): number { - const scrollState = this._scrollable.getState(); + const scrollState = this.scrollable.getState(); return scrollState.scrollLeft; } public getScrollHeight(): number { - const scrollState = this._scrollable.getState(); + const scrollState = this.scrollable.getState(); return scrollState.scrollHeight; } public getScrollTop(): number { - const scrollState = this._scrollable.getState(); + const scrollState = this.scrollable.getState(); return scrollState.scrollTop; } public setScrollPosition(position: editorCommon.INewScrollPosition): void { - this._scrollable.updateState(position); + this.scrollable.updateState(position); } } diff --git a/src/vs/editor/common/viewLayout/viewLinesViewportData.ts b/src/vs/editor/common/viewLayout/viewLinesViewportData.ts index 6d8a2ec910df6..9ff9ddfe44962 100644 --- a/src/vs/editor/common/viewLayout/viewLinesViewportData.ts +++ b/src/vs/editor/common/viewLayout/viewLinesViewportData.ts @@ -4,8 +4,9 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { ViewLineRenderingData, IViewModel, ViewModelDecoration } from 'vs/editor/common/viewModel/viewModel'; +import { ViewLineRenderingData, IViewModel, ViewModelDecoration, IViewWhitespaceViewportData } from 'vs/editor/common/viewModel/viewModel'; import { Range } from 'vs/editor/common/core/range'; +import { Selection } from 'vs/editor/common/core/selection'; export interface IPartialViewLinesViewportData { /** @@ -21,8 +22,7 @@ export interface IPartialViewLinesViewportData { */ readonly endLineNumber: number; /** - * relativeVerticalOffset[i] is the gap that must be left between line at - * i - 1 + `startLineNumber` and i + `startLineNumber`. + * relativeVerticalOffset[i] is the `top` position for line at `i` + `startLineNumber`. */ readonly relativeVerticalOffset: number[]; /** @@ -44,6 +44,8 @@ export interface IPartialViewLinesViewportData { */ export class ViewportData { + public readonly selections: Selection[]; + /** * The line number at which to start rendering (inclusive). */ @@ -55,8 +57,7 @@ export class ViewportData { public readonly endLineNumber: number; /** - * relativeVerticalOffset[i] is the gap that must be left between line at - * i - 1 + `startLineNumber` and i + `startLineNumber`. + * relativeVerticalOffset[i] is the `top` position for line at `i` + `startLineNumber`. */ public readonly relativeVerticalOffset: number[]; @@ -70,16 +71,25 @@ export class ViewportData { */ public readonly bigNumbersDelta: number; + /** + * Positioning information about gaps whitespace. + */ + public readonly whitespaceViewportData: IViewWhitespaceViewportData[]; + private readonly _model: IViewModel; constructor( + selections: Selection[], partialData: IPartialViewLinesViewportData, + whitespaceViewportData: IViewWhitespaceViewportData[], model: IViewModel ) { + this.selections = selections; this.startLineNumber = partialData.startLineNumber | 0; this.endLineNumber = partialData.endLineNumber | 0; this.relativeVerticalOffset = partialData.relativeVerticalOffset; this.bigNumbersDelta = partialData.bigNumbersDelta | 0; + this.whitespaceViewportData = whitespaceViewportData; this._model = model; diff --git a/src/vs/editor/common/viewModel/characterHardWrappingLineMapper.ts b/src/vs/editor/common/viewModel/characterHardWrappingLineMapper.ts index 39d5d6183251d..d301593e8c179 100644 --- a/src/vs/editor/common/viewModel/characterHardWrappingLineMapper.ts +++ b/src/vs/editor/common/viewModel/characterHardWrappingLineMapper.ts @@ -162,13 +162,13 @@ export class CharacterHardWrappingLineMapperFactory implements ILineMapperFactor let breakBeforeOffset: number; let restoreVisibleColumnFrom: number; - if (niceBreakOffset !== -1) { + if (niceBreakOffset !== -1 && niceBreakVisibleColumn <= breakingColumn) { // We will break before `niceBreakLastOffset` breakBeforeOffset = niceBreakOffset; restoreVisibleColumnFrom = niceBreakVisibleColumn; - } else if (obtrusiveBreakOffset !== -1) { + } else if (obtrusiveBreakOffset !== -1 && obtrusiveBreakVisibleColumn <= breakingColumn) { // We will break before `obtrusiveBreakLastOffset` breakBeforeOffset = obtrusiveBreakOffset; diff --git a/src/vs/editor/common/viewModel/splitLinesCollection.ts b/src/vs/editor/common/viewModel/splitLinesCollection.ts index 9a22f94558cee..7c40b262f096d 100644 --- a/src/vs/editor/common/viewModel/splitLinesCollection.ts +++ b/src/vs/editor/common/viewModel/splitLinesCollection.ts @@ -9,9 +9,10 @@ import { Range } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { LineTokens } from 'vs/editor/common/core/lineTokens'; import { PrefixSumComputerWithCache } from 'vs/editor/common/viewModel/prefixSumComputer'; -import { ViewLineData, ViewEventsCollector } from 'vs/editor/common/viewModel/viewModel'; +import { ViewLineData } from 'vs/editor/common/viewModel/viewModel'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { WrappingIndent } from 'vs/editor/common/config/editorOptions'; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; export class OutputPosition { _outputPositionBrand: void; @@ -57,785 +58,783 @@ export interface ISplitLine { getViewPositionOfModelPosition(deltaLineNumber: number, inputColumn: number): Position; } -class VisibleIdentitySplitLine implements ISplitLine { - - public static INSTANCE = new VisibleIdentitySplitLine(); +export class SplitLinesCollection { - private constructor() { } + private model: editorCommon.IModel; + private _validModelVersionId: number; - public isVisible(): boolean { - return true; - } + private wrappingColumn: number; + private columnsForFullWidthChar: number; + private wrappingIndent: WrappingIndent; + private tabSize: number; + private lines: ISplitLine[]; - public setVisible(isVisible: boolean): ISplitLine { - if (isVisible) { - return this; - } - return InvisibleIdentitySplitLine.INSTANCE; - } + private prefixSumComputer: PrefixSumComputerWithCache; - public getViewLineCount(): number { - return 1; - } + private linePositionMapperFactory: ILineMapperFactory; - public getViewLineContent(model: IModel, modelLineNumber: number, outputLineIndex: number): string { - return model.getLineContent(modelLineNumber); - } + private hiddenAreasIds: string[]; - public getViewLineMinColumn(model: IModel, modelLineNumber: number, outputLineIndex: number): number { - return model.getLineMinColumn(modelLineNumber); - } + constructor(model: editorCommon.IModel, linePositionMapperFactory: ILineMapperFactory, tabSize: number, wrappingColumn: number, columnsForFullWidthChar: number, wrappingIndent: WrappingIndent) { + this.model = model; + this._validModelVersionId = -1; + this.tabSize = tabSize; + this.wrappingColumn = wrappingColumn; + this.columnsForFullWidthChar = columnsForFullWidthChar; + this.wrappingIndent = wrappingIndent; + this.linePositionMapperFactory = linePositionMapperFactory; - public getViewLineMaxColumn(model: IModel, modelLineNumber: number, outputLineIndex: number): number { - return model.getLineMaxColumn(modelLineNumber); + this._constructLines(true); } - public getViewLineData(model: IModel, modelLineNumber: number, outputLineIndex: number): ViewLineData { - let lineTokens = model.getLineTokens(modelLineNumber); - let lineContent = lineTokens.getLineContent(); - return new ViewLineData( - lineContent, - 1, - lineContent.length + 1, - lineTokens.inflate() - ); + public dispose(): void { + this.hiddenAreasIds = this.model.deltaDecorations(this.hiddenAreasIds, []); } - public getViewLinesData(model: IModel, modelLineNumber: number, fromOuputLineIndex: number, toOutputLineIndex: number, globalStartIndex: number, needed: boolean[], result: ViewLineData[]): void { - if (!needed[globalStartIndex]) { - result[globalStartIndex] = null; - return; + private _ensureValidState(): void { + let modelVersion = this.model.getVersionId(); + if (modelVersion !== this._validModelVersionId) { + throw new Error('SplitLinesCollection: attempt to access a \'newer\' model'); } - result[globalStartIndex] = this.getViewLineData(model, modelLineNumber, 0); } - public getModelColumnOfViewPosition(outputLineIndex: number, outputColumn: number): number { - return outputColumn; - } + private _constructLines(resetHiddenAreas: boolean): void { + this.lines = []; - public getViewPositionOfModelPosition(deltaLineNumber: number, inputColumn: number): Position { - return new Position(deltaLineNumber, inputColumn); - } -} + if (resetHiddenAreas) { + this.hiddenAreasIds = []; + } -class InvisibleIdentitySplitLine implements ISplitLine { + let linesContent = this.model.getLinesContent(); + let lineCount = linesContent.length; + let values = new Uint32Array(lineCount); - public static INSTANCE = new InvisibleIdentitySplitLine(); + let hiddenAreas = this.hiddenAreasIds.map((areaId) => this.model.getDecorationRange(areaId)).sort(Range.compareRangesUsingStarts); + let hiddenAreaStart = 1, hiddenAreaEnd = 0; + let hiddenAreaIdx = -1; + let nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : lineCount + 2; - private constructor() { } + for (let i = 0; i < lineCount; i++) { + let lineNumber = i + 1; - public isVisible(): boolean { - return false; - } + if (lineNumber === nextLineNumberToUpdateHiddenArea) { + hiddenAreaIdx++; + hiddenAreaStart = hiddenAreas[hiddenAreaIdx].startLineNumber; + hiddenAreaEnd = hiddenAreas[hiddenAreaIdx].endLineNumber; + nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : lineCount + 2; + } - public setVisible(isVisible: boolean): ISplitLine { - if (!isVisible) { - return this; + let isInHiddenArea = (lineNumber >= hiddenAreaStart && lineNumber <= hiddenAreaEnd); + let line = createSplitLine(this.linePositionMapperFactory, linesContent[i], this.tabSize, this.wrappingColumn, this.columnsForFullWidthChar, this.wrappingIndent, !isInHiddenArea); + values[i] = line.getViewLineCount(); + this.lines[i] = line; } - return VisibleIdentitySplitLine.INSTANCE; - } - public getViewLineCount(): number { - return 0; - } + this._validModelVersionId = this.model.getVersionId(); - public getViewLineContent(model: IModel, modelLineNumber: number, outputLineIndex: number): string { - throw new Error('Not supported'); + this.prefixSumComputer = new PrefixSumComputerWithCache(values); } - public getViewLineMinColumn(model: IModel, modelLineNumber: number, outputLineIndex: number): number { - throw new Error('Not supported'); + private getHiddenAreas(): Range[] { + return this.hiddenAreasIds.map((decId) => { + return this.model.getDecorationRange(decId); + }).sort(Range.compareRangesUsingStarts); } - public getViewLineMaxColumn(model: IModel, modelLineNumber: number, outputLineIndex: number): number { - throw new Error('Not supported'); - } + private _reduceRanges(_ranges: Range[]): Range[] { + if (_ranges.length === 0) { + return []; + } + let ranges = _ranges.map(r => this.model.validateRange(r)).sort(Range.compareRangesUsingStarts); - public getViewLineData(model: IModel, modelLineNumber: number, outputLineIndex: number): ViewLineData { - throw new Error('Not supported'); - } + let result: Range[] = []; + let currentRangeStart = ranges[0].startLineNumber; + let currentRangeEnd = ranges[0].endLineNumber; - public getViewLinesData(model: IModel, modelLineNumber: number, fromOuputLineIndex: number, toOutputLineIndex: number, globalStartIndex: number, needed: boolean[], result: ViewLineData[]): void { - throw new Error('Not supported'); - } + for (let i = 1, len = ranges.length; i < len; i++) { + let range = ranges[i]; - public getModelColumnOfViewPosition(outputLineIndex: number, outputColumn: number): number { - throw new Error('Not supported'); + if (range.startLineNumber > currentRangeEnd + 1) { + result.push(new Range(currentRangeStart, 1, currentRangeEnd, 1)); + currentRangeStart = range.startLineNumber; + currentRangeEnd = range.endLineNumber; + } else if (range.endLineNumber > currentRangeEnd) { + currentRangeEnd = range.endLineNumber; + } + } + result.push(new Range(currentRangeStart, 1, currentRangeEnd, 1)); + return result; } - public getViewPositionOfModelPosition(deltaLineNumber: number, inputColumn: number): Position { - throw new Error('Not supported'); - } -} + public setHiddenAreas(_ranges: Range[]): boolean { -export class SplitLine implements ISplitLine { + let newRanges = this._reduceRanges(_ranges); - private positionMapper: ILineMapping; - private outputLineCount: number; + // BEGIN TODO@Martin: Please stop calling this method on each model change! + let oldRanges = this.hiddenAreasIds.map((areaId) => this.model.getDecorationRange(areaId)).sort(Range.compareRangesUsingStarts); - private wrappedIndent: string; - private wrappedIndentLength: number; - private _isVisible: boolean; + if (newRanges.length === oldRanges.length) { + let hasDifference = false; + for (let i = 0; i < newRanges.length; i++) { + if (!newRanges[i].equalsRange(oldRanges[i])) { + hasDifference = true; + break; + } + } + if (!hasDifference) { + return false; + } + } + // END TODO@Martin: Please stop calling this method on each model change! - constructor(positionMapper: ILineMapping, isVisible: boolean) { - this.positionMapper = positionMapper; - this.wrappedIndent = this.positionMapper.getWrappedLinesIndent(); - this.wrappedIndentLength = this.wrappedIndent.length; - this.outputLineCount = this.positionMapper.getOutputLineCount(); - this._isVisible = isVisible; - } + let newDecorations: editorCommon.IModelDeltaDecoration[] = []; + for (let i = 0; i < newRanges.length; i++) { + newDecorations.push({ + range: newRanges[i], + options: ModelDecorationOptions.EMPTY + }); + } - public isVisible(): boolean { - return this._isVisible; - } + this.hiddenAreasIds = this.model.deltaDecorations(this.hiddenAreasIds, newDecorations); - public setVisible(isVisible: boolean): ISplitLine { - this._isVisible = isVisible; - return this; - } + let hiddenAreas = newRanges; + let hiddenAreaStart = 1, hiddenAreaEnd = 0; + let hiddenAreaIdx = -1; + let nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : this.lines.length + 2; - public getViewLineCount(): number { - if (!this._isVisible) { - return 0; + for (let i = 0; i < this.lines.length; i++) { + let lineNumber = i + 1; + + if (lineNumber === nextLineNumberToUpdateHiddenArea) { + hiddenAreaIdx++; + hiddenAreaStart = hiddenAreas[hiddenAreaIdx].startLineNumber; + hiddenAreaEnd = hiddenAreas[hiddenAreaIdx].endLineNumber; + nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : this.lines.length + 2; + } + + let lineChanged = false; + if (lineNumber >= hiddenAreaStart && lineNumber <= hiddenAreaEnd) { + // Line should be hidden + if (this.lines[i].isVisible()) { + this.lines[i] = this.lines[i].setVisible(false); + lineChanged = true; + } + } else { + // Line should be visible + if (!this.lines[i].isVisible()) { + this.lines[i] = this.lines[i].setVisible(true); + lineChanged = true; + } + } + if (lineChanged) { + let newOutputLineCount = this.lines[i].getViewLineCount(); + this.prefixSumComputer.changeValue(i, newOutputLineCount); + } } - return this.outputLineCount; - } - private getInputStartOffsetOfOutputLineIndex(outputLineIndex: number): number { - return this.positionMapper.getInputOffsetOfOutputPosition(outputLineIndex, 0); + return true; } - private getInputEndOffsetOfOutputLineIndex(model: IModel, modelLineNumber: number, outputLineIndex: number): number { - if (outputLineIndex + 1 === this.outputLineCount) { - return model.getLineMaxColumn(modelLineNumber) - 1; + public modelPositionIsVisible(modelLineNumber: number, modelColumn: number): boolean { + if (modelLineNumber < 1 || modelLineNumber > this.lines.length) { + // invalid arguments + return false; } - return this.positionMapper.getInputOffsetOfOutputPosition(outputLineIndex + 1, 0); + return this.lines[modelLineNumber - 1].isVisible(); } - public getViewLineContent(model: IModel, modelLineNumber: number, outputLineIndex: number): string { - if (!this._isVisible) { - throw new Error('Not supported'); + public setTabSize(newTabSize: number): boolean { + if (this.tabSize === newTabSize) { + return false; } - let startOffset = this.getInputStartOffsetOfOutputLineIndex(outputLineIndex); - let endOffset = this.getInputEndOffsetOfOutputLineIndex(model, modelLineNumber, outputLineIndex); - let r = model.getLineContent(modelLineNumber).substring(startOffset, endOffset); + this.tabSize = newTabSize; - if (outputLineIndex > 0) { - r = this.wrappedIndent + r; - } + this._constructLines(false); - return r; + return true; } - public getViewLineMinColumn(model: IModel, modelLineNumber: number, outputLineIndex: number): number { - if (!this._isVisible) { - throw new Error('Not supported'); - } - if (outputLineIndex > 0) { - return this.wrappedIndentLength + 1; + public setWrappingSettings(wrappingIndent: WrappingIndent, wrappingColumn: number, columnsForFullWidthChar: number): boolean { + if (this.wrappingIndent === wrappingIndent && this.wrappingColumn === wrappingColumn && this.columnsForFullWidthChar === columnsForFullWidthChar) { + return false; } - return 1; - } - public getViewLineMaxColumn(model: IModel, modelLineNumber: number, outputLineIndex: number): number { - if (!this._isVisible) { - throw new Error('Not supported'); - } - return this.getViewLineContent(model, modelLineNumber, outputLineIndex).length + 1; - } + this.wrappingIndent = wrappingIndent; + this.wrappingColumn = wrappingColumn; + this.columnsForFullWidthChar = columnsForFullWidthChar; - public getViewLineData(model: IModel, modelLineNumber: number, outputLineIndex: number): ViewLineData { - if (!this._isVisible) { - throw new Error('Not supported'); - } + this._constructLines(false); - let startOffset = this.getInputStartOffsetOfOutputLineIndex(outputLineIndex); - let endOffset = this.getInputEndOffsetOfOutputLineIndex(model, modelLineNumber, outputLineIndex); + return true; + } - let lineContent = model.getLineContent(modelLineNumber).substring(startOffset, endOffset); - if (outputLineIndex > 0) { - lineContent = this.wrappedIndent + lineContent; + public onModelFlushed(): void { + this._constructLines(true); + } + + public onModelLinesDeleted(versionId: number, fromLineNumber: number, toLineNumber: number): viewEvents.ViewLinesDeletedEvent { + if (versionId <= this._validModelVersionId) { + // Here we check for versionId in case the lines were reconstructed in the meantime. + // We don't want to apply stale change events on top of a newer read model state. + return null; } - let minColumn = (outputLineIndex > 0 ? this.wrappedIndentLength + 1 : 1); - let maxColumn = lineContent.length + 1; + let outputFromLineNumber = (fromLineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(fromLineNumber - 2) + 1); + let outputToLineNumber = this.prefixSumComputer.getAccumulatedValue(toLineNumber - 1); - let deltaStartIndex = 0; - if (outputLineIndex > 0) { - deltaStartIndex = this.wrappedIndentLength; - } - let lineTokens = model.getLineTokens(modelLineNumber); + this.lines.splice(fromLineNumber - 1, toLineNumber - fromLineNumber + 1); + this.prefixSumComputer.removeValues(fromLineNumber - 1, toLineNumber - fromLineNumber + 1); - return new ViewLineData( - lineContent, - minColumn, - maxColumn, - lineTokens.sliceAndInflate(startOffset, endOffset, deltaStartIndex) - ); + return new viewEvents.ViewLinesDeletedEvent(outputFromLineNumber, outputToLineNumber); } - public getViewLinesData(model: IModel, modelLineNumber: number, fromOuputLineIndex: number, toOutputLineIndex: number, globalStartIndex: number, needed: boolean[], result: ViewLineData[]): void { - if (!this._isVisible) { - throw new Error('Not supported'); + public onModelLinesInserted(versionId: number, fromLineNumber: number, toLineNumber: number, text: string[]): viewEvents.ViewLinesInsertedEvent { + if (versionId <= this._validModelVersionId) { + // Here we check for versionId in case the lines were reconstructed in the meantime. + // We don't want to apply stale change events on top of a newer read model state. + return null; } - for (let outputLineIndex = fromOuputLineIndex; outputLineIndex < toOutputLineIndex; outputLineIndex++) { - let globalIndex = globalStartIndex + outputLineIndex - fromOuputLineIndex; - if (!needed[globalIndex]) { - result[globalIndex] = null; - continue; + let hiddenAreas = this.getHiddenAreas(); + let isInHiddenArea = false; + let testPosition = new Position(fromLineNumber, 1); + for (let i = 0; i < hiddenAreas.length; i++) { + if (hiddenAreas[i].containsPosition(testPosition)) { + isInHiddenArea = true; + break; } - result[globalIndex] = this.getViewLineData(model, modelLineNumber, outputLineIndex); } - } - public getModelColumnOfViewPosition(outputLineIndex: number, outputColumn: number): number { - if (!this._isVisible) { - throw new Error('Not supported'); - } - let adjustedColumn = outputColumn - 1; - if (outputLineIndex > 0) { - if (adjustedColumn < this.wrappedIndentLength) { - adjustedColumn = 0; - } else { - adjustedColumn -= this.wrappedIndentLength; - } - } - return this.positionMapper.getInputOffsetOfOutputPosition(outputLineIndex, adjustedColumn) + 1; - } + let outputFromLineNumber = (fromLineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(fromLineNumber - 2) + 1); - public getViewPositionOfModelPosition(deltaLineNumber: number, inputColumn: number): Position { - if (!this._isVisible) { - throw new Error('Not supported'); - } - let r = this.positionMapper.getOutputPositionOfInputOffset(inputColumn - 1); - let outputLineIndex = r.outputLineIndex; - let outputColumn = r.outputOffset + 1; + let totalOutputLineCount = 0; + let insertLines: ISplitLine[] = []; + let insertPrefixSumValues = new Uint32Array(text.length); - if (outputLineIndex > 0) { - outputColumn += this.wrappedIndentLength; + for (let i = 0, len = text.length; i < len; i++) { + let line = createSplitLine(this.linePositionMapperFactory, text[i], this.tabSize, this.wrappingColumn, this.columnsForFullWidthChar, this.wrappingIndent, !isInHiddenArea); + insertLines.push(line); + + let outputLineCount = line.getViewLineCount(); + totalOutputLineCount += outputLineCount; + insertPrefixSumValues[i] = outputLineCount; } - // console.log('in -> out ' + deltaLineNumber + ',' + inputColumn + ' ===> ' + (deltaLineNumber+outputLineIndex) + ',' + outputColumn); - return new Position(deltaLineNumber + outputLineIndex, outputColumn); + this.lines = this.lines.slice(0, fromLineNumber - 1).concat(insertLines).concat(this.lines.slice(fromLineNumber - 1)); + + this.prefixSumComputer.insertValues(fromLineNumber - 1, insertPrefixSumValues); + + return new viewEvents.ViewLinesInsertedEvent(outputFromLineNumber, outputFromLineNumber + totalOutputLineCount - 1); } -} -function createSplitLine(linePositionMapperFactory: ILineMapperFactory, text: string, tabSize: number, wrappingColumn: number, columnsForFullWidthChar: number, wrappingIndent: WrappingIndent, isVisible: boolean): ISplitLine { - let positionMapper = linePositionMapperFactory.createLineMapping(text, tabSize, wrappingColumn, columnsForFullWidthChar, wrappingIndent); - if (positionMapper === null) { - // No mapping needed - if (isVisible) { - return VisibleIdentitySplitLine.INSTANCE; + public onModelLineChanged(versionId: number, lineNumber: number, newText: string): [boolean, viewEvents.ViewLinesChangedEvent, viewEvents.ViewLinesInsertedEvent, viewEvents.ViewLinesDeletedEvent] { + if (versionId <= this._validModelVersionId) { + // Here we check for versionId in case the lines were reconstructed in the meantime. + // We don't want to apply stale change events on top of a newer read model state. + return [false, null, null, null]; } - return InvisibleIdentitySplitLine.INSTANCE; - } else { - return new SplitLine(positionMapper, isVisible); - } -} -export class SplitLinesCollection { + let lineIndex = lineNumber - 1; - private model: editorCommon.IModel; - private _validModelVersionId: number; + let oldOutputLineCount = this.lines[lineIndex].getViewLineCount(); + let isVisible = this.lines[lineIndex].isVisible(); + let line = createSplitLine(this.linePositionMapperFactory, newText, this.tabSize, this.wrappingColumn, this.columnsForFullWidthChar, this.wrappingIndent, isVisible); + this.lines[lineIndex] = line; + let newOutputLineCount = this.lines[lineIndex].getViewLineCount(); - private wrappingColumn: number; - private columnsForFullWidthChar: number; - private wrappingIndent: WrappingIndent; - private tabSize: number; - private lines: ISplitLine[]; + let lineMappingChanged = false; + let changeFrom = 0; + let changeTo = -1; + let insertFrom = 0; + let insertTo = -1; + let deleteFrom = 0; + let deleteTo = -1; - private prefixSumComputer: PrefixSumComputerWithCache; + if (oldOutputLineCount > newOutputLineCount) { + changeFrom = (lineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(lineNumber - 2) + 1); + changeTo = changeFrom + newOutputLineCount - 1; + deleteFrom = changeTo + 1; + deleteTo = deleteFrom + (oldOutputLineCount - newOutputLineCount) - 1; + lineMappingChanged = true; + } else if (oldOutputLineCount < newOutputLineCount) { + changeFrom = (lineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(lineNumber - 2) + 1); + changeTo = changeFrom + oldOutputLineCount - 1; + insertFrom = changeTo + 1; + insertTo = insertFrom + (newOutputLineCount - oldOutputLineCount) - 1; + lineMappingChanged = true; + } else { + changeFrom = (lineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(lineNumber - 2) + 1); + changeTo = changeFrom + newOutputLineCount - 1; + } - private linePositionMapperFactory: ILineMapperFactory; + this.prefixSumComputer.changeValue(lineIndex, newOutputLineCount); - private hiddenAreasIds: string[]; + const viewLinesChangedEvent = (changeFrom <= changeTo ? new viewEvents.ViewLinesChangedEvent(changeFrom, changeTo) : null); + const viewLinesInsertedEvent = (insertFrom <= insertTo ? new viewEvents.ViewLinesInsertedEvent(insertFrom, insertTo) : null); + const viewLinesDeletedEvent = (deleteFrom <= deleteTo ? new viewEvents.ViewLinesDeletedEvent(deleteFrom, deleteTo) : null); - constructor(model: editorCommon.IModel, linePositionMapperFactory: ILineMapperFactory, tabSize: number, wrappingColumn: number, columnsForFullWidthChar: number, wrappingIndent: WrappingIndent) { - this.model = model; - this._validModelVersionId = -1; - this.tabSize = tabSize; - this.wrappingColumn = wrappingColumn; - this.columnsForFullWidthChar = columnsForFullWidthChar; - this.wrappingIndent = wrappingIndent; - this.linePositionMapperFactory = linePositionMapperFactory; + return [lineMappingChanged, viewLinesChangedEvent, viewLinesInsertedEvent, viewLinesDeletedEvent]; + } - this._constructLines(true); + public acceptVersionId(versionId: number): void { + this._validModelVersionId = versionId; } - public dispose(): void { - this.hiddenAreasIds = this.model.deltaDecorations(this.hiddenAreasIds, []); + public getViewLineCount(): number { + this._ensureValidState(); + return this.prefixSumComputer.getTotalValue(); } - private _ensureValidState(): void { - let modelVersion = this.model.getVersionId(); - if (modelVersion !== this._validModelVersionId) { - throw new Error('SplitLinesCollection: attempt to access a \'newer\' model'); + private _toValidViewLineNumber(viewLineNumber: number): number { + if (viewLineNumber < 1) { + return 1; + } + let viewLineCount = this.getViewLineCount(); + if (viewLineNumber > viewLineCount) { + return viewLineCount; } + return viewLineNumber; } - private _constructLines(resetHiddenAreas: boolean): void { - this.lines = []; + /** + * Gives a hint that a lot of requests are about to come in for these line numbers. + */ + public warmUpLookupCache(viewStartLineNumber: number, viewEndLineNumber: number): void { + this.prefixSumComputer.warmUpCache(viewStartLineNumber - 1, viewEndLineNumber - 1); + } - if (resetHiddenAreas) { - this.hiddenAreasIds = []; - } + public getViewLineIndentGuide(viewLineNumber: number): number { + this._ensureValidState(); + viewLineNumber = this._toValidViewLineNumber(viewLineNumber); + let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); + return this.model.getLineIndentGuide(r.index + 1); + } - let linesContent = this.model.getLinesContent(); - let lineCount = linesContent.length; - let values = new Uint32Array(lineCount); + public getViewLineContent(viewLineNumber: number): string { + this._ensureValidState(); + viewLineNumber = this._toValidViewLineNumber(viewLineNumber); + let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); + let lineIndex = r.index; + let remainder = r.remainder; - let hiddenAreas = this.hiddenAreasIds.map((areaId) => this.model.getDecorationRange(areaId)).sort(Range.compareRangesUsingStarts); - let hiddenAreaStart = 1, hiddenAreaEnd = 0; - let hiddenAreaIdx = -1; - let nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : lineCount + 2; + return this.lines[lineIndex].getViewLineContent(this.model, lineIndex + 1, remainder); + } - for (let i = 0; i < lineCount; i++) { - let lineNumber = i + 1; + public getViewLineMinColumn(viewLineNumber: number): number { + this._ensureValidState(); + viewLineNumber = this._toValidViewLineNumber(viewLineNumber); + let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); + let lineIndex = r.index; + let remainder = r.remainder; - if (lineNumber === nextLineNumberToUpdateHiddenArea) { - hiddenAreaIdx++; - hiddenAreaStart = hiddenAreas[hiddenAreaIdx].startLineNumber; - hiddenAreaEnd = hiddenAreas[hiddenAreaIdx].endLineNumber; - nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : lineCount + 2; - } + return this.lines[lineIndex].getViewLineMinColumn(this.model, lineIndex + 1, remainder); + } - let isInHiddenArea = (lineNumber >= hiddenAreaStart && lineNumber <= hiddenAreaEnd); - let line = createSplitLine(this.linePositionMapperFactory, linesContent[i], this.tabSize, this.wrappingColumn, this.columnsForFullWidthChar, this.wrappingIndent, !isInHiddenArea); - values[i] = line.getViewLineCount(); - this.lines[i] = line; - } + public getViewLineMaxColumn(viewLineNumber: number): number { + this._ensureValidState(); + viewLineNumber = this._toValidViewLineNumber(viewLineNumber); + let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); + let lineIndex = r.index; + let remainder = r.remainder; - this._validModelVersionId = this.model.getVersionId(); + return this.lines[lineIndex].getViewLineMaxColumn(this.model, lineIndex + 1, remainder); + } - this.prefixSumComputer = new PrefixSumComputerWithCache(values); - } + public getViewLineData(viewLineNumber: number): ViewLineData { + this._ensureValidState(); + viewLineNumber = this._toValidViewLineNumber(viewLineNumber); + let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); + let lineIndex = r.index; + let remainder = r.remainder; - private getHiddenAreas(): Range[] { - return this.hiddenAreasIds.map((decId) => { - return this.model.getDecorationRange(decId); - }).sort(Range.compareRangesUsingStarts); + return this.lines[lineIndex].getViewLineData(this.model, lineIndex + 1, remainder); } - private _reduceRanges(_ranges: Range[]): Range[] { - if (_ranges.length === 0) { - return []; - } - let ranges = _ranges.map(r => this.model.validateRange(r)).sort(Range.compareRangesUsingStarts); + public getViewLinesData(viewStartLineNumber: number, viewEndLineNumber: number, needed: boolean[]): ViewLineData[] { + this._ensureValidState(); - let result: Range[] = []; - let currentRangeStart = ranges[0].startLineNumber; - let currentRangeEnd = ranges[0].endLineNumber; + viewStartLineNumber = this._toValidViewLineNumber(viewStartLineNumber); + viewEndLineNumber = this._toValidViewLineNumber(viewEndLineNumber); - for (let i = 1, len = ranges.length; i < len; i++) { - let range = ranges[i]; + let start = this.prefixSumComputer.getIndexOf(viewStartLineNumber - 1); + let viewLineNumber = viewStartLineNumber; + let startModelLineIndex = start.index; + let startRemainder = start.remainder; - if (range.startLineNumber > currentRangeEnd + 1) { - result.push(new Range(currentRangeStart, 1, currentRangeEnd, 1)); - currentRangeStart = range.startLineNumber; - currentRangeEnd = range.endLineNumber; - } else if (range.endLineNumber > currentRangeEnd) { - currentRangeEnd = range.endLineNumber; + let result: ViewLineData[] = []; + for (let modelLineIndex = startModelLineIndex, len = this.model.getLineCount(); modelLineIndex < len; modelLineIndex++) { + let line = this.lines[modelLineIndex]; + if (!line.isVisible()) { + continue; } - } - result.push(new Range(currentRangeStart, 1, currentRangeEnd, 1)); - return result; - } + let fromViewLineIndex = (modelLineIndex === startModelLineIndex ? startRemainder : 0); + let remainingViewLineCount = line.getViewLineCount() - fromViewLineIndex; - public setHiddenAreas(eventsCollector: ViewEventsCollector, _ranges: Range[]): boolean { + let lastLine = false; + if (viewLineNumber + remainingViewLineCount > viewEndLineNumber) { + lastLine = true; + remainingViewLineCount = viewEndLineNumber - viewLineNumber + 1; + } + let toViewLineIndex = fromViewLineIndex + remainingViewLineCount; - let newRanges = this._reduceRanges(_ranges); + line.getViewLinesData(this.model, modelLineIndex + 1, fromViewLineIndex, toViewLineIndex, viewLineNumber - viewStartLineNumber, needed, result); - // BEGIN TODO@Martin: Please stop calling this method on each model change! - let oldRanges = this.hiddenAreasIds.map((areaId) => this.model.getDecorationRange(areaId)).sort(Range.compareRangesUsingStarts); + viewLineNumber += remainingViewLineCount; - if (newRanges.length === oldRanges.length) { - let hasDifference = false; - for (let i = 0; i < newRanges.length; i++) { - if (!newRanges[i].equalsRange(oldRanges[i])) { - hasDifference = true; - break; - } - } - if (!hasDifference) { - return false; + if (lastLine) { + break; } } - // END TODO@Martin: Please stop calling this method on each model change! - - let newDecorations: editorCommon.IModelDeltaDecoration[] = []; - for (let i = 0; i < newRanges.length; i++) { - newDecorations.push({ - range: newRanges[i], - options: { - } - }); - } - this.hiddenAreasIds = this.model.deltaDecorations(this.hiddenAreasIds, newDecorations); + return result; + } - let hiddenAreas = newRanges; - let hiddenAreaStart = 1, hiddenAreaEnd = 0; - let hiddenAreaIdx = -1; - let nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : this.lines.length + 2; + public validateViewPosition(viewLineNumber: number, viewColumn: number, expectedModelPosition: Position): Position { + this._ensureValidState(); + viewLineNumber = this._toValidViewLineNumber(viewLineNumber); - for (let i = 0; i < this.lines.length; i++) { - let lineNumber = i + 1; + let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); + let lineIndex = r.index; + let remainder = r.remainder; - if (lineNumber === nextLineNumberToUpdateHiddenArea) { - hiddenAreaIdx++; - hiddenAreaStart = hiddenAreas[hiddenAreaIdx].startLineNumber; - hiddenAreaEnd = hiddenAreas[hiddenAreaIdx].endLineNumber; - nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : this.lines.length + 2; - } + let line = this.lines[lineIndex]; - let lineChanged = false; - if (lineNumber >= hiddenAreaStart && lineNumber <= hiddenAreaEnd) { - // Line should be hidden - if (this.lines[i].isVisible()) { - this.lines[i] = this.lines[i].setVisible(false); - lineChanged = true; - } - } else { - // Line should be visible - if (!this.lines[i].isVisible()) { - this.lines[i] = this.lines[i].setVisible(true); - lineChanged = true; - } - } - if (lineChanged) { - let newOutputLineCount = this.lines[i].getViewLineCount(); - this.prefixSumComputer.changeValue(i, newOutputLineCount); - } + let minColumn = line.getViewLineMinColumn(this.model, lineIndex + 1, remainder); + let maxColumn = line.getViewLineMaxColumn(this.model, lineIndex + 1, remainder); + if (viewColumn < minColumn) { + viewColumn = minColumn; + } + if (viewColumn > maxColumn) { + viewColumn = maxColumn; } - eventsCollector.emit(new viewEvents.ViewFlushedEvent()); - return true; - } + let computedModelColumn = line.getModelColumnOfViewPosition(remainder, viewColumn); + let computedModelPosition = this.model.validatePosition(new Position(lineIndex + 1, computedModelColumn)); - public modelPositionIsVisible(modelLineNumber: number, modelColumn: number): boolean { - if (modelLineNumber < 1 || modelLineNumber > this.lines.length) { - // invalid arguments - return false; + if (computedModelPosition.equals(expectedModelPosition)) { + return new Position(viewLineNumber, viewColumn); } - return this.lines[modelLineNumber - 1].isVisible(); + + return this.convertModelPositionToViewPosition(expectedModelPosition.lineNumber, expectedModelPosition.column); } - public setTabSize(eventsCollector: ViewEventsCollector, newTabSize: number): boolean { - if (this.tabSize === newTabSize) { - return false; - } - this.tabSize = newTabSize; + public convertViewPositionToModelPosition(viewLineNumber: number, viewColumn: number): Position { + this._ensureValidState(); + viewLineNumber = this._toValidViewLineNumber(viewLineNumber); - this._constructLines(false); - eventsCollector.emit(new viewEvents.ViewFlushedEvent()); + let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); + let lineIndex = r.index; + let remainder = r.remainder; - return true; + let inputColumn = this.lines[lineIndex].getModelColumnOfViewPosition(remainder, viewColumn); + // console.log('out -> in ' + viewLineNumber + ',' + viewColumn + ' ===> ' + (lineIndex+1) + ',' + inputColumn); + return this.model.validatePosition(new Position(lineIndex + 1, inputColumn)); } - public setWrappingIndent(eventsCollector: ViewEventsCollector, newWrappingIndent: WrappingIndent): boolean { - if (this.wrappingIndent === newWrappingIndent) { - return false; - } - this.wrappingIndent = newWrappingIndent; + public convertModelPositionToViewPosition(_modelLineNumber: number, _modelColumn: number): Position { + this._ensureValidState(); - this._constructLines(false); - eventsCollector.emit(new viewEvents.ViewFlushedEvent()); + let validPosition = this.model.validatePosition(new Position(_modelLineNumber, _modelColumn)); + let inputLineNumber = validPosition.lineNumber; + let inputColumn = validPosition.column; - return true; - } + let lineIndex = inputLineNumber - 1, lineIndexChanged = false; + while (lineIndex > 0 && !this.lines[lineIndex].isVisible()) { + lineIndex--; + lineIndexChanged = true; + } + if (lineIndex === 0 && !this.lines[lineIndex].isVisible()) { + // Could not reach a real line + // console.log('in -> out ' + inputLineNumber + ',' + inputColumn + ' ===> ' + 1 + ',' + 1); + return new Position(1, 1); + } + let deltaLineNumber = 1 + (lineIndex === 0 ? 0 : this.prefixSumComputer.getAccumulatedValue(lineIndex - 1)); - public setWrappingColumn(eventsCollector: ViewEventsCollector, newWrappingColumn: number, columnsForFullWidthChar: number): boolean { - if (this.wrappingColumn === newWrappingColumn && this.columnsForFullWidthChar === columnsForFullWidthChar) { - return false; + let r: Position; + if (lineIndexChanged) { + r = this.lines[lineIndex].getViewPositionOfModelPosition(deltaLineNumber, this.model.getLineMaxColumn(lineIndex + 1)); + } else { + r = this.lines[inputLineNumber - 1].getViewPositionOfModelPosition(deltaLineNumber, inputColumn); } - this.wrappingColumn = newWrappingColumn; - this.columnsForFullWidthChar = columnsForFullWidthChar; - this._constructLines(false); - eventsCollector.emit(new viewEvents.ViewFlushedEvent()); - return true; + // console.log('in -> out ' + inputLineNumber + ',' + inputColumn + ' ===> ' + r.lineNumber + ',' + r); + return r; } +} - public onModelFlushed(eventsCollector: ViewEventsCollector): void { - this._constructLines(true); - eventsCollector.emit(new viewEvents.ViewFlushedEvent()); - } +class VisibleIdentitySplitLine implements ISplitLine { - public onModelLinesDeleted(eventsCollector: ViewEventsCollector, fromLineNumber: number, toLineNumber: number): void { - let outputFromLineNumber = (fromLineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(fromLineNumber - 2) + 1); - let outputToLineNumber = this.prefixSumComputer.getAccumulatedValue(toLineNumber - 1); + public static INSTANCE = new VisibleIdentitySplitLine(); - this.lines.splice(fromLineNumber - 1, toLineNumber - fromLineNumber + 1); - this.prefixSumComputer.removeValues(fromLineNumber - 1, toLineNumber - fromLineNumber + 1); + private constructor() { } - eventsCollector.emit(new viewEvents.ViewLinesDeletedEvent(outputFromLineNumber, outputToLineNumber)); + public isVisible(): boolean { + return true; } - public onModelLinesInserted(eventsCollector: ViewEventsCollector, fromLineNumber: number, toLineNumber: number, text: string[]): void { - let hiddenAreas = this.getHiddenAreas(); - let isInHiddenArea = false; - let testPosition = new Position(fromLineNumber, 1); - for (let i = 0; i < hiddenAreas.length; i++) { - if (hiddenAreas[i].containsPosition(testPosition)) { - isInHiddenArea = true; - break; - } + public setVisible(isVisible: boolean): ISplitLine { + if (isVisible) { + return this; } + return InvisibleIdentitySplitLine.INSTANCE; + } - let outputFromLineNumber = (fromLineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(fromLineNumber - 2) + 1); + public getViewLineCount(): number { + return 1; + } - let totalOutputLineCount = 0; - let insertLines: ISplitLine[] = []; - let insertPrefixSumValues = new Uint32Array(text.length); + public getViewLineContent(model: IModel, modelLineNumber: number, outputLineIndex: number): string { + return model.getLineContent(modelLineNumber); + } - for (let i = 0, len = text.length; i < len; i++) { - let line = createSplitLine(this.linePositionMapperFactory, text[i], this.tabSize, this.wrappingColumn, this.columnsForFullWidthChar, this.wrappingIndent, !isInHiddenArea); - insertLines.push(line); + public getViewLineMinColumn(model: IModel, modelLineNumber: number, outputLineIndex: number): number { + return model.getLineMinColumn(modelLineNumber); + } - let outputLineCount = line.getViewLineCount(); - totalOutputLineCount += outputLineCount; - insertPrefixSumValues[i] = outputLineCount; - } + public getViewLineMaxColumn(model: IModel, modelLineNumber: number, outputLineIndex: number): number { + return model.getLineMaxColumn(modelLineNumber); + } - this.lines = this.lines.slice(0, fromLineNumber - 1).concat(insertLines).concat(this.lines.slice(fromLineNumber - 1)); + public getViewLineData(model: IModel, modelLineNumber: number, outputLineIndex: number): ViewLineData { + let lineTokens = model.getLineTokens(modelLineNumber); + let lineContent = lineTokens.getLineContent(); + return new ViewLineData( + lineContent, + 1, + lineContent.length + 1, + lineTokens.inflate() + ); + } - this.prefixSumComputer.insertValues(fromLineNumber - 1, insertPrefixSumValues); + public getViewLinesData(model: IModel, modelLineNumber: number, fromOuputLineIndex: number, toOutputLineIndex: number, globalStartIndex: number, needed: boolean[], result: ViewLineData[]): void { + if (!needed[globalStartIndex]) { + result[globalStartIndex] = null; + return; + } + result[globalStartIndex] = this.getViewLineData(model, modelLineNumber, 0); + } - eventsCollector.emit(new viewEvents.ViewLinesInsertedEvent(outputFromLineNumber, outputFromLineNumber + totalOutputLineCount - 1)); + public getModelColumnOfViewPosition(outputLineIndex: number, outputColumn: number): number { + return outputColumn; } - public onModelLineChanged(eventsCollector: ViewEventsCollector, lineNumber: number, newText: string): boolean { - let lineIndex = lineNumber - 1; + public getViewPositionOfModelPosition(deltaLineNumber: number, inputColumn: number): Position { + return new Position(deltaLineNumber, inputColumn); + } +} - let oldOutputLineCount = this.lines[lineIndex].getViewLineCount(); - let isVisible = this.lines[lineIndex].isVisible(); - let line = createSplitLine(this.linePositionMapperFactory, newText, this.tabSize, this.wrappingColumn, this.columnsForFullWidthChar, this.wrappingIndent, isVisible); - this.lines[lineIndex] = line; - let newOutputLineCount = this.lines[lineIndex].getViewLineCount(); +class InvisibleIdentitySplitLine implements ISplitLine { - let lineMappingChanged = false; - let changeFrom = 0; - let changeTo = -1; - let insertFrom = 0; - let insertTo = -1; - let deleteFrom = 0; - let deleteTo = -1; + public static INSTANCE = new InvisibleIdentitySplitLine(); - if (oldOutputLineCount > newOutputLineCount) { - changeFrom = (lineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(lineNumber - 2) + 1); - changeTo = changeFrom + newOutputLineCount - 1; - deleteFrom = changeTo + 1; - deleteTo = deleteFrom + (oldOutputLineCount - newOutputLineCount) - 1; - lineMappingChanged = true; - } else if (oldOutputLineCount < newOutputLineCount) { - changeFrom = (lineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(lineNumber - 2) + 1); - changeTo = changeFrom + oldOutputLineCount - 1; - insertFrom = changeTo + 1; - insertTo = insertFrom + (newOutputLineCount - oldOutputLineCount) - 1; - lineMappingChanged = true; - } else { - changeFrom = (lineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(lineNumber - 2) + 1); - changeTo = changeFrom + newOutputLineCount - 1; - } + private constructor() { } - this.prefixSumComputer.changeValue(lineIndex, newOutputLineCount); + public isVisible(): boolean { + return false; + } - if (changeFrom <= changeTo) { - eventsCollector.emit(new viewEvents.ViewLinesChangedEvent(changeFrom, changeTo)); - } - if (insertFrom <= insertTo) { - eventsCollector.emit(new viewEvents.ViewLinesInsertedEvent(insertFrom, insertTo)); - } - if (deleteFrom <= deleteTo) { - eventsCollector.emit(new viewEvents.ViewLinesDeletedEvent(deleteFrom, deleteTo)); + public setVisible(isVisible: boolean): ISplitLine { + if (!isVisible) { + return this; } + return VisibleIdentitySplitLine.INSTANCE; + } - return lineMappingChanged; + public getViewLineCount(): number { + return 0; } - public acceptVersionId(versionId: number): void { - this._validModelVersionId = versionId; + public getViewLineContent(model: IModel, modelLineNumber: number, outputLineIndex: number): string { + throw new Error('Not supported'); } - public getViewLineCount(): number { - this._ensureValidState(); - return this.prefixSumComputer.getTotalValue(); + public getViewLineMinColumn(model: IModel, modelLineNumber: number, outputLineIndex: number): number { + throw new Error('Not supported'); } - private _toValidViewLineNumber(viewLineNumber: number): number { - if (viewLineNumber < 1) { - return 1; - } - let viewLineCount = this.getViewLineCount(); - if (viewLineNumber > viewLineCount) { - return viewLineCount; - } - return viewLineNumber; + public getViewLineMaxColumn(model: IModel, modelLineNumber: number, outputLineIndex: number): number { + throw new Error('Not supported'); } - /** - * Gives a hint that a lot of requests are about to come in for these line numbers. - */ - public warmUpLookupCache(viewStartLineNumber: number, viewEndLineNumber: number): void { - this.prefixSumComputer.warmUpCache(viewStartLineNumber - 1, viewEndLineNumber - 1); + public getViewLineData(model: IModel, modelLineNumber: number, outputLineIndex: number): ViewLineData { + throw new Error('Not supported'); } - public getViewLineIndentGuide(viewLineNumber: number): number { - this._ensureValidState(); - viewLineNumber = this._toValidViewLineNumber(viewLineNumber); - let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); - return this.model.getLineIndentGuide(r.index + 1); + public getViewLinesData(model: IModel, modelLineNumber: number, fromOuputLineIndex: number, toOutputLineIndex: number, globalStartIndex: number, needed: boolean[], result: ViewLineData[]): void { + throw new Error('Not supported'); } - public getViewLineContent(viewLineNumber: number): string { - this._ensureValidState(); - viewLineNumber = this._toValidViewLineNumber(viewLineNumber); - let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); - let lineIndex = r.index; - let remainder = r.remainder; + public getModelColumnOfViewPosition(outputLineIndex: number, outputColumn: number): number { + throw new Error('Not supported'); + } - return this.lines[lineIndex].getViewLineContent(this.model, lineIndex + 1, remainder); + public getViewPositionOfModelPosition(deltaLineNumber: number, inputColumn: number): Position { + throw new Error('Not supported'); } +} - public getViewLineMinColumn(viewLineNumber: number): number { - this._ensureValidState(); - viewLineNumber = this._toValidViewLineNumber(viewLineNumber); - let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); - let lineIndex = r.index; - let remainder = r.remainder; +export class SplitLine implements ISplitLine { - return this.lines[lineIndex].getViewLineMinColumn(this.model, lineIndex + 1, remainder); - } + private positionMapper: ILineMapping; + private outputLineCount: number; - public getViewLineMaxColumn(viewLineNumber: number): number { - this._ensureValidState(); - viewLineNumber = this._toValidViewLineNumber(viewLineNumber); - let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); - let lineIndex = r.index; - let remainder = r.remainder; + private wrappedIndent: string; + private wrappedIndentLength: number; + private _isVisible: boolean; - return this.lines[lineIndex].getViewLineMaxColumn(this.model, lineIndex + 1, remainder); + constructor(positionMapper: ILineMapping, isVisible: boolean) { + this.positionMapper = positionMapper; + this.wrappedIndent = this.positionMapper.getWrappedLinesIndent(); + this.wrappedIndentLength = this.wrappedIndent.length; + this.outputLineCount = this.positionMapper.getOutputLineCount(); + this._isVisible = isVisible; } - public getViewLineData(viewLineNumber: number): ViewLineData { - this._ensureValidState(); - viewLineNumber = this._toValidViewLineNumber(viewLineNumber); - let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); - let lineIndex = r.index; - let remainder = r.remainder; - - return this.lines[lineIndex].getViewLineData(this.model, lineIndex + 1, remainder); + public isVisible(): boolean { + return this._isVisible; } - public getViewLinesData(viewStartLineNumber: number, viewEndLineNumber: number, needed: boolean[]): ViewLineData[] { - this._ensureValidState(); + public setVisible(isVisible: boolean): ISplitLine { + this._isVisible = isVisible; + return this; + } - viewStartLineNumber = this._toValidViewLineNumber(viewStartLineNumber); - viewEndLineNumber = this._toValidViewLineNumber(viewEndLineNumber); + public getViewLineCount(): number { + if (!this._isVisible) { + return 0; + } + return this.outputLineCount; + } - let start = this.prefixSumComputer.getIndexOf(viewStartLineNumber - 1); - let viewLineNumber = viewStartLineNumber; - let startModelLineIndex = start.index; - let startRemainder = start.remainder; + private getInputStartOffsetOfOutputLineIndex(outputLineIndex: number): number { + return this.positionMapper.getInputOffsetOfOutputPosition(outputLineIndex, 0); + } - let result: ViewLineData[] = []; - for (let modelLineIndex = startModelLineIndex, len = this.model.getLineCount(); modelLineIndex < len; modelLineIndex++) { - let line = this.lines[modelLineIndex]; - if (!line.isVisible()) { - continue; - } - let fromViewLineIndex = (modelLineIndex === startModelLineIndex ? startRemainder : 0); - let remainingViewLineCount = line.getViewLineCount() - fromViewLineIndex; + private getInputEndOffsetOfOutputLineIndex(model: IModel, modelLineNumber: number, outputLineIndex: number): number { + if (outputLineIndex + 1 === this.outputLineCount) { + return model.getLineMaxColumn(modelLineNumber) - 1; + } + return this.positionMapper.getInputOffsetOfOutputPosition(outputLineIndex + 1, 0); + } - let lastLine = false; - if (viewLineNumber + remainingViewLineCount > viewEndLineNumber) { - lastLine = true; - remainingViewLineCount = viewEndLineNumber - viewLineNumber + 1; - } - let toViewLineIndex = fromViewLineIndex + remainingViewLineCount; + public getViewLineContent(model: IModel, modelLineNumber: number, outputLineIndex: number): string { + if (!this._isVisible) { + throw new Error('Not supported'); + } + let startOffset = this.getInputStartOffsetOfOutputLineIndex(outputLineIndex); + let endOffset = this.getInputEndOffsetOfOutputLineIndex(model, modelLineNumber, outputLineIndex); + let r = model.getLineContent(modelLineNumber).substring(startOffset, endOffset); - line.getViewLinesData(this.model, modelLineIndex + 1, fromViewLineIndex, toViewLineIndex, viewLineNumber - viewStartLineNumber, needed, result); + if (outputLineIndex > 0) { + r = this.wrappedIndent + r; + } - viewLineNumber += remainingViewLineCount; + return r; + } - if (lastLine) { - break; - } + public getViewLineMinColumn(model: IModel, modelLineNumber: number, outputLineIndex: number): number { + if (!this._isVisible) { + throw new Error('Not supported'); } - - return result; + if (outputLineIndex > 0) { + return this.wrappedIndentLength + 1; + } + return 1; } - public validateViewPosition(viewLineNumber: number, viewColumn: number, expectedModelPosition: Position): Position { - this._ensureValidState(); - viewLineNumber = this._toValidViewLineNumber(viewLineNumber); + public getViewLineMaxColumn(model: IModel, modelLineNumber: number, outputLineIndex: number): number { + if (!this._isVisible) { + throw new Error('Not supported'); + } + return this.getViewLineContent(model, modelLineNumber, outputLineIndex).length + 1; + } - let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); - let lineIndex = r.index; - let remainder = r.remainder; + public getViewLineData(model: IModel, modelLineNumber: number, outputLineIndex: number): ViewLineData { + if (!this._isVisible) { + throw new Error('Not supported'); + } - let line = this.lines[lineIndex]; + let startOffset = this.getInputStartOffsetOfOutputLineIndex(outputLineIndex); + let endOffset = this.getInputEndOffsetOfOutputLineIndex(model, modelLineNumber, outputLineIndex); - let minColumn = line.getViewLineMinColumn(this.model, lineIndex + 1, remainder); - let maxColumn = line.getViewLineMaxColumn(this.model, lineIndex + 1, remainder); - if (viewColumn < minColumn) { - viewColumn = minColumn; - } - if (viewColumn > maxColumn) { - viewColumn = maxColumn; + let lineContent = model.getLineContent(modelLineNumber).substring(startOffset, endOffset); + if (outputLineIndex > 0) { + lineContent = this.wrappedIndent + lineContent; } - let computedModelColumn = line.getModelColumnOfViewPosition(remainder, viewColumn); - let computedModelPosition = this.model.validatePosition(new Position(lineIndex + 1, computedModelColumn)); + let minColumn = (outputLineIndex > 0 ? this.wrappedIndentLength + 1 : 1); + let maxColumn = lineContent.length + 1; - if (computedModelPosition.equals(expectedModelPosition)) { - return new Position(viewLineNumber, viewColumn); + let deltaStartIndex = 0; + if (outputLineIndex > 0) { + deltaStartIndex = this.wrappedIndentLength; } + let lineTokens = model.getLineTokens(modelLineNumber); - return this.convertModelPositionToViewPosition(expectedModelPosition.lineNumber, expectedModelPosition.column); + return new ViewLineData( + lineContent, + minColumn, + maxColumn, + lineTokens.sliceAndInflate(startOffset, endOffset, deltaStartIndex) + ); } - public convertViewPositionToModelPosition(viewLineNumber: number, viewColumn: number): Position { - this._ensureValidState(); - viewLineNumber = this._toValidViewLineNumber(viewLineNumber); - - let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); - let lineIndex = r.index; - let remainder = r.remainder; + public getViewLinesData(model: IModel, modelLineNumber: number, fromOuputLineIndex: number, toOutputLineIndex: number, globalStartIndex: number, needed: boolean[], result: ViewLineData[]): void { + if (!this._isVisible) { + throw new Error('Not supported'); + } - let inputColumn = this.lines[lineIndex].getModelColumnOfViewPosition(remainder, viewColumn); - // console.log('out -> in ' + viewLineNumber + ',' + viewColumn + ' ===> ' + (lineIndex+1) + ',' + inputColumn); - return this.model.validatePosition(new Position(lineIndex + 1, inputColumn)); + for (let outputLineIndex = fromOuputLineIndex; outputLineIndex < toOutputLineIndex; outputLineIndex++) { + let globalIndex = globalStartIndex + outputLineIndex - fromOuputLineIndex; + if (!needed[globalIndex]) { + result[globalIndex] = null; + continue; + } + result[globalIndex] = this.getViewLineData(model, modelLineNumber, outputLineIndex); + } } - public convertModelPositionToViewPosition(_modelLineNumber: number, _modelColumn: number): Position { - this._ensureValidState(); - - let validPosition = this.model.validatePosition(new Position(_modelLineNumber, _modelColumn)); - let inputLineNumber = validPosition.lineNumber; - let inputColumn = validPosition.column; - - let lineIndex = inputLineNumber - 1, lineIndexChanged = false; - while (lineIndex > 0 && !this.lines[lineIndex].isVisible()) { - lineIndex--; - lineIndexChanged = true; + public getModelColumnOfViewPosition(outputLineIndex: number, outputColumn: number): number { + if (!this._isVisible) { + throw new Error('Not supported'); } - if (lineIndex === 0 && !this.lines[lineIndex].isVisible()) { - // Could not reach a real line - // console.log('in -> out ' + inputLineNumber + ',' + inputColumn + ' ===> ' + 1 + ',' + 1); - return new Position(1, 1); + let adjustedColumn = outputColumn - 1; + if (outputLineIndex > 0) { + if (adjustedColumn < this.wrappedIndentLength) { + adjustedColumn = 0; + } else { + adjustedColumn -= this.wrappedIndentLength; + } } - let deltaLineNumber = 1 + (lineIndex === 0 ? 0 : this.prefixSumComputer.getAccumulatedValue(lineIndex - 1)); + return this.positionMapper.getInputOffsetOfOutputPosition(outputLineIndex, adjustedColumn) + 1; + } - let r: Position; - if (lineIndexChanged) { - r = this.lines[lineIndex].getViewPositionOfModelPosition(deltaLineNumber, this.model.getLineMaxColumn(lineIndex + 1)); - } else { - r = this.lines[inputLineNumber - 1].getViewPositionOfModelPosition(deltaLineNumber, inputColumn); + public getViewPositionOfModelPosition(deltaLineNumber: number, inputColumn: number): Position { + if (!this._isVisible) { + throw new Error('Not supported'); } + let r = this.positionMapper.getOutputPositionOfInputOffset(inputColumn - 1); + let outputLineIndex = r.outputLineIndex; + let outputColumn = r.outputOffset + 1; - // console.log('in -> out ' + inputLineNumber + ',' + inputColumn + ' ===> ' + r.lineNumber + ',' + r); - return r; + if (outputLineIndex > 0) { + outputColumn += this.wrappedIndentLength; + } + + // console.log('in -> out ' + deltaLineNumber + ',' + inputColumn + ' ===> ' + (deltaLineNumber+outputLineIndex) + ',' + outputColumn); + return new Position(deltaLineNumber + outputLineIndex, outputColumn); + } +} + +function createSplitLine(linePositionMapperFactory: ILineMapperFactory, text: string, tabSize: number, wrappingColumn: number, columnsForFullWidthChar: number, wrappingIndent: WrappingIndent, isVisible: boolean): ISplitLine { + let positionMapper = linePositionMapperFactory.createLineMapping(text, tabSize, wrappingColumn, columnsForFullWidthChar, wrappingIndent); + if (positionMapper === null) { + // No mapping needed + if (isVisible) { + return VisibleIdentitySplitLine.INSTANCE; + } + return InvisibleIdentitySplitLine.INSTANCE; + } else { + return new SplitLine(positionMapper, isVisible); } } diff --git a/src/vs/editor/common/viewModel/viewEventHandler.ts b/src/vs/editor/common/viewModel/viewEventHandler.ts index ff0ec8c10d9d9..a3e03e9005deb 100644 --- a/src/vs/editor/common/viewModel/viewEventHandler.ts +++ b/src/vs/editor/common/viewModel/viewEventHandler.ts @@ -37,10 +37,7 @@ export class ViewEventHandler extends Disposable { public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { return false; } - public onCursorPositionChanged(e: viewEvents.ViewCursorPositionChangedEvent): boolean { - return false; - } - public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { + public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { return false; } public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { @@ -70,9 +67,6 @@ export class ViewEventHandler extends Disposable { public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return false; } - public onScrollRequest(e: viewEvents.ViewScrollRequestEvent): boolean { // TODO@cursor - return false; - } public onTokensChanged(e: viewEvents.ViewTokensChangedEvent): boolean { return false; } @@ -82,6 +76,9 @@ export class ViewEventHandler extends Disposable { public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { return false; } + public onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean { + return false; + } // --- end event handlers @@ -100,14 +97,8 @@ export class ViewEventHandler extends Disposable { } break; - case viewEvents.ViewEventType.ViewCursorPositionChanged: - if (this.onCursorPositionChanged(e)) { - shouldRender = true; - } - break; - - case viewEvents.ViewEventType.ViewCursorSelectionChanged: - if (this.onCursorSelectionChanged(e)) { + case viewEvents.ViewEventType.ViewCursorStateChanged: + if (this.onCursorStateChanged(e)) { shouldRender = true; } break; @@ -166,12 +157,6 @@ export class ViewEventHandler extends Disposable { } break; - case viewEvents.ViewEventType.ViewScrollRequest: - if (this.onScrollRequest(e)) { - shouldRender = true; - } - break; - case viewEvents.ViewEventType.ViewTokensChanged: if (this.onTokensChanged(e)) { shouldRender = true; @@ -190,6 +175,13 @@ export class ViewEventHandler extends Disposable { } break; + + case viewEvents.ViewEventType.ViewThemeChanged: + if (this.onThemeChanged(e)) { + shouldRender = true; + } + break; + default: console.info('View received unknown event: '); console.info(e); diff --git a/src/vs/editor/common/viewModel/viewModel.ts b/src/vs/editor/common/viewModel/viewModel.ts index b9ccbc9982e36..6372d3a14158c 100644 --- a/src/vs/editor/common/viewModel/viewModel.ts +++ b/src/vs/editor/common/viewModel/viewModel.ts @@ -4,13 +4,16 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { INewScrollPosition, IModelDecoration, EndOfLinePreference } from 'vs/editor/common/editorCommon'; +import { INewScrollPosition, IModelDecoration, EndOfLinePreference, IViewState } from 'vs/editor/common/editorCommon'; import { ViewLineToken } from 'vs/editor/common/core/viewLineToken'; import { Position, IPosition } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; -import { ViewEvent } from 'vs/editor/common/view/viewEvents'; +import { ViewEvent, IViewEventListener } from 'vs/editor/common/view/viewEvents'; import { IDisposable } from 'vs/base/common/lifecycle'; +import { Scrollable } from 'vs/base/common/scrollable'; +import { IPartialViewLinesViewportData } from 'vs/editor/common/viewLayout/viewLinesViewportData'; +import { IEditorWhitespace } from 'vs/editor/common/viewLayout/whitespaceComputer'; export interface IViewWhitespaceViewportData { readonly id: number; @@ -37,6 +40,8 @@ export class Viewport { export interface IViewLayout { + readonly scrollable: Scrollable; + onMaxLineWidthChanged(width: number): void; getScrollLeft(): number; @@ -44,9 +49,20 @@ export interface IViewLayout { getScrollHeight(): number; getScrollTop(): number; getCurrentViewport(): Viewport; - getVerticalOffsetForLineNumber(lineNumber: number): number; setScrollPosition(position: INewScrollPosition): void; + getLinesViewportData(): IPartialViewLinesViewportData; + getLinesViewportDataAtScrollTop(scrollTop: number): IPartialViewLinesViewportData; + getWhitespaces(): IEditorWhitespace[]; + + saveState(): IViewState; + restoreState(state: IViewState): void; + + isAfterLines(verticalOffset: number): boolean; + getLineNumberAtVerticalOffset(verticalOffset: number): number; + getVerticalOffsetForLineNumber(lineNumber: number): number; + getWhitespaceAtVerticalOffset(verticalOffset: number): IViewWhitespaceViewportData; + // --------------- Begin vertical whitespace management /** @@ -67,6 +83,9 @@ export interface IViewLayout { */ getWhitespaceViewportData(): IViewWhitespaceViewportData[]; + // TODO@Alex whitespace management should work via a change accessor sort of thing + onHeightMaybeChanged(): void; + // --------------- End vertical whitespace management } @@ -85,16 +104,14 @@ export interface ICoordinatesConverter { modelPositionIsVisible(modelPosition: Position): boolean; } -export interface IViewModelListener { - (events: ViewEvent[]): void; -} - export interface IViewModel { - addEventListener(listener: IViewModelListener): IDisposable; + addEventListener(listener: IViewEventListener): IDisposable; readonly coordinatesConverter: ICoordinatesConverter; + readonly viewLayout: IViewLayout; + /** * Gives a hint that a lot of requests are about to come in for these line numbers. */ @@ -103,6 +120,8 @@ export interface IViewModel { getDecorationsInViewport(visibleRange: Range): ViewModelDecoration[]; getViewLineRenderingData(visibleRange: Range, lineNumber: number): ViewLineRenderingData; getMinimapLinesRenderingData(startLineNumber: number, endLineNumber: number, needed: boolean[]): MinimapLinesRenderingData; + getCompletelyVisibleViewRange(): Range; + getCompletelyVisibleViewRangeAtScrollTop(scrollTop: number): Range; getTabSize(): number; getLineCount(): number; @@ -110,17 +129,16 @@ export interface IViewModel { getLineIndentGuide(lineNumber: number): number; getLineMinColumn(lineNumber: number): number; getLineMaxColumn(lineNumber: number): number; - getLineRenderLineNumber(lineNumber: number): string; + getLineFirstNonWhitespaceColumn(lineNumber: number): number; + getLineLastNonWhitespaceColumn(lineNumber: number): number; getAllOverviewRulerDecorations(): ViewModelDecoration[]; - getEOL(): string; getValueInRange(range: Range, eol: EndOfLinePreference): string; - getModelLineContent(modelLineNumber: number): string; getModelLineMaxColumn(modelLineNumber: number): number; validateModelPosition(modelPosition: IPosition): Position; - getPlainTextToCopy(ranges: Range[], enableEmptySelectionClipboard: boolean): string; - getHTMLToCopy(ranges: Range[], enableEmptySelectionClipboard: boolean): string; + getPlainTextToCopy(ranges: Range[], emptySelectionClipboard: boolean): string; + getHTMLToCopy(ranges: Range[], emptySelectionClipboard: boolean): string; } export class MinimapLinesRenderingData { diff --git a/src/vs/editor/common/viewModel/viewModelCursors.ts b/src/vs/editor/common/viewModel/viewModelCursors.ts deleted file mode 100644 index fbfae793c1579..0000000000000 --- a/src/vs/editor/common/viewModel/viewModelCursors.ts +++ /dev/null @@ -1,117 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import * as editorCommon from 'vs/editor/common/editorCommon'; -import { Position } from 'vs/editor/common/core/position'; -import { ICoordinatesConverter, ViewEventsCollector } from 'vs/editor/common/viewModel/viewModel'; -import { Selection } from 'vs/editor/common/core/selection'; -import * as viewEvents from 'vs/editor/common/view/viewEvents'; -import { ICursorRevealRangeEvent, CursorScrollRequest } from 'vs/editor/common/controller/cursorEvents'; - -export interface ICursorPositionChangedEvent { - readonly position: Position; - readonly viewPosition: Position; - readonly secondaryPositions: Position[]; - readonly secondaryViewPositions: Position[]; - readonly isInEditableRange: boolean; -} - -export interface ICursorSelectionChangedEvent { - readonly selection: Selection; - readonly viewSelection: Selection; - readonly secondarySelections: Selection[]; - readonly secondaryViewSelections: Selection[]; -} - -export class ViewModelCursors { - - private readonly configuration: editorCommon.IConfiguration; - private readonly coordinatesConverter: ICoordinatesConverter; - - private lastCursorPositionChangedEvent: ICursorPositionChangedEvent; - private lastCursorSelectionChangedEvent: ICursorSelectionChangedEvent; - - constructor(configuration: editorCommon.IConfiguration, coordinatesConverter: ICoordinatesConverter) { - this.configuration = configuration; - this.coordinatesConverter = coordinatesConverter; - this.lastCursorPositionChangedEvent = null; - this.lastCursorSelectionChangedEvent = null; - } - - /** - * Limit position to be somewhere where it can actually be rendered - */ - private static _toPositionThatCanBeRendered(position: Position, stopRenderingLineAfter: number) { - // Limit position to be somewhere where it can actually be rendered - if (stopRenderingLineAfter !== -1 && position.column > stopRenderingLineAfter) { - position = new Position(position.lineNumber, stopRenderingLineAfter); - } - return position; - } - - public onCursorPositionChanged(eventsCollector: ViewEventsCollector, e: ICursorPositionChangedEvent): void { - this.lastCursorPositionChangedEvent = e; - - const stopRenderingLineAfter = this.configuration.editor.viewInfo.stopRenderingLineAfter; - - let position = ViewModelCursors._toPositionThatCanBeRendered(e.viewPosition, stopRenderingLineAfter); - let secondaryPositions: Position[] = []; - for (let i = 0, len = e.secondaryPositions.length; i < len; i++) { - secondaryPositions[i] = ViewModelCursors._toPositionThatCanBeRendered(e.secondaryViewPositions[i], stopRenderingLineAfter); - } - - eventsCollector.emit(new viewEvents.ViewCursorPositionChangedEvent(position, secondaryPositions, e.isInEditableRange)); - } - - public onCursorSelectionChanged(eventsCollector: ViewEventsCollector, e: ICursorSelectionChangedEvent): void { - this.lastCursorSelectionChangedEvent = e; - - eventsCollector.emit(new viewEvents.ViewCursorSelectionChangedEvent(e.viewSelection, e.secondaryViewSelections)); - } - - public onCursorRevealRange(eventsCollector: ViewEventsCollector, e: ICursorRevealRangeEvent): void { - // Ensure event has viewRange - const viewRange = ( - e.viewRange - ? e.viewRange - : this.coordinatesConverter.convertModelRangeToViewRange(e.range) - ); - eventsCollector.emit(new viewEvents.ViewRevealRangeRequestEvent( - viewRange, - e.verticalType, - e.revealHorizontal - )); - } - - public onLineMappingChanged(eventsCollector: ViewEventsCollector): void { - if (this.lastCursorPositionChangedEvent) { - const toViewPos = (pos: Position) => this.coordinatesConverter.convertModelPositionToViewPosition(pos); - let e: ICursorPositionChangedEvent = { - position: this.lastCursorPositionChangedEvent.position, - viewPosition: toViewPos(this.lastCursorPositionChangedEvent.position), - secondaryPositions: this.lastCursorPositionChangedEvent.secondaryPositions, - secondaryViewPositions: this.lastCursorPositionChangedEvent.secondaryPositions.map(toViewPos), - isInEditableRange: this.lastCursorPositionChangedEvent.isInEditableRange, - }; - this.onCursorPositionChanged(eventsCollector, e); - } - - if (this.lastCursorSelectionChangedEvent) { - const toViewSel = (sel: Selection) => this.coordinatesConverter.convertModelSelectionToViewSelection(sel); - let e: ICursorSelectionChangedEvent = { - selection: this.lastCursorSelectionChangedEvent.selection, - viewSelection: toViewSel(this.lastCursorSelectionChangedEvent.selection), - secondarySelections: this.lastCursorSelectionChangedEvent.secondarySelections, - secondaryViewSelections: this.lastCursorSelectionChangedEvent.secondarySelections.map(toViewSel), - }; - this.onCursorSelectionChanged(eventsCollector, e); - } - } - - public onCursorScrollRequest(eventsCollector: ViewEventsCollector, e: CursorScrollRequest): void { - eventsCollector.emit(new viewEvents.ViewScrollRequestEvent(e.desiredScrollTop)); - } -} diff --git a/src/vs/editor/common/viewModel/viewModelDecorations.ts b/src/vs/editor/common/viewModel/viewModelDecorations.ts index d129ee7661251..f4311681f8214 100644 --- a/src/vs/editor/common/viewModel/viewModelDecorations.ts +++ b/src/vs/editor/common/viewModel/viewModelDecorations.ts @@ -8,8 +8,7 @@ import { IDisposable } from 'vs/base/common/lifecycle'; import { Range } from 'vs/editor/common/core/range'; import { Position } from 'vs/editor/common/core/position'; import * as editorCommon from 'vs/editor/common/editorCommon'; -import { InlineDecoration, ViewModelDecoration, ICoordinatesConverter, ViewEventsCollector } from 'vs/editor/common/viewModel/viewModel'; -import * as viewEvents from 'vs/editor/common/view/viewEvents'; +import { InlineDecoration, ViewModelDecoration, ICoordinatesConverter } from 'vs/editor/common/viewModel/viewModel'; import { IModelDecorationsChangedEvent } from 'vs/editor/common/model/textModelEvents'; export interface IDecorationsViewportData { @@ -41,7 +40,6 @@ export class ViewModelDecorations implements IDisposable { this.configuration = configuration; this._coordinatesConverter = coordinatesConverter; this._decorationsCache = Object.create(null); - this._clearCachedModelDecorationsResolver(); } @@ -60,7 +58,7 @@ export class ViewModelDecorations implements IDisposable { this._clearCachedModelDecorationsResolver(); } - public onModelDecorationsChanged(eventsCollector: ViewEventsCollector, e: IModelDecorationsChangedEvent): void { + public onModelDecorationsChanged(e: IModelDecorationsChangedEvent): void { let changedDecorations = e.changedDecorations; for (let i = 0, len = changedDecorations.length; i < len; i++) { let changedDecoration = changedDecorations[i]; @@ -73,20 +71,20 @@ export class ViewModelDecorations implements IDisposable { } let removedDecorations = e.removedDecorations; - for (let i = 0, len = removedDecorations.length; i < len; i++) { - let removedDecoration = removedDecorations[i]; - delete this._decorationsCache[removedDecoration]; + if (this._decorationsCache !== null && this._decorationsCache !== undefined) { + for (let i = 0, len = removedDecorations.length; i < len; i++) { + let removedDecoration = removedDecorations[i]; + delete this._decorationsCache[removedDecoration]; + } } this._clearCachedModelDecorationsResolver(); - eventsCollector.emit(new viewEvents.ViewDecorationsChangedEvent()); } - public onLineMappingChanged(eventsCollector: ViewEventsCollector): void { + public onLineMappingChanged(): void { this._decorationsCache = Object.create(null); this._clearCachedModelDecorationsResolver(); - eventsCollector.emit(new viewEvents.ViewDecorationsChangedEvent()); } private _getOrCreateViewModelDecoration(modelDecoration: editorCommon.IModelDecoration): ViewModelDecoration { diff --git a/src/vs/editor/common/viewModel/viewModelImpl.ts b/src/vs/editor/common/viewModel/viewModelImpl.ts index bed5e27c8c712..c05068d4a8379 100644 --- a/src/vs/editor/common/viewModel/viewModelImpl.ts +++ b/src/vs/editor/common/viewModel/viewModelImpl.ts @@ -5,7 +5,6 @@ 'use strict'; import { EmitterEvent } from 'vs/base/common/eventEmitter'; -import { IDisposable, Disposable } from 'vs/base/common/lifecycle'; import * as strings from 'vs/base/common/strings'; import { Position, IPosition } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; @@ -13,19 +12,15 @@ import { Selection } from 'vs/editor/common/core/selection'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { TokenizationRegistry, ColorId, LanguageId } from 'vs/editor/common/modes'; import { tokenizeLineToHTML } from 'vs/editor/common/modes/textToHtmlTokenizer'; -import { ViewModelCursors } from 'vs/editor/common/viewModel/viewModelCursors'; import { ViewModelDecorations } from 'vs/editor/common/viewModel/viewModelDecorations'; -import { MinimapLinesRenderingData, ViewLineRenderingData, ViewModelDecoration, IViewModelListener, IViewModel, ICoordinatesConverter, ViewEventsCollector } from 'vs/editor/common/viewModel/viewModel'; +import { MinimapLinesRenderingData, ViewLineRenderingData, ViewModelDecoration, IViewModel, ICoordinatesConverter, ViewEventsCollector } from 'vs/editor/common/viewModel/viewModel'; import { SplitLinesCollection } from 'vs/editor/common/viewModel/splitLinesCollection'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; -import * as errors from 'vs/base/common/errors'; import { MinimapTokensColorTracker } from 'vs/editor/common/view/minimapCharRenderer'; import * as textModelEvents from 'vs/editor/common/model/textModelEvents'; -import { WrappingIndent, IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; -import { CursorEventType, ICursorPositionChangedEvent, VerticalRevealType, ICursorSelectionChangedEvent, ICursorRevealRangeEvent, CursorScrollRequest } from 'vs/editor/common/controller/cursorEvents'; -import { Cursor } from 'vs/editor/common/controller/cursor'; - -const ConfigurationChanged = 'configurationChanged'; +import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; +import { CharacterHardWrappingLineMapperFactory } from 'vs/editor/common/viewModel/characterHardWrappingLineMapper'; +import { ViewLayout } from 'vs/editor/common/viewLayout/viewLayout'; export class CoordinatesConverter implements ICoordinatesConverter { @@ -87,212 +82,146 @@ export class CoordinatesConverter implements ICoordinatesConverter { } -export class ViewModel extends Disposable implements IViewModel { +export class ViewModel extends viewEvents.ViewEventEmitter implements IViewModel { - private readonly lines: SplitLinesCollection; private readonly editorId: number; private readonly configuration: editorCommon.IConfiguration; private readonly model: editorCommon.IModel; + private readonly lines: SplitLinesCollection; public readonly coordinatesConverter: ICoordinatesConverter; + public readonly viewLayout: ViewLayout; private readonly decorations: ViewModelDecorations; - private readonly cursors: ViewModelCursors; - - private _renderCustomLineNumbers: (lineNumber: number) => string; - private _renderRelativeLineNumbers: boolean; - private _lastCursorPosition: Position; + private _isDisposing: boolean; private _centeredViewLine: number; - private _listeners: IViewModelListener[]; - - constructor(lines: SplitLinesCollection, editorId: number, configuration: editorCommon.IConfiguration, model: editorCommon.IModel) { + constructor(editorId: number, configuration: editorCommon.IConfiguration, model: editorCommon.IModel) { super(); - this.lines = lines; this.editorId = editorId; this.configuration = configuration; this.model = model; - this.configuration.setMaxLineNumber(this.model.getLineCount()); + + const conf = this.configuration.editor; + + let hardWrappingLineMapperFactory = new CharacterHardWrappingLineMapperFactory( + conf.wrappingInfo.wordWrapBreakBeforeCharacters, + conf.wrappingInfo.wordWrapBreakAfterCharacters, + conf.wrappingInfo.wordWrapBreakObtrusiveCharacters + ); + + this.lines = new SplitLinesCollection( + this.model, + hardWrappingLineMapperFactory, + this.model.getOptions().tabSize, + conf.wrappingInfo.wrappingColumn, + conf.fontInfo.typicalFullwidthCharacterWidth / conf.fontInfo.typicalHalfwidthCharacterWidth, + conf.wrappingInfo.wrappingIndent + ); this.coordinatesConverter = new CoordinatesConverter(this.lines); - this._lastCursorPosition = new Position(1, 1); - this._renderCustomLineNumbers = this.configuration.editor.viewInfo.renderCustomLineNumbers; - this._renderRelativeLineNumbers = this.configuration.editor.viewInfo.renderRelativeLineNumbers; + this.viewLayout = this._register(new ViewLayout(this.configuration, this.getLineCount())); + + this._register(this.viewLayout.onDidScroll((e) => { + this._emit([new viewEvents.ViewScrollChangedEvent(e)]); + })); + this._isDisposing = false; this._centeredViewLine = -1; this.decorations = new ViewModelDecorations(this.editorId, this.model, this.configuration, this.coordinatesConverter); - this.decorations.reset(); - this.cursors = new ViewModelCursors(this.configuration, this.coordinatesConverter); + this._register(this.model.addBulkListener((events: EmitterEvent[]) => { + if (this._isDisposing) { + // Disposing the lines might end up sending model decoration changed events + // ...we no longer care about them... + return; + } + let eventsCollector = new ViewEventsCollector(); + this._onModelEvents(eventsCollector, events); + this._emit(eventsCollector.finalize()); + })); - this._register(this.model.addBulkListener((events: EmitterEvent[]) => this.onEvents(events))); this._register(this.configuration.onDidChange((e) => { - this.onEvents([new EmitterEvent(ConfigurationChanged, e)]); + const eventsCollector = new ViewEventsCollector(); + this._onConfigurationChanged(eventsCollector, e); + this._emit(eventsCollector.finalize()); })); + this._register(MinimapTokensColorTracker.getInstance().onDidChange(() => { this._emit([new viewEvents.ViewTokensColorsChangedEvent()]); })); - - this._listeners = []; - } - - public setHiddenAreas(ranges: Range[]): void { - let eventsCollector = new ViewEventsCollector(); - this._setHiddenAreas(eventsCollector, ranges); - this._emit(eventsCollector.finalize()); - } - - private _setHiddenAreas(eventsCollector: ViewEventsCollector, ranges: Range[]): void { - let lineMappingChanged = this.lines.setHiddenAreas(eventsCollector, ranges); - if (lineMappingChanged) { - eventsCollector.emit(new viewEvents.ViewLineMappingChangedEvent()); - this.decorations.onLineMappingChanged(eventsCollector); - this.cursors.onLineMappingChanged(eventsCollector); - } } public dispose(): void { + this._isDisposing = true; this.decorations.dispose(); this.lines.dispose(); - this._listeners = []; super.dispose(); } - public addEventListener(listener: (events: viewEvents.ViewEvent[]) => void): IDisposable { - this._listeners.push(listener); - return { - dispose: () => { - let listeners = this._listeners; - for (let i = 0, len = listeners.length; i < len; i++) { - if (listeners[i] === listener) { - listeners.splice(i, 1); - break; - } - } - } - }; - } + private _onConfigurationChanged(eventsCollector: ViewEventsCollector, e: IConfigurationChangedEvent): void { - private _emit(events: viewEvents.ViewEvent[]): void { - let listeners = this._listeners.slice(0); - for (let i = 0, len = listeners.length; i < len; i++) { - safeInvokeListener(listeners[i], events); - } - } + // We might need to restore the current centered view range, so save it (if available) + const previousCenteredModelRange = this.getCenteredRangeInViewport(); + let revealPreviousCenteredModelRange = false; - private _onTabSizeChange(eventsCollector: ViewEventsCollector, newTabSize: number): boolean { - var lineMappingChanged = this.lines.setTabSize(eventsCollector, newTabSize); - if (lineMappingChanged) { - eventsCollector.emit(new viewEvents.ViewLineMappingChangedEvent()); - this.decorations.onLineMappingChanged(eventsCollector); - this.cursors.onLineMappingChanged(eventsCollector); - } - return lineMappingChanged; - } + const conf = this.configuration.editor; - private _onWrappingIndentChange(eventsCollector: ViewEventsCollector, newWrappingIndent: WrappingIndent): boolean { - var lineMappingChanged = this.lines.setWrappingIndent(eventsCollector, newWrappingIndent); - if (lineMappingChanged) { + if (this.lines.setWrappingSettings(conf.wrappingInfo.wrappingIndent, conf.wrappingInfo.wrappingColumn, conf.fontInfo.typicalFullwidthCharacterWidth / conf.fontInfo.typicalHalfwidthCharacterWidth)) { + eventsCollector.emit(new viewEvents.ViewFlushedEvent()); eventsCollector.emit(new viewEvents.ViewLineMappingChangedEvent()); - this.decorations.onLineMappingChanged(eventsCollector); - this.cursors.onLineMappingChanged(eventsCollector); + eventsCollector.emit(new viewEvents.ViewDecorationsChangedEvent()); + this.decorations.onLineMappingChanged(); + this.viewLayout.onFlushed(this.getLineCount()); + + if (this.viewLayout.getScrollTop() !== 0) { + // Never change the scroll position from 0 to something else... + revealPreviousCenteredModelRange = true; + } } - return lineMappingChanged; - } - private _restoreCenteredModelRange(eventsCollector: ViewEventsCollector, range: Range): void { - // modelLine -> viewLine - var newCenteredViewRange = this.coordinatesConverter.convertModelRangeToViewRange(range); + if (e.readOnly) { + // Must read again all decorations due to readOnly filtering + this.decorations.reset(); + eventsCollector.emit(new viewEvents.ViewDecorationsChangedEvent()); + } - // Send a reveal event to restore the centered content - eventsCollector.emit(new viewEvents.ViewRevealRangeRequestEvent( - newCenteredViewRange, - VerticalRevealType.Center, - false - )); - } + eventsCollector.emit(new viewEvents.ViewConfigurationChangedEvent(e)); + this.viewLayout.onConfigurationChanged(e); - private _onWrappingColumnChange(eventsCollector: ViewEventsCollector, newWrappingColumn: number, columnsForFullWidthChar: number): boolean { - let lineMappingChanged = this.lines.setWrappingColumn(eventsCollector, newWrappingColumn, columnsForFullWidthChar); - if (lineMappingChanged) { - eventsCollector.emit(new viewEvents.ViewLineMappingChangedEvent()); - this.decorations.onLineMappingChanged(eventsCollector); - this.cursors.onLineMappingChanged(eventsCollector); + if (revealPreviousCenteredModelRange && previousCenteredModelRange) { + // modelLine -> viewLine + const newCenteredViewRange = this.coordinatesConverter.convertModelRangeToViewRange(previousCenteredModelRange); + + // Send a reveal event to restore the centered content + eventsCollector.emit(new viewEvents.ViewRevealRangeRequestEvent( + newCenteredViewRange, + viewEvents.VerticalRevealType.Center, + false + )); } - return lineMappingChanged; - } - - public addEventSource(eventSource: Cursor): void { - this._register(eventSource.addBulkListener((events: EmitterEvent[]) => this.onEvents(events))); } - private onEvents(events: EmitterEvent[]): void { - let eventsCollector = new ViewEventsCollector(); - this._onEvents(eventsCollector, events); - this._emit(eventsCollector.finalize()); - } + private _onModelEvents(eventsCollector: ViewEventsCollector, events: EmitterEvent[]): void { - private static _containsModelContentChangeEvent(events: EmitterEvent[]): boolean { + // A quick check if there are model content change events incoming + // in order to update the configuration and reset the centered view line for (let i = 0, len = events.length; i < len; i++) { - let eventType = events[i].type; + const eventType = events[i].type; if (eventType === textModelEvents.TextModelEventType.ModelRawContentChanged2) { - return true; - } - } - return false; - } + // There is a content change event + this._centeredViewLine = -1; + this.configuration.setMaxLineNumber(this.model.getLineCount()); - private static _containsWrappingRelatedEvents(events: EmitterEvent[]): boolean { - for (let i = 0, len = events.length; i < len; i++) { - let eventType = events[i].type; - if (eventType === textModelEvents.TextModelEventType.ModelOptionsChanged) { - return true; + break; } - if (eventType === ConfigurationChanged) { - return true; - } - } - return false; - } - - public getCenteredRangeInViewport(): Range { - if (this._centeredViewLine === -1) { - // Never got rendered or not rendered since last content change event - return null; - } - let viewLineNumber = this._centeredViewLine; - let currentCenteredViewRange = new Range(viewLineNumber, this.getLineMinColumn(viewLineNumber), viewLineNumber, this.getLineMaxColumn(viewLineNumber)); - return this.coordinatesConverter.convertViewRangeToModelRange(currentCenteredViewRange); - } - - private _onEvents(eventsCollector: ViewEventsCollector, events: EmitterEvent[]): void { - - const containsModelContentChangeEvent = ViewModel._containsModelContentChangeEvent(events); - if (containsModelContentChangeEvent) { - this._centeredViewLine = -1; - this.configuration.setMaxLineNumber(this.model.getLineCount()); - } - - // We might need to restore the current centered view range in the following circumstances: - // All of these changes might lead to a new line mapping: - // (a) model tabSize changed - // (b) wrappingIndent changed - // (c) wrappingColumn changed - // (d) fontInfo changed - // However, we cannot restore the current centered line if the model has changed its content - // because we cannot convert the view range to a model range. - - let previousCenteredModelRange: Range = null; - if (!containsModelContentChangeEvent && ViewModel._containsWrappingRelatedEvents(events)) { - previousCenteredModelRange = this.getCenteredRangeInViewport(); } let hadOtherModelChange = false; let hadModelLineChangeThatChangedLineMapping = false; - let revealPreviousCenteredModelRange = false; for (let i = 0, len = events.length; i < len; i++) { const _e = events[i]; @@ -303,37 +232,62 @@ export class ViewModel extends Disposable implements IViewModel { case textModelEvents.TextModelEventType.ModelRawContentChanged2: { const e = data; + const changes = e.changes; + const versionId = e.versionId; - for (let j = 0, lenJ = e.changes.length; j < lenJ; j++) { - const change = e.changes[j]; + for (let j = 0, lenJ = changes.length; j < lenJ; j++) { + const change = changes[j]; switch (change.changeType) { - case textModelEvents.RawContentChangedType.Flush: - this.lines.onModelFlushed(eventsCollector); + case textModelEvents.RawContentChangedType.Flush: { + this.lines.onModelFlushed(); + eventsCollector.emit(new viewEvents.ViewFlushedEvent()); this.decorations.reset(); + this.viewLayout.onFlushed(this.getLineCount()); hadOtherModelChange = true; break; - - case textModelEvents.RawContentChangedType.LinesDeleted: - this.lines.onModelLinesDeleted(eventsCollector, change.fromLineNumber, change.toLineNumber); + } + case textModelEvents.RawContentChangedType.LinesDeleted: { + const linesDeletedEvent = this.lines.onModelLinesDeleted(versionId, change.fromLineNumber, change.toLineNumber); + if (linesDeletedEvent !== null) { + eventsCollector.emit(linesDeletedEvent); + this.viewLayout.onLinesDeleted(linesDeletedEvent.fromLineNumber, linesDeletedEvent.toLineNumber); + } hadOtherModelChange = true; break; - - case textModelEvents.RawContentChangedType.LinesInserted: - this.lines.onModelLinesInserted(eventsCollector, change.fromLineNumber, change.toLineNumber, change.detail.split('\n')); + } + case textModelEvents.RawContentChangedType.LinesInserted: { + const linesInsertedEvent = this.lines.onModelLinesInserted(versionId, change.fromLineNumber, change.toLineNumber, change.detail.split('\n')); + if (linesInsertedEvent !== null) { + eventsCollector.emit(linesInsertedEvent); + this.viewLayout.onLinesInserted(linesInsertedEvent.fromLineNumber, linesInsertedEvent.toLineNumber); + } hadOtherModelChange = true; break; - - case textModelEvents.RawContentChangedType.LineChanged: - hadModelLineChangeThatChangedLineMapping = this.lines.onModelLineChanged(eventsCollector, change.lineNumber, change.detail); + } + case textModelEvents.RawContentChangedType.LineChanged: { + const [lineMappingChanged, linesChangedEvent, linesInsertedEvent, linesDeletedEvent] = this.lines.onModelLineChanged(versionId, change.lineNumber, change.detail); + hadModelLineChangeThatChangedLineMapping = lineMappingChanged; + if (linesChangedEvent) { + eventsCollector.emit(linesChangedEvent); + } + if (linesInsertedEvent) { + eventsCollector.emit(linesInsertedEvent); + this.viewLayout.onLinesInserted(linesInsertedEvent.fromLineNumber, linesInsertedEvent.toLineNumber); + } + if (linesDeletedEvent) { + eventsCollector.emit(linesDeletedEvent); + this.viewLayout.onLinesDeleted(linesDeletedEvent.fromLineNumber, linesDeletedEvent.toLineNumber); + } break; - - default: - console.info('ViewModel received unknown event: '); - console.info(_e); + } + case textModelEvents.RawContentChangedType.EOLChanged: { + // Nothing to do. The new version will be accepted below + break; + } } } - this.lines.acceptVersionId(e.versionId); + this.lines.acceptVersionId(versionId); break; } @@ -363,61 +317,26 @@ export class ViewModel extends Disposable implements IViewModel { } case textModelEvents.TextModelEventType.ModelOptionsChanged: { // A tab size change causes a line mapping changed event => all view parts will repaint OK, no further event needed here - let prevLineCount = this.lines.getViewLineCount(); - let tabSizeChanged = this._onTabSizeChange(eventsCollector, this.model.getOptions().tabSize); - let newLineCount = this.lines.getViewLineCount(); - if (tabSizeChanged && prevLineCount !== newLineCount) { - revealPreviousCenteredModelRange = true; + if (this.lines.setTabSize(this.model.getOptions().tabSize)) { + eventsCollector.emit(new viewEvents.ViewFlushedEvent()); + eventsCollector.emit(new viewEvents.ViewLineMappingChangedEvent()); + eventsCollector.emit(new viewEvents.ViewDecorationsChangedEvent()); + this.decorations.onLineMappingChanged(); + this.viewLayout.onFlushed(this.getLineCount()); } break; } case textModelEvents.TextModelEventType.ModelDecorationsChanged: { const e = data; - this.decorations.onModelDecorationsChanged(eventsCollector, e); + this.decorations.onModelDecorationsChanged(e); + eventsCollector.emit(new viewEvents.ViewDecorationsChangedEvent()); break; } case textModelEvents.TextModelEventType.ModelDispose: { // Ignore, since the editor will take care of this and destroy the view shortly break; } - case CursorEventType.CursorPositionChanged: { - const e = data; - this.cursors.onCursorPositionChanged(eventsCollector, e); - this._lastCursorPosition = e.position; - break; - } - case CursorEventType.CursorSelectionChanged: { - const e = data; - this.cursors.onCursorSelectionChanged(eventsCollector, e); - break; - } - case CursorEventType.CursorRevealRange: { - const e = data; - this.cursors.onCursorRevealRange(eventsCollector, e); - break; - } - case CursorEventType.CursorScrollRequest: { - const e = data; - this.cursors.onCursorScrollRequest(eventsCollector, e); - break; - } - case ConfigurationChanged: { - const e = data; - revealPreviousCenteredModelRange = this._onWrappingIndentChange(eventsCollector, this.configuration.editor.wrappingInfo.wrappingIndent) || revealPreviousCenteredModelRange; - revealPreviousCenteredModelRange = this._onWrappingColumnChange(eventsCollector, this.configuration.editor.wrappingInfo.wrappingColumn, this.configuration.editor.fontInfo.typicalFullwidthCharacterWidth / this.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth) || revealPreviousCenteredModelRange; - - this._renderCustomLineNumbers = this.configuration.editor.viewInfo.renderCustomLineNumbers; - this._renderRelativeLineNumbers = this.configuration.editor.viewInfo.renderRelativeLineNumbers; - - if (e.readOnly) { - // Must read again all decorations due to readOnly filtering - this.decorations.reset(); - eventsCollector.emit(new viewEvents.ViewDecorationsChangedEvent()); - } - eventsCollector.emit(new viewEvents.ViewConfigurationChangedEvent(e)); - break; - } default: console.info('View received unknown event: '); console.info(type, data); @@ -426,13 +345,54 @@ export class ViewModel extends Disposable implements IViewModel { if (!hadOtherModelChange && hadModelLineChangeThatChangedLineMapping) { eventsCollector.emit(new viewEvents.ViewLineMappingChangedEvent()); - this.decorations.onLineMappingChanged(eventsCollector); - this.cursors.onLineMappingChanged(eventsCollector); + eventsCollector.emit(new viewEvents.ViewDecorationsChangedEvent()); + this.decorations.onLineMappingChanged(); } + } - if (revealPreviousCenteredModelRange && previousCenteredModelRange) { - this._restoreCenteredModelRange(eventsCollector, previousCenteredModelRange); + public setHiddenAreas(ranges: Range[]): void { + let eventsCollector = new ViewEventsCollector(); + let lineMappingChanged = this.lines.setHiddenAreas(ranges); + if (lineMappingChanged) { + eventsCollector.emit(new viewEvents.ViewFlushedEvent()); + eventsCollector.emit(new viewEvents.ViewLineMappingChangedEvent()); + eventsCollector.emit(new viewEvents.ViewDecorationsChangedEvent()); + this.decorations.onLineMappingChanged(); + this.viewLayout.onFlushed(this.getLineCount()); } + this._emit(eventsCollector.finalize()); + } + + public getCenteredRangeInViewport(): Range { + if (this._centeredViewLine === -1) { + // Never got rendered or not rendered since last content change event + return null; + } + let viewLineNumber = this._centeredViewLine; + let currentCenteredViewRange = new Range(viewLineNumber, this.getLineMinColumn(viewLineNumber), viewLineNumber, this.getLineMaxColumn(viewLineNumber)); + return this.coordinatesConverter.convertViewRangeToModelRange(currentCenteredViewRange); + } + + public getCompletelyVisibleViewRange(): Range { + const partialData = this.viewLayout.getLinesViewportData(); + const startViewLineNumber = partialData.completelyVisibleStartLineNumber; + const endViewLineNumber = partialData.completelyVisibleEndLineNumber; + + return new Range( + startViewLineNumber, this.getLineMinColumn(startViewLineNumber), + endViewLineNumber, this.getLineMaxColumn(endViewLineNumber) + ); + } + + public getCompletelyVisibleViewRangeAtScrollTop(scrollTop: number): Range { + const partialData = this.viewLayout.getLinesViewportDataAtScrollTop(scrollTop); + const startViewLineNumber = partialData.completelyVisibleStartLineNumber; + const endViewLineNumber = partialData.completelyVisibleEndLineNumber; + + return new Range( + startViewLineNumber, this.getLineMinColumn(startViewLineNumber), + endViewLineNumber, this.getLineMaxColumn(endViewLineNumber) + ); } public getTabSize(): number { @@ -483,28 +443,6 @@ export class ViewModel extends Disposable implements IViewModel { return result + 2; } - public getLineRenderLineNumber(viewLineNumber: number): string { - let modelPosition = this.coordinatesConverter.convertViewPositionToModelPosition(new Position(viewLineNumber, 1)); - if (modelPosition.column !== 1) { - return ''; - } - let modelLineNumber = modelPosition.lineNumber; - - if (this._renderCustomLineNumbers) { - return this._renderCustomLineNumbers(modelLineNumber); - } - - if (this._renderRelativeLineNumbers) { - let diff = Math.abs(this._lastCursorPosition.lineNumber - modelLineNumber); - if (diff === 0) { - return '' + modelLineNumber + ''; - } - return String(diff); - } - - return String(modelLineNumber); - } - public getDecorationsInViewport(visibleRange: Range): ViewModelDecoration[] { return this.decorations.getDecorationsViewportData(visibleRange).decorations; } @@ -541,19 +479,11 @@ export class ViewModel extends Disposable implements IViewModel { return this.decorations.getAllOverviewRulerDecorations(); } - public getEOL(): string { - return this.model.getEOL(); - } - public getValueInRange(range: Range, eol: editorCommon.EndOfLinePreference): string { var modelRange = this.coordinatesConverter.convertViewRangeToModelRange(range); return this.model.getValueInRange(modelRange, eol); } - public getModelLineContent(modelLineNumber: number): string { - return this.model.getLineContent(modelLineNumber); - } - public getModelLineMaxColumn(modelLineNumber: number): number { return this.model.getLineMaxColumn(modelLineNumber); } @@ -562,15 +492,15 @@ export class ViewModel extends Disposable implements IViewModel { return this.model.validatePosition(position); } - public getPlainTextToCopy(ranges: Range[], enableEmptySelectionClipboard: boolean): string { - let newLineCharacter = this.getEOL(); + public getPlainTextToCopy(ranges: Range[], emptySelectionClipboard: boolean): string { + let newLineCharacter = this.model.getEOL(); if (ranges.length === 1) { let range: Range = ranges[0]; if (range.isEmpty()) { - if (enableEmptySelectionClipboard) { + if (emptySelectionClipboard) { let modelLineNumber = this.coordinatesConverter.convertViewPositionToModelPosition(new Position(range.startLineNumber, 1)).lineNumber; - return this.getModelLineContent(modelLineNumber) + newLineCharacter; + return this.model.getLineContent(modelLineNumber) + newLineCharacter; } else { return ''; } @@ -588,7 +518,7 @@ export class ViewModel extends Disposable implements IViewModel { } } - public getHTMLToCopy(viewRanges: Range[], enableEmptySelectionClipboard: boolean): string { + public getHTMLToCopy(viewRanges: Range[], emptySelectionClipboard: boolean): string { if (this.model.getLanguageIdentifier().id === LanguageId.PlainText) { return null; } @@ -600,7 +530,7 @@ export class ViewModel extends Disposable implements IViewModel { let range = this.coordinatesConverter.convertViewRangeToModelRange(viewRanges[0]); if (range.isEmpty()) { - if (!enableEmptySelectionClipboard) { + if (!emptySelectionClipboard) { // nothing to copy return null; } @@ -661,11 +591,3 @@ export class ViewModel extends Disposable implements IViewModel { return result; } } - -function safeInvokeListener(listener: IViewModelListener, events: viewEvents.ViewEvent[]): void { - try { - listener(events); - } catch (e) { - errors.onUnexpectedError(e); - } -} diff --git a/src/vs/editor/contrib/accessibility/browser/accessibility.ts b/src/vs/editor/contrib/accessibility/browser/accessibility.ts deleted file mode 100644 index 508072bd26d58..0000000000000 --- a/src/vs/editor/contrib/accessibility/browser/accessibility.ts +++ /dev/null @@ -1,273 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import 'vs/css!./accessibility'; -import * as nls from 'vs/nls'; -import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; -import { Disposable } from 'vs/base/common/lifecycle'; -import * as strings from 'vs/base/common/strings'; -import { clearNode } from 'vs/base/browser/dom'; -import { renderHtml } from 'vs/base/browser/htmlContentRenderer'; -import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; -import { Widget } from 'vs/base/browser/ui/widget'; -import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; -import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; -import { RawContextKey, IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; -import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; -import { GlobalScreenReaderNVDA } from 'vs/editor/common/config/commonEditorConfig'; -import { ICommonCodeEditor, IEditorContribution } from 'vs/editor/common/editorCommon'; -import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; -import { editorAction, CommonEditorRegistry, EditorAction, EditorCommand, Command } from 'vs/editor/common/editorCommonExtensions'; -import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition } from 'vs/editor/browser/editorBrowser'; -import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; -import { ToggleTabFocusModeAction } from 'vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode'; -import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -import { editorWidgetBackground, widgetShadow, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; - -const CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE = new RawContextKey('accessibilityHelpWidgetVisible', false); -const TOGGLE_EXPERIMENTAL_SCREEN_READER_SUPPORT_COMMAND_ID = 'toggleExperimentalScreenReaderSupport'; - -@editorContribution -class AccessibilityHelpController extends Disposable implements IEditorContribution { - - private static ID = 'editor.contrib.accessibilityHelpController'; - - public static get(editor: ICommonCodeEditor): AccessibilityHelpController { - return editor.getContribution(AccessibilityHelpController.ID); - } - - private _editor: ICodeEditor; - private _widget: AccessibilityHelpWidget; - - constructor( - editor: ICodeEditor, - @IContextKeyService contextKeyService: IContextKeyService, - @IKeybindingService keybindingService: IKeybindingService - ) { - super(); - - this._editor = editor; - this._widget = this._register(new AccessibilityHelpWidget(this._editor, contextKeyService, keybindingService)); - } - - public getId(): string { - return AccessibilityHelpController.ID; - } - - public show(): void { - this._widget.show(); - } - - public hide(): void { - this._widget.hide(); - } -} - -class AccessibilityHelpWidget extends Widget implements IOverlayWidget { - - private static ID = 'editor.contrib.accessibilityHelpWidget'; - private static WIDTH = 500; - private static HEIGHT = 300; - - private _editor: ICodeEditor; - private _keybindingService: IKeybindingService; - private _domNode: FastDomNode; - private _isVisible: boolean; - private _isVisibleKey: IContextKey; - - constructor(editor: ICodeEditor, contextKeyService: IContextKeyService, keybindingService: IKeybindingService) { - super(); - - this._editor = editor; - this._keybindingService = keybindingService; - this._isVisibleKey = CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE.bindTo(contextKeyService); - - this._domNode = createFastDomNode(document.createElement('div')); - this._domNode.setClassName('accessibilityHelpWidget'); - this._domNode.setWidth(AccessibilityHelpWidget.WIDTH); - this._domNode.setHeight(AccessibilityHelpWidget.HEIGHT); - this._domNode.setDisplay('none'); - this._domNode.setAttribute('role', 'tooltip'); - this._domNode.setAttribute('aria-hidden', 'true'); - this._isVisible = false; - - this._register(this._editor.onDidLayoutChange(() => { - if (this._isVisible) { - this._layout(); - } - })); - this.onblur(this._domNode.domNode, () => { - this.hide(); - }); - - this._editor.addOverlayWidget(this); - } - - public dispose(): void { - this._editor.removeOverlayWidget(this); - super.dispose(); - } - - public getId(): string { - return AccessibilityHelpWidget.ID; - } - - public getDomNode(): HTMLElement { - return this._domNode.domNode; - } - - public getPosition(): IOverlayWidgetPosition { - return { - preference: null - }; - } - - public show(): void { - if (this._isVisible) { - return; - } - this._isVisible = true; - this._isVisibleKey.set(true); - this._layout(); - this._domNode.setDisplay('block'); - this._domNode.setAttribute('aria-hidden', 'false'); - this._domNode.domNode.tabIndex = 0; - this._buildContent(); - this._domNode.domNode.focus(); - } - - private _descriptionForCommand(commandId: string, msg: string, noKbMsg: string): string { - let kb = this._keybindingService.lookupKeybinding(commandId); - if (kb) { - return strings.format(msg, kb.getAriaLabel()); - } - return strings.format(noKbMsg, commandId); - } - - private _buildContent() { - let opts = this._editor.getConfiguration(); - let text = nls.localize('introMsg', "Thank you for trying out VS Code's accessibility options."); - - text += '\n\n' + nls.localize('status', "Status:"); - - const NLS_TAB_FOCUS_MODE_ON = nls.localize('tabFocusModeOnMsg', "Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."); - const NLS_TAB_FOCUS_MODE_ON_NO_KB = nls.localize('tabFocusModeOnMsgNoKb', "Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."); - const NLS_TAB_FOCUS_MODE_OFF = nls.localize('tabFocusModeOffMsg', "Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."); - const NLS_TAB_FOCUS_MODE_OFF_NO_KB = nls.localize('tabFocusModeOffMsgNoKb', "Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding."); - - if (opts.tabFocusMode) { - text += '\n\n - ' + this._descriptionForCommand(ToggleTabFocusModeAction.ID, NLS_TAB_FOCUS_MODE_ON, NLS_TAB_FOCUS_MODE_ON_NO_KB); - } else { - text += '\n\n - ' + this._descriptionForCommand(ToggleTabFocusModeAction.ID, NLS_TAB_FOCUS_MODE_OFF, NLS_TAB_FOCUS_MODE_OFF_NO_KB); - } - - text += '\n\n' + nls.localize('outroMsg', "You can dismiss this tooltip and return to the editor by pressing Escape."); - - this._domNode.domNode.appendChild(renderHtml({ - formattedText: text - })); - } - - public hide(): void { - if (!this._isVisible) { - return; - } - this._isVisible = false; - this._isVisibleKey.reset(); - this._domNode.setDisplay('none'); - this._domNode.setAttribute('aria-hidden', 'true'); - this._domNode.domNode.tabIndex = -1; - clearNode(this._domNode.domNode); - - this._editor.focus(); - } - - private _layout(): void { - let editorLayout = this._editor.getLayoutInfo(); - - let top = Math.round((editorLayout.height - AccessibilityHelpWidget.HEIGHT) / 2); - this._domNode.setTop(top); - - let left = Math.round((editorLayout.width - AccessibilityHelpWidget.WIDTH) / 2); - this._domNode.setLeft(left); - } -} - -@editorAction -class ShowAccessibilityHelpAction extends EditorAction { - - constructor() { - super({ - id: 'editor.action.showAccessibilityHelp', - label: nls.localize('ShowAccessibilityHelpAction', "Show Accessibility Help"), - alias: 'Show Accessibility Help', - precondition: null, - kbOpts: { - kbExpr: EditorContextKeys.focus, - primary: KeyMod.Alt | KeyCode.F1 - } - }); - } - - public run(accessor: ServicesAccessor, editor: ICommonCodeEditor): void { - let controller = AccessibilityHelpController.get(editor); - if (controller) { - controller.show(); - } - } -} - -const AccessibilityHelpCommand = EditorCommand.bindToContribution(AccessibilityHelpController.get); - -CommonEditorRegistry.registerEditorCommand(new AccessibilityHelpCommand({ - id: 'closeAccessibilityHelp', - precondition: CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE, - handler: x => x.hide(), - kbOpts: { - weight: CommonEditorRegistry.commandWeight(100), - kbExpr: EditorContextKeys.focus, - primary: KeyCode.Escape, secondary: [KeyMod.Shift | KeyCode.Escape] - } -})); - -class ToggleExperimentalScreenReaderSupportCommand extends Command { - constructor() { - super({ - id: TOGGLE_EXPERIMENTAL_SCREEN_READER_SUPPORT_COMMAND_ID, - precondition: null, - kbOpts: { - weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - kbExpr: null, - primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_R - } - }); - } - - public runCommand(accessor: ServicesAccessor, args: any): void { - let currentValue = GlobalScreenReaderNVDA.getValue(); - GlobalScreenReaderNVDA.setValue(!currentValue); - } -} -const command = new ToggleExperimentalScreenReaderSupportCommand(); -KeybindingsRegistry.registerCommandAndKeybindingRule(command.toCommandAndKeybindingRule(KeybindingsRegistry.WEIGHT.editorContrib())); - -registerThemingParticipant((theme, collector) => { - let widgetBackground = theme.getColor(editorWidgetBackground); - if (widgetBackground) { - collector.addRule(`.monaco-editor.${theme.selector} .accessibilityHelpWidget { background-color: ${widgetBackground}; }`); - } - - let widgetShadowColor = theme.getColor(widgetShadow); - if (widgetShadowColor) { - collector.addRule(`.monaco-editor.${theme.selector} .accessibilityHelpWidget { box-shadow: 0 2px 8px ${widgetShadowColor}; }`); - } - - let hcBorder = theme.getColor(contrastBorder); - if (hcBorder) { - collector.addRule(`.monaco-editor.${theme.selector} .accessibilityHelpWidget { border: 2px solid ${hcBorder}; }`); - } -}); diff --git a/src/vs/editor/contrib/bracketMatching/browser/bracketMatching.css b/src/vs/editor/contrib/bracketMatching/browser/bracketMatching.css index 161b88a13d912..3acf3fd25bf6a 100644 --- a/src/vs/editor/contrib/bracketMatching/browser/bracketMatching.css +++ b/src/vs/editor/contrib/bracketMatching/browser/bracketMatching.css @@ -5,8 +5,4 @@ .monaco-editor .bracket-match { box-sizing: border-box; - background-color: rgba(0, 100, 0, 0.1); } -.monaco-editor.vs .bracket-match { border: 1px solid #B9B9B9; } -.monaco-editor.vs-dark .bracket-match { border: 1px solid #888; } -.monaco-editor.hc-black .bracket-match { border: 1px solid #fff; } diff --git a/src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts b/src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts index a439d5067f5cc..7b79df152e732 100644 --- a/src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts +++ b/src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts @@ -13,8 +13,10 @@ import { Position } from 'vs/editor/common/core/position'; import { RunOnceScheduler } from 'vs/base/common/async'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { editorAction, commonEditorContribution, ServicesAccessor, EditorAction } from 'vs/editor/common/editorCommonExtensions'; -import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { editorBracketMatchBackground, editorBracketMatchBorder } from 'vs/editor/common/view/editorColorRegistry'; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; @editorAction class SelectBracketAction extends EditorAction { @@ -69,8 +71,7 @@ export class BracketMatchingController extends Disposable implements editorCommo private _matchBrackets: boolean; constructor( - editor: editorCommon.ICommonCodeEditor, - @IConfigurationService private configurationService: IConfigurationService + editor: editorCommon.ICommonCodeEditor ) { super(); this._editor = editor; @@ -81,7 +82,16 @@ export class BracketMatchingController extends Disposable implements editorCommo this._matchBrackets = this._editor.getConfiguration().contribInfo.matchBrackets; this._updateBracketsSoon.schedule(); - this._register(editor.onDidChangeCursorPosition((e) => this._updateBracketsSoon.schedule())); + this._register(editor.onDidChangeCursorPosition((e) => { + + if (!this._matchBrackets) { + // Early exit if nothing needs to be done! + // Leave some form of early exit check here if you wish to continue being a cursor position change listener ;) + return; + } + + this._updateBracketsSoon.schedule(); + })); this._register(editor.onDidChangeModel((e) => { this._decorations = []; this._updateBracketsSoon.schedule(); })); this._register(editor.onDidChangeConfiguration((e) => { this._matchBrackets = this._editor.getConfiguration().contribInfo.matchBrackets; @@ -127,10 +137,10 @@ export class BracketMatchingController extends Disposable implements editorCommo } } - private static _DECORATION_OPTIONS: editorCommon.IModelDecorationOptions = { + private static _DECORATION_OPTIONS = ModelDecorationOptions.register({ stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, className: 'bracket-match' - }; + }); private _updateBrackets(): void { if (!this._matchBrackets) { @@ -204,3 +214,14 @@ export class BracketMatchingController extends Disposable implements editorCommo this._lastVersionId = versionId; } } + +registerThemingParticipant((theme, collector) => { + let bracketMatchBackground = theme.getColor(editorBracketMatchBackground); + if (bracketMatchBackground) { + collector.addRule(`.monaco-editor .bracket-match { background-color: ${bracketMatchBackground}; }`); + } + let bracketMatchBorder = theme.getColor(editorBracketMatchBorder); + if (bracketMatchBorder) { + collector.addRule(`.monaco-editor .bracket-match { border: 1px solid ${bracketMatchBorder}; }`); + } +}); \ No newline at end of file diff --git a/src/vs/editor/contrib/caretOperations/common/caretOperations.ts b/src/vs/editor/contrib/caretOperations/common/caretOperations.ts index aec00037cb5c0..96e935bd69d78 100644 --- a/src/vs/editor/contrib/caretOperations/common/caretOperations.ts +++ b/src/vs/editor/contrib/caretOperations/common/caretOperations.ts @@ -29,7 +29,9 @@ class MoveCaretAction extends EditorAction { commands.push(new MoveCaretCommand(selections[i], this.left)); } + editor.pushUndoStop(); editor.executeCommands(this.id, commands); + editor.pushUndoStop(); } } diff --git a/src/vs/editor/contrib/caretOperations/common/transpose.ts b/src/vs/editor/contrib/caretOperations/common/transpose.ts index fbb8780585655..5ca66ce287d6a 100644 --- a/src/vs/editor/contrib/caretOperations/common/transpose.ts +++ b/src/vs/editor/contrib/caretOperations/common/transpose.ts @@ -63,7 +63,9 @@ class TransposeLettersAction extends EditorAction { } if (commands.length > 0) { + editor.pushUndoStop(); editor.executeCommands(this.id, commands); + editor.pushUndoStop(); } } } diff --git a/src/vs/editor/contrib/clipboard/browser/clipboard.ts b/src/vs/editor/contrib/clipboard/browser/clipboard.ts index 2dd0f763ede74..9ef4294f72884 100644 --- a/src/vs/editor/contrib/clipboard/browser/clipboard.ts +++ b/src/vs/editor/contrib/clipboard/browser/clipboard.ts @@ -13,7 +13,7 @@ import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { editorAction, IActionOptions, EditorAction } from 'vs/editor/common/editorCommonExtensions'; -import { CopyOptions } from 'vs/editor/common/controller/textAreaHandler'; +import { CopyOptions } from 'vs/editor/browser/controller/textAreaInput'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; const CLIPBOARD_CONTEXT_MENU_GROUP = '9_cutcopypaste'; @@ -81,9 +81,9 @@ class ExecCommandCutAction extends ExecCommandAction { } public run(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor): void { - var enableEmptySelectionClipboard = editor.getConfiguration().contribInfo.emptySelectionClipboard && browser.enableEmptySelectionClipboard; + const emptySelectionClipboard = editor.getConfiguration().emptySelectionClipboard; - if (!enableEmptySelectionClipboard && editor.getSelection().isEmpty()) { + if (!emptySelectionClipboard && editor.getSelection().isEmpty()) { return; } @@ -113,9 +113,9 @@ class ExecCommandCopyAction extends ExecCommandAction { } public run(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor): void { - var enableEmptySelectionClipboard = editor.getConfiguration().contribInfo.emptySelectionClipboard && browser.enableEmptySelectionClipboard; + const emptySelectionClipboard = editor.getConfiguration().emptySelectionClipboard; - if (!enableEmptySelectionClipboard && editor.getSelection().isEmpty()) { + if (!emptySelectionClipboard && editor.getSelection().isEmpty()) { return; } @@ -162,9 +162,9 @@ class ExecCommandCopyWithSyntaxHighlightingAction extends ExecCommandAction { } public run(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor): void { - var enableEmptySelectionClipboard = editor.getConfiguration().contribInfo.emptySelectionClipboard && browser.enableEmptySelectionClipboard; + const emptySelectionClipboard = editor.getConfiguration().emptySelectionClipboard; - if (!enableEmptySelectionClipboard && editor.getSelection().isEmpty()) { + if (!emptySelectionClipboard && editor.getSelection().isEmpty()) { return; } diff --git a/src/vs/editor/contrib/codelens/browser/codelens.css b/src/vs/editor/contrib/codelens/browser/codelens.css deleted file mode 100644 index 8cd27141065ff..0000000000000 --- a/src/vs/editor/contrib/codelens/browser/codelens.css +++ /dev/null @@ -1,52 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -.monaco-editor .codelens-decoration { - overflow: hidden; - display: inline-block; - text-overflow: ellipsis; - font-size: 90%; - color: #999999; -} - -.monaco-editor .codelens-decoration > span, -.monaco-editor .codelens-decoration > a { - -moz-user-select: none; - -webkit-user-select: none; - -ms-user-select: none; - user-select: none; - white-space: nowrap; - vertical-align: sub; -} - -.monaco-editor .codelens-decoration > a { - text-decoration: none; -} - -.monaco-editor .codelens-decoration > a:hover { - text-decoration: underline; - cursor: pointer; - color: blue !important; -} - -.monaco-editor.vs-dark .codelens-decoration > a:hover { - color: #4E94CE !important; -} - -.monaco-editor .codelens-decoration.invisible-cl { - opacity: 0; -} - -@keyframes fadein { 0% { opacity:0; visibility:visible;} 100% { opacity:1; } } -@-moz-keyframes fadein { 0% { opacity:0; visibility:visible;} 100% { opacity:1; } } -@-o-keyframes fadein { 0% { opacity:0; visibility:visible;} 100% { opacity:1; } } -@-webkit-keyframes fadein { 0% { opacity:0; visibility:visible;} 100% { opacity:1; } } - -.monaco-editor .codelens-decoration.fadein { - -webkit-animation: fadein 0.5s linear; - -moz-animation: fadein 0.5s linear; - -o-animation: fadein 0.5s linear; - animation: fadein 0.5s linear; -} \ No newline at end of file diff --git a/src/vs/editor/contrib/codelens/browser/codelens.ts b/src/vs/editor/contrib/codelens/browser/codelens.ts index 9e2f14a662dc3..0c7d563cc55e9 100644 --- a/src/vs/editor/contrib/codelens/browser/codelens.ts +++ b/src/vs/editor/contrib/codelens/browser/codelens.ts @@ -5,618 +5,68 @@ 'use strict'; -import 'vs/css!./codelens'; -import { RunOnceScheduler, asWinJsPromise } from 'vs/base/common/async'; -import { onUnexpectedError } from 'vs/base/common/errors'; -import { Disposables, IDisposable, dispose } from 'vs/base/common/lifecycle'; -import Severity from 'vs/base/common/severity'; -import { format, escape } from 'vs/base/common/strings'; +import { illegalArgument, onUnexpectedExternalError } from 'vs/base/common/errors'; +import { mergeSort } from 'vs/base/common/arrays'; +import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; -import * as dom from 'vs/base/browser/dom'; -import { ICommandService } from 'vs/platform/commands/common/commands'; -import { IMessageService } from 'vs/platform/message/common/message'; -import { Range } from 'vs/editor/common/core/range'; -import * as editorCommon from 'vs/editor/common/editorCommon'; -import { CodeLensProviderRegistry, CodeLensProvider, ICodeLensSymbol, Command } from 'vs/editor/common/modes'; -import * as editorBrowser from 'vs/editor/browser/editorBrowser'; -import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; -import { ICodeLensData, getCodeLensData } from '../common/codelens'; -import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; - - -class CodeLensViewZone implements editorBrowser.IViewZone { - - public afterLineNumber: number; - public heightInLines: number; - public suppressMouseDown: boolean; - public domNode: HTMLElement; - private _lastHeight: number; - private _onHeight: Function; - - constructor(afterLineNumber: number, onHeight: Function) { - this.afterLineNumber = afterLineNumber; - this._onHeight = onHeight; - - this.heightInLines = 1; - this.suppressMouseDown = true; - this.domNode = document.createElement('div'); - } - - public setAfterLineNumber(afterLineNumber: number): void { - this.afterLineNumber = afterLineNumber; - } - - onComputedHeight(height: number): void { - if (this._lastHeight === undefined) { - this._lastHeight = height; - } else if (this._lastHeight !== height) { - this._lastHeight = height; - this._onHeight(); - } - } - +import { IModel } from 'vs/editor/common/editorCommon'; +import { CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; +import { CodeLensProviderRegistry, CodeLensProvider, ICodeLensSymbol } from 'vs/editor/common/modes'; +import { IModelService } from 'vs/editor/common/services/modelService'; +import { asWinJsPromise } from 'vs/base/common/async'; + +export interface ICodeLensData { + symbol: ICodeLensSymbol; + provider: CodeLensProvider; } -class CodeLensContentWidget implements editorBrowser.IContentWidget { - - private static ID: number = 0; - - // Editor.IContentWidget.allowEditorOverflow - readonly allowEditorOverflow = false; - - public suppressMouseDown: boolean; - - private _id: string; - - private _domNode: HTMLElement; - private _subscription: IDisposable; - private _symbolRange: Range; - private _widgetPosition: editorBrowser.IContentWidgetPosition; - private _editor: editorBrowser.ICodeEditor; - private _commands: { [id: string]: Command } = Object.create(null); +export function getCodeLensData(model: IModel): TPromise { - public constructor(editor: editorBrowser.ICodeEditor, symbolRange: Range, - commandService: ICommandService, messageService: IMessageService) { + const symbols: ICodeLensData[] = []; + const provider = CodeLensProviderRegistry.ordered(model); - this._id = 'codeLensWidget' + (++CodeLensContentWidget.ID); - this._editor = editor; - - this.suppressMouseDown = true; - - this.setSymbolRange(symbolRange); - - this._domNode = document.createElement('span'); - const lineHeight = editor.getConfiguration().lineHeight; - this._domNode.style.height = `${lineHeight}px`; - this._domNode.style.lineHeight = `${lineHeight}px`; - this._domNode.innerHTML = ' '; - dom.addClass(this._domNode, 'codelens-decoration'); - dom.addClass(this._domNode, 'invisible-cl'); - this._subscription = dom.addDisposableListener(this._domNode, 'click', e => { - let element = e.target; - if (element.tagName === 'A' && element.id) { - let command = this._commands[element.id]; - if (command) { - editor.focus(); - commandService.executeCommand(command.id, ...command.arguments).done(undefined, err => { - messageService.show(Severity.Error, err); - }); - } + const promises = provider.map(provider => asWinJsPromise(token => provider.provideCodeLenses(model, token)).then(result => { + if (Array.isArray(result)) { + for (let symbol of result) { + symbols.push({ symbol, provider }); } - }); - - this.updateVisibility(); - } - - public dispose(): void { - this._subscription.dispose(); - this._symbolRange = null; - } - - public updateVisibility(): void { - if (this.isVisible()) { - dom.removeClass(this._domNode, 'invisible-cl'); - dom.addClass(this._domNode, 'fadein'); - } - } - - public withCommands(symbols: ICodeLensSymbol[]): void { - this._commands = Object.create(null); - if (!symbols || !symbols.length) { - this._domNode.innerHTML = 'no commands'; - return; - } - - let html: string[] = []; - for (let i = 0; i < symbols.length; i++) { - let command = symbols[i].command; - let title = escape(command.title); - let part: string; - if (command.id) { - part = format('{1}', i, title); - this._commands[i] = command; - } else { - part = format('{0}', title); - } - html.push(part); - } - - this._domNode.innerHTML = html.join(' | '); - this._editor.layoutContentWidget(this); - } - - public getId(): string { - return this._id; - } - - public getDomNode(): HTMLElement { - return this._domNode; - } - - public setSymbolRange(range: Range): void { - this._symbolRange = range; - - const lineNumber = range.startLineNumber; - const column = this._editor.getModel().getLineFirstNonWhitespaceColumn(lineNumber); - this._widgetPosition = { - position: { lineNumber: lineNumber, column: column }, - preference: [editorBrowser.ContentWidgetPositionPreference.ABOVE] - }; - } - - public getPosition(): editorBrowser.IContentWidgetPosition { - return this._widgetPosition; - } - - public isVisible(): boolean { - return this._domNode.hasAttribute('monaco-visible-content-widget'); - } -} - -interface IDecorationIdCallback { - (decorationId: string): void; -} - -class CodeLensHelper { - - private _removeDecorations: string[]; - private _addDecorations: editorCommon.IModelDeltaDecoration[]; - private _addDecorationsCallbacks: IDecorationIdCallback[]; - - constructor() { - this._removeDecorations = []; - this._addDecorations = []; - this._addDecorationsCallbacks = []; - } - - public addDecoration(decoration: editorCommon.IModelDeltaDecoration, callback: IDecorationIdCallback): void { - this._addDecorations.push(decoration); - this._addDecorationsCallbacks.push(callback); - } - - public removeDecoration(decorationId: string): void { - this._removeDecorations.push(decorationId); - } - - public commit(changeAccessor: editorCommon.IModelDecorationsChangeAccessor): void { - var resultingDecorations = changeAccessor.deltaDecorations(this._removeDecorations, this._addDecorations); - for (let i = 0, len = resultingDecorations.length; i < len; i++) { - this._addDecorationsCallbacks[i](resultingDecorations[i]); } - } -} - -class CodeLens { - - private _viewZone: CodeLensViewZone; - private _viewZoneId: number; - private _contentWidget: CodeLensContentWidget; - private _decorationIds: string[]; - private _data: ICodeLensData[]; - private _editor: editorBrowser.ICodeEditor; - - public constructor( - data: ICodeLensData[], - editor: editorBrowser.ICodeEditor, - helper: CodeLensHelper, - viewZoneChangeAccessor: editorBrowser.IViewZoneChangeAccessor, - commandService: ICommandService, messageService: IMessageService, - updateCallabck: Function - ) { - - this._editor = editor; - this._data = data; - this._decorationIds = new Array(this._data.length); - - let range: Range; - this._data.forEach((codeLensData, i) => { - - helper.addDecoration({ - range: codeLensData.symbol.range, - options: {} - }, id => this._decorationIds[i] = id); - - // the range contains all lenses on this line - if (!range) { - range = Range.lift(codeLensData.symbol.range); + }, onUnexpectedExternalError)); + + return TPromise.join(promises).then(() => { + + return mergeSort(symbols, (a, b) => { + // sort by lineNumber, provider-rank, and column + if (a.symbol.range.startLineNumber < b.symbol.range.startLineNumber) { + return -1; + } else if (a.symbol.range.startLineNumber > b.symbol.range.startLineNumber) { + return 1; + } else if (provider.indexOf(a.provider) < provider.indexOf(b.provider)) { + return -1; + } else if (provider.indexOf(a.provider) > provider.indexOf(b.provider)) { + return 1; + } else if (a.symbol.range.startColumn < b.symbol.range.startColumn) { + return -1; + } else if (a.symbol.range.startColumn > b.symbol.range.startColumn) { + return 1; } else { - range = Range.plusRange(range, codeLensData.symbol.range); + return 0; } }); - - this._contentWidget = new CodeLensContentWidget(editor, range, commandService, messageService); - this._viewZone = new CodeLensViewZone(range.startLineNumber - 1, updateCallabck); - - this._viewZoneId = viewZoneChangeAccessor.addZone(this._viewZone); - this._editor.addContentWidget(this._contentWidget); - } - - public dispose(helper: CodeLensHelper, viewZoneChangeAccessor: editorBrowser.IViewZoneChangeAccessor): void { - while (this._decorationIds.length) { - helper.removeDecoration(this._decorationIds.pop()); - } - if (viewZoneChangeAccessor) { - viewZoneChangeAccessor.removeZone(this._viewZoneId); - } - this._editor.removeContentWidget(this._contentWidget); - - this._contentWidget.dispose(); - } - - public isValid(): boolean { - return this._decorationIds.some((id, i) => { - const range = this._editor.getModel().getDecorationRange(id); - const symbol = this._data[i].symbol; - return range && Range.isEmpty(symbol.range) === range.isEmpty(); - }); - } - - public updateCodeLensSymbols(data: ICodeLensData[], helper: CodeLensHelper): void { - while (this._decorationIds.length) { - helper.removeDecoration(this._decorationIds.pop()); - } - this._data = data; - this._decorationIds = new Array(this._data.length); - this._data.forEach((codeLensData, i) => { - helper.addDecoration({ - range: codeLensData.symbol.range, - options: {} - }, id => this._decorationIds[i] = id); - }); - } - - public computeIfNecessary(model: editorCommon.IModel): ICodeLensData[] { - this._contentWidget.updateVisibility(); // trigger the fade in - if (!this._contentWidget.isVisible()) { - return null; - } - - // Read editor current state - for (let i = 0; i < this._decorationIds.length; i++) { - this._data[i].symbol.range = model.getDecorationRange(this._decorationIds[i]); - } - return this._data; - } - - public updateCommands(symbols: ICodeLensSymbol[]): void { - this._contentWidget.withCommands(symbols); - } - - public getLineNumber(): number { - const range = this._editor.getModel().getDecorationRange(this._decorationIds[0]); - if (range) { - return range.startLineNumber; - } - return -1; - } - - public update(viewZoneChangeAccessor: editorBrowser.IViewZoneChangeAccessor): void { - if (this.isValid()) { - const range = this._editor.getModel().getDecorationRange(this._decorationIds[0]); - - this._viewZone.setAfterLineNumber(range.startLineNumber - 1); - viewZoneChangeAccessor.layoutZone(this._viewZoneId); - - this._contentWidget.setSymbolRange(range); - this._editor.layoutContentWidget(this._contentWidget); - } - } + }); } -@editorContribution -export class CodeLensContribution implements editorCommon.IEditorContribution { - - private static ID: string = 'css.editor.codeLens'; - - private _isEnabled: boolean; - - private _globalToDispose: IDisposable[]; - private _localToDispose: IDisposable[]; - private _lenses: CodeLens[]; - private _currentFindCodeLensSymbolsPromise: TPromise; - private _modelChangeCounter: number; - private _currentFindOccPromise: TPromise; - private _detectVisibleLenses: RunOnceScheduler; - - constructor( - private _editor: editorBrowser.ICodeEditor, - @ICommandService private _commandService: ICommandService, - @IMessageService private _messageService: IMessageService - ) { - this._isEnabled = this._editor.getConfiguration().contribInfo.codeLens; - - this._globalToDispose = []; - this._localToDispose = []; - this._lenses = []; - this._currentFindCodeLensSymbolsPromise = null; - this._modelChangeCounter = 0; - - this._globalToDispose.push(this._editor.onDidChangeModel(() => this.onModelChange())); - this._globalToDispose.push(this._editor.onDidChangeModelLanguage(() => this.onModelChange())); - this._globalToDispose.push(this._editor.onDidChangeConfiguration((e: IConfigurationChangedEvent) => { - let prevIsEnabled = this._isEnabled; - this._isEnabled = this._editor.getConfiguration().contribInfo.codeLens; - if (prevIsEnabled !== this._isEnabled) { - this.onModelChange(); - } - })); - this._globalToDispose.push(CodeLensProviderRegistry.onDidChange(this.onModelChange, this)); - this.onModelChange(); - } - - public dispose(): void { - this.localDispose(); - this._globalToDispose = dispose(this._globalToDispose); - } - - private localDispose(): void { - if (this._currentFindCodeLensSymbolsPromise) { - this._currentFindCodeLensSymbolsPromise.cancel(); - this._currentFindCodeLensSymbolsPromise = null; - this._modelChangeCounter++; - } - if (this._currentFindOccPromise) { - this._currentFindOccPromise.cancel(); - this._currentFindOccPromise = null; - } - this._localToDispose = dispose(this._localToDispose); - } - - public getId(): string { - return CodeLensContribution.ID; - } - - private onModelChange(): void { - - this.localDispose(); - - const model = this._editor.getModel(); - if (!model) { - return; - } - - if (!this._isEnabled) { - return; - } - - if (!CodeLensProviderRegistry.has(model)) { - return; - } - - const providerSubscriptions = new Disposables(); - this._localToDispose.push(providerSubscriptions); - - const onEvent = () => { - providerSubscriptions.dispose(); - scheduler.schedule(); - }; - - const subscribeToProviders = (result: ICodeLensData[]) => { - const seen = new Set(); - - for (const { provider } of result) { - if (provider.onDidChange && !seen.has(provider)) { - providerSubscriptions.add(provider.onDidChange(onEvent)); - seen.add(provider); - } - } - }; - - this._detectVisibleLenses = new RunOnceScheduler(() => { - this._onViewportChanged(model.getLanguageIdentifier().language); - }, 500); - - const scheduler = new RunOnceScheduler(() => { - if (this._currentFindCodeLensSymbolsPromise) { - this._currentFindCodeLensSymbolsPromise.cancel(); - } - - this._currentFindCodeLensSymbolsPromise = getCodeLensData(model); - - const counterValue = ++this._modelChangeCounter; - this._currentFindCodeLensSymbolsPromise.then((result) => { - if (counterValue === this._modelChangeCounter) { // only the last one wins - this.renderCodeLensSymbols(result); - subscribeToProviders(result); - this._detectVisibleLenses.schedule(); - } - }, (error) => { - onUnexpectedError(error); - }); - }, 250); - this._localToDispose.push(scheduler); - this._localToDispose.push(this._detectVisibleLenses); - this._localToDispose.push(this._editor.onDidChangeModelContent((e) => { - this._editor.changeDecorations((changeAccessor) => { - this._editor.changeViewZones((viewAccessor) => { - const toDispose: CodeLens[] = []; - this._lenses.forEach((lens) => { - if (lens.isValid()) { - lens.update(viewAccessor); - } else { - toDispose.push(lens); - } - }); +CommonEditorRegistry.registerLanguageCommand('_executeCodeLensProvider', function (accessor, args) { - let helper = new CodeLensHelper(); - toDispose.forEach((l) => { - l.dispose(helper, viewAccessor); - this._lenses.splice(this._lenses.indexOf(l), 1); - }); - helper.commit(changeAccessor); - }); - }); - - // Compute new `visible` code lenses - this._detectVisibleLenses.schedule(); - // Ask for all references again - scheduler.schedule(); - })); - this._localToDispose.push(this._editor.onDidScrollChange((e) => { - if (e.scrollTopChanged) { - this._detectVisibleLenses.schedule(); - } - })); - this._localToDispose.push({ - dispose: () => { - if (this._editor.getModel()) { - this._editor.changeDecorations((changeAccessor) => { - this._editor.changeViewZones((accessor) => { - this._disposeAllLenses(changeAccessor, accessor); - }); - }); - } else { - // No accessors available - this._disposeAllLenses(null, null); - } - } - }); - - scheduler.schedule(); + const { resource } = args; + if (!(resource instanceof URI)) { + throw illegalArgument(); } - private _disposeAllLenses(decChangeAccessor: editorCommon.IModelDecorationsChangeAccessor, viewZoneChangeAccessor: editorBrowser.IViewZoneChangeAccessor): void { - let helper = new CodeLensHelper(); - this._lenses.forEach((lens) => lens.dispose(helper, viewZoneChangeAccessor)); - if (decChangeAccessor) { - helper.commit(decChangeAccessor); - } - this._lenses = []; + const model = accessor.get(IModelService).getModel(resource); + if (!model) { + throw illegalArgument(); } - private renderCodeLensSymbols(symbols: ICodeLensData[]): void { - if (!this._editor.getModel()) { - return; - } - - let maxLineNumber = this._editor.getModel().getLineCount(); - let groups: ICodeLensData[][] = []; - let lastGroup: ICodeLensData[]; - - for (let symbol of symbols) { - let line = symbol.symbol.range.startLineNumber; - if (line < 1 || line > maxLineNumber) { - // invalid code lens - continue; - } else if (lastGroup && lastGroup[lastGroup.length - 1].symbol.range.startLineNumber === line) { - // on same line as previous - lastGroup.push(symbol); - } else { - // on later line as previous - lastGroup = [symbol]; - groups.push(lastGroup); - } - } - - const centeredRange = this._editor.getCenteredRangeInViewport(); - const shouldRestoreCenteredRange = centeredRange && (groups.length !== this._lenses.length && this._editor.getScrollTop() !== 0); - this._editor.changeDecorations((changeAccessor) => { - this._editor.changeViewZones((accessor) => { - - let codeLensIndex = 0, groupsIndex = 0, helper = new CodeLensHelper(); - - while (groupsIndex < groups.length && codeLensIndex < this._lenses.length) { - - let symbolsLineNumber = groups[groupsIndex][0].symbol.range.startLineNumber; - let codeLensLineNumber = this._lenses[codeLensIndex].getLineNumber(); - - if (codeLensLineNumber < symbolsLineNumber) { - this._lenses[codeLensIndex].dispose(helper, accessor); - this._lenses.splice(codeLensIndex, 1); - } else if (codeLensLineNumber === symbolsLineNumber) { - this._lenses[codeLensIndex].updateCodeLensSymbols(groups[groupsIndex], helper); - groupsIndex++; - codeLensIndex++; - } else { - this._lenses.splice(codeLensIndex, 0, new CodeLens(groups[groupsIndex], this._editor, helper, accessor, this._commandService, this._messageService, () => this._detectVisibleLenses.schedule())); - codeLensIndex++; - groupsIndex++; - } - } - - // Delete extra code lenses - while (codeLensIndex < this._lenses.length) { - this._lenses[codeLensIndex].dispose(helper, accessor); - this._lenses.splice(codeLensIndex, 1); - } - - // Create extra symbols - while (groupsIndex < groups.length) { - this._lenses.push(new CodeLens(groups[groupsIndex], this._editor, helper, accessor, this._commandService, this._messageService, () => this._detectVisibleLenses.schedule())); - groupsIndex++; - } - - helper.commit(changeAccessor); - }); - }); - if (shouldRestoreCenteredRange) { - this._editor.revealRangeInCenter(centeredRange); - } - } - - private _onViewportChanged(modeId: string): void { - if (this._currentFindOccPromise) { - this._currentFindOccPromise.cancel(); - this._currentFindOccPromise = null; - } - - const model = this._editor.getModel(); - if (!model) { - return; - } - - const toResolve: ICodeLensData[][] = []; - const lenses: CodeLens[] = []; - this._lenses.forEach((lens) => { - const request = lens.computeIfNecessary(model); - if (request) { - toResolve.push(request); - lenses.push(lens); - } - }); - - if (toResolve.length === 0) { - return; - } - - const promises = toResolve.map((request, i) => { - - const resolvedSymbols = new Array(request.length); - const promises = request.map((request, i) => { - return asWinJsPromise((token) => { - return request.provider.resolveCodeLens(model, request.symbol, token); - }).then(symbol => { - resolvedSymbols[i] = symbol; - }); - }); - - return TPromise.join(promises).then(() => { - lenses[i].updateCommands(resolvedSymbols); - }); - }); - - this._currentFindOccPromise = TPromise.join(promises).then(() => { - this._currentFindOccPromise = null; - }); - } -} + return getCodeLensData(model).then(value => value.map(item => item.symbol)); +}); diff --git a/src/vs/editor/contrib/codelens/browser/codelensController.ts b/src/vs/editor/contrib/codelens/browser/codelensController.ts new file mode 100644 index 0000000000000..fd51d3e30a56e --- /dev/null +++ b/src/vs/editor/contrib/codelens/browser/codelensController.ts @@ -0,0 +1,306 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { RunOnceScheduler, asWinJsPromise } from 'vs/base/common/async'; +import { onUnexpectedError } from 'vs/base/common/errors'; +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { ICommandService } from 'vs/platform/commands/common/commands'; +import { IMessageService } from 'vs/platform/message/common/message'; +import * as editorCommon from 'vs/editor/common/editorCommon'; +import { CodeLensProviderRegistry, ICodeLensSymbol } from 'vs/editor/common/modes'; +import * as editorBrowser from 'vs/editor/browser/editorBrowser'; +import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; +import { ICodeLensData, getCodeLensData } from './codelens'; +import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; +import { CodeLens, CodeLensHelper } from 'vs/editor/contrib/codelens/browser/codelensWidget'; + +@editorContribution +export class CodeLensContribution implements editorCommon.IEditorContribution { + + private static ID: string = 'css.editor.codeLens'; + + private _isEnabled: boolean; + + private _globalToDispose: IDisposable[]; + private _localToDispose: IDisposable[]; + private _lenses: CodeLens[]; + private _currentFindCodeLensSymbolsPromise: TPromise; + private _modelChangeCounter: number; + private _currentFindOccPromise: TPromise; + private _detectVisibleLenses: RunOnceScheduler; + + constructor( + private _editor: editorBrowser.ICodeEditor, + @ICommandService private _commandService: ICommandService, + @IMessageService private _messageService: IMessageService + ) { + this._isEnabled = this._editor.getConfiguration().contribInfo.codeLens; + + this._globalToDispose = []; + this._localToDispose = []; + this._lenses = []; + this._currentFindCodeLensSymbolsPromise = null; + this._modelChangeCounter = 0; + + this._globalToDispose.push(this._editor.onDidChangeModel(() => this._onModelChange())); + this._globalToDispose.push(this._editor.onDidChangeModelLanguage(() => this._onModelChange())); + this._globalToDispose.push(this._editor.onDidChangeConfiguration((e: IConfigurationChangedEvent) => { + let prevIsEnabled = this._isEnabled; + this._isEnabled = this._editor.getConfiguration().contribInfo.codeLens; + if (prevIsEnabled !== this._isEnabled) { + this._onModelChange(); + } + })); + this._globalToDispose.push(CodeLensProviderRegistry.onDidChange(this._onModelChange, this)); + this._onModelChange(); + } + + dispose(): void { + this._localDispose(); + this._globalToDispose = dispose(this._globalToDispose); + } + + private _localDispose(): void { + if (this._currentFindCodeLensSymbolsPromise) { + this._currentFindCodeLensSymbolsPromise.cancel(); + this._currentFindCodeLensSymbolsPromise = null; + this._modelChangeCounter++; + } + if (this._currentFindOccPromise) { + this._currentFindOccPromise.cancel(); + this._currentFindOccPromise = null; + } + this._localToDispose = dispose(this._localToDispose); + } + + getId(): string { + return CodeLensContribution.ID; + } + + private _onModelChange(): void { + + this._localDispose(); + + const model = this._editor.getModel(); + if (!model) { + return; + } + + if (!this._isEnabled) { + return; + } + + if (!CodeLensProviderRegistry.has(model)) { + return; + } + + for (const provider of CodeLensProviderRegistry.all(model)) { + if (typeof provider.onDidChange === 'function') { + let registration = provider.onDidChange(() => scheduler.schedule()); + this._localToDispose.push(registration); + } + } + + this._detectVisibleLenses = new RunOnceScheduler(() => { + this._onViewportChanged(model.getLanguageIdentifier().language); + }, 500); + + const scheduler = new RunOnceScheduler(() => { + if (this._currentFindCodeLensSymbolsPromise) { + this._currentFindCodeLensSymbolsPromise.cancel(); + } + + this._currentFindCodeLensSymbolsPromise = getCodeLensData(model); + + const counterValue = ++this._modelChangeCounter; + this._currentFindCodeLensSymbolsPromise.then((result) => { + if (counterValue === this._modelChangeCounter) { // only the last one wins + this._renderCodeLensSymbols(result); + this._detectVisibleLenses.schedule(); + } + }, onUnexpectedError); + }, 250); + this._localToDispose.push(scheduler); + this._localToDispose.push(this._detectVisibleLenses); + this._localToDispose.push(this._editor.onDidChangeModelContent((e) => { + this._editor.changeDecorations((changeAccessor) => { + this._editor.changeViewZones((viewAccessor) => { + const toDispose: CodeLens[] = []; + this._lenses.forEach((lens) => { + if (lens.isValid()) { + lens.update(viewAccessor); + } else { + toDispose.push(lens); + } + }); + + let helper = new CodeLensHelper(); + toDispose.forEach((l) => { + l.dispose(helper, viewAccessor); + this._lenses.splice(this._lenses.indexOf(l), 1); + }); + helper.commit(changeAccessor); + }); + }); + + // Compute new `visible` code lenses + this._detectVisibleLenses.schedule(); + // Ask for all references again + scheduler.schedule(); + })); + this._localToDispose.push(this._editor.onDidScrollChange(e => { + if (e.scrollTopChanged) { + this._detectVisibleLenses.schedule(); + } + })); + this._localToDispose.push(this._editor.onDidLayoutChange(e => { + this._detectVisibleLenses.schedule(); + })); + this._localToDispose.push({ + dispose: () => { + if (this._editor.getModel()) { + this._editor.changeDecorations((changeAccessor) => { + this._editor.changeViewZones((accessor) => { + this._disposeAllLenses(changeAccessor, accessor); + }); + }); + } else { + // No accessors available + this._disposeAllLenses(null, null); + } + } + }); + + scheduler.schedule(); + } + + private _disposeAllLenses(decChangeAccessor: editorCommon.IModelDecorationsChangeAccessor, viewZoneChangeAccessor: editorBrowser.IViewZoneChangeAccessor): void { + let helper = new CodeLensHelper(); + this._lenses.forEach((lens) => lens.dispose(helper, viewZoneChangeAccessor)); + if (decChangeAccessor) { + helper.commit(decChangeAccessor); + } + this._lenses = []; + } + + private _renderCodeLensSymbols(symbols: ICodeLensData[]): void { + if (!this._editor.getModel()) { + return; + } + + let maxLineNumber = this._editor.getModel().getLineCount(); + let groups: ICodeLensData[][] = []; + let lastGroup: ICodeLensData[]; + + for (let symbol of symbols) { + let line = symbol.symbol.range.startLineNumber; + if (line < 1 || line > maxLineNumber) { + // invalid code lens + continue; + } else if (lastGroup && lastGroup[lastGroup.length - 1].symbol.range.startLineNumber === line) { + // on same line as previous + lastGroup.push(symbol); + } else { + // on later line as previous + lastGroup = [symbol]; + groups.push(lastGroup); + } + } + + const centeredRange = this._editor.getCenteredRangeInViewport(); + const shouldRestoreCenteredRange = centeredRange && (groups.length !== this._lenses.length && this._editor.getScrollTop() !== 0); + this._editor.changeDecorations((changeAccessor) => { + this._editor.changeViewZones((accessor) => { + + let codeLensIndex = 0, groupsIndex = 0, helper = new CodeLensHelper(); + + while (groupsIndex < groups.length && codeLensIndex < this._lenses.length) { + + let symbolsLineNumber = groups[groupsIndex][0].symbol.range.startLineNumber; + let codeLensLineNumber = this._lenses[codeLensIndex].getLineNumber(); + + if (codeLensLineNumber < symbolsLineNumber) { + this._lenses[codeLensIndex].dispose(helper, accessor); + this._lenses.splice(codeLensIndex, 1); + } else if (codeLensLineNumber === symbolsLineNumber) { + this._lenses[codeLensIndex].updateCodeLensSymbols(groups[groupsIndex], helper); + groupsIndex++; + codeLensIndex++; + } else { + this._lenses.splice(codeLensIndex, 0, new CodeLens(groups[groupsIndex], this._editor, helper, accessor, this._commandService, this._messageService, () => this._detectVisibleLenses.schedule())); + codeLensIndex++; + groupsIndex++; + } + } + + // Delete extra code lenses + while (codeLensIndex < this._lenses.length) { + this._lenses[codeLensIndex].dispose(helper, accessor); + this._lenses.splice(codeLensIndex, 1); + } + + // Create extra symbols + while (groupsIndex < groups.length) { + this._lenses.push(new CodeLens(groups[groupsIndex], this._editor, helper, accessor, this._commandService, this._messageService, () => this._detectVisibleLenses.schedule())); + groupsIndex++; + } + + helper.commit(changeAccessor); + }); + }); + if (shouldRestoreCenteredRange) { + this._editor.revealRangeInCenter(centeredRange); + } + } + + private _onViewportChanged(modeId: string): void { + if (this._currentFindOccPromise) { + this._currentFindOccPromise.cancel(); + this._currentFindOccPromise = null; + } + + const model = this._editor.getModel(); + if (!model) { + return; + } + + const toResolve: ICodeLensData[][] = []; + const lenses: CodeLens[] = []; + this._lenses.forEach((lens) => { + const request = lens.computeIfNecessary(model); + if (request) { + toResolve.push(request); + lenses.push(lens); + } + }); + + if (toResolve.length === 0) { + return; + } + + const promises = toResolve.map((request, i) => { + + const resolvedSymbols = new Array(request.length); + const promises = request.map((request, i) => { + return asWinJsPromise((token) => { + return request.provider.resolveCodeLens(model, request.symbol, token); + }).then(symbol => { + resolvedSymbols[i] = symbol; + }); + }); + + return TPromise.join(promises).then(() => { + lenses[i].updateCommands(resolvedSymbols); + }); + }); + + this._currentFindOccPromise = TPromise.join(promises).then(() => { + this._currentFindOccPromise = null; + }); + } +} diff --git a/src/vs/editor/contrib/codelens/browser/codelensWidget.css b/src/vs/editor/contrib/codelens/browser/codelensWidget.css new file mode 100644 index 0000000000000..113a5a1fbb440 --- /dev/null +++ b/src/vs/editor/contrib/codelens/browser/codelensWidget.css @@ -0,0 +1,45 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +.monaco-editor .codelens-decoration { + overflow: hidden; + display: inline-block; + text-overflow: ellipsis; +} + +.monaco-editor .codelens-decoration > span, +.monaco-editor .codelens-decoration > a { + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; + white-space: nowrap; + vertical-align: sub; +} + +.monaco-editor .codelens-decoration > a { + text-decoration: none; +} + +.monaco-editor .codelens-decoration > a:hover { + text-decoration: underline; + cursor: pointer; +} + +.monaco-editor .codelens-decoration.invisible-cl { + opacity: 0; +} + +@keyframes fadein { 0% { opacity:0; visibility:visible;} 100% { opacity:1; } } +@-moz-keyframes fadein { 0% { opacity:0; visibility:visible;} 100% { opacity:1; } } +@-o-keyframes fadein { 0% { opacity:0; visibility:visible;} 100% { opacity:1; } } +@-webkit-keyframes fadein { 0% { opacity:0; visibility:visible;} 100% { opacity:1; } } + +.monaco-editor .codelens-decoration.fadein { + -webkit-animation: fadein 0.5s linear; + -moz-animation: fadein 0.5s linear; + -o-animation: fadein 0.5s linear; + animation: fadein 0.5s linear; +} diff --git a/src/vs/editor/contrib/codelens/browser/codelensWidget.ts b/src/vs/editor/contrib/codelens/browser/codelensWidget.ts new file mode 100644 index 0000000000000..ac7b103cd55e9 --- /dev/null +++ b/src/vs/editor/contrib/codelens/browser/codelensWidget.ts @@ -0,0 +1,339 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import 'vs/css!./codelensWidget'; +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import Severity from 'vs/base/common/severity'; +import { format, escape } from 'vs/base/common/strings'; +import * as dom from 'vs/base/browser/dom'; +import { ICommandService } from 'vs/platform/commands/common/commands'; +import { IMessageService } from 'vs/platform/message/common/message'; +import { Range } from 'vs/editor/common/core/range'; +import * as editorCommon from 'vs/editor/common/editorCommon'; +import { ICodeLensSymbol, Command } from 'vs/editor/common/modes'; +import * as editorBrowser from 'vs/editor/browser/editorBrowser'; +import { ICodeLensData } from './codelens'; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; +import { editorCodeLensForeground } from 'vs/editor/common/view/editorColorRegistry'; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; + +class CodeLensViewZone implements editorBrowser.IViewZone { + + readonly heightInLines: number; + readonly suppressMouseDown: boolean; + readonly domNode: HTMLElement; + + afterLineNumber: number; + + private _lastHeight: number; + private _onHeight: Function; + + constructor(afterLineNumber: number, onHeight: Function) { + this.afterLineNumber = afterLineNumber; + this._onHeight = onHeight; + + this.heightInLines = 1; + this.suppressMouseDown = true; + this.domNode = document.createElement('div'); + } + + onComputedHeight(height: number): void { + if (this._lastHeight === undefined) { + this._lastHeight = height; + } else if (this._lastHeight !== height) { + this._lastHeight = height; + this._onHeight(); + } + } +} + +class CodeLensContentWidget implements editorBrowser.IContentWidget { + + private static _idPool: number = 0; + + // Editor.IContentWidget.allowEditorOverflow + readonly allowEditorOverflow: boolean = false; + readonly suppressMouseDown: boolean = true; + + private readonly _id: string; + private readonly _domNode: HTMLElement; + private readonly _disposables: IDisposable[] = []; + private readonly _editor: editorBrowser.ICodeEditor; + + private _symbolRange: Range; + private _widgetPosition: editorBrowser.IContentWidgetPosition; + private _commands: { [id: string]: Command } = Object.create(null); + + constructor( + editor: editorBrowser.ICodeEditor, + symbolRange: Range, + commandService: ICommandService, + messageService: IMessageService + ) { + + this._id = 'codeLensWidget' + (++CodeLensContentWidget._idPool); + this._editor = editor; + + this.setSymbolRange(symbolRange); + + this._domNode = document.createElement('span'); + this._domNode.innerHTML = ' '; + dom.addClass(this._domNode, 'codelens-decoration'); + dom.addClass(this._domNode, 'invisible-cl'); + this._updateHeight(); + + this._disposables.push(this._editor.onDidChangeConfiguration(e => e.fontInfo && this._updateHeight())); + + this._disposables.push(dom.addDisposableListener(this._domNode, 'click', e => { + let element = e.target; + if (element.tagName === 'A' && element.id) { + let command = this._commands[element.id]; + if (command) { + editor.focus(); + commandService.executeCommand(command.id, ...command.arguments).done(undefined, err => { + messageService.show(Severity.Error, err); + }); + } + } + })); + + this.updateVisibility(); + } + + dispose(): void { + dispose(this._disposables); + this._symbolRange = null; + } + + private _updateHeight(): void { + const { fontInfo, lineHeight } = this._editor.getConfiguration(); + this._domNode.style.height = `${Math.round(lineHeight * 1.1)}px`; + this._domNode.style.lineHeight = `${lineHeight}px`; + this._domNode.style.fontSize = `${Math.round(fontInfo.fontSize * .9)}px`; + this._domNode.innerHTML = ' '; + } + + updateVisibility(): void { + if (this.isVisible()) { + dom.removeClass(this._domNode, 'invisible-cl'); + dom.addClass(this._domNode, 'fadein'); + } + } + + withCommands(symbols: ICodeLensSymbol[]): void { + this._commands = Object.create(null); + if (!symbols || !symbols.length) { + this._domNode.innerHTML = 'no commands'; + return; + } + + let html: string[] = []; + for (let i = 0; i < symbols.length; i++) { + let command = symbols[i].command; + let title = escape(command.title); + let part: string; + if (command.id) { + part = format('{1}', i, title); + this._commands[i] = command; + } else { + part = format('{0}', title); + } + html.push(part); + } + + this._domNode.innerHTML = html.join(' | '); + this._editor.layoutContentWidget(this); + } + + getId(): string { + return this._id; + } + + getDomNode(): HTMLElement { + return this._domNode; + } + + setSymbolRange(range: Range): void { + this._symbolRange = range; + + const lineNumber = range.startLineNumber; + const column = this._editor.getModel().getLineFirstNonWhitespaceColumn(lineNumber); + this._widgetPosition = { + position: { lineNumber: lineNumber, column: column }, + preference: [editorBrowser.ContentWidgetPositionPreference.ABOVE] + }; + } + + getPosition(): editorBrowser.IContentWidgetPosition { + return this._widgetPosition; + } + + isVisible(): boolean { + return this._domNode.hasAttribute('monaco-visible-content-widget'); + } +} + +export interface IDecorationIdCallback { + (decorationId: string): void; +} + +export class CodeLensHelper { + + private _removeDecorations: string[]; + private _addDecorations: editorCommon.IModelDeltaDecoration[]; + private _addDecorationsCallbacks: IDecorationIdCallback[]; + + constructor() { + this._removeDecorations = []; + this._addDecorations = []; + this._addDecorationsCallbacks = []; + } + + addDecoration(decoration: editorCommon.IModelDeltaDecoration, callback: IDecorationIdCallback): void { + this._addDecorations.push(decoration); + this._addDecorationsCallbacks.push(callback); + } + + removeDecoration(decorationId: string): void { + this._removeDecorations.push(decorationId); + } + + commit(changeAccessor: editorCommon.IModelDecorationsChangeAccessor): void { + var resultingDecorations = changeAccessor.deltaDecorations(this._removeDecorations, this._addDecorations); + for (let i = 0, len = resultingDecorations.length; i < len; i++) { + this._addDecorationsCallbacks[i](resultingDecorations[i]); + } + } +} + +export class CodeLens { + + private readonly _editor: editorBrowser.ICodeEditor; + private readonly _viewZone: CodeLensViewZone; + private readonly _viewZoneId: number; + private readonly _contentWidget: CodeLensContentWidget; + private _decorationIds: string[]; + private _data: ICodeLensData[]; + + constructor( + data: ICodeLensData[], + editor: editorBrowser.ICodeEditor, + helper: CodeLensHelper, + viewZoneChangeAccessor: editorBrowser.IViewZoneChangeAccessor, + commandService: ICommandService, messageService: IMessageService, + updateCallabck: Function + ) { + this._editor = editor; + this._data = data; + this._decorationIds = new Array(this._data.length); + + let range: Range; + this._data.forEach((codeLensData, i) => { + + helper.addDecoration({ + range: codeLensData.symbol.range, + options: ModelDecorationOptions.EMPTY + }, id => this._decorationIds[i] = id); + + // the range contains all lenses on this line + if (!range) { + range = Range.lift(codeLensData.symbol.range); + } else { + range = Range.plusRange(range, codeLensData.symbol.range); + } + }); + + this._contentWidget = new CodeLensContentWidget(editor, range, commandService, messageService); + this._viewZone = new CodeLensViewZone(range.startLineNumber - 1, updateCallabck); + + this._viewZoneId = viewZoneChangeAccessor.addZone(this._viewZone); + this._editor.addContentWidget(this._contentWidget); + } + + dispose(helper: CodeLensHelper, viewZoneChangeAccessor: editorBrowser.IViewZoneChangeAccessor): void { + while (this._decorationIds.length) { + helper.removeDecoration(this._decorationIds.pop()); + } + if (viewZoneChangeAccessor) { + viewZoneChangeAccessor.removeZone(this._viewZoneId); + } + this._editor.removeContentWidget(this._contentWidget); + + this._contentWidget.dispose(); + } + + isValid(): boolean { + return this._decorationIds.some((id, i) => { + const range = this._editor.getModel().getDecorationRange(id); + const symbol = this._data[i].symbol; + return range && Range.isEmpty(symbol.range) === range.isEmpty(); + }); + } + + updateCodeLensSymbols(data: ICodeLensData[], helper: CodeLensHelper): void { + while (this._decorationIds.length) { + helper.removeDecoration(this._decorationIds.pop()); + } + this._data = data; + this._decorationIds = new Array(this._data.length); + this._data.forEach((codeLensData, i) => { + helper.addDecoration({ + range: codeLensData.symbol.range, + options: ModelDecorationOptions.EMPTY + }, id => this._decorationIds[i] = id); + }); + } + + computeIfNecessary(model: editorCommon.IModel): ICodeLensData[] { + this._contentWidget.updateVisibility(); // trigger the fade in + if (!this._contentWidget.isVisible()) { + return null; + } + + // Read editor current state + for (let i = 0; i < this._decorationIds.length; i++) { + this._data[i].symbol.range = model.getDecorationRange(this._decorationIds[i]); + } + return this._data; + } + + updateCommands(symbols: ICodeLensSymbol[]): void { + this._contentWidget.withCommands(symbols); + } + + getLineNumber(): number { + const range = this._editor.getModel().getDecorationRange(this._decorationIds[0]); + if (range) { + return range.startLineNumber; + } + return -1; + } + + update(viewZoneChangeAccessor: editorBrowser.IViewZoneChangeAccessor): void { + if (this.isValid()) { + const range = this._editor.getModel().getDecorationRange(this._decorationIds[0]); + + this._viewZone.afterLineNumber = range.startLineNumber - 1; + viewZoneChangeAccessor.layoutZone(this._viewZoneId); + + this._contentWidget.setSymbolRange(range); + this._editor.layoutContentWidget(this._contentWidget); + } + } +} + +registerThemingParticipant((theme, collector) => { + let codeLensForeground = theme.getColor(editorCodeLensForeground); + if (codeLensForeground) { + collector.addRule(`.monaco-editor .codelens-decoration { color: ${codeLensForeground}; }`); + } + let activeLinkForeground = theme.getColor(editorActiveLinkForeground); + if (activeLinkForeground) { + collector.addRule(`.monaco-editor .codelens-decoration > a:hover { color: ${activeLinkForeground} !important; }`); + } +}); diff --git a/src/vs/editor/contrib/codelens/common/codelens.ts b/src/vs/editor/contrib/codelens/common/codelens.ts deleted file mode 100644 index 864b3f2a25eb2..0000000000000 --- a/src/vs/editor/contrib/codelens/common/codelens.ts +++ /dev/null @@ -1,70 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import { illegalArgument, onUnexpectedExternalError } from 'vs/base/common/errors'; -import URI from 'vs/base/common/uri'; -import { TPromise } from 'vs/base/common/winjs.base'; -import { IModel } from 'vs/editor/common/editorCommon'; -import { CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; -import { CodeLensProviderRegistry, CodeLensProvider, ICodeLensSymbol } from 'vs/editor/common/modes'; -import { IModelService } from 'vs/editor/common/services/modelService'; -import { asWinJsPromise } from 'vs/base/common/async'; - -export interface ICodeLensData { - symbol: ICodeLensSymbol; - provider: CodeLensProvider; -} - -export function getCodeLensData(model: IModel): TPromise { - - const symbols: ICodeLensData[] = []; - const provider = CodeLensProviderRegistry.ordered(model); - - const promises = provider.map(provider => asWinJsPromise(token => provider.provideCodeLenses(model, token)).then(result => { - if (Array.isArray(result)) { - for (let symbol of result) { - symbols.push({ symbol, provider }); - } - } - }, onUnexpectedExternalError)); - - return TPromise.join(promises).then(() => { - return symbols.sort((a, b) => { - // sort by lineNumber, provider-rank, and column - if (a.symbol.range.startLineNumber < b.symbol.range.startLineNumber) { - return -1; - } else if (a.symbol.range.startLineNumber > b.symbol.range.startLineNumber) { - return 1; - } else if (provider.indexOf(a.provider) < provider.indexOf(b.provider)) { - return -1; - } else if (provider.indexOf(a.provider) > provider.indexOf(b.provider)) { - return 1; - } else if (a.symbol.range.startColumn < b.symbol.range.startColumn) { - return -1; - } else if (a.symbol.range.startColumn > b.symbol.range.startColumn) { - return 1; - } else { - return 0; - } - }); - }); -} - -CommonEditorRegistry.registerLanguageCommand('_executeCodeLensProvider', function (accessor, args) { - - const { resource } = args; - if (!(resource instanceof URI)) { - throw illegalArgument(); - } - - const model = accessor.get(IModelService).getModel(resource); - if (!model) { - throw illegalArgument(); - } - - return getCodeLensData(model); -}); diff --git a/src/vs/editor/contrib/comment/common/blockCommentCommand.ts b/src/vs/editor/contrib/comment/common/blockCommentCommand.ts index 4949996d429b8..d123d1f9d580d 100644 --- a/src/vs/editor/contrib/comment/common/blockCommentCommand.ts +++ b/src/vs/editor/contrib/comment/common/blockCommentCommand.ts @@ -62,7 +62,7 @@ export class BlockCommentCommand implements editorCommon.ICommand { } for (var i = 0; i < ops.length; i++) { - builder.addEditOperation(ops[i].range, ops[i].text); + builder.addTrackedEditOperation(ops[i].range, ops[i].text); } } @@ -97,16 +97,16 @@ export class BlockCommentCommand implements editorCommon.ICommand { if (!Range.isEmpty(r)) { // Insert block comment start - res.push(EditOperation.insert(new Position(r.startLineNumber, r.startColumn), startToken)); + res.push(EditOperation.insert(new Position(r.startLineNumber, r.startColumn), startToken + ' ')); // Insert block comment end - res.push(EditOperation.insert(new Position(r.endLineNumber, r.endColumn), endToken)); + res.push(EditOperation.insert(new Position(r.endLineNumber, r.endColumn), ' ' + endToken)); } else { // Insert both continuously res.push(EditOperation.replace(new Range( r.startLineNumber, r.startColumn, r.endLineNumber, r.endColumn - ), startToken + endToken)); + ), startToken + ' ' + endToken)); } return res; @@ -145,7 +145,7 @@ export class BlockCommentCommand implements editorCommon.ICommand { ); } else { var srcRange = inverseEditOperations[0].range; - var deltaColumn = this._usedEndToken ? -this._usedEndToken.length : 0; + var deltaColumn = this._usedEndToken ? -this._usedEndToken.length - 1 : 0; // minus 1 space before endToken return new Selection( srcRange.endLineNumber, srcRange.endColumn + deltaColumn, diff --git a/src/vs/editor/contrib/comment/common/comment.ts b/src/vs/editor/contrib/comment/common/comment.ts index 570d96b7cbb2e..898e1aa89d0b9 100644 --- a/src/vs/editor/contrib/comment/common/comment.ts +++ b/src/vs/editor/contrib/comment/common/comment.ts @@ -35,7 +35,9 @@ abstract class CommentLineAction extends EditorAction { commands.push(new LineCommentCommand(selections[i], opts.tabSize, this._type)); } + editor.pushUndoStop(); editor.executeCommands(this.id, commands); + editor.pushUndoStop(); } } @@ -113,6 +115,8 @@ class BlockCommentAction extends EditorAction { commands.push(new BlockCommentCommand(selections[i])); } + editor.pushUndoStop(); editor.executeCommands(this.id, commands); + editor.pushUndoStop(); } } diff --git a/src/vs/editor/contrib/comment/common/lineCommentCommand.ts b/src/vs/editor/contrib/comment/common/lineCommentCommand.ts index 9cf5de8659a56..3311aa6ffae5d 100644 --- a/src/vs/editor/contrib/comment/common/lineCommentCommand.ts +++ b/src/vs/editor/contrib/comment/common/lineCommentCommand.ts @@ -63,34 +63,25 @@ export class LineCommentCommand implements editorCommon.ICommand { * Returns null if any of the lines doesn't support a line comment string. */ public static _gatherPreflightCommentStrings(model: editorCommon.ITokenizedModel, startLineNumber: number, endLineNumber: number): ILinePreflightData[] { - let commentStrForLanguage: string[] = []; - let lines: ILinePreflightData[] = []; - for (let i = 0, lineCount = endLineNumber - startLineNumber + 1; i < lineCount; i++) { - let lineNumber = startLineNumber + i; - model.forceTokenization(lineNumber); - let languageId = model.getLanguageIdAtPosition(lineNumber, 1); - - // Find the commentStr for this line, if none is found then bail out: we cannot do line comments - let commentStr: string; - if (commentStrForLanguage[languageId]) { - commentStr = commentStrForLanguage[languageId]; - } else { - let config = LanguageConfigurationRegistry.getComments(languageId); - commentStr = (config ? config.lineCommentToken : null); - if (!commentStr) { - // Mode does not support line comments - return null; - } - commentStrForLanguage[languageId] = commentStr; - } + model.forceTokenization(startLineNumber); + const languageId = model.getLanguageIdAtPosition(startLineNumber, 1); - lines.push({ + const config = LanguageConfigurationRegistry.getComments(languageId); + const commentStr = (config ? config.lineCommentToken : null); + if (!commentStr) { + // Mode does not support line comments + return null; + } + + let lines: ILinePreflightData[] = []; + for (let i = 0, lineCount = endLineNumber - startLineNumber + 1; i < lineCount; i++) { + lines[i] = { ignore: false, commentStr: commentStr, commentStrOffset: 0, commentStrLength: commentStr.length - }); + }; } return lines; diff --git a/src/vs/editor/contrib/comment/test/common/blockCommentCommand.test.ts b/src/vs/editor/contrib/comment/test/common/blockCommentCommand.test.ts index 8f8f2cae11807..1bd3597b7ac7d 100644 --- a/src/vs/editor/contrib/comment/test/common/blockCommentCommand.test.ts +++ b/src/vs/editor/contrib/comment/test/common/blockCommentCommand.test.ts @@ -28,13 +28,13 @@ suite('Editor Contrib - Block Comment Command', () => { ], new Selection(1, 3, 1, 3), [ - 'fi<00>rst', + 'fi<0 0>rst', '\tsecond line', 'third line', 'fourth line', 'fifth' ], - new Selection(1, 5, 1, 5) + new Selection(1, 6, 1, 6) ); }); @@ -49,13 +49,13 @@ suite('Editor Contrib - Block Comment Command', () => { ], new Selection(2, 1, 1, 1), [ - '<0first', - '0>\tsecond line', + '<0 first', + ' 0>\tsecond line', 'third line', 'fourth line', 'fifth' ], - new Selection(1, 3, 2, 1) + new Selection(1, 4, 2, 1) ); }); @@ -70,13 +70,13 @@ suite('Editor Contrib - Block Comment Command', () => { ], new Selection(1, 6, 1, 1), [ - '<0first0>', + '<0 first 0>', '\tsecond line', 'third line', 'fourth line', 'fifth' ], - new Selection(1, 3, 1, 8) + new Selection(1, 4, 1, 9) ); testBlockCommentCommand( @@ -110,13 +110,13 @@ suite('Editor Contrib - Block Comment Command', () => { ], new Selection(1, 6, 1, 3), [ - 'fi<0rst0>', + 'fi<0 rst 0>', '\tsecond line', 'third line', 'fourth line', 'fifth' ], - new Selection(1, 5, 1, 8) + new Selection(1, 6, 1, 9) ); }); @@ -131,13 +131,13 @@ suite('Editor Contrib - Block Comment Command', () => { ], new Selection(1, 6, 1, 3), [ - 'fi<0rst0>', + 'fi<0 rst 0>', '\tsecond line', 'third line', 'fourth line', 'fifth' ], - new Selection(1, 5, 1, 8) + new Selection(1, 6, 1, 9) ); testBlockCommentCommand( @@ -171,13 +171,13 @@ suite('Editor Contrib - Block Comment Command', () => { ], new Selection(2, 4, 1, 1), [ - '<0first', - '\tse0>cond line', + '<0 first', + '\tse 0>cond line', 'third line', 'fourth line', 'fifth' ], - new Selection(1, 3, 2, 4) + new Selection(1, 4, 2, 4) ); }); @@ -192,13 +192,13 @@ suite('Editor Contrib - Block Comment Command', () => { ], new Selection(2, 4, 1, 1), [ - '<0first', - '\tse0>cond line', + '<0 first', + '\tse 0>cond line', 'third line', 'fourth line', 'fifth' ], - new Selection(1, 3, 2, 4) + new Selection(1, 4, 2, 4) ); testBlockCommentCommand( diff --git a/src/vs/editor/contrib/comment/test/common/lineCommentCommand.test.ts b/src/vs/editor/contrib/comment/test/common/lineCommentCommand.test.ts index 802efd52419fd..098872864e5ab 100644 --- a/src/vs/editor/contrib/comment/test/common/lineCommentCommand.test.ts +++ b/src/vs/editor/contrib/comment/test/common/lineCommentCommand.test.ts @@ -9,6 +9,12 @@ import { Selection } from 'vs/editor/common/core/selection'; import { ILinePreflightData, IPreflightData, ISimpleModel, LineCommentCommand, Type } from 'vs/editor/contrib/comment/common/lineCommentCommand'; import { testCommand } from 'vs/editor/test/common/commands/commandTestUtils'; import { CommentMode } from 'vs/editor/test/common/commentMode'; +import * as modes from 'vs/editor/common/modes'; +import { NULL_STATE } from 'vs/editor/common/modes/nullMode'; +import { TokenizationResult2 } from 'vs/editor/common/core/token'; +import { MockMode } from 'vs/editor/test/common/mocks/mockMode'; +import { CommentRule } from 'vs/editor/common/modes/languageConfiguration'; +import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; suite('Editor Contrib - Line Comment Command', () => { @@ -538,13 +544,13 @@ suite('Editor Contrib - Line Comment As Block Comment', () => { ], new Selection(1, 1, 1, 1), [ - '(first)', + '( first )', '\tsecond line', 'third line', 'fourth line', 'fifth' ], - new Selection(1, 2, 1, 2) + new Selection(1, 3, 1, 3) ); }); @@ -580,13 +586,13 @@ suite('Editor Contrib - Line Comment As Block Comment', () => { ], new Selection(1, 1, 1, 1), [ - '(first)', + '( first )', '\tsecond line', 'third line', 'fourth line', 'fifth' ], - new Selection(1, 2, 1, 2) + new Selection(1, 3, 1, 3) ); }); @@ -601,13 +607,13 @@ suite('Editor Contrib - Line Comment As Block Comment', () => { ], new Selection(3, 2, 1, 3), [ - '(first', + '( first', '\tsecond line', - 'third line)', + 'third line )', 'fourth line', 'fifth' ], - new Selection(1, 4, 3, 2) + new Selection(1, 5, 3, 2) ); testLineCommentCommand( @@ -649,7 +655,7 @@ suite('Editor Contrib - Line Comment As Block Comment 2', () => { ], new Selection(1, 1, 1, 1), [ - '\t\t', + '\t\t', '\t\tsecond line', '\tthird line', 'fourth line', @@ -803,8 +809,8 @@ suite('Editor Contrib - Line Comment As Block Comment 2', () => { ], new Selection(1, 1, 3, 1), [ - ' ', + ' ', '' ], new Selection(1, 1, 3, 1) @@ -827,4 +833,108 @@ suite('Editor Contrib - Line Comment As Block Comment 2', () => { }); }); +suite('Editor Contrib - Line Comment in mixed modes', () => { + + const OUTER_LANGUAGE_ID = new modes.LanguageIdentifier('outerMode', 3); + const INNER_LANGUAGE_ID = new modes.LanguageIdentifier('innerMode', 4); + + class OuterMode extends MockMode { + constructor(commentsConfig: CommentRule) { + super(OUTER_LANGUAGE_ID); + this._register(LanguageConfigurationRegistry.register(this.getLanguageIdentifier(), { + comments: commentsConfig + })); + + this._register(modes.TokenizationRegistry.register(this.getLanguageIdentifier().language, { + getInitialState: (): modes.IState => NULL_STATE, + tokenize: undefined, + tokenize2: (line: string, state: modes.IState): TokenizationResult2 => { + let languageId = (/^ /.test(line) ? INNER_LANGUAGE_ID : OUTER_LANGUAGE_ID); + + let tokens = new Uint32Array(1 << 1); + tokens[(0 << 1)] = 0; + tokens[(0 << 1) + 1] = ( + (modes.ColorId.DefaultForeground << modes.MetadataConsts.FOREGROUND_OFFSET) + | (languageId.id << modes.MetadataConsts.LANGUAGEID_OFFSET) + ); + return new TokenizationResult2(tokens, state); + } + })); + } + } + + class InnerMode extends MockMode { + constructor(commentsConfig: CommentRule) { + super(INNER_LANGUAGE_ID); + this._register(LanguageConfigurationRegistry.register(this.getLanguageIdentifier(), { + comments: commentsConfig + })); + } + } + + function testLineCommentCommand(lines: string[], selection: Selection, expectedLines: string[], expectedSelection: Selection): void { + let outerMode = new OuterMode({ lineComment: '//', blockComment: ['/*', '*/'] }); + let innerMode = new InnerMode({ lineComment: null, blockComment: ['{/*', '*/}'] }); + testCommand( + lines, + outerMode.getLanguageIdentifier(), + selection, + (sel) => new LineCommentCommand(sel, 4, Type.Toggle), + expectedLines, + expectedSelection + ); + innerMode.dispose(); + outerMode.dispose(); + } + + test('issue #24047 (part 1): Commenting code in JSX files', () => { + testLineCommentCommand( + [ + 'import React from \'react\';', + 'const Loader = () => (', + '
', + ' Loading...', + '
', + ');', + 'export default Loader;' + ], + new Selection(1, 1, 7, 22), + [ + '// import React from \'react\';', + '// const Loader = () => (', + '//
', + '// Loading...', + '//
', + '// );', + '// export default Loader;' + ], + new Selection(1, 4, 7, 25), + ); + }); + + test('issue #24047 (part 2): Commenting code in JSX files', () => { + testLineCommentCommand( + [ + 'import React from \'react\';', + 'const Loader = () => (', + '
', + ' Loading...', + '
', + ');', + 'export default Loader;' + ], + new Selection(3, 4, 3, 4), + [ + 'import React from \'react\';', + 'const Loader = () => (', + ' {/*
*/}', + ' Loading...', + '
', + ');', + 'export default Loader;' + ], + new Selection(3, 8, 3, 8), + ); + }); +}); diff --git a/src/vs/editor/contrib/contextmenu/browser/contextmenu.ts b/src/vs/editor/contrib/contextmenu/browser/contextmenu.ts index a5dbd5818bc80..b389061785acc 100644 --- a/src/vs/editor/contrib/contextmenu/browser/contextmenu.ts +++ b/src/vs/editor/contrib/contextmenu/browser/contextmenu.ts @@ -175,7 +175,7 @@ export class ContextMenuController implements IEditorContribution { getActionItem: (action) => { var keybinding = this._keybindingFor(action); if (keybinding) { - return new ActionItem(action, action, { label: true, keybinding: keybinding.getLabel() }); + return new ActionItem(action, action, { label: true, keybinding: keybinding.getLabel(), isMenu: true }); } var customActionItem = action; diff --git a/src/vs/editor/contrib/dnd/browser/dnd.ts b/src/vs/editor/contrib/dnd/browser/dnd.ts index cca6986ce3304..7628350f4e2af 100644 --- a/src/vs/editor/contrib/dnd/browser/dnd.ts +++ b/src/vs/editor/contrib/dnd/browser/dnd.ts @@ -17,6 +17,7 @@ import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import { DragAndDropCommand } from '../common/dragAndDropCommand'; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; @editorContribution export class DragAndDropController implements editorCommon.IEditorContribution { @@ -146,7 +147,9 @@ export class DragAndDropController implements editorCommon.IEditorContribution { this._dragSelection.getEndPosition().equals(newCursorPosition) || this._dragSelection.getStartPosition().equals(newCursorPosition) ) // we allow users to paste content beside the selection )) { + this._editor.pushUndoStop(); this._editor.executeCommand(DragAndDropController.ID, new DragAndDropCommand(this._dragSelection, newCursorPosition, mouseEvent.event[DragAndDropController.TRIGGER_MODIFIER] || this._modiferPressed)); + this._editor.pushUndoStop(); } } @@ -159,12 +162,16 @@ export class DragAndDropController implements editorCommon.IEditorContribution { this._mouseDown = false; } + private static _DECORATION_OPTIONS = ModelDecorationOptions.register({ + className: 'dnd-target' + }); + public showAt(position: Position): void { this._editor.changeDecorations(changeAccessor => { let newDecorations: editorCommon.IModelDeltaDecoration[] = []; newDecorations.push({ range: new Range(position.lineNumber, position.column, position.lineNumber, position.column), - options: { className: 'dnd-target' } + options: DragAndDropController._DECORATION_OPTIONS }); this._dndDecorationIds = changeAccessor.deltaDecorations(this._dndDecorationIds, newDecorations); diff --git a/src/vs/editor/contrib/find/browser/find.ts b/src/vs/editor/contrib/find/browser/find.ts index cc32e668da504..3b5e1d0bb1d93 100644 --- a/src/vs/editor/contrib/find/browser/find.ts +++ b/src/vs/editor/contrib/find/browser/find.ts @@ -13,6 +13,7 @@ import { FindWidget, IFindController } from 'vs/editor/contrib/find/browser/find import { FindOptionsWidget } from 'vs/editor/contrib/find/browser/findOptionsWidget'; import { CommonFindController, FindStartFocusAction, IFindStartOptions } from 'vs/editor/contrib/find/common/findController'; import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { IStorageService } from 'vs/platform/storage/common/storage'; @editorContribution export class FindController extends CommonFindController implements IFindController { @@ -25,9 +26,10 @@ export class FindController extends CommonFindController implements IFindControl @IContextViewService contextViewService: IContextViewService, @IContextKeyService contextKeyService: IContextKeyService, @IKeybindingService keybindingService: IKeybindingService, - @IThemeService themeService: IThemeService + @IThemeService themeService: IThemeService, + @IStorageService storageService: IStorageService ) { - super(editor, contextKeyService); + super(editor, contextKeyService, storageService); this._widget = this._register(new FindWidget(editor, this, this._state, contextViewService, keybindingService, contextKeyService, themeService)); this._findOptionsWidget = this._register(new FindOptionsWidget(editor, this._state, keybindingService, themeService)); diff --git a/src/vs/editor/contrib/find/browser/findOptionsWidget.ts b/src/vs/editor/contrib/find/browser/findOptionsWidget.ts index f84b6f2fae0d8..7634aa1ca30b6 100644 --- a/src/vs/editor/contrib/find/browser/findOptionsWidget.ts +++ b/src/vs/editor/contrib/find/browser/findOptionsWidget.ts @@ -11,7 +11,7 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, OverlayWidgetPositionPreference } from 'vs/editor/browser/editorBrowser'; import { FIND_IDS } from 'vs/editor/contrib/find/common/findModel'; import { FindReplaceState } from 'vs/editor/contrib/find/common/findState'; -import { CaseSensitiveCheckbox, WholeWordsCheckbox } from 'vs/base/browser/ui/findinput/findInputCheckboxes'; +import { CaseSensitiveCheckbox, WholeWordsCheckbox, RegexCheckbox } from 'vs/base/browser/ui/findinput/findInputCheckboxes'; import { RunOnceScheduler } from 'vs/base/common/async'; import { IThemeService, ITheme, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { inputActiveOptionBorder, editorWidgetBackground, contrastBorder, widgetShadow } from 'vs/platform/theme/common/colorRegistry'; @@ -25,6 +25,7 @@ export class FindOptionsWidget extends Widget implements IOverlayWidget { private _keybindingService: IKeybindingService; private _domNode: HTMLElement; + private regex: RegexCheckbox; private wholeWords: WholeWordsCheckbox; private caseSensitive: CaseSensitiveCheckbox; @@ -41,7 +42,7 @@ export class FindOptionsWidget extends Widget implements IOverlayWidget { this._keybindingService = keybindingService; this._domNode = document.createElement('div'); - this._domNode.className = 'monaco-editor-background findOptionsWidget'; + this._domNode.className = 'findOptionsWidget'; this._domNode.style.display = 'none'; this._domNode.style.top = '10px'; this._domNode.setAttribute('role', 'presentation'); @@ -73,10 +74,26 @@ export class FindOptionsWidget extends Widget implements IOverlayWidget { })); this._domNode.appendChild(this.wholeWords.domNode); + this.regex = this._register(new RegexCheckbox({ + appendTitle: this._keybindingLabelFor(FIND_IDS.ToggleRegexCommand), + isChecked: this._state.isRegex, + onChange: (viaKeyboard) => { + this._state.change({ + isRegex: this.regex.checked + }, false); + }, + inputActiveOptionBorder: inputActiveOptionBorderColor + })); + this._domNode.appendChild(this.regex.domNode); + this._editor.addOverlayWidget(this); this._register(this._state.addChangeListener((e) => { let somethingChanged = false; + if (e.isRegex) { + this.regex.checked = this._state.isRegex; + somethingChanged = true; + } if (e.wholeWord) { this.wholeWords.checked = this._state.wholeWord; somethingChanged = true; @@ -167,6 +184,7 @@ export class FindOptionsWidget extends Widget implements IOverlayWidget { let inputStyles = { inputActiveOptionBorder: theme.getColor(inputActiveOptionBorder) }; this.caseSensitive.style(inputStyles); this.wholeWords.style(inputStyles); + this.regex.style(inputStyles); } } @@ -174,16 +192,16 @@ export class FindOptionsWidget extends Widget implements IOverlayWidget { registerThemingParticipant((theme, collector) => { let widgetBackground = theme.getColor(editorWidgetBackground); if (widgetBackground) { - collector.addRule(`.monaco-editor.${theme.selector} .findOptionsWidget { background-color: ${widgetBackground}; }`); + collector.addRule(`.monaco-editor .findOptionsWidget { background-color: ${widgetBackground}; }`); } let widgetShadowColor = theme.getColor(widgetShadow); if (widgetShadowColor) { - collector.addRule(`.monaco-editor.${theme.selector} .findOptionsWidget { box-shadow: 0 2px 8px ${widgetShadowColor}; }`); + collector.addRule(`.monaco-editor .findOptionsWidget { box-shadow: 0 2px 8px ${widgetShadowColor}; }`); } let hcBorder = theme.getColor(contrastBorder); if (hcBorder) { - collector.addRule(`.monaco-editor.${theme.selector} .findOptionsWidget { border: 2px solid ${hcBorder}; }`); + collector.addRule(`.monaco-editor .findOptionsWidget { border: 2px solid ${hcBorder}; }`); } }); \ No newline at end of file diff --git a/src/vs/editor/contrib/find/browser/findWidget.css b/src/vs/editor/contrib/find/browser/findWidget.css index 6d3ffb0ab285c..c851482437534 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.css +++ b/src/vs/editor/contrib/find/browser/findWidget.css @@ -51,7 +51,9 @@ height: 64px; /* find input height + replace input height */ } .monaco-editor .find-widget.replaceToggled > .replace-part { - display: inline-block; + display: flex; + display: -webkit-flex; + align-items: center; } .monaco-editor .find-widget.visible, @@ -81,6 +83,9 @@ .monaco-editor .find-widget > .replace-part { margin: 4px 0 0 17px; font-size: 12px; + display: flex; + display: -webkit-flex; + align-items: center; } .monaco-editor .find-widget > .find-part .monaco-inputbox, @@ -88,6 +93,10 @@ height: 25px; } +.monaco-editor .find-widget > .find-part .monaco-inputbox > .wrapper > .input { + width: 100% !important; + padding-right: 66px; +} .monaco-editor .find-widget > .find-part .monaco-inputbox > .wrapper > .input, .monaco-editor .find-widget > .replace-part .monaco-inputbox > .wrapper > .input { padding-top: 2px; @@ -95,21 +104,16 @@ } .monaco-editor .find-widget .monaco-findInput { - display: inline-block; vertical-align: middle; -} - -.monaco-editor .find-widget.no-results .matchesCount { - color: #A1260D; -} - -.monaco-editor.vs-dark .find-widget.no-results .matchesCount, -.monaco-editor.hc-black .find-widget.no-results .matchesCount { - color: #F48771 + display: flex; + display: -webkit-flex; + flex:1; } .monaco-editor .find-widget .matchesCount { - display: inline-block; + display: flex; + display: -webkit-flex; + flex: initial; margin: 0 1px 0 3px; padding: 2px 2px 0 2px; height: 25px; @@ -120,10 +124,12 @@ } .monaco-editor .find-widget .button { + min-width: 20px; width: 20px; height: 20px; - display: inline-block; - vertical-align: middle; + display: flex; + display: -webkit-flex; + flex: initial; margin-left: 3px; background-position: center center; background-repeat: no-repeat; @@ -236,12 +242,10 @@ } .monaco-editor .find-widget > .replace-part > .replace-input { - display: inline-block; + display: flex; + display: -webkit-flex; vertical-align: middle; -} - -.monaco-editor .find-widget > .replace-part > .replace-input > .monaco-inputbox { - width: 100%; + width: auto !important; } /* REDUCED */ @@ -251,15 +255,15 @@ } /* NARROW (SMALLER THAN REDUCED) */ -.monaco-editor .find-widget.narrow-find-widget > .find-part .monaco-findInput, -.monaco-editor .find-widget.narrow-find-widget > .replace-part .replace-input { - width: 171px !important; -} -.monaco-editor .find-widget.narrow-find-widget > .find-part .monaco-inputbox > .wrapper > .input { - width: 105px !important; +.monaco-editor .find-widget.narrow-find-widget { + max-width: 257px !important; } /* COLLAPSED (SMALLER THAN NARROW) */ +.monaco-editor .find-widget.collapsed-find-widget { + max-width: 111px !important; +} + .monaco-editor .find-widget.collapsed-find-widget .button.previous, .monaco-editor .find-widget.collapsed-find-widget .button.next, .monaco-editor .find-widget.collapsed-find-widget .button.replace, @@ -267,10 +271,9 @@ .monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-findInput .controls { display:none; } -.monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-findInput, -.monaco-editor .find-widget.collapsed-find-widget > .replace-part .replace-input, + .monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-inputbox > .wrapper > .input { - width: 71px !important; + padding-right: 0px; } .monaco-editor .findMatch { @@ -284,6 +287,11 @@ animation-name: inherit !important; } +.monaco-editor .find-widget .monaco-sash { + width: 2px !important; + margin-left: -4px; +} + .monaco-editor.hc-black .find-widget .previous, .monaco-editor.vs-dark .find-widget .previous { background-image: url('images/previous-inverse.svg'); @@ -337,8 +345,6 @@ background-color: rgba(255, 255, 255, 0.1); } -/* High Contrast Theming */ - .monaco-editor.hc-black .find-widget .button:before { position: relative; top: 1px; @@ -347,4 +353,4 @@ .monaco-editor.hc-black .find-widget .monaco-checkbox .checkbox:checked + .label { background-color: rgba(255, 255, 255, 0.1); -} \ No newline at end of file +} diff --git a/src/vs/editor/contrib/find/browser/findWidget.ts b/src/vs/editor/contrib/find/browser/findWidget.ts index f04848aa1a447..ceecbd9db0caf 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.ts +++ b/src/vs/editor/contrib/find/browser/findWidget.ts @@ -9,15 +9,18 @@ import 'vs/css!./findWidget'; import * as nls from 'vs/nls'; import { onUnexpectedError } from 'vs/base/common/errors'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; +import * as platform from 'vs/base/common/platform'; import * as strings from 'vs/base/common/strings'; import * as dom from 'vs/base/browser/dom'; import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; +import { IMouseEvent } from 'vs/base/browser/mouseEvent'; import { IContextViewProvider } from 'vs/base/browser/ui/contextview/contextview'; import { FindInput, IFindInputStyles } from 'vs/base/browser/ui/findinput/findInput'; import { IMessage as InputBoxMessage, InputBox } from 'vs/base/browser/ui/inputbox/inputBox'; import { Widget } from 'vs/base/browser/ui/widget'; +import { Sash, IHorizontalSashLayoutProvider, ISashEvent, Orientation } from 'vs/base/browser/ui/sash/sash'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; -import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, OverlayWidgetPositionPreference } from 'vs/editor/browser/editorBrowser'; +import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, IViewZone, OverlayWidgetPositionPreference } from 'vs/editor/browser/editorBrowser'; import { FIND_IDS, MATCHES_LIMIT } from 'vs/editor/contrib/find/common/findModel'; import { FindReplaceState, FindReplaceStateChangedEvent } from 'vs/editor/contrib/find/common/findState'; import { Range } from 'vs/editor/common/core/range'; @@ -26,7 +29,8 @@ import { CONTEXT_FIND_INPUT_FOCUSSED } from 'vs/editor/contrib/find/common/findC import { ITheme, registerThemingParticipant, IThemeService } from 'vs/platform/theme/common/themeService'; import { Color } from 'vs/base/common/color'; import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; -import { editorFindRangeHighlight, editorFindMatch, editorFindMatchHighlight, activeContrastBorder, contrastBorder, inputBackground, editorWidgetBackground, inputActiveOptionBorder, widgetShadow, inputForeground, inputBorder, inputValidationInfoBackground, inputValidationInfoBorder, inputValidationWarningBackground, inputValidationWarningBorder, inputValidationErrorBackground, inputValidationErrorBorder } from 'vs/platform/theme/common/colorRegistry'; +import { editorFindRangeHighlight, editorFindMatch, editorFindMatchHighlight, activeContrastBorder, contrastBorder, inputBackground, editorWidgetBackground, inputActiveOptionBorder, widgetShadow, inputForeground, inputBorder, inputValidationInfoBackground, inputValidationInfoBorder, inputValidationWarningBackground, inputValidationWarningBorder, inputValidationErrorBackground, inputValidationErrorBorder, errorForeground } from 'vs/platform/theme/common/colorRegistry'; + export interface IFindController { replace(): void; @@ -48,16 +52,36 @@ const NLS_MATCHES_COUNT_LIMIT_TITLE = nls.localize('title.matchesCountLimit', "O const NLS_MATCHES_LOCATION = nls.localize('label.matchesLocation', "{0} of {1}"); const NLS_NO_RESULTS = nls.localize('label.noResults', "No Results"); +const FIND_WIDGET_INITIAL_WIDTH = 411; +const PART_WIDTH = 275; +const FIND_INPUT_AREA_WIDTH = PART_WIDTH - 54; +const REPLACE_INPUT_AREA_WIDTH = FIND_INPUT_AREA_WIDTH; + let MAX_MATCHES_COUNT_WIDTH = 69; -const WIDGET_FIXED_WIDTH = 411 - 69; +let FIND_ALL_CONTROLS_WIDTH = 17/** Find Input margin-left */ + (MAX_MATCHES_COUNT_WIDTH + 3 + 1) /** Match Results */ + 23 /** Button */ * 4 + 2/** sash */; -export class FindWidget extends Widget implements IOverlayWidget { +const FIND_INPUT_AREA_HEIGHT = 34; // The height of Find Widget when Replace Input is not visible. +const FIND_REPLACE_AREA_HEIGHT = 64; // The height of Find Widget when Replace Input is visible. - private static ID = 'editor.contrib.findWidget'; - private static PART_WIDTH = 275; - private static FIND_INPUT_AREA_WIDTH = FindWidget.PART_WIDTH - 54; - private static REPLACE_INPUT_AREA_WIDTH = FindWidget.FIND_INPUT_AREA_WIDTH; +export class FindWidgetViewZone implements IViewZone { + public afterLineNumber: number; + public heightInPx: number; + public suppressMouseDown: boolean; + public domNode: HTMLElement; + + constructor(afterLineNumber: number) { + this.afterLineNumber = afterLineNumber; + + this.heightInPx = FIND_INPUT_AREA_HEIGHT; + this.suppressMouseDown = false; + this.domNode = document.createElement('div'); + this.domNode.className = 'dock-find-viewzone'; + } +} + +export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSashLayoutProvider { + private static ID = 'editor.contrib.findWidget'; private _codeEditor: ICodeEditor; private _state: FindReplaceState; private _controller: IFindController; @@ -82,6 +106,10 @@ export class FindWidget extends Widget implements IOverlayWidget { private _focusTracker: dom.IFocusTracker; private _findInputFocussed: IContextKey; + private _viewZone: FindWidgetViewZone; + private _viewZoneId: number; + + private _resizeSash: Sash; constructor( codeEditor: ICodeEditor, @@ -103,27 +131,47 @@ export class FindWidget extends Widget implements IOverlayWidget { this._isReplaceVisible = false; this._register(this._state.addChangeListener((e) => this._onStateChanged(e))); - this._buildDomNode(); this._updateButtons(); let checkEditorWidth = () => { let editorWidth = this._codeEditor.getConfiguration().layoutInfo.width; + let minimapWidth = this._codeEditor.getConfiguration().layoutInfo.minimapWidth; let collapsedFindWidget = false; let reducedFindWidget = false; let narrowFindWidget = false; - if (WIDGET_FIXED_WIDTH + 28 >= editorWidth + 50) { - collapsedFindWidget = true; + let widgetWidth = dom.getTotalWidth(this._domNode); + + if (widgetWidth > FIND_WIDGET_INITIAL_WIDTH) { + // as the widget is resized by users, we may need to change the max width of the widget as the editor width changes. + this._domNode.style.maxWidth = `${editorWidth - 28 - minimapWidth - 15}px`; + this._replaceInputBox.inputElement.style.width = `${dom.getTotalWidth(this._findInput.inputBox.inputElement)}px`; + return; } - if (WIDGET_FIXED_WIDTH + 28 >= editorWidth) { + + if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth >= editorWidth) { + reducedFindWidget = true; + } + if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth - MAX_MATCHES_COUNT_WIDTH >= editorWidth) { narrowFindWidget = true; } - if (WIDGET_FIXED_WIDTH + MAX_MATCHES_COUNT_WIDTH + 28 >= editorWidth) { - reducedFindWidget = true; + if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth - MAX_MATCHES_COUNT_WIDTH >= editorWidth + 50) { + collapsedFindWidget = true; } dom.toggleClass(this._domNode, 'collapsed-find-widget', collapsedFindWidget); - dom.toggleClass(this._domNode, 'reduced-find-widget', reducedFindWidget); dom.toggleClass(this._domNode, 'narrow-find-widget', narrowFindWidget); + dom.toggleClass(this._domNode, 'reduced-find-widget', reducedFindWidget); + + if (!narrowFindWidget && !collapsedFindWidget) { + // the minimal left offset of findwidget is 15px. + this._domNode.style.maxWidth = `${editorWidth - 28 - minimapWidth - 15}px`; + } + + let findInputWidth = dom.getTotalWidth(this._findInput.inputBox.inputElement); + if (findInputWidth > 0) { + this._replaceInputBox.inputElement.style.width = `${findInputWidth}px`; + } + }; checkEditorWidth(); @@ -168,9 +216,38 @@ export class FindWidget extends Widget implements IOverlayWidget { }); this._codeEditor.addOverlayWidget(this); + this._viewZone = new FindWidgetViewZone(0); // Put it before the first line then users can scroll beyond the first line. this._applyTheme(themeService.getTheme()); this._register(themeService.onThemeChange(this._applyTheme.bind(this))); + + this._register(this._codeEditor.onDidChangeModel((e) => { + if (!this._isVisible) { + return; + } + + if (this._viewZoneId === undefined) { + return; + } + + this._codeEditor.changeViewZones((accessor) => { + accessor.removeZone(this._viewZoneId); + this._viewZoneId = undefined; + }); + })); + + + this._register(this._codeEditor.onDidScrollChange((e) => { + if (e.scrollTopChanged) { + this._layoutViewZone(); + return; + } + + // for other scroll changes, layout the viewzone in next tick to avoid ruining current rendering. + setTimeout(() => { + this._layoutViewZone(); + }, 0); + })); } // ----- IOverlayWidget API @@ -245,6 +322,9 @@ export class FindWidget extends Widget implements IOverlayWidget { this._updateMatchesCount(); } + if (e.searchString || e.currentMatch) { + this._layoutViewZone(); + } } private _updateMatchesCount(): void { @@ -318,10 +398,18 @@ export class FindWidget extends Widget implements IOverlayWidget { if (!this._isVisible) { this._isVisible = true; + let selection = this._codeEditor.getSelection(); + let isSelection = selection ? (selection.startLineNumber !== selection.endLineNumber || selection.startColumn !== selection.endColumn) : false; + if (isSelection && this._codeEditor.getConfiguration().contribInfo.find.autoFindInSelection) { + this._toggleSelectionFind.checked = true; + } else { + this._toggleSelectionFind.checked = false; + } this._updateButtons(); setTimeout(() => { dom.addClass(this._domNode, 'visible'); + this._domNode.setAttribute('aria-hidden', 'false'); if (!animate) { dom.addClass(this._domNode, 'noanimation'); setTimeout(() => { @@ -330,6 +418,31 @@ export class FindWidget extends Widget implements IOverlayWidget { } }, 0); this._codeEditor.layoutOverlayWidget(this); + + let adjustEditorScrollTop = true; + if (this._codeEditor.getConfiguration().contribInfo.find.seedSearchStringFromSelection && selection) { + let editorCoords = dom.getDomNodePagePosition(this._codeEditor.getDomNode()); + let startCoords = this._codeEditor.getScrolledVisiblePosition(selection.getStartPosition()); + let startLeft = editorCoords.left + startCoords.left; + let startTop = startCoords.top; + + if (startTop < this._viewZone.heightInPx) { + if (selection.endLineNumber > selection.startLineNumber) { + adjustEditorScrollTop = false; + } + + let leftOfFindWidget = dom.getTopLeftOffset(this._domNode).left; + if (startLeft > leftOfFindWidget) { + adjustEditorScrollTop = false; + } + let endCoords = this._codeEditor.getScrolledVisiblePosition(selection.getEndPosition()); + let endLeft = editorCoords.left + endCoords.left; + if (endLeft > leftOfFindWidget) { + adjustEditorScrollTop = false; + } + } + } + this._showViewZone(adjustEditorScrollTop); } } @@ -340,11 +453,69 @@ export class FindWidget extends Widget implements IOverlayWidget { this._updateButtons(); dom.removeClass(this._domNode, 'visible'); + this._domNode.setAttribute('aria-hidden', 'true'); if (focusTheEditor) { this._codeEditor.focus(); } this._codeEditor.layoutOverlayWidget(this); + this._codeEditor.changeViewZones((accessor) => { + if (this._viewZoneId !== undefined) { + accessor.removeZone(this._viewZoneId); + this._viewZoneId = undefined; + this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() - this._viewZone.heightInPx); + } + }); + } + } + + private _layoutViewZone() { + if (!this._isVisible) { + return; } + + if (this._viewZoneId !== undefined) { + return; + } + + this._codeEditor.changeViewZones((accessor) => { + if (this._state.isReplaceRevealed) { + this._viewZone.heightInPx = FIND_REPLACE_AREA_HEIGHT; + } else { + this._viewZone.heightInPx = FIND_INPUT_AREA_HEIGHT; + } + + this._viewZoneId = accessor.addZone(this._viewZone); + // scroll top adjust to make sure the editor doesn't scroll when adding viewzone at the beginning. + this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() + this._viewZone.heightInPx); + }); + } + + private _showViewZone(adjustScroll: boolean = true) { + if (!this._isVisible) { + return; + } + + this._codeEditor.changeViewZones((accessor) => { + let scrollAdjustment = FIND_INPUT_AREA_HEIGHT; + + if (this._viewZoneId !== undefined) { + if (this._state.isReplaceRevealed) { + this._viewZone.heightInPx = FIND_REPLACE_AREA_HEIGHT; + scrollAdjustment = FIND_REPLACE_AREA_HEIGHT - FIND_INPUT_AREA_HEIGHT; + } else { + this._viewZone.heightInPx = FIND_INPUT_AREA_HEIGHT; + scrollAdjustment = FIND_INPUT_AREA_HEIGHT - FIND_REPLACE_AREA_HEIGHT; + } + accessor.removeZone(this._viewZoneId); + } else { + this._viewZone.heightInPx = FIND_INPUT_AREA_HEIGHT; + } + this._viewZoneId = accessor.addZone(this._viewZone); + + if (adjustScroll) { + this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() + scrollAdjustment); + } + }); } private _applyTheme(theme: ITheme) { @@ -382,6 +553,13 @@ export class FindWidget extends Widget implements IOverlayWidget { this._findInput.highlightFindOptions(); } + private _onFindInputMouseDown(e: IMouseEvent): void { + // on linux, middle key does pasting. + if (e.middleButton) { + e.stopPropagation(); + } + } + private _onFindInputKeyDown(e: IKeyboardEvent): void { if (e.equals(KeyCode.Enter)) { @@ -446,6 +624,17 @@ export class FindWidget extends Widget implements IOverlayWidget { } } + // ----- sash + public getHorizontalSashTop(sash: Sash): number { + return 0; + } + public getHorizontalSashLeft?(sash: Sash): number { + return 0; + } + public getHorizontalSashWidth?(sash: Sash): number { + return 500; + } + // ----- initialization private _keybindingLabelFor(actionId: string): string { @@ -459,7 +648,7 @@ export class FindWidget extends Widget implements IOverlayWidget { private _buildFindPart(): HTMLElement { // Find input this._findInput = this._register(new FindInput(null, this._contextViewProvider, { - width: FindWidget.FIND_INPUT_AREA_WIDTH, + width: FIND_INPUT_AREA_WIDTH, label: NLS_FIND_INPUT_LABEL, placeholder: NLS_FIND_INPUT_PLACEHOLDER, appendCaseSensitiveLabel: this._keybindingLabelFor(FIND_IDS.ToggleCaseSensitiveCommand), @@ -482,6 +671,9 @@ export class FindWidget extends Widget implements IOverlayWidget { } } })); + this._findInput.setRegex(!!this._state.isRegex); + this._findInput.setCaseSensitive(!!this._state.matchCase); + this._findInput.setWholeWords(!!this._state.wholeWord); this._register(this._findInput.onKeyDown((e) => this._onFindInputKeyDown(e))); this._register(this._findInput.onInput(() => { this._state.change({ searchString: this._findInput.getValue() }, true); @@ -501,6 +693,9 @@ export class FindWidget extends Widget implements IOverlayWidget { } } })); + if (platform.isLinux) { + this._register(this._findInput.onMouseDown((e) => this._onFindInputMouseDown(e))); + } this._matchesCount = document.createElement('div'); this._matchesCount.className = 'matchesCount'; @@ -536,7 +731,7 @@ export class FindWidget extends Widget implements IOverlayWidget { // Toggle selection button this._toggleSelectionFind = this._register(new SimpleCheckbox({ parent: findPart, - title: NLS_TOGGLE_SELECTION_FIND_TITLE, + title: NLS_TOGGLE_SELECTION_FIND_TITLE + this._keybindingLabelFor(FIND_IDS.ToggleSearchScopeCommand), onChange: () => { if (this._toggleSelectionFind.checked) { let selection = this._codeEditor.getSelection(); @@ -557,7 +752,7 @@ export class FindWidget extends Widget implements IOverlayWidget { label: NLS_CLOSE_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.CloseFindWidgetCommand), className: 'close-fw', onTrigger: () => { - this._state.change({ isRevealed: false }, false); + this._state.change({ isRevealed: false, searchScope: null }, false); }, onKeyDown: (e) => { if (e.equals(KeyCode.Tab)) { @@ -582,7 +777,7 @@ export class FindWidget extends Widget implements IOverlayWidget { // Replace input let replaceInput = document.createElement('div'); replaceInput.className = 'replace-input'; - replaceInput.style.width = FindWidget.REPLACE_INPUT_AREA_WIDTH + 'px'; + replaceInput.style.width = REPLACE_INPUT_AREA_WIDTH + 'px'; this._replaceInputBox = this._register(new InputBox(replaceInput, null, { ariaLabel: NLS_REPLACE_INPUT_LABEL, placeholder: NLS_REPLACE_INPUT_PLACEHOLDER @@ -640,6 +835,10 @@ export class FindWidget extends Widget implements IOverlayWidget { className: 'toggle left', onTrigger: () => { this._state.change({ isReplaceRevealed: !this._isReplaceVisible }, false); + if (this._isReplaceVisible) { + this._replaceInputBox.width = this._findInput.inputBox.width; + } + this._showViewZone(); }, onKeyDown: (e) => { } })); @@ -650,11 +849,41 @@ export class FindWidget extends Widget implements IOverlayWidget { // Widget this._domNode = document.createElement('div'); this._domNode.className = 'editor-widget find-widget'; - this._domNode.setAttribute('aria-hidden', 'false'); + this._domNode.setAttribute('aria-hidden', 'true'); this._domNode.appendChild(this._toggleReplaceBtn.domNode); this._domNode.appendChild(findPart); this._domNode.appendChild(replacePart); + + this._buildSash(); + } + + private _buildSash() { + this._resizeSash = new Sash(this._domNode, this, { orientation: Orientation.VERTICAL }); + let originalWidth = FIND_WIDGET_INITIAL_WIDTH; + + this._register(this._resizeSash.addListener('start', (e: ISashEvent) => { + originalWidth = dom.getTotalWidth(this._domNode); + })); + + this._register(this._resizeSash.addListener('change', (evt: ISashEvent) => { + let width = originalWidth + evt.startX - evt.currentX; + + if (width < FIND_WIDGET_INITIAL_WIDTH) { + // narrow down the find widget should be handled by CSS. + return; + } + + let inputBoxWidth = width - FIND_ALL_CONTROLS_WIDTH; + let maxWidth = parseFloat(dom.getComputedStyle(this._domNode).maxWidth) || 0; + if (width > maxWidth) { + return; + } + this._domNode.style.width = `${width}px`; + if (this._isReplaceVisible) { + this._replaceInputBox.width = inputBoxWidth; + } + })); } } @@ -680,16 +909,19 @@ class SimpleCheckbox extends Widget { this._domNode = document.createElement('div'); this._domNode.className = 'monaco-checkbox'; this._domNode.title = this._opts.title; + this._domNode.tabIndex = 0; this._checkbox = document.createElement('input'); this._checkbox.type = 'checkbox'; this._checkbox.className = 'checkbox'; this._checkbox.id = 'checkbox-' + SimpleCheckbox._COUNTER++; + this._checkbox.tabIndex = -1; this._label = document.createElement('label'); this._label.className = 'label'; // Connect the label and the checkbox. Checkbox will get checked when the label recieves a click. this._label.htmlFor = this._checkbox.id; + this._label.tabIndex = -1; this._domNode.appendChild(this._checkbox); this._domNode.appendChild(this._label); @@ -728,8 +960,10 @@ class SimpleCheckbox extends Widget { public setEnabled(enabled: boolean): void { if (enabled) { this.enable(); + this.domNode.tabIndex = 0; } else { this.disable(); + this.domNode.tabIndex = -1; } } } @@ -790,7 +1024,7 @@ class SimpleButton extends Widget { } public setExpanded(expanded: boolean): void { - this._domNode.setAttribute('aria-expanded', String(expanded)); + this._domNode.setAttribute('aria-expanded', String(!!expanded)); } public toggleClass(className: string, shouldHaveIt: boolean): void { @@ -803,7 +1037,7 @@ class SimpleButton extends Widget { registerThemingParticipant((theme, collector) => { function addBackgroundColorRule(selector: string, color: Color): void { if (color) { - collector.addRule(`.monaco-editor.${theme.selector} ${selector} { background-color: ${color}; }`); + collector.addRule(`.monaco-editor ${selector} { background-color: ${color}; }`); } } @@ -816,18 +1050,28 @@ registerThemingParticipant((theme, collector) => { let widgetShadowColor = theme.getColor(widgetShadow); if (widgetShadowColor) { - collector.addRule(`.monaco-editor.${theme.selector} .find-widget { box-shadow: 0 2px 8px ${widgetShadowColor}; }`); + collector.addRule(`.monaco-editor .find-widget { box-shadow: 0 2px 8px ${widgetShadowColor}; }`); } let hcOutline = theme.getColor(activeContrastBorder); if (hcOutline) { - collector.addRule(`.monaco-editor.${theme.selector} .findScope { border: 1px dashed ${hcOutline.transparent(0.4)}; }`); - collector.addRule(`.monaco-editor.${theme.selector} .currentFindMatch { border: 2px solid ${hcOutline}; padding: 1px; -moz-box-sizing: border-box; box-sizing: border-box; }`); - collector.addRule(`.monaco-editor.${theme.selector} .findMatch { border: 1px dotted ${hcOutline}; -moz-box-sizing: border-box; box-sizing: border-box; }`); + collector.addRule(`.monaco-editor .findScope { border: 1px dashed ${hcOutline.transparent(0.4)}; }`); + collector.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${hcOutline}; padding: 1px; -moz-box-sizing: border-box; box-sizing: border-box; }`); + collector.addRule(`.monaco-editor .findMatch { border: 1px dotted ${hcOutline}; -moz-box-sizing: border-box; box-sizing: border-box; }`); } let hcBorder = theme.getColor(contrastBorder); if (hcBorder) { - collector.addRule(`.monaco-editor.${theme.selector} .find-widget { border: 2px solid ${hcBorder}; }`); + collector.addRule(`.monaco-editor .find-widget { border: 2px solid ${hcBorder}; }`); + } + + let error = theme.getColor(errorForeground); + if (error) { + collector.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${error}; }`); + } + + let border = theme.getColor('panel.border'); + if (border) { + collector.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${border}; width: 3px !important; margin-left: -4px;}`); } }); diff --git a/src/vs/editor/contrib/find/common/findController.ts b/src/vs/editor/contrib/find/common/findController.ts index e3a133ee56089..b1195ab30f407 100644 --- a/src/vs/editor/contrib/find/common/findController.ts +++ b/src/vs/editor/contrib/find/common/findController.ts @@ -14,12 +14,14 @@ import { Selection } from 'vs/editor/common/core/selection'; import * as strings from 'vs/base/common/strings'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { editorAction, commonEditorContribution, ServicesAccessor, EditorAction, EditorCommand, CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; -import { FIND_IDS, FindModelBoundToEditorModel, ToggleCaseSensitiveKeybinding, ToggleRegexKeybinding, ToggleWholeWordKeybinding, ShowPreviousFindTermKeybinding, ShowNextFindTermKeybinding } from 'vs/editor/contrib/find/common/findModel'; +import { FIND_IDS, FindModelBoundToEditorModel, ToggleCaseSensitiveKeybinding, ToggleRegexKeybinding, ToggleWholeWordKeybinding, ToggleSearchScopeKeybinding, ShowPreviousFindTermKeybinding, ShowNextFindTermKeybinding } from 'vs/editor/contrib/find/common/findModel'; import { FindReplaceState, FindReplaceStateChangedEvent, INewFindReplaceState } from 'vs/editor/contrib/find/common/findState'; import { DocumentHighlightProviderRegistry } from 'vs/editor/common/modes'; import { RunOnceScheduler, Delayer } from 'vs/base/common/async'; import { CursorChangeReason, ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; +import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; export const enum FindStartFocusAction { NoFocusChange, @@ -48,19 +50,22 @@ export class CommonFindController extends Disposable implements editorCommon.IEd private _currentHistoryNavigator: HistoryNavigator; protected _updateHistoryDelayer: Delayer; private _model: FindModelBoundToEditorModel; + private _storageService: IStorageService; public static get(editor: editorCommon.ICommonCodeEditor): CommonFindController { return editor.getContribution(CommonFindController.ID); } - constructor(editor: editorCommon.ICommonCodeEditor, @IContextKeyService contextKeyService: IContextKeyService) { + constructor(editor: editorCommon.ICommonCodeEditor, @IContextKeyService contextKeyService: IContextKeyService, @IStorageService storageService: IStorageService) { super(); this._editor = editor; this._findWidgetVisible = CONTEXT_FIND_WIDGET_VISIBLE.bindTo(contextKeyService); + this._storageService = storageService; this._updateHistoryDelayer = new Delayer(500); this._currentHistoryNavigator = new HistoryNavigator(); this._state = this._register(new FindReplaceState()); + this.loadQueryState(); this._register(this._state.addChangeListener((e) => this._onStateChanged(e))); this._model = null; @@ -71,7 +76,10 @@ export class CommonFindController extends Disposable implements editorCommon.IEd this.disposeModel(); this._state.change({ - searchScope: null + searchScope: null, + matchCase: this._storageService.getBoolean('editor.matchCase', StorageScope.WORKSPACE, false), + wholeWord: this._storageService.getBoolean('editor.wholeWord', StorageScope.WORKSPACE, false), + isRegex: this._storageService.getBoolean('editor.isRegex', StorageScope.WORKSPACE, false) }, false); if (shouldRestartFind) { @@ -102,6 +110,8 @@ export class CommonFindController extends Disposable implements editorCommon.IEd } private _onStateChanged(e: FindReplaceStateChangedEvent): void { + this.saveQueryState(e); + if (e.updateHistory && e.searchString) { this._delayedUpdateHistory(); } @@ -115,6 +125,26 @@ export class CommonFindController extends Disposable implements editorCommon.IEd } } + private saveQueryState(e: FindReplaceStateChangedEvent) { + if (e.isRegex && typeof this._state.isRegex !== 'undefined') { + this._storageService.store('editor.isRegex', this._state.isRegex, StorageScope.WORKSPACE); + } + if (e.wholeWord && typeof this._state.wholeWord !== 'undefined') { + this._storageService.store('editor.wholeWord', this._state.wholeWord, StorageScope.WORKSPACE); + } + if (e.matchCase && typeof this._state.matchCase !== 'undefined') { + this._storageService.store('editor.matchCase', this._state.matchCase, StorageScope.WORKSPACE); + } + } + + private loadQueryState() { + this._state.change({ + matchCase: this._storageService.getBoolean('editor.matchCase', StorageScope.WORKSPACE, this._state.matchCase), + wholeWord: this._storageService.getBoolean('editor.wholeWord', StorageScope.WORKSPACE, this._state.wholeWord), + isRegex: this._storageService.getBoolean('editor.isRegex', StorageScope.WORKSPACE, this._state.isRegex) + }, false); + } + protected _delayedUpdateHistory() { this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)); } @@ -153,6 +183,20 @@ export class CommonFindController extends Disposable implements editorCommon.IEd this._state.change({ isRegex: !this._state.isRegex }, false); } + public toggleSearchScope(): void { + if (this._state.searchScope) { + this._state.change({ searchScope: null }, true); + } else { + let selection = this._editor.getSelection(); + if (selection.endColumn === 1 && selection.endLineNumber > selection.startLineNumber) { + selection = selection.setEndPosition(selection.endLineNumber - 1, 1); + } + if (!selection.isEmpty()) { + this._state.change({ searchScope: selection }, true); + } + } + } + public setSearchString(searchString: string): void { this._state.change({ searchString: searchString }, false); } @@ -191,7 +235,7 @@ export class CommonFindController extends Disposable implements editorCommon.IEd }; // Consider editor selection and overwrite the state with it - if (opts.seedSearchStringFromSelection) { + if (opts.seedSearchStringFromSelection && this._editor.getConfiguration().contribInfo.find.seedSearchStringFromSelection) { let selectionSearchString = this.getSelectionSearchString(); if (selectionSearchString) { if (this._state.isRegex) { @@ -462,11 +506,21 @@ export class StartFindReplaceAction extends EditorAction { } let controller = CommonFindController.get(editor); + let currentSelection = editor.getSelection(); + // we only seed search string from selection when the current selection is single line and not empty. + let seedSearchStringFromSelection = !currentSelection.isEmpty() && + currentSelection.startLineNumber === currentSelection.endLineNumber; + let oldSearchString = controller.getState().searchString; + // if the existing search string in find widget is empty and we don't seed search string from selection, it means the Find Input + // is still empty, so we should focus the Find Input instead of Replace Input. + let shouldFocus = (!!oldSearchString || seedSearchStringFromSelection) ? + FindStartFocusAction.FocusReplaceInput : FindStartFocusAction.FocusFindInput; + if (controller) { controller.start({ forceRevealReplace: true, - seedSearchStringFromSelection: true, - shouldFocus: FindStartFocusAction.FocusReplaceInput, + seedSearchStringFromSelection: seedSearchStringFromSelection, + shouldFocus: shouldFocus, shouldAnimate: true }); } @@ -561,7 +615,7 @@ export abstract class SelectNextFindMatchAction extends EditorAction { let allSelections = editor.getSelections(); let lastAddedSelection = allSelections[allSelections.length - 1]; - let nextMatch = editor.getModel().findNextMatch(r.searchText, lastAddedSelection.getEndPosition(), false, r.matchCase, r.wholeWord, false); + let nextMatch = editor.getModel().findNextMatch(r.searchText, lastAddedSelection.getEndPosition(), false, r.matchCase, r.wholeWord ? editor.getConfiguration().wordSeparators : null, false); if (!nextMatch) { return null; @@ -588,7 +642,7 @@ export abstract class SelectPreviousFindMatchAction extends EditorAction { let allSelections = editor.getSelections(); let lastAddedSelection = allSelections[allSelections.length - 1]; - let previousMatch = editor.getModel().findPreviousMatch(r.searchText, lastAddedSelection.getStartPosition(), false, r.matchCase, r.wholeWord, false); + let previousMatch = editor.getModel().findPreviousMatch(r.searchText, lastAddedSelection.getStartPosition(), false, r.matchCase, r.wholeWord ? editor.getConfiguration().wordSeparators : null, false); if (!previousMatch) { return null; @@ -760,16 +814,31 @@ export class MoveSelectionToPreviousFindMatchAction extends SelectPreviousFindMa export abstract class AbstractSelectHighlightsAction extends EditorAction { public run(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor): void { - let r = multiCursorFind(editor, { - changeFindSearchString: true, - allowMultiline: true, - highlightFindOptions: true - }); - if (!r) { - return; + let controller = CommonFindController.get(editor); + if (!controller) { + return null; } - let matches = editor.getModel().findMatches(r.searchText, true, false, r.matchCase, r.wholeWord, false).map(m => m.range); + let matches: Range[] = null; + + const findState = controller.getState(); + if (findState.isRevealed && findState.isRegex && findState.searchString.length > 0) { + + matches = editor.getModel().findMatches(findState.searchString, true, findState.isRegex, findState.matchCase, findState.wholeWord ? editor.getConfiguration().wordSeparators : null, false).map(m => m.range); + + } else { + + let r = multiCursorFind(editor, { + changeFindSearchString: true, + allowMultiline: true, + highlightFindOptions: true + }); + if (!r) { + return; + } + + matches = editor.getModel().findMatches(r.searchText, true, false, r.matchCase, r.wholeWord ? editor.getConfiguration().wordSeparators : null, false).map(m => m.range); + } if (matches.length > 0) { let editorSelection = editor.getSelection(); @@ -793,7 +862,7 @@ export class SelectHighlightsAction extends AbstractSelectHighlightsAction { constructor() { super({ id: 'editor.action.selectHighlights', - label: nls.localize('selectAllOccurencesOfFindMatch', "Select All Occurrences of Find Match"), + label: nls.localize('selectAllOccurrencesOfFindMatch', "Select All Occurrences of Find Match"), alias: 'Select All Occurrences of Find Match', precondition: null, kbOpts: { @@ -824,32 +893,74 @@ export class CompatChangeAll extends AbstractSelectHighlightsAction { } } +class SelectionHighlighterState { + public readonly lastWordUnderCursor: Selection; + public readonly searchText: string; + public readonly matchCase: boolean; + public readonly wordSeparators: string; + + constructor(lastWordUnderCursor: Selection, searchText: string, matchCase: boolean, wordSeparators: string) { + this.searchText = searchText; + this.matchCase = matchCase; + this.wordSeparators = wordSeparators; + } + + /** + * Everything equals except for `lastWordUnderCursor` + */ + public static softEquals(a: SelectionHighlighterState, b: SelectionHighlighterState): boolean { + if (!a && !b) { + return true; + } + if (!a || !b) { + return false; + } + return ( + a.searchText === b.searchText + && a.matchCase === b.matchCase + && a.wordSeparators === b.wordSeparators + ); + } +} + @commonEditorContribution export class SelectionHighlighter extends Disposable implements editorCommon.IEditorContribution { private static ID = 'editor.contrib.selectionHighlighter'; private editor: editorCommon.ICommonCodeEditor; + private _isEnabled: boolean; private decorations: string[]; private updateSoon: RunOnceScheduler; - private lastWordUnderCursor: Range; + private state: SelectionHighlighterState; constructor(editor: editorCommon.ICommonCodeEditor) { super(); this.editor = editor; + this._isEnabled = editor.getConfiguration().contribInfo.selectionHighlight; this.decorations = []; this.updateSoon = this._register(new RunOnceScheduler(() => this._update(), 300)); - this.lastWordUnderCursor = null; + this.state = null; + this._register(editor.onDidChangeConfiguration((e) => { + this._isEnabled = editor.getConfiguration().contribInfo.selectionHighlight; + })); this._register(editor.onDidChangeCursorSelection((e: ICursorSelectionChangedEvent) => { + + if (!this._isEnabled) { + // Early exit if nothing needs to be done! + // Leave some form of early exit check here if you wish to continue being a cursor position change listener ;) + return; + } + if (e.selection.isEmpty()) { if (e.reason === CursorChangeReason.Explicit) { - if (!this.lastWordUnderCursor || !this.lastWordUnderCursor.containsPosition(e.selection.getStartPosition())) { + if (this.state && (!this.state.lastWordUnderCursor || !this.state.lastWordUnderCursor.containsPosition(e.selection.getStartPosition()))) { // no longer valid - this.removeDecorations(); + this._setState(null); } this.updateSoon.schedule(); } else { - this.removeDecorations(); + this._setState(null); } } else { @@ -857,7 +968,7 @@ export class SelectionHighlighter extends Disposable implements editorCommon.IEd } })); this._register(editor.onDidChangeModel((e) => { - this.removeDecorations(); + this._setState(null); })); this._register(CommonFindController.get(editor).getState().addChangeListener((e) => { this._update(); @@ -868,73 +979,63 @@ export class SelectionHighlighter extends Disposable implements editorCommon.IEd return SelectionHighlighter.ID; } - private removeDecorations(): void { - this.lastWordUnderCursor = null; - if (this.decorations.length > 0) { - this.decorations = this.editor.deltaDecorations(this.decorations, []); - } + private _update(): void { + this._setState(SelectionHighlighter._createState(this._isEnabled, this.editor)); } - private _update(): void { - const model = this.editor.getModel(); + private static _createState(isEnabled: boolean, editor: editorCommon.ICommonCodeEditor): SelectionHighlighterState { + const model = editor.getModel(); if (!model) { - return; + return null; } - const config = this.editor.getConfiguration(); + const config = editor.getConfiguration(); - this.lastWordUnderCursor = null; - if (!config.contribInfo.selectionHighlight) { - this.removeDecorations(); - return; + let lastWordUnderCursor: Selection = null; + if (!isEnabled) { + return null; } - let r = multiCursorFind(this.editor, { + const r = multiCursorFind(editor, { changeFindSearchString: false, allowMultiline: false, highlightFindOptions: false }); if (!r) { - this.removeDecorations(); - return; + return null; } - let hasFindOccurences = DocumentHighlightProviderRegistry.has(model); + const hasFindOccurrences = DocumentHighlightProviderRegistry.has(model); if (r.currentMatch) { // This is an empty selection - if (hasFindOccurences) { + if (hasFindOccurrences) { // Do not interfere with semantic word highlighting in the no selection case - this.removeDecorations(); - return; + return null; } if (!config.contribInfo.occurrencesHighlight) { - this.removeDecorations(); - return; + return null; } - this.lastWordUnderCursor = r.currentMatch; + lastWordUnderCursor = r.currentMatch; } if (/^[ \t]+$/.test(r.searchText)) { // whitespace only selection - this.removeDecorations(); - return; + return null; } if (r.searchText.length > 200) { // very long selection - this.removeDecorations(); - return; + return null; } - const controller = CommonFindController.get(this.editor); + const controller = CommonFindController.get(editor); if (!controller) { - this.removeDecorations(); - return; + return null; } const findState = controller.getState(); const caseSensitive = findState.matchCase; - let selections = this.editor.getSelections(); + const selections = editor.getSelections(); let firstSelectedText = model.getValueInRange(selections[0]); if (!caseSensitive) { firstSelectedText = firstSelectedText.toLowerCase(); @@ -946,28 +1047,48 @@ export class SelectionHighlighter extends Disposable implements editorCommon.IEd } if (firstSelectedText !== selectedText) { // not all selections have the same text - this.removeDecorations(); - return; + return null; } } + return new SelectionHighlighterState(lastWordUnderCursor, r.searchText, r.matchCase, r.wholeWord ? editor.getConfiguration().wordSeparators : null); + } + - let allMatches = model.findMatches(r.searchText, true, false, r.matchCase, r.wholeWord, false).map(m => m.range); + private _setState(state: SelectionHighlighterState): void { + if (SelectionHighlighterState.softEquals(this.state, state)) { + this.state = state; + return; + } + this.state = state; + + if (!this.state) { + if (this.decorations.length > 0) { + this.decorations = this.editor.deltaDecorations(this.decorations, []); + } + return; + } + + const model = this.editor.getModel(); + const hasFindOccurrences = DocumentHighlightProviderRegistry.has(model); + + let allMatches = model.findMatches(this.state.searchText, true, false, this.state.matchCase, this.state.wordSeparators, false).map(m => m.range); allMatches.sort(Range.compareRangesUsingStarts); + let selections = this.editor.getSelections(); selections.sort(Range.compareRangesUsingStarts); // do not overlap with selection (issue #64 and #512) let matches: Range[] = []; for (let i = 0, j = 0, len = allMatches.length, lenJ = selections.length; i < len;) { - let match = allMatches[i]; + const match = allMatches[i]; if (j >= lenJ) { // finished all editor selections matches.push(match); i++; } else { - let cmp = Range.compareRangesUsingStarts(match, selections[j]); + const cmp = Range.compareRangesUsingStarts(match, selections[j]); if (cmp < 0) { // match is before sel matches.push(match); @@ -983,27 +1104,34 @@ export class SelectionHighlighter extends Disposable implements editorCommon.IEd } } - let decorations = matches.map(r => { + const decorations = matches.map(r => { return { range: r, - options: { - stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, - className: 'selectionHighlight', - // Show in overviewRuler only if model has no semantic highlighting - overviewRuler: (hasFindOccurences ? undefined : { - color: '#A0A0A0', - darkColor: '#A0A0A0', - position: editorCommon.OverviewRulerLane.Center - }) - } + // Show in overviewRuler only if model has no semantic highlighting + options: (hasFindOccurrences ? SelectionHighlighter._SELECTION_HIGHLIGHT : SelectionHighlighter._SELECTION_HIGHLIGHT_OVERVIEW) }; }); this.decorations = this.editor.deltaDecorations(this.decorations, decorations); } + private static _SELECTION_HIGHLIGHT_OVERVIEW = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + className: 'selectionHighlight', + overviewRuler: { + color: '#A0A0A0', + darkColor: '#A0A0A0', + position: editorCommon.OverviewRulerLane.Center + } + }); + + private static _SELECTION_HIGHLIGHT = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + className: 'selectionHighlight', + }); + public dispose(): void { - this.removeDecorations(); + this._setState(null); super.dispose(); } } @@ -1064,6 +1192,20 @@ CommonEditorRegistry.registerEditorCommand(new FindCommand({ } })); +CommonEditorRegistry.registerEditorCommand(new FindCommand({ + id: FIND_IDS.ToggleSearchScopeCommand, + precondition: null, + handler: x => x.toggleSearchScope(), + kbOpts: { + weight: CommonEditorRegistry.commandWeight(5), + kbExpr: EditorContextKeys.focus, + primary: ToggleSearchScopeKeybinding.primary, + mac: ToggleSearchScopeKeybinding.mac, + win: ToggleSearchScopeKeybinding.win, + linux: ToggleSearchScopeKeybinding.linux + } +})); + CommonEditorRegistry.registerEditorCommand(new FindCommand({ id: FIND_IDS.ReplaceOneAction, precondition: CONTEXT_FIND_WIDGET_VISIBLE, diff --git a/src/vs/editor/contrib/find/common/findDecorations.ts b/src/vs/editor/contrib/find/common/findDecorations.ts index 599e3d04c2754..4cf3d63128420 100644 --- a/src/vs/editor/contrib/find/common/findDecorations.ts +++ b/src/vs/editor/contrib/find/common/findDecorations.ts @@ -8,6 +8,7 @@ import { IDisposable } from 'vs/base/common/lifecycle'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; export class FindDecorations implements IDisposable { @@ -105,7 +106,7 @@ export class FindDecorations implements IDisposable { } if (newCurrentDecorationId !== null) { let rng = this._editor.getModel().getDecorationRange(newCurrentDecorationId); - this._rangeHighlightDecorationId = changeAccessor.addDecoration(rng, FindDecorations.createRangeHighlightDecoration()); + this._rangeHighlightDecorationId = changeAccessor.addDecoration(rng, FindDecorations._RANGE_HIGHLIGHT_DECORATION); } }); } @@ -123,7 +124,7 @@ export class FindDecorations implements IDisposable { if (findScope) { newDecorations.unshift({ range: findScope, - options: FindDecorations.createFindScopeDecorationOptions() + options: FindDecorations._FIND_SCOPE_DECORATION }); } let tmpDecorations = this._editor.deltaDecorations(this._allDecorations(), newDecorations); @@ -150,30 +151,40 @@ export class FindDecorations implements IDisposable { return result; } - private static createFindMatchDecorationOptions(isCurrent: boolean): editorCommon.IModelDecorationOptions { - return { - stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, - className: isCurrent ? 'currentFindMatch' : 'findMatch', - overviewRuler: { - color: 'rgba(246, 185, 77, 0.7)', - darkColor: 'rgba(246, 185, 77, 0.7)', - position: editorCommon.OverviewRulerLane.Center - } - }; - } - - private static createRangeHighlightDecoration(): editorCommon.IModelDecorationOptions { - return { - stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, - className: 'rangeHighlight', - isWholeLine: true - }; + private static createFindMatchDecorationOptions(isCurrent: boolean): ModelDecorationOptions { + return (isCurrent ? this._CURRENT_FIND_MATCH_DECORATION : this._FIND_MATCH_DECORATION); } - private static createFindScopeDecorationOptions(): editorCommon.IModelDecorationOptions { - return { - className: 'findScope', - isWholeLine: true - }; - } + private static _CURRENT_FIND_MATCH_DECORATION = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + className: 'currentFindMatch', + showIfCollapsed: true, + overviewRuler: { + color: 'rgba(246, 185, 77, 0.7)', + darkColor: 'rgba(246, 185, 77, 0.7)', + position: editorCommon.OverviewRulerLane.Center + } + }); + + private static _FIND_MATCH_DECORATION = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + className: 'findMatch', + showIfCollapsed: true, + overviewRuler: { + color: 'rgba(246, 185, 77, 0.7)', + darkColor: 'rgba(246, 185, 77, 0.7)', + position: editorCommon.OverviewRulerLane.Center + } + }); + + private static _RANGE_HIGHLIGHT_DECORATION = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + className: 'rangeHighlight', + isWholeLine: true + }); + + private static _FIND_SCOPE_DECORATION = ModelDecorationOptions.register({ + className: 'findScope', + isWholeLine: true + }); } diff --git a/src/vs/editor/contrib/find/common/findModel.ts b/src/vs/editor/contrib/find/common/findModel.ts index a21568981d2b8..ed888ad922a09 100644 --- a/src/vs/editor/contrib/find/common/findModel.ts +++ b/src/vs/editor/contrib/find/common/findModel.ts @@ -33,6 +33,10 @@ export const ToggleRegexKeybinding: IKeybindings = { primary: KeyMod.Alt | KeyCode.KEY_R, mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_R } }; +export const ToggleSearchScopeKeybinding: IKeybindings = { + primary: KeyMod.Alt | KeyCode.KEY_L, + mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_L } +}; export const ShowPreviousFindTermKeybinding: IKeybindings = { primary: KeyMod.Alt | KeyCode.UpArrow }; @@ -55,6 +59,7 @@ export const FIND_IDS = { ToggleCaseSensitiveCommand: 'toggleFindCaseSensitive', ToggleWholeWordCommand: 'toggleFindWholeWord', ToggleRegexCommand: 'toggleFindRegex', + ToggleSearchScopeCommand: 'toggleFindInSelection', ReplaceOneAction: 'editor.action.replaceOne', ReplaceAllAction: 'editor.action.replaceAll', SelectAllMatchesAction: 'editor.action.selectAllMatches', @@ -230,7 +235,7 @@ export class FindModelBoundToEditorModel { let position = new Position(lineNumber, column); - let prevMatch = model.findPreviousMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord, false); + let prevMatch = model.findPreviousMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getConfiguration().wordSeparators : null, false); if (prevMatch && prevMatch.range.isEmpty() && prevMatch.range.getStartPosition().equals(position)) { // Looks like we're stuck at this position, unacceptable! @@ -252,7 +257,7 @@ export class FindModelBoundToEditorModel { } position = new Position(lineNumber, column); - prevMatch = model.findPreviousMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord, false); + prevMatch = model.findPreviousMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getConfiguration().wordSeparators : null, false); } if (!prevMatch) { @@ -272,13 +277,13 @@ export class FindModelBoundToEditorModel { } private _moveToNextMatch(after: Position): void { - let nextMatch = this._getNextMatch(after, false); + let nextMatch = this._getNextMatch(after, false, true); if (nextMatch) { this._setCurrentFindMatch(nextMatch.range); } } - private _getNextMatch(after: Position, captureMatches: boolean, isRecursed: boolean = false): editorCommon.FindMatch { + private _getNextMatch(after: Position, captureMatches: boolean, forceMove: boolean, isRecursed: boolean = false): editorCommon.FindMatch { if (this._cannotFind()) { return null; } @@ -301,9 +306,9 @@ export class FindModelBoundToEditorModel { let position = new Position(lineNumber, column); - let nextMatch = model.findNextMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord, captureMatches); + let nextMatch = model.findNextMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getConfiguration().wordSeparators : null, captureMatches); - if (nextMatch && nextMatch.range.isEmpty() && nextMatch.range.getStartPosition().equals(position)) { + if (forceMove && nextMatch && nextMatch.range.isEmpty() && nextMatch.range.getStartPosition().equals(position)) { // Looks like we're stuck at this position, unacceptable! let isUsingLineStops = this._state.isRegex && ( @@ -323,7 +328,7 @@ export class FindModelBoundToEditorModel { } position = new Position(lineNumber, column); - nextMatch = model.findNextMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord, captureMatches); + nextMatch = model.findNextMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getConfiguration().wordSeparators : null, captureMatches); } if (!nextMatch) { @@ -332,7 +337,7 @@ export class FindModelBoundToEditorModel { } if (!isRecursed && !searchRange.containsRange(nextMatch.range)) { - return this._getNextMatch(nextMatch.range.getEndPosition(), captureMatches, true); + return this._getNextMatch(nextMatch.range.getEndPosition(), captureMatches, forceMove, true); } return nextMatch; @@ -356,7 +361,7 @@ export class FindModelBoundToEditorModel { let replacePattern = this._getReplacePattern(); let selection = this._editor.getSelection(); - let nextMatch = this._getNextMatch(selection.getStartPosition(), replacePattern.hasReplacementPatterns); + let nextMatch = this._getNextMatch(selection.getStartPosition(), replacePattern.hasReplacementPatterns, false); if (nextMatch) { if (selection.equalsRange(nextMatch.range)) { // selection sits on a find match => replace it! @@ -377,7 +382,7 @@ export class FindModelBoundToEditorModel { private _findMatches(findScope: Range, captureMatches: boolean, limitResultCount: number): editorCommon.FindMatch[] { let searchRange = FindModelBoundToEditorModel._getSearchRange(this._editor.getModel(), this._state.isReplaceRevealed, findScope); - return this._editor.getModel().findMatches(this._state.searchString, searchRange, this._state.isRegex, this._state.matchCase, this._state.wholeWord, captureMatches, limitResultCount); + return this._editor.getModel().findMatches(this._state.searchString, searchRange, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getConfiguration().wordSeparators : null, captureMatches, limitResultCount); } public replaceAll(): void { @@ -398,7 +403,7 @@ export class FindModelBoundToEditorModel { } private _largeReplaceAll(): void { - const searchParams = new SearchParams(this._state.searchString, this._state.isRegex, this._state.matchCase, this._state.wholeWord); + const searchParams = new SearchParams(this._state.searchString, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getConfiguration().wordSeparators : null); const searchData = searchParams.parseSearchRequest(); if (!searchData) { return; @@ -463,7 +468,9 @@ export class FindModelBoundToEditorModel { private _executeEditorCommand(source: string, command: editorCommon.ICommand): void { try { this._ignoreModelContentChanged = true; + this._editor.pushUndoStop(); this._editor.executeCommand(source, command); + this._editor.pushUndoStop(); } finally { this._ignoreModelContentChanged = false; } diff --git a/src/vs/editor/contrib/find/test/common/findController.test.ts b/src/vs/editor/contrib/find/test/common/findController.test.ts index 949fbc5632e32..20559f5713bb1 100644 --- a/src/vs/editor/contrib/find/test/common/findController.test.ts +++ b/src/vs/editor/contrib/find/test/common/findController.test.ts @@ -11,7 +11,7 @@ import { EditOperation } from 'vs/editor/common/core/editOperation'; import { Position } from 'vs/editor/common/core/position'; import { Selection } from 'vs/editor/common/core/selection'; import { Range } from 'vs/editor/common/core/range'; -import { EndOfLineSequence, ICommonCodeEditor } from 'vs/editor/common/editorCommon'; +import { EndOfLineSequence, ICommonCodeEditor, Handler } from 'vs/editor/common/editorCommon'; import { CommonFindController, FindStartFocusAction, IFindStartOptions, NextMatchFindAction, StartFindAction, SelectHighlightsAction, @@ -20,6 +20,8 @@ import { import { MockCodeEditor, withMockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; import { HistoryNavigator } from 'vs/base/common/history'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { IStorageService } from 'vs/platform/storage/common/storage'; +import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { Delayer } from 'vs/base/common/async'; class TestFindController extends CommonFindController { @@ -30,8 +32,8 @@ class TestFindController extends CommonFindController { private _delayedUpdateHistoryEvent: Emitter = new Emitter(); - constructor(editor: ICommonCodeEditor, @IContextKeyService contextKeyService: IContextKeyService) { - super(editor, contextKeyService); + constructor(editor: ICommonCodeEditor, @IContextKeyService contextKeyService: IContextKeyService, @IStorageService storageService: IStorageService) { + super(editor, contextKeyService, storageService); this._updateHistoryDelayer = new Delayer(50); } @@ -66,11 +68,18 @@ class TestFindController extends CommonFindController { } } -suite('FindController', () => { +function fromRange(rng: Range): number[] { + return [rng.startLineNumber, rng.startColumn, rng.endLineNumber, rng.endColumn]; +} - function fromRange(rng: Range): number[] { - return [rng.startLineNumber, rng.startColumn, rng.endLineNumber, rng.endColumn]; - } +suite('FindController', () => { + let queryState: { [key: string]: any; } = {}; + let serviceCollection = new ServiceCollection(); + serviceCollection.set(IStorageService, { + get: (key: string) => queryState[key], + getBoolean: (key: string) => !!queryState[key], + store: (key: string, value: any) => { queryState[key] = value; } + }); test('issue #1857: F3, Find Next, acts like "Find Under Cursor"', () => { withMockCodeEditor([ @@ -78,7 +87,7 @@ suite('FindController', () => { 'ABC', 'XYZ', 'ABC' - ], {}, (editor, cursor) => { + ], { serviceCollection: serviceCollection }, (editor, cursor) => { // The cursor is at the very top, of the file, at the first ABC let findController = editor.registerAndInstantiateContribution(TestFindController); @@ -133,7 +142,7 @@ suite('FindController', () => { test('issue #3090: F3 does not loop with two matches on a single line', () => { withMockCodeEditor([ 'import nls = require(\'vs/nls\');' - ], {}, (editor, cursor) => { + ], { serviceCollection: serviceCollection }, (editor, cursor) => { let findController = editor.registerAndInstantiateContribution(TestFindController); let nextMatchFindAction = new NextMatchFindAction(); @@ -158,7 +167,7 @@ suite('FindController', () => { 'var x = (3 * 5)', 'var y = (3 * 5)', 'var z = (3 * 5)', - ], {}, (editor, cursor) => { + ], { serviceCollection: serviceCollection }, (editor, cursor) => { let findController = editor.registerAndInstantiateContribution(TestFindController); let startFindAction = new StartFindAction(); @@ -184,7 +193,7 @@ suite('FindController', () => { 'var x = (3 * 5)', 'var y = (3 * 5)', 'var z = (3 * 5)', - ], {}, (editor, cursor) => { + ], { serviceCollection: serviceCollection }, (editor, cursor) => { let findController = editor.registerAndInstantiateContribution(TestFindController); let selectHighlightsAction = new SelectHighlightsAction(); @@ -206,12 +215,39 @@ suite('FindController', () => { }); }); + test('issue #5400: "Select All Occurrences of Find Match" does not select all if find uses regex', () => { + withMockCodeEditor([ + 'something', + 'someething', + 'someeething', + 'nothing' + ], { serviceCollection: serviceCollection }, (editor, cursor) => { + + let findController = editor.registerAndInstantiateContribution(TestFindController); + let selectHighlightsAction = new SelectHighlightsAction(); + + editor.setSelection(new Selection(1, 1, 1, 1)); + findController.getState().change({ searchString: 'some+thing', isRegex: true, isRevealed: true }, false); + + selectHighlightsAction.run(null, editor); + assert.deepEqual(editor.getSelections().map(fromRange), [ + [1, 1, 1, 10], + [2, 1, 2, 11], + [3, 1, 3, 12], + ]); + + assert.equal(findController.getState().searchString, 'some+thing'); + + findController.dispose(); + }); + }); + test('issue #9043: Clear search scope when find widget is hidden', () => { withMockCodeEditor([ 'var x = (3 * 5)', 'var y = (3 * 5)', 'var z = (3 * 5)', - ], {}, (editor, cursor) => { + ], { serviceCollection: serviceCollection }, (editor, cursor) => { let findController = editor.registerAndInstantiateContribution(TestFindController); findController.start({ @@ -239,7 +275,7 @@ suite('FindController', () => { 'var x = (3 * 5)', 'var y = (3 * 5)', 'var z = (3 * 5)', - ], {}, (editor, cursor) => { + ], { serviceCollection: serviceCollection }, (editor, cursor) => { let findController = editor.registerAndInstantiateContribution(TestFindController); findController.getState().change({ searchString: '1' }, false); @@ -255,7 +291,7 @@ suite('FindController', () => { 'var x = (3 * 5)', 'var y = (3 * 5)', 'var z = (3 * 5)', - ], {}, (editor, cursor) => { + ], { serviceCollection: serviceCollection }, (editor, cursor) => { let findController = editor.registerAndInstantiateContribution(TestFindController); findController.delayUpdateHistory = true; @@ -275,7 +311,7 @@ suite('FindController', () => { 'var x = (3 * 5)', 'var y = (3 * 5)', 'var z = (3 * 5)', - ], {}, (editor, cursor) => { + ], { serviceCollection: serviceCollection }, (editor, cursor) => { let findController = editor.registerAndInstantiateContribution(TestFindController); findController.getState().change({ searchString: '1' }, false); @@ -292,7 +328,7 @@ suite('FindController', () => { 'var x = (3 * 5)', 'var y = (3 * 5)', 'var z = (3 * 5)', - ], {}, (editor, cursor) => { + ], { serviceCollection: serviceCollection }, (editor, cursor) => { let findController = editor.registerAndInstantiateContribution(TestFindController); findController.getState().change({ searchString: '1' }, false); @@ -309,7 +345,7 @@ suite('FindController', () => { 'var x = (3 * 5)', 'var y = (3 * 5)', 'var z = (3 * 5)', - ], {}, (editor, cursor) => { + ], { serviceCollection: serviceCollection }, (editor, cursor) => { let findController = editor.registerAndInstantiateContribution(TestFindController); findController.getState().change({ searchString: '1' }, false); @@ -329,7 +365,7 @@ suite('FindController', () => { 'var x = (3 * 5)', 'var y = (3 * 5)', 'var z = (3 * 5)', - ], {}, (editor, cursor) => { + ], { serviceCollection: serviceCollection }, (editor, cursor) => { let findController = editor.registerAndInstantiateContribution(TestFindController); findController.getState().change({ searchString: '1' }, false); @@ -355,7 +391,7 @@ suite('FindController', () => { 'rty', 'qwe', 'rty' - ], {}, (editor, cursor) => { + ], { serviceCollection: serviceCollection }, (editor, cursor) => { let findController = editor.registerAndInstantiateContribution(TestFindController); let addSelectionToNextFindMatch = new AddSelectionToNextFindMatchAction(); @@ -376,6 +412,53 @@ suite('FindController', () => { }); }); + test('issue #6661: AddSelectionToNextFindMatchAction can work with touching ranges', () => { + withMockCodeEditor([ + 'abcabc', + 'abc', + 'abcabc', + ], { serviceCollection: serviceCollection }, (editor, cursor) => { + + let findController = editor.registerAndInstantiateContribution(TestFindController); + let addSelectionToNextFindMatch = new AddSelectionToNextFindMatchAction(); + + editor.setSelection(new Selection(1, 1, 1, 4)); + + addSelectionToNextFindMatch.run(null, editor); + assert.deepEqual(editor.getSelections().map(fromRange), [ + [1, 1, 1, 4], + [1, 4, 1, 7] + ]); + + addSelectionToNextFindMatch.run(null, editor); + addSelectionToNextFindMatch.run(null, editor); + addSelectionToNextFindMatch.run(null, editor); + assert.deepEqual(editor.getSelections().map(fromRange), [ + [1, 1, 1, 4], + [1, 4, 1, 7], + [2, 1, 2, 4], + [3, 1, 3, 4], + [3, 4, 3, 7] + ]); + + editor.trigger('test', Handler.Type, { text: 'z' }); + assert.deepEqual(editor.getSelections().map(fromRange), [ + [1, 2, 1, 2], + [1, 3, 1, 3], + [2, 2, 2, 2], + [3, 2, 3, 2], + [3, 3, 3, 3] + ]); + assert.equal(editor.getValue(), [ + 'zz', + 'z', + 'zz', + ].join('\n')); + + findController.dispose(); + }); + }); + test('issue #23541: Multiline Ctrl+D does not work in CRLF files', () => { withMockCodeEditor([ '', @@ -387,7 +470,7 @@ suite('FindController', () => { 'rty', 'qwe', 'rty' - ], {}, (editor, cursor) => { + ], { serviceCollection: serviceCollection }, (editor, cursor) => { editor.getModel().setEOL(EndOfLineSequence.CRLF); @@ -413,7 +496,7 @@ suite('FindController', () => { test('issue #18111: Regex replace with single space replaces with no space', () => { withMockCodeEditor([ 'HRESULT OnAmbientPropertyChange(DISPID dispid);' - ], {}, (editor, cursor) => { + ], { serviceCollection: serviceCollection }, (editor, cursor) => { let findController = editor.registerAndInstantiateContribution(TestFindController); @@ -435,6 +518,33 @@ suite('FindController', () => { }); }); + test('issue #24714: Regular expression with ^ in search & replace', () => { + withMockCodeEditor([ + '', + 'line2', + 'line3' + ], { serviceCollection: serviceCollection }, (editor, cursor) => { + + let findController = editor.registerAndInstantiateContribution(TestFindController); + + let startFindAction = new StartFindAction(); + startFindAction.run(null, editor); + + findController.getState().change({ searchString: '^', replaceString: 'x', isRegex: true }, false); + findController.moveToNextMatch(); + + assert.deepEqual(editor.getSelections().map(fromRange), [ + [2, 1, 2, 1] + ]); + + findController.replace(); + + assert.deepEqual(editor.getValue(), '\nxline2\nline3'); + + findController.dispose(); + }); + }); + function toArray(historyNavigator: HistoryNavigator): string[] { let result = []; historyNavigator.first(); @@ -447,7 +557,7 @@ suite('FindController', () => { } function testAddSelectionToNextFindMatchAction(text: string[], callback: (editor: MockCodeEditor, action: AddSelectionToNextFindMatchAction, findController: TestFindController) => void): void { - withMockCodeEditor(text, {}, (editor, cursor) => { + withMockCodeEditor(text, { serviceCollection: serviceCollection }, (editor, cursor) => { let findController = editor.registerAndInstantiateContribution(TestFindController); @@ -677,3 +787,85 @@ suite('FindController', () => { }); }); }); + +suite('FindController query options persistence', () => { + let queryState: { [key: string]: any; } = {}; + queryState['editor.isRegex'] = false; + queryState['editor.matchCase'] = false; + queryState['editor.wholeWord'] = false; + let serviceCollection = new ServiceCollection(); + serviceCollection.set(IStorageService, { + get: (key: string) => queryState[key], + getBoolean: (key: string) => !!queryState[key], + store: (key: string, value: any) => { queryState[key] = value; } + }); + + test('matchCase', () => { + withMockCodeEditor([ + 'abc', + 'ABC', + 'XYZ', + 'ABC' + ], { serviceCollection: serviceCollection }, (editor, cursor) => { + queryState = { 'editor.isRegex': false, 'editor.matchCase': true, 'editor.wholeWord': false }; + // The cursor is at the very top, of the file, at the first ABC + let findController = editor.registerAndInstantiateContribution(TestFindController); + let findState = findController.getState(); + let startFindAction = new StartFindAction(); + + // I hit Ctrl+F to show the Find dialog + startFindAction.run(null, editor); + + // I type ABC. + findState.change({ searchString: 'ABC' }, true); + // The second ABC is highlighted as matchCase is true. + assert.deepEqual(fromRange(editor.getSelection()), [2, 1, 2, 4]); + + findController.dispose(); + }); + }); + + queryState = { 'editor.isRegex': false, 'editor.matchCase': false, 'editor.wholeWord': true }; + + test('wholeWord', () => { + withMockCodeEditor([ + 'ABC', + 'AB', + 'XYZ', + 'ABC' + ], { serviceCollection: serviceCollection }, (editor, cursor) => { + queryState = { 'editor.isRegex': false, 'editor.matchCase': false, 'editor.wholeWord': true }; + // The cursor is at the very top, of the file, at the first ABC + let findController = editor.registerAndInstantiateContribution(TestFindController); + let findState = findController.getState(); + let startFindAction = new StartFindAction(); + + // I hit Ctrl+F to show the Find dialog + startFindAction.run(null, editor); + + // I type AB. + findState.change({ searchString: 'AB' }, true); + // The second AB is highlighted as wholeWord is true. + assert.deepEqual(fromRange(editor.getSelection()), [2, 1, 2, 3]); + + findController.dispose(); + }); + }); + + test('toggling options is saved', () => { + withMockCodeEditor([ + 'ABC', + 'AB', + 'XYZ', + 'ABC' + ], { serviceCollection: serviceCollection }, (editor, cursor) => { + queryState = { 'editor.isRegex': false, 'editor.matchCase': false, 'editor.wholeWord': true }; + // The cursor is at the very top, of the file, at the first ABC + let findController = editor.registerAndInstantiateContribution(TestFindController); + findController.toggleRegex(); + assert.equal(queryState['editor.isRegex'], true); + + findController.dispose(); + }); + }); +}); \ No newline at end of file diff --git a/src/vs/editor/contrib/find/test/common/findModel.test.ts b/src/vs/editor/contrib/find/test/common/findModel.test.ts index a4dca9c06a9fc..7dd3ee4ad4d09 100644 --- a/src/vs/editor/contrib/find/test/common/findModel.test.ts +++ b/src/vs/editor/contrib/find/test/common/findModel.test.ts @@ -13,7 +13,7 @@ import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; import { FindModelBoundToEditorModel } from 'vs/editor/contrib/find/common/findModel'; import { FindReplaceState } from 'vs/editor/contrib/find/common/findState'; import { withMockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; -import { CoreCommands } from 'vs/editor/common/controller/coreCommands'; +import { CoreNavigationCommands } from 'vs/editor/common/controller/coreCommands'; suite('FindModel', () => { @@ -303,7 +303,7 @@ suite('FindModel', () => { ] ); - cursor.trigger('mouse', CoreCommands.MoveTo.id, { + editor.trigger('mouse', CoreNavigationCommands.MoveTo.id, { position: new Position(6, 20) }); @@ -663,7 +663,7 @@ suite('FindModel', () => { ] ); - cursor.trigger('mouse', CoreCommands.MoveTo.id, { + editor.trigger('mouse', CoreNavigationCommands.MoveTo.id, { position: new Position(6, 20) }); assertFindState( @@ -1150,7 +1150,7 @@ suite('FindModel', () => { ] ); - cursor.trigger('mouse', CoreCommands.MoveTo.id, { + editor.trigger('mouse', CoreNavigationCommands.MoveTo.id, { position: new Position(6, 20) }); assertFindState( @@ -1311,7 +1311,7 @@ suite('FindModel', () => { ] ); - cursor.trigger('mouse', CoreCommands.MoveTo.id, { + editor.trigger('mouse', CoreNavigationCommands.MoveTo.id, { position: new Position(6, 20) }); assertFindState( @@ -1741,7 +1741,7 @@ suite('FindModel', () => { findState.change({ searchString: 'hello(?=\\sworld)', replaceString: 'hi', isRegex: true }, false); let findModel = new FindModelBoundToEditorModel(editor, findState); - cursor.trigger('mouse', CoreCommands.MoveTo.id, { + editor.trigger('mouse', CoreNavigationCommands.MoveTo.id, { position: new Position(8, 14) }); diff --git a/src/vs/editor/contrib/folding/browser/folding.css b/src/vs/editor/contrib/folding/browser/folding.css index 14c6c882bd1d7..fbc0462fe351e 100644 --- a/src/vs/editor/contrib/folding/browser/folding.css +++ b/src/vs/editor/contrib/folding/browser/folding.css @@ -14,8 +14,17 @@ transition: opacity 0.5s; } -.monaco-editor .margin-view-overlays:hover .folding { +.monaco-editor .margin-view-overlays .folding { background-image: url('arrow-expand.svg'); +} + +.monaco-editor.hc-black .margin-view-overlays .folding, +.monaco-editor.vs-dark .margin-view-overlays .folding { + background-image: url('arrow-expand-dark.svg'); +} + +.monaco-editor .margin-view-overlays:hover .folding, +.monaco-editor.alwaysShowFoldIcons .margin-view-overlays .folding { opacity: 1; } @@ -24,11 +33,6 @@ opacity: 1; } -.monaco-editor.hc-black .margin-view-overlays:hover .folding, -.monaco-editor.vs-dark .margin-view-overlays:hover .folding { - background-image: url('arrow-expand-dark.svg'); -} - .monaco-editor.hc-black .margin-view-overlays .folding.collapsed, .monaco-editor.vs-dark .margin-view-overlays .folding.collapsed { background-image: url('arrow-collapse-dark.svg'); diff --git a/src/vs/editor/contrib/folding/browser/folding.ts b/src/vs/editor/contrib/folding/browser/folding.ts index 613db084fc24f..74df9c51570ff 100644 --- a/src/vs/editor/contrib/folding/browser/folding.ts +++ b/src/vs/editor/contrib/folding/browser/folding.ts @@ -8,6 +8,7 @@ import * as nls from 'vs/nls'; import * as types from 'vs/base/common/types'; +import * as dom from 'vs/base/browser/dom'; import { RunOnceScheduler } from 'vs/base/common/async'; import { KeyCode, KeyMod, KeyChord } from 'vs/base/common/keyCodes'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; @@ -35,6 +36,7 @@ export class FoldingController implements IFoldingController { private editor: ICodeEditor; private _isEnabled: boolean; + private _showFoldingControls: 'always' | 'mouseover'; private globalToDispose: IDisposable[]; private computeToken: number; @@ -47,6 +49,7 @@ export class FoldingController implements IFoldingController { constructor(editor: ICodeEditor) { this.editor = editor; this._isEnabled = this.editor.getConfiguration().contribInfo.folding; + this._showFoldingControls = this.editor.getConfiguration().contribInfo.showFoldingControls; this.globalToDispose = []; this.localToDispose = []; @@ -60,6 +63,11 @@ export class FoldingController implements IFoldingController { if (oldIsEnabled !== this._isEnabled) { this.onModelChanged(); } + let oldShowFoldingControls = this._showFoldingControls; + this._showFoldingControls = this.editor.getConfiguration().contribInfo.showFoldingControls; + if (oldShowFoldingControls !== this._showFoldingControls) { + this.updateHideFoldIconClass(); + } })); this.onModelChanged(); @@ -74,6 +82,13 @@ export class FoldingController implements IFoldingController { this.globalToDispose = dispose(this.globalToDispose); } + private updateHideFoldIconClass(): void { + let domNode = this.editor.getDomNode(); + if (domNode) { + dom.toggleClass(domNode, 'alwaysShowFoldIcons', this._showFoldingControls === 'always'); + } + } + /** * Store view state. */ @@ -190,6 +205,7 @@ export class FoldingController implements IFoldingController { private onModelChanged(): void { this.cleanState(); + this.updateHideFoldIconClass(); let model = this.editor.getModel(); if (!this._isEnabled || !model) { @@ -203,7 +219,16 @@ export class FoldingController implements IFoldingController { this.localToDispose.push(this.cursorChangedScheduler); this.localToDispose.push(this.editor.onDidChangeModelContent(e => this.contentChangedScheduler.schedule())); - this.localToDispose.push(this.editor.onDidChangeCursorPosition(e => this.cursorChangedScheduler.schedule())); + this.localToDispose.push(this.editor.onDidChangeCursorPosition((e) => { + + if (!this._isEnabled) { + // Early exit if nothing needs to be done! + // Leave some form of early exit check here if you wish to continue being a cursor position change listener ;) + return; + } + + this.cursorChangedScheduler.schedule(); + })); this.localToDispose.push(this.editor.onMouseDown(e => this.onEditorMouseDown(e))); this.localToDispose.push(this.editor.onMouseUp(e => this.onEditorMouseUp(e))); @@ -262,7 +287,7 @@ export class FoldingController implements IFoldingController { return; } let range = e.target.range; - if (!range || !range.isEmpty) { + if (!range) { return; } if (!e.event.leftButton) { @@ -278,7 +303,7 @@ export class FoldingController implements IFoldingController { break; case MouseTargetType.CONTENT_EMPTY: case MouseTargetType.CONTENT_TEXT: - if (range.isEmpty && range.startColumn === model.getLineMaxColumn(range.startLineNumber)) { + if (range.startColumn === model.getLineMaxColumn(range.startLineNumber)) { break; } return; @@ -297,7 +322,7 @@ export class FoldingController implements IFoldingController { let iconClicked = this.mouseDownInfo.iconClicked; let range = e.target.range; - if (!range || !range.isEmpty || range.startLineNumber !== lineNumber) { + if (!range || range.startLineNumber !== lineNumber) { return; } @@ -515,7 +540,7 @@ interface FoldingArguments { direction?: 'up' | 'down'; } -function foldingArgumentsConstraint(args) { +function foldingArgumentsConstraint(args: any) { if (!types.isUndefined(args)) { if (!types.isObject(args)) { return false; diff --git a/src/vs/editor/contrib/folding/common/folding.ts b/src/vs/editor/contrib/folding/common/folding.ts index 148fd8f6b885c..c0f677cb95c21 100644 --- a/src/vs/editor/contrib/folding/common/folding.ts +++ b/src/vs/editor/contrib/folding/common/folding.ts @@ -9,7 +9,7 @@ export const ID = 'editor.contrib.folding'; export interface IFoldingController extends IEditorContribution { - foldAll(); - unfoldAll(); + foldAll(): void; + unfoldAll(): void; } \ No newline at end of file diff --git a/src/vs/editor/contrib/folding/common/foldingModel.ts b/src/vs/editor/contrib/folding/common/foldingModel.ts index fe771764da6a7..8ebd2424cc7f2 100644 --- a/src/vs/editor/contrib/folding/common/foldingModel.ts +++ b/src/vs/editor/contrib/folding/common/foldingModel.ts @@ -5,6 +5,7 @@ import * as editorCommon from 'vs/editor/common/editorCommon'; import { Range } from 'vs/editor/common/core/range'; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; export interface IFoldingRange { startLineNumber: number; @@ -68,25 +69,31 @@ export class CollapsibleRegion { return null; } - private getVisualDecorationOptions(): editorCommon.IModelDecorationOptions { + private static _COLLAPSED_VISUAL_DECORATION = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + afterContentClassName: 'inline-folded', + linesDecorationsClassName: 'folding collapsed' + }); + + private static _EXPANDED_VISUAL_DECORATION = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + linesDecorationsClassName: 'folding' + }); + + private getVisualDecorationOptions(): ModelDecorationOptions { if (this._isCollapsed) { - return { - stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, - afterContentClassName: 'inline-folded', - linesDecorationsClassName: 'folding collapsed' - }; + return CollapsibleRegion._COLLAPSED_VISUAL_DECORATION; } else { - return { - stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, - linesDecorationsClassName: 'folding' - }; + return CollapsibleRegion._EXPANDED_VISUAL_DECORATION; } } - private getRangeDecorationOptions(): editorCommon.IModelDecorationOptions { - return { - stickiness: editorCommon.TrackedRangeStickiness.GrowsOnlyWhenTypingBefore - }; + private static _RANGE_DECORATION = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.GrowsOnlyWhenTypingBefore + }); + + private getRangeDecorationOptions(): ModelDecorationOptions { + return CollapsibleRegion._RANGE_DECORATION; } public update(newRange: IFoldingRange, model: editorCommon.IModel, changeAccessor: editorCommon.IModelDecorationsChangeAccessor): void { diff --git a/src/vs/editor/contrib/folding/common/indentFoldStrategy.ts b/src/vs/editor/contrib/folding/common/indentFoldStrategy.ts index 66e7af5ffe1b3..39f3b5aa6358c 100644 --- a/src/vs/editor/contrib/folding/common/indentFoldStrategy.ts +++ b/src/vs/editor/contrib/folding/common/indentFoldStrategy.ts @@ -21,7 +21,7 @@ export function limitByIndent(ranges: IFoldingRange[], maxEntries: number): IFol return ranges; } - let indentOccurrences = []; + let indentOccurrences: number[] = []; ranges.forEach(r => { if (r.indent < 1000) { indentOccurrences[r.indent] = (indentOccurrences[r.indent] || 0) + 1; diff --git a/src/vs/editor/contrib/format/common/formatCommand.ts b/src/vs/editor/contrib/format/common/formatCommand.ts index dcf612c8d33d1..8a77bff13e328 100644 --- a/src/vs/editor/contrib/format/common/formatCommand.ts +++ b/src/vs/editor/contrib/format/common/formatCommand.ts @@ -17,7 +17,9 @@ export class EditOperationsCommand implements editorCommon.ICommand { if (typeof cmd._newEol === 'number') { editor.getModel().setEOL(cmd._newEol); } + editor.pushUndoStop(); editor.executeCommand('formatEditsCommand', cmd); + editor.pushUndoStop(); } private _edits: TextEdit[]; diff --git a/src/vs/editor/contrib/goToDeclaration/browser/clickLinkGesture.ts b/src/vs/editor/contrib/goToDeclaration/browser/clickLinkGesture.ts new file mode 100644 index 0000000000000..c82f9d3fa7f3a --- /dev/null +++ b/src/vs/editor/contrib/goToDeclaration/browser/clickLinkGesture.ts @@ -0,0 +1,205 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import 'vs/css!./goToDeclarationMouse'; +import { KeyCode } from 'vs/base/common/keyCodes'; +import * as browser from 'vs/base/browser/browser'; +import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; +import { ICodeEditor, IEditorMouseEvent, IMouseTarget } from 'vs/editor/browser/editorBrowser'; +import { Disposable } from 'vs/base/common/lifecycle'; +import { ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; +import Event, { Emitter } from 'vs/base/common/event'; +import * as platform from 'vs/base/common/platform'; + +function hasModifier(e: { ctrlKey: boolean; shiftKey: boolean; altKey: boolean; metaKey: boolean }, modifier: 'ctrlKey' | 'shiftKey' | 'altKey' | 'metaKey'): boolean { + return !!e[modifier]; +} + +/** + * An event that encapsulates the various trigger modifiers logic needed for go to definition. + */ +export class ClickLinkMouseEvent { + + public readonly target: IMouseTarget; + public readonly hasTriggerModifier: boolean; + public readonly hasSideBySideModifier: boolean; + public readonly isNoneOrSingleMouseDown: boolean; + + constructor(source: IEditorMouseEvent, opts: ClickLinkOptions) { + this.target = source.target; + this.hasTriggerModifier = hasModifier(source.event, opts.triggerModifier); + this.hasSideBySideModifier = hasModifier(source.event, opts.triggerSideBySideModifier); + this.isNoneOrSingleMouseDown = (browser.isIE || source.event.detail <= 1); // IE does not support event.detail properly + } +} + +/** + * An event that encapsulates the various trigger modifiers logic needed for go to definition. + */ +export class ClickLinkKeyboardEvent { + + public readonly keyCodeIsTriggerKey: boolean; + public readonly keyCodeIsSideBySideKey: boolean; + public readonly hasTriggerModifier: boolean; + + constructor(source: IKeyboardEvent, opts: ClickLinkOptions) { + this.keyCodeIsTriggerKey = (source.keyCode === opts.triggerKey); + this.keyCodeIsSideBySideKey = (source.keyCode === opts.triggerSideBySideKey); + this.hasTriggerModifier = hasModifier(source, opts.triggerModifier); + } +} + +export class ClickLinkOptions { + + public readonly triggerKey: KeyCode; + public readonly triggerModifier: 'ctrlKey' | 'shiftKey' | 'altKey' | 'metaKey'; + public readonly triggerSideBySideKey: KeyCode; + public readonly triggerSideBySideModifier: 'ctrlKey' | 'shiftKey' | 'altKey' | 'metaKey'; + + constructor( + triggerKey: KeyCode, + triggerModifier: 'ctrlKey' | 'shiftKey' | 'altKey' | 'metaKey', + triggerSideBySideKey: KeyCode, + triggerSideBySideModifier: 'ctrlKey' | 'shiftKey' | 'altKey' | 'metaKey' + ) { + this.triggerKey = triggerKey; + this.triggerModifier = triggerModifier; + this.triggerSideBySideKey = triggerSideBySideKey; + this.triggerSideBySideModifier = triggerSideBySideModifier; + } + + public equals(other: ClickLinkOptions): boolean { + return ( + this.triggerKey === other.triggerKey + && this.triggerModifier === other.triggerModifier + && this.triggerSideBySideKey === other.triggerSideBySideKey + && this.triggerSideBySideModifier === other.triggerSideBySideModifier + ); + } +} + +function createOptions(multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'): ClickLinkOptions { + if (multiCursorModifier === 'altKey') { + if (platform.isMacintosh) { + return new ClickLinkOptions(KeyCode.Meta, 'metaKey', KeyCode.Alt, 'altKey'); + } + return new ClickLinkOptions(KeyCode.Ctrl, 'ctrlKey', KeyCode.Alt, 'altKey'); + } + + if (platform.isMacintosh) { + return new ClickLinkOptions(KeyCode.Alt, 'altKey', KeyCode.Meta, 'metaKey'); + } + return new ClickLinkOptions(KeyCode.Alt, 'altKey', KeyCode.Ctrl, 'ctrlKey'); +} + +export class ClickLinkGesture extends Disposable { + + private readonly _onMouseMoveOrRelevantKeyDown: Emitter<[ClickLinkMouseEvent, ClickLinkKeyboardEvent]> = this._register(new Emitter<[ClickLinkMouseEvent, ClickLinkKeyboardEvent]>()); + public readonly onMouseMoveOrRelevantKeyDown: Event<[ClickLinkMouseEvent, ClickLinkKeyboardEvent]> = this._onMouseMoveOrRelevantKeyDown.event; + + private readonly _onExecute: Emitter = this._register(new Emitter()); + public readonly onExecute: Event = this._onExecute.event; + + private readonly _onCancel: Emitter = this._register(new Emitter()); + public readonly onCancel: Event = this._onCancel.event; + + private readonly _editor: ICodeEditor; + private _opts: ClickLinkOptions; + + private lastMouseMoveEvent: ClickLinkMouseEvent; + private hasTriggerKeyOnMouseDown: boolean; + + constructor(editor: ICodeEditor) { + super(); + + this._editor = editor; + this._opts = createOptions(this._editor.getConfiguration().multiCursorModifier); + + this.lastMouseMoveEvent = null; + this.hasTriggerKeyOnMouseDown = false; + + this._register(this._editor.onDidChangeConfiguration((e) => { + if (e.multiCursorModifier) { + const newOpts = createOptions(this._editor.getConfiguration().multiCursorModifier); + if (this._opts.equals(newOpts)) { + return; + } + this._opts = newOpts; + this.lastMouseMoveEvent = null; + this.hasTriggerKeyOnMouseDown = false; + this._onCancel.fire(); + } + })); + this._register(this._editor.onMouseMove((e: IEditorMouseEvent) => this.onEditorMouseMove(new ClickLinkMouseEvent(e, this._opts)))); + this._register(this._editor.onMouseDown((e: IEditorMouseEvent) => this.onEditorMouseDown(new ClickLinkMouseEvent(e, this._opts)))); + this._register(this._editor.onMouseUp((e: IEditorMouseEvent) => this.onEditorMouseUp(new ClickLinkMouseEvent(e, this._opts)))); + this._register(this._editor.onKeyDown((e: IKeyboardEvent) => this.onEditorKeyDown(new ClickLinkKeyboardEvent(e, this._opts)))); + this._register(this._editor.onKeyUp((e: IKeyboardEvent) => this.onEditorKeyUp(new ClickLinkKeyboardEvent(e, this._opts)))); + this._register(this._editor.onMouseDrag(() => this.resetHandler())); + + this._register(this._editor.onDidChangeCursorSelection((e) => this.onDidChangeCursorSelection(e))); + this._register(this._editor.onDidChangeModel((e) => this.resetHandler())); + this._register(this._editor.onDidChangeModelContent(() => this.resetHandler())); + this._register(this._editor.onDidScrollChange((e) => { + if (e.scrollTopChanged || e.scrollLeftChanged) { + this.resetHandler(); + } + })); + } + + private onDidChangeCursorSelection(e: ICursorSelectionChangedEvent): void { + if (e.selection && e.selection.startColumn !== e.selection.endColumn) { + this.resetHandler(); // immediately stop this feature if the user starts to select (https://github.com/Microsoft/vscode/issues/7827) + } + } + + private onEditorMouseMove(mouseEvent: ClickLinkMouseEvent): void { + this.lastMouseMoveEvent = mouseEvent; + + this._onMouseMoveOrRelevantKeyDown.fire([mouseEvent, null]); + } + + private onEditorMouseDown(mouseEvent: ClickLinkMouseEvent): void { + // We need to record if we had the trigger key on mouse down because someone might select something in the editor + // holding the mouse down and then while mouse is down start to press Ctrl/Cmd to start a copy operation and then + // release the mouse button without wanting to do the navigation. + // With this flag we prevent goto definition if the mouse was down before the trigger key was pressed. + this.hasTriggerKeyOnMouseDown = mouseEvent.hasTriggerModifier; + } + + private onEditorMouseUp(mouseEvent: ClickLinkMouseEvent): void { + if (this.hasTriggerKeyOnMouseDown) { + this._onExecute.fire(mouseEvent); + } + } + + private onEditorKeyDown(e: ClickLinkKeyboardEvent): void { + if ( + this.lastMouseMoveEvent + && ( + e.keyCodeIsTriggerKey // User just pressed Ctrl/Cmd (normal goto definition) + || (e.keyCodeIsSideBySideKey && e.hasTriggerModifier) // User pressed Ctrl/Cmd+Alt (goto definition to the side) + ) + ) { + this._onMouseMoveOrRelevantKeyDown.fire([this.lastMouseMoveEvent, e]); + } else if (e.hasTriggerModifier) { + this._onCancel.fire(); // remove decorations if user holds another key with ctrl/cmd to prevent accident goto declaration + } + } + + private onEditorKeyUp(e: ClickLinkKeyboardEvent): void { + if (e.keyCodeIsTriggerKey) { + this._onCancel.fire(); + } + } + + private resetHandler(): void { + this.lastMouseMoveEvent = null; + this.hasTriggerKeyOnMouseDown = false; + this._onCancel.fire(); + } +} diff --git a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.css b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.css deleted file mode 100644 index 57e88bae1fae9..0000000000000 --- a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.css +++ /dev/null @@ -1,20 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -.monaco-editor .goto-definition-link { - text-decoration: underline; - cursor: pointer; -} - -.monaco-editor .goto-definition-link-hover { - margin: 0.5em; - padding: 0; - padding-left: 0.5em; - border-left: 4px solid rgba(0, 0, 0, 0.14); -} - -.monaco-editor.vs-dark .goto-definition-link-hover { - border-left: 4px solid rgba(255, 255, 255, 0.25); -} \ No newline at end of file diff --git a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts index e2e84d0d951f3..182404712f76c 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts +++ b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts @@ -5,623 +5,70 @@ 'use strict'; -import 'vs/css!./goToDeclaration'; -import * as nls from 'vs/nls'; -import { Throttler } from 'vs/base/common/async'; -import { onUnexpectedError } from 'vs/base/common/errors'; -import { alert } from 'vs/base/browser/ui/aria/aria'; -import { MarkedString } from 'vs/base/common/htmlContent'; -import { KeyCode, KeyMod, KeyChord } from 'vs/base/common/keyCodes'; -import * as platform from 'vs/base/common/platform'; -import Severity from 'vs/base/common/severity'; +import { onUnexpectedExternalError } from 'vs/base/common/errors'; import { TPromise } from 'vs/base/common/winjs.base'; -import * as browser from 'vs/base/browser/browser'; -import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; -import { IEditorService } from 'vs/platform/editor/common/editor'; -import { IModeService } from 'vs/editor/common/services/modeService'; -import { IMessageService } from 'vs/platform/message/common/message'; -import { Range } from 'vs/editor/common/core/range'; -import * as editorCommon from 'vs/editor/common/editorCommon'; -import { editorAction, IActionOptions, ServicesAccessor, EditorAction } from 'vs/editor/common/editorCommonExtensions'; -import { Location, DefinitionProviderRegistry } from 'vs/editor/common/modes'; -import { ICodeEditor, IEditorMouseEvent, IMouseTarget, MouseTargetType } from 'vs/editor/browser/editorBrowser'; -import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; -import { getDefinitionsAtPosition, getImplementationsAtPosition, getTypeDefinitionsAtPosition } from 'vs/editor/contrib/goToDeclaration/common/goToDeclaration'; -import { ReferencesController } from 'vs/editor/contrib/referenceSearch/browser/referencesController'; -import { ReferencesModel } from 'vs/editor/contrib/referenceSearch/browser/referencesModel'; -import { IDisposable, dispose } from 'vs/base/common/lifecycle'; -import { PeekContext } from 'vs/editor/contrib/zoneWidget/browser/peekViewWidget'; -import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; -import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; -import { MessageController } from './messageController'; -import * as corePosition from 'vs/editor/common/core/position'; -import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; -import { ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; -import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; -import { EditorState, CodeEditorStateFlag } from 'vs/editor/common/core/editorState'; - - -export class DefinitionActionConfig { - - constructor( - public openToSide = false, - public openInPeek = false, - public filterCurrent = true - ) { - // - } -} - -export class DefinitionAction extends EditorAction { - - private _configuration: DefinitionActionConfig; - - constructor(configuration: DefinitionActionConfig, opts: IActionOptions) { - super(opts); - this._configuration = configuration; - } - - public run(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor): TPromise { - const messageService = accessor.get(IMessageService); - const editorService = accessor.get(IEditorService); - - let model = editor.getModel(); - let pos = editor.getPosition(); - - return this.getDeclarationsAtPosition(model, pos).then(references => { - - // * remove falsy references - // * remove reference at the current pos - let result: Location[] = []; - for (let i = 0; i < references.length; i++) { - let reference = references[i]; - if (!reference || !reference.range) { - continue; - } - let { uri, range } = reference; - if (!this._configuration.filterCurrent - || uri.toString() !== model.uri.toString() - || !Range.containsPosition(range, pos)) { - - result.push({ - uri, - range - }); - } - } - - if (result.length === 0) { - const info = model.getWordAtPosition(pos); - MessageController.get(editor).showMessage(this.getNoResultFoundMessage(info), pos); - return; - } - - return this._onResult(editorService, editor, new ReferencesModel(result)); - - }, (err) => { - // report an error - messageService.show(Severity.Error, err); - return false; - }); - } - - protected getDeclarationsAtPosition(model: editorCommon.IModel, position: corePosition.Position): TPromise { - return getDefinitionsAtPosition(model, position); - } - - protected getNoResultFoundMessage(info?: editorCommon.IWordAtPosition): string { - return info && info.word - ? nls.localize('noResultWord', "No definition found for '{0}'", info.word) - : nls.localize('generic.noResults', "No definition found"); - } - - protected getMetaTitle(model: ReferencesModel): string { - return model.references.length > 1 && nls.localize('meta.title', " – {0} definitions", model.references.length); - } - - private _onResult(editorService: IEditorService, editor: editorCommon.ICommonCodeEditor, model: ReferencesModel) { - - const msg = model.getAriaMessage(); - alert(msg); - - if (this._configuration.openInPeek) { - this._openInPeek(editorService, editor, model); - } else { - let next = model.nearestReference(editor.getModel().uri, editor.getPosition()); - this._openReference(editorService, next, this._configuration.openToSide).then(editor => { - if (editor && model.references.length > 1) { - this._openInPeek(editorService, editor, model); - } else { - model.dispose(); - } - }); - } - } - - private _openReference(editorService: IEditorService, reference: Location, sideBySide: boolean): TPromise { - let { uri, range } = reference; - return editorService.openEditor({ - resource: uri, - options: { - selection: Range.collapseToStart(range), - revealIfVisible: !sideBySide +import { IReadOnlyModel } from 'vs/editor/common/editorCommon'; +import { CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; +import LanguageFeatureRegistry from 'vs/editor/common/modes/languageFeatureRegistry'; +import { DefinitionProviderRegistry, ImplementationProviderRegistry, TypeDefinitionProviderRegistry, Location } from 'vs/editor/common/modes'; +import { CancellationToken } from 'vs/base/common/cancellation'; +import { asWinJsPromise } from 'vs/base/common/async'; +import { Position } from 'vs/editor/common/core/position'; + +function outputResults(promises: TPromise[]) { + return TPromise.join(promises).then(allReferences => { + let result: Location[] = []; + for (let references of allReferences) { + if (Array.isArray(references)) { + result.push(...references); + } else if (references) { + result.push(references); } - }, sideBySide).then(editor => { - return editor && editor.getControl(); - }); - } - - private _openInPeek(editorService: IEditorService, target: editorCommon.ICommonCodeEditor, model: ReferencesModel) { - let controller = ReferencesController.get(target); - if (controller) { - controller.toggleWidget(target.getSelection(), TPromise.as(model), { - getMetaTitle: (model) => { - return this.getMetaTitle(model); - }, - onGoto: (reference) => { - controller.closeWidget(); - return this._openReference(editorService, reference, false); - } - }); - } else { - model.dispose(); } - } -} - -const goToDeclarationKb = platform.isWeb - ? KeyMod.CtrlCmd | KeyCode.F12 - : KeyCode.F12; - -@editorAction -export class GoToDefinitionAction extends DefinitionAction { - - public static ID = 'editor.action.goToDeclaration'; - - constructor() { - super(new DefinitionActionConfig(), { - id: GoToDefinitionAction.ID, - label: nls.localize('actions.goToDecl.label', "Go to Definition"), - alias: 'Go to Definition', - precondition: ContextKeyExpr.and( - EditorContextKeys.hasDefinitionProvider, - EditorContextKeys.isInEmbeddedEditor.toNegated()), - kbOpts: { - kbExpr: EditorContextKeys.textFocus, - primary: goToDeclarationKb - }, - menuOpts: { - group: 'navigation', - order: 1.1 - } - }); - } -} - -@editorAction -export class OpenDefinitionToSideAction extends DefinitionAction { - - public static ID = 'editor.action.openDeclarationToTheSide'; - - constructor() { - super(new DefinitionActionConfig(true), { - id: OpenDefinitionToSideAction.ID, - label: nls.localize('actions.goToDeclToSide.label', "Open Definition to the Side"), - alias: 'Open Definition to the Side', - precondition: ContextKeyExpr.and( - EditorContextKeys.hasDefinitionProvider, - EditorContextKeys.isInEmbeddedEditor.toNegated()), - kbOpts: { - kbExpr: EditorContextKeys.textFocus, - primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, goToDeclarationKb) - } - }); - } -} - -@editorAction -export class PeekDefinitionAction extends DefinitionAction { - constructor() { - super(new DefinitionActionConfig(void 0, true, false), { - id: 'editor.action.previewDeclaration', - label: nls.localize('actions.previewDecl.label', "Peek Definition"), - alias: 'Peek Definition', - precondition: ContextKeyExpr.and( - EditorContextKeys.hasDefinitionProvider, - PeekContext.notInPeekEditor, - EditorContextKeys.isInEmbeddedEditor.toNegated()), - kbOpts: { - kbExpr: EditorContextKeys.textFocus, - primary: KeyMod.Alt | KeyCode.F12, - linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.F10 } - }, - menuOpts: { - group: 'navigation', - order: 1.2 - } - }); - } -} - -export class ImplementationAction extends DefinitionAction { - protected getDeclarationsAtPosition(model: editorCommon.IModel, position: corePosition.Position): TPromise { - return getImplementationsAtPosition(model, position); - } - - protected getNoResultFoundMessage(info?: editorCommon.IWordAtPosition): string { - return info && info.word - ? nls.localize('goToImplementation.noResultWord', "No implementation found for '{0}'", info.word) - : nls.localize('goToImplementation.generic.noResults', "No implementation found"); - } - - protected getMetaTitle(model: ReferencesModel): string { - return model.references.length > 1 && nls.localize('meta.implementations.title', " – {0} implementations", model.references.length); - } -} - -@editorAction -export class GoToImplementationAction extends ImplementationAction { - - public static ID = 'editor.action.goToImplementation'; - - constructor() { - super(new DefinitionActionConfig(), { - id: GoToImplementationAction.ID, - label: nls.localize('actions.goToImplementation.label', "Go to Implementation"), - alias: 'Go to Implementation', - precondition: ContextKeyExpr.and( - EditorContextKeys.hasImplementationProvider, - EditorContextKeys.isInEmbeddedEditor.toNegated()), - kbOpts: { - kbExpr: EditorContextKeys.textFocus, - primary: KeyMod.CtrlCmd | KeyCode.F12 - }, - menuOpts: { - group: 'navigation', - order: 1.3 - } - }); - } + return result; + }); } -@editorAction -export class PeekImplementationAction extends ImplementationAction { - - public static ID = 'editor.action.peekImplementation'; - - constructor() { - super(new DefinitionActionConfig(false, true, false), { - id: PeekImplementationAction.ID, - label: nls.localize('actions.peekImplementation.label', "Peek Implementation"), - alias: 'Peek Implementation', - precondition: ContextKeyExpr.and( - EditorContextKeys.hasImplementationProvider, - EditorContextKeys.isInEmbeddedEditor.toNegated()), - kbOpts: { - kbExpr: EditorContextKeys.textFocus, - primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.F12 - } +function getDefinitions( + model: IReadOnlyModel, + position: Position, + registry: LanguageFeatureRegistry, + provide: (provider: T, model: IReadOnlyModel, position: Position, token: CancellationToken) => Location | Location[] | Thenable +): TPromise { + const provider = registry.ordered(model); + + // get results + const promises = provider.map((provider, idx) => { + return asWinJsPromise((token) => { + return provide(provider, model, position, token); + }).then(result => { + return result; + }, err => { + onUnexpectedExternalError(err); }); - } -} - -export class TypeDefinitionAction extends DefinitionAction { - protected getDeclarationsAtPosition(model: editorCommon.IModel, position: corePosition.Position): TPromise { - return getTypeDefinitionsAtPosition(model, position); - } - - protected getNoResultFoundMessage(info?: editorCommon.IWordAtPosition): string { - return info && info.word - ? nls.localize('goToTypeDefinition.noResultWord', "No type definition found for '{0}'", info.word) - : nls.localize('goToTypeDefinition.generic.noResults', "No type definition found"); - } - - protected getMetaTitle(model: ReferencesModel): string { - return model.references.length > 1 && nls.localize('meta.typeDefinitions.title', " – {0} type definitions", model.references.length); - } + }); + return outputResults(promises); } -@editorAction -export class GoToTypeDefintionAction extends TypeDefinitionAction { - public static ID = 'editor.action.goToTypeDefinition'; - - constructor() { - super(new DefinitionActionConfig(), { - id: GoToTypeDefintionAction.ID, - label: nls.localize('actions.goToTypeDefinition.label', "Go to Type Definition"), - alias: 'Go to Type Definition', - precondition: ContextKeyExpr.and( - EditorContextKeys.hasTypeDefinitionProvider, - EditorContextKeys.isInEmbeddedEditor.toNegated()), - kbOpts: { - kbExpr: EditorContextKeys.textFocus, - primary: 0 - }, - menuOpts: { - group: 'navigation', - order: 1.4 - } - }); - } +export function getDefinitionsAtPosition(model: IReadOnlyModel, position: Position): TPromise { + return getDefinitions(model, position, DefinitionProviderRegistry, (provider, model, position, token) => { + return provider.provideDefinition(model, position, token); + }); } -@editorAction -export class PeekTypeDefinitionAction extends TypeDefinitionAction { - - public static ID = 'editor.action.peekTypeDefinition'; - - constructor() { - super(new DefinitionActionConfig(false, true, false), { - id: PeekTypeDefinitionAction.ID, - label: nls.localize('actions.peekTypeDefinition.label', "Peek Type Definition"), - alias: 'Peek Type Definition', - precondition: ContextKeyExpr.and( - EditorContextKeys.hasTypeDefinitionProvider, - EditorContextKeys.isInEmbeddedEditor.toNegated()), - kbOpts: { - kbExpr: EditorContextKeys.textFocus, - primary: 0 - } - }); - } +export function getImplementationsAtPosition(model: IReadOnlyModel, position: Position): TPromise { + return getDefinitions(model, position, ImplementationProviderRegistry, (provider, model, position, token) => { + return provider.provideImplementation(model, position, token); + }); } - -// --- Editor Contribution to goto definition using the mouse and a modifier key - -@editorContribution -class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorContribution { - - private static ID = 'editor.contrib.gotodefinitionwithmouse'; - static TRIGGER_MODIFIER = platform.isMacintosh ? 'metaKey' : 'ctrlKey'; - static TRIGGER_SIDEBYSIDE_KEY_VALUE = KeyCode.Alt; - static TRIGGER_KEY_VALUE = platform.isMacintosh ? KeyCode.Meta : KeyCode.Ctrl; - static MAX_SOURCE_PREVIEW_LINES = 8; - - private editor: ICodeEditor; - private toUnhook: IDisposable[]; - private decorations: string[]; - private currentWordUnderMouse: editorCommon.IWordAtPosition; - private throttler: Throttler; - private lastMouseMoveEvent: IEditorMouseEvent; - private hasTriggerKeyOnMouseDown: boolean; - - constructor( - editor: ICodeEditor, - @ITextModelResolverService private textModelResolverService: ITextModelResolverService, - @IModeService private modeService: IModeService - ) { - this.toUnhook = []; - this.decorations = []; - this.editor = editor; - this.throttler = new Throttler(); - - this.toUnhook.push(this.editor.onMouseDown((e: IEditorMouseEvent) => this.onEditorMouseDown(e))); - this.toUnhook.push(this.editor.onMouseUp((e: IEditorMouseEvent) => this.onEditorMouseUp(e))); - this.toUnhook.push(this.editor.onMouseMove((e: IEditorMouseEvent) => this.onEditorMouseMove(e))); - this.toUnhook.push(this.editor.onMouseDrag(() => this.resetHandler())); - this.toUnhook.push(this.editor.onKeyDown((e: IKeyboardEvent) => this.onEditorKeyDown(e))); - this.toUnhook.push(this.editor.onKeyUp((e: IKeyboardEvent) => this.onEditorKeyUp(e))); - - this.toUnhook.push(this.editor.onDidChangeCursorSelection((e) => this.onDidChangeCursorSelection(e))); - this.toUnhook.push(this.editor.onDidChangeModel((e) => this.resetHandler())); - this.toUnhook.push(this.editor.onDidChangeModelContent(() => this.resetHandler())); - this.toUnhook.push(this.editor.onDidScrollChange((e) => { - if (e.scrollTopChanged || e.scrollLeftChanged) { - this.resetHandler(); - } - })); - } - - private onDidChangeCursorSelection(e: ICursorSelectionChangedEvent): void { - if (e.selection && e.selection.startColumn !== e.selection.endColumn) { - this.resetHandler(); // immediately stop this feature if the user starts to select (https://github.com/Microsoft/vscode/issues/7827) - } - } - - private onEditorMouseMove(mouseEvent: IEditorMouseEvent, withKey?: IKeyboardEvent): void { - this.lastMouseMoveEvent = mouseEvent; - - this.startFindDefinition(mouseEvent, withKey); - } - - private startFindDefinition(mouseEvent: IEditorMouseEvent, withKey?: IKeyboardEvent): void { - if (!this.isEnabled(mouseEvent, withKey)) { - this.currentWordUnderMouse = null; - this.removeDecorations(); - return; - } - - // Find word at mouse position - let position = mouseEvent.target.position; - let word = position ? this.editor.getModel().getWordAtPosition(position) : null; - if (!word) { - this.currentWordUnderMouse = null; - this.removeDecorations(); - return; - } - - // Return early if word at position is still the same - if (this.currentWordUnderMouse && this.currentWordUnderMouse.startColumn === word.startColumn && this.currentWordUnderMouse.endColumn === word.endColumn && this.currentWordUnderMouse.word === word.word) { - return; - } - - this.currentWordUnderMouse = word; - - // Find definition and decorate word if found - let state = new EditorState(this.editor, CodeEditorStateFlag.Position | CodeEditorStateFlag.Value | CodeEditorStateFlag.Selection | CodeEditorStateFlag.Scroll); - - this.throttler.queue(() => { - return state.validate(this.editor) - ? this.findDefinition(mouseEvent.target) - : TPromise.as(null); - - }).then(results => { - if (!results || !results.length || !state.validate(this.editor)) { - this.removeDecorations(); - return; - } - - // Multiple results - if (results.length > 1) { - this.addDecoration(new Range(position.lineNumber, word.startColumn, position.lineNumber, word.endColumn), nls.localize('multipleResults', "Click to show {0} definitions.", results.length)); - } - - // Single result - else { - let result = results[0]; - - if (!result.uri) { - return; - } - - this.textModelResolverService.createModelReference(result.uri).then(ref => { - - if (!ref.object || !ref.object.textEditorModel) { - ref.dispose(); - return; - } - - const { object: { textEditorModel } } = ref; - const { startLineNumber } = result.range; - - if (textEditorModel.getLineMaxColumn(startLineNumber) === 0) { - ref.dispose(); - return; - } - - const startIndent = textEditorModel.getLineFirstNonWhitespaceColumn(startLineNumber); - const maxLineNumber = Math.min(textEditorModel.getLineCount(), startLineNumber + GotoDefinitionWithMouseEditorContribution.MAX_SOURCE_PREVIEW_LINES); - let endLineNumber = startLineNumber + 1; - let minIndent = startIndent; - - for (; endLineNumber < maxLineNumber; endLineNumber++) { - let endIndent = textEditorModel.getLineFirstNonWhitespaceColumn(endLineNumber); - minIndent = Math.min(minIndent, endIndent); - if (startIndent === endIndent) { - break; - } - } - - const previewRange = new Range(startLineNumber, 1, endLineNumber + 1, 1); - const value = textEditorModel.getValueInRange(previewRange).replace(new RegExp(`^\\s{${minIndent - 1}}`, 'gm'), '').trim(); - - this.addDecoration(new Range(position.lineNumber, word.startColumn, position.lineNumber, word.endColumn), { - language: this.modeService.getModeIdByFilenameOrFirstLine(textEditorModel.uri.fsPath), - value - }); - ref.dispose(); - }); - } - }).done(undefined, onUnexpectedError); - } - - private addDecoration(range: Range, hoverMessage: MarkedString): void { - - const newDecorations: editorCommon.IModelDeltaDecoration = { - range: range, - options: { - inlineClassName: 'goto-definition-link', - hoverMessage - } - }; - - this.decorations = this.editor.deltaDecorations(this.decorations, [newDecorations]); - } - - private removeDecorations(): void { - if (this.decorations.length > 0) { - this.decorations = this.editor.deltaDecorations(this.decorations, []); - } - } - - private onEditorKeyDown(e: IKeyboardEvent): void { - if ( - this.lastMouseMoveEvent && ( - e.keyCode === GotoDefinitionWithMouseEditorContribution.TRIGGER_KEY_VALUE || // User just pressed Ctrl/Cmd (normal goto definition) - e.keyCode === GotoDefinitionWithMouseEditorContribution.TRIGGER_SIDEBYSIDE_KEY_VALUE && e[GotoDefinitionWithMouseEditorContribution.TRIGGER_MODIFIER] // User pressed Ctrl/Cmd+Alt (goto definition to the side) - ) - ) { - this.startFindDefinition(this.lastMouseMoveEvent, e); - } else if (e[GotoDefinitionWithMouseEditorContribution.TRIGGER_MODIFIER]) { - this.removeDecorations(); // remove decorations if user holds another key with ctrl/cmd to prevent accident goto declaration - } - } - - private resetHandler(): void { - this.lastMouseMoveEvent = null; - this.hasTriggerKeyOnMouseDown = false; - this.removeDecorations(); - } - - private onEditorMouseDown(mouseEvent: IEditorMouseEvent): void { - // We need to record if we had the trigger key on mouse down because someone might select something in the editor - // holding the mouse down and then while mouse is down start to press Ctrl/Cmd to start a copy operation and then - // release the mouse button without wanting to do the navigation. - // With this flag we prevent goto definition if the mouse was down before the trigger key was pressed. - this.hasTriggerKeyOnMouseDown = !!mouseEvent.event[GotoDefinitionWithMouseEditorContribution.TRIGGER_MODIFIER]; - } - - private onEditorMouseUp(mouseEvent: IEditorMouseEvent): void { - if (this.isEnabled(mouseEvent) && this.hasTriggerKeyOnMouseDown) { - this.gotoDefinition(mouseEvent.target, mouseEvent.event.altKey).done(() => { - this.removeDecorations(); - }, (error: Error) => { - this.removeDecorations(); - onUnexpectedError(error); - }); - } - } - - private onEditorKeyUp(e: IKeyboardEvent): void { - if (e.keyCode === GotoDefinitionWithMouseEditorContribution.TRIGGER_KEY_VALUE) { - this.removeDecorations(); - this.currentWordUnderMouse = null; - } - } - - private isEnabled(mouseEvent: IEditorMouseEvent, withKey?: IKeyboardEvent): boolean { - return this.editor.getModel() && - (browser.isIE || mouseEvent.event.detail <= 1) && // IE does not support event.detail properly - mouseEvent.target.type === MouseTargetType.CONTENT_TEXT && - (mouseEvent.event[GotoDefinitionWithMouseEditorContribution.TRIGGER_MODIFIER] || (withKey && withKey.keyCode === GotoDefinitionWithMouseEditorContribution.TRIGGER_KEY_VALUE)) && - DefinitionProviderRegistry.has(this.editor.getModel()); - } - - private findDefinition(target: IMouseTarget): TPromise { - let model = this.editor.getModel(); - if (!model) { - return TPromise.as(null); - } - - return getDefinitionsAtPosition(this.editor.getModel(), target.position); - } - - private gotoDefinition(target: IMouseTarget, sideBySide: boolean): TPromise { - - const targetAction = sideBySide - ? OpenDefinitionToSideAction.ID - : GoToDefinitionAction.ID; - - // just run the corresponding action - this.editor.setPosition(target.position); - return this.editor.getAction(targetAction).run(); - } - - public getId(): string { - return GotoDefinitionWithMouseEditorContribution.ID; - } - - public dispose(): void { - this.toUnhook = dispose(this.toUnhook); - } +export function getTypeDefinitionsAtPosition(model: IReadOnlyModel, position: Position): TPromise { + return getDefinitions(model, position, TypeDefinitionProviderRegistry, (provider, model, position, token) => { + return provider.provideTypeDefinition(model, position, token); + }); } -registerThemingParticipant((theme, collector) => { - let activeLinkForeground = theme.getColor(editorActiveLinkForeground); - if (activeLinkForeground) { - collector.addRule(`.monaco-editor.${theme.selector} .goto-definition-link { color: ${activeLinkForeground} !important; }`); - } -}); +CommonEditorRegistry.registerDefaultLanguageCommand('_executeDefinitionProvider', getDefinitionsAtPosition); +CommonEditorRegistry.registerDefaultLanguageCommand('_executeImplementationProvider', getImplementationsAtPosition); +CommonEditorRegistry.registerDefaultLanguageCommand('_executeTypeDefinitionProvider', getTypeDefinitionsAtPosition); \ No newline at end of file diff --git a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.ts b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.ts new file mode 100644 index 0000000000000..0115099afdc79 --- /dev/null +++ b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.ts @@ -0,0 +1,367 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import * as nls from 'vs/nls'; +import { alert } from 'vs/base/browser/ui/aria/aria'; +import { KeyCode, KeyMod, KeyChord } from 'vs/base/common/keyCodes'; +import * as platform from 'vs/base/common/platform'; +import Severity from 'vs/base/common/severity'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { IEditorService } from 'vs/platform/editor/common/editor'; +import { IMessageService } from 'vs/platform/message/common/message'; +import { Range } from 'vs/editor/common/core/range'; +import * as editorCommon from 'vs/editor/common/editorCommon'; +import { editorAction, IActionOptions, ServicesAccessor, EditorAction } from 'vs/editor/common/editorCommonExtensions'; +import { Location } from 'vs/editor/common/modes'; +import { getDefinitionsAtPosition, getImplementationsAtPosition, getTypeDefinitionsAtPosition } from './goToDeclaration'; +import { ReferencesController } from 'vs/editor/contrib/referenceSearch/browser/referencesController'; +import { ReferencesModel } from 'vs/editor/contrib/referenceSearch/browser/referencesModel'; +import { PeekContext } from 'vs/editor/contrib/zoneWidget/browser/peekViewWidget'; +import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; +import { MessageController } from './messageController'; +import * as corePosition from 'vs/editor/common/core/position'; +import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; + +export class DefinitionActionConfig { + + constructor( + public readonly openToSide = false, + public readonly openInPeek = false, + public readonly filterCurrent = true, + public readonly showMessage = true, + ) { + // + } +} + +export class DefinitionAction extends EditorAction { + + private _configuration: DefinitionActionConfig; + + constructor(configuration: DefinitionActionConfig, opts: IActionOptions) { + super(opts); + this._configuration = configuration; + } + + public run(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor): TPromise { + const messageService = accessor.get(IMessageService); + const editorService = accessor.get(IEditorService); + + const model = editor.getModel(); + const pos = editor.getPosition(); + + return this._getDeclarationsAtPosition(model, pos).then(references => { + + if (model.isDisposed() || editor.getModel() !== model) { + // new model, no more model + return; + } + + // * remove falsy references + // * find reference at the current pos + let idxOfCurrent = -1; + let result: Location[] = []; + for (let i = 0; i < references.length; i++) { + let reference = references[i]; + if (!reference || !reference.range) { + continue; + } + let { uri, range } = reference; + let newLen = result.push({ + uri, + range + }); + if (this._configuration.filterCurrent + && uri.toString() === model.uri.toString() + && Range.containsPosition(range, pos) + && idxOfCurrent === -1 + ) { + idxOfCurrent = newLen - 1; + } + } + + if (result.length === 0) { + // no result -> show message + if (this._configuration.showMessage) { + const info = model.getWordAtPosition(pos); + MessageController.get(editor).showMessage(this._getNoResultFoundMessage(info), pos); + } + } else if (result.length === 1 && idxOfCurrent !== -1) { + // only the position at which we are -> adjust selection + let [current] = result; + this._openReference(editorService, current, false); + + } else { + // handle multile results + this._onResult(editorService, editor, new ReferencesModel(result)); + } + + }, (err) => { + // report an error + messageService.show(Severity.Error, err); + return false; + }); + } + + protected _getDeclarationsAtPosition(model: editorCommon.IModel, position: corePosition.Position): TPromise { + return getDefinitionsAtPosition(model, position); + } + + protected _getNoResultFoundMessage(info?: editorCommon.IWordAtPosition): string { + return info && info.word + ? nls.localize('noResultWord', "No definition found for '{0}'", info.word) + : nls.localize('generic.noResults', "No definition found"); + } + + protected _getMetaTitle(model: ReferencesModel): string { + return model.references.length > 1 && nls.localize('meta.title', " – {0} definitions", model.references.length); + } + + private _onResult(editorService: IEditorService, editor: editorCommon.ICommonCodeEditor, model: ReferencesModel) { + + const msg = model.getAriaMessage(); + alert(msg); + + if (this._configuration.openInPeek) { + this._openInPeek(editorService, editor, model); + } else { + let next = model.nearestReference(editor.getModel().uri, editor.getPosition()); + this._openReference(editorService, next, this._configuration.openToSide).then(editor => { + if (editor && model.references.length > 1) { + this._openInPeek(editorService, editor, model); + } else { + model.dispose(); + } + }); + } + } + + private _openReference(editorService: IEditorService, reference: Location, sideBySide: boolean): TPromise { + let { uri, range } = reference; + return editorService.openEditor({ + resource: uri, + options: { + selection: Range.collapseToStart(range), + revealIfVisible: !sideBySide + } + }, sideBySide).then(editor => { + return editor && editor.getControl(); + }); + } + + private _openInPeek(editorService: IEditorService, target: editorCommon.ICommonCodeEditor, model: ReferencesModel) { + let controller = ReferencesController.get(target); + if (controller) { + controller.toggleWidget(target.getSelection(), TPromise.as(model), { + getMetaTitle: (model) => { + return this._getMetaTitle(model); + }, + onGoto: (reference) => { + controller.closeWidget(); + return this._openReference(editorService, reference, false); + } + }); + } else { + model.dispose(); + } + } +} + +const goToDeclarationKb = platform.isWeb + ? KeyMod.CtrlCmd | KeyCode.F12 + : KeyCode.F12; + +@editorAction +export class GoToDefinitionAction extends DefinitionAction { + + public static ID = 'editor.action.goToDeclaration'; + + constructor() { + super(new DefinitionActionConfig(), { + id: GoToDefinitionAction.ID, + label: nls.localize('actions.goToDecl.label', "Go to Definition"), + alias: 'Go to Definition', + precondition: ContextKeyExpr.and( + EditorContextKeys.hasDefinitionProvider, + EditorContextKeys.isInEmbeddedEditor.toNegated()), + kbOpts: { + kbExpr: EditorContextKeys.textFocus, + primary: goToDeclarationKb + }, + menuOpts: { + group: 'navigation', + order: 1.1 + } + }); + } +} + +@editorAction +export class OpenDefinitionToSideAction extends DefinitionAction { + + public static ID = 'editor.action.openDeclarationToTheSide'; + + constructor() { + super(new DefinitionActionConfig(true), { + id: OpenDefinitionToSideAction.ID, + label: nls.localize('actions.goToDeclToSide.label', "Open Definition to the Side"), + alias: 'Open Definition to the Side', + precondition: ContextKeyExpr.and( + EditorContextKeys.hasDefinitionProvider, + EditorContextKeys.isInEmbeddedEditor.toNegated()), + kbOpts: { + kbExpr: EditorContextKeys.textFocus, + primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, goToDeclarationKb) + } + }); + } +} + +@editorAction +export class PeekDefinitionAction extends DefinitionAction { + constructor() { + super(new DefinitionActionConfig(void 0, true, false), { + id: 'editor.action.previewDeclaration', + label: nls.localize('actions.previewDecl.label', "Peek Definition"), + alias: 'Peek Definition', + precondition: ContextKeyExpr.and( + EditorContextKeys.hasDefinitionProvider, + PeekContext.notInPeekEditor, + EditorContextKeys.isInEmbeddedEditor.toNegated()), + kbOpts: { + kbExpr: EditorContextKeys.textFocus, + primary: KeyMod.Alt | KeyCode.F12, + linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.F10 } + }, + menuOpts: { + group: 'navigation', + order: 1.2 + } + }); + } +} + +export class ImplementationAction extends DefinitionAction { + protected _getDeclarationsAtPosition(model: editorCommon.IModel, position: corePosition.Position): TPromise { + return getImplementationsAtPosition(model, position); + } + + protected _getNoResultFoundMessage(info?: editorCommon.IWordAtPosition): string { + return info && info.word + ? nls.localize('goToImplementation.noResultWord', "No implementation found for '{0}'", info.word) + : nls.localize('goToImplementation.generic.noResults', "No implementation found"); + } + + protected _getMetaTitle(model: ReferencesModel): string { + return model.references.length > 1 && nls.localize('meta.implementations.title', " – {0} implementations", model.references.length); + } +} + +@editorAction +export class GoToImplementationAction extends ImplementationAction { + + public static ID = 'editor.action.goToImplementation'; + + constructor() { + super(new DefinitionActionConfig(), { + id: GoToImplementationAction.ID, + label: nls.localize('actions.goToImplementation.label', "Go to Implementation"), + alias: 'Go to Implementation', + precondition: ContextKeyExpr.and( + EditorContextKeys.hasImplementationProvider, + EditorContextKeys.isInEmbeddedEditor.toNegated()), + kbOpts: { + kbExpr: EditorContextKeys.textFocus, + primary: KeyMod.CtrlCmd | KeyCode.F12 + } + }); + } +} + +@editorAction +export class PeekImplementationAction extends ImplementationAction { + + public static ID = 'editor.action.peekImplementation'; + + constructor() { + super(new DefinitionActionConfig(false, true, false), { + id: PeekImplementationAction.ID, + label: nls.localize('actions.peekImplementation.label', "Peek Implementation"), + alias: 'Peek Implementation', + precondition: ContextKeyExpr.and( + EditorContextKeys.hasImplementationProvider, + EditorContextKeys.isInEmbeddedEditor.toNegated()), + kbOpts: { + kbExpr: EditorContextKeys.textFocus, + primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.F12 + } + }); + } +} + +export class TypeDefinitionAction extends DefinitionAction { + protected _getDeclarationsAtPosition(model: editorCommon.IModel, position: corePosition.Position): TPromise { + return getTypeDefinitionsAtPosition(model, position); + } + + protected _getNoResultFoundMessage(info?: editorCommon.IWordAtPosition): string { + return info && info.word + ? nls.localize('goToTypeDefinition.noResultWord', "No type definition found for '{0}'", info.word) + : nls.localize('goToTypeDefinition.generic.noResults', "No type definition found"); + } + + protected _getMetaTitle(model: ReferencesModel): string { + return model.references.length > 1 && nls.localize('meta.typeDefinitions.title', " – {0} type definitions", model.references.length); + } +} + +@editorAction +export class GoToTypeDefintionAction extends TypeDefinitionAction { + + public static ID = 'editor.action.goToTypeDefinition'; + + constructor() { + super(new DefinitionActionConfig(), { + id: GoToTypeDefintionAction.ID, + label: nls.localize('actions.goToTypeDefinition.label', "Go to Type Definition"), + alias: 'Go to Type Definition', + precondition: ContextKeyExpr.and( + EditorContextKeys.hasTypeDefinitionProvider, + EditorContextKeys.isInEmbeddedEditor.toNegated()), + kbOpts: { + kbExpr: EditorContextKeys.textFocus, + primary: 0 + }, + menuOpts: { + group: 'navigation', + order: 1.4 + } + }); + } +} + +@editorAction +export class PeekTypeDefinitionAction extends TypeDefinitionAction { + + public static ID = 'editor.action.peekTypeDefinition'; + + constructor() { + super(new DefinitionActionConfig(false, true, false), { + id: PeekTypeDefinitionAction.ID, + label: nls.localize('actions.peekTypeDefinition.label', "Peek Type Definition"), + alias: 'Peek Type Definition', + precondition: ContextKeyExpr.and( + EditorContextKeys.hasTypeDefinitionProvider, + EditorContextKeys.isInEmbeddedEditor.toNegated()), + kbOpts: { + kbExpr: EditorContextKeys.textFocus, + primary: 0 + } + }); + } +} + diff --git a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.css b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.css new file mode 100644 index 0000000000000..3361b10442911 --- /dev/null +++ b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.css @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +.monaco-editor .goto-definition-link { + text-decoration: underline; + cursor: pointer; +} \ No newline at end of file diff --git a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts new file mode 100644 index 0000000000000..6a8718e202b4c --- /dev/null +++ b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts @@ -0,0 +1,223 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import 'vs/css!./goToDeclarationMouse'; +import * as nls from 'vs/nls'; +import { Throttler } from 'vs/base/common/async'; +import { onUnexpectedError } from 'vs/base/common/errors'; +import { MarkedString } from 'vs/base/common/htmlContent'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { IModeService } from 'vs/editor/common/services/modeService'; +import { Range } from 'vs/editor/common/core/range'; +import * as editorCommon from 'vs/editor/common/editorCommon'; +import { Location, DefinitionProviderRegistry } from 'vs/editor/common/modes'; +import { ICodeEditor, IMouseTarget, MouseTargetType } from 'vs/editor/browser/editorBrowser'; +import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; +import { getDefinitionsAtPosition } from './goToDeclaration'; +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import { ITextModelService } from 'vs/editor/common/services/resolverService'; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; +import { EditorState, CodeEditorStateFlag } from 'vs/editor/common/core/editorState'; +import { DefinitionAction, DefinitionActionConfig } from './goToDeclarationCommands'; +import { ClickLinkGesture, ClickLinkMouseEvent, ClickLinkKeyboardEvent } from 'vs/editor/contrib/goToDeclaration/browser/clickLinkGesture'; + +@editorContribution +class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorContribution { + + private static ID = 'editor.contrib.gotodefinitionwithmouse'; + static MAX_SOURCE_PREVIEW_LINES = 8; + + private editor: ICodeEditor; + private toUnhook: IDisposable[]; + private decorations: string[]; + private currentWordUnderMouse: editorCommon.IWordAtPosition; + private throttler: Throttler; + + constructor( + editor: ICodeEditor, + @ITextModelService private textModelResolverService: ITextModelService, + @IModeService private modeService: IModeService + ) { + this.toUnhook = []; + this.decorations = []; + this.editor = editor; + this.throttler = new Throttler(); + + let linkGesture = new ClickLinkGesture(editor); + this.toUnhook.push(linkGesture); + + this.toUnhook.push(linkGesture.onMouseMoveOrRelevantKeyDown(([mouseEvent, keyboardEvent]) => { + this.startFindDefinition(mouseEvent, keyboardEvent); + })); + + this.toUnhook.push(linkGesture.onExecute((mouseEvent: ClickLinkMouseEvent) => { + if (this.isEnabled(mouseEvent)) { + this.gotoDefinition(mouseEvent.target, mouseEvent.hasSideBySideModifier).done(() => { + this.removeDecorations(); + }, (error: Error) => { + this.removeDecorations(); + onUnexpectedError(error); + }); + } + })); + + this.toUnhook.push(linkGesture.onCancel(() => { + this.removeDecorations(); + this.currentWordUnderMouse = null; + })); + + } + + private startFindDefinition(mouseEvent: ClickLinkMouseEvent, withKey?: ClickLinkKeyboardEvent): void { + if (!this.isEnabled(mouseEvent, withKey)) { + this.currentWordUnderMouse = null; + this.removeDecorations(); + return; + } + + // Find word at mouse position + let position = mouseEvent.target.position; + let word = position ? this.editor.getModel().getWordAtPosition(position) : null; + if (!word) { + this.currentWordUnderMouse = null; + this.removeDecorations(); + return; + } + + // Return early if word at position is still the same + if (this.currentWordUnderMouse && this.currentWordUnderMouse.startColumn === word.startColumn && this.currentWordUnderMouse.endColumn === word.endColumn && this.currentWordUnderMouse.word === word.word) { + return; + } + + this.currentWordUnderMouse = word; + + // Find definition and decorate word if found + let state = new EditorState(this.editor, CodeEditorStateFlag.Position | CodeEditorStateFlag.Value | CodeEditorStateFlag.Selection | CodeEditorStateFlag.Scroll); + + this.throttler.queue(() => { + return state.validate(this.editor) + ? this.findDefinition(mouseEvent.target) + : TPromise.as(null); + + }).then(results => { + if (!results || !results.length || !state.validate(this.editor)) { + this.removeDecorations(); + return; + } + + // Multiple results + if (results.length > 1) { + this.addDecoration(new Range(position.lineNumber, word.startColumn, position.lineNumber, word.endColumn), nls.localize('multipleResults', "Click to show {0} definitions.", results.length)); + } + + // Single result + else { + let result = results[0]; + + if (!result.uri) { + return; + } + + this.textModelResolverService.createModelReference(result.uri).then(ref => { + + if (!ref.object || !ref.object.textEditorModel) { + ref.dispose(); + return; + } + + const { object: { textEditorModel } } = ref; + const { startLineNumber } = result.range; + + if (textEditorModel.getLineMaxColumn(startLineNumber) === 0) { + ref.dispose(); + return; + } + + const startIndent = textEditorModel.getLineFirstNonWhitespaceColumn(startLineNumber); + const maxLineNumber = Math.min(textEditorModel.getLineCount(), startLineNumber + GotoDefinitionWithMouseEditorContribution.MAX_SOURCE_PREVIEW_LINES); + let endLineNumber = startLineNumber + 1; + let minIndent = startIndent; + + for (; endLineNumber < maxLineNumber; endLineNumber++) { + let endIndent = textEditorModel.getLineFirstNonWhitespaceColumn(endLineNumber); + minIndent = Math.min(minIndent, endIndent); + if (startIndent === endIndent) { + break; + } + } + + const previewRange = new Range(startLineNumber, 1, endLineNumber + 1, 1); + const value = textEditorModel.getValueInRange(previewRange).replace(new RegExp(`^\\s{${minIndent - 1}}`, 'gm'), '').trim(); + + this.addDecoration(new Range(position.lineNumber, word.startColumn, position.lineNumber, word.endColumn), { + language: this.modeService.getModeIdByFilenameOrFirstLine(textEditorModel.uri.fsPath), + value + }); + ref.dispose(); + }); + } + }).done(undefined, onUnexpectedError); + } + + private addDecoration(range: Range, hoverMessage: MarkedString): void { + + const newDecorations: editorCommon.IModelDeltaDecoration = { + range: range, + options: { + inlineClassName: 'goto-definition-link', + hoverMessage + } + }; + + this.decorations = this.editor.deltaDecorations(this.decorations, [newDecorations]); + } + + private removeDecorations(): void { + if (this.decorations.length > 0) { + this.decorations = this.editor.deltaDecorations(this.decorations, []); + } + } + + private isEnabled(mouseEvent: ClickLinkMouseEvent, withKey?: ClickLinkKeyboardEvent): boolean { + return this.editor.getModel() && + mouseEvent.isNoneOrSingleMouseDown && + mouseEvent.target.type === MouseTargetType.CONTENT_TEXT && + (mouseEvent.hasTriggerModifier || (withKey && withKey.keyCodeIsTriggerKey)) && + DefinitionProviderRegistry.has(this.editor.getModel()); + } + + private findDefinition(target: IMouseTarget): TPromise { + let model = this.editor.getModel(); + if (!model) { + return TPromise.as(null); + } + + return getDefinitionsAtPosition(this.editor.getModel(), target.position); + } + + private gotoDefinition(target: IMouseTarget, sideBySide: boolean): TPromise { + this.editor.setPosition(target.position); + const action = new DefinitionAction(new DefinitionActionConfig(sideBySide, false, true, false), { alias: undefined, label: undefined, id: undefined, precondition: undefined }); + return this.editor.invokeWithinContext(accessor => action.run(accessor, this.editor)); + } + + public getId(): string { + return GotoDefinitionWithMouseEditorContribution.ID; + } + + public dispose(): void { + this.toUnhook = dispose(this.toUnhook); + } +} + +registerThemingParticipant((theme, collector) => { + let activeLinkForeground = theme.getColor(editorActiveLinkForeground); + if (activeLinkForeground) { + collector.addRule(`.monaco-editor .goto-definition-link { color: ${activeLinkForeground} !important; }`); + } +}); diff --git a/src/vs/editor/contrib/goToDeclaration/browser/messageController.css b/src/vs/editor/contrib/goToDeclaration/browser/messageController.css index 576dc53a63672..36c68465b2c24 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/messageController.css +++ b/src/vs/editor/contrib/goToDeclaration/browser/messageController.css @@ -25,8 +25,6 @@ .monaco-editor .monaco-editor-overlaymessage .message { padding: 1px 4px; - background: #1382CE; - color: white; } .monaco-editor .monaco-editor-overlaymessage .anchor { @@ -36,6 +34,5 @@ border-style: solid; z-index: 1000; border-width: 8px; - border-top-color: #1382CE; position: absolute; } diff --git a/src/vs/editor/contrib/goToDeclaration/browser/messageController.ts b/src/vs/editor/contrib/goToDeclaration/browser/messageController.ts index d942264015448..4951c14ec8c8f 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/messageController.ts +++ b/src/vs/editor/contrib/goToDeclaration/browser/messageController.ts @@ -6,7 +6,6 @@ 'use strict'; import 'vs/css!./messageController'; -import { any } from 'vs/base/common/event'; import { setDisposableTimeout } from 'vs/base/common/async'; import { KeyCode } from 'vs/base/common/keyCodes'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; @@ -17,6 +16,8 @@ import { commonEditorContribution, CommonEditorRegistry, EditorCommand } from 'v import { ICodeEditor, IContentWidget, IContentWidgetPosition, ContentWidgetPositionPreference } from 'vs/editor/browser/editorBrowser'; import { IContextKeyService, RawContextKey, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { IPosition } from 'vs/editor/common/core/position'; +import { registerThemingParticipant, HIGH_CONTRAST } from 'vs/platform/theme/common/themeService'; +import { inputValidationInfoBorder, inputValidationInfoBackground } from 'vs/platform/theme/common/colorRegistry'; @commonEditorContribution export class MessageController { @@ -60,12 +61,10 @@ export class MessageController { this._messageWidget = new MessageWidget(this._editor, position, message); // close on blur, cursor, model change, dispose - this._messageListeners.push(any( - this._editor.onDidBlurEditorText, - this._editor.onDidChangeCursorPosition, - this._editor.onDidDispose, - this._editor.onDidChangeModel - )(this.closeMessage, this)); + this._messageListeners.push(this._editor.onDidBlurEditorText(() => this.closeMessage())); + this._messageListeners.push(this._editor.onDidChangeCursorPosition(() => this.closeMessage())); + this._messageListeners.push(this._editor.onDidDispose(() => this.closeMessage())); + this._messageListeners.push(this._editor.onDidChangeModel(() => this.closeMessage())); // close after 3s this._messageListeners.push(setDisposableTimeout(() => this.closeMessage(), 3000)); @@ -170,3 +169,16 @@ class MessageWidget implements IContentWidget { return { position: this._position, preference: [ContentWidgetPositionPreference.ABOVE] }; } } + +registerThemingParticipant((theme, collector) => { + let border = theme.getColor(inputValidationInfoBorder); + if (border) { + let borderWidth = theme.type === HIGH_CONTRAST ? 2 : 1; + collector.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor { border-top-color: ${border}; }`); + collector.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { border: ${borderWidth}px solid ${border}; }`); + } + let background = theme.getColor(inputValidationInfoBackground); + if (background) { + collector.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { background-color: ${background}; }`); + } +}); diff --git a/src/vs/editor/contrib/goToDeclaration/common/goToDeclaration.ts b/src/vs/editor/contrib/goToDeclaration/common/goToDeclaration.ts deleted file mode 100644 index 61afed811363f..0000000000000 --- a/src/vs/editor/contrib/goToDeclaration/common/goToDeclaration.ts +++ /dev/null @@ -1,74 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import { onUnexpectedExternalError } from 'vs/base/common/errors'; -import { TPromise } from 'vs/base/common/winjs.base'; -import { IReadOnlyModel } from 'vs/editor/common/editorCommon'; -import { CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; -import LanguageFeatureRegistry from 'vs/editor/common/modes/languageFeatureRegistry'; -import { DefinitionProviderRegistry, ImplementationProviderRegistry, TypeDefinitionProviderRegistry, Location } from 'vs/editor/common/modes'; -import { CancellationToken } from 'vs/base/common/cancellation'; -import { asWinJsPromise } from 'vs/base/common/async'; -import { Position } from 'vs/editor/common/core/position'; - -function outputResults(promises: TPromise[]) { - return TPromise.join(promises).then(allReferences => { - let result: Location[] = []; - for (let references of allReferences) { - if (Array.isArray(references)) { - result.push(...references); - } else if (references) { - result.push(references); - } - } - return result; - }); -} - -function getDefinitions( - model: IReadOnlyModel, - position: Position, - registry: LanguageFeatureRegistry, - provide: (provider: T, model: IReadOnlyModel, position: Position, token: CancellationToken) => Location | Location[] | Thenable -): TPromise { - const provider = registry.ordered(model); - - // get results - const promises = provider.map((provider, idx) => { - return asWinJsPromise((token) => { - return provide(provider, model, position, token); - }).then(result => { - return result; - }, err => { - onUnexpectedExternalError(err); - }); - }); - return outputResults(promises); -} - - -export function getDefinitionsAtPosition(model: IReadOnlyModel, position: Position): TPromise { - return getDefinitions(model, position, DefinitionProviderRegistry, (provider, model, position, token) => { - return provider.provideDefinition(model, position, token); - }); -} - -export function getImplementationsAtPosition(model: IReadOnlyModel, position: Position): TPromise { - return getDefinitions(model, position, ImplementationProviderRegistry, (provider, model, position, token) => { - return provider.provideImplementation(model, position, token); - }); -} - -export function getTypeDefinitionsAtPosition(model: IReadOnlyModel, position: Position): TPromise { - return getDefinitions(model, position, TypeDefinitionProviderRegistry, (provider, model, position, token) => { - return provider.provideTypeDefinition(model, position, token); - }); -} - -CommonEditorRegistry.registerDefaultLanguageCommand('_executeDefinitionProvider', getDefinitionsAtPosition); -CommonEditorRegistry.registerDefaultLanguageCommand('_executeImplementationProvider', getImplementationsAtPosition); -CommonEditorRegistry.registerDefaultLanguageCommand('_executeTypeDefinitionProvider', getTypeDefinitionsAtPosition); \ No newline at end of file diff --git a/src/vs/editor/contrib/gotoError/browser/gotoError.ts b/src/vs/editor/contrib/gotoError/browser/gotoError.ts index 4c6a75505073c..d0e1a23068b38 100644 --- a/src/vs/editor/contrib/gotoError/browser/gotoError.ts +++ b/src/vs/editor/contrib/gotoError/browser/gotoError.ts @@ -13,7 +13,6 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import Severity from 'vs/base/common/severity'; import URI from 'vs/base/common/uri'; import * as dom from 'vs/base/browser/dom'; -import { ICommandService } from 'vs/platform/commands/common/commands'; import { RawContextKey, IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IMarker, IMarkerService } from 'vs/platform/markers/common/markers'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; @@ -24,10 +23,12 @@ import { editorAction, ServicesAccessor, IActionOptions, EditorAction, EditorCom import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; import { ZoneWidget } from 'vs/editor/contrib/zoneWidget/browser/zoneWidget'; -import { registerColor } from 'vs/platform/theme/common/colorRegistry'; +import { registerColor, oneOf } from 'vs/platform/theme/common/colorRegistry'; import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; import { Color } from 'vs/base/common/color'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; +import { AccessibilitySupport } from 'vs/base/common/platform'; +import { editorErrorForeground, editorErrorBorder, editorWarningForeground, editorWarningBorder } from 'vs/editor/common/view/editorColorRegistry'; class MarkerModel { @@ -221,7 +222,7 @@ class MarkerNavigationWidget extends ZoneWidget { private _severity: Severity; private _backgroundColor: Color; - constructor(editor: ICodeEditor, private _model: MarkerModel, private _commandService: ICommandService, private _themeService: IThemeService) { + constructor(editor: ICodeEditor, private _model: MarkerModel, private _themeService: IThemeService) { super(editor, { showArrow: true, showFrame: true, isAccessible: true }); this._severity = Severity.Warning; this._backgroundColor = Color.white; @@ -277,7 +278,9 @@ class MarkerNavigationWidget extends ZoneWidget { public show(where: Position, heightInLines: number): void { super.show(where, heightInLines); - this.focus(); + if (this.editor.getConfiguration().accessibilitySupport !== AccessibilitySupport.Disabled) { + this.focus(); + } } private _wireModelAndView(): void { @@ -377,7 +380,6 @@ class MarkerController implements editorCommon.IEditorContribution { editor: ICodeEditor, @IMarkerService private _markerService: IMarkerService, @IContextKeyService private _contextKeyService: IContextKeyService, - @ICommandService private _commandService: ICommandService, @IThemeService private _themeService: IThemeService ) { this._editor = editor; @@ -407,7 +409,7 @@ class MarkerController implements editorCommon.IEditorContribution { const markers = this._getMarkers(); this._model = new MarkerModel(this._editor, markers); - this._zone = new MarkerNavigationWidget(this._editor, this._model, this._commandService, this._themeService); + this._zone = new MarkerNavigationWidget(this._editor, this._model, this._themeService); this._markersNavigationVisible.set(true); this._callOnClose.push(this._model); @@ -486,6 +488,9 @@ CommonEditorRegistry.registerEditorCommand(new MarkerCommand({ // theming -export const editorMarkerNavigationError = registerColor('editorMarkerNavigationError', { dark: '#ff5a5a', light: '#ff5a5a', hc: '#ff5a5a' }, nls.localize('editorMarkerNavigationError', 'Editor marker navigation widget error color.')); -export const editorMarkerNavigationWarning = registerColor('editorMarkerNavigationWarning', { dark: '#5aac5a', light: '#5aac5a', hc: '#5aac5a' }, nls.localize('editorMarkerNavigationWarning', 'Editor marker navigation widget warning color.')); -export const editorMarkerNavigationBackground = registerColor('editorMarkerNavigationBackground', { dark: '#2D2D30', light: Color.white, hc: '#0C141F' }, nls.localize('editorMarkerNavigationBackground', 'Editor marker navigation widget background.')); +let errorDefault = oneOf(editorErrorForeground, editorErrorBorder); +let warningDefault = oneOf(editorWarningForeground, editorWarningBorder); + +export const editorMarkerNavigationError = registerColor('editorMarkerNavigationError.background', { dark: errorDefault, light: errorDefault, hc: errorDefault }, nls.localize('editorMarkerNavigationError', 'Editor marker navigation widget error color.')); +export const editorMarkerNavigationWarning = registerColor('editorMarkerNavigationWarning.background', { dark: warningDefault, light: warningDefault, hc: warningDefault }, nls.localize('editorMarkerNavigationWarning', 'Editor marker navigation widget warning color.')); +export const editorMarkerNavigationBackground = registerColor('editorMarkerNavigation.background', { dark: '#2D2D30', light: Color.white, hc: '#0C141F' }, nls.localize('editorMarkerNavigationBackground', 'Editor marker navigation widget background.')); diff --git a/src/vs/editor/contrib/hover/browser/hover.css b/src/vs/editor/contrib/hover/browser/hover.css index 191c253ae2d2d..076675d3e48bd 100644 --- a/src/vs/editor/contrib/hover/browser/hover.css +++ b/src/vs/editor/contrib/hover/browser/hover.css @@ -60,7 +60,6 @@ } .monaco-editor-hover code { - background-color: rgba(132, 132, 132, 0.14); border-radius: 3px; padding: 0 0.4em; } @@ -68,7 +67,4 @@ .monaco-editor-hover .monaco-tokenized-source { white-space: pre-wrap; word-break: break-all; -} - -.monaco-editor.vs-dark .monaco-editor-hover a { color: #1C5DAF; } -.monaco-editor.hc-black .monaco-editor-hover a { color: #1C5DAF; } \ No newline at end of file +} \ No newline at end of file diff --git a/src/vs/editor/contrib/hover/browser/hover.ts b/src/vs/editor/contrib/hover/browser/hover.ts index b2625ee0fd092..b0229e73f1b1c 100644 --- a/src/vs/editor/contrib/hover/browser/hover.ts +++ b/src/vs/editor/contrib/hover/browser/hover.ts @@ -21,7 +21,7 @@ import { ModesContentHoverWidget } from './modesContentHover'; import { ModesGlyphHoverWidget } from './modesGlyphHover'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -import { registerColor } from 'vs/platform/theme/common/colorRegistry'; +import { editorHoverHighlight, editorHoverBackground, editorHoverBorder, textLinkForeground, textCodeBlockBackground } from 'vs/platform/theme/common/colorRegistry'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; @editorContribution @@ -112,8 +112,7 @@ export class ModesHoverController implements editorCommon.IEditorContribution { } private _onKeyDown(e: IKeyboardEvent): void { - var stopKey = platform.isMacintosh ? KeyCode.Meta : KeyCode.Ctrl; - if (e.keyCode !== stopKey) { + if (e.keyCode !== KeyCode.Ctrl && e.keyCode !== KeyCode.Alt && e.keyCode !== KeyCode.Meta) { // Do not hide hover when Ctrl/Meta is pressed this._hideWidgets(); } @@ -173,23 +172,27 @@ class ShowHoverAction extends EditorAction { } // theming - -export const editorHoverHighlight = registerColor('editorHoverHighlight', { light: '#ADD6FF26', dark: '#264f7840', hc: '#ADD6FF26' }, nls.localize('hoverHighlight', 'Highlight below the word for which a hover is shown.')); -export const editorHoverBackground = registerColor('editorHoverBackground', { light: '#F3F3F3', dark: '#2D2D30', hc: '#0C141F' }, nls.localize('hoverBackground', 'Background color of the editor hover.')); -export const editorHoverBorder = registerColor('editorHoverBorder', { light: '#CCCCCC', dark: '#555555', hc: '#CCCCCC' }, nls.localize('hoverBorder', 'Border color of the editor hover.')); - registerThemingParticipant((theme, collector) => { let editorHoverHighlightColor = theme.getColor(editorHoverHighlight); if (editorHoverHighlightColor) { - collector.addRule(`.monaco-editor.${theme.selector} .hoverHighlight { background-color: ${editorHoverHighlightColor}; }`); + collector.addRule(`.monaco-editor .hoverHighlight { background-color: ${editorHoverHighlightColor}; }`); } let hoverBackground = theme.getColor(editorHoverBackground); if (hoverBackground) { - collector.addRule(`.monaco-editor.${theme.selector} .monaco-editor-hover { background-color: ${hoverBackground}; }`); + collector.addRule(`.monaco-editor .monaco-editor-hover { background-color: ${hoverBackground}; }`); } let hoverBorder = theme.getColor(editorHoverBorder); if (hoverBorder) { - collector.addRule(`.monaco-editor.${theme.selector} .monaco-editor-hover { border: 1px solid ${hoverBorder}; }`); - collector.addRule(`.monaco-editor.${theme.selector} .monaco-editor-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${hoverBorder.transparent(0.5)}; }`); + collector.addRule(`.monaco-editor .monaco-editor-hover { border: 1px solid ${hoverBorder}; }`); + collector.addRule(`.monaco-editor .monaco-editor-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${hoverBorder.transparent(0.5)}; }`); + } + let link = theme.getColor(textLinkForeground); + if (link) { + collector.addRule(`.monaco-editor .monaco-editor-hover a { color: ${link}; }`); } + let codeBackground = theme.getColor(textCodeBlockBackground); + if (codeBackground) { + collector.addRule(`.monaco-editor .monaco-editor-hover code { background-color: ${codeBackground}; }`); + } + }); diff --git a/src/vs/editor/contrib/hover/browser/hoverWidgets.ts b/src/vs/editor/contrib/hover/browser/hoverWidgets.ts index bc42fb4935aa2..eacdbf64f4e91 100644 --- a/src/vs/editor/contrib/hover/browser/hoverWidgets.ts +++ b/src/vs/editor/contrib/hover/browser/hoverWidgets.ts @@ -51,7 +51,7 @@ export class ContentHoverWidget extends Widget implements editorBrowser.IContent this._domNode = document.createElement('div'); this._domNode.className = 'monaco-editor-hover-content'; - this.scrollbar = new DomScrollableElement(this._domNode, { canUseTranslate3d: false }); + this.scrollbar = new DomScrollableElement(this._domNode, {}); this.disposables.push(this.scrollbar); this._containerDomNode.appendChild(this.scrollbar.getDomNode()); diff --git a/src/vs/editor/contrib/hover/browser/modesContentHover.ts b/src/vs/editor/contrib/hover/browser/modesContentHover.ts index 6c9d4105c2708..ff8f4d98be72f 100644 --- a/src/vs/editor/contrib/hover/browser/modesContentHover.ts +++ b/src/vs/editor/contrib/hover/browser/modesContentHover.ts @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import 'vs/css!vs/base/browser/ui/progressbar/progressbar'; import * as nls from 'vs/nls'; import URI from 'vs/base/common/uri'; import { onUnexpectedError } from 'vs/base/common/errors'; @@ -22,6 +21,7 @@ import { getHover } from '../common/hover'; import { HoverOperation, IHoverComputer } from './hoverOperation'; import { ContentHoverWidget } from './hoverWidgets'; import { textToMarkedString, MarkedString } from 'vs/base/common/htmlContent'; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; class ModesContentComputer implements IHoverComputer { @@ -274,10 +274,12 @@ export class ModesContentHoverWidget extends ContentHoverWidget { this._isChangingDecorations = true; this._highlightDecorations = this._editor.deltaDecorations(this._highlightDecorations, [{ range: highlightRange, - options: { - className: 'hoverHighlight' - } + options: ModesContentHoverWidget._DECORATION_OPTIONS }]); this._isChangingDecorations = false; } -} \ No newline at end of file + + private static _DECORATION_OPTIONS = ModelDecorationOptions.register({ + className: 'hoverHighlight' + }); +} diff --git a/src/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.css b/src/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.css deleted file mode 100644 index 5bdbf17000816..0000000000000 --- a/src/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.css +++ /dev/null @@ -1,8 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -.monaco-editor.vs .valueSetReplacement { outline: solid 2px #888; } -.monaco-editor.vs-dark .valueSetReplacement { outline: solid 2px #888; } -.monaco-editor.hc-black .valueSetReplacement { outline: none; } diff --git a/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.ts b/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.ts index 1693459d3f21a..030eff62c2574 100644 --- a/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.ts +++ b/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.ts @@ -16,6 +16,9 @@ import { IInplaceReplaceSupportResult } from 'vs/editor/common/modes'; import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService'; import { InPlaceReplaceCommand } from './inPlaceReplaceCommand'; import { EditorState, CodeEditorStateFlag } from 'vs/editor/common/core/editorState'; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { editorBracketMatchBorder } from 'vs/editor/common/view/editorColorRegistry'; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; @commonEditorContribution class InPlaceReplaceController implements IEditorContribution { @@ -26,9 +29,9 @@ class InPlaceReplaceController implements IEditorContribution { return editor.getContribution(InPlaceReplaceController.ID); } - private static DECORATION = { + private static DECORATION = ModelDecorationOptions.register({ className: 'valueSetReplacement' - }; + }); private editor: ICommonCodeEditor; private requestIdPool: number; @@ -110,7 +113,10 @@ class InPlaceReplaceController implements IEditorContribution { // Insert new text var command = new InPlaceReplaceCommand(editRange, selection, result.value); + + this.editor.pushUndoStop(); this.editor.executeCommand(source, command); + this.editor.pushUndoStop(); // add decoration this.decorationIds = this.editor.deltaDecorations(this.decorationIds, [{ @@ -179,3 +185,10 @@ class InPlaceReplaceDown extends EditorAction { return controller.run(this.id, false); } } + +registerThemingParticipant((theme, collector) => { + let border = theme.getColor(editorBracketMatchBorder); + if (border) { + collector.addRule(`.monaco-editor.vs .valueSetReplacement { outline: solid 2px ${border}; }`); + } +}); \ No newline at end of file diff --git a/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplaceCommand.ts b/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplaceCommand.ts index 75f4bc12f90b8..94ffad7d218df 100644 --- a/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplaceCommand.ts +++ b/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplaceCommand.ts @@ -21,7 +21,7 @@ export class InPlaceReplaceCommand implements editorCommon.ICommand { } public getEditOperations(model: editorCommon.ITokenizedModel, builder: editorCommon.IEditOperationBuilder): void { - builder.addEditOperation(this._editRange, this._text); + builder.addTrackedEditOperation(this._editRange, this._text); } public computeCursorState(model: editorCommon.ITokenizedModel, helper: editorCommon.ICursorStateComputerData): Selection { diff --git a/src/vs/editor/contrib/indentation/common/indentUtils.ts b/src/vs/editor/contrib/indentation/common/indentUtils.ts new file mode 100644 index 0000000000000..45ee5c3656666 --- /dev/null +++ b/src/vs/editor/contrib/indentation/common/indentUtils.ts @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +export function getSpaceCnt(str, tabSize) { + let spacesCnt = 0; + + for (let i = 0; i < str.length; i++) { + if (str.charAt(i) === '\t') { + spacesCnt += tabSize; + } else { + spacesCnt++; + } + } + + return spacesCnt; +} + +export function generateIndent(spacesCnt: number, tabSize, insertSpaces) { + spacesCnt = spacesCnt < 0 ? 0 : spacesCnt; + + let result = ''; + if (!insertSpaces) { + let tabsCnt = Math.floor(spacesCnt / tabSize); + spacesCnt = spacesCnt % tabSize; + for (let i = 0; i < tabsCnt; i++) { + result += '\t'; + } + } + + for (let i = 0; i < spacesCnt; i++) { + result += ' '; + } + + return result; +} \ No newline at end of file diff --git a/src/vs/editor/contrib/indentation/common/indentation.ts b/src/vs/editor/contrib/indentation/common/indentation.ts index 44d1a1bdac36f..ee7c641330d71 100644 --- a/src/vs/editor/contrib/indentation/common/indentation.ts +++ b/src/vs/editor/contrib/indentation/common/indentation.ts @@ -4,11 +4,12 @@ *--------------------------------------------------------------------------------------------*/ import * as nls from 'vs/nls'; +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { TPromise } from 'vs/base/common/winjs.base'; import * as strings from 'vs/base/common/strings'; -import { ICommonCodeEditor, IIdentifiedSingleEditOperation, ICommand, ICursorStateComputerData, IEditOperationBuilder, ITokenizedModel } from 'vs/editor/common/editorCommon'; +import { ICommonCodeEditor, IEditorContribution, IIdentifiedSingleEditOperation, ICommand, ICursorStateComputerData, IEditOperationBuilder, ITokenizedModel, EndOfLineSequence } from 'vs/editor/common/editorCommon'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; -import { editorAction, ServicesAccessor, IActionOptions, EditorAction } from 'vs/editor/common/editorCommonExtensions'; +import { editorAction, ServicesAccessor, IActionOptions, EditorAction, commonEditorContribution } from 'vs/editor/common/editorCommonExtensions'; import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; import { IModelService } from 'vs/editor/common/services/modelService'; import { Range } from 'vs/editor/common/core/range'; @@ -17,6 +18,8 @@ import { EditOperation } from 'vs/editor/common/core/editOperation'; import { TextModel } from 'vs/editor/common/model/textModel'; import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; import { ShiftCommand } from 'vs/editor/common/commands/shiftCommand'; +import { TextEdit, StandardTokenType } from 'vs/editor/common/modes'; +import * as IndentUtil from './indentUtils'; export function shiftIndent(tabSize: number, indentation: string, count?: number): string { count = count || 1; @@ -164,7 +167,11 @@ export class IndentationToSpacesAction extends EditorAction { } let modelOpts = model.getOptions(); const command = new IndentationToSpacesCommand(editor.getSelection(), modelOpts.tabSize); + + editor.pushUndoStop(); editor.executeCommands(this.id, [command]); + editor.pushUndoStop(); + model.updateOptions({ insertSpaces: true }); @@ -191,7 +198,11 @@ export class IndentationToTabsAction extends EditorAction { } let modelOpts = model.getOptions(); const command = new IndentationToTabsCommand(editor.getSelection(), modelOpts.tabSize); + + editor.pushUndoStop(); editor.executeCommands(this.id, [command]); + editor.pushUndoStop(); + model.updateOptions({ insertSpaces: false }); @@ -317,6 +328,236 @@ export class ReindentLinesAction extends EditorAction { } } +export class AutoIndentOnPasteCommand implements ICommand { + + private _edits: TextEdit[]; + private _newEol: EndOfLineSequence; + + private _initialSelection: Selection; + private _selectionId: string; + + constructor(edits: TextEdit[], initialSelection: Selection) { + this._initialSelection = initialSelection; + this._edits = []; + this._newEol = undefined; + + for (let edit of edits) { + if (typeof edit.eol === 'number') { + this._newEol = edit.eol; + } + if (edit.range && typeof edit.text === 'string') { + this._edits.push(edit); + } + } + } + + public getEditOperations(model: ITokenizedModel, builder: IEditOperationBuilder): void { + for (let edit of this._edits) { + builder.addEditOperation(Range.lift(edit.range), edit.text); + } + + var selectionIsSet = false; + if (Array.isArray(this._edits) && this._edits.length === 1 && this._initialSelection.isEmpty()) { + if (this._edits[0].range.startColumn === this._initialSelection.endColumn && + this._edits[0].range.startLineNumber === this._initialSelection.endLineNumber) { + selectionIsSet = true; + this._selectionId = builder.trackSelection(this._initialSelection, true); + } else if (this._edits[0].range.endColumn === this._initialSelection.startColumn && + this._edits[0].range.endLineNumber === this._initialSelection.startLineNumber) { + selectionIsSet = true; + this._selectionId = builder.trackSelection(this._initialSelection, false); + } + } + + if (!selectionIsSet) { + this._selectionId = builder.trackSelection(this._initialSelection); + } + } + + public computeCursorState(model: ITokenizedModel, helper: ICursorStateComputerData): Selection { + return helper.getTrackedSelection(this._selectionId); + } +} + +@commonEditorContribution +export class AutoIndentOnPaste implements IEditorContribution { + private static ID = 'editor.contrib.autoIndentOnPaste'; + + private editor: ICommonCodeEditor; + private callOnDispose: IDisposable[]; + private callOnModel: IDisposable[]; + + constructor(editor: ICommonCodeEditor) { + this.editor = editor; + this.callOnDispose = []; + this.callOnModel = []; + + this.callOnDispose.push(editor.onDidChangeConfiguration(() => this.update())); + this.callOnDispose.push(editor.onDidChangeModel(() => this.update())); + this.callOnDispose.push(editor.onDidChangeModelLanguage(() => this.update())); + } + + private update(): void { + + // clean up + this.callOnModel = dispose(this.callOnModel); + + // we are disabled + if (!this.editor.getConfiguration().autoIndent || this.editor.getConfiguration().contribInfo.formatOnPaste) { + return; + } + + // no model + if (!this.editor.getModel()) { + return; + } + + this.callOnModel.push(this.editor.onDidPaste((range: Range) => { + this.trigger(range); + })); + } + + private trigger(range: Range): void { + if (this.editor.getSelections().length > 1) { + return; + } + + const model = this.editor.getModel(); + const { tabSize, insertSpaces } = model.getOptions(); + this.editor.pushUndoStop(); + let textEdits: TextEdit[] = []; + + let indentConverter = { + shiftIndent: (indentation) => { + let desiredIndentCount = ShiftCommand.shiftIndentCount(indentation, indentation.length + 1, tabSize); + let newIndentation = ''; + for (let i = 0; i < desiredIndentCount; i++) { + newIndentation += '\t'; + } + + return newIndentation; + }, + unshiftIndent: (indentation) => { + let desiredIndentCount = ShiftCommand.unshiftIndentCount(indentation, indentation.length + 1, tabSize); + let newIndentation = ''; + for (let i = 0; i < desiredIndentCount; i++) { + newIndentation += '\t'; + } + + return newIndentation; + } + }; + + let startLineNumber = range.startLineNumber; + + while (startLineNumber <= range.endLineNumber) { + if (this.shouldIgnoreLine(model, startLineNumber)) { + startLineNumber++; + continue; + } + break; + } + + if (startLineNumber > range.endLineNumber) { + return; + } + + let firstLineText = model.getLineContent(startLineNumber); + if (!/\S/.test(firstLineText.substring(0, range.startColumn - 1))) { + let indentOfFirstLine = LanguageConfigurationRegistry.getGoodIndentForLine(model, model.getLanguageIdentifier().id, startLineNumber, indentConverter); + + if (indentOfFirstLine !== null) { + let oldIndentation = strings.getLeadingWhitespace(firstLineText); + let newSpaceCnt = IndentUtil.getSpaceCnt(indentOfFirstLine, tabSize); + let oldSpaceCnt = IndentUtil.getSpaceCnt(oldIndentation, tabSize); + + if (newSpaceCnt !== oldSpaceCnt) { + let newIndent = IndentUtil.generateIndent(newSpaceCnt, tabSize, insertSpaces); + textEdits.push({ + range: new Range(startLineNumber, 1, startLineNumber, oldIndentation.length + 1), + text: newIndent + }); + firstLineText = newIndent + firstLineText.substr(oldIndentation.length); + } + } + } + + if (startLineNumber !== range.endLineNumber) { + let virtualModel = { + getLineTokens: (lineNumber: number) => { + return model.getLineTokens(lineNumber); + }, + getLanguageIdentifier: () => { + return model.getLanguageIdentifier(); + }, + getLanguageIdAtPosition: (lineNumber: number, column: number) => { + return model.getLanguageIdAtPosition(lineNumber, column); + }, + getLineContent: (lineNumber) => { + if (lineNumber === startLineNumber) { + return firstLineText; + } else { + return model.getLineContent(lineNumber); + } + } + }; + let indentOfSecondLine = LanguageConfigurationRegistry.getGoodIndentForLine(virtualModel, model.getLanguageIdentifier().id, startLineNumber + 1, indentConverter); + if (indentOfSecondLine !== null) { + let newSpaceCntOfSecondLine = IndentUtil.getSpaceCnt(indentOfSecondLine, tabSize); + let oldSpaceCntOfSecondLine = IndentUtil.getSpaceCnt(strings.getLeadingWhitespace(model.getLineContent(startLineNumber + 1)), tabSize); + + if (newSpaceCntOfSecondLine !== oldSpaceCntOfSecondLine) { + let spaceCntOffset = newSpaceCntOfSecondLine - oldSpaceCntOfSecondLine; + for (let i = startLineNumber + 1; i <= range.endLineNumber; i++) { + let lineContent = model.getLineContent(i); + let originalIndent = strings.getLeadingWhitespace(lineContent); + let originalSpacesCnt = IndentUtil.getSpaceCnt(originalIndent, tabSize); + let newSpacesCnt = originalSpacesCnt + spaceCntOffset; + let newIndent = IndentUtil.generateIndent(newSpacesCnt, tabSize, insertSpaces); + + if (newIndent !== originalIndent) { + textEdits.push({ + range: new Range(i, 1, i, originalIndent.length + 1), + text: newIndent + }); + } + } + } + } + } + + let cmd = new AutoIndentOnPasteCommand(textEdits, this.editor.getSelection()); + this.editor.executeCommand('autoIndentOnPaste', cmd); + this.editor.pushUndoStop(); + } + + private shouldIgnoreLine(model: ITokenizedModel, lineNumber: number): boolean { + model.forceTokenization(lineNumber); + let nonWhiteSpaceColumn = model.getLineFirstNonWhitespaceColumn(lineNumber); + if (nonWhiteSpaceColumn === 0) { + return true; + } + let tokens = model.getLineTokens(lineNumber); + if (tokens.getTokenCount() > 0) { + let firstNonWhiteSpaceToken = tokens.findTokenAtOffset(nonWhiteSpaceColumn); + if (firstNonWhiteSpaceToken && firstNonWhiteSpaceToken.tokenType === StandardTokenType.Comment) { + return true; + } + } + + return false; + } + + public getId(): string { + return AutoIndentOnPaste.ID; + } + + public dispose(): void { + this.callOnDispose = dispose(this.callOnDispose); + this.callOnModel = dispose(this.callOnModel); + } +} + function getIndentationEditOperations(model: ITokenizedModel, builder: IEditOperationBuilder, tabSize: number, tabsToSpaces: boolean): void { if (model.getLineCount() === 1 && model.getLineMaxColumn(1) === 1) { // Model is empty diff --git a/src/vs/editor/contrib/linesOperations/common/deleteLinesCommand.ts b/src/vs/editor/contrib/linesOperations/common/deleteLinesCommand.ts index ee6327b1d20fe..5f65136ea7066 100644 --- a/src/vs/editor/contrib/linesOperations/common/deleteLinesCommand.ts +++ b/src/vs/editor/contrib/linesOperations/common/deleteLinesCommand.ts @@ -48,7 +48,7 @@ export class DeleteLinesCommand implements ICommand { startColumn = model.getLineMaxColumn(startLineNumber); } - builder.addEditOperation(new Range(startLineNumber, startColumn, endLineNumber, endColumn), null); + builder.addTrackedEditOperation(new Range(startLineNumber, startColumn, endLineNumber, endColumn), null); } public computeCursorState(model: ITokenizedModel, helper: ICursorStateComputerData): Selection { diff --git a/src/vs/editor/contrib/linesOperations/common/linesOperations.ts b/src/vs/editor/contrib/linesOperations/common/linesOperations.ts index 54255479f3055..3c5229de4505e 100644 --- a/src/vs/editor/contrib/linesOperations/common/linesOperations.ts +++ b/src/vs/editor/contrib/linesOperations/common/linesOperations.ts @@ -9,15 +9,17 @@ import { KeyCode, KeyMod, KeyChord } from 'vs/base/common/keyCodes'; import { SortLinesCommand } from 'vs/editor/contrib/linesOperations/common/sortLinesCommand'; import { EditOperation } from 'vs/editor/common/core/editOperation'; import { TrimTrailingWhitespaceCommand } from 'vs/editor/common/commands/trimTrailingWhitespaceCommand'; -import { Handler, ICommand, ICommonCodeEditor, IIdentifiedSingleEditOperation } from 'vs/editor/common/editorCommon'; +import { ICommand, ICommonCodeEditor, IIdentifiedSingleEditOperation } from 'vs/editor/common/editorCommon'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { ReplaceCommand, ReplaceCommandThatPreservesSelection } from 'vs/editor/common/commands/replaceCommand'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; -import { editorAction, ServicesAccessor, IActionOptions, EditorAction, HandlerEditorAction } from 'vs/editor/common/editorCommonExtensions'; +import { editorAction, ServicesAccessor, IActionOptions, EditorAction } from 'vs/editor/common/editorCommonExtensions'; import { CopyLinesCommand } from './copyLinesCommand'; import { DeleteLinesCommand } from './deleteLinesCommand'; import { MoveLinesCommand } from './moveLinesCommand'; +import { TypeOperations } from 'vs/editor/common/controller/cursorTypeOperations'; +import { CoreEditingCommands } from 'vs/editor/common/controller/coreCommands'; // copy lines @@ -39,7 +41,9 @@ abstract class AbstractCopyLinesAction extends EditorAction { commands.push(new CopyLinesCommand(selections[i], this.down)); } + editor.pushUndoStop(); editor.executeCommands(this.id, commands); + editor.pushUndoStop(); } } @@ -92,12 +96,15 @@ abstract class AbstractMoveLinesAction extends EditorAction { var commands: ICommand[] = []; var selections = editor.getSelections(); + var autoIndent = editor.getConfiguration().autoIndent; for (var i = 0; i < selections.length; i++) { - commands.push(new MoveLinesCommand(selections[i], this.down)); + commands.push(new MoveLinesCommand(selections[i], this.down, autoIndent)); } + editor.pushUndoStop(); editor.executeCommands(this.id, commands); + editor.pushUndoStop(); } } @@ -151,7 +158,9 @@ abstract class AbstractSortLinesAction extends EditorAction { var command = new SortLinesCommand(editor.getSelection(), this.descending); + editor.pushUndoStop(); editor.executeCommands(this.id, [command]); + editor.pushUndoStop(); } } @@ -201,7 +210,9 @@ export class TrimTrailingWhitespaceAction extends EditorAction { var command = new TrimTrailingWhitespaceCommand(editor.getSelection()); + editor.pushUndoStop(); editor.executeCommands(this.id, [command]); + editor.pushUndoStop(); } } @@ -280,76 +291,94 @@ class DeleteLinesAction extends AbstractRemoveLinesAction { return new DeleteLinesCommand(op.startLineNumber, op.endLineNumber, op.positionColumn); }); + editor.pushUndoStop(); editor.executeCommands(this.id, commands); + editor.pushUndoStop(); } } @editorAction -class IndentLinesAction extends HandlerEditorAction { +export class IndentLinesAction extends EditorAction { constructor() { super({ id: 'editor.action.indentLines', label: nls.localize('lines.indent', "Indent Line"), alias: 'Indent Line', precondition: EditorContextKeys.writable, - handlerId: Handler.Indent, kbOpts: { kbExpr: EditorContextKeys.textFocus, primary: KeyMod.CtrlCmd | KeyCode.US_CLOSE_SQUARE_BRACKET } }); } + + public run(accessor: ServicesAccessor, editor: ICommonCodeEditor): void { + editor.pushUndoStop(); + editor.executeCommands(this.id, TypeOperations.indent(editor._getCursorConfiguration(), editor.getModel(), editor.getSelections())); + editor.pushUndoStop(); + } } @editorAction -class OutdentLinesAction extends HandlerEditorAction { +class OutdentLinesAction extends EditorAction { constructor() { super({ id: 'editor.action.outdentLines', label: nls.localize('lines.outdent', "Outdent Line"), alias: 'Outdent Line', precondition: EditorContextKeys.writable, - handlerId: Handler.Outdent, kbOpts: { kbExpr: EditorContextKeys.textFocus, primary: KeyMod.CtrlCmd | KeyCode.US_OPEN_SQUARE_BRACKET } }); } + + public run(accessor: ServicesAccessor, editor: ICommonCodeEditor): void { + CoreEditingCommands.Outdent.runEditorCommand(null, editor, null); + } } @editorAction -class InsertLineBeforeAction extends HandlerEditorAction { +export class InsertLineBeforeAction extends EditorAction { constructor() { super({ id: 'editor.action.insertLineBefore', label: nls.localize('lines.insertBefore', "Insert Line Above"), alias: 'Insert Line Above', precondition: EditorContextKeys.writable, - handlerId: Handler.LineInsertBefore, kbOpts: { kbExpr: EditorContextKeys.textFocus, primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Enter } }); } + + public run(accessor: ServicesAccessor, editor: ICommonCodeEditor): void { + editor.pushUndoStop(); + editor.executeCommands(this.id, TypeOperations.lineInsertBefore(editor._getCursorConfiguration(), editor.getModel(), editor.getSelections())); + } } @editorAction -class InsertLineAfterAction extends HandlerEditorAction { +export class InsertLineAfterAction extends EditorAction { constructor() { super({ id: 'editor.action.insertLineAfter', label: nls.localize('lines.insertAfter', "Insert Line Below"), alias: 'Insert Line Below', precondition: EditorContextKeys.writable, - handlerId: Handler.LineInsertAfter, kbOpts: { kbExpr: EditorContextKeys.textFocus, primary: KeyMod.CtrlCmd | KeyCode.Enter } }); } + + public run(accessor: ServicesAccessor, editor: ICommonCodeEditor): void { + editor.pushUndoStop(); + editor.executeCommands(this.id, TypeOperations.lineInsertAfter(editor._getCursorConfiguration(), editor.getModel(), editor.getSelections())); + } } export abstract class AbstractDeleteAllToBoundaryAction extends EditorAction { @@ -406,8 +435,8 @@ export class DeleteAllLeftAction extends AbstractDeleteAllToBoundaryAction { } _getEndCursorState(primaryCursor: Range, rangesToDelete: Range[]): Selection[] { - let endPrimaryCursor: Range; - let endCursorState = []; + let endPrimaryCursor: Selection; + let endCursorState: Selection[] = []; for (let i = 0, len = rangesToDelete.length; i < len; i++) { let range = rangesToDelete[i]; @@ -460,8 +489,8 @@ export class DeleteAllRightAction extends AbstractDeleteAllToBoundaryAction { } _getEndCursorState(primaryCursor: Range, rangesToDelete: Range[]): Selection[] { - let endPrimaryCursor: Range; - let endCursorState = []; + let endPrimaryCursor: Selection; + let endCursorState: Selection[] = []; for (let i = 0, len = rangesToDelete.length, offset = 0; i < len; i++) { let range = rangesToDelete[i]; let endCursor = new Selection(range.startLineNumber - offset, range.startColumn, range.startLineNumber - offset, range.startColumn); @@ -694,7 +723,9 @@ export class TransposeAction extends EditorAction { } } + editor.pushUndoStop(); editor.executeCommands(this.id, commands); + editor.pushUndoStop(); } } @@ -725,7 +756,9 @@ export abstract class AbstractCaseAction extends EditorAction { } } + editor.pushUndoStop(); editor.executeCommands(this.id, commands); + editor.pushUndoStop(); } protected abstract _modifyText(text: string): string; diff --git a/src/vs/editor/contrib/linesOperations/common/moveLinesCommand.ts b/src/vs/editor/contrib/linesOperations/common/moveLinesCommand.ts index 43ed98d212d82..7f5d406ce9fd0 100644 --- a/src/vs/editor/contrib/linesOperations/common/moveLinesCommand.ts +++ b/src/vs/editor/contrib/linesOperations/common/moveLinesCommand.ts @@ -4,21 +4,31 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; +import * as strings from 'vs/base/common/strings'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import { ICommand, ICursorStateComputerData, IEditOperationBuilder, ITokenizedModel } from 'vs/editor/common/editorCommon'; +import { LanguageConfigurationRegistry, IIndentConverter } from 'vs/editor/common/modes/languageConfigurationRegistry'; +import { ShiftCommand } from 'vs/editor/common/commands/shiftCommand'; +import * as IndentUtil from 'vs/editor/contrib/indentation/common/indentUtils'; +import { IndentAction } from 'vs/editor/common/modes/languageConfiguration'; +import { IndentConsts } from 'vs/editor/common/modes/supports/indentRules'; export class MoveLinesCommand implements ICommand { private _selection: Selection; private _isMovingDown: boolean; + private _autoIndent: boolean; private _selectionId: string; private _moveEndPositionDown: boolean; + private _moveEndLineSelectionShrink: boolean; - constructor(selection: Selection, isMovingDown: boolean) { + constructor(selection: Selection, isMovingDown: boolean, autoIndent: boolean) { this._selection = selection; this._isMovingDown = isMovingDown; + this._autoIndent = autoIndent; + this._moveEndLineSelectionShrink = false; } public getEditOperations(model: ITokenizedModel, builder: IEditOperationBuilder): void { @@ -40,6 +50,22 @@ export class MoveLinesCommand implements ICommand { s = s.setEndPosition(s.endLineNumber - 1, model.getLineMaxColumn(s.endLineNumber - 1)); } + let tabSize = model.getOptions().tabSize; + let insertSpaces = model.getOptions().insertSpaces; + let indentConverter = this.buildIndentConverter(tabSize); + let virtualModel = { + getLineTokens: (lineNumber: number) => { + return model.getLineTokens(lineNumber); + }, + getLanguageIdentifier: () => { + return model.getLanguageIdentifier(); + }, + getLanguageIdAtPosition: (lineNumber: number, column: number) => { + return model.getLanguageIdAtPosition(lineNumber, column); + }, + getLineContent: null + }; + if (s.startLineNumber === s.endLineNumber && model.getLineMaxColumn(s.startLineNumber) === 1) { // Current line is empty var lineNumber = s.startLineNumber; @@ -67,12 +93,81 @@ export class MoveLinesCommand implements ICommand { if (this._isMovingDown) { movingLineNumber = s.endLineNumber + 1; movingLineText = model.getLineContent(movingLineNumber); - // Delete line that needs to be moved builder.addEditOperation(new Range(movingLineNumber - 1, model.getLineMaxColumn(movingLineNumber - 1), movingLineNumber, model.getLineMaxColumn(movingLineNumber)), null); - // Insert line that needs to be moved before - builder.addEditOperation(new Range(s.startLineNumber, 1, s.startLineNumber, 1), movingLineText + '\n'); + let insertingText = movingLineText; + + if (this.isAutoIndent(model, s)) { + let movingLineMatchResult = this.matchEnterRule(model, s.startLineNumber - 1, movingLineNumber, indentConverter, tabSize); + // if s.startLineNumber - 1 matches onEnter rule, we still honor that. + if (movingLineMatchResult !== null) { + let oldIndentation = strings.getLeadingWhitespace(model.getLineContent(movingLineNumber)); + let newSpaceCnt = movingLineMatchResult + IndentUtil.getSpaceCnt(oldIndentation, tabSize); + let newIndentation = IndentUtil.generateIndent(newSpaceCnt, tabSize, insertSpaces); + insertingText = newIndentation + this.trimLeft(movingLineText); + } else { + // no enter rule matches, let's check indentatin rules then. + virtualModel.getLineContent = (lineNumber) => { + if (lineNumber === s.startLineNumber) { + return model.getLineContent(movingLineNumber); + } else { + return model.getLineContent(lineNumber); + } + }; + let indentOfMovingLine = LanguageConfigurationRegistry.getGoodIndentForLine(virtualModel, model.getLanguageIdAtPosition( + movingLineNumber, 1), s.startLineNumber, indentConverter); + if (indentOfMovingLine !== null) { + let oldIndentation = strings.getLeadingWhitespace(model.getLineContent(movingLineNumber)); + let newSpaceCnt = IndentUtil.getSpaceCnt(indentOfMovingLine, tabSize); + let oldSpaceCnt = IndentUtil.getSpaceCnt(oldIndentation, tabSize); + if (newSpaceCnt !== oldSpaceCnt) { + let newIndentation = IndentUtil.generateIndent(newSpaceCnt, tabSize, insertSpaces); + insertingText = newIndentation + this.trimLeft(movingLineText); + } + } + } + + // add edit operations for moving line first to make sure it's executed after we make indentation change + // to s.startLineNumber + builder.addEditOperation(new Range(s.startLineNumber, 1, s.startLineNumber, 1), insertingText + '\n'); + + let ret = this.matchEnterRule(model, s.endLineNumber + 1, s.startLineNumber, indentConverter, tabSize); + // check if the line being moved before matches onEnter rules, if so let's adjust the indentation by onEnter rules. + if (ret !== null) { + if (ret !== 0) { + this.getIndentEditsOfMovingBlock(model, builder, s, tabSize, insertSpaces, ret); + } + } else { + // it doesn't match onEnter rules, let's check indentation rules then. + virtualModel.getLineContent = (lineNumber) => { + if (lineNumber === s.startLineNumber) { + return insertingText; + } else if (lineNumber >= s.startLineNumber + 1 && lineNumber <= s.endLineNumber + 1) { + return model.getLineContent(lineNumber - 1); + } else { + return model.getLineContent(lineNumber); + } + }; + + let newIndentatOfMovingBlock = LanguageConfigurationRegistry.getGoodIndentForLine(virtualModel, model.getLanguageIdAtPosition( + movingLineNumber, 1), s.startLineNumber + 1, indentConverter); + + if (newIndentatOfMovingBlock !== null) { + const oldIndentation = strings.getLeadingWhitespace(model.getLineContent(s.startLineNumber)); + const newSpaceCnt = IndentUtil.getSpaceCnt(newIndentatOfMovingBlock, tabSize); + const oldSpaceCnt = IndentUtil.getSpaceCnt(oldIndentation, tabSize); + if (newSpaceCnt !== oldSpaceCnt) { + const spaceCntOffset = newSpaceCnt - oldSpaceCnt; + + this.getIndentEditsOfMovingBlock(model, builder, s, tabSize, insertSpaces, spaceCntOffset); + } + } + } + } else { + // Insert line that needs to be moved before + builder.addEditOperation(new Range(s.startLineNumber, 1, s.startLineNumber, 1), insertingText + '\n'); + } } else { movingLineNumber = s.startLineNumber - 1; movingLineText = model.getLineContent(movingLineNumber); @@ -82,12 +177,158 @@ export class MoveLinesCommand implements ICommand { // Insert line that needs to be moved after builder.addEditOperation(new Range(s.endLineNumber, model.getLineMaxColumn(s.endLineNumber), s.endLineNumber, model.getLineMaxColumn(s.endLineNumber)), '\n' + movingLineText); + + if (this.isAutoIndent(model, s)) { + virtualModel.getLineContent = (lineNumber: number) => { + if (lineNumber === movingLineNumber) { + return model.getLineContent(s.startLineNumber); + } else { + return model.getLineContent(lineNumber); + } + }; + + let ret = this.matchEnterRule(model, s.startLineNumber - 2, s.startLineNumber, indentConverter, tabSize); + // check if s.startLineNumber - 2 matches onEnter rules, if so adjust the moving block by onEnter rules. + if (ret !== null) { + if (ret !== 0) { + this.getIndentEditsOfMovingBlock(model, builder, s, tabSize, insertSpaces, ret); + } + } else { + // it doesn't match any onEnter rule, let's check indentation rules then. + let indentOfFirstLine = LanguageConfigurationRegistry.getGoodIndentForLine(virtualModel, model.getLanguageIdAtPosition(s.startLineNumber, 1), movingLineNumber, indentConverter); + if (indentOfFirstLine !== null) { + // adjust the indentation of the moving block + let oldIndent = strings.getLeadingWhitespace(model.getLineContent(s.startLineNumber)); + let newSpaceCnt = IndentUtil.getSpaceCnt(indentOfFirstLine, tabSize); + let oldSpaceCnt = IndentUtil.getSpaceCnt(oldIndent, tabSize); + if (newSpaceCnt !== oldSpaceCnt) { + let spaceCntOffset = newSpaceCnt - oldSpaceCnt; + + this.getIndentEditsOfMovingBlock(model, builder, s, tabSize, insertSpaces, spaceCntOffset); + } + } + } + } } } this._selectionId = builder.trackSelection(s); } + private buildIndentConverter(tabSize: number): IIndentConverter { + return { + shiftIndent: (indentation) => { + let desiredIndentCount = ShiftCommand.shiftIndentCount(indentation, indentation.length + 1, tabSize); + let newIndentation = ''; + for (let i = 0; i < desiredIndentCount; i++) { + newIndentation += '\t'; + } + + return newIndentation; + }, + unshiftIndent: (indentation) => { + let desiredIndentCount = ShiftCommand.unshiftIndentCount(indentation, indentation.length + 1, tabSize); + let newIndentation = ''; + for (let i = 0; i < desiredIndentCount; i++) { + newIndentation += '\t'; + } + + return newIndentation; + } + }; + } + + private matchEnterRule(model: ITokenizedModel, oneLineAbove: number, line: number, indentConverter: IIndentConverter, tabSize: number) { + while (oneLineAbove >= 1) { + // ship empty lines as empty lines just inherit indentation + let lineContent = model.getLineContent(oneLineAbove); + let nonWhitespaceIdx = strings.lastNonWhitespaceIndex(lineContent); + if (nonWhitespaceIdx >= 0) { + break; + } + oneLineAbove--; + } + + if (oneLineAbove < 1 || line > model.getLineCount()) { + return null; + } + + let maxColumn = model.getLineMaxColumn(oneLineAbove); + let enter = LanguageConfigurationRegistry.getEnterAction(model, new Range(oneLineAbove, maxColumn, oneLineAbove, maxColumn)); + + if (enter) { + let enterPrefix = enter.indentation; + let enterAction = enter.enterAction; + + if (enterAction.indentAction === IndentAction.None) { + enterPrefix = enter.indentation + enterAction.appendText; + } else if (enterAction.indentAction === IndentAction.Indent) { + enterPrefix = enter.indentation + enterAction.appendText; + } else if (enterAction.indentAction === IndentAction.IndentOutdent) { + enterPrefix = enter.indentation; + } else if (enterAction.indentAction === IndentAction.Outdent) { + enterPrefix = indentConverter.unshiftIndent(enter.indentation) + enterAction.appendText; + } + let movingLineText = model.getLineContent(line); + if (this.trimLeft(movingLineText).indexOf(this.trimLeft(enterPrefix)) >= 0) { + let oldIndentation = strings.getLeadingWhitespace(model.getLineContent(line)); + let newIndentation = strings.getLeadingWhitespace(enterPrefix); + let indentMetadataOfMovelingLine = LanguageConfigurationRegistry.getIndentMetadata(model, line); + if (indentMetadataOfMovelingLine & IndentConsts.DECREASE_MASK) { + newIndentation = indentConverter.unshiftIndent(newIndentation); + } + let newSpaceCnt = IndentUtil.getSpaceCnt(newIndentation, tabSize); + let oldSpaceCnt = IndentUtil.getSpaceCnt(oldIndentation, tabSize); + return newSpaceCnt - oldSpaceCnt; + } + } + + return null; + } + + private trimLeft(str: string) { + return str.replace(/^\s+/, ''); + } + + private isAutoIndent(model: ITokenizedModel, selection: Selection) { + if (!this._autoIndent) { + return false; + } + let languageAtSelectionStart = model.getLanguageIdAtPosition(selection.startLineNumber, 1); + let languageAtSelectionEnd = model.getLanguageIdAtPosition(selection.endLineNumber, 1); + + if (languageAtSelectionStart !== languageAtSelectionEnd) { + return false; + } + + if (LanguageConfigurationRegistry.getIndentRulesSupport(languageAtSelectionStart) === null) { + return false; + } + + return true; + } + + private getIndentEditsOfMovingBlock(model: ITokenizedModel, builder: IEditOperationBuilder, s: Selection, tabSize: number, insertSpaces: boolean, offset: number) { + for (let i = s.startLineNumber; i <= s.endLineNumber; i++) { + let lineContent = model.getLineContent(i); + let originalIndent = strings.getLeadingWhitespace(lineContent); + let originalSpacesCnt = IndentUtil.getSpaceCnt(originalIndent, tabSize); + let newSpacesCnt = originalSpacesCnt + offset; + let newIndent = IndentUtil.generateIndent(newSpacesCnt, tabSize, insertSpaces); + + if (newIndent !== originalIndent) { + builder.addEditOperation(new Range(i, 1, i, originalIndent.length + 1), newIndent); + + if (i === s.endLineNumber && s.endColumn <= originalIndent.length + 1 && newIndent === '') { + // as users select part of the original indent white spaces + // when we adjust the indentation of endLine, we should adjust the cursor position as well. + this._moveEndLineSelectionShrink = true; + } + } + + } + } + public computeCursorState(model: ITokenizedModel, helper: ICursorStateComputerData): Selection { var result = helper.getTrackedSelection(this._selectionId); @@ -95,6 +336,10 @@ export class MoveLinesCommand implements ICommand { result = result.setEndPosition(result.endLineNumber + 1, 1); } + if (this._moveEndLineSelectionShrink && result.startLineNumber < result.endLineNumber) { + result = result.setEndPosition(result.endLineNumber, 2); + } + return result; } } diff --git a/src/vs/editor/contrib/linesOperations/test/common/linesOperations.test.ts b/src/vs/editor/contrib/linesOperations/test/common/linesOperations.test.ts index 0239d6ee087a6..64c67e2cb9ae3 100644 --- a/src/vs/editor/contrib/linesOperations/test/common/linesOperations.test.ts +++ b/src/vs/editor/contrib/linesOperations/test/common/linesOperations.test.ts @@ -6,9 +6,13 @@ import * as assert from 'assert'; import { Selection } from 'vs/editor/common/core/selection'; -import { Handler } from 'vs/editor/common/editorCommon'; +import { Position } from 'vs/editor/common/core/position'; +import { Handler, IModel, DefaultEndOfLine } from 'vs/editor/common/editorCommon'; import { withMockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; -import { DeleteAllLeftAction, JoinLinesAction, TransposeAction, UpperCaseAction, LowerCaseAction, DeleteAllRightAction } from 'vs/editor/contrib/linesOperations/common/linesOperations'; +import { DeleteAllLeftAction, JoinLinesAction, TransposeAction, UpperCaseAction, LowerCaseAction, DeleteAllRightAction, InsertLineBeforeAction, InsertLineAfterAction, IndentLinesAction } from 'vs/editor/contrib/linesOperations/common/linesOperations'; +import { Cursor } from 'vs/editor/common/controller/cursor'; +import { Model } from 'vs/editor/common/model/model'; +import { CoreEditingCommands } from 'vs/editor/common/controller/coreCommands'; suite('Editor Contrib - Line Operations', () => { suite('DeleteAllLeftAction', () => { @@ -474,13 +478,13 @@ suite('Editor Contrib - Line Operations', () => { new Selection(2, 4, 2, 4) ]); - cursor.trigger('tests', Handler.Undo, {}); + editor.trigger('tests', Handler.Undo, {}); assert.deepEqual(editor.getSelections(), [ new Selection(1, 3, 1, 3), new Selection(1, 6, 1, 6), new Selection(3, 4, 3, 4) ]); - cursor.trigger('tests', Handler.Redo, {}); + editor.trigger('tests', Handler.Redo, {}); assert.deepEqual(editor.getSelections(), [ new Selection(1, 3, 1, 3), new Selection(2, 4, 2, 4) @@ -488,4 +492,116 @@ suite('Editor Contrib - Line Operations', () => { }); }); }); -}); \ No newline at end of file + + test('InsertLineBeforeAction', function () { + function testInsertLineBefore(lineNumber: number, column: number, callback: (model: IModel, cursor: Cursor) => void): void { + const TEXT = [ + 'First line', + 'Second line', + 'Third line' + ]; + withMockCodeEditor(TEXT, {}, (editor, cursor) => { + editor.setPosition(new Position(lineNumber, column)); + let insertLineBeforeAction = new InsertLineBeforeAction(); + + insertLineBeforeAction.run(null, editor); + callback(editor.getModel(), cursor); + }); + } + + testInsertLineBefore(1, 3, (model, cursor) => { + assert.deepEqual(cursor.getSelection(), new Selection(1, 1, 1, 1)); + assert.equal(model.getLineContent(1), ''); + assert.equal(model.getLineContent(2), 'First line'); + assert.equal(model.getLineContent(3), 'Second line'); + assert.equal(model.getLineContent(4), 'Third line'); + }); + + testInsertLineBefore(2, 3, (model, cursor) => { + assert.deepEqual(cursor.getSelection(), new Selection(2, 1, 2, 1)); + assert.equal(model.getLineContent(1), 'First line'); + assert.equal(model.getLineContent(2), ''); + assert.equal(model.getLineContent(3), 'Second line'); + assert.equal(model.getLineContent(4), 'Third line'); + }); + + testInsertLineBefore(3, 3, (model, cursor) => { + assert.deepEqual(cursor.getSelection(), new Selection(3, 1, 3, 1)); + assert.equal(model.getLineContent(1), 'First line'); + assert.equal(model.getLineContent(2), 'Second line'); + assert.equal(model.getLineContent(3), ''); + assert.equal(model.getLineContent(4), 'Third line'); + }); + }); + + test('InsertLineAfterAction', () => { + function testInsertLineAfter(lineNumber: number, column: number, callback: (model: IModel, cursor: Cursor) => void): void { + const TEXT = [ + 'First line', + 'Second line', + 'Third line' + ]; + withMockCodeEditor(TEXT, {}, (editor, cursor) => { + editor.setPosition(new Position(lineNumber, column)); + let insertLineAfterAction = new InsertLineAfterAction(); + + insertLineAfterAction.run(null, editor); + callback(editor.getModel(), cursor); + }); + } + + testInsertLineAfter(1, 3, (model, cursor) => { + assert.deepEqual(cursor.getSelection(), new Selection(2, 1, 2, 1)); + assert.equal(model.getLineContent(1), 'First line'); + assert.equal(model.getLineContent(2), ''); + assert.equal(model.getLineContent(3), 'Second line'); + assert.equal(model.getLineContent(4), 'Third line'); + }); + + testInsertLineAfter(2, 3, (model, cursor) => { + assert.deepEqual(cursor.getSelection(), new Selection(3, 1, 3, 1)); + assert.equal(model.getLineContent(1), 'First line'); + assert.equal(model.getLineContent(2), 'Second line'); + assert.equal(model.getLineContent(3), ''); + assert.equal(model.getLineContent(4), 'Third line'); + }); + + testInsertLineAfter(3, 3, (model, cursor) => { + assert.deepEqual(cursor.getSelection(), new Selection(4, 1, 4, 1)); + assert.equal(model.getLineContent(1), 'First line'); + assert.equal(model.getLineContent(2), 'Second line'); + assert.equal(model.getLineContent(3), 'Third line'); + assert.equal(model.getLineContent(4), ''); + }); + }); + + test('Bug 18276:[editor] Indentation broken when selection is empty', () => { + + let model = Model.createFromString( + [ + 'function baz() {' + ].join('\n'), + { + defaultEOL: DefaultEndOfLine.LF, + detectIndentation: false, + insertSpaces: false, + tabSize: 4, + trimAutoWhitespace: true + } + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { + let indentLinesAction = new IndentLinesAction(); + editor.setPosition(new Position(1, 2)); + + indentLinesAction.run(null, editor); + assert.equal(model.getLineContent(1), '\tfunction baz() {'); + assert.deepEqual(editor.getSelection(), new Selection(1, 3, 1, 3)); + + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); + assert.equal(model.getLineContent(1), '\tf\tunction baz() {'); + }); + + model.dispose(); + }); +}); diff --git a/src/vs/editor/contrib/linesOperations/test/common/moveLinesCommand.test.ts b/src/vs/editor/contrib/linesOperations/test/common/moveLinesCommand.test.ts index 429d896276ebb..2959a4d5274f8 100644 --- a/src/vs/editor/contrib/linesOperations/test/common/moveLinesCommand.test.ts +++ b/src/vs/editor/contrib/linesOperations/test/common/moveLinesCommand.test.ts @@ -3,17 +3,28 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ 'use strict'; - import { Selection } from 'vs/editor/common/core/selection'; import { MoveLinesCommand } from 'vs/editor/contrib/linesOperations/common/moveLinesCommand'; import { testCommand } from 'vs/editor/test/common/commands/commandTestUtils'; +import { MockMode } from 'vs/editor/test/common/mocks/mockMode'; +import { LanguageIdentifier } from 'vs/editor/common/modes'; +import { IndentationRule } from 'vs/editor/common/modes/languageConfiguration'; +import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; function testMoveLinesDownCommand(lines: string[], selection: Selection, expectedLines: string[], expectedSelection: Selection): void { - testCommand(lines, null, selection, (sel) => new MoveLinesCommand(sel, true), expectedLines, expectedSelection); + testCommand(lines, null, selection, (sel) => new MoveLinesCommand(sel, true, false), expectedLines, expectedSelection); } function testMoveLinesUpCommand(lines: string[], selection: Selection, expectedLines: string[], expectedSelection: Selection): void { - testCommand(lines, null, selection, (sel) => new MoveLinesCommand(sel, false), expectedLines, expectedSelection); + testCommand(lines, null, selection, (sel) => new MoveLinesCommand(sel, false, false), expectedLines, expectedSelection); +} + +function testMoveLinesDownWithIndentCommand(languageId: LanguageIdentifier, lines: string[], selection: Selection, expectedLines: string[], expectedSelection: Selection): void { + testCommand(lines, languageId, selection, (sel) => new MoveLinesCommand(sel, true, true), expectedLines, expectedSelection); +} + +function testMoveLinesUpWithIndentCommand(languageId: LanguageIdentifier, lines: string[], selection: Selection, expectedLines: string[], expectedSelection: Selection): void { + testCommand(lines, languageId, selection, (sel) => new MoveLinesCommand(sel, false, true), expectedLines, expectedSelection); } suite('Editor Contrib - Move Lines Command', () => { @@ -248,3 +259,95 @@ suite('Editor Contrib - Move Lines Command', () => { }); }); +class IndentRulesMode extends MockMode { + private static _id = new LanguageIdentifier('moveLinesIndentMode', 7); + constructor(indentationRules: IndentationRule) { + super(IndentRulesMode._id); + this._register(LanguageConfigurationRegistry.register(this.getLanguageIdentifier(), { + indentationRules: indentationRules + })); + } +} + +suite('Editor contrib - Move Lines Command honors Indentation Rules', () => { + let indentRules = { + decreaseIndentPattern: /^\s*((?!\S.*\/[*]).*[*]\/\s*)?[})\]]|^\s*(case\b.*|default):\s*(\/\/.*|\/[*].*[*]\/\s*)?$/, + increaseIndentPattern: /(\{[^}"'`]*|\([^)"']*|\[[^\]"']*|^\s*(\{\}|\(\)|\[\]|(case\b.*|default):))\s*(\/\/.*|\/[*].*[*]\/\s*)?$/, + indentNextLinePattern: /^\s*(for|while|if|else)\b(?!.*[;{}]\s*(\/\/.*|\/[*].*[*]\/\s*)?$)/, + unIndentedLinePattern: /^(?!.*([;{}]|\S:)\s*(\/\/.*|\/[*].*[*]\/\s*)?$)(?!.*(\{[^}"']*|\([^)"']*|\[[^\]"']*|^\s*(\{\}|\(\)|\[\]|(case\b.*|default):))\s*(\/\/.*|\/[*].*[*]\/\s*)?$)(?!^\s*((?!\S.*\/[*]).*[*]\/\s*)?[})\]]|^\s*(case\b.*|default):\s*(\/\/.*|\/[*].*[*]\/\s*)?$)(?!^\s*(for|while|if|else)\b(?!.*[;{}]\s*(\/\/.*|\/[*].*[*]\/\s*)?$))/ + }; + + // https://github.com/Microsoft/vscode/issues/28552#issuecomment-307862797 + test('first line indentation adjust to 0', () => { + let mode = new IndentRulesMode(indentRules); + + testMoveLinesUpWithIndentCommand( + mode.getLanguageIdentifier(), + [ + 'class X {', + '\tz = 2', + '}' + ], + new Selection(2, 1, 2, 1), + [ + 'z = 2', + 'class X {', + '}' + ], + new Selection(1, 1, 1, 1) + ); + + mode.dispose(); + }); + + // https://github.com/Microsoft/vscode/issues/28552#issuecomment-307867717 + test('move lines across block', () => { + let mode = new IndentRulesMode(indentRules); + + testMoveLinesDownWithIndentCommand( + mode.getLanguageIdentifier(), + [ + 'const value = 2;', + 'const standardLanguageDescriptions = [', + ' {', + ' diagnosticSource: \'js\',', + ' }', + '];' + ], + new Selection(1, 1, 1, 1), + [ + 'const standardLanguageDescriptions = [', + ' const value = 2;', + ' {', + ' diagnosticSource: \'js\',', + ' }', + '];' + ], + new Selection(2, 5, 2, 5) + ); + + mode.dispose(); + }); + + test('move line should still work as before if there is no indentation rules', () => { + testMoveLinesUpWithIndentCommand( + null, + [ + 'if (true) {', + ' var task = new Task(() => {', + ' var work = 1234;', + ' });', + '}' + ], + new Selection(3, 1, 3, 1), + [ + 'if (true) {', + ' var work = 1234;', + ' var task = new Task(() => {', + ' });', + '}' + ], + new Selection(2, 1, 2, 1) + ); + }); +}); \ No newline at end of file diff --git a/src/vs/editor/contrib/links/browser/links.ts b/src/vs/editor/contrib/links/browser/links.ts index 1c2e90ff97a37..e3ab8e404c8e3 100644 --- a/src/vs/editor/contrib/links/browser/links.ts +++ b/src/vs/editor/contrib/links/browser/links.ts @@ -8,28 +8,59 @@ import 'vs/css!./links'; import * as nls from 'vs/nls'; import { onUnexpectedError } from 'vs/base/common/errors'; -import { KeyCode } from 'vs/base/common/keyCodes'; import * as platform from 'vs/base/common/platform'; import Severity from 'vs/base/common/severity'; import { TPromise } from 'vs/base/common/winjs.base'; -import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { IMessageService } from 'vs/platform/message/common/message'; import { IOpenerService } from 'vs/platform/opener/common/opener'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { editorAction, ServicesAccessor, EditorAction } from 'vs/editor/common/editorCommonExtensions'; import { LinkProviderRegistry } from 'vs/editor/common/modes'; import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService'; -import { IEditorMouseEvent, ICodeEditor, MouseTargetType } from 'vs/editor/browser/editorBrowser'; +import { ICodeEditor, MouseTargetType } from 'vs/editor/browser/editorBrowser'; import { getLinks, Link } from 'vs/editor/contrib/links/common/links'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -import { editorLinkForeground, editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; +import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; import { Position } from 'vs/editor/common/core/position'; - -class LinkOccurence { - - public static decoration(link: Link): editorCommon.IModelDeltaDecoration { +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; +import { ClickLinkGesture, ClickLinkMouseEvent, ClickLinkKeyboardEvent } from 'vs/editor/contrib/goToDeclaration/browser/clickLinkGesture'; + +const HOVER_MESSAGE_GENERAL_META = ( + platform.isMacintosh + ? nls.localize('links.navigate.mac', "Cmd + click to follow link") + : nls.localize('links.navigate', "Ctrl + click to follow link") +); + +const HOVER_MESSAGE_GENERAL_ALT = nls.localize('links.navigate.al', "Alt + click to follow link"); + +const decoration = { + meta: ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + inlineClassName: 'detected-link', + hoverMessage: HOVER_MESSAGE_GENERAL_META + }), + metaActive: ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + inlineClassName: 'detected-link-active', + hoverMessage: HOVER_MESSAGE_GENERAL_META + }), + alt: ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + inlineClassName: 'detected-link', + hoverMessage: HOVER_MESSAGE_GENERAL_ALT + }), + altActive: ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + inlineClassName: 'detected-link-active', + hoverMessage: HOVER_MESSAGE_GENERAL_ALT + }), +}; + +class LinkOccurrence { + + public static decoration(link: Link, useMetaKey: boolean): editorCommon.IModelDeltaDecoration { return { range: { startLineNumber: link.range.startLineNumber, @@ -37,40 +68,31 @@ class LinkOccurence { endLineNumber: link.range.endLineNumber, endColumn: link.range.endColumn }, - options: LinkOccurence._getOptions(link, false) + options: LinkOccurrence._getOptions(useMetaKey, false) }; } - private static _getOptions(link: Link, isActive: boolean): editorCommon.IModelDecorationOptions { - var result = ''; - - if (isActive) { - result += LinkDetector.CLASS_NAME_ACTIVE; - } else { - result += LinkDetector.CLASS_NAME; + private static _getOptions(useMetaKey: boolean, isActive: boolean): ModelDecorationOptions { + if (useMetaKey) { + return (isActive ? decoration.metaActive : decoration.meta); } - - return { - stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, - inlineClassName: result, - hoverMessage: LinkDetector.HOVER_MESSAGE_GENERAL - }; + return (isActive ? decoration.altActive : decoration.alt); } public decorationId: string; public link: Link; - constructor(link: Link, decorationId: string/*, changeAccessor:editorCommon.IModelDecorationsChangeAccessor*/) { + constructor(link: Link, decorationId: string) { this.link = link; this.decorationId = decorationId; } - public activate(changeAccessor: editorCommon.IModelDecorationsChangeAccessor): void { - changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurence._getOptions(this.link, true)); + public activate(changeAccessor: editorCommon.IModelDecorationsChangeAccessor, useMetaKey: boolean): void { + changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurrence._getOptions(useMetaKey, true)); } - public deactivate(changeAccessor: editorCommon.IModelDecorationsChangeAccessor): void { - changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurence._getOptions(this.link, false)); + public deactivate(changeAccessor: editorCommon.IModelDecorationsChangeAccessor, useMetaKey: boolean): void { + changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurrence._getOptions(useMetaKey, false)); } } @@ -84,22 +106,17 @@ class LinkDetector implements editorCommon.IEditorContribution { } static RECOMPUTE_TIME = 1000; // ms - static TRIGGER_KEY_VALUE = platform.isMacintosh ? KeyCode.Meta : KeyCode.Ctrl; - static TRIGGER_MODIFIER = platform.isMacintosh ? 'metaKey' : 'ctrlKey'; - static HOVER_MESSAGE_GENERAL = platform.isMacintosh ? nls.localize('links.navigate.mac', "Cmd + click to follow link") : nls.localize('links.navigate', "Ctrl + click to follow link"); - static CLASS_NAME = 'detected-link'; - static CLASS_NAME_ACTIVE = 'detected-link-active'; private editor: ICodeEditor; + private enabled: boolean; private listenersToRemove: IDisposable[]; private timeoutPromise: TPromise; private computePromise: TPromise; private activeLinkDecorationId: string; - private lastMouseEvent: IEditorMouseEvent; private openerService: IOpenerService; private messageService: IMessageService; private editorWorkerService: IEditorWorkerService; - private currentOccurences: { [decorationId: string]: LinkOccurence; }; + private currentOccurrences: { [decorationId: string]: LinkOccurrence; }; constructor( editor: ICodeEditor, @@ -112,17 +129,45 @@ class LinkDetector implements editorCommon.IEditorContribution { this.messageService = messageService; this.editorWorkerService = editorWorkerService; this.listenersToRemove = []; + + let clickLinkGesture = new ClickLinkGesture(editor); + this.listenersToRemove.push(clickLinkGesture); + this.listenersToRemove.push(clickLinkGesture.onMouseMoveOrRelevantKeyDown(([mouseEvent, keyboardEvent]) => { + this._onEditorMouseMove(mouseEvent, keyboardEvent); + })); + this.listenersToRemove.push(clickLinkGesture.onExecute((e) => { + this.onEditorMouseUp(e); + })); + this.listenersToRemove.push(clickLinkGesture.onCancel((e) => { + this.cleanUpActiveLinkDecoration(); + })); + + this.enabled = editor.getConfiguration().contribInfo.links; + this.listenersToRemove.push(editor.onDidChangeConfiguration((e) => { + let enabled = editor.getConfiguration().contribInfo.links; + if (this.enabled === enabled) { + // No change in our configuration option + return; + } + this.enabled = enabled; + + // Remove any links (for the getting disabled case) + this.updateDecorations([]); + + // Stop any computation (for the getting disabled case) + this.stop(); + + // Start computing (for the getting enabled case) + this.beginCompute(); + })); this.listenersToRemove.push(editor.onDidChangeModelContent((e) => this.onChange())); this.listenersToRemove.push(editor.onDidChangeModel((e) => this.onModelChanged())); this.listenersToRemove.push(editor.onDidChangeModelLanguage((e) => this.onModelModeChanged())); this.listenersToRemove.push(LinkProviderRegistry.onDidChange((e) => this.onModelModeChanged())); - this.listenersToRemove.push(this.editor.onMouseUp((e: IEditorMouseEvent) => this.onEditorMouseUp(e))); - this.listenersToRemove.push(this.editor.onMouseMove((e: IEditorMouseEvent) => this.onEditorMouseMove(e))); - this.listenersToRemove.push(this.editor.onKeyDown((e: IKeyboardEvent) => this.onEditorKeyDown(e))); - this.listenersToRemove.push(this.editor.onKeyUp((e: IKeyboardEvent) => this.onEditorKeyUp(e))); + this.timeoutPromise = null; this.computePromise = null; - this.currentOccurences = {}; + this.currentOccurrences = {}; this.activeLinkDecorationId = null; this.beginCompute(); } @@ -136,8 +181,7 @@ class LinkDetector implements editorCommon.IEditorContribution { } private onModelChanged(): void { - this.lastMouseEvent = null; - this.currentOccurences = {}; + this.currentOccurrences = {}; this.activeLinkDecorationId = null; this.stop(); this.beginCompute(); @@ -159,7 +203,7 @@ class LinkDetector implements editorCommon.IEditorContribution { } private beginCompute(): void { - if (!this.editor.getModel()) { + if (!this.editor.getModel() || !this.enabled) { return; } @@ -174,12 +218,13 @@ class LinkDetector implements editorCommon.IEditorContribution { } private updateDecorations(links: Link[]): void { + const useMetaKey = (this.editor.getConfiguration().multiCursorModifier === 'altKey'); this.editor.changeDecorations((changeAccessor: editorCommon.IModelDecorationsChangeAccessor) => { var oldDecorations: string[] = []; - let keys = Object.keys(this.currentOccurences); + let keys = Object.keys(this.currentOccurrences); for (let i = 0, len = keys.length; i < len; i++) { let decorationId = keys[i]; - let occurance = this.currentOccurences[decorationId]; + let occurance = this.currentOccurrences[decorationId]; oldDecorations.push(occurance.decorationId); } @@ -187,43 +232,30 @@ class LinkDetector implements editorCommon.IEditorContribution { if (links) { // Not sure why this is sometimes null for (var i = 0; i < links.length; i++) { - newDecorations.push(LinkOccurence.decoration(links[i])); + newDecorations.push(LinkOccurrence.decoration(links[i], useMetaKey)); } } var decorations = changeAccessor.deltaDecorations(oldDecorations, newDecorations); - this.currentOccurences = {}; + this.currentOccurrences = {}; this.activeLinkDecorationId = null; for (let i = 0, len = decorations.length; i < len; i++) { - var occurance = new LinkOccurence(links[i], decorations[i]); - this.currentOccurences[occurance.decorationId] = occurance; + var occurance = new LinkOccurrence(links[i], decorations[i]); + this.currentOccurrences[occurance.decorationId] = occurance; } }); } - private onEditorKeyDown(e: IKeyboardEvent): void { - if (e.keyCode === LinkDetector.TRIGGER_KEY_VALUE && this.lastMouseEvent) { - this.onEditorMouseMove(this.lastMouseEvent, e); - } - } - - private onEditorKeyUp(e: IKeyboardEvent): void { - if (e.keyCode === LinkDetector.TRIGGER_KEY_VALUE) { - this.cleanUpActiveLinkDecoration(); - } - } - - private onEditorMouseMove(mouseEvent: IEditorMouseEvent, withKey?: IKeyboardEvent): void { - this.lastMouseEvent = mouseEvent; - + private _onEditorMouseMove(mouseEvent: ClickLinkMouseEvent, withKey?: ClickLinkKeyboardEvent): void { + const useMetaKey = (this.editor.getConfiguration().multiCursorModifier === 'altKey'); if (this.isEnabled(mouseEvent, withKey)) { this.cleanUpActiveLinkDecoration(); // always remove previous link decoration as their can only be one - var occurence = this.getLinkOccurence(mouseEvent.target.position); - if (occurence) { + var occurrence = this.getLinkOccurrence(mouseEvent.target.position); + if (occurrence) { this.editor.changeDecorations((changeAccessor) => { - occurence.activate(changeAccessor); - this.activeLinkDecorationId = occurence.decorationId; + occurrence.activate(changeAccessor, useMetaKey); + this.activeLinkDecorationId = occurrence.decorationId; }); } } else { @@ -232,11 +264,12 @@ class LinkDetector implements editorCommon.IEditorContribution { } private cleanUpActiveLinkDecoration(): void { + const useMetaKey = (this.editor.getConfiguration().multiCursorModifier === 'altKey'); if (this.activeLinkDecorationId) { - var occurence = this.currentOccurences[this.activeLinkDecorationId]; - if (occurence) { + var occurrence = this.currentOccurrences[this.activeLinkDecorationId]; + if (occurrence) { this.editor.changeDecorations((changeAccessor) => { - occurence.deactivate(changeAccessor); + occurrence.deactivate(changeAccessor, useMetaKey); }); } @@ -244,24 +277,24 @@ class LinkDetector implements editorCommon.IEditorContribution { } } - private onEditorMouseUp(mouseEvent: IEditorMouseEvent): void { + private onEditorMouseUp(mouseEvent: ClickLinkMouseEvent): void { if (!this.isEnabled(mouseEvent)) { return; } - var occurence = this.getLinkOccurence(mouseEvent.target.position); - if (!occurence) { + var occurrence = this.getLinkOccurrence(mouseEvent.target.position); + if (!occurrence) { return; } - this.openLinkOccurence(occurence, mouseEvent.event.altKey); + this.openLinkOccurrence(occurrence, mouseEvent.hasSideBySideModifier); } - public openLinkOccurence(occurence: LinkOccurence, openToSide: boolean): void { + public openLinkOccurrence(occurrence: LinkOccurrence, openToSide: boolean): void { if (!this.openerService) { return; } - const { link } = occurence; + const { link } = occurrence; link.resolve().then(uri => { // open the uri @@ -279,7 +312,7 @@ class LinkDetector implements editorCommon.IEditorContribution { }).done(null, onUnexpectedError); } - public getLinkOccurence(position: Position): LinkOccurence { + public getLinkOccurrence(position: Position): LinkOccurrence { var decorations = this.editor.getModel().getDecorationsInRange({ startLineNumber: position.lineNumber, startColumn: position.column, @@ -289,18 +322,20 @@ class LinkDetector implements editorCommon.IEditorContribution { for (var i = 0; i < decorations.length; i++) { var decoration = decorations[i]; - var currentOccurence = this.currentOccurences[decoration.id]; - if (currentOccurence) { - return currentOccurence; + var currentOccurrence = this.currentOccurrences[decoration.id]; + if (currentOccurrence) { + return currentOccurrence; } } return null; } - private isEnabled(mouseEvent: IEditorMouseEvent, withKey?: IKeyboardEvent): boolean { - return mouseEvent.target.type === MouseTargetType.CONTENT_TEXT && - (mouseEvent.event[LinkDetector.TRIGGER_MODIFIER] || (withKey && withKey.keyCode === LinkDetector.TRIGGER_KEY_VALUE)); + private isEnabled(mouseEvent: ClickLinkMouseEvent, withKey?: ClickLinkKeyboardEvent): boolean { + return ( + mouseEvent.target.type === MouseTargetType.CONTENT_TEXT + && (mouseEvent.hasTriggerModifier || (withKey && withKey.keyCodeIsTriggerKey)) + ); } private stop(): void { @@ -338,9 +373,9 @@ class OpenLinkAction extends EditorAction { return; } - let link = linkDetector.getLinkOccurence(editor.getPosition()); + let link = linkDetector.getLinkOccurrence(editor.getPosition()); if (link) { - linkDetector.openLinkOccurence(link, false); + linkDetector.openLinkOccurrence(link, false); } } } @@ -348,10 +383,6 @@ class OpenLinkAction extends EditorAction { registerThemingParticipant((theme, collector) => { let activeLinkForeground = theme.getColor(editorActiveLinkForeground); if (activeLinkForeground) { - collector.addRule(`.monaco-editor.${theme.selector} .detected-link-active { color: ${activeLinkForeground} !important; }`); - } - let linkForeground = theme.getColor(editorLinkForeground); - if (linkForeground) { - collector.addRule(`.monaco-editor.${theme.selector} .detected-link { color: ${linkForeground} !important; }`); + collector.addRule(`.monaco-editor .detected-link-active { color: ${activeLinkForeground} !important; }`); } }); \ No newline at end of file diff --git a/src/vs/editor/contrib/links/common/links.ts b/src/vs/editor/contrib/links/common/links.ts index e466535ed0154..047e094293cba 100644 --- a/src/vs/editor/contrib/links/common/links.ts +++ b/src/vs/editor/contrib/links/common/links.ts @@ -38,7 +38,7 @@ export class Link implements ILink { try { return TPromise.as(URI.parse(this._link.url)); } catch (e) { - return TPromise.wrapError('invalid'); + return TPromise.wrapError(new Error('invalid')); } } @@ -50,11 +50,11 @@ export class Link implements ILink { return this.resolve(); } - return TPromise.wrapError('missing'); + return TPromise.wrapError(new Error('missing')); }); } - return TPromise.wrapError('missing'); + return TPromise.wrapError(new Error('missing')); } } diff --git a/src/vs/editor/contrib/parameterHints/browser/parameterHints.css b/src/vs/editor/contrib/parameterHints/browser/parameterHints.css index dd628db6a5ecc..abb195c2d0b16 100644 --- a/src/vs/editor/contrib/parameterHints/browser/parameterHints.css +++ b/src/vs/editor/contrib/parameterHints/browser/parameterHints.css @@ -5,8 +5,6 @@ .monaco-editor .parameter-hints-widget { z-index: 10; - background-color: #F3F3F3; - border: 1px solid rgb(200, 200, 200); display: flex; flex-direction: column; line-height: 1.5em; @@ -41,20 +39,13 @@ flex-direction: column; } -.monaco-editor .parameter-hints-widget.multiple .body { - border-left: 1px solid rgba(204, 204, 204, 0.5); -} - .monaco-editor .parameter-hints-widget .signature { padding: 4px 5px; } -.monaco-editor .parameter-hints-widget .signature.has-docs { - border-bottom: 1px solid rgba(204, 204, 204, 0.5); -} - .monaco-editor .parameter-hints-widget .docs { padding: 0 10px 0 5px; + white-space: pre-wrap; } .monaco-editor .parameter-hints-widget .buttons { @@ -117,19 +108,7 @@ margin-right: 0.5em; } -/*** VS Dark */ - -.monaco-editor.vs-dark .parameter-hints-widget { - background-color: #2D2D30; - border-color: rgba(85,85,85,0.5); -} - -.monaco-editor.hc-black .parameter-hints-widget .body, -.monaco-editor.vs-dark .parameter-hints-widget .body, -.monaco-editor.hc-black .parameter-hints-widget .signature, -.monaco-editor.vs-dark .parameter-hints-widget .signature { - border-color: rgba(85,85,85,0.5); -} +/*** VS Dark & High Contrast*/ .monaco-editor.hc-black .parameter-hints-widget .button.previous, .monaco-editor.vs-dark .parameter-hints-widget .button.previous { @@ -139,11 +118,4 @@ .monaco-editor.hc-black .parameter-hints-widget .button.next, .monaco-editor.vs-dark .parameter-hints-widget .button.next { background-image: url('arrow-down-dark.svg'); -} - -/*** High Contrast */ - -.monaco-editor.hc-black .parameter-hints-widget { - background-color: #0C141F; - border: 2px solid #6FC3DF; } \ No newline at end of file diff --git a/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts b/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts index fd8a795287065..d5ee521195b57 100644 --- a/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts +++ b/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts @@ -24,6 +24,8 @@ import { DomScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableEle import { CharacterSet } from 'vs/editor/common/core/characterClassifier'; import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; import { ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; +import { registerThemingParticipant, HIGH_CONTRAST } from 'vs/platform/theme/common/themeService'; +import { editorHoverBackground, editorHoverBorder } from 'vs/platform/theme/common/colorRegistry'; const $ = dom.$; @@ -79,7 +81,7 @@ export class ParameterHintsModel extends Disposable { } trigger(delay = ParameterHintsModel.DELAY): void { - if (!this.enabled || !SignatureHelpProviderRegistry.has(this.editor.getModel())) { + if (!SignatureHelpProviderRegistry.has(this.editor.getModel())) { return; } @@ -130,8 +132,11 @@ export class ParameterHintsModel extends Disposable { } this.triggerCharactersListeners.push(this.editor.onDidType((text: string) => { - let lastCharCode = text.charCodeAt(text.length - 1); - if (triggerChars.has(lastCharCode)) { + if (!this.enabled) { + return; + } + + if (triggerChars.has(text.charCodeAt(text.length - 1))) { this.trigger(); } })); @@ -219,7 +224,7 @@ export class ParameterHintsWidget implements IContentWidget, IDisposable { this.overloads = dom.append(wrapper, $('.overloads')); const body = $('.body'); - this.scrollbar = new DomScrollableElement(body, { canUseTranslate3d: false }); + this.scrollbar = new DomScrollableElement(body, {}); this.disposables.push(this.scrollbar); wrapper.appendChild(this.scrollbar.getDomNode()); @@ -471,4 +476,19 @@ export class ParameterHintsWidget implements IContentWidget, IDisposable { this.disposables = dispose(this.disposables); this.model = null; } -} \ No newline at end of file +} + +registerThemingParticipant((theme, collector) => { + let border = theme.getColor(editorHoverBorder); + if (border) { + let borderWidth = theme.type === HIGH_CONTRAST ? 2 : 1; + collector.addRule(`.monaco-editor .parameter-hints-widget { border: ${borderWidth}px solid ${border}; }`); + collector.addRule(`.monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid ${border.transparent(0.5)}; }`); + collector.addRule(`.monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid ${border.transparent(0.5)}; }`); + + } + let background = theme.getColor(editorHoverBackground); + if (background) { + collector.addRule(`.monaco-editor .parameter-hints-widget { background-color: ${background}; }`); + } +}); \ No newline at end of file diff --git a/src/vs/editor/contrib/quickFix/browser/lightBulbWidget.ts b/src/vs/editor/contrib/quickFix/browser/lightBulbWidget.ts index f0946cd792931..c1bde40b2d762 100644 --- a/src/vs/editor/contrib/quickFix/browser/lightBulbWidget.ts +++ b/src/vs/editor/contrib/quickFix/browser/lightBulbWidget.ts @@ -18,7 +18,7 @@ export class LightBulbWidget implements IDisposable { private readonly _options = { stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, glyphMarginClassName: 'lightbulb-glyph', - glyphMarginHoverMessage: undefined + glyphMarginHoverMessage: undefined }; private readonly _editor: ICodeEditor; diff --git a/src/vs/editor/contrib/quickOpen/common/quickOpen.ts b/src/vs/editor/contrib/quickOpen/common/quickOpen.ts index 1fc1f9fd5e6a7..dfe5d8adbc429 100644 --- a/src/vs/editor/contrib/quickOpen/common/quickOpen.ts +++ b/src/vs/editor/contrib/quickOpen/common/quickOpen.ts @@ -11,14 +11,10 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { Range } from 'vs/editor/common/core/range'; import { IModel } from 'vs/editor/common/editorCommon'; import { CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; -import { SymbolInformation, DocumentSymbolProviderRegistry } from 'vs/editor/common/modes'; +import { SymbolInformation, DocumentSymbolProviderRegistry, IOutline } from 'vs/editor/common/modes'; import { IModelService } from 'vs/editor/common/services/modelService'; import { asWinJsPromise } from 'vs/base/common/async'; -export interface IOutline { - entries: SymbolInformation[]; -} - export function getDocumentSymbols(model: IModel): TPromise { let entries: SymbolInformation[] = []; diff --git a/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.ts b/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.ts index 3adcedc0662d9..805cdb2bddc4b 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.ts @@ -5,7 +5,6 @@ 'use strict'; import * as nls from 'vs/nls'; -import { alert } from 'vs/base/browser/ui/aria/aria'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; @@ -85,11 +84,7 @@ export class ReferenceAction extends EditorAction { } let range = editor.getSelection(); let model = editor.getModel(); - let references = provideReferences(model, range.getStartPosition()).then(references => { - const model = new ReferencesModel(references); - alert(model.getAriaMessage()); - return model; - }); + let references = provideReferences(model, range.getStartPosition()).then(references => new ReferencesModel(references)); controller.toggleWidget(range, references, defaultReferenceSearchOptions); } } @@ -163,8 +158,8 @@ CommandsRegistry.registerCommand('editor.action.showReferences', { } }); -function closeActiveReferenceSearch(accessor, args) { - var outerEditor = getOuterEditor(accessor, args); +function closeActiveReferenceSearch(accessor: ServicesAccessor, args: any) { + var outerEditor = getOuterEditor(accessor); if (!outerEditor) { return; } diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesController.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesController.ts index d4bff8009dddc..fb51daaa48fbf 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesController.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesController.ts @@ -25,9 +25,10 @@ import { IPeekViewService } from 'vs/editor/contrib/zoneWidget/browser/peekViewW import { ReferencesModel, OneReference } from './referencesModel'; import { ReferenceWidget, LayoutData } from './referencesWidget'; import { Range } from 'vs/editor/common/core/range'; -import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; +import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { Position } from 'vs/editor/common/core/position'; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; export const ctxReferenceSearchVisible = new RawContextKey('referenceSearchVisible', false); @@ -58,7 +59,7 @@ export class ReferencesController implements editorCommon.IEditorContribution { editor: ICodeEditor, @IContextKeyService contextKeyService: IContextKeyService, @IEditorService private _editorService: IEditorService, - @ITextModelResolverService private _textModelResolverService, + @ITextModelService private _textModelResolverService: ITextModelService, @ITelemetryService private _telemetryService: ITelemetryService, @IMessageService private _messageService: IMessageService, @IInstantiationService private _instantiationService: IInstantiationService, @@ -66,7 +67,8 @@ export class ReferencesController implements editorCommon.IEditorContribution { @IStorageService private _storageService: IStorageService, @IThemeService private _themeService: IThemeService, @IConfigurationService private _configurationService: IConfigurationService, - @optional(IPeekViewService) private _peekViewService: IPeekViewService + @optional(IPeekViewService) private _peekViewService: IPeekViewService, + @optional(IEnvironmentService) private _environmentService: IEnvironmentService ) { this._editor = editor; this._referenceSearchVisible = ctxReferenceSearchVisible.bindTo(contextKeyService); @@ -107,7 +109,7 @@ export class ReferencesController implements editorCommon.IEditorContribution { })); const storageKey = 'peekViewLayout'; const data = JSON.parse(this._storageService.get(storageKey, undefined, '{}')); - this._widget = new ReferenceWidget(this._editor, data, this._textModelResolverService, this._contextService, this._themeService, this._instantiationService); + this._widget = new ReferenceWidget(this._editor, data, this._textModelResolverService, this._contextService, this._themeService, this._instantiationService, this._environmentService); this._widget.setTitle(nls.localize('labelLoading', "Loading...")); this._widget.show(range); this._disposables.push(this._widget.onDidClose(() => { @@ -189,10 +191,11 @@ export class ReferencesController implements editorCommon.IEditorContribution { }); const onDone = stopwatch(fromPromise(promise)); + const mode = this._editor.getModel().getLanguageIdentifier().language; onDone(duration => this._telemetryService.publicLog('findReferences', { duration, - mode: this._editor.getModel().getLanguageIdentifier().language + mode })); } diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesModel.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesModel.ts index b0660173eb5c6..06821595584e1 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesModel.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesModel.ts @@ -15,7 +15,7 @@ import { defaultGenerator } from 'vs/base/common/idGenerator'; import { TPromise } from 'vs/base/common/winjs.base'; import { Range, IRange } from 'vs/editor/common/core/range'; import { Location } from 'vs/editor/common/modes'; -import { ITextModelResolverService, ITextEditorModel } from 'vs/editor/common/services/resolverService'; +import { ITextModelService, ITextEditorModel } from 'vs/editor/common/services/resolverService'; import { Position } from 'vs/editor/common/core/position'; export class OneReference { @@ -66,7 +66,7 @@ export class OneReference { public getAriaMessage(): string { return localize( 'aria.oneReference', "symbol in {0} on line {1} at column {2}", - this.uri.fsPath, this.range.startLineNumber, this.range.startColumn + basename(this.uri.fsPath), this.range.startLineNumber, this.range.startColumn ); } } @@ -154,13 +154,13 @@ export class FileReferences implements IDisposable { getAriaMessage(): string { const len = this.children.length; if (len === 1) { - return localize('aria.fileReferences.1', "1 symbol in {0}", this.uri.fsPath); + return localize('aria.fileReferences.1', "1 symbol in {0}, full path {1}", basename(this.uri.fsPath), this.uri.fsPath); } else { - return localize('aria.fileReferences.N', "{0} symbols in {1}", len, this.uri.fsPath); + return localize('aria.fileReferences.N', "{0} symbols in {1}, full path {2}", len, basename(this.uri.fsPath), this.uri.fsPath); } } - public resolve(textModelResolverService: ITextModelResolverService): TPromise { + public resolve(textModelResolverService: ITextModelService): TPromise { if (this._resolved) { return TPromise.as(this); diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.css b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.css index 54a5b82fa70a8..5b31614155397 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.css +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.css @@ -19,13 +19,6 @@ vertical-align: top; } -.monaco-editor .reference-zone-widget .label { - font-size: 0.9em; - text-align: center; - color: #646465; - margin-top: 6px; -} - .monaco-editor .reference-zone-widget .messages { height: 100%; width: 100%; @@ -38,66 +31,27 @@ font-size: 13px; } -.monaco-editor .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected.has-children > .content:before { - border-left-color: #A6A6A6; -} - -.monaco-editor .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected.has-children > .content:after { - border-left-color: rgba(51, 153, 255, .2); -} - -.monaco-editor .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected.expanded > .content:before { - border-right-color: #646465; - border-left-color: transparent; -} - .monaco-editor .reference-zone-widget .ref-tree .reference { text-overflow: ellipsis; overflow: hidden; } .monaco-editor .reference-zone-widget .ref-tree .reference-file { - position: relative; - line-height: 22px; -} - -.monaco-editor .reference-zone-widget .ref-tree .reference-file .directory { - opacity: 0.7; - margin-left: 0.5em; - font-size: 0.9em; + display: flex; + justify-content: space-between; + align-items: center; } .monaco-editor .reference-zone-widget .monaco-count-badge { - margin-right: 12px; -} - -/* dark room */ - -.monaco-editor.vs-dark .reference-zone-widget .ref-tree .block, -.monaco-editor.vs-dark .reference-zone-widget .overlay { - background-color: #1e1e1e; -} - -.monaco-editor.vs-dark .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected.has-children > .content:before { - border-left-color: white; -} - -.monaco-editor.vs-dark .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected.has-children > .content:after { - border-left-color: rgba(51, 153, 255, .2); -} - -.monaco-editor.vs-dark .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected.expanded > .content:before { - border-right-color: white; - border-left-color: transparent; + margin-right: .5em; + height: 15px; + padding: 0 .5em .5em .5em } /* High Contrast Theming */ .monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file { - line-height: 20px; font-weight: bold; + display: flex; + justify-content: space-between; } - -.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file .directory { - font-weight: normal; -} \ No newline at end of file diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts index b09cc86d280b8..d4b29664c7df7 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts @@ -6,11 +6,10 @@ import 'vs/css!./referencesWidget'; import * as nls from 'vs/nls'; -import { alert } from 'vs/base/browser/ui/aria/aria'; import { onUnexpectedError } from 'vs/base/common/errors'; import { getPathLabel } from 'vs/base/common/labels'; import Event, { Emitter } from 'vs/base/common/event'; -import { IDisposable, dispose, Disposables, IReference } from 'vs/base/common/lifecycle'; +import { IDisposable, dispose, IReference } from 'vs/base/common/lifecycle'; import { Schemas } from 'vs/base/common/network'; import * as strings from 'vs/base/common/strings'; import { TPromise } from 'vs/base/common/winjs.base'; @@ -23,14 +22,12 @@ import { IMouseEvent } from 'vs/base/browser/mouseEvent'; import { GestureEvent } from 'vs/base/browser/touch'; import { CountBadge } from 'vs/base/browser/ui/countBadge/countBadge'; import { FileLabel } from 'vs/base/browser/ui/iconLabel/iconLabel'; -import { LeftRightWidget } from 'vs/base/browser/ui/leftRightWidget/leftRightWidget'; import * as tree from 'vs/base/parts/tree/browser/tree'; -import { DefaultController, LegacyRenderer } from 'vs/base/parts/tree/browser/treeDefaults'; +import { DefaultController } from 'vs/base/parts/tree/browser/treeDefaults'; import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { IInstantiationService, optional } from 'vs/platform/instantiation/common/instantiation'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { DefaultConfig } from 'vs/editor/common/config/defaultConfig'; import { Range, IRange } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { Model } from 'vs/editor/common/model/model'; @@ -38,19 +35,22 @@ import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { EmbeddedCodeEditorWidget } from 'vs/editor/browser/widget/embeddedCodeEditorWidget'; import { PeekViewWidget, IPeekViewService } from 'vs/editor/contrib/zoneWidget/browser/peekViewWidget'; import { FileReferences, OneReference, ReferencesModel } from './referencesModel'; -import { ITextModelResolverService, ITextEditorModel } from 'vs/editor/common/services/resolverService'; -import { registerColor, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; +import { ITextModelService, ITextEditorModel } from 'vs/editor/common/services/resolverService'; +import { registerColor, activeContrastBorder, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; import { registerThemingParticipant, ITheme, IThemeService } from 'vs/platform/theme/common/themeService'; -import { attachListStyler } from 'vs/platform/theme/common/styler'; +import { attachListStyler, attachBadgeStyler } from 'vs/platform/theme/common/styler'; import { IModelDecorationsChangedEvent } from 'vs/editor/common/model/textModelEvents'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; +import URI from 'vs/base/common/uri'; class DecorationsManager implements IDisposable { - private static DecorationOptions: editorCommon.IModelDecorationOptions = { + private static DecorationOptions = ModelDecorationOptions.register({ stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, className: 'reference-decoration' - }; + }); private _decorations = new Map(); private _decorationIgnoreSet = new Set(); @@ -165,7 +165,7 @@ class DecorationsManager implements IDisposable { class DataSource implements tree.IDataSource { constructor( - @ITextModelResolverService private _textModelResolverService: ITextModelResolverService + @ITextModelService private _textModelResolverService: ITextModelService ) { // } @@ -343,67 +343,120 @@ class Controller extends DefaultController { } } -class Renderer extends LegacyRenderer { - private _contextService: IWorkspaceContextService; +class FileReferencesTemplate { - constructor( @IWorkspaceContextService contextService: IWorkspaceContextService) { - super(); - this._contextService = contextService; - } + readonly file: FileLabel; + readonly badge: CountBadge; + readonly dispose: () => void; - public getHeight(tree: tree.ITree, element: any): number { - return 22; + constructor( + container: HTMLElement, + @IWorkspaceContextService private _contextService: IWorkspaceContextService, + @optional(IEnvironmentService) private _environmentService: IEnvironmentService, + @IThemeService themeService: IThemeService, + ) { + const parent = document.createElement('div'); + dom.addClass(parent, 'reference-file'); + container.appendChild(parent); + + this.file = new FileLabel(parent, URI.parse('no:file'), this._contextService, this._environmentService); + this.badge = new CountBadge(parent); + const styler = attachBadgeStyler(this.badge, themeService); + this.dispose = () => styler.dispose(); + } + + set(element: FileReferences) { + this.file.setFile(element.uri, this._contextService, this._environmentService); + const len = element.children.length; + this.badge.setCount(len); + if (element.failure) { + this.badge.setTitleFormat(nls.localize('referencesFailre', "Failed to resolve file.")); + } else if (len > 1) { + this.badge.setTitleFormat(nls.localize('referencesCount', "{0} references", len)); + } else { + this.badge.setTitleFormat(nls.localize('referenceCount', "{0} reference", len)); + } } +} - protected render(tree: tree.ITree, element: FileReferences | OneReference, container: HTMLElement): tree.IElementCallback { - - dom.clearNode(container); - - if (element instanceof FileReferences) { - const fileReferencesContainer = $('.reference-file'); +class OneReferenceTemplate { - /* tslint:disable:no-unused-expression */ - new LeftRightWidget(fileReferencesContainer, (left: HTMLElement) => { + readonly before: HTMLSpanElement; + readonly inside: HTMLSpanElement; + readonly after: HTMLSpanElement; - new FileLabel(left, element.uri, this._contextService); - return null; + constructor(container: HTMLElement) { + const parent = document.createElement('div'); + this.before = document.createElement('span'); + this.inside = document.createElement('span'); + this.after = document.createElement('span'); + dom.addClass(this.inside, 'referenceMatch'); + dom.addClass(parent, 'reference'); + parent.appendChild(this.before); + parent.appendChild(this.inside); + parent.appendChild(this.after); + container.appendChild(parent); + } - }, (right: HTMLElement) => { + set(element: OneReference): void { + const { before, inside, after } = element.parent.preview.preview(element.range); + this.before.innerHTML = strings.escape(before); + this.inside.innerHTML = strings.escape(inside); + this.after.innerHTML = strings.escape(after); + } +} - const len = element.children.length; - const badge = new CountBadge(right, len); +class Renderer implements tree.IRenderer { - if (element.failure) { - badge.setTitleFormat(nls.localize('referencesFailre', "Failed to resolve file.")); - } else if (len > 1) { - badge.setTitleFormat(nls.localize('referencesCount', "{0} references", len)); - } else { - badge.setTitleFormat(nls.localize('referenceCount', "{0} reference", len)); - } + private static _ids = { + FileReferences: 'FileReferences', + OneReference: 'OneReference' + }; - return null; - }); - /* tslint:enable:no-unused-expression */ + constructor( + @IWorkspaceContextService private _contextService: IWorkspaceContextService, + @IThemeService private _themeService: IThemeService, + @optional(IEnvironmentService) private _environmentService: IEnvironmentService, + ) { + // + } - fileReferencesContainer.appendTo(container); + getHeight(tree: tree.ITree, element: FileReferences | OneReference): number { + return 22; + } + getTemplateId(tree: tree.ITree, element: FileReferences | OneReference): string { + if (element instanceof FileReferences) { + return Renderer._ids.FileReferences; } else if (element instanceof OneReference) { + return Renderer._ids.OneReference; + } + throw element; + } - const preview = element.parent.preview.preview(element.range); - - if (!preview) { - return undefined; - } + renderTemplate(tree: tree.ITree, templateId: string, container: HTMLElement) { + if (templateId === Renderer._ids.FileReferences) { + return new FileReferencesTemplate(container, this._contextService, this._environmentService, this._themeService); + } else if (templateId === Renderer._ids.OneReference) { + return new OneReferenceTemplate(container); + } + throw templateId; + } - $('.reference').innerHtml( - strings.format( - '{0}{1}{2}', - strings.escape(preview.before), - strings.escape(preview.inside), - strings.escape(preview.after))).appendTo(container); + renderElement(tree: tree.ITree, element: FileReferences | OneReference, templateId: string, templateData: any): void { + if (element instanceof FileReferences) { + (templateData).set(element); + } else if (element instanceof OneReference) { + (templateData).set(element); + } else { + throw templateId; } + } - return null; + disposeTemplate(tree: tree.ITree, templateId: string, templateData: FileReferencesTemplate | OneReferenceTemplate): void { + if (templateData instanceof FileReferencesTemplate) { + templateData.dispose(); + } } } @@ -422,7 +475,7 @@ class AriaProvider implements tree.IAccessibilityProvider { class VSash { - private _disposables = new Disposables(); + private _disposables: IDisposable[] = []; private _sash: Sash; private _ratio: number; private _height: number; @@ -439,11 +492,11 @@ class VSash { // compute the current widget clientX postion since // the sash works with clientX when dragging let clientX: number; - this._disposables.add(this._sash.addListener('start', (e: ISashEvent) => { + this._disposables.push(this._sash.addListener('start', (e: ISashEvent) => { clientX = e.startX - (this._width * this.ratio); })); - this._disposables.add(this._sash.addListener('change', (e: ISashEvent) => { + this._disposables.push(this._sash.addListener('change', (e: ISashEvent) => { // compute the new position of the sash and from that // compute the new ratio that we are using let newLeft = e.currentX - clientX; @@ -458,7 +511,7 @@ class VSash { dispose() { this._sash.dispose(); this._onDidChangePercentages.dispose(); - this._disposables.dispose(); + dispose(this._disposables); } get onDidChangePercentages() { @@ -521,12 +574,13 @@ export class ReferenceWidget extends PeekViewWidget { constructor( editor: ICodeEditor, public layoutData: LayoutData, - private _textModelResolverService: ITextModelResolverService, + private _textModelResolverService: ITextModelService, private _contextService: IWorkspaceContextService, private _themeService: IThemeService, - private _instantiationService: IInstantiationService + private _instantiationService: IInstantiationService, + private _environmentService: IEnvironmentService ) { - super(editor, { showFrame: false, showArrow: true, isResizeable: true }); + super(editor, { showFrame: false, showArrow: true, isResizeable: true, isAccessible: true }); this._applyTheme(_themeService.getTheme()); this._callOnDispose.push(_themeService.onThemeChange(this._applyTheme.bind(this))); @@ -591,7 +645,13 @@ export class ReferenceWidget extends PeekViewWidget { var options: IEditorOptions = { scrollBeyondLastLine: false, - scrollbar: DefaultConfig.editor.scrollbar, + scrollbar: { + verticalScrollbarSize: 14, + horizontal: 'auto', + useShadows: true, + verticalHasArrows: false, + horizontalHasArrows: false + }, overviewRulerLanes: 2, fixedOverflowWidgets: true, minimap: { @@ -621,8 +681,7 @@ export class ReferenceWidget extends PeekViewWidget { dataSource: this._instantiationService.createInstance(DataSource), renderer: this._instantiationService.createInstance(Renderer), controller: new Controller(), - // TODO@{Joh,Ben} make this work with the embedded tree - // accessibilityProvider: new AriaProvider() + accessibilityProvider: new AriaProvider() }; var options = { @@ -700,11 +759,8 @@ export class ReferenceWidget extends PeekViewWidget { this._revealReference(element); this._onDidSelectReference.fire({ element, kind: 'show', source: 'tree' }); } - if (element instanceof OneReference || element instanceof FileReferences) { - const msg = element.getAriaMessage(); - alert(msg); - } })); + this._disposeOnNewModel.push(this._tree.addListener(Controller.Events.SELECTED, (element: any) => { if (element instanceof OneReference) { this._onDidSelectReference.fire({ element, kind: 'goto', source: 'tree' }); @@ -756,7 +812,7 @@ export class ReferenceWidget extends PeekViewWidget { // Update widget header if (reference.uri.scheme !== Schemas.inMemory) { - this.setTitle(reference.name, getPathLabel(reference.directory, this._contextService)); + this.setTitle(reference.name, getPathLabel(reference.directory, this._contextService, this._environmentService)); } else { this.setTitle(nls.localize('peekView.alternateTitle', "References")); } @@ -797,64 +853,70 @@ export class ReferenceWidget extends PeekViewWidget { // theming -export const peekViewTitleBackground = registerColor('peekViewTitleBackground', { dark: '#1E1E1E', light: '#FFFFFF', hc: '#0C141F' }, nls.localize('peekViewTitleBackground', 'Background color of the peek view title area.')); -export const peekViewTitleForeground = registerColor('peekViewTitleForeground', { dark: '#FFFFFF', light: '#333333', hc: '#FFFFFF' }, nls.localize('peekViewTitleForeground', 'Color of the peek view title.')); -export const peekViewTitleInfoForeground = registerColor('peekViewTitleInfoForeground', { dark: '#ccccccb3', light: '#6c6c6cb3', hc: '#FFFFFF99' }, nls.localize('peekViewTitleInfoForeground', 'Color of the peek view title info.')); -export const peekViewBorder = registerColor('peekViewBorder', { dark: '#007acc', light: '#007acc', hc: '#6FC3DF' }, nls.localize('peekViewBorder', 'Color of the peek view borders and arrow.')); +export const peekViewTitleBackground = registerColor('peekViewTitle.background', { dark: '#1E1E1E', light: '#FFFFFF', hc: '#0C141F' }, nls.localize('peekViewTitleBackground', 'Background color of the peek view title area.')); +export const peekViewTitleForeground = registerColor('peekViewTitleLabel.foreground', { dark: '#FFFFFF', light: '#333333', hc: '#FFFFFF' }, nls.localize('peekViewTitleForeground', 'Color of the peek view title.')); +export const peekViewTitleInfoForeground = registerColor('peekViewTitleDescription.foreground', { dark: '#ccccccb3', light: '#6c6c6cb3', hc: '#FFFFFF99' }, nls.localize('peekViewTitleInfoForeground', 'Color of the peek view title info.')); +export const peekViewBorder = registerColor('peekView.border', { dark: '#007acc', light: '#007acc', hc: contrastBorder }, nls.localize('peekViewBorder', 'Color of the peek view borders and arrow.')); -export const peekViewResultsBackground = registerColor('peekViewResultsBackground', { dark: '#252526', light: '#F3F3F3', hc: Color.black }, nls.localize('peekViewResultsBackground', 'Background color of the peek view result list.')); -export const peekViewResultsMatchForeground = registerColor('peekViewResultsMatchForeground', { dark: '#bbbbbb', light: '#646465', hc: Color.white }, nls.localize('peekViewResultsMatchForeground', 'Match entry foreground in the peek view result list.')); -export const peekViewResultsFileForeground = registerColor('peekViewResultsFileForeground', { dark: Color.white, light: '#1E1E1E', hc: Color.white }, nls.localize('peekViewResultsFileForeground', 'File entry foreground in the peek view result list.')); -export const peekViewResultsSelectionBackground = registerColor('peekViewResultsSelectionBackground', { dark: '#3399ff33', light: '#3399ff33', hc: null }, nls.localize('peekViewResultsSelectionBackground', 'Background color of the selected entry in the peek view result list.')); -export const peekViewResultsSelectionForeground = registerColor('peekViewResultsSelectionForeground', { dark: Color.white, light: '#6C6C6C', hc: Color.white }, nls.localize('peekViewResultsSelectionForeground', 'Foreground color of the selected entry in the peek view result list.')); -export const peekViewEditorBackground = registerColor('peekViewEditorBackground', { dark: '#001F33', light: '#F2F8FC', hc: Color.black }, nls.localize('peekViewEditorBackground', 'Background color of the peek view editor.')); +export const peekViewResultsBackground = registerColor('peekViewResult.background', { dark: '#252526', light: '#F3F3F3', hc: Color.black }, nls.localize('peekViewResultsBackground', 'Background color of the peek view result list.')); +export const peekViewResultsMatchForeground = registerColor('peekViewResult.lineForeground', { dark: '#bbbbbb', light: '#646465', hc: Color.white }, nls.localize('peekViewResultsMatchForeground', 'Foreground color for line nodes in the peek view result list.')); +export const peekViewResultsFileForeground = registerColor('peekViewResult.fileForeground', { dark: Color.white, light: '#1E1E1E', hc: Color.white }, nls.localize('peekViewResultsFileForeground', 'Foreground color for file nodes in the peek view result list.')); +export const peekViewResultsSelectionBackground = registerColor('peekViewResult.selectionBackground', { dark: '#3399ff33', light: '#3399ff33', hc: null }, nls.localize('peekViewResultsSelectionBackground', 'Background color of the selected entry in the peek view result list.')); +export const peekViewResultsSelectionForeground = registerColor('peekViewResult.selectionForeground', { dark: Color.white, light: '#6C6C6C', hc: Color.white }, nls.localize('peekViewResultsSelectionForeground', 'Foreground color of the selected entry in the peek view result list.')); +export const peekViewEditorBackground = registerColor('peekViewEditor.background', { dark: '#001F33', light: '#F2F8FC', hc: Color.black }, nls.localize('peekViewEditorBackground', 'Background color of the peek view editor.')); +export const peekViewEditorGutterBackground = registerColor('peekViewEditorGutter.background', { dark: peekViewEditorBackground, light: peekViewEditorBackground, hc: peekViewEditorBackground }, nls.localize('peekViewEditorGutterBackground', 'Background color of the gutter in the peek view editor.')); -export const peekViewResultsMatchHighlight = registerColor('peekViewResultsMatchHighlight', { dark: '#ea5c004d', light: '#ea5c004d', hc: null }, nls.localize('peekViewResultsMatchHighlight', 'Match highlight color in the peek view result list.')); -export const peekViewEditorMatchHighlight = registerColor('peekViewEditorMatchHighlight', { dark: '#ff8f0099', light: '#f5d802de', hc: null }, nls.localize('peekViewEditorMatchHighlight', 'Match highlight color in the peek view editor.')); +export const peekViewResultsMatchHighlight = registerColor('peekViewResult.matchHighlightBackground', { dark: '#ea5c004d', light: '#ea5c004d', hc: null }, nls.localize('peekViewResultsMatchHighlight', 'Match highlight color in the peek view result list.')); +export const peekViewEditorMatchHighlight = registerColor('peekViewEditor.matchHighlightBackground', { dark: '#ff8f0099', light: '#f5d802de', hc: null }, nls.localize('peekViewEditorMatchHighlight', 'Match highlight color in the peek view editor.')); registerThemingParticipant((theme, collector) => { let findMatchHighlightColor = theme.getColor(peekViewResultsMatchHighlight); if (findMatchHighlightColor) { - collector.addRule(`.monaco-editor.${theme.selector} .reference-zone-widget .ref-tree .referenceMatch { background-color: ${findMatchHighlightColor}; }`); + collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch { background-color: ${findMatchHighlightColor}; }`); } let referenceHighlightColor = theme.getColor(peekViewEditorMatchHighlight); if (referenceHighlightColor) { - collector.addRule(`.monaco-editor.${theme.selector} .reference-zone-widget .preview .reference-decoration { background-color: ${referenceHighlightColor}; }`); + collector.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: ${referenceHighlightColor}; }`); } let hcOutline = theme.getColor(activeContrastBorder); if (hcOutline) { - collector.addRule(`.monaco-editor.${theme.selector} .reference-zone-widget .ref-tree .referenceMatch { border: 1px dotted ${hcOutline}; box-sizing: border-box; }`); - collector.addRule(`.monaco-editor.${theme.selector} .reference-zone-widget .preview .reference-decoration { border: 2px solid ${hcOutline}; box-sizing: border-box; }`); + collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch { border: 1px dotted ${hcOutline}; box-sizing: border-box; }`); + collector.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { border: 2px solid ${hcOutline}; box-sizing: border-box; }`); } let resultsBackground = theme.getColor(peekViewResultsBackground); if (resultsBackground) { - collector.addRule(`.monaco-editor.${theme.selector} .reference-zone-widget .ref-tree { background-color: ${resultsBackground}; }`); + collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree { background-color: ${resultsBackground}; }`); } let resultsMatchForeground = theme.getColor(peekViewResultsMatchForeground); if (resultsMatchForeground) { - collector.addRule(`.monaco-editor.${theme.selector} .reference-zone-widget .ref-tree { color: ${resultsMatchForeground}; }`); + collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree { color: ${resultsMatchForeground}; }`); } let resultsFileForeground = theme.getColor(peekViewResultsFileForeground); if (resultsFileForeground) { - collector.addRule(`.monaco-editor.${theme.selector} .reference-zone-widget .ref-tree .reference-file { color: ${resultsFileForeground}; }`); + collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree .reference-file { color: ${resultsFileForeground}; }`); } let resultsSelectedBackground = theme.getColor(peekViewResultsSelectionBackground); if (resultsSelectedBackground) { - collector.addRule(`.monaco-editor.${theme.selector} .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: ${resultsSelectedBackground}; }`); + collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: ${resultsSelectedBackground}; }`); } let resultsSelectedForeground = theme.getColor(peekViewResultsSelectionForeground); if (resultsSelectedForeground) { - collector.addRule(`.monaco-editor.${theme.selector} .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: ${resultsSelectedForeground} !important; }`); + collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: ${resultsSelectedForeground} !important; }`); } let editorBackground = theme.getColor(peekViewEditorBackground); if (editorBackground) { collector.addRule( - `.monaco-editor.${theme.selector} .reference-zone-widget .preview .monaco-editor,` + - `.monaco-editor.${theme.selector} .reference-zone-widget .preview .glyph-margin,` + - `.monaco-editor.${theme.selector} .reference-zone-widget .preview .monaco-editor-background,` + - `.monaco-editor.${theme.selector} .reference-zone-widget .preview .monaco-editor .margin .view-line {` + + `.monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,` + + `.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {` + ` background-color: ${editorBackground};` + `}`); } + let editorGutterBackground = theme.getColor(peekViewEditorGutterBackground); + if (editorGutterBackground) { + collector.addRule( + `.monaco-editor .reference-zone-widget .preview .monaco-editor .margin {` + + ` background-color: ${editorGutterBackground};` + + `}`); + } }); diff --git a/src/vs/editor/contrib/referenceSearch/test/browser/referencesModel.test.ts b/src/vs/editor/contrib/referenceSearch/test/browser/referencesModel.test.ts index 26c3ecd8f7e7a..4474c25d4f294 100644 --- a/src/vs/editor/contrib/referenceSearch/test/browser/referencesModel.test.ts +++ b/src/vs/editor/contrib/referenceSearch/test/browser/referencesModel.test.ts @@ -12,7 +12,7 @@ import { ReferencesModel } from 'vs/editor/contrib/referenceSearch/browser/refer suite('references', function () { - test('neartestReference', function () { + test('nearestReference', function () { const model = new ReferencesModel([{ uri: URI.file('/out/obj/can'), range: new Range(1, 1, 1, 1) diff --git a/src/vs/editor/contrib/rename/browser/rename.ts b/src/vs/editor/contrib/rename/browser/rename.ts index 582e3a2ab4ea5..55c51b473cb14 100644 --- a/src/vs/editor/contrib/rename/browser/rename.ts +++ b/src/vs/editor/contrib/rename/browser/rename.ts @@ -21,7 +21,7 @@ import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { BulkEdit, createBulkEdit } from 'vs/editor/common/services/bulkEdit'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import RenameInputField from './renameInputField'; -import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; +import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { optional } from 'vs/platform/instantiation/common/instantiation'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { sequence, asWinJsPromise } from 'vs/base/common/async'; @@ -38,7 +38,7 @@ export function rename(model: IReadOnlyModel, position: Position, newName: strin let hasResult = false; const factory = supports.map(support => { - return () => { + return (): TPromise => { if (!hasResult) { return asWinJsPromise((token) => { return support.provideRenameEdits(model, position, newName, token); @@ -54,7 +54,7 @@ export function rename(model: IReadOnlyModel, position: Position, newName: strin return undefined; }, err => { onUnexpectedExternalError(err); - return TPromise.wrapError('provider failed'); + return TPromise.wrapError(new Error('provider failed')); }); } return undefined; @@ -99,7 +99,7 @@ class RenameController implements IEditorContribution { constructor( private editor: ICodeEditor, @IMessageService private _messageService: IMessageService, - @ITextModelResolverService private _textModelResolverService: ITextModelResolverService, + @ITextModelService private _textModelResolverService: ITextModelService, @IProgressService private _progressService: IProgressService, @IContextKeyService contextKeyService: IContextKeyService, @IThemeService themeService: IThemeService, @@ -198,7 +198,7 @@ class RenameController implements IEditorContribution { return rename(this.editor.getModel(), this.editor.getPosition(), newName).then(result => { if (result.rejectReason) { - return TPromise.wrapError(result.rejectReason); + return TPromise.wrapError(new Error(result.rejectReason)); } edit.add(result.edits); return edit; diff --git a/src/vs/editor/contrib/rename/browser/renameInputField.ts b/src/vs/editor/contrib/rename/browser/renameInputField.ts index 241d5f6c51d36..11564d8e05a62 100644 --- a/src/vs/editor/contrib/rename/browser/renameInputField.ts +++ b/src/vs/editor/contrib/rename/browser/renameInputField.ts @@ -13,7 +13,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { Range } from 'vs/editor/common/core/range'; import { ContentWidgetPositionPreference, ICodeEditor, IContentWidget, IContentWidgetPosition } from 'vs/editor/browser/editorBrowser'; import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; -import { inputBackground, inputBorder, inputForeground, widgetShadow, focusBorder } from 'vs/platform/theme/common/colorRegistry'; +import { inputBackground, inputBorder, inputForeground, widgetShadow } from 'vs/platform/theme/common/colorRegistry'; import { Position } from 'vs/editor/common/core/position'; export default class RenameInputField implements IContentWidget, IDisposable { @@ -79,7 +79,7 @@ export default class RenameInputField implements IContentWidget, IDisposable { const background = theme.getColor(inputBackground); const foreground = theme.getColor(inputForeground); const widgetShadowColor = theme.getColor(widgetShadow); - const border = theme.getColor(inputBorder) || theme.getColor(focusBorder); + const border = theme.getColor(inputBorder); this._inputField.style.backgroundColor = background ? background.toString() : null; this._inputField.style.color = foreground ? foreground.toString() : null; @@ -151,7 +151,7 @@ export default class RenameInputField implements IContentWidget, IDisposable { this._currentAcceptInput = () => { if (this._inputField.value.trim().length === 0 || this._inputField.value === value) { // empty or whitespace only or not changed - this._currentCancelInput(); + this.cancelInput(); return; } @@ -162,12 +162,12 @@ export default class RenameInputField implements IContentWidget, IDisposable { let onCursorChanged = () => { if (!Range.containsPosition(where, this._editor.getPosition())) { - this._currentCancelInput(); + this.cancelInput(); } }; disposeOnDone.push(this._editor.onDidChangeCursorSelection(onCursorChanged)); - disposeOnDone.push(this._editor.onDidBlurEditor(this._currentCancelInput)); + disposeOnDone.push(this._editor.onDidBlurEditor(() => this.cancelInput())); this._show(); diff --git a/src/vs/editor/contrib/snippet/browser/snippet.css b/src/vs/editor/contrib/snippet/browser/snippet.css deleted file mode 100644 index 6f839f10d22ae..0000000000000 --- a/src/vs/editor/contrib/snippet/browser/snippet.css +++ /dev/null @@ -1,16 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -.monaco-editor.vs .new-snippet { background-color: rgba(10, 50, 150, 0.1); } -.monaco-editor.vs-dark .new-snippet { background-color: rgba(100, 105, 110, 0.1); } -.monaco-editor.hc-black .new-snippet { background-color: rgba(100, 105, 110, 0.1); } - -.monaco-editor.vs .snippet-placeholder { background-color: rgba(10, 50, 100, 0.1); } -.monaco-editor.vs-dark .snippet-placeholder { background-color: rgba(124, 124, 124, 0.1); } -.monaco-editor.hc-black .snippet-placeholder { background-color: rgba(124, 124, 124, 0.1); } - -.monaco-editor.vs .finish-snippet-placeholder { outline: rgba(10, 50, 100, 0.5) solid 1px; } -.monaco-editor.vs-dark .finish-snippet-placeholder { outline: #525252 solid 1px; } -.monaco-editor.hc-black .finish-snippet-placeholder { outline: #525252 solid 1px; } diff --git a/src/vs/editor/contrib/snippet/common/snippet.md b/src/vs/editor/contrib/snippet/browser/snippet.md similarity index 100% rename from src/vs/editor/contrib/snippet/common/snippet.md rename to src/vs/editor/contrib/snippet/browser/snippet.md diff --git a/src/vs/editor/contrib/snippet/browser/snippet.ts b/src/vs/editor/contrib/snippet/browser/snippet.ts deleted file mode 100644 index 3d8b6eb3399a9..0000000000000 --- a/src/vs/editor/contrib/snippet/browser/snippet.ts +++ /dev/null @@ -1,8 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import 'vs/css!./snippet'; \ No newline at end of file diff --git a/src/vs/editor/contrib/snippet/browser/snippetController2.ts b/src/vs/editor/contrib/snippet/browser/snippetController2.ts new file mode 100644 index 0000000000000..86c6c543eecae --- /dev/null +++ b/src/vs/editor/contrib/snippet/browser/snippetController2.ts @@ -0,0 +1,186 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { RawContextKey, IContextKey, IContextKeyService, ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; +import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; +import { commonEditorContribution, CommonEditorRegistry, EditorCommand } from 'vs/editor/common/editorCommonExtensions'; +import { dispose, IDisposable } from 'vs/base/common/lifecycle'; +import { SnippetSession } from './snippetSession'; +import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; +import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; + +@commonEditorContribution +export class SnippetController2 { + + static get(editor: ICommonCodeEditor): SnippetController2 { + return editor.getContribution('snippetController2'); + } + + static InSnippetMode = new RawContextKey('inSnippetMode', false); + static HasNextTabstop = new RawContextKey('hasNextTabstop', false); + static HasPrevTabstop = new RawContextKey('hasPrevTabstop', false); + + private readonly _inSnippet: IContextKey; + private readonly _hasNextTabstop: IContextKey; + private readonly _hasPrevTabstop: IContextKey; + + private _session: SnippetSession; + private _snippetListener: IDisposable[] = []; + private _modelVersionId: number; + + constructor( + private readonly _editor: ICommonCodeEditor, + @IContextKeyService contextKeyService: IContextKeyService + ) { + this._inSnippet = SnippetController2.InSnippetMode.bindTo(contextKeyService); + this._hasNextTabstop = SnippetController2.HasNextTabstop.bindTo(contextKeyService); + this._hasPrevTabstop = SnippetController2.HasPrevTabstop.bindTo(contextKeyService); + } + + dispose(): void { + this._inSnippet.reset(); + this._hasPrevTabstop.reset(); + this._hasNextTabstop.reset(); + dispose(this._session); + } + + getId(): string { + return 'snippetController2'; + } + + insert( + template: string, + overwriteBefore: number = 0, overwriteAfter: number = 0, + undoStopBefore: boolean = true, undoStopAfter: boolean = true + ): void { + + // don't listen while inserting the snippet + // as that is the inflight state causing cancelation + this._snippetListener = dispose(this._snippetListener); + + if (undoStopBefore) { + this._editor.getModel().pushStackElement(); + } + + if (!this._session) { + this._modelVersionId = this._editor.getModel().getAlternativeVersionId(); + this._session = new SnippetSession(this._editor, template, overwriteBefore, overwriteAfter); + this._session.insert(); + } else { + this._session.merge(template, overwriteBefore, overwriteAfter); + } + + if (undoStopAfter) { + this._editor.getModel().pushStackElement(); + } + + this._snippetListener = [ + this._editor.onDidChangeModel(() => this.cancel()), + this._editor.onDidChangeCursorSelection(() => this._updateState()) + ]; + this._updateState(); + } + + private _updateState(): void { + if (!this._session) { + // canceled in the meanwhile + return; + } + + if (this._modelVersionId === this._editor.getModel().getAlternativeVersionId()) { + // undo until the 'before' state happened + // and makes use cancel snippet mode + return this.cancel(); + } + + if (!this._session.hasPlaceholder) { + // don't listen for selection changes and don't + // update context keys when the snippet is plain text + return this.cancel(); + } + + if (this._session.isAtLastPlaceholder || !this._session.isSelectionWithinPlaceholders()) { + return this.cancel(); + } + + this._inSnippet.set(true); + this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder); + this._hasNextTabstop.set(!this._session.isAtLastPlaceholder); + } + + finish(): void { + while (this._inSnippet.get()) { + this.next(); + } + } + + cancel(): void { + this._inSnippet.reset(); + this._hasPrevTabstop.reset(); + this._hasNextTabstop.reset(); + dispose(this._snippetListener); + dispose(this._session); + this._session = undefined; + this._modelVersionId = -1; + } + + prev(): void { + this._session.prev(); + this._updateState(); + } + + next(): void { + this._session.next(); + this._updateState(); + } +} + + +const CommandCtor = EditorCommand.bindToContribution(SnippetController2.get); + +CommonEditorRegistry.registerEditorCommand(new CommandCtor({ + id: 'jumpToNextSnippetPlaceholder', + precondition: ContextKeyExpr.and(SnippetController2.InSnippetMode, SnippetController2.HasNextTabstop), + handler: ctrl => ctrl.next(), + kbOpts: { + weight: CommonEditorRegistry.commandWeight(30), + kbExpr: EditorContextKeys.textFocus, + primary: KeyCode.Tab + } +})); +CommonEditorRegistry.registerEditorCommand(new CommandCtor({ + id: 'jumpToPrevSnippetPlaceholder', + precondition: ContextKeyExpr.and(SnippetController2.InSnippetMode, SnippetController2.HasPrevTabstop), + handler: ctrl => ctrl.prev(), + kbOpts: { + weight: CommonEditorRegistry.commandWeight(30), + kbExpr: EditorContextKeys.textFocus, + primary: KeyMod.Shift | KeyCode.Tab + } +})); +CommonEditorRegistry.registerEditorCommand(new CommandCtor({ + id: 'leaveSnippet', + precondition: SnippetController2.InSnippetMode, + handler: ctrl => ctrl.cancel(), + kbOpts: { + weight: CommonEditorRegistry.commandWeight(30), + kbExpr: EditorContextKeys.textFocus, + primary: KeyCode.Escape, + secondary: [KeyMod.Shift | KeyCode.Escape] + } +})); + +CommonEditorRegistry.registerEditorCommand(new CommandCtor({ + id: 'acceptSnippet', + precondition: SnippetController2.InSnippetMode, + handler: ctrl => ctrl.finish(), + // kbOpts: { + // weight: CommonEditorRegistry.commandWeight(30), + // kbExpr: EditorContextKeys.textFocus, + // primary: KeyCode.Enter, + // } +})); diff --git a/src/vs/editor/contrib/snippet/browser/snippetParser.ts b/src/vs/editor/contrib/snippet/browser/snippetParser.ts new file mode 100644 index 0000000000000..c97a9e061db10 --- /dev/null +++ b/src/vs/editor/contrib/snippet/browser/snippetParser.ts @@ -0,0 +1,489 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { CharCode } from 'vs/base/common/charCode'; + +export enum TokenType { + Dollar, + Colon, + CurlyOpen, + CurlyClose, + Backslash, + Int, + VariableName, + Format, + EOF +} + +export interface Token { + type: TokenType; + pos: number; + len: number; +} + + +export class Scanner { + + private static _table: { [ch: number]: TokenType } = { + [CharCode.DollarSign]: TokenType.Dollar, + [CharCode.Colon]: TokenType.Colon, + [CharCode.OpenCurlyBrace]: TokenType.CurlyOpen, + [CharCode.CloseCurlyBrace]: TokenType.CurlyClose, + [CharCode.Backslash]: TokenType.Backslash, + }; + + static isDigitCharacter(ch: number): boolean { + return ch >= CharCode.Digit0 && ch <= CharCode.Digit9; + } + + static isVariableCharacter(ch: number): boolean { + return ch === CharCode.Underline + || (ch >= CharCode.a && ch <= CharCode.z) + || (ch >= CharCode.A && ch <= CharCode.Z); + } + + value: string; + pos: number; + + constructor() { + this.text(''); + } + + text(value: string) { + this.value = value; + this.pos = 0; + } + + tokenText(token: Token): string { + return this.value.substr(token.pos, token.len); + } + + next(): Token { + + if (this.pos >= this.value.length) { + return { type: TokenType.EOF, pos: this.pos, len: 0 }; + } + + let pos = this.pos; + let len = 0; + let ch = this.value.charCodeAt(pos); + let type: TokenType; + + // static types + type = Scanner._table[ch]; + if (typeof type === 'number') { + this.pos += 1; + return { type, pos, len: 1 }; + } + + // number + if (Scanner.isDigitCharacter(ch)) { + type = TokenType.Int; + do { + len += 1; + ch = this.value.charCodeAt(pos + len); + } while (Scanner.isDigitCharacter(ch)); + + this.pos += len; + return { type, pos, len }; + } + + // variable name + if (Scanner.isVariableCharacter(ch)) { + type = TokenType.VariableName; + do { + ch = this.value.charCodeAt(pos + (++len)); + } while (Scanner.isVariableCharacter(ch) || Scanner.isDigitCharacter(ch)); + + this.pos += len; + return { type, pos, len }; + } + + + // format + type = TokenType.Format; + do { + len += 1; + ch = this.value.charCodeAt(pos + len); + } while ( + !isNaN(ch) + && typeof Scanner._table[ch] === 'undefined' // not static token + && !Scanner.isDigitCharacter(ch) // not number + && !Scanner.isVariableCharacter(ch) // not variable + ); + + this.pos += len; + return { type, pos, len }; + } +} + +export abstract class Marker { + _markerBrand: any; + + static toString(marker?: Marker[]): string { + let result = ''; + for (const m of marker) { + result += m.toString(); + } + return result; + } + + parent: Marker; + + private _children: Marker[] = []; + + set children(marker: Marker[]) { + this._children = []; + for (const m of marker) { + m.parent = this; + this._children.push(m); + } + // Object.freeze(this._children); + } + + get children(): Marker[] { + return this._children; + } + + toString() { + return ''; + } + len(): number { + return 0; + } +} + +export class Text extends Marker { + constructor(public string: string) { + super(); + } + toString() { + return this.string; + } + len(): number { + return this.string.length; + } +} + +export class Placeholder extends Marker { + + static compareByIndex(a: Placeholder, b: Placeholder): number { + if (a.index === b.index) { + return 0; + } else if (a.isFinalTabstop) { + return 1; + } else if (b.isFinalTabstop) { + return -1; + } else if (a.index < b.index) { + return -1; + } else if (a.index > b.index) { + return 1; + } else { + return 0; + } + } + + constructor(public index: number, children: Marker[]) { + super(); + this.children = children; + } + get isFinalTabstop() { + return this.index === 0; + } + toString() { + return Marker.toString(this.children); + } +} + +export class Variable extends Marker { + + resolvedValue: string; + + constructor(public name: string = '', children: Marker[]) { + super(); + this.children = children; + } + get isDefined(): boolean { + return this.resolvedValue !== undefined; + } + len(): number { + if (this.isDefined) { + return this.resolvedValue.length; + } else { + return super.len(); + } + } + toString() { + return this.isDefined ? this.resolvedValue : Marker.toString(this.children); + } +} +export function walk(marker: Marker[], visitor: (marker: Marker) => boolean): void { + const stack = [...marker]; + while (stack.length > 0) { + const marker = stack.shift(); + const recurse = visitor(marker); + if (!recurse) { + break; + } + stack.unshift(...marker.children); + } +} + +export class TextmateSnippet extends Marker { + + private _placeholders: Placeholder[]; + + constructor(marker: Marker[]) { + super(); + this.children = marker; + } + + get placeholders(): Placeholder[] { + if (!this._placeholders) { + // fill in placeholders + this._placeholders = []; + walk(this.children, candidate => { + if (candidate instanceof Placeholder) { + this.placeholders.push(candidate); + } + return true; + }); + } + return this._placeholders; + } + + offset(marker: Marker): number { + let pos = 0; + let found = false; + walk(this.children, candidate => { + if (candidate === marker) { + found = true; + return false; + } + pos += candidate.len(); + return true; + }); + + if (!found) { + return -1; + } + return pos; + } + + fullLen(marker: Marker): number { + let ret = 0; + walk([marker], marker => { + ret += marker.len(); + return true; + }); + return ret; + } + + enclosingPlaceholders(placeholder: Placeholder): Placeholder[] { + let ret: Placeholder[] = []; + let { parent } = placeholder; + while (parent) { + if (parent instanceof Placeholder) { + ret.push(parent); + } + parent = parent.parent; + } + return ret; + } + + get text() { + return Marker.toString(this.children); + } + + resolveVariables(resolver: { resolve(name: string): string }): this { + walk(this.children, candidate => { + if (candidate instanceof Variable) { + candidate.resolvedValue = resolver.resolve(candidate.name); + if (candidate.isDefined) { + // remove default value from resolved variable + candidate.children = []; + } + } + return true; + }); + return this; + } + + replace(marker: Marker, others: Marker[]): void { + const { parent } = marker; + const idx = parent.children.indexOf(marker); + const newChildren = parent.children.slice(0); + newChildren.splice(idx, 1, ...others); + parent.children = newChildren; + this._placeholders = undefined; + } +} + +export class SnippetParser { + + static escape(value: string): string { + return value.replace(/\$|}|\\/g, '\\$&'); + } + + static parse(template: string, enforceFinalTabstop?: boolean): TextmateSnippet { + const marker = new SnippetParser().parse(template, true, enforceFinalTabstop); + return new TextmateSnippet(marker); + } + + private _scanner = new Scanner(); + private _token: Token; + private _prevToken: Token; + + + text(value: string): string { + return Marker.toString(this.parse(value)); + } + + parse(value: string, insertFinalTabstop?: boolean, enforceFinalTabstop?: boolean): Marker[] { + const marker: Marker[] = []; + + this._scanner.text(value); + this._token = this._scanner.next(); + while (this._parseAny(marker) || this._parseText(marker)) { + // nothing + } + + // * fill in default for empty placeHolders + // * compact sibling Text markers + function walk(marker: Marker[], placeholderDefaultValues: Map) { + + for (let i = 0; i < marker.length; i++) { + const thisMarker = marker[i]; + + if (thisMarker instanceof Placeholder) { + // fill in default values for repeated placeholders + // like `${1:foo}and$1` becomes ${1:foo}and${1:foo} + if (!placeholderDefaultValues.has(thisMarker.index)) { + placeholderDefaultValues.set(thisMarker.index, thisMarker.children); + walk(thisMarker.children, placeholderDefaultValues); + + } else if (thisMarker.children.length === 0) { + // copy children from first placeholder definition, no need to + // recurse on them because they have been visited already + thisMarker.children = placeholderDefaultValues.get(thisMarker.index).slice(0); + } + + + } else if (thisMarker instanceof Variable) { + walk(thisMarker.children, placeholderDefaultValues); + + } else if (i > 0 && thisMarker instanceof Text && marker[i - 1] instanceof Text) { + (marker[i - 1]).string += (marker[i]).string; + marker.splice(i, 1); + i--; + } + } + } + + const placeholderDefaultValues = new Map(); + walk(marker, placeholderDefaultValues); + + if ( + !placeholderDefaultValues.has(0) && // there is no final tabstop + (insertFinalTabstop && placeholderDefaultValues.size > 0 || enforceFinalTabstop) + ) { + // the snippet uses placeholders but has no + // final tabstop defined -> insert at the end + marker.push(new Placeholder(0, [])); + } + + return marker; + } + + private _accept(type: TokenType): boolean { + if (type === undefined || this._token.type === type) { + this._prevToken = this._token; + this._token = this._scanner.next(); + return true; + } + return false; + } + + private _parseAny(marker: Marker[]): boolean { + if (this._parseEscaped(marker)) { + return true; + } else if (this._parseTM(marker)) { + return true; + } + return false; + } + + private _parseText(marker: Marker[]): boolean { + if (this._token.type !== TokenType.EOF) { + marker.push(new Text(this._scanner.tokenText(this._token))); + this._accept(undefined); + return true; + } + return false; + } + + private _parseTM(marker: Marker[]): boolean { + if (this._accept(TokenType.Dollar)) { + + if (this._accept(TokenType.VariableName) || this._accept(TokenType.Int)) { + // $FOO, $123 + const idOrName = this._scanner.tokenText(this._prevToken); + marker.push(/^\d+$/.test(idOrName) ? new Placeholder(Number(idOrName), []) : new Variable(idOrName, [])); + return true; + + } else if (this._accept(TokenType.CurlyOpen)) { + // ${name:children} + let name: Marker[] = []; + let children: Marker[] = []; + let target = name; + + while (true) { + + if (target !== children && this._accept(TokenType.Colon)) { + target = children; + continue; + } + + if (this._accept(TokenType.CurlyClose)) { + const idOrName = Marker.toString(name); + marker.push(/^\d+$/.test(idOrName) ? new Placeholder(Number(idOrName), children) : new Variable(idOrName, children)); + return true; + } + + if (this._parseAny(target) || this._parseText(target)) { + continue; + } + + // fallback + if (children.length > 0) { + marker.push(new Text('${' + Marker.toString(name) + ':')); + marker.push(...children); + } else { + marker.push(new Text('${')); + marker.push(...name); + } + return true; + } + } + + marker.push(new Text('$')); + return true; + } + return false; + } + + private _parseEscaped(marker: Marker[]): boolean { + if (this._accept(TokenType.Backslash)) { + if (this._accept(TokenType.Dollar) || this._accept(TokenType.CurlyClose) || this._accept(TokenType.Backslash)) { + // just consume them + } + marker.push(new Text(this._scanner.tokenText(this._prevToken))); + return true; + } + return false; + } +} diff --git a/src/vs/editor/contrib/snippet/browser/snippetSession.css b/src/vs/editor/contrib/snippet/browser/snippetSession.css new file mode 100644 index 0000000000000..b6c7d72adda32 --- /dev/null +++ b/src/vs/editor/contrib/snippet/browser/snippetSession.css @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +.monaco-editor.vs .snippet-placeholder { background-color: rgba(10, 50, 100, 0.1); } +.monaco-editor.vs-dark .snippet-placeholder { background-color: rgba(124, 124, 124, 0.1); } +.monaco-editor.hc-black .snippet-placeholder { background-color: rgba(124, 124, 124, 0.1); } + +.monaco-editor.vs .finish-snippet-placeholder { outline: rgba(10, 50, 100, 0.5) solid 1px; } +.monaco-editor.vs-dark .finish-snippet-placeholder { outline: #525252 solid 1px; } +.monaco-editor.hc-black .finish-snippet-placeholder { outline: #525252 solid 1px; } diff --git a/src/vs/editor/contrib/snippet/browser/snippetSession.ts b/src/vs/editor/contrib/snippet/browser/snippetSession.ts new file mode 100644 index 0000000000000..5f9a49a97e659 --- /dev/null +++ b/src/vs/editor/contrib/snippet/browser/snippetSession.ts @@ -0,0 +1,430 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import 'vs/css!./snippetSession'; +import { getLeadingWhitespace } from 'vs/base/common/strings'; +import { ICommonCodeEditor, IModel, TrackedRangeStickiness, IIdentifiedSingleEditOperation } from 'vs/editor/common/editorCommon'; +import { EditOperation } from 'vs/editor/common/core/editOperation'; +import { TextmateSnippet, Placeholder, SnippetParser } from './snippetParser'; +import { Selection } from 'vs/editor/common/core/selection'; +import { Range } from 'vs/editor/common/core/range'; +import { IPosition } from 'vs/editor/common/core/position'; +import { groupBy } from 'vs/base/common/arrays'; +import { dispose } from 'vs/base/common/lifecycle'; +import { EditorSnippetVariableResolver } from "./snippetVariables"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; + +export class OneSnippet { + + private readonly _editor: ICommonCodeEditor; + private readonly _snippet: TextmateSnippet; + private readonly _offset: number; + + private _placeholderDecorations: Map; + private _placeholderGroups: Placeholder[][]; + private _placeholderGroupsIdx: number; + + private static readonly _decor = { + active: ModelDecorationOptions.register({ stickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges, className: 'snippet-placeholder' }), + inactive: ModelDecorationOptions.register({ stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, className: 'snippet-placeholder' }), + activeFinal: ModelDecorationOptions.register({ stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, className: 'finish-snippet-placeholder' }), + inactiveFinal: ModelDecorationOptions.register({ stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, className: 'finish-snippet-placeholder' }), + }; + + constructor(editor: ICommonCodeEditor, snippet: TextmateSnippet, offset: number) { + this._editor = editor; + this._snippet = snippet; + this._offset = offset; + + this._placeholderGroups = groupBy(snippet.placeholders, Placeholder.compareByIndex); + this._placeholderGroupsIdx = -1; + } + + dispose(): void { + if (this._placeholderDecorations) { + this._editor.changeDecorations(accessor => this._placeholderDecorations.forEach(handle => accessor.removeDecoration(handle))); + } + this._placeholderGroups.length = 0; + } + + private _initDecorations(): void { + + if (this._placeholderDecorations) { + // already initialized + return; + } + + this._placeholderDecorations = new Map(); + const model = this._editor.getModel(); + + this._editor.changeDecorations(accessor => { + // create a decoration for each placeholder + for (const placeholder of this._snippet.placeholders) { + const placeholderOffset = this._snippet.offset(placeholder); + const placeholderLen = this._snippet.fullLen(placeholder); + const range = Range.fromPositions( + model.getPositionAt(this._offset + placeholderOffset), + model.getPositionAt(this._offset + placeholderOffset + placeholderLen) + ); + const options = placeholder.isFinalTabstop ? OneSnippet._decor.inactiveFinal : OneSnippet._decor.inactive; + const handle = accessor.addDecoration(range, options); + this._placeholderDecorations.set(placeholder, handle); + } + }); + } + + move(fwd: boolean | undefined): Selection[] { + + this._initDecorations(); + + if (fwd === true && this._placeholderGroupsIdx < this._placeholderGroups.length - 1) { + this._placeholderGroupsIdx += 1; + + } else if (fwd === false && this._placeholderGroupsIdx > 0) { + this._placeholderGroupsIdx -= 1; + + } else { + // the selection of the current placeholder might + // not acurate any more -> simply restore it + } + + return this._editor.getModel().changeDecorations(accessor => { + + const activePlaceholders = new Set(); + + // change stickiness to always grow when typing at its edges + // because these decorations represent the currently active + // tabstop. + // Special case #1: reaching the final tabstop + // Special case #2: placeholders enclosing active placeholders + const selections: Selection[] = []; + for (const placeholder of this._placeholderGroups[this._placeholderGroupsIdx]) { + const id = this._placeholderDecorations.get(placeholder); + const range = this._editor.getModel().getDecorationRange(id); + selections.push(new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn)); + + accessor.changeDecorationOptions(id, placeholder.isFinalTabstop ? OneSnippet._decor.activeFinal : OneSnippet._decor.active); + activePlaceholders.add(placeholder); + + for (const enclosingPlaceholder of this._snippet.enclosingPlaceholders(placeholder)) { + const id = this._placeholderDecorations.get(enclosingPlaceholder); + accessor.changeDecorationOptions(id, enclosingPlaceholder.isFinalTabstop ? OneSnippet._decor.activeFinal : OneSnippet._decor.active); + activePlaceholders.add(enclosingPlaceholder); + } + } + + // change stickness to never grow when typing at its edges + // so that in-active tabstops never grow + this._placeholderDecorations.forEach((id, placeholder) => { + if (!activePlaceholders.has(placeholder)) { + accessor.changeDecorationOptions(id, placeholder.isFinalTabstop ? OneSnippet._decor.inactiveFinal : OneSnippet._decor.inactive); + } + }); + + return selections; + }); + } + + get isAtFirstPlaceholder() { + return this._placeholderGroupsIdx <= 0 || this._placeholderGroups.length === 0; + } + + get isAtLastPlaceholder() { + return this._placeholderGroupsIdx === this._placeholderGroups.length - 1; + } + + get hasPlaceholder() { + return this._snippet.placeholders.length > 0; + } + + get placeholderRanges() { + const ret: Range[] = []; + this._placeholderDecorations.forEach((id, placeholder) => { + if (!placeholder.isFinalTabstop) { + const range = this._editor.getModel().getDecorationRange(id); + if (range) { + ret.push(range); + } + } + }); + return ret; + } + + merge(others: OneSnippet[]): void { + + const model = this._editor.getModel(); + + this._editor.changeDecorations(accessor => { + + // For each active placeholder take one snippet and merge it + // in that the placeholder (can be many for `$1foo$1foo`). Because + // everything is sorted by editor selection we can simply remove + // elements from the beginning of the array + for (const placeholder of this._placeholderGroups[this._placeholderGroupsIdx]) { + const nested = others.shift(); + console.assert(!nested._placeholderDecorations); + + // Massage placeholder-indicies of the nested snippet to be + // sorted right after the insertion point. This ensures we move + // through the placeholders in the correct order + for (const nestedPlaceholder of nested._snippet.placeholders) { + if (nestedPlaceholder.isFinalTabstop) { + nestedPlaceholder.index = placeholder.index + (nested._snippet.placeholders.length / 10); + } else { + nestedPlaceholder.index = placeholder.index + (nestedPlaceholder.index / 10); + } + } + this._snippet.replace(placeholder, nested._snippet.children); + + // Remove the placeholder at which position are inserting + // the snippet and also remove its decoration. + const id = this._placeholderDecorations.get(placeholder); + accessor.removeDecoration(id); + this._placeholderDecorations.delete(placeholder); + + // For each *new* placeholder we create decoration to monitor + // how and if it grows/shrinks. + for (const placeholder of nested._snippet.placeholders) { + const placeholderOffset = nested._snippet.offset(placeholder); + const placeholderLen = nested._snippet.fullLen(placeholder); + const range = Range.fromPositions( + model.getPositionAt(nested._offset + placeholderOffset), + model.getPositionAt(nested._offset + placeholderOffset + placeholderLen) + ); + const handle = accessor.addDecoration(range, OneSnippet._decor.inactive); + this._placeholderDecorations.set(placeholder, handle); + } + } + + // Last, re-create the placeholder groups by sorting placeholders by their index. + this._placeholderGroups = groupBy(this._snippet.placeholders, Placeholder.compareByIndex); + }); + } +} + +export class SnippetSession { + + static adjustWhitespace(model: IModel, position: IPosition, template: string): string { + + const line = model.getLineContent(position.lineNumber); + const lineLeadingWhitespace = getLeadingWhitespace(line, 0, position.column - 1); + const templateLines = template.split(/\r\n|\r|\n/); + + for (let i = 1; i < templateLines.length; i++) { + let templateLeadingWhitespace = getLeadingWhitespace(templateLines[i]); + templateLines[i] = model.normalizeIndentation(lineLeadingWhitespace + templateLeadingWhitespace) + templateLines[i].substr(templateLeadingWhitespace.length); + } + return templateLines.join(model.getEOL()); + } + + static adjustSelection(model: IModel, selection: Selection, overwriteBefore: number, overwriteAfter: number): Selection { + if (overwriteBefore !== 0 || overwriteAfter !== 0) { + let { startLineNumber, startColumn, endLineNumber, endColumn } = selection; + startColumn -= overwriteBefore; + endColumn += overwriteAfter; + + const range = model.validateRange(Range.plusRange(selection, { + startLineNumber, + startColumn, + endLineNumber, + endColumn, + })); + + selection = Selection.createWithDirection( + range.startLineNumber, range.startColumn, + range.endLineNumber, range.endColumn, + selection.getDirection() + ); + } + return selection; + } + + static createEditsAndSnippets(editor: ICommonCodeEditor, template: string, overwriteBefore: number, overwriteAfter: number, enforceFinalTabstop: boolean): { edits: IIdentifiedSingleEditOperation[], snippets: OneSnippet[] } { + + const model = editor.getModel(); + const edits: IIdentifiedSingleEditOperation[] = []; + const snippets: OneSnippet[] = []; + + let delta = 0; + + // know what text the overwrite[Before|After] extensions + // of the primary curser have selected because only when + // secondary selections extend to the same text we can grow them + let firstBeforeText = model.getValueInRange(SnippetSession.adjustSelection(model, editor.getSelection(), overwriteBefore, 0)); + let firstAfterText = model.getValueInRange(SnippetSession.adjustSelection(model, editor.getSelection(), 0, overwriteAfter)); + + // sort selections by their start position but remeber + // the original index. that allows you to create correct + // offset-based selection logic without changing the + // primary selection + const indexedSelection = editor.getSelections() + .map((selection, idx) => ({ selection, idx })) + .sort((a, b) => Range.compareRangesUsingStarts(a.selection, b.selection)); + + for (const { selection, idx } of indexedSelection) { + + // extend selection with the `overwriteBefore` and `overwriteAfter` and then + // compare if this matches the extensions of the primary selection + let extensionBefore = SnippetSession.adjustSelection(model, selection, overwriteBefore, 0); + let extensionAfter = SnippetSession.adjustSelection(model, selection, 0, overwriteAfter); + if (firstBeforeText !== model.getValueInRange(extensionBefore)) { + extensionBefore = selection; + } + if (firstAfterText !== model.getValueInRange(extensionAfter)) { + extensionAfter = selection; + } + + // merge the before and after selection into one + const snippetSelection = selection + .setStartPosition(extensionBefore.startLineNumber, extensionBefore.startColumn) + .setEndPosition(extensionAfter.endLineNumber, extensionAfter.endColumn); + + // adjust the template string to match the indentation and + // whitespace rules of this insert location (can be different for each cursor) + const start = snippetSelection.getStartPosition(); + const adjustedTemplate = SnippetSession.adjustWhitespace(model, start, template); + + const snippet = SnippetParser.parse(adjustedTemplate, enforceFinalTabstop).resolveVariables(new EditorSnippetVariableResolver(model, selection)); + + const offset = model.getOffsetAt(start) + delta; + delta += snippet.text.length - model.getValueLengthInRange(snippetSelection); + + // store snippets with the index of their originating selection. + // that ensures the primiary cursor stays primary despite not being + // the one with lowest start position + edits[idx] = EditOperation.replace(snippetSelection, snippet.text); + snippets[idx] = new OneSnippet(editor, snippet, offset); + } + + return { edits, snippets }; + } + + private readonly _editor: ICommonCodeEditor; + private readonly _template: string; + private readonly _overwriteBefore: number; + private readonly _overwriteAfter: number; + private _snippets: OneSnippet[] = []; + + constructor(editor: ICommonCodeEditor, template: string, overwriteBefore: number = 0, overwriteAfter: number = 0) { + this._editor = editor; + this._template = template; + this._overwriteBefore = overwriteBefore; + this._overwriteAfter = overwriteAfter; + } + + dispose(): void { + dispose(this._snippets); + } + + insert(): void { + + const model = this._editor.getModel(); + + // make insert edit and start with first selections + const { edits, snippets } = SnippetSession.createEditsAndSnippets(this._editor, this._template, this._overwriteBefore, this._overwriteAfter, false); + this._snippets = snippets; + + this._editor.setSelections(model.pushEditOperations(this._editor.getSelections(), edits, undoEdits => { + if (this._snippets[0].hasPlaceholder) { + return this._move(true); + } else { + return undoEdits.map(edit => Selection.fromPositions(edit.range.getEndPosition())); + } + })); + } + + merge(template: string, overwriteBefore: number = 0, overwriteAfter: number = 0): void { + const { edits, snippets } = SnippetSession.createEditsAndSnippets(this._editor, template, overwriteBefore, overwriteAfter, true); + + this._editor.setSelections(this._editor.getModel().pushEditOperations(this._editor.getSelections(), edits, undoEdits => { + + for (const snippet of this._snippets) { + snippet.merge(snippets); + } + console.assert(snippets.length === 0); + + if (this._snippets[0].hasPlaceholder) { + return this._move(undefined); + } else { + return undoEdits.map(edit => Selection.fromPositions(edit.range.getEndPosition())); + } + })); + } + + next(): void { + const newSelections = this._move(true); + this._editor.setSelections(newSelections); + } + + prev(): void { + const newSelections = this._move(false); + this._editor.setSelections(newSelections); + } + + private _move(fwd: boolean | undefined): Selection[] { + const selections: Selection[] = []; + for (const snippet of this._snippets) { + const oneSelection = snippet.move(fwd); + selections.push(...oneSelection); + } + return selections; + } + + get isAtFirstPlaceholder() { + return this._snippets[0].isAtFirstPlaceholder; + } + + get isAtLastPlaceholder() { + return this._snippets[0].isAtLastPlaceholder; + } + + get hasPlaceholder() { + return this._snippets[0].hasPlaceholder; + } + + isSelectionWithinPlaceholders(): boolean { + + if (!this.hasPlaceholder) { + return false; + } + + const selections = this._editor.getSelections(); + if (selections.length < this._snippets.length) { + // this means we started snippet mode with N + // selections and have M (N > M) selections. + // So one snippet is without selection -> cancel + return false; + } + + const ranges: Range[] = []; + for (const snippet of this._snippets) { + ranges.push(...snippet.placeholderRanges); + } + + if (selections.length > ranges.length) { + return false; + } + + // sort selections and ranges by their start position + // and then make sure each selection is contained by + // a placeholder range + selections.sort(Range.compareRangesUsingStarts); + ranges.sort(Range.compareRangesUsingStarts); + + outer: for (const selection of selections) { + let range: Range; + while (range = ranges.shift()) { + if (range.containsRange(selection)) { + continue outer; + } + } + return false; + } + + return true; + } +} diff --git a/src/vs/editor/contrib/snippet/browser/snippetVariables.ts b/src/vs/editor/contrib/snippet/browser/snippetVariables.ts new file mode 100644 index 0000000000000..2953ee8bfc3bb --- /dev/null +++ b/src/vs/editor/contrib/snippet/browser/snippetVariables.ts @@ -0,0 +1,67 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { basename, dirname } from 'vs/base/common/paths'; +import { IModel } from 'vs/editor/common/editorCommon'; +import { Selection } from 'vs/editor/common/core/selection'; + +export class EditorSnippetVariableResolver { + + static readonly VariableNames = Object.freeze({ + 'SELECTION': true, + 'TM_SELECTED_TEXT': true, + 'TM_CURRENT_LINE': true, + 'TM_CURRENT_WORD': true, + 'TM_LINE_INDEX': true, + 'TM_LINE_NUMBER': true, + 'TM_FILENAME': true, + 'TM_DIRECTORY': true, + 'TM_FILEPATH': true, + }); + + constructor( + private readonly _model: IModel, + private readonly _selection: Selection + ) { + // + } + + resolve(name: string): string { + if (name === 'SELECTION' || name === 'TM_SELECTED_TEXT') { + return this._model.getValueInRange(this._selection) || undefined; + + } else if (name === 'TM_CURRENT_LINE') { + return this._model.getLineContent(this._selection.positionLineNumber); + + } else if (name === 'TM_CURRENT_WORD') { + const info = this._model.getWordAtPosition({ + lineNumber: this._selection.positionLineNumber, + column: this._selection.positionColumn + }); + return info && info.word || undefined; + + } else if (name === 'TM_LINE_INDEX') { + return String(this._selection.positionLineNumber - 1); + + } else if (name === 'TM_LINE_NUMBER') { + return String(this._selection.positionLineNumber); + + } else if (name === 'TM_FILENAME') { + return basename(this._model.uri.fsPath); + + } else if (name === 'TM_DIRECTORY') { + const dir = dirname(this._model.uri.fsPath); + return dir !== '.' ? dir : ''; + + } else if (name === 'TM_FILEPATH') { + return this._model.uri.fsPath; + + } else { + return undefined; + } + } +} diff --git a/src/vs/editor/contrib/snippet/common/snippet.ts b/src/vs/editor/contrib/snippet/common/snippet.ts deleted file mode 100644 index ea0b628e953a0..0000000000000 --- a/src/vs/editor/contrib/snippet/common/snippet.ts +++ /dev/null @@ -1,345 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import * as strings from 'vs/base/common/strings'; -import { Range } from 'vs/editor/common/core/range'; -import { Marker, Variable, Placeholder, Text, SnippetParser } from 'vs/editor/contrib/snippet/common/snippetParser'; - -export interface IIndentationNormalizer { - normalizeIndentation(str: string): string; -} - -export interface IPlaceHolder { - id: string; - value: string; - occurences: Range[]; -} - -export interface ICodeSnippet { - lines: string[]; - placeHolders: IPlaceHolder[]; - finishPlaceHolderIndex: number; -} - -export interface ISnippetVariableResolver { - resolve(name: string): string; -} - -export class CodeSnippet implements ICodeSnippet { - - static fromTextmate(template: string, variableResolver?: ISnippetVariableResolver): CodeSnippet { - const marker = new SnippetParser(true, false).parse(template); - const snippet = new CodeSnippet(); - _resolveSnippetVariables(marker, variableResolver); - _fillCodeSnippetFromMarker(snippet, marker); - return snippet; - } - - static fromInternal(template: string): CodeSnippet { - const marker = new SnippetParser(false, true).parse(template); - const snippet = new CodeSnippet(); - _fillCodeSnippetFromMarker(snippet, marker); - return snippet; - } - - static none(template: string): CodeSnippet { - const snippet = new CodeSnippet(); - snippet.lines = template.split(/\r\n|\n|\r/); - return snippet; - } - - static fromEmmet(template: string): CodeSnippet { - let matchFinalStops = template.match(/\$\{0\}|\$0/g); - if (!matchFinalStops || matchFinalStops.length === 1) { - return CodeSnippet.fromTextmate(template); - } - - // Emmet sometimes returns snippets with multiple ${0} - // In such cases, replace ${0} with incremental tab stops - - const snippetMarkers: Marker[] = new SnippetParser(true, false).parse(template) || []; - let getMaxTabStop = (markers: Marker[]): number => { - let currentMaxTabStop = -1; - markers.forEach(marker => { - if (marker instanceof Placeholder && /^\d+$/.test(marker['name'])) { - let currentTabStop = Number(marker['name']); - let nestedMaxTabStop = getMaxTabStop(marker['defaultValue'] || []); - currentMaxTabStop = Math.max(currentMaxTabStop, currentTabStop, nestedMaxTabStop); - } - }); - return currentMaxTabStop; - }; - - let maxTabStop = getMaxTabStop(snippetMarkers); - - let setNextTabStop = (markers: Marker[]) => { - markers.forEach(marker => { - if (marker instanceof Placeholder) { - if (marker['name'] === '0') { - marker['name'] = ++maxTabStop + ''; - } - setNextTabStop(marker['defaultValue'] || []); - } - }); - }; - - setNextTabStop(snippetMarkers); - - const snippet = new CodeSnippet(); - _fillCodeSnippetFromMarker(snippet, snippetMarkers); - return snippet; - } - - public lines: string[] = []; - public placeHolders: IPlaceHolder[] = []; - public finishPlaceHolderIndex: number = -1; - - get isInsertOnly(): boolean { - return this.placeHolders.length === 0; - } - - get isSingleTabstopOnly(): boolean { - if (this.placeHolders.length !== 1) { - return false; - } - - const [placeHolder] = this.placeHolders; - if (placeHolder.value !== '' || placeHolder.occurences.length !== 1) { - return false; - } - - const [placeHolderRange] = placeHolder.occurences; - if (!Range.isEmpty(placeHolderRange)) { - return false; - } - return true; - } - - private extractLineIndentation(str: string, maxColumn: number = Number.MAX_VALUE): string { - var fullIndentation = strings.getLeadingWhitespace(str); - - if (fullIndentation.length > maxColumn - 1) { - return fullIndentation.substring(0, maxColumn - 1); - } - - return fullIndentation; - } - - public bind(referenceLine: string, deltaLine: number, firstLineDeltaColumn: number, config: IIndentationNormalizer): ICodeSnippet { - const resultLines: string[] = []; - const resultPlaceHolders: IPlaceHolder[] = []; - - const referenceIndentation = this.extractLineIndentation(referenceLine, firstLineDeltaColumn + 1); - - // Compute resultLines & keep deltaColumns as a reference for adjusting placeholders - const deltaColumns: number[] = []; - - for (let i = 0, len = this.lines.length; i < len; i++) { - let originalLine = this.lines[i]; - if (i === 0) { - deltaColumns[i + 1] = firstLineDeltaColumn; - resultLines[i] = originalLine; - } else { - let originalLineIndentation = this.extractLineIndentation(originalLine); - let remainingLine = originalLine.substr(originalLineIndentation.length); - let indentation = config.normalizeIndentation(referenceIndentation + originalLineIndentation); - deltaColumns[i + 1] = indentation.length - originalLineIndentation.length; - resultLines[i] = indentation + remainingLine; - } - } - - // Compute resultPlaceHolders - for (const originalPlaceHolder of this.placeHolders) { - let resultOccurences = []; - - for (let { startLineNumber, startColumn, endLineNumber, endColumn } of originalPlaceHolder.occurences) { - - if (startColumn > 1 || startLineNumber === 1) { - // placeholders that aren't at the beginning of new snippet lines - // will be moved by how many characters the indentation has been - // adjusted - startColumn = startColumn + deltaColumns[startLineNumber]; - endColumn = endColumn + deltaColumns[endLineNumber]; - - } else { - // placeholders at the beginning of new snippet lines - // will be indented by the reference indentation - startColumn += referenceIndentation.length; - endColumn += referenceIndentation.length; - } - - resultOccurences.push({ - startLineNumber: startLineNumber + deltaLine, - startColumn, - endLineNumber: endLineNumber + deltaLine, - endColumn, - }); - } - - resultPlaceHolders.push({ - id: originalPlaceHolder.id, - value: originalPlaceHolder.value, - occurences: resultOccurences - }); - } - - return { - lines: resultLines, - placeHolders: resultPlaceHolders, - finishPlaceHolderIndex: this.finishPlaceHolderIndex - }; - } -} - - -// --- parsing - - -interface ISnippetParser { - parse(input: string): CodeSnippet; -} - -interface IParsedLinePlaceHolderInfo { - id: string; - value: string; - startColumn: number; - endColumn: number; -} - -interface IParsedLine { - line: string; - placeHolders: IParsedLinePlaceHolderInfo[]; -} - -function _resolveSnippetVariables(marker: Marker[], resolver: ISnippetVariableResolver) { - if (resolver) { - const stack = [...marker]; - - while (stack.length > 0) { - const marker = stack.shift(); - if (marker instanceof Variable) { - - try { - marker.resolvedValue = resolver.resolve(marker.name); - } catch (e) { - // - } - if (marker.isDefined) { - continue; - } - } - - if (marker instanceof Variable || marker instanceof Placeholder) { - // 'recurse' - stack.unshift(...marker.defaultValue); - } - } - } -} - -function _isFinishPlaceHolder(v: IPlaceHolder) { - return (v.id === '' && v.value === '') || v.id === '0'; -} - -function _fillCodeSnippetFromMarker(snippet: CodeSnippet, marker: Marker[]) { - - let placeHolders: { [id: string]: IPlaceHolder } = Object.create(null); - let hasFinishPlaceHolder = false; - - const stack = [...marker]; - snippet.lines = ['']; - while (stack.length > 0) { - const marker = stack.shift(); - if (marker instanceof Text) { - // simple text - let lines = marker.string.split(/\r\n|\n|\r/); - snippet.lines[snippet.lines.length - 1] += lines.shift(); - snippet.lines.push(...lines); - - } else if (marker instanceof Placeholder) { - - let placeHolder = placeHolders[marker.name]; - if (!placeHolder) { - placeHolders[marker.name] = placeHolder = { - id: marker.name, - value: Marker.toString(marker.defaultValue), - occurences: [] - }; - snippet.placeHolders.push(placeHolder); - } - hasFinishPlaceHolder = hasFinishPlaceHolder || _isFinishPlaceHolder(placeHolder); - - const line = snippet.lines.length; - const column = snippet.lines[line - 1].length + 1; - - placeHolder.occurences.push(new Range( - line, - column, - line, - column + Marker.toString(marker.defaultValue).length // TODO multiline placeholders! - )); - - stack.unshift(...marker.defaultValue); - - } else if (marker instanceof Variable) { - - if (!marker.isDefined) { - // contine as placeholder - // THIS is because of us having falsy - // advertised ${foo} as placeholder syntax - stack.unshift(new Placeholder(marker.name, marker.defaultValue.length === 0 - ? [new Text(marker.name)] - : marker.defaultValue)); - - } else if (marker.resolvedValue) { - // contine with the value - stack.unshift(new Text(marker.resolvedValue)); - - } else { - // continue with default values - stack.unshift(...marker.defaultValue); - } - } - - if (stack.length === 0 && !hasFinishPlaceHolder) { - stack.push(new Placeholder('0', [])); - } - } - - // Named variables (e.g. {greeting} and {greeting:Hello}) are sorted first, followed by - // tab-stops and numeric variables (e.g. $1, $2, ${3:foo}) which are sorted in ascending order - snippet.placeHolders.sort((a, b) => { - let nonIntegerId = (v: IPlaceHolder) => !(/^\d+$/).test(v.id); - - // Sort finish placeholder last - if (_isFinishPlaceHolder(a)) { - return 1; - } else if (_isFinishPlaceHolder(b)) { - return -1; - } - - // Sort named placeholders first - if (nonIntegerId(a) && nonIntegerId(b)) { - return 0; - } else if (nonIntegerId(a)) { - return -1; - } else if (nonIntegerId(b)) { - return 1; - } - - if (a.id === b.id) { - return 0; - } - - return Number(a.id) < Number(b.id) ? -1 : 1; - }); - - if (snippet.placeHolders.length > 0) { - snippet.finishPlaceHolderIndex = snippet.placeHolders.length - 1; - snippet.placeHolders[snippet.finishPlaceHolderIndex].id = ''; - } -} diff --git a/src/vs/editor/contrib/snippet/common/snippetController.ts b/src/vs/editor/contrib/snippet/common/snippetController.ts deleted file mode 100644 index e5cdde2bb38fb..0000000000000 --- a/src/vs/editor/contrib/snippet/common/snippetController.ts +++ /dev/null @@ -1,762 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; -import { binarySearch } from 'vs/base/common/arrays'; -import { RawContextKey, IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; -import { EditOperation } from 'vs/editor/common/core/editOperation'; -import { Range } from 'vs/editor/common/core/range'; -import { Selection } from 'vs/editor/common/core/selection'; -import * as editorCommon from 'vs/editor/common/editorCommon'; -import { CommonEditorRegistry, commonEditorContribution, EditorCommand } from 'vs/editor/common/editorCommonExtensions'; -import { IDisposable, dispose } from 'vs/base/common/lifecycle'; -import { ISnippetVariableResolver, ICodeSnippet, CodeSnippet } from './snippet'; -import { SnippetVariablesResolver } from './snippetVariables'; -import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; -import { Position } from 'vs/editor/common/core/position'; -import { ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; - -export class InsertSnippetController { - - private editor: editorCommon.ICommonCodeEditor; - private model: editorCommon.IModel; - private finishPlaceHolderIndex: number; - - private listenersToRemove: IDisposable[]; - private trackedPlaceHolders: ITrackedPlaceHolder[]; - private placeHolderDecorations: string[]; - private currentPlaceHolderIndex: number; - private highlightDecorationId: string; - private isFinished: boolean; - - private _onStop: () => void; - private _initialAlternativeVersionId: number; - - constructor(editor: editorCommon.ICommonCodeEditor, adaptedSnippet: ICodeSnippet, startLineNumber: number, initialAlternativeVersionId: number, onStop: () => void) { - this.editor = editor; - this._onStop = onStop; - this.model = editor.getModel(); - this.finishPlaceHolderIndex = adaptedSnippet.finishPlaceHolderIndex; - - this.trackedPlaceHolders = []; - this.placeHolderDecorations = []; - this.currentPlaceHolderIndex = 0; - this.highlightDecorationId = null; - this.isFinished = false; - - this._initialAlternativeVersionId = initialAlternativeVersionId; - - this.initialize(adaptedSnippet, startLineNumber); - } - - public dispose(): void { - this.stopAll(); - } - - private initialize(adaptedSnippet: ICodeSnippet, startLineNumber: number): void { - - // sorted list of all placeholder occurences for subsequent lockups - const sortedOccurrences: Range[] = []; - for (const { occurences } of adaptedSnippet.placeHolders) { - for (const range of occurences) { - sortedOccurrences.push(range); - } - } - sortedOccurrences.sort(Range.compareRangesUsingStarts); - - // track each occurence - this.model.changeDecorations((changeAccessor) => { - - for (let i = 0; i < adaptedSnippet.placeHolders.length; i++) { - const { occurences } = adaptedSnippet.placeHolders[i]; - const trackedRanges: string[] = []; - - for (const range of occurences) { - let stickiness = editorCommon.TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges; - - if (i === adaptedSnippet.finishPlaceHolderIndex) { - // final tab stop decoration never grows - stickiness = editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges; - - } else { - // Check if the previous range ends exactly where this range starts - // and iff so change the stickiness to avoid conflicts - let idx = binarySearch(sortedOccurrences, range, Range.compareRangesUsingStarts); - if (idx > 0 - && sortedOccurrences[idx - 1].endLineNumber === range.startLineNumber - && sortedOccurrences[idx - 1].endColumn === range.startColumn) { - - stickiness = editorCommon.TrackedRangeStickiness.GrowsOnlyWhenTypingAfter; - } - } - - trackedRanges.push(changeAccessor.addDecoration(range, { - stickiness: stickiness - })); - } - - this.trackedPlaceHolders.push({ - ranges: trackedRanges - }); - } - }); - - this.editor.changeDecorations((changeAccessor: editorCommon.IModelDecorationsChangeAccessor) => { - let newDecorations: editorCommon.IModelDeltaDecoration[] = []; - - let endLineNumber = startLineNumber + adaptedSnippet.lines.length - 1; - let endLineNumberMaxColumn = this.model.getLineMaxColumn(endLineNumber); - newDecorations.push({ - range: new Range(startLineNumber, 1, endLineNumber, endLineNumberMaxColumn), - options: { - className: 'new-snippet', - isWholeLine: true - } - }); - - for (let i = 0, len = this.trackedPlaceHolders.length; i < len; i++) { - let className = (i === this.finishPlaceHolderIndex) ? 'finish-snippet-placeholder' : 'snippet-placeholder'; - newDecorations.push({ - range: this.model.getDecorationRange(this.trackedPlaceHolders[i].ranges[0]), - options: { - stickiness: this.model.getDecorationOptions(this.trackedPlaceHolders[i].ranges[0]).stickiness, - className: className - } - }); - } - - let decorations = changeAccessor.deltaDecorations([], newDecorations); - this.highlightDecorationId = decorations[0]; - this.placeHolderDecorations = decorations.slice(1); - }); - - // let print = () => { - // console.log('trackedPlaceHolders: ' + this.trackedPlaceHolders.map((placeholder, index) => 'placeHolder index ' + index + ': ' + placeholder.ranges.map(id => id + '(' + this.model.getDecorationRange(id) + ')').join(', ')).join('\n')); - // console.log('highlightDecoration: ' + this.highlightDecorationId + '(' + this.model.getDecorationRange(this.highlightDecorationId) + ')'); - // console.log('placeHolderDecorations: ' + this.placeHolderDecorations.map(id => id + '(' + this.model.getDecorationRange(id) + ')').join(', ')); - // }; - // print(); - - let _highlightRange = this.model.getDecorationRange(this.highlightDecorationId); - - this.listenersToRemove = []; - this.listenersToRemove.push(this.editor.onDidChangeModelContent((e) => { - // console.log('-------MODEL CHANGED'); - // print(); - if (this.isFinished) { - return; - } - - if (e.isFlush) { - // a model.setValue() was called - this.stopAll(); - return; - } - - const newAlternateVersionId = this.editor.getModel().getAlternativeVersionId(); - if (this._initialAlternativeVersionId === newAlternateVersionId) { - // We executed undo until we reached the same version we started with - this.stopAll(); - return; - } - - for (let i = 0, len = e.changes.length; i < len; i++) { - const change = e.changes[i]; - const intersection = _highlightRange.intersectRanges(change.range); - if (intersection === null) { - // Did an edit outside of the snippet - this.stopAll(); - return; - } - } - - // Keep the highlightRange for the next round of model change events - _highlightRange = this.model.getDecorationRange(this.highlightDecorationId); - })); - - this.listenersToRemove.push(this.editor.onDidChangeCursorPosition((e: ICursorPositionChangedEvent) => { - if (this.isFinished) { - return; - } - var highlightRange = this.model.getDecorationRange(this.highlightDecorationId); - if (!highlightRange) { - this.stopAll(); - return; - } - var lineNumber = e.position.lineNumber; - if (lineNumber < highlightRange.startLineNumber || lineNumber > highlightRange.endLineNumber) { - this.stopAll(); - } - })); - - this.listenersToRemove.push(this.editor.onDidChangeModel(() => { - this.stopAll(); - })); - - var blurTimeout = -1; - this.listenersToRemove.push(this.editor.onDidBlurEditor(() => { - // Blur if within 100ms we do not focus back - blurTimeout = setTimeout(() => { - this.stopAll(); - }, 100); - })); - - this.listenersToRemove.push(this.editor.onDidFocusEditor(() => { - // Cancel the blur timeout (if any) - if (blurTimeout !== -1) { - clearTimeout(blurTimeout); - blurTimeout = -1; - } - })); - - this.listenersToRemove.push(this.model.onDidChangeDecorations((e) => { - if (this.isFinished) { - return; - } - - var modelEditableRange = this.model.getEditableRange(), - previousRange: Range = null, - allCollapsed = true, - allEqualToEditableRange = true; - - for (var i = 0; (allCollapsed || allEqualToEditableRange) && i < this.trackedPlaceHolders.length; i++) { - var ranges = this.trackedPlaceHolders[i].ranges; - - for (var j = 0; (allCollapsed || allEqualToEditableRange) && j < ranges.length; j++) { - var range = this.model.getDecorationRange(ranges[j]); - - if (allCollapsed) { - if (!range.isEmpty()) { - allCollapsed = false; - } else if (previousRange === null) { - previousRange = range; - } else if (!previousRange.equalsRange(range)) { - allCollapsed = false; - } - } - - if (allEqualToEditableRange && !modelEditableRange.equalsRange(range)) { - allEqualToEditableRange = false; - } - } - } - - - if (allCollapsed || allEqualToEditableRange) { - this.stopAll(); - } else { - if (this.finishPlaceHolderIndex !== -1) { - var finishPlaceHolderDecorationId = this.placeHolderDecorations[this.finishPlaceHolderIndex]; - var finishPlaceHolderRange = this.model.getDecorationRange(finishPlaceHolderDecorationId); - var finishPlaceHolderOptions = this.model.getDecorationOptions(finishPlaceHolderDecorationId); - - var finishPlaceHolderRangeIsEmpty = finishPlaceHolderRange.isEmpty(); - var finishPlaceHolderClassNameIsForEmpty = (finishPlaceHolderOptions.className === 'finish-snippet-placeholder'); - - // Remember xor? :) - var needsChanging = Number(finishPlaceHolderRangeIsEmpty) ^ Number(finishPlaceHolderClassNameIsForEmpty); - - if (needsChanging) { - this.editor.changeDecorations((changeAccessor: editorCommon.IModelDecorationsChangeAccessor) => { - var className = finishPlaceHolderRangeIsEmpty ? 'finish-snippet-placeholder' : 'snippet-placeholder'; - changeAccessor.changeDecorationOptions(finishPlaceHolderDecorationId, { - className: className - }); - }); - } - } - } - })); - - this.doLinkEditing(); - } - - public onNextPlaceHolder(): boolean { - return this.changePlaceHolder(true); - } - - public onPrevPlaceHolder(): boolean { - return this.changePlaceHolder(false); - } - - private changePlaceHolder(goToNext: boolean): boolean { - if (this.isFinished) { - return false; - } - - var oldPlaceHolderIndex = this.currentPlaceHolderIndex; - var oldRange = this.model.getDecorationRange(this.trackedPlaceHolders[oldPlaceHolderIndex].ranges[0]); - var sameRange = true; - do { - if (goToNext) { - this.currentPlaceHolderIndex = (this.currentPlaceHolderIndex + 1) % this.trackedPlaceHolders.length; - } else { - this.currentPlaceHolderIndex = (this.trackedPlaceHolders.length + this.currentPlaceHolderIndex - 1) % this.trackedPlaceHolders.length; - } - - var newRange = this.model.getDecorationRange(this.trackedPlaceHolders[this.currentPlaceHolderIndex].ranges[0]); - - sameRange = oldRange.equalsRange(newRange); - - } while (this.currentPlaceHolderIndex !== oldPlaceHolderIndex && sameRange); - - this.doLinkEditing(); - return true; - } - - public onAccept(): boolean { - if (this.isFinished) { - return false; - } - if (this.finishPlaceHolderIndex !== -1) { - var finishRange = this.model.getDecorationRange(this.trackedPlaceHolders[this.finishPlaceHolderIndex].ranges[0]); - // Let's just position cursor at the end of the finish range - this.editor.setPosition({ - lineNumber: finishRange.endLineNumber, - column: finishRange.endColumn - }); - } - this.stopAll(); - return true; - } - - public onEscape(): boolean { - if (this.isFinished) { - return false; - } - this.stopAll(); - // Cancel multi-cursor - this.editor.setSelections([this.editor.getSelections()[0]]); - return true; - } - - private doLinkEditing(): void { - const selections: Selection[] = []; - for (let i = 0, len = this.trackedPlaceHolders[this.currentPlaceHolderIndex].ranges.length; i < len; i++) { - const range = this.model.getDecorationRange(this.trackedPlaceHolders[this.currentPlaceHolderIndex].ranges[i]); - selections.push(new Selection( - range.startLineNumber, - range.startColumn, - range.endLineNumber, - range.endColumn - )); - } - this.editor.setSelections(selections); - this.editor.revealRangeInCenterIfOutsideViewport(this.editor.getSelection()); - } - - private stopAll(): void { - if (this.isFinished) { - return; - } - this.isFinished = true; - - this._onStop(); - - this.listenersToRemove = dispose(this.listenersToRemove); - - this.model.changeDecorations((changeAccessor) => { - for (var i = 0; i < this.trackedPlaceHolders.length; i++) { - var ranges = this.trackedPlaceHolders[i].ranges; - for (var j = 0; j < ranges.length; j++) { - changeAccessor.removeDecoration(ranges[j]); - } - } - }); - this.trackedPlaceHolders = []; - - this.editor.changeDecorations((changeAccessor: editorCommon.IModelDecorationsChangeAccessor) => { - let toRemove: string[] = []; - toRemove.push(this.highlightDecorationId); - for (let i = 0; i < this.placeHolderDecorations.length; i++) { - toRemove.push(this.placeHolderDecorations[i]); - } - changeAccessor.deltaDecorations(toRemove, []); - this.placeHolderDecorations = []; - this.highlightDecorationId = null; - }); - } -} - -export interface ITrackedPlaceHolder { - ranges: string[]; -} - -interface IPreparedSnippet { - typeRange: Range; - adaptedSnippet: ICodeSnippet; -} - -class BeforeAfterData { - - static create(model: editorCommon.IModel, selection: Selection, overwriteBefore: number, overwriteAfter: number) { - - let contentBefore = ''; - if (overwriteBefore > 0) { - contentBefore = model.getLineContent(selection.startLineNumber).substring(selection.startColumn - 1 - overwriteBefore, selection.startColumn - 1); - } - - let contentAfter = ''; - if (overwriteAfter > 0) { - contentAfter = model.getLineContent(selection.endLineNumber).substring(selection.endColumn - 1, selection.endColumn - 1 + overwriteAfter); - } - - return new BeforeAfterData(model, contentBefore, contentAfter, overwriteBefore, overwriteAfter); - } - - constructor(private readonly _model: editorCommon.IModel, - private readonly _contentBefore: string, - private readonly _contentAfter: string, - public readonly overwriteBefore: number, - public readonly overwriteAfter: number - ) { - // - } - - next(selection: Selection) { - const data = BeforeAfterData.create(this._model, selection, this.overwriteBefore, this.overwriteAfter); - let { overwriteBefore, overwriteAfter } = data; - if (data._contentBefore !== this._contentBefore) { - overwriteBefore = 0; - } - if (data._contentAfter !== this._contentAfter) { - overwriteAfter = 0; - } - return new BeforeAfterData(this._model, null, null, overwriteBefore, overwriteAfter); - } -} - -@commonEditorContribution -export class SnippetController { - - private static ID = 'editor.contrib.snippetController'; - - public static get(editor: editorCommon.ICommonCodeEditor): SnippetController { - return editor.getContribution(SnippetController.ID); - } - - private _editor: editorCommon.ICommonCodeEditor; - private _variableResolver: ISnippetVariableResolver; - protected _currentController: InsertSnippetController; - private _inSnippetMode: IContextKey; - - constructor(editor: editorCommon.ICommonCodeEditor, @IContextKeyService contextKeyService: IContextKeyService) { - this._editor = editor; - this._variableResolver = new SnippetVariablesResolver(editor); - this._currentController = null; - this._inSnippetMode = CONTEXT_SNIPPET_MODE.bindTo(contextKeyService); - } - - public dispose(): void { - if (this._currentController) { - this._currentController.dispose(); - this._currentController = null; - } - } - - public getId(): string { - return SnippetController.ID; - } - - public insertSnippet(template: string, overwriteBefore: number, overwriteAfter: number): void { - const snippet = CodeSnippet.fromTextmate(template, this._variableResolver); - this.run(snippet, overwriteBefore, overwriteAfter); - } - - public run(snippet: CodeSnippet, overwriteBefore: number, overwriteAfter: number): void { - this._runAndRestoreController(() => { - if (snippet.isInsertOnly || snippet.isSingleTabstopOnly) { - // Only inserts text, not placeholders, tabstops etc - // Only cursor endposition - this._runForAllSelections(snippet, overwriteBefore, overwriteAfter); - - } else { - let prepared = SnippetController._prepareSnippet(this._editor, this._editor.getSelection(), snippet, overwriteBefore, overwriteAfter); - this._runPreparedSnippetForPrimarySelection(prepared, true); - } - }); - } - - /** - * Inserts once `snippet` at the start of `replaceRange`, after deleting `replaceRange`. - */ - public runWithReplaceRange(snippet: CodeSnippet, replaceRange: Range): void { - this._runAndRestoreController(() => { - this._runPreparedSnippetForPrimarySelection({ - typeRange: replaceRange, - adaptedSnippet: SnippetController._getAdaptedSnippet(this._editor.getModel(), snippet, replaceRange) - }, false); - }); - } - - private _runAndRestoreController(callback: () => void): void { - let prevController = this._currentController; - this._currentController = null; - - callback(); - - if (!this._currentController) { - // we didn't end up in snippet mode again => restore previous controller - this._currentController = prevController; - } else { - // we ended up in snippet mode => dispose previous controller if necessary - if (prevController) { - prevController.dispose(); - } - } - } - - private static _addCommandForSnippet(model: editorCommon.ITextModel, adaptedSnippet: ICodeSnippet, typeRange: Range, out: editorCommon.IIdentifiedSingleEditOperation[]): void { - let insertText = adaptedSnippet.lines.join('\n'); - let currentText = model.getValueInRange(typeRange, editorCommon.EndOfLinePreference.LF); - if (insertText !== currentText) { - out.push(EditOperation.replaceMove(typeRange, insertText)); - } - } - - private _runPreparedSnippetForPrimarySelection(prepared: IPreparedSnippet, undoStops: boolean): void { - let initialAlternativeVersionId = this._editor.getModel().getAlternativeVersionId(); - - let edits: editorCommon.IIdentifiedSingleEditOperation[] = []; - - SnippetController._addCommandForSnippet(this._editor.getModel(), prepared.adaptedSnippet, prepared.typeRange, edits); - - if (edits.length > 0) { - if (undoStops) { - this._editor.pushUndoStop(); - } - this._editor.executeEdits('editor.contrib.insertSnippetHelper', edits); - if (undoStops) { - this._editor.pushUndoStop(); - } - } - - let cursorOnly = SnippetController._getSnippetCursorOnly(prepared.adaptedSnippet); - if (cursorOnly) { - this._editor.setSelection(new Selection(cursorOnly.lineNumber, cursorOnly.column, cursorOnly.lineNumber, cursorOnly.column)); - } else if (prepared.adaptedSnippet.placeHolders.length > 0) { - this._inSnippetMode.set(true); - this._currentController = new InsertSnippetController(this._editor, prepared.adaptedSnippet, prepared.typeRange.startLineNumber, initialAlternativeVersionId, () => { - this._inSnippetMode.reset(); - if (this._currentController) { - this._currentController.dispose(); - this._currentController = null; - } - }); - } - } - - private _runForAllSelections(snippet: CodeSnippet, overwriteBefore: number, overwriteAfter: number): void { - - const edits: editorCommon.IIdentifiedSingleEditOperation[] = []; - const selections = this._editor.getSelections(); - const model = this._editor.getModel(); - const primaryBeforeAfter = BeforeAfterData.create(model, selections[0], overwriteBefore, overwriteAfter); - - let totalDelta = 0; - const newSelections: { offset: number; i: number }[] = []; - - // sort selections by start position but remember where - // each selection came from - const selectionEntries = selections - .map((selection, i) => ({ selection, i })) - .sort((a, b) => Range.compareRangesUsingStarts(a.selection, b.selection)); - - for (const { selection, i } of selectionEntries) { - - // only use overwrite[Before|After] for secondary cursors - // when the same text as with the primary cursor is selected - const beforeAfter = i !== 0 ? primaryBeforeAfter.next(selection) : primaryBeforeAfter; - - let { adaptedSnippet, typeRange } = SnippetController._prepareSnippet( - this._editor, - selection, - snippet, - beforeAfter.overwriteBefore, - beforeAfter.overwriteAfter - ); - - SnippetController._addCommandForSnippet(this._editor.getModel(), adaptedSnippet, typeRange, edits); - - // compute new selection offset - // * get current offset - // * get length of snippet that we insert - // * get final cursor position of snippet that we insert (might not exist) - // * NEW selection offset is current + final cursor pos + inserts_until_here - - let offset = model.getOffsetAt(typeRange.getStartPosition()); - - // inserts until here - offset += totalDelta; - - // each snippet has a different length (because of whitespace changes) - let snippetLength = (adaptedSnippet.lines.length - 1) * model.getEOL().length; - for (const line of adaptedSnippet.lines) { - snippetLength += line.length; - } - - // each snippet has a different cursor offset - const finalCursorPos = SnippetController._getSnippetCursorOnly(adaptedSnippet); - if (finalCursorPos) { - let finalCursorOffset: number; - if (finalCursorPos.lineNumber === typeRange.startLineNumber) { - finalCursorOffset = finalCursorPos.column - typeRange.startColumn; - } else { - finalCursorOffset = finalCursorPos.column - 1; - for (let i = 0, lineNumber = typeRange.startLineNumber; lineNumber < finalCursorPos.lineNumber; i++ , lineNumber++) { - finalCursorOffset += adaptedSnippet.lines[i].length + model.getEOL().length; - } - } - offset += finalCursorOffset; - - } else { - offset += snippetLength; - } - - newSelections.push({ offset, i }); - totalDelta += (snippetLength - model.getValueLengthInRange(typeRange)); - } - - if (edits.length === 0) { - return; - } - - const cursorStateComputer: editorCommon.ICursorStateComputer = function () { - // create new selections from the new selection offsets - // and restore the order we had at the beginning - const result: Selection[] = []; - for (const { offset, i } of newSelections) { - const pos = model.getPositionAt(offset); - result[i] = new Selection(pos.lineNumber, pos.column, pos.lineNumber, pos.column); - } - return result; - }; - - model.pushStackElement(); - this._editor.setSelections(model.pushEditOperations(selections, edits, cursorStateComputer)); - model.pushStackElement(); - } - - private static _prepareSnippet(editor: editorCommon.ICommonCodeEditor, selection: Selection, snippet: CodeSnippet, overwriteBefore: number, overwriteAfter: number): { typeRange: Range; adaptedSnippet: ICodeSnippet; } { - const model = editor.getModel(); - const typeRange = SnippetController._getTypeRangeForSelection(model, selection, overwriteBefore, overwriteAfter); - const adaptedSnippet = SnippetController._getAdaptedSnippet(model, snippet, typeRange); - - return { typeRange, adaptedSnippet }; - } - - private static _getTypeRangeForSelection(model: editorCommon.IModel, selection: Selection, overwriteBefore: number, overwriteAfter: number): Range { - var typeRange: Range; - if (overwriteBefore || overwriteAfter) { - typeRange = model.validateRange(Range.plusRange(selection, { - startLineNumber: selection.positionLineNumber, - startColumn: selection.positionColumn - overwriteBefore, - endLineNumber: selection.positionLineNumber, - endColumn: selection.positionColumn + overwriteAfter - })); - } else { - typeRange = selection; - } - return typeRange; - } - - private static _getAdaptedSnippet(model: editorCommon.IModel, snippet: CodeSnippet, typeRange: Range): ICodeSnippet { - return snippet.bind(model.getLineContent(typeRange.startLineNumber), typeRange.startLineNumber - 1, typeRange.startColumn - 1, model); - } - - private static _getSnippetCursorOnly(snippet: ICodeSnippet): Position { - - if (snippet.placeHolders.length !== 1) { - return null; - } - - var placeHolder = snippet.placeHolders[0]; - if (placeHolder.value !== '' || placeHolder.occurences.length !== 1) { - return null; - } - - var placeHolderRange = placeHolder.occurences[0]; - if (!Range.isEmpty(placeHolderRange)) { - return null; - } - - return new Position( - placeHolderRange.startLineNumber, - placeHolderRange.startColumn - ); - } - - public jumpToNextPlaceholder(): void { - if (this._currentController) { - this._currentController.onNextPlaceHolder(); - } - } - - public jumpToPrevPlaceholder(): void { - if (this._currentController) { - this._currentController.onPrevPlaceHolder(); - } - } - - public acceptSnippet(): void { - if (this._currentController) { - this._currentController.onAccept(); - } - } - - public leaveSnippet(): void { - if (this._currentController) { - this._currentController.onEscape(); - } - } -} - -export var CONTEXT_SNIPPET_MODE = new RawContextKey('inSnippetMode', false); - -const SnippetCommand = EditorCommand.bindToContribution(SnippetController.get); - -CommonEditorRegistry.registerEditorCommand(new SnippetCommand({ - id: 'jumpToNextSnippetPlaceholder', - precondition: CONTEXT_SNIPPET_MODE, - handler: x => x.jumpToNextPlaceholder(), - kbOpts: { - weight: CommonEditorRegistry.commandWeight(30), - kbExpr: EditorContextKeys.textFocus, - primary: KeyCode.Tab - } -})); -CommonEditorRegistry.registerEditorCommand(new SnippetCommand({ - id: 'jumpToPrevSnippetPlaceholder', - precondition: CONTEXT_SNIPPET_MODE, - handler: x => x.jumpToPrevPlaceholder(), - kbOpts: { - weight: CommonEditorRegistry.commandWeight(30), - kbExpr: EditorContextKeys.textFocus, - primary: KeyMod.Shift | KeyCode.Tab - } -})); -CommonEditorRegistry.registerEditorCommand(new SnippetCommand({ - id: 'acceptSnippet', - precondition: CONTEXT_SNIPPET_MODE, - handler: x => x.acceptSnippet(), - kbOpts: { - weight: CommonEditorRegistry.commandWeight(30), - kbExpr: EditorContextKeys.textFocus, - primary: KeyCode.Enter - } -})); -CommonEditorRegistry.registerEditorCommand(new SnippetCommand({ - id: 'leaveSnippet', - precondition: CONTEXT_SNIPPET_MODE, - handler: x => x.leaveSnippet(), - kbOpts: { - weight: CommonEditorRegistry.commandWeight(30), - kbExpr: EditorContextKeys.textFocus, - primary: KeyCode.Escape, - secondary: [KeyMod.Shift | KeyCode.Escape] - } -})); diff --git a/src/vs/editor/contrib/snippet/common/snippetParser.ts b/src/vs/editor/contrib/snippet/common/snippetParser.ts deleted file mode 100644 index 7017f77383cd5..0000000000000 --- a/src/vs/editor/contrib/snippet/common/snippetParser.ts +++ /dev/null @@ -1,390 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import { CharCode } from 'vs/base/common/charCode'; - -export enum TokenType { - Dollar, - Colon, - CurlyOpen, - CurlyClose, - Backslash, - Int, - VariableName, - Format, - EOF -} - -export interface Token { - type: TokenType; - pos: number; - len: number; -} - - -export class Scanner { - - private static _table: { [ch: number]: TokenType } = { - [CharCode.DollarSign]: TokenType.Dollar, - [CharCode.Colon]: TokenType.Colon, - [CharCode.OpenCurlyBrace]: TokenType.CurlyOpen, - [CharCode.CloseCurlyBrace]: TokenType.CurlyClose, - [CharCode.Backslash]: TokenType.Backslash, - }; - - static isDigitCharacter(ch: number): boolean { - return ch >= CharCode.Digit0 && ch <= CharCode.Digit9; - } - - static isVariableCharacter(ch: number): boolean { - return ch === CharCode.Underline - || (ch >= CharCode.a && ch <= CharCode.z) - || (ch >= CharCode.A && ch <= CharCode.Z); - } - - value: string; - pos: number; - - constructor() { - this.text(''); - } - - text(value: string) { - this.value = value; - this.pos = 0; - } - - tokenText(token: Token): string { - return this.value.substr(token.pos, token.len); - } - - next(): Token { - - if (this.pos >= this.value.length) { - return { type: TokenType.EOF, pos: this.pos, len: 0 }; - } - - let pos = this.pos; - let len = 0; - let ch = this.value.charCodeAt(pos); - let type: TokenType; - - // static types - type = Scanner._table[ch]; - if (typeof type === 'number') { - this.pos += 1; - return { type, pos, len: 1 }; - } - - // number - if (Scanner.isDigitCharacter(ch)) { - type = TokenType.Int; - do { - len += 1; - ch = this.value.charCodeAt(pos + len); - } while (Scanner.isDigitCharacter(ch)); - - this.pos += len; - return { type, pos, len }; - } - - // variable name - if (Scanner.isVariableCharacter(ch)) { - type = TokenType.VariableName; - do { - ch = this.value.charCodeAt(pos + (++len)); - } while (Scanner.isVariableCharacter(ch) || Scanner.isDigitCharacter(ch)); - - this.pos += len; - return { type, pos, len }; - } - - - // format - type = TokenType.Format; - do { - len += 1; - ch = this.value.charCodeAt(pos + len); - } while ( - !isNaN(ch) - && typeof Scanner._table[ch] === 'undefined' // not static token - && !Scanner.isDigitCharacter(ch) // not number - && !Scanner.isVariableCharacter(ch) // not variable - ); - - this.pos += len; - return { type, pos, len }; - } -} - -export abstract class Marker { - _markerBrand: any; - - static toString(marker?: Marker[]): string { - let result = ''; - for (const m of marker) { - result += m.toString(); - } - return result; - } - - toString() { - return ''; - } -} - -export class Text extends Marker { - constructor(public string: string) { - super(); - } - toString() { - return this.string; - } -} - -export class Placeholder extends Marker { - constructor(public name: string = '', public defaultValue: Marker[]) { - super(); - } - toString() { - return Marker.toString(this.defaultValue); - } -} - -export class Variable extends Marker { - - resolvedValue: string; - - constructor(public name: string = '', public defaultValue: Marker[]) { - super(); - } - - get isDefined(): boolean { - return this.resolvedValue !== undefined; - } - - toString() { - return this.isDefined ? this.resolvedValue : Marker.toString(this.defaultValue); - } -} - -export class SnippetParser { - - private _enableTextMate: boolean; - private _enableInternal: boolean; - private _scanner = new Scanner(); - private _token: Token; - private _prevToken: Token; - - constructor(enableTextMate: boolean = true, enableInternal: boolean = true) { - this._enableTextMate = enableTextMate; - this._enableInternal = enableInternal; - } - - escape(value: string): string { - return Marker.toString(this.parse(value)); - } - - parse(value: string): Marker[] { - const marker: Marker[] = []; - - this._scanner.text(value); - this._token = this._scanner.next(); - while (this._parseAny(marker) || this._parseText(marker)) { - // nothing - } - - // * fill in default for empty placeHolders - // * compact sibling Text markers - function compact(marker: Marker[], placeholders: { [name: string]: Marker[] }) { - - for (let i = 0; i < marker.length; i++) { - const thisMarker = marker[i]; - - if (thisMarker instanceof Placeholder) { - if (placeholders[thisMarker.name] === undefined) { - placeholders[thisMarker.name] = thisMarker.defaultValue; - } else if (thisMarker.defaultValue.length === 0) { - thisMarker.defaultValue = placeholders[thisMarker.name].slice(0); - } - - if (thisMarker.defaultValue.length > 0) { - compact(thisMarker.defaultValue, placeholders); - } - - } else if (thisMarker instanceof Variable) { - compact(thisMarker.defaultValue, placeholders); - - } else if (i > 0 && thisMarker instanceof Text && marker[i - 1] instanceof Text) { - (marker[i - 1]).string += (marker[i]).string; - marker.splice(i, 1); - i--; - } - } - } - - compact(marker, Object.create(null)); - - return marker; - } - - private _accept(type: TokenType): boolean { - if (type === undefined || this._token.type === type) { - this._prevToken = this._token; - this._token = this._scanner.next(); - return true; - } - return false; - } - - private _return(token: Token): void { - this._prevToken = undefined; - this._token = token; - this._scanner.pos = token.pos + token.len; - } - - private _parseAny(marker: Marker[]): boolean { - if (this._parseEscaped(marker)) { - return true; - } else if (this._enableInternal && this._parseInternal(marker)) { - return true; - } else if (this._enableTextMate && this._parseTM(marker)) { - return true; - } - return false; - } - - private _parseText(marker: Marker[]): boolean { - if (this._token.type !== TokenType.EOF) { - marker.push(new Text(this._scanner.tokenText(this._token))); - this._accept(undefined); - return true; - } - return false; - } - - private _parseTM(marker: Marker[]): boolean { - if (this._accept(TokenType.Dollar)) { - - if (this._accept(TokenType.VariableName) || this._accept(TokenType.Int)) { - // $FOO, $123 - const idOrName = this._scanner.tokenText(this._prevToken); - marker.push(/^\d+$/.test(idOrName) ? new Placeholder(idOrName, []) : new Variable(idOrName, [])); - return true; - - } else if (this._accept(TokenType.CurlyOpen)) { - // ${name:children} - let name: Marker[] = []; - let children: Marker[] = []; - let target = name; - - while (true) { - - if (target !== children && this._accept(TokenType.Colon)) { - target = children; - continue; - } - - if (this._accept(TokenType.CurlyClose)) { - const idOrName = Marker.toString(name); - marker.push(/^\d+$/.test(idOrName) ? new Placeholder(idOrName, children) : new Variable(idOrName, children)); - return true; - } - - if (this._parseAny(target) || this._parseText(target)) { - continue; - } - - // fallback - if (children.length > 0) { - marker.push(new Text('${' + Marker.toString(name) + ':')); - marker.push(...children); - } else { - marker.push(new Text('${')); - marker.push(...name); - } - return true; - } - } - - marker.push(new Text('$')); - return true; - } - return false; - } - - private _parseInternal(marker: Marker[]): boolean { - if (this._accept(TokenType.CurlyOpen)) { - - if (!this._accept(TokenType.CurlyOpen)) { - this._return(this._prevToken); - return false; - } - - // {{name:children}}, {{name}}, {{name:}} - let name: Marker[] = []; - let children: Marker[] = []; - let target = name; - - while (true) { - - if (this._accept(TokenType.Colon)) { - target = children; - continue; - } - - if (this._accept(TokenType.CurlyClose)) { - - if (!this._accept(TokenType.CurlyClose)) { - this._return(this._prevToken); - continue; - } - - if (children !== target) { - // we have not seen the colon which - // means use the ident also as - // default value - children = name; - } - - marker.push(new Placeholder(Marker.toString(name), children)); - return true; - } - - if (this._parseAny(target) || this._parseText(target)) { - continue; - } - - // fallback - if (children.length > 0) { - marker.push(new Text('{{' + Marker.toString(name) + ':')); - marker.push(...children); - } else { - marker.push(new Text('{{')); - marker.push(...name); - } - return true; - } - } - return false; - } - - private _parseEscaped(marker: Marker[]): boolean { - if (this._accept(TokenType.Backslash)) { - if (// Internal style - (this._enableInternal && (this._accept(TokenType.CurlyOpen) || this._accept(TokenType.CurlyClose) || this._accept(TokenType.Backslash))) - // TextMate style - || (this._enableTextMate && (this._accept(TokenType.Dollar) || this._accept(TokenType.CurlyClose) || this._accept(TokenType.Backslash))) - ) { - // just consume them - } - marker.push(new Text(this._scanner.tokenText(this._prevToken))); - return true; - } - return false; - } -} diff --git a/src/vs/editor/contrib/snippet/common/snippetVariables.ts b/src/vs/editor/contrib/snippet/common/snippetVariables.ts deleted file mode 100644 index 1a8e0a39604a0..0000000000000 --- a/src/vs/editor/contrib/snippet/common/snippetVariables.ts +++ /dev/null @@ -1,73 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import { basename, dirname, normalize } from 'vs/base/common/paths'; -import * as editorCommon from 'vs/editor/common/editorCommon'; -import { ISnippetVariableResolver } from './snippet'; - -export class SnippetVariablesResolver implements ISnippetVariableResolver { - - private _editor: editorCommon.ICommonCodeEditor; - - constructor(editor: editorCommon.ICommonCodeEditor) { - this._editor = editor; - } - - resolve(name: string): string { - const model = this._editor.getModel(); - if (!model) { - throw new Error(); - } - switch (name) { - case 'SELECTION': - case 'TM_SELECTED_TEXT': return this._tmSelectedText(); - case 'TM_CURRENT_LINE': return this._tmCurrentLine(); - case 'TM_CURRENT_WORD': return this._tmCurrentWord(); - case 'TM_LINE_INDEX': return this._tmLineIndex(); - case 'TM_LINE_NUMBER': return this._tmLineNumber(); - case 'TM_FILENAME': return this._tmFilename(); - case 'TM_DIRECTORY': return this._tmDirectory(); - case 'TM_FILEPATH': return this._tmFilepath(); - } - return undefined; - } - - private _tmCurrentLine(): string { - const { positionLineNumber } = this._editor.getSelection(); - return this._editor.getModel().getValueInRange({ startLineNumber: positionLineNumber, startColumn: 1, endLineNumber: positionLineNumber, endColumn: Number.MAX_VALUE }); - } - - private _tmCurrentWord(): string { - const word = this._editor.getModel().getWordAtPosition(this._editor.getPosition()); - return word ? word.word : ''; - } - - private _tmFilename(): string { - return basename(this._editor.getModel().uri.fsPath); - } - - private _tmDirectory(): string { - const dir = dirname(normalize(this._editor.getModel().uri.fsPath)); - return dir !== '.' ? dir : ''; - } - - private _tmFilepath(): string { - return this._editor.getModel().uri.fsPath; - } - - private _tmLineIndex(): string { - return String(this._editor.getSelection().positionLineNumber - 1); - } - - private _tmLineNumber(): string { - return String(this._editor.getSelection().positionLineNumber); - } - - private _tmSelectedText(): string { - return this._editor.getModel().getValueInRange(this._editor.getSelection()); - } -} diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetController2.old.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetController2.old.test.ts new file mode 100644 index 0000000000000..fc12236bd339f --- /dev/null +++ b/src/vs/editor/contrib/snippet/test/browser/snippetController2.old.test.ts @@ -0,0 +1,588 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import * as assert from 'assert'; +import { Position } from 'vs/editor/common/core/position'; +import { Selection } from 'vs/editor/common/core/selection'; +import { SnippetController2 } from 'vs/editor/contrib/snippet/browser/snippetController2'; +import { MockCodeEditor, withMockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; +import { Cursor } from 'vs/editor/common/controller/cursor'; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; + +class TestSnippetController extends SnippetController2 { + + constructor( + editor: ICommonCodeEditor, + @IContextKeyService private _contextKeyService: IContextKeyService + ) { + super(editor, _contextKeyService); + } + + isInSnippetMode(): boolean { + return SnippetController2.InSnippetMode.getValue(this._contextKeyService); + } + +} + +suite('SnippetController', () => { + + function snippetTest(cb: (editor: MockCodeEditor, cursor: Cursor, template: string, snippetController: TestSnippetController) => void, lines?: string[]): void { + + if (!lines) { + lines = [ + 'function test() {', + '\tvar x = 3;', + '\tvar arr = [];', + '\t', + '}' + ]; + }; + + withMockCodeEditor(lines, {}, (editor, cursor) => { + editor.getModel().updateOptions({ + insertSpaces: false + }); + let snippetController = editor.registerAndInstantiateContribution(TestSnippetController); + let template = [ + 'for (var ${1:index}; $1 < ${2:array}.length; $1++) {', + '\tvar element = $2[$1];', + '\t$0', + '}' + ].join('\n'); + + cb(editor, cursor, template, snippetController); + snippetController.dispose(); + }); + } + + test('Simple accepted', () => { + snippetTest((editor, cursor, template, snippetController) => { + editor.setPosition({ lineNumber: 4, column: 2 }); + + snippetController.insert(template, 0, 0); + assert.equal(editor.getModel().getLineContent(4), '\tfor (var index; index < array.length; index++) {'); + assert.equal(editor.getModel().getLineContent(5), '\t\tvar element = array[index];'); + assert.equal(editor.getModel().getLineContent(6), '\t\t'); + assert.equal(editor.getModel().getLineContent(7), '\t}'); + + editor.trigger('test', 'type', { text: 'i' }); + assert.equal(editor.getModel().getLineContent(4), '\tfor (var i; i < array.length; i++) {'); + assert.equal(editor.getModel().getLineContent(5), '\t\tvar element = array[i];'); + assert.equal(editor.getModel().getLineContent(6), '\t\t'); + assert.equal(editor.getModel().getLineContent(7), '\t}'); + + snippetController.next(); + editor.trigger('test', 'type', { text: 'arr' }); + assert.equal(editor.getModel().getLineContent(4), '\tfor (var i; i < arr.length; i++) {'); + assert.equal(editor.getModel().getLineContent(5), '\t\tvar element = arr[i];'); + assert.equal(editor.getModel().getLineContent(6), '\t\t'); + assert.equal(editor.getModel().getLineContent(7), '\t}'); + + snippetController.prev(); + editor.trigger('test', 'type', { text: 'j' }); + assert.equal(editor.getModel().getLineContent(4), '\tfor (var j; j < arr.length; j++) {'); + assert.equal(editor.getModel().getLineContent(5), '\t\tvar element = arr[j];'); + assert.equal(editor.getModel().getLineContent(6), '\t\t'); + assert.equal(editor.getModel().getLineContent(7), '\t}'); + + snippetController.next(); + snippetController.next(); + assert.deepEqual(editor.getPosition(), new Position(6, 3)); + }); + }); + + test('Simple canceled', () => { + snippetTest((editor, cursor, template, snippetController) => { + editor.setPosition({ lineNumber: 4, column: 2 }); + + snippetController.insert(template, 0, 0); + assert.equal(editor.getModel().getLineContent(4), '\tfor (var index; index < array.length; index++) {'); + assert.equal(editor.getModel().getLineContent(5), '\t\tvar element = array[index];'); + assert.equal(editor.getModel().getLineContent(6), '\t\t'); + assert.equal(editor.getModel().getLineContent(7), '\t}'); + + snippetController.cancel(); + assert.deepEqual(editor.getPosition(), new Position(4, 16)); + }); + }); + + // test('Stops when deleting lines above', () => { + // snippetTest((editor, cursor, codeSnippet, snippetController) => { + // editor.setPosition({ lineNumber: 4, column: 2 }); + // snippetController.insert(codeSnippet, 0, 0); + + // editor.getModel().applyEdits([{ + // forceMoveMarkers: false, + // identifier: null, + // isAutoWhitespaceEdit: false, + // range: new Range(1, 1, 3, 1), + // text: null + // }]); + + // assert.equal(snippetController.isInSnippetMode(), false); + // }); + // }); + + // test('Stops when deleting lines below', () => { + // snippetTest((editor, cursor, codeSnippet, snippetController) => { + // editor.setPosition({ lineNumber: 4, column: 2 }); + // snippetController.run(codeSnippet, 0, 0); + + // editor.getModel().applyEdits([{ + // forceMoveMarkers: false, + // identifier: null, + // isAutoWhitespaceEdit: false, + // range: new Range(8, 1, 8, 100), + // text: null + // }]); + + // assert.equal(snippetController.isInSnippetMode(), false); + // }); + // }); + + // test('Stops when inserting lines above', () => { + // snippetTest((editor, cursor, codeSnippet, snippetController) => { + // editor.setPosition({ lineNumber: 4, column: 2 }); + // snippetController.run(codeSnippet, 0, 0); + + // editor.getModel().applyEdits([{ + // forceMoveMarkers: false, + // identifier: null, + // isAutoWhitespaceEdit: false, + // range: new Range(1, 100, 1, 100), + // text: '\nHello' + // }]); + + // assert.equal(snippetController.isInSnippetMode(), false); + // }); + // }); + + // test('Stops when inserting lines below', () => { + // snippetTest((editor, cursor, codeSnippet, snippetController) => { + // editor.setPosition({ lineNumber: 4, column: 2 }); + // snippetController.run(codeSnippet, 0, 0); + + // editor.getModel().applyEdits([{ + // forceMoveMarkers: false, + // identifier: null, + // isAutoWhitespaceEdit: false, + // range: new Range(8, 100, 8, 100), + // text: '\nHello' + // }]); + + // assert.equal(snippetController.isInSnippetMode(), false); + // }); + // }); + + test('Stops when calling model.setValue()', () => { + snippetTest((editor, cursor, codeSnippet, snippetController) => { + editor.setPosition({ lineNumber: 4, column: 2 }); + snippetController.insert(codeSnippet, 0, 0); + + editor.getModel().setValue('goodbye'); + + assert.equal(snippetController.isInSnippetMode(), false); + }); + }); + + test('Stops when undoing', () => { + snippetTest((editor, cursor, codeSnippet, snippetController) => { + editor.setPosition({ lineNumber: 4, column: 2 }); + snippetController.insert(codeSnippet, 0, 0); + + editor.getModel().undo(); + + assert.equal(snippetController.isInSnippetMode(), false); + }); + }); + + test('Stops when moving cursor outside', () => { + snippetTest((editor, cursor, codeSnippet, snippetController) => { + editor.setPosition({ lineNumber: 4, column: 2 }); + snippetController.insert(codeSnippet, 0, 0); + + editor.setPosition({ lineNumber: 1, column: 1 }); + + assert.equal(snippetController.isInSnippetMode(), false); + }); + }); + + test('Stops when disconnecting editor model', () => { + snippetTest((editor, cursor, codeSnippet, snippetController) => { + editor.setPosition({ lineNumber: 4, column: 2 }); + snippetController.insert(codeSnippet, 0, 0); + + editor.setModel(null); + + assert.equal(snippetController.isInSnippetMode(), false); + }); + }); + + test('Stops when disposing editor', () => { + snippetTest((editor, cursor, codeSnippet, snippetController) => { + editor.setPosition({ lineNumber: 4, column: 2 }); + snippetController.insert(codeSnippet, 0, 0); + + snippetController.dispose(); + + assert.equal(snippetController.isInSnippetMode(), false); + }); + }); + + test('Final tabstop with multiple selections', () => { + snippetTest((editor, cursor, codeSnippet, snippetController) => { + editor.setSelections([ + new Selection(1, 1, 1, 1), + new Selection(2, 1, 2, 1), + ]); + + codeSnippet = 'foo$0'; + snippetController.insert(codeSnippet, 0, 0); + + assert.equal(editor.getSelections().length, 2); + const [first, second] = editor.getSelections(); + assert.ok(first.equalsRange({ startLineNumber: 1, startColumn: 4, endLineNumber: 1, endColumn: 4 }), first.toString()); + assert.ok(second.equalsRange({ startLineNumber: 2, startColumn: 4, endLineNumber: 2, endColumn: 4 }), second.toString()); + }); + + snippetTest((editor, cursor, codeSnippet, snippetController) => { + editor.setSelections([ + new Selection(1, 1, 1, 1), + new Selection(2, 1, 2, 1), + ]); + + codeSnippet = 'foo$0bar'; + snippetController.insert(codeSnippet, 0, 0); + + assert.equal(editor.getSelections().length, 2); + const [first, second] = editor.getSelections(); + assert.ok(first.equalsRange({ startLineNumber: 1, startColumn: 4, endLineNumber: 1, endColumn: 4 }), first.toString()); + assert.ok(second.equalsRange({ startLineNumber: 2, startColumn: 4, endLineNumber: 2, endColumn: 4 }), second.toString()); + }); + + snippetTest((editor, cursor, codeSnippet, snippetController) => { + editor.setSelections([ + new Selection(1, 1, 1, 1), + new Selection(1, 5, 1, 5), + ]); + + codeSnippet = 'foo$0bar'; + snippetController.insert(codeSnippet, 0, 0); + + assert.equal(editor.getSelections().length, 2); + const [first, second] = editor.getSelections(); + assert.ok(first.equalsRange({ startLineNumber: 1, startColumn: 4, endLineNumber: 1, endColumn: 4 }), first.toString()); + assert.ok(second.equalsRange({ startLineNumber: 1, startColumn: 14, endLineNumber: 1, endColumn: 14 }), second.toString()); + }); + + snippetTest((editor, cursor, codeSnippet, snippetController) => { + editor.setSelections([ + new Selection(1, 1, 1, 1), + new Selection(1, 5, 1, 5), + ]); + + codeSnippet = 'foo\n$0\nbar'; + snippetController.insert(codeSnippet, 0, 0); + + assert.equal(editor.getSelections().length, 2); + const [first, second] = editor.getSelections(); + assert.ok(first.equalsRange({ startLineNumber: 2, startColumn: 1, endLineNumber: 2, endColumn: 1 }), first.toString()); + assert.ok(second.equalsRange({ startLineNumber: 4, startColumn: 1, endLineNumber: 4, endColumn: 1 }), second.toString()); + }); + + snippetTest((editor, cursor, codeSnippet, snippetController) => { + editor.setSelections([ + new Selection(1, 1, 1, 1), + new Selection(1, 5, 1, 5), + ]); + + codeSnippet = 'foo\n$0\nbar'; + snippetController.insert(codeSnippet, 0, 0); + + assert.equal(editor.getSelections().length, 2); + const [first, second] = editor.getSelections(); + assert.ok(first.equalsRange({ startLineNumber: 2, startColumn: 1, endLineNumber: 2, endColumn: 1 }), first.toString()); + assert.ok(second.equalsRange({ startLineNumber: 4, startColumn: 1, endLineNumber: 4, endColumn: 1 }), second.toString()); + }); + + snippetTest((editor, cursor, codeSnippet, snippetController) => { + editor.setSelections([ + new Selection(2, 7, 2, 7), + ]); + + codeSnippet = 'xo$0r'; + snippetController.insert(codeSnippet, 1, 0); + + assert.equal(editor.getSelections().length, 1); + assert.ok(editor.getSelection().equalsRange({ startLineNumber: 2, startColumn: 8, endColumn: 8, endLineNumber: 2 })); + }); + }); + + test('Final tabstop, #11742 simple', () => { + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelection(new Selection(1, 19, 1, 19)); + + codeSnippet = '{{% url_**$1** %}}'; + controller.insert(codeSnippet, 2, 0); + + assert.equal(editor.getSelections().length, 1); + assert.ok(editor.getSelection().equalsRange({ startLineNumber: 1, startColumn: 27, endLineNumber: 1, endColumn: 27 })); + assert.equal(editor.getModel().getValue(), 'example example {{% url_**** %}}'); + + }, ['example example sc']); + + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelection(new Selection(1, 3, 1, 3)); + + codeSnippet = [ + 'afterEach((done) => {', + '\t${1}test', + '});' + ].join('\n'); + + controller.insert(codeSnippet, 2, 0); + + assert.equal(editor.getSelections().length, 1); + assert.ok(editor.getSelection().equalsRange({ startLineNumber: 2, startColumn: 2, endLineNumber: 2, endColumn: 2 }), editor.getSelection().toString()); + assert.equal(editor.getModel().getValue(), 'afterEach((done) => {\n\ttest\n});'); + + }, ['af']); + + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelection(new Selection(1, 3, 1, 3)); + + codeSnippet = [ + 'afterEach((done) => {', + '${1}\ttest', + '});' + ].join('\n'); + + controller.insert(codeSnippet, 2, 0); + + assert.equal(editor.getSelections().length, 1); + assert.ok(editor.getSelection().equalsRange({ startLineNumber: 2, startColumn: 1, endLineNumber: 2, endColumn: 1 }), editor.getSelection().toString()); + assert.equal(editor.getModel().getValue(), 'afterEach((done) => {\n\ttest\n});'); + + }, ['af']); + + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelection(new Selection(1, 9, 1, 9)); + + codeSnippet = [ + 'aft${1}er' + ].join('\n'); + + controller.insert(codeSnippet, 8, 0); + + assert.equal(editor.getModel().getValue(), 'after'); + assert.equal(editor.getSelections().length, 1); + assert.ok(editor.getSelection().equalsRange({ startLineNumber: 1, startColumn: 4, endLineNumber: 1, endColumn: 4 }), editor.getSelection().toString()); + + }, ['afterone']); + }); + + test('Final tabstop, #11742 different indents', () => { + + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelections([ + new Selection(2, 4, 2, 4), + new Selection(1, 3, 1, 3) + ]); + + codeSnippet = [ + 'afterEach((done) => {', + '\t${0}test', + '});' + ].join('\n'); + + controller.insert(codeSnippet, 2, 0); + + assert.equal(editor.getSelections().length, 2); + const [first, second] = editor.getSelections(); + + assert.ok(first.equalsRange({ startLineNumber: 5, startColumn: 3, endLineNumber: 5, endColumn: 3 }), first.toString()); + assert.ok(second.equalsRange({ startLineNumber: 2, startColumn: 2, endLineNumber: 2, endColumn: 2 }), second.toString()); + + }, ['af', '\taf']); + }); + + test('Final tabstop, #11890 stay at the beginning', () => { + + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelections([ + new Selection(1, 5, 1, 5) + ]); + + codeSnippet = [ + 'afterEach((done) => {', + '${1}\ttest', + '});' + ].join('\n'); + + controller.insert(codeSnippet, 2, 0); + + assert.equal(editor.getSelections().length, 1); + const [first] = editor.getSelections(); + + assert.ok(first.equalsRange({ startLineNumber: 2, startColumn: 3, endLineNumber: 2, endColumn: 3 }), first.toString()); + + }, [' af']); + }); + + test('Final tabstop, no tabstop', () => { + + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelections([ + new Selection(1, 3, 1, 3) + ]); + + codeSnippet = 'afterEach'; + + controller.insert(codeSnippet, 2, 0); + + assert.ok(editor.getSelection().equalsRange({ startLineNumber: 1, startColumn: 10, endLineNumber: 1, endColumn: 10 })); + + }, ['af', '\taf']); + }); + + test('Multiple cursor and overwriteBefore/After, issue #11060', () => { + + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelections([ + new Selection(1, 7, 1, 7), + new Selection(2, 4, 2, 4) + ]); + + codeSnippet = '_foo'; + controller.insert(codeSnippet, 1, 0); + assert.equal(editor.getModel().getValue(), 'this._foo\nabc_foo'); + + }, ['this._', 'abc']); + + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelections([ + new Selection(1, 7, 1, 7), + new Selection(2, 4, 2, 4) + ]); + + codeSnippet = 'XX'; + controller.insert(codeSnippet, 1, 0); + assert.equal(editor.getModel().getValue(), 'this.XX\nabcXX'); + + }, ['this._', 'abc']); + + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelections([ + new Selection(1, 7, 1, 7), + new Selection(2, 4, 2, 4), + new Selection(3, 5, 3, 5) + ]); + + codeSnippet = '_foo'; + controller.insert(codeSnippet, 1, 0); + assert.equal(editor.getModel().getValue(), 'this._foo\nabc_foo\ndef_foo'); + + }, ['this._', 'abc', 'def_']); + + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelections([ + new Selection(1, 7, 1, 7), // primary at `this._` + new Selection(2, 4, 2, 4), + new Selection(3, 6, 3, 6) + ]); + + codeSnippet = '._foo'; + controller.insert(codeSnippet, 2, 0); + assert.equal(editor.getModel().getValue(), 'this._foo\nabc._foo\ndef._foo'); + + }, ['this._', 'abc', 'def._']); + + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelections([ + new Selection(3, 6, 3, 6), // primary at `def._` + new Selection(1, 7, 1, 7), + new Selection(2, 4, 2, 4), + ]); + + codeSnippet = '._foo'; + controller.insert(codeSnippet, 2, 0); + assert.equal(editor.getModel().getValue(), 'this._foo\nabc._foo\ndef._foo'); + + }, ['this._', 'abc', 'def._']); + + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelections([ + new Selection(2, 4, 2, 4), // primary at `abc` + new Selection(3, 6, 3, 6), + new Selection(1, 7, 1, 7), + ]); + + codeSnippet = '._foo'; + controller.insert(codeSnippet, 2, 0); + assert.equal(editor.getModel().getValue(), 'this._._foo\na._foo\ndef._._foo'); + + }, ['this._', 'abc', 'def._']); + + }); + + test('Multiple cursor and overwriteBefore/After, #16277', () => { + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelections([ + new Selection(1, 5, 1, 5), + new Selection(2, 5, 2, 5), + ]); + + codeSnippet = 'document'; + controller.insert(codeSnippet, 3, 0); + assert.equal(editor.getModel().getValue(), '{document}\n{document && true}'); + + }, ['{foo}', '{foo && true}']); + }); + + test('Insert snippet twice, #19449', () => { + + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelections([ + new Selection(1, 1, 1, 1) + ]); + + codeSnippet = 'for (var ${1:i}=0; ${1:i} { + + editor.setSelections([ + new Selection(1, 1, 1, 1) + ]); + + codeSnippet = 'for (let ${1:i}=0; ${1:i} expected=${actual.toString()}`); + } + assert.equal(s.length, 0); + } + + function assertContextKeys(service: MockContextKeyService, inSnippet: boolean, hasPrev: boolean, hasNext: boolean): void { + assert.equal(SnippetController2.InSnippetMode.getValue(service), inSnippet, `inSnippetMode`); + assert.equal(SnippetController2.HasPrevTabstop.getValue(service), hasPrev, `HasPrevTabstop`); + assert.equal(SnippetController2.HasNextTabstop.getValue(service), hasNext, `HasNextTabstop`); + } + + let editor: ICommonCodeEditor; + let model: Model; + let contextKeys: MockContextKeyService; + + setup(function () { + contextKeys = new MockContextKeyService(); + model = Model.createFromString('if\n $state\nfi'); + editor = mockCodeEditor([], { model }); + editor.setSelections([new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)]); + assert.equal(model.getEOL(), '\n'); + }); + + teardown(function () { + model.dispose(); + }); + + test('creation', function () { + const ctrl = new SnippetController2(editor, contextKeys); + assertContextKeys(contextKeys, false, false, false); + ctrl.dispose(); + }); + + test('insert, insert -> abort', function () { + const ctrl = new SnippetController2(editor, contextKeys); + + ctrl.insert('foo${1:bar}foo$0'); + assertContextKeys(contextKeys, true, false, true); + assertSelections(editor, new Selection(1, 4, 1, 7), new Selection(2, 8, 2, 11)); + + ctrl.cancel(); + assertContextKeys(contextKeys, false, false, false); + assertSelections(editor, new Selection(1, 4, 1, 7), new Selection(2, 8, 2, 11)); + }); + + test('insert, insert -> tab, tab, done', function () { + const ctrl = new SnippetController2(editor, contextKeys); + + ctrl.insert('${1:one}${2:two}$0'); + assertContextKeys(contextKeys, true, false, true); + + ctrl.next(); + assertContextKeys(contextKeys, true, true, true); + + ctrl.next(); + assertContextKeys(contextKeys, false, false, false); + + editor.trigger('test', 'type', { text: '\t' }); + assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), false); + assert.equal(SnippetController2.HasNextTabstop.getValue(contextKeys), false); + assert.equal(SnippetController2.HasPrevTabstop.getValue(contextKeys), false); + }); + + test('insert, insert -> cursor moves out (left/right)', function () { + const ctrl = new SnippetController2(editor, contextKeys); + + ctrl.insert('foo${1:bar}foo$0'); + assertContextKeys(contextKeys, true, false, true); + assertSelections(editor, new Selection(1, 4, 1, 7), new Selection(2, 8, 2, 11)); + + // bad selection change + editor.setSelections([new Selection(1, 12, 1, 12), new Selection(2, 16, 2, 16)]); + assertContextKeys(contextKeys, false, false, false); + }); + + test('insert, insert -> cursor moves out (up/down)', function () { + const ctrl = new SnippetController2(editor, contextKeys); + + ctrl.insert('foo${1:bar}foo$0'); + assertContextKeys(contextKeys, true, false, true); + assertSelections(editor, new Selection(1, 4, 1, 7), new Selection(2, 8, 2, 11)); + + // bad selection change + editor.setSelections([new Selection(2, 4, 2, 7), new Selection(3, 8, 3, 11)]); + assertContextKeys(contextKeys, false, false, false); + }); + + test('insert, insert -> cursors collapse', function () { + const ctrl = new SnippetController2(editor, contextKeys); + + ctrl.insert('foo${1:bar}foo$0'); + assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), true); + assertSelections(editor, new Selection(1, 4, 1, 7), new Selection(2, 8, 2, 11)); + + // bad selection change + editor.setSelections([new Selection(1, 4, 1, 7)]); + assertContextKeys(contextKeys, false, false, false); + }); + + test('insert, insert plain text -> no snippet mode', function () { + const ctrl = new SnippetController2(editor, contextKeys); + + ctrl.insert('foobar'); + assertContextKeys(contextKeys, false, false, false); + assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); + }); + + test('insert, delete snippet text', function () { + const ctrl = new SnippetController2(editor, contextKeys); + + ctrl.insert('${1:foobar}$0'); + assertContextKeys(contextKeys, true, false, true); + assertSelections(editor, new Selection(1, 1, 1, 7), new Selection(2, 5, 2, 11)); + + editor.trigger('test', 'cut', {}); + assertContextKeys(contextKeys, true, false, true); + assertSelections(editor, new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)); + + editor.trigger('test', 'type', { text: 'abc' }); + assertContextKeys(contextKeys, true, false, true); + + ctrl.next(); + assertContextKeys(contextKeys, false, false, false); + + editor.trigger('test', 'tab', {}); + assertContextKeys(contextKeys, false, false, false); + + // editor.trigger('test', 'type', { text: 'abc' }); + // assertContextKeys(contextKeys, false, false, false); + }); + + test('insert, nested snippet', function () { + const ctrl = new SnippetController2(editor, contextKeys); + ctrl.insert('${1:foobar}$0'); + assertContextKeys(contextKeys, true, false, true); + assertSelections(editor, new Selection(1, 1, 1, 7), new Selection(2, 5, 2, 11)); + + ctrl.insert('far$1boo$0'); + assertSelections(editor, new Selection(1, 4, 1, 4), new Selection(2, 8, 2, 8)); + assertContextKeys(contextKeys, true, false, true); + + ctrl.next(); + assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); + assertContextKeys(contextKeys, true, true, true); + + ctrl.next(); + assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); + assertContextKeys(contextKeys, false, false, false); + }); + + test('insert, nested plain text', function () { + const ctrl = new SnippetController2(editor, contextKeys); + ctrl.insert('${1:foobar}$0'); + assertContextKeys(contextKeys, true, false, true); + assertSelections(editor, new Selection(1, 1, 1, 7), new Selection(2, 5, 2, 11)); + + ctrl.insert('farboo'); + assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); + assertContextKeys(contextKeys, true, false, true); + + ctrl.next(); + assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); + assertContextKeys(contextKeys, false, false, false); + }); + + test('Nested snippets without final placeholder jumps to next outer placeholder, #27898', function () { + const ctrl = new SnippetController2(editor, contextKeys); + + ctrl.insert('for(const ${1:element} of ${2:array}) {$0}'); + assertContextKeys(contextKeys, true, false, true); + assertSelections(editor, new Selection(1, 11, 1, 18), new Selection(2, 15, 2, 22)); + + ctrl.next(); + assertContextKeys(contextKeys, true, true, true); + assertSelections(editor, new Selection(1, 22, 1, 27), new Selection(2, 26, 2, 31)); + + ctrl.insert('document'); + assertContextKeys(contextKeys, true, true, true); + assertSelections(editor, new Selection(1, 30, 1, 30), new Selection(2, 34, 2, 34)); + + ctrl.next(); + assertContextKeys(contextKeys, false, false, false); + }); + + test('Inconsistent tab stop behaviour with recursive snippets and tab / shift tab, #27543', function () { + const ctrl = new SnippetController2(editor, contextKeys); + ctrl.insert('1_calize(${1:nl}, \'${2:value}\')$0'); + + assertContextKeys(contextKeys, true, false, true); + assertSelections(editor, new Selection(1, 10, 1, 12), new Selection(2, 14, 2, 16)); + + ctrl.insert('2_calize(${1:nl}, \'${2:value}\')$0'); + + assertSelections(editor, new Selection(1, 19, 1, 21), new Selection(2, 23, 2, 25)); + + ctrl.next(); // inner `value` + assertSelections(editor, new Selection(1, 24, 1, 29), new Selection(2, 28, 2, 33)); + + ctrl.next(); // inner `$0` + assertSelections(editor, new Selection(1, 31, 1, 31), new Selection(2, 35, 2, 35)); + + ctrl.next(); // outer `value` + assertSelections(editor, new Selection(1, 34, 1, 39), new Selection(2, 38, 2, 43)); + + ctrl.prev(); // inner `$0` + assertSelections(editor, new Selection(1, 31, 1, 31), new Selection(2, 35, 2, 35)); + }); + + test('Snippet tabstop selecting content of previously entered variable only works when separated by space, #23728', function () { + const ctrl = new SnippetController2(editor, contextKeys); + + model.setValue(''); + editor.setSelection(new Selection(1, 1, 1, 1)); + + ctrl.insert('import ${2:${1:module}} from \'${1: module }\'$0'); + + assertContextKeys(contextKeys, true, false, true); + assertSelections(editor, new Selection(1, 8, 1, 14), new Selection(1, 21, 1, 29)); + + ctrl.insert('foo'); + assertSelections(editor, new Selection(1, 11, 1, 11), new Selection(1, 21, 1, 21)); + + ctrl.next(); // ${2:...} + assertSelections(editor, new Selection(1, 8, 1, 11)); + }); + +}); diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts new file mode 100644 index 0000000000000..4879ac3b9f890 --- /dev/null +++ b/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts @@ -0,0 +1,396 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import * as assert from 'assert'; +import { Scanner, TokenType, SnippetParser, Text, Placeholder, Variable, Marker, walk } from 'vs/editor/contrib/snippet/browser/snippetParser'; + + +suite('SnippetParser', () => { + + test('Scanner', () => { + + const scanner = new Scanner(); + assert.equal(scanner.next().type, TokenType.EOF); + + scanner.text('abc'); + assert.equal(scanner.next().type, TokenType.VariableName); + assert.equal(scanner.next().type, TokenType.EOF); + + scanner.text('{{abc}}'); + assert.equal(scanner.next().type, TokenType.CurlyOpen); + assert.equal(scanner.next().type, TokenType.CurlyOpen); + assert.equal(scanner.next().type, TokenType.VariableName); + assert.equal(scanner.next().type, TokenType.CurlyClose); + assert.equal(scanner.next().type, TokenType.CurlyClose); + assert.equal(scanner.next().type, TokenType.EOF); + + scanner.text('abc() '); + assert.equal(scanner.next().type, TokenType.VariableName); + assert.equal(scanner.next().type, TokenType.Format); + assert.equal(scanner.next().type, TokenType.EOF); + + scanner.text('abc 123'); + assert.equal(scanner.next().type, TokenType.VariableName); + assert.equal(scanner.next().type, TokenType.Format); + assert.equal(scanner.next().type, TokenType.Int); + assert.equal(scanner.next().type, TokenType.EOF); + + scanner.text('$foo'); + assert.equal(scanner.next().type, TokenType.Dollar); + assert.equal(scanner.next().type, TokenType.VariableName); + assert.equal(scanner.next().type, TokenType.EOF); + + scanner.text('$foo_bar'); + assert.equal(scanner.next().type, TokenType.Dollar); + assert.equal(scanner.next().type, TokenType.VariableName); + assert.equal(scanner.next().type, TokenType.EOF); + + scanner.text('$foo-bar'); + assert.equal(scanner.next().type, TokenType.Dollar); + assert.equal(scanner.next().type, TokenType.VariableName); + assert.equal(scanner.next().type, TokenType.Format); + assert.equal(scanner.next().type, TokenType.VariableName); + assert.equal(scanner.next().type, TokenType.EOF); + + scanner.text('${foo}'); + assert.equal(scanner.next().type, TokenType.Dollar); + assert.equal(scanner.next().type, TokenType.CurlyOpen); + assert.equal(scanner.next().type, TokenType.VariableName); + assert.equal(scanner.next().type, TokenType.CurlyClose); + assert.equal(scanner.next().type, TokenType.EOF); + + scanner.text('${1223:foo}'); + assert.equal(scanner.next().type, TokenType.Dollar); + assert.equal(scanner.next().type, TokenType.CurlyOpen); + assert.equal(scanner.next().type, TokenType.Int); + assert.equal(scanner.next().type, TokenType.Colon); + assert.equal(scanner.next().type, TokenType.VariableName); + assert.equal(scanner.next().type, TokenType.CurlyClose); + assert.equal(scanner.next().type, TokenType.EOF); + + scanner.text('\\${}'); + assert.equal(scanner.next().type, TokenType.Backslash); + assert.equal(scanner.next().type, TokenType.Dollar); + assert.equal(scanner.next().type, TokenType.CurlyOpen); + assert.equal(scanner.next().type, TokenType.CurlyClose); + }); + + function assertText(value: string, expected: string) { + const p = new SnippetParser(); + const actual = p.text(value); + assert.equal(actual, expected); + } + + function assertMarker(valueOrMarker: Marker[] | string, ...ctors: Function[]) { + let marker: Marker[]; + if (typeof valueOrMarker === 'string') { + const p = new SnippetParser(); + marker = p.parse(valueOrMarker); + } else { + marker = valueOrMarker; + } + while (marker.length > 0) { + let m = marker.pop(); + let ctor = ctors.pop(); + assert.ok(m instanceof ctor); + } + assert.equal(marker.length, ctors.length); + assert.equal(marker.length, 0); + } + + function assertTextAndMarker(value: string, escaped: string, ...ctors: Function[]) { + assertText(value, escaped); + assertMarker(value, ...ctors); + } + + function assertEscaped(value: string, expected: string) { + const actual = SnippetParser.escape(value); + assert.equal(actual, expected); + } + + test('Parser, escaped', function () { + assertEscaped('foo$0', 'foo\\$0'); + assertEscaped('foo\\$0', 'foo\\\\\\$0'); + assertEscaped('f$1oo$0', 'f\\$1oo\\$0'); + assertEscaped('${1:foo}$0', '\\${1:foo\\}\\$0'); + assertEscaped('$', '\\$'); + }); + + test('Parser, text', () => { + assertText('$', '$'); + assertText('\\\\$', '\\$'); + assertText('{', '{'); + assertText('\\}', '}'); + assertText('\\abc', '\\abc'); + assertText('foo${f:\\}}bar', 'foo}bar'); + assertText('\\{', '\\{'); + assertText('I need \\\\\\$', 'I need \\$'); + assertText('\\', '\\'); + assertText('\\{{', '\\{{'); + assertText('{{', '{{'); + assertText('{{dd', '{{dd'); + assertText('}}', '}}'); + assertText('ff}}', 'ff}}'); + + assertText('farboo', 'farboo'); + assertText('far{{}}boo', 'far{{}}boo'); + assertText('far{{123}}boo', 'far{{123}}boo'); + assertText('far\\{{123}}boo', 'far\\{{123}}boo'); + assertText('far{{id:bern}}boo', 'far{{id:bern}}boo'); + assertText('far{{id:bern {{basel}}}}boo', 'far{{id:bern {{basel}}}}boo'); + assertText('far{{id:bern {{id:basel}}}}boo', 'far{{id:bern {{id:basel}}}}boo'); + assertText('far{{id:bern {{id2:basel}}}}boo', 'far{{id:bern {{id2:basel}}}}boo'); + }); + + + test('Parser, TM text', () => { + assertTextAndMarker('foo${1:bar}}', 'foobar}', Text, Placeholder, Text); + assertTextAndMarker('foo${1:bar}${2:foo}}', 'foobarfoo}', Text, Placeholder, Placeholder, Text); + + assertTextAndMarker('foo${1:bar\\}${2:foo}}', 'foobar}foo', Text, Placeholder); + + let [, placeholder] = new SnippetParser().parse('foo${1:bar\\}${2:foo}}'); + let { children } = (placeholder); + + assert.equal((placeholder).index, '1'); + assert.ok(children[0] instanceof Text); + assert.equal(children[0].toString(), 'bar}'); + assert.ok(children[1] instanceof Placeholder); + assert.equal(children[1].toString(), 'foo'); + }); + + test('Parser, placeholder', () => { + assertTextAndMarker('farboo', 'farboo', Text); + assertTextAndMarker('far{{}}boo', 'far{{}}boo', Text); + assertTextAndMarker('far{{123}}boo', 'far{{123}}boo', Text); + assertTextAndMarker('far\\{{123}}boo', 'far\\{{123}}boo', Text); + }); + + test('Parser, literal code', () => { + assertTextAndMarker('far`123`boo', 'far`123`boo', Text); + assertTextAndMarker('far\\`123\\`boo', 'far\\`123\\`boo', Text); + }); + + test('Parser, variables/tabstop', () => { + assertTextAndMarker('$far-boo', '-boo', Variable, Text); + assertTextAndMarker('\\$far-boo', '$far-boo', Text); + assertTextAndMarker('far$farboo', 'far', Text, Variable); + assertTextAndMarker('far${farboo}', 'far', Text, Variable); + assertTextAndMarker('$123', '', Placeholder); + assertTextAndMarker('$farboo', '', Variable); + assertTextAndMarker('$far12boo', '', Variable); + }); + + test('Parser, variables/placeholder with defaults', () => { + assertTextAndMarker('${name:value}', 'value', Variable); + assertTextAndMarker('${1:value}', 'value', Placeholder); + assertTextAndMarker('${1:bar${2:foo}bar}', 'barfoobar', Placeholder); + + assertTextAndMarker('${name:value', '${name:value', Text); + assertTextAndMarker('${1:bar${2:foobar}', '${1:barfoobar', Text, Placeholder); + }); + + test('Parser, only textmate', () => { + const p = new SnippetParser(); + assertMarker(p.parse('far{{}}boo'), Text); + assertMarker(p.parse('far{{123}}boo'), Text); + assertMarker(p.parse('far\\{{123}}boo'), Text); + + assertMarker(p.parse('far$0boo'), Text, Placeholder, Text); + assertMarker(p.parse('far${123}boo'), Text, Placeholder, Text); + assertMarker(p.parse('far\\${123}boo'), Text); + }); + + test('Parser, real world', () => { + let marker = new SnippetParser().parse('console.warn(${1: $TM_SELECTED_TEXT })'); + + assert.equal(marker[0].toString(), 'console.warn('); + assert.ok(marker[1] instanceof Placeholder); + assert.equal(marker[2].toString(), ')'); + + const placeholder = marker[1]; + assert.equal(placeholder, false); + assert.equal(placeholder.index, '1'); + assert.equal(placeholder.children.length, 3); + assert.ok(placeholder.children[0] instanceof Text); + assert.ok(placeholder.children[1] instanceof Variable); + assert.ok(placeholder.children[2] instanceof Text); + assert.equal(placeholder.children[0].toString(), ' '); + assert.equal(placeholder.children[1].toString(), ''); + assert.equal(placeholder.children[2].toString(), ' '); + + const nestedVariable = placeholder.children[1]; + assert.equal(nestedVariable.name, 'TM_SELECTED_TEXT'); + assert.equal(nestedVariable.children.length, 0); + + marker = new SnippetParser().parse('$TM_SELECTED_TEXT'); + assert.equal(marker.length, 1); + assert.ok(marker[0] instanceof Variable); + }); + + test('Parser, default placeholder values', () => { + + assertMarker('errorContext: `${1:err}`, error: $1', Text, Placeholder, Text, Placeholder); + + const [, p1, , p2] = new SnippetParser().parse('errorContext: `${1:err}`, error:$1'); + + assert.equal((p1).index, '1'); + assert.equal((p1).children.length, '1'); + assert.equal(((p1).children[0]), 'err'); + + assert.equal((p2).index, '1'); + assert.equal((p2).children.length, '1'); + assert.equal(((p2).children[0]), 'err'); + + }); + + test('backspace esapce in TM only, #16212', () => { + const actual = new SnippetParser().text('Foo \\\\${abc}bar'); + assert.equal(actual, 'Foo \\bar'); + }); + + test('colon as variable/placeholder value, #16717', () => { + let actual = new SnippetParser().text('${TM_SELECTED_TEXT:foo:bar}'); + assert.equal(actual, 'foo:bar'); + + actual = new SnippetParser().text('${1:foo:bar}'); + assert.equal(actual, 'foo:bar'); + }); + + test('marker#len', () => { + + function assertLen(template: string, ...lengths: number[]): void { + const { children } = SnippetParser.parse(template); + walk(children, m => { + const expected = lengths.shift(); + assert.equal(m.len(), expected); + return true; + }); + assert.equal(lengths.length, 0); + } + + assertLen('text$0', 4, 0); + assertLen('$1text$0', 0, 4, 0); + assertLen('te$1xt$0', 2, 0, 2, 0); + assertLen('errorContext: `${1:err}`, error: $0', 15, 0, 3, 10, 0); + assertLen('errorContext: `${1:err}`, error: $1$0', 15, 0, 3, 10, 0, 3, 0); + assertLen('$TM_SELECTED_TEXT$0', 0, 0); + assertLen('${TM_SELECTED_TEXT:def}$0', 0, 3, 0); + }); + + test('parser, parent node', function () { + let snippet = SnippetParser.parse('This ${1:is ${2:nested}}$0'); + + assert.equal(snippet.placeholders.length, 3); + let [first, second] = snippet.placeholders; + assert.equal(first.index, '1'); + assert.equal(second.index, '2'); + assert.ok(second.parent === first); + assert.ok(first.parent === snippet); + + snippet = SnippetParser.parse('${VAR:default${1:value}}$0'); + assert.equal(snippet.placeholders.length, 2); + [first] = snippet.placeholders; + assert.equal(first.index, '1'); + + assert.ok(snippet.children[0] instanceof Variable); + assert.ok(first.parent === snippet.children[0]); + }); + + test('TextmateSnippet#enclosingPlaceholders', function () { + let snippet = SnippetParser.parse('This ${1:is ${2:nested}}$0'); + let [first, second] = snippet.placeholders; + + assert.deepEqual(snippet.enclosingPlaceholders(first), []); + assert.deepEqual(snippet.enclosingPlaceholders(second), [first]); + }); + + test('TextmateSnippet#offset', () => { + let snippet = SnippetParser.parse('te$1xt'); + assert.equal(snippet.offset(snippet.children[0]), 0); + assert.equal(snippet.offset(snippet.children[1]), 2); + assert.equal(snippet.offset(snippet.children[2]), 2); + + snippet = SnippetParser.parse('${TM_SELECTED_TEXT:def}'); + assert.equal(snippet.offset(snippet.children[0]), 0); + assert.equal(snippet.offset((snippet.children[0]).children[0]), 0); + + // forgein marker + assert.equal(snippet.offset(new Text('foo')), -1); + }); + + test('TextmateSnippet#placeholder', () => { + let snippet = SnippetParser.parse('te$1xt$0'); + let placeholders = snippet.placeholders; + assert.equal(placeholders.length, 2); + + snippet = SnippetParser.parse('te$1xt$1$0'); + placeholders = snippet.placeholders; + assert.equal(placeholders.length, 3); + + + snippet = SnippetParser.parse('te$1xt$2$0'); + placeholders = snippet.placeholders; + assert.equal(placeholders.length, 3); + + snippet = SnippetParser.parse('${1:bar${2:foo}bar}$0'); + placeholders = snippet.placeholders; + assert.equal(placeholders.length, 3); + }); + + test('TextmateSnippet#replace 1/2', function () { + let snippet = SnippetParser.parse('aaa${1:bbb${2:ccc}}$0'); + + assert.equal(snippet.placeholders.length, 3); + const [, second] = snippet.placeholders; + assert.equal(second.index, '2'); + + const enclosing = snippet.enclosingPlaceholders(second); + assert.equal(enclosing.length, 1); + assert.equal(enclosing[0].index, '1'); + + let nested = SnippetParser.parse('ddd$1eee$0'); + snippet.replace(second, nested.children); + + assert.equal(snippet.text, 'aaabbbdddeee'); + assert.equal(snippet.placeholders.length, 4); + assert.equal(snippet.placeholders[0].index, '1'); + assert.equal(snippet.placeholders[1].index, '1'); + assert.equal(snippet.placeholders[2].index, '0'); + assert.equal(snippet.placeholders[3].index, '0'); + + const newEnclosing = snippet.enclosingPlaceholders(snippet.placeholders[1]); + assert.ok(newEnclosing[0] === snippet.placeholders[0]); + assert.equal(newEnclosing.length, 1); + assert.equal(newEnclosing[0].index, '1'); + }); + + test('TextmateSnippet#replace 2/2', function () { + let snippet = SnippetParser.parse('aaa${1:bbb${2:ccc}}$0'); + + assert.equal(snippet.placeholders.length, 3); + const [, second] = snippet.placeholders; + assert.equal(second.index, '2'); + + let nested = SnippetParser.parse('dddeee$0'); + snippet.replace(second, nested.children); + + assert.equal(snippet.text, 'aaabbbdddeee'); + assert.equal(snippet.placeholders.length, 3); + }); + + test('Snippet order for placeholders, #28185', function () { + + const _10 = new Placeholder(10, []); + const _2 = new Placeholder(2, []); + + assert.equal(Placeholder.compareByIndex(_10, _2), 1); + }); + + test('Maximum call stack size exceeded, #28983', function () { + new SnippetParser().parse('${1:${foo:${1}}}'); + }); +}); diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts new file mode 100644 index 0000000000000..138d98856b96b --- /dev/null +++ b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts @@ -0,0 +1,437 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import * as assert from 'assert'; +import { Selection } from 'vs/editor/common/core/selection'; +import { Range } from 'vs/editor/common/core/range'; +import { IPosition, Position } from 'vs/editor/common/core/position'; +import { SnippetSession } from 'vs/editor/contrib/snippet/browser/snippetSession'; +import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; +import { mockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; +import { Model } from 'vs/editor/common/model/model'; + +suite('SnippetSession', function () { + + let editor: ICommonCodeEditor; + let model: Model; + + function assertSelections(editor: ICommonCodeEditor, ...s: Selection[]) { + for (const selection of editor.getSelections()) { + const actual = s.shift(); + assert.ok(selection.equalsSelection(actual), `actual=${selection.toString()} <> expected=${actual.toString()}`); + } + assert.equal(s.length, 0); + } + + setup(function () { + model = Model.createFromString('function foo() {\n console.log(a);\n}'); + editor = mockCodeEditor([], { model }); + editor.setSelections([new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)]); + assert.equal(model.getEOL(), '\n'); + }); + + teardown(function () { + model.dispose(); + editor.dispose(); + }); + + test('normalize whitespace', function () { + + function assertNormalized(position: IPosition, input: string, expected: string): void { + const actual = SnippetSession.adjustWhitespace(model, position, input); + assert.equal(actual, expected); + } + + assertNormalized(new Position(1, 1), 'foo', 'foo'); + assertNormalized(new Position(1, 1), 'foo\rbar', 'foo\nbar'); + assertNormalized(new Position(1, 1), 'foo\rbar', 'foo\nbar'); + assertNormalized(new Position(2, 5), 'foo\r\tbar', 'foo\n bar'); + assertNormalized(new Position(2, 3), 'foo\r\tbar', 'foo\n bar'); + assertNormalized(new Position(2, 5), 'foo\r\tbar\nfoo', 'foo\n bar\n foo'); + }); + + test('adjust selection (overwrite[Before|After])', function () { + + let range = SnippetSession.adjustSelection(model, new Selection(1, 2, 1, 2), 1, 0); + assert.ok(range.equalsRange(new Range(1, 1, 1, 2))); + range = SnippetSession.adjustSelection(model, new Selection(1, 2, 1, 2), 1111, 0); + assert.ok(range.equalsRange(new Range(1, 1, 1, 2))); + range = SnippetSession.adjustSelection(model, new Selection(1, 2, 1, 2), 0, 10); + assert.ok(range.equalsRange(new Range(1, 2, 1, 12))); + range = SnippetSession.adjustSelection(model, new Selection(1, 2, 1, 2), 0, 10111); + assert.ok(range.equalsRange(new Range(1, 2, 1, 17))); + + }); + + test('text edits & selection', function () { + const session = new SnippetSession(editor, 'foo${1:bar}foo$0'); + session.insert(); + assert.equal(editor.getModel().getValue(), 'foobarfoofunction foo() {\n foobarfooconsole.log(a);\n}'); + + assertSelections(editor, new Selection(1, 4, 1, 7), new Selection(2, 8, 2, 11)); + session.next(); + assertSelections(editor, new Selection(1, 10, 1, 10), new Selection(2, 14, 2, 14)); + }); + + test('text edit with reversed selection', function () { + + const session = new SnippetSession(editor, '${1:bar}$0'); + editor.setSelections([new Selection(2, 5, 2, 5), new Selection(1, 1, 1, 1)]); + + session.insert(); + assert.equal(model.getValue(), 'barfunction foo() {\n barconsole.log(a);\n}'); + assertSelections(editor, new Selection(2, 5, 2, 8), new Selection(1, 1, 1, 4)); + }); + + test('snippets, repeated tabstops', function () { + const session = new SnippetSession(editor, '${1:abc}foo${1:abc}$0'); + session.insert(); + assertSelections(editor, + new Selection(1, 1, 1, 4), new Selection(1, 7, 1, 10), + new Selection(2, 5, 2, 8), new Selection(2, 11, 2, 14), + ); + session.next(); + assertSelections(editor, + new Selection(1, 10, 1, 10), + new Selection(2, 14, 2, 14), + ); + }); + + test('snippets, just text', function () { + const session = new SnippetSession(editor, 'foobar'); + session.insert(); + assert.equal(model.getValue(), 'foobarfunction foo() {\n foobarconsole.log(a);\n}'); + assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); + }); + + test('snippets, selections and new text with newlines', () => { + + const session = new SnippetSession(editor, 'foo\n\t${1:bar}\n$0'); + session.insert(); + + assert.equal(editor.getModel().getValue(), 'foo\n bar\nfunction foo() {\n foo\n bar\n console.log(a);\n}'); + + assertSelections(editor, new Selection(2, 5, 2, 8), new Selection(5, 9, 5, 12)); + + session.next(); + assertSelections(editor, new Selection(3, 1, 3, 1), new Selection(6, 5, 6, 5)); + }); + + test('snippets, selections -> next/prev', () => { + + const session = new SnippetSession(editor, 'f$1oo${2:bar}foo$0'); + session.insert(); + + // @ $2 + assertSelections(editor, new Selection(1, 2, 1, 2), new Selection(2, 6, 2, 6)); + // @ $1 + session.next(); + assertSelections(editor, new Selection(1, 4, 1, 7), new Selection(2, 8, 2, 11)); + // @ $2 + session.prev(); + assertSelections(editor, new Selection(1, 2, 1, 2), new Selection(2, 6, 2, 6)); + // @ $1 + session.next(); + assertSelections(editor, new Selection(1, 4, 1, 7), new Selection(2, 8, 2, 11)); + // @ $0 + session.next(); + assertSelections(editor, new Selection(1, 10, 1, 10), new Selection(2, 14, 2, 14)); + }); + + test('snippets, selections & typing', function () { + const session = new SnippetSession(editor, 'f${1:oo}_$2_$0'); + session.insert(); + + editor.trigger('test', 'type', { text: 'X' }); + session.next(); + editor.trigger('test', 'type', { text: 'bar' }); + + // go back to ${2:oo} which is now just 'X' + session.prev(); + assertSelections(editor, new Selection(1, 2, 1, 3), new Selection(2, 6, 2, 7)); + + // go forward to $1 which is now 'bar' + session.next(); + assertSelections(editor, new Selection(1, 4, 1, 7), new Selection(2, 8, 2, 11)); + + // go to final tabstop + session.next(); + assert.equal(model.getValue(), 'fX_bar_function foo() {\n fX_bar_console.log(a);\n}'); + assertSelections(editor, new Selection(1, 8, 1, 8), new Selection(2, 12, 2, 12)); + }); + + test('snippets, insert shorter snippet into non-empty selection', function () { + model.setValue('foo_bar_foo'); + editor.setSelections([new Selection(1, 1, 1, 4), new Selection(1, 9, 1, 12)]); + + new SnippetSession(editor, 'x$0').insert(); + assert.equal(model.getValue(), 'x_bar_x'); + assertSelections(editor, new Selection(1, 2, 1, 2), new Selection(1, 8, 1, 8)); + }); + + test('snippets, insert longer snippet into non-empty selection', function () { + model.setValue('foo_bar_foo'); + editor.setSelections([new Selection(1, 1, 1, 4), new Selection(1, 9, 1, 12)]); + + new SnippetSession(editor, 'LONGER$0').insert(); + assert.equal(model.getValue(), 'LONGER_bar_LONGER'); + assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(1, 18, 1, 18)); + }); + + test('snippets, don\'t grow final tabstop', function () { + model.setValue('foo_zzz_foo'); + editor.setSelection(new Selection(1, 5, 1, 8)); + const session = new SnippetSession(editor, '$1bar$0'); + session.insert(); + + assertSelections(editor, new Selection(1, 5, 1, 5)); + editor.trigger('test', 'type', { text: 'foo-' }); + + session.next(); + assert.equal(model.getValue(), 'foo_foo-bar_foo'); + assertSelections(editor, new Selection(1, 12, 1, 12)); + + editor.trigger('test', 'type', { text: 'XXX' }); + assert.equal(model.getValue(), 'foo_foo-barXXX_foo'); + session.prev(); + assertSelections(editor, new Selection(1, 5, 1, 9)); + session.next(); + assertSelections(editor, new Selection(1, 15, 1, 15)); + }); + + test('snippets, don\'t merge touching tabstops 1/2', function () { + + const session = new SnippetSession(editor, '$1$2$3$0'); + session.insert(); + assertSelections(editor, new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)); + + session.next(); + assertSelections(editor, new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)); + + session.next(); + assertSelections(editor, new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)); + + session.next(); + assertSelections(editor, new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)); + + session.prev(); + session.prev(); + session.prev(); + assertSelections(editor, new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)); + editor.trigger('test', 'type', { text: '111' }); + + session.next(); + editor.trigger('test', 'type', { text: '222' }); + + session.next(); + editor.trigger('test', 'type', { text: '333' }); + + session.next(); + assert.equal(model.getValue(), '111222333function foo() {\n 111222333console.log(a);\n}'); + assertSelections(editor, new Selection(1, 10, 1, 10), new Selection(2, 14, 2, 14)); + + session.prev(); + assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); + session.prev(); + assertSelections(editor, new Selection(1, 4, 1, 4), new Selection(2, 8, 2, 8)); + session.prev(); + assertSelections(editor, new Selection(1, 1, 1, 4), new Selection(2, 5, 2, 8)); + }); + test('snippets, don\'t merge touching tabstops 2/2', function () { + + const session = new SnippetSession(editor, '$1$2$3$0'); + session.insert(); + assertSelections(editor, new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)); + + editor.trigger('test', 'type', { text: '111' }); + + session.next(); + assertSelections(editor, new Selection(1, 4, 1, 4), new Selection(2, 8, 2, 8)); + editor.trigger('test', 'type', { text: '222' }); + + session.next(); + assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); + editor.trigger('test', 'type', { text: '333' }); + + session.next(); + assert.equal(session.isAtLastPlaceholder, true); + }); + + test('snippets, gracefully move over final tabstop', function () { + const session = new SnippetSession(editor, '${1}bar$0'); + session.insert(); + + assert.equal(session.isAtLastPlaceholder, false); + assertSelections(editor, new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)); + + session.next(); + assert.equal(session.isAtLastPlaceholder, true); + assertSelections(editor, new Selection(1, 4, 1, 4), new Selection(2, 8, 2, 8)); + + session.next(); + assert.equal(session.isAtLastPlaceholder, true); + assertSelections(editor, new Selection(1, 4, 1, 4), new Selection(2, 8, 2, 8)); + }); + + test('snippets, overwriting nested placeholder', function () { + const session = new SnippetSession(editor, 'log(${1:"$2"});$0'); + session.insert(); + assertSelections(editor, new Selection(1, 5, 1, 7), new Selection(2, 9, 2, 11)); + + editor.trigger('test', 'type', { text: 'XXX' }); + assert.equal(model.getValue(), 'log(XXX);function foo() {\n log(XXX);console.log(a);\n}'); + + session.next(); + assert.equal(session.isAtLastPlaceholder, false); + // assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); + + session.next(); + assert.equal(session.isAtLastPlaceholder, true); + assertSelections(editor, new Selection(1, 10, 1, 10), new Selection(2, 14, 2, 14)); + }); + + test('snippets, selections and snippet ranges', function () { + const session = new SnippetSession(editor, '${1:foo}farboo${2:bar}$0'); + session.insert(); + assert.equal(model.getValue(), 'foofarboobarfunction foo() {\n foofarboobarconsole.log(a);\n}'); + assertSelections(editor, new Selection(1, 1, 1, 4), new Selection(2, 5, 2, 8)); + + assert.equal(session.isSelectionWithinPlaceholders(), true); + + editor.setSelections([new Selection(1, 1, 1, 1)]); + assert.equal(session.isSelectionWithinPlaceholders(), false); + + editor.setSelections([new Selection(1, 6, 1, 6), new Selection(2, 10, 2, 10)]); + assert.equal(session.isSelectionWithinPlaceholders(), false); // in snippet, outside placeholder + + editor.setSelections([new Selection(1, 6, 1, 6), new Selection(2, 10, 2, 10), new Selection(1, 1, 1, 1)]); + assert.equal(session.isSelectionWithinPlaceholders(), false); // in snippet, outside placeholder + + editor.setSelections([new Selection(1, 6, 1, 6), new Selection(2, 10, 2, 10), new Selection(2, 20, 2, 21)]); + assert.equal(session.isSelectionWithinPlaceholders(), false); + + // reset selection to placeholder + session.next(); + assert.equal(session.isSelectionWithinPlaceholders(), true); + assertSelections(editor, new Selection(1, 10, 1, 13), new Selection(2, 14, 2, 17)); + + // reset selection to placeholder + session.next(); + assert.equal(session.isSelectionWithinPlaceholders(), true); + assert.equal(session.isAtLastPlaceholder, true); + assertSelections(editor, new Selection(1, 13, 1, 13), new Selection(2, 17, 2, 17)); + }); + + test('snippets, nested sessions', function () { + + model.setValue(''); + editor.setSelection(new Selection(1, 1, 1, 1)); + + const first = new SnippetSession(editor, 'foo${2:bar}foo$0'); + first.insert(); + assert.equal(model.getValue(), 'foobarfoo'); + assertSelections(editor, new Selection(1, 4, 1, 7)); + + const second = new SnippetSession(editor, 'ba${1:zzzz}$0'); + second.insert(); + assert.equal(model.getValue(), 'foobazzzzfoo'); + assertSelections(editor, new Selection(1, 6, 1, 10)); + + second.next(); + assert.equal(second.isAtLastPlaceholder, true); + assertSelections(editor, new Selection(1, 10, 1, 10)); + + first.next(); + assert.equal(first.isAtLastPlaceholder, true); + assertSelections(editor, new Selection(1, 13, 1, 13)); + }); + + test('snippets, typing at final tabstop', function () { + + const session = new SnippetSession(editor, 'farboo$0'); + session.insert(); + assert.equal(session.isAtLastPlaceholder, true); + assert.equal(session.isSelectionWithinPlaceholders(), false); + + editor.trigger('test', 'type', { text: 'XXX' }); + assert.equal(session.isSelectionWithinPlaceholders(), false); + }); + + test('snippets, typing at beginning', function () { + + editor.setSelection(new Selection(1, 2, 1, 2)); + const session = new SnippetSession(editor, 'farboo$0'); + session.insert(); + + editor.setSelection(new Selection(1, 2, 1, 2)); + assert.equal(session.isSelectionWithinPlaceholders(), false); + assert.equal(session.isAtLastPlaceholder, true); + + editor.trigger('test', 'type', { text: 'XXX' }); + assert.equal(model.getLineContent(1), 'fXXXfarboounction foo() {'); + assert.equal(session.isSelectionWithinPlaceholders(), false); + + session.next(); + assertSelections(editor, new Selection(1, 11, 1, 11)); + }); + + test('snippets, typing with nested placeholder', function () { + + editor.setSelection(new Selection(1, 1, 1, 1)); + const session = new SnippetSession(editor, 'This ${1:is ${2:nested}}.$0'); + session.insert(); + assertSelections(editor, new Selection(1, 6, 1, 15)); + + session.next(); + assertSelections(editor, new Selection(1, 9, 1, 15)); + + editor.trigger('test', 'cut', {}); + assertSelections(editor, new Selection(1, 9, 1, 9)); + + editor.trigger('test', 'type', { text: 'XXX' }); + session.prev(); + assertSelections(editor, new Selection(1, 6, 1, 12)); + }); + + test('snippets, snippet with variables', function () { + const session = new SnippetSession(editor, '@line=$TM_LINE_NUMBER$0'); + session.insert(); + + assert.equal(model.getValue(), '@line=1function foo() {\n @line=2console.log(a);\n}'); + assertSelections(editor, new Selection(1, 8, 1, 8), new Selection(2, 12, 2, 12)); + }); + + test('snippets, merge', function () { + editor.setSelection(new Selection(1, 1, 1, 1)); + const session = new SnippetSession(editor, 'This ${1:is ${2:nested}}.$0'); + session.insert(); + session.next(); + assertSelections(editor, new Selection(1, 9, 1, 15)); + + session.merge('really ${1:nested}$0'); + assertSelections(editor, new Selection(1, 16, 1, 22)); + + session.next(); + assertSelections(editor, new Selection(1, 22, 1, 22)); + assert.equal(session.isAtLastPlaceholder, false); + + session.next(); + assert.equal(session.isAtLastPlaceholder, true); + assertSelections(editor, new Selection(1, 23, 1, 23)); + + session.prev(); + editor.trigger('test', 'type', { text: 'AAA' }); + + // back to `really ${1:nested}` + session.prev(); + assertSelections(editor, new Selection(1, 16, 1, 22)); + + // back to `${1:is ...}` which now grew + session.prev(); + assertSelections(editor, new Selection(1, 6, 1, 25)); + }); +}); + diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetVariables.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetVariables.test.ts new file mode 100644 index 0000000000000..926bb6f424eb1 --- /dev/null +++ b/src/vs/editor/contrib/snippet/test/browser/snippetVariables.test.ts @@ -0,0 +1,104 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import * as assert from 'assert'; +import { isWindows } from 'vs/base/common/platform'; +import URI from 'vs/base/common/uri'; +import { Selection } from 'vs/editor/common/core/selection'; +import { EditorSnippetVariableResolver } from 'vs/editor/contrib/snippet/browser/snippetVariables'; +import { SnippetParser } from 'vs/editor/contrib/snippet/browser/snippetParser'; +import { Model } from 'vs/editor/common/model/model'; + +suite('Snippet Variables Resolver', function () { + + let model: Model; + let resolver: EditorSnippetVariableResolver; + + setup(function () { + model = Model.createFromString([ + 'this is line one', + 'this is line two', + ' this is line three' + ].join('\n'), undefined, undefined, URI.parse('file:///foo/files/text.txt')); + + resolver = new EditorSnippetVariableResolver(model, new Selection(1, 1, 1, 1)); + }); + + teardown(function () { + model.dispose(); + }); + + test('editor variables, basics', function () { + assert.equal(resolver.resolve('TM_FILENAME'), 'text.txt'); + assert.equal(resolver.resolve('something'), undefined); + }); + + test('editor variables, file/dir', function () { + + assert.equal(resolver.resolve('TM_FILENAME'), 'text.txt'); + if (!isWindows) { + assert.equal(resolver.resolve('TM_DIRECTORY'), '/foo/files'); + assert.equal(resolver.resolve('TM_FILEPATH'), '/foo/files/text.txt'); + } + + resolver = new EditorSnippetVariableResolver( + Model.createFromString('', undefined, undefined, URI.parse('http://www.pb.o/abc/def/ghi')), + new Selection(1, 1, 1, 1) + ); + assert.equal(resolver.resolve('TM_FILENAME'), 'ghi'); + if (!isWindows) { + assert.equal(resolver.resolve('TM_DIRECTORY'), '/abc/def'); + assert.equal(resolver.resolve('TM_FILEPATH'), '/abc/def/ghi'); + } + + resolver = new EditorSnippetVariableResolver( + Model.createFromString('', undefined, undefined, URI.parse('mem:fff.ts')), + new Selection(1, 1, 1, 1) + ); + assert.equal(resolver.resolve('TM_DIRECTORY'), ''); + assert.equal(resolver.resolve('TM_FILEPATH'), 'fff.ts'); + + }); + + test('editor variables, selection', function () { + + resolver = new EditorSnippetVariableResolver(model, new Selection(1, 2, 2, 3)); + assert.equal(resolver.resolve('TM_SELECTED_TEXT'), 'his is line one\nth'); + assert.equal(resolver.resolve('TM_CURRENT_LINE'), 'this is line two'); + assert.equal(resolver.resolve('TM_LINE_INDEX'), '1'); + assert.equal(resolver.resolve('TM_LINE_NUMBER'), '2'); + + resolver = new EditorSnippetVariableResolver(model, new Selection(2, 3, 1, 2)); + assert.equal(resolver.resolve('TM_SELECTED_TEXT'), 'his is line one\nth'); + assert.equal(resolver.resolve('TM_CURRENT_LINE'), 'this is line one'); + assert.equal(resolver.resolve('TM_LINE_INDEX'), '0'); + assert.equal(resolver.resolve('TM_LINE_NUMBER'), '1'); + + resolver = new EditorSnippetVariableResolver(model, new Selection(1, 2, 1, 2)); + assert.equal(resolver.resolve('TM_SELECTED_TEXT'), undefined); + + assert.equal(resolver.resolve('TM_CURRENT_WORD'), 'this'); + + resolver = new EditorSnippetVariableResolver(model, new Selection(3, 1, 3, 1)); + assert.equal(resolver.resolve('TM_CURRENT_WORD'), undefined); + + }); + + test('TextmateSnippet, resolve variable', function () { + const snippet = SnippetParser.parse('"$TM_CURRENT_WORD"'); + assert.equal(snippet.text, '""'); + snippet.resolveVariables(resolver); + assert.equal(snippet.text, '"this"'); + + }); + + test('TextmateSnippet, resolve variable with default', function () { + const snippet = SnippetParser.parse('"${TM_CURRENT_WORD:foo}"'); + assert.equal(snippet.text, '"foo"'); + snippet.resolveVariables(resolver); + assert.equal(snippet.text, '"this"'); + }); +}); diff --git a/src/vs/editor/contrib/snippet/test/common/snippet.test.ts b/src/vs/editor/contrib/snippet/test/common/snippet.test.ts deleted file mode 100644 index 256d778fdaaab..0000000000000 --- a/src/vs/editor/contrib/snippet/test/common/snippet.test.ts +++ /dev/null @@ -1,351 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import * as assert from 'assert'; -import { Range } from 'vs/editor/common/core/range'; -import { CodeSnippet, ICodeSnippet, ISnippetVariableResolver } from 'vs/editor/contrib/snippet/common/snippet'; - -suite('Editor Contrib - Snippets', () => { - - function assertInternalAndTextmate(internal: string, textmate: string, callback: (snippet: ICodeSnippet) => any) { - callback(CodeSnippet.fromInternal(internal)); - callback(CodeSnippet.fromTextmate(textmate)); - } - - test('Support tab stop order', () => { - - assertInternalAndTextmate( - 'finished:{{}}, second:{{2:name}}, first:{{1:}}, third:{{3:}}', - 'finished:$0, second:${2:name}, first:$1, third:$3', - snippet => { - assert.deepEqual(snippet.lines, ['finished:, second:name, first:, third:']); - assert.equal(snippet.placeHolders.length, 4); - assert.equal(snippet.placeHolders[0].id, '1'); - assert.equal(snippet.placeHolders[0].value, ''); - assert.equal(snippet.placeHolders[1].id, '2'); - assert.equal(snippet.placeHolders[1].value, 'name'); - assert.equal(snippet.placeHolders[2].id, '3'); - assert.equal(snippet.placeHolders[2].value, ''); - assert.equal(snippet.placeHolders[3].id, ''); - assert.equal(snippet.placeHolders[3].value, ''); - assert.equal(snippet.finishPlaceHolderIndex, 3); - }); - }); - - test('Support tab stop order with implicit finish', () => { - - assertInternalAndTextmate( - 't2:{{2:}}, t1:{{1:}}', - 't2:$2, t1:$1', - snippet => { - assert.deepEqual(snippet.lines, ['t2:, t1:']); - assert.equal(snippet.placeHolders.length, 3); - assert.equal(snippet.placeHolders[0].id, '1'); - assert.equal(snippet.placeHolders[0].value, ''); - assert.equal(snippet.placeHolders[1].id, '2'); - assert.equal(snippet.placeHolders[1].value, ''); - assert.equal(snippet.finishPlaceHolderIndex, 2); - }); - }); - - test('Support tab stop order with no finish', () => { - - assertInternalAndTextmate( - 't2:{{2:second}}, t3:{{3:last}}, t1:{{1:first}}', - 't2:${2:second}, t3:${3:last}, t1:${1:first}', - snippet => { - assert.deepEqual(snippet.lines, ['t2:second, t3:last, t1:first']); - assert.equal(snippet.placeHolders.length, 4); - assert.equal(snippet.placeHolders[0].id, '1'); - assert.equal(snippet.placeHolders[0].value, 'first'); - assert.equal(snippet.placeHolders[1].id, '2'); - assert.equal(snippet.placeHolders[1].value, 'second'); - assert.equal(snippet.placeHolders[2].id, '3'); - assert.equal(snippet.placeHolders[2].value, 'last'); - assert.equal(snippet.finishPlaceHolderIndex, 3); - }); - }); - - test('Support tab stop order which does not affect named variable id\'s', () => { - - assertInternalAndTextmate( - '{{first}}-{{2:}}-{{second}}-{{1:}}', - '${first}-${2}-${second}-${1}', - snippet => { - assert.deepEqual(snippet.lines, ['first--second-']); - assert.equal(snippet.placeHolders.length, 5); - assert.equal(snippet.placeHolders[0].id, 'first'); - assert.equal(snippet.placeHolders[1].id, 'second'); - assert.equal(snippet.placeHolders[2].id, '1'); - assert.equal(snippet.placeHolders[3].id, '2'); - } - ); - }); - - test('nested placeholder', () => { - let snippet = CodeSnippet.fromTextmate([ - '', - '\t$0', - '' - ].join('\n')); - - assert.equal(snippet.placeHolders.length, 3); - assert.equal(snippet.finishPlaceHolderIndex, 2); - let [first, second, third] = snippet.placeHolders; - - assert.equal(third.id, 0); - assert.equal(third.occurences.length, 1); - assert.deepEqual(third.occurences[0], new Range(2, 2, 2, 2)); - - assert.equal(second.id, 2); - assert.equal(second.occurences.length, 1); - assert.deepEqual(second.occurences[0], new Range(1, 10, 1, 17)); - - assert.equal(first.id, '1'); - assert.equal(first.occurences.length, 1); - assert.deepEqual(first.occurences[0], new Range(1, 5, 1, 18)); - }); - - test('bug #17541:[snippets] Support default text in mirrors', () => { - - var external = [ - 'begin{${1:enumerate}}', - '\t$0', - 'end{$1}' - ].join('\n'); - - var internal = [ - 'begin\\{{{1:enumerate}}\\}', - '\t{{}}', - 'end\\{{{1:}}\\}' - ].join('\n'); - - assertInternalAndTextmate(internal, external, snippet => { - assert.deepEqual(snippet.lines, [ - 'begin{enumerate}', - '\t', - 'end{enumerate}' - ]); - assert.equal(snippet.placeHolders.length, 2); - assert.equal(snippet.placeHolders[0].id, '1'); - assert.equal(snippet.placeHolders[0].occurences.length, 2); - assert.deepEqual(snippet.placeHolders[0].occurences[0], new Range(1, 7, 1, 16)); - assert.deepEqual(snippet.placeHolders[0].occurences[1], new Range(3, 5, 3, 14)); - assert.equal(snippet.placeHolders[1].id, ''); - assert.equal(snippet.placeHolders[1].occurences.length, 1); - assert.deepEqual(snippet.placeHolders[1].occurences[0], new Range(2, 2, 2, 2)); - }); - }); - - test('bug #7093: Snippet default value is only populated for first variable reference', () => { - var internal = 'logger.error({ logContext: lc, errorContext: `{{1:err}}`, error: {{1:}} });'; - var external = 'logger.error({ logContext: lc, errorContext: `${1:err}`, error: $1 });'; - - assertInternalAndTextmate(internal, external, snippet => { - assert.equal(snippet.lines.length, 1); - assert.equal(snippet.lines[0], 'logger.error({ logContext: lc, errorContext: `err`, error: err });'); - }); - }); - - test('bug #17487:[snippets] four backslashes are required to get one backslash in the inserted text', () => { - - var external = [ - '\\begin{${1:enumerate}}', - '\t$0', - '\\end{$1}' - ].join('\n'); - - var internal = [ - '\\begin\\{{{1:enumerate}}\\}', - '\t{{}}', - '\\end\\{{{1:}}\\}' - ].join('\n'); - - assertInternalAndTextmate(internal, external, snippet => { - assert.deepEqual(snippet.lines, [ - '\\begin{enumerate}', - '\t', - '\\end{enumerate}' - ]); - assert.equal(snippet.placeHolders.length, 2); - assert.equal(snippet.placeHolders[0].id, '1'); - assert.equal(snippet.placeHolders[0].occurences.length, 2); - assert.deepEqual(snippet.placeHolders[0].occurences[0], new Range(1, 8, 1, 17)); - assert.deepEqual(snippet.placeHolders[0].occurences[1], new Range(3, 6, 3, 15)); - assert.equal(snippet.placeHolders[1].id, ''); - assert.equal(snippet.placeHolders[1].occurences.length, 1); - assert.deepEqual(snippet.placeHolders[1].occurences[0], new Range(2, 2, 2, 2)); - }); - }); - - test('issue #3552: Snippet Converted Not Working for literal Dollar Sign', () => { - - let external = '\n\\$scope.\\$broadcast(\'scroll.infiniteScrollComplete\');\n'; - let snippet = CodeSnippet.fromTextmate(external); - assert.equal(snippet.placeHolders.length, 1); - assert.equal(snippet.finishPlaceHolderIndex, 0); - assert.deepEqual(snippet.lines, ['', '$scope.$broadcast(\'scroll.infiniteScrollComplete\');', '']); - }); - - test('bind, adjust indentation', () => { - - // don't move placeholder at the beginning of the line - let snippet = CodeSnippet.fromTextmate([ - 'afterEach((done) => {', - '\t${1}test${2}', - '})' - ].join('\n')); - - // replace tab-stop with two spaces - let boundSnippet = snippet.bind('', 0, 0, { - normalizeIndentation(str: string): string { - return str.replace(/\t/g, ' '); - } - }); - let [first, second] = boundSnippet.placeHolders; - assert.equal(first.occurences.length, 1); - assert.equal(first.occurences[0].startColumn, 3); - assert.equal(second.occurences.length, 1); - assert.equal(second.occurences[0].startColumn, 7); - - // keep tab-stop, identity - boundSnippet = snippet.bind('', 0, 0, { - normalizeIndentation(str: string): string { - return str; - } - }); - [first, second] = boundSnippet.placeHolders; - assert.equal(first.occurences.length, 1); - assert.equal(first.occurences[0].startColumn, 2); - assert.equal(second.occurences.length, 1); - assert.equal(second.occurences[0].startColumn, 6); - }); - - - test('issue #11890: Bad cursor position 1/2', () => { - - let snippet = CodeSnippet.fromTextmate([ - 'afterEach((done) => {', - '${1}\ttest${2}', - '})' - ].join('\n')); - - let boundSnippet = snippet.bind('', 0, 0, { - normalizeIndentation(str: string): string { - return str.replace(/\t/g, ' '); - } - }); - - assert.equal(boundSnippet.lines[1], ' test'); - assert.equal(boundSnippet.placeHolders.length, 3); - assert.equal(boundSnippet.finishPlaceHolderIndex, 2); - - let [first, second] = boundSnippet.placeHolders; - assert.equal(first.occurences.length, 1); - assert.equal(first.occurences[0].startColumn, 1); - assert.equal(second.occurences.length, 1); - assert.equal(second.occurences[0].startColumn, 7); - }); - - test('issue #11890: Bad cursor position 2/2', () => { - - let snippet = CodeSnippet.fromTextmate('${1}\ttest'); - - let boundSnippet = snippet.bind('abc abc abc prefix3', 0, 12, { - normalizeIndentation(str: string): string { - return str.replace(/\t/g, ' '); - } - }); - - assert.equal(boundSnippet.lines[0], '\ttest'); - assert.equal(boundSnippet.placeHolders.length, 2); - assert.equal(boundSnippet.finishPlaceHolderIndex, 1); - - let [first, second] = boundSnippet.placeHolders; - assert.equal(first.occurences.length, 1); - assert.equal(first.occurences[0].startColumn, 13); - assert.equal(second.occurences.length, 1); - assert.equal(second.occurences[0].startColumn, 18); - }); - - test('issue #17989: Bad selection', () => { - - let snippet = CodeSnippet.fromTextmate('${1:HoldMeTight}'); - - let boundSnippet = snippet.bind('abc abc abc prefix3', 0, 12, { - normalizeIndentation(str: string): string { - return str.replace(/\t/g, ' '); - } - }); - - assert.equal(boundSnippet.lines[0], 'HoldMeTight'); - assert.equal(boundSnippet.placeHolders.length, 2); - assert.equal(boundSnippet.finishPlaceHolderIndex, 1); - let [first, second] = boundSnippet.placeHolders; - assert.equal(first.occurences.length, 1); - assert.equal(first.occurences[0].startColumn, 13); - - assert.equal(second.occurences.length, 1); - assert.equal(second.occurences[0].startColumn, 24); - - }); - - test('variables, simple', () => { - - const resolver: ISnippetVariableResolver = { - resolve(name) { - return name.split('').reverse().join(''); - } - }; - - // simple - let snippet = CodeSnippet.fromTextmate('$FOO', resolver); - assert.equal(snippet.lines[0], 'OOF'); - assert.equal(snippet.placeHolders.length, 1); - assert.equal(snippet.placeHolders[0].occurences[0].endColumn, 4); - - snippet = CodeSnippet.fromTextmate('${FOO:BAR}', resolver); - assert.equal(snippet.lines[0], 'OOF'); - assert.equal(snippet.placeHolders.length, 1); - assert.equal(snippet.placeHolders[0].occurences[0].endColumn, 4); - - // placeholder - snippet = CodeSnippet.fromTextmate('${1:$FOO}bar$1', resolver); - assert.equal(snippet.lines[0], 'OOFbarOOF'); - assert.equal(snippet.placeHolders.length, 2); - assert.equal(snippet.placeHolders[0].occurences.length, 2); - assert.equal(snippet.placeHolders[0].occurences[0].startColumn, 1); - assert.equal(snippet.placeHolders[0].occurences[0].endColumn, 4); - assert.equal(snippet.placeHolders[0].occurences[1].startColumn, 7); - assert.equal(snippet.placeHolders[0].occurences[1].endColumn, 10); - assert.equal(snippet.placeHolders[1].occurences.length, 1); - - snippet = CodeSnippet.fromTextmate('${1:${FOO:abc}}bar$1', resolver); - assert.equal(snippet.lines[0], 'OOFbarOOF'); - }); - - test('variables, evil resolver', () => { - - let snippet = CodeSnippet.fromTextmate('$FOO', { resolve(): string { throw new Error(); } }); - assert.equal(snippet.lines[0], 'FOO'); - }); - - test('variables, default', () => { - - let snippet = CodeSnippet.fromTextmate('$FOO', { resolve(): string { return undefined; } }); - assert.equal(snippet.lines[0], 'FOO'); - - snippet = CodeSnippet.fromTextmate('$FOO', { resolve(): string { return ''; } }); - assert.equal(snippet.lines[0], ''); - - snippet = CodeSnippet.fromTextmate('${FOO:BAR}', { resolve(): string { return undefined; } }); - assert.equal(snippet.lines[0], 'BAR'); - - snippet = CodeSnippet.fromTextmate('${FOO:BAR}', { resolve(): string { return ''; } }); - assert.equal(snippet.lines[0], 'BAR'); - }); -}); - diff --git a/src/vs/editor/contrib/snippet/test/common/snippetController.test.ts b/src/vs/editor/contrib/snippet/test/common/snippetController.test.ts deleted file mode 100644 index 75ddf1777cffc..0000000000000 --- a/src/vs/editor/contrib/snippet/test/common/snippetController.test.ts +++ /dev/null @@ -1,553 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import * as assert from 'assert'; -import { Range } from 'vs/editor/common/core/range'; -import { Position } from 'vs/editor/common/core/position'; -import { Selection } from 'vs/editor/common/core/selection'; -import { CodeSnippet } from 'vs/editor/contrib/snippet/common/snippet'; -import { SnippetController } from 'vs/editor/contrib/snippet/common/snippetController'; -import { MockCodeEditor, withMockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; -import { Cursor } from 'vs/editor/common/controller/cursor'; - -class TestSnippetController extends SnippetController { - - isInSnippetMode(): boolean { - return !!this._currentController; - } - -} - -suite('SnippetController', () => { - - function snippetTest(cb: (editor: MockCodeEditor, cursor: Cursor, codeSnippet: CodeSnippet, snippetController: TestSnippetController) => void, lines?: string[]): void { - - if (!lines) { - lines = [ - 'function test() {', - '\tvar x = 3;', - '\tvar arr = [];', - '\t', - '}' - ]; - }; - - withMockCodeEditor(lines, {}, (editor, cursor) => { - editor.getModel().updateOptions({ - insertSpaces: false - }); - let snippetController = editor.registerAndInstantiateContribution(TestSnippetController); - let codeSnippet = CodeSnippet.fromInternal([ - 'for (var {{index}}; {{index}} < {{array}}.length; {{index}}++) {', - '\tvar element = {{array}}[{{index}}];', - '\t{{}}', - '}' - ].join('\n')); - - cb(editor, cursor, codeSnippet, snippetController); - - snippetController.dispose(); - }); - } - - test('Simple accepted', () => { - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setPosition({ lineNumber: 4, column: 2 }); - - snippetController.run(codeSnippet, 0, 0); - assert.equal(editor.getModel().getLineContent(4), '\tfor (var index; index < array.length; index++) {'); - assert.equal(editor.getModel().getLineContent(5), '\t\tvar element = array[index];'); - assert.equal(editor.getModel().getLineContent(6), '\t\t'); - assert.equal(editor.getModel().getLineContent(7), '\t}'); - - editor.trigger('test', 'type', { text: 'i' }); - assert.equal(editor.getModel().getLineContent(4), '\tfor (var i; i < array.length; i++) {'); - assert.equal(editor.getModel().getLineContent(5), '\t\tvar element = array[i];'); - assert.equal(editor.getModel().getLineContent(6), '\t\t'); - assert.equal(editor.getModel().getLineContent(7), '\t}'); - - snippetController.jumpToNextPlaceholder(); - editor.trigger('test', 'type', { text: 'arr' }); - assert.equal(editor.getModel().getLineContent(4), '\tfor (var i; i < arr.length; i++) {'); - assert.equal(editor.getModel().getLineContent(5), '\t\tvar element = arr[i];'); - assert.equal(editor.getModel().getLineContent(6), '\t\t'); - assert.equal(editor.getModel().getLineContent(7), '\t}'); - - snippetController.jumpToPrevPlaceholder(); - editor.trigger('test', 'type', { text: 'j' }); - assert.equal(editor.getModel().getLineContent(4), '\tfor (var j; j < arr.length; j++) {'); - assert.equal(editor.getModel().getLineContent(5), '\t\tvar element = arr[j];'); - assert.equal(editor.getModel().getLineContent(6), '\t\t'); - assert.equal(editor.getModel().getLineContent(7), '\t}'); - - snippetController.acceptSnippet(); - assert.deepEqual(editor.getPosition(), new Position(6, 3)); - }); - }); - - test('Simple canceled', () => { - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setPosition({ lineNumber: 4, column: 2 }); - - snippetController.run(codeSnippet, 0, 0); - assert.equal(editor.getModel().getLineContent(4), '\tfor (var index; index < array.length; index++) {'); - assert.equal(editor.getModel().getLineContent(5), '\t\tvar element = array[index];'); - assert.equal(editor.getModel().getLineContent(6), '\t\t'); - assert.equal(editor.getModel().getLineContent(7), '\t}'); - - snippetController.leaveSnippet(); - assert.deepEqual(editor.getPosition(), new Position(4, 16)); - }); - }); - - test('Stops when deleting lines above', () => { - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setPosition({ lineNumber: 4, column: 2 }); - snippetController.run(codeSnippet, 0, 0); - - editor.getModel().applyEdits([{ - forceMoveMarkers: false, - identifier: null, - isAutoWhitespaceEdit: false, - range: new Range(1, 1, 3, 1), - text: null - }]); - - assert.equal(snippetController.isInSnippetMode(), false); - }); - }); - - test('Stops when deleting lines below', () => { - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setPosition({ lineNumber: 4, column: 2 }); - snippetController.run(codeSnippet, 0, 0); - - editor.getModel().applyEdits([{ - forceMoveMarkers: false, - identifier: null, - isAutoWhitespaceEdit: false, - range: new Range(8, 1, 8, 100), - text: null - }]); - - assert.equal(snippetController.isInSnippetMode(), false); - }); - }); - - test('Stops when inserting lines above', () => { - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setPosition({ lineNumber: 4, column: 2 }); - snippetController.run(codeSnippet, 0, 0); - - editor.getModel().applyEdits([{ - forceMoveMarkers: false, - identifier: null, - isAutoWhitespaceEdit: false, - range: new Range(1, 100, 1, 100), - text: '\nHello' - }]); - - assert.equal(snippetController.isInSnippetMode(), false); - }); - }); - - test('Stops when inserting lines below', () => { - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setPosition({ lineNumber: 4, column: 2 }); - snippetController.run(codeSnippet, 0, 0); - - editor.getModel().applyEdits([{ - forceMoveMarkers: false, - identifier: null, - isAutoWhitespaceEdit: false, - range: new Range(8, 100, 8, 100), - text: '\nHello' - }]); - - assert.equal(snippetController.isInSnippetMode(), false); - }); - }); - - test('Stops when calling model.setValue()', () => { - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setPosition({ lineNumber: 4, column: 2 }); - snippetController.run(codeSnippet, 0, 0); - - editor.getModel().setValue('goodbye'); - - assert.equal(snippetController.isInSnippetMode(), false); - }); - }); - - test('Stops when undoing', () => { - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setPosition({ lineNumber: 4, column: 2 }); - snippetController.run(codeSnippet, 0, 0); - - editor.getModel().undo(); - - assert.equal(snippetController.isInSnippetMode(), false); - }); - }); - - test('Stops when moving cursor outside', () => { - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setPosition({ lineNumber: 4, column: 2 }); - snippetController.run(codeSnippet, 0, 0); - - editor.setPosition({ lineNumber: 1, column: 1 }); - - assert.equal(snippetController.isInSnippetMode(), false); - }); - }); - - test('Stops when disconnecting editor model', () => { - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setPosition({ lineNumber: 4, column: 2 }); - snippetController.run(codeSnippet, 0, 0); - - editor.setModel(null); - - assert.equal(snippetController.isInSnippetMode(), false); - }); - }); - - test('Stops when disposing editor', () => { - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setPosition({ lineNumber: 4, column: 2 }); - snippetController.run(codeSnippet, 0, 0); - - snippetController.dispose(); - - assert.equal(snippetController.isInSnippetMode(), false); - }); - }); - - test('Final tabstop with multiple selections', () => { - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setSelections([ - new Selection(1, 1, 1, 1), - new Selection(2, 1, 2, 1), - ]); - - codeSnippet = CodeSnippet.fromInternal('foo{{}}'); - snippetController.run(codeSnippet, 0, 0); - - assert.equal(editor.getSelections().length, 2); - const [first, second] = editor.getSelections(); - assert.ok(first.equalsRange({ startLineNumber: 1, startColumn: 4, endLineNumber: 1, endColumn: 4 }), first.toString()); - assert.ok(second.equalsRange({ startLineNumber: 2, startColumn: 4, endLineNumber: 2, endColumn: 4 }), second.toString()); - }); - - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setSelections([ - new Selection(1, 1, 1, 1), - new Selection(2, 1, 2, 1), - ]); - - codeSnippet = CodeSnippet.fromInternal('foo{{}}bar'); - snippetController.run(codeSnippet, 0, 0); - - assert.equal(editor.getSelections().length, 2); - const [first, second] = editor.getSelections(); - assert.ok(first.equalsRange({ startLineNumber: 1, startColumn: 4, endLineNumber: 1, endColumn: 4 }), first.toString()); - assert.ok(second.equalsRange({ startLineNumber: 2, startColumn: 4, endLineNumber: 2, endColumn: 4 }), second.toString()); - }); - - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setSelections([ - new Selection(1, 1, 1, 1), - new Selection(1, 5, 1, 5), - ]); - - codeSnippet = CodeSnippet.fromInternal('foo{{}}bar'); - snippetController.run(codeSnippet, 0, 0); - - assert.equal(editor.getSelections().length, 2); - const [first, second] = editor.getSelections(); - assert.ok(first.equalsRange({ startLineNumber: 1, startColumn: 4, endLineNumber: 1, endColumn: 4 }), first.toString()); - assert.ok(second.equalsRange({ startLineNumber: 1, startColumn: 14, endLineNumber: 1, endColumn: 14 }), second.toString()); - }); - - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setSelections([ - new Selection(1, 1, 1, 1), - new Selection(1, 5, 1, 5), - ]); - - codeSnippet = CodeSnippet.fromInternal('foo\n{{}}\nbar'); - snippetController.run(codeSnippet, 0, 0); - - assert.equal(editor.getSelections().length, 2); - const [first, second] = editor.getSelections(); - assert.ok(first.equalsRange({ startLineNumber: 2, startColumn: 1, endLineNumber: 2, endColumn: 1 }), first.toString()); - assert.ok(second.equalsRange({ startLineNumber: 4, startColumn: 1, endLineNumber: 4, endColumn: 1 }), second.toString()); - }); - - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setSelections([ - new Selection(1, 1, 1, 1), - new Selection(1, 5, 1, 5), - ]); - - codeSnippet = CodeSnippet.fromInternal('foo\n{{}}\nbar'); - snippetController.run(codeSnippet, 0, 0); - - assert.equal(editor.getSelections().length, 2); - const [first, second] = editor.getSelections(); - assert.ok(first.equalsRange({ startLineNumber: 2, startColumn: 1, endLineNumber: 2, endColumn: 1 }), first.toString()); - assert.ok(second.equalsRange({ startLineNumber: 4, startColumn: 1, endLineNumber: 4, endColumn: 1 }), second.toString()); - }); - - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setSelections([ - new Selection(2, 7, 2, 7), - ]); - - codeSnippet = CodeSnippet.fromInternal('xo{{}}r'); - snippetController.run(codeSnippet, 1, 0); - - assert.equal(editor.getSelections().length, 1); - assert.ok(editor.getSelection().equalsRange({ startLineNumber: 2, startColumn: 8, endColumn: 8, endLineNumber: 2 })); - }); - }); - - test('Final tabstop, #11742 simple', () => { - snippetTest((editor, cursor, codeSnippet, controller) => { - - editor.setSelection(new Selection(1, 19, 1, 19)); - - codeSnippet = CodeSnippet.fromTextmate('{{% url_**$1** %}}'); - controller.run(codeSnippet, 2, 0); - - assert.equal(editor.getSelections().length, 1); - assert.ok(editor.getSelection().equalsRange({ startLineNumber: 1, startColumn: 27, endLineNumber: 1, endColumn: 27 })); - assert.equal(editor.getModel().getValue(), 'example example {{% url_**** %}}'); - - }, ['example example sc']); - - snippetTest((editor, cursor, codeSnippet, controller) => { - - editor.setSelection(new Selection(1, 3, 1, 3)); - - codeSnippet = CodeSnippet.fromTextmate([ - 'afterEach((done) => {', - '\t${1}test', - '});' - ].join('\n')); - - controller.run(codeSnippet, 2, 0); - - assert.equal(editor.getSelections().length, 1); - assert.ok(editor.getSelection().equalsRange({ startLineNumber: 2, startColumn: 2, endLineNumber: 2, endColumn: 2 }), editor.getSelection().toString()); - assert.equal(editor.getModel().getValue(), 'afterEach((done) => {\n\ttest\n});'); - - }, ['af']); - - snippetTest((editor, cursor, codeSnippet, controller) => { - - editor.setSelection(new Selection(1, 3, 1, 3)); - - codeSnippet = CodeSnippet.fromTextmate([ - 'afterEach((done) => {', - '${1}\ttest', - '});' - ].join('\n')); - - controller.run(codeSnippet, 2, 0); - - assert.equal(editor.getSelections().length, 1); - assert.ok(editor.getSelection().equalsRange({ startLineNumber: 2, startColumn: 1, endLineNumber: 2, endColumn: 1 }), editor.getSelection().toString()); - assert.equal(editor.getModel().getValue(), 'afterEach((done) => {\n\ttest\n});'); - - }, ['af']); - - snippetTest((editor, cursor, codeSnippet, controller) => { - - editor.setSelection(new Selection(1, 9, 1, 9)); - - codeSnippet = CodeSnippet.fromTextmate([ - 'aft${1}er' - ].join('\n')); - - controller.run(codeSnippet, 8, 0); - - assert.equal(editor.getModel().getValue(), 'after'); - assert.equal(editor.getSelections().length, 1); - assert.ok(editor.getSelection().equalsRange({ startLineNumber: 1, startColumn: 4, endLineNumber: 1, endColumn: 4 }), editor.getSelection().toString()); - - }, ['afterone']); - }); - - test('Final tabstop, #11742 different indents', () => { - - snippetTest((editor, cursor, codeSnippet, controller) => { - - editor.setSelections([ - new Selection(2, 4, 2, 4), - new Selection(1, 3, 1, 3) - ]); - - codeSnippet = CodeSnippet.fromTextmate([ - 'afterEach((done) => {', - '\t${0}test', - '});' - ].join('\n')); - - controller.run(codeSnippet, 2, 0); - - assert.equal(editor.getSelections().length, 2); - const [first, second] = editor.getSelections(); - - assert.ok(first.equalsRange({ startLineNumber: 5, startColumn: 3, endLineNumber: 5, endColumn: 3 }), first.toString()); - assert.ok(second.equalsRange({ startLineNumber: 2, startColumn: 2, endLineNumber: 2, endColumn: 2 }), second.toString()); - - }, ['af', '\taf']); - }); - - test('Final tabstop, #11890 stay at the beginning', () => { - - snippetTest((editor, cursor, codeSnippet, controller) => { - - editor.setSelections([ - new Selection(1, 5, 1, 5) - ]); - - codeSnippet = CodeSnippet.fromTextmate([ - 'afterEach((done) => {', - '${1}\ttest', - '});' - ].join('\n')); - - controller.run(codeSnippet, 2, 0); - - assert.equal(editor.getSelections().length, 1); - const [first] = editor.getSelections(); - - assert.ok(first.equalsRange({ startLineNumber: 2, startColumn: 3, endLineNumber: 2, endColumn: 3 }), first.toString()); - - }, [' af']); - }); - - test('Final tabstop, no tabstop', () => { - - snippetTest((editor, cursor, codeSnippet, controller) => { - - editor.setSelections([ - new Selection(1, 3, 1, 3) - ]); - - codeSnippet = CodeSnippet.fromTextmate('afterEach'); - - controller.run(codeSnippet, 2, 0); - - assert.ok(editor.getSelection().equalsRange({ startLineNumber: 1, startColumn: 10, endLineNumber: 1, endColumn: 10 })); - - }, ['af', '\taf']); - }); - - test('Multiple cursor and overwriteBefore/After, issue #11060', () => { - - snippetTest((editor, cursor, codeSnippet, controller) => { - - editor.setSelections([ - new Selection(1, 7, 1, 7), - new Selection(2, 4, 2, 4) - ]); - - codeSnippet = CodeSnippet.fromTextmate('_foo'); - controller.run(codeSnippet, 1, 0); - assert.equal(editor.getModel().getValue(), 'this._foo\nabc_foo'); - - }, ['this._', 'abc']); - - snippetTest((editor, cursor, codeSnippet, controller) => { - - editor.setSelections([ - new Selection(1, 7, 1, 7), - new Selection(2, 4, 2, 4) - ]); - - codeSnippet = CodeSnippet.fromTextmate('XX'); - controller.run(codeSnippet, 1, 0); - assert.equal(editor.getModel().getValue(), 'this.XX\nabcXX'); - - }, ['this._', 'abc']); - - snippetTest((editor, cursor, codeSnippet, controller) => { - - editor.setSelections([ - new Selection(1, 7, 1, 7), - new Selection(2, 4, 2, 4), - new Selection(3, 5, 3, 5) - ]); - - codeSnippet = CodeSnippet.fromTextmate('_foo'); - controller.run(codeSnippet, 1, 0); - assert.equal(editor.getModel().getValue(), 'this._foo\nabc_foo\ndef_foo'); - - }, ['this._', 'abc', 'def_']); - - snippetTest((editor, cursor, codeSnippet, controller) => { - - editor.setSelections([ - new Selection(1, 7, 1, 7), - new Selection(2, 4, 2, 4), - new Selection(3, 6, 3, 6) - ]); - - codeSnippet = CodeSnippet.fromTextmate('._foo'); - controller.run(codeSnippet, 2, 0); - assert.equal(editor.getModel().getValue(), 'this._foo\nabc._foo\ndef._foo'); - - }, ['this._', 'abc', 'def._']); - - }); - - test('Multiple cursor and overwriteBefore/After, #16277', () => { - snippetTest((editor, cursor, codeSnippet, controller) => { - - editor.setSelections([ - new Selection(1, 5, 1, 5), - new Selection(2, 5, 2, 5), - ]); - - codeSnippet = CodeSnippet.fromTextmate('document'); - controller.run(codeSnippet, 3, 0); - assert.equal(editor.getModel().getValue(), '{document}\n{document && true}'); - - }, ['{foo}', '{foo && true}']); - }); - - test('Insert snippet twice, #19449', () => { - - snippetTest((editor, cursor, codeSnippet, controller) => { - - editor.setSelections([ - new Selection(1, 1, 1, 1) - ]); - - codeSnippet = CodeSnippet.fromTextmate('for (var ${1:i}=0; ${1:i} { - - editor.setSelections([ - new Selection(1, 1, 1, 1) - ]); - - codeSnippet = CodeSnippet.fromTextmate('for (let ${1:i}=0; ${1:i} { - - test('Scanner', () => { - - const scanner = new Scanner(); - assert.equal(scanner.next().type, TokenType.EOF); - - scanner.text('abc'); - assert.equal(scanner.next().type, TokenType.VariableName); - assert.equal(scanner.next().type, TokenType.EOF); - - scanner.text('{{abc}}'); - assert.equal(scanner.next().type, TokenType.CurlyOpen); - assert.equal(scanner.next().type, TokenType.CurlyOpen); - assert.equal(scanner.next().type, TokenType.VariableName); - assert.equal(scanner.next().type, TokenType.CurlyClose); - assert.equal(scanner.next().type, TokenType.CurlyClose); - assert.equal(scanner.next().type, TokenType.EOF); - - scanner.text('abc() '); - assert.equal(scanner.next().type, TokenType.VariableName); - assert.equal(scanner.next().type, TokenType.Format); - assert.equal(scanner.next().type, TokenType.EOF); - - scanner.text('abc 123'); - assert.equal(scanner.next().type, TokenType.VariableName); - assert.equal(scanner.next().type, TokenType.Format); - assert.equal(scanner.next().type, TokenType.Int); - assert.equal(scanner.next().type, TokenType.EOF); - - scanner.text('$foo'); - assert.equal(scanner.next().type, TokenType.Dollar); - assert.equal(scanner.next().type, TokenType.VariableName); - assert.equal(scanner.next().type, TokenType.EOF); - - scanner.text('$foo_bar'); - assert.equal(scanner.next().type, TokenType.Dollar); - assert.equal(scanner.next().type, TokenType.VariableName); - assert.equal(scanner.next().type, TokenType.EOF); - - scanner.text('$foo-bar'); - assert.equal(scanner.next().type, TokenType.Dollar); - assert.equal(scanner.next().type, TokenType.VariableName); - assert.equal(scanner.next().type, TokenType.Format); - assert.equal(scanner.next().type, TokenType.VariableName); - assert.equal(scanner.next().type, TokenType.EOF); - - scanner.text('${foo}'); - assert.equal(scanner.next().type, TokenType.Dollar); - assert.equal(scanner.next().type, TokenType.CurlyOpen); - assert.equal(scanner.next().type, TokenType.VariableName); - assert.equal(scanner.next().type, TokenType.CurlyClose); - assert.equal(scanner.next().type, TokenType.EOF); - - scanner.text('${1223:foo}'); - assert.equal(scanner.next().type, TokenType.Dollar); - assert.equal(scanner.next().type, TokenType.CurlyOpen); - assert.equal(scanner.next().type, TokenType.Int); - assert.equal(scanner.next().type, TokenType.Colon); - assert.equal(scanner.next().type, TokenType.VariableName); - assert.equal(scanner.next().type, TokenType.CurlyClose); - assert.equal(scanner.next().type, TokenType.EOF); - - scanner.text('\\${}'); - assert.equal(scanner.next().type, TokenType.Backslash); - assert.equal(scanner.next().type, TokenType.Dollar); - assert.equal(scanner.next().type, TokenType.CurlyOpen); - assert.equal(scanner.next().type, TokenType.CurlyClose); - }); - - function assertEscape(value: string, expected: string) { - const p = new SnippetParser(); - const actual = p.escape(value); - assert.equal(actual, expected); - } - - function assertMarker(marker: Marker[], ...ctors: Function[]); - function assertMarker(value: string, ...ctors: Function[]); - function assertMarker(valueOrMarker: Marker[] | string, ...ctors: Function[]) { - let marker: Marker[]; - if (typeof valueOrMarker === 'string') { - const p = new SnippetParser(); - marker = p.parse(valueOrMarker); - } else { - marker = valueOrMarker; - } - while (marker.length > 0) { - let m = marker.pop(); - let ctor = ctors.pop(); - assert.ok(m instanceof ctor); - } - assert.equal(marker.length, ctors.length); - assert.equal(marker.length, 0); - } - - function assertEscapeAndMarker(value: string, escaped: string, ...ctors: Function[]) { - assertEscape(value, escaped); - assertMarker(value, ...ctors); - } - - test('Parser, escaping', () => { - assertEscape('$', '$'); - assertEscape('\\\\$', '\\$'); - assertEscape('{', '{'); - assertEscape('\\}', '}'); - assertEscape('\\abc', '\\abc'); - assertEscape('foo${f:\\}}bar', 'foo}bar'); - assertEscape('\\{', '{'); - assertEscape('I need \\\\\\$', 'I need \\$'); - assertEscape('\\', '\\'); - assertEscape('\\{{', '{{'); - assertEscape('{{', '{{'); - assertEscape('{{dd', '{{dd'); - assertEscape('}}', '}}'); - assertEscape('ff}}', 'ff}}'); - - assertEscape('farboo', 'farboo'); - assertEscape('far{{}}boo', 'farboo'); - assertEscape('far{{123}}boo', 'far123boo'); - assertEscape('far\\{{123}}boo', 'far{{123}}boo'); - assertEscape('far{{id:bern}}boo', 'farbernboo'); - assertEscape('far{{id:bern {{basel}}}}boo', 'farbern baselboo'); - assertEscape('far{{id:bern {{id:basel}}}}boo', 'farbern baselboo'); - assertEscape('far{{id:bern {{id2:basel}}}}boo', 'farbern baselboo'); - - }); - - test('Parser, TM escaping', () => { - assertEscapeAndMarker('foo${1:bar}}', 'foobar}', Text, Placeholder, Text); - assertEscapeAndMarker('foo${1:bar}${2:foo}}', 'foobarfoo}', Text, Placeholder, Placeholder, Text); - - assertEscapeAndMarker('foo${1:bar\\}${2:foo}}', 'foobar}foo', Text, Placeholder); - - let [, placeholder] = new SnippetParser(true, false).parse('foo${1:bar\\}${2:foo}}'); - let { defaultValue } = (placeholder); - - assert.equal((placeholder).name, '1'); - assert.ok(defaultValue[0] instanceof Text); - assert.equal(defaultValue[0].toString(), 'bar}'); - assert.ok(defaultValue[1] instanceof Placeholder); - assert.equal(defaultValue[1].toString(), 'foo'); - }); - - test('Parser, placeholder', () => { - assertEscapeAndMarker('farboo', 'farboo', Text); - assertEscapeAndMarker('far{{}}boo', 'farboo', Text, Placeholder, Text); - assertEscapeAndMarker('far{{123}}boo', 'far123boo', Text, Placeholder, Text); - assertEscapeAndMarker('far\\{{123}}boo', 'far{{123}}boo', Text); - }); - - test('Parser, literal code', () => { - assertEscapeAndMarker('far`123`boo', 'far`123`boo', Text); - assertEscapeAndMarker('far\\`123\\`boo', 'far\\`123\\`boo', Text); - }); - - test('Parser, variables/tabstop', () => { - assertEscapeAndMarker('$far-boo', '-boo', Variable, Text); - assertEscapeAndMarker('\\$far-boo', '$far-boo', Text); - assertEscapeAndMarker('far$farboo', 'far', Text, Variable); - assertEscapeAndMarker('far${farboo}', 'far', Text, Variable); - assertEscapeAndMarker('$123', '', Placeholder); - assertEscapeAndMarker('$farboo', '', Variable); - assertEscapeAndMarker('$far12boo', '', Variable); - }); - - test('Parser, variables/placeholder with defaults', () => { - assertEscapeAndMarker('${name:value}', 'value', Variable); - assertEscapeAndMarker('${1:value}', 'value', Placeholder); - assertEscapeAndMarker('${1:bar${2:foo}bar}', 'barfoobar', Placeholder); - - assertEscapeAndMarker('${name:value', '${name:value', Text); - assertEscapeAndMarker('${1:bar${2:foobar}', '${1:barfoobar', Text, Placeholder); - }); - - test('Parser, only textmate', () => { - const p = new SnippetParser(true, false); - assertMarker(p.parse('far{{}}boo'), Text); - assertMarker(p.parse('far{{123}}boo'), Text); - assertMarker(p.parse('far\\{{123}}boo'), Text); - - assertMarker(p.parse('far$0boo'), Text, Placeholder, Text); - assertMarker(p.parse('far${123}boo'), Text, Placeholder, Text); - assertMarker(p.parse('far\\${123}boo'), Text); - }); - - test('Parser, only internal', () => { - const p = new SnippetParser(false, true); - assertMarker(p.parse('far{{}}boo'), Text, Placeholder, Text); - assertMarker(p.parse('far{{123}}boo'), Text, Placeholder, Text); - assertMarker(p.parse('far\\{{123}}boo'), Text); - - assertMarker(p.parse('far$0boo'), Text); - assertMarker(p.parse('far${123}boo'), Text); - assertMarker(p.parse('far\\${123}boo'), Text); - }); - - test('Parser, real world', () => { - let marker = new SnippetParser().parse('console.warn(${1: $TM_SELECTED_TEXT })'); - - assert.equal(marker[0].toString(), 'console.warn('); - assert.ok(marker[1] instanceof Placeholder); - assert.equal(marker[2].toString(), ')'); - - const placeholder = marker[1]; - assert.equal(placeholder, false); - assert.equal(placeholder.name, '1'); - assert.equal(placeholder.defaultValue.length, 3); - assert.ok(placeholder.defaultValue[0] instanceof Text); - assert.ok(placeholder.defaultValue[1] instanceof Variable); - assert.ok(placeholder.defaultValue[2] instanceof Text); - assert.equal(placeholder.defaultValue[0].toString(), ' '); - assert.equal(placeholder.defaultValue[1].toString(), ''); - assert.equal(placeholder.defaultValue[2].toString(), ' '); - - const nestedVariable = placeholder.defaultValue[1]; - assert.equal(nestedVariable.name, 'TM_SELECTED_TEXT'); - assert.equal(nestedVariable.defaultValue.length, 0); - - marker = new SnippetParser().parse('$TM_SELECTED_TEXT'); - assert.equal(marker.length, 1); - assert.ok(marker[0] instanceof Variable); - }); - - test('Parser, real world, mixed', () => { - - assertEscapeAndMarker( - 'finished:{{}}, second:{{2:name}}, first:{{1:}}, third:{{3:}}', - 'finished:, second:name, first:, third:', - Text, Placeholder, Text, Placeholder, Text, Placeholder, Text, Placeholder - ); - - - assertEscapeAndMarker( - 'begin\\{{{1:enumerate}}\\}\n\t{{}}\nend\\{{{1:}}\\}', - 'begin{enumerate}\n\t\nend{enumerate}', - Text, Placeholder, Text, Placeholder, Text, Placeholder, Text - ); - - }); - - test('Parser, default name/value', () => { - assertEscapeAndMarker( - '{{first}}-{{2:}}-{{second}}-{{1:}}', - 'first--second-', - Placeholder, Text, Placeholder, Text, Placeholder, Text, Placeholder - ); - - const [p1, , p2, , p3] = new SnippetParser().parse('{{first}}-{{2:}}-{{second}}-{{1:}}'); - assert.equal((p1).name, 'first'); - assert.equal(Marker.toString((p1).defaultValue), 'first'); - - assert.equal((p2).name, '2'); - assert.equal(Marker.toString((p2).defaultValue), ''); - - assert.equal((p3).name, 'second'); - assert.equal(Marker.toString((p3).defaultValue), 'second'); - }); - - test('Parser, default placeholder values', () => { - - assertMarker('errorContext: `${1:err}`, error: $1', Text, Placeholder, Text, Placeholder); - - const [, p1, , p2] = new SnippetParser().parse('errorContext: `${1:err}`, error:$1'); - - assert.equal((p1).name, '1'); - assert.equal((p1).defaultValue.length, '1'); - assert.equal(((p1).defaultValue[0]), 'err'); - - assert.equal((p2).name, '1'); - assert.equal((p2).defaultValue.length, '1'); - assert.equal(((p2).defaultValue[0]), 'err'); - - }); - - test('backspace esapce in TM only, #16212', () => { - const actual = new SnippetParser(true, false).escape('Foo \\\\${abc}bar'); - assert.equal(actual, 'Foo \\bar'); - }); - - test('colon as variable/placeholder value, #16717', () => { - let actual = new SnippetParser(true, false).escape('${TM_SELECTED_TEXT:foo:bar}'); - assert.equal(actual, 'foo:bar'); - - actual = new SnippetParser(true, false).escape('${1:foo:bar}'); - assert.equal(actual, 'foo:bar'); - }); -}); diff --git a/src/vs/editor/contrib/snippet/test/common/snippetVariables.test.ts b/src/vs/editor/contrib/snippet/test/common/snippetVariables.test.ts deleted file mode 100644 index 0c72e96b318c5..0000000000000 --- a/src/vs/editor/contrib/snippet/test/common/snippetVariables.test.ts +++ /dev/null @@ -1,94 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import * as assert from 'assert'; -import { isWindows } from 'vs/base/common/platform'; -import URI from 'vs/base/common/uri'; -import { Selection } from 'vs/editor/common/core/selection'; -import { SnippetVariablesResolver } from 'vs/editor/contrib/snippet/common/snippetVariables'; -import { MockCodeEditor, withMockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; -import { Model } from 'vs/editor/common/model/model'; - -suite('Snippet Variables Resolver', function () { - - const model = Model.createFromString('', undefined, undefined, URI.parse('file:///foo/files/text.txt')); - - function variablesTest(callback: (editor: MockCodeEditor, resolver: SnippetVariablesResolver) => any) { - - - const lines: string[] = [ - 'this is line one', - 'this is line two', - ' this is line three' - ]; - - model.setValue(lines.join('\n')); - - withMockCodeEditor(lines, { model }, editor => { - callback(editor, new SnippetVariablesResolver(editor)); - }); - } - - test('editor variables, basics', function () { - - variablesTest((editor, resolver) => { - assert.equal(resolver.resolve('TM_FILENAME'), 'text.txt'); - assert.equal(resolver.resolve('something'), undefined); - - editor.setModel(null); - assert.throws(() => resolver.resolve('TM_FILENAME')); - }); - }); - - test('editor variables, file/dir', function () { - - variablesTest((editor, resolver) => { - assert.equal(resolver.resolve('TM_FILENAME'), 'text.txt'); - if (!isWindows) { - assert.equal(resolver.resolve('TM_DIRECTORY'), '/foo/files'); - assert.equal(resolver.resolve('TM_FILEPATH'), '/foo/files/text.txt'); - } - - editor.setModel(Model.createFromString('', undefined, undefined, URI.parse('http://www.pb.o/abc/def/ghi'))); - assert.equal(resolver.resolve('TM_FILENAME'), 'ghi'); - if (!isWindows) { - assert.equal(resolver.resolve('TM_DIRECTORY'), '/abc/def'); - assert.equal(resolver.resolve('TM_FILEPATH'), '/abc/def/ghi'); - } - - editor.setModel(Model.createFromString('', undefined, undefined, URI.parse('mem:fff.ts'))); - assert.equal(resolver.resolve('TM_DIRECTORY'), ''); - assert.equal(resolver.resolve('TM_FILEPATH'), 'fff.ts'); - }); - }); - - test('editor variables, selection', function () { - - variablesTest((editor, resolver) => { - - editor.setSelection(new Selection(1, 2, 2, 3)); - assert.equal(resolver.resolve('TM_SELECTED_TEXT'), 'his is line one\nth'); - assert.equal(resolver.resolve('TM_CURRENT_LINE'), 'this is line two'); - assert.equal(resolver.resolve('TM_LINE_INDEX'), '1'); - assert.equal(resolver.resolve('TM_LINE_NUMBER'), '2'); - - editor.setSelection(new Selection(2, 3, 1, 2)); - assert.equal(resolver.resolve('TM_SELECTED_TEXT'), 'his is line one\nth'); - assert.equal(resolver.resolve('TM_CURRENT_LINE'), 'this is line one'); - assert.equal(resolver.resolve('TM_LINE_INDEX'), '0'); - assert.equal(resolver.resolve('TM_LINE_NUMBER'), '1'); - - editor.setSelection(new Selection(1, 2, 1, 2)); - assert.equal(resolver.resolve('TM_SELECTED_TEXT'), ''); - - assert.equal(resolver.resolve('TM_CURRENT_WORD'), 'this'); - - editor.setSelection(new Selection(3, 1, 3, 1)); - assert.equal(resolver.resolve('TM_CURRENT_WORD'), ''); - }); - }); - -}); diff --git a/src/vs/editor/contrib/suggest/browser/completionModel.ts b/src/vs/editor/contrib/suggest/browser/completionModel.ts index dd84990104ea5..374d7b446262c 100644 --- a/src/vs/editor/contrib/suggest/browser/completionModel.ts +++ b/src/vs/editor/contrib/suggest/browser/completionModel.ts @@ -124,20 +124,40 @@ export class CompletionModel { word = wordLen === 0 ? '' : leadingLineContent.slice(-wordLen); } - let match = fuzzyScore(word, suggestion.label); - if (match) { - item.score = match[0]; - item.matches = match[1]; - } else { - if (typeof suggestion.filterText === 'string') { - match = fuzzyScore(word, suggestion.filterText); - } + if (wordLen === 0) { + // when there is nothing to score against, don't + // event try to do. Use a const rank and rely on + // the fallback-sort using the initial sort order. + // use a score of `-100` because that is out of the + // bound of values `fuzzyScore` will return + item.score = -100; + + } else if (typeof suggestion.filterText === 'string') { + // when there is a `filterText` it must match the `word`. + // if it matches we check with the label to compute highlights + // and if that doesn't yield a result we have no highlights, + // despite having the match + let match = fuzzyScore(word, suggestion.filterText, suggestion.overwriteBefore); if (!match) { continue; } item.score = match[0]; - item.matches = []; // don't use the filterText-matches + item.matches = []; + match = fuzzyScore(word, suggestion.label, suggestion.overwriteBefore); + if (match) { + item.matches = match[1]; + } + } else { + // by default match `word` against the `label` + let match = fuzzyScore(word, suggestion.label, suggestion.overwriteBefore); + if (match) { + item.score = match[0]; + item.matches = match[1]; + } else { + continue; + } } + item.idx = i; this._filteredItems.push(item); diff --git a/src/vs/editor/contrib/suggest/browser/media/back.svg b/src/vs/editor/contrib/suggest/browser/media/back.svg deleted file mode 100644 index 487340cd69abe..0000000000000 --- a/src/vs/editor/contrib/suggest/browser/media/back.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/editor/contrib/suggest/browser/media/close-dark.svg b/src/vs/editor/contrib/suggest/browser/media/close-dark.svg new file mode 100644 index 0000000000000..751e89b3b0215 --- /dev/null +++ b/src/vs/editor/contrib/suggest/browser/media/close-dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vs/editor/contrib/suggest/browser/media/close.svg b/src/vs/editor/contrib/suggest/browser/media/close.svg new file mode 100644 index 0000000000000..fde34404d4eb8 --- /dev/null +++ b/src/vs/editor/contrib/suggest/browser/media/close.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vs/editor/contrib/suggest/browser/media/suggest.css b/src/vs/editor/contrib/suggest/browser/media/suggest.css index 3714be6e58fad..1c3b4374b667d 100644 --- a/src/vs/editor/contrib/suggest/browser/media/suggest.css +++ b/src/vs/editor/contrib/suggest/browser/media/suggest.css @@ -3,29 +3,63 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -/* Suggest */ +/* Suggest widget*/ .monaco-editor .suggest-widget { z-index: 40; - width: 438px; } -.monaco-editor .suggest-widget.visible { - -webkit-transition: left .05s ease-in-out; - -moz-transition: left .05s ease-in-out; - -o-transition: left .05s ease-in-out; - transition: left .05s ease-in-out; +/** Initial widths **/ + +.monaco-editor .suggest-widget { + width: 430px; +} + +.monaco-editor .suggest-widget > .message, +.monaco-editor .suggest-widget > .tree, +.monaco-editor .suggest-widget > .details { + width: 100%; + border-style: solid; + border-width: 1px; + box-sizing: border-box; +} + +.monaco-editor.hc-black .suggest-widget > .message, +.monaco-editor.hc-black .suggest-widget > .tree, +.monaco-editor.hc-black .suggest-widget > .details { + border-width: 2px; +} + +/** Adjust width when docs are expanded to the side **/ +.monaco-editor .suggest-widget.docs-side { + width: 660px; } +.monaco-editor .suggest-widget.docs-side > .tree, +.monaco-editor .suggest-widget.docs-side > .details { + width: 50%; + float: left; +} + +.monaco-editor .suggest-widget.docs-side.list-right > .tree, +.monaco-editor .suggest-widget.docs-side.list-right > .details { + float: right; +} + + +/* Styles for Message element for when widget is loading or is empty */ .monaco-editor .suggest-widget > .message { padding-left: 22px; - opacity: 0.7; } +/** Styles for the list element **/ .monaco-editor .suggest-widget > .tree { height: 100%; - width: 100%; } + + +/** Styles for each row in the list element **/ + .monaco-editor .suggest-widget .monaco-list .monaco-list-row { display: flex; -mox-box-sizing: border-box; @@ -49,47 +83,39 @@ text-overflow: ellipsis; } -.monaco-editor .suggest-widget .monaco-list .monaco-list-row .docs { - display: none; - overflow: hidden; -} - -.monaco-editor .suggest-widget .monaco-list .monaco-list-row .docs > .docs-text { - flex: 2; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - opacity: 0.85; +.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight { + font-weight: bold; } -.monaco-editor .suggest-widget .monaco-list .monaco-list-row .docs > .docs-text.no-docs { - opacity: 0.5; - font-style: italic; -} +/** Icon styles **/ -.monaco-editor .suggest-widget .monaco-list .monaco-list-row .docs > .docs-details { +.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close, +.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .readMore { opacity: 0.6; - background-image: url('./info.svg'); background-position: center center; background-repeat: no-repeat; background-size: 70%; + cursor: pointer; } -.monaco-editor .suggest-widget .details > .header > .go-back, -.monaco-editor .suggest-widget .monaco-list .monaco-list-row .docs > .docs-details { - color: #0035DD; +.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close { + background-image: url('./close.svg'); + float: right; + margin-right: 5px; } -.monaco-editor .suggest-widget .monaco-list .monaco-list-row .docs > .docs-details:hover { - opacity: 1; +.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .readMore { + background-image: url('./info.svg'); } -.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight { - font-weight: bold; +.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close:hover, +.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .readMore:hover { + opacity: 1; } +/** Type Info and icon next to the label in the focused completion item **/ + .monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .type-label { - display: none; margin-left: 0.8em; flex: 1; text-align: right; @@ -102,17 +128,20 @@ display: inline; } -.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused > .contents > .main > .type-label { - display: inline; +.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .readMore, +.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .type-label, +.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused > .contents > .main > .readMore, +.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused > .contents > .main > .type-label, +.monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row.focused > .contents > .main > .readMore { + display: none; } -.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .type-label { +.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused > .contents > .main > .readMore, +.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused > .contents > .main > .type-label { display: inline; } -.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .docs { - display: flex; -} +/** Styles for each row in the list **/ .monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon { display: block; @@ -159,38 +188,19 @@ display: inline-block; } +/** Styles for the docs of the completion item in focus **/ .monaco-editor .suggest-widget .details { - height: 100%; - box-sizing: border-box; display: flex; flex-direction: column; cursor: default; } -.monaco-editor .suggest-widget .details > .header { - padding: 4px 5px; - display: flex; - box-sizing: border-box; - border-bottom: 1px solid rgba(204, 204, 204, 0.5); -} - -.monaco-editor .suggest-widget .details > .header > .title { - flex: 2; - overflow: hidden; - text-overflow: ellipsis; -} - -.monaco-editor .suggest-widget .details > .header > .go-back { - cursor: pointer; - opacity: 0.6; - background-image: url('./back.svg'); - background-size: 70%; - background-position: center center; - background-repeat: no-repeat; +.monaco-editor .suggest-widget .details.no-docs { + display: none; } -.monaco-editor .suggest-widget .details > .header > .go-back:hover { - opacity: 1; +.monaco-editor .suggest-widget.docs-below .details { + border-top-width: 0px; } .monaco-editor .suggest-widget .details > .monaco-scrollable-element { @@ -205,11 +215,17 @@ white-space: pre-wrap; } -.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .type { +.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .type { + flex: 2; + overflow: hidden; + text-overflow: ellipsis; opacity: 0.7; + word-break: break-all; + margin: 0; + padding: 4px 0 4px 5px; } -.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > p { +.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs { margin: 0; padding: 4px 5px; } @@ -218,28 +234,12 @@ display: none; } -/* Dark theme */ -.monaco-editor.vs-dark .suggest-widget .details > .header { - border-color: rgba(85,85,85,0.5); -} - -.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .docs > .docs-details, -.monaco-editor.vs-dark .suggest-widget .details > .header > .go-back { - color: #4E94CE; -} - - -/* High Contrast Theming */ - -.monaco-editor.hc-black .suggest-widget .details > .monaco-scrollable-element > .body > .docs, -.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .docs { - color: #C07A7A; -} +/* High Contrast and Dark Theming */ -.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .docs > .docs-details, -.monaco-editor.hc-black .suggest-widget .details > .header > .go-back { - color: #4E94CE; +.monaco-editor.vs-dark .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close, +.monaco-editor.hc-black .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close { + background-image: url('./close-dark.svg'); } .monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon, diff --git a/src/vs/editor/contrib/suggest/browser/suggest.ts b/src/vs/editor/contrib/suggest/browser/suggest.ts index 6ca956304cf31..7c2db1e7321da 100644 --- a/src/vs/editor/contrib/suggest/browser/suggest.ts +++ b/src/vs/editor/contrib/suggest/browser/suggest.ts @@ -15,14 +15,13 @@ import { CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; import { ISuggestResult, ISuggestSupport, ISuggestion, SuggestRegistry } from 'vs/editor/common/modes'; import { Position, IPosition } from 'vs/editor/common/core/position'; import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; -import { DefaultConfig } from 'vs/editor/common/config/defaultConfig'; export const Context = { Visible: new RawContextKey('suggestWidgetVisible', false), MultipleSuggestions: new RawContextKey('suggestWidgetMultipleSuggestions', false), MakesTextEdit: new RawContextKey('suggestionMakesTextEdit', true), AcceptOnKey: new RawContextKey('suggestionSupportsAcceptOnKey', true), - AcceptSuggestionsOnEnter: new RawContextKey('acceptSuggestionOnEnter', DefaultConfig.editor.acceptSuggestionOnEnter) + AcceptSuggestionsOnEnter: new RawContextKey('acceptSuggestionOnEnter', true) }; export interface ISuggestionItem { diff --git a/src/vs/editor/contrib/suggest/browser/suggestController.ts b/src/vs/editor/contrib/suggest/browser/suggestController.ts index 241c5141a1878..add8b9df096a4 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestController.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestController.ts @@ -21,8 +21,8 @@ import { alert } from 'vs/base/browser/ui/aria/aria'; import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; import { EditOperation } from 'vs/editor/common/core/editOperation'; import { Range } from 'vs/editor/common/core/range'; -import { CodeSnippet } from 'vs/editor/contrib/snippet/common/snippet'; -import { SnippetController } from 'vs/editor/contrib/snippet/common/snippetController'; +import { SnippetParser } from 'vs/editor/contrib/snippet/browser/snippetParser'; +import { SnippetController2 } from 'vs/editor/contrib/snippet/browser/snippetController2'; import { Context as SuggestContext } from './suggest'; import { SuggestModel, State } from './suggestModel'; import { ICompletionItem } from './completionModel'; @@ -102,7 +102,11 @@ export class SuggestController implements IEditorContribution { // Manage the acceptSuggestionsOnEnter context key let acceptSuggestionsOnEnter = SuggestContext.AcceptSuggestionsOnEnter.bindTo(_contextKeyService); let updateFromConfig = () => { - acceptSuggestionsOnEnter.set(this._editor.getConfiguration().contribInfo.acceptSuggestionOnEnter); + const { acceptSuggestionOnEnter } = this._editor.getConfiguration().contribInfo; + acceptSuggestionsOnEnter.set( + acceptSuggestionOnEnter === 'on' || acceptSuggestionOnEnter === 'smart' + || (acceptSuggestionOnEnter) === true + ); }; this._toDispose.push(this._editor.onDidChangeConfiguration((e) => updateFromConfig())); updateFromConfig(); @@ -129,7 +133,11 @@ export class SuggestController implements IEditorContribution { const endColumn = position.column; let value = true; if ( - this._model.state === State.Auto + this._editor.getConfiguration().contribInfo.acceptSuggestionOnEnter === 'smart' + && this._model.state === State.Auto + && !item.suggestion.command + && !item.suggestion.additionalTextEdits + && item.suggestion.snippetType !== 'textmate' && endColumn - startColumn === item.suggestion.insertText.length ) { const oldText = this._editor.getModel().getValueInRange({ @@ -174,19 +182,18 @@ export class SuggestController implements IEditorContribution { this._editor.pushUndoStop(); } - if (suggestion.snippetType === 'textmate') { - SnippetController.get(this._editor).insertSnippet( - suggestion.insertText, - suggestion.overwriteBefore + columnDelta, - suggestion.overwriteAfter); - } else { - SnippetController.get(this._editor).run( - CodeSnippet.fromInternal(suggestion.insertText), - suggestion.overwriteBefore + columnDelta, - suggestion.overwriteAfter - ); + let { insertText } = suggestion; + if (suggestion.snippetType !== 'textmate') { + insertText = SnippetParser.escape(insertText); } + SnippetController2.get(this._editor).insert( + insertText, + suggestion.overwriteBefore + columnDelta, + suggestion.overwriteAfter + ); + + if (suggestion.command) { this._commandService.executeCommand(suggestion.command.id, ...suggestion.command.arguments).done(undefined, onUnexpectedError); } @@ -219,7 +226,7 @@ export class SuggestController implements IEditorContribution { cancelSuggestWidget(): void { if (this._widget) { this._model.cancel(); - this._widget.hideDetailsOrHideWidget(); + this._widget.hideWidget(); } } @@ -264,6 +271,12 @@ export class SuggestController implements IEditorContribution { this._widget.toggleDetails(); } } + + toggleSuggestionFocus(): void { + if (this._widget) { + this._widget.toggleDetailsFocus(); + } + } } @editorAction @@ -312,11 +325,11 @@ CommonEditorRegistry.registerEditorCommand(new SuggestCommand({ CommonEditorRegistry.registerEditorCommand(new SuggestCommand({ id: 'acceptSelectedSuggestionOnEnter', - precondition: ContextKeyExpr.and(SuggestContext.Visible, SuggestContext.MakesTextEdit), + precondition: SuggestContext.Visible, handler: x => x.acceptSelectedSuggestion(), kbOpts: { weight: weight, - kbExpr: ContextKeyExpr.and(EditorContextKeys.textFocus, SuggestContext.AcceptSuggestionsOnEnter), + kbExpr: ContextKeyExpr.and(EditorContextKeys.textFocus, SuggestContext.AcceptSuggestionsOnEnter, SuggestContext.MakesTextEdit), primary: KeyCode.Enter } })); @@ -341,8 +354,8 @@ CommonEditorRegistry.registerEditorCommand(new SuggestCommand({ weight: weight, kbExpr: EditorContextKeys.textFocus, primary: KeyCode.DownArrow, - secondary: [KeyMod.Alt | KeyCode.DownArrow], - mac: { primary: KeyCode.DownArrow, secondary: [KeyMod.Alt | KeyCode.DownArrow, KeyMod.WinCtrl | KeyCode.KEY_N] } + secondary: [KeyMod.CtrlCmd | KeyCode.DownArrow], + mac: { primary: KeyCode.DownArrow, secondary: [KeyMod.CtrlCmd | KeyCode.DownArrow, KeyMod.WinCtrl | KeyCode.KEY_N] } } })); @@ -354,7 +367,7 @@ CommonEditorRegistry.registerEditorCommand(new SuggestCommand({ weight: weight, kbExpr: EditorContextKeys.textFocus, primary: KeyCode.PageDown, - secondary: [KeyMod.Alt | KeyCode.PageDown] + secondary: [KeyMod.CtrlCmd | KeyCode.PageDown] } })); @@ -372,8 +385,8 @@ CommonEditorRegistry.registerEditorCommand(new SuggestCommand({ weight: weight, kbExpr: EditorContextKeys.textFocus, primary: KeyCode.UpArrow, - secondary: [KeyMod.Alt | KeyCode.UpArrow], - mac: { primary: KeyCode.UpArrow, secondary: [KeyMod.Alt | KeyCode.UpArrow, KeyMod.WinCtrl | KeyCode.KEY_P] } + secondary: [KeyMod.CtrlCmd | KeyCode.UpArrow], + mac: { primary: KeyCode.UpArrow, secondary: [KeyMod.CtrlCmd | KeyCode.UpArrow, KeyMod.WinCtrl | KeyCode.KEY_P] } } })); @@ -385,7 +398,7 @@ CommonEditorRegistry.registerEditorCommand(new SuggestCommand({ weight: weight, kbExpr: EditorContextKeys.textFocus, primary: KeyCode.PageUp, - secondary: [KeyMod.Alt | KeyCode.PageUp] + secondary: [KeyMod.CtrlCmd | KeyCode.PageUp] } })); @@ -406,3 +419,15 @@ CommonEditorRegistry.registerEditorCommand(new SuggestCommand({ mac: { primary: KeyMod.WinCtrl | KeyCode.Space } } })); + +CommonEditorRegistry.registerEditorCommand(new SuggestCommand({ + id: 'toggleSuggestionFocus', + precondition: SuggestContext.Visible, + handler: x => x.toggleSuggestionFocus(), + kbOpts: { + weight: weight, + kbExpr: EditorContextKeys.textFocus, + primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.Space, + mac: { primary: KeyMod.WinCtrl | KeyMod.Alt | KeyCode.Space } + } +})); diff --git a/src/vs/editor/contrib/suggest/browser/suggestModel.ts b/src/vs/editor/contrib/suggest/browser/suggestModel.ts index 1bb4c209b1898..f70b0d709aba8 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestModel.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestModel.ts @@ -68,7 +68,7 @@ export class LineContext { readonly column: number; readonly leadingLineContent: string; readonly leadingWord: IWordAtPosition; - readonly auto; + readonly auto: boolean; constructor(model: IModel, position: Position, auto: boolean) { this.leadingLineContent = model.getLineContent(position.lineNumber).substr(0, position.column - 1); @@ -199,7 +199,7 @@ export class SuggestModel implements IDisposable { } } } - this.trigger(true, false, supports, items); + this.trigger(true, Boolean(this.completionModel), supports, items); } }); } @@ -248,6 +248,12 @@ export class SuggestModel implements IDisposable { || e.source !== 'keyboard' || e.reason !== CursorChangeReason.NotSet) { + if (this._state === State.Idle) { + // Early exit if nothing needs to be done! + // Leave some form of early exit check here if you wish to continue being a cursor position change listener ;) + return; + } + this.cancel(); return; } @@ -396,8 +402,8 @@ export class SuggestModel implements IDisposable { return; } - if (ctx.column > this.context.column && this.completionModel.incomplete) { - // typed -> moved cursor RIGHT & incomple model -> retrigger + if (ctx.column > this.context.column && this.completionModel.incomplete && ctx.leadingWord.word.length !== 0) { + // typed -> moved cursor RIGHT & incomple model & still on a word -> retrigger const { complete, incomplete } = this.completionModel.resolveIncompleteInfo(); this.trigger(this._state === State.Auto, true, incomplete, complete); @@ -424,6 +430,13 @@ export class SuggestModel implements IDisposable { this.completionModel.lineContext = oldLineContext; isFrozen = this.completionModel.items.length > 0; + if (isFrozen && ctx.leadingWord.word.length === 0) { + // there were results before but now there aren't + // and also we are not on a word anymore -> cancel + this.cancel(); + return; + } + } else { // nothing left this.cancel(); diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 729331aa2773c..b632ff100a0a9 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -13,7 +13,7 @@ import Event, { Emitter, chain } from 'vs/base/common/event'; import { TPromise } from 'vs/base/common/winjs.base'; import { isPromiseCanceledError, onUnexpectedError } from 'vs/base/common/errors'; import { IDisposable, dispose, toDisposable } from 'vs/base/common/lifecycle'; -import { addClass, append, $, hide, removeClass, show, toggleClass } from 'vs/base/browser/dom'; +import { addClass, append, $, hide, removeClass, show, toggleClass, getDomNodePagePosition, hasClass } from 'vs/base/browser/dom'; import { HighlightedLabel } from 'vs/base/browser/ui/highlightedlabel/highlightedLabel'; import { IDelegate, IListEvent, IRenderer } from 'vs/base/browser/ui/list/list'; import { List } from 'vs/base/browser/ui/list/listWidget'; @@ -29,9 +29,12 @@ import { alert } from 'vs/base/browser/ui/aria/aria'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { attachListStyler } from 'vs/platform/theme/common/styler'; import { IThemeService, ITheme, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -import { registerColor, editorWidgetBackground, contrastBorder, listFocusBackground, activeContrastBorder, listHighlightForeground, editorForeground } from 'vs/platform/theme/common/colorRegistry'; +import { registerColor, editorWidgetBackground, listFocusBackground, activeContrastBorder, listHighlightForeground, editorForeground, editorWidgetBorder, focusBorder } from 'vs/platform/theme/common/colorRegistry'; +import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; const sticky = false; // for development purposes +const expandSuggestionDocsByDefault = false; +const maxSuggestionsToShow = 12; interface ISuggestionTemplateData { root: HTMLElement; @@ -39,19 +42,18 @@ interface ISuggestionTemplateData { colorspan: HTMLElement; highlightedLabel: HighlightedLabel; typeLabel: HTMLElement; - documentationDetails: HTMLElement; - documentation: HTMLElement; + readMore: HTMLElement; disposables: IDisposable[]; } /** * Suggest widget colors */ -export const editorSuggestWidgetBackground = registerColor('editorSuggestWidgetBackground', { dark: editorWidgetBackground, light: editorWidgetBackground, hc: editorWidgetBackground }, nls.localize('editorSuggestWidgetBackground', 'Background color of the suggest widget.')); -export const editorSuggestWidgetBorder = registerColor('editorSuggestWidgetBorder', { dark: '#454545', light: '#C8C8C8', hc: contrastBorder }, nls.localize('editorSuggestWidgetBorder', 'Border color of the suggest widget.')); -export const editorSuggestWidgetForeground = registerColor('editorSuggestWidgetForeground', { dark: editorForeground, light: editorForeground, hc: editorForeground }, nls.localize('editorSuggestWidgetForeground', 'Foreground color of the suggest widget.')); -export const editorSuggestWidgetSelectedBackground = registerColor('editorSuggestWidgetSelectedBackground', { dark: listFocusBackground, light: listFocusBackground, hc: listFocusBackground }, nls.localize('editorSuggestWidgetSelectedBackground', 'Background color of the selected entry in the suggest widget.')); -export const editorSuggestWidgetHighlightForeground = registerColor('editorSuggestWidgetHighlightForeground', { dark: listHighlightForeground, light: listHighlightForeground, hc: listHighlightForeground }, nls.localize('editorSuggestWidgetHighlightForeground', 'Color of the match highlights in the suggest widget.')); +export const editorSuggestWidgetBackground = registerColor('editorSuggestWidget.background', { dark: editorWidgetBackground, light: editorWidgetBackground, hc: editorWidgetBackground }, nls.localize('editorSuggestWidgetBackground', 'Background color of the suggest widget.')); +export const editorSuggestWidgetBorder = registerColor('editorSuggestWidget.border', { dark: editorWidgetBorder, light: editorWidgetBorder, hc: editorWidgetBorder }, nls.localize('editorSuggestWidgetBorder', 'Border color of the suggest widget.')); +export const editorSuggestWidgetForeground = registerColor('editorSuggestWidget.foreground', { dark: editorForeground, light: editorForeground, hc: editorForeground }, nls.localize('editorSuggestWidgetForeground', 'Foreground color of the suggest widget.')); +export const editorSuggestWidgetSelectedBackground = registerColor('editorSuggestWidget.selectedBackground', { dark: listFocusBackground, light: listFocusBackground, hc: listFocusBackground }, nls.localize('editorSuggestWidgetSelectedBackground', 'Background color of the selected entry in the suggest widget.')); +export const editorSuggestWidgetHighlightForeground = registerColor('editorSuggestWidget.highlightForeground', { dark: listHighlightForeground, light: listHighlightForeground, hc: listHighlightForeground }, nls.localize('editorSuggestWidgetHighlightForeground', 'Color of the match highlights in the suggest widget.')); const colorRegExp = /^(#([\da-f]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))$/i; @@ -60,24 +62,24 @@ function matchesColor(text: string) { } function canExpandCompletionItem(item: ICompletionItem) { + if (!item) { + return false; + } const suggestion = item.suggestion; if (suggestion.documentation) { return true; } - return (suggestion.detail || '').indexOf('\n') >= 0; + return (suggestion.detail && suggestion.detail !== suggestion.label); } class Renderer implements IRenderer { - private triggerKeybindingLabel: string; - constructor( private widget: SuggestWidget, private editor: ICodeEditor, - @IKeybindingService keybindingService: IKeybindingService + private triggerKeybindingLabel: string ) { - const kb = keybindingService.lookupKeybinding('editor.action.triggerSuggest'); - this.triggerKeybindingLabel = !kb ? '' : ` (${kb.getLabel()})`; + } get templateId(): string { @@ -98,10 +100,8 @@ class Renderer implements IRenderer { data.disposables.push(data.highlightedLabel); data.typeLabel = append(main, $('span.type-label')); - const docs = append(text, $('.docs')); - data.documentation = append(docs, $('span.docs-text')); - data.documentationDetails = append(docs, $('span.docs-details')); - data.documentationDetails.title = nls.localize('readMore', "Read More...{0}", this.triggerKeybindingLabel); + data.readMore = append(main, $('span.readMore')); + data.readMore.title = nls.localize('readMore', "Read More...{0}", this.triggerKeybindingLabel); const configureFont = () => { const configuration = this.editor.getConfiguration(); @@ -116,8 +116,8 @@ class Renderer implements IRenderer { main.style.lineHeight = lineHeightPx; data.icon.style.height = lineHeightPx; data.icon.style.width = lineHeightPx; - data.documentationDetails.style.height = lineHeightPx; - data.documentationDetails.style.width = lineHeightPx; + data.readMore.style.height = lineHeightPx; + data.readMore.style.width = lineHeightPx; }; configureFont(); @@ -153,24 +153,23 @@ class Renderer implements IRenderer { data.highlightedLabel.set(suggestion.label, createMatches(element.matches)); data.typeLabel.textContent = (suggestion.detail || '').replace(/\n.*$/m, ''); - data.documentation.textContent = suggestion.documentation || ''; - if (canExpandCompletionItem(element)) { - show(data.documentationDetails); - data.documentationDetails.onmousedown = e => { + show(data.readMore); + data.readMore.onmousedown = e => { e.stopPropagation(); e.preventDefault(); }; - data.documentationDetails.onclick = e => { + data.readMore.onclick = e => { e.stopPropagation(); e.preventDefault(); this.widget.toggleDetails(); }; } else { - hide(data.documentationDetails); - data.documentationDetails.onmousedown = null; - data.documentationDetails.onclick = null; + hide(data.readMore); + data.readMore.onmousedown = null; + data.readMore.onclick = null; } + } disposeTemplate(templateData: ISuggestionTemplateData): void { @@ -191,40 +190,38 @@ const enum State { class SuggestionDetails { private el: HTMLElement; - private title: HTMLElement; - private titleLabel: HighlightedLabel; - private back: HTMLElement; + private close: HTMLElement; private scrollbar: DomScrollableElement; private body: HTMLElement; + private header: HTMLElement; private type: HTMLElement; private docs: HTMLElement; private ariaLabel: string; private disposables: IDisposable[]; + private borderWidth: number = 1; constructor( container: HTMLElement, private widget: SuggestWidget, - private editor: ICodeEditor + private editor: ICodeEditor, + private triggerKeybindingLabel: string ) { this.disposables = []; this.el = append(container, $('.details')); this.disposables.push(toDisposable(() => container.removeChild(this.el))); - const header = append(this.el, $('.header')); - this.title = append(header, $('span.title')); - this.titleLabel = new HighlightedLabel(this.title); - this.disposables.push(this.titleLabel); - - this.back = append(header, $('span.go-back')); - this.back.title = nls.localize('goback', "Go back"); this.body = $('.body'); - this.scrollbar = new DomScrollableElement(this.body, { canUseTranslate3d: false }); + this.scrollbar = new DomScrollableElement(this.body, {}); append(this.el, this.scrollbar.getDomNode()); this.disposables.push(this.scrollbar); - this.type = append(this.body, $('p.type')); + this.header = append(this.body, $('.header')); + this.close = append(this.header, $('span.close')); + this.close.title = nls.localize('readLess', "Read less...{0}", triggerKeybindingLabel); + this.type = append(this.header, $('p.type')); + this.docs = append(this.body, $('p.docs')); this.ariaLabel = null; @@ -240,22 +237,31 @@ class SuggestionDetails { } render(item: ICompletionItem): void { - if (!item) { - this.titleLabel.set(''); + if (!item || !canExpandCompletionItem(item)) { this.type.textContent = ''; this.docs.textContent = ''; + addClass(this.el, 'no-docs'); this.ariaLabel = null; return; } - - this.titleLabel.set(item.suggestion.label, createMatches(item.matches)); - this.type.innerText = item.suggestion.detail || ''; + removeClass(this.el, 'no-docs'); this.docs.textContent = item.suggestion.documentation; - this.back.onmousedown = e => { + + if (item.suggestion.detail) { + this.type.innerText = item.suggestion.detail; + show(this.type); + } else { + this.type.innerText = ''; + hide(this.type); + } + + this.el.style.height = this.header.offsetHeight + this.docs.offsetHeight + (this.borderWidth * 2) + 'px'; + + this.close.onmousedown = e => { e.preventDefault(); e.stopPropagation(); }; - this.back.onclick = e => { + this.close.onclick = e => { e.preventDefault(); e.stopPropagation(); this.widget.toggleDetails(); @@ -295,6 +301,10 @@ class SuggestionDetails { this.scrollUp(80); } + setBorderWidth(width: number): void { + this.borderWidth = width; + } + private configureFont() { const configuration = this.editor.getConfiguration(); const fontFamily = configuration.fontInfo.fontFamily; @@ -304,10 +314,9 @@ class SuggestionDetails { const lineHeightPx = `${lineHeight}px`; this.el.style.fontSize = fontSizePx; - this.title.style.fontFamily = fontFamily; this.type.style.fontFamily = fontFamily; - this.back.style.height = lineHeightPx; - this.back.style.width = lineHeightPx; + this.close.style.height = lineHeightPx; + this.close.style.width = lineHeightPx; } dispose(): void { @@ -359,27 +368,48 @@ export class SuggestWidget implements IContentWidget, IDelegate readonly onDidHide: Event = this.onDidHideEmitter.event; readonly onDidShow: Event = this.onDidShowEmitter.event; + private readonly maxWidgetWidth = 660; + private readonly listWidth = 330; + private storageService: IStorageService; + private detailsFocusBorderColor: string; + private detailsBorderColor: string; + + private storageServiceAvailable: boolean = true; + private expandSuggestionDocs: boolean = false; + constructor( private editor: ICodeEditor, @ITelemetryService private telemetryService: ITelemetryService, @IContextKeyService contextKeyService: IContextKeyService, @IInstantiationService instantiationService: IInstantiationService, - @IThemeService themeService: IThemeService + @IThemeService themeService: IThemeService, + @IStorageService storageService: IStorageService, + @IKeybindingService keybindingService: IKeybindingService ) { + const kb = keybindingService.lookupKeybinding('editor.action.triggerSuggest'); + const triggerKeybindingLabel = !kb ? '' : ` (${kb.getLabel()})`; + this.isAuto = false; this.focusedItem = null; + this.storageService = storageService; - this.element = $('.editor-widget.suggest-widget'); + if (this.expandDocsSettingFromStorage() === undefined) { + this.storageService.store('expandSuggestionDocs', expandSuggestionDocsByDefault, StorageScope.GLOBAL); + if (this.expandDocsSettingFromStorage() === undefined) { + this.storageServiceAvailable = false; + } + } + this.element = $('.editor-widget.suggest-widget'); if (!this.editor.getConfiguration().contribInfo.iconsInSuggestions) { addClass(this.element, 'no-icons'); } this.messageElement = append(this.element, $('.message')); this.listElement = append(this.element, $('.tree')); - this.details = new SuggestionDetails(this.element, this, this.editor); + this.details = new SuggestionDetails(this.element, this, this.editor, triggerKeybindingLabel); - let renderer: IRenderer = instantiationService.createInstance(Renderer, this, this.editor); + let renderer: IRenderer = instantiationService.createInstance(Renderer, this, this.editor, triggerKeybindingLabel); this.list = new List(this.listElement, this, [renderer], { useShadows: false, @@ -393,6 +423,7 @@ export class SuggestWidget implements IContentWidget, IDelegate }), themeService.onThemeChange(t => this.onThemeChange(t)), editor.onDidBlurEditorText(() => this.onEditorBlur()), + editor.onDidLayoutChange(() => this.onEditorLayoutChange()), this.list.onSelectionChange(e => this.onListSelection(e)), this.list.onFocusChange(e => this.onListFocus(e)), this.editor.onDidChangeCursorSelection(() => this.onCursorSelectionChanged()) @@ -442,6 +473,12 @@ export class SuggestWidget implements IContentWidget, IDelegate }); } + private onEditorLayoutChange(): void { + if ((this.state === State.Open || this.state === State.Details) && this.expandDocsSettingFromStorage()) { + this.expandSideOrBelow(); + } + } + private onListSelection(e: IListEvent): void { if (!e.elements.length) { return; @@ -477,13 +514,22 @@ export class SuggestWidget implements IContentWidget, IDelegate private onThemeChange(theme: ITheme) { let backgroundColor = theme.getColor(editorSuggestWidgetBackground); if (backgroundColor) { - this.element.style.backgroundColor = backgroundColor.toString(); + this.listElement.style.backgroundColor = backgroundColor.toString(); + this.details.element.style.backgroundColor = backgroundColor.toString(); + this.messageElement.style.backgroundColor = backgroundColor.toString(); } let borderColor = theme.getColor(editorSuggestWidgetBorder); if (borderColor) { - let borderWidth = theme.type === 'hc' ? 2 : 1; - this.element.style.border = `${borderWidth}px solid ${borderColor}`; + this.listElement.style.borderColor = borderColor.toString(); + this.details.element.style.borderColor = borderColor.toString(); + this.messageElement.style.borderColor = borderColor.toString(); + this.detailsBorderColor = borderColor.toString(); + } + let focusBorderColor = theme.getColor(focusBorder); + if (focusBorderColor) { + this.detailsFocusBorderColor = focusBorderColor.toString(); } + this.details.setBorderWidth(theme.type === 'hc' ? 2 : 1); } private onListFocus(e: IListEvent): void { @@ -538,7 +584,7 @@ export class SuggestWidget implements IContentWidget, IDelegate this.ignoreFocusEvents = false; } - this.updateWidgetHeight(); + this.updateListHeight(); this.list.reveal(index); this.currentSuggestionDetails = item.resolve() @@ -548,10 +594,13 @@ export class SuggestWidget implements IContentWidget, IDelegate this.ignoreFocusEvents = false; this.list.setFocus([index]); - this.updateWidgetHeight(); this.list.reveal(index); - this._ariaAlert(this._getSuggestionAriaAlertLabel(item)); + if (this.expandDocsSettingFromStorage()) { + this.showDetails(); + } else { + removeClass(this.element, 'docs-side'); + } }) .then(null, err => !isPromiseCanceledError(err) && onUnexpectedError(err)) .then(() => this.currentSuggestionDetails = null); @@ -583,17 +632,26 @@ export class SuggestWidget implements IContentWidget, IDelegate this.messageElement.textContent = SuggestWidget.LOADING_MESSAGE; hide(this.listElement, this.details.element); show(this.messageElement); + removeClass(this.element, 'docs-side'); this.show(); break; case State.Empty: this.messageElement.textContent = SuggestWidget.NO_SUGGESTIONS_MESSAGE; hide(this.listElement, this.details.element); show(this.messageElement); + removeClass(this.element, 'docs-side'); this.show(); break; case State.Open: - hide(this.messageElement, this.details.element); + hide(this.messageElement); show(this.listElement); + if (this.expandDocsSettingFromStorage() + && canExpandCompletionItem(this.list.getFocusedElements()[0])) { + show(this.details.element); + this.expandSideOrBelow(); + } else { + hide(this.details.element); + } this.show(); break; case State.Frozen: @@ -602,8 +660,8 @@ export class SuggestWidget implements IContentWidget, IDelegate this.show(); break; case State.Details: - hide(this.messageElement, this.listElement); - show(this.details.element); + hide(this.messageElement); + show(this.details.element, this.listElement); this.show(); this._ariaAlert(this.details.getAriaLabel()); break; @@ -637,7 +695,7 @@ export class SuggestWidget implements IContentWidget, IDelegate this.completionModel = completionModel; - if (isFrozen && this.state !== State.Empty) { + if (isFrozen && this.state !== State.Empty && this.state !== State.Hidden) { this.setState(State.Frozen); return; } @@ -667,7 +725,16 @@ export class SuggestWidget implements IContentWidget, IDelegate this.list.setFocus([0]); this.list.reveal(0, 0); - this.setState(State.Open); + if (isFrozen) { + this.setState(State.Frozen); + } else { + this.setState(State.Open); + } + + // Reset focus border + if (this.detailsBorderColor) { + this.details.element.style.borderColor = this.detailsBorderColor; + } } } @@ -690,10 +757,6 @@ export class SuggestWidget implements IContentWidget, IDelegate switch (this.state) { case State.Hidden: return false; - case State.Details: - this.list.focusNext(1, true); - this.renderDetails(); - return true; case State.Loading: return !this.isAuto; default: @@ -736,10 +799,6 @@ export class SuggestWidget implements IContentWidget, IDelegate switch (this.state) { case State.Hidden: return false; - case State.Details: - this.list.focusPrevious(1, true); - this.renderDetails(); - return true; case State.Loading: return !this.isAuto; default: @@ -773,32 +832,69 @@ export class SuggestWidget implements IContentWidget, IDelegate return undefined; } - toggleDetails(): void { + toggleDetailsFocus(): void { if (this.state === State.Details) { this.setState(State.Open); - this.editor.focus(); - return; + if (this.detailsBorderColor) { + this.details.element.style.borderColor = this.detailsBorderColor; + } + } else if (this.state === State.Open && this.expandDocsSettingFromStorage()) { + this.setState(State.Details); + if (this.detailsFocusBorderColor) { + this.details.element.style.borderColor = this.detailsFocusBorderColor; + } } + this.telemetryService.publicLog('suggestWidget:toggleDetailsFocus', this.editor.getTelemetryData()); + } - if (this.state !== State.Open) { + toggleDetails(): void { + if (!canExpandCompletionItem(this.list.getFocusedElements()[0])) { return; } - const item = this.list.getFocusedElements()[0]; + if (this.expandDocsSettingFromStorage()) { + this.updateExpandDocsSetting(false); + hide(this.details.element); + removeClass(this.element, 'docs-side'); + removeClass(this.element, 'docs-below'); + this.editor.layoutContentWidget(this); + this.telemetryService.publicLog('suggestWidget:collapseDetails', this.editor.getTelemetryData()); + } else { + if (this.state !== State.Open && this.state !== State.Details) { + return; + } - if (!item || !canExpandCompletionItem(item)) { - return; + this.updateExpandDocsSetting(true); + this.showDetails(); + this.telemetryService.publicLog('suggestWidget:expandDetails', this.editor.getTelemetryData()); } - this.setState(State.Details); + } + + showDetails(): void { + this.expandSideOrBelow(); + + show(this.details.element); + this.details.render(this.list.getFocusedElements()[0]); + this.details.element.style.maxHeight = this.maxWidgetHeight + 'px'; + + // Reset margin-top that was set as Fix for #26416 + this.listElement.style.marginTop = '0px'; + + // with docs showing up widget width/height may change, so reposition the widget + this.editor.layoutContentWidget(this); + + this.adjustDocsPosition(); + this.editor.focus(); - this.telemetryService.publicLog('suggestWidget:toggleDetails', this.editor.getTelemetryData()); + + this._ariaAlert(this.details.getAriaLabel()); } private show(): void { - this.updateWidgetHeight(); + this.updateListHeight(); this.suggestWidgetVisible.set(true); - this.renderDetails(); + this.showTimeout = TPromise.timeout(100).then(() => { addClass(this.element, 'visible'); this.onDidShowEmitter.fire(this); @@ -817,14 +913,6 @@ export class SuggestWidget implements IContentWidget, IDelegate this.onDidHideEmitter.fire(this); } - hideDetailsOrHideWidget(): void { - if (this.state === State.Details) { - this.toggleDetails(); - } else { - this.hideWidget(); - } - } - getPosition(): IContentWidgetPosition { if (this.state === State.Hidden) { return null; @@ -844,42 +932,70 @@ export class SuggestWidget implements IContentWidget, IDelegate return SuggestWidget.ID; } - private updateWidgetHeight(): number { + private updateListHeight(): number { let height = 0; if (this.state === State.Empty || this.state === State.Loading) { height = this.unfocusedHeight; - } else if (this.state === State.Details) { - height = 12 * this.unfocusedHeight; } else { - const focus = this.list.getFocusedElements()[0]; - const focusHeight = focus ? this.getHeight(focus) : this.unfocusedHeight; - height = focusHeight; - - const suggestionCount = (this.list.contentHeight - focusHeight) / this.unfocusedHeight; - height += Math.min(suggestionCount, 11) * this.unfocusedHeight; + const suggestionCount = this.list.contentHeight / this.unfocusedHeight; + height = Math.min(suggestionCount, maxSuggestionsToShow) * this.unfocusedHeight; } this.element.style.lineHeight = `${this.unfocusedHeight}px`; - this.element.style.height = `${height}px`; + this.listElement.style.height = `${height}px`; this.list.layout(height); + this.editor.layoutContentWidget(this); return height; } - private renderDetails(): void { - if (this.state !== State.Details) { - this.details.render(null); + private adjustDocsPosition() { + const lineHeight = this.editor.getConfiguration().fontInfo.lineHeight; + const cursorCoords = this.editor.getScrolledVisiblePosition(this.editor.getPosition()); + const editorCoords = getDomNodePagePosition(this.editor.getDomNode()); + const cursorX = editorCoords.left + cursorCoords.left; + const cursorY = editorCoords.top + cursorCoords.top + cursorCoords.height; + const widgetCoords = getDomNodePagePosition(this.element); + const widgetX = widgetCoords.left; + const widgetY = widgetCoords.top; + + if (widgetX < cursorX - this.listWidth) { + // Widget is too far to the left of cursor, swap list and docs + addClass(this.element, 'list-right'); + } else { + removeClass(this.element, 'list-right'); + } + + // Compare top of the cursor (cursorY - lineheight) with widgetTop to determine if + // margin-top needs to be applied on list to make it appear right above the cursor + // Cannot compare cursorY directly as it may be a few decimals off due to zoooming + if (hasClass(this.element, 'docs-side') + && cursorY - lineHeight > widgetY + && this.details.element.offsetHeight > this.listElement.offsetHeight) { + + // Fix for #26416 + // Docs is bigger than list and widget is above cursor, apply margin-top so that list appears right above cursor + this.listElement.style.marginTop = `${this.details.element.offsetHeight - this.listElement.offsetHeight}px`; + } + } + + private expandSideOrBelow() { + let matches = this.element.style.maxWidth.match(/(\d+)px/); + if (!matches || Number(matches[1]) < this.maxWidgetWidth) { + addClass(this.element, 'docs-below'); + removeClass(this.element, 'docs-side'); } else { - this.details.render(this.list.getFocusedElements()[0]); + addClass(this.element, 'docs-side'); + removeClass(this.element, 'docs-below'); } } // Heights - private get focusHeight(): number { - return this.unfocusedHeight * 2; + private get maxWidgetHeight(): number { + return this.unfocusedHeight * maxSuggestionsToShow; } private get unfocusedHeight(): number { @@ -890,10 +1006,6 @@ export class SuggestWidget implements IContentWidget, IDelegate // IDelegate getHeight(element: ICompletionItem): number { - if (canExpandCompletionItem(element) && element === this.focusedItem) { - return this.focusHeight; - } - return this.unfocusedHeight; } @@ -901,6 +1013,24 @@ export class SuggestWidget implements IContentWidget, IDelegate return 'suggestion'; } + // Monaco Editor does not have a storage service + private expandDocsSettingFromStorage(): boolean { + if (this.storageServiceAvailable) { + return this.storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL); + } else { + return this.expandSuggestionDocs; + } + } + + // Monaco Editor does not have a storage service + private updateExpandDocsSetting(value: boolean) { + if (this.storageServiceAvailable) { + this.storageService.store('expandSuggestionDocs', value, StorageScope.GLOBAL); + } else { + this.expandSuggestionDocs = value; + } + } + dispose(): void { this.state = null; this.suggestionSupportsAutoAccept = null; @@ -934,10 +1064,10 @@ export class SuggestWidget implements IContentWidget, IDelegate registerThemingParticipant((theme, collector) => { let matchHighlight = theme.getColor(editorSuggestWidgetHighlightForeground); if (matchHighlight) { - collector.addRule(`.monaco-editor.${theme.selector} .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight { color: ${matchHighlight}; }`); + collector.addRule(`.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight { color: ${matchHighlight}; }`); } let foreground = theme.getColor(editorSuggestWidgetForeground); if (foreground) { - collector.addRule(`.monaco-editor.${theme.selector} .suggest-widget { color: ${foreground}; }`); + collector.addRule(`.monaco-editor .suggest-widget { color: ${foreground}; }`); } }); diff --git a/src/vs/editor/contrib/suggest/test/browser/completionModel.test.ts b/src/vs/editor/contrib/suggest/test/browser/completionModel.test.ts index c5f80a483cb66..1419682f3bd77 100644 --- a/src/vs/editor/contrib/suggest/test/browser/completionModel.test.ts +++ b/src/vs/editor/contrib/suggest/test/browser/completionModel.test.ts @@ -6,9 +6,10 @@ import * as assert from 'assert'; import { ISuggestion, ISuggestResult, ISuggestSupport, SuggestionType } from 'vs/editor/common/modes'; -import { ISuggestionItem } from 'vs/editor/contrib/suggest/browser/suggest'; +import { ISuggestionItem, getSuggestionComparator } from 'vs/editor/contrib/suggest/browser/suggest'; import { CompletionModel } from 'vs/editor/contrib/suggest/browser/completionModel'; import { IPosition } from 'vs/editor/common/core/position'; +import { TPromise } from "vs/base/common/winjs.base"; suite('CompletionModel', function () { @@ -36,7 +37,7 @@ suite('CompletionModel', function () { } }; - resolve() { + resolve(): TPromise { return null; } }; @@ -93,7 +94,7 @@ suite('CompletionModel', function () { const completeItem = createSuggestItem('foobar', 1, undefined, false, { lineNumber: 1, column: 2 }); const incompleteItem = createSuggestItem('foofoo', 1, undefined, true, { lineNumber: 1, column: 2 }); - const model = new CompletionModel([completeItem, incompleteItem], 2, { leadingLineContent: '', characterCountDelta: 0 }); + const model = new CompletionModel([completeItem, incompleteItem], 2, { leadingLineContent: 'f', characterCountDelta: 0 }); assert.equal(model.incomplete, true); assert.equal(model.items.length, 2); @@ -181,4 +182,50 @@ suite('CompletionModel', function () { assert.equal(b.suggestion.label, 'Semver'); assert.ok(a.score > b.score); // snippet really demoted }); + + test('filterText seems ignored in autocompletion, #26874', function () { + + const item1 = createSuggestItem('Map - java.util', 1, 'property'); + item1.suggestion.filterText = 'Map'; + const item2 = createSuggestItem('Map - java.util', 1, 'property'); + + model = new CompletionModel([item1, item2], 1, { + leadingLineContent: 'M', + characterCountDelta: 0 + }); + + assert.equal(model.items.length, 2); + + model.lineContext = { + leadingLineContent: 'Map ', + characterCountDelta: 3 + }; + assert.equal(model.items.length, 1); + }); + + test('Vscode 1.12 no longer obeys \'sortText\' in completion items (from language server), #26096', function () { + + const item1 = createSuggestItem('<- groups', 2, 'property', false, { lineNumber: 1, column: 3 }); + item1.suggestion.filterText = ' groups'; + item1.suggestion.sortText = '00002'; + + const item2 = createSuggestItem('source', 0, 'property', false, { lineNumber: 1, column: 3 }); + item2.suggestion.filterText = 'source'; + item2.suggestion.sortText = '00001'; + + const items = [item1, item2].sort(getSuggestionComparator('inline')); + + model = new CompletionModel(items, 3, { + leadingLineContent: ' ', + characterCountDelta: 0 + }); + + assert.equal(model.items.length, 2); + + const [first, second] = model.items; + assert.equal(first.suggestion.label, 'source'); + assert.equal(second.suggestion.label, '<- groups'); + + }); + }); diff --git a/src/vs/editor/contrib/suggest/test/browser/suggestModel.test.ts b/src/vs/editor/contrib/suggest/test/browser/suggestModel.test.ts index 808a2e40fdca7..6bba3555808f5 100644 --- a/src/vs/editor/contrib/suggest/test/browser/suggestModel.test.ts +++ b/src/vs/editor/contrib/suggest/test/browser/suggestModel.test.ts @@ -79,7 +79,6 @@ suite('SuggestModel - TriggerAndCancelOracle', function () { const alwaysSomethingSupport: ISuggestSupport = { provideCompletionItems(doc, pos) { return { - currentWord: '', incomplete: false, suggestions: [{ label: doc.getWordUntilPosition(pos).word, @@ -328,4 +327,134 @@ suite('SuggestModel - TriggerAndCancelOracle', function () { }); }); }); + + test('Intellisense Completion doesn\'t respect space after equal sign (.html file), #29353 [1/2]', function () { + + disposables.push(SuggestRegistry.register({ scheme: 'test' }, alwaysSomethingSupport)); + + return withOracle((model, editor) => { + + editor.getModel().setValue('fo'); + editor.setPosition({ lineNumber: 1, column: 3 }); + + return assertEvent(model.onDidSuggest, () => { + model.trigger(false); + }, event => { + assert.equal(event.auto, false); + assert.equal(event.isFrozen, false); + assert.equal(event.completionModel.items.length, 1); + + return assertEvent(model.onDidCancel, () => { + editor.trigger('keyboard', Handler.Type, { text: '+' }); + }, event => { + assert.equal(event.retrigger, false); + }); + }); + }); + }); + + test('Intellisense Completion doesn\'t respect space after equal sign (.html file), #29353 [2/2]', function () { + + disposables.push(SuggestRegistry.register({ scheme: 'test' }, alwaysSomethingSupport)); + + return withOracle((model, editor) => { + + editor.getModel().setValue('fo'); + editor.setPosition({ lineNumber: 1, column: 3 }); + + return assertEvent(model.onDidSuggest, () => { + model.trigger(false); + }, event => { + assert.equal(event.auto, false); + assert.equal(event.isFrozen, false); + assert.equal(event.completionModel.items.length, 1); + + return assertEvent(model.onDidCancel, () => { + editor.trigger('keyboard', Handler.Type, { text: ' ' }); + }, event => { + assert.equal(event.retrigger, false); + }); + }); + }); + }); + + test('Incomplete suggestion results cause re-triggering when typing w/o further context, #28400 (1/2)', function () { + + disposables.push(SuggestRegistry.register({ scheme: 'test' }, { + provideCompletionItems(doc, pos) { + return { + incomplete: true, + suggestions: [{ + label: 'foo', + type: 'property', + insertText: 'foo', + overwriteBefore: pos.column - 1 + }] + }; + } + })); + + return withOracle((model, editor) => { + + editor.getModel().setValue('foo'); + editor.setPosition({ lineNumber: 1, column: 4 }); + + return assertEvent(model.onDidSuggest, () => { + model.trigger(false); + }, event => { + assert.equal(event.auto, false); + assert.equal(event.completionModel.incomplete, true); + assert.equal(event.completionModel.items.length, 1); + + return assertEvent(model.onDidCancel, () => { + editor.trigger('keyboard', Handler.Type, { text: ';' }); + }, event => { + assert.equal(event.retrigger, false); + }); + }); + }); + }); + + test('Incomplete suggestion results cause re-triggering when typing w/o further context, #28400 (2/2)', function () { + + disposables.push(SuggestRegistry.register({ scheme: 'test' }, { + provideCompletionItems(doc, pos) { + return { + incomplete: true, + suggestions: [{ + label: 'foo;', + type: 'property', + insertText: 'foo', + overwriteBefore: pos.column - 1 + }] + }; + } + })); + + return withOracle((model, editor) => { + + editor.getModel().setValue('foo'); + editor.setPosition({ lineNumber: 1, column: 4 }); + + return assertEvent(model.onDidSuggest, () => { + model.trigger(false); + }, event => { + assert.equal(event.auto, false); + assert.equal(event.completionModel.incomplete, true); + assert.equal(event.completionModel.items.length, 1); + + return assertEvent(model.onDidSuggest, () => { + // while we cancel incrementally enriching the set of + // completions we still filter against those that we have + // until now + editor.trigger('keyboard', Handler.Type, { text: ';' }); + }, event => { + assert.equal(event.auto, false); + assert.equal(event.completionModel.incomplete, true); + assert.equal(event.completionModel.items.length, 1); + + }); + }); + }); + }); }); diff --git a/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts b/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts index 8adf5cded6db0..52b6d50d1511c 100644 --- a/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts +++ b/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts @@ -18,9 +18,10 @@ import { Position } from 'vs/editor/common/core/position'; import { registerColor, editorSelectionHighlight, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { CursorChangeReason, ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; -export const editorWordHighlight = registerColor('editorWordHighlight', { dark: '#575757B8', light: '#57575740', hc: null }, nls.localize('wordHighlight', 'Background color of a symbol during read-access, like reading a variable.')); -export const editorWordHighlightStrong = registerColor('editorWordHighlightStrong', { dark: '#004972B8', light: '#0e639c40', hc: null }, nls.localize('wordHighlightStrong', 'Background color of a symbol during write-access, like writing to a variable.')); +export const editorWordHighlight = registerColor('editor.wordHighlightBackground', { dark: '#575757B8', light: '#57575740', hc: null }, nls.localize('wordHighlight', 'Background color of a symbol during read-access, like reading a variable.')); +export const editorWordHighlightStrong = registerColor('editor.wordHighlightStrongBackground', { dark: '#004972B8', light: '#0e639c40', hc: null }, nls.localize('wordHighlightStrong', 'Background color of a symbol during write-access, like writing to a variable.')); export function getOccurrencesAtPosition(model: editorCommon.IReadOnlyModel, position: Position): TPromise { @@ -31,7 +32,7 @@ export function getOccurrencesAtPosition(model: editorCommon.IReadOnlyModel, pos // until someone response with a good result // (good = none empty array) return sequence(orderedByScore.map(provider => { - return () => { + return (): TPromise => { if (!foundResult) { return asWinJsPromise((token) => { return provider.provideDocumentHighlights(model, position, token); @@ -77,6 +78,13 @@ class WordHighlighter { this.model = this.editor.getModel(); this.toUnhook = []; this.toUnhook.push(editor.onDidChangeCursorPosition((e: ICursorPositionChangedEvent) => { + + if (!this.occurrencesHighlight) { + // Early exit if nothing needs to be done! + // Leave some form of early exit check here if you wish to continue being a cursor position change listener ;) + return; + } + this._onPositionChanged(e); })); this.toUnhook.push(editor.onDidChangeModel((e) => { @@ -180,8 +188,8 @@ class WordHighlighter { } // All the effort below is trying to achieve this: - // - when cursor is moved to a word, trigger immediately a findOccurences request - // - 250ms later after the last cursor move event, render the occurences + // - when cursor is moved to a word, trigger immediately a findOccurrences request + // - 250ms later after the last cursor move event, render the occurrences // - no flickering! var currentWordRange = new Range(lineNumber, word.startColumn, lineNumber, word.endColumn); @@ -262,34 +270,55 @@ class WordHighlighter { var decorations: editorCommon.IModelDeltaDecoration[] = []; for (var i = 0, len = this.workerRequestValue.length; i < len; i++) { var info = this.workerRequestValue[i]; - var color = '#A0A0A0'; - - let className: string; - if (info.kind === DocumentHighlightKind.Write) { - className = 'wordHighlightStrong'; - } else if (info.kind === DocumentHighlightKind.Text) { - className = 'selectionHighlight'; - } else { - className = 'wordHighlight'; - } - decorations.push({ range: info.range, - options: { - stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, - className: className, - overviewRuler: { - color: color, - darkColor: color, - position: editorCommon.OverviewRulerLane.Center - } - } + options: WordHighlighter._getDecorationOptions(info.kind) }); } this._decorationIds = this.editor.deltaDecorations(this._decorationIds, decorations); } + private static _getDecorationOptions(kind: DocumentHighlightKind): ModelDecorationOptions { + if (kind === DocumentHighlightKind.Write) { + return this._WRITE_OPTIONS; + } else if (kind === DocumentHighlightKind.Text) { + return this._TEXT_OPTIONS; + } else { + return this._REGULAR_OPTIONS; + } + } + + private static _WRITE_OPTIONS = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + className: 'wordHighlightStrong', + overviewRuler: { + color: '#A0A0A0', + darkColor: '#A0A0A0', + position: editorCommon.OverviewRulerLane.Center + } + }); + + private static _TEXT_OPTIONS = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + className: 'selectionHighlight', + overviewRuler: { + color: '#A0A0A0', + darkColor: '#A0A0A0', + position: editorCommon.OverviewRulerLane.Center + } + }); + + private static _REGULAR_OPTIONS = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + className: 'wordHighlight', + overviewRuler: { + color: '#A0A0A0', + darkColor: '#A0A0A0', + position: editorCommon.OverviewRulerLane.Center + } + }); + public dispose(): void { this._stopAll(); this.toUnhook = dispose(this.toUnhook); @@ -319,22 +348,22 @@ class WordHighlighterContribution implements editorCommon.IEditorContribution { registerThemingParticipant((theme, collector) => { let selectionHighlight = theme.getColor(editorSelectionHighlight); if (selectionHighlight) { - collector.addRule(`.monaco-editor.${theme.selector} .focused .selectionHighlight { background-color: ${selectionHighlight}; }`); - collector.addRule(`.monaco-editor.${theme.selector} .selectionHighlight { background-color: ${selectionHighlight.transparent(0.5)}; }`); + collector.addRule(`.monaco-editor .focused .selectionHighlight { background-color: ${selectionHighlight}; }`); + collector.addRule(`.monaco-editor .selectionHighlight { background-color: ${selectionHighlight.transparent(0.5)}; }`); } let wordHighlight = theme.getColor(editorWordHighlight); if (wordHighlight) { - collector.addRule(`.monaco-editor.${theme.selector} .wordHighlight { background-color: ${wordHighlight}; }`); + collector.addRule(`.monaco-editor .wordHighlight { background-color: ${wordHighlight}; }`); } let wordHighlightStrong = theme.getColor(editorWordHighlightStrong); if (wordHighlightStrong) { - collector.addRule(`.monaco-editor.${theme.selector} .wordHighlightStrong { background-color: ${wordHighlightStrong}; }`); + collector.addRule(`.monaco-editor .wordHighlightStrong { background-color: ${wordHighlightStrong}; }`); } let hcOutline = theme.getColor(activeContrastBorder); if (hcOutline) { - collector.addRule(`.monaco-editor.${theme.selector} .selectionHighlight { border: 1px dotted ${hcOutline}; box-sizing: border-box; }`); - collector.addRule(`.monaco-editor.${theme.selector} .wordHighlight { border: 1px dashed ${hcOutline}; box-sizing: border-box; }`); - collector.addRule(`.monaco-editor.${theme.selector} .wordHighlightStrong { border: 1px dashed ${hcOutline}; box-sizing: border-box; }`); + collector.addRule(`.monaco-editor .selectionHighlight { border: 1px dotted ${hcOutline}; box-sizing: border-box; }`); + collector.addRule(`.monaco-editor .wordHighlight { border: 1px dashed ${hcOutline}; box-sizing: border-box; }`); + collector.addRule(`.monaco-editor .wordHighlightStrong { border: 1px dashed ${hcOutline}; box-sizing: border-box; }`); } }); \ No newline at end of file diff --git a/src/vs/editor/contrib/wordOperations/common/wordOperations.ts b/src/vs/editor/contrib/wordOperations/common/wordOperations.ts index 0b1d96ee992fa..a2da8517ce54f 100644 --- a/src/vs/editor/contrib/wordOperations/common/wordOperations.ts +++ b/src/vs/editor/contrib/wordOperations/common/wordOperations.ts @@ -12,8 +12,11 @@ import { Selection } from 'vs/editor/common/core/selection'; import { editorCommand, ServicesAccessor, EditorCommand, ICommandOptions } from 'vs/editor/common/editorCommonExtensions'; import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; -import { WordNavigationType, WordOperations, getMapForWordSeparators, WordCharacterClassifier } from 'vs/editor/common/controller/cursorWordOperations'; +import { WordNavigationType, WordOperations } from 'vs/editor/common/controller/cursorWordOperations'; import { ReplaceCommand } from 'vs/editor/common/commands/replaceCommand'; +import { getMapForWordSeparators, WordCharacterClassifier } from 'vs/editor/common/controller/wordCharacterClassifier'; +import { CursorState } from 'vs/editor/common/controller/cursorCommon'; +import { CursorChangeReason } from 'vs/editor/common/controller/cursorEvents'; export interface MoveWordOptions extends ICommandOptions { inSelectionMode: boolean; @@ -43,7 +46,7 @@ export abstract class MoveWordCommand extends EditorCommand { return this._moveTo(sel, outPosition, this._inSelectionMode); }); - editor.setSelections(result); + editor._getCursors().setStates('moveWordCommand', CursorChangeReason.NotSet, result.map(r => CursorState.fromModelSelection(r))); if (result.length === 1) { const pos = new Position(result[0].positionLineNumber, result[0].positionColumn); editor.revealPosition(pos, false, true); @@ -275,7 +278,9 @@ export abstract class DeleteWordCommand extends EditorCommand { return new ReplaceCommand(deleteRange, ''); }); + editor.pushUndoStop(); editor.executeCommands(this.id, commands); + editor.pushUndoStop(); } protected abstract _delete(wordSeparators: WordCharacterClassifier, model: IModel, selection: Selection, whitespaceHeuristics: boolean, wordNavigationType: WordNavigationType): Range; diff --git a/src/vs/editor/contrib/wordOperations/test/common/wordOperations.test.ts b/src/vs/editor/contrib/wordOperations/test/common/wordOperations.test.ts index 5b087f27abe7e..40c303f0bec6a 100644 --- a/src/vs/editor/contrib/wordOperations/test/common/wordOperations.test.ts +++ b/src/vs/editor/contrib/wordOperations/test/common/wordOperations.test.ts @@ -17,7 +17,7 @@ import { DeleteWordLeft, DeleteWordStartLeft, DeleteWordEndLeft, DeleteWordRight, DeleteWordStartRight, DeleteWordEndRight } from 'vs/editor/contrib/wordOperations/common/wordOperations'; -import { EditorCommand } from 'vs/editor/common/config/config'; +import { EditorCommand } from 'vs/editor/common/editorCommonExtensions'; suite('WordOperations', () => { @@ -552,6 +552,35 @@ suite('WordOperations', () => { }); }); + test('issue #24947', () => { + withMockCodeEditor([ + '{', + '}' + ], {}, (editor, _) => { + const model = editor.getModel(); + editor.setPosition(new Position(2, 1)); + deleteWordLeft(editor); assert.equal(model.getLineContent(1), '{}'); + }); + + withMockCodeEditor([ + '{', + '}' + ], {}, (editor, _) => { + const model = editor.getModel(); + editor.setPosition(new Position(2, 1)); + deleteWordStartLeft(editor); assert.equal(model.getLineContent(1), '{}'); + }); + + withMockCodeEditor([ + '{', + '}' + ], {}, (editor, _) => { + const model = editor.getModel(); + editor.setPosition(new Position(2, 1)); + deleteWordEndLeft(editor); assert.equal(model.getLineContent(1), '{}'); + }); + }); + test('issue #832: deleteWordRight', () => { withMockCodeEditor([ ' /* Just some text a+= 3 +5-3 */ ' @@ -669,7 +698,7 @@ suite('WordOperations', () => { ], {}, (editor, _) => { const model = editor.getModel(); editor.setPosition(new Position(2, 1)); - deleteWordLeft(editor); assert.equal(model.getLineContent(1), 'A line with text And another one', '001'); + deleteWordLeft(editor); assert.equal(model.getLineContent(1), 'A line with text. And another one', '001'); }); }); }); diff --git a/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.ts b/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.ts index c994fda89fb50..45e8d7a3e5697 100644 --- a/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.ts +++ b/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.ts @@ -37,7 +37,7 @@ export interface IPeekViewService { isActive: boolean; } -export function getOuterEditor(accessor: ServicesAccessor, args: any): ICommonCodeEditor { +export function getOuterEditor(accessor: ServicesAccessor): ICommonCodeEditor { let editor = accessor.get(ICodeEditorService).getFocusedCodeEditor(); if (editor instanceof EmbeddedCodeEditorWidget) { return editor.getParentEditor(); @@ -169,6 +169,7 @@ export abstract class PeekViewWidget extends ZoneWidget implements IPeekViewServ public setTitle(primaryHeading: string, secondaryHeading?: string): void { $(this._primaryHeading).safeInnerHtml(primaryHeading); + this._primaryHeading.setAttribute('aria-label', primaryHeading); if (secondaryHeading) { $(this._secondaryHeading).safeInnerHtml(secondaryHeading); } else { @@ -212,4 +213,4 @@ export abstract class PeekViewWidget extends ZoneWidget implements IPeekViewServ protected _doLayoutBody(heightInPixel: number, widthInPixel: number): void { this._bodyElement.style.height = strings.format('{0}px', heightInPixel); } -} \ No newline at end of file +} diff --git a/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.css b/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.css index 38b3e43abd8ac..b9d960656edf3 100644 --- a/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.css +++ b/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.css @@ -7,13 +7,6 @@ z-index: 10; } -.monaco-editor .zone-widget-arrow.below { - width: 0; - height: 0; - border-color: transparent; - border-style: solid; - position: absolute; -} .monaco-editor .zone-widget .zone-widget-container { border-top-style: solid; diff --git a/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts b/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts index b4441f6b13ad1..c5e949f00156d 100644 --- a/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts +++ b/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts @@ -6,7 +6,7 @@ 'use strict'; import 'vs/css!./zoneWidget'; -import { Disposables } from 'vs/base/common/lifecycle'; +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { Widget } from 'vs/base/browser/ui/widget'; import * as objects from 'vs/base/common/objects'; import * as dom from 'vs/base/browser/dom'; @@ -16,6 +16,8 @@ import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, IViewZone, IViewZo import { Color, RGBA } from 'vs/base/common/color'; import { EditorLayoutInfo } from 'vs/editor/common/config/editorOptions'; import { Position, IPosition } from 'vs/editor/common/core/position'; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; +import { IdGenerator } from 'vs/base/common/idGenerator'; export interface IOptions { showFrame?: boolean; @@ -98,23 +100,77 @@ export class OverlayWidgetDelegate implements IOverlayWidget { public getPosition(): IOverlayWidgetPosition { return null; } +} + +class Arrow { + + private static _IdGenerator = new IdGenerator('.arrow-decoration-'); + + private readonly _ruleName = Arrow._IdGenerator.nextId(); + private _decorations: string[] = []; + private _color: string; + private _height: number; + + constructor( + private readonly _editor: ICodeEditor + ) { + // + } + + dispose(): void { + this.hide(); + dom.removeCSSRulesContainingSelector(this._ruleName); + } + + set color(value: string) { + if (this._color !== value) { + this._color = value; + this._updateStyle(); + } + } + + set height(value: number) { + if (this._height !== value) { + this._height = value; + this._updateStyle(); + } + } + + private _updateStyle(): void { + dom.removeCSSRulesContainingSelector(this._ruleName); + dom.createCSSRule( + `.monaco-editor ${this._ruleName}`, + `border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; ` + ); + } + show(where: IPosition): void { + this._decorations = this._editor.deltaDecorations( + this._decorations, + [{ range: Range.fromPositions(where), options: { className: this._ruleName } }] + ); + } + + hide(): void { + this._editor.deltaDecorations(this._decorations, []); + } } export abstract class ZoneWidget extends Widget implements IHorizontalSashLayoutProvider { - private _overlayWidget: OverlayWidgetDelegate = null; + private _arrow: Arrow; + private _overlayWidget: OverlayWidgetDelegate; private _resizeSash: Sash; private _positionMarkerId: string[] = []; - protected _viewZone: ViewZoneDelegate = null; - protected _disposables = new Disposables(); + protected _viewZone: ViewZoneDelegate; + protected _disposables: IDisposable[] = []; - public container: HTMLElement = null; + public container: HTMLElement; public domNode: HTMLElement; public editor: ICodeEditor; public options: IOptions; - private arrow: HTMLElement = null; + constructor(editor: ICodeEditor, options: IOptions = {}) { super(); @@ -127,7 +183,7 @@ export abstract class ZoneWidget extends Widget implements IHorizontalSashLayout this.domNode.setAttribute('role', 'presentation'); } - this._disposables.add(this.editor.onDidLayoutChange((info: EditorLayoutInfo) => { + this._disposables.push(this.editor.onDidLayoutChange((info: EditorLayoutInfo) => { const width = this._getWidth(info); this.domNode.style.width = width + 'px'; this._onWidth(width); @@ -136,7 +192,7 @@ export abstract class ZoneWidget extends Widget implements IHorizontalSashLayout public dispose(): void { - this._disposables.dispose(); + dispose(this._disposables); if (this._overlayWidget) { this.editor.removeOverlayWidget(this._overlayWidget); @@ -162,8 +218,8 @@ export abstract class ZoneWidget extends Widget implements IHorizontalSashLayout dom.addClass(this.container, 'zone-widget-container'); this.domNode.appendChild(this.container); if (this.options.showArrow) { - this.arrow = document.createElement('div'); - this.arrow.className = 'zone-widget-arrow below'; + this._arrow = new Arrow(this.editor); + this._disposables.push(this._arrow); } this._fillContainer(this.container); this._initSash(); @@ -186,9 +242,9 @@ export abstract class ZoneWidget extends Widget implements IHorizontalSashLayout this.container.style.borderTopColor = frameColor; this.container.style.borderBottomColor = frameColor; } - if (this.arrow) { + if (this._arrow) { let arrowColor = this.options.arrowColor.toString(); - this.arrow.style.borderBottomColor = arrowColor; + this._arrow.color = arrowColor; } } @@ -228,7 +284,7 @@ export abstract class ZoneWidget extends Widget implements IHorizontalSashLayout this._isShowing = true; this._showImpl(range, heightInLines); this._isShowing = false; - this._positionMarkerId = this.editor.deltaDecorations(this._positionMarkerId, [{ range, options: {} }]); + this._positionMarkerId = this.editor.deltaDecorations(this._positionMarkerId, [{ range, options: ModelDecorationOptions.EMPTY }]); } public hide(): void { @@ -242,6 +298,9 @@ export abstract class ZoneWidget extends Widget implements IHorizontalSashLayout this.editor.removeOverlayWidget(this._overlayWidget); this._overlayWidget = null; } + if (this._arrow) { + this._arrow.hide(); + } } private _decoratingElementsHeight(): number { @@ -270,11 +329,9 @@ export abstract class ZoneWidget extends Widget implements IHorizontalSashLayout const width = this._getWidth(); this.domNode.style.width = `${width}px`; - // Reveal position, to get the line rendered, such that the arrow can be positioned properly - this.editor.revealPosition(position); - // Render the widget as zone (rendering) and widget (lifecycle) const viewZoneDomNode = document.createElement('div'); + viewZoneDomNode.style.overflow = 'hidden'; const lineHeight = this.editor.getConfiguration().lineHeight; // adjust heightInLines to viewport @@ -289,11 +346,8 @@ export abstract class ZoneWidget extends Widget implements IHorizontalSashLayout // Render the arrow one 1/3 of an editor line height if (this.options.showArrow) { arrowHeight = Math.round(lineHeight / 3); - this.arrow.style.top = -arrowHeight + 'px'; - this.arrow.style.borderWidth = arrowHeight + 'px'; - this.arrow.style.left = this.editor.getOffsetForColumn(position.lineNumber, position.column) + 'px'; - - viewZoneDomNode.appendChild(this.arrow); + this._arrow.height = arrowHeight; + this._arrow.show(position); } // Render the frame as 1/9 of an editor line height @@ -324,7 +378,6 @@ export abstract class ZoneWidget extends Widget implements IHorizontalSashLayout this.editor.addOverlayWidget(this._overlayWidget); }); - if (this.options.showFrame) { const width = this.options.frameWidth ? this.options.frameWidth : frameThickness; this.container.style.borderTopWidth = width + 'px'; @@ -349,15 +402,10 @@ export abstract class ZoneWidget extends Widget implements IHorizontalSashLayout protected setCssClass(className: string, classToReplace?: string): void { if (classToReplace) { this.container.classList.remove(classToReplace); - if (this.arrow) { - this.arrow.classList.remove(classToReplace); - } } dom.addClass(this.container, className); - if (this.arrow) { - dom.addClass(this.arrow, className); - } + } protected abstract _fillContainer(container: HTMLElement): void; @@ -390,7 +438,7 @@ export abstract class ZoneWidget extends Widget implements IHorizontalSashLayout } let data: { startY: number; heightInLines: number; }; - this._disposables.add(this._resizeSash.addListener('start', (e: ISashEvent) => { + this._disposables.push(this._resizeSash.addListener('start', (e: ISashEvent) => { if (this._viewZone) { data = { startY: e.startY, @@ -399,11 +447,11 @@ export abstract class ZoneWidget extends Widget implements IHorizontalSashLayout } })); - this._disposables.add(this._resizeSash.addListener('end', () => { + this._disposables.push(this._resizeSash.addListener('end', () => { data = undefined; })); - this._disposables.add(this._resizeSash.addListener('change', (evt: ISashEvent) => { + this._disposables.push(this._resizeSash.addListener('change', (evt: ISashEvent) => { if (data) { let lineDelta = (evt.currentY - data.startY) / this.editor.getConfiguration().lineHeight; let roundedLineDelta = lineDelta < 0 ? Math.ceil(lineDelta) : Math.floor(lineDelta); diff --git a/src/vs/editor/browser/editor.all.ts b/src/vs/editor/editor.all.ts similarity index 83% rename from src/vs/editor/browser/editor.all.ts rename to src/vs/editor/editor.all.ts index 00c3abd0200c3..326fb9fb029c8 100644 --- a/src/vs/editor/browser/editor.all.ts +++ b/src/vs/editor/editor.all.ts @@ -5,40 +5,38 @@ 'use strict'; +import 'vs/editor/common/controller/coreCommands'; import 'vs/editor/browser/widget/codeEditorWidget'; import 'vs/editor/browser/widget/diffEditorWidget'; +import 'vs/editor/browser/widget/diffNavigator'; import 'vs/editor/contrib/bracketMatching/common/bracketMatching'; import 'vs/css!vs/editor/contrib/bracketMatching/browser/bracketMatching'; import 'vs/editor/contrib/caretOperations/common/caretOperations'; import 'vs/editor/contrib/caretOperations/common/transpose'; import 'vs/editor/contrib/clipboard/browser/clipboard'; -import 'vs/editor/contrib/codelens/browser/codelens'; +import 'vs/editor/contrib/codelens/browser/codelensController'; import 'vs/editor/contrib/comment/common/comment'; import 'vs/editor/contrib/contextmenu/browser/contextmenu'; import 'vs/editor/contrib/cursorUndo/browser/cursorUndo'; -import 'vs/editor/contrib/diffNavigator/common/diffNavigator'; import 'vs/editor/contrib/dnd/browser/dnd'; import 'vs/editor/contrib/find/browser/find'; import 'vs/editor/contrib/folding/browser/folding'; import 'vs/editor/contrib/format/browser/formatActions'; -import 'vs/editor/contrib/goToDeclaration/browser/goToDeclaration'; +import 'vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands'; +import 'vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse'; import 'vs/editor/contrib/gotoError/browser/gotoError'; import 'vs/editor/contrib/hover/browser/hover'; -import 'vs/css!vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace'; import 'vs/editor/contrib/inPlaceReplace/common/inPlaceReplace'; -import 'vs/editor/contrib/iPadShowKeyboard/browser/iPadShowKeyboard'; import 'vs/editor/contrib/linesOperations/common/linesOperations'; import 'vs/editor/contrib/links/browser/links'; import 'vs/editor/contrib/multicursor/common/multicursor'; -import 'vs/editor/contrib/multicursor/browser/menuPreventer'; import 'vs/editor/contrib/parameterHints/browser/parameterHints'; import 'vs/editor/contrib/quickFix/browser/quickFixCommands'; import 'vs/editor/contrib/referenceSearch/browser/referenceSearch'; import 'vs/editor/contrib/rename/browser/rename'; import 'vs/editor/contrib/smartSelect/common/smartSelect'; -import 'vs/editor/contrib/snippet/common/snippet'; -import 'vs/editor/contrib/snippet/browser/snippet'; +import 'vs/editor/contrib/snippet/browser/snippetController2'; import 'vs/editor/contrib/suggest/browser/suggestController'; import 'vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode'; import 'vs/editor/contrib/wordHighlighter/common/wordHighlighter'; diff --git a/src/vs/editor/editor.main.ts b/src/vs/editor/editor.main.ts index a0cf669373aa3..d4e39e8151eed 100644 --- a/src/vs/editor/editor.main.ts +++ b/src/vs/editor/editor.main.ts @@ -5,26 +5,35 @@ 'use strict'; -import 'vs/editor/browser/editor.all'; -import 'vs/editor/contrib/quickOpen/browser/quickOutline'; -import 'vs/editor/contrib/quickOpen/browser/gotoLine'; -import 'vs/editor/contrib/quickOpen/browser/quickCommand'; -import 'vs/editor/contrib/inspectTokens/browser/inspectTokens'; +import 'vs/editor/editor.all'; +import 'vs/editor/standalone/browser/inspectTokens/inspectTokens'; +import 'vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard'; +import 'vs/editor/standalone/browser/quickOpen/quickOutline'; +import 'vs/editor/standalone/browser/quickOpen/gotoLine'; +import 'vs/editor/standalone/browser/quickOpen/quickCommand'; +import 'vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast'; import { createMonacoBaseAPI } from 'vs/editor/common/standalone/standaloneBase'; -import { createMonacoEditorAPI } from 'vs/editor/browser/standalone/standaloneEditor'; -import { createMonacoLanguagesAPI } from 'vs/editor/browser/standalone/standaloneLanguages'; -import { DefaultConfig } from 'vs/editor/common/config/defaultConfig'; +import { createMonacoEditorAPI } from 'vs/editor/standalone/browser/standaloneEditor'; +import { createMonacoLanguagesAPI } from 'vs/editor/standalone/browser/standaloneLanguages'; +import { EDITOR_DEFAULTS, WrappingIndent } from 'vs/editor/common/config/editorOptions'; // Set defaults for standalone editor -DefaultConfig.editor.wrappingIndent = 'none'; -DefaultConfig.editor.folding = false; -DefaultConfig.editor.glyphMargin = false; +(EDITOR_DEFAULTS).wrappingIndent = WrappingIndent.None; +(EDITOR_DEFAULTS.contribInfo).folding = false; +(EDITOR_DEFAULTS.viewInfo).glyphMargin = false; + +let base = createMonacoBaseAPI(); +for (let prop in base) { + if (base.hasOwnProperty(prop)) { + exports[prop] = base[prop]; + } +} +exports.editor = createMonacoEditorAPI(); +exports.languages = createMonacoLanguagesAPI(); var global: any = self; -global.monaco = createMonacoBaseAPI(); -global.monaco.editor = createMonacoEditorAPI(); -global.monaco.languages = createMonacoLanguagesAPI(); +global.monaco = exports; if (typeof global.require !== 'undefined' && typeof global.require.config === 'function') { global.require.config({ diff --git a/src/vs/editor/node/languageConfigurationExtensionPoint.ts b/src/vs/editor/node/languageConfigurationExtensionPoint.ts deleted file mode 100644 index 81c0add5dcb2a..0000000000000 --- a/src/vs/editor/node/languageConfigurationExtensionPoint.ts +++ /dev/null @@ -1,214 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import * as nls from 'vs/nls'; -import { parse } from 'vs/base/common/json'; -import { readFile } from 'vs/base/node/pfs'; -import { CharacterPair, LanguageConfiguration, IAutoClosingPair, IAutoClosingPairConditional, CommentRule } from 'vs/editor/common/modes/languageConfiguration'; -import { IModeService } from 'vs/editor/common/services/modeService'; -import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; -import { Extensions, IJSONContributionRegistry } from 'vs/platform/jsonschemas/common/jsonContributionRegistry'; -import { Registry } from 'vs/platform/platform'; -import { IJSONSchema } from 'vs/base/common/jsonSchema'; -import { LanguageIdentifier } from 'vs/editor/common/modes'; -import { ITextMateService } from 'vs/editor/node/textMate/textMateService'; - -interface ILanguageConfiguration { - comments?: CommentRule; - brackets?: CharacterPair[]; - autoClosingPairs?: (CharacterPair | IAutoClosingPairConditional)[]; - surroundingPairs?: (CharacterPair | IAutoClosingPair)[]; -} - -export class LanguageConfigurationFileHandler { - - private _modeService: IModeService; - private _done: boolean[]; - - constructor( - @ITextMateService textMateService: ITextMateService, - @IModeService modeService: IModeService - ) { - this._modeService = modeService; - this._done = []; - - // Listen for hints that a language configuration is needed/usefull and then load it once - this._modeService.onDidCreateMode((mode) => this._loadConfigurationsForMode(mode.getLanguageIdentifier())); - textMateService.onDidEncounterLanguage((languageId) => { - this._loadConfigurationsForMode(this._modeService.getLanguageIdentifier(languageId)); - }); - } - - private _loadConfigurationsForMode(languageIdentifier: LanguageIdentifier): void { - if (this._done[languageIdentifier.id]) { - return; - } - this._done[languageIdentifier.id] = true; - - let configurationFiles = this._modeService.getConfigurationFiles(languageIdentifier.language); - configurationFiles.forEach((configFilePath) => this._handleConfigFile(languageIdentifier, configFilePath)); - } - - private _handleConfigFile(languageIdentifier: LanguageIdentifier, configFilePath: string): void { - readFile(configFilePath).then((fileContents) => { - var errors = []; - var configuration = parse(fileContents.toString(), errors); - if (errors.length) { - console.error(nls.localize('parseErrors', "Errors parsing {0}: {1}", configFilePath, errors.join('\n'))); - } - this._handleConfig(languageIdentifier, configuration); - }, (err) => { - console.error(err); - }); - } - - private _handleConfig(languageIdentifier: LanguageIdentifier, configuration: ILanguageConfiguration): void { - - let richEditConfig: LanguageConfiguration = {}; - - if (configuration.comments) { - richEditConfig.comments = configuration.comments; - } - - if (configuration.brackets) { - richEditConfig.brackets = configuration.brackets; - } - - if (configuration.autoClosingPairs) { - richEditConfig.autoClosingPairs = this._mapCharacterPairs(configuration.autoClosingPairs); - } - - if (configuration.surroundingPairs) { - richEditConfig.surroundingPairs = this._mapCharacterPairs(configuration.surroundingPairs); - } - - LanguageConfigurationRegistry.register(languageIdentifier, richEditConfig); - } - - private _mapCharacterPairs(pairs: (CharacterPair | IAutoClosingPairConditional)[]): IAutoClosingPairConditional[] { - return pairs.map(pair => { - if (Array.isArray(pair)) { - return { open: pair[0], close: pair[1] }; - } - return pair; - }); - } -} - -const schemaId = 'vscode://schemas/language-configuration'; -const schema: IJSONSchema = { - default: { - comments: { - blockComment: ['/*', '*/'], - lineComment: '//' - }, - brackets: [['(', ')'], ['[', ']'], ['{', '}']], - autoClosingPairs: [['(', ')'], ['[', ']'], ['{', '}']], - surroundingPairs: [['(', ')'], ['[', ']'], ['{', '}']] - }, - definitions: { - openBracket: { - type: 'string', - description: nls.localize('schema.openBracket', 'The opening bracket character or string sequence.') - }, - closeBracket: { - type: 'string', - description: nls.localize('schema.closeBracket', 'The closing bracket character or string sequence.') - }, - bracketPair: { - type: 'array', - items: [{ - $ref: '#definitions/openBracket' - }, { - $ref: '#definitions/closeBracket' - }] - } - }, - properties: { - comments: { - default: { - blockComment: ['/*', '*/'], - lineComment: '//' - }, - description: nls.localize('schema.comments', 'Defines the comment symbols'), - type: 'object', - properties: { - blockComment: { - type: 'array', - description: nls.localize('schema.blockComments', 'Defines how block comments are marked.'), - items: [{ - type: 'string', - description: nls.localize('schema.blockComment.begin', 'The character sequence that starts a block comment.') - }, { - type: 'string', - description: nls.localize('schema.blockComment.end', 'The character sequence that ends a block comment.') - }] - }, - lineComment: { - type: 'string', - description: nls.localize('schema.lineComment', 'The character sequence that starts a line comment.') - } - } - }, - brackets: { - default: [['(', ')'], ['[', ']'], ['{', '}']], - description: nls.localize('schema.brackets', 'Defines the bracket symbols that increase or decrease the indentation.'), - type: 'array', - items: { - $ref: '#definitions/bracketPair' - } - }, - autoClosingPairs: { - default: [['(', ')'], ['[', ']'], ['{', '}']], - description: nls.localize('schema.autoClosingPairs', 'Defines the bracket pairs. When a opening bracket is entered, the closing bracket is inserted automatically.'), - type: 'array', - items: { - oneOf: [{ - $ref: '#definitions/bracketPair' - }, { - type: 'object', - properties: { - open: { - $ref: '#definitions/openBracket' - }, - close: { - $ref: '#definitions/closeBracket' - }, - notIn: { - type: 'array', - description: nls.localize('schema.autoClosingPairs.notIn', 'Defines a list of scopes where the auto pairs are disabled.'), - items: { - enum: ['string', 'comment'] - } - } - } - }] - } - }, - surroundingPairs: { - default: [['(', ')'], ['[', ']'], ['{', '}']], - description: nls.localize('schema.surroundingPairs', 'Defines the bracket pairs that can be used to surround a selected string.'), - type: 'array', - items: { - oneOf: [{ - $ref: '#definitions/bracketPair' - }, { - type: 'object', - properties: { - open: { - $ref: '#definitions/openBracket' - }, - close: { - $ref: '#definitions/closeBracket' - } - } - }] - } - }, - } -}; -let schemaRegistry = Registry.as(Extensions.JSONContribution); -schemaRegistry.registerSchema(schemaId, schema); diff --git a/src/vs/editor/browser/standalone/colorizer.ts b/src/vs/editor/standalone/browser/colorizer.ts similarity index 98% rename from src/vs/editor/browser/standalone/colorizer.ts rename to src/vs/editor/standalone/browser/colorizer.ts index 2351deff158e7..d3834a81578dc 100644 --- a/src/vs/editor/browser/standalone/colorizer.ts +++ b/src/vs/editor/standalone/browser/colorizer.ts @@ -13,7 +13,7 @@ import { renderViewLine, RenderLineInput } from 'vs/editor/common/viewLayout/vie import { ViewLineToken } from 'vs/editor/common/core/viewLineToken'; import { LineTokens } from 'vs/editor/common/core/lineTokens'; import * as strings from 'vs/base/common/strings'; -import { IStandaloneThemeService } from 'vs/editor/common/services/standaloneThemeService'; +import { IStandaloneThemeService } from 'vs/editor/standalone/common/standaloneThemeService'; export interface IColorizerOptions { tabSize?: number; diff --git a/src/vs/editor/contrib/iPadShowKeyboard/browser/iPadShowKeyboard.css b/src/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.css similarity index 100% rename from src/vs/editor/contrib/iPadShowKeyboard/browser/iPadShowKeyboard.css rename to src/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.css diff --git a/src/vs/editor/contrib/iPadShowKeyboard/browser/iPadShowKeyboard.ts b/src/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.ts similarity index 100% rename from src/vs/editor/contrib/iPadShowKeyboard/browser/iPadShowKeyboard.ts rename to src/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.ts diff --git a/src/vs/editor/contrib/iPadShowKeyboard/browser/keyboard-inverse.svg b/src/vs/editor/standalone/browser/iPadShowKeyboard/keyboard-inverse.svg similarity index 100% rename from src/vs/editor/contrib/iPadShowKeyboard/browser/keyboard-inverse.svg rename to src/vs/editor/standalone/browser/iPadShowKeyboard/keyboard-inverse.svg diff --git a/src/vs/editor/contrib/iPadShowKeyboard/browser/keyboard.svg b/src/vs/editor/standalone/browser/iPadShowKeyboard/keyboard.svg similarity index 100% rename from src/vs/editor/contrib/iPadShowKeyboard/browser/keyboard.svg rename to src/vs/editor/standalone/browser/iPadShowKeyboard/keyboard.svg diff --git a/src/vs/editor/contrib/inspectTokens/browser/inspectTokens.css b/src/vs/editor/standalone/browser/inspectTokens/inspectTokens.css similarity index 81% rename from src/vs/editor/contrib/inspectTokens/browser/inspectTokens.css rename to src/vs/editor/standalone/browser/inspectTokens/inspectTokens.css index 33d668042e5ac..78b1b178c84cd 100644 --- a/src/vs/editor/contrib/inspectTokens/browser/inspectTokens.css +++ b/src/vs/editor/standalone/browser/inspectTokens/inspectTokens.css @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ .monaco-editor .tokens-inspect-widget { - background-color: #F3F3F3; - border: 1px solid #CCC; z-index: 50; -webkit-user-select: text; -ms-user-select: text; @@ -16,9 +14,10 @@ padding: 10px; } -.monaco-editor.vs-dark .tokens-inspect-widget { background-color: #2D2D30; border-color: #555; } - -.monaco-editor.hc-black .tokens-inspect-widget { background-color: #0C141F; } +.tokens-inspect-separator { + height: 1px; + border: 0; +} .monaco-editor .tokens-inspect-widget .tm-token { font-family: monospace; diff --git a/src/vs/editor/contrib/inspectTokens/browser/inspectTokens.ts b/src/vs/editor/standalone/browser/inspectTokens/inspectTokens.ts similarity index 91% rename from src/vs/editor/contrib/inspectTokens/browser/inspectTokens.ts rename to src/vs/editor/standalone/browser/inspectTokens/inspectTokens.ts index 66647f525cdf4..8964611f5878e 100644 --- a/src/vs/editor/contrib/inspectTokens/browser/inspectTokens.ts +++ b/src/vs/editor/standalone/browser/inspectTokens/inspectTokens.ts @@ -17,10 +17,13 @@ import { IModeService } from 'vs/editor/common/services/modeService'; import { TokenMetadata } from 'vs/editor/common/model/tokensBinaryEncoding'; import { TokenizationRegistry, LanguageIdentifier, FontStyle, StandardTokenType, ITokenizationSupport, IState } from 'vs/editor/common/modes'; import { CharCode } from 'vs/base/common/charCode'; -import { IStandaloneThemeService } from 'vs/editor/common/services/standaloneThemeService'; +import { IStandaloneThemeService } from 'vs/editor/standalone/common/standaloneThemeService'; import { NULL_STATE, nullTokenize, nullTokenize2 } from 'vs/editor/common/modes/nullMode'; import { Token } from 'vs/editor/common/core/token'; import { Color } from 'vs/base/common/color'; +import { registerThemingParticipant, HIGH_CONTRAST } from 'vs/platform/theme/common/themeService'; +import { editorHoverBackground, editorHoverBorder } from 'vs/platform/theme/common/colorRegistry'; + @editorContribution class InspectTokensController extends Disposable implements IEditorContribution { @@ -230,7 +233,7 @@ class InspectTokensWidget extends Disposable implements IContentWidget { } result += `

${renderTokenText(tokenText)}(${tokenText.length} ${tokenText.length === 1 ? 'char' : 'chars'})

`; - result += `
`; + result += `
`; let metadata = this._decodeMetadata(data.tokens2[(token2Index << 1) + 1]); result += ``; @@ -241,7 +244,7 @@ class InspectTokensWidget extends Disposable implements IContentWidget { result += ``; result += ``; - result += `
`; + result += `
`; if (token1Index < data.tokens1.length) { result += `${escape(data.tokens1[token1Index].type)}`; @@ -330,3 +333,16 @@ class InspectTokensWidget extends Disposable implements IContentWidget { }; } } + +registerThemingParticipant((theme, collector) => { + let border = theme.getColor(editorHoverBorder); + if (border) { + let borderWidth = theme.type === HIGH_CONTRAST ? 2 : 1; + collector.addRule(`.monaco-editor .tokens-inspect-widget { border: ${borderWidth}px solid ${border}; }`); + collector.addRule(`.monaco-editor .tokens-inspect-widget .tokens-inspect-separator { background-color: ${border}; }`); + } + let background = theme.getColor(editorHoverBackground); + if (background) { + collector.addRule(`.monaco-editor .tokens-inspect-widget { background-color: ${background}; }`); + } +}); \ No newline at end of file diff --git a/src/vs/editor/contrib/quickOpen/browser/editorQuickOpen.ts b/src/vs/editor/standalone/browser/quickOpen/editorQuickOpen.ts similarity index 94% rename from src/vs/editor/contrib/quickOpen/browser/editorQuickOpen.ts rename to src/vs/editor/standalone/browser/quickOpen/editorQuickOpen.ts index feb1726927bcc..6117ad98768d4 100644 --- a/src/vs/editor/contrib/quickOpen/browser/editorQuickOpen.ts +++ b/src/vs/editor/standalone/browser/quickOpen/editorQuickOpen.ts @@ -14,6 +14,7 @@ import { Selection } from 'vs/editor/common/core/selection'; import { IActionOptions, EditorAction } from 'vs/editor/common/editorCommonExtensions'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { Range } from 'vs/editor/common/core/range'; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; export interface IQuickOpenControllerOpts { inputAriaLabel: string; @@ -94,6 +95,11 @@ export class QuickOpenController implements editorCommon.IEditorContribution { this.widget.show(''); } + private static _RANGE_HIGHLIGHT_DECORATION = ModelDecorationOptions.register({ + className: 'rangeHighlight', + isWholeLine: true + }); + public decorateLine(range: Range, editor: ICodeEditor): void { editor.changeDecorations((changeAccessor: editorCommon.IModelDecorationsChangeAccessor) => { var oldDecorations: string[] = []; @@ -105,10 +111,7 @@ export class QuickOpenController implements editorCommon.IEditorContribution { var newDecorations: editorCommon.IModelDeltaDecoration[] = [ { range: range, - options: { - className: 'rangeHighlight', - isWholeLine: true - } + options: QuickOpenController._RANGE_HIGHLIGHT_DECORATION } ]; diff --git a/src/vs/editor/contrib/quickOpen/browser/gotoLine.css b/src/vs/editor/standalone/browser/quickOpen/gotoLine.css similarity index 100% rename from src/vs/editor/contrib/quickOpen/browser/gotoLine.css rename to src/vs/editor/standalone/browser/quickOpen/gotoLine.css diff --git a/src/vs/editor/contrib/quickOpen/browser/gotoLine.ts b/src/vs/editor/standalone/browser/quickOpen/gotoLine.ts similarity index 100% rename from src/vs/editor/contrib/quickOpen/browser/gotoLine.ts rename to src/vs/editor/standalone/browser/quickOpen/gotoLine.ts diff --git a/src/vs/editor/contrib/quickOpen/browser/quickCommand.ts b/src/vs/editor/standalone/browser/quickOpen/quickCommand.ts similarity index 100% rename from src/vs/editor/contrib/quickOpen/browser/quickCommand.ts rename to src/vs/editor/standalone/browser/quickOpen/quickCommand.ts diff --git a/src/vs/editor/contrib/quickOpen/browser/quickOpenEditorWidget.ts b/src/vs/editor/standalone/browser/quickOpen/quickOpenEditorWidget.ts similarity index 100% rename from src/vs/editor/contrib/quickOpen/browser/quickOpenEditorWidget.ts rename to src/vs/editor/standalone/browser/quickOpen/quickOpenEditorWidget.ts diff --git a/src/vs/editor/contrib/quickOpen/browser/quickOutline.css b/src/vs/editor/standalone/browser/quickOpen/quickOutline.css similarity index 100% rename from src/vs/editor/contrib/quickOpen/browser/quickOutline.css rename to src/vs/editor/standalone/browser/quickOpen/quickOutline.css diff --git a/src/vs/editor/contrib/quickOpen/browser/quickOutline.ts b/src/vs/editor/standalone/browser/quickOpen/quickOutline.ts similarity index 98% rename from src/vs/editor/contrib/quickOpen/browser/quickOutline.ts rename to src/vs/editor/standalone/browser/quickOpen/quickOutline.ts index 5c224a3d5a8dc..47a23f9ebe5b1 100644 --- a/src/vs/editor/contrib/quickOpen/browser/quickOutline.ts +++ b/src/vs/editor/standalone/browser/quickOpen/quickOutline.ts @@ -15,9 +15,9 @@ import { IContext, IHighlight, QuickOpenEntryGroup, QuickOpenModel } from 'vs/ba import { IAutoFocus, Mode } from 'vs/base/parts/quickopen/common/quickOpen'; import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; -import { SymbolInformation, DocumentSymbolProviderRegistry, symbolKindToCssClass } from 'vs/editor/common/modes'; +import { SymbolInformation, DocumentSymbolProviderRegistry, symbolKindToCssClass, IOutline } from 'vs/editor/common/modes'; import { BaseEditorQuickOpenAction, IDecorator } from './editorQuickOpen'; -import { getDocumentSymbols, IOutline } from 'vs/editor/contrib/quickOpen/common/quickOpen'; +import { getDocumentSymbols } from 'vs/editor/contrib/quickOpen/common/quickOpen'; import { editorAction, ServicesAccessor } from 'vs/editor/common/editorCommonExtensions'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; import { Range } from 'vs/editor/common/core/range'; diff --git a/src/vs/editor/contrib/quickOpen/browser/symbol-sprite.svg b/src/vs/editor/standalone/browser/quickOpen/symbol-sprite.svg similarity index 100% rename from src/vs/editor/contrib/quickOpen/browser/symbol-sprite.svg rename to src/vs/editor/standalone/browser/quickOpen/symbol-sprite.svg diff --git a/src/vs/editor/browser/standalone/simpleServices.ts b/src/vs/editor/standalone/browser/simpleServices.ts similarity index 81% rename from src/vs/editor/browser/standalone/simpleServices.ts rename to src/vs/editor/standalone/browser/simpleServices.ts index f9c2a8fc51e6d..b2fbe6c070ec2 100644 --- a/src/vs/editor/browser/standalone/simpleServices.ts +++ b/src/vs/editor/standalone/browser/simpleServices.ts @@ -8,7 +8,7 @@ import { Schemas } from 'vs/base/common/network'; import Severity from 'vs/base/common/severity'; import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; -import { IConfigurationService, IConfigurationServiceEvent, IConfigurationValue, getConfigurationValue, IConfigurationKeys } from 'vs/platform/configuration/common/configuration'; +import { IConfigurationService, IConfigurationServiceEvent, IConfigurationValue, IConfigurationKeys, IConfigurationValues, Configuration, IConfigurationData, ConfigurationModel, IConfigurationOverrides } from 'vs/platform/configuration/common/configuration'; import { IEditor, IEditorInput, IEditorOptions, IEditorService, IResourceInput, Position } from 'vs/platform/editor/common/editor'; import { ICommandService, ICommand, ICommandEvent, ICommandHandler, CommandsRegistry } from 'vs/platform/commands/common/commands'; import { AbstractKeybindingService } from 'vs/platform/keybinding/common/abstractKeybindingService'; @@ -17,14 +17,16 @@ import { KeybindingResolver } from 'vs/platform/keybinding/common/keybindingReso import { IKeybindingEvent, KeybindingSource, IKeyboardEvent } from 'vs/platform/keybinding/common/keybinding'; import { ContextKeyExpr, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IConfirmation, IMessageService } from 'vs/platform/message/common/message'; +import { IWorkspaceContextService, ILegacyWorkspace, IWorkspace } from 'vs/platform/workspace/common/workspace'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { ICodeEditor, IDiffEditor } from 'vs/editor/browser/editorBrowser'; import { Selection } from 'vs/editor/common/core/selection'; import Event, { Emitter } from 'vs/base/common/event'; -import { getDefaultValues as getDefaultConfiguration } from 'vs/platform/configuration/common/model'; +import { DefaultConfigurationModel } from 'vs/platform/configuration/common/model'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IProgressService, IProgressRunner } from 'vs/platform/progress/common/progress'; -import { ITextModelResolverService, ITextModelContentProvider, ITextEditorModel } from 'vs/editor/common/services/resolverService'; +import { ITextResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration'; +import { ITextModelService, ITextModelContentProvider, ITextEditorModel } from 'vs/editor/common/services/resolverService'; import { IDisposable, IReference, ImmortalReference, combinedDisposable } from 'vs/base/common/lifecycle'; import * as dom from 'vs/base/browser/dom'; import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; @@ -172,7 +174,7 @@ export class SimpleEditorService implements IEditorService { } } -export class SimpleEditorModelResolverService implements ITextModelResolverService { +export class SimpleEditorModelResolverService implements ITextModelService { public _serviceBrand: any; private editor: SimpleEditor; @@ -430,31 +432,58 @@ export class SimpleConfigurationService implements IConfigurationService { private _onDidUpdateConfiguration = new Emitter(); public onDidUpdateConfiguration: Event = this._onDidUpdateConfiguration.event; - private _config: any; + private _configuration: Configuration; constructor() { - this._config = getDefaultConfiguration(); + this._configuration = new Configuration(new DefaultConfigurationModel(), new ConfigurationModel()); } - public getConfiguration(section?: any): T { - return this._config; + private configuration(): Configuration { + return this._configuration; } public reloadConfiguration(section?: string): TPromise { return TPromise.as(this.getConfiguration(section)); } - public lookup(key: string): IConfigurationValue { - return { - value: getConfigurationValue(this.getConfiguration(), key), - default: getConfigurationValue(this.getConfiguration(), key), - user: getConfigurationValue(this.getConfiguration(), key) - }; + public getConfiguration(section?: string, options?: IConfigurationOverrides): C { + return this.configuration().getValue(section, options); + } + + public lookup(key: string, options?: IConfigurationOverrides): IConfigurationValue { + return this.configuration().lookup(key, options); } public keys(): IConfigurationKeys { - return { default: [], user: [] }; + return this.configuration().keys(); + } + + public values(): IConfigurationValues { + return this._configuration.values(); + } + + public getConfigurationData(): IConfigurationData { + return this.configuration().toData(); + } +} + +export class SimpleResourceConfigurationService implements ITextResourceConfigurationService { + + _serviceBrand: any; + + public readonly onDidUpdateConfiguration: Event; + private readonly _onDidUpdateConfigurationEmitter = new Emitter(); + + constructor(private configurationService: SimpleConfigurationService) { + this.configurationService.onDidUpdateConfiguration(() => { + this._onDidUpdateConfigurationEmitter.fire(); + }); } + + public getConfiguration(): T { + return this.configurationService.getConfiguration(); + } + } export class SimpleMenuService implements IMenuService { @@ -489,3 +518,49 @@ export class StandaloneTelemetryService implements ITelemetryService { return null; } } + +export class SimpleWorkspaceContextService implements IWorkspaceContextService { + + public _serviceBrand: any; + + private static SCHEME: 'inmemory'; + + private readonly _onDidChangeWorkspaceRoots: Emitter = new Emitter(); + public readonly onDidChangeWorkspaceRoots: Event = this._onDidChangeWorkspaceRoots.event; + + private readonly legacyWorkspace: ILegacyWorkspace; + private readonly workspace: IWorkspace; + + constructor() { + this.legacyWorkspace = { resource: URI.from({ scheme: SimpleWorkspaceContextService.SCHEME, authority: 'model', path: '/' }) }; + this.workspace = { id: '4064f6ec-cb38-4ad0-af64-ee6467e63c82', roots: [this.legacyWorkspace.resource], name: this.legacyWorkspace.resource.fsPath }; + } + + public getWorkspace(): ILegacyWorkspace { + return this.legacyWorkspace; + } + + public getWorkspace2(): IWorkspace { + return this.workspace; + } + + public getRoot(resource: URI): URI { + return resource && resource.scheme === SimpleWorkspaceContextService.SCHEME ? this.workspace.roots[0] : void 0; + } + + public hasWorkspace(): boolean { + return true; + } + + public isInsideWorkspace(resource: URI): boolean { + return resource && resource.scheme === SimpleWorkspaceContextService.SCHEME; + } + + public toWorkspaceRelativePath(resource: URI, toOSPath?: boolean): string { + return resource.fsPath; + } + + public toResource(workspaceRelativePath: string): URI { + return URI.file(workspaceRelativePath); + } +} diff --git a/src/vs/editor/standalone/browser/standalone-tokens.css b/src/vs/editor/standalone/browser/standalone-tokens.css new file mode 100644 index 0000000000000..09fa35644b2bb --- /dev/null +++ b/src/vs/editor/standalone/browser/standalone-tokens.css @@ -0,0 +1,251 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + + +/* Default standalone editor font */ +.monaco-editor { + font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif; +} + +.monaco-menu .monaco-action-bar.vertical .action-item .action-label:focus { + color: #0059AC; + stroke-width: 1.2px; + text-shadow: 0px 0px 0.15px #0059AC; +} + +.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-item .action-label:focus, +.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-item .action-label:focus { + color: #ACDDFF; + stroke-width: 1.2px; + text-shadow: 0px 0px 0.15px #ACDDFF; +} + +.monaco-editor-hover p { + margin: 0; +} + +/* The hc-black theme is already high contrast optimized */ +.monaco-editor.hc-black { + -ms-high-contrast-adjust: none; +} +/* In case the browser goes into high contrast mode and the editor is not configured with the hc-black theme */ +@media screen and (-ms-high-contrast:active) { + + /* current line highlight */ + .monaco-editor.vs .view-overlays .current-line, + .monaco-editor.vs-dark .view-overlays .current-line { + border-color: windowtext !important; + border-left: 0; + border-right: 0; + } + + /* view cursors */ + .monaco-editor.vs .cursor, + .monaco-editor.vs-dark .cursor { + background-color: windowtext !important; + } + /* dnd target */ + .monaco-editor.vs .dnd-target, + .monaco-editor.vs-dark .dnd-target { + border-color: windowtext !important; + } + + /* selected text background */ + .monaco-editor.vs .selected-text, + .monaco-editor.vs-dark .selected-text { + background-color: highlight !important; + } + + /* allow the text to have a transparent background. */ + .monaco-editor.vs .view-line, + .monaco-editor.vs-dark .view-line { + -ms-high-contrast-adjust: none; + } + + /* text color */ + .monaco-editor.vs .view-line span, + .monaco-editor.vs-dark .view-line span { + color: windowtext !important; + } + /* selected text color */ + .monaco-editor.vs .view-line span.inline-selected-text, + .monaco-editor.vs-dark .view-line span.inline-selected-text { + color: highlighttext !important; + } + + /* allow decorations */ + .monaco-editor.vs .view-overlays, + .monaco-editor.vs-dark .view-overlays { + -ms-high-contrast-adjust: none; + } + + /* various decorations */ + .monaco-editor.vs .selectionHighlight, + .monaco-editor.vs-dark .selectionHighlight, + .monaco-editor.vs .wordHighlight, + .monaco-editor.vs-dark .wordHighlight, + .monaco-editor.vs .wordHighlightStrong, + .monaco-editor.vs-dark .wordHighlightStrong, + .monaco-editor.vs .reference-decoration, + .monaco-editor.vs-dark .reference-decoration { + border: 2px dotted highlight !important; + background: transparent !important; + box-sizing: border-box; + } + .monaco-editor.vs .rangeHighlight, + .monaco-editor.vs-dark .rangeHighlight { + background: transparent !important; + border: 1px dotted activeborder !important; + box-sizing: border-box; + } + .monaco-editor.vs .bracket-match, + .monaco-editor.vs-dark .bracket-match { + border-color: windowtext !important; + background: transparent !important; + } + + /* find widget */ + .monaco-editor.vs .findMatch, + .monaco-editor.vs-dark .findMatch, + .monaco-editor.vs .currentFindMatch, + .monaco-editor.vs-dark .currentFindMatch { + border: 2px dotted activeborder !important; + background: transparent !important; + box-sizing: border-box; + } + .monaco-editor.vs .find-widget, + .monaco-editor.vs-dark .find-widget { + border: 1px solid windowtext; + } + + /* list - used by suggest widget */ + .monaco-editor.vs .monaco-list .monaco-list-row, + .monaco-editor.vs-dark .monaco-list .monaco-list-row { + -ms-high-contrast-adjust: none; + color: windowtext !important; + } + .monaco-editor.vs .monaco-list .monaco-list-row.focused, + .monaco-editor.vs-dark .monaco-list .monaco-list-row.focused { + color: highlighttext !important; + background-color: highlight !important; + } + .monaco-editor.vs .monaco-list .monaco-list-row:hover, + .monaco-editor.vs-dark .monaco-list .monaco-list-row:hover { + background: transparent !important; + border: 1px solid highlight; + box-sizing: border-box; + } + + /* tree */ + .monaco-editor.vs .monaco-tree .monaco-tree-row, + .monaco-editor.vs-dark .monaco-tree .monaco-tree-row { + -ms-high-contrast-adjust: none; + color: windowtext !important; + } + .monaco-editor.vs .monaco-tree .monaco-tree-row.selected, + .monaco-editor.vs-dark .monaco-tree .monaco-tree-row.selected, + .monaco-editor.vs .monaco-tree .monaco-tree-row.focused, + .monaco-editor.vs-dark .monaco-tree .monaco-tree-row.focused { + color: highlighttext !important; + background-color: highlight !important; + } + .monaco-editor.vs .monaco-tree .monaco-tree-row:hover, + .monaco-editor.vs-dark .monaco-tree .monaco-tree-row:hover { + background: transparent !important; + border: 1px solid highlight; + box-sizing: border-box; + } + + /* scrollbars */ + .monaco-editor.vs .monaco-scrollable-element > .scrollbar, + .monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar { + -ms-high-contrast-adjust: none; + background: background !important; + border: 1px solid windowtext; + box-sizing: border-box; + } + .monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider, + .monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider { + background: windowtext !important; + } + .monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider:hover, + .monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider:hover { + background: highlight !important; + } + .monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider.active, + .monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider.active { + background: highlight !important; + } + + /* overview ruler */ + .monaco-editor.vs .decorationsOverviewRuler, + .monaco-editor.vs-dark .decorationsOverviewRuler { + opacity: 0; + } + + /* minimap */ + .monaco-editor.vs .minimap, + .monaco-editor.vs-dark .minimap { + display: none; + } + + /* squiggles */ + .monaco-editor.vs .redsquiggly, + .monaco-editor.vs-dark .redsquiggly { + background: transparent !important; + border-bottom: 4px double #E47777; + } + .monaco-editor.vs .greensquiggly, + .monaco-editor.vs-dark .greensquiggly { + border-bottom: 4px double #71B771; + } + + /* contextmenu */ + .monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-item .action-label:focus, + .monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-item .action-label:focus { + -ms-high-contrast-adjust: none; + color: highlighttext !important; + background-color: highlight !important; + } + .monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-item .action-label:hover, + .monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-item .action-label:hover { + -ms-high-contrast-adjust: none; + background: transparent !important; + border: 1px solid highlight; + box-sizing: border-box; + } + + /* diff editor */ + .monaco-diff-editor.vs .diffOverviewRuler, + .monaco-diff-editor.vs-dark .diffOverviewRuler { + display: none; + } + .monaco-editor.vs .line-insert, + .monaco-editor.vs-dark .line-insert, + .monaco-editor.vs .line-delete, + .monaco-editor.vs-dark .line-delete { + background: transparent !important; + border: 1px solid highlight !important; + box-sizing: border-box; + } + .monaco-editor.vs .char-insert, + .monaco-editor.vs-dark .char-insert, + .monaco-editor.vs .char-delete, + .monaco-editor.vs-dark .char-delete { + background: transparent !important; + } +} + +/*.monaco-editor.vs [tabindex="0"]:focus { + outline: 1px solid rgba(0, 122, 204, 0.4); + outline-offset: -1px; + opacity: 1 !important; +} + +.monaco-editor.vs-dark [tabindex="0"]:focus { + outline: 1px solid rgba(14, 99, 156, 0.6); + outline-offset: -1px; + opacity: 1 !important; +}*/ diff --git a/src/vs/editor/browser/standalone/standaloneCodeEditor.ts b/src/vs/editor/standalone/browser/standaloneCodeEditor.ts similarity index 86% rename from src/vs/editor/browser/standalone/standaloneCodeEditor.ts rename to src/vs/editor/standalone/browser/standaloneCodeEditor.ts index 4f7c626bc77df..eba533c0f79f6 100644 --- a/src/vs/editor/browser/standalone/standaloneCodeEditor.ts +++ b/src/vs/editor/standalone/browser/standaloneCodeEditor.ts @@ -15,16 +15,17 @@ import { ContextKeyExpr, IContextKey, IContextKeyService } from 'vs/platform/con import { IActionDescriptor, IModel, IModelChangedEvent } from 'vs/editor/common/editorCommon'; import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService'; -import { StandaloneKeybindingService } from 'vs/editor/browser/standalone/simpleServices'; -import { IEditorContextViewService } from 'vs/editor/browser/standalone/standaloneServices'; +import { StandaloneKeybindingService } from 'vs/editor/standalone/browser/simpleServices'; +import { IEditorContextViewService } from 'vs/editor/standalone/browser/standaloneServices'; import { CodeEditor } from 'vs/editor/browser/codeEditor'; import { DiffEditorWidget } from 'vs/editor/browser/widget/diffEditorWidget'; import { ICodeEditor, IDiffEditor } from 'vs/editor/browser/editorBrowser'; -import { IStandaloneThemeService } from 'vs/editor/common/services/standaloneThemeService'; +import { IStandaloneThemeService } from 'vs/editor/standalone/common/standaloneThemeService'; import { InternalEditorAction } from 'vs/editor/common/editorAction'; import { MenuId, MenuRegistry, IMenuItem } from 'vs/platform/actions/common/actions'; import { IDiffEditorOptions, IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { IThemeService } from 'vs/platform/theme/common/themeService'; +import * as aria from 'vs/base/browser/ui/aria/aria'; /** * The options to create an editor. @@ -44,12 +45,26 @@ export interface IEditorConstructionOptions extends IEditorOptions { * To not create automatically a model, use `model: null`. */ language?: string; + /** + * Initial theme to be used for rendering. + * The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'. + * You can create custom themes via `monaco.editor.defineTheme`. + * To switch a theme, use `monaco.editor.setTheme` + */ + theme?: string; } /** * The options to create a diff editor. */ export interface IDiffEditorConstructionOptions extends IDiffEditorOptions { + /** + * Initial theme to be used for rendering. + * The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'. + * You can create custom themes via `monaco.editor.defineTheme`. + * To switch a theme, use `monaco.editor.setTheme` + */ + theme?: string; } export interface IStandaloneCodeEditor extends ICodeEditor { @@ -69,6 +84,15 @@ export interface IStandaloneDiffEditor extends IDiffEditor { let LAST_GENERATED_COMMAND_ID = 0; +let ariaDomNodeCreated = false; +function createAriaDomNode() { + if (ariaDomNodeCreated) { + return; + } + ariaDomNodeCreated = true; + aria.setARIAContainer(document.body); +} + /** * A code editor to be used both by the standalone editor and the standalone diff editor. */ @@ -83,13 +107,17 @@ export class StandaloneCodeEditor extends CodeEditor implements IStandaloneCodeE @ICodeEditorService codeEditorService: ICodeEditorService, @ICommandService commandService: ICommandService, @IContextKeyService contextKeyService: IContextKeyService, - @IKeybindingService keybindingService: IKeybindingService + @IKeybindingService keybindingService: IKeybindingService, + @IThemeService themeService: IThemeService ) { - super(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService); + super(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService, themeService); if (keybindingService instanceof StandaloneKeybindingService) { this._standaloneKeybindingService = keybindingService; } + + // Create the ARIA dom node as soon as the first editor is instantiated + createAriaDomNode(); } public addCommand(keybinding: number, handler: ICommandHandler, context: string): string { @@ -192,7 +220,6 @@ export class StandaloneCodeEditor extends CodeEditor implements IStandaloneCodeE export class StandaloneEditor extends StandaloneCodeEditor implements IStandaloneCodeEditor { private _contextViewService: IEditorContextViewService; - private _standaloneThemeService: IStandaloneThemeService; private _ownsModel: boolean; constructor( @@ -205,26 +232,23 @@ export class StandaloneEditor extends StandaloneCodeEditor implements IStandalon @IContextKeyService contextKeyService: IContextKeyService, @IKeybindingService keybindingService: IKeybindingService, @IContextViewService contextViewService: IContextViewService, - @IStandaloneThemeService standaloneThemeService: IStandaloneThemeService + @IStandaloneThemeService themeService: IStandaloneThemeService ) { options = options || {}; if (typeof options.theme === 'string') { - options.theme = standaloneThemeService.setTheme(options.theme); + themeService.setTheme(options.theme); } - - super(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService, keybindingService); + let model: IModel = options.model; + delete options.model; + super(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService, keybindingService, themeService); this._contextViewService = contextViewService; - this._standaloneThemeService = standaloneThemeService; this._register(toDispose); - let model: IModel = null; - if (typeof options.model === 'undefined') { + if (typeof model === 'undefined') { model = (self).monaco.editor.createModel(options.value || '', options.language || 'text/plain'); this._ownsModel = true; } else { - model = options.model; - delete options.model; this._ownsModel = false; } @@ -246,13 +270,6 @@ export class StandaloneEditor extends StandaloneCodeEditor implements IStandalon this.dispose(); } - public updateOptions(newOptions: IEditorOptions): void { - if (typeof newOptions.theme === 'string') { - newOptions.theme = this._standaloneThemeService.setTheme(newOptions.theme); - } - super.updateOptions(newOptions); - } - _attachModel(model: IModel): void { super._attachModel(model); if (this._view) { @@ -272,7 +289,6 @@ export class StandaloneEditor extends StandaloneCodeEditor implements IStandalon export class StandaloneDiffEditor extends DiffEditorWidget implements IStandaloneDiffEditor { private _contextViewService: IEditorContextViewService; - private _standaloneThemeService: IStandaloneThemeService; private _standaloneKeybindingService: StandaloneKeybindingService; constructor( @@ -283,14 +299,13 @@ export class StandaloneDiffEditor extends DiffEditorWidget implements IStandalon @IContextKeyService contextKeyService: IContextKeyService, @IKeybindingService keybindingService: IKeybindingService, @IContextViewService contextViewService: IContextViewService, - @IStandaloneThemeService standaloneColorService: IStandaloneThemeService, @IEditorWorkerService editorWorkerService: IEditorWorkerService, @ICodeEditorService codeEditorService: ICodeEditorService, - @IThemeService themeService: IThemeService + @IStandaloneThemeService themeService: IStandaloneThemeService ) { options = options || {}; if (typeof options.theme === 'string') { - options.theme = standaloneColorService.setTheme(options.theme); + options.theme = themeService.setTheme(options.theme); } super(domElement, options, editorWorkerService, contextKeyService, instantiationService, codeEditorService, themeService); @@ -300,7 +315,6 @@ export class StandaloneDiffEditor extends DiffEditorWidget implements IStandalon } this._contextViewService = contextViewService; - this._standaloneThemeService = standaloneColorService; this._register(toDispose); @@ -315,13 +329,6 @@ export class StandaloneDiffEditor extends DiffEditorWidget implements IStandalon this.dispose(); } - public updateOptions(newOptions: IEditorOptions): void { - if (typeof newOptions.theme === 'string') { - newOptions.theme = this._standaloneThemeService.setTheme(newOptions.theme); - } - super.updateOptions(newOptions); - } - protected _createInnerEditor(instantiationService: IInstantiationService, container: HTMLElement, options: IEditorOptions): CodeEditor { return instantiationService.createInstance(StandaloneCodeEditor, container, options); } diff --git a/src/vs/editor/browser/standalone/standaloneEditor.ts b/src/vs/editor/standalone/browser/standaloneEditor.ts similarity index 91% rename from src/vs/editor/browser/standalone/standaloneEditor.ts rename to src/vs/editor/standalone/browser/standaloneEditor.ts index fc453d6e545a2..5b8a1babae82f 100644 --- a/src/vs/editor/browser/standalone/standaloneEditor.ts +++ b/src/vs/editor/standalone/browser/standaloneEditor.ts @@ -4,23 +4,23 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import 'vs/css!./media/standalone-tokens'; +import 'vs/css!./standalone-tokens'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { ICodeEditor, ContentWidgetPositionPreference, OverlayWidgetPositionPreference, MouseTargetType } from 'vs/editor/browser/editorBrowser'; -import { StandaloneEditor, IStandaloneCodeEditor, StandaloneDiffEditor, IStandaloneDiffEditor, IEditorConstructionOptions, IDiffEditorConstructionOptions } from 'vs/editor/browser/standalone/standaloneCodeEditor'; +import { StandaloneEditor, IStandaloneCodeEditor, StandaloneDiffEditor, IStandaloneDiffEditor, IEditorConstructionOptions, IDiffEditorConstructionOptions } from 'vs/editor/standalone/browser/standaloneCodeEditor'; import { ScrollbarVisibility } from 'vs/base/common/scrollable'; -import { IEditorOverrideServices, DynamicStandaloneServices, StaticServices } from 'vs/editor/browser/standalone/standaloneServices'; +import { IEditorOverrideServices, DynamicStandaloneServices, StaticServices } from 'vs/editor/standalone/browser/standaloneServices'; import { IDisposable } from 'vs/base/common/lifecycle'; import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; import { OpenerService } from 'vs/platform/opener/browser/openerService'; import { IOpenerService } from 'vs/platform/opener/common/opener'; -import { Colorizer, IColorizerElementOptions, IColorizerOptions } from 'vs/editor/browser/standalone/colorizer'; -import { SimpleEditorService, SimpleEditorModelResolverService } from 'vs/editor/browser/standalone/simpleServices'; +import { Colorizer, IColorizerElementOptions, IColorizerOptions } from 'vs/editor/standalone/browser/colorizer'; +import { SimpleEditorService, SimpleEditorModelResolverService } from 'vs/editor/standalone/browser/simpleServices'; import * as modes from 'vs/editor/common/modes'; import { IWebWorkerOptions, MonacoWebWorker, createWebWorker as actualCreateWebWorker } from 'vs/editor/common/services/webWorker'; import { IMarkerData } from 'vs/platform/markers/common/markers'; -import { DiffNavigator } from 'vs/editor/contrib/diffNavigator/common/diffNavigator'; +import { DiffNavigator } from 'vs/editor/browser/widget/diffNavigator'; import { IEditorService } from 'vs/platform/editor/common/editor'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; @@ -29,9 +29,9 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService'; -import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; +import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { NULL_STATE, nullTokenize } from 'vs/editor/common/modes/nullMode'; -import { IStandaloneThemeData, IStandaloneThemeService } from 'vs/editor/common/services/standaloneThemeService'; +import { IStandaloneThemeData, IStandaloneThemeService } from 'vs/editor/standalone/common/standaloneThemeService'; import { Token } from 'vs/editor/common/core/token'; import { FontInfo, BareFontInfo } from 'vs/editor/common/config/fontInfo'; import * as editorOptions from 'vs/editor/common/config/editorOptions'; @@ -55,9 +55,9 @@ function withAllStandaloneServices(domElement: H } let simpleEditorModelResolverService: SimpleEditorModelResolverService = null; - if (!services.has(ITextModelResolverService)) { + if (!services.has(ITextModelService)) { simpleEditorModelResolverService = new SimpleEditorModelResolverService(); - services.set(ITextModelResolverService, simpleEditorModelResolverService); + services.set(ITextModelService, simpleEditorModelResolverService); } if (!services.has(IOpenerService)) { @@ -125,7 +125,6 @@ export function createDiffEditor(domElement: HTMLElement, options?: IDiffEditorC services.get(IContextKeyService), services.get(IKeybindingService), services.get(IContextViewService), - services.get(IStandaloneThemeService), services.get(IEditorWorkerService), services.get(ICodeEditorService), services.get(IStandaloneThemeService) @@ -309,6 +308,13 @@ export function defineTheme(themeName: string, themeData: IStandaloneThemeData): StaticServices.standaloneThemeService.get().defineTheme(themeName, themeData); } +/** + * Switches to a theme. + */ +export function setTheme(themeName: string): void { + StaticServices.standaloneThemeService.get().setTheme(themeName); +} + /** * @internal */ @@ -336,6 +342,7 @@ export function createMonacoEditorAPI(): typeof monaco.editor { colorizeModelLine: colorizeModelLine, tokenize: tokenize, defineTheme: defineTheme, + setTheme: setTheme, // enums ScrollbarVisibility: ScrollbarVisibility, @@ -354,14 +361,7 @@ export function createMonacoEditorAPI(): typeof monaco.editor { RenderMinimap: editorOptions.RenderMinimap, // classes - InternalEditorScrollbarOptions: editorOptions.InternalEditorScrollbarOptions, - InternalEditorMinimapOptions: editorOptions.InternalEditorMinimapOptions, - EditorWrappingInfo: editorOptions.EditorWrappingInfo, - InternalEditorViewOptions: editorOptions.InternalEditorViewOptions, - EditorContribOptions: editorOptions.EditorContribOptions, InternalEditorOptions: editorOptions.InternalEditorOptions, - OverviewRulerPosition: editorOptions.OverviewRulerPosition, - EditorLayoutInfo: editorOptions.EditorLayoutInfo, BareFontInfo: BareFontInfo, FontInfo: FontInfo, TextModelResolvedOptions: editorCommon.TextModelResolvedOptions, diff --git a/src/vs/editor/browser/standalone/standaloneLanguages.ts b/src/vs/editor/standalone/browser/standaloneLanguages.ts similarity index 93% rename from src/vs/editor/browser/standalone/standaloneLanguages.ts rename to src/vs/editor/standalone/browser/standaloneLanguages.ts index f3f5584a0db1b..176488944508b 100644 --- a/src/vs/editor/browser/standalone/standaloneLanguages.ts +++ b/src/vs/editor/standalone/browser/standaloneLanguages.ts @@ -8,9 +8,9 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { IDisposable } from 'vs/base/common/lifecycle'; import { ModesRegistry } from 'vs/editor/common/modes/modesRegistry'; -import { IMonarchLanguage } from 'vs/editor/common/modes/monarch/monarchTypes'; +import { IMonarchLanguage } from 'vs/editor/standalone/common/monarch/monarchTypes'; import { ILanguageExtensionPoint } from 'vs/editor/common/services/modeService'; -import { StaticServices } from 'vs/editor/browser/standalone/standaloneServices'; +import { StaticServices } from 'vs/editor/standalone/browser/standaloneServices'; import * as modes from 'vs/editor/common/modes'; import { LanguageConfiguration, IndentAction } from 'vs/editor/common/modes/languageConfiguration'; import * as editorCommon from 'vs/editor/common/editorCommon'; @@ -18,12 +18,12 @@ import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import { CancellationToken } from 'vs/base/common/cancellation'; import { toThenable } from 'vs/base/common/async'; -import { compile } from 'vs/editor/common/modes/monarch/monarchCompile'; -import { createTokenizationSupport } from 'vs/editor/common/modes/monarch/monarchLexer'; +import { compile } from 'vs/editor/standalone/common/monarch/monarchCompile'; +import { createTokenizationSupport } from 'vs/editor/standalone/common/monarch/monarchLexer'; import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; import { IMarkerData } from 'vs/platform/markers/common/markers'; import { Token, TokenizationResult, TokenizationResult2 } from 'vs/editor/common/core/token'; -import { IStandaloneThemeService } from 'vs/editor/common/services/standaloneThemeService'; +import { IStandaloneThemeService } from 'vs/editor/standalone/common/standaloneThemeService'; /** * Register information about a new language. @@ -89,9 +89,23 @@ export class TokenizationSupport2Adapter implements modes.ITokenizationSupport { private _toClassicTokens(tokens: IToken[], language: string, offsetDelta: number): Token[] { let result: Token[] = []; + let previousStartIndex: number = 0; for (let i = 0, len = tokens.length; i < len; i++) { - let t = tokens[i]; - result[i] = new Token(t.startIndex + offsetDelta, t.scopes, language); + const t = tokens[i]; + let startIndex = t.startIndex; + + // Prevent issues stemming from a buggy external tokenizer. + if (i === 0) { + // Force first token to start at first index! + startIndex = 0; + } else if (startIndex < previousStartIndex) { + // Force tokens to be after one another! + startIndex = previousStartIndex; + } + + result[i] = new Token(startIndex + offsetDelta, t.scopes, language); + + previousStartIndex = startIndex; } return result; } @@ -112,19 +126,34 @@ export class TokenizationSupport2Adapter implements modes.ITokenizationSupport { } private _toBinaryTokens(tokens: IToken[], offsetDelta: number): Uint32Array { - let languageId = this._languageIdentifier.id; - let tokenTheme = this._standaloneThemeService.getTheme().tokenTheme; + const languageId = this._languageIdentifier.id; + const tokenTheme = this._standaloneThemeService.getTheme().tokenTheme; let result: number[] = [], resultLen = 0; + let previousStartIndex: number = 0; for (let i = 0, len = tokens.length; i < len; i++) { - let t = tokens[i]; - let metadata = tokenTheme.match(languageId, t.scopes); + const t = tokens[i]; + const metadata = tokenTheme.match(languageId, t.scopes); if (resultLen > 0 && result[resultLen - 1] === metadata) { // same metadata continue; } - result[resultLen++] = t.startIndex; + + let startIndex = t.startIndex; + + // Prevent issues stemming from a buggy external tokenizer. + if (i === 0) { + // Force first token to start at first index! + startIndex = 0; + } else if (startIndex < previousStartIndex) { + // Force tokens to be after one another! + startIndex = previousStartIndex; + } + + result[resultLen++] = startIndex + offsetDelta; result[resultLen++] = metadata; + + previousStartIndex = startIndex; } let actualResult = new Uint32Array(resultLen); @@ -242,7 +271,7 @@ export function registerHoverProvider(languageId: string, provider: modes.HoverP return undefined; } if (!value.range && word) { - value.range = new Range(position.lineNumber, word.startColumn, position.column, word.endColumn); + value.range = new Range(position.lineNumber, word.startColumn, position.lineNumber, word.endColumn); } if (!value.range) { value.range = new Range(position.lineNumber, position.column, position.lineNumber, position.column); @@ -261,7 +290,7 @@ export function registerDocumentSymbolProvider(languageId: string, provider: mod } /** - * Register a document highlight provider (used by e.g. highlight occurences). + * Register a document highlight provider (used by e.g. highlight occurrences). */ export function registerDocumentHighlightProvider(languageId: string, provider: modes.DocumentHighlightProvider): IDisposable { return modes.DocumentHighlightProviderRegistry.register(languageId, provider); diff --git a/src/vs/editor/browser/standalone/standaloneServices.ts b/src/vs/editor/standalone/browser/standaloneServices.ts similarity index 87% rename from src/vs/editor/browser/standalone/standaloneServices.ts rename to src/vs/editor/standalone/browser/standaloneServices.ts index 1ce2c0d30b34f..17ed8f6e8f15c 100644 --- a/src/vs/editor/browser/standalone/standaloneServices.ts +++ b/src/vs/editor/standalone/browser/standaloneServices.ts @@ -5,7 +5,6 @@ 'use strict'; import { Disposable } from 'vs/base/common/lifecycle'; -import URI from 'vs/base/common/uri'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ContextMenuService } from 'vs/platform/contextview/browser/contextMenuService'; import { IContextMenuService, IContextViewService } from 'vs/platform/contextview/browser/contextView'; @@ -22,24 +21,25 @@ import { IMessageService } from 'vs/platform/message/common/message'; import { IProgressService } from 'vs/platform/progress/common/progress'; import { IStorageService, NullStorageService } from 'vs/platform/storage/common/storage'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { IWorkspaceContextService, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService'; import { EditorWorkerServiceImpl } from 'vs/editor/common/services/editorWorkerServiceImpl'; +import { ITextResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration'; import { IModeService } from 'vs/editor/common/services/modeService'; import { ModeServiceImpl } from 'vs/editor/common/services/modeServiceImpl'; import { IModelService } from 'vs/editor/common/services/modelService'; import { ModelServiceImpl } from 'vs/editor/common/services/modelServiceImpl'; import { CodeEditorServiceImpl } from 'vs/editor/browser/services/codeEditorServiceImpl'; import { - SimpleConfigurationService, SimpleMenuService, SimpleMessageService, + SimpleConfigurationService, SimpleResourceConfigurationService, SimpleMenuService, SimpleMessageService, SimpleProgressService, StandaloneCommandService, StandaloneKeybindingService, - StandaloneTelemetryService -} from 'vs/editor/browser/standalone/simpleServices'; + StandaloneTelemetryService, SimpleWorkspaceContextService +} from 'vs/editor/standalone/browser/simpleServices'; import { ContextKeyService } from 'vs/platform/contextkey/browser/contextKeyService'; import { IMenuService } from 'vs/platform/actions/common/actions'; -import { IStandaloneThemeService } from 'vs/editor/common/services/standaloneThemeService'; -import { StandaloneThemeServiceImpl } from 'vs/editor/browser/services/standaloneThemeServiceImpl'; +import { IStandaloneThemeService } from 'vs/editor/standalone/common/standaloneThemeService'; +import { StandaloneThemeServiceImpl } from 'vs/editor/standalone/browser/standaloneThemeServiceImpl'; export interface IEditorContextViewService extends IContextViewService { dispose(): void; @@ -115,13 +115,14 @@ export module StaticServices { export const instantiationService = define(IInstantiationService, () => new InstantiationService(_serviceCollection, true)); - export const contextService = define(IWorkspaceContextService, () => new WorkspaceContextService({ - resource: URI.from({ scheme: 'inmemory', authority: 'model', path: '/' }) - })); + const configurationServiceImpl = new SimpleConfigurationService(); + export const configurationService = define(IConfigurationService, () => configurationServiceImpl); - export const telemetryService = define(ITelemetryService, () => new StandaloneTelemetryService()); + export const resourceConfigurationService = define(ITextResourceConfigurationService, () => new SimpleResourceConfigurationService(configurationServiceImpl)); + + export const contextService = define(IWorkspaceContextService, () => new SimpleWorkspaceContextService()); - export const configurationService = define(IConfigurationService, () => new SimpleConfigurationService()); + export const telemetryService = define(ITelemetryService, () => new StandaloneTelemetryService()); export const messageService = define(IMessageService, () => new SimpleMessageService()); @@ -131,15 +132,16 @@ export module StaticServices { export const modelService = define(IModelService, (o) => new ModelServiceImpl(markerService.get(o), configurationService.get(o))); - export const editorWorkerService = define(IEditorWorkerService, (o) => new EditorWorkerServiceImpl(modelService.get(o), configurationService.get(o), modeService.get(o))); + export const editorWorkerService = define(IEditorWorkerService, (o) => new EditorWorkerServiceImpl(modelService.get(o), resourceConfigurationService.get(o), modeService.get(o))); - export const codeEditorService = define(ICodeEditorService, () => new CodeEditorServiceImpl()); + export const standaloneThemeService = define(IStandaloneThemeService, () => new StandaloneThemeServiceImpl()); + + export const codeEditorService = define(ICodeEditorService, (o) => new CodeEditorServiceImpl(standaloneThemeService.get(o))); export const progressService = define(IProgressService, () => new SimpleProgressService()); export const storageService = define(IStorageService, () => NullStorageService); - export const standaloneThemeService = define(IStandaloneThemeService, () => new StandaloneThemeServiceImpl()); } export class DynamicStandaloneServices extends Disposable { diff --git a/src/vs/editor/browser/services/standaloneThemeServiceImpl.ts b/src/vs/editor/standalone/browser/standaloneThemeServiceImpl.ts similarity index 90% rename from src/vs/editor/browser/services/standaloneThemeServiceImpl.ts rename to src/vs/editor/standalone/browser/standaloneThemeServiceImpl.ts index 09969e5f76853..be2163b1df411 100644 --- a/src/vs/editor/browser/services/standaloneThemeServiceImpl.ts +++ b/src/vs/editor/standalone/browser/standaloneThemeServiceImpl.ts @@ -5,14 +5,14 @@ 'use strict'; import { TokenTheme, ITokenThemeRule, generateTokensCSSForColorMap } from 'vs/editor/common/modes/supports/tokenization'; -import { IStandaloneThemeService, BuiltinTheme, IStandaloneThemeData, IStandaloneTheme, IColors } from 'vs/editor/common/services/standaloneThemeService'; -import { vs, vs_dark, hc_black } from 'vs/editor/common/standalone/themes'; +import { IStandaloneThemeService, BuiltinTheme, IStandaloneThemeData, IStandaloneTheme, IColors } from 'vs/editor/standalone/common/standaloneThemeService'; +import { vs, vs_dark, hc_black } from 'vs/editor/standalone/common/themes'; import * as dom from 'vs/base/browser/dom'; import { TokenizationRegistry } from 'vs/editor/common/modes'; import { Color } from 'vs/base/common/color'; import { Extensions, IColorRegistry, ColorIdentifier } from 'vs/platform/theme/common/colorRegistry'; import { Extensions as ThemingExtensions, IThemingRegistry, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import Event, { Emitter } from 'vs/base/common/event'; const VS_THEME_NAME = 'vs'; @@ -23,10 +23,10 @@ const colorRegistry = Registry.as(Extensions.ColorContribution); const themingRegistry = Registry.as(ThemingExtensions.ThemingContribution); class StandaloneTheme implements IStandaloneTheme { - id: string; - selector: string; + public readonly id: string; + public readonly themeName: string; private rules: ITokenThemeRule[]; - base: string; + public readonly base: string; private colors: { [colorId: string]: Color }; private defaultColors: { [colorId: string]: Color }; private _tokenTheme: TokenTheme; @@ -34,10 +34,10 @@ class StandaloneTheme implements IStandaloneTheme { constructor(base: string, name: string, colors: IColors, rules: ITokenThemeRule[]) { if (name.length > 0) { this.id = base + ' ' + name; - this.selector = base + '.' + name; + this.themeName = name; } else { this.id = base; - this.selector = base; + this.themeName = base; } this.base = base; this.rules = rules; @@ -67,13 +67,8 @@ class StandaloneTheme implements IStandaloneTheme { return color; } - public isDefault(colorId: ColorIdentifier): boolean { - if (!this.colors.hasOwnProperty(colorId)) { - return true; - } - let color = this.colors[colorId]; - let defaultValue = this.getDefault(colorId); - return color ? !!defaultValue : color.equals(defaultValue); + public defines(colorId: ColorIdentifier): boolean { + return this.colors.hasOwnProperty(colorId); } public get type() { @@ -180,8 +175,8 @@ export class StandaloneThemeServiceImpl implements IStandaloneThemeService { } this._theme = theme; - let cssRules = []; - let hasRule = {}; + let cssRules: string[] = []; + let hasRule: { [rule: string]: boolean; } = {}; let ruleCollector: ICssStyleCollector = { addRule: (rule: string) => { if (!hasRule[rule]) { diff --git a/src/vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast.ts b/src/vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast.ts new file mode 100644 index 0000000000000..17197a6f7d39d --- /dev/null +++ b/src/vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast.ts @@ -0,0 +1,38 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import * as nls from 'vs/nls'; +import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; +import { editorAction, EditorAction, ServicesAccessor } from 'vs/editor/common/editorCommonExtensions'; +import { IStandaloneThemeService } from 'vs/editor/standalone/common/standaloneThemeService'; + +@editorAction +class ToggleHighContrast extends EditorAction { + + private _originalThemeName: string; + + constructor() { + super({ + id: 'editor.action.toggleHighContrast', + label: nls.localize('toggleHighContrast', "Toggle High Contrast Theme"), + alias: 'Toggle High Contrast Theme', + precondition: null + }); + this._originalThemeName = null; + } + + public run(accessor: ServicesAccessor, editor: ICommonCodeEditor): void { + const standaloneThemeService = accessor.get(IStandaloneThemeService); + if (this._originalThemeName) { + // We must toggle back to the integrator's theme + standaloneThemeService.setTheme(this._originalThemeName); + this._originalThemeName = null; + } else { + this._originalThemeName = standaloneThemeService.getTheme().themeName; + standaloneThemeService.setTheme('hc-black'); + } + } +} diff --git a/src/vs/editor/common/modes/monarch/monarchCommon.ts b/src/vs/editor/standalone/common/monarch/monarchCommon.ts similarity index 89% rename from src/vs/editor/common/modes/monarch/monarchCommon.ts rename to src/vs/editor/standalone/common/monarch/monarchCommon.ts index fd72d1d0cad5d..070d3572d34af 100644 --- a/src/vs/editor/common/modes/monarch/monarchCommon.ts +++ b/src/vs/editor/standalone/common/monarch/monarchCommon.ts @@ -46,19 +46,37 @@ export interface IBracket { close: string; } +export type FuzzyAction = IAction | string; + +export function isFuzzyActionArr(what: FuzzyAction | FuzzyAction[]): what is FuzzyAction[] { + return (Array.isArray(what)); +} + +export function isFuzzyAction(what: FuzzyAction | FuzzyAction[]): what is FuzzyAction { + return !isFuzzyActionArr(what); +} + +export function isString(what: FuzzyAction): what is string { + return (typeof what === 'string'); +} + +export function isIAction(what: FuzzyAction): what is IAction { + return !isString(what); +} + export interface IRule { regex: RegExp; - action: IAction; + action: FuzzyAction; matchOnlyAtLineStart: boolean; name: string; } export interface IAction { // an action is either a group of actions - group?: IAction[]; + group?: FuzzyAction[]; // or a function that returns a fresh action - test?: (id: string, matches: string[], state: string, eos: boolean) => IAction; + test?: (id: string, matches: string[], state: string, eos: boolean) => FuzzyAction; // or it is a declarative action with a token value and various other attributes token?: string; @@ -74,7 +92,7 @@ export interface IAction { export interface IBranch { name: string; - value: IAction; + value: FuzzyAction; test: (id: string, matches: string[], state: string, eos: boolean) => boolean; } diff --git a/src/vs/editor/common/modes/monarch/monarchCompile.ts b/src/vs/editor/standalone/common/monarch/monarchCompile.ts similarity index 97% rename from src/vs/editor/common/modes/monarch/monarchCompile.ts rename to src/vs/editor/standalone/common/monarch/monarchCompile.ts index 7f5fc6ebf60f1..5e730680d62b5 100644 --- a/src/vs/editor/common/modes/monarch/monarchCompile.ts +++ b/src/vs/editor/standalone/common/monarch/monarchCompile.ts @@ -10,8 +10,8 @@ */ import * as objects from 'vs/base/common/objects'; -import * as monarchCommon from 'vs/editor/common/modes/monarch/monarchCommon'; -import { IMonarchLanguage, IMonarchLanguageBracket } from 'vs/editor/common/modes/monarch/monarchTypes'; +import * as monarchCommon from 'vs/editor/standalone/common/monarch/monarchCommon'; +import { IMonarchLanguage, IMonarchLanguageBracket } from 'vs/editor/standalone/common/monarch/monarchTypes'; /* * Type helpers @@ -118,7 +118,7 @@ function selectScrutinee(id: string, matches: string[], state: string, num: numb return null; } -function createGuard(lexer: monarchCommon.ILexerMin, ruleName: string, tkey: string, val: monarchCommon.IAction): monarchCommon.IBranch { +function createGuard(lexer: monarchCommon.ILexerMin, ruleName: string, tkey: string, val: monarchCommon.FuzzyAction): monarchCommon.IBranch { // get the scrutinee and pattern var scrut = -1; // -1: $!, 0-99: $n, 100+n: $Sn var oppat = tkey; @@ -222,7 +222,7 @@ function createGuard(lexer: monarchCommon.ILexerMin, ruleName: string, tkey: str * contains user functions as actions (which is usually not allowed), then this * may be called during lexing. It is important therefore to compile common cases efficiently */ -function compileAction(lexer: monarchCommon.ILexerMin, ruleName: string, action: any): monarchCommon.IAction { +function compileAction(lexer: monarchCommon.ILexerMin, ruleName: string, action: any): monarchCommon.FuzzyAction { if (!action) { return { token: '' }; } @@ -285,7 +285,7 @@ function compileAction(lexer: monarchCommon.ILexerMin, ruleName: string, action: } } else if (Array.isArray(action)) { - var results = []; + var results: monarchCommon.FuzzyAction[] = []; var idx: string; for (idx in action) { if (action.hasOwnProperty(idx)) { @@ -345,7 +345,7 @@ function compileAction(lexer: monarchCommon.ILexerMin, ruleName: string, action: */ class Rule implements monarchCommon.IRule { public regex: RegExp = new RegExp(''); - public action: monarchCommon.IAction = { token: '' }; + public action: monarchCommon.FuzzyAction = { token: '' }; public matchOnlyAtLineStart: boolean = false; public name: string = ''; diff --git a/src/vs/editor/common/modes/monarch/monarchLexer.ts b/src/vs/editor/standalone/common/monarch/monarchLexer.ts similarity index 96% rename from src/vs/editor/common/modes/monarch/monarchLexer.ts rename to src/vs/editor/standalone/common/monarch/monarchLexer.ts index fd57abca71ab9..c50d02a812982 100644 --- a/src/vs/editor/common/modes/monarch/monarchLexer.ts +++ b/src/vs/editor/standalone/common/monarch/monarchLexer.ts @@ -11,11 +11,11 @@ import { IDisposable } from 'vs/base/common/lifecycle'; import * as modes from 'vs/editor/common/modes'; -import * as monarchCommon from 'vs/editor/common/modes/monarch/monarchCommon'; +import * as monarchCommon from 'vs/editor/standalone/common/monarch/monarchCommon'; import { IModeService } from 'vs/editor/common/services/modeService'; import { Token, TokenizationResult, TokenizationResult2 } from 'vs/editor/common/core/token'; import { NULL_STATE, NULL_MODE_ID } from 'vs/editor/common/modes/nullMode'; -import { IStandaloneThemeService } from 'vs/editor/common/services/standaloneThemeService'; +import { IStandaloneThemeService } from 'vs/editor/standalone/common/standaloneThemeService'; import { TokenTheme } from 'vs/editor/common/modes/supports/tokenization'; const CACHE_STACK_DEPTH = 5; @@ -23,7 +23,7 @@ const CACHE_STACK_DEPTH = 5; /** * Reuse the same stack elements up to a certain depth. */ -export class MonarchStackElementFactory { +class MonarchStackElementFactory { private static _INSTANCE = new MonarchStackElementFactory(CACHE_STACK_DEPTH); public static create(parent: MonarchStackElement, state: string): MonarchStackElement { @@ -59,7 +59,7 @@ export class MonarchStackElementFactory { } } -export class MonarchStackElement { +class MonarchStackElement { public readonly parent: MonarchStackElement; public readonly state: string; @@ -125,7 +125,7 @@ export class MonarchStackElement { } } -export class EmbeddedModeData { +class EmbeddedModeData { public readonly modeId: string; public readonly state: modes.IState; @@ -154,7 +154,7 @@ export class EmbeddedModeData { /** * Reuse the same line states up to a certain depth. */ -export class MonarchLineStateFactory { +class MonarchLineStateFactory { private static _INSTANCE = new MonarchLineStateFactory(CACHE_STACK_DEPTH); public static create(stack: MonarchStackElement, embeddedModeData: EmbeddedModeData): MonarchLineState { @@ -190,7 +190,7 @@ export class MonarchLineStateFactory { } } -export class MonarchLineState implements modes.IState { +class MonarchLineState implements modes.IState { public readonly stack: MonarchStackElement; public readonly embeddedModeData: EmbeddedModeData; @@ -375,7 +375,7 @@ class MonarchModernTokensCollector implements IMonarchTokensCollector { } } -export class MonarchTokenizer implements modes.ITokenizationSupport { +class MonarchTokenizer implements modes.ITokenizationSupport { private readonly _modeService: IModeService; private readonly _standaloneThemeService: IStandaloneThemeService; @@ -459,7 +459,7 @@ export class MonarchTokenizer implements modes.ITokenizationSupport { continue; } let rule: monarchCommon.IRule = rules[idx]; - if (rule.action.nextEmbedded !== '@pop') { + if (monarchCommon.isIAction(rule.action) && rule.action.nextEmbedded !== '@pop') { continue; } hasEmbeddedPopRule = true; @@ -518,7 +518,7 @@ export class MonarchTokenizer implements modes.ITokenizationSupport { // regular expression group matching // these never need cloning or equality since they are only used within a line match - let groupActions: monarchCommon.IAction[] = null; + let groupActions: monarchCommon.FuzzyAction[] = null; let groupMatches: string[] = null; let groupMatched: string[] = null; let groupRule: monarchCommon.IRule = null; @@ -531,7 +531,7 @@ export class MonarchTokenizer implements modes.ITokenizationSupport { let matches: string[] = null; let matched: string = null; - let action: monarchCommon.IAction = null; + let action: monarchCommon.FuzzyAction | monarchCommon.FuzzyAction[] = null; let rule: monarchCommon.IRule = null; let enteringEmbeddedMode: string = null; @@ -604,22 +604,23 @@ export class MonarchTokenizer implements modes.ITokenizationSupport { pos += matched.length; // maybe call action function (used for 'cases') - while (action.test) { + while (monarchCommon.isFuzzyAction(action) && monarchCommon.isIAction(action) && action.test) { action = action.test(matched, matches, state, pos === lineLength); } - let result: string | monarchCommon.IAction[] = null; + let result: monarchCommon.FuzzyAction | monarchCommon.FuzzyAction[] = null; // set the result: either a string or an array of actions if (typeof action === 'string' || Array.isArray(action)) { result = action; } else if (action.group) { result = action.group; } else if (action.token !== null && action.token !== undefined) { - result = action.token; // do $n replacements? if (action.tokenSubst) { - result = monarchCommon.substituteMatches(this._lexer, result, matched, matches, state); + result = monarchCommon.substituteMatches(this._lexer, action.token, matched, matches, state); + } else { + result = action.token; } // enter embedded mode? @@ -739,7 +740,7 @@ export class MonarchTokenizer implements modes.ITokenizationSupport { // return the result (and check for brace matching) // todo: for efficiency we could pre-sanitize tokenPostfix and substitutions let tokenType: string = null; - if (result.indexOf('@brackets') === 0) { + if (monarchCommon.isString(result) && result.indexOf('@brackets') === 0) { let rest = result.substr('@brackets'.length); let bracket = findBracket(this._lexer, matched); if (!bracket) { @@ -755,7 +756,7 @@ export class MonarchTokenizer implements modes.ITokenizationSupport { tokensCollector.emit(pos0 + offsetDelta, tokenType); } - if (enteringEmbeddedMode) { + if (enteringEmbeddedMode !== null) { // substitute language alias to known modes to support syntax highlighting let enteringEmbeddedModeId = this._modeService.getModeIdForLanguageName(enteringEmbeddedMode); if (enteringEmbeddedModeId) { diff --git a/src/vs/editor/common/modes/monarch/monarchTypes.ts b/src/vs/editor/standalone/common/monarch/monarchTypes.ts similarity index 100% rename from src/vs/editor/common/modes/monarch/monarchTypes.ts rename to src/vs/editor/standalone/common/monarch/monarchTypes.ts diff --git a/src/vs/editor/common/services/standaloneThemeService.ts b/src/vs/editor/standalone/common/standaloneThemeService.ts similarity index 98% rename from src/vs/editor/common/services/standaloneThemeService.ts rename to src/vs/editor/standalone/common/standaloneThemeService.ts index 1cd8f788130e7..99e5bea92824f 100644 --- a/src/vs/editor/common/services/standaloneThemeService.ts +++ b/src/vs/editor/standalone/common/standaloneThemeService.ts @@ -22,6 +22,7 @@ export interface IStandaloneThemeData { export interface IStandaloneTheme extends ITheme { tokenTheme: TokenTheme; + themeName: string; } export interface IStandaloneThemeService extends IThemeService { diff --git a/src/vs/editor/standalone/common/themes.ts b/src/vs/editor/standalone/common/themes.ts new file mode 100644 index 0000000000000..0a51ad13ed8e3 --- /dev/null +++ b/src/vs/editor/standalone/common/themes.ts @@ -0,0 +1,210 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { IStandaloneThemeData } from 'vs/editor/standalone/common/standaloneThemeService'; +import { editorBackground, editorForeground, editorSelectionHighlight, editorInactiveSelection } from 'vs/platform/theme/common/colorRegistry'; +import { editorIndentGuides } from 'vs/editor/common/view/editorColorRegistry'; + +/* -------------------------------- Begin vs theme -------------------------------- */ +export const vs: IStandaloneThemeData = { + base: 'vs', + inherit: false, + rules: [ + { token: '', foreground: '000000', background: 'fffffe' }, + { token: 'invalid', foreground: 'cd3131' }, + { token: 'emphasis', fontStyle: 'italic' }, + { token: 'strong', fontStyle: 'bold' }, + + { token: 'variable', foreground: '001188' }, + { token: 'variable.predefined', foreground: '4864AA' }, + { token: 'constant', foreground: 'dd0000' }, + { token: 'comment', foreground: '008000' }, + { token: 'number', foreground: '09885A' }, + { token: 'number.hex', foreground: '3030c0' }, + { token: 'regexp', foreground: '800000' }, + { token: 'annotation', foreground: '808080' }, + { token: 'type', foreground: '008080' }, + + { token: 'delimiter', foreground: '000000' }, + { token: 'delimiter.html', foreground: '383838' }, + { token: 'delimiter.xml', foreground: '0000FF' }, + + { token: 'tag', foreground: '800000' }, + { token: 'tag.id.jade', foreground: '4F76AC' }, + { token: 'tag.class.jade', foreground: '4F76AC' }, + { token: 'meta.scss', foreground: '800000' }, + { token: 'metatag', foreground: 'e00000' }, + { token: 'metatag.content.html', foreground: 'FF0000' }, + { token: 'metatag.html', foreground: '808080' }, + { token: 'metatag.xml', foreground: '808080' }, + { token: 'metatag.php', fontStyle: 'bold' }, + + { token: 'key', foreground: '863B00' }, + { token: 'string.key.json', foreground: 'A31515' }, + { token: 'string.value.json', foreground: '0451A5' }, + + { token: 'attribute.name', foreground: 'FF0000' }, + { token: 'attribute.value', foreground: '0451A5' }, + { token: 'attribute.value.number', foreground: '09885A' }, + { token: 'attribute.value.unit', foreground: '09885A' }, + { token: 'attribute.value.html', foreground: '0000FF' }, + { token: 'attribute.value.xml', foreground: '0000FF' }, + + { token: 'string', foreground: 'A31515' }, + { token: 'string.html', foreground: '0000FF' }, + { token: 'string.sql', foreground: 'FF0000' }, + { token: 'string.yaml', foreground: '0451A5' }, + + { token: 'keyword', foreground: '0000FF' }, + { token: 'keyword.json', foreground: '0451A5' }, + { token: 'keyword.flow', foreground: 'AF00DB' }, + { token: 'keyword.flow.scss', foreground: '0000FF' }, + + { token: 'operator.scss', foreground: '666666' }, + { token: 'operator.sql', foreground: '778899' }, + { token: 'operator.swift', foreground: '666666' }, + { token: 'predefined.sql', foreground: 'FF00FF' }, + ], + colors: { + [editorBackground]: '#FFFFFE', + [editorForeground]: '#000000', + [editorInactiveSelection]: '#E5EBF1', + [editorIndentGuides]: '#D3D3D3', + [editorSelectionHighlight]: '#ADD6FF4D' + } +}; +/* -------------------------------- End vs theme -------------------------------- */ + + +/* -------------------------------- Begin vs-dark theme -------------------------------- */ +export const vs_dark: IStandaloneThemeData = { + base: 'vs-dark', + inherit: false, + rules: [ + { token: '', foreground: 'D4D4D4', background: '1E1E1E' }, + { token: 'invalid', foreground: 'f44747' }, + { token: 'emphasis', fontStyle: 'italic' }, + { token: 'strong', fontStyle: 'bold' }, + + { token: 'variable', foreground: '74B0DF' }, + { token: 'variable.predefined', foreground: '4864AA' }, + { token: 'variable.parameter', foreground: '9CDCFE' }, + { token: 'constant', foreground: '569CD6' }, + { token: 'comment', foreground: '608B4E' }, + { token: 'number', foreground: 'B5CEA8' }, + { token: 'number.hex', foreground: '5BB498' }, + { token: 'regexp', foreground: 'B46695' }, + { token: 'annotation', foreground: 'cc6666' }, + { token: 'type', foreground: '3DC9B0' }, + + { token: 'delimiter', foreground: 'DCDCDC' }, + { token: 'delimiter.html', foreground: '808080' }, + { token: 'delimiter.xml', foreground: '808080' }, + + { token: 'tag', foreground: '569CD6' }, + { token: 'tag.id.jade', foreground: '4F76AC' }, + { token: 'tag.class.jade', foreground: '4F76AC' }, + { token: 'meta.scss', foreground: 'A79873' }, + { token: 'meta.tag', foreground: 'CE9178' }, + { token: 'metatag', foreground: 'DD6A6F' }, + { token: 'metatag.content.html', foreground: '9CDCFE' }, + { token: 'metatag.html', foreground: '569CD6' }, + { token: 'metatag.xml', foreground: '569CD6' }, + { token: 'metatag.php', fontStyle: 'bold' }, + + { token: 'key', foreground: '9CDCFE' }, + { token: 'string.key.json', foreground: '9CDCFE' }, + { token: 'string.value.json', foreground: 'CE9178' }, + + { token: 'attribute.name', foreground: '9CDCFE' }, + { token: 'attribute.value', foreground: 'CE9178' }, + { token: 'attribute.value.number.css', foreground: 'B5CEA8' }, + { token: 'attribute.value.unit.css', foreground: 'B5CEA8' }, + { token: 'attribute.value.hex.css', foreground: 'D4D4D4' }, + + { token: 'string', foreground: 'CE9178' }, + { token: 'string.sql', foreground: 'FF0000' }, + + { token: 'keyword', foreground: '569CD6' }, + { token: 'keyword.flow', foreground: 'C586C0' }, + { token: 'keyword.json', foreground: 'CE9178' }, + { token: 'keyword.flow.scss', foreground: '569CD6' }, + + { token: 'operator.scss', foreground: '909090' }, + { token: 'operator.sql', foreground: '778899' }, + { token: 'operator.swift', foreground: '909090' }, + { token: 'predefined.sql', foreground: 'FF00FF' }, + ], + colors: { + [editorBackground]: '#1E1E1E', + [editorForeground]: '#D4D4D4', + [editorInactiveSelection]: '#3A3D41', + [editorIndentGuides]: '#404040', + [editorSelectionHighlight]: '#ADD6FF26' + } +}; +/* -------------------------------- End vs-dark theme -------------------------------- */ + + + +/* -------------------------------- Begin hc-black theme -------------------------------- */ +export const hc_black: IStandaloneThemeData = { + base: 'hc-black', + inherit: false, + rules: [ + { token: '', foreground: 'FFFFFF', background: '000000' }, + { token: 'invalid', foreground: 'f44747' }, + { token: 'emphasis', fontStyle: 'italic' }, + { token: 'strong', fontStyle: 'bold' }, + + { token: 'variable', foreground: '1AEBFF' }, + { token: 'variable.parameter', foreground: '9CDCFE' }, + { token: 'constant', foreground: '569CD6' }, + { token: 'comment', foreground: '608B4E' }, + { token: 'number', foreground: 'FFFFFF' }, + { token: 'regexp', foreground: 'C0C0C0' }, + { token: 'annotation', foreground: '569CD6' }, + { token: 'type', foreground: '3DC9B0' }, + + { token: 'delimiter', foreground: 'FFFF00' }, + { token: 'delimiter.html', foreground: 'FFFF00' }, + + { token: 'tag', foreground: '569CD6' }, + { token: 'tag.id.jade', foreground: '4F76AC' }, + { token: 'tag.class.jade', foreground: '4F76AC' }, + { token: 'meta', foreground: 'D4D4D4' }, + { token: 'meta.tag', foreground: 'CE9178' }, + { token: 'metatag', foreground: '569CD6' }, + { token: 'metatag.content.html', foreground: '1AEBFF' }, + { token: 'metatag.html', foreground: '569CD6' }, + { token: 'metatag.xml', foreground: '569CD6' }, + { token: 'metatag.php', fontStyle: 'bold' }, + + { token: 'key', foreground: '9CDCFE' }, + { token: 'string.key', foreground: '9CDCFE' }, + { token: 'string.value', foreground: 'CE9178' }, + + { token: 'attribute.name', foreground: '569CD6' }, + { token: 'attribute.value', foreground: '3FF23F' }, + + { token: 'string', foreground: 'CE9178' }, + { token: 'string.sql', foreground: 'FF0000' }, + + { token: 'keyword', foreground: '569CD6' }, + { token: 'keyword.flow', foreground: 'C586C0' }, + + { token: 'operator.sql', foreground: '778899' }, + { token: 'operator.swift', foreground: '909090' }, + { token: 'predefined.sql', foreground: 'FF00FF' }, + ], + colors: { + [editorBackground]: '#000000', + [editorForeground]: '#FFFFFF', + [editorIndentGuides]: '#FFFFFF', + } +}; +/* -------------------------------- End hc-black theme -------------------------------- */ diff --git a/src/vs/editor/test/browser/standalone/simpleServices.test.ts b/src/vs/editor/standalone/test/browser/simpleServices.test.ts similarity index 98% rename from src/vs/editor/test/browser/standalone/simpleServices.test.ts rename to src/vs/editor/standalone/test/browser/simpleServices.test.ts index 14c53c99b5e14..12aaaad282539 100644 --- a/src/vs/editor/test/browser/standalone/simpleServices.test.ts +++ b/src/vs/editor/standalone/test/browser/simpleServices.test.ts @@ -6,7 +6,7 @@ import * as assert from 'assert'; import { ContextKeyService } from 'vs/platform/contextkey/browser/contextKeyService'; -import { SimpleConfigurationService, SimpleMessageService, StandaloneKeybindingService, StandaloneCommandService } from 'vs/editor/browser/standalone/simpleServices'; +import { SimpleConfigurationService, SimpleMessageService, StandaloneKeybindingService, StandaloneCommandService } from 'vs/editor/standalone/browser/simpleServices'; import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { KeyCode } from 'vs/base/common/keyCodes'; diff --git a/src/vs/editor/standalone/test/browser/standaloneLanguages.test.ts b/src/vs/editor/standalone/test/browser/standaloneLanguages.test.ts new file mode 100644 index 0000000000000..455ce99426a51 --- /dev/null +++ b/src/vs/editor/standalone/test/browser/standaloneLanguages.test.ts @@ -0,0 +1,180 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import * as assert from 'assert'; +import { TokenizationSupport2Adapter, TokensProvider, ILineTokens, IToken } from 'vs/editor/standalone/browser/standaloneLanguages'; +import { IStandaloneThemeService, IStandaloneThemeData, IStandaloneTheme } from 'vs/editor/standalone/common/standaloneThemeService'; +import Event from 'vs/base/common/event'; +import { ITheme, LIGHT } from 'vs/platform/theme/common/themeService'; +import { LanguageIdentifier, LanguageId, IState, MetadataConsts } from 'vs/editor/common/modes'; +import { Token } from 'vs/editor/common/core/token'; +import { TokenTheme } from 'vs/editor/common/modes/supports/tokenization'; +import { ColorIdentifier } from 'vs/platform/theme/common/colorRegistry'; +import { Color } from 'vs/base/common/color'; + +suite('TokenizationSupport2Adapter', () => { + + const languageIdentifier = new LanguageIdentifier('tttt', LanguageId.PlainText); + const tokenMetadata = (languageIdentifier.id << MetadataConsts.LANGUAGEID_OFFSET); + + class MockTokenTheme extends TokenTheme { + private counter = 0; + constructor() { + super(null, null); + } + public match(languageId: LanguageId, token: string): number { + return ( + ((this.counter++) << MetadataConsts.FOREGROUND_OFFSET) + | (languageId << MetadataConsts.LANGUAGEID_OFFSET) + ) >>> 0; + } + } + + class MockThemeService implements IStandaloneThemeService { + _serviceBrand = null; + public setTheme(themeName: string): string { + throw new Error('Not implemented'); + } + public defineTheme(themeName: string, themeData: IStandaloneThemeData): void { + throw new Error('Not implemented'); + } + public getTheme(): IStandaloneTheme { + return { + tokenTheme: new MockTokenTheme(), + + themeName: LIGHT, + + type: LIGHT, + + getColor: (color: ColorIdentifier, useDefault?: boolean): Color => { + throw new Error('Not implemented'); + }, + + defines: (color: ColorIdentifier): boolean => { + throw new Error('Not implemented'); + } + }; + } + public onThemeChange: Event = null; + } + + class MockState implements IState { + public static INSTANCE = new MockState(); + private constructor() { } + public clone(): IState { + return this; + } + public equals(other: IState): boolean { + return this === other; + } + } + + function testBadTokensProvider(providerTokens: IToken[], offsetDelta: number, expectedClassicTokens: Token[], expectedModernTokens: number[]): void { + + class BadTokensProvider implements TokensProvider { + public getInitialState(): IState { + return MockState.INSTANCE; + } + public tokenize(line: string, state: IState): ILineTokens { + return { + tokens: providerTokens, + endState: MockState.INSTANCE + }; + } + } + + const adapter = new TokenizationSupport2Adapter(new MockThemeService(), languageIdentifier, new BadTokensProvider()); + + const actualClassicTokens = adapter.tokenize('whatever', MockState.INSTANCE, offsetDelta); + assert.deepEqual(actualClassicTokens.tokens, expectedClassicTokens); + + const actualModernTokens = adapter.tokenize2('whatever', MockState.INSTANCE, offsetDelta); + const modernTokens: number[] = []; + for (let i = 0; i < actualModernTokens.tokens.length; i++) { + modernTokens[i] = actualModernTokens.tokens[i]; + } + assert.deepEqual(modernTokens, expectedModernTokens); + } + + test('tokens always start at index 0 (no offset delta)', () => { + testBadTokensProvider( + [ + { startIndex: 7, scopes: 'foo' }, + { startIndex: 0, scopes: 'bar' } + ], + 0, + [ + new Token(0, 'foo', languageIdentifier.language), + new Token(0, 'bar', languageIdentifier.language), + ], + [ + 0, tokenMetadata | (0 << MetadataConsts.FOREGROUND_OFFSET), + 0, tokenMetadata | (1 << MetadataConsts.FOREGROUND_OFFSET) + ] + ); + }); + + test('tokens always start after each other (no offset delta)', () => { + testBadTokensProvider( + [ + { startIndex: 0, scopes: 'foo' }, + { startIndex: 5, scopes: 'bar' }, + { startIndex: 3, scopes: 'foo' }, + ], + 0, + [ + new Token(0, 'foo', languageIdentifier.language), + new Token(5, 'bar', languageIdentifier.language), + new Token(5, 'foo', languageIdentifier.language), + ], + [ + 0, tokenMetadata | (0 << MetadataConsts.FOREGROUND_OFFSET), + 5, tokenMetadata | (1 << MetadataConsts.FOREGROUND_OFFSET), + 5, tokenMetadata | (2 << MetadataConsts.FOREGROUND_OFFSET) + ] + ); + }); + + test('tokens always start at index 0 (with offset delta)', () => { + testBadTokensProvider( + [ + { startIndex: 7, scopes: 'foo' }, + { startIndex: 0, scopes: 'bar' } + ], + 7, + [ + new Token(7, 'foo', languageIdentifier.language), + new Token(7, 'bar', languageIdentifier.language), + ], + [ + 7, tokenMetadata | (0 << MetadataConsts.FOREGROUND_OFFSET), + 7, tokenMetadata | (1 << MetadataConsts.FOREGROUND_OFFSET) + ] + ); + }); + + test('tokens always start after each other (with offset delta)', () => { + testBadTokensProvider( + [ + { startIndex: 0, scopes: 'foo' }, + { startIndex: 5, scopes: 'bar' }, + { startIndex: 3, scopes: 'foo' }, + ], + 7, + [ + new Token(7, 'foo', languageIdentifier.language), + new Token(12, 'bar', languageIdentifier.language), + new Token(12, 'foo', languageIdentifier.language), + ], + [ + 7, tokenMetadata | (0 << MetadataConsts.FOREGROUND_OFFSET), + 12, tokenMetadata | (1 << MetadataConsts.FOREGROUND_OFFSET), + 12, tokenMetadata | (2 << MetadataConsts.FOREGROUND_OFFSET) + ] + ); + }); + +}); \ No newline at end of file diff --git a/src/vs/editor/test/browser/controller/imeTester.ts b/src/vs/editor/test/browser/controller/imeTester.ts index 456f6f0a8fddb..6f8ad840fa8e1 100644 --- a/src/vs/editor/test/browser/controller/imeTester.ts +++ b/src/vs/editor/test/browser/controller/imeTester.ts @@ -4,14 +4,12 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { TextAreaHandler } from 'vs/editor/common/controller/textAreaHandler'; -import * as browser from 'vs/base/browser/browser'; -import { TextAreaStrategy, ISimpleModel } from 'vs/editor/common/controller/textAreaState'; +import { TextAreaInput, ITextAreaInputHost } from 'vs/editor/browser/controller/textAreaInput'; +import { ISimpleModel, TextAreaState, PagedScreenReaderStrategy } from 'vs/editor/browser/controller/textAreaState'; import { Range, IRange } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; -import { TextAreaWrapper } from 'vs/editor/browser/controller/input/textAreaWrapper'; -import { Position } from 'vs/editor/common/core/position'; import { createFastDomNode } from 'vs/base/browser/fastDomNode'; +import * as browser from 'vs/base/browser/browser'; // To run this test, open imeTester.html @@ -20,18 +18,12 @@ class SingleLineTestModel implements ISimpleModel { private _line: string; private _eol: string; - public coordinatesConverter = { - convertViewPositionToModelPosition: (viewPosition: Position): Position => { - return viewPosition; - } - }; - constructor(line: string) { this._line = line; this._eol = '\n'; } - setText(text: string) { + _setText(text: string) { this._line = text; } @@ -39,10 +31,6 @@ class SingleLineTestModel implements ISimpleModel { return this._line.length + 1; } - getEOL(): string { - return this._eol; - } - getValueInRange(range: IRange, eol: editorCommon.EndOfLinePreference): string { return this._line.substring(range.startColumn - 1, range.endColumn - 1); } @@ -54,14 +42,6 @@ class SingleLineTestModel implements ISimpleModel { getLineCount(): number { return 1; } - - public getPlainTextToCopy(ranges: Range[], enableEmptySelectionClipboard: boolean): string { - return ''; - } - - public getHTMLToCopy(ranges: Range[], enableEmptySelectionClipboard: boolean): string { - return ''; - } } class TestView { @@ -82,13 +62,17 @@ class TestView { } } -function doCreateTest(strategy: TextAreaStrategy, description: string, inputStr: string, expectedStr: string): HTMLElement { +function doCreateTest(description: string, inputStr: string, expectedStr: string): HTMLElement { + let cursorOffset: number = 0; + let cursorLength: number = 0; + let container = document.createElement('div'); container.className = 'container'; let title = document.createElement('div'); title.className = 'title'; - title.innerHTML = TextAreaStrategy[strategy] + ' strategy: ' + description + '. Type ' + inputStr + ''; + + title.innerHTML = description + '. Type ' + inputStr + ''; container.appendChild(title); let startBtn = document.createElement('button'); @@ -101,19 +85,26 @@ function doCreateTest(strategy: TextAreaStrategy, description: string, inputStr: input.setAttribute('cols', '40'); container.appendChild(input); - let textAreaWrapper = new TextAreaWrapper(createFastDomNode(input)); - let model = new SingleLineTestModel('some text'); - let handler = new TextAreaHandler(browser, strategy, textAreaWrapper, model); + const textAreaInputHost: ITextAreaInputHost = { + getPlainTextToCopy: (): string => '', + getHTMLToCopy: (): string => '', + getScreenReaderContent: (currentState: TextAreaState): TextAreaState => { - input.onfocus = () => { - handler.setHasFocus(true); - }; - input.onblur = () => { - handler.setHasFocus(false); + if (browser.isIPad) { + // Do not place anything in the textarea for the iPad + return TextAreaState.EMPTY; + } + + const selection = new Range(1, 1 + cursorOffset, 1, 1 + cursorOffset + cursorLength); + + return PagedScreenReaderStrategy.fromEditorSelection(currentState, model, selection); + } }; + let handler = new TextAreaInput(textAreaInputHost, createFastDomNode(input)); + let output = document.createElement('pre'); output.className = 'output'; container.appendChild(output); @@ -128,18 +119,15 @@ function doCreateTest(strategy: TextAreaStrategy, description: string, inputStr: let view = new TestView(model); - - let cursorOffset: number; - let cursorLength: number; let updatePosition = (off: number, len: number) => { cursorOffset = off; cursorLength = len; - handler.setCursorSelections(new Range(1, 1 + cursorOffset, 1, 1 + cursorOffset + cursorLength), []); + handler.writeScreenReaderContent('selection changed'); handler.focusTextArea(); }; let updateModelAndPosition = (text: string, off: number, len: number) => { - model.setText(text); + model._setText(text); updatePosition(off, len); view.paint(output); @@ -187,6 +175,5 @@ const TESTS = [ ]; TESTS.forEach((t) => { - document.body.appendChild(doCreateTest(TextAreaStrategy.NVDA, t.description, t.in, t.out)); - document.body.appendChild(doCreateTest(TextAreaStrategy.IENarrator, t.description, t.in, t.out)); -}); \ No newline at end of file + document.body.appendChild(doCreateTest(t.description, t.in, t.out)); +}); diff --git a/src/vs/editor/test/browser/controller/textAreaState.test.ts b/src/vs/editor/test/browser/controller/textAreaState.test.ts new file mode 100644 index 0000000000000..59552e7542e2b --- /dev/null +++ b/src/vs/editor/test/browser/controller/textAreaState.test.ts @@ -0,0 +1,638 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import * as assert from 'assert'; +import { ISimpleModel, TextAreaState, ITextAreaWrapper, PagedScreenReaderStrategy } from 'vs/editor/browser/controller/textAreaState'; +import { Range } from 'vs/editor/common/core/range'; +import { EndOfLinePreference } from 'vs/editor/common/editorCommon'; +import { Disposable } from 'vs/base/common/lifecycle'; +import { Model } from 'vs/editor/common/model/model'; +import { Selection } from 'vs/editor/common/core/selection'; + +export class MockTextAreaWrapper extends Disposable implements ITextAreaWrapper { + + public _value: string; + public _selectionStart: number; + public _selectionEnd: number; + + constructor() { + super(); + this._value = ''; + this._selectionStart = 0; + this._selectionEnd = 0; + } + + public getValue(): string { + return this._value; + } + + public setValue(reason: string, value: string): void { + this._value = value; + this._selectionStart = this._value.length; + this._selectionEnd = this._value.length; + } + + public getSelectionStart(): number { + return this._selectionStart; + } + + public getSelectionEnd(): number { + return this._selectionEnd; + } + + public setSelectionRange(reason: string, selectionStart: number, selectionEnd: number): void { + if (selectionStart < 0) { + selectionStart = 0; + } + if (selectionStart > this._value.length) { + selectionStart = this._value.length; + } + if (selectionEnd < 0) { + selectionEnd = 0; + } + if (selectionEnd > this._value.length) { + selectionEnd = this._value.length; + } + this._selectionStart = selectionStart; + this._selectionEnd = selectionEnd; + } +} + +suite('TextAreaState', () => { + + function assertTextAreaState(actual: TextAreaState, value: string, selectionStart: number, selectionEnd: number): void { + let desired = new TextAreaState(value, selectionStart, selectionEnd); + assert.ok(desired.equals(actual), desired.toString() + ' == ' + actual.toString()); + } + + test('fromTextArea', () => { + let textArea = new MockTextAreaWrapper(); + textArea._value = 'Hello world!'; + textArea._selectionStart = 1; + textArea._selectionEnd = 12; + let actual = TextAreaState.EMPTY.readFromTextArea(textArea); + + assertTextAreaState(actual, 'Hello world!', 1, 12); + assert.equal(actual.value, 'Hello world!'); + assert.equal(actual.selectionStart, 1); + + actual = actual.collapseSelection(); + assertTextAreaState(actual, 'Hello world!', 12, 12); + + textArea.dispose(); + }); + + test('applyToTextArea', () => { + let textArea = new MockTextAreaWrapper(); + textArea._value = 'Hello world!'; + textArea._selectionStart = 1; + textArea._selectionEnd = 12; + + let state = new TextAreaState('Hi world!', 2, 2); + state.writeToTextArea('test', textArea, false); + + assert.equal(textArea._value, 'Hi world!'); + assert.equal(textArea._selectionStart, 9); + assert.equal(textArea._selectionEnd, 9); + + state = new TextAreaState('Hi world!', 3, 3); + state.writeToTextArea('test', textArea, false); + + assert.equal(textArea._value, 'Hi world!'); + assert.equal(textArea._selectionStart, 9); + assert.equal(textArea._selectionEnd, 9); + + state = new TextAreaState('Hi world!', 0, 2); + state.writeToTextArea('test', textArea, true); + + assert.equal(textArea._value, 'Hi world!'); + assert.equal(textArea._selectionStart, 0); + assert.equal(textArea._selectionEnd, 2); + + textArea.dispose(); + }); + + function testDeduceInput(prevState: TextAreaState, value: string, selectionStart: number, selectionEnd: number, expected: string, expectedCharReplaceCnt: number): void { + prevState = prevState || TextAreaState.EMPTY; + + let textArea = new MockTextAreaWrapper(); + textArea._value = value; + textArea._selectionStart = selectionStart; + textArea._selectionEnd = selectionEnd; + + let newState = prevState.readFromTextArea(textArea); + let actual = TextAreaState.deduceInput(prevState, newState, true); + + assert.equal(actual.text, expected); + assert.equal(actual.replaceCharCnt, expectedCharReplaceCnt); + + textArea.dispose(); + } + + test('deduceInput - Japanese typing sennsei and accepting', () => { + // manual test: + // - choose keyboard layout: Japanese -> Hiragama + // - type sennsei + // - accept with Enter + // - expected: せんせい + + // s + // PREVIOUS STATE: [ <>, selectionStart: 0, selectionEnd: 0, selectionToken: 0] + // CURRENT STATE: [ <s>, selectionStart: 0, selectionEnd: 1, selectionToken: 0] + testDeduceInput( + TextAreaState.EMPTY, + 's', + 0, 1, + 's', 0 + ); + + // e + // PREVIOUS STATE: [ <s>, selectionStart: 0, selectionEnd: 1, selectionToken: 0] + // CURRENT STATE: [ <せ>, selectionStart: 0, selectionEnd: 1, selectionToken: 0] + testDeduceInput( + new TextAreaState('s', 0, 1), + 'せ', + 0, 1, + 'せ', 1 + ); + + // n + // PREVIOUS STATE: [ <せ>, selectionStart: 0, selectionEnd: 1, selectionToken: 0] + // CURRENT STATE: [ <せn>, selectionStart: 0, selectionEnd: 2, selectionToken: 0] + testDeduceInput( + new TextAreaState('せ', 0, 1), + 'せn', + 0, 2, + 'せn', 1 + ); + + // n + // PREVIOUS STATE: [ <せn>, selectionStart: 0, selectionEnd: 2, selectionToken: 0] + // CURRENT STATE: [ <せん>, selectionStart: 0, selectionEnd: 2, selectionToken: 0] + testDeduceInput( + new TextAreaState('せn', 0, 2), + 'せん', + 0, 2, + 'せん', 2 + ); + + // s + // PREVIOUS STATE: [ <せん>, selectionStart: 0, selectionEnd: 2, selectionToken: 0] + // CURRENT STATE: [ <せんs>, selectionStart: 0, selectionEnd: 3, selectionToken: 0] + testDeduceInput( + new TextAreaState('せん', 0, 2), + 'せんs', + 0, 3, + 'せんs', 2 + ); + + // e + // PREVIOUS STATE: [ <せんs>, selectionStart: 0, selectionEnd: 3, selectionToken: 0] + // CURRENT STATE: [ <せんせ>, selectionStart: 0, selectionEnd: 3, selectionToken: 0] + testDeduceInput( + new TextAreaState('せんs', 0, 3), + 'せんせ', + 0, 3, + 'せんせ', 3 + ); + + // no-op? [was recorded] + // PREVIOUS STATE: [ <せんせ>, selectionStart: 0, selectionEnd: 3, selectionToken: 0] + // CURRENT STATE: [ <せんせ>, selectionStart: 0, selectionEnd: 3, selectionToken: 0] + testDeduceInput( + new TextAreaState('せんせ', 0, 3), + 'せんせ', + 0, 3, + 'せんせ', 3 + ); + + // i + // PREVIOUS STATE: [ <せんせ>, selectionStart: 0, selectionEnd: 3, selectionToken: 0] + // CURRENT STATE: [ <せんせい>, selectionStart: 0, selectionEnd: 4, selectionToken: 0] + testDeduceInput( + new TextAreaState('せんせ', 0, 3), + 'せんせい', + 0, 4, + 'せんせい', 3 + ); + + // ENTER (accept) + // PREVIOUS STATE: [ <せんせい>, selectionStart: 0, selectionEnd: 4, selectionToken: 0] + // CURRENT STATE: [ <せんせい>, selectionStart: 4, selectionEnd: 4, selectionToken: 0] + testDeduceInput( + new TextAreaState('せんせい', 0, 4), + 'せんせい', + 4, 4, + '', 0 + ); + }); + + test('deduceInput - Japanese typing sennsei and choosing different suggestion', () => { + // manual test: + // - choose keyboard layout: Japanese -> Hiragama + // - type sennsei + // - arrow down (choose next suggestion) + // - accept with Enter + // - expected: せんせい + + // sennsei + // PREVIOUS STATE: [ <せんせい>, selectionStart: 0, selectionEnd: 4, selectionToken: 0] + // CURRENT STATE: [ <せんせい>, selectionStart: 0, selectionEnd: 4, selectionToken: 0] + testDeduceInput( + new TextAreaState('せんせい', 0, 4), + 'せんせい', + 0, 4, + 'せんせい', 4 + ); + + // arrow down + // CURRENT STATE: [ <先生>, selectionStart: 0, selectionEnd: 2, selectionToken: 0] + // PREVIOUS STATE: [ <せんせい>, selectionStart: 0, selectionEnd: 4, selectionToken: 0] + testDeduceInput( + new TextAreaState('せんせい', 0, 4), + '先生', + 0, 2, + '先生', 4 + ); + + // ENTER (accept) + // PREVIOUS STATE: [ <先生>, selectionStart: 0, selectionEnd: 2, selectionToken: 0] + // CURRENT STATE: [ <先生>, selectionStart: 2, selectionEnd: 2, selectionToken: 0] + testDeduceInput( + new TextAreaState('先生', 0, 2), + '先生', + 2, 2, + '', 0 + ); + }); + + test('extractNewText - no previous state with selection', () => { + testDeduceInput( + null, + 'a', + 0, 1, + 'a', 0 + ); + }); + + test('issue #2586: Replacing selected end-of-line with newline locks up the document', () => { + testDeduceInput( + new TextAreaState(']\n', 1, 2), + ']\n', + 2, 2, + '\n', 0 + ); + }); + + test('extractNewText - no previous state without selection', () => { + testDeduceInput( + null, + 'a', + 1, 1, + 'a', 0 + ); + }); + + test('extractNewText - typing does not cause a selection', () => { + testDeduceInput( + TextAreaState.EMPTY, + 'a', + 0, 1, + 'a', 0 + ); + }); + + test('extractNewText - had the textarea empty', () => { + testDeduceInput( + TextAreaState.EMPTY, + 'a', + 1, 1, + 'a', 0 + ); + }); + + test('extractNewText - had the entire line selected', () => { + testDeduceInput( + new TextAreaState('Hello world!', 0, 12), + 'H', + 1, 1, + 'H', 0 + ); + }); + + test('extractNewText - had previous text 1', () => { + testDeduceInput( + new TextAreaState('Hello world!', 12, 12), + 'Hello world!a', + 13, 13, + 'a', 0 + ); + }); + + test('extractNewText - had previous text 2', () => { + testDeduceInput( + new TextAreaState('Hello world!', 0, 0), + 'aHello world!', + 1, 1, + 'a', 0 + ); + }); + + test('extractNewText - had previous text 3', () => { + testDeduceInput( + new TextAreaState('Hello world!', 6, 11), + 'Hello other!', + 11, 11, + 'other', 0 + ); + }); + + test('extractNewText - IME', () => { + testDeduceInput( + TextAreaState.EMPTY, + 'これは', + 3, 3, + 'これは', 0 + ); + }); + + test('extractNewText - isInOverwriteMode', () => { + testDeduceInput( + new TextAreaState('Hello world!', 0, 0), + 'Aello world!', + 1, 1, + 'A', 0 + ); + }); + + test('extractMacReplacedText - does nothing if there is selection', () => { + testDeduceInput( + new TextAreaState('Hello world!', 5, 5), + 'Hellö world!', + 4, 5, + 'ö', 0 + ); + }); + + test('extractMacReplacedText - does nothing if there is more than one extra char', () => { + testDeduceInput( + new TextAreaState('Hello world!', 5, 5), + 'Hellöö world!', + 5, 5, + 'öö', 1 + ); + }); + + test('extractMacReplacedText - does nothing if there is more than one changed char', () => { + testDeduceInput( + new TextAreaState('Hello world!', 5, 5), + 'Helöö world!', + 5, 5, + 'öö', 2 + ); + }); + + test('extractMacReplacedText', () => { + testDeduceInput( + new TextAreaState('Hello world!', 5, 5), + 'Hellö world!', + 5, 5, + 'ö', 1 + ); + }); + + test('issue #25101 - First key press ignored', () => { + testDeduceInput( + new TextAreaState('a', 0, 1), + 'a', + 1, 1, + 'a', 0 + ); + }); + + test('issue #16520 - Cmd-d of single character followed by typing same character as has no effect', () => { + testDeduceInput( + new TextAreaState('x x', 0, 1), + 'x x', + 1, 1, + 'x', 0 + ); + }); + + test('issue #4271 (example 1) - When inserting an emoji on OSX, it is placed two spaces left of the cursor', () => { + // The OSX emoji inserter inserts emojis at random positions in the text, unrelated to where the cursor is. + testDeduceInput( + new TextAreaState( + [ + 'some1 text', + 'some2 text', + 'some3 text', + 'some4 text', // cursor is here in the middle of the two spaces + 'some5 text', + 'some6 text', + 'some7 text' + ].join('\n'), + 42, 42 + ), + [ + 'so📅me1 text', + 'some2 text', + 'some3 text', + 'some4 text', + 'some5 text', + 'some6 text', + 'some7 text' + ].join('\n'), + 4, 4, + '📅', 0 + ); + }); + + test('issue #4271 (example 2) - When inserting an emoji on OSX, it is placed two spaces left of the cursor', () => { + // The OSX emoji inserter inserts emojis at random positions in the text, unrelated to where the cursor is. + testDeduceInput( + new TextAreaState( + 'some1 text', + 6, 6 + ), + 'some💊1 text', + 6, 6, + '💊', 0 + ); + }); + + test('issue #4271 (example 3) - When inserting an emoji on OSX, it is placed two spaces left of the cursor', () => { + // The OSX emoji inserter inserts emojis at random positions in the text, unrelated to where the cursor is. + testDeduceInput( + new TextAreaState( + 'qwertyu\nasdfghj\nzxcvbnm', + 12, 12 + ), + 'qwertyu\nasdfghj\nzxcvbnm🎈', + 25, 25, + '🎈', 0 + ); + }); + + // an example of an emoji missed by the regex but which has the FE0F variant 16 hint + test('issue #4271 (example 4) - When inserting an emoji on OSX, it is placed two spaces left of the cursor', () => { + // The OSX emoji inserter inserts emojis at random positions in the text, unrelated to where the cursor is. + testDeduceInput( + new TextAreaState( + 'some1 text', + 6, 6 + ), + 'some⌨️1 text', + 6, 6, + '⌨️', 0 + ); + }); + + suite('PagedScreenReaderStrategy', () => { + + function testPagedScreenReaderStrategy(lines: string[], selection: Selection, expected: TextAreaState): void { + const model = Model.createFromString(lines.join('\n')); + const actual = PagedScreenReaderStrategy.fromEditorSelection(TextAreaState.EMPTY, model, selection); + assert.ok(actual.equals(expected)); + model.dispose(); + } + + test('simple', () => { + testPagedScreenReaderStrategy( + [ + 'Hello world!' + ], + new Selection(1, 13, 1, 13), + new TextAreaState('Hello world!', 12, 12) + ); + + testPagedScreenReaderStrategy( + [ + 'Hello world!' + ], + new Selection(1, 1, 1, 1), + new TextAreaState('Hello world!', 0, 0) + ); + + testPagedScreenReaderStrategy( + [ + 'Hello world!' + ], + new Selection(1, 1, 1, 6), + new TextAreaState('Hello world!', 0, 5) + ); + }); + + test('multiline', () => { + testPagedScreenReaderStrategy( + [ + 'Hello world!', + 'How are you?' + ], + new Selection(1, 1, 1, 1), + new TextAreaState('Hello world!\nHow are you?', 0, 0) + ); + + testPagedScreenReaderStrategy( + [ + 'Hello world!', + 'How are you?' + ], + new Selection(2, 1, 2, 1), + new TextAreaState('Hello world!\nHow are you?', 13, 13) + ); + }); + + test('page', () => { + testPagedScreenReaderStrategy( + [ + 'L1\nL2\nL3\nL4\nL5\nL6\nL7\nL8\nL9\nL10\nL11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20\nL21' + ], + new Selection(1, 1, 1, 1), + new TextAreaState('L1\nL2\nL3\nL4\nL5\nL6\nL7\nL8\nL9\nL10\n', 0, 0) + ); + + testPagedScreenReaderStrategy( + [ + 'L1\nL2\nL3\nL4\nL5\nL6\nL7\nL8\nL9\nL10\nL11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20\nL21' + ], + new Selection(11, 1, 11, 1), + new TextAreaState('L11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20\n', 0, 0) + ); + + testPagedScreenReaderStrategy( + [ + 'L1\nL2\nL3\nL4\nL5\nL6\nL7\nL8\nL9\nL10\nL11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20\nL21' + ], + new Selection(12, 1, 12, 1), + new TextAreaState('L11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20\n', 4, 4) + ); + + testPagedScreenReaderStrategy( + [ + 'L1\nL2\nL3\nL4\nL5\nL6\nL7\nL8\nL9\nL10\nL11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20\nL21' + ], + new Selection(21, 1, 21, 1), + new TextAreaState('L21', 0, 0) + ); + }); + + }); +}); + +class SimpleModel implements ISimpleModel { + + private _lines: string[]; + private _eol: string; + + constructor(lines: string[], eol: string) { + this._lines = lines; + this._eol = eol; + } + + public getLineMaxColumn(lineNumber: number): number { + return this._lines[lineNumber - 1].length + 1; + } + + private _getEndOfLine(eol: EndOfLinePreference): string { + switch (eol) { + case EndOfLinePreference.LF: + return '\n'; + case EndOfLinePreference.CRLF: + return '\r\n'; + case EndOfLinePreference.TextDefined: + return this._eol; + } + throw new Error('Unknown EOL preference'); + } + + public getValueInRange(range: Range, eol: EndOfLinePreference): string { + if (Range.isEmpty(range)) { + return ''; + } + + if (range.startLineNumber === range.endLineNumber) { + return this._lines[range.startLineNumber - 1].substring(range.startColumn - 1, range.endColumn - 1); + } + + var lineEnding = this._getEndOfLine(eol), + startLineIndex = range.startLineNumber - 1, + endLineIndex = range.endLineNumber - 1, + resultLines: string[] = []; + + resultLines.push(this._lines[startLineIndex].substring(range.startColumn - 1)); + for (var i = startLineIndex + 1; i < endLineIndex; i++) { + resultLines.push(this._lines[i]); + } + resultLines.push(this._lines[endLineIndex].substring(0, range.endColumn - 1)); + + return resultLines.join(lineEnding); + } + + public getLineCount(): number { + return this._lines.length; + } +} diff --git a/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts b/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts index 2b904a5dd3f67..4fcacb9e40466 100644 --- a/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts +++ b/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts @@ -9,8 +9,11 @@ import URI from 'vs/base/common/uri'; import * as dom from 'vs/base/browser/dom'; import { CodeEditorServiceImpl } from 'vs/editor/browser/services/codeEditorServiceImpl'; import { IDecorationRenderOptions } from 'vs/editor/common/editorCommon'; +import { TestTheme, TestThemeService } from 'vs/platform/theme/test/common/testThemeService'; -suite('Browser Services - EditorLayoutProvider', () => { +const themeServiceMock = new TestThemeService(); + +suite('Decoration Render Options', () => { var options: IDecorationRenderOptions = { gutterIconPath: URI.parse('https://github.com/Microsoft/vscode/blob/master/resources/linux/code.png'), gutterIconSize: 'contain', @@ -18,12 +21,12 @@ suite('Browser Services - EditorLayoutProvider', () => { borderColor: 'yellow' }; test('register and resolve decoration type', () => { - var s = new CodeEditorServiceImpl(); + var s = new CodeEditorServiceImpl(themeServiceMock); s.registerDecorationType('example', options); assert.notEqual(s.resolveDecorationOptions('example', false), undefined); }); test('remove decoration type', () => { - var s = new CodeEditorServiceImpl(); + var s = new CodeEditorServiceImpl(themeServiceMock); s.registerDecorationType('example', options); assert.notEqual(s.resolveDecorationOptions('example', false), undefined); s.removeDecorationType('example'); @@ -32,14 +35,14 @@ suite('Browser Services - EditorLayoutProvider', () => { function readStyleSheet(styleSheet: HTMLStyleElement): string { if ((styleSheet.sheet).rules) { - return Array.prototype.map.call((styleSheet.sheet).rules, r => r.cssText).join('\n'); + return Array.prototype.map.call((styleSheet.sheet).rules, (r: { cssText: string }) => r.cssText).join('\n'); } return styleSheet.sheet.toString(); } test('css properties', () => { var styleSheet = dom.createStyleSheet(); - var s = new CodeEditorServiceImpl(styleSheet); + var s = new CodeEditorServiceImpl(themeServiceMock, styleSheet); s.registerDecorationType('example', options); var sheet = readStyleSheet(styleSheet); assert( @@ -50,11 +53,76 @@ suite('Browser Services - EditorLayoutProvider', () => { assert(sheet.indexOf('background-color: red;') > 0); }); + test('theme color', () => { + var options: IDecorationRenderOptions = { + backgroundColor: { id: 'editorBackground' }, + borderColor: { id: 'editorBorder' }, + }; + var colors: { [key: string]: string } = { + editorBackground: '#FF0000' + }; + + var styleSheet = dom.createStyleSheet(); + let themeService = new TestThemeService(new TestTheme(colors)); + var s = new CodeEditorServiceImpl(themeService, styleSheet); + s.registerDecorationType('example', options); + var sheet = readStyleSheet(styleSheet); + assert.equal(sheet, '.monaco-editor .ced-example-0 { background-color: rgb(255, 0, 0); border-color: transparent; box-sizing: border-box; }'); + + colors = { + editorBackground: '#EE0000', + editorBorder: '#00FFFF' + }; + themeService.setTheme(new TestTheme(colors)); + sheet = readStyleSheet(styleSheet); + assert.equal(sheet, '.monaco-editor .ced-example-0 { background-color: rgb(238, 0, 0); border-color: rgb(0, 255, 255); box-sizing: border-box; }'); + + s.removeDecorationType('example'); + sheet = readStyleSheet(styleSheet); + assert.equal(sheet, ''); + + }); + + test('theme overrides', () => { + var options: IDecorationRenderOptions = { + color: { id: 'editorBackground' }, + light: { + color: '#FF00FF' + }, + dark: { + color: '#000000', + after: { + color: { id: 'infoForeground' } + } + } + }; + var colors: { [key: string]: string } = { + editorBackground: '#FF0000', + infoForeground: '#444444' + }; + + var styleSheet = dom.createStyleSheet(); + let themeService = new TestThemeService(new TestTheme(colors)); + var s = new CodeEditorServiceImpl(themeService, styleSheet); + s.registerDecorationType('example', options); + var sheet = readStyleSheet(styleSheet); + let expected = + '.vs-dark.monaco-editor .ced-example-4::after, .hc-black.monaco-editor .ced-example-4::after { color: rgb(68, 68, 68) !important; }\n' + + '.vs-dark.monaco-editor .ced-example-1, .hc-black.monaco-editor .ced-example-1 { color: rgb(0, 0, 0) !important; }\n' + + '.vs.monaco-editor .ced-example-1 { color: rgb(255, 0, 255) !important; }\n' + + '.monaco-editor .ced-example-1 { color: rgb(255, 0, 0) !important; }'; + assert.equal(sheet, expected); + + s.removeDecorationType('example'); + sheet = readStyleSheet(styleSheet); + assert.equal(sheet, ''); + }); + test('css properties, gutterIconPaths', () => { var styleSheet = dom.createStyleSheet(); // unix file path (used as string) - var s = new CodeEditorServiceImpl(styleSheet); + var s = new CodeEditorServiceImpl(themeServiceMock, styleSheet); s.registerDecorationType('example', { gutterIconPath: '/Users/foo/bar.png' }); var sheet = readStyleSheet(styleSheet);//.innerHTML || styleSheet.sheet.toString(); assert( @@ -63,7 +131,7 @@ suite('Browser Services - EditorLayoutProvider', () => { ); // windows file path (used as string) - s = new CodeEditorServiceImpl(styleSheet); + s = new CodeEditorServiceImpl(themeServiceMock, styleSheet); s.registerDecorationType('example', { gutterIconPath: 'c:\\files\\miles\\more.png' }); sheet = readStyleSheet(styleSheet); // TODO@Alex test fails @@ -73,7 +141,7 @@ suite('Browser Services - EditorLayoutProvider', () => { // ); // URI, only minimal encoding - s = new CodeEditorServiceImpl(styleSheet); + s = new CodeEditorServiceImpl(themeServiceMock, styleSheet); s.registerDecorationType('example', { gutterIconPath: URI.parse('data:image/svg+xml;base64,PHN2ZyB4b+') }); sheet = readStyleSheet(styleSheet); assert( @@ -82,7 +150,7 @@ suite('Browser Services - EditorLayoutProvider', () => { ); // single quote must always be escaped/encoded - s = new CodeEditorServiceImpl(styleSheet); + s = new CodeEditorServiceImpl(themeServiceMock, styleSheet); s.registerDecorationType('example', { gutterIconPath: '/Users/foo/b\'ar.png' }); sheet = readStyleSheet(styleSheet); assert( @@ -90,7 +158,7 @@ suite('Browser Services - EditorLayoutProvider', () => { || sheet.indexOf('background: url("file:///Users/foo/b%27ar.png") center center no-repeat;') > 0 ); - s = new CodeEditorServiceImpl(styleSheet); + s = new CodeEditorServiceImpl(themeServiceMock, styleSheet); s.registerDecorationType('example', { gutterIconPath: URI.parse('http://test/pa\'th') }); sheet = readStyleSheet(styleSheet); assert( diff --git a/src/vs/editor/test/browser/view/viewLayer.test.ts b/src/vs/editor/test/browser/view/viewLayer.test.ts index 51344c85c73f7..a71138fc3b731 100644 --- a/src/vs/editor/test/browser/view/viewLayer.test.ts +++ b/src/vs/editor/test/browser/view/viewLayer.test.ts @@ -51,7 +51,7 @@ suite('RenderedLinesCollection onLinesDeleted', () => { new TestLine('old9') ]); let actualDeleted1 = col.onLinesDeleted(deleteFromLineNumber, deleteToLineNumber); - let actualDeleted = []; + let actualDeleted: string[] = []; if (actualDeleted1) { actualDeleted = actualDeleted1.map(line => line.id); } @@ -407,7 +407,7 @@ suite('RenderedLinesCollection onLinesInserted', () => { new TestLine('old9') ]); let actualDeleted1 = col.onLinesInserted(insertFromLineNumber, insertToLineNumber); - let actualDeleted = []; + let actualDeleted: string[] = []; if (actualDeleted1) { actualDeleted = actualDeleted1.map(line => line.id); } diff --git a/src/vs/editor/test/common/commands/commandTestUtils.ts b/src/vs/editor/test/common/commands/commandTestUtils.ts index 94d078b007379..184f5e8d99b84 100644 --- a/src/vs/editor/test/common/commands/commandTestUtils.ts +++ b/src/vs/editor/test/common/commands/commandTestUtils.ts @@ -5,14 +5,12 @@ 'use strict'; import * as assert from 'assert'; -import { Cursor } from 'vs/editor/common/controller/cursor'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { Model } from 'vs/editor/common/model/model'; import { LanguageIdentifier } from 'vs/editor/common/modes'; -import { TestConfiguration } from 'vs/editor/test/common/mocks/testConfiguration'; -import { viewModelHelper } from 'vs/editor/test/common/editorTestUtils'; +import { withMockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; export function testCommand( lines: string[], @@ -22,22 +20,19 @@ export function testCommand( expectedLines: string[], expectedSelection: Selection ): void { - let model = Model.createFromString(lines.join('\n'), undefined, languageIdentifier); - let config = new TestConfiguration(null); - let cursor = new Cursor(config, model, viewModelHelper(model), false); + withMockCodeEditor(null, { model: model }, (editor, cursor) => { - cursor.setSelections('tests', [selection]); + cursor.setSelections('tests', [selection]); - cursor.trigger('tests', editorCommon.Handler.ExecuteCommand, commandFactory(cursor.getSelection())); + cursor.trigger('tests', editorCommon.Handler.ExecuteCommand, commandFactory(cursor.getSelection())); - assert.deepEqual(model.getLinesContent(), expectedLines); + assert.deepEqual(model.getLinesContent(), expectedLines); - let actualSelection = cursor.getSelection(); - assert.deepEqual(actualSelection.toString(), expectedSelection.toString()); + let actualSelection = cursor.getSelection(); + assert.deepEqual(actualSelection.toString(), expectedSelection.toString()); - cursor.dispose(); - config.dispose(); + }); model.dispose(); } @@ -56,6 +51,16 @@ export function getEditOperation(model: editorCommon.IModel, command: editorComm }); }, + addTrackedEditOperation: (range: Range, text: string) => { + operations.push({ + identifier: null, + range: range, + text: text, + forceMoveMarkers: false + }); + }, + + trackSelection: (selection: Selection) => { return null; } diff --git a/src/vs/editor/test/common/commands/shiftCommand.test.ts b/src/vs/editor/test/common/commands/shiftCommand.test.ts index 0ea6691e168ad..5a2b2ad63750f 100644 --- a/src/vs/editor/test/common/commands/shiftCommand.test.ts +++ b/src/vs/editor/test/common/commands/shiftCommand.test.ts @@ -107,7 +107,7 @@ suite('Editor Commands - ShiftCommand', () => { '', '123' ], - new Selection(1, 2, 1, 2) + new Selection(1, 1, 1, 2) ); }); @@ -130,7 +130,7 @@ suite('Editor Commands - ShiftCommand', () => { '', '123' ], - new Selection(1, 4, 1, 2) + new Selection(1, 4, 1, 1) ); }); @@ -153,7 +153,7 @@ suite('Editor Commands - ShiftCommand', () => { '', '123' ], - new Selection(1, 2, 1, 4) + new Selection(1, 1, 1, 4) ); }); @@ -176,7 +176,7 @@ suite('Editor Commands - ShiftCommand', () => { '', '123' ], - new Selection(1, 2, 2, 1) + new Selection(1, 1, 2, 1) ); }); @@ -199,7 +199,7 @@ suite('Editor Commands - ShiftCommand', () => { '', '123' ], - new Selection(1, 2, 2, 1) + new Selection(1, 1, 2, 1) ); testShiftCommand( @@ -312,7 +312,7 @@ suite('Editor Commands - ShiftCommand', () => { '', '\t123' ], - new Selection(1, 2, 5, 3) + new Selection(1, 1, 5, 3) ); testShiftCommand( @@ -333,7 +333,7 @@ suite('Editor Commands - ShiftCommand', () => { '\t', '123' ], - new Selection(4, 2, 5, 1) + new Selection(4, 1, 5, 1) ); }); @@ -538,7 +538,7 @@ suite('Editor Commands - ShiftCommand', () => { '', '\t123' ], - new Selection(1, 2, 5, 5) + new Selection(1, 1, 5, 5) ); }); @@ -703,7 +703,7 @@ suite('Editor Commands - ShiftCommand', () => { ' eleven | 11', '', ], - new Selection(1, 5, 13, 1) + new Selection(1, 1, 13, 1) ); }); @@ -839,6 +839,28 @@ suite('Editor Commands - ShiftCommand', () => { ); }); + test('issue Microsoft/monaco-editor#443: Indentation of a single row deletes selected text in some cases', () => { + testCommand( + [ + 'Hello world!', + 'another line' + ], + null, + new Selection(1, 1, 1, 13), + (sel) => new ShiftCommand(sel, { + isUnshift: false, + tabSize: 4, + oneIndent: '\t', + useTabStops: true + }), + [ + '\tHello world!', + 'another line' + ], + new Selection(1, 1, 1, 14) + ); + }); + test('bug #16815:Shift+Tab doesn\'t go back to tabstop', () => { var repeatStr = (str: string, cnt: number): string => { diff --git a/src/vs/editor/test/common/commands/sideEditing.test.ts b/src/vs/editor/test/common/commands/sideEditing.test.ts index 7ddf9c917296e..af17bee84a254 100644 --- a/src/vs/editor/test/common/commands/sideEditing.test.ts +++ b/src/vs/editor/test/common/commands/sideEditing.test.ts @@ -5,36 +5,30 @@ 'use strict'; import * as assert from 'assert'; -import { Cursor } from 'vs/editor/common/controller/cursor'; import { EditOperation } from 'vs/editor/common/core/editOperation'; import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import { IIdentifiedSingleEditOperation } from 'vs/editor/common/editorCommon'; -import { Model } from 'vs/editor/common/model/model'; import { ILineEdit, ModelLine, LineMarker, MarkersTracker } from 'vs/editor/common/model/modelLine'; -import { TestConfiguration } from 'vs/editor/test/common/mocks/testConfiguration'; -import { viewModelHelper } from 'vs/editor/test/common/editorTestUtils'; +import { withMockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; const NO_TAB_SIZE = 0; function testCommand(lines: string[], selections: Selection[], edits: IIdentifiedSingleEditOperation[], expectedLines: string[], expectedSelections: Selection[]): void { - let model = Model.createFromString(lines.join('\n')); - let config = new TestConfiguration(null); - let cursor = new Cursor(config, model, viewModelHelper(model), false); + withMockCodeEditor(lines, {}, (editor, cursor) => { + const model = editor.getModel(); - cursor.setSelections('tests', selections); + cursor.setSelections('tests', selections); - model.applyEdits(edits); + model.applyEdits(edits); - assert.deepEqual(model.getLinesContent(), expectedLines); + assert.deepEqual(model.getLinesContent(), expectedLines); - let actualSelections = cursor.getSelections(); - assert.deepEqual(actualSelections.map(s => s.toString()), expectedSelections.map(s => s.toString())); + let actualSelections = cursor.getSelections(); + assert.deepEqual(actualSelections.map(s => s.toString()), expectedSelections.map(s => s.toString())); - cursor.dispose(); - config.dispose(); - model.dispose(); + }); } function testLineEditMarker(text: string, column: number, stickToPreviousCharacter: boolean, edit: ILineEdit, expectedColumn: number): void { diff --git a/src/vs/editor/test/common/config/commonEditorConfig.test.ts b/src/vs/editor/test/common/config/commonEditorConfig.test.ts index bda2f542ccb6b..4d5da6aec320a 100644 --- a/src/vs/editor/test/common/config/commonEditorConfig.test.ts +++ b/src/vs/editor/test/common/config/commonEditorConfig.test.ts @@ -7,6 +7,8 @@ import * as assert from 'assert'; import { EditorZoom } from 'vs/editor/common/config/editorZoom'; import { TestConfiguration } from 'vs/editor/test/common/mocks/testConfiguration'; +import { IEnvConfiguration } from 'vs/editor/common/config/commonEditorConfig'; +import { AccessibilitySupport } from 'vs/base/common/platform'; suite('Common Editor Config', () => { test('Zoom Level', () => { @@ -52,8 +54,16 @@ suite('Common Editor Config', () => { }); class TestWrappingConfiguration extends TestConfiguration { - protected getOuterWidth(): number { - return 1000; + protected _getEnvConfiguration(): IEnvConfiguration { + return { + extraEditorClassName: '', + outerWidth: 1000, + outerHeight: 100, + emptySelectionClipboard: true, + pixelRatio: 1, + zoomLevel: 0, + accessibilitySupport: AccessibilitySupport.Unknown + }; } } @@ -78,13 +88,23 @@ suite('Common Editor Config', () => { let config = new TestWrappingConfiguration({ wordWrap: true }); - assertWrapping(config, true, 89); + assertWrapping(config, true, 81); }); test('wordWrap on', () => { let config = new TestWrappingConfiguration({ wordWrap: 'on' }); + assertWrapping(config, true, 81); + }); + + test('wordWrap on without minimap', () => { + let config = new TestWrappingConfiguration({ + wordWrap: 'on', + minimap: { + enabled: false + } + }); assertWrapping(config, true, 89); }); @@ -93,7 +113,7 @@ suite('Common Editor Config', () => { wordWrap: 'on', wordWrapColumn: 10 }); - assertWrapping(config, true, 89); + assertWrapping(config, true, 81); }); test('wordWrap off', () => { diff --git a/src/vs/editor/test/common/controller/cursor.test.ts b/src/vs/editor/test/common/controller/cursor.test.ts index 5f3f10e85bd41..27dab27ada4ed 100644 --- a/src/vs/editor/test/common/controller/cursor.test.ts +++ b/src/vs/editor/test/common/controller/cursor.test.ts @@ -5,7 +5,7 @@ 'use strict'; import * as assert from 'assert'; -import { Cursor } from 'vs/editor/common/controller/cursor'; +import { Cursor, CursorStateChangedEvent } from 'vs/editor/common/controller/cursor'; import { EditOperation } from 'vs/editor/common/core/editOperation'; import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; @@ -13,7 +13,7 @@ import { Selection } from 'vs/editor/common/core/selection'; import { EndOfLinePreference, Handler, DefaultEndOfLine, ITextModelCreationOptions, ICommand, - ITokenizedModel, IEditOperationBuilder, ICursorStateComputerData + ITokenizedModel, IEditOperationBuilder, ICursorStateComputerData, EndOfLineSequence } from 'vs/editor/common/editorCommon'; import { Model } from 'vs/editor/common/model/model'; import { IndentAction, IndentationRule } from 'vs/editor/common/modes/languageConfiguration'; @@ -21,11 +21,11 @@ import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageCo import { TestConfiguration } from 'vs/editor/test/common/mocks/testConfiguration'; import { MockMode } from 'vs/editor/test/common/mocks/mockMode'; import { LanguageIdentifier } from 'vs/editor/common/modes'; -import { viewModelHelper } from 'vs/editor/test/common/editorTestUtils'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; -import { ICursorPositionChangedEvent, ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; -import { CoreCommands } from 'vs/editor/common/controller/coreCommands'; - +import { CoreNavigationCommands, CoreEditingCommands } from 'vs/editor/common/controller/coreCommands'; +import { withMockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; +import { TextModel } from 'vs/editor/common/model/textModel'; +import { ViewModel } from 'vs/editor/common/viewModel/viewModelImpl'; let H = Handler; // --------- utils @@ -36,11 +36,11 @@ function cursorCommand(cursor: Cursor, command: string, extraData?: any, overwri function moveTo(cursor: Cursor, lineNumber: number, column: number, inSelectionMode: boolean = false) { if (inSelectionMode) { - CoreCommands.MoveToSelect.runCoreEditorCommand(cursor, { + CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(cursor, { position: new Position(lineNumber, column) }); } else { - CoreCommands.MoveTo.runCoreEditorCommand(cursor, { + CoreNavigationCommands.MoveTo.runCoreEditorCommand(cursor, { position: new Position(lineNumber, column) }); } @@ -48,65 +48,65 @@ function moveTo(cursor: Cursor, lineNumber: number, column: number, inSelectionM function moveLeft(cursor: Cursor, inSelectionMode: boolean = false) { if (inSelectionMode) { - CoreCommands.CursorLeftSelect.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorLeftSelect.runCoreEditorCommand(cursor, {}); } else { - CoreCommands.CursorLeft.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorLeft.runCoreEditorCommand(cursor, {}); } } function moveRight(cursor: Cursor, inSelectionMode: boolean = false) { if (inSelectionMode) { - CoreCommands.CursorRightSelect.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorRightSelect.runCoreEditorCommand(cursor, {}); } else { - CoreCommands.CursorRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorRight.runCoreEditorCommand(cursor, {}); } } function moveDown(cursor: Cursor, inSelectionMode: boolean = false) { if (inSelectionMode) { - CoreCommands.CursorDownSelect.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorDownSelect.runCoreEditorCommand(cursor, {}); } else { - CoreCommands.CursorDown.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorDown.runCoreEditorCommand(cursor, {}); } } function moveUp(cursor: Cursor, inSelectionMode: boolean = false) { if (inSelectionMode) { - CoreCommands.CursorUpSelect.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorUpSelect.runCoreEditorCommand(cursor, {}); } else { - CoreCommands.CursorUp.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorUp.runCoreEditorCommand(cursor, {}); } } function moveToBeginningOfLine(cursor: Cursor, inSelectionMode: boolean = false) { if (inSelectionMode) { - CoreCommands.CursorHomeSelect.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorHomeSelect.runCoreEditorCommand(cursor, {}); } else { - CoreCommands.CursorHome.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorHome.runCoreEditorCommand(cursor, {}); } } function moveToEndOfLine(cursor: Cursor, inSelectionMode: boolean = false) { if (inSelectionMode) { - CoreCommands.CursorEndSelect.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorEndSelect.runCoreEditorCommand(cursor, {}); } else { - CoreCommands.CursorEnd.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorEnd.runCoreEditorCommand(cursor, {}); } } function moveToBeginningOfBuffer(cursor: Cursor, inSelectionMode: boolean = false) { if (inSelectionMode) { - CoreCommands.CursorTopSelect.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorTopSelect.runCoreEditorCommand(cursor, {}); } else { - CoreCommands.CursorTop.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorTop.runCoreEditorCommand(cursor, {}); } } function moveToEndOfBuffer(cursor: Cursor, inSelectionMode: boolean = false) { if (inSelectionMode) { - CoreCommands.CursorBottomSelect.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorBottomSelect.runCoreEditorCommand(cursor, {}); } else { - CoreCommands.CursorBottom.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorBottom.runCoreEditorCommand(cursor, {}); } } @@ -134,6 +134,7 @@ suite('Editor Controller - Cursor', () => { let thisModel: Model; let thisConfiguration: TestConfiguration; + let thisViewModel: ViewModel; let thisCursor: Cursor; setup(() => { @@ -146,11 +147,14 @@ suite('Editor Controller - Cursor', () => { thisModel = Model.createFromString(text); thisConfiguration = new TestConfiguration(null); - thisCursor = new Cursor(thisConfiguration, thisModel, viewModelHelper(thisModel), false); + thisViewModel = new ViewModel(0, thisConfiguration, thisModel); + + thisCursor = new Cursor(thisConfiguration, thisModel, thisViewModel); }); teardown(() => { thisCursor.dispose(); + thisViewModel.dispose(); thisModel.dispose(); thisConfiguration.dispose(); }); @@ -590,7 +594,7 @@ suite('Editor Controller - Cursor', () => { // --------- misc test('select all', () => { - CoreCommands.SelectAll.runCoreEditorCommand(thisCursor, {}); + CoreNavigationCommands.SelectAll.runCoreEditorCommand(thisCursor, {}); assertCursor(thisCursor, new Selection(1, 1, 5, LINE5.length + 1)); }); @@ -599,47 +603,44 @@ suite('Editor Controller - Cursor', () => { // 01234 56789012345678 0 // let LINE1 = ' \tMy First Line\t '; moveTo(thisCursor, 1, 1); - CoreCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); + CoreNavigationCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); assertCursor(thisCursor, new Selection(1, 1, 2, 1)); moveTo(thisCursor, 1, 2); - CoreCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); + CoreNavigationCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); assertCursor(thisCursor, new Selection(1, 1, 2, 1)); moveTo(thisCursor, 1, 5); - CoreCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); + CoreNavigationCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); assertCursor(thisCursor, new Selection(1, 1, 2, 1)); moveTo(thisCursor, 1, 19); - CoreCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); + CoreNavigationCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); assertCursor(thisCursor, new Selection(1, 1, 2, 1)); moveTo(thisCursor, 1, 20); - CoreCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); + CoreNavigationCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); assertCursor(thisCursor, new Selection(1, 1, 2, 1)); moveTo(thisCursor, 1, 21); - CoreCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); + CoreNavigationCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); assertCursor(thisCursor, new Selection(1, 1, 2, 1)); - CoreCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); + CoreNavigationCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); assertCursor(thisCursor, new Selection(1, 1, 3, 1)); - CoreCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); + CoreNavigationCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); assertCursor(thisCursor, new Selection(1, 1, 4, 1)); - CoreCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); + CoreNavigationCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); assertCursor(thisCursor, new Selection(1, 1, 5, 1)); - CoreCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); + CoreNavigationCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); assertCursor(thisCursor, new Selection(1, 1, 5, LINE5.length + 1)); - CoreCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); + CoreNavigationCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); assertCursor(thisCursor, new Selection(1, 1, 5, LINE5.length + 1)); }); // --------- eventing test('no move doesn\'t trigger event', () => { - thisCursor.onDidChangePosition((e) => { - assert.ok(false, 'was not expecting event'); - }); - thisCursor.onDidChangeSelection((e) => { + thisCursor.onDidChange((e) => { assert.ok(false, 'was not expecting event'); }); moveTo(thisCursor, 1, 1); @@ -647,30 +648,22 @@ suite('Editor Controller - Cursor', () => { test('move eventing', () => { let events = 0; - thisCursor.onDidChangePosition((e: ICursorPositionChangedEvent) => { + thisCursor.onDidChange((e: CursorStateChangedEvent) => { events++; - assert.deepEqual(e.position, new Position(1, 2)); - }); - thisCursor.onDidChangeSelection((e: ICursorSelectionChangedEvent) => { - events++; - assert.deepEqual(e.selection, new Selection(1, 2, 1, 2)); + assert.deepEqual(e.selections, [new Selection(1, 2, 1, 2)]); }); moveTo(thisCursor, 1, 2); - assert.equal(events, 2, 'receives 2 events'); + assert.equal(events, 1, 'receives 1 event'); }); test('move in selection mode eventing', () => { let events = 0; - thisCursor.onDidChangePosition((e: ICursorPositionChangedEvent) => { - events++; - assert.deepEqual(e.position, new Position(1, 2)); - }); - thisCursor.onDidChangeSelection((e: ICursorSelectionChangedEvent) => { + thisCursor.onDidChange((e: CursorStateChangedEvent) => { events++; - assert.deepEqual(e.selection, new Selection(1, 1, 1, 2)); + assert.deepEqual(e.selections, [new Selection(1, 1, 1, 2)]); }); moveTo(thisCursor, 1, 2, true); - assert.equal(events, 2, 'receives 2 events'); + assert.equal(events, 1, 'receives 1 event'); }); // --------- state save & restore @@ -698,39 +691,37 @@ suite('Editor Controller - Cursor', () => { }); test('column select 1', () => { - let model = Model.createFromString([ + withMockCodeEditor([ '\tprivate compute(a:number): boolean {', '\t\tif (a + 3 === 0 || a + 5 === 0) {', '\t\t\treturn false;', '\t\t}', '\t}' - ].join('\n')); - let cursor = new Cursor(new TestConfiguration(null), model, viewModelHelper(model), true); + ], {}, (editor, cursor) => { - moveTo(cursor, 1, 7, false); - assertCursor(cursor, new Position(1, 7)); + moveTo(cursor, 1, 7, false); + assertCursor(cursor, new Position(1, 7)); - CoreCommands.ColumnSelect.runCoreEditorCommand(cursor, { - position: new Position(4, 4), - viewPosition: new Position(4, 4), - mouseColumn: 15 - }); + CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(cursor, { + position: new Position(4, 4), + viewPosition: new Position(4, 4), + mouseColumn: 15 + }); - let expectedSelections = [ - new Selection(1, 7, 1, 12), - new Selection(2, 4, 2, 9), - new Selection(3, 3, 3, 6), - new Selection(4, 4, 4, 4), - ]; + let expectedSelections = [ + new Selection(1, 7, 1, 12), + new Selection(2, 4, 2, 9), + new Selection(3, 3, 3, 6), + new Selection(4, 4, 4, 4), + ]; - assertCursor(cursor, expectedSelections); + assertCursor(cursor, expectedSelections); - cursor.dispose(); - model.dispose(); + }); }); test('issue #4905 - column select is biased to the right', () => { - let model = Model.createFromString([ + const model = Model.createFromString([ 'var gulp = require("gulp");', 'var path = require("path");', 'var rimraf = require("rimraf");', @@ -739,12 +730,14 @@ suite('Editor Controller - Cursor', () => { 'var concat = require("gulp-concat");', 'var newer = require("gulp-newer");', ].join('\n')); - let cursor = new Cursor(new TestConfiguration(null), model, viewModelHelper(model), true); + const config = new TestConfiguration(null); + const viewModel = new ViewModel(0, config, model); + const cursor = new Cursor(config, model, viewModel); moveTo(cursor, 1, 4, false); assertCursor(cursor, new Position(1, 4)); - CoreCommands.ColumnSelect.runCoreEditorCommand(cursor, { + CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(cursor, { position: new Position(4, 1), viewPosition: new Position(4, 1), mouseColumn: 1 @@ -758,11 +751,13 @@ suite('Editor Controller - Cursor', () => { ]); cursor.dispose(); + viewModel.dispose(); + config.dispose(); model.dispose(); }); test('issue #20087: column select with mouse', () => { - let model = Model.createFromString([ + const model = Model.createFromString([ '', '', '', @@ -774,12 +769,14 @@ suite('Editor Controller - Cursor', () => { '', '', ].join('\n')); - let cursor = new Cursor(new TestConfiguration(null), model, viewModelHelper(model), true); + const config = new TestConfiguration(null); + const viewModel = new ViewModel(0, config, model); + const cursor = new Cursor(config, model, viewModel); moveTo(cursor, 10, 10, false); assertCursor(cursor, new Position(10, 10)); - CoreCommands.ColumnSelect.runCoreEditorCommand(cursor, { + CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(cursor, { position: new Position(1, 1), viewPosition: new Position(1, 1), mouseColumn: 1 @@ -797,7 +794,7 @@ suite('Editor Controller - Cursor', () => { new Selection(1, 10, 1, 1), ]); - CoreCommands.ColumnSelect.runCoreEditorCommand(cursor, { + CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(cursor, { position: new Position(1, 1), viewPosition: new Position(1, 1), mouseColumn: 1 @@ -816,11 +813,13 @@ suite('Editor Controller - Cursor', () => { ]); cursor.dispose(); + viewModel.dispose(); + config.dispose(); model.dispose(); }); test('issue #20087: column select with keyboard', () => { - let model = Model.createFromString([ + const model = Model.createFromString([ '', '', '', @@ -832,43 +831,47 @@ suite('Editor Controller - Cursor', () => { '', '', ].join('\n')); - let cursor = new Cursor(new TestConfiguration(null), model, viewModelHelper(model), true); + const config = new TestConfiguration(null); + const viewModel = new ViewModel(0, config, model); + const cursor = new Cursor(config, model, viewModel); moveTo(cursor, 10, 10, false); assertCursor(cursor, new Position(10, 10)); - CoreCommands.CursorColumnSelectLeft.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectLeft.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(10, 10, 10, 9) ]); - CoreCommands.CursorColumnSelectLeft.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectLeft.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(10, 10, 10, 8) ]); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(10, 10, 10, 9) ]); - CoreCommands.CursorColumnSelectUp.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectUp.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(10, 10, 10, 9), new Selection(9, 10, 9, 9), ]); - CoreCommands.CursorColumnSelectDown.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectDown.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(10, 10, 10, 9) ]); cursor.dispose(); + viewModel.dispose(); + config.dispose(); model.dispose(); }); test('column select with keyboard', () => { - let model = Model.createFromString([ + const model = Model.createFromString([ 'var gulp = require("gulp");', 'var path = require("path");', 'var rimraf = require("rimraf");', @@ -877,33 +880,35 @@ suite('Editor Controller - Cursor', () => { 'var concat = require("gulp-concat");', 'var newer = require("gulp-newer");', ].join('\n')); - let cursor = new Cursor(new TestConfiguration(null), model, viewModelHelper(model), true); + const config = new TestConfiguration(null); + const viewModel = new ViewModel(0, config, model); + const cursor = new Cursor(config, model, viewModel); moveTo(cursor, 1, 4, false); assertCursor(cursor, new Position(1, 4)); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 5) ]); - CoreCommands.CursorColumnSelectDown.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectDown.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 5), new Selection(2, 4, 2, 5) ]); - CoreCommands.CursorColumnSelectDown.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectDown.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 5), new Selection(2, 4, 2, 5), new Selection(3, 4, 3, 5), ]); - CoreCommands.CursorColumnSelectDown.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectDown.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectDown.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectDown.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectDown.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectDown.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectDown.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectDown.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 5), new Selection(2, 4, 2, 5), @@ -914,7 +919,7 @@ suite('Editor Controller - Cursor', () => { new Selection(7, 4, 7, 5), ]); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 6), new Selection(2, 4, 2, 6), @@ -926,16 +931,16 @@ suite('Editor Controller - Cursor', () => { ]); // 10 times - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 16), new Selection(2, 4, 2, 16), @@ -947,16 +952,16 @@ suite('Editor Controller - Cursor', () => { ]); // 10 times - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 26), new Selection(2, 4, 2, 26), @@ -968,8 +973,8 @@ suite('Editor Controller - Cursor', () => { ]); // 2 times => reaching the ending of lines 1 and 2 - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 28), new Selection(2, 4, 2, 28), @@ -981,10 +986,10 @@ suite('Editor Controller - Cursor', () => { ]); // 4 times => reaching the ending of line 3 - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 28), new Selection(2, 4, 2, 28), @@ -996,8 +1001,8 @@ suite('Editor Controller - Cursor', () => { ]); // 2 times => reaching the ending of line 4 - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 28), new Selection(2, 4, 2, 28), @@ -1009,7 +1014,7 @@ suite('Editor Controller - Cursor', () => { ]); // 1 time => reaching the ending of line 7 - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 28), new Selection(2, 4, 2, 28), @@ -1021,9 +1026,9 @@ suite('Editor Controller - Cursor', () => { ]); // 3 times => reaching the ending of lines 5 & 6 - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 28), new Selection(2, 4, 2, 28), @@ -1035,7 +1040,7 @@ suite('Editor Controller - Cursor', () => { ]); // cannot go anywhere anymore - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 28), new Selection(2, 4, 2, 28), @@ -1047,10 +1052,10 @@ suite('Editor Controller - Cursor', () => { ]); // cannot go anywhere anymore even if we insist - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 28), new Selection(2, 4, 2, 28), @@ -1062,7 +1067,7 @@ suite('Editor Controller - Cursor', () => { ]); // can easily go back - CoreCommands.CursorColumnSelectLeft.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectLeft.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 28), new Selection(2, 4, 2, 28), @@ -1074,6 +1079,8 @@ suite('Editor Controller - Cursor', () => { ]); cursor.dispose(); + viewModel.dispose(); + config.dispose(); model.dispose(); }); }); @@ -1118,23 +1125,52 @@ class IndentRulesMode extends MockMode { } suite('Editor Controller - Regression tests', () => { + + test('issue Microsoft/monaco-editor#443: Indentation of a single row deletes selected text in some cases', () => { + let model = Model.createFromString( + [ + 'Hello world!', + 'another line' + ].join('\n'), + { + defaultEOL: DefaultEndOfLine.LF, + detectIndentation: false, + insertSpaces: false, + tabSize: 4, + trimAutoWhitespace: false + }, + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { + cursor.setSelections('test', [new Selection(1, 1, 1, 13)]); + + // Check that indenting maintains the selection start at column 1 + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); + assert.deepEqual(cursor.getSelection(), new Selection(1, 1, 1, 14)); + }); + + model.dispose(); + }); + test('Bug 9121: Auto indent + undo + redo is funky', () => { - usingCursor({ - text: [ + let model = Model.createFromString( + [ '' - ], - modelOpts: { + ].join('\n'), + { defaultEOL: DefaultEndOfLine.LF, detectIndentation: false, insertSpaces: false, tabSize: 4, trimAutoWhitespace: false - } - }, (model, cursor) => { + }, + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); assert.equal(model.getValue(EndOfLinePreference.LF), '\n', 'assert1'); - cursorCommand(cursor, H.Tab, {}); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getValue(EndOfLinePreference.LF), '\n\t', 'assert2'); cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); @@ -1143,19 +1179,19 @@ suite('Editor Controller - Regression tests', () => { cursorCommand(cursor, H.Type, { text: 'x' }); assert.equal(model.getValue(EndOfLinePreference.LF), '\n\t\n\tx', 'assert4'); - CoreCommands.CursorLeft.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorLeft.runCoreEditorCommand(cursor, {}); assert.equal(model.getValue(EndOfLinePreference.LF), '\n\t\n\tx', 'assert5'); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getValue(EndOfLinePreference.LF), '\n\t\nx', 'assert6'); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getValue(EndOfLinePreference.LF), '\n\tx', 'assert7'); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getValue(EndOfLinePreference.LF), '\nx', 'assert8'); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getValue(EndOfLinePreference.LF), 'x', 'assert9'); cursorCommand(cursor, H.Undo, {}); @@ -1176,219 +1212,68 @@ suite('Editor Controller - Regression tests', () => { cursorCommand(cursor, H.Redo, {}); assert.equal(model.getValue(EndOfLinePreference.LF), 'x', 'assert15'); }); - }); - - - - test('bug #16543: Tab should indent to correct indentation spot immediately', () => { - let mode = new OnEnterMode(IndentAction.Indent); - usingCursor({ - text: [ - 'function baz() {', - '\tfunction hello() { // something here', - '\t', - '', - '\t}', - '}' - ], - modelOpts: { - defaultEOL: DefaultEndOfLine.LF, - detectIndentation: false, - insertSpaces: false, - tabSize: 4, - trimAutoWhitespace: true - }, - languageIdentifier: mode.getLanguageIdentifier(), - }, (model, cursor) => { - moveTo(cursor, 4, 1, false); - assertCursor(cursor, new Selection(4, 1, 4, 1)); - - cursorCommand(cursor, H.Tab, null, 'keyboard'); - assert.equal(model.getLineContent(4), '\t\t'); - }); - mode.dispose(); - }); - - test('bug #2938 (1): When pressing Tab on white-space only lines, indent straight to the right spot (similar to empty lines)', () => { - let mode = new OnEnterMode(IndentAction.Indent); - usingCursor({ - text: [ - '\tfunction baz() {', - '\t\tfunction hello() { // something here', - '\t\t', - '\t', - '\t\t}', - '\t}' - ], - modelOpts: { - defaultEOL: DefaultEndOfLine.LF, - detectIndentation: false, - insertSpaces: false, - tabSize: 4, - trimAutoWhitespace: true - }, - languageIdentifier: mode.getLanguageIdentifier(), - }, (model, cursor) => { - moveTo(cursor, 4, 2, false); - assertCursor(cursor, new Selection(4, 2, 4, 2)); - - cursorCommand(cursor, H.Tab, null, 'keyboard'); - assert.equal(model.getLineContent(4), '\t\t\t'); - }); - mode.dispose(); - }); - - - test('bug #2938 (2): When pressing Tab on white-space only lines, indent straight to the right spot (similar to empty lines)', () => { - let mode = new OnEnterMode(IndentAction.Indent); - usingCursor({ - text: [ - '\tfunction baz() {', - '\t\tfunction hello() { // something here', - '\t\t', - ' ', - '\t\t}', - '\t}' - ], - modelOpts: { - defaultEOL: DefaultEndOfLine.LF, - detectIndentation: false, - insertSpaces: false, - tabSize: 4, - trimAutoWhitespace: true - }, - languageIdentifier: mode.getLanguageIdentifier(), - }, (model, cursor) => { - moveTo(cursor, 4, 1, false); - assertCursor(cursor, new Selection(4, 1, 4, 1)); - cursorCommand(cursor, H.Tab, null, 'keyboard'); - assert.equal(model.getLineContent(4), '\t\t\t'); - }); - mode.dispose(); + model.dispose(); }); - test('bug #2938 (3): When pressing Tab on white-space only lines, indent straight to the right spot (similar to empty lines)', () => { - let mode = new OnEnterMode(IndentAction.Indent); - usingCursor({ - text: [ - '\tfunction baz() {', - '\t\tfunction hello() { // something here', - '\t\t', - '\t\t\t', - '\t\t}', - '\t}' - ], - modelOpts: { - defaultEOL: DefaultEndOfLine.LF, - detectIndentation: false, - insertSpaces: false, + test('bug #16815:Shift+Tab doesn\'t go back to tabstop', () => { + let mode = new OnEnterMode(IndentAction.IndentOutdent); + let model = Model.createFromString( + [ + ' function baz() {' + ].join('\n'), + { + insertSpaces: true, tabSize: 4, - trimAutoWhitespace: true - }, - languageIdentifier: mode.getLanguageIdentifier(), - }, (model, cursor) => { - moveTo(cursor, 4, 3, false); - assertCursor(cursor, new Selection(4, 3, 4, 3)); - - cursorCommand(cursor, H.Tab, null, 'keyboard'); - assert.equal(model.getLineContent(4), '\t\t\t\t'); - }); - mode.dispose(); - }); - - test('bug #2938 (4): When pressing Tab on white-space only lines, indent straight to the right spot (similar to empty lines)', () => { - let mode = new OnEnterMode(IndentAction.Indent); - usingCursor({ - text: [ - '\tfunction baz() {', - '\t\tfunction hello() { // something here', - '\t\t', - '\t\t\t\t', - '\t\t}', - '\t}' - ], - modelOpts: { - defaultEOL: DefaultEndOfLine.LF, detectIndentation: false, - insertSpaces: false, - tabSize: 4, - trimAutoWhitespace: true - }, - languageIdentifier: mode.getLanguageIdentifier(), - }, (model, cursor) => { - moveTo(cursor, 4, 4, false); - assertCursor(cursor, new Selection(4, 4, 4, 4)); - - cursorCommand(cursor, H.Tab, null, 'keyboard'); - assert.equal(model.getLineContent(4), '\t\t\t\t\t'); - }); - mode.dispose(); - }); - - test('Bug 18276:[editor] Indentation broken when selection is empty', () => { - usingCursor({ - text: [ - 'function baz() {' - ], - modelOpts: { defaultEOL: DefaultEndOfLine.LF, - detectIndentation: false, - insertSpaces: false, - tabSize: 4, trimAutoWhitespace: true }, - }, (model, cursor) => { - moveTo(cursor, 1, 2, false); - assertCursor(cursor, new Selection(1, 2, 1, 2)); - - cursorCommand(cursor, H.Indent, null, 'keyboard'); - assert.equal(model.getLineContent(1), '\tfunction baz() {'); + mode.getLanguageIdentifier() + ); - assertCursor(cursor, new Selection(1, 3, 1, 3)); - cursorCommand(cursor, H.Tab, null, 'keyboard'); - assert.equal(model.getLineContent(1), '\tf\tunction baz() {'); - }); - }); - - test('bug #16815:Shift+Tab doesn\'t go back to tabstop', () => { - let mode = new OnEnterMode(IndentAction.IndentOutdent); - usingCursor({ - text: [ - ' function baz() {' - ], - languageIdentifier: mode.getLanguageIdentifier(), - modelOpts: { insertSpaces: true, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } - }, (model, cursor) => { + withMockCodeEditor(null, { model: model }, (editor, cursor) => { moveTo(cursor, 1, 6, false); assertCursor(cursor, new Selection(1, 6, 1, 6)); - cursorCommand(cursor, H.Outdent, null, 'keyboard'); + CoreEditingCommands.Outdent.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(1), ' function baz() {'); assertCursor(cursor, new Selection(1, 5, 1, 5)); }); + + model.dispose(); mode.dispose(); }); test('Bug #18293:[regression][editor] Can\'t outdent whitespace line', () => { - usingCursor({ - text: [ + let model = Model.createFromString( + [ ' ' - ], - modelOpts: { insertSpaces: true, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } - }, (model, cursor) => { + ].join('\n'), + { + insertSpaces: true, + tabSize: 4, + detectIndentation: false, + defaultEOL: DefaultEndOfLine.LF, + trimAutoWhitespace: true + } + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { moveTo(cursor, 1, 7, false); assertCursor(cursor, new Selection(1, 7, 1, 7)); - cursorCommand(cursor, H.Outdent, null, 'keyboard'); + CoreEditingCommands.Outdent.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(1), ' '); assertCursor(cursor, new Selection(1, 5, 1, 5)); }); + + model.dispose(); }); test('Bug #16657: [editor] Tab on empty line of zero indentation moves cursor to position (1,1)', () => { - usingCursor({ - text: [ + let model = Model.createFromString( + [ 'function baz() {', '\tfunction hello() { // something here', '\t', @@ -1396,64 +1281,64 @@ suite('Editor Controller - Regression tests', () => { '\t}', '}', '' - ], - modelOpts: { + ].join('\n'), + { defaultEOL: DefaultEndOfLine.LF, detectIndentation: false, insertSpaces: false, tabSize: 4, trimAutoWhitespace: true }, - }, (model, cursor) => { + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { moveTo(cursor, 7, 1, false); assertCursor(cursor, new Selection(7, 1, 7, 1)); - cursorCommand(cursor, H.Tab, null, 'keyboard'); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(7), '\t'); assertCursor(cursor, new Selection(7, 2, 7, 2)); }); + + model.dispose(); }); test('bug #16740: [editor] Cut line doesn\'t quite cut the last line', () => { + // Part 1 => there is text on the last line - let text = [ + withMockCodeEditor([ 'asdasd', 'qwerty' - ]; - let model = Model.createFromString(text.join('\n')); - let cursor = new Cursor(new TestConfiguration(null), model, viewModelHelper(model), true); + ], {}, (editor, cursor) => { + const model = editor.getModel(); - moveTo(cursor, 2, 1, false); - assertCursor(cursor, new Selection(2, 1, 2, 1)); + moveTo(cursor, 2, 1, false); + assertCursor(cursor, new Selection(2, 1, 2, 1)); - cursorCommand(cursor, H.Cut, null, 'keyboard'); - assert.equal(model.getLineCount(), 1); - assert.equal(model.getLineContent(1), 'asdasd'); + cursorCommand(cursor, H.Cut, null, 'keyboard'); + assert.equal(model.getLineCount(), 1); + assert.equal(model.getLineContent(1), 'asdasd'); - cursor.dispose(); - model.dispose(); + }); // Part 2 => there is no text on the last line - text = [ + withMockCodeEditor([ 'asdasd', '' - ]; - model = Model.createFromString(text.join('\n')); - cursor = new Cursor(new TestConfiguration(null), model, viewModelHelper(model), true); - - moveTo(cursor, 2, 1, false); - assertCursor(cursor, new Selection(2, 1, 2, 1)); + ], {}, (editor, cursor) => { + const model = editor.getModel(); - cursorCommand(cursor, H.Cut, null, 'keyboard'); - assert.equal(model.getLineCount(), 1); - assert.equal(model.getLineContent(1), 'asdasd'); + moveTo(cursor, 2, 1, false); + assertCursor(cursor, new Selection(2, 1, 2, 1)); - cursorCommand(cursor, H.Cut, null, 'keyboard'); - assert.equal(model.getLineCount(), 1); - assert.equal(model.getLineContent(1), ''); + cursorCommand(cursor, H.Cut, null, 'keyboard'); + assert.equal(model.getLineCount(), 1); + assert.equal(model.getLineContent(1), 'asdasd'); - cursor.dispose(); - model.dispose(); + cursorCommand(cursor, H.Cut, null, 'keyboard'); + assert.equal(model.getLineCount(), 1); + assert.equal(model.getLineContent(1), ''); + }); }); test('Bug #11476: Double bracket surrounding + undo is broken', () => { @@ -1480,24 +1365,33 @@ suite('Editor Controller - Regression tests', () => { test('issue #1140: Backspace stops prematurely', () => { let mode = new SurroundingMode(); - usingCursor({ - text: [ + let model = Model.createFromString( + [ 'function baz() {', ' return 1;', '};' - ], - languageIdentifier: mode.getLanguageIdentifier(), - modelOpts: { tabSize: 4, insertSpaces: true, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } - }, (model, cursor) => { - moveTo(cursor, 3, 2, false); - moveTo(cursor, 1, 14, true); - assertCursor(cursor, new Selection(3, 2, 1, 14)); - - cursorCommand(cursor, H.DeleteLeft); - assertCursor(cursor, new Selection(1, 14, 1, 14)); - assert.equal(model.getLineCount(), 1); + ].join('\n'), + { + tabSize: 4, + insertSpaces: true, + detectIndentation: false, + defaultEOL: DefaultEndOfLine.LF, + trimAutoWhitespace: true + }, + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { + moveTo(cursor, 3, 2, false); + moveTo(cursor, 1, 14, true); + assertCursor(cursor, new Selection(3, 2, 1, 14)); + + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); + assertCursor(cursor, new Selection(1, 14, 1, 14)); + assert.equal(model.getLineCount(), 1); assert.equal(model.getLineContent(1), 'function baz(;'); }); + + model.dispose(); mode.dispose(); }); @@ -1520,15 +1414,22 @@ suite('Editor Controller - Regression tests', () => { }); test('issue #3071: Investigate why undo stack gets corrupted', () => { - usingCursor({ - text: [ + let model = Model.createFromString( + [ 'some lines', 'and more lines', 'just some text', - ], - languageIdentifier: null, - modelOpts: { insertSpaces: true, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } - }, (model, cursor) => { + ].join('\n'), + { + insertSpaces: true, + tabSize: 4, + detectIndentation: false, + defaultEOL: DefaultEndOfLine.LF, + trimAutoWhitespace: true + } + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { moveTo(cursor, 1, 1, false); moveTo(cursor, 3, 4, true); @@ -1540,7 +1441,7 @@ suite('Editor Controller - Regression tests', () => { } }); - cursorCommand(cursor, H.Tab); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getValue(), [ '\t just some text' ].join('\n'), '001'); @@ -1559,6 +1460,8 @@ suite('Editor Controller - Regression tests', () => { 'just some text', ].join('\n'), '003'); }); + + model.dispose(); }); test('issue #12950: Cannot Double Click To Insert Emoji Using OSX Emoji Panel', () => { @@ -1584,35 +1487,55 @@ suite('Editor Controller - Regression tests', () => { }); test('issue #3463: pressing tab adds spaces, but not as many as for a tab', () => { - usingCursor({ - text: [ + let model = Model.createFromString( + [ 'function a() {', '\tvar a = {', '\t\tx: 3', '\t};', '}', - ], - modelOpts: { insertSpaces: true, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } - }, (model, cursor) => { + ].join('\n'), + { + insertSpaces: true, + tabSize: 4, + detectIndentation: false, + defaultEOL: DefaultEndOfLine.LF, + trimAutoWhitespace: true + } + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { moveTo(cursor, 3, 2, false); - cursorCommand(cursor, H.Tab); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(3), '\t \tx: 3'); }); + + model.dispose(); }); test('issue #4312: trying to type a tab character over a sequence of spaces results in unexpected behaviour', () => { - usingCursor({ - text: [ + let model = Model.createFromString( + [ 'var foo = 123; // this is a comment', 'var bar = 4; // another comment' - ], - modelOpts: { insertSpaces: false, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } - }, (model, cursor) => { + ].join('\n'), + { + insertSpaces: false, + tabSize: 4, + detectIndentation: false, + defaultEOL: DefaultEndOfLine.LF, + trimAutoWhitespace: true + } + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { moveTo(cursor, 1, 15, false); moveTo(cursor, 1, 22, true); - cursorCommand(cursor, H.Tab); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(1), 'var foo = 123;\t// this is a comment'); }); + + model.dispose(); }); test('issue #832: word right', () => { @@ -1624,7 +1547,7 @@ suite('Editor Controller - Regression tests', () => { }, (model, cursor) => { moveTo(cursor, 1, 1, false); - function assertWordRight(col, expectedCol) { + function assertWordRight(col: number, expectedCol: number) { let args = { position: { lineNumber: 1, @@ -1632,9 +1555,9 @@ suite('Editor Controller - Regression tests', () => { } }; if (col === 1) { - CoreCommands.WordSelect.runCoreEditorCommand(cursor, args); + CoreNavigationCommands.WordSelect.runCoreEditorCommand(cursor, args); } else { - CoreCommands.WordSelectDrag.runCoreEditorCommand(cursor, args); + CoreNavigationCommands.WordSelectDrag.runCoreEditorCommand(cursor, args); } assert.equal(cursor.getSelection().startColumn, 1, 'TEST FOR ' + col); @@ -1722,6 +1645,71 @@ suite('Editor Controller - Regression tests', () => { assertCursor(cursor, new Position(1, 1)); }); }); + + test('issue #23913: Greater than 1000+ multi cursor typing replacement text appears inverted, lines begin to drop off selection', () => { + const LINE_CNT = 2000; + + let text = []; + for (let i = 0; i < LINE_CNT; i++) { + text[i] = 'asd'; + } + usingCursor({ + text: text + }, (model, cursor) => { + + let selections: Selection[] = []; + for (let i = 0; i < LINE_CNT; i++) { + selections[i] = new Selection(i + 1, 1, i + 1, 1); + } + cursor.setSelections('test', selections); + + cursorCommand(cursor, H.Type, { text: 'n' }, 'keyboard'); + cursorCommand(cursor, H.Type, { text: 'n' }, 'keyboard'); + + for (let i = 0; i < LINE_CNT; i++) { + assert.equal(model.getLineContent(i + 1), 'nnasd', 'line #' + (i + 1)); + } + + assert.equal(cursor.getSelections().length, LINE_CNT); + assert.equal(cursor.getSelections()[LINE_CNT - 1].startLineNumber, LINE_CNT); + }); + }); + + test('issue #23983: Calling model.setEOL does not reset cursor position', () => { + usingCursor({ + text: [ + 'first line', + 'second line' + ] + }, (model, cursor) => { + model.setEOL(EndOfLineSequence.CRLF); + + cursor.setSelections('test', [new Selection(2, 2, 2, 2)]); + model.setEOL(EndOfLineSequence.LF); + + assertCursor(cursor, new Selection(2, 2, 2, 2)); + }); + }); + + test('issue #23983: Calling model.setValue() resets cursor position', () => { + usingCursor({ + text: [ + 'first line', + 'second line' + ] + }, (model, cursor) => { + model.setEOL(EndOfLineSequence.CRLF); + + cursor.setSelections('test', [new Selection(2, 2, 2, 2)]); + model.setValue([ + 'different first line', + 'different second line', + 'new third line' + ].join('\n')); + + assertCursor(cursor, new Selection(1, 1, 1, 1)); + }); + }); }); suite('Editor Controller - Cursor Configuration', () => { @@ -1737,7 +1725,7 @@ suite('Editor Controller - Cursor Configuration', () => { ], modelOpts: { insertSpaces: true, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } }, (model, cursor) => { - cursorCommand(cursor, CoreCommands.MoveTo.id, { position: new Position(1, 21) }, 'keyboard'); + CoreNavigationCommands.MoveTo.runCoreEditorCommand(cursor, { position: new Position(1, 21), source: 'keyboard' }); cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); assert.equal(model.getLineContent(1), ' \tMy First Line\t '); assert.equal(model.getLineContent(2), ' '); @@ -1745,70 +1733,80 @@ suite('Editor Controller - Cursor Configuration', () => { }); test('Cursor honors insertSpaces configuration on tab', () => { - usingCursor({ - text: [ + let model = Model.createFromString( + [ ' \tMy First Line\t ', 'My Second Line123', ' Third Line', '', '1' - ], - modelOpts: { insertSpaces: true, tabSize: 13, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } - }, (model, cursor) => { + ].join('\n'), + { + insertSpaces: true, + tabSize: 13, + detectIndentation: false, + defaultEOL: DefaultEndOfLine.LF, + trimAutoWhitespace: true + } + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { // Tab on column 1 - cursorCommand(cursor, CoreCommands.MoveTo.id, { position: new Position(2, 1) }, 'keyboard'); - cursorCommand(cursor, H.Tab, null, 'keyboard'); + CoreNavigationCommands.MoveTo.runCoreEditorCommand(cursor, { position: new Position(2, 1) }); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), ' My Second Line123'); cursorCommand(cursor, H.Undo, null, 'keyboard'); // Tab on column 2 assert.equal(model.getLineContent(2), 'My Second Line123'); - cursorCommand(cursor, CoreCommands.MoveTo.id, { position: new Position(2, 2) }, 'keyboard'); - cursorCommand(cursor, H.Tab, null, 'keyboard'); + CoreNavigationCommands.MoveTo.runCoreEditorCommand(cursor, { position: new Position(2, 2) }); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), 'M y Second Line123'); cursorCommand(cursor, H.Undo, null, 'keyboard'); // Tab on column 3 assert.equal(model.getLineContent(2), 'My Second Line123'); - cursorCommand(cursor, CoreCommands.MoveTo.id, { position: new Position(2, 3) }, 'keyboard'); - cursorCommand(cursor, H.Tab, null, 'keyboard'); + CoreNavigationCommands.MoveTo.runCoreEditorCommand(cursor, { position: new Position(2, 3) }); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), 'My Second Line123'); cursorCommand(cursor, H.Undo, null, 'keyboard'); // Tab on column 4 assert.equal(model.getLineContent(2), 'My Second Line123'); - cursorCommand(cursor, CoreCommands.MoveTo.id, { position: new Position(2, 4) }, 'keyboard'); - cursorCommand(cursor, H.Tab, null, 'keyboard'); + CoreNavigationCommands.MoveTo.runCoreEditorCommand(cursor, { position: new Position(2, 4) }); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), 'My Second Line123'); cursorCommand(cursor, H.Undo, null, 'keyboard'); // Tab on column 5 assert.equal(model.getLineContent(2), 'My Second Line123'); - cursorCommand(cursor, CoreCommands.MoveTo.id, { position: new Position(2, 5) }, 'keyboard'); - cursorCommand(cursor, H.Tab, null, 'keyboard'); + CoreNavigationCommands.MoveTo.runCoreEditorCommand(cursor, { position: new Position(2, 5) }); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), 'My S econd Line123'); cursorCommand(cursor, H.Undo, null, 'keyboard'); // Tab on column 5 assert.equal(model.getLineContent(2), 'My Second Line123'); - cursorCommand(cursor, CoreCommands.MoveTo.id, { position: new Position(2, 5) }, 'keyboard'); - cursorCommand(cursor, H.Tab, null, 'keyboard'); + CoreNavigationCommands.MoveTo.runCoreEditorCommand(cursor, { position: new Position(2, 5) }); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), 'My S econd Line123'); cursorCommand(cursor, H.Undo, null, 'keyboard'); // Tab on column 13 assert.equal(model.getLineContent(2), 'My Second Line123'); - cursorCommand(cursor, CoreCommands.MoveTo.id, { position: new Position(2, 13) }, 'keyboard'); - cursorCommand(cursor, H.Tab, null, 'keyboard'); + CoreNavigationCommands.MoveTo.runCoreEditorCommand(cursor, { position: new Position(2, 13) }); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), 'My Second Li ne123'); cursorCommand(cursor, H.Undo, null, 'keyboard'); // Tab on column 14 assert.equal(model.getLineContent(2), 'My Second Line123'); - cursorCommand(cursor, CoreCommands.MoveTo.id, { position: new Position(2, 14) }, 'keyboard'); - cursorCommand(cursor, H.Tab, null, 'keyboard'); + CoreNavigationCommands.MoveTo.runCoreEditorCommand(cursor, { position: new Position(2, 14) }); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), 'My Second Lin e123'); }); + + model.dispose(); }); test('Enter auto-indents with insertSpaces setting 1', () => { @@ -1865,90 +1863,6 @@ suite('Editor Controller - Cursor Configuration', () => { mode.dispose(); }); - test('Insert line before', () => { - let testInsertLineBefore = (lineNumber: number, column: number, callback: (model: Model, cursor: Cursor) => void) => { - usingCursor({ - text: [ - 'First line', - 'Second line', - 'Third line' - ], - }, (model, cursor) => { - moveTo(cursor, lineNumber, column, false); - assertCursor(cursor, new Position(lineNumber, column)); - - cursorCommand(cursor, H.LineInsertBefore, null, 'keyboard'); - callback(model, cursor); - }); - }; - - testInsertLineBefore(1, 3, (model, cursor) => { - assertCursor(cursor, new Selection(1, 1, 1, 1)); - assert.equal(model.getLineContent(1), ''); - assert.equal(model.getLineContent(2), 'First line'); - assert.equal(model.getLineContent(3), 'Second line'); - assert.equal(model.getLineContent(4), 'Third line'); - }); - - testInsertLineBefore(2, 3, (model, cursor) => { - assertCursor(cursor, new Selection(2, 1, 2, 1)); - assert.equal(model.getLineContent(1), 'First line'); - assert.equal(model.getLineContent(2), ''); - assert.equal(model.getLineContent(3), 'Second line'); - assert.equal(model.getLineContent(4), 'Third line'); - }); - - testInsertLineBefore(3, 3, (model, cursor) => { - assertCursor(cursor, new Selection(3, 1, 3, 1)); - assert.equal(model.getLineContent(1), 'First line'); - assert.equal(model.getLineContent(2), 'Second line'); - assert.equal(model.getLineContent(3), ''); - assert.equal(model.getLineContent(4), 'Third line'); - }); - }); - - test('Insert line after', () => { - let testInsertLineAfter = (lineNumber: number, column: number, callback: (model: Model, cursor: Cursor) => void) => { - usingCursor({ - text: [ - 'First line', - 'Second line', - 'Third line' - ], - }, (model, cursor) => { - moveTo(cursor, lineNumber, column, false); - assertCursor(cursor, new Position(lineNumber, column)); - - cursorCommand(cursor, H.LineInsertAfter, null, 'keyboard'); - callback(model, cursor); - }); - }; - - testInsertLineAfter(1, 3, (model, cursor) => { - assertCursor(cursor, new Selection(2, 1, 2, 1)); - assert.equal(model.getLineContent(1), 'First line'); - assert.equal(model.getLineContent(2), ''); - assert.equal(model.getLineContent(3), 'Second line'); - assert.equal(model.getLineContent(4), 'Third line'); - }); - - testInsertLineAfter(2, 3, (model, cursor) => { - assertCursor(cursor, new Selection(3, 1, 3, 1)); - assert.equal(model.getLineContent(1), 'First line'); - assert.equal(model.getLineContent(2), 'Second line'); - assert.equal(model.getLineContent(3), ''); - assert.equal(model.getLineContent(4), 'Third line'); - }); - - testInsertLineAfter(3, 3, (model, cursor) => { - assertCursor(cursor, new Selection(4, 1, 4, 1)); - assert.equal(model.getLineContent(1), 'First line'); - assert.equal(model.getLineContent(2), 'Second line'); - assert.equal(model.getLineContent(3), 'Third line'); - assert.equal(model.getLineContent(4), ''); - }); - }); - test('removeAutoWhitespace off', () => { usingCursor({ text: [ @@ -2048,25 +1962,27 @@ suite('Editor Controller - Cursor Configuration', () => { }); test('removeAutoWhitespace on: removes only whitespace the cursor added 2', () => { - usingCursor({ - text: [ + let model = Model.createFromString( + [ ' if (a) {', ' ', '', '', ' }' - ], - modelOpts: { + ].join('\n'), + { insertSpaces: true, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } - }, (model, cursor) => { + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { moveTo(cursor, 3, 1); - cursorCommand(cursor, H.Tab, null, 'keyboard'); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(1), ' if (a) {'); assert.equal(model.getLineContent(2), ' '); assert.equal(model.getLineContent(3), ' '); @@ -2074,7 +1990,7 @@ suite('Editor Controller - Cursor Configuration', () => { assert.equal(model.getLineContent(5), ' }'); moveTo(cursor, 4, 1); - cursorCommand(cursor, H.Tab, null, 'keyboard'); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(1), ' if (a) {'); assert.equal(model.getLineContent(2), ' '); assert.equal(model.getLineContent(3), ''); @@ -2089,21 +2005,25 @@ suite('Editor Controller - Cursor Configuration', () => { assert.equal(model.getLineContent(4), ''); assert.equal(model.getLineContent(5), ' }something'); }); + + model.dispose(); }); test('removeAutoWhitespace on: test 1', () => { - usingCursor({ - text: [ + let model = Model.createFromString( + [ ' some line abc ' - ], - modelOpts: { + ].join('\n'), + { insertSpaces: true, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } - }, (model, cursor) => { + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { // Move cursor to the end, verify that we do not trim whitespaces if line has values moveTo(cursor, 1, model.getLineContent(1).length + 1); @@ -2118,7 +2038,7 @@ suite('Editor Controller - Cursor Configuration', () => { assert.equal(model.getLineContent(3), ' '); // More whitespaces - cursorCommand(cursor, H.Tab, null, 'keyboard'); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(1), ' some line abc '); assert.equal(model.getLineContent(2), ''); assert.equal(model.getLineContent(3), ' '); @@ -2149,63 +2069,65 @@ suite('Editor Controller - Cursor Configuration', () => { assert.equal(model.getLineContent(4), ''); assert.equal(model.getLineContent(5), ''); }); + + model.dispose(); }); test('UseTabStops is off', () => { - usingCursor({ - text: [ + let model = Model.createFromString( + [ ' x', ' a ', ' ' - ], - modelOpts: { + ].join('\n'), + { insertSpaces: true, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true - }, - editorOpts: { - useTabStops: false } - }, (model, cursor) => { + ); + + withMockCodeEditor(null, { model: model, useTabStops: false }, (editor, cursor) => { // DeleteLeft removes just one whitespace moveTo(cursor, 2, 9); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), ' a '); }); + + model.dispose(); }); test('Backspace removes whitespaces with tab size', () => { - usingCursor({ - text: [ + let model = Model.createFromString( + [ ' \t \t x', ' a ', ' ' - ], - modelOpts: { + ].join('\n'), + { insertSpaces: true, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true - }, - editorOpts: { - useTabStops: true } - }, (model, cursor) => { + ); + + withMockCodeEditor(null, { model: model, useTabStops: true }, (editor, cursor) => { // DeleteLeft does not remove tab size, because some text exists before moveTo(cursor, 2, model.getLineContent(2).length + 1); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), ' a '); // DeleteLeft removes tab size = 4 moveTo(cursor, 2, 9); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), ' a '); // DeleteLeft removes tab size = 4 - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), 'a '); // Undo DeleteLeft - get us back to original indentation @@ -2214,57 +2136,61 @@ suite('Editor Controller - Cursor Configuration', () => { // Nothing is broken when cursor is in (1,1) moveTo(cursor, 1, 1); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(1), ' \t \t x'); // DeleteLeft stops at tab stops even in mixed whitespace case moveTo(cursor, 1, 10); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(1), ' \t \t x'); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(1), ' \t \tx'); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(1), ' \tx'); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(1), 'x'); // DeleteLeft on last line moveTo(cursor, 3, model.getLineContent(3).length + 1); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(3), ''); // DeleteLeft with removing new line symbol - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getValue(EndOfLinePreference.LF), 'x\n a '); // In case of selection DeleteLeft only deletes selected text moveTo(cursor, 2, 3); moveTo(cursor, 2, 4, true); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), ' a '); }); + + model.dispose(); }); test('PR #5423: Auto indent + undo + redo is funky', () => { - usingCursor({ - text: [ + let model = Model.createFromString( + [ '' - ], - modelOpts: { + ].join('\n'), + { defaultEOL: DefaultEndOfLine.LF, detectIndentation: false, insertSpaces: false, tabSize: 4, trimAutoWhitespace: true } - }, (model, cursor) => { + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); assert.equal(model.getValue(EndOfLinePreference.LF), '\n', 'assert1'); - cursorCommand(cursor, H.Tab, {}); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getValue(EndOfLinePreference.LF), '\n\t', 'assert2'); cursorCommand(cursor, H.Type, { text: 'y' }, 'keyboard'); @@ -2276,22 +2202,22 @@ suite('Editor Controller - Cursor Configuration', () => { cursorCommand(cursor, H.Type, { text: 'x' }); assert.equal(model.getValue(EndOfLinePreference.LF), '\n\ty\n\tx', 'assert4'); - CoreCommands.CursorLeft.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorLeft.runCoreEditorCommand(cursor, {}); assert.equal(model.getValue(EndOfLinePreference.LF), '\n\ty\n\tx', 'assert5'); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getValue(EndOfLinePreference.LF), '\n\ty\nx', 'assert6'); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getValue(EndOfLinePreference.LF), '\n\tyx', 'assert7'); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getValue(EndOfLinePreference.LF), '\n\tx', 'assert8'); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getValue(EndOfLinePreference.LF), '\nx', 'assert9'); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getValue(EndOfLinePreference.LF), 'x', 'assert10'); cursorCommand(cursor, H.Undo, {}); @@ -2312,6 +2238,8 @@ suite('Editor Controller - Cursor Configuration', () => { cursorCommand(cursor, H.Redo, {}); assert.equal(model.getValue(EndOfLinePreference.LF), 'x', 'assert16'); }); + + model.dispose(); }); }); @@ -2323,8 +2251,6 @@ suite('Editor Controller - Indentation Rules', () => { unIndentedLinePattern: /^(?!.*([;{}]|\S:)\s*(\/\/.*|\/[*].*[*]\/\s*)?$)(?!.*(\{[^}"']*|\([^)"']*|\[[^\]"']*|^\s*(\{\}|\(\)|\[\]|(case\b.*|default):))\s*(\/\/.*|\/[*].*[*]\/\s*)?$)(?!^\s*((?!\S.*\/[*]).*[*]\/\s*)?[})\]]|^\s*(case\b.*|default):\s*(\/\/.*|\/[*].*[*]\/\s*)?$)(?!^\s*(for|while|if|else)\b(?!.*[;{}]\s*(\/\/.*|\/[*].*[*]\/\s*)?$))/ }); - let emptyRulesMode = new OnEnterMode(IndentAction.None); - test('Enter honors increaseIndentPattern', () => { usingCursor({ text: [ @@ -2332,7 +2258,8 @@ suite('Editor Controller - Indentation Rules', () => { '\tif (true) {' ], languageIdentifier: mode.getLanguageIdentifier(), - modelOpts: { insertSpaces: false, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } + modelOpts: { insertSpaces: false, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true }, + editorOpts: { autoIndent: true } }, (model, cursor) => { moveTo(cursor, 1, 12, false); assertCursor(cursor, new Selection(1, 12, 1, 12)); @@ -2348,20 +2275,21 @@ suite('Editor Controller - Indentation Rules', () => { }); }); - test('Enter honors decreaseIndentPattern', () => { + test('Type honors decreaseIndentPattern', () => { usingCursor({ text: [ 'if (true) {', - '\t}' + '\t' ], languageIdentifier: mode.getLanguageIdentifier(), - modelOpts: { insertSpaces: false, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } + modelOpts: { insertSpaces: false, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true }, + editorOpts: { autoIndent: true } }, (model, cursor) => { - moveTo(cursor, 2, 3, false); - assertCursor(cursor, new Selection(2, 3, 2, 3)); + moveTo(cursor, 2, 2, false); + assertCursor(cursor, new Selection(2, 2, 2, 2)); - cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); - assertCursor(cursor, new Selection(3, 1, 3, 1)); + cursorCommand(cursor, H.Type, { text: '}' }, 'keyboard'); + assertCursor(cursor, new Selection(2, 2, 2, 2)); assert.equal(model.getLineContent(2), '}', '001'); }); }); @@ -2373,7 +2301,8 @@ suite('Editor Controller - Indentation Rules', () => { '\t\t\treturn true' ], languageIdentifier: mode.getLanguageIdentifier(), - modelOpts: { insertSpaces: false, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } + modelOpts: { insertSpaces: false, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true }, + editorOpts: { autoIndent: true } }, (model, cursor) => { moveTo(cursor, 2, 15, false); assertCursor(cursor, new Selection(2, 15, 2, 15)); @@ -2392,7 +2321,8 @@ suite('Editor Controller - Indentation Rules', () => { '\t\t\t\treturn true' ], languageIdentifier: mode.getLanguageIdentifier(), - modelOpts: { insertSpaces: false, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } + modelOpts: { insertSpaces: false, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true }, + editorOpts: { autoIndent: true } }, (model, cursor) => { moveTo(cursor, 2, 14, false); assertCursor(cursor, new Selection(2, 14, 2, 14)); @@ -2408,43 +2338,55 @@ suite('Editor Controller - Indentation Rules', () => { }); }); - test('Enter adjusts indentation of current line 1', () => { - usingCursor({ - text: [ - 'if (true) {', - '\tif (true) {', - '\t\treturn true;', - '\t\t}}' - ], - languageIdentifier: mode.getLanguageIdentifier(), - modelOpts: { insertSpaces: false, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } - }, (model, cursor) => { - moveTo(cursor, 4, 4, false); - assertCursor(cursor, new Selection(4, 4, 4, 4)); + test('Enter honors indentNextLinePattern 2', () => { + let model = Model.createFromString( + [ + 'if (true)', + '\tif (true)' + ].join('\n'), + { + defaultEOL: DefaultEndOfLine.LF, + detectIndentation: false, + insertSpaces: false, + tabSize: 4, + trimAutoWhitespace: true + }, + mode.getLanguageIdentifier() + ); + + withMockCodeEditor(null, { model: model, autoIndent: true }, (editor, cursor) => { + moveTo(cursor, 2, 11, false); + assertCursor(cursor, new Selection(2, 11, 2, 11)); cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); - assertCursor(cursor, new Selection(5, 1, 5, 1)); - assert.equal(model.getLineContent(4), '\t}', '001'); + assertCursor(cursor, new Selection(3, 3, 3, 3)); + + cursorCommand(cursor, H.Type, { text: 'console.log();' }, 'keyboard'); + cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); + assertCursor(cursor, new Selection(4, 1, 4, 1)); }); + + model.dispose(); }); - test('Enter adjusts indentation of current line 2', () => { + test('Enter honors intential indent', () => { usingCursor({ text: [ 'if (true) {', '\tif (true) {', - '\t\treturn true;', + 'return true;', '}}' ], languageIdentifier: mode.getLanguageIdentifier(), - modelOpts: { insertSpaces: false, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } + modelOpts: { insertSpaces: false, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true }, + editorOpts: { autoIndent: true } }, (model, cursor) => { - moveTo(cursor, 4, 2, false); - assertCursor(cursor, new Selection(4, 2, 4, 2)); + moveTo(cursor, 3, 13, false); + assertCursor(cursor, new Selection(3, 13, 3, 13)); cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); - assertCursor(cursor, new Selection(5, 1, 5, 1)); - assert.equal(model.getLineContent(4), '}', '001'); + assertCursor(cursor, new Selection(4, 1, 4, 1)); + assert.equal(model.getLineContent(3), 'return true;', '001'); }); }); @@ -2454,14 +2396,14 @@ suite('Editor Controller - Indentation Rules', () => { 'if (true) {', '\tif (true) {', '\t\treturn true;', - '\t\t}a}' + '\t}a}' ], languageIdentifier: mode.getLanguageIdentifier(), modelOpts: { insertSpaces: false, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } }, (model, cursor) => { - moveTo(cursor, 4, 4, false); - moveTo(cursor, 4, 5, true); - assertCursor(cursor, new Selection(4, 4, 4, 5)); + moveTo(cursor, 4, 3, false); + moveTo(cursor, 4, 4, true); + assertCursor(cursor, new Selection(4, 3, 4, 4)); cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); assertCursor(cursor, new Selection(5, 1, 5, 1)); @@ -2572,7 +2514,8 @@ suite('Editor Controller - Indentation Rules', () => { '\t}' ], languageIdentifier: mode.getLanguageIdentifier(), - modelOpts: { insertSpaces: false, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } + modelOpts: { insertSpaces: false, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true }, + editorOpts: { autoIndent: true } }, (model, cursor) => { moveTo(cursor, 5, 4, false); assertCursor(cursor, new Selection(5, 4, 5, 4)); @@ -2583,39 +2526,230 @@ suite('Editor Controller - Indentation Rules', () => { }); }); - test('issue Microsoft/monaco-editor#108 part 1/2: Auto indentation on Enter with selection is half broken', () => { + test('Enter should not adjust cursor position when press enter in the middle of a line 1', () => { usingCursor({ text: [ - 'function baz() {', - '\tvar x = 1;', - '\t\t\t\t\t\t\treturn x;', - '}' + 'if (true) {', + '\tif (true) {', + '\t\treturn true;', + '\t}a}' ], - modelOpts: { - defaultEOL: DefaultEndOfLine.LF, - detectIndentation: false, - insertSpaces: false, - tabSize: 4, - trimAutoWhitespace: true - }, languageIdentifier: mode.getLanguageIdentifier(), + modelOpts: { insertSpaces: false, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } }, (model, cursor) => { - moveTo(cursor, 3, 8, false); - moveTo(cursor, 2, 12, true); - assertCursor(cursor, new Selection(3, 8, 2, 12)); + moveTo(cursor, 3, 9, false); + assertCursor(cursor, new Selection(3, 9, 3, 9)); cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); - assert.equal(model.getLineContent(3), '\treturn x;'); - assertCursor(cursor, new Position(3, 2)); + assertCursor(cursor, new Selection(4, 3, 4, 3)); + assert.equal(model.getLineContent(4), '\t\t true;', '001'); }); }); - test('issue Microsoft/monaco-editor#108 part 2/2: Auto indentation on Enter with selection is half broken', () => { + test('Enter should not adjust cursor position when press enter in the middle of a line 2', () => { usingCursor({ text: [ - 'function baz() {', - '\tvar x = 1;', - '\t\t\t\t\t\t\treturn x;', + 'if (true) {', + '\tif (true) {', + '\t\treturn true;', + '\t}a}' + ], + languageIdentifier: mode.getLanguageIdentifier(), + modelOpts: { insertSpaces: false, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } + }, (model, cursor) => { + moveTo(cursor, 3, 3, false); + assertCursor(cursor, new Selection(3, 3, 3, 3)); + + cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); + assertCursor(cursor, new Selection(4, 3, 4, 3)); + assert.equal(model.getLineContent(4), '\t\treturn true;', '001'); + }); + }); + + test('Enter should not adjust cursor position when press enter in the middle of a line 3', () => { + usingCursor({ + text: [ + 'if (true) {', + ' if (true) {', + ' return true;', + ' }a}' + ], + languageIdentifier: mode.getLanguageIdentifier(), + modelOpts: { insertSpaces: true, tabSize: 2, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } + }, (model, cursor) => { + moveTo(cursor, 3, 11, false); + assertCursor(cursor, new Selection(3, 11, 3, 11)); + + cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); + assertCursor(cursor, new Selection(4, 5, 4, 5)); + assert.equal(model.getLineContent(4), ' true;', '001'); + }); + }); + + test('Enter should adjust cursor position when press enter in the middle of leading whitespaces 1', () => { + usingCursor({ + text: [ + 'if (true) {', + '\tif (true) {', + '\t\treturn true;', + '\t}a}' + ], + languageIdentifier: mode.getLanguageIdentifier(), + modelOpts: { insertSpaces: false, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } + }, (model, cursor) => { + moveTo(cursor, 3, 2, false); + assertCursor(cursor, new Selection(3, 2, 3, 2)); + + cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); + assertCursor(cursor, new Selection(4, 2, 4, 2)); + assert.equal(model.getLineContent(4), '\t\treturn true;', '001'); + + moveTo(cursor, 4, 1, false); + assertCursor(cursor, new Selection(4, 1, 4, 1)); + + cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); + assertCursor(cursor, new Selection(5, 1, 5, 1)); + assert.equal(model.getLineContent(5), '\t\treturn true;', '002'); + }); + }); + + test('Enter should adjust cursor position when press enter in the middle of leading whitespaces 2', () => { + usingCursor({ + text: [ + '\tif (true) {', + '\t\tif (true) {', + '\t \treturn true;', + '\t\t}a}' + ], + languageIdentifier: mode.getLanguageIdentifier(), + modelOpts: { insertSpaces: false, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } + }, (model, cursor) => { + moveTo(cursor, 3, 4, false); + assertCursor(cursor, new Selection(3, 4, 3, 4)); + + cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); + assertCursor(cursor, new Selection(4, 3, 4, 3)); + assert.equal(model.getLineContent(4), '\t\t\treturn true;', '001'); + + moveTo(cursor, 4, 1, false); + assertCursor(cursor, new Selection(4, 1, 4, 1)); + + cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); + assertCursor(cursor, new Selection(5, 1, 5, 1)); + assert.equal(model.getLineContent(5), '\t\t\treturn true;', '002'); + }); + }); + + test('Enter should adjust cursor position when press enter in the middle of leading whitespaces 3', () => { + usingCursor({ + text: [ + 'if (true) {', + ' if (true) {', + ' return true;', + '}a}' + ], + languageIdentifier: mode.getLanguageIdentifier(), + modelOpts: { insertSpaces: true, tabSize: 2, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } + }, (model, cursor) => { + moveTo(cursor, 3, 2, false); + assertCursor(cursor, new Selection(3, 2, 3, 2)); + + cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); + assertCursor(cursor, new Selection(4, 2, 4, 2)); + assert.equal(model.getLineContent(4), ' return true;', '001'); + + moveTo(cursor, 4, 3, false); + cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); + assertCursor(cursor, new Selection(5, 3, 5, 3)); + assert.equal(model.getLineContent(5), ' return true;', '002'); + }); + }); + + test('Enter should adjust cursor position when press enter in the middle of leading whitespaces 4', () => { + usingCursor({ + text: [ + 'if (true) {', + ' if (true) {', + '\t return true;', + '}a}', + '', + 'if (true) {', + ' if (true) {', + '\t return true;', + '}a}' + ], + languageIdentifier: mode.getLanguageIdentifier(), + modelOpts: { insertSpaces: true, tabSize: 2, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } + }, (model, cursor) => { + moveTo(cursor, 3, 3, false); + assertCursor(cursor, new Selection(3, 3, 3, 3)); + + cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); + assertCursor(cursor, new Selection(4, 4, 4, 4)); + assert.equal(model.getLineContent(4), ' return true;', '001'); + + moveTo(cursor, 9, 4, false); + cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); + assertCursor(cursor, new Selection(10, 5, 10, 5)); + assert.equal(model.getLineContent(10), ' return true;', '001'); + }); + }); + + test('Enter should adjust cursor position when press enter in the middle of leading whitespaces 5', () => { + usingCursor({ + text: [ + 'if (true) {', + ' if (true) {', + ' return true;', + ' return true;', + '' + ], + languageIdentifier: mode.getLanguageIdentifier(), + modelOpts: { insertSpaces: true, tabSize: 2, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } + }, (model, cursor) => { + moveTo(cursor, 3, 5, false); + moveTo(cursor, 4, 3, true); + assertCursor(cursor, new Selection(3, 5, 4, 3)); + + cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); + assertCursor(cursor, new Selection(4, 3, 4, 3)); + assert.equal(model.getLineContent(4), ' return true;', '001'); + }); + }); + + test('issue Microsoft/monaco-editor#108 part 1/2: Auto indentation on Enter with selection is half broken', () => { + usingCursor({ + text: [ + 'function baz() {', + '\tvar x = 1;', + '\t\t\t\t\t\t\treturn x;', + '}' + ], + modelOpts: { + defaultEOL: DefaultEndOfLine.LF, + detectIndentation: false, + insertSpaces: false, + tabSize: 4, + trimAutoWhitespace: true + }, + languageIdentifier: mode.getLanguageIdentifier(), + }, (model, cursor) => { + moveTo(cursor, 3, 8, false); + moveTo(cursor, 2, 12, true); + assertCursor(cursor, new Selection(3, 8, 2, 12)); + + cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); + assert.equal(model.getLineContent(3), '\treturn x;'); + assertCursor(cursor, new Position(3, 2)); + }); + }); + + test('issue Microsoft/monaco-editor#108 part 2/2: Auto indentation on Enter with selection is half broken', () => { + usingCursor({ + text: [ + 'function baz() {', + '\tvar x = 1;', + '\t\t\t\t\t\t\treturn x;', '}' ], modelOpts: { @@ -2647,7 +2781,6 @@ suite('Editor Controller - Indentation Rules', () => { '\t}', '?>' ], - languageIdentifier: emptyRulesMode.getLanguageIdentifier(), modelOpts: { insertSpaces: false, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } }, (model, cursor) => { moveTo(cursor, 5, 3, false); @@ -2667,7 +2800,6 @@ suite('Editor Controller - Indentation Rules', () => { ' return 5;', ' ' ], - languageIdentifier: emptyRulesMode.getLanguageIdentifier(), modelOpts: { insertSpaces: false, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } }, (model, cursor) => { moveTo(cursor, 3, 2, false); @@ -2678,6 +2810,218 @@ suite('Editor Controller - Indentation Rules', () => { assert.equal(model.getLineContent(4), '\t'); }); }); + + test('bug #16543: Tab should indent to correct indentation spot immediately', () => { + let model = Model.createFromString( + [ + 'function baz() {', + '\tfunction hello() { // something here', + '\t', + '', + '\t}', + '}' + ].join('\n'), + { + defaultEOL: DefaultEndOfLine.LF, + detectIndentation: false, + insertSpaces: false, + tabSize: 4, + trimAutoWhitespace: true + }, + mode.getLanguageIdentifier() + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { + moveTo(cursor, 4, 1, false); + assertCursor(cursor, new Selection(4, 1, 4, 1)); + + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); + assert.equal(model.getLineContent(4), '\t\t'); + }); + + model.dispose(); + }); + + + test('bug #2938 (1): When pressing Tab on white-space only lines, indent straight to the right spot (similar to empty lines)', () => { + let model = Model.createFromString( + [ + '\tfunction baz() {', + '\t\tfunction hello() { // something here', + '\t\t', + '\t', + '\t\t}', + '\t}' + ].join('\n'), + { + defaultEOL: DefaultEndOfLine.LF, + detectIndentation: false, + insertSpaces: false, + tabSize: 4, + trimAutoWhitespace: true + }, + mode.getLanguageIdentifier() + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { + moveTo(cursor, 4, 2, false); + assertCursor(cursor, new Selection(4, 2, 4, 2)); + + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); + assert.equal(model.getLineContent(4), '\t\t\t'); + }); + + model.dispose(); + }); + + + test('bug #2938 (2): When pressing Tab on white-space only lines, indent straight to the right spot (similar to empty lines)', () => { + let model = Model.createFromString( + [ + '\tfunction baz() {', + '\t\tfunction hello() { // something here', + '\t\t', + ' ', + '\t\t}', + '\t}' + ].join('\n'), + { + defaultEOL: DefaultEndOfLine.LF, + detectIndentation: false, + insertSpaces: false, + tabSize: 4, + trimAutoWhitespace: true + }, + mode.getLanguageIdentifier() + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { + moveTo(cursor, 4, 1, false); + assertCursor(cursor, new Selection(4, 1, 4, 1)); + + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); + assert.equal(model.getLineContent(4), '\t\t\t'); + }); + + model.dispose(); + }); + + test('bug #2938 (3): When pressing Tab on white-space only lines, indent straight to the right spot (similar to empty lines)', () => { + let model = Model.createFromString( + [ + '\tfunction baz() {', + '\t\tfunction hello() { // something here', + '\t\t', + '\t\t\t', + '\t\t}', + '\t}' + ].join('\n'), + { + defaultEOL: DefaultEndOfLine.LF, + detectIndentation: false, + insertSpaces: false, + tabSize: 4, + trimAutoWhitespace: true + }, + mode.getLanguageIdentifier() + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { + moveTo(cursor, 4, 3, false); + assertCursor(cursor, new Selection(4, 3, 4, 3)); + + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); + assert.equal(model.getLineContent(4), '\t\t\t\t'); + }); + + model.dispose(); + }); + + test('bug #2938 (4): When pressing Tab on white-space only lines, indent straight to the right spot (similar to empty lines)', () => { + let model = Model.createFromString( + [ + '\tfunction baz() {', + '\t\tfunction hello() { // something here', + '\t\t', + '\t\t\t\t', + '\t\t}', + '\t}' + ].join('\n'), + { + defaultEOL: DefaultEndOfLine.LF, + detectIndentation: false, + insertSpaces: false, + tabSize: 4, + trimAutoWhitespace: true + }, + mode.getLanguageIdentifier() + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { + moveTo(cursor, 4, 4, false); + assertCursor(cursor, new Selection(4, 4, 4, 4)); + + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); + assert.equal(model.getLineContent(4), '\t\t\t\t\t'); + }); + + model.dispose(); + }); + + test('type honors indentation rules: ruby keywords', () => { + let rubyMode = new IndentRulesMode({ + increaseIndentPattern: /^\s*((begin|class|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while)|(.*\sdo\b))\b[^\{;]*$/, + decreaseIndentPattern: /^\s*([}\]]([,)]?\s*(#|$)|\.[a-zA-Z_]\w*\b)|(end|rescue|ensure|else|elsif|when)\b)/ + }); + let model = Model.createFromString( + [ + 'class Greeter', + ' def initialize(name)', + ' @name = name', + ' en' + ].join('\n'), + { + defaultEOL: DefaultEndOfLine.LF, + detectIndentation: false, + insertSpaces: true, + tabSize: 2, + trimAutoWhitespace: true + }, + rubyMode.getLanguageIdentifier() + ); + + withMockCodeEditor(null, { model: model, autoIndent: true }, (editor, cursor) => { + moveTo(cursor, 4, 7, false); + assertCursor(cursor, new Selection(4, 7, 4, 7)); + + cursorCommand(cursor, H.Type, { text: 'd' }, 'keyboard'); + assert.equal(model.getLineContent(4), ' end'); + }); + + rubyMode.dispose(); + model.dispose(); + }); + + test('Auto indent on type: increaseIndentPattern has higher priority than decreaseIndent when inheriting', () => { + usingCursor({ + text: [ + '\tif (true) {', + '\t\tconsole.log();', + '\t} else if {', + '\t\tconsole.log()', + '\t}' + ], + languageIdentifier: mode.getLanguageIdentifier(), + modelOpts: { insertSpaces: false, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } + }, (model, cursor) => { + moveTo(cursor, 5, 3, false); + assertCursor(cursor, new Selection(5, 3, 5, 3)); + + cursorCommand(cursor, H.Type, { text: 'e' }, 'keyboard'); + assertCursor(cursor, new Selection(5, 4, 5, 4)); + assert.equal(model.getLineContent(5), '\t}e', 'This line should not decrease indent'); + }); + }); }); interface ICursorOpts { @@ -2690,11 +3034,13 @@ interface ICursorOpts { function usingCursor(opts: ICursorOpts, callback: (model: Model, cursor: Cursor) => void): void { let model = Model.createFromString(opts.text.join('\n'), opts.modelOpts, opts.languageIdentifier); let config = new TestConfiguration(opts.editorOpts); - let cursor = new Cursor(config, model, viewModelHelper(model), false); + let viewModel = new ViewModel(0, config, model); + let cursor = new Cursor(config, model, viewModel); callback(model, cursor); cursor.dispose(); + viewModel.dispose(); config.dispose(); model.dispose(); } @@ -2936,13 +3282,30 @@ suite('ElectricCharacter', () => { }); mode.dispose(); }); + + test('issue #23711: Replacing selected text with )]} fails to delete old text with backwards-dragged selection', () => { + let mode = new ElectricCharMode(); + usingCursor({ + text: [ + '{', + 'word' + ], + languageIdentifier: mode.getLanguageIdentifier() + }, (model, cursor) => { + moveTo(cursor, 2, 5); + moveTo(cursor, 2, 1, true); + cursorCommand(cursor, H.Type, { text: '}' }, 'keyboard'); + assert.deepEqual(model.getLineContent(2), '}'); + }); + mode.dispose(); + }); }); suite('autoClosingPairs', () => { class AutoClosingMode extends MockMode { - private static _id = new LanguageIdentifier('autoClosingMode', 3); + private static _id = new LanguageIdentifier('autoClosingMode', 5); constructor() { super(AutoClosingMode._id); @@ -3052,14 +3415,14 @@ suite('autoClosingPairs', () => { }, (model, cursor) => { let autoClosePositions = [ - 'var| a| =| [|];|', - 'var| b| =| |`asd|`;|', - 'var| c| =| !\'asd!\';|', - 'var| d| =| |"asd|";|', - 'var| e| =| /*3*/| 3;|', - 'var| f| =| /**| 3| */3;|', - 'var| g| =| (3+5|);|', - 'var| h| =| {| a:| !\'value!\'| |};|', + 'var a =| [|];|', + 'var b =| |`asd`;|', + 'var c =| !\'asd!\';|', + 'var d =| |"asd";|', + 'var e =| /*3*/| 3;|', + 'var f =| /**| 3 */3;|', + 'var g =| (3+5);|', + 'var h =| {| a:| !\'value!\'| |};|', ]; for (let i = 0, len = autoClosePositions.length; i < len; i++) { const lineNumber = i + 1; @@ -3079,6 +3442,64 @@ suite('autoClosingPairs', () => { mode.dispose(); }); + test('issue #25658 - Do not auto-close single/double quotes after word characters', () => { + let mode = new AutoClosingMode(); + usingCursor({ + text: [ + '', + ], + languageIdentifier: mode.getLanguageIdentifier() + }, (model, cursor) => { + + function typeCharacters(cursor: Cursor, chars: string): void { + for (let i = 0, len = chars.length; i < len; i++) { + cursorCommand(cursor, H.Type, { text: chars[i] }, 'keyboard'); + } + } + + // First gif + typeCharacters(cursor, 'teste1 = teste\' ok'); + assert.equal(model.getLineContent(1), 'teste1 = teste\' ok'); + + cursor.setSelections('test', [new Selection(1, 1000, 1, 1000)]); + typeCharacters(cursor, '\n'); + typeCharacters(cursor, 'teste2 = teste \'ok'); + assert.equal(model.getLineContent(2), 'teste2 = teste \'ok\''); + + cursor.setSelections('test', [new Selection(2, 1000, 2, 1000)]); + typeCharacters(cursor, '\n'); + typeCharacters(cursor, 'teste3 = teste" ok'); + assert.equal(model.getLineContent(3), 'teste3 = teste" ok'); + + cursor.setSelections('test', [new Selection(3, 1000, 3, 1000)]); + typeCharacters(cursor, '\n'); + typeCharacters(cursor, 'teste4 = teste "ok'); + assert.equal(model.getLineContent(4), 'teste4 = teste "ok"'); + + // Second gif + cursor.setSelections('test', [new Selection(4, 1000, 4, 1000)]); + typeCharacters(cursor, '\n'); + typeCharacters(cursor, 'teste \''); + assert.equal(model.getLineContent(5), 'teste \'\''); + + cursor.setSelections('test', [new Selection(5, 1000, 5, 1000)]); + typeCharacters(cursor, '\n'); + typeCharacters(cursor, 'teste "'); + assert.equal(model.getLineContent(6), 'teste ""'); + + cursor.setSelections('test', [new Selection(6, 1000, 6, 1000)]); + typeCharacters(cursor, '\n'); + typeCharacters(cursor, 'teste\''); + assert.equal(model.getLineContent(7), 'teste\''); + + cursor.setSelections('test', [new Selection(7, 1000, 7, 1000)]); + typeCharacters(cursor, '\n'); + typeCharacters(cursor, 'teste"'); + assert.equal(model.getLineContent(8), 'teste"'); + }); + mode.dispose(); + }); + test('issue #15825: accents on mac US intl keyboard', () => { let mode = new AutoClosingMode(); usingCursor({ @@ -3099,6 +3520,32 @@ suite('autoClosingPairs', () => { mode.dispose(); }); + test('issue #2773: Accents (´`¨^, others?) are inserted in the wrong position (Mac)', () => { + let mode = new AutoClosingMode(); + usingCursor({ + text: [ + 'hello', + 'world' + ], + languageIdentifier: mode.getLanguageIdentifier() + }, (model, cursor) => { + assertCursor(cursor, new Position(1, 1)); + + // Typing ` and pressing shift+down on the mac US intl kb layout + // Here we're just replaying what the cursor gets + cursorCommand(cursor, H.CompositionStart, null, 'keyboard'); + cursorCommand(cursor, H.Type, { text: '`' }, 'keyboard'); + moveDown(cursor, true); + cursorCommand(cursor, H.ReplacePreviousChar, { replaceCharCnt: 1, text: '`' }, 'keyboard'); + cursorCommand(cursor, H.ReplacePreviousChar, { replaceCharCnt: 1, text: '`' }, 'keyboard'); + cursorCommand(cursor, H.CompositionEnd, null, 'keyboard'); + + assert.equal(model.getValue(), '`hello\nworld'); + assertCursor(cursor, new Selection(1, 2, 2, 2)); + }); + mode.dispose(); + }); + test('issue #20891: All cursors should do the same thing', () => { let mode = new AutoClosingMode(); usingCursor({ @@ -3123,23 +3570,26 @@ suite('autoClosingPairs', () => { test('All cursors should do the same thing when deleting left', () => { let mode = new AutoClosingMode(); - usingCursor({ - text: [ + let model = Model.createFromString( + [ 'var a = ()' - ], - languageIdentifier: mode.getLanguageIdentifier() - }, (model, cursor) => { + ].join('\n'), + TextModel.DEFAULT_CREATION_OPTIONS, + mode.getLanguageIdentifier() + ); + withMockCodeEditor(null, { model: model }, (editor, cursor) => { cursor.setSelections('test', [ new Selection(1, 4, 1, 4), new Selection(1, 10, 1, 10), ]); // delete left - cursorCommand(cursor, H.DeleteLeft, null, 'keyboard'); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getValue(), 'va a = )'); }); + model.dispose(); mode.dispose(); }); }); diff --git a/src/vs/editor/test/common/controller/cursorMoveCommand.test.ts b/src/vs/editor/test/common/controller/cursorMoveCommand.test.ts index c1388ba58e870..2b9ac20069d6f 100644 --- a/src/vs/editor/test/common/controller/cursorMoveCommand.test.ts +++ b/src/vs/editor/test/common/controller/cursorMoveCommand.test.ts @@ -7,22 +7,19 @@ import * as assert from 'assert'; import { Cursor } from 'vs/editor/common/controller/cursor'; import { Position } from 'vs/editor/common/core/position'; -import { ITextModelCreationOptions } from 'vs/editor/common/editorCommon'; import { Model } from 'vs/editor/common/model/model'; -import { IMode } from 'vs/editor/common/modes'; import { TestConfiguration } from 'vs/editor/test/common/mocks/testConfiguration'; -import { viewModelHelper as aViewModelHelper } from 'vs/editor/test/common/editorTestUtils'; import { CursorMove } from 'vs/editor/common/controller/cursorMoveCommands'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; -import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; -import { IViewModelHelper } from 'vs/editor/common/controller/cursorCommon'; -import { CoreCommands } from 'vs/editor/common/controller/coreCommands'; +import { CoreNavigationCommands } from 'vs/editor/common/controller/coreCommands'; +import { ViewModel } from 'vs/editor/common/viewModel/viewModelImpl'; suite('Cursor move command test', () => { let thisModel: Model; let thisConfiguration: TestConfiguration; + let thisViewModel: ViewModel; let thisCursor: Cursor; setup(() => { @@ -36,16 +33,18 @@ suite('Cursor move command test', () => { thisModel = Model.createFromString(text); thisConfiguration = new TestConfiguration(null); + thisViewModel = new ViewModel(0, thisConfiguration, thisModel); + thisCursor = new Cursor(thisConfiguration, thisModel, thisViewModel); }); teardown(() => { thisCursor.dispose(); + thisViewModel.dispose(); thisModel.dispose(); thisConfiguration.dispose(); }); test('move left should move to left character', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 8); moveLeft(thisCursor); @@ -54,7 +53,6 @@ suite('Cursor move command test', () => { }); test('move left should move to left by n characters', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 8); moveLeft(thisCursor, 3); @@ -63,7 +61,6 @@ suite('Cursor move command test', () => { }); test('move left should move to left by half line', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 8); moveLeft(thisCursor, 1, CursorMove.RawUnit.HalfLine); @@ -72,7 +69,6 @@ suite('Cursor move command test', () => { }); test('move left moves to previous line', () => { - thisCursor = aCursor(); moveTo(thisCursor, 2, 3); moveLeft(thisCursor, 10); @@ -81,7 +77,6 @@ suite('Cursor move command test', () => { }); test('move right should move to right character', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 5); moveRight(thisCursor); @@ -90,7 +85,6 @@ suite('Cursor move command test', () => { }); test('move right should move to right by n characters', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 2); moveRight(thisCursor, 6); @@ -99,7 +93,6 @@ suite('Cursor move command test', () => { }); test('move right should move to right by half line', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 4); moveRight(thisCursor, 1, CursorMove.RawUnit.HalfLine); @@ -108,7 +101,6 @@ suite('Cursor move command test', () => { }); test('move right moves to next line', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 8); moveRight(thisCursor, 100); @@ -117,14 +109,12 @@ suite('Cursor move command test', () => { }); test('move to first character of line from middle', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 8); moveToLineStart(thisCursor); cursorEqual(thisCursor, 1, 1); }); test('move to first character of line from first non white space character', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 6); moveToLineStart(thisCursor); @@ -133,7 +123,6 @@ suite('Cursor move command test', () => { }); test('move to first character of line from first character', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 1); moveToLineStart(thisCursor); @@ -142,7 +131,6 @@ suite('Cursor move command test', () => { }); test('move to first non white space character of line from middle', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 8); moveToLineFirstNonWhiteSpaceCharacter(thisCursor); @@ -151,7 +139,6 @@ suite('Cursor move command test', () => { }); test('move to first non white space character of line from first non white space character', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 6); moveToLineFirstNonWhiteSpaceCharacter(thisCursor); @@ -160,7 +147,6 @@ suite('Cursor move command test', () => { }); test('move to first non white space character of line from first character', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 1); moveToLineFirstNonWhiteSpaceCharacter(thisCursor); @@ -169,7 +155,6 @@ suite('Cursor move command test', () => { }); test('move to end of line from middle', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 8); moveToLineEnd(thisCursor); @@ -178,7 +163,6 @@ suite('Cursor move command test', () => { }); test('move to end of line from last non white space character', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 19); moveToLineEnd(thisCursor); @@ -187,7 +171,6 @@ suite('Cursor move command test', () => { }); test('move to end of line from line end', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 21); moveToLineEnd(thisCursor); @@ -196,7 +179,6 @@ suite('Cursor move command test', () => { }); test('move to last non white space character from middle', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 8); moveToLineLastNonWhiteSpaceCharacter(thisCursor); @@ -205,7 +187,6 @@ suite('Cursor move command test', () => { }); test('move to last non white space character from last non white space character', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 19); moveToLineLastNonWhiteSpaceCharacter(thisCursor); @@ -214,7 +195,6 @@ suite('Cursor move command test', () => { }); test('move to last non white space character from line end', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 21); moveToLineLastNonWhiteSpaceCharacter(thisCursor); @@ -223,7 +203,6 @@ suite('Cursor move command test', () => { }); test('move to center of line not from center', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 8); moveToLineCenter(thisCursor); @@ -232,7 +211,6 @@ suite('Cursor move command test', () => { }); test('move to center of line from center', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 11); moveToLineCenter(thisCursor); @@ -241,7 +219,6 @@ suite('Cursor move command test', () => { }); test('move to center of line from start', () => { - thisCursor = aCursor(); moveToLineStart(thisCursor); moveToLineCenter(thisCursor); @@ -250,7 +227,6 @@ suite('Cursor move command test', () => { }); test('move to center of line from end', () => { - thisCursor = aCursor(); moveToLineEnd(thisCursor); moveToLineCenter(thisCursor); @@ -259,7 +235,6 @@ suite('Cursor move command test', () => { }); test('move up by cursor move command', () => { - thisCursor = aCursor(); moveTo(thisCursor, 3, 5); cursorEqual(thisCursor, 3, 5); @@ -272,7 +247,6 @@ suite('Cursor move command test', () => { }); test('move up by model line cursor move command', () => { - thisCursor = aCursor(); moveTo(thisCursor, 3, 5); cursorEqual(thisCursor, 3, 5); @@ -285,7 +259,6 @@ suite('Cursor move command test', () => { }); test('move down by model line cursor move command', () => { - thisCursor = aCursor(); moveTo(thisCursor, 3, 5); cursorEqual(thisCursor, 3, 5); @@ -298,7 +271,6 @@ suite('Cursor move command test', () => { }); test('move up with selection by cursor move command', () => { - thisCursor = aCursor(); moveTo(thisCursor, 3, 5); cursorEqual(thisCursor, 3, 5); @@ -311,7 +283,6 @@ suite('Cursor move command test', () => { }); test('move up and down with tabs by cursor move command', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 5); cursorEqual(thisCursor, 1, 5); @@ -333,7 +304,6 @@ suite('Cursor move command test', () => { }); test('move up and down with end of lines starting from a long one by cursor move command', () => { - thisCursor = aCursor(); moveToEndOfLine(thisCursor); cursorEqual(thisCursor, 1, 21); @@ -355,9 +325,7 @@ suite('Cursor move command test', () => { }); test('move to view top line moves to first visible line if it is first line', () => { - let viewModelHelper = aViewModelHelper(thisModel); - viewModelHelper.getCompletelyVisibleViewRange = () => new Range(1, 1, 10, 1); - thisCursor = aCursor(viewModelHelper); + thisViewModel.getCompletelyVisibleViewRange = () => new Range(1, 1, 10, 1); moveTo(thisCursor, 2, 2); moveToTop(thisCursor); @@ -366,9 +334,7 @@ suite('Cursor move command test', () => { }); test('move to view top line moves to top visible line when first line is not visible', () => { - let viewModelHelper = aViewModelHelper(thisModel); - viewModelHelper.getCompletelyVisibleViewRange = () => new Range(2, 1, 10, 1); - thisCursor = aCursor(viewModelHelper); + thisViewModel.getCompletelyVisibleViewRange = () => new Range(2, 1, 10, 1); moveTo(thisCursor, 4, 1); moveToTop(thisCursor); @@ -377,9 +343,7 @@ suite('Cursor move command test', () => { }); test('move to view top line moves to nth line from top', () => { - let viewModelHelper = aViewModelHelper(thisModel); - viewModelHelper.getCompletelyVisibleViewRange = () => new Range(1, 1, 10, 1); - thisCursor = aCursor(viewModelHelper); + thisViewModel.getCompletelyVisibleViewRange = () => new Range(1, 1, 10, 1); moveTo(thisCursor, 4, 1); moveToTop(thisCursor, 3); @@ -388,9 +352,7 @@ suite('Cursor move command test', () => { }); test('move to view top line moves to last line if n is greater than last visible line number', () => { - let viewModelHelper = aViewModelHelper(thisModel); - viewModelHelper.getCompletelyVisibleViewRange = () => new Range(1, 1, 3, 1); - thisCursor = aCursor(viewModelHelper); + thisViewModel.getCompletelyVisibleViewRange = () => new Range(1, 1, 3, 1); moveTo(thisCursor, 2, 2); moveToTop(thisCursor, 4); @@ -399,9 +361,7 @@ suite('Cursor move command test', () => { }); test('move to view center line moves to the center line', () => { - let viewModelHelper = aViewModelHelper(thisModel); - viewModelHelper.getCompletelyVisibleViewRange = () => new Range(3, 1, 3, 1); - thisCursor = aCursor(viewModelHelper); + thisViewModel.getCompletelyVisibleViewRange = () => new Range(3, 1, 3, 1); moveTo(thisCursor, 2, 2); moveToCenter(thisCursor); @@ -410,9 +370,7 @@ suite('Cursor move command test', () => { }); test('move to view bottom line moves to last visible line if it is last line', () => { - let viewModelHelper = aViewModelHelper(thisModel); - viewModelHelper.getCompletelyVisibleViewRange = () => new Range(1, 1, 5, 1); - thisCursor = aCursor(viewModelHelper); + thisViewModel.getCompletelyVisibleViewRange = () => new Range(1, 1, 5, 1); moveTo(thisCursor, 2, 2); moveToBottom(thisCursor); @@ -421,9 +379,7 @@ suite('Cursor move command test', () => { }); test('move to view bottom line moves to last visible line when last line is not visible', () => { - let viewModelHelper = aViewModelHelper(thisModel); - viewModelHelper.getCompletelyVisibleViewRange = () => new Range(2, 1, 3, 1); - thisCursor = aCursor(viewModelHelper); + thisViewModel.getCompletelyVisibleViewRange = () => new Range(2, 1, 3, 1); moveTo(thisCursor, 2, 2); moveToBottom(thisCursor); @@ -432,9 +388,7 @@ suite('Cursor move command test', () => { }); test('move to view bottom line moves to nth line from bottom', () => { - let viewModelHelper = aViewModelHelper(thisModel); - viewModelHelper.getCompletelyVisibleViewRange = () => new Range(1, 1, 5, 1); - thisCursor = aCursor(viewModelHelper); + thisViewModel.getCompletelyVisibleViewRange = () => new Range(1, 1, 5, 1); moveTo(thisCursor, 4, 1); moveToBottom(thisCursor, 3); @@ -443,33 +397,19 @@ suite('Cursor move command test', () => { }); test('move to view bottom line moves to first line if n is lesser than first visible line number', () => { - let viewModelHelper = aViewModelHelper(thisModel); - viewModelHelper.getCompletelyVisibleViewRange = () => new Range(2, 1, 5, 1); - thisCursor = aCursor(viewModelHelper); + thisViewModel.getCompletelyVisibleViewRange = () => new Range(2, 1, 5, 1); moveTo(thisCursor, 4, 1); moveToBottom(thisCursor, 5); cursorEqual(thisCursor, 2, 2); }); - - function aCursor(viewModelHelper?: IViewModelHelper): Cursor { - return new Cursor(thisConfiguration, thisModel, viewModelHelper || aViewModelHelper(thisModel), false); - } - }); -interface ICursorOpts { - text: string[]; - mode?: IMode; - modelOpts?: ITextModelCreationOptions; - editorOpts?: IEditorOptions; -} - // Move command function move(cursor: Cursor, args: any) { - CoreCommands.CursorMove.runCoreEditorCommand(cursor, args); + CoreNavigationCommands.CursorMove.runCoreEditorCommand(cursor, args); } function moveToLineStart(cursor: Cursor) { @@ -553,11 +493,11 @@ function selectionEqual(selection: Selection, posLineNumber: number, posColumn: function moveTo(cursor: Cursor, lineNumber: number, column: number, inSelectionMode: boolean = false) { if (inSelectionMode) { - CoreCommands.MoveToSelect.runCoreEditorCommand(cursor, { + CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(cursor, { position: new Position(lineNumber, column) }); } else { - CoreCommands.MoveTo.runCoreEditorCommand(cursor, { + CoreNavigationCommands.MoveTo.runCoreEditorCommand(cursor, { position: new Position(lineNumber, column) }); } @@ -565,8 +505,8 @@ function moveTo(cursor: Cursor, lineNumber: number, column: number, inSelectionM function moveToEndOfLine(cursor: Cursor, inSelectionMode: boolean = false) { if (inSelectionMode) { - CoreCommands.CursorEndSelect.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorEndSelect.runCoreEditorCommand(cursor, {}); } else { - CoreCommands.CursorEnd.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorEnd.runCoreEditorCommand(cursor, {}); } } diff --git a/src/vs/editor/test/common/controller/textAreaState.test.ts b/src/vs/editor/test/common/controller/textAreaState.test.ts deleted file mode 100644 index 6da10786e1f45..0000000000000 --- a/src/vs/editor/test/common/controller/textAreaState.test.ts +++ /dev/null @@ -1,483 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import * as assert from 'assert'; -import { IENarratorTextAreaState, ISimpleModel, TextAreaState } from 'vs/editor/common/controller/textAreaState'; -import { Position } from 'vs/editor/common/core/position'; -import { Range } from 'vs/editor/common/core/range'; -import { EndOfLinePreference } from 'vs/editor/common/editorCommon'; -import { MockTextAreaWrapper } from 'vs/editor/test/common/mocks/mockTextAreaWrapper'; - -suite('TextAreaState', () => { - - function assertTextAreaState(actual: TextAreaState, value: string, selectionStart: number, selectionEnd: number, isInOverwriteMode: boolean, selectionToken: number): void { - let desired = new IENarratorTextAreaState(null, value, selectionStart, selectionEnd, isInOverwriteMode, selectionToken); - assert.ok(desired.equals(actual), desired.toString() + ' == ' + actual.toString()); - } - - test('fromTextArea', () => { - let textArea = new MockTextAreaWrapper(); - textArea._value = 'Hello world!'; - textArea._selectionStart = 1; - textArea._selectionEnd = 12; - textArea._isInOverwriteMode = false; - let actual = IENarratorTextAreaState.EMPTY.fromTextArea(textArea); - - assertTextAreaState(actual, 'Hello world!', 1, 12, false, 0); - assert.equal(actual.getValue(), 'Hello world!'); - assert.equal(actual.getSelectionStart(), 1); - - actual = actual.resetSelection(); - assertTextAreaState(actual, 'Hello world!', 12, 12, false, 0); - - textArea.dispose(); - }); - - test('applyToTextArea', () => { - let textArea = new MockTextAreaWrapper(); - textArea._value = 'Hello world!'; - textArea._selectionStart = 1; - textArea._selectionEnd = 12; - textArea._isInOverwriteMode = false; - - let state = new IENarratorTextAreaState(null, 'Hi world!', 2, 2, false, 0); - state.applyToTextArea('test', textArea, false); - - assert.equal(textArea._value, 'Hi world!'); - assert.equal(textArea._selectionStart, 9); - assert.equal(textArea._selectionEnd, 9); - - state = new IENarratorTextAreaState(null, 'Hi world!', 3, 3, false, 0); - state.applyToTextArea('test', textArea, false); - - assert.equal(textArea._value, 'Hi world!'); - assert.equal(textArea._selectionStart, 9); - assert.equal(textArea._selectionEnd, 9); - - state = new IENarratorTextAreaState(null, 'Hi world!', 0, 2, false, 0); - state.applyToTextArea('test', textArea, true); - - assert.equal(textArea._value, 'Hi world!'); - assert.equal(textArea._selectionStart, 0); - assert.equal(textArea._selectionEnd, 2); - - textArea.dispose(); - }); - - function testDeduceInput(prevState: TextAreaState, value: string, selectionStart: number, selectionEnd: number, isInOverwriteMode: boolean, expected: string, expectedCharReplaceCnt: number): void { - let textArea = new MockTextAreaWrapper(); - textArea._value = value; - textArea._selectionStart = selectionStart; - textArea._selectionEnd = selectionEnd; - textArea._isInOverwriteMode = isInOverwriteMode; - - let newState = (prevState || IENarratorTextAreaState.EMPTY).fromTextArea(textArea); - - let actual = newState.deduceInput(); - - assert.equal(actual.text, expected); - assert.equal(actual.replaceCharCnt, expectedCharReplaceCnt); - - textArea.dispose(); - } - - test('deduceInput - Japanese typing sennsei and accepting', () => { - // manual test: - // - choose keyboard layout: Japanese -> Hiragama - // - type sennsei - // - accept with Enter - // - expected: せんせい - - // s - // PREVIOUS STATE: [ <>, selectionStart: 0, selectionEnd: 0, isInOverwriteMode: false, selectionToken: 0] - // CURRENT STATE: [ <s>, selectionStart: 0, selectionEnd: 1, isInOverwriteMode: false, selectionToken: 0] - testDeduceInput( - new IENarratorTextAreaState(null, '', 0, 0, false, 0), - 's', - 0, 1, false, - 's', 0 - ); - - // e - // PREVIOUS STATE: [ <s>, selectionStart: 0, selectionEnd: 1, isInOverwriteMode: false, selectionToken: 0] - // CURRENT STATE: [ <せ>, selectionStart: 0, selectionEnd: 1, isInOverwriteMode: false, selectionToken: 0] - testDeduceInput( - new IENarratorTextAreaState(null, 's', 0, 1, false, 0), - 'せ', - 0, 1, false, - 'せ', 1 - ); - - // n - // PREVIOUS STATE: [ <せ>, selectionStart: 0, selectionEnd: 1, isInOverwriteMode: false, selectionToken: 0] - // CURRENT STATE: [ <せn>, selectionStart: 0, selectionEnd: 2, isInOverwriteMode: false, selectionToken: 0] - testDeduceInput( - new IENarratorTextAreaState(null, 'せ', 0, 1, false, 0), - 'せn', - 0, 2, false, - 'せn', 1 - ); - - // n - // PREVIOUS STATE: [ <せn>, selectionStart: 0, selectionEnd: 2, isInOverwriteMode: false, selectionToken: 0] - // CURRENT STATE: [ <せん>, selectionStart: 0, selectionEnd: 2, isInOverwriteMode: false, selectionToken: 0] - testDeduceInput( - new IENarratorTextAreaState(null, 'せn', 0, 2, false, 0), - 'せん', - 0, 2, false, - 'せん', 2 - ); - - // s - // PREVIOUS STATE: [ <せん>, selectionStart: 0, selectionEnd: 2, isInOverwriteMode: false, selectionToken: 0] - // CURRENT STATE: [ <せんs>, selectionStart: 0, selectionEnd: 3, isInOverwriteMode: false, selectionToken: 0] - testDeduceInput( - new IENarratorTextAreaState(null, 'せん', 0, 2, false, 0), - 'せんs', - 0, 3, false, - 'せんs', 2 - ); - - // e - // PREVIOUS STATE: [ <せんs>, selectionStart: 0, selectionEnd: 3, isInOverwriteMode: false, selectionToken: 0] - // CURRENT STATE: [ <せんせ>, selectionStart: 0, selectionEnd: 3, isInOverwriteMode: false, selectionToken: 0] - testDeduceInput( - new IENarratorTextAreaState(null, 'せんs', 0, 3, false, 0), - 'せんせ', - 0, 3, false, - 'せんせ', 3 - ); - - // no-op? [was recorded] - // PREVIOUS STATE: [ <せんせ>, selectionStart: 0, selectionEnd: 3, isInOverwriteMode: false, selectionToken: 0] - // CURRENT STATE: [ <せんせ>, selectionStart: 0, selectionEnd: 3, isInOverwriteMode: false, selectionToken: 0] - testDeduceInput( - new IENarratorTextAreaState(null, 'せんせ', 0, 3, false, 0), - 'せんせ', - 0, 3, false, - 'せんせ', 3 - ); - - // i - // PREVIOUS STATE: [ <せんせ>, selectionStart: 0, selectionEnd: 3, isInOverwriteMode: false, selectionToken: 0] - // CURRENT STATE: [ <せんせい>, selectionStart: 0, selectionEnd: 4, isInOverwriteMode: false, selectionToken: 0] - testDeduceInput( - new IENarratorTextAreaState(null, 'せんせ', 0, 3, false, 0), - 'せんせい', - 0, 4, false, - 'せんせい', 3 - ); - - // ENTER (accept) - // PREVIOUS STATE: [ <せんせい>, selectionStart: 0, selectionEnd: 4, isInOverwriteMode: false, selectionToken: 0] - // CURRENT STATE: [ <せんせい>, selectionStart: 4, selectionEnd: 4, isInOverwriteMode: false, selectionToken: 0] - testDeduceInput( - new IENarratorTextAreaState(null, 'せんせい', 0, 4, false, 0), - 'せんせい', - 4, 4, false, - '', 0 - ); - }); - - test('deduceInput - Japanese typing sennsei and choosing different suggestion', () => { - // manual test: - // - choose keyboard layout: Japanese -> Hiragama - // - type sennsei - // - arrow down (choose next suggestion) - // - accept with Enter - // - expected: せんせい - - // sennsei - // PREVIOUS STATE: [ <せんせい>, selectionStart: 0, selectionEnd: 4, isInOverwriteMode: false, selectionToken: 0] - // CURRENT STATE: [ <せんせい>, selectionStart: 0, selectionEnd: 4, isInOverwriteMode: false, selectionToken: 0] - testDeduceInput( - new IENarratorTextAreaState(null, 'せんせい', 0, 4, false, 0), - 'せんせい', - 0, 4, false, - 'せんせい', 4 - ); - - // arrow down - // CURRENT STATE: [ <先生>, selectionStart: 0, selectionEnd: 2, isInOverwriteMode: false, selectionToken: 0] - // PREVIOUS STATE: [ <せんせい>, selectionStart: 0, selectionEnd: 4, isInOverwriteMode: false, selectionToken: 0] - testDeduceInput( - new IENarratorTextAreaState(null, 'せんせい', 0, 4, false, 0), - '先生', - 0, 2, false, - '先生', 4 - ); - - // ENTER (accept) - // PREVIOUS STATE: [ <先生>, selectionStart: 0, selectionEnd: 2, isInOverwriteMode: false, selectionToken: 0] - // CURRENT STATE: [ <先生>, selectionStart: 2, selectionEnd: 2, isInOverwriteMode: false, selectionToken: 0] - testDeduceInput( - new IENarratorTextAreaState(null, '先生', 0, 2, false, 0), - '先生', - 2, 2, false, - '', 0 - ); - }); - - test('extractNewText - no previous state with selection', () => { - testDeduceInput( - null, - 'a', - 0, 1, false, - 'a', 0 - ); - }); - - test('issue #2586: Replacing selected end-of-line with newline locks up the document', () => { - testDeduceInput( - new IENarratorTextAreaState(null, ']\n', 1, 2, false, 0), - ']\n', - 2, 2, false, - '\n', 0 - ); - }); - - test('extractNewText - no previous state without selection', () => { - testDeduceInput( - null, - 'a', - 1, 1, false, - 'a', 0 - ); - }); - - test('extractNewText - typing does not cause a selection', () => { - testDeduceInput( - new IENarratorTextAreaState(null, '', 0, 0, false, 0), - 'a', - 0, 1, false, - 'a', 0 - ); - }); - - test('extractNewText - had the textarea empty', () => { - testDeduceInput( - new IENarratorTextAreaState(null, '', 0, 0, false, 0), - 'a', - 1, 1, false, - 'a', 0 - ); - }); - - test('extractNewText - had the entire line selected', () => { - testDeduceInput( - new IENarratorTextAreaState(null, 'Hello world!', 0, 12, false, 0), - 'H', - 1, 1, false, - 'H', 0 - ); - }); - - test('extractNewText - had previous text 1', () => { - testDeduceInput( - new IENarratorTextAreaState(null, 'Hello world!', 12, 12, false, 0), - 'Hello world!a', - 13, 13, false, - 'a', 0 - ); - }); - - test('extractNewText - had previous text 2', () => { - testDeduceInput( - new IENarratorTextAreaState(null, 'Hello world!', 0, 0, false, 0), - 'aHello world!', - 1, 1, false, - 'a', 0 - ); - }); - - test('extractNewText - had previous text 3', () => { - testDeduceInput( - new IENarratorTextAreaState(null, 'Hello world!', 6, 11, false, 0), - 'Hello other!', - 11, 11, false, - 'other', 0 - ); - }); - - test('extractNewText - IME', () => { - testDeduceInput( - new IENarratorTextAreaState(null, '', 0, 0, false, 0), - 'これは', - 3, 3, false, - 'これは', 0 - ); - }); - - test('extractNewText - isInOverwriteMode', () => { - testDeduceInput( - new IENarratorTextAreaState(null, 'Hello world!', 0, 0, false, 0), - 'Aello world!', - 1, 1, true, - 'A', 0 - ); - }); - - test('extractMacReplacedText - does nothing if there is selection', () => { - testDeduceInput( - new IENarratorTextAreaState(null, 'Hello world!', 5, 5, false, 0), - 'Hellö world!', - 4, 5, false, - 'ö', 0 - ); - }); - - test('extractMacReplacedText - does nothing if there is more than one extra char', () => { - testDeduceInput( - new IENarratorTextAreaState(null, 'Hello world!', 5, 5, false, 0), - 'Hellöö world!', - 5, 5, false, - 'öö', 1 - ); - }); - - test('extractMacReplacedText - does nothing if there is more than one changed char', () => { - testDeduceInput( - new IENarratorTextAreaState(null, 'Hello world!', 5, 5, false, 0), - 'Helöö world!', - 5, 5, false, - 'öö', 2 - ); - }); - - test('extractMacReplacedText', () => { - testDeduceInput( - new IENarratorTextAreaState(null, 'Hello world!', 5, 5, false, 0), - 'Hellö world!', - 5, 5, false, - 'ö', 1 - ); - }); - - function testFromEditorSelectionAndPreviousState(eol: string, lines: string[], range: Range, prevSelectionToken: number): TextAreaState { - let model = new SimpleModel(lines, eol); - let previousState = new IENarratorTextAreaState(null, '', 0, 0, false, prevSelectionToken); - return previousState.fromEditorSelection(model, range); - } - - test('fromEditorSelectionAndPreviousState - no selection on first line', () => { - let actual = testFromEditorSelectionAndPreviousState('\n', [ - 'Just a line', - 'And another line' - ], new Range(1, 1, 1, 1), 0); - assertTextAreaState(actual, 'Just a line', 0, 11, false, 1); - }); - - test('fromEditorSelectionAndPreviousState - no selection on second line', () => { - let actual = testFromEditorSelectionAndPreviousState('\n', [ - 'Just a line', - 'And another line', - 'And yet another line', - ], new Range(2, 1, 2, 1), 0); - assertTextAreaState(actual, 'And another line', 0, 16, false, 2); - }); - - test('fromEditorSelectionAndPreviousState - on a long line with selectionToken mismatch', () => { - let aLongLine = 'a'; - for (let i = 0; i < 10; i++) { - aLongLine = aLongLine + aLongLine; - } - let actual = testFromEditorSelectionAndPreviousState('\n', [ - 'Just a line', - aLongLine, - 'And yet another line', - ], new Range(2, 500, 2, 500), 0); - assertTextAreaState(actual, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa…aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 0, 201, false, 2); - }); - - test('fromEditorSelectionAndPreviousState - on a long line with same selectionToken', () => { - let aLongLine = 'a'; - for (let i = 0; i < 10; i++) { - aLongLine = aLongLine + aLongLine; - } - let actual = testFromEditorSelectionAndPreviousState('\n', [ - 'Just a line', - aLongLine, - 'And yet another line', - ], new Range(2, 500, 2, 500), 2); - assertTextAreaState(actual, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 100, 100, false, 2); - }); -}); - -class SimpleModel implements ISimpleModel { - - private _lines: string[]; - private _eol: string; - - public coordinatesConverter = { - convertViewPositionToModelPosition: (viewPosition: Position): Position => { - return viewPosition; - } - }; - - constructor(lines: string[], eol: string) { - this._lines = lines; - this._eol = eol; - } - - public getLineMaxColumn(lineNumber: number): number { - return this._lines[lineNumber - 1].length + 1; - } - - private _getEndOfLine(eol: EndOfLinePreference): string { - switch (eol) { - case EndOfLinePreference.LF: - return '\n'; - case EndOfLinePreference.CRLF: - return '\r\n'; - case EndOfLinePreference.TextDefined: - return this._eol; - } - throw new Error('Unknown EOL preference'); - } - - public getEOL(): string { - return this._eol; - } - - public getValueInRange(range: Range, eol: EndOfLinePreference): string { - if (Range.isEmpty(range)) { - return ''; - } - - if (range.startLineNumber === range.endLineNumber) { - return this._lines[range.startLineNumber - 1].substring(range.startColumn - 1, range.endColumn - 1); - } - - var lineEnding = this._getEndOfLine(eol), - startLineIndex = range.startLineNumber - 1, - endLineIndex = range.endLineNumber - 1, - resultLines: string[] = []; - - resultLines.push(this._lines[startLineIndex].substring(range.startColumn - 1)); - for (var i = startLineIndex + 1; i < endLineIndex; i++) { - resultLines.push(this._lines[i]); - } - resultLines.push(this._lines[endLineIndex].substring(0, range.endColumn - 1)); - - return resultLines.join(lineEnding); - } - - public getModelLineContent(lineNumber: number): string { - return this._lines[lineNumber - 1]; - } - - public getLineCount(): number { - return this._lines.length; - } - - public getPlainTextToCopy(ranges: Range[], enableEmptySelectionClipboard: boolean): string { - return ''; - } - - public getHTMLToCopy(ranges: Range[], enableEmptySelectionClipboard: boolean): string { - return ''; - } -} diff --git a/src/vs/editor/test/common/diff/diffComputer.test.ts b/src/vs/editor/test/common/diff/diffComputer.test.ts index 90349d7b7b000..3bb149dcf5383 100644 --- a/src/vs/editor/test/common/diff/diffComputer.test.ts +++ b/src/vs/editor/test/common/diff/diffComputer.test.ts @@ -8,7 +8,7 @@ import * as assert from 'assert'; import { DiffComputer } from 'vs/editor/common/diff/diffComputer'; import { IChange, ICharChange, ILineChange } from 'vs/editor/common/editorCommon'; -function extractCharChangeRepresentation(change, expectedChange): ICharChange { +function extractCharChangeRepresentation(change: ICharChange, expectedChange: ICharChange): ICharChange { var hasOriginal = expectedChange && expectedChange.originalStartLineNumber > 0; var hasModified = expectedChange && expectedChange.modifiedStartLineNumber > 0; return { @@ -24,7 +24,7 @@ function extractCharChangeRepresentation(change, expectedChange): ICharChange { }; } -function extractLineChangeRepresentation(change, expectedChange): IChange | ILineChange { +function extractLineChangeRepresentation(change: ILineChange, expectedChange: ILineChange): IChange | ILineChange { if (change.charChanges) { let charChanges: ICharChange[] = []; for (let i = 0; i < change.charChanges.length; i++) { @@ -61,12 +61,12 @@ function assertDiff(originalLines: string[], modifiedLines: string[], expectedCh var extracted = []; for (var i = 0; i < changes.length; i++) { - extracted.push(extractLineChangeRepresentation(changes[i], i < expectedChanges.length ? expectedChanges[i] : null)); + extracted.push(extractLineChangeRepresentation(changes[i], (i < expectedChanges.length ? expectedChanges[i] : null))); } assert.deepEqual(extracted, expectedChanges); } -function createLineDeletion(startLineNumber, endLineNumber, modifiedLineNumber): IChange { +function createLineDeletion(startLineNumber: number, endLineNumber: number, modifiedLineNumber: number): IChange { return { originalStartLineNumber: startLineNumber, originalEndLineNumber: endLineNumber, @@ -75,7 +75,7 @@ function createLineDeletion(startLineNumber, endLineNumber, modifiedLineNumber): }; } -function createLineInsertion(startLineNumber, endLineNumber, originalLineNumber): IChange { +function createLineInsertion(startLineNumber: number, endLineNumber: number, originalLineNumber: number): IChange { return { originalStartLineNumber: originalLineNumber, originalEndLineNumber: 0, @@ -84,7 +84,7 @@ function createLineInsertion(startLineNumber, endLineNumber, originalLineNumber) }; } -function createLineChange(originalStartLineNumber, originalEndLineNumber, modifiedStartLineNumber, modifiedEndLineNumber, charChanges): ILineChange { +function createLineChange(originalStartLineNumber: number, originalEndLineNumber: number, modifiedStartLineNumber: number, modifiedEndLineNumber: number, charChanges: ICharChange[]): ILineChange { return { originalStartLineNumber: originalStartLineNumber, originalEndLineNumber: originalEndLineNumber, @@ -94,7 +94,7 @@ function createLineChange(originalStartLineNumber, originalEndLineNumber, modifi }; } -function createCharInsertion(startLineNumber, startColumn, endLineNumber, endColumn) { +function createCharInsertion(startLineNumber: number, startColumn: number, endLineNumber: number, endColumn: number) { return { originalStartLineNumber: 0, originalStartColumn: 0, @@ -107,7 +107,7 @@ function createCharInsertion(startLineNumber, startColumn, endLineNumber, endCol }; } -function createCharDeletion(startLineNumber, startColumn, endLineNumber, endColumn) { +function createCharDeletion(startLineNumber: number, startColumn: number, endLineNumber: number, endColumn: number) { return { originalStartLineNumber: startLineNumber, originalStartColumn: startColumn, @@ -120,8 +120,10 @@ function createCharDeletion(startLineNumber, startColumn, endLineNumber, endColu }; } -function createCharChange(originalStartLineNumber, originalStartColumn, originalEndLineNumber, originalEndColumn, - modifiedStartLineNumber, modifiedStartColumn, modifiedEndLineNumber, modifiedEndColumn) { +function createCharChange( + originalStartLineNumber: number, originalStartColumn: number, originalEndLineNumber: number, originalEndColumn: number, + modifiedStartLineNumber: number, modifiedStartColumn: number, modifiedEndLineNumber: number, modifiedEndColumn: number +) { return { originalStartLineNumber: originalStartLineNumber, originalStartColumn: originalStartColumn, diff --git a/src/vs/editor/test/common/editorTestUtils.ts b/src/vs/editor/test/common/editorTestUtils.ts index 493a466de8749..476e1c4ae260c 100644 --- a/src/vs/editor/test/common/editorTestUtils.ts +++ b/src/vs/editor/test/common/editorTestUtils.ts @@ -5,59 +5,9 @@ 'use strict'; import { Model } from 'vs/editor/common/model/model'; -import { Position } from 'vs/editor/common/core/position'; -import { Range } from 'vs/editor/common/core/range'; -import { Selection } from 'vs/editor/common/core/selection'; -import { IModel } from 'vs/editor/common/editorCommon'; -import { IViewModelHelper } from 'vs/editor/common/controller/cursorCommon'; export function withEditorModel(text: string[], callback: (model: Model) => void): void { var model = Model.createFromString(text.join('\n')); callback(model); model.dispose(); } - -export function viewModelHelper(model: IModel): IViewModelHelper { - return { - viewModel: model, - - coordinatesConverter: { - convertViewPositionToModelPosition: (viewPosition: Position): Position => { - return viewPosition; - }, - convertViewRangeToModelRange: (viewRange: Range): Range => { - return viewRange; - }, - convertViewSelectionToModelSelection: (viewSelection: Selection): Selection => { - return viewSelection; - }, - validateViewPosition: (viewPosition: Position, expectedModelPosition: Position): Position => { - return expectedModelPosition; - }, - validateViewRange: (viewRange: Range, modelRange: Range): Range => { - return modelRange; - }, - convertModelPositionToViewPosition: (modelPosition: Position): Position => { - return modelPosition; - }, - convertModelRangeToViewRange: (modelRange: Range): Range => { - return modelRange; - }, - convertModelSelectionToViewSelection: (modelSelection: Selection): Selection => { - return modelSelection; - }, - modelPositionIsVisible: (modelPosition: Position): boolean => { - return true; - }, - }, - - getScrollTop: (): number => 0, - - getCompletelyVisibleViewRange: () => null, - - getCompletelyVisibleViewRangeAtScrollTop: (scrollTop: number) => null, - - getVerticalOffsetForViewLineNumber: (viewLineNumber: number) => 0 - - }; -} diff --git a/src/vs/editor/test/common/mocks/mockCodeEditor.ts b/src/vs/editor/test/common/mocks/mockCodeEditor.ts index 3a70f211dbc0f..52e03d799064c 100644 --- a/src/vs/editor/test/common/mocks/mockCodeEditor.ts +++ b/src/vs/editor/test/common/mocks/mockCodeEditor.ts @@ -14,30 +14,12 @@ import { Cursor } from 'vs/editor/common/controller/cursor'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { Model } from 'vs/editor/common/model/model'; import { TestConfiguration } from 'vs/editor/test/common/mocks/testConfiguration'; -import { Range } from 'vs/editor/common/core/range'; import * as editorOptions from 'vs/editor/common/config/editorOptions'; export class MockCodeEditor extends CommonCodeEditor { protected _createConfiguration(options: editorOptions.IEditorOptions): CommonEditorConfiguration { return new TestConfiguration(options); } - public getCenteredRangeInViewport(): Range { return null; } - protected _getCompletelyVisibleViewRange(): Range { return null; } - protected _getCompletelyVisibleViewRangeAtScrollTop(scrollTop: number): Range { return null; } - protected _getVerticalOffsetForViewLineNumber(viewLineNumber: number): number { return 0; } - - public getScrollWidth(): number { return 0; } - public getScrollLeft(): number { return 0; } - - public getScrollHeight(): number { return 0; } - public getScrollTop(): number { return 0; } - - public setScrollLeft(newScrollLeft: number): void { } - public setScrollTop(newScrollTop: number): void { } - public setScrollPosition(position: editorCommon.INewScrollPosition): void { } - - public saveViewState(): editorCommon.ICodeEditorViewState { return null; } - public restoreViewState(state: editorCommon.IEditorViewState): void { } public layout(dimension?: editorCommon.IDimension): void { } @@ -85,27 +67,43 @@ export interface MockCodeEditorCreationOptions extends editorOptions.IEditorOpti * The initial model associated with this code editor. */ model?: editorCommon.IModel; + serviceCollection?: ServiceCollection; } export function withMockCodeEditor(text: string[], options: MockCodeEditorCreationOptions, callback: (editor: MockCodeEditor, cursor: Cursor) => void): void { - let editor = mockCodeEditor(text, options); + // create a model if necessary and remember it in order to dispose it. + let modelToDispose: Model = null; + if (!options.model) { + modelToDispose = Model.createFromString(text.join('\n')); + options.model = modelToDispose; + } + + let editor = _mockCodeEditor(options); callback(editor, editor.getCursor()); + + if (modelToDispose) { + modelToDispose.dispose(); + } editor.dispose(); } export function mockCodeEditor(text: string[], options: MockCodeEditorCreationOptions): CommonCodeEditor { + // TODO: who owns this model now? + if (!options.model) { + options.model = Model.createFromString(text.join('\n')); + } + return _mockCodeEditor(options); +} + +function _mockCodeEditor(options: MockCodeEditorCreationOptions): CommonCodeEditor { let contextKeyService = new MockContextKeyService(); - let services = new ServiceCollection(); + let services = options.serviceCollection || new ServiceCollection(); services.set(IContextKeyService, contextKeyService); let instantiationService = new InstantiationService(services); let editor = new MockCodeEditor(new MockScopeLocation(), options, instantiationService, contextKeyService); - let model = options.model || Model.createFromString(text.join('\n')); - if (model) { - editor.setModel(model); - } - + editor.setModel(options.model); return editor; } diff --git a/src/vs/editor/test/common/mocks/mockExtensionService.ts b/src/vs/editor/test/common/mocks/mockExtensionService.ts index 7eb1c1be34618..039c9ec9eb630 100644 --- a/src/vs/editor/test/common/mocks/mockExtensionService.ts +++ b/src/vs/editor/test/common/mocks/mockExtensionService.ts @@ -32,7 +32,7 @@ export class MockExtensionService extends AbstractExtensionService()); - public onKeyDown: Event = this._onKeyDown.event; - - private _onKeyUp = this._register(new Emitter()); - public onKeyUp: Event = this._onKeyUp.event; - - private _onKeyPress = this._register(new Emitter()); - public onKeyPress: Event = this._onKeyPress.event; - - private _onCompositionStart = this._register(new Emitter()); - public onCompositionStart: Event = this._onCompositionStart.event; - - private _onCompositionUpdate = this._register(new Emitter()); - public onCompositionUpdate: Event = this._onCompositionUpdate.event; - - private _onCompositionEnd = this._register(new Emitter()); - public onCompositionEnd: Event = this._onCompositionEnd.event; - - private _onInput = this._register(new Emitter()); - public onInput: Event = this._onInput.event; - - private _onCut = this._register(new Emitter()); - public onCut: Event = this._onCut.event; - - private _onCopy = this._register(new Emitter()); - public onCopy: Event = this._onCopy.event; - - private _onPaste = this._register(new Emitter()); - public onPaste: Event = this._onPaste.event; - - public _value: string; - public _selectionStart: number; - public _selectionEnd: number; - public _isInOverwriteMode: boolean; - - constructor() { - super(); - this._value = ''; - this._selectionStart = 0; - this._selectionEnd = 0; - this._isInOverwriteMode = false; - } - - public getValue(): string { - return this._value; - } - - public setValue(reason: string, value: string): void { - this._value = value; - this._selectionStart = this._value.length; - this._selectionEnd = this._value.length; - } - - public getSelectionStart(): number { - return this._selectionStart; - } - - public getSelectionEnd(): number { - return this._selectionEnd; - } - - public setSelectionRange(selectionStart: number, selectionEnd: number): void { - if (selectionStart < 0) { - selectionStart = 0; - } - if (selectionStart > this._value.length) { - selectionStart = this._value.length; - } - if (selectionEnd < 0) { - selectionEnd = 0; - } - if (selectionEnd > this._value.length) { - selectionEnd = this._value.length; - } - this._selectionStart = selectionStart; - this._selectionEnd = selectionEnd; - } - - public isInOverwriteMode(): boolean { - return this._isInOverwriteMode; - } -} diff --git a/src/vs/editor/test/common/mocks/testConfiguration.ts b/src/vs/editor/test/common/mocks/testConfiguration.ts index d8cede0b45b09..b94830a845649 100644 --- a/src/vs/editor/test/common/mocks/testConfiguration.ts +++ b/src/vs/editor/test/common/mocks/testConfiguration.ts @@ -4,34 +4,28 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { CommonEditorConfiguration } from 'vs/editor/common/config/commonEditorConfig'; +import { CommonEditorConfiguration, IEnvConfiguration } from 'vs/editor/common/config/commonEditorConfig'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { FontInfo, BareFontInfo } from 'vs/editor/common/config/fontInfo'; +import { AccessibilitySupport } from 'vs/base/common/platform'; export class TestConfiguration extends CommonEditorConfiguration { constructor(opts: IEditorOptions) { super(opts); + this._recomputeOptions(); } - protected _getEditorClassName(theme: string, fontLigatures: boolean): string { - return ''; - } - - protected getOuterWidth(): number { - return 100; - } - - protected getOuterHeight(): number { - return 100; - } - - protected _getCanUseTranslate3d(): boolean { - return true; - } - - protected _getPixelRatio(): number { - return 1; + protected _getEnvConfiguration(): IEnvConfiguration { + return { + extraEditorClassName: '', + outerWidth: 100, + outerHeight: 100, + emptySelectionClipboard: true, + pixelRatio: 1, + zoomLevel: 0, + accessibilitySupport: AccessibilitySupport.Unknown + }; } protected readConfiguration(styling: BareFontInfo): FontInfo { @@ -41,6 +35,7 @@ export class TestConfiguration extends CommonEditorConfiguration { fontWeight: 'normal', fontSize: 14, lineHeight: 19, + letterSpacing: 1.5, isMonospace: true, typicalHalfwidthCharacterWidth: 10, typicalFullwidthCharacterWidth: 20, @@ -48,8 +43,4 @@ export class TestConfiguration extends CommonEditorConfiguration { maxDigitWidth: 10, }, true); } - - protected getZoomLevel(): number { - return 0; - } } diff --git a/src/vs/editor/test/common/model/indentRanges.test.ts b/src/vs/editor/test/common/model/indentRanges.test.ts index f65722224b9be..55b5e1ad6dd61 100644 --- a/src/vs/editor/test/common/model/indentRanges.test.ts +++ b/src/vs/editor/test/common/model/indentRanges.test.ts @@ -7,11 +7,16 @@ import * as assert from 'assert'; import { Model } from 'vs/editor/common/model/model'; -import { IFoldingRange } from 'vs/editor/contrib/folding/common/foldingModel'; import { computeRanges } from 'vs/editor/common/model/indentRanges'; +export interface IndentRange { + startLineNumber: number; + endLineNumber: number; + indent: number; +} + suite('Indentation Folding', () => { - function assertRanges(lines: string[], expected: IFoldingRange[]): void { + function assertRanges(lines: string[], expected: IndentRange[]): void { let model = Model.createFromString(lines.join('\n')); let actual = computeRanges(model); actual.sort((r1, r2) => r1.startLineNumber - r2.startLineNumber); @@ -19,7 +24,7 @@ suite('Indentation Folding', () => { model.dispose(); } - function r(startLineNumber: number, endLineNumber: number, indent: number): IFoldingRange { + function r(startLineNumber: number, endLineNumber: number, indent: number): IndentRange { return { startLineNumber, endLineNumber, indent }; } diff --git a/src/vs/editor/test/common/model/model.modes.test.ts b/src/vs/editor/test/common/model/model.modes.test.ts index 053df8fe51104..9a891182471f2 100644 --- a/src/vs/editor/test/common/model/model.modes.test.ts +++ b/src/vs/editor/test/common/model/model.modes.test.ts @@ -13,7 +13,7 @@ import { Model } from 'vs/editor/common/model/model'; import * as modes from 'vs/editor/common/modes'; import { NULL_STATE } from 'vs/editor/common/modes/nullMode'; import { TokenizationResult2 } from 'vs/editor/common/core/token'; -import { TokenIterator } from 'vs/editor/common/model/tokenIterator'; +import { TokenIterator, ITokenInfo } from 'vs/editor/common/model/tokenIterator'; // --------- utils @@ -347,7 +347,7 @@ suite('Editor Model - Token Iterator', () => { [1, 4, 4, 7, 7, 10, 10, 13], ]; tokenIterator(thisModel, new Position(1, 1), (iter) => { - var a = [], line = 0; + var a: number[] = [], line = 0; while (iter.hasNext()) { calls++; if (a.length === 0) { @@ -450,7 +450,7 @@ suite('Editor Model - Token Iterator', () => { test('iterator allows next/prev', () => { var n = 0; - var up = [], down = []; + var up: ITokenInfo[] = [], down: ITokenInfo[] = []; tokenIterator(thisModel, new Position(1, 1), (iter) => { while (iter.hasNext()) { var next = iter.next(); @@ -473,7 +473,7 @@ suite('Editor Model - Token Iterator', () => { test('iterator allows prev/next', () => { var n = 0; - var up = [], down = []; + var up: ITokenInfo[] = [], down: ITokenInfo[] = []; tokenIterator(thisModel, new Position(3, 12), (iter) => { while (iter.hasPrev()) { var prev = iter.prev(); @@ -496,7 +496,7 @@ suite('Editor Model - Token Iterator', () => { test('iterator can not be used outside of callback', () => { - var illegalIterReference; + var illegalIterReference: TokenIterator; tokenIterator(thisModel, new Position(3, 12), (iter) => { illegalIterReference = iter; }); diff --git a/src/vs/editor/test/common/model/modelDecorations.test.ts b/src/vs/editor/test/common/model/modelDecorations.test.ts index 12a6c4233d085..b148ac36e17fc 100644 --- a/src/vs/editor/test/common/model/modelDecorations.test.ts +++ b/src/vs/editor/test/common/model/modelDecorations.test.ts @@ -49,7 +49,7 @@ function addDecoration(model: Model, startLineNumber: number, startColumn: numbe }); } -function lineHasDecorations(model, lineNumber, decorations) { +function lineHasDecorations(model: Model, lineNumber: number, decorations: { start: number; end: number; className: string; }[]) { var lineDecorations = []; var decs = model.getLineDecorations(lineNumber); for (var i = 0, len = decs.length; i < len; i++) { @@ -62,11 +62,11 @@ function lineHasDecorations(model, lineNumber, decorations) { assert.deepEqual(lineDecorations, decorations, 'Line decorations'); } -function lineHasNoDecorations(model, lineNumber) { +function lineHasNoDecorations(model: Model, lineNumber: number) { lineHasDecorations(model, lineNumber, []); } -function lineHasDecoration(model, lineNumber, start, end, className) { +function lineHasDecoration(model: Model, lineNumber: number, start: number, end: number, className: string) { lineHasDecorations(model, lineNumber, [{ start: start, end: end, @@ -542,7 +542,7 @@ suite('deltaDecorations', () => { endColumn: 1 }, options: { - hoverMessage: ['hello1'] + hoverMessage: 'hello1' } }]); @@ -554,13 +554,13 @@ suite('deltaDecorations', () => { endColumn: 1 }, options: { - hoverMessage: ['hello2'] + hoverMessage: 'hello2' } }]); let actualDecoration = model.getDecorationOptions(ids[0]); - assert.equal(actualDecoration.hoverMessage[0], 'hello2'); + assert.equal(actualDecoration.hoverMessage, 'hello2'); model.dispose(); }); diff --git a/src/vs/editor/test/common/model/textModelSearch.test.ts b/src/vs/editor/test/common/model/textModelSearch.test.ts index 278ee1539ca47..97417836da7c4 100644 --- a/src/vs/editor/test/common/model/textModelSearch.test.ts +++ b/src/vs/editor/test/common/model/textModelSearch.test.ts @@ -10,10 +10,14 @@ import { FindMatch, EndOfLineSequence } from 'vs/editor/common/editorCommon'; import { Range } from 'vs/editor/common/core/range'; import { TextModel } from 'vs/editor/common/model/textModel'; import { TextModelSearch, SearchParams, SearchData } from 'vs/editor/common/model/textModelSearch'; +import { getMapForWordSeparators } from 'vs/editor/common/controller/wordCharacterClassifier'; +import { USUAL_WORD_SEPARATORS } from 'vs/editor/common/model/wordHelper'; // --------- Find suite('TextModelSearch', () => { + const usualWordSeparators = getMapForWordSeparators(USUAL_WORD_SEPARATORS); + function assertFindMatch(actual: FindMatch, expectedRange: Range, expectedMatches: string[] = null): void { assert.deepEqual(actual, new FindMatch(expectedRange, expectedMatches)); } @@ -27,7 +31,7 @@ suite('TextModelSearch', () => { let match = TextModelSearch.findNextMatch(model, searchParams, startPos, false); assert.deepEqual(match, expectedMatches[0], `findNextMatch ${startPos}`); for (let i = 0; i < expectedMatches.length; i++) { - startPos = expectedMatches[i].range.getStartPosition();; + startPos = expectedMatches[i].range.getStartPosition(); match = TextModelSearch.findNextMatch(model, searchParams, startPos, false); assert.deepEqual(match, expectedMatches[i], `findNextMatch ${startPos}`); } @@ -43,10 +47,10 @@ suite('TextModelSearch', () => { } } - function assertFindMatches(text: string, searchString: string, isRegex: boolean, matchCase: boolean, wholeWord: boolean, _expected: [number, number, number, number][]): void { + function assertFindMatches(text: string, searchString: string, isRegex: boolean, matchCase: boolean, wordSeparators: string, _expected: [number, number, number, number][]): void { let expectedRanges = _expected.map(entry => new Range(entry[0], entry[1], entry[2], entry[3])); let expectedMatches = expectedRanges.map(entry => new FindMatch(entry, null)); - let searchParams = new SearchParams(searchString, isRegex, matchCase, wholeWord); + let searchParams = new SearchParams(searchString, isRegex, matchCase, wordSeparators); let model = TextModel.createFromString(text); _assertFindMatches(model, searchParams, expectedMatches); @@ -70,7 +74,7 @@ suite('TextModelSearch', () => { test('Simple find', () => { assertFindMatches( regularText.join('\n'), - 'foo', false, false, false, + 'foo', false, false, null, [ [1, 14, 1, 17], [1, 44, 1, 47], @@ -84,7 +88,7 @@ suite('TextModelSearch', () => { test('Case sensitive find', () => { assertFindMatches( regularText.join('\n'), - 'foo', false, true, false, + 'foo', false, true, null, [ [1, 14, 1, 17], [1, 44, 1, 47], @@ -96,7 +100,7 @@ suite('TextModelSearch', () => { test('Whole words find', () => { assertFindMatches( regularText.join('\n'), - 'foo', false, false, true, + 'foo', false, false, USUAL_WORD_SEPARATORS, [ [1, 14, 1, 17], [1, 44, 1, 47], @@ -108,7 +112,7 @@ suite('TextModelSearch', () => { test('/^/ find', () => { assertFindMatches( regularText.join('\n'), - '^', true, false, false, + '^', true, false, null, [ [1, 1, 1, 1], [2, 1, 2, 1], @@ -122,7 +126,7 @@ suite('TextModelSearch', () => { test('/$/ find', () => { assertFindMatches( regularText.join('\n'), - '$', true, false, false, + '$', true, false, null, [ [1, 74, 1, 74], [2, 69, 2, 69], @@ -136,7 +140,7 @@ suite('TextModelSearch', () => { test('/.*/ find', () => { assertFindMatches( regularText.join('\n'), - '.*', true, false, false, + '.*', true, false, null, [ [1, 1, 1, 74], [2, 1, 2, 69], @@ -156,7 +160,7 @@ suite('TextModelSearch', () => { '', 'Again nothing interesting here' ].join('\n'), - '^$', true, false, false, + '^$', true, false, null, [ [2, 1, 2, 1], [4, 1, 4, 1] @@ -172,7 +176,7 @@ suite('TextModelSearch', () => { 'some text again', 'again some text' ].join('\n'), - 'text\\n', true, false, false, + 'text\\n', true, false, null, [ [1, 16, 2, 1], [2, 16, 3, 1], @@ -188,7 +192,7 @@ suite('TextModelSearch', () => { 'some text again', 'again some text' ].join('\n'), - 'text\\nJust', true, false, false, + 'text\\nJust', true, false, null, [ [1, 16, 2, 5] ] @@ -203,7 +207,7 @@ suite('TextModelSearch', () => { 'some text again', 'again some text' ].join('\n'), - '\\nagain', true, false, false, + '\\nagain', true, false, null, [ [3, 16, 4, 6] ] @@ -218,7 +222,7 @@ suite('TextModelSearch', () => { 'some text again', 'again some text' ].join('\n'), - '.*\\nJust.*\\n', true, false, false, + '.*\\nJust.*\\n', true, false, null, [ [1, 1, 3, 1] ] @@ -234,7 +238,7 @@ suite('TextModelSearch', () => { 'if', 'else' ].join('\n'), - '^if\\nelse', true, false, false, + '^if\\nelse', true, false, null, [ [1, 1, 2, 5], [4, 1, 5, 5] @@ -253,7 +257,7 @@ suite('TextModelSearch', () => { ' ', 'else' ].join('\n'), - '^\\s*$\\n', true, false, false, + '^\\s*$\\n', true, false, null, [ [2, 1, 3, 1], [4, 1, 5, 1], @@ -270,7 +274,7 @@ suite('TextModelSearch', () => { 'ab', 'eb' ].join('\n'), - '^a.*b$', true, false, false, + '^a.*b$', true, false, null, [ [1, 1, 1, 7], [3, 1, 3, 3] @@ -288,7 +292,7 @@ suite('TextModelSearch', () => { 'elseif', 'else' ].join('\n'), - 'if\\nelse$', true, false, false, + 'if\\nelse$', true, false, null, [ [1, 1, 2, 5], [5, 5, 6, 5] @@ -305,7 +309,7 @@ suite('TextModelSearch', () => { '', 'again some text' ].join('\n'), - '^.*$', true, false, false, + '^.*$', true, false, null, [ [1, 1, 1, 20], [2, 1, 2, 1], @@ -325,7 +329,7 @@ suite('TextModelSearch', () => { 'again some text', 'but not some' ].join('\n'), - 'text\nsome', false, false, false, + 'text\nsome', false, false, null, [ [1, 16, 2, 5], [2, 11, 3, 5], @@ -333,10 +337,53 @@ suite('TextModelSearch', () => { ); }); + test('issue #3623: Match whole word does not work for not latin characters', () => { + assertFindMatches( + [ + 'я', + 'компилятор', + 'обфускация', + ':я-я' + ].join('\n'), + 'я', false, false, USUAL_WORD_SEPARATORS, + [ + [1, 1, 1, 2], + [4, 2, 4, 3], + [4, 4, 4, 5], + ] + ); + }); + + test('issue #27459: Match whole words regression', () => { + assertFindMatches( + [ + 'this._register(this._textAreaInput.onKeyDown((e: IKeyboardEvent) => {', + ' this._viewController.emitKeyDown(e);', + '}));', + ].join('\n'), + '((e: ', false, false, USUAL_WORD_SEPARATORS, + [ + [1, 45, 1, 50] + ] + ); + }); + + test('issue #27594: Search results disappear', () => { + assertFindMatches( + [ + 'this.server.listen(0);', + ].join('\n'), + 'listen(', false, false, USUAL_WORD_SEPARATORS, + [ + [1, 13, 1, 20] + ] + ); + }); + test('findNextMatch without regex', () => { let model = TextModel.createFromString('line line one\nline two\nthree'); - let searchParams = new SearchParams('line', false, false, false); + let searchParams = new SearchParams('line', false, false, null); let actual = TextModelSearch.findNextMatch(model, searchParams, new Position(1, 1), false); assertFindMatch(actual, new Range(1, 1, 1, 5)); @@ -359,7 +406,7 @@ suite('TextModelSearch', () => { test('findNextMatch with beginning boundary regex', () => { let model = TextModel.createFromString('line one\nline two\nthree'); - let searchParams = new SearchParams('^line', true, false, false); + let searchParams = new SearchParams('^line', true, false, null); let actual = TextModelSearch.findNextMatch(model, searchParams, new Position(1, 1), false); assertFindMatch(actual, new Range(1, 1, 1, 5)); @@ -379,7 +426,7 @@ suite('TextModelSearch', () => { test('findNextMatch with beginning boundary regex and line has repetitive beginnings', () => { let model = TextModel.createFromString('line line one\nline two\nthree'); - let searchParams = new SearchParams('^line', true, false, false); + let searchParams = new SearchParams('^line', true, false, null); let actual = TextModelSearch.findNextMatch(model, searchParams, new Position(1, 1), false); assertFindMatch(actual, new Range(1, 1, 1, 5)); @@ -399,7 +446,7 @@ suite('TextModelSearch', () => { test('findNextMatch with beginning boundary multiline regex and line has repetitive beginnings', () => { let model = TextModel.createFromString('line line one\nline two\nline three\nline four'); - let searchParams = new SearchParams('^line.*\\nline', true, false, false); + let searchParams = new SearchParams('^line.*\\nline', true, false, null); let actual = TextModelSearch.findNextMatch(model, searchParams, new Position(1, 1), false); assertFindMatch(actual, new Range(1, 1, 2, 5)); @@ -416,7 +463,7 @@ suite('TextModelSearch', () => { test('findNextMatch with ending boundary regex', () => { let model = TextModel.createFromString('one line line\ntwo line\nthree'); - let searchParams = new SearchParams('line$', true, false, false); + let searchParams = new SearchParams('line$', true, false, null); let actual = TextModelSearch.findNextMatch(model, searchParams, new Position(1, 1), false); assertFindMatch(actual, new Range(1, 10, 1, 14)); @@ -436,7 +483,7 @@ suite('TextModelSearch', () => { test('findMatches with capturing matches', () => { let model = TextModel.createFromString('one line line\ntwo line\nthree'); - let searchParams = new SearchParams('(l(in)e)', true, false, false); + let searchParams = new SearchParams('(l(in)e)', true, false, null); let actual = TextModelSearch.findMatches(model, searchParams, model.getFullModelRange(), true, 100); assert.deepEqual(actual, [ @@ -451,7 +498,7 @@ suite('TextModelSearch', () => { test('findMatches multiline with capturing matches', () => { let model = TextModel.createFromString('one line line\ntwo line\nthree'); - let searchParams = new SearchParams('(l(in)e)\\n', true, false, false); + let searchParams = new SearchParams('(l(in)e)\\n', true, false, null); let actual = TextModelSearch.findMatches(model, searchParams, model.getFullModelRange(), true, 100); assert.deepEqual(actual, [ @@ -465,7 +512,7 @@ suite('TextModelSearch', () => { test('findNextMatch with capturing matches', () => { let model = TextModel.createFromString('one line line\ntwo line\nthree'); - let searchParams = new SearchParams('(l(in)e)', true, false, false); + let searchParams = new SearchParams('(l(in)e)', true, false, null); let actual = TextModelSearch.findNextMatch(model, searchParams, new Position(1, 1), true); assertFindMatch(actual, new Range(1, 5, 1, 9), ['line', 'line', 'in']); @@ -476,7 +523,7 @@ suite('TextModelSearch', () => { test('findNextMatch multiline with capturing matches', () => { let model = TextModel.createFromString('one line line\ntwo line\nthree'); - let searchParams = new SearchParams('(l(in)e)\\n', true, false, false); + let searchParams = new SearchParams('(l(in)e)\\n', true, false, null); let actual = TextModelSearch.findNextMatch(model, searchParams, new Position(1, 1), true); assertFindMatch(actual, new Range(1, 10, 2, 1), ['line\n', 'line', 'in']); @@ -487,7 +534,7 @@ suite('TextModelSearch', () => { test('findPreviousMatch with capturing matches', () => { let model = TextModel.createFromString('one line line\ntwo line\nthree'); - let searchParams = new SearchParams('(l(in)e)', true, false, false); + let searchParams = new SearchParams('(l(in)e)', true, false, null); let actual = TextModelSearch.findPreviousMatch(model, searchParams, new Position(1, 1), true); assertFindMatch(actual, new Range(2, 5, 2, 9), ['line', 'line', 'in']); @@ -498,7 +545,7 @@ suite('TextModelSearch', () => { test('findPreviousMatch multiline with capturing matches', () => { let model = TextModel.createFromString('one line line\ntwo line\nthree'); - let searchParams = new SearchParams('(l(in)e)\\n', true, false, false); + let searchParams = new SearchParams('(l(in)e)\\n', true, false, null); let actual = TextModelSearch.findPreviousMatch(model, searchParams, new Position(1, 1), true); assertFindMatch(actual, new Range(2, 5, 3, 1), ['line\n', 'line', 'in']); @@ -511,17 +558,17 @@ suite('TextModelSearch', () => { assert.equal(model.getEOL(), '\r\n'); - let searchParams = new SearchParams('h\\n', true, false, false); + let searchParams = new SearchParams('h\\n', true, false, null); let actual = TextModelSearch.findNextMatch(model, searchParams, new Position(1, 1), true); actual = TextModelSearch.findMatches(model, searchParams, model.getFullModelRange(), true, 1000)[0]; assertFindMatch(actual, new Range(8, 1, 9, 1), ['h\n']); - searchParams = new SearchParams('g\\nh\\n', true, false, false); + searchParams = new SearchParams('g\\nh\\n', true, false, null); actual = TextModelSearch.findNextMatch(model, searchParams, new Position(1, 1), true); actual = TextModelSearch.findMatches(model, searchParams, model.getFullModelRange(), true, 1000)[0]; assertFindMatch(actual, new Range(7, 1, 9, 1), ['g\nh\n']); - searchParams = new SearchParams('\\ni', true, false, false); + searchParams = new SearchParams('\\ni', true, false, null); actual = TextModelSearch.findNextMatch(model, searchParams, new Position(1, 1), true); actual = TextModelSearch.findMatches(model, searchParams, model.getFullModelRange(), true, 1000)[0]; assertFindMatch(actual, new Range(8, 2, 9, 2), ['\ni']); @@ -534,7 +581,7 @@ suite('TextModelSearch', () => { assert.equal(model.getEOL(), '\r\n'); - let searchParams = new SearchParams('\\r\\n', true, false, false); + let searchParams = new SearchParams('\\r\\n', true, false, null); let actual = TextModelSearch.findNextMatch(model, searchParams, new Position(1, 1), true); assert.equal(actual, null); assert.deepEqual(TextModelSearch.findMatches(model, searchParams, model.getFullModelRange(), true, 1000), []); @@ -542,37 +589,48 @@ suite('TextModelSearch', () => { model.dispose(); }); - function assertParseSearchResult(searchString: string, isRegex: boolean, matchCase: boolean, wholeWord: boolean, expected: SearchData): void { - let searchParams = new SearchParams(searchString, isRegex, matchCase, wholeWord); + function assertParseSearchResult(searchString: string, isRegex: boolean, matchCase: boolean, wordSeparators: string, expected: SearchData): void { + let searchParams = new SearchParams(searchString, isRegex, matchCase, wordSeparators); let actual = searchParams.parseSearchRequest(); - assert.deepEqual(actual, expected); + + if (expected === null) { + assert.ok(actual === null); + } else { + assert.deepEqual(actual.regex, expected.regex); + assert.deepEqual(actual.simpleSearch, expected.simpleSearch); + if (wordSeparators) { + assert.ok(actual.wordSeparators !== null); + } else { + assert.ok(actual.wordSeparators === null); + } + } } test('parseSearchRequest invalid', () => { - assertParseSearchResult('', true, true, true, null); - assertParseSearchResult(null, true, true, true, null); - assertParseSearchResult('(', true, false, false, null); + assertParseSearchResult('', true, true, USUAL_WORD_SEPARATORS, null); + assertParseSearchResult(null, true, true, USUAL_WORD_SEPARATORS, null); + assertParseSearchResult('(', true, false, null, null); }); test('parseSearchRequest non regex', () => { - assertParseSearchResult('foo', false, false, false, new SearchData(/foo/gi, null)); - assertParseSearchResult('foo', false, false, true, new SearchData(/\bfoo\b/gi, null)); - assertParseSearchResult('foo', false, true, false, new SearchData(/foo/g, 'foo')); - assertParseSearchResult('foo', false, true, true, new SearchData(/\bfoo\b/g, null)); - assertParseSearchResult('foo\\n', false, false, false, new SearchData(/foo\\n/gi, null)); - assertParseSearchResult('foo\\\\n', false, false, false, new SearchData(/foo\\\\n/gi, null)); - assertParseSearchResult('foo\\r', false, false, false, new SearchData(/foo\\r/gi, null)); - assertParseSearchResult('foo\\\\r', false, false, false, new SearchData(/foo\\\\r/gi, null)); + assertParseSearchResult('foo', false, false, null, new SearchData(/foo/gi, null, null)); + assertParseSearchResult('foo', false, false, USUAL_WORD_SEPARATORS, new SearchData(/foo/gi, usualWordSeparators, null)); + assertParseSearchResult('foo', false, true, null, new SearchData(/foo/g, null, 'foo')); + assertParseSearchResult('foo', false, true, USUAL_WORD_SEPARATORS, new SearchData(/foo/g, usualWordSeparators, 'foo')); + assertParseSearchResult('foo\\n', false, false, null, new SearchData(/foo\\n/gi, null, null)); + assertParseSearchResult('foo\\\\n', false, false, null, new SearchData(/foo\\\\n/gi, null, null)); + assertParseSearchResult('foo\\r', false, false, null, new SearchData(/foo\\r/gi, null, null)); + assertParseSearchResult('foo\\\\r', false, false, null, new SearchData(/foo\\\\r/gi, null, null)); }); test('parseSearchRequest regex', () => { - assertParseSearchResult('foo', true, false, false, new SearchData(/foo/gi, null)); - assertParseSearchResult('foo', true, false, true, new SearchData(/\bfoo\b/gi, null)); - assertParseSearchResult('foo', true, true, false, new SearchData(/foo/g, null)); - assertParseSearchResult('foo', true, true, true, new SearchData(/\bfoo\b/g, null)); - assertParseSearchResult('foo\\n', true, false, false, new SearchData(/foo\n/gim, null)); - assertParseSearchResult('foo\\\\n', true, false, false, new SearchData(/foo\\n/gi, null)); - assertParseSearchResult('foo\\r', true, false, false, new SearchData(/foo\r/gim, null)); - assertParseSearchResult('foo\\\\r', true, false, false, new SearchData(/foo\\r/gi, null)); + assertParseSearchResult('foo', true, false, null, new SearchData(/foo/gi, null, null)); + assertParseSearchResult('foo', true, false, USUAL_WORD_SEPARATORS, new SearchData(/foo/gi, usualWordSeparators, null)); + assertParseSearchResult('foo', true, true, null, new SearchData(/foo/g, null, null)); + assertParseSearchResult('foo', true, true, USUAL_WORD_SEPARATORS, new SearchData(/foo/g, usualWordSeparators, null)); + assertParseSearchResult('foo\\n', true, false, null, new SearchData(/foo\n/gim, null, null)); + assertParseSearchResult('foo\\\\n', true, false, null, new SearchData(/foo\\n/gi, null, null)); + assertParseSearchResult('foo\\r', true, false, null, new SearchData(/foo\r/gim, null, null)); + assertParseSearchResult('foo\\\\r', true, false, null, new SearchData(/foo\\r/gi, null, null)); }); }); diff --git a/src/vs/editor/test/common/model/textModelWithTokens.test.ts b/src/vs/editor/test/common/model/textModelWithTokens.test.ts index 09ac2a2df07b7..6ac512096dd10 100644 --- a/src/vs/editor/test/common/model/textModelWithTokens.test.ts +++ b/src/vs/editor/test/common/model/textModelWithTokens.test.ts @@ -240,7 +240,7 @@ suite('TextModelWithTokens - bracket matching', () => { [new Position(5, 5), new Range(5, 4, 5, 5), new Range(1, 11, 1, 12)], ]; - let isABracket = { 1: {}, 2: {}, 3: {}, 4: {}, 5: {} }; + let isABracket: { [lineNumber: number]: { [col: number]: boolean; }; } = { 1: {}, 2: {}, 3: {}, 4: {}, 5: {} }; for (let i = 0, len = brackets.length; i < len; i++) { let [testPos, b1, b2] = brackets[i]; isBracket2(model, testPos, [b1, b2]); @@ -250,7 +250,7 @@ suite('TextModelWithTokens - bracket matching', () => { for (let i = 1, len = model.getLineCount(); i <= len; i++) { let line = model.getLineContent(i); for (let j = 1, lenJ = line.length + 1; j <= lenJ; j++) { - if (!isABracket[i].hasOwnProperty(j)) { + if (!isABracket[i].hasOwnProperty(j)) { isNotABracket(model, i, j); } } diff --git a/src/vs/editor/test/common/modes/supports/onEnter.test.ts b/src/vs/editor/test/common/modes/supports/onEnter.test.ts index a0a6cf77fd008..8b47393c63535 100644 --- a/src/vs/editor/test/common/modes/supports/onEnter.test.ts +++ b/src/vs/editor/test/common/modes/supports/onEnter.test.ts @@ -10,34 +10,6 @@ import { OnEnterSupport } from 'vs/editor/common/modes/supports/onEnter'; suite('OnEnter', () => { - test('uses indentationRules', () => { - var support = new OnEnterSupport({ - indentationRules: { - decreaseIndentPattern: /^\s*((?!\S.*\/[*]).*[*]\/\s*)?[})\]]|^\s*(case\b.*|default):\s*(\/\/.*|\/[*].*[*]\/\s*)?$/, - increaseIndentPattern: /(\{[^}"'`]*|\([^)"']*|\[[^\]"']*|^\s*(\{\}|\(\)|\[\]|(case\b.*|default):))\s*(\/\/.*|\/[*].*[*]\/\s*)?$/, - indentNextLinePattern: /^\s*(for|while|if|else)\b(?!.*[;{}]\s*(\/\/.*|\/[*].*[*]\/\s*)?$)/, - unIndentedLinePattern: /^(?!.*([;{}]|\S:)\s*(\/\/.*|\/[*].*[*]\/\s*)?$)(?!.*(\{[^}"']*|\([^)"']*|\[[^\]"']*|^\s*(\{\}|\(\)|\[\]|(case\b.*|default):))\s*(\/\/.*|\/[*].*[*]\/\s*)?$)(?!^\s*((?!\S.*\/[*]).*[*]\/\s*)?[})\]]|^\s*(case\b.*|default):\s*(\/\/.*|\/[*].*[*]\/\s*)?$)(?!^\s*(for|while|if|else)\b(?!.*[;{}]\s*(\/\/.*|\/[*].*[*]\/\s*)?$))/ - } - }); - - var testIndentAction = (oneLineAboveText: string, beforeText: string, afterText: string, expected: IndentAction) => { - var actual = support.onEnter(oneLineAboveText, beforeText, afterText); - if (expected === IndentAction.None) { - assert.equal(actual, null); - } else { - assert.equal(actual.indentAction, expected); - } - }; - - testIndentAction('', 'case', '', IndentAction.None); - testIndentAction('', 'case:', '', IndentAction.Indent); - testIndentAction('', 'if (true) {', '', IndentAction.Indent); - testIndentAction('', 'if (true)', '', IndentAction.Indent); - testIndentAction('', ' ', '}', IndentAction.Outdent); - testIndentAction('if(true)', '\treturn false', '', IndentAction.Outdent); - testIndentAction('', 'var foo = `{`;', '', IndentAction.None); - }); - test('uses brackets', () => { var brackets: CharacterPair[] = [ ['(', ')'], diff --git a/src/vs/editor/test/common/standalone/standaloneBase.test.ts b/src/vs/editor/test/common/standalone/standaloneBase.test.ts index c26df8b28e662..64849eb80cb62 100644 --- a/src/vs/editor/test/common/standalone/standaloneBase.test.ts +++ b/src/vs/editor/test/common/standalone/standaloneBase.test.ts @@ -135,6 +135,8 @@ suite('KeyCode', () => { assertKeyCode(StandaloneKeyCode.NUMPAD_DECIMAL, RuntimeKeyCode.NUMPAD_DECIMAL); assertKeyCode(StandaloneKeyCode.NUMPAD_DIVIDE, RuntimeKeyCode.NUMPAD_DIVIDE); assertKeyCode(StandaloneKeyCode.KEY_IN_COMPOSITION, RuntimeKeyCode.KEY_IN_COMPOSITION); + assertKeyCode(StandaloneKeyCode.ABNT_C1, RuntimeKeyCode.ABNT_C1); + assertKeyCode(StandaloneKeyCode.ABNT_C2, RuntimeKeyCode.ABNT_C2); assertKeyCode(StandaloneKeyCode.MAX_VALUE, RuntimeKeyCode.MAX_VALUE); }); }); diff --git a/src/vs/editor/test/common/view/overviewZoneManager.test.ts b/src/vs/editor/test/common/view/overviewZoneManager.test.ts index 2ebe4035af1ef..1cfc1a4a2b123 100644 --- a/src/vs/editor/test/common/view/overviewZoneManager.test.ts +++ b/src/vs/editor/test/common/view/overviewZoneManager.test.ts @@ -5,8 +5,9 @@ 'use strict'; import * as assert from 'assert'; -import { OverviewRulerLane, ThemeType } from 'vs/editor/common/editorCommon'; +import { OverviewRulerLane } from 'vs/editor/common/editorCommon'; import { OverviewZoneManager, ColorZone, OverviewRulerZone } from 'vs/editor/common/view/overviewZoneManager'; +import { LIGHT } from 'vs/platform/theme/common/themeService'; suite('Editor View - OverviewZoneManager', () => { @@ -16,7 +17,7 @@ suite('Editor View - OverviewZoneManager', () => { let manager = new OverviewZoneManager((lineNumber) => LINE_HEIGHT * lineNumber); manager.setMinimumHeight(6); manager.setMaximumHeight(6); - manager.setThemeType(ThemeType.Light); + manager.setThemeType(LIGHT); manager.setDOMWidth(30); manager.setDOMHeight(600); manager.setOuterHeight(LINE_COUNT * LINE_HEIGHT); @@ -46,7 +47,7 @@ suite('Editor View - OverviewZoneManager', () => { let manager = new OverviewZoneManager((lineNumber) => LINE_HEIGHT * lineNumber); manager.setMinimumHeight(6); manager.setMaximumHeight(6); - manager.setThemeType(ThemeType.Light); + manager.setThemeType(LIGHT); manager.setDOMWidth(30); manager.setDOMHeight(300); manager.setOuterHeight(LINE_COUNT * LINE_HEIGHT); @@ -75,7 +76,7 @@ suite('Editor View - OverviewZoneManager', () => { let manager = new OverviewZoneManager((lineNumber) => LINE_HEIGHT * lineNumber); manager.setMinimumHeight(6); manager.setMaximumHeight(6); - manager.setThemeType(ThemeType.Light); + manager.setThemeType(LIGHT); manager.setDOMWidth(30); manager.setDOMHeight(300); manager.setOuterHeight(LINE_COUNT * LINE_HEIGHT); diff --git a/src/vs/editor/test/common/viewLayout/editorLayoutProvider.test.ts b/src/vs/editor/test/common/viewLayout/editorLayoutProvider.test.ts index 28cd57513c8b4..53ac8d481a61b 100644 --- a/src/vs/editor/test/common/viewLayout/editorLayoutProvider.test.ts +++ b/src/vs/editor/test/common/viewLayout/editorLayoutProvider.test.ts @@ -5,8 +5,7 @@ 'use strict'; import * as assert from 'assert'; -import { RenderMinimap, EditorLayoutInfo, OverviewRulerPosition } from 'vs/editor/common/config/editorOptions'; -import { EditorLayoutProvider, IEditorLayoutProviderOpts } from 'vs/editor/common/viewLayout/editorLayoutProvider'; +import { RenderMinimap, EditorLayoutInfo, EditorLayoutProvider, IEditorLayoutProviderOpts } from 'vs/editor/common/config/editorOptions'; suite('Editor ViewLayout - EditorLayoutProvider', () => { @@ -35,40 +34,40 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { minimapRenderCharacters: true, minimapMaxColumn: 150, pixelRatio: 1, - }, new EditorLayoutInfo({ - width: 1000, - height: 800, + }, { + width: 1000, + height: 800, - glyphMarginLeft: 0, - glyphMarginWidth: 0, - glyphMarginHeight: 800, + glyphMarginLeft: 0, + glyphMarginWidth: 0, + glyphMarginHeight: 800, - lineNumbersLeft: 0, - lineNumbersWidth: 0, - lineNumbersHeight: 800, + lineNumbersLeft: 0, + lineNumbersWidth: 0, + lineNumbersHeight: 800, - decorationsLeft: 0, - decorationsWidth: 10, - decorationsHeight: 800, + decorationsLeft: 0, + decorationsWidth: 10, + decorationsHeight: 800, - contentLeft: 10, - contentWidth: 990, - contentHeight: 800, + contentLeft: 10, + contentWidth: 990, + contentHeight: 800, - renderMinimap: RenderMinimap.None, - minimapWidth: 0, - viewportColumn: 99, + renderMinimap: RenderMinimap.None, + minimapWidth: 0, + viewportColumn: 99, - verticalScrollbarWidth: 0, - horizontalScrollbarHeight: 0, + verticalScrollbarWidth: 0, + horizontalScrollbarHeight: 0, - overviewRuler: new OverviewRulerPosition({ - top: 0, - width: 0, - height: 800, - right: 0 - }) - })); + overviewRuler: { + top: 0, + width: 0, + height: 800, + right: 0 + } + }); }); test('EditorLayoutProvider 1.1', () => { @@ -91,40 +90,40 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { minimapRenderCharacters: true, minimapMaxColumn: 150, pixelRatio: 1, - }, new EditorLayoutInfo({ - width: 1000, - height: 800, + }, { + width: 1000, + height: 800, - glyphMarginLeft: 0, - glyphMarginWidth: 0, - glyphMarginHeight: 800, + glyphMarginLeft: 0, + glyphMarginWidth: 0, + glyphMarginHeight: 800, - lineNumbersLeft: 0, - lineNumbersWidth: 0, - lineNumbersHeight: 800, + lineNumbersLeft: 0, + lineNumbersWidth: 0, + lineNumbersHeight: 800, - decorationsLeft: 0, - decorationsWidth: 10, - decorationsHeight: 800, + decorationsLeft: 0, + decorationsWidth: 10, + decorationsHeight: 800, - contentLeft: 10, - contentWidth: 990, - contentHeight: 800, + contentLeft: 10, + contentWidth: 990, + contentHeight: 800, - renderMinimap: RenderMinimap.None, - minimapWidth: 0, - viewportColumn: 97, + renderMinimap: RenderMinimap.None, + minimapWidth: 0, + viewportColumn: 97, - verticalScrollbarWidth: 11, - horizontalScrollbarHeight: 12, + verticalScrollbarWidth: 11, + horizontalScrollbarHeight: 12, - overviewRuler: new OverviewRulerPosition({ - top: 13, - width: 11, - height: (800 - 2 * 13), - right: 0 - }) - })); + overviewRuler: { + top: 13, + width: 11, + height: (800 - 2 * 13), + right: 0 + } + }); }); test('EditorLayoutProvider 2', () => { @@ -147,40 +146,40 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { minimapRenderCharacters: true, minimapMaxColumn: 150, pixelRatio: 1, - }, new EditorLayoutInfo({ - width: 900, - height: 800, + }, { + width: 900, + height: 800, - glyphMarginLeft: 0, - glyphMarginWidth: 0, - glyphMarginHeight: 800, + glyphMarginLeft: 0, + glyphMarginWidth: 0, + glyphMarginHeight: 800, - lineNumbersLeft: 0, - lineNumbersWidth: 0, - lineNumbersHeight: 800, + lineNumbersLeft: 0, + lineNumbersWidth: 0, + lineNumbersHeight: 800, - decorationsLeft: 0, - decorationsWidth: 10, - decorationsHeight: 800, + decorationsLeft: 0, + decorationsWidth: 10, + decorationsHeight: 800, - contentLeft: 10, - contentWidth: 890, - contentHeight: 800, + contentLeft: 10, + contentWidth: 890, + contentHeight: 800, - renderMinimap: RenderMinimap.None, - minimapWidth: 0, - viewportColumn: 89, + renderMinimap: RenderMinimap.None, + minimapWidth: 0, + viewportColumn: 89, - verticalScrollbarWidth: 0, - horizontalScrollbarHeight: 0, + verticalScrollbarWidth: 0, + horizontalScrollbarHeight: 0, - overviewRuler: new OverviewRulerPosition({ - top: 0, - width: 0, - height: 800, - right: 0 - }) - })); + overviewRuler: { + top: 0, + width: 0, + height: 800, + right: 0 + } + }); }); test('EditorLayoutProvider 3', () => { @@ -203,40 +202,40 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { minimapRenderCharacters: true, minimapMaxColumn: 150, pixelRatio: 1, - }, new EditorLayoutInfo({ - width: 900, - height: 900, + }, { + width: 900, + height: 900, - glyphMarginLeft: 0, - glyphMarginWidth: 0, - glyphMarginHeight: 900, + glyphMarginLeft: 0, + glyphMarginWidth: 0, + glyphMarginHeight: 900, - lineNumbersLeft: 0, - lineNumbersWidth: 0, - lineNumbersHeight: 900, + lineNumbersLeft: 0, + lineNumbersWidth: 0, + lineNumbersHeight: 900, - decorationsLeft: 0, - decorationsWidth: 10, - decorationsHeight: 900, + decorationsLeft: 0, + decorationsWidth: 10, + decorationsHeight: 900, - contentLeft: 10, - contentWidth: 890, - contentHeight: 900, + contentLeft: 10, + contentWidth: 890, + contentHeight: 900, - renderMinimap: RenderMinimap.None, - minimapWidth: 0, - viewportColumn: 89, + renderMinimap: RenderMinimap.None, + minimapWidth: 0, + viewportColumn: 89, - verticalScrollbarWidth: 0, - horizontalScrollbarHeight: 0, + verticalScrollbarWidth: 0, + horizontalScrollbarHeight: 0, - overviewRuler: new OverviewRulerPosition({ - top: 0, - width: 0, - height: 900, - right: 0 - }) - })); + overviewRuler: { + top: 0, + width: 0, + height: 900, + right: 0 + } + }); }); test('EditorLayoutProvider 4', () => { @@ -259,40 +258,40 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { minimapRenderCharacters: true, minimapMaxColumn: 150, pixelRatio: 1, - }, new EditorLayoutInfo({ - width: 900, - height: 900, + }, { + width: 900, + height: 900, - glyphMarginLeft: 0, - glyphMarginWidth: 0, - glyphMarginHeight: 900, + glyphMarginLeft: 0, + glyphMarginWidth: 0, + glyphMarginHeight: 900, - lineNumbersLeft: 0, - lineNumbersWidth: 0, - lineNumbersHeight: 900, + lineNumbersLeft: 0, + lineNumbersWidth: 0, + lineNumbersHeight: 900, - decorationsLeft: 0, - decorationsWidth: 10, - decorationsHeight: 900, + decorationsLeft: 0, + decorationsWidth: 10, + decorationsHeight: 900, - contentLeft: 10, - contentWidth: 890, - contentHeight: 900, + contentLeft: 10, + contentWidth: 890, + contentHeight: 900, - renderMinimap: RenderMinimap.None, - minimapWidth: 0, - viewportColumn: 89, + renderMinimap: RenderMinimap.None, + minimapWidth: 0, + viewportColumn: 89, - verticalScrollbarWidth: 0, - horizontalScrollbarHeight: 0, + verticalScrollbarWidth: 0, + horizontalScrollbarHeight: 0, - overviewRuler: new OverviewRulerPosition({ - top: 0, - width: 0, - height: 900, - right: 0 - }) - })); + overviewRuler: { + top: 0, + width: 0, + height: 900, + right: 0 + } + }); }); test('EditorLayoutProvider 5', () => { @@ -315,40 +314,40 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { minimapRenderCharacters: true, minimapMaxColumn: 150, pixelRatio: 1, - }, new EditorLayoutInfo({ - width: 900, - height: 900, + }, { + width: 900, + height: 900, - glyphMarginLeft: 0, - glyphMarginWidth: 0, - glyphMarginHeight: 900, + glyphMarginLeft: 0, + glyphMarginWidth: 0, + glyphMarginHeight: 900, - lineNumbersLeft: 0, - lineNumbersWidth: 50, - lineNumbersHeight: 900, + lineNumbersLeft: 0, + lineNumbersWidth: 50, + lineNumbersHeight: 900, - decorationsLeft: 50, - decorationsWidth: 10, - decorationsHeight: 900, + decorationsLeft: 50, + decorationsWidth: 10, + decorationsHeight: 900, - contentLeft: 60, - contentWidth: 840, - contentHeight: 900, + contentLeft: 60, + contentWidth: 840, + contentHeight: 900, - renderMinimap: RenderMinimap.None, - minimapWidth: 0, - viewportColumn: 84, + renderMinimap: RenderMinimap.None, + minimapWidth: 0, + viewportColumn: 84, - verticalScrollbarWidth: 0, - horizontalScrollbarHeight: 0, + verticalScrollbarWidth: 0, + horizontalScrollbarHeight: 0, - overviewRuler: new OverviewRulerPosition({ - top: 0, - width: 0, - height: 900, - right: 0 - }) - })); + overviewRuler: { + top: 0, + width: 0, + height: 900, + right: 0 + } + }); }); test('EditorLayoutProvider 6', () => { @@ -371,40 +370,40 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { minimapRenderCharacters: true, minimapMaxColumn: 150, pixelRatio: 1, - }, new EditorLayoutInfo({ - width: 900, - height: 900, + }, { + width: 900, + height: 900, - glyphMarginLeft: 0, - glyphMarginWidth: 0, - glyphMarginHeight: 900, + glyphMarginLeft: 0, + glyphMarginWidth: 0, + glyphMarginHeight: 900, - lineNumbersLeft: 0, - lineNumbersWidth: 50, - lineNumbersHeight: 900, + lineNumbersLeft: 0, + lineNumbersWidth: 50, + lineNumbersHeight: 900, - decorationsLeft: 50, - decorationsWidth: 10, - decorationsHeight: 900, + decorationsLeft: 50, + decorationsWidth: 10, + decorationsHeight: 900, - contentLeft: 60, - contentWidth: 840, - contentHeight: 900, + contentLeft: 60, + contentWidth: 840, + contentHeight: 900, - renderMinimap: RenderMinimap.None, - minimapWidth: 0, - viewportColumn: 84, + renderMinimap: RenderMinimap.None, + minimapWidth: 0, + viewportColumn: 84, - verticalScrollbarWidth: 0, - horizontalScrollbarHeight: 0, + verticalScrollbarWidth: 0, + horizontalScrollbarHeight: 0, - overviewRuler: new OverviewRulerPosition({ - top: 0, - width: 0, - height: 900, - right: 0 - }) - })); + overviewRuler: { + top: 0, + width: 0, + height: 900, + right: 0 + } + }); }); test('EditorLayoutProvider 7', () => { @@ -427,40 +426,40 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { minimapRenderCharacters: true, minimapMaxColumn: 150, pixelRatio: 1, - }, new EditorLayoutInfo({ - width: 900, - height: 900, + }, { + width: 900, + height: 900, - glyphMarginLeft: 0, - glyphMarginWidth: 0, - glyphMarginHeight: 900, + glyphMarginLeft: 0, + glyphMarginWidth: 0, + glyphMarginHeight: 900, - lineNumbersLeft: 0, - lineNumbersWidth: 60, - lineNumbersHeight: 900, + lineNumbersLeft: 0, + lineNumbersWidth: 60, + lineNumbersHeight: 900, - decorationsLeft: 60, - decorationsWidth: 10, - decorationsHeight: 900, + decorationsLeft: 60, + decorationsWidth: 10, + decorationsHeight: 900, - contentLeft: 70, - contentWidth: 830, - contentHeight: 900, + contentLeft: 70, + contentWidth: 830, + contentHeight: 900, - renderMinimap: RenderMinimap.None, - minimapWidth: 0, - viewportColumn: 83, + renderMinimap: RenderMinimap.None, + minimapWidth: 0, + viewportColumn: 83, - verticalScrollbarWidth: 0, - horizontalScrollbarHeight: 0, + verticalScrollbarWidth: 0, + horizontalScrollbarHeight: 0, - overviewRuler: new OverviewRulerPosition({ - top: 0, - width: 0, - height: 900, - right: 0 - }) - })); + overviewRuler: { + top: 0, + width: 0, + height: 900, + right: 0 + } + }); }); test('EditorLayoutProvider 8', () => { @@ -483,40 +482,40 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { minimapRenderCharacters: true, minimapMaxColumn: 150, pixelRatio: 1, - }, new EditorLayoutInfo({ - width: 900, - height: 900, + }, { + width: 900, + height: 900, - glyphMarginLeft: 0, - glyphMarginWidth: 0, - glyphMarginHeight: 900, + glyphMarginLeft: 0, + glyphMarginWidth: 0, + glyphMarginHeight: 900, - lineNumbersLeft: 0, - lineNumbersWidth: 30, - lineNumbersHeight: 900, + lineNumbersLeft: 0, + lineNumbersWidth: 30, + lineNumbersHeight: 900, - decorationsLeft: 30, - decorationsWidth: 10, - decorationsHeight: 900, + decorationsLeft: 30, + decorationsWidth: 10, + decorationsHeight: 900, - contentLeft: 40, - contentWidth: 860, - contentHeight: 900, + contentLeft: 40, + contentWidth: 860, + contentHeight: 900, - renderMinimap: RenderMinimap.None, - minimapWidth: 0, - viewportColumn: 172, + renderMinimap: RenderMinimap.None, + minimapWidth: 0, + viewportColumn: 172, - verticalScrollbarWidth: 0, - horizontalScrollbarHeight: 0, + verticalScrollbarWidth: 0, + horizontalScrollbarHeight: 0, - overviewRuler: new OverviewRulerPosition({ - top: 0, - width: 0, - height: 900, - right: 0 - }) - })); + overviewRuler: { + top: 0, + width: 0, + height: 900, + right: 0 + } + }); }); test('EditorLayoutProvider 8 - rounds floats', () => { @@ -539,40 +538,40 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { minimapRenderCharacters: true, minimapMaxColumn: 150, pixelRatio: 1, - }, new EditorLayoutInfo({ - width: 900, - height: 900, + }, { + width: 900, + height: 900, - glyphMarginLeft: 0, - glyphMarginWidth: 0, - glyphMarginHeight: 900, + glyphMarginLeft: 0, + glyphMarginWidth: 0, + glyphMarginHeight: 900, - lineNumbersLeft: 0, - lineNumbersWidth: 30, - lineNumbersHeight: 900, + lineNumbersLeft: 0, + lineNumbersWidth: 30, + lineNumbersHeight: 900, - decorationsLeft: 30, - decorationsWidth: 10, - decorationsHeight: 900, + decorationsLeft: 30, + decorationsWidth: 10, + decorationsHeight: 900, - contentLeft: 40, - contentWidth: 860, - contentHeight: 900, + contentLeft: 40, + contentWidth: 860, + contentHeight: 900, - renderMinimap: RenderMinimap.None, - minimapWidth: 0, - viewportColumn: 170, + renderMinimap: RenderMinimap.None, + minimapWidth: 0, + viewportColumn: 170, - verticalScrollbarWidth: 0, - horizontalScrollbarHeight: 0, + verticalScrollbarWidth: 0, + horizontalScrollbarHeight: 0, - overviewRuler: new OverviewRulerPosition({ - top: 0, - width: 0, - height: 900, - right: 0 - }) - })); + overviewRuler: { + top: 0, + width: 0, + height: 900, + right: 0 + } + }); }); test('EditorLayoutProvider 9 - render minimap', () => { @@ -595,40 +594,40 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { minimapRenderCharacters: true, minimapMaxColumn: 150, pixelRatio: 1, - }, new EditorLayoutInfo({ - width: 1000, - height: 800, + }, { + width: 1000, + height: 800, - glyphMarginLeft: 0, - glyphMarginWidth: 0, - glyphMarginHeight: 800, + glyphMarginLeft: 0, + glyphMarginWidth: 0, + glyphMarginHeight: 800, - lineNumbersLeft: 0, - lineNumbersWidth: 0, - lineNumbersHeight: 800, + lineNumbersLeft: 0, + lineNumbersWidth: 0, + lineNumbersHeight: 800, - decorationsLeft: 0, - decorationsWidth: 10, - decorationsHeight: 800, + decorationsLeft: 0, + decorationsWidth: 10, + decorationsHeight: 800, - contentLeft: 10, - contentWidth: 900, - contentHeight: 800, + contentLeft: 10, + contentWidth: 900, + contentHeight: 800, - renderMinimap: RenderMinimap.Small, - minimapWidth: 90, - viewportColumn: 90, + renderMinimap: RenderMinimap.Small, + minimapWidth: 90, + viewportColumn: 90, - verticalScrollbarWidth: 0, - horizontalScrollbarHeight: 0, + verticalScrollbarWidth: 0, + horizontalScrollbarHeight: 0, - overviewRuler: new OverviewRulerPosition({ - top: 0, - width: 0, - height: 800, - right: 0 - }) - })); + overviewRuler: { + top: 0, + width: 0, + height: 800, + right: 0 + } + }); }); test('EditorLayoutProvider 9 - render minimap with pixelRatio = 2', () => { @@ -651,40 +650,40 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { minimapRenderCharacters: true, minimapMaxColumn: 150, pixelRatio: 2, - }, new EditorLayoutInfo({ - width: 1000, - height: 800, + }, { + width: 1000, + height: 800, - glyphMarginLeft: 0, - glyphMarginWidth: 0, - glyphMarginHeight: 800, + glyphMarginLeft: 0, + glyphMarginWidth: 0, + glyphMarginHeight: 800, - lineNumbersLeft: 0, - lineNumbersWidth: 0, - lineNumbersHeight: 800, + lineNumbersLeft: 0, + lineNumbersWidth: 0, + lineNumbersHeight: 800, - decorationsLeft: 0, - decorationsWidth: 10, - decorationsHeight: 800, + decorationsLeft: 0, + decorationsWidth: 10, + decorationsHeight: 800, - contentLeft: 10, - contentWidth: 900, - contentHeight: 800, + contentLeft: 10, + contentWidth: 900, + contentHeight: 800, - renderMinimap: RenderMinimap.Large, - minimapWidth: 90, - viewportColumn: 90, + renderMinimap: RenderMinimap.Large, + minimapWidth: 90, + viewportColumn: 90, - verticalScrollbarWidth: 0, - horizontalScrollbarHeight: 0, + verticalScrollbarWidth: 0, + horizontalScrollbarHeight: 0, - overviewRuler: new OverviewRulerPosition({ - top: 0, - width: 0, - height: 800, - right: 0 - }) - })); + overviewRuler: { + top: 0, + width: 0, + height: 800, + right: 0 + } + }); }); test('EditorLayoutProvider 9 - render minimap with pixelRatio = 4', () => { @@ -707,39 +706,39 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { minimapRenderCharacters: true, minimapMaxColumn: 150, pixelRatio: 4, - }, new EditorLayoutInfo({ - width: 1000, - height: 800, + }, { + width: 1000, + height: 800, - glyphMarginLeft: 0, - glyphMarginWidth: 0, - glyphMarginHeight: 800, + glyphMarginLeft: 0, + glyphMarginWidth: 0, + glyphMarginHeight: 800, - lineNumbersLeft: 0, - lineNumbersWidth: 0, - lineNumbersHeight: 800, + lineNumbersLeft: 0, + lineNumbersWidth: 0, + lineNumbersHeight: 800, - decorationsLeft: 0, - decorationsWidth: 10, - decorationsHeight: 800, + decorationsLeft: 0, + decorationsWidth: 10, + decorationsHeight: 800, - contentLeft: 10, - contentWidth: 943, - contentHeight: 800, + contentLeft: 10, + contentWidth: 943, + contentHeight: 800, - renderMinimap: RenderMinimap.Large, - minimapWidth: 47, - viewportColumn: 94, + renderMinimap: RenderMinimap.Large, + minimapWidth: 47, + viewportColumn: 94, - verticalScrollbarWidth: 0, - horizontalScrollbarHeight: 0, + verticalScrollbarWidth: 0, + horizontalScrollbarHeight: 0, - overviewRuler: new OverviewRulerPosition({ - top: 0, - width: 0, - height: 800, - right: 0 - }) - })); + overviewRuler: { + top: 0, + width: 0, + height: 800, + right: 0 + } + }); }); }); diff --git a/src/vs/editor/test/common/viewModel/characterHardWrappingLineMapper.test.ts b/src/vs/editor/test/common/viewModel/characterHardWrappingLineMapper.test.ts index 54c7b2b28a601..614295413ff4e 100644 --- a/src/vs/editor/test/common/viewModel/characterHardWrappingLineMapper.test.ts +++ b/src/vs/editor/test/common/viewModel/characterHardWrappingLineMapper.test.ts @@ -101,4 +101,9 @@ suite('Editor ViewModel - CharacterHardWrappingLineMapper', () => { let factory = new CharacterHardWrappingLineMapperFactory('', ' ', ''); assertLineMapping(factory, 4, 38, ' *123456789012345678901234567890123456|7890', WrappingIndent.Same); }); + + test('issue #16332: Scroll bar overlaying on top of text', () => { + let factory = new CharacterHardWrappingLineMapperFactory('', ' ', ''); + assertLineMapping(factory, 4, 24, 'a/ very/long/line/of/tex|t/that/expands/beyon|d/your/typical/line/|of/code/', WrappingIndent.Indent); + }); }); diff --git a/src/vs/editor/test/common/viewModel/splitLinesCollection.test.ts b/src/vs/editor/test/common/viewModel/splitLinesCollection.test.ts index 714e0b2c43700..cca084b09183e 100644 --- a/src/vs/editor/test/common/viewModel/splitLinesCollection.test.ts +++ b/src/vs/editor/test/common/viewModel/splitLinesCollection.test.ts @@ -17,7 +17,7 @@ import { NULL_STATE } from 'vs/editor/common/modes/nullMode'; import { TokenizationResult2 } from 'vs/editor/common/core/token'; import { IDisposable } from 'vs/base/common/lifecycle'; import { ViewLineToken } from 'vs/editor/common/core/viewLineToken'; -import { ViewLineData, ViewEventsCollector } from 'vs/editor/common/viewModel/viewModel'; +import { ViewLineData } from 'vs/editor/common/viewModel/viewModel'; import { Range } from 'vs/editor/common/core/range'; suite('Editor ViewModel - SplitLinesCollection', () => { @@ -205,7 +205,7 @@ suite('Editor ViewModel - SplitLinesCollection', () => { ].join('\n'); withSplitLinesCollection(text, (model, linesCollection) => { - linesCollection.setHiddenAreas(new ViewEventsCollector(), [ + linesCollection.setHiddenAreas([ new Range(1, 1, 3, 1), new Range(5, 1, 6, 1) ]); @@ -530,7 +530,7 @@ suite('SplitLinesCollection', () => { _expected[7], ]); - splitLinesCollection.setHiddenAreas(new ViewEventsCollector(), [new Range(2, 1, 4, 1)]); + splitLinesCollection.setHiddenAreas([new Range(2, 1, 4, 1)]); assert.equal(splitLinesCollection.getViewLineCount(), 5); assert.equal(splitLinesCollection.modelPositionIsVisible(1, 1), true); assert.equal(splitLinesCollection.modelPositionIsVisible(2, 1), false); @@ -700,7 +700,7 @@ suite('SplitLinesCollection', () => { _expected[11], ]); - splitLinesCollection.setHiddenAreas(new ViewEventsCollector(), [new Range(2, 1, 4, 1)]); + splitLinesCollection.setHiddenAreas([new Range(2, 1, 4, 1)]); assert.equal(splitLinesCollection.getViewLineCount(), 8); assert.equal(splitLinesCollection.modelPositionIsVisible(1, 1), true); assert.equal(splitLinesCollection.modelPositionIsVisible(2, 1), false); diff --git a/src/vs/editor/test/common/viewModel/testViewModel.ts b/src/vs/editor/test/common/viewModel/testViewModel.ts index 7c1e6ed9a77db..a041d80037a54 100644 --- a/src/vs/editor/test/common/viewModel/testViewModel.ts +++ b/src/vs/editor/test/common/viewModel/testViewModel.ts @@ -5,9 +5,7 @@ 'use strict'; import { Model } from 'vs/editor/common/model/model'; -import { CharacterHardWrappingLineMapperFactory } from 'vs/editor/common/viewModel/characterHardWrappingLineMapper'; import { TestConfiguration } from 'vs/editor/test/common/mocks/testConfiguration'; -import { SplitLinesCollection } from 'vs/editor/common/viewModel/splitLinesCollection'; import { ViewModel } from 'vs/editor/common/viewModel/viewModelImpl'; import { MockCodeEditorCreationOptions } from 'vs/editor/test/common/mocks/mockCodeEditor'; @@ -18,27 +16,7 @@ export function testViewModel(text: string[], options: MockCodeEditorCreationOpt let model = Model.createFromString(text.join('\n')); - let factory = new CharacterHardWrappingLineMapperFactory( - configuration.editor.wrappingInfo.wordWrapBreakBeforeCharacters, - configuration.editor.wrappingInfo.wordWrapBreakAfterCharacters, - configuration.editor.wrappingInfo.wordWrapBreakObtrusiveCharacters - ); - - let linesCollection = new SplitLinesCollection( - model, - factory, - model.getOptions().tabSize, - configuration.editor.wrappingInfo.wrappingColumn, - configuration.editor.fontInfo.typicalFullwidthCharacterWidth / configuration.editor.fontInfo.typicalHalfwidthCharacterWidth, - configuration.editor.wrappingInfo.wrappingIndent - ); - - let viewModel = new ViewModel( - linesCollection, - EDITOR_ID, - configuration, - model - ); + let viewModel = new ViewModel(EDITOR_ID, configuration, model); callback(viewModel, model); diff --git a/src/vs/loader.js b/src/vs/loader.js index 93484a427e4c2..aa1ae79ae5e7e 100644 --- a/src/vs/loader.js +++ b/src/vs/loader.js @@ -1,3 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. @@ -17,22 +22,35 @@ var _amdLoaderGlobal = this; var AMDLoader; (function (AMDLoader) { AMDLoader.global = _amdLoaderGlobal; - AMDLoader.isNode = (typeof module !== 'undefined' && !!module.exports); - AMDLoader.isWindows = (function _isWindows() { - if (typeof navigator !== 'undefined') { - if (navigator.userAgent && navigator.userAgent.indexOf('Windows') >= 0) { - return true; - } - } - if (typeof process !== 'undefined') { - return (process.platform === 'win32'); + var Environment = (function () { + function Environment(opts) { + this.isWindows = opts.isWindows; + this.isNode = opts.isNode; + this.isElectronRenderer = opts.isElectronRenderer; + this.isWebWorker = opts.isWebWorker; } - return false; - })(); - AMDLoader.isWebWorker = (typeof AMDLoader.global.importScripts === 'function'); - AMDLoader.isElectronRenderer = (typeof process !== 'undefined' && typeof process.versions !== 'undefined' && typeof process.versions.electron !== 'undefined' && process.type === 'renderer'); - AMDLoader.isElectronMain = (typeof process !== 'undefined' && typeof process.versions !== 'undefined' && typeof process.versions.electron !== 'undefined' && process.type === 'browser'); - AMDLoader.hasPerformanceNow = (AMDLoader.global.performance && typeof AMDLoader.global.performance.now === 'function'); + Environment.detect = function () { + return new Environment({ + isWindows: this._isWindows(), + isNode: (typeof module !== 'undefined' && !!module.exports), + isElectronRenderer: (typeof process !== 'undefined' && typeof process.versions !== 'undefined' && typeof process.versions.electron !== 'undefined' && process.type === 'renderer'), + isWebWorker: (typeof AMDLoader.global.importScripts === 'function') + }); + }; + Environment._isWindows = function () { + if (typeof navigator !== 'undefined') { + if (navigator.userAgent && navigator.userAgent.indexOf('Windows') >= 0) { + return true; + } + } + if (typeof process !== 'undefined') { + return (process.platform === 'win32'); + } + return false; + }; + return Environment; + }()); + AMDLoader.Environment = Environment; })(AMDLoader || (AMDLoader = {})); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. @@ -53,10 +71,6 @@ var AMDLoader; LoaderEventType[LoaderEventType["NodeBeginNativeRequire"] = 33] = "NodeBeginNativeRequire"; LoaderEventType[LoaderEventType["NodeEndNativeRequire"] = 34] = "NodeEndNativeRequire"; })(LoaderEventType = AMDLoader.LoaderEventType || (AMDLoader.LoaderEventType = {})); - function getHighPerformanceTimestamp() { - return (AMDLoader.hasPerformanceNow ? AMDLoader.global.performance.now() : Date.now()); - } - AMDLoader.getHighPerformanceTimestamp = getHighPerformanceTimestamp; var LoaderEvent = (function () { function LoaderEvent(type, detail, timestamp) { this.type = type; @@ -71,7 +85,7 @@ var AMDLoader; this._events = [new LoaderEvent(LoaderEventType.LoaderAvailable, '', loaderAvailableTimestamp)]; } LoaderEventRecorder.prototype.record = function (type, detail) { - this._events.push(new LoaderEvent(type, detail, getHighPerformanceTimestamp())); + this._events.push(new LoaderEvent(type, detail, AMDLoader.Utilities.getHighPerformanceTimestamp())); }; LoaderEventRecorder.prototype.getEvents = function () { return this._events; @@ -105,9 +119,9 @@ var AMDLoader; /** * This method does not take care of / vs \ */ - Utilities.fileUriToFilePath = function (uri) { + Utilities.fileUriToFilePath = function (isWindows, uri) { uri = decodeURI(uri); - if (AMDLoader.isWindows) { + if (isWindows) { if (/^file:\/\/\//.test(uri)) { // This is a URI without a hostname => return only the path segment return uri.substr(8); @@ -178,9 +192,18 @@ var AMDLoader; Utilities.isAnonymousModule = function (id) { return /^===anonymous/.test(id); }; + Utilities.getHighPerformanceTimestamp = function () { + if (!this.PERFORMANCE_NOW_PROBED) { + this.PERFORMANCE_NOW_PROBED = true; + this.HAS_PERFORMANCE_NOW = (AMDLoader.global.performance && typeof AMDLoader.global.performance.now === 'function'); + } + return (this.HAS_PERFORMANCE_NOW ? AMDLoader.global.performance.now() : Date.now()); + }; return Utilities; }()); Utilities.NEXT_ANONYMOUS_ID = 1; + Utilities.PERFORMANCE_NOW_PROBED = false; + Utilities.HAS_PERFORMANCE_NOW = false; AMDLoader.Utilities = Utilities; })(AMDLoader || (AMDLoader = {})); /*--------------------------------------------------------------------------------------------- @@ -195,7 +218,7 @@ var AMDLoader; /** * Ensure configuration options make sense */ - ConfigurationOptionsUtil.validateConfigurationOptions = function (options) { + ConfigurationOptionsUtil.validateConfigurationOptions = function (isWebWorker, options) { function defaultOnError(err) { if (err.errorCode === 'load') { console.error('Loading "' + err.moduleId + '" failed'); @@ -231,7 +254,7 @@ var AMDLoader; } if (typeof options.catchError === 'undefined') { // Catch errors by default in web workers, do not catch errors by default in other contexts - options.catchError = AMDLoader.isWebWorker; + options.catchError = isWebWorker; } if (typeof options.urlArgs !== 'string') { options.urlArgs = ''; @@ -253,20 +276,26 @@ var AMDLoader; if (typeof options.nodeCachedDataWriteDelay !== 'number' || options.nodeCachedDataWriteDelay < 0) { options.nodeCachedDataWriteDelay = 1000 * 7; } - if (typeof options.onNodeCachedDataError !== 'function') { - options.onNodeCachedDataError = function (err) { - if (err.errorCode === 'cachedDataRejected') { + if (typeof options.onNodeCachedData !== 'function') { + options.onNodeCachedData = function (err, data) { + if (!err) { + // ignore + } + else if (err.errorCode === 'cachedDataRejected') { console.warn('Rejected cached data from file: ' + err.path); } else if (err.errorCode === 'unlink' || err.errorCode === 'writeFile') { console.error('Problems writing cached data file: ' + err.path); console.error(err.detail); } + else { + console.error(err); + } }; } return options; }; - ConfigurationOptionsUtil.mergeConfigurationOptions = function (overwrite, base) { + ConfigurationOptionsUtil.mergeConfigurationOptions = function (isWebWorker, overwrite, base) { if (overwrite === void 0) { overwrite = null; } if (base === void 0) { base = null; } var result = AMDLoader.Utilities.recursiveClone(base || {}); @@ -285,24 +314,25 @@ var AMDLoader; result[key] = AMDLoader.Utilities.recursiveClone(value); } }); - return ConfigurationOptionsUtil.validateConfigurationOptions(result); + return ConfigurationOptionsUtil.validateConfigurationOptions(isWebWorker, result); }; return ConfigurationOptionsUtil; }()); AMDLoader.ConfigurationOptionsUtil = ConfigurationOptionsUtil; var Configuration = (function () { - function Configuration(options) { - this.options = ConfigurationOptionsUtil.mergeConfigurationOptions(options); + function Configuration(env, options) { + this._env = env; + this.options = ConfigurationOptionsUtil.mergeConfigurationOptions(this._env.isWebWorker, options); this._createIgnoreDuplicateModulesMap(); this._createNodeModulesMap(); this._createSortedPathsRules(); if (this.options.baseUrl === '') { - if (AMDLoader.isNode && this.options.nodeRequire && this.options.nodeRequire.main && this.options.nodeRequire.main.filename) { + if (this._env.isNode && this.options.nodeRequire && this.options.nodeRequire.main && this.options.nodeRequire.main.filename) { var nodeMain = this.options.nodeRequire.main.filename; var dirnameIndex = Math.max(nodeMain.lastIndexOf('/'), nodeMain.lastIndexOf('\\')); this.options.baseUrl = nodeMain.substring(0, dirnameIndex + 1); } - if (AMDLoader.isNode && this.options.nodeMain) { + if (this._env.isNode && this.options.nodeMain) { var nodeMain = this.options.nodeMain; var dirnameIndex = Math.max(nodeMain.lastIndexOf('/'), nodeMain.lastIndexOf('\\')); this.options.baseUrl = nodeMain.substring(0, dirnameIndex + 1); @@ -353,7 +383,7 @@ var AMDLoader; * @result A new configuration */ Configuration.prototype.cloneAndMerge = function (options) { - return new Configuration(ConfigurationOptionsUtil.mergeConfigurationOptions(options, this.options)); + return new Configuration(this._env, ConfigurationOptionsUtil.mergeConfigurationOptions(this._env.isWebWorker, options, this.options)); }; /** * Get current options bag. Useful for passing it forward to plugins. @@ -582,18 +612,81 @@ var AMDLoader; return WorkerScriptLoader; }()); var NodeScriptLoader = (function () { - function NodeScriptLoader() { - this._initialized = false; + function NodeScriptLoader(env) { + this._env = env; + this._didInitialize = false; + this._didPatchNodeRequire = false; } NodeScriptLoader.prototype._init = function (nodeRequire) { - if (this._initialized) { + if (this._didInitialize) { return; } - this._initialized = true; + this._didInitialize = true; + // capture node modules this._fs = nodeRequire('fs'); this._vm = nodeRequire('vm'); this._path = nodeRequire('path'); this._crypto = nodeRequire('crypto'); + // js-flags have an impact on cached data + this._jsflags = ''; + for (var _i = 0, _a = process.argv; _i < _a.length; _i++) { + var arg = _a[_i]; + if (arg.indexOf('--js-flags=') === 0) { + this._jsflags = arg; + break; + } + } + }; + // patch require-function of nodejs such that we can manually create a script + // from cached data. this is done by overriding the `Module._compile` function + NodeScriptLoader.prototype._initNodeRequire = function (nodeRequire, moduleManager) { + var nodeCachedDataDir = moduleManager.getConfig().getOptionsLiteral().nodeCachedDataDir; + if (!nodeCachedDataDir || this._didPatchNodeRequire) { + return; + } + this._didPatchNodeRequire = true; + var that = this; + var Module = nodeRequire('module'); + function makeRequireFunction(mod) { + var Module = mod.constructor; + var require = function require(path) { + try { + return mod.require(path); + } + finally { + // nothing + } + }; + require.resolve = function resolve(request) { + return Module._resolveFilename(request, mod); + }; + require.main = process.mainModule; + require.extensions = Module._extensions; + require.cache = Module._cache; + return require; + } + Module.prototype._compile = function (content, filename) { + // remove shebang + content = content.replace(/^#!.*/, ''); + // create wrapper function + var wrapper = Module.wrap(content); + var cachedDataPath = that._getCachedDataPath(nodeCachedDataDir, filename); + var options = { filename: filename }; + try { + options.cachedData = that._fs.readFileSync(cachedDataPath); + } + catch (e) { + options.produceCachedData = true; + } + var script = new that._vm.Script(wrapper, options); + var compileWrapper = script.runInThisContext(options); + var dirname = that._path.dirname(filename); + var require = makeRequireFunction(this); + var args = [this.exports, require, this, filename, dirname, process, AMDLoader.global, Buffer]; + var result = compileWrapper.apply(this.exports, args); + that._processCachedData(moduleManager, script, cachedDataPath); + return result; + }; }; NodeScriptLoader.prototype.load = function (moduleManager, scriptSrc, callback, errorback) { var _this = this; @@ -601,6 +694,7 @@ var AMDLoader; var nodeRequire = (opts.nodeRequire || AMDLoader.global.nodeRequire); var nodeInstrumenter = (opts.nodeInstrumenter || function (c) { return c; }); this._init(nodeRequire); + this._initNodeRequire(nodeRequire, moduleManager); var recorder = moduleManager.getRecorder(); if (/^node\|/.test(scriptSrc)) { var pieces = scriptSrc.split('|'); @@ -616,7 +710,7 @@ var AMDLoader; callback(); } else { - scriptSrc = AMDLoader.Utilities.fileUriToFilePath(scriptSrc); + scriptSrc = AMDLoader.Utilities.fileUriToFilePath(this._env.isWindows, scriptSrc); this._fs.readFile(scriptSrc, { encoding: 'utf8' }, function (err, data) { if (err) { errorback(err); @@ -625,12 +719,16 @@ var AMDLoader; var normalizedScriptSrc = _this._path.normalize(scriptSrc); var vmScriptSrc = normalizedScriptSrc; // Make the script src friendly towards electron - if (AMDLoader.isElectronRenderer) { + if (_this._env.isElectronRenderer) { var driveLetterMatch = vmScriptSrc.match(/^([a-z])\:(.*)/i); if (driveLetterMatch) { - vmScriptSrc = driveLetterMatch[1].toUpperCase() + ':' + driveLetterMatch[2]; + // windows + vmScriptSrc = "file:///" + (driveLetterMatch[1].toUpperCase() + ':' + driveLetterMatch[2]).replace(/\\/g, '/'); + } + else { + // nix + vmScriptSrc = "file://" + vmScriptSrc; } - vmScriptSrc = 'file:///' + vmScriptSrc.replace(/\\/g, '/'); } var contents, prefix = '(function (require, define, __filename, __dirname) { ', suffix = '\n});'; if (data.charCodeAt(0) === NodeScriptLoader._BOM) { @@ -641,68 +739,76 @@ var AMDLoader; } contents = nodeInstrumenter(contents, normalizedScriptSrc); if (!opts.nodeCachedDataDir) { - _this._loadAndEvalScript(scriptSrc, vmScriptSrc, contents, { filename: vmScriptSrc }, recorder); + _this._loadAndEvalScript(moduleManager, scriptSrc, vmScriptSrc, contents, { filename: vmScriptSrc }, recorder); callback(); } else { var cachedDataPath_1 = _this._getCachedDataPath(opts.nodeCachedDataDir, scriptSrc); - _this._fs.readFile(cachedDataPath_1, function (err, data) { + _this._fs.readFile(cachedDataPath_1, function (err, cachedData) { // create script options - var scriptOptions = { + var options = { filename: vmScriptSrc, - produceCachedData: typeof data === 'undefined', - cachedData: data + produceCachedData: typeof cachedData === 'undefined', + cachedData: cachedData }; - var script = _this._loadAndEvalScript(scriptSrc, vmScriptSrc, contents, scriptOptions, recorder); + var script = _this._loadAndEvalScript(moduleManager, scriptSrc, vmScriptSrc, contents, options, recorder); callback(); - // cached code after math - if (script.cachedDataRejected) { - // data rejected => delete cache file - opts.onNodeCachedDataError({ - errorCode: 'cachedDataRejected', - path: cachedDataPath_1 - }); - NodeScriptLoader._runSoon(function () { return _this._fs.unlink(cachedDataPath_1, function (err) { - if (err) { - moduleManager.getConfig().getOptionsLiteral().onNodeCachedDataError({ - errorCode: 'unlink', - path: cachedDataPath_1, - detail: err - }); - } - }); }, opts.nodeCachedDataWriteDelay); - } - else if (script.cachedDataProduced) { - // data produced => write cache file - NodeScriptLoader._runSoon(function () { return _this._fs.writeFile(cachedDataPath_1, script.cachedData, function (err) { - if (err) { - moduleManager.getConfig().getOptionsLiteral().onNodeCachedDataError({ - errorCode: 'writeFile', - path: cachedDataPath_1, - detail: err - }); - } - }); }, opts.nodeCachedDataWriteDelay); - } + _this._processCachedData(moduleManager, script, cachedDataPath_1); }); } }); } }; - NodeScriptLoader.prototype._loadAndEvalScript = function (scriptSrc, vmScriptSrc, contents, options, recorder) { + NodeScriptLoader.prototype._loadAndEvalScript = function (moduleManager, scriptSrc, vmScriptSrc, contents, options, recorder) { // create script, run script recorder.record(AMDLoader.LoaderEventType.NodeBeginEvaluatingScript, scriptSrc); var script = new this._vm.Script(contents, options); var r = script.runInThisContext(options); - r.call(AMDLoader.global, AMDLoader.RequireFunc, AMDLoader.DefineFunc, vmScriptSrc, this._path.dirname(scriptSrc)); + r.call(AMDLoader.global, moduleManager.getGlobalAMDRequireFunc(), moduleManager.getGlobalAMDDefineFunc(), vmScriptSrc, this._path.dirname(scriptSrc)); // signal done recorder.record(AMDLoader.LoaderEventType.NodeEndEvaluatingScript, scriptSrc); return script; }; - NodeScriptLoader.prototype._getCachedDataPath = function (baseDir, filename) { - var hash = this._crypto.createHash('md5').update(filename, 'utf8').digest('hex'); + NodeScriptLoader.prototype._getCachedDataPath = function (basedir, filename) { + var hash = this._crypto.createHash('md5').update(filename, 'utf8').update(this._jsflags, 'utf8').digest('hex'); var basename = this._path.basename(filename).replace(/\.js$/, ''); - return this._path.join(baseDir, hash + "-" + basename + ".code"); + return this._path.join(basedir, basename + "-" + hash + ".code"); + }; + NodeScriptLoader.prototype._processCachedData = function (moduleManager, script, cachedDataPath) { + var _this = this; + if (script.cachedDataRejected) { + // data rejected => delete cache file + moduleManager.getConfig().getOptionsLiteral().onNodeCachedData({ + errorCode: 'cachedDataRejected', + path: cachedDataPath + }); + NodeScriptLoader._runSoon(function () { return _this._fs.unlink(cachedDataPath, function (err) { + if (err) { + moduleManager.getConfig().getOptionsLiteral().onNodeCachedData({ + errorCode: 'unlink', + path: cachedDataPath, + detail: err + }); + } + }); }, moduleManager.getConfig().getOptionsLiteral().nodeCachedDataWriteDelay); + } + else if (script.cachedDataProduced) { + // data produced => tell outside world + moduleManager.getConfig().getOptionsLiteral().onNodeCachedData(undefined, { + path: cachedDataPath, + length: script.cachedData.length + }); + // data produced => write cache file + NodeScriptLoader._runSoon(function () { return _this._fs.writeFile(cachedDataPath, script.cachedData, function (err) { + if (err) { + moduleManager.getConfig().getOptionsLiteral().onNodeCachedData({ + errorCode: 'writeFile', + path: cachedDataPath, + detail: err + }); + } + }); }, moduleManager.getConfig().getOptionsLiteral().nodeCachedDataWriteDelay); + } }; NodeScriptLoader._runSoon = function (callback, minTimeout) { var timeout = minTimeout + Math.ceil(Math.random() * minTimeout); @@ -711,11 +817,14 @@ var AMDLoader; return NodeScriptLoader; }()); NodeScriptLoader._BOM = 0xFEFF; - AMDLoader.scriptLoader = new OnlyOnceScriptLoader(AMDLoader.isWebWorker ? - new WorkerScriptLoader() - : AMDLoader.isNode ? - new NodeScriptLoader() - : new BrowserScriptLoader()); + function createScriptLoader(env) { + return new OnlyOnceScriptLoader(env.isWebWorker ? + new WorkerScriptLoader() + : env.isNode ? + new NodeScriptLoader(env) + : new BrowserScriptLoader()); + } + AMDLoader.createScriptLoader = createScriptLoader; })(AMDLoader || (AMDLoader = {})); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. @@ -911,22 +1020,34 @@ var AMDLoader; }()); AMDLoader.PluginDependency = PluginDependency; var ModuleManager = (function () { - function ModuleManager(scriptLoader, loaderAvailableTimestamp) { + function ModuleManager(env, scriptLoader, defineFunc, requireFunc, loaderAvailableTimestamp) { if (loaderAvailableTimestamp === void 0) { loaderAvailableTimestamp = 0; } - this._recorder = null; + this._env = env; + this._scriptLoader = scriptLoader; this._loaderAvailableTimestamp = loaderAvailableTimestamp; + this._defineFunc = defineFunc; + this._requireFunc = requireFunc; this._moduleIdProvider = new ModuleIdProvider(); - this._config = new AMDLoader.Configuration(); - this._scriptLoader = scriptLoader; + this._config = new AMDLoader.Configuration(this._env); this._modules2 = []; this._knownModules2 = []; this._inverseDependencies2 = []; this._inversePluginDependencies2 = new Map(); this._currentAnnonymousDefineCall = null; + this._recorder = null; this._buildInfoPath = []; this._buildInfoDefineStack = []; this._buildInfoDependencies = []; } + ModuleManager.prototype.reset = function () { + return new ModuleManager(this._env, this._scriptLoader, this._defineFunc, this._requireFunc, this._loaderAvailableTimestamp); + }; + ModuleManager.prototype.getGlobalAMDDefineFunc = function () { + return this._defineFunc; + }; + ModuleManager.prototype.getGlobalAMDRequireFunc = function () { + return this._requireFunc; + }; ModuleManager._findRelevantLocationInStack = function (needle, stack) { var normalize = function (str) { return str.replace(/\\/g, '/'); }; var normalizedPath = normalize(needle); @@ -1092,7 +1213,7 @@ var AMDLoader; ModuleManager.prototype.configure = function (params, shouldOverwrite) { var oldShouldRecordStats = this._config.shouldRecordStats(); if (shouldOverwrite) { - this._config = new AMDLoader.Configuration(params); + this._config = new AMDLoader.Configuration(this._env, params); } else { this._config = this._config.cloneAndMerge(params); @@ -1257,7 +1378,7 @@ var AMDLoader; this._knownModules2[moduleId] = true; var strModuleId = this._moduleIdProvider.getStrModuleId(moduleId); var paths = this._config.moduleIdToPaths(strModuleId); - if (AMDLoader.isNode && strModuleId.indexOf('/') === -1) { + if (this._env.isNode && strModuleId.indexOf('/') === -1) { paths.push('node|' + strModuleId); } var lastPathIndex = -1; @@ -1440,19 +1561,14 @@ var AMDLoader; }()); AMDLoader.ModuleManager = ModuleManager; })(AMDLoader || (AMDLoader = {})); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; -// Limitation: To load jquery through the loader, always require 'jquery' and add a path for it in the loader configuration var define; var AMDLoader; (function (AMDLoader) { - var moduleManager; - var loaderAvailableTimestamp; - var DefineFunc = (function () { - function DefineFunc(id, dependencies, callback) { + var moduleManager = null; + var DefineFunc = null; + var RequireFunc = null; + function createGlobalAMDFuncs() { + var _defineFunc = function (id, dependencies, callback) { if (typeof id !== 'string') { callback = dependencies; dependencies = id; @@ -1471,18 +1587,19 @@ var AMDLoader; else { moduleManager.enqueueDefineAnonymousModule(dependencies, callback); } - } - return DefineFunc; - }()); - DefineFunc.amd = { - jQuery: true - }; - AMDLoader.DefineFunc = DefineFunc; - var RequireFunc = (function () { - function RequireFunc() { + }; + DefineFunc = _defineFunc; + DefineFunc.amd = { + jQuery: true + }; + var _requireFunc_config = function (params, shouldOverwrite) { + if (shouldOverwrite === void 0) { shouldOverwrite = false; } + moduleManager.configure(params, shouldOverwrite); + }; + var _requireFunc = function () { if (arguments.length === 1) { if ((arguments[0] instanceof Object) && !Array.isArray(arguments[0])) { - RequireFunc.config(arguments[0]); + _requireFunc_config(arguments[0]); return; } if (typeof arguments[0] === 'string') { @@ -1496,38 +1613,28 @@ var AMDLoader; } } throw new Error('Unrecognized require call'); - } - RequireFunc.config = function (params, shouldOverwrite) { - if (shouldOverwrite === void 0) { shouldOverwrite = false; } - moduleManager.configure(params, shouldOverwrite); }; + RequireFunc = _requireFunc; + RequireFunc.config = _requireFunc_config; RequireFunc.getConfig = function () { return moduleManager.getConfig().getOptionsLiteral(); }; - /** - * Non standard extension to reset completely the loader state. This is used for running amdjs tests - */ RequireFunc.reset = function () { - moduleManager = new AMDLoader.ModuleManager(AMDLoader.scriptLoader, loaderAvailableTimestamp); + moduleManager = moduleManager.reset(); }; - /** - * Non standard extension to fetch loader state for building purposes. - */ RequireFunc.getBuildInfo = function () { return moduleManager.getBuildInfo(); }; - /** - * Non standard extension to fetch loader events - */ RequireFunc.getStats = function () { return moduleManager.getLoaderEvents(); }; - return RequireFunc; - }()); - AMDLoader.RequireFunc = RequireFunc; + } function init() { - moduleManager = new AMDLoader.ModuleManager(AMDLoader.scriptLoader, loaderAvailableTimestamp); - if (AMDLoader.isNode) { + createGlobalAMDFuncs(); + var env = AMDLoader.Environment.detect(); + var scriptLoader = AMDLoader.createScriptLoader(env); + moduleManager = new AMDLoader.ModuleManager(env, scriptLoader, DefineFunc, RequireFunc, AMDLoader.Utilities.getHighPerformanceTimestamp()); + if (env.isNode) { var _nodeRequire = (AMDLoader.global.require || require); var nodeRequire = function (what) { moduleManager.getRecorder().record(AMDLoader.LoaderEventType.NodeBeginNativeRequire, what); @@ -1541,7 +1648,7 @@ var AMDLoader; AMDLoader.global.nodeRequire = nodeRequire; RequireFunc.nodeRequire = nodeRequire; } - if (AMDLoader.isNode && !AMDLoader.isElectronRenderer) { + if (env.isNode && !env.isElectronRenderer) { module.exports = RequireFunc; // These two defs are fore the local closure defined in node in the case that the loader is concatenated define = function () { @@ -1554,7 +1661,7 @@ var AMDLoader; if (typeof AMDLoader.global.require !== 'undefined' && typeof AMDLoader.global.require !== 'function') { RequireFunc.config(AMDLoader.global.require); } - if (!AMDLoader.isElectronRenderer) { + if (!env.isElectronRenderer) { AMDLoader.global.define = define = DefineFunc; } else { @@ -1566,8 +1673,9 @@ var AMDLoader; AMDLoader.global.require.__$__nodeRequire = nodeRequire; } } - if (typeof AMDLoader.global.define !== 'function' || !AMDLoader.global.define.amd) { + AMDLoader.init = init; + if (typeof doNotInitLoader === 'undefined' && + (typeof AMDLoader.global.define !== 'function' || !AMDLoader.global.define.amd)) { init(); - loaderAvailableTimestamp = AMDLoader.getHighPerformanceTimestamp(); } })(AMDLoader || (AMDLoader = {})); diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 827a6976e542e..8e0f447643850 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -95,7 +95,7 @@ declare module monaco { public static wrap(value: Thenable): Promise; public static wrap(value: ValueType): Promise; - public static wrapError(error: any): Promise; + public static wrapError(error: Error): Promise; } export class CancellationTokenSource { @@ -357,11 +357,13 @@ declare module monaco { * Cover all key codes when IME is processing input. */ KEY_IN_COMPOSITION = 109, + ABNT_C1 = 110, + ABNT_C2 = 111, /** * Placed last to cover the length of the enum. * Please do not depend on this value! */ - MAX_VALUE = 110, + MAX_VALUE = 112, } export class KeyMod { @@ -624,6 +626,7 @@ declare module monaco { * Create a new empty range using this range's start position. */ static collapseToStart(range: IRange): Range; + static fromPositions(start: IPosition, end?: IPosition): Range; /** * Create a `Range` from an `IRange`. */ @@ -721,10 +724,18 @@ declare module monaco { * Create a new selection with a different `positionLineNumber` and `positionColumn`. */ setEndPosition(endLineNumber: number, endColumn: number): Selection; + /** + * Get the position at `positionLineNumber` and `positionColumn`. + */ + getPosition(): Position; /** * Create a new selection with a different `selectionStartLineNumber` and `selectionStartColumn`. */ setStartPosition(startLineNumber: number, startColumn: number): Selection; + /** + * Create a `Selection` from one or two positions + */ + static fromPositions(start: IPosition, end?: IPosition): Selection; /** * Create a `Selection` from an `ISelection`. */ @@ -885,6 +896,11 @@ declare module monaco.editor { */ export function defineTheme(themeName: string, themeData: IStandaloneThemeData): void; + /** + * Switches to a theme. + */ + export function setTheme(themeName: string): void; + export type BuiltinTheme = 'vs' | 'vs-dark' | 'hc-black'; export interface IStandaloneThemeData { @@ -958,12 +974,26 @@ declare module monaco.editor { * To not create automatically a model, use `model: null`. */ language?: string; + /** + * Initial theme to be used for rendering. + * The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'. + * You can create custom themes via `monaco.editor.defineTheme`. + * To switch a theme, use `monaco.editor.setTheme` + */ + theme?: string; } /** * The options to create a diff editor. */ export interface IDiffEditorConstructionOptions extends IDiffEditorOptions { + /** + * Initial theme to be used for rendering. + * The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'. + * You can create custom themes via `monaco.editor.defineTheme`. + * To switch a theme, use `monaco.editor.setTheme` + */ + theme?: string; } export interface IStandaloneCodeEditor extends ICodeEditor { @@ -1022,6 +1052,10 @@ declare module monaco.editor { Visible = 3, } + export interface ThemeColor { + id: string; + } + /** * Vertical Lane in the overview ruler of the editor. */ @@ -1038,19 +1072,19 @@ declare module monaco.editor { export interface IModelDecorationOverviewRulerOptions { /** * CSS color to render in the overview ruler. - * e.g.: rgba(100, 100, 100, 0.5) + * e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry */ - color: string; + color: string | ThemeColor; /** * CSS color to render in the overview ruler. - * e.g.: rgba(100, 100, 100, 0.5) + * e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry */ - darkColor: string; + darkColor: string | ThemeColor; /** * CSS color to render in the overview ruler. - * e.g.: rgba(100, 100, 100, 0.5) + * e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry */ - hcColor?: string; + hcColor?: string | ThemeColor; /** * The position in the overview ruler. */ @@ -1062,7 +1096,7 @@ declare module monaco.editor { */ export interface IModelDecorationOptions { /** - * Customize the growing behaviour of the decoration when typing at the edges of the decoration. + * Customize the growing behavior of the decoration when typing at the edges of the decoration. * Defaults to TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges */ stickiness?: TrackedRangeStickiness; @@ -1082,10 +1116,6 @@ declare module monaco.editor { * Should the decoration expand to encompass a whole line. */ isWholeLine?: boolean; - /** - * @deprecated : Use `overviewRuler` instead - */ - showInOverviewRuler?: string; /** * If set, render this decoration in the overview ruler. */ @@ -1246,6 +1276,13 @@ declare module monaco.editor { * @param text The text to replace with. May be null to represent a simple delete. */ addEditOperation(range: Range, text: string): void; + /** + * Add a new edit operation (a replace operation). + * The inverse edits will be accessible in `ICursorStateComputerData.getInverseEditOperations()` + * @param range The range to replace (delete). May be empty to represent a simple insert. + * @param text The text to replace with. May be null to represent a simple delete. + */ + addTrackedEditOperation(range: Range, text: string): void; /** * Track `selection` when applying edit operations. * A best effort will be made to not grow/expand the selection. @@ -1501,46 +1538,46 @@ declare module monaco.editor { * @param searchOnlyEditableRange Limit the searching to only search inside the editable range of the model. * @param isRegex Used to indicate that `searchString` is a regular expression. * @param matchCase Force the matching to match lower/upper case exactly. - * @param wholeWord Force the matching to match entire words only. + * @param wordSeparators Force the matching to match entire words only. Pass null otherwise. * @param captureMatches The result will contain the captured groups. * @param limitResultCount Limit the number of results * @return The ranges where the matches are. It is empty if not matches have been found. */ - findMatches(searchString: string, searchOnlyEditableRange: boolean, isRegex: boolean, matchCase: boolean, wholeWord: boolean, captureMatches: boolean, limitResultCount?: number): FindMatch[]; + findMatches(searchString: string, searchOnlyEditableRange: boolean, isRegex: boolean, matchCase: boolean, wordSeparators: string, captureMatches: boolean, limitResultCount?: number): FindMatch[]; /** * Search the model. * @param searchString The string used to search. If it is a regular expression, set `isRegex` to true. * @param searchScope Limit the searching to only search inside this range. * @param isRegex Used to indicate that `searchString` is a regular expression. * @param matchCase Force the matching to match lower/upper case exactly. - * @param wholeWord Force the matching to match entire words only. + * @param wordSeparators Force the matching to match entire words only. Pass null otherwise. * @param captureMatches The result will contain the captured groups. * @param limitResultCount Limit the number of results * @return The ranges where the matches are. It is empty if no matches have been found. */ - findMatches(searchString: string, searchScope: IRange, isRegex: boolean, matchCase: boolean, wholeWord: boolean, captureMatches: boolean, limitResultCount?: number): FindMatch[]; + findMatches(searchString: string, searchScope: IRange, isRegex: boolean, matchCase: boolean, wordSeparators: string, captureMatches: boolean, limitResultCount?: number): FindMatch[]; /** * Search the model for the next match. Loops to the beginning of the model if needed. * @param searchString The string used to search. If it is a regular expression, set `isRegex` to true. * @param searchStart Start the searching at the specified position. * @param isRegex Used to indicate that `searchString` is a regular expression. * @param matchCase Force the matching to match lower/upper case exactly. - * @param wholeWord Force the matching to match entire words only. + * @param wordSeparators Force the matching to match entire words only. Pass null otherwise. * @param captureMatches The result will contain the captured groups. * @return The range where the next match is. It is null if no next match has been found. */ - findNextMatch(searchString: string, searchStart: IPosition, isRegex: boolean, matchCase: boolean, wholeWord: boolean, captureMatches: boolean): FindMatch; + findNextMatch(searchString: string, searchStart: IPosition, isRegex: boolean, matchCase: boolean, wordSeparators: string, captureMatches: boolean): FindMatch; /** * Search the model for the previous match. Loops to the end of the model if needed. * @param searchString The string used to search. If it is a regular expression, set `isRegex` to true. * @param searchStart Start the searching at the specified position. * @param isRegex Used to indicate that `searchString` is a regular expression. * @param matchCase Force the matching to match lower/upper case exactly. - * @param wholeWord Force the matching to match entire words only. + * @param wordSeparators Force the matching to match entire words only. Pass null otherwise. * @param captureMatches The result will contain the captured groups. * @return The range where the previous match is. It is null if no previous match has been found. */ - findPreviousMatch(searchString: string, searchStart: IPosition, isRegex: boolean, matchCase: boolean, wholeWord: boolean, captureMatches: boolean): FindMatch; + findPreviousMatch(searchString: string, searchStart: IPosition, isRegex: boolean, matchCase: boolean, wordSeparators: string, captureMatches: boolean): FindMatch; } export class FindMatch { @@ -1605,7 +1642,8 @@ declare module monaco.editor { } /** - * Describes the behaviour of decorations when typing/editing near their edges. + * Describes the behavior of decorations when typing/editing near their edges. + * Note: Please do not edit the values, as they very carefully match `DecorationRangeBehavior` */ export enum TrackedRangeStickiness { AlwaysGrowsWhenTypingAtEdges = 0, @@ -2261,6 +2299,7 @@ declare module monaco.editor { getAction(id: string): IEditorAction; /** * Execute a command on the editor. + * The edits will land on the undo-redo stack, but no "undo stop" will be pushed. * @param source The source of the call. * @param command The command to execute */ @@ -2271,6 +2310,7 @@ declare module monaco.editor { pushUndoStop(): boolean; /** * Execute edits on the editor. + * The edits will land on the undo-redo stack, but no "undo stop" will be pushed. * @param source The source of the call. * @param edits The edits to execute. * @param endCursoState Cursor state after the edits were applied. @@ -2493,18 +2533,10 @@ declare module monaco.editor { * Primary cursor's position. */ readonly position: Position; - /** - * Primary cursor's view position - */ - readonly viewPosition: Position; /** * Secondary cursors' position. */ readonly secondaryPositions: Position[]; - /** - * Secondary cursors' view position. - */ - readonly secondaryViewPositions: Position[]; /** * Reason. */ @@ -2513,10 +2545,6 @@ declare module monaco.editor { * Source of the call that caused the event. */ readonly source: string; - /** - * Is the primary cursor in the editable range? - */ - readonly isInEditableRange: boolean; } /** @@ -2527,18 +2555,10 @@ declare module monaco.editor { * The primary selection. */ readonly selection: Selection; - /** - * The primary selection in view coordinates. - */ - readonly viewSelection: Selection; /** * The secondary selections. */ readonly secondarySelections: Selection[]; - /** - * The secondary selections in view coordinates. - */ - readonly secondaryViewSelections: Selection[]; /** * Source of the call that caused the event. */ @@ -2612,6 +2632,20 @@ declare module monaco.editor { horizontalSliderSize?: number; } + /** + * Configuration options for editor find widget + */ + export interface IEditorFindOptions { + /** + * Controls if we seed search string in the Find Widget with editor selection. + */ + seedSearchStringFromSelection?: boolean; + /** + * Controls if Find in Selection flag is turned on when multiple lines of text are selected in the editor. + */ + autoFindInSelection: boolean; + } + /** * Configuration options for editor minimap */ @@ -2621,6 +2655,11 @@ declare module monaco.editor { * Defaults to false. */ enabled?: boolean; + /** + * Control the rendering of the minimap slider. + * Defaults to 'mouseover'. + */ + showSlider?: 'always' | 'mouseover'; /** * Render the actual text on a line (as opposed to color blocks). * Defaults to true. @@ -2633,17 +2672,10 @@ declare module monaco.editor { maxColumn?: number; } - export type LineNumbersOption = 'on' | 'off' | 'relative' | ((lineNumber: number) => string); - /** * Configuration options for the editor. */ export interface IEditorOptions { - /** - * Enable experimental screen reader support. - * Defaults to `true`. - */ - experimentalScreenReader?: boolean; /** * The aria label for the editor's textarea (when it is focused). */ @@ -2670,7 +2702,7 @@ declare module monaco.editor { * Otherwise, line numbers will not be rendered. * Defaults to true. */ - lineNumbers?: LineNumbersOption; + lineNumbers?: 'on' | 'off' | 'relative' | ((lineNumber: number) => string); /** * Should the corresponding line be selected when clicking on the line number? * Defaults to true. @@ -2705,11 +2737,9 @@ declare module monaco.editor { */ roundedSelection?: boolean; /** - * Theme to be used for rendering. - * The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'. - * You can create custom themes via `monaco.editor.defineTheme`. + * Class name to be added to the editor. */ - theme?: string; + extraEditorClassName?: string; /** * Should the editor be read only. * Defaults to false. @@ -2723,6 +2753,10 @@ declare module monaco.editor { * Control the behavior and rendering of the minimap. */ minimap?: IEditorMinimapOptions; + /** + * Control the behavior of the find widget. + */ + find?: IEditorFindOptions; /** * Display overflow widgets as `fixed`. * Defaults to `false`. @@ -2759,10 +2793,11 @@ declare module monaco.editor { */ fontLigatures?: boolean; /** - * Disable the use of `translate3d`. + * Disable the use of `will-change` for the editor margin and lines layers. + * The usage of `will-change` acts as a hint for browsers to create an extra layer. * Defaults to false. */ - disableTranslate3d?: boolean; + disableLayerHinting?: boolean; /** * Disable the optimizations for monospace fonts. * Defaults to false. @@ -2838,6 +2873,11 @@ declare module monaco.editor { * Defaults to true. */ hover?: boolean; + /** + * Enable detecting links and making them clickable. + * Defaults to true. + */ + links?: boolean; /** * Enable custom contextmenu. * Defaults to true. @@ -2848,6 +2888,16 @@ declare module monaco.editor { * Defaults to 1. */ mouseWheelScrollSensitivity?: number; + /** + * The modifier to be used to add multiple cursors with the mouse. + * Defaults to 'alt' + */ + multiCursorModifier?: 'ctrlCmd' | 'alt'; + /** + * Configure the editor's accessibility support. + * Defaults to 'auto'. It is best to leave this to 'auto'. + */ + accessibilitySupport?: 'auto' | 'off' | 'on'; /** * Enable quick suggestions (shadow suggestions) * Defaults to true. @@ -2876,6 +2926,11 @@ declare module monaco.editor { * Defaults to true. */ autoClosingBrackets?: boolean; + /** + * Enable auto indentation adjustment. + * Defaults to false. + */ + autoIndent?: boolean; /** * Enable format on type. * Defaults to false. @@ -2898,9 +2953,9 @@ declare module monaco.editor { suggestOnTriggerCharacters?: boolean; /** * Accept suggestions on ENTER. - * Defaults to true. + * Defaults to 'on'. */ - acceptSuggestionOnEnter?: boolean; + acceptSuggestionOnEnter?: 'on' | 'smart' | 'off'; /** * Accept suggestions on provider defined characters. * Defaults to true. @@ -2948,6 +3003,11 @@ declare module monaco.editor { * Defaults to true in vscode and to false in monaco-editor. */ folding?: boolean; + /** + * Controls whether the fold actions in the gutter stay always visible or hide unless the mouse is over the gutter. + * Defaults to 'mouseover'. + */ + showFoldingControls?: 'always' | 'mouseover'; /** * Enable highlighting of matching brackets. * Defaults to true. @@ -2993,6 +3053,10 @@ declare module monaco.editor { * The line height */ lineHeight?: number; + /** + * The letter spacing + */ + letterSpacing?: number; } /** @@ -3112,8 +3176,7 @@ declare module monaco.editor { UnderlineThin = 6, } - export class InternalEditorScrollbarOptions { - readonly _internalEditorScrollbarOptionsBrand: void; + export interface InternalEditorScrollbarOptions { readonly arrowSize: number; readonly vertical: ScrollbarVisibility; readonly horizontal: ScrollbarVisibility; @@ -3128,15 +3191,19 @@ declare module monaco.editor { readonly mouseWheelScrollSensitivity: number; } - export class InternalEditorMinimapOptions { - readonly _internalEditorMinimapOptionsBrand: void; + export interface InternalEditorMinimapOptions { readonly enabled: boolean; + readonly showSlider: 'always' | 'mouseover'; readonly renderCharacters: boolean; readonly maxColumn: number; } - export class EditorWrappingInfo { - readonly _editorWrappingInfoBrand: void; + export interface InternalEditorFindOptions { + readonly seedSearchStringFromSelection: boolean; + readonly autoFindInSelection: boolean; + } + + export interface EditorWrappingInfo { readonly inDiffEditor: boolean; readonly isDominatedByLongLines: boolean; readonly isWordWrapMinified: boolean; @@ -3148,12 +3215,9 @@ declare module monaco.editor { readonly wordWrapBreakObtrusiveCharacters: string; } - export class InternalEditorViewOptions { - readonly _internalEditorViewOptionsBrand: void; - readonly theme: string; - readonly canUseTranslate3d: boolean; + export interface InternalEditorViewOptions { + readonly extraEditorClassName: string; readonly disableMonospaceOptimizations: boolean; - readonly experimentalScreenReader: boolean; readonly rulers: number[]; readonly ariaLabel: string; readonly renderLineNumbers: boolean; @@ -3170,7 +3234,6 @@ declare module monaco.editor { readonly cursorStyle: TextEditorCursorStyle; readonly hideCursorInOverviewRuler: boolean; readonly scrollBeyondLastLine: boolean; - readonly editorClassName: string; readonly stopRenderingLineAfter: number; readonly renderWhitespace: 'none' | 'boundary' | 'all'; readonly renderControlCharacters: boolean; @@ -3182,9 +3245,10 @@ declare module monaco.editor { readonly fixedOverflowWidgets: boolean; } - export class EditorContribOptions { + export interface EditorContribOptions { readonly selectionClipboard: boolean; readonly hover: boolean; + readonly links: boolean; readonly contextmenu: boolean; readonly quickSuggestions: boolean | { other: boolean; @@ -3197,10 +3261,9 @@ declare module monaco.editor { readonly formatOnType: boolean; readonly formatOnPaste: boolean; readonly suggestOnTriggerCharacters: boolean; - readonly acceptSuggestionOnEnter: boolean; + readonly acceptSuggestionOnEnter: 'on' | 'smart' | 'off'; readonly acceptSuggestionOnCommitCharacter: boolean; readonly snippetSuggestions: 'top' | 'bottom' | 'inline' | 'none'; - readonly emptySelectionClipboard: boolean; readonly wordBasedSuggestions: boolean; readonly suggestFontSize: number; readonly suggestLineHeight: number; @@ -3208,7 +3271,9 @@ declare module monaco.editor { readonly occurrencesHighlight: boolean; readonly codeLens: boolean; readonly folding: boolean; + readonly showFoldingControls: 'always' | 'mouseover'; readonly matchBrackets: boolean; + readonly find: InternalEditorFindOptions; } /** @@ -3216,13 +3281,19 @@ declare module monaco.editor { */ export class InternalEditorOptions { readonly _internalEditorOptionsBrand: void; + readonly canUseLayerHinting: boolean; + readonly pixelRatio: number; + readonly editorClassName: string; readonly lineHeight: number; readonly readOnly: boolean; + readonly multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; readonly wordSeparators: string; readonly autoClosingBrackets: boolean; + readonly autoIndent: boolean; readonly useTabStops: boolean; readonly tabFocusMode: boolean; readonly dragAndDrop: boolean; + readonly emptySelectionClipboard: boolean; readonly layoutInfo: EditorLayoutInfo; readonly fontInfo: FontInfo; readonly viewInfo: InternalEditorViewOptions; @@ -3233,8 +3304,7 @@ declare module monaco.editor { /** * A description for the overview ruler position. */ - export class OverviewRulerPosition { - readonly _overviewRulerPositionBrand: void; + export interface OverviewRulerPosition { /** * Width of the overview ruler */ @@ -3256,8 +3326,7 @@ declare module monaco.editor { /** * The internal layout details of the editor. */ - export class EditorLayoutInfo { - readonly _editorLayoutInfoBrand: void; + export interface EditorLayoutInfo { /** * Full editor width. */ @@ -3340,53 +3409,27 @@ declare module monaco.editor { readonly overviewRuler: OverviewRulerPosition; } - export interface IViewConfigurationChangedEvent { - readonly theme: boolean; - readonly canUseTranslate3d: boolean; - readonly disableMonospaceOptimizations: boolean; - readonly experimentalScreenReader: boolean; - readonly rulers: boolean; - readonly ariaLabel: boolean; - readonly renderLineNumbers: boolean; - readonly renderCustomLineNumbers: boolean; - readonly renderRelativeLineNumbers: boolean; - readonly selectOnLineNumbers: boolean; - readonly glyphMargin: boolean; - readonly revealHorizontalRightPadding: boolean; - readonly roundedSelection: boolean; - readonly overviewRulerLanes: boolean; - readonly overviewRulerBorder: boolean; - readonly cursorBlinking: boolean; - readonly mouseWheelZoom: boolean; - readonly cursorStyle: boolean; - readonly hideCursorInOverviewRuler: boolean; - readonly scrollBeyondLastLine: boolean; - readonly editorClassName: boolean; - readonly stopRenderingLineAfter: boolean; - readonly renderWhitespace: boolean; - readonly renderControlCharacters: boolean; - readonly fontLigatures: boolean; - readonly renderIndentGuides: boolean; - readonly renderLineHighlight: boolean; - readonly scrollbar: boolean; - readonly minimap: boolean; - readonly fixedOverflowWidgets: boolean; - } - /** * An event describing that the configuration of the editor has changed. */ export interface IConfigurationChangedEvent { + readonly canUseLayerHinting: boolean; + readonly pixelRatio: boolean; + readonly editorClassName: boolean; readonly lineHeight: boolean; readonly readOnly: boolean; + readonly accessibilitySupport: boolean; + readonly multiCursorModifier: boolean; readonly wordSeparators: boolean; readonly autoClosingBrackets: boolean; + readonly autoIndent: boolean; readonly useTabStops: boolean; readonly tabFocusMode: boolean; readonly dragAndDrop: boolean; + readonly emptySelectionClipboard: boolean; readonly layoutInfo: boolean; readonly fontInfo: boolean; - readonly viewInfo: IViewConfigurationChangedEvent; + readonly viewInfo: boolean; readonly wrappingInfo: boolean; readonly contribInfo: boolean; } @@ -3824,6 +3867,7 @@ declare module monaco.editor { readonly fontWeight: string; readonly fontSize: number; readonly lineHeight: number; + readonly letterSpacing: number; } } @@ -3924,7 +3968,7 @@ declare module monaco.languages { export function registerDocumentSymbolProvider(languageId: string, provider: DocumentSymbolProvider): IDisposable; /** - * Register a document highlight provider (used by e.g. highlight occurences). + * Register a document highlight provider (used by e.g. highlight occurrences). */ export function registerDocumentHighlightProvider(languageId: string, provider: DocumentHighlightProvider): IDisposable; diff --git a/src/vs/nls.build.js b/src/vs/nls.build.js new file mode 100644 index 0000000000000..ece108ed635fa --- /dev/null +++ b/src/vs/nls.build.js @@ -0,0 +1,182 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +/*--------------------------------------------------------------------------------------------- + *--------------------------------------------------------------------------------------------- + *--------------------------------------------------------------------------------------------- + *--------------------------------------------------------------------------------------------- + *--------------------------------------------------------------------------------------------- + * Please make sure to make edits in the .ts file at https://github.com/Microsoft/vscode-loader/ + *--------------------------------------------------------------------------------------------- + *--------------------------------------------------------------------------------------------- + *--------------------------------------------------------------------------------------------- + *--------------------------------------------------------------------------------------------- + *--------------------------------------------------------------------------------------------*/ +'use strict'; +var _nlsPluginGlobal = this; +var NLSBuildLoaderPlugin; +(function (NLSBuildLoaderPlugin) { + var global = _nlsPluginGlobal || {}; + var Resources = global.Plugin && global.Plugin.Resources ? global.Plugin.Resources : undefined; + var IS_PSEUDO = (global && global.document && global.document.location && global.document.location.hash.indexOf('pseudo=true') >= 0); + function _format(message, args) { + var result; + if (args.length === 0) { + result = message; + } + else { + result = message.replace(/\{(\d+)\}/g, function (match, rest) { + var index = rest[0]; + return typeof args[index] !== 'undefined' ? args[index] : match; + }); + } + if (IS_PSEUDO) { + // FF3B and FF3D is the Unicode zenkaku representation for [ and ] + result = '\uFF3B' + result.replace(/[aouei]/g, '$&$&') + '\uFF3D'; + } + return result; + } + function findLanguageForModule(config, name) { + var result = config[name]; + if (result) + return result; + result = config['*']; + if (result) + return result; + return null; + } + function localize(data, message) { + var args = []; + for (var _i = 0; _i < (arguments.length - 2); _i++) { + args[_i] = arguments[_i + 2]; + } + return _format(message, args); + } + function createScopedLocalize(scope) { + return function (idx, defaultValue) { + var restArgs = Array.prototype.slice.call(arguments, 2); + return _format(scope[idx], restArgs); + }; + } + var NLSPlugin = (function () { + function NLSPlugin() { + this.localize = localize; + } + NLSPlugin.prototype.setPseudoTranslation = function (value) { + IS_PSEUDO = value; + }; + NLSPlugin.prototype.create = function (key, data) { + return { + localize: createScopedLocalize(data[key]) + }; + }; + NLSPlugin.prototype.load = function (name, req, load, config) { + config = config || {}; + if (!name || name.length === 0) { + load({ + localize: localize + }); + } + else { + var suffix = void 0; + if (Resources && Resources.getString) { + suffix = '.nls.keys'; + req([name + suffix], function (keyMap) { + load({ + localize: function (moduleKey, index) { + if (!keyMap[moduleKey]) + return 'NLS error: unknown key ' + moduleKey; + var mk = keyMap[moduleKey].keys; + if (index >= mk.length) + return 'NLS error unknow index ' + index; + var subKey = mk[index]; + var args = []; + args[0] = moduleKey + '_' + subKey; + for (var _i = 0; _i < (arguments.length - 2); _i++) { + args[_i + 1] = arguments[_i + 2]; + } + return Resources.getString.apply(Resources, args); + } + }); + }); + } + else { + if (config.isBuild) { + req([name + '.nls', name + '.nls.keys'], function (messages, keys) { + NLSPlugin.BUILD_MAP[name] = messages; + NLSPlugin.BUILD_MAP_KEYS[name] = keys; + load(messages); + }); + } + else { + var pluginConfig = config['vs/nls'] || {}; + var language = pluginConfig.availableLanguages ? findLanguageForModule(pluginConfig.availableLanguages, name) : null; + suffix = '.nls'; + if (language !== null && language !== NLSPlugin.DEFAULT_TAG) { + suffix = suffix + '.' + language; + } + req([name + suffix], function (messages) { + if (Array.isArray(messages)) { + messages.localize = createScopedLocalize(messages); + } + else { + messages.localize = createScopedLocalize(messages[name]); + } + load(messages); + }); + } + } + } + }; + NLSPlugin.prototype._getEntryPointsMap = function () { + global.nlsPluginEntryPoints = global.nlsPluginEntryPoints || {}; + return global.nlsPluginEntryPoints; + }; + NLSPlugin.prototype.write = function (pluginName, moduleName, write) { + // getEntryPoint is a Monaco extension to r.js + var entryPoint = write.getEntryPoint(); + // r.js destroys the context of this plugin between calling 'write' and 'writeFile' + // so the only option at this point is to leak the data to a global + var entryPointsMap = this._getEntryPointsMap(); + entryPointsMap[entryPoint] = entryPointsMap[entryPoint] || []; + entryPointsMap[entryPoint].push(moduleName); + if (moduleName !== entryPoint) { + write.asModule(pluginName + '!' + moduleName, 'define([\'vs/nls\', \'vs/nls!' + entryPoint + '\'], function(nls, data) { return nls.create("' + moduleName + '", data); });'); + } + }; + NLSPlugin.prototype.writeFile = function (pluginName, moduleName, req, write, config) { + var entryPointsMap = this._getEntryPointsMap(); + if (entryPointsMap.hasOwnProperty(moduleName)) { + var fileName = req.toUrl(moduleName + '.nls.js'); + var contents = [ + '/*---------------------------------------------------------', + ' * Copyright (c) Microsoft Corporation. All rights reserved.', + ' *--------------------------------------------------------*/' + ], entries = entryPointsMap[moduleName]; + var data = {}; + for (var i = 0; i < entries.length; i++) { + data[entries[i]] = NLSPlugin.BUILD_MAP[entries[i]]; + } + contents.push('define("' + moduleName + '.nls", ' + JSON.stringify(data, null, '\t') + ');'); + write(fileName, contents.join('\r\n')); + } + }; + NLSPlugin.prototype.finishBuild = function (write) { + write('nls.metadata.json', JSON.stringify({ + keys: NLSPlugin.BUILD_MAP_KEYS, + messages: NLSPlugin.BUILD_MAP, + bundles: this._getEntryPointsMap() + }, null, '\t')); + }; + ; + return NLSPlugin; + }()); + NLSPlugin.DEFAULT_TAG = 'i-default'; + NLSPlugin.BUILD_MAP = {}; + NLSPlugin.BUILD_MAP_KEYS = {}; + NLSBuildLoaderPlugin.NLSPlugin = NLSPlugin; + (function () { + define('vs/nls', new NLSPlugin()); + })(); +})(NLSBuildLoaderPlugin || (NLSBuildLoaderPlugin = {})); diff --git a/src/vs/nls.js b/src/vs/nls.js index 17a672ffae9f8..231b85d0c8657 100644 --- a/src/vs/nls.js +++ b/src/vs/nls.js @@ -1,183 +1,126 @@ /*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ +* Copyright (c) Microsoft Corporation. All rights reserved. +* Licensed under the MIT License. See License.txt in the project root for license information. +*--------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------- - *--------------------------------------------------------------------------------------------- - *--------------------------------------------------------------------------------------------- - *--------------------------------------------------------------------------------------------- - *--------------------------------------------------------------------------------------------- - * Please make sure to make edits in the .ts file at https://github.com/Microsoft/vscode-loader/ - *--------------------------------------------------------------------------------------------- - *--------------------------------------------------------------------------------------------- - *--------------------------------------------------------------------------------------------- - *--------------------------------------------------------------------------------------------- - *--------------------------------------------------------------------------------------------*/ +*--------------------------------------------------------------------------------------------- +*--------------------------------------------------------------------------------------------- +*--------------------------------------------------------------------------------------------- +*--------------------------------------------------------------------------------------------- +* Please make sure to make edits in the .ts file at https://github.com/Microsoft/vscode-loader/ +*--------------------------------------------------------------------------------------------- +*--------------------------------------------------------------------------------------------- +*--------------------------------------------------------------------------------------------- +*--------------------------------------------------------------------------------------------- +*--------------------------------------------------------------------------------------------*/ 'use strict'; -var _nlsPluginGlobal = this; var NLSLoaderPlugin; (function (NLSLoaderPlugin) { - var global = _nlsPluginGlobal || {}; - var Resources = global.Plugin && global.Plugin.Resources ? global.Plugin.Resources : undefined; - var DEFAULT_TAG = 'i-default'; - var IS_PSEUDO = (global && global.document && global.document.location && global.document.location.hash.indexOf('pseudo=true') >= 0); - var slice = Array.prototype.slice; - function _format(message, args) { - var result; - if (args.length === 0) { - result = message; - } - else { - result = message.replace(/\{(\d+)\}/g, function (match, rest) { - var index = rest[0]; - return typeof args[index] !== 'undefined' ? args[index] : match; - }); - } - if (IS_PSEUDO) { - // FF3B and FF3D is the Unicode zenkaku representation for [ and ] - result = '\uFF3B' + result.replace(/[aouei]/g, '$&$&') + '\uFF3D'; - } - return result; - } - function findLanguageForModule(config, name) { - var result = config[name]; - if (result) - return result; - result = config['*']; - if (result) - return result; - return null; - } - function localize(data, message) { - var args = []; - for (var _i = 0; _i < (arguments.length - 2); _i++) { - args[_i] = arguments[_i + 2]; - } - return _format(message, args); - } - function createScopedLocalize(scope) { - return function (idx, defaultValue) { - var restArgs = slice.call(arguments, 2); - return _format(scope[idx], restArgs); - }; - } - var NLSPlugin = (function () { - function NLSPlugin() { - this.localize = localize; - } - NLSPlugin.prototype.setPseudoTranslation = function (value) { - IS_PSEUDO = value; - }; - NLSPlugin.prototype.create = function (key, data) { - return { - localize: createScopedLocalize(data[key]) - }; - }; - NLSPlugin.prototype.load = function (name, req, load, config) { - config = config || {}; - if (!name || name.length === 0) { - load({ - localize: localize - }); - } - else { - var suffix = void 0; - if (Resources && Resources.getString) { - suffix = '.nls.keys'; - req([name + suffix], function (keyMap) { - load({ - localize: function (moduleKey, index) { - if (!keyMap[moduleKey]) - return 'NLS error: unknown key ' + moduleKey; - var mk = keyMap[moduleKey].keys; - if (index >= mk.length) - return 'NLS error unknow index ' + index; - var subKey = mk[index]; - var args = []; - args[0] = moduleKey + '_' + subKey; - for (var _i = 0; _i < (arguments.length - 2); _i++) { - args[_i + 1] = arguments[_i + 2]; - } - return Resources.getString.apply(Resources, args); - } - }); - }); - } - else { - if (config.isBuild) { - req([name + '.nls', name + '.nls.keys'], function (messages, keys) { - NLSPlugin.BUILD_MAP[name] = messages; - NLSPlugin.BUILD_MAP_KEYS[name] = keys; - load(messages); - }); - } - else { - var pluginConfig = config['vs/nls'] || {}; - var language = pluginConfig.availableLanguages ? findLanguageForModule(pluginConfig.availableLanguages, name) : null; - suffix = '.nls'; - if (language !== null && language !== DEFAULT_TAG) { - suffix = suffix + '.' + language; - } - req([name + suffix], function (messages) { - if (Array.isArray(messages)) { - messages.localize = createScopedLocalize(messages); - } - else { - messages.localize = createScopedLocalize(messages[name]); - } - load(messages); - }); - } - } - } - }; - NLSPlugin.prototype._getEntryPointsMap = function () { - global.nlsPluginEntryPoints = global.nlsPluginEntryPoints || {}; - return global.nlsPluginEntryPoints; - }; - NLSPlugin.prototype.write = function (pluginName, moduleName, write) { - // getEntryPoint is a Monaco extension to r.js - var entryPoint = write.getEntryPoint(); - // r.js destroys the context of this plugin between calling 'write' and 'writeFile' - // so the only option at this point is to leak the data to a global - var entryPointsMap = this._getEntryPointsMap(); - entryPointsMap[entryPoint] = entryPointsMap[entryPoint] || []; - entryPointsMap[entryPoint].push(moduleName); - if (moduleName !== entryPoint) { - write.asModule(pluginName + '!' + moduleName, 'define([\'vs/nls\', \'vs/nls!' + entryPoint + '\'], function(nls, data) { return nls.create("' + moduleName + '", data); });'); - } - }; - NLSPlugin.prototype.writeFile = function (pluginName, moduleName, req, write, config) { - var entryPointsMap = this._getEntryPointsMap(); - if (entryPointsMap.hasOwnProperty(moduleName)) { - var fileName = req.toUrl(moduleName + '.nls.js'); - var contents = [ - '/*---------------------------------------------------------', - ' * Copyright (c) Microsoft Corporation. All rights reserved.', - ' *--------------------------------------------------------*/' - ], entries = entryPointsMap[moduleName]; - var data = {}; - for (var i = 0; i < entries.length; i++) { - data[entries[i]] = NLSPlugin.BUILD_MAP[entries[i]]; - } - contents.push('define("' + moduleName + '.nls", ' + JSON.stringify(data, null, '\t') + ');'); - write(fileName, contents.join('\r\n')); - } - }; - NLSPlugin.prototype.finishBuild = function (write) { - write('nls.metadata.json', JSON.stringify({ - keys: NLSPlugin.BUILD_MAP_KEYS, - messages: NLSPlugin.BUILD_MAP, - bundles: this._getEntryPointsMap() - }, null, '\t')); - }; - ; - return NLSPlugin; - }()); - NLSPlugin.BUILD_MAP = {}; - NLSPlugin.BUILD_MAP_KEYS = {}; - NLSLoaderPlugin.NLSPlugin = NLSPlugin; - (function () { - define('vs/nls', new NLSPlugin()); - })(); + var Environment = (function () { + function Environment(isPseudo) { + this.isPseudo = isPseudo; + // + } + Environment.detect = function () { + var isPseudo = (typeof document !== 'undefined' && document.location && document.location.hash.indexOf('pseudo=true') >= 0); + return new Environment(isPseudo); + }; + return Environment; + }()); + function _format(message, args, env) { + var result; + if (args.length === 0) { + result = message; + } + else { + result = message.replace(/\{(\d+)\}/g, function (match, rest) { + var index = rest[0]; + return typeof args[index] !== 'undefined' ? args[index] : match; + }); + } + if (env.isPseudo) { + // FF3B and FF3D is the Unicode zenkaku representation for [ and ] + result = '\uFF3B' + result.replace(/[aouei]/g, '$&$&') + '\uFF3D'; + } + return result; + } + function findLanguageForModule(config, name) { + var result = config[name]; + if (result) + return result; + result = config['*']; + if (result) + return result; + return null; + } + function localize(env, data, message) { + var args = []; + for (var _i = 3; _i < arguments.length; _i++) { + args[_i - 3] = arguments[_i]; + } + return _format(message, args, env); + } + function createScopedLocalize(scope, env) { + return function (idx, defaultValue) { + var restArgs = Array.prototype.slice.call(arguments, 2); + return _format(scope[idx], restArgs, env); + }; + } + var NLSPlugin = (function () { + function NLSPlugin(env) { + var _this = this; + this._env = env; + this.localize = function (data, message) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + return localize.apply(void 0, [_this._env, data, message].concat(args)); + }; + } + NLSPlugin.prototype.setPseudoTranslation = function (value) { + this._env = new Environment(value); + }; + NLSPlugin.prototype.create = function (key, data) { + return { + localize: createScopedLocalize(data[key], this._env) + }; + }; + NLSPlugin.prototype.load = function (name, req, load, config) { + var _this = this; + config = config || {}; + if (!name || name.length === 0) { + load({ + localize: this.localize + }); + } + else { + var pluginConfig = config['vs/nls'] || {}; + var language = pluginConfig.availableLanguages ? findLanguageForModule(pluginConfig.availableLanguages, name) : null; + var suffix = '.nls'; + if (language !== null && language !== NLSPlugin.DEFAULT_TAG) { + suffix = suffix + '.' + language; + } + req([name + suffix], function (messages) { + if (Array.isArray(messages)) { + messages.localize = createScopedLocalize(messages, _this._env); + } + else { + messages.localize = createScopedLocalize(messages[name], _this._env); + } + load(messages); + }); + } + }; + return NLSPlugin; + }()); + NLSPlugin.DEFAULT_TAG = 'i-default'; + NLSLoaderPlugin.NLSPlugin = NLSPlugin; + function init() { + define('vs/nls', new NLSPlugin(Environment.detect())); + } + NLSLoaderPlugin.init = init; + if (typeof doNotInitLoader === 'undefined') { + init(); + } })(NLSLoaderPlugin || (NLSLoaderPlugin = {})); diff --git a/src/vs/platform/actions/common/actions.ts b/src/vs/platform/actions/common/actions.ts index f94c856c72e5f..84b232e01304e 100644 --- a/src/vs/platform/actions/common/actions.ts +++ b/src/vs/platform/actions/common/actions.ts @@ -51,7 +51,7 @@ export class MenuId { static readonly SCMResourceContext = new MenuId('13'); static readonly CommandPalette = new MenuId('14'); static readonly ViewTitle = new MenuId('15'); - static readonly ViewResource = new MenuId('16'); + static readonly ViewItemContext = new MenuId('16'); constructor(private _id: string) { diff --git a/src/vs/platform/actions/electron-browser/menusExtensionPoint.ts b/src/vs/platform/actions/electron-browser/menusExtensionPoint.ts index 4896cdea038c0..401e489ee0f1a 100644 --- a/src/vs/platform/actions/electron-browser/menusExtensionPoint.ts +++ b/src/vs/platform/actions/electron-browser/menusExtensionPoint.ts @@ -39,7 +39,7 @@ namespace schema { case 'scm/resourceGroup/context': return MenuId.SCMResourceGroupContext; case 'scm/resourceState/context': return MenuId.SCMResourceContext; case 'view/title': return MenuId.ViewTitle; - case 'view/resource': return MenuId.ViewResource; + case 'view/item/context': return MenuId.ViewItemContext; } return void 0; @@ -143,6 +143,16 @@ namespace schema { description: localize('menus.resourceStateContext', "The Source Control resource state context menu"), type: 'array', items: menuItem + }, + 'view/title': { + description: localize('view.viewTitle', "The contributed view title menu"), + type: 'array', + items: menuItem + }, + 'view/item/context': { + description: localize('view.itemContext', "The contributed view item context menu"), + type: 'array', + items: menuItem } } }; @@ -224,22 +234,22 @@ namespace schema { }, icon: { description: localize('vscode.extension.contributes.commandType.icon', '(Optional) Icon which is used to represent the command in the UI. Either a file path or a themable configuration'), - anyOf: [ - 'string', - { - type: 'object', - properties: { - light: { - description: localize('vscode.extension.contributes.commandType.icon.light', 'Icon path when a light theme is used'), - type: 'string' - }, - dark: { - description: localize('vscode.extension.contributes.commandType.icon.dark', 'Icon path when a dark theme is used'), - type: 'string' - } + anyOf: [{ + type: 'string' + }, + { + type: 'object', + properties: { + light: { + description: localize('vscode.extension.contributes.commandType.icon.light', 'Icon path when a light theme is used'), + type: 'string' + }, + dark: { + description: localize('vscode.extension.contributes.commandType.icon.dark', 'Icon path when a dark theme is used'), + type: 'string' } } - ] + }] } } }; diff --git a/src/vs/platform/backup/common/backup.ts b/src/vs/platform/backup/common/backup.ts index 9a53670387fc9..dcc3eec908ce4 100644 --- a/src/vs/platform/backup/common/backup.ts +++ b/src/vs/platform/backup/common/backup.ts @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; -import { TPromise } from 'vs/base/common/winjs.base'; export interface IBackupWorkspacesFormat { folderWorkspaces: string[]; @@ -12,19 +11,12 @@ export interface IBackupWorkspacesFormat { } export const IBackupMainService = createDecorator('backupMainService'); -export const IBackupService = createDecorator('backupService'); -export interface IBackupMainService extends IBackupService { +export interface IBackupMainService { _serviceBrand: any; getWorkspaceBackupPaths(): string[]; getEmptyWorkspaceBackupPaths(): string[]; - registerWindowForBackupsSync(windowId: number, isEmptyWorkspace: boolean, backupFolder?: string, workspacePath?: string): void; -} - -export interface IBackupService { - _serviceBrand: any; - - getBackupPath(windowId: number): TPromise; + registerWindowForBackupsSync(windowId: number, isEmptyWorkspace: boolean, backupFolder?: string, workspacePath?: string): string; } \ No newline at end of file diff --git a/src/vs/platform/backup/common/backupIpc.ts b/src/vs/platform/backup/common/backupIpc.ts deleted file mode 100644 index 0fdfdb86824fc..0000000000000 --- a/src/vs/platform/backup/common/backupIpc.ts +++ /dev/null @@ -1,38 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import { TPromise } from 'vs/base/common/winjs.base'; -import { IChannel } from 'vs/base/parts/ipc/common/ipc'; -import { IBackupService } from './backup'; - -export interface IBackupChannel extends IChannel { - call(command: 'getBackupPath', arg: [number]): TPromise; - call(command: string, arg?: any): TPromise; -} - -export class BackupChannel implements IBackupChannel { - - constructor(private service: IBackupService) { } - - call(command: string, arg?: any): TPromise { - switch (command) { - case 'getBackupPath': return this.service.getBackupPath(arg); - } - return undefined; - } -} - -export class BackupChannelClient implements IBackupService { - - _serviceBrand: any; - - constructor(private channel: IBackupChannel) { } - - getBackupPath(windowId: number): TPromise { - return this.channel.call('getBackupPath', windowId); - } -} \ No newline at end of file diff --git a/src/vs/platform/backup/electron-main/backupMainService.ts b/src/vs/platform/backup/electron-main/backupMainService.ts index a5c984ca5ed8a..59f9d014a8c69 100644 --- a/src/vs/platform/backup/electron-main/backupMainService.ts +++ b/src/vs/platform/backup/electron-main/backupMainService.ts @@ -13,7 +13,6 @@ import { IBackupWorkspacesFormat, IBackupMainService } from 'vs/platform/backup/ import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IFilesConfiguration, HotExitConfiguration } from 'vs/platform/files/common/files'; -import { TPromise } from 'vs/base/common/winjs.base'; export class BackupMainService implements IBackupMainService { @@ -23,7 +22,6 @@ export class BackupMainService implements IBackupMainService { protected workspacesJsonPath: string; private backups: IBackupWorkspacesFormat; - private mapWindowToBackupFolder: { [windowId: number]: string; }; constructor( @IEnvironmentService environmentService: IEnvironmentService, @@ -31,7 +29,6 @@ export class BackupMainService implements IBackupMainService { ) { this.backupHome = environmentService.backupHome; this.workspacesJsonPath = environmentService.backupWorkspacesPath; - this.mapWindowToBackupFolder = Object.create(null); this.loadSync(); } @@ -50,22 +47,16 @@ export class BackupMainService implements IBackupMainService { return this.backups.emptyWorkspaces.slice(0); // return a copy } - public getBackupPath(windowId: number): TPromise { - if (!this.mapWindowToBackupFolder[windowId]) { - throw new Error(`Unknown backup workspace for window ${windowId}`); - } - - return TPromise.as(path.join(this.backupHome, this.mapWindowToBackupFolder[windowId])); - } + public registerWindowForBackupsSync(windowId: number, isEmptyWorkspace: boolean, backupFolder?: string, workspacePath?: string): string { - public registerWindowForBackupsSync(windowId: number, isEmptyWorkspace: boolean, backupFolder?: string, workspacePath?: string): void { // Generate a new folder if this is a new empty workspace if (isEmptyWorkspace && !backupFolder) { backupFolder = this.getRandomEmptyWorkspaceId(); } - this.mapWindowToBackupFolder[windowId] = isEmptyWorkspace ? backupFolder : this.getWorkspaceHash(workspacePath); this.pushBackupPathsSync(isEmptyWorkspace ? backupFolder : workspacePath, isEmptyWorkspace); + + return path.join(this.backupHome, isEmptyWorkspace ? backupFolder : this.getWorkspaceHash(workspacePath)); } private pushBackupPathsSync(workspaceIdentifier: string, isEmptyWorkspace: boolean): string { diff --git a/src/vs/platform/backup/test/electron-main/backupMainService.test.ts b/src/vs/platform/backup/test/electron-main/backupMainService.test.ts index 179a648ba0b0b..9519702d03e81 100644 --- a/src/vs/platform/backup/test/electron-main/backupMainService.test.ts +++ b/src/vs/platform/backup/test/electron-main/backupMainService.test.ts @@ -336,33 +336,6 @@ suite('BackupMainService', () => { }); }); - suite('getBackupPath', () => { - test('should return the window\'s correct path', done => { - service.registerWindowForBackupsSync(1, false, null, fooFile.fsPath); - service.registerWindowForBackupsSync(2, true, 'test'); - service.getBackupPath(1).then(window1Path => { - assert.equal(window1Path, service.toBackupPath(fooFile.fsPath)); - service.getBackupPath(2).then(window2Path => { - assert.equal(window2Path, path.join(backupHome, 'test')); - done(); - }); - }); - }); - - test('should override stale window paths with new paths', done => { - service.registerWindowForBackupsSync(1, false, null, fooFile.fsPath); - service.registerWindowForBackupsSync(1, false, null, barFile.fsPath); - service.getBackupPath(1).then(windowPath => { - assert.equal(windowPath, service.toBackupPath(barFile.fsPath)); - done(); - }); - }); - - test('should throw when the window is not registered', () => { - assert.throws(() => service.getBackupPath(1)); - }); - }); - suite('mixed path casing', () => { test('should handle case insensitive paths properly (registerWindowForBackupsSync)', done => { service.registerWindowForBackupsSync(1, false, null, fooFile.fsPath); diff --git a/src/vs/platform/commands/test/commandService.test.ts b/src/vs/platform/commands/test/commandService.test.ts index 24c7558a259a6..ea914ea49040a 100644 --- a/src/vs/platform/commands/test/commandService.test.ts +++ b/src/vs/platform/commands/test/commandService.test.ts @@ -69,12 +69,12 @@ suite('CommandService', function () { let service = new CommandService(new InstantiationService(), new class extends SimpleExtensionService { activateByEvent(activationEvent: string): TPromise { - return TPromise.wrapError('bad_activate'); + return TPromise.wrapError(new Error('bad_activate')); } }); return service.executeCommand('foo').then(() => assert.ok(false), err => { - assert.equal(err, 'bad_activate'); + assert.equal(err.message, 'bad_activate'); }); }); diff --git a/src/vs/platform/configuration/common/configuration.ts b/src/vs/platform/configuration/common/configuration.ts index 7292988c11b18..5685e78cd4172 100644 --- a/src/vs/platform/configuration/common/configuration.ts +++ b/src/vs/platform/configuration/common/configuration.ts @@ -4,31 +4,40 @@ *--------------------------------------------------------------------------------------------*/ import { TPromise } from 'vs/base/common/winjs.base'; +import * as arrays from 'vs/base/common/arrays'; +import * as types from 'vs/base/common/types'; +import * as objects from 'vs/base/common/objects'; +import URI from 'vs/base/common/uri'; +import { StrictResourceMap } from 'vs/base/common/map'; +import { Workspace } from 'vs/platform/workspace/common/workspace'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import Event from 'vs/base/common/event'; export const IConfigurationService = createDecorator('configurationService'); -export interface IConfigurationOptions { +export interface IConfigurationOverrides { overrideIdentifier?: string; - section?: string; + resource?: URI; } +export type IConfigurationValues = { [key: string]: IConfigurationValue }; + export interface IConfigurationService { _serviceBrand: any; + getConfigurationData(): IConfigurationData; + /** * Fetches the appropriate section of the configuration JSON file. * This will be an object keyed off the section name. */ - getConfiguration(section?: string): T; - getConfiguration(options?: IConfigurationOptions): T; + getConfiguration(section?: string, overrides?: IConfigurationOverrides): T; /** * Resolves a configuration key to its values in the different scopes * the setting is defined. */ - lookup(key: string, overrideIdentifier?: string): IConfigurationValue; + lookup(key: string, overrides?: IConfigurationOverrides): IConfigurationValue; /** * Returns the defined keys of configurations in the different scopes @@ -46,6 +55,11 @@ export interface IConfigurationService { * Event that fires when the configuration changes. */ onDidUpdateConfiguration: Event; + + /** + * Returns the defined values of configurations in the different scopes. + */ + values(): IConfigurationValues; } export enum ConfigurationSource { @@ -55,10 +69,6 @@ export enum ConfigurationSource { } export interface IConfigurationServiceEvent { - /** - * The full configuration. - */ - config: any; /** * The type of source that triggered this event. */ @@ -73,11 +83,14 @@ export interface IConfigurationValue { value: T; default: T; user: T; + workspace: T; + folder: T; } export interface IConfigurationKeys { default: string[]; user: string[]; + workspace: string[]; } /** @@ -101,18 +114,268 @@ export function getConfigurationValue(config: any, settingPath: string, defau return typeof result === 'undefined' ? defaultValue : result; } -export interface IConfigModel { +export function merge(base: any, add: any, overwrite: boolean): void { + Object.keys(add).forEach(key => { + if (key in base) { + if (types.isObject(base[key]) && types.isObject(add[key])) { + merge(base[key], add[key], overwrite); + } else if (overwrite) { + base[key] = add[key]; + } + } else { + base[key] = add[key]; + } + }); +} + +export interface IConfiguraionModel { contents: T; - overrides: IOverrides[]; keys: string[]; - errors: any[]; - - merge(other: IConfigModel, overwrite?: boolean): IConfigModel; - getContentsFor(section: string): V; - configWithOverrides(identifier: string, section?: string): IConfigModel; + overrides: IOverrides[]; } export interface IOverrides { contents: T; identifiers: string[]; } + +export class ConfigurationModel implements IConfiguraionModel { + + constructor(protected _contents: T = {}, protected _keys: string[] = [], protected _overrides: IOverrides[] = []) { + } + + public get contents(): T { + return this._contents; + } + + public get overrides(): IOverrides[] { + return this._overrides; + } + + public get keys(): string[] { + return this._keys; + } + + public getContentsFor(section: string): V { + return objects.clone(this.contents[section]); + } + + public override(identifier: string): ConfigurationModel { + const result = new ConfigurationModel(); + const contents = objects.clone(this.contents); + if (this._overrides) { + for (const override of this._overrides) { + if (override.identifiers.indexOf(identifier) !== -1) { + merge(contents, override.contents, true); + } + } + } + result._contents = contents; + return result; + } + + public merge(other: ConfigurationModel, overwrite: boolean = true): ConfigurationModel { + const mergedModel = new ConfigurationModel(); + this.doMerge(mergedModel, this, overwrite); + this.doMerge(mergedModel, other, overwrite); + return mergedModel; + } + + protected doMerge(source: ConfigurationModel, target: ConfigurationModel, overwrite: boolean = true) { + merge(source.contents, objects.clone(target.contents), overwrite); + const overrides = objects.clone(source._overrides); + for (const override of target._overrides) { + const [sourceOverride] = overrides.filter(o => arrays.equals(o.identifiers, override.identifiers)); + if (sourceOverride) { + merge(sourceOverride.contents, override.contents, overwrite); + } else { + overrides.push(override); + } + } + source._overrides = overrides; + } +} + +export interface IConfigurationData { + defaults: IConfiguraionModel; + user: IConfiguraionModel; + workspace: IConfiguraionModel; + folders: { [folder: string]: IConfiguraionModel }; +} + +export class Configuration { + + private _globalConfiguration: ConfigurationModel; + private _workspaceConsolidatedConfiguration: ConfigurationModel; + private _legacyWorkspaceConsolidatedConfiguration: ConfigurationModel; + protected _foldersConsolidatedConfigurations: StrictResourceMap>; + + constructor(protected _defaults: ConfigurationModel, protected _user: ConfigurationModel, protected _workspaceConfiguration: ConfigurationModel = new ConfigurationModel(), protected folders: StrictResourceMap> = new StrictResourceMap>(), protected _workspace?: Workspace) { + this.merge(); + } + + get defaults(): ConfigurationModel { + return this._defaults; + } + + get user(): ConfigurationModel { + return this._user; + } + + protected merge(): void { + this._globalConfiguration = new ConfigurationModel().merge(this._defaults).merge(this._user); + this._workspaceConsolidatedConfiguration = new ConfigurationModel().merge(this._globalConfiguration).merge(this._workspaceConfiguration); + this._legacyWorkspaceConsolidatedConfiguration = null; + this._foldersConsolidatedConfigurations = new StrictResourceMap>(); + for (const folder of this.folders.keys()) { + this.mergeFolder(folder); + } + } + + protected mergeFolder(folder: URI) { + this._foldersConsolidatedConfigurations.set(folder, new ConfigurationModel().merge(this._workspaceConsolidatedConfiguration).merge(this.folders.get(folder))); + } + + getValue(section: string = '', overrides: IConfigurationOverrides = {}): C { + const configModel = this.getConsolidateConfigurationModel(overrides); + return section ? configModel.getContentsFor(section) : configModel.contents; + } + + lookup(key: string, overrides: IConfigurationOverrides = {}): IConfigurationValue { + // make sure to clone the configuration so that the receiver does not tamper with the values + const consolidateConfigurationModel = this.getConsolidateConfigurationModel(overrides); + const folderConfigurationModel = this.getFolderConfigurationModelForResource(overrides.resource); + return { + default: objects.clone(getConfigurationValue(overrides.overrideIdentifier ? this._defaults.override(overrides.overrideIdentifier).contents : this._defaults.contents, key)), + user: objects.clone(getConfigurationValue(overrides.overrideIdentifier ? this._user.override(overrides.overrideIdentifier).contents : this._user.contents, key)), + workspace: objects.clone(this._workspace ? getConfigurationValue(overrides.overrideIdentifier ? this._workspaceConfiguration.override(overrides.overrideIdentifier).contents : this._workspaceConfiguration.contents, key) : void 0), //Check on workspace exists or not because _workspaceConfiguration is never null + folder: objects.clone(folderConfigurationModel ? getConfigurationValue(overrides.overrideIdentifier ? folderConfigurationModel.override(overrides.overrideIdentifier).contents : folderConfigurationModel.contents, key) : void 0), + value: objects.clone(getConfigurationValue(consolidateConfigurationModel.contents, key)) + }; + } + + lookupLegacy(key: string): IConfigurationValue { + if (!this._legacyWorkspaceConsolidatedConfiguration) { + this._legacyWorkspaceConsolidatedConfiguration = this._workspace ? new ConfigurationModel().merge(this._workspaceConfiguration).merge(this.folders.get(this._workspace.roots[0])) : null; + } + const consolidateConfigurationModel = this.getConsolidateConfigurationModel({}); + return { + default: objects.clone(getConfigurationValue(this._defaults.contents, key)), + user: objects.clone(getConfigurationValue(this._user.contents, key)), + workspace: objects.clone(this._legacyWorkspaceConsolidatedConfiguration ? getConfigurationValue(this._legacyWorkspaceConsolidatedConfiguration.contents, key) : void 0), + folder: void 0, + value: objects.clone(getConfigurationValue(consolidateConfigurationModel.contents, key)) + }; + } + + keys(): IConfigurationKeys { + return { + default: this._defaults.keys, + user: this._user.keys, + workspace: this._workspaceConfiguration.keys + }; + } + + values(): IConfigurationValues { + const result = Object.create(null); + const keyset = this.keys(); + const keys = [...keyset.workspace, ...keyset.user, ...keyset.default].sort(); + + let lastKey: string; + for (const key of keys) { + if (key !== lastKey) { + lastKey = key; + result[key] = this.lookup(key); + } + } + + return result; + } + + values2(): Map> { + const result: Map> = new Map>(); + const keyset = this.keys(); + const keys = [...keyset.workspace, ...keyset.user, ...keyset.default].sort(); + + let lastKey: string; + for (const key of keys) { + if (key !== lastKey) { + lastKey = key; + result.set(key, this.lookup(key)); + } + } + + return result; + } + + private getConsolidateConfigurationModel(overrides: IConfigurationOverrides): ConfigurationModel { + let configurationModel = this.getConsolidatedConfigurationModelForResource(overrides); + return overrides.overrideIdentifier ? configurationModel.override(overrides.overrideIdentifier) : configurationModel; + } + + private getConsolidatedConfigurationModelForResource({ resource }: IConfigurationOverrides): ConfigurationModel { + if (!this._workspace) { + return this._globalConfiguration; + } + + if (!resource) { + return this._workspaceConsolidatedConfiguration; + } + + const root = this._workspace.getRoot(resource); + if (!root) { + return this._workspaceConsolidatedConfiguration; + } + + return this._foldersConsolidatedConfigurations.get(root) || this._workspaceConsolidatedConfiguration; + } + + private getFolderConfigurationModelForResource(resource: URI): ConfigurationModel { + if (!this._workspace || !resource) { + return null; + } + + const root = this._workspace.getRoot(resource); + return root ? this.folders.get(root) : null; + } + + public toData(): IConfigurationData { + return { + defaults: { + contents: this._defaults.contents, + overrides: this._defaults.overrides, + keys: this._defaults.keys + }, + user: { + contents: this._user.contents, + overrides: this._user.overrides, + keys: this._user.keys + }, + workspace: { + contents: this._workspaceConfiguration.contents, + overrides: this._workspaceConfiguration.overrides, + keys: this._workspaceConfiguration.keys + }, + folders: this.folders.keys().reduce((result, folder) => { + const { contents, overrides, keys } = this.folders.get(folder); + result[folder.toString()] = { contents, overrides, keys }; + return result; + }, Object.create({})) + }; + } + + public static parse(data: IConfigurationData, workspace: Workspace): Configuration { + const defaultConfiguration = Configuration.parseConfigurationModel(data.defaults); + const userConfiguration = Configuration.parseConfigurationModel(data.user); + const workspaceConfiguration = Configuration.parseConfigurationModel(data.workspace); + const folders: StrictResourceMap> = Object.keys(data.folders).reduce((result, key) => { + result.set(URI.parse(key), Configuration.parseConfigurationModel(data.folders[key])); + return result; + }, new StrictResourceMap>()); + return new Configuration(defaultConfiguration, userConfiguration, workspaceConfiguration, folders, workspace); + } + + private static parseConfigurationModel(model: IConfiguraionModel): ConfigurationModel { + return new ConfigurationModel(model.contents, model.keys, model.overrides); + } +} \ No newline at end of file diff --git a/src/vs/platform/configuration/common/configurationRegistry.ts b/src/vs/platform/configuration/common/configurationRegistry.ts index a1f538bc6d43e..fe2a1f5a43925 100644 --- a/src/vs/platform/configuration/common/configurationRegistry.ts +++ b/src/vs/platform/configuration/common/configurationRegistry.ts @@ -7,11 +7,9 @@ import nls = require('vs/nls'); import Event, { Emitter } from 'vs/base/common/event'; import { IJSONSchema } from 'vs/base/common/jsonSchema'; -import { Registry } from 'vs/platform/platform'; -import objects = require('vs/base/common/objects'); +import { Registry } from 'vs/platform/registry/common/platform'; import types = require('vs/base/common/types'); import * as strings from 'vs/base/common/strings'; -import { ExtensionsRegistry, ExtensionMessageCollector } from 'vs/platform/extensions/common/extensionsRegistry'; import { IJSONContributionRegistry, Extensions as JSONExtensions } from 'vs/platform/jsonschemas/common/jsonContributionRegistry'; export const Extensions = { @@ -28,7 +26,9 @@ export interface IConfigurationRegistry { /** * Register multiple configurations to the registry. */ - registerConfigurations(configurations: IConfigurationNode[]): void; + registerConfigurations(configurations: IConfigurationNode[], validate?: boolean): void; + + registerDefaultConfigurations(defaultConfigurations: IDefaultConfigurationExtension[]): void; /** * Event that fires whenver a configuratio has been @@ -52,9 +52,15 @@ export interface IConfigurationRegistry { registerOverrideIdentifiers(identifiers: string[]): void; } +export enum ConfigurationScope { + WORKSPACE = 1, + FOLDER +} + export interface IConfigurationPropertySchema extends IJSONSchema { overridable?: boolean; isExecutable?: boolean; + scope?: ConfigurationScope; } export interface IConfigurationNode { @@ -66,6 +72,7 @@ export interface IConfigurationNode { properties?: { [path: string]: IConfigurationPropertySchema; }; allOf?: IConfigurationNode[]; overridable?: boolean; + scope?: ConfigurationScope; } export interface IDefaultConfigurationExtension { @@ -75,7 +82,7 @@ export interface IDefaultConfigurationExtension { } const schemaId = 'vscode://schemas/settings'; -const editorConfigurationSchemaId = 'vscode://schemas/settings/editor'; +export const editorConfigurationSchemaId = 'vscode://schemas/settings/editor'; const contributionRegistry = Registry.as(JSONExtensions.JSONContribution); class ConfigurationRegistry implements IConfigurationRegistry { @@ -147,7 +154,8 @@ class ConfigurationRegistry implements IConfigurationRegistry { } } - private validateAndRegisterProperties(configuration: IConfigurationNode, validate: boolean = true, overridable: boolean = false) { + private validateAndRegisterProperties(configuration: IConfigurationNode, validate: boolean = true, scope: ConfigurationScope = ConfigurationScope.WORKSPACE, overridable: boolean = false) { + scope = configuration.scope !== void 0 && configuration.scope !== null ? configuration.scope : scope; overridable = configuration.overridable || overridable; let properties = configuration.properties; if (properties) { @@ -168,6 +176,9 @@ class ConfigurationRegistry implements IConfigurationRegistry { if (overridable) { property.overridable = true; } + if (property.scope === void 0) { + property.scope = scope; + } // add to properties map this.configurationProperties[key] = properties[key]; } @@ -175,7 +186,7 @@ class ConfigurationRegistry implements IConfigurationRegistry { let subNodes = configuration.allOf; if (subNodes) { for (let node of subNodes) { - this.validateAndRegisterProperties(node, validate, overridable); + this.validateAndRegisterProperties(node, validate, scope, overridable); } } } @@ -281,36 +292,7 @@ function getDefaultValue(type: string | string[]): any { const configurationRegistry = new ConfigurationRegistry(); Registry.add(Extensions.Configuration, configurationRegistry); -const configurationExtPoint = ExtensionsRegistry.registerExtensionPoint('configuration', [], { - description: nls.localize('vscode.extension.contributes.configuration', 'Contributes configuration settings.'), - type: 'object', - defaultSnippets: [{ body: { title: '', properties: {} } }], - properties: { - title: { - description: nls.localize('vscode.extension.contributes.configuration.title', 'A summary of the settings. This label will be used in the settings file as separating comment.'), - type: 'string' - }, - properties: { - description: nls.localize('vscode.extension.contributes.configuration.properties', 'Description of the configuration properties.'), - type: 'object', - additionalProperties: { - anyOf: [ - { $ref: 'http://json-schema.org/draft-04/schema#' }, - { - type: 'object', - properties: { - isExecutable: { - type: 'boolean' - } - } - } - ] - } - } - } -}); - -function validateProperty(property: string): string { +export function validateProperty(property: string): string { if (OVERRIDE_PROPERTY_PATTERN.test(property)) { return nls.localize('config.property.languageDefault', "Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.", property); } @@ -319,78 +301,3 @@ function validateProperty(property: string): string { } return null; } - -function validateProperties(configuration: IConfigurationNode, collector: ExtensionMessageCollector): void { - let properties = configuration.properties; - if (properties) { - if (typeof properties !== 'object') { - collector.error(nls.localize('invalid.properties', "'configuration.properties' must be an object")); - configuration.properties = {}; - } - for (let key in properties) { - const message = validateProperty(key); - if (message) { - collector.warn(message); - delete properties[key]; - } - } - } - let subNodes = configuration.allOf; - if (subNodes) { - for (let node of subNodes) { - validateProperties(node, collector); - } - } -} - -configurationExtPoint.setHandler(extensions => { - const configurations: IConfigurationNode[] = []; - - - for (let i = 0; i < extensions.length; i++) { - const configuration = objects.clone(extensions[i].value); - const collector = extensions[i].collector; - - if (configuration.type && configuration.type !== 'object') { - collector.warn(nls.localize('invalid.type', "if set, 'configuration.type' must be set to 'object")); - } else { - configuration.type = 'object'; - } - - if (configuration.title && (typeof configuration.title !== 'string')) { - collector.error(nls.localize('invalid.title', "'configuration.title' must be a string")); - } - - validateProperties(configuration, collector); - - configuration.id = extensions[i].description.id; - configurations.push(configuration); - } - - configurationRegistry.registerConfigurations(configurations, false); -}); - -const defaultConfigurationExtPoint = ExtensionsRegistry.registerExtensionPoint('configurationDefaults', [], { - description: nls.localize('vscode.extension.contributes.defaultConfiguration', 'Contributes default editor configuration settings by language.'), - type: 'object', - defaultSnippets: [{ body: {} }], - patternProperties: { - '\\[.*\\]$': { - type: 'object', - default: {}, - $ref: editorConfigurationSchemaId, - } - } -}); - -defaultConfigurationExtPoint.setHandler(extensions => { - const defaultConfigurations: IDefaultConfigurationExtension[] = extensions.map(extension => { - const id = extension.description.id; - const name = extension.description.name; - const defaults = objects.clone(extension.value); - return { - id, name, defaults - }; - }); - configurationRegistry.registerDefaultConfigurations(defaultConfigurations); -}); \ No newline at end of file diff --git a/src/vs/platform/configuration/common/model.ts b/src/vs/platform/configuration/common/model.ts index cfbc368d83acd..55e875c586796 100644 --- a/src/vs/platform/configuration/common/model.ts +++ b/src/vs/platform/configuration/common/model.ts @@ -4,13 +4,10 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { Registry } from 'vs/platform/platform'; -import * as types from 'vs/base/common/types'; +import { Registry } from 'vs/platform/registry/common/platform'; import * as json from 'vs/base/common/json'; -import * as objects from 'vs/base/common/objects'; -import * as arrays from 'vs/base/common/arrays'; import { IConfigurationRegistry, Extensions, OVERRIDE_PROPERTY_PATTERN } from 'vs/platform/configuration/common/configurationRegistry'; -import { IConfigModel, IOverrides } from 'vs/platform/configuration/common/configuration'; +import { ConfigurationModel, IOverrides } from 'vs/platform/configuration/common/configuration'; export function getDefaultValues(): any { const valueTreeRoot: any = Object.create(null); @@ -68,92 +65,45 @@ export function getConfigurationKeys(): string[] { return Object.keys(properties); } -export function merge(base: any, add: any, overwrite: boolean): void { - Object.keys(add).forEach(key => { - if (key in base) { - if (types.isObject(base[key]) && types.isObject(add[key])) { - merge(base[key], add[key], overwrite); - } else if (overwrite) { - base[key] = add[key]; - } - } else { - base[key] = add[key]; - } - }); +export class DefaultConfigurationModel extends ConfigurationModel { + + constructor() { + super(getDefaultValues()); + this._keys = getConfigurationKeys(); + this._overrides = Object.keys(this._contents) + .filter(key => OVERRIDE_PROPERTY_PATTERN.test(key)) + .map(key => { + return >{ + identifiers: [overrideIdentifierFromKey(key).trim()], + contents: toValuesTree(this._contents[key], message => console.error(`Conflict in default settings file: ${message}`)) + }; + }); + } + + public get keys(): string[] { + return this._keys; + } } interface Overrides extends IOverrides { raw: any; } -export class ConfigModel implements IConfigModel { +export class CustomConfigurationModel extends ConfigurationModel { - protected _contents: T = {}; - protected _overrides: IOverrides[] = []; - protected _keys: string[] = []; protected _parseErrors: any[] = []; constructor(content: string = '', private name: string = '') { + super(); if (content) { this.update(content); } } - public get contents(): T { - return this._contents; - } - - public get overrides(): IOverrides[] { - return this._overrides; - } - - public get keys(): string[] { - return this._keys; - } - public get errors(): any[] { return this._parseErrors; } - public merge(other: IConfigModel, overwrite: boolean = true): ConfigModel { - const mergedModel = new ConfigModel(null); - this.doMerge(mergedModel, this, overwrite); - this.doMerge(mergedModel, other, overwrite); - return mergedModel; - } - - protected doMerge(source: ConfigModel, target: IConfigModel, overwrite: boolean = true) { - merge(source.contents, objects.clone(target.contents), overwrite); - const overrides = objects.clone(source.overrides); - for (const override of target.overrides) { - const [sourceOverride] = overrides.filter(o => arrays.equals(o.identifiers, override.identifiers)); - if (sourceOverride) { - merge(sourceOverride.contents, override.contents, overwrite); - } else { - overrides.push(override); - } - } - source._overrides = overrides; - } - - public getContentsFor(section: string): V { - return objects.clone(this.contents[section]); - } - - public configWithOverrides(identifier: string): ConfigModel { - const result = new ConfigModel(null); - const contents = objects.clone(this.contents); - if (this.overrides) { - for (const override of this.overrides) { - if (override.identifiers.indexOf(identifier) !== -1) { - merge(contents, override.contents, true); - } - } - } - result._contents = contents; - return result; - } - public update(content: string): void { let parsed: T = {}; let overrides: Overrides[] = []; @@ -243,31 +193,6 @@ export class ConfigModel implements IConfigModel { } } -export class DefaultConfigModel extends ConfigModel { - - constructor() { - super(null); - this.update(); - } - - public get keys(): string[] { - return this._keys; - } - - public update(): void { - this._contents = getDefaultValues(); // defaults coming from contributions to registries - this._keys = getConfigurationKeys(); - this._overrides = Object.keys(this._contents) - .filter(key => OVERRIDE_PROPERTY_PATTERN.test(key)) - .map(key => { - return >{ - identifiers: [overrideIdentifierFromKey(key).trim()], - contents: toValuesTree(this._contents[key], message => console.error(`Conflict in default settings file: ${message}`)) - }; - }); - } -} - export function overrideIdentifierFromKey(key: string): string { return key.substring(1, key.length - 1); } diff --git a/src/vs/platform/configuration/node/configurationService.ts b/src/vs/platform/configuration/node/configurationService.ts index ea7164b96a148..2a44744742cef 100644 --- a/src/vs/platform/configuration/node/configurationService.ts +++ b/src/vs/platform/configuration/node/configurationService.ts @@ -5,28 +5,21 @@ 'use strict'; import { TPromise } from 'vs/base/common/winjs.base'; -import * as objects from 'vs/base/common/objects'; import { ConfigWatcher } from 'vs/base/node/config'; -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import { IConfigurationRegistry, Extensions } from 'vs/platform/configuration/common/configurationRegistry'; import { IDisposable, toDisposable, Disposable } from 'vs/base/common/lifecycle'; -import { ConfigurationSource, IConfigurationService, IConfigurationServiceEvent, IConfigurationValue, getConfigurationValue, IConfigurationKeys, IConfigModel, IConfigurationOptions } from 'vs/platform/configuration/common/configuration'; -import { ConfigModel, DefaultConfigModel } from 'vs/platform/configuration/common/model'; +import { ConfigurationSource, IConfigurationService, IConfigurationServiceEvent, IConfigurationValue, IConfigurationKeys, ConfigurationModel, IConfigurationOverrides, Configuration, IConfigurationValues, IConfigurationData } from 'vs/platform/configuration/common/configuration'; +import { CustomConfigurationModel, DefaultConfigurationModel } from 'vs/platform/configuration/common/model'; import Event, { Emitter } from 'vs/base/common/event'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -export interface ICache { - defaults: IConfigModel; - user: IConfigModel; - consolidated: IConfigModel; -} - export class ConfigurationService extends Disposable implements IConfigurationService, IDisposable { _serviceBrand: any; - private cache: ICache; - private userConfigModelWatcher: ConfigWatcher>; + private _configuration: Configuration; + private userConfigModelWatcher: ConfigWatcher>; private _onDidUpdateConfiguration: Emitter = this._register(new Emitter()); public readonly onDidUpdateConfiguration: Event = this._onDidUpdateConfiguration.event; @@ -37,8 +30,8 @@ export class ConfigurationService extends Disposable implements IConfiguratio super(); this.userConfigModelWatcher = new ConfigWatcher(environmentService.appSettingsPath, { - changeBufferDelay: 300, defaultConfig: new ConfigModel(null, environmentService.appSettingsPath), parse: (content: string, parseErrors: any[]) => { - const userConfigModel = new ConfigModel(content, environmentService.appSettingsPath); + changeBufferDelay: 300, defaultConfig: new CustomConfigurationModel(null, environmentService.appSettingsPath), parse: (content: string, parseErrors: any[]) => { + const userConfigModel = new CustomConfigurationModel(content, environmentService.appSettingsPath); parseErrors = [...userConfigModel.errors]; return userConfigModel; } @@ -50,13 +43,16 @@ export class ConfigurationService extends Disposable implements IConfiguratio this._register(Registry.as(Extensions.Configuration).onDidRegisterConfiguration(() => this.onConfigurationChange(ConfigurationSource.Default))); } + public configuration(): Configuration { + return this._configuration || (this._configuration = this.consolidateConfigurations()); + } + private onConfigurationChange(source: ConfigurationSource): void { - this.cache = void 0; // reset our caches + this.reset(); // reset our caches - const cache = this.getCache(); + const cache = this.configuration(); this._onDidUpdateConfiguration.fire({ - config: this.getConfiguration(), source, sourceConfig: source === ConfigurationSource.Default ? cache.defaults.contents : cache.user.contents }); @@ -65,60 +61,39 @@ export class ConfigurationService extends Disposable implements IConfiguratio public reloadConfiguration(section?: string): TPromise { return new TPromise(c => { this.userConfigModelWatcher.reload(() => { - this.cache = void 0; // reset our caches - + this.reset(); // reset our caches c(this.getConfiguration(section)); }); }); } - public getConfiguration(section?: string): C - public getConfiguration(options?: IConfigurationOptions): C - public getConfiguration(arg?: any): C { - const options = this.toOptions(arg); - const cache = this.getCache(); - const configModel = options.overrideIdentifier ? cache.consolidated.configWithOverrides(options.overrideIdentifier) : cache.consolidated; - return options.section ? configModel.getContentsFor(options.section) : configModel.contents; + public getConfiguration(section?: string, options?: IConfigurationOverrides): C { + return this.configuration().getValue(section, options); } - public lookup(key: string, overrideIdentifier?: string): IConfigurationValue { - const cache = this.getCache(); - - // make sure to clone the configuration so that the receiver does not tamper with the values - return { - default: objects.clone(getConfigurationValue(overrideIdentifier ? cache.defaults.configWithOverrides(overrideIdentifier).contents : cache.defaults.contents, key)), - user: objects.clone(getConfigurationValue(overrideIdentifier ? cache.user.configWithOverrides(overrideIdentifier).contents : cache.user.contents, key)), - value: objects.clone(getConfigurationValue(overrideIdentifier ? cache.consolidated.configWithOverrides(overrideIdentifier).contents : cache.consolidated.contents, key)) - }; + public lookup(key: string, options?: IConfigurationOverrides): IConfigurationValue { + return this.configuration().lookup(key, options); } public keys(): IConfigurationKeys { - const cache = this.getCache(); + return this.configuration().keys(); + } - return { - default: cache.defaults.keys, - user: cache.user.keys - }; + public values(): IConfigurationValues { + return this._configuration.values(); } - public getCache(): ICache { - return this.cache || (this.cache = this.consolidateConfigurations()); + public getConfigurationData(): IConfigurationData { + return this.configuration().toData(); } - private toOptions(arg: any): IConfigurationOptions { - if (typeof arg === 'string') { - return { section: arg }; - } - if (typeof arg === 'object') { - return arg; - } - return {}; + private reset(): void { + this._configuration = this.consolidateConfigurations(); } - private consolidateConfigurations(): ICache { - const defaults = new DefaultConfigModel(); + private consolidateConfigurations(): Configuration { + const defaults = new DefaultConfigurationModel(); const user = this.userConfigModelWatcher.getConfig(); - const consolidated = defaults.merge(user); - return { defaults, user, consolidated }; + return new Configuration(defaults, user); } } \ No newline at end of file diff --git a/src/vs/platform/configuration/test/common/configuration.test.ts b/src/vs/platform/configuration/test/common/configuration.test.ts new file mode 100644 index 0000000000000..dfdb42ffd4b2a --- /dev/null +++ b/src/vs/platform/configuration/test/common/configuration.test.ts @@ -0,0 +1,79 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import * as assert from 'assert'; +import { ConfigurationModel, merge } from 'vs/platform/configuration/common/configuration'; +import { Extensions, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry'; +import { Registry } from 'vs/platform/registry/common/platform'; + +suite('Configuration', () => { + + suiteSetup(() => { + Registry.as(Extensions.Configuration).registerConfiguration({ + 'id': 'a', + 'order': 1, + 'title': 'a', + 'type': 'object', + 'properties': { + 'a': { + 'description': 'a', + 'type': 'boolean', + 'default': true, + 'overridable': true + } + } + }); + }); + + test('simple merge', () => { + let base = { 'a': 1, 'b': 2 }; + merge(base, { 'a': 3, 'c': 4 }, true); + assert.deepEqual(base, { 'a': 3, 'b': 2, 'c': 4 }); + base = { 'a': 1, 'b': 2 }; + merge(base, { 'a': 3, 'c': 4 }, false); + assert.deepEqual(base, { 'a': 1, 'b': 2, 'c': 4 }); + }); + + test('Recursive merge', () => { + const base = { 'a': { 'b': 1 } }; + merge(base, { 'a': { 'b': 2 } }, true); + assert.deepEqual(base, { 'a': { 'b': 2 } }); + }); + + test('simple merge using configuration', () => { + let base = new ConfigurationModel({ 'a': 1, 'b': 2 }); + let add = new ConfigurationModel({ 'a': 3, 'c': 4 }); + let result = base.merge(add); + assert.deepEqual(result.contents, { 'a': 3, 'b': 2, 'c': 4 }); + }); + + test('Recursive merge using config models', () => { + let base = new ConfigurationModel({ 'a': { 'b': 1 } }); + let add = new ConfigurationModel({ 'a': { 'b': 2 } }); + let result = base.merge(add); + assert.deepEqual(result.contents, { 'a': { 'b': 2 } }); + }); + + test('Test contents while getting an existing property', () => { + let testObject = new ConfigurationModel({ 'a': 1 }); + assert.deepEqual(testObject.getContentsFor('a'), 1); + + testObject = new ConfigurationModel({ 'a': { 'b': 1 } }); + assert.deepEqual(testObject.getContentsFor('a'), { 'b': 1 }); + }); + + test('Test contents are undefined for non existing properties', () => { + const testObject = new ConfigurationModel({ awesome: true }); + + assert.deepEqual(testObject.getContentsFor('unknownproperty'), undefined); + }); + + test('Test override gives all content merged with overrides', () => { + const testObject = new ConfigurationModel({ 'a': 1, 'c': 1 }, [], [{ identifiers: ['b'], contents: { 'a': 2 } }]); + + assert.deepEqual(testObject.override('b').contents, { 'a': 2, 'c': 1 }); + }); +}); \ No newline at end of file diff --git a/src/vs/platform/configuration/test/common/model.test.ts b/src/vs/platform/configuration/test/common/model.test.ts index db7edc4c0d751..aa9597b670246 100644 --- a/src/vs/platform/configuration/test/common/model.test.ts +++ b/src/vs/platform/configuration/test/common/model.test.ts @@ -5,11 +5,11 @@ 'use strict'; import * as assert from 'assert'; -import * as model from 'vs/platform/configuration/common/model'; +import { CustomConfigurationModel, DefaultConfigurationModel } from 'vs/platform/configuration/common/model'; import { Extensions, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry'; -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; -suite('ConfigurationService - Model', () => { +suite('Configuration', () => { suiteSetup(() => { Registry.as(Extensions.Configuration).registerConfiguration({ @@ -28,62 +28,47 @@ suite('ConfigurationService - Model', () => { }); }); - test('simple merge', () => { - let base = { 'a': 1, 'b': 2 }; - model.merge(base, { 'a': 3, 'c': 4 }, true); - assert.deepEqual(base, { 'a': 3, 'b': 2, 'c': 4 }); - base = { 'a': 1, 'b': 2 }; - model.merge(base, { 'a': 3, 'c': 4 }, false); - assert.deepEqual(base, { 'a': 1, 'b': 2, 'c': 4 }); - }); - - test('Recursive merge', () => { - const base = { 'a': { 'b': 1 } }; - model.merge(base, { 'a': { 'b': 2 } }, true); - assert.deepEqual(base, { 'a': { 'b': 2 } }); - }); - test('simple merge using models', () => { - let base = new model.ConfigModel(JSON.stringify({ 'a': 1, 'b': 2 })); - let add = new model.ConfigModel(JSON.stringify({ 'a': 3, 'c': 4 })); + let base = new CustomConfigurationModel(JSON.stringify({ 'a': 1, 'b': 2 })); + let add = new CustomConfigurationModel(JSON.stringify({ 'a': 3, 'c': 4 })); let result = base.merge(add); assert.deepEqual(result.contents, { 'a': 3, 'b': 2, 'c': 4 }); }); test('simple merge with an undefined contents', () => { - let base = new model.ConfigModel(JSON.stringify({ 'a': 1, 'b': 2 })); - let add = new model.ConfigModel(null); + let base = new CustomConfigurationModel(JSON.stringify({ 'a': 1, 'b': 2 })); + let add = new CustomConfigurationModel(null); let result = base.merge(add); assert.deepEqual(result.contents, { 'a': 1, 'b': 2 }); - base = new model.ConfigModel(null); - add = new model.ConfigModel(JSON.stringify({ 'a': 1, 'b': 2 })); + base = new CustomConfigurationModel(null); + add = new CustomConfigurationModel(JSON.stringify({ 'a': 1, 'b': 2 })); result = base.merge(add); assert.deepEqual(result.contents, { 'a': 1, 'b': 2 }); - base = new model.ConfigModel(null); - add = new model.ConfigModel(null); + base = new CustomConfigurationModel(null); + add = new CustomConfigurationModel(null); result = base.merge(add); assert.deepEqual(result.contents, {}); }); test('Recursive merge using config models', () => { - let base = new model.ConfigModel(JSON.stringify({ 'a': { 'b': 1 } })); - let add = new model.ConfigModel(JSON.stringify({ 'a': { 'b': 2 } })); + let base = new CustomConfigurationModel(JSON.stringify({ 'a': { 'b': 1 } })); + let add = new CustomConfigurationModel(JSON.stringify({ 'a': { 'b': 2 } })); let result = base.merge(add); assert.deepEqual(result.contents, { 'a': { 'b': 2 } }); }); test('Test contents while getting an existing property', () => { - let testObject = new model.ConfigModel(JSON.stringify({ 'a': 1 })); + let testObject = new CustomConfigurationModel(JSON.stringify({ 'a': 1 })); assert.deepEqual(testObject.getContentsFor('a'), 1); - testObject = new model.ConfigModel(JSON.stringify({ 'a': { 'b': 1 } })); + testObject = new CustomConfigurationModel(JSON.stringify({ 'a': { 'b': 1 } })); assert.deepEqual(testObject.getContentsFor('a'), { 'b': 1 }); }); test('Test contents are undefined for non existing properties', () => { - const testObject = new model.ConfigModel(JSON.stringify({ + const testObject = new CustomConfigurationModel(JSON.stringify({ awesome: true })); @@ -91,25 +76,25 @@ suite('ConfigurationService - Model', () => { }); test('Test contents are undefined for undefined config', () => { - const testObject = new model.ConfigModel(null); + const testObject = new CustomConfigurationModel(null); assert.deepEqual(testObject.getContentsFor('unknownproperty'), undefined); }); test('Test configWithOverrides gives all content merged with overrides', () => { - const testObject = new model.ConfigModel(JSON.stringify({ 'a': 1, 'c': 1, '[b]': { 'a': 2 } })); + const testObject = new CustomConfigurationModel(JSON.stringify({ 'a': 1, 'c': 1, '[b]': { 'a': 2 } })); - assert.deepEqual(testObject.configWithOverrides('b').contents, { 'a': 2, 'c': 1, '[b]': { 'a': 2 } }); + assert.deepEqual(testObject.override('b').contents, { 'a': 2, 'c': 1, '[b]': { 'a': 2 } }); }); test('Test configWithOverrides gives empty contents', () => { - const testObject = new model.ConfigModel(null); + const testObject = new CustomConfigurationModel(null); - assert.deepEqual(testObject.configWithOverrides('b').contents, {}); + assert.deepEqual(testObject.override('b').contents, {}); }); test('Test update with empty data', () => { - const testObject = new model.ConfigModel(); + const testObject = new CustomConfigurationModel(); testObject.update(''); assert.deepEqual(testObject.contents, {}); @@ -140,7 +125,7 @@ suite('ConfigurationService - Model', () => { } } }); - assert.equal(true, new model.DefaultConfigModel().getContentsFor('a')); + assert.equal(true, new DefaultConfigurationModel().getContentsFor('a')); }); test('Test registering the language property', () => { @@ -157,7 +142,7 @@ suite('ConfigurationService - Model', () => { } } }); - assert.equal(undefined, new model.DefaultConfigModel().getContentsFor('[a]')); + assert.equal(undefined, new DefaultConfigurationModel().getContentsFor('[a]')); }); }); \ No newline at end of file diff --git a/src/vs/platform/configuration/test/common/testConfigurationService.ts b/src/vs/platform/configuration/test/common/testConfigurationService.ts index 9af8629a5bb29..2f7161f56df0f 100644 --- a/src/vs/platform/configuration/test/common/testConfigurationService.ts +++ b/src/vs/platform/configuration/test/common/testConfigurationService.ts @@ -8,7 +8,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { EventEmitter } from 'vs/base/common/eventEmitter'; import { getConfigurationKeys } from 'vs/platform/configuration/common/model'; -import { IConfigurationService, getConfigurationValue, IConfigurationValue, IConfigurationKeys } from 'vs/platform/configuration/common/configuration'; +import { IConfigurationService, getConfigurationValue, IConfigurationValue, IConfigurationKeys, IConfigurationValues, IConfigurationData, Configuration, ConfigurationModel } from 'vs/platform/configuration/common/configuration'; export class TestConfigurationService extends EventEmitter implements IConfigurationService { public _serviceBrand: any; @@ -23,6 +23,10 @@ export class TestConfigurationService extends EventEmitter implements IConfigura return this.configuration; } + public getConfigurationData(): IConfigurationData { + return new Configuration(new ConfigurationModel(), new ConfigurationModel(this.configuration)).toData(); + } + public setUserConfiguration(key: any, value: any): Thenable { this.configuration[key] = value; return TPromise.as(null); @@ -36,14 +40,21 @@ export class TestConfigurationService extends EventEmitter implements IConfigura return { value: getConfigurationValue(this.getConfiguration(), key), default: getConfigurationValue(this.getConfiguration(), key), - user: getConfigurationValue(this.getConfiguration(), key) + user: getConfigurationValue(this.getConfiguration(), key), + workspace: null, + folder: null }; } public keys(): IConfigurationKeys { return { default: getConfigurationKeys(), - user: Object.keys(this.configuration) + user: Object.keys(this.configuration), + workspace: [] }; } + + public values(): IConfigurationValues { + return {}; + } } diff --git a/src/vs/platform/configuration/test/node/configurationService.test.ts b/src/vs/platform/configuration/test/node/configurationService.test.ts index 8896196e8588d..594a6eb52871a 100644 --- a/src/vs/platform/configuration/test/node/configurationService.test.ts +++ b/src/vs/platform/configuration/test/node/configurationService.test.ts @@ -10,7 +10,7 @@ import os = require('os'); import path = require('path'); import fs = require('fs'); -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import { ConfigurationService } from 'vs/platform/configuration/node/configurationService'; import { ParsedArgs } from 'vs/platform/environment/common/environment'; import { parseArgs } from 'vs/platform/environment/node/argv'; diff --git a/src/vs/platform/contextkey/browser/contextKeyService.ts b/src/vs/platform/contextkey/browser/contextKeyService.ts index 45d993851a4d8..325e8cf9680f4 100644 --- a/src/vs/platform/contextkey/browser/contextKeyService.ts +++ b/src/vs/platform/contextkey/browser/contextKeyService.ts @@ -58,7 +58,7 @@ class ConfigAwareContextValuesContainer extends Context { super(id, null); this._emitter = emitter; - this._subscription = configurationService.onDidUpdateConfiguration(e => this._updateConfigurationContext(e.config)); + this._subscription = configurationService.onDidUpdateConfiguration(e => this._updateConfigurationContext(configurationService.getConfiguration())); this._updateConfigurationContext(configurationService.getConfiguration()); } diff --git a/src/vs/platform/contextkey/test/common/contextkey.test.ts b/src/vs/platform/contextkey/test/common/contextkey.test.ts index 8456226890749..69f8bca09302b 100644 --- a/src/vs/platform/contextkey/test/common/contextkey.test.ts +++ b/src/vs/platform/contextkey/test/common/contextkey.test.ts @@ -7,7 +7,13 @@ import * as assert from 'assert'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; -const createContext = ctx => ({ getValue: key => ctx[key] }); +function createContext(ctx: any) { + return { + getValue: (key: string) => { + return ctx[key]; + } + }; +} suite('ContextKeyExpr', () => { test('ContextKeyExpr.equals', function () { diff --git a/src/vs/platform/editor/common/editor.ts b/src/vs/platform/editor/common/editor.ts index 81dc32ec8bc88..08c7863ea1726 100644 --- a/src/vs/platform/editor/common/editor.ts +++ b/src/vs/platform/editor/common/editor.ts @@ -9,7 +9,6 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import Event from 'vs/base/common/event'; import { IDisposable } from 'vs/base/common/lifecycle'; -import { IEditorViewState } from 'vs/editor/common/editorCommon'; export const IEditorService = createDecorator('editorService'); @@ -90,6 +89,11 @@ export interface IUntitledResourceInput extends IBaseResourceInput { * Optional contents of the untitled resource. */ contents?: string; + + /** + * Optional encoding of the untitled resource. + */ + encoding?: string; } export interface IResourceDiffInput extends IBaseResourceInput { @@ -286,7 +290,7 @@ export interface ITextEditorOptions extends IEditorOptions { /** * Text editor view state. */ - viewState?: IEditorViewState; + viewState?: object; /** * Option to scroll vertically or horizontally as necessary and reveal a range centered vertically only if it lies outside the viewport. diff --git a/src/vs/platform/environment/common/environment.ts b/src/vs/platform/environment/common/environment.ts index 8e8fbb81a23e2..b7aee17d58400 100644 --- a/src/vs/platform/environment/common/environment.ts +++ b/src/vs/platform/environment/common/environment.ts @@ -37,7 +37,7 @@ export interface ParsedArgs { 'uninstall-extension'?: string | string[]; 'enable-proposed-api'?: string | string[]; 'open-url'?: string | string[]; - 'prof-startup-timers': string; + 'skip-getting-started'?: boolean; } export const IEnvironmentService = createDecorator('environmentService'); @@ -78,6 +78,8 @@ export interface IEnvironmentService { performance: boolean; profileStartup: { prefix: string, dir: string } | undefined; + skipGettingStarted: boolean | undefined; + mainIPCHandle: string; sharedIPCHandle: string; diff --git a/src/vs/platform/environment/node/argv.ts b/src/vs/platform/environment/node/argv.ts index b5bd5de241710..b022eb3ce6b1e 100644 --- a/src/vs/platform/environment/node/argv.ts +++ b/src/vs/platform/environment/node/argv.ts @@ -22,7 +22,6 @@ const options: minimist.Opts = { 'debugBrkPluginHost', 'debugPluginHost', 'open-url', - 'prof-startup-timers', 'enable-proposed-api' ], boolean: [ @@ -41,7 +40,8 @@ const options: minimist.Opts = { 'disable-extensions', 'list-extensions', 'show-versions', - 'nolazy' + 'nolazy', + 'skip-getting-started' ], alias: { help: 'h', diff --git a/src/vs/platform/environment/node/environmentService.ts b/src/vs/platform/environment/node/environmentService.ts index 15b2f19951a04..2a93543b82f03 100644 --- a/src/vs/platform/environment/node/environmentService.ts +++ b/src/vs/platform/environment/node/environmentService.ts @@ -30,6 +30,9 @@ function getUniqueUserId(): string { } function getNixIPCHandle(userDataPath: string, type: string): string { + if (process.env['XDG_RUNTIME_DIR']) { + return path.join(process.env['XDG_RUNTIME_DIR'], `${pkg.name}-${pkg.version}-${type}.sock`); + } return path.join(userDataPath, `${pkg.version}-${type}.sock`); } @@ -100,6 +103,8 @@ export class EnvironmentService implements IEnvironmentService { get disableExtensions(): boolean { return this._args['disable-extensions']; } + get skipGettingStarted(): boolean { return this._args['skip-getting-started']; } + @memoize get debugExtensionHost(): { port: number; break: boolean; } { return parseExtensionHostPort(this._args, this.isBuilt); } diff --git a/src/vs/platform/extensionManagement/common/extensionEnablementService.ts b/src/vs/platform/extensionManagement/common/extensionEnablementService.ts index 689c192d03a59..75606dd0a96a1 100644 --- a/src/vs/platform/extensionManagement/common/extensionEnablementService.ts +++ b/src/vs/platform/extensionManagement/common/extensionEnablementService.ts @@ -10,7 +10,7 @@ import Event, { Emitter } from 'vs/base/common/event'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { IExtensionManagementService, DidUninstallExtensionEvent, IExtensionEnablementService } from 'vs/platform/extensionManagement/common/extensionManagement'; import { adoptToGalleryExtensionId, getIdAndVersionFromLocalExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; -import { IWorkspaceContextService, IWorkspace } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; @@ -34,8 +34,8 @@ export class ExtensionEnablementService implements IExtensionEnablementService { extensionManagementService.onDidUninstallExtension(this.onDidUninstallExtension, this, this.disposables); } - private get workspace(): IWorkspace { - return this.contextService.getWorkspace(); + private get hasWorkspace(): boolean { + return this.contextService.hasWorkspace(); } public getGloballyDisabledExtensions(): string[] { @@ -60,8 +60,8 @@ export class ExtensionEnablementService implements IExtensionEnablementService { } public setEnablement(identifier: string, enable: boolean, workspace: boolean = false): TPromise { - if (workspace && !this.workspace) { - return TPromise.wrapError(localize('noWorkspace', "No workspace.")); + if (workspace && !this.hasWorkspace) { + return TPromise.wrapError(new Error(localize('noWorkspace', "No workspace."))); } if (this.environmentService.disableExtensions) { @@ -106,7 +106,7 @@ export class ExtensionEnablementService implements IExtensionEnablementService { } private getDisabledExtensions(scope: StorageScope): string[] { - if (scope === StorageScope.WORKSPACE && !this.workspace) { + if (scope === StorageScope.WORKSPACE && !this.hasWorkspace) { return []; } const value = this.storageService.get(DISABLED_EXTENSIONS_STORAGE_PATH, scope, ''); diff --git a/src/vs/platform/extensionManagement/common/extensionManagement.ts b/src/vs/platform/extensionManagement/common/extensionManagement.ts index 8df367a9615f6..e60c845c300bf 100644 --- a/src/vs/platform/extensionManagement/common/extensionManagement.ts +++ b/src/vs/platform/extensionManagement/common/extensionManagement.ts @@ -74,10 +74,9 @@ export interface ITheme { label: string; } -export interface ITreeExplorer { +export interface IView { id: string; - label: string; - icon: string; + name: string; } export interface IExtensionContributions { @@ -91,7 +90,7 @@ export interface IExtensionContributions { menus?: { [context: string]: IMenu[] }; snippets?: ISnippet[]; themes?: ITheme[]; - explorer?: ITreeExplorer; + views?: { [location: string]: IView[] }; } export interface IExtensionManifest { diff --git a/src/vs/platform/extensionManagement/common/extensionManagementUtil.ts b/src/vs/platform/extensionManagement/common/extensionManagementUtil.ts index 4d5e0588994cb..e3f772bb1a0de 100644 --- a/src/vs/platform/extensionManagement/common/extensionManagementUtil.ts +++ b/src/vs/platform/extensionManagement/common/extensionManagementUtil.ts @@ -5,7 +5,8 @@ 'use strict'; -import { ILocalExtension, IGalleryExtension, IExtensionManifest, EXTENSION_IDENTIFIER_REGEX } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { ILocalExtension, IGalleryExtension, IExtensionManifest, EXTENSION_IDENTIFIER_REGEX, IExtensionEnablementService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; export function areSameExtensions(a: { id: string }, b: { id: string }): boolean { if (a.id === b.id) { @@ -71,4 +72,25 @@ export function getGalleryExtensionTelemetryData(extension: IGalleryExtension): publisherDisplayName: extension.publisherDisplayName, dependencies: extension.properties.dependencies.length > 0 }; +} + + +const BetterMergeCheckKey = 'extensions/bettermergecheck'; +export const BetterMergeDisabledNowKey = 'extensions/bettermergedisablednow'; +export const BetterMergeId = 'pprice.better-merge'; + +/** + * Globally disabled extensions, taking care of disabling obsolete extensions. + */ +export function getGloballyDisabledExtensions(extensionEnablementService: IExtensionEnablementService, storageService: IStorageService, installedExtensions: { id: string; }[]) { + const globallyDisabled = extensionEnablementService.getGloballyDisabledExtensions(); + if (!storageService.getBoolean(BetterMergeCheckKey, StorageScope.GLOBAL, false)) { + storageService.store(BetterMergeCheckKey, true); + if (globallyDisabled.indexOf(BetterMergeId) === -1 && installedExtensions.some(d => d.id === BetterMergeId)) { + globallyDisabled.push(BetterMergeId); + extensionEnablementService.setEnablement(BetterMergeId, false); + storageService.store(BetterMergeDisabledNowKey, true); + } + } + return globallyDisabled; } \ No newline at end of file diff --git a/src/vs/platform/extensionManagement/node/extensionGalleryService.ts b/src/vs/platform/extensionManagement/node/extensionGalleryService.ts index a0852ef7084c0..6b5d9a67ca1b6 100644 --- a/src/vs/platform/extensionManagement/node/extensionGalleryService.ts +++ b/src/vs/platform/extensionManagement/node/extensionGalleryService.ts @@ -7,9 +7,9 @@ import { localize } from 'vs/nls'; import { tmpdir } from 'os'; import * as path from 'path'; import { TPromise } from 'vs/base/common/winjs.base'; +import * as uuid from 'vs/base/common/uuid'; import { distinct } from 'vs/base/common/arrays'; import { getErrorMessage } from 'vs/base/common/errors'; -import { ArraySet } from 'vs/base/common/set'; import { IGalleryExtension, IExtensionGalleryService, IGalleryExtensionAsset, IQueryOptions, SortBy, SortOrder, IExtensionManifest } from 'vs/platform/extensionManagement/common/extensionManagement'; import { getGalleryExtensionId, getGalleryExtensionTelemetryData, adoptToGalleryExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { assign, getOrDefault } from 'vs/base/common/objects'; @@ -297,7 +297,7 @@ export class ExtensionGalleryService implements IExtensionGalleryService { } const type = options.names ? 'ids' : (options.text ? 'text' : 'all'); - const text = options.text || ''; + let text = options.text || ''; const pageSize = getOrDefault(options, o => o.pageSize, 50); this.telemetryService.publicLog('galleryService:query', { type, text }); @@ -310,7 +310,25 @@ export class ExtensionGalleryService implements IExtensionGalleryService { .withAssetTypes(AssetType.Icon, AssetType.License, AssetType.Details, AssetType.Manifest, AssetType.VSIX, AssetType.Changelog); if (text) { - query = query.withFilter(FilterType.SearchText, text).withSortBy(SortBy.NoneOrRelevance); + // Use category filter instead of "category:themes" + text = text.replace(/\bcategory:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g, (_, quotedCategory, category) => { + query = query.withFilter(FilterType.Category, category || quotedCategory); + return ''; + }); + + // Use tag filter instead of "tag:debuggers" + text = text.replace(/\btag:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g, (_, quotedTag, tag) => { + query = query.withFilter(FilterType.Tag, tag || quotedTag); + return ''; + }); + + text = text.trim(); + + if (text) { + query = query.withFilter(FilterType.SearchText, text); + } + + query = query.withSortBy(SortBy.NoneOrRelevance); } else if (options.ids) { query = query.withFilter(FilterType.ExtensionId, ...options.ids); } else if (options.names) { @@ -337,39 +355,39 @@ export class ExtensionGalleryService implements IExtensionGalleryService { }); } - private queryGallery(query: Query): TPromise<{ galleryExtensions: IRawGalleryExtension[], total: number; }> { - return this.commonHTTPHeaders - .then(headers => { - const data = JSON.stringify(query.raw); + private async queryGallery(query: Query): TPromise<{ galleryExtensions: IRawGalleryExtension[], total: number; }> { + const commonHeaders = await this.commonHTTPHeaders; + const data = JSON.stringify(query.raw); + const headers = assign({}, commonHeaders, { + 'Content-Type': 'application/json', + 'Accept': 'application/json;api-version=3.0-preview.1', + 'Accept-Encoding': 'gzip', + 'Content-Length': data.length + }); - headers = assign({}, headers, { - 'Content-Type': 'application/json', - 'Accept': 'application/json;api-version=3.0-preview.1', - 'Accept-Encoding': 'gzip', - 'Content-Length': data.length - }); + const context = await this.requestService.request({ + type: 'POST', + url: this.api('/extensionquery'), + data, + headers + }); - return this.requestService.request({ - type: 'POST', - url: this.api('/extensionquery'), - data, - headers - }); - }) - .then(context => asJson(context)) - .then(result => { - const r = result.results[0]; - const galleryExtensions = r.extensions; - const resultCount = r.resultMetadata && r.resultMetadata.filter(m => m.metadataType === 'ResultCount')[0]; - const total = resultCount && resultCount.metadataItems.filter(i => i.name === 'TotalCount')[0].count || 0; - - return { galleryExtensions, total }; - }); + if (context.res.statusCode >= 400 && context.res.statusCode < 500) { + return { galleryExtensions: [], total: 0 }; + } + + const result = await asJson(context); + const r = result.results[0]; + const galleryExtensions = r.extensions; + const resultCount = r.resultMetadata && r.resultMetadata.filter(m => m.metadataType === 'ResultCount')[0]; + const total = resultCount && resultCount.metadataItems.filter(i => i.name === 'TotalCount')[0].count || 0; + + return { galleryExtensions, total }; } download(extension: IGalleryExtension): TPromise { return this.loadCompatibleVersion(extension).then(extension => { - const zipPath = path.join(tmpdir(), extension.uuid); + const zipPath = path.join(tmpdir(), uuid.generateUuid()); const data = getGalleryExtensionTelemetryData(extension); const startTime = new Date().getTime(); const log = duration => this.telemetryService.publicLog('galleryService:downloadVSIX', assign(data, { duration })); @@ -474,14 +492,15 @@ export class ExtensionGalleryService implements IExtensionGalleryService { return this.loadDependencies(toGet) .then(loadedDependencies => { - const dependenciesSet = new ArraySet(); + const dependenciesSet = new Set(); for (const dep of loadedDependencies) { if (dep.properties.dependencies) { - dep.properties.dependencies.forEach(d => dependenciesSet.set(d)); + dep.properties.dependencies.forEach(d => dependenciesSet.add(d)); } } result = distinct(result.concat(loadedDependencies), d => d.uuid); - const dependencies = dependenciesSet.elements.filter(d => !ExtensionGalleryService.hasExtensionByName(result, d)); + const dependencies: string[] = []; + dependenciesSet.forEach(d => !ExtensionGalleryService.hasExtensionByName(result, d) && dependencies.push(d)); return this.getDependenciesReccursively(dependencies, result, root); }); } @@ -496,7 +515,7 @@ export class ExtensionGalleryService implements IExtensionGalleryService { const firstOptions = assign({}, options, { url: asset.uri }); return this.requestService.request(firstOptions) - .then(context => context.res.statusCode === 200 ? context : TPromise.wrapError('expected 200')) + .then(context => context.res.statusCode === 200 ? context : TPromise.wrapError(new Error('expected 200'))) .then(null, err => { this.telemetryService.publicLog('galleryService:requestError', { cdn: true, message: getErrorMessage(err) }); this.telemetryService.publicLog('galleryService:cdnFallback', { url: asset.uri }); diff --git a/src/vs/platform/extensionManagement/node/extensionManagementService.ts b/src/vs/platform/extensionManagement/node/extensionManagementService.ts index 9f6240ab3b65c..2fa14e5bf6b41 100644 --- a/src/vs/platform/extensionManagement/node/extensionManagementService.ts +++ b/src/vs/platform/extensionManagement/node/extensionManagementService.ts @@ -268,26 +268,28 @@ export class ExtensionManagementService implements IExtensionManagementService { private installExtension(zipPath: string, id: string, metadata: IGalleryMetadata = null): TPromise { const extensionPath = path.join(this.extensionsPath, id); - return extract(zipPath, extensionPath, { sourcePath: 'extension', overwrite: true }) - .then(() => readManifest(extensionPath)) - .then(({ manifest }) => { - return pfs.readdir(extensionPath).then(children => { - const readme = children.filter(child => /^readme(\.txt|\.md|)$/i.test(child))[0]; - const readmeUrl = readme ? URI.file(path.join(extensionPath, readme)).toString() : null; - const changelog = children.filter(child => /^changelog(\.txt|\.md|)$/i.test(child))[0]; - const changelogUrl = changelog ? URI.file(path.join(extensionPath, changelog)).toString() : null; - const type = LocalExtensionType.User; - - const local: ILocalExtension = { type, id, manifest, metadata, path: extensionPath, readmeUrl, changelogUrl }; - const manifestPath = path.join(extensionPath, 'package.json'); - - return pfs.readFile(manifestPath, 'utf8') - .then(raw => parseManifest(raw)) - .then(({ manifest }) => assign(manifest, { __metadata: metadata })) - .then(manifest => pfs.writeFile(manifestPath, JSON.stringify(manifest, null, '\t'))) - .then(() => local); + return pfs.rimraf(extensionPath).then(() => { + return extract(zipPath, extensionPath, { sourcePath: 'extension', overwrite: true }) + .then(() => readManifest(extensionPath)) + .then(({ manifest }) => { + return pfs.readdir(extensionPath).then(children => { + const readme = children.filter(child => /^readme(\.txt|\.md|)$/i.test(child))[0]; + const readmeUrl = readme ? URI.file(path.join(extensionPath, readme)).toString() : null; + const changelog = children.filter(child => /^changelog(\.txt|\.md|)$/i.test(child))[0]; + const changelogUrl = changelog ? URI.file(path.join(extensionPath, changelog)).toString() : null; + const type = LocalExtensionType.User; + + const local: ILocalExtension = { type, id, manifest, metadata, path: extensionPath, readmeUrl, changelogUrl }; + const manifestPath = path.join(extensionPath, 'package.json'); + + return pfs.readFile(manifestPath, 'utf8') + .then(raw => parseManifest(raw)) + .then(({ manifest }) => assign(manifest, { __metadata: metadata })) + .then(manifest => pfs.writeFile(manifestPath, JSON.stringify(manifest, null, '\t'))) + .then(() => local); + }); }); - }); + }); } uninstall(extension: ILocalExtension, force = false): TPromise { @@ -366,7 +368,7 @@ export class ExtensionManagementService implements IExtensionManagementService { const dependenciesToUninstall = this.filterDependents(extension, dependencies, installed); let dependents = this.getDependents(extension, installed).filter(dependent => extension !== dependent && dependenciesToUninstall.indexOf(dependent) === -1); if (dependents.length) { - return TPromise.wrapError(this.getDependentsErrorMessage(extension, dependents)); + return TPromise.wrapError(new Error(this.getDependentsErrorMessage(extension, dependents))); } return TPromise.join([this.uninstallExtension(extension.id), ...dependenciesToUninstall.map(d => this.doUninstall(d.id))]).then(() => null); } diff --git a/src/vs/platform/extensionManagement/test/common/extensionEnablementService.test.ts b/src/vs/platform/extensionManagement/test/common/extensionEnablementService.test.ts index 3ea2261d14af7..e44ff52c8c967 100644 --- a/src/vs/platform/extensionManagement/test/common/extensionEnablementService.test.ts +++ b/src/vs/platform/extensionManagement/test/common/extensionEnablementService.test.ts @@ -4,31 +4,34 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import * as sinon from 'sinon'; import * as assert from 'assert'; +import * as sinon from 'sinon'; import { IExtensionManagementService, IExtensionEnablementService, DidUninstallExtensionEvent } from 'vs/platform/extensionManagement/common/extensionManagement'; import { ExtensionEnablementService } from 'vs/platform/extensionManagement/common/extensionEnablementService'; import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock'; import { Emitter } from 'vs/base/common/event'; import { StorageService, InMemoryLocalStorage } from 'vs/platform/storage/common/storageService'; import { IStorageService } from 'vs/platform/storage/common/storage'; -import { IWorkspaceContextService, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { TestWorkspace } from 'vs/platform/workspace/test/common/testWorkspace'; function storageService(instantiationService: TestInstantiationService): IStorageService { let service = instantiationService.get(IStorageService); if (!service) { let workspaceContextService = instantiationService.get(IWorkspaceContextService); if (!workspaceContextService) { - workspaceContextService = instantiationService.stub(IWorkspaceContextService, WorkspaceContextService); - instantiationService.stub(IWorkspaceContextService, 'getWorkspace', TestWorkspace); + workspaceContextService = instantiationService.stub(IWorkspaceContextService, { + hasWorkspace: () => { + return true; + }, + }); } service = instantiationService.stub(IStorageService, instantiationService.createInstance(StorageService, new InMemoryLocalStorage(), new InMemoryLocalStorage())); } return service; } + export class TestExtensionEnablementService extends ExtensionEnablementService { constructor(instantiationService: TestInstantiationService) { super(storageService(instantiationService), instantiationService.get(IWorkspaceContextService), @@ -70,7 +73,7 @@ suite('ExtensionEnablementService Test', () => { test('test when no extensions are disabled for workspace when there is no workspace', (done) => { testObject.setEnablement('pub.a', false, true) .then(() => { - instantiationService.stub(IWorkspaceContextService, 'getWorkspace', null); + instantiationService.stub(IWorkspaceContextService, 'hasWorkspace', false); assert.deepEqual([], testObject.getWorkspaceDisabledExtensions()); }) .then(done, done); @@ -175,7 +178,7 @@ suite('ExtensionEnablementService Test', () => { }); test('test disable an extension for workspace when there is no workspace throws error', (done) => { - instantiationService.stub(IWorkspaceContextService, 'getWorkspace', null); + instantiationService.stub(IWorkspaceContextService, 'hasWorkspace', false); testObject.setEnablement('pub.a', false, true) .then(() => assert.fail('should throw an error'), error => assert.ok(error)) .then(done, done); diff --git a/src/vs/platform/extensions/common/abstractExtensionService.ts b/src/vs/platform/extensions/common/abstractExtensionService.ts index 25ae438be94f1..ed0525f99c000 100644 --- a/src/vs/platform/extensions/common/abstractExtensionService.ts +++ b/src/vs/platform/extensions/common/abstractExtensionService.ts @@ -28,6 +28,8 @@ interface IActivatingExtensionMap { [extensionId: string]: TPromise; } +const NO_OP_VOID_PROMISE = TPromise.as(void 0); + export abstract class AbstractExtensionService implements IExtensionService { public _serviceBrand: any; @@ -38,6 +40,11 @@ export abstract class AbstractExtensionService imp private _isReady: boolean; protected _registry: ExtensionDescriptionRegistry; + /** + * A map of already activated events to speed things up if the same activation event is triggered multiple times. + */ + private _alreadyActivatedEvents: { [activationEvent: string]: boolean; }; + constructor(isReadyByDefault: boolean) { if (isReadyByDefault) { this._isReady = true; @@ -54,6 +61,7 @@ export abstract class AbstractExtensionService imp this._activatingExtensions = {}; this._activatedExtensions = {}; this._registry = new ExtensionDescriptionRegistry(); + this._alreadyActivatedEvents = Object.create(null); } protected _triggerOnReady(): void { @@ -97,6 +105,9 @@ export abstract class AbstractExtensionService imp } public activateByEvent(activationEvent: string): TPromise { + if (this._alreadyActivatedEvents[activationEvent]) { + return NO_OP_VOID_PROMISE; + } if (this._isReady) { return this._activateByEvent(activationEvent); } else { @@ -106,7 +117,9 @@ export abstract class AbstractExtensionService imp private _activateByEvent(activationEvent: string): TPromise { let activateExtensions = this._registry.getExtensionDescriptionsForActivationEvent(activationEvent); - return this._activateExtensions(activateExtensions, 0); + return this._activateExtensions(activateExtensions, 0).then(() => { + this._alreadyActivatedEvents[activationEvent] = true; + }); } public activateById(extensionId: string): TPromise { diff --git a/src/vs/platform/extensions/common/extensions.ts b/src/vs/platform/extensions/common/extensions.ts index 71bcbf6044428..72c1f308b7443 100644 --- a/src/vs/platform/extensions/common/extensions.ts +++ b/src/vs/platform/extensions/common/extensions.ts @@ -32,6 +32,8 @@ export interface IMessage { type: Severity; message: string; source: string; + extensionId: string; + extensionPointId: string; } export interface IExtensionsStatus { diff --git a/src/vs/platform/extensions/common/extensionsRegistry.ts b/src/vs/platform/extensions/common/extensionsRegistry.ts index a3b94131189bd..8541f6b796fa3 100644 --- a/src/vs/platform/extensions/common/extensionsRegistry.ts +++ b/src/vs/platform/extensions/common/extensionsRegistry.ts @@ -10,26 +10,34 @@ import { IJSONSchema } from 'vs/base/common/jsonSchema'; import Severity from 'vs/base/common/severity'; import { IMessage, IExtensionDescription } from 'vs/platform/extensions/common/extensions'; import { Extensions, IJSONContributionRegistry } from 'vs/platform/jsonschemas/common/jsonContributionRegistry'; -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; const hasOwnProperty = Object.hasOwnProperty; const schemaRegistry = Registry.as(Extensions.JSONContribution); export class ExtensionMessageCollector { - private _messageHandler: (msg: IMessage) => void; - private _source: string; + private readonly _messageHandler: (msg: IMessage) => void; + private readonly _extension: IExtensionDescription; + private readonly _extensionPointId: string; - constructor(messageHandler: (msg: IMessage) => void, source: string) { + constructor( + messageHandler: (msg: IMessage) => void, + extension: IExtensionDescription, + extensionPointId: string + ) { this._messageHandler = messageHandler; - this._source = source; + this._extension = extension; + this._extensionPointId = extensionPointId; } private _msg(type: Severity, message: string): void { this._messageHandler({ type: type, message: message, - source: this._source + source: this._extension.extensionFolderPath, + extensionId: this._extension.id, + extensionPointId: this._extensionPointId }); } @@ -139,7 +147,7 @@ const schema: IJSONSchema = { uniqueItems: true, items: { type: 'string', - enum: ['Languages', 'Snippets', 'Linters', 'Themes', 'Debuggers', 'Other', 'Keymaps', 'Formatters', 'Extension Packs'] + enum: ['Languages', 'Snippets', 'Linters', 'Themes', 'Debuggers', 'Other', 'Keymaps', 'Formatters', 'Extension Packs', 'SCM Providers'] } }, galleryBanner: { @@ -174,7 +182,38 @@ const schema: IJSONSchema = { type: 'array', items: { type: 'string', - defaultSnippets: [{ label: 'onLanguage', body: 'onLanguage:${1:languageId}' }, { label: 'onCommand', body: 'onCommand:${2:commandId}' }, { label: 'onDebug', body: 'onDebug:${3:type}' }, { label: 'workspaceContains', body: 'workspaceContains:${4:fileName}' }], + defaultSnippets: [ + { + label: 'onLanguage', + description: nls.localize('vscode.extension.activationEvents.onLanguage', 'An activation event emitted whenever a file that resolves to the specified language gets opened.'), + body: 'onLanguage:${1:languageId}' + }, + { + label: 'onCommand', + description: nls.localize('vscode.extension.activationEvents.onCommand', 'An activation event emitted whenever the specified command gets invoked.'), + body: 'onCommand:${2:commandId}' + }, + { + label: 'onDebug', + description: nls.localize('vscode.extension.activationEvents.onDebug', 'An activation event emitted whenever a debug session of the specified type is started.'), + body: 'onDebug:${3:type}' + }, + { + label: 'workspaceContains', + description: nls.localize('vscode.extension.activationEvents.workspaceContains', 'An activation event emitted whenever a folder is opened that contains at least a file matching the specified glob pattern.'), + body: 'workspaceContains:${4:filePattern}' + }, + { + label: 'onView', + body: 'onView:${5:viewId}', + description: nls.localize('vscode.extension.activationEvents.onView', 'An activation event emitted whenever the specified view is expanded.'), + }, + { + label: '*', + description: nls.localize('vscode.extension.activationEvents.star', 'An activation event emitted on VS Code startup. To ensure a great end user experience, please use this activation event in your extension only when no other activation events combination works in your use-case.'), + body: '*' + } + ], } }, badges: { diff --git a/src/vs/platform/files/common/files.ts b/src/vs/platform/files/common/files.ts index 94d4d0295ddf9..170eca5c10c8d 100644 --- a/src/vs/platform/files/common/files.ts +++ b/src/vs/platform/files/common/files.ts @@ -12,7 +12,7 @@ import events = require('vs/base/common/events'); import { isLinux } from 'vs/base/common/platform'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import Event from 'vs/base/common/event'; -import { equalsIgnoreCase, beginsWithIgnoreCase } from 'vs/base/common/strings'; +import { beginsWithIgnoreCase } from 'vs/base/common/strings'; export const IFileService = createDecorator('fileService'); @@ -43,6 +43,12 @@ export interface IFileService { */ resolveFile(resource: URI, options?: IResolveFileOptions): TPromise; + /** + * Same as resolveFile but supports resolving mulitple resources in parallel. + * If one of the resolve targets fails to resolve returns a fake IFileStat instead of making the whole call fail. + */ + resolveFiles(toResolve: { resource: URI, options?: IResolveFileOptions }[]): TPromise; + /** *Finds out if a file identified by the resource exists. */ @@ -137,7 +143,7 @@ export interface IFileService { /** * Configures the file service with the provided options. */ - updateOptions(options: any): void; + updateOptions(options: object): void; /** * Returns the preferred encoding to use for a given resource. @@ -191,7 +197,7 @@ export enum FileChangeType { export interface IFileChange { /** - * The type of change that occured to the file. + * The type of change that occurred to the file. */ type: FileChangeType; @@ -231,10 +237,10 @@ export class FileChangesEvent extends events.Event { // For deleted also return true when deleted folder is parent of target path if (type === FileChangeType.DELETED) { - return isEqualOrParent(resource.fsPath, change.resource.fsPath, !isLinux /* ignorecase */); + return paths.isEqualOrParent(resource.fsPath, change.resource.fsPath, !isLinux /* ignorecase */); } - return isEqual(resource.fsPath, change.resource.fsPath, !isLinux /* ignorecase */); + return paths.isEqual(resource.fsPath, change.resource.fsPath, !isLinux /* ignorecase */); }); } @@ -291,19 +297,6 @@ export class FileChangesEvent extends events.Event { } } -export function isEqual(pathA: string, pathB: string, ignoreCase?: boolean): boolean { - const identityEquals = (pathA === pathB); - if (!ignoreCase || identityEquals) { - return identityEquals; - } - - if (!pathA || !pathB) { - return false; - } - - return equalsIgnoreCase(pathA, pathB); -} - export function isParent(path: string, candidate: string, ignoreCase?: boolean): boolean { if (!path || !candidate || path === candidate) { return false; @@ -324,43 +317,7 @@ export function isParent(path: string, candidate: string, ignoreCase?: boolean): return path.indexOf(candidate) === 0; } -export function isEqualOrParent(path: string, candidate: string, ignoreCase?: boolean): boolean { - if (path === candidate) { - return true; - } - - if (!path || !candidate) { - return false; - } - if (candidate.length > path.length) { - return false; - } - - if (ignoreCase) { - const beginsWith = beginsWithIgnoreCase(path, candidate); - if (!beginsWith) { - return false; - } - - if (candidate.length === path.length) { - return true; // same path, different casing - } - - let sepOffset = candidate.length; - if (candidate.charAt(candidate.length - 1) === paths.nativeSep) { - sepOffset--; // adjust the expected sep offset in case our candidate already ends in separator character - } - - return path.charAt(sepOffset) === paths.nativeSep; - } - - if (candidate.charAt(candidate.length - 1) !== paths.nativeSep) { - candidate += paths.nativeSep; - } - - return path.indexOf(candidate) === 0; -} export function indexOf(path: string, candidate: string, ignoreCase?: boolean): number { if (candidate.length > path.length) { @@ -433,6 +390,11 @@ export interface IFileStat extends IBaseStat { size?: number; } +export interface IResolveFileResult { + stat: IFileStat; + success: boolean; +} + /** * Content and meta information of a file. */ @@ -540,9 +502,10 @@ export interface IImportResult { isNew: boolean; } -export interface IFileOperationResult { - message: string; - fileOperationResult: FileOperationResult; +export class FileOperationError extends Error { + constructor(message: string, public fileOperationResult: FileOperationResult) { + super(message); + } } export enum FileOperationResult { @@ -587,6 +550,7 @@ export interface IFilesConfiguration { autoSaveDelay: number; eol: string; hotExit: string; + useExperimentalFileWatcher: boolean; }; } diff --git a/src/vs/platform/files/test/files.test.ts b/src/vs/platform/files/test/files.test.ts index 14f4643f74991..305db3647cd83 100644 --- a/src/vs/platform/files/test/files.test.ts +++ b/src/vs/platform/files/test/files.test.ts @@ -7,8 +7,8 @@ import * as assert from 'assert'; import URI from 'vs/base/common/uri'; -import { join } from 'vs/base/common/paths'; -import { FileChangeType, FileChangesEvent, isEqual, isParent, isEqualOrParent, indexOf } from 'vs/platform/files/common/files'; +import { join, isEqual, isEqualOrParent } from 'vs/base/common/paths'; +import { FileChangeType, FileChangesEvent, isParent, indexOf } from 'vs/platform/files/common/files'; import { isLinux, isMacintosh, isWindows } from 'vs/base/common/platform'; suite('Files', () => { diff --git a/src/vs/platform/history/electron-main/historyMainService.ts b/src/vs/platform/history/electron-main/historyMainService.ts new file mode 100644 index 0000000000000..0cd122c6692ae --- /dev/null +++ b/src/vs/platform/history/electron-main/historyMainService.ts @@ -0,0 +1,225 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import * as path from 'path'; +import * as nls from 'vs/nls'; +import * as arrays from 'vs/base/common/arrays'; +import { trim } from 'vs/base/common/strings'; +import { IStorageService } from 'vs/platform/storage/node/storage'; +import { app } from 'electron'; +import { ILogService } from 'vs/platform/log/common/log'; +import { getPathLabel } from 'vs/base/common/labels'; +import { IPath } from 'vs/platform/windows/common/windows'; +import CommonEvent, { Emitter } from 'vs/base/common/event'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; +import { isWindows, isMacintosh, isLinux } from 'vs/base/common/platform'; + +export const IHistoryMainService = createDecorator('historyMainService'); + +export interface IRecentPathsList { + folders: string[]; + files: string[]; +} + +export interface IHistoryMainService { + _serviceBrand: any; + + // events + onRecentPathsChange: CommonEvent; + + // methods + + addToRecentPathsList(paths: { path: string; isFile?: boolean; }[]): void; + getRecentPathsList(workspacePath?: string, filesToOpen?: IPath[]): IRecentPathsList; + removeFromRecentPathsList(path: string): void; + removeFromRecentPathsList(paths: string[]): void; + clearRecentPathsList(): void; + updateWindowsJumpList(): void; +} + +export class HistoryMainService implements IHistoryMainService { + + private static MAX_TOTAL_RECENT_ENTRIES = 100; + + private static recentPathsListStorageKey = 'openedPathsList'; + + _serviceBrand: any; + + private _onRecentPathsChange = new Emitter(); + onRecentPathsChange: CommonEvent = this._onRecentPathsChange.event; + + constructor( + @IStorageService private storageService: IStorageService, + @ILogService private logService: ILogService + ) { + } + + public addToRecentPathsList(paths: { path: string; isFile?: boolean; }[]): void { + if (!paths || !paths.length) { + return; + } + + const mru = this.getRecentPathsList(); + paths.forEach(p => { + const { path, isFile } = p; + + if (isFile) { + mru.files.unshift(path); + mru.files = arrays.distinct(mru.files, (f) => isLinux ? f : f.toLowerCase()); + } else { + mru.folders.unshift(path); + mru.folders = arrays.distinct(mru.folders, (f) => isLinux ? f : f.toLowerCase()); + } + + // Make sure its bounded + mru.folders = mru.folders.slice(0, HistoryMainService.MAX_TOTAL_RECENT_ENTRIES); + mru.files = mru.files.slice(0, HistoryMainService.MAX_TOTAL_RECENT_ENTRIES); + + // Add to recent documents (Windows/macOS only) + if (isMacintosh || isWindows) { + app.addRecentDocument(path); + } + }); + + this.storageService.setItem(HistoryMainService.recentPathsListStorageKey, mru); + this._onRecentPathsChange.fire(); + } + + public removeFromRecentPathsList(path: string): void; + public removeFromRecentPathsList(paths: string[]): void; + public removeFromRecentPathsList(arg1: any): void { + let paths: string[]; + if (Array.isArray(arg1)) { + paths = arg1; + } else { + paths = [arg1]; + } + + const mru = this.getRecentPathsList(); + let update = false; + + paths.forEach(path => { + let index = mru.files.indexOf(path); + if (index >= 0) { + mru.files.splice(index, 1); + update = true; + } + + index = mru.folders.indexOf(path); + if (index >= 0) { + mru.folders.splice(index, 1); + update = true; + } + }); + + if (update) { + this.storageService.setItem(HistoryMainService.recentPathsListStorageKey, mru); + this._onRecentPathsChange.fire(); + } + } + + public clearRecentPathsList(): void { + this.storageService.setItem(HistoryMainService.recentPathsListStorageKey, { folders: [], files: [] }); + app.clearRecentDocuments(); + + // Event + this._onRecentPathsChange.fire(); + } + + public getRecentPathsList(workspacePath?: string, filesToOpen?: IPath[]): IRecentPathsList { + let files: string[]; + let folders: string[]; + + // Get from storage + const storedRecents = this.storageService.getItem(HistoryMainService.recentPathsListStorageKey); + if (storedRecents) { + files = storedRecents.files || []; + folders = storedRecents.folders || []; + } else { + files = []; + folders = []; + } + + // Add currently files to open to the beginning if any + if (filesToOpen) { + files.unshift(...filesToOpen.map(f => f.filePath)); + } + + // Add current workspace path to beginning if set + if (workspacePath) { + folders.unshift(workspacePath); + } + + // Clear those dupes + files = arrays.distinct(files); + folders = arrays.distinct(folders); + + return { files, folders }; + } + + public updateWindowsJumpList(): void { + if (!isWindows) { + return; // only on windows + } + + const jumpList: Electron.JumpListCategory[] = []; + + // Tasks + jumpList.push({ + type: 'tasks', + items: [ + { + type: 'task', + title: nls.localize('newWindow', "New Window"), + description: nls.localize('newWindowDesc', "Opens a new window"), + program: process.execPath, + args: '-n', // force new window + iconPath: process.execPath, + iconIndex: 0 + } + ] + }); + + // Recent Folders + if (this.getRecentPathsList().folders.length > 0) { + + // The user might have meanwhile removed items from the jump list and we have to respect that + // so we need to update our list of recent paths with the choice of the user to not add them again + // Also: Windows will not show our custom category at all if there is any entry which was removed + // by the user! See https://github.com/Microsoft/vscode/issues/15052 + this.removeFromRecentPathsList(app.getJumpListSettings().removedItems.map(r => trim(r.args, '"'))); + + // Add entries + jumpList.push({ + type: 'custom', + name: nls.localize('recentFolders', "Recent Folders"), + items: this.getRecentPathsList().folders.slice(0, 7 /* limit number of entries here */).map(folder => { + return { + type: 'task', + title: path.basename(folder) || folder, // use the base name to show shorter entries in the list + description: nls.localize('folderDesc', "{0} {1}", path.basename(folder), getPathLabel(path.dirname(folder))), + program: process.execPath, + args: `"${folder}"`, // open folder (use quotes to support paths with whitespaces) + iconPath: 'explorer.exe', // simulate folder icon + iconIndex: 0 + }; + }).filter(i => !!i) + }); + } + + // Recent + jumpList.push({ + type: 'recent' // this enables to show files in the "recent" category + }); + + try { + app.setJumpList(jumpList); + } catch (error) { + this.logService.log('#setJumpList', error); // since setJumpList is relatively new API, make sure to guard for errors + } + } +} \ No newline at end of file diff --git a/src/vs/platform/instantiation/test/common/instantiationServiceMock.ts b/src/vs/platform/instantiation/test/common/instantiationServiceMock.ts index c759246ea8f08..68c03f70da497 100644 --- a/src/vs/platform/instantiation/test/common/instantiationServiceMock.ts +++ b/src/vs/platform/instantiation/test/common/instantiationServiceMock.ts @@ -8,7 +8,6 @@ import * as sinon from 'sinon'; import { TPromise } from 'vs/base/common/winjs.base'; import * as types from 'vs/base/common/types'; -import { LinkedMap } from 'vs/base/common/map'; import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; @@ -20,12 +19,12 @@ interface IServiceMock { export class TestInstantiationService extends InstantiationService { - private _servciesMap: LinkedMap, any>; + private _servciesMap: Map, any>; constructor(private _serviceCollection: ServiceCollection = new ServiceCollection()) { super(_serviceCollection); - this._servciesMap = new LinkedMap, any>(); + this._servciesMap = new Map, any>(); } public get(service: ServiceIdentifier): T { diff --git a/src/vs/platform/jsonschemas/common/jsonContributionRegistry.ts b/src/vs/platform/jsonschemas/common/jsonContributionRegistry.ts index 0c68f4cbd2b26..5d4f91c0dff10 100644 --- a/src/vs/platform/jsonschemas/common/jsonContributionRegistry.ts +++ b/src/vs/platform/jsonschemas/common/jsonContributionRegistry.ts @@ -5,7 +5,7 @@ 'use strict'; import { IJSONSchema } from 'vs/base/common/jsonSchema'; -import platform = require('vs/platform/platform'); +import platform = require('vs/platform/registry/common/platform'); import { EventEmitter } from 'vs/base/common/eventEmitter'; import { IDisposable } from 'vs/base/common/lifecycle'; diff --git a/src/vs/platform/keybinding/common/keybindingsRegistry.ts b/src/vs/platform/keybinding/common/keybindingsRegistry.ts index 91440e9307f7b..0ec39c34220c4 100644 --- a/src/vs/platform/keybinding/common/keybindingsRegistry.ts +++ b/src/vs/platform/keybinding/common/keybindingsRegistry.ts @@ -8,7 +8,7 @@ import { SimpleKeybinding, KeyCode, KeybindingType, createKeybinding, Keybinding import { OS, OperatingSystem } from 'vs/base/common/platform'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { CommandsRegistry, ICommandHandler, ICommandHandlerDescription } from 'vs/platform/commands/common/commands'; -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; export interface IKeybindingItem { keybinding: Keybinding; @@ -180,6 +180,8 @@ class KeybindingsRegistryImpl implements IKeybindingsRegistry { || keyCode === KeyCode.US_DOT || keyCode === KeyCode.US_SLASH || keyCode === KeyCode.US_BACKTICK + || keyCode === KeyCode.ABNT_C1 + || keyCode === KeyCode.ABNT_C2 || keyCode === KeyCode.US_OPEN_SQUARE_BRACKET || keyCode === KeyCode.US_BACKSLASH || keyCode === KeyCode.US_CLOSE_SQUARE_BRACKET diff --git a/src/vs/platform/keybinding/common/usLayoutResolvedKeybinding.ts b/src/vs/platform/keybinding/common/usLayoutResolvedKeybinding.ts index 5e204fc8be267..78861625e1a0c 100644 --- a/src/vs/platform/keybinding/common/usLayoutResolvedKeybinding.ts +++ b/src/vs/platform/keybinding/common/usLayoutResolvedKeybinding.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { ResolvedKeybinding, KeyCode, KeyCodeUtils, USER_SETTINGS, Keybinding, KeybindingType, SimpleKeybinding } from 'vs/base/common/keyCodes'; -import { UILabelProvider, AriaLabelProvider, ElectronAcceleratorLabelProvider, UserSettingsLabelProvider, NO_MODIFIERS } from 'vs/platform/keybinding/common/keybindingLabels'; +import { ResolvedKeybinding, ResolvedKeybindingPart, KeyCode, KeyCodeUtils, Keybinding, KeybindingType, SimpleKeybinding } from 'vs/base/common/keyCodes'; +import { UILabelProvider, AriaLabelProvider, ElectronAcceleratorLabelProvider, UserSettingsLabelProvider } from 'vs/base/common/keybindingLabels'; import { OperatingSystem } from 'vs/base/common/platform'; /** @@ -64,12 +64,6 @@ export class USLayoutResolvedKeybinding extends ResolvedKeybinding { return UILabelProvider.toLabel(this._firstPart, firstPart, this._chordPart, chordPart, this._os); } - public getLabelWithoutModifiers(): string { - let firstPart = this._getUILabelForKeybinding(this._firstPart); - let chordPart = this._getUILabelForKeybinding(this._chordPart); - return UILabelProvider.toLabel(NO_MODIFIERS, firstPart, NO_MODIFIERS, chordPart, this._os); - } - private _getAriaLabelForKeybinding(keybinding: SimpleKeybinding): string { if (!keybinding) { return null; @@ -86,12 +80,6 @@ export class USLayoutResolvedKeybinding extends ResolvedKeybinding { return AriaLabelProvider.toLabel(this._firstPart, firstPart, this._chordPart, chordPart, this._os); } - public getAriaLabelWithoutModifiers(): string { - let firstPart = this._getAriaLabelForKeybinding(this._firstPart); - let chordPart = this._getAriaLabelForKeybinding(this._chordPart); - return AriaLabelProvider.toLabel(NO_MODIFIERS, firstPart, NO_MODIFIERS, chordPart, this._os); - } - private _keyCodeToElectronAccelerator(keyCode: KeyCode): string { if (keyCode >= KeyCode.NUMPAD_0 && keyCode <= KeyCode.NUMPAD_DIVIDE) { // Electron cannot handle numpad keys @@ -139,7 +127,7 @@ export class USLayoutResolvedKeybinding extends ResolvedKeybinding { if (keybinding.isDuplicateModifierCase()) { return ''; } - return USER_SETTINGS.fromKeyCode(keybinding.keyCode); + return KeyCodeUtils.toUserSettingsUS(keybinding.keyCode); } public getUserSettingsLabel(): string { @@ -157,36 +145,26 @@ export class USLayoutResolvedKeybinding extends ResolvedKeybinding { return (this._chordPart ? true : false); } - public hasCtrlModifier(): boolean { - if (this._chordPart) { - return false; - } - return this._firstPart.ctrlKey; - } - - public hasShiftModifier(): boolean { - if (this._chordPart) { - return false; - } - return this._firstPart.shiftKey; + public getParts(): [ResolvedKeybindingPart, ResolvedKeybindingPart] { + return [ + this._toResolvedKeybindingPart(this._firstPart), + this._toResolvedKeybindingPart(this._chordPart) + ]; } - public hasAltModifier(): boolean { - if (this._chordPart) { - return false; - } - return this._firstPart.altKey; - } - - public hasMetaModifier(): boolean { - if (this._chordPart) { - return false; + private _toResolvedKeybindingPart(keybinding: SimpleKeybinding): ResolvedKeybindingPart { + if (!keybinding) { + return null; } - return this._firstPart.metaKey; - } - public getParts(): [ResolvedKeybinding, ResolvedKeybinding] { - return [new USLayoutResolvedKeybinding(this._firstPart, this._os), this._chordPart ? new USLayoutResolvedKeybinding(this._chordPart, this._os) : null]; + return new ResolvedKeybindingPart( + keybinding.ctrlKey, + keybinding.shiftKey, + keybinding.altKey, + keybinding.metaKey, + this._getUILabelForKeybinding(keybinding), + this._getAriaLabelForKeybinding(keybinding) + ); } public getDispatchParts(): [string, string] { diff --git a/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts b/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts index 64be8f6ad364f..f5cc9fb798462 100644 --- a/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts +++ b/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts @@ -20,7 +20,13 @@ import { ResolvedKeybindingItem } from 'vs/platform/keybinding/common/resolvedKe import { OS } from 'vs/base/common/platform'; import { IKeyboardEvent } from 'vs/platform/keybinding/common/keybinding'; -const createContext = ctx => ({ getValue: key => ctx[key] }); +function createContext(ctx: any) { + return { + getValue: (key: string) => { + return ctx[key]; + } + }; +} suite('AbstractKeybindingService', () => { diff --git a/src/vs/platform/keybinding/test/common/keybindingLabels.test.ts b/src/vs/platform/keybinding/test/common/keybindingLabels.test.ts index dacc7a9e157b0..19f285354cc75 100644 --- a/src/vs/platform/keybinding/test/common/keybindingLabels.test.ts +++ b/src/vs/platform/keybinding/test/common/keybindingLabels.test.ts @@ -16,25 +16,15 @@ suite('KeybindingLabels', () => { assert.equal(usResolvedKeybinding.getLabel(), expected); } - function assertUSLabelWithoutModifiers(OS: OperatingSystem, keybinding: number, expected: string): void { - const usResolvedKeybinding = new USLayoutResolvedKeybinding(createKeybinding(keybinding, OS), OS); - assert.equal(usResolvedKeybinding.getLabelWithoutModifiers(), expected); - } - test('Windows US label', () => { // no modifier assertUSLabel(OperatingSystem.Windows, KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyCode.KEY_A, 'A'); // one modifier assertUSLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyCode.KEY_A, 'Ctrl+A'); assertUSLabel(OperatingSystem.Windows, KeyMod.Shift | KeyCode.KEY_A, 'Shift+A'); assertUSLabel(OperatingSystem.Windows, KeyMod.Alt | KeyCode.KEY_A, 'Alt+A'); assertUSLabel(OperatingSystem.Windows, KeyMod.WinCtrl | KeyCode.KEY_A, 'Windows+A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.Shift | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.Alt | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); // two modifiers assertUSLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_A, 'Ctrl+Shift+A'); @@ -43,46 +33,29 @@ suite('KeybindingLabels', () => { assertUSLabel(OperatingSystem.Windows, KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, 'Shift+Alt+A'); assertUSLabel(OperatingSystem.Windows, KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, 'Shift+Windows+A'); assertUSLabel(OperatingSystem.Windows, KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Alt+Windows+A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); // three modifiers assertUSLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, 'Ctrl+Shift+Alt+A'); assertUSLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, 'Ctrl+Shift+Windows+A'); assertUSLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Ctrl+Alt+Windows+A'); assertUSLabel(OperatingSystem.Windows, KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Shift+Alt+Windows+A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); // four modifiers assertUSLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Ctrl+Shift+Alt+Windows+A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); // chord assertUSLabel(OperatingSystem.Windows, KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_A, KeyMod.CtrlCmd | KeyCode.KEY_B), 'Ctrl+A Ctrl+B'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_A, KeyMod.CtrlCmd | KeyCode.KEY_B), 'A B'); }); test('Linux US label', () => { // no modifier assertUSLabel(OperatingSystem.Linux, KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyCode.KEY_A, 'A'); // one modifier assertUSLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyCode.KEY_A, 'Ctrl+A'); assertUSLabel(OperatingSystem.Linux, KeyMod.Shift | KeyCode.KEY_A, 'Shift+A'); assertUSLabel(OperatingSystem.Linux, KeyMod.Alt | KeyCode.KEY_A, 'Alt+A'); assertUSLabel(OperatingSystem.Linux, KeyMod.WinCtrl | KeyCode.KEY_A, 'Windows+A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.Shift | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.Alt | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); // two modifiers assertUSLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_A, 'Ctrl+Shift+A'); @@ -91,46 +64,29 @@ suite('KeybindingLabels', () => { assertUSLabel(OperatingSystem.Linux, KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, 'Shift+Alt+A'); assertUSLabel(OperatingSystem.Linux, KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, 'Shift+Windows+A'); assertUSLabel(OperatingSystem.Linux, KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Alt+Windows+A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); // three modifiers assertUSLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, 'Ctrl+Shift+Alt+A'); assertUSLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, 'Ctrl+Shift+Windows+A'); assertUSLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Ctrl+Alt+Windows+A'); assertUSLabel(OperatingSystem.Linux, KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Shift+Alt+Windows+A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); // four modifiers assertUSLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Ctrl+Shift+Alt+Windows+A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); // chord assertUSLabel(OperatingSystem.Linux, KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_A, KeyMod.CtrlCmd | KeyCode.KEY_B), 'Ctrl+A Ctrl+B'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_A, KeyMod.CtrlCmd | KeyCode.KEY_B), 'A B'); }); test('Mac US label', () => { // no modifier assertUSLabel(OperatingSystem.Macintosh, KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyCode.KEY_A, 'A'); // one modifier assertUSLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyCode.KEY_A, '⌘A'); assertUSLabel(OperatingSystem.Macintosh, KeyMod.Shift | KeyCode.KEY_A, '⇧A'); assertUSLabel(OperatingSystem.Macintosh, KeyMod.Alt | KeyCode.KEY_A, '⌥A'); assertUSLabel(OperatingSystem.Macintosh, KeyMod.WinCtrl | KeyCode.KEY_A, '⌃A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.Shift | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.Alt | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); // two modifiers assertUSLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_A, '⇧⌘A'); @@ -139,30 +95,18 @@ suite('KeybindingLabels', () => { assertUSLabel(OperatingSystem.Macintosh, KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, '⇧⌥A'); assertUSLabel(OperatingSystem.Macintosh, KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, '⌃⇧A'); assertUSLabel(OperatingSystem.Macintosh, KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, '⌃⌥A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); // three modifiers assertUSLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, '⇧⌥⌘A'); assertUSLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, '⌃⇧⌘A'); assertUSLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, '⌃⌥⌘A'); assertUSLabel(OperatingSystem.Macintosh, KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, '⌃⇧⌥A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); // four modifiers assertUSLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, '⌃⇧⌥⌘A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); // chord assertUSLabel(OperatingSystem.Macintosh, KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_A, KeyMod.CtrlCmd | KeyCode.KEY_B), '⌘A ⌘B'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_A, KeyMod.CtrlCmd | KeyCode.KEY_B), 'A B'); // special keys assertUSLabel(OperatingSystem.Macintosh, KeyCode.LeftArrow, '←'); @@ -176,17 +120,10 @@ suite('KeybindingLabels', () => { const usResolvedKeybinding = new USLayoutResolvedKeybinding(createKeybinding(keybinding, OS), OS); assert.equal(usResolvedKeybinding.getAriaLabel(), expected); } - function assertAriaLabelWithoutModifiers(OS: OperatingSystem, keybinding: number, expected: string): void { - const usResolvedKeybinding = new USLayoutResolvedKeybinding(createKeybinding(keybinding, OS), OS); - assert.equal(usResolvedKeybinding.getAriaLabelWithoutModifiers(), expected); - } assertAriaLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Control+Shift+Alt+Windows+A'); assertAriaLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Control+Shift+Alt+Windows+A'); assertAriaLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Control+Shift+Alt+Command+A'); - assertAriaLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); - assertAriaLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); - assertAriaLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); }); test('Electron Accelerator label', () => { diff --git a/src/vs/platform/keybinding/test/common/keybindingResolver.test.ts b/src/vs/platform/keybinding/test/common/keybindingResolver.test.ts index 13088ab90c227..dc22f50d3ceb1 100644 --- a/src/vs/platform/keybinding/test/common/keybindingResolver.test.ts +++ b/src/vs/platform/keybinding/test/common/keybindingResolver.test.ts @@ -12,7 +12,13 @@ import { ResolvedKeybindingItem } from 'vs/platform/keybinding/common/resolvedKe import { USLayoutResolvedKeybinding } from 'vs/platform/keybinding/common/usLayoutResolvedKeybinding'; import { OS } from 'vs/base/common/platform'; -const createContext = ctx => ({ getValue: key => ctx[key] }); +function createContext(ctx: any) { + return { + getValue: (key: string) => { + return ctx[key]; + } + }; +} suite('KeybindingResolver', () => { diff --git a/src/vs/platform/keybinding/test/common/mockKeybindingService.ts b/src/vs/platform/keybinding/test/common/mockKeybindingService.ts index 4c4e03c566ca4..a050b92656c95 100644 --- a/src/vs/platform/keybinding/test/common/mockKeybindingService.ts +++ b/src/vs/platform/keybinding/test/common/mockKeybindingService.ts @@ -38,12 +38,17 @@ class MockKeybindingContextKey implements IContextKey { } export class MockContextKeyService implements IContextKeyService { - public _serviceBrand: any; - public dispose(): void { } + public _serviceBrand: any; + private _keys = new Map>(); + public dispose(): void { + // + } public createKey(key: string, defaultValue: T): IContextKey { - return new MockKeybindingContextKey(key, defaultValue); + let ret = new MockKeybindingContextKey(key, defaultValue); + this._keys.set(key, ret); + return ret; } public contextMatchesRules(rules: ContextKeyExpr): boolean { return false; @@ -52,7 +57,9 @@ export class MockContextKeyService implements IContextKeyService { return Event.None; } public getContextKeyValue(key: string) { - return; + if (this._keys.has(key)) { + return this._keys.get(key).get(); + } } public getContext(domNode: HTMLElement): any { return null; diff --git a/src/vs/platform/lifecycle/common/lifecycle.ts b/src/vs/platform/lifecycle/common/lifecycle.ts index d6fdf34ddb569..c3ff228ae9b35 100644 --- a/src/vs/platform/lifecycle/common/lifecycle.ts +++ b/src/vs/platform/lifecycle/common/lifecycle.ts @@ -26,16 +26,28 @@ export interface ShutdownEvent { export enum ShutdownReason { /** Window is closed */ - CLOSE, + CLOSE = 1, /** Application is quit */ - QUIT, + QUIT = 2, /** Window is reloaded */ - RELOAD, + RELOAD = 3, /** Other configuration loaded into window */ - LOAD + LOAD = 4 +} + +export enum StartupKind { + NewWindow = 1, + ReloadedWindow = 3, + ReopenedWindow = 4, +} + +export enum LifecyclePhase { + Starting = 1, + Running = 2, + ShuttingDown = 3 } /** @@ -47,16 +59,25 @@ export interface ILifecycleService { _serviceBrand: any; /** - * A flag indicating if the application is in the process of shutting down. This will be true - * before the onWillShutdown event is fired and false if the shutdown is being vetoed. + * Value indicates how this window got loaded. + */ + readonly startupKind: StartupKind; + + /** + * A flag indicating in what phase of the lifecycle we currently are. + */ + readonly phase: LifecyclePhase; + + /** + * An event that fire when the lifecycle phase has changed */ - willShutdown: boolean; + readonly onDidChangePhase: Event; /** * Fired before shutdown happens. Allows listeners to veto against the * shutdown. */ - onWillShutdown: Event; + readonly onWillShutdown: Event; /** * Fired when no client is preventing the shutdown from happening. Can be used to dispose heavy resources @@ -64,12 +85,14 @@ export interface ILifecycleService { * * The event carries a shutdown reason that indicates how the shutdown was triggered. */ - onShutdown: Event; + readonly onShutdown: Event; } export const NullLifecycleService: ILifecycleService = { _serviceBrand: null, - willShutdown: false, - onWillShutdown: () => ({ dispose() { } }), - onShutdown: (reason) => ({ dispose() { } }) -}; \ No newline at end of file + phase: LifecyclePhase.Running, + startupKind: StartupKind.NewWindow, + onDidChangePhase: Event.None, + onWillShutdown: Event.None, + onShutdown: Event.None +}; diff --git a/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts b/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts new file mode 100644 index 0000000000000..2d088710ba832 --- /dev/null +++ b/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts @@ -0,0 +1,268 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { ipcMain as ipc, app } from 'electron'; +import { TPromise, TValueCallback } from 'vs/base/common/winjs.base'; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { ILogService } from 'vs/platform/log/common/log'; +import { IStorageService } from 'vs/platform/storage/node/storage'; +import Event, { Emitter } from 'vs/base/common/event'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; +import { ICodeWindow } from "vs/platform/windows/electron-main/windows"; +import { ReadyState } from 'vs/platform/windows/common/windows'; + +export const ILifecycleService = createDecorator('lifecycleService'); + +export enum UnloadReason { + CLOSE = 1, + QUIT = 2, + RELOAD = 3, + LOAD = 4 +} + +export interface ILifecycleService { + _serviceBrand: any; + + /** + * Will be true if the program was restarted (e.g. due to explicit request or update). + */ + wasRestarted: boolean; + + /** + * Due to the way we handle lifecycle with eventing, the general app.on('before-quit') + * event cannot be used because it can be called twice on shutdown. Instead the onBeforeQuit + * handler in this module can be used and it is only called once on a shutdown sequence. + */ + onBeforeQuit: Event; + + /** + * We provide our own event when we close a window because the general window.on('close') + * is called even when the window prevents the closing. We want an event that truly fires + * before the window gets closed for real. + */ + onBeforeWindowClose: Event; + + ready(): void; + registerWindow(codeWindow: ICodeWindow): void; + + unload(codeWindow: ICodeWindow, reason: UnloadReason): TPromise; + + relaunch(options?: { addArgs?: string[], removeArgs?: string[] }); + + quit(fromUpdate?: boolean): TPromise; + isQuitRequested(): boolean; + + kill(code?: number); +} + +export class LifecycleService implements ILifecycleService { + + _serviceBrand: any; + + private static QUIT_FROM_RESTART_MARKER = 'quit.from.restart'; // use a marker to find out if the session was restarted + + private windowToCloseRequest: { [windowId: string]: boolean }; + private quitRequested: boolean; + private pendingQuitPromise: TPromise; + private pendingQuitPromiseComplete: TValueCallback; + private oneTimeListenerTokenGenerator: number; + private _wasRestarted: boolean; + + private _onBeforeQuit = new Emitter(); + onBeforeQuit: Event = this._onBeforeQuit.event; + + private _onBeforeWindowClose = new Emitter(); + onBeforeWindowClose: Event = this._onBeforeWindowClose.event; + + constructor( + @IEnvironmentService private environmentService: IEnvironmentService, + @ILogService private logService: ILogService, + @IStorageService private storageService: IStorageService + ) { + this.windowToCloseRequest = Object.create(null); + this.quitRequested = false; + this.oneTimeListenerTokenGenerator = 0; + this._wasRestarted = false; + + this.handleRestarted(); + } + + private handleRestarted(): void { + this._wasRestarted = !!this.storageService.getItem(LifecycleService.QUIT_FROM_RESTART_MARKER); + + if (this._wasRestarted) { + this.storageService.removeItem(LifecycleService.QUIT_FROM_RESTART_MARKER); // remove the marker right after if found + } + } + + public get wasRestarted(): boolean { + return this._wasRestarted; + } + + public ready(): void { + this.registerListeners(); + } + + private registerListeners(): void { + + // before-quit + app.on('before-quit', (e) => { + this.logService.log('Lifecycle#before-quit'); + + if (!this.quitRequested) { + this._onBeforeQuit.fire(); // only send this if this is the first quit request we have + } + + this.quitRequested = true; + }); + + // window-all-closed + app.on('window-all-closed', () => { + this.logService.log('Lifecycle#window-all-closed'); + + // Windows/Linux: we quit when all windows have closed + // Mac: we only quit when quit was requested + // --wait: we quit when all windows are closed + if (this.quitRequested || process.platform !== 'darwin' || this.environmentService.wait) { + app.quit(); + } + }); + } + + public registerWindow(codeWindow: ICodeWindow): void { + + // Window Before Closing: Main -> Renderer + codeWindow.win.on('close', e => { + const windowId = codeWindow.id; + this.logService.log('Lifecycle#window-before-close', windowId); + + // The window already acknowledged to be closed + if (this.windowToCloseRequest[windowId]) { + this.logService.log('Lifecycle#window-close', windowId); + + delete this.windowToCloseRequest[windowId]; + + return; + } + + // Otherwise prevent unload and handle it from window + e.preventDefault(); + this.unload(codeWindow, UnloadReason.CLOSE).done(veto => { + if (!veto) { + this.windowToCloseRequest[windowId] = true; + this._onBeforeWindowClose.fire(codeWindow); + codeWindow.close(); + } else { + this.quitRequested = false; + delete this.windowToCloseRequest[windowId]; + } + }); + }); + } + + public unload(codeWindow: ICodeWindow, reason: UnloadReason): TPromise { + + // Always allow to unload a window that is not yet ready + if (codeWindow.readyState !== ReadyState.READY) { + return TPromise.as(false); + } + + this.logService.log('Lifecycle#unload()', codeWindow.id); + + return new TPromise((c) => { + const oneTimeEventToken = this.oneTimeListenerTokenGenerator++; + const okChannel = `vscode:ok${oneTimeEventToken}`; + const cancelChannel = `vscode:cancel${oneTimeEventToken}`; + + ipc.once(okChannel, () => { + c(false); // no veto + }); + + ipc.once(cancelChannel, () => { + + // Any cancellation also cancels a pending quit if present + if (this.pendingQuitPromiseComplete) { + this.pendingQuitPromiseComplete(true /* veto */); + this.pendingQuitPromiseComplete = null; + this.pendingQuitPromise = null; + } + + c(true); // veto + }); + + codeWindow.send('vscode:beforeUnload', { okChannel, cancelChannel, reason: this.quitRequested ? UnloadReason.QUIT : reason }); + }); + } + + /** + * A promise that completes to indicate if the quit request has been veto'd + * by the user or not. + */ + public quit(fromUpdate?: boolean): TPromise { + this.logService.log('Lifecycle#quit()'); + + if (!this.pendingQuitPromise) { + this.pendingQuitPromise = new TPromise(c => { + + // Store as field to access it from a window cancellation + this.pendingQuitPromiseComplete = c; + + app.once('will-quit', () => { + if (this.pendingQuitPromiseComplete) { + if (fromUpdate) { + this.storageService.setItem(LifecycleService.QUIT_FROM_RESTART_MARKER, true); + } + + this.pendingQuitPromiseComplete(false /* no veto */); + this.pendingQuitPromiseComplete = null; + this.pendingQuitPromise = null; + } + }); + + app.quit(); + }); + } + + return this.pendingQuitPromise; + } + + public kill(code?: number): void { + app.exit(code); + } + + public relaunch(options?: { addArgs?: string[], removeArgs?: string[] }): void { + const args = process.argv.slice(1); + if (options && options.addArgs) { + args.push(...options.addArgs); + } + + if (options && options.removeArgs) { + for (const a of options.removeArgs) { + const idx = args.indexOf(a); + if (idx >= 0) { + args.splice(idx, 1); + } + } + } + + let vetod = false; + app.once('quit', () => { + if (!vetod) { + this.storageService.setItem(LifecycleService.QUIT_FROM_RESTART_MARKER, true); + app.relaunch({ args }); + } + }); + + this.quit().then(veto => { + vetod = veto; + }); + } + + public isQuitRequested(): boolean { + return !!this.quitRequested; + } +} diff --git a/src/vs/code/electron-main/log.ts b/src/vs/platform/log/common/log.ts similarity index 91% rename from src/vs/code/electron-main/log.ts rename to src/vs/platform/log/common/log.ts index caa630d6ad2e5..51427842fea3d 100644 --- a/src/vs/code/electron-main/log.ts +++ b/src/vs/platform/log/common/log.ts @@ -12,17 +12,18 @@ export const ILogService = createDecorator('logService'); export interface ILogService { _serviceBrand: any; + log(...args: any[]): void; } -export class MainLogService implements ILogService { +export class LogMainService implements ILogService { _serviceBrand: any; constructor( @IEnvironmentService private environmentService: IEnvironmentService) { } - log(...args: any[]): void { + public log(...args: any[]): void { if (this.environmentService.verbose) { console.log(`\x1b[93m[main ${new Date().toLocaleTimeString()}]\x1b[0m`, ...args); } diff --git a/src/vs/platform/markers/common/problemMatcher.ts b/src/vs/platform/markers/common/problemMatcher.ts index 063c064e1ad57..71092e34ea518 100644 --- a/src/vs/platform/markers/common/problemMatcher.ts +++ b/src/vs/platform/markers/common/problemMatcher.ts @@ -115,10 +115,12 @@ export interface ProblemMatcher { export interface NamedProblemMatcher extends ProblemMatcher { name: string; + label: string; } export interface NamedMultiLineProblemPattern { name: string; + label: string; patterns: MultiLineProblemPattern; } @@ -126,12 +128,6 @@ export function isNamedProblemMatcher(value: ProblemMatcher): value is NamedProb return value && Types.isString((value).name) ? true : false; } -let valueMap: { [key: string]: string; } = { - E: 'error', - W: 'warning', - I: 'info', -}; - interface Location { startLineNumber: number; startCharacter: number; @@ -192,7 +188,7 @@ export function createLineMatcher(matcher: ProblemMatcher): ILineMatcher { } } -class AbstractLineMatcher implements ILineMatcher { +abstract class AbstractLineMatcher implements ILineMatcher { private matcher: ProblemMatcher; constructor(matcher: ProblemMatcher) { @@ -207,9 +203,7 @@ class AbstractLineMatcher implements ILineMatcher { return null; } - public get matchLength(): number { - throw new Error('Subclass reponsibility'); - } + public abstract get matchLength(): number; protected fillProblemData(data: ProblemData, pattern: ProblemPattern, matches: RegExpExecArray): void { this.fillProperty(data, 'file', pattern, matches, true); @@ -302,11 +296,21 @@ class AbstractLineMatcher implements ILineMatcher { let result: Severity = null; if (data.severity) { let value = data.severity; - if (value && value.length > 0) { - if (value.length === 1 && valueMap[value[0]]) { - value = valueMap[value[0]]; - } + if (value) { result = Severity.fromValue(value); + if (result === Severity.Ignore) { + if (value === 'E') { + result = Severity.Error; + } else if (value === 'W') { + result = Severity.Warning; + } else if (value === 'I') { + result = Severity.Info; + } else if (Strings.equalsIgnoreCase(value, 'hint')) { + result = Severity.Info; + } else if (Strings.equalsIgnoreCase(value, 'note')) { + result = Severity.Info; + } + } } } if (result === null || result === Severity.Ignore) { @@ -425,9 +429,9 @@ export namespace Config { file?: number; /** - * The match group index of the problems's location. Valid location + * The match group index of the problem's location. Valid location * patterns are: (line), (line,column) and (startLine,startColumn,endLine,endColumn). - * If omitted the line and colum properties are used. + * If omitted the line and column properties are used. */ location?: number; @@ -468,7 +472,7 @@ export namespace Config { severity?: number; /** - * The match group index of the problems's code. + * The match group index of the problem's code. * * Defaults to undefined. No code is captured. */ @@ -493,6 +497,11 @@ export namespace Config { * The name of the problem pattern. */ name: string; + + /** + * A human readable label + */ + label?: string; } export namespace NamedProblemPattern { @@ -516,6 +525,11 @@ export namespace Config { */ name: string; + /** + * A human readable label + */ + label?: string; + /** * The actual patterns */ @@ -550,7 +564,7 @@ export namespace Config { /** * A description to track the start and end of a watching task. */ - export interface WatchingMatcher { + export interface BackgroundMonitor { /** * If set to true the watcher is in active mode when the task @@ -646,7 +660,11 @@ export namespace Config { */ watchedTaskEndsRegExp?: string; - watching?: WatchingMatcher; + /** + * @deprecated Use background instead. + */ + watching?: BackgroundMonitor; + background?: BackgroundMonitor; } export type ProblemMatcherType = string | ProblemMatcher | (string | ProblemMatcher)[]; @@ -654,9 +672,14 @@ export namespace Config { export interface NamedProblemMatcher extends ProblemMatcher { /** * An optional name. This name can be used to refer to the - * problem matchter from within a task. + * problem matcher from within a task. */ name?: string; + + /** + * A human readable label. + */ + label?: string; } export function isNamedProblemMatcher(value: ProblemMatcher): value is NamedProblemMatcher { @@ -676,7 +699,7 @@ class ProblemPatternParser extends Parser { public parse(value: Config.NamedMultiLineProblemPattern): NamedMultiLineProblemPattern; public parse(value: Config.ProblemPattern | Config.MultiLineProblemPattern | Config.NamedProblemPattern | Config.NamedMultiLineProblemPattern): any { if (Config.NamedMultiLineProblemPattern.is(value)) { - this.createNamedMultiLineProblemPattern(value); + return this.createNamedMultiLineProblemPattern(value); } else if (Config.MultiLineProblemPattern.is(value)) { return this.createMultiLineProblemPattern(value); } else if (Config.NamedProblemPattern.is(value)) { @@ -698,6 +721,7 @@ class ProblemPatternParser extends Parser { private createNamedMultiLineProblemPattern(value: Config.NamedMultiLineProblemPattern): NamedMultiLineProblemPattern { let result = { name: value.name, + label: value.label ? value.label : value.name, patterns: this.createMultiLineProblemPattern(value.patterns) }; return result.patterns ? result : null; @@ -1223,7 +1247,8 @@ export class ProblemMatcherParser extends Parser { } } if (Config.isNamedProblemMatcher(description)) { - (result).name = description.name; + (result as NamedProblemMatcher).name = description.name; + (result as NamedProblemMatcher).label = Types.isString(description.label) ? description.label : description.name; } return result; } @@ -1262,15 +1287,15 @@ export class ProblemMatcherParser extends Parser { }; return; } - if (Types.isUndefinedOrNull(external.watching)) { + let backgroundMonitor = external.background || external.watching; + if (Types.isUndefinedOrNull(backgroundMonitor)) { return; } - let watching = external.watching; - let begins: WatchingPattern = this.createWatchingPattern(watching.beginsPattern); - let ends: WatchingPattern = this.createWatchingPattern(watching.endsPattern); + let begins: WatchingPattern = this.createWatchingPattern(backgroundMonitor.beginsPattern); + let ends: WatchingPattern = this.createWatchingPattern(backgroundMonitor.endsPattern); if (begins && ends) { internal.watching = { - activeOnStart: Types.isBoolean(watching.activeOnStart) ? watching.activeOnStart : false, + activeOnStart: Types.isBoolean(backgroundMonitor.activeOnStart) ? backgroundMonitor.activeOnStart : false, beginsPattern: begins, endsPattern: ends }; @@ -1323,7 +1348,7 @@ export namespace Schemas { properties: { regexp: { type: 'string', - description: localize('WatchingPatternSchema.regexp', 'The regular expression to detect the begin or end of a watching task.') + description: localize('WatchingPatternSchema.regexp', 'The regular expression to detect the begin or end of a background task.') }, file: { type: 'integer', @@ -1383,9 +1408,40 @@ export namespace Schemas { ], description: localize('ProblemMatcherSchema.fileLocation', 'Defines how file names reported in a problem pattern should be interpreted.') }, + background: { + type: 'object', + additionalProperties: false, + description: localize('ProblemMatcherSchema.background', 'Patterns to track the begin and end of a matcher active on a background task.'), + properties: { + activeOnStart: { + type: 'boolean', + description: localize('ProblemMatcherSchema.background.activeOnStart', 'If set to true the background monitor is in active mode when the task starts. This is equals of issuing a line that matches the beginPattern') + }, + beginsPattern: { + oneOf: [ + { + type: 'string' + }, + Schemas.WatchingPattern + ], + description: localize('ProblemMatcherSchema.background.beginsPattern', 'If matched in the output the start of a background task is signaled.') + }, + endsPattern: { + oneOf: [ + { + type: 'string' + }, + Schemas.WatchingPattern + ], + description: localize('ProblemMatcherSchema.background.endsPattern', 'If matched in the output the end of a background task is signaled.') + } + } + }, watching: { type: 'object', additionalProperties: false, + deprecationMessage: localize('ProblemMatcherSchema.watching.deprecated', 'The watching property is deprecated. Use background instead.'), + description: localize('ProblemMatcherSchema.watching', 'Patterns to track the begin and end of a watching matcher.'), properties: { activeOnStart: { type: 'boolean', @@ -1409,8 +1465,7 @@ export namespace Schemas { ], description: localize('ProblemMatcherSchema.watching.endsPattern', 'If matched in the output the end of a watching task is signaled.') } - }, - description: localize('ProblemMatcherSchema.watching', 'Patterns to track the begin and end of a watching pattern.') + } } } }; @@ -1430,9 +1485,13 @@ export namespace Schemas { export const NamedProblemMatcher: IJSONSchema = Objects.clone(ProblemMatcher); NamedProblemMatcher.properties = Objects.clone(NamedProblemMatcher.properties); - NamedProblemMatcher.properties['name'] = { + NamedProblemMatcher.properties.name = { + type: 'string', + description: localize('NamedProblemMatcherSchema.name', 'The name of the problem matcher used to refer to it.') + }; + NamedProblemMatcher.properties.label = { type: 'string', - description: localize('NamedProblemMatcherSchema.name', 'The name of the problem matcher.') + description: localize('NamedProblemMatcherSchema.label', 'A human readable label of the problem matcher.') }; } @@ -1445,12 +1504,14 @@ let problemMatchersExtPoint = ExtensionsRegistry.registerExtensionPoint; exists(name: string): boolean; - get(name: string): ProblemMatcher; + get(name: string): NamedProblemMatcher; + values(): NamedProblemMatcher[]; + keys(): string[]; } class ProblemMatcherRegistryImpl implements IProblemMatcherRegistry { - private matchers: IStringDictionary; + private matchers: IStringDictionary; private readyPromise: TPromise; constructor() { @@ -1465,7 +1526,7 @@ class ProblemMatcherRegistryImpl implements IProblemMatcherRegistry { for (let matcher of problemMatchers) { let result = parser.parse(matcher); if (result && isNamedProblemMatcher(result)) { - this.add(result.name, result); + this.add(result); } } }); @@ -1484,11 +1545,11 @@ class ProblemMatcherRegistryImpl implements IProblemMatcherRegistry { return this.readyPromise; } - public add(name: string, matcher: ProblemMatcher): void { - this.matchers[name] = matcher; + public add(matcher: NamedProblemMatcher): void { + this.matchers[matcher.name] = matcher; } - public get(name: string): ProblemMatcher { + public get(name: string): NamedProblemMatcher { return this.matchers[name]; } @@ -1500,15 +1561,27 @@ class ProblemMatcherRegistryImpl implements IProblemMatcherRegistry { delete this.matchers[name]; } + public keys(): string[] { + return Object.keys(this.matchers); + } + + public values(): NamedProblemMatcher[] { + return Object.keys(this.matchers).map(key => this.matchers[key]); + } + private fillDefaults(): void { - this.add('msCompile', { + this.add({ + name: 'msCompile', + label: localize('msCompile', 'Microsoft compiler problems'), owner: 'msCompile', applyTo: ApplyToKind.allDocuments, fileLocation: FileLocationKind.Absolute, pattern: ProblemPatternRegistry.get('msCompile') }); - this.add('lessCompile', { + this.add({ + name: 'lessCompile', + label: localize('lessCompile', 'Less problems'), owner: 'lessCompile', applyTo: ApplyToKind.allDocuments, fileLocation: FileLocationKind.Absolute, @@ -1516,7 +1589,9 @@ class ProblemMatcherRegistryImpl implements IProblemMatcherRegistry { severity: Severity.Error }); - this.add('gulp-tsc', { + this.add({ + name: 'gulp-tsc', + label: localize('gulp-tsc', 'Gulp TSC Problems'), owner: 'typescript', applyTo: ApplyToKind.closedDocuments, fileLocation: FileLocationKind.Relative, @@ -1524,21 +1599,27 @@ class ProblemMatcherRegistryImpl implements IProblemMatcherRegistry { pattern: ProblemPatternRegistry.get('gulp-tsc') }); - this.add('jshint', { + this.add({ + name: 'jshint', + label: localize('jshint', 'JSHint problems'), owner: 'jshint', applyTo: ApplyToKind.allDocuments, fileLocation: FileLocationKind.Absolute, pattern: ProblemPatternRegistry.get('jshint') }); - this.add('jshint-stylish', { + this.add({ + name: 'jshint-stylish', + label: localize('jshint-stylish', 'JSHint stylish problems'), owner: 'jshint', applyTo: ApplyToKind.allDocuments, fileLocation: FileLocationKind.Absolute, pattern: ProblemPatternRegistry.get('jshint-stylish') }); - this.add('eslint-compact', { + this.add({ + name: 'eslint-compact', + label: localize('eslint-compact', 'ESLint compact problems'), owner: 'eslint', applyTo: ApplyToKind.allDocuments, fileLocation: FileLocationKind.Relative, @@ -1546,14 +1627,18 @@ class ProblemMatcherRegistryImpl implements IProblemMatcherRegistry { pattern: ProblemPatternRegistry.get('eslint-compact') }); - this.add('eslint-stylish', { + this.add({ + name: 'eslint-stylish', + label: localize('eslint-stylish', 'ESLint stylish problems'), owner: 'eslint', applyTo: ApplyToKind.allDocuments, fileLocation: FileLocationKind.Absolute, pattern: ProblemPatternRegistry.get('eslint-stylish') }); - this.add('go', { + this.add({ + name: 'go', + label: localize('go', 'Go problems'), owner: 'go', applyTo: ApplyToKind.allDocuments, fileLocation: FileLocationKind.Relative, @@ -1563,4 +1648,4 @@ class ProblemMatcherRegistryImpl implements IProblemMatcherRegistry { } } -export const ProblemMatcherRegistry: IProblemMatcherRegistry = new ProblemMatcherRegistryImpl(); \ No newline at end of file +export const ProblemMatcherRegistry: IProblemMatcherRegistry = new ProblemMatcherRegistryImpl(); diff --git a/src/vs/platform/message/common/messageIpc.ts b/src/vs/platform/message/common/messageIpc.ts index a6c009e32ec36..069ca25321df5 100644 --- a/src/vs/platform/message/common/messageIpc.ts +++ b/src/vs/platform/message/common/messageIpc.ts @@ -23,7 +23,7 @@ export class ChoiceChannel implements IChoiceChannel { switch (command) { case 'choose': return this.choiceService.choose(args[0], args[1], args[2], args[3], args[4]); } - return TPromise.wrapError('invalid command'); + return TPromise.wrapError(new Error('invalid command')); } } diff --git a/src/vs/platform/node/product.ts b/src/vs/platform/node/product.ts index 7b30b0bb2f9c7..526314a3e294c 100644 --- a/src/vs/platform/node/product.ts +++ b/src/vs/platform/node/product.ts @@ -27,8 +27,12 @@ export interface IProductConfiguration { extensionTips: { [id: string]: string; }; extensionImportantTips: { [id: string]: { name: string; pattern: string; }; }; extensionKeywords: { [extension: string]: string[]; }; + extensionAllowedBadgeProviders: string[]; keymapExtensionTips: string[]; - crashReporter: Electron.CrashReporterStartOptions; + crashReporter: { + companyName: string; + productName: string; + }; welcomePage: string; enableTelemetry: boolean; aiConfig: { @@ -44,15 +48,31 @@ export interface IProductConfiguration { keyboardShortcutsUrlLinux: string; keyboardShortcutsUrlWin: string; introductoryVideosUrl: string; + tipsAndTricksUrl: string; twitterUrl: string; requestFeatureUrl: string; reportIssueUrl: string; licenseUrl: string; privacyStatementUrl: string; npsSurveyUrl: string; + surveys: ISurveyData[]; checksums: { [path: string]: string; }; checksumFailMoreInfoUrl: string; - extraNodeModules: string[]; + hockeyApp: { + 'win32-ia32': string; + 'win32-x64': string; + 'linux-ia32': string; + 'linux-x64': string; + 'darwin': string; + }; +} + +export interface ISurveyData { + surveyId: string; + surveyUrl: string; + languageId: string; + editCount: number; + userProbability: number; } const rootPath = path.dirname(uri.parse(require.toUrl('')).fsPath); diff --git a/src/vs/platform/quickOpen/common/quickOpen.ts b/src/vs/platform/quickOpen/common/quickOpen.ts index 6cc6781e1909f..2ce7f0a3691d4 100644 --- a/src/vs/platform/quickOpen/common/quickOpen.ts +++ b/src/vs/platform/quickOpen/common/quickOpen.ts @@ -57,6 +57,16 @@ export interface IPickOptions { * an optional flag to not close the picker on focus lost */ ignoreFocusLost?: boolean; + + /** + * enables quick navigate in the picker to open an element without typing + */ + quickNavigateConfiguration?: IQuickNavigateConfiguration; + + /** + * a context key to set when this picker is active + */ + contextKey?: string; } export interface IInputOptions { @@ -96,6 +106,7 @@ export interface IInputOptions { export interface IShowOptions { quickNavigateConfiguration?: IQuickNavigateConfiguration; + inputSelection?: { start: number; end: number; }; } export const IQuickOpenService = createDecorator('quickOpenService'); diff --git a/src/vs/platform/platform.ts b/src/vs/platform/registry/common/platform.ts similarity index 100% rename from src/vs/platform/platform.ts rename to src/vs/platform/registry/common/platform.ts diff --git a/src/vs/platform/test/common/platform.test.ts b/src/vs/platform/registry/test/common/platform.test.ts similarity index 95% rename from src/vs/platform/test/common/platform.test.ts rename to src/vs/platform/registry/test/common/platform.test.ts index 5f9ab7532402a..4a26fd2eb363f 100644 --- a/src/vs/platform/test/common/platform.test.ts +++ b/src/vs/platform/registry/test/common/platform.test.ts @@ -5,7 +5,7 @@ 'use strict'; import assert = require('assert'); -import Platform = require('vs/platform/platform'); +import Platform = require('vs/platform/registry/common/platform'); import Types = require('vs/base/common/types'); suite('Platform / Registry', () => { diff --git a/src/vs/platform/request/node/request.ts b/src/vs/platform/request/node/request.ts index 9d42bbc4c2a14..b8d501fa2b5a7 100644 --- a/src/vs/platform/request/node/request.ts +++ b/src/vs/platform/request/node/request.ts @@ -9,7 +9,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { IRequestOptions, IRequestContext } from 'vs/base/node/request'; import { IConfigurationRegistry, Extensions } from 'vs/platform/configuration/common/configurationRegistry'; -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; export const IRequestService = createDecorator('requestService2'); diff --git a/src/vs/platform/request/node/requestService.ts b/src/vs/platform/request/node/requestService.ts index ac91d258b24d6..23033fbe4f036 100644 --- a/src/vs/platform/request/node/requestService.ts +++ b/src/vs/platform/request/node/requestService.ts @@ -10,7 +10,7 @@ import { assign } from 'vs/base/common/objects'; import { IRequestOptions, IRequestContext, IRequestFunction, request } from 'vs/base/node/request'; import { getProxyAgent } from 'vs/base/node/proxy'; import { IRequestService, IHTTPConfiguration } from 'vs/platform/request/node/request'; -import { IConfigurationService, IConfigurationServiceEvent } from 'vs/platform/configuration/common/configuration'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; /** * This service exposes the `request` API, while using the global @@ -29,11 +29,7 @@ export class RequestService implements IRequestService { @IConfigurationService configurationService: IConfigurationService ) { this.configure(configurationService.getConfiguration()); - configurationService.onDidUpdateConfiguration(this.onDidUpdateConfiguration, this, this.disposables); - } - - private onDidUpdateConfiguration(e: IConfigurationServiceEvent) { - this.configure(e.config); + configurationService.onDidUpdateConfiguration(() => this.configure(configurationService.getConfiguration()), this, this.disposables); } private configure(config: IHTTPConfiguration) { diff --git a/src/vs/platform/search/common/replace.ts b/src/vs/platform/search/common/replace.ts index e57e23c103435..647b5d51a0d11 100644 --- a/src/vs/platform/search/common/replace.ts +++ b/src/vs/platform/search/common/replace.ts @@ -175,7 +175,7 @@ export class ReplacePattern { } if (substrFrom === 0) { - // no replacement occured + // no replacement occurred return; } diff --git a/src/vs/platform/search/common/search.ts b/src/vs/platform/search/common/search.ts index 171c91ffb8ddf..1aa0ca13b5eb2 100644 --- a/src/vs/platform/search/common/search.ts +++ b/src/vs/platform/search/common/search.ts @@ -6,7 +6,8 @@ import { PPromise, TPromise } from 'vs/base/common/winjs.base'; import uri from 'vs/base/common/uri'; -import { mixin } from 'vs/base/common/objects'; +import * as paths from 'vs/base/common/paths'; +import * as objects from 'vs/base/common/objects'; import { IExpression } from 'vs/base/common/glob'; import { IFilesConfiguration } from 'vs/platform/files/common/files'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; @@ -25,16 +26,21 @@ export interface ISearchService { clearCache(cacheKey: string): TPromise; } +export interface IFolderQueryOptions { + folder: uri; + excludePattern?: IExpression; + fileEncoding?: string; +} + export interface IQueryOptions { - folderResources?: uri[]; extraFileResources?: uri[]; filePattern?: string; excludePattern?: IExpression; includePattern?: IExpression; + fileEncoding?: string; maxResults?: number; sortByScore?: boolean; cacheKey?: string; - fileEncoding?: string; useRipgrep?: boolean; disregardIgnoreFiles?: boolean; disregardExcludeSettings?: boolean; @@ -44,6 +50,7 @@ export interface IQueryOptions { export interface ISearchQuery extends IQueryOptions { type: QueryType; contentPattern?: IPatternInfo; + folderQueries?: IFolderQueryOptions[]; } export enum QueryType { @@ -55,6 +62,7 @@ export interface IPatternInfo { pattern: string; isRegExp?: boolean; isWordMatch?: boolean; + wordSeparators?: string; isMultiline?: boolean; isCaseSensitive?: boolean; } @@ -138,6 +146,9 @@ export interface ISearchConfiguration extends IFilesConfiguration { useRipgrep: boolean; useIgnoreFilesByDefault: boolean; }; + editor: { + wordSeparators: string; + }; } export function getExcludes(configuration: ISearchConfiguration): IExpression { @@ -153,8 +164,30 @@ export function getExcludes(configuration: ISearchConfiguration): IExpression { } let allExcludes: IExpression = Object.create(null); - allExcludes = mixin(allExcludes, fileExcludes); - allExcludes = mixin(allExcludes, searchExcludes, true); + allExcludes = objects.mixin(allExcludes, fileExcludes); + allExcludes = objects.mixin(allExcludes, searchExcludes, true); return allExcludes; +} + +export function getMergedExcludes(query: ISearchQuery, absolutePaths?: boolean): IExpression { + const globalExcludePattern: IExpression = query.excludePattern || {}; + + return query.folderQueries + .map(folderQuery => { + const mergedFolderExclude = objects.assign({}, globalExcludePattern, folderQuery.excludePattern || {}); + return absolutePaths ? + makeExcludesAbsolute(mergedFolderExclude, folderQuery.folder) : + mergedFolderExclude; + }); +} + +function makeExcludesAbsolute(excludePattern: IExpression, rootFolder: uri) { + return Object.keys(excludePattern) + .reduce((absolutePattern: IExpression, key: string) => { + const value = excludePattern[key]; + key = paths.join(rootFolder.fsPath, key); + absolutePattern[key] = value; + return absolutePattern; + }, {}); } \ No newline at end of file diff --git a/src/vs/platform/statusbar/common/statusbar.ts b/src/vs/platform/statusbar/common/statusbar.ts index 6e45f806115df..223686a2576eb 100644 --- a/src/vs/platform/statusbar/common/statusbar.ts +++ b/src/vs/platform/statusbar/common/statusbar.ts @@ -7,6 +7,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { IDisposable } from 'vs/base/common/lifecycle'; +import { ThemeColor } from 'vs/platform/theme/common/themeService'; export var IStatusbarService = createDecorator('statusbarService'); @@ -34,7 +35,7 @@ export interface IStatusbarEntry { /** * An optional color to use for the entry */ - color?: string; + color?: string | ThemeColor; /** * An optional id of a command that is known to the workbench to execute on click diff --git a/src/vs/platform/storage/common/storageService.ts b/src/vs/platform/storage/common/storageService.ts index d447bd0d18fd7..61bee17ba7042 100644 --- a/src/vs/platform/storage/common/storageService.ts +++ b/src/vs/platform/storage/common/storageService.ts @@ -8,7 +8,7 @@ import types = require('vs/base/common/types'); import errors = require('vs/base/common/errors'); import strings = require('vs/base/common/strings'); import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; -import { IWorkspaceContextService, IWorkspace } from 'vs/platform/workspace/common/workspace'; +import { IWorkspace } from 'vs/platform/workspace/common/workspace'; // Browser localStorage interface export interface IStorage { @@ -25,8 +25,8 @@ export class StorageService implements IStorageService { public _serviceBrand: any; private static COMMON_PREFIX = 'storage://'; - /*private*/ static GLOBAL_PREFIX = StorageService.COMMON_PREFIX + 'global/'; - private static WORKSPACE_PREFIX = StorageService.COMMON_PREFIX + 'workspace/'; + private static GLOBAL_PREFIX = `${StorageService.COMMON_PREFIX}global/`; + private static WORKSPACE_PREFIX = `${StorageService.COMMON_PREFIX}workspace/`; private static WORKSPACE_IDENTIFIER = 'workspaceIdentifier'; private static NO_WORKSPACE_IDENTIFIER = '__$noWorkspace__'; @@ -38,49 +38,44 @@ export class StorageService implements IStorageService { constructor( globalStorage: IStorage, workspaceStorage: IStorage, - @IWorkspaceContextService contextService: IWorkspaceContextService + workspace?: IWorkspace, + legacyWorkspaceId?: number ) { - const workspace = contextService.getWorkspace(); - this.globalStorage = globalStorage; this.workspaceStorage = workspaceStorage || globalStorage; // Calculate workspace storage key - this.workspaceKey = this.getWorkspaceKey(workspace); + this.workspaceKey = this.getWorkspaceKey(workspace ? workspace.id : void 0); // Make sure to delete all workspace storage if the workspace has been recreated meanwhile - const workspaceUniqueId: number = workspace ? workspace.uid : void 0; - if (types.isNumber(workspaceUniqueId)) { - this.cleanupWorkspaceScope(workspaceUniqueId, workspace.name); + // which is only possible if a id property is provided that we can check on + if (workspace && types.isNumber(legacyWorkspaceId)) { + this.cleanupWorkspaceScope(legacyWorkspaceId); } } - private getWorkspaceKey(workspace?: IWorkspace): string { - let workspaceUri: string = null; - if (workspace && workspace.resource) { - workspaceUri = workspace.resource.toString(); + private getWorkspaceKey(id?: string): string { + if (!id) { + return StorageService.NO_WORKSPACE_IDENTIFIER; } - return workspaceUri ? this.calculateWorkspaceKey(workspaceUri) : StorageService.NO_WORKSPACE_IDENTIFIER; - } - - private calculateWorkspaceKey(workspaceUrl: string): string { - const root = 'file:///'; - const index = workspaceUrl.indexOf(root); - if (index === 0) { - return strings.rtrim(workspaceUrl.substr(root.length), '/') + '/'; + // Special case file:// URIs: strip protocol from key to produce shorter key + const fileProtocol = 'file:///'; + if (id.indexOf(fileProtocol) === 0) { + id = id.substr(fileProtocol.length); } - return workspaceUrl; + // Always end with "/" + return `${strings.rtrim(id, '/')}/`; } - private cleanupWorkspaceScope(workspaceId: number, workspaceName: string): void { + private cleanupWorkspaceScope(workspaceUid: number): void { // Get stored identifier from storage const id = this.getInteger(StorageService.WORKSPACE_IDENTIFIER, StorageScope.WORKSPACE); // If identifier differs, assume the workspace got recreated and thus clean all storage for this workspace - if (types.isNumber(id) && workspaceId !== id) { + if (types.isNumber(id) && workspaceUid !== id) { const keyPrefix = this.toStorageKey('', StorageScope.WORKSPACE); const toDelete: string[] = []; const length = this.workspaceStorage.length; @@ -97,10 +92,6 @@ export class StorageService implements IStorageService { } } - if (toDelete.length > 0) { - console.warn('Clearing previous version of local storage for workspace ', workspaceName); - } - // Run the delete toDelete.forEach((keyToDelete) => { this.workspaceStorage.removeItem(keyToDelete); @@ -108,8 +99,8 @@ export class StorageService implements IStorageService { } // Store workspace identifier now - if (workspaceId !== id) { - this.store(StorageService.WORKSPACE_IDENTIFIER, workspaceId, StorageScope.WORKSPACE); + if (workspaceUid !== id) { + this.store(StorageService.WORKSPACE_IDENTIFIER, workspaceUid, StorageScope.WORKSPACE); } } @@ -199,7 +190,6 @@ export class StorageService implements IStorageService { } } -// In-Memory Local Storage Implementation export class InMemoryLocalStorage implements IStorage { private store: { [key: string]: string; }; diff --git a/src/vs/code/electron-main/storage.ts b/src/vs/platform/storage/node/storage.ts similarity index 94% rename from src/vs/code/electron-main/storage.ts rename to src/vs/platform/storage/node/storage.ts index d3f1351b6cca4..438a7af5b8d01 100644 --- a/src/vs/code/electron-main/storage.ts +++ b/src/vs/platform/storage/node/storage.ts @@ -30,7 +30,7 @@ export class StorageService implements IStorageService { this.dbPath = path.join(environmentService.userDataPath, 'storage.json'); } - getItem(key: string, defaultValue?: T): T { + public getItem(key: string, defaultValue?: T): T { if (!this.database) { this.database = this.load(); } @@ -43,7 +43,7 @@ export class StorageService implements IStorageService { return this.database[key]; } - setItem(key: string, data: any): void { + public setItem(key: string, data: any): void { if (!this.database) { this.database = this.load(); } @@ -59,7 +59,7 @@ export class StorageService implements IStorageService { this.save(); } - removeItem(key: string): void { + public removeItem(key: string): void { if (!this.database) { this.database = this.load(); } diff --git a/src/vs/platform/storage/test/storageService.test.ts b/src/vs/platform/storage/test/common/storageService.test.ts similarity index 86% rename from src/vs/platform/storage/test/storageService.test.ts rename to src/vs/platform/storage/test/common/storageService.test.ts index 2765ef994c130..5eb5b89f1b213 100644 --- a/src/vs/platform/storage/test/storageService.test.ts +++ b/src/vs/platform/storage/test/common/storageService.test.ts @@ -6,25 +6,30 @@ 'use strict'; import * as assert from 'assert'; -import { clone } from 'vs/base/common/objects'; import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock'; import { StorageScope } from 'vs/platform/storage/common/storage'; -import { IWorkspaceContextService, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceContextService, IWorkspace } from 'vs/platform/workspace/common/workspace'; import { StorageService, InMemoryLocalStorage } from 'vs/platform/storage/common/storageService'; import { TestWorkspace } from 'vs/platform/workspace/test/common/testWorkspace'; suite('Workbench StorageSevice', () => { - - let contextService, instantiationService; + let contextService: IWorkspaceContextService; + let instantiationService: TestInstantiationService; setup(() => { instantiationService = new TestInstantiationService(); - contextService = instantiationService.stub(IWorkspaceContextService, WorkspaceContextService); - instantiationService.stub(IWorkspaceContextService, 'getWorkspace', TestWorkspace); + contextService = instantiationService.stub(IWorkspaceContextService, { + hasWorkspace: () => { + return true; + }, + getWorkspace2: () => { + return TestWorkspace; + } + }); }); test('Swap Data with undefined default value', () => { - let s = new StorageService(new InMemoryLocalStorage(), null, contextService); + let s = new StorageService(new InMemoryLocalStorage(), null, contextService.getWorkspace2()); s.swap('Monaco.IDE.Core.Storage.Test.swap', 'foobar', 'barfoo'); assert.strictEqual('foobar', s.get('Monaco.IDE.Core.Storage.Test.swap')); @@ -35,7 +40,7 @@ suite('Workbench StorageSevice', () => { }); test('Remove Data', () => { - let s = new StorageService(new InMemoryLocalStorage(), null, contextService); + let s = new StorageService(new InMemoryLocalStorage(), null, contextService.getWorkspace2()); s.store('Monaco.IDE.Core.Storage.Test.remove', 'foobar'); assert.strictEqual('foobar', s.get('Monaco.IDE.Core.Storage.Test.remove')); @@ -44,7 +49,7 @@ suite('Workbench StorageSevice', () => { }); test('Get Data, Integer, Boolean', () => { - let s = new StorageService(new InMemoryLocalStorage(), null, contextService); + let s = new StorageService(new InMemoryLocalStorage(), null, contextService.getWorkspace2()); assert.strictEqual(s.get('Monaco.IDE.Core.Storage.Test.get', StorageScope.GLOBAL, 'foobar'), 'foobar'); assert.strictEqual(s.get('Monaco.IDE.Core.Storage.Test.get', StorageScope.GLOBAL, ''), ''); @@ -78,14 +83,15 @@ suite('Workbench StorageSevice', () => { test('StorageSevice cleans up when workspace changes', () => { let storageImpl = new InMemoryLocalStorage(); - let s = new StorageService(storageImpl, null, contextService); + let time = new Date().getTime(); + let s = new StorageService(storageImpl, null, contextService.getWorkspace2(), time); s.store('key1', 'foobar'); s.store('key2', 'something'); s.store('wkey1', 'foo', StorageScope.WORKSPACE); s.store('wkey2', 'foo2', StorageScope.WORKSPACE); - s = new StorageService(storageImpl, null, contextService); + s = new StorageService(storageImpl, null, contextService.getWorkspace2(), time); assert.strictEqual(s.get('key1', StorageScope.GLOBAL), 'foobar'); assert.strictEqual(s.get('key1', StorageScope.WORKSPACE, null), null); @@ -94,10 +100,7 @@ suite('Workbench StorageSevice', () => { assert.strictEqual(s.get('wkey1', StorageScope.WORKSPACE), 'foo'); assert.strictEqual(s.get('wkey2', StorageScope.WORKSPACE), 'foo2'); - let ws: any = clone(TestWorkspace); - ws.uid = new Date().getTime() + 100; - instantiationService.stub(IWorkspaceContextService, 'getWorkspace', ws); - s = new StorageService(storageImpl, null, contextService); + s = new StorageService(storageImpl, null, contextService.getWorkspace2(), time + 100); assert.strictEqual(s.get('key1', StorageScope.GLOBAL), 'foobar'); assert.strictEqual(s.get('key1', StorageScope.WORKSPACE, null), null); diff --git a/src/vs/platform/telemetry/common/telemetry.ts b/src/vs/platform/telemetry/common/telemetry.ts index c3f6d2f3650f1..2d57d2895343e 100644 --- a/src/vs/platform/telemetry/common/telemetry.ts +++ b/src/vs/platform/telemetry/common/telemetry.ts @@ -22,10 +22,7 @@ export interface ITelemetryData { } export interface ITelemetryExperiments { - showNewUserWatermark: boolean; - openUntitledFile: boolean; - enableWelcomePage: boolean; - reorderQuickLinks: boolean; + mergeQuickLinks: boolean; } export interface ITelemetryService { diff --git a/src/vs/platform/telemetry/common/telemetryService.ts b/src/vs/platform/telemetry/common/telemetryService.ts index aa7e3f4a75458..edd480496c6c1 100644 --- a/src/vs/platform/telemetry/common/telemetryService.ts +++ b/src/vs/platform/telemetry/common/telemetryService.ts @@ -15,7 +15,7 @@ import { IConfigurationRegistry, Extensions } from 'vs/platform/configuration/co import { TPromise } from 'vs/base/common/winjs.base'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { cloneAndChange, mixin } from 'vs/base/common/objects'; -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; export interface ITelemetryServiceConfig { appender: ITelemetryAppender; diff --git a/src/vs/platform/telemetry/common/telemetryUtils.ts b/src/vs/platform/telemetry/common/telemetryUtils.ts index 5641a34c4f8bc..6ac90a73e4161 100644 --- a/src/vs/platform/telemetry/common/telemetryUtils.ts +++ b/src/vs/platform/telemetry/common/telemetryUtils.ts @@ -13,17 +13,11 @@ import { ConfigurationSource, IConfigurationService } from 'vs/platform/configur import { IKeybindingService, KeybindingSource } from 'vs/platform/keybinding/common/keybinding'; import { ILifecycleService, ShutdownReason } from 'vs/platform/lifecycle/common/lifecycle'; import { IStorageService } from 'vs/platform/storage/common/storage'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { ITelemetryService, ITelemetryExperiments, ITelemetryInfo, ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; -import { StorageService } from 'vs/platform/storage/common/storageService'; -import * as objects from 'vs/base/common/objects'; export const defaultExperiments: ITelemetryExperiments = { - showNewUserWatermark: false, - openUntitledFile: true, - enableWelcomePage: true, - reorderQuickLinks: false, + mergeQuickLinks: false, }; export const NullTelemetryService = { @@ -46,43 +40,17 @@ export const NullTelemetryService = { }; export function loadExperiments(accessor: ServicesAccessor): ITelemetryExperiments { - const contextService = accessor.get(IWorkspaceContextService); - const storageService = accessor.get(IStorageService); + // const storageService = accessor.get(IStorageService); const configurationService = accessor.get(IConfigurationService); - updateExperimentsOverrides(configurationService); - configurationService.onDidUpdateConfiguration(e => updateExperimentsOverrides(configurationService)); + // let { + // } = splitExperimentsRandomness(storageService); - let { - showNewUserWatermark, - openUntitledFile, - enableWelcomePage, - reorderQuickLinks, - } = splitExperimentsRandomness(); - - const newUserDuration = 24 * 60 * 60 * 1000; - const firstSessionDate = storageService.get('telemetry.firstSessionDate'); - const isNewUser = !firstSessionDate || Date.now() - Date.parse(firstSessionDate) < newUserDuration; - if (!isNewUser || contextService.hasWorkspace()) { - showNewUserWatermark = defaultExperiments.showNewUserWatermark; - openUntitledFile = defaultExperiments.openUntitledFile; - } - - return applyOverrides({ - showNewUserWatermark, - openUntitledFile, - enableWelcomePage, - reorderQuickLinks, - }); + return applyOverrides(defaultExperiments, configurationService); } -export function isWelcomePageEnabled() { - const overrides = getExperimentsOverrides(); - return 'enableWelcomePage' in overrides ? overrides.enableWelcomePage : splitExperimentsRandomness().enableWelcomePage; -} - -function applyOverrides(experiments: ITelemetryExperiments): ITelemetryExperiments { - const experimentsConfig = getExperimentsOverrides(); +function applyOverrides(experiments: ITelemetryExperiments, configurationService: IConfigurationService): ITelemetryExperiments { + const experimentsConfig = getExperimentsOverrides(configurationService); Object.keys(experiments).forEach(key => { if (key in experimentsConfig) { experiments[key] = experimentsConfig[key]; @@ -91,26 +59,25 @@ function applyOverrides(experiments: ITelemetryExperiments): ITelemetryExperimen return experiments; } -function splitExperimentsRandomness(): ITelemetryExperiments { - const random1 = getExperimentsRandomness(); - const [random2, showNewUserWatermark] = splitRandom(random1); - const [random3, openUntitledFile] = splitRandom(random2); - const [random4, reorderQuickLinks] = splitRandom(random3); - const [, enableWelcomePage] = splitRandom(random4); +// tslint:disable-next-line:no-unused-variable +function splitExperimentsRandomness(storageService: IStorageService): ITelemetryExperiments { + const random1 = getExperimentsRandomness(storageService); + const [random2, /* showTaskDocumentation */] = splitRandom(random1); + const [random3, /* openUntitledFile */] = splitRandom(random2); + const [random4, mergeQuickLinks] = splitRandom(random3); + // tslint:disable-next-line:no-unused-variable (https://github.com/Microsoft/TypeScript/issues/16628) + const [random5, /* enableWelcomePage */] = splitRandom(random4); return { - showNewUserWatermark, - openUntitledFile, - enableWelcomePage, - reorderQuickLinks, + mergeQuickLinks, }; } -function getExperimentsRandomness() { - const key = StorageService.GLOBAL_PREFIX + 'experiments.randomness'; - let valueString = window.localStorage.getItem(key); +function getExperimentsRandomness(storageService: IStorageService) { + const key = 'experiments.randomness'; + let valueString = storageService.get(key); if (!valueString) { valueString = Math.random().toString(); - window.localStorage.setItem(key, valueString); + storageService.store(key, valueString); } return parseFloat(valueString); @@ -122,20 +89,9 @@ function splitRandom(random: number): [number, boolean] { return [scaled - i, i === 1]; } -const experimentsOverridesKey = StorageService.GLOBAL_PREFIX + 'experiments.overrides'; - -function getExperimentsOverrides(): ITelemetryExperiments { - const valueString = window.localStorage.getItem(experimentsOverridesKey); - return valueString ? JSON.parse(valueString) : {}; -} - -function updateExperimentsOverrides(configurationService: IConfigurationService) { - const storageOverrides = getExperimentsOverrides(); +function getExperimentsOverrides(configurationService: IConfigurationService): ITelemetryExperiments { const config: any = configurationService.getConfiguration('telemetry'); - const configOverrides = config && config.experiments || {}; - if (!objects.equals(storageOverrides, configOverrides)) { - window.localStorage.setItem(experimentsOverridesKey, JSON.stringify(configOverrides)); - } + return config && config.experiments || {}; } export interface ITelemetryAppender { @@ -190,82 +146,100 @@ export function telemetryURIDescriptor(uri: URI): URIDescriptor { * Only add settings that cannot contain any personal/private information of users (PII). */ const configurationValueWhitelist = [ - 'window.zoomLevel', - 'editor.fontSize', + 'editor.tabCompletion', 'editor.fontFamily', + 'editor.fontWeight', + 'editor.fontSize', + 'editor.lineHeight', + 'editor.letterSpacing', + 'editor.lineNumbers', + 'editor.rulers', + 'editor.wordSeparators', 'editor.tabSize', + 'editor.insertSpaces', + 'editor.detectIndentation', + 'editor.roundedSelection', + 'editor.scrollBeyondLastLine', + 'editor.minimap.enabled', + 'editor.minimap.renderCharacters', + 'editor.minimap.maxColumn', + 'editor.find.seedSearchStringFromSelection', + 'editor.find.autoFindInSelection', + 'editor.wordWrap', + 'editor.wordWrapColumn', + 'editor.wrappingIndent', + 'editor.mouseWheelScrollSensitivity', + 'editor.multiCursorModifier', + 'editor.quickSuggestions', + 'editor.quickSuggestionsDelay', + 'editor.parameterHints', + 'editor.autoClosingBrackets', + 'editor.autoIndent', + 'editor.formatOnType', + 'editor.formatOnPaste', + 'editor.suggestOnTriggerCharacters', + 'editor.acceptSuggestionOnEnter', + 'editor.acceptSuggestionOnCommitCharacter', + 'editor.snippetSuggestions', + 'editor.emptySelectionClipboard', + 'editor.wordBasedSuggestions', + 'editor.suggestFontSize', + 'editor.suggestLineHeight', + 'editor.selectionHighlight', + 'editor.occurrencesHighlight', + 'editor.overviewRulerLanes', + 'editor.overviewRulerBorder', + 'editor.cursorBlinking', + 'editor.cursorStyle', + 'editor.mouseWheelZoom', + 'editor.fontLigatures', + 'editor.hideCursorInOverviewRuler', + 'editor.renderWhitespace', + 'editor.renderControlCharacters', + 'editor.renderIndentGuides', + 'editor.renderLineHighlight', + 'editor.codeLens', + 'editor.folding', + 'editor.showFoldingControls', + 'editor.matchBrackets', + 'editor.glyphMargin', + 'editor.useTabStops', + 'editor.trimAutoWhitespace', + 'editor.stablePeek', + 'editor.dragAndDrop', + 'editor.formatOnSave', + + 'window.zoomLevel', 'files.autoSave', 'files.hotExit', 'typescript.check.tscVersion', - 'editor.renderWhitespace', - 'editor.cursorBlinking', - 'editor.cursorStyle', 'files.associations', 'workbench.statusBar.visible', - 'editor.wordWrap', - 'editor.wordWrapColumn', - 'editor.insertSpaces', - 'editor.renderIndentGuides', 'files.trimTrailingWhitespace', 'git.confirmSync', - 'editor.rulers', 'workbench.sideBar.location', - 'editor.fontLigatures', - 'editor.wordWrap', - 'editor.lineHeight', - 'editor.detectIndentation', - 'editor.formatOnType', - 'editor.formatOnSave', - 'editor.formatOnPaste', - 'editor.dragAndDrop', 'window.openFilesInNewWindow', 'javascript.validate.enable', - 'editor.mouseWheelZoom', - 'editor.fontWeight', - 'editor.scrollBeyondLastLine', - 'editor.lineNumbers', - 'editor.wrappingIndent', - 'editor.renderControlCharacters', - 'editor.autoClosingBrackets', 'window.reopenFolders', + 'window.restoreWindows', 'extensions.autoUpdate', - 'editor.tabCompletion', 'files.eol', 'explorer.openEditors.visible', 'workbench.editor.enablePreview', 'files.autoSaveDelay', - 'editor.roundedSelection', - 'editor.quickSuggestions', - 'editor.acceptSuggestionOnEnter', - 'editor.acceptSuggestionOnCommitCharacter', 'workbench.editor.showTabs', 'files.encoding', 'files.autoGuessEncoding', - 'editor.quickSuggestionsDelay', - 'editor.snippetSuggestions', - 'editor.selectionHighlight', - 'editor.occurrencesHighlight', - 'editor.glyphMargin', - 'editor.wordSeparators', - 'editor.mouseWheelScrollSensitivity', - 'editor.suggestOnTriggerCharacters', 'git.enabled', 'http.proxyStrictSSL', 'terminal.integrated.fontFamily', - 'editor.overviewRulerLanes', - 'editor.overviewRulerBorder', - 'editor.wordBasedSuggestions', - 'editor.hideCursorInOverviewRuler', - 'editor.trimAutoWhitespace', - 'editor.folding', - 'editor.matchBrackets', 'workbench.editor.enablePreviewFromQuickOpen', 'workbench.editor.swipeToNavigate', 'php.builtInCompletions.enable', 'php.validate.enable', 'php.validate.run', - 'editor.parameterHints', 'workbench.welcome.enabled', + 'workbench.startupEditor', ]; export function configurationTelemetry(telemetryService: ITelemetryService, configurationService: IConfigurationService): IDisposable { diff --git a/src/vs/platform/telemetry/node/commonProperties.ts b/src/vs/platform/telemetry/node/commonProperties.ts index 6011ea38641ef..5e6611497c30c 100644 --- a/src/vs/platform/telemetry/node/commonProperties.ts +++ b/src/vs/platform/telemetry/node/commonProperties.ts @@ -19,6 +19,8 @@ export function resolveCommonProperties(commit: string, version: string): TPromi result['version'] = version; result['common.osVersion'] = os.release(); result['common.platform'] = Platform.Platform[Platform.platform]; + result['common.nodePlatform'] = process.platform; + result['common.nodeArch'] = process.arch; // dynamic properties which value differs on each call let seq = 0; diff --git a/src/vs/platform/telemetry/node/workbenchCommonProperties.ts b/src/vs/platform/telemetry/node/workbenchCommonProperties.ts index 95f3e801d3529..570bac18d00b1 100644 --- a/src/vs/platform/telemetry/node/workbenchCommonProperties.ts +++ b/src/vs/platform/telemetry/node/workbenchCommonProperties.ts @@ -9,7 +9,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import * as errors from 'vs/base/common/errors'; import * as uuid from 'vs/base/common/uuid'; import { IStorageService } from 'vs/platform/storage/common/storage'; -import { getMachineId, virtualMachineHint } from 'vs/base/node/id'; +import { getMachineId } from 'vs/base/node/id'; import { resolveCommonProperties, machineIdStorageKey } from '../node/commonProperties'; const SQM_KEY: string = '\\Software\\Microsoft\\SQMClient'; @@ -19,7 +19,6 @@ export function resolveWorkbenchCommonProperties(storageService: IStorageService result['common.version.shell'] = process.versions && (process).versions['electron']; result['common.version.renderer'] = process.versions && (process).versions['chrome']; result['common.osVersion'] = os.release(); - result['common.virtualMachineHint'] = virtualMachineHint.value().toString(); const lastSessionDate = storageService.get('telemetry.lastSessionDate'); const firstSessionDate = storageService.get('telemetry.firstSessionDate') || new Date().toUTCString(); diff --git a/src/vs/platform/telemetry/test/electron-browser/commonProperties.test.ts b/src/vs/platform/telemetry/test/electron-browser/commonProperties.test.ts index 2525949ec9710..a504489d833b8 100644 --- a/src/vs/platform/telemetry/test/electron-browser/commonProperties.test.ts +++ b/src/vs/platform/telemetry/test/electron-browser/commonProperties.test.ts @@ -6,9 +6,7 @@ import * as assert from 'assert'; import { TPromise } from 'vs/base/common/winjs.base'; -import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock'; import { resolveWorkbenchCommonProperties } from 'vs/platform/telemetry/node/workbenchCommonProperties'; -import { IWorkspaceContextService, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { StorageService, InMemoryLocalStorage } from 'vs/platform/storage/common/storageService'; import { TestWorkspace } from 'vs/platform/workspace/test/common/testWorkspace'; @@ -19,10 +17,7 @@ suite('Telemetry - common properties', function () { let storageService; setup(() => { - let instantiationService = new TestInstantiationService(); - let contextService = instantiationService.stub(IWorkspaceContextService, WorkspaceContextService); - instantiationService.stub(IWorkspaceContextService, 'getWorkspace', TestWorkspace); - storageService = new StorageService(new InMemoryLocalStorage(), null, contextService); + storageService = new StorageService(new InMemoryLocalStorage(), null, TestWorkspace); }); test('default', function () { @@ -33,6 +28,8 @@ suite('Telemetry - common properties', function () { assert.ok('sessionID' in props); assert.ok('timestamp' in props); assert.ok('common.platform' in props); + assert.ok('common.nodePlatform' in props); + assert.ok('common.nodeArch' in props); assert.ok('common.timesincesessionstart' in props); assert.ok('common.sequence' in props); @@ -53,7 +50,6 @@ suite('Telemetry - common properties', function () { assert.ok('common.sqm.machineid' in props, 'machineid'); } - assert.equal(Object.keys(props).length, process.platform === 'win32' ? 18 : 16); }); }); diff --git a/src/vs/platform/telemetry/test/electron-browser/telemetryService.test.ts b/src/vs/platform/telemetry/test/electron-browser/telemetryService.test.ts index 0f6157ba5e6c0..d435adbd74dcb 100644 --- a/src/vs/platform/telemetry/test/electron-browser/telemetryService.test.ts +++ b/src/vs/platform/telemetry/test/electron-browser/telemetryService.test.ts @@ -243,7 +243,7 @@ suite('TelemetryService', () => { // let testAppender = new TestTelemetryAppender(); // service.addTelemetryAppender(testAppender); // - // winjs.Promise.wrapError('This should not get logged'); + // winjs.Promise.wrapError(new Error('This should not get logged')); // winjs.TPromise.as(true).then(() => { // throw new Error('This should get logged'); // }); @@ -263,7 +263,8 @@ suite('TelemetryService', () => { // })); test('Handle global errors', sinon.test(function () { - let errorStub = this.stub(window, 'onerror'); + let errorStub = sinon.stub(); + window.onerror = errorStub; let testAppender = new TestTelemetryAppender(); let service = new TelemetryService({ appender: testAppender }, undefined); @@ -289,7 +290,8 @@ suite('TelemetryService', () => { })); test('Uncaught Error Telemetry removes PII from filename', sinon.test(function () { - let errorStub = this.stub(window, 'onerror'); + let errorStub = sinon.stub(); + window.onerror = errorStub; let settings = new ErrorTestingSettings(); let testAppender = new TestTelemetryAppender(); let service = new TelemetryService({ appender: testAppender }, undefined); @@ -347,7 +349,8 @@ suite('TelemetryService', () => { })); test('Uncaught Error Telemetry removes PII', sinon.test(function () { - let errorStub = this.stub(window, 'onerror'); + let errorStub = sinon.stub(); + window.onerror = errorStub; let settings = new ErrorTestingSettings(); let testAppender = new TestTelemetryAppender(); let service = new TelemetryService({ appender: testAppender }, undefined); @@ -407,7 +410,8 @@ suite('TelemetryService', () => { })); test('Uncaught Error Telemetry removes PII but preserves Code file path', sinon.test(function () { - let errorStub = this.stub(window, 'onerror'); + let errorStub = sinon.stub(); + window.onerror = errorStub; let settings = new ErrorTestingSettings(); let testAppender = new TestTelemetryAppender(); let service = new TelemetryService({ appender: testAppender }, undefined); @@ -469,7 +473,8 @@ suite('TelemetryService', () => { })); test('Uncaught Error Telemetry removes PII but preserves Code file path when PIIPath is configured', sinon.test(function () { - let errorStub = this.stub(window, 'onerror'); + let errorStub = sinon.stub(); + window.onerror = errorStub; let settings = new ErrorTestingSettings(); let testAppender = new TestTelemetryAppender(); let service = new TelemetryService({ appender: testAppender, piiPaths: [settings.personalInfo + '/resources/app/'] }, undefined); @@ -531,7 +536,8 @@ suite('TelemetryService', () => { })); test('Uncaught Error Telemetry removes PII but preserves Missing Model error message', sinon.test(function () { - let errorStub = this.stub(window, 'onerror'); + let errorStub = sinon.stub(); + window.onerror = errorStub; let settings = new ErrorTestingSettings(); let testAppender = new TestTelemetryAppender(); let service = new TelemetryService({ appender: testAppender }, undefined); @@ -598,7 +604,8 @@ suite('TelemetryService', () => { Errors.setUnexpectedErrorHandler(() => { }); try { - let errorStub = this.stub(window, 'onerror'); + let errorStub = sinon.stub(); + window.onerror = errorStub; let settings = new ErrorTestingSettings(); let testAppender = new TestTelemetryAppender(); let service = new TelemetryService({ appender: testAppender }, undefined); @@ -674,6 +681,9 @@ suite('TelemetryService', () => { enableTelemetry }; }, + getConfigurationData(): any { + return null; + }, reloadConfiguration() { return TPromise.as(this.getConfiguration()); }, @@ -681,10 +691,13 @@ suite('TelemetryService', () => { return { value: getConfigurationValue(this.getConfiguration(), key), default: getConfigurationValue(this.getConfiguration(), key), - user: getConfigurationValue(this.getConfiguration(), key) + user: getConfigurationValue(this.getConfiguration(), key), + workspace: null, + folder: null }; }, - keys() { return { default: [], user: [] }; }, + keys() { return { default: [], user: [], workspace: [] }; }, + values() { return {}; }, onDidUpdateConfiguration: emitter.event }); diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 1e059b278facc..7efeec4794ea6 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import platform = require('vs/platform/platform'); +import platform = require('vs/platform/registry/common/platform'); import { IJSONSchema } from 'vs/base/common/jsonSchema'; import { Color, RGBA } from 'vs/base/common/color'; import { ITheme } from 'vs/platform/theme/common/themeService'; @@ -105,7 +105,16 @@ class ColorRegistry implements IColorRegistry { } public toString() { - return Object.keys(this.colorsById).sort().map(k => `- \`${k}\`: ${this.colorsById[k].description}`).join('\n'); + let sorter = (a: string, b: string) => { + let cat1 = a.indexOf('.') === -1 ? 0 : 1; + let cat2 = b.indexOf('.') === -1 ? 0 : 1; + if (cat1 !== cat2) { + return cat1 - cat2; + } + return a.localeCompare(b); + }; + + return Object.keys(this.colorsById).sort(sorter).map(k => `- \`${k}\`: ${this.colorsById[k].description}`).join('\n'); } } @@ -120,88 +129,155 @@ export function registerColor(id: string, defaults: ColorDefaults, description: // ----- base colors export const foreground = registerColor('foreground', { dark: '#CCCCCC', light: '#6C6C6C', hc: '#FFFFFF' }, nls.localize('foreground', "Overall foreground color. This color is only used if not overridden by a component.")); -export const focusBorder = registerColor('focusBorder', { dark: Color.fromRGBA(new RGBA(14, 99, 156)).transparent(0.6), light: Color.fromRGBA(new RGBA(0, 122, 204)).transparent(0.4), hc: '#F38518' }, nls.localize('focusBorder', "Overall border color for focused elements. This color is only used if not overridden by a component.")); +export const errorForeground = registerColor('errorForeground', { dark: '#F48771', light: '#A1260D', hc: '#F48771' }, nls.localize('errorForeground', "Overall foreground color for error messages. This color is only used if not overridden by a component.")); +export const descriptionForeground = registerColor('descriptionForeground', { light: transparent(foreground, 0.7), dark: transparent(foreground, 0.7), hc: transparent(foreground, 0.7) }, nls.localize('descriptionForeground', "Foreground color for description text providing additional information, for example for a label.")); + +export const focusBorder = registerColor('focusBorder', { dark: Color.fromHex('#0E639C').transparent(0.6), light: Color.fromHex('#007ACC').transparent(0.4), hc: '#F38518' }, nls.localize('focusBorder', "Overall border color for focused elements. This color is only used if not overridden by a component.")); export const contrastBorder = registerColor('contrastBorder', { light: null, dark: null, hc: '#6FC3DF' }, nls.localize('contrastBorder', "An extra border around elements to separate them from others for greater contrast.")); -export const activeContrastBorder = registerColor('activeContrastBorder', { light: null, dark: null, hc: focusBorder }, nls.localize('activeContrastBorder', "An extra border around active elements to separate them from others for greater contrast.")); +export const activeContrastBorder = registerColor('contrastActiveBorder', { light: null, dark: null, hc: focusBorder }, nls.localize('activeContrastBorder', "An extra border around active elements to separate them from others for greater contrast.")); + +export const selectionBackground = registerColor('selection.background', { light: null, dark: null, hc: null }, nls.localize('selectionBackground', "The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.")); + +// ------ text colors + +export const textSeparatorForeground = registerColor('textSeparator.foreground', { light: '#0000002e', dark: '#ffffff2e', hc: Color.black }, nls.localize('textSeparatorForeground', "Color for text separators.")); +export const textLinkForeground = registerColor('textLink.foreground', { light: '#4080D0', dark: '#4080D0', hc: '#4080D0' }, nls.localize('textLinkForeground', "Foreground color for links in text.")); +export const textLinkActiveForeground = registerColor('textLink.activeForeground', { light: '#4080D0', dark: '#4080D0', hc: '#4080D0' }, nls.localize('textLinkActiveForeground', "Foreground color for active links in text.")); +export const textPreformatForeground = registerColor('textPreformat.foreground', { light: '#A31515', dark: '#D7BA7D', hc: '#D7BA7D' }, nls.localize('textPreformatForeground', "Foreground color for preformatted text segments.")); +export const textBlockQuoteBackground = registerColor('textBlockQuote.background', { light: '#7f7f7f1a', dark: '#7f7f7f1a', hc: null }, nls.localize('textBlockQuoteBackground', "Background color for block quotes in text.")); +export const textBlockQuoteBorder = registerColor('textBlockQuote.border', { light: '#007acc80', dark: '#007acc80', hc: Color.white }, nls.localize('textBlockQuoteBorder', "Border color for block quotes in text.")); +export const textCodeBlockBackground = registerColor('textCodeBlock.background', { light: '#dcdcdc66', dark: '#0a0a0a66', hc: Color.black }, nls.localize('textCodeBlockBackground', "Background color for code blocks in text.")); // ----- widgets -export const widgetShadow = registerColor('widgetShadow', { dark: '#000000', light: '#A8A8A8', hc: null }, nls.localize('widgetShadow', 'Shadow color of widgets such as find/replace inside the editor.')); - -export const inputBackground = registerColor('inputBoxBackground', { dark: '#3C3C3C', light: Color.white, hc: Color.black }, nls.localize('inputBoxBackground', "Input box background.")); -export const inputForeground = registerColor('inputBoxForeground', { dark: foreground, light: foreground, hc: foreground }, nls.localize('inputBoxForeground', "Input box foreground.")); -export const inputBorder = registerColor('inputBoxBorder', { dark: null, light: null, hc: contrastBorder }, nls.localize('inputBoxBorder', "Input box border.")); -export const inputActiveOptionBorder = registerColor('inputBoxActiveOptionBorder', { dark: '#007ACC', light: '#007ACC', hc: activeContrastBorder }, nls.localize('inputBoxActiveOptionBorder', "Border color of activated options in input fields.")); -export const inputValidationInfoBackground = registerColor('inputValidationInfoBackground', { dark: '#063B49', light: '#D6ECF2', hc: Color.black }, nls.localize('inputValidationInfoBackground', "Input validation background color for information severity.")); -export const inputValidationInfoBorder = registerColor('inputValidationInfoBorder', { dark: '#55AAFF', light: '#009CCC', hc: '#6FC3DF' }, nls.localize('inputValidationInfoBorder', "Input validation border color for information severity.")); -export const inputValidationWarningBackground = registerColor('inputValidationWarningBackground', { dark: '#352A05', light: '#F6F5D2', hc: Color.black }, nls.localize('inputValidationWarningBackground', "Input validation background color for information warning.")); -export const inputValidationWarningBorder = registerColor('inputValidationWarningBorder', { dark: '#B89500', light: '#F2CB1D', hc: '#B89500' }, nls.localize('inputValidationWarningBorder', "Input validation border color for warning severity.")); -export const inputValidationErrorBackground = registerColor('inputValidationErrorBackground', { dark: '#5A1D1D', light: '#F2DEDE', hc: Color.black }, nls.localize('inputValidationErrorBackground', "Input validation background color for error severity.")); -export const inputValidationErrorBorder = registerColor('inputValidationErrorBorder', { dark: '#BE1100', light: '#E51400', hc: '#BE1100' }, nls.localize('inputValidationErrorBorder', "Input validation border color for error severity.")); - -export const selectBackground = registerColor('dropdownBackground', { dark: '#3C3C3C', light: Color.white, hc: Color.black }, nls.localize('dropdownBackground', "Dropdown background.")); -export const selectForeground = registerColor('dropdownForeground', { dark: '#F0F0F0', light: null, hc: Color.white }, nls.localize('dropdownForeground', "Dropdown foreground.")); -export const selectBorder = registerColor('dropdownBorder', { dark: selectBackground, light: '#CECECE', hc: contrastBorder }, nls.localize('dropdownBorder', "Dropdown border.")); - -export const listFocusBackground = registerColor('listFocusBackground', { dark: '#073655', light: '#DCEBFC', hc: null }, nls.localize('listFocusBackground', "List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); -export const listActiveSelectionBackground = registerColor('listActiveSelectionBackground', { dark: '#0E639C', light: '#4FA7FF', hc: null }, nls.localize('listActiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); -export const listInactiveSelectionBackground = registerColor('listInactiveSelectionBackground', { dark: '#3F3F46', light: '#CCCEDB', hc: null }, nls.localize('listInactiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")); -export const listActiveSelectionForeground = registerColor('listActiveSelectionForeground', { dark: Color.white, light: Color.white, hc: Color.white }, nls.localize('listActiveSelectionForeground', "List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); -export const listFocusAndSelectionBackground = registerColor('listFocusAndSelectionBackground', { dark: '#094771', light: '#3399FF', hc: null }, nls.localize('listFocusAndSelectionBackground', "List/Tree background color for the focused and selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not. This color wins over the individual selection and focus colors.")); -export const listFocusAndSelectionForeground = registerColor('listFocusAndSelectionForeground', { dark: Color.white, light: Color.white, hc: Color.white }, nls.localize('listFocusAndSelectionForeground', "List/Tree foreground color for the focused and selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not. This color wins over the individual selection and focus colors.")); -export const listHoverBackground = registerColor('listHoverBackground', { dark: '#2A2D2E', light: '#F0F0F0', hc: null }, nls.localize('listHoverBackground', "List/Tree background when hovering over items using the mouse.")); -export const listDropBackground = registerColor('listDropBackground', { dark: '#383B3D', light: '#DDECFF', hc: null }, nls.localize('listDropBackground', "List/Tree drag and drop background when moving items around using the mouse.")); -export const listHighlightForeground = registerColor('listHighlightForeground', { dark: '#219AE4', light: '#186B9E', hc: '#219AE4' }, nls.localize('highlight', 'List/Tree foreground color of the match highlights when searching inside the list/tree.')); - -export const pickerGroupForeground = registerColor('pickerGroupForeground', { dark: Color.fromHex('#0097FB').transparent(0.6), light: Color.fromHex('#007ACC').transparent(0.6), hc: Color.white }, nls.localize('pickerGroupForeground', "Quick picker color for grouping labels.")); -export const pickerGroupBorder = registerColor('pickerGroupBorder', { dark: '#3F3F46', light: '#CCCEDB', hc: Color.white }, nls.localize('pickerGroupBorder', "Quick picker color for grouping borders.")); - -export const buttonForeground = registerColor('buttonForeground', { dark: Color.white, light: Color.white, hc: Color.white }, nls.localize('buttonForeground', "Button foreground color.")); -export const buttonBackground = registerColor('buttonBackground', { dark: '#0E639C', light: '#007ACC', hc: null }, nls.localize('buttonBackground', "Button background color.")); -export const buttonHoverBackground = registerColor('buttonHoverBackground', { dark: '#006BB3', light: '#006BB3', hc: null }, nls.localize('buttonHoverBackground', "Button background color when hovering.")); - -export const scrollbarShadow = registerColor('scrollbarShadow', { dark: '#000000', light: '#DDDDDD', hc: null }, nls.localize('scrollbarShadow', "Scrollbar shadow to indicate that the view is scrolled.")); -export const scrollbarSliderBackground = registerColor('scrollbarSliderBackground', { dark: Color.fromHex('#797979').transparent(0.4), light: Color.fromHex('#646464').transparent(0.4), hc: Color.fromHex('#6FC3DF').transparent(0.6) }, nls.localize('scrollbarSliderBackground', "Slider background color.")); -export const scrollbarSliderHoverBackground = registerColor('scrollbarSliderHoverBackground', { dark: Color.fromHex('#646464').transparent(0.7), light: Color.fromHex('#646464').transparent(0.7), hc: Color.fromHex('#6FC3DF').transparent(0.8) }, nls.localize('scrollbarSliderHoverBackground', "Slider background color when hovering.")); -export const scrollbarSliderActiveBackground = registerColor('scrollbarSliderActiveBackground', { dark: Color.fromHex('#BFBFBF').transparent(0.4), light: Color.fromHex('#000000').transparent(0.6), hc: Color.fromHex('#6FC3DF') }, nls.localize('scrollbarSliderActiveBackground', "Slider background color when active.")); +export const widgetShadow = registerColor('widget.shadow', { dark: '#000000', light: '#A8A8A8', hc: null }, nls.localize('widgetShadow', 'Shadow color of widgets such as find/replace inside the editor.')); + +export const inputBackground = registerColor('input.background', { dark: '#3C3C3C', light: Color.white, hc: Color.black }, nls.localize('inputBoxBackground', "Input box background.")); +export const inputForeground = registerColor('input.foreground', { dark: foreground, light: foreground, hc: foreground }, nls.localize('inputBoxForeground', "Input box foreground.")); +export const inputBorder = registerColor('input.border', { dark: null, light: null, hc: contrastBorder }, nls.localize('inputBoxBorder', "Input box border.")); +export const inputActiveOptionBorder = registerColor('inputOption.activeBorder', { dark: '#007ACC', light: '#007ACC', hc: activeContrastBorder }, nls.localize('inputBoxActiveOptionBorder', "Border color of activated options in input fields.")); +export const inputPlaceholderForeground = registerColor('input.placeholderForeground', { dark: null, light: null, hc: null }, nls.localize('inputPlaceholderForeground', "Input box foreground color for placeholder text.")); + +export const inputValidationInfoBackground = registerColor('inputValidation.infoBackground', { dark: '#063B49', light: '#D6ECF2', hc: Color.black }, nls.localize('inputValidationInfoBackground', "Input validation background color for information severity.")); +export const inputValidationInfoBorder = registerColor('inputValidation.infoBorder', { dark: '#007acc', light: '#007acc', hc: contrastBorder }, nls.localize('inputValidationInfoBorder', "Input validation border color for information severity.")); +export const inputValidationWarningBackground = registerColor('inputValidation.warningBackground', { dark: '#352A05', light: '#F6F5D2', hc: Color.black }, nls.localize('inputValidationWarningBackground', "Input validation background color for information warning.")); +export const inputValidationWarningBorder = registerColor('inputValidation.warningBorder', { dark: '#B89500', light: '#B89500', hc: contrastBorder }, nls.localize('inputValidationWarningBorder', "Input validation border color for warning severity.")); +export const inputValidationErrorBackground = registerColor('inputValidation.errorBackground', { dark: '#5A1D1D', light: '#F2DEDE', hc: Color.black }, nls.localize('inputValidationErrorBackground', "Input validation background color for error severity.")); +export const inputValidationErrorBorder = registerColor('inputValidation.errorBorder', { dark: '#BE1100', light: '#BE1100', hc: contrastBorder }, nls.localize('inputValidationErrorBorder', "Input validation border color for error severity.")); + +export const selectBackground = registerColor('dropdown.background', { dark: '#3C3C3C', light: Color.white, hc: Color.black }, nls.localize('dropdownBackground', "Dropdown background.")); +export const selectForeground = registerColor('dropdown.foreground', { dark: '#F0F0F0', light: null, hc: Color.white }, nls.localize('dropdownForeground', "Dropdown foreground.")); +export const selectBorder = registerColor('dropdown.border', { dark: selectBackground, light: '#CECECE', hc: contrastBorder }, nls.localize('dropdownBorder', "Dropdown border.")); + +export const listFocusBackground = registerColor('list.focusBackground', { dark: '#073655', light: '#DCEBFC', hc: null }, nls.localize('listFocusBackground', "List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); +export const listFocusForeground = registerColor('list.focusForeground', { dark: null, light: null, hc: null }, nls.localize('listFocusForeground', "List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); +export const listActiveSelectionBackground = registerColor('list.activeSelectionBackground', { dark: '#094771', light: '#3399FF', hc: null }, nls.localize('listActiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); +export const listActiveSelectionForeground = registerColor('list.activeSelectionForeground', { dark: Color.white, light: Color.white, hc: null }, nls.localize('listActiveSelectionForeground', "List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); +export const listInactiveSelectionBackground = registerColor('list.inactiveSelectionBackground', { dark: '#3F3F46', light: '#CCCEDB', hc: null }, nls.localize('listInactiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")); +export const listInactiveSelectionForeground = registerColor('list.inactiveSelectionForeground', { dark: null, light: null, hc: null }, nls.localize('listInactiveSelectionForeground', "List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")); +export const listHoverBackground = registerColor('list.hoverBackground', { dark: '#2A2D2E', light: '#F0F0F0', hc: null }, nls.localize('listHoverBackground', "List/Tree background when hovering over items using the mouse.")); +export const listHoverForeground = registerColor('list.hoverForeground', { dark: null, light: null, hc: null }, nls.localize('listHoverForeground', "List/Tree foreground when hovering over items using the mouse.")); +export const listDropBackground = registerColor('list.dropBackground', { dark: listFocusBackground, light: listFocusBackground, hc: null }, nls.localize('listDropBackground', "List/Tree drag and drop background when moving items around using the mouse.")); +export const listHighlightForeground = registerColor('list.highlightForeground', { dark: '#0097fb', light: '#007acc', hc: focusBorder }, nls.localize('highlight', 'List/Tree foreground color of the match highlights when searching inside the list/tree.')); + +export const pickerGroupForeground = registerColor('pickerGroup.foreground', { dark: Color.fromHex('#0097FB').transparent(0.6), light: Color.fromHex('#007ACC').transparent(0.6), hc: Color.white }, nls.localize('pickerGroupForeground', "Quick picker color for grouping labels.")); +export const pickerGroupBorder = registerColor('pickerGroup.border', { dark: '#3F3F46', light: '#CCCEDB', hc: Color.white }, nls.localize('pickerGroupBorder', "Quick picker color for grouping borders.")); + +export const buttonForeground = registerColor('button.foreground', { dark: Color.white, light: Color.white, hc: Color.white }, nls.localize('buttonForeground', "Button foreground color.")); +export const buttonBackground = registerColor('button.background', { dark: '#0E639C', light: '#007ACC', hc: null }, nls.localize('buttonBackground', "Button background color.")); +export const buttonHoverBackground = registerColor('button.hoverBackground', { dark: lighten(buttonBackground, 0.2), light: darken(buttonBackground, 0.2), hc: null }, nls.localize('buttonHoverBackground', "Button background color when hovering.")); + +export const badgeBackground = registerColor('badge.background', { dark: '#4D4D4D', light: '#BEBEBE', hc: Color.black }, nls.localize('badgeBackground', "Badge background color. Badges are small information labels, e.g. for search results count.")); +export const badgeForeground = registerColor('badge.foreground', { dark: Color.white, light: Color.white, hc: Color.white }, nls.localize('badgeForeground', "Badge foreground color. Badges are small information labels, e.g. for search results count.")); + +export const scrollbarShadow = registerColor('scrollbar.shadow', { dark: '#000000', light: '#DDDDDD', hc: null }, nls.localize('scrollbarShadow', "Scrollbar shadow to indicate that the view is scrolled.")); +export const scrollbarSliderBackground = registerColor('scrollbarSlider.background', { dark: Color.fromHex('#797979').transparent(0.4), light: Color.fromHex('#646464').transparent(0.4), hc: transparent(contrastBorder, 0.6) }, nls.localize('scrollbarSliderBackground', "Slider background color.")); +export const scrollbarSliderHoverBackground = registerColor('scrollbarSlider.hoverBackground', { dark: Color.fromHex('#646464').transparent(0.7), light: Color.fromHex('#646464').transparent(0.7), hc: transparent(contrastBorder, 0.8) }, nls.localize('scrollbarSliderHoverBackground', "Slider background color when hovering.")); +export const scrollbarSliderActiveBackground = registerColor('scrollbarSlider.activeBackground', { dark: Color.fromHex('#BFBFBF').transparent(0.4), light: Color.fromHex('#000000').transparent(0.6), hc: contrastBorder }, nls.localize('scrollbarSliderActiveBackground', "Slider background color when active.")); + +export const progressBarBackground = registerColor('progressBar.background', { dark: Color.fromHex('#0E70C0'), light: Color.fromHex('#0E70C0'), hc: contrastBorder }, nls.localize('progressBarBackground', "Background color of the progress bar that can show for long running operations.")); /** * Editor background color. * Because of bug https://monacotools.visualstudio.com/DefaultCollection/Monaco/_workitems/edit/13254 * we are *not* using the color white (or #ffffff, rgba(255,255,255)) but something very close to white. */ -export const editorBackground = registerColor('editorBackground', { light: '#fffffe', dark: '#1E1E1E', hc: Color.black }, nls.localize('editorBackground', "Editor background color.")); +export const editorBackground = registerColor('editor.background', { light: '#fffffe', dark: '#1E1E1E', hc: Color.black }, nls.localize('editorBackground', "Editor background color.")); /** * Editor foreground color. */ -export const editorForeground = registerColor('editorForeground', { light: '#333333', dark: '#BBBBBB', hc: Color.white }, nls.localize('editorForeground', "Editor default foreground color.")); +export const editorForeground = registerColor('editor.foreground', { light: '#333333', dark: '#BBBBBB', hc: Color.white }, nls.localize('editorForeground', "Editor default foreground color.")); + +/** + * Editor widgets + */ +export const editorWidgetBackground = registerColor('editorWidget.background', { dark: '#2D2D30', light: '#EFEFF2', hc: '#0C141F' }, nls.localize('editorWidgetBackground', 'Background color of editor widgets, such as find/replace.')); +export const editorWidgetBorder = registerColor('editorWidget.border', { dark: '#454545', light: '#C8C8C8', hc: contrastBorder }, nls.localize('editorWidgetBorder', 'Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.')); + /** * Editor selection colors. */ -export const editorSelection = registerColor('editorSelection', { light: '#ADD6FF', dark: '#264F78', hc: '#f3f518' }, nls.localize('editorSelection', "Color of the editor selection.")); -export const editorInactiveSelection = registerColor('editorInactiveSelection', { light: transparent(editorSelection, 0.5), dark: transparent(editorSelection, 0.5), hc: null }, nls.localize('editorInactiveSelection', "Color of the selection in an inactive editor.")); -export const editorSelectionHighlight = registerColor('editorSelectionHighlight', { light: lessProminent(editorSelection, editorBackground, 0.3, 0.6), dark: lessProminent(editorSelection, editorBackground, 0.3, 0.6), hc: null }, nls.localize('editorSelectionHighlight', 'Color for regions with the same content as the selection.')); +export const editorSelectionBackground = registerColor('editor.selectionBackground', { light: '#ADD6FF', dark: '#264F78', hc: '#f3f518' }, nls.localize('editorSelectionBackground', "Color of the editor selection.")); +export const editorSelectionForeground = registerColor('editor.selectionForeground', { light: null, dark: null, hc: '#000000' }, nls.localize('editorSelectionForeground', "Color of the selected text for high contrast.")); +export const editorInactiveSelection = registerColor('editor.inactiveSelectionBackground', { light: transparent(editorSelectionBackground, 0.5), dark: transparent(editorSelectionBackground, 0.5), hc: transparent(editorSelectionBackground, 0.5) }, nls.localize('editorInactiveSelection', "Color of the selection in an inactive editor.")); +export const editorSelectionHighlight = registerColor('editor.selectionHighlightBackground', { light: lessProminent(editorSelectionBackground, editorBackground, 0.3, 0.6), dark: lessProminent(editorSelectionBackground, editorBackground, 0.3, 0.6), hc: null }, nls.localize('editorSelectionHighlight', 'Color for regions with the same content as the selection.')); /** * Editor find match colors. */ -export const editorFindMatch = registerColor('editorFindMatch', { light: '#A8AC94', dark: '#515C6A', hc: null }, nls.localize('editorFindMatch', "Color of the current search match.")); -export const editorFindMatchHighlight = registerColor('editorFindMatchHighlight', { light: '#EA5C0055', dark: '#EA5C0055', hc: null }, nls.localize('findMatchHighlight', "Color of the other search matches.")); -export const editorFindRangeHighlight = registerColor('editorFindRangeHighlight', { dark: '#3a3d4166', light: '#b4b4b44d', hc: null }, nls.localize('findRangeHighlight', "Color the range limiting the search.")); +export const editorFindMatch = registerColor('editor.findMatchBackground', { light: '#A8AC94', dark: '#515C6A', hc: null }, nls.localize('editorFindMatch', "Color of the current search match.")); +export const editorFindMatchHighlight = registerColor('editor.findMatchHighlightBackground', { light: '#EA5C0055', dark: '#EA5C0055', hc: null }, nls.localize('findMatchHighlight', "Color of the other search matches.")); +export const editorFindRangeHighlight = registerColor('editor.findRangeHighlightBackground', { dark: '#3a3d4166', light: '#b4b4b44d', hc: null }, nls.localize('findRangeHighlight', "Color the range limiting the search.")); + +/** + * Editor hover + */ +export const editorHoverHighlight = registerColor('editor.hoverHighlightBackground', { light: '#ADD6FF26', dark: '#264f7840', hc: '#ADD6FF26' }, nls.localize('hoverHighlight', 'Highlight below the word for which a hover is shown.')); +export const editorHoverBackground = registerColor('editorHoverWidget.background', { light: editorWidgetBackground, dark: editorWidgetBackground, hc: editorWidgetBackground }, nls.localize('hoverBackground', 'Background color of the editor hover.')); +export const editorHoverBorder = registerColor('editorHoverWidget.border', { light: editorWidgetBorder, dark: editorWidgetBorder, hc: editorWidgetBorder }, nls.localize('hoverBorder', 'Border color of the editor hover.')); /** * Editor link colors */ -export const editorActiveLinkForeground = registerColor('editorActiveLinkForeground', { dark: '#4E94CE', light: Color.black, hc: Color.cyan }, nls.localize('activeLinkForeground', 'Color of active links.')); -export const editorLinkForeground = registerColor('editorLinkForeground', { dark: null, light: null, hc: null }, nls.localize('linkForeground', 'Color of links.')); +export const editorActiveLinkForeground = registerColor('editorLink.activeForeground', { dark: '#4E94CE', light: Color.blue, hc: Color.cyan }, nls.localize('activeLinkForeground', 'Color of active links.')); + +/** + * Diff Editor Colors + */ +export const defaultInsertColor = Color.fromRGBA(new RGBA(155, 185, 85, 255 * 0.2)); +export const defaultRemoveColor = Color.fromRGBA(new RGBA(255, 0, 0, 255 * 0.2)); + +export const diffInserted = registerColor('diffEditor.insertedTextBackground', { dark: defaultInsertColor, light: defaultInsertColor, hc: null }, nls.localize('diffEditorInserted', 'Background color for text that got inserted.')); +export const diffRemoved = registerColor('diffEditor.removedTextBackground', { dark: defaultRemoveColor, light: defaultRemoveColor, hc: null }, nls.localize('diffEditorRemoved', 'Background color for text that got removed.')); + +export const diffInsertedOutline = registerColor('diffEditor.insertedTextBorder', { dark: null, light: null, hc: '#33ff2eff' }, nls.localize('diffEditorInsertedOutline', 'Outline color for the text that got inserted.')); +export const diffRemovedOutline = registerColor('diffEditor.removedTextBorder', { dark: null, light: null, hc: '#FF008F' }, nls.localize('diffEditorRemovedOutline', 'Outline color for text that got removed.')); /** - * Find widget + * Merge-conflict colors */ -export const editorWidgetBackground = registerColor('editorWidgetBackground', { dark: '#2D2D30', light: '#EFEFF2', hc: '#0C141F' }, nls.localize('editorWidgetBackground', 'Background color of editor widgets, such as find/replace.')); +const headerTransparency = 0.5; +const currentBaseColor = Color.fromHex('#40C8AE').transparent(headerTransparency); +const incomingBaseColor = Color.fromHex('#40A6FF').transparent(headerTransparency); +const commonBaseColor = Color.fromHex('#606060').transparent(0.4); +const contentTransparency = 0.4; +const rulerTransparency = 1; + +export const mergeCurrentHeaderBackground = registerColor('merge.currentHeaderBackground', { dark: currentBaseColor, light: currentBaseColor, hc: null }, nls.localize('mergeCurrentHeaderBackground', 'Current header background in inline merge-conflicts.')); +export const mergeCurrentContentBackground = registerColor('merge.currentContentBackground', { dark: transparent(mergeCurrentHeaderBackground, contentTransparency), light: transparent(mergeCurrentHeaderBackground, contentTransparency), hc: transparent(mergeCurrentHeaderBackground, contentTransparency) }, nls.localize('mergeCurrentContentBackground', 'Current content background in inline merge-conflicts.')); +export const mergeIncomingHeaderBackground = registerColor('merge.incomingHeaderBackground', { dark: incomingBaseColor, light: incomingBaseColor, hc: null }, nls.localize('mergeIncomingHeaderBackground', 'Incoming header background in inline merge-conflicts.')); +export const mergeIncomingContentBackground = registerColor('merge.incomingContentBackground', { dark: transparent(mergeIncomingHeaderBackground, contentTransparency), light: transparent(mergeIncomingHeaderBackground, contentTransparency), hc: transparent(mergeIncomingHeaderBackground, contentTransparency) }, nls.localize('mergeIncomingContentBackground', 'Incoming content background in inline merge-conflicts.')); +export const mergeCommonHeaderBackground = registerColor('merge.commonHeaderBackground', { dark: commonBaseColor, light: commonBaseColor, hc: null }, nls.localize('mergeCommonHeaderBackground', 'Common ancestor header background in inline merge-conflicts.')); +export const mergeCommonContentBackground = registerColor('merge.commonContentBackground', { dark: transparent(mergeCommonHeaderBackground, contentTransparency), light: transparent(mergeCommonHeaderBackground, contentTransparency), hc: transparent(mergeCommonHeaderBackground, contentTransparency) }, nls.localize('mergeCommonContentBackground', 'Common ancester content background in inline merge-conflicts.')); + +export const mergeBorder = registerColor('merge.border', { dark: null, light: null, hc: '#C3DF6F' }, nls.localize('mergeBorder', 'Border color on headers and the splitter in inline merge-conflicts.')); + +export const overviewRulerCurrentContentForeground = registerColor('editorOverviewRuler.currentContentForeground', { dark: transparent(mergeCurrentHeaderBackground, rulerTransparency), light: transparent(mergeCurrentHeaderBackground, rulerTransparency), hc: mergeBorder }, nls.localize('overviewRulerCurrentContentForeground', 'Current overview ruler foreground for inline merge-conflicts.')); +export const overviewRulerIncomingContentForeground = registerColor('editorOverviewRuler.incomingContentForeground', { dark: transparent(mergeIncomingHeaderBackground, rulerTransparency), light: transparent(mergeIncomingHeaderBackground, rulerTransparency), hc: mergeBorder }, nls.localize('overviewRulerIncomingContentForeground', 'Incoming overview ruler foreground for inline merge-conflicts.')); +export const overviewRulerCommonContentForeground = registerColor('editorOverviewRuler.commonContentForeground', { dark: transparent(mergeCommonHeaderBackground, rulerTransparency), light: transparent(mergeCommonHeaderBackground, rulerTransparency), hc: mergeBorder }, nls.localize('overviewRulerCommonContentForeground', 'Common ancestor overview ruler foreground for inline merge-conflicts.')); // ----- color functions @@ -215,6 +291,16 @@ export function darken(colorValue: ColorValue, factor: number): ColorFunction { }; } +export function lighten(colorValue: ColorValue, factor: number): ColorFunction { + return (theme) => { + let color = resolveColorValue(colorValue, theme); + if (color) { + return color.lighten(factor); + } + return null; + }; +} + export function transparent(colorValue: ColorValue, factor: number): ColorFunction { return (theme) => { let color = resolveColorValue(colorValue, theme); @@ -225,6 +311,18 @@ export function transparent(colorValue: ColorValue, factor: number): ColorFuncti }; } +export function oneOf(...colorValues: ColorValue[]): ColorFunction { + return (theme) => { + for (let colorValue of colorValues) { + let color = resolveColorValue(colorValue, theme); + if (color) { + return color; + } + } + return null; + }; +} + function lessProminent(colorValue: ColorValue, backgroundColorValue: ColorValue, factor: number, transparency: number): ColorFunction { return (theme) => { let from = resolveColorValue(colorValue, theme); @@ -263,7 +361,7 @@ function resolveColorValue(colorValue: ColorValue, theme: ITheme): Color { return null; } -//setTimeout(_ => console.log(colorRegistry.toString()), 5000); +// setTimeout(_ => console.log(colorRegistry.toString()), 5000); diff --git a/src/vs/platform/theme/common/styler.ts b/src/vs/platform/theme/common/styler.ts index a1988d07d854a..b37a8542d45d6 100644 --- a/src/vs/platform/theme/common/styler.ts +++ b/src/vs/platform/theme/common/styler.ts @@ -6,22 +6,32 @@ 'use strict'; import { ITheme, IThemeService } from 'vs/platform/theme/common/themeService'; -import { inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, listFocusBackground, listActiveSelectionBackground, listActiveSelectionForeground, listFocusAndSelectionBackground, listFocusAndSelectionForeground, listInactiveSelectionBackground, listHoverBackground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationErrorBorder, inputValidationErrorBackground, activeContrastBorder, buttonForeground, buttonBackground, buttonHoverBackground } from 'vs/platform/theme/common/colorRegistry'; +import { inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, listFocusBackground, listFocusForeground, listActiveSelectionBackground, listActiveSelectionForeground, listInactiveSelectionForeground, listInactiveSelectionBackground, listHoverBackground, listHoverForeground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationErrorBorder, inputValidationErrorBackground, activeContrastBorder, buttonForeground, buttonBackground, buttonHoverBackground, ColorFunction, lighten, badgeBackground, badgeForeground, progressBarBackground } from 'vs/platform/theme/common/colorRegistry'; import { IDisposable } from 'vs/base/common/lifecycle'; -import { SIDE_BAR_SECTION_HEADER_BACKGROUND } from 'vs/workbench/common/theme'; + +export type styleFn = (colors: { [name: string]: ColorIdentifier }) => void; export interface IThemable { - style(colors: { [name: string]: ColorIdentifier }): void; + style: styleFn; } -export function attachStyler(themeService: IThemeService, widget: IThemable, optionsMapping: { [optionsKey: string]: ColorIdentifier }): IDisposable { +export function attachStyler(themeService: IThemeService, optionsMapping: { [optionsKey: string]: ColorIdentifier | ColorFunction }, widgetOrCallback: IThemable | styleFn): IDisposable { function applyStyles(theme: ITheme): void { const styles = Object.create(null); for (let key in optionsMapping) { - styles[key] = theme.getColor(optionsMapping[key]); + const value = optionsMapping[key]; + if (typeof value === 'string') { + styles[key] = theme.getColor(value); + } else if (typeof value === 'function') { + styles[key] = value(theme); + } } - widget.style(styles); + if (typeof widgetOrCallback === 'function') { + widgetOrCallback(styles); + } else { + widgetOrCallback.style(styles); + } } applyStyles(themeService.getTheme()); @@ -30,9 +40,21 @@ export function attachStyler(themeService: IThemeService, widget: IThemable, opt } export function attachCheckboxStyler(widget: IThemable, themeService: IThemeService, style?: { inputActiveOptionBorderColor?: ColorIdentifier }): IDisposable { - return attachStyler(themeService, widget, { + return attachStyler(themeService, { inputActiveOptionBorder: (style && style.inputActiveOptionBorderColor) || inputActiveOptionBorder - }); + }, widget); +} + +export function attachBadgeStyler(widget: IThemable, themeService: IThemeService, style?: + { + badgeBackground?: ColorIdentifier, + badgeForeground?: ColorIdentifier + }): IDisposable { + return attachStyler(themeService, { + badgeBackground: (style && style.badgeBackground) || badgeBackground, + badgeForeground: (style && style.badgeForeground) || badgeForeground, + badgeBorder: contrastBorder + }, widget); } export function attachInputBoxStyler(widget: IThemable, themeService: IThemeService, style?: @@ -47,7 +69,7 @@ export function attachInputBoxStyler(widget: IThemable, themeService: IThemeServ inputValidationErrorBorder?: ColorIdentifier, inputValidationErrorBackground?: ColorIdentifier }): IDisposable { - return attachStyler(themeService, widget, { + return attachStyler(themeService, { inputBackground: (style && style.inputBackground) || inputBackground, inputForeground: (style && style.inputForeground) || inputForeground, inputBorder: (style && style.inputBorder) || inputBorder, @@ -57,15 +79,15 @@ export function attachInputBoxStyler(widget: IThemable, themeService: IThemeServ inputValidationWarningBackground: (style && style.inputValidationWarningBackground) || inputValidationWarningBackground, inputValidationErrorBorder: (style && style.inputValidationErrorBorder) || inputValidationErrorBorder, inputValidationErrorBackground: (style && style.inputValidationErrorBackground) || inputValidationErrorBackground - }); + }, widget); } export function attachSelectBoxStyler(widget: IThemable, themeService: IThemeService, style?: { selectBackground?: ColorIdentifier, selectForeground?: ColorIdentifier, selectBorder?: ColorIdentifier }): IDisposable { - return attachStyler(themeService, widget, { + return attachStyler(themeService, { selectBackground: (style && style.selectBackground) || selectBackground, selectForeground: (style && style.selectForeground) || selectForeground, selectBorder: (style && style.selectBorder) || selectBorder - }); + }, widget); } export function attachFindInputBoxStyler(widget: IThemable, themeService: IThemeService, style?: @@ -81,7 +103,7 @@ export function attachFindInputBoxStyler(widget: IThemable, themeService: ITheme inputValidationErrorBorder?: ColorIdentifier, inputValidationErrorBackground?: ColorIdentifier }): IDisposable { - return attachStyler(themeService, widget, { + return attachStyler(themeService, { inputBackground: (style && style.inputBackground) || inputBackground, inputForeground: (style && style.inputForeground) || inputForeground, inputBorder: (style && style.inputBorder) || inputBorder, @@ -92,7 +114,7 @@ export function attachFindInputBoxStyler(widget: IThemable, themeService: ITheme inputValidationWarningBackground: (style && style.inputValidationWarningBackground) || inputValidationWarningBackground, inputValidationErrorBorder: (style && style.inputValidationErrorBorder) || inputValidationErrorBorder, inputValidationErrorBackground: (style && style.inputValidationErrorBackground) || inputValidationErrorBackground - }); + }, widget); } export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeService, style?: { @@ -100,6 +122,7 @@ export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeSer background?: ColorIdentifier, borderColor?: ColorIdentifier, widgetShadow?: ColorIdentifier, + progressBarBackground?: ColorIdentifier, inputBackground?: ColorIdentifier, inputForeground?: ColorIdentifier, inputBorder?: ColorIdentifier, @@ -112,22 +135,26 @@ export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeSer pickerGroupForeground?: ColorIdentifier, pickerGroupBorder?: ColorIdentifier, listFocusBackground?: ColorIdentifier, + listFocusForeground?: ColorIdentifier, listActiveSelectionBackground?: ColorIdentifier, listActiveSelectionForeground?: ColorIdentifier, listFocusAndSelectionBackground?: ColorIdentifier, listFocusAndSelectionForeground?: ColorIdentifier, listInactiveSelectionBackground?: ColorIdentifier, + listInactiveSelectionForeground?: ColorIdentifier, listHoverBackground?: ColorIdentifier, + listHoverForeground?: ColorIdentifier, listDropBackground?: ColorIdentifier, listFocusOutline?: ColorIdentifier, listSelectionOutline?: ColorIdentifier, listHoverOutline?: ColorIdentifier }): IDisposable { - return attachStyler(themeService, widget, { + return attachStyler(themeService, { foreground: (style && style.foreground) || foreground, background: (style && style.background) || editorBackground, borderColor: style && style.borderColor || contrastBorder, widgetShadow: style && style.widgetShadow || widgetShadow, + progressBarBackground: style && style.progressBarBackground || progressBarBackground, pickerGroupForeground: style && style.pickerGroupForeground || pickerGroupForeground, pickerGroupBorder: style && style.pickerGroupBorder || pickerGroupBorder, inputBackground: (style && style.inputBackground) || inputBackground, @@ -140,62 +167,75 @@ export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeSer inputValidationErrorBorder: (style && style.inputValidationErrorBorder) || inputValidationErrorBorder, inputValidationErrorBackground: (style && style.inputValidationErrorBackground) || inputValidationErrorBackground, listFocusBackground: (style && style.listFocusBackground) || listFocusBackground, - listActiveSelectionBackground: (style && style.listActiveSelectionBackground) || listActiveSelectionBackground, + listFocusForeground: (style && style.listFocusForeground) || listFocusForeground, + listActiveSelectionBackground: (style && style.listActiveSelectionBackground) || lighten(listActiveSelectionBackground, 0.1), listActiveSelectionForeground: (style && style.listActiveSelectionForeground) || listActiveSelectionForeground, - listFocusAndSelectionBackground: (style && style.listFocusAndSelectionBackground) || listFocusAndSelectionBackground, - listFocusAndSelectionForeground: (style && style.listFocusAndSelectionForeground) || listFocusAndSelectionForeground, + listFocusAndSelectionBackground: style && style.listFocusAndSelectionBackground || listActiveSelectionBackground, + listFocusAndSelectionForeground: (style && style.listFocusAndSelectionForeground) || listActiveSelectionForeground, listInactiveSelectionBackground: (style && style.listInactiveSelectionBackground) || listInactiveSelectionBackground, + listInactiveSelectionForeground: (style && style.listInactiveSelectionForeground) || listInactiveSelectionForeground, listHoverBackground: (style && style.listHoverBackground) || listHoverBackground, + listHoverForeground: (style && style.listHoverForeground) || listHoverForeground, listDropBackground: (style && style.listDropBackground) || listDropBackground, listFocusOutline: (style && style.listFocusOutline) || activeContrastBorder, listSelectionOutline: (style && style.listSelectionOutline) || activeContrastBorder, listHoverOutline: (style && style.listHoverOutline) || activeContrastBorder - }); + }, widget); } export function attachListStyler(widget: IThemable, themeService: IThemeService, style?: { listFocusBackground?: ColorIdentifier, + listFocusForeground?: ColorIdentifier, listActiveSelectionBackground?: ColorIdentifier, listActiveSelectionForeground?: ColorIdentifier, listFocusAndSelectionBackground?: ColorIdentifier, listFocusAndSelectionForeground?: ColorIdentifier, listInactiveFocusBackground?: ColorIdentifier, listInactiveSelectionBackground?: ColorIdentifier, + listInactiveSelectionForeground?: ColorIdentifier, listHoverBackground?: ColorIdentifier, + listHoverForeground?: ColorIdentifier, listDropBackground?: ColorIdentifier, listFocusOutline?: ColorIdentifier, listInactiveFocusOutline?: ColorIdentifier, listSelectionOutline?: ColorIdentifier, listHoverOutline?: ColorIdentifier, }): IDisposable { - return attachStyler(themeService, widget, { + return attachStyler(themeService, { listFocusBackground: (style && style.listFocusBackground) || listFocusBackground, - listActiveSelectionBackground: (style && style.listActiveSelectionBackground) || listActiveSelectionBackground, + listFocusForeground: (style && style.listFocusForeground) || listFocusForeground, + listActiveSelectionBackground: (style && style.listActiveSelectionBackground) || lighten(listActiveSelectionBackground, 0.1), listActiveSelectionForeground: (style && style.listActiveSelectionForeground) || listActiveSelectionForeground, - listFocusAndSelectionBackground: (style && style.listFocusAndSelectionBackground) || listFocusAndSelectionBackground, - listFocusAndSelectionForeground: (style && style.listFocusAndSelectionForeground) || listFocusAndSelectionForeground, + listFocusAndSelectionBackground: style && style.listFocusAndSelectionBackground || listActiveSelectionBackground, + listFocusAndSelectionForeground: (style && style.listFocusAndSelectionForeground) || listActiveSelectionForeground, listInactiveFocusBackground: (style && style.listInactiveFocusBackground), listInactiveSelectionBackground: (style && style.listInactiveSelectionBackground) || listInactiveSelectionBackground, + listInactiveSelectionForeground: (style && style.listInactiveSelectionForeground) || listInactiveSelectionForeground, listHoverBackground: (style && style.listHoverBackground) || listHoverBackground, + listHoverForeground: (style && style.listHoverForeground) || listHoverForeground, listDropBackground: (style && style.listDropBackground) || listDropBackground, listFocusOutline: (style && style.listFocusOutline) || activeContrastBorder, listSelectionOutline: (style && style.listSelectionOutline) || activeContrastBorder, listHoverOutline: (style && style.listHoverOutline) || activeContrastBorder, listInactiveFocusOutline: style && style.listInactiveFocusOutline // not defined by default, only opt-in - }); -} - -export function attachHeaderViewStyler(widget: IThemable, themeService: IThemeService, style?: { headerBackground?: ColorIdentifier, contrastBorder?: ColorIdentifier }): IDisposable { - return attachStyler(themeService, widget, { - headerBackground: (style && style.headerBackground) || SIDE_BAR_SECTION_HEADER_BACKGROUND, - headerHighContrastBorder: (style && style.contrastBorder) || contrastBorder - }); + }, widget); } export function attachButtonStyler(widget: IThemable, themeService: IThemeService, style?: { buttonForeground?: ColorIdentifier, buttonBackground?: ColorIdentifier, buttonHoverBackground?: ColorIdentifier }): IDisposable { - return attachStyler(themeService, widget, { + return attachStyler(themeService, { buttonForeground: (style && style.buttonForeground) || buttonForeground, buttonBackground: (style && style.buttonBackground) || buttonBackground, - buttonHoverBackground: (style && style.buttonHoverBackground) || buttonHoverBackground - }); + buttonHoverBackground: (style && style.buttonHoverBackground) || buttonHoverBackground, + buttonBorder: contrastBorder + }, widget); +} + +export function attachProgressBarStyler(widget: IThemable, themeService: IThemeService, style?: { progressBarBackground?: ColorIdentifier }): IDisposable { + return attachStyler(themeService, { + progressBarBackground: (style && style.progressBarBackground) || progressBarBackground + }, widget); +} + +export function attachStylerCallback(themeService: IThemeService, colors: { [name: string]: ColorIdentifier }, callback: styleFn): IDisposable { + return attachStyler(themeService, colors, callback); } \ No newline at end of file diff --git a/src/vs/platform/theme/common/themeService.ts b/src/vs/platform/theme/common/themeService.ts index ff9f54c95f5ac..bad94658abd81 100644 --- a/src/vs/platform/theme/common/themeService.ts +++ b/src/vs/platform/theme/common/themeService.ts @@ -7,20 +7,31 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { Color } from 'vs/base/common/color'; import { IDisposable } from 'vs/base/common/lifecycle'; -import platform = require('vs/platform/platform'); +import platform = require('vs/platform/registry/common/platform'); import { ColorIdentifier } from 'vs/platform/theme/common/colorRegistry'; import Event, { Emitter } from 'vs/base/common/event'; export let IThemeService = createDecorator('themeService'); +export interface ThemeColor { + id: string; +} + // base themes -export const DARK = 'dark'; -export const LIGHT = 'light'; -export const HIGH_CONTRAST = 'hc'; +export const DARK: ThemeType = 'dark'; +export const LIGHT: ThemeType = 'light'; +export const HIGH_CONTRAST: ThemeType = 'hc'; export type ThemeType = 'light' | 'dark' | 'hc'; +export function getThemeTypeSelector(type: ThemeType): string { + switch (type) { + case DARK: return 'vs-dark'; + case HIGH_CONTRAST: return 'hc-black'; + default: return 'vs'; + } +} + export interface ITheme { - readonly selector: string; readonly type: ThemeType; /** @@ -32,9 +43,10 @@ export interface ITheme { getColor(color: ColorIdentifier, useDefault?: boolean): Color; /** - * Returns wheter the current color matches the default color + * Returns wheter the theme defines a value for the color. If not, that means the + * default color will be used. */ - isDefault(color: ColorIdentifier): boolean; + defines(color: ColorIdentifier): boolean; } export interface ICssStyleCollector { diff --git a/src/vs/platform/theme/common/themes.ts b/src/vs/platform/theme/common/themes.ts deleted file mode 100644 index 072779016a366..0000000000000 --- a/src/vs/platform/theme/common/themes.ts +++ /dev/null @@ -1,17 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -export function isLightTheme(themeId: string) { - return /vs($| )/.test(themeId); -} - -export function isDarkTheme(themeId: string) { - return /vs-dark($| )/.test(themeId); -} - -export function isHighContrastTheme(themeId: string) { - return /hc-black($| )/.test(themeId); -} \ No newline at end of file diff --git a/src/vs/platform/theme/test/common/testThemeService.ts b/src/vs/platform/theme/test/common/testThemeService.ts new file mode 100644 index 0000000000000..358c842250ea9 --- /dev/null +++ b/src/vs/platform/theme/test/common/testThemeService.ts @@ -0,0 +1,56 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import Event, { Emitter } from 'vs/base/common/event'; +import { IThemeService, ITheme, DARK } from 'vs/platform/theme/common/themeService'; +import { Color } from 'vs/base/common/color'; + +export class TestTheme implements ITheme { + + constructor(private colors: { [id: string]: string; } = {}, public type = DARK) { + } + + getColor(color: string, useDefault?: boolean): Color { + let value = this.colors[color]; + if (value) { + return Color.fromHex(value); + } + return void 0; + } + + defines(color: string): boolean { + throw new Error('Method not implemented.'); + } +} + +export class TestThemeService implements IThemeService { + + _serviceBrand: any; + _theme: ITheme; + _onThemeChange = new Emitter(); + + constructor(theme = new TestTheme()) { + this._theme = theme; + } + + getTheme(): ITheme { + return this._theme; + } + + setTheme(theme: ITheme) { + this._theme = theme; + this.fireThemeChange(); + } + + fireThemeChange() { + this._onThemeChange.fire(this._theme); + } + + public get onThemeChange(): Event { + return this._onThemeChange.event; + } +} diff --git a/src/vs/platform/update/common/updateIpc.ts b/src/vs/platform/update/common/updateIpc.ts index 2076719e98a9b..0dd76ca51f65a 100644 --- a/src/vs/platform/update/common/updateIpc.ts +++ b/src/vs/platform/update/common/updateIpc.ts @@ -7,7 +7,8 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { IChannel, eventToCall, eventFromCall } from 'vs/base/parts/ipc/common/ipc'; -import Event from 'vs/base/common/event'; +import Event, { Emitter } from 'vs/base/common/event'; +import { onUnexpectedError } from 'vs/base/common/errors'; import { IUpdateService, IRawUpdate, State, IUpdate } from './update'; export interface IUpdateChannel extends IChannel { @@ -18,6 +19,7 @@ export interface IUpdateChannel extends IChannel { call(command: 'event:onStateChange'): TPromise; call(command: 'checkForUpdates', arg: boolean): TPromise; call(command: 'quitAndInstall'): TPromise; + call(command: '_getInitialState'): TPromise; call(command: string, arg?: any): TPromise; } @@ -34,6 +36,7 @@ export class UpdateChannel implements IUpdateChannel { case 'event:onStateChange': return eventToCall(this.service.onStateChange); case 'checkForUpdates': return this.service.checkForUpdates(arg); case 'quitAndInstall': return this.service.quitAndInstall(); + case '_getInitialState': return TPromise.as(this.service.state); } return undefined; } @@ -55,14 +58,24 @@ export class UpdateChannelClient implements IUpdateService { private _onUpdateReady = eventFromCall(this.channel, 'event:onUpdateReady'); get onUpdateReady(): Event { return this._onUpdateReady; } - private _onStateChange = eventFromCall(this.channel, 'event:onStateChange'); - get onStateChange(): Event { return this._onStateChange; } + private _onRemoteStateChange = eventFromCall(this.channel, 'event:onStateChange'); + private _onStateChange = new Emitter(); + get onStateChange(): Event { return this._onStateChange.event; } private _state: State = State.Uninitialized; get state(): State { return this._state; }; - constructor(private channel: IChannel) { + constructor(private channel: IUpdateChannel) { + // always set this._state as the state changes this.onStateChange(state => this._state = state); + + channel.call('_getInitialState').done(state => { + // fire initial state + this._onStateChange.fire(state); + + // fire subsequent states as they come in from remote + this._onRemoteStateChange(state => this._onStateChange.fire(state)); + }, onUnexpectedError); } checkForUpdates(explicit: boolean): TPromise { diff --git a/src/vs/platform/update/electron-main/auto-updater.win32.ts b/src/vs/platform/update/electron-main/auto-updater.win32.ts index 1e0b72718c690..4bc3db6a823c4 100644 --- a/src/vs/platform/update/electron-main/auto-updater.win32.ts +++ b/src/vs/platform/update/electron-main/auto-updater.win32.ts @@ -41,7 +41,7 @@ export class Win32AutoUpdaterImpl extends EventEmitter implements IAutoUpdater { } get cachePath(): TPromise { - const result = path.join(tmpdir(), 'vscode-update'); + const result = path.join(tmpdir(), `vscode-update-${process.arch}`); return new TPromise((c, e) => mkdirp(result, null, err => err ? e(err) : c(result))); } diff --git a/src/vs/platform/update/electron-main/updateService.ts b/src/vs/platform/update/electron-main/updateService.ts index 77ef33d20fe48..8c387a9071064 100644 --- a/src/vs/platform/update/electron-main/updateService.ts +++ b/src/vs/platform/update/electron-main/updateService.ts @@ -16,7 +16,7 @@ import { fromEventEmitter } from 'vs/base/node/event'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { Win32AutoUpdaterImpl } from './auto-updater.win32'; import { LinuxAutoUpdaterImpl } from './auto-updater.linux'; -import { ILifecycleService } from 'vs/code/electron-main/lifecycle'; +import { ILifecycleService } from 'vs/platform/lifecycle/electron-main/lifecycleMain'; import { IRequestService } from 'vs/platform/request/node/request'; import product from 'vs/platform/node/product'; import { TPromise } from 'vs/base/common/winjs.base'; @@ -44,8 +44,8 @@ export class UpdateService implements IUpdateService { private _onUpdateNotAvailable = new Emitter(); get onUpdateNotAvailable(): Event { return this._onUpdateNotAvailable.event; } - private _onUpdateReady = new Emitter(); - get onUpdateReady(): Event { return this._onUpdateReady.event; } + private _onUpdateReady = new Emitter(); + get onUpdateReady(): Event { return this._onUpdateReady.event; } private _onStateChange = new Emitter(); get onStateChange(): Event { return this._onStateChange.event; } @@ -177,9 +177,10 @@ export class UpdateService implements IUpdateService { this._availableUpdate = data; this._onUpdateAvailable.fire({ url: update.url, version: update.version }); this.state = State.UpdateAvailable; + this.telemetryService.publicLog('update:available', { explicit, version: update.version, currentVersion: product.commit }); } else { - const data: IUpdate = { + const data: IRawUpdate = { releaseNotes: update.releaseNotes, version: update.version, date: update.date @@ -220,11 +221,23 @@ export class UpdateService implements IUpdateService { return null; } - const platform = process.platform === 'linux' ? `linux-${process.arch}` : process.platform; + const platform = this.getUpdatePlatform(); return `${product.updateUrl}/api/update/${platform}/${channel}/${product.commit}`; } + private getUpdatePlatform(): string { + if (process.platform === 'linux') { + return `linux-${process.arch}`; + } + + if (process.platform === 'win32' && process.arch === 'x64') { + return 'win32-x64'; + } + + return process.platform; + } + quitAndInstall(): TPromise { if (!this._availableUpdate) { return TPromise.as(null); diff --git a/src/vs/platform/windows/common/windows.ts b/src/vs/platform/windows/common/windows.ts index 296f757f9c6fa..71917afbbe8e0 100644 --- a/src/vs/platform/windows/common/windows.ts +++ b/src/vs/platform/windows/common/windows.ts @@ -9,6 +9,8 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import Event from 'vs/base/common/event'; import { ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; +import { IProcessEnvironment } from 'vs/base/common/platform'; +import { ParsedArgs } from 'vs/platform/environment/common/environment'; export const IWindowsService = createDecorator('windowsService'); @@ -19,9 +21,10 @@ export interface IWindowsService { onWindowOpen: Event; onWindowFocus: Event; - openFileFolderPicker(windowId: number, forceNewWindow?: boolean, data?: ITelemetryData): TPromise; - openFilePicker(windowId: number, forceNewWindow?: boolean, path?: string, data?: ITelemetryData): TPromise; - openFolderPicker(windowId: number, forceNewWindow?: boolean, data?: ITelemetryData): TPromise; + pickFileFolderAndOpen(windowId: number, forceNewWindow?: boolean, data?: ITelemetryData): TPromise; + pickFileAndOpen(windowId: number, forceNewWindow?: boolean, path?: string, data?: ITelemetryData): TPromise; + pickFolderAndOpen(windowId: number, forceNewWindow?: boolean, data?: ITelemetryData): TPromise; + pickFolder(options?: { buttonLabel: string; title: string; }): TPromise; reloadWindow(windowId: number): TPromise; openDevTools(windowId: number): TPromise; toggleDevTools(windowId: number): TPromise; @@ -37,6 +40,7 @@ export interface IWindowsService { isMaximized(windowId: number): TPromise; maximizeWindow(windowId: number): TPromise; unmaximizeWindow(windowId: number): TPromise; + onWindowTitleDoubleClick(windowId: number): TPromise; setDocumentEdited(windowId: number, flag: boolean): TPromise; quit(): TPromise; relaunch(options: { addArgs?: string[], removeArgs?: string[] }): TPromise; @@ -49,11 +53,11 @@ export interface IWindowsService { openWindow(paths: string[], options?: { forceNewWindow?: boolean, forceReuseWindow?: boolean }): TPromise; openNewWindow(): TPromise; showWindow(windowId: number): TPromise; - getWindows(): TPromise<{ id: number; path: string; title: string; }[]>; + getWindows(): TPromise<{ id: number; path: string; title: string; filename?: string; }[]>; getWindowCount(): TPromise; log(severity: string, ...messages: string[]): TPromise; // TODO@joao: what? - closeExtensionHostWindow(extensionDevelopmentPath: string): TPromise; + closeExtensionHostWindow(extensionDevelopmentPaths: string[]): TPromise; showItemInFolder(path: string): TPromise; // This needs to be handled from browser process to prevent @@ -71,9 +75,10 @@ export interface IWindowService { _serviceBrand: any; getCurrentWindowId(): number; - openFileFolderPicker(forceNewWindow?: boolean, data?: ITelemetryData): TPromise; - openFilePicker(forceNewWindow?: boolean, path?: string, data?: ITelemetryData): TPromise; - openFolderPicker(forceNewWindow?: boolean, data?: ITelemetryData): TPromise; + pickFileFolderAndOpen(forceNewWindow?: boolean, data?: ITelemetryData): TPromise; + pickFileAndOpen(forceNewWindow?: boolean, path?: string, data?: ITelemetryData): TPromise; + pickFolderAndOpen(forceNewWindow?: boolean, data?: ITelemetryData): TPromise; + pickFolder(options?: { buttonLabel: string; title: string; }): TPromise; reloadWindow(): TPromise; openDevTools(): TPromise; toggleDevTools(): TPromise; @@ -89,14 +94,20 @@ export interface IWindowService { isMaximized(): TPromise; maximizeWindow(): TPromise; unmaximizeWindow(): TPromise; + onWindowTitleDoubleClick(): TPromise; } export type MenuBarVisibility = 'default' | 'visible' | 'toggle' | 'hidden'; +export interface IWindowConfiguration { + window: IWindowSettings; +} + export interface IWindowSettings { openFilesInNewWindow: 'on' | 'off' | 'default'; openFoldersInNewWindow: 'on' | 'off' | 'default'; - reopenFolders: 'all' | 'one' | 'none'; + restoreWindows: 'all' | 'folders' | 'one' | 'none'; + reopenFolders: 'all' | 'one' | 'none'; // TODO@Ben deprecated restoreFullscreen: boolean; zoomLevel: number; titleBarStyle: 'native' | 'custom'; @@ -104,4 +115,95 @@ export interface IWindowSettings { menuBarVisibility: MenuBarVisibility; newWindowDimensions: 'default' | 'inherit' | 'maximized' | 'fullscreen'; nativeTabs: boolean; + enableMenuBarMnemonics: boolean; +} + +export enum OpenContext { + + // opening when running from the command line + CLI, + + // macOS only: opening from the dock (also when opening files to a running instance from desktop) + DOCK, + + // opening from the main application window + MENU, + + // opening from a file or folder dialog + DIALOG, + + // opening from the OS's UI + DESKTOP, + + // opening through the API + API +} + +export enum ReadyState { + + /** + * This window has not loaded any HTML yet + */ + NONE, + + /** + * This window is loading HTML + */ + LOADING, + + /** + * This window is navigating to another HTML + */ + NAVIGATING, + + /** + * This window is done loading HTML + */ + READY } + +export interface IPath { + + // the file path to open within a Code instance + filePath?: string; + + // the line number in the file path to open + lineNumber?: number; + + // the column number in the file path to open + columnNumber?: number; +} + +export interface IOpenFileRequest { + filesToOpen?: IPath[]; + filesToCreate?: IPath[]; + filesToDiff?: IPath[]; +} + +export interface IWindowConfiguration extends ParsedArgs, IOpenFileRequest { + appRoot: string; + execPath: string; + + userEnv: IProcessEnvironment; + + isISOKeyboard?: boolean; + + zoomLevel?: number; + fullscreen?: boolean; + highContrast?: boolean; + baseTheme?: string; + backgroundColor?: string; + accessibilitySupport?: boolean; + + isInitialStartup?: boolean; + + perfStartTime?: number; + perfAppReady?: number; + perfWindowLoadTime?: number; + + workspacePath?: string; + + backupPath?: string; + + nodeCachedDataDir: string; +} \ No newline at end of file diff --git a/src/vs/platform/windows/common/windowsIpc.ts b/src/vs/platform/windows/common/windowsIpc.ts index 2d9e9d3650610..12b858979ca4d 100644 --- a/src/vs/platform/windows/common/windowsIpc.ts +++ b/src/vs/platform/windows/common/windowsIpc.ts @@ -14,9 +14,10 @@ import { ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; export interface IWindowsChannel extends IChannel { call(command: 'event:onWindowOpen'): TPromise; call(command: 'event:onWindowFocus'): TPromise; - call(command: 'openFileFolderPicker', arg: [number, boolean, ITelemetryData]): TPromise; - call(command: 'openFilePicker', arg: [number, boolean, string, ITelemetryData]): TPromise; - call(command: 'openFolderPicker', arg: [number, boolean, ITelemetryData]): TPromise; + call(command: 'pickFileFolderAndOpen', arg: [number, boolean, ITelemetryData]): TPromise; + call(command: 'pickFileAndOpen', arg: [number, boolean, string, ITelemetryData]): TPromise; + call(command: 'pickFolderAndOpen', arg: [number, boolean, ITelemetryData]): TPromise; + call(command: 'pickFolder', arg: { buttonLabel: string; title: string; }): TPromise; call(command: 'reloadWindow', arg: number): TPromise; call(command: 'toggleDevTools', arg: number): TPromise; call(command: 'closeFolder', arg: number): TPromise; @@ -31,6 +32,7 @@ export interface IWindowsChannel extends IChannel { call(command: 'isMaximized', arg: number): TPromise; call(command: 'maximizeWindow', arg: number): TPromise; call(command: 'unmaximizeWindow', arg: number): TPromise; + call(command: 'onWindowTitleDoubleClick', arg: number): TPromise; call(command: 'setDocumentEdited', arg: [number, boolean]): TPromise; call(command: 'quit'): TPromise; call(command: 'openWindow', arg: [string[], { forceNewWindow?: boolean, forceReuseWindow?: boolean }]): TPromise; @@ -42,7 +44,7 @@ export interface IWindowsChannel extends IChannel { call(command: 'whenSharedProcessReady'): TPromise; call(command: 'toggleSharedProcess'): TPromise; call(command: 'log', arg: [string, string[]]): TPromise; - call(command: 'closeExtensionHostWindow', arg: string): TPromise; + call(command: 'closeExtensionHostWindow', arg: string[]): TPromise; call(command: 'showItemInFolder', arg: string): TPromise; call(command: 'openExternal', arg: string): TPromise; call(command: 'startCrashReporter', arg: Electron.CrashReporterStartOptions): TPromise; @@ -63,9 +65,10 @@ export class WindowsChannel implements IWindowsChannel { switch (command) { case 'event:onWindowOpen': return eventToCall(this.onWindowOpen); case 'event:onWindowFocus': return eventToCall(this.onWindowFocus); - case 'openFileFolderPicker': return this.service.openFileFolderPicker(arg[0], arg[1], arg[2]); - case 'openFilePicker': return this.service.openFilePicker(arg[0], arg[1], arg[2], arg[3]); - case 'openFolderPicker': return this.service.openFolderPicker(arg[0], arg[1], arg[2]); + case 'pickFileFolderAndOpen': return this.service.pickFileFolderAndOpen(arg[0], arg[1], arg[2]); + case 'pickFileAndOpen': return this.service.pickFileAndOpen(arg[0], arg[1], arg[2], arg[3]); + case 'pickFolderAndOpen': return this.service.pickFolderAndOpen(arg[0], arg[1], arg[2]); + case 'pickFolder': return this.service.pickFolder(arg); case 'reloadWindow': return this.service.reloadWindow(arg); case 'openDevTools': return this.service.openDevTools(arg); case 'toggleDevTools': return this.service.toggleDevTools(arg); @@ -81,6 +84,7 @@ export class WindowsChannel implements IWindowsChannel { case 'isMaximized': return this.service.isMaximized(arg); case 'maximizeWindow': return this.service.maximizeWindow(arg); case 'unmaximizeWindow': return this.service.unmaximizeWindow(arg); + case 'onWindowTitleDoubleClick': return this.service.onWindowTitleDoubleClick(arg); case 'setDocumentEdited': return this.service.setDocumentEdited(arg[0], arg[1]); case 'openWindow': return this.service.openWindow(arg[0], arg[1]); case 'openNewWindow': return this.service.openNewWindow(); @@ -113,16 +117,20 @@ export class WindowsChannelClient implements IWindowsService { private _onWindowFocus: Event = eventFromCall(this.channel, 'event:onWindowFocus'); get onWindowFocus(): Event { return this._onWindowFocus; } - openFileFolderPicker(windowId: number, forceNewWindow?: boolean, data?: ITelemetryData): TPromise { - return this.channel.call('openFileFolderPicker', [windowId, forceNewWindow, data]); + pickFileFolderAndOpen(windowId: number, forceNewWindow?: boolean, data?: ITelemetryData): TPromise { + return this.channel.call('pickFileFolderAndOpen', [windowId, forceNewWindow, data]); } - openFilePicker(windowId: number, forceNewWindow?: boolean, path?: string, data?: ITelemetryData): TPromise { - return this.channel.call('openFilePicker', [windowId, forceNewWindow, path, data]); + pickFileAndOpen(windowId: number, forceNewWindow?: boolean, path?: string, data?: ITelemetryData): TPromise { + return this.channel.call('pickFileAndOpen', [windowId, forceNewWindow, path, data]); } - openFolderPicker(windowId: number, forceNewWindow?: boolean, data?: ITelemetryData): TPromise { - return this.channel.call('openFolderPicker', [windowId, forceNewWindow, data]); + pickFolderAndOpen(windowId: number, forceNewWindow?: boolean, data?: ITelemetryData): TPromise { + return this.channel.call('pickFolderAndOpen', [windowId, forceNewWindow, data]); + } + + pickFolder(options?: { buttonLabel: string; title: string; }): TPromise { + return this.channel.call('pickFolder', options); } reloadWindow(windowId: number): TPromise { @@ -185,6 +193,10 @@ export class WindowsChannelClient implements IWindowsService { return this.channel.call('unmaximizeWindow', windowId); } + onWindowTitleDoubleClick(windowId: number): TPromise { + return this.channel.call('onWindowTitleDoubleClick', windowId); + } + setDocumentEdited(windowId: number, flag: boolean): TPromise { return this.channel.call('setDocumentEdited', [windowId, flag]); } @@ -229,8 +241,8 @@ export class WindowsChannelClient implements IWindowsService { return this.channel.call('log', [severity, messages]); } - closeExtensionHostWindow(extensionDevelopmentPath: string): TPromise { - return this.channel.call('closeExtensionHostWindow', extensionDevelopmentPath); + closeExtensionHostWindow(extensionDevelopmentPaths: string[]): TPromise { + return this.channel.call('closeExtensionHostWindow', extensionDevelopmentPaths); } showItemInFolder(path: string): TPromise { diff --git a/src/vs/platform/windows/electron-browser/windowService.ts b/src/vs/platform/windows/electron-browser/windowService.ts index c5d2e5c7e8a7d..1ed22b28043b8 100644 --- a/src/vs/platform/windows/electron-browser/windowService.ts +++ b/src/vs/platform/windows/electron-browser/windowService.ts @@ -22,16 +22,20 @@ export class WindowService implements IWindowService { return this.windowId; } - openFileFolderPicker(forceNewWindow?: boolean, data?: ITelemetryData): TPromise { - return this.windowsService.openFileFolderPicker(this.windowId, forceNewWindow, data); + pickFileFolderAndOpen(forceNewWindow?: boolean, data?: ITelemetryData): TPromise { + return this.windowsService.pickFileFolderAndOpen(this.windowId, forceNewWindow, data); } - openFilePicker(forceNewWindow?: boolean, path?: string, data?: ITelemetryData): TPromise { - return this.windowsService.openFilePicker(this.windowId, forceNewWindow, path, data); + pickFileAndOpen(forceNewWindow?: boolean, path?: string, data?: ITelemetryData): TPromise { + return this.windowsService.pickFileAndOpen(this.windowId, forceNewWindow, path, data); } - openFolderPicker(forceNewWindow?: boolean, data?: ITelemetryData): TPromise { - return this.windowsService.openFolderPicker(this.windowId, forceNewWindow, data); + pickFolderAndOpen(forceNewWindow?: boolean, data?: ITelemetryData): TPromise { + return this.windowsService.pickFolderAndOpen(this.windowId, forceNewWindow, data); + } + + pickFolder(options?: { buttonLabel: string; title: string; }): TPromise { + return this.windowsService.pickFolder(options); } reloadWindow(): TPromise { @@ -90,6 +94,10 @@ export class WindowService implements IWindowService { return this.windowsService.unmaximizeWindow(this.windowId); } + onWindowTitleDoubleClick(): TPromise { + return this.windowsService.onWindowTitleDoubleClick(this.windowId); + } + setDocumentEdited(flag: boolean): TPromise { return this.windowsService.setDocumentEdited(this.windowId, flag); } diff --git a/src/vs/platform/windows/electron-main/windows.ts b/src/vs/platform/windows/electron-main/windows.ts new file mode 100644 index 0000000000000..c31a706d3a668 --- /dev/null +++ b/src/vs/platform/windows/electron-main/windows.ts @@ -0,0 +1,86 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { TPromise } from 'vs/base/common/winjs.base'; +import { OpenContext, IWindowConfiguration, ReadyState, IPath } from 'vs/platform/windows/common/windows'; +import { ParsedArgs } from 'vs/platform/environment/common/environment'; +import Event from 'vs/base/common/event'; +import { ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; +import { IProcessEnvironment } from 'vs/base/common/platform'; + +export interface ICodeWindow { + id: number; + win: Electron.BrowserWindow; + config: IWindowConfiguration; + openedWorkspacePath: string; + + readyState: ReadyState; + + close(): void; + + send(channel: string, ...args: any[]): void; + sendWhenReady(channel: string, ...args: any[]): void; + + toggleFullScreen(): void; + hasHiddenTitleBarStyle(): boolean; + setRepresentedFilename(name: string): void; + getRepresentedFilename(): string; + onWindowTitleDoubleClick(): void; +} + +export const IWindowsMainService = createDecorator('windowsMainService'); + +export interface IWindowsMainService { + _serviceBrand: any; + + // events + onWindowReady: Event; + onWindowClose: Event; + onWindowReload: Event; + onPathsOpen: Event; + + // methods + ready(initialUserEnv: IProcessEnvironment): void; + reload(win: ICodeWindow, cli?: ParsedArgs): void; + open(openConfig: IOpenConfiguration): ICodeWindow[]; + openExtensionDevelopmentHostWindow(openConfig: IOpenConfiguration): void; + pickFileFolderAndOpen(forceNewWindow?: boolean, data?: ITelemetryData): void; + pickFileAndOpen(forceNewWindow?: boolean, path?: string, window?: ICodeWindow, data?: ITelemetryData): void; + pickFolderAndOpen(forceNewWindow?: boolean, window?: ICodeWindow, data?: ITelemetryData): void; + pickFolder(options?: { buttonLabel: string; title: string; }): TPromise; + focusLastActive(cli: ParsedArgs, context: OpenContext): ICodeWindow; + getLastActiveWindow(): ICodeWindow; + findWindow(workspacePath: string, filePath?: string, extensionDevelopmentPath?: string): ICodeWindow; + openNewWindow(context: OpenContext): void; + sendToFocused(channel: string, ...args: any[]): void; + sendToAll(channel: string, payload: any, windowIdsToIgnore?: number[]): void; + getFocusedWindow(): ICodeWindow; + getWindowById(windowId: number): ICodeWindow; + getWindows(): ICodeWindow[]; + getWindowCount(): number; + quit(): void; +} + +export interface IOpenConfiguration { + context: OpenContext; + cli: ParsedArgs; + userEnv?: IProcessEnvironment; + pathsToOpen?: string[]; + preferNewWindow?: boolean; + forceNewWindow?: boolean; + forceReuseWindow?: boolean; + forceEmpty?: boolean; + windowToUse?: ICodeWindow; + diffMode?: boolean; + initialStartup?: boolean; +} + +export interface ISharedProcess { + whenReady(): TPromise; + toggle(): void; +} \ No newline at end of file diff --git a/src/vs/platform/windows/electron-main/windowsService.ts b/src/vs/platform/windows/electron-main/windowsService.ts index f74c4e5af3997..28a9318a7ecd1 100644 --- a/src/vs/platform/windows/electron-main/windowsService.ts +++ b/src/vs/platform/windows/electron-main/windowsService.ts @@ -9,23 +9,16 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { assign } from 'vs/base/common/objects'; import URI from 'vs/base/common/uri'; -import { IWindowsService } from 'vs/platform/windows/common/windows'; +import { IWindowsService, OpenContext } from 'vs/platform/windows/common/windows'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { shell, crashReporter, app } from 'electron'; import Event, { chain } from 'vs/base/common/event'; import { fromEventEmitter } from 'vs/base/node/event'; import { IURLService } from 'vs/platform/url/common/url'; import { ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; - -// TODO@Joao: remove this dependency, move all implementation to this class -import { OpenContext } from 'vs/code/common/windows'; -import { IWindowsMainService } from 'vs/code/electron-main/windows'; -import { ILifecycleService } from "vs/code/electron-main/lifecycle"; - -export interface ISharedProcess { - whenReady(): TPromise; - toggle(): void; -} +import { ILifecycleService } from "vs/platform/lifecycle/electron-main/lifecycleMain"; +import { IWindowsMainService, ISharedProcess } from "vs/platform/windows/electron-main/windows"; +import { IHistoryMainService } from "vs/platform/history/electron-main/historyMainService"; export class WindowsService implements IWindowsService, IDisposable { @@ -41,57 +34,69 @@ export class WindowsService implements IWindowsService, IDisposable { @IWindowsMainService private windowsMainService: IWindowsMainService, @IEnvironmentService private environmentService: IEnvironmentService, @IURLService urlService: IURLService, - @ILifecycleService private lifecycleService: ILifecycleService + @ILifecycleService private lifecycleService: ILifecycleService, + @IHistoryMainService private historyService: IHistoryMainService ) { + // Catch file URLs chain(urlService.onOpenURL) .filter(uri => uri.authority === 'file' && !!uri.path) .map(uri => URI.file(uri.fsPath)) .on(this.openFileForURI, this, this.disposables); + + // Catch extension URLs when there are no windows open + chain(urlService.onOpenURL) + .filter(uri => /^extension/.test(uri.path)) + .filter(() => this.windowsMainService.getWindowCount() === 0) + .on(this.openExtensionForURI, this, this.disposables); } - openFileFolderPicker(windowId: number, forceNewWindow?: boolean, data?: ITelemetryData): TPromise { - this.windowsMainService.openFileFolderPicker(forceNewWindow, data); + pickFileFolderAndOpen(windowId: number, forceNewWindow?: boolean, data?: ITelemetryData): TPromise { + this.windowsMainService.pickFileFolderAndOpen(forceNewWindow, data); return TPromise.as(null); } - openFilePicker(windowId: number, forceNewWindow?: boolean, path?: string, data?: ITelemetryData): TPromise { - this.windowsMainService.openFilePicker(forceNewWindow, path, undefined, data); + pickFileAndOpen(windowId: number, forceNewWindow?: boolean, path?: string, data?: ITelemetryData): TPromise { + this.windowsMainService.pickFileAndOpen(forceNewWindow, path, undefined, data); return TPromise.as(null); } - openFolderPicker(windowId: number, forceNewWindow?: boolean, data?: ITelemetryData): TPromise { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); - this.windowsMainService.openFolderPicker(forceNewWindow, vscodeWindow, data); + pickFolderAndOpen(windowId: number, forceNewWindow?: boolean, data?: ITelemetryData): TPromise { + const codeWindow = this.windowsMainService.getWindowById(windowId); + this.windowsMainService.pickFolderAndOpen(forceNewWindow, codeWindow, data); return TPromise.as(null); } + pickFolder(options?: { buttonLabel: string; title: string; }): TPromise { + return this.windowsMainService.pickFolder(options); + } + reloadWindow(windowId: number): TPromise { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); + const codeWindow = this.windowsMainService.getWindowById(windowId); - if (vscodeWindow) { - this.windowsMainService.reload(vscodeWindow); + if (codeWindow) { + this.windowsMainService.reload(codeWindow); } return TPromise.as(null); } openDevTools(windowId: number): TPromise { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); + const codeWindow = this.windowsMainService.getWindowById(windowId); - if (vscodeWindow) { - vscodeWindow.win.webContents.openDevTools(); + if (codeWindow) { + codeWindow.win.webContents.openDevTools(); } return TPromise.as(null); } toggleDevTools(windowId: number): TPromise { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); + const codeWindow = this.windowsMainService.getWindowById(windowId); - if (vscodeWindow) { - const contents = vscodeWindow.win.webContents; - if (vscodeWindow.hasHiddenTitleBarStyle() && !vscodeWindow.win.isFullScreen() && !contents.isDevToolsOpened()) { + if (codeWindow) { + const contents = codeWindow.win.webContents; + if (codeWindow.hasHiddenTitleBarStyle() && !codeWindow.win.isFullScreen() && !contents.isDevToolsOpened()) { contents.openDevTools({ mode: 'undocked' }); // due to https://github.com/electron/electron/issues/3647 } else { contents.toggleDevTools(); @@ -102,57 +107,57 @@ export class WindowsService implements IWindowsService, IDisposable { } closeFolder(windowId: number): TPromise { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); + const codeWindow = this.windowsMainService.getWindowById(windowId); - if (vscodeWindow) { - this.windowsMainService.open({ context: OpenContext.API, cli: this.environmentService.args, forceEmpty: true, windowToUse: vscodeWindow, forceReuseWindow: true }); + if (codeWindow) { + this.windowsMainService.open({ context: OpenContext.API, cli: this.environmentService.args, forceEmpty: true, windowToUse: codeWindow, forceReuseWindow: true }); } return TPromise.as(null); } toggleFullScreen(windowId: number): TPromise { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); + const codeWindow = this.windowsMainService.getWindowById(windowId); - if (vscodeWindow) { - vscodeWindow.toggleFullScreen(); + if (codeWindow) { + codeWindow.toggleFullScreen(); } return TPromise.as(null); } setRepresentedFilename(windowId: number, fileName: string): TPromise { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); + const codeWindow = this.windowsMainService.getWindowById(windowId); - if (vscodeWindow) { - vscodeWindow.win.setRepresentedFilename(fileName); + if (codeWindow) { + codeWindow.setRepresentedFilename(fileName); } return TPromise.as(null); } addToRecentlyOpen(paths: { path: string, isFile?: boolean }[]): TPromise { - this.windowsMainService.addToRecentPathsList(paths); + this.historyService.addToRecentPathsList(paths); return TPromise.as(null); } removeFromRecentlyOpen(paths: string[]): TPromise { - this.windowsMainService.removeFromRecentPathsList(paths); + this.historyService.removeFromRecentPathsList(paths); return TPromise.as(null); } clearRecentPathsList(): TPromise { - this.windowsMainService.clearRecentPathsList(); + this.historyService.clearRecentPathsList(); return TPromise.as(null); } getRecentlyOpen(windowId: number): TPromise<{ files: string[]; folders: string[]; }> { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); + const codeWindow = this.windowsMainService.getWindowById(windowId); - if (vscodeWindow) { - const { files, folders } = this.windowsMainService.getRecentPathsList(vscodeWindow.config.workspacePath, vscodeWindow.config.filesToOpen); + if (codeWindow) { + const { files, folders } = this.historyService.getRecentPathsList(codeWindow.config.workspacePath, codeWindow.config.filesToOpen); return TPromise.as({ files, folders }); } @@ -160,60 +165,70 @@ export class WindowsService implements IWindowsService, IDisposable { } focusWindow(windowId: number): TPromise { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); + const codeWindow = this.windowsMainService.getWindowById(windowId); - if (vscodeWindow) { - vscodeWindow.win.focus(); + if (codeWindow) { + codeWindow.win.focus(); } return TPromise.as(null); } isFocused(windowId: number): TPromise { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); + const codeWindow = this.windowsMainService.getWindowById(windowId); - if (vscodeWindow) { - return TPromise.as(vscodeWindow.win.isFocused()); + if (codeWindow) { + return TPromise.as(codeWindow.win.isFocused()); } return TPromise.as(null); } isMaximized(windowId: number): TPromise { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); + const codeWindow = this.windowsMainService.getWindowById(windowId); - if (vscodeWindow) { - return TPromise.as(vscodeWindow.win.isMaximized()); + if (codeWindow) { + return TPromise.as(codeWindow.win.isMaximized()); } return TPromise.as(null); } maximizeWindow(windowId: number): TPromise { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); + const codeWindow = this.windowsMainService.getWindowById(windowId); - if (vscodeWindow) { - vscodeWindow.win.maximize(); + if (codeWindow) { + codeWindow.win.maximize(); } return TPromise.as(null); } unmaximizeWindow(windowId: number): TPromise { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); + const codeWindow = this.windowsMainService.getWindowById(windowId); - if (vscodeWindow) { - vscodeWindow.win.unmaximize(); + if (codeWindow) { + codeWindow.win.unmaximize(); + } + + return TPromise.as(null); + } + + onWindowTitleDoubleClick(windowId: number): TPromise { + const codeWindow = this.windowsMainService.getWindowById(windowId); + + if (codeWindow) { + codeWindow.onWindowTitleDoubleClick(); } return TPromise.as(null); } setDocumentEdited(windowId: number, flag: boolean): TPromise { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); + const codeWindow = this.windowsMainService.getWindowById(windowId); - if (vscodeWindow && vscodeWindow.win.isDocumentEdited() !== flag) { - vscodeWindow.win.setDocumentEdited(flag); + if (codeWindow && codeWindow.win.isDocumentEdited() !== flag) { + codeWindow.win.setDocumentEdited(flag); } return TPromise.as(null); @@ -234,10 +249,10 @@ export class WindowsService implements IWindowsService, IDisposable { } showWindow(windowId: number): TPromise { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); + const codeWindow = this.windowsMainService.getWindowById(windowId); - if (vscodeWindow) { - vscodeWindow.win.show(); + if (codeWindow) { + codeWindow.win.show(); } return TPromise.as(null); @@ -245,7 +260,8 @@ export class WindowsService implements IWindowsService, IDisposable { getWindows(): TPromise<{ id: number; path: string; title: string; }[]> { const windows = this.windowsMainService.getWindows(); - const result = windows.map(w => ({ path: w.openedWorkspacePath, title: w.win.getTitle(), id: w.id })); + const result = windows.map(w => ({ path: w.openedWorkspacePath, title: w.win.getTitle(), id: w.id, filename: w.getRepresentedFilename() })); + return TPromise.as(result); } @@ -258,12 +274,12 @@ export class WindowsService implements IWindowsService, IDisposable { return TPromise.as(null); } - closeExtensionHostWindow(extensionDevelopmentPath: string): TPromise { - const windowOnExtension = this.windowsMainService.findWindow(null, null, extensionDevelopmentPath); - - if (windowOnExtension) { - windowOnExtension.win.close(); - } + closeExtensionHostWindow(extensionDevelopmentPaths: string[]): TPromise { + extensionDevelopmentPaths.map(p => this.windowsMainService.findWindow(null, null, p)).forEach(windowOnExtension => { + if (windowOnExtension) { + windowOnExtension.win.close(); + } + }); return TPromise.as(null); } @@ -310,7 +326,17 @@ export class WindowsService implements IWindowsService, IDisposable { return TPromise.as(null); } + /** + * This should only fire whenever an extension URL is open + * and there are no windows to handle it. + */ + private openExtensionForURI(uri: URI): TPromise { + const cli = assign(Object.create(null), this.environmentService.args); + this.windowsMainService.open({ context: OpenContext.API, cli }); + return TPromise.as(null); + } + dispose(): void { this.disposables = dispose(this.disposables); } -} +} \ No newline at end of file diff --git a/src/vs/platform/workspace/common/workspace.ts b/src/vs/platform/workspace/common/workspace.ts index 1218ddd4da827..0c5daf8472f05 100644 --- a/src/vs/platform/workspace/common/workspace.ts +++ b/src/vs/platform/workspace/common/workspace.ts @@ -6,9 +6,10 @@ import URI from 'vs/base/common/uri'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; -import paths = require('vs/base/common/paths'); -import { isEqualOrParent } from 'vs/platform/files/common/files'; +import * as paths from 'vs/base/common/paths'; +import { TrieMap } from 'vs/base/common/map'; import { isLinux } from 'vs/base/common/platform'; +import Event from 'vs/base/common/event'; export const IWorkspaceContextService = createDecorator('contextService'); @@ -24,7 +25,24 @@ export interface IWorkspaceContextService { * Provides access to the workspace object the platform is running with. This may be null if the workbench was opened * without workspace (empty); */ - getWorkspace(): IWorkspace; + getWorkspace(): ILegacyWorkspace; + + /** + * Provides access to the workspace object the platform is running with. This may be null if the workbench was opened + * without workspace (empty); + */ + getWorkspace2(): IWorkspace; + + /** + * An event which fires on workspace roots change. + */ + onDidChangeWorkspaceRoots: Event; + + /** + * Returns the root for the given resource from the workspace. + * Can be null if there is no workspace or the resource is not inside the workspace. + */ + getRoot(resource: URI): URI; /** * Returns iff the provided resource is inside the workspace or not. @@ -44,66 +62,122 @@ export interface IWorkspaceContextService { toResource: (workspaceRelativePath: string) => URI; } -export interface IWorkspace { +export interface ILegacyWorkspace { /** * the full uri of the workspace. this is a file:// URL to the location * of the workspace on disk. */ resource: URI; +} + +export interface IWorkspace { /** - * the unique identifier of the workspace. if the workspace is deleted and recreated - * the identifier also changes. this makes the uid more unique compared to the id which - * is just derived from the workspace name. + * the unique identifier of the workspace. */ - uid?: number; + readonly id: string; /** - * the name of the workspace + * the name of the workspace. */ - name?: string; + readonly name: string; + + /** + * Mutliple roots in this workspace. First entry is master and never changes. + */ + readonly roots: URI[]; } -export class WorkspaceContextService implements IWorkspaceContextService { +export class LegacyWorkspace implements ILegacyWorkspace { + private _name: string; - public _serviceBrand: any; + constructor(private _resource: URI, private _ctime?: number) { + this._name = paths.basename(this._resource.fsPath) || this._resource.fsPath; + } - private workspace: IWorkspace; + public get resource(): URI { + return this._resource; + } - constructor(workspace: IWorkspace) { - this.workspace = workspace; + public get name(): string { + return this._name; } - public getWorkspace(): IWorkspace { - return this.workspace; + public get ctime(): number { + return this._ctime; } - public hasWorkspace(): boolean { - return !!this.workspace; + public toWorkspaceRelativePath(resource: URI, toOSPath?: boolean): string { + if (this.contains(resource)) { + return paths.normalize(paths.relative(this._resource.fsPath, resource.fsPath), toOSPath); + } + + return null; } - public isInsideWorkspace(resource: URI): boolean { - if (resource && this.workspace) { - return isEqualOrParent(resource.fsPath, this.workspace.resource.fsPath, !isLinux /* ignorecase */); + private contains(resource: URI): boolean { + if (resource) { + return paths.isEqualOrParent(resource.fsPath, this._resource.fsPath, !isLinux /* ignorecase */); } return false; } - public toWorkspaceRelativePath(resource: URI, toOSPath?: boolean): string { - if (this.isInsideWorkspace(resource)) { - return paths.normalize(paths.relative(this.workspace.resource.fsPath, resource.fsPath), toOSPath); + public toResource(workspaceRelativePath: string, root?: URI): URI { + if (typeof workspaceRelativePath === 'string') { + return URI.file(paths.join(root ? root.fsPath : this._resource.fsPath, workspaceRelativePath)); } return null; } +} + +export class Workspace implements IWorkspace { + + private _rootsMap: TrieMap = new TrieMap(TrieMap.PathSplitter); + + constructor( + public readonly id: string, + private _name: string, + private _roots: URI[] + ) { + this.updateRootsMap(); + } + + public get roots(): URI[] { + return this._roots; + } + + public set roots(roots: URI[]) { + this._roots = roots; + this.updateRootsMap(); + } + + public get name(): string { + return this._name; + } - public toResource(workspaceRelativePath: string): URI { - if (typeof workspaceRelativePath === 'string' && this.workspace) { - return URI.file(paths.join(this.workspace.resource.fsPath, workspaceRelativePath)); + public set name(name: string) { + this._name = name; + } + + public getRoot(resource: URI): URI { + if (!resource) { + return null; } - return null; + return this._rootsMap.findSubstr(resource.fsPath); + } + + private updateRootsMap(): void { + this._rootsMap = new TrieMap(TrieMap.PathSplitter); + for (const root of this.roots) { + this._rootsMap.insert(root.fsPath, root); + } + } + + public toJSON(): IWorkspace { + return { id: this.id, roots: this.roots, name: this.name }; } } \ No newline at end of file diff --git a/src/vs/platform/workspace/test/common/testWorkspace.ts b/src/vs/platform/workspace/test/common/testWorkspace.ts index 237d85295236c..97c90a65d03d6 100644 --- a/src/vs/platform/workspace/test/common/testWorkspace.ts +++ b/src/vs/platform/workspace/test/common/testWorkspace.ts @@ -3,11 +3,16 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IWorkspace } from 'vs/platform/workspace/common/workspace'; import URI from 'vs/base/common/uri'; +import { Workspace } from 'vs/platform/workspace/common/workspace'; -export const TestWorkspace: IWorkspace = { - resource: URI.file('C:\\testWorkspace'), - name: 'Test Workspace', - uid: Date.now() -}; +const wsUri = URI.file('C:\\testWorkspace'); +export const TestWorkspace = testWorkspace(wsUri); + +export function testWorkspace(resource: URI): Workspace { + return new Workspace( + resource.toString(), + resource.fsPath, + [resource] + ); +} \ No newline at end of file diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 5b5cd0a27af2d..798aca698c1ba 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -201,7 +201,9 @@ declare module 'vscode' { * Get a word-range at the given position. By default words are defined by * common separators, like space, -, _, etc. In addition, per languge custom * [word definitions](#LanguageConfiguration.wordPattern) can be defined. It - * is also possible to provide a custom regular expression. + * is also possible to provide a custom regular expression. *Note* that a + * custom regular expression must not match the empty string and that it will + * be ignored if it does. * * The position will be [adjusted](#TextDocument.validatePosition). * @@ -698,6 +700,28 @@ declare module 'vscode' { Full = 7 } + /** + * Describes the behavior of decorations when typing/editing at their edges. + */ + export enum DecorationRangeBehavior { + /** + * The decoration's range will widen when edits occur at the start or end. + */ + OpenOpen = 0, + /** + * The decoration's range will not widen when edits occur at the start of end. + */ + ClosedClosed = 1, + /** + * The decoration's range will widen when edits occur at the start, but not at the end. + */ + OpenClosed = 2, + /** + * The decoration's range will widen when edits occur at the end, but not at the start. + */ + ClosedOpen = 3 + } + /** * Represents options to configure the behavior of showing a [document](#TextDocument) in an [editor](#TextEditor). */ @@ -721,14 +745,28 @@ declare module 'vscode' { preview?: boolean; } + /** + * A reference to one of the workbench colors as defined in https://code.visualstudio.com/docs/getstarted/theme-color-reference. + * Using a theme color is preferred over a custom color as it gives theme authors and users the possibility to change the color. + */ + export class ThemeColor { + + /** + * Creates a reference to a theme color. + * @param id of the color. The available colors are listed in https://code.visualstudio.com/docs/getstarted/theme-color-reference. + */ + constructor(id: string); + } + /** * Represents theme specific rendering styles for a [text editor decoration](#TextEditorDecorationType). */ export interface ThemableDecorationRenderOptions { /** * Background color of the decoration. Use rgba() and define transparent background colors to play well with other decorations. + * Alternativly a color from the color registry an be [referenced](#ColorIdentifier). */ - backgroundColor?: string; + backgroundColor?: string | ThemeColor; /** * CSS styling property that will be applied to text enclosed by a decoration. @@ -739,7 +777,7 @@ declare module 'vscode' { * CSS styling property that will be applied to text enclosed by a decoration. * Better use 'outline' for setting one or more of the individual outline properties. */ - outlineColor?: string; + outlineColor?: string | ThemeColor; /** * CSS styling property that will be applied to text enclosed by a decoration. @@ -762,7 +800,7 @@ declare module 'vscode' { * CSS styling property that will be applied to text enclosed by a decoration. * Better use 'border' for setting one or more of the individual border properties. */ - borderColor?: string; + borderColor?: string | ThemeColor; /** * CSS styling property that will be applied to text enclosed by a decoration. @@ -801,7 +839,7 @@ declare module 'vscode' { /** * CSS styling property that will be applied to text enclosed by a decoration. */ - color?: string; + color?: string | ThemeColor; /** * CSS styling property that will be applied to text enclosed by a decoration. @@ -823,7 +861,7 @@ declare module 'vscode' { /** * The color of the decoration in the overview ruler. Use rgba() and define transparent colors to play well with other decorations. */ - overviewRulerColor?: string; + overviewRulerColor?: string | ThemeColor; /** * Defines the rendering options of the attachment that is inserted before the decorated text @@ -850,6 +888,10 @@ declare module 'vscode' { * CSS styling property that will be applied to the decoration attachment. */ border?: string; + /** + * CSS styling property that will be applied to text enclosed by a decoration. + */ + borderColor?: string | ThemeColor; /** * CSS styling property that will be applied to the decoration attachment. */ @@ -857,11 +899,11 @@ declare module 'vscode' { /** * CSS styling property that will be applied to the decoration attachment. */ - color?: string; + color?: string | ThemeColor; /** * CSS styling property that will be applied to the decoration attachment. */ - backgroundColor?: string; + backgroundColor?: string | ThemeColor; /** * CSS styling property that will be applied to the decoration attachment. */ @@ -886,6 +928,12 @@ declare module 'vscode' { */ isWholeLine?: boolean; + /** + * Customize the growing behavior of the decoration when edits occur at the edges of the decoration's range. + * Defaults to `DecorationRangeBehavior.OpenOpen`. + */ + rangeBehavior?: DecorationRangeBehavior; + /** * The position in the overview ruler where the decoration should be rendered. */ @@ -987,7 +1035,7 @@ declare module 'vscode' { * callback executes. * * @param callback A function which can create edits using an [edit-builder](#TextEditorEdit). - * @param options The undo/redo behaviour around this edit. By default, undo stops will be created before and after this edit. + * @param options The undo/redo behavior around this edit. By default, undo stops will be created before and after this edit. * @return A promise that resolves with a value indicating if the edits could be applied. */ edit(callback: (editBuilder: TextEditorEdit) => void, options?: { undoStopBefore: boolean; undoStopAfter: boolean; }): Thenable; @@ -999,7 +1047,7 @@ declare module 'vscode' { * * @param snippet The snippet to insert in this edit. * @param location Position or range at which to insert the snippet, defaults to the current editor selection or selections. - * @param options The undo/redo behaviour around this edit. By default, undo stops will be created before and after this edit. + * @param options The undo/redo behavior around this edit. By default, undo stops will be created before and after this edit. * @return A promise that resolves with a value indicating if the snippet could be inserted. Note that the promise does not signal * that the snippet is completely filled-in or accepted. */ @@ -1379,7 +1427,7 @@ declare module 'vscode' { * Provide textual content for a given uri. * * The editor will use the returned string-content to create a readonly - * [document](TextDocument). Resources allocated should be released when + * [document](#TextDocument). Resources allocated should be released when * the corresponding document has been [closed](#workspace.onDidCloseTextDocument). * * @param uri An uri which scheme matches the scheme this provider was [registered](#workspace.registerTextDocumentContentProvider) for. @@ -3161,7 +3209,7 @@ declare module 'vscode' { } /** - * Denotes a column in the VS Code window. Columns are + * Denotes a column in the editor window. Columns are * used to show editors side by side. */ export enum ViewColumn { @@ -3283,7 +3331,7 @@ declare module 'vscode' { /** * The foreground color for this entry. */ - color: string | undefined; + color: string | ThemeColor | undefined; /** * The identifier of a command to run on click. The command must be @@ -3489,6 +3537,326 @@ declare module 'vscode' { update(key: string, value: any): Thenable; } + /** + * Controls the behaviour of the terminal's visibility. + */ + export enum TaskRevealKind { + /** + * Always brings the terminal to front if the task is executed. + */ + Always = 1, + + /** + * Only brings the terminal to front if a problem is detected executing the task + * (e.g. the task couldn't be started because). + */ + Silent = 2, + + /** + * The terminal never comes to front when the task is executed. + */ + Never = 3 + } + + /** + * Controls how the task channel is used between tasks + */ + export enum TaskPanelKind { + + /** + * Shares a panel with other tasks. This is the default. + */ + Shared = 1, + + /** + * Uses a dedicated panel for this tasks. The panel is not + * shared with other tasks. + */ + Dedicated = 2, + + /** + * Creates a new panel whenever this task is executed. + */ + New = 3 + } + + /** + * Controls how the task is presented in the UI. + */ + export interface TaskPresentationOptions { + /** + * Controls whether the task output is reveal in the user interface. + * Defaults to `RevealKind.Always`. + */ + reveal?: TaskRevealKind; + + /** + * Controls whether the command associated with the task is echoed + * in the user interface. + */ + echo?: boolean; + + /** + * Controls whether the panel showing the task output is taking focus. + */ + focus?: boolean; + + /** + * Controls if the task panel is used for this task only (dedicated), + * shared between tasks (shared) or if a new panel is created on + * every task execution (new). Defaults to `TaskInstanceKind.Shared` + */ + panel?: TaskPanelKind; + } + + /** + * A grouping for tasks. The editor by default supports the + * 'Clean', 'Build', 'RebuildAll' and 'Test' group. + */ + export class TaskGroup { + + /** + * The clean task group; + */ + public static Clean: TaskGroup; + + /** + * The build task group; + */ + public static Build: TaskGroup; + + /** + * The rebuild all task group; + */ + public static Rebuild: TaskGroup; + + /** + * The test all task group; + */ + public static Test: TaskGroup; + + private constructor(id: string, label: string); + } + + + /** + * A structure that defines a task kind in the system. + * The value must be JSON-stringifyable. + */ + export interface TaskDefinition { + /** + * The task definition descibing the task provided by an extension. + * Usually a task provider defines more properties to identify + * a task. They need to be defined in the package.json of the + * extension under the 'taskDefinitions' extension point. The npm + * task definition for example looks like this + * ```typescript + * interface NpmTaskDefinition extends TaskDefinition { + * script: string; + * } + * ``` + */ + readonly type: string; + + /** + * Additional attributes of a concrete task definition. + */ + [name: string]: any; + } + + /** + * Options for a process execution + */ + export interface ProcessExecutionOptions { + /** + * The current working directory of the executed program or shell. + * If omitted the tools current workspace root is used. + */ + cwd?: string; + + /** + * The additional environment of the executed program or shell. If omitted + * the parent process' environment is used. If provided it is merged with + * the parent process' environment. + */ + env?: { [key: string]: string }; + } + + /** + * The execution of a task happens as a external process + * without shell interaction. + */ + export class ProcessExecution { + + /** + * Creates a process execution. + * + * @param process The process to start. + * @param options Optional options for the started process. + */ + constructor(process: string, options?: ProcessExecutionOptions); + + /** + * Creates a process execution. + * + * @param process The process to start. + * @param args Arguments to be passed to the process. + * @param options Optional options for the started process. + */ + constructor(process: string, args: string[], options?: ProcessExecutionOptions); + + /** + * The process to be executed. + */ + process: string; + + /** + * The arguments passed to the process. Defaults to an empty array. + */ + args: string[]; + + /** + * The process options used when the process is executed. + * Defaults to undefined. + */ + options?: ProcessExecutionOptions; + } + + /** + * Options for a shell execution + */ + export interface ShellExecutionOptions { + /** + * The shell executable. + */ + executable?: string; + + /** + * The arguments to be passed to the shell executable used to run the task. + */ + shellArgs?: string[]; + + /** + * The current working directory of the executed shell. + * If omitted the tools current workspace root is used. + */ + cwd?: string; + + /** + * The additional environment of the executed shell. If omitted + * the parent process' environment is used. If provided it is merged with + * the parent process' environment. + */ + env?: { [key: string]: string }; + } + + + export class ShellExecution { + /** + * Creates a process execution. + * + * @param commandLine The command line to execute. + * @param options Optional options for the started the shell. + */ + constructor(commandLine: string, options?: ShellExecutionOptions); + + /** + * The shell command line + */ + commandLine: string; + + /** + * The shell options used when the command line is executed in a shell. + * Defaults to undefined. + */ + options?: ShellExecutionOptions; + } + + /** + * A task to execute + */ + export class Task { + + /** + * Creates a new task. + * + * @param definition The task definition as defined in the taskDefintions extension point. + * @param name The task's name. Is presented in the user interface. + * @param source The task's source (e.g. 'gulp', 'npm', ...). Is presented in the user interface. + * @param execution The process or shell execution. + * @param problemMatchers the names of problem matchers to use, like '$tsc' + * or '$eslint'. Problem matchers can be contributed by an extension using + * the `problemMatchers` extension point. + */ + constructor(taskDefinition: TaskDefinition, name: string, source: string, execution?: ProcessExecution | ShellExecution, problemMatchers?: string | string[]); + + /** + * The task's definition. + */ + definition: TaskDefinition; + + /** + * The task's name + */ + name: string; + + /** + * The task's execution engine + */ + execution: ProcessExecution | ShellExecution; + + /** + * Whether the task is a background task or not. + */ + isBackground: boolean; + + /** + * A human-readable string describing the source of this + * shell task, e.g. 'gulp' or 'npm'. + */ + source: string; + + /** + * The task group this tasks belongs to. See TaskGroup + * for a predefined set of available groups. + * Defaults to undefined meaning that the task doesn't + * belong to any special group. + */ + group?: TaskGroup; + + /** + * The presentation options. Defaults to an empty literal. + */ + presentationOptions: TaskPresentationOptions; + + /** + * The problem matchers attached to the task. Defaults to an empty + * array. + */ + problemMatchers: string[]; + } + + /** + * A task provider allows to add tasks to the task service. + * A task provider is registerd via #workspace.registerTaskProvider. + */ + export interface TaskProvider { + /** + * Provides tasks. + * @param token A cancellation token. + * @return an array of tasks + */ + provideTasks(token?: CancellationToken): ProviderResult; + + /** + * Resolves a task the has no execution set. + * @param task The task to resolve. + * @param token A cancellation token. + * @return the resolved task + */ + resolveTask(task: Task, token?: CancellationToken): ProviderResult; + } + /** * Namespace describing the environment the editor runs in. */ @@ -3959,6 +4327,106 @@ declare module 'vscode' { * @return A new Terminal. */ export function createTerminal(options: TerminalOptions): Terminal; + + /** + * Register a [TreeDataProvider](#TreeDataProvider) for the view contributed using the extension point `views`. + * @param viewId Id of the view contributed using the extension point `views`. + * @param treeDataProvider A [TreeDataProvider](#TreeDataProvider) that provides tree data for the view + */ + export function registerTreeDataProvider(viewId: string, treeDataProvider: TreeDataProvider): Disposable; + } + + /** + * A data provider that provides tree data + */ + export interface TreeDataProvider { + /** + * An optional event to signal that an element or root has changed. + * To signal that root has changed, do not pass any argument or pass `undefined` or `null`. + */ + onDidChangeTreeData?: Event; + + /** + * Get [TreeItem](#TreeItem) representation of the `element` + * + * @param element The element for which [TreeItem](#TreeItem) representation is asked for. + * @return [TreeItem](#TreeItem) representation of the element + */ + getTreeItem(element: T): TreeItem | Thenable; + + /** + * Get the children of `element` or root if no element is passed. + * + * @param element The element from which the provider gets children. Can be `undefined`. + * @return Children of `element` or root if no element is passed. + */ + getChildren(element?: T): ProviderResult; + } + + export class TreeItem { + /** + * A human-readable string describing this item + */ + label: string; + + /** + * The icon path for the tree item + */ + iconPath?: string | Uri | { light: string | Uri; dark: string | Uri }; + + /** + * The [command](#Command) which should be run when the tree item is selected. + */ + command?: Command; + + /** + * [TreeItemCollapsibleState](#TreeItemCollapsibleState) of the tree item. + */ + collapsibleState?: TreeItemCollapsibleState; + + /** + * Context value of the tree item. This can be used to contribute item specific actions in the tree. + * For example, a tree item is given a context value as `folder`. When contributing actions to `view/item/context` + * using `menus` extension point, you can specify context value for key `viewItem` in `when` expression like `viewItem == folder`. + * ``` + * "contributes": { + * "menus": { + * "view/item/context": [ + * { + * "command": "extension.deleteFolder", + * "when": "viewItem == folder" + * } + * ] + * } + * } + * ``` + * This will show action `extension.deleteFolder` only for items with `contextValue` is `folder`. + */ + contextValue?: string; + + /** + * @param label A human-readable string describing this item + * @param collapsibleState [TreeItemCollapsibleState](#TreeItemCollapsibleState) of the tree item. Default is [TreeItemCollapsibleState.None](#TreeItemCollapsibleState.None) + */ + constructor(label: string, collapsibleState?: TreeItemCollapsibleState); + } + + /** + * Collapsible state of the tree item + */ + export enum TreeItemCollapsibleState { + /** + * Determines an item can be neither collapsed nor expanded. Implies it has no children. + */ + None = 0, + /** + * Determines an item is collapsed + */ + Collapsed = 1, + /** + * Determines an item is expanded + */ + Expanded = 2 } /** @@ -4140,6 +4608,8 @@ declare module 'vscode' { * A glob pattern that filters the file events must be provided. Optionally, flags to ignore certain * kinds of events can be provided. To stop listening to events the watcher must be disposed. * + * *Note* that only files within the current [workspace](#workspace.rootPath) can be watched. + * * @param globPattern A glob pattern that is applied to the names of created, changed, and deleted files. * @param ignoreCreateEvents Ignore when files have been created. * @param ignoreChangeEvents Ignore when files have been changed. @@ -4149,7 +4619,7 @@ declare module 'vscode' { export function createFileSystemWatcher(globPattern: string, ignoreCreateEvents?: boolean, ignoreChangeEvents?: boolean, ignoreDeleteEvents?: boolean): FileSystemWatcher; /** - * The folder that is open in VS Code. `undefined` when no folder + * The folder that is open in the editor. `undefined` when no folder * has been opened. * * @readonly @@ -4267,7 +4737,9 @@ declare module 'vscode' { export const onDidCloseTextDocument: Event; /** - * An event that is emitted when a [text document](#TextDocument) is changed. + * An event that is emitted when a [text document](#TextDocument) is changed. This usually happens + * when the [contents](#TextDocument.getText) changes but also when other things like the + * [dirty](TextDocument#isDirty)-state changes. */ export const onDidChangeTextDocument: Event; @@ -4307,6 +4779,15 @@ declare module 'vscode' { * An event that is emitted when the [configuration](#WorkspaceConfiguration) changed. */ export const onDidChangeConfiguration: Event; + + /** + * Register a task provider. + * + * @param type The task kind type this provider is registered for. + * @param provider A task provider. + * @return A [disposable](#Disposable) that unregisters this provider when being disposed. + */ + export function registerTaskProvider(type: string, provider: TaskProvider): Disposable; } /** @@ -4735,7 +5216,7 @@ declare module 'vscode' { /** * The label of this source control resource group. */ - readonly label: string; + label: string; /** * Whether this source control resource group is hidden when it contains @@ -4897,7 +5378,7 @@ declare module 'vscode' { * Thenable is a common denominator between ES6 promises, Q, jquery.Deferred, WinJS.Promise, * and others. This API makes no assumption about what promise libary is being used which * enables reusing existing code without migrating to a specific promise implementation. Still, - * we recommend the use of native promises which are available in VS Code. + * we recommend the use of native promises which are available in this editor. */ interface Thenable { /** diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index f72a9baa87392..6a1baf8a1690b 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -7,611 +7,109 @@ declare module 'vscode' { - /** - * Defines a problem pattern - */ - export interface ProblemPattern { - - /** - * The regular expression to find a problem in the console output of an - * executed task. - */ - regexp: RegExp; - - /** - * The match group index of the filename. - * - * Defaults to 1 if omitted. - */ - file?: number; - - /** - * The match group index of the problems's location. Valid location - * patterns are: (line), (line,column) and (startLine,startColumn,endLine,endColumn). - * If omitted the line and colum properties are used. - */ - location?: number; - - /** - * The match group index of the problem's line in the source file. - * - * Defaults to 2 if omitted. - */ - line?: number; - - /** - * The match group index of the problem's character in the source file. - * - * Defaults to 3 if omitted. - */ - character?: number; - - /** - * The match group index of the problem's end line in the source file. - * - * Defaults to undefined. No end line is captured. - */ - endLine?: number; - - /** - * The match group index of the problem's end character in the source file. - * - * Defaults to undefined. No end column is captured. - */ - endCharacter?: number; - - /** - * The match group index of the problem's severity. - * - * Defaults to undefined. In this case the problem matcher's severity - * is used. - */ - severity?: number; - - /** - * The match group index of the problems's code. - * - * Defaults to undefined. No code is captured. - */ - code?: number; - - /** - * The match group index of the message. If omitted it defaults - * to 4 if location is specified. Otherwise it defaults to 5. - */ - message?: number; - - /** - * Specifies if the last pattern in a multi line problem matcher should - * loop as long as it does match a line consequently. Only valid on the - * last problem pattern in a multi line problem matcher. - */ - loop?: boolean; - } - - /** - * A multi line problem pattern. - */ - export type MultiLineProblemPattern = ProblemPattern[]; - - /** - * The way how the file location is interpreted - */ - export enum FileLocationKind { - /** - * VS Code should decide based on whether the file path found in the - * output is absolute or relative. A relative file path will be treated - * relative to the workspace root. - */ - Auto = 1, - - /** - * Always treat the file path relative. - */ - Relative = 2, - - /** - * Always treat the file path absolute. - */ - Absolute = 3 - } - - /** - * Controls to which kind of documents problems are applied. - */ - export enum ApplyToKind { - /** - * Problems are applied to all documents. - */ - AllDocuments = 1, - /** - * Problems are applied to open documents only. - */ - OpenDocuments = 2, - - /** - * Problems are applied to closed documents only. - */ - ClosedDocuments = 3 - } - - - /** - * A background monitor pattern - */ - export interface BackgroundPattern { - /** - * The actual regular expression - */ - regexp: RegExp; - - /** - * The match group index of the filename. If provided the expression - * is matched for that file only. - */ - file?: number; - } - - /** - * A description to control the activity of a problem matcher - * watching a background task. - */ - export interface BackgroundMonitor { - /** - * If set to true the monitor is in active mode when the task - * starts. This is equals of issuing a line that matches the - * beginPattern. - */ - activeOnStart?: boolean; - - /** - * If matched in the output the start of a background activity is signaled. - */ - beginsPattern: RegExp | BackgroundPattern; - - /** - * If matched in the output the end of a background activity is signaled. - */ - endsPattern: RegExp | BackgroundPattern; + export interface WorkspaceFoldersChangeEvent { + readonly addedFolders: Uri[]; + readonly removedFolders: Uri[]; } - /** - * Defines a problem matcher - */ - export interface ProblemMatcher { - /** - * The owner of a problem. Defaults to a generated id - * if omitted. - */ - owner?: string; - - /** - * The type of documents problems detected by this matcher - * apply to. Default to `ApplyToKind.AllDocuments` if omitted. - */ - applyTo?: ApplyToKind; - - /** - * How a file location recognize by a matcher should be interpreted. If omitted the file location - * if `FileLocationKind.Auto`. - */ - fileLocation?: FileLocationKind | string; - - /** - * The actual pattern used by the problem matcher. - */ - pattern: ProblemPattern | MultiLineProblemPattern; - - /** - * The default severity of a detected problem in the output. Used - * if the `ProblemPattern` doesn't define a severity match group. - */ - severity?: DiagnosticSeverity; - - /** - * A background monitor for tasks that are running in the background. - */ - backgound?: BackgroundMonitor; - } - - /** - * Controls the behaviour of the terminal's visibility. - */ - export enum RevealKind { - /** - * Always brings the terminal to front if the task is executed. - */ - Always = 1, - - /** - * Only brings the terminal to front if a problem is detected executing the task - * (e.g. the task couldn't be started because). - */ - Silent = 2, - - /** - * The terminal never comes to front when the task is executed. - */ - Never = 3 - } + export namespace workspace { - /** - * Controls terminal specific behaviour. - */ - export interface TerminalBehaviour { /** - * Controls whether the terminal executing a task is brought to front or not. - * Defaults to `RevealKind.Always`. - */ - reveal?: RevealKind; + * List of workspace folders or `undefined` when no folder is open. The *first* + * element in the array is equal to the [`rootPath`](#workspace.rootPath) + */ + export let workspaceFolders: Uri[] | undefined; /** - * Controls whether the command is echoed in the terminal or not. + * An event that is emitted when a workspace folder is added or removed. */ - echo?: boolean; + export const onDidChangeWorkspaceFolders: Event; } + export interface WorkspaceConfiguration2 extends WorkspaceConfiguration { - export interface ProcessOptions { - /** - * The current working directory of the executed program or shell. - * If omitted VSCode's current workspace root is used. - */ - cwd?: string; + inspect(section: string): { key: string; defaultValue?: T; globalValue?: T; workspaceValue?: T, folderValue?: T } | undefined; - /** - * The additional environment of the executed program or shell. If omitted - * the parent process' environment is used. If provided it is merged with - * the parent process' environment. - */ - env?: { [key: string]: string }; } - export namespace TaskGroup { - /** - * The clean task group - */ - export const Clean: 'clean'; - /** - * The build task group - */ - export const Build: 'build'; - /** - * The rebuild all task group - */ - export const RebuildAll: 'rebuildAll'; - /** - * The test task group - */ - export const Test: 'test'; - } - - /** - * The supported task groups. - */ - export type TaskGroup = 'clean' | 'build' | 'rebuildAll' | 'test'; - - /** - * A task that starts an external process. - */ - export class ProcessTask { - - /** - * Creates a process task. - * - * @param name the task's name. Is presented in the user interface. - * @param process the process to start. - * @param problemMatchers the problem matchers to use. - */ - constructor(name: string, process: string, ...problemMatchers: ProblemMatcher[]); - + export namespace workspace { /** - * Creates a process task. + * Get a configuration object. * - * @param name the task's name. Is presented in the user interface. - * @param process the process to start. - * @param args arguments to be passed to the process. - * @param problemMatchers the problem matchers to use. - */ - constructor(name: string, process: string, args: string[], ...problemMatchers: ProblemMatcher[]); - - /** - * Creates a process task. + * When a section-identifier is provided only that part of the configuration + * is returned. Dots in the section-identifier are interpreted as child-access, + * like `{ myExt: { setting: { doIt: true }}}` and `getConfiguration('myExt.setting').get('doIt') === true`. * - * @param name the task's name. Is presented in the user interface. - * @param process the process to start. - * @param args arguments to be passed to the process. - * @param options additional options for the started process. - * @param problemMatchers the problem matchers to use. - */ - constructor(name: string, process: string, args: string[], options: ProcessOptions, ...problemMatchers: ProblemMatcher[]); - - /** - * The task's name - */ - readonly name: string; - - /** - * The task's identifier. If omitted the name is - * used as an identifier. - */ - identifier: string; - - /** - * Whether the task is a background task or not. - */ - isBackground: boolean; - - /** - * The process to be executed. - */ - readonly process: string; - - /** - * The arguments passed to the process. Defaults to an empty array. - */ - args: string[]; - - /** - * The task group this tasks belongs to. Defaults to undefined meaning - * that the task doesn't belong to any special group. - */ - group?: TaskGroup; - - /** - * The process options used when the process is executed. - * Defaults to an empty object literal. - */ - options: ProcessOptions; - - /** - * The terminal options. Defaults to an empty object literal. - */ - terminal: TerminalBehaviour; - - /** - * The problem matchers attached to the task. Defaults to an empty - * array. - */ - problemMatchers: ProblemMatcher[]; - } - - export type ShellOptions = { - /** - * The shell executable. - */ - executable: string; - - /** - * The arguments to be passed to the shell executable used to run the task. - */ - shellArgs?: string[]; - - /** - * The current working directory of the executed shell. - * If omitted VSCode's current workspace root is used. - */ - cwd?: string; - - /** - * The additional environment of the executed shell. If omitted - * the parent process' environment is used. If provided it is merged with - * the parent process' environment. - */ - env?: { [key: string]: string }; - } | { - /** - * The current working directory of the executed shell. - * If omitted VSCode's current workspace root is used. - */ - cwd: string; - - /** - * The additional environment of the executed shell. If omitted - * the parent process' environment is used. If provided it is merged with - * the parent process' environment. - */ - env?: { [key: string]: string }; - } | { - /** - * The current working directory of the executed shell. - * If omitted VSCode's current workspace root is used. - */ - cwd?: string; - - /** - * The additional environment of the executed shell. If omitted - * the parent process' environment is used. If provided it is merged with - * the parent process' environment. - */ - env: { [key: string]: string }; - }; - - /** - * A task that executes a shell command. - */ - export class ShellTask { - - /** - * Creates a shell task. + * When a resource is provided, only configuration scoped to that resource + * is returned. * - * @param name the task's name. Is presented in the user interface. - * @param commandLine the command line to execute. - * @param problemMatchers the problem matchers to use. - */ - constructor(name: string, commandLine: string, ...problemMatchers: ProblemMatcher[]); - - /** - * Creates a shell task. + * If editor is opened with `no folders` then returns the global configuration. * - * @param name the task's name. Is presented in the user interface. - * @param commandLine the command line to execute. - * @param options additional options used when creating the shell. - * @param problemMatchers the problem matchers to use. - */ - constructor(name: string, commandLine: string, options: ShellOptions, ...problemMatchers: ProblemMatcher[]); - - /** - * The task's name - */ - readonly name: string; - - /** - * The task's identifier. If omitted the name is - * used as an identifier. - */ - identifier: string; - - /** - * Whether the task is a background task or not. - */ - isBackground: boolean; - - /** - * The command line to execute. - */ - readonly commandLine: string; - - /** - * The task group this tasks belongs to. Defaults to undefined meaning - * that the task doesn't belong to any special group. - */ - group?: TaskGroup; - - /** - * The shell options used when the shell is executed. Defaults to an - * empty object literal. - */ - options: ShellOptions; - - /** - * The terminal options. Defaults to an empty object literal. - */ - terminal: TerminalBehaviour; - - /** - * The problem matchers attached to the task. Defaults to an empty - * array. - */ - problemMatchers: ProblemMatcher[]; - } - - export type Task = ProcessTask | ShellTask; - - /** - * A task provider allows to add tasks to the task service. - * A task provider is registerd via #workspace.registerTaskProvider. - */ - export interface TaskProvider { - /** - * Provides additional tasks. - * @param token A cancellation token. - * @return a #TaskSet - */ - provideTasks(token: CancellationToken): ProviderResult; - } - - export namespace workspace { - /** - * Register a task provider. + * If editor is opened with `folders` then returns the configuration from the folder in which the resource belongs to. * - * @param provider A task provider. - * @return A [disposable](#Disposable) that unregisters this provider when being disposed. - */ - export function registerTaskProvider(provider: TaskProvider): Disposable; - - } - - export namespace window { - - export function sampleFunction(): Thenable; - } - - export namespace window { - - /** - * Create a new [TreeView](#TreeView) instance. + * If resource does not belongs to any opened folders, then returns the workspace configuration. * - * @param viewId A unique id that identifies the view. - * @param provider A [TreeDataProvider](#TreeDataProvider). - * @return An instance of [TreeView](#TreeView). + * @param section A dot-separated identifier. + * @param resource A resource for which configuration is asked + * @return The full workspace configuration or a subset. */ - export function createTreeView(viewId: string, provider: TreeDataProvider): TreeView; + export function getConfiguration2(section?: string, resource?: Uri): WorkspaceConfiguration2; } /** - * An source control is able to provide [resource states](#SourceControlResourceState) - * to the editor and interact with the editor in several source control related ways. - */ - export interface TreeView { - - /** - * Refresh the given nodes - */ - refresh(...nodes: T[]): void; - - /** - * Dispose this view - */ - dispose(): void; - } - - /** - * A data provider for a tree view contribution. + * Represents the workspace configuration. + * + * The workspace configuration is a merged view of + * + * - Default configuration + * - Global configuration + * - Workspace configuration (if available) + * - Folder configuration of the [resource](#workspace.getConfiguration2) (if requested and available) * - * The contributed tree view will ask the corresponding provider to provide the root - * node and resolve children for each node. In addition, the provider could **optionally** - * provide the following information for each node: - * - label: A human-readable label used for rendering the node. - * - hasChildren: Whether the node has children and is expandable. - * - clickCommand: A command to execute when the node is clicked. + * **Global configuration** comes from User Settings and shadows Defaults. + * + * **Workspace configuration** comes from the `.vscode` folder under first [workspace folders](#workspace.workspaceFolders) + * and shadows Globals configuration. + * + * **Folder configurations** comes from `.vscode` folder under [workspace folders](#workspace.workspaceFolders). Each [workspace folder](#workspace.workspaceFolders) + * has a configuration and the requested resource determines which folder configuration to pick. Folder configuration shodows Workspace configuration. + * + * *Note:* Workspace and Folder configurations contains settings from `launch.json` and `tasks.json` files. Their basename will be + * part of the section identifier. The following snippets shows how to retrieve all configurations + * from `launch.json`: + * + * ```ts + * // launch.json configuration + * const config = workspace.getConfiguration('launch', workspace.workspaceFolders[1]); + * + * // retrieve values + * const values = config.get('configurations'); + * ``` */ - export interface TreeDataProvider { + export interface WorkspaceConfiguration2 extends WorkspaceConfiguration { /** - * Provide the root node. This function will be called when the tree explorer is activated - * for the first time. The root node is hidden and its direct children will be displayed on the first level of - * the tree explorer. + * Retrieve all information about a configuration setting. A configuration value + * often consists of a *default* value, a global or installation-wide value, + * a workspace-specific value and a folder-specific value. * - * @return The root node. - */ - provideRootNode(): T | Thenable; - - /** - * Resolve the children of `node`. + * The *effective* value (returned by [`get`](#WorkspaceConfiguration.get)) + * is computed like this: `defaultValue` overwritten by `globalValue`, + * `globalValue` overwritten by `workspaceValue`. `workspaceValue` overwritten by `folderValue`. * - * @param node The node from which the provider resolves children. - * @return Children of `node`. - */ - resolveChildren?(node: T): T[] | Thenable; - - /** - * Provide a human-readable string that will be used for rendering the node. Default to use - * `node.toString()` if not provided. + * *Note:* The configuration name must denote a leaf in the configuration tree + * (`editor.fontSize` vs `editor`) otherwise no result is returned. * - * @param node The node from which the provider computes label. - * @return A human-readable label. + * @param section Configuration name, supports _dotted_ names. + * @return Information about a configuration setting or `undefined`. */ - getLabel?(node: T): string; + inspect(section: string): { key: string; defaultValue?: T; globalValue?: T; workspaceValue?: T, folderValue?: T } | undefined; - /** - * Determine if `node` has children and is expandable. Default to `true` if not provided. - * - * @param node The node to determine if it has children and is expandable. - * @return A boolean that determines if `node` has children and is expandable. - */ - getHasChildren?(node: T): boolean; + } - /** - * Get the command to execute when `node` is clicked. - * - * Commands can be registered through [registerCommand](#commands.registerCommand). `node` will be provided - * as the first argument to the command's callback function. - * - * @param node The node that the command is associated with. - * @return The command to execute when `node` is clicked. - */ - getClickCommand?(node: T): Command; + export namespace window { + + export function sampleFunction(): Thenable; } /** @@ -691,4 +189,67 @@ declare module 'vscode' { */ onData(callback: (data: string) => any): void; } + + /** + * Namespace for dealing with debug sessions. + */ + export namespace debug { + + /** + * An [event](#Event) which fires when a debug session has terminated. + */ + export const onDidTerminateDebugSession: Event; + + /** + * Create a new debug session based on the given launchConfig. + * @param launchConfig + */ + export function createDebugSession(launchConfig: DebugConfiguration): Thenable; + } + + /** + * Configuration for a debug session. + */ + export interface DebugConfiguration { + /** + * The type for the debug session. + */ + type: string; + + /** + * An optional name for the debug session. + */ + name?: string; + + /** + * The request type of the debug session. + */ + request: string; + + /** + * Additional debug type specific properties. + */ + [key: string]: any; + } + + /** + * A debug session. + */ + export interface DebugSession { + + /** + * The debug session's type from the debug configuration. + */ + readonly type: string; + + /** + * The debug session's name from the debug configuration. + */ + readonly name: string; + + /** + * Send a custom request to the debug adapter. + */ + customRequest(command: string, args?: any): Thenable; + } } diff --git a/src/vs/workbench/api/electron-browser/extensionHost.contribution.ts b/src/vs/workbench/api/electron-browser/extensionHost.contribution.ts new file mode 100644 index 0000000000000..0ea7d2b799feb --- /dev/null +++ b/src/vs/workbench/api/electron-browser/extensionHost.contribution.ts @@ -0,0 +1,109 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { IWorkbenchContribution, IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; +import { Registry } from 'vs/platform/registry/common/platform'; +import { IInstantiationService, IConstructorSignature0 } from 'vs/platform/instantiation/common/instantiation'; +import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; +import { MainContext, InstanceCollection } from '../node/extHost.protocol'; +import { IExtensionService } from 'vs/platform/extensions/common/extensions'; + +// --- addressable +import { MainThreadCommands } from './mainThreadCommands'; +import { MainThreadConfiguration } from './mainThreadConfiguration'; +import { MainThreadDebugService } from './mainThreadDebugService'; +import { MainThreadDiagnostics } from './mainThreadDiagnostics'; +import { MainThreadDocuments } from './mainThreadDocuments'; +import { MainThreadEditors } from './mainThreadEditors'; +import { MainThreadErrors } from './mainThreadErrors'; +import { MainThreadTreeViews } from './mainThreadTreeViews'; +import { MainThreadLanguageFeatures } from './mainThreadLanguageFeatures'; +import { MainThreadLanguages } from './mainThreadLanguages'; +import { MainThreadMessageService } from './mainThreadMessageService'; +import { MainThreadOutputService } from './mainThreadOutputService'; +import { MainThreadProgress } from './mainThreadProgress'; +import { MainThreadQuickOpen } from './mainThreadQuickOpen'; +import { MainThreadStatusBar } from './mainThreadStatusBar'; +import { MainThreadStorage } from './mainThreadStorage'; +import { MainThreadTelemetry } from './mainThreadTelemetry'; +import { MainThreadTerminalService } from './mainThreadTerminalService'; +import { MainThreadWorkspace } from './mainThreadWorkspace'; +import { MainProcessExtensionService } from './mainThreadExtensionService'; +import { MainThreadFileSystemEventService } from './mainThreadFileSystemEventService'; +import { MainThreadTask } from './mainThreadTask'; +import { MainThreadSCM } from './mainThreadSCM'; + +// --- other interested parties +import { MainThreadDocumentsAndEditors } from './mainThreadDocumentsAndEditors'; +import { JSONValidationExtensionPoint } from 'vs/platform/jsonschemas/common/jsonValidationExtensionPoint'; +import { LanguageConfigurationFileHandler } from 'vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint'; +import { SaveParticipant } from './mainThreadSaveParticipant'; + +// --- registers itself as service +import './mainThreadHeapService'; + +export class ExtHostContribution implements IWorkbenchContribution { + + constructor( + @IThreadService private threadService: IThreadService, + @IInstantiationService private instantiationService: IInstantiationService, + @IExtensionService private extensionService: IExtensionService + ) { + this.initExtensionSystem(); + } + + public getId(): string { + return 'vs.api.extHost'; + } + + private initExtensionSystem(): void { + const create = (ctor: IConstructorSignature0): T => { + return this.instantiationService.createInstance(ctor); + }; + + const documentsAndEditors = this.instantiationService.createInstance(MainThreadDocumentsAndEditors); + + // Addressable instances + const col = new InstanceCollection(); + col.define(MainContext.MainThreadCommands).set(create(MainThreadCommands)); + col.define(MainContext.MainThreadConfiguration).set(create(MainThreadConfiguration)); + col.define(MainContext.MainThreadDebugService).set(create(MainThreadDebugService)); + col.define(MainContext.MainThreadDiagnostics).set(create(MainThreadDiagnostics)); + col.define(MainContext.MainThreadDocuments).set(this.instantiationService.createInstance(MainThreadDocuments, documentsAndEditors)); + col.define(MainContext.MainThreadEditors).set(this.instantiationService.createInstance(MainThreadEditors, documentsAndEditors)); + col.define(MainContext.MainThreadErrors).set(create(MainThreadErrors)); + col.define(MainContext.MainThreadTreeViews).set(create(MainThreadTreeViews)); + col.define(MainContext.MainThreadLanguageFeatures).set(create(MainThreadLanguageFeatures)); + col.define(MainContext.MainThreadLanguages).set(create(MainThreadLanguages)); + col.define(MainContext.MainThreadMessageService).set(create(MainThreadMessageService)); + col.define(MainContext.MainThreadOutputService).set(create(MainThreadOutputService)); + col.define(MainContext.MainThreadProgress).set(create(MainThreadProgress)); + col.define(MainContext.MainThreadQuickOpen).set(create(MainThreadQuickOpen)); + col.define(MainContext.MainThreadStatusBar).set(create(MainThreadStatusBar)); + col.define(MainContext.MainThreadStorage).set(create(MainThreadStorage)); + col.define(MainContext.MainThreadTelemetry).set(create(MainThreadTelemetry)); + col.define(MainContext.MainThreadTerminalService).set(create(MainThreadTerminalService)); + col.define(MainContext.MainThreadWorkspace).set(create(MainThreadWorkspace)); + col.define(MainContext.MainThreadSCM).set(create(MainThreadSCM)); + col.define(MainContext.MainThreadTask).set(create(MainThreadTask)); + if (this.extensionService instanceof MainProcessExtensionService) { + col.define(MainContext.MainProcessExtensionService).set(this.extensionService); + } + col.finish(true, this.threadService); + + // Other interested parties + create(JSONValidationExtensionPoint); + this.instantiationService.createInstance(LanguageConfigurationFileHandler); + create(MainThreadFileSystemEventService); + create(SaveParticipant); + } +} + +// Register File Tracker +Registry.as(WorkbenchExtensions.Workbench).registerWorkbenchContribution( + ExtHostContribution +); diff --git a/src/vs/workbench/api/node/mainThreadCommands.ts b/src/vs/workbench/api/electron-browser/mainThreadCommands.ts similarity index 98% rename from src/vs/workbench/api/node/mainThreadCommands.ts rename to src/vs/workbench/api/electron-browser/mainThreadCommands.ts index 88a77f1300950..bea731ce49753 100644 --- a/src/vs/workbench/api/node/mainThreadCommands.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadCommands.ts @@ -8,7 +8,7 @@ import { IThreadService } from 'vs/workbench/services/thread/common/threadServic import { ICommandService, CommandsRegistry, ICommandHandlerDescription } from 'vs/platform/commands/common/commands'; import { IDisposable } from 'vs/base/common/lifecycle'; import { TPromise } from 'vs/base/common/winjs.base'; -import { ExtHostContext, MainThreadCommandsShape, ExtHostCommandsShape } from './extHost.protocol'; +import { ExtHostContext, MainThreadCommandsShape, ExtHostCommandsShape } from '../node/extHost.protocol'; export class MainThreadCommands extends MainThreadCommandsShape { diff --git a/src/vs/workbench/api/node/mainThreadConfiguration.ts b/src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts similarity index 86% rename from src/vs/workbench/api/node/mainThreadConfiguration.ts rename to src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts index c77a7b026f471..b08d8877d07ab 100644 --- a/src/vs/workbench/api/node/mainThreadConfiguration.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts @@ -9,7 +9,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration'; import { IConfigurationEditingService, ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; -import { MainThreadConfigurationShape, ExtHostContext } from './extHost.protocol'; +import { MainThreadConfigurationShape, ExtHostContext } from '../node/extHost.protocol'; export class MainThreadConfiguration extends MainThreadConfigurationShape { @@ -26,7 +26,7 @@ export class MainThreadConfiguration extends MainThreadConfigurationShape { const proxy = threadService.get(ExtHostContext.ExtHostConfiguration); this._toDispose = configurationService.onDidUpdateConfiguration(() => { - proxy.$acceptConfigurationChanged(configurationService.values()); + proxy.$acceptConfigurationChanged(configurationService.getConfigurationData()); }); } @@ -35,10 +35,10 @@ export class MainThreadConfiguration extends MainThreadConfigurationShape { } $updateConfigurationOption(target: ConfigurationTarget, key: string, value: any): TPromise { - return this._configurationEditingService.writeConfiguration(target, { key, value }); + return this._configurationEditingService.writeConfiguration(target, { key, value }, { donotNotifyError: true }); } $removeConfigurationOption(target: ConfigurationTarget, key: string): TPromise { - return this._configurationEditingService.writeConfiguration(target, { key, value: undefined }); + return this._configurationEditingService.writeConfiguration(target, { key, value: undefined }, { donotNotifyError: true }); } } diff --git a/src/vs/workbench/api/electron-browser/mainThreadDebugService.ts b/src/vs/workbench/api/electron-browser/mainThreadDebugService.ts new file mode 100644 index 0000000000000..dc3186f738d2f --- /dev/null +++ b/src/vs/workbench/api/electron-browser/mainThreadDebugService.ts @@ -0,0 +1,68 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import { IDebugService, IProcess, IConfig } from 'vs/workbench/parts/debug/common/debug'; +import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { ExtHostContext, ExtHostDebugServiceShape, MainThreadDebugServiceShape, DebugSessionUUID } from '../node/extHost.protocol'; + +export class MainThreadDebugService extends MainThreadDebugServiceShape { + + private _proxy: ExtHostDebugServiceShape; + private _toDispose: IDisposable[]; + + constructor( + @IThreadService threadService: IThreadService, + @IDebugService private debugService: IDebugService + ) { + super(); + this._proxy = threadService.get(ExtHostContext.ExtHostDebugService); + this._toDispose = []; + this._toDispose.push(debugService.onDidEndProcess(proc => this._proxy.$acceptDebugSessionTerminated(proc.getId(), proc.configuration.type, proc.name))); + } + + public dispose(): void { + this._toDispose = dispose(this._toDispose); + } + + public $createDebugSession(configuration: IConfig): TPromise { + if (configuration.request !== 'launch' && configuration.request !== 'attach') { + return TPromise.wrapError(new Error(`only 'launch' or 'attach' allowed for 'request' attribute`)); + } + return this.debugService.createProcess(configuration).then(process => { + if (process) { + return process.getId(); + } + return TPromise.wrapError(new Error('cannot create debug session')); + }, err => { + return TPromise.wrapError(err && err.message ? err.message : 'cannot create debug session'); + }); + } + + public $customDebugAdapterRequest(sessionId: DebugSessionUUID, request: string, args: any): TPromise { + const process = this._findProcessByUUID(sessionId); + if (process) { + return process.session.custom(request, args).then(response => { + if (response.success) { + return response.body; + } else { + return TPromise.wrapError(new Error(response.message)); + } + }); + } + return TPromise.wrapError(new Error('debug session not found')); + } + + private _findProcessByUUID(processId: DebugSessionUUID): IProcess | null { + const processes = this.debugService.getModel().getProcesses(); + const result = processes.filter(process => process.getId() === processId); + if (result.length > 0) { + return processes[0]; // there can only be one + } + return null; + } +} diff --git a/src/vs/workbench/api/node/mainThreadDiagnostics.ts b/src/vs/workbench/api/electron-browser/mainThreadDiagnostics.ts similarity index 94% rename from src/vs/workbench/api/node/mainThreadDiagnostics.ts rename to src/vs/workbench/api/electron-browser/mainThreadDiagnostics.ts index 6602a4284e391..f0abcbb648684 100644 --- a/src/vs/workbench/api/node/mainThreadDiagnostics.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDiagnostics.ts @@ -7,7 +7,7 @@ import { IMarkerService, IMarkerData } from 'vs/platform/markers/common/markers'; import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; -import { MainThreadDiagnosticsShape } from './extHost.protocol'; +import { MainThreadDiagnosticsShape } from '../node/extHost.protocol'; export class MainThreadDiagnostics extends MainThreadDiagnosticsShape { diff --git a/src/vs/workbench/api/node/mainThreadDocuments.ts b/src/vs/workbench/api/electron-browser/mainThreadDocuments.ts similarity index 88% rename from src/vs/workbench/api/node/mainThreadDocuments.ts rename to src/vs/workbench/api/electron-browser/mainThreadDocuments.ts index 153ddc8232f29..af6464a5d7dd3 100644 --- a/src/vs/workbench/api/node/mainThreadDocuments.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDocuments.ts @@ -15,8 +15,8 @@ import { IFileService } from 'vs/platform/files/common/files'; import { IModeService } from 'vs/editor/common/services/modeService'; import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; -import { ExtHostContext, MainThreadDocumentsShape, ExtHostDocumentsShape } from './extHost.protocol'; -import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; +import { ExtHostContext, MainThreadDocumentsShape, ExtHostDocumentsShape } from '../node/extHost.protocol'; +import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; import { ITextSource } from 'vs/editor/common/model/textSource'; import { MainThreadDocumentsAndEditors } from './mainThreadDocumentsAndEditors'; @@ -71,7 +71,7 @@ export class MainThreadDocuments extends MainThreadDocumentsShape { private _modelService: IModelService; private _modeService: IModeService; - private _textModelResolverService: ITextModelResolverService; + private _textModelResolverService: ITextModelService; private _textFileService: ITextFileService; private _codeEditorService: ICodeEditorService; private _fileService: IFileService; @@ -93,7 +93,7 @@ export class MainThreadDocuments extends MainThreadDocumentsShape { @ITextFileService textFileService: ITextFileService, @ICodeEditorService codeEditorService: ICodeEditorService, @IFileService fileService: IFileService, - @ITextModelResolverService textModelResolverService: ITextModelResolverService, + @ITextModelService textModelResolverService: ITextModelService, @IUntitledEditorService untitledEditorService: IUntitledEditorService, @IEditorGroupService editorGroupService: IEditorGroupService ) { @@ -123,12 +123,12 @@ export class MainThreadDocuments extends MainThreadDocumentsShape { })); this._toDispose.push(textFileService.models.onModelReverted(e => { if (this._shouldHandleFileEvent(e)) { - this._proxy.$acceptModelReverted(e.resource.toString()); + this._proxy.$acceptDirtyStateChanged(e.resource.toString(), false); } })); this._toDispose.push(textFileService.models.onModelDirty(e => { if (this._shouldHandleFileEvent(e)) { - this._proxy.$acceptModelDirty(e.resource.toString()); + this._proxy.$acceptDirtyStateChanged(e.resource.toString(), true); } })); @@ -190,7 +190,7 @@ export class MainThreadDocuments extends MainThreadDocumentsShape { $tryOpenDocument(uri: URI): TPromise { if (!uri.scheme || !(uri.fsPath || uri.authority)) { - return TPromise.wrapError(`Invalid uri. Scheme and authority or path must be set.`); + return TPromise.wrapError(new Error(`Invalid uri. Scheme and authority or path must be set.`)); } let promise: TPromise; @@ -206,11 +206,11 @@ export class MainThreadDocuments extends MainThreadDocumentsShape { return promise.then(success => { if (!success) { - return TPromise.wrapError('cannot open ' + uri.toString()); + return TPromise.wrapError(new Error('cannot open ' + uri.toString())); } return undefined; }, err => { - return TPromise.wrapError('cannot open ' + uri.toString() + '. Detail: ' + toErrorMessage(err)); + return TPromise.wrapError(new Error('cannot open ' + uri.toString() + '. Detail: ' + toErrorMessage(err))); }); } @@ -230,19 +230,21 @@ export class MainThreadDocuments extends MainThreadDocumentsShape { let asFileUri = uri.with({ scheme: 'file' }); return this._fileService.resolveFile(asFileUri).then(stats => { // don't create a new file ontop of an existing file - return TPromise.wrapError('file already exists on disk'); + return TPromise.wrapError(new Error('file already exists on disk')); }, err => this._doCreateUntitled(asFileUri).then(resource => !!resource)); } - private _doCreateUntitled(uri?: URI, modeId?: string, initialValue?: string): TPromise { - let input = this._untitledEditorService.createOrGet(uri, modeId, initialValue); - return input.resolve(true).then(model => { - if (!this._modelIsSynced[input.getResource().toString()]) { - throw new Error(`expected URI ${input.getResource().toString()} to have come to LIFE`); + private _doCreateUntitled(resource?: URI, modeId?: string, initialValue?: string): TPromise { + return this._untitledEditorService.loadOrCreate({ resource, modeId, initialValue }).then(model => { + const resource = model.getResource(); + + if (!this._modelIsSynced[resource.toString()]) { + throw new Error(`expected URI ${resource.toString()} to have come to LIFE`); } - return this._proxy.$acceptModelDirty(input.getResource().toString()); // mark as dirty - }).then(() => { - return input.getResource(); + + this._proxy.$acceptDirtyStateChanged(resource.toString(), true); // mark as dirty + + return resource; }); } diff --git a/src/vs/workbench/api/node/mainThreadDocumentsAndEditors.ts b/src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts similarity index 96% rename from src/vs/workbench/api/node/mainThreadDocumentsAndEditors.ts rename to src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts index 8d710b5eceb36..a6be9198dd5c6 100644 --- a/src/vs/workbench/api/node/mainThreadDocumentsAndEditors.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts @@ -10,9 +10,9 @@ import { compare } from 'vs/base/common/strings'; import { delta } from 'vs/base/common/arrays'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; -import Event, { Emitter, any } from 'vs/base/common/event'; -import { ExtHostContext, ExtHostDocumentsAndEditorsShape, IModelAddedData, ITextEditorAddData, IDocumentsAndEditorsDelta } from './extHost.protocol'; -import { MainThreadTextEditor } from 'vs/workbench/api/node/mainThreadEditor'; +import Event, { Emitter } from 'vs/base/common/event'; +import { ExtHostContext, ExtHostDocumentsAndEditorsShape, IModelAddedData, ITextEditorAddData, IDocumentsAndEditorsDelta } from '../node/extHost.protocol'; +import { MainThreadTextEditor } from './mainThreadEditor'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; @@ -127,12 +127,9 @@ class MainThreadDocumentAndEditorStateComputer { } private _onDidAddEditor(e: ICommonCodeEditor): void { - const listener = any( - e.onDidChangeModel, - e.onDidFocusEditor, - e.onDidBlurEditor - )(this._updateState, this); - this._toDisposeOnEditorRemove.set(e.getId(), listener); + this._toDisposeOnEditorRemove.set(e.getId(), e.onDidChangeModel(() => this._updateState())); + this._toDisposeOnEditorRemove.set(e.getId(), e.onDidFocusEditor(() => this._updateState())); + this._toDisposeOnEditorRemove.set(e.getId(), e.onDidBlurEditor(() => this._updateState())); this._updateState(); } diff --git a/src/vs/workbench/api/node/mainThreadEditor.ts b/src/vs/workbench/api/electron-browser/mainThreadEditor.ts similarity index 90% rename from src/vs/workbench/api/node/mainThreadEditor.ts rename to src/vs/workbench/api/electron-browser/mainThreadEditor.ts index b3ba44a0361a6..a875e16c35ef2 100644 --- a/src/vs/workbench/api/node/mainThreadEditor.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadEditor.ts @@ -11,23 +11,11 @@ import { IModelService } from 'vs/editor/common/services/modelService'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { Range, IRange } from 'vs/editor/common/core/range'; import { Selection, ISelection } from 'vs/editor/common/core/selection'; -import { SnippetController } from 'vs/editor/contrib/snippet/common/snippetController'; +import { SnippetController2 } from 'vs/editor/contrib/snippet/browser/snippetController2'; import { EndOfLine, TextEditorLineNumbersStyle } from 'vs/workbench/api/node/extHostTypes'; import { TextEditorCursorStyle, cursorStyleToString } from 'vs/editor/common/config/editorOptions'; import { ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; - -export interface ITextEditorConfigurationUpdate { - tabSize?: number | 'auto'; - insertSpaces?: boolean | 'auto'; - cursorStyle?: TextEditorCursorStyle; - lineNumbers?: TextEditorLineNumbersStyle; -} -export interface IResolvedTextEditorConfiguration { - tabSize: number; - insertSpaces: boolean; - cursorStyle: TextEditorCursorStyle; - lineNumbers: TextEditorLineNumbersStyle; -} +import { IResolvedTextEditorConfiguration, ISelectionChangeEvent, ITextEditorConfigurationUpdate, TextEditorRevealType, IApplyEditsOptions, IUndoStopOptions } from 'vs/workbench/api/node/extHost.protocol'; function configurationsEqual(a: IResolvedTextEditorConfiguration, b: IResolvedTextEditorConfiguration) { if (a && !b || !a && b) { @@ -42,32 +30,11 @@ function configurationsEqual(a: IResolvedTextEditorConfiguration, b: IResolvedTe ); } -export interface ISelectionChangeEvent { - selections: Selection[]; - source?: string; -} - export interface IFocusTracker { onGainedFocus(): void; onLostFocus(): void; } -export enum TextEditorRevealType { - Default = 0, - InCenter = 1, - InCenterIfOutsideViewport = 2, - AtTop = 3 -} - -export interface IUndoStopOptions { - undoStopBefore: boolean; - undoStopAfter: boolean; -} - -export interface IApplyEditsOptions extends IUndoStopOptions { - setEndOfLine: EndOfLine; -} - /** * Text Editor that is permanently bound to the same model. * It can be bound or not to a CodeEditor. @@ -287,7 +254,7 @@ export class MainThreadTextEditor { break; case TextEditorRevealType.InCenter: this._codeEditor.revealRangeInCenter(range); - break;; + break; case TextEditorRevealType.InCenterIfOutsideViewport: this._codeEditor.revealRangeInCenterIfOutsideViewport(range); break; @@ -394,10 +361,10 @@ export class MainThreadTextEditor { return false; } - const snippetController = SnippetController.get(this._codeEditor); + const snippetController = SnippetController2.get(this._codeEditor); - // cancel previous snippet mode - snippetController.leaveSnippet(); + // // cancel previous snippet mode + // snippetController.leaveSnippet(); // set selection, focus editor const selections = ranges.map(r => new Selection(r.startLineNumber, r.startColumn, r.endLineNumber, r.endColumn)); @@ -405,13 +372,7 @@ export class MainThreadTextEditor { this._codeEditor.focus(); // make modifications - if (opts.undoStopBefore) { - this._codeEditor.pushUndoStop(); - } - snippetController.insertSnippet(template, 0, 0); - if (opts.undoStopAfter) { - this._codeEditor.pushUndoStop(); - } + snippetController.insert(template, 0, 0, opts.undoStopBefore, opts.undoStopAfter); return true; } diff --git a/src/vs/workbench/api/node/mainThreadEditors.ts b/src/vs/workbench/api/electron-browser/mainThreadEditors.ts similarity index 92% rename from src/vs/workbench/api/node/mainThreadEditors.ts rename to src/vs/workbench/api/electron-browser/mainThreadEditors.ts index 1163612c0f0ac..b1d0589a31963 100644 --- a/src/vs/workbench/api/node/mainThreadEditors.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadEditors.ts @@ -13,11 +13,13 @@ import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService' import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { IEditorOptions, Position as EditorPosition } from 'vs/platform/editor/common/editor'; -import { TextEditorRevealType, MainThreadTextEditor, IApplyEditsOptions, IUndoStopOptions, ITextEditorConfigurationUpdate } from 'vs/workbench/api/node/mainThreadEditor'; +import { MainThreadTextEditor } from './mainThreadEditor'; +import { ITextEditorConfigurationUpdate, TextEditorRevealType, IApplyEditsOptions, IUndoStopOptions } from 'vs/workbench/api/node/extHost.protocol'; + import { MainThreadDocumentsAndEditors } from './mainThreadDocumentsAndEditors'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { equals as objectEquals } from 'vs/base/common/objects'; -import { ExtHostContext, MainThreadEditorsShape, ExtHostEditorsShape, ITextDocumentShowOptions, ITextEditorPositionData } from './extHost.protocol'; +import { ExtHostContext, MainThreadEditorsShape, ExtHostEditorsShape, ITextDocumentShowOptions, ITextEditorPositionData } from '../node/extHost.protocol'; import { IRange } from 'vs/editor/common/core/range'; import { ISelection } from 'vs/editor/common/core/selection'; @@ -156,7 +158,7 @@ export class MainThreadEditors extends MainThreadEditorsShape { $trySetSelections(id: string, selections: ISelection[]): TPromise { if (!this._documentsAndEditors.getEditor(id)) { - return TPromise.wrapError('TextEditor disposed'); + return TPromise.wrapError(new Error('TextEditor disposed')); } this._documentsAndEditors.getEditor(id).setSelections(selections); return TPromise.as(null); @@ -164,7 +166,7 @@ export class MainThreadEditors extends MainThreadEditorsShape { $trySetDecorations(id: string, key: string, ranges: IDecorationOptions[]): TPromise { if (!this._documentsAndEditors.getEditor(id)) { - return TPromise.wrapError('TextEditor disposed'); + return TPromise.wrapError(new Error('TextEditor disposed')); } this._documentsAndEditors.getEditor(id).setDecorations(key, ranges); return TPromise.as(null); @@ -172,7 +174,7 @@ export class MainThreadEditors extends MainThreadEditorsShape { $tryRevealRange(id: string, range: IRange, revealType: TextEditorRevealType): TPromise { if (!this._documentsAndEditors.getEditor(id)) { - return TPromise.wrapError('TextEditor disposed'); + return TPromise.wrapError(new Error('TextEditor disposed')); } this._documentsAndEditors.getEditor(id).revealRange(range, revealType); return undefined; @@ -180,7 +182,7 @@ export class MainThreadEditors extends MainThreadEditorsShape { $trySetOptions(id: string, options: ITextEditorConfigurationUpdate): TPromise { if (!this._documentsAndEditors.getEditor(id)) { - return TPromise.wrapError('TextEditor disposed'); + return TPromise.wrapError(new Error('TextEditor disposed')); } this._documentsAndEditors.getEditor(id).setConfiguration(options); return TPromise.as(null); @@ -188,14 +190,14 @@ export class MainThreadEditors extends MainThreadEditorsShape { $tryApplyEdits(id: string, modelVersionId: number, edits: ISingleEditOperation[], opts: IApplyEditsOptions): TPromise { if (!this._documentsAndEditors.getEditor(id)) { - return TPromise.wrapError('TextEditor disposed'); + return TPromise.wrapError(new Error('TextEditor disposed')); } return TPromise.as(this._documentsAndEditors.getEditor(id).applyEdits(modelVersionId, edits, opts)); } $tryInsertSnippet(id: string, template: string, ranges: IRange[], opts: IUndoStopOptions): TPromise { if (!this._documentsAndEditors.getEditor(id)) { - return TPromise.wrapError('TextEditor disposed'); + return TPromise.wrapError(new Error('TextEditor disposed')); } return TPromise.as(this._documentsAndEditors.getEditor(id).insertSnippet(template, ranges, opts)); } @@ -212,7 +214,7 @@ export class MainThreadEditors extends MainThreadEditorsShape { const editor = this._documentsAndEditors.getEditor(id); if (!editor) { - return TPromise.wrapError('No such TextEditor'); + return TPromise.wrapError(new Error('No such TextEditor')); } const codeEditor = editor.getCodeEditor(); diff --git a/src/vs/workbench/api/node/mainThreadErrors.ts b/src/vs/workbench/api/electron-browser/mainThreadErrors.ts similarity index 89% rename from src/vs/workbench/api/node/mainThreadErrors.ts rename to src/vs/workbench/api/electron-browser/mainThreadErrors.ts index 03ba71b8e3b5d..ca8962bc1f42b 100644 --- a/src/vs/workbench/api/node/mainThreadErrors.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadErrors.ts @@ -5,7 +5,7 @@ 'use strict'; import * as errors from 'vs/base/common/errors'; -import { MainThreadErrorsShape } from './extHost.protocol'; +import { MainThreadErrorsShape } from '../node/extHost.protocol'; export class MainThreadErrors extends MainThreadErrorsShape { diff --git a/src/vs/workbench/api/node/mainThreadExtensionService.ts b/src/vs/workbench/api/electron-browser/mainThreadExtensionService.ts similarity index 79% rename from src/vs/workbench/api/node/mainThreadExtensionService.ts rename to src/vs/workbench/api/electron-browser/mainThreadExtensionService.ts index 414cc32accf2a..43b35d1908ab2 100644 --- a/src/vs/workbench/api/node/mainThreadExtensionService.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadExtensionService.ts @@ -13,13 +13,15 @@ import URI from 'vs/base/common/uri'; import { AbstractExtensionService, ActivatedExtension } from 'vs/platform/extensions/common/abstractExtensionService'; import { IMessage, IExtensionDescription, IExtensionsStatus } from 'vs/platform/extensions/common/extensions'; import { IExtensionEnablementService } from 'vs/platform/extensionManagement/common/extensionManagement'; -import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; +import { areSameExtensions, getGloballyDisabledExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { ExtensionsRegistry, ExtensionPoint, IExtensionPointUser, ExtensionMessageCollector } from 'vs/platform/extensions/common/extensionsRegistry'; import { ExtensionScanner, MessagesCollector } from 'vs/workbench/node/extensionPoints'; import { IMessageService } from 'vs/platform/message/common/message'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; -import { ExtHostContext, ExtHostExtensionServiceShape } from './extHost.protocol'; +import { ExtHostContext, ExtHostExtensionServiceShape } from '../node/extHost.protocol'; +import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { IStorageService } from 'vs/platform/storage/common/storage'; const SystemExtensionsRoot = path.normalize(path.join(URI.parse(require.toUrl('')).fsPath, '..', 'extensions')); @@ -50,8 +52,6 @@ const hasOwnProperty = Object.hasOwnProperty; export class MainProcessExtensionService extends AbstractExtensionService { - private _threadService: IThreadService; - private _messageService: IMessageService; private _proxy: ExtHostExtensionServiceShape; private _isDev: boolean; private _extensionsStatus: { [id: string]: IExtensionsStatus }; @@ -60,62 +60,65 @@ export class MainProcessExtensionService extends AbstractExtensionService { + const disabledExtensions = [ + ...getGloballyDisabledExtensions(extensionEnablementService, storageService, extensionDescriptions), + ...extensionEnablementService.getWorkspaceDisabledExtensions() + ]; + + _telemetryService.publicLog('extensionsScanned', { + totalCount: extensionDescriptions.length, + disabledCount: disabledExtensions.length + }); + this._onExtensionDescriptions(disabledExtensions.length ? extensionDescriptions.filter(e => disabledExtensions.every(id => !areSameExtensions({ id }, e))) : extensionDescriptions); }); } private _handleMessage(msg: IMessage) { - this._showMessage(msg.type, messageWithSource(msg)); if (!this._extensionsStatus[msg.source]) { this._extensionsStatus[msg.source] = { messages: [] }; } this._extensionsStatus[msg.source].messages.push(msg); - } - public $localShowMessage(severity: Severity, msg: string): void { - let messageShown = false; - if (severity === Severity.Error || severity === Severity.Warning) { - if (this._isDev) { - // Only show nasty intrusive messages if doing extension development. - this._messageService.show(severity, msg); - messageShown = true; - } + this.$localShowMessage( + msg.type, messageWithSource(msg), + this.environmentService.extensionDevelopmentPath === msg.source + ); + + if (!this._isDev && msg.extensionId) { + const { type, extensionId, extensionPointId, message } = msg; + this._telemetryService.publicLog('extensionsMessage', { + type, extensionId, extensionPointId, message + }); } + } - if (!messageShown) { - switch (severity) { - case Severity.Error: - console.error(msg); - break; - case Severity.Warning: - console.warn(msg); - break; - default: - console.log(msg); - } + public $localShowMessage(severity: Severity, msg: string, useMessageService: boolean = this._isDev): void { + // Only show nasty intrusive messages if doing extension development + // and print all other messages to the console + if (useMessageService && (severity === Severity.Error || severity === Severity.Warning)) { + this._messageService.show(severity, msg); + } else if (severity === Severity.Error) { + console.error(msg); + } else if (severity === Severity.Warning) { + console.warn(msg); + } else { + console.log(msg); } } @@ -126,7 +129,6 @@ export class MainProcessExtensionService extends AbstractExtensionService { + $show(options: IPickOptions): TPromise { const myToken = ++this._token; @@ -59,14 +59,14 @@ export class MainThreadQuickOpen extends MainThreadQuickOpenShape { }); } - $setItems(items: MyQuickPickItems[]): Thenable { + $setItems(items: MyQuickPickItems[]): TPromise { if (this._doSetItems) { this._doSetItems(items); } return undefined; } - $setError(error: Error): Thenable { + $setError(error: Error): TPromise { if (this._doSetError) { this._doSetError(error); } diff --git a/src/vs/workbench/api/node/mainThreadSCM.ts b/src/vs/workbench/api/electron-browser/mainThreadSCM.ts similarity index 94% rename from src/vs/workbench/api/node/mainThreadSCM.ts rename to src/vs/workbench/api/electron-browser/mainThreadSCM.ts index 42129cde3ec88..fb8d1f155a554 100644 --- a/src/vs/workbench/api/node/mainThreadSCM.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadSCM.ts @@ -14,7 +14,7 @@ import { IThreadService } from 'vs/workbench/services/thread/common/threadServic import { ISCMService, ISCMProvider, ISCMResource, ISCMResourceGroup, ISCMResourceDecorations } from 'vs/workbench/services/scm/common/scm'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ICommandService } from 'vs/platform/commands/common/commands'; -import { ExtHostContext, MainThreadSCMShape, ExtHostSCMShape, SCMProviderFeatures, SCMRawResource, SCMGroupFeatures } from './extHost.protocol'; +import { ExtHostContext, MainThreadSCMShape, ExtHostSCMShape, SCMProviderFeatures, SCMRawResource, SCMGroupFeatures } from '../node/extHost.protocol'; import { Command } from 'vs/editor/common/modes'; class MainThreadSCMResourceGroup implements ISCMResourceGroup { @@ -137,6 +137,17 @@ class MainThreadSCMProvider implements ISCMProvider { this._onDidChange.fire(); } + $updateGroupLabel(handle: number, label: string): void { + const group = this._groupsByHandle[handle]; + + if (!group) { + return; + } + + group.label = label; + this._onDidChange.fire(); + } + $updateGroupResourceStates(groupHandle: number, resources: SCMRawResource[]): void { const group = this._groupsByHandle[groupHandle]; @@ -263,6 +274,16 @@ export class MainThreadSCM extends MainThreadSCMShape { provider.$updateGroup(groupHandle, features); } + $updateGroupLabel(sourceControlHandle: number, groupHandle: number, label: string): void { + const provider = this._sourceControls[sourceControlHandle]; + + if (!provider) { + return; + } + + provider.$updateGroupLabel(groupHandle, label); + } + $updateGroupResourceStates(sourceControlHandle: number, groupHandle: number, resources: SCMRawResource[]): void { const provider = this._sourceControls[sourceControlHandle]; diff --git a/src/vs/workbench/api/node/mainThreadSaveParticipant.ts b/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts similarity index 93% rename from src/vs/workbench/api/node/mainThreadSaveParticipant.ts rename to src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts index cfc30fcb15d04..b1de2a035c92d 100644 --- a/src/vs/workbench/api/node/mainThreadSaveParticipant.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts @@ -22,7 +22,7 @@ import { getDocumentFormattingEdits } from 'vs/editor/contrib/format/common/form import { EditOperationsCommand } from 'vs/editor/contrib/format/common/formatCommand'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { TextFileEditorModel } from 'vs/workbench/services/textfile/common/textFileEditorModel'; -import { ExtHostContext, ExtHostDocumentSaveParticipantShape } from './extHost.protocol'; +import { ExtHostContext, ExtHostDocumentSaveParticipantShape } from '../node/extHost.protocol'; import { EditOperation } from 'vs/editor/common/core/editOperation'; export interface INamedSaveParticpant extends ISaveParticipant { @@ -40,8 +40,8 @@ class TrimWhitespaceParticipant implements INamedSaveParticpant { // Nothing } - public participate(model: ITextFileEditorModel, env: { reason: SaveReason }): any { - if (this.configurationService.lookup('files.trimTrailingWhitespace', model.textEditorModel.getLanguageIdentifier().language).value) { + public participate(model: ITextFileEditorModel, env: { reason: SaveReason }): void { + if (this.configurationService.lookup('files.trimTrailingWhitespace', { overrideIdentifier: model.textEditorModel.getLanguageIdentifier().language, resource: model.getResource() }).value) { this.doTrimTrailingWhitespace(model.textEditorModel, env.reason === SaveReason.AUTO); } } @@ -98,8 +98,8 @@ export class FinalNewLineParticipant implements INamedSaveParticpant { // Nothing } - public participate(model: ITextFileEditorModel, env: { reason: SaveReason }): any { - if (this.configurationService.lookup('files.insertFinalNewline', model.textEditorModel.getLanguageIdentifier().language).value) { + public participate(model: ITextFileEditorModel, env: { reason: SaveReason }): void { + if (this.configurationService.lookup('files.insertFinalNewline', { overrideIdentifier: model.textEditorModel.getLanguageIdentifier().language, resource: model.getResource() }).value) { this.doInsertFinalNewLine(model.textEditorModel); } } @@ -138,11 +138,11 @@ class FormatOnSaveParticipant implements INamedSaveParticpant { // Nothing } - participate(editorModel: ITextFileEditorModel, env: { reason: SaveReason }): TPromise { + participate(editorModel: ITextFileEditorModel, env: { reason: SaveReason }): TPromise { const model = editorModel.textEditorModel; if (env.reason === SaveReason.AUTO - || !this._configurationService.lookup('editor.formatOnSave', model.getLanguageIdentifier().language).value) { + || !this._configurationService.lookup('editor.formatOnSave', { overrideIdentifier: model.getLanguageIdentifier().language, resource: editorModel.getResource() }).value) { return undefined; } @@ -204,13 +204,13 @@ class ExtHostSaveParticipant implements INamedSaveParticpant { this._proxy = threadService.get(ExtHostContext.ExtHostDocumentSaveParticipant); } - participate(editorModel: ITextFileEditorModel, env: { reason: SaveReason }): TPromise { + participate(editorModel: ITextFileEditorModel, env: { reason: SaveReason }): TPromise { return new TPromise((resolve, reject) => { setTimeout(reject, 1750); this._proxy.$participateInSave(editorModel.getResource(), env.reason).then(values => { for (const success of values) { if (!success) { - return TPromise.wrapError('listener failed'); + return TPromise.wrapError(new Error('listener failed')); } } return undefined; @@ -240,7 +240,7 @@ export class SaveParticipant implements ISaveParticipant { // Hook into model TextFileEditorModel.setSaveParticipant(this); } - participate(model: ITextFileEditorModel, env: { reason: SaveReason }): TPromise { + participate(model: ITextFileEditorModel, env: { reason: SaveReason }): TPromise { const stats: { [name: string]: number } = Object.create(null); diff --git a/src/vs/workbench/api/node/mainThreadStatusBar.ts b/src/vs/workbench/api/electron-browser/mainThreadStatusBar.ts similarity index 83% rename from src/vs/workbench/api/node/mainThreadStatusBar.ts rename to src/vs/workbench/api/electron-browser/mainThreadStatusBar.ts index ed435c97485c4..55533e132abaa 100644 --- a/src/vs/workbench/api/node/mainThreadStatusBar.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadStatusBar.ts @@ -6,7 +6,8 @@ import { IStatusbarService, StatusbarAlignment as MainThreadStatusBarAlignment } from 'vs/platform/statusbar/common/statusbar'; import { IDisposable } from 'vs/base/common/lifecycle'; -import { MainThreadStatusBarShape } from './extHost.protocol'; +import { MainThreadStatusBarShape } from '../node/extHost.protocol'; +import { ThemeColor } from 'vs/platform/theme/common/themeService'; export class MainThreadStatusBar extends MainThreadStatusBarShape { private mapIdToDisposable: { [id: number]: IDisposable }; @@ -18,7 +19,7 @@ export class MainThreadStatusBar extends MainThreadStatusBarShape { this.mapIdToDisposable = Object.create(null); } - $setEntry(id: number, extensionId: string, text: string, tooltip: string, command: string, color: string, alignment: MainThreadStatusBarAlignment, priority: number): void { + $setEntry(id: number, extensionId: string, text: string, tooltip: string, command: string, color: string | ThemeColor, alignment: MainThreadStatusBarAlignment, priority: number): void { // Dispose any old this.$dispose(id); diff --git a/src/vs/workbench/api/node/mainThreadStorage.ts b/src/vs/workbench/api/electron-browser/mainThreadStorage.ts similarity index 95% rename from src/vs/workbench/api/node/mainThreadStorage.ts rename to src/vs/workbench/api/electron-browser/mainThreadStorage.ts index 2e8aba86eb9ac..5f109ae9c3d0b 100644 --- a/src/vs/workbench/api/node/mainThreadStorage.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadStorage.ts @@ -6,7 +6,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; -import { MainThreadStorageShape } from './extHost.protocol'; +import { MainThreadStorageShape } from '../node/extHost.protocol'; export class MainThreadStorage extends MainThreadStorageShape { @@ -41,4 +41,4 @@ export class MainThreadStorage extends MainThreadStorageShape { } return undefined; } -} \ No newline at end of file +} diff --git a/src/vs/workbench/api/node/mainThreadTask.ts b/src/vs/workbench/api/electron-browser/mainThreadTask.ts similarity index 97% rename from src/vs/workbench/api/node/mainThreadTask.ts rename to src/vs/workbench/api/electron-browser/mainThreadTask.ts index f27cdfa54afe4..bbd8040c9c56f 100644 --- a/src/vs/workbench/api/node/mainThreadTask.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadTask.ts @@ -9,7 +9,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { ITaskService } from 'vs/workbench/parts/tasks/common/taskService'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; -import { ExtHostContext, MainThreadTaskShape, ExtHostTaskShape } from './extHost.protocol'; +import { ExtHostContext, MainThreadTaskShape, ExtHostTaskShape } from '../node/extHost.protocol'; export class MainThreadTask extends MainThreadTaskShape { @@ -33,4 +33,4 @@ export class MainThreadTask extends MainThreadTaskShape { this._taskService.unregisterTaskProvider(handle); return TPromise.as(undefined); } -} \ No newline at end of file +} diff --git a/src/vs/workbench/api/node/mainThreadTelemetry.ts b/src/vs/workbench/api/electron-browser/mainThreadTelemetry.ts similarity index 94% rename from src/vs/workbench/api/node/mainThreadTelemetry.ts rename to src/vs/workbench/api/electron-browser/mainThreadTelemetry.ts index 425123d08c641..42a15120c4069 100644 --- a/src/vs/workbench/api/node/mainThreadTelemetry.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadTelemetry.ts @@ -6,7 +6,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { ITelemetryService, ITelemetryInfo } from 'vs/platform/telemetry/common/telemetry'; -import { MainThreadTelemetryShape } from './extHost.protocol'; +import { MainThreadTelemetryShape } from '../node/extHost.protocol'; /** * Helper always instantiated in the main process to receive telemetry events from remote telemetry services diff --git a/src/vs/workbench/api/node/mainThreadTerminalService.ts b/src/vs/workbench/api/electron-browser/mainThreadTerminalService.ts similarity index 98% rename from src/vs/workbench/api/node/mainThreadTerminalService.ts rename to src/vs/workbench/api/electron-browser/mainThreadTerminalService.ts index 7df3be34e0b00..c59fbbe55155a 100644 --- a/src/vs/workbench/api/node/mainThreadTerminalService.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadTerminalService.ts @@ -8,7 +8,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { ITerminalService, ITerminalInstance, IShellLaunchConfig } from 'vs/workbench/parts/terminal/common/terminal'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; import { TPromise } from 'vs/base/common/winjs.base'; -import { ExtHostContext, ExtHostTerminalServiceShape, MainThreadTerminalServiceShape } from './extHost.protocol'; +import { ExtHostContext, ExtHostTerminalServiceShape, MainThreadTerminalServiceShape } from '../node/extHost.protocol'; export class MainThreadTerminalService extends MainThreadTerminalServiceShape { diff --git a/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts b/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts new file mode 100644 index 0000000000000..18ea315cca72b --- /dev/null +++ b/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts @@ -0,0 +1,124 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import Event, { Emitter } from 'vs/base/common/event'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; +import { ExtHostContext, MainThreadTreeViewsShape, ExtHostTreeViewsShape } from '../node/extHost.protocol'; +import { IMessageService, Severity } from 'vs/platform/message/common/message'; +import { ViewsRegistry } from 'vs/workbench/parts/views/browser/viewsRegistry'; +import { ITreeViewDataProvider, ITreeItem, TreeItemCollapsibleState } from 'vs/workbench/parts/views/common/views'; + +export class MainThreadTreeViews extends MainThreadTreeViewsShape { + + private _proxy: ExtHostTreeViewsShape; + + constructor( + @IThreadService threadService: IThreadService, + @IMessageService private messageService: IMessageService + ) { + super(); + this._proxy = threadService.get(ExtHostContext.ExtHostTreeViews); + } + + $registerView(treeViewId: string): void { + ViewsRegistry.registerTreeViewDataProvider(treeViewId, new TreeViewDataProvider(treeViewId, this._proxy, this.messageService)); + } + + $refresh(treeViewId: string, treeItemHandle?: number): void { + const treeViewDataProvider: TreeViewDataProvider = ViewsRegistry.getTreeViewDataProvider(treeViewId); + if (treeViewDataProvider) { + treeViewDataProvider.refresh(treeItemHandle); + } + } +} + +type TreeItemHandle = number; + +class TreeViewDataProvider implements ITreeViewDataProvider { + + private _onDidChange: Emitter = new Emitter(); + readonly onDidChange: Event = this._onDidChange.event; + + private childrenMap: Map = new Map(); + private itemsMap: Map = new Map(); + + constructor(private treeViewId: string, + private _proxy: ExtHostTreeViewsShape, + private messageService: IMessageService + ) { + } + + getElements(): TPromise { + return this._proxy.$getElements(this.treeViewId) + .then(elements => { + this.postGetElements(null, elements); + return elements; + }, err => this.messageService.show(Severity.Error, err)); + } + + getChildren(treeItem: ITreeItem): TPromise { + if (treeItem.children) { + return TPromise.as(treeItem.children); + } + return this._proxy.$getChildren(this.treeViewId, treeItem.handle) + .then(children => { + this.postGetElements(treeItem.handle, children); + return children; + }, err => this.messageService.show(Severity.Error, err)); + } + + refresh(treeItemHandle?: number) { + if (treeItemHandle) { + let treeItem = this.itemsMap.get(treeItemHandle); + if (treeItem) { + this._onDidChange.fire(treeItem); + } + } else { + this._onDidChange.fire(); + } + } + + private clearChildren(treeItemHandle: TreeItemHandle): void { + const children = this.childrenMap.get(treeItemHandle); + if (children) { + for (const child of children) { + this.clearChildren(child); + this.itemsMap.delete(child); + } + this.childrenMap.delete(treeItemHandle); + } + } + + private postGetElements(parent: TreeItemHandle, children: ITreeItem[]) { + this.setElements(parent, children); + } + + private setElements(parent: TreeItemHandle, children: ITreeItem[]) { + if (children && children.length) { + for (const child of children) { + this.itemsMap.set(child.handle, child); + if (child.children && child.children.length) { + this.setElements(child.handle, child.children); + } + } + if (parent) { + this.childrenMap.set(parent, children.map(child => child.handle)); + } + } + } + + private populateElementsToExpand(elements: ITreeItem[], toExpand: ITreeItem[]) { + for (const element of elements) { + if (element.collapsibleState === TreeItemCollapsibleState.Expanded) { + toExpand.push(element); + if (element.children && element.children.length) { + this.populateElementsToExpand(element.children, toExpand); + } + } + } + } +} \ No newline at end of file diff --git a/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts b/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts new file mode 100644 index 0000000000000..6aa919fe9ebba --- /dev/null +++ b/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts @@ -0,0 +1,111 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import { isPromiseCanceledError } from 'vs/base/common/errors'; +import URI from 'vs/base/common/uri'; +import { ISearchService, QueryType } from 'vs/platform/search/common/search'; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; +import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; +import { ICommonCodeEditor, isCommonCodeEditor } from 'vs/editor/common/editorCommon'; +import { bulkEdit, IResourceEdit } from 'vs/editor/common/services/bulkEdit'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { MainThreadWorkspaceShape, ExtHostWorkspaceShape, ExtHostContext } from '../node/extHost.protocol'; +import { ITextModelService } from 'vs/editor/common/services/resolverService'; +import { IFileService } from 'vs/platform/files/common/files'; +import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; +import { IDisposable } from 'vs/base/common/lifecycle'; + + +export class MainThreadWorkspace extends MainThreadWorkspaceShape { + + private readonly _toDispose: IDisposable[] = []; + private readonly _activeSearches: { [id: number]: TPromise } = Object.create(null); + private readonly _proxy: ExtHostWorkspaceShape; + + constructor( + @ISearchService private readonly _searchService: ISearchService, + @IWorkspaceContextService private readonly _contextService: IWorkspaceContextService, + @ITextFileService private readonly _textFileService: ITextFileService, + @IWorkbenchEditorService private readonly _editorService: IWorkbenchEditorService, + @ITextModelService private readonly _textModelResolverService: ITextModelService, + @IFileService private readonly _fileService: IFileService, + @IThreadService threadService: IThreadService + ) { + super(); + this._proxy = threadService.get(ExtHostContext.ExtHostWorkspace); + this._contextService.onDidChangeWorkspaceRoots(this._onDidChangeWorkspace, this, this._toDispose); + } + + // --- workspace --- + + private _onDidChangeWorkspace(): void { + this._proxy.$acceptWorkspaceData(this._contextService.getWorkspace2()); + } + + // --- search --- + + $startSearch(include: string, exclude: string, maxResults: number, requestId: number): Thenable { + const workspace = this._contextService.getWorkspace2(); + if (!workspace) { + return undefined; + } + + const search = this._searchService.search({ + folderQueries: workspace.roots.map(root => ({ folder: root })), + type: QueryType.File, + maxResults, + includePattern: { [include]: true }, + excludePattern: { [exclude]: true }, + }).then(result => { + return result.results.map(m => m.resource); + }, err => { + if (!isPromiseCanceledError(err)) { + return TPromise.wrapError(err); + } + return undefined; + }); + + this._activeSearches[requestId] = search; + const onDone = () => delete this._activeSearches[requestId]; + search.done(onDone, onDone); + + return search; + } + + $cancelSearch(requestId: number): Thenable { + const search = this._activeSearches[requestId]; + if (search) { + delete this._activeSearches[requestId]; + search.cancel(); + return TPromise.as(true); + } + return undefined; + } + + // --- save & edit resources --- + + $saveAll(includeUntitled?: boolean): Thenable { + return this._textFileService.saveAll(includeUntitled).then(result => { + return result.results.every(each => each.success === true); + }); + } + + $applyWorkspaceEdit(edits: IResourceEdit[]): TPromise { + + let codeEditor: ICommonCodeEditor; + let editor = this._editorService.getActiveEditor(); + if (editor) { + let candidate = editor.getControl(); + if (isCommonCodeEditor(candidate)) { + codeEditor = candidate; + } + } + + return bulkEdit(this._textModelResolverService, codeEditor, edits, this._fileService) + .then(() => true); + } +} diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 4b84e46809aac..8e78a58bc469f 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { Emitter, mapEvent } from 'vs/base/common/event'; +import { Emitter } from 'vs/base/common/event'; import { TrieMap } from 'vs/base/common/map'; import { score } from 'vs/editor/common/modes/languageSelector'; import * as Platform from 'vs/base/common/platform'; @@ -18,7 +18,7 @@ import { ExtHostDocuments } from 'vs/workbench/api/node/extHostDocuments'; import { ExtHostDocumentSaveParticipant } from 'vs/workbench/api/node/extHostDocumentSaveParticipant'; import { ExtHostConfiguration } from 'vs/workbench/api/node/extHostConfiguration'; import { ExtHostDiagnostics } from 'vs/workbench/api/node/extHostDiagnostics'; -import { ExtHostTreeView } from 'vs/workbench/api/node/extHostTreeView'; +import { ExtHostTreeViews } from 'vs/workbench/api/node/extHostTreeViews'; import { ExtHostWorkspace } from 'vs/workbench/api/node/extHostWorkspace'; import { ExtHostQuickOpen } from 'vs/workbench/api/node/extHostQuickOpen'; import { ExtHostProgress } from 'vs/workbench/api/node/extHostProgress'; @@ -34,6 +34,7 @@ import { ExtHostLanguages } from 'vs/workbench/api/node/extHostLanguages'; import { ExtHostLanguageFeatures } from 'vs/workbench/api/node/extHostLanguageFeatures'; import { ExtHostApiCommands } from 'vs/workbench/api/node/extHostApiCommands'; import { ExtHostTask } from 'vs/workbench/api/node/extHostTask'; +import { ExtHostDebugService } from 'vs/workbench/api/node/extHostDebugService'; import * as extHostTypes from 'vs/workbench/api/node/extHostTypes'; import URI from 'vs/base/common/uri'; import Severity from 'vs/base/common/severity'; @@ -41,7 +42,6 @@ import EditorCommon = require('vs/editor/common/editorCommon'); import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; import { ExtHostExtensionService } from 'vs/workbench/api/node/extHostExtensionService'; import { TPromise } from 'vs/base/common/winjs.base'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { CancellationTokenSource } from 'vs/base/common/cancellation'; import * as vscode from 'vscode'; @@ -55,6 +55,12 @@ export interface IExtensionApiFactory { (extension: IExtensionDescription): typeof vscode; } +function assertProposedApi(extension: IExtensionDescription): void { + if (!extension.enableProposedApi) { + throw new Error(`[${extension.id}]: Proposed API is only available when running out of dev or with the following command line switch: --enable-proposed-api ${extension.id}`); + } +} + function proposedApiFunction(extension: IExtensionDescription, fn: T): T { if (extension.enableProposedApi) { return fn; @@ -65,33 +71,6 @@ function proposedApiFunction(extension: IExtensionDescription, fn: T): T { } } -function proposed(extension: IExtensionDescription): Function { - return (target: any, key: string, descriptor: any) => { - let fnKey: string = null; - let fn: Function = null; - - if (typeof descriptor.value === 'function') { - fnKey = 'value'; - fn = descriptor.value; - } else if (typeof descriptor.get === 'function') { - fnKey = 'get'; - fn = descriptor.get; - } - - if (!fn) { - throw new Error('not supported'); - } - - if (extension.enableProposedApi) { - return; - } - - descriptor[fnKey] = () => { - throw new Error(`${extension.id} cannot access proposed api`); - }; - }; -} - /** * This method instantiates and returns the extension API surface */ @@ -99,20 +78,21 @@ export function createApiFactory( initData: IInitData, threadService: IThreadService, extensionService: ExtHostExtensionService, - contextService: IWorkspaceContextService, telemetryService: ITelemetryService ): IExtensionApiFactory { // Addressable instances const col = new InstanceCollection(); const extHostHeapService = col.define(ExtHostContext.ExtHostHeapService).set(new ExtHostHeapService()); + const extHostDebugService = col.define(ExtHostContext.ExtHostDebugService).set(new ExtHostDebugService(threadService)); const extHostDocumentsAndEditors = col.define(ExtHostContext.ExtHostDocumentsAndEditors).set(new ExtHostDocumentsAndEditors(threadService)); const extHostDocuments = col.define(ExtHostContext.ExtHostDocuments).set(new ExtHostDocuments(threadService, extHostDocumentsAndEditors)); const extHostDocumentSaveParticipant = col.define(ExtHostContext.ExtHostDocumentSaveParticipant).set(new ExtHostDocumentSaveParticipant(extHostDocuments, threadService.get(MainContext.MainThreadWorkspace))); const extHostEditors = col.define(ExtHostContext.ExtHostEditors).set(new ExtHostEditors(threadService, extHostDocumentsAndEditors)); const extHostCommands = col.define(ExtHostContext.ExtHostCommands).set(new ExtHostCommands(threadService, extHostHeapService)); - const extHostTreeView = col.define(ExtHostContext.ExtHostTreeView).set(new ExtHostTreeView(threadService, extHostCommands)); - const extHostConfiguration = col.define(ExtHostContext.ExtHostConfiguration).set(new ExtHostConfiguration(threadService.get(MainContext.MainThreadConfiguration), initData.configuration)); + const extHostTreeViews = col.define(ExtHostContext.ExtHostTreeViews).set(new ExtHostTreeViews(threadService, extHostCommands)); + const extHostWorkspace = col.define(ExtHostContext.ExtHostWorkspace).set(new ExtHostWorkspace(threadService, initData.workspace)); + const extHostConfiguration = col.define(ExtHostContext.ExtHostConfiguration).set(new ExtHostConfiguration(threadService.get(MainContext.MainThreadConfiguration), extHostWorkspace, initData.configuration)); const extHostDiagnostics = col.define(ExtHostContext.ExtHostDiagnostics).set(new ExtHostDiagnostics(threadService)); const languageFeatures = col.define(ExtHostContext.ExtHostLanguageFeatures).set(new ExtHostLanguageFeatures(threadService, extHostDocuments, extHostCommands, extHostHeapService, extHostDiagnostics)); const extHostFileSystemEvent = col.define(ExtHostContext.ExtHostFileSystemEventService).set(new ExtHostFileSystemEventService()); @@ -128,8 +108,6 @@ export function createApiFactory( const extHostStatusBar = new ExtHostStatusBar(threadService); const extHostProgress = new ExtHostProgress(threadService.get(MainContext.MainThreadProgress)); const extHostOutputService = new ExtHostOutputService(threadService); - const workspacePath = contextService.hasWorkspace() ? contextService.getWorkspace().resource.fsPath : undefined; - const extHostWorkspace = new ExtHostWorkspace(threadService, workspacePath); const extHostLanguages = new ExtHostLanguages(threadService); // Register API-ish commands @@ -153,14 +131,13 @@ export function createApiFactory( } } - class Commands { - + // namespace: commands + const commands: typeof vscode.commands = { registerCommand(id: string, command: (...args: any[]) => T | Thenable, thisArgs?: any): vscode.Disposable { return extHostCommands.registerCommand(id, command, thisArgs); - } - + }, registerTextEditorCommand(id: string, callback: (textEditor: vscode.TextEditor, edit: vscode.TextEditorEdit, ...args: any[]) => void, thisArg?: any): vscode.Disposable { - return extHostCommands.registerCommand(id, (...args: any[]) => { + return extHostCommands.registerCommand(id, (...args: any[]): any => { let activeTextEditor = extHostEditors.getActiveTextEditor(); if (!activeTextEditor) { console.warn('Cannot execute ' + id + ' because there is no active text editor.'); @@ -176,13 +153,11 @@ export function createApiFactory( console.warn('Edits from command ' + id + ' were not applied.'); } }, (err) => { - console.warn('An error occured while running command ' + id, err); + console.warn('An error occurred while running command ' + id, err); }); }); - } - - @proposed(extension) - registerDiffInformationCommand(id: string, callback: (diff: vscode.LineChange[], ...args: any[]) => any, thisArg?: any): vscode.Disposable { + }, + registerDiffInformationCommand: proposedApiFunction(extension, (id: string, callback: (diff: vscode.LineChange[], ...args: any[]) => any, thisArg?: any): vscode.Disposable => { return extHostCommands.registerCommand(id, async (...args: any[]) => { let activeTextEditor = extHostEditors.getActiveTextEditor(); if (!activeTextEditor) { @@ -193,19 +168,14 @@ export function createApiFactory( const diff = await extHostEditors.getDiffInformation(activeTextEditor.id); callback.apply(thisArg, [diff, ...args]); }); - } - + }), executeCommand(id: string, ...args: any[]): Thenable { return extHostCommands.executeCommand(id, ...args); - } - + }, getCommands(filterInternal: boolean = false): Thenable { return extHostCommands.getCommands(filterInternal); } - } - - // namespace: commands - const commands: typeof vscode.commands = new Commands(); + }; // namespace: env const env: typeof vscode.env = Object.freeze({ @@ -351,7 +321,7 @@ export function createApiFactory( }, withScmProgress(task: (progress: vscode.Progress) => Thenable) { console.warn(`[Deprecation Warning] function 'withScmProgress' is deprecated and should no longer be used. Use 'withProgress' instead.`); - return extHostProgress.withProgress(extension, { location: extHostTypes.ProgressLocation.SourceControl }, task); + return extHostProgress.withProgress(extension, { location: extHostTypes.ProgressLocation.SourceControl }, (progress, token) => task({ report(n: number) { /*noop*/ } })); }, withProgress(options: vscode.ProgressOptions, task: (progress: vscode.Progress<{ message?: string; percentage?: number }>) => Thenable) { return extHostProgress.withProgress(extension, options, task); @@ -365,23 +335,42 @@ export function createApiFactory( } return extHostTerminalService.createTerminal(nameOrOptions, shellPath, shellArgs); }, + registerTreeDataProvider(viewId: string, treeDataProvider: vscode.TreeDataProvider): vscode.Disposable { + return extHostTreeViews.registerTreeDataProvider(viewId, treeDataProvider); + }, // proposed API sampleFunction: proposedApiFunction(extension, () => { return extHostMessageService.showMessage(Severity.Info, 'Hello Proposed Api!', {}, []); }), - createTreeView: proposedApiFunction(extension, (providerId: string, provider: vscode.TreeDataProvider): vscode.TreeView => { - return extHostTreeView.createTreeView(providerId, provider); - }) }; // namespace: workspace const workspace: typeof vscode.workspace = { get rootPath() { + telemetryService.publicLog('api-getter', { + name: 'workspace#rootPath', + extension: extension.id + }); return extHostWorkspace.getPath(); }, set rootPath(value) { throw errors.readonly(); }, + get workspaceFolders() { + assertProposedApi(extension); + telemetryService.publicLog('api-getter', { + name: 'workspace#workspaceFolders', + extension: extension.id + }); + return extHostWorkspace.getRoots(); + }, + onDidChangeWorkspaceFolders: proposedApiFunction(extension, (listener, thisArgs?, disposables?) => { + telemetryService.publicLog('api-getter', { + name: 'workspace#onDidChangeWorkspaceFolders', + extension: extension.id + }); + return extHostWorkspace.onDidChangeWorkspace(listener, thisArgs, disposables); + }), asRelativePath: (pathOrUri) => { return extHostWorkspace.getRelativePath(pathOrUri); }, @@ -442,35 +431,25 @@ export function createApiFactory( onWillSaveTextDocument: (listener, thisArgs?, disposables?) => { return extHostDocumentSaveParticipant.onWillSaveTextDocumentEvent(listener, thisArgs, disposables); }, - onDidChangeConfiguration: (listener: () => any, thisArgs?: any, disposables?: extHostTypes.Disposable[]) => { + onDidChangeConfiguration: (listener: (_: any) => any, thisArgs?: any, disposables?: extHostTypes.Disposable[]) => { return extHostConfiguration.onDidChangeConfiguration(listener, thisArgs, disposables); }, getConfiguration: (section?: string): vscode.WorkspaceConfiguration => { return extHostConfiguration.getConfiguration(section); }, - registerTaskProvider: proposedApiFunction(extension, (provider: vscode.TaskProvider) => { + getConfiguration2: proposedApiFunction(extension, (section?: string, resource?: vscode.Uri): vscode.WorkspaceConfiguration => { + return extHostConfiguration.getConfiguration2(section, resource); + }), + registerTaskProvider: (type: string, provider: vscode.TaskProvider) => { return extHostTask.registerTaskProvider(extension, provider); - }) - }; - - class SCM { - - get activeSourceControl() { - return extHostSCM.activeProvider; - } - - get onDidChangeActiveSourceControl() { - return extHostSCM.onDidChangeActiveProvider; } + }; + // namespace: scm + const scm: typeof vscode.scm = { get inputBox() { return extHostSCM.inputBox; - } - - get onDidAcceptInputValue() { - return mapEvent(extHostSCM.inputBox.onDidAccept, () => extHostSCM.inputBox); - } - + }, createSourceControl(id: string, label: string) { telemetryService.publicLog('registerSCMProvider', { extensionId: extension.id, @@ -480,10 +459,18 @@ export function createApiFactory( return extHostSCM.createSourceControl(id, label); } - } + }; + + // namespace: debug + const debug: typeof vscode.debug = { + createDebugSession: proposedApiFunction(extension, (config: vscode.DebugConfiguration) => { + return extHostDebugService.createDebugSession(config); + }), + onDidTerminateDebugSession: proposedApiFunction(extension, (listener, thisArg?, disposables?) => { + return extHostDebugService.onDidTerminateDebugSession(listener, thisArg, disposables); + }) + }; - // namespace: scm - const scm: typeof vscode.scm = new SCM(); return { version: pkg.version, @@ -495,6 +482,7 @@ export function createApiFactory( window, workspace, scm, + debug, // types CancellationTokenSource: CancellationTokenSource, CodeLens: extHostTypes.CodeLens, @@ -529,17 +517,21 @@ export function createApiFactory( TextEditorLineNumbersStyle: extHostTypes.TextEditorLineNumbersStyle, TextEditorRevealType: extHostTypes.TextEditorRevealType, TextEditorSelectionChangeKind: extHostTypes.TextEditorSelectionChangeKind, + DecorationRangeBehavior: extHostTypes.DecorationRangeBehavior, Uri: URI, ViewColumn: extHostTypes.ViewColumn, WorkspaceEdit: extHostTypes.WorkspaceEdit, ProgressLocation: extHostTypes.ProgressLocation, + TreeItemCollapsibleState: extHostTypes.TreeItemCollapsibleState, + TreeItem: extHostTypes.TreeItem, + ThemeColor: extHostTypes.ThemeColor, // functions - FileLocationKind: extHostTypes.FileLocationKind, - ApplyToKind: extHostTypes.ApplyToKind, - RevealKind: extHostTypes.RevealKind, + TaskRevealKind: extHostTypes.TaskRevealKind, + TaskPanelKind: extHostTypes.TaskPanelKind, TaskGroup: extHostTypes.TaskGroup, - ShellTask: extHostTypes.ShellTask, - ProcessTask: extHostTypes.ProcessTask + ProcessExecution: extHostTypes.ProcessExecution, + ShellExecution: extHostTypes.ShellExecution, + Task: extHostTypes.Task }; }; } diff --git a/src/vs/workbench/api/node/extHost.contribution.ts b/src/vs/workbench/api/node/extHost.contribution.ts deleted file mode 100644 index 2a0e9f874862e..0000000000000 --- a/src/vs/workbench/api/node/extHost.contribution.ts +++ /dev/null @@ -1,107 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import { IWorkbenchContribution, IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; -import { Registry } from 'vs/platform/platform'; -import { IInstantiationService, IConstructorSignature0 } from 'vs/platform/instantiation/common/instantiation'; -import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; -import { MainContext, InstanceCollection } from './extHost.protocol'; -import { IExtensionService } from 'vs/platform/extensions/common/extensions'; - -// --- addressable -import { MainThreadCommands } from './mainThreadCommands'; -import { MainThreadConfiguration } from './mainThreadConfiguration'; -import { MainThreadDiagnostics } from './mainThreadDiagnostics'; -import { MainThreadDocuments } from './mainThreadDocuments'; -import { MainThreadEditors } from './mainThreadEditors'; -import { MainThreadErrors } from './mainThreadErrors'; -import { MainThreadTreeView } from './mainThreadTreeView'; -import { MainThreadLanguageFeatures } from './mainThreadLanguageFeatures'; -import { MainThreadLanguages } from './mainThreadLanguages'; -import { MainThreadMessageService } from './mainThreadMessageService'; -import { MainThreadOutputService } from './mainThreadOutputService'; -import { MainThreadProgress } from './mainThreadProgress'; -import { MainThreadQuickOpen } from './mainThreadQuickOpen'; -import { MainThreadStatusBar } from './mainThreadStatusBar'; -import { MainThreadStorage } from './mainThreadStorage'; -import { MainThreadTelemetry } from './mainThreadTelemetry'; -import { MainThreadTerminalService } from './mainThreadTerminalService'; -import { MainThreadWorkspace } from './mainThreadWorkspace'; -import { MainProcessExtensionService } from './mainThreadExtensionService'; -import { MainThreadFileSystemEventService } from './mainThreadFileSystemEventService'; -import { MainThreadTask } from './mainThreadTask'; -import { MainThreadSCM } from './mainThreadSCM'; - -// --- other interested parties -import { MainThreadDocumentsAndEditors } from './mainThreadDocumentsAndEditors'; -import { JSONValidationExtensionPoint } from 'vs/platform/jsonschemas/common/jsonValidationExtensionPoint'; -import { LanguageConfigurationFileHandler } from 'vs/editor/node/languageConfigurationExtensionPoint'; -import { SaveParticipant } from './mainThreadSaveParticipant'; - -// --- registers itself as service -import './mainThreadHeapService'; - -export class ExtHostContribution implements IWorkbenchContribution { - - constructor( - @IThreadService private threadService: IThreadService, - @IInstantiationService private instantiationService: IInstantiationService, - @IExtensionService private extensionService: IExtensionService - ) { - this.initExtensionSystem(); - } - - public getId(): string { - return 'vs.api.extHost'; - } - - private initExtensionSystem(): void { - const create = (ctor: IConstructorSignature0): T => { - return this.instantiationService.createInstance(ctor); - }; - - const documentsAndEditors = this.instantiationService.createInstance(MainThreadDocumentsAndEditors); - - // Addressable instances - const col = new InstanceCollection(); - col.define(MainContext.MainThreadCommands).set(create(MainThreadCommands)); - col.define(MainContext.MainThreadConfiguration).set(create(MainThreadConfiguration)); - col.define(MainContext.MainThreadDiagnostics).set(create(MainThreadDiagnostics)); - col.define(MainContext.MainThreadDocuments).set(this.instantiationService.createInstance(MainThreadDocuments, documentsAndEditors)); - col.define(MainContext.MainThreadEditors).set(this.instantiationService.createInstance(MainThreadEditors, documentsAndEditors)); - col.define(MainContext.MainThreadErrors).set(create(MainThreadErrors)); - col.define(MainContext.MainThreadExplorers).set(create(MainThreadTreeView)); - col.define(MainContext.MainThreadLanguageFeatures).set(create(MainThreadLanguageFeatures)); - col.define(MainContext.MainThreadLanguages).set(create(MainThreadLanguages)); - col.define(MainContext.MainThreadMessageService).set(create(MainThreadMessageService)); - col.define(MainContext.MainThreadOutputService).set(create(MainThreadOutputService)); - col.define(MainContext.MainThreadProgress).set(create(MainThreadProgress)); - col.define(MainContext.MainThreadQuickOpen).set(create(MainThreadQuickOpen)); - col.define(MainContext.MainThreadStatusBar).set(create(MainThreadStatusBar)); - col.define(MainContext.MainThreadStorage).set(create(MainThreadStorage)); - col.define(MainContext.MainThreadTelemetry).set(create(MainThreadTelemetry)); - col.define(MainContext.MainThreadTerminalService).set(create(MainThreadTerminalService)); - col.define(MainContext.MainThreadWorkspace).set(create(MainThreadWorkspace)); - col.define(MainContext.MainThreadSCM).set(create(MainThreadSCM)); - col.define(MainContext.MainThreadTask).set(create(MainThreadTask)); - if (this.extensionService instanceof MainProcessExtensionService) { - col.define(MainContext.MainProcessExtensionService).set(this.extensionService); - } - col.finish(true, this.threadService); - - // Other interested parties - create(JSONValidationExtensionPoint); - this.instantiationService.createInstance(LanguageConfigurationFileHandler); - create(MainThreadFileSystemEventService); - create(SaveParticipant); - } -} - -// Register File Tracker -Registry.as(WorkbenchExtensions.Workbench).registerWorkbenchContribution( - ExtHostContribution -); diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index d4cd004550a1c..31a81ca180995 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -22,7 +22,6 @@ import { IExtensionDescription } from 'vs/platform/extensions/common/extensions' import { StatusbarAlignment as MainThreadStatusBarAlignment } from 'vs/platform/statusbar/common/statusbar'; import { ITelemetryInfo } from 'vs/platform/telemetry/common/telemetry'; import { ICommandHandlerDescription } from 'vs/platform/commands/common/commands'; -import { IWorkspace } from 'vs/platform/workspace/common/workspace'; import { IProgressOptions, IProgressStep } from 'vs/platform/progress/common/progress'; import * as editorCommon from 'vs/editor/common/editorCommon'; @@ -31,18 +30,22 @@ import { IResourceEdit } from 'vs/editor/common/services/bulkEdit'; import { ITextSource } from 'vs/editor/common/model/textSource'; import { ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; -import { IWorkspaceConfigurationValues } from 'vs/workbench/services/configuration/common/configuration'; +import { IConfigurationData } from 'vs/platform/configuration/common/configuration'; import { IPickOpenEntry, IPickOptions } from 'vs/platform/quickOpen/common/quickOpen'; import { SaveReason } from 'vs/workbench/services/textfile/common/textfiles'; -import { IApplyEditsOptions, IUndoStopOptions, TextEditorRevealType, ITextEditorConfigurationUpdate, IResolvedTextEditorConfiguration, ISelectionChangeEvent } from './mainThreadEditor'; +import { TextEditorCursorStyle } from 'vs/editor/common/config/editorOptions'; +import { EndOfLine, TextEditorLineNumbersStyle } from 'vs/workbench/api/node/extHostTypes'; + -import { InternalTreeNodeContent } from 'vs/workbench/parts/explorers/common/treeExplorerViewModel'; import { TaskSet } from 'vs/workbench/parts/tasks/common/tasks'; import { IModelChangedEvent } from 'vs/editor/common/model/mirrorModel'; import { IPosition } from 'vs/editor/common/core/position'; import { IRange } from 'vs/editor/common/core/range'; -import { ISelection } from 'vs/editor/common/core/selection'; +import { ISelection, Selection } from 'vs/editor/common/core/selection'; + +import { ITreeItem } from 'vs/workbench/parts/views/common/views'; +import { ThemeColor } from 'vs/platform/theme/common/themeService'; export interface IEnvironment { enableProposedApiForAll: boolean; @@ -54,14 +57,18 @@ export interface IEnvironment { extensionTestsPath: string; } +export interface IWorkspaceData { + id: string; + name: string; + roots: URI[]; +} + export interface IInitData { parentPid: number; environment: IEnvironment; - contextService: { - workspace: IWorkspace; - }; + workspace: IWorkspaceData; extensions: IExtensionDescription[]; - configuration: IWorkspaceConfigurationValues; + configuration: IConfigurationData; telemetryInfo: ITelemetryInfo; } @@ -79,9 +86,9 @@ export class InstanceCollection { public define(id: ProxyIdentifier): InstanceSetter { let that = this; return new class { - set(value: T) { + set(value: T): R { that._set(id, value); - return value; + return value; } }; } @@ -134,6 +141,44 @@ export abstract class MainThreadDocumentsShape { $trySaveDocument(uri: URI): TPromise { throw ni(); } } + +export interface ISelectionChangeEvent { + selections: Selection[]; + source?: string; +} + +export interface ITextEditorConfigurationUpdate { + tabSize?: number | 'auto'; + insertSpaces?: boolean | 'auto'; + cursorStyle?: TextEditorCursorStyle; + lineNumbers?: TextEditorLineNumbersStyle; +} + +export interface IResolvedTextEditorConfiguration { + tabSize: number; + insertSpaces: boolean; + cursorStyle: TextEditorCursorStyle; + lineNumbers: TextEditorLineNumbersStyle; +} + +export enum TextEditorRevealType { + Default = 0, + InCenter = 1, + InCenterIfOutsideViewport = 2, + AtTop = 3 +} + +export interface IUndoStopOptions { + undoStopBefore: boolean; + undoStopAfter: boolean; +} + +export interface IApplyEditsOptions extends IUndoStopOptions { + setEndOfLine: EndOfLine; +} + + + export interface ITextDocumentShowOptions { position?: EditorPosition; preserveFocus?: boolean; @@ -155,14 +200,9 @@ export abstract class MainThreadEditorsShape { $getDiffInformation(id: string): TPromise { throw ni(); } } -export abstract class MainThreadTreeViewShape { - $registerTreeDataProvider(providerId: string): void { throw ni(); } - $refresh(providerId: string, node: InternalTreeNodeContent): void { throw ni(); } -} - -export abstract class MainThreadTreeShape { - $registerTreeExplorerNodeProvider(providerId: string, node: InternalTreeNodeContent): void { throw ni(); } - $refresh(providerId: string, node: InternalTreeNodeContent): void { throw ni(); } +export abstract class MainThreadTreeViewsShape { + $registerView(treeViewId: string): void { throw ni(); } + $refresh(treeViewId: string, treeItemHandle?: number): void { throw ni(); } } export abstract class MainThreadErrorsShape { @@ -228,14 +268,14 @@ export interface MyQuickPickItems extends IPickOpenEntry { handle: number; } export abstract class MainThreadQuickOpenShape { - $show(options: IPickOptions): Thenable { throw ni(); } - $setItems(items: MyQuickPickItems[]): Thenable { throw ni(); } - $setError(error: Error): Thenable { throw ni(); } + $show(options: IPickOptions): TPromise { throw ni(); } + $setItems(items: MyQuickPickItems[]): TPromise { throw ni(); } + $setError(error: Error): TPromise { throw ni(); } $input(options: vscode.InputBoxOptions, validateInput: boolean): TPromise { throw ni(); } } export abstract class MainThreadStatusBarShape { - $setEntry(id: number, extensionId: string, text: string, tooltip: string, command: string, color: string, alignment: MainThreadStatusBarAlignment, priority: number): void { throw ni(); } + $setEntry(id: number, extensionId: string, text: string, tooltip: string, command: string, color: string | ThemeColor, alignment: MainThreadStatusBarAlignment, priority: number): void { throw ni(); } $dispose(id: number) { throw ni(); } } @@ -295,12 +335,20 @@ export abstract class MainThreadSCMShape { $registerGroup(sourceControlHandle: number, handle: number, id: string, label: string): void { throw ni(); } $updateGroup(sourceControlHandle: number, handle: number, features: SCMGroupFeatures): void { throw ni(); } + $updateGroupLabel(sourceControlHandle: number, handle: number, label: string): void { throw ni(); } $updateGroupResourceStates(sourceControlHandle: number, groupHandle: number, resources: SCMRawResource[]): void { throw ni(); } $unregisterGroup(sourceControlHandle: number, handle: number): void { throw ni(); } $setInputBoxValue(value: string): void { throw ni(); } } +export type DebugSessionUUID = string; + +export abstract class MainThreadDebugServiceShape { + $createDebugSession(config: vscode.DebugConfiguration): TPromise { throw ni(); } + $customDebugAdapterRequest(id: DebugSessionUUID, command: string, args: any): TPromise { throw ni(); } +} + // -- extension host export abstract class ExtHostCommandsShape { @@ -309,7 +357,7 @@ export abstract class ExtHostCommandsShape { } export abstract class ExtHostConfigurationShape { - $acceptConfigurationChanged(values: IWorkspaceConfigurationValues) { throw ni(); } + $acceptConfigurationChanged(data: IConfigurationData) { throw ni(); } } export abstract class ExtHostDiagnosticsShape { @@ -328,8 +376,7 @@ export abstract class ExtHostDocumentsShape { $provideTextDocumentContent(handle: number, uri: URI): TPromise { throw ni(); } $acceptModelModeChanged(strURL: string, oldModeId: string, newModeId: string): void { throw ni(); } $acceptModelSaved(strURL: string): void { throw ni(); } - $acceptModelDirty(strURL: string): void { throw ni(); } - $acceptModelReverted(strURL: string): void { throw ni(); } + $acceptDirtyStateChanged(strURL: string, isDirty: boolean): void { throw ni(); } $acceptModelChanged(strURL: string, e: IModelChangedEvent, isDirty: boolean): void { throw ni(); } } @@ -365,20 +412,16 @@ export abstract class ExtHostDocumentsAndEditorsShape { $acceptDocumentsAndEditorsDelta(delta: IDocumentsAndEditorsDelta): void { throw ni(); } } - -export abstract class ExtHostTreeViewShape { - $provideRootNode(providerId: string): TPromise { throw ni(); }; - $resolveChildren(providerId: string, node: InternalTreeNodeContent): TPromise { throw ni(); } - $getInternalCommand(providerId: string, node: InternalTreeNodeContent): TPromise { throw ni(); } +export abstract class ExtHostTreeViewsShape { + $getElements(treeViewId: string): TPromise { throw ni(); } + $getChildren(treeViewId: string, treeItemHandle: number): TPromise { throw ni(); } } -export abstract class ExtHostTreeShape { - $resolveChildren(providerId: string, node: InternalTreeNodeContent): TPromise { throw ni(); } - $getInternalCommand(providerId: string, node: InternalTreeNodeContent): TPromise { throw ni(); } +export abstract class ExtHostWorkspaceShape { + $acceptWorkspaceData(workspace: IWorkspaceData): void { throw ni(); } } export abstract class ExtHostExtensionServiceShape { - $localShowMessage(severity: Severity, msg: string): void { throw ni(); } $activateExtension(extensionDescription: IExtensionDescription): TPromise { throw ni(); } } @@ -456,16 +499,21 @@ export abstract class ExtHostTaskShape { $provideTasks(handle: number): TPromise { throw ni(); } } +export abstract class ExtHostDebugServiceShape { + $acceptDebugSessionTerminated(id: DebugSessionUUID, type: string, name: string): void { throw ni(); } +} + // --- proxy identifiers export const MainContext = { MainThreadCommands: createMainId('MainThreadCommands', MainThreadCommandsShape), MainThreadConfiguration: createMainId('MainThreadConfiguration', MainThreadConfigurationShape), + MainThreadDebugService: createMainId('MainThreadDebugService', MainThreadDebugServiceShape), MainThreadDiagnostics: createMainId('MainThreadDiagnostics', MainThreadDiagnosticsShape), MainThreadDocuments: createMainId('MainThreadDocuments', MainThreadDocumentsShape), MainThreadEditors: createMainId('MainThreadEditors', MainThreadEditorsShape), MainThreadErrors: createMainId('MainThreadErrors', MainThreadErrorsShape), - MainThreadExplorers: createMainId('MainThreadTreeView', MainThreadTreeViewShape), + MainThreadTreeViews: createMainId('MainThreadTreeViews', MainThreadTreeViewsShape), MainThreadLanguageFeatures: createMainId('MainThreadLanguageFeatures', MainThreadLanguageFeaturesShape), MainThreadLanguages: createMainId('MainThreadLanguages', MainThreadLanguagesShape), MainThreadMessageService: createMainId('MainThreadMessageService', MainThreadMessageServiceShape), @@ -486,11 +534,12 @@ export const ExtHostContext = { ExtHostCommands: createExtId('ExtHostCommands', ExtHostCommandsShape), ExtHostConfiguration: createExtId('ExtHostConfiguration', ExtHostConfigurationShape), ExtHostDiagnostics: createExtId('ExtHostDiagnostics', ExtHostDiagnosticsShape), + ExtHostDebugService: createExtId('ExtHostDebugService', ExtHostDebugServiceShape), ExtHostDocumentsAndEditors: createExtId('ExtHostDocumentsAndEditors', ExtHostDocumentsAndEditorsShape), ExtHostDocuments: createExtId('ExtHostDocuments', ExtHostDocumentsShape), ExtHostDocumentSaveParticipant: createExtId('ExtHostDocumentSaveParticipant', ExtHostDocumentSaveParticipantShape), ExtHostEditors: createExtId('ExtHostEditors', ExtHostEditorsShape), - ExtHostTreeView: createExtId('ExtHostTreeView', ExtHostTreeViewShape), + ExtHostTreeViews: createExtId('ExtHostTreeViews', ExtHostTreeViewsShape), ExtHostFileSystemEventService: createExtId('ExtHostFileSystemEventService', ExtHostFileSystemEventServiceShape), ExtHostHeapService: createExtId('ExtHostHeapMonitor', ExtHostHeapServiceShape), ExtHostLanguageFeatures: createExtId('ExtHostLanguageFeatures', ExtHostLanguageFeaturesShape), @@ -498,5 +547,6 @@ export const ExtHostContext = { ExtHostExtensionService: createExtId('ExtHostExtensionService', ExtHostExtensionServiceShape), ExtHostTerminalService: createExtId('ExtHostTerminalService', ExtHostTerminalServiceShape), ExtHostSCM: createExtId('ExtHostSCM', ExtHostSCMShape), - ExtHostTask: createExtId('ExtHostTask', ExtHostTaskShape) + ExtHostTask: createExtId('ExtHostTask', ExtHostTaskShape), + ExtHostWorkspace: createExtId('ExtHostWorkspace', ExtHostWorkspaceShape), }; diff --git a/src/vs/workbench/api/node/extHostApiCommands.ts b/src/vs/workbench/api/node/extHostApiCommands.ts index aef4d71d01fe1..bd540c0fa0857 100644 --- a/src/vs/workbench/api/node/extHostApiCommands.ts +++ b/src/vs/workbench/api/node/extHostApiCommands.ts @@ -14,9 +14,7 @@ import { ISingleEditOperation } from 'vs/editor/common/editorCommon'; import * as modes from 'vs/editor/common/modes'; import { ICommandHandlerDescription } from 'vs/platform/commands/common/commands'; import { ExtHostCommands } from 'vs/workbench/api/node/extHostCommands'; -import { IOutline } from 'vs/editor/contrib/quickOpen/common/quickOpen'; import { IWorkspaceSymbolProvider } from 'vs/workbench/parts/search/common/search'; -import { ICodeLensData } from 'vs/editor/contrib/codelens/common/codelens'; import { IEditorOptions } from 'vs/platform/editor/common/editor'; export class ExtHostApiCommands { @@ -163,11 +161,12 @@ export class ExtHostApiCommands { returns: 'A promise that resolves to an array of DocumentLink-instances.' }); - this._register('vscode.previewHtml', (uri: URI, position?: vscode.ViewColumn, label?: string) => { + this._register('vscode.previewHtml', (uri: URI, position?: vscode.ViewColumn, label?: string, options?: any) => { return this._commands.executeCommand('_workbench.previewHtml', uri, typeof position === 'number' && typeConverters.fromViewColumn(position), - label); + label, + options); }, { description: ` Render the html of the resource in an editor view. @@ -177,13 +176,14 @@ export class ExtHostApiCommands { args: [ { name: 'uri', description: 'Uri of the resource to preview.', constraint: value => value instanceof URI || typeof value === 'string' }, { name: 'column', description: '(optional) Column in which to preview.', constraint: value => typeof value === 'undefined' || (typeof value === 'number' && typeof types.ViewColumn[value] === 'string') }, - { name: 'label', description: '(optional) An human readable string that is used as title for the preview.', constraint: v => typeof v === 'string' || typeof v === 'undefined' } + { name: 'label', description: '(optional) An human readable string that is used as title for the preview.', constraint: v => typeof v === 'string' || typeof v === 'undefined' }, + { name: 'options', description: '(optional) Options for controlling webview environment.', constraint: v => typeof v === 'object' || typeof v === 'undefined' } ] }); this._register('vscode.openFolder', (uri?: URI, forceNewWindow?: boolean) => { if (!uri) { - return this._commands.executeCommand('_files.openFolderPicker', forceNewWindow); + return this._commands.executeCommand('_files.pickFolderAndOpen', forceNewWindow); } return this._commands.executeCommand('_files.windowOpen', [uri.fsPath], forceNewWindow); @@ -343,7 +343,7 @@ export class ExtHostApiCommands { return undefined; } if (value.rejectReason) { - return TPromise.wrapError(value.rejectReason); + return TPromise.wrapError(new Error(value.rejectReason)); } let workspaceEdit = new types.WorkspaceEdit(); for (let edit of value.edits) { @@ -386,7 +386,7 @@ export class ExtHostApiCommands { const args = { resource }; - return this._commands.executeCommand('_executeDocumentSymbolProvider', args).then(value => { + return this._commands.executeCommand('_executeDocumentSymbolProvider', args).then(value => { if (value && Array.isArray(value.entries)) { return value.entries.map(typeConverters.toSymbolInformation); } @@ -409,12 +409,12 @@ export class ExtHostApiCommands { private _executeCodeLensProvider(resource: URI): Thenable { const args = { resource }; - return this._commands.executeCommand('_executeCodeLensProvider', args).then(value => { + return this._commands.executeCommand('_executeCodeLensProvider', args).then(value => { if (Array.isArray(value)) { return value.map(item => { return new types.CodeLens( - typeConverters.toRange(item.symbol.range), - this._commands.converter.fromInternal(item.symbol.command)); + typeConverters.toRange(item.range), + this._commands.converter.fromInternal(item.command)); }); } return undefined; diff --git a/src/vs/workbench/api/node/extHostCommands.ts b/src/vs/workbench/api/node/extHostCommands.ts index 2095dac3b4aec..00ff4f00c4f2f 100644 --- a/src/vs/workbench/api/node/extHostCommands.ts +++ b/src/vs/workbench/api/node/extHostCommands.ts @@ -104,7 +104,7 @@ export class ExtHostCommands extends ExtHostCommandsShape { $executeContributedCommand(id: string, ...args: any[]): Thenable { let command = this._commands.get(id); if (!command) { - return TPromise.wrapError(`Contributed command '${id}' does not exist.`); + return TPromise.wrapError(new Error(`Contributed command '${id}' does not exist.`)); } let { callback, thisArg, description } = command; @@ -114,7 +114,7 @@ export class ExtHostCommands extends ExtHostCommandsShape { try { validateConstraint(args[i], description.args[i].constraint); } catch (err) { - return TPromise.wrapError(`Running the contributed command:'${id}' failed. Illegal argument '${description.args[i].name}' - ${description.args[i].description}`); + return TPromise.wrapError(new Error(`Running the contributed command:'${id}' failed. Illegal argument '${description.args[i].name}' - ${description.args[i].description}`)); } } } @@ -131,7 +131,7 @@ export class ExtHostCommands extends ExtHostCommandsShape { // } catch (err) { // // // } - return TPromise.wrapError(`Running the contributed command:'${id}' failed.`); + return TPromise.wrapError(new Error(`Running the contributed command:'${id}' failed.`)); } } @@ -218,7 +218,7 @@ export class CommandsConverter { } } - private _executeConvertedCommand(...args: any[]) { + private _executeConvertedCommand(...args: any[]): Thenable { const actualCmd = this._heap.get(args[0]); return this._commands.executeCommand(actualCmd.command, ...actualCmd.arguments); } diff --git a/src/vs/workbench/api/node/extHostConfiguration.ts b/src/vs/workbench/api/node/extHostConfiguration.ts index 84b4d218335dc..b900063a37884 100644 --- a/src/vs/workbench/api/node/extHostConfiguration.ts +++ b/src/vs/workbench/api/node/extHostConfiguration.ts @@ -5,12 +5,13 @@ 'use strict'; import { mixin } from 'vs/base/common/objects'; +import URI from 'vs/base/common/uri'; import Event, { Emitter } from 'vs/base/common/event'; -import { WorkspaceConfiguration } from 'vscode'; +import { WorkspaceConfiguration, WorkspaceConfiguration2 } from 'vscode'; +import { ExtHostWorkspace } from 'vs/workbench/api/node/extHostWorkspace'; import { ExtHostConfigurationShape, MainThreadConfigurationShape } from './extHost.protocol'; +import { IConfigurationData, Configuration } from 'vs/platform/configuration/common/configuration'; import { ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; -import { IWorkspaceConfigurationValues } from 'vs/workbench/services/configuration/common/configuration'; -import { toValuesTree } from 'vs/platform/configuration/common/model'; function lookUp(tree: any, key: string) { if (key) { @@ -23,51 +24,50 @@ function lookUp(tree: any, key: string) { } } -interface UsefulConfiguration { - data: IWorkspaceConfigurationValues; - valueTree: any; -} - -function createUsefulConfiguration(data: IWorkspaceConfigurationValues): { data: IWorkspaceConfigurationValues, valueTree: any } { - const valueMap: { [key: string]: any } = Object.create(null); - for (let key in data) { - if (Object.prototype.hasOwnProperty.call(data, key)) { - valueMap[key] = data[key].value; - } - } - const valueTree = toValuesTree(valueMap, message => console.error(`Conflict in configuration settings: ${message}`)); - return { - data, - valueTree - }; -} +type ConfigurationInspect = { + key: string; + defaultValue?: T; + globalValue?: T; + workspaceValue?: T; + folderValue?: T; +}; export class ExtHostConfiguration extends ExtHostConfigurationShape { - private _onDidChangeConfiguration = new Emitter(); - private _proxy: MainThreadConfigurationShape; - private _configuration: UsefulConfiguration; + private readonly _onDidChangeConfiguration = new Emitter(); + private readonly _proxy: MainThreadConfigurationShape; + private readonly _extHostWorkspace: ExtHostWorkspace; + private _configuration: Configuration; - constructor(proxy: MainThreadConfigurationShape, data: IWorkspaceConfigurationValues) { + constructor(proxy: MainThreadConfigurationShape, extHostWorkspace: ExtHostWorkspace, data: IConfigurationData) { super(); this._proxy = proxy; - this._configuration = createUsefulConfiguration(data); + this._extHostWorkspace = extHostWorkspace; + this._configuration = Configuration.parse(data, extHostWorkspace.workspace); } get onDidChangeConfiguration(): Event { return this._onDidChangeConfiguration && this._onDidChangeConfiguration.event; } - public $acceptConfigurationChanged(data: IWorkspaceConfigurationValues) { - this._configuration = createUsefulConfiguration(data); + $acceptConfigurationChanged(data: IConfigurationData) { + this._configuration = Configuration.parse(data, this._extHostWorkspace.workspace); this._onDidChangeConfiguration.fire(undefined); } - public getConfiguration(section?: string): WorkspaceConfiguration { + getConfiguration(section?: string): WorkspaceConfiguration { + return this._getConfiguration(section, null, true); + } + + getConfiguration2(section?: string, resource?: URI): WorkspaceConfiguration2 { + return this._getConfiguration(section, resource, false); + } + + private _getConfiguration(section: string, resource: URI, legacy: boolean): WorkspaceConfiguration { const config = section - ? lookUp(this._configuration.valueTree, section) - : this._configuration.valueTree; + ? lookUp(this._configuration.getValue(null, { resource }), section) + : this._configuration.getValue(null, { resource }); const result: WorkspaceConfiguration = { has(key: string): boolean { @@ -89,16 +89,20 @@ export class ExtHostConfiguration extends ExtHostConfigurationShape { return this._proxy.$removeConfigurationOption(target, key); } }, - inspect: (key: string): { key: string; defaultValue?: T; globalValue?: T; workspaceValue?: T } => { + inspect: (key: string): ConfigurationInspect => { key = section ? `${section}.${key}` : key; - const config = this._configuration.data[key]; + const config = legacy ? this._configuration.lookupLegacy(key) : this._configuration.lookup(key, { resource }); if (config) { - return { + const inspect: ConfigurationInspect = { key, defaultValue: config.default, globalValue: config.user, - workspaceValue: config.workspace + workspaceValue: config.workspace, }; + if (!legacy) { + inspect.folderValue = config.folder; + } + return inspect; } return undefined; } diff --git a/src/vs/workbench/api/node/extHostDebugService.ts b/src/vs/workbench/api/node/extHostDebugService.ts new file mode 100644 index 0000000000000..3b1a496cd6faf --- /dev/null +++ b/src/vs/workbench/api/node/extHostDebugService.ts @@ -0,0 +1,80 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import { TPromise } from 'vs/base/common/winjs.base'; +import Event, { Emitter } from 'vs/base/common/event'; + +import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; +import { MainContext, MainThreadDebugServiceShape, ExtHostDebugServiceShape, DebugSessionUUID } from 'vs/workbench/api/node/extHost.protocol'; + +import * as vscode from 'vscode'; + + +export class ExtHostDebugService extends ExtHostDebugServiceShape { + + private _debugServiceProxy: MainThreadDebugServiceShape; + private _debugSessions: Map = new Map(); + + private _onDidTerminateDebugSession: Emitter; + get onDidTerminateDebugSession(): Event { return this._onDidTerminateDebugSession.event; } + + + constructor(threadService: IThreadService) { + super(); + + this._onDidTerminateDebugSession = new Emitter(); + this._debugServiceProxy = threadService.get(MainContext.MainThreadDebugService); + } + + public createDebugSession(config: vscode.DebugConfiguration): TPromise { + + return this._debugServiceProxy.$createDebugSession(config).then((id: DebugSessionUUID) => { + const debugSession = new ExtHostDebugSession(this._debugServiceProxy, id, config.type, config.name); + this._debugSessions.set(id, debugSession); + return debugSession; + }); + } + + public $acceptDebugSessionTerminated(id: DebugSessionUUID, type: string, name: string): void { + + let debugSession = this._debugSessions.get(id); + if (!debugSession) { + debugSession = new ExtHostDebugSession(this._debugServiceProxy, id, type, name); + } + this._onDidTerminateDebugSession.fire(debugSession); + this._debugSessions.delete(id); + } +} + +export class ExtHostDebugSession implements vscode.DebugSession { + + private _debugServiceProxy: MainThreadDebugServiceShape; + + private _id: DebugSessionUUID; + + private _type: string; + private _name: string; + + + constructor(proxy: MainThreadDebugServiceShape, id: DebugSessionUUID, type: string, name: string) { + this._debugServiceProxy = proxy; + this._id = id; + this._type = type; + this._name = name; + }; + + public get type(): string { + return this._type; + } + + public get name(): string { + return this._name; + } + + public customRequest(command: string, args: any): Thenable { + return this._debugServiceProxy.$customDebugAdapterRequest(this._id, command, args); + } +} diff --git a/src/vs/workbench/api/node/extHostDiagnostics.ts b/src/vs/workbench/api/node/extHostDiagnostics.ts index f7d240175d30b..eeb41c0b0e903 100644 --- a/src/vs/workbench/api/node/extHostDiagnostics.ts +++ b/src/vs/workbench/api/node/extHostDiagnostics.ts @@ -12,6 +12,7 @@ import Severity from 'vs/base/common/severity'; import * as vscode from 'vscode'; import { MainContext, MainThreadDiagnosticsShape, ExtHostDiagnosticsShape } from './extHost.protocol'; import { DiagnosticSeverity } from './extHostTypes'; +import { mergeSort } from 'vs/base/common/arrays'; export class DiagnosticCollection implements vscode.DiagnosticCollection { @@ -74,13 +75,10 @@ export class DiagnosticCollection implements vscode.DiagnosticCollection { toSync = []; let lastUri: vscode.Uri; - // ensure stable-sort: keep the original - // index for otherwise equal items - const sortedTuples = first - .map((tuple, idx) => ({ tuple, idx })) - .sort(DiagnosticCollection._compareIndexedTuplesByUri); + // ensure stable-sort + mergeSort(first, DiagnosticCollection._compareIndexedTuplesByUri); - for (const { tuple } of sortedTuples) { + for (const tuple of first) { const [uri, diagnostics] = tuple; if (!lastUri || uri.toString() !== lastUri.toString()) { if (lastUri && this._data.get(lastUri.toString()).length === 0) { @@ -208,14 +206,10 @@ export class DiagnosticCollection implements vscode.DiagnosticCollection { } } - private static _compareIndexedTuplesByUri(a: { tuple: [vscode.Uri, vscode.Diagnostic[]]; idx: number }, b: { tuple: [vscode.Uri, vscode.Diagnostic[]]; idx: number }): number { - if (a.tuple[0].toString() < b.tuple[0].toString()) { + private static _compareIndexedTuplesByUri(a: [vscode.Uri, vscode.Diagnostic[]], b: [vscode.Uri, vscode.Diagnostic[]]): number { + if (a[0].toString() < b[0].toString()) { return -1; - } else if (a.tuple[0].toString() > b.tuple[0].toString()) { - return 1; - } else if (a.idx < b.idx) { - return -1; - } else if (a.idx > b.idx) { + } else if (a[0].toString() > b[0].toString()) { return 1; } else { return 0; diff --git a/src/vs/workbench/api/node/extHostDocumentData.ts b/src/vs/workbench/api/node/extHostDocumentData.ts index 96cb2aec92d11..e6cd9c2597cde 100644 --- a/src/vs/workbench/api/node/extHostDocumentData.ts +++ b/src/vs/workbench/api/node/extHostDocumentData.ts @@ -101,7 +101,7 @@ export class ExtHostDocumentData extends MirrorModel { private _save(): TPromise { if (this._isDisposed) { - return TPromise.wrapError('Document has been closed'); + return TPromise.wrapError(new Error('Document has been closed')); } return this._proxy.$trySaveDocument(this._uri); } @@ -242,9 +242,17 @@ export class ExtHostDocumentData extends MirrorModel { private _getWordRangeAtPosition(_position: vscode.Position, regexp?: RegExp): vscode.Range { let position = this._validatePosition(_position); - if (!regexp || regExpLeadsToEndlessLoop(regexp)) { + + if (!regexp) { + // use default when custom-regexp isn't provided + regexp = getWordDefinitionFor(this._languageId); + + } else if (regExpLeadsToEndlessLoop(regexp)) { + // use default when custom-regexp is bad + console.warn(`[getWordRangeAtPosition]: ignoring custom regexp '${regexp.source}' because it matches the empty string.`); regexp = getWordDefinitionFor(this._languageId); } + let wordAtText = getWordAtText( position.character + 1, ensureValidWordDefinition(regexp), diff --git a/src/vs/workbench/api/node/extHostDocuments.ts b/src/vs/workbench/api/node/extHostDocuments.ts index 918efad51f393..745460d188fa4 100644 --- a/src/vs/workbench/api/node/extHostDocuments.ts +++ b/src/vs/workbench/api/node/extHostDocuments.ts @@ -154,7 +154,7 @@ export class ExtHostDocuments extends ExtHostDocumentsShape { public $provideTextDocumentContent(handle: number, uri: URI): TPromise { const provider = this._documentContentProviders.get(handle); if (!provider) { - return TPromise.wrapError(`unsupported uri-scheme: ${uri.scheme}`); + return TPromise.wrapError(new Error(`unsupported uri-scheme: ${uri.scheme}`)); } return asWinJsPromise(token => provider.provideTextDocumentContent(uri, token)); } @@ -171,18 +171,17 @@ export class ExtHostDocuments extends ExtHostDocumentsShape { public $acceptModelSaved(strURL: string): void { let data = this._documentsAndEditors.getDocument(strURL); - data._acceptIsDirty(false); + this.$acceptDirtyStateChanged(strURL, false); this._onDidSaveDocument.fire(data.document); } - public $acceptModelDirty(strURL: string): void { - let document = this._documentsAndEditors.getDocument(strURL); - document._acceptIsDirty(true); - } - - public $acceptModelReverted(strURL: string): void { - let document = this._documentsAndEditors.getDocument(strURL); - document._acceptIsDirty(false); + public $acceptDirtyStateChanged(strURL: string, isDirty: boolean): void { + let data = this._documentsAndEditors.getDocument(strURL); + data._acceptIsDirty(isDirty); + this._onDidChangeDocument.fire({ + document: data.document, + contentChanges: [] + }); } public $acceptModelChanged(strURL: string, events: IModelChangedEvent, isDirty: boolean): void { diff --git a/src/vs/workbench/api/node/extHostDocumentsAndEditors.ts b/src/vs/workbench/api/node/extHostDocumentsAndEditors.ts index 164827a79fd36..27baef47f8937 100644 --- a/src/vs/workbench/api/node/extHostDocumentsAndEditors.ts +++ b/src/vs/workbench/api/node/extHostDocumentsAndEditors.ts @@ -98,6 +98,9 @@ export class ExtHostDocumentsAndEditors extends ExtHostDocumentsAndEditorsShape this._activeEditorId = delta.newActiveEditor; } + dispose(removedDocuments); + dispose(removedEditors); + // now that the internal state is complete, fire events if (delta.removedDocuments) { this._onDidRemoveDocuments.fire(removedDocuments); @@ -112,10 +115,6 @@ export class ExtHostDocumentsAndEditors extends ExtHostDocumentsAndEditorsShape if (delta.newActiveEditor !== undefined) { this._onDidChangeActiveTextEditor.fire(this.activeEditor()); } - - // now that the events are out, dispose removed documents and editors - dispose(removedDocuments); - dispose(removedEditors); } getDocument(strUrl: string): ExtHostDocumentData { diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts index ae75796c7e288..d75347f83dc9e 100644 --- a/src/vs/workbench/api/node/extHostExtensionService.ts +++ b/src/vs/workbench/api/node/extHostExtensionService.ts @@ -15,9 +15,7 @@ import { ExtHostStorage } from 'vs/workbench/api/node/extHostStorage'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { createApiFactory, initializeExtensionApi } from 'vs/workbench/api/node/extHost.api.impl'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { MainContext, MainProcessExtensionServiceShape, IEnvironment, IInitData } from './extHost.protocol'; -import { createHash } from 'crypto'; +import { MainContext, MainProcessExtensionServiceShape, IWorkspaceData, IEnvironment, IInitData } from './extHost.protocol'; const hasOwnProperty = Object.hasOwnProperty; @@ -103,14 +101,14 @@ class ExtensionMemento implements IExtensionMemento { class ExtensionStoragePath { - private readonly _contextService: IWorkspaceContextService; + private readonly _workspace: IWorkspaceData; private readonly _environment: IEnvironment; private readonly _ready: TPromise; private _value: string; - constructor(contextService: IWorkspaceContextService, environment: IEnvironment) { - this._contextService = contextService; + constructor(workspace: IWorkspaceData, environment: IEnvironment) { + this._workspace = workspace; this._environment = environment; this._ready = this._getOrCreateWorkspaceStoragePath().then(value => this._value = value); } @@ -127,18 +125,10 @@ class ExtensionStoragePath { } private _getOrCreateWorkspaceStoragePath(): TPromise { - - const workspace = this._contextService.getWorkspace(); - - if (!workspace) { + if (!this._workspace) { return TPromise.as(undefined); } - - const storageName = createHash('md5') - .update(workspace.resource.fsPath) - .update(workspace.uid ? workspace.uid.toString() : '') - .digest('hex'); - + const storageName = this._workspace.id; const storagePath = join(this._environment.appSettingsHome, 'workspaceStorage', storageName); return dirExists(storagePath).then(exists => { @@ -171,23 +161,21 @@ export class ExtHostExtensionService extends AbstractExtensionService this._triggerOnReady()); } diff --git a/src/vs/workbench/api/node/extHostFileSystemEventService.ts b/src/vs/workbench/api/node/extHostFileSystemEventService.ts index abfcee9b75f5a..0e6ddf0a9aca8 100644 --- a/src/vs/workbench/api/node/extHostFileSystemEventService.ts +++ b/src/vs/workbench/api/node/extHostFileSystemEventService.ts @@ -33,13 +33,13 @@ class FileSystemWatcher implements _FileSystemWatcher { constructor(dispatcher: Event, globPattern: string, ignoreCreateEvents?: boolean, ignoreChangeEvents?: boolean, ignoreDeleteEvents?: boolean) { this._config = 0; - if (!ignoreCreateEvents) { + if (ignoreCreateEvents) { this._config += 0b001; } - if (!ignoreChangeEvents) { + if (ignoreChangeEvents) { this._config += 0b010; } - if (!ignoreDeleteEvents) { + if (ignoreDeleteEvents) { this._config += 0b100; } diff --git a/src/vs/workbench/api/node/extHostLanguageFeatures.ts b/src/vs/workbench/api/node/extHostLanguageFeatures.ts index 38c1be8627e25..2bf60e23f7ae4 100644 --- a/src/vs/workbench/api/node/extHostLanguageFeatures.ts +++ b/src/vs/workbench/api/node/extHostLanguageFeatures.ts @@ -554,7 +554,7 @@ class SuggestAdapter { } private _convertCompletionItem(item: vscode.CompletionItem, position: vscode.Position, defaultRange: vscode.Range): modes.ISuggestion { - if (!item.label) { + if (typeof item.label !== 'string' || item.label.length === 0) { console.warn('INVALID text edit -> must have at least a label'); return undefined; } diff --git a/src/vs/workbench/api/node/extHostMessageService.ts b/src/vs/workbench/api/node/extHostMessageService.ts index 32572895213d2..31d5cbdcd225c 100644 --- a/src/vs/workbench/api/node/extHostMessageService.ts +++ b/src/vs/workbench/api/node/extHostMessageService.ts @@ -31,7 +31,9 @@ export class ExtHostMessageService { this._proxy = threadService.get(MainContext.MainThreadMessageService); } - showMessage(severity: Severity, message: string, optionsOrFirstItem: vscode.MessageOptions | string | vscode.MessageItem, rest: (string | vscode.MessageItem)[]): Thenable { + showMessage(severity: Severity, message: string, optionsOrFirstItem: vscode.MessageOptions | string, rest: string[]): Thenable; + showMessage(severity: Severity, message: string, optionsOrFirstItem: vscode.MessageOptions | vscode.MessageItem, rest: vscode.MessageItem[]): Thenable; + showMessage(severity: Severity, message: string, optionsOrFirstItem: vscode.MessageOptions | string | vscode.MessageItem, rest: (string | vscode.MessageItem)[]): Thenable { const { options, items } = parseMessageArguments(optionsOrFirstItem, rest); const commands: { title: string; isCloseAffordance: boolean; handle: number; }[] = []; diff --git a/src/vs/workbench/api/node/extHostQuickOpen.ts b/src/vs/workbench/api/node/extHostQuickOpen.ts index 05cab704c0f14..183dcd1d7bc5d 100644 --- a/src/vs/workbench/api/node/extHostQuickOpen.ts +++ b/src/vs/workbench/api/node/extHostQuickOpen.ts @@ -24,7 +24,9 @@ export class ExtHostQuickOpen extends ExtHostQuickOpenShape { this._proxy = threadService.get(MainContext.MainThreadQuickOpen); } - showQuickPick(itemsOrItemsPromise: Item[] | Thenable, options?: QuickPickOptions, token: CancellationToken = CancellationToken.None): Thenable { + showQuickPick(itemsOrItemsPromise: string[] | Thenable, options?: QuickPickOptions, token?: CancellationToken): Thenable; + showQuickPick(itemsOrItemsPromise: QuickPickItem[] | Thenable, options?: QuickPickOptions, token?: CancellationToken): Thenable; + showQuickPick(itemsOrItemsPromise: Item[] | Thenable, options?: QuickPickOptions, token: CancellationToken = CancellationToken.None): Thenable { // clear state from last invocation this._onDidSelectItem = undefined; diff --git a/src/vs/workbench/api/node/extHostSCM.ts b/src/vs/workbench/api/node/extHostSCM.ts index 079d623d5dd0d..76c7078dda986 100644 --- a/src/vs/workbench/api/node/extHostSCM.ts +++ b/src/vs/workbench/api/node/extHostSCM.ts @@ -81,6 +81,11 @@ class ExtHostSourceControlResourceGroup implements vscode.SourceControlResourceG return this._label; } + set label(label: string) { + this._label = label; + this._proxy.$updateGroupLabel(this._sourceControlHandle, this._handle, label); + } + private _hideWhenEmpty: boolean | undefined = undefined; get hideWhenEmpty(): boolean | undefined { @@ -311,14 +316,17 @@ export class ExtHostSCM { return sourceControl; } - $provideOriginalResource(sourceControlHandle: number, uri: URI): TPromise { + $provideOriginalResource(sourceControlHandle: number, uri: URI): TPromise { const sourceControl = this._sourceControls.get(sourceControlHandle); if (!sourceControl || !sourceControl.quickDiffProvider) { return TPromise.as(null); } - return asWinJsPromise(token => sourceControl.quickDiffProvider.provideOriginalResource(uri, token)); + return asWinJsPromise(token => { + const result = sourceControl.quickDiffProvider.provideOriginalResource(uri, token); + return result && URI.parse(result.toString()); + }); } $onActiveSourceControlChange(handle: number): TPromise { diff --git a/src/vs/workbench/api/node/extHostStatusBar.ts b/src/vs/workbench/api/node/extHostStatusBar.ts index 97c917caf5134..6e91e7dbf9a3b 100644 --- a/src/vs/workbench/api/node/extHostStatusBar.ts +++ b/src/vs/workbench/api/node/extHostStatusBar.ts @@ -6,7 +6,7 @@ import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; import { StatusbarAlignment as MainThreadStatusBarAlignment } from 'vs/platform/statusbar/common/statusbar'; -import { StatusBarAlignment as ExtHostStatusBarAlignment, Disposable } from './extHostTypes'; +import { StatusBarAlignment as ExtHostStatusBarAlignment, Disposable, ThemeColor } from './extHostTypes'; import { StatusBarItem, StatusBarAlignment } from 'vscode'; import { MainContext, MainThreadStatusBarShape } from './extHost.protocol'; @@ -21,7 +21,7 @@ export class ExtHostStatusBarEntry implements StatusBarItem { private _text: string; private _tooltip: string; - private _color: string; + private _color: string | ThemeColor; private _command: string; private _timeoutHandle: number; @@ -57,7 +57,7 @@ export class ExtHostStatusBarEntry implements StatusBarItem { return this._tooltip; } - public get color(): string { + public get color(): string | ThemeColor { return this._color; } @@ -75,7 +75,7 @@ export class ExtHostStatusBarEntry implements StatusBarItem { this.update(); } - public set color(color: string) { + public set color(color: string | ThemeColor) { this._color = color; this.update(); } diff --git a/src/vs/workbench/api/node/extHostTask.ts b/src/vs/workbench/api/node/extHostTask.ts index 67bcbec00c9e2..e6bd17c90d4d9 100644 --- a/src/vs/workbench/api/node/extHostTask.ts +++ b/src/vs/workbench/api/node/extHostTask.ts @@ -4,17 +4,16 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; +import * as nls from 'vs/nls'; import { TPromise } from 'vs/base/common/winjs.base'; -import * as UUID from 'vs/base/common/uuid'; +import * as Objects from 'vs/base/common/objects'; import { asWinJsPromise } from 'vs/base/common/async'; -import * as Problems from 'vs/platform/markers/common/problemMatcher'; import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; import * as TaskSystem from 'vs/workbench/parts/tasks/common/tasks'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; import { MainContext, MainThreadTaskShape, ExtHostTaskShape } from 'vs/workbench/api/node/extHost.protocol'; -import { fromDiagnosticSeverity } from 'vs/workbench/api/node/extHostTypeConverters'; import * as types from 'vs/workbench/api/node/extHostTypes'; import * as vscode from 'vscode'; @@ -23,6 +22,7 @@ interface StringMap { [key: string]: V; } +/* namespace ProblemPattern { export function from(value: vscode.ProblemPattern | vscode.MultiLineProblemPattern): Problems.ProblemPattern | Problems.MultiLineProblemPattern { if (value === void 0 || value === null) { @@ -144,7 +144,7 @@ namespace WatchingPattern { } } -namespace WathingMatcher { +namespace BackgroundMonitor { export function from(value: vscode.BackgroundMonitor): Problems.WatchingMatcher { if (value === void 0 || value === null) { return undefined; @@ -159,13 +159,13 @@ namespace WathingMatcher { } namespace ProblemMatcher { - export function from(values: vscode.ProblemMatcher[]): Problems.ProblemMatcher[] { + export function from(values: (string | vscode.ProblemMatcher)[]): (string | Problems.ProblemMatcher)[] { if (values === void 0 || values === null) { return undefined; } - let result: Problems.ProblemMatcher[]; + let result: (string | Problems.ProblemMatcher)[] = []; for (let value of values) { - let converted = fromSingle(value); + let converted = typeof value === 'string' ? value : fromSingle(value); if (converted) { result.push(converted); } @@ -186,33 +186,54 @@ namespace ProblemMatcher { filePrefix: location.prefix, pattern: ProblemPattern.from(problemMatcher.pattern), severity: fromDiagnosticSeverity(problemMatcher.severity), - }; return result; } } +*/ + +namespace TaskRevealKind { + export function from(value: vscode.TaskRevealKind): TaskSystem.RevealKind { + if (value === void 0 || value === null) { + return TaskSystem.RevealKind.Always; + } + switch (value) { + case types.TaskRevealKind.Silent: + return TaskSystem.RevealKind.Silent; + case types.TaskRevealKind.Never: + return TaskSystem.RevealKind.Never; + } + return TaskSystem.RevealKind.Always; + } +} -namespace RevealKind { - export function from(value: vscode.RevealKind): TaskSystem.ShowOutput { +namespace TaskPanelKind { + export function from(value: vscode.TaskPanelKind): TaskSystem.PanelKind { if (value === void 0 || value === null) { - return TaskSystem.ShowOutput.Always; + return TaskSystem.PanelKind.Shared; } switch (value) { - case types.RevealKind.Silent: - return TaskSystem.ShowOutput.Silent; - case types.RevealKind.Never: - return TaskSystem.ShowOutput.Never; + case types.TaskPanelKind.Dedicated: + return TaskSystem.PanelKind.Dedicated; + case types.TaskPanelKind.New: + return TaskSystem.PanelKind.New; + default: + return TaskSystem.PanelKind.Shared; } - return TaskSystem.ShowOutput.Always; } } -namespace TerminalBehaviour { - export function from(value: vscode.TerminalBehaviour): { showOutput: TaskSystem.ShowOutput, echo: boolean } { +namespace PresentationOptions { + export function from(value: vscode.TaskPresentationOptions): TaskSystem.PresentationOptions { if (value === void 0 || value === null) { - return { showOutput: TaskSystem.ShowOutput.Always, echo: false }; + return { reveal: TaskSystem.RevealKind.Always, echo: true, focus: false, panel: TaskSystem.PanelKind.Shared }; } - return { showOutput: RevealKind.from(value.reveal), echo: !!value.echo }; + return { + reveal: TaskRevealKind.from(value.reveal), + echo: value.echo === void 0 ? true : !!value.echo, + focus: !!value.focus, + panel: TaskPanelKind.from(value.panel) + }; } } @@ -231,7 +252,10 @@ namespace Strings { } namespace CommandOptions { - export function from(value: { cwd?: string; env?: { [key: string]: string; } }): TaskSystem.CommandOptions { + function isShellConfiguration(value: any): value is { executable: string; shellArgs?: string[] } { + return value && typeof value.executable === 'string'; + } + export function from(value: vscode.ShellExecutionOptions | vscode.ProcessExecutionOptions): TaskSystem.CommandOptions { if (value === void 0 || value === null) { return undefined; } @@ -249,19 +273,22 @@ namespace CommandOptions { } }); } + if (isShellConfiguration(value)) { + result.shell = ShellConfiguration.from(value); + } return result; } } namespace ShellConfiguration { - export function from(value: { executable?: string, args?: string[] }): boolean | TaskSystem.ShellConfiguration { - if (value === void 0 || value === null || typeof value.executable !== 'string') { - return true; + export function from(value: { executable?: string, shellArgs?: string[] }): TaskSystem.ShellConfiguration { + if (value === void 0 || value === null || !value.executable) { + return undefined; } let result: TaskSystem.ShellConfiguration = { executable: value.executable, - args: Strings.from(value.args) + args: Strings.from(value.shellArgs) }; return result; } @@ -269,65 +296,77 @@ namespace ShellConfiguration { namespace Tasks { - export function from(tasks: vscode.Task[], uuidMap: UUIDMap): TaskSystem.Task[] { + export function from(tasks: vscode.Task[], extension: IExtensionDescription): TaskSystem.Task[] { if (tasks === void 0 || tasks === null) { return []; } let result: TaskSystem.Task[] = []; - try { - uuidMap.start(); - for (let task of tasks) { - let converted = fromSingle(task, uuidMap); - if (converted) { - result.push(converted); - } + for (let task of tasks) { + let converted = fromSingle(task, extension); + if (converted) { + result.push(converted); } - } finally { - uuidMap.finish(); } return result; } - function fromSingle(task: vscode.Task, uuidMap: UUIDMap): TaskSystem.Task { - if (typeof task.name !== 'string' || typeof task.identifier !== 'string') { + function fromSingle(task: vscode.Task, extension: IExtensionDescription): TaskSystem.ContributedTask { + if (typeof task.name !== 'string') { return undefined; } let command: TaskSystem.CommandConfiguration; - if (task instanceof types.ProcessTask) { - command = getProcessCommand(task); - } else if (task instanceof types.ShellTask) { - command = getShellCommand(task); + let execution = task.execution; + if (execution instanceof types.ProcessExecution) { + command = getProcessCommand(execution); + } else if (execution instanceof types.ShellExecution) { + command = getShellCommand(execution); } else { return undefined; } if (command === void 0) { return undefined; } - let behaviour = TerminalBehaviour.from(task.terminal); - command.echo = behaviour.echo; - let result: TaskSystem.Task = { - _id: uuidMap.getUUID(task.identifier), + command.presentation = PresentationOptions.from(task.presentationOptions); + let source = { + kind: TaskSystem.TaskSourceKind.Extension, + label: typeof task.source === 'string' ? task.source : extension.name, + detail: extension.id + }; + let label = nls.localize('task.label', '{0}: {1}', source.label, task.name); + let key = (task as types.Task).definitionKey; + let kind = (task as types.Task).definition; + let id = `${extension.id}.${key}`; + let taskKind: TaskSystem.TaskIdentifier = { + _key: key, + type: kind.type + }; + Objects.assign(taskKind, kind); + let result: TaskSystem.ContributedTask = { + _id: id, // uuidMap.getUUID(identifier), + _source: source, + _label: label, + type: kind.type, + defines: taskKind, name: task.name, - identifier: task.identifier, - group: types.TaskGroup.is(task.group) ? task.group : undefined, + identifier: label, + group: task.group ? (task.group as types.TaskGroup).id : undefined, command: command, - showOutput: behaviour.showOutput, isBackground: !!task.isBackground, - suppressTaskName: true, - problemMatchers: ProblemMatcher.from(task.problemMatchers) + problemMatchers: task.problemMatchers.slice() }; return result; } - function getProcessCommand(value: vscode.ProcessTask): TaskSystem.CommandConfiguration { + function getProcessCommand(value: vscode.ProcessExecution): TaskSystem.CommandConfiguration { if (typeof value.process !== 'string') { return undefined; } let result: TaskSystem.CommandConfiguration = { name: value.process, args: Strings.from(value.args), - isShellCommand: false, - echo: false, + runtime: TaskSystem.RuntimeType.Process, + suppressTaskName: true, + presentation: undefined }; if (value.options) { result.options = CommandOptions.from(value.options); @@ -335,14 +374,14 @@ namespace Tasks { return result; } - function getShellCommand(value: vscode.ShellTask): TaskSystem.CommandConfiguration { + function getShellCommand(value: vscode.ShellExecution): TaskSystem.CommandConfiguration { if (typeof value.commandLine !== 'string') { return undefined; } let result: TaskSystem.CommandConfiguration = { name: value.commandLine, - isShellCommand: ShellConfiguration.from(value.options), - echo: false + runtime: TaskSystem.RuntimeType.Shell, + presentation: undefined }; if (value.options) { result.options = CommandOptions.from(value.options); @@ -351,37 +390,6 @@ namespace Tasks { } } -class UUIDMap { - - private _map: StringMap; - private _unused: StringMap; - - constructor() { - this._map = Object.create(null); - } - - public start(): void { - this._unused = Object.create(null); - Object.keys(this._map).forEach(key => this._unused[key] = true); - } - - public getUUID(identifier: string): string { - delete this._unused[identifier]; - let result = this._map[identifier]; - if (result) { - return result; - } - result = UUID.generateUuid(); - this._map[identifier] = result; - return result; - } - - public finish(): void { - Object.keys(this._unused).forEach(key => delete this._map[key]); - this._unused = null; - } -} - interface HandlerData { provider: vscode.TaskProvider; extension: IExtensionDescription; @@ -392,14 +400,12 @@ export class ExtHostTask extends ExtHostTaskShape { private _proxy: MainThreadTaskShape; private _handleCounter: number; private _handlers: Map; - private _idMaps: Map; constructor(threadService: IThreadService) { super(); this._proxy = threadService.get(MainContext.MainThreadTask); this._handleCounter = 0; this._handlers = new Map(); - this._idMaps = new Map(); }; public registerTaskProvider(extension: IExtensionDescription, provider: vscode.TaskProvider): vscode.Disposable { @@ -422,7 +428,7 @@ export class ExtHostTask extends ExtHostTaskShape { } return asWinJsPromise(token => handler.provider.provideTasks(token)).then(value => { return { - tasks: Tasks.from(value, this.getUUIDMap(handler.extension.id)), + tasks: Tasks.from(value, handler.extension), extension: handler.extension }; }); @@ -431,14 +437,4 @@ export class ExtHostTask extends ExtHostTaskShape { private nextHandle(): number { return this._handleCounter++; } - - private getUUIDMap(extensionId: string): UUIDMap { - let result = this._idMaps.get(extensionId); - if (result) { - return result; - } - result = new UUIDMap(); - this._idMaps.set(extensionId, result); - return result; - } } \ No newline at end of file diff --git a/src/vs/workbench/api/node/extHostTextEditor.ts b/src/vs/workbench/api/node/extHostTextEditor.ts index ab5572a0d62cf..4bf9f16e27401 100644 --- a/src/vs/workbench/api/node/extHostTextEditor.ts +++ b/src/vs/workbench/api/node/extHostTextEditor.ts @@ -12,9 +12,8 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { ExtHostDocumentData } from 'vs/workbench/api/node/extHostDocumentData'; import { Selection, Range, Position, EndOfLine, TextEditorRevealType, TextEditorLineNumbersStyle, SnippetString } from './extHostTypes'; import { ISingleEditOperation } from 'vs/editor/common/editorCommon'; -import { IResolvedTextEditorConfiguration, ITextEditorConfigurationUpdate } from 'vs/workbench/api/node/mainThreadEditor'; import * as TypeConverters from './extHostTypeConverters'; -import { MainThreadEditorsShape } from './extHost.protocol'; +import { MainThreadEditorsShape, IResolvedTextEditorConfiguration, ITextEditorConfigurationUpdate } from './extHost.protocol'; import * as vscode from 'vscode'; import { TextEditorCursorStyle } from 'vs/editor/common/config/editorOptions'; import { IRange } from 'vs/editor/common/core/range'; @@ -400,7 +399,7 @@ export class ExtHostTextEditor implements vscode.TextEditor { throw illegalArgument('selection'); } this._selections = [value]; - this._trySetSelection(true); + this._trySetSelection(); } get selections(): Selection[] { @@ -412,7 +411,7 @@ export class ExtHostTextEditor implements vscode.TextEditor { throw illegalArgument('selections'); } this._selections = value; - this._trySetSelection(true); + this._trySetSelection(); } setDecorations(decorationType: vscode.TextEditorDecorationType, ranges: Range[] | vscode.DecorationOptions[]): void { @@ -421,8 +420,7 @@ export class ExtHostTextEditor implements vscode.TextEditor { this._id, decorationType.key, TypeConverters.fromRangeOrRangeWithMessage(ranges) - ), - true + ) ); } @@ -432,14 +430,13 @@ export class ExtHostTextEditor implements vscode.TextEditor { this._id, TypeConverters.fromRange(range), (revealType || TextEditorRevealType.Default) - ), - true + ) ); } - private _trySetSelection(silent: boolean): TPromise { + private _trySetSelection(): TPromise { let selection = this._selections.map(TypeConverters.fromSelection); - return this._runOnProxy(() => this._proxy.$trySetSelections(this._id, selection), silent); + return this._runOnProxy(() => this._proxy.$trySetSelections(this._id, selection)); } _acceptSelections(selections: Selection[]): void { @@ -451,7 +448,7 @@ export class ExtHostTextEditor implements vscode.TextEditor { edit(callback: (edit: TextEditorEdit) => void, options: { undoStopBefore: boolean; undoStopAfter: boolean; } = { undoStopBefore: true, undoStopAfter: true }): Thenable { if (this._disposed) { - return TPromise.wrapError('TextEditor#edit not possible on closed editors'); + return TPromise.wrapError(new Error('TextEditor#edit not possible on closed editors')); } let edit = new TextEditorEdit(this._documentData.document, options); callback(edit); @@ -509,7 +506,7 @@ export class ExtHostTextEditor implements vscode.TextEditor { insertSnippet(snippet: SnippetString, where?: Position | Position[] | Range | Range[], options: { undoStopBefore: boolean; undoStopAfter: boolean; } = { undoStopBefore: true, undoStopAfter: true }): Thenable { if (this._disposed) { - return TPromise.wrapError('TextEditor#insertSnippet not possible on closed editors'); + return TPromise.wrapError(new Error('TextEditor#insertSnippet not possible on closed editors')); } let ranges: IRange[]; @@ -539,19 +536,12 @@ export class ExtHostTextEditor implements vscode.TextEditor { // ---- util - private _runOnProxy(callback: () => TPromise, silent: boolean): TPromise { + private _runOnProxy(callback: () => TPromise): TPromise { if (this._disposed) { - if (!silent) { - return TPromise.wrapError(silent); - } else { - console.warn('TextEditor is closed/disposed'); - return TPromise.as(undefined); - } + console.warn('TextEditor is closed/disposed'); + return TPromise.as(undefined); } return callback().then(() => this, err => { - if (!silent) { - return TPromise.wrapError(silent); - } console.warn(err); return undefined; }); diff --git a/src/vs/workbench/api/node/extHostTextEditors.ts b/src/vs/workbench/api/node/extHostTextEditors.ts index 94003fbaa333f..0f4bfdf398a7e 100644 --- a/src/vs/workbench/api/node/extHostTextEditors.ts +++ b/src/vs/workbench/api/node/extHostTextEditors.ts @@ -10,11 +10,11 @@ import { toThenable } from 'vs/base/common/async'; import { TPromise } from 'vs/base/common/winjs.base'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; import { TextEditorSelectionChangeKind } from './extHostTypes'; -import { IResolvedTextEditorConfiguration, ISelectionChangeEvent } from 'vs/workbench/api/node/mainThreadEditor'; import * as TypeConverters from './extHostTypeConverters'; import { TextEditorDecorationType, ExtHostTextEditor } from './extHostTextEditor'; import { ExtHostDocumentsAndEditors } from './extHostDocumentsAndEditors'; -import { MainContext, MainThreadEditorsShape, ExtHostEditorsShape, ITextDocumentShowOptions, ITextEditorPositionData } from './extHost.protocol'; +import { Position as EditorPosition } from 'vs/platform/editor/common/editor'; +import { MainContext, MainThreadEditorsShape, ExtHostEditorsShape, ITextDocumentShowOptions, ITextEditorPositionData, IResolvedTextEditorConfiguration, ISelectionChangeEvent } from './extHost.protocol'; import * as vscode from 'vscode'; export class ExtHostEditors extends ExtHostEditorsShape { @@ -74,6 +74,7 @@ export class ExtHostEditors extends ExtHostEditorsShape { }; } else { options = { + position: EditorPosition.ONE, preserveFocus: false, pinned: true }; diff --git a/src/vs/workbench/api/node/extHostTreeView.ts b/src/vs/workbench/api/node/extHostTreeView.ts deleted file mode 100644 index ec6318eec3aa2..0000000000000 --- a/src/vs/workbench/api/node/extHostTreeView.ts +++ /dev/null @@ -1,162 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { localize } from 'vs/nls'; -import { TreeView, TreeDataProvider } from 'vscode'; -import { defaultGenerator } from 'vs/base/common/idGenerator'; -import { TPromise } from 'vs/base/common/winjs.base'; -import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; -import { MainContext, ExtHostTreeViewShape, MainThreadTreeViewShape } from './extHost.protocol'; -import { InternalTreeNode } from 'vs/workbench/parts/explorers/common/treeExplorerViewModel'; -import { ExtHostCommands } from 'vs/workbench/api/node/extHostCommands'; -import { asWinJsPromise } from 'vs/base/common/async'; -import * as modes from 'vs/editor/common/modes'; - -class InternalTreeNodeImpl implements InternalTreeNode { - - readonly id: string; - label: string; - hasChildren: boolean; - clickCommand: string = null; - - constructor(readonly providerId: string, node: any, provider: TreeDataProvider) { - this.id = defaultGenerator.nextId(); - this.label = provider.getLabel ? provider.getLabel(node) : node.toString(); - this.hasChildren = provider.getHasChildren ? provider.getHasChildren(node) : true; - if (provider.getClickCommand) { - const command = provider.getClickCommand(node); - if (command) { - this.clickCommand = command.command; - } - } - } -} - -export class ExtHostTreeView extends ExtHostTreeViewShape { - private _proxy: MainThreadTreeViewShape; - - private _extNodeProviders: { [providerId: string]: TreeDataProvider }; - private _extViews: Map> = new Map>(); - private _extNodeMaps: { [providerId: string]: { [id: string]: InternalTreeNode } }; - private _mainNodesMap: Map>; - private _childrenNodesMap: Map>; - - constructor( - threadService: IThreadService, - private commands: ExtHostCommands - ) { - super(); - - this._proxy = threadService.get(MainContext.MainThreadExplorers); - - this._extNodeProviders = Object.create(null); - this._extNodeMaps = Object.create(null); - this._mainNodesMap = new Map>(); - this._childrenNodesMap = new Map>(); - - commands.registerArgumentProcessor({ - processArgument: arg => { - if (arg && arg.providerId && arg.id) { - const extNodeMap = this._extNodeMaps[arg.providerId]; - return extNodeMap[arg.id]; - } - return arg; - } - }); - } - - createTreeView(providerId: string, provider: TreeDataProvider): TreeView { - this._proxy.$registerTreeDataProvider(providerId); - this._extNodeProviders[providerId] = provider; - this._mainNodesMap.set(providerId, new Map()); - this._childrenNodesMap.set(providerId, new Map()); - - const treeView: TreeView = { - refresh: (node: T) => { - const mainThreadNode = this._mainNodesMap.get(providerId).get(node); - this._proxy.$refresh(providerId, mainThreadNode); - }, - dispose: () => { - delete this._extNodeProviders[providerId]; - delete this._extNodeProviders[providerId]; - this._mainNodesMap.delete(providerId); - this._childrenNodesMap.delete(providerId); - this._extViews.delete(providerId); - } - }; - this._extViews.set(providerId, treeView); - return treeView; - } - - $provideRootNode(providerId: string): TPromise { - const provider = this._extNodeProviders[providerId]; - if (!provider) { - const errMessage = localize('treeExplorer.notRegistered', 'No TreeExplorerNodeProvider with id \'{0}\' registered.', providerId); - return TPromise.wrapError(errMessage); - } - - return asWinJsPromise(() => provider.provideRootNode()).then(extRootNode => { - const extNodeMap: { [id: string]: InternalTreeNode } = Object.create(null); - const internalRootNode = new InternalTreeNodeImpl(providerId, extRootNode, provider); - - extNodeMap[internalRootNode.id] = extRootNode; - this._extNodeMaps[providerId] = extNodeMap; - - this._mainNodesMap.get(providerId).set(extRootNode, internalRootNode); - - return internalRootNode; - }, err => { - const errMessage = localize('treeExplorer.failedToProvideRootNode', 'TreeExplorerNodeProvider \'{0}\' failed to provide root node.', providerId); - return TPromise.wrapError(errMessage); - }); - } - - $resolveChildren(providerId: string, mainThreadNode: InternalTreeNode): TPromise { - const provider = this._extNodeProviders[providerId]; - if (!provider) { - const errMessage = localize('treeExplorer.notRegistered', 'No TreeExplorerNodeProvider with id \'{0}\' registered.', providerId); - return TPromise.wrapError(errMessage); - } - - const extNodeMap = this._extNodeMaps[providerId]; - const extNode = extNodeMap[mainThreadNode.id]; - - const currentChildren = this._childrenNodesMap.get(providerId).get(extNode); - if (currentChildren) { - for (const child of currentChildren) { - this._mainNodesMap.get(providerId).delete(child); - } - } - - return asWinJsPromise(() => provider.resolveChildren(extNode)).then(children => { - return children.map(extChild => { - const internalChild = new InternalTreeNodeImpl(providerId, extChild, provider); - extNodeMap[internalChild.id] = extChild; - this._mainNodesMap.get(providerId).set(extChild, internalChild); - return internalChild; - }); - }); - } - - // Convert the command on the ExtHost side so we can pass the original externalNode to the registered handler - $getInternalCommand(providerId: string, mainThreadNode: InternalTreeNode): TPromise { - const commandConverter = this.commands.converter; - - if (mainThreadNode.clickCommand) { - const extNode = this._extNodeMaps[providerId][mainThreadNode.id]; - - const internalCommand = commandConverter.toInternal({ - title: '', - command: mainThreadNode.clickCommand, - arguments: [extNode] - }); - - return TPromise.wrap(internalCommand); - } - - return TPromise.as(null); - } -} \ No newline at end of file diff --git a/src/vs/workbench/api/node/extHostTreeViews.ts b/src/vs/workbench/api/node/extHostTreeViews.ts new file mode 100644 index 0000000000000..1999ed6103464 --- /dev/null +++ b/src/vs/workbench/api/node/extHostTreeViews.ts @@ -0,0 +1,227 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import { localize } from 'vs/nls'; +import * as vscode from 'vscode'; +import URI from 'vs/base/common/uri'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { Disposable } from 'vs/base/common/lifecycle'; +import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; +import { MainContext, ExtHostTreeViewsShape, MainThreadTreeViewsShape } from './extHost.protocol'; +import { ITreeItem, TreeViewItemHandleArg } from 'vs/workbench/parts/views/common/views'; +import { TreeItemCollapsibleState } from './extHostTypes'; +import { ExtHostCommands, CommandsConverter } from 'vs/workbench/api/node/extHostCommands'; +import { asWinJsPromise } from 'vs/base/common/async'; + +type TreeItemHandle = number; + +export class ExtHostTreeViews extends ExtHostTreeViewsShape { + + private treeViews: Map> = new Map>(); + private _proxy: MainThreadTreeViewsShape; + + constructor( + threadService: IThreadService, + private commands: ExtHostCommands + ) { + super(); + this._proxy = threadService.get(MainContext.MainThreadTreeViews); + commands.registerArgumentProcessor({ + processArgument: arg => { + if (arg && arg.$treeViewId && arg.$treeItemHandle) { + return this.convertArgument(arg); + } + return arg; + } + }); + } + + registerTreeDataProvider(id: string, treeDataProvider: vscode.TreeDataProvider): vscode.Disposable { + const treeView = new ExtHostTreeView(id, treeDataProvider, this._proxy, this.commands.converter); + this.treeViews.set(id, treeView); + return { + dispose: () => { + this.treeViews.delete(id); + treeView.dispose(); + } + }; + } + + $getElements(treeViewId: string): TPromise { + const treeView = this.treeViews.get(treeViewId); + if (!treeView) { + return TPromise.wrapError(new Error(localize('treeView.notRegistered', 'No tree view with id \'{0}\' registered.', treeViewId))); + } + return treeView.getTreeItems(); + } + + $getChildren(treeViewId: string, treeItemHandle?: number): TPromise { + const treeView = this.treeViews.get(treeViewId); + if (!treeView) { + return TPromise.wrapError(new Error(localize('treeView.notRegistered', 'No tree view with id \'{0}\' registered.', treeViewId))); + } + return treeView.getChildren(treeItemHandle); + } + + private convertArgument(arg: TreeViewItemHandleArg): any { + const treeView = this.treeViews.get(arg.$treeViewId); + return treeView ? treeView.getExtensionElement(arg.$treeItemHandle) : null; + } +} + +class ExtHostTreeView extends Disposable { + + private _itemHandlePool = 0; + + private extElementsMap: Map = new Map(); + private itemHandlesMap: Map = new Map(); + private extChildrenElementsMap: Map = new Map(); + + constructor(private viewId: string, private dataProvider: vscode.TreeDataProvider, private proxy: MainThreadTreeViewsShape, private commands: CommandsConverter, ) { + super(); + this.proxy.$registerView(viewId); + if (dataProvider.onDidChangeTreeData) { + this._register(dataProvider.onDidChangeTreeData(element => this._refresh(element))); + } + } + + getTreeItems(): TPromise { + this.extChildrenElementsMap.clear(); + this.extElementsMap.clear(); + this.itemHandlesMap.clear(); + + return asWinJsPromise(() => this.dataProvider.getChildren()) + .then(elements => this.processAndMapElements(elements)); + } + + getChildren(treeItemHandle: TreeItemHandle): TPromise { + let extElement = this.getExtensionElement(treeItemHandle); + if (extElement) { + this.clearChildren(extElement); + } else { + return TPromise.wrapError(new Error(localize('treeItem.notFound', 'No tree item with id \'{0}\' found.', treeItemHandle))); + } + + return asWinJsPromise(() => this.dataProvider.getChildren(extElement)) + .then(childrenElements => this.processAndMapElements(childrenElements)); + } + + getExtensionElement(treeItemHandle: TreeItemHandle): T { + return this.extElementsMap.get(treeItemHandle); + } + + private _refresh(element: T): void { + if (element) { + const itemHandle = this.itemHandlesMap.get(element); + if (itemHandle) { + this.proxy.$refresh(this.viewId, itemHandle); + } + } else { + this.proxy.$refresh(this.viewId); + } + } + + private processAndMapElements(elements: T[]): TPromise { + if (elements && elements.length) { + return TPromise.join( + elements.filter(element => !!element) + .map(element => { + if (this.extChildrenElementsMap.has(element)) { + return TPromise.wrapError(new Error(localize('treeView.duplicateElement', 'Element {0} is already registered', element))); + } + return this.resolveElement(element); + })) + .then(treeItems => treeItems.filter(treeItem => !!treeItem)); + } + return TPromise.as([]); + } + + private resolveElement(element: T): TPromise { + return asWinJsPromise(() => this.dataProvider.getTreeItem(element)) + .then(extTreeItem => { + const treeItem = this.massageTreeItem(extTreeItem); + if (treeItem) { + this.itemHandlesMap.set(element, treeItem.handle); + this.extElementsMap.set(treeItem.handle, element); + if (treeItem.collapsibleState === TreeItemCollapsibleState.Expanded) { + return this.getChildren(treeItem.handle).then(children => { + treeItem.children = children; + return treeItem; + }); + } else { + return treeItem; + } + } + return null; + }); + } + + private massageTreeItem(extensionTreeItem: vscode.TreeItem): ITreeItem { + if (!extensionTreeItem) { + return null; + } + const icon = this.getLightIconPath(extensionTreeItem); + return { + handle: ++this._itemHandlePool, + label: extensionTreeItem.label, + command: extensionTreeItem.command ? this.commands.toInternal(extensionTreeItem.command) : void 0, + contextValue: extensionTreeItem.contextValue, + icon, + iconDark: this.getDarkIconPath(extensionTreeItem) || icon, + collapsibleState: extensionTreeItem.collapsibleState, + }; + } + + private getLightIconPath(extensionTreeItem: vscode.TreeItem) { + if (extensionTreeItem.iconPath) { + if (typeof extensionTreeItem.iconPath === 'string' || extensionTreeItem.iconPath instanceof URI) { + return this.getIconPath(extensionTreeItem.iconPath); + } + return this.getIconPath(extensionTreeItem.iconPath['light']); + } + return void 0; + } + + private getDarkIconPath(extensionTreeItem: vscode.TreeItem) { + if (extensionTreeItem.iconPath && extensionTreeItem.iconPath['dark']) { + return this.getIconPath(extensionTreeItem.iconPath['dark']); + } + return void 0; + } + + private getIconPath(iconPath: string | URI): string { + if (iconPath instanceof URI) { + return iconPath.toString(); + } + return URI.file(iconPath).toString(); + } + + private clearChildren(extElement: T): void { + const children = this.extChildrenElementsMap.get(extElement); + if (children) { + for (const child of children) { + this.clearElement(child); + } + this.extChildrenElementsMap.delete(extElement); + } + } + + private clearElement(extElement: T): void { + this.clearChildren(extElement); + + const treeItemhandle = this.itemHandlesMap.get(extElement); + this.itemHandlesMap.delete(extElement); + if (treeItemhandle) { + this.extElementsMap.delete(treeItemhandle); + } + } + + dispose() { + this.extElementsMap.clear(); + this.itemHandlesMap.clear(); + this.extChildrenElementsMap.clear(); + } +} \ No newline at end of file diff --git a/src/vs/workbench/api/node/extHostTypes.ts b/src/vs/workbench/api/node/extHostTypes.ts index d8279811f68e7..dd6938bdab36d 100644 --- a/src/vs/workbench/api/node/extHostTypes.ts +++ b/src/vs/workbench/api/node/extHostTypes.ts @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; +import * as crypto from 'crypto'; + import URI from 'vs/base/common/uri'; import { illegalArgument } from 'vs/base/common/errors'; import * as vscode from 'vscode'; @@ -962,6 +964,28 @@ export enum TextEditorSelectionChangeKind { Command = 3 } +/** + * These values match very carefully the values of `TrackedRangeStickiness` + */ +export enum DecorationRangeBehavior { + /** + * TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges + */ + OpenOpen = 0, + /** + * TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges + */ + ClosedClosed = 1, + /** + * TrackedRangeStickiness.GrowsOnlyWhenTypingBefore + */ + OpenClosed = 2, + /** + * TrackedRangeStickiness.GrowsOnlyWhenTypingAfter + */ + ClosedOpen = 3 +} + export namespace TextEditorSelectionChangeKind { export function fromValue(s: string) { switch (s) { @@ -991,283 +1015,295 @@ export class DocumentLink { } } -export enum FileLocationKind { - Auto = 1, +export enum TaskRevealKind { + Always = 1, - Relative = 2, + Silent = 2, - Absolute = 3 + Never = 3 } -export enum ApplyToKind { - AllDocuments = 1, +export enum TaskPanelKind { + Shared = 1, - OpenDocuments = 2, + Dedicated = 2, - ClosedDocuments = 3 + New = 3 } -export enum RevealKind { - Always = 1, +export class TaskGroup implements vscode.TaskGroup { - Silent = 2, + private _id: string; + private _label: string; - Never = 3 -} + public static Clean: TaskGroup = new TaskGroup('clean', 'Clean'); -export class BaseTask { + public static Build: TaskGroup = new TaskGroup('build', 'Build'); - private _name: string; - private _problemMatchers: vscode.ProblemMatcher[]; - private _identifier: string; - private _isBackground: boolean; - private _terminal: vscode.TerminalBehaviour; + public static Rebuild: TaskGroup = new TaskGroup('rebuild', 'Rebuild'); + + public static Test: TaskGroup = new TaskGroup('clean', 'Clean'); - constructor(name: string, problemMatchers: vscode.ProblemMatcher[]) { - if (typeof name !== 'string') { + constructor(id: string, label: string) { + if (typeof id !== 'string') { throw illegalArgument('name'); } - this._name = name; - this._identifier = name; - this._problemMatchers = problemMatchers || []; - this._isBackground = false; - this._terminal = Object.create(null); + if (typeof label !== 'string') { + throw illegalArgument('name'); + } + this._id = id; + this._label = label; } - get identifier(): string { - return this._identifier; + get id(): string { + return this._id; } +} - set identifier(value: string) { - if (typeof value !== 'string') { - throw illegalArgument('identifier'); +export class ProcessExecution implements vscode.ProcessExecution { + + private _process: string; + private _args: string[]; + private _options: vscode.ProcessExecutionOptions; + + constructor(process: string, options?: vscode.ProcessExecutionOptions); + constructor(process: string, args: string[], options?: vscode.ProcessExecutionOptions); + constructor(process: string, varg1?: string[] | vscode.ProcessExecutionOptions, varg2?: vscode.ProcessExecutionOptions) { + if (typeof process !== 'string') { + throw illegalArgument('process'); + } + this._process = process; + if (varg1 !== void 0) { + if (Array.isArray(varg1)) { + this._args = varg1; + this._options = varg2; + } else { + this._options = varg1; + } } - if (value.indexOf(':') !== -1) { - throw illegalArgument('identifier must not contain \':\''); + if (this._args === void 0) { + this._args = []; } - this._identifier = value; } - get name(): string { - return this._name; - } - get isBackground(): boolean { - return this._isBackground; + get process(): string { + return this._process; } - set isBackground(value: boolean) { - if (value !== true && value !== false) { - value = false; + set process(value: string) { + if (typeof value !== 'string') { + throw illegalArgument('process'); } - this._isBackground = value; + this._process = value; } - get terminal(): vscode.TerminalBehaviour { - return this._terminal; + get args(): string[] { + return this._args; } - set terminal(value: vscode.TerminalBehaviour) { - if (value === void 0 || value === null) { - value = Object.create(null); + set args(value: string[]) { + if (!Array.isArray(value)) { + value = []; } - this._terminal = value; + this._args = value; } - get problemMatchers(): vscode.ProblemMatcher[] { - return this._problemMatchers; + get options(): vscode.ProcessExecutionOptions { + return this._options; } - set problemMatchers(value: vscode.ProblemMatcher[]) { - if (!Array.isArray(value)) { - value = []; - } - this._problemMatchers = value; + set options(value: vscode.ProcessExecutionOptions) { + this._options = value; } } -namespace ProblemMatcher { - export function is(value: any): value is vscode.ProblemMatcher { - let candidate: vscode.ProblemMatcher = value; - return candidate && !!candidate.pattern; - } -} +export class ShellExecution implements vscode.ShellExecution { -export namespace TaskGroup { - /** - * The clean task group - */ - export const Clean: 'clean' = 'clean'; + private _commandLine: string; + private _options: vscode.ShellExecutionOptions; - /** - * The build task group - */ - export const Build: 'build' = 'build'; + constructor(commandLine: string, options?: vscode.ShellExecutionOptions) { + if (typeof commandLine !== 'string') { + throw illegalArgument('commandLine'); + } + this._commandLine = commandLine; + this._options = options; + } - /** - * The rebuild all task group - */ - export const RebuildAll: 'rebuildAll' = 'rebuildAll'; + get commandLine(): string { + return this._commandLine; + } - /** - * The test task group - */ - export const Test: 'test' = 'test'; + set commandLine(value: string) { + if (typeof value !== 'string') { + throw illegalArgument('commandLine'); + } + this._commandLine = value; + } - export function is(value: string): value is vscode.TaskGroup { - return value === Clean || value === Build || value === RebuildAll || value === Test; + get options(): vscode.ShellExecutionOptions { + return this._options; + } + + set options(value: vscode.ShellExecutionOptions) { + this._options = value; } } -export class ProcessTask extends BaseTask { +export class Task implements vscode.Task { - private _process: string; - private _args: string[]; - private _group: vscode.TaskGroup; - private _options: vscode.ProcessOptions; - - private static parseArguments(restArgs: any[]): { args: string[]; options: vscode.ProcessOptions; problemMatchers: vscode.ProblemMatcher[] } { - let args: string[] = []; - let options: vscode.ProcessOptions = undefined; - let problemMatchers: vscode.ProblemMatcher[] = []; - if (!restArgs || restArgs.length === 0) { - return { args, options, problemMatchers }; - } - let current: any = restArgs[0]; - if (Array.isArray(current)) { - args = current; - restArgs.shift(); - current = restArgs[0]; - } - if (ProblemMatcher.is(current)) { - problemMatchers = restArgs; - } else if (current) { - options = current; - restArgs.shift(); - if (restArgs.length > 0) { - problemMatchers = restArgs; - } - } - return { args, options, problemMatchers }; - } + private _definition: vscode.TaskDefinition; + private _definitionKey: string; + private _name: string; + private _execution: ProcessExecution | ShellExecution; + private _problemMatchers: string[]; + private _isBackground: boolean; + private _source: string; + private _group: TaskGroup; + private _presentationOptions: vscode.TaskPresentationOptions; - constructor(name: string, process: string, ...problemMatchers: vscode.ProblemMatcher[]); - constructor(name: string, process: string, args: string[], ...problemMatchers: vscode.ProblemMatcher[]); - constructor(name: string, process: string, args: string[], options: vscode.ProcessOptions, ...problemMatchers: vscode.ProblemMatcher[]); - constructor(name: string, process: string, ...rest: any[]) { - if (typeof process !== 'string') { - throw illegalArgument('process'); + constructor(definition: vscode.TaskDefinition, name: string, source: string, execution?: ProcessExecution | ShellExecution, problemMatchers?: string | string[]) { + this.definition = definition; + this.name = name; + this.source = source; + this.execution = execution; + if (typeof problemMatchers === 'string') { + this._problemMatchers = [problemMatchers]; + } else if (Array.isArray(problemMatchers)) { + this._problemMatchers = problemMatchers; + } else { + this._problemMatchers = []; } - let { args, options, problemMatchers } = ProcessTask.parseArguments(rest); - super(name, problemMatchers); - this._process = process; - this._args = args; - this._options = options || Object.create(null); + this._isBackground = false; } - get process(): string { - return this._process; + get definition(): vscode.TaskDefinition { + return this._definition; } - get args(): string[] { - return this._args; + set definition(value: vscode.TaskDefinition) { + if (value === void 0 || value === null) { + throw illegalArgument('Kind can\'t be undefined or null'); + } + this._definitionKey = undefined; + this._definition = value; } - set args(value: string[]) { - if (!Array.isArray(value)) { - value = []; + get definitionKey(): string { + if (!this._definitionKey) { + const hash = crypto.createHash('md5'); + hash.update(JSON.stringify(this._definition)); + this._definitionKey = hash.digest('hex'); } - this._args = value; + return this._definitionKey; } - get group(): vscode.TaskGroup { - return this._group; + get name(): string { + return this._name; } - set group(value: vscode.TaskGroup) { - if (!TaskGroup.is(value)) { - throw illegalArgument('group'); + set name(value: string) { + if (typeof value !== 'string') { + throw illegalArgument('name'); } - this._group = value; + this._name = value; } - get options(): vscode.ProcessOptions { - return this._options; + get execution(): ProcessExecution | ShellExecution { + return this._execution; } - set options(value: vscode.ProcessOptions) { - if (value === void 0 || value === null) { - value = Object.create(null); + set execution(value: ProcessExecution | ShellExecution) { + if (value === null) { + value = undefined; } - this._options = value; + this._execution = value; } -} - -export class ShellTask extends BaseTask { - private _commandLine: string; - private _group: vscode.TaskGroup; - private _options: vscode.ShellOptions; + get problemMatchers(): string[] { + return this._problemMatchers; + } - private static parseArguments(restArgs: any[]): { options: vscode.ShellOptions; problemMatchers: vscode.ProblemMatcher[] } { - let options: vscode.ShellOptions = undefined; - let problemMatchers: vscode.ProblemMatcher[] = []; - if (!restArgs || restArgs.length === 0) { - return { options, problemMatchers }; - } - let current: any = restArgs[0]; - if (current && !ProblemMatcher.is(current)) { - options = current; - restArgs.shift(); - current = restArgs[0]; - } - if (ProblemMatcher.is(current)) { - problemMatchers = restArgs; + set problemMatchers(value: string[]) { + if (!Array.isArray(value)) { + value = []; } - return { options, problemMatchers }; + this._problemMatchers = value; } - constructor(name: string, commandLine: string, ...problemMatchers: vscode.ProblemMatcher[]); - constructor(name: string, commandLine: string, options: vscode.ShellOptions, ...problemMatchers: vscode.ProblemMatcher[]); - constructor(name: string, commandLine: string, ...rest: any[]) { - if (typeof commandLine !== 'string') { - throw illegalArgument('commandLine'); + get isBackground(): boolean { + return this._isBackground; + } + + set isBackground(value: boolean) { + if (value !== true && value !== false) { + value = false; } - let { options, problemMatchers } = ShellTask.parseArguments(rest); + this._isBackground = value; + } - super(name, problemMatchers); - this._commandLine = commandLine; - this._options = options || Object.create(null); + get source(): string { + return this._source; } - get commandLine(): string { - return this._commandLine; + set source(value: string) { + if (typeof value !== 'string' || value.length === 0) { + throw illegalArgument('source must be a string of length > 0'); + } + this._source = value; } - get group(): vscode.TaskGroup { + get group(): TaskGroup { return this._group; } - set group(value: vscode.TaskGroup) { - if (!TaskGroup.is(value)) { - throw illegalArgument('group'); + set group(value: TaskGroup) { + if (value === void 0 || value === null) { + this._group = undefined; + return; } this._group = value; } - get options(): vscode.ShellOptions { - return this._options; + get presentationOptions(): vscode.TaskPresentationOptions { + return this._presentationOptions; } - set options(value: vscode.ShellOptions) { - if (value === void 0 || value === null) { - value = Object.create(null); + set presentationOptions(value: vscode.TaskPresentationOptions) { + if (value === null) { + value = undefined; } - this._options = value; + this._presentationOptions = value; } } + export enum ProgressLocation { SourceControl = 1, Window = 10, } + +export class TreeItem { + + iconPath?: string | Uri | { light: string | Uri; dark: string | Uri }; + command?: vscode.Command; + contextValue?: string; + + constructor(public label: string, public collapsibleState: vscode.TreeItemCollapsibleState = TreeItemCollapsibleState.None) { + } + +} + +export enum TreeItemCollapsibleState { + None = 0, + Collapsed = 1, + Expanded = 2 +} + +export class ThemeColor { + id: string; + constructor(id: string) { + this.id = id; + } +} \ No newline at end of file diff --git a/src/vs/workbench/api/node/extHostWorkspace.ts b/src/vs/workbench/api/node/extHostWorkspace.ts index 38024197279d4..09a239b0c617b 100644 --- a/src/vs/workbench/api/node/extHostWorkspace.ts +++ b/src/vs/workbench/api/node/extHostWorkspace.ts @@ -5,29 +5,66 @@ 'use strict'; import URI from 'vs/base/common/uri'; +import Event, { Emitter } from 'vs/base/common/event'; import { normalize } from 'vs/base/common/paths'; +import { isFalsyOrEmpty, delta } from 'vs/base/common/arrays'; import { relative } from 'path'; +import { Workspace } from 'vs/platform/workspace/common/workspace'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; import { IResourceEdit } from 'vs/editor/common/services/bulkEdit'; import { TPromise } from 'vs/base/common/winjs.base'; import { fromRange, EndOfLine } from 'vs/workbench/api/node/extHostTypeConverters'; -import { MainContext, MainThreadWorkspaceShape } from './extHost.protocol'; +import { IWorkspaceData, ExtHostWorkspaceShape, MainContext, MainThreadWorkspaceShape } from './extHost.protocol'; import * as vscode from 'vscode'; +import { compare } from "vs/base/common/strings"; -export class ExtHostWorkspace { +export class ExtHostWorkspace extends ExtHostWorkspaceShape { private static _requestIdPool = 0; - private _proxy: MainThreadWorkspaceShape; - private _workspacePath: string; + private readonly _onDidChangeWorkspace = new Emitter(); + private readonly _proxy: MainThreadWorkspaceShape; + private _workspace: Workspace; - constructor(threadService: IThreadService, workspacePath: string) { + readonly onDidChangeWorkspace: Event = this._onDidChangeWorkspace.event; + + constructor(threadService: IThreadService, data: IWorkspaceData) { + super(); this._proxy = threadService.get(MainContext.MainThreadWorkspace); - this._workspacePath = workspacePath; + this._workspace = data ? new Workspace(data.id, data.name, data.roots) : null; + } + + // --- workspace --- + + get workspace(): Workspace { + return this._workspace; + } + + getRoots(): URI[] { + if (!this._workspace) { + return undefined; + } else { + return this._workspace.roots.slice(0); + } } getPath(): string { - return this._workspacePath; + // this is legacy from the days before having + // multi-root and we keep it only alive if there + // is just one workspace folder. + if (!this._workspace) { + return undefined; + } + const { roots } = this._workspace; + if (roots.length === 0) { + return undefined; + } + // if (roots.length === 1) { + return roots[0].fsPath; + // } + // return `undefined` when there no or more than 1 + // root folder. + // return undefined; } getRelativePath(pathOrUri: string | vscode.Uri): string { @@ -43,18 +80,44 @@ export class ExtHostWorkspace { return path; } - if (!this._workspacePath) { + if (!this._workspace || isFalsyOrEmpty(this._workspace.roots)) { return normalize(path); } - let result = relative(this._workspacePath, path); - if (!result || result.indexOf('..') === 0) { - return normalize(path); + for (const { fsPath } of this._workspace.roots) { + let result = relative(fsPath, path); + if (!result || result.indexOf('..') === 0) { + continue; + } + return normalize(result); } - return normalize(result); + return normalize(path); } + $acceptWorkspaceData(data: IWorkspaceData): void { + + // compute delta + const oldRoots = this._workspace ? this._workspace.roots.sort(ExtHostWorkspace._compareUri) : []; + const newRoots = data ? data.roots.sort(ExtHostWorkspace._compareUri) : []; + const { added, removed } = delta(oldRoots, newRoots, ExtHostWorkspace._compareUri); + + // update state + this._workspace = data ? new Workspace(data.id, data.name, data.roots) : null; + + // send event + this._onDidChangeWorkspace.fire(Object.freeze({ + addedFolders: Object.freeze(added), + removedFolders: Object.freeze(removed) + })); + } + + private static _compareUri(a: vscode.Uri, b: vscode.Uri): number { + return compare(a.toString(), b.toString()); + } + + // --- search --- + findFiles(include: string, exclude: string, maxResults?: number, token?: vscode.CancellationToken): Thenable { const requestId = ExtHostWorkspace._requestIdPool++; const result = this._proxy.$startSearch(include, exclude, maxResults, requestId); diff --git a/src/vs/workbench/api/node/mainThreadTreeView.ts b/src/vs/workbench/api/node/mainThreadTreeView.ts deleted file mode 100644 index 54168aecf5c79..0000000000000 --- a/src/vs/workbench/api/node/mainThreadTreeView.ts +++ /dev/null @@ -1,64 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { TPromise } from 'vs/base/common/winjs.base'; -import Event, { Emitter } from 'vs/base/common/event'; -import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; -import { ExtHostContext, MainThreadTreeViewShape, ExtHostTreeViewShape } from './extHost.protocol'; -import { ITreeExplorerService } from 'vs/workbench/parts/explorers/common/treeExplorerService'; -import { InternalTreeNodeContent, InternalTreeNodeProvider } from 'vs/workbench/parts/explorers/common/treeExplorerViewModel'; -import { IMessageService, Severity } from 'vs/platform/message/common/message'; -import { ICommandService } from 'vs/platform/commands/common/commands'; - -export class MainThreadTreeView extends MainThreadTreeViewShape { - private _proxy: ExtHostTreeViewShape; - - constructor( - @IThreadService threadService: IThreadService, - @ITreeExplorerService private treeExplorerService: ITreeExplorerService, - @IMessageService private messageService: IMessageService, - @ICommandService private commandService: ICommandService - ) { - super(); - - this._proxy = threadService.get(ExtHostContext.ExtHostTreeView); - } - - $registerTreeDataProvider(providerId: string): void { - const provider = new TreeExplorerNodeProvider(providerId, this._proxy, this.messageService, this.commandService); - this.treeExplorerService.registerTreeExplorerNodeProvider(providerId, provider); - } - - $refresh(providerId: string, node: InternalTreeNodeContent): void { - (this.treeExplorerService.getProvider(providerId))._onRefresh.fire(node); - } -} - -class TreeExplorerNodeProvider implements InternalTreeNodeProvider { - - readonly _onRefresh: Emitter = new Emitter(); - readonly onRefresh: Event = this._onRefresh.event; - - constructor(public readonly id: string, private _proxy: ExtHostTreeViewShape, - private messageService: IMessageService, - private commandService: ICommandService - ) { - } - - provideRootNode(): TPromise { - return this._proxy.$provideRootNode(this.id).then(rootNode => rootNode, err => this.messageService.show(Severity.Error, err)); - } - - resolveChildren(node: InternalTreeNodeContent): TPromise { - return this._proxy.$resolveChildren(this.id, node).then(children => children, err => this.messageService.show(Severity.Error, err)); - } - - executeCommand(node: InternalTreeNodeContent): TPromise { - return this._proxy.$getInternalCommand(this.id, node).then(command => { - return this.commandService.executeCommand(command.id, ...command.arguments); - }); - } -} diff --git a/src/vs/workbench/api/node/mainThreadWorkspace.ts b/src/vs/workbench/api/node/mainThreadWorkspace.ts deleted file mode 100644 index e8566c751ce68..0000000000000 --- a/src/vs/workbench/api/node/mainThreadWorkspace.ts +++ /dev/null @@ -1,107 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { isPromiseCanceledError } from 'vs/base/common/errors'; -import URI from 'vs/base/common/uri'; -import { ISearchService, QueryType } from 'vs/platform/search/common/search'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; -import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; -import { ICommonCodeEditor, isCommonCodeEditor } from 'vs/editor/common/editorCommon'; -import { bulkEdit, IResourceEdit } from 'vs/editor/common/services/bulkEdit'; -import { TPromise } from 'vs/base/common/winjs.base'; -import { Uri } from 'vscode'; -import { MainThreadWorkspaceShape } from './extHost.protocol'; -import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; -import { IFileService } from 'vs/platform/files/common/files'; - -export class MainThreadWorkspace extends MainThreadWorkspaceShape { - - private _activeSearches: { [id: number]: TPromise } = Object.create(null); - private _searchService: ISearchService; - private _contextService: IWorkspaceContextService; - private _textFileService: ITextFileService; - private _editorService: IWorkbenchEditorService; - private _textModelResolverService: ITextModelResolverService; - private _fileService: IFileService; - - constructor( - @ISearchService searchService: ISearchService, - @IWorkspaceContextService contextService: IWorkspaceContextService, - @ITextFileService textFileService: ITextFileService, - @IWorkbenchEditorService editorService: IWorkbenchEditorService, - @ITextModelResolverService textModelResolverService: ITextModelResolverService, - @IFileService fileService: IFileService - ) { - super(); - - this._searchService = searchService; - this._contextService = contextService; - this._textFileService = textFileService; - this._editorService = editorService; - this._fileService = fileService; - this._textModelResolverService = textModelResolverService; - } - - $startSearch(include: string, exclude: string, maxResults: number, requestId: number): Thenable { - const workspace = this._contextService.getWorkspace(); - if (!workspace) { - return undefined; - } - - const search = this._searchService.search({ - folderResources: [workspace.resource], - type: QueryType.File, - maxResults, - includePattern: { [include]: true }, - excludePattern: { [exclude]: true }, - }).then(result => { - return result.results.map(m => m.resource); - }, err => { - if (!isPromiseCanceledError(err)) { - return TPromise.wrapError(err); - } - return undefined; - }); - - this._activeSearches[requestId] = search; - const onDone = () => delete this._activeSearches[requestId]; - search.done(onDone, onDone); - - return search; - } - - $cancelSearch(requestId: number): Thenable { - const search = this._activeSearches[requestId]; - if (search) { - delete this._activeSearches[requestId]; - search.cancel(); - return TPromise.as(true); - } - return undefined; - } - - $saveAll(includeUntitled?: boolean): Thenable { - return this._textFileService.saveAll(includeUntitled).then(result => { - return result.results.every(each => each.success === true); - }); - } - - $applyWorkspaceEdit(edits: IResourceEdit[]): TPromise { - - let codeEditor: ICommonCodeEditor; - let editor = this._editorService.getActiveEditor(); - if (editor) { - let candidate = editor.getControl(); - if (isCommonCodeEditor(candidate)) { - codeEditor = candidate; - } - } - - return bulkEdit(this._textModelResolverService, codeEditor, edits, this._fileService) - .then(() => true); - } -} diff --git a/src/vs/workbench/browser/actionBarRegistry.ts b/src/vs/workbench/browser/actionBarRegistry.ts deleted file mode 100644 index 83bf621f88d30..0000000000000 --- a/src/vs/workbench/browser/actionBarRegistry.ts +++ /dev/null @@ -1,375 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { TPromise } from 'vs/base/common/winjs.base'; -import { Registry } from 'vs/platform/platform'; -import types = require('vs/base/common/types'); -import { Action, IAction } from 'vs/base/common/actions'; -import { BaseActionItem, Separator } from 'vs/base/browser/ui/actionbar/actionbar'; -import { ITree, IActionProvider } from 'vs/base/parts/tree/browser/tree'; -import { IInstantiationService, IConstructorSignature0 } from 'vs/platform/instantiation/common/instantiation'; - -/** - * The action bar contributor allows to add actions to an actionbar in a given context. - */ -export class ActionBarContributor { - - /** - * Returns true if this contributor has actions for the given context. - */ - public hasActions(context: any): boolean { - return false; - } - - /** - * Returns an array of primary actions in the given context. - */ - public getActions(context: any): IAction[] { - return []; - } - - /** - * Returns true if this contributor has secondary actions for the given context. - */ - public hasSecondaryActions(context: any): boolean { - return false; - } - - /** - * Returns an array of secondary actions in the given context. - */ - public getSecondaryActions(context: any): IAction[] { - return []; - } - - /** - * Can return a specific IActionItem to render the given action. - */ - public getActionItem(context: any, action: Action): BaseActionItem { - return null; - } -} - -/** - * Some predefined scopes to contribute actions to - */ -export const Scope = { - - /** - * Actions inside the global activity bar (DEPRECATED) - */ - GLOBAL: 'global', - - /** - * Actions inside viewlets. - */ - VIEWLET: 'viewlet', - - /** - * Actions inside panels. - */ - PANEL: 'panel', - - /** - * Actions inside editors. - */ - EDITOR: 'editor', - - /** - * Actions inside tree widgets. - */ - VIEWER: 'viewer' -}; - -/** - * The ContributableActionProvider leverages the actionbar contribution model to find actions. - */ -export class ContributableActionProvider implements IActionProvider { - private registry: IActionBarRegistry; - - constructor() { - this.registry = Registry.as(Extensions.Actionbar); - } - - private toContext(tree: ITree, element: any): any { - return { - viewer: tree, - element: element - }; - } - - public hasActions(tree: ITree, element: any): boolean { - let context = this.toContext(tree, element); - - let contributors = this.registry.getActionBarContributors(Scope.VIEWER); - for (let i = 0; i < contributors.length; i++) { - let contributor = contributors[i]; - if (contributor.hasActions(context)) { - return true; - } - } - - return false; - } - - public getActions(tree: ITree, element: any): TPromise { - let actions: IAction[] = []; - let context = this.toContext(tree, element); - - // Collect Actions - let contributors = this.registry.getActionBarContributors(Scope.VIEWER); - for (let i = 0; i < contributors.length; i++) { - let contributor = contributors[i]; - if (contributor.hasActions(context)) { - actions.push(...contributor.getActions(context)); - } - } - - return TPromise.as(prepareActions(actions)); - } - - public hasSecondaryActions(tree: ITree, element: any): boolean { - let context = this.toContext(tree, element); - - let contributors = this.registry.getActionBarContributors(Scope.VIEWER); - for (let i = 0; i < contributors.length; i++) { - let contributor = contributors[i]; - if (contributor.hasSecondaryActions(context)) { - return true; - } - } - - return false; - } - - public getSecondaryActions(tree: ITree, element: any): TPromise { - let actions: IAction[] = []; - let context = this.toContext(tree, element); - - // Collect Actions - let contributors = this.registry.getActionBarContributors(Scope.VIEWER); - for (let i = 0; i < contributors.length; i++) { - let contributor = contributors[i]; - if (contributor.hasSecondaryActions(context)) { - actions.push(...contributor.getSecondaryActions(context)); - } - } - - return TPromise.as(prepareActions(actions)); - } - - public getActionItem(tree: ITree, element: any, action: Action): BaseActionItem { - let contributors = this.registry.getActionBarContributors(Scope.VIEWER); - let context = this.toContext(tree, element); - - for (let i = contributors.length - 1; i >= 0; i--) { - let contributor = contributors[i]; - - let itemProvider = contributor.getActionItem(context, action); - if (itemProvider) { - return itemProvider; - } - } - - return null; - } -} - -// Helper function used in parts to massage actions before showing in action areas -export function prepareActions(actions: IAction[]): IAction[] { - if (!actions.length) { - return actions; - } - - // Patch order if not provided - for (let l = 0; l < actions.length; l++) { - let a = actions[l]; - if (types.isUndefinedOrNull(a.order)) { - a.order = l; - } - } - - // Sort by order - actions = actions.sort((first: Action, second: Action) => { - let firstOrder = first.order; - let secondOrder = second.order; - if (firstOrder < secondOrder) { - return -1; - } else if (firstOrder > secondOrder) { - return 1; - } else { - return 0; - } - }); - - // Clean up leading separators - let firstIndexOfAction = -1; - for (let i = 0; i < actions.length; i++) { - if (actions[i].id === Separator.ID) { - continue; - } - - firstIndexOfAction = i; - break; - } - - if (firstIndexOfAction === -1) { - return []; - } - - actions = actions.slice(firstIndexOfAction); - - // Clean up trailing separators - for (let h = actions.length - 1; h >= 0; h--) { - let isSeparator = actions[h].id === Separator.ID; - if (isSeparator) { - actions.splice(h, 1); - } else { - break; - } - } - - // Clean up separator duplicates - let foundAction = false; - for (let k = actions.length - 1; k >= 0; k--) { - let isSeparator = actions[k].id === Separator.ID; - if (isSeparator && !foundAction) { - actions.splice(k, 1); - } else if (!isSeparator) { - foundAction = true; - } else if (isSeparator) { - foundAction = false; - } - } - - return actions; -} - -export const Extensions = { - Actionbar: 'workbench.contributions.actionbar' -}; - -export interface IActionBarRegistry { - - /** - * Goes through all action bar contributors and asks them for contributed actions for - * the provided scope and context. Supports primary actions. - */ - getActionBarActionsForContext(scope: string, context: any): IAction[]; - - /** - * Goes through all action bar contributors and asks them for contributed actions for - * the provided scope and context. Supports secondary actions. - */ - getSecondaryActionBarActionsForContext(scope: string, context: any): IAction[]; - - /** - * Goes through all action bar contributors and asks them for contributed action item for - * the provided scope and context. - */ - getActionItemForContext(scope: string, context: any, action: Action): BaseActionItem; - - /** - * Registers an Actionbar contributor. It will be called to contribute actions to all the action bars - * that are used in the Workbench in the given scope. - */ - registerActionBarContributor(scope: string, ctor: IConstructorSignature0): void; - - /** - * Returns an array of registered action bar contributors known to the workbench for the given scope. - */ - getActionBarContributors(scope: string): ActionBarContributor[]; - - setInstantiationService(service: IInstantiationService): void; -} - -class ActionBarRegistry implements IActionBarRegistry { - private actionBarContributorConstructors: { scope: string; ctor: IConstructorSignature0; }[] = []; - private actionBarContributorInstances: { [scope: string]: ActionBarContributor[] } = Object.create(null); - private instantiationService: IInstantiationService; - - public setInstantiationService(service: IInstantiationService): void { - this.instantiationService = service; - - while (this.actionBarContributorConstructors.length > 0) { - let entry = this.actionBarContributorConstructors.shift(); - this.createActionBarContributor(entry.scope, entry.ctor); - } - } - - private createActionBarContributor(scope: string, ctor: IConstructorSignature0): void { - const instance = this.instantiationService.createInstance(ctor); - let target = this.actionBarContributorInstances[scope]; - if (!target) { - target = this.actionBarContributorInstances[scope] = []; - } - target.push(instance); - } - - private getContributors(scope: string): ActionBarContributor[] { - return this.actionBarContributorInstances[scope] || []; - } - - public getActionBarActionsForContext(scope: string, context: any): IAction[] { - let actions: IAction[] = []; - - // Go through contributors for scope - this.getContributors(scope).forEach((contributor: ActionBarContributor) => { - - // Primary Actions - if (contributor.hasActions(context)) { - actions.push(...contributor.getActions(context)); - } - }); - - return actions; - } - - public getSecondaryActionBarActionsForContext(scope: string, context: any): IAction[] { - let actions: IAction[] = []; - - // Go through contributors - this.getContributors(scope).forEach((contributor: ActionBarContributor) => { - - // Secondary Actions - if (contributor.hasSecondaryActions(context)) { - actions.push(...contributor.getSecondaryActions(context)); - } - }); - - return actions; - } - - public getActionItemForContext(scope: string, context: any, action: Action): BaseActionItem { - let contributors = this.getContributors(scope); - for (let i = 0; i < contributors.length; i++) { - let contributor = contributors[i]; - let item = contributor.getActionItem(context, action); - if (item) { - return item; - } - } - - return null; - } - - public registerActionBarContributor(scope: string, ctor: IConstructorSignature0): void { - if (!this.instantiationService) { - this.actionBarContributorConstructors.push({ - scope: scope, - ctor: ctor - }); - } else { - this.createActionBarContributor(scope, ctor); - } - } - - public getActionBarContributors(scope: string): ActionBarContributor[] { - return this.getContributors(scope).slice(0); - } -} - -Registry.add(Extensions.Actionbar, new ActionBarRegistry()); diff --git a/src/vs/workbench/browser/actions.ts b/src/vs/workbench/browser/actions.ts new file mode 100644 index 0000000000000..32bf1d5f56b11 --- /dev/null +++ b/src/vs/workbench/browser/actions.ts @@ -0,0 +1,375 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import { TPromise } from 'vs/base/common/winjs.base'; +import { Registry } from 'vs/platform/registry/common/platform'; +import types = require('vs/base/common/types'); +import { Action, IAction } from 'vs/base/common/actions'; +import { BaseActionItem, Separator } from 'vs/base/browser/ui/actionbar/actionbar'; +import { ITree, IActionProvider } from 'vs/base/parts/tree/browser/tree'; +import { IInstantiationService, IConstructorSignature0 } from 'vs/platform/instantiation/common/instantiation'; + +/** + * The action bar contributor allows to add actions to an actionbar in a given context. + */ +export class ActionBarContributor { + + /** + * Returns true if this contributor has actions for the given context. + */ + public hasActions(context: any): boolean { + return false; + } + + /** + * Returns an array of primary actions in the given context. + */ + public getActions(context: any): IAction[] { + return []; + } + + /** + * Returns true if this contributor has secondary actions for the given context. + */ + public hasSecondaryActions(context: any): boolean { + return false; + } + + /** + * Returns an array of secondary actions in the given context. + */ + public getSecondaryActions(context: any): IAction[] { + return []; + } + + /** + * Can return a specific IActionItem to render the given action. + */ + public getActionItem(context: any, action: Action): BaseActionItem { + return null; + } +} + +/** + * Some predefined scopes to contribute actions to + */ +export const Scope = { + + /** + * Actions inside the global activity bar (DEPRECATED) + */ + GLOBAL: 'global', + + /** + * Actions inside viewlets. + */ + VIEWLET: 'viewlet', + + /** + * Actions inside panels. + */ + PANEL: 'panel', + + /** + * Actions inside editors. + */ + EDITOR: 'editor', + + /** + * Actions inside tree widgets. + */ + VIEWER: 'viewer' +}; + +/** + * The ContributableActionProvider leverages the actionbar contribution model to find actions. + */ +export class ContributableActionProvider implements IActionProvider { + private registry: IActionBarRegistry; + + constructor() { + this.registry = Registry.as(Extensions.Actionbar); + } + + private toContext(tree: ITree, element: any): any { + return { + viewer: tree, + element: element + }; + } + + public hasActions(tree: ITree, element: any): boolean { + let context = this.toContext(tree, element); + + let contributors = this.registry.getActionBarContributors(Scope.VIEWER); + for (let i = 0; i < contributors.length; i++) { + let contributor = contributors[i]; + if (contributor.hasActions(context)) { + return true; + } + } + + return false; + } + + public getActions(tree: ITree, element: any): TPromise { + let actions: IAction[] = []; + let context = this.toContext(tree, element); + + // Collect Actions + let contributors = this.registry.getActionBarContributors(Scope.VIEWER); + for (let i = 0; i < contributors.length; i++) { + let contributor = contributors[i]; + if (contributor.hasActions(context)) { + actions.push(...contributor.getActions(context)); + } + } + + return TPromise.as(prepareActions(actions)); + } + + public hasSecondaryActions(tree: ITree, element: any): boolean { + let context = this.toContext(tree, element); + + let contributors = this.registry.getActionBarContributors(Scope.VIEWER); + for (let i = 0; i < contributors.length; i++) { + let contributor = contributors[i]; + if (contributor.hasSecondaryActions(context)) { + return true; + } + } + + return false; + } + + public getSecondaryActions(tree: ITree, element: any): TPromise { + let actions: IAction[] = []; + let context = this.toContext(tree, element); + + // Collect Actions + let contributors = this.registry.getActionBarContributors(Scope.VIEWER); + for (let i = 0; i < contributors.length; i++) { + let contributor = contributors[i]; + if (contributor.hasSecondaryActions(context)) { + actions.push(...contributor.getSecondaryActions(context)); + } + } + + return TPromise.as(prepareActions(actions)); + } + + public getActionItem(tree: ITree, element: any, action: Action): BaseActionItem { + let contributors = this.registry.getActionBarContributors(Scope.VIEWER); + let context = this.toContext(tree, element); + + for (let i = contributors.length - 1; i >= 0; i--) { + let contributor = contributors[i]; + + let itemProvider = contributor.getActionItem(context, action); + if (itemProvider) { + return itemProvider; + } + } + + return null; + } +} + +// Helper function used in parts to massage actions before showing in action areas +export function prepareActions(actions: IAction[]): IAction[] { + if (!actions.length) { + return actions; + } + + // Patch order if not provided + for (let l = 0; l < actions.length; l++) { + let a = actions[l]; + if (types.isUndefinedOrNull(a.order)) { + a.order = l; + } + } + + // Sort by order + actions = actions.sort((first: Action, second: Action) => { + let firstOrder = first.order; + let secondOrder = second.order; + if (firstOrder < secondOrder) { + return -1; + } else if (firstOrder > secondOrder) { + return 1; + } else { + return 0; + } + }); + + // Clean up leading separators + let firstIndexOfAction = -1; + for (let i = 0; i < actions.length; i++) { + if (actions[i].id === Separator.ID) { + continue; + } + + firstIndexOfAction = i; + break; + } + + if (firstIndexOfAction === -1) { + return []; + } + + actions = actions.slice(firstIndexOfAction); + + // Clean up trailing separators + for (let h = actions.length - 1; h >= 0; h--) { + let isSeparator = actions[h].id === Separator.ID; + if (isSeparator) { + actions.splice(h, 1); + } else { + break; + } + } + + // Clean up separator duplicates + let foundAction = false; + for (let k = actions.length - 1; k >= 0; k--) { + let isSeparator = actions[k].id === Separator.ID; + if (isSeparator && !foundAction) { + actions.splice(k, 1); + } else if (!isSeparator) { + foundAction = true; + } else if (isSeparator) { + foundAction = false; + } + } + + return actions; +} + +export const Extensions = { + Actionbar: 'workbench.contributions.actionbar' +}; + +export interface IActionBarRegistry { + + /** + * Goes through all action bar contributors and asks them for contributed actions for + * the provided scope and context. Supports primary actions. + */ + getActionBarActionsForContext(scope: string, context: any): IAction[]; + + /** + * Goes through all action bar contributors and asks them for contributed actions for + * the provided scope and context. Supports secondary actions. + */ + getSecondaryActionBarActionsForContext(scope: string, context: any): IAction[]; + + /** + * Goes through all action bar contributors and asks them for contributed action item for + * the provided scope and context. + */ + getActionItemForContext(scope: string, context: any, action: Action): BaseActionItem; + + /** + * Registers an Actionbar contributor. It will be called to contribute actions to all the action bars + * that are used in the Workbench in the given scope. + */ + registerActionBarContributor(scope: string, ctor: IConstructorSignature0): void; + + /** + * Returns an array of registered action bar contributors known to the workbench for the given scope. + */ + getActionBarContributors(scope: string): ActionBarContributor[]; + + setInstantiationService(service: IInstantiationService): void; +} + +class ActionBarRegistry implements IActionBarRegistry { + private actionBarContributorConstructors: { scope: string; ctor: IConstructorSignature0; }[] = []; + private actionBarContributorInstances: { [scope: string]: ActionBarContributor[] } = Object.create(null); + private instantiationService: IInstantiationService; + + public setInstantiationService(service: IInstantiationService): void { + this.instantiationService = service; + + while (this.actionBarContributorConstructors.length > 0) { + let entry = this.actionBarContributorConstructors.shift(); + this.createActionBarContributor(entry.scope, entry.ctor); + } + } + + private createActionBarContributor(scope: string, ctor: IConstructorSignature0): void { + const instance = this.instantiationService.createInstance(ctor); + let target = this.actionBarContributorInstances[scope]; + if (!target) { + target = this.actionBarContributorInstances[scope] = []; + } + target.push(instance); + } + + private getContributors(scope: string): ActionBarContributor[] { + return this.actionBarContributorInstances[scope] || []; + } + + public getActionBarActionsForContext(scope: string, context: any): IAction[] { + let actions: IAction[] = []; + + // Go through contributors for scope + this.getContributors(scope).forEach((contributor: ActionBarContributor) => { + + // Primary Actions + if (contributor.hasActions(context)) { + actions.push(...contributor.getActions(context)); + } + }); + + return actions; + } + + public getSecondaryActionBarActionsForContext(scope: string, context: any): IAction[] { + let actions: IAction[] = []; + + // Go through contributors + this.getContributors(scope).forEach((contributor: ActionBarContributor) => { + + // Secondary Actions + if (contributor.hasSecondaryActions(context)) { + actions.push(...contributor.getSecondaryActions(context)); + } + }); + + return actions; + } + + public getActionItemForContext(scope: string, context: any, action: Action): BaseActionItem { + let contributors = this.getContributors(scope); + for (let i = 0; i < contributors.length; i++) { + let contributor = contributors[i]; + let item = contributor.getActionItem(context, action); + if (item) { + return item; + } + } + + return null; + } + + public registerActionBarContributor(scope: string, ctor: IConstructorSignature0): void { + if (!this.instantiationService) { + this.actionBarContributorConstructors.push({ + scope: scope, + ctor: ctor + }); + } else { + this.createActionBarContributor(scope, ctor); + } + } + + public getActionBarContributors(scope: string): ActionBarContributor[] { + return this.getContributors(scope).slice(0); + } +} + +Registry.add(Extensions.Actionbar, new ActionBarRegistry()); diff --git a/src/vs/workbench/browser/actions/configureLocale.ts b/src/vs/workbench/browser/actions/configureLocale.ts index 02c70d9f47f37..29859fd2e1d2e 100644 --- a/src/vs/workbench/browser/actions/configureLocale.ts +++ b/src/vs/workbench/browser/actions/configureLocale.ts @@ -12,7 +12,7 @@ import * as Labels from 'vs/base/common/labels'; import * as Platform from 'vs/base/common/platform'; import { Action } from 'vs/base/common/actions'; -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actionRegistry'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; @@ -32,7 +32,7 @@ class ConfigureLocaleAction extends Action { '{', `\t// ${nls.localize('displayLanguage', 'Defines VSCode\'s display language.')}`, `\t// ${nls.localize('doc', 'See {0} for a list of supported languages.', 'https://go.microsoft.com/fwlink/?LinkId=761051')}`, - `\t// ${nls.localize('restart', 'Changing the value requires to restart VSCode.')}`, + `\t// ${nls.localize('restart', 'Changing the value requires restarting VSCode.')}`, `\t"locale":"${Platform.language}"`, '}' ].join('\n'); diff --git a/src/vs/workbench/browser/actions/fileActions.ts b/src/vs/workbench/browser/actions/fileActions.ts index 13f2694a0fc60..a1e866028d702 100644 --- a/src/vs/workbench/browser/actions/fileActions.ts +++ b/src/vs/workbench/browser/actions/fileActions.ts @@ -10,6 +10,10 @@ import { Action } from 'vs/base/common/actions'; import nls = require('vs/nls'); import { IWindowService } from 'vs/platform/windows/common/windows'; import { ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceEditingService } from 'vs/workbench/services/workspace/common/workspaceEditing'; +import URI from 'vs/base/common/uri'; +import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; export class OpenFolderAction extends Action { @@ -25,7 +29,7 @@ export class OpenFolderAction extends Action { } run(event?: any, data?: ITelemetryData): TPromise { - return this.windowService.openFolderPicker(undefined, data); + return this.windowService.pickFolderAndOpen(undefined, data); } } @@ -43,6 +47,54 @@ export class OpenFileFolderAction extends Action { } run(event?: any, data?: ITelemetryData): TPromise { - return this.windowService.openFileFolderPicker(undefined, data); + return this.windowService.pickFileFolderAndOpen(undefined, data); + } +} + +export class AddRootFolderAction extends Action { + + static ID = 'workbench.action.addRootFolder'; + static LABEL = nls.localize('addFolderToWorkspace', "Add Folder to Workspace..."); + + constructor( + id: string, + label: string, + @IWindowService private windowService: IWindowService, + @IWorkspaceContextService private contextService: IWorkspaceContextService, + @IWorkspaceEditingService private workspaceEditingService: IWorkspaceEditingService, + @IViewletService private viewletService: IViewletService + ) { + super(id, label); + } + + public run(): TPromise { + if (!this.contextService.hasWorkspace()) { + return this.windowService.pickFolderAndOpen(false /* prefer same window */); + } + + return this.windowService.pickFolder({ buttonLabel: nls.localize('add', "Add"), title: nls.localize('addFolderToWorkspaceTitle', "Add Folder to Workspace") }).then(folders => { + return this.workspaceEditingService.addRoots(folders.map(folder => URI.file(folder))).then(() => { + return this.viewletService.openViewlet(this.viewletService.getDefaultViewletId(), true); + }); + }); + } +} + +export class RemoveRootFolderAction extends Action { + + static ID = 'workbench.action.removeRootFolder'; + static LABEL = nls.localize('removeFolderFromWorkspace', "Remove Folder from Workspace"); + + constructor( + private rootUri: URI, + id: string, + label: string, + @IWorkspaceEditingService private workspaceEditingService: IWorkspaceEditingService + ) { + super(id, label); + } + + public run(): TPromise { + return this.workspaceEditingService.removeRoots([this.rootUri]); } } diff --git a/src/vs/workbench/browser/actions/toggleActivityBarVisibility.ts b/src/vs/workbench/browser/actions/toggleActivityBarVisibility.ts index 3718e0927b9ee..203f720458713 100644 --- a/src/vs/workbench/browser/actions/toggleActivityBarVisibility.ts +++ b/src/vs/workbench/browser/actions/toggleActivityBarVisibility.ts @@ -6,11 +6,10 @@ import { TPromise } from 'vs/base/common/winjs.base'; import nls = require('vs/nls'); -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import { Action } from 'vs/base/common/actions'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actionRegistry'; -import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { IConfigurationEditingService, ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; import { IPartService, Parts } from 'vs/workbench/services/part/common/partService'; @@ -25,7 +24,6 @@ export class ToggleActivityBarVisibilityAction extends Action { id: string, label: string, @IPartService private partService: IPartService, - @IMessageService private messageService: IMessageService, @IConfigurationEditingService private configurationEditingService: IConfigurationEditingService ) { super(id, label); @@ -37,9 +35,7 @@ export class ToggleActivityBarVisibilityAction extends Action { const visibility = this.partService.isVisible(Parts.ACTIVITYBAR_PART); const newVisibilityValue = !visibility; - this.configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: ToggleActivityBarVisibilityAction.activityBarVisibleKey, value: newVisibilityValue }).then(null, error => { - this.messageService.show(Severity.Error, error); - }); + this.configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: ToggleActivityBarVisibilityAction.activityBarVisibleKey, value: newVisibilityValue }); return TPromise.as(null); } diff --git a/src/vs/workbench/browser/actions/toggleEditorLayout.ts b/src/vs/workbench/browser/actions/toggleEditorLayout.ts index 0f7aea662daac..762f2a2cfbb5c 100644 --- a/src/vs/workbench/browser/actions/toggleEditorLayout.ts +++ b/src/vs/workbench/browser/actions/toggleEditorLayout.ts @@ -7,7 +7,7 @@ import 'vs/css!./media/actions'; import { TPromise } from 'vs/base/common/winjs.base'; import nls = require('vs/nls'); -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import { Action } from 'vs/base/common/actions'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actionRegistry'; diff --git a/src/vs/workbench/browser/actions/toggleSidebarPosition.ts b/src/vs/workbench/browser/actions/toggleSidebarPosition.ts index 1fc53c621d628..b2dabccb98939 100644 --- a/src/vs/workbench/browser/actions/toggleSidebarPosition.ts +++ b/src/vs/workbench/browser/actions/toggleSidebarPosition.ts @@ -6,10 +6,9 @@ import { TPromise } from 'vs/base/common/winjs.base'; import nls = require('vs/nls'); -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import { Action } from 'vs/base/common/actions'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; -import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actionRegistry'; import { IConfigurationEditingService, ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; import { IPartService, Position } from 'vs/workbench/services/part/common/partService'; @@ -25,7 +24,6 @@ export class ToggleSidebarPositionAction extends Action { id: string, label: string, @IPartService private partService: IPartService, - @IMessageService private messageService: IMessageService, @IConfigurationEditingService private configurationEditingService: IConfigurationEditingService ) { super(id, label); @@ -37,13 +35,11 @@ export class ToggleSidebarPositionAction extends Action { const position = this.partService.getSideBarPosition(); const newPositionValue = (position === Position.LEFT) ? 'right' : 'left'; - this.configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: ToggleSidebarPositionAction.sidebarPositionConfigurationKey, value: newPositionValue }).then(null, error => { - this.messageService.show(Severity.Error, error); - }); + this.configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: ToggleSidebarPositionAction.sidebarPositionConfigurationKey, value: newPositionValue }); return TPromise.as(null); } } const registry = Registry.as(Extensions.WorkbenchActions); -registry.registerWorkbenchAction(new SyncActionDescriptor(ToggleSidebarPositionAction, ToggleSidebarPositionAction.ID, ToggleSidebarPositionAction.LABEL), 'View: Toggle Side Bar Position', nls.localize('view', "View")); \ No newline at end of file +registry.registerWorkbenchAction(new SyncActionDescriptor(ToggleSidebarPositionAction, ToggleSidebarPositionAction.ID, ToggleSidebarPositionAction.LABEL), 'View: Toggle Side Bar Location', nls.localize('view', "View")); \ No newline at end of file diff --git a/src/vs/workbench/browser/actions/toggleSidebarVisibility.ts b/src/vs/workbench/browser/actions/toggleSidebarVisibility.ts index a5d1f667ac775..43f156d934de4 100644 --- a/src/vs/workbench/browser/actions/toggleSidebarVisibility.ts +++ b/src/vs/workbench/browser/actions/toggleSidebarVisibility.ts @@ -6,7 +6,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import nls = require('vs/nls'); -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import { Action } from 'vs/base/common/actions'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actionRegistry'; diff --git a/src/vs/workbench/browser/actions/toggleStatusbarVisibility.ts b/src/vs/workbench/browser/actions/toggleStatusbarVisibility.ts index d06dafc4db031..cf91fbb71a59e 100644 --- a/src/vs/workbench/browser/actions/toggleStatusbarVisibility.ts +++ b/src/vs/workbench/browser/actions/toggleStatusbarVisibility.ts @@ -6,11 +6,10 @@ import { TPromise } from 'vs/base/common/winjs.base'; import nls = require('vs/nls'); -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import { Action } from 'vs/base/common/actions'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actionRegistry'; -import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { IConfigurationEditingService, ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; import { IPartService, Parts } from 'vs/workbench/services/part/common/partService'; @@ -25,7 +24,6 @@ export class ToggleStatusbarVisibilityAction extends Action { id: string, label: string, @IPartService private partService: IPartService, - @IMessageService private messageService: IMessageService, @IConfigurationEditingService private configurationEditingService: IConfigurationEditingService ) { super(id, label); @@ -37,9 +35,7 @@ export class ToggleStatusbarVisibilityAction extends Action { const visibility = this.partService.isVisible(Parts.STATUSBAR_PART); const newVisibilityValue = !visibility; - this.configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: ToggleStatusbarVisibilityAction.statusbarVisibleKey, value: newVisibilityValue }).then(null, error => { - this.messageService.show(Severity.Error, error); - }); + this.configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: ToggleStatusbarVisibilityAction.statusbarVisibleKey, value: newVisibilityValue }); return TPromise.as(null); } diff --git a/src/vs/workbench/browser/actions/toggleZenMode.ts b/src/vs/workbench/browser/actions/toggleZenMode.ts index d542e39b8ee15..f6209430da11a 100644 --- a/src/vs/workbench/browser/actions/toggleZenMode.ts +++ b/src/vs/workbench/browser/actions/toggleZenMode.ts @@ -7,7 +7,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import nls = require('vs/nls'); import { Action } from 'vs/base/common/actions'; import { KeyCode, KeyMod, KeyChord } from 'vs/base/common/keyCodes'; -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actionRegistry'; import { IPartService } from 'vs/workbench/services/part/common/partService'; diff --git a/src/vs/workbench/browser/activity.ts b/src/vs/workbench/browser/activity.ts new file mode 100644 index 0000000000000..aff7d7553abb3 --- /dev/null +++ b/src/vs/workbench/browser/activity.ts @@ -0,0 +1,42 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { Registry } from 'vs/platform/registry/common/platform'; +import { IAction } from 'vs/base/common/actions'; +import { IConstructorSignature0 } from 'vs/platform/instantiation/common/instantiation'; + +export interface IActivity { + id: string; + name: string; + cssClass: string; +} + +export interface IGlobalActivity extends IActivity { + getActions(): IAction[]; +} + +export const GlobalActivityExtensions = 'workbench.contributions.globalActivities'; + +export interface IGlobalActivityRegistry { + registerActivity(descriptor: IConstructorSignature0): void; + getActivities(): IConstructorSignature0[]; +} + +export class GlobalActivityRegistry implements IGlobalActivityRegistry { + + private activityDescriptors = new Set>(); + + registerActivity(descriptor: IConstructorSignature0): void { + this.activityDescriptors.add(descriptor); + } + + getActivities(): IConstructorSignature0[] { + const result: IConstructorSignature0[] = []; + this.activityDescriptors.forEach(d => result.push(d)); + return result; + } +} + +Registry.add(GlobalActivityExtensions, new GlobalActivityRegistry()); \ No newline at end of file diff --git a/src/vs/workbench/browser/labels.ts b/src/vs/workbench/browser/labels.ts index 3d6f853fc0fcc..7f698036e98aa 100644 --- a/src/vs/workbench/browser/labels.ts +++ b/src/vs/workbench/browser/labels.ts @@ -60,7 +60,7 @@ export class ResourceLabel extends IconLabel { } public setLabel(label: IEditorLabel, options?: IResourceLabelOptions): void { - const hasResourceChanged = this.hasResourceChanged(label); + const hasResourceChanged = this.hasResourceChanged(label, options); this.label = label; this.options = options; @@ -68,10 +68,17 @@ export class ResourceLabel extends IconLabel { this.render(hasResourceChanged); } - private hasResourceChanged(label: IEditorLabel): boolean { + private hasResourceChanged(label: IEditorLabel, options: IResourceLabelOptions): boolean { const newResource = label ? label.resource : void 0; const oldResource = this.label ? this.label.resource : void 0; + const newIsFolder = options ? options.isFolder : false; + const oldIsFolder = this.options ? this.options.isFolder : false; + + if (newIsFolder !== oldIsFolder) { + return true; // same resource but different kind (file, folder) + } + if (newResource && oldResource) { return newResource.toString() !== oldResource.toString(); } diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts index dcba6d958fd28..020f3ae647172 100644 --- a/src/vs/workbench/browser/layout.ts +++ b/src/vs/workbench/browser/layout.ts @@ -368,7 +368,7 @@ export class WorkbenchLayout implements IVerticalSashLayoutProvider, IHorizontal // Sidebar hidden if (isSidebarHidden) { - editorSize.width = Math.min(this.workbenchSize.width - activityBarSize.width, this.workbenchSize.width - this.activitybarWidth); + editorSize.width = this.workbenchSize.width - activityBarSize.width; if (sidebarPosition === Position.LEFT) { editorSize.remainderLeft = Math.round((this.workbenchSize.width - editorSize.width + activityBarSize.width) / 2); diff --git a/src/vs/workbench/browser/panel.ts b/src/vs/workbench/browser/panel.ts index b8a6c3cf1415e..6e199f4f0f541 100644 --- a/src/vs/workbench/browser/panel.ts +++ b/src/vs/workbench/browser/panel.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as DOM from 'vs/base/browser/dom'; -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import { TPromise } from 'vs/base/common/winjs.base'; import { IPanel } from 'vs/workbench/common/panel'; import { Composite, CompositeDescriptor, CompositeRegistry } from 'vs/workbench/browser/composite'; diff --git a/src/vs/workbench/browser/part.ts b/src/vs/workbench/browser/part.ts index a0cf82677f941..71e32226b2a8a 100644 --- a/src/vs/workbench/browser/part.ts +++ b/src/vs/workbench/browser/part.ts @@ -12,6 +12,7 @@ import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; export interface IPartOptions { hasTitle?: boolean; + borderWidth?: () => number; } /** @@ -130,6 +131,10 @@ export class PartLayout { // Content Size: Width (Fill), Height (Variable) const contentSize = new Dimension(width, height - titleSize.height); + if (this.options && typeof this.options.borderWidth === 'function') { + contentSize.width -= this.options.borderWidth(); // adjust for border size + } + sizes.push(titleSize); sizes.push(contentSize); diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts index a6cbc397306ec..17d00aba4da19 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts @@ -20,23 +20,36 @@ import { ICommandService } from 'vs/platform/commands/common/commands'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { ViewletDescriptor } from 'vs/workbench/browser/viewlet'; +import { IActivity, IGlobalActivity } from 'vs/workbench/browser/activity'; import { dispose } from 'vs/base/common/lifecycle'; import { IViewletService, } from 'vs/workbench/services/viewlet/browser/viewlet'; import { IPartService, Parts } from 'vs/workbench/services/part/common/partService'; import { IThemeService, ITheme, registerThemingParticipant, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; import { ACTIVITY_BAR_BADGE_FOREGROUND, ACTIVITY_BAR_BADGE_BACKGROUND, ACTIVITY_BAR_DRAG_AND_DROP_BACKGROUND, ACTIVITY_BAR_FOREGROUND } from 'vs/workbench/common/theme'; import { contrastBorder, activeContrastBorder, focusBorder } from 'vs/platform/theme/common/colorRegistry'; +import { StandardMouseEvent } from 'vs/base/browser/mouseEvent'; +import { KeyCode } from 'vs/base/common/keyCodes'; +import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; + +export interface IViewletActivity { + badge: IBadge; + clazz: string; +} export class ActivityAction extends Action { private badge: IBadge; private _onDidChangeBadge = new Emitter(); - constructor(id: string, name: string, clazz: string) { - super(id, name, clazz); + constructor(private _activity: IActivity) { + super(_activity.id, _activity.name, _activity.cssClass); this.badge = null; } + public get activity(): IActivity { + return this._activity; + } + public get onDidChangeBadge(): Event { return this._onDidChangeBadge.event; } @@ -74,7 +87,7 @@ export class ViewletActivityAction extends ActivityAction { @IViewletService private viewletService: IViewletService, @IPartService private partService: IPartService ) { - super(viewlet.id, viewlet.name, viewlet.cssClass); + super(viewlet); } public run(event): TPromise { @@ -84,7 +97,7 @@ export class ViewletActivityAction extends ActivityAction { // prevent accident trigger on a doubleclick (to help nervous people) const now = Date.now(); - if (now - this.lastRun < ViewletActivityAction.preventDoubleClickDelay) { + if (now > this.lastRun /* https://github.com/Microsoft/vscode/issues/25830 */ && now - this.lastRun < ViewletActivityAction.preventDoubleClickDelay) { return TPromise.as(true); } this.lastRun = now; @@ -102,7 +115,13 @@ export class ViewletActivityAction extends ActivityAction { } } -export abstract class ThemableActivityActionItem extends BaseActionItem { +export class ActivityActionItem extends BaseActionItem { + protected $container: Builder; + protected $label: Builder; + protected $badge: Builder; + + private $badgeContent: Builder; + private mouseUpTimeout: number; constructor( action: ActivityAction, @@ -112,54 +131,11 @@ export abstract class ThemableActivityActionItem extends BaseActionItem { super(null, action, options); this.themeService.onThemeChange(this.onThemeChange, this, this._callOnDispose); + action.onDidChangeBadge(this.handleBadgeChangeEvenet, this, this._callOnDispose); } - private onThemeChange(theme: ITheme): void { - this.updateStyles(); - } - - protected abstract updateStyles(): void; -} - -export class ActivityActionItem extends ThemableActivityActionItem { - - private static manageExtensionAction: ManageExtensionAction; - private static toggleViewletPinnedAction: ToggleViewletPinnedAction; - private static draggedViewlet: ViewletDescriptor; - - private $container: Builder; - private $label: Builder; - private name: string; - private _keybinding: string; - private cssClass: string; - private $badge: Builder; - private $badgeContent: Builder; - private mouseUpTimeout: number; - - constructor( - action: ActivityAction, - private viewlet: ViewletDescriptor, - @IContextMenuService private contextMenuService: IContextMenuService, - @IActivityBarService private activityBarService: IActivityBarService, - @IKeybindingService private keybindingService: IKeybindingService, - @IInstantiationService instantiationService: IInstantiationService, - @IThemeService themeService: IThemeService - ) { - super(action, { draggable: true }, themeService); - - this.cssClass = action.class; - this.name = viewlet.name; - this._keybinding = this.getKeybindingLabel(viewlet.id); - - if (!ActivityActionItem.manageExtensionAction) { - ActivityActionItem.manageExtensionAction = instantiationService.createInstance(ManageExtensionAction); - } - - if (!ActivityActionItem.toggleViewletPinnedAction) { - ActivityActionItem.toggleViewletPinnedAction = instantiationService.createInstance(ToggleViewletPinnedAction, void 0); - } - - action.onDidChangeBadge(this.handleBadgeChangeEvenet, this, this._callOnDispose); + protected get activity(): IActivity { + return (this._action as ActivityAction).activity; } protected updateStyles(): void { @@ -176,33 +152,25 @@ export class ActivityActionItem extends ThemableActivityActionItem { if (this.$badgeContent) { const badgeForeground = theme.getColor(ACTIVITY_BAR_BADGE_FOREGROUND); const badgeBackground = theme.getColor(ACTIVITY_BAR_BADGE_BACKGROUND); - const hcBorder = theme.getColor(contrastBorder); + const contrastBorderColor = theme.getColor(contrastBorder); this.$badgeContent.style('color', badgeForeground ? badgeForeground.toString() : null); this.$badgeContent.style('background-color', badgeBackground ? badgeBackground.toString() : null); - this.$badgeContent.style('border-style', hcBorder ? 'solid' : null); - this.$badgeContent.style('border-width', hcBorder ? '1px' : null); - this.$badgeContent.style('border-color', hcBorder ? hcBorder.toString() : null); + this.$badgeContent.style('border-style', contrastBorderColor ? 'solid' : null); + this.$badgeContent.style('border-width', contrastBorderColor ? '1px' : null); + this.$badgeContent.style('border-color', contrastBorderColor ? contrastBorderColor.toString() : null); } } - private getKeybindingLabel(id: string): string { - const kb = this.keybindingService.lookupKeybinding(id); - if (kb) { - return kb.getLabel(); - } - - return null; - } - public render(container: HTMLElement): void { super.render(container); // Make the container tab-able for keyboard navigation this.$container = $(container).attr({ tabIndex: '0', - role: 'button' + role: 'button', + title: this.activity.name }); // Try hard to prevent keyboard only focus feedback when using mouse @@ -220,6 +188,128 @@ export class ActivityActionItem extends ThemableActivityActionItem { }, 800); // delayed to prevent focus feedback from showing on mouse up }); + // Label + this.$label = $('a.action-label').appendTo(this.builder); + if (this.activity.cssClass) { + this.$label.addClass(this.activity.cssClass); + } + + this.$badge = this.builder.clone().div({ 'class': 'badge' }, (badge: Builder) => { + this.$badgeContent = badge.div({ 'class': 'badge-content' }); + }); + + this.$badge.hide(); + + this.updateStyles(); + } + + private onThemeChange(theme: ITheme): void { + this.updateStyles(); + } + + public setBadge(badge: IBadge): void { + this.updateBadge(badge); + } + + protected updateBadge(badge: IBadge): void { + this.$badgeContent.empty(); + this.$badge.hide(); + + if (badge) { + + // Number + if (badge instanceof NumberBadge) { + if (badge.number) { + this.$badgeContent.text(badge.number > 99 ? '99+' : badge.number.toString()); + this.$badge.show(); + } + } + + // Text + else if (badge instanceof TextBadge) { + this.$badgeContent.text(badge.text); + this.$badge.show(); + } + + // Text + else if (badge instanceof IconBadge) { + this.$badge.show(); + } + + // Progress + else if (badge instanceof ProgressBadge) { + this.$badge.show(); + } + + this.$label.attr('aria-label', `${this.activity.name} - ${badge.getDescription()}`); + } + } + + private handleBadgeChangeEvenet(): void { + const action = this.getAction(); + if (action instanceof ActivityAction) { + this.updateBadge(action.getBadge()); + } + } + + public dispose(): void { + super.dispose(); + + if (this.mouseUpTimeout) { + clearTimeout(this.mouseUpTimeout); + } + + this.$badge.destroy(); + } +} + +export class ViewletActionItem extends ActivityActionItem { + + private static manageExtensionAction: ManageExtensionAction; + private static toggleViewletPinnedAction: ToggleViewletPinnedAction; + private static draggedViewlet: ViewletDescriptor; + + private _keybinding: string; + private cssClass: string; + + constructor( + private action: ViewletActivityAction, + @IContextMenuService private contextMenuService: IContextMenuService, + @IActivityBarService private activityBarService: IActivityBarService, + @IKeybindingService private keybindingService: IKeybindingService, + @IInstantiationService instantiationService: IInstantiationService, + @IThemeService themeService: IThemeService + ) { + super(action, { draggable: true }, themeService); + + this.cssClass = action.class; + this._keybinding = this.getKeybindingLabel(this.viewlet.id); + + if (!ViewletActionItem.manageExtensionAction) { + ViewletActionItem.manageExtensionAction = instantiationService.createInstance(ManageExtensionAction); + } + + if (!ViewletActionItem.toggleViewletPinnedAction) { + ViewletActionItem.toggleViewletPinnedAction = instantiationService.createInstance(ToggleViewletPinnedAction, void 0); + } + } + + private get viewlet(): ViewletDescriptor { + return this.action.activity as ViewletDescriptor; + } + + private getKeybindingLabel(id: string): string { + const kb = this.keybindingService.lookupKeybinding(id); + if (kb) { + return kb.getLabel(); + } + + return null; + } + + public render(container: HTMLElement): void { + super.render(container); + this.$container.on('contextmenu', e => { DOM.EventHelper.stop(e, true); @@ -240,7 +330,7 @@ export class ActivityActionItem extends ThemableActivityActionItem { // Drag enter let counter = 0; // see https://github.com/Microsoft/vscode/issues/14470 this.$container.on(DOM.EventType.DRAG_ENTER, (e: DragEvent) => { - const draggedViewlet = ActivityActionItem.getDraggedViewlet(); + const draggedViewlet = ViewletActionItem.getDraggedViewlet(); if (draggedViewlet && draggedViewlet.id !== this.viewlet.id) { counter++; this.updateFromDragging(container, true); @@ -249,7 +339,7 @@ export class ActivityActionItem extends ThemableActivityActionItem { // Drag leave this.$container.on(DOM.EventType.DRAG_LEAVE, (e: DragEvent) => { - const draggedViewlet = ActivityActionItem.getDraggedViewlet(); + const draggedViewlet = ViewletActionItem.getDraggedViewlet(); if (draggedViewlet) { counter--; if (counter === 0) { @@ -260,12 +350,12 @@ export class ActivityActionItem extends ThemableActivityActionItem { // Drag end this.$container.on(DOM.EventType.DRAG_END, (e: DragEvent) => { - const draggedViewlet = ActivityActionItem.getDraggedViewlet(); + const draggedViewlet = ViewletActionItem.getDraggedViewlet(); if (draggedViewlet) { counter = 0; this.updateFromDragging(container, false); - ActivityActionItem.clearDraggedViewlet(); + ViewletActionItem.clearDraggedViewlet(); } }); @@ -273,34 +363,21 @@ export class ActivityActionItem extends ThemableActivityActionItem { this.$container.on(DOM.EventType.DROP, (e: DragEvent) => { DOM.EventHelper.stop(e, true); - const draggedViewlet = ActivityActionItem.getDraggedViewlet(); + const draggedViewlet = ViewletActionItem.getDraggedViewlet(); if (draggedViewlet && draggedViewlet.id !== this.viewlet.id) { this.updateFromDragging(container, false); - ActivityActionItem.clearDraggedViewlet(); + ViewletActionItem.clearDraggedViewlet(); this.activityBarService.move(draggedViewlet.id, this.viewlet.id); } }); - // Label - this.$label = $('a.action-label').appendTo(this.builder); - if (this.cssClass) { - this.$label.addClass(this.cssClass); - } - - // Badge - this.$badge = this.builder.div({ 'class': 'badge' }, (badge: Builder) => { - this.$badgeContent = badge.div({ 'class': 'badge-content' }); - }); - - this.$badge.hide(); - // Keybinding this.keybinding = this._keybinding; // force update // Activate on drag over to reveal targets [this.$badge, this.$label].forEach(b => new DelayedDragHandler(b.getHTMLElement(), () => { - if (!ActivityActionItem.getDraggedViewlet() && !this.getAction().checked) { + if (!ViewletActionItem.getDraggedViewlet() && !this.getAction().checked) { this.getAction().run(); } })); @@ -316,29 +393,29 @@ export class ActivityActionItem extends ThemableActivityActionItem { } public static getDraggedViewlet(): ViewletDescriptor { - return ActivityActionItem.draggedViewlet; + return ViewletActionItem.draggedViewlet; } private setDraggedViewlet(viewlet: ViewletDescriptor): void { - ActivityActionItem.draggedViewlet = viewlet; + ViewletActionItem.draggedViewlet = viewlet; } public static clearDraggedViewlet(): void { - ActivityActionItem.draggedViewlet = void 0; + ViewletActionItem.draggedViewlet = void 0; } private showContextMenu(container: HTMLElement): void { - const actions: Action[] = [ActivityActionItem.toggleViewletPinnedAction]; + const actions: Action[] = [ViewletActionItem.toggleViewletPinnedAction]; if (this.viewlet.extensionId) { actions.push(new Separator()); - actions.push(ActivityActionItem.manageExtensionAction); + actions.push(ViewletActionItem.manageExtensionAction); } const isPinned = this.activityBarService.isPinned(this.viewlet.id); if (isPinned) { - ActivityActionItem.toggleViewletPinnedAction.label = nls.localize('removeFromActivityBar', "Remove from Activity Bar"); + ViewletActionItem.toggleViewletPinnedAction.label = nls.localize('removeFromActivityBar', "Remove from Activity Bar"); } else { - ActivityActionItem.toggleViewletPinnedAction.label = nls.localize('keepInActivityBar', "Keep in Activity Bar"); + ViewletActionItem.toggleViewletPinnedAction.label = nls.localize('keepInActivityBar', "Keep in Activity Bar"); } this.contextMenuService.showContextMenu({ @@ -352,10 +429,6 @@ export class ActivityActionItem extends ThemableActivityActionItem { this.$container.domFocus(); } - public setBadge(badge: IBadge): void { - this.updateBadge(badge); - } - public set keybinding(keybinding: string) { this._keybinding = keybinding; @@ -365,47 +438,14 @@ export class ActivityActionItem extends ThemableActivityActionItem { let title: string; if (keybinding) { - title = nls.localize('titleKeybinding', "{0} ({1})", this.name, keybinding); + title = nls.localize('titleKeybinding', "{0} ({1})", this.activity.name, keybinding); } else { - title = this.name; + title = this.activity.name; } this.$label.title(title); this.$badge.title(title); - } - - private updateBadge(badge: IBadge): void { - this.$badgeContent.empty(); - this.$badge.hide(); - - if (badge) { - - // Number - if (badge instanceof NumberBadge) { - if (badge.number) { - this.$badgeContent.text(badge.number > 99 ? '99+' : badge.number.toString()); - this.$badge.show(); - } - } - - // Text - else if (badge instanceof TextBadge) { - this.$badgeContent.text(badge.text); - this.$badge.show(); - } - - // Text - else if (badge instanceof IconBadge) { - this.$badge.show(); - } - - // Progress - else if (badge instanceof ProgressBadge) { - this.$badge.show(); - } - - this.$label.attr('aria-label', `${this.name} - ${badge.getDescription()}`); - } + this.$container.title(title); } protected _updateClass(): void { @@ -419,16 +459,9 @@ export class ActivityActionItem extends ThemableActivityActionItem { protected _updateChecked(): void { if (this.getAction().checked) { - this.$container.addClass('active'); + this.$container.addClass('checked'); } else { - this.$container.removeClass('active'); - } - } - - private handleBadgeChangeEvenet(): void { - const action = this.getAction(); - if (action instanceof ActivityAction) { - this.updateBadge(action.getBadge()); + this.$container.removeClass('checked'); } } @@ -443,13 +476,8 @@ export class ActivityActionItem extends ThemableActivityActionItem { public dispose(): void { super.dispose(); - ActivityActionItem.clearDraggedViewlet(); + ViewletActionItem.clearDraggedViewlet(); - if (this.mouseUpTimeout) { - clearTimeout(this.mouseUpTimeout); - } - - this.$badge.destroy(); this.$label.destroy(); } } @@ -459,7 +487,11 @@ export class ViewletOverflowActivityAction extends ActivityAction { constructor( private showMenu: () => void ) { - super('activitybar.additionalViewlets.action', nls.localize('additionalViews', "Additional Views"), 'toggle-more'); + super({ + id: 'activitybar.additionalViewlets.action', + name: nls.localize('additionalViews', "Additional Views"), + cssClass: 'toggle-more' + }); } public run(event): TPromise { @@ -469,8 +501,7 @@ export class ViewletOverflowActivityAction extends ActivityAction { } } -export class ViewletOverflowActivityActionItem extends ThemableActivityActionItem { - private $label: Builder; +export class ViewletOverflowActivityActionItem extends ActivityActionItem { private name: string; private cssClass: string; private actions: OpenViewletAction[]; @@ -481,7 +512,6 @@ export class ViewletOverflowActivityActionItem extends ThemableActivityActionIte private getBadge: (viewlet: ViewletDescriptor) => IBadge, @IInstantiationService private instantiationService: IInstantiationService, @IViewletService private viewletService: IViewletService, - @IKeybindingService private keybindingService: IKeybindingService, @IContextMenuService private contextMenuService: IContextMenuService, @IThemeService themeService: IThemeService ) { @@ -525,7 +555,6 @@ export class ViewletOverflowActivityActionItem extends ThemableActivityActionIte this.contextMenuService.showContextMenu({ getAnchor: () => this.builder.getHTMLElement(), getActions: () => TPromise.as(this.actions), - getKeyBinding: (action) => this.keybindingService.lookupKeybinding(action.id), onHide: () => dispose(this.actions) }); } @@ -626,6 +655,58 @@ export class ToggleViewletPinnedAction extends Action { } } +export class GlobalActivityAction extends ActivityAction { + + constructor(activity: IGlobalActivity) { + super(activity); + } +} + +export class GlobalActivityActionItem extends ActivityActionItem { + + constructor( + action: GlobalActivityAction, + @IThemeService themeService: IThemeService, + @IContextMenuService protected contextMenuService: IContextMenuService + ) { + super(action, { draggable: false }, themeService); + } + + public render(container: HTMLElement): void { + super.render(container); + + // Context menus are triggered on mouse down so that an item can be picked + // and executed with releasing the mouse over it + this.$container.on(DOM.EventType.MOUSE_DOWN, (e: MouseEvent) => { + DOM.EventHelper.stop(e, true); + + const event = new StandardMouseEvent(e); + this.showContextMenu({ x: event.posx, y: event.posy }); + }); + + this.$container.on(DOM.EventType.KEY_UP, (e: KeyboardEvent) => { + let event = new StandardKeyboardEvent(e); + if (event.equals(KeyCode.Enter) || event.equals(KeyCode.Space)) { + DOM.EventHelper.stop(e, true); + + this.showContextMenu(this.$container.getHTMLElement()); + } + }); + } + + private showContextMenu(location: HTMLElement | { x: number, y: number }): void { + const globalAction = this._action as GlobalActivityAction; + const activity = globalAction.activity as IGlobalActivity; + const actions = activity.getActions(); + + this.contextMenuService.showContextMenu({ + getAnchor: () => location, + getActions: () => TPromise.as(actions), + onHide: () => dispose(actions) + }); + } +} + registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { // Styling with Outline color (e.g. high contrast theme) @@ -643,7 +724,9 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { } .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.active:before, - .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.active:hover:before { + .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.active:hover:before, + .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.checked:before, + .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.checked:hover:before { outline: 1px solid; } @@ -652,6 +735,7 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { } .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.active:before, + .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.checked:before, .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:hover:before { opacity: 1; } @@ -662,6 +746,8 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.active:before, .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.active:hover:before, + .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.checked:before, + .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.checked:hover:before, .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:hover:before { outline-color: ${outline}; } @@ -671,21 +757,23 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { // Styling without outline color else { const focusBorderColor = theme.getColor(focusBorder); + if (focusBorderColor) { + collector.addRule(` + .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.active .action-label, + .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.checked .action-label, + .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:focus .action-label, + .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:hover .action-label { + opacity: 1; + } - collector.addRule(` - .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.active .action-label, - .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:focus .action-label, - .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:hover .action-label { - opacity: 1; - } - - .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item .action-label { - opacity: 0.6; - } + .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item .action-label { + opacity: 0.6; + } - .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:focus:before { - border-left-color: ${focusBorderColor}; - } - `); + .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:focus:before { + border-left-color: ${focusBorderColor}; + } + `); + } } }); \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts index 3d8e0a7dd8823..cc732f7305f6f 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts @@ -15,9 +15,11 @@ import { Builder, $, Dimension } from 'vs/base/browser/builder'; import { Action } from 'vs/base/common/actions'; import { ActionsOrientation, ActionBar, IActionItem, Separator } from 'vs/base/browser/ui/actionbar/actionbar'; import { ViewletDescriptor } from 'vs/workbench/browser/viewlet'; +import { GlobalActivityExtensions, IGlobalActivityRegistry } from 'vs/workbench/browser/activity'; +import { Registry } from 'vs/platform/registry/common/platform'; import { Part } from 'vs/workbench/browser/part'; import { IViewlet } from 'vs/workbench/common/viewlet'; -import { ToggleViewletPinnedAction, ViewletActivityAction, ActivityAction, ActivityActionItem, ViewletOverflowActivityAction, ViewletOverflowActivityActionItem } from 'vs/workbench/browser/parts/activitybar/activitybarActions'; +import { ToggleViewletPinnedAction, ViewletActivityAction, ActivityAction, GlobalActivityActionItem, ViewletActionItem, ViewletOverflowActivityAction, ViewletOverflowActivityActionItem, GlobalActivityAction, IViewletActivity } from 'vs/workbench/browser/parts/activitybar/activitybarActions'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { IActivityBarService, IBadge } from 'vs/workbench/services/activity/common/activityBarService'; import { IPartService, Position as SideBarPosition } from 'vs/workbench/services/part/common/partService'; @@ -27,18 +29,12 @@ import { IStorageService } from 'vs/platform/storage/common/storage'; import { Scope as MementoScope } from 'vs/workbench/common/memento'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { StandardMouseEvent } from 'vs/base/browser/mouseEvent'; -import { dispose, IDisposable } from 'vs/base/common/lifecycle'; +import { dispose, IDisposable, toDisposable } from 'vs/base/common/lifecycle'; import { ToggleActivityBarVisibilityAction } from 'vs/workbench/browser/actions/toggleActivityBarVisibility'; -import SCMPreview from 'vs/workbench/parts/scm/browser/scmPreview'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { ACTIVITY_BAR_BACKGROUND } from 'vs/workbench/common/theme'; +import { ACTIVITY_BAR_BACKGROUND, ACTIVITY_BAR_BORDER } from 'vs/workbench/common/theme'; import { contrastBorder } from 'vs/platform/theme/common/colorRegistry'; -interface IViewletActivity { - badge: IBadge; - clazz: string; -} - export class ActivitybarPart extends Part implements IActivityBarService { private static readonly ACTIVITY_ACTION_HEIGHT = 50; @@ -48,6 +44,9 @@ export class ActivitybarPart extends Part implements IActivityBarService { private dimension: Dimension; + private globalActionBar: ActionBar; + private globalActivityIdToActions: { [globalActivityId: string]: GlobalActivityAction; }; + private viewletSwitcherBar: ActionBar; private viewletOverflowAction: ViewletOverflowActivityAction; private viewletOverflowActionItem: ViewletOverflowActivityActionItem; @@ -56,7 +55,7 @@ export class ActivitybarPart extends Part implements IActivityBarService { private viewletIdToActionItems: { [viewletId: string]: IActionItem; }; private viewletIdToActivityStack: { [viewletId: string]: IViewletActivity[]; }; - private memento: any; + private memento: object; private pinnedViewlets: string[]; private activeUnpinnedViewlet: ViewletDescriptor; @@ -72,6 +71,8 @@ export class ActivitybarPart extends Part implements IActivityBarService { ) { super(id, { hasTitle: false }, themeService); + this.globalActivityIdToActions = Object.create(null); + this.viewletIdToActionItems = Object.create(null); this.viewletIdToActions = Object.create(null); this.viewletIdToActivityStack = Object.create(null); @@ -81,23 +82,15 @@ export class ActivitybarPart extends Part implements IActivityBarService { const pinnedViewlets = this.memento[ActivitybarPart.PINNED_VIEWLETS] as string[]; if (pinnedViewlets) { - // TODO@Ben: Migrate git => scm viewlet - - const map = SCMPreview.enabled - ? (id => id === 'workbench.view.git' ? 'workbench.view.scm' : id) - : (id => id === 'workbench.view.scm' ? 'workbench.view.git' : id); - this.pinnedViewlets = pinnedViewlets - .map(map) + // TODO@Ben: Migrate git => scm viewlet + .map(id => id === 'workbench.view.git' ? 'workbench.view.scm' : id) .filter(arrays.uniqueFilter(str => str)); } else { this.pinnedViewlets = this.viewletService.getViewlets().map(v => v.id); } - // Update viewlet switcher when external viewlets become ready - this.extensionService.onReady().then(() => this.updateViewletSwitcher()); - this.registerListeners(); } @@ -132,6 +125,21 @@ export class ActivitybarPart extends Part implements IActivityBarService { } } + public showGlobalActivity(globalActivityId: string, badge: IBadge): IDisposable { + if (!badge) { + throw illegalArgument('badge'); + } + + const action = this.globalActivityIdToActions[globalActivityId]; + if (!action) { + throw illegalArgument('globalActivityId'); + } + + action.setBadge(badge); + + return toDisposable(() => action.setBadge(undefined)); + } + public showActivity(viewletId: string, badge: IBadge, clazz?: string): IDisposable { if (!badge) { throw illegalArgument('badge'); @@ -189,6 +197,9 @@ export class ActivitybarPart extends Part implements IActivityBarService { // Top Actionbar with action items for each viewlet action this.createViewletSwitcher($result.clone()); + // Top Actionbar with action items for each viewlet action + this.createGlobalActivityActionBar($result.getHTMLElement()); + // Contextmenu for viewlets $(parent).on('contextmenu', (e: MouseEvent) => { DOM.EventHelper.stop(e, true); @@ -198,11 +209,11 @@ export class ActivitybarPart extends Part implements IActivityBarService { // Allow to drop at the end to move viewlet to the end $(parent).on(DOM.EventType.DROP, (e: DragEvent) => { - const draggedViewlet = ActivityActionItem.getDraggedViewlet(); + const draggedViewlet = ViewletActionItem.getDraggedViewlet(); if (draggedViewlet) { DOM.EventHelper.stop(e, true); - ActivityActionItem.clearDraggedViewlet(); + ViewletActionItem.clearDraggedViewlet(); const targetId = this.pinnedViewlets[this.pinnedViewlets.length - 1]; if (targetId !== draggedViewlet.id) { @@ -222,15 +233,15 @@ export class ActivitybarPart extends Part implements IActivityBarService { const background = this.getColor(ACTIVITY_BAR_BACKGROUND); container.style('background-color', background); - const hcBorder = this.getColor(contrastBorder); + const borderColor = this.getColor(ACTIVITY_BAR_BORDER) || this.getColor(contrastBorder); const isPositionLeft = this.partService.getSideBarPosition() === SideBarPosition.LEFT; - container.style('box-sizing', hcBorder && isPositionLeft ? 'border-box' : null); - container.style('border-right-width', hcBorder && isPositionLeft ? '1px' : null); - container.style('border-right-style', hcBorder && isPositionLeft ? 'solid' : null); - container.style('border-right-color', isPositionLeft ? hcBorder : null); - container.style('border-left-width', hcBorder && !isPositionLeft ? '1px' : null); - container.style('border-left-style', hcBorder && !isPositionLeft ? 'solid' : null); - container.style('border-left-color', !isPositionLeft ? hcBorder : null); + container.style('box-sizing', borderColor && isPositionLeft ? 'border-box' : null); + container.style('border-right-width', borderColor && isPositionLeft ? '1px' : null); + container.style('border-right-style', borderColor && isPositionLeft ? 'solid' : null); + container.style('border-right-color', isPositionLeft ? borderColor : null); + container.style('border-left-width', borderColor && !isPositionLeft ? '1px' : null); + container.style('border-left-style', borderColor && !isPositionLeft ? 'solid' : null); + container.style('border-left-color', !isPositionLeft ? borderColor : null); } private showContextMenu(e: MouseEvent): void { @@ -256,9 +267,37 @@ export class ActivitybarPart extends Part implements IActivityBarService { }); this.updateViewletSwitcher(); + + // Update viewlet switcher when external viewlets become ready + this.extensionService.onReady().then(() => this.updateViewletSwitcher()); + } + + private createGlobalActivityActionBar(container: HTMLElement): void { + const activityRegistry = Registry.as(GlobalActivityExtensions); + const descriptors = activityRegistry.getActivities(); + const actions = descriptors + .map(d => this.instantiationService.createInstance(d)) + .map(a => new GlobalActivityAction(a)); + + this.globalActionBar = new ActionBar(container, { + actionItemProvider: a => this.instantiationService.createInstance(GlobalActivityActionItem, a), + orientation: ActionsOrientation.VERTICAL, + ariaLabel: nls.localize('globalActions', "Global Actions"), + animated: false + }); + + actions.forEach(a => { + this.globalActivityIdToActions[a.id] = a; + this.globalActionBar.push(a); + }); } private updateViewletSwitcher() { + if (!this.viewletSwitcherBar) { + // We have not been rendered yet so there is nothing to update. + return; + } + let viewletsToShow = this.getPinnedViewlets(); // Always show the active viewlet even if it is marked to be hidden @@ -377,7 +416,7 @@ export class ActivitybarPart extends Part implements IActivityBarService { private toAction(viewlet: ViewletDescriptor): ActivityAction { const action = this.instantiationService.createInstance(ViewletActivityAction, viewlet); - this.viewletIdToActionItems[action.id] = this.instantiationService.createInstance(ActivityActionItem, action, viewlet); + this.viewletIdToActionItems[action.id] = this.instantiationService.createInstance(ViewletActionItem, action); this.viewletIdToActions[viewlet.id] = action; return action; @@ -501,6 +540,11 @@ export class ActivitybarPart extends Part implements IActivityBarService { this.viewletSwitcherBar = null; } + if (this.globalActionBar) { + this.globalActionBar.dispose(); + this.globalActionBar = null; + } + super.dispose(); } diff --git a/src/vs/workbench/browser/parts/activitybar/media/activitybarpart.css b/src/vs/workbench/browser/parts/activitybar/media/activitybarpart.css index 7acd81393fbdd..50061325e7e2a 100644 --- a/src/vs/workbench/browser/parts/activitybar/media/activitybarpart.css +++ b/src/vs/workbench/browser/parts/activitybar/media/activitybarpart.css @@ -9,6 +9,9 @@ .monaco-workbench > .activitybar > .content { height: 100%; + display: flex; + flex-direction: column; + justify-content: space-between; } .monaco-workbench > .activitybar > .content .monaco-action-bar { diff --git a/src/vs/workbench/browser/parts/compositePart.ts b/src/vs/workbench/browser/parts/compositePart.ts index 6579242059af0..ba057331bb3e9 100644 --- a/src/vs/workbench/browser/parts/compositePart.ts +++ b/src/vs/workbench/browser/parts/compositePart.ts @@ -9,7 +9,7 @@ import 'vs/css!./media/compositepart'; import nls = require('vs/nls'); import { defaultGenerator } from 'vs/base/common/idGenerator'; import { TPromise } from 'vs/base/common/winjs.base'; -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { Dimension, Builder, $ } from 'vs/base/browser/builder'; import events = require('vs/base/common/events'); @@ -20,7 +20,7 @@ import errors = require('vs/base/common/errors'); import { CONTEXT as ToolBarContext, ToolBar } from 'vs/base/browser/ui/toolbar/toolbar'; import { IActionItem, ActionsOrientation } from 'vs/base/browser/ui/actionbar/actionbar'; import { ProgressBar } from 'vs/base/browser/ui/progressbar/progressbar'; -import { IActionBarRegistry, Extensions, prepareActions } from 'vs/workbench/browser/actionBarRegistry'; +import { IActionBarRegistry, Extensions, prepareActions } from 'vs/workbench/browser/actions'; import { Action, IAction } from 'vs/base/common/actions'; import { Part, IPartOptions } from 'vs/workbench/browser/part'; import { Composite, CompositeRegistry } from 'vs/workbench/browser/composite'; @@ -36,6 +36,7 @@ import { IProgressService } from 'vs/platform/progress/common/progress'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { attachProgressBarStyler } from 'vs/platform/theme/common/styler'; export interface ICompositeTitleLabel { @@ -79,6 +80,7 @@ export abstract class CompositePart extends Part { themeService: IThemeService, private registry: CompositeRegistry, private activeCompositeSettingsKey: string, + private defaultCompositeId: string, private nameForTelemetry: string, private compositeCSSClass: string, private actionContributionScope: string, @@ -95,7 +97,7 @@ export abstract class CompositePart extends Part { this.activeComposite = null; this.instantiatedComposites = []; this.compositeLoaderPromises = {}; - this.lastActiveCompositeId = storageService.get(activeCompositeSettingsKey, StorageScope.WORKSPACE); + this.lastActiveCompositeId = storageService.get(activeCompositeSettingsKey, StorageScope.WORKSPACE, this.defaultCompositeId); } protected openComposite(id: string, focus?: boolean): TPromise { @@ -220,7 +222,12 @@ export abstract class CompositePart extends Part { this.activeComposite = composite; // Store in preferences - this.storageService.store(this.activeCompositeSettingsKey, this.activeComposite.getId(), StorageScope.WORKSPACE); + const id = this.activeComposite.getId(); + if (id !== this.defaultCompositeId) { + this.storageService.store(this.activeCompositeSettingsKey, id, StorageScope.WORKSPACE); + } else { + this.storageService.remove(this.activeCompositeSettingsKey, StorageScope.WORKSPACE); + } // Remember this.lastActiveCompositeId = this.activeComposite.getId(); @@ -487,6 +494,7 @@ export abstract class CompositePart extends Part { 'class': 'content' }, (div: Builder) => { this.progressBar = new ProgressBar(div); + this.toUnbind.push(attachProgressBarStyler(this.progressBar, this.themeService)); this.progressBar.getContainer().hide(); }); } diff --git a/src/vs/workbench/browser/parts/editor/baseEditor.ts b/src/vs/workbench/browser/parts/editor/baseEditor.ts index 1aff5f9a4930c..ba76dca67e99a 100644 --- a/src/vs/workbench/browser/parts/editor/baseEditor.ts +++ b/src/vs/workbench/browser/parts/editor/baseEditor.ts @@ -5,14 +5,12 @@ 'use strict'; import { TPromise } from 'vs/base/common/winjs.base'; -import { Action, IAction } from 'vs/base/common/actions'; -import { ActionBarContributor } from 'vs/workbench/browser/actionBarRegistry'; import types = require('vs/base/common/types'); import { Builder } from 'vs/base/browser/builder'; -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import { Panel } from 'vs/workbench/browser/panel'; import { EditorInput, EditorOptions, IEditorDescriptor, IEditorInputFactory, IEditorRegistry, Extensions, IFileInputFactory } from 'vs/workbench/common/editor'; -import { IEditor, Position, POSITIONS } from 'vs/platform/editor/common/editor'; +import { IEditor, Position } from 'vs/platform/editor/common/editor'; import { IInstantiationService, IConstructorSignature0 } from 'vs/platform/instantiation/common/instantiation'; import { SyncDescriptor, AsyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; @@ -304,263 +302,4 @@ class EditorRegistry implements IEditorRegistry { } } -Registry.add(Extensions.Editors, new EditorRegistry()); - -/** - * The context that will be passed in to the EditorInputActionContributor. - */ -export interface IEditorInputActionContext { - editor: BaseEditor; - input: EditorInput; - position: Position; -} - -/** - * A variant of the action bar contributor to register actions to specific editor inputs of the editor. This allows to have more - * fine grained control over actions compared to contributing an action to a specific editor. - */ -export class EditorInputActionContributor extends ActionBarContributor { - - // The following data structures are partitioned into arrays of Position (one, two, three) - private mapEditorInputActionContextToPrimaryActions: { [id: string]: IEditorInputAction[] }[]; - private mapEditorInputActionContextToSecondaryActions: { [id: string]: IEditorInputAction[] }[]; - - constructor() { - super(); - - this.mapEditorInputActionContextToPrimaryActions = this.createPositionArray(); - this.mapEditorInputActionContextToSecondaryActions = this.createPositionArray(); - } - - private createPositionArray(): any[] { - const array: any[] = []; - - for (let i = 0; i < POSITIONS.length; i++) { - array[i] = {}; - } - - return array; - } - - /* Subclasses can override to provide a custom cache implementation */ - protected toId(context: IEditorInputActionContext): string { - return context.editor.getId() + context.input.getTypeId(); - } - - private clearInputsFromCache(position: Position, isPrimary: boolean): void { - if (isPrimary) { - this.doClearInputsFromCache(this.mapEditorInputActionContextToPrimaryActions[position]); - } else { - this.doClearInputsFromCache(this.mapEditorInputActionContextToSecondaryActions[position]); - } - } - - private doClearInputsFromCache(cache: { [id: string]: IEditorInputAction[] }): void { - for (let key in cache) { - if (cache.hasOwnProperty(key)) { - const cachedActions = cache[key]; - cachedActions.forEach((action) => { - action.input = null; - action.position = null; - }); - } - } - } - - /** - * Returns true if this contributor has actions for the given editor input. Subclasses must not - * override this method but instead hasActionsForEditorInput(); - */ - public hasActions(context: IEditorInputActionContext): boolean { - if (!this.checkEditorContext(context)) { - return false; - } - - // Ask Cache - if (this.mapEditorInputActionContextToPrimaryActions[context.position][this.toId(context)]) { - return true; - } - - // Ask Client - return this.hasActionsForEditorInput(context); - } - - /** - * Returns an array of actions for the given editor input. Subclasses must not override this - * method but instead getActionsForEditorInput(); - */ - public getActions(context: IEditorInputActionContext): IAction[] { - if (!this.checkEditorContext(context)) { - return []; - } - - // This will cause any cached action to be set with null for the current editor input to prevent - // leaking actions that still think the current editor input is what was set before. - this.clearInputsFromCache(context.position, true /* primary actions */); - - // First consult cache - const editorInput = context.input; - const editorPosition = context.position; - const cachedActions = this.mapEditorInputActionContextToPrimaryActions[context.position][this.toId(context)]; - if (cachedActions) { - - // Update the input field and position in all actions to indicate this change and return - cachedActions.forEach((action) => { - action.input = editorInput; - action.position = editorPosition; - }); - - return cachedActions; - } - - // Otherwise collect and keep in cache - const actions = this.getActionsForEditorInput(context); - actions.forEach((action) => { - action.input = editorInput; - action.position = editorPosition; - }); - - this.mapEditorInputActionContextToPrimaryActions[context.position][this.toId(context)] = actions; - - return actions; - } - - /** - * Returns true if this contributor has actions for the given editor input. Subclasses must not - * override this method but instead hasSecondaryActionsForEditorInput(); - */ - public hasSecondaryActions(context: IEditorInputActionContext): boolean { - if (!this.checkEditorContext(context)) { - return false; - } - - // Ask Cache - if (this.mapEditorInputActionContextToSecondaryActions[context.position][this.toId(context)]) { - return true; - } - - // Ask Client - return this.hasSecondaryActionsForEditorInput(context); - } - - /** - * Returns an array of actions for the given editor input. Subclasses must not override this - * method but instead getSecondaryActionsForEditorInput(); - */ - public getSecondaryActions(context: IEditorInputActionContext): IAction[] { - if (!this.checkEditorContext(context)) { - return []; - } - - // This will cause any cached action to be set with null for the current editor input to prevent - // leaking actions that still think the current editor input is what was set before. - this.clearInputsFromCache(context.position, false /* secondary actions */); - - // First consult cache - const editorInput = context.input; - const editorPosition = context.position; - const cachedActions = this.mapEditorInputActionContextToSecondaryActions[context.position][this.toId(context)]; - if (cachedActions) { - - // Update the input field and position in all actions to indicate this change and return - cachedActions.forEach((action) => { - action.input = editorInput; - action.position = editorPosition; - }); - - return cachedActions; - } - - // Otherwise collect and keep in cache - const actions = this.getSecondaryActionsForEditorInput(context); - actions.forEach((action) => { - action.input = editorInput; - action.position = editorPosition; - }); - - this.mapEditorInputActionContextToSecondaryActions[context.position][this.toId(context)] = actions; - - return actions; - } - - private checkEditorContext(context: IEditorInputActionContext): boolean { - return context && context.input instanceof EditorInput && context.editor instanceof BaseEditor && !types.isUndefinedOrNull(context.position); - } - - /** - * Returns true if this contributor has primary actions for the given editor input. - */ - public hasActionsForEditorInput(context: IEditorInputActionContext): boolean { - return false; - } - - /** - * Returns an array of primary actions for the given editor input. - */ - public getActionsForEditorInput(context: IEditorInputActionContext): IEditorInputAction[] { - return []; - } - - /** - * Returns true if this contributor has secondary actions for the given editor input. - */ - public hasSecondaryActionsForEditorInput(context: IEditorInputActionContext): boolean { - return false; - } - - /** - * Returns an array of secondary actions for the given editor input. - */ - public getSecondaryActionsForEditorInput(context: IEditorInputActionContext): IEditorInputAction[] { - return []; - } -} - -/** - * An editorinput action is contributed to an editor based on the editor input of the editor that is currently - * active. When the editor input changes, the action will be get the new editor input set so that the enablement - * state can be updated. In addition the position of the editor for the given input is applied. - */ -export interface IEditorInputAction extends IAction { - - /** - * The input of the editor for which this action is running. - */ - input: EditorInput; - - /** - * The position of the editor for which this action is running. - */ - position: Position; - - /** - * Implementors to define if the action is enabled or not. - */ - isEnabled(): boolean; -} - -export class EditorInputAction extends Action implements IEditorInputAction { - private _input: EditorInput; - private _position: Position; - - public get input(): EditorInput { - return this._input; - } - - public set input(input: EditorInput) { - this._input = input; - this.enabled = this.isEnabled(); - } - - public get position(): Position { - return this._position; - } - - public set position(position: Position) { - this._position = position; - } - - public isEnabled(): boolean { - return !!this._input; - } -} \ No newline at end of file +Registry.add(Extensions.Editors, new EditorRegistry()); \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/editor/binaryEditor.ts b/src/vs/workbench/browser/parts/editor/binaryEditor.ts index f2e1ec0cde694..8771fd8fb880e 100644 --- a/src/vs/workbench/browser/parts/editor/binaryEditor.ts +++ b/src/vs/workbench/browser/parts/editor/binaryEditor.ts @@ -59,7 +59,7 @@ export abstract class BaseBinaryResourceEditor extends BaseEditor { this.binaryContainer.tabindex(0); // enable focus support from the editor part (do not remove) // Custom Scrollbars - this.scrollbar = new DomScrollableElement(binaryContainerElement, { canUseTranslate3d: false, horizontal: ScrollbarVisibility.Auto, vertical: ScrollbarVisibility.Auto }); + this.scrollbar = new DomScrollableElement(binaryContainerElement, { horizontal: ScrollbarVisibility.Auto, vertical: ScrollbarVisibility.Auto }); parent.getHTMLElement().appendChild(this.scrollbar.getDomNode()); } @@ -80,7 +80,7 @@ export abstract class BaseBinaryResourceEditor extends BaseEditor { // Assert Model instance if (!(resolvedModel instanceof BinaryEditorModel)) { - return TPromise.wrapError('Unable to open file as binary'); + return TPromise.wrapError(new Error('Unable to open file as binary')); } // Assert that the current input is still the one we expect. This prevents a race condition when loading takes long and another input was set meanwhile diff --git a/src/vs/workbench/browser/parts/editor/editor.contribution.ts b/src/vs/workbench/browser/parts/editor/editor.contribution.ts index 51cbe1aef5da0..0e6fd0d539491 100644 --- a/src/vs/workbench/browser/parts/editor/editor.contribution.ts +++ b/src/vs/workbench/browser/parts/editor/editor.contribution.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import nls = require('vs/nls'); import URI from 'vs/base/common/uri'; import { Action, IAction } from 'vs/base/common/actions'; @@ -12,7 +12,6 @@ import { IEditorQuickOpenEntry, IQuickOpenRegistry, Extensions as QuickOpenExten import { StatusbarItemDescriptor, StatusbarAlignment, IStatusbarRegistry, Extensions as StatusExtensions } from 'vs/workbench/browser/parts/statusbar/statusbar'; import { EditorDescriptor } from 'vs/workbench/browser/parts/editor/baseEditor'; import { EditorInput, IEditorRegistry, Extensions as EditorExtensions, IEditorInputFactory, SideBySideEditorInput } from 'vs/workbench/common/editor'; -import { StringEditorInput } from 'vs/workbench/common/editor/stringEditorInput'; import { TextResourceEditor } from 'vs/workbench/browser/parts/editor/textResourceEditor'; import { SideBySideEditor } from 'vs/workbench/browser/parts/editor/sideBySideEditor'; import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput'; @@ -24,19 +23,22 @@ import { ITextFileService } from 'vs/workbench/services/textfile/common/textfile import { BinaryResourceDiffEditor } from 'vs/workbench/browser/parts/editor/binaryDiffEditor'; import { ChangeEncodingAction, ChangeEOLAction, ChangeModeAction, EditorStatus } from 'vs/workbench/browser/parts/editor/editorStatus'; import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actionRegistry'; -import { Scope, IActionBarRegistry, Extensions as ActionBarExtensions, ActionBarContributor } from 'vs/workbench/browser/actionBarRegistry'; +import { Scope, IActionBarRegistry, Extensions as ActionBarExtensions, ActionBarContributor } from 'vs/workbench/browser/actions'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { KeyMod, KeyChord, KeyCode } from 'vs/base/common/keyCodes'; import { CloseEditorsInGroupAction, CloseEditorsInOtherGroupsAction, CloseAllEditorsAction, MoveGroupLeftAction, MoveGroupRightAction, SplitEditorAction, JoinTwoGroupsAction, KeepEditorAction, CloseOtherEditorsInGroupAction, OpenToSideAction, RevertAndCloseEditorAction, NavigateBetweenGroupsAction, FocusActiveGroupAction, FocusFirstGroupAction, FocusSecondGroupAction, FocusThirdGroupAction, EvenGroupWidthsAction, MaximizeGroupAction, MinimizeOtherGroupsAction, FocusPreviousGroup, FocusNextGroup, ShowEditorsInGroupOneAction, - toEditorQuickOpenEntry, CloseLeftEditorsInGroupAction, CloseRightEditorsInGroupAction, OpenNextEditor, OpenPreviousEditor, NavigateBackwardsAction, NavigateForwardAction, ReopenClosedEditorAction, OpenPreviousRecentlyUsedEditorInGroupAction, NAVIGATE_IN_GROUP_ONE_PREFIX, + toEditorQuickOpenEntry, CloseLeftEditorsInGroupAction, CloseRightEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction, OpenNextEditor, OpenPreviousEditor, NavigateBackwardsAction, NavigateForwardAction, ReopenClosedEditorAction, OpenPreviousRecentlyUsedEditorInGroupAction, NAVIGATE_IN_GROUP_ONE_PREFIX, OpenPreviousEditorFromHistoryAction, ShowAllEditorsAction, NAVIGATE_ALL_EDITORS_GROUP_PREFIX, ClearEditorHistoryAction, ShowEditorsInGroupTwoAction, MoveEditorRightInGroupAction, OpenNextEditorInGroup, OpenPreviousEditorInGroup, OpenNextRecentlyUsedEditorAction, OpenPreviousRecentlyUsedEditorAction, NAVIGATE_IN_GROUP_TWO_PREFIX, ShowEditorsInGroupThreeAction, NAVIGATE_IN_GROUP_THREE_PREFIX, FocusLastEditorInStackAction, OpenNextRecentlyUsedEditorInGroupAction, MoveEditorToPreviousGroupAction, MoveEditorToNextGroupAction, MoveEditorLeftInGroupAction, ClearRecentFilesAction } from 'vs/workbench/browser/parts/editor/editorActions'; import * as editorCommands from 'vs/workbench/browser/parts/editor/editorCommands'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; +import { getQuickNavigateHandler, inQuickOpenContext } from 'vs/workbench/browser/parts/quickopen/quickopen'; +import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; +import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; // Register String Editor Registry.as(EditorExtensions.Editors).registerEditor( @@ -47,7 +49,6 @@ Registry.as(EditorExtensions.Editors).registerEditor( 'TextResourceEditor' ), [ - new SyncDescriptor(StringEditorInput), new SyncDescriptor(UntitledEditorInput), new SyncDescriptor(ResourceEditorInput) ] @@ -93,8 +94,9 @@ Registry.as(EditorExtensions.Editors).registerEditor( interface ISerializedUntitledEditorInput { resource: string; - resourceJSON: any; + resourceJSON: object; modeId: string; + encoding: string; } // Register Editor Input Factory @@ -120,7 +122,8 @@ class UntitledEditorInputFactory implements IEditorInputFactory { const serialized: ISerializedUntitledEditorInput = { resource: resource.toString(), // Keep for backwards compatibility resourceJSON: resource.toJSON(), - modeId: untitledEditorInput.getModeId() + modeId: untitledEditorInput.getModeId(), + encoding: untitledEditorInput.getEncoding() }; return JSON.stringify(serialized); @@ -132,8 +135,9 @@ class UntitledEditorInputFactory implements IEditorInputFactory { const resource = !!deserialized.resourceJSON ? URI.revive(deserialized.resourceJSON) : URI.parse(deserialized.resource); const filePath = resource.scheme === 'file' ? resource.fsPath : void 0; const language = deserialized.modeId; + const encoding = deserialized.encoding; - return accessor.get(IWorkbenchEditorService).createInput({ resource, filePath, language }) as UntitledEditorInput; + return accessor.get(IWorkbenchEditorService).createInput({ resource, filePath, language, encoding }) as UntitledEditorInput; }); } } @@ -256,11 +260,15 @@ export class QuickOpenActionContributor extends ActionBarContributor { const actionBarRegistry = Registry.as(ActionBarExtensions.Actionbar); actionBarRegistry.registerActionBarContributor(Scope.VIEWER, QuickOpenActionContributor); +const editorPickerContextKey = 'inEditorsPicker'; +const editorPickerContext = ContextKeyExpr.and(inQuickOpenContext, ContextKeyExpr.has(editorPickerContextKey)); + Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpenHandler( new QuickOpenHandlerDescriptor( 'vs/workbench/browser/parts/editor/editorPicker', 'GroupOnePicker', NAVIGATE_IN_GROUP_ONE_PREFIX, + editorPickerContextKey, [ { prefix: NAVIGATE_IN_GROUP_ONE_PREFIX, @@ -286,6 +294,7 @@ Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpen 'vs/workbench/browser/parts/editor/editorPicker', 'GroupTwoPicker', NAVIGATE_IN_GROUP_TWO_PREFIX, + editorPickerContextKey, [] ) ); @@ -295,6 +304,7 @@ Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpen 'vs/workbench/browser/parts/editor/editorPicker', 'GroupThreePicker', NAVIGATE_IN_GROUP_THREE_PREFIX, + editorPickerContextKey, [] ) ); @@ -304,6 +314,7 @@ Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpen 'vs/workbench/browser/parts/editor/editorPicker', 'AllEditorsPicker', NAVIGATE_ALL_EDITORS_GROUP_PREFIX, + editorPickerContextKey, [ { prefix: NAVIGATE_ALL_EDITORS_GROUP_PREFIX, @@ -317,11 +328,9 @@ Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpen // Register Editor Actions const category = nls.localize('view', "View"); registry.registerWorkbenchAction(new SyncActionDescriptor(OpenNextEditorInGroup, OpenNextEditorInGroup.ID, OpenNextEditorInGroup.LABEL), 'View: Open Next Editor in Group', category); -registry.registerWorkbenchAction(new SyncActionDescriptor(OpenPreviousEditorInGroup, OpenPreviousEditorInGroup.ID, OpenPreviousEditorInGroup.LABEL), 'View: Open Next Recently Used Editor in Group', category); -registry.registerWorkbenchAction(new SyncActionDescriptor(OpenNextRecentlyUsedEditorAction, OpenNextRecentlyUsedEditorAction.ID, OpenNextRecentlyUsedEditorAction.LABEL), 'View: Open Next Recently Used Editor'); -registry.registerWorkbenchAction(new SyncActionDescriptor(OpenPreviousRecentlyUsedEditorAction, OpenPreviousRecentlyUsedEditorAction.ID, OpenPreviousRecentlyUsedEditorAction.LABEL), 'View: Open Previous Recently Used Editor'); -registry.registerWorkbenchAction(new SyncActionDescriptor(OpenNextRecentlyUsedEditorInGroupAction, OpenNextRecentlyUsedEditorInGroupAction.ID, OpenNextRecentlyUsedEditorInGroupAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.Tab, mac: { primary: KeyMod.WinCtrl | KeyCode.Tab } }), 'Open Next Recently Used Editor in Group'); -registry.registerWorkbenchAction(new SyncActionDescriptor(OpenPreviousRecentlyUsedEditorInGroupAction, OpenPreviousRecentlyUsedEditorInGroupAction.ID, OpenPreviousRecentlyUsedEditorInGroupAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Tab, mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.Tab } }), 'Open Previous Recently Used Editor in Group'); +registry.registerWorkbenchAction(new SyncActionDescriptor(OpenPreviousEditorInGroup, OpenPreviousEditorInGroup.ID, OpenPreviousEditorInGroup.LABEL), 'View: Open Previous Editor in Group', category); +registry.registerWorkbenchAction(new SyncActionDescriptor(OpenNextRecentlyUsedEditorAction, OpenNextRecentlyUsedEditorAction.ID, OpenNextRecentlyUsedEditorAction.LABEL), 'View: Open Next Recently Used Editor', category); +registry.registerWorkbenchAction(new SyncActionDescriptor(OpenPreviousRecentlyUsedEditorAction, OpenPreviousRecentlyUsedEditorAction.ID, OpenPreviousRecentlyUsedEditorAction.LABEL), 'View: Open Previous Recently Used Editor', category); registry.registerWorkbenchAction(new SyncActionDescriptor(ShowAllEditorsAction, ShowAllEditorsAction.ID, ShowAllEditorsAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_P), mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.Tab } }), 'View: Show All Editors', category); registry.registerWorkbenchAction(new SyncActionDescriptor(ShowEditorsInGroupOneAction, ShowEditorsInGroupOneAction.ID, ShowEditorsInGroupOneAction.LABEL), 'View: Show Editors in First Group', category); registry.registerWorkbenchAction(new SyncActionDescriptor(ShowEditorsInGroupTwoAction, ShowEditorsInGroupTwoAction.ID, ShowEditorsInGroupTwoAction.LABEL), 'View: Show Editors in Second Group', category); @@ -334,6 +343,7 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(KeepEditorAction, Keep registry.registerWorkbenchAction(new SyncActionDescriptor(CloseAllEditorsAction, CloseAllEditorsAction.ID, CloseAllEditorsAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_W) }), 'View: Close All Editors', category); registry.registerWorkbenchAction(new SyncActionDescriptor(CloseLeftEditorsInGroupAction, CloseLeftEditorsInGroupAction.ID, CloseLeftEditorsInGroupAction.LABEL), 'View: Close Editors to the Left', category); registry.registerWorkbenchAction(new SyncActionDescriptor(CloseRightEditorsInGroupAction, CloseRightEditorsInGroupAction.ID, CloseRightEditorsInGroupAction.LABEL), 'View: Close Editors to the Right', category); +registry.registerWorkbenchAction(new SyncActionDescriptor(CloseUnmodifiedEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction.ID, CloseUnmodifiedEditorsInGroupAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_U) }), 'View: Close Unmodified Editors in Group', category); registry.registerWorkbenchAction(new SyncActionDescriptor(CloseEditorsInGroupAction, CloseEditorsInGroupAction.ID, CloseEditorsInGroupAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_W) }), 'View: Close All Editors in Group', category); registry.registerWorkbenchAction(new SyncActionDescriptor(CloseOtherEditorsInGroupAction, CloseOtherEditorsInGroupAction.ID, CloseOtherEditorsInGroupAction.LABEL, { primary: null, mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_T } }), 'View: Close Other Editors', category); registry.registerWorkbenchAction(new SyncActionDescriptor(CloseEditorsInOtherGroupsAction, CloseEditorsInOtherGroupsAction.ID, CloseEditorsInOtherGroupsAction.LABEL), 'View: Close Editors in Other Groups', category); @@ -344,7 +354,7 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(FocusActiveGroupAction registry.registerWorkbenchAction(new SyncActionDescriptor(FocusFirstGroupAction, FocusFirstGroupAction.ID, FocusFirstGroupAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.KEY_1 }), 'View: Focus First Editor Group', category); registry.registerWorkbenchAction(new SyncActionDescriptor(FocusSecondGroupAction, FocusSecondGroupAction.ID, FocusSecondGroupAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.KEY_2 }), 'View: Focus Second Editor Group', category); registry.registerWorkbenchAction(new SyncActionDescriptor(FocusThirdGroupAction, FocusThirdGroupAction.ID, FocusThirdGroupAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.KEY_3 }), 'View: Focus Third Editor Group', category); -registry.registerWorkbenchAction(new SyncActionDescriptor(FocusLastEditorInStackAction, FocusLastEditorInStackAction.ID, FocusLastEditorInStackAction.LABEL, { primary: KeyMod.Alt | KeyCode.KEY_0, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_0 } }), 'View: Focus Last Editor in Group', category); +registry.registerWorkbenchAction(new SyncActionDescriptor(FocusLastEditorInStackAction, FocusLastEditorInStackAction.ID, FocusLastEditorInStackAction.LABEL, { primary: KeyMod.Alt | KeyCode.KEY_0, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_0 } }), 'View: Open Last Editor in Group', category); registry.registerWorkbenchAction(new SyncActionDescriptor(EvenGroupWidthsAction, EvenGroupWidthsAction.ID, EvenGroupWidthsAction.LABEL), 'View: Even Editor Group Widths', category); registry.registerWorkbenchAction(new SyncActionDescriptor(MaximizeGroupAction, MaximizeGroupAction.ID, MaximizeGroupAction.LABEL), 'View: Maximize Editor Group and Hide Sidebar', category); registry.registerWorkbenchAction(new SyncActionDescriptor(MinimizeOtherGroupsAction, MinimizeOtherGroupsAction.ID, MinimizeOtherGroupsAction.LABEL), 'View: Minimize Other Editor Groups', category); @@ -362,5 +372,32 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(OpenPreviousEditorFrom registry.registerWorkbenchAction(new SyncActionDescriptor(ClearEditorHistoryAction, ClearEditorHistoryAction.ID, ClearEditorHistoryAction.LABEL), 'Clear Editor History'); registry.registerWorkbenchAction(new SyncActionDescriptor(RevertAndCloseEditorAction, RevertAndCloseEditorAction.ID, RevertAndCloseEditorAction.LABEL), 'View: Revert and Close Editor', category); +// Register Editor Picker Actions including quick navigate support +const openNextEditorKeybinding = { primary: KeyMod.CtrlCmd | KeyCode.Tab, mac: { primary: KeyMod.WinCtrl | KeyCode.Tab } }; +const openPreviousEditorKeybinding = { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Tab, mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.Tab } }; +registry.registerWorkbenchAction(new SyncActionDescriptor(OpenNextRecentlyUsedEditorInGroupAction, OpenNextRecentlyUsedEditorInGroupAction.ID, OpenNextRecentlyUsedEditorInGroupAction.LABEL, openNextEditorKeybinding), 'Open Next Recently Used Editor in Group'); +registry.registerWorkbenchAction(new SyncActionDescriptor(OpenPreviousRecentlyUsedEditorInGroupAction, OpenPreviousRecentlyUsedEditorInGroupAction.ID, OpenPreviousRecentlyUsedEditorInGroupAction.LABEL, openPreviousEditorKeybinding), 'Open Previous Recently Used Editor in Group'); + +const quickOpenNavigateNextInEditorPickerId = 'workbench.action.quickOpenNavigateNextInEditorPicker'; +KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: quickOpenNavigateNextInEditorPickerId, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(50), + handler: getQuickNavigateHandler(quickOpenNavigateNextInEditorPickerId, true), + when: editorPickerContext, + primary: openNextEditorKeybinding.primary, + mac: openNextEditorKeybinding.mac +}); + +const quickOpenNavigatePreviousInEditorPickerId = 'workbench.action.quickOpenNavigatePreviousInEditorPicker'; +KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: quickOpenNavigatePreviousInEditorPickerId, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(50), + handler: getQuickNavigateHandler(quickOpenNavigatePreviousInEditorPickerId, false), + when: editorPickerContext, + primary: openPreviousEditorKeybinding.primary, + mac: openPreviousEditorKeybinding.mac +}); + + // Editor Commands editorCommands.setup(); \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/editor/editorActions.ts b/src/vs/workbench/browser/parts/editor/editorActions.ts index 4419e71028327..29cf34bc07c99 100644 --- a/src/vs/workbench/browser/parts/editor/editorActions.ts +++ b/src/vs/workbench/browser/parts/editor/editorActions.ts @@ -15,8 +15,7 @@ import { EditorQuickOpenEntry, EditorQuickOpenEntryGroup, IEditorQuickOpenEntry, import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; import { IPartService } from 'vs/workbench/services/part/common/partService'; -import { Position, IEditor, Direction, IResourceInput, IEditorInput, POSITIONS } from 'vs/platform/editor/common/editor'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { Position, IEditor, Direction, IResourceInput, IEditorInput } from 'vs/platform/editor/common/editor'; import { IHistoryService } from 'vs/workbench/services/history/common/history'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IEditorGroupService, GroupArrangement } from 'vs/workbench/services/group/common/groupService'; @@ -60,8 +59,7 @@ export class SplitEditorAction extends Action { let options: EditorOptions; const codeEditor = getCodeEditor(editorToSplit); if (codeEditor) { - options = new TextEditorOptions(); - (options).fromEditor(codeEditor); + options = TextEditorOptions.fromEditor(codeEditor); } else { options = new EditorOptions(); } @@ -317,9 +315,7 @@ export abstract class BaseFocusSideGroupAction extends Action { let options: EditorOptions; const codeEditor = getCodeEditor(referenceEditor); if (codeEditor) { - options = new TextEditorOptions(); - options.pinned = true; - (options).fromEditor(codeEditor); + options = TextEditorOptions.fromEditor(codeEditor, { pinned: true }); } else { options = EditorOptions.create({ pinned: true }); } @@ -417,19 +413,17 @@ export class FocusPreviousGroup extends Action { return TPromise.as(true); } + const stacks = this.editorGroupService.getStacksModel(); + const groupCount = stacks.groups.length; - // Find the next position to the left/top - let nextPosition: Position = Position.ONE; - if (activeEditor.position === Position.THREE) { - nextPosition = Position.TWO; - } else if (activeEditor.position === Position.ONE) { - // Get the last active position - const lastPosition = this.editorGroupService.getStacksModel().groups.length - 1; - nextPosition = lastPosition; + // Nothing to do if the only group + if (groupCount === 1) { + return TPromise.as(true); } - // Focus next position if provided - this.editorGroupService.focusGroup(nextPosition); + // Nevigate to the previous group or to the last group if the first group is active + const newPositionIndex = (activeEditor.position + groupCount - 1) % groupCount; + this.editorGroupService.focusGroup(newPositionIndex); return TPromise.as(true); } @@ -440,42 +434,35 @@ export class FocusNextGroup extends Action { public static ID = 'workbench.action.focusNextGroup'; public static LABEL = nls.localize('focusNextGroup', "Focus Next Group"); - private navigateActions: Action[]; - constructor( id: string, label: string, - @IWorkbenchEditorService private editorService: IWorkbenchEditorService, - @IInstantiationService instantiationService: IInstantiationService + @IEditorGroupService private editorGroupService: IEditorGroupService, + @IWorkbenchEditorService private editorService: IWorkbenchEditorService ) { super(id, label); - - this.navigateActions = []; - this.navigateActions[Position.ONE] = instantiationService.createInstance(FocusFirstGroupAction, FocusFirstGroupAction.ID, FocusFirstGroupAction.LABEL); - this.navigateActions[Position.TWO] = instantiationService.createInstance(FocusSecondGroupAction, FocusSecondGroupAction.ID, FocusSecondGroupAction.LABEL); - this.navigateActions[Position.THREE] = instantiationService.createInstance(FocusThirdGroupAction, FocusThirdGroupAction.ID, FocusThirdGroupAction.LABEL); } public run(event?: any): TPromise { - // Find the next position to the right/bottom to use - let nextPosition: Position; const activeEditor = this.editorService.getActiveEditor(); - const lastPosition = POSITIONS[POSITIONS.length - 1]; - if (!activeEditor || activeEditor.position === lastPosition) { - nextPosition = Position.ONE; - } else if (activeEditor.position === Position.ONE) { - nextPosition = Position.TWO; - } else if (activeEditor.position === Position.TWO) { - nextPosition = Position.THREE; + if (!activeEditor) { + return TPromise.as(true); } - // Run the action for the target next position - if (typeof nextPosition === 'number' && this.navigateActions[nextPosition]) { - return this.navigateActions[nextPosition].run(event); + const stacks = this.editorGroupService.getStacksModel(); + const groupCount = stacks.groups.length; + + // Nowhere to switch if the only group + if (groupCount === 1) { + return TPromise.as(true); } + // Nevigate to the next group or to the first group if the last group is active + const newPositionIndex = (activeEditor.position + 1) % groupCount; + this.editorGroupService.focusGroup(newPositionIndex); + return TPromise.as(true); } } @@ -630,7 +617,7 @@ export class CloseLeftEditorsInGroupAction extends Action { public run(context?: IEditorContext): TPromise { const editor = getTarget(this.editorService, this.groupService, context); if (editor) { - return this.editorService.closeEditors(editor.position, editor.input, Direction.LEFT); + return this.editorService.closeEditors(editor.position, { except: editor.input, direction: Direction.LEFT }); } return TPromise.as(false); @@ -654,7 +641,7 @@ export class CloseRightEditorsInGroupAction extends Action { public run(context?: IEditorContext): TPromise { const editor = getTarget(this.editorService, this.groupService, context); if (editor) { - return this.editorService.closeEditors(editor.position, editor.input, Direction.RIGHT); + return this.editorService.closeEditors(editor.position, { except: editor.input, direction: Direction.RIGHT }); } return TPromise.as(false); @@ -704,6 +691,39 @@ export class CloseAllEditorsAction extends Action { } } +export class CloseUnmodifiedEditorsInGroupAction extends Action { + + public static ID = 'workbench.action.closeUnmodifiedEditors'; + public static LABEL = nls.localize('closeUnmodifiedEditors', "Close Unmodified Editors in Group"); + + constructor( + id: string, + label: string, + @IEditorGroupService private editorGroupService: IEditorGroupService, + @IWorkbenchEditorService private editorService: IWorkbenchEditorService + ) { + super(id, label); + } + + public run(context?: IEditorContext): TPromise { + let position = context ? this.editorGroupService.getStacksModel().positionOfGroup(context.group) : null; + + // If position is not passed in take the position of the active editor. + if (typeof position !== 'number') { + const active = this.editorService.getActiveEditor(); + if (active) { + position = active.position; + } + } + + if (typeof position === 'number') { + return this.editorService.closeEditors(position, { unmodifiedOnly: true }); + } + + return TPromise.as(false); + } +} + export class CloseEditorsInOtherGroupsAction extends Action { public static ID = 'workbench.action.closeEditorsInOtherGroups'; @@ -761,7 +781,7 @@ export class CloseOtherEditorsInGroupAction extends Action { } if (typeof position === 'number' && input) { - return this.editorService.closeEditors(position, input); + return this.editorService.closeEditors(position, { except: input }); } return TPromise.as(false); diff --git a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts index 7a54896285ab5..4bc4a3b143a7d 100644 --- a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts +++ b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts @@ -35,7 +35,8 @@ import { IWindowService } from 'vs/platform/windows/common/windows'; import { getCodeEditor } from 'vs/editor/common/services/codeEditorService'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { editorBackground, contrastBorder, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; -import { Themable, TABS_CONTAINER_BACKGROUND, EDITOR_GROUP_HEADER_BACKGROUND, EDITOR_GROUP_BORDER_COLOR, EDITOR_DRAG_AND_DROP_BACKGROUND, EDITOR_GROUP_BACKGROUND } from 'vs/workbench/common/theme'; +import { Themable, EDITOR_GROUP_HEADER_TABS_BACKGROUND, EDITOR_GROUP_HEADER_NO_TABS_BACKGROUND, EDITOR_GROUP_BORDER, EDITOR_DRAG_AND_DROP_BACKGROUND, EDITOR_GROUP_BACKGROUND, EDITOR_GROUP_HEADER_TABS_BORDER } from 'vs/workbench/common/theme'; +import { attachProgressBarStyler } from 'vs/platform/theme/common/styler'; export enum Rochade { NONE, @@ -991,6 +992,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro // Progress Bar const progressBar = new ProgressBar($(container)); + this.toUnbind.push(attachProgressBarStyler(progressBar, this.themeService)); progressBar.getContainer().hide(); container.setProperty(EditorGroupsControl.PROGRESS_BAR_CONTROL_KEY, progressBar); // associate with container }); @@ -1009,19 +1011,19 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro silo.style('background-color', this.getColor(editorBackground)); // Border - silo.style('border-left-color', index > Position.ONE ? (this.getColor(contrastBorder) || this.getColor(EDITOR_GROUP_BORDER_COLOR)) : null); - silo.style('border-top-color', index > Position.ONE ? (this.getColor(contrastBorder) || this.getColor(EDITOR_GROUP_BORDER_COLOR)) : null); + silo.style('border-left-color', index > Position.ONE ? (this.getColor(EDITOR_GROUP_BORDER) || this.getColor(contrastBorder)) : null); + silo.style('border-top-color', index > Position.ONE ? (this.getColor(EDITOR_GROUP_BORDER) || this.getColor(contrastBorder)) : null); }); // Title control POSITIONS.forEach(position => { const container = this.getTitleAreaControl(position).getContainer(); - const hcBorder = this.getColor(contrastBorder); + const borderColor = this.getColor(EDITOR_GROUP_HEADER_TABS_BORDER) || this.getColor(contrastBorder); - container.style.backgroundColor = this.getColor(this.tabOptions.showTabs ? TABS_CONTAINER_BACKGROUND : EDITOR_GROUP_HEADER_BACKGROUND); - container.style.borderBottomWidth = (hcBorder && this.tabOptions.showTabs) ? '1px' : null; - container.style.borderBottomStyle = (hcBorder && this.tabOptions.showTabs) ? 'solid' : null; - container.style.borderBottomColor = this.tabOptions.showTabs ? hcBorder : null; + container.style.backgroundColor = this.getColor(this.tabOptions.showTabs ? EDITOR_GROUP_HEADER_TABS_BACKGROUND : EDITOR_GROUP_HEADER_NO_TABS_BACKGROUND); + container.style.borderBottomWidth = (borderColor && this.tabOptions.showTabs) ? '1px' : null; + container.style.borderBottomStyle = (borderColor && this.tabOptions.showTabs) ? 'solid' : null; + container.style.borderBottomColor = this.tabOptions.showTabs ? borderColor : null; }); } @@ -1052,8 +1054,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro const activeEditor = $this.editorService.getActiveEditor(); const editor = getCodeEditor(activeEditor); if (editor && activeEditor.position === stacks.positionOfGroup(identifier.group) && identifier.editor.matches(activeEditor.input)) { - options = TextEditorOptions.create({ pinned: true }); - (options).fromEditor(editor); + options = TextEditorOptions.fromEditor(editor, { pinned: true }); } return options; @@ -1226,15 +1227,15 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro const containers = $this.visibleEditors.filter(e => !!e).map(e => e.getContainer()); containers.forEach((container, index) => { if (container && DOM.isAncestor(target, container.getHTMLElement())) { - const hcOutline = $this.getColor(activeContrastBorder); + const activeContrastBorderColor = $this.getColor(activeContrastBorder); overlay = $('div').style({ top: $this.tabOptions.showTabs ? `${EditorGroupsControl.EDITOR_TITLE_HEIGHT}px` : 0, height: $this.tabOptions.showTabs ? `calc(100% - ${EditorGroupsControl.EDITOR_TITLE_HEIGHT}px` : '100%', backgroundColor: $this.getColor(EDITOR_DRAG_AND_DROP_BACKGROUND), - outlineColor: hcOutline, - outlineOffset: hcOutline ? '-2px' : null, - outlineStyle: hcOutline ? 'dashed' : null, - outlineWidth: hcOutline ? '2px' : null + outlineColor: activeContrastBorderColor, + outlineOffset: activeContrastBorderColor ? '-2px' : null, + outlineStyle: activeContrastBorderColor ? 'dashed' : null, + outlineWidth: activeContrastBorderColor ? '2px' : null }).id(overlayId); overlay.appendTo(container); @@ -1282,8 +1283,14 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro // Drag enter let counter = 0; // see https://github.com/Microsoft/vscode/issues/14470 this.toUnbind.push(DOM.addDisposableListener(node, DOM.EventType.DRAG_ENTER, (e: DragEvent) => { - if (!TitleControl.getDraggedEditor() && !extractResources(e).length) { - return; // invalid DND + if (!TitleControl.getDraggedEditor()) { + // we used to check for the dragged resources here (via dnd.extractResources()) but this + // seems to be not possible on Linux and Windows where during DRAG_ENTER the resources + // are always undefined up until they are dropped when dragged from the tree. The workaround + // is to check for a datatransfer type being set. See https://github.com/Microsoft/vscode/issues/25789 + if (!e.dataTransfer.types.length) { + return; // invalid DND + } } counter++; @@ -1549,7 +1556,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro if (isDragging) { this.parent.addClass('dragging'); silo.addClass('dragging'); - borderColor = (this.getColor(contrastBorder) || this.getColor(EDITOR_GROUP_BORDER_COLOR)); + borderColor = this.getColor(EDITOR_GROUP_BORDER) || this.getColor(contrastBorder); } else { this.parent.removeClass('dragging'); silo.removeClass('dragging'); @@ -1569,11 +1576,11 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro const background = this.getColor(isDropping ? EDITOR_DRAG_AND_DROP_BACKGROUND : groupCount > 0 ? EDITOR_GROUP_BACKGROUND : null); element.style.backgroundColor = background; - const hcOutline = this.getColor(activeContrastBorder); - element.style.outlineColor = isDropping ? hcOutline : null; - element.style.outlineStyle = isDropping && hcOutline ? 'dashed' : null; - element.style.outlineWidth = isDropping && hcOutline ? '2px' : null; - element.style.outlineOffset = isDropping && hcOutline ? '-2px' : null; + const activeContrastBorderColor = this.getColor(activeContrastBorder); + element.style.outlineColor = isDropping ? activeContrastBorderColor : null; + element.style.outlineStyle = isDropping && activeContrastBorderColor ? 'dashed' : null; + element.style.outlineWidth = isDropping && activeContrastBorderColor ? '2px' : null; + element.style.outlineOffset = isDropping && activeContrastBorderColor ? '-2px' : null; } private posSilo(pos: number, leftTop: string | number, rightBottom?: string | number, borderLeftTopWidth?: string | number): void { diff --git a/src/vs/workbench/browser/parts/editor/editorPart.ts b/src/vs/workbench/browser/parts/editor/editorPart.ts index 95bee54792410..697f0dcfe3c12 100644 --- a/src/vs/workbench/browser/parts/editor/editorPart.ts +++ b/src/vs/workbench/browser/parts/editor/editorPart.ts @@ -8,7 +8,7 @@ import 'vs/css!./media/editorpart'; import 'vs/workbench/browser/parts/editor/editor.contribution'; import { TPromise } from 'vs/base/common/winjs.base'; -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import { Dimension, Builder, $ } from 'vs/base/browser/builder'; import nls = require('vs/nls'); import strings = require('vs/base/common/strings'); @@ -35,7 +35,7 @@ import { ServiceCollection } from 'vs/platform/instantiation/common/serviceColle import { IMessageService, IMessageWithAction, Severity } from 'vs/platform/message/common/message'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IProgressService } from 'vs/platform/progress/common/progress'; -import { EditorStacksModel, EditorGroup, EditorIdentifier, GroupEvent } from 'vs/workbench/common/editor/editorStacksModel'; +import { EditorStacksModel, EditorGroup, EditorIdentifier, EditorCloseEvent } from 'vs/workbench/common/editor/editorStacksModel'; import Event, { Emitter } from 'vs/base/common/event'; import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IThemeService } from 'vs/platform/theme/common/themeService'; @@ -86,7 +86,7 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService private dimension: Dimension; private editorGroupsControl: IEditorGroupsControl; - private memento: any; + private memento: object; private stacks: EditorStacksModel; private tabOptions: ITabOptions; private forceHideTabs: boolean; @@ -182,7 +182,7 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService this.toUnbind.push(this.stacks.onEditorClosed(event => this.onEditorClosed(event))); this.toUnbind.push(this.stacks.onGroupOpened(event => this.onEditorGroupOpenedOrClosed())); this.toUnbind.push(this.stacks.onGroupClosed(event => this.onEditorGroupOpenedOrClosed())); - this.toUnbind.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated(e.config))); + this.toUnbind.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated(this.configurationService.getConfiguration()))); } private onEditorGroupOpenedOrClosed(): void { @@ -234,7 +234,7 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService this.telemetryService.publicLog('editorOpened', identifier.editor.getTelemetryDescriptor()); } - private onEditorClosed(event: GroupEvent): void { + private onEditorClosed(event: EditorCloseEvent): void { this.telemetryService.publicLog('editorClosed', event.editor.getTelemetryDescriptor()); } @@ -361,7 +361,7 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService // Hide active one first if (editorAtPosition) { - this.doHideEditor(position, false); + this.doHideEditor(editorAtPosition, position, false); } // Create Editor @@ -441,22 +441,18 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService const editorInstantiationService = this.editorGroupsControl.getInstantiationService(position).createChild(new ServiceCollection([IProgressService, progressService])); let loaded = false; - const onInstantiate = (arg: BaseEditor | Error): TPromise => { + const onInstantiate = (arg: BaseEditor): TPromise => { const position = this.stacks.positionOfGroup(group); // might have changed due to a rochade meanwhile loaded = true; delete this.mapEditorInstantiationPromiseToEditor[position][descriptor.getId()]; - if (arg instanceof BaseEditor) { - this.instantiatedEditors[position].push(arg); + this.instantiatedEditors[position].push(arg); - return TPromise.as(arg); - } - - return TPromise.wrapError(arg); + return TPromise.as(arg); }; - const instantiateEditorPromise = editorInstantiationService.createInstance(descriptor).then(onInstantiate, onInstantiate); + const instantiateEditorPromise = editorInstantiationService.createInstance(descriptor).then(onInstantiate); if (!loaded) { this.mapEditorInstantiationPromiseToEditor[position][descriptor.getId()] = instantiateEditorPromise; @@ -464,6 +460,7 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService return instantiateEditorPromise.then(result => { progressService.dispose(); + return result; }); } @@ -595,8 +592,11 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService // Update stacks model this.modifyGroups(() => this.stacks.closeGroup(group)); - // Hide Editor - this.doHideEditor(position, true); + // Hide Editor if there is one + const editor = this.visibleEditors[position]; + if (editor) { + this.doHideEditor(editor, position, true); + } // Emit Change Event this._onEditorsChanged.fire(); @@ -616,8 +616,7 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService } } - private doHideEditor(position: Position, layoutAndRochade: boolean): void { - const editor = this.visibleEditors[position]; + private doHideEditor(editor: BaseEditor, position: Position, layoutAndRochade: boolean): void { // Hide in side by side control const rochade = this.editorGroupsControl.hide(editor, position, layoutAndRochade); @@ -668,18 +667,23 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService }); } - public closeEditors(position: Position, except?: EditorInput, direction?: Direction): TPromise { + public closeEditors(position: Position, filter: { except?: EditorInput, direction?: Direction, unmodifiedOnly?: boolean } = Object.create(null)): TPromise { const group = this.stacks.groupAt(position); if (!group) { return TPromise.as(null); } + let editors = group.getEditors(); + if (filter.unmodifiedOnly) { + editors = editors.filter(e => !e.isDirty()); + } + // Check for dirty and veto let editorsToClose: EditorInput[]; - if (types.isUndefinedOrNull(direction)) { - editorsToClose = group.getEditors().filter(e => !except || !e.matches(except)); + if (types.isUndefinedOrNull(filter.direction)) { + editorsToClose = editors.filter(e => !filter.except || !e.matches(filter.except)); } else { - editorsToClose = (direction === Direction.LEFT) ? group.getEditors().slice(0, group.indexOf(except)) : group.getEditors().slice(group.indexOf(except) + 1); + editorsToClose = (filter.direction === Direction.LEFT) ? editors.slice(0, group.indexOf(filter.except)) : editors.slice(group.indexOf(filter.except) + 1); } return this.handleDirty(editorsToClose.map(editor => { return { group, editor }; }), true /* ignore if opened in other group */).then(veto => { @@ -687,14 +691,26 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService return; } - this.doCloseEditors(group, except, direction); + this.doCloseEditors(group, filter); }); } - private doCloseEditors(group: EditorGroup, except?: EditorInput, direction?: Direction): void { + private doCloseEditors(group: EditorGroup, filter: { except?: EditorInput, direction?: Direction, unmodifiedOnly?: boolean } = Object.create(null)): void { + + // Close all editors if there is no editor to except and + // we either are not only closing unmodified editors or + // there are no dirty editors. + let closeAllEditors = false; + if (!filter.except) { + if (!filter.unmodifiedOnly) { + closeAllEditors = true; + } else { + closeAllEditors = !group.getEditors().some(e => e.isDirty()); + } + } // Close all editors in group - if (!except) { + if (closeAllEditors) { // Update stacks model: remove all non active editors first to prevent opening the next editor in group group.closeEditors(group.activeEditor); @@ -703,23 +719,42 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService this.doCloseActiveEditor(group); } + // Close unmodified editors in group + else if (filter.unmodifiedOnly) { + + // We can just close all unmodified editors around the currently active dirty one + if (group.activeEditor.isDirty()) { + group.getEditors().filter(editor => !editor.isDirty() && !editor.matches(filter.except)).forEach(editor => this.doCloseInactiveEditor(group, editor)); + } + + // Active editor is also a candidate to close, thus we make the first dirty editor + // active and then close the other ones + else { + const firstDirtyEditor = group.getEditors().filter(editor => editor.isDirty())[0]; + + this.openEditor(firstDirtyEditor, null, this.stacks.positionOfGroup(group)).done(() => { + this.doCloseEditors(group, filter); + }, errors.onUnexpectedError); + } + } + // Close all editors in group except active one - else if (except.matches(group.activeEditor)) { + else if (filter.except && filter.except.matches(group.activeEditor)) { // Update stacks model: close non active editors supporting the direction - group.closeEditors(group.activeEditor, direction); + group.closeEditors(group.activeEditor, filter.direction); } // Finally: we are asked to close editors around a non-active editor // Thus we make the non-active one active and then close the others else { - this.openEditor(except, null, this.stacks.positionOfGroup(group)).done(() => { + this.openEditor(filter.except, null, this.stacks.positionOfGroup(group)).done(() => { // since the opening might have failed, we have to check again for the active editor // being the expected one, otherwise we end up in an endless loop trying to open the // editor - if (except.matches(group.activeEditor)) { - this.doCloseEditors(group, except, direction); + if (filter.except.matches(group.activeEditor)) { + this.doCloseEditors(group, filter); } }, errors.onUnexpectedError); } @@ -878,8 +913,7 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService const activeEditor = this.getActiveEditor(); const codeEditor = getCodeEditor(activeEditor); if (codeEditor && activeEditor.position === this.stacks.positionOfGroup(fromGroup) && input.matches(activeEditor.input)) { - options = TextEditorOptions.create({ pinned: true, index, inactive, preserveFocus }); - (options).fromEditor(codeEditor); + options = TextEditorOptions.fromEditor(codeEditor, { pinned: true, index, inactive, preserveFocus }); } // A move to another group is an open first... @@ -1032,6 +1066,10 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService return this.doOpenEditors(editors, activePosition, ratio); } + public hasEditorsToRestore(): boolean { + return this.stacks.groups.some(g => g.count > 0); + } + public restoreEditors(): TPromise { const editors = this.stacks.groups.map((group, index) => { return { @@ -1250,7 +1288,11 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService // Persist UI State const editorState: IEditorPartUIState = { ratio: this.editorGroupsControl.getRatio(), groupOrientation: this.editorGroupsControl.getGroupOrientation() }; - this.memento[EditorPart.EDITOR_PART_UI_STATE_STORAGE_KEY] = editorState; + if (editorState.ratio.length || editorState.groupOrientation !== 'vertical') { + this.memento[EditorPart.EDITOR_PART_UI_STATE_STORAGE_KEY] = editorState; + } else { + delete this.memento[EditorPart.EDITOR_PART_UI_STATE_STORAGE_KEY]; + } // Unload all Instantiated Editors for (let i = 0; i < this.instantiatedEditors.length; i++) { diff --git a/src/vs/workbench/browser/parts/editor/editorPicker.ts b/src/vs/workbench/browser/parts/editor/editorPicker.ts index 4fc02ffaf0cb0..4e73f77bb1564 100644 --- a/src/vs/workbench/browser/parts/editor/editorPicker.ts +++ b/src/vs/workbench/browser/parts/editor/editorPicker.ts @@ -12,7 +12,7 @@ import URI from 'vs/base/common/uri'; import errors = require('vs/base/common/errors'); import strings = require('vs/base/common/strings'); import { IIconLabelOptions } from 'vs/base/browser/ui/iconLabel/iconLabel'; -import { IAutoFocus, Mode, IEntryRunContext, IQuickNavigateConfiguration } from 'vs/base/parts/quickopen/common/quickOpen'; +import { IAutoFocus, Mode, IEntryRunContext, IQuickNavigateConfiguration, IModel } from 'vs/base/parts/quickopen/common/quickOpen'; import { QuickOpenModel, QuickOpenEntry, QuickOpenEntryGroup } from 'vs/base/parts/quickopen/browser/quickOpenModel'; import scorer = require('vs/base/common/scorer'); import { IModeService } from 'vs/editor/common/services/modeService'; @@ -185,8 +185,8 @@ export abstract class EditorGroupPicker extends BaseEditorPicker { return nls.localize('noOpenedEditors', "List of opened editors is currently empty in group"); } - public getAutoFocus(searchValue: string, quickNavigateConfiguration: IQuickNavigateConfiguration): IAutoFocus { - if (searchValue || !quickNavigateConfiguration) { + public getAutoFocus(searchValue: string, context: { model: IModel, quickNavigateConfiguration?: IQuickNavigateConfiguration }): IAutoFocus { + if (searchValue || !context.quickNavigateConfiguration) { return { autoFocusFirstEntry: true }; @@ -195,10 +195,16 @@ export abstract class EditorGroupPicker extends BaseEditorPicker { const stacks = this.editorGroupService.getStacksModel(); const group = stacks.groupAt(this.getPosition()); if (!group) { - return super.getAutoFocus(searchValue); + return super.getAutoFocus(searchValue, context); } - const isShiftNavigate = (quickNavigateConfiguration && quickNavigateConfiguration.keybindings.some(k => !k.isChord() && k.hasShiftModifier())); + const isShiftNavigate = (context.quickNavigateConfiguration && context.quickNavigateConfiguration.keybindings.some(k => { + const [firstPart, chordPart] = k.getParts(); + if (chordPart) { + return false; + } + return firstPart.shiftKey; + })); if (isShiftNavigate) { return { autoFocusLastEntry: true @@ -256,13 +262,13 @@ export class AllEditorsPicker extends BaseEditorPicker { return nls.localize('noOpenedEditorsAllGroups', "List of opened editors is currently empty"); } - public getAutoFocus(searchValue: string): IAutoFocus { + public getAutoFocus(searchValue: string, context: { model: IModel, quickNavigateConfiguration?: IQuickNavigateConfiguration }): IAutoFocus { if (searchValue) { return { autoFocusFirstEntry: true }; } - return super.getAutoFocus(searchValue); + return super.getAutoFocus(searchValue, context); } } \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/editor/editorStatus.ts b/src/vs/workbench/browser/parts/editor/editorStatus.ts index b7fcf752dbabf..bc58535efbdcf 100644 --- a/src/vs/workbench/browser/parts/editor/editorStatus.ts +++ b/src/vs/workbench/browser/parts/editor/editorStatus.ts @@ -16,12 +16,11 @@ import uri from 'vs/base/common/uri'; import errors = require('vs/base/common/errors'); import { IStatusbarItem } from 'vs/workbench/browser/parts/statusbar/statusbar'; import { Action } from 'vs/base/common/actions'; -import { language, LANGUAGE_DEFAULT } from 'vs/base/common/platform'; +import { language, LANGUAGE_DEFAULT, AccessibilitySupport } from 'vs/base/common/platform'; import { IMode } from 'vs/editor/common/modes'; import { UntitledEditorInput } from 'vs/workbench/common/editor/untitledEditorInput'; import { IFileEditorInput, EncodingMode, IEncodingSupport, toResource, SideBySideEditorInput } from 'vs/workbench/common/editor'; import { IDisposable, combinedDisposable, dispose } from 'vs/base/common/lifecycle'; -import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { IConfigurationEditingService, ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; import { IEditorAction, ICommonCodeEditor, EndOfLineSequence, IModel } from 'vs/editor/common/editorCommon'; @@ -34,7 +33,7 @@ import { IEditor as IBaseEditor, IEditorInput } from 'vs/platform/editor/common/ import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IQuickOpenService, IPickOpenEntry, IFilePickOpenEntry } from 'vs/platform/quickOpen/common/quickOpen'; import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration'; -import { IFilesConfiguration, SUPPORTED_ENCODINGS, IFileService } from 'vs/platform/files/common/files'; +import { SUPPORTED_ENCODINGS, IFileService } from 'vs/platform/files/common/files'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IModeService } from 'vs/editor/common/services/modeService'; import { IModelService } from 'vs/editor/common/services/modelService'; @@ -45,8 +44,12 @@ import { ICommandService } from 'vs/platform/commands/common/commands'; import { IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { getCodeEditor as getEditorWidget } from 'vs/editor/common/services/codeEditorService'; -import { IPreferencesService } from 'vs/workbench/parts/preferences/common/preferences'; import { ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; +import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; + +// TODO@Sandeep layer breaker +// tslint:disable-next-line:import-patterns +import { IPreferencesService } from 'vs/workbench/parts/preferences/common/preferences'; function toEditorWithEncodingSupport(input: IEditorInput): IEncodingSupport { if (input instanceof SideBySideEditorInput) { @@ -79,6 +82,7 @@ class StateChange { encoding: boolean; EOL: boolean; tabFocusMode: boolean; + screenReaderMode: boolean; metadata: boolean; constructor() { @@ -88,6 +92,7 @@ class StateChange { this.encoding = false; this.EOL = false; this.tabFocusMode = false; + this.screenReaderMode = false; this.metadata = false; } @@ -98,6 +103,7 @@ class StateChange { this.encoding = this.encoding || other.encoding; this.EOL = this.EOL || other.EOL; this.tabFocusMode = this.tabFocusMode || other.tabFocusMode; + this.screenReaderMode = this.screenReaderMode || other.screenReaderMode; this.metadata = this.metadata || other.metadata; } } @@ -109,6 +115,7 @@ interface StateDelta { EOL?: string; indentation?: string; tabFocusMode?: boolean; + screenReaderMode?: boolean; metadata?: string; } @@ -131,6 +138,9 @@ class State { private _tabFocusMode: boolean; public get tabFocusMode(): boolean { return this._tabFocusMode; } + private _screenReaderMode: boolean; + public get screenReaderMode(): boolean { return this._screenReaderMode; } + private _metadata: string; public get metadata(): string { return this._metadata; } @@ -140,6 +150,7 @@ class State { this._encoding = null; this._EOL = null; this._tabFocusMode = false; + this._screenReaderMode = false; this._metadata = null; } @@ -189,6 +200,13 @@ class State { e.tabFocusMode = true; } } + if (typeof update.screenReaderMode !== 'undefined') { + if (this._screenReaderMode !== update.screenReaderMode) { + this._screenReaderMode = update.screenReaderMode; + somethingChanged = true; + e.screenReaderMode = true; + } + } if (typeof update.metadata !== 'undefined') { if (this._metadata !== update.metadata) { this._metadata = update.metadata; @@ -210,7 +228,9 @@ const nlsMultiSelectionRange = nls.localize('multiSelectionRange', "{0} selectio const nlsMultiSelection = nls.localize('multiSelection', "{0} selections"); const nlsEOLLF = nls.localize('endOfLineLineFeed', "LF"); const nlsEOLCRLF = nls.localize('endOfLineCarriageReturnLineFeed', "CRLF"); -const nlsTabFocusMode = nls.localize('tabFocusModeEnabled', "Tab moves focus"); +const nlsTabFocusMode = nls.localize('tabFocusModeEnabled', "Tab Moves Focus"); +const nlsScreenReaderDetected = nls.localize('screenReaderDetected', "Screen Reader Detected"); +const nlsScreenReaderDetectedTitle = nls.localize('screenReaderDetectedExtra', "If you are not using a Screen Reader, please change the setting `editor.accessibilitySupport` to \"off\"."); function _setDisplay(el: HTMLElement, desiredValue: string): void { if (el.style.display !== desiredValue) { @@ -229,6 +249,7 @@ export class EditorStatus implements IStatusbarItem { private state: State; private element: HTMLElement; private tabFocusModeElement: HTMLElement; + private screenRedearModeElement: HTMLElement; private indentationElement: HTMLElement; private selectionElement: HTMLElement; private encodingElement: HTMLElement; @@ -263,6 +284,11 @@ export class EditorStatus implements IStatusbarItem { this.tabFocusModeElement.textContent = nlsTabFocusMode; hide(this.tabFocusModeElement); + this.screenRedearModeElement = append(this.element, $('a.editor-status-screenreadermode.status-bar-info')); + this.screenRedearModeElement.textContent = nlsScreenReaderDetected; + this.screenRedearModeElement.title = nlsScreenReaderDetectedTitle; + hide(this.screenRedearModeElement); + this.selectionElement = append(this.element, $('a.editor-status-selection')); this.selectionElement.title = nls.localize('gotoLine', "Go to Line"); this.selectionElement.onclick = () => this.onSelectionClick(); @@ -307,7 +333,7 @@ export class EditorStatus implements IStatusbarItem { this.editorGroupService.onEditorsChanged(() => this.onEditorsChanged()), this.untitledEditorService.onDidChangeEncoding(r => this.onResourceEncodingChange(r)), this.textFileService.models.onModelEncodingChanged(e => this.onResourceEncodingChange(e.resource)), - TabFocus.onDidChangeTabFocus(e => this.onTabFocusModeChange()) + TabFocus.onDidChangeTabFocus(e => this.onTabFocusModeChange()), ); return combinedDisposable(this.toDispose); @@ -342,6 +368,14 @@ export class EditorStatus implements IStatusbarItem { } } + if (changed.screenReaderMode) { + if (this.state.screenReaderMode && this.state.screenReaderMode === true) { + show(this.screenRedearModeElement); + } else { + hide(this.screenRedearModeElement); + } + } + if (changed.indentation) { if (this.state.indentation) { this.indentationElement.textContent = this.state.indentation; @@ -352,7 +386,7 @@ export class EditorStatus implements IStatusbarItem { } if (changed.selectionStatus) { - if (this.state.selectionStatus) { + if (this.state.selectionStatus && !this.state.screenReaderMode) { this.selectionElement.textContent = this.state.selectionStatus; show(this.selectionElement); } else { @@ -461,6 +495,7 @@ export class EditorStatus implements IStatusbarItem { const control = getEditorWidget(activeEditor); // Update all states + this.onScreenReaderModeChange(control); this.onSelectionChange(control); this.onModeChange(control); this.onEOLChange(control); @@ -474,6 +509,13 @@ export class EditorStatus implements IStatusbarItem { // Attach new listeners to active editor if (control) { + // Hook Listener for Configuration changes + this.activeEditorListeners.push(control.onDidChangeConfiguration((event: IConfigurationChangedEvent) => { + if (event.accessibilitySupport) { + this.onScreenReaderModeChange(control); + } + })); + // Hook Listener for Selection changes this.activeEditorListeners.push(control.onDidChangeCursorPosition((event: ICursorPositionChangedEvent) => { this.onSelectionChange(control); @@ -564,6 +606,18 @@ export class EditorStatus implements IStatusbarItem { this.updateState(update); } + private onScreenReaderModeChange(editorWidget: ICommonCodeEditor): void { + let screenReaderMode = false; + + // We only support text based editors + if (editorWidget) { + + screenReaderMode = (editorWidget.getConfiguration().accessibilitySupport === AccessibilitySupport.Enabled); + } + + this.updateState({ screenReaderMode: screenReaderMode }); + } + private onSelectionChange(editorWidget: ICommonCodeEditor): void { const info: IEditorSelectionStatus = {}; @@ -706,7 +760,6 @@ export class ChangeModeAction extends Action { @IModelService private modelService: IModelService, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IConfigurationEditingService private configurationEditingService: IConfigurationEditingService, - @IMessageService private messageService: IMessageService, @IWorkspaceConfigurationService private configurationService: IWorkspaceConfigurationService, @IQuickOpenService private quickOpenService: IQuickOpenService, @IPreferencesService private preferencesService: IPreferencesService, @@ -886,7 +939,7 @@ export class ChangeModeAction extends Action { currentAssociations[associationKey] = language.id; // Write config - this.configurationEditingService.writeConfiguration(target, { key: ChangeModeAction.FILE_ASSOCIATION_KEY, value: currentAssociations }).done(null, (error) => this.messageService.show(Severity.Error, error.toString())); + this.configurationEditingService.writeConfiguration(target, { key: ChangeModeAction.FILE_ASSOCIATION_KEY, value: currentAssociations }); } }); }); @@ -1043,23 +1096,22 @@ export class ChangeEncodingAction extends Action { return pickActionPromise.then(action => { if (!action) { - return undefined; + return void 0; } + const resource = toResource(activeEditor.input, { filter: ['file', 'untitled'], supportSideBySide: true }); + return TPromise.timeout(50 /* quick open is sensitive to being opened so soon after another */) .then(() => { - const resource = toResource(activeEditor.input, { filter: 'file', supportSideBySide: true }); - if (!resource) { - return TPromise.as(null); + if (!resource || resource.scheme !== 'file') { + return TPromise.as(null); // encoding detection only possible for file resources } return this.fileService.resolveContent(resource, { autoGuessEncoding: true, acceptTextOnly: true }).then(content => content.encoding, err => null); }) - .then(guessedEncoding => { - const configuration = this.configurationService.getConfiguration(); - + .then((guessedEncoding: string) => { const isReopenWithEncoding = (action === reopenWithEncodingPick); - const configuredEncoding = configuration && configuration.files && configuration.files.encoding; + const configuredEncoding = this.configurationService.lookup('files.encoding', { resource }).value; let directMatchIndex: number; let aliasMatchIndex: number; diff --git a/src/vs/workbench/browser/parts/editor/media/editorstatus.css b/src/vs/workbench/browser/parts/editor/media/editorstatus.css index 8583a7b150295..b4fd4bdd7d21f 100644 --- a/src/vs/workbench/browser/parts/editor/media/editorstatus.css +++ b/src/vs/workbench/browser/parts/editor/media/editorstatus.css @@ -12,14 +12,13 @@ .monaco-workbench .editor-statusbar-item > .editor-status-eol, .monaco-workbench .editor-statusbar-item > .editor-status-selection, .monaco-workbench .editor-statusbar-item > .editor-status-indentation, -.monaco-workbench .editor-statusbar-item > .editor-status-metadata { +.monaco-workbench .editor-statusbar-item > .editor-status-metadata, +.monaco-workbench .editor-statusbar-item > .editor-status-tabfocusmode, +.monaco-workbench .editor-statusbar-item > .editor-status-screenreadermode { padding: 0 5px 0 5px; } -.monaco-workbench .editor-statusbar-item > .editor-status-metadata { - cursor: default; +.monaco-workbench .editor-statusbar-item > .editor-status-metadata, +.monaco-workbench > .part.statusbar > .statusbar-item > .editor-statusbar-item > a.editor-status-screenreadermode { + cursor: default !important; } - -.monaco-workbench .editor-statusbar-item > .editor-status-tabfocusmode { - padding: 0 5px 0 5px; -} \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts index c27e28629ef33..6814ef611b8b1 100644 --- a/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts @@ -12,7 +12,7 @@ import DOM = require('vs/base/browser/dom'); import { TitleControl } from 'vs/workbench/browser/parts/editor/titleControl'; import { EditorLabel } from 'vs/workbench/browser/labels'; import { Verbosity } from 'vs/platform/editor/common/editor'; -import { TAB_ACTIVE_GROUP_INACTIVE_FOREGROUND, TAB_ACTIVE_GROUP_ACTIVE_FOREGROUND } from 'vs/workbench/common/theme'; +import { TAB_ACTIVE_FOREGROUND, TAB_UNFOCUSED_ACTIVE_FOREGROUND } from 'vs/workbench/common/theme'; export class NoTabsTitleControl extends TitleControl { private titleContainer: HTMLElement; @@ -127,9 +127,9 @@ export class NoTabsTitleControl extends TitleControl { this.editorLabel.setLabel({ name, description, resource }, { title, italic: !isPinned, extraClasses: ['title-label'] }); if (isActive) { - this.editorLabel.element.style.color = this.getColor(TAB_ACTIVE_GROUP_ACTIVE_FOREGROUND); + this.editorLabel.element.style.color = this.getColor(TAB_ACTIVE_FOREGROUND); } else { - this.editorLabel.element.style.color = this.getColor(TAB_ACTIVE_GROUP_INACTIVE_FOREGROUND); + this.editorLabel.element.style.color = this.getColor(TAB_UNFOCUSED_ACTIVE_FOREGROUND); } // Update Editor Actions Toolbar diff --git a/src/vs/workbench/browser/parts/editor/sideBySideEditor.ts b/src/vs/workbench/browser/parts/editor/sideBySideEditor.ts index 34c2f8f68e868..3d5243a8e5e39 100644 --- a/src/vs/workbench/browser/parts/editor/sideBySideEditor.ts +++ b/src/vs/workbench/browser/parts/editor/sideBySideEditor.ts @@ -8,7 +8,7 @@ import * as strings from 'vs/base/common/strings'; import * as DOM from 'vs/base/browser/dom'; import { Dimension, Builder } from 'vs/base/browser/builder'; -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import { IEditorRegistry, Extensions as EditorExtensions, EditorInput, EditorOptions, SideBySideEditorInput } from 'vs/workbench/common/editor'; import { BaseEditor, EditorDescriptor } from 'vs/workbench/browser/parts/editor/baseEditor'; import { IEditorControl, Position, IEditor } from 'vs/platform/editor/common/editor'; @@ -17,7 +17,7 @@ import { VSash } from 'vs/base/browser/ui/sash/sash'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { EDITOR_MASTER_DETAILS_BORDER } from 'vs/workbench/common/theme'; +import { scrollbarShadow } from 'vs/platform/theme/common/colorRegistry'; export class SideBySideEditor extends BaseEditor { @@ -165,7 +165,7 @@ export class SideBySideEditor extends BaseEditor { super.updateStyles(); if (this.masterEditorContainer) { - this.masterEditorContainer.style.boxShadow = `-6px 0 5px -5px ${this.getColor(EDITOR_MASTER_DETAILS_BORDER)}`; + this.masterEditorContainer.style.boxShadow = `-6px 0 5px -5px ${this.getColor(scrollbarShadow)}`; } } diff --git a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts index b708c5a6383fd..f1c850050b4b6 100644 --- a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts @@ -36,11 +36,11 @@ import { IDisposable, dispose, combinedDisposable } from 'vs/base/common/lifecyc import { ScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement'; import { ScrollbarVisibility } from 'vs/base/common/scrollable'; import { extractResources } from 'vs/base/browser/dnd'; -import { LinkedMap } from 'vs/base/common/map'; +import { getOrSet } from 'vs/base/common/map'; import { DelegatingWorkbenchEditorService } from 'vs/workbench/services/editor/browser/editorService'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; -import { TAB_INACTIVE_BACKGROUND, TAB_ACTIVE_BACKGROUND, TAB_ACTIVE_GROUP_ACTIVE_FOREGROUND, TAB_ACTIVE_GROUP_INACTIVE_FOREGROUND, TAB_INACTIVE_GROUP_ACTIVE_FOREGROUND, TAB_INACTIVE_GROUP_INACTIVE_FOREGROUND, TAB_BORDER, EDITOR_DRAG_AND_DROP_BACKGROUND } from 'vs/workbench/common/theme'; +import { TAB_INACTIVE_BACKGROUND, TAB_ACTIVE_BACKGROUND, TAB_ACTIVE_FOREGROUND, TAB_INACTIVE_FOREGROUND, TAB_BORDER, EDITOR_DRAG_AND_DROP_BACKGROUND, TAB_UNFOCUSED_ACTIVE_FOREGROUND, TAB_UNFOCUSED_INACTIVE_FOREGROUND } from 'vs/workbench/common/theme'; import { activeContrastBorder, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; interface IEditorInputLabel { @@ -152,7 +152,6 @@ export class TabsTitleControl extends TitleControl { vertical: ScrollbarVisibility.Hidden, scrollYToX: true, useShadows: false, - canUseTranslate3d: false, horizontalScrollbarSize: 3 }); @@ -212,23 +211,23 @@ export class TabsTitleControl extends TitleControl { private updateDropFeedback(element: HTMLElement, isDND: boolean, index?: number): void { const isTab = (typeof index === 'number'); - const isActiveTab = isTab && this.context.isActive(this.context.getEditor(index)); + const isActiveTab = isTab && this.context && this.context.isActive(this.context.getEditor(index)); // Background const noDNDBackgroundColor = isTab ? this.getColor(isActiveTab ? TAB_ACTIVE_BACKGROUND : TAB_INACTIVE_BACKGROUND) : null; element.style.backgroundColor = isDND ? this.getColor(EDITOR_DRAG_AND_DROP_BACKGROUND) : noDNDBackgroundColor; // Outline - const hcOutline = this.getColor(activeContrastBorder); - if (hcOutline && isDND) { + const activeContrastBorderColor = this.getColor(activeContrastBorder); + if (activeContrastBorderColor && isDND) { element.style.outlineWidth = '2px'; element.style.outlineStyle = 'dashed'; - element.style.outlineColor = hcOutline; + element.style.outlineColor = activeContrastBorderColor; element.style.outlineOffset = isTab ? '-5px' : '-3px'; } else { element.style.outlineWidth = null; element.style.outlineStyle = null; - element.style.outlineColor = hcOutline; + element.style.outlineColor = activeContrastBorderColor; element.style.outlineOffset = null; } } @@ -272,8 +271,8 @@ export class TabsTitleControl extends TitleControl { // Container tabContainer.setAttribute('aria-label', `${name}, tab`); tabContainer.title = title; - tabContainer.style.borderLeftColor = (index !== 0) ? (this.getColor(contrastBorder) || this.getColor(TAB_BORDER)) : null; - tabContainer.style.borderRightColor = (index === editorsOfGroup.length - 1) ? (this.getColor(contrastBorder) || this.getColor(TAB_BORDER)) : null; + tabContainer.style.borderLeftColor = (index !== 0) ? (this.getColor(TAB_BORDER) || this.getColor(contrastBorder)) : null; + tabContainer.style.borderRightColor = (index === editorsOfGroup.length - 1) ? (this.getColor(TAB_BORDER) || this.getColor(contrastBorder)) : null; tabContainer.style.outlineColor = this.getColor(activeContrastBorder); const tabOptions = this.editorGroupService.getTabOptions(); @@ -291,14 +290,14 @@ export class TabsTitleControl extends TitleControl { DOM.addClass(tabContainer, 'active'); tabContainer.setAttribute('aria-selected', 'true'); tabContainer.style.backgroundColor = this.getColor(TAB_ACTIVE_BACKGROUND); - tabLabel.element.style.color = this.getColor(isGroupActive ? TAB_ACTIVE_GROUP_ACTIVE_FOREGROUND : TAB_ACTIVE_GROUP_INACTIVE_FOREGROUND); + tabLabel.element.style.color = this.getColor(isGroupActive ? TAB_ACTIVE_FOREGROUND : TAB_UNFOCUSED_ACTIVE_FOREGROUND); this.activeTab = tabContainer; } else { DOM.removeClass(tabContainer, 'active'); tabContainer.setAttribute('aria-selected', 'false'); tabContainer.style.backgroundColor = this.getColor(TAB_INACTIVE_BACKGROUND); - tabLabel.element.style.color = this.getColor(isGroupActive ? TAB_INACTIVE_GROUP_ACTIVE_FOREGROUND : TAB_INACTIVE_GROUP_INACTIVE_FOREGROUND); + tabLabel.element.style.color = this.getColor(isGroupActive ? TAB_INACTIVE_FOREGROUND : TAB_UNFOCUSED_INACTIVE_FOREGROUND); } // Dirty State @@ -320,8 +319,8 @@ export class TabsTitleControl extends TitleControl { private getUniqueTabLabels(editors: IEditorInput[]): IEditorInputLabel[] { const labels: IEditorInputLabel[] = []; - const mapLabelToDuplicates = new LinkedMap(); - const mapLabelAndDescriptionToDuplicates = new LinkedMap(); + const mapLabelToDuplicates = new Map(); + const mapLabelAndDescriptionToDuplicates = new Map(); // Build labels and descriptions for each editor editors.forEach(editor => { @@ -334,16 +333,15 @@ export class TabsTitleControl extends TitleControl { }; labels.push(item); - mapLabelToDuplicates.getOrSet(item.name, []).push(item); + getOrSet(mapLabelToDuplicates, item.name, []).push(item); if (typeof description === 'string') { - mapLabelAndDescriptionToDuplicates.getOrSet(`${item.name}${item.description}`, []).push(item); + getOrSet(mapLabelAndDescriptionToDuplicates, `${item.name}${item.description}`, []).push(item); } }); // Mark duplicates and shorten their descriptions - const labelDuplicates = mapLabelToDuplicates.values(); - labelDuplicates.forEach(duplicates => { + mapLabelToDuplicates.forEach(duplicates => { if (duplicates.length > 1) { duplicates = duplicates.filter(d => { // we could have items with equal label and description. in that case it does not make much @@ -497,7 +495,7 @@ export class TabsTitleControl extends TitleControl { tab.blur(); const { editor, position } = this.toTabContext(index); - if (e.button === 0 /* Left Button */ && !DOM.findParentWithClass((e.target || e.srcElement) as HTMLElement, 'monaco-action-bar', 'tab')) { + if (e.button === 0 /* Left Button */ && !this.isTabActionBar((e.target || e.srcElement) as HTMLElement)) { setTimeout(() => this.editorService.openEditor(editor, null, position).done(null, errors.onUnexpectedError)); // timeout to keep focus in editor after mouse up } })); @@ -507,7 +505,7 @@ export class TabsTitleControl extends TitleControl { DOM.EventHelper.stop(e); tab.blur(); - if (e.button === 1 /* Middle Button */) { + if (e.button === 1 /* Middle Button*/ && !this.isTabActionBar((e.target || e.srcElement) as HTMLElement)) { this.closeEditorAction.run(this.toTabContext(index)).done(null, errors.onUnexpectedError); } })); @@ -642,6 +640,10 @@ export class TabsTitleControl extends TitleControl { return combinedDisposable(disposables); } + private isTabActionBar(element: HTMLElement): boolean { + return !!DOM.findParentWithClass(element, 'monaco-action-bar', 'tab'); + } + private toTabContext(index: number): { group: IEditorGroup, position: Position, editor: IEditorInput } { const group = this.context; const position = this.stacks.positionOfGroup(group); @@ -722,7 +724,7 @@ class TabActionRunner extends ActionRunner { super(); } - public run(action: IAction, context?: any): TPromise { + public run(action: IAction, context?: any): TPromise { const group = this.group(); if (!group) { return TPromise.as(void 0); @@ -735,8 +737,8 @@ class TabActionRunner extends ActionRunner { registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { // Styling with Outline color (e.g. high contrast theme) - const outline = theme.getColor(activeContrastBorder); - if (outline) { + const activeContrastBorderColor = theme.getColor(activeContrastBorder); + if (activeContrastBorderColor) { collector.addRule(` .monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.active, .monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.active:hover { diff --git a/src/vs/workbench/browser/parts/editor/textDiffEditor.ts b/src/vs/workbench/browser/parts/editor/textDiffEditor.ts index 3cc0c4b20a836..05e105aa0fff2 100644 --- a/src/vs/workbench/browser/parts/editor/textDiffEditor.ts +++ b/src/vs/workbench/browser/parts/editor/textDiffEditor.ts @@ -17,21 +17,20 @@ import { IDiffEditor } from 'vs/editor/browser/editorBrowser'; import { IDiffEditorOptions, IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { BaseTextEditor, IEditorConfiguration } from 'vs/workbench/browser/parts/editor/textEditor'; import { TextEditorOptions, TextDiffEditorOptions, EditorInput, EditorOptions, TEXT_DIFF_EDITOR_ID, IFileEditorInput } from 'vs/workbench/common/editor'; -import { StringEditorInput } from 'vs/workbench/common/editor/stringEditorInput'; import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput'; import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput'; -import { DiffNavigator } from 'vs/editor/contrib/diffNavigator/common/diffNavigator'; +import { DiffNavigator } from 'vs/editor/browser/widget/diffNavigator'; import { DiffEditorWidget } from 'vs/editor/browser/widget/diffEditorWidget'; import { TextDiffEditorModel } from 'vs/workbench/common/editor/textDiffEditorModel'; import { DelegatingWorkbenchEditorService } from 'vs/workbench/services/editor/browser/editorService'; -import { IFileOperationResult, FileOperationResult } from 'vs/platform/files/common/files'; +import { FileOperationError, FileOperationResult } from 'vs/platform/files/common/files'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IStorageService } from 'vs/platform/storage/common/storage'; -import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import { ITextResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; -import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { IModeService } from 'vs/editor/common/services/modeService'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; @@ -52,9 +51,9 @@ export class TextDiffEditor extends BaseTextEditor { @ITelemetryService telemetryService: ITelemetryService, @IInstantiationService instantiationService: IInstantiationService, @IStorageService storageService: IStorageService, - @IConfigurationService configurationService: IConfigurationService, + @ITextResourceConfigurationService configurationService: ITextResourceConfigurationService, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, - @IWorkbenchThemeService themeService: IWorkbenchThemeService, + @IThemeService themeService: IThemeService, @IEditorGroupService editorGroupService: IEditorGroupService, @IModeService modeService: IModeService, @ITextFileService textFileService: ITextFileService @@ -216,11 +215,6 @@ export class TextDiffEditor extends BaseTextEditor { objects.mixin(editorConfiguration, configuration.diffEditor); } - const language = this.getLanguage(); - if (language) { - objects.assign(editorConfiguration, this.configurationService.getConfiguration({ overrideIdentifier: language, section: 'diffEditor' })); - } - return editorConfiguration; } @@ -249,7 +243,7 @@ export class TextDiffEditor extends BaseTextEditor { if (input instanceof DiffEditorInput) { const modifiedInput = input.modifiedInput; - return modifiedInput instanceof StringEditorInput || modifiedInput instanceof ResourceEditorInput; + return modifiedInput instanceof ResourceEditorInput; } return false; @@ -263,7 +257,7 @@ export class TextDiffEditor extends BaseTextEditor { return errors.some(e => this.isFileBinaryError(e)); } - return (error).fileOperationResult === FileOperationResult.FILE_IS_BINARY; + return (error).fileOperationResult === FileOperationResult.FILE_IS_BINARY; } public clearInput(): void { @@ -366,7 +360,7 @@ class ToggleEditorModeAction extends Action { return ToggleEditorModeAction.isInlineMode(this.editor) ? ToggleEditorModeAction.SIDEBYSIDE_LABEL : ToggleEditorModeAction.INLINE_LABEL; } - public run(): TPromise { + public run(): TPromise { const inlineModeActive = ToggleEditorModeAction.isInlineMode(this.editor); const control = this.editor.getControl(); diff --git a/src/vs/workbench/browser/parts/editor/textEditor.ts b/src/vs/workbench/browser/parts/editor/textEditor.ts index d0f89123f6a41..8ef5e97585d6b 100644 --- a/src/vs/workbench/browser/parts/editor/textEditor.ts +++ b/src/vs/workbench/browser/parts/editor/textEditor.ts @@ -7,6 +7,7 @@ import nls = require('vs/nls'); import { TPromise } from 'vs/base/common/winjs.base'; +import URI from 'vs/base/common/uri'; import { Dimension, Builder } from 'vs/base/browser/builder'; import objects = require('vs/base/common/objects'); import types = require('vs/base/common/types'); @@ -18,14 +19,14 @@ import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor'; import { IEditorViewState, IEditor, isCommonCodeEditor, isCommonDiffEditor } from 'vs/editor/common/editorCommon'; import { Position } from 'vs/platform/editor/common/editor'; import { IStorageService } from 'vs/platform/storage/common/storage'; -import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; import { Scope } from 'vs/workbench/common/memento'; import { getCodeEditor } from 'vs/editor/common/services/codeEditorService'; import { IModeService } from 'vs/editor/common/services/modeService'; import { ITextFileService, SaveReason, AutoSaveMode } from 'vs/workbench/services/textfile/common/textfiles'; +import { ITextResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; @@ -38,8 +39,8 @@ interface ITextEditorViewState { } export interface IEditorConfiguration { - editor: any; - diffEditor: any; + editor: object; + diffEditor: object; } /** @@ -57,23 +58,22 @@ export abstract class BaseTextEditor extends BaseEditor { @ITelemetryService telemetryService: ITelemetryService, @IInstantiationService private _instantiationService: IInstantiationService, @IStorageService private storageService: IStorageService, - @IConfigurationService private _configurationService: IConfigurationService, - @IWorkbenchThemeService protected themeService: IWorkbenchThemeService, + @ITextResourceConfigurationService private _configurationService: ITextResourceConfigurationService, + @IThemeService protected themeService: IThemeService, @IModeService private modeService: IModeService, @ITextFileService private textFileService: ITextFileService, - @IEditorGroupService private editorGroupService: IEditorGroupService + @IEditorGroupService protected editorGroupService: IEditorGroupService ) { super(id, telemetryService, themeService); - this.toUnbind.push(this.configurationService.onDidUpdateConfiguration(e => this.handleConfigurationChangeEvent(e.config))); - this.toUnbind.push(themeService.onDidColorThemeChange(e => this.handleConfigurationChangeEvent())); // TODO@theme this should be done from the editor itself and not from the outside + this.toUnbind.push(this.configurationService.onDidUpdateConfiguration(e => this.handleConfigurationChangeEvent(this.configurationService.getConfiguration(this.getResource())))); } protected get instantiationService(): IInstantiationService { return this._instantiationService; } - protected get configurationService(): IConfigurationService { + protected get configurationService(): ITextResourceConfigurationService { return this._configurationService; } @@ -117,15 +117,9 @@ export abstract class BaseTextEditor extends BaseEditor { protected getConfigurationOverrides(): IEditorOptions { const overrides = {}; - const language = this.getLanguage(); - if (language) { - objects.assign(overrides, this.configurationService.getConfiguration({ overrideIdentifier: language, section: 'editor' })); - } - objects.assign(overrides, { overviewRulerLanes: 3, lineNumbersMinChars: 3, - theme: this.themeService.getColorTheme().id, fixedOverflowWidgets: true }); @@ -136,7 +130,7 @@ export abstract class BaseTextEditor extends BaseEditor { // Editor for Text this._editorContainer = parent; - this.editorControl = this.createEditorControl(parent, this.computeConfiguration(this.configurationService.getConfiguration())); + this.editorControl = this.createEditorControl(parent, this.computeConfiguration(this.configurationService.getConfiguration(this.getResource()))); // Model & Language changes const codeEditor = getCodeEditor(this); @@ -250,14 +244,14 @@ export abstract class BaseTextEditor extends BaseEditor { const editorViewState = this.getControl().saveViewState(); - let fileViewState: ITextEditorViewState = textEditorViewStateMemento[key]; - if (!fileViewState) { - fileViewState = Object.create(null); - textEditorViewStateMemento[key] = fileViewState; + let lastKnownViewState: ITextEditorViewState = textEditorViewStateMemento[key]; + if (!lastKnownViewState) { + lastKnownViewState = Object.create(null); + textEditorViewStateMemento[key] = lastKnownViewState; } if (typeof this.position === 'number') { - fileViewState[this.position] = editorViewState; + lastKnownViewState[this.position] = editorViewState; } } @@ -279,16 +273,16 @@ export abstract class BaseTextEditor extends BaseEditor { const memento = this.getMemento(this.storageService, Scope.WORKSPACE); const textEditorViewStateMemento = memento[TEXT_EDITOR_VIEW_STATE_PREFERENCE_KEY]; if (textEditorViewStateMemento) { - const fileViewState: ITextEditorViewState = textEditorViewStateMemento[key]; - if (fileViewState) { - return fileViewState[this.position]; + const viewState: ITextEditorViewState = textEditorViewStateMemento[key]; + if (viewState) { + return viewState[this.position]; } } return null; } - private updateEditorConfiguration(configuration = this.configurationService.getConfiguration()): void { + private updateEditorConfiguration(configuration = this.configurationService.getConfiguration(this.getResource())): void { if (!this.editorControl) { return; } @@ -309,20 +303,17 @@ export abstract class BaseTextEditor extends BaseEditor { } } - protected getLanguage(): string { + protected getResource(): URI { const codeEditor = getCodeEditor(this); if (codeEditor) { const model = codeEditor.getModel(); if (model) { - return model.getLanguageIdentifier().language; + return model.uri; } } if (this.input) { - const resource = toResource(this.input); - if (resource) { - return this.modeService.getModeIdByFilenameOrFirstLine(resource.fsPath); - } + return toResource(this.input); } return null; diff --git a/src/vs/workbench/browser/parts/editor/textResourceEditor.ts b/src/vs/workbench/browser/parts/editor/textResourceEditor.ts index 96b76b504186d..eaaf3612b17db 100644 --- a/src/vs/workbench/browser/parts/editor/textResourceEditor.ts +++ b/src/vs/workbench/browser/parts/editor/textResourceEditor.ts @@ -10,19 +10,19 @@ import types = require('vs/base/common/types'); import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { TextEditorOptions, EditorModel, EditorInput, EditorOptions } from 'vs/workbench/common/editor'; +import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput'; import { BaseTextEditorModel } from 'vs/workbench/common/editor/textEditorModel'; import { UntitledEditorInput } from 'vs/workbench/common/editor/untitledEditorInput'; import { BaseTextEditor } from 'vs/workbench/browser/parts/editor/textEditor'; -import URI from 'vs/base/common/uri'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IStorageService } from 'vs/platform/storage/common/storage'; -import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import { ITextResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService'; -import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { IModeService } from 'vs/editor/common/services/modeService'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; +import { once } from 'vs/base/common/event'; /** * An editor implementation that is capable of showing the contents of resource inputs. Uses @@ -36,22 +36,13 @@ export class TextResourceEditor extends BaseTextEditor { @ITelemetryService telemetryService: ITelemetryService, @IInstantiationService instantiationService: IInstantiationService, @IStorageService storageService: IStorageService, - @IConfigurationService configurationService: IConfigurationService, - @IWorkbenchThemeService themeService: IWorkbenchThemeService, - @IUntitledEditorService private untitledEditorService: IUntitledEditorService, + @ITextResourceConfigurationService configurationService: ITextResourceConfigurationService, + @IThemeService themeService: IThemeService, @IEditorGroupService editorGroupService: IEditorGroupService, @IModeService modeService: IModeService, @ITextFileService textFileService: ITextFileService ) { super(TextResourceEditor.ID, telemetryService, instantiationService, storageService, configurationService, themeService, modeService, textFileService, editorGroupService); - - this.toUnbind.push(this.untitledEditorService.onDidChangeDirty(e => this.onUntitledDirtyChange(e))); - } - - private onUntitledDirtyChange(resource: URI): void { - if (!this.untitledEditorService.isDirty(resource)) { - this.clearTextEditorViewState([resource.toString()]); // untitled file got reverted, so remove view state - } } public getTitle(): string { @@ -82,14 +73,14 @@ export class TextResourceEditor extends BaseTextEditor { } // Remember view settings if input changes - this.saveTextEditorViewState(oldInput); + this.saveTextEditorViewStateForInput(oldInput); // Different Input (Reload) return input.resolve(true).then((resolvedModel: EditorModel) => { // Assert Model instance if (!(resolvedModel instanceof BaseTextEditorModel)) { - return TPromise.wrapError('Unable to open file as text'); + return TPromise.wrapError(new Error('Unable to open file as text')); } // Assert that the current input is still the one we expect. This prevents a race condition when loading takes long and another input was set meanwhile @@ -118,7 +109,7 @@ export class TextResourceEditor extends BaseTextEditor { } protected restoreViewState(input: EditorInput) { - if (input instanceof UntitledEditorInput) { + if (input instanceof UntitledEditorInput || input instanceof ResourceEditorInput) { const viewState = this.loadTextEditorViewState(input.getResource().toString()); if (viewState) { this.getControl().restoreViewState(viewState); @@ -151,7 +142,6 @@ export class TextResourceEditor extends BaseTextEditor { /** * Reveals the last line of this editor if it has a model set. - * If smart reveal is true will only reveal the last line if the line before last is visible #3351 */ public revealLastLine(): void { const codeEditor = this.getControl(); @@ -159,14 +149,14 @@ export class TextResourceEditor extends BaseTextEditor { if (model) { const lastLine = model.getLineCount(); - codeEditor.revealLine(lastLine); + codeEditor.revealPosition({ lineNumber: lastLine, column: model.getLineMaxColumn(lastLine) }); } } public clearInput(): void { // Keep editor view state in settings to restore when coming back - this.saveTextEditorViewState(this.input); + this.saveTextEditorViewStateForInput(this.input); // Clear Model this.getControl().setModel(null); @@ -176,22 +166,35 @@ export class TextResourceEditor extends BaseTextEditor { public shutdown(): void { - // Save View State - this.saveTextEditorViewState(this.input); + // Save View State (only for untitled) + if (this.input instanceof UntitledEditorInput) { + this.saveTextEditorViewStateForInput(this.input); + } // Call Super super.shutdown(); } - protected saveTextEditorViewState(input: EditorInput): void; - protected saveTextEditorViewState(key: string): void; - protected saveTextEditorViewState(arg1: EditorInput | string): void { - if (typeof arg1 === 'string') { - return super.saveTextEditorViewState(arg1); + protected saveTextEditorViewStateForInput(input: EditorInput): void { + if (!(input instanceof UntitledEditorInput) && !(input instanceof ResourceEditorInput)) { + return; // only enabled for untitled and resource inputs } - if (arg1 instanceof UntitledEditorInput && !arg1.isDisposed()) { - return super.saveTextEditorViewState(arg1.getResource().toString()); + const key = input.getResource().toString(); + + // Clear view state if input is disposed + if (input.isDisposed()) { + super.clearTextEditorViewState([key]); + } + + // Otherwise save it + else { + super.saveTextEditorViewState(key); + + // Make sure to clean up when the input gets disposed + once(input.onDispose)(() => { + super.clearTextEditorViewState([key]); + }); } } } \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/editor/titleControl.ts b/src/vs/workbench/browser/parts/editor/titleControl.ts index 9777863076a4a..5a8f7210666a9 100644 --- a/src/vs/workbench/browser/parts/editor/titleControl.ts +++ b/src/vs/workbench/browser/parts/editor/titleControl.ts @@ -7,13 +7,13 @@ import 'vs/css!./media/titlecontrol'; import nls = require('vs/nls'); -import { Registry } from 'vs/platform/platform'; -import { Scope, IActionBarRegistry, Extensions, prepareActions } from 'vs/workbench/browser/actionBarRegistry'; +import { Registry } from 'vs/platform/registry/common/platform'; +import { Scope, IActionBarRegistry, Extensions, prepareActions } from 'vs/workbench/browser/actions'; import { IAction, Action } from 'vs/base/common/actions'; import errors = require('vs/base/common/errors'); import DOM = require('vs/base/browser/dom'); import { TPromise } from 'vs/base/common/winjs.base'; -import { BaseEditor, IEditorInputActionContext } from 'vs/workbench/browser/parts/editor/baseEditor'; +import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor'; import { RunOnceScheduler } from 'vs/base/common/async'; import { isCommonCodeEditor, isCommonDiffEditor } from 'vs/editor/common/editorCommon'; import arrays = require('vs/base/common/arrays'); @@ -32,11 +32,11 @@ import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { ResolvedKeybinding } from 'vs/base/common/keyCodes'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; -import { CloseEditorsInGroupAction, SplitEditorAction, CloseEditorAction, KeepEditorAction, CloseOtherEditorsInGroupAction, CloseRightEditorsInGroupAction, ShowEditorsInGroupAction } from 'vs/workbench/browser/parts/editor/editorActions'; +import { CloseEditorsInGroupAction, SplitEditorAction, CloseEditorAction, KeepEditorAction, CloseOtherEditorsInGroupAction, CloseRightEditorsInGroupAction, ShowEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction } from 'vs/workbench/browser/parts/editor/editorActions'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { createActionItem, fillInActions } from 'vs/platform/actions/browser/menuItemActionItem'; import { IMenuService, MenuId, IMenu, ExecuteCommandAction } from 'vs/platform/actions/common/actions'; -import { ResourceContextKey } from 'vs/workbench/common/resourceContextKey'; +import { ResourceContextKey } from 'vs/workbench/common/resources'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { Themable } from 'vs/workbench/common/theme'; @@ -71,6 +71,7 @@ export abstract class TitleControl extends Themable implements ITitleAreaControl protected pinEditorAction: KeepEditorAction; protected closeOtherEditorsAction: CloseOtherEditorsInGroupAction; protected closeRightEditorsAction: CloseRightEditorsInGroupAction; + protected closeUnmodifiedEditorsInGroupAction: CloseUnmodifiedEditorsInGroupAction; protected closeEditorsInGroupAction: CloseEditorsInGroupAction; protected splitEditorAction: SplitEditorAction; protected showEditorsInGroupAction: ShowEditorsInGroupAction; @@ -228,6 +229,7 @@ export abstract class TitleControl extends Themable implements ITitleAreaControl this.closeOtherEditorsAction = services.createInstance(CloseOtherEditorsInGroupAction, CloseOtherEditorsInGroupAction.ID, nls.localize('closeOthers', "Close Others")); this.closeRightEditorsAction = services.createInstance(CloseRightEditorsInGroupAction, CloseRightEditorsInGroupAction.ID, nls.localize('closeRight', "Close to the Right")); this.closeEditorsInGroupAction = services.createInstance(CloseEditorsInGroupAction, CloseEditorsInGroupAction.ID, nls.localize('closeAll', "Close All")); + this.closeUnmodifiedEditorsInGroupAction = services.createInstance(CloseUnmodifiedEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction.ID, nls.localize('closeAllUnmodified', "Close Unmodified")); this.pinEditorAction = services.createInstance(KeepEditorAction, KeepEditorAction.ID, nls.localize('keepOpen', "Keep Open")); this.showEditorsInGroupAction = services.createInstance(ShowEditorsInGroupAction, ShowEditorsInGroupAction.ID, nls.localize('showOpenedEditors', "Show Opened Editors")); this.splitEditorAction = services.createInstance(SplitEditorAction, SplitEditorAction.ID, SplitEditorAction.LABEL); @@ -303,17 +305,12 @@ export abstract class TitleControl extends Themable implements ITitleAreaControl // Editor Control Actions let editorActions = this.mapActionsToEditors[control.getId()]; if (!editorActions) { - editorActions = this.getEditorActionsForContext(control); + editorActions = { primary: control.getActions(), secondary: control.getSecondaryActions() }; this.mapActionsToEditors[control.getId()] = editorActions; } primary.push(...editorActions.primary); secondary.push(...editorActions.secondary); - // Editor Input Actions - const editorInputActions = this.getEditorActionsForContext({ input: control.input, editor: control, position: control.position }); - primary.push(...editorInputActions.primary); - secondary.push(...editorInputActions.secondary); - // MenuItems // TODO This isn't very proper but needed as we have failed to // use the correct context key service per editor only once. Don't @@ -331,29 +328,6 @@ export abstract class TitleControl extends Themable implements ITitleAreaControl return { primary, secondary }; } - private getEditorActionsForContext(context: BaseEditor | IEditorInputActionContext): IToolbarActions { - const primaryActions: IAction[] = []; - const secondaryActions: IAction[] = []; - - // From Editor - if (context instanceof BaseEditor) { - primaryActions.push(...(context).getActions()); - secondaryActions.push(...(context).getSecondaryActions()); - } - - // From Contributions - else { - const actionBarRegistry = Registry.as(Extensions.Actionbar); - primaryActions.push(...actionBarRegistry.getActionBarActionsForContext(Scope.EDITOR, context)); - secondaryActions.push(...actionBarRegistry.getSecondaryActionBarActionsForContext(Scope.EDITOR, context)); - } - - return { - primary: primaryActions, - secondary: secondaryActions - }; - } - protected updateEditorActionsToolbar(): void { const group = this.context; if (!group) { @@ -383,6 +357,7 @@ export abstract class TitleControl extends Themable implements ITitleAreaControl } secondaryEditorActions.push(this.showEditorsInGroupAction); secondaryEditorActions.push(new Separator()); + secondaryEditorActions.push(this.closeUnmodifiedEditorsInGroupAction); secondaryEditorActions.push(this.closeEditorsInGroupAction); } @@ -468,6 +443,7 @@ export abstract class TitleControl extends Themable implements ITitleAreaControl actions.push(this.closeRightEditorsAction); } + actions.push(this.closeUnmodifiedEditorsInGroupAction); actions.push(this.closeEditorsInGroupAction); if (tabOptions.previewEditors) { @@ -489,6 +465,7 @@ export abstract class TitleControl extends Themable implements ITitleAreaControl this.showEditorsInGroupAction, this.closeEditorAction, this.closeRightEditorsAction, + this.closeUnmodifiedEditorsInGroupAction, this.closeOtherEditorsAction, this.closeEditorsInGroupAction, this.pinEditorAction diff --git a/src/vs/workbench/browser/parts/editor/webviewEditor.ts b/src/vs/workbench/browser/parts/editor/webviewEditor.ts new file mode 100644 index 0000000000000..50f792c3e9dd9 --- /dev/null +++ b/src/vs/workbench/browser/parts/editor/webviewEditor.ts @@ -0,0 +1,70 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor'; +import URI from 'vs/base/common/uri'; +import { IStorageService } from 'vs/platform/storage/common/storage'; +import { Scope } from 'vs/workbench/common/memento'; + +export interface HtmlPreviewEditorViewState { + scrollYPercentage: number; +} + +interface HtmlPreviewEditorViewStates { + 0?: HtmlPreviewEditorViewState; + 1?: HtmlPreviewEditorViewState; + 2?: HtmlPreviewEditorViewState; +} + +/** + * This class is only intended to be subclassed and not instantiated. + */ +export abstract class WebviewEditor extends BaseEditor { + constructor( + id: string, + telemetryService: ITelemetryService, + themeService: IThemeService, + private storageService: IStorageService + ) { + super(id, telemetryService, themeService); + } + + private get viewStateStorageKey(): string { + return this.getId() + '.editorViewState'; + } + + protected saveViewState(resource: URI | string, editorViewState: HtmlPreviewEditorViewState): void { + const memento = this.getMemento(this.storageService, Scope.WORKSPACE); + let editorViewStateMemento = memento[this.viewStateStorageKey]; + if (!editorViewStateMemento) { + editorViewStateMemento = Object.create(null); + memento[this.viewStateStorageKey] = editorViewStateMemento; + } + + let fileViewState: HtmlPreviewEditorViewStates = editorViewStateMemento[resource.toString()]; + if (!fileViewState) { + fileViewState = Object.create(null); + editorViewStateMemento[resource.toString()] = fileViewState; + } + + if (typeof this.position === 'number') { + fileViewState[this.position] = editorViewState; + } + } + + protected loadViewState(resource: URI | string): HtmlPreviewEditorViewState | null { + const memento = this.getMemento(this.storageService, Scope.WORKSPACE); + const editorViewStateMemento = memento[this.viewStateStorageKey]; + if (editorViewStateMemento) { + const fileViewState: HtmlPreviewEditorViewStates = editorViewStateMemento[resource.toString()]; + if (fileViewState) { + return fileViewState[this.position]; + } + } + return null; + } +} \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/panel/panelActions.ts b/src/vs/workbench/browser/parts/panel/panelActions.ts index 8ef9ca2e6db41..934dacdb8b909 100644 --- a/src/vs/workbench/browser/parts/panel/panelActions.ts +++ b/src/vs/workbench/browser/parts/panel/panelActions.ts @@ -9,7 +9,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; import { Action } from 'vs/base/common/actions'; -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { IWorkbenchActionRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/actionRegistry'; import { IPanelService, IPanelIdentifier } from 'vs/workbench/services/panel/common/panelService'; @@ -150,7 +150,7 @@ export class ToggleMaximizedPanelAction extends Action { } const actionRegistry = Registry.as(WorkbenchExtensions.WorkbenchActions); -actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(TogglePanelAction, TogglePanelAction.ID, TogglePanelAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.KEY_J }), 'View: Toggle Panel Visibility', nls.localize('view', "View")); +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(TogglePanelAction, TogglePanelAction.ID, TogglePanelAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.KEY_J }), 'View: Toggle Panel', nls.localize('view', "View")); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusPanelAction, FocusPanelAction.ID, FocusPanelAction.LABEL), 'View: Focus into Panel', nls.localize('view', "View")); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(ToggleMaximizedPanelAction, ToggleMaximizedPanelAction.ID, ToggleMaximizedPanelAction.LABEL), 'View: Toggle Maximized Panel', nls.localize('view', "View")); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(ClosePanelAction, ClosePanelAction.ID, ClosePanelAction.LABEL), 'View: Close Panel', nls.localize('view', "View")); \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/panel/panelPart.ts b/src/vs/workbench/browser/parts/panel/panelPart.ts index 3d7c435ff9c2a..9e761d9263ef6 100644 --- a/src/vs/workbench/browser/parts/panel/panelPart.ts +++ b/src/vs/workbench/browser/parts/panel/panelPart.ts @@ -9,8 +9,8 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { IAction } from 'vs/base/common/actions'; import Event from 'vs/base/common/event'; import { Builder, $ } from 'vs/base/browser/builder'; -import { Registry } from 'vs/platform/platform'; -import { Scope } from 'vs/workbench/browser/actionBarRegistry'; +import { Registry } from 'vs/platform/registry/common/platform'; +import { Scope } from 'vs/workbench/browser/actions'; import { IPanel } from 'vs/workbench/common/panel'; import { CompositePart, ICompositeTitleLabel } from 'vs/workbench/browser/parts/compositePart'; import { Panel, PanelRegistry, Extensions as PanelExtensions } from 'vs/workbench/browser/panel'; @@ -25,8 +25,8 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { ActionsOrientation, ActionBar } from 'vs/base/browser/ui/actionbar/actionbar'; import { ClosePanelAction, PanelAction, ToggleMaximizedPanelAction } from 'vs/workbench/browser/parts/panel/panelActions'; import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; -import { PANEL_BACKGROUND, PANEL_BORDER_COLOR, PANEL_ACTIVE_TITLE_COLOR, PANEL_INACTIVE_TITLE_COLOR, PANEL_ACTIVE_TITLE_BORDER } from 'vs/workbench/common/theme'; -import { activeContrastBorder, focusBorder, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; +import { PANEL_BACKGROUND, PANEL_BORDER, PANEL_ACTIVE_TITLE_FOREGROUND, PANEL_INACTIVE_TITLE_FOREGROUND, PANEL_ACTIVE_TITLE_BORDER } from 'vs/workbench/common/theme'; +import { activeContrastBorder, focusBorder, contrastBorder, editorBackground } from 'vs/platform/theme/common/colorRegistry'; export class PanelPart extends CompositePart implements IPanelService { @@ -61,6 +61,7 @@ export class PanelPart extends CompositePart implements IPanelService { themeService, Registry.as(PanelExtensions.Panels), PanelPart.activePanelSettingsKey, + Registry.as(PanelExtensions.Panels).getDefaultPanelId(), 'panel', 'panel', Scope.PANEL, @@ -104,7 +105,7 @@ export class PanelPart extends CompositePart implements IPanelService { container.style('background-color', this.getColor(PANEL_BACKGROUND)); const title = this.getTitleArea(); - title.style('border-top-color', this.getColor(contrastBorder) || this.getColor(PANEL_BORDER_COLOR)); + title.style('border-top-color', this.getColor(PANEL_BORDER) || this.getColor(contrastBorder)); } public openPanel(id: string, focus?: boolean): TPromise { @@ -194,35 +195,55 @@ export class PanelPart extends CompositePart implements IPanelService { registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { + // Panel Background: since panels can host editors, we apply a background rule if the panel background + // color is different from the editor background color. This is a bit of a hack though. The better way + // would be to have a way to push the background color onto each editor widget itself somehow. + const panelBackground = theme.getColor(PANEL_BACKGROUND); + if (panelBackground && panelBackground !== theme.getColor(editorBackground)) { + collector.addRule(` + .monaco-workbench > .part.panel > .content .monaco-editor, + .monaco-workbench > .part.panel > .content .monaco-editor .margin, + .monaco-workbench > .part.panel > .content .monaco-editor .monaco-editor-background { + background-color: ${panelBackground}; + } + `); + } + // Title Active - const titleActive = theme.getColor(PANEL_ACTIVE_TITLE_COLOR); + const titleActive = theme.getColor(PANEL_ACTIVE_TITLE_FOREGROUND); const titleActiveBorder = theme.getColor(PANEL_ACTIVE_TITLE_BORDER); - collector.addRule(` - .monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item:hover .action-label, - .monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item .action-label.checked { - color: ${titleActive}; - border-bottom-color: ${titleActiveBorder}; - } - `); + if (titleActive || titleActiveBorder) { + collector.addRule(` + .monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item:hover .action-label, + .monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item .action-label.checked { + color: ${titleActive}; + border-bottom-color: ${titleActiveBorder}; + } + `); + } // Title Inactive - const titleInactive = theme.getColor(PANEL_INACTIVE_TITLE_COLOR); - collector.addRule(` - .monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item .action-label { - color: ${titleInactive}; - } - `); + const titleInactive = theme.getColor(PANEL_INACTIVE_TITLE_FOREGROUND); + if (titleInactive) { + collector.addRule(` + .monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item .action-label { + color: ${titleInactive}; + } + `); + } // Title focus const focusBorderColor = theme.getColor(focusBorder); - collector.addRule(` - .monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item .action-label:focus { - color: ${titleActive}; - border-bottom-color: ${focusBorderColor} !important; - border-bottom: 1px solid; - outline: none; - } - `); + if (focusBorderColor) { + collector.addRule(` + .monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item .action-label:focus { + color: ${titleActive}; + border-bottom-color: ${focusBorderColor} !important; + border-bottom: 1px solid; + outline: none; + } + `); + } // Styling with Outline color (e.g. high contrast theme) const outline = theme.getColor(activeContrastBorder); diff --git a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts index c801ec72380a8..eafaa597a6f84 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts @@ -22,11 +22,11 @@ import { CancellationToken } from 'vs/base/common/cancellation'; import { Mode, IEntryRunContext, IAutoFocus, IQuickNavigateConfiguration, IModel } from 'vs/base/parts/quickopen/common/quickOpen'; import { QuickOpenEntry, QuickOpenModel, QuickOpenEntryGroup } from 'vs/base/parts/quickopen/browser/quickOpenModel'; import { QuickOpenWidget, HideReason } from 'vs/base/parts/quickopen/browser/quickOpenWidget'; -import { ContributableActionProvider } from 'vs/workbench/browser/actionBarRegistry'; +import { ContributableActionProvider } from 'vs/workbench/browser/actions'; import labels = require('vs/base/common/labels'); import paths = require('vs/base/common/paths'); import { ITextFileService, AutoSaveMode } from 'vs/workbench/services/textfile/common/textfiles'; -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import { IResourceInput, IEditorInput } from 'vs/platform/editor/common/editor'; import { IModeService } from 'vs/editor/common/services/modeService'; import { getIconClasses } from 'vs/workbench/browser/labels'; @@ -36,7 +36,7 @@ import { Component } from 'vs/workbench/common/component'; import Event, { Emitter } from 'vs/base/common/event'; import { IPartService } from 'vs/workbench/services/part/common/partService'; import { KeyMod } from 'vs/base/common/keyCodes'; -import { QuickOpenHandler, QuickOpenHandlerDescriptor, IQuickOpenRegistry, Extensions, EditorQuickOpenEntry } from 'vs/workbench/browser/quickopen'; +import { QuickOpenHandler, QuickOpenHandlerDescriptor, IQuickOpenRegistry, Extensions, EditorQuickOpenEntry, IWorkbenchQuickOpenConfiguration } from 'vs/workbench/browser/quickopen'; import errors = require('vs/base/common/errors'); import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IPickOpenEntry, IFilePickOpenEntry, IInputOptions, IQuickOpenService, IPickOptions, IShowOptions } from 'vs/platform/quickOpen/common/quickOpen'; @@ -49,21 +49,14 @@ import { IContextKeyService, RawContextKey, IContextKey } from 'vs/platform/cont import { IHistoryService } from 'vs/workbench/services/history/common/history'; import { IListService } from 'vs/platform/list/browser/listService'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme'; +import { SIDE_BAR_BACKGROUND, SIDE_BAR_FOREGROUND } from 'vs/workbench/common/theme'; import { attachQuickOpenStyler } from 'vs/platform/theme/common/styler'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; const HELP_PREFIX = '?'; -interface IWorkbenchQuickOpenConfiguration { - workbench: { - quickOpen: { - closeOnFocusLost: boolean; - } - }; -} - interface IInternalPickOptions { + contextKey?: string; value?: string; valueSelection?: [number, number]; placeHolder?: string; @@ -73,6 +66,7 @@ interface IInternalPickOptions { matchOnDescription?: boolean; matchOnDetail?: boolean; ignoreFocusLost?: boolean; + quickNavigateConfiguration?: IQuickNavigateConfiguration; onDidType?: (value: string) => any; } @@ -91,6 +85,7 @@ export class QuickOpenController extends Component implements IQuickOpenService private pickOpenWidget: QuickOpenWidget; private layoutDimensions: Dimension; private mapResolvedHandlersToPrefix: { [prefix: string]: TPromise; }; + private mapContextKeyToContext: { [id: string]: IContextKey; }; private handlerOnOpenCalled: { [prefix: string]: boolean; }; private currentResultToken: string; private currentPickerToken: string; @@ -107,7 +102,7 @@ export class QuickOpenController extends Component implements IQuickOpenService @IMessageService private messageService: IMessageService, @ITelemetryService private telemetryService: ITelemetryService, @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IContextKeyService contextKeyService: IContextKeyService, + @IContextKeyService private contextKeyService: IContextKeyService, @IConfigurationService private configurationService: IConfigurationService, @IHistoryService private historyService: IHistoryService, @IInstantiationService private instantiationService: IInstantiationService, @@ -119,6 +114,7 @@ export class QuickOpenController extends Component implements IQuickOpenService this.mapResolvedHandlersToPrefix = {}; this.handlerOnOpenCalled = {}; + this.mapContextKeyToContext = {}; this.promisesToCompleteOnHide = []; @@ -133,13 +129,13 @@ export class QuickOpenController extends Component implements IQuickOpenService } private registerListeners(): void { - this.toUnbind.push(this.configurationService.onDidUpdateConfiguration(e => this.updateConfiguration(e.config))); + this.toUnbind.push(this.configurationService.onDidUpdateConfiguration(e => this.updateConfiguration(this.configurationService.getConfiguration()))); this.toUnbind.push(this.partService.onTitleBarVisibilityChange(() => this.positionQuickOpenWidget())); this.toUnbind.push(browser.onDidChangeZoomLevel(() => this.positionQuickOpenWidget())); } private updateConfiguration(settings: IWorkbenchQuickOpenConfiguration): void { - this.closeOnFocusLost = settings.workbench.quickOpen.closeOnFocusLost; + this.closeOnFocusLost = settings.workbench && settings.workbench.quickOpen && settings.workbench.quickOpen.closeOnFocusLost; } public get onShow(): Event { @@ -155,8 +151,8 @@ export class QuickOpenController extends Component implements IQuickOpenService this.quickOpenWidget.navigate(next, quickNavigate); } - if (!quickNavigate && this.pickOpenWidget) { - this.pickOpenWidget.navigate(next); // quick-navigate is only supported in quick open, not picker + if (this.pickOpenWidget) { + this.pickOpenWidget.navigate(next, quickNavigate); } } @@ -199,6 +195,7 @@ export class QuickOpenController extends Component implements IQuickOpenService currentDecoration = !!message ? Severity.Error : void 0; const newPick = message || defaultMessage; if (newPick !== currentPick) { + options.valueSelection = [lastValue.length, lastValue.length]; currentPick = newPick; resolve(new TPromise(init)); } @@ -216,7 +213,7 @@ export class QuickOpenController extends Component implements IQuickOpenService return new TPromise(init).then(item => { return currentValidation.then(valid => { if (valid && item) { - return lastValue || options.value || ''; + return lastValue === void 0 ? (options.value || '') : lastValue; } return undefined; }); @@ -275,6 +272,9 @@ export class QuickOpenController extends Component implements IQuickOpenService const currentPickerToken = defaultGenerator.nextId(); this.currentPickerToken = currentPickerToken; + // Update context + this.setQuickOpenContextKey(options.contextKey); + // Create upon first open if (!this.pickOpenWidget) { this.pickOpenWidget = new QuickOpenWidget( @@ -291,7 +291,7 @@ export class QuickOpenController extends Component implements IQuickOpenService }, this.telemetryService ); - this.toUnbind.push(attachQuickOpenStyler(this.pickOpenWidget, this.themeService, { background: SIDE_BAR_BACKGROUND })); + this.toUnbind.push(attachQuickOpenStyler(this.pickOpenWidget, this.themeService, { background: SIDE_BAR_BACKGROUND, foreground: SIDE_BAR_FOREGROUND })); const pickOpenContainer = this.pickOpenWidget.create(); this.toUnbind.push(this.listService.register(this.pickOpenWidget.getTree())); @@ -446,7 +446,7 @@ export class QuickOpenController extends Component implements IQuickOpenService // Set input if (!this.pickOpenWidget.isVisible()) { - this.pickOpenWidget.show(model, { autoFocus }); + this.pickOpenWidget.show(model, { autoFocus, quickNavigateConfiguration: options.quickNavigateConfiguration }); } else { this.pickOpenWidget.setInput(model, autoFocus); } @@ -519,6 +519,7 @@ export class QuickOpenController extends Component implements IQuickOpenService public show(prefix?: string, options?: IShowOptions): TPromise { let quickNavigateConfiguration = options ? options.quickNavigateConfiguration : void 0; + let inputSelection = options ? options.inputSelection : void 0; this.previousValue = prefix; @@ -553,7 +554,7 @@ export class QuickOpenController extends Component implements IQuickOpenService }, this.telemetryService ); - this.toUnbind.push(attachQuickOpenStyler(this.quickOpenWidget, this.themeService, { background: SIDE_BAR_BACKGROUND })); + this.toUnbind.push(attachQuickOpenStyler(this.quickOpenWidget, this.themeService, { background: SIDE_BAR_BACKGROUND, foreground: SIDE_BAR_FOREGROUND })); const quickOpenContainer = this.quickOpenWidget.create(); this.toUnbind.push(this.listService.register(this.quickOpenWidget.getTree())); @@ -569,7 +570,7 @@ export class QuickOpenController extends Component implements IQuickOpenService // Show quick open with prefix or editor history if (!this.quickOpenWidget.isVisible() || quickNavigateConfiguration) { if (prefix) { - this.quickOpenWidget.show(prefix, { quickNavigateConfiguration }); + this.quickOpenWidget.show(prefix, { quickNavigateConfiguration, inputSelection }); } else { const editorHistory = this.getEditorHistoryWithGroupLabel(); if (editorHistory.getEntries().length < 2) { @@ -584,13 +585,17 @@ export class QuickOpenController extends Component implements IQuickOpenService autoFocus = { autoFocusFirstEntry: visibleEditorCount === 0, autoFocusSecondEntry: visibleEditorCount !== 0 }; } - this.quickOpenWidget.show(editorHistory, { quickNavigateConfiguration, autoFocus }); + // Update context + const registry = Registry.as(Extensions.Quickopen); + this.setQuickOpenContextKey(registry.getDefaultQuickOpenHandler().contextKey); + + this.quickOpenWidget.show(editorHistory, { quickNavigateConfiguration, autoFocus, inputSelection }); } } // Otherwise reset the widget to the prefix that is passed in else { - this.quickOpenWidget.show(prefix || ''); + this.quickOpenWidget.show(prefix || '', { inputSelection }); } return promiseCompletedOnHide; @@ -631,8 +636,8 @@ export class QuickOpenController extends Component implements IQuickOpenService const promise = this.mapResolvedHandlersToPrefix[prefix]; promise.then(handler => { this.handlerOnOpenCalled[prefix] = false; - // Don't check if onOpen was called to preserve old behaviour for now - handler.onClose(reason === HideReason.CANCELED); + + handler.onClose(reason === HideReason.CANCELED); // Don't check if onOpen was called to preserve old behaviour for now }); } } @@ -647,10 +652,39 @@ export class QuickOpenController extends Component implements IQuickOpenService this.restoreFocus(); // focus back to editor unless user clicked somewhere else } + // Reset context keys this.inQuickOpenMode.reset(); + this.resetQuickOpenContextKeys(); + + // Events this.emitQuickOpenVisibilityChange(false); } + private resetQuickOpenContextKeys(): void { + Object.keys(this.mapContextKeyToContext).forEach(k => this.mapContextKeyToContext[k].reset()); + } + + private setQuickOpenContextKey(id?: string): void { + let key: IContextKey; + if (id) { + key = this.mapContextKeyToContext[id]; + if (!key) { + key = new RawContextKey(id, false).bindTo(this.contextKeyService); + this.mapContextKeyToContext[id] = key; + } + } + + if (key && key.get()) { + return; // already active context + } + + this.resetQuickOpenContextKeys(); + + if (key) { + key.set(true); + } + } + private hasHandler(prefix: string): boolean { return !!Registry.as(Extensions.Quickopen).getQuickOpenHandler(prefix); } @@ -683,6 +717,7 @@ export class QuickOpenController extends Component implements IQuickOpenService const handlerDescriptor = registry.getQuickOpenHandler(value); const defaultHandlerDescriptor = registry.getDefaultQuickOpenHandler(); const instantProgress = handlerDescriptor && handlerDescriptor.instantProgress; + const contextKey = handlerDescriptor ? handlerDescriptor.contextKey : defaultHandlerDescriptor.contextKey; // Use a generated token to avoid race conditions from long running promises const currentResultToken = defaultGenerator.nextId(); @@ -696,6 +731,9 @@ export class QuickOpenController extends Component implements IQuickOpenService // Reset Extra Class this.quickOpenWidget.setExtraClass(null); + // Update context + this.setQuickOpenContextKey(contextKey); + // Remove leading and trailing whitespace const trimmedValue = strings.trim(value); @@ -707,6 +745,7 @@ export class QuickOpenController extends Component implements IQuickOpenService .done(null, errors.onUnexpectedError); this.quickOpenWidget.setInput(this.getEditorHistoryWithGroupLabel(), { autoFocusFirstEntry: true }); + return; } @@ -860,10 +899,11 @@ export class QuickOpenController extends Component implements IQuickOpenService // Show additional handler results below any existing results if (additionalHandlerResults.length > 0) { + const autoFocusFirstEntry = (quickOpenModel.getEntries().length === 0); // the user might have selected another entry meanwhile in local history (see https://github.com/Microsoft/vscode/issues/20828) const useTopBorder = quickOpenModel.getEntries().length > 0; additionalHandlerResults[0] = new QuickOpenEntryGroup(additionalHandlerResults[0], groupLabel, useTopBorder); quickOpenModel.addEntries(additionalHandlerResults); - this.quickOpenWidget.refresh(quickOpenModel, { autoFocusFirstEntry: true }); + this.quickOpenWidget.refresh(quickOpenModel, { autoFocusFirstEntry }); } // Otherwise if no results are present (even from histoy) indicate this to the user @@ -885,7 +925,7 @@ export class QuickOpenController extends Component implements IQuickOpenService const placeHolderLabel = (typeof canRun === 'string') ? canRun : nls.localize('canNotRunPlaceholder', "This quick open handler can not be used in the current context"); const model = new QuickOpenModel([new PlaceholderQuickOpenEntry(placeHolderLabel)], this.actionProvider); - this.showModel(model, resolvedHandler.getAutoFocus(value, this.quickOpenWidget.getQuickNavigateConfiguration()), resolvedHandler.getAriaLabel()); + this.showModel(model, resolvedHandler.getAutoFocus(value, { model, quickNavigateConfiguration: this.quickOpenWidget.getQuickNavigateConfiguration() }), resolvedHandler.getAriaLabel()); return TPromise.as(null); } @@ -906,9 +946,9 @@ export class QuickOpenController extends Component implements IQuickOpenService if (this.currentResultToken === currentResultToken) { if (!result || !result.entries.length) { const model = new QuickOpenModel([new PlaceholderQuickOpenEntry(resolvedHandler.getEmptyLabel(value))]); - this.showModel(model, resolvedHandler.getAutoFocus(value, this.quickOpenWidget.getQuickNavigateConfiguration()), resolvedHandler.getAriaLabel()); + this.showModel(model, resolvedHandler.getAutoFocus(value, { model, quickNavigateConfiguration: this.quickOpenWidget.getQuickNavigateConfiguration() }), resolvedHandler.getAriaLabel()); } else { - this.showModel(result, resolvedHandler.getAutoFocus(value, this.quickOpenWidget.getQuickNavigateConfiguration()), resolvedHandler.getAriaLabel()); + this.showModel(result, resolvedHandler.getAutoFocus(value, { model: result, quickNavigateConfiguration: this.quickOpenWidget.getQuickNavigateConfiguration() }), resolvedHandler.getAriaLabel()); } } }); @@ -962,7 +1002,7 @@ export class QuickOpenController extends Component implements IQuickOpenService return result.then(null, (error) => { delete this.mapResolvedHandlersToPrefix[id]; - return TPromise.wrapError('Unable to instantiate quick open handler ' + handler.moduleName + ' - ' + handler.ctorName + ': ' + JSON.stringify(error)); + return TPromise.wrapError(new Error('Unable to instantiate quick open handler ' + handler.moduleName + ' - ' + handler.ctorName + ': ' + JSON.stringify(error))); }); } diff --git a/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.ts b/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.ts index 6d696c729c08a..f2ab1868853ca 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.ts @@ -4,122 +4,14 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { Registry } from 'vs/platform/platform'; -import { TPromise } from 'vs/base/common/winjs.base'; -import nls = require('vs/nls'); -import { Action } from 'vs/base/common/actions'; +import { Registry } from 'vs/platform/registry/common/platform'; import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; -import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; -import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actionRegistry'; -import { KeybindingsRegistry, IKeybindings } from 'vs/platform/keybinding/common/keybindingsRegistry'; +import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { RemoveFromEditorHistoryAction } from 'vs/workbench/browser/parts/quickopen/quickOpenController'; - -export class GlobalQuickOpenAction extends Action { - - public static ID = 'workbench.action.quickOpen'; - public static LABEL = nls.localize('quickOpen', "Go to File..."); - - constructor(id: string, label: string, @IQuickOpenService private quickOpenService: IQuickOpenService) { - super(id, label); - - this.order = 100; // Allow other actions to position before or after - this.class = 'quickopen'; - } - - public run(): TPromise { - this.quickOpenService.show(null); - - return TPromise.as(true); - } -} - -export class BaseQuickOpenNavigateAction extends Action { - - constructor( - id: string, - label: string, - private next: boolean, - private quickNavigate: boolean, - @IQuickOpenService private quickOpenService: IQuickOpenService, - @IKeybindingService private keybindingService: IKeybindingService - ) { - super(id, label); - } - - public run(event?: any): TPromise { - const keys = this.keybindingService.lookupKeybindings(this.id); - const quickNavigate = this.quickNavigate ? { keybindings: keys } : void 0; - - this.quickOpenService.navigate(this.next, quickNavigate); - - return TPromise.as(true); - } -} - -export class QuickOpenNavigateNextAction extends BaseQuickOpenNavigateAction { - - public static ID = 'workbench.action.quickOpenNavigateNext'; - public static LABEL = nls.localize('quickNavigateNext', "Navigate Next in Quick Open"); - - constructor( - id: string, - label: string, - @IQuickOpenService quickOpenService: IQuickOpenService, - @IKeybindingService keybindingService: IKeybindingService - ) { - super(id, label, true, true, quickOpenService, keybindingService); - } -} - -export class QuickOpenNavigatePreviousAction extends BaseQuickOpenNavigateAction { - - public static ID = 'workbench.action.quickOpenNavigatePrevious'; - public static LABEL = nls.localize('quickNavigatePrevious', "Navigate Previous in Quick Open"); - - constructor( - id: string, - label: string, - @IQuickOpenService quickOpenService: IQuickOpenService, - @IKeybindingService keybindingService: IKeybindingService - ) { - super(id, label, false, true, quickOpenService, keybindingService); - } -} - -export class QuickOpenSelectNextAction extends BaseQuickOpenNavigateAction { - - public static ID = 'workbench.action.quickOpenSelectNext'; - public static LABEL = nls.localize('quickSelectNext', "Select Next in Quick Open"); - - constructor( - id: string, - label: string, - @IQuickOpenService quickOpenService: IQuickOpenService, - @IKeybindingService keybindingService: IKeybindingService - ) { - super(id, label, true, false, quickOpenService, keybindingService); - } -} - -export class QuickOpenSelectPreviousAction extends BaseQuickOpenNavigateAction { - - public static ID = 'workbench.action.quickOpenSelectPrevious'; - public static LABEL = nls.localize('quickSelectPrevious', "Select Previous in Quick Open"); - - constructor( - id: string, - label: string, - @IQuickOpenService quickOpenService: IQuickOpenService, - @IKeybindingService keybindingService: IKeybindingService - ) { - super(id, label, false, false, quickOpenService, keybindingService); - } -} - -const inQuickOpenContext = ContextKeyExpr.has('inQuickOpen'); +import { GlobalQuickOpenAction, QuickOpenSelectNextAction, QuickOpenSelectPreviousAction, inQuickOpenContext, getQuickNavigateHandler, QuickOpenNavigateNextAction, QuickOpenNavigatePreviousAction, defaultQuickOpenContext } from 'vs/workbench/browser/parts/quickopen/quickopen'; KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'workbench.action.closeQuickOpen', @@ -154,41 +46,38 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({ } }); -function navigateKeybinding(shift: boolean): IKeybindings { - if (!shift) { - return { - primary: KeyMod.CtrlCmd | KeyCode.Tab, - secondary: [KeyMod.CtrlCmd | KeyCode.KEY_Q, KeyMod.CtrlCmd | KeyCode.KEY_E, KeyMod.CtrlCmd | KeyCode.KEY_P], - mac: { - primary: KeyMod.WinCtrl | KeyCode.Tab, - secondary: [KeyMod.WinCtrl | KeyCode.KEY_Q, KeyMod.CtrlCmd | KeyCode.KEY_P] - }, - linux: { - primary: KeyMod.CtrlCmd | KeyCode.Tab, - secondary: [KeyMod.CtrlCmd | KeyCode.KEY_E, KeyMod.CtrlCmd | KeyCode.KEY_P] - } - }; - } - - return { - primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Tab, - secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_Q, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_E, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_P], - mac: { - primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.Tab, - secondary: [KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KEY_Q, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_P] - }, - linux: { - primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Tab, - secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_E, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_P] - } - }; -} - const registry = Registry.as(ActionExtensions.WorkbenchActions); -registry.registerWorkbenchAction(new SyncActionDescriptor(GlobalQuickOpenAction, GlobalQuickOpenAction.ID, GlobalQuickOpenAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.KEY_P, secondary: [KeyMod.CtrlCmd | KeyCode.KEY_E], mac: { primary: KeyMod.CtrlCmd | KeyCode.KEY_P, secondary: null } }), 'Go to File...'); -registry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenNavigateNextAction, QuickOpenNavigateNextAction.ID, QuickOpenNavigateNextAction.LABEL, navigateKeybinding(false), inQuickOpenContext, KeybindingsRegistry.WEIGHT.workbenchContrib(50)), 'Navigate Next in Quick Open'); -registry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenNavigatePreviousAction, QuickOpenNavigatePreviousAction.ID, QuickOpenNavigatePreviousAction.LABEL, navigateKeybinding(true), inQuickOpenContext, KeybindingsRegistry.WEIGHT.workbenchContrib(50)), 'Navigate Previous in Quick Open'); +const globalQuickOpenKeybinding = { primary: KeyMod.CtrlCmd | KeyCode.KEY_P, secondary: [KeyMod.CtrlCmd | KeyCode.KEY_E], mac: { primary: KeyMod.CtrlCmd | KeyCode.KEY_P, secondary: null } }; + +registry.registerWorkbenchAction(new SyncActionDescriptor(GlobalQuickOpenAction, GlobalQuickOpenAction.ID, GlobalQuickOpenAction.LABEL, globalQuickOpenKeybinding), 'Go to File...'); registry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenSelectNextAction, QuickOpenSelectNextAction.ID, QuickOpenSelectNextAction.LABEL, { primary: null, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_N } }, inQuickOpenContext, KeybindingsRegistry.WEIGHT.workbenchContrib(50)), 'Select Next in Quick Open'); registry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenSelectPreviousAction, QuickOpenSelectPreviousAction.ID, QuickOpenSelectPreviousAction.LABEL, { primary: null, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_P } }, inQuickOpenContext, KeybindingsRegistry.WEIGHT.workbenchContrib(50)), 'Select Previous in Quick Open'); +registry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenNavigateNextAction, QuickOpenNavigateNextAction.ID, QuickOpenNavigateNextAction.LABEL), 'Navigate Next in Quick Open'); +registry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenNavigatePreviousAction, QuickOpenNavigatePreviousAction.ID, QuickOpenNavigatePreviousAction.LABEL), 'Navigate Previous in Quick Open'); registry.registerWorkbenchAction(new SyncActionDescriptor(RemoveFromEditorHistoryAction, RemoveFromEditorHistoryAction.ID, RemoveFromEditorHistoryAction.LABEL), 'Remove From History'); + +const quickOpenNavigateNextInFilePickerId = 'workbench.action.quickOpenNavigateNextInFilePicker'; +KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: quickOpenNavigateNextInFilePickerId, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(50), + handler: getQuickNavigateHandler(quickOpenNavigateNextInFilePickerId, true), + when: defaultQuickOpenContext, + primary: globalQuickOpenKeybinding.primary, + secondary: globalQuickOpenKeybinding.secondary, + mac: globalQuickOpenKeybinding.mac +}); + +const quickOpenNavigatePreviousInFilePickerId = 'workbench.action.quickOpenNavigatePreviousInFilePicker'; +KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: quickOpenNavigatePreviousInFilePickerId, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(50), + handler: getQuickNavigateHandler(quickOpenNavigatePreviousInFilePickerId, false), + when: defaultQuickOpenContext, + primary: globalQuickOpenKeybinding.primary | KeyMod.Shift, + secondary: [globalQuickOpenKeybinding.secondary[0] | KeyMod.Shift], + mac: { + primary: globalQuickOpenKeybinding.mac.primary | KeyMod.Shift, + secondary: null + } +}); \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/quickopen/quickopen.ts b/src/vs/workbench/browser/parts/quickopen/quickopen.ts new file mode 100644 index 0000000000000..1b2aff1fd80cc --- /dev/null +++ b/src/vs/workbench/browser/parts/quickopen/quickopen.ts @@ -0,0 +1,132 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { TPromise } from 'vs/base/common/winjs.base'; +import nls = require('vs/nls'); +import { Action } from 'vs/base/common/actions'; +import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; +import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; +import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; +import { ICommandHandler } from 'vs/platform/commands/common/commands'; + +export const inQuickOpenContext = ContextKeyExpr.has('inQuickOpen'); +export const defaultQuickOpenContextKey = 'inFilesPicker'; +export const defaultQuickOpenContext = ContextKeyExpr.and(inQuickOpenContext, ContextKeyExpr.has(defaultQuickOpenContextKey)); + +export class GlobalQuickOpenAction extends Action { + + public static ID = 'workbench.action.quickOpen'; + public static LABEL = nls.localize('quickOpen', "Go to File..."); + + constructor(id: string, label: string, @IQuickOpenService private quickOpenService: IQuickOpenService) { + super(id, label); + + this.order = 100; // Allow other actions to position before or after + this.class = 'quickopen'; + } + + public run(): TPromise { + this.quickOpenService.show(null); + + return TPromise.as(true); + } +} + +export class BaseQuickOpenNavigateAction extends Action { + + constructor( + id: string, + label: string, + private next: boolean, + private quickNavigate: boolean, + @IQuickOpenService private quickOpenService: IQuickOpenService, + @IKeybindingService private keybindingService: IKeybindingService + ) { + super(id, label); + } + + public run(event?: any): TPromise { + const keys = this.keybindingService.lookupKeybindings(this.id); + const quickNavigate = this.quickNavigate ? { keybindings: keys } : void 0; + + this.quickOpenService.navigate(this.next, quickNavigate); + + return TPromise.as(true); + } +} + +export function getQuickNavigateHandler(id: string, next?: boolean): ICommandHandler { + return accessor => { + const keybindingService = accessor.get(IKeybindingService); + const quickOpenService = accessor.get(IQuickOpenService); + + const keys = keybindingService.lookupKeybindings(id); + const quickNavigate = { keybindings: keys }; + + quickOpenService.navigate(next, quickNavigate); + }; +} + +export class QuickOpenNavigateNextAction extends BaseQuickOpenNavigateAction { + + public static ID = 'workbench.action.quickOpenNavigateNext'; + public static LABEL = nls.localize('quickNavigateNext', "Navigate Next in Quick Open"); + + constructor( + id: string, + label: string, + @IQuickOpenService quickOpenService: IQuickOpenService, + @IKeybindingService keybindingService: IKeybindingService + ) { + super(id, label, true, true, quickOpenService, keybindingService); + } +} + +export class QuickOpenNavigatePreviousAction extends BaseQuickOpenNavigateAction { + + public static ID = 'workbench.action.quickOpenNavigatePrevious'; + public static LABEL = nls.localize('quickNavigatePrevious', "Navigate Previous in Quick Open"); + + constructor( + id: string, + label: string, + @IQuickOpenService quickOpenService: IQuickOpenService, + @IKeybindingService keybindingService: IKeybindingService + ) { + super(id, label, false, true, quickOpenService, keybindingService); + } +} + +export class QuickOpenSelectNextAction extends BaseQuickOpenNavigateAction { + + public static ID = 'workbench.action.quickOpenSelectNext'; + public static LABEL = nls.localize('quickSelectNext', "Select Next in Quick Open"); + + constructor( + id: string, + label: string, + @IQuickOpenService quickOpenService: IQuickOpenService, + @IKeybindingService keybindingService: IKeybindingService + ) { + super(id, label, true, false, quickOpenService, keybindingService); + } +} + +export class QuickOpenSelectPreviousAction extends BaseQuickOpenNavigateAction { + + public static ID = 'workbench.action.quickOpenSelectPrevious'; + public static LABEL = nls.localize('quickSelectPrevious', "Select Previous in Quick Open"); + + constructor( + id: string, + label: string, + @IQuickOpenService quickOpenService: IQuickOpenService, + @IKeybindingService keybindingService: IKeybindingService + ) { + super(id, label, false, false, quickOpenService, keybindingService); + } +} \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts index bf46d02791d1b..f8bd26770d54e 100644 --- a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts +++ b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts @@ -6,7 +6,7 @@ import 'vs/css!./media/sidebarpart'; import { TPromise } from 'vs/base/common/winjs.base'; import nls = require('vs/nls'); -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import { Action } from 'vs/base/common/actions'; import { CompositePart } from 'vs/workbench/browser/parts/compositePart'; import { Viewlet, ViewletRegistry, Extensions as ViewletExtensions } from 'vs/workbench/browser/viewlet'; @@ -15,7 +15,7 @@ import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { IPartService, Parts, Position as SideBarPosition } from 'vs/workbench/services/part/common/partService'; import { IViewlet } from 'vs/workbench/common/viewlet'; -import { Scope } from 'vs/workbench/browser/actionBarRegistry'; +import { Scope } from 'vs/workbench/browser/actions'; import { IStorageService } from 'vs/platform/storage/common/storage'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IMessageService } from 'vs/platform/message/common/message'; @@ -26,7 +26,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import Event from 'vs/base/common/event'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { contrastBorder } from 'vs/platform/theme/common/colorRegistry'; -import { SIDE_BAR_TITLE_FOREGROUND, SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme'; +import { SIDE_BAR_TITLE_FOREGROUND, SIDE_BAR_BACKGROUND, SIDE_BAR_FOREGROUND, SIDE_BAR_BORDER } from 'vs/workbench/common/theme'; export class SidebarPart extends CompositePart { @@ -58,21 +58,22 @@ export class SidebarPart extends CompositePart { themeService, Registry.as(ViewletExtensions.Viewlets), SidebarPart.activeViewletSettingsKey, + Registry.as(ViewletExtensions.Viewlets).getDefaultViewletId(), 'sideBar', 'viewlet', Scope.VIEWLET, SIDE_BAR_TITLE_FOREGROUND, id, - { hasTitle: true } + { hasTitle: true, borderWidth: () => (this.getColor(SIDE_BAR_BORDER) || this.getColor(contrastBorder)) ? 1 : 0 } ); } public get onDidViewletOpen(): Event { - return this._onDidCompositeOpen.event; + return this._onDidCompositeOpen.event as Event; } public get onDidViewletClose(): Event { - return this._onDidCompositeClose.event; + return this._onDidCompositeClose.event as Event; } public updateStyles(): void { @@ -82,15 +83,16 @@ export class SidebarPart extends CompositePart { const container = this.getContainer(); container.style('background-color', this.getColor(SIDE_BAR_BACKGROUND)); + container.style('color', this.getColor(SIDE_BAR_FOREGROUND)); - const hcBorder = this.getColor(contrastBorder); + const borderColor = this.getColor(SIDE_BAR_BORDER) || this.getColor(contrastBorder); const isPositionLeft = this.partService.getSideBarPosition() === SideBarPosition.LEFT; - container.style('border-right-width', hcBorder && isPositionLeft ? '1px' : null); - container.style('border-right-style', hcBorder && isPositionLeft ? 'solid' : null); - container.style('border-right-color', isPositionLeft ? hcBorder : null); - container.style('border-left-width', hcBorder && !isPositionLeft ? '1px' : null); - container.style('border-left-style', hcBorder && !isPositionLeft ? 'solid' : null); - container.style('border-left-color', !isPositionLeft ? hcBorder : null); + container.style('border-right-width', borderColor && isPositionLeft ? '1px' : null); + container.style('border-right-style', borderColor && isPositionLeft ? 'solid' : null); + container.style('border-right-color', isPositionLeft ? borderColor : null); + container.style('border-left-width', borderColor && !isPositionLeft ? '1px' : null); + container.style('border-left-style', borderColor && !isPositionLeft ? 'solid' : null); + container.style('border-left-color', !isPositionLeft ? borderColor : null); } public openViewlet(id: string, focus?: boolean): TPromise { @@ -99,7 +101,7 @@ export class SidebarPart extends CompositePart { } // First check if sidebar is hidden and show if so - let promise = TPromise.as(null); + let promise = TPromise.as(null); if (!this.partService.isVisible(Parts.SIDEBAR_PART)) { try { this.blockOpeningViewlet = true; @@ -109,7 +111,7 @@ export class SidebarPart extends CompositePart { } } - return promise.then(() => this.openComposite(id, focus)); + return promise.then(() => this.openComposite(id, focus)) as TPromise; } public getActiveViewlet(): IViewlet { diff --git a/src/vs/workbench/browser/parts/statusbar/statusbar.ts b/src/vs/workbench/browser/parts/statusbar/statusbar.ts index 6eb4f4589303b..d46fd03dc31ba 100644 --- a/src/vs/workbench/browser/parts/statusbar/statusbar.ts +++ b/src/vs/workbench/browser/parts/statusbar/statusbar.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import { IDisposable } from 'vs/base/common/lifecycle'; import * as statusbarService from 'vs/platform/statusbar/common/statusbar'; import { SyncDescriptor0, createSyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; diff --git a/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts b/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts index 4fa06dbfe4fcf..6e89598086f80 100644 --- a/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts +++ b/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts @@ -13,7 +13,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { dispose, IDisposable } from 'vs/base/common/lifecycle'; import { Builder, $ } from 'vs/base/browser/builder'; import { OcticonLabel } from 'vs/base/browser/ui/octiconLabel/octiconLabel'; -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { Part } from 'vs/workbench/browser/part'; @@ -27,9 +27,11 @@ import { getCodeEditor } from 'vs/editor/common/services/codeEditorService'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { Action } from 'vs/base/common/actions'; import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; -import { STATUS_BAR_BACKGROUND, STATUS_BAR_FOREGROUND, STATUS_BAR_NO_FOLDER_BACKGROUND, STATUS_BAR_ITEM_HOVER_BACKGROUND, STATUS_BAR_ITEM_ACTIVE_BACKGROUND, STATUS_BAR_PROMINENT_ITEM_BACKGROUND, STATUS_BAR_PROMINENT_ITEM_HOVER_BACKGROUND } from 'vs/workbench/common/theme'; +import { STATUS_BAR_BACKGROUND, STATUS_BAR_FOREGROUND, STATUS_BAR_NO_FOLDER_BACKGROUND, STATUS_BAR_ITEM_HOVER_BACKGROUND, STATUS_BAR_ITEM_ACTIVE_BACKGROUND, STATUS_BAR_PROMINENT_ITEM_BACKGROUND, STATUS_BAR_PROMINENT_ITEM_HOVER_BACKGROUND, STATUS_BAR_BORDER, STATUS_BAR_NO_FOLDER_FOREGROUND } from 'vs/workbench/common/theme'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { contrastBorder } from 'vs/platform/theme/common/colorRegistry'; +import { isThemeColor } from 'vs/editor/common/editorCommon'; +import { Color } from 'vs/base/common/color'; export class StatusbarPart extends Part implements IStatusbarService { @@ -136,13 +138,13 @@ export class StatusbarPart extends Part implements IStatusbarService { const container = this.getContainer(); - container.style('color', this.getColor(STATUS_BAR_FOREGROUND)); + container.style('color', this.getColor(this.contextService.hasWorkspace() ? STATUS_BAR_FOREGROUND : STATUS_BAR_NO_FOLDER_FOREGROUND)); container.style('background-color', this.getColor(this.contextService.hasWorkspace() ? STATUS_BAR_BACKGROUND : STATUS_BAR_NO_FOLDER_BACKGROUND)); - const hcBorder = this.getColor(contrastBorder); - container.style('border-top-width', hcBorder ? '1px' : null); - container.style('border-top-style', hcBorder ? 'solid' : null); - container.style('border-top-color', hcBorder); + const borderColor = this.getColor(STATUS_BAR_BORDER) || this.getColor(contrastBorder); + container.style('border-top-width', borderColor ? '1px' : null); + container.style('border-top-style', borderColor ? 'solid' : null); + container.style('border-top-color', borderColor); } private doCreateStatusItem(alignment: StatusbarAlignment, priority: number = 0): HTMLElement { @@ -217,7 +219,8 @@ class StatusBarEntryItem implements IStatusbarItem { @IMessageService private messageService: IMessageService, @ITelemetryService private telemetryService: ITelemetryService, @IContextMenuService private contextMenuService: IContextMenuService, - @IWorkbenchEditorService private editorService: IWorkbenchEditorService + @IWorkbenchEditorService private editorService: IWorkbenchEditorService, + @IThemeService private themeService: IThemeService ) { this.entry = entry; @@ -249,8 +252,17 @@ class StatusBarEntryItem implements IStatusbarItem { } // Color - if (this.entry.color) { - $(textContainer).color(this.entry.color); + let color = this.entry.color; + if (color) { + if (isThemeColor(color)) { + let colorId = color.id; + color = (this.themeService.getTheme().getColor(colorId) || Color.transparent).toString(); + toDispose.push(this.themeService.onThemeChange(theme => { + let colorValue = (this.themeService.getTheme().getColor(colorId) || Color.transparent).toString(); + $(textContainer).color(colorValue); + })); + } + $(textContainer).color(color); } // Context Menu diff --git a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts index 8873d4ed56f65..53c030c64319d 100644 --- a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts +++ b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts @@ -25,12 +25,13 @@ import { IEditorGroupService } from 'vs/workbench/services/group/common/groupSer import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import nls = require('vs/nls'); import * as labels from 'vs/base/common/labels'; -import { EditorInput } from 'vs/workbench/common/editor'; +import { EditorInput, toResource } from 'vs/workbench/common/editor'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { Verbosity } from 'vs/platform/editor/common/editor'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { TITLE_BAR_ACTIVE_BACKGROUND, TITLE_BAR_ACTIVE_FOREGROUND, TITLE_BAR_INACTIVE_FOREGROUND, TITLE_BAR_INACTIVE_BACKGROUND } from 'vs/workbench/common/theme'; +import URI from 'vs/base/common/uri'; export class TitlebarPart extends Part implements ITitleService { @@ -39,7 +40,7 @@ export class TitlebarPart extends Part implements ITitleService { private static NLS_UNSUPPORTED = nls.localize('patchedWindowTitle', "[Unsupported]"); private static NLS_EXTENSION_HOST = nls.localize('devExtensionWindowTitlePrefix', "[Extension Development Host]"); private static TITLE_DIRTY = '\u25cf '; - private static TITLE_SEPARATOR = ' - '; + private static TITLE_SEPARATOR = ' — '; private titleContainer: Builder; private title: Builder; @@ -52,7 +53,6 @@ export class TitlebarPart extends Part implements ITitleService { private titleTemplate: string; private isPure: boolean; private activeEditorListeners: IDisposable[]; - private workspacePath: string; constructor( id: string, @@ -71,7 +71,6 @@ export class TitlebarPart extends Part implements ITitleService { this.isPure = true; this.activeEditorListeners = []; - this.workspacePath = contextService.hasWorkspace() ? labels.getPathLabel(contextService.getWorkspace().resource, void 0, environmentService) : ''; this.init(); @@ -100,6 +99,7 @@ export class TitlebarPart extends Part implements ITitleService { this.toUnbind.push(DOM.addDisposableListener(window, DOM.EventType.FOCUS, () => this.onFocus())); this.toUnbind.push(this.configurationService.onDidUpdateConfiguration(() => this.onConfigurationChanged(true))); this.toUnbind.push(this.editorGroupService.onEditorsChanged(() => this.onEditorsChanged())); + this.toUnbind.push(this.contextService.onDidChangeWorkspaceRoots(() => this.onDidChangeWorkspaceRoots())); } private onBlur(): void { @@ -112,6 +112,10 @@ export class TitlebarPart extends Part implements ITitleService { this.updateStyles(); } + private onDidChangeWorkspaceRoots(): void { + this.setTitle(this.getWindowTitle()); + } + private onConfigurationChanged(update?: boolean): void { const currentTitleTemplate = this.titleTemplate; this.titleTemplate = this.configurationService.lookup('window.title').value; @@ -169,22 +173,48 @@ export class TitlebarPart extends Part implements ITitleService { * {activeEditorLong}: e.g. /Users/Development/myProject/myFolder/myFile.txt * {activeEditorMedium}: e.g. myFolder/myFile.txt * {activeEditorShort}: e.g. myFile.txt - * {rootName}: e.g. myProject + * {rootName}: e.g. myFolder1, myFolder2, myFolder3 * {rootPath}: e.g. /Users/Development/myProject + * {folderName}: e.g. myFolder + * {folderPath}: e.g. /Users/Development/myFolder * {appName}: e.g. VS Code * {dirty}: indiactor * {separator}: conditional separator */ private doGetWindowTitle(): string { const input = this.editorService.getActiveEditorInput(); - const workspace = this.contextService.getWorkspace(); + const workspace = this.contextService.getWorkspace2(); + + // Compute root resource + // Single Root Workspace: always the single root workspace in this case + // Multi Root Workspace: not yet defined (TODO@Ben multi root) + let root: URI; + if (workspace) { + if (workspace.roots.length === 1) { + root = workspace.roots[0]; + } + } + + // Compute folder resource + // Single Root Workspace: always the root single workspace in this case + // Multi Root Workspace: root folder of the currently active file if any + let folder: URI; + if (workspace) { + if (workspace.roots.length === 1) { + folder = workspace.roots[0]; + } else { + folder = this.contextService.getRoot(toResource(input, { supportSideBySide: true, filter: 'file' })); + } + } // Variables const activeEditorShort = input ? input.getTitle(Verbosity.SHORT) : ''; const activeEditorMedium = input ? input.getTitle(Verbosity.MEDIUM) : activeEditorShort; const activeEditorLong = input ? input.getTitle(Verbosity.LONG) : activeEditorMedium; const rootName = workspace ? workspace.name : ''; - const rootPath = workspace ? this.workspacePath : ''; + const rootPath = workspace ? labels.getPathLabel(root, void 0, this.environmentService) : ''; + const folderName = folder ? (paths.basename(folder.fsPath) || folder.fsPath) : ''; + const folderPath = folder ? labels.getPathLabel(folder, void 0, this.environmentService) : ''; const dirty = input && input.isDirty() ? TitlebarPart.TITLE_DIRTY : ''; const appName = this.environmentService.appNameLong; const separator = TitlebarPart.TITLE_SEPARATOR; @@ -195,6 +225,8 @@ export class TitlebarPart extends Part implements ITitleService { activeEditorMedium, rootName, rootPath, + folderName, + folderPath, dirty, appName, separator: { label: separator } @@ -234,18 +266,14 @@ export class TitlebarPart extends Part implements ITitleService { // Part container const container = this.getContainer(); - container.style('color', this.getColor(this.isInactive ? TITLE_BAR_INACTIVE_FOREGROUND : TITLE_BAR_ACTIVE_FOREGROUND)); - container.style('background-color', this.getColor(this.isInactive ? TITLE_BAR_INACTIVE_BACKGROUND : TITLE_BAR_ACTIVE_BACKGROUND)); + if (container) { + container.style('color', this.getColor(this.isInactive ? TITLE_BAR_INACTIVE_FOREGROUND : TITLE_BAR_ACTIVE_FOREGROUND)); + container.style('background-color', this.getColor(this.isInactive ? TITLE_BAR_INACTIVE_BACKGROUND : TITLE_BAR_ACTIVE_BACKGROUND)); + } } private onTitleDoubleclick(): void { - this.windowService.isMaximized().then(maximized => { - if (maximized) { - this.windowService.unmaximizeWindow().done(null, errors.onUnexpectedError); - } else { - this.windowService.maximizeWindow().done(null, errors.onUnexpectedError); - } - }, errors.onUnexpectedError); + this.windowService.onWindowTitleDoubleClick().then(null, errors.onUnexpectedError); } private onContextMenu(e: MouseEvent): void { diff --git a/src/vs/workbench/browser/quickopen.ts b/src/vs/workbench/browser/quickopen.ts index 1281c2e600b36..f64144d4acccc 100644 --- a/src/vs/workbench/browser/quickopen.ts +++ b/src/vs/workbench/browser/quickopen.ts @@ -7,22 +7,33 @@ import nls = require('vs/nls'); import { TPromise } from 'vs/base/common/winjs.base'; import * as objects from 'vs/base/common/objects'; -import filters = require('vs/base/common/filters'); import arrays = require('vs/base/common/arrays'); import strings = require('vs/base/common/strings'); import types = require('vs/base/common/types'); import errors = require('vs/base/common/errors'); -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import { Action } from 'vs/base/common/actions'; import { KeyMod } from 'vs/base/common/keyCodes'; import { Mode, IEntryRunContext, IAutoFocus, IModel, IQuickNavigateConfiguration } from 'vs/base/parts/quickopen/common/quickOpen'; -import { QuickOpenEntry, IHighlight, QuickOpenEntryGroup, QuickOpenModel } from 'vs/base/parts/quickopen/browser/quickOpenModel'; +import { QuickOpenEntry, IHighlight, QuickOpenEntryGroup } from 'vs/base/parts/quickopen/browser/quickOpenModel'; import { EditorOptions, EditorInput } from 'vs/workbench/common/editor'; import { IResourceInput, IEditorInput, IEditorOptions } from 'vs/platform/editor/common/editor'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; import { AsyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; +export interface IWorkbenchQuickOpenConfiguration { + workbench: { + quickOpen: { + closeOnFocusLost: boolean; + }, + commandPalette: { + history: number; + preserveInput: boolean; + } + }; +} + export class QuickOpenHandler { /** @@ -71,7 +82,7 @@ export class QuickOpenHandler { * Indicates if the handler wishes the quick open widget to automatically select the first result entry or an entry * based on a specific prefix match. */ - public getAutoFocus(searchValue: string, quickNavigateConfiguration?: IQuickNavigateConfiguration): IAutoFocus { + public getAutoFocus(searchValue: string, context: { model: IModel, quickNavigateConfiguration?: IQuickNavigateConfiguration }): IAutoFocus { return {}; } @@ -120,18 +131,21 @@ export interface QuickOpenHandlerHelpEntry { export class QuickOpenHandlerDescriptor extends AsyncDescriptor { public prefix: string; public description: string; + public contextKey: string; public isDefault: boolean; public helpEntries: QuickOpenHandlerHelpEntry[]; public instantProgress: boolean; + private id: string; - constructor(moduleId: string, ctorName: string, prefix: string, description: string, instantProgress?: boolean); - constructor(moduleId: string, ctorName: string, prefix: string, helpEntries: QuickOpenHandlerHelpEntry[], instantProgress?: boolean); - constructor(moduleId: string, ctorName: string, prefix: string, param: any, instantProgress: boolean = false) { + constructor(moduleId: string, ctorName: string, prefix: string, contextKey: string, description: string, instantProgress?: boolean); + constructor(moduleId: string, ctorName: string, prefix: string, contextKey: string, helpEntries: QuickOpenHandlerHelpEntry[], instantProgress?: boolean); + constructor(moduleId: string, ctorName: string, prefix: string, contextKey: string, param: any, instantProgress: boolean = false) { super(moduleId, ctorName); - this.prefix = prefix; this.id = moduleId + ctorName; + this.prefix = prefix; + this.contextKey = contextKey; this.instantProgress = instantProgress; if (types.isString(param)) { @@ -288,7 +302,7 @@ export class EditorQuickOpenEntry extends QuickOpenEntry implements IEditorQuick */ export class EditorQuickOpenEntryGroup extends QuickOpenEntryGroup implements IEditorQuickOpenEntry { - public getInput(): IEditorInput { + public getInput(): IEditorInput | IResourceInput { return null; } @@ -341,94 +355,22 @@ export interface ICommandQuickOpenHandlerOptions { defaultCommand?: ICommand; } -export abstract class CommandQuickOpenHandler extends QuickOpenHandler { - +export class QuickOpenAction extends Action { private prefix: string; - private defaultCommand: ICommand; - private commands: { regexp: RegExp; command: ICommand; }[]; constructor( - @IQuickOpenService private quickOpenService: IQuickOpenService, - options: ICommandQuickOpenHandlerOptions + id: string, + label: string, + prefix: string, + @IQuickOpenService private quickOpenService: IQuickOpenService ) { - super(); - - this.prefix = options.prefix; - this.commands = options.commands.map(c => ({ - regexp: new RegExp('^(' + c.aliases.join('|') + ')\\b\\W+'), - command: c - })); - this.defaultCommand = options.defaultCommand || null; - } - - public getResults(input: string): TPromise { - let match: RegExpMatchArray; - let command = arrays.first(this.commands, c => !!(match = input.match(c.regexp))); - let promise: TPromise; - - if (command) { - promise = command.command.getResults(input.substr(match[0].length)); - } else if (this.defaultCommand) { - promise = this.defaultCommand.getResults(input); - } else { - promise = this.getCommands(input); - } - - return promise.then(e => new QuickOpenModel(e)); - } - - private getCommands(input: string): TPromise { - let entries: QuickOpenEntry[] = this.commands - .map(c => ({ command: c.command, highlights: filters.matchesFuzzy(input, c.command.aliases[0]) })) - .filter(({ command, highlights }) => !!highlights || command.aliases.some(a => input === a)) - .map(({ command, highlights }) => new CommandEntry(this.quickOpenService, this.prefix, command, highlights)); - - return TPromise.as(entries); - } - - public getClass(): string { - return null; - } - - public canRun(): boolean { - return true; - } - - public getAutoFocus(input: string): IAutoFocus { - return { autoFocusFirstEntry: true }; - } - - public onClose(canceled: boolean): void { - return; - } - - public getGroupLabel(): string { - return null; - } - - public getEmptyLabel(input: string): string { - let match: RegExpMatchArray; - let command = arrays.first(this.commands, c => !!(match = input.match(c.regexp))); - - if (!command) { - return nls.localize('noCommands', "No commands matching"); - } - - return command.command.getEmptyLabel(input); - } -} - -export class QuickOpenAction extends Action { - private prefix: string; - - constructor(actionId: string, actionLabel: string, prefix: string, @IQuickOpenService private quickOpenService: IQuickOpenService) { - super(actionId, actionLabel); + super(id, label); this.prefix = prefix; this.enabled = !!this.quickOpenService; } - public run(context?: any): TPromise { + public run(context?: any): TPromise { // Show with prefix this.quickOpenService.show(this.prefix); diff --git a/src/vs/workbench/browser/viewlet.ts b/src/vs/workbench/browser/viewlet.ts index 1ad83a799aea6..b4baf6d3d6fb5 100644 --- a/src/vs/workbench/browser/viewlet.ts +++ b/src/vs/workbench/browser/viewlet.ts @@ -7,23 +7,14 @@ import nls = require('vs/nls'); import { TPromise } from 'vs/base/common/winjs.base'; import DOM = require('vs/base/browser/dom'); import errors = require('vs/base/common/errors'); -import { Registry } from 'vs/platform/platform'; -import { Dimension, Builder, $ } from 'vs/base/browser/builder'; -import { IAction, IActionRunner, Action } from 'vs/base/common/actions'; -import { IActionItem, ActionsOrientation } from 'vs/base/browser/ui/actionbar/actionbar'; +import { Registry } from 'vs/platform/registry/common/platform'; +import { Dimension, Builder } from 'vs/base/browser/builder'; +import { Action } from 'vs/base/common/actions'; import { ITree, IFocusEvent, ISelectionEvent } from 'vs/base/parts/tree/browser/tree'; -import { prepareActions } from 'vs/workbench/browser/actionBarRegistry'; -import { ToolBar } from 'vs/base/browser/ui/toolbar/toolbar'; -import { DelayedDragHandler } from 'vs/base/browser/dnd'; -import { dispose, IDisposable } from 'vs/base/common/lifecycle'; -import { CollapsibleView, CollapsibleState, FixedCollapsibleView, IView } from 'vs/base/browser/ui/splitview/splitview'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IViewlet } from 'vs/workbench/common/viewlet'; import { Composite, CompositeDescriptor, CompositeRegistry } from 'vs/workbench/browser/composite'; -import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; -import { IMessageService } from 'vs/platform/message/common/message'; -import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; export abstract class Viewlet extends Composite implements IViewlet { @@ -286,313 +277,4 @@ export class CollapseAction extends Action { return TPromise.as(null); }); } -} - -export interface IViewletView extends IView { - create(): TPromise; - setVisible(visible: boolean): TPromise; - getActions(): IAction[]; - getSecondaryActions(): IAction[]; - getActionItem(action: IAction): IActionItem; - shutdown(): void; - focusBody(): void; - isExpanded(): boolean; -} - -/** - * The AdaptiveCollapsibleViewletView can grow with the content inside dynamically. - */ -export abstract class AdaptiveCollapsibleViewletView extends FixedCollapsibleView implements IViewletView { - protected treeContainer: HTMLElement; - protected tree: ITree; - protected toDispose: IDisposable[]; - protected isVisible: boolean; - protected toolBar: ToolBar; - protected actionRunner: IActionRunner; - protected isDisposed: boolean; - - private dragHandler: DelayedDragHandler; - - constructor( - actionRunner: IActionRunner, - initialBodySize: number, - collapsed: boolean, - private viewName: string, - private keybindingService: IKeybindingService, - protected contextMenuService: IContextMenuService - ) { - super({ - expandedBodySize: initialBodySize, - headerSize: 22, - initialState: collapsed ? CollapsibleState.COLLAPSED : CollapsibleState.EXPANDED, - ariaHeaderLabel: viewName - }); - - this.actionRunner = actionRunner; - this.toDispose = []; - } - - public create(): TPromise { - return TPromise.as(null); - } - - public renderHeader(container: HTMLElement): void { - - // Tool bar - this.toolBar = new ToolBar($('div.actions').appendTo(container).getHTMLElement(), this.contextMenuService, { - orientation: ActionsOrientation.HORIZONTAL, - actionItemProvider: (action) => this.getActionItem(action), - ariaLabel: nls.localize('viewToolbarAriaLabel', "{0} actions", this.viewName), - getKeyBinding: (action) => this.keybindingService.lookupKeybinding(action.id) - }); - this.toolBar.actionRunner = this.actionRunner; - this.toolBar.setActions(prepareActions(this.getActions()), prepareActions(this.getSecondaryActions()))(); - - // Expand on drag over - this.dragHandler = new DelayedDragHandler(container, () => { - if (!this.isExpanded()) { - this.expand(); - } - }); - } - - protected changeState(state: CollapsibleState): void { - updateTreeVisibility(this.tree, state === CollapsibleState.EXPANDED); - - super.changeState(state); - } - - protected renderViewTree(container: HTMLElement): HTMLElement { - return renderViewTree(container); - } - - public getViewer(): ITree { - return this.tree; - } - - public setVisible(visible: boolean): TPromise { - this.isVisible = visible; - - updateTreeVisibility(this.tree, visible && this.state === CollapsibleState.EXPANDED); - - return TPromise.as(null); - } - - public focusBody(): void { - focus(this.tree); - } - - protected reveal(element: any, relativeTop?: number): TPromise { - return reveal(this.tree, element, relativeTop); - } - - protected layoutBody(size: number): void { - this.treeContainer.style.height = size + 'px'; - this.tree.layout(size); - } - - public getActions(): IAction[] { - return []; - } - - public getSecondaryActions(): IAction[] { - return []; - } - - public getActionItem(action: IAction): IActionItem { - return null; - } - - public shutdown(): void { - // Subclass to implement - } - - public dispose(): void { - this.isDisposed = true; - this.treeContainer = null; - this.tree.dispose(); - - this.dragHandler.dispose(); - - this.toDispose = dispose(this.toDispose); - - if (this.toolBar) { - this.toolBar.dispose(); - } - - super.dispose(); - } -} - -export abstract class CollapsibleViewletView extends CollapsibleView implements IViewletView { - protected treeContainer: HTMLElement; - protected tree: ITree; - protected toDispose: IDisposable[]; - protected isVisible: boolean; - protected toolBar: ToolBar; - protected actionRunner: IActionRunner; - protected isDisposed: boolean; - - private dragHandler: DelayedDragHandler; - - constructor( - actionRunner: IActionRunner, - collapsed: boolean, - private viewName: string, - protected messageService: IMessageService, - protected keybindingService: IKeybindingService, - protected contextMenuService: IContextMenuService, - headerSize?: number - ) { - super({ - minimumSize: 2 * 22, - initialState: collapsed ? CollapsibleState.COLLAPSED : CollapsibleState.EXPANDED, - ariaHeaderLabel: viewName, - headerSize - }); - - this.actionRunner = actionRunner; - this.toDispose = []; - } - - protected changeState(state: CollapsibleState): void { - updateTreeVisibility(this.tree, state === CollapsibleState.EXPANDED); - - super.changeState(state); - } - - public create(): TPromise { - return TPromise.as(null); - } - - public renderHeader(container: HTMLElement): void { - - // Tool bar - this.toolBar = new ToolBar($('div.actions').appendTo(container).getHTMLElement(), this.contextMenuService, { - orientation: ActionsOrientation.HORIZONTAL, - actionItemProvider: (action) => this.getActionItem(action), - ariaLabel: nls.localize('viewToolbarAriaLabel', "{0} actions", this.viewName), - getKeyBinding: (action) => this.keybindingService.lookupKeybinding(action.id) - }); - this.toolBar.actionRunner = this.actionRunner; - this.toolBar.setActions(prepareActions(this.getActions()), prepareActions(this.getSecondaryActions()))(); - - // Expand on drag over - this.dragHandler = new DelayedDragHandler(container, () => { - if (!this.isExpanded()) { - this.expand(); - } - }); - } - - protected renderViewTree(container: HTMLElement): HTMLElement { - return renderViewTree(container); - } - - public getViewer(): ITree { - return this.tree; - } - - public setVisible(visible: boolean): TPromise { - this.isVisible = visible; - - updateTreeVisibility(this.tree, visible && this.state === CollapsibleState.EXPANDED); - - return TPromise.as(null); - } - - public focusBody(): void { - focus(this.tree); - } - - protected reveal(element: any, relativeTop?: number): TPromise { - return reveal(this.tree, element, relativeTop); - } - - public layoutBody(size: number): void { - this.treeContainer.style.height = size + 'px'; - this.tree.layout(size); - } - - public getActions(): IAction[] { - return []; - } - - public getSecondaryActions(): IAction[] { - return []; - } - - public getActionItem(action: IAction): IActionItem { - return null; - } - - public shutdown(): void { - // Subclass to implement - } - - public dispose(): void { - this.isDisposed = true; - this.treeContainer = null; - this.tree.dispose(); - - if (this.dragHandler) { - this.dragHandler.dispose(); - } - - this.toDispose = dispose(this.toDispose); - - if (this.toolBar) { - this.toolBar.dispose(); - } - - super.dispose(); - } -} - -function renderViewTree(container: HTMLElement): HTMLElement { - const treeContainer = document.createElement('div'); - container.appendChild(treeContainer); - - return treeContainer; -} - -function updateTreeVisibility(tree: ITree, isVisible: boolean): void { - if (!tree) { - return; - } - - if (isVisible) { - $(tree.getHTMLElement()).show(); - } else { - $(tree.getHTMLElement()).hide(); // make sure the tree goes out of the tabindex world by hiding it - } - - if (isVisible) { - tree.onVisible(); - } else { - tree.onHidden(); - } -} - -function focus(tree: ITree): void { - if (!tree) { - return; // return early if viewlet has not yet been created - } - - // Make sure the current selected element is revealed - const selection = tree.getSelection(); - if (selection.length > 0) { - reveal(tree, selection[0], 0.5).done(null, errors.onUnexpectedError); - } - - // Pass Focus to Viewer - tree.DOMFocus(); -} - -function reveal(tree: ITree, element: any, relativeTop?: number): TPromise { - if (!tree) { - return TPromise.as(null); // return early if viewlet has not yet been created - } - - return tree.reveal(element, relativeTop); } \ No newline at end of file diff --git a/src/vs/workbench/buildfile.js b/src/vs/workbench/buildfile.js index 4f4a708604073..4b83a39ab1020 100644 --- a/src/vs/workbench/buildfile.js +++ b/src/vs/workbench/buildfile.js @@ -15,11 +15,8 @@ function createModuleDescription(name, exclude) { return result; } -exports.collectModules = function (excludes) { +exports.collectModules = function () { var modules = [ - createModuleDescription('vs/workbench/parts/git/node/gitApp', []), - createModuleDescription('vs/workbench/parts/git/node/askpass', []), - createModuleDescription('vs/workbench/parts/output/common/outputLinkComputer', ['vs/base/common/worker/simpleWorker', 'vs/editor/common/services/editorSimpleWorker']), createModuleDescription('vs/workbench/parts/debug/node/telemetryApp', []), @@ -27,8 +24,11 @@ exports.collectModules = function (excludes) { createModuleDescription('vs/workbench/services/search/node/searchApp', []), createModuleDescription('vs/workbench/services/search/node/worker/searchWorkerApp', []), createModuleDescription('vs/workbench/services/files/node/watcher/unix/watcherApp', []), + createModuleDescription('vs/workbench/services/files/node/watcher/nsfw/watcherApp', []), + + createModuleDescription('vs/workbench/node/extensionHostProcess', []), - createModuleDescription('vs/workbench/node/extensionHostProcess', []) + createModuleDescription('vs/workbench/parts/terminal/node/terminalProcess', []) ]; return modules; diff --git a/src/vs/workbench/common/actionRegistry.ts b/src/vs/workbench/common/actionRegistry.ts index 95669c4d86e3b..2f23215eb95e0 100644 --- a/src/vs/workbench/common/actionRegistry.ts +++ b/src/vs/workbench/common/actionRegistry.ts @@ -6,7 +6,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import collections = require('vs/base/common/collections'); -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import { IAction } from 'vs/base/common/actions'; import { KeybindingsRegistry, ICommandAndKeybindingRule } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { IPartService } from 'vs/workbench/services/part/common/partService'; diff --git a/src/vs/workbench/common/component.ts b/src/vs/workbench/common/component.ts index 8a238f9868cac..99cafcca30ccc 100644 --- a/src/vs/workbench/common/component.ts +++ b/src/vs/workbench/common/component.ts @@ -58,7 +58,7 @@ export class Component extends Themable implements IWorkbenchComponent { * Mementos are shared across components with the same id. This means that multiple components * with the same id will store data into the same data structure. */ - protected getMemento(storageService: IStorageService, scope: Scope = Scope.GLOBAL): any { + protected getMemento(storageService: IStorageService, scope: Scope = Scope.GLOBAL): object { return this.componentMemento.getMemento(storageService, scope); } diff --git a/src/vs/workbench/common/contributions.ts b/src/vs/workbench/common/contributions.ts index b1c6cdb41b706..47841f217691e 100644 --- a/src/vs/workbench/common/contributions.ts +++ b/src/vs/workbench/common/contributions.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { Registry, BaseRegistry } from 'vs/platform/platform'; +import { Registry, BaseRegistry } from 'vs/platform/registry/common/platform'; import { IInstantiationService, IConstructorSignature0 } from 'vs/platform/instantiation/common/instantiation'; // --- Workbench Contribution Registry diff --git a/src/vs/workbench/common/editor.ts b/src/vs/workbench/common/editor.ts index c89cfe4455b96..dfb127cc30aae 100644 --- a/src/vs/workbench/common/editor.ts +++ b/src/vs/workbench/common/editor.ts @@ -10,14 +10,11 @@ import * as objects from 'vs/base/common/objects'; import types = require('vs/base/common/types'); import URI from 'vs/base/common/uri'; import { IDisposable, dispose, Disposable } from 'vs/base/common/lifecycle'; -import { IEditor, ICommonCodeEditor, IEditorViewState, IModel } from 'vs/editor/common/editorCommon'; +import { IEditor, IEditorViewState, IModel } from 'vs/editor/common/editorCommon'; import { IEditorInput, IEditorModel, IEditorOptions, ITextEditorOptions, IBaseResourceInput, Position, Verbosity } from 'vs/platform/editor/common/editor'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { IInstantiationService, IConstructorSignature0 } from 'vs/platform/instantiation/common/instantiation'; import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; -import * as editorOptions from 'vs/editor/common/config/editorOptions'; export const TextCompareEditorVisible = new RawContextKey('textCompareEditorVisible', false); @@ -588,7 +585,6 @@ export class TextEditorOptions extends EditorOptions { private revealInCenterIfOutsideViewport: boolean; private editorViewState: IEditorViewState; - private editorOptions: editorOptions.IEditorOptions; public static from(input: IBaseResourceInput): TextEditorOptions { let options: TextEditorOptions = null; @@ -631,7 +627,7 @@ export class TextEditorOptions extends EditorOptions { } if (input.options.viewState) { - options.editorViewState = input.options.viewState; + options.editorViewState = input.options.viewState as IEditorViewState; } if (typeof input.options.index === 'number') { @@ -645,7 +641,7 @@ export class TextEditorOptions extends EditorOptions { /** * Helper to create TextEditorOptions inline. */ - public static create(settings: ITextEditorOptions): TextEditorOptions { + public static create(settings: ITextEditorOptions = Object.create(null)): TextEditorOptions { const options = new TextEditorOptions(); options.preserveFocus = settings.preserveFocus; options.forceOpen = settings.forceOpen; @@ -685,24 +681,15 @@ export class TextEditorOptions extends EditorOptions { } /** - * Sets the view state to be used when the editor is opening. + * Create a TextEditorOptions inline to be used when the editor is opening. */ - public fromEditor(editor: IEditor): void { + public static fromEditor(editor: IEditor, settings?: IEditorOptions): TextEditorOptions { + const options = TextEditorOptions.create(settings); // View state - this.editorViewState = editor.saveViewState(); - - // Selected editor options - const codeEditor = editor; - if (typeof codeEditor.getConfiguration === 'function') { - const config = codeEditor.getConfiguration(); - if (config && config.viewInfo && config.wrappingInfo) { - this.editorOptions = Object.create(null); - this.editorOptions.renderWhitespace = config.viewInfo.renderWhitespace; - this.editorOptions.renderControlCharacters = config.viewInfo.renderControlCharacters; - this.editorOptions.wordWrap = config.wrappingInfo.isViewportWrapping ? 'on' : 'off'; - } - } + options.editorViewState = editor.saveViewState(); + + return options; } /** @@ -712,11 +699,6 @@ export class TextEditorOptions extends EditorOptions { */ public apply(editor: IEditor): boolean { - // Editor options - if (this.editorOptions) { - editor.updateOptions(this.editorOptions); - } - // View state return this.applyViewState(editor); } @@ -816,25 +798,6 @@ export class TextDiffEditorOptions extends TextEditorOptions { public autoRevealFirstChange: boolean; } -/** - * Helper to return all opened editors with resources not belonging to the currently opened workspace. - */ -export function getOutOfWorkspaceEditorResources(editorGroupService: IEditorGroupService, contextService: IWorkspaceContextService): URI[] { - const resources: URI[] = []; - - editorGroupService.getStacksModel().groups.forEach(group => { - const editors = group.getEditors(); - editors.forEach(editor => { - const fileResource = toResource(editor, { supportSideBySide: true, filter: 'file' }); - if (fileResource && !contextService.isInsideWorkspace(fileResource)) { - resources.push(fileResource); - } - }); - }); - - return resources; -} - export interface IStacksModelChangeEvent { group: IEditorGroup; editor?: IEditorInput; @@ -844,7 +807,9 @@ export interface IStacksModelChangeEvent { export interface IEditorStacksModel { onModelChanged: Event; - onEditorClosed: Event; + + onWillCloseEditor: Event; + onEditorClosed: Event; groups: IEditorGroup[]; activeGroup: IEditorGroup; @@ -893,8 +858,7 @@ export interface IEditorContext extends IEditorIdentifier { event?: any; } -export interface IGroupEvent { - editor: IEditorInput; +export interface IEditorCloseEvent extends IEditorIdentifier { pinned: boolean; index: number; } diff --git a/src/vs/workbench/common/editor/diffEditorInput.ts b/src/vs/workbench/common/editor/diffEditorInput.ts index df3376af92127..6d7b5cbfdaea5 100644 --- a/src/vs/workbench/common/editor/diffEditorInput.ts +++ b/src/vs/workbench/common/editor/diffEditorInput.ts @@ -70,7 +70,7 @@ export class DiffEditorInput extends SideBySideEditorInput { private createModel(refresh?: boolean): TPromise { // Join resolve call over two inputs and build diff editor model - return TPromise.join([ + return TPromise.join([ this.originalInput.resolve(refresh), this.modifiedInput.resolve(refresh) ]).then((models) => { diff --git a/src/vs/workbench/common/editor/diffEditorModel.ts b/src/vs/workbench/common/editor/diffEditorModel.ts index e12b560ef53bd..47c74e1daf359 100644 --- a/src/vs/workbench/common/editor/diffEditorModel.ts +++ b/src/vs/workbench/common/editor/diffEditorModel.ts @@ -6,16 +6,17 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { EditorModel } from 'vs/workbench/common/editor'; +import { IEditorModel } from 'vs/platform/editor/common/editor'; /** * The base editor model for the diff editor. It is made up of two editor models, the original version * and the modified version. */ export class DiffEditorModel extends EditorModel { - protected _originalModel: EditorModel; - protected _modifiedModel: EditorModel; + protected _originalModel: IEditorModel; + protected _modifiedModel: IEditorModel; - constructor(originalModel: EditorModel, modifiedModel: EditorModel) { + constructor(originalModel: IEditorModel, modifiedModel: IEditorModel) { super(); this._originalModel = originalModel; @@ -23,15 +24,15 @@ export class DiffEditorModel extends EditorModel { } public get originalModel(): EditorModel { - return this._originalModel; + return this._originalModel as EditorModel; } public get modifiedModel(): EditorModel { - return this._modifiedModel; + return this._modifiedModel as EditorModel; } public load(): TPromise { - return TPromise.join([ + return TPromise.join([ this._originalModel.load(), this._modifiedModel.load() ]).then(() => { @@ -40,7 +41,7 @@ export class DiffEditorModel extends EditorModel { } public isResolved(): boolean { - return this._originalModel.isResolved() && this._modifiedModel.isResolved(); + return this.originalModel.isResolved() && this.modifiedModel.isResolved(); } public dispose(): void { diff --git a/src/vs/workbench/common/editor/editorStacksModel.ts b/src/vs/workbench/common/editor/editorStacksModel.ts index 00e7d3722c29c..2191d20535c2f 100644 --- a/src/vs/workbench/common/editor/editorStacksModel.ts +++ b/src/vs/workbench/common/editor/editorStacksModel.ts @@ -6,18 +6,18 @@ 'use strict'; import Event, { Emitter, once } from 'vs/base/common/event'; -import { IEditorRegistry, Extensions, EditorInput, toResource, IEditorStacksModel, IEditorGroup, IEditorIdentifier, IGroupEvent, GroupIdentifier, IStacksModelChangeEvent, IWorkbenchEditorConfiguration, EditorOpenPositioning, SideBySideEditorInput } from 'vs/workbench/common/editor'; +import { IEditorRegistry, Extensions, EditorInput, toResource, IEditorStacksModel, IEditorGroup, IEditorIdentifier, IEditorCloseEvent, GroupIdentifier, IStacksModelChangeEvent, IWorkbenchEditorConfiguration, EditorOpenPositioning, SideBySideEditorInput } from 'vs/workbench/common/editor'; import URI from 'vs/base/common/uri'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; import { dispose, IDisposable } from 'vs/base/common/lifecycle'; -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import { Position, Direction } from 'vs/platform/editor/common/editor'; import { ResourceMap } from 'vs/base/common/map'; -export interface GroupEvent extends IGroupEvent { +export interface EditorCloseEvent extends IEditorCloseEvent { editor: EditorInput; } @@ -63,7 +63,7 @@ export class EditorGroup implements IEditorGroup { private _onEditorActivated: Emitter; private _onEditorOpened: Emitter; - private _onEditorClosed: Emitter; + private _onEditorClosed: Emitter; private _onEditorDisposed: Emitter; private _onEditorDirty: Emitter; private _onEditorLabelChange: Emitter; @@ -88,7 +88,7 @@ export class EditorGroup implements IEditorGroup { this._onEditorActivated = new Emitter(); this._onEditorOpened = new Emitter(); - this._onEditorClosed = new Emitter(); + this._onEditorClosed = new Emitter(); this._onEditorDisposed = new Emitter(); this._onEditorDirty = new Emitter(); this._onEditorLabelChange = new Emitter(); @@ -110,7 +110,7 @@ export class EditorGroup implements IEditorGroup { } private registerListeners(): void { - this.toDispose.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated(e.config))); + this.toDispose.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated(this.configurationService.getConfiguration()))); } private onConfigurationUpdated(config: IWorkbenchEditorConfiguration): void { @@ -143,7 +143,7 @@ export class EditorGroup implements IEditorGroup { return this._onEditorOpened.event; } - public get onEditorClosed(): Event { + public get onEditorClosed(): Event { return this._onEditorClosed.event; } @@ -277,8 +277,7 @@ export class EditorGroup implements IEditorGroup { targetIndex--; // accomodate for the fact that the preview editor closes } - this.closeEditor(this.preview, !makeActive); // optimization to prevent multiple setActive() in one call - this.splice(targetIndex, false, editor); + this.replaceEditor(this.preview, editor, targetIndex, !makeActive); } this.preview = editor; @@ -345,10 +344,31 @@ export class EditorGroup implements IEditorGroup { })); } + public replaceEditor(toReplace: EditorInput, replaceWidth: EditorInput, replaceIndex: number, openNext = true): void { + const event = this.doCloseEditor(toReplace, openNext); // optimization to prevent multiple setActive() in one call + + // We want to first add the new editor into our model before emitting the close event because + // firing the close event can trigger a dispose on the same editor that is now being added. + // This can lead into opening a disposed editor which is not what we want. + this.splice(replaceIndex, false, replaceWidth); + + if (event) { + this.fireEvent(this._onEditorClosed, event, true); + } + } + public closeEditor(editor: EditorInput, openNext = true): void { + const event = this.doCloseEditor(editor, openNext); + + if (event) { + this.fireEvent(this._onEditorClosed, event, true); + } + } + + private doCloseEditor(editor: EditorInput, openNext = true): EditorCloseEvent { const index = this.indexOf(editor); if (index === -1) { - return; // not found + return null; // not found } // Active Editor closed @@ -376,7 +396,7 @@ export class EditorGroup implements IEditorGroup { this.splice(index, true); // Event - this.fireEvent(this._onEditorClosed, { editor, pinned, index }, true); + return { editor, pinned, index, group: this }; } public closeEditors(except: EditorInput, direction?: Direction): void { @@ -507,7 +527,7 @@ export class EditorGroup implements IEditorGroup { return !this.matches(this.preview, editor); } - private fireEvent(emitter: Emitter, arg2: EditorInput | GroupEvent, isStructuralChange: boolean): void { + private fireEvent(emitter: Emitter, arg2: EditorInput | EditorCloseEvent, isStructuralChange: boolean): void { emitter.fire(arg2); if (isStructuralChange) { @@ -699,11 +719,15 @@ export class EditorStacksModel implements IEditorStacksModel { private _onGroupActivated: Emitter; private _onGroupDeactivated: Emitter; private _onGroupRenamed: Emitter; + private _onEditorDisposed: Emitter; private _onEditorDirty: Emitter; private _onEditorLabelChange: Emitter; private _onEditorOpened: Emitter; - private _onEditorClosed: Emitter; + + private _onWillCloseEditor: Emitter; + private _onEditorClosed: Emitter; + private _onModelChanged: Emitter; constructor( @@ -728,9 +752,10 @@ export class EditorStacksModel implements IEditorStacksModel { this._onEditorDirty = new Emitter(); this._onEditorLabelChange = new Emitter(); this._onEditorOpened = new Emitter(); - this._onEditorClosed = new Emitter(); + this._onWillCloseEditor = new Emitter(); + this._onEditorClosed = new Emitter(); - this.toDispose.push(this._onGroupOpened, this._onGroupClosed, this._onGroupActivated, this._onGroupDeactivated, this._onGroupMoved, this._onGroupRenamed, this._onModelChanged, this._onEditorDisposed, this._onEditorDirty, this._onEditorLabelChange, this._onEditorClosed); + this.toDispose.push(this._onGroupOpened, this._onGroupClosed, this._onGroupActivated, this._onGroupDeactivated, this._onGroupMoved, this._onGroupRenamed, this._onModelChanged, this._onEditorDisposed, this._onEditorDirty, this._onEditorLabelChange, this._onEditorClosed, this._onWillCloseEditor); this.registerListeners(); } @@ -783,7 +808,11 @@ export class EditorStacksModel implements IEditorStacksModel { return this._onEditorOpened.event; } - public get onEditorClosed(): Event { + public get onWillCloseEditor(): Event { + return this._onWillCloseEditor.event; + } + + public get onEditorClosed(): Event { return this._onEditorClosed.event; } @@ -1055,7 +1084,11 @@ export class EditorStacksModel implements IEditorStacksModel { private save(): void { const serialized = this.serialize(); - this.storageService.store(EditorStacksModel.STORAGE_KEY, JSON.stringify(serialized), StorageScope.WORKSPACE); + if (serialized.groups.length) { + this.storageService.store(EditorStacksModel.STORAGE_KEY, JSON.stringify(serialized), StorageScope.WORKSPACE); + } else { + this.storageService.remove(EditorStacksModel.STORAGE_KEY, StorageScope.WORKSPACE); + } } private serialize(): ISerializedEditorStacksModel { @@ -1155,6 +1188,7 @@ export class EditorStacksModel implements IEditorStacksModel { unbind.push(group.onEditorStateChanged(editor => this._onModelChanged.fire({ group, editor }))); unbind.push(group.onEditorOpened(editor => this._onEditorOpened.fire({ editor, group }))); unbind.push(group.onEditorClosed(event => { + this._onWillCloseEditor.fire(event); this.handleOnEditorClosed(event); this._onEditorClosed.fire(event); })); @@ -1170,7 +1204,7 @@ export class EditorStacksModel implements IEditorStacksModel { return group; } - private handleOnEditorClosed(event: GroupEvent): void { + private handleOnEditorClosed(event: EditorCloseEvent): void { const editor = event.editor; const editorsToClose = [editor]; diff --git a/src/vs/workbench/common/editor/rangeDecorations.ts b/src/vs/workbench/common/editor/rangeDecorations.ts index 322f0cb7c2651..730062404f4d8 100644 --- a/src/vs/workbench/common/editor/rangeDecorations.ts +++ b/src/vs/workbench/common/editor/rangeDecorations.ts @@ -9,9 +9,10 @@ import Event, { Emitter } from 'vs/base/common/event'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { toResource } from 'vs/workbench/common/editor'; -import { isEqual } from 'vs/platform/files/common/files'; +import { isEqual } from 'vs/base/common/paths'; import { IRange } from 'vs/editor/common/core/range'; import { CursorChangeReason, ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; export interface IRangeHighlightDecoration { resource: URI; @@ -91,12 +92,19 @@ export class RangeHighlightDecorations implements IDisposable { this.editorDisposables = []; } - private createRangeHighlightDecoration(isWholeLine: boolean = true): editorCommon.IModelDecorationOptions { - return { - stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, - className: 'rangeHighlight', - isWholeLine - }; + private static _WHOLE_LINE_RANGE_HIGHLIGHT = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + className: 'rangeHighlight', + isWholeLine: true + }); + + private static _RANGE_HIGHLIGHT = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + className: 'rangeHighlight' + }); + + private createRangeHighlightDecoration(isWholeLine: boolean = true): ModelDecorationOptions { + return (isWholeLine ? RangeHighlightDecorations._WHOLE_LINE_RANGE_HIGHLIGHT : RangeHighlightDecorations._RANGE_HIGHLIGHT); } public dispose() { diff --git a/src/vs/workbench/common/editor/resourceEditorInput.ts b/src/vs/workbench/common/editor/resourceEditorInput.ts index b99b12ecd05e9..3c33a6d16ecbd 100644 --- a/src/vs/workbench/common/editor/resourceEditorInput.ts +++ b/src/vs/workbench/common/editor/resourceEditorInput.ts @@ -9,7 +9,7 @@ import { EditorInput, ITextEditorModel } from 'vs/workbench/common/editor'; import URI from 'vs/base/common/uri'; import { IReference } from 'vs/base/common/lifecycle'; import { telemetryURIDescriptor } from 'vs/platform/telemetry/common/telemetryUtils'; -import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; +import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { ResourceEditorModel } from 'vs/workbench/common/editor/resourceEditorModel'; /** @@ -29,7 +29,7 @@ export class ResourceEditorInput extends EditorInput { name: string, description: string, resource: URI, - @ITextModelResolverService private textModelResolverService: ITextModelResolverService + @ITextModelService private textModelResolverService: ITextModelService ) { super(); @@ -86,7 +86,7 @@ export class ResourceEditorInput extends EditorInput { if (!(model instanceof ResourceEditorModel)) { ref.dispose(); this.modelReference = null; - return TPromise.wrapError(`Unexpected model for ResourceInput: ${this.resource}`); // TODO@Ben eventually also files should be supported, but we guard due to the dangerous dispose of the model in dispose() + return TPromise.wrapError(new Error(`Unexpected model for ResourceInput: ${this.resource}`)); // TODO@Ben eventually also files should be supported, but we guard due to the dangerous dispose of the model in dispose() } return model; diff --git a/src/vs/workbench/common/editor/stringEditorInput.ts b/src/vs/workbench/common/editor/stringEditorInput.ts deleted file mode 100644 index bf5b0489b871c..0000000000000 --- a/src/vs/workbench/common/editor/stringEditorInput.ts +++ /dev/null @@ -1,131 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { TPromise } from 'vs/base/common/winjs.base'; -import { PLAINTEXT_MODE_ID } from 'vs/editor/common/modes/modesRegistry'; -import { EditorModel, EditorInput } from 'vs/workbench/common/editor'; -import { StringEditorModel } from 'vs/workbench/common/editor/stringEditorModel'; -import URI from 'vs/base/common/uri'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; - -/** - * A read-only text editor input whos contents are made of the provided value and mode ID. - */ -export class StringEditorInput extends EditorInput { - - public static ID = 'workbench.editors.stringEditorInput'; - - protected cachedModel: StringEditorModel; - - protected value: string; - - private name: string; - private description: string; - private modeId: string; - private singleton: boolean; - - constructor( - name: string, - description: string, - value: string, - modeId: string, - singleton: boolean, - @IInstantiationService private instantiationService: IInstantiationService - ) { - super(); - - this.name = name; - this.description = description; - this.value = value; - this.modeId = modeId || PLAINTEXT_MODE_ID; - this.singleton = singleton; - } - - protected getResource(): URI { - return null; // Subclasses can implement to associate a resource with the input - } - - public getTypeId(): string { - return StringEditorInput.ID; - } - - public getName(): string { - return this.name; - } - - public getDescription(): string { - return this.description; - } - - public getValue(): string { - return this.value; - } - - /** - * Sets the textual value of this input and will also update the underlying model if this input is resolved. - */ - public setValue(value: string): void { - this.value = value; - if (this.cachedModel) { - this.cachedModel.setValue(value); - } - } - - public resolve(refresh?: boolean): TPromise { - - // Use Cached Model - if (this.cachedModel) { - return TPromise.as(this.cachedModel); - } - - //Otherwise Create Model and Load - let model = this.instantiationService.createInstance(StringEditorModel, this.value, this.modeId, this.getResource()); - return model.load().then((resolvedModel: StringEditorModel) => { - this.cachedModel = resolvedModel; - - return this.cachedModel; - }); - } - - public matches(otherInput: any): boolean { - if (super.matches(otherInput) === true) { - return true; - } - - if (otherInput instanceof StringEditorInput) { - let otherStringEditorInput = otherInput; - - // If both inputs are singletons, check on the modeId for equalness - if (otherStringEditorInput.singleton && this.singleton && otherStringEditorInput.modeId === this.modeId) { - return true; - } - - // If we have resource URIs, use those to compare - const resource = this.getResource(); - const otherResource = otherStringEditorInput.getResource(); - if (resource && otherResource) { - return resource.toString() === otherResource.toString(); - } - - // Otherwise compare by properties - return otherStringEditorInput.value === this.value && - otherStringEditorInput.modeId === this.modeId && - otherStringEditorInput.description === this.description && - otherStringEditorInput.name === this.name; - } - - return false; - } - - public dispose(): void { - if (this.cachedModel) { - this.cachedModel.dispose(); - this.cachedModel = null; - } - - super.dispose(); - } -} \ No newline at end of file diff --git a/src/vs/workbench/common/editor/stringEditorModel.ts b/src/vs/workbench/common/editor/stringEditorModel.ts deleted file mode 100644 index bee71a6bb7bf4..0000000000000 --- a/src/vs/workbench/common/editor/stringEditorModel.ts +++ /dev/null @@ -1,67 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { TPromise } from 'vs/base/common/winjs.base'; -import { BaseTextEditorModel } from 'vs/workbench/common/editor/textEditorModel'; -import { EditorModel } from 'vs/workbench/common/editor'; -import URI from 'vs/base/common/uri'; -import { IModeService } from 'vs/editor/common/services/modeService'; -import { IModelService } from 'vs/editor/common/services/modelService'; - -/** - * An editor model whith an in-memory, readonly content that is not backed by any particular resource. - */ -export class StringEditorModel extends BaseTextEditorModel { - protected value: string; - protected modeId: string; - protected resource: URI; - - constructor( - value: string, - modeId: string, - resource: URI, - @IModeService modeService: IModeService, - @IModelService modelService: IModelService - ) { - super(modelService, modeService); - - this.value = value; - this.modeId = modeId; - this.resource = resource; - } - - /** - * The value of this string editor model. - */ - public getValue(): string { - return this.value; - } - - /** - * Sets the value of this string editor model. - */ - public setValue(value: string): void { - this.value = value; - if (this.textEditorModel) { - this.textEditorModel.setValue(value); - } - } - - public load(): TPromise { - - // Create text editor model if not yet done - if (!this.textEditorModel) { - return this.createTextEditorModel(this.value, this.resource, this.modeId); - } - - // Otherwise update - else { - this.updateTextEditorModel(this.value); - } - - return TPromise.as(this); - } -} \ No newline at end of file diff --git a/src/vs/workbench/common/editor/untitledEditorInput.ts b/src/vs/workbench/common/editor/untitledEditorInput.ts index 753220ec1baf4..081b9bd7df419 100644 --- a/src/vs/workbench/common/editor/untitledEditorInput.ts +++ b/src/vs/workbench/common/editor/untitledEditorInput.ts @@ -26,12 +26,8 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment' export class UntitledEditorInput extends EditorInput implements IEncodingSupport { public static ID: string = 'workbench.editors.untitledEditorInput'; - public static SCHEMA: string = 'untitled'; - private resource: URI; private _hasAssociatedFilePath: boolean; - private initialValue: string; - private modeId: string; private cachedModel: UntitledEditorModel; private modelResolve: TPromise; @@ -41,10 +37,11 @@ export class UntitledEditorInput extends EditorInput implements IEncodingSupport private toUnbind: IDisposable[]; constructor( - resource: URI, + private resource: URI, hasAssociatedFilePath: boolean, - modeId: string, - initialValue: string, + private modeId: string, + private initialValue: string, + private preferredEncoding: string, @IInstantiationService private instantiationService: IInstantiationService, @IWorkspaceContextService private contextService: IWorkspaceContextService, @ITextFileService private textFileService: ITextFileService, @@ -52,11 +49,9 @@ export class UntitledEditorInput extends EditorInput implements IEncodingSupport ) { super(); - this.resource = resource; - this.initialValue = initialValue; this._hasAssociatedFilePath = hasAssociatedFilePath; - this.modeId = modeId; this.toUnbind = []; + this._onDidModelChangeContent = new Emitter(); this._onDidModelChangeEncoding = new Emitter(); } @@ -147,16 +142,18 @@ export class UntitledEditorInput extends EditorInput implements IEncodingSupport return this.cachedModel.getEncoding(); } - return null; + return this.preferredEncoding; } public setEncoding(encoding: string, mode: EncodingMode /* ignored, we only have Encode */): void { + this.preferredEncoding = encoding; + if (this.cachedModel) { this.cachedModel.setEncoding(encoding); } } - public resolve(refresh?: boolean): TPromise { + public resolve(): TPromise { // Join a model resolve if we have had one before if (this.modelResolve) { @@ -171,7 +168,7 @@ export class UntitledEditorInput extends EditorInput implements IEncodingSupport } private createModel(): UntitledEditorModel { - const model = this.instantiationService.createInstance(UntitledEditorModel, this.modeId, this.resource, this.hasAssociatedFilePath, this.initialValue); + const model = this.instantiationService.createInstance(UntitledEditorModel, this.modeId, this.resource, this.hasAssociatedFilePath, this.initialValue, this.preferredEncoding); // re-emit some events from the model this.toUnbind.push(model.onDidChangeContent(() => this._onDidModelChangeContent.fire())); diff --git a/src/vs/workbench/common/editor/untitledEditorModel.ts b/src/vs/workbench/common/editor/untitledEditorModel.ts index bd0bb5300b1b0..89903fd66b76f 100644 --- a/src/vs/workbench/common/editor/untitledEditorModel.ts +++ b/src/vs/workbench/common/editor/untitledEditorModel.ts @@ -6,7 +6,7 @@ import { IDisposable } from 'vs/base/common/lifecycle'; import { TPromise } from 'vs/base/common/winjs.base'; -import { EditorModel, IEncodingSupport } from 'vs/workbench/common/editor'; +import { IEncodingSupport } from 'vs/workbench/common/editor'; import { BaseTextEditorModel } from 'vs/workbench/common/editor/textEditorModel'; import URI from 'vs/base/common/uri'; import { PLAINTEXT_MODE_ID } from 'vs/editor/common/modes/modesRegistry'; @@ -38,16 +38,13 @@ export class UntitledEditorModel extends BaseTextEditorModel implements IEncodin private contentChangeEventScheduler: RunOnceScheduler; private configuredEncoding: string; - private preferredEncoding: string; - - private hasAssociatedFilePath: boolean; - private initialValue: string; constructor( private modeId: string, private resource: URI, - hasAssociatedFilePath: boolean, - initialValue: string, + private hasAssociatedFilePath: boolean, + private initialValue: string, + private preferredEncoding: string, @IModeService modeService: IModeService, @IModelService modelService: IModelService, @IBackupFileService private backupFileService: IBackupFileService, @@ -56,8 +53,6 @@ export class UntitledEditorModel extends BaseTextEditorModel implements IEncodin ) { super(modelService, modeService); - this.hasAssociatedFilePath = hasAssociatedFilePath; - this.initialValue = initialValue; this.dirty = false; this.versionId = 0; @@ -93,7 +88,7 @@ export class UntitledEditorModel extends BaseTextEditorModel implements IEncodin private registerListeners(): void { // Config Changes - this.configurationChangeListener = this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationChange(e.config)); + this.configurationChangeListener = this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationChange(this.configurationService.getConfiguration())); } private onConfigurationChange(configuration: IFilesConfiguration): void { @@ -158,7 +153,7 @@ export class UntitledEditorModel extends BaseTextEditorModel implements IEncodin this.contentChangeEventScheduler.schedule(); } - public load(): TPromise { + public load(): TPromise { // Check for backups first return this.backupFileService.loadBackupResource(this.resource).then(backupResource => { @@ -188,11 +183,11 @@ export class UntitledEditorModel extends BaseTextEditorModel implements IEncodin }); } - private doLoad(content: string): TPromise { + private doLoad(content: string): TPromise { // Create text editor model if not yet done if (!this.textEditorModel) { - return this.createTextEditorModel(content, this.resource, this.modeId); + return this.createTextEditorModel(content, this.resource, this.modeId).then(model => this); } // Otherwise update @@ -200,7 +195,7 @@ export class UntitledEditorModel extends BaseTextEditorModel implements IEncodin this.updateTextEditorModel(content); } - return TPromise.as(this); + return TPromise.as(this); } private onModelContentChanged(): void { diff --git a/src/vs/workbench/common/memento.ts b/src/vs/workbench/common/memento.ts index 78881e90d8751..eff56087e986b 100644 --- a/src/vs/workbench/common/memento.ts +++ b/src/vs/workbench/common/memento.ts @@ -46,7 +46,7 @@ export class Memento { * provided, the scope will be global, Memento.Scope.WORKSPACE can be used to * scope the memento to the workspace. */ - public getMemento(storageService: IStorageService, scope: Scope = Scope.GLOBAL): any { + public getMemento(storageService: IStorageService, scope: Scope = Scope.GLOBAL): object { // Scope by Workspace if (scope === Scope.WORKSPACE) { @@ -89,7 +89,7 @@ export class Memento { class ScopedMemento { private id: string; - private mementoObj: any; + private mementoObj: object; private scope: Scope; constructor(id: string, scope: Scope, private storageService: IStorageService) { @@ -98,11 +98,11 @@ class ScopedMemento { this.mementoObj = this.loadMemento(); } - public getMemento(): any { + public getMemento(): object { return this.mementoObj; } - private loadMemento(): any { + private loadMemento(): object { let storageScope = this.scope === Scope.GLOBAL ? StorageScope.GLOBAL : StorageScope.WORKSPACE; let memento = this.storageService.get(this.id, storageScope); if (memento) { diff --git a/src/vs/workbench/common/resourceContextKey.ts b/src/vs/workbench/common/resourceContextKey.ts deleted file mode 100644 index e5d9c6999e072..0000000000000 --- a/src/vs/workbench/common/resourceContextKey.ts +++ /dev/null @@ -1,50 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import URI from 'vs/base/common/uri'; -import { basename } from 'vs/base/common/paths'; -import { RawContextKey, IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; -import { IModeService } from 'vs/editor/common/services/modeService'; - -export class ResourceContextKey implements IContextKey { - - static Scheme = new RawContextKey('resourceScheme', undefined); - static Filename = new RawContextKey('resourceFilename', undefined); - static LangId = new RawContextKey('resourceLangId', undefined); - static Resource = new RawContextKey('resource', undefined); - - private _resourceKey: IContextKey; - private _schemeKey: IContextKey; - private _filenameKey: IContextKey; - private _langIdKey: IContextKey; - - constructor( - @IContextKeyService contextKeyService: IContextKeyService, - @IModeService private _modeService: IModeService - ) { - this._schemeKey = ResourceContextKey.Scheme.bindTo(contextKeyService); - this._filenameKey = ResourceContextKey.Filename.bindTo(contextKeyService); - this._langIdKey = ResourceContextKey.LangId.bindTo(contextKeyService); - this._resourceKey = ResourceContextKey.Resource.bindTo(contextKeyService); - } - - set(value: URI) { - this._resourceKey.set(value); - this._schemeKey.set(value && value.scheme); - this._filenameKey.set(value && basename(value.fsPath)); - this._langIdKey.set(value && this._modeService.getModeIdByFilenameOrFirstLine(value.fsPath)); - } - - reset(): void { - this._schemeKey.reset(); - this._langIdKey.reset(); - this._resourceKey.reset(); - } - - public get(): URI { - return this._resourceKey.get(); - } -} \ No newline at end of file diff --git a/src/vs/workbench/common/resources.ts b/src/vs/workbench/common/resources.ts new file mode 100644 index 0000000000000..6acefead117c7 --- /dev/null +++ b/src/vs/workbench/common/resources.ts @@ -0,0 +1,176 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import URI from 'vs/base/common/uri'; +import objects = require('vs/base/common/objects'); +import paths = require('vs/base/common/paths'); +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import Event, { Emitter } from 'vs/base/common/event'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import { ParsedExpression, IExpression } from 'vs/base/common/glob'; +import { basename } from 'vs/base/common/paths'; +import { RawContextKey, IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; +import { IModeService } from 'vs/editor/common/services/modeService'; + +export class ResourceContextKey implements IContextKey { + + static Scheme = new RawContextKey('resourceScheme', undefined); + static Filename = new RawContextKey('resourceFilename', undefined); + static LangId = new RawContextKey('resourceLangId', undefined); + static Resource = new RawContextKey('resource', undefined); + + private _resourceKey: IContextKey; + private _schemeKey: IContextKey; + private _filenameKey: IContextKey; + private _langIdKey: IContextKey; + + constructor( + @IContextKeyService contextKeyService: IContextKeyService, + @IModeService private _modeService: IModeService + ) { + this._schemeKey = ResourceContextKey.Scheme.bindTo(contextKeyService); + this._filenameKey = ResourceContextKey.Filename.bindTo(contextKeyService); + this._langIdKey = ResourceContextKey.LangId.bindTo(contextKeyService); + this._resourceKey = ResourceContextKey.Resource.bindTo(contextKeyService); + } + + set(value: URI) { + this._resourceKey.set(value); + this._schemeKey.set(value && value.scheme); + this._filenameKey.set(value && basename(value.fsPath)); + this._langIdKey.set(value && this._modeService.getModeIdByFilenameOrFirstLine(value.fsPath)); + } + + reset(): void { + this._schemeKey.reset(); + this._langIdKey.reset(); + this._resourceKey.reset(); + } + + public get(): URI { + return this._resourceKey.get(); + } +} + +export class ResourceGlobMatcher { + + private static readonly NO_ROOT = null; + + private _onExpressionChange: Emitter; + private toUnbind: IDisposable[]; + private mapRootToParsedExpression: Map; + private mapRootToExpressionConfig: Map; + + constructor( + private globFn: (root?: URI) => IExpression, + private parseFn: (expression: IExpression) => ParsedExpression, + @IWorkspaceContextService private contextService: IWorkspaceContextService, + @IConfigurationService private configurationService: IConfigurationService + ) { + this.toUnbind = []; + + this.mapRootToParsedExpression = new Map(); + this.mapRootToExpressionConfig = new Map(); + + this._onExpressionChange = new Emitter(); + this.toUnbind.push(this._onExpressionChange); + + this.updateExcludes(false); + + this.registerListeners(); + } + + public get onExpressionChange(): Event { + return this._onExpressionChange.event; + } + + private registerListeners(): void { + this.toUnbind.push(this.configurationService.onDidUpdateConfiguration(() => this.onConfigurationChanged())); + this.toUnbind.push(this.contextService.onDidChangeWorkspaceRoots(() => this.onDidChangeWorkspaceRoots())); + } + + private onConfigurationChanged(): void { + this.updateExcludes(true); + } + + private onDidChangeWorkspaceRoots(): void { + this.updateExcludes(true); + } + + private updateExcludes(fromEvent: boolean): void { + let changed = false; + + // Add excludes per workspaces that got added + if (this.contextService.hasWorkspace()) { + this.contextService.getWorkspace2().roots.forEach(root => { + const rootExcludes = this.globFn(root); + if (!this.mapRootToExpressionConfig.has(root.toString()) || !objects.equals(this.mapRootToExpressionConfig.get(root.toString()), rootExcludes)) { + changed = true; + + this.mapRootToParsedExpression.set(root.toString(), this.parseFn(rootExcludes)); + this.mapRootToExpressionConfig.set(root.toString(), objects.clone(rootExcludes)); + } + }); + } + + // Remove excludes per workspace no longer present + this.mapRootToExpressionConfig.forEach((value, root) => { + if (root === ResourceGlobMatcher.NO_ROOT) { + return; // always keep this one + } + + if (!this.contextService.getRoot(URI.parse(root))) { + this.mapRootToParsedExpression.delete(root); + this.mapRootToExpressionConfig.delete(root); + + changed = true; + } + }); + + // Always set for resources outside root as well + const globalExcludes = this.globFn(); + if (!this.mapRootToExpressionConfig.has(ResourceGlobMatcher.NO_ROOT) || !objects.equals(this.mapRootToExpressionConfig.get(ResourceGlobMatcher.NO_ROOT), globalExcludes)) { + changed = true; + + this.mapRootToParsedExpression.set(ResourceGlobMatcher.NO_ROOT, this.parseFn(globalExcludes)); + this.mapRootToExpressionConfig.set(ResourceGlobMatcher.NO_ROOT, objects.clone(globalExcludes)); + } + + if (fromEvent && changed) { + this._onExpressionChange.fire(); + } + } + + public matches(resource: URI): boolean { + const root = this.contextService.getRoot(resource); + + let expressionForRoot: ParsedExpression; + if (root && this.mapRootToParsedExpression.has(root.toString())) { + expressionForRoot = this.mapRootToParsedExpression.get(root.toString()); + } else { + expressionForRoot = this.mapRootToParsedExpression.get(ResourceGlobMatcher.NO_ROOT); + } + + // If the resource if from a workspace, convert its absolute path to a relative + // path so that glob patterns have a higher probability to match. For example + // a glob pattern of "src/**" will not match on an absolute path "/folder/src/file.txt" + // but can match on "src/file.txt" + let resourcePathToMatch: string; + if (root) { + resourcePathToMatch = paths.normalize(paths.relative(root.fsPath, resource.fsPath)); + } else { + resourcePathToMatch = resource.fsPath; + } + + return !!expressionForRoot(resourcePathToMatch); + } + + public dispose(): void { + this.toUnbind = dispose(this.toUnbind); + } +} \ No newline at end of file diff --git a/src/vs/workbench/common/theme.ts b/src/vs/workbench/common/theme.ts index 1eefe98d8ff3c..65746b39738e1 100644 --- a/src/vs/workbench/common/theme.ts +++ b/src/vs/workbench/common/theme.ts @@ -4,125 +4,125 @@ *--------------------------------------------------------------------------------------------*/ import nls = require('vs/nls'); -import { registerColor, editorBackground, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; +import { registerColor, editorBackground, contrastBorder, transparent, lighten, darken } from 'vs/platform/theme/common/colorRegistry'; import { IDisposable, Disposable, dispose } from 'vs/base/common/lifecycle'; import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; -import { Color, RGBA } from 'vs/base/common/color'; +import { Color } from 'vs/base/common/color'; // < --- Tabs --- > -export const TABS_CONTAINER_BACKGROUND = registerColor('tabsContainerBackground', { - dark: '#252526', - light: '#F3F3F3', - hc: null -}, nls.localize('tabsContainerBackground', "Background color of the tabs container. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); - -export const TAB_ACTIVE_BACKGROUND = registerColor('tabActiveBackground', { +export const TAB_ACTIVE_BACKGROUND = registerColor('tab.activeBackground', { dark: editorBackground, light: editorBackground, hc: editorBackground }, nls.localize('tabActiveBackground', "Active tab background color. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); -export const TAB_INACTIVE_BACKGROUND = registerColor('tabInactiveBackground', { +export const TAB_INACTIVE_BACKGROUND = registerColor('tab.inactiveBackground', { dark: '#2D2D2D', light: '#ECECEC', hc: null }, nls.localize('tabInactiveBackground', "Inactive tab background color. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); -export const TAB_BORDER = registerColor('tabBorder', { +export const TAB_BORDER = registerColor('tab.border', { dark: '#252526', light: '#F3F3F3', hc: contrastBorder }, nls.localize('tabBorder', "Border to separate tabs from each other. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); -export const TAB_ACTIVE_GROUP_ACTIVE_FOREGROUND = registerColor('tabActiveEditorGroupActiveForeground', { +export const TAB_ACTIVE_FOREGROUND = registerColor('tab.activeForeground', { dark: Color.white, - light: Color.fromRGBA(new RGBA(51, 51, 51)), + light: '#333333', hc: Color.white -}, nls.localize('tabActiveEditorGroupActiveForeground', "Active tab foreground color in an active group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); +}, nls.localize('tabActiveForeground', "Active tab foreground color in an active group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); -export const TAB_ACTIVE_GROUP_INACTIVE_FOREGROUND = registerColor('tabActiveEditorGroupInactiveForeground', { - dark: Color.white.transparent(0.5), - light: Color.fromRGBA(new RGBA(51, 51, 51)).transparent(0.7), +export const TAB_INACTIVE_FOREGROUND = registerColor('tab.inactiveForeground', { + dark: transparent(TAB_ACTIVE_FOREGROUND, 0.5), + light: transparent(TAB_ACTIVE_FOREGROUND, 0.5), hc: Color.white -}, nls.localize('tabActiveEditorGroupInactiveForeground', "Active tab foreground color in an inactive group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); +}, nls.localize('tabInactiveForeground', "Inactive tab foreground color in an active group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); -export const TAB_INACTIVE_GROUP_ACTIVE_FOREGROUND = registerColor('tabInactiveEditorGroupActiveForeground', { - dark: Color.white.transparent(0.5), - light: Color.fromRGBA(new RGBA(51, 51, 51)).transparent(0.5), +export const TAB_UNFOCUSED_ACTIVE_FOREGROUND = registerColor('tab.unfocusedActiveForeground', { + dark: transparent(TAB_ACTIVE_FOREGROUND, 0.5), + light: transparent(TAB_ACTIVE_FOREGROUND, 0.7), hc: Color.white -}, nls.localize('tabInactiveEditorGroupActiveForeground', "Inactive tab foreground color in an active group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); +}, nls.localize('tabUnfocusedActiveForeground', "Active tab foreground color in an inactive group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); -export const TAB_INACTIVE_GROUP_INACTIVE_FOREGROUND = registerColor('tabInactiveEditorGroupInactiveForeground', { - dark: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.5).transparent(0.5), - light: Color.fromRGBA(new RGBA(51, 51, 51)).transparent(0.5).transparent(0.7), +export const TAB_UNFOCUSED_INACTIVE_FOREGROUND = registerColor('tab.unfocusedInactiveForeground', { + dark: transparent(TAB_INACTIVE_FOREGROUND, 0.5), + light: transparent(TAB_INACTIVE_FOREGROUND, 0.5), hc: Color.white -}, nls.localize('tabInactiveEditorGroupInactiveForeground', "Inactive tab foreground color in an inactive group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); - +}, nls.localize('tabUnfocusedInactiveForeground', "Inactive tab foreground color in an inactive group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); // < --- Editors --- > -export const EDITOR_GROUP_BACKGROUND = registerColor('editorGroupBackground', { +export const EDITOR_GROUP_BACKGROUND = registerColor('editorGroup.background', { dark: '#2D2D2D', light: '#ECECEC', hc: null }, nls.localize('editorGroupBackground', "Background color of an editor group. Editor groups are the containers of editors. The background color shows up when dragging editor groups around.")); -export const EDITOR_GROUP_HEADER_BACKGROUND = registerColor('editorGroupHeaderBackground', { +export const EDITOR_GROUP_HEADER_TABS_BACKGROUND = registerColor('editorGroupHeader.tabsBackground', { + dark: '#252526', + light: '#F3F3F3', + hc: null +}, nls.localize('tabsContainerBackground', "Background color of the editor group title header when tabs are enabled. Editor groups are the containers of editors.")); + +export const EDITOR_GROUP_HEADER_TABS_BORDER = registerColor('editorGroupHeader.tabsBorder', { + dark: null, + light: null, + hc: contrastBorder +}, nls.localize('tabsContainerBorder', "Border color of the editor group title header when tabs are enabled. Editor groups are the containers of editors.")); + +export const EDITOR_GROUP_HEADER_NO_TABS_BACKGROUND = registerColor('editorGroupHeader.noTabsBackground', { dark: editorBackground, light: editorBackground, hc: editorBackground }, nls.localize('editorGroupHeaderBackground', "Background color of the editor group title header when tabs are disabled. Editor groups are the containers of editors.")); -export const EDITOR_GROUP_BORDER_COLOR = registerColor('editorGroupBorder', { +export const EDITOR_GROUP_BORDER = registerColor('editorGroup.border', { dark: '#444444', light: '#E7E7E7', hc: contrastBorder }, nls.localize('editorGroupBorder', "Color to separate multiple editor groups from each other. Editor groups are the containers of editors.")); -export const EDITOR_DRAG_AND_DROP_BACKGROUND = registerColor('editorDragAndDropBackground', { - dark: Color.fromRGBA(new RGBA(83, 89, 93)).transparent(0.5), - light: Color.fromRGBA(new RGBA(51, 153, 255)).transparent(0.18), +export const EDITOR_DRAG_AND_DROP_BACKGROUND = registerColor('editorGroup.dropBackground', { + dark: Color.fromHex('#53595D').transparent(0.5), + light: Color.fromHex('#3399FF').transparent(0.18), hc: null -}, nls.localize('editorDragAndDropBackground', "Background color when dragging editors around.")); +}, nls.localize('editorDragAndDropBackground', "Background color when dragging editors around. The color should have transparency so that the editor contents can still shine through.")); -export const EDITOR_MASTER_DETAILS_BORDER = registerColor('editorMasterDetailsBorder', { - dark: '#000000', - light: '#DDDDDD', - hc: null -}, nls.localize('editorMasterDetailsBorder', "Border color to separate the details from the master side for side by side editors. Examples include diff editors and the settings editor.")); // < --- Panels --- > -export const PANEL_BACKGROUND = registerColor('panelBackground', { +export const PANEL_BACKGROUND = registerColor('panel.background', { dark: editorBackground, light: editorBackground, hc: editorBackground }, nls.localize('panelBackground', "Panel background color. Panels are shown below the editor area and contain views like output and integrated terminal.")); -export const PANEL_BORDER_COLOR = registerColor('panelBorder', { - dark: Color.fromRGBA(new RGBA(128, 128, 128)).transparent(0.35), - light: Color.fromRGBA(new RGBA(128, 128, 128)).transparent(0.35), +export const PANEL_BORDER = registerColor('panel.border', { + dark: Color.fromHex('#808080').transparent(0.35), + light: Color.fromHex('#808080').transparent(0.35), hc: contrastBorder }, nls.localize('panelBorder', "Panel border color on the top separating to the editor. Panels are shown below the editor area and contain views like output and integrated terminal.")); -export const PANEL_ACTIVE_TITLE_COLOR = registerColor('panelActiveTitleForeground', { +export const PANEL_ACTIVE_TITLE_FOREGROUND = registerColor('panelTitle.activeForeground', { dark: '#E7E7E7', light: '#424242', hc: Color.white }, nls.localize('panelActiveTitleForeground', "Title color for the active panel. Panels are shown below the editor area and contain views like output and integrated terminal.")); -export const PANEL_INACTIVE_TITLE_COLOR = registerColor('panelInactiveTitleForeground', { - dark: Color.fromRGBA(new RGBA(231, 231, 231)).transparent(0.5), - light: Color.fromRGBA(new RGBA(66, 66, 66)).transparent(0.75), +export const PANEL_INACTIVE_TITLE_FOREGROUND = registerColor('panelTitle.inactiveForeground', { + dark: transparent(PANEL_ACTIVE_TITLE_FOREGROUND, 0.5), + light: transparent(PANEL_ACTIVE_TITLE_FOREGROUND, 0.75), hc: Color.white }, nls.localize('panelInactiveTitleForeground', "Title color for the inactive panel. Panels are shown below the editor area and contain views like output and integrated terminal.")); -export const PANEL_ACTIVE_TITLE_BORDER = registerColor('panelActiveTitleBorder', { - dark: '#404047', - light: '#CCCEDA', +export const PANEL_ACTIVE_TITLE_BORDER = registerColor('panelTitle.activeBorder', { + dark: PANEL_BORDER, + light: PANEL_BORDER, hc: contrastBorder }, nls.localize('panelActiveTitleBorder', "Border color for the active panel title. Panels are shown below the editor area and contain views like output and integrated terminal.")); @@ -130,43 +130,55 @@ export const PANEL_ACTIVE_TITLE_BORDER = registerColor('panelActiveTitleBorder', // < --- Status --- > -export const STATUS_BAR_FOREGROUND = registerColor('statusBarForeground', { +export const STATUS_BAR_FOREGROUND = registerColor('statusBar.foreground', { dark: '#FFFFFF', light: '#FFFFFF', hc: '#FFFFFF' }, nls.localize('statusBarForeground', "Status bar foreground color. The status bar is shown in the bottom of the window.")); -export const STATUS_BAR_BACKGROUND = registerColor('statusBarBackground', { +export const STATUS_BAR_BACKGROUND = registerColor('statusBar.background', { dark: '#007ACC', light: '#007ACC', hc: null }, nls.localize('statusBarBackground', "Standard status bar background color. The status bar is shown in the bottom of the window.")); -export const STATUS_BAR_NO_FOLDER_BACKGROUND = registerColor('statusBarNoFolderBackground', { +export const STATUS_BAR_BORDER = registerColor('statusBar.border', { + dark: null, + light: null, + hc: contrastBorder +}, nls.localize('statusBarBorder', "Status bar border color separating to the sidebar and editor. The status bar is shown in the bottom of the window.")); + +export const STATUS_BAR_NO_FOLDER_BACKGROUND = registerColor('statusBar.noFolderBackground', { dark: '#68217A', light: '#68217A', hc: null }, nls.localize('statusBarNoFolderBackground', "Status bar background color when no folder is opened. The status bar is shown in the bottom of the window.")); -export const STATUS_BAR_ITEM_ACTIVE_BACKGROUND = registerColor('statusBarItemActiveBackground', { - dark: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.18), - light: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.18), - hc: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.18) +export const STATUS_BAR_NO_FOLDER_FOREGROUND = registerColor('statusBar.noFolderForeground', { + dark: STATUS_BAR_FOREGROUND, + light: STATUS_BAR_FOREGROUND, + hc: STATUS_BAR_FOREGROUND +}, nls.localize('statusBarNoFolderForeground', "Status bar foreground color when no folder is opened. The status bar is shown in the bottom of the window.")); + +export const STATUS_BAR_ITEM_ACTIVE_BACKGROUND = registerColor('statusBarItem.activeBackground', { + dark: Color.white.transparent(0.18), + light: Color.white.transparent(0.18), + hc: Color.white.transparent(0.18) }, nls.localize('statusBarItemActiveBackground', "Status bar item background color when clicking. The status bar is shown in the bottom of the window.")); -export const STATUS_BAR_ITEM_HOVER_BACKGROUND = registerColor('statusBarItemHoverBackground', { - dark: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.12), - light: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.12), - hc: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.12) +export const STATUS_BAR_ITEM_HOVER_BACKGROUND = registerColor('statusBarItem.hoverBackground', { + dark: Color.white.transparent(0.12), + light: Color.white.transparent(0.12), + hc: Color.white.transparent(0.12) }, nls.localize('statusBarItemHoverBackground', "Status bar item background color when hovering. The status bar is shown in the bottom of the window.")); -export const STATUS_BAR_PROMINENT_ITEM_BACKGROUND = registerColor('statusBarProminentItemBackground', { +export const STATUS_BAR_PROMINENT_ITEM_BACKGROUND = registerColor('statusBarItem.prominentBackground', { dark: '#388A34', light: '#388A34', hc: '#3883A4' }, nls.localize('statusBarProminentItemBackground', "Status bar prominent items background color. Prominent items stand out from other status bar entries to indicate importance. The status bar is shown in the bottom of the window.")); -export const STATUS_BAR_PROMINENT_ITEM_HOVER_BACKGROUND = registerColor('statusBarProminentItemHoverBackground', { +export const STATUS_BAR_PROMINENT_ITEM_HOVER_BACKGROUND = registerColor('statusBarItem.prominentHoverBackground', { dark: '#369432', light: '#369432', hc: '#369432' @@ -176,31 +188,37 @@ export const STATUS_BAR_PROMINENT_ITEM_HOVER_BACKGROUND = registerColor('statusB // < --- Activity Bar --- > -export const ACTIVITY_BAR_BACKGROUND = registerColor('activityBarBackground', { +export const ACTIVITY_BAR_BACKGROUND = registerColor('activityBar.background', { dark: '#333333', light: '#2C2C2C', hc: '#000000' }, nls.localize('activityBarBackground', "Activity bar background color. The activity bar is showing on the far left or right and allows to switch between views of the side bar.")); -export const ACTIVITY_BAR_FOREGROUND = registerColor('activityBarForeground', { +export const ACTIVITY_BAR_FOREGROUND = registerColor('activityBar.foreground', { dark: Color.white, light: Color.white, hc: Color.white }, nls.localize('activityBarForeground', "Activity bar foreground color (e.g. used for the icons). The activity bar is showing on the far left or right and allows to switch between views of the side bar.")); -export const ACTIVITY_BAR_DRAG_AND_DROP_BACKGROUND = registerColor('activityBarDragAndDropBackground', { - dark: '#403F3F', - light: '#403F3F', - hc: '#403F3F' -}, nls.localize('activityBarDragAndDropBackground', "Drag and drop feedback color for the activity bar items. The activity bar is showing on the far left or right and allows to switch between views of the side bar.")); +export const ACTIVITY_BAR_BORDER = registerColor('activityBar.border', { + dark: null, + light: null, + hc: contrastBorder +}, nls.localize('activityBarBorder', "Activity bar border color separating to the side bar. The activity bar is showing on the far left or right and allows to switch between views of the side bar.")); + +export const ACTIVITY_BAR_DRAG_AND_DROP_BACKGROUND = registerColor('activityBar.dropBackground', { + dark: Color.white.transparent(0.12), + light: Color.white.transparent(0.12), + hc: Color.white.transparent(0.12), +}, nls.localize('activityBarDragAndDropBackground', "Drag and drop feedback color for the activity bar items. The color should have transparency so that the activity bar entries can still shine through. The activity bar is showing on the far left or right and allows to switch between views of the side bar.")); -export const ACTIVITY_BAR_BADGE_BACKGROUND = registerColor('activityBarBadgeBackground', { +export const ACTIVITY_BAR_BADGE_BACKGROUND = registerColor('activityBarBadge.background', { dark: '#007ACC', light: '#007ACC', hc: '#000000' }, nls.localize('activityBarBadgeBackground', "Activity notification badge background color. The activity bar is showing on the far left or right and allows to switch between views of the side bar.")); -export const ACTIVITY_BAR_BADGE_FOREGROUND = registerColor('activityBarBadgeForeground', { +export const ACTIVITY_BAR_BADGE_FOREGROUND = registerColor('activityBarBadge.foreground', { dark: Color.white, light: Color.white, hc: Color.white @@ -210,66 +228,138 @@ export const ACTIVITY_BAR_BADGE_FOREGROUND = registerColor('activityBarBadgeFore // < --- Side Bar --- > -export const SIDE_BAR_BACKGROUND = registerColor('sideBarBackground', { +export const SIDE_BAR_BACKGROUND = registerColor('sideBar.background', { dark: '#252526', light: '#F3F3F3', hc: '#000000' }, nls.localize('sideBarBackground', "Side bar background color. The side bar is the container for views like explorer and search.")); -export const SIDE_BAR_TITLE_FOREGROUND = registerColor('sideBarTitleForeground', { - dark: '#BBBBBB', - light: '#6f6f6f', - hc: '#FFFFFF' +export const SIDE_BAR_FOREGROUND = registerColor('sideBar.foreground', { + dark: null, + light: null, + hc: null +}, nls.localize('sideBarForeground', "Side bar foreground color. The side bar is the container for views like explorer and search.")); + +export const SIDE_BAR_BORDER = registerColor('sideBar.border', { + dark: null, + light: null, + hc: contrastBorder +}, nls.localize('sideBarBorder', "Side bar border color on the side separating to the editor. The side bar is the container for views like explorer and search.")); + +export const SIDE_BAR_TITLE_FOREGROUND = registerColor('sideBarTitle.foreground', { + dark: SIDE_BAR_FOREGROUND, + light: SIDE_BAR_FOREGROUND, + hc: SIDE_BAR_FOREGROUND }, nls.localize('sideBarTitleForeground', "Side bar title foreground color. The side bar is the container for views like explorer and search.")); -export const SIDE_BAR_SECTION_HEADER_BACKGROUND = registerColor('sideBarSectionHeaderBackground', { +export const SIDE_BAR_SECTION_HEADER_BACKGROUND = registerColor('sideBarSectionHeader.background', { dark: Color.fromHex('#808080').transparent(0.2), light: Color.fromHex('#808080').transparent(0.2), hc: null }, nls.localize('sideBarSectionHeaderBackground', "Side bar section header background color. The side bar is the container for views like explorer and search.")); +export const SIDE_BAR_SECTION_HEADER_FOREGROUND = registerColor('sideBarSectionHeader.foreground', { + dark: SIDE_BAR_FOREGROUND, + light: SIDE_BAR_FOREGROUND, + hc: SIDE_BAR_FOREGROUND +}, nls.localize('sideBarSectionHeaderForeground', "Side bar section header foreground color. The side bar is the container for views like explorer and search.")); + // < --- Title Bar --- > -export const TITLE_BAR_ACTIVE_FOREGROUND = registerColor('titleBarActiveForeground', { +export const TITLE_BAR_ACTIVE_FOREGROUND = registerColor('titleBar.activeForeground', { dark: '#CCCCCC', light: '#333333', hc: '#FFFFFF' }, nls.localize('titleBarActiveForeground', "Title bar foreground when the window is active. Note that this color is currently only supported on macOS.")); -export const TITLE_BAR_INACTIVE_FOREGROUND = registerColor('titleBarInactiveForeground', { - dark: Color.fromRGBA(new RGBA(204, 204, 204)).transparent(0.6), - light: Color.fromRGBA(new RGBA(51, 51, 51)).transparent(0.6), +export const TITLE_BAR_INACTIVE_FOREGROUND = registerColor('titleBar.inactiveForeground', { + dark: transparent(TITLE_BAR_ACTIVE_FOREGROUND, 0.6), + light: transparent(TITLE_BAR_ACTIVE_FOREGROUND, 0.6), hc: null }, nls.localize('titleBarInactiveForeground', "Title bar foreground when the window is inactive. Note that this color is currently only supported on macOS.")); -export const TITLE_BAR_ACTIVE_BACKGROUND = registerColor('titleBarActiveBackground', { +export const TITLE_BAR_ACTIVE_BACKGROUND = registerColor('titleBar.activeBackground', { dark: '#3C3C3C', light: '#DDDDDD', hc: '#000000' }, nls.localize('titleBarActiveBackground', "Title bar background when the window is active. Note that this color is currently only supported on macOS.")); -export const TITLE_BAR_INACTIVE_BACKGROUND = registerColor('titleBarInactiveBackground', { - dark: Color.fromRGBA(new RGBA(60, 60, 60)).transparent(0.6), - light: Color.fromRGBA(new RGBA(221, 221, 221)).transparent(0.6), +export const TITLE_BAR_INACTIVE_BACKGROUND = registerColor('titleBar.inactiveBackground', { + dark: transparent(TITLE_BAR_ACTIVE_BACKGROUND, 0.6), + light: transparent(TITLE_BAR_ACTIVE_BACKGROUND, 0.6), hc: null }, nls.localize('titleBarInactiveBackground', "Title bar background when the window is inactive. Note that this color is currently only supported on macOS.")); // < --- Notifications --- > -export const NOTIFICATIONS_FOREGROUND = registerColor('notificationsForeground', { +export const NOTIFICATIONS_FOREGROUND = registerColor('notification.foreground', { dark: '#EEEEEE', light: '#EEEEEE', hc: '#FFFFFF' }, nls.localize('notificationsForeground', "Notifications foreground color. Notifications slide in from the top of the window.")); -export const NOTIFICATIONS_BACKGROUND = registerColor('notificationsBackground', { +export const NOTIFICATIONS_BACKGROUND = registerColor('notification.background', { dark: '#333333', light: '#2C2C2C', hc: '#000000' }, nls.localize('notificationsBackground', "Notifications background color. Notifications slide in from the top of the window.")); +export const NOTIFICATIONS_BUTTON_BACKGROUND = registerColor('notification.buttonBackground', { + dark: '#0E639C', + light: '#007ACC', + hc: null +}, nls.localize('notificationsButtonBackground', "Notifications button background color. Notifications slide in from the top of the window.")); + +export const NOTIFICATIONS_BUTTON_HOVER_BACKGROUND = registerColor('notification.buttonHoverBackground', { + dark: lighten(NOTIFICATIONS_BUTTON_BACKGROUND, 0.2), + light: darken(NOTIFICATIONS_BUTTON_BACKGROUND, 0.2), + hc: null +}, nls.localize('notificationsButtonHoverBackground', "Notifications button background color when hovering. Notifications slide in from the top of the window.")); + +export const NOTIFICATIONS_BUTTON_FOREGROUND = registerColor('notification.buttonForeground', { + dark: Color.white, + light: Color.white, + hc: Color.white +}, nls.localize('notificationsButtonForeground', "Notifications button foreground color. Notifications slide in from the top of the window.")); + +export const NOTIFICATIONS_INFO_BACKGROUND = registerColor('notification.infoBackground', { + dark: '#007acc', + light: '#007acc', + hc: contrastBorder +}, nls.localize('notificationsInfoBackground', "Notifications info background color. Notifications slide in from the top of the window.")); + +export const NOTIFICATIONS_INFO_FOREGROUND = registerColor('notification.infoForeground', { + dark: NOTIFICATIONS_FOREGROUND, + light: NOTIFICATIONS_FOREGROUND, + hc: null +}, nls.localize('notificationsInfoForeground', "Notifications info foreground color. Notifications slide in from the top of the window.")); + +export const NOTIFICATIONS_WARNING_BACKGROUND = registerColor('notification.warningBackground', { + dark: '#B89500', + light: '#B89500', + hc: contrastBorder +}, nls.localize('notificationsWarningBackground', "Notifications warning background color. Notifications slide in from the top of the window.")); + +export const NOTIFICATIONS_WARNING_FOREGROUND = registerColor('notification.warningForeground', { + dark: NOTIFICATIONS_FOREGROUND, + light: NOTIFICATIONS_FOREGROUND, + hc: null +}, nls.localize('notificationsWarningForeground', "Notifications warning foreground color. Notifications slide in from the top of the window.")); + +export const NOTIFICATIONS_ERROR_BACKGROUND = registerColor('notification.errorBackground', { + dark: '#BE1100', + light: '#BE1100', + hc: contrastBorder +}, nls.localize('notificationsErrorBackground', "Notifications error background color. Notifications slide in from the top of the window.")); + +export const NOTIFICATIONS_ERROR_FOREGROUND = registerColor('notification.errorForeground', { + dark: NOTIFICATIONS_FOREGROUND, + light: NOTIFICATIONS_FOREGROUND, + hc: null +}, nls.localize('notificationsErrorForeground', "Notifications error foreground color. Notifications slide in from the top of the window.")); + /** * Base class for all themable workbench components. */ @@ -303,8 +393,12 @@ export class Themable extends Disposable { // Subclasses to override } - protected getColor(id: string): string { - const color = this.theme.getColor(id); + protected getColor(id: string, modify?: (color: Color, theme: ITheme) => Color): string { + let color = this.theme.getColor(id); + + if (color && modify) { + color = modify(color, this.theme); + } return color ? color.toString() : null; } diff --git a/src/vs/workbench/electron-browser/actions.ts b/src/vs/workbench/electron-browser/actions.ts index 1c9f9e8c1b22d..7d08abc534c34 100644 --- a/src/vs/workbench/electron-browser/actions.ts +++ b/src/vs/workbench/electron-browser/actions.ts @@ -6,6 +6,7 @@ 'use strict'; import URI from 'vs/base/common/uri'; +import * as collections from 'vs/base/common/collections'; import { TPromise } from 'vs/base/common/winjs.base'; import { Action } from 'vs/base/common/actions'; import { IWindowIPCService } from 'vs/workbench/services/window/electron-browser/windowService'; @@ -34,9 +35,12 @@ import { IEditorGroupService } from 'vs/workbench/services/group/common/groupSer import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; import { IPartService, Parts, Position as SidebarPosition } from 'vs/workbench/services/part/common/partService'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; - +import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import * as os from 'os'; import { webFrame } from 'electron'; +import { getPathLabel } from 'vs/base/common/labels'; +import { IViewlet } from 'vs/workbench/common/viewlet'; +import { IPanel } from 'vs/workbench/common/panel'; // --- actions @@ -53,13 +57,13 @@ export class CloseEditorAction extends Action { super(id, label); } - public run(): TPromise { + public run(): TPromise { const activeEditor = this.editorService.getActiveEditor(); if (activeEditor) { return this.editorService.closeEditor(activeEditor.position, activeEditor.input); } - return TPromise.as(false); + return TPromise.as(null); } } @@ -79,37 +83,6 @@ export class CloseWindowAction extends Action { } } -export class SwitchWindow extends Action { - - static ID = 'workbench.action.switchWindow'; - static LABEL = nls.localize('switchWindow', "Switch Window"); - - constructor( - id: string, - label: string, - @IWindowsService private windowsService: IWindowsService, - @IWindowService private windowService: IWindowService, - @IQuickOpenService private quickOpenService: IQuickOpenService - ) { - super(id, label); - } - - run(): TPromise { - const currentWindowId = this.windowService.getCurrentWindowId(); - - return this.windowsService.getWindows().then(workspaces => { - const placeHolder = nls.localize('switchWindowPlaceHolder', "Select a window"); - const picks = workspaces.map(w => ({ - label: w.title, - description: (currentWindowId === w.id) ? nls.localize('current', "Current Window") : void 0, - run: () => this.windowsService.showWindow(w.id) - })); - - this.quickOpenService.pick(picks, { placeHolder }); - }); - } -} - export class CloseFolderAction extends Action { static ID = 'workbench.action.closeFolder'; @@ -184,7 +157,7 @@ export class ToggleMenuBarAction extends Action { super(id, label); } - public run(): TPromise { + public run(): TPromise { let currentVisibilityValue = this.configurationService.lookup(ToggleMenuBarAction.menuBarVisibilityKey).value; if (typeof currentVisibilityValue !== 'string') { currentVisibilityValue = 'default'; @@ -197,9 +170,7 @@ export class ToggleMenuBarAction extends Action { newVisibilityValue = 'default'; } - this.configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: ToggleMenuBarAction.menuBarVisibilityKey, value: newVisibilityValue }).then(null, error => { - this.messageService.show(Severity.Error, error); - }); + this.configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: ToggleMenuBarAction.menuBarVisibilityKey, value: newVisibilityValue }); return TPromise.as(null); } @@ -242,10 +213,13 @@ export abstract class BaseZoomAction extends Action { const applyZoom = () => { webFrame.setZoomLevel(level); browser.setZoomFactor(webFrame.getZoomFactor()); - browser.setZoomLevel(level); // Ensure others can listen to zoom level changes + // See https://github.com/Microsoft/vscode/issues/26151 + // Cannot be trusted because the webFrame might take some time + // until it really applies the new zoom level + browser.setZoomLevel(webFrame.getZoomLevel(), /*isTrusted*/false); }; - this.configurationEditingService.writeConfiguration(target, { key: BaseZoomAction.SETTING_KEY, value: level }).done(() => applyZoom(), error => applyZoom()); + this.configurationEditingService.writeConfiguration(target, { key: BaseZoomAction.SETTING_KEY, value: level }, { donotNotifyError: true }).done(() => applyZoom(), error => applyZoom()); } } @@ -583,36 +557,132 @@ export class ReloadWindowAction extends Action { } } -export class OpenRecentAction extends Action { +export abstract class BaseSwitchWindow extends Action { - public static ID = 'workbench.action.openRecent'; - public static LABEL = nls.localize('openRecent', "Open Recent"); + constructor( + id: string, + label: string, + private windowsService: IWindowsService, + private windowService: IWindowService, + private quickOpenService: IQuickOpenService, + private keybindingService: IKeybindingService + ) { + super(id, label); + } + + protected abstract isQuickNavigate(): boolean; + + public run(): TPromise { + const currentWindowId = this.windowService.getCurrentWindowId(); + + return this.windowsService.getWindows().then(workspaces => { + const placeHolder = nls.localize('switchWindowPlaceHolder', "Select a window to switch to"); + const picks = workspaces.map(win => ({ + resource: win.filename ? URI.file(win.filename) : win.path, + isFolder: !win.filename && !!win.path, + label: win.title, + description: (currentWindowId === win.id) ? nls.localize('current', "Current Window") : void 0, + run: () => { + setTimeout(() => { + // Bug: somehow when not running this code in a timeout, it is not possible to use this picker + // with quick navigate keys (not able to trigger quick navigate once running it once). + this.windowsService.showWindow(win.id).done(null, errors.onUnexpectedError); + }); + } + } as IFilePickOpenEntry)); + + this.quickOpenService.pick(picks, { + contextKey: 'inWindowsPicker', + autoFocus: { autoFocusFirstEntry: true }, + placeHolder, + quickNavigateConfiguration: this.isQuickNavigate() ? { keybindings: this.keybindingService.lookupKeybindings(this.id) } : void 0 + }); + }); + } +} + +export class SwitchWindow extends BaseSwitchWindow { + + static ID = 'workbench.action.switchWindow'; + static LABEL = nls.localize('switchWindow', "Switch Window..."); constructor( id: string, label: string, - @IWindowsService private windowsService: IWindowsService, - @IWindowService private windowService: IWindowService, - @IQuickOpenService private quickOpenService: IQuickOpenService, - @IWorkspaceContextService private contextService: IWorkspaceContextService + @IWindowsService windowsService: IWindowsService, + @IWindowService windowService: IWindowService, + @IQuickOpenService quickOpenService: IQuickOpenService, + @IKeybindingService keybindingService: IKeybindingService + ) { + super(id, label, windowsService, windowService, quickOpenService, keybindingService); + } + + protected isQuickNavigate(): boolean { + return false; + } +} + +export class QuickSwitchWindow extends BaseSwitchWindow { + + static ID = 'workbench.action.quickSwitchWindow'; + static LABEL = nls.localize('quickSwitchWindow', "Quick Switch Window..."); + + constructor( + id: string, + label: string, + @IWindowsService windowsService: IWindowsService, + @IWindowService windowService: IWindowService, + @IQuickOpenService quickOpenService: IQuickOpenService, + @IKeybindingService keybindingService: IKeybindingService + ) { + super(id, label, windowsService, windowService, quickOpenService, keybindingService); + } + + protected isQuickNavigate(): boolean { + return true; + } +} + +export const inRecentFilesPickerContextKey = 'inRecentFilesPicker'; + +export abstract class BaseOpenRecentAction extends Action { + + constructor( + id: string, + label: string, + private windowsService: IWindowsService, + private windowService: IWindowService, + private quickOpenService: IQuickOpenService, + private contextService: IWorkspaceContextService, + private environmentService: IEnvironmentService, + private keybindingService: IKeybindingService ) { super(id, label); } + protected abstract isQuickNavigate(): boolean; + public run(): TPromise { return this.windowService.getRecentlyOpen() .then(({ files, folders }) => this.openRecent(files, folders)); } private openRecent(recentFiles: string[], recentFolders: string[]): void { - function toPick(path: string, separator: ISeparator, isFolder: boolean): IFilePickOpenEntry { + + function toPick(path: string, separator: ISeparator, isFolder: boolean, environmentService: IEnvironmentService): IFilePickOpenEntry { return { resource: URI.file(path), isFolder, label: paths.basename(path), - description: paths.dirname(path), + description: getPathLabel(paths.dirname(path), null, environmentService), separator, - run: context => runPick(path, context) + run: context => { + setTimeout(() => { + // Bug: somehow when not running this code in a timeout, it is not possible to use this picker + // with quick navigate keys (not able to trigger quick navigate once running it once). + runPick(path, context); + }); + } }; } @@ -621,19 +691,67 @@ export class OpenRecentAction extends Action { this.windowsService.openWindow([path], { forceNewWindow }); }; - const folderPicks: IFilePickOpenEntry[] = recentFolders.map((p, index) => toPick(p, index === 0 ? { label: nls.localize('folders', "folders") } : void 0, true)); - const filePicks: IFilePickOpenEntry[] = recentFiles.map((p, index) => toPick(p, index === 0 ? { label: nls.localize('files', "files"), border: true } : void 0, false)); + const folderPicks: IFilePickOpenEntry[] = recentFolders.map((p, index) => toPick(p, index === 0 ? { label: nls.localize('folders', "folders") } : void 0, true, this.environmentService)); + const filePicks: IFilePickOpenEntry[] = recentFiles.map((p, index) => toPick(p, index === 0 ? { label: nls.localize('files', "files"), border: true } : void 0, false, this.environmentService)); const hasWorkspace = this.contextService.hasWorkspace(); this.quickOpenService.pick(folderPicks.concat(...filePicks), { + contextKey: inRecentFilesPickerContextKey, autoFocus: { autoFocusFirstEntry: !hasWorkspace, autoFocusSecondEntry: hasWorkspace }, placeHolder: isMacintosh ? nls.localize('openRecentPlaceHolderMac', "Select a path (hold Cmd-key to open in new window)") : nls.localize('openRecentPlaceHolder', "Select a path to open (hold Ctrl-key to open in new window)"), - matchOnDescription: true + matchOnDescription: true, + quickNavigateConfiguration: this.isQuickNavigate() ? { keybindings: this.keybindingService.lookupKeybindings(this.id) } : void 0 }).done(null, errors.onUnexpectedError); } } +export class OpenRecentAction extends BaseOpenRecentAction { + + public static ID = 'workbench.action.openRecent'; + public static LABEL = nls.localize('openRecent', "Open Recent..."); + + constructor( + id: string, + label: string, + @IWindowsService windowsService: IWindowsService, + @IWindowService windowService: IWindowService, + @IQuickOpenService quickOpenService: IQuickOpenService, + @IWorkspaceContextService contextService: IWorkspaceContextService, + @IEnvironmentService environmentService: IEnvironmentService, + @IKeybindingService keybindingService: IKeybindingService + ) { + super(id, label, windowsService, windowService, quickOpenService, contextService, environmentService, keybindingService); + } + + protected isQuickNavigate(): boolean { + return false; + } +} + +export class QuickOpenRecentAction extends BaseOpenRecentAction { + + public static ID = 'workbench.action.quickOpenRecent'; + public static LABEL = nls.localize('quickOpenRecent', "Quick Open Recent..."); + + constructor( + id: string, + label: string, + @IWindowsService windowsService: IWindowsService, + @IWindowService windowService: IWindowService, + @IQuickOpenService quickOpenService: IQuickOpenService, + @IWorkspaceContextService contextService: IWorkspaceContextService, + @IEnvironmentService environmentService: IEnvironmentService, + @IKeybindingService keybindingService: IKeybindingService + ) { + super(id, label, windowsService, windowService, quickOpenService, contextService, environmentService, keybindingService); + } + + protected isQuickNavigate(): boolean { + return true; + } +} + export class CloseMessagesAction extends Action { public static ID = 'workbench.action.closeMessages'; @@ -713,32 +831,47 @@ export class ReportIssueAction extends Action { Steps to Reproduce: 1. -2.` +2.` + (extensions.length ? ` + + +Reproduces without extensions: Yes/No` : '') ); return `${baseUrl}${queryStringPrefix}body=${body}`; } private generateExtensionTable(extensions: ILocalExtension[]): string { + const { nonThemes, themes } = collections.groupBy(extensions, ext => { + const manifestKeys = ext.manifest.contributes ? Object.keys(ext.manifest.contributes) : []; + const onlyTheme = !ext.manifest.activationEvents && manifestKeys.length === 1 && manifestKeys[0] === 'themes'; + return onlyTheme ? 'themes' : 'nonThemes'; + }); + + const themeExclusionStr = (themes && themes.length) ? `\n(${themes.length} theme extensions excluded)` : ''; + extensions = nonThemes || []; + if (!extensions.length) { - return 'none'; + return 'none' + themeExclusionStr; } - let tableHeader = `|Extension|Author|Version| -|---|---|---|`; + let tableHeader = `Extension|Author (truncated)|Version +---|---|---`; const table = extensions.map(e => { - return `|${e.manifest.name}|${e.manifest.publisher}|${e.manifest.version}|`; + return `${e.manifest.name}|${e.manifest.publisher.substr(0, 3)}|${e.manifest.version}`; }).join('\n'); const extensionTable = ` -${tableHeader}\n${table}; +${tableHeader} +${table} +${themeExclusionStr} `; + // 2000 chars is browsers de-facto limit for URLs, 400 chars are allowed for other string parts of the issue URL // http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers if (encodeURIComponent(extensionTable).length > 1600) { - return 'the listing exceeds the lower minimum of browsers\' URL characters limit'; + return 'the listing length exceeds browsers\' URL characters limit'; } return extensionTable; @@ -928,6 +1061,27 @@ export class OpenIntroductoryVideosUrlAction extends Action { } } +export class OpenTipsAndTricksUrlAction extends Action { + + public static ID = 'workbench.action.openTipsAndTricksUrl'; + public static LABEL = nls.localize('openTipsAndTricksUrl', "Tips and Tricks"); + + private static URL = product.tipsAndTricksUrl; + public static AVAILABLE = !!OpenTipsAndTricksUrlAction.URL; + + constructor( + id: string, + label: string + ) { + super(id, label); + } + + public run(): TPromise { + window.open(OpenTipsAndTricksUrlAction.URL); + return null; + } +} + export class ToggleSharedProcessAction extends Action { static ID = 'workbench.action.toggleSharedProcess'; @@ -983,37 +1137,39 @@ export abstract class BaseNavigationAction extends Action { return TPromise.as(false); } - protected navigateOnEditorFocus(isEditorGroupVertical: boolean, isSidebarPositionLeft: boolean): TPromise { + protected navigateOnEditorFocus(isEditorGroupVertical: boolean, isSidebarPositionLeft: boolean): TPromise { return TPromise.as(true); } - protected navigateOnPanelFocus(isEditorGroupVertical: boolean, isSidebarPositionLeft: boolean): TPromise { + protected navigateOnPanelFocus(isEditorGroupVertical: boolean, isSidebarPositionLeft: boolean): TPromise { return TPromise.as(true); } - protected navigateOnSidebarFocus(isEditorGroupVertical: boolean, isSidebarPositionLeft: boolean): TPromise { + protected navigateOnSidebarFocus(isEditorGroupVertical: boolean, isSidebarPositionLeft: boolean): TPromise { return TPromise.as(true); } - protected navigateToPanel(): TPromise { + protected navigateToPanel(): TPromise { if (!this.partService.isVisible(Parts.PANEL_PART)) { return TPromise.as(false); } const activePanelId = this.panelService.getActivePanel().getId(); + return this.panelService.openPanel(activePanelId, true); } - protected navigateToSidebar(): TPromise { + protected navigateToSidebar(): TPromise { if (!this.partService.isVisible(Parts.SIDEBAR_PART)) { return TPromise.as(false); } const activeViewletId = this.viewletService.getActiveViewlet().getId(); + return this.viewletService.openViewlet(activeViewletId, true); } - protected navigateAcrossEditorGroup(direction): TPromise { + protected navigateAcrossEditorGroup(direction): TPromise { const model = this.groupService.getStacksModel(); const currentPosition = model.positionOfGroup(model.activeGroup); const nextPosition = direction === Direction.Next ? currentPosition + 1 : currentPosition - 1; @@ -1023,25 +1179,29 @@ export abstract class BaseNavigationAction extends Action { } this.groupService.focusGroup(nextPosition); + return TPromise.as(true); } - protected navigateToLastActiveGroup(): TPromise { + protected navigateToLastActiveGroup(): TPromise { const model = this.groupService.getStacksModel(); const lastActiveGroup = model.activeGroup; this.groupService.focusGroup(lastActiveGroup); + return TPromise.as(true); } - protected navigateToFirstEditorGroup(): TPromise { + protected navigateToFirstEditorGroup(): TPromise { this.groupService.focusGroup(0); + return TPromise.as(true); } - protected navigateToLastEditorGroup(): TPromise { + protected navigateToLastEditorGroup(): TPromise { const model = this.groupService.getStacksModel(); const lastEditorGroupPosition = model.groups.length - 1; this.groupService.focusGroup(lastEditorGroupPosition); + return TPromise.as(true); } } @@ -1049,7 +1209,7 @@ export abstract class BaseNavigationAction extends Action { export class NavigateLeftAction extends BaseNavigationAction { public static ID = 'workbench.action.navigateLeft'; - public static LABEL = nls.localize('navigateLeft', "Move to the View on the Left"); + public static LABEL = nls.localize('navigateLeft', "Navigate to the View on the Left"); constructor( id: string, @@ -1062,7 +1222,7 @@ export class NavigateLeftAction extends BaseNavigationAction { super(id, label, groupService, panelService, partService, viewletService); } - protected navigateOnEditorFocus(isEditorGroupVertical, isSidebarPositionLeft): TPromise { + protected navigateOnEditorFocus(isEditorGroupVertical, isSidebarPositionLeft): TPromise { if (!isEditorGroupVertical) { if (isSidebarPositionLeft) { return this.navigateToSidebar(); @@ -1078,10 +1238,11 @@ export class NavigateLeftAction extends BaseNavigationAction { }); } - protected navigateOnPanelFocus(isEditorGroupVertical, isSidebarPositionLeft): TPromise { + protected navigateOnPanelFocus(isEditorGroupVertical, isSidebarPositionLeft): TPromise { if (isSidebarPositionLeft) { return this.navigateToSidebar(); } + return TPromise.as(false); } @@ -1089,9 +1250,11 @@ export class NavigateLeftAction extends BaseNavigationAction { if (isSidebarPositionLeft) { return TPromise.as(false); } + if (isEditorGroupVertical) { return this.navigateToLastEditorGroup(); } + return this.navigateToLastActiveGroup(); } } @@ -1099,7 +1262,7 @@ export class NavigateLeftAction extends BaseNavigationAction { export class NavigateRightAction extends BaseNavigationAction { public static ID = 'workbench.action.navigateRight'; - public static LABEL = nls.localize('navigateRight', "Move to the View on the Right"); + public static LABEL = nls.localize('navigateRight', "Navigate to the View on the Right"); constructor( id: string, @@ -1112,13 +1275,14 @@ export class NavigateRightAction extends BaseNavigationAction { super(id, label, groupService, panelService, partService, viewletService); } - protected navigateOnEditorFocus(isEditorGroupVertical, isSidebarPositionLeft): TPromise { + protected navigateOnEditorFocus(isEditorGroupVertical, isSidebarPositionLeft): TPromise { if (!isEditorGroupVertical) { if (!isSidebarPositionLeft) { return this.navigateToSidebar(); } return TPromise.as(false); } + return this.navigateAcrossEditorGroup(Direction.Next) .then(didNavigate => { if (!didNavigate && !isSidebarPositionLeft) { @@ -1128,10 +1292,11 @@ export class NavigateRightAction extends BaseNavigationAction { }); } - protected navigateOnPanelFocus(isEditorGroupVertical, isSidebarPositionLeft): TPromise { + protected navigateOnPanelFocus(isEditorGroupVertical, isSidebarPositionLeft): TPromise { if (!isSidebarPositionLeft) { return this.navigateToSidebar(); } + return TPromise.as(false); } @@ -1139,9 +1304,11 @@ export class NavigateRightAction extends BaseNavigationAction { if (!isSidebarPositionLeft) { return TPromise.as(false); } + if (isEditorGroupVertical) { return this.navigateToFirstEditorGroup(); } + return this.navigateToLastActiveGroup(); } } @@ -1149,7 +1316,7 @@ export class NavigateRightAction extends BaseNavigationAction { export class NavigateUpAction extends BaseNavigationAction { public static ID = 'workbench.action.navigateUp'; - public static LABEL = nls.localize('navigateUp', "Move to the View Above"); + public static LABEL = nls.localize('navigateUp', "Navigate to the View Above"); constructor( id: string, @@ -1180,7 +1347,7 @@ export class NavigateUpAction extends BaseNavigationAction { export class NavigateDownAction extends BaseNavigationAction { public static ID = 'workbench.action.navigateDown'; - public static LABEL = nls.localize('navigateDown', "Move to the View Below"); + public static LABEL = nls.localize('navigateDown', "Navigate to the View Below"); constructor( id: string, @@ -1193,10 +1360,11 @@ export class NavigateDownAction extends BaseNavigationAction { super(id, label, groupService, panelService, partService, viewletService); } - protected navigateOnEditorFocus(isEditorGroupVertical, isSidebarPositionLeft): TPromise { + protected navigateOnEditorFocus(isEditorGroupVertical, isSidebarPositionLeft): TPromise { if (isEditorGroupVertical) { return this.navigateToPanel(); } + return this.navigateAcrossEditorGroup(Direction.Next) .then(didNavigate => { if (didNavigate) { @@ -1278,4 +1446,4 @@ export class DecreaseViewSizeAction extends BaseResizeViewAction { this.resizePart(-BaseResizeViewAction.RESIZE_INCREMENT); return TPromise.as(true); } -} +} \ No newline at end of file diff --git a/src/vs/workbench/electron-browser/bootstrap/index.html b/src/vs/workbench/electron-browser/bootstrap/index.html index 018512e1164df..c14ebbe865323 100644 --- a/src/vs/workbench/electron-browser/bootstrap/index.html +++ b/src/vs/workbench/electron-browser/bootstrap/index.html @@ -3,42 +3,10 @@ + - + diff --git a/src/vs/workbench/electron-browser/bootstrap/index.js b/src/vs/workbench/electron-browser/bootstrap/index.js index f320447cd9a00..d79e86de78518 100644 --- a/src/vs/workbench/electron-browser/bootstrap/index.js +++ b/src/vs/workbench/electron-browser/bootstrap/index.js @@ -12,8 +12,9 @@ if (window.location.search.indexOf('prof-startup') >= 0) { profiler.startProfiling('renderer', true); } -/*global window,document,define*/ +/*global window,document,define,Monaco_Loader_Init*/ +const startTimer = require('../../../base/node/startupTimers').startTimer; const path = require('path'); const electron = require('electron'); const remote = electron.remote; @@ -22,8 +23,8 @@ const ipc = electron.ipcRenderer; process.lazyEnv = new Promise(function (resolve) { const handle = setTimeout(function () { resolve(); - console.warn('renderer did not receive lazyEnv in time') - }, 2000); + console.warn('renderer did not receive lazyEnv in time'); + }, 10000); ipc.once('vscode:acceptShellEnv', function (event, shellEnv) { clearTimeout(handle); assign(process.env, shellEnv); @@ -106,14 +107,14 @@ function registerListeners(enableDeveloperTools) { window.addEventListener('keydown', listener); } - process.on('uncaughtException', function (error) { onError(error, enableDeveloperTools) }); + process.on('uncaughtException', function (error) { onError(error, enableDeveloperTools); }); return function () { if (listener) { window.removeEventListener('keydown', listener); listener = void 0; } - } + }; } function main() { @@ -148,7 +149,7 @@ function main() { // disable pinch zoom & apply zoom level early to avoid glitches const zoomLevel = configuration.zoomLevel; - webFrame.setZoomLevelLimits(1, 1); + webFrame.setVisualZoomLevelLimits(1, 1); if (typeof zoomLevel === 'number' && zoomLevel !== 0) { webFrame.setZoomLevel(zoomLevel); } @@ -156,20 +157,19 @@ function main() { // Load the loader and start loading the workbench const rootUrl = uriFromPath(configuration.appRoot) + '/out'; - // In the bundled version the nls plugin is packaged with the loader so the NLS Plugins - // loads as soon as the loader loads. To be able to have pseudo translation - createScript(rootUrl + '/vs/loader.js', function () { + function onLoader() { define('fs', ['original-fs'], function (originalFS) { return originalFS; }); // replace the patched electron fs with the original node fs for all AMD code + loaderTimer.stop(); window.MonacoEnvironment = {}; - const nodeCachedDataErrors = window.MonacoEnvironment.nodeCachedDataErrors = []; + const onNodeCachedData = window.MonacoEnvironment.onNodeCachedData = []; require.config({ baseUrl: rootUrl, 'vs/nls': nlsConfig, recordStats: !!configuration.performance, nodeCachedDataDir: configuration.nodeCachedDataDir, - onNodeCachedDataError: function (err) { nodeCachedDataErrors.push(err) }, + onNodeCachedData: function () { onNodeCachedData.push(arguments); }, nodeModules: [/*BUILD->INSERT_NODE_MODULES*/] }); @@ -189,11 +189,13 @@ function main() { beforeLoadWorkbenchMain: Date.now() }; + const workbenchMainTimer = startTimer('load:workbench.main'); require([ 'vs/workbench/electron-browser/workbench.main', 'vs/nls!vs/workbench/electron-browser/workbench.main', 'vs/css!vs/workbench/electron-browser/workbench.main' ], function () { + workbenchMainTimer.stop(); timers.afterLoadWorkbenchMain = Date.now(); process.lazyEnv.then(function () { @@ -206,7 +208,19 @@ function main() { }); }); }); - }); + } + + // In the bundled version the nls plugin is packaged with the loader so the NLS Plugins + // loads as soon as the loader loads. To be able to have pseudo translation + const loaderTimer = startTimer('load:loader'); + if (typeof Monaco_Loader_Init === 'function') { + //eslint-disable-next-line no-global-assign + define = Monaco_Loader_Init(); + onLoader(); + + } else { + createScript(rootUrl + '/vs/loader.js', onLoader); + } } main(); diff --git a/src/vs/workbench/electron-browser/bootstrap/preload.js b/src/vs/workbench/electron-browser/bootstrap/preload.js new file mode 100644 index 0000000000000..d451c2d5fb720 --- /dev/null +++ b/src/vs/workbench/electron-browser/bootstrap/preload.js @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +(function() { + function getConfig() { + const queryParams = window.location.search.substring(1).split('&'); + for (var i = 0; i < queryParams.length; i++) { + var kv = queryParams[i].split('='); + if (kv[0] === 'config' && kv[1]) { + return JSON.parse(decodeURIComponent(kv[1])); + } + } + return {}; + } + try { + const config = getConfig(); + const document = window.document; + + // sets the base theme class ('vs', 'vs-dark', 'hc-black') + const baseTheme = config.baseTheme || 'vs'; + document.body.className = 'monaco-shell ' + baseTheme; + + // adds a stylesheet with the backgrdound color + var backgroundColor = config.backgroundColor; + if (!backgroundColor) { + backgroundColor = baseTheme === 'hc-black' ? '#000000' : (baseTheme === 'vs' ? '#FFFFFF' : '#1E1E1E'); + } + const foregroundColor = baseTheme === 'hc-black' ? '#FFFFFF' : (baseTheme === 'vs' ? '#6C6C6C' : '#CCCCCC'); + const style = document.createElement('style'); + style.innerHTML = '.monaco-shell { background-color:' + backgroundColor + '; color:' + foregroundColor + '; }'; + document.head.appendChild(style); + + } catch (error) { + console.error(error); + } +})(); \ No newline at end of file diff --git a/src/vs/workbench/electron-browser/commands.ts b/src/vs/workbench/electron-browser/commands.ts index 09956f9c775e9..e724e95e880e3 100644 --- a/src/vs/workbench/electron-browser/commands.ts +++ b/src/vs/workbench/electron-browser/commands.ts @@ -207,54 +207,74 @@ export function registerCommands(): void { weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), when: ListFocusContext, primary: KeyCode.Home, - handler: (accessor) => { - const listService = accessor.get(IListService); - const focused = listService.getFocused(); + handler: accessor => listFocusFirst(accessor) + }); - // List - if (focused instanceof List) { - const list = focused; + KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: 'list.focusFirstChild', + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: ListFocusContext, + primary: null, + handler: accessor => listFocusFirst(accessor, { fromFocused: true }) + }); - list.setFocus([0]); - list.reveal(0); - } + function listFocusFirst(accessor: ServicesAccessor, options?: { fromFocused: boolean }): void { + const listService = accessor.get(IListService); + const focused = listService.getFocused(); - // Tree - else if (focused) { - const tree = focused; + // List + if (focused instanceof List) { + const list = focused; - tree.focusFirst({ origin: 'keyboard' }); - tree.reveal(tree.getFocus()).done(null, errors.onUnexpectedError); - } + list.setFocus([0]); + list.reveal(0); } - }); + + // Tree + else if (focused) { + const tree = focused; + + tree.focusFirst({ origin: 'keyboard' }, options && options.fromFocused ? tree.getFocus() : void 0); + tree.reveal(tree.getFocus()).done(null, errors.onUnexpectedError); + } + } KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'list.focusLast', weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), when: ListFocusContext, primary: KeyCode.End, - handler: (accessor) => { - const listService = accessor.get(IListService); - const focused = listService.getFocused(); + handler: accessor => listFocusLast(accessor) + }); - // List - if (focused instanceof List) { - const list = focused; + KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: 'list.focusLastChild', + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: ListFocusContext, + primary: null, + handler: accessor => listFocusLast(accessor, { fromFocused: true }) + }); - list.setFocus([list.length - 1]); - list.reveal(list.length - 1); - } + function listFocusLast(accessor: ServicesAccessor, options?: { fromFocused: boolean }): void { + const listService = accessor.get(IListService); + const focused = listService.getFocused(); - // Tree - else if (focused) { - const tree = focused; + // List + if (focused instanceof List) { + const list = focused; - tree.focusLast({ origin: 'keyboard' }); - tree.reveal(tree.getFocus()).done(null, errors.onUnexpectedError); - } + list.setFocus([list.length - 1]); + list.reveal(list.length - 1); } - }); + + // Tree + else if (focused) { + const tree = focused; + + tree.focusLast({ origin: 'keyboard' }, options && options.fromFocused ? tree.getFocus() : void 0); + tree.reveal(tree.getFocus()).done(null, errors.onUnexpectedError); + } + } KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'list.select', diff --git a/src/vs/workbench/electron-browser/common.ts b/src/vs/workbench/electron-browser/common.ts deleted file mode 100644 index 9ddf433eeed20..0000000000000 --- a/src/vs/workbench/electron-browser/common.ts +++ /dev/null @@ -1,22 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { IWindowSettings } from 'vs/platform/windows/common/windows'; - -export interface IPath { - filePath: string; - lineNumber?: number; - columnNumber?: number; -} - -export interface IOpenFileRequest { - filesToOpen?: IPath[]; - filesToCreate?: IPath[]; - filesToDiff?: IPath[]; -} - -export interface IWindowConfiguration { - window: IWindowSettings; -} \ No newline at end of file diff --git a/src/vs/workbench/electron-browser/crashReporter.ts b/src/vs/workbench/electron-browser/crashReporter.ts deleted file mode 100644 index 119229bc2d46f..0000000000000 --- a/src/vs/workbench/electron-browser/crashReporter.ts +++ /dev/null @@ -1,71 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import nls = require('vs/nls'); -import { onUnexpectedError } from 'vs/base/common/errors'; -import { assign, clone } from 'vs/base/common/objects'; -import { IConfigurationRegistry, Extensions } from 'vs/platform/configuration/common/configurationRegistry'; -import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { IWindowsService } from 'vs/platform/windows/common/windows'; -import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { Registry } from 'vs/platform/platform'; -import { crashReporter } from 'electron'; -import product from 'vs/platform/node/product'; -import pkg from 'vs/platform/node/package'; - -const TELEMETRY_SECTION_ID = 'telemetry'; - -interface ICrashReporterConfig { - enableCrashReporter: boolean; -} - -const configurationRegistry = Registry.as(Extensions.Configuration); -configurationRegistry.registerConfiguration({ - 'id': TELEMETRY_SECTION_ID, - 'order': 110, - title: nls.localize('telemetryConfigurationTitle', "Telemetry"), - 'type': 'object', - 'properties': { - 'telemetry.enableCrashReporter': { - 'type': 'boolean', - 'description': nls.localize('telemetry.enableCrashReporting', "Enable crash reports to be sent to Microsoft.\nThis option requires restart to take effect."), - 'default': true - } - } -}); - -export class CrashReporter { - - constructor( - configuration: Electron.CrashReporterStartOptions, - @ITelemetryService telemetryService: ITelemetryService, - @IWindowsService windowsService: IWindowsService, - @IConfigurationService configurationService: IConfigurationService - ) { - const config = configurationService.getConfiguration(TELEMETRY_SECTION_ID); - - if (!config.enableCrashReporter) { - return; - } - - telemetryService.getTelemetryInfo() - .then(info => ({ - vscode_sessionId: info.sessionId, - vscode_version: pkg.version, - vscode_commit: product.commit, - vscode_machineId: info.machineId - })) - .then(extra => assign(configuration, { extra })) - .then(configuration => { - // start crash reporter right here - crashReporter.start(clone(configuration)); - - // TODO: start crash reporter in the main process - return windowsService.startCrashReporter(configuration); - }) - .done(null, onUnexpectedError); - } -} \ No newline at end of file diff --git a/src/vs/workbench/electron-browser/extensionHost.ts b/src/vs/workbench/electron-browser/extensionHost.ts index e084eb83a99f2..7c29456900eb9 100644 --- a/src/vs/workbench/electron-browser/extensionHost.ts +++ b/src/vs/workbench/electron-browser/extensionHost.ts @@ -11,11 +11,12 @@ import { stringify } from 'vs/base/common/marshalling'; import * as objects from 'vs/base/common/objects'; import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; +import { Action } from 'vs/base/common/actions'; import { isWindows } from 'vs/base/common/platform'; import { findFreePort } from 'vs/base/node/ports'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { ILifecycleService, ShutdownEvent } from 'vs/platform/lifecycle/common/lifecycle'; -import { IWindowsService } from 'vs/platform/windows/common/windows'; +import { IWindowsService, IWindowService } from 'vs/platform/windows/common/windows'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IWindowIPCService } from 'vs/workbench/services/window/electron-browser/windowService'; @@ -28,10 +29,12 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { IMessagePassingProtocol } from 'vs/base/parts/ipc/common/ipc'; import { generateRandomPipeName, Protocol } from 'vs/base/parts/ipc/node/ipc.net'; import { createServer, Server } from 'net'; -import Event, { Emitter } from 'vs/base/common/event'; -import { IInitData } from 'vs/workbench/api/node/extHost.protocol'; -import { MainProcessExtensionService } from 'vs/workbench/api/node/mainThreadExtensionService'; +import Event, { Emitter, debounceEvent, mapEvent, any } from 'vs/base/common/event'; +import { fromEventEmitter } from 'vs/base/node/event'; +import { IInitData, IWorkspaceData } from 'vs/workbench/api/node/extHost.protocol'; +import { MainProcessExtensionService } from 'vs/workbench/api/electron-browser/mainThreadExtensionService'; import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration'; +import { ICrashReporterService } from 'vs/workbench/services/crashReporter/common/crashReporterService'; export const EXTENSION_LOG_BROADCAST_CHANNEL = 'vscode:extensionLog'; export const EXTENSION_ATTACH_BROADCAST_CHANNEL = 'vscode:extensionAttach'; @@ -87,12 +90,15 @@ export class ExtensionHostProcessWorker { @IWorkspaceContextService private contextService: IWorkspaceContextService, @IMessageService private messageService: IMessageService, @IWindowsService private windowsService: IWindowsService, - @IWindowIPCService private windowService: IWindowIPCService, + @IWindowService private windowService: IWindowService, + @IWindowIPCService private windowIpcService: IWindowIPCService, @ILifecycleService lifecycleService: ILifecycleService, @IInstantiationService private instantiationService: IInstantiationService, @IEnvironmentService private environmentService: IEnvironmentService, @IWorkspaceConfigurationService private configurationService: IWorkspaceConfigurationService, - @ITelemetryService private telemetryService: ITelemetryService + @ITelemetryService private telemetryService: ITelemetryService, + @ICrashReporterService private crashReporterService: ICrashReporterService + ) { // handle extension host lifecycle a bit special when we know we are developing an extension that runs inside this.isExtensionDevelopmentHost = environmentService.isExtensionDevelopment; @@ -111,12 +117,12 @@ export class ExtensionHostProcessWorker { const [server, hook] = <[Server, string]>data[0]; const port = data[1]; - let opts = { + const opts = { env: objects.mixin(objects.clone(process.env), { AMD_ENTRYPOINT: 'vs/workbench/node/extensionHostProcess', PIPE_LOGGING: 'true', VERBOSE_LOGGING: true, - VSCODE_WINDOW_ID: String(this.windowService.getWindowId()), + VSCODE_WINDOW_ID: String(this.windowIpcService.getWindowId()), VSCODE_IPC_HOOK_EXTHOST: hook, ELECTRON_NO_ASAR: '1' }), @@ -127,12 +133,43 @@ export class ExtensionHostProcessWorker { detached: !!isWindows, execArgv: port ? ['--nolazy', (this.isExtensionDevelopmentDebugBrk ? '--debug-brk=' : '--debug=') + port] - : undefined + : undefined, + silent: true }; + const crashReporterOptions = this.crashReporterService.getChildProcessStartOptions('extensionHost'); + if (crashReporterOptions) { + opts.env.CRASH_REPORTER_START_OPTIONS = JSON.stringify(crashReporterOptions); + } + // Run Extension Host as fork of current process this.extensionHostProcess = fork(URI.parse(require.toUrl('bootstrap')).fsPath, ['--type=extensionHost'], opts); + // Catch all output coming from the extension host process + type Output = { data: string, format: string[] }; + this.extensionHostProcess.stdout.setEncoding('utf8'); + this.extensionHostProcess.stderr.setEncoding('utf8'); + const onStdout = fromEventEmitter(this.extensionHostProcess.stdout, 'data'); + const onStderr = fromEventEmitter(this.extensionHostProcess.stderr, 'data'); + const onOutput = any( + mapEvent(onStdout, o => ({ data: `%c${o}`, format: [''] })), + mapEvent(onStderr, o => ({ data: `%c${o}`, format: ['color: red'] })) + ); + + // Debounce all output, so we can render it in the Chrome console as a group + const onDebouncedOutput = debounceEvent(onOutput, (r, o) => { + return r + ? { data: r.data + o.data, format: [...r.format, ...o.format] } + : { data: o.data, format: o.format }; + }, 100); + + // Print out extension host output + onDebouncedOutput(data => { + console.group('Extension Host'); + console.log(data.data, ...data.format); + console.groupEnd(); + }); + // Support logging from extension host this.extensionHostProcess.on('message', msg => { if (msg && (msg).type === '__$console') { @@ -148,7 +185,7 @@ export class ExtensionHostProcessWorker { // Notify debugger that we are ready to attach to the process if we run a development extension if (this.isExtensionDevelopmentHost && port) { - this.windowService.broadcast({ + this.windowIpcService.broadcast({ channel: EXTENSION_ATTACH_BROADCAST_CHANNEL, payload: { port } }, this.environmentService.extensionDevelopmentPath /* target */); @@ -251,11 +288,9 @@ export class ExtensionHostProcessWorker { enableProposedApiForAll: !this.environmentService.isBuilt || (!!this.environmentService.extensionDevelopmentPath && product.nameLong.indexOf('Insiders') >= 0), enableProposedApiFor: this.environmentService.args['enable-proposed-api'] || [] }, - contextService: { - workspace: this.contextService.getWorkspace() - }, + workspace: this.contextService.getWorkspace2(), extensions: extensionDescriptions, - configuration: this.configurationService.values(), + configuration: this.configurationService.getConfigurationData(), telemetryInfo }; }); @@ -292,7 +327,7 @@ export class ExtensionHostProcessWorker { // Broadcast to other windows if we are in development mode else if (!this.environmentService.isBuilt || this.isExtensionDevelopmentHost) { - this.windowService.broadcast({ + this.windowIpcService.broadcast({ channel: EXTENSION_LOG_BROADCAST_CHANNEL, payload: logEntry }, this.environmentService.extensionDevelopmentPath /* target */); @@ -317,16 +352,25 @@ export class ExtensionHostProcessWorker { // Unexpected termination if (!this.isExtensionDevelopmentHost) { + const openDevTools = new Action('openDevTools', nls.localize('devTools', "Developer Tools"), '', true, async (): TPromise => { + await this.windowService.openDevTools(); + return false; + }); + this.messageService.show(Severity.Error, { message: nls.localize('extensionHostProcess.crash', "Extension host terminated unexpectedly. Please reload the window to recover."), - actions: [this.instantiationService.createInstance(ReloadWindowAction, ReloadWindowAction.ID, ReloadWindowAction.LABEL)] + actions: [ + openDevTools, + this.instantiationService.createInstance(ReloadWindowAction, ReloadWindowAction.ID, ReloadWindowAction.LABEL) + ] }); + console.error('Extension host terminated unexpectedly. Code: ', code, ' Signal: ', signal); } // Expected development extension termination: When the extension host goes down we also shutdown the window else if (!this.isExtensionDevelopmentTestFromCli) { - this.windowService.getWindow().close(); + this.windowIpcService.getWindow().close(); } // When CLI testing make sure to exit with proper exit code @@ -350,7 +394,7 @@ export class ExtensionHostProcessWorker { // If the extension development host was started without debugger attached we need // to communicate this back to the main side to terminate the debug session if (this.isExtensionDevelopmentHost && !this.isExtensionDevelopmentTestFromCli && !this.isExtensionDevelopmentDebug) { - this.windowService.broadcast({ + this.windowIpcService.broadcast({ channel: EXTENSION_TERMINATE_BROADCAST_CHANNEL, payload: true }, this.environmentService.extensionDevelopmentPath /* target */); diff --git a/src/vs/workbench/electron-browser/main.contribution.ts b/src/vs/workbench/electron-browser/main.contribution.ts index c62f3bbb4a394..ee056145c5731 100644 --- a/src/vs/workbench/electron-browser/main.contribution.ts +++ b/src/vs/workbench/electron-browser/main.contribution.ts @@ -5,7 +5,7 @@ 'use strict'; -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import nls = require('vs/nls'); import product from 'vs/platform/node/product'; import * as os from 'os'; @@ -14,10 +14,11 @@ import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'v import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actionRegistry'; import { KeyMod, KeyChord, KeyCode } from 'vs/base/common/keyCodes'; import { isWindows, isLinux, isMacintosh } from 'vs/base/common/platform'; -import { CloseEditorAction, KeybindingsReferenceAction, OpenDocumentationUrlAction, OpenIntroductoryVideosUrlAction, ReportIssueAction, ReportPerformanceIssueAction, ZoomResetAction, ZoomOutAction, ZoomInAction, ToggleFullScreenAction, ToggleMenuBarAction, CloseFolderAction, CloseWindowAction, SwitchWindow, NewWindowAction, CloseMessagesAction, NavigateUpAction, NavigateDownAction, NavigateLeftAction, NavigateRightAction, IncreaseViewSizeAction, DecreaseViewSizeAction } from 'vs/workbench/electron-browser/actions'; +import { CloseEditorAction, KeybindingsReferenceAction, OpenDocumentationUrlAction, OpenIntroductoryVideosUrlAction, OpenTipsAndTricksUrlAction, ReportIssueAction, ReportPerformanceIssueAction, ZoomResetAction, ZoomOutAction, ZoomInAction, ToggleFullScreenAction, ToggleMenuBarAction, CloseFolderAction, CloseWindowAction, SwitchWindow, NewWindowAction, CloseMessagesAction, NavigateUpAction, NavigateDownAction, NavigateLeftAction, NavigateRightAction, IncreaseViewSizeAction, DecreaseViewSizeAction, ShowStartupPerformance, ToggleSharedProcessAction, QuickSwitchWindow, QuickOpenRecentAction } from 'vs/workbench/electron-browser/actions'; import { MessagesVisibleContext } from 'vs/workbench/electron-browser/workbench'; import { IJSONSchema } from 'vs/base/common/jsonSchema'; import { registerCommands } from 'vs/workbench/electron-browser/commands'; +import { AddRootFolderAction } from 'vs/workbench/browser/actions/fileActions'; // Contribute Commands registerCommands(); @@ -29,11 +30,13 @@ const fileCategory = nls.localize('file', "File"); const workbenchActionsRegistry = Registry.as(Extensions.WorkbenchActions); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(NewWindowAction, NewWindowAction.ID, NewWindowAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_N }), 'New Window'); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(CloseWindowAction, CloseWindowAction.ID, CloseWindowAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_W }), 'Close Window'); -workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(SwitchWindow, SwitchWindow.ID, SwitchWindow.LABEL), 'Switch Window'); +workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(SwitchWindow, SwitchWindow.ID, SwitchWindow.LABEL, { primary: null, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_W } }), 'Switch Window...'); +workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(QuickSwitchWindow, QuickSwitchWindow.ID, QuickSwitchWindow.LABEL), 'Quick Switch Window...'); +workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenRecentAction, QuickOpenRecentAction.ID, QuickOpenRecentAction.LABEL), 'File: Quick Open Recent...', fileCategory); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(CloseFolderAction, CloseFolderAction.ID, CloseFolderAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_F) }), 'File: Close Folder', fileCategory); if (!!product.reportIssueUrl) { workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ReportIssueAction, ReportIssueAction.ID, ReportIssueAction.LABEL), 'Help: Report Issues', helpCategory); - workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ReportPerformanceIssueAction, ReportPerformanceIssueAction.ID, ReportPerformanceIssueAction.LABEL), 'Help: Report Performance Issues', helpCategory); + workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ReportPerformanceIssueAction, ReportPerformanceIssueAction.ID, ReportPerformanceIssueAction.LABEL), 'Help: Report Performance Issue', helpCategory); } if (KeybindingsReferenceAction.AVAILABLE) { workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(KeybindingsReferenceAction, KeybindingsReferenceAction.ID, KeybindingsReferenceAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_R) }), 'Help: Keyboard Shortcuts Reference', helpCategory); @@ -44,6 +47,9 @@ if (OpenDocumentationUrlAction.AVAILABLE) { if (OpenIntroductoryVideosUrlAction.AVAILABLE) { workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(OpenIntroductoryVideosUrlAction, OpenIntroductoryVideosUrlAction.ID, OpenIntroductoryVideosUrlAction.LABEL), 'Help: Introductory Videos', helpCategory); } +if (OpenTipsAndTricksUrlAction.AVAILABLE) { + workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(OpenTipsAndTricksUrlAction, OpenTipsAndTricksUrlAction.ID, OpenTipsAndTricksUrlAction.LABEL), 'Help: Tips and Tricks', helpCategory); +} workbenchActionsRegistry.registerWorkbenchAction( new SyncActionDescriptor(ZoomInAction, ZoomInAction.ID, ZoomInAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.US_EQUAL, @@ -72,8 +78,18 @@ workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(Naviga workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(NavigateLeftAction, NavigateLeftAction.ID, NavigateLeftAction.LABEL, null), 'View: Move to the View on the Left', viewCategory); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(NavigateRightAction, NavigateRightAction.ID, NavigateRightAction.LABEL, null), 'View: Move to the View on the Right', viewCategory); -workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(IncreaseViewSizeAction, IncreaseViewSizeAction.ID, IncreaseViewSizeAction.LABEL, null), 'View: Increase View Size', viewCategory); -workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(DecreaseViewSizeAction, DecreaseViewSizeAction.ID, DecreaseViewSizeAction.LABEL, null), 'View: Decrease View Size', viewCategory); +workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(IncreaseViewSizeAction, IncreaseViewSizeAction.ID, IncreaseViewSizeAction.LABEL, null), 'View: Increase Current View Size', viewCategory); +workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(DecreaseViewSizeAction, DecreaseViewSizeAction.ID, DecreaseViewSizeAction.LABEL, null), 'View: Decrease Current View Size', viewCategory); + +// TODO@Ben multi root +if (product.quality !== 'stable') { + workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(AddRootFolderAction, AddRootFolderAction.ID, AddRootFolderAction.LABEL), 'Files: Add Folder to Workspace...', fileCategory); +} + +// Developer related actions +const developerCategory = nls.localize('developer', "Developer"); +workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ShowStartupPerformance, ShowStartupPerformance.ID, ShowStartupPerformance.LABEL), 'Developer: Startup Performance', developerCategory); +workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ToggleSharedProcessAction, ToggleSharedProcessAction.ID, ToggleSharedProcessAction.LABEL), 'Developer: Toggle Shared Process', developerCategory); // Configuration: Workbench const configurationRegistry = Registry.as(ConfigurationExtensions.Configuration); @@ -116,6 +132,16 @@ let workbenchProperties: { [path: string]: IJSONSchema; } = { 'description': nls.localize('revealIfOpen', "Controls if an editor is revealed in any of the visible groups if opened. If disabled, an editor will prefer to open in the currently active editor group. If enabled, an already opened editor will be revealed instead of opened again in the currently active editor group. Note that there are some cases where this setting is ignored, e.g. when forcing an editor to open in a specific group or to the side of the currently active group."), 'default': false }, + 'workbench.commandPalette.history': { + 'type': 'number', + 'description': nls.localize('commandHistory', "Controls if the number of recently used commands to keep in history for the command palette. Set to 0 to disable command history."), + 'default': 50 + }, + 'workbench.commandPalette.preserveInput': { + 'type': 'boolean', + 'description': nls.localize('preserveInput', "Controls if the last typed input to the command palette should be restored when opening it the next time."), + 'default': false + }, 'workbench.quickOpen.closeOnFocusLost': { 'type': 'boolean', 'description': nls.localize('closeOnFocusLost', "Controls if Quick Open should close automatically once it loses focus."), @@ -177,7 +203,7 @@ let properties: { [path: string]: IJSONSchema; } = { nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'window.openFilesInNewWindow.off' }, "Files will open in the window with the files' folder open or the last active window"), nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'window.openFilesInNewWindow.default' }, "Files will open in the window with the files' folder open or the last active window unless opened via the dock or from finder (macOS only)") ], - 'default': 'default', + 'default': 'off', 'description': nls.localize('openFilesInNewWindow', `Controls if files should open in a new window. @@ -204,16 +230,17 @@ Note that there can still be cases where this setting is ignored (e.g. when usin Note that there can still be cases where this setting is ignored (e.g. when using the -new-window or -reuse-window command line option).` ) }, - 'window.reopenFolders': { + 'window.restoreWindows': { 'type': 'string', - 'enum': ['none', 'one', 'all'], + 'enum': ['all', 'folders', 'one', 'none'], 'enumDescriptions': [ - nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'window.reopenFolders.none' }, "Never reopen a folder."), - nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'window.reopenFolders.one' }, "Reopen the last active folder."), - nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'window.reopenFolders.all' }, "Reopen all folders of the last session."), + nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'window.reopenFolders.all' }, "Reopen all windows."), + nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'window.reopenFolders.folders' }, "Reopen all folders. Empty windows will not be restored."), + nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'window.reopenFolders.one' }, "Reopen the last active window."), + nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'window.reopenFolders.none' }, "Never reopen a window. Always start with an empty one.") ], 'default': 'one', - 'description': nls.localize('reopenFolders', "Controls how folders are being reopened after a restart. Select 'none' to never reopen a folder, 'one' to reopen the last folder you worked on or 'all' to reopen all folders of your last session.") + 'description': nls.localize('restoreWindows', "Controls how windows are being reopened after a restart. Select 'none' to always start with an empty window, 'one' to reopen the last window you worked on, 'folders' to reopen all folders you had opened or 'all' to reopen all windows of your last session.") }, 'window.restoreFullscreen': { 'type': 'boolean', @@ -227,14 +254,16 @@ Note that there can still be cases where this setting is ignored (e.g. when usin }, 'window.title': { 'type': 'string', - 'default': isMacintosh ? '${activeEditorShort}${separator}${rootName}' : '${dirty}${activeEditorShort}${separator}${rootName}${separator}${appName}', + 'default': isMacintosh ? '${activeEditorShort}${separator}${folderName}' : '${dirty}${activeEditorShort}${separator}${folderName}${separator}${appName}', 'description': nls.localize({ comment: ['This is the description for a setting. Values surrounded by parenthesis are not to be translated.'], key: 'title' }, `Controls the window title based on the active editor. Variables are substituted based on the context: \${activeEditorShort}: e.g. myFile.txt \${activeEditorMedium}: e.g. myFolder/myFile.txt \${activeEditorLong}: e.g. /Users/Development/myProject/myFolder/myFile.txt -\${rootName}: e.g. myProject -\${rootPath}: e.g. /Users/Development/myProject +\${folderName}: e.g. myFolder +\${folderPath}: e.g. /Users/Development/myFolder +\${rootName}: e.g. myFolder1, myFolder2, myFolder3 +\${rootPath}: e.g. /Users/Development/myWorkspace \${appName}: e.g. VS Code \${dirty}: a dirty indicator if the active editor is dirty \${separator}: a conditional separator (" - ") that only shows when surrounded by variables with values`) @@ -249,7 +278,7 @@ Note that there can still be cases where this setting is ignored (e.g. when usin nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'window.newWindowDimensions.fullscreen' }, "Open new windows in full screen mode.") ], 'default': 'default', - 'description': nls.localize('newWindowDimensions', "Controls the dimensions of opening a new window. By default, a new window will open in the center of the screen with small dimensions. When set to 'inherit', the window will get the same dimensions as the last active one. When set to 'maximized', the window will open maximized and fullscreen if configured to 'fullscreen'.") + 'description': nls.localize('newWindowDimensions', "Controls the dimensions of opening a new window when at least one window is already opened. By default, a new window will open in the center of the screen with small dimensions. When set to 'inherit', the window will get the same dimensions as the last window that was active. When set to 'maximized', the window will open maximized and fullscreen if configured to 'fullscreen'. Note that this setting does not have an impact on the first window that is opened. The first window will always restore the size and location as you left it before closing.") }, }; @@ -266,6 +295,11 @@ if (isWindows || isLinux) { 'default': 'default', 'description': nls.localize('menuBarVisibility', "Control the visibility of the menu bar. A setting of 'toggle' means that the menu bar is hidden and a single press of the Alt key will show it. By default, the menu bar will be visible, unless the window is full screen.") }; + properties['window.enableMenuBarMnemonics'] = { + 'type': 'boolean', + 'default': true, + 'description': nls.localize('enableMenuBarMnemonics', "If enabled, the main menus can be opened via Alt-key shortcuts. Disabling mnemonics allows to bind these Alt-key shortcuts to editor commands instead.") + }; } if (isWindows) { @@ -336,3 +370,35 @@ configurationRegistry.registerConfiguration({ } } }); + +// Configuration: Workspace +// TODO@Ben multi root +if (product.quality !== 'stable') { + configurationRegistry.registerConfiguration({ + 'id': 'workspace', + 'order': 10000, + 'title': nls.localize('workspaceConfigurationTitle', "Workspace"), + 'type': 'object', + 'properties': { + 'workspace': { + 'type': 'object', + 'description': nls.localize('workspaces.title', "Folder configuration of the workspace"), + 'additionalProperties': { + 'anyOf': [{ + 'type': 'object', + 'description': nls.localize('files.exclude.boolean', "The glob pattern to match file paths against. Set to true or false to enable or disable the pattern."), + 'properties': { + 'folders': { + 'description': nls.localize('workspaces.additionalFolders', "Folders of this workspace"), + 'type': 'array', + 'items': { + 'type': 'string' + } + } + } + }] + } + } + } + }); +} \ No newline at end of file diff --git a/src/vs/workbench/electron-browser/main.ts b/src/vs/workbench/electron-browser/main.ts index a25d8300ddb49..3fe3ae5f165b7 100644 --- a/src/vs/workbench/electron-browser/main.ts +++ b/src/vs/workbench/electron-browser/main.ts @@ -18,41 +18,41 @@ import paths = require('vs/base/common/paths'); import uri from 'vs/base/common/uri'; import strings = require('vs/base/common/strings'); import { IResourceInput } from 'vs/platform/editor/common/editor'; -import { IWorkspace, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { WorkspaceConfigurationService } from 'vs/workbench/services/configuration/node/configurationService'; -import { ParsedArgs } from 'vs/platform/environment/common/environment'; +import { LegacyWorkspace, Workspace } from 'vs/platform/workspace/common/workspace'; +import { WorkspaceConfigurationService } from 'vs/workbench/services/configuration/node/configuration'; import { realpath, stat } from 'vs/base/node/pfs'; import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; import path = require('path'); import gracefulFs = require('graceful-fs'); -import { IPath, IOpenFileRequest } from 'vs/workbench/electron-browser/common'; import { IInitData } from 'vs/workbench/services/timer/common/timerService'; import { TimerService } from 'vs/workbench/services/timer/node/timerService'; +import { KeyboardMapperFactory } from "vs/workbench/services/keybinding/electron-browser/keybindingService"; +import { IWindowConfiguration, IPath } from 'vs/platform/windows/common/windows'; +import { IStorageService } from 'vs/platform/storage/common/storage'; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { StorageService, inMemoryLocalStorageInstance } from 'vs/platform/storage/common/storageService'; import { webFrame } from 'electron'; import fs = require('fs'); +import { createHash } from 'crypto'; gracefulFs.gracefulify(fs); // enable gracefulFs -export interface IWindowConfiguration extends ParsedArgs, IOpenFileRequest { - appRoot: string; - execPath: string; - - userEnv: any; /* vs/code/electron-main/env/IProcessEnvironment*/ - - workspacePath?: string; - - zoomLevel?: number; - fullscreen?: boolean; -} - export function startup(configuration: IWindowConfiguration): TPromise { // Ensure others can listen to zoom level changes browser.setZoomFactor(webFrame.getZoomFactor()); - browser.setZoomLevel(webFrame.getZoomLevel()); + + // See https://github.com/Microsoft/vscode/issues/26151 + // Can be trusted because we are not setting it ourselves. + browser.setZoomLevel(webFrame.getZoomLevel(), true /* isTrusted */); + browser.setFullscreen(!!configuration.fullscreen); + KeyboardMapperFactory.INSTANCE._onKeyboardLayoutChanged(configuration.isISOKeyboard); + + browser.setAccessibilitySupport(configuration.accessibilitySupport ? platform.AccessibilitySupport.Enabled : platform.AccessibilitySupport.Disabled); + // Setup Intl comparer.setFileNameComparer(new Intl.Collator(undefined, { numeric: true, sensitivity: 'base' })); @@ -66,12 +66,8 @@ export function startup(configuration: IWindowConfiguration): TPromise { filesToDiff }; - // Resolve workspace - return getWorkspace(configuration.workspacePath).then(workspace => { - - // Open workbench - return openWorkbench(configuration, workspace, shellOptions); - }); + // Open workbench + return openWorkbench(configuration, shellOptions); } function toInputs(paths: IPath[], isUntitledFile?: boolean): IResourceInput[] { @@ -99,12 +95,64 @@ function toInputs(paths: IPath[], isUntitledFile?: boolean): IResourceInput[] { }); } -function getWorkspace(workspacePath: string): TPromise { - if (!workspacePath) { +function openWorkbench(configuration: IWindowConfiguration, options: IOptions): TPromise { + return resolveLegacyWorkspace(configuration).then(legacyWorkspace => { + const workspace = legacyWorkspaceToMultiRootWorkspace(legacyWorkspace); + const environmentService = new EnvironmentService(configuration, configuration.execPath); + const workspaceConfigurationService = new WorkspaceConfigurationService(environmentService, workspace); + const timerService = new TimerService((window).MonacoEnvironment.timers as IInitData, !!workspace); + const storageService = createStorageService(legacyWorkspace, workspace, configuration, environmentService); + + // Since the configuration service is one of the core services that is used in so many places, we initialize it + // right before startup of the workbench shell to have its data ready for consumers + return workspaceConfigurationService.initialize().then(() => { + timerService.beforeDOMContentLoaded = Date.now(); + + return domContentLoaded().then(() => { + timerService.afterDOMContentLoaded = Date.now(); + + // Open Shell + timerService.beforeWorkbenchOpen = Date.now(); + const shell = new WorkbenchShell(document.body, { + contextService: workspaceConfigurationService, + configurationService: workspaceConfigurationService, + environmentService, + timerService, + storageService + }, configuration, options); + shell.open(); + + // Inform user about loading issues from the loader + (self).require.config({ + onError: (err: any) => { + if (err.errorCode === 'load') { + shell.onUnexpectedError(loaderError(err)); + } + } + }); + }); + }); + }); +} + +function legacyWorkspaceToMultiRootWorkspace(legacyWorkspace: LegacyWorkspace): Workspace { + if (!legacyWorkspace) { + return null; + } + + return new Workspace( + createHash('md5').update(legacyWorkspace.resource.fsPath).update(legacyWorkspace.ctime ? String(legacyWorkspace.ctime) : '').digest('hex'), + path.basename(legacyWorkspace.resource.fsPath), + [legacyWorkspace.resource] + ); +} + +function resolveLegacyWorkspace(configuration: IWindowConfiguration): TPromise { + if (!configuration.workspacePath) { return TPromise.as(null); } - return realpath(workspacePath).then(realWorkspacePath => { + return realpath(configuration.workspacePath).then(realWorkspacePath => { // for some weird reason, node adds a trailing slash to UNC paths // we never ever want trailing slashes as our workspace path unless @@ -114,57 +162,39 @@ function getWorkspace(workspacePath: string): TPromise { realWorkspacePath = strings.rtrim(realWorkspacePath, paths.nativeSep); } - const workspaceResource = uri.file(realWorkspacePath); - const folderName = path.basename(realWorkspacePath) || realWorkspacePath; + // update config + configuration.workspacePath = realWorkspacePath; - return stat(realWorkspacePath).then(folderStat => { - return { - 'resource': workspaceResource, - 'name': folderName, - 'uid': platform.isLinux ? folderStat.ino : folderStat.birthtime.getTime() // On Linux, birthtime is ctime, so we cannot use it! We use the ino instead! - }; - }); - }, (error) => { + // resolve ctime of workspace + return stat(realWorkspacePath).then(folderStat => new LegacyWorkspace( + uri.file(realWorkspacePath), + platform.isLinux ? folderStat.ino : folderStat.birthtime.getTime() // On Linux, birthtime is ctime, so we cannot use it! We use the ino instead! + )); + }, error => { errors.onUnexpectedError(error); return null; // treat invalid paths as empty workspace }); } -function openWorkbench(environment: IWindowConfiguration, workspace: IWorkspace, options: IOptions): TPromise { - const environmentService = new EnvironmentService(environment, environment.execPath); - const contextService = new WorkspaceContextService(workspace); - const configurationService = new WorkspaceConfigurationService(contextService, environmentService); - const timerService = new TimerService((window).MonacoEnvironment.timers as IInitData, !contextService.hasWorkspace()); - - // Since the configuration service is one of the core services that is used in so many places, we initialize it - // right before startup of the workbench shell to have its data ready for consumers - return configurationService.initialize().then(() => { - timerService.beforeDOMContentLoaded = Date.now(); - - return domContentLoaded().then(() => { - timerService.afterDOMContentLoaded = Date.now(); - - // Open Shell - timerService.beforeWorkbenchOpen = Date.now(); - const shell = new WorkbenchShell(document.body, { - configurationService, - contextService, - environmentService, - timerService - }, options); - shell.open(); - - // Inform user about loading issues from the loader - (self).require.config({ - onError: (err: any) => { - if (err.errorCode === 'load') { - shell.onUnexpectedError(loaderError(err)); - } - } - }); - }); - }); +function createStorageService(legacyWorkspace: LegacyWorkspace, workspace: Workspace, configuration: IWindowConfiguration, environmentService: IEnvironmentService): IStorageService { + let id: string; + if (workspace) { + id = legacyWorkspace.resource.toString(); + } else if (configuration.backupPath) { + // if we do not have a workspace open, we need to find another identifier for the window to store + // workspace UI state. if we have a backup path in the configuration we can use that because this + // will be a unique identifier per window that is stable between restarts as long as there are + // dirty files in the workspace. + // We use basename() to produce a short identifier, we do not need the full path. We use a custom + // scheme so that we can later distinguish these identifiers from the workspace one. + id = uri.from({ path: path.basename(configuration.backupPath), scheme: 'empty' }).toString(); + } + + const disableStorage = !!environmentService.extensionTestsPath; // never keep any state when running extension tests! + const storage = disableStorage ? inMemoryLocalStorageInstance : window.localStorage; + + return new StorageService(storage, storage, { id, name: workspace && workspace.name, roots: workspace && workspace.roots }, legacyWorkspace ? legacyWorkspace.ctime : void 0); } function loaderError(err: Error): Error { diff --git a/src/vs/workbench/electron-browser/media/shell.css b/src/vs/workbench/electron-browser/media/shell.css index 2b5ece9a68db5..f734da27292c9 100644 --- a/src/vs/workbench/electron-browser/media/shell.css +++ b/src/vs/workbench/electron-browser/media/shell.css @@ -98,6 +98,10 @@ opacity: 1 !important; } +.monaco-shell .mac select:focus { + border: none; /* outline is a square, but border has a radius, so we avoid this glitch when focussed (https://github.com/Microsoft/vscode/issues/26045) */ +} + .monaco-shell.hc-black [tabindex="0"]:focus, .monaco-shell.hc-black .synthetic-focus, .monaco-shell.hc-black select:focus, diff --git a/src/vs/workbench/electron-browser/nodeCachedDataManager.ts b/src/vs/workbench/electron-browser/nodeCachedDataManager.ts index 19aa736e260a7..6867f109c80e4 100644 --- a/src/vs/workbench/electron-browser/nodeCachedDataManager.ts +++ b/src/vs/workbench/electron-browser/nodeCachedDataManager.ts @@ -7,11 +7,13 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { onUnexpectedError } from 'vs/base/common/errors'; import { TPromise } from 'vs/base/common/winjs.base'; -import { join } from 'path'; +import { join, basename } from 'path'; import { readdir, rimraf, stat } from 'vs/base/node/pfs'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; +declare type OnNodeCachedDataArgs = [{ errorCode: string, path: string, detail?: string }, { path: string, length: number }]; +declare const MonacoEnvironment: { onNodeCachedData: OnNodeCachedDataArgs[] }; export class NodeCachedDataManager { @@ -26,7 +28,7 @@ export class NodeCachedDataManager { this._telemetryService = telemetryService; this._environmentService = environmentService; - this._handleCachedDataErrors(); + this._handleCachedDataInfo(); this._manageCachedDataSoon(); } @@ -34,22 +36,33 @@ export class NodeCachedDataManager { this._disposables = dispose(this._disposables); } - private _handleCachedDataErrors(): void { - const onNodeCachedDataError = (err) => { - this._telemetryService.publicLog('nodeCachedData', { errorCode: err.errorCode, path: err.path }); - }; + private _handleCachedDataInfo(): void { - // handle future and past errors - (self).require.config({ onNodeCachedDataError }); - ((window).MonacoEnvironment.nodeCachedDataErrors).forEach(onNodeCachedDataError); - delete (window).MonacoEnvironment.nodeCachedDataErrors; + let didRejectCachedData = false; + let didProduceCachedData = false; + for (const [err, data] of MonacoEnvironment.onNodeCachedData) { + // build summary + didRejectCachedData = didRejectCachedData || Boolean(err); + didProduceCachedData = didProduceCachedData || Boolean(data); - // stop when being disposed - this._disposables.push({ - dispose() { - (self).require.config({ onNodeCachedDataError: undefined }, true); + // log each failure separately + if (err) { + this._telemetryService.publicLog('cachedDataError', { + errorCode: err.errorCode, + path: basename(err.path) + }); } + } + + // log summary + this._telemetryService.publicLog('cachedDataInfo', { + didRequestCachedData: Boolean(global.require.getConfig().nodeCachedDataDir), + didRejectCachedData, + didProduceCachedData }); + + global.require.config({ onNodeCachedData: undefined }); + delete MonacoEnvironment.onNodeCachedData; } private _manageCachedDataSoon(): void { diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index 09186e6420669..ab4f6c3f4ba2f 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -13,16 +13,14 @@ import * as platform from 'vs/base/common/platform'; import { Dimension, Builder, $ } from 'vs/base/browser/builder'; import dom = require('vs/base/browser/dom'); import aria = require('vs/base/browser/ui/aria/aria'); -import { dispose, IDisposable, Disposables } from 'vs/base/common/lifecycle'; +import { dispose, IDisposable } from 'vs/base/common/lifecycle'; import errors = require('vs/base/common/errors'); import { toErrorMessage } from 'vs/base/common/errorMessage'; -import { stopProfiling } from 'vs/base/node/profiler'; import product from 'vs/platform/node/product'; import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import pkg from 'vs/platform/node/package'; import { ContextViewService } from 'vs/platform/contextview/browser/contextViewService'; import { Workbench, IWorkbenchStartedInfo } from 'vs/workbench/electron-browser/workbench'; -import { StorageService, inMemoryLocalStorageInstance } from 'vs/platform/storage/common/storageService'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { NullTelemetryService, configurationTelemetry, loadExperiments, lifecycleTelemetry } from 'vs/platform/telemetry/common/telemetryUtils'; import { ITelemetryAppenderChannel, TelemetryAppenderClient } from 'vs/platform/telemetry/common/telemetryIpc'; @@ -34,7 +32,7 @@ import { resolveWorkbenchCommonProperties, getOrCreateMachineId } from 'vs/platf import { machineIdIpcChannel } from 'vs/platform/telemetry/node/commonProperties'; import { WorkspaceStats } from 'vs/workbench/services/telemetry/common/workspaceStats'; import { IWindowIPCService, WindowIPCService } from 'vs/workbench/services/window/electron-browser/windowService'; -import { IWindowsService, IWindowService } from 'vs/platform/windows/common/windows'; +import { IWindowsService, IWindowService, IWindowConfiguration } from 'vs/platform/windows/common/windows'; import { WindowsChannelClient } from 'vs/platform/windows/common/windowsIpc'; import { WindowService } from 'vs/platform/windows/electron-browser/windowService'; import { MessageService } from 'vs/workbench/services/message/electron-browser/messageService'; @@ -53,14 +51,14 @@ import { IntegrityServiceImpl } from 'vs/platform/integrity/node/integrityServic import { IIntegrityService } from 'vs/platform/integrity/common/integrity'; import { EditorWorkerServiceImpl } from 'vs/editor/common/services/editorWorkerServiceImpl'; import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService'; -import { MainProcessExtensionService } from 'vs/workbench/api/node/mainThreadExtensionService'; +import { MainProcessExtensionService } from 'vs/workbench/api/electron-browser/mainThreadExtensionService'; import { IOptions } from 'vs/workbench/common/options'; import { IStorageService } from 'vs/platform/storage/common/storage'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; -import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; +import { ILifecycleService, LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; import { IMarkerService } from 'vs/platform/markers/common/markers'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IMessageService, IChoiceService, Severity } from 'vs/platform/message/common/message'; @@ -74,7 +72,8 @@ import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import { WorkbenchModeServiceImpl } from 'vs/workbench/services/mode/common/workbenchModeService'; import { IModeService } from 'vs/editor/common/services/modeService'; import { IUntitledEditorService, UntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; -import { CrashReporter } from 'vs/workbench/electron-browser/crashReporter'; +import { ICrashReporterService, NullCrashReporterService } from 'vs/workbench/services/crashReporter/common/crashReporterService'; +import { CrashReporterService } from 'vs/workbench/services/crashReporter/electron-browser/crashReporterService'; import { NodeCachedDataManager } from 'vs/workbench/electron-browser/nodeCachedDataManager'; import { getDelayedChannel } from 'vs/base/parts/ipc/common/ipc'; import { connect as connectNet } from 'vs/base/parts/ipc/node/ipc.net'; @@ -86,25 +85,21 @@ import { UpdateChannelClient } from 'vs/platform/update/common/updateIpc'; import { IUpdateService } from 'vs/platform/update/common/update'; import { URLChannelClient } from 'vs/platform/url/common/urlIpc'; import { IURLService } from 'vs/platform/url/common/url'; -import { IBackupService } from 'vs/platform/backup/common/backup'; -import { BackupChannelClient } from 'vs/platform/backup/common/backupIpc'; -import { ReportPerformanceIssueAction } from 'vs/workbench/electron-browser/actions'; import { ExtensionHostProcessWorker } from 'vs/workbench/electron-browser/extensionHost'; import { ITimerService } from 'vs/workbench/services/timer/common/timerService'; import { remote, ipcRenderer as ipc } from 'electron'; -import { ITextMateService } from 'vs/editor/node/textMate/textMateService'; -import { MainProcessTextMateSyntax } from 'vs/editor/electron-browser/textMate/TMSyntax'; import { BareFontInfo } from 'vs/editor/common/config/fontInfo'; import { restoreFontInfo, readFontInfo, saveFontInfo } from 'vs/editor/browser/config/configuration'; import * as browser from 'vs/base/browser/browser'; -import SCMPreview from 'vs/workbench/parts/scm/browser/scmPreview'; -import { readdir } from 'vs/base/node/pfs'; -import { join } from 'path'; import 'vs/platform/opener/browser/opener.contribution'; import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService'; import { WorkbenchThemeService } from 'vs/workbench/services/themes/electron-browser/workbenchThemeService'; +import { ITextResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration'; +import { TextResourceConfigurationService } from 'vs/editor/common/services/resourceConfigurationImpl'; import { registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; -import { foreground, focusBorder, scrollbarShadow, scrollbarSliderActiveBackground, scrollbarSliderBackground, scrollbarSliderHoverBackground, listHighlightForeground } from 'vs/platform/theme/common/colorRegistry'; +import { foreground, selectionBackground, focusBorder, scrollbarShadow, scrollbarSliderActiveBackground, scrollbarSliderBackground, scrollbarSliderHoverBackground, listHighlightForeground, inputPlaceholderForeground } from 'vs/platform/theme/common/colorRegistry'; +import { TextMateService } from 'vs/workbench/services/textMate/electron-browser/TMSyntax'; +import { ITextMateService } from 'vs/workbench/services/textMate/electron-browser/textMateService'; /** * Services that we require for the Shell @@ -114,6 +109,7 @@ export interface ICoreServices { configurationService: IConfigurationService; environmentService: IEnvironmentService; timerService: ITimerService; + storageService: IStorageService; } const currentWindow = remote.getCurrentWindow(); @@ -136,6 +132,7 @@ export class WorkbenchShell { private windowIPCService: IWindowIPCService; private timerService: ITimerService; private themeService: WorkbenchThemeService; + private lifecycleService: LifecycleService; private container: HTMLElement; private toUnbind: IDisposable[]; @@ -144,18 +141,21 @@ export class WorkbenchShell { private content: HTMLElement; private contentsContainer: Builder; + private configuration: IWindowConfiguration; private options: IOptions; private workbench: Workbench; - constructor(container: HTMLElement, services: ICoreServices, options: IOptions) { + constructor(container: HTMLElement, services: ICoreServices, configuration: IWindowConfiguration, options: IOptions) { this.container = container; + this.configuration = configuration; this.options = options; this.contextService = services.contextService; this.configurationService = services.configurationService; this.environmentService = services.environmentService; this.timerService = services.timerService; + this.storageService = services.storageService; this.toUnbind = []; this.previousErrorTime = 0; @@ -172,13 +172,8 @@ export class WorkbenchShell { // Instantiation service with services const [instantiationService, serviceCollection] = this.initServiceCollection(parent.getHTMLElement()); - //crash reporting - if (!!product.crashReporter) { - instantiationService.createInstance(CrashReporter, product.crashReporter); - } - // Workbench - this.workbench = instantiationService.createInstance(Workbench, parent.getHTMLElement(), workbenchContainer.getHTMLElement(), this.options, serviceCollection); + this.workbench = instantiationService.createInstance(Workbench, parent.getHTMLElement(), workbenchContainer.getHTMLElement(), this.configuration, this.options, serviceCollection); this.workbench.startup({ onWorkbenchStarted: (info: IWorkbenchStartedInfo) => { @@ -187,6 +182,10 @@ export class WorkbenchShell { // start cached data manager instantiationService.createInstance(NodeCachedDataManager); + + // Set lifecycle phase to `Runnning` so that other contributions + // can now do something + this.lifecycleService.phase = LifecyclePhase.Running; } }); @@ -221,7 +220,10 @@ export class WorkbenchShell { theme: this.themeService.getColorTheme().id, language: platform.language, experiments: this.telemetryService.getExperiments(), - pinnedViewlets: info.pinnedViewlets + pinnedViewlets: info.pinnedViewlets, + restoredViewlet: info.restoredViewlet, + restoredEditors: info.restoredEditors.length, + startupKind: this.lifecycleService.startupKind }); // Telemetry: startup metrics @@ -240,49 +242,17 @@ export class WorkbenchShell { if ((platform.isLinux || platform.isMacintosh) && process.getuid() === 0) { this.messageService.show(Severity.Warning, nls.localize('runningAsRoot', "It is recommended not to run Code as 'root'.")); } - - // Profiler: startup cpu profile - const { profileStartup } = this.environmentService; - if (profileStartup) { - this.extensionService.onReady().then(() => stopProfiling(profileStartup.dir, profileStartup.prefix)).then(() => { - - readdir(profileStartup.dir).then(files => { - return files.filter(value => value.indexOf(profileStartup.prefix) === 0); - }).then(files => { - - const profileFiles = files.reduce((prev, cur) => `${prev}${join(profileStartup.dir, cur)}\n`, '\n'); - - const primaryButton = this.messageService.confirm({ - type: 'info', - message: nls.localize('prof.message', "Successfully created profiles."), - detail: nls.localize('prof.detail', "Please create an issue and manually attach the following files:\n{0}", profileFiles), - primaryButton: nls.localize('prof.restartAndFileIssue', "Create Issue and Restart"), - secondaryButton: nls.localize('prof.restart', "Restart") - }); - - let createIssue = TPromise.as(void 0); - if (primaryButton) { - const action = this.workbench.getInstantiationService().createInstance(ReportPerformanceIssueAction, ReportPerformanceIssueAction.ID, ReportPerformanceIssueAction.LABEL); - - createIssue = action.run(`:warning: Make sure to **attach** these files: :warning:\n${files.map(file => `-\`${join(profileStartup.dir, file)}\``).join('\n')}`).then(() => { - return this.windowsService.showItemInFolder(profileFiles[0]); - }); - } - createIssue.then(() => this.windowsService.relaunch({ removeArgs: ['--prof-startup'] })); - }); - - }, err => console.error(err)); - } } private initServiceCollection(container: HTMLElement): [IInstantiationService, ServiceCollection] { - const disposables = new Disposables(); + const disposables: IDisposable[] = []; const serviceCollection = new ServiceCollection(); serviceCollection.set(IWorkspaceContextService, this.contextService); serviceCollection.set(IConfigurationService, this.configurationService); serviceCollection.set(IEnvironmentService, this.environmentService); serviceCollection.set(ITimerService, this.timerService); + serviceCollection.set(IStorageService, this.storageService); const instantiationService: IInstantiationService = new InstantiationService(serviceCollection, true); @@ -291,7 +261,7 @@ export class WorkbenchShell { serviceCollection.set(IWindowIPCService, this.windowIPCService); const mainProcessClient = new ElectronIPCClient(String(`window${currentWindow.id}`)); - disposables.add(mainProcessClient); + disposables.push(mainProcessClient); const windowsChannel = mainProcessClient.getChannel('windows'); this.windowsService = new WindowsChannelClient(windowsChannel); @@ -305,11 +275,6 @@ export class WorkbenchShell { sharedProcess .done(client => client.registerChannel('choice', instantiationService.createInstance(ChoiceChannel))); - // Storage Sevice - const disableWorkspaceStorage = this.environmentService.extensionTestsPath || (!this.contextService.hasWorkspace() && !this.environmentService.isExtensionDevelopment); // without workspace or in any extension test, we use inMemory storage unless we develop an extension where we want to preserve state - this.storageService = instantiationService.createInstance(StorageService, window.localStorage, disableWorkspaceStorage ? inMemoryLocalStorageInstance : window.localStorage); - serviceCollection.set(IStorageService, this.storageService); - // Warm up font cache information before building up too many dom elements restoreFontInfo(this.storageService); readFontInfo(BareFontInfo.createFromRawSettings(this.configurationService.getConfiguration('editor'), browser.getZoomLevel())); @@ -340,31 +305,38 @@ export class WorkbenchShell { : TelemetryService.IDLE_START_EVENT_NAME )); - disposables.add(telemetryService, errorTelemetry, listener, idleMonitor); + disposables.push(telemetryService, errorTelemetry, listener, idleMonitor); } else { NullTelemetryService._experiments = instantiationService.invokeFunction(loadExperiments); this.telemetryService = NullTelemetryService; } serviceCollection.set(ITelemetryService, this.telemetryService); - disposables.add(configurationTelemetry(this.telemetryService, this.configurationService)); + disposables.push(configurationTelemetry(this.telemetryService, this.configurationService)); + + let crashReporterService = NullCrashReporterService; + if (product.crashReporter && product.hockeyApp) { + crashReporterService = instantiationService.createInstance(CrashReporterService); + } + serviceCollection.set(ICrashReporterService, crashReporterService); this.messageService = instantiationService.createInstance(MessageService, container); serviceCollection.set(IMessageService, this.messageService); serviceCollection.set(IChoiceService, this.messageService); const lifecycleService = instantiationService.createInstance(LifecycleService); - this.toUnbind.push(lifecycleService.onShutdown(reason => disposables.dispose())); + this.toUnbind.push(lifecycleService.onShutdown(reason => dispose(disposables))); this.toUnbind.push(lifecycleService.onShutdown(reason => saveFontInfo(this.storageService))); serviceCollection.set(ILifecycleService, lifecycleService); - disposables.add(lifecycleTelemetry(this.telemetryService, lifecycleService)); + disposables.push(lifecycleTelemetry(this.telemetryService, lifecycleService)); + this.lifecycleService = lifecycleService; const extensionManagementChannel = getDelayedChannel(sharedProcess.then(c => c.getChannel('extensions'))); serviceCollection.set(IExtensionManagementService, new SyncDescriptor(ExtensionManagementChannelClient, extensionManagementChannel)); const extensionEnablementService = instantiationService.createInstance(ExtensionEnablementService); serviceCollection.set(IExtensionEnablementService, extensionEnablementService); - disposables.add(extensionEnablementService); + disposables.push(extensionEnablementService); const extensionHostProcessWorker = instantiationService.createInstance(ExtensionHostProcessWorker); this.threadService = instantiationService.createInstance(MainThreadService, extensionHostProcessWorker.messagingProtocol); @@ -372,9 +344,7 @@ export class WorkbenchShell { this.timerService.beforeExtensionLoad = Date.now(); - // TODO@Joao: remove - const disabledExtensions = SCMPreview.enabled ? [] : ['vscode.git']; - this.extensionService = instantiationService.createInstance(MainProcessExtensionService, disabledExtensions); + this.extensionService = instantiationService.createInstance(MainProcessExtensionService); serviceCollection.set(IExtensionService, this.extensionService); extensionHostProcessWorker.start(this.extensionService); this.extensionService.onReady().done(() => { @@ -397,11 +367,13 @@ export class WorkbenchShell { serviceCollection.set(IModelService, new SyncDescriptor(ModelServiceImpl)); + serviceCollection.set(ITextResourceConfigurationService, new SyncDescriptor(TextResourceConfigurationService)); + serviceCollection.set(IEditorWorkerService, new SyncDescriptor(EditorWorkerServiceImpl)); serviceCollection.set(IUntitledEditorService, new SyncDescriptor(UntitledEditorService)); - serviceCollection.set(ITextMateService, new SyncDescriptor(MainProcessTextMateSyntax)); + serviceCollection.set(ITextMateService, new SyncDescriptor(TextMateService)); serviceCollection.set(ISearchService, new SyncDescriptor(SearchService)); @@ -415,9 +387,6 @@ export class WorkbenchShell { const urlChannel = mainProcessClient.getChannel('url'); serviceCollection.set(IURLService, new SyncDescriptor(URLChannelClient, urlChannel, this.windowIPCService.getWindowId())); - const backupChannel = mainProcessClient.getChannel('backup'); - serviceCollection.set(IBackupService, new SyncDescriptor(BackupChannelClient, backupChannel)); - return [instantiationService, serviceCollection]; } @@ -518,6 +487,19 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { collector.addRule(`.monaco-shell { color: ${windowForeground}; }`); } + // Selection + const windowSelectionBackground = theme.getColor(selectionBackground); + if (windowSelectionBackground) { + collector.addRule(`.monaco-shell ::selection { background-color: ${windowSelectionBackground}; }`); + } + + // Input placeholder + const placeholderForeground = theme.getColor(inputPlaceholderForeground); + if (placeholderForeground) { + collector.addRule(`.monaco-shell input::-webkit-input-placeholder { color: ${placeholderForeground}; }`); + collector.addRule(`.monaco-shell textarea::-webkit-input-placeholder { color: ${placeholderForeground}; }`); + } + // List highlight const listHighlightForegroundColor = theme.getColor(listHighlightForeground); if (listHighlightForegroundColor) { diff --git a/src/vs/workbench/electron-browser/window.ts b/src/vs/workbench/electron-browser/window.ts index b7dca196d79c5..fadbbda88acb9 100644 --- a/src/vs/workbench/electron-browser/window.ts +++ b/src/vs/workbench/electron-browser/window.ts @@ -25,25 +25,20 @@ import { toResource } from 'vs/workbench/common/editor'; import { IWorkbenchEditorService, IResourceInputType } from 'vs/workbench/services/editor/common/editorService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { IMessageService } from 'vs/platform/message/common/message'; +import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration'; -import { IWindowsService, IWindowService, IWindowSettings } from 'vs/platform/windows/common/windows'; +import { IWindowsService, IWindowService, IWindowSettings, IWindowConfiguration, IPath, IOpenFileRequest } from 'vs/platform/windows/common/windows'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IWindowIPCService } from 'vs/workbench/services/window/electron-browser/windowService'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; -import { IPath, IOpenFileRequest, IWindowConfiguration } from 'vs/workbench/electron-browser/common'; import { IConfigurationEditingService, ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; import { ITitleService } from 'vs/workbench/services/title/common/titleService'; -import { Registry } from 'vs/platform/platform'; -import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actionRegistry'; -import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { IWorkbenchThemeService, VS_HC_THEME, VS_DARK_THEME } from 'vs/workbench/services/themes/common/workbenchThemeService'; import * as browser from 'vs/base/browser/browser'; -import { ReloadWindowAction, ToggleDevToolsAction, ShowStartupPerformance, OpenRecentAction, ToggleSharedProcessAction } from 'vs/workbench/electron-browser/actions'; -import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; -import { Position, IResourceInput, IUntitledResourceInput } from 'vs/platform/editor/common/editor'; +import { Position, IResourceInput, IUntitledResourceInput, IEditor } from 'vs/platform/editor/common/editor'; import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import { KeyboardMapperFactory } from 'vs/workbench/services/keybinding/electron-browser/keybindingService'; import { Themable, EDITOR_DRAG_AND_DROP_BACKGROUND } from 'vs/workbench/common/theme'; @@ -90,7 +85,8 @@ export class ElectronWindow extends Themable { @IViewletService private viewletService: IViewletService, @IContextMenuService private contextMenuService: IContextMenuService, @IKeybindingService private keybindingService: IKeybindingService, - @IEnvironmentService private environmentService: IEnvironmentService + @IEnvironmentService private environmentService: IEnvironmentService, + @ITelemetryService private telemetryService: ITelemetryService ) { super(themeService); @@ -103,14 +99,12 @@ export class ElectronWindow extends Themable { private registerListeners(): void { - // React to editor input changes (Mac only) - if (platform.platform === platform.Platform.Mac) { - this.editorGroupService.onEditorsChanged(() => { - const file = toResource(this.editorService.getActiveEditorInput(), { supportSideBySide: true, filter: 'file' }); + // React to editor input changes + this.editorGroupService.onEditorsChanged(() => { + const file = toResource(this.editorService.getActiveEditorInput(), { supportSideBySide: true, filter: 'file' }); - this.titleService.setRepresentedFilename(file ? file.fsPath : ''); - }); - } + this.titleService.setRepresentedFilename(file ? file.fsPath : ''); + }); let draggedExternalResources: URI[]; let dropOverlay: Builder; @@ -134,17 +128,17 @@ export class ElectronWindow extends Themable { // Find out if folders are dragged and show the appropiate feedback then this.includesFolder(draggedExternalResources).done(includesFolder => { if (includesFolder) { - const hcOutline = this.getColor(activeContrastBorder); + const activeContrastBorderColor = this.getColor(activeContrastBorder); dropOverlay = $(window.document.getElementById(this.partService.getWorkbenchElementId())) .div({ id: 'monaco-workbench-drop-overlay' }) .style({ backgroundColor: this.getColor(EDITOR_DRAG_AND_DROP_BACKGROUND), - outlineColor: hcOutline, - outlineOffset: hcOutline ? '-2px' : null, - outlineStyle: hcOutline ? 'dashed' : null, - outlineWidth: hcOutline ? '2px' : null + outlineColor: activeContrastBorderColor, + outlineOffset: activeContrastBorderColor ? '-2px' : null, + outlineStyle: activeContrastBorderColor ? 'dashed' : null, + outlineWidth: activeContrastBorderColor ? '2px' : null }) .on(DOM.EventType.DROP, (e: DragEvent) => { DOM.EventHelper.stop(e, true); @@ -156,7 +150,8 @@ export class ElectronWindow extends Themable { if (draggedExternalResources.length > 20) { doOpen = this.messageService.confirm({ message: nls.localize('confirmOpen', "Are you sure you want to open {0} folders?", draggedExternalResources.length), - primaryButton: nls.localize({ key: 'confirmOpenButton', comment: ['&& denotes a mnemonic'] }, "&&Open") + primaryButton: nls.localize({ key: 'confirmOpenButton', comment: ['&& denotes a mnemonic'] }, "&&Open"), + type: 'question' }); } @@ -213,7 +208,11 @@ export class ElectronWindow extends Themable { // Support runAction event ipc.on('vscode:runAction', (event, actionId: string) => { - this.commandService.executeCommand(actionId, { from: 'menu' }).done(undefined, err => this.messageService.show(Severity.Error, err)); + this.commandService.executeCommand(actionId, { from: 'menu' }).done(_ => { + this.telemetryService.publicLog('commandExecuted', { id: actionId, from: 'menu' }); + }, err => { + this.messageService.show(Severity.Error, err); + }); }); // Support resolve keybindings event @@ -297,14 +296,19 @@ export class ElectronWindow extends Themable { }); // keyboard layout changed event - ipc.on('vscode:keyboardLayoutChanged', () => { - KeyboardMapperFactory.INSTANCE._onKeyboardLayoutChanged(); + ipc.on('vscode:keyboardLayoutChanged', (event, isISOKeyboard: boolean) => { + KeyboardMapperFactory.INSTANCE._onKeyboardLayoutChanged(isISOKeyboard); + }); + + // keyboard layout changed event + ipc.on('vscode:accessibilitySupportChanged', (event, accessibilitySupportEnabled: boolean) => { + browser.setAccessibilitySupport(accessibilitySupportEnabled ? platform.AccessibilitySupport.Enabled : platform.AccessibilitySupport.Disabled); }); // Configuration changes let previousConfiguredZoomLevel: number; this.configurationService.onDidUpdateConfiguration(e => { - const windowConfig: IWindowConfiguration = e.config; + const windowConfig: IWindowConfiguration = this.configurationService.getConfiguration(); let newZoomLevel = 0; if (windowConfig.window && typeof windowConfig.window.zoomLevel === 'number') { @@ -321,7 +325,10 @@ export class ElectronWindow extends Themable { if (webFrame.getZoomLevel() !== newZoomLevel) { webFrame.setZoomLevel(newZoomLevel); browser.setZoomFactor(webFrame.getZoomFactor()); - browser.setZoomLevel(webFrame.getZoomLevel()); // Ensure others can listen to zoom level changes + // See https://github.com/Microsoft/vscode/issues/26151 + // Cannot be trusted because the webFrame might take some time + // until it really applies the new zoom level + browser.setZoomLevel(webFrame.getZoomLevel(), /*isTrusted*/false); } }); @@ -334,26 +341,12 @@ export class ElectronWindow extends Themable { e.stopPropagation(); this.contextMenuService.showContextMenu({ - getAnchor: () => target, - getActions: () => TPromise.as(TextInputActions), - getKeyBinding: action => this.keybindingService.lookupKeybinding(action.id) + getAnchor: () => e, + getActions: () => TPromise.as(TextInputActions) }); } } }); - - // Developer related actions - const developerCategory = nls.localize('developer', "Developer"); - const workbenchActionsRegistry = Registry.as(Extensions.WorkbenchActions); - const isDeveloping = !this.environmentService.isBuilt || this.environmentService.isExtensionDevelopment; - workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ReloadWindowAction, ReloadWindowAction.ID, ReloadWindowAction.LABEL, isDeveloping ? { primary: KeyMod.CtrlCmd | KeyCode.KEY_R } : void 0), 'Reload Window'); - workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ToggleDevToolsAction, ToggleDevToolsAction.ID, ToggleDevToolsAction.LABEL, isDeveloping ? { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_I, mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_I } } : void 0), 'Developer: Toggle Developer Tools', developerCategory); - workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ShowStartupPerformance, ShowStartupPerformance.ID, ShowStartupPerformance.LABEL), 'Developer: Startup Performance', developerCategory); - workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ToggleSharedProcessAction, ToggleSharedProcessAction.ID, ToggleSharedProcessAction.LABEL), 'Developer: Toggle Shared Process', developerCategory); - - // Action registered here to prevent a keybinding conflict with reload window - const fileCategory = nls.localize('file', "File"); - workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(OpenRecentAction, OpenRecentAction.ID, OpenRecentAction.LABEL, { primary: isDeveloping ? null : KeyMod.CtrlCmd | KeyCode.KEY_R, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_R } }), 'File: Open Recent', fileCategory); } private resolveKeybindings(actionIds: string[]): TPromise<{ id: string; label: string, isNative: boolean; }[]> { @@ -402,8 +395,9 @@ export class ElectronWindow extends Themable { } } - private openResources(resources: (IResourceInput | IUntitledResourceInput)[], diffMode: boolean): TPromise { - return this.partService.joinCreation().then(() => { + private openResources(resources: (IResourceInput | IUntitledResourceInput)[], diffMode: boolean): TPromise { + return this.partService.joinCreation().then((): TPromise => { + // In diffMode we open 2 resources as diff if (diffMode && resources.length === 2) { @@ -461,7 +455,7 @@ export class ElectronWindow extends Themable { newAutoSaveValue = AutoSaveConfiguration.AFTER_DELAY; } - this.configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: ElectronWindow.AUTO_SAVE_SETTING, value: newAutoSaveValue }).done(null, error => this.messageService.show(Severity.Error, error)); + this.configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: ElectronWindow.AUTO_SAVE_SETTING, value: newAutoSaveValue }); } private includesFolder(resources: URI[]): TPromise { @@ -489,4 +483,4 @@ export class ElectronWindow extends Themable { public focus(): TPromise { return this.windowService.focusWindow(); } -} \ No newline at end of file +} diff --git a/src/vs/workbench/electron-browser/workbench.main.ts b/src/vs/workbench/electron-browser/workbench.main.ts index 1845a488d23f5..5dfb796f5424f 100644 --- a/src/vs/workbench/electron-browser/workbench.main.ts +++ b/src/vs/workbench/electron-browser/workbench.main.ts @@ -10,14 +10,14 @@ import 'vs/base/common/strings'; import 'vs/base/common/errors'; // Editor -import 'vs/editor/contrib/accessibility/browser/accessibility'; -import 'vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes'; -import 'vs/editor/contrib/selectionClipboard/electron-browser/selectionClipboard'; -import 'vs/editor/browser/editor.all'; +import 'vs/editor/editor.all'; // Menus/Actions import 'vs/platform/actions/electron-browser/menusExtensionPoint'; +// Views +import 'vs/workbench/parts/views/browser/viewsExtensionPoint'; + // Workbench import 'vs/workbench/browser/actions/toggleActivityBarVisibility'; import 'vs/workbench/browser/actions/toggleStatusbarVisibility'; @@ -29,6 +29,7 @@ import 'vs/workbench/parts/preferences/browser/preferences.contribution'; import 'vs/workbench/parts/preferences/browser/keybindingsEditorContribution'; import 'vs/workbench/browser/actions/configureLocale'; +import 'vs/workbench/browser/parts/quickopen/quickopen.contribution'; import 'vs/workbench/parts/quickopen/browser/quickopen.contribution'; import 'vs/workbench/browser/parts/editor/editorPicker'; @@ -45,11 +46,6 @@ import 'vs/workbench/parts/search/browser/openAnythingHandler'; // can be packag import 'vs/workbench/parts/scm/electron-browser/scm.contribution'; import 'vs/workbench/parts/scm/electron-browser/scmViewlet'; // can be packaged separately -import 'vs/workbench/parts/git/electron-browser/git.contribution'; -import 'vs/workbench/parts/git/browser/gitQuickOpen'; -import 'vs/workbench/parts/git/browser/gitActions.contribution'; -import 'vs/workbench/parts/git/browser/gitViewlet'; // can be packaged separately - import 'vs/workbench/parts/debug/electron-browser/debug.contribution'; import 'vs/workbench/parts/debug/browser/debugQuickOpen'; import 'vs/workbench/parts/debug/electron-browser/repl'; @@ -69,9 +65,6 @@ import 'vs/workbench/parts/extensions/electron-browser/extensionsViewlet'; // ca import 'vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution'; -import 'vs/workbench/parts/explorers/browser/treeExplorer.contribution'; -import 'vs/workbench/parts/explorers/browser/treeExplorerViewlet'; // can be packaged separately - import 'vs/workbench/parts/output/browser/output.contribution'; import 'vs/workbench/parts/output/browser/outputPanel'; // can be packaged separately @@ -87,7 +80,7 @@ import 'vs/workbench/parts/relauncher/electron-browser/relauncher.contribution'; import 'vs/workbench/parts/tasks/electron-browser/task.contribution'; import 'vs/workbench/parts/emmet/browser/emmet.browser.contribution'; -import 'vs/workbench/parts/emmet/node/emmet.contribution'; +import 'vs/workbench/parts/emmet/electron-browser/emmet.contribution'; // Code Editor enhacements import 'vs/workbench/parts/codeEditor/codeEditor.contribution'; @@ -105,13 +98,14 @@ import 'vs/workbench/parts/welcome/gettingStarted/electron-browser/gettingStarte import 'vs/workbench/parts/update/electron-browser/update.contribution'; -import 'vs/workbench/parts/nps/electron-browser/nps.contribution'; +import 'vs/workbench/parts/surveys/electron-browser/nps.contribution'; +import 'vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution'; import 'vs/workbench/parts/performance/electron-browser/performance.contribution'; import 'vs/workbench/parts/cli/electron-browser/cli.contribution'; -import 'vs/workbench/api/node/extHost.contribution'; +import 'vs/workbench/api/electron-browser/extensionHost.contribution'; import 'vs/workbench/electron-browser/main.contribution'; import 'vs/workbench/electron-browser/main'; diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts index 4621ddd167c91..2d0756a1061f1 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -7,6 +7,7 @@ import 'vs/css!./media/workbench'; +import { localize } from 'vs/nls'; import { TPromise, ValueCallback } from 'vs/base/common/winjs.base'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import Event, { Emitter, chain } from 'vs/base/common/event'; @@ -16,11 +17,12 @@ import { Delayer } from 'vs/base/common/async'; import * as browser from 'vs/base/browser/browser'; import assert = require('vs/base/common/assert'); import { StopWatch } from 'vs/base/common/stopwatch'; +import { startTimer } from 'vs/base/node/startupTimers'; import errors = require('vs/base/common/errors'); import { BackupFileService } from 'vs/workbench/services/backup/node/backupFileService'; import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; import { toErrorMessage } from 'vs/base/common/errorMessage'; -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import { isWindows, isLinux, isMacintosh } from 'vs/base/common/platform'; import { IOptions } from 'vs/workbench/common/options'; import { Position as EditorPosition, IResourceDiffInput, IUntitledResourceInput, IEditor } from 'vs/platform/editor/common/editor'; @@ -34,7 +36,7 @@ import { PanelPart } from 'vs/workbench/browser/parts/panel/panelPart'; import { StatusbarPart } from 'vs/workbench/browser/parts/statusbar/statusbarPart'; import { TitlebarPart } from 'vs/workbench/browser/parts/titlebar/titlebarPart'; import { WorkbenchLayout } from 'vs/workbench/browser/layout'; -import { IActionBarRegistry, Extensions as ActionBarExtensions } from 'vs/workbench/browser/actionBarRegistry'; +import { IActionBarRegistry, Extensions as ActionBarExtensions } from 'vs/workbench/browser/actions'; import { PanelRegistry, Extensions as PanelExtensions } from 'vs/workbench/browser/panel'; import { QuickOpenController } from 'vs/workbench/browser/parts/quickopen/quickOpenController'; import { getServices } from 'vs/platform/instantiation/common/extensions'; @@ -45,7 +47,7 @@ import { IStorageService, StorageScope } from 'vs/platform/storage/common/storag import { ContextMenuService } from 'vs/workbench/services/contextview/electron-browser/contextmenuService'; import { WorkbenchKeybindingService } from 'vs/workbench/services/keybinding/electron-browser/keybindingService'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { WorkspaceConfigurationService } from 'vs/workbench/services/configuration/node/configurationService'; +import { WorkspaceConfigurationService } from 'vs/workbench/services/configuration/node/configuration'; import { IConfigurationEditingService } from 'vs/workbench/services/configuration/common/configurationEditing'; import { ConfigurationEditingService } from 'vs/workbench/services/configuration/node/configurationEditingService'; import { ContextKeyService } from 'vs/platform/contextkey/browser/contextKeyService'; @@ -78,18 +80,24 @@ import { SCMService } from 'vs/workbench/services/scm/common/scmService'; import { IProgressService2 } from 'vs/platform/progress/common/progress'; import { ProgressService2 } from 'vs/workbench/services/progress/browser/progressService2'; import { TextModelResolverService } from 'vs/workbench/services/textmodelResolver/common/textModelResolverService'; -import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; +import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { ILifecycleService, ShutdownReason } from 'vs/platform/lifecycle/common/lifecycle'; -import { IWindowService } from 'vs/platform/windows/common/windows'; +import { IWindowService, IWindowConfiguration as IWindowSettings, IWindowConfiguration } from 'vs/platform/windows/common/windows'; import { IMessageService } from 'vs/platform/message/common/message'; import { IStatusbarService } from 'vs/platform/statusbar/common/statusbar'; -import { IMenuService } from 'vs/platform/actions/common/actions'; +import { IMenuService, SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { MenuService } from 'vs/platform/actions/common/menuService'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { IWindowConfiguration } from 'vs/workbench/electron-browser/common'; +import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actionRegistry'; +import { OpenRecentAction, ToggleDevToolsAction, ReloadWindowAction, inRecentFilesPickerContextKey } from "vs/workbench/electron-browser/actions"; +import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; +import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; +import { getQuickNavigateHandler, inQuickOpenContext } from 'vs/workbench/browser/parts/quickopen/quickopen'; +import { IWorkspaceEditingService } from 'vs/workbench/services/workspace/common/workspaceEditing'; +import { WorkspaceEditingService } from 'vs/workbench/services/workspace/node/workspaceEditingService'; export const MessagesVisibleContext = new RawContextKey('globalMessageVisible', false); export const EditorsVisibleContext = new RawContextKey('editorIsOpen', false); @@ -98,6 +106,7 @@ export const NoEditorsVisibleContext: ContextKeyExpr = EditorsVisibleContext.toN interface WorkbenchParams { options: IOptions; + configuration: IWindowConfiguration; serviceCollection: ServiceCollection; } @@ -114,6 +123,8 @@ export interface IWorkbenchStartedInfo { restoreViewletDuration: number; restoreEditorsDuration: number; pinnedViewlets: string[]; + restoredViewlet: string; + restoredEditors: string[]; } export interface IWorkbenchCallbacks { @@ -196,6 +207,7 @@ export class Workbench implements IPartService { constructor( parent: HTMLElement, container: HTMLElement, + configuration: IWindowConfiguration, options: IOptions, serviceCollection: ServiceCollection, @IInstantiationService private instantiationService: IInstantiationService, @@ -213,6 +225,7 @@ export class Workbench implements IPartService { this.workbenchParams = { options, + configuration, serviceCollection }; @@ -257,6 +270,9 @@ export class Workbench implements IPartService { // Create Workbench this.createWorkbench(); + // Install some global actions + this.createGlobalActions(); + // Services this.initServices(); if (this.callbacks && this.callbacks.onServicesCreated) { @@ -285,8 +301,8 @@ export class Workbench implements IPartService { // Restore last opened viewlet let viewletRestoreStopWatch: StopWatch; + let viewletIdToRestore: string; if (!this.sideBarHidden) { - let viewletIdToRestore: string; if (this.shouldRestoreLastOpenedViewlet()) { viewletIdToRestore = this.storageService.get(SidebarPart.activeViewletSettingsKey, StorageScope.WORKSPACE); @@ -297,7 +313,8 @@ export class Workbench implements IPartService { } viewletRestoreStopWatch = StopWatch.create(); - compositeAndEditorPromises.push(this.viewletService.openViewlet(viewletIdToRestore).then(() => { + const viewletTimer = startTimer('restore:viewlet'); + compositeAndEditorPromises.push(viewletTimer.while(this.viewletService.openViewlet(viewletIdToRestore)).then(() => { viewletRestoreStopWatch.stop(); })); } @@ -311,7 +328,9 @@ export class Workbench implements IPartService { // Load Editors const editorRestoreStopWatch = StopWatch.create(); - compositeAndEditorPromises.push(this.resolveEditorsToOpen().then(inputs => { + const restoredEditors: string[] = []; + const editorsTimer = startTimer('restore:editors'); + compositeAndEditorPromises.push(editorsTimer.while(this.resolveEditorsToOpen().then(inputs => { let editorOpenPromise: TPromise; if (inputs.length) { editorOpenPromise = this.editorService.openEditors(inputs.map(input => { return { input, position: EditorPosition.ONE }; })); @@ -319,11 +338,18 @@ export class Workbench implements IPartService { editorOpenPromise = this.editorPart.restoreEditors(); } - return editorOpenPromise.then(() => { + return editorOpenPromise.then(editors => { this.onEditorsChanged(); // make sure we show the proper background in the editor area editorRestoreStopWatch.stop(); + for (const editor of editors) { + if (editor.input) { + restoredEditors.push(editor.input.getName()); + } else { + restoredEditors.push(`other:${editor.getId()}`); + } + } }); - })); + }))); if (this.storageService.getBoolean(Workbench.zenModeActiveSettingKey, StorageScope.WORKSPACE, false)) { this.toggleZenMode(true); @@ -340,6 +366,8 @@ export class Workbench implements IPartService { restoreViewletDuration: viewletRestoreStopWatch ? Math.round(viewletRestoreStopWatch.elapsed()) : 0, restoreEditorsDuration: Math.round(editorRestoreStopWatch.elapsed()), pinnedViewlets: this.activitybarPart.getPinned(), + restoredViewlet: viewletIdToRestore, + restoredEditors }); } @@ -360,6 +388,38 @@ export class Workbench implements IPartService { } } + private createGlobalActions(): void { + const isDeveloping = !this.environmentService.isBuilt || this.environmentService.isExtensionDevelopment; + + // Actions registered here to adjust for developing vs built workbench + const workbenchActionsRegistry = Registry.as(Extensions.WorkbenchActions); + workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ReloadWindowAction, ReloadWindowAction.ID, ReloadWindowAction.LABEL, isDeveloping ? { primary: KeyMod.CtrlCmd | KeyCode.KEY_R } : void 0), 'Reload Window'); + workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ToggleDevToolsAction, ToggleDevToolsAction.ID, ToggleDevToolsAction.LABEL, isDeveloping ? { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_I, mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_I } } : void 0), 'Developer: Toggle Developer Tools', localize('developer', "Developer")); + workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(OpenRecentAction, OpenRecentAction.ID, OpenRecentAction.LABEL, { primary: isDeveloping ? null : KeyMod.CtrlCmd | KeyCode.KEY_R, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_R } }), 'File: Open Recent...', localize('file', "File")); + + const recentFilesPickerContext = ContextKeyExpr.and(inQuickOpenContext, ContextKeyExpr.has(inRecentFilesPickerContextKey)); + + const quickOpenNavigateNextInRecentFilesPickerId = 'workbench.action.quickOpenNavigateNextInRecentFilesPicker'; + KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: quickOpenNavigateNextInRecentFilesPickerId, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(50), + handler: getQuickNavigateHandler(quickOpenNavigateNextInRecentFilesPickerId, true), + when: recentFilesPickerContext, + primary: KeyMod.CtrlCmd | KeyCode.KEY_R, + mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_R } + }); + + const quickOpenNavigatePreviousInRecentFilesPicker = 'workbench.action.quickOpenNavigatePreviousInRecentFilesPicker'; + KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: quickOpenNavigatePreviousInRecentFilesPicker, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(50), + handler: getQuickNavigateHandler(quickOpenNavigatePreviousInRecentFilesPicker, false), + when: recentFilesPickerContext, + primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_R, + mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KEY_R } + }); + } + private resolveEditorsToOpen(): TPromise { // Files to open, diff or create @@ -391,8 +451,12 @@ export class Workbench implements IPartService { } } - // Empty workbench: some first time users will not have an untiled file; returning users will always have one - else if (!this.contextService.hasWorkspace() && this.telemetryService.getExperiments().openUntitledFile && !this.configurationService.lookup('workbench.welcome.enabled').value) { + // Empty workbench + else if (!this.contextService.hasWorkspace() && this.openUntitledFile()) { + if (this.editorPart.hasEditorsToRestore()) { + return TPromise.as([]); // do not open any empty untitled file if we have editors to restore + } + return this.backupFileService.hasBackups().then(hasBackups => { if (hasBackups) { return TPromise.as([]); // do not open any empty untitled file if we have backups to restore @@ -405,6 +469,17 @@ export class Workbench implements IPartService { return TPromise.as([]); } + private openUntitledFile() { + const startupEditor = this.configurationService.lookup('workbench.startupEditor'); + if (!startupEditor.user && !startupEditor.workspace) { + const welcomeEnabled = this.configurationService.lookup('workbench.welcome.enabled'); + if (welcomeEnabled.value !== undefined && welcomeEnabled.value !== null) { + return !welcomeEnabled.value; + } + } + return startupEditor.value === 'newUntitledFile'; + } + private initServices(): void { const { serviceCollection } = this.workbenchParams; @@ -485,7 +560,7 @@ export class Workbench implements IPartService { serviceCollection.set(IHistoryService, new SyncDescriptor(HistoryService)); // Backup File Service - this.backupFileService = this.instantiationService.createInstance(BackupFileService); + this.backupFileService = this.instantiationService.createInstance(BackupFileService, this.workbenchParams.configuration.backupPath); serviceCollection.set(IBackupFileService, this.backupFileService); // Text File Service @@ -495,18 +570,20 @@ export class Workbench implements IPartService { serviceCollection.set(ISCMService, new SyncDescriptor(SCMService)); // Text Model Resolver Service - serviceCollection.set(ITextModelResolverService, new SyncDescriptor(TextModelResolverService)); + serviceCollection.set(ITextModelService, new SyncDescriptor(TextModelResolverService)); // Configuration Editing this.configurationEditingService = this.instantiationService.createInstance(ConfigurationEditingService); serviceCollection.set(IConfigurationEditingService, this.configurationEditingService); + // Workspace Editing + serviceCollection.set(IWorkspaceEditingService, new SyncDescriptor(WorkspaceEditingService)); + // Keybinding Editing serviceCollection.set(IKeybindingEditingService, this.instantiationService.createInstance(KeybindingsEditingService)); // Configuration Resolver - const workspace = this.contextService.getWorkspace(); - serviceCollection.set(IConfigurationResolverService, new SyncDescriptor(ConfigurationResolverService, workspace ? workspace.resource : null, process.env)); + serviceCollection.set(IConfigurationResolverService, new SyncDescriptor(ConfigurationResolverService, process.env)); // Quick open service (quick open controller) this.quickOpen = this.instantiationService.createInstance(QuickOpenController); @@ -529,16 +606,13 @@ export class Workbench implements IPartService { private initSettings(): void { // Sidebar visibility - this.sideBarHidden = this.storageService.getBoolean(Workbench.sidebarHiddenSettingKey, StorageScope.WORKSPACE, false); - if (!this.contextService.hasWorkspace()) { - this.sideBarHidden = true; // we hide sidebar in single-file-mode - } + this.sideBarHidden = this.storageService.getBoolean(Workbench.sidebarHiddenSettingKey, StorageScope.WORKSPACE, !this.contextService.hasWorkspace()); // Panel part visibility const panelRegistry = Registry.as(PanelExtensions.Panels); this.panelHidden = this.storageService.getBoolean(Workbench.panelHiddenSettingKey, StorageScope.WORKSPACE, true); - if (!this.contextService.hasWorkspace() || !panelRegistry.getDefaultPanelId()) { - this.panelHidden = true; // we hide panel part in single-file-mode or if there is no default panel + if (!panelRegistry.getDefaultPanelId()) { + this.panelHidden = true; // we hide panel part if there is no default panel } // Sidebar position @@ -651,7 +725,7 @@ export class Workbench implements IPartService { return null; // not enabled when developing due to https://github.com/electron/electron/issues/3647 } - const windowConfig = this.configurationService.getConfiguration(); + const windowConfig = this.configurationService.getConfiguration(); if (windowConfig && windowConfig.window) { const useNativeTabs = windowConfig.window.nativeTabs; if (useNativeTabs) { @@ -697,8 +771,8 @@ export class Workbench implements IPartService { this.workbench.removeClass('nosidebar'); } - let promise = TPromise.as(null); // If sidebar becomes hidden, also hide the current active Viewlet if any + let promise = TPromise.as(null); if (hidden && this.sidebarPart.getActiveViewlet()) { promise = this.sidebarPart.hideActiveViewlet().then(() => { const activeEditor = this.editorPart.getActiveEditor(); @@ -715,15 +789,21 @@ export class Workbench implements IPartService { // If sidebar becomes visible, show last active Viewlet or default viewlet else if (!hidden && !this.sidebarPart.getActiveViewlet()) { - const viewletToOpen = this.sidebarPart.getLastActiveViewletId() || this.viewletService.getDefaultViewletId(); + const viewletToOpen = this.sidebarPart.getLastActiveViewletId(); if (viewletToOpen) { promise = this.sidebarPart.openViewlet(viewletToOpen, true); } } return promise.then(() => { + // Remember in settings - this.storageService.store(Workbench.sidebarHiddenSettingKey, hidden ? 'true' : 'false', StorageScope.WORKSPACE); + const defaultHidden = !this.contextService.hasWorkspace(); + if (hidden !== defaultHidden) { + this.storageService.store(Workbench.sidebarHiddenSettingKey, hidden ? 'true' : 'false', StorageScope.WORKSPACE); + } else { + this.storageService.remove(Workbench.sidebarHiddenSettingKey, StorageScope.WORKSPACE); + } // Layout if (!skipLayout) { @@ -742,8 +822,8 @@ export class Workbench implements IPartService { this.workbench.removeClass('nopanel'); } - let promise = TPromise.as(null); // If panel part becomes hidden, also hide the current active panel if any + let promise = TPromise.as(null); if (hidden && this.panelPart.getActivePanel()) { promise = this.panelPart.hideActivePanel().then(() => { // Pass Focus to Editor if Panel part is now hidden @@ -756,16 +836,20 @@ export class Workbench implements IPartService { // If panel part becomes visible, show last active panel or default panel else if (!hidden && !this.panelPart.getActivePanel()) { - const registry = Registry.as(PanelExtensions.Panels); - const panelToOpen = this.panelPart.getLastActivePanelId() || registry.getDefaultPanelId(); + const panelToOpen = this.panelPart.getLastActivePanelId(); if (panelToOpen) { promise = this.panelPart.openPanel(panelToOpen, true); } } return promise.then(() => { + // Remember in settings - this.storageService.store(Workbench.panelHiddenSettingKey, hidden ? 'true' : 'false', StorageScope.WORKSPACE); + if (!hidden) { + this.storageService.store(Workbench.panelHiddenSettingKey, 'false', StorageScope.WORKSPACE); + } else { + this.storageService.remove(Workbench.panelHiddenSettingKey, StorageScope.WORKSPACE); + } // Layout if (!skipLayout) { @@ -835,9 +919,14 @@ export class Workbench implements IPartService { this.storageService.store(Workbench.sidebarRestoreSettingKey, 'true', StorageScope.WORKSPACE); } - const zenConfig = this.configurationService.getConfiguration('zenMode'); // Preserve zen mode only on reload. Real quit gets out of zen mode so novice users do not get stuck in zen mode. - this.storageService.store(Workbench.zenModeActiveSettingKey, (zenConfig.restore || reason === ShutdownReason.RELOAD) && this.zenMode.active, StorageScope.WORKSPACE); + const zenConfig = this.configurationService.getConfiguration('zenMode'); + const zenModeActive = (zenConfig.restore || reason === ShutdownReason.RELOAD) && this.zenMode.active; + if (zenModeActive) { + this.storageService.store(Workbench.zenModeActiveSettingKey, true, StorageScope.WORKSPACE); + } else { + this.storageService.remove(Workbench.zenModeActiveSettingKey, StorageScope.WORKSPACE); + } // Pass shutdown on to each participant this.toShutdown.forEach(s => s.shutdown()); diff --git a/src/vs/workbench/node/extensionHostMain.ts b/src/vs/workbench/node/extensionHostMain.ts index d84ec84c92426..fa79d87f97618 100644 --- a/src/vs/workbench/node/extensionHostMain.ts +++ b/src/vs/workbench/node/extensionHostMain.ts @@ -12,9 +12,10 @@ import { join } from 'path'; import { IRemoteCom } from 'vs/platform/extensions/common/ipcRemoteCom'; import { ExtHostExtensionService } from 'vs/workbench/api/node/extHostExtensionService'; import { ExtHostThreadService } from 'vs/workbench/services/thread/common/extHostThreadService'; +import { QueryType, ISearchQuery } from 'vs/platform/search/common/search'; +import { DiskSearch } from 'vs/workbench/services/search/node/searchService'; import { RemoteTelemetryService } from 'vs/workbench/api/node/extHostTelemetry'; -import { IWorkspaceContextService, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { IInitData, IEnvironment, MainContext } from 'vs/workbench/api/node/extHost.protocol'; +import { IInitData, IEnvironment, IWorkspaceData, MainContext } from 'vs/workbench/api/node/extHost.protocol'; import * as errors from 'vs/base/common/errors'; const nativeExit = process.exit.bind(process); @@ -33,17 +34,19 @@ interface ITestRunner { export class ExtensionHostMain { private _isTerminating: boolean = false; - private _contextService: IWorkspaceContextService; + private _diskSearch: DiskSearch; + private _workspace: IWorkspaceData; private _environment: IEnvironment; private _extensionService: ExtHostExtensionService; constructor(remoteCom: IRemoteCom, initData: IInitData) { - // services this._environment = initData.environment; - this._contextService = new WorkspaceContextService(initData.contextService.workspace); + this._workspace = initData.workspace; + + // services const threadService = new ExtHostThreadService(remoteCom); const telemetryService = new RemoteTelemetryService('pluginHostTelemetry', threadService); - this._extensionService = new ExtHostExtensionService(initData, threadService, telemetryService, this._contextService); + this._extensionService = new ExtHostExtensionService(initData, threadService, telemetryService); // Error forwarding const mainThreadErrors = threadService.get(MainContext.MainThreadErrors); @@ -97,13 +100,10 @@ export class ExtensionHostMain { } private handleWorkspaceContainsEagerExtensions(): TPromise { - let workspace = this._contextService.getWorkspace(); - if (!workspace || !workspace.resource) { + if (!this._workspace || this._workspace.roots.length === 0) { return TPromise.as(null); } - const folderPath = workspace.resource.fsPath; - const desiredFilesMap: { [filename: string]: boolean; } = {}; @@ -122,13 +122,42 @@ export class ExtensionHostMain { } }); - const fileNames = Object.keys(desiredFilesMap); + const matchingPatterns = Object.keys(desiredFilesMap).map(p => { + // TODO: This is a bit hacky -- maybe this should be implemented by using something like + // `workspaceGlob` or something along those lines? + if (p.indexOf('*') > -1 || p.indexOf('?') > -1) { + if (!this._diskSearch) { + // Shut down this search process after 1s + this._diskSearch = new DiskSearch(false, 1000); + } + + const query: ISearchQuery = { + folderQueries: this._workspace.roots.map(root => ({ folder: root })), + type: QueryType.File, + maxResults: 1, + includePattern: { [p]: true } + }; + + return this._diskSearch.search(query).then(result => result.results.length ? p : undefined); + } else { + // find exact path + return new TPromise(async resolve => { + for (const { fsPath } of this._workspace.roots) { + if (await pfs.exists(join(fsPath, p))) { + resolve(p); + return; + } + } + resolve(undefined); + }); + } + }); - return TPromise.join(fileNames.map(f => pfs.exists(join(folderPath, f)))).then(exists => { - fileNames - .filter((f, i) => exists[i]) - .forEach(fileName => { - const activationEvent = `workspaceContains:${fileName}`; + return TPromise.join(matchingPatterns).then(patterns => { + patterns + .filter(p => p !== undefined) + .forEach(p => { + const activationEvent = `workspaceContains:${p}`; this._extensionService.activateByEvent(activationEvent) .done(null, err => console.error(err)); @@ -171,7 +200,7 @@ export class ExtensionHostMain { this.gracefulExit(1 /* ERROR */); } - return TPromise.wrapError(requireError ? requireError.toString() : nls.localize('extensionTestError', "Path {0} does not point to a valid extension test runner.", this._environment.extensionTestsPath)); + return TPromise.wrapError(new Error(requireError ? requireError.toString() : nls.localize('extensionTestError', "Path {0} does not point to a valid extension test runner.", this._environment.extensionTestsPath))); } private gracefulExit(code: number): void { diff --git a/src/vs/workbench/node/extensionPoints.ts b/src/vs/workbench/node/extensionPoints.ts index 1eb54c3f49e6b..c1b76d345ecf1 100644 --- a/src/vs/workbench/node/extensionPoints.ts +++ b/src/vs/workbench/node/extensionPoints.ts @@ -18,6 +18,7 @@ import Types = require('vs/base/common/types'); import { isValidExtensionDescription } from 'vs/platform/extensions/node/extensionValidator'; import * as semver from 'semver'; import { getIdAndVersionFromLocalExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; +import { getParseErrorMessage } from 'vs/base/common/jsonErrorMessages'; const MANIFEST_FILE = 'package.json'; @@ -47,7 +48,9 @@ export class MessagesCollector { this._messages.push({ type: type, message: message, - source: source + source: source, + extensionId: undefined, + extensionPointId: undefined }); } @@ -88,7 +91,7 @@ class ExtensionManifestParser extends ExtensionManifestHandler { try { return JSON.parse(manifestContents.toString()); } catch (e) { - this._collector.error(this._absoluteFolderPath, nls.localize('jsonParseFail', "Failed to parse {0}: {1}.", this._absoluteManifestPath, json.getParseErrorMessage(e.message))); + this._collector.error(this._absoluteFolderPath, nls.localize('jsonParseFail', "Failed to parse {0}: {1}.", this._absoluteManifestPath, getParseErrorMessage(e.message))); } return null; }, (err) => { @@ -123,7 +126,7 @@ class ExtensionManifestNLSReplacer extends ExtensionManifestHandler { return ExtensionManifestNLSReplacer.resolveOriginalMessageBundle(messageBundle.original, errors).then(originalMessages => { if (errors.length > 0) { errors.forEach((error) => { - this._collector.error(this._absoluteFolderPath, nls.localize('jsonsParseFail', "Failed to parse {0} or {1}: {2}.", messageBundle.localized, messageBundle.original, json.getParseErrorMessage(error.error))); + this._collector.error(this._absoluteFolderPath, nls.localize('jsonsParseFail', "Failed to parse {0} or {1}: {2}.", messageBundle.localized, messageBundle.original, getParseErrorMessage(error.error))); }); return extensionDescription; } diff --git a/src/vs/workbench/parts/backup/common/backup.contribution.ts b/src/vs/workbench/parts/backup/common/backup.contribution.ts index c531ff3baa371..cd58285fff020 100644 --- a/src/vs/workbench/parts/backup/common/backup.contribution.ts +++ b/src/vs/workbench/parts/backup/common/backup.contribution.ts @@ -5,7 +5,7 @@ 'use strict'; -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; import { BackupModelTracker } from 'vs/workbench/parts/backup/common/backupModelTracker'; import { BackupRestorer } from 'vs/workbench/parts/backup/common/backupRestorer'; diff --git a/src/vs/workbench/parts/backup/common/backupModelTracker.ts b/src/vs/workbench/parts/backup/common/backupModelTracker.ts index c437b4d70f875..787897cd389bc 100644 --- a/src/vs/workbench/parts/backup/common/backupModelTracker.ts +++ b/src/vs/workbench/parts/backup/common/backupModelTracker.ts @@ -11,7 +11,6 @@ import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { ITextFileService, TextFileModelChangeEvent, StateChange } from 'vs/workbench/services/textfile/common/textfiles'; import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; -import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IFilesConfiguration, AutoSaveConfiguration, CONTENT_CHANGE_EVENT_BUFFER_DELAY } from 'vs/platform/files/common/files'; @@ -29,7 +28,6 @@ export class BackupModelTracker implements IWorkbenchContribution { @IBackupFileService private backupFileService: IBackupFileService, @ITextFileService private textFileService: ITextFileService, @IUntitledEditorService private untitledEditorService: IUntitledEditorService, - @IEnvironmentService private environmentService: IEnvironmentService, @IConfigurationService private configurationService: IConfigurationService ) { this.toDispose = []; @@ -38,7 +36,7 @@ export class BackupModelTracker implements IWorkbenchContribution { } private registerListeners() { - if (this.environmentService.isExtensionDevelopment) { + if (!this.backupFileService.backupEnabled) { return; } @@ -52,7 +50,7 @@ export class BackupModelTracker implements IWorkbenchContribution { this.toDispose.push(this.untitledEditorService.onDidDisposeModel((e) => this.discardBackup(e))); // Listen to config changes - this.toDispose.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationChange(e.config))); + this.toDispose.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationChange(this.configurationService.getConfiguration()))); } private onConfigurationChange(configuration: IFilesConfiguration): void { @@ -80,9 +78,8 @@ export class BackupModelTracker implements IWorkbenchContribution { } private onUntitledModelChanged(resource: Uri): void { - const input = this.untitledEditorService.get(resource); - if (input.isDirty()) { - input.resolve().then(model => this.backupFileService.backupResource(resource, model.getValue(), model.getVersionId())).done(null, errors.onUnexpectedError); + if (this.untitledEditorService.isDirty(resource)) { + this.untitledEditorService.loadOrCreate({ resource }).then(model => this.backupFileService.backupResource(resource, model.getValue(), model.getVersionId())).done(null, errors.onUnexpectedError); } else { this.discardBackup(resource); } diff --git a/src/vs/workbench/parts/backup/common/backupRestorer.ts b/src/vs/workbench/parts/backup/common/backupRestorer.ts index 54d1e83289774..26c470d63bd89 100644 --- a/src/vs/workbench/parts/backup/common/backupRestorer.ts +++ b/src/vs/workbench/parts/backup/common/backupRestorer.ts @@ -7,8 +7,7 @@ import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; -import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; -import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { IUntitledEditorService, UNTITLED_SCHEMA } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; import { IPartService } from 'vs/workbench/services/part/common/partService'; import errors = require('vs/base/common/errors'); @@ -17,6 +16,7 @@ import { IEditorGroupService } from 'vs/workbench/services/group/common/groupSer import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { Position, IResourceInput, IUntitledResourceInput } from 'vs/platform/editor/common/editor'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; +import { Schemas } from 'vs/base/common/network'; export class BackupRestorer implements IWorkbenchContribution { @@ -24,7 +24,6 @@ export class BackupRestorer implements IWorkbenchContribution { constructor( @IUntitledEditorService private untitledEditorService: IUntitledEditorService, - @IEnvironmentService private environmentService: IEnvironmentService, @IPartService private partService: IPartService, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IBackupFileService private backupFileService: IBackupFileService, @@ -35,14 +34,14 @@ export class BackupRestorer implements IWorkbenchContribution { } private restoreBackups(): void { - if (!this.environmentService.isExtensionDevelopment) { + if (this.backupFileService.backupEnabled) { this.partService.joinCreation().then(() => { this.doRestoreBackups().done(null, errors.onUnexpectedError); }); } } - private doRestoreBackups(): TPromise { + private doRestoreBackups(): TPromise { // Find all files and untitled with backups return this.backupFileService.getWorkspaceFileBackups().then(backups => { @@ -54,7 +53,8 @@ export class BackupRestorer implements IWorkbenchContribution { if (unresolved.length > 0) { return this.doOpenEditors(unresolved).then(() => this.doResolveOpenedBackups(unresolved)); } - return undefined; + + return void 0; }); }); } @@ -62,15 +62,15 @@ export class BackupRestorer implements IWorkbenchContribution { private doResolveOpenedBackups(backups: URI[]): TPromise { const stacks = this.groupService.getStacksModel(); - const restorePromises: TPromise[] = []; + const restorePromises: TPromise[] = []; const unresolved: URI[] = []; backups.forEach(backup => { if (stacks.isOpen(backup)) { - if (backup.scheme === 'file') { + if (backup.scheme === Schemas.file) { restorePromises.push(this.textFileService.models.loadOrCreate(backup).then(null, () => unresolved.push(backup))); - } else if (backup.scheme === 'untitled') { - restorePromises.push(this.untitledEditorService.get(backup).resolve().then(null, () => unresolved.push(backup))); + } else if (backup.scheme === UNTITLED_SCHEMA) { + restorePromises.push(this.untitledEditorService.loadOrCreate({ resource: backup }).then(null, () => unresolved.push(backup))); } } else { unresolved.push(backup); @@ -83,24 +83,22 @@ export class BackupRestorer implements IWorkbenchContribution { private doOpenEditors(resources: URI[]): TPromise { const stacks = this.groupService.getStacksModel(); const hasOpenedEditors = stacks.groups.length > 0; - - const inputs = resources.map(resource => this.resolveInput(resource)); - const openEditorsArgs = inputs.map((input, index) => { - return { input, options: { pinned: true, preserveFocus: true, inactive: index > 0 || hasOpenedEditors }, position: Position.ONE }; - }); + const inputs = resources.map((resource, index) => this.resolveInput(resource, index, hasOpenedEditors)); // Open all remaining backups as editors and resolve them to load their backups - return this.editorService.openEditors(openEditorsArgs).then(() => void 0); + return this.editorService.openEditors(inputs.map(input => { return { input, position: Position.ONE }; })).then(() => void 0); } - private resolveInput(resource: URI): IResourceInput | IUntitledResourceInput { - if (resource.scheme === 'untitled' && !BackupRestorer.UNTITLED_REGEX.test(resource.fsPath)) { + private resolveInput(resource: URI, index: number, hasOpenedEditors: boolean): IResourceInput | IUntitledResourceInput { + const options = { pinned: true, preserveFocus: true, inactive: index > 0 || hasOpenedEditors }; + + if (resource.scheme === UNTITLED_SCHEMA && !BackupRestorer.UNTITLED_REGEX.test(resource.fsPath)) { // TODO@Ben debt: instead of guessing if an untitled file has an associated file path or not // this information should be provided by the backup service and stored as meta data within - return { filePath: resource.fsPath }; + return { filePath: resource.fsPath, options }; } - return { resource }; + return { resource, options }; } public getId(): string { diff --git a/src/vs/workbench/parts/cli/electron-browser/cli.contribution.ts b/src/vs/workbench/parts/cli/electron-browser/cli.contribution.ts index 4ee6bb14480f0..053bfa2d5546a 100644 --- a/src/vs/workbench/parts/cli/electron-browser/cli.contribution.ts +++ b/src/vs/workbench/parts/cli/electron-browser/cli.contribution.ts @@ -12,7 +12,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import URI from 'vs/base/common/uri'; import { Action } from 'vs/base/common/actions'; import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actionRegistry'; -import { Registry } from 'vs/platform/platform'; +import { Registry } from 'vs/platform/registry/common/platform'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { IEditorService } from 'vs/platform/editor/common/editor'; diff --git a/src/vs/workbench/parts/codeEditor/codeEditor.contribution.ts b/src/vs/workbench/parts/codeEditor/codeEditor.contribution.ts index 7e8a05cdce05f..ce3998d91879c 100644 --- a/src/vs/workbench/parts/codeEditor/codeEditor.contribution.ts +++ b/src/vs/workbench/parts/codeEditor/codeEditor.contribution.ts @@ -3,8 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import './electron-browser/accessibility'; +import './electron-browser/inspectKeybindings'; +import './electron-browser/menuPreventer'; +import './electron-browser/selectionClipboard'; +import './electron-browser/textMate/inspectTMScopes'; +import './electron-browser/toggleMultiCursorModifier'; import './electron-browser/toggleRenderControlCharacter'; import './electron-browser/toggleRenderWhitespace'; import './electron-browser/toggleWordWrap'; import './electron-browser/wordWrapMigration'; -import './electron-browser/inspectKeybindings'; diff --git a/src/vs/editor/contrib/accessibility/browser/accessibility.css b/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.css similarity index 100% rename from src/vs/editor/contrib/accessibility/browser/accessibility.css rename to src/vs/workbench/parts/codeEditor/electron-browser/accessibility.css diff --git a/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.ts b/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.ts new file mode 100644 index 0000000000000..a88b7a7d35433 --- /dev/null +++ b/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.ts @@ -0,0 +1,335 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import 'vs/css!./accessibility'; +import * as nls from 'vs/nls'; +import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; +import { Disposable } from 'vs/base/common/lifecycle'; +import * as strings from 'vs/base/common/strings'; +import * as dom from 'vs/base/browser/dom'; +import { renderFormattedText } from 'vs/base/browser/htmlContentRenderer'; +import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; +import { Widget } from 'vs/base/browser/ui/widget'; +import { ServicesAccessor, IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; +import { RawContextKey, IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { ICommonCodeEditor, IEditorContribution } from 'vs/editor/common/editorCommon'; +import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; +import { editorAction, CommonEditorRegistry, EditorAction, EditorCommand } from 'vs/editor/common/editorCommonExtensions'; +import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition } from 'vs/editor/browser/editorBrowser'; +import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; +import { ToggleTabFocusModeAction } from 'vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode'; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { editorWidgetBackground, widgetShadow, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import * as editorOptions from 'vs/editor/common/config/editorOptions'; +import * as platform from 'vs/base/common/platform'; +import { IConfigurationEditingService, ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; +import { alert } from 'vs/base/browser/ui/aria/aria'; +import { IOpenerService } from 'vs/platform/opener/common/opener'; +import URI from 'vs/base/common/uri'; + +const CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE = new RawContextKey('accessibilityHelpWidgetVisible', false); + +@editorContribution +class AccessibilityHelpController extends Disposable implements IEditorContribution { + + private static ID = 'editor.contrib.accessibilityHelpController'; + + public static get(editor: ICommonCodeEditor): AccessibilityHelpController { + return editor.getContribution(AccessibilityHelpController.ID); + } + + private _editor: ICodeEditor; + private _widget: AccessibilityHelpWidget; + + constructor( + editor: ICodeEditor, + @IInstantiationService instantiationService: IInstantiationService + ) { + super(); + + this._editor = editor; + this._widget = this._register(instantiationService.createInstance(AccessibilityHelpWidget, this._editor)); + } + + public getId(): string { + return AccessibilityHelpController.ID; + } + + public show(): void { + this._widget.show(); + } + + public hide(): void { + this._widget.hide(); + } +} + +class AccessibilityHelpWidget extends Widget implements IOverlayWidget { + + private static ID = 'editor.contrib.accessibilityHelpWidget'; + private static WIDTH = 500; + private static HEIGHT = 300; + + private _editor: ICodeEditor; + private _domNode: FastDomNode; + private _contentDomNode: FastDomNode; + private _isVisible: boolean; + private _isVisibleKey: IContextKey; + + constructor( + editor: ICodeEditor, + @IContextKeyService private _contextKeyService: IContextKeyService, + @IKeybindingService private _keybindingService: IKeybindingService, + @IConfigurationService private _configurationService: IConfigurationService, + @IConfigurationEditingService private _configurationEditingService: IConfigurationEditingService, + @IOpenerService private _openerService: IOpenerService + ) { + super(); + + this._editor = editor; + this._isVisibleKey = CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE.bindTo(this._contextKeyService); + + this._domNode = createFastDomNode(document.createElement('div')); + this._domNode.setClassName('accessibilityHelpWidget'); + this._domNode.setWidth(AccessibilityHelpWidget.WIDTH); + this._domNode.setHeight(AccessibilityHelpWidget.HEIGHT); + this._domNode.setDisplay('none'); + this._domNode.setAttribute('role', 'dialog'); + this._domNode.setAttribute('aria-hidden', 'true'); + + this._contentDomNode = createFastDomNode(document.createElement('div')); + this._contentDomNode.setAttribute('role', 'document'); + this._domNode.appendChild(this._contentDomNode); + + this._isVisible = false; + + this._register(this._editor.onDidLayoutChange(() => { + if (this._isVisible) { + this._layout(); + } + })); + + // Intentionally not configurable! + this._register(dom.addStandardDisposableListener(this._contentDomNode.domNode, 'keydown', (e) => { + if (!this._isVisible) { + return; + } + + if (e.equals(KeyMod.CtrlCmd | KeyCode.KEY_E)) { + alert(nls.localize('emergencyConfOn', "Now changing the setting `editor.accessibilitySupport` to 'on'.")); + + this._configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { + key: 'editor.accessibilitySupport', + value: 'on' + }); + + e.preventDefault(); + e.stopPropagation(); + } + + if (e.equals(KeyMod.CtrlCmd | KeyCode.KEY_H)) { + alert(nls.localize('openingDocs', "Now opening the VS Code Accessibility documentation page.")); + + this._openerService.open(URI.parse('https://go.microsoft.com/fwlink/?linkid=851010')); + + e.preventDefault(); + e.stopPropagation(); + } + })); + + this.onblur(this._contentDomNode.domNode, () => { + this.hide(); + }); + + this._editor.addOverlayWidget(this); + } + + public dispose(): void { + this._editor.removeOverlayWidget(this); + super.dispose(); + } + + public getId(): string { + return AccessibilityHelpWidget.ID; + } + + public getDomNode(): HTMLElement { + return this._domNode.domNode; + } + + public getPosition(): IOverlayWidgetPosition { + return { + preference: null + }; + } + + public show(): void { + if (this._isVisible) { + return; + } + this._isVisible = true; + this._isVisibleKey.set(true); + this._layout(); + this._domNode.setDisplay('block'); + this._domNode.setAttribute('aria-hidden', 'false'); + this._contentDomNode.domNode.tabIndex = 0; + this._buildContent(); + this._contentDomNode.domNode.focus(); + } + + private _descriptionForCommand(commandId: string, msg: string, noKbMsg: string): string { + let kb = this._keybindingService.lookupKeybinding(commandId); + if (kb) { + return strings.format(msg, kb.getAriaLabel()); + } + return strings.format(noKbMsg, commandId); + } + + private _buildContent() { + let opts = this._editor.getConfiguration(); + let text = nls.localize('introMsg', "Thank you for trying out VS Code's accessibility options."); + + text += '\n\n' + nls.localize('status', "Status:"); + + const configuredValue = this._configurationService.getConfiguration('editor').accessibilitySupport; + const actualValue = opts.accessibilitySupport; + + const emergencyTurnOnMessage = ( + platform.isMacintosh + ? nls.localize('changeConfigToOnMac', "To configure the editor to be permanently optimized for usage with a Screen Reader press Command+E now.") + : nls.localize('changeConfigToOnWinLinux', "To configure the editor to be permanently optimized for usage with a Screen Reader press Control+E now.") + ); + + switch (configuredValue) { + case 'auto': + switch (actualValue) { + case platform.AccessibilitySupport.Unknown: + // Should never happen in VS Code + text += '\n\n - ' + nls.localize('auto_unknown', "The editor is configured to use platform APIs to detect when a Screen Reader is attached, but the current runtime does not support this."); + break; + case platform.AccessibilitySupport.Enabled: + text += '\n\n - ' + nls.localize('auto_on', "The editor has automatically detected a Screen Reader is attached."); + break; + case platform.AccessibilitySupport.Disabled: + text += '\n\n - ' + nls.localize('auto_off', "The editor is configured to automatically detect when a Screen Reader is attached, which is not the case at this time."); + text += ' ' + emergencyTurnOnMessage; + break; + } + break; + case 'on': + text += '\n\n - ' + nls.localize('configuredOn', "The editor is configured to be permanently optimized for usage with a Screen Reader - you can change this by editing the setting `editor.accessibilitySupport`."); + break; + case 'off': + text += '\n\n - ' + nls.localize('configuredOff', "The editor is configured to never be optimized for usage with a Screen Reader."); + text += ' ' + emergencyTurnOnMessage; + break; + } + + const NLS_TAB_FOCUS_MODE_ON = nls.localize('tabFocusModeOnMsg', "Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."); + const NLS_TAB_FOCUS_MODE_ON_NO_KB = nls.localize('tabFocusModeOnMsgNoKb', "Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."); + const NLS_TAB_FOCUS_MODE_OFF = nls.localize('tabFocusModeOffMsg', "Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."); + const NLS_TAB_FOCUS_MODE_OFF_NO_KB = nls.localize('tabFocusModeOffMsgNoKb', "Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding."); + + if (opts.tabFocusMode) { + text += '\n\n - ' + this._descriptionForCommand(ToggleTabFocusModeAction.ID, NLS_TAB_FOCUS_MODE_ON, NLS_TAB_FOCUS_MODE_ON_NO_KB); + } else { + text += '\n\n - ' + this._descriptionForCommand(ToggleTabFocusModeAction.ID, NLS_TAB_FOCUS_MODE_OFF, NLS_TAB_FOCUS_MODE_OFF_NO_KB); + } + + const openDocMessage = ( + platform.isMacintosh + ? nls.localize('openDocMac', "Press Command+H now to open a browser window with more VS Code information related to Accessibility.") + : nls.localize('openDocWinLinux', "Press Control+H now to open a browser window with more VS Code information related to Accessibility.") + ); + + text += '\n\n' + openDocMessage; + + text += '\n\n' + nls.localize('outroMsg', "You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."); + + this._contentDomNode.domNode.appendChild(renderFormattedText(text)); + } + + public hide(): void { + if (!this._isVisible) { + return; + } + this._isVisible = false; + this._isVisibleKey.reset(); + this._domNode.setDisplay('none'); + this._domNode.setAttribute('aria-hidden', 'true'); + this._contentDomNode.domNode.tabIndex = -1; + dom.clearNode(this._contentDomNode.domNode); + + this._editor.focus(); + } + + private _layout(): void { + let editorLayout = this._editor.getLayoutInfo(); + + let top = Math.round((editorLayout.height - AccessibilityHelpWidget.HEIGHT) / 2); + this._domNode.setTop(top); + + let left = Math.round((editorLayout.width - AccessibilityHelpWidget.WIDTH) / 2); + this._domNode.setLeft(left); + } +} + +@editorAction +class ShowAccessibilityHelpAction extends EditorAction { + + constructor() { + super({ + id: 'editor.action.showAccessibilityHelp', + label: nls.localize('ShowAccessibilityHelpAction', "Show Accessibility Help"), + alias: 'Show Accessibility Help', + precondition: null, + kbOpts: { + kbExpr: EditorContextKeys.focus, + primary: KeyMod.Alt | KeyCode.F1 + } + }); + } + + public run(accessor: ServicesAccessor, editor: ICommonCodeEditor): void { + let controller = AccessibilityHelpController.get(editor); + if (controller) { + controller.show(); + } + } +} + +const AccessibilityHelpCommand = EditorCommand.bindToContribution(AccessibilityHelpController.get); + +CommonEditorRegistry.registerEditorCommand(new AccessibilityHelpCommand({ + id: 'closeAccessibilityHelp', + precondition: CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE, + handler: x => x.hide(), + kbOpts: { + weight: CommonEditorRegistry.commandWeight(100), + kbExpr: EditorContextKeys.focus, + primary: KeyCode.Escape, secondary: [KeyMod.Shift | KeyCode.Escape] + } +})); + +registerThemingParticipant((theme, collector) => { + let widgetBackground = theme.getColor(editorWidgetBackground); + if (widgetBackground) { + collector.addRule(`.monaco-editor .accessibilityHelpWidget { background-color: ${widgetBackground}; }`); + } + + let widgetShadowColor = theme.getColor(widgetShadow); + if (widgetShadowColor) { + collector.addRule(`.monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px ${widgetShadowColor}; }`); + } + + let hcBorder = theme.getColor(contrastBorder); + if (hcBorder) { + collector.addRule(`.monaco-editor .accessibilityHelpWidget { border: 2px solid ${hcBorder}; }`); + } +}); diff --git a/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.ts b/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.ts new file mode 100644 index 0000000000000..e36b6f9e85c36 --- /dev/null +++ b/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.ts @@ -0,0 +1,384 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import * as nls from 'vs/nls'; +import { parse, ParseError } from 'vs/base/common/json'; +import { readFile } from 'vs/base/node/pfs'; +import { CharacterPair, LanguageConfiguration, IAutoClosingPair, IAutoClosingPairConditional, IndentationRule, CommentRule } from 'vs/editor/common/modes/languageConfiguration'; +import { IModeService } from 'vs/editor/common/services/modeService'; +import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; +import { Extensions, IJSONContributionRegistry } from 'vs/platform/jsonschemas/common/jsonContributionRegistry'; +import { Registry } from 'vs/platform/registry/common/platform'; +import { IJSONSchema } from 'vs/base/common/jsonSchema'; +import { LanguageIdentifier } from 'vs/editor/common/modes'; +import { ITextMateService } from 'vs/workbench/services/textMate/electron-browser/textMateService'; + +interface IRegExp { + pattern: string; + flags?: string; +} + +interface IIndentationRules { + decreaseIndentPattern: string | IRegExp; + increaseIndentPattern: string | IRegExp; + indentNextLinePattern?: string | IRegExp; + unIndentedLinePattern?: string | IRegExp; +} + +interface ILanguageConfiguration { + comments?: CommentRule; + brackets?: CharacterPair[]; + autoClosingPairs?: (CharacterPair | IAutoClosingPairConditional)[]; + surroundingPairs?: (CharacterPair | IAutoClosingPair)[]; + wordPattern?: string | IRegExp; + indentationRules?: IIndentationRules; +} + +export class LanguageConfigurationFileHandler { + + private _modeService: IModeService; + private _done: boolean[]; + + constructor( + @ITextMateService textMateService: ITextMateService, + @IModeService modeService: IModeService + ) { + this._modeService = modeService; + this._done = []; + + // Listen for hints that a language configuration is needed/usefull and then load it once + this._modeService.onDidCreateMode((mode) => this._loadConfigurationsForMode(mode.getLanguageIdentifier())); + textMateService.onDidEncounterLanguage((languageId) => { + this._loadConfigurationsForMode(this._modeService.getLanguageIdentifier(languageId)); + }); + } + + private _loadConfigurationsForMode(languageIdentifier: LanguageIdentifier): void { + if (this._done[languageIdentifier.id]) { + return; + } + this._done[languageIdentifier.id] = true; + + let configurationFiles = this._modeService.getConfigurationFiles(languageIdentifier.language); + configurationFiles.forEach((configFilePath) => this._handleConfigFile(languageIdentifier, configFilePath)); + } + + private _handleConfigFile(languageIdentifier: LanguageIdentifier, configFilePath: string): void { + readFile(configFilePath).then((fileContents) => { + var errors: ParseError[] = []; + var configuration = parse(fileContents.toString(), errors); + if (errors.length) { + console.error(nls.localize('parseErrors', "Errors parsing {0}: {1}", configFilePath, errors.join('\n'))); + } + this._handleConfig(languageIdentifier, configuration); + }, (err) => { + console.error(err); + }); + } + + private _handleConfig(languageIdentifier: LanguageIdentifier, configuration: ILanguageConfiguration): void { + + let richEditConfig: LanguageConfiguration = {}; + + if (configuration.comments) { + richEditConfig.comments = configuration.comments; + } + + if (configuration.brackets) { + richEditConfig.brackets = configuration.brackets; + } + + if (configuration.autoClosingPairs) { + richEditConfig.autoClosingPairs = this._mapCharacterPairs(configuration.autoClosingPairs); + } + + if (configuration.surroundingPairs) { + richEditConfig.surroundingPairs = this._mapCharacterPairs(configuration.surroundingPairs); + } + + if (configuration.wordPattern) { + try { + let wordPattern = this._parseRegex(configuration.wordPattern); + if (wordPattern) { + richEditConfig.wordPattern = wordPattern; + } + } catch (error) { + // Malformed regexes are ignored + } + } + + if (configuration.indentationRules) { + let indentationRules = this._mapIndentationRules(configuration.indentationRules); + if (indentationRules) { + richEditConfig.indentationRules = indentationRules; + } + } + + LanguageConfigurationRegistry.register(languageIdentifier, richEditConfig); + } + + private _parseRegex(value: string | IRegExp) { + if (typeof value === 'string') { + return new RegExp(value, ''); + } else if (typeof value === 'object') { + return new RegExp(value.pattern, value.flags); + } + + return null; + } + + private _mapIndentationRules(indentationRules: IIndentationRules): IndentationRule { + try { + let increaseIndentPattern = this._parseRegex(indentationRules.increaseIndentPattern); + let decreaseIndentPattern = this._parseRegex(indentationRules.decreaseIndentPattern); + + if (increaseIndentPattern && decreaseIndentPattern) { + let result: IndentationRule = { + increaseIndentPattern: increaseIndentPattern, + decreaseIndentPattern: decreaseIndentPattern + }; + + if (indentationRules.indentNextLinePattern) { + result.indentNextLinePattern = this._parseRegex(indentationRules.indentNextLinePattern); + } + if (indentationRules.unIndentedLinePattern) { + result.unIndentedLinePattern = this._parseRegex(indentationRules.unIndentedLinePattern); + } + + return result; + } + } catch (error) { + // Malformed regexes are ignored + } + + return null; + } + + private _mapCharacterPairs(pairs: (CharacterPair | IAutoClosingPairConditional)[]): IAutoClosingPairConditional[] { + return pairs.map(pair => { + if (Array.isArray(pair)) { + return { open: pair[0], close: pair[1] }; + } + return pair; + }); + } +} + +const schemaId = 'vscode://schemas/language-configuration'; +const schema: IJSONSchema = { + default: { + comments: { + blockComment: ['/*', '*/'], + lineComment: '//' + }, + brackets: [['(', ')'], ['[', ']'], ['{', '}']], + autoClosingPairs: [['(', ')'], ['[', ']'], ['{', '}']], + surroundingPairs: [['(', ')'], ['[', ']'], ['{', '}']] + }, + definitions: { + openBracket: { + type: 'string', + description: nls.localize('schema.openBracket', 'The opening bracket character or string sequence.') + }, + closeBracket: { + type: 'string', + description: nls.localize('schema.closeBracket', 'The closing bracket character or string sequence.') + }, + bracketPair: { + type: 'array', + items: [{ + $ref: '#definitions/openBracket' + }, { + $ref: '#definitions/closeBracket' + }] + } + }, + properties: { + comments: { + default: { + blockComment: ['/*', '*/'], + lineComment: '//' + }, + description: nls.localize('schema.comments', 'Defines the comment symbols'), + type: 'object', + properties: { + blockComment: { + type: 'array', + description: nls.localize('schema.blockComments', 'Defines how block comments are marked.'), + items: [{ + type: 'string', + description: nls.localize('schema.blockComment.begin', 'The character sequence that starts a block comment.') + }, { + type: 'string', + description: nls.localize('schema.blockComment.end', 'The character sequence that ends a block comment.') + }] + }, + lineComment: { + type: 'string', + description: nls.localize('schema.lineComment', 'The character sequence that starts a line comment.') + } + } + }, + brackets: { + default: [['(', ')'], ['[', ']'], ['{', '}']], + description: nls.localize('schema.brackets', 'Defines the bracket symbols that increase or decrease the indentation.'), + type: 'array', + items: { + $ref: '#definitions/bracketPair' + } + }, + autoClosingPairs: { + default: [['(', ')'], ['[', ']'], ['{', '}']], + description: nls.localize('schema.autoClosingPairs', 'Defines the bracket pairs. When a opening bracket is entered, the closing bracket is inserted automatically.'), + type: 'array', + items: { + oneOf: [{ + $ref: '#definitions/bracketPair' + }, { + type: 'object', + properties: { + open: { + $ref: '#definitions/openBracket' + }, + close: { + $ref: '#definitions/closeBracket' + }, + notIn: { + type: 'array', + description: nls.localize('schema.autoClosingPairs.notIn', 'Defines a list of scopes where the auto pairs are disabled.'), + items: { + enum: ['string', 'comment'] + } + } + } + }] + } + }, + surroundingPairs: { + default: [['(', ')'], ['[', ']'], ['{', '}']], + description: nls.localize('schema.surroundingPairs', 'Defines the bracket pairs that can be used to surround a selected string.'), + type: 'array', + items: { + oneOf: [{ + $ref: '#definitions/bracketPair' + }, { + type: 'object', + properties: { + open: { + $ref: '#definitions/openBracket' + }, + close: { + $ref: '#definitions/closeBracket' + } + } + }] + } + }, + wordPattern: { + default: '', + description: nls.localize('schema.wordPattern', 'The word definition for the language.'), + type: ['string', 'object'], + properties: { + pattern: { + type: 'string', + description: nls.localize('schema.wordPattern.pattern', 'The RegExp pattern used to match words.'), + default: '', + }, + flags: { + type: 'string', + description: nls.localize('schema.wordPattern.flags', 'The RegExp flags used to match words.'), + default: 'g', + pattern: '^([gimuy]+)$', + patternErrorMessage: nls.localize('schema.wordPattern.flags.errorMessage', 'Must match the pattern `/^([gimuy]+)$/`.') + } + } + }, + indentationRules: { + default: { + increaseIndentPattern: '', + decreaseIndentPattern: '' + }, + description: nls.localize('schema.indentationRules', 'The language\'s indentation settings.'), + type: 'object', + properties: { + increaseIndentPattern: { + type: ['string', 'object'], + description: nls.localize('schema.indentationRules.increaseIndentPattern', 'If a line matches this pattern, then all the lines after it should be indented once (until another rule matches).'), + properties: { + pattern: { + type: 'string', + description: nls.localize('schema.indentationRules.increaseIndentPattern.pattern', 'The RegExp pattern for increaseIndentPattern.'), + default: '', + }, + flags: { + type: 'string', + description: nls.localize('schema.indentationRules.increaseIndentPattern.flags', 'The RegExp flags for increaseIndentPattern.'), + default: '', + pattern: '^([gimuy]+)$', + patternErrorMessage: nls.localize('schema.indentationRules.increaseIndentPattern.errorMessage', 'Must match the pattern `/^([gimuy]+)$/`.') + } + } + }, + decreaseIndentPattern: { + type: ['string', 'object'], + description: nls.localize('schema.indentationRules.decreaseIndentPattern', 'If a line matches this pattern, then all the lines after it should be unindendented once (until another rule matches).'), + properties: { + pattern: { + type: 'string', + description: nls.localize('schema.indentationRules.decreaseIndentPattern.pattern', 'The RegExp pattern for decreaseIndentPattern.'), + default: '', + }, + flags: { + type: 'string', + description: nls.localize('schema.indentationRules.decreaseIndentPattern.flags', 'The RegExp flags for decreaseIndentPattern.'), + default: '', + pattern: '^([gimuy]+)$', + patternErrorMessage: nls.localize('schema.indentationRules.decreaseIndentPattern.errorMessage', 'Must match the pattern `/^([gimuy]+)$/`.') + } + } + }, + indentNextLinePattern: { + type: ['string', 'object'], + description: nls.localize('schema.indentationRules.indentNextLinePattern', 'If a line matches this pattern, then **only the next line** after it should be indented once.'), + properties: { + pattern: { + type: 'string', + description: nls.localize('schema.indentationRules.indentNextLinePattern.pattern', 'The RegExp pattern for indentNextLinePattern.'), + default: '', + }, + flags: { + type: 'string', + description: nls.localize('schema.indentationRules.indentNextLinePattern.flags', 'The RegExp flags for indentNextLinePattern.'), + default: '', + pattern: '^([gimuy]+)$', + patternErrorMessage: nls.localize('schema.indentationRules.indentNextLinePattern.errorMessage', 'Must match the pattern `/^([gimuy]+)$/`.') + } + } + }, + unIndentedLinePattern: { + type: ['string', 'object'], + description: nls.localize('schema.indentationRules.unIndentedLinePattern', 'If a line matches this pattern, then its indentation should not be changed and it should not be evaluated against the other rules.'), + properties: { + pattern: { + type: 'string', + description: nls.localize('schema.indentationRules.unIndentedLinePattern.pattern', 'The RegExp pattern for unIndentedLinePattern.'), + default: '', + }, + flags: { + type: 'string', + description: nls.localize('schema.indentationRules.unIndentedLinePattern.flags', 'The RegExp flags for unIndentedLinePattern.'), + default: '', + pattern: '^([gimuy]+)$', + patternErrorMessage: nls.localize('schema.indentationRules.unIndentedLinePattern.errorMessage', 'Must match the pattern `/^([gimuy]+)$/`.') + } + } + } + } + } + } +}; +let schemaRegistry = Registry.as(Extensions.JSONContribution); +schemaRegistry.registerSchema(schemaId, schema); diff --git a/src/vs/editor/contrib/multicursor/browser/menuPreventer.ts b/src/vs/workbench/parts/codeEditor/electron-browser/menuPreventer.ts similarity index 100% rename from src/vs/editor/contrib/multicursor/browser/menuPreventer.ts rename to src/vs/workbench/parts/codeEditor/electron-browser/menuPreventer.ts diff --git a/src/vs/editor/contrib/selectionClipboard/electron-browser/selectionClipboard.ts b/src/vs/workbench/parts/codeEditor/electron-browser/selectionClipboard.ts similarity index 100% rename from src/vs/editor/contrib/selectionClipboard/electron-browser/selectionClipboard.ts rename to src/vs/workbench/parts/codeEditor/electron-browser/selectionClipboard.ts diff --git a/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.css b/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.css similarity index 78% rename from src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.css rename to src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.css index 6f02755f59745..0c4905290d27e 100644 --- a/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.css +++ b/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.css @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ .tm-inspect-widget { - background-color: #F3F3F3; - border: 1px solid #CCC; z-index: 50; -webkit-user-select: text; -ms-user-select: text; @@ -16,14 +14,15 @@ padding: 10px; } -.monaco-editor.vs-dark .tm-inspect-widget { background-color: #2D2D30; border-color: #555; } - -.monaco-editor.hc-black .tm-inspect-widget { background-color: #0C141F; } - .tm-token { font-family: monospace; } +.tm-metadata-separator { + height: 1px; + border: 0; +} + .tm-token-length { font-weight: normal; font-size: 60%; diff --git a/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.ts b/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.ts similarity index 89% rename from src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.ts rename to src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.ts index f8bfa8c6447f8..0518392efba2f 100644 --- a/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.ts +++ b/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.ts @@ -9,6 +9,7 @@ import * as nls from 'vs/nls'; import * as dom from 'vs/base/browser/dom'; import { Disposable } from 'vs/base/common/lifecycle'; import { escape } from 'vs/base/common/strings'; +import { KeyCode } from 'vs/base/common/keyCodes'; import { Position } from 'vs/editor/common/core/position'; import { ICommonCodeEditor, IEditorContribution, IModel } from 'vs/editor/common/editorCommon'; import { editorAction, EditorAction, ServicesAccessor } from 'vs/editor/common/editorCommonExtensions'; @@ -16,16 +17,18 @@ import { ICodeEditor, ContentWidgetPositionPreference, IContentWidget, IContentW import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; import { TPromise } from 'vs/base/common/winjs.base'; import { IGrammar, StackElement, IToken } from 'vscode-textmate'; -import { ITextMateService } from 'vs/editor/node/textMate/textMateService'; +import { ITextMateService } from 'vs/workbench/services/textMate/electron-browser/textMateService'; import { IModeService } from 'vs/editor/common/services/modeService'; import { TokenMetadata } from 'vs/editor/common/model/tokensBinaryEncoding'; import { TokenizationRegistry, LanguageIdentifier, FontStyle, StandardTokenType } from 'vs/editor/common/modes'; import { CharCode } from 'vs/base/common/charCode'; -import { findMatchingThemeRule } from 'vs/editor/electron-browser/textMate/TMHelper'; +import { findMatchingThemeRule } from 'vs/workbench/services/textMate/electron-browser/TMHelper'; import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService'; import { Color } from 'vs/base/common/color'; import { IMessageService } from 'vs/platform/message/common/message'; import Severity from 'vs/base/common/severity'; +import { registerThemingParticipant, HIGH_CONTRAST } from 'vs/platform/theme/common/themeService'; +import { editorHoverBackground, editorHoverBorder } from 'vs/platform/theme/common/colorRegistry'; @editorContribution class InspectTMScopesController extends Disposable implements IEditorContribution { @@ -60,6 +63,7 @@ class InspectTMScopesController extends Disposable implements IEditorContributio this._register(this._editor.onDidChangeModel((e) => this.stop())); this._register(this._editor.onDidChangeModelLanguage((e) => this.stop())); + this._register(this._editor.onKeyUp((e) => e.keyCode === KeyCode.Escape && this.stop())); } public getId(): string { @@ -87,6 +91,14 @@ class InspectTMScopesController extends Disposable implements IEditorContributio this._widget = null; } } + + public toggle(): void { + if (!this._widget) { + this.launch(); + } else { + this.stop(); + } + } } @editorAction @@ -104,7 +116,7 @@ class InspectTMScopes extends EditorAction { public run(accessor: ServicesAccessor, editor: ICommonCodeEditor): void { let controller = InspectTMScopesController.get(editor); if (controller) { - controller.launch(); + controller.toggle(); } } } @@ -251,7 +263,7 @@ class InspectTMScopesWidget extends Disposable implements IContentWidget { let tokenText = this._model.getLineContent(position.lineNumber).substring(tokenStartIndex, tokenEndIndex); result += `

${renderTokenText(tokenText)}(${tokenText.length} ${tokenText.length === 1 ? 'char' : 'chars'})

`; - result += `
`; + result += ``; let metadata = this._decodeMetadata(data.tokens2[(token2Index << 1) + 1]); result += ``; @@ -263,7 +275,7 @@ class InspectTMScopesWidget extends Disposable implements IContentWidget { result += ``; let theme = this._themeService.getColorTheme(); - result += `
`; + result += ``; let matchingRule = findMatchingThemeRule(theme, data.tokens1[token1Index].scopes); if (matchingRule) { result += `${matchingRule.rawSelector}\n${JSON.stringify(matchingRule.settings, null, '\t')}`; @@ -271,7 +283,7 @@ class InspectTMScopesWidget extends Disposable implements IContentWidget { result += `No theme selector.`; } - result += `
`; + result += ``; result += `